summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk63
-rw-r--r--JavaScriptCore/API/APIShims.h99
-rw-r--r--JavaScriptCore/API/JSBase.cpp18
-rw-r--r--JavaScriptCore/API/JSBase.h20
-rw-r--r--JavaScriptCore/API/JSCallbackConstructor.cpp3
-rw-r--r--JavaScriptCore/API/JSCallbackConstructor.h2
-rw-r--r--JavaScriptCore/API/JSCallbackFunction.cpp3
-rw-r--r--JavaScriptCore/API/JSCallbackFunction.h2
-rw-r--r--JavaScriptCore/API/JSCallbackObject.h5
-rw-r--r--JavaScriptCore/API/JSCallbackObjectFunctions.h56
-rw-r--r--JavaScriptCore/API/JSClassRef.cpp65
-rw-r--r--JavaScriptCore/API/JSClassRef.h3
-rw-r--r--JavaScriptCore/API/JSContextRef.cpp28
-rw-r--r--JavaScriptCore/API/JSObjectRef.cpp64
-rw-r--r--JavaScriptCore/API/JSValueRef.cpp77
-rw-r--r--JavaScriptCore/API/OpaqueJSString.cpp2
-rw-r--r--JavaScriptCore/API/tests/testapi.c23
-rw-r--r--JavaScriptCore/API/tests/testapi.js77
-rw-r--r--JavaScriptCore/Android.mk3
-rw-r--r--JavaScriptCore/Android.v8.wtf.mk1
-rw-r--r--JavaScriptCore/ChangeLog3743
-rw-r--r--JavaScriptCore/Configurations/FeatureDefines.xcconfig12
-rw-r--r--JavaScriptCore/Configurations/Version.xcconfig2
-rw-r--r--JavaScriptCore/DerivedSources.pro95
-rw-r--r--JavaScriptCore/GNUmakefile.am22
-rw-r--r--JavaScriptCore/Info.plist4
-rw-r--r--JavaScriptCore/JavaScriptCore.exp61
-rw-r--r--JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp1
-rw-r--r--JavaScriptCore/JavaScriptCore.gypi11
-rw-r--r--JavaScriptCore/JavaScriptCore.pri92
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist4
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def55
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc2
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj616
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops2
-rwxr-xr-xJavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh10
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj12
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFCommon.vsprops4
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops2
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops2
-rw-r--r--JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj73
-rw-r--r--JavaScriptCore/JavaScriptCoreSources.bkl193
-rw-r--r--JavaScriptCore/assembler/ARMAssembler.cpp58
-rw-r--r--JavaScriptCore/assembler/ARMAssembler.h49
-rw-r--r--JavaScriptCore/assembler/ARMv7Assembler.h12
-rw-r--r--JavaScriptCore/assembler/AbstractMacroAssembler.h8
-rw-r--r--JavaScriptCore/assembler/MacroAssembler.h13
-rw-r--r--JavaScriptCore/assembler/MacroAssemblerARM.cpp11
-rw-r--r--JavaScriptCore/assembler/MacroAssemblerARM.h6
-rw-r--r--JavaScriptCore/assembler/MacroAssemblerCodeRef.h6
-rw-r--r--JavaScriptCore/assembler/MacroAssemblerX86.h2
-rw-r--r--JavaScriptCore/assembler/MacroAssemblerX86Common.h12
-rw-r--r--JavaScriptCore/assembler/MacroAssemblerX86_64.h2
-rw-r--r--JavaScriptCore/assembler/X86Assembler.h64
-rw-r--r--JavaScriptCore/bytecode/CodeBlock.cpp28
-rw-r--r--JavaScriptCore/bytecode/Opcode.h4
-rw-r--r--JavaScriptCore/bytecode/SamplingTool.cpp4
-rw-r--r--JavaScriptCore/bytecompiler/NodesCodegen.cpp5
-rw-r--r--JavaScriptCore/config.h10
-rw-r--r--JavaScriptCore/create_rvct_stubs52
-rw-r--r--JavaScriptCore/debugger/Debugger.cpp5
-rw-r--r--JavaScriptCore/debugger/Debugger.h2
-rw-r--r--JavaScriptCore/debugger/DebuggerActivation.cpp4
-rw-r--r--JavaScriptCore/debugger/DebuggerActivation.h4
-rw-r--r--JavaScriptCore/interpreter/CallFrame.h16
-rw-r--r--JavaScriptCore/interpreter/Interpreter.cpp36
-rw-r--r--JavaScriptCore/interpreter/Register.h62
-rw-r--r--JavaScriptCore/interpreter/RegisterFile.cpp2
-rw-r--r--JavaScriptCore/interpreter/RegisterFile.h8
-rw-r--r--JavaScriptCore/jit/ExecutableAllocator.h28
-rw-r--r--JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp2
-rw-r--r--JavaScriptCore/jit/ExecutableAllocatorPosix.cpp6
-rw-r--r--JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp4
-rw-r--r--JavaScriptCore/jit/ExecutableAllocatorWin.cpp2
-rw-r--r--JavaScriptCore/jit/JIT.cpp2
-rw-r--r--JavaScriptCore/jit/JIT.h60
-rw-r--r--JavaScriptCore/jit/JITArithmetic.cpp12
-rw-r--r--JavaScriptCore/jit/JITInlineMethods.h18
-rw-r--r--JavaScriptCore/jit/JITOpcodes.cpp273
-rw-r--r--JavaScriptCore/jit/JITPropertyAccess.cpp44
-rw-r--r--JavaScriptCore/jit/JITStubs.cpp188
-rw-r--r--JavaScriptCore/jit/JITStubs.h14
-rw-r--r--JavaScriptCore/jsc.cpp69
-rw-r--r--JavaScriptCore/jscore.bkl150
-rw-r--r--JavaScriptCore/os-win32/WinMain.cpp81
-rw-r--r--JavaScriptCore/parser/Grammar.y2
-rw-r--r--JavaScriptCore/parser/Lexer.cpp2
-rwxr-xr-xJavaScriptCore/pcre/dftables1
-rw-r--r--JavaScriptCore/pcre/pcre.pri23
-rw-r--r--JavaScriptCore/profiler/ProfileNode.cpp4
-rw-r--r--JavaScriptCore/profiler/Profiler.cpp2
-rw-r--r--JavaScriptCore/profiler/TreeProfile.cpp0
-rw-r--r--JavaScriptCore/profiler/TreeProfile.h0
-rw-r--r--JavaScriptCore/qt/api/QtScript.pro36
-rw-r--r--JavaScriptCore/qt/api/qscriptconverter_p.h50
-rw-r--r--JavaScriptCore/qt/api/qscriptengine.cpp88
-rw-r--r--JavaScriptCore/qt/api/qscriptengine.h47
-rw-r--r--JavaScriptCore/qt/api/qscriptengine_p.cpp54
-rw-r--r--JavaScriptCore/qt/api/qscriptengine_p.h98
-rw-r--r--JavaScriptCore/qt/api/qscriptvalue.cpp556
-rw-r--r--JavaScriptCore/qt/api/qscriptvalue.h99
-rw-r--r--JavaScriptCore/qt/api/qscriptvalue_p.h719
-rw-r--r--JavaScriptCore/qt/api/qtscriptglobal.h44
-rw-r--r--JavaScriptCore/qt/tests/qscriptengine/qscriptengine.pro7
-rw-r--r--JavaScriptCore/qt/tests/qscriptengine/tst_qscriptengine.cpp58
-rw-r--r--JavaScriptCore/qt/tests/qscriptvalue/qscriptvalue.pro7
-rw-r--r--JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.cpp427
-rw-r--r--JavaScriptCore/qt/tests/tests.pri28
-rw-r--r--JavaScriptCore/qt/tests/tests.pro3
-rw-r--r--JavaScriptCore/runtime/Arguments.cpp13
-rw-r--r--JavaScriptCore/runtime/Arguments.h3
-rw-r--r--JavaScriptCore/runtime/ArrayPrototype.cpp3
-rw-r--r--JavaScriptCore/runtime/BooleanObject.h2
-rw-r--r--JavaScriptCore/runtime/Collector.cpp742
-rw-r--r--JavaScriptCore/runtime/Collector.h146
-rw-r--r--JavaScriptCore/runtime/CollectorHeapIterator.h126
-rw-r--r--JavaScriptCore/runtime/CommonIdentifiers.h1
-rw-r--r--JavaScriptCore/runtime/Completion.cpp2
-rw-r--r--JavaScriptCore/runtime/DateConstructor.cpp8
-rw-r--r--JavaScriptCore/runtime/DateConversion.cpp26
-rw-r--r--JavaScriptCore/runtime/DateConversion.h14
-rw-r--r--JavaScriptCore/runtime/DateInstance.cpp6
-rw-r--r--JavaScriptCore/runtime/DateInstance.h3
-rw-r--r--JavaScriptCore/runtime/DatePrototype.cpp30
-rw-r--r--JavaScriptCore/runtime/DatePrototype.h2
-rw-r--r--JavaScriptCore/runtime/ErrorPrototype.cpp22
-rw-r--r--JavaScriptCore/runtime/ExceptionHelpers.cpp69
-rw-r--r--JavaScriptCore/runtime/Executable.cpp12
-rw-r--r--JavaScriptCore/runtime/FunctionConstructor.cpp22
-rw-r--r--JavaScriptCore/runtime/FunctionPrototype.cpp6
-rw-r--r--JavaScriptCore/runtime/FunctionPrototype.h2
-rw-r--r--JavaScriptCore/runtime/GetterSetter.h2
-rw-r--r--JavaScriptCore/runtime/GlobalEvalFunction.h2
-rw-r--r--JavaScriptCore/runtime/Identifier.cpp72
-rw-r--r--JavaScriptCore/runtime/Identifier.h66
-rw-r--r--JavaScriptCore/runtime/InitializeThreading.cpp5
-rw-r--r--JavaScriptCore/runtime/InternalFunction.h2
-rw-r--r--JavaScriptCore/runtime/JSAPIValueWrapper.h2
-rw-r--r--JavaScriptCore/runtime/JSActivation.h2
-rw-r--r--JavaScriptCore/runtime/JSArray.cpp34
-rw-r--r--JavaScriptCore/runtime/JSArray.h5
-rw-r--r--JavaScriptCore/runtime/JSByteArray.cpp16
-rw-r--r--JavaScriptCore/runtime/JSByteArray.h8
-rw-r--r--JavaScriptCore/runtime/JSCell.cpp9
-rw-r--r--JavaScriptCore/runtime/JSCell.h24
-rw-r--r--JavaScriptCore/runtime/JSFunction.cpp13
-rw-r--r--JavaScriptCore/runtime/JSFunction.h5
-rw-r--r--JavaScriptCore/runtime/JSGlobalData.cpp47
-rw-r--r--JavaScriptCore/runtime/JSGlobalData.h16
-rw-r--r--JavaScriptCore/runtime/JSGlobalObject.cpp2
-rw-r--r--JavaScriptCore/runtime/JSGlobalObject.h12
-rw-r--r--JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp40
-rw-r--r--JavaScriptCore/runtime/JSNotAnObject.cpp2
-rw-r--r--JavaScriptCore/runtime/JSNotAnObject.h4
-rw-r--r--JavaScriptCore/runtime/JSNumberCell.h2
-rw-r--r--JavaScriptCore/runtime/JSONObject.cpp29
-rw-r--r--JavaScriptCore/runtime/JSONObject.h2
-rw-r--r--JavaScriptCore/runtime/JSObject.cpp18
-rw-r--r--JavaScriptCore/runtime/JSObject.h26
-rw-r--r--JavaScriptCore/runtime/JSPropertyNameIterator.h2
-rw-r--r--JavaScriptCore/runtime/JSStaticScopeObject.h2
-rw-r--r--JavaScriptCore/runtime/JSString.cpp32
-rw-r--r--JavaScriptCore/runtime/JSString.h91
-rw-r--r--JavaScriptCore/runtime/JSValue.h3
-rw-r--r--JavaScriptCore/runtime/JSVariableObject.cpp6
-rw-r--r--JavaScriptCore/runtime/JSVariableObject.h4
-rw-r--r--JavaScriptCore/runtime/JSWrapperObject.h6
-rw-r--r--JavaScriptCore/runtime/LiteralParser.cpp24
-rw-r--r--JavaScriptCore/runtime/Lookup.cpp2
-rw-r--r--JavaScriptCore/runtime/Lookup.h2
-rw-r--r--JavaScriptCore/runtime/MarkStack.h2
-rw-r--r--JavaScriptCore/runtime/MarkStackNone.cpp49
-rw-r--r--JavaScriptCore/runtime/MarkStackPosix.cpp6
-rw-r--r--JavaScriptCore/runtime/MarkStackSymbian.cpp4
-rw-r--r--JavaScriptCore/runtime/MarkStackWin.cpp6
-rw-r--r--JavaScriptCore/runtime/MathObject.h2
-rw-r--r--JavaScriptCore/runtime/NumberConstructor.h2
-rw-r--r--JavaScriptCore/runtime/NumberObject.h2
-rw-r--r--JavaScriptCore/runtime/NumberPrototype.cpp52
-rw-r--r--JavaScriptCore/runtime/ObjectConstructor.cpp16
-rw-r--r--JavaScriptCore/runtime/ObjectPrototype.cpp2
-rw-r--r--JavaScriptCore/runtime/Operations.h57
-rw-r--r--JavaScriptCore/runtime/PropertyNameArray.cpp2
-rw-r--r--JavaScriptCore/runtime/RegExp.cpp1
-rw-r--r--JavaScriptCore/runtime/RegExp.h2
-rw-r--r--JavaScriptCore/runtime/RegExpConstructor.cpp2
-rw-r--r--JavaScriptCore/runtime/RegExpConstructor.h2
-rw-r--r--JavaScriptCore/runtime/RegExpMatchesArray.h4
-rw-r--r--JavaScriptCore/runtime/RegExpObject.cpp2
-rw-r--r--JavaScriptCore/runtime/RegExpObject.h2
-rw-r--r--JavaScriptCore/runtime/RegExpPrototype.cpp16
-rw-r--r--JavaScriptCore/runtime/SmallStrings.cpp22
-rw-r--r--JavaScriptCore/runtime/StringBuilder.h81
-rw-r--r--JavaScriptCore/runtime/StringConstructor.cpp12
-rw-r--r--JavaScriptCore/runtime/StringObject.cpp6
-rw-r--r--JavaScriptCore/runtime/StringObject.h4
-rw-r--r--JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h2
-rw-r--r--JavaScriptCore/runtime/StringPrototype.cpp94
-rw-r--r--JavaScriptCore/runtime/Structure.cpp124
-rw-r--r--JavaScriptCore/runtime/Structure.h41
-rw-r--r--JavaScriptCore/runtime/StructureTransitionTable.h53
-rw-r--r--JavaScriptCore/runtime/TimeoutChecker.cpp17
-rw-r--r--JavaScriptCore/runtime/Tracing.d2
-rw-r--r--JavaScriptCore/runtime/Tracing.h2
-rw-r--r--JavaScriptCore/runtime/UString.cpp927
-rw-r--r--JavaScriptCore/runtime/UString.h565
-rw-r--r--JavaScriptCore/runtime/UStringImpl.cpp82
-rw-r--r--JavaScriptCore/runtime/UStringImpl.h303
-rw-r--r--JavaScriptCore/runtime/WeakGCMap.h122
-rw-r--r--JavaScriptCore/runtime/WeakGCPtr.h128
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-1.js6
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.12-1.js7
-rw-r--r--JavaScriptCore/tests/mozilla/ecma_2/RegExp/properties-001.js9
-rw-r--r--JavaScriptCore/tests/mozilla/js1_2/regexp/toString.js2
-rw-r--r--JavaScriptCore/wrec/WREC.h2
-rw-r--r--JavaScriptCore/wrec/WRECGenerator.cpp6
-rw-r--r--JavaScriptCore/wrec/WRECGenerator.h4
-rw-r--r--JavaScriptCore/wscript5
-rw-r--r--JavaScriptCore/wtf/AlwaysInline.h2
-rw-r--r--JavaScriptCore/wtf/Assertions.cpp10
-rw-r--r--JavaScriptCore/wtf/Assertions.h102
-rw-r--r--JavaScriptCore/wtf/CurrentTime.cpp8
-rw-r--r--JavaScriptCore/wtf/CurrentTime.h2
-rw-r--r--JavaScriptCore/wtf/DateMath.cpp31
-rw-r--r--JavaScriptCore/wtf/DateMath.h17
-rw-r--r--JavaScriptCore/wtf/FastMalloc.cpp140
-rw-r--r--JavaScriptCore/wtf/FastMalloc.h6
-rw-r--r--JavaScriptCore/wtf/HashFunctions.h3
-rw-r--r--JavaScriptCore/wtf/HashMap.h11
-rw-r--r--JavaScriptCore/wtf/HashSet.h2
-rw-r--r--JavaScriptCore/wtf/HashTable.h38
-rw-r--r--JavaScriptCore/wtf/HashTraits.h21
-rw-r--r--JavaScriptCore/wtf/MathExtras.h37
-rw-r--r--JavaScriptCore/wtf/Platform.h758
-rw-r--r--JavaScriptCore/wtf/RandomNumber.cpp30
-rw-r--r--JavaScriptCore/wtf/RandomNumberSeed.h10
-rw-r--r--JavaScriptCore/wtf/RefPtrHashMap.h2
-rw-r--r--JavaScriptCore/wtf/StdLibExtras.h8
-rw-r--r--JavaScriptCore/wtf/StringExtras.cpp62
-rw-r--r--JavaScriptCore/wtf/StringExtras.h15
-rw-r--r--JavaScriptCore/wtf/StringHashFunctions.h157
-rw-r--r--JavaScriptCore/wtf/TCSpinLock.h14
-rw-r--r--JavaScriptCore/wtf/TCSystemAlloc.cpp2
-rw-r--r--JavaScriptCore/wtf/ThreadIdentifierDataPthreads.cpp97
-rw-r--r--JavaScriptCore/wtf/ThreadIdentifierDataPthreads.h77
-rw-r--r--JavaScriptCore/wtf/ThreadSpecific.h57
-rw-r--r--JavaScriptCore/wtf/Threading.cpp7
-rw-r--r--JavaScriptCore/wtf/Threading.h22
-rw-r--r--JavaScriptCore/wtf/ThreadingNone.cpp6
-rw-r--r--JavaScriptCore/wtf/ThreadingPthreads.cpp44
-rw-r--r--JavaScriptCore/wtf/ThreadingWin.cpp14
-rw-r--r--JavaScriptCore/wtf/TypeTraits.cpp16
-rw-r--r--JavaScriptCore/wtf/TypeTraits.h36
-rw-r--r--JavaScriptCore/wtf/VMTags.h6
-rw-r--r--JavaScriptCore/wtf/chromium/ChromiumThreading.h12
-rw-r--r--JavaScriptCore/wtf/dtoa.cpp9
-rw-r--r--JavaScriptCore/wtf/gtk/GOwnPtr.cpp7
-rw-r--r--JavaScriptCore/wtf/gtk/GRefPtr.cpp38
-rw-r--r--JavaScriptCore/wtf/gtk/GRefPtr.h187
-rw-r--r--JavaScriptCore/wtf/gtk/ThreadingGtk.cpp2
-rw-r--r--JavaScriptCore/wtf/mac/MainThreadMac.mm11
-rw-r--r--JavaScriptCore/wtf/qt/ThreadingQt.cpp30
-rw-r--r--JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp6
-rw-r--r--JavaScriptCore/wtf/win/MainThreadWin.cpp10
-rw-r--r--JavaScriptCore/wtf/wince/MemoryManager.cpp8
-rw-r--r--JavaScriptCore/yarr/RegexCompiler.cpp2
-rw-r--r--JavaScriptCore/yarr/RegexJIT.cpp18
-rw-r--r--JavaScriptCore/yarr/RegexJIT.h2
-rw-r--r--JavaScriptGlue/ChangeLog108
-rw-r--r--JavaScriptGlue/Configurations/Version.xcconfig2
-rw-r--r--JavaScriptGlue/ForwardingHeaders/wtf/PossiblyNull.h1
-rw-r--r--JavaScriptGlue/ForwardingHeaders/wtf/StringHashFunctions.h1
-rw-r--r--JavaScriptGlue/Info.plist38
-rw-r--r--JavaScriptGlue/JSBase.cpp2
-rw-r--r--JavaScriptGlue/JSUtils.cpp29
-rw-r--r--JavaScriptGlue/JSUtils.h19
-rw-r--r--JavaScriptGlue/JSValueWrapper.cpp10
-rw-r--r--JavaScriptGlue/JavaScriptGlue.cpp12
-rw-r--r--JavaScriptGlue/JavaScriptGlue.xcodeproj/project.pbxproj5
-rw-r--r--JavaScriptGlue/UserObjectImp.cpp6
-rw-r--r--JavaScriptGlue/UserObjectImp.h4
-rw-r--r--JavaScriptGlue/config.h1
-rw-r--r--SunSpider/ChangeLog206
-rw-r--r--SunSpider/hosted/json2.js481
-rw-r--r--SunSpider/hosted/sunspider.html13
-rw-r--r--SunSpider/hosted/versions.html54
-rwxr-xr-xSunSpider/make-hosted91
-rw-r--r--SunSpider/resources/TEMPLATE.html12
-rw-r--r--SunSpider/resources/driver-TEMPLATE.html (renamed from SunSpider/hosted/sunspider-driver.html)43
-rw-r--r--SunSpider/resources/results-TEMPLATE.html (renamed from SunSpider/hosted/sunspider-results.html)41
-rw-r--r--SunSpider/resources/sunspider-standalone-driver.js2
-rwxr-xr-xSunSpider/sunspider34
-rwxr-xr-xSunSpider/sunspider-compare-results21
-rw-r--r--SunSpider/tests/LIST-PARSE-ONLY4
-rw-r--r--SunSpider/tests/LIST-UBENCH9
-rw-r--r--SunSpider/tests/parse-only/LIST4
-rw-r--r--SunSpider/tests/sunspider-0.9.1/3d-cube.js (renamed from SunSpider/tests/3d-cube.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/3d-morph.js (renamed from SunSpider/tests/3d-morph.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/3d-raytrace.js (renamed from SunSpider/tests/3d-raytrace.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/LIST (renamed from SunSpider/tests/LIST)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/access-binary-trees.js (renamed from SunSpider/tests/access-binary-trees.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/access-fannkuch.js (renamed from SunSpider/tests/access-fannkuch.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/access-nbody.js (renamed from SunSpider/tests/access-nbody.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/access-nsieve.js (renamed from SunSpider/tests/access-nsieve.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/bitops-3bit-bits-in-byte.js (renamed from SunSpider/tests/bitops-3bit-bits-in-byte.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/bitops-bits-in-byte.js (renamed from SunSpider/tests/bitops-bits-in-byte.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/bitops-bitwise-and.js (renamed from SunSpider/tests/bitops-bitwise-and.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/bitops-nsieve-bits.js (renamed from SunSpider/tests/bitops-nsieve-bits.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/controlflow-recursive.js (renamed from SunSpider/tests/controlflow-recursive.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/crypto-aes.js (renamed from SunSpider/tests/crypto-aes.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/crypto-md5.js (renamed from SunSpider/tests/crypto-md5.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/crypto-sha1.js (renamed from SunSpider/tests/crypto-sha1.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/date-format-tofte.js (renamed from SunSpider/tests/date-format-tofte.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/date-format-xparb.js (renamed from SunSpider/tests/date-format-xparb.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/math-cordic.js (renamed from SunSpider/tests/math-cordic.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/math-partial-sums.js (renamed from SunSpider/tests/math-partial-sums.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/math-spectral-norm.js (renamed from SunSpider/tests/math-spectral-norm.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/regexp-dna.js (renamed from SunSpider/tests/regexp-dna.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/string-base64.js135
-rw-r--r--SunSpider/tests/sunspider-0.9.1/string-fasta.js (renamed from SunSpider/tests/string-fasta.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/string-tagcloud.js (renamed from SunSpider/tests/string-tagcloud.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/string-unpack-code.js (renamed from SunSpider/tests/string-unpack-code.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9.1/string-validate-input.js (renamed from SunSpider/tests/string-validate-input.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9/3d-cube.js337
-rw-r--r--SunSpider/tests/sunspider-0.9/3d-morph.js54
-rw-r--r--SunSpider/tests/sunspider-0.9/3d-raytrace.js441
-rw-r--r--SunSpider/tests/sunspider-0.9/LIST26
-rw-r--r--SunSpider/tests/sunspider-0.9/access-binary-trees.js50
-rw-r--r--SunSpider/tests/sunspider-0.9/access-fannkuch.js66
-rw-r--r--SunSpider/tests/sunspider-0.9/access-nbody.js169
-rw-r--r--SunSpider/tests/sunspider-0.9/access-nsieve.js38
-rw-r--r--SunSpider/tests/sunspider-0.9/bitops-3bit-bits-in-byte.js32
-rw-r--r--SunSpider/tests/sunspider-0.9/bitops-bits-in-byte.js21
-rw-r--r--SunSpider/tests/sunspider-0.9/bitops-bitwise-and.js (renamed from SunSpider/hosted/sunspider-record-result.js)9
-rw-r--r--SunSpider/tests/sunspider-0.9/bitops-nsieve-bits.js32
-rw-r--r--SunSpider/tests/sunspider-0.9/controlflow-recursive.js25
-rw-r--r--SunSpider/tests/sunspider-0.9/crypto-aes.js422
-rw-r--r--SunSpider/tests/sunspider-0.9/crypto-md5.js286
-rw-r--r--SunSpider/tests/sunspider-0.9/crypto-sha1.js224
-rw-r--r--SunSpider/tests/sunspider-0.9/date-format-tofte.js299
-rw-r--r--SunSpider/tests/sunspider-0.9/date-format-xparb.js417
-rw-r--r--SunSpider/tests/sunspider-0.9/math-cordic.js95
-rw-r--r--SunSpider/tests/sunspider-0.9/math-partial-sums.js33
-rw-r--r--SunSpider/tests/sunspider-0.9/math-spectral-norm.js51
-rw-r--r--SunSpider/tests/sunspider-0.9/regexp-dna.js1712
-rw-r--r--SunSpider/tests/sunspider-0.9/string-base64.js (renamed from SunSpider/tests/string-base64.js)0
-rw-r--r--SunSpider/tests/sunspider-0.9/string-fasta.js85
-rw-r--r--SunSpider/tests/sunspider-0.9/string-tagcloud.js265
-rw-r--r--SunSpider/tests/sunspider-0.9/string-unpack-code.js68
-rw-r--r--SunSpider/tests/sunspider-0.9/string-validate-input.js89
-rw-r--r--SunSpider/tests/ubench/LIST9
-rw-r--r--SunSpider/tests/v8-v4/LIST (renamed from SunSpider/tests/LIST-V8)0
-rw-r--r--SunSpider/tests/v8-v4/v8-crypto.js (renamed from SunSpider/tests/v8-crypto.js)0
-rw-r--r--SunSpider/tests/v8-v4/v8-deltablue.js (renamed from SunSpider/tests/v8-deltablue.js)0
-rw-r--r--SunSpider/tests/v8-v4/v8-earley-boyer.js (renamed from SunSpider/tests/v8-earley-boyer.js)0
-rw-r--r--SunSpider/tests/v8-v4/v8-raytrace.js (renamed from SunSpider/tests/v8-raytrace.js)0
-rw-r--r--SunSpider/tests/v8-v4/v8-regexp.js (renamed from SunSpider/tests/v8-regexp.js)0
-rw-r--r--SunSpider/tests/v8-v4/v8-richards.js (renamed from SunSpider/tests/v8-richards.js)0
-rw-r--r--SunSpider/tests/v8-v4/v8-splay.js (renamed from SunSpider/tests/v8-splay.js)0
-rw-r--r--WebCore/Android.derived.jscbindings.mk1
-rw-r--r--WebCore/Android.derived.mk8
-rw-r--r--WebCore/Android.derived.v8bindings.mk1
-rw-r--r--WebCore/Android.jscbindings.mk3
-rw-r--r--WebCore/Android.mk7
-rw-r--r--WebCore/Android.v8bindings.mk12
-rw-r--r--WebCore/ChangeLog75535
-rw-r--r--WebCore/ChangeLog-2010-01-2998486
-rw-r--r--WebCore/Configurations/FeatureDefines.xcconfig12
-rw-r--r--WebCore/Configurations/Version.xcconfig2
-rw-r--r--WebCore/Configurations/WebCore.xcconfig4
-rw-r--r--WebCore/DerivedSources.cpp5
-rw-r--r--WebCore/DerivedSources.make15
-rw-r--r--WebCore/DerivedSources.pro31
-rw-r--r--WebCore/English.lproj/localizedStrings.jsbin28750 -> 32762 bytes
-rw-r--r--WebCore/ForwardingHeaders/runtime/StringBuilder.h4
-rw-r--r--WebCore/ForwardingHeaders/runtime/UStringImpl.h4
-rw-r--r--WebCore/ForwardingHeaders/runtime/WeakGCMap.h4
-rw-r--r--WebCore/ForwardingHeaders/wtf/StringHashFunctions.h4
-rw-r--r--WebCore/GNUmakefile.am214
-rw-r--r--WebCore/Info.plist4
-rw-r--r--WebCore/WebCore.ClientBasedGeolocation.exp2
-rw-r--r--WebCore/WebCore.PluginHostProcess.exp2
-rw-r--r--WebCore/WebCore.base.exp25
-rw-r--r--WebCore/WebCore.gyp/WebCore.gyp30
-rw-r--r--WebCore/WebCore.gypi133
-rw-r--r--WebCore/WebCore.pri692
-rw-r--r--WebCore/WebCore.pro948
-rw-r--r--WebCore/WebCore.vcproj/MigrateIDLAndScripts1
-rw-r--r--WebCore/WebCore.vcproj/QTMovieWin.rc2
-rw-r--r--WebCore/WebCore.vcproj/QTMovieWin.vcproj16
-rw-r--r--WebCore/WebCore.vcproj/WebCore.vcproj956
-rw-r--r--WebCore/WebCore.vcproj/WebCoreCommon.vsprops4
-rw-r--r--WebCore/WebCore.vcproj/WebCoreGenerated.vcproj24
-rw-r--r--WebCore/WebCore.vcproj/WebCoreMediaQT.vsprops1
-rw-r--r--WebCore/WebCore.vcproj/WebCoreQuartzCore.vsprops12
-rw-r--r--WebCore/WebCore.vcproj/build-generated-files.sh2
-rw-r--r--WebCore/WebCore.xcodeproj/project.pbxproj823
-rw-r--r--WebCore/WebCorePrefix.cpp2
-rw-r--r--WebCore/WebCoreSources.bkl3
-rw-r--r--WebCore/accessibility/AXObjectCache.cpp107
-rw-r--r--WebCore/accessibility/AXObjectCache.h20
-rw-r--r--WebCore/accessibility/AccessibilityARIAGrid.h3
-rw-r--r--WebCore/accessibility/AccessibilityARIAGridRow.cpp66
-rw-r--r--WebCore/accessibility/AccessibilityARIAGridRow.h6
-rwxr-xr-xWebCore/accessibility/AccessibilityAllInOne.cpp1
-rw-r--r--WebCore/accessibility/AccessibilityImageMapLink.h8
-rw-r--r--WebCore/accessibility/AccessibilityListBox.cpp4
-rw-r--r--WebCore/accessibility/AccessibilityMenuList.cpp86
-rw-r--r--WebCore/accessibility/AccessibilityMenuList.h (renamed from WebCore/bindings/js/JSInspectorCallbackWrapper.h)42
-rw-r--r--WebCore/accessibility/AccessibilityMenuListOption.cpp113
-rw-r--r--WebCore/accessibility/AccessibilityMenuListOption.h69
-rw-r--r--WebCore/accessibility/AccessibilityMenuListPopup.cpp126
-rw-r--r--WebCore/accessibility/AccessibilityMenuListPopup.h68
-rw-r--r--WebCore/accessibility/AccessibilityObject.cpp27
-rw-r--r--WebCore/accessibility/AccessibilityObject.h33
-rw-r--r--WebCore/accessibility/AccessibilityRenderObject.cpp292
-rw-r--r--WebCore/accessibility/AccessibilityRenderObject.h20
-rw-r--r--WebCore/accessibility/AccessibilityScrollbar.cpp53
-rw-r--r--WebCore/accessibility/AccessibilityScrollbar.h64
-rw-r--r--WebCore/accessibility/AccessibilityTable.h1
-rw-r--r--WebCore/accessibility/chromium/AccessibilityObjectChromium.cpp3
-rw-r--r--WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp7
-rw-r--r--WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp198
-rw-r--r--WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.h2
-rw-r--r--WebCore/accessibility/mac/AXObjectCacheMac.mm15
-rw-r--r--WebCore/accessibility/mac/AccessibilityObjectMac.mm21
-rw-r--r--WebCore/accessibility/mac/AccessibilityObjectWrapper.h3
-rw-r--r--WebCore/accessibility/mac/AccessibilityObjectWrapper.mm146
-rw-r--r--WebCore/accessibility/qt/AccessibilityObjectQt.cpp3
-rw-r--r--WebCore/accessibility/win/AXObjectCacheWin.cpp8
-rw-r--r--WebCore/accessibility/win/AccessibilityObjectWin.cpp3
-rw-r--r--WebCore/accessibility/wx/AccessibilityObjectWx.cpp3
-rw-r--r--WebCore/bindings/ScriptControllerBase.cpp12
-rw-r--r--WebCore/bindings/generic/BindingDOMWindow.h123
-rw-r--r--WebCore/bindings/generic/BindingSecurity.h132
-rw-r--r--WebCore/bindings/generic/BindingSecurityBase.cpp108
-rw-r--r--WebCore/bindings/generic/BindingSecurityBase.h52
-rw-r--r--WebCore/bindings/generic/GenericBinding.h52
-rw-r--r--WebCore/bindings/js/DOMObjectWithSVGContext.h57
-rw-r--r--WebCore/bindings/js/GCController.cpp12
-rw-r--r--WebCore/bindings/js/JSBindingsAllInOne.cpp3
-rw-r--r--WebCore/bindings/js/JSDOMBinding.cpp223
-rw-r--r--WebCore/bindings/js/JSDOMBinding.h95
-rw-r--r--WebCore/bindings/js/JSDOMGlobalObject.cpp21
-rw-r--r--WebCore/bindings/js/JSDOMGlobalObject.h12
-rw-r--r--WebCore/bindings/js/JSDOMWindowBase.cpp7
-rw-r--r--WebCore/bindings/js/JSDOMWindowBase.h2
-rw-r--r--WebCore/bindings/js/JSDOMWindowCustom.cpp50
-rw-r--r--WebCore/bindings/js/JSDOMWindowShell.cpp8
-rw-r--r--WebCore/bindings/js/JSDOMWindowShell.h6
-rw-r--r--WebCore/bindings/js/JSDocumentCustom.cpp8
-rw-r--r--WebCore/bindings/js/JSEventListener.cpp2
-rw-r--r--WebCore/bindings/js/JSEventListener.h10
-rw-r--r--WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp34
-rw-r--r--WebCore/bindings/js/JSHTMLFormElementCustom.cpp2
-rw-r--r--WebCore/bindings/js/JSHistoryCustom.cpp4
-rw-r--r--WebCore/bindings/js/JSInjectedScriptHostCustom.cpp120
-rw-r--r--WebCore/bindings/js/JSInspectedObjectWrapper.cpp132
-rw-r--r--WebCore/bindings/js/JSInspectedObjectWrapper.h59
-rw-r--r--WebCore/bindings/js/JSInspectorCallbackWrapper.cpp112
-rw-r--r--WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp50
-rw-r--r--WebCore/bindings/js/JSJavaScriptCallFrameCustom.cpp4
-rw-r--r--WebCore/bindings/js/JSLazyEventListener.cpp4
-rw-r--r--WebCore/bindings/js/JSLocationCustom.cpp10
-rw-r--r--WebCore/bindings/js/JSNodeCustom.cpp4
-rw-r--r--WebCore/bindings/js/JSPopStateEventCustom.cpp9
-rw-r--r--WebCore/bindings/js/JSQuarantinedObjectWrapper.cpp332
-rw-r--r--WebCore/bindings/js/JSQuarantinedObjectWrapper.h106
-rw-r--r--WebCore/bindings/js/JSSVGContextCache.h97
-rw-r--r--WebCore/bindings/js/JSSVGLengthCustom.cpp16
-rw-r--r--WebCore/bindings/js/JSSVGMatrixCustom.cpp12
-rw-r--r--WebCore/bindings/js/JSSVGPODListCustom.h199
-rw-r--r--WebCore/bindings/js/JSSVGPODTypeWrapper.h102
-rw-r--r--WebCore/bindings/js/JSSVGPathSegCustom.cpp11
-rw-r--r--WebCore/bindings/js/JSSVGPathSegListCustom.cpp53
-rw-r--r--WebCore/bindings/js/JSSVGPointListCustom.cpp153
-rw-r--r--WebCore/bindings/js/JSSVGTransformListCustom.cpp153
-rw-r--r--WebCore/bindings/js/JSStorageCustom.cpp4
-rw-r--r--WebCore/bindings/js/JSWebGLArrayHelper.h16
-rw-r--r--WebCore/bindings/js/JSWebGLFloatArrayCustom.cpp6
-rw-r--r--WebCore/bindings/js/JSWebGLIntArrayCustom.cpp2
-rw-r--r--WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp429
-rw-r--r--WebCore/bindings/js/JSWebGLShortArrayCustom.cpp2
-rw-r--r--WebCore/bindings/js/JSWebGLUnsignedByteArrayCustom.cpp2
-rw-r--r--WebCore/bindings/js/JSWebGLUnsignedIntArrayCustom.cpp4
-rw-r--r--WebCore/bindings/js/JSWebGLUnsignedShortArrayCustom.cpp2
-rw-r--r--WebCore/bindings/js/JSWebSocketConstructor.h8
-rw-r--r--WebCore/bindings/js/JSWorkerContextBase.cpp2
-rw-r--r--WebCore/bindings/js/JSWorkerContextCustom.cpp13
-rw-r--r--WebCore/bindings/js/JSXMLHttpRequestCustom.cpp8
-rw-r--r--WebCore/bindings/js/ScheduledAction.cpp2
-rw-r--r--WebCore/bindings/js/ScheduledAction.h2
-rw-r--r--WebCore/bindings/js/ScriptCachedFrameData.cpp7
-rw-r--r--WebCore/bindings/js/ScriptCachedFrameData.h2
-rw-r--r--WebCore/bindings/js/ScriptCallStack.h1
-rw-r--r--WebCore/bindings/js/ScriptController.cpp37
-rw-r--r--WebCore/bindings/js/ScriptController.h6
-rw-r--r--WebCore/bindings/js/ScriptControllerMac.mm2
-rw-r--r--WebCore/bindings/js/ScriptEventListener.cpp11
-rw-r--r--WebCore/bindings/js/ScriptFunctionCall.cpp2
-rw-r--r--WebCore/bindings/js/ScriptObject.h1
-rw-r--r--WebCore/bindings/js/ScriptState.cpp8
-rw-r--r--WebCore/bindings/js/ScriptState.h3
-rw-r--r--WebCore/bindings/js/ScriptString.h6
-rw-r--r--WebCore/bindings/js/ScriptValue.cpp10
-rw-r--r--WebCore/bindings/js/ScriptValue.h2
-rw-r--r--WebCore/bindings/js/ScriptWrappable.h (renamed from WebCore/bindings/v8/custom/V8XMLSerializerConstructor.cpp)24
-rw-r--r--WebCore/bindings/js/SerializedScriptValue.cpp87
-rw-r--r--WebCore/bindings/js/SerializedScriptValue.h22
-rw-r--r--WebCore/bindings/js/WorkerScriptController.cpp3
-rw-r--r--WebCore/bindings/objc/DOMHTML.h1
-rw-r--r--WebCore/bindings/objc/DOMInternal.h10
-rw-r--r--WebCore/bindings/objc/PublicDOMInterfaces.h9
-rw-r--r--WebCore/bindings/scripts/CodeGenerator.pm5
-rw-r--r--WebCore/bindings/scripts/CodeGeneratorCOM.pm1319
-rw-r--r--WebCore/bindings/scripts/CodeGeneratorJS.pm254
-rw-r--r--WebCore/bindings/scripts/CodeGeneratorObjC.pm10
-rw-r--r--WebCore/bindings/scripts/CodeGeneratorV8.pm760
-rw-r--r--WebCore/bindings/scripts/IDLParser.pm5
-rwxr-xr-xWebCore/bindings/scripts/generate-bindings.pl1
-rw-r--r--WebCore/bindings/v8/DOMData.cpp1
-rw-r--r--WebCore/bindings/v8/DOMData.h40
-rw-r--r--WebCore/bindings/v8/DOMDataStore.cpp36
-rw-r--r--WebCore/bindings/v8/DOMDataStore.h169
-rw-r--r--WebCore/bindings/v8/DOMObjectsInclude.h13
-rw-r--r--WebCore/bindings/v8/DOMWrapperWorld.cpp (renamed from WebCore/bindings/v8/custom/V8XPathEvaluatorConstructor.cpp)20
-rw-r--r--WebCore/bindings/v8/DOMWrapperWorld.h (renamed from WebCore/bindings/v8/custom/V8ClientRectListCustom.cpp)34
-rw-r--r--WebCore/bindings/v8/DateExtension.cpp2
-rw-r--r--WebCore/bindings/v8/DerivedSourcesAllInOne.cpp14
-rw-r--r--WebCore/bindings/v8/IsolatedWorld.cpp (renamed from WebCore/bindings/v8/custom/V8DOMParserConstructor.cpp)19
-rw-r--r--WebCore/bindings/v8/IsolatedWorld.h62
-rw-r--r--WebCore/bindings/v8/MainThreadDOMData.cpp8
-rw-r--r--WebCore/bindings/v8/NPV8Object.cpp13
-rw-r--r--WebCore/bindings/v8/NPV8Object.h8
-rw-r--r--WebCore/bindings/v8/RuntimeEnabledFeatures.cpp9
-rw-r--r--WebCore/bindings/v8/RuntimeEnabledFeatures.h12
-rw-r--r--WebCore/bindings/v8/ScriptCallStack.cpp4
-rw-r--r--WebCore/bindings/v8/ScriptCallStack.h6
-rw-r--r--WebCore/bindings/v8/ScriptController.cpp44
-rw-r--r--WebCore/bindings/v8/ScriptController.h223
-rw-r--r--WebCore/bindings/v8/ScriptEventListener.cpp12
-rw-r--r--WebCore/bindings/v8/ScriptObject.h1
-rw-r--r--WebCore/bindings/v8/ScriptScope.cpp11
-rw-r--r--WebCore/bindings/v8/ScriptScope.h1
-rw-r--r--WebCore/bindings/v8/ScriptState.cpp67
-rw-r--r--WebCore/bindings/v8/ScriptState.h33
-rw-r--r--WebCore/bindings/v8/ScriptValue.h5
-rw-r--r--WebCore/bindings/v8/ScriptWrappable.h61
-rw-r--r--WebCore/bindings/v8/SerializedScriptValue.cpp699
-rw-r--r--WebCore/bindings/v8/SerializedScriptValue.h45
-rw-r--r--WebCore/bindings/v8/StaticDOMDataStore.cpp2
-rw-r--r--WebCore/bindings/v8/StaticDOMDataStore.h2
-rw-r--r--WebCore/bindings/v8/V8Binding.cpp69
-rw-r--r--WebCore/bindings/v8/V8Binding.h94
-rw-r--r--WebCore/bindings/v8/V8Collection.cpp2
-rw-r--r--WebCore/bindings/v8/V8Collection.h69
-rw-r--r--WebCore/bindings/v8/V8DOMMap.cpp22
-rw-r--r--WebCore/bindings/v8/V8DOMMap.h58
-rw-r--r--WebCore/bindings/v8/V8DOMWindowShell.cpp559
-rw-r--r--WebCore/bindings/v8/V8DOMWindowShell.h122
-rw-r--r--WebCore/bindings/v8/V8DOMWrapper.cpp219
-rw-r--r--WebCore/bindings/v8/V8DOMWrapper.h70
-rw-r--r--WebCore/bindings/v8/V8HiddenPropertyName.h1
-rw-r--r--WebCore/bindings/v8/V8Index.cpp16
-rw-r--r--WebCore/bindings/v8/V8Index.h39
-rw-r--r--WebCore/bindings/v8/V8IsolatedContext.cpp (renamed from WebCore/bindings/v8/V8IsolatedWorld.cpp)34
-rw-r--r--WebCore/bindings/v8/V8IsolatedContext.h116
-rw-r--r--WebCore/bindings/v8/V8IsolatedWorld.h122
-rw-r--r--WebCore/bindings/v8/V8LazyEventListener.cpp6
-rw-r--r--WebCore/bindings/v8/V8NPObject.cpp22
-rw-r--r--WebCore/bindings/v8/V8Proxy.cpp279
-rw-r--r--WebCore/bindings/v8/V8Proxy.h104
-rw-r--r--WebCore/bindings/v8/V8SVGPODTypeWrapper.h21
-rw-r--r--WebCore/bindings/v8/V8Utilities.cpp18
-rw-r--r--WebCore/bindings/v8/WorkerContextExecutionProxy.cpp16
-rw-r--r--WebCore/bindings/v8/WorldContextHandle.cpp6
-rw-r--r--WebCore/bindings/v8/custom/V8AbstractWorkerCustom.cpp14
-rw-r--r--WebCore/bindings/v8/custom/V8AttrCustom.cpp11
-rw-r--r--WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp14
-rw-r--r--WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp105
-rw-r--r--WebCore/bindings/v8/custom/V8ClipboardCustom.cpp25
-rw-r--r--WebCore/bindings/v8/custom/V8ConsoleCustom.cpp5
-rw-r--r--WebCore/bindings/v8/custom/V8CoordinatesCustom.cpp19
-rw-r--r--WebCore/bindings/v8/custom/V8CustomBinding.cpp182
-rw-r--r--WebCore/bindings/v8/custom/V8CustomBinding.h314
-rw-r--r--WebCore/bindings/v8/custom/V8DOMApplicationCacheCustom.cpp15
-rw-r--r--WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp297
-rw-r--r--WebCore/bindings/v8/custom/V8DataGridColumnListCustom.cpp12
-rw-r--r--WebCore/bindings/v8/custom/V8DatabaseCustom.cpp11
-rw-r--r--WebCore/bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp10
-rw-r--r--WebCore/bindings/v8/custom/V8DocumentCustom.cpp46
-rw-r--r--WebCore/bindings/v8/custom/V8DocumentLocationCustom.cpp15
-rw-r--r--WebCore/bindings/v8/custom/V8ElementCustom.cpp32
-rw-r--r--WebCore/bindings/v8/custom/V8EventCustom.cpp28
-rw-r--r--WebCore/bindings/v8/custom/V8EventSourceConstructor.cpp (renamed from WebCore/bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp)64
-rw-r--r--WebCore/bindings/v8/custom/V8EventSourceCustom.cpp74
-rw-r--r--WebCore/bindings/v8/custom/V8GeolocationCustom.cpp10
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp18
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLAudioElementConstructor.cpp6
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp38
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp19
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp53
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLFormElementCustom.cpp23
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLFrameElementCustom.cpp16
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp7
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLIFrameElementCustom.cpp10
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp6
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLInputElementCustom.cpp22
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLOptionElementConstructor.cpp6
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp29
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp117
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLSelectElementCustom.cpp56
-rw-r--r--WebCore/bindings/v8/custom/V8HistoryCustom.cpp33
-rw-r--r--WebCore/bindings/v8/custom/V8IDBRequestCustom.cpp (renamed from WebCore/bindings/v8/custom/V8FileListCustom.cpp)23
-rw-r--r--WebCore/bindings/v8/custom/V8IndexedDatabaseRequestCustom.cpp57
-rw-r--r--WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp154
-rw-r--r--WebCore/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp50
-rw-r--r--WebCore/bindings/v8/custom/V8LocationCustom.cpp125
-rw-r--r--WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp14
-rw-r--r--WebCore/bindings/v8/custom/V8MessageEventCustom.cpp21
-rw-r--r--WebCore/bindings/v8/custom/V8MessagePortCustom.cpp20
-rw-r--r--WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp11
-rw-r--r--WebCore/bindings/v8/custom/V8NavigatorCustom.cpp23
-rw-r--r--WebCore/bindings/v8/custom/V8NodeCustom.cpp40
-rw-r--r--WebCore/bindings/v8/custom/V8NodeFilterCustom.cpp5
-rw-r--r--WebCore/bindings/v8/custom/V8NodeIteratorCustom.cpp15
-rw-r--r--WebCore/bindings/v8/custom/V8NodeListCustom.cpp24
-rw-r--r--WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp26
-rw-r--r--WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp67
-rw-r--r--WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp5
-rw-r--r--WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp6
-rw-r--r--WebCore/bindings/v8/custom/V8SVGElementInstanceCustom.cpp16
-rw-r--r--WebCore/bindings/v8/custom/V8SVGLengthCustom.cpp10
-rw-r--r--WebCore/bindings/v8/custom/V8SVGMatrixCustom.cpp14
-rw-r--r--WebCore/bindings/v8/custom/V8SharedWorkerCustom.cpp4
-rwxr-xr-xWebCore/bindings/v8/custom/V8StorageCustom.cpp23
-rw-r--r--WebCore/bindings/v8/custom/V8StyleSheetListCustom.cpp7
-rw-r--r--WebCore/bindings/v8/custom/V8TreeWalkerCustom.cpp45
-rw-r--r--WebCore/bindings/v8/custom/V8WebGLArrayBufferCustom.cpp2
-rw-r--r--WebCore/bindings/v8/custom/V8WebGLArrayCustom.h20
-rw-r--r--WebCore/bindings/v8/custom/V8WebGLByteArrayCustom.cpp34
-rw-r--r--WebCore/bindings/v8/custom/V8WebGLFloatArrayCustom.cpp31
-rw-r--r--WebCore/bindings/v8/custom/V8WebGLIntArrayCustom.cpp34
-rw-r--r--WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp294
-rw-r--r--WebCore/bindings/v8/custom/V8WebGLShortArrayCustom.cpp34
-rw-r--r--WebCore/bindings/v8/custom/V8WebGLUnsignedByteArrayCustom.cpp34
-rw-r--r--WebCore/bindings/v8/custom/V8WebGLUnsignedIntArrayCustom.cpp34
-rw-r--r--WebCore/bindings/v8/custom/V8WebGLUnsignedShortArrayCustom.cpp34
-rw-r--r--WebCore/bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp4
-rwxr-xr-xWebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp4
-rw-r--r--WebCore/bindings/v8/custom/V8WebSocketCustom.cpp41
-rwxr-xr-xWebCore/bindings/v8/custom/V8WorkerContextCustom.cpp34
-rwxr-xr-xWebCore/bindings/v8/custom/V8WorkerCustom.cpp9
-rw-r--r--WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp4
-rw-r--r--WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp54
-rw-r--r--WebCore/bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp17
-rw-r--r--WebCore/bindings/v8/custom/V8XSLTProcessorCustom.cpp37
-rw-r--r--WebCore/bindings/v8/specialization/V8BindingDOMWindow.h59
-rw-r--r--WebCore/bindings/v8/specialization/V8BindingState.cpp61
-rw-r--r--WebCore/bindings/v8/specialization/V8BindingState.h62
-rw-r--r--WebCore/bridge/Bridge.h3
-rw-r--r--WebCore/bridge/NP_jsobject.cpp2
-rw-r--r--WebCore/bridge/jni/JNIBridge.cpp39
-rw-r--r--WebCore/bridge/jni/JNIBridge.h6
-rw-r--r--WebCore/bridge/jni/JNIUtility.h4
-rw-r--r--WebCore/bridge/jni/jni_jsobject.mm45
-rw-r--r--WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp16
-rw-r--r--WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp16
-rw-r--r--WebCore/bridge/objc/objc_instance.mm4
-rw-r--r--WebCore/bridge/objc/objc_runtime.h2
-rw-r--r--WebCore/bridge/qt/qt_class.cpp2
-rw-r--r--WebCore/bridge/qt/qt_instance.cpp2
-rw-r--r--WebCore/bridge/qt/qt_pixmapruntime.cpp348
-rw-r--r--WebCore/bridge/qt/qt_pixmapruntime.h52
-rw-r--r--WebCore/bridge/qt/qt_runtime.cpp81
-rw-r--r--WebCore/bridge/qt/qt_runtime.h8
-rw-r--r--WebCore/bridge/runtime_array.cpp13
-rw-r--r--WebCore/bridge/runtime_array.h5
-rw-r--r--WebCore/bridge/runtime_method.h2
-rw-r--r--WebCore/bridge/runtime_object.cpp7
-rw-r--r--WebCore/bridge/runtime_object.h5
-rw-r--r--WebCore/config.h15
-rw-r--r--WebCore/css/CSSCharsetRule.idl6
-rw-r--r--WebCore/css/CSSComputedStyleDeclaration.cpp5
-rw-r--r--WebCore/css/CSSFontFace.cpp22
-rw-r--r--WebCore/css/CSSFontFace.h2
-rw-r--r--WebCore/css/CSSFontFaceRule.idl6
-rw-r--r--WebCore/css/CSSGrammar.y35
-rw-r--r--WebCore/css/CSSImportRule.cpp37
-rw-r--r--WebCore/css/CSSImportRule.h2
-rw-r--r--WebCore/css/CSSImportRule.idl6
-rw-r--r--WebCore/css/CSSMediaRule.idl6
-rw-r--r--WebCore/css/CSSMutableStyleDeclaration.cpp2
-rw-r--r--WebCore/css/CSSPageRule.idl6
-rw-r--r--WebCore/css/CSSParser.cpp17
-rw-r--r--WebCore/css/CSSParser.h2
-rw-r--r--WebCore/css/CSSPrimitiveValue.cpp105
-rw-r--r--WebCore/css/CSSPrimitiveValue.idl9
-rw-r--r--WebCore/css/CSSPrimitiveValueMappings.h236
-rw-r--r--WebCore/css/CSSRule.idl5
-rw-r--r--WebCore/css/CSSRuleList.idl5
-rw-r--r--WebCore/css/CSSSelector.cpp12
-rw-r--r--WebCore/css/CSSSelector.h4
-rw-r--r--WebCore/css/CSSStyleDeclaration.idl5
-rw-r--r--WebCore/css/CSSStyleRule.idl6
-rw-r--r--WebCore/css/CSSStyleSelector.cpp121
-rw-r--r--WebCore/css/CSSStyleSelector.h8
-rw-r--r--WebCore/css/CSSStyleSheet.cpp15
-rw-r--r--WebCore/css/CSSStyleSheet.h35
-rw-r--r--WebCore/css/CSSStyleSheet.idl6
-rw-r--r--WebCore/css/CSSUnknownRule.idl3
-rw-r--r--WebCore/css/CSSValue.idl5
-rw-r--r--WebCore/css/CSSValueKeywords.in36
-rw-r--r--WebCore/css/CSSValueList.idl5
-rw-r--r--WebCore/css/CSSVariablesDeclaration.idl1
-rw-r--r--WebCore/css/CSSVariablesRule.idl4
-rw-r--r--WebCore/css/Counter.idl6
-rw-r--r--WebCore/css/Media.cpp23
-rw-r--r--WebCore/css/Media.h12
-rw-r--r--WebCore/css/Media.idl4
-rw-r--r--WebCore/css/MediaList.idl5
-rw-r--r--WebCore/css/RGBColor.idl6
-rw-r--r--WebCore/css/Rect.idl6
-rw-r--r--WebCore/css/SVGCSSComputedStyleDeclaration.cpp2
-rw-r--r--WebCore/css/SVGCSSParser.cpp2
-rw-r--r--WebCore/css/SVGCSSPropertyNames.in2
-rw-r--r--WebCore/css/SVGCSSStyleSelector.cpp4
-rw-r--r--WebCore/css/StyleBase.cpp6
-rw-r--r--WebCore/css/StyleSheet.cpp15
-rw-r--r--WebCore/css/StyleSheet.h23
-rw-r--r--WebCore/css/StyleSheet.idl5
-rw-r--r--WebCore/css/StyleSheetList.idl5
-rw-r--r--WebCore/css/WebKitCSSKeyframeRule.idl6
-rw-r--r--WebCore/css/WebKitCSSKeyframesRule.idl5
-rw-r--r--WebCore/css/WebKitCSSMatrix.idl2
-rw-r--r--WebCore/css/WebKitCSSTransformValue.idl3
-rw-r--r--WebCore/css/html.css13
-rw-r--r--WebCore/css/mathml.css100
-rw-r--r--WebCore/css/mediaControlsGtk.css63
-rw-r--r--WebCore/css/view-source.css2
-rw-r--r--WebCore/dom/Attr.cpp16
-rw-r--r--WebCore/dom/Attr.h2
-rw-r--r--WebCore/dom/Attr.idl13
-rw-r--r--WebCore/dom/BeforeLoadEvent.idl4
-rw-r--r--WebCore/dom/CDATASection.idl6
-rw-r--r--WebCore/dom/CharacterData.idl6
-rw-r--r--WebCore/dom/CheckedRadioButtons.cpp4
-rw-r--r--WebCore/dom/ClientRect.idl4
-rw-r--r--WebCore/dom/ClientRectList.idl1
-rw-r--r--WebCore/dom/Clipboard.cpp41
-rw-r--r--WebCore/dom/Clipboard.h4
-rw-r--r--WebCore/dom/Clipboard.idl4
-rw-r--r--WebCore/dom/Comment.idl6
-rw-r--r--WebCore/dom/CompositionEvent.idl4
-rw-r--r--WebCore/dom/ContainerNode.cpp15
-rw-r--r--WebCore/dom/DOMCoreException.idl4
-rw-r--r--WebCore/dom/DOMImplementation.idl8
-rw-r--r--WebCore/dom/Document.cpp390
-rw-r--r--WebCore/dom/Document.h79
-rw-r--r--WebCore/dom/Document.idl19
-rw-r--r--WebCore/dom/DocumentFragment.idl6
-rw-r--r--WebCore/dom/DocumentType.idl5
-rw-r--r--WebCore/dom/Element.cpp156
-rw-r--r--WebCore/dom/Element.h49
-rw-r--r--WebCore/dom/Element.idl13
-rw-r--r--WebCore/dom/ElementRareData.h4
-rw-r--r--WebCore/dom/Entity.idl6
-rw-r--r--WebCore/dom/EntityReference.idl6
-rw-r--r--WebCore/dom/ErrorEvent.idl1
-rw-r--r--WebCore/dom/Event.idl8
-rw-r--r--WebCore/dom/EventException.idl1
-rw-r--r--WebCore/dom/EventListener.idl2
-rw-r--r--WebCore/dom/EventNames.h5
-rw-r--r--WebCore/dom/EventTarget.h1
-rw-r--r--WebCore/dom/EventTarget.idl2
-rw-r--r--WebCore/dom/InputElement.cpp1
-rw-r--r--WebCore/dom/InputElement.h5
-rw-r--r--WebCore/dom/KeyboardEvent.idl4
-rw-r--r--WebCore/dom/MappedAttributeEntry.h4
-rw-r--r--WebCore/dom/MessageChannel.idl2
-rw-r--r--WebCore/dom/MessageEvent.idl3
-rw-r--r--WebCore/dom/MessagePort.idl1
-rw-r--r--WebCore/dom/MessagePortChannel.h2
-rw-r--r--WebCore/dom/MouseEvent.idl4
-rw-r--r--WebCore/dom/MouseRelatedEvent.cpp2
-rw-r--r--WebCore/dom/MutationEvent.idl4
-rw-r--r--WebCore/dom/NamedAttrMap.cpp55
-rw-r--r--WebCore/dom/NamedAttrMap.h33
-rw-r--r--WebCore/dom/NamedNodeMap.idl5
-rw-r--r--WebCore/dom/Node.cpp243
-rw-r--r--WebCore/dom/Node.h23
-rw-r--r--WebCore/dom/Node.idl7
-rw-r--r--WebCore/dom/NodeFilter.idl2
-rw-r--r--WebCore/dom/NodeIterator.idl3
-rw-r--r--WebCore/dom/NodeList.idl5
-rw-r--r--WebCore/dom/Notation.idl6
-rw-r--r--WebCore/dom/OverflowEvent.idl4
-rw-r--r--WebCore/dom/PageTransitionEvent.idl4
-rw-r--r--WebCore/dom/PopStateEvent.idl6
-rw-r--r--WebCore/dom/Position.cpp27
-rw-r--r--WebCore/dom/Position.h2
-rw-r--r--WebCore/dom/ProcessingInstruction.cpp16
-rw-r--r--WebCore/dom/ProcessingInstruction.h4
-rw-r--r--WebCore/dom/ProcessingInstruction.idl9
-rw-r--r--WebCore/dom/ProgressEvent.idl4
-rw-r--r--WebCore/dom/QualifiedName.h2
-rw-r--r--WebCore/dom/Range.cpp18
-rw-r--r--WebCore/dom/Range.h5
-rw-r--r--WebCore/dom/Range.idl2
-rw-r--r--WebCore/dom/RangeException.idl4
-rw-r--r--WebCore/dom/ScriptElement.cpp2
-rw-r--r--WebCore/dom/ScriptExecutionContext.cpp68
-rw-r--r--WebCore/dom/ScriptExecutionContext.h28
-rw-r--r--WebCore/dom/SelectElement.cpp35
-rw-r--r--WebCore/dom/SelectElement.h2
-rw-r--r--WebCore/dom/SelectorNodeList.cpp1
-rw-r--r--WebCore/dom/StyleElement.cpp2
-rw-r--r--WebCore/dom/StyledElement.cpp4
-rw-r--r--WebCore/dom/Text.idl6
-rw-r--r--WebCore/dom/TextEvent.idl4
-rw-r--r--WebCore/dom/Touch.idl4
-rw-r--r--WebCore/dom/TouchEvent.cpp3
-rw-r--r--WebCore/dom/TouchEvent.h6
-rw-r--r--WebCore/dom/TouchEvent.idl4
-rw-r--r--WebCore/dom/TouchList.h6
-rw-r--r--WebCore/dom/TouchList.idl3
-rw-r--r--WebCore/dom/TransformSourceLibxslt.cpp4
-rw-r--r--WebCore/dom/TreeWalker.idl3
-rw-r--r--WebCore/dom/UIEvent.idl4
-rw-r--r--WebCore/dom/WebKitAnimationEvent.idl4
-rw-r--r--WebCore/dom/WebKitTransitionEvent.idl4
-rw-r--r--WebCore/dom/WheelEvent.idl4
-rw-r--r--WebCore/dom/XMLTokenizer.cpp4
-rw-r--r--WebCore/dom/XMLTokenizer.h10
-rw-r--r--WebCore/dom/XMLTokenizerLibxml2.cpp54
-rw-r--r--WebCore/dom/XMLTokenizerQt.cpp28
-rwxr-xr-xWebCore/dom/make_names.pl53
-rw-r--r--WebCore/editing/ApplyStyleCommand.cpp12
-rw-r--r--WebCore/editing/CompositeEditCommand.cpp12
-rw-r--r--WebCore/editing/DeleteButtonController.cpp8
-rw-r--r--WebCore/editing/DeleteSelectionCommand.cpp11
-rw-r--r--WebCore/editing/Editor.cpp9
-rw-r--r--WebCore/editing/EditorCommand.cpp5
-rw-r--r--WebCore/editing/IndentOutdentCommand.cpp7
-rw-r--r--WebCore/editing/ReplaceSelectionCommand.cpp11
-rw-r--r--WebCore/editing/SelectionController.cpp313
-rw-r--r--WebCore/editing/SelectionController.h82
-rw-r--r--WebCore/editing/TextIterator.cpp317
-rw-r--r--WebCore/editing/TypingCommand.cpp4
-rw-r--r--WebCore/editing/VisibleSelection.cpp2
-rw-r--r--WebCore/editing/VisibleSelection.h6
-rw-r--r--WebCore/editing/gtk/SelectionControllerGtk.cpp15
-rw-r--r--WebCore/editing/htmlediting.cpp12
-rw-r--r--WebCore/editing/htmlediting.h1
-rw-r--r--WebCore/editing/mac/SelectionControllerMac.mm6
-rw-r--r--WebCore/editing/markup.cpp31
-rw-r--r--WebCore/editing/markup.h5
-rw-r--r--WebCore/history/BackForwardList.cpp21
-rw-r--r--WebCore/history/BackForwardList.h2
-rw-r--r--WebCore/history/BackForwardListChromium.cpp7
-rw-r--r--WebCore/history/CachedFrame.cpp10
-rw-r--r--WebCore/history/CachedFrame.h16
-rw-r--r--WebCore/history/CachedPage.cpp1
-rw-r--r--WebCore/history/CachedPage.h11
-rw-r--r--WebCore/history/HistoryItem.cpp41
-rw-r--r--WebCore/history/HistoryItem.h8
-rw-r--r--WebCore/html/Blob.cpp53
-rw-r--r--WebCore/html/Blob.h62
-rw-r--r--WebCore/html/Blob.idl37
-rw-r--r--WebCore/html/CollectionCache.cpp8
-rw-r--r--WebCore/html/CollectionCache.h6
-rw-r--r--WebCore/html/DataGridColumn.idl1
-rw-r--r--WebCore/html/DataGridColumnList.idl1
-rw-r--r--WebCore/html/DateComponents.cpp (renamed from WebCore/html/ISODateTime.cpp)286
-rw-r--r--WebCore/html/DateComponents.h (renamed from WebCore/html/ISODateTime.h)110
-rw-r--r--WebCore/html/File.cpp16
-rw-r--r--WebCore/html/File.h30
-rw-r--r--WebCore/html/File.idl8
-rw-r--r--WebCore/html/FileList.idl1
-rw-r--r--WebCore/html/HTMLAllCollection.idl1
-rw-r--r--WebCore/html/HTMLAnchorElement.cpp14
-rw-r--r--WebCore/html/HTMLAnchorElement.idl6
-rw-r--r--WebCore/html/HTMLAppletElement.cpp4
-rw-r--r--WebCore/html/HTMLAppletElement.idl5
-rw-r--r--WebCore/html/HTMLAreaElement.cpp73
-rw-r--r--WebCore/html/HTMLAreaElement.h13
-rw-r--r--WebCore/html/HTMLAreaElement.idl6
-rw-r--r--WebCore/html/HTMLAttributeNames.in7
-rw-r--r--WebCore/html/HTMLAudioElement.idl2
-rw-r--r--WebCore/html/HTMLBRElement.idl6
-rw-r--r--WebCore/html/HTMLBaseElement.idl6
-rw-r--r--WebCore/html/HTMLBaseFontElement.idl6
-rw-r--r--WebCore/html/HTMLBlockquoteElement.idl6
-rw-r--r--WebCore/html/HTMLBodyElement.idl9
-rw-r--r--WebCore/html/HTMLButtonElement.idl8
-rw-r--r--WebCore/html/HTMLCanvasElement.cpp19
-rw-r--r--WebCore/html/HTMLCanvasElement.h3
-rw-r--r--WebCore/html/HTMLCanvasElement.idl8
-rw-r--r--WebCore/html/HTMLCollection.cpp10
-rw-r--r--WebCore/html/HTMLCollection.idl5
-rw-r--r--WebCore/html/HTMLDListElement.idl6
-rw-r--r--WebCore/html/HTMLDataGridCellElement.idl1
-rw-r--r--WebCore/html/HTMLDataGridColElement.cpp6
-rw-r--r--WebCore/html/HTMLDataGridColElement.idl1
-rw-r--r--WebCore/html/HTMLDataGridElement.idl1
-rw-r--r--WebCore/html/HTMLDataGridRowElement.idl1
-rw-r--r--WebCore/html/HTMLDataListElement.idl1
-rw-r--r--WebCore/html/HTMLDirectoryElement.idl6
-rw-r--r--WebCore/html/HTMLDivElement.idl6
-rw-r--r--WebCore/html/HTMLDocument.cpp7
-rw-r--r--WebCore/html/HTMLDocument.h1
-rw-r--r--WebCore/html/HTMLDocument.idl5
-rw-r--r--WebCore/html/HTMLElement.cpp71
-rw-r--r--WebCore/html/HTMLElement.h3
-rw-r--r--WebCore/html/HTMLElement.idl5
-rw-r--r--WebCore/html/HTMLEmbedElement.cpp6
-rw-r--r--WebCore/html/HTMLEmbedElement.idl7
-rw-r--r--WebCore/html/HTMLFieldSetElement.idl8
-rw-r--r--WebCore/html/HTMLFontElement.idl6
-rw-r--r--WebCore/html/HTMLFormCollection.cpp15
-rw-r--r--WebCore/html/HTMLFormControlElement.cpp14
-rw-r--r--WebCore/html/HTMLFormControlElement.h4
-rw-r--r--WebCore/html/HTMLFormElement.cpp15
-rw-r--r--WebCore/html/HTMLFormElement.h5
-rw-r--r--WebCore/html/HTMLFormElement.idl5
-rw-r--r--WebCore/html/HTMLFrameElement.idl8
-rw-r--r--WebCore/html/HTMLFrameElementBase.cpp40
-rw-r--r--WebCore/html/HTMLFrameElementBase.h9
-rw-r--r--WebCore/html/HTMLFrameOwnerElement.cpp2
-rw-r--r--WebCore/html/HTMLFrameOwnerElement.h8
-rw-r--r--WebCore/html/HTMLFrameSetElement.idl8
-rw-r--r--WebCore/html/HTMLHRElement.idl6
-rw-r--r--WebCore/html/HTMLHeadElement.idl6
-rw-r--r--WebCore/html/HTMLHeadingElement.idl6
-rw-r--r--WebCore/html/HTMLHtmlElement.idl6
-rw-r--r--WebCore/html/HTMLIFrameElement.cpp8
-rw-r--r--WebCore/html/HTMLIFrameElement.h2
-rw-r--r--WebCore/html/HTMLIFrameElement.idl8
-rw-r--r--WebCore/html/HTMLImageElement.cpp28
-rw-r--r--WebCore/html/HTMLImageElement.h7
-rw-r--r--WebCore/html/HTMLImageElement.idl6
-rw-r--r--WebCore/html/HTMLInputElement.cpp430
-rw-r--r--WebCore/html/HTMLInputElement.h27
-rw-r--r--WebCore/html/HTMLInputElement.idl16
-rw-r--r--WebCore/html/HTMLIsIndexElement.idl6
-rw-r--r--WebCore/html/HTMLLIElement.idl6
-rw-r--r--WebCore/html/HTMLLabelElement.idl6
-rw-r--r--WebCore/html/HTMLLegendElement.idl6
-rw-r--r--WebCore/html/HTMLLinkElement.cpp33
-rw-r--r--WebCore/html/HTMLLinkElement.h2
-rw-r--r--WebCore/html/HTMLLinkElement.idl8
-rw-r--r--WebCore/html/HTMLMapElement.cpp24
-rw-r--r--WebCore/html/HTMLMapElement.h6
-rw-r--r--WebCore/html/HTMLMapElement.idl6
-rw-r--r--WebCore/html/HTMLMarqueeElement.cpp25
-rw-r--r--WebCore/html/HTMLMarqueeElement.h4
-rw-r--r--WebCore/html/HTMLMarqueeElement.idl6
-rw-r--r--WebCore/html/HTMLMediaElement.cpp175
-rw-r--r--WebCore/html/HTMLMediaElement.h9
-rw-r--r--WebCore/html/HTMLMediaElement.idl2
-rw-r--r--WebCore/html/HTMLMenuElement.idl6
-rw-r--r--WebCore/html/HTMLMetaElement.idl6
-rw-r--r--WebCore/html/HTMLModElement.idl6
-rw-r--r--WebCore/html/HTMLNameCollection.cpp8
-rw-r--r--WebCore/html/HTMLOListElement.idl6
-rw-r--r--WebCore/html/HTMLObjectElement.cpp8
-rw-r--r--WebCore/html/HTMLObjectElement.idl7
-rw-r--r--WebCore/html/HTMLOptGroupElement.idl6
-rw-r--r--WebCore/html/HTMLOptionElement.cpp7
-rw-r--r--WebCore/html/HTMLOptionElement.h1
-rw-r--r--WebCore/html/HTMLOptionElement.idl5
-rw-r--r--WebCore/html/HTMLOptionsCollection.idl4
-rw-r--r--WebCore/html/HTMLParagraphElement.idl6
-rw-r--r--WebCore/html/HTMLParamElement.cpp2
-rw-r--r--WebCore/html/HTMLParamElement.idl6
-rw-r--r--WebCore/html/HTMLParser.cpp46
-rw-r--r--WebCore/html/HTMLParser.h7
-rw-r--r--WebCore/html/HTMLPlugInElement.cpp1
-rw-r--r--WebCore/html/HTMLPreElement.idl6
-rw-r--r--WebCore/html/HTMLQuoteElement.idl6
-rw-r--r--WebCore/html/HTMLScriptElement.idl6
-rw-r--r--WebCore/html/HTMLSelectElement.cpp8
-rw-r--r--WebCore/html/HTMLSelectElement.h4
-rw-r--r--WebCore/html/HTMLSelectElement.idl7
-rw-r--r--WebCore/html/HTMLSourceElement.idl2
-rw-r--r--WebCore/html/HTMLStyleElement.idl8
-rw-r--r--WebCore/html/HTMLTableCaptionElement.idl5
-rw-r--r--WebCore/html/HTMLTableCellElement.idl6
-rw-r--r--WebCore/html/HTMLTableColElement.idl6
-rw-r--r--WebCore/html/HTMLTableElement.idl6
-rw-r--r--WebCore/html/HTMLTableRowElement.idl6
-rw-r--r--WebCore/html/HTMLTableSectionElement.idl5
-rw-r--r--WebCore/html/HTMLTagNames.in5
-rw-r--r--WebCore/html/HTMLTextAreaElement.cpp1
-rw-r--r--WebCore/html/HTMLTextAreaElement.idl8
-rw-r--r--WebCore/html/HTMLTitleElement.idl6
-rw-r--r--WebCore/html/HTMLTokenizer.cpp70
-rw-r--r--WebCore/html/HTMLTokenizer.h13
-rw-r--r--WebCore/html/HTMLUListElement.idl6
-rw-r--r--WebCore/html/HTMLVideoElement.cpp42
-rw-r--r--WebCore/html/HTMLVideoElement.h12
-rw-r--r--WebCore/html/HTMLVideoElement.idl2
-rw-r--r--WebCore/html/ImageData.idl3
-rw-r--r--WebCore/html/MediaError.idl2
-rw-r--r--WebCore/html/TextMetrics.idl4
-rw-r--r--WebCore/html/TimeRanges.idl2
-rw-r--r--WebCore/html/ValidityState.cpp98
-rw-r--r--WebCore/html/ValidityState.h57
-rw-r--r--WebCore/html/ValidityState.idl2
-rw-r--r--WebCore/html/VoidCallback.idl2
-rw-r--r--WebCore/html/canvas/CanvasContextAttributes.cpp41
-rw-r--r--WebCore/html/canvas/CanvasContextAttributes.h48
-rw-r--r--WebCore/html/canvas/CanvasGradient.idl3
-rw-r--r--WebCore/html/canvas/CanvasNumberArray.idl1
-rw-r--r--WebCore/html/canvas/CanvasPattern.idl3
-rw-r--r--WebCore/html/canvas/CanvasPixelArray.idl1
-rw-r--r--WebCore/html/canvas/CanvasRenderingContext.idl1
-rw-r--r--WebCore/html/canvas/CanvasRenderingContext2D.cpp1
-rw-r--r--WebCore/html/canvas/CanvasRenderingContext2D.idl1
-rw-r--r--WebCore/html/canvas/WebGLActiveInfo.idl1
-rw-r--r--WebCore/html/canvas/WebGLArray.idl2
-rw-r--r--WebCore/html/canvas/WebGLArrayBuffer.idl2
-rw-r--r--WebCore/html/canvas/WebGLBuffer.cpp47
-rw-r--r--WebCore/html/canvas/WebGLBuffer.h27
-rw-r--r--WebCore/html/canvas/WebGLBuffer.idl2
-rw-r--r--WebCore/html/canvas/WebGLByteArray.idl2
-rw-r--r--WebCore/html/canvas/WebGLContextAttributes.cpp117
-rw-r--r--WebCore/html/canvas/WebGLContextAttributes.h82
-rw-r--r--WebCore/html/canvas/WebGLContextAttributes.idl38
-rw-r--r--WebCore/html/canvas/WebGLFloatArray.idl6
-rw-r--r--WebCore/html/canvas/WebGLFramebuffer.idl2
-rw-r--r--WebCore/html/canvas/WebGLIntArray.idl2
-rw-r--r--WebCore/html/canvas/WebGLProgram.idl2
-rw-r--r--WebCore/html/canvas/WebGLRenderbuffer.idl2
-rw-r--r--WebCore/html/canvas/WebGLRenderingContext.cpp201
-rw-r--r--WebCore/html/canvas/WebGLRenderingContext.h31
-rw-r--r--WebCore/html/canvas/WebGLRenderingContext.idl21
-rw-r--r--WebCore/html/canvas/WebGLShader.idl2
-rw-r--r--WebCore/html/canvas/WebGLShortArray.idl2
-rw-r--r--WebCore/html/canvas/WebGLTexture.idl2
-rw-r--r--WebCore/html/canvas/WebGLUniformLocation.idl2
-rw-r--r--WebCore/html/canvas/WebGLUnsignedByteArray.idl2
-rw-r--r--WebCore/html/canvas/WebGLUnsignedIntArray.idl4
-rw-r--r--WebCore/html/canvas/WebGLUnsignedShortArray.idl2
-rw-r--r--WebCore/inspector/ConsoleMessage.cpp17
-rw-r--r--WebCore/inspector/ConsoleMessage.h5
-rw-r--r--WebCore/inspector/InjectedScriptHost.cpp55
-rw-r--r--WebCore/inspector/InjectedScriptHost.h21
-rw-r--r--WebCore/inspector/InjectedScriptHost.idl13
-rw-r--r--WebCore/inspector/InspectorBackend.cpp57
-rw-r--r--WebCore/inspector/InspectorBackend.h13
-rw-r--r--WebCore/inspector/InspectorBackend.idl18
-rw-r--r--WebCore/inspector/InspectorController.cpp207
-rw-r--r--WebCore/inspector/InspectorController.h50
-rw-r--r--WebCore/inspector/InspectorDOMAgent.cpp142
-rw-r--r--WebCore/inspector/InspectorDOMAgent.h7
-rw-r--r--WebCore/inspector/InspectorFrontend.cpp64
-rw-r--r--WebCore/inspector/InspectorFrontend.h14
-rw-r--r--WebCore/inspector/InspectorFrontendHost.cpp83
-rw-r--r--WebCore/inspector/InspectorFrontendHost.h48
-rw-r--r--WebCore/inspector/InspectorFrontendHost.idl11
-rw-r--r--WebCore/inspector/InspectorResource.cpp72
-rw-r--r--WebCore/inspector/InspectorResource.h15
-rw-r--r--WebCore/inspector/InspectorTimelineAgent.cpp62
-rw-r--r--WebCore/inspector/InspectorTimelineAgent.h13
-rw-r--r--WebCore/inspector/JavaScriptCallFrame.idl2
-rw-r--r--WebCore/inspector/JavaScriptDebugServer.cpp12
-rw-r--r--WebCore/inspector/JavaScriptDebugServer.h15
-rw-r--r--WebCore/inspector/TimelineRecordFactory.cpp77
-rw-r--r--WebCore/inspector/TimelineRecordFactory.h31
-rw-r--r--WebCore/inspector/front-end/AbstractTimelinePanel.js9
-rw-r--r--WebCore/inspector/front-end/AuditLauncherView.js219
-rw-r--r--WebCore/inspector/front-end/AuditResultView.js138
-rw-r--r--WebCore/inspector/front-end/AuditsPanel.js466
-rw-r--r--WebCore/inspector/front-end/BreakpointsSidebarPane.js2
-rw-r--r--WebCore/inspector/front-end/CallStackSidebarPane.js3
-rw-r--r--WebCore/inspector/front-end/ConsoleView.js132
-rw-r--r--WebCore/inspector/front-end/DOMAgent.js26
-rw-r--r--WebCore/inspector/front-end/DOMSyntaxHighlighter.js79
-rw-r--r--WebCore/inspector/front-end/DataGrid.js38
-rw-r--r--WebCore/inspector/front-end/Database.js3
-rw-r--r--WebCore/inspector/front-end/DatabaseQueryView.js5
-rw-r--r--WebCore/inspector/front-end/Drawer.js1
-rw-r--r--WebCore/inspector/front-end/ElementsPanel.js51
-rw-r--r--WebCore/inspector/front-end/ElementsTreeOutline.js189
-rw-r--r--WebCore/inspector/front-end/EventListenersSidebarPane.js22
-rw-r--r--WebCore/inspector/front-end/Images/tipBalloon.pngbin3689 -> 0 bytes
-rw-r--r--WebCore/inspector/front-end/Images/tipBalloonBottom.pngbin3139 -> 0 bytes
-rw-r--r--WebCore/inspector/front-end/Images/tipIcon.pngbin1212 -> 0 bytes
-rw-r--r--WebCore/inspector/front-end/Images/tipIconPressed.pngbin1224 -> 0 bytes
-rw-r--r--WebCore/inspector/front-end/InjectedScript.js535
-rw-r--r--WebCore/inspector/front-end/InjectedScriptAccess.js25
-rw-r--r--WebCore/inspector/front-end/InspectorBackendStub.js27
-rw-r--r--WebCore/inspector/front-end/InspectorControllerStub.js0
-rw-r--r--WebCore/inspector/front-end/InspectorFrontendHostStub.js16
-rw-r--r--WebCore/inspector/front-end/KeyboardShortcut.js6
-rw-r--r--WebCore/inspector/front-end/MetricsSidebarPane.js8
-rw-r--r--WebCore/inspector/front-end/NativeTextViewer.js209
-rw-r--r--WebCore/inspector/front-end/ObjectPropertiesSection.js8
-rw-r--r--WebCore/inspector/front-end/ObjectProxy.js5
-rw-r--r--WebCore/inspector/front-end/Panel.js39
-rw-r--r--WebCore/inspector/front-end/PanelEnablerView.js11
-rw-r--r--WebCore/inspector/front-end/ProfileDataGridTree.js1
-rw-r--r--WebCore/inspector/front-end/ProfileView.js7
-rw-r--r--WebCore/inspector/front-end/ProfilesPanel.js49
-rw-r--r--WebCore/inspector/front-end/PropertiesSection.js112
-rw-r--r--WebCore/inspector/front-end/PropertiesSidebarPane.js4
-rw-r--r--WebCore/inspector/front-end/Resource.js129
-rw-r--r--WebCore/inspector/front-end/ResourceView.js160
-rw-r--r--WebCore/inspector/front-end/ResourcesPanel.js89
-rw-r--r--WebCore/inspector/front-end/ScriptView.js24
-rw-r--r--WebCore/inspector/front-end/ScriptsPanel.js74
-rw-r--r--WebCore/inspector/front-end/Section.js139
-rw-r--r--WebCore/inspector/front-end/Settings.js100
-rw-r--r--WebCore/inspector/front-end/SidebarPane.js8
-rw-r--r--WebCore/inspector/front-end/SourceCSSTokenizer.js1473
-rw-r--r--WebCore/inspector/front-end/SourceCSSTokenizer.re2js318
-rw-r--r--WebCore/inspector/front-end/SourceFrame.js2301
-rw-r--r--WebCore/inspector/front-end/SourceHTMLTokenizer.js590
-rw-r--r--WebCore/inspector/front-end/SourceHTMLTokenizer.re2js258
-rw-r--r--WebCore/inspector/front-end/SourceJavaScriptTokenizer.js2416
-rw-r--r--WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js177
-rw-r--r--WebCore/inspector/front-end/SourceTokenizer.js103
-rw-r--r--WebCore/inspector/front-end/SourceView.js108
-rw-r--r--WebCore/inspector/front-end/StatusBarButton.js54
-rw-r--r--WebCore/inspector/front-end/StoragePanel.js8
-rw-r--r--WebCore/inspector/front-end/StylesSidebarPane.js56
-rw-r--r--WebCore/inspector/front-end/TextEditor.js1206
-rw-r--r--WebCore/inspector/front-end/TextEditorHighlighter.js195
-rw-r--r--WebCore/inspector/front-end/TextEditorModel.js286
-rw-r--r--WebCore/inspector/front-end/TextPrompt.js3
-rw-r--r--WebCore/inspector/front-end/TimelineGrid.js22
-rw-r--r--WebCore/inspector/front-end/TimelineOverviewPane.js5
-rw-r--r--WebCore/inspector/front-end/TimelinePanel.js115
-rw-r--r--WebCore/inspector/front-end/WatchExpressionsSidebarPane.js74
-rw-r--r--WebCore/inspector/front-end/WebKit.qrc21
-rw-r--r--WebCore/inspector/front-end/WelcomeView.js73
-rw-r--r--WebCore/inspector/front-end/audits.css272
-rw-r--r--WebCore/inspector/front-end/inspector.css292
-rw-r--r--WebCore/inspector/front-end/inspector.html21
-rw-r--r--WebCore/inspector/front-end/inspector.js439
-rw-r--r--WebCore/inspector/front-end/textEditor.css91
-rw-r--r--WebCore/inspector/front-end/treeoutline.js26
-rw-r--r--WebCore/inspector/front-end/utilities.js27
-rw-r--r--WebCore/loader/Cache.cpp27
-rw-r--r--WebCore/loader/Cache.h2
-rw-r--r--WebCore/loader/CachePolicy.h3
-rw-r--r--WebCore/loader/CachedCSSStyleSheet.cpp21
-rw-r--r--WebCore/loader/CachedCSSStyleSheet.h4
-rw-r--r--WebCore/loader/CachedFont.cpp6
-rw-r--r--WebCore/loader/CachedImage.cpp5
-rw-r--r--WebCore/loader/CachedResource.cpp6
-rw-r--r--WebCore/loader/CachedResource.h7
-rw-r--r--WebCore/loader/CachedResourceClient.h5
-rw-r--r--WebCore/loader/CachedResourceHandle.h2
-rw-r--r--WebCore/loader/CachedXSLStyleSheet.cpp5
-rw-r--r--WebCore/loader/CrossOriginAccessControl.cpp3
-rw-r--r--WebCore/loader/CrossOriginPreflightResultCache.h2
-rw-r--r--WebCore/loader/DocLoader.cpp10
-rw-r--r--WebCore/loader/DocumentLoader.cpp67
-rw-r--r--WebCore/loader/DocumentLoader.h2
-rw-r--r--WebCore/loader/DocumentThreadableLoader.cpp17
-rw-r--r--WebCore/loader/DocumentThreadableLoader.h3
-rw-r--r--WebCore/loader/EmptyClients.h10
-rw-r--r--WebCore/loader/FTPDirectoryDocument.cpp4
-rw-r--r--WebCore/loader/FTPDirectoryParser.cpp6
-rw-r--r--WebCore/loader/FormState.cpp7
-rw-r--r--WebCore/loader/FormState.h11
-rw-r--r--WebCore/loader/FrameLoader.cpp80
-rw-r--r--WebCore/loader/FrameLoader.h4
-rw-r--r--WebCore/loader/FrameLoaderClient.h2
-rw-r--r--WebCore/loader/FrameLoaderTypes.h5
-rw-r--r--WebCore/loader/HistoryController.cpp24
-rw-r--r--WebCore/loader/ImageDocument.cpp8
-rw-r--r--WebCore/loader/ImageLoader.cpp10
-rw-r--r--WebCore/loader/ImageLoader.h3
-rw-r--r--WebCore/loader/MainResourceLoader.cpp31
-rw-r--r--WebCore/loader/MainResourceLoader.h4
-rw-r--r--WebCore/loader/PlaceholderDocument.cpp5
-rw-r--r--WebCore/loader/PlaceholderDocument.h2
-rw-r--r--WebCore/loader/RedirectScheduler.cpp33
-rw-r--r--WebCore/loader/Request.cpp4
-rw-r--r--WebCore/loader/Request.h7
-rw-r--r--WebCore/loader/ResourceLoader.cpp2
-rw-r--r--WebCore/loader/SubresourceLoader.cpp6
-rw-r--r--WebCore/loader/SubresourceLoader.h5
-rw-r--r--WebCore/loader/WorkerThreadableLoader.cpp6
-rw-r--r--WebCore/loader/WorkerThreadableLoader.h4
-rw-r--r--WebCore/loader/appcache/ApplicationCacheGroup.cpp1
-rw-r--r--WebCore/loader/appcache/ApplicationCacheHost.cpp21
-rw-r--r--WebCore/loader/appcache/ApplicationCacheHost.h5
-rw-r--r--WebCore/loader/appcache/ApplicationCacheStorage.cpp2
-rw-r--r--WebCore/loader/appcache/DOMApplicationCache.cpp6
-rw-r--r--WebCore/loader/appcache/DOMApplicationCache.idl3
-rw-r--r--WebCore/loader/loader.cpp11
-rw-r--r--WebCore/loader/loader.h3
-rw-r--r--WebCore/manual-tests/animation/transitions-and-paused-animations.html71
-rw-r--r--WebCore/manual-tests/chromium/select-close-popup-value-change.html20
-rw-r--r--WebCore/manual-tests/debugger-caught-uncaught-exceptions.html35
-rw-r--r--WebCore/manual-tests/inspector/debugger-scopes-inspection.html35
-rw-r--r--WebCore/manual-tests/qt/qtplugin-scrolling.html32
-rw-r--r--WebCore/manual-tests/resources/textarea-form-back-on-submit.html16
-rw-r--r--WebCore/manual-tests/select-delete-item.html21
-rw-r--r--WebCore/manual-tests/select-webkit-appearance-off-narrow-select.html49
-rw-r--r--WebCore/manual-tests/svg-crash-hovering-use.svg30
-rw-r--r--WebCore/manual-tests/svg-node-count-vs-scroll.xhtml42
-rw-r--r--WebCore/manual-tests/textarea-reset-default-value.html24
-rw-r--r--WebCore/manual-tests/video-player.html11
-rw-r--r--WebCore/manual-tests/webgl/Earth.html166
-rw-r--r--WebCore/manual-tests/webgl/ManyPlanetsDeep.html202
-rw-r--r--WebCore/manual-tests/webgl/SpinningBox.html149
-rw-r--r--WebCore/manual-tests/webgl/TeapotPerPixel.html332
-rw-r--r--WebCore/manual-tests/webgl/TeapotPerVertex.html305
-rw-r--r--WebCore/manual-tests/webgl/resources/CanvasMatrix.js698
-rw-r--r--WebCore/manual-tests/webgl/resources/earthmap1k.jpgbin344080 -> 0 bytes
-rw-r--r--WebCore/manual-tests/webgl/resources/mars500x250.pngbin174308 -> 0 bytes
-rw-r--r--WebCore/manual-tests/webgl/resources/teapot.obj2866
-rw-r--r--WebCore/manual-tests/webgl/resources/utils3d.js530
-rw-r--r--WebCore/mathml/MathMLElement.cpp39
-rw-r--r--WebCore/mathml/MathMLElement.h39
-rw-r--r--WebCore/mathml/MathMLInlineContainerElement.cpp47
-rw-r--r--WebCore/mathml/MathMLInlineContainerElement.h39
-rw-r--r--WebCore/mathml/MathMLMathElement.cpp39
-rw-r--r--WebCore/mathml/MathMLMathElement.h39
-rw-r--r--WebCore/mathml/MathMLTextElement.cpp58
-rw-r--r--WebCore/mathml/MathMLTextElement.h48
-rw-r--r--WebCore/mathml/RenderMathMLBlock.cpp79
-rw-r--r--WebCore/mathml/RenderMathMLBlock.h69
-rw-r--r--WebCore/mathml/mathattrs.in13
-rw-r--r--WebCore/mathml/mathtags.in1
-rw-r--r--WebCore/notifications/Notification.cpp10
-rw-r--r--WebCore/notifications/Notification.idl3
-rw-r--r--WebCore/notifications/NotificationCenter.cpp8
-rw-r--r--WebCore/notifications/NotificationCenter.idl3
-rw-r--r--WebCore/notifications/NotificationPresenter.h30
-rw-r--r--WebCore/page/AbstractView.idl3
-rw-r--r--WebCore/page/BarInfo.cpp22
-rw-r--r--WebCore/page/BarInfo.idl2
-rw-r--r--WebCore/page/Chrome.h2
-rw-r--r--WebCore/page/Console.cpp1
-rw-r--r--WebCore/page/Console.idl2
-rw-r--r--WebCore/page/ContextMenuController.cpp23
-rw-r--r--WebCore/page/ContextMenuController.h7
-rw-r--r--WebCore/page/ContextMenuProvider.h (renamed from WebCore/page/ContextMenuSelectionHandler.h)23
-rw-r--r--WebCore/page/Coordinates.idl2
-rw-r--r--WebCore/page/DOMSelection.idl2
-rw-r--r--WebCore/page/DOMWindow.cpp51
-rw-r--r--WebCore/page/DOMWindow.h11
-rw-r--r--WebCore/page/DOMWindow.idl141
-rw-r--r--WebCore/page/DragController.cpp21
-rw-r--r--WebCore/page/EventHandler.cpp100
-rw-r--r--WebCore/page/EventHandler.h9
-rw-r--r--WebCore/page/EventSource.cpp18
-rw-r--r--WebCore/page/EventSource.h1
-rw-r--r--WebCore/page/EventSource.idl1
-rw-r--r--WebCore/page/FocusController.cpp9
-rw-r--r--WebCore/page/FocusController.h47
-rw-r--r--WebCore/page/Frame.cpp212
-rw-r--r--WebCore/page/Frame.h42
-rw-r--r--WebCore/page/FrameView.cpp71
-rw-r--r--WebCore/page/FrameView.h11
-rw-r--r--WebCore/page/Geolocation.cpp49
-rw-r--r--WebCore/page/Geolocation.h8
-rw-r--r--WebCore/page/Geolocation.idl2
-rw-r--r--WebCore/page/GeolocationController.cpp33
-rw-r--r--WebCore/page/GeolocationControllerClient.h5
-rw-r--r--WebCore/page/GeolocationError.h12
-rw-r--r--WebCore/page/GeolocationPosition.h4
-rw-r--r--WebCore/page/Geoposition.idl2
-rw-r--r--WebCore/page/History.cpp15
-rw-r--r--WebCore/page/History.idl3
-rw-r--r--WebCore/page/Location.idl3
-rw-r--r--WebCore/page/Navigator.cpp1
-rw-r--r--WebCore/page/Navigator.idl5
-rw-r--r--WebCore/page/NavigatorBase.cpp12
-rw-r--r--WebCore/page/Page.cpp28
-rw-r--r--WebCore/page/Page.h25
-rw-r--r--WebCore/page/PageGroup.cpp1
-rw-r--r--WebCore/page/PositionError.idl4
-rw-r--r--WebCore/page/Screen.idl2
-rw-r--r--WebCore/page/SecurityOrigin.cpp103
-rw-r--r--WebCore/page/SecurityOrigin.h314
-rw-r--r--WebCore/page/Settings.cpp19
-rw-r--r--WebCore/page/Settings.h14
-rw-r--r--WebCore/page/WebKitPoint.idl2
-rw-r--r--WebCore/page/WorkerNavigator.idl3
-rw-r--r--WebCore/page/XSSAuditor.cpp96
-rw-r--r--WebCore/page/XSSAuditor.h21
-rw-r--r--WebCore/page/animation/AnimationBase.cpp48
-rw-r--r--WebCore/page/animation/AnimationBase.h9
-rw-r--r--WebCore/page/animation/AnimationController.cpp2
-rw-r--r--WebCore/page/animation/AnimationControllerPrivate.h2
-rw-r--r--WebCore/page/animation/CompositeAnimation.cpp15
-rw-r--r--WebCore/page/animation/ImplicitAnimation.cpp14
-rw-r--r--WebCore/page/animation/ImplicitAnimation.h5
-rw-r--r--WebCore/page/animation/KeyframeAnimation.cpp56
-rw-r--r--WebCore/page/animation/KeyframeAnimation.h5
-rw-r--r--WebCore/page/chromium/DragControllerChromium.cpp4
-rw-r--r--WebCore/page/chromium/EventHandlerChromium.cpp6
-rw-r--r--WebCore/page/chromium/FrameChromium.cpp52
-rw-r--r--WebCore/page/mac/ChromeMac.mm3
-rw-r--r--WebCore/page/mac/DragControllerMac.mm5
-rw-r--r--WebCore/page/mac/EventHandlerMac.mm6
-rw-r--r--WebCore/page/mac/FrameMac.mm74
-rw-r--r--WebCore/page/mac/WebCoreViewFactory.h2
-rw-r--r--WebCore/page/qt/DragControllerQt.cpp1
-rw-r--r--WebCore/page/win/EventHandlerWin.cpp2
-rw-r--r--WebCore/page/win/FrameCairoWin.cpp1
-rw-r--r--WebCore/page/win/FrameWin.h5
-rw-r--r--WebCore/platform/ContextMenu.cpp23
-rw-r--r--WebCore/platform/CrossThreadCopier.cpp14
-rw-r--r--WebCore/platform/CrossThreadCopier.h41
-rw-r--r--WebCore/platform/Cursor.h7
-rw-r--r--WebCore/platform/FileChooser.h3
-rw-r--r--WebCore/platform/FileSystem.h8
-rw-r--r--WebCore/platform/GeolocationService.cpp2
-rw-r--r--WebCore/platform/KURL.cpp38
-rw-r--r--WebCore/platform/KURL.h7
-rw-r--r--WebCore/platform/KURLGoogle.cpp16
-rw-r--r--WebCore/platform/KeyboardCodes.h18
-rw-r--r--WebCore/platform/LinkHash.cpp6
-rw-r--r--WebCore/platform/LocalizedStrings.h2
-rw-r--r--WebCore/platform/PlatformKeyboardEvent.h1
-rw-r--r--WebCore/platform/PlatformMouseEvent.h7
-rw-r--r--WebCore/platform/PlatformTouchEvent.h13
-rw-r--r--WebCore/platform/PlatformWheelEvent.h14
-rw-r--r--WebCore/platform/PopupMenu.h9
-rw-r--r--WebCore/platform/PurgeableBuffer.h2
-rw-r--r--WebCore/platform/ScrollView.cpp26
-rw-r--r--WebCore/platform/ScrollView.h10
-rw-r--r--WebCore/platform/Scrollbar.cpp14
-rw-r--r--WebCore/platform/Scrollbar.h3
-rw-r--r--WebCore/platform/ScrollbarThemeComposite.cpp1
-rw-r--r--WebCore/platform/SharedBuffer.cpp139
-rw-r--r--WebCore/platform/SharedBuffer.h41
-rw-r--r--WebCore/platform/ThemeTypes.h5
-rw-r--r--WebCore/platform/ThreadGlobalData.cpp18
-rw-r--r--WebCore/platform/ThreadGlobalData.h34
-rw-r--r--WebCore/platform/Timer.cpp7
-rw-r--r--WebCore/platform/Timer.h6
-rw-r--r--WebCore/platform/TreeShared.h2
-rw-r--r--WebCore/platform/Widget.cpp6
-rw-r--r--WebCore/platform/Widget.h6
-rw-r--r--WebCore/platform/android/PlatformBridge.h8
-rw-r--r--WebCore/platform/android/PlatformTouchEventAndroid.cpp7
-rw-r--r--WebCore/platform/cf/BinaryPropertyList.cpp1
-rw-r--r--WebCore/platform/cf/SharedBufferCF.cpp9
-rw-r--r--WebCore/platform/chromium/ChromiumBridge.h9
-rw-r--r--WebCore/platform/chromium/ChromiumDataObject.cpp3
-rw-r--r--WebCore/platform/chromium/ChromiumDataObject.h2
-rw-r--r--WebCore/platform/chromium/ClipboardChromium.cpp16
-rw-r--r--WebCore/platform/chromium/ClipboardUtilitiesChromium.cpp2
-rw-r--r--WebCore/platform/chromium/ClipboardUtilitiesChromium.h2
-rw-r--r--WebCore/platform/chromium/DragDataChromium.cpp2
-rw-r--r--WebCore/platform/chromium/KeyCodeConversionGtk.cpp17
-rw-r--r--WebCore/platform/chromium/PasteboardChromium.cpp10
-rw-r--r--WebCore/platform/chromium/PlatformBridge.h47
-rw-r--r--WebCore/platform/chromium/PlatformKeyboardEventChromium.cpp12
-rw-r--r--WebCore/platform/chromium/PopupMenuChromium.cpp35
-rw-r--r--WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm2
-rw-r--r--WebCore/platform/graphics/BitmapImage.h6
-rw-r--r--WebCore/platform/graphics/FloatPoint.h4
-rw-r--r--WebCore/platform/graphics/FloatQuad.cpp6
-rw-r--r--WebCore/platform/graphics/FloatQuad.h6
-rw-r--r--WebCore/platform/graphics/FloatRect.h12
-rw-r--r--WebCore/platform/graphics/FloatSize.h4
-rw-r--r--WebCore/platform/graphics/Font.cpp17
-rw-r--r--WebCore/platform/graphics/Font.h22
-rw-r--r--WebCore/platform/graphics/FontCache.cpp6
-rw-r--r--WebCore/platform/graphics/FontCache.h2
-rw-r--r--WebCore/platform/graphics/FontFastPath.cpp15
-rw-r--r--WebCore/platform/graphics/GeneratedImage.cpp41
-rw-r--r--WebCore/platform/graphics/Generator.h1
-rw-r--r--WebCore/platform/graphics/GlyphBuffer.h10
-rw-r--r--WebCore/platform/graphics/Gradient.cpp36
-rw-r--r--WebCore/platform/graphics/Gradient.h17
-rw-r--r--WebCore/platform/graphics/GraphicsContext.cpp102
-rw-r--r--WebCore/platform/graphics/GraphicsContext.h31
-rw-r--r--WebCore/platform/graphics/GraphicsContext3D.h56
-rw-r--r--WebCore/platform/graphics/GraphicsContextPrivate.h9
-rw-r--r--WebCore/platform/graphics/GraphicsLayer.cpp37
-rw-r--r--WebCore/platform/graphics/GraphicsLayer.h31
-rw-r--r--WebCore/platform/graphics/Image.h1
-rw-r--r--WebCore/platform/graphics/ImageSource.cpp9
-rw-r--r--WebCore/platform/graphics/ImageSource.h4
-rw-r--r--WebCore/platform/graphics/IntRect.cpp35
-rw-r--r--WebCore/platform/graphics/IntRect.h33
-rw-r--r--WebCore/platform/graphics/IntSize.h3
-rw-r--r--WebCore/platform/graphics/MediaPlayer.cpp37
-rw-r--r--WebCore/platform/graphics/MediaPlayer.h10
-rw-r--r--WebCore/platform/graphics/MediaPlayerPrivate.h10
-rw-r--r--WebCore/platform/graphics/Path.h18
-rw-r--r--WebCore/platform/graphics/Pattern.h2
-rw-r--r--WebCore/platform/graphics/SimpleFontData.h19
-rw-r--r--WebCore/platform/graphics/TypesettingFeatures.h38
-rw-r--r--WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp12
-rw-r--r--WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h2
-rw-r--r--WebCore/platform/graphics/cairo/ImageBufferCairo.cpp2
-rw-r--r--WebCore/platform/graphics/cg/ColorCG.cpp4
-rw-r--r--WebCore/platform/graphics/cg/GradientCG.cpp49
-rw-r--r--WebCore/platform/graphics/cg/GraphicsContextCG.cpp61
-rw-r--r--WebCore/platform/graphics/cg/PatternCG.cpp2
-rw-r--r--WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp28
-rw-r--r--WebCore/platform/graphics/chromium/FontCustomPlatformData.h12
-rw-r--r--WebCore/platform/graphics/chromium/FontLinux.cpp36
-rw-r--r--WebCore/platform/graphics/chromium/FontPlatformData.h4
-rw-r--r--WebCore/platform/graphics/chromium/HarfbuzzSkia.cpp34
-rw-r--r--WebCore/platform/graphics/chromium/TransparencyWin.cpp5
-rw-r--r--WebCore/platform/graphics/filters/FEColorMatrix.cpp1
-rw-r--r--WebCore/platform/graphics/filters/FEComponentTransfer.cpp4
-rw-r--r--WebCore/platform/graphics/filters/FEComponentTransfer.h1
-rw-r--r--WebCore/platform/graphics/filters/FEComposite.cpp4
-rw-r--r--WebCore/platform/graphics/gtk/ImageGtk.cpp57
-rw-r--r--WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp385
-rw-r--r--WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h37
-rw-r--r--WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp8
-rw-r--r--WebCore/platform/graphics/mac/Canvas3DLayer.mm10
-rw-r--r--WebCore/platform/graphics/mac/ComplexTextController.cpp65
-rw-r--r--WebCore/platform/graphics/mac/ComplexTextController.h31
-rw-r--r--WebCore/platform/graphics/mac/ComplexTextControllerATSUI.cpp67
-rw-r--r--WebCore/platform/graphics/mac/ComplexTextControllerCoreText.cpp59
-rw-r--r--WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp181
-rw-r--r--WebCore/platform/graphics/mac/GraphicsContextMac.mm52
-rw-r--r--WebCore/platform/graphics/mac/GraphicsLayerCA.h161
-rw-r--r--WebCore/platform/graphics/mac/GraphicsLayerCA.mm956
-rw-r--r--WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h18
-rw-r--r--WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm74
-rw-r--r--WebCore/platform/graphics/mac/SimpleFontDataMac.mm29
-rw-r--r--WebCore/platform/graphics/mac/WebLayer.mm7
-rw-r--r--WebCore/platform/graphics/mac/WebTiledLayer.mm7
-rw-r--r--WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp2
-rw-r--r--WebCore/platform/graphics/opentype/OpenTypeUtilities.h2
-rw-r--r--WebCore/platform/graphics/openvg/EGLDisplayOpenVG.cpp431
-rw-r--r--WebCore/platform/graphics/openvg/EGLDisplayOpenVG.h89
-rw-r--r--WebCore/platform/graphics/openvg/EGLUtils.h71
-rw-r--r--WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp566
-rw-r--r--WebCore/platform/graphics/openvg/PainterOpenVG.cpp957
-rw-r--r--WebCore/platform/graphics/openvg/PainterOpenVG.h121
-rw-r--r--WebCore/platform/graphics/openvg/SurfaceOpenVG.cpp243
-rw-r--r--WebCore/platform/graphics/openvg/SurfaceOpenVG.h137
-rw-r--r--WebCore/platform/graphics/openvg/VGUtils.cpp100
-rw-r--r--WebCore/platform/graphics/openvg/VGUtils.h87
-rw-r--r--WebCore/platform/graphics/qt/FontCacheQt.cpp2
-rw-r--r--WebCore/platform/graphics/qt/FontPlatformData.h2
-rw-r--r--WebCore/platform/graphics/qt/FontPlatformDataQt.cpp11
-rw-r--r--WebCore/platform/graphics/qt/FontQt.cpp37
-rw-r--r--WebCore/platform/graphics/qt/GraphicsContextQt.cpp30
-rw-r--r--WebCore/platform/graphics/qt/GraphicsLayerQt.cpp1118
-rw-r--r--WebCore/platform/graphics/qt/GraphicsLayerQt.h85
-rw-r--r--WebCore/platform/graphics/qt/ImageBufferQt.cpp2
-rw-r--r--WebCore/platform/graphics/qt/ImageDecoderQt.cpp29
-rw-r--r--WebCore/platform/graphics/qt/ImageDecoderQt.h5
-rw-r--r--WebCore/platform/graphics/qt/ImageQt.cpp2
-rw-r--r--WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp32
-rw-r--r--WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h4
-rw-r--r--WebCore/platform/graphics/qt/PathQt.cpp81
-rw-r--r--WebCore/platform/graphics/skia/GraphicsContextSkia.cpp15
-rw-r--r--WebCore/platform/graphics/skia/ImageBufferSkia.cpp2
-rw-r--r--WebCore/platform/graphics/skia/PlatformContextSkia.cpp19
-rw-r--r--WebCore/platform/graphics/skia/PlatformContextSkia.h8
-rw-r--r--WebCore/platform/graphics/transforms/TransformationMatrix.h36
-rw-r--r--WebCore/platform/graphics/win/FontCGWin.cpp3
-rw-r--r--WebCore/platform/graphics/win/FontCacheWin.cpp13
-rw-r--r--WebCore/platform/graphics/win/FontCustomPlatformData.cpp33
-rw-r--r--WebCore/platform/graphics/win/FontDatabase.cpp3
-rw-r--r--WebCore/platform/graphics/win/FontPlatformDataCGWin.cpp7
-rw-r--r--WebCore/platform/graphics/win/GraphicsContextCGWin.cpp12
-rw-r--r--WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp17
-rw-r--r--WebCore/platform/graphics/win/GraphicsLayerCACF.cpp11
-rw-r--r--WebCore/platform/graphics/win/IconWin.cpp6
-rw-r--r--WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp325
-rw-r--r--WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h65
-rw-r--r--WebCore/platform/graphics/win/QTMovieWin.cpp132
-rw-r--r--WebCore/platform/graphics/win/QTMovieWin.h14
-rw-r--r--WebCore/platform/graphics/win/TransformationMatrixWin.cpp2
-rw-r--r--WebCore/platform/graphics/win/WKCACFLayer.cpp170
-rw-r--r--WebCore/platform/graphics/win/WKCACFLayer.h23
-rw-r--r--WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp98
-rw-r--r--WebCore/platform/graphics/win/WKCACFLayerRenderer.h4
-rw-r--r--WebCore/platform/graphics/wince/GraphicsContextWince.cpp12
-rw-r--r--WebCore/platform/graphics/wince/MediaPlayerPrivateWince.h4
-rw-r--r--WebCore/platform/graphics/wx/GraphicsContextWx.cpp9
-rw-r--r--WebCore/platform/gtk/ContextMenuItemGtk.cpp15
-rw-r--r--WebCore/platform/gtk/DataObjectGtk.cpp120
-rw-r--r--WebCore/platform/gtk/DataObjectGtk.h78
-rw-r--r--WebCore/platform/gtk/FileSystemGtk.cpp6
-rw-r--r--WebCore/platform/gtk/GRefPtrGtk.cpp54
-rw-r--r--WebCore/platform/gtk/GRefPtrGtk.h39
-rw-r--r--WebCore/platform/gtk/KeyEventGtk.cpp17
-rw-r--r--WebCore/platform/gtk/LocalizedStringsGtk.cpp11
-rw-r--r--WebCore/platform/gtk/PasteboardGtk.cpp2
-rw-r--r--WebCore/platform/gtk/PasteboardHelper.h3
-rw-r--r--WebCore/platform/gtk/PlatformScreenGtk.cpp8
-rw-r--r--WebCore/platform/gtk/PopupMenuGtk.cpp34
-rw-r--r--WebCore/platform/gtk/RenderThemeGtk.cpp325
-rw-r--r--WebCore/platform/gtk/RenderThemeGtk.h56
-rw-r--r--WebCore/platform/gtk/ScrollViewGtk.cpp1
-rw-r--r--WebCore/platform/gtk/ScrollbarGtk.cpp1
-rw-r--r--WebCore/platform/gtk/ScrollbarThemeGtk.h5
-rw-r--r--WebCore/platform/gtk/gtk2drawing.c927
-rw-r--r--WebCore/platform/gtk/gtkdrawing.h62
-rw-r--r--WebCore/platform/haiku/LocalizedStringsHaiku.cpp10
-rw-r--r--WebCore/platform/haiku/SharedBufferHaiku.cpp1
-rw-r--r--WebCore/platform/image-decoders/ImageDecoder.cpp71
-rw-r--r--WebCore/platform/image-decoders/ImageDecoder.h31
-rw-r--r--WebCore/platform/image-decoders/bmp/BMPImageReader.h6
-rw-r--r--WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp165
-rw-r--r--WebCore/platform/image-decoders/gif/GIFImageDecoder.h10
-rw-r--r--WebCore/platform/image-decoders/gif/GIFImageReader.cpp38
-rw-r--r--WebCore/platform/image-decoders/gif/GIFImageReader.h4
-rw-r--r--WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp155
-rw-r--r--WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h17
-rw-r--r--WebCore/platform/image-decoders/png/PNGImageDecoder.cpp112
-rw-r--r--WebCore/platform/image-decoders/png/PNGImageDecoder.h5
-rw-r--r--WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp5
-rw-r--r--WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp5
-rw-r--r--WebCore/platform/image-decoders/xbm/XBMImageDecoder.cpp278
-rw-r--r--WebCore/platform/image-decoders/xbm/XBMImageDecoder.h83
-rw-r--r--WebCore/platform/image-decoders/zlib/adler32.c149
-rw-r--r--WebCore/platform/image-decoders/zlib/compress.c79
-rw-r--r--WebCore/platform/image-decoders/zlib/crc32.c423
-rw-r--r--WebCore/platform/image-decoders/zlib/crc32.h441
-rw-r--r--WebCore/platform/image-decoders/zlib/deflate.c1736
-rw-r--r--WebCore/platform/image-decoders/zlib/deflate.h331
-rw-r--r--WebCore/platform/image-decoders/zlib/gzio.c1026
-rw-r--r--WebCore/platform/image-decoders/zlib/infback.c623
-rw-r--r--WebCore/platform/image-decoders/zlib/inffast.c318
-rw-r--r--WebCore/platform/image-decoders/zlib/inffast.h11
-rw-r--r--WebCore/platform/image-decoders/zlib/inffixed.h94
-rw-r--r--WebCore/platform/image-decoders/zlib/inflate.c1368
-rw-r--r--WebCore/platform/image-decoders/zlib/inflate.h115
-rw-r--r--WebCore/platform/image-decoders/zlib/inftrees.c329
-rw-r--r--WebCore/platform/image-decoders/zlib/inftrees.h55
-rw-r--r--WebCore/platform/image-decoders/zlib/mozzconf.h130
-rw-r--r--WebCore/platform/image-decoders/zlib/trees.c1219
-rw-r--r--WebCore/platform/image-decoders/zlib/trees.h128
-rw-r--r--WebCore/platform/image-decoders/zlib/uncompr.c61
-rw-r--r--WebCore/platform/image-decoders/zlib/zconf.h335
-rw-r--r--WebCore/platform/image-decoders/zlib/zlib.h1357
-rw-r--r--WebCore/platform/image-decoders/zlib/zutil.c318
-rw-r--r--WebCore/platform/image-decoders/zlib/zutil.h269
-rw-r--r--WebCore/platform/mac/GeolocationServiceMac.mm2
-rw-r--r--WebCore/platform/mac/KeyEventMac.mm16
-rw-r--r--WebCore/platform/mac/LocalizedStringsMac.mm17
-rw-r--r--WebCore/platform/mac/PasteboardMac.mm8
-rw-r--r--WebCore/platform/mac/PlatformMouseEventMac.mm18
-rw-r--r--WebCore/platform/mac/PopupMenuMac.mm21
-rw-r--r--WebCore/platform/mac/RuntimeApplicationChecks.h1
-rw-r--r--WebCore/platform/mac/RuntimeApplicationChecks.mm6
-rw-r--r--WebCore/platform/mac/ScrollViewMac.mm17
-rw-r--r--WebCore/platform/mac/ScrollbarThemeMac.mm2
-rw-r--r--WebCore/platform/mac/ThemeMac.mm2
-rw-r--r--WebCore/platform/mac/WebCoreObjCExtras.mm5
-rw-r--r--WebCore/platform/mac/WebCoreSystemInterface.h9
-rw-r--r--WebCore/platform/mac/WebCoreSystemInterface.mm7
-rw-r--r--WebCore/platform/mac/WidgetMac.mm62
-rw-r--r--WebCore/platform/network/CredentialStorage.cpp3
-rw-r--r--WebCore/platform/network/NetworkStateNotifier.h21
-rw-r--r--WebCore/platform/network/ProtectionSpaceHash.h1
-rw-r--r--WebCore/platform/network/ResourceRequestBase.cpp4
-rw-r--r--WebCore/platform/network/ResourceRequestBase.h2
-rw-r--r--WebCore/platform/network/ResourceResponseBase.h4
-rw-r--r--WebCore/platform/network/android/NetworkStateNotifierAndroid.cpp3
-rw-r--r--WebCore/platform/network/cf/DNSCFNet.cpp1
-rw-r--r--WebCore/platform/network/chromium/CookieJarChromium.cpp5
-rw-r--r--WebCore/platform/network/chromium/ResourceRequest.h20
-rw-r--r--WebCore/platform/network/chromium/ResourceResponse.h10
-rw-r--r--WebCore/platform/network/curl/ResourceHandleCurl.cpp6
-rw-r--r--WebCore/platform/network/curl/ResourceHandleManager.cpp4
-rw-r--r--WebCore/platform/network/mac/ResourceHandleMac.mm11
-rw-r--r--WebCore/platform/network/qt/NetworkStateNotifierPrivate.h51
-rw-r--r--WebCore/platform/network/qt/NetworkStateNotifierQt.cpp90
-rw-r--r--WebCore/platform/network/qt/QNetworkReplyHandler.cpp43
-rw-r--r--WebCore/platform/network/qt/QNetworkReplyHandler.h1
-rw-r--r--WebCore/platform/network/qt/ResourceRequestQt.cpp16
-rw-r--r--WebCore/platform/network/qt/SocketStreamHandle.h4
-rw-r--r--WebCore/platform/network/qt/SocketStreamHandlePrivate.h70
-rw-r--r--WebCore/platform/network/qt/SocketStreamHandleQt.cpp196
-rw-r--r--WebCore/platform/network/soup/ResourceHandleSoup.cpp8
-rw-r--r--WebCore/platform/qt/DragDataQt.cpp2
-rw-r--r--WebCore/platform/qt/KURLQt.cpp9
-rw-r--r--WebCore/platform/qt/Localizations.cpp11
-rw-r--r--WebCore/platform/qt/PasteboardQt.cpp2
-rw-r--r--WebCore/platform/qt/PlatformKeyboardEventQt.cpp16
-rw-r--r--WebCore/platform/qt/PlatformTouchEventQt.cpp49
-rw-r--r--WebCore/platform/qt/PlatformTouchPointQt.cpp45
-rw-r--r--WebCore/platform/qt/PopupMenuQt.cpp75
-rw-r--r--WebCore/platform/qt/QWebPageClient.h18
-rw-r--r--WebCore/platform/qt/QWebPopup.cpp87
-rw-r--r--WebCore/platform/qt/QtAbstractWebPopup.cpp60
-rw-r--r--WebCore/platform/qt/QtAbstractWebPopup.h69
-rw-r--r--WebCore/platform/qt/RenderThemeQt.cpp203
-rw-r--r--WebCore/platform/qt/RenderThemeQt.h23
-rw-r--r--WebCore/platform/qt/ScrollViewQt.cpp13
-rw-r--r--WebCore/platform/qt/ScrollbarThemeQt.cpp26
-rw-r--r--WebCore/platform/qt/ScrollbarThemeQt.h8
-rw-r--r--WebCore/platform/qt/SharedBufferQt.cpp2
-rw-r--r--WebCore/platform/sql/SQLiteDatabase.cpp2
-rw-r--r--WebCore/platform/text/AtomicString.cpp12
-rw-r--r--WebCore/platform/text/AtomicString.h2
-rw-r--r--WebCore/platform/text/CharacterNames.h2
-rw-r--r--WebCore/platform/text/PlatformString.h17
-rw-r--r--WebCore/platform/text/String.cpp8
-rw-r--r--WebCore/platform/text/StringBuilder.cpp13
-rw-r--r--WebCore/platform/text/StringBuilder.h3
-rw-r--r--WebCore/platform/text/StringHash.h6
-rw-r--r--WebCore/platform/text/StringImpl.cpp3
-rw-r--r--WebCore/platform/text/StringImpl.h99
-rw-r--r--WebCore/platform/text/TextCodecICU.cpp2
-rw-r--r--WebCore/platform/text/TextEncoding.cpp2
-rw-r--r--WebCore/platform/text/TextEncodingDetectorICU.cpp2
-rw-r--r--WebCore/platform/text/TextEncodingRegistry.cpp6
-rw-r--r--WebCore/platform/text/TextStream.cpp9
-rw-r--r--WebCore/platform/text/TextStream.h3
-rw-r--r--WebCore/platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp19
-rw-r--r--WebCore/platform/text/qt/TextCodecQt.cpp2
-rw-r--r--WebCore/platform/text/wince/TextBreakIteratorWince.cpp3
-rw-r--r--WebCore/platform/win/ClipboardUtilitiesWin.cpp4
-rw-r--r--WebCore/platform/win/ClipboardWin.cpp12
-rw-r--r--WebCore/platform/win/CursorWin.cpp5
-rw-r--r--WebCore/platform/win/EventLoopWin.cpp2
-rw-r--r--WebCore/platform/win/FileSystemWin.cpp1
-rw-r--r--WebCore/platform/win/PlatformMouseEventWin.cpp4
-rw-r--r--WebCore/platform/win/PlatformScreenWin.cpp5
-rw-r--r--WebCore/platform/win/PopupMenuWin.cpp24
-rw-r--r--WebCore/platform/win/SharedBufferWin.cpp2
-rw-r--r--WebCore/platform/win/SystemInfo.cpp2
-rw-r--r--WebCore/platform/win/SystemTimeWin.cpp2
-rw-r--r--WebCore/platform/win/WidgetWin.cpp1
-rw-r--r--WebCore/platform/wince/MIMETypeRegistryWince.cpp1
-rw-r--r--WebCore/platform/wince/SearchPopupMenuWince.cpp1
-rw-r--r--WebCore/platform/wince/SharedTimerWince.cpp2
-rw-r--r--WebCore/platform/wx/ContextMenuWx.cpp2
-rw-r--r--WebCore/platform/wx/FileSystemWx.cpp6
-rw-r--r--WebCore/platform/wx/LocalizedStringsWx.cpp10
-rw-r--r--WebCore/platform/wx/RenderThemeWx.cpp8
-rw-r--r--WebCore/platform/wx/ScrollViewWx.cpp8
-rw-r--r--WebCore/plugins/MimeType.idl4
-rw-r--r--WebCore/plugins/MimeTypeArray.idl1
-rw-r--r--WebCore/plugins/Plugin.idl1
-rw-r--r--WebCore/plugins/PluginArray.idl1
-rw-r--r--WebCore/plugins/PluginDatabase.cpp4
-rw-r--r--WebCore/plugins/PluginDatabase.h4
-rw-r--r--WebCore/plugins/PluginPackage.cpp8
-rw-r--r--WebCore/plugins/PluginPackage.h10
-rw-r--r--WebCore/plugins/PluginView.cpp33
-rw-r--r--WebCore/plugins/PluginView.h28
-rw-r--r--WebCore/plugins/PluginWidget.h55
-rw-r--r--WebCore/plugins/gtk/PluginViewGtk.cpp534
-rw-r--r--WebCore/plugins/mac/PluginViewMac.cpp1
-rw-r--r--WebCore/plugins/mac/PluginWidgetMac.mm49
-rw-r--r--WebCore/plugins/qt/PluginDataQt.cpp1
-rw-r--r--WebCore/plugins/qt/PluginViewQt.cpp18
-rw-r--r--WebCore/plugins/symbian/PluginViewSymbian.cpp3
-rw-r--r--WebCore/plugins/win/PluginDatabaseWin.cpp6
-rw-r--r--WebCore/plugins/win/PluginPackageWin.cpp4
-rw-r--r--WebCore/plugins/win/PluginViewWin.cpp65
-rw-r--r--WebCore/rendering/AutoTableLayout.cpp6
-rw-r--r--WebCore/rendering/CounterNode.cpp96
-rw-r--r--WebCore/rendering/CounterNode.h14
-rw-r--r--WebCore/rendering/EllipsisBox.cpp43
-rw-r--r--WebCore/rendering/EllipsisBox.h6
-rw-r--r--WebCore/rendering/InlineFlowBox.cpp43
-rw-r--r--WebCore/rendering/InlineTextBox.cpp45
-rw-r--r--WebCore/rendering/InlineTextBox.h2
-rw-r--r--WebCore/rendering/RenderArena.cpp2
-rw-r--r--WebCore/rendering/RenderBR.cpp2
-rw-r--r--WebCore/rendering/RenderBlock.cpp131
-rw-r--r--WebCore/rendering/RenderBlock.h13
-rw-r--r--WebCore/rendering/RenderBlockLineLayout.cpp34
-rw-r--r--WebCore/rendering/RenderBox.cpp88
-rw-r--r--WebCore/rendering/RenderBox.h6
-rw-r--r--WebCore/rendering/RenderBoxModelObject.cpp171
-rw-r--r--WebCore/rendering/RenderBoxModelObject.h4
-rw-r--r--WebCore/rendering/RenderCounter.cpp191
-rw-r--r--WebCore/rendering/RenderCounter.h3
-rw-r--r--WebCore/rendering/RenderEmbeddedObject.cpp352
-rw-r--r--WebCore/rendering/RenderEmbeddedObject.h64
-rw-r--r--WebCore/rendering/RenderFileUploadControl.cpp6
-rw-r--r--WebCore/rendering/RenderFileUploadControl.h1
-rw-r--r--WebCore/rendering/RenderForeignObject.cpp11
-rw-r--r--WebCore/rendering/RenderForeignObject.h6
-rw-r--r--WebCore/rendering/RenderImage.cpp74
-rw-r--r--WebCore/rendering/RenderImage.h14
-rw-r--r--WebCore/rendering/RenderInline.cpp22
-rw-r--r--WebCore/rendering/RenderInline.h2
-rw-r--r--WebCore/rendering/RenderLayer.cpp114
-rw-r--r--WebCore/rendering/RenderLayer.h7
-rw-r--r--WebCore/rendering/RenderLayerBacking.cpp184
-rw-r--r--WebCore/rendering/RenderLayerBacking.h17
-rw-r--r--WebCore/rendering/RenderLayerCompositor.cpp119
-rw-r--r--WebCore/rendering/RenderLayerCompositor.h10
-rw-r--r--WebCore/rendering/RenderListItem.cpp49
-rw-r--r--WebCore/rendering/RenderListMarker.cpp609
-rw-r--r--WebCore/rendering/RenderListMarker.h1
-rw-r--r--WebCore/rendering/RenderMedia.cpp30
-rw-r--r--WebCore/rendering/RenderMedia.h9
-rw-r--r--WebCore/rendering/RenderMenuList.cpp76
-rw-r--r--WebCore/rendering/RenderMenuList.h6
-rw-r--r--WebCore/rendering/RenderObject.cpp92
-rw-r--r--WebCore/rendering/RenderObject.h17
-rw-r--r--WebCore/rendering/RenderPart.cpp1
-rw-r--r--WebCore/rendering/RenderPart.h4
-rw-r--r--WebCore/rendering/RenderPartObject.cpp268
-rw-r--r--WebCore/rendering/RenderPartObject.h4
-rw-r--r--WebCore/rendering/RenderPath.cpp274
-rw-r--r--WebCore/rendering/RenderPath.h18
-rw-r--r--WebCore/rendering/RenderReplaced.h2
-rw-r--r--WebCore/rendering/RenderReplica.h4
-rw-r--r--WebCore/rendering/RenderRuby.h20
-rw-r--r--WebCore/rendering/RenderRubyBase.cpp150
-rw-r--r--WebCore/rendering/RenderRubyBase.h12
-rw-r--r--WebCore/rendering/RenderRubyRun.cpp8
-rw-r--r--WebCore/rendering/RenderRubyRun.h11
-rw-r--r--WebCore/rendering/RenderSVGBlock.h2
-rw-r--r--WebCore/rendering/RenderSVGContainer.cpp59
-rw-r--r--WebCore/rendering/RenderSVGContainer.h11
-rw-r--r--WebCore/rendering/RenderSVGGradientStop.cpp2
-rw-r--r--WebCore/rendering/RenderSVGHiddenContainer.cpp12
-rw-r--r--WebCore/rendering/RenderSVGImage.cpp124
-rw-r--r--WebCore/rendering/RenderSVGImage.h13
-rw-r--r--WebCore/rendering/RenderSVGInline.h5
-rw-r--r--WebCore/rendering/RenderSVGModelObject.cpp1
-rw-r--r--WebCore/rendering/RenderSVGModelObject.h2
-rw-r--r--WebCore/rendering/RenderSVGRoot.cpp39
-rw-r--r--WebCore/rendering/RenderSVGRoot.h4
-rw-r--r--WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp101
-rw-r--r--WebCore/rendering/RenderSVGShadowTreeRootContainer.h50
-rw-r--r--WebCore/rendering/RenderSVGText.cpp27
-rw-r--r--WebCore/rendering/RenderSVGText.h5
-rw-r--r--WebCore/rendering/RenderSVGTransformableContainer.cpp16
-rw-r--r--WebCore/rendering/RenderSVGTransformableContainer.h2
-rw-r--r--WebCore/rendering/RenderSVGViewportContainer.cpp33
-rw-r--r--WebCore/rendering/RenderSVGViewportContainer.h15
-rw-r--r--WebCore/rendering/RenderTableCell.cpp4
-rw-r--r--WebCore/rendering/RenderTableCell.h2
-rw-r--r--WebCore/rendering/RenderTableSection.cpp5
-rw-r--r--WebCore/rendering/RenderText.cpp39
-rw-r--r--WebCore/rendering/RenderTextControl.cpp7
-rw-r--r--WebCore/rendering/RenderTextControl.h2
-rw-r--r--WebCore/rendering/RenderTextControlSingleLine.cpp8
-rw-r--r--WebCore/rendering/RenderTheme.cpp22
-rw-r--r--WebCore/rendering/RenderTheme.h7
-rw-r--r--WebCore/rendering/RenderThemeChromiumLinux.cpp40
-rw-r--r--WebCore/rendering/RenderThemeChromiumLinux.h15
-rw-r--r--WebCore/rendering/RenderThemeChromiumSkia.cpp22
-rw-r--r--WebCore/rendering/RenderThemeMac.mm5
-rw-r--r--WebCore/rendering/RenderThemeWince.cpp23
-rw-r--r--WebCore/rendering/RenderTreeAsText.cpp79
-rw-r--r--WebCore/rendering/RenderTreeAsText.h10
-rw-r--r--WebCore/rendering/RenderVideo.cpp158
-rw-r--r--WebCore/rendering/RenderVideo.h17
-rw-r--r--WebCore/rendering/RenderView.cpp11
-rw-r--r--WebCore/rendering/RenderView.h2
-rw-r--r--WebCore/rendering/RenderWidget.cpp23
-rw-r--r--WebCore/rendering/RootInlineBox.cpp1
-rw-r--r--WebCore/rendering/SVGCharacterLayoutInfo.h30
-rw-r--r--WebCore/rendering/SVGInlineTextBox.cpp47
-rw-r--r--WebCore/rendering/SVGInlineTextBox.h16
-rw-r--r--WebCore/rendering/SVGMarkerData.h134
-rw-r--r--WebCore/rendering/SVGMarkerLayoutInfo.cpp124
-rw-r--r--WebCore/rendering/SVGMarkerLayoutInfo.h74
-rw-r--r--WebCore/rendering/SVGRenderSupport.cpp102
-rw-r--r--WebCore/rendering/SVGRenderSupport.h20
-rw-r--r--WebCore/rendering/SVGRenderTreeAsText.cpp4
-rw-r--r--WebCore/rendering/SVGRootInlineBox.cpp79
-rw-r--r--WebCore/rendering/SVGRootInlineBox.h7
-rw-r--r--WebCore/rendering/SVGShadowTreeElements.cpp80
-rw-r--r--WebCore/rendering/SVGShadowTreeElements.h67
-rw-r--r--WebCore/rendering/TrailingFloatsRootInlineBox.h48
-rw-r--r--WebCore/rendering/TransformState.cpp2
-rw-r--r--WebCore/rendering/break_lines.cpp65
-rw-r--r--WebCore/rendering/style/FillLayer.cpp11
-rw-r--r--WebCore/rendering/style/FillLayer.h1
-rw-r--r--WebCore/rendering/style/RenderStyle.cpp2
-rw-r--r--WebCore/rendering/style/RenderStyle.h57
-rw-r--r--WebCore/rendering/style/RenderStyleConstants.h63
-rw-r--r--WebCore/rendering/style/SVGRenderStyle.cpp53
-rw-r--r--WebCore/rendering/style/SVGRenderStyle.h340
-rw-r--r--WebCore/rendering/style/StyleInheritedData.cpp5
-rw-r--r--WebCore/rendering/style/StyleInheritedData.h1
-rw-r--r--WebCore/storage/Database.cpp247
-rw-r--r--WebCore/storage/Database.h16
-rw-r--r--WebCore/storage/Database.idl3
-rw-r--r--WebCore/storage/DatabaseAuthorizer.cpp72
-rw-r--r--WebCore/storage/DatabaseAuthorizer.h5
-rw-r--r--WebCore/storage/DatabaseTask.h3
-rw-r--r--WebCore/storage/DatabaseThread.cpp12
-rw-r--r--WebCore/storage/DatabaseThread.h4
-rw-r--r--WebCore/storage/DatabaseTracker.cpp16
-rw-r--r--WebCore/storage/DatabaseTracker.h8
-rw-r--r--WebCore/storage/IDBDatabaseError.h64
-rw-r--r--WebCore/storage/IDBDatabaseError.idl37
-rw-r--r--WebCore/storage/IDBDatabaseException.h64
-rw-r--r--WebCore/storage/IDBDatabaseException.idl48
-rw-r--r--WebCore/storage/IDBRequest.cpp64
-rw-r--r--WebCore/storage/IDBRequest.h88
-rw-r--r--WebCore/storage/IDBRequest.idl45
-rw-r--r--WebCore/storage/IndexedDatabaseRequest.cpp53
-rw-r--r--WebCore/storage/IndexedDatabaseRequest.h65
-rw-r--r--WebCore/storage/IndexedDatabaseRequest.idl38
-rw-r--r--WebCore/storage/SQLError.idl3
-rw-r--r--WebCore/storage/SQLResultSet.idl3
-rw-r--r--WebCore/storage/SQLResultSetRowList.idl3
-rw-r--r--WebCore/storage/SQLTransaction.cpp5
-rw-r--r--WebCore/storage/SQLTransaction.idl3
-rw-r--r--WebCore/storage/SQLTransactionClient.cpp15
-rw-r--r--WebCore/storage/SQLTransactionClient.h4
-rw-r--r--WebCore/storage/SQLTransactionCoordinator.cpp6
-rw-r--r--WebCore/storage/SQLTransactionCoordinator.h4
-rw-r--r--WebCore/storage/Storage.idl1
-rw-r--r--WebCore/storage/StorageArea.h6
-rw-r--r--WebCore/storage/StorageAreaImpl.cpp23
-rw-r--r--WebCore/storage/StorageAreaImpl.h6
-rw-r--r--WebCore/storage/StorageEvent.cpp2
-rw-r--r--WebCore/storage/StorageEvent.idl3
-rw-r--r--WebCore/storage/StorageEventDispatcher.cpp8
-rw-r--r--WebCore/storage/StorageMap.cpp1
-rw-r--r--WebCore/storage/StorageNamespace.cpp3
-rw-r--r--WebCore/storage/StorageNamespace.h31
-rw-r--r--WebCore/storage/chromium/DatabaseTrackerChromium.cpp40
-rw-r--r--WebCore/storage/chromium/SQLTransactionClientChromium.cpp38
-rw-r--r--WebCore/svg/ElementTimeControl.idl2
-rw-r--r--WebCore/svg/SVGAElement.cpp22
-rw-r--r--WebCore/svg/SVGAElement.h9
-rw-r--r--WebCore/svg/SVGAllInOne.cpp13
-rw-r--r--WebCore/svg/SVGAltGlyphElement.cpp9
-rw-r--r--WebCore/svg/SVGAltGlyphElement.h6
-rw-r--r--WebCore/svg/SVGAngle.h16
-rw-r--r--WebCore/svg/SVGAngle.idl2
-rw-r--r--WebCore/svg/SVGAnimateMotionElement.cpp6
-rw-r--r--WebCore/svg/SVGAnimateTransformElement.cpp10
-rw-r--r--WebCore/svg/SVGAnimatedPathData.idl2
-rw-r--r--WebCore/svg/SVGAnimatedPoints.idl2
-rw-r--r--WebCore/svg/SVGAnimatedProperty.h597
-rw-r--r--WebCore/svg/SVGAnimatedPropertySynchronizer.h96
-rw-r--r--WebCore/svg/SVGAnimatedPropertyTraits.h186
-rw-r--r--WebCore/svg/SVGAnimatedTemplate.h133
-rw-r--r--WebCore/svg/SVGAnimationElement.cpp19
-rw-r--r--WebCore/svg/SVGAnimationElement.h7
-rw-r--r--WebCore/svg/SVGAnimationElement.idl2
-rw-r--r--WebCore/svg/SVGCircleElement.cpp29
-rw-r--r--WebCore/svg/SVGCircleElement.h11
-rw-r--r--WebCore/svg/SVGClipPathElement.cpp49
-rw-r--r--WebCore/svg/SVGClipPathElement.h12
-rw-r--r--WebCore/svg/SVGColor.idl2
-rw-r--r--WebCore/svg/SVGComponentTransferFunctionElement.cpp50
-rw-r--r--WebCore/svg/SVGComponentTransferFunctionElement.h19
-rw-r--r--WebCore/svg/SVGComponentTransferFunctionElement.idl2
-rw-r--r--WebCore/svg/SVGCursorElement.cpp28
-rw-r--r--WebCore/svg/SVGCursorElement.h11
-rw-r--r--WebCore/svg/SVGDefsElement.cpp9
-rw-r--r--WebCore/svg/SVGDefsElement.h5
-rw-r--r--WebCore/svg/SVGDocument.cpp2
-rw-r--r--WebCore/svg/SVGDocumentExtensions.h56
-rw-r--r--WebCore/svg/SVGElement.cpp100
-rw-r--r--WebCore/svg/SVGElement.h46
-rw-r--r--WebCore/svg/SVGElementInstance.cpp79
-rw-r--r--WebCore/svg/SVGElementInstance.h6
-rw-r--r--WebCore/svg/SVGElementRareData.h78
-rw-r--r--WebCore/svg/SVGEllipseElement.cpp34
-rw-r--r--WebCore/svg/SVGEllipseElement.h13
-rw-r--r--WebCore/svg/SVGException.idl3
-rw-r--r--WebCore/svg/SVGExternalResourcesRequired.cpp2
-rw-r--r--WebCore/svg/SVGExternalResourcesRequired.h3
-rw-r--r--WebCore/svg/SVGExternalResourcesRequired.idl2
-rw-r--r--WebCore/svg/SVGFEBlendElement.cpp23
-rw-r--r--WebCore/svg/SVGFEBlendElement.h7
-rw-r--r--WebCore/svg/SVGFEBlendElement.idl2
-rw-r--r--WebCore/svg/SVGFEColorMatrixElement.cpp24
-rw-r--r--WebCore/svg/SVGFEColorMatrixElement.h7
-rw-r--r--WebCore/svg/SVGFEColorMatrixElement.idl2
-rw-r--r--WebCore/svg/SVGFEComponentTransferElement.cpp9
-rw-r--r--WebCore/svg/SVGFEComponentTransferElement.h3
-rw-r--r--WebCore/svg/SVGFECompositeElement.cpp42
-rw-r--r--WebCore/svg/SVGFECompositeElement.h15
-rw-r--r--WebCore/svg/SVGFECompositeElement.idl2
-rw-r--r--WebCore/svg/SVGFEDiffuseLightingElement.cpp32
-rw-r--r--WebCore/svg/SVGFEDiffuseLightingElement.h11
-rw-r--r--WebCore/svg/SVGFEDisplacementMapElement.cpp32
-rw-r--r--WebCore/svg/SVGFEDisplacementMapElement.h11
-rw-r--r--WebCore/svg/SVGFEDisplacementMapElement.idl2
-rw-r--r--WebCore/svg/SVGFEFloodElement.idl2
-rw-r--r--WebCore/svg/SVGFEGaussianBlurElement.cpp21
-rw-r--r--WebCore/svg/SVGFEGaussianBlurElement.h7
-rw-r--r--WebCore/svg/SVGFEImageElement.cpp77
-rw-r--r--WebCore/svg/SVGFEImageElement.h19
-rw-r--r--WebCore/svg/SVGFEImageElement.idl9
-rw-r--r--WebCore/svg/SVGFELightElement.cpp55
-rw-r--r--WebCore/svg/SVGFELightElement.h23
-rw-r--r--WebCore/svg/SVGFEMergeElement.cpp2
-rw-r--r--WebCore/svg/SVGFEMergeNodeElement.cpp9
-rw-r--r--WebCore/svg/SVGFEMergeNodeElement.h3
-rw-r--r--WebCore/svg/SVGFEMorphologyElement.cpp27
-rw-r--r--WebCore/svg/SVGFEMorphologyElement.h9
-rw-r--r--WebCore/svg/SVGFEMorphologyElement.idl2
-rw-r--r--WebCore/svg/SVGFEOffsetElement.cpp22
-rw-r--r--WebCore/svg/SVGFEOffsetElement.h7
-rw-r--r--WebCore/svg/SVGFESpecularLightingElement.cpp37
-rw-r--r--WebCore/svg/SVGFESpecularLightingElement.h15
-rw-r--r--WebCore/svg/SVGFETileElement.cpp9
-rw-r--r--WebCore/svg/SVGFETileElement.h3
-rw-r--r--WebCore/svg/SVGFETurbulenceElement.cpp36
-rw-r--r--WebCore/svg/SVGFETurbulenceElement.h13
-rw-r--r--WebCore/svg/SVGFETurbulenceElement.idl2
-rw-r--r--WebCore/svg/SVGFilterElement.cpp74
-rw-r--r--WebCore/svg/SVGFilterElement.h29
-rw-r--r--WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp36
-rw-r--r--WebCore/svg/SVGFilterPrimitiveStandardAttributes.h13
-rw-r--r--WebCore/svg/SVGFitToViewBox.cpp11
-rw-r--r--WebCore/svg/SVGFitToViewBox.h11
-rw-r--r--WebCore/svg/SVGFitToViewBox.idl2
-rw-r--r--WebCore/svg/SVGFont.cpp6
-rw-r--r--WebCore/svg/SVGFontElement.cpp9
-rw-r--r--WebCore/svg/SVGFontElement.h5
-rw-r--r--WebCore/svg/SVGFontFaceElement.cpp9
-rw-r--r--WebCore/svg/SVGFontFaceUriElement.cpp8
-rw-r--r--WebCore/svg/SVGForeignObjectElement.cpp38
-rw-r--r--WebCore/svg/SVGForeignObjectElement.h15
-rw-r--r--WebCore/svg/SVGGElement.cpp9
-rw-r--r--WebCore/svg/SVGGElement.h9
-rw-r--r--WebCore/svg/SVGGlyphElement.cpp4
-rw-r--r--WebCore/svg/SVGGradientElement.cpp36
-rw-r--r--WebCore/svg/SVGGradientElement.h18
-rw-r--r--WebCore/svg/SVGGradientElement.idl2
-rw-r--r--WebCore/svg/SVGHKernElement.cpp4
-rw-r--r--WebCore/svg/SVGImageElement.cpp50
-rw-r--r--WebCore/svg/SVGImageElement.h17
-rw-r--r--WebCore/svg/SVGLangSpace.idl2
-rw-r--r--WebCore/svg/SVGLength.idl2
-rw-r--r--WebCore/svg/SVGLineElement.cpp34
-rw-r--r--WebCore/svg/SVGLineElement.h13
-rw-r--r--WebCore/svg/SVGLinearGradientElement.cpp30
-rw-r--r--WebCore/svg/SVGLinearGradientElement.h9
-rw-r--r--WebCore/svg/SVGList.h2
-rw-r--r--WebCore/svg/SVGLocatable.idl2
-rw-r--r--WebCore/svg/SVGMPathElement.cpp18
-rw-r--r--WebCore/svg/SVGMPathElement.h7
-rw-r--r--WebCore/svg/SVGMarkerElement.cpp89
-rw-r--r--WebCore/svg/SVGMarkerElement.h30
-rw-r--r--WebCore/svg/SVGMarkerElement.idl2
-rw-r--r--WebCore/svg/SVGMaskElement.cpp197
-rw-r--r--WebCore/svg/SVGMaskElement.h29
-rw-r--r--WebCore/svg/SVGNumberList.cpp2
-rw-r--r--WebCore/svg/SVGNumberList.h2
-rw-r--r--WebCore/svg/SVGPaint.idl2
-rw-r--r--WebCore/svg/SVGPathElement.cpp18
-rw-r--r--WebCore/svg/SVGPathElement.h7
-rw-r--r--WebCore/svg/SVGPathSeg.idl2
-rw-r--r--WebCore/svg/SVGPatternElement.cpp62
-rw-r--r--WebCore/svg/SVGPatternElement.h28
-rw-r--r--WebCore/svg/SVGPointList.idl14
-rw-r--r--WebCore/svg/SVGPolyElement.cpp44
-rw-r--r--WebCore/svg/SVGPolyElement.h7
-rw-r--r--WebCore/svg/SVGPreserveAspectRatio.cpp121
-rw-r--r--WebCore/svg/SVGPreserveAspectRatio.h33
-rw-r--r--WebCore/svg/SVGPreserveAspectRatio.idl2
-rw-r--r--WebCore/svg/SVGRadialGradientElement.cpp59
-rw-r--r--WebCore/svg/SVGRadialGradientElement.h11
-rw-r--r--WebCore/svg/SVGRectElement.cpp44
-rw-r--r--WebCore/svg/SVGRectElement.h17
-rw-r--r--WebCore/svg/SVGRenderingIntent.idl2
-rw-r--r--WebCore/svg/SVGSVGElement.cpp85
-rw-r--r--WebCore/svg/SVGSVGElement.h27
-rw-r--r--WebCore/svg/SVGScriptElement.cpp18
-rw-r--r--WebCore/svg/SVGScriptElement.h7
-rw-r--r--WebCore/svg/SVGStopElement.cpp10
-rw-r--r--WebCore/svg/SVGStopElement.h4
-rw-r--r--WebCore/svg/SVGStylable.idl2
-rw-r--r--WebCore/svg/SVGStyleElement.cpp14
-rw-r--r--WebCore/svg/SVGStyledElement.cpp91
-rw-r--r--WebCore/svg/SVGStyledElement.h27
-rw-r--r--WebCore/svg/SVGStyledTransformableElement.cpp26
-rw-r--r--WebCore/svg/SVGStyledTransformableElement.h6
-rw-r--r--WebCore/svg/SVGSwitchElement.cpp13
-rw-r--r--WebCore/svg/SVGSwitchElement.h5
-rw-r--r--WebCore/svg/SVGSymbolElement.cpp32
-rw-r--r--WebCore/svg/SVGSymbolElement.h11
-rw-r--r--WebCore/svg/SVGTRefElement.cpp25
-rw-r--r--WebCore/svg/SVGTRefElement.h4
-rw-r--r--WebCore/svg/SVGTests.idl2
-rw-r--r--WebCore/svg/SVGTextContentElement.cpp26
-rw-r--r--WebCore/svg/SVGTextContentElement.h11
-rw-r--r--WebCore/svg/SVGTextContentElement.idl2
-rw-r--r--WebCore/svg/SVGTextElement.cpp35
-rw-r--r--WebCore/svg/SVGTextElement.h4
-rw-r--r--WebCore/svg/SVGTextPathElement.cpp31
-rw-r--r--WebCore/svg/SVGTextPathElement.h9
-rw-r--r--WebCore/svg/SVGTextPathElement.idl2
-rw-r--r--WebCore/svg/SVGTextPositioningElement.cpp49
-rw-r--r--WebCore/svg/SVGTextPositioningElement.h14
-rw-r--r--WebCore/svg/SVGTransform.h6
-rw-r--r--WebCore/svg/SVGTransform.idl2
-rw-r--r--WebCore/svg/SVGTransformList.idl14
-rw-r--r--WebCore/svg/SVGTransformable.cpp16
-rw-r--r--WebCore/svg/SVGTransformable.h7
-rw-r--r--WebCore/svg/SVGTransformable.idl2
-rw-r--r--WebCore/svg/SVGURIReference.cpp2
-rw-r--r--WebCore/svg/SVGURIReference.h3
-rw-r--r--WebCore/svg/SVGURIReference.idl2
-rw-r--r--WebCore/svg/SVGUnitTypes.idl2
-rw-r--r--WebCore/svg/SVGUseElement.cpp511
-rw-r--r--WebCore/svg/SVGUseElement.h50
-rw-r--r--WebCore/svg/SVGViewElement.cpp22
-rw-r--r--WebCore/svg/SVGViewElement.h9
-rw-r--r--WebCore/svg/SVGViewSpec.cpp12
-rw-r--r--WebCore/svg/SVGViewSpec.h6
-rw-r--r--WebCore/svg/SVGZoomAndPan.idl2
-rw-r--r--WebCore/svg/SynchronizablePropertyController.cpp145
-rw-r--r--WebCore/svg/SynchronizablePropertyController.h84
-rw-r--r--WebCore/svg/SynchronizableTypeWrapper.h180
-rw-r--r--WebCore/svg/animation/SMILTimeContainer.h1
-rw-r--r--WebCore/svg/graphics/SVGImage.cpp10
-rw-r--r--WebCore/svg/graphics/SVGImage.h2
-rw-r--r--WebCore/svg/graphics/SVGPaintServer.cpp8
-rw-r--r--WebCore/svg/graphics/SVGPaintServer.h3
-rw-r--r--WebCore/svg/graphics/SVGPaintServerGradient.cpp2
-rw-r--r--WebCore/svg/graphics/SVGPaintServerPattern.cpp2
-rw-r--r--WebCore/svg/graphics/SVGResource.cpp93
-rw-r--r--WebCore/svg/graphics/SVGResource.h3
-rw-r--r--WebCore/svg/graphics/SVGResourceClipper.cpp37
-rw-r--r--WebCore/svg/graphics/SVGResourceClipper.h13
-rw-r--r--WebCore/svg/graphics/SVGResourceFilter.cpp49
-rw-r--r--WebCore/svg/graphics/SVGResourceFilter.h6
-rw-r--r--WebCore/svg/graphics/SVGResourceMarker.cpp71
-rw-r--r--WebCore/svg/graphics/SVGResourceMarker.h27
-rw-r--r--WebCore/svg/graphics/SVGResourceMasker.cpp53
-rw-r--r--WebCore/svg/graphics/SVGResourceMasker.h9
-rw-r--r--WebCore/svg/graphics/filters/SVGFEImage.cpp47
-rw-r--r--WebCore/svg/graphics/filters/SVGFEImage.h22
-rw-r--r--WebCore/svg/graphics/filters/SVGFEMerge.cpp8
-rw-r--r--WebCore/svg/graphics/filters/SVGFEMerge.h10
-rw-r--r--WebCore/svg/graphics/filters/SVGFEMorphology.cpp2
-rw-r--r--WebCore/svg/graphics/filters/SVGFEOffset.cpp2
-rw-r--r--WebCore/svg/graphics/filters/SVGFETile.cpp2
-rw-r--r--WebCore/svg/graphics/filters/SVGFilterBuilder.cpp4
-rw-r--r--WebCore/svg/svgattrs.in1
-rw-r--r--WebCore/svg/svgtags.in1
-rw-r--r--WebCore/svg/xlinkattrs.in1
-rw-r--r--WebCore/webcore-base.bkl139
-rw-r--r--WebCore/webcore-wx.bkl148
-rw-r--r--WebCore/websockets/ThreadableWebSocketChannel.cpp (renamed from WebCore/platform/network/qt/SocketStreamHandleSoup.cpp)74
-rw-r--r--WebCore/websockets/ThreadableWebSocketChannel.h69
-rw-r--r--WebCore/websockets/ThreadableWebSocketChannelClientWrapper.h127
-rw-r--r--WebCore/websockets/WebSocket.cpp36
-rw-r--r--WebCore/websockets/WebSocket.h20
-rw-r--r--WebCore/websockets/WebSocket.idl1
-rw-r--r--WebCore/websockets/WebSocketChannel.cpp8
-rw-r--r--WebCore/websockets/WebSocketChannel.h28
-rw-r--r--WebCore/websockets/WebSocketChannelClient.h6
-rw-r--r--WebCore/websockets/WebSocketHandshake.cpp64
-rw-r--r--WebCore/websockets/WebSocketHandshake.h6
-rw-r--r--WebCore/websockets/WorkerThreadableWebSocketChannel.cpp362
-rw-r--r--WebCore/websockets/WorkerThreadableWebSocketChannel.h155
-rw-r--r--WebCore/wml/WMLCardElement.cpp2
-rw-r--r--WebCore/wml/WMLDocument.cpp3
-rw-r--r--WebCore/wml/WMLElement.cpp2
-rw-r--r--WebCore/wml/WMLInputElement.cpp14
-rw-r--r--WebCore/wml/WMLInputElement.h4
-rw-r--r--WebCore/wml/WMLPageState.cpp1
-rw-r--r--WebCore/wml/WMLPageState.h1
-rw-r--r--WebCore/wml/WMLSelectElement.cpp1
-rw-r--r--WebCore/workers/AbstractWorker.idl3
-rw-r--r--WebCore/workers/DedicatedWorkerContext.idl3
-rw-r--r--WebCore/workers/SharedWorker.idl1
-rw-r--r--WebCore/workers/SharedWorkerContext.idl3
-rw-r--r--WebCore/workers/Worker.idl1
-rw-r--r--WebCore/workers/WorkerContext.cpp22
-rw-r--r--WebCore/workers/WorkerContext.h18
-rw-r--r--WebCore/workers/WorkerContext.idl6
-rw-r--r--WebCore/workers/WorkerLocation.idl1
-rw-r--r--WebCore/workers/WorkerRunLoop.cpp11
-rw-r--r--WebCore/workers/WorkerThread.cpp61
-rw-r--r--WebCore/wscript3
-rw-r--r--WebCore/xml/DOMParser.idl2
-rw-r--r--WebCore/xml/XMLHttpRequest.cpp4
-rw-r--r--WebCore/xml/XMLHttpRequest.h4
-rw-r--r--WebCore/xml/XMLHttpRequest.idl1
-rw-r--r--WebCore/xml/XMLHttpRequestException.idl1
-rw-r--r--WebCore/xml/XMLHttpRequestProgressEvent.idl1
-rw-r--r--WebCore/xml/XMLHttpRequestUpload.idl1
-rw-r--r--WebCore/xml/XMLSerializer.idl2
-rw-r--r--WebCore/xml/XPathEvaluator.idl2
-rw-r--r--WebCore/xml/XPathException.idl1
-rw-r--r--WebCore/xml/XPathExpression.idl3
-rw-r--r--WebCore/xml/XPathNSResolver.idl2
-rw-r--r--WebCore/xml/XPathResult.idl2
-rw-r--r--WebCore/xml/XPathStep.cpp5
-rw-r--r--WebCore/xml/XSLImportRule.cpp14
-rw-r--r--WebCore/xml/XSLImportRule.h2
-rw-r--r--WebCore/xml/XSLStyleSheet.h16
-rw-r--r--WebCore/xml/XSLStyleSheetLibxslt.cpp12
-rw-r--r--WebCore/xml/XSLStyleSheetQt.cpp4
-rw-r--r--WebCore/xml/XSLTProcessor.idl3
-rw-r--r--WebCore/xml/XSLTProcessorLibxslt.cpp3
-rw-r--r--WebCore/xml/XSLTProcessorQt.cpp34
-rw-r--r--WebCore/xml/xmlnsattrs.in4
-rw-r--r--WebKit/ChangeLog73
-rw-r--r--WebKit/English.lproj/Localizable.stringsbin50798 -> 51324 bytes
-rw-r--r--WebKit/StringsNotToBeLocalized.txt40
-rw-r--r--WebKit/WebKit.xcodeproj/project.pbxproj87
-rw-r--r--WebKit/cf/ChangeLog12
-rw-r--r--WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp2
-rw-r--r--WebKit/chromium/ChangeLog1403
-rw-r--r--WebKit/chromium/WebKit.gyp65
-rw-r--r--WebKit/chromium/features.gypi2
-rw-r--r--WebKit/chromium/public/WebAccessibilityObject.h2
-rw-r--r--WebKit/chromium/public/WebAccessibilityRole.h6
-rw-r--r--WebKit/chromium/public/WebAnimationController.h60
-rw-r--r--WebKit/chromium/public/WebDataSource.h4
-rw-r--r--WebKit/chromium/public/WebDevToolsAgent.h12
-rw-r--r--WebKit/chromium/public/WebDevToolsAgentClient.h16
-rw-r--r--WebKit/chromium/public/WebDevToolsFrontend.h5
-rw-r--r--WebKit/chromium/public/WebDevToolsFrontendClient.h5
-rw-r--r--WebKit/chromium/public/WebDocument.h82
-rw-r--r--WebKit/chromium/public/WebDragData.h3
-rw-r--r--WebKit/chromium/public/WebElement.h12
-rw-r--r--WebKit/chromium/public/WebEvent.h116
-rw-r--r--WebKit/chromium/public/WebEventListener.h66
-rw-r--r--WebKit/chromium/public/WebFileChooserParams.h64
-rw-r--r--WebKit/chromium/public/WebFormElement.h6
-rw-r--r--WebKit/chromium/public/WebFrame.h40
-rw-r--r--WebKit/chromium/public/WebFrameClient.h6
-rw-r--r--WebKit/chromium/public/WebGlyphCache.h51
-rw-r--r--WebKit/chromium/public/WebHistoryItem.h3
-rw-r--r--WebKit/chromium/public/WebInputElement.h1
-rw-r--r--WebKit/chromium/public/WebKit.h3
-rw-r--r--WebKit/chromium/public/WebKitClient.h20
-rw-r--r--WebKit/chromium/public/WebMutationEvent.h58
-rw-r--r--WebKit/chromium/public/WebNode.h46
-rw-r--r--WebKit/chromium/public/WebNodeCollection.h75
-rw-r--r--WebKit/chromium/public/WebNodeList.h74
-rw-r--r--WebKit/chromium/public/WebNotificationPresenter.h7
-rw-r--r--WebKit/chromium/public/WebPageSerializer.h85
-rw-r--r--WebKit/chromium/public/WebPageSerializerClient.h75
-rw-r--r--WebKit/chromium/public/WebRuntimeFeatures.h6
-rw-r--r--WebKit/chromium/public/WebSecurityOrigin.h2
-rw-r--r--WebKit/chromium/public/WebSecurityPolicy.h4
-rw-r--r--WebKit/chromium/public/WebSettings.h1
-rw-r--r--WebKit/chromium/public/WebStorageArea.h35
-rw-r--r--WebKit/chromium/public/WebString.h25
-rw-r--r--WebKit/chromium/public/WebURLResponse.h5
-rw-r--r--WebKit/chromium/public/WebVector.h7
-rw-r--r--WebKit/chromium/public/WebView.h16
-rw-r--r--WebKit/chromium/public/WebViewClient.h13
-rw-r--r--WebKit/chromium/src/ApplicationCacheHost.cpp50
-rw-r--r--WebKit/chromium/src/ApplicationCacheHostInternal.h70
-rw-r--r--WebKit/chromium/src/AssertMatchingEnums.cpp19
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.cpp26
-rw-r--r--WebKit/chromium/src/ChromiumBridge.cpp17
-rw-r--r--WebKit/chromium/src/ContextMenuClientImpl.cpp6
-rw-r--r--WebKit/chromium/src/DOMUtilitiesPrivate.cpp49
-rw-r--r--WebKit/chromium/src/DOMUtilitiesPrivate.h12
-rw-r--r--WebKit/chromium/src/DragClientImpl.cpp4
-rw-r--r--WebKit/chromium/src/EditorClientImpl.cpp24
-rw-r--r--WebKit/chromium/src/EventListenerWrapper.cpp72
-rw-r--r--WebKit/chromium/src/EventListenerWrapper.h62
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.cpp18
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.h4
-rw-r--r--WebKit/chromium/src/GraphicsContext3D.cpp442
-rw-r--r--WebKit/chromium/src/LocalizedStrings.cpp10
-rw-r--r--WebKit/chromium/src/NotificationPresenterImpl.cpp11
-rw-r--r--WebKit/chromium/src/NotificationPresenterImpl.h2
-rw-r--r--WebKit/chromium/src/PlatformMessagePortChannel.cpp4
-rw-r--r--WebKit/chromium/src/StorageAreaProxy.cpp69
-rw-r--r--WebKit/chromium/src/StorageAreaProxy.h14
-rw-r--r--WebKit/chromium/src/StorageNamespaceProxy.cpp27
-rw-r--r--WebKit/chromium/src/StorageNamespaceProxy.h4
-rw-r--r--WebKit/chromium/src/WebAccessibilityObject.cpp4
-rw-r--r--WebKit/chromium/src/WebAnimationControllerImpl.cpp90
-rw-r--r--WebKit/chromium/src/WebAnimationControllerImpl.h64
-rw-r--r--WebKit/chromium/src/WebBindings.cpp11
-rw-r--r--WebKit/chromium/src/WebDataSourceImpl.cpp9
-rw-r--r--WebKit/chromium/src/WebDataSourceImpl.h2
-rw-r--r--WebKit/chromium/src/WebDocument.cpp150
-rw-r--r--WebKit/chromium/src/WebDragData.cpp12
-rw-r--r--WebKit/chromium/src/WebElement.cpp33
-rw-r--r--WebKit/chromium/src/WebEntities.cpp133
-rw-r--r--WebKit/chromium/src/WebEntities.h75
-rw-r--r--WebKit/chromium/src/WebEvent.cpp219
-rw-r--r--WebKit/chromium/src/WebEventListener.cpp64
-rw-r--r--WebKit/chromium/src/WebEventListenerPrivate.cpp87
-rw-r--r--WebKit/chromium/src/WebEventListenerPrivate.h95
-rw-r--r--WebKit/chromium/src/WebFrameImpl.cpp104
-rw-r--r--WebKit/chromium/src/WebFrameImpl.h19
-rw-r--r--WebKit/chromium/src/WebGlyphCache.cpp45
-rw-r--r--WebKit/chromium/src/WebHistoryItem.cpp12
-rw-r--r--WebKit/chromium/src/WebInputElement.cpp5
-rw-r--r--WebKit/chromium/src/WebKit.cpp8
-rw-r--r--WebKit/chromium/src/WebMutationEvent.cpp65
-rw-r--r--WebKit/chromium/src/WebNode.cpp100
-rw-r--r--WebKit/chromium/src/WebNodeCollection.cpp85
-rw-r--r--WebKit/chromium/src/WebNodeList.cpp80
-rw-r--r--WebKit/chromium/src/WebPageSerializer.cpp81
-rw-r--r--WebKit/chromium/src/WebPageSerializerImpl.cpp547
-rw-r--r--WebKit/chromium/src/WebPageSerializerImpl.h199
-rw-r--r--WebKit/chromium/src/WebPluginContainerImpl.cpp5
-rw-r--r--WebKit/chromium/src/WebRuntimeFeatures.cpp37
-rw-r--r--WebKit/chromium/src/WebSecurityOrigin.cpp5
-rw-r--r--WebKit/chromium/src/WebSecurityPolicy.cpp5
-rw-r--r--WebKit/chromium/src/WebSettingsImpl.cpp5
-rw-r--r--WebKit/chromium/src/WebSettingsImpl.h1
-rw-r--r--WebKit/chromium/src/WebStorageAreaImpl.cpp12
-rw-r--r--WebKit/chromium/src/WebStorageAreaImpl.h6
-rw-r--r--WebKit/chromium/src/WebString.cpp5
-rw-r--r--WebKit/chromium/src/WebURLResponse.cpp10
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp98
-rw-r--r--WebKit/chromium/src/WebViewImpl.h4
-rw-r--r--WebKit/chromium/src/WebWorkerBase.cpp5
-rw-r--r--WebKit/chromium/src/WebWorkerClientImpl.cpp6
-rw-r--r--WebKit/chromium/src/WebWorkerImpl.cpp2
-rw-r--r--WebKit/chromium/src/mac/WebInputEventFactory.mm3
-rw-r--r--WebKit/chromium/tests/KURLTest.cpp611
-rw-r--r--WebKit/chromium/tests/KeyboardTest.cpp213
-rw-r--r--WebKit/chromium/tests/RunAllTests.cpp50
-rw-r--r--WebKit/gtk/ChangeLog624
-rw-r--r--WebKit/gtk/NEWS46
-rw-r--r--WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp37
-rw-r--r--WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp13
-rw-r--r--WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp46
-rw-r--r--WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp42
-rw-r--r--WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h2
-rw-r--r--WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp8
-rw-r--r--WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp103
-rw-r--r--WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h2
-rw-r--r--WebKit/gtk/docs/webkitgtk-docs.sgml4
-rw-r--r--WebKit/gtk/docs/webkitgtk-sections.txt9
-rw-r--r--WebKit/gtk/tests/testatk.c100
-rw-r--r--WebKit/gtk/tests/testdownload.c43
-rw-r--r--WebKit/gtk/tests/testloading.c209
-rw-r--r--WebKit/gtk/tests/testmimehandling.c30
-rw-r--r--WebKit/gtk/tests/testwebdatasource.c49
-rw-r--r--WebKit/gtk/tests/testwebresource.c29
-rw-r--r--WebKit/gtk/tests/testwebview.c29
-rw-r--r--WebKit/gtk/tests/testwindow.c12
-rw-r--r--WebKit/gtk/webkit/webkitdownload.cpp20
-rw-r--r--WebKit/gtk/webkit/webkitprivate.cpp14
-rw-r--r--WebKit/gtk/webkit/webkitprivate.h4
-rw-r--r--WebKit/gtk/webkit/webkitwebframe.cpp37
-rw-r--r--WebKit/gtk/webkit/webkitwebhistoryitem.cpp27
-rw-r--r--WebKit/gtk/webkit/webkitwebhistoryitem.h3
-rw-r--r--WebKit/gtk/webkit/webkitwebnavigationaction.cpp9
-rw-r--r--WebKit/gtk/webkit/webkitwebresource.cpp6
-rw-r--r--WebKit/gtk/webkit/webkitwebsettings.cpp113
-rw-r--r--WebKit/gtk/webkit/webkitwebview.cpp232
-rw-r--r--WebKit/gtk/webkit/webkitwebview.h11
-rw-r--r--WebKit/mac/ChangeLog4
-rw-r--r--WebKit/mac/ChangeLog-2010-01-2923230
-rw-r--r--WebKit/mac/Configurations/FeatureDefines.xcconfig12
-rw-r--r--WebKit/mac/Configurations/Version.xcconfig2
-rw-r--r--WebKit/mac/Info.plist4
-rw-r--r--WebKit/mac/MigrateHeaders.make2
-rw-r--r--WebKit/mac/Misc/WebCache.mm2
-rw-r--r--WebKit/mac/Misc/WebElementDictionary.mm8
-rw-r--r--WebKit/mac/Misc/WebKitErrors.m7
-rw-r--r--WebKit/mac/Misc/WebKitErrorsPrivate.h9
-rw-r--r--WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.h2
-rw-r--r--WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm2
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h6
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm20
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h19
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm107
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h20
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm75
-rw-r--r--WebKit/mac/Plugins/Hosted/ProxyInstance.h22
-rw-r--r--WebKit/mac/Plugins/Hosted/ProxyInstance.mm23
-rw-r--r--WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h3
-rw-r--r--WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm36
-rw-r--r--WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs10
-rw-r--r--WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs3
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginView.h4
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginView.mm65
-rw-r--r--WebKit/mac/WebCoreSupport/WebApplicationCache.mm4
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.h2
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.mm24
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm14
-rw-r--r--WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.h47
-rw-r--r--WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.mm60
-rw-r--r--WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm2
-rw-r--r--WebKit/mac/WebCoreSupport/WebSystemInterface.m8
-rw-r--r--WebKit/mac/WebCoreSupport/WebViewFactory.mm10
-rw-r--r--WebKit/mac/WebKit.exp1
-rw-r--r--WebKit/mac/WebKitPrefix.h1
-rw-r--r--WebKit/mac/WebView/WebDataSource.mm4
-rw-r--r--WebKit/mac/WebView/WebFrame.mm12
-rw-r--r--WebKit/mac/WebView/WebFrameView.mm9
-rw-r--r--WebKit/mac/WebView/WebGeolocationPosition.h35
-rw-r--r--WebKit/mac/WebView/WebGeolocationPosition.mm86
-rw-r--r--WebKit/mac/WebView/WebGeolocationPositionInternal.h36
-rw-r--r--WebKit/mac/WebView/WebHTMLRepresentation.h13
-rw-r--r--WebKit/mac/WebView/WebHTMLRepresentation.mm23
-rw-r--r--WebKit/mac/WebView/WebHTMLView.mm29
-rw-r--r--WebKit/mac/WebView/WebPreferenceKeysPrivate.h1
-rw-r--r--WebKit/mac/WebView/WebPreferences.mm15
-rw-r--r--WebKit/mac/WebView/WebPreferencesPrivate.h3
-rw-r--r--WebKit/mac/WebView/WebScriptDebugger.h2
-rw-r--r--WebKit/mac/WebView/WebScriptDebugger.mm2
-rw-r--r--WebKit/mac/WebView/WebScriptWorld.h5
-rw-r--r--WebKit/mac/WebView/WebScriptWorld.mm7
-rw-r--r--WebKit/mac/WebView/WebVideoFullscreenController.mm1
-rw-r--r--WebKit/mac/WebView/WebView.mm70
-rw-r--r--WebKit/mac/WebView/WebViewData.h3
-rw-r--r--WebKit/mac/WebView/WebViewData.mm4
-rw-r--r--WebKit/mac/WebView/WebViewPrivate.h18
-rw-r--r--WebKit/qt/Api/qgraphicswebview.cpp186
-rw-r--r--WebKit/qt/Api/qgraphicswebview.h3
-rw-r--r--WebKit/qt/Api/qwebframe.cpp109
-rw-r--r--WebKit/qt/Api/qwebframe.h1
-rw-r--r--WebKit/qt/Api/qwebframe_p.h2
-rw-r--r--WebKit/qt/Api/qwebinspector.cpp9
-rw-r--r--WebKit/qt/Api/qwebinspector.h1
-rw-r--r--WebKit/qt/Api/qwebpage.cpp102
-rw-r--r--WebKit/qt/Api/qwebpage_p.h5
-rw-r--r--WebKit/qt/Api/qwebsecurityorigin.cpp5
-rw-r--r--WebKit/qt/Api/qwebsettings.cpp24
-rw-r--r--WebKit/qt/Api/qwebsettings.h4
-rw-r--r--WebKit/qt/Api/qwebview.cpp122
-rw-r--r--WebKit/qt/Api/qwebview.h5
-rw-r--r--WebKit/qt/ChangeLog1023
-rw-r--r--WebKit/qt/QGVLauncher/main.cpp69
-rw-r--r--WebKit/qt/QtLauncher/QtLauncher.pro16
-rw-r--r--WebKit/qt/QtLauncher/main.cpp656
-rw-r--r--WebKit/qt/WebCoreSupport/ChromeClientQt.cpp53
-rw-r--r--WebKit/qt/WebCoreSupport/ChromeClientQt.h16
-rw-r--r--WebKit/qt/WebCoreSupport/DragClientQt.cpp39
-rw-r--r--WebKit/qt/WebCoreSupport/EditorClientQt.cpp7
-rw-r--r--WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp15
-rw-r--r--WebKit/qt/WebCoreSupport/InspectorClientQt.cpp4
-rw-r--r--WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp165
-rw-r--r--WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h (renamed from WebCore/platform/qt/QWebPopup.h)42
-rw-r--r--WebKit/qt/docs/qtwebkit.qdocconf2
-rw-r--r--WebKit/qt/docs/webkitsnippets/webelement/main.cpp4
-rw-r--r--WebKit/qt/symbian/backup_registration.xml5
-rw-r--r--WebKit/qt/symbian/bwins/QtWebKitu.def627
-rw-r--r--WebKit/qt/symbian/eabi/QtWebKitu.def699
-rw-r--r--WebKit/qt/tests/benchmarks/loading/loading.pro1
-rw-r--r--WebKit/qt/tests/benchmarks/loading/tst_loading.pro11
-rw-r--r--WebKit/qt/tests/benchmarks/painting/painting.pro1
-rw-r--r--WebKit/qt/tests/benchmarks/painting/tst_painting.pro11
-rw-r--r--WebKit/qt/tests/hybridPixmap/hybridPixmap.pro10
-rw-r--r--WebKit/qt/tests/hybridPixmap/resources.qrc5
-rw-r--r--WebKit/qt/tests/hybridPixmap/test.html57
-rw-r--r--WebKit/qt/tests/hybridPixmap/tst_hybridPixmap.cpp52
-rw-r--r--WebKit/qt/tests/hybridPixmap/widget.cpp119
-rw-r--r--WebKit/qt/tests/hybridPixmap/widget.h70
-rw-r--r--WebKit/qt/tests/hybridPixmap/widget.ui95
-rw-r--r--WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro11
-rw-r--r--WebKit/qt/tests/qwebelement/qwebelement.pro13
-rw-r--r--WebKit/qt/tests/qwebelement/qwebelement.qrc7
-rw-r--r--WebKit/qt/tests/qwebelement/resources/image.png (renamed from WebKit/qt/tests/qwebelement/image.png)bin14743 -> 14743 bytes
-rw-r--r--WebKit/qt/tests/qwebelement/resources/style.css (renamed from WebKit/qt/tests/qwebelement/style.css)0
-rw-r--r--WebKit/qt/tests/qwebelement/resources/style2.css (renamed from WebKit/qt/tests/qwebelement/style2.css)0
-rw-r--r--WebKit/qt/tests/qwebelement/tst_qwebelement.cpp30
-rw-r--r--WebKit/qt/tests/qwebelement/tst_qwebelement.qrc7
-rw-r--r--WebKit/qt/tests/qwebframe/qwebframe.pro14
-rw-r--r--WebKit/qt/tests/qwebframe/qwebframe.qrc8
-rw-r--r--WebKit/qt/tests/qwebframe/resources/image.png (renamed from WebKit/qt/tests/qwebframe/image.png)bin14743 -> 14743 bytes
-rw-r--r--WebKit/qt/tests/qwebframe/resources/style.css (renamed from WebKit/qt/tests/qwebframe/style.css)0
-rw-r--r--WebKit/qt/tests/qwebframe/resources/test1.html (renamed from WebKit/qt/tests/qwebframe/test1.html)0
-rw-r--r--WebKit/qt/tests/qwebframe/resources/test2.html (renamed from WebKit/qt/tests/qwebframe/test2.html)0
-rw-r--r--WebKit/qt/tests/qwebframe/resources/testiframe.html54
-rw-r--r--WebKit/qt/tests/qwebframe/resources/testiframe2.html21
-rw-r--r--WebKit/qt/tests/qwebframe/tst_qwebframe.cpp152
-rw-r--r--WebKit/qt/tests/qwebframe/tst_qwebframe.qrc10
-rw-r--r--WebKit/qt/tests/qwebhistory/qwebhistory.pro13
-rw-r--r--WebKit/qt/tests/qwebhistory/resources/page1.html (renamed from WebKit/qt/tests/qwebhistory/data/page1.html)0
-rw-r--r--WebKit/qt/tests/qwebhistory/resources/page2.html (renamed from WebKit/qt/tests/qwebhistory/data/page2.html)0
-rw-r--r--WebKit/qt/tests/qwebhistory/resources/page3.html (renamed from WebKit/qt/tests/qwebhistory/data/page3.html)0
-rw-r--r--WebKit/qt/tests/qwebhistory/resources/page4.html (renamed from WebKit/qt/tests/qwebhistory/data/page4.html)0
-rw-r--r--WebKit/qt/tests/qwebhistory/resources/page5.html (renamed from WebKit/qt/tests/qwebhistory/data/page5.html)0
-rw-r--r--WebKit/qt/tests/qwebhistory/resources/page6.html (renamed from WebKit/qt/tests/qwebhistory/data/page6.html)0
-rw-r--r--WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp2
-rw-r--r--WebKit/qt/tests/qwebhistory/tst_qwebhistory.qrc12
-rw-r--r--WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro12
-rw-r--r--WebKit/qt/tests/qwebinspector/qwebinspector.pro7
-rw-r--r--WebKit/qt/tests/qwebpage/qwebpage.pro14
-rw-r--r--WebKit/qt/tests/qwebpage/resources/frame_a.html (renamed from WebKit/qt/tests/qwebpage/frametest/frame_a.html)0
-rw-r--r--WebKit/qt/tests/qwebpage/resources/iframe.html (renamed from WebKit/qt/tests/qwebpage/frametest/iframe.html)0
-rw-r--r--WebKit/qt/tests/qwebpage/resources/iframe2.html (renamed from WebKit/qt/tests/qwebpage/frametest/iframe2.html)0
-rw-r--r--WebKit/qt/tests/qwebpage/resources/iframe3.html (renamed from WebKit/qt/tests/qwebpage/frametest/iframe3.html)0
-rw-r--r--WebKit/qt/tests/qwebpage/resources/index.html (renamed from WebKit/qt/tests/qwebpage/frametest/index.html)0
-rw-r--r--WebKit/qt/tests/qwebpage/tst_qwebpage.cpp196
-rw-r--r--WebKit/qt/tests/qwebpage/tst_qwebpage.qrc10
-rw-r--r--WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro12
-rw-r--r--WebKit/qt/tests/qwebview/qwebview.pro14
-rw-r--r--WebKit/qt/tests/qwebview/resources/frame_a.html (renamed from WebKit/qt/tests/qwebview/data/frame_a.html)0
-rw-r--r--WebKit/qt/tests/qwebview/resources/index.html (renamed from WebKit/qt/tests/qwebview/data/index.html)0
-rw-r--r--WebKit/qt/tests/qwebview/tst_qwebview.cpp19
-rw-r--r--WebKit/qt/tests/qwebview/tst_qwebview.qrc4
-rw-r--r--WebKit/qt/tests/resources/image2.png (renamed from WebKit/qt/tests/qwebframe/resources/image2.png)bin14743 -> 14743 bytes
-rw-r--r--WebKit/qt/tests/tests.pri20
-rw-r--r--WebKit/qt/tests/tests.pro4
-rw-r--r--WebKit/qt/tests/util.h4
-rw-r--r--WebKit/win/AccessibleBase.cpp133
-rw-r--r--WebKit/win/AccessibleBase.h13
-rw-r--r--WebKit/win/ChangeLog835
-rw-r--r--WebKit/win/ForEachCoClass.h2
-rw-r--r--WebKit/win/FullscreenVideoController.cpp615
-rw-r--r--WebKit/win/FullscreenVideoController.h173
-rw-r--r--WebKit/win/Interfaces/AccessibleComparable.idl45
-rw-r--r--WebKit/win/Interfaces/IWebError.idl9
-rwxr-xr-xWebKit/win/Interfaces/IWebFramePrivate.idl3
-rw-r--r--WebKit/win/Interfaces/IWebGeolocationPolicyListener.idl40
-rw-r--r--WebKit/win/Interfaces/IWebGeolocationPosition.idl39
-rw-r--r--WebKit/win/Interfaces/IWebGeolocationProvider.idl44
-rw-r--r--WebKit/win/Interfaces/IWebHTMLRepresentation.idl8
-rw-r--r--WebKit/win/Interfaces/IWebPreferencesPrivate.idl6
-rw-r--r--WebKit/win/Interfaces/IWebScriptWorld.idl2
-rwxr-xr-xWebKit/win/Interfaces/IWebUIDelegatePrivate.idl4
-rw-r--r--WebKit/win/Interfaces/IWebViewPrivate.idl7
-rw-r--r--WebKit/win/Interfaces/WebKit.idl12
-rw-r--r--WebKit/win/WebCoreLocalizedStrings.cpp3
-rw-r--r--WebKit/win/WebCoreSupport/WebChromeClient.cpp46
-rw-r--r--WebKit/win/WebCoreSupport/WebChromeClient.h6
-rw-r--r--WebKit/win/WebCoreSupport/WebContextMenuClient.cpp3
-rw-r--r--WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp6
-rw-r--r--WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h7
-rw-r--r--WebKit/win/WebCoreSupport/WebGeolocationControllerClient.cpp74
-rw-r--r--WebKit/win/WebCoreSupport/WebGeolocationControllerClient.h51
-rw-r--r--WebKit/win/WebDataSource.cpp4
-rw-r--r--WebKit/win/WebDropSource.cpp42
-rw-r--r--WebKit/win/WebFrame.cpp113
-rw-r--r--WebKit/win/WebFrame.h2
-rw-r--r--WebKit/win/WebGeolocationPolicyListener.cpp97
-rw-r--r--WebKit/win/WebGeolocationPolicyListener.h61
-rw-r--r--WebKit/win/WebGeolocationPosition.cpp106
-rw-r--r--WebKit/win/WebGeolocationPosition.h66
-rw-r--r--WebKit/win/WebHTMLRepresentation.cpp48
-rw-r--r--WebKit/win/WebHTMLRepresentation.h41
-rw-r--r--WebKit/win/WebKit.vcproj/DerivedSources.make161
-rw-r--r--WebKit/win/WebKit.vcproj/Interfaces.vcproj100
-rw-r--r--WebKit/win/WebKit.vcproj/WebKit.rc7
-rw-r--r--WebKit/win/WebKit.vcproj/WebKit.sln91
-rw-r--r--WebKit/win/WebKit.vcproj/WebKit.vcproj132
-rw-r--r--WebKit/win/WebKit.vcproj/WebKitGUID.vcproj8
-rw-r--r--WebKit/win/WebKit.vcproj/build-generated-files.sh62
-rwxr-xr-xWebKit/win/WebKit.vcproj/fsVideoAudioVolumeHigh.pngbin0 -> 3026 bytes
-rwxr-xr-xWebKit/win/WebKit.vcproj/fsVideoAudioVolumeLow.pngbin0 -> 2913 bytes
-rwxr-xr-xWebKit/win/WebKit.vcproj/fsVideoExitFullscreen.pngbin0 -> 2940 bytes
-rwxr-xr-xWebKit/win/WebKit.vcproj/fsVideoPause.pngbin0 -> 2832 bytes
-rwxr-xr-xWebKit/win/WebKit.vcproj/fsVideoPlay.pngbin0 -> 2906 bytes
-rw-r--r--WebKit/win/WebKit.vcproj/resource.h5
-rw-r--r--WebKit/win/WebKitClassFactory.cpp2
-rw-r--r--WebKit/win/WebKitDLL.cpp10
-rw-r--r--WebKit/win/WebKitLogging.cpp3
-rw-r--r--WebKit/win/WebKitLogging.h2
-rw-r--r--WebKit/win/WebKitPrefix.cpp1
-rw-r--r--WebKit/win/WebPreferenceKeysPrivate.h4
-rw-r--r--WebKit/win/WebPreferences.cpp36
-rw-r--r--WebKit/win/WebPreferences.h5
-rw-r--r--WebKit/win/WebScriptWorld.cpp8
-rw-r--r--WebKit/win/WebScriptWorld.h1
-rw-r--r--WebKit/win/WebView.cpp398
-rw-r--r--WebKit/win/WebView.h29
-rw-r--r--WebKit/wx/ChangeLog122
-rw-r--r--WebKit/wx/WebBrowserShell.h1
-rw-r--r--WebKit/wx/WebFrame.cpp19
-rw-r--r--WebKit/wx/WebFrame.h21
-rw-r--r--WebKit/wx/WebKitDefines.h45
-rw-r--r--WebKit/wx/WebKitSupport/EditorClientWx.cpp1
-rw-r--r--WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp4
-rw-r--r--WebKit/wx/WebSettings.cpp194
-rw-r--r--WebKit/wx/WebSettings.h166
-rw-r--r--WebKit/wx/WebView.cpp28
-rw-r--r--WebKit/wx/WebView.h20
-rw-r--r--WebKit/wx/bindings/python/webview.i12
-rw-r--r--WebKit/wx/bindings/python/wxwebkit-py.bkl109
-rw-r--r--WebKit/wx/dependencies.bkl177
-rw-r--r--WebKit/wx/presets/wxwebkit.bkl164
-rw-r--r--WebKit/wx/wxwebkit.bkl83
-rw-r--r--WebKit/wx/wxwk-settings.bkl109
-rw-r--r--WebKitLibraries/ChangeLog167
-rw-r--r--WebKitLibraries/WebKitSystemInterface.h8
-rw-r--r--WebKitLibraries/libWebKitSystemInterfaceLeopard.abin2000440 -> 2524760 bytes
-rw-r--r--WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.abin1625052 -> 2011036 bytes
-rw-r--r--WebKitLibraries/libWebKitSystemInterfaceTiger.abin966704 -> 933152 bytes
-rwxr-xr-xWebKitLibraries/win/bin/QuartzCoreInterface.dllbin0 -> 27648 bytes
-rw-r--r--WebKitLibraries/win/include/QuartzCoreInterface/QuartzCoreInterface.h33
-rw-r--r--WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h4
-rwxr-xr-xWebKitLibraries/win/lib/QuartzCoreInterface.libbin0 -> 2496 bytes
-rw-r--r--WebKitLibraries/win/lib/WebKitSystemInterface.libbin172868 -> 176088 bytes
-rw-r--r--WebKitLibraries/win/lib/WebKitSystemInterface_debug.libbin74364 -> 78858 bytes
-rw-r--r--WebKitLibraries/win/tools/scripts/feature-defines.sh31
-rw-r--r--WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops174
-rw-r--r--WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops174
-rw-r--r--WebKitLibraries/win/tools/vsprops/WinCairo.vsprops4
-rw-r--r--WebKitLibraries/win/tools/vsprops/common.vsprops2
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/buildbot.css280
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/index.html23
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/robots.txt4
-rw-r--r--WebKitTools/ChangeLog6074
-rw-r--r--WebKitTools/DumpRenderTree/AccessibilityController.cpp11
-rw-r--r--WebKitTools/DumpRenderTree/AccessibilityController.h16
-rw-r--r--WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp121
-rw-r--r--WebKitTools/DumpRenderTree/AccessibilityUIElement.h26
-rw-r--r--WebKitTools/DumpRenderTree/DumpRenderTree.h2
-rw-r--r--WebKitTools/DumpRenderTree/LayoutTestController.cpp30
-rw-r--r--WebKitTools/DumpRenderTree/LayoutTestController.h5
-rw-r--r--WebKitTools/DumpRenderTree/config.h2
-rw-r--r--WebKitTools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp14
-rw-r--r--WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp89
-rw-r--r--WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp9
-rw-r--r--WebKitTools/DumpRenderTree/gtk/EventSender.cpp149
-rw-r--r--WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp12
-rw-r--r--WebKitTools/DumpRenderTree/mac/AccessibilityControllerMac.mm13
-rw-r--r--WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm120
-rw-r--r--WebKitTools/DumpRenderTree/mac/CheckedMalloc.cpp14
-rw-r--r--WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm38
-rw-r--r--WebKitTools/DumpRenderTree/mac/DumpRenderTreeMac.h2
-rw-r--r--WebKitTools/DumpRenderTree/mac/EventSendingController.mm73
-rw-r--r--WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm6
-rw-r--r--WebKitTools/DumpRenderTree/mac/ObjCController.m16
-rw-r--r--WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm3
-rw-r--r--WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro25
-rw-r--r--WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp (renamed from WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp)144
-rw-r--r--WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h (renamed from WebKitTools/DumpRenderTree/qt/DumpRenderTree.h)29
-rw-r--r--WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp249
-rw-r--r--WebKitTools/DumpRenderTree/qt/EventSenderQt.h30
-rw-r--r--WebKitTools/DumpRenderTree/qt/GCControllerQt.cpp (renamed from WebKitTools/DumpRenderTree/qt/jsobjects.cpp)12
-rw-r--r--WebKitTools/DumpRenderTree/qt/GCControllerQt.h (renamed from WebKitTools/DumpRenderTree/qt/jsobjects.h)4
-rw-r--r--WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp125
-rw-r--r--WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h24
-rw-r--r--WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.cpp2
-rw-r--r--WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.h (renamed from WebKitTools/DumpRenderTree/qt/WorkQueueItem.h)12
-rw-r--r--WebKitTools/DumpRenderTree/qt/main.cpp35
-rw-r--r--WebKitTools/DumpRenderTree/win/AccessibilityControllerWin.cpp129
-rw-r--r--WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp129
-rw-r--r--WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj12
-rw-r--r--WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h3
-rw-r--r--WebKitTools/DumpRenderTree/win/EventSender.cpp44
-rw-r--r--WebKitTools/DumpRenderTree/win/FrameLoadDelegate.h2
-rw-r--r--WebKitTools/DumpRenderTree/win/ImageDiff.vcproj8
-rw-r--r--WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp11
-rw-r--r--WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp5
-rw-r--r--WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj10
-rw-r--r--WebKitTools/DumpRenderTree/wscript2
-rw-r--r--WebKitTools/DumpRenderTree/wx/DumpRenderTree.bkl69
-rw-r--r--WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp7
-rw-r--r--WebKitTools/QtLauncher/QtLauncher.pro34
-rw-r--r--WebKitTools/QtLauncher/locationedit.cpp80
-rw-r--r--WebKitTools/QtLauncher/locationedit.h54
-rw-r--r--WebKitTools/QtLauncher/main.cpp598
-rw-r--r--WebKitTools/QtLauncher/mainwindow.cpp151
-rw-r--r--WebKitTools/QtLauncher/mainwindow.h69
-rw-r--r--WebKitTools/QtLauncher/urlloader.cpp83
-rw-r--r--WebKitTools/QtLauncher/urlloader.h58
-rw-r--r--WebKitTools/QtLauncher/utils.cpp (renamed from WebCore/page/chromium/FrameChromium.h)29
-rw-r--r--WebKitTools/QtLauncher/utils.h35
-rw-r--r--WebKitTools/QtLauncher/webinspector.h56
-rw-r--r--WebKitTools/QtLauncher/webpage.cpp106
-rw-r--r--WebKitTools/QtLauncher/webpage.h59
-rw-r--r--WebKitTools/QtLauncher/webview.cpp81
-rw-r--r--WebKitTools/QtLauncher/webview.h62
-rw-r--r--WebKitTools/QueueStatusServer/app.yaml2
-rw-r--r--WebKitTools/QueueStatusServer/cron.yaml4
-rw-r--r--WebKitTools/QueueStatusServer/filters/webkit_extras.py21
-rw-r--r--WebKitTools/QueueStatusServer/handlers/__init__.py (renamed from WebKitTools/Scripts/modules/__init__.py)0
-rw-r--r--WebKitTools/QueueStatusServer/handlers/dashboard.py41
-rw-r--r--WebKitTools/QueueStatusServer/handlers/gc.py44
-rw-r--r--WebKitTools/QueueStatusServer/handlers/patch.py53
-rw-r--r--WebKitTools/QueueStatusServer/handlers/patchstatus.py40
-rw-r--r--WebKitTools/QueueStatusServer/handlers/recentstatus.py57
-rw-r--r--WebKitTools/QueueStatusServer/handlers/showresults.py41
-rw-r--r--WebKitTools/QueueStatusServer/handlers/statusbubble.py42
-rw-r--r--WebKitTools/QueueStatusServer/handlers/updatestatus.py67
-rw-r--r--WebKitTools/QueueStatusServer/index.html29
-rw-r--r--WebKitTools/QueueStatusServer/index.yaml6
-rw-r--r--WebKitTools/QueueStatusServer/main.py65
-rw-r--r--WebKitTools/QueueStatusServer/model/__init__.py (renamed from WebKitTools/Scripts/modules/commands/__init__.py)0
-rw-r--r--WebKitTools/QueueStatusServer/model/attachment.py109
-rw-r--r--WebKitTools/QueueStatusServer/model/queues.py36
-rw-r--r--WebKitTools/QueueStatusServer/model/queuestatus.py38
-rw-r--r--WebKitTools/QueueStatusServer/queue_status.py177
-rw-r--r--WebKitTools/QueueStatusServer/status_bubble.html36
-rw-r--r--WebKitTools/QueueStatusServer/stylesheets/dashboard.css80
-rw-r--r--WebKitTools/QueueStatusServer/templates/dashboard.html64
-rw-r--r--WebKitTools/QueueStatusServer/templates/patch.html21
-rw-r--r--WebKitTools/QueueStatusServer/templates/recentstatus.html24
-rw-r--r--WebKitTools/QueueStatusServer/templates/statusbubble.html77
-rw-r--r--WebKitTools/QueueStatusServer/templates/updatestatus.html (renamed from WebKitTools/QueueStatusServer/update_status.html)0
-rw-r--r--WebKitTools/Scripts/VCSUtils.pm507
-rwxr-xr-xWebKitTools/Scripts/build-webkit19
-rwxr-xr-xWebKitTools/Scripts/check-webkit-style137
-rwxr-xr-xWebKitTools/Scripts/do-webcore-rename226
-rwxr-xr-xWebKitTools/Scripts/make-script-test-wrappers2
-rwxr-xr-xWebKitTools/Scripts/mark-bug-fixed141
-rw-r--r--WebKitTools/Scripts/modules/bugzilla.py595
-rw-r--r--WebKitTools/Scripts/modules/buildsteps.py254
-rw-r--r--WebKitTools/Scripts/modules/commands/download.py370
-rw-r--r--WebKitTools/Scripts/modules/commands/download_unittest.py77
-rw-r--r--WebKitTools/Scripts/modules/commands/queues.py216
-rw-r--r--WebKitTools/Scripts/modules/commands/queues_unittest.py66
-rw-r--r--WebKitTools/Scripts/modules/commands/upload.py246
-rw-r--r--WebKitTools/Scripts/modules/landingsequence.py113
-rw-r--r--WebKitTools/Scripts/modules/mock_bugzillatool.py153
-rwxr-xr-xWebKitTools/Scripts/num-cpus19
-rwxr-xr-xWebKitTools/Scripts/pdevenv9
-rwxr-xr-xWebKitTools/Scripts/prepare-ChangeLog20
-rwxr-xr-xWebKitTools/Scripts/rebaseline-chromium-webkit-tests40
-rwxr-xr-xWebKitTools/Scripts/run-chromium-webkit-tests40
-rwxr-xr-xWebKitTools/Scripts/run-iexploder-tests83
-rwxr-xr-xWebKitTools/Scripts/run-leaks9
-rwxr-xr-xWebKitTools/Scripts/run-sunspider10
-rwxr-xr-xWebKitTools/Scripts/run-webkit-httpd53
-rwxr-xr-xWebKitTools/Scripts/run-webkit-tests127
-rwxr-xr-xWebKitTools/Scripts/run-webkit-websocketserver2
-rwxr-xr-xWebKitTools/Scripts/sunspider-compare-results12
-rwxr-xr-xWebKitTools/Scripts/svn-apply41
-rwxr-xr-xWebKitTools/Scripts/svn-unapply47
-rwxr-xr-xWebKitTools/Scripts/test-webkit-scripts85
-rwxr-xr-xWebKitTools/Scripts/test-webkitperl49
-rwxr-xr-xWebKitTools/Scripts/test-webkitpy64
-rwxr-xr-xWebKitTools/Scripts/update-webkit-chromium24
-rwxr-xr-xWebKitTools/Scripts/validate-committer-lists18
-rwxr-xr-xWebKitTools/Scripts/webkit-patch (renamed from WebKitTools/Scripts/bugzilla-tool)57
-rw-r--r--WebKitTools/Scripts/webkit-tools-completion.sh30
-rw-r--r--WebKitTools/Scripts/webkitdirs.pm172
-rw-r--r--WebKitTools/Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatch.pl290
-rw-r--r--WebKitTools/Scripts/webkitperl/VCSUtils_unittest/generatePatchCommand.pl87
-rw-r--r--WebKitTools/Scripts/webkitperl/VCSUtils_unittest/gitdiff2svndiff.pl117
-rw-r--r--WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl328
-rw-r--r--WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl288
-rw-r--r--WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parsePatch.pl102
-rw-r--r--WebKitTools/Scripts/webkitperl/VCSUtils_unittest/runPatchCommand.pl105
-rw-r--r--WebKitTools/Scripts/webkitperl/httpd.pm202
-rw-r--r--WebKitTools/Scripts/webkitpy/BeautifulSoup.py (renamed from WebKitTools/Scripts/modules/BeautifulSoup.py)0
-rw-r--r--WebKitTools/Scripts/webkitpy/BeautifulSoup.pycbin0 -> 74102 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/__init__.py8
-rw-r--r--WebKitTools/Scripts/webkitpy/__init__.pycbin0 -> 472 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/autoinstall.py335
-rw-r--r--WebKitTools/Scripts/webkitpy/autoinstall.pycbin0 -> 9596 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/bugzilla.py789
-rw-r--r--WebKitTools/Scripts/webkitpy/bugzilla.pycbin0 -> 26413 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/bugzilla_unittest.py (renamed from WebKitTools/Scripts/modules/bugzilla_unittest.py)156
-rw-r--r--WebKitTools/Scripts/webkitpy/buildbot.py (renamed from WebKitTools/Scripts/modules/buildbot.py)64
-rw-r--r--WebKitTools/Scripts/webkitpy/buildbot.pycbin0 -> 3525 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/buildbot_unittest.py (renamed from WebKitTools/Scripts/modules/buildbot_unittest.py)35
-rw-r--r--WebKitTools/Scripts/webkitpy/changelogs.py (renamed from WebKitTools/Scripts/modules/changelogs.py)70
-rw-r--r--WebKitTools/Scripts/webkitpy/changelogs.pycbin0 -> 3908 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/changelogs_unittest.py (renamed from WebKitTools/Scripts/modules/changelogs_unittest.py)42
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/__init__.py1
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/__init__.pycbin0 -> 171 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/abstractsequencedcommand.py43
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/abstractsequencedcommand.pycbin0 -> 1460 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/commandtest.py (renamed from WebKitTools/Scripts/modules/commands/commandtest.py)14
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/download.py284
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/download.pycbin0 -> 11970 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/download_unittest.py127
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/early_warning_system.py122
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/early_warning_system.pycbin0 -> 4828 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/early_warning_system_unittest.py62
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/openbugs.py63
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/openbugs_unittest.py50
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/queries.py (renamed from WebKitTools/Scripts/modules/commands/queries.py)79
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/queries.pycbin0 -> 6110 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/queries_unittest.py (renamed from WebKitTools/Scripts/modules/commands/queries_unittest.py)35
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/queues.py295
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/queues.pycbin0 -> 15126 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/queues_unittest.py102
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/queuestest.py99
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/upload.py406
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/upload.pycbin0 -> 17471 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/commands/upload_unittest.py84
-rwxr-xr-xWebKitTools/Scripts/webkitpy/comments.py (renamed from WebKitTools/Scripts/modules/comments.py)14
-rw-r--r--WebKitTools/Scripts/webkitpy/comments.pycbin0 -> 775 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/committers.py (renamed from WebKitTools/Scripts/modules/committers.py)63
-rw-r--r--WebKitTools/Scripts/webkitpy/committers.pycbin0 -> 13099 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/committers_unittest.py (renamed from WebKitTools/Scripts/modules/committers_unittest.py)3
-rw-r--r--WebKitTools/Scripts/webkitpy/credentials.py132
-rw-r--r--WebKitTools/Scripts/webkitpy/credentials.pycbin0 -> 4021 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/credentials_unittest.py127
-rw-r--r--WebKitTools/Scripts/webkitpy/diff_parser.py (renamed from WebKitTools/Scripts/modules/diff_parser.py)8
-rw-r--r--WebKitTools/Scripts/webkitpy/diff_parser_unittest.py (renamed from WebKitTools/Scripts/modules/diff_parser_unittest.py)23
-rw-r--r--WebKitTools/Scripts/webkitpy/executive.py (renamed from WebKitTools/Scripts/modules/executive.py)77
-rw-r--r--WebKitTools/Scripts/webkitpy/executive.pycbin0 -> 4861 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/executive_unittest.py (renamed from WebKitTools/Scripts/modules/commands/upload_unittest.py)19
-rw-r--r--WebKitTools/Scripts/webkitpy/grammar.py (renamed from WebKitTools/Scripts/modules/grammar.py)8
-rw-r--r--WebKitTools/Scripts/webkitpy/grammar.pycbin0 -> 692 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/__init__.py (renamed from JavaScriptCore/profiler/HeavyProfile.cpp)0
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/apache_http_server.py229
-rwxr-xr-xWebKitTools/Scripts/webkitpy/layout_tests/layout_package/http_server.py279
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/http_server_base.py67
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/httpd2.pem41
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py184
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py418
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/lighttpd.conf89
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/metered_stream.py96
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/path_utils.py395
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/platform_utils.py50
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/platform_utils_linux.py248
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/platform_utils_mac.py201
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/platform_utils_win.py210
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py818
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py267
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_files.py95
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_shell_thread.py511
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/websocket_server.py316
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py1028
-rwxr-xr-xWebKitTools/Scripts/webkitpy/layout_tests/run_chromium_webkit_tests.py1697
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/test_types/__init__.py (renamed from JavaScriptCore/profiler/HeavyProfile.h)0
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/test_types/fuzzy_image_diff.py72
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/test_types/image_diff.py224
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/test_types/test_type_base.py266
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/test_types/text_diff.py122
-rw-r--r--WebKitTools/Scripts/webkitpy/mock.py (renamed from WebKitTools/Scripts/modules/mock.py)0
-rw-r--r--WebKitTools/Scripts/webkitpy/mock.pycbin0 -> 9932 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/mock_bugzillatool.py367
-rw-r--r--WebKitTools/Scripts/webkitpy/multicommandtool.py (renamed from WebKitTools/Scripts/modules/multicommandtool.py)128
-rw-r--r--WebKitTools/Scripts/webkitpy/multicommandtool.pycbin0 -> 13466 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/multicommandtool_unittest.py (renamed from WebKitTools/Scripts/modules/multicommandtool_unittest.py)37
-rw-r--r--WebKitTools/Scripts/webkitpy/networktransaction.py63
-rw-r--r--WebKitTools/Scripts/webkitpy/networktransaction.pycbin0 -> 2217 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/networktransaction_unittest.py80
-rw-r--r--WebKitTools/Scripts/webkitpy/outputcapture.py (renamed from WebKitTools/Scripts/modules/outputcapture.py)9
-rw-r--r--WebKitTools/Scripts/webkitpy/patchcollection.py (renamed from WebKitTools/Scripts/modules/patchcollection.py)16
-rw-r--r--WebKitTools/Scripts/webkitpy/patchcollection.pycbin0 -> 2353 bytes
-rw-r--r--[-rwxr-xr-x]WebKitTools/Scripts/webkitpy/patchcollection_unittest.py (renamed from WebKitTools/Scripts/run-webkit-unittests)42
-rw-r--r--WebKitTools/Scripts/webkitpy/queueengine.py (renamed from WebKitTools/Scripts/modules/workqueue.py)69
-rw-r--r--WebKitTools/Scripts/webkitpy/queueengine.pycbin0 -> 6052 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/queueengine_unittest.py (renamed from WebKitTools/Scripts/modules/workqueue_unittest.py)44
-rw-r--r--WebKitTools/Scripts/webkitpy/scm.py (renamed from WebKitTools/Scripts/modules/scm.py)13
-rw-r--r--WebKitTools/Scripts/webkitpy/scm.pycbin0 -> 26388 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/scm_unittest.py (renamed from WebKitTools/Scripts/modules/scm_unittest.py)7
-rw-r--r--WebKitTools/Scripts/webkitpy/statusserver.py (renamed from WebKitTools/Scripts/modules/statusbot.py)73
-rw-r--r--WebKitTools/Scripts/webkitpy/statusserver.pycbin0 -> 3562 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/__init__.py56
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/__init__.pycbin0 -> 2333 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/abstractstep.py (renamed from WebKitTools/Scripts/modules/commands/early_warning_system.py)69
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/abstractstep.pycbin0 -> 2750 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/applypatch.py42
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/applypatch.pycbin0 -> 1252 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/applypatchwithlocalcommit.py43
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/applypatchwithlocalcommit.pycbin0 -> 1336 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/build.py54
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/build.pycbin0 -> 1563 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/checkstyle.py56
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/checkstyle.pycbin0 -> 1520 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/cleanworkingdirectory.py52
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/cleanworkingdirectory.pycbin0 -> 1652 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/cleanworkingdirectorywithlocalcommits.py34
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/cleanworkingdirectorywithlocalcommits.pycbin0 -> 883 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/closebug.py51
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/closebug.pycbin0 -> 1575 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/closebugforlanddiff.py58
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/closebugforlanddiff.pycbin0 -> 1535 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/closebugforlanddiff_unittest.py41
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/closepatch.py36
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/closepatch.pycbin0 -> 925 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/commit.py35
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/commit.pycbin0 -> 838 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/completerollout.py66
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/completerollout.pycbin0 -> 1973 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/confirmdiff.py47
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/confirmdiff.pycbin0 -> 1266 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/createbug.py45
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/createbug.pycbin0 -> 1192 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/editchangelog.py37
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/editchangelog.pycbin0 -> 866 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/ensurebuildersaregreen.py48
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/ensurebuildersaregreen.pycbin0 -> 1670 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/ensurelocalcommitifneeded.py43
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/ensurelocalcommitifneeded.pycbin0 -> 1336 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/metastep.py54
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/metastep.pycbin0 -> 1619 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/obsoletepatches.py51
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/obsoletepatches.pycbin0 -> 1486 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/options.py56
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/options.pycbin0 -> 3742 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/postdiff.py51
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/postdiff.pycbin0 -> 1471 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/postdiffforcommit.py41
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/preparechangelog.py59
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/preparechangelog.pycbin0 -> 1758 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/preparechangelogforrevert.py49
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/preparechangelogforrevert.pycbin0 -> 1292 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/promptforbugortitle.py45
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/promptforbugortitle.pycbin0 -> 1027 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/revertrevision.py34
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/revertrevision.pycbin0 -> 769 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/runtests.py66
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/runtests.pycbin0 -> 1871 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/steps_unittest.py56
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/update.py46
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/update.pycbin0 -> 1260 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/updatechangelogswithreview_unittests.py46
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/updatechangelogswithreviewer.py71
-rw-r--r--WebKitTools/Scripts/webkitpy/steps/updatechangelogswithreviewer.pycbin0 -> 2494 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/stepsequence.py (renamed from WebKitTools/Scripts/modules/stepsequence.py)39
-rw-r--r--WebKitTools/Scripts/webkitpy/stepsequence.pycbin0 -> 2917 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/style/__init__.py1
-rw-r--r--WebKitTools/Scripts/webkitpy/style/checker.py809
-rwxr-xr-xWebKitTools/Scripts/webkitpy/style/checker_unittest.py677
-rw-r--r--WebKitTools/Scripts/webkitpy/style/error_handlers.py154
-rw-r--r--WebKitTools/Scripts/webkitpy/style/error_handlers_unittest.py163
-rw-r--r--WebKitTools/Scripts/webkitpy/style/processors/__init__.py1
-rw-r--r--WebKitTools/Scripts/webkitpy/style/processors/cpp.py (renamed from WebKitTools/Scripts/modules/cpp_style.py)1080
-rw-r--r--WebKitTools/Scripts/webkitpy/style/processors/cpp_unittest.py (renamed from WebKitTools/Scripts/modules/cpp_style_unittest.py)665
-rw-r--r--WebKitTools/Scripts/webkitpy/style/processors/text.py56
-rw-r--r--WebKitTools/Scripts/webkitpy/style/processors/text_unittest.py94
-rw-r--r--WebKitTools/Scripts/webkitpy/style/unittests.py41
-rw-r--r--WebKitTools/Scripts/webkitpy/style_references.py72
-rw-r--r--WebKitTools/Scripts/webkitpy/user.py58
-rw-r--r--WebKitTools/Scripts/webkitpy/user.pycbin0 -> 1965 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/webkit_logging.py (renamed from WebKitTools/Scripts/modules/logging.py)1
-rw-r--r--WebKitTools/Scripts/webkitpy/webkit_logging.pycbin0 -> 3160 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/webkit_logging_unittest.py (renamed from WebKitTools/Scripts/modules/logging_unittest.py)4
-rw-r--r--WebKitTools/Scripts/webkitpy/webkitport.py (renamed from WebKitTools/Scripts/modules/webkitport.py)86
-rw-r--r--WebKitTools/Scripts/webkitpy/webkitport.pycbin0 -> 7007 bytes
-rw-r--r--WebKitTools/Scripts/webkitpy/webkitport_unittest.py (renamed from WebKitTools/Scripts/modules/webkitport_unittest.py)17
-rw-r--r--WebKitTools/WebKitAPITest/HostWindow.cpp83
-rw-r--r--WebKitTools/WebKitAPITest/HostWindow.h51
-rw-r--r--WebKitTools/WebKitAPITest/Test.h59
-rw-r--r--WebKitTools/WebKitAPITest/TestsController.cpp147
-rw-r--r--WebKitTools/WebKitAPITest/TestsController.h65
-rw-r--r--WebKitTools/WebKitAPITest/WebKitAPITest.vcproj235
-rw-r--r--WebKitTools/WebKitAPITest/WebKitAPITestCommon.vsprops25
-rw-r--r--WebKitTools/WebKitAPITest/main.cpp35
-rw-r--r--WebKitTools/WebKitAPITest/tests/WebViewDestruction.cpp230
-rw-r--r--WebKitTools/WebKitLauncher/main.m30
-rw-r--r--WebKitTools/WinLauncher/PrintWebUIDelegate.cpp194
-rw-r--r--WebKitTools/WinLauncher/PrintWebUIDelegate.h109
-rw-r--r--WebKitTools/WinLauncher/WinLauncher.cpp95
-rw-r--r--WebKitTools/WinLauncher/WinLauncher.h220
-rw-r--r--WebKitTools/WinLauncher/WinLauncher.rc5
-rw-r--r--WebKitTools/WinLauncher/WinLauncher.vcproj8
-rw-r--r--WebKitTools/WinLauncher/resource.h1
-rw-r--r--WebKitTools/iExploder/htdocs/cssproperties.in38
-rw-r--r--WebKitTools/iExploder/htdocs/htmlattrs.in114
-rw-r--r--WebKitTools/iExploder/htdocs/htmltags.in22
-rw-r--r--WebKitTools/pywebsocket/mod_pywebsocket/dispatch.py17
-rw-r--r--WebKitTools/pywebsocket/mod_pywebsocket/handshake.py50
-rw-r--r--WebKitTools/pywebsocket/mod_pywebsocket/memorizingfile.py81
-rw-r--r--WebKitTools/pywebsocket/mod_pywebsocket/standalone.py61
-rw-r--r--WebKitTools/pywebsocket/setup.py2
-rw-r--r--WebKitTools/pywebsocket/test/test_dispatch.py11
-rw-r--r--WebKitTools/pywebsocket/test/test_handshake.py201
-rw-r--r--WebKitTools/pywebsocket/test/test_memorizingfile.py72
-rw-r--r--WebKitTools/simplejson/LICENSE.txt19
-rw-r--r--WebKitTools/simplejson/README.txt11
-rw-r--r--WebKitTools/simplejson/__init__.py287
-rw-r--r--WebKitTools/simplejson/_speedups.c215
-rw-r--r--WebKitTools/simplejson/decoder.py273
-rw-r--r--WebKitTools/simplejson/encoder.py371
-rw-r--r--WebKitTools/simplejson/jsonfilter.py40
-rw-r--r--WebKitTools/simplejson/scanner.py63
-rw-r--r--WebKitTools/wx/browser/browser.bkl63
-rw-r--r--WebKitTools/wx/browser/browser.cpp10
-rwxr-xr-xWebKitTools/wx/build-wxwebkit423
-rw-r--r--WebKitTools/wx/build/settings.py18
2849 files changed, 242855 insertions, 128355 deletions
diff --git a/Android.mk b/Android.mk
index c91ec08..1194c5b 100644
--- a/Android.mk
+++ b/Android.mk
@@ -221,6 +221,69 @@ ifeq ($(WEBCORE_INSTRUMENTATION),true)
LOCAL_CFLAGS += -DANDROID_INSTRUMENT
endif
+<<<<<<< HEAD
+=======
+ifeq ($(JAVASCRIPT_ENGINE),v8)
+# Include WTF source file.
+d := JavaScriptCore
+LOCAL_PATH := $(BASE_PATH)/$d
+intermediates := $(base_intermediates)/$d
+include $(LOCAL_PATH)/Android.v8.wtf.mk
+WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
+endif # JAVASCRIPT_ENGINE == v8
+
+# Include source files for WebCore
+d := WebCore
+LOCAL_PATH := $(BASE_PATH)/$d
+JAVASCRIPTCORE_PATH := $(BASE_PATH)/JavaScriptCore
+intermediates := $(base_intermediates)/$d
+include $(LOCAL_PATH)/Android.mk
+ifeq ($(JAVASCRIPT_ENGINE),jsc)
+include $(LOCAL_PATH)/Android.jscbindings.mk
+endif
+ifeq ($(JAVASCRIPT_ENGINE),v8)
+include $(LOCAL_PATH)/Android.v8bindings.mk
+endif
+WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
+LOCAL_C_INCLUDES += $(BINDING_C_INCLUDES)
+
+# Include the derived source files for WebCore. Uses the same path as
+# WebCore
+include $(LOCAL_PATH)/Android.derived.mk
+ifeq ($(JAVASCRIPT_ENGINE),jsc)
+include $(LOCAL_PATH)/Android.derived.jscbindings.mk
+endif
+ifeq ($(JAVASCRIPT_ENGINE),v8)
+include $(LOCAL_PATH)/Android.derived.v8bindings.mk
+endif
+
+# Redefine LOCAL_PATH here so the build system is not confused
+LOCAL_PATH := $(BASE_PATH)
+
+# Define our compiler flags
+LOCAL_CFLAGS += -Wno-endif-labels -Wno-import -Wno-format
+LOCAL_CFLAGS += -fno-strict-aliasing
+LOCAL_CFLAGS += -include "WebCorePrefix.h"
+LOCAL_CFLAGS += -fvisibility=hidden
+
+ifeq ($(TARGET_ARCH),arm)
+LOCAL_CFLAGS += -Darm
+endif
+
+ifeq ($(ENABLE_SVG),true)
+LOCAL_CFLAGS += -DENABLE_SVG=1
+endif
+
+# Temporary disable SVG_ANIMATION.
+ifeq ($(ENABLE_SVG_ANIMATION),true)
+LOCAL_CFLAGS += -DENABLE_SVG_ANIMATION=1
+endif
+
+ifeq ($(WEBCORE_INSTRUMENTATION),true)
+LOCAL_CFLAGS += -DANDROID_INSTRUMENT
+endif
+
+>>>>>>> webkit.org at r54127
# LOCAL_LDLIBS is used in simulator builds only and simulator builds are only
# valid on Linux
LOCAL_LDLIBS += -lpthread -ldl
diff --git a/JavaScriptCore/API/APIShims.h b/JavaScriptCore/API/APIShims.h
new file mode 100644
index 0000000..d7276ec
--- /dev/null
+++ b/JavaScriptCore/API/APIShims.h
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef APIShims_h
+#define APIShims_h
+
+#include "CallFrame.h"
+#include "JSLock.h"
+
+namespace JSC {
+
+class APIEntryShimWithoutLock {
+protected:
+ APIEntryShimWithoutLock(JSGlobalData* globalData, bool registerThread)
+ : m_globalData(globalData)
+ , m_entryIdentifierTable(setCurrentIdentifierTable(globalData->identifierTable))
+ {
+ if (registerThread)
+ globalData->heap.registerThread();
+ m_globalData->timeoutChecker.start();
+ }
+
+ ~APIEntryShimWithoutLock()
+ {
+ m_globalData->timeoutChecker.stop();
+ setCurrentIdentifierTable(m_entryIdentifierTable);
+ }
+
+private:
+ JSGlobalData* m_globalData;
+ IdentifierTable* m_entryIdentifierTable;
+};
+
+class APIEntryShim : public APIEntryShimWithoutLock {
+public:
+ // Normal API entry
+ APIEntryShim(ExecState* exec, bool registerThread = true)
+ : APIEntryShimWithoutLock(&exec->globalData(), registerThread)
+ , m_lock(exec)
+ {
+ }
+
+ // JSPropertyNameAccumulator only has a globalData.
+ APIEntryShim(JSGlobalData* globalData, bool registerThread = true)
+ : APIEntryShimWithoutLock(globalData, registerThread)
+ , m_lock(globalData->isSharedInstance ? LockForReal : SilenceAssertionsOnly)
+ {
+ }
+
+private:
+ JSLock m_lock;
+};
+
+class APICallbackShim {
+public:
+ APICallbackShim(ExecState* exec)
+ : m_dropAllLocks(exec)
+ , m_globalData(&exec->globalData())
+ {
+ resetCurrentIdentifierTable();
+ m_globalData->timeoutChecker.start();
+ }
+
+ ~APICallbackShim()
+ {
+ m_globalData->timeoutChecker.stop();
+ setCurrentIdentifierTable(m_globalData->identifierTable);
+ }
+
+private:
+ JSLock::DropAllLocks m_dropAllLocks;
+ JSGlobalData* m_globalData;
+};
+
+}
+
+#endif
diff --git a/JavaScriptCore/API/JSBase.cpp b/JavaScriptCore/API/JSBase.cpp
index 4a32d35..ebfeafa 100644
--- a/JavaScriptCore/API/JSBase.cpp
+++ b/JavaScriptCore/API/JSBase.cpp
@@ -28,6 +28,7 @@
#include "JSBasePrivate.h"
#include "APICast.h"
+#include "APIShims.h"
#include "Completion.h"
#include "OpaqueJSString.h"
#include "SourceCode.h"
@@ -43,8 +44,7 @@ using namespace JSC;
JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSObject* jsThisObject = toJS(thisObject);
@@ -69,8 +69,7 @@ JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef th
bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
SourceCode source = makeSource(script->ustring(), sourceURL->ustring(), startingLineNumber);
Completion completion = checkSyntax(exec->dynamicGlobalObject()->globalExec(), source);
@@ -94,12 +93,11 @@ void JSGarbageCollect(JSContextRef ctx)
return;
ExecState* exec = toJS(ctx);
- JSGlobalData& globalData = exec->globalData();
-
- JSLock lock(globalData.isSharedInstance ? LockForReal : SilenceAssertionsOnly);
+ APIEntryShim entryShim(exec, false);
+ JSGlobalData& globalData = exec->globalData();
if (!globalData.heap.isBusy())
- globalData.heap.collect();
+ globalData.heap.collectAllGarbage();
// FIXME: Perhaps we should trigger a second mark and sweep
// once the garbage collector is done if this is called when
@@ -109,8 +107,6 @@ void JSGarbageCollect(JSContextRef ctx)
void JSReportExtraMemoryCost(JSContextRef ctx, size_t size)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
-
+ APIEntryShim entryShim(exec);
exec->globalData().heap.reportExtraMemoryCost(size);
}
diff --git a/JavaScriptCore/API/JSBase.h b/JavaScriptCore/API/JSBase.h
index d1ce9b3..2e16720 100644
--- a/JavaScriptCore/API/JSBase.h
+++ b/JavaScriptCore/API/JSBase.h
@@ -65,27 +65,15 @@ typedef struct OpaqueJSValue* JSObjectRef;
/* JavaScript symbol exports */
#undef JS_EXPORT
-#if defined(BUILDING_WX__)
+#if defined(JS_NO_EXPORT)
#define JS_EXPORT
#elif defined(__GNUC__) && !defined(__CC_ARM) && !defined(__ARMCC__)
#define JS_EXPORT __attribute__((visibility("default")))
-#elif defined(_WIN32_WCE)
- #if defined(JS_BUILDING_JS)
- #define JS_EXPORT __declspec(dllexport)
- #elif defined(JS_IMPORT_JS)
- #define JS_EXPORT __declspec(dllimport)
- #else
- #define JS_EXPORT
- #endif
-#elif defined(WIN32) || defined(_WIN32)
- /*
- * TODO: Export symbols with JS_EXPORT when using MSVC.
- * See http://bugs.webkit.org/show_bug.cgi?id=16227
- */
+#elif defined(WIN32) || defined(_WIN32) || defined(_WIN32_WCE)
#if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF)
- #define JS_EXPORT __declspec(dllexport)
+ #define JS_EXPORT __declspec(dllexport)
#else
- #define JS_EXPORT __declspec(dllimport)
+ #define JS_EXPORT __declspec(dllimport)
#endif
#else
#define JS_EXPORT
diff --git a/JavaScriptCore/API/JSCallbackConstructor.cpp b/JavaScriptCore/API/JSCallbackConstructor.cpp
index 1c33962..9c5f6d7 100644
--- a/JavaScriptCore/API/JSCallbackConstructor.cpp
+++ b/JavaScriptCore/API/JSCallbackConstructor.cpp
@@ -26,6 +26,7 @@
#include "config.h"
#include "JSCallbackConstructor.h"
+#include "APIShims.h"
#include "APICast.h"
#include <runtime/JSGlobalObject.h>
#include <runtime/JSLock.h>
@@ -66,7 +67,7 @@ static JSObject* constructJSCallback(ExecState* exec, JSObject* constructor, con
JSValueRef exception = 0;
JSObjectRef result;
{
- JSLock::DropAllLocks dropAllLocks(exec);
+ APICallbackShim callbackShim(exec);
result = callback(ctx, constructorRef, argumentCount, arguments.data(), &exception);
}
if (exception)
diff --git a/JavaScriptCore/API/JSCallbackConstructor.h b/JavaScriptCore/API/JSCallbackConstructor.h
index c4bd7ad..e529947 100644
--- a/JavaScriptCore/API/JSCallbackConstructor.h
+++ b/JavaScriptCore/API/JSCallbackConstructor.h
@@ -41,7 +41,7 @@ public:
static PassRefPtr<Structure> createStructure(JSValue proto)
{
- return Structure::create(proto, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
diff --git a/JavaScriptCore/API/JSCallbackFunction.cpp b/JavaScriptCore/API/JSCallbackFunction.cpp
index b7dd768..0e434d9 100644
--- a/JavaScriptCore/API/JSCallbackFunction.cpp
+++ b/JavaScriptCore/API/JSCallbackFunction.cpp
@@ -27,6 +27,7 @@
#include <wtf/Platform.h>
#include "JSCallbackFunction.h"
+#include "APIShims.h"
#include "APICast.h"
#include "CodeBlock.h"
#include "JSFunction.h"
@@ -61,7 +62,7 @@ JSValue JSCallbackFunction::call(ExecState* exec, JSObject* functionObject, JSVa
JSValueRef exception = 0;
JSValueRef result;
{
- JSLock::DropAllLocks dropAllLocks(exec);
+ APICallbackShim callbackShim(exec);
result = static_cast<JSCallbackFunction*>(functionObject)->m_callback(execRef, functionRef, thisObjRef, argumentCount, arguments.data(), &exception);
}
if (exception)
diff --git a/JavaScriptCore/API/JSCallbackFunction.h b/JavaScriptCore/API/JSCallbackFunction.h
index 0cf25c4..10dae6b 100644
--- a/JavaScriptCore/API/JSCallbackFunction.h
+++ b/JavaScriptCore/API/JSCallbackFunction.h
@@ -41,7 +41,7 @@ public:
// refactor the code so this override isn't necessary
static PassRefPtr<Structure> createStructure(JSValue proto)
{
- return Structure::create(proto, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
private:
diff --git a/JavaScriptCore/API/JSCallbackObject.h b/JavaScriptCore/API/JSCallbackObject.h
index d19890a..adb5b60 100644
--- a/JavaScriptCore/API/JSCallbackObject.h
+++ b/JavaScriptCore/API/JSCallbackObject.h
@@ -50,7 +50,7 @@ public:
static PassRefPtr<Structure> createStructure(JSValue proto)
{
- return Structure::create(proto, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), Base::AnonymousSlotCount);
}
protected:
@@ -61,6 +61,7 @@ private:
virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
virtual bool getOwnPropertySlot(ExecState*, unsigned, PropertySlot&);
+ virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&);
@@ -69,7 +70,7 @@ private:
virtual bool hasInstance(ExecState* exec, JSValue value, JSValue proto);
- virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&);
+ virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
virtual double toNumber(ExecState*) const;
virtual UString toString(ExecState*) const;
diff --git a/JavaScriptCore/API/JSCallbackObjectFunctions.h b/JavaScriptCore/API/JSCallbackObjectFunctions.h
index ed86a00..4b28a99 100644
--- a/JavaScriptCore/API/JSCallbackObjectFunctions.h
+++ b/JavaScriptCore/API/JSCallbackObjectFunctions.h
@@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "APIShims.h"
#include "APICast.h"
#include "Error.h"
#include "JSCallbackFunction.h"
@@ -79,7 +80,7 @@ void JSCallbackObject<Base>::init(ExecState* exec)
// initialize from base to derived
for (int i = static_cast<int>(initRoutines.size()) - 1; i >= 0; i--) {
- JSLock::DropAllLocks dropAllLocks(exec);
+ APICallbackShim callbackShim(exec);
JSObjectInitializeCallback initialize = initRoutines[i];
initialize(toRef(exec), toRef(this));
}
@@ -117,7 +118,7 @@ bool JSCallbackObject<Base>::getOwnPropertySlot(ExecState* exec, const Identifie
if (JSObjectHasPropertyCallback hasProperty = jsClass->hasProperty) {
if (!propertyNameRef)
propertyNameRef = OpaqueJSString::create(propertyName.ustring());
- JSLock::DropAllLocks dropAllLocks(exec);
+ APICallbackShim callbackShim(exec);
if (hasProperty(ctx, thisRef, propertyNameRef.get())) {
slot.setCustom(this, callbackGetter);
return true;
@@ -128,7 +129,7 @@ bool JSCallbackObject<Base>::getOwnPropertySlot(ExecState* exec, const Identifie
JSValueRef exception = 0;
JSValueRef value;
{
- JSLock::DropAllLocks dropAllLocks(exec);
+ APICallbackShim callbackShim(exec);
value = getProperty(ctx, thisRef, propertyNameRef.get(), &exception);
}
if (exception) {
@@ -167,6 +168,25 @@ bool JSCallbackObject<Base>::getOwnPropertySlot(ExecState* exec, unsigned proper
}
template <class Base>
+bool JSCallbackObject<Base>::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ PropertySlot slot;
+ if (getOwnPropertySlot(exec, propertyName, slot)) {
+ // Ideally we should return an access descriptor, but returning a value descriptor is better than nothing.
+ JSValue value = slot.getValue(exec, propertyName);
+ if (!exec->hadException())
+ descriptor.setValue(value);
+ // We don't know whether the property is configurable, but assume it is.
+ descriptor.setConfigurable(true);
+ // We don't know whether the property is enumerable (we could call getOwnPropertyNames() to find out), but assume it isn't.
+ descriptor.setEnumerable(false);
+ return true;
+ }
+
+ return Base::getOwnPropertyDescriptor(exec, propertyName, descriptor);
+}
+
+template <class Base>
void JSCallbackObject<Base>::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
{
JSContextRef ctx = toRef(exec);
@@ -181,7 +201,7 @@ void JSCallbackObject<Base>::put(ExecState* exec, const Identifier& propertyName
JSValueRef exception = 0;
bool result;
{
- JSLock::DropAllLocks dropAllLocks(exec);
+ APICallbackShim callbackShim(exec);
result = setProperty(ctx, thisRef, propertyNameRef.get(), valueRef, &exception);
}
if (exception)
@@ -200,7 +220,7 @@ void JSCallbackObject<Base>::put(ExecState* exec, const Identifier& propertyName
JSValueRef exception = 0;
bool result;
{
- JSLock::DropAllLocks dropAllLocks(exec);
+ APICallbackShim callbackShim(exec);
result = setProperty(ctx, thisRef, propertyNameRef.get(), valueRef, &exception);
}
if (exception)
@@ -239,7 +259,7 @@ bool JSCallbackObject<Base>::deleteProperty(ExecState* exec, const Identifier& p
JSValueRef exception = 0;
bool result;
{
- JSLock::DropAllLocks dropAllLocks(exec);
+ APICallbackShim callbackShim(exec);
result = deleteProperty(ctx, thisRef, propertyNameRef.get(), &exception);
}
if (exception)
@@ -301,7 +321,7 @@ JSObject* JSCallbackObject<Base>::construct(ExecState* exec, JSObject* construct
JSValueRef exception = 0;
JSObject* result;
{
- JSLock::DropAllLocks dropAllLocks(exec);
+ APICallbackShim callbackShim(exec);
result = toJS(callAsConstructor(execRef, constructorRef, argumentCount, arguments.data(), &exception));
}
if (exception)
@@ -326,7 +346,7 @@ bool JSCallbackObject<Base>::hasInstance(ExecState* exec, JSValue value, JSValue
JSValueRef exception = 0;
bool result;
{
- JSLock::DropAllLocks dropAllLocks(exec);
+ APICallbackShim callbackShim(exec);
result = hasInstance(execRef, thisRef, valueRef, &exception);
}
if (exception)
@@ -365,7 +385,7 @@ JSValue JSCallbackObject<Base>::call(ExecState* exec, JSObject* functionObject,
JSValueRef exception = 0;
JSValue result;
{
- JSLock::DropAllLocks dropAllLocks(exec);
+ APICallbackShim callbackShim(exec);
result = toJS(exec, callAsFunction(execRef, functionRef, thisObjRef, argumentCount, arguments.data(), &exception));
}
if (exception)
@@ -379,14 +399,14 @@ JSValue JSCallbackObject<Base>::call(ExecState* exec, JSObject* functionObject,
}
template <class Base>
-void JSCallbackObject<Base>::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void JSCallbackObject<Base>::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
JSContextRef execRef = toRef(exec);
JSObjectRef thisRef = toRef(this);
for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) {
if (JSObjectGetPropertyNamesCallback getPropertyNames = jsClass->getPropertyNames) {
- JSLock::DropAllLocks dropAllLocks(exec);
+ APICallbackShim callbackShim(exec);
getPropertyNames(execRef, thisRef, toRef(&propertyNames));
}
@@ -396,7 +416,7 @@ void JSCallbackObject<Base>::getOwnPropertyNames(ExecState* exec, PropertyNameAr
for (iterator it = staticValues->begin(); it != end; ++it) {
UString::Rep* name = it->first.get();
StaticValueEntry* entry = it->second;
- if (entry->getProperty && !(entry->attributes & kJSPropertyAttributeDontEnum))
+ if (entry->getProperty && (!(entry->attributes & kJSPropertyAttributeDontEnum) || (mode == IncludeDontEnumProperties)))
propertyNames.add(Identifier(exec, name));
}
}
@@ -407,13 +427,13 @@ void JSCallbackObject<Base>::getOwnPropertyNames(ExecState* exec, PropertyNameAr
for (iterator it = staticFunctions->begin(); it != end; ++it) {
UString::Rep* name = it->first.get();
StaticFunctionEntry* entry = it->second;
- if (!(entry->attributes & kJSPropertyAttributeDontEnum))
+ if (!(entry->attributes & kJSPropertyAttributeDontEnum) || (mode == IncludeDontEnumProperties))
propertyNames.add(Identifier(exec, name));
}
}
}
- Base::getOwnPropertyNames(exec, propertyNames);
+ Base::getOwnPropertyNames(exec, propertyNames, mode);
}
template <class Base>
@@ -432,7 +452,7 @@ double JSCallbackObject<Base>::toNumber(ExecState* exec) const
JSValueRef exception = 0;
JSValueRef value;
{
- JSLock::DropAllLocks dropAllLocks(exec);
+ APICallbackShim callbackShim(exec);
value = convertToType(ctx, thisRef, kJSTypeNumber, &exception);
}
if (exception) {
@@ -459,7 +479,7 @@ UString JSCallbackObject<Base>::toString(ExecState* exec) const
JSValueRef exception = 0;
JSValueRef value;
{
- JSLock::DropAllLocks dropAllLocks(exec);
+ APICallbackShim callbackShim(exec);
value = convertToType(ctx, thisRef, kJSTypeString, &exception);
}
if (exception) {
@@ -512,7 +532,7 @@ JSValue JSCallbackObject<Base>::staticValueGetter(ExecState* exec, const Identif
JSValueRef exception = 0;
JSValueRef value;
{
- JSLock::DropAllLocks dropAllLocks(exec);
+ APICallbackShim callbackShim(exec);
value = getProperty(toRef(exec), thisRef, propertyNameRef.get(), &exception);
}
if (exception) {
@@ -566,7 +586,7 @@ JSValue JSCallbackObject<Base>::callbackGetter(ExecState* exec, const Identifier
JSValueRef exception = 0;
JSValueRef value;
{
- JSLock::DropAllLocks dropAllLocks(exec);
+ APICallbackShim callbackShim(exec);
value = getProperty(toRef(exec), thisRef, propertyNameRef.get(), &exception);
}
if (exception) {
diff --git a/JavaScriptCore/API/JSClassRef.cpp b/JavaScriptCore/API/JSClassRef.cpp
index afde7ce..c6685bf 100644
--- a/JavaScriptCore/API/JSClassRef.cpp
+++ b/JavaScriptCore/API/JSClassRef.cpp
@@ -34,6 +34,7 @@
#include <runtime/ObjectPrototype.h>
#include <runtime/Identifier.h>
+using namespace std;
using namespace JSC;
const JSClassDefinition kJSClassDefinitionEmpty = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
@@ -52,7 +53,7 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass*
, callAsConstructor(definition->callAsConstructor)
, hasInstance(definition->hasInstance)
, convertToType(definition->convertToType)
- , m_className(UString::Rep::createFromUTF8(definition->className))
+ , m_className(UString::createFromUTF8(definition->className).rep()->ref())
, m_staticValues(0)
, m_staticFunctions(0)
{
@@ -61,8 +62,9 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass*
if (const JSStaticValue* staticValue = definition->staticValues) {
m_staticValues = new OpaqueJSClassStaticValuesTable();
while (staticValue->name) {
- m_staticValues->add(UString::Rep::createFromUTF8(staticValue->name),
- new StaticValueEntry(staticValue->getProperty, staticValue->setProperty, staticValue->attributes));
+ // Use a local variable here to sidestep an RVCT compiler bug.
+ StaticValueEntry* entry = new StaticValueEntry(staticValue->getProperty, staticValue->setProperty, staticValue->attributes);
+ m_staticValues->add(UString::createFromUTF8(staticValue->name).rep()->ref(), entry);
++staticValue;
}
}
@@ -70,8 +72,9 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass*
if (const JSStaticFunction* staticFunction = definition->staticFunctions) {
m_staticFunctions = new OpaqueJSClassStaticFunctionsTable();
while (staticFunction->name) {
- m_staticFunctions->add(UString::Rep::createFromUTF8(staticFunction->name),
- new StaticFunctionEntry(staticFunction->callAsFunction, staticFunction->attributes));
+ // Use a local variable here to sidestep an RVCT compiler bug.
+ StaticFunctionEntry* entry = new StaticFunctionEntry(staticFunction->callAsFunction, staticFunction->attributes);
+ m_staticFunctions->add(UString::createFromUTF8(staticFunction->name).rep()->ref(), entry);
++staticFunction;
}
}
@@ -82,12 +85,12 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass*
OpaqueJSClass::~OpaqueJSClass()
{
- ASSERT(!m_className.rep()->identifierTable());
+ ASSERT(!m_className.rep()->isIdentifier());
if (m_staticValues) {
OpaqueJSClassStaticValuesTable::const_iterator end = m_staticValues->end();
for (OpaqueJSClassStaticValuesTable::const_iterator it = m_staticValues->begin(); it != end; ++it) {
- ASSERT(!it->first->identifierTable());
+ ASSERT(!it->first->isIdentifier());
delete it->second;
}
delete m_staticValues;
@@ -96,7 +99,7 @@ OpaqueJSClass::~OpaqueJSClass()
if (m_staticFunctions) {
OpaqueJSClassStaticFunctionsTable::const_iterator end = m_staticFunctions->end();
for (OpaqueJSClassStaticFunctionsTable::const_iterator it = m_staticFunctions->begin(); it != end; ++it) {
- ASSERT(!it->first->identifierTable());
+ ASSERT(!it->first->isIdentifier());
delete it->second;
}
delete m_staticFunctions;
@@ -118,39 +121,32 @@ static void clearReferenceToPrototype(JSObjectRef prototype)
jsClassData->cachedPrototype = 0;
}
-PassRefPtr<OpaqueJSClass> OpaqueJSClass::create(const JSClassDefinition* definition)
+PassRefPtr<OpaqueJSClass> OpaqueJSClass::create(const JSClassDefinition* clientDefinition)
{
- if (const JSStaticFunction* staticFunctions = definition->staticFunctions) {
- // copy functions into a prototype class
- JSClassDefinition protoDefinition = kJSClassDefinitionEmpty;
- protoDefinition.staticFunctions = staticFunctions;
- protoDefinition.finalize = clearReferenceToPrototype;
-
- // We are supposed to use JSClassRetain/Release but since we know that we currently have
- // the only reference to this class object we cheat and use a RefPtr instead.
- RefPtr<OpaqueJSClass> protoClass = adoptRef(new OpaqueJSClass(&protoDefinition, 0));
-
- // remove functions from the original class
- JSClassDefinition objectDefinition = *definition;
- objectDefinition.staticFunctions = 0;
-
- return adoptRef(new OpaqueJSClass(&objectDefinition, protoClass.get()));
- }
+ JSClassDefinition definition = *clientDefinition; // Avoid modifying client copy.
- return adoptRef(new OpaqueJSClass(definition, 0));
+ JSClassDefinition protoDefinition = kJSClassDefinitionEmpty;
+ protoDefinition.finalize = clearReferenceToPrototype;
+ swap(definition.staticFunctions, protoDefinition.staticFunctions); // Move static functions to the prototype.
+
+ // We are supposed to use JSClassRetain/Release but since we know that we currently have
+ // the only reference to this class object we cheat and use a RefPtr instead.
+ RefPtr<OpaqueJSClass> protoClass = adoptRef(new OpaqueJSClass(&protoDefinition, 0));
+ return adoptRef(new OpaqueJSClass(&definition, protoClass.get()));
}
OpaqueJSClassContextData::OpaqueJSClassContextData(OpaqueJSClass* jsClass)
: m_class(jsClass)
- , cachedPrototype(0)
{
if (jsClass->m_staticValues) {
staticValues = new OpaqueJSClassStaticValuesTable;
OpaqueJSClassStaticValuesTable::const_iterator end = jsClass->m_staticValues->end();
for (OpaqueJSClassStaticValuesTable::const_iterator it = jsClass->m_staticValues->begin(); it != end; ++it) {
- ASSERT(!it->first->identifierTable());
- staticValues->add(UString::Rep::createCopying(it->first->data(), it->first->size()),
- new StaticValueEntry(it->second->getProperty, it->second->setProperty, it->second->attributes));
+ ASSERT(!it->first->isIdentifier());
+ // Use a local variable here to sidestep an RVCT compiler bug.
+ StaticValueEntry* entry = new StaticValueEntry(it->second->getProperty, it->second->setProperty, it->second->attributes);
+ staticValues->add(UString::Rep::create(it->first->data(), it->first->size()), entry);
+
}
} else
@@ -161,9 +157,10 @@ OpaqueJSClassContextData::OpaqueJSClassContextData(OpaqueJSClass* jsClass)
staticFunctions = new OpaqueJSClassStaticFunctionsTable;
OpaqueJSClassStaticFunctionsTable::const_iterator end = jsClass->m_staticFunctions->end();
for (OpaqueJSClassStaticFunctionsTable::const_iterator it = jsClass->m_staticFunctions->begin(); it != end; ++it) {
- ASSERT(!it->first->identifierTable());
- staticFunctions->add(UString::Rep::createCopying(it->first->data(), it->first->size()),
- new StaticFunctionEntry(it->second->callAsFunction, it->second->attributes));
+ ASSERT(!it->first->isIdentifier());
+ // Use a local variable here to sidestep an RVCT compiler bug.
+ StaticFunctionEntry* entry = new StaticFunctionEntry(it->second->callAsFunction, it->second->attributes);
+ staticFunctions->add(UString::Rep::create(it->first->data(), it->first->size()), entry);
}
} else
@@ -240,5 +237,5 @@ JSObject* OpaqueJSClass::prototype(ExecState* exec)
jsClassData.cachedPrototype->setPrototype(prototype);
}
}
- return jsClassData.cachedPrototype;
+ return jsClassData.cachedPrototype.get();
}
diff --git a/JavaScriptCore/API/JSClassRef.h b/JavaScriptCore/API/JSClassRef.h
index c4777dd..ae60aad 100644
--- a/JavaScriptCore/API/JSClassRef.h
+++ b/JavaScriptCore/API/JSClassRef.h
@@ -31,6 +31,7 @@
#include <runtime/JSObject.h>
#include <runtime/Protect.h>
#include <runtime/UString.h>
+#include <runtime/WeakGCPtr.h>
#include <wtf/HashMap.h>
#include <wtf/RefCounted.h>
@@ -76,7 +77,7 @@ struct OpaqueJSClassContextData : Noncopyable {
OpaqueJSClassStaticValuesTable* staticValues;
OpaqueJSClassStaticFunctionsTable* staticFunctions;
- JSC::JSObject* cachedPrototype;
+ JSC::WeakGCPtr<JSC::JSObject> cachedPrototype;
};
struct OpaqueJSClass : public ThreadSafeShared<OpaqueJSClass> {
diff --git a/JavaScriptCore/API/JSContextRef.cpp b/JavaScriptCore/API/JSContextRef.cpp
index e6626b7..6bdc3c8 100644
--- a/JavaScriptCore/API/JSContextRef.cpp
+++ b/JavaScriptCore/API/JSContextRef.cpp
@@ -35,7 +35,7 @@
#include "JSObject.h"
#include <wtf/Platform.h>
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
#include <mach-o/dyld.h>
static const int32_t webkitFirstVersionWithConcurrentGlobalContexts = 0x2100500; // 528.5.0
@@ -46,7 +46,7 @@ using namespace JSC;
JSContextGroupRef JSContextGroupCreate()
{
initializeThreading();
- return toRef(JSGlobalData::create().releaseRef());
+ return toRef(JSGlobalData::createNonDefault().releaseRef());
}
JSContextGroupRef JSContextGroupRetain(JSContextGroupRef group)
@@ -63,7 +63,7 @@ void JSContextGroupRelease(JSContextGroupRef group)
JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass)
{
initializeThreading();
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
// When running on Tiger or Leopard, or if the application was linked before JSGlobalContextCreate was changed
// to use a unique JSGlobalData, we use a shared one for compatibility.
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
@@ -74,7 +74,7 @@ JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass)
JSLock lock(LockForReal);
return JSGlobalContextCreateInGroup(toRef(&JSGlobalData::sharedInstance()), globalObjectClass);
}
-#endif // PLATFORM(DARWIN)
+#endif // OS(DARWIN)
return JSGlobalContextCreateInGroup(0, globalObjectClass);
}
@@ -84,8 +84,9 @@ JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClass
initializeThreading();
JSLock lock(LockForReal);
+ RefPtr<JSGlobalData> globalData = group ? PassRefPtr<JSGlobalData>(toJS(group)) : JSGlobalData::createNonDefault();
- RefPtr<JSGlobalData> globalData = group ? PassRefPtr<JSGlobalData>(toJS(group)) : JSGlobalData::create();
+ APIEntryShim entryShim(globalData.get(), false);
#if ENABLE(JSC_MULTIPLE_THREADS)
globalData->makeUsableFromMultipleThreads();
@@ -108,12 +109,9 @@ JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClass
JSGlobalContextRef JSGlobalContextRetain(JSGlobalContextRef ctx)
{
ExecState* exec = toJS(ctx);
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSGlobalData& globalData = exec->globalData();
-
- globalData.heap.registerThread();
-
gcProtect(exec->dynamicGlobalObject());
globalData.ref();
return ctx;
@@ -122,18 +120,16 @@ JSGlobalContextRef JSGlobalContextRetain(JSGlobalContextRef ctx)
void JSGlobalContextRelease(JSGlobalContextRef ctx)
{
ExecState* exec = toJS(ctx);
- JSLock lock(exec);
+ APIEntryShim entryShim(exec, false);
gcUnprotect(exec->dynamicGlobalObject());
JSGlobalData& globalData = exec->globalData();
if (globalData.refCount() == 2) { // One reference is held by JSGlobalObject, another added by JSGlobalContextRetain().
// The last reference was released, this is our last chance to collect.
- ASSERT(!globalData.heap.protectedObjectCount());
- ASSERT(!globalData.heap.isBusy());
globalData.heap.destroy();
} else
- globalData.heap.collect();
+ globalData.heap.collectAllGarbage();
globalData.deref();
}
@@ -141,8 +137,7 @@ void JSGlobalContextRelease(JSGlobalContextRef ctx)
JSObjectRef JSContextGetGlobalObject(JSContextRef ctx)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
// It is necessary to call toThisObject to get the wrapper object when used with WebCore.
return toRef(exec->lexicalGlobalObject()->toThisObject(exec));
@@ -157,8 +152,7 @@ JSContextGroupRef JSContextGetGroup(JSContextRef ctx)
JSGlobalContextRef JSContextGetGlobalContext(JSContextRef ctx)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
return toGlobalRef(exec->lexicalGlobalObject()->globalExec());
}
diff --git a/JavaScriptCore/API/JSObjectRef.cpp b/JavaScriptCore/API/JSObjectRef.cpp
index 06ef578..faaa4eb 100644
--- a/JavaScriptCore/API/JSObjectRef.cpp
+++ b/JavaScriptCore/API/JSObjectRef.cpp
@@ -76,8 +76,7 @@ void JSClassRelease(JSClassRef jsClass)
JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
if (!jsClass)
return toRef(new (exec) JSObject(exec->lexicalGlobalObject()->emptyObjectStructure())); // slightly more efficient
@@ -92,8 +91,7 @@ JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data)
JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, JSObjectCallAsFunctionCallback callAsFunction)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
Identifier nameID = name ? name->identifier(&exec->globalData()) : Identifier(exec, "anonymous");
@@ -103,8 +101,7 @@ JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name,
JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObjectCallAsConstructorCallback callAsConstructor)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsPrototype = jsClass ? jsClass->prototype(exec) : 0;
if (!jsPrototype)
@@ -118,8 +115,7 @@ JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObje
JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
Identifier nameID = name ? name->identifier(&exec->globalData()) : Identifier(exec, "anonymous");
@@ -141,8 +137,7 @@ JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned pa
JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSObject* result;
if (argumentCount) {
@@ -167,8 +162,7 @@ JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSVa
JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
MarkedArgumentBuffer argList;
for (size_t i = 0; i < argumentCount; ++i)
@@ -188,8 +182,7 @@ JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSVal
JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
MarkedArgumentBuffer argList;
for (size_t i = 0; i < argumentCount; ++i)
@@ -209,8 +202,7 @@ JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSVa
JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
MarkedArgumentBuffer argList;
for (size_t i = 0; i < argumentCount; ++i)
@@ -230,8 +222,7 @@ JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSV
JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSObject* jsObject = toJS(object);
return toRef(exec, jsObject->prototype());
@@ -240,8 +231,7 @@ JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object)
void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSObject* jsObject = toJS(object);
JSValue jsValue = toJS(exec, value);
@@ -252,8 +242,7 @@ void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value
bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSObject* jsObject = toJS(object);
@@ -263,8 +252,7 @@ bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef prope
JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSObject* jsObject = toJS(object);
@@ -280,8 +268,7 @@ JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef
void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSObject* jsObject = toJS(object);
Identifier name(propertyName->identifier(&exec->globalData()));
@@ -304,8 +291,7 @@ void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef prope
JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSObject* jsObject = toJS(object);
@@ -322,8 +308,7 @@ JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsi
void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef value, JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSObject* jsObject = toJS(object);
JSValue jsValue = toJS(exec, value);
@@ -339,8 +324,7 @@ void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned p
bool JSObjectDeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSObject* jsObject = toJS(object);
@@ -389,8 +373,7 @@ bool JSObjectIsFunction(JSContextRef, JSObjectRef object)
JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSObject* jsObject = toJS(object);
JSObject* jsThisObject = toJS(thisObject);
@@ -427,8 +410,7 @@ bool JSObjectIsConstructor(JSContextRef, JSObjectRef object)
JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSObject* jsObject = toJS(object);
@@ -466,8 +448,7 @@ JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef o
{
JSObject* jsObject = toJS(object);
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSGlobalData* globalData = &exec->globalData();
@@ -492,7 +473,7 @@ JSPropertyNameArrayRef JSPropertyNameArrayRetain(JSPropertyNameArrayRef array)
void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array)
{
if (--array->refCount == 0) {
- JSLock lock(array->globalData->isSharedInstance ? LockForReal : SilenceAssertionsOnly);
+ APIEntryShim entryShim(array->globalData, false);
delete array;
}
}
@@ -510,9 +491,6 @@ JSStringRef JSPropertyNameArrayGetNameAtIndex(JSPropertyNameArrayRef array, size
void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef array, JSStringRef propertyName)
{
PropertyNameArray* propertyNames = toJS(array);
-
- propertyNames->globalData()->heap.registerThread();
- JSLock lock(propertyNames->globalData()->isSharedInstance ? LockForReal : SilenceAssertionsOnly);
-
+ APIEntryShim entryShim(propertyNames->globalData());
propertyNames->add(propertyName->identifier(propertyNames->globalData()));
}
diff --git a/JavaScriptCore/API/JSValueRef.cpp b/JavaScriptCore/API/JSValueRef.cpp
index 31859d6..a12cc34 100644
--- a/JavaScriptCore/API/JSValueRef.cpp
+++ b/JavaScriptCore/API/JSValueRef.cpp
@@ -28,6 +28,7 @@
#include <wtf/Platform.h>
#include "APICast.h"
+#include "APIShims.h"
#include "JSCallbackObject.h"
#include <runtime/JSGlobalObject.h>
@@ -41,13 +42,14 @@
#include <algorithm> // for std::min
-JSType JSValueGetType(JSContextRef ctx, JSValueRef value)
+using namespace JSC;
+
+::JSType JSValueGetType(JSContextRef ctx, JSValueRef value)
{
- JSC::ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSC::JSLock lock(exec);
+ ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
- JSC::JSValue jsValue = toJS(exec, value);
+ JSValue jsValue = toJS(exec, value);
if (jsValue.isUndefined())
return kJSTypeUndefined;
@@ -63,13 +65,10 @@ JSType JSValueGetType(JSContextRef ctx, JSValueRef value)
return kJSTypeObject;
}
-using namespace JSC; // placed here to avoid conflict between JSC::JSType and JSType, above.
-
bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsValue = toJS(exec, value);
return jsValue.isUndefined();
@@ -78,8 +77,7 @@ bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value)
bool JSValueIsNull(JSContextRef ctx, JSValueRef value)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsValue = toJS(exec, value);
return jsValue.isNull();
@@ -88,8 +86,7 @@ bool JSValueIsNull(JSContextRef ctx, JSValueRef value)
bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsValue = toJS(exec, value);
return jsValue.isBoolean();
@@ -98,8 +95,7 @@ bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value)
bool JSValueIsNumber(JSContextRef ctx, JSValueRef value)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsValue = toJS(exec, value);
return jsValue.isNumber();
@@ -108,8 +104,7 @@ bool JSValueIsNumber(JSContextRef ctx, JSValueRef value)
bool JSValueIsString(JSContextRef ctx, JSValueRef value)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsValue = toJS(exec, value);
return jsValue.isString();
@@ -118,8 +113,7 @@ bool JSValueIsString(JSContextRef ctx, JSValueRef value)
bool JSValueIsObject(JSContextRef ctx, JSValueRef value)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsValue = toJS(exec, value);
return jsValue.isObject();
@@ -128,8 +122,7 @@ bool JSValueIsObject(JSContextRef ctx, JSValueRef value)
bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsClass)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsValue = toJS(exec, value);
@@ -145,8 +138,7 @@ bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsCla
bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsA = toJS(exec, a);
JSValue jsB = toJS(exec, b);
@@ -163,8 +155,7 @@ bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* ex
bool JSValueIsStrictEqual(JSContextRef ctx, JSValueRef a, JSValueRef b)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsA = toJS(exec, a);
JSValue jsB = toJS(exec, b);
@@ -175,8 +166,7 @@ bool JSValueIsStrictEqual(JSContextRef ctx, JSValueRef a, JSValueRef b)
bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObjectRef constructor, JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsValue = toJS(exec, value);
@@ -195,8 +185,7 @@ bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObject
JSValueRef JSValueMakeUndefined(JSContextRef ctx)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
return toRef(exec, jsUndefined());
}
@@ -204,8 +193,7 @@ JSValueRef JSValueMakeUndefined(JSContextRef ctx)
JSValueRef JSValueMakeNull(JSContextRef ctx)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
return toRef(exec, jsNull());
}
@@ -213,8 +201,7 @@ JSValueRef JSValueMakeNull(JSContextRef ctx)
JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool value)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
return toRef(exec, jsBoolean(value));
}
@@ -222,8 +209,7 @@ JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool value)
JSValueRef JSValueMakeNumber(JSContextRef ctx, double value)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
return toRef(exec, jsNumber(exec, value));
}
@@ -231,8 +217,7 @@ JSValueRef JSValueMakeNumber(JSContextRef ctx, double value)
JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
return toRef(exec, jsString(exec, string->ustring()));
}
@@ -240,8 +225,7 @@ JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string)
bool JSValueToBoolean(JSContextRef ctx, JSValueRef value)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsValue = toJS(exec, value);
return jsValue.toBoolean(exec);
@@ -250,8 +234,7 @@ bool JSValueToBoolean(JSContextRef ctx, JSValueRef value)
double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsValue = toJS(exec, value);
@@ -268,8 +251,7 @@ double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception
JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsValue = toJS(exec, value);
@@ -286,8 +268,7 @@ JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef*
JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exception)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsValue = toJS(exec, value);
@@ -304,8 +285,7 @@ JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exce
void JSValueProtect(JSContextRef ctx, JSValueRef value)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsValue = toJSForGC(exec, value);
gcProtect(jsValue);
@@ -314,8 +294,7 @@ void JSValueProtect(JSContextRef ctx, JSValueRef value)
void JSValueUnprotect(JSContextRef ctx, JSValueRef value)
{
ExecState* exec = toJS(ctx);
- exec->globalData().heap.registerThread();
- JSLock lock(exec);
+ APIEntryShim entryShim(exec);
JSValue jsValue = toJSForGC(exec, value);
gcUnprotect(jsValue);
diff --git a/JavaScriptCore/API/OpaqueJSString.cpp b/JavaScriptCore/API/OpaqueJSString.cpp
index 7c7b1af..f740abe 100644
--- a/JavaScriptCore/API/OpaqueJSString.cpp
+++ b/JavaScriptCore/API/OpaqueJSString.cpp
@@ -42,7 +42,7 @@ PassRefPtr<OpaqueJSString> OpaqueJSString::create(const UString& ustring)
UString OpaqueJSString::ustring() const
{
if (this && m_characters)
- return UString(m_characters, m_length, true);
+ return UString(m_characters, m_length);
return UString::null();
}
diff --git a/JavaScriptCore/API/tests/testapi.c b/JavaScriptCore/API/tests/testapi.c
index e7aba0f..ebc0cfb 100644
--- a/JavaScriptCore/API/tests/testapi.c
+++ b/JavaScriptCore/API/tests/testapi.c
@@ -623,6 +623,17 @@ static JSClassRef Derived_class(JSContextRef context)
return jsClass;
}
+static JSClassRef Derived2_class(JSContextRef context)
+{
+ static JSClassRef jsClass;
+ if (!jsClass) {
+ JSClassDefinition definition = kJSClassDefinitionEmpty;
+ definition.parentClass = Derived_class(context);
+ jsClass = JSClassCreate(&definition);
+ }
+ return jsClass;
+}
+
static JSValueRef print_callAsFunction(JSContextRef ctx, JSObjectRef functionObject, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
UNUSED_PARAM(functionObject);
@@ -1070,11 +1081,21 @@ int main(int argc, char* argv[])
ASSERT(!JSObjectSetPrivate(myConstructor, (void*)1));
ASSERT(!JSObjectGetPrivate(myConstructor));
+ string = JSStringCreateWithUTF8CString("Base");
+ JSObjectRef baseConstructor = JSObjectMakeConstructor(context, Base_class(context), NULL);
+ JSObjectSetProperty(context, globalObject, string, baseConstructor, kJSPropertyAttributeNone, NULL);
+ JSStringRelease(string);
+
string = JSStringCreateWithUTF8CString("Derived");
JSObjectRef derivedConstructor = JSObjectMakeConstructor(context, Derived_class(context), NULL);
JSObjectSetProperty(context, globalObject, string, derivedConstructor, kJSPropertyAttributeNone, NULL);
JSStringRelease(string);
+ string = JSStringCreateWithUTF8CString("Derived2");
+ JSObjectRef derived2Constructor = JSObjectMakeConstructor(context, Derived2_class(context), NULL);
+ JSObjectSetProperty(context, globalObject, string, derived2Constructor, kJSPropertyAttributeNone, NULL);
+ JSStringRelease(string);
+
o = JSObjectMake(context, NULL, NULL);
JSObjectSetProperty(context, o, jsOneIString, JSValueMakeNumber(context, 1), kJSPropertyAttributeNone, NULL);
JSObjectSetProperty(context, o, jsCFIString, JSValueMakeNumber(context, 1), kJSPropertyAttributeDontEnum, NULL);
@@ -1173,7 +1194,7 @@ int main(int argc, char* argv[])
} else {
script = JSStringCreateWithUTF8CString(scriptUTF8);
result = JSEvaluateScript(context, script, NULL, NULL, 1, &exception);
- if (JSValueIsUndefined(context, result))
+ if (result && JSValueIsUndefined(context, result))
printf("PASS: Test script executed successfully.\n");
else {
printf("FAIL: Test script returned unexpected value:\n");
diff --git a/JavaScriptCore/API/tests/testapi.js b/JavaScriptCore/API/tests/testapi.js
index 82756b5..15c9e50 100644
--- a/JavaScriptCore/API/tests/testapi.js
+++ b/JavaScriptCore/API/tests/testapi.js
@@ -113,6 +113,35 @@ if (foundRegularType)
else
fail("MyObject.regularType was not enumerated");
+var alwaysOneDescriptor = Object.getOwnPropertyDescriptor(MyObject, "alwaysOne");
+shouldBe('typeof alwaysOneDescriptor', "object");
+shouldBe('alwaysOneDescriptor.value', MyObject.alwaysOne);
+shouldBe('alwaysOneDescriptor.configurable', true);
+shouldBe('alwaysOneDescriptor.enumerable', false); // Actually it is.
+var cantFindDescriptor = Object.getOwnPropertyDescriptor(MyObject, "cantFind");
+shouldBe('typeof cantFindDescriptor', "object");
+shouldBe('cantFindDescriptor.value', MyObject.cantFind);
+shouldBe('cantFindDescriptor.configurable', true);
+shouldBe('cantFindDescriptor.enumerable', false);
+try {
+ // If getOwnPropertyDescriptor() returned an access descriptor, this wouldn't throw.
+ Object.getOwnPropertyDescriptor(MyObject, "throwOnGet");
+} catch (e) {
+ pass("getting property descriptor of throwOnGet threw exception");
+}
+var myPropertyNameDescriptor = Object.getOwnPropertyDescriptor(MyObject, "myPropertyName");
+shouldBe('typeof myPropertyNameDescriptor', "object");
+shouldBe('myPropertyNameDescriptor.value', MyObject.myPropertyName);
+shouldBe('myPropertyNameDescriptor.configurable', true);
+shouldBe('myPropertyNameDescriptor.enumerable', false); // Actually it is.
+try {
+ // if getOwnPropertyDescriptor() returned an access descriptor, this wouldn't throw.
+ Object.getOwnPropertyDescriptor(MyObject, "hasPropertyLie");
+} catch (e) {
+ pass("getting property descriptor of hasPropertyLie threw exception");
+}
+shouldBe('Object.getOwnPropertyDescriptor(MyObject, "doesNotExist")', undefined);
+
myObject = new MyObject();
shouldBe("delete MyObject.regularType", true);
@@ -140,6 +169,9 @@ shouldThrow("MyObject.hasPropertyLie");
derived = new Derived();
+shouldBe("derived instanceof Derived", true);
+shouldBe("derived instanceof Base", true);
+
// base properties and functions return 1 when called/gotten; derived, 2
shouldBe("derived.baseProtoDup()", 2);
shouldBe("derived.baseProto()", 1);
@@ -155,6 +187,51 @@ shouldBe("derived.baseOnly = 0", 1);
shouldBe("derived.derivedOnly = 0", 2)
shouldBe("derived.protoDup = 0", 2);
+derived2 = new Derived2();
+
+shouldBe("derived2 instanceof Derived2", true);
+shouldBe("derived2 instanceof Derived", true);
+shouldBe("derived2 instanceof Base", true);
+
+// base properties and functions return 1 when called/gotten; derived, 2
+shouldBe("derived2.baseProtoDup()", 2);
+shouldBe("derived2.baseProto()", 1);
+shouldBe("derived2.baseDup", 2);
+shouldBe("derived2.baseOnly", 1);
+shouldBe("derived2.protoOnly()", 2);
+shouldBe("derived2.protoDup", 2);
+shouldBe("derived2.derivedOnly", 2)
+
+// base properties throw 1 when set; derived, 2
+shouldBe("derived2.baseDup = 0", 2);
+shouldBe("derived2.baseOnly = 0", 1);
+shouldBe("derived2.derivedOnly = 0", 2)
+shouldBe("derived2.protoDup = 0", 2);
+
+shouldBe('Object.getOwnPropertyDescriptor(derived, "baseProto")', undefined);
+shouldBe('Object.getOwnPropertyDescriptor(derived, "baseProtoDup")', undefined);
+var baseDupDescriptor = Object.getOwnPropertyDescriptor(derived, "baseDup");
+shouldBe('typeof baseDupDescriptor', "object");
+shouldBe('baseDupDescriptor.value', derived.baseDup);
+shouldBe('baseDupDescriptor.configurable', true);
+shouldBe('baseDupDescriptor.enumerable', false);
+var baseOnlyDescriptor = Object.getOwnPropertyDescriptor(derived, "baseOnly");
+shouldBe('typeof baseOnlyDescriptor', "object");
+shouldBe('baseOnlyDescriptor.value', derived.baseOnly);
+shouldBe('baseOnlyDescriptor.configurable', true);
+shouldBe('baseOnlyDescriptor.enumerable', false);
+shouldBe('Object.getOwnPropertyDescriptor(derived, "protoOnly")', undefined);
+var protoDupDescriptor = Object.getOwnPropertyDescriptor(derived, "protoDup");
+shouldBe('typeof protoDupDescriptor', "object");
+shouldBe('protoDupDescriptor.value', derived.protoDup);
+shouldBe('protoDupDescriptor.configurable', true);
+shouldBe('protoDupDescriptor.enumerable', false);
+var derivedOnlyDescriptor = Object.getOwnPropertyDescriptor(derived, "derivedOnly");
+shouldBe('typeof derivedOnlyDescriptor', "object");
+shouldBe('derivedOnlyDescriptor.value', derived.derivedOnly);
+shouldBe('derivedOnlyDescriptor.configurable', true);
+shouldBe('derivedOnlyDescriptor.enumerable', false);
+
shouldBe("undefined instanceof MyObject", false);
EvilExceptionObject.hasInstance = function f() { return f(); };
EvilExceptionObject.__proto__ = undefined;
diff --git a/JavaScriptCore/Android.mk b/JavaScriptCore/Android.mk
index 425d69c..e76da32 100644
--- a/JavaScriptCore/Android.mk
+++ b/JavaScriptCore/Android.mk
@@ -56,12 +56,10 @@ LOCAL_SRC_FILES := \
pcre/pcre_ucp_searchfuncs.cpp \
pcre/pcre_xclass.cpp \
\
- profiler/HeavyProfile.cpp \
profiler/Profile.cpp \
profiler/ProfileGenerator.cpp \
profiler/ProfileNode.cpp \
profiler/Profiler.cpp \
- profiler/TreeProfile.cpp \
\
runtime/ArgList.cpp \
runtime/Arguments.cpp \
@@ -161,6 +159,7 @@ LOCAL_SRC_FILES := \
wtf/RandomNumber.cpp \
wtf/RefCountedLeakCounter.cpp \
wtf/TCSystemAlloc.cpp \
+ wtf/ThreadIdentifierDataPthreads.cpp \
wtf/Threading.cpp \
wtf/ThreadingPthreads.cpp \
\
diff --git a/JavaScriptCore/Android.v8.wtf.mk b/JavaScriptCore/Android.v8.wtf.mk
index 53a50d9..69128d6 100644
--- a/JavaScriptCore/Android.v8.wtf.mk
+++ b/JavaScriptCore/Android.v8.wtf.mk
@@ -42,6 +42,7 @@ LOCAL_SRC_FILES := \
wtf/RandomNumber.cpp \
wtf/RefCountedLeakCounter.cpp \
wtf/TCSystemAlloc.cpp \
+ wtf/ThreadIdentifierDataPthreads.cpp \
wtf/Threading.cpp \
wtf/ThreadingPthreads.cpp \
\
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 829cc98..01ba8ea 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,3746 @@
+<<<<<<< HEAD
+=======
+2010-01-31 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Darin Adler.
+
+ Buildfix for WinCE + style fixes (TLS_OUT_OF_INDEXES is not defined).
+ https://bugs.webkit.org/show_bug.cgi?id=34380
+
+ * wtf/ThreadSpecific.h:
+
+2010-01-31 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ [Windows] Fix a bug of round() with huge integral numbers
+ https://bugs.webkit.org/show_bug.cgi?id=34297
+
+ Fix a bug that round() for huge integral numbers returns incorrect
+ results. For example, round(8639999913600001) returns
+ 8639999913600002 without this change though the double type can
+ represent 8639999913600001 precisely.
+
+ Math.round() of JavaScript has a similar problem. But this change
+ doesn't fix it because Math.round() doesn't use round() of
+ MathExtra.h.
+
+ * wtf/MathExtras.h:
+ (round): Avoid to do "num + 0.5" or "num - 0.5".
+ (roundf): Fixed similarly.
+ (llround): Calls round().
+ (llroundf): Calls roundf().
+ (lround): Calls round().
+ (lroundf): Calls roundf().
+
+2010-01-29 Mark Rowe <mrowe@apple.com>
+
+ Sort Xcode projects.
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+
+2010-01-29 Mark Rowe <mrowe@apple.com>
+
+ Fix the Mac build.
+
+ Disable ENABLE_INDEXED_DATABASE since it is "completely non-functional".
+
+ As the comment in FeatureDefines.xcconfig notes, the list of feature defines
+ needs to be kept in sync across the various files. The default values also
+ need to be kept in sync between these files and build-webkit.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-01-29 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Rubber-stamped by Maciej Stachowiak.
+
+ Fix the ARM build.
+
+ * runtime/JSNumberCell.h:
+ (JSC::JSNumberCell::createStructure): Call the right Structure::create overload.
+
+2010-01-28 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix for MSW, use ThreadingWin.cpp as the Windows pthreads implementation
+ implements pthread_t in a way that makes it impossible to check its validity,
+ which is needed by ThreadingPthreads.cpp.
+
+ * wscript:
+
+2010-01-28 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ DOM Objects shouldn't all require custom mark functions
+ https://bugs.webkit.org/show_bug.cgi?id=34291
+
+ Make getAnonymousValue const-friendly
+
+ * runtime/JSObject.h:
+ (JSC::JSObject::getAnonymousValue):
+
+2010-01-28 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Simplify anonymous slot implementation
+ https://bugs.webkit.org/show_bug.cgi?id=34282
+
+ A class must now specify the number of slots it needs at construction time
+ rather than later on with a transition. This makes many things simpler,
+ we no longer need to need an additional transition on object creation to
+ add the anonymous slots, and we remove the need for a number of transition
+ type checks.
+
+ * API/JSCallbackConstructor.h:
+ (JSC::JSCallbackConstructor::createStructure):
+ * API/JSCallbackFunction.h:
+ (JSC::JSCallbackFunction::createStructure):
+ * API/JSCallbackObject.h:
+ (JSC::JSCallbackObject::createStructure):
+ * JavaScriptCore.exp:
+ * debugger/DebuggerActivation.h:
+ (JSC::DebuggerActivation::createStructure):
+ * runtime/Arguments.h:
+ (JSC::Arguments::createStructure):
+ * runtime/BooleanObject.h:
+ (JSC::BooleanObject::createStructure):
+ * runtime/DateInstance.h:
+ (JSC::DateInstance::createStructure):
+ * runtime/DatePrototype.h:
+ (JSC::DatePrototype::createStructure):
+ * runtime/FunctionPrototype.h:
+ (JSC::FunctionPrototype::createStructure):
+ * runtime/GetterSetter.h:
+ (JSC::GetterSetter::createStructure):
+ * runtime/GlobalEvalFunction.h:
+ (JSC::GlobalEvalFunction::createStructure):
+ * runtime/InternalFunction.h:
+ (JSC::InternalFunction::createStructure):
+ * runtime/JSAPIValueWrapper.h:
+ (JSC::JSAPIValueWrapper::createStructure):
+ * runtime/JSActivation.h:
+ (JSC::JSActivation::createStructure):
+ * runtime/JSArray.h:
+ (JSC::JSArray::createStructure):
+ * runtime/JSByteArray.cpp:
+ (JSC::JSByteArray::createStructure):
+ * runtime/JSCell.h:
+ (JSC::JSCell::createDummyStructure):
+ * runtime/JSFunction.h:
+ (JSC::JSFunction::createStructure):
+ * runtime/JSGlobalObject.h:
+ (JSC::JSGlobalObject::createStructure):
+ * runtime/JSNotAnObject.h:
+ (JSC::JSNotAnObject::createStructure):
+ * runtime/JSONObject.h:
+ (JSC::JSONObject::createStructure):
+ * runtime/JSObject.h:
+ (JSC::JSObject::createStructure):
+ (JSC::JSObject::putAnonymousValue):
+ (JSC::JSObject::getAnonymousValue):
+ * runtime/JSPropertyNameIterator.h:
+ (JSC::JSPropertyNameIterator::createStructure):
+ * runtime/JSStaticScopeObject.h:
+ (JSC::JSStaticScopeObject::createStructure):
+ * runtime/JSString.h:
+ (JSC::Fiber::createStructure):
+ * runtime/JSVariableObject.h:
+ (JSC::JSVariableObject::createStructure):
+ * runtime/JSWrapperObject.h:
+ (JSC::JSWrapperObject::createStructure):
+ (JSC::JSWrapperObject::JSWrapperObject):
+ * runtime/MathObject.h:
+ (JSC::MathObject::createStructure):
+ * runtime/NumberConstructor.h:
+ (JSC::NumberConstructor::createStructure):
+ * runtime/NumberObject.h:
+ (JSC::NumberObject::createStructure):
+ * runtime/RegExpConstructor.h:
+ (JSC::RegExpConstructor::createStructure):
+ * runtime/RegExpObject.h:
+ (JSC::RegExpObject::createStructure):
+ * runtime/StringObject.h:
+ (JSC::StringObject::createStructure):
+ * runtime/StringObjectThatMasqueradesAsUndefined.h:
+ (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
+ * runtime/Structure.cpp:
+ (JSC::Structure::~Structure):
+ (JSC::Structure::materializePropertyMap):
+ * runtime/Structure.h:
+ (JSC::Structure::create):
+ (JSC::Structure::anonymousSlotCount):
+ * runtime/StructureTransitionTable.h:
+
+2010-01-27 Oliver Hunt <oliver@apple.com>
+
+ Windows build fix.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+
+2010-01-27 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ MessageEvent.data should deserialize in the context of the MessageEvent's global object
+ https://bugs.webkit.org/show_bug.cgi?id=34227
+
+ Add logic to allow us to create an Object, Array, or Date instance
+ so we can create them in the context of a specific global object,
+ rather than just using the current lexical global object.
+
+ * JavaScriptCore.exp:
+ * runtime/DateInstance.cpp:
+ (JSC::DateInstance::DateInstance):
+ * runtime/DateInstance.h:
+ * runtime/JSGlobalObject.h:
+ (JSC::constructEmptyObject):
+ (JSC::constructEmptyArray):
+
+2010-01-27 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34150
+ WebKit needs a mechanism to catch stale HashMap entries
+
+ It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash
+ is just its value, it is very unlikely that any observable problem is reproducible.
+
+ This extends hash table consistency checks to check that pointers are referencing allocated
+ memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible
+ to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much).
+
+ * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can
+ add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems
+ with those yet.
+
+ * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by
+ CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency().
+
+ * wtf/HashTable.h:
+ (WTF::HashTable::internalCheckTableConsistency):
+ (WTF::HashTable::internalCheckTableConsistencyExceptSize):
+ (WTF::HashTable::checkTableConsistencyExceptSize):
+ Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off.
+ (WTF::::add): Updated for checkTableConsistency renaming.
+ (WTF::::addPassingHashCode): Ditto.
+ (WTF::::removeAndInvalidate): Ditto.
+ (WTF::::remove): Ditto.
+ (WTF::::rehash): Ditto.
+ (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this
+ function returns true for tables with m_table == 0.
+ (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially,
+ we could do the same for values.
+
+ * wtf/HashTraits.h:
+ (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden
+ to add checks. Currently, the only override is for pointer hashes.
+
+ * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming.
+
+2010-01-27 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Remove trailing \ from inline function code
+ https://bugs.webkit.org/show_bug.cgi?id=34223
+
+ * assembler/ARMv7Assembler.h:
+ (JSC::ARMThumbImmediate::countLeadingZerosPartial):
+
+2010-01-27 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Eric Seidel.
+
+ [BREWMP] Port WTF's randomNumber
+ https://bugs.webkit.org/show_bug.cgi?id=33566
+
+ Use GETRAND to generate 4 byte random byte sequence to implement
+ weakRandomNumber. Create a secure random number generator with
+ AEECLSID_RANDOM to implement randomNumber.
+
+ * wtf/RandomNumber.cpp:
+ (WTF::weakRandomNumber):
+ (WTF::randomNumber):
+
+2010-01-27 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Eric Seidel.
+
+ [BREWMP] Port getCPUTime
+ https://bugs.webkit.org/show_bug.cgi?id=33572
+
+ Use GETUPTIMEMS which returns a continuously and
+ linearly increasing millisecond timer from the time the device
+ was powered on. This function is enough to implement getCPUTime.
+
+ * runtime/TimeoutChecker.cpp:
+ (JSC::getCPUTime):
+
+2010-01-27 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Oliver Hunt.
+
+ [BREWMP] Add MarkStack fastMalloc implementation for platforms without VirtualAlloc or mmap.
+ https://bugs.webkit.org/show_bug.cgi?id=33582
+
+ Use fastMalloc and fastFree to implement MarkStack::allocateStack and
+ MarkStack::releaseStack for platforms without page level allocation.
+
+ * runtime/MarkStack.h:
+ (JSC::MarkStack::MarkStackArray::shrinkAllocation):
+ * runtime/MarkStackNone.cpp: Added.
+ (JSC::MarkStack::initializePagesize):
+ (JSC::MarkStack::allocateStack):
+ (JSC::MarkStack::releaseStack):
+
+2010-01-27 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Eric Seidel.
+
+ [BREWMP] Don't use time function
+ https://bugs.webkit.org/show_bug.cgi?id=33577
+
+ Calling time(0) in BREW devices causes a crash because time
+ is not properly ported in most devices. Cast currentTime() to
+ time_t to get the same result as time(0).
+
+ * wtf/DateMath.cpp:
+ (WTF::calculateUTCOffset):
+
+2010-01-27 Alexey Proskuryakov <ap@apple.com>
+
+ Revert r53899 (HashMap<AtomicStringImpl*, Value> key checks) and subsequent build fixes,
+ because they make SVG tests crash in release builds.
+
+ * wtf/HashMap.h:
+ (WTF::::remove):
+ * wtf/HashSet.h:
+ (WTF::::remove):
+ * wtf/HashTable.h:
+ (WTF::::add):
+ (WTF::::addPassingHashCode):
+ (WTF::::removeAndInvalidate):
+ (WTF::::remove):
+ (WTF::::rehash):
+ (WTF::::checkTableConsistency):
+ (WTF::::checkTableConsistencyExceptSize):
+ * wtf/HashTraits.h:
+ (WTF::GenericHashTraits::emptyValue):
+ (WTF::):
+ * wtf/RefPtrHashMap.h:
+ (WTF::::remove):
+
+2010-01-26 Alexey Proskuryakov <ap@apple.com>
+
+ More Windows build fixing.
+
+ * wtf/HashTraits.h: _msize takes void*, remove const qualifier from type.
+
+2010-01-26 Alexey Proskuryakov <ap@apple.com>
+
+ Windows build fix.
+
+ * wtf/HashTraits.h: Include malloc.h for _msize().
+
+2010-01-26 Alexey Proskuryakov <ap@apple.com>
+
+ Build fix.
+
+ * wtf/HashTable.h: (WTF::HashTable::checkTableConsistencyExceptSize): Remove const from a
+ static (empty) version of this function.
+
+2010-01-26 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34150
+ WebKit needs a mechanism to catch stale HashMap entries
+
+ It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash
+ is just its value, it is very unlikely that any observable problem is reproducible.
+
+ This extends hash table consistency checks to check that pointers are referencing allocated
+ memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible
+ to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much).
+
+ * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can
+ add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems
+ with those yet.
+
+ * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by
+ CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency().
+
+ * wtf/HashTable.h:
+ (WTF::HashTable::internalCheckTableConsistency):
+ (WTF::HashTable::internalCheckTableConsistencyExceptSize):
+ (WTF::HashTable::checkTableConsistencyExceptSize):
+ Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off.
+ (WTF::::add): Updated for checkTableConsistency renaming.
+ (WTF::::addPassingHashCode): Ditto.
+ (WTF::::removeAndInvalidate): Ditto.
+ (WTF::::remove): Ditto.
+ (WTF::::rehash): Ditto.
+ (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this
+ function returns true for tables with m_table == 0.
+ (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially,
+ we could do the same for values.
+
+ * wtf/HashTraits.h:
+ (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden
+ to add checks. Currently, the only override is for pointer hashes.
+
+ * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming.
+
+2010-01-26 Lyon Chen <liachen@rim.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Opcode.h use const void* for Opcode cause error #1211 for RVCT compiler
+ https://bugs.webkit.org/show_bug.cgi?id=33902
+
+ * bytecode/Opcode.h:
+
+2010-01-26 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Windows build references non-existent include paths
+ https://bugs.webkit.org/show_bug.cgi?id=34175
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
+ * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
+ * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
+ * JavaScriptCore.vcproj/testapi/testapi.vcproj:
+ * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
+
+2010-01-26 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ Using JavaScriptCore API with a webkit vended context can result in slow script dialog
+ https://bugs.webkit.org/show_bug.cgi?id=34172
+
+ Make the APIShim correctly increment and decrement the timeout
+ entry counter.
+
+ * API/APIShims.h:
+ (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
+ (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
+ (JSC::APICallbackShim::APICallbackShim):
+ (JSC::APICallbackShim::~APICallbackShim):
+
+2010-01-26 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] Fix compilation of QtScript with non-gcc compilers
+
+ Variable length stack arrays are a gcc extension. Use QVarLengthArray
+ as a more portable solution that still tries to allocate on the stack
+ first.
+
+ * qt/api/qscriptvalue_p.h:
+ (QScriptValuePrivate::call):
+
+2010-01-26 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Fix the build on platforms without JIT support.
+
+ The JIT support should be determined at compile-time via wtf/Platform.h
+
+ * qt/api/QtScript.pro:
+
+2010-01-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ First steps of the QtScript API.
+
+ Two new classes were created; QScriptEngine and QScriptValue.
+ The first should encapsulate a javascript context and the second a script
+ value.
+
+ This API is still in development, so it isn't compiled by default.
+ To trigger compilation, pass --qmakearg="CONFIG+=build-qtscript" to
+ build-webkit.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32565
+
+ * qt/api/QtScript.pro: Added.
+ * qt/api/qscriptconverter_p.h: Added.
+ (QScriptConverter::toString):
+ * qt/api/qscriptengine.cpp: Added.
+ (QScriptEngine::QScriptEngine):
+ (QScriptEngine::~QScriptEngine):
+ (QScriptEngine::evaluate):
+ (QScriptEngine::collectGarbage):
+ * qt/api/qscriptengine.h: Added.
+ * qt/api/qscriptengine_p.cpp: Added.
+ (QScriptEnginePrivate::QScriptEnginePrivate):
+ (QScriptEnginePrivate::~QScriptEnginePrivate):
+ (QScriptEnginePrivate::evaluate):
+ * qt/api/qscriptengine_p.h: Added.
+ (QScriptEnginePrivate::get):
+ (QScriptEnginePrivate::collectGarbage):
+ (QScriptEnginePrivate::makeJSValue):
+ (QScriptEnginePrivate::context):
+ * qt/api/qscriptvalue.cpp: Added.
+ (QScriptValue::QScriptValue):
+ (QScriptValue::~QScriptValue):
+ (QScriptValue::isValid):
+ (QScriptValue::isBool):
+ (QScriptValue::isBoolean):
+ (QScriptValue::isNumber):
+ (QScriptValue::isNull):
+ (QScriptValue::isString):
+ (QScriptValue::isUndefined):
+ (QScriptValue::isError):
+ (QScriptValue::isObject):
+ (QScriptValue::isFunction):
+ (QScriptValue::toString):
+ (QScriptValue::toNumber):
+ (QScriptValue::toBool):
+ (QScriptValue::toBoolean):
+ (QScriptValue::toInteger):
+ (QScriptValue::toInt32):
+ (QScriptValue::toUInt32):
+ (QScriptValue::toUInt16):
+ (QScriptValue::call):
+ (QScriptValue::engine):
+ (QScriptValue::operator=):
+ (QScriptValue::equals):
+ (QScriptValue::strictlyEquals):
+ * qt/api/qscriptvalue.h: Added.
+ (QScriptValue::):
+ * qt/api/qscriptvalue_p.h: Added.
+ (QScriptValuePrivate::):
+ (QScriptValuePrivate::get):
+ (QScriptValuePrivate::QScriptValuePrivate):
+ (QScriptValuePrivate::isValid):
+ (QScriptValuePrivate::isBool):
+ (QScriptValuePrivate::isNumber):
+ (QScriptValuePrivate::isNull):
+ (QScriptValuePrivate::isString):
+ (QScriptValuePrivate::isUndefined):
+ (QScriptValuePrivate::isError):
+ (QScriptValuePrivate::isObject):
+ (QScriptValuePrivate::isFunction):
+ (QScriptValuePrivate::toString):
+ (QScriptValuePrivate::toNumber):
+ (QScriptValuePrivate::toBool):
+ (QScriptValuePrivate::toInteger):
+ (QScriptValuePrivate::toInt32):
+ (QScriptValuePrivate::toUInt32):
+ (QScriptValuePrivate::toUInt16):
+ (QScriptValuePrivate::equals):
+ (QScriptValuePrivate::strictlyEquals):
+ (QScriptValuePrivate::assignEngine):
+ (QScriptValuePrivate::call):
+ (QScriptValuePrivate::engine):
+ (QScriptValuePrivate::context):
+ (QScriptValuePrivate::value):
+ (QScriptValuePrivate::object):
+ (QScriptValuePrivate::inherits):
+ (QScriptValuePrivate::isJSBased):
+ (QScriptValuePrivate::isNumberBased):
+ (QScriptValuePrivate::isStringBased):
+ * qt/api/qtscriptglobal.h: Added.
+ * qt/tests/qscriptengine/qscriptengine.pro: Added.
+ * qt/tests/qscriptengine/tst_qscriptengine.cpp: Added.
+ (tst_QScriptEngine::tst_QScriptEngine):
+ (tst_QScriptEngine::~tst_QScriptEngine):
+ (tst_QScriptEngine::init):
+ (tst_QScriptEngine::cleanup):
+ (tst_QScriptEngine::collectGarbage):
+ (tst_QScriptEngine::evaluate):
+ * qt/tests/qscriptvalue/qscriptvalue.pro: Added.
+ * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: Added.
+ (tst_QScriptValue::tst_QScriptValue):
+ (tst_QScriptValue::~tst_QScriptValue):
+ (tst_QScriptValue::init):
+ (tst_QScriptValue::cleanup):
+ (tst_QScriptValue::ctor):
+ (tst_QScriptValue::toString_data):
+ (tst_QScriptValue::toString):
+ (tst_QScriptValue::copyConstructor_data):
+ (tst_QScriptValue::copyConstructor):
+ (tst_QScriptValue::assignOperator_data):
+ (tst_QScriptValue::assignOperator):
+ (tst_QScriptValue::dataSharing):
+ (tst_QScriptValue::constructors_data):
+ (tst_QScriptValue::constructors):
+ (tst_QScriptValue::call):
+ * qt/tests/tests.pri: Added.
+ * qt/tests/tests.pro: Added.
+
+2010-01-25 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by David Levin.
+
+ Fix Chromium Linux tests: the pthread functions on Linux produce segfault if they receive 0 thread handle.
+ After r53714, we can have 0 thread handles passed to pthread_join and pthread_detach if corresponding threads
+ were already terminated and their threadMap entries cleared.
+ Add a 0 check.
+
+ * wtf/ThreadingPthreads.cpp:
+ (WTF::waitForThreadCompletion):
+ (WTF::detachThread):
+
+2010-01-24 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Refactor JITStubs.cpp so that DEFINE_STUB_FUNCTION is only used once for each function
+ https://bugs.webkit.org/show_bug.cgi?id=33866
+
+ Place the guard USE(JSVALUE32_64) inside the body of the DEFINE_STUB_FUNCTION
+ macro for those functions that are always present.
+
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+
+2010-01-22 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ [wx] Remove the Bakefile build system, which is no longer being used.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34022
+
+ * JavaScriptCoreSources.bkl: Removed.
+ * jscore.bkl: Removed.
+
+2010-01-22 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34025
+ Enable client-based Geolocation abstraction for Mac, Windows AppleWebKit targets.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-01-22 Dmitry Titov <dimich@chromium.org>
+
+ Not reviewed, attempted Snow Leopard build fix.
+
+ * wtf/ThreadingPthreads.cpp: Add a forward declaration of a function which is not 'static'.
+
+2009-01-22 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix the leak of ThreadIdentifiers in threadMap across threads.
+ https://bugs.webkit.org/show_bug.cgi?id=32689
+
+ Test is added to DumpRenderTree.mm.
+
+ * Android.mk: Added file ThreadIdentifierDataPthreads.(h|cpp) to build.
+ * Android.v8.wtf.mk: Ditto.
+ * GNUmakefile.am: Ditto.
+ * JavaScriptCore.gyp/JavaScriptCore.gyp: Ditto.
+ * JavaScriptCore.gypi: Ditto.
+ * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
+
+ * wtf/ThreadIdentifierDataPthreads.cpp: Added. Contains custom implementation of thread-specific data that uses custom destructor.
+ (WTF::ThreadIdentifierData::~ThreadIdentifierData): Removes the ThreadIdentifier from the threadMap.
+ (WTF::ThreadIdentifierData::identifier):
+ (WTF::ThreadIdentifierData::initialize):
+ (WTF::ThreadIdentifierData::destruct): Custom thread-specific destructor. Resets the value for the key again to cause second invoke.
+ (WTF::ThreadIdentifierData::initializeKeyOnceHelper):
+ (WTF::ThreadIdentifierData::initializeKeyOnce): Need to use pthread_once since initialization may come on any thread(s).
+ * wtf/ThreadIdentifierDataPthreads.h: Added.
+ (WTF::ThreadIdentifierData::ThreadIdentifierData):
+
+ * wtf/Threading.cpp:
+ (WTF::threadEntryPoint): Move initializeCurrentThreadInternal to after the lock to make
+ sure it is invoked when ThreadIdentifier is already established.
+
+ * wtf/Threading.h: Rename setThreadNameInternal -> initializeCurrentThreadInternal since it does more then only set the name now.
+ * wtf/ThreadingNone.cpp:
+ (WTF::initializeCurrentThreadInternal): Ditto.
+ * wtf/ThreadingWin.cpp:
+ (WTF::initializeCurrentThreadInternal): Ditto.
+ (WTF::initializeThreading): Ditto.
+ * wtf/gtk/ThreadingGtk.cpp:
+ (WTF::initializeCurrentThreadInternal): Ditto.
+ * wtf/qt/ThreadingQt.cpp:
+ (WTF::initializeCurrentThreadInternal): Ditto.
+
+ * wtf/ThreadingPthreads.cpp:
+ (WTF::establishIdentifierForPthreadHandle):
+ (WTF::clearPthreadHandleForIdentifier): Make it not 'static' so the ~ThreadIdentifierData() in another file can call it.
+ (WTF::initializeCurrentThreadInternal): Set the thread-specific data. The ThreadIdentifier is already established by creating thread.
+ (WTF::waitForThreadCompletion): Remove call to clearPthreadHandleForIdentifier(threadID) since it is now done in ~ThreadIdentifierData().
+ (WTF::detachThread): Ditto.
+ (WTF::currentThread): Use the thread-specific data to get the ThreadIdentifier. It's many times faster then Mutex-protected iteration through the map.
+ Also, set the thread-specific data if called first time on the thread.
+
+2010-01-21 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Add ThreadSpecific for ENABLE(SINGLE_THREADED)
+ https://bugs.webkit.org/show_bug.cgi?id=33878
+
+ Implement ThreadSpecific with a simple getter/setter
+ when ENABLE(SINGLE_THREADED) is true.
+
+ Due to the change in https://bugs.webkit.org/show_bug.cgi?id=33236,
+ an implementation of ThreadSpecific must be available to build WebKit.
+ This causes a build failure for platforms without a proper
+ ThreadSpecific implementation.
+
+ * wtf/ThreadSpecific.h:
+ (WTF::::ThreadSpecific):
+ (WTF::::~ThreadSpecific):
+ (WTF::::get):
+ (WTF::::set):
+ (WTF::::destroy):
+
+2010-01-21 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Maciej Stachowiak.
+
+ Add fastStrDup to FastMalloc
+ https://bugs.webkit.org/show_bug.cgi?id=33937
+
+ The new string returned by fastStrDup is obtained with fastMalloc,
+ and can be freed with fastFree. This makes the memory management
+ more consistent because we don't need to keep strdup allocated pointers
+ and free them with free(). Instead we can use fastFree everywhere.
+
+ * wtf/FastMalloc.cpp:
+ (WTF::fastStrDup):
+ * wtf/FastMalloc.h:
+
+2010-01-21 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ history.back() for same-document history traversals isn't synchronous as the specification states.
+ <rdar://problem/7535011> and https://bugs.webkit.org/show_bug.cgi?id=33538
+
+ * wtf/Platform.h: Add a "HISTORY_ALWAYS_ASYNC" enable and turn it on for Chromium.
+
+2010-01-21 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Always create a prototype for automatically managed classes.
+
+ This fixes some errors where prototype chains were not correctly hooked
+ up, and also ensures that API classes work correctly with features like
+ instanceof.
+
+ * API/JSClassRef.cpp:
+ (OpaqueJSClass::create): Cleaned up some of this code. Also changed it
+ to always create a prototype class.
+
+ * API/tests/testapi.c:
+ (Derived2_class):
+ (main): Fixed a null value crash in the exception checking code.
+ * API/tests/testapi.js: Added some tests for the case where a prototype
+ chain would not be hooked up correctly.
+
+2010-01-21 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Force JSC to create a prototype chain for API classes with a
+ parent class but no static functions.
+
+ * API/JSClassRef.cpp:
+ (OpaqueJSClass::create):
+
+2010-01-21 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Geoffrey Garen.
+
+ Object.getOwnPropertyDescriptor always returns undefined for JS API objects
+ https://bugs.webkit.org/show_bug.cgi?id=33946
+
+ Ideally the getOwnPropertyDescriptor() reimplementation should return an
+ access descriptor that wraps the property getter and setter callbacks, but
+ that approach is much more involved than returning a value descriptor.
+ Keep it simple for now.
+
+ * API/JSCallbackObject.h:
+ * API/JSCallbackObjectFunctions.h:
+ (JSC::::getOwnPropertyDescriptor):
+ * API/tests/testapi.js:
+
+2010-01-20 Mark Rowe <mrowe@apple.com>
+
+ Build fix.
+
+ * wtf/FastMalloc.cpp:
+ (WTF::TCMalloc_PageHeap::initializeScavenger): Remove unnecessary function call.
+
+2010-01-20 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Use the inline i386 assembly for x86_64 as well rather than falling back to using pthread mutexes.
+
+ * wtf/TCSpinLock.h:
+ (TCMalloc_SpinLock::Lock):
+ (TCMalloc_SpinLock::Unlock):
+ (TCMalloc_SlowLock):
+
+2010-01-20 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/7215063> Use GCD instead of an extra thread for FastMalloc scavenging on platforms where it is supported
+
+ Abstract the background scavenging slightly so that an alternate implementation that uses GCD can be used on platforms
+ where it is supported.
+
+ * wtf/FastMalloc.cpp:
+ (WTF::TCMalloc_PageHeap::init):
+ (WTF::TCMalloc_PageHeap::initializeScavenger):
+ (WTF::TCMalloc_PageHeap::signalScavenger):
+ (WTF::TCMalloc_PageHeap::shouldContinueScavenging):
+ (WTF::TCMalloc_PageHeap::Delete):
+ (WTF::TCMalloc_PageHeap::periodicScavenge):
+ * wtf/Platform.h:
+
+2010-01-20 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/7562708> REGRESSION(53460): Heap::destroy may not run
+ all destructors
+
+ * runtime/Collector.cpp:
+ (JSC::Heap::freeBlocks): Instead of fully marking protected objects,
+ just set their mark bits. This prevents protected objects from keeping
+ unprotected objects alive. Destructor order is not guaranteed, so it's
+ OK to destroy objects pointed to by protected objects before destroying
+ protected objects.
+
+2010-01-19 David Levin <levin@chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ CrossThreadCopier needs to support ThreadSafeShared better.
+ https://bugs.webkit.org/show_bug.cgi?id=33698
+
+ * wtf/TypeTraits.cpp: Added tests for the new type traits.
+ * wtf/TypeTraits.h:
+ (WTF::IsSubclass): Determines if a class is a derived from another class.
+ (WTF::IsSubclassOfTemplate): Determines if a class is a derived from a
+ template class (with one parameter that is unknown).
+ (WTF::RemoveTemplate): Reveals the type for a template parameter.
+
+2010-01-20 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler and Adam Roben.
+
+ Feature defines are difficult to maintain on Windows builds
+ https://bugs.webkit.org/show_bug.cgi?id=33883
+
+ FeatureDefines.vsprops are now maintained in a way similar to
+ Configurations/FeatureDefines.xcconfig, with the added advantage
+ of having a single FeatureDefines file across all projects.
+
+ * Configurations/FeatureDefines.xcconfig: Add comments about keeping feature definitions in sync.
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add FeatureDefines.vsprops inherited property sheet.
+ * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add FeatureDefines.vsprops inherited property sheet.
+
+2010-01-20 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Unreviewed buildfix for r53547.
+
+ * DerivedSources.pro:
+
+2010-01-20 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Make extraCompilers for generated sources depend on their scripts
+
+ * DerivedSources.pro:
+
+2010-01-19 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ When JavaScriptCore calls Debugger::Exception, have it pass a
+ hasHandler variable that represents if exception is being handled
+ in the same function (not in a parent on the call stack).
+
+ This just adds a new parameter, no behavior is changed.
+
+ * debugger/Debugger.h:
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::throwException):
+
+2010-01-18 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Adam Barth.
+
+ Inline functions that are hot in DOM manipulation
+ https://bugs.webkit.org/show_bug.cgi?id=33820
+
+ (3% speedup on Dromaeo DOM Core tests)
+
+ * runtime/WeakGCMap.h:
+ (JSC::::get): inline
+
+2010-01-19 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed build fix for JIT with RVCT.
+
+ Remove IMPORT statement; cti_vm_throw is already defined in JITStubs.h.
+ Remove extra ')'.
+
+ * jit/JITStubs.cpp:
+ (JSC::ctiVMThrowTrampoline):
+
+2010-01-19 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/
+ https://bugs.webkit.org/show_bug.cgi?id=33826
+
+ This bug was caused by a GC-protected object being destroyed early by
+ Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers
+ to GC-protected memory to be valid.
+
+ The solution is to do two passes of tear-down in Heap::destroy. The first
+ pass tears down all unprotected objects. The second pass ASSERTs that all
+ previously protected objects are now unprotected, and then tears down
+ all perviously protected objects. These two passes simulate the two passes
+ that would have been required to free a protected object during normal GC.
+
+ * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap.
+
+ * runtime/Collector.cpp:
+ (JSC::Heap::destroy): Moved ASSERTs to here.
+ (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its
+ setter to the function that does the shrinking.
+ (JSC::Heap::freeBlocks): Implemented above algorithm.
+ (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink.
+
+2010-01-19 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by NOBODY (build fix).
+
+ Reverting r53455, breaks 2 javascriptcore tests.
+
+ * API/JSContextRef.cpp:
+ * runtime/Collector.cpp:
+ (JSC::Heap::destroy):
+ (JSC::Heap::freeBlock):
+ (JSC::Heap::freeBlocks):
+ (JSC::Heap::shrinkBlocks):
+
+2010-01-18 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by NOBODY (build fix).
+
+ Revert r53454, since it causes much sadness in this world.
+
+ * runtime/UString.cpp:
+ (JSC::UString::spliceSubstringsWithSeparators):
+ (JSC::UString::replaceRange):
+ * runtime/UStringImpl.cpp:
+ (JSC::UStringImpl::baseSharedBuffer):
+ (JSC::UStringImpl::sharedBuffer):
+ (JSC::UStringImpl::~UStringImpl):
+ * runtime/UStringImpl.h:
+ (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
+ (JSC::UntypedPtrAndBitfield::asPtr):
+ (JSC::UntypedPtrAndBitfield::operator&=):
+ (JSC::UntypedPtrAndBitfield::operator|=):
+ (JSC::UntypedPtrAndBitfield::operator&):
+ (JSC::UStringImpl::create):
+ (JSC::UStringImpl::cost):
+ (JSC::UStringImpl::isIdentifier):
+ (JSC::UStringImpl::setIsIdentifier):
+ (JSC::UStringImpl::ref):
+ (JSC::UStringImpl::deref):
+ (JSC::UStringImpl::checkConsistency):
+ (JSC::UStringImpl::UStringImpl):
+ (JSC::UStringImpl::bufferOwnerString):
+ (JSC::UStringImpl::bufferOwnership):
+ (JSC::UStringImpl::isStatic):
+ * wtf/StringHashFunctions.h:
+ (WTF::stringHash):
+
+2010-01-18 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/
+ https://bugs.webkit.org/show_bug.cgi?id=33826
+
+ This bug was caused by a GC-protected object being destroyed early by
+ Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers
+ to GC-protected memory to be valid.
+
+ The solution is to do two passes of tear-down in Heap::destroy. The first
+ pass tears down all unprotected objects. The second pass ASSERTs that all
+ previously protected objects are now unprotected, and then tears down
+ all perviously protected objects. These two passes simulate the two passes
+ that would have been required to free a protected object during normal GC.
+
+ * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap.
+
+ * runtime/Collector.cpp:
+ (JSC::Heap::destroy): Moved ASSERTs to here.
+ (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its
+ setter to the function that does the shrinking.
+ (JSC::Heap::freeBlocks): Implemented above algorithm.
+ (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink.
+
+2010-01-18 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33731
+ Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags).
+
+ This break the OS X Leaks tool. Instead, free up some more bits from the refCount.
+
+ * runtime/UStringImpl.cpp:
+ (JSC::UStringImpl::sharedBuffer):
+ (JSC::UStringImpl::~UStringImpl):
+ * runtime/UStringImpl.h:
+ (JSC::UStringImpl::cost):
+ (JSC::UStringImpl::checkConsistency):
+ (JSC::UStringImpl::UStringImpl):
+ (JSC::UStringImpl::bufferOwnerString):
+ (JSC::UStringImpl::):
+ * wtf/StringHashFunctions.h:
+ (WTF::stringHash):
+
+2010-01-18 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ HTMLInputElement::valueAsDate setter support for type=month.
+ https://bugs.webkit.org/show_bug.cgi?id=33021
+
+ Expose the following functions to be used by WebCore:
+ - WTF::msToyear()
+ - WTF::dayInYear()
+ - WTF::monthFromDayInYear()
+ - WTF::dayInMonthFromDayInYear()
+
+ * JavaScriptCore.exp:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ * wtf/DateMath.cpp:
+ (WTF::msToYear): Remove "static inline".
+ (WTF::dayInYear): Remove "static inline".
+ (WTF::monthFromDayInYear): Remove "static inline".
+ (WTF::dayInMonthFromDayInYear): Remove "static inline".
+ * wtf/DateMath.h: Declare the above functions.
+
+2010-01-18 Darin Adler <darin@apple.com>
+
+ Fix build by reverting the previous change.
+
+ * runtime/UString.h: Rolled out the FastAllocBase base class.
+ It was making UString larger, and therefore JSString larger,
+ and too big for a garbage collection cell.
+
+ This raises the unpleasant possibility that many classes became
+ larger because we added the FastAllocBase base class. I am
+ worried about this, and it needs to be investigated.
+
+2010-01-18 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for UString class
+ https://bugs.webkit.org/show_bug.cgi?id=27831
+
+ Inherits the following class from FastAllocBase because it is
+ instantiated by 'new' and no need to be copyable:
+
+ class name - instantiated at:
+ classs UString - JavaScriptCore/runtime/UString.cpp:160
+
+ * runtime/UString.h:
+
+2010-01-18 Evan Cheng <evan.cheng@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add some ALWAYS_INLINE for key functions not inlined by some versions of GCC.
+ rdar://problem/7553780
+
+ * runtime/JSObject.h:
+ (JSC::JSObject::getPropertySlot): ALWAYS_INLINE both overloads.
+ * runtime/JSString.h:
+ (JSC::JSString::JSString): ALWAYS_INLINE the version that takes a UString.
+ * runtime/UString.h:
+ (JSC::operator==): ALWAYS_INLINE the version that compares two UString objects.
+
+2010-01-18 Csaba Osztrogonác <ossy@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Delete dftables-xxxxxxxx.in files automatically.
+ https://bugs.webkit.org/show_bug.cgi?id=33796
+
+ * pcre/dftables: unlink unnecessary temporary file.
+
+2010-01-18 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Force qmake to generate a single makefile for DerivedSources.pro
+
+ * DerivedSources.pro:
+
+2010-01-18 Csaba Osztrogonác <ossy@webkit.org>
+
+ Rubber-stamped by Gustavo Noronha Silva.
+
+ Rolling out r53391 and r53392 because of random crashes on buildbots.
+ https://bugs.webkit.org/show_bug.cgi?id=33731
+
+ * bytecode/CodeBlock.h:
+ (JSC::CallLinkInfo::seenOnce):
+ (JSC::CallLinkInfo::setSeen):
+ (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
+ (JSC::MethodCallLinkInfo::seenOnce):
+ (JSC::MethodCallLinkInfo::setSeen):
+ * jit/JIT.cpp:
+ (JSC::JIT::unlinkCall):
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::patchMethodCallProto):
+ * runtime/UString.cpp:
+ (JSC::UString::spliceSubstringsWithSeparators):
+ (JSC::UString::replaceRange):
+ * runtime/UString.h:
+ * runtime/UStringImpl.cpp:
+ (JSC::UStringImpl::baseSharedBuffer):
+ (JSC::UStringImpl::sharedBuffer):
+ (JSC::UStringImpl::~UStringImpl):
+ * runtime/UStringImpl.h:
+ (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
+ (JSC::UntypedPtrAndBitfield::asPtr):
+ (JSC::UntypedPtrAndBitfield::operator&=):
+ (JSC::UntypedPtrAndBitfield::operator|=):
+ (JSC::UntypedPtrAndBitfield::operator&):
+ (JSC::UStringImpl::create):
+ (JSC::UStringImpl::cost):
+ (JSC::UStringImpl::isIdentifier):
+ (JSC::UStringImpl::setIsIdentifier):
+ (JSC::UStringImpl::ref):
+ (JSC::UStringImpl::deref):
+ (JSC::UStringImpl::checkConsistency):
+ (JSC::UStringImpl::UStringImpl):
+ (JSC::UStringImpl::bufferOwnerString):
+ (JSC::UStringImpl::bufferOwnership):
+ (JSC::UStringImpl::isStatic):
+ * wtf/StringHashFunctions.h:
+ (WTF::stringHash):
+
+2010-01-18 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Fix the build with strict gcc and RVCT versions: It's not legal to cast a
+ pointer to a function to a void* without an intermediate cast to a non-pointer
+ type. A cast to a ptrdiff_t inbetween fixes it.
+
+ * runtime/JSString.h:
+ (JSC::Fiber::JSString):
+
+2010-01-15 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33731
+ Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags).
+
+ This break the OS X Leaks tool. Instead, free up some more bits from the refCount.
+
+ * runtime/UStringImpl.cpp:
+ (JSC::UStringImpl::sharedBuffer):
+ (JSC::UStringImpl::~UStringImpl):
+ * runtime/UStringImpl.h:
+ (JSC::UStringImpl::cost):
+ (JSC::UStringImpl::checkConsistency):
+ (JSC::UStringImpl::UStringImpl):
+ (JSC::UStringImpl::bufferOwnerString):
+ (JSC::UStringImpl::):
+ * wtf/StringHashFunctions.h:
+ (WTF::stringHash):
+
+2010-01-15 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33731
+ Remove uses of PtrAndFlags from JIT data stuctures.
+
+ These break the OS X Leaks tool. Free up a bit in CallLinkInfo, and invalid
+ permutation of pointer states in MethodCallLinkInfo to represent the removed bits.
+
+ * bytecode/CodeBlock.h:
+ (JSC::CallLinkInfo::seenOnce):
+ (JSC::CallLinkInfo::setSeen):
+ (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
+ (JSC::MethodCallLinkInfo::seenOnce):
+ (JSC::MethodCallLinkInfo::setSeen):
+ * jit/JIT.cpp:
+ (JSC::JIT::unlinkCall):
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::patchMethodCallProto):
+ * runtime/UString.h:
+
+2010-01-16 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Cache JS string values made from DOM strings (Dromaeo speedup)
+ https://bugs.webkit.org/show_bug.cgi?id=33768
+ <rdar://problem/7353576>
+
+ * runtime/JSString.h:
+ (JSC::jsStringWithFinalizer): Added new mechanism for a string to have an optional
+ finalizer callback, for the benefit of weak-referencing caches.
+ (JSC::):
+ (JSC::Fiber::JSString):
+ (JSC::Fiber::~JSString):
+ * runtime/JSString.cpp:
+ (JSC::JSString::resolveRope): Clear fibers so this doesn't look like a string with a finalizer.
+ * runtime/WeakGCMap.h: Include "Collector.h" to make this header includable by itself.
+
+2010-01-15 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix for <rdar://problem/7548432>
+ Add ALWAYS_INLINE to jsLess for a 1% speedup on llvm-gcc.
+
+ * runtime/Operations.h:
+ (JSC::jsLess):
+
+2010-01-14 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ REGRESISON: Google maps buttons not working properly
+ https://bugs.webkit.org/show_bug.cgi?id=31871
+
+ REGRESSION(r52948): JavaScript exceptions thrown on Google Maps when
+ getting directions for a second time
+ https://bugs.webkit.org/show_bug.cgi?id=33446
+
+ SunSpider and v8 report no change.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::tryCacheGetByID): Update our cached offset in case
+ flattening the dictionary changed any of its offsets.
+
+ * jit/JITStubs.cpp:
+ (JSC::JITThunks::tryCacheGetByID):
+ (JSC::DEFINE_STUB_FUNCTION):
+ * runtime/Operations.h:
+ (JSC::normalizePrototypeChain): ditto
+
+2010-01-14 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33705
+ UStringImpl::create() should use internal storage
+
+ When creating a UStringImpl copying of a UChar*, we can use an internal buffer,
+ by calling UStringImpl::tryCreateUninitialized().
+
+ Also, remove duplicate of copyChars from JSString, call UStringImpl's version.
+
+ Small (max 0.5%) progression on Sunspidey.
+
+ * runtime/JSString.cpp:
+ (JSC::JSString::resolveRope):
+ * runtime/UStringImpl.h:
+ (JSC::UStringImpl::create):
+
+2010-01-14 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Make naming & behaviour of UString[Impl] methods more consistent.
+ https://bugs.webkit.org/show_bug.cgi?id=33702
+
+ UString::create() creates a copy of the UChar* passed, but UStringImpl::create() assumes
+ that it should assume ownership of the provided buffer (with UString::createNonCopying()
+ and UStringImpl::createCopying() providing the alternate behaviours). Unify on create()
+ taking a copy of the provided buffer. For non-copying cases, use the name 'adopt', and
+ make this method take a Vector<UChar>&. For cases where non-copying construction was being
+ used, other than from a Vector<UChar>, change the code to allocate the storage along with
+ the UStringImpl using UStringImpl::createUninitialized(). (The adopt() method also more
+ closely matches that of WebCore::StringImpl).
+
+ Also, UString::createUninitialized() and UStringImpl::createUninitialized() have incompatible
+ behaviours, in that the UString form sets the provided UChar* to a null or non-null value to
+ indicate success or failure, but UStringImpl uses the returned PassRefPtr<UStringImpl> to
+ indicate when allocation has failed (potentially leaving the output Char* uninitialized).
+ This is also incompatible with WebCore::StringImpl's behaviour, in that
+ StringImpl::createUninitialized() will CRASH() if unable to allocate. Some uses of
+ createUninitialized() in JSC are unsafe, since they do not test the result for null.
+ UStringImpl's indication is preferable, since we may want a successful call to set the result
+ buffer to 0 (specifically, StringImpl returns 0 for the buffer where createUninitialized()
+ returns the empty string, which seems reasonable to catch bugs early). UString's method
+ cannot support UStringImpl's behaviour directly, since it returns an object rather than a
+ pointer.
+ - remove UString::createUninitialized(), replace with calls to UStringImpl::createUninitialized()
+ - create a UStringImpl::tryCreateUninitialized() form UStringImpl::createUninitialized(),
+ with current behaviour, make createUninitialized() crash on failure to allocate.
+ - make cases in JSC that do not check the result call createUninitialized(), and cases that do
+ check call tryCreateUninitialized().
+
+ Rename computedHash() to existingHash(), to bring this in line wih WebCore::StringImpl.
+
+ * API/JSClassRef.cpp:
+ (OpaqueJSClassContextData::OpaqueJSClassContextData):
+ * JavaScriptCore.exp:
+ * runtime/ArrayPrototype.cpp:
+ (JSC::arrayProtoFuncToString):
+ * runtime/Identifier.cpp:
+ (JSC::CStringTranslator::translate):
+ (JSC::UCharBufferTranslator::translate):
+ * runtime/JSString.cpp:
+ (JSC::JSString::resolveRope):
+ * runtime/Lookup.cpp:
+ (JSC::HashTable::createTable):
+ * runtime/Lookup.h:
+ (JSC::HashTable::entry):
+ * runtime/StringBuilder.h:
+ (JSC::StringBuilder::release):
+ * runtime/StringConstructor.cpp:
+ (JSC::stringFromCharCodeSlowCase):
+ * runtime/StringPrototype.cpp:
+ (JSC::substituteBackreferencesSlow):
+ (JSC::stringProtoFuncToLowerCase):
+ (JSC::stringProtoFuncToUpperCase):
+ (JSC::stringProtoFuncFontsize):
+ (JSC::stringProtoFuncLink):
+ * runtime/Structure.cpp:
+ (JSC::Structure::despecifyDictionaryFunction):
+ (JSC::Structure::get):
+ (JSC::Structure::despecifyFunction):
+ (JSC::Structure::put):
+ (JSC::Structure::remove):
+ (JSC::Structure::insertIntoPropertyMapHashTable):
+ (JSC::Structure::checkConsistency):
+ * runtime/Structure.h:
+ (JSC::Structure::get):
+ * runtime/StructureTransitionTable.h:
+ (JSC::StructureTransitionTableHash::hash):
+ * runtime/UString.cpp:
+ (JSC::createRep):
+ (JSC::UString::UString):
+ (JSC::UString::spliceSubstringsWithSeparators):
+ (JSC::UString::replaceRange):
+ (JSC::UString::operator=):
+ * runtime/UString.h:
+ (JSC::UString::adopt):
+ (JSC::IdentifierRepHash::hash):
+ (JSC::makeString):
+ * runtime/UStringImpl.h:
+ (JSC::UStringImpl::adopt):
+ (JSC::UStringImpl::create):
+ (JSC::UStringImpl::createUninitialized):
+ (JSC::UStringImpl::tryCreateUninitialized):
+ (JSC::UStringImpl::existingHash):
+
+2010-01-13 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Oliver Hunt.
+
+ JSON.stringify and JSON.parse needlessly process properties in the prototype chain
+ https://bugs.webkit.org/show_bug.cgi?id=33053
+
+ * runtime/JSONObject.cpp:
+ (JSC::Stringifier::Holder::appendNextProperty):
+ (JSC::Walker::walk):
+
+2010-01-13 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by NOBODY (buildfix).
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+
+2010-01-13 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33641
+ Assertion failure in Lexer.cpp if input stream ends while in string escape
+
+ Test: fast/js/end-in-string-escape.html
+
+ * parser/Lexer.cpp: (JSC::Lexer::lex): Bail out quickly on end of stream, not giving the
+ assertion a chance to fire.
+
+2010-01-13 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by NOBODY (buildfix).
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+
+2010-01-13 Gavin Barraclough <barraclough@apple.com>
+
+ Rubber stamped by Sam Weinig & Darin Adler.
+
+ Three quick fixes to UStringImpl.
+ - The destroy() method can be switched back to a normal destructor; since we've switched
+ the way we protect static strings to be using an odd ref-count the destroy() won't abort.
+ - The cost() calculation logic was wrong. If you have multiple JSStrings wrapping substrings
+ of a base string, they would each report the full cost of the base string to the heap.
+ Instead we should only be reporting once for the base string.
+ - Remove the overloaded new operator calling fastMalloc, replace this with a 'using' to pick
+ up the implementation from the parent class.
+
+ * JavaScriptCore.exp:
+ * runtime/UStringImpl.cpp:
+ (JSC::UStringImpl::~UStringImpl):
+ * runtime/UStringImpl.h:
+ (JSC::UStringImpl::cost):
+ (JSC::UStringImpl::deref):
+
+2010-01-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Split the build process in two different .pro files.
+ This allows qmake to be run once all source files are available.
+
+ * DerivedSources.pro: Added.
+ * JavaScriptCore.pri: Moved source generation to DerivedSources.pro
+ * pcre/pcre.pri: Moved source generation to DerivedSources.pro
+
+2010-01-12 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Geoffrey Garen.
+
+ [ES5] Implement Object.getOwnPropertyNames
+ https://bugs.webkit.org/show_bug.cgi?id=32242
+
+ Add an extra argument to getPropertyNames() and getOwnPropertyNames()
+ (and all reimplementations thereof) that indicates whether non-enumerable
+ properties should be added.
+
+ * API/JSCallbackObject.h:
+ * API/JSCallbackObjectFunctions.h:
+ (JSC::::getOwnPropertyNames):
+ * JavaScriptCore.exp:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ * debugger/DebuggerActivation.cpp:
+ (JSC::DebuggerActivation::getOwnPropertyNames):
+ * debugger/DebuggerActivation.h:
+ * runtime/Arguments.cpp:
+ (JSC::Arguments::getOwnPropertyNames):
+ * runtime/Arguments.h:
+ * runtime/CommonIdentifiers.h:
+ * runtime/JSArray.cpp:
+ (JSC::JSArray::getOwnPropertyNames):
+ * runtime/JSArray.h:
+ * runtime/JSByteArray.cpp:
+ (JSC::JSByteArray::getOwnPropertyNames):
+ * runtime/JSByteArray.h:
+ * runtime/JSFunction.cpp:
+ (JSC::JSFunction::getOwnPropertyNames):
+ * runtime/JSFunction.h:
+ * runtime/JSNotAnObject.cpp:
+ (JSC::JSNotAnObject::getOwnPropertyNames):
+ * runtime/JSNotAnObject.h:
+ * runtime/JSObject.cpp:
+ (JSC::getClassPropertyNames):
+ (JSC::JSObject::getPropertyNames):
+ (JSC::JSObject::getOwnPropertyNames):
+ * runtime/JSObject.h:
+ * runtime/JSVariableObject.cpp:
+ (JSC::JSVariableObject::getOwnPropertyNames):
+ * runtime/JSVariableObject.h:
+ * runtime/ObjectConstructor.cpp:
+ (JSC::ObjectConstructor::ObjectConstructor):
+ (JSC::objectConstructorGetOwnPropertyNames):
+ * runtime/RegExpMatchesArray.h:
+ (JSC::RegExpMatchesArray::getOwnPropertyNames):
+ * runtime/StringObject.cpp:
+ (JSC::StringObject::getOwnPropertyNames):
+ * runtime/StringObject.h:
+ * runtime/Structure.cpp: Rename getEnumerablePropertyNames() to getPropertyNames(), which takes an extra argument.
+ (JSC::Structure::getPropertyNames):
+ * runtime/Structure.h:
+ (JSC::):
+
+2010-01-12 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33540
+ Make it possible to build in debug mode with assertions disabled
+
+ * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION):
+ * runtime/Identifier.cpp: (JSC::Identifier::checkSameIdentifierTable):
+ * wtf/FastMalloc.cpp:
+ * wtf/HashTable.h: (WTF::HashTableConstIterator::checkValidity):
+ * yarr/RegexCompiler.cpp: (JSC::Yarr::compileRegex):
+
+2009-11-23 Yong Li <yoli@rim.com>
+
+ Reviewed by Adam Treat.
+
+ Make GIF decoder support down-sampling
+ https://bugs.webkit.org/show_bug.cgi?id=31806
+
+ * platform/image-decoders/ImageDecoder.cpp:
+ (WebCore::ImageDecoder::upperBoundScaledY):
+ (WebCore::ImageDecoder::lowerBoundScaledY):
+ * platform/image-decoders/ImageDecoder.h:
+ (WebCore::RGBA32Buffer::scaledRect):
+ (WebCore::RGBA32Buffer::setScaledRect):
+ (WebCore::ImageDecoder::scaledSize):
+ * platform/image-decoders/gif/GIFImageDecoder.cpp:
+ (WebCore::GIFImageDecoder::sizeNowAvailable):
+ (WebCore::GIFImageDecoder::initFrameBuffer):
+ (WebCore::copyOnePixel):
+ (WebCore::GIFImageDecoder::haveDecodedRow):
+ (WebCore::GIFImageDecoder::frameComplete):
+
+2010-01-12 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ ecma/Date/15.9.5.12-1.js fails every night at midnight
+ https://bugs.webkit.org/show_bug.cgi?id=28041
+
+ Change the test to use a concrete time instead of "now".
+
+ * tests/mozilla/ecma/Date/15.9.5.10-1.js:
+ * tests/mozilla/ecma/Date/15.9.5.12-1.js:
+
+2010-01-11 Csaba Osztrogonác <ossy@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Enable JIT and YARR_JIT if (CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100)
+
+ * wtf/Platform.h:
+
+2010-01-11 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33481
+ Uninitialized data members in ArrayStorage
+
+ SunSpider reports no change.
+
+ * runtime/JSArray.cpp:
+ (JSC::JSArray::JSArray): Initialize missing data members in the two cases
+ where we don't use fastZeroedMalloc, so it doesn't happen automatically.
+
+2010-01-11 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33480
+
+ Improve debugging reliability for WTF on Windows.
+ Store WTF static library's PDB file into a better location.
+
+ * JavaScriptCore.vcproj/WTF/WTF.vcproj:
+
+2010-01-11 Steve Falkenburg <sfalken@apple.com>
+
+ Windows build fix.
+ Remove extraneous entries from def file causing build warning.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+
+2010-01-10 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ RegExp.prototype.toString returns "//" for empty regular expressions
+ https://bugs.webkit.org/show_bug.cgi?id=33319
+
+ "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA.
+
+ * runtime/RegExpPrototype.cpp:
+ (JSC::regExpProtoFuncToString):
+
+ * tests/mozilla/ecma_2/RegExp/properties-001.js:
+ (AddRegExpCases):
+ * tests/mozilla/js1_2/regexp/toString.js:
+ Update relevant Mozilla tests (Mozilla has had this behavior since November 2003).
+
+2010-01-10 Darin Adler <darin@apple.com>
+
+ * tests/mozilla/ecma/Array/15.4.1.1.js: Added property allow-tabs.
+ * tests/mozilla/ecma/Array/15.4.1.2.js: Added property allow-tabs.
+ * tests/mozilla/ecma/Array/15.4.2.1-1.js: Added property allow-tabs.
+ * tests/mozilla/ecma/Array/15.4.2.2-1.js: Added property allow-tabs.
+ * tests/mozilla/ecma/Array/15.4.2.2-2.js: Added property allow-tabs.
+ * tests/mozilla/ecma/Array/15.4.2.3.js: Added property allow-tabs.
+ * tests/mozilla/ecma/Array/15.4.3.2.js: Added property allow-tabs.
+ * tests/mozilla/ecma/Array/15.4.3.js: Added property allow-tabs.
+ * tests/mozilla/ecma/Array/15.4.4.1.js: Added property allow-tabs.
+ * tests/mozilla/ecma/Array/15.4.4.js: Added property allow-tabs.
+ * tests/mozilla/ecma/LexicalConventions/7.7.4.js: Added property allow-tabs.
+ * tests/mozilla/ecma/Math/15.8.2.13.js: Added property allow-tabs.
+ * tests/mozilla/ecma/Math/15.8.2.16.js: Added property allow-tabs.
+ * tests/mozilla/ecma/Math/15.8.2.18.js: Added property allow-tabs.
+ * tests/mozilla/ecma/Math/15.8.2.2.js: Added property allow-tabs.
+ * tests/mozilla/ecma/Math/15.8.2.4.js: Added property allow-tabs.
+ * tests/mozilla/ecma/Math/15.8.2.5.js: Added property allow-tabs.
+ * tests/mozilla/ecma/Math/15.8.2.7.js: Added property allow-tabs.
+ * tests/mozilla/ecma/String/15.5.1.js: Added property allow-tabs.
+ * tests/mozilla/ecma/String/15.5.2.js: Added property allow-tabs.
+ * tests/mozilla/ecma/String/15.5.3.1-3.js: Added property allow-tabs.
+ * tests/mozilla/ecma/String/15.5.3.1-4.js: Added property allow-tabs.
+ * tests/mozilla/ecma/String/15.5.3.js: Added property allow-tabs.
+ * tests/mozilla/ecma/TypeConversion/9.5-2.js: Added property allow-tabs.
+ * tests/mozilla/ecma/jsref.js: Modified property allow-tabs.
+ * tests/mozilla/ecma/shell.js: Modified property allow-tabs.
+ * tests/mozilla/ecma_2/LexicalConventions/keywords-001.js: Added property allow-tabs.
+ * tests/mozilla/ecma_2/RegExp/exec-001.js: Added property allow-tabs.
+ * tests/mozilla/ecma_2/String/match-004.js: Added property allow-tabs.
+ * tests/mozilla/ecma_2/String/replace-001.js: Added property allow-tabs.
+ * tests/mozilla/ecma_2/String/split-002.js: Added property allow-tabs.
+ * tests/mozilla/ecma_2/jsref.js: Modified property allow-tabs.
+ * tests/mozilla/ecma_2/shell.js: Added property allow-tabs.
+ * tests/mozilla/ecma_3/Date/shell.js: Modified property allow-tabs.
+ * tests/mozilla/ecma_3/Exceptions/regress-181654.js: Added property allow-tabs.
+ * tests/mozilla/ecma_3/RegExp/regress-209067.js: Added property allow-tabs.
+ * tests/mozilla/ecma_3/RegExp/regress-85721.js: Added property allow-tabs.
+ * tests/mozilla/importList.html: Added property allow-tabs.
+ * tests/mozilla/js1_1/shell.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/Array/general1.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/Array/general2.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/Array/slice.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/Array/splice1.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/Array/splice2.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/Objects/toString-001.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/String/charCodeAt.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/String/concat.js: Modified property allow-tabs.
+ * tests/mozilla/js1_2/String/match.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/String/slice.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/function/Function_object.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/function/Number.js: Modified property allow-tabs.
+ * tests/mozilla/js1_2/function/String.js: Modified property allow-tabs.
+ * tests/mozilla/js1_2/function/nesting.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/function/regexparg-1.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/function/regexparg-2-n.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/jsref.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/operator/equality.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/operator/strictEquality.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/RegExp_dollar_number.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/RegExp_input.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/RegExp_lastIndex.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/RegExp_lastMatch.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/RegExp_lastMatch_as_array.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/RegExp_lastParen.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/RegExp_lastParen_as_array.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/RegExp_leftContext.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/RegExp_leftContext_as_array.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/RegExp_multiline.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/RegExp_multiline_as_array.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/RegExp_object.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/RegExp_rightContext.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/RegExp_rightContext_as_array.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/alphanumeric.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/asterisk.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/backslash.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/backspace.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/beginLine.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/character_class.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/compile.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/control_characters.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/digit.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/dot.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/endLine.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/everything.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/exec.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/flags.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/global.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/hexadecimal.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/ignoreCase.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/interval.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/octal.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/parentheses.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/plus.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/question_mark.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/simple_form.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/source.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/special_characters.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/string_replace.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/string_search.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/string_split.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/test.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/toString.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/vertical_bar.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/whitespace.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/regexp/word_boundary.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/shell.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/statements/break.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/statements/continue.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/statements/do_while.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/statements/switch.js: Added property allow-tabs.
+ * tests/mozilla/js1_2/statements/switch2.js: Added property allow-tabs.
+ * tests/mozilla/js1_3/shell.js: Added property allow-tabs.
+ * tests/mozilla/js1_4/shell.js: Added property allow-tabs.
+ * tests/mozilla/js1_5/Regress/regress-111557.js: Added property allow-tabs.
+ * tests/mozilla/js1_5/Regress/regress-216320.js: Added property allow-tabs.
+ * tests/mozilla/menuhead.html: Added property allow-tabs.
+ * tests/mozilla/mklistpage.pl: Added property allow-tabs.
+ * tests/mozilla/runtests.pl: Added property allow-tabs.
+
+2010-01-08 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33417
+
+ Cleans up style errors exposed by the patch for bug #33198.
+ Moreover, fixes all "Weird number of spaces at line-start. Are you using a 4-space indent?"
+ errors reported by check-webkit-style.
+
+ No functionality was changed. So, no new tests.
+
+ * wtf/Platform.h:
+
+2010-01-08 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ Don't store RegExp flags string representation
+ https://bugs.webkit.org/show_bug.cgi?id=33321
+
+ It's unused; the string representation is reconstructed from flags.
+
+ * runtime/RegExp.cpp:
+ (JSC::RegExp::RegExp):
+ * runtime/RegExp.h:
+
+2010-01-08 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Memory use grows grows possibly unbounded in this JavaScript Array test case
+ https://bugs.webkit.org/show_bug.cgi?id=31675
+
+ This fixes one observed bug in this test case, which is that
+ arrays don't report extra cost for the sparse value maps.
+
+ SunSpider reports a small speedup.
+
+ * runtime/JSArray.cpp:
+ (JSC::JSArray::putSlowCase): Report extra memory cost for
+ the sparse value map.
+ * runtime/JSArray.h:
+
+2010-01-08 Yong Li <yoli@rim.com>
+
+ Reviewed by Darin Adler.
+
+ Remove unnecessary #include from FastMalloc.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=33393
+
+ * wtf/FastMalloc.cpp:
+
+2010-01-08 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r52983.
+ http://trac.webkit.org/changeset/52983
+ https://bugs.webkit.org/show_bug.cgi?id=33321
+
+ Broke 59 JavaScriptCore tests. I don't think Kent knew about
+ run-javascriptcore-tests. Sadly neither does the commit-bot,
+ yet.
+
+ * runtime/RegExp.cpp:
+ (JSC::RegExp::RegExp):
+ * runtime/RegExp.h:
+ (JSC::RegExp::flags):
+
+2010-01-08 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r52981.
+ http://trac.webkit.org/changeset/52981
+ https://bugs.webkit.org/show_bug.cgi?id=33319
+
+ Caused two JS tests to start failing:
+ ecma_2/RegExp/properties-001.js and js1_2/regexp/toString.js
+
+ * runtime/RegExpPrototype.cpp:
+ (JSC::regExpProtoFuncToString):
+
+2010-01-08 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Don't store RegExp flags string representation
+ https://bugs.webkit.org/show_bug.cgi?id=33321
+
+ It's unused; the string representation is reconstructed from flags.
+
+ * runtime/RegExp.cpp:
+ (JSC::RegExp::RegExp):
+ * runtime/RegExp.h:
+
+2010-01-08 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ RegExp.prototype.toString returns "//" for empty regular expressions
+ https://bugs.webkit.org/show_bug.cgi?id=33319
+
+ "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA.
+
+ * runtime/RegExpPrototype.cpp:
+ (JSC::regExpProtoFuncToString):
+
+2010-01-08 Norbert Leser <norbert.leser@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ RVCT compiler with "-Otime -O3" optimization tries to optimize out
+ inline new'ed pointers that are passed as arguments.
+ Proposed patch assigns new'ed pointer explicitly outside function call.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33084
+
+ * API/JSClassRef.cpp:
+ (OpaqueJSClass::OpaqueJSClass):
+ (OpaqueJSClassContextData::OpaqueJSClassContextData):
+
+2010-01-08 Gabor Loki <loki@webkit.org>
+
+ Reviewed by Gavin Barraclough.
+
+ Remove an unnecessary cacheFlush from ARM_TRADITIONAL JIT
+ https://bugs.webkit.org/show_bug.cgi?id=33203
+
+ * assembler/ARMAssembler.cpp: Remove obsolete linkBranch function.
+ (JSC::ARMAssembler::executableCopy): Inline a clean linkBranch code.
+ * assembler/ARMAssembler.h:
+ (JSC::ARMAssembler::getLdrImmAddress): Use inline function.
+ (JSC::ARMAssembler::getLdrImmAddressOnPool): Ditto.
+ (JSC::ARMAssembler::patchPointerInternal): Remove an unnecessary cacheFlush.
+ (JSC::ARMAssembler::linkJump): Use patchPointerInternal instead of linkBranch.
+ (JSC::ARMAssembler::linkCall): Ditto.
+ (JSC::ARMAssembler::relinkCall): Ditto.
+
+2010-01-07 Gabor Loki <loki@webkit.org>
+
+ Reviewed by Gavin Barraclough.
+
+ Build fix for JSVALUE32 when ENABLE_JIT_OPTIMIZE* are disabled
+ https://bugs.webkit.org/show_bug.cgi?id=33311
+
+ Move compileGetDirectOffset function to common part of JSVALUE32
+
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::compileGetDirectOffset):
+
+2010-01-07 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Allow call sites to determine if ASSERT_* and LOG_* macros are operational
+ https://bugs.webkit.org/show_bug.cgi?id=33020
+
+ * wtf/Assertions.h: Set ASSERT_MSG_DISABLED, FATAL_DISABLED,
+ ERROR_DISABLED, LOG_DISABLED to 1 if the compiler does not support
+ variadic macros. Refactor for better readibility.
+
+2010-01-07 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32987
+
+ Added ENABLE_XHTMLMP flag. Disabled by default.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-01-07 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Gavin Barraclough.
+
+ [Symbian] Port ARM traditional JIT Trampolines to RVCT
+ https://bugs.webkit.org/show_bug.cgi?id=30552
+
+ Take the GCC implementation and mechanically convert
+ it to RVCT syntax.
+
+ Use 'bx rX' instead of 'mov pc, rX' when it is available.
+
+ Developed in cooperation with Iain Campbell and Gabor Loki.
+
+ * JavaScriptCore.pri: Extra step to generate RVCT stubs. The
+ script generation intentionally executed all the time not just
+ for RVCT targets.
+
+ * create_rvct_stubs: Added. Perl script to expand precompiler macros
+ for RVCT assembler - the template is defined in JITStubs.cpp.
+
+ * jit/JITStubs.cpp:
+ (JSC::ctiTrampoline):
+ (JSC::ctiVMThrowTrampoline):
+ (JSC::ctiOpThrowNotCaught):
+
+2010-01-07 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix a crash seen on the buildbots.
+
+ * runtime/JSGlobalObject.cpp:
+ (JSC::JSGlobalObject::init): Disable specific function tracking here,
+ instead of in WebCore, to ensure that the disabling happens before a
+ specific function can be registered.
+
+2010-01-07 Alexey Proskuryakov <ap@apple.com>
+
+ Mac build fix.
+
+ * JavaScriptCore.exp: Export new JSGlobalData static data members.
+
+2010-01-07 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33057
+ REGRESSION(r49365): typeof(xhr.responseText) != "string" in Windows
+
+ <rdar://problem/7296920> REGRESSION: WebKit fails to start PeaceKeeper benchmark
+
+ Test: fast/js/webcore-string-comparison.html
+
+ In r49365, some code was moved from JSString.cpp to JSString.h, and as a result, WebCore
+ got a way to directly instantiate JSStrings over DLL borders. Since vftable for JSString was
+ not exported, objects created from WebCore got a different vptr, and JavaScriptCore
+ optimizations that relied on vptr of all JSString objects being equal failed.
+
+ * config.h: Added a JS_EXPORTCLASS macro for exporting classes. It's currently the same as
+ JS_EXPORTDATA, but it clearly needed a new name.
+
+ * runtime/InitializeThreading.cpp:
+ (JSC::initializeThreadingOnce):
+ * runtime/JSGlobalData.cpp:
+ (JSC::JSGlobalData::storeVPtrs):
+ (JSC::JSGlobalData::JSGlobalData):
+ (JSC::JSGlobalData::createNonDefault):
+ (JSC::JSGlobalData::create):
+ (JSC::JSGlobalData::sharedInstance):
+ * runtime/JSGlobalData.h:
+ Store vptrs just once, no need to repeatedly pick and copy them. This makes it possible to
+ assert vptr correctness in object destructors (which don't have access to JSGlobalData,
+ and even Heap::heap(this) will fail for fake objects created from storeVPtrs()).
+
+ * runtime/JSArray.cpp: (JSC::JSArray::~JSArray): Assert that vptr is what we expect it to be.
+ It's important to assert in destructor, because MSVC changes the vptr after constructor
+ is invoked.
+ * runtime/JSByteArray.cpp: (JSC::JSByteArray::~JSByteArray): Ditto.
+ * runtime/JSByteArray.h: Ditto.
+ * runtime/JSFunction.h: Ditto.
+ * runtime/JSFunction.cpp: (JSC::JSFunction::~JSFunction): Ditto.
+
+ * runtime/JSCell.h: (JSC::JSCell::setVPtr): Added a method to substitute vptr for another
+ one.
+
+ * runtime/JSString.h: Export JSString class together with its vftable, and tell other
+ libraries tp import it. This is needed on platforms that have a separate JavaScriptCore
+ dynamic library - and on Mac, we already did the export via JavaScriptCore.exp.
+ (JSC::JSString::~JSString): Assert tha vptr is what we expect it to be.
+ (JSC::fixupVPtr): Store a previously saved primary vftable pointer (do nothing if building
+ JavaScriptCore itself).
+ (JSC::jsSingleCharacterString): Call fixupVPtr in case this is call across DLL boundary.
+ (JSC::jsSingleCharacterSubstring): Ditto.
+ (JSC::jsNontrivialString): Ditto.
+ (JSC::jsString): Ditto.
+ (JSC::jsSubstring): Ditto.
+ (JSC::jsOwnedString): Ditto.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new static
+ JSGlobalData members that are used in WebCore via inline functions.
+
+2010-01-07 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Safari memory usage skyrockets using new Google AdWords interface
+ https://bugs.webkit.org/show_bug.cgi?id=33343
+
+ The memory use was caused by the global object creating too many structures
+ as it thrashed between different specific functions.
+
+ * runtime/Structure.cpp:
+ (JSC::Structure::Structure):
+ (JSC::Structure::addPropertyTransition):
+ (JSC::Structure::changePrototypeTransition):
+ (JSC::Structure::despecifyFunctionTransition):
+ (JSC::Structure::addAnonymousSlotsTransition):
+ (JSC::Structure::getterSetterTransition):
+ (JSC::Structure::toDictionaryTransition):
+ (JSC::Structure::addPropertyWithoutTransition):
+ (JSC::Structure::despecifyAllFunctions):
+ * runtime/Structure.h:
+ (JSC::Structure::disableSpecificFunctionTracking): Track a thrash count
+ for specific functions. Disable specific function tracking once the
+ thrash count has been hit.
+
+2010-01-07 Csaba Osztrogonác <ossy@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Enable JIT in debug mode on win32 after r51141 fixed the crashes.
+
+ * JavaScriptCore.pri:
+
+2010-01-07 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ [Mac] Build fix when FAST_MALLOC_MATCH_VALIDATION=1
+ https://bugs.webkit.org/show_bug.cgi?id=33312
+
+ Using of operator += cause compile error on Mac, so it is changed to
+ "= static_cast<AllocAlignmentInteger*>(old_ptr) + 1".
+
+ * wtf/FastMalloc.cpp:
+ (WTF::TCMallocStats::realloc):
+
+2010-01-07 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Build fix when FAST_MALLOC_MATCH_VALIDATION=1
+ https://bugs.webkit.org/show_bug.cgi?id=33312
+
+ Remove pByte (committed in r42344 from #20422), because pByte doesn't
+ exist and it is unnecessary.
+
+ * wtf/FastMalloc.cpp:
+ (WTF::TCMallocStats::realloc):
+
+2010-01-06 Gavin Barraclough <barraclough@apple.com>
+
+ QT build fix.
+
+ * runtime/Identifier.cpp:
+ (JSC::createIdentifierTableSpecific):
+
+2010-01-06 Gavin Barraclough <barraclough@apple.com>
+
+ Windows build fix part I.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+
+2010-01-06 Dan Bernstein <mitz@apple.com>
+
+ Build fix
+
+ * runtime/Identifier.cpp:
+ (JSC::createIdentifierTableSpecificCallback):
+
+2010-01-05 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33236
+ Remove m_identifierTable pointer from UString
+
+ Currently every string holds a pointer so that during destruction,
+ if a string has been used as an identifier, it can remove itself
+ from the table. By instead accessing the identifierTable via a
+ thread specific tracking the table associated with the current
+ globaldata, we can save the memory cost of this pointer.
+
+ * API/APIShims.h:
+ (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
+ (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
+ (JSC::APICallbackShim::APICallbackShim):
+ (JSC::APICallbackShim::~APICallbackShim):
+
+ - change the API shims to track the identifierTable of the current JSGlobalData.
+
+ * API/JSContextRef.cpp:
+ (JSContextGroupCreate):
+
+ - update creation of JSGlobalData for API usage to use new create method.
+ - fix shim instanciation bug in JSGlobalContextCreateInGroup.
+
+ * JavaScriptCore.exp:
+ * runtime/Completion.cpp:
+ (JSC::checkSyntax):
+ (JSC::evaluate):
+
+ - add asserts to check the identifierTable is being tracked correctly.
+
+ * runtime/Identifier.cpp:
+ (JSC::IdentifierTable::~IdentifierTable):
+ (JSC::IdentifierTable::add):
+ (JSC::Identifier::remove):
+ (JSC::Identifier::checkSameIdentifierTable):
+ (JSC::createIdentifierTableSpecificCallback):
+ (JSC::createIdentifierTableSpecific):
+ (JSC::createDefaultDataSpecific):
+
+ - Use currentIdentifierTable() instead of UStringImpl::m_identifierTable.
+ - Define methods to access the thread specific identifier tables.
+
+ * runtime/Identifier.h:
+ (JSC::ThreadIdentifierTableData::ThreadIdentifierTableData):
+ (JSC::defaultIdentifierTable):
+ (JSC::setDefaultIdentifierTable):
+ (JSC::currentIdentifierTable):
+ (JSC::setCurrentIdentifierTable):
+ (JSC::resetCurrentIdentifierTable):
+
+ - Declare methods to access the thread specific identifier tables.
+
+ * runtime/JSGlobalData.cpp:
+ (JSC::JSGlobalData::createNonDefault):
+ (JSC::JSGlobalData::create):
+ (JSC::JSGlobalData::sharedInstance):
+
+ - creation of JSGlobalData objects, other than for API usage, associate themselves with the current thread.
+
+ * runtime/JSGlobalData.h:
+ * runtime/UStringImpl.cpp:
+ (JSC::UStringImpl::destroy):
+
+ - destroy() method should be using isIdentifier().
+
+ * runtime/UStringImpl.h:
+ (JSC::UStringImpl::isIdentifier):
+ (JSC::UStringImpl::setIsIdentifier):
+ (JSC::UStringImpl::checkConsistency):
+ (JSC::UStringImpl::UStringImpl):
+
+ - replace m_identifierTable with a single m_isIdentifier bit.
+
+ * wtf/StringHashFunctions.h:
+ (WTF::stringHash):
+
+ - change string hash result from 32-bit to 31-bit, to free a bit in UStringImpl for m_isIdentifier.
+
+2009-12-25 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Eric Seidel.
+
+ Buildfix for WinCE + style fixes.
+ https://bugs.webkit.org/show_bug.cgi?id=32939
+
+ * jsc.cpp:
+ (functionPrint):
+ (functionQuit):
+ (parseArguments):
+ (fillBufferWithContentsOfFile):
+
+2010-01-05 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Eric Seidel.
+
+ WinCE buildfix after r52791 (renamed PLATFORM(WINCE) to OS(WINCE)).
+ https://bugs.webkit.org/show_bug.cgi?id=33205
+
+ * jit/ExecutableAllocator.h:
+
+2010-01-05 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Darin Adler.
+
+ Added compiler error for unsupported platforms.
+ https://bugs.webkit.org/show_bug.cgi?id=33112
+
+ * jit/JITStubs.cpp:
+
+2010-01-05 Gabor Loki <loki@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Follow r52729 in ARMAssembler.
+ https://bugs.webkit.org/show_bug.cgi?id=33208
+
+ Use WTF_ARM_ARCH_AT_LEAST instead of ARM_ARCH_VERSION
+
+ * assembler/ARMAssembler.cpp:
+ (JSC::ARMAssembler::encodeComplexImm): Move tmp declaration to ARMv7
+ * assembler/ARMAssembler.h:
+ (JSC::ARMAssembler::):
+ (JSC::ARMAssembler::bkpt):
+
+2010-01-05 Maciej Stachowiak <mjs@apple.com>
+
+ Unreviewed build fix for Gtk+
+
+ Don't use // comments in Platform.h, at least some of them seem to make the version of GCC
+ used on the Gtk buildbot unhappy.
+
+ * wtf/Platform.h:
+
+2010-01-04 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Fisher.
+
+ Reorganize, document and rename OS() platform macros.
+ https://bugs.webkit.org/show_bug.cgi?id=33198
+
+ * wtf/Platform.h: Rename, reorganize and document OS() macros.
+
+ Adapt to name changes. Also fixed a few incorrect OS checks.
+
+ * API/JSContextRef.cpp:
+ * assembler/MacroAssemblerARM.cpp:
+ (JSC::isVFPPresent):
+ * assembler/MacroAssemblerX86Common.h:
+ * bytecode/SamplingTool.cpp:
+ * config.h:
+ * interpreter/RegisterFile.cpp:
+ (JSC::RegisterFile::~RegisterFile):
+ * interpreter/RegisterFile.h:
+ (JSC::RegisterFile::RegisterFile):
+ (JSC::RegisterFile::grow):
+ * jit/ExecutableAllocator.h:
+ * jit/ExecutableAllocatorFixedVMPool.cpp:
+ * jit/ExecutableAllocatorPosix.cpp:
+ * jit/ExecutableAllocatorSymbian.cpp:
+ * jit/ExecutableAllocatorWin.cpp:
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::privateCompileCTIMachineTrampolines):
+ * jit/JITStubs.cpp:
+ * jsc.cpp:
+ (main):
+ * parser/Grammar.y:
+ * profiler/ProfileNode.cpp:
+ (JSC::getCount):
+ * runtime/Collector.cpp:
+ (JSC::Heap::Heap):
+ (JSC::Heap::allocateBlock):
+ (JSC::Heap::freeBlockPtr):
+ (JSC::currentThreadStackBase):
+ (JSC::getCurrentPlatformThread):
+ (JSC::suspendThread):
+ (JSC::resumeThread):
+ (JSC::getPlatformThreadRegisters):
+ (JSC::otherThreadStackPointer):
+ * runtime/Collector.h:
+ * runtime/DateConstructor.cpp:
+ * runtime/DatePrototype.cpp:
+ (JSC::formatLocaleDate):
+ * runtime/InitializeThreading.cpp:
+ (JSC::initializeThreading):
+ * runtime/MarkStack.h:
+ (JSC::MarkStack::MarkStackArray::shrinkAllocation):
+ * runtime/MarkStackPosix.cpp:
+ * runtime/MarkStackSymbian.cpp:
+ * runtime/MarkStackWin.cpp:
+ * runtime/StringPrototype.cpp:
+ (JSC::stringProtoFuncLastIndexOf):
+ * runtime/TimeoutChecker.cpp:
+ (JSC::getCPUTime):
+ * runtime/UString.cpp:
+ (JSC::UString::from):
+ * wtf/Assertions.cpp:
+ * wtf/Assertions.h:
+ * wtf/CurrentTime.cpp:
+ (WTF::lowResUTCTime):
+ * wtf/CurrentTime.h:
+ (WTF::getLocalTime):
+ * wtf/DateMath.cpp:
+ * wtf/FastMalloc.cpp:
+ (WTF::TCMalloc_ThreadCache::InitModule):
+ (WTF::TCMallocStats::):
+ * wtf/FastMalloc.h:
+ * wtf/MathExtras.h:
+ * wtf/RandomNumber.cpp:
+ (WTF::randomNumber):
+ * wtf/RandomNumberSeed.h:
+ (WTF::initializeRandomNumberGenerator):
+ * wtf/StringExtras.h:
+ * wtf/TCSpinLock.h:
+ (TCMalloc_SpinLock::Unlock):
+ (TCMalloc_SlowLock):
+ * wtf/TCSystemAlloc.cpp:
+ * wtf/ThreadSpecific.h:
+ (WTF::::destroy):
+ * wtf/Threading.h:
+ * wtf/ThreadingPthreads.cpp:
+ (WTF::initializeThreading):
+ (WTF::isMainThread):
+ * wtf/ThreadingWin.cpp:
+ (WTF::wtfThreadEntryPoint):
+ (WTF::createThreadInternal):
+ * wtf/VMTags.h:
+ * wtf/unicode/icu/CollatorICU.cpp:
+ (WTF::Collator::userDefault):
+ * wtf/win/MainThreadWin.cpp:
+ (WTF::initializeMainThreadPlatform):
+
+2010-01-04 Gustavo Noronha Silva <gns@gnome.org>
+
+ Add missing files to the build system - make distcheck build fix.
+
+ * GNUmakefile.am:
+
+2010-01-04 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig, additional coding by Mark Rowe.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33163
+ Add string hashing functions to WTF.
+ Use WTF's string hashing functions from UStringImpl.
+
+ * GNUmakefile.am:
+ * JavaScriptCore.exp:
+ * JavaScriptCore.gypi:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * runtime/UStringImpl.cpp:
+ * runtime/UStringImpl.h:
+ (JSC::UStringImpl::computeHash):
+ * wtf/HashFunctions.h:
+ * wtf/StringHashFunctions.h: Added.
+ (WTF::stringHash):
+
+2010-01-04 Dmitry Titov <dimich@chromium.org>
+
+ Not reviewed, attempt to fix ARM bulid.
+
+ * wtf/Platform.h:
+
+2010-01-04 Gavin Barraclough <barraclough@apple.com>
+
+ Rubber stamped by Geoff Garen.
+
+ Add an 'isIdentifier' to UStringImpl, use this where appropriate
+ (where previously 'identifierTable' was being tested).
+
+ * API/JSClassRef.cpp:
+ (OpaqueJSClass::~OpaqueJSClass):
+ (OpaqueJSClassContextData::OpaqueJSClassContextData):
+ * runtime/Identifier.cpp:
+ (JSC::Identifier::addSlowCase):
+ * runtime/Identifier.h:
+ (JSC::Identifier::add):
+ * runtime/PropertyNameArray.cpp:
+ (JSC::PropertyNameArray::add):
+ * runtime/UStringImpl.h:
+ (JSC::UStringImpl::isIdentifier):
+
+2010-01-04 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam "Shimmey Shimmey" Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33158
+ Refactor JSC API entry/exit to use RAII instead of copy/pasting code.
+ Make it easier to change set of actions taken when passing across the API boundary.
+
+ * API/APIShims.h: Added.
+ (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
+ (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
+ (JSC::APIEntryShim::APIEntryShim):
+ (JSC::APICallbackShim::APICallbackShim):
+ (JSC::APICallbackShim::~APICallbackShim):
+ * API/JSBase.cpp:
+ (JSEvaluateScript):
+ (JSCheckScriptSyntax):
+ (JSGarbageCollect):
+ (JSReportExtraMemoryCost):
+ * API/JSCallbackConstructor.cpp:
+ (JSC::constructJSCallback):
+ * API/JSCallbackFunction.cpp:
+ (JSC::JSCallbackFunction::call):
+ * API/JSCallbackObjectFunctions.h:
+ (JSC::::init):
+ (JSC::::getOwnPropertySlot):
+ (JSC::::put):
+ (JSC::::deleteProperty):
+ (JSC::::construct):
+ (JSC::::hasInstance):
+ (JSC::::call):
+ (JSC::::getOwnPropertyNames):
+ (JSC::::toNumber):
+ (JSC::::toString):
+ (JSC::::staticValueGetter):
+ (JSC::::callbackGetter):
+ * API/JSContextRef.cpp:
+ * API/JSObjectRef.cpp:
+ (JSObjectMake):
+ (JSObjectMakeFunctionWithCallback):
+ (JSObjectMakeConstructor):
+ (JSObjectMakeFunction):
+ (JSObjectMakeArray):
+ (JSObjectMakeDate):
+ (JSObjectMakeError):
+ (JSObjectMakeRegExp):
+ (JSObjectGetPrototype):
+ (JSObjectSetPrototype):
+ (JSObjectHasProperty):
+ (JSObjectGetProperty):
+ (JSObjectSetProperty):
+ (JSObjectGetPropertyAtIndex):
+ (JSObjectSetPropertyAtIndex):
+ (JSObjectDeleteProperty):
+ (JSObjectCallAsFunction):
+ (JSObjectCallAsConstructor):
+ (JSObjectCopyPropertyNames):
+ (JSPropertyNameArrayRelease):
+ (JSPropertyNameAccumulatorAddName):
+ * API/JSValueRef.cpp:
+ (JSValueGetType):
+ (JSValueIsUndefined):
+ (JSValueIsNull):
+ (JSValueIsBoolean):
+ (JSValueIsNumber):
+ (JSValueIsString):
+ (JSValueIsObject):
+ (JSValueIsObjectOfClass):
+ (JSValueIsEqual):
+ (JSValueIsStrictEqual):
+ (JSValueIsInstanceOfConstructor):
+ (JSValueMakeUndefined):
+ (JSValueMakeNull):
+ (JSValueMakeBoolean):
+ (JSValueMakeNumber):
+ (JSValueMakeString):
+ (JSValueToBoolean):
+ (JSValueToNumber):
+ (JSValueToStringCopy):
+ (JSValueToObject):
+ (JSValueProtect):
+ (JSValueUnprotect):
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+
+2010-01-04 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Ada Chan and Mark Rowe.
+
+ Updated copyright string
+
+ * Info.plist:
+ * JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
+
+2010-01-04 Adam Roben <aroben@apple.com>
+
+ No review, rolling out r52741.
+ http://trac.webkit.org/changeset/52741
+ https://bugs.webkit.org/show_bug.cgi?id=33056
+
+ * wtf/AlwaysInline.h:
+
+2010-01-04 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Darin Adler.
+
+ Add cacheFlush support for WinCE
+ https://bugs.webkit.org/show_bug.cgi?id=33110
+
+ * jit/ExecutableAllocator.h:
+ (JSC::ExecutableAllocator::cacheFlush):
+
+2010-01-04 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Adam Roben.
+
+ Implement NO_RETURN for COMPILER(MSVC).
+ https://bugs.webkit.org/show_bug.cgi?id=33056
+
+ * wtf/AlwaysInline.h:
+
+2010-01-04 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Simon Hausmann.
+
+ Fix some PLATFORM(*_ENDIAN) uses to CPU()
+ https://bugs.webkit.org/show_bug.cgi?id=33148
+
+ * runtime/JSCell.cpp:
+ (JSC::):
+ * runtime/JSValue.h:
+ (JSC::JSValue::):
+
+2010-01-04 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Adam Barth.
+
+ Document CPU() macros in comments.
+ https://bugs.webkit.org/show_bug.cgi?id=33147
+
+ * wtf/Platform.h:
+
+2010-01-04 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Adam Barth.
+
+ Reorganize, document and rename CPU() platform macros.
+ https://bugs.webkit.org/show_bug.cgi?id=33145
+ ExecutableAllocatorSymbian appears to have buggy ARM version check
+ https://bugs.webkit.org/show_bug.cgi?id=33138
+
+ * wtf/Platform.h:
+ Rename all macros related to detection of particular CPUs or
+ classes of CPUs to CPU(), reorganize and document them.
+
+ All remaining changes are adapting to the renames, plus fixing the
+ second bug cited above.
+
+ * assembler/ARMAssembler.cpp:
+ * assembler/ARMAssembler.h:
+ * assembler/ARMv7Assembler.h:
+ * assembler/AbstractMacroAssembler.h:
+ (JSC::AbstractMacroAssembler::Imm32::Imm32):
+ * assembler/MacroAssembler.h:
+ * assembler/MacroAssemblerARM.cpp:
+ * assembler/MacroAssemblerARM.h:
+ * assembler/MacroAssemblerCodeRef.h:
+ (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
+ * assembler/MacroAssemblerX86.h:
+ * assembler/MacroAssemblerX86Common.h:
+ * assembler/MacroAssemblerX86_64.h:
+ * assembler/X86Assembler.h:
+ (JSC::X86Registers::):
+ (JSC::X86Assembler::):
+ (JSC::X86Assembler::movl_mEAX):
+ (JSC::X86Assembler::movl_EAXm):
+ (JSC::X86Assembler::repatchLoadPtrToLEA):
+ (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
+ * jit/ExecutableAllocator.h:
+ * jit/ExecutableAllocatorFixedVMPool.cpp:
+ * jit/ExecutableAllocatorPosix.cpp:
+ * jit/ExecutableAllocatorSymbian.cpp:
+ (JSC::ExecutableAllocator::intializePageSize):
+ * jit/JIT.cpp:
+ * jit/JIT.h:
+ * jit/JITArithmetic.cpp:
+ * jit/JITInlineMethods.h:
+ (JSC::JIT::beginUninterruptedSequence):
+ (JSC::JIT::restoreArgumentReferenceForTrampoline):
+ (JSC::JIT::emitCount):
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::privateCompileCTIMachineTrampolines):
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::privateCompileGetByIdProto):
+ (JSC::JIT::privateCompileGetByIdProtoList):
+ (JSC::JIT::privateCompileGetByIdChainList):
+ (JSC::JIT::privateCompileGetByIdChain):
+ * jit/JITStubs.cpp:
+ (JSC::JITThunks::JITThunks):
+ * jit/JITStubs.h:
+ * runtime/Collector.cpp:
+ (JSC::currentThreadStackBase):
+ (JSC::getPlatformThreadRegisters):
+ (JSC::otherThreadStackPointer):
+ * wrec/WREC.h:
+ * wrec/WRECGenerator.cpp:
+ (JSC::WREC::Generator::generateEnter):
+ (JSC::WREC::Generator::generateReturnSuccess):
+ (JSC::WREC::Generator::generateReturnFailure):
+ * wrec/WRECGenerator.h:
+ * wtf/FastMalloc.cpp:
+ * wtf/TCSpinLock.h:
+ (TCMalloc_SpinLock::Lock):
+ (TCMalloc_SpinLock::Unlock):
+ (TCMalloc_SlowLock):
+ * wtf/Threading.h:
+ * wtf/dtoa.cpp:
+ * yarr/RegexJIT.cpp:
+ (JSC::Yarr::RegexGenerator::generateEnter):
+ (JSC::Yarr::RegexGenerator::generateReturn):
+ * yarr/RegexJIT.h:
+
+2010-01-04 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Adam Barth.
+
+ Clean up COMPILER macros and remove unused ones.
+ https://bugs.webkit.org/show_bug.cgi?id=33132
+
+ Removed values are COMPILER(BORLAND) and COMPILER(CYGWIN) - they were
+ not used anywhere.
+
+ * wtf/Platform.h:
+
+2010-01-03 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Update wtf/Platform.h to document the new system for porting macros.
+ https://bugs.webkit.org/show_bug.cgi?id=33130
+
+ * wtf/Platform.h:
+
+2009-12-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ PLATFORM(CAIRO) should be defined by WIN_CAIRO define
+ https://bugs.webkit.org/show_bug.cgi?id=22250
+
+ * wtf/Platform.h: Define WTF_PLATFORM_CAIRO for GTK port only
+ For the WinCairo port WTF_PLATFORM_CAIRO is already defined in config.h
+
+2009-12-28 Shu Chang <Chang.Shu@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Delete ThreadPrivate instance after it is finished.
+ https://bugs.webkit.org/show_bug.cgi?id=32614
+
+ * wtf/qt/ThreadingQt.cpp:
+ (WTF::ThreadMonitor::instance):
+ (WTF::ThreadMonitor::threadFinished):
+ (WTF::createThreadInternal):
+ (WTF::detachThread):
+
+2009-12-28 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Cleanup of #define JS_EXPORT.
+
+ * API/JSBase.h:
+
+2009-12-27 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Adam Barth.
+
+ WinCE buildfix (HWND_MESSAGE isn't supported there)
+
+ * wtf/win/MainThreadWin.cpp:
+ (WTF::initializeMainThreadPlatform):
+
+2009-12-27 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Adam Barth.
+
+ Added a file with WinMain function to link agains in WinCE.
+
+ * os-win32/WinMain.cpp: Added.
+ (convertToUtf8):
+ (WinMain):
+
+2009-12-24 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed; revert of r52550.
+
+ The change regressed the following LayoutTests for QtWebKit.
+
+ fast/workers/worker-call.html -> crashed
+ fast/workers/worker-close.html -> crashed
+
+ * wtf/qt/ThreadingQt.cpp:
+ (WTF::waitForThreadCompletion):
+ (WTF::detachThread):
+
+2009-12-24 Shu Chang <Chang.Shu@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Fix memory leak by deleting instance of ThreadPrivate
+ in function waitForThreadCompletion(), synchronously, or in
+ detachThread(), asynchronously.
+ https://bugs.webkit.org/show_bug.cgi?id=32614
+
+ * wtf/qt/ThreadingQt.cpp:
+ (WTF::waitForThreadCompletion):
+ (WTF::detachThread):
+
+2009-12-23 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Laszlo Gombos.
+
+ Include stddef.h for ptrdiff_t
+ https://bugs.webkit.org/show_bug.cgi?id=32891
+
+ ptrdiff_t is typedef-ed in stddef.h.
+ Include stddef.h in jit/ExecutableAllocator.h.
+
+ * jit/ExecutableAllocator.h:
+
+2009-12-23 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Eric Seidel.
+
+ Buildfix after r47092.
+
+ * wtf/wince/MemoryManager.cpp:
+ (WTF::tryFastMalloc):
+ (WTF::tryFastZeroedMalloc):
+ (WTF::tryFastCalloc):
+ (WTF::tryFastRealloc):
+
+2009-12-23 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ HTMLInputElement::valueAsDate getter support.
+ https://bugs.webkit.org/show_bug.cgi?id=32876
+
+ Expose dateToDaysFrom1970().
+
+ * JavaScriptCore.exp:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ * wtf/DateMath.cpp:
+ (WTF::dateToDaysFrom1970):
+ * wtf/DateMath.h:
+
+2009-12-22 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Turn off datagrid by default, at least for all platforms Apple ships.
+ The datagrid implementation isn't ready for general web use yet.
+
+ * Configurations/FeatureDefines.xcconfig: Turn off datagrid by default.
+
+2009-12-22 Steve Block <steveblock@google.com>
+
+ Reviewed by David Levin.
+
+ Updates Android's scheduleDispatchFunctionsOnMainThread() to use new
+ AndroidThreading class, rather than using JavaSharedClient directly.
+ This fixes the current layering violation.
+ https://bugs.webkit.org/show_bug.cgi?id=32651
+
+ The pattern is copied from Chromium, which uses the ChromiumThreading
+ class. This patch also fixes the style in ChromiumThreading.h.
+
+ * wtf/android/AndroidThreading.h: Added. Declares AndroidThreading.
+ * wtf/android/MainThreadAndroid.cpp: Modified
+ (WTF::scheduleDispatchFunctionsOnMainThread): Uses AndroidThreading.
+ * wtf/chromium/ChromiumThreading.h: Modified. Fixes style.
+
+2009-12-22 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix a couple of problems with UntypedPtrAndBitfield.
+
+ Add a m_leaksPtr to reduce false positives from leaks in debug builds
+ (this isn't perfect because we'd like a solution for release builds,
+ but this is now at least as good as a PtrAndFlags would be).
+
+ Switch SmallStringsto use a regular string for the base, rather than
+ a static one. UntypedPtrAndBitfield assumes all strings are at least
+ 8 byte aligned; this migt not be true of static strings. Shared buffers
+ are heap allocated, as are all UStringImpls other than static strings.
+ Static strings cannot end up being the owner string of substrings,
+ since the only static strings are length 0.
+
+ * runtime/SmallStrings.cpp:
+ (JSC::SmallStringsStorage::SmallStringsStorage):
+ * runtime/UStringImpl.h:
+ (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
+ (JSC::UStringImpl::UStringImpl):
+
+2009-12-22 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Darin Adler.
+
+ RVCT (__ARMCC_VERSION < 400000) does not provide strcasecmp and strncasecmp
+ https://bugs.webkit.org/show_bug.cgi?id=32857
+
+ Add implementation of strcasecmp and strncasecmp for RVCT < 4.0
+ because earlier versions of RVCT 4.0 does not provide these functions.
+
+ * wtf/StringExtras.cpp: Added.
+ (strcasecmp):
+ (strncasecmp):
+ * wtf/StringExtras.h:
+
+2009-12-22 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Darin Adler.
+
+ Define ALWAYS_INLINE and WTF_PRIVATE_INLINE to __forceinline for RVCT
+ https://bugs.webkit.org/show_bug.cgi?id=32853
+
+ Use __forceinline forces RVCT to compile a C or C++ function
+ inline. The compiler attempts to inline the function, regardless of
+ the characteristics of the function.
+
+ * wtf/AlwaysInline.h:
+ * wtf/FastMalloc.h:
+
+2009-12-21 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Prospective GTK build fix: Add UStringImpl.cpp/h to the build.
+
+ * GNUmakefile.am:
+
+2009-12-21 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Fix the Qt build, add UStringImpl.cpp to the build.
+
+ * JavaScriptCore.pri:
+
+2009-12-21 Gavin Barraclough <barraclough@apple.com>
+
+ Windows Build fix part 5.
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+
+2009-12-21 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by NOBODY (build fix).
+ Fix breakage of world introduced in build fix to r52463.
+
+ * runtime/UStringImpl.h:
+
+2009-12-21 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32831
+ Replace UString::Rep implementation, following introduction of ropes to JSC.
+
+ * Remove redundant overcapacity mechanisms.
+ * Reduce memory cost of Rep's.
+ * Add an inline storage mechanism akin to that in WebCore's StringImpl.
+
+ ~1% Sunspider progression.
+
+ * JavaScriptCore.exp:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * runtime/JSString.cpp:
+ (JSC::JSString::resolveRope):
+ * runtime/SmallStrings.cpp:
+ (JSC::SmallStringsStorage::SmallStringsStorage):
+ * runtime/UString.cpp:
+ (JSC::initializeUString):
+ (JSC::createRep):
+ (JSC::UString::createFromUTF8):
+ (JSC::UString::createUninitialized):
+ (JSC::UString::spliceSubstringsWithSeparators):
+ (JSC::UString::replaceRange):
+ (JSC::UString::ascii):
+ (JSC::UString::operator=):
+ (JSC::UString::toStrictUInt32):
+ (JSC::equal):
+ * runtime/UString.h:
+ (JSC::UString::isEmpty):
+ (JSC::UString::cost):
+ (JSC::makeString):
+ * runtime/UStringImpl.cpp: Added.
+ (JSC::UStringImpl::baseSharedBuffer):
+ (JSC::UStringImpl::sharedBuffer):
+ (JSC::UStringImpl::destroy):
+ (JSC::UStringImpl::computeHash):
+ * runtime/UStringImpl.h: Added.
+ (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
+ (JSC::UntypedPtrAndBitfield::asPtr):
+ (JSC::UntypedPtrAndBitfield::operator&=):
+ (JSC::UntypedPtrAndBitfield::operator|=):
+ (JSC::UntypedPtrAndBitfield::operator&):
+ (JSC::UStringImpl::create):
+ (JSC::UStringImpl::createCopying):
+ (JSC::UStringImpl::createUninitialized):
+ (JSC::UStringImpl::data):
+ (JSC::UStringImpl::size):
+ (JSC::UStringImpl::cost):
+ (JSC::UStringImpl::hash):
+ (JSC::UStringImpl::computedHash):
+ (JSC::UStringImpl::setHash):
+ (JSC::UStringImpl::identifierTable):
+ (JSC::UStringImpl::setIdentifierTable):
+ (JSC::UStringImpl::ref):
+ (JSC::UStringImpl::deref):
+ (JSC::UStringImpl::allocChars):
+ (JSC::UStringImpl::copyChars):
+ (JSC::UStringImpl::computeHash):
+ (JSC::UStringImpl::null):
+ (JSC::UStringImpl::empty):
+ (JSC::UStringImpl::checkConsistency):
+ (JSC::UStringImpl::):
+ (JSC::UStringImpl::UStringImpl):
+ (JSC::UStringImpl::operator new):
+ (JSC::UStringImpl::bufferOwnerString):
+ (JSC::UStringImpl::bufferOwnership):
+ (JSC::UStringImpl::isStatic):
+
+2009-12-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Move some build decisions from Qt build system into source files
+ https://bugs.webkit.org/show_bug.cgi?id=31956
+
+ * JavaScriptCore.pri: Compile files unconditionally
+ * jit/ExecutableAllocatorPosix.cpp: Guard with PLATFORM(UNIX) && !PLATFORM(SYMBIAN)
+ * jit/ExecutableAllocatorWin.cpp: Guard with PLATFORM(WIN_OS)
+ * runtime/MarkStackPosix.cpp: Guard with PLATFORM(UNIX) && !PLATFORM(SYMBIAN)
+ * runtime/MarkStackSymbian.cpp: Guard with PLATFORM(SYMBIAN)
+ * runtime/MarkStackWin.cpp: Guard with PLATFORM(WIN_OS)
+ * wtf/Platform.h: Guard ENABLE_JSC_MULTIPLE_THREADS with ENABLE_SINGLE_THREADED for the Qt port
+ * wtf/ThreadingNone.cpp: Guard with ENABLE(SINGLE_THREADED)
+ * wtf/qt/ThreadingQt.cpp: Guard with !ENABLE(SINGLE_THREADED)
+
+2009-12-18 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add createNonCopying method to UString to make replace constructor passed bool,
+ to make behaviour more explicit. Add createFromUTF8 to UString (wrapping method
+ on UString::Rep), since other cases of transliteration (e.g. from ascii) are
+ performed in UString constructors. Add/use setHash & size() accessors on Rep,
+ rather than accessing _hash/len directly.
+
+ * API/JSClassRef.cpp:
+ (OpaqueJSClass::OpaqueJSClass):
+ * API/OpaqueJSString.cpp:
+ (OpaqueJSString::ustring):
+ * JavaScriptCore.exp:
+ * runtime/ArrayPrototype.cpp:
+ (JSC::arrayProtoFuncToString):
+ * runtime/Identifier.cpp:
+ (JSC::Identifier::equal):
+ (JSC::CStringTranslator::translate):
+ (JSC::UCharBufferTranslator::translate):
+ (JSC::Identifier::addSlowCase):
+ * runtime/JSString.cpp:
+ (JSC::JSString::resolveRope):
+ * runtime/JSString.h:
+ (JSC::JSString::Rope::Fiber::refAndGetLength):
+ (JSC::JSString::Rope::append):
+ * runtime/StringBuilder.h:
+ (JSC::StringBuilder::release):
+ * runtime/StringConstructor.cpp:
+ (JSC::stringFromCharCodeSlowCase):
+ * runtime/StringPrototype.cpp:
+ (JSC::substituteBackreferencesSlow):
+ (JSC::stringProtoFuncToLowerCase):
+ (JSC::stringProtoFuncToUpperCase):
+ (JSC::stringProtoFuncFontsize):
+ (JSC::stringProtoFuncLink):
+ * runtime/UString.cpp:
+ (JSC::UString::UString):
+ (JSC::UString::createNonCopying):
+ (JSC::UString::createFromUTF8):
+ * runtime/UString.h:
+ (JSC::UString::Rep::setHash):
+ (JSC::UString::~UString):
+ (JSC::makeString):
+
+2009-12-18 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Cameron Zwarich and Gavin Barraclough.
+
+ Changed Register constructors to assignment operators, to streamline
+ moving values into registers. (In theory, there's no difference between
+ the two, since the constructor should just inline away, but there seems
+ to be a big difference in the addled mind of the GCC optimizer.)
+
+ In the interpreter, this is a 3.5% SunSpider speedup and a 1K-2K
+ reduction in stack usage per privateExecute stack frame.
+
+ * interpreter/CallFrame.h:
+ (JSC::ExecState::setCalleeArguments):
+ (JSC::ExecState::setCallerFrame):
+ (JSC::ExecState::setScopeChain):
+ (JSC::ExecState::init):
+ (JSC::ExecState::setArgumentCount):
+ (JSC::ExecState::setCallee):
+ (JSC::ExecState::setCodeBlock): Added a little bit of casting so these
+ functions could use the new Register assignment operators.
+
+ * interpreter/Register.h:
+ (JSC::Register::withInt):
+ (JSC::Register::Register):
+ (JSC::Register::operator=): Swapped in assignment operators for constructors.
+
+2009-12-18 Yongjun Zhang <yongjun.zhang@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32713
+ [Qt] make wtf/Assertions.h compile in winscw compiler.
+
+ Add string arg before ellipsis to help winscw compiler resolve variadic
+ macro definitions in wtf/Assertions.h.
+
+ * wtf/Assertions.h:
+
+2009-12-18 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Fixed intermittent failure seen on Windows buildbot, and in other JSC
+ API clients.
+
+ Added a WeakGCPtr class and changed OpaqueJSClass::cachedPrototype to
+ use it, to avoid vending a stale object as a prototype.
+
+ * API/JSClassRef.cpp:
+ (OpaqueJSClassContextData::OpaqueJSClassContextData):
+ (OpaqueJSClass::prototype):
+ * API/JSClassRef.h: Use WeakGCPtr.
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * runtime/WeakGCPtr.h: Added.
+ (JSC::WeakGCPtr::WeakGCPtr):
+ (JSC::WeakGCPtr::get):
+ (JSC::WeakGCPtr::clear):
+ (JSC::WeakGCPtr::operator*):
+ (JSC::WeakGCPtr::operator->):
+ (JSC::WeakGCPtr::operator!):
+ (JSC::WeakGCPtr::operator bool):
+ (JSC::WeakGCPtr::operator UnspecifiedBoolType):
+ (JSC::WeakGCPtr::assign):
+ (JSC::::operator):
+ (JSC::operator==):
+ (JSC::operator!=):
+ (JSC::static_pointer_cast):
+ (JSC::const_pointer_cast):
+ (JSC::getPtr): Added WeakGCPtr to the project.
+
+2009-12-18 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32720
+
+ * JavaScriptCore.exp:
+ - Remove exports for UString::append
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ - Make StringBuilder a private header (was project).
+
+2009-12-18 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] GRefPtr does not take a reference when assigned a raw pointer
+ https://bugs.webkit.org/show_bug.cgi?id=32709
+
+ Ensure that when assigning a raw pointer to a GRefPtr, the reference
+ count is incremented. Also remove the GRefPtr conversion overload as
+ GRefPtr types have necessarily incompatible reference counting.
+
+ * wtf/gtk/GRefPtr.h:
+ (WTF::GRefPtr::operator=):
+
+2009-12-18 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Clean up the qmake build system to distinguish between trunk builds and package builds
+
+ https://bugs.webkit.org/show_bug.cgi?id=32716
+
+ * pcre/pcre.pri: Use standalone_package instead of QTDIR_build
+
+2009-12-18 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Compile warning from line 29 of GRefPtr.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=32703
+
+ Fix memory leak and compiler warning in GRefPtr GHashTable template
+ specialization.
+
+ * wtf/gtk/GRefPtr.cpp:
+ (WTF::refGPtr):
+
+2009-12-17 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Add BUILDING_ON_SNOW_LEOPARD and TARGETING_SNOW_LEOPARD #defines.
+
+ * wtf/Platform.h:
+
+2009-12-17 Adam Roben <aroben@apple.com>
+
+ Sync JavaScriptCore.vcproj with JavaScriptCore.xcodeproj and the
+ source tree
+
+ Fixes <http://webkit.org/b/32665>.
+
+ Reviewed by Ada Chan.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Moved
+ around files and filters so that the structure matches
+ JavaScriptCore.xcodeproj and the source tree. A few headers that were
+ previously omitted have been added, as well as JSZombie.{cpp,h}.
+
+2009-12-17 Adam Roben <aroben@apple.com>
+
+ Remove HeavyProfile and TreeProfile completely
+
+ These were mostly removed in r42808, but the empty files were left in
+ place.
+
+ Fixes <http://webkit.org/b/32664>.
+
+ Reviewed by John Sullivan.
+
+ * Android.mk:
+ * GNUmakefile.am:
+ * JavaScriptCore.gypi:
+ * JavaScriptCore.pri:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+ * JavaScriptCoreSources.bkl:
+ Removed HeavyProfile/TreeProfile source files.
+
+ * profiler/HeavyProfile.cpp: Removed.
+ * profiler/HeavyProfile.h: Removed.
+ * profiler/TreeProfile.cpp: Removed.
+ * profiler/TreeProfile.h: Removed.
+
+2009-12-17 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] WebKit GTK needs a wrapper for ref counted glib/gobject structs
+ https://bugs.webkit.org/show_bug.cgi?id=21599
+
+ Implement GRefPtr, a smart pointer for reference counted GObject types.
+
+ * GNUmakefile.am:
+ * wtf/gtk/GOwnPtr.cpp:
+ (WTF::GDir):
+ * wtf/gtk/GRefPtr.h: Added.
+ (WTF::):
+ (WTF::GRefPtr::GRefPtr):
+ (WTF::GRefPtr::~GRefPtr):
+ (WTF::GRefPtr::clear):
+ (WTF::GRefPtr::get):
+ (WTF::GRefPtr::operator*):
+ (WTF::GRefPtr::operator->):
+ (WTF::GRefPtr::operator!):
+ (WTF::GRefPtr::operator UnspecifiedBoolType):
+ (WTF::GRefPtr::hashTableDeletedValue):
+ (WTF::::operator):
+ (WTF::::swap):
+ (WTF::swap):
+ (WTF::operator==):
+ (WTF::operator!=):
+ (WTF::static_pointer_cast):
+ (WTF::const_pointer_cast):
+ (WTF::getPtr):
+ (WTF::adoptGRef):
+ (WTF::refGPtr):
+ (WTF::derefGPtr):
+
+2009-12-17 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed. Build fixes for make distcheck.
+
+ * GNUmakefile.am:
+
+2009-12-16 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fixed <rdar://problem/7355025> Interpreter::privateExecute macro generates
+ bloated code
+
+ This patch cuts Interpreter stack use by about a third.
+
+ * bytecode/Opcode.h: Changed Opcode to const void* to work with the
+ const static initiliazation we want to do in Interpreter::privateExecute.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::Interpreter): Moved hashtable initialization here to
+ avoid polluting Interpreter::privateExecute's stack, and changed it from a
+ series of add() calls to one add() call in a loop, to cut down on code size.
+
+ (JSC::Interpreter::privateExecute): Changed a series of label computations
+ to a copy of a compile-time constant array to cut down on code size.
+
+2009-12-16 Mark Rowe <mrowe@apple.com>
+
+ Build fix. Disable debug variants of WebKit frameworks.
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+
+2009-12-15 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam "r=me" Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32498
+ <rdar://problem/7471495>
+ REGRESSION(r51978-r52039): AJAX "Mark This Forum Read" function no longer
+ works
+
+ Fixed a tyop.
+
+ * runtime/Operations.h:
+ (JSC::jsAdd): Use the '&&' operator, not the ',' operator.
+
+2009-12-15 Geoffrey Garen <ggaren@apple.com>
+
+ Try to fix the windows build: don't export this inlined function.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+
+2009-12-15 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Inlined JSCell's operator new.
+
+ 3.7% speedup on bench-allocate-nonretained.js.
+
+ * JavaScriptCore.exp:
+ * runtime/JSCell.cpp:
+ * runtime/JSCell.h:
+ (JSC::JSCell::operator new):
+
+2009-12-15 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Removed the number heap, replacing it with a one-item free list for
+ numbers, taking advantage of the fact that two number cells fit inside
+ the space for one regular cell, and number cells don't require destruction.
+
+ SunSpider says 1.6% faster in JSVALUE32 mode (the only mode that
+ heap-allocates numbers).
+
+ SunSpider says 1.1% faster in JSVALUE32_64 mode. v8 says 0.8% faster
+ in JSVALUE32_64 mode. 10% speedup on bench-alloc-nonretained.js. 6%
+ speedup on bench-alloc-retained.js.
+
+ There's a lot of formulaic change in this patch, but not much substance.
+
+ * JavaScriptCore.exp:
+ * debugger/Debugger.cpp:
+ (JSC::Debugger::recompileAllJSFunctions):
+ * runtime/Collector.cpp:
+ (JSC::Heap::Heap):
+ (JSC::Heap::destroy):
+ (JSC::Heap::allocateBlock):
+ (JSC::Heap::freeBlock):
+ (JSC::Heap::freeBlockPtr):
+ (JSC::Heap::freeBlocks):
+ (JSC::Heap::recordExtraCost):
+ (JSC::Heap::allocate):
+ (JSC::Heap::resizeBlocks):
+ (JSC::Heap::growBlocks):
+ (JSC::Heap::shrinkBlocks):
+ (JSC::Heap::markConservatively):
+ (JSC::Heap::clearMarkBits):
+ (JSC::Heap::markedCells):
+ (JSC::Heap::sweep):
+ (JSC::Heap::markRoots):
+ (JSC::Heap::objectCount):
+ (JSC::Heap::addToStatistics):
+ (JSC::Heap::statistics):
+ (JSC::Heap::isBusy):
+ (JSC::Heap::reset):
+ (JSC::Heap::collectAllGarbage):
+ (JSC::Heap::primaryHeapBegin):
+ (JSC::Heap::primaryHeapEnd):
+ * runtime/Collector.h:
+ (JSC::): Removed all code pertaining to the number heap, and changed all
+ heap template functions and classes to non-template functions and classes.
+
+ (JSC::Heap::allocateNumber): A new optimization to replace the number
+ heap: allocate half-sized number cells in pairs, returning the first
+ cell and caching the second cell for the next allocation.
+
+ * runtime/CollectorHeapIterator.h:
+ (JSC::LiveObjectIterator::LiveObjectIterator):
+ (JSC::LiveObjectIterator::operator++):
+ (JSC::DeadObjectIterator::DeadObjectIterator):
+ (JSC::DeadObjectIterator::operator++):
+ (JSC::ObjectIterator::ObjectIterator):
+ (JSC::ObjectIterator::operator++):
+ * runtime/JSCell.h:
+ (JSC::JSCell::isNumber): Removed all code pertaining to the number heap,
+ and changed all heap template functions and classes to non-template functions
+ and classes.
+
+2009-12-15 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WeakGCMap class
+ https://bugs.webkit.org/show_bug.cgi?id=32547
+
+ Inherits WeakGCMap from FastAllocBase because it is instantiated by
+ 'new' at: WebCore/dom/Document.cpp:512.
+
+ * runtime/WeakGCMap.h:
+
+2009-12-15 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for dtoa's P5Node struct
+ https://bugs.webkit.org/show_bug.cgi?id=32544
+
+ Inherits P5Node struct from Noncopyable because it is instantiated by
+ 'new' at wtf/dtoa.cpp:588 and don't need to be copyable.
+
+ * wtf/dtoa.cpp:
+
+2009-12-14 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32524
+ REGRESSION(52084): fast/dom/prototypes.html failing two CSS tests
+
+ * wtf/StdLibExtras.h:
+ (WTF::bitCount): The original patch put the parentheses in the wrong
+ place, completely changing the calculation and making it almost always
+ wrong. Moved the parentheses around the '+' operation, like the original
+ compiler warning suggested.
+
+2009-12-14 Gabor Loki <loki@inf.u-szeged.hu>
+
+ Unreviewed trivial buildfix.
+
+ Fix crosses initialization of usedPrimaryBlocks for JSValue32
+
+ * runtime/Collector.cpp:
+ (JSC::Heap::markConservatively):
+
+2009-12-14 Csaba Osztrogonác <ossy@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ GCC 4.3.x warning fixed. Suggested parantheses added.
+ warning: ../../../JavaScriptCore/wtf/StdLibExtras.h:77: warning: suggest parentheses around + or - in operand of &
+
+ * wtf/StdLibExtras.h:
+ (WTF::bitCount):
+
+2009-12-13 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Changed GC from mark-sweep to mark-allocate.
+
+ Added WeakGCMap to keep WebCore blissfully ignorant about objects that
+ have become garbage but haven't run their destructors yet.
+
+ 1% SunSpider speedup.
+ 7.6% v8 speedup (37% splay speedup).
+ 17% speedup on bench-alloc-nonretained.js.
+ 18% speedup on bench-alloc-retained.js.
+
+ * API/JSBase.cpp:
+ (JSGarbageCollect):
+ * API/JSContextRef.cpp:
+ * JavaScriptCore.exp:
+ * JavaScriptCore.xcodeproj/project.pbxproj: Updated for renames and new
+ files.
+
+ * debugger/Debugger.cpp:
+ (JSC::Debugger::recompileAllJSFunctions): Updated to use the Collector
+ iterator abstraction.
+
+ * jsc.cpp:
+ (functionGC): Updated for rename.
+
+ * runtime/Collector.cpp: Slightly reduced the number of allocations per
+ collection, so that small workloads only allocate on collector block,
+ rather than two.
+
+ (JSC::Heap::Heap): Updated to use the new allocateBlock function.
+
+ (JSC::Heap::destroy): Updated to use the new freeBlocks function.
+
+ (JSC::Heap::allocateBlock): New function to initialize a block when
+ allocating it.
+
+ (JSC::Heap::freeBlock): Consolidated the responsibility for running
+ destructors into this function.
+
+ (JSC::Heap::freeBlocks): Updated to use freeBlock.
+
+ (JSC::Heap::recordExtraCost): Sweep the heap in this reporting function,
+ so that allocation, which is more common, doesn't have to check extraCost.
+
+ (JSC::Heap::heapAllocate): Run destructors right before recycling a
+ garbage cell. This has better cache utilization than a separate sweep phase.
+
+ (JSC::Heap::resizeBlocks):
+ (JSC::Heap::growBlocks):
+ (JSC::Heap::shrinkBlocks): New set of functions for managing the size of
+ the heap, now that the heap doesn't maintain any information about its
+ size.
+
+ (JSC::isPointerAligned):
+ (JSC::isHalfCellAligned):
+ (JSC::isPossibleCell):
+ (JSC::isCellAligned):
+ (JSC::Heap::markConservatively): Cleaned up this code a bit.
+
+ (JSC::Heap::clearMarkBits):
+ (JSC::Heap::markedCells): Some helper functions for examining the the mark
+ bitmap.
+
+ (JSC::Heap::sweep): Simplified this function by using a DeadObjectIterator.
+
+ (JSC::Heap::markRoots): Reordered some operations for clarity.
+
+ (JSC::Heap::objectCount):
+ (JSC::Heap::addToStatistics):
+ (JSC::Heap::statistics): Rewrote these functions to calculate an object
+ count on demand, since the heap doesn't maintain this information by
+ itself.
+
+ (JSC::Heap::reset): New function for resetting the heap once we've
+ exhausted heap space.
+
+ (JSC::Heap::collectAllGarbage): This function matches the old collect()
+ behavior, but it's now an uncommon function used only by API.
+
+ * runtime/Collector.h:
+ (JSC::CollectorBitmap::count):
+ (JSC::CollectorBitmap::isEmpty): Added some helper functions for managing
+ the collector mark bitmap.
+
+ (JSC::Heap::reportExtraMemoryCost): Changed reporting from cell equivalents
+ to bytes, so it's easier to understand.
+
+ * runtime/CollectorHeapIterator.h:
+ (JSC::CollectorHeapIterator::CollectorHeapIterator):
+ (JSC::CollectorHeapIterator::operator!=):
+ (JSC::CollectorHeapIterator::operator*):
+ (JSC::CollectorHeapIterator::advance):
+ (JSC::::LiveObjectIterator):
+ (JSC::::operator):
+ (JSC::::DeadObjectIterator):
+ (JSC::::ObjectIterator): New iterators for encapsulating details about
+ heap layout, and what's live and dead on the heap.
+
+ * runtime/JSArray.cpp:
+ (JSC::JSArray::putSlowCase):
+ (JSC::JSArray::increaseVectorLength): Delay reporting extra cost until
+ we're fully constructed, so the heap mark phase won't visit us in an
+ invalid state.
+
+ * runtime/JSCell.h:
+ (JSC::JSCell::):
+ (JSC::JSCell::createDummyStructure):
+ (JSC::JSCell::JSCell):
+ * runtime/JSGlobalData.cpp:
+ (JSC::JSGlobalData::JSGlobalData):
+ * runtime/JSGlobalData.h: Added a dummy cell to simplify allocation logic.
+
+ * runtime/JSString.h:
+ (JSC::jsSubstring): Don't report extra cost for substrings, since they
+ share a buffer that's already reported extra cost.
+
+ * runtime/Tracing.d:
+ * runtime/Tracing.h: Changed these dtrace hooks not to report object
+ counts, since they're no longer cheap to compute.
+
+ * runtime/UString.h: Updated for renames.
+
+ * runtime/WeakGCMap.h: Added.
+ (JSC::WeakGCMap::isEmpty):
+ (JSC::WeakGCMap::uncheckedGet):
+ (JSC::WeakGCMap::uncheckedBegin):
+ (JSC::WeakGCMap::uncheckedEnd):
+ (JSC::::get):
+ (JSC::::take):
+ (JSC::::set):
+ (JSC::::uncheckedRemove): Mentioned above.
+
+ * wtf/StdLibExtras.h:
+ (WTF::bitCount): Added a bit population count function, so the heap can
+ count live objects to fulfill statistics questions.
+
+The very last cell in the block is not allocated -- should not be marked.
+
+2009-12-13 Geoffrey Garen <ggaren@apple.com>
+
+ Windows build fix: Export some new symbols.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+
+2009-12-13 Geoffrey Garen <ggaren@apple.com>
+
+ Windows build fix: Removed some old exports.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+
+2009-12-13 Geoffrey Garen <ggaren@apple.com>
+
+ Windows build fix: Use unsigned instead of uint32_t to avoid dependencies.
+
+ * wtf/StdLibExtras.h:
+ (WTF::bitCount):
+
+2009-12-13 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by NOBODY (speculative Windows build fix).
+
+ * runtime/JSGlobalObjectFunctions.cpp:
+
+2009-12-13 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32496
+ Switch remaining cases of string construction to use StringBuilder.
+ Builds strings using a vector rather than using string append / addition.
+
+ * JavaScriptCore.exp:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * runtime/Executable.cpp:
+ (JSC::FunctionExecutable::paramString):
+ * runtime/FunctionConstructor.cpp:
+ (JSC::constructFunction):
+ * runtime/JSGlobalObjectFunctions.cpp:
+ (JSC::encode):
+ (JSC::decode):
+ (JSC::globalFuncEscape):
+ (JSC::globalFuncUnescape):
+ * runtime/JSONObject.cpp:
+ (JSC::Stringifier::stringify):
+ (JSC::Stringifier::indent):
+ * runtime/JSString.h:
+ * runtime/LiteralParser.cpp:
+ (JSC::LiteralParser::Lexer::lexString):
+ * runtime/NumberPrototype.cpp:
+ (JSC::integerPartNoExp):
+ (JSC::numberProtoFuncToFixed):
+ (JSC::numberProtoFuncToPrecision):
+ * runtime/Operations.h:
+ (JSC::jsString):
+ * runtime/StringPrototype.cpp:
+ (JSC::substituteBackreferencesSlow):
+ (JSC::substituteBackreferences):
+ (JSC::stringProtoFuncConcat):
+
+2009-12-08 Jeremy Moskovich <jeremy@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Add code to allow toggling ATSUI/Core Text rendering at runtime in ComplexTextController.
+ https://bugs.webkit.org/show_bug.cgi?id=31802
+
+ The goal here is to allow for a zero runtime hit for ports that decide to select
+ the API at compile time.
+ When both USE(ATSUI) and USE(CORE_TEXT) are true, the API is toggled
+ at runtime. Core Text is used for OS Versions >= 10.6.
+
+ * wtf/Platform.h: #define USE_CORE_TEXT and USE_ATSUI on Chrome/Mac.
+
+2009-12-11 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Unify codegen for forward and backward variants of branches
+ https://bugs.webkit.org/show_bug.cgi?id=32463
+
+ * jit/JIT.h:
+ (JSC::JIT::emit_op_loop): Implemented in terms of forward variant.
+ (JSC::JIT::emit_op_loop_if_true): ditto
+ (JSC::JIT::emitSlow_op_loop_if_true): ditto
+ (JSC::JIT::emit_op_loop_if_false): ditto
+ (JSC::JIT::emitSlow_op_loop_if_false): ditto
+ (JSC::JIT::emit_op_loop_if_less): ditto
+ (JSC::JIT::emitSlow_op_loop_if_less): ditto
+ * jit/JITOpcodes.cpp:
+
+2009-12-11 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Allow WTFs concept of the main thread to differ from pthreads when necessary.
+
+ * wtf/ThreadingPthreads.cpp:
+ (WTF::initializeThreading):
+ (WTF::isMainThread):
+ * wtf/mac/MainThreadMac.mm:
+ (WTF::initializeMainThreadPlatform):
+ (WTF::scheduleDispatchFunctionsOnMainThread):
+
+2009-12-11 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32454
+ Refactor construction of simple strings to avoid string concatenation.
+
+ Building strings through concatenation has a memory and performance cost -
+ a memory cost since we must over-allocate the buffer to leave space to append
+ into, and performance in that the string may still require reallocation (and
+ thus copying during construction). Instead move the full construction to
+ within a single function call (makeString), so that the arguments' lengths
+ can be calculated and an appropriate sized buffer allocated before copying
+ any characters.
+
+ ~No performance change (~2% progression on date tests).
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::escapeQuotes):
+ (JSC::valueToSourceString):
+ (JSC::constantName):
+ (JSC::idName):
+ (JSC::CodeBlock::registerName):
+ (JSC::regexpToSourceString):
+ (JSC::regexpName):
+ * bytecompiler/NodesCodegen.cpp:
+ (JSC::substitute):
+ * profiler/Profiler.cpp:
+ (JSC::Profiler::createCallIdentifier):
+ * runtime/DateConstructor.cpp:
+ (JSC::callDate):
+ * runtime/DateConversion.cpp:
+ (JSC::formatDate):
+ (JSC::formatDateUTCVariant):
+ (JSC::formatTime):
+ (JSC::formatTimeUTC):
+ * runtime/DateConversion.h:
+ (JSC::):
+ * runtime/DatePrototype.cpp:
+ (JSC::dateProtoFuncToString):
+ (JSC::dateProtoFuncToUTCString):
+ (JSC::dateProtoFuncToDateString):
+ (JSC::dateProtoFuncToTimeString):
+ (JSC::dateProtoFuncToGMTString):
+ * runtime/ErrorPrototype.cpp:
+ (JSC::errorProtoFuncToString):
+ * runtime/ExceptionHelpers.cpp:
+ (JSC::createUndefinedVariableError):
+ (JSC::createErrorMessage):
+ (JSC::createInvalidParamError):
+ * runtime/FunctionPrototype.cpp:
+ (JSC::insertSemicolonIfNeeded):
+ (JSC::functionProtoFuncToString):
+ * runtime/ObjectPrototype.cpp:
+ (JSC::objectProtoFuncToString):
+ * runtime/RegExpConstructor.cpp:
+ (JSC::constructRegExp):
+ * runtime/RegExpObject.cpp:
+ (JSC::RegExpObject::match):
+ * runtime/RegExpPrototype.cpp:
+ (JSC::regExpProtoFuncCompile):
+ (JSC::regExpProtoFuncToString):
+ * runtime/StringPrototype.cpp:
+ (JSC::stringProtoFuncBig):
+ (JSC::stringProtoFuncSmall):
+ (JSC::stringProtoFuncBlink):
+ (JSC::stringProtoFuncBold):
+ (JSC::stringProtoFuncFixed):
+ (JSC::stringProtoFuncItalics):
+ (JSC::stringProtoFuncStrike):
+ (JSC::stringProtoFuncSub):
+ (JSC::stringProtoFuncSup):
+ (JSC::stringProtoFuncFontcolor):
+ (JSC::stringProtoFuncFontsize):
+ (JSC::stringProtoFuncAnchor):
+ * runtime/UString.h:
+ (JSC::):
+ (JSC::makeString):
+
+2009-12-10 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32400
+ Switch remaining cases of string addition to use ropes.
+
+ Re-landing r51975 - added toPrimitiveString method,
+ performs toPrimitive then subsequent toString operations.
+
+ ~1% progression on Sunspidey.
+
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ * runtime/JSString.h:
+ (JSC::JSString::JSString):
+ (JSC::JSString::appendStringInConstruct):
+ * runtime/Operations.cpp:
+ (JSC::jsAddSlowCase):
+ * runtime/Operations.h:
+ (JSC::jsString):
+ (JSC::jsAdd):
+
+2009-12-11 Adam Roben <aroben@apple.com>
+
+ Windows build fix
+
+ * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added
+ $(WebKitOutputDir)/include/private to the include path.
+
+2009-12-11 Adam Roben <aroben@apple.com>
+
+ Move QuartzCorePresent.h to include/private
+
+ This fixes other projects that use wtf/Platform.h
+
+ Rubber-stamped by Steve Falkenburg.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Let VS do its thang.
+ * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Write
+ QuartzCorePresent.h to $(WebKitOutputDir)/include/private.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
+ * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
+ Added $(WebKitOutputDir)/include/private to the include path.
+
+2009-12-11 Adam Roben <aroben@apple.com>
+
+ Fix clean builds and everything rebuilding on every build
+
+ Reviewed by Sam Weinig.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Don't
+ write out QuartzCorePresent.h if it exists but is older than
+ QuartzCore.h. Also, create the directory we write QuartzCorePresent.h
+ into first.
+
+2009-12-11 Adam Roben <aroben@apple.com>
+
+ Windows build fix for systems with spaces in their paths
+
+ * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Quote some paths.
+
+2009-12-11 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Add check for presence of QuartzCore headers
+ https://bugs.webkit.org/show_bug.cgi?id=31856
+
+ The script now checks for the presence of QuartzCore.h. If present
+ it will turn on ACCELERATED_COMPOSITING and 3D_RENDERING to enable
+ HW compositing on Windows. The script writes QuartzCorePresent.h to
+ the build directory which has a define telling whether QuartzCore is
+ present.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
+ * wtf/Platform.h:
+
+2009-12-11 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix a problem that JSC::gregorianDateTimeToMS() returns a negative
+ value for a huge year value.
+ https://bugs.webkit.org/show_bug.cgi?id=32304
+
+ * wtf/DateMath.cpp:
+ (WTF::dateToDaysFrom1970): Renamed from dateToDayInYear, and changed the return type to double.
+ (WTF::calculateDSTOffset): Follow the dateToDaysFrom1970() change.
+ (WTF::timeClip): Use maxECMAScriptTime.
+ (JSC::gregorianDateTimeToMS): Follow the dateToDaysFrom1970() change.
+
+>>>>>>> webkit.org at r54127
2009-12-10 Adam Barth <abarth@webkit.org>
No review, rolling out r51975.
diff --git a/JavaScriptCore/Configurations/FeatureDefines.xcconfig b/JavaScriptCore/Configurations/FeatureDefines.xcconfig
index cd462d6..24589c7 100644
--- a/JavaScriptCore/Configurations/FeatureDefines.xcconfig
+++ b/JavaScriptCore/Configurations/FeatureDefines.xcconfig
@@ -26,6 +26,9 @@
// WebCore and WebKit. Also the default values of the ENABLE_FEATURE_NAME macros in build-webkit
// should match the values below, but they do not need to be in the same order.
+// Keep this list of features (not enabled/disabled state) in sync with FeatureDefines.vsprops
+// and FeatureDefinesCairo.vsprops in WebKitLibraries/win/tools/vsprops.
+
// Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature.
ENABLE_3D_CANVAS = $(ENABLE_3D_CANVAS_$(MAC_OS_X_VERSION_MAJOR));
@@ -39,14 +42,16 @@ ENABLE_3D_RENDERING_1060 = ENABLE_3D_RENDERING;
ENABLE_3D_RENDERING_1070 = ENABLE_3D_RENDERING;
ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
+ENABLE_CLIENT_BASED_GEOLOCATION = ENABLE_CLIENT_BASED_GEOLOCATION;
ENABLE_DATABASE = ENABLE_DATABASE;
-ENABLE_DATAGRID = ENABLE_DATAGRID;
+ENABLE_DATAGRID = ;
ENABLE_DATALIST = ENABLE_DATALIST;
ENABLE_DOM_STORAGE = ENABLE_DOM_STORAGE;
ENABLE_EVENTSOURCE = ENABLE_EVENTSOURCE;
ENABLE_FILTERS = ENABLE_FILTERS;
-ENABLE_GEOLOCATION = ;
+ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
ENABLE_ICONDATABASE = ENABLE_ICONDATABASE;
+ENABLE_INDEXED_DATABASE = ;
ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER;
ENABLE_MATHML = ;
ENABLE_NOTIFICATIONS = ;
@@ -63,7 +68,8 @@ ENABLE_VIDEO = ENABLE_VIDEO;
ENABLE_WEB_SOCKETS = ENABLE_WEB_SOCKETS;
ENABLE_WML = ;
ENABLE_WORKERS = ENABLE_WORKERS;
+ENABLE_XHTMLMP = ;
ENABLE_XPATH = ENABLE_XPATH;
ENABLE_XSLT = ENABLE_XSLT;
-FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(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_WML) $(ENABLE_WORKERS) $(ENABLE_XPATH) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(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_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
diff --git a/JavaScriptCore/Configurations/Version.xcconfig b/JavaScriptCore/Configurations/Version.xcconfig
index b3bf41d..75f9bd4 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 = 532;
-MINOR_VERSION = 6;
+MINOR_VERSION = 9;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/JavaScriptCore/DerivedSources.pro b/JavaScriptCore/DerivedSources.pro
new file mode 100644
index 0000000..bd9f6ab
--- /dev/null
+++ b/JavaScriptCore/DerivedSources.pro
@@ -0,0 +1,95 @@
+# DerivedSources - qmake build info
+
+CONFIG -= debug_and_release
+
+TEMPLATE = lib
+TARGET = dummy
+
+QMAKE_EXTRA_TARGETS += generated_files
+
+CONFIG(standalone_package) {
+ isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = $$PWD/generated
+} else {
+ isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = generated
+}
+
+LUT_FILES += \
+ runtime/ArrayPrototype.cpp \
+ runtime/DatePrototype.cpp \
+ runtime/JSONObject.cpp \
+ runtime/MathObject.cpp \
+ runtime/NumberConstructor.cpp \
+ runtime/RegExpConstructor.cpp \
+ runtime/RegExpObject.cpp \
+ runtime/StringPrototype.cpp
+
+KEYWORDLUT_FILES += \
+ parser/Keywords.table
+
+JSCBISON += \
+ parser/Grammar.y
+
+RVCT_STUB_FILES += \
+ jit/JITStubs.cpp
+
+defineTest(addExtraCompiler) {
+ eval($${1}.CONFIG = target_predeps no_link)
+ eval($${1}.variable_out =)
+ eval($${1}.dependency_type = TYPE_C)
+
+ wkScript = $$eval($${1}.wkScript)
+ eval($${1}.depends += $$wkScript)
+
+ export($${1}.CONFIG)
+ export($${1}.variable_out)
+ export($${1}.dependency_type)
+ export($${1}.depends)
+
+ QMAKE_EXTRA_COMPILERS += $$1
+ generated_files.depends += compiler_$${1}_make_all
+ export(QMAKE_EXTRA_COMPILERS)
+ export(generated_files.depends)
+ return(true)
+}
+
+# GENERATOR 1-A: LUT creator
+lut.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.lut.h
+lut.input = LUT_FILES
+lut.wkScript = $$PWD/create_hash_table
+lut.commands = perl $$lut.wkScript ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
+lut.depends = ${QMAKE_FILE_NAME}
+addExtraCompiler(lut)
+
+# GENERATOR 1-B: particular LUT creator (for 1 file only)
+keywordlut.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Lexer.lut.h
+keywordlut.input = KEYWORDLUT_FILES
+keywordlut.wkScript = $$PWD/create_hash_table
+keywordlut.commands = perl $$keywordlut.wkScript ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
+keywordlut.depends = ${QMAKE_FILE_NAME}
+addExtraCompiler(keywordlut)
+
+# GENERATOR 2: bison grammar
+jscbison.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
+jscbison.input = JSCBISON
+jscbison.commands = bison -d -p jscyy ${QMAKE_FILE_NAME} -o $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c && $(MOVE) $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c ${QMAKE_FILE_OUT} && $(MOVE) $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.h $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.h
+jscbison.depends = ${QMAKE_FILE_NAME}
+addExtraCompiler(jscbison)
+
+# GENERATOR 3: JIT Stub functions for RVCT
+rvctstubs.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Generated${QMAKE_FILE_BASE}_RVCT.h
+rvctstubs.wkScript = $$PWD/create_rvct_stubs
+rvctstubs.commands = perl $$rvctstubs.wkScript ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
+rvctstubs.depends = ${QMAKE_FILE_NAME}
+rvctstubs.input = RVCT_STUB_FILES
+rvctstubs.CONFIG += no_link
+addExtraCompiler(rvctstubs)
+
+# GENERATOR: "chartables.c": compile and execute the chartables generator (and add it to sources)
+win32-msvc*|wince*: PREPROCESSOR = "--preprocessor=\"$$QMAKE_CC /E\""
+ctgen.output = $$JSC_GENERATED_SOURCES_DIR/chartables.c
+ctgen.wkScript = $$PWD/pcre/dftables
+ctgen.input = ctgen.wkScript
+ctgen.commands = perl $$ctgen.wkScript ${QMAKE_FILE_OUT} $$PREPROCESSOR
+ctgen.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_JSC_GENERATED_SOURCES_DIR}${QMAKE_FILE_BASE}
+addExtraCompiler(ctgen)
+
diff --git a/JavaScriptCore/GNUmakefile.am b/JavaScriptCore/GNUmakefile.am
index dba305a..7ac6a8c 100644
--- a/JavaScriptCore/GNUmakefile.am
+++ b/JavaScriptCore/GNUmakefile.am
@@ -45,6 +45,7 @@ javascriptcore_built_nosources += \
javascriptcore_sources += \
JavaScriptCore/API/APICast.h \
+ JavaScriptCore/API/APIShims.h \
JavaScriptCore/API/JSBase.cpp \
JavaScriptCore/API/JSBasePrivate.h \
JavaScriptCore/API/JSCallbackConstructor.cpp \
@@ -161,8 +162,6 @@ javascriptcore_sources += \
JavaScriptCore/pcre/pcre_xclass.cpp \
JavaScriptCore/pcre/ucpinternal.h \
JavaScriptCore/profiler/CallIdentifier.h \
- JavaScriptCore/profiler/HeavyProfile.cpp \
- JavaScriptCore/profiler/HeavyProfile.h \
JavaScriptCore/profiler/Profile.cpp \
JavaScriptCore/profiler/Profile.h \
JavaScriptCore/profiler/ProfileGenerator.cpp \
@@ -171,8 +170,6 @@ javascriptcore_sources += \
JavaScriptCore/profiler/ProfileNode.h \
JavaScriptCore/profiler/Profiler.cpp \
JavaScriptCore/profiler/Profiler.h \
- JavaScriptCore/profiler/TreeProfile.cpp \
- JavaScriptCore/profiler/TreeProfile.h \
JavaScriptCore/interpreter/CachedCall.h \
JavaScriptCore/interpreter/CallFrame.cpp \
JavaScriptCore/interpreter/CallFrame.h \
@@ -195,6 +192,7 @@ javascriptcore_sources += \
JavaScriptCore/runtime/JSONObject.h \
JavaScriptCore/runtime/JSPropertyNameIterator.cpp \
JavaScriptCore/runtime/JSPropertyNameIterator.h \
+ JavaScriptCore/runtime/JSZombie.h \
JavaScriptCore/runtime/LiteralParser.cpp \
JavaScriptCore/runtime/LiteralParser.h \
JavaScriptCore/runtime/MarkStack.cpp \
@@ -204,6 +202,7 @@ javascriptcore_sources += \
JavaScriptCore/runtime/PropertyDescriptor.cpp \
JavaScriptCore/runtime/SmallStrings.cpp \
JavaScriptCore/runtime/SmallStrings.h \
+ JavaScriptCore/runtime/StringBuilder.h \
JavaScriptCore/runtime/Structure.cpp \
JavaScriptCore/runtime/Structure.h \
JavaScriptCore/runtime/StructureChain.cpp \
@@ -212,6 +211,8 @@ javascriptcore_sources += \
JavaScriptCore/runtime/TimeoutChecker.cpp \
JavaScriptCore/runtime/TimeoutChecker.h \
JavaScriptCore/runtime/JSTypeInfo.h \
+ JavaScriptCore/runtime/WeakGCMap.h \
+ JavaScriptCore/runtime/WeakGCPtr.h \
JavaScriptCore/wrec/CharacterClass.h \
JavaScriptCore/wrec/CharacterClassConstructor.h \
JavaScriptCore/wrec/Escapes.h \
@@ -228,7 +229,6 @@ javascriptcore_sources += \
JavaScriptCore/wtf/ByteArray.cpp \
JavaScriptCore/wtf/ByteArray.h \
JavaScriptCore/wtf/CrossThreadRefCounted.h \
- JavaScriptCore/wtf/OwnFastMallocPtr.h \
JavaScriptCore/wtf/CurrentTime.cpp \
JavaScriptCore/wtf/CurrentTime.h \
JavaScriptCore/wtf/DateMath.cpp \
@@ -255,6 +255,7 @@ javascriptcore_sources += \
JavaScriptCore/wtf/Noncopyable.h \
JavaScriptCore/wtf/NotFound.h \
JavaScriptCore/wtf/OwnArrayPtr.h \
+ JavaScriptCore/wtf/OwnFastMallocPtr.h \
JavaScriptCore/wtf/OwnPtr.h \
JavaScriptCore/wtf/OwnPtrCommon.h \
JavaScriptCore/wtf/PassOwnPtr.h \
@@ -274,13 +275,16 @@ javascriptcore_sources += \
JavaScriptCore/wtf/SegmentedVector.h \
JavaScriptCore/wtf/StdLibExtras.h \
JavaScriptCore/wtf/StringExtras.h \
+ JavaScriptCore/wtf/StringHashFunctions.h \
JavaScriptCore/wtf/TCPackedCache.h \
JavaScriptCore/wtf/TCPageMap.h \
JavaScriptCore/wtf/TCSpinLock.h \
- JavaScriptCore/wtf/ThreadSpecific.h \
- JavaScriptCore/wtf/Threading.h \
+ JavaScriptCore/wtf/ThreadIdentifierDataPthreads.cpp \
+ JavaScriptCore/wtf/ThreadIdentifierDataPthreads.h \
JavaScriptCore/wtf/Threading.cpp \
+ JavaScriptCore/wtf/Threading.h \
JavaScriptCore/wtf/ThreadingPthreads.cpp \
+ JavaScriptCore/wtf/ThreadSpecific.h \
JavaScriptCore/wtf/TypeTraits.cpp \
JavaScriptCore/wtf/TypeTraits.h \
JavaScriptCore/wtf/UnusedParam.h \
@@ -288,6 +292,8 @@ javascriptcore_sources += \
JavaScriptCore/wtf/VectorTraits.h \
JavaScriptCore/wtf/gtk/GOwnPtr.cpp \
JavaScriptCore/wtf/gtk/GOwnPtr.h \
+ JavaScriptCore/wtf/gtk/GRefPtr.cpp \
+ JavaScriptCore/wtf/gtk/GRefPtr.h \
JavaScriptCore/wtf/gtk/MainThreadGtk.cpp \
JavaScriptCore/wtf/gtk/ThreadingGtk.cpp \
JavaScriptCore/wtf/unicode/Collator.h \
@@ -499,6 +505,8 @@ javascriptcore_sources += \
JavaScriptCore/runtime/Tracing.h \
JavaScriptCore/runtime/UString.cpp \
JavaScriptCore/runtime/UString.h \
+ JavaScriptCore/runtime/UStringImpl.cpp \
+ JavaScriptCore/runtime/UStringImpl.h \
JavaScriptCore/runtime/WeakRandom.h \
JavaScriptCore/wtf/FastAllocBase.h \
JavaScriptCore/wtf/FastMalloc.cpp \
diff --git a/JavaScriptCore/Info.plist b/JavaScriptCore/Info.plist
index 17949b0..77c9eb8 100644
--- a/JavaScriptCore/Info.plist
+++ b/JavaScriptCore/Info.plist
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleGetInfoString</key>
- <string>${BUNDLE_VERSION}, Copyright 2003-2009 Apple Inc.; Copyright 1999-2001 Harri Porten &lt;porten@kde.org&gt;; Copyright 2001 Peter Kelly &lt;pmk@post.com&gt;; Copyright 1997-2005 University of Cambridge; Copyright 1991, 2000, 2001 by Lucent Technologies.</string>
+ <string>${BUNDLE_VERSION}, Copyright 2003-2010 Apple Inc.; Copyright 1999-2001 Harri Porten &lt;porten@kde.org&gt;; Copyright 2001 Peter Kelly &lt;pmk@post.com&gt;; Copyright 1997-2005 University of Cambridge; Copyright 1991, 2000, 2001 by Lucent Technologies.</string>
<key>CFBundleIdentifier</key>
<string>com.apple.${PRODUCT_NAME}</string>
<key>CFBundleInfoDictionaryVersion</key>
diff --git a/JavaScriptCore/JavaScriptCore.exp b/JavaScriptCore/JavaScriptCore.exp
index 1c91d36..3821992 100644
--- a/JavaScriptCore/JavaScriptCore.exp
+++ b/JavaScriptCore/JavaScriptCore.exp
@@ -90,12 +90,12 @@ __Z12jsRegExpFreeP8JSRegExp
__Z15jsRegExpCompilePKti24JSRegExpIgnoreCaseOption23JSRegExpMultilineOptionPjPPKc
__Z15jsRegExpExecutePK8JSRegExpPKtiiPii
__ZN14OpaqueJSString6createERKN3JSC7UStringE
-__ZN3JSC10Identifier11addSlowCaseEPNS_12JSGlobalDataEPNS_7UString3RepE
-__ZN3JSC10Identifier11addSlowCaseEPNS_9ExecStateEPNS_7UString3RepE
-__ZN3JSC10Identifier24checkSameIdentifierTableEPNS_12JSGlobalDataEPNS_7UString3RepE
-__ZN3JSC10Identifier24checkSameIdentifierTableEPNS_9ExecStateEPNS_7UString3RepE
+__ZN3JSC10Identifier11addSlowCaseEPNS_12JSGlobalDataEPNS_11UStringImplE
+__ZN3JSC10Identifier11addSlowCaseEPNS_9ExecStateEPNS_11UStringImplE
+__ZN3JSC10Identifier24checkSameIdentifierTableEPNS_12JSGlobalDataEPNS_11UStringImplE
+__ZN3JSC10Identifier24checkSameIdentifierTableEPNS_9ExecStateEPNS_11UStringImplE
__ZN3JSC10Identifier3addEPNS_9ExecStateEPKc
-__ZN3JSC10Identifier5equalEPKNS_7UString3RepEPKc
+__ZN3JSC10Identifier5equalEPKNS_11UStringImplEPKc
__ZN3JSC10JSFunctionC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFNS_7JSValueES2_PNS_8JSObjectESA_RKNS_7ArgListEE
__ZN3JSC10throwErrorEPNS_9ExecStateENS_9ErrorTypeE
__ZN3JSC10throwErrorEPNS_9ExecStateENS_9ErrorTypeEPKc
@@ -103,17 +103,24 @@ __ZN3JSC10throwErrorEPNS_9ExecStateENS_9ErrorTypeERKNS_7UStringE
__ZN3JSC11JSByteArray15createStructureENS_7JSValueE
__ZN3JSC11JSByteArrayC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS3_9ByteArrayEPKNS_9ClassInfoE
__ZN3JSC11ParserArena5resetEv
+__ZN3JSC11UStringImpl12sharedBufferEv
+__ZN3JSC11UStringImpl6s_nullE
+__ZN3JSC11UStringImpl7s_emptyE
+__ZN3JSC11UStringImplD1Ev
__ZN3JSC11checkSyntaxEPNS_9ExecStateERKNS_10SourceCodeE
__ZN3JSC12DateInstance4infoE
+__ZN3JSC12DateInstanceC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEd
__ZN3JSC12DateInstanceC1EPNS_9ExecStateEd
__ZN3JSC12JSGlobalData10ClientDataD2Ev
+__ZN3JSC12JSGlobalData11jsArrayVPtrE
__ZN3JSC12JSGlobalData12createLeakedEv
+__ZN3JSC12JSGlobalData12jsStringVPtrE
__ZN3JSC12JSGlobalData12stopSamplingEv
__ZN3JSC12JSGlobalData13startSamplingEv
__ZN3JSC12JSGlobalData14dumpSampleDataEPNS_9ExecStateE
__ZN3JSC12JSGlobalData14resetDateCacheEv
__ZN3JSC12JSGlobalData14sharedInstanceEv
-__ZN3JSC12JSGlobalData6createEb
+__ZN3JSC12JSGlobalData6createEv
__ZN3JSC12JSGlobalDataD1Ev
__ZN3JSC12SamplingTool5setupEv
__ZN3JSC12SmallStrings17createEmptyStringEPNS_12JSGlobalDataE
@@ -121,7 +128,7 @@ __ZN3JSC12SmallStrings27createSingleCharacterStringEPNS_12JSGlobalDataEh
__ZN3JSC12StringObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
__ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
__ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
-__ZN3JSC12StringObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE
+__ZN3JSC12StringObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
__ZN3JSC12StringObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
__ZN3JSC12StringObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE
__ZN3JSC12StringObject4infoE
@@ -154,10 +161,10 @@ __ZN3JSC16InternalFunction4nameEPNS_9ExecStateE
__ZN3JSC16InternalFunctionC2EPNS_12JSGlobalDataEN3WTF17NonNullPassRefPtrINS_9StructureEEERKNS_10IdentifierE
__ZN3JSC16JSVariableObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
__ZN3JSC16JSVariableObject14symbolTableGetERKNS_10IdentifierERNS_18PropertyDescriptorE
-__ZN3JSC16JSVariableObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE
+__ZN3JSC16JSVariableObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
__ZN3JSC16toUInt32SlowCaseEdRb
__ZN3JSC17BytecodeGenerator21setDumpsGeneratedCodeEb
-__ZN3JSC17PropertyNameArray3addEPNS_7UString3RepE
+__ZN3JSC17PropertyNameArray3addEPNS_11UStringImplE
__ZN3JSC17PrototypeFunctionC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFNS_7JSValueES2_PNS_8JSObjectESA_RKNS_7ArgListEE
__ZN3JSC17PrototypeFunctionC1EPNS_9ExecStateEiRKNS_10IdentifierEPFNS_7JSValueES2_PNS_8JSObjectES6_RKNS_7ArgListEE
__ZN3JSC17constructFunctionEPNS_9ExecStateERKNS_7ArgListERKNS_10IdentifierERKNS_7UStringEi
@@ -178,24 +185,25 @@ __ZN3JSC23objectProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_
__ZN3JSC23setUpStaticFunctionSlotEPNS_9ExecStateEPKNS_9HashEntryEPNS_8JSObjectERKNS_10IdentifierERNS_12PropertySlotE
__ZN3JSC24createStackOverflowErrorEPNS_9ExecStateE
__ZN3JSC25evaluateInGlobalCallFrameERKNS_7UStringERNS_7JSValueEPNS_14JSGlobalObjectE
+__ZN3JSC25g_identifierTableSpecificE
+__ZN3JSC29createIdentifierTableSpecificEv
__ZN3JSC35createInterruptedExecutionExceptionEPNS_12JSGlobalDataE
__ZN3JSC3NaNE
-__ZN3JSC4Heap11objectCountEv
__ZN3JSC4Heap14primaryHeapEndEv
__ZN3JSC4Heap15recordExtraCostEm
__ZN3JSC4Heap16primaryHeapBeginEv
+__ZN3JSC4Heap17collectAllGarbageEv
__ZN3JSC4Heap17globalObjectCountEv
__ZN3JSC4Heap20protectedObjectCountEv
__ZN3JSC4Heap25protectedObjectTypeCountsEv
__ZN3JSC4Heap26protectedGlobalObjectCountEv
__ZN3JSC4Heap6isBusyEv
-__ZN3JSC4Heap7collectEv
__ZN3JSC4Heap7destroyEv
__ZN3JSC4Heap7protectENS_7JSValueE
__ZN3JSC4Heap8allocateEm
__ZN3JSC4Heap9unprotectENS_7JSValueE
__ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE
-__ZN3JSC5equalEPKNS_7UString3RepES3_
+__ZN3JSC5equalEPKNS_11UStringImplES2_
__ZN3JSC6JSCell11getCallDataERNS_8CallDataE
__ZN3JSC6JSCell11getJSNumberEv
__ZN3JSC6JSCell14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
@@ -208,7 +216,6 @@ __ZN3JSC6JSCell18getPrimitiveNumberEPNS_9ExecStateERdRNS_7JSValueE
__ZN3JSC6JSCell3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE
__ZN3JSC6JSCell3putEPNS_9ExecStateEjNS_7JSValueE
__ZN3JSC6JSCell9getObjectEv
-__ZN3JSC6JSCellnwEmPNS_9ExecStateE
__ZN3JSC6JSLock12DropAllLocksC1ENS_14JSLockBehaviorE
__ZN3JSC6JSLock12DropAllLocksC1EPNS_9ExecStateE
__ZN3JSC6JSLock12DropAllLocksD1Ev
@@ -227,19 +234,10 @@ __ZN3JSC7Profile10restoreAllEv
__ZN3JSC7Profile5focusEPKNS_11ProfileNodeE
__ZN3JSC7Profile7excludeEPKNS_11ProfileNodeE
__ZN3JSC7Profile7forEachEMNS_11ProfileNodeEFvvE
-__ZN3JSC7UString3Rep11computeHashEPKci
-__ZN3JSC7UString3Rep11computeHashEPKti
-__ZN3JSC7UString3Rep12sharedBufferEv
-__ZN3JSC7UString3Rep14createFromUTF8EPKc
-__ZN3JSC7UString3Rep14nullBaseStringE
-__ZN3JSC7UString3Rep6createEPtiN3WTF10PassRefPtrINS3_21CrossThreadRefCountedINS3_16OwnFastMallocPtrItEEEEEE
-__ZN3JSC7UString3Rep7destroyEv
__ZN3JSC7UString4fromEd
__ZN3JSC7UString4fromEi
__ZN3JSC7UString4fromEj
__ZN3JSC7UString4fromEl
-__ZN3JSC7UString6appendEPKc
-__ZN3JSC7UString6appendERKS0_
__ZN3JSC7UStringC1EPKc
__ZN3JSC7UStringC1EPKti
__ZN3JSC7UStringaSEPKc
@@ -256,7 +254,7 @@ __ZN3JSC8JSObject12markChildrenERNS_9MarkStackE
__ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
__ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateEj
__ZN3JSC8JSObject15unwrappedObjectEv
-__ZN3JSC8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE
+__ZN3JSC8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
__ZN3JSC8JSObject17createInheritorIDEv
__ZN3JSC8JSObject17defineOwnPropertyEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorEb
__ZN3JSC8JSObject17putDirectFunctionEPNS_9ExecStateEPNS_16InternalFunctionEj
@@ -265,7 +263,7 @@ __ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValu
__ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateEjNS_7JSValueEj
__ZN3JSC8JSObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3JSC8JSObject18getPrimitiveNumberEPNS_9ExecStateERdRNS_7JSValueE
-__ZN3JSC8JSObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE
+__ZN3JSC8JSObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
__ZN3JSC8JSObject21getPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
__ZN3JSC8JSObject22fillGetterPropertySlotERNS_12PropertySlotEPNS_7JSValueE
__ZN3JSC8JSObject23allocatePropertyStorageEmm
@@ -283,17 +281,16 @@ __ZN3JSC9MarkStack10s_pageSizeE
__ZN3JSC9MarkStack12releaseStackEPvm
__ZN3JSC9MarkStack13allocateStackEm
__ZN3JSC9MarkStack18initializePagesizeEv
-__ZN3JSC9Structure13hasTransitionEPNS_7UString3RepEj
+__ZN3JSC9Structure13hasTransitionEPNS_11UStringImplEj
__ZN3JSC9Structure17stopIgnoringLeaksEv
__ZN3JSC9Structure18startIgnoringLeaksEv
__ZN3JSC9Structure21addPropertyTransitionEPS0_RKNS_10IdentifierEjPNS_6JSCellERm
__ZN3JSC9Structure22materializePropertyMapEv
__ZN3JSC9Structure25changePrototypeTransitionEPS0_NS_7JSValueE
-__ZN3JSC9Structure27addAnonymousSlotsTransitionEPS0_j
__ZN3JSC9Structure27despecifyDictionaryFunctionERKNS_10IdentifierE
__ZN3JSC9Structure27despecifyFunctionTransitionEPS0_RKNS_10IdentifierE
__ZN3JSC9Structure28addPropertyWithoutTransitionERKNS_10IdentifierEjPNS_6JSCellE
-__ZN3JSC9Structure3getEPKNS_7UString3RepERjRPNS_6JSCellE
+__ZN3JSC9Structure3getEPKNS_11UStringImplERjRPNS_6JSCellE
__ZN3JSC9Structure40addPropertyTransitionToExistingStructureEPS0_RKNS_10IdentifierEjPNS_6JSCellERm
__ZN3JSC9StructureC1ENS_7JSValueERKNS_8TypeInfoE
__ZN3JSC9StructureD1Ev
@@ -321,6 +318,8 @@ __ZN3WTF15ThreadConditionC1Ev
__ZN3WTF15ThreadConditionD1Ev
__ZN3WTF16callOnMainThreadEPFvPvES0_
__ZN3WTF16fastZeroedMallocEm
+__ZN3WTF18dateToDaysFrom1970Eiii
+__ZN3WTF18monthFromDayInYearEib
__ZN3WTF19initializeThreadingEv
__ZN3WTF20fastMallocStatisticsEv
__ZN3WTF21RefCountedLeakCounter16suppressMessagesEPKc
@@ -330,6 +329,7 @@ __ZN3WTF21RefCountedLeakCounter9incrementEv
__ZN3WTF21RefCountedLeakCounterC1EPKc
__ZN3WTF21RefCountedLeakCounterD1Ev
__ZN3WTF23callOnMainThreadAndWaitEPFvPvES0_
+__ZN3WTF23dayInMonthFromDayInYearEib
__ZN3WTF23waitForThreadCompletionEjPPv
__ZN3WTF27releaseFastMallocFreeMemoryEv
__ZN3WTF28setMainThreadCallbacksPausedEb
@@ -348,10 +348,12 @@ __ZN3WTF8Collator18setOrderLowerFirstEb
__ZN3WTF8CollatorC1EPKc
__ZN3WTF8CollatorD1Ev
__ZN3WTF8fastFreeEPv
+__ZN3WTF8msToYearEd
+__ZN3WTF9dayInYearEdi
__ZN3WTF9ByteArray6createEm
__ZNK3JSC10JSFunction23isHostFunctionNonInlineEv
__ZNK3JSC11Interpreter14retrieveCallerEPNS_9ExecStateEPNS_16InternalFunctionE
-__ZNK3JSC11Interpreter18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERNS_7JSValueE
+__ZNK3JSC11Interpreter18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERNS_7JSValueE
__ZNK3JSC14JSGlobalObject14isDynamicScopeEv
__ZNK3JSC16InternalFunction9classInfoEv
__ZNK3JSC16JSVariableObject16isVariableObjectEv
@@ -368,6 +370,7 @@ __ZNK3JSC18PropertyDescriptor6getterEv
__ZNK3JSC18PropertyDescriptor6setterEv
__ZNK3JSC18PropertyDescriptor8writableEv
__ZNK3JSC4Heap10statisticsEv
+__ZNK3JSC4Heap11objectCountEv
__ZNK3JSC6JSCell11toPrimitiveEPNS_9ExecStateENS_22PreferredPrimitiveTypeE
__ZNK3JSC6JSCell12toThisObjectEPNS_9ExecStateE
__ZNK3JSC6JSCell12toThisStringEPNS_9ExecStateE
@@ -376,9 +379,9 @@ __ZNK3JSC6JSCell8toNumberEPNS_9ExecStateE
__ZNK3JSC6JSCell8toObjectEPNS_9ExecStateE
__ZNK3JSC6JSCell8toStringEPNS_9ExecStateE
__ZNK3JSC6JSCell9classInfoEv
-__ZNK3JSC6JSCell9getUInt32ERj
__ZNK3JSC6JSCell9getStringEPNS_9ExecStateE
__ZNK3JSC6JSCell9getStringEPNS_9ExecStateERNS_7UStringE
+__ZNK3JSC6JSCell9getUInt32ERj
__ZNK3JSC6JSCell9toBooleanEPNS_9ExecStateE
__ZNK3JSC7ArgList8getSliceEiRS0_
__ZNK3JSC7JSValue16toObjectSlowCaseEPNS_9ExecStateE
diff --git a/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp b/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp
index 64e20a2..66f40e9 100644
--- a/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp
+++ b/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp
@@ -134,6 +134,7 @@
'conditions': [
['OS=="win"', {
'sources/': [
+ ['exclude', 'ThreadIdentifierDataPthreads\\.(h|cpp)$'],
['exclude', 'ThreadingPthreads\\.cpp$'],
['include', 'Thread(ing|Specific)Win\\.cpp$']
],
diff --git a/JavaScriptCore/JavaScriptCore.gypi b/JavaScriptCore/JavaScriptCore.gypi
index b4495b2..24577da 100644
--- a/JavaScriptCore/JavaScriptCore.gypi
+++ b/JavaScriptCore/JavaScriptCore.gypi
@@ -149,8 +149,6 @@
'pcre/ucpinternal.h',
'pcre/ucptable.cpp',
'profiler/CallIdentifier.h',
- 'profiler/HeavyProfile.cpp',
- 'profiler/HeavyProfile.h',
'profiler/Profile.cpp',
'profiler/Profile.h',
'profiler/ProfileGenerator.cpp',
@@ -160,8 +158,6 @@
'profiler/Profiler.cpp',
'profiler/Profiler.h',
'profiler/ProfilerServer.h',
- 'profiler/TreeProfile.cpp',
- 'profiler/TreeProfile.h',
'runtime/ArgList.cpp',
'runtime/ArgList.h',
'runtime/Arguments.cpp',
@@ -402,8 +398,6 @@
'wtf/PassRefPtr.h',
'wtf/Platform.h',
'wtf/PtrAndFlags.h',
- 'wtf/qt/MainThreadQt.cpp',
- 'wtf/qt/ThreadingQt.cpp',
'wtf/RandomNumber.cpp',
'wtf/RandomNumber.h',
'wtf/RandomNumberSeed.h',
@@ -416,11 +410,16 @@
'wtf/SegmentedVector.h',
'wtf/StdLibExtras.h',
'wtf/StringExtras.h',
+ 'wtf/StringHashFunctions.h',
'wtf/TCPackedCache.h',
+ 'wtf/qt/MainThreadQt.cpp',
+ 'wtf/qt/ThreadingQt.cpp',
'wtf/TCPageMap.h',
'wtf/TCSpinLock.h',
'wtf/TCSystemAlloc.cpp',
'wtf/TCSystemAlloc.h',
+ 'wtf/ThreadIdentifierDataPthreads.cpp',
+ 'wtf/ThreadIdentifierDataPthreads.h',
'wtf/Threading.cpp',
'wtf/Threading.h',
'wtf/ThreadingNone.cpp',
diff --git a/JavaScriptCore/JavaScriptCore.pri b/JavaScriptCore/JavaScriptCore.pri
index aecf01c..75737ae 100644
--- a/JavaScriptCore/JavaScriptCore.pri
+++ b/JavaScriptCore/JavaScriptCore.pri
@@ -1,11 +1,15 @@
# JavaScriptCore - Qt4 build info
VPATH += $$PWD
+CONFIG(standalone_package) {
+ isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = $$PWD/generated
+} else {
+ isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = generated
+}
+
CONFIG(debug, debug|release) {
- isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}debug
OBJECTS_DIR = obj/debug
} else { # Release
- isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}release
OBJECTS_DIR = obj/release
}
@@ -24,6 +28,7 @@ INCLUDEPATH = \
$$PWD/interpreter \
$$PWD/jit \
$$PWD/parser \
+ $$PWD/pcre \
$$PWD/profiler \
$$PWD/runtime \
$$PWD/wrec \
@@ -32,12 +37,11 @@ INCLUDEPATH = \
$$PWD/yarr \
$$PWD/API \
$$PWD/ForwardingHeaders \
- $$GENERATED_SOURCES_DIR \
+ $$JSC_GENERATED_SOURCES_DIR \
$$INCLUDEPATH
DEFINES += BUILDING_QT__ BUILDING_JavaScriptCore BUILDING_WTF
-GENERATED_SOURCES_DIR_SLASH = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}
win32-* {
LIBS += -lwinmm
}
@@ -52,11 +56,6 @@ contains(JAVASCRIPTCORE_JIT,no) {
DEFINES+=ENABLE_YARR=0
}
-# In debug mode JIT disabled until crash fixed
-win32-* {
- CONFIG(debug):!contains(DEFINES, ENABLE_JIT=1): DEFINES+=ENABLE_JIT=0
-}
-
# Rules when JIT enabled (not disabled)
!contains(DEFINES, ENABLE_JIT=0) {
linux*-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) {
@@ -73,22 +72,6 @@ wince* {
include(pcre/pcre.pri)
-LUT_FILES += \
- runtime/ArrayPrototype.cpp \
- runtime/DatePrototype.cpp \
- runtime/JSONObject.cpp \
- runtime/MathObject.cpp \
- runtime/NumberConstructor.cpp \
- runtime/RegExpConstructor.cpp \
- runtime/RegExpObject.cpp \
- runtime/StringPrototype.cpp
-
-KEYWORDLUT_FILES += \
- parser/Keywords.table
-
-JSCBISON += \
- parser/Grammar.y
-
SOURCES += \
API/JSBase.cpp \
API/JSCallbackConstructor.cpp \
@@ -115,6 +98,9 @@ SOURCES += \
interpreter/CallFrame.cpp \
interpreter/Interpreter.cpp \
interpreter/RegisterFile.cpp \
+ jit/ExecutableAllocatorPosix.cpp \
+ jit/ExecutableAllocatorSymbian.cpp \
+ jit/ExecutableAllocatorWin.cpp \
jit/ExecutableAllocator.cpp \
jit/JITArithmetic.cpp \
jit/JITCall.cpp \
@@ -126,12 +112,10 @@ SOURCES += \
parser/Nodes.cpp \
parser/ParserArena.cpp \
parser/Parser.cpp \
- profiler/HeavyProfile.cpp \
profiler/Profile.cpp \
profiler/ProfileGenerator.cpp \
profiler/ProfileNode.cpp \
profiler/Profiler.cpp \
- profiler/TreeProfile.cpp \
runtime/ArgList.cpp \
runtime/Arguments.cpp \
runtime/ArrayConstructor.cpp \
@@ -184,6 +168,9 @@ SOURCES += \
runtime/JSWrapperObject.cpp \
runtime/LiteralParser.cpp \
runtime/Lookup.cpp \
+ runtime/MarkStackPosix.cpp \
+ runtime/MarkStackSymbian.cpp \
+ runtime/MarkStackWin.cpp \
runtime/MarkStack.cpp \
runtime/MathObject.cpp \
runtime/NativeErrorConstructor.cpp \
@@ -211,6 +198,7 @@ SOURCES += \
runtime/Structure.cpp \
runtime/TimeoutChecker.cpp \
runtime/UString.cpp \
+ runtime/UStringImpl.cpp \
wtf/Assertions.cpp \
wtf/ByteArray.cpp \
wtf/CurrentTime.cpp \
@@ -220,8 +208,10 @@ SOURCES += \
wtf/HashTable.cpp \
wtf/MainThread.cpp \
wtf/qt/MainThreadQt.cpp \
+ wtf/qt/ThreadingQt.cpp \
wtf/RandomNumber.cpp \
wtf/RefCountedLeakCounter.cpp \
+ wtf/ThreadingNone.cpp \
wtf/Threading.cpp \
wtf/TypeTraits.cpp \
wtf/unicode/CollatorDefault.cpp \
@@ -231,53 +221,11 @@ SOURCES += \
yarr/RegexInterpreter.cpp \
yarr/RegexJIT.cpp
-symbian {
- SOURCES += jit/ExecutableAllocatorSymbian.cpp \
- runtime/MarkStackSymbian.cpp
-} else {
- win32-*|wince* {
- SOURCES += jit/ExecutableAllocatorWin.cpp \
- runtime/MarkStackWin.cpp
- } else {
- SOURCES += jit/ExecutableAllocatorPosix.cpp \
- runtime/MarkStackPosix.cpp
- }
-}
+# Generated files, simply list them for JavaScriptCore
+SOURCES += \
+ $${JSC_GENERATED_SOURCES_DIR}/Grammar.cpp
!contains(DEFINES, USE_SYSTEM_MALLOC) {
SOURCES += wtf/TCSystemAlloc.cpp
}
-!contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
- SOURCES += wtf/qt/ThreadingQt.cpp
-} else {
- DEFINES += ENABLE_JSC_MULTIPLE_THREADS=0
- SOURCES += wtf/ThreadingNone.cpp
-}
-
-# GENERATOR 1-A: LUT creator
-lut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.lut.h
-lut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
-lut.depend = ${QMAKE_FILE_NAME}
-lut.input = LUT_FILES
-lut.CONFIG += no_link
-addExtraCompiler(lut)
-
-# GENERATOR 1-B: particular LUT creator (for 1 file only)
-keywordlut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Lexer.lut.h
-keywordlut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
-keywordlut.depend = ${QMAKE_FILE_NAME}
-keywordlut.input = KEYWORDLUT_FILES
-keywordlut.CONFIG += no_link
-addExtraCompiler(keywordlut)
-
-# GENERATOR 2: bison grammar
-jscbison.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
-jscbison.commands = bison -d -p jscyy ${QMAKE_FILE_NAME} -o $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c ${QMAKE_FILE_OUT} && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.h $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.h
-jscbison.depend = ${QMAKE_FILE_NAME}
-jscbison.input = JSCBISON
-jscbison.variable_out = GENERATED_SOURCES
-jscbison.dependency_type = TYPE_C
-jscbison.CONFIG = target_predeps
-addExtraCompilerWithHeader(jscbison)
-
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist
index bccf2b5..7de8638 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist
+++ b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>JavaScriptCore</string>
<key>CFBundleGetInfoString</key>
- <string>530, Copyright 2003-2009 Apple Inc.</string>
+ <string>530, Copyright 2003-2010 Apple Inc.</string>
<key>CFBundleIdentifier</key>
<string>com.apple.JavaScriptCore</string>
<key>CFBundleInfoDictionaryVersion</key>
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
index aae8118..65ba684 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
+++ b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
@@ -2,6 +2,7 @@ EXPORTS
??0Collator@WTF@@QAE@PBD@Z
??0DateInstance@JSC@@QAE@PAVExecState@1@N@Z
+ ??0DateInstance@JSC@@QAE@PAVExecState@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@N@Z
??0DropAllLocks@JSLock@JSC@@QAE@W4JSLockBehavior@2@@Z
??0InternalFunction@JSC@@IAE@PAVJSGlobalData@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@ABVIdentifier@1@@Z
??0JSArray@JSC@@QAE@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@@Z
@@ -29,24 +30,22 @@ EXPORTS
??1Rope@JSString@JSC@@QAE@XZ
??1Structure@JSC@@QAE@XZ
??1ThreadCondition@WTF@@QAE@XZ
- ??2JSCell@JSC@@SAPAXIPAVExecState@1@@Z
+ ??1UStringImpl@JSC@@AAE@XZ
??2JSGlobalObject@JSC@@SAPAXIPAVJSGlobalData@1@@Z
??4UString@JSC@@QAEAAV01@PBD@Z
??8JSC@@YA_NABVUString@0@0@Z
?NaN@JSC@@3NB
?UTF8String@UString@JSC@@QBE?AVCString@2@_N@Z
- ?add@Identifier@JSC@@SA?AV?$PassRefPtr@URep@UString@JSC@@@WTF@@PAVExecState@2@PBD@Z
- ?add@PropertyNameArray@JSC@@QAEXPAURep@UString@2@@Z
?addPropertyTransition@Structure@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@PAV12@ABVIdentifier@2@IPAVJSCell@2@AAI@Z
?addPropertyTransitionToExistingStructure@Structure@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@PAV12@ABVIdentifier@2@IPAVJSCell@2@AAI@Z
?addPropertyWithoutTransition@Structure@JSC@@QAEIABVIdentifier@2@IPAVJSCell@2@@Z
- ?addSlowCase@Identifier@JSC@@CA?AV?$PassRefPtr@URep@UString@JSC@@@WTF@@PAVExecState@2@PAURep@UString@2@@Z
- ?addSlowCase@Identifier@JSC@@CA?AV?$PassRefPtr@URep@UString@JSC@@@WTF@@PAVJSGlobalData@2@PAURep@UString@2@@Z
+ ?addSlowCase@Identifier@JSC@@CA?AV?$PassRefPtr@VUStringImpl@JSC@@@WTF@@PAVExecState@2@PAVUStringImpl@2@@Z
+ ?addSlowCase@Identifier@JSC@@CA?AV?$PassRefPtr@VUStringImpl@JSC@@@WTF@@PAVJSGlobalData@2@PAVUStringImpl@2@@Z
+ ?add@Identifier@JSC@@SA?AV?$PassRefPtr@VUStringImpl@JSC@@@WTF@@PAVExecState@2@PBD@Z
+ ?add@PropertyNameArray@JSC@@QAEXPAVUStringImpl@2@@Z
?allocate@Heap@JSC@@QAEPAXI@Z
?allocatePropertyStorage@JSObject@JSC@@QAEXII@Z
?allocateStack@MarkStack@JSC@@CAPAXI@Z
- ?append@UString@JSC@@QAEAAV12@ABV12@@Z
- ?append@UString@JSC@@QAEAAV12@PBD@Z
?ascii@UString@JSC@@QBEPADXZ
?attach@Debugger@JSC@@QAEXPAVJSGlobalObject@2@@Z
?broadcast@ThreadCondition@WTF@@QAEXXZ
@@ -55,16 +54,15 @@ EXPORTS
?callOnMainThread@WTF@@YAXP6AXPAX@Z0@Z
?callOnMainThreadAndWait@WTF@@YAXP6AXPAX@Z0@Z
?changePrototypeTransition@Structure@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@PAV12@VJSValue@2@@Z
- ?checkSameIdentifierTable@Identifier@JSC@@CAXPAVExecState@2@PAURep@UString@2@@Z
- ?checkSameIdentifierTable@Identifier@JSC@@CAXPAVJSGlobalData@2@PAURep@UString@2@@Z
+ ?checkSameIdentifierTable@Identifier@JSC@@CAXPAVExecState@2@PAVUStringImpl@2@@Z
+ ?checkSameIdentifierTable@Identifier@JSC@@CAXPAVJSGlobalData@2@PAVUStringImpl@2@@Z
?checkSyntax@JSC@@YA?AVCompletion@1@PAVExecState@1@ABVSourceCode@1@@Z
?classInfo@InternalFunction@JSC@@UBEPBUClassInfo@2@XZ
?classInfo@JSCell@JSC@@UBEPBUClassInfo@2@XZ
?className@JSObject@JSC@@UBE?AVUString@2@XZ
?collate@Collator@WTF@@QBE?AW4Result@12@PB_WI0I@Z
- ?collect@Heap@JSC@@QAE_NXZ
- ?computeHash@Rep@UString@JSC@@SAIPBDH@Z
- ?computeHash@Rep@UString@JSC@@SAIPB_WH@Z
+ ?collectAllGarbage@Heap@JSC@@QAEXXZ
+ ?computeHash@UStringImpl@JSC@@SAIPB_WH@Z
?configurable@PropertyDescriptor@JSC@@QBE_NXZ
?construct@JSC@@YAPAVJSObject@1@PAVExecState@1@VJSValue@1@W4ConstructType@1@ABTConstructData@1@ABVArgList@1@@Z
?constructArray@JSC@@YAPAVJSArray@1@PAVExecState@1@ABVArgList@1@@Z
@@ -73,9 +71,8 @@ EXPORTS
?constructFunction@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVArgList@1@ABVIdentifier@1@ABVUString@1@H@Z
?convertUTF16ToUTF8@Unicode@WTF@@YA?AW4ConversionResult@12@PAPB_WPB_WPAPADPAD_N@Z
?create@ByteArray@WTF@@SA?AV?$PassRefPtr@VByteArray@WTF@@@2@I@Z
- ?create@JSGlobalData@JSC@@SA?AV?$PassRefPtr@VJSGlobalData@JSC@@@WTF@@_N@Z
+ ?create@JSGlobalData@JSC@@SA?AV?$PassRefPtr@VJSGlobalData@JSC@@@WTF@@XZ
?create@OpaqueJSString@@SA?AV?$PassRefPtr@UOpaqueJSString@@@WTF@@ABVUString@JSC@@@Z
- ?create@Rep@UString@JSC@@SA?AV?$PassRefPtr@URep@UString@JSC@@@WTF@@PA_WHV?$PassRefPtr@V?$CrossThreadRefCounted@V?$OwnFastMallocPtr@_W@WTF@@@WTF@@@5@@Z
?createEmptyString@SmallStrings@JSC@@AAEXPAVJSGlobalData@2@@Z
?createInheritorID@JSObject@JSC@@AAEPAVStructure@2@XZ
?createInterruptedExecutionException@JSC@@YA?AVJSValue@1@PAVJSGlobalData@1@@Z
@@ -89,6 +86,9 @@ EXPORTS
?createTypeError@JSC@@YA?AVJSValue@1@PAVExecState@1@PBD@Z
?currentThread@WTF@@YAIXZ
?currentTime@WTF@@YANXZ
+ ?dateToDaysFrom1970@WTF@@YANHHH@Z
+ ?dayInMonthFromDayInYear@WTF@@YAHH_N@Z
+ ?dayInYear@WTF@@YAHNH@Z
?decrement@RefCountedLeakCounter@WTF@@QAEXXZ
?defaultAttributes@PropertyDescriptor@JSC@@0IA
?defaultValue@JSObject@JSC@@UBE?AVJSValue@2@PAVExecState@2@W4PreferredPrimitiveType@2@@Z
@@ -110,16 +110,15 @@ EXPORTS
?despecifyDictionaryFunction@Structure@JSC@@QAEXABVIdentifier@2@@Z
?despecifyFunctionTransition@Structure@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@PAV12@ABVIdentifier@2@@Z
?destroy@Heap@JSC@@QAEXXZ
- ?destroy@Rep@UString@JSC@@QAEXXZ
?destroyJSGlobalObjectData@JSGlobalObject@JSC@@CAXPAX@Z
?detach@Debugger@JSC@@UAEXPAVJSGlobalObject@2@@Z
?detachThread@WTF@@YAXI@Z
?didTimeOut@TimeoutChecker@JSC@@QAE_NPAVExecState@2@@Z
- ?dumpSampleData@JSGlobalData@JSC@@QAEXPAVExecState@2@@Z
?doubleToStringInJavaScriptFormat@WTF@@YAXNQADPAI@Z
+ ?dumpSampleData@JSGlobalData@JSC@@QAEXPAVExecState@2@@Z
?enumerable@PropertyDescriptor@JSC@@QBE_NXZ
- ?equal@Identifier@JSC@@SA_NPBURep@UString@2@PBD@Z
- ?equal@JSC@@YA_NPBURep@UString@1@0@Z
+ ?equal@Identifier@JSC@@SA_NPBVUStringImpl@2@PBD@Z
+ ?equal@JSC@@YA_NPBVUStringImpl@1@0@Z
?evaluate@DebuggerCallFrame@JSC@@QBE?AVJSValue@2@ABVUString@2@AAV32@@Z
?evaluate@JSC@@YA?AVCompletion@1@PAVExecState@1@AAVScopeChain@1@ABVSourceCode@1@VJSValue@1@@Z
?exclude@Profile@JSC@@QAEXPBVProfileNode@2@@Z
@@ -134,7 +133,6 @@ EXPORTS
?from@UString@JSC@@SA?AV12@I@Z
?from@UString@JSC@@SA?AV12@N@Z
?functionName@DebuggerCallFrame@JSC@@QBEPBVUString@2@XZ
- ?get@Structure@JSC@@QAEIPBURep@UString@2@AAIAAPAVJSCell@2@@Z
?getCallData@JSCell@JSC@@UAE?AW4CallType@2@AATCallData@2@@Z
?getConstructData@JSCell@JSC@@UAE?AW4ConstructType@2@AATConstructData@2@@Z
?getJSNumber@JSCell@JSC@@UAE?AVJSValue@2@XZ
@@ -142,9 +140,9 @@ EXPORTS
?getOwnPropertyDescriptor@JSObject@JSC@@UAE_NPAVExecState@2@ABVIdentifier@2@AAVPropertyDescriptor@2@@Z
?getOwnPropertyDescriptor@JSString@JSC@@EAE_NPAVExecState@2@ABVIdentifier@2@AAVPropertyDescriptor@2@@Z
?getOwnPropertyDescriptor@StringObject@JSC@@UAE_NPAVExecState@2@ABVIdentifier@2@AAVPropertyDescriptor@2@@Z
- ?getOwnPropertyNames@JSObject@JSC@@UAEXPAVExecState@2@AAVPropertyNameArray@2@@Z
- ?getOwnPropertyNames@JSVariableObject@JSC@@UAEXPAVExecState@2@AAVPropertyNameArray@2@@Z
- ?getOwnPropertyNames@StringObject@JSC@@UAEXPAVExecState@2@AAVPropertyNameArray@2@@Z
+ ?getOwnPropertyNames@JSObject@JSC@@UAEXPAVExecState@2@AAVPropertyNameArray@2@W4EnumerationMode@2@@Z
+ ?getOwnPropertyNames@JSVariableObject@JSC@@UAEXPAVExecState@2@AAVPropertyNameArray@2@W4EnumerationMode@2@@Z
+ ?getOwnPropertyNames@StringObject@JSC@@UAEXPAVExecState@2@AAVPropertyNameArray@2@W4EnumerationMode@2@@Z
?getOwnPropertySlot@JSCell@JSC@@EAE_NPAVExecState@2@ABVIdentifier@2@AAVPropertySlot@2@@Z
?getOwnPropertySlot@JSCell@JSC@@EAE_NPAVExecState@2@IAAVPropertySlot@2@@Z
?getOwnPropertySlot@JSObject@JSC@@UAE_NPAVExecState@2@IAAVPropertySlot@2@@Z
@@ -156,18 +154,19 @@ EXPORTS
?getPrimitiveNumber@JSObject@JSC@@UAE_NPAVExecState@2@AANAAVJSValue@2@@Z
?getPrimitiveNumber@JSString@JSC@@EAE_NPAVExecState@2@AANAAVJSValue@2@@Z
?getPropertyDescriptor@JSObject@JSC@@QAE_NPAVExecState@2@ABVIdentifier@2@AAVPropertyDescriptor@2@@Z
- ?getPropertyNames@JSObject@JSC@@UAEXPAVExecState@2@AAVPropertyNameArray@2@@Z
+ ?getPropertyNames@JSObject@JSC@@UAEXPAVExecState@2@AAVPropertyNameArray@2@W4EnumerationMode@2@@Z
?getSlice@ArgList@JSC@@QBEXHAAV12@@Z
?getString@JSCell@JSC@@QBE?AVUString@2@PAVExecState@2@@Z
?getString@JSCell@JSC@@QBE_NPAVExecState@2@AAVUString@2@@Z
?getUInt32@JSCell@JSC@@UBE_NAAI@Z
+ ?get@Structure@JSC@@QAEIPBVUStringImpl@2@AAIAAPAVJSCell@2@@Z
?getter@PropertyDescriptor@JSC@@QBE?AVJSValue@2@XZ
?globalExec@JSGlobalObject@JSC@@UAEPAVExecState@2@XZ
?globalObjectCount@Heap@JSC@@QAEIXZ
?hasInstance@JSObject@JSC@@UAE_NPAVExecState@2@VJSValue@2@1@Z
?hasProperty@JSObject@JSC@@QBE_NPAVExecState@2@ABVIdentifier@2@@Z
?hasProperty@JSObject@JSC@@QBE_NPAVExecState@2@I@Z
- ?hasTransition@Structure@JSC@@QAE_NPAURep@UString@2@I@Z
+ ?hasTransition@Structure@JSC@@QAE_NPAVUStringImpl@2@I@Z
?heap@Heap@JSC@@SAPAV12@VJSValue@2@@Z
?increment@RefCountedLeakCounter@WTF@@QAEXXZ
?init@JSGlobalObject@JSC@@AAEXPAVJSObject@2@@Z
@@ -198,14 +197,14 @@ EXPORTS
?markChildren@JSObject@JSC@@UAEXAAVMarkStack@2@@Z
?markChildren@JSWrapperObject@JSC@@EAEXAAVMarkStack@2@@Z
?materializePropertyMap@Structure@JSC@@AAEXXZ
+ ?monthFromDayInYear@WTF@@YAHH_N@Z
+ ?msToYear@WTF@@YAHN@Z
?name@InternalFunction@JSC@@QAEABVUString@2@PAVExecState@2@@Z
?nonInlineNaN@JSC@@YANXZ
- ?objectCount@Heap@JSC@@QAEIXZ
+ ?objectCount@Heap@JSC@@QBEIXZ
?objectProtoFuncToString@JSC@@YI?AVJSValue@1@PAVExecState@1@PAVJSObject@1@V21@ABVArgList@1@@Z
?parse@Parser@JSC@@AAEXPAVJSGlobalData@2@PAHPAVUString@2@@Z
?parseDateFromNullTerminatedCharacters@WTF@@YANPBD@Z
- ?primaryHeapBegin@Heap@JSC@@QAE?AV?$CollectorHeapIterator@$0A@@2@XZ
- ?primaryHeapEnd@Heap@JSC@@QAE?AV?$CollectorHeapIterator@$0A@@2@XZ
?profiler@Profiler@JSC@@SAPAV12@XZ
?protect@Heap@JSC@@QAEXVJSValue@2@@Z
?protectedGlobalObjectCount@Heap@JSC@@QAEIXZ
@@ -248,7 +247,7 @@ EXPORTS
?setUpStaticFunctionSlot@JSC@@YAXPAVExecState@1@PBVHashEntry@1@PAVJSObject@1@ABVIdentifier@1@AAVPropertySlot@1@@Z
?setWritable@PropertyDescriptor@JSC@@QAEX_N@Z
?setter@PropertyDescriptor@JSC@@QBE?AVJSValue@2@XZ
- ?sharedBuffer@Rep@UString@JSC@@QAEPAV?$CrossThreadRefCounted@V?$OwnFastMallocPtr@_W@WTF@@@WTF@@XZ
+ ?sharedBuffer@UStringImpl@JSC@@QAEPAV?$CrossThreadRefCounted@V?$OwnFastMallocPtr@_W@WTF@@@WTF@@XZ
?signal@ThreadCondition@WTF@@QAEXXZ
?slowAppend@MarkedArgumentBuffer@JSC@@AAEXVJSValue@2@@Z
?startIgnoringLeaks@Structure@JSC@@SAXXZ
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc
index ba59bb8..861fa3a 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc
+++ b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc
@@ -34,7 +34,7 @@ BEGIN
VALUE "FileVersion", __VERSION_TEXT__
VALUE "CompanyName", "Apple Inc."
VALUE "InternalName", "JavaScriptCore"
- VALUE "LegalCopyright", "Copyright Apple Inc. 2003-2009"
+ VALUE "LegalCopyright", "Copyright Apple Inc. 2003-2010"
VALUE "OriginalFilename", "JavaScriptCore.dll"
VALUE "ProductName", " JavaScriptCore"
VALUE "ProductVersion", __VERSION_TEXT__
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
index 5b7f9ad..9c20af9 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
+++ b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
@@ -18,7 +18,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;.\JavaScriptCoreCommon.vsprops;.\JavaScriptCoreCF.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;.\JavaScriptCoreCommon.vsprops;.\JavaScriptCoreCF.vsprops"
CharacterSet="1"
>
<Tool
@@ -79,7 +79,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;.\JavaScriptCoreCommon.vsprops;.\JavaScriptCoreCF.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;.\JavaScriptCoreCommon.vsprops;.\JavaScriptCoreCF.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -141,7 +141,7 @@
<Configuration
Name="Debug_Internal|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;.\JavaScriptCoreCommon.vsprops;.\JavaScriptCoreCF.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;.\JavaScriptCoreCommon.vsprops;.\JavaScriptCoreCF.vsprops"
CharacterSet="1"
>
<Tool
@@ -203,7 +203,7 @@
Name="Release_PGOInstrument|Win32"
IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\Release"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;.\JavaScriptCoreCommon.vsprops;.\JavaScriptCoreCF.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;.\JavaScriptCoreCommon.vsprops;.\JavaScriptCoreCF.vsprops"
CharacterSet="1"
WholeProgramOptimization="2"
>
@@ -266,7 +266,7 @@
Name="Release_PGOOptimize|Win32"
IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\Release"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;.\JavaScriptCoreCommon.vsprops;.\JavaScriptCoreCF.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;.\JavaScriptCoreCommon.vsprops;.\JavaScriptCoreCF.vsprops"
CharacterSet="1"
WholeProgramOptimization="4"
>
@@ -328,7 +328,7 @@
<Configuration
Name="Debug_CFLite|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\debug_wincairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;.\JavaScriptCoreCommon.vsprops;.\JavaScriptCoreCFLite.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefinesCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_wincairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;.\JavaScriptCoreCommon.vsprops;.\JavaScriptCoreCFLite.vsprops"
CharacterSet="1"
>
<Tool
@@ -389,7 +389,7 @@
<Configuration
Name="Release_CFLite|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;.\JavaScriptCoreCommon.vsprops;.\JavaScriptCoreCFLite.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefinesCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;.\JavaScriptCoreCommon.vsprops;.\JavaScriptCoreCFLite.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -451,7 +451,7 @@
<Configuration
Name="Debug_All|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;.\JavaScriptCoreCommon.vsprops;.\JavaScriptCoreCF.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;.\JavaScriptCoreCommon.vsprops;.\JavaScriptCoreCF.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
CharacterSet="1"
>
<Tool
@@ -514,7 +514,7 @@
</References>
<Files>
<Filter
- Name="JavaScriptCore"
+ Name="runtime"
>
<File
RelativePath="..\..\runtime\ArgList.cpp"
@@ -549,6 +549,10 @@
>
</File>
<File
+ RelativePath="..\..\runtime\BatchedTransitionOptimizer.h"
+ >
+ </File>
+ <File
RelativePath="..\..\runtime\BooleanConstructor.cpp"
>
</File>
@@ -573,10 +577,6 @@
>
</File>
<File
- RelativePath="..\..\interpreter\CachedCall.h"
- >
- </File>
- <File
RelativePath="..\..\runtime\CallData.cpp"
>
</File>
@@ -585,18 +585,6 @@
>
</File>
<File
- RelativePath="..\..\interpreter\CallFrame.cpp"
- >
- </File>
- <File
- RelativePath="..\..\interpreter\CallFrame.h"
- >
- </File>
- <File
- RelativePath="..\..\interpreter\CallFrameClosure.h"
- >
- </File>
- <File
RelativePath="..\..\runtime\ClassInfo.h"
>
</File>
@@ -629,10 +617,6 @@
>
</File>
<File
- RelativePath="..\..\config.h"
- >
- </File>
- <File
RelativePath="..\..\runtime\ConstructData.cpp"
>
</File>
@@ -668,14 +652,14 @@
RelativePath="..\..\runtime\DateInstanceCache.h"
>
</File>
- <File
- RelativePath="..\..\wtf\DateMath.cpp"
- >
- </File>
- <File
- RelativePath="..\..\wtf\DateMath.h"
- >
- </File>
+ <File
+ RelativePath="..\..\wtf\DateMath.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\wtf\DateMath.h"
+ >
+ </File>
<File
RelativePath="..\..\runtime\DatePrototype.cpp"
>
@@ -717,10 +701,22 @@
>
</File>
<File
+ RelativePath="..\..\runtime\ExceptionHelpers.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\interpreter\ExceptionHelpers.h"
+ >
+ </File>
+ <File
RelativePath="..\..\runtime\Executable.cpp"
>
</File>
<File
+ RelativePath="..\..\runtime\Executable.h"
+ >
+ </File>
+ <File
RelativePath="..\..\runtime\FunctionConstructor.cpp"
>
</File>
@@ -785,14 +781,6 @@
>
</File>
<File
- RelativePath="..\..\runtime\JSAPIValueWrapper.cpp"
- >
- </File>
- <File
- RelativePath="..\..\runtime\JSAPIValueWrapper.h"
- >
- </File>
- <File
RelativePath="..\..\runtime\JSArray.cpp"
>
</File>
@@ -897,6 +885,14 @@
>
</File>
<File
+ RelativePath="..\..\runtime\JSPropertyNameIterator.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\runtime\JSPropertyNameIterator.h"
+ >
+ </File>
+ <File
RelativePath="..\..\runtime\JSStaticScopeObject.cpp"
>
</File>
@@ -917,6 +913,10 @@
>
</File>
<File
+ RelativePath="..\..\runtime\JSTypeInfo.h"
+ >
+ </File>
+ <File
RelativePath="..\..\runtime\JSValue.cpp"
>
</File>
@@ -941,7 +941,11 @@
>
</File>
<File
- RelativePath="..\..\bytecompiler\LabelScope.h"
+ RelativePath="..\..\runtime\JSZombie.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\runtime\JSZombie.h"
>
</File>
<File
@@ -1109,6 +1113,10 @@
>
</File>
<File
+ RelativePath="..\..\runtime\RegExpMatchesArray.h"
+ >
+ </File>
+ <File
RelativePath="..\..\runtime\RegExpObject.cpp"
>
</File>
@@ -1145,14 +1153,6 @@
>
</File>
<File
- RelativePath="..\..\parser\SourceCode.h"
- >
- </File>
- <File
- RelativePath="..\..\parser\SourceProvider.h"
- >
- </File>
- <File
RelativePath="..\..\runtime\StringConstructor.cpp"
>
</File>
@@ -1205,6 +1205,14 @@
>
</File>
<File
+ RelativePath="..\..\runtime\TimeoutChecker.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\runtime\TimeoutChecker.h"
+ >
+ </File>
+ <File
RelativePath="..\..\runtime\UString.cpp"
>
</File>
@@ -1213,120 +1221,28 @@
>
</File>
<File
- RelativePath="..\..\runtime\WeakRandom.h"
+ RelativePath="..\..\runtime\UStringImpl.cpp"
>
</File>
- <Filter
- Name="DerivedSources"
+ <File
+ RelativePath="..\..\runtime\UStringImpl.h"
>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\ArrayPrototype.lut.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\DatePrototype.lut.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\Grammar.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- DisableSpecificWarnings="4701"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- DisableSpecificWarnings="4701"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Internal|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- DisableSpecificWarnings="4701"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_PGOInstrument|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- DisableSpecificWarnings="4701"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_PGOOptimize|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- DisableSpecificWarnings="4701"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_CFLite|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- DisableSpecificWarnings="4701"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_CFLite|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- DisableSpecificWarnings="4701"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- DisableSpecificWarnings="4701"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\Grammar.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\lexer.lut.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\MathObject.lut.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\NumberConstructor.lut.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\RegExpConstructor.lut.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\RegExpObject.lut.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\StringPrototype.lut.h"
- >
- </File>
- </Filter>
+ </File>
+ <File
+ RelativePath="..\..\runtime\WeakGCMap.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\runtime\WeakGCPtr.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\runtime\WeakRandom.h"
+ >
+ </File>
</Filter>
<Filter
- Name="PCRE"
+ Name="pcre"
>
<File
RelativePath="..\..\pcre\pcre.h"
@@ -1377,6 +1293,14 @@
>
</File>
<File
+ RelativePath="..\..\runtime\JSAPIValueWrapper.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\runtime\JSAPIValueWrapper.h"
+ >
+ </File>
+ <File
RelativePath="..\..\API\JSBase.cpp"
>
</File>
@@ -1385,6 +1309,10 @@
>
</File>
<File
+ RelativePath="..\..\API\JSBasePrivate.h"
+ >
+ </File>
+ <File
RelativePath="..\..\API\JSCallbackConstructor.cpp"
>
</File>
@@ -1409,6 +1337,10 @@
>
</File>
<File
+ RelativePath="..\..\API\JSCallbackObjectFunctions.h"
+ >
+ </File>
+ <File
RelativePath="..\..\API\JSClassRef.cpp"
>
</File>
@@ -1486,14 +1418,10 @@
</File>
</Filter>
<Filter
- Name="Profiler"
+ Name="profiler"
>
<File
- RelativePath="..\..\profiler\HeavyProfile.cpp"
- >
- </File>
- <File
- RelativePath="..\..\profiler\HeavyProfile.h"
+ RelativePath="..\..\profiler\CallIdentifier.h"
>
</File>
<File
@@ -1528,396 +1456,528 @@
RelativePath="..\..\profiler\Profiler.h"
>
</File>
+ </Filter>
+ <Filter
+ Name="bytecode"
+ >
<File
- RelativePath="..\..\profiler\TreeProfile.cpp"
+ RelativePath="..\..\bytecode\CodeBlock.cpp"
>
</File>
<File
- RelativePath="..\..\profiler\TreeProfile.h"
+ RelativePath="..\..\bytecode\CodeBlock.h"
>
</File>
- </Filter>
- <Filter
- Name="Compiler"
- >
<File
- RelativePath="..\..\bytecompiler\BytecodeGenerator.cpp"
+ RelativePath="..\..\bytecode\EvalCodeCache.h"
>
</File>
<File
- RelativePath="..\..\bytecompiler\BytecodeGenerator.h"
+ RelativePath="..\..\bytecode\Instruction.h"
>
</File>
<File
- RelativePath="..\..\bytecompiler\NodesCodegen.cpp"
+ RelativePath="..\..\bytecode\JumpTable.cpp"
>
</File>
<File
- RelativePath="..\..\bytecompiler\Label.h"
+ RelativePath="..\..\bytecode\JumpTable.h"
>
</File>
<File
- RelativePath="..\..\parser\Lexer.cpp"
+ RelativePath="..\..\bytecode\Opcode.cpp"
>
</File>
<File
- RelativePath="..\..\parser\Lexer.h"
+ RelativePath="..\..\bytecode\Opcode.h"
>
</File>
<File
- RelativePath="..\..\parser\NodeConstructors.h"
+ RelativePath="..\..\bytecode\SamplingTool.cpp"
>
</File>
<File
- RelativePath="..\..\parser\NodeInfo.h"
+ RelativePath="..\..\bytecode\SamplingTool.h"
>
</File>
<File
- RelativePath="..\..\parser\Nodes.cpp"
+ RelativePath="..\..\bytecode\StructureStubInfo.cpp"
>
</File>
<File
- RelativePath="..\..\parser\Nodes.h"
+ RelativePath="..\..\bytecode\StructureStubInfo.h"
>
</File>
+ </Filter>
+ <Filter
+ Name="debugger"
+ >
<File
- RelativePath="..\..\parser\Parser.cpp"
+ RelativePath="..\..\debugger\Debugger.cpp"
>
</File>
<File
- RelativePath="..\..\parser\Parser.h"
+ RelativePath="..\..\debugger\Debugger.h"
>
</File>
<File
- RelativePath="..\..\parser\ParserArena.cpp"
+ RelativePath="..\..\debugger\DebuggerActivation.cpp"
>
</File>
<File
- RelativePath="..\..\parser\ParserArena.h"
+ RelativePath="..\..\debugger\DebuggerActivation.h"
>
</File>
<File
- RelativePath="..\..\bytecompiler\RegisterID.h"
+ RelativePath="..\..\debugger\DebuggerCallFrame.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\debugger\DebuggerCallFrame.h"
>
</File>
</Filter>
<Filter
- Name="bytecode"
+ Name="assembler"
>
<File
- RelativePath="..\..\bytecode\CodeBlock.cpp"
+ RelativePath="..\..\assembler\AbstractMacroAssembler.h"
>
</File>
<File
- RelativePath="..\..\bytecode\CodeBlock.h"
+ RelativePath="..\..\assembler\AssemblerBuffer.h"
>
</File>
<File
- RelativePath="..\..\bytecode\EvalCodeCache.h"
+ RelativePath="..\..\assembler\CodeLocation.h"
>
</File>
<File
- RelativePath="..\..\runtime\ExceptionHelpers.cpp"
+ RelativePath="..\..\assembler\LinkBuffer.h"
>
</File>
<File
- RelativePath="..\..\interpreter\ExceptionHelpers.h"
+ RelativePath="..\..\assembler\MacroAssembler.h"
>
</File>
<File
- RelativePath="..\..\bytecode\Instruction.h"
+ RelativePath="..\..\assembler\MacroAssemblerX86.h"
>
</File>
<File
- RelativePath="..\..\interpreter\Interpreter.cpp"
+ RelativePath="..\..\assembler\MacroAssemblerX86Common.h"
>
</File>
<File
- RelativePath="..\..\interpreter\Interpreter.h"
+ RelativePath="..\..\assembler\RepatchBuffer.h"
>
</File>
<File
- RelativePath="..\..\jit\JITStubs.cpp"
+ RelativePath="..\..\assembler\X86Assembler.h"
>
</File>
+ </Filter>
+ <Filter
+ Name="wrec"
+ >
<File
- RelativePath="..\..\jit\JITStubs.h"
+ RelativePath="..\..\wrec\CharacterClass.cpp"
>
</File>
<File
- RelativePath="..\..\runtime\JSPropertyNameIterator.cpp"
+ RelativePath="..\..\wrec\CharacterClass.h"
>
</File>
<File
- RelativePath="..\..\runtime\JSPropertyNameIterator.h"
+ RelativePath="..\..\wrec\CharacterClassConstructor.cpp"
>
</File>
<File
- RelativePath="..\..\bytecode\JumpTable.cpp"
+ RelativePath="..\..\wrec\CharacterClassConstructor.h"
>
</File>
<File
- RelativePath="..\..\bytecode\JumpTable.h"
+ RelativePath="..\..\wrec\Escapes.h"
>
</File>
<File
- RelativePath="..\..\bytecode\Opcode.cpp"
+ RelativePath="..\..\wrec\Quantifier.h"
>
</File>
<File
- RelativePath="..\..\bytecode\Opcode.h"
+ RelativePath="..\..\wrec\WREC.cpp"
>
</File>
<File
- RelativePath="..\..\interpreter\Register.h"
+ RelativePath="..\..\wrec\WREC.h"
>
</File>
<File
- RelativePath="..\..\interpreter\RegisterFile.cpp"
+ RelativePath="..\..\wrec\WRECFunctors.cpp"
>
</File>
<File
- RelativePath="..\..\interpreter\RegisterFile.h"
+ RelativePath="..\..\wrec\WRECFunctors.h"
>
</File>
<File
- RelativePath="..\..\bytecode\SamplingTool.cpp"
+ RelativePath="..\..\wrec\WRECGenerator.cpp"
>
</File>
<File
- RelativePath="..\..\bytecode\SamplingTool.h"
+ RelativePath="..\..\wrec\WRECGenerator.h"
>
</File>
<File
- RelativePath="..\..\bytecode\StructureStubInfo.cpp"
+ RelativePath="..\..\wrec\WRECParser.cpp"
>
</File>
<File
- RelativePath="..\..\bytecode\StructureStubInfo.h"
+ RelativePath="..\..\wrec\WRECParser.h"
>
</File>
+ </Filter>
+ <Filter
+ Name="yarr"
+ >
<File
- RelativePath="..\..\runtime\TimeoutChecker.cpp"
+ RelativePath="..\..\yarr\RegexCompiler.cpp"
>
</File>
<File
- RelativePath="..\..\runtime\TimeoutChecker.h"
+ RelativePath="..\..\yarr\RegexCompiler.h"
>
</File>
- </Filter>
- <Filter
- Name="Debugger"
- >
<File
- RelativePath="..\..\debugger\Debugger.cpp"
+ RelativePath="..\..\yarr\RegexInterpreter.cpp"
>
</File>
<File
- RelativePath="..\..\debugger\Debugger.h"
+ RelativePath="..\..\yarr\RegexInterpreter.h"
>
</File>
<File
- RelativePath="..\..\debugger\DebuggerActivation.cpp"
+ RelativePath="..\..\yarr\RegexJIT.cpp"
>
</File>
<File
- RelativePath="..\..\debugger\DebuggerActivation.h"
+ RelativePath="..\..\yarr\RegexJIT.h"
>
</File>
<File
- RelativePath="..\..\debugger\DebuggerCallFrame.cpp"
+ RelativePath="..\..\yarr\RegexParser.h"
>
</File>
<File
- RelativePath="..\..\debugger\DebuggerCallFrame.h"
+ RelativePath="..\..\yarr\RegexPattern.h"
>
</File>
</Filter>
<Filter
- Name="assembler"
+ Name="jit"
>
<File
- RelativePath="..\..\assembler\AbstractMacroAssembler.h"
+ RelativePath="..\..\jit\ExecutableAllocator.cpp"
>
</File>
<File
- RelativePath="..\..\assembler\AssemblerBuffer.h"
+ RelativePath="..\..\jit\ExecutableAllocator.h"
>
</File>
<File
- RelativePath="..\..\assembler\LinkBuffer.h"
+ RelativePath="..\..\jit\ExecutableAllocatorWin.cpp"
>
</File>
<File
- RelativePath="..\..\assembler\MacroAssembler.h"
+ RelativePath="..\..\jit\JIT.cpp"
>
</File>
<File
- RelativePath="..\..\assembler\MacroAssemblerX86.h"
+ RelativePath="..\..\jit\JIT.h"
>
</File>
<File
- RelativePath="..\..\assembler\MacroAssemblerX86Common.h"
+ RelativePath="..\..\jit\JITArithmetic.cpp"
>
</File>
<File
- RelativePath="..\..\assembler\RepatchBuffer.h"
+ RelativePath="..\..\jit\JITCall.cpp"
>
</File>
<File
- RelativePath="..\..\assembler\X86Assembler.h"
+ RelativePath="..\..\jit\JITCode.h"
>
</File>
- </Filter>
- <Filter
- Name="wrec"
- >
<File
- RelativePath="..\..\wrec\CharacterClass.cpp"
+ RelativePath="..\..\jit\JITInlineMethods.h"
>
</File>
<File
- RelativePath="..\..\wrec\CharacterClass.h"
+ RelativePath="..\..\jit\JITOpcodes.cpp"
>
</File>
<File
- RelativePath="..\..\wrec\CharacterClassConstructor.cpp"
+ RelativePath="..\..\jit\JITPropertyAccess.cpp"
>
</File>
<File
- RelativePath="..\..\wrec\CharacterClassConstructor.h"
+ RelativePath="..\..\jit\JITStubCall.h"
>
</File>
<File
- RelativePath="..\..\wrec\Quantifier.h"
+ RelativePath="..\..\jit\JITStubs.cpp"
>
</File>
<File
- RelativePath="..\..\wrec\WREC.cpp"
+ RelativePath="..\..\jit\JITStubs.h"
>
</File>
+ </Filter>
+ <Filter
+ Name="Resources"
+ >
<File
- RelativePath="..\..\wrec\WREC.h"
+ RelativePath=".\JavaScriptCore.rc"
>
</File>
+ </Filter>
+ <Filter
+ Name="interpreter"
+ >
<File
- RelativePath="..\..\wrec\WRECFunctors.cpp"
+ RelativePath="..\..\interpreter\CachedCall.h"
>
</File>
<File
- RelativePath="..\..\wrec\WRECFunctors.h"
+ RelativePath="..\..\interpreter\CallFrame.cpp"
>
</File>
<File
- RelativePath="..\..\wrec\WRECGenerator.cpp"
+ RelativePath="..\..\interpreter\CallFrame.h"
>
</File>
<File
- RelativePath="..\..\wrec\WRECGenerator.h"
+ RelativePath="..\..\interpreter\CallFrameClosure.h"
>
</File>
<File
- RelativePath="..\..\wrec\WRECParser.cpp"
+ RelativePath="..\..\interpreter\Interpreter.cpp"
>
</File>
<File
- RelativePath="..\..\wrec\WRECParser.h"
+ RelativePath="..\..\interpreter\Interpreter.h"
>
</File>
- </Filter>
- <Filter
- Name="yarr"
- >
<File
- RelativePath="..\..\yarr\RegexCompiler.cpp"
+ RelativePath="..\..\interpreter\Register.h"
>
</File>
<File
- RelativePath="..\..\yarr\RegexCompiler.h"
+ RelativePath="..\..\interpreter\RegisterFile.cpp"
>
</File>
<File
- RelativePath="..\..\yarr\RegexInterpreter.cpp"
+ RelativePath="..\..\interpreter\RegisterFile.h"
>
</File>
+ </Filter>
+ <Filter
+ Name="bytecompiler"
+ >
<File
- RelativePath="..\..\yarr\RegexInterpreter.h"
+ RelativePath="..\..\bytecompiler\BytecodeGenerator.cpp"
>
</File>
<File
- RelativePath="..\..\yarr\RegexJIT.cpp"
+ RelativePath="..\..\bytecompiler\BytecodeGenerator.h"
>
</File>
<File
- RelativePath="..\..\yarr\RegexJIT.h"
+ RelativePath="..\..\bytecompiler\Label.h"
>
</File>
<File
- RelativePath="..\..\yarr\RegexParser.h"
+ RelativePath="..\..\bytecompiler\LabelScope.h"
>
</File>
<File
- RelativePath="..\..\yarr\RegexPattern.h"
+ RelativePath="..\..\bytecompiler\NodesCodegen.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\bytecompiler\RegisterID.h"
>
</File>
</Filter>
<Filter
- Name="jit"
+ Name="parser"
>
<File
- RelativePath="..\..\jit\ExecutableAllocator.cpp"
+ RelativePath="..\..\parser\Lexer.cpp"
>
</File>
<File
- RelativePath="..\..\jit\ExecutableAllocator.h"
+ RelativePath="..\..\parser\Lexer.h"
>
</File>
<File
- RelativePath="..\..\jit\ExecutableAllocatorWin.cpp"
+ RelativePath="..\..\parser\NodeConstructors.h"
>
</File>
<File
- RelativePath="..\..\jit\JIT.cpp"
+ RelativePath="..\..\parser\NodeInfo.h"
>
</File>
<File
- RelativePath="..\..\jit\JIT.h"
+ RelativePath="..\..\parser\Nodes.cpp"
>
</File>
<File
- RelativePath="..\..\jit\JITArithmetic.cpp"
+ RelativePath="..\..\parser\Nodes.h"
>
</File>
<File
- RelativePath="..\..\jit\JITCall.cpp"
+ RelativePath="..\..\parser\Parser.cpp"
>
</File>
<File
- RelativePath="..\..\jit\JITInlineMethods.h"
+ RelativePath="..\..\parser\Parser.h"
>
</File>
<File
- RelativePath="..\..\jit\JITOpcodes.cpp"
+ RelativePath="..\..\parser\ParserArena.cpp"
>
</File>
<File
- RelativePath="..\..\jit\JITPropertyAccess.cpp"
+ RelativePath="..\..\parser\ParserArena.h"
>
</File>
<File
- RelativePath="..\..\jit\JITStubCall.h"
+ RelativePath="..\..\parser\ResultType.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\parser\SourceCode.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\parser\SourceProvider.h"
>
</File>
</Filter>
<Filter
- Name="Resources"
+ Name="Derived Sources"
>
<File
- RelativePath=".\JavaScriptCore.rc"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\ArrayPrototype.lut.h"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\DatePrototype.lut.h"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\Grammar.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableSpecificWarnings="4701"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableSpecificWarnings="4701"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableSpecificWarnings="4701"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_PGOInstrument|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableSpecificWarnings="4701"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_PGOOptimize|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableSpecificWarnings="4701"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_CFLite|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableSpecificWarnings="4701"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_CFLite|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableSpecificWarnings="4701"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ DisableSpecificWarnings="4701"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\Grammar.h"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\lexer.lut.h"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\MathObject.lut.h"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\NumberConstructor.lut.h"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\RegExpConstructor.lut.h"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\RegExpObject.lut.h"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\StringPrototype.lut.h"
>
</File>
</Filter>
<File
+ RelativePath="..\..\config.h"
+ >
+ </File>
+ <File
RelativePath=".\JavaScriptCore.def"
>
</File>
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops
index 682e01e..f489e79 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops
+++ b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops
@@ -6,7 +6,7 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\obj\JavaScriptCore\DerivedSources\&quot;;../../;../../API/;../../pcre/;../../parser/;../../bytecompiler/;../../jit/;../../runtime/;../../bytecode/;../../interpreter/;../../wtf/;../../profiler;../../assembler/;../../debugger/;../../wrec/;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;../../../icu/include;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\obj\JavaScriptCore\DerivedSources\&quot;;../../;../../API/;../../pcre/;../../parser/;../../bytecompiler/;../../jit/;../../runtime/;../../bytecode/;../../interpreter/;../../wtf/;../../profiler;../../assembler/;../../debugger/;../../wrec/;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;"
PreprocessorDefinitions="__STD_C"
/>
<Tool
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh
index 6d6b588..5955365 100755
--- a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh
+++ b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh
@@ -1,5 +1,15 @@
#!/usr/bin/bash
+# Determine if we have QuartzCore so we can turn on
+QUARTZCORE_H_PATH=$(cygpath -u "${WEBKITLIBRARIESDIR}/include/QuartzCore/QuartzCore.h")
+QUARTZCOREPRESENT_H_PATH=$(cygpath -u "${WEBKITOUTPUTDIR}/include/private/QuartzCorePresent.h")
+if test \( ! -f "${QUARTZCOREPRESENT_H_PATH}" \) -o \( -f "${QUARTZCORE_H_PATH}" -a \( "${QUARTZCORE_H_PATH}" -nt "${QUARTZCOREPRESENT_H_PATH}" \) \)
+then
+ mkdir -p "$(dirname "${QUARTZCOREPRESENT_H_PATH}")"
+ test ! -f "${QUARTZCORE_H_PATH}"
+ echo "#define QUARTZCORE_PRESENT $?" > "${QUARTZCOREPRESENT_H_PATH}"
+fi
+
NUMCPUS=`../../../WebKitTools/Scripts/num-cpus`
XSRCROOT="`pwd`/../.."
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj b/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
index 78f507a..7a93632 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
+++ b/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
@@ -18,7 +18,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;.\WTFCommon.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;.\WTFCommon.vsprops"
CharacterSet="1"
>
<Tool
@@ -38,6 +38,7 @@
/>
<Tool
Name="VCCLCompilerTool"
+ ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -70,7 +71,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;.\WTFCommon.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;.\WTFCommon.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -91,6 +92,7 @@
/>
<Tool
Name="VCCLCompilerTool"
+ ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -123,7 +125,7 @@
<Configuration
Name="Debug_Internal|Win32"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;.\WTFCommon.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;.\WTFCommon.vsprops"
CharacterSet="1"
>
<Tool
@@ -143,6 +145,7 @@
/>
<Tool
Name="VCCLCompilerTool"
+ ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -175,7 +178,7 @@
<Configuration
Name="Debug_All|Win32"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;.\WTFCommon.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;.\WTFCommon.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
CharacterSet="1"
>
<Tool
@@ -195,6 +198,7 @@
/>
<Tool
Name="VCCLCompilerTool"
+ ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
/>
<Tool
Name="VCManagedResourceCompilerTool"
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFCommon.vsprops b/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFCommon.vsprops
index d78ff43..b41682f 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFCommon.vsprops
+++ b/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFCommon.vsprops
@@ -7,7 +7,7 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\obj\JavaScriptCore\$(ConfigurationName)\DerivedSources\&quot;;../../;&quot;../../os-win32/&quot;;../../pcre/;../../parser/;../../wtf/;../../wtf/unicode/;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\icu&quot;;../../../icu/include;../../bindings;../../bindings/c;../../bindings/jni;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\obj\JavaScriptCore\$(ConfigurationName)\DerivedSources\&quot;;../../;&quot;../../os-win32/&quot;;../../pcre/;../../parser/;../../wtf/;../../wtf/unicode/;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;../../../icu/include;../../bindings;../../bindings/c;../../bindings/jni;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;"
PreprocessorDefinitions="__STD_C"
/>
<Tool
@@ -21,6 +21,6 @@
/>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;"
/>
</VisualStudioPropertySheet>
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops b/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops
index 1a8f8b6..61594e1 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops
+++ b/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops
@@ -6,7 +6,7 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\JavaScriptCore\$(ConfigurationName)\DerivedSources\&quot;;../../;&quot;../../os-win32/&quot;;../../pcre/;../../assembler/;../../wrec/;../../parser/;../../runtime/;../../VM/;../../bytecode/;../../interpreter/;../../wtf/;../../debugger/;../../bytecompiler/;../../profiler;&quot;$(WebKitLibrariesDir)\include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;../../../icu/include;&quot;$(WebKitLibrariesDir)\include&quot;;../../jit/"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\obj\JavaScriptCore\$(ConfigurationName)\DerivedSources\&quot;;../../;&quot;../../os-win32/&quot;;../../pcre/;../../assembler/;../../wrec/;../../parser/;../../runtime/;../../VM/;../../bytecode/;../../interpreter/;../../wtf/;../../debugger/;../../bytecompiler/;../../profiler;../../jit/;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"
PreprocessorDefinitions="__STD_C"
/>
<Tool
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops b/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops
index 7c6d126..161f571 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops
+++ b/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops
@@ -6,7 +6,7 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\..\API&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\nclude\private&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\..\API&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;"
WarningLevel="4"
Detect64BitPortabilityProblems="true"
/>
diff --git a/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
index e766243..58016d0 100644
--- a/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
+++ b/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
@@ -44,6 +44,7 @@
0B4D7E630F319AC800AD7E58 /* TypeTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B4D7E620F319AC800AD7E58 /* TypeTraits.h */; settings = {ATTRIBUTES = (Private, ); }; };
0BDFFAE00FC6192900D69EF4 /* CrossThreadRefCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BDFFAD40FC6171000D69EF4 /* CrossThreadRefCounted.h */; settings = {ATTRIBUTES = (Private, ); }; };
0BDFFAE10FC6193100D69EF4 /* OwnFastMallocPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BDFFAD10FC616EC00D69EF4 /* OwnFastMallocPtr.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 14035DB110DBFB2A00FFFFE7 /* WeakGCPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 14035DB010DBFB2A00FFFFE7 /* WeakGCPtr.h */; };
140566C4107EC255005DBC8D /* JSAPIValueWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC0894D50FAFBA2D00001865 /* JSAPIValueWrapper.cpp */; };
140566D1107EC267005DBC8D /* JSStaticScopeObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7E42C190E3938830065A544 /* JSStaticScopeObject.cpp */; };
140566D6107EC271005DBC8D /* JSFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F692A85E0255597D01FF60F7 /* JSFunction.cpp */; };
@@ -167,6 +168,7 @@
14BD59C50A3E8F9F00BAF59C /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 932F5BD90822A1C700736975 /* JavaScriptCore.framework */; };
14BD5A300A3E91F600BAF59C /* JSContextRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14BD5A290A3E91F600BAF59C /* JSContextRef.cpp */; };
14BD5A320A3E91F600BAF59C /* JSValueRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14BD5A2B0A3E91F600BAF59C /* JSValueRef.cpp */; };
+ 14BFCE6910CDB1FC00364CCE /* WeakGCMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 14BFCE6810CDB1FC00364CCE /* WeakGCMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
14C5242B0F5355E900BA3D04 /* JITStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = 14A6581A0F4E36F4000150FD /* JITStubs.h */; settings = {ATTRIBUTES = (Private, ); }; };
14E9D17B107EC469004DDA21 /* JSGlobalObjectFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC756FC60E2031B200DE7D12 /* JSGlobalObjectFunctions.cpp */; };
14F3488F0E95EF8A003648BC /* CollectorHeapIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 14F3488E0E95EF8A003648BC /* CollectorHeapIterator.h */; settings = {ATTRIBUTES = (); }; };
@@ -175,6 +177,8 @@
14F8BA4F107EC899009892DC /* Collector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F692A8520255597D01FF60F7 /* Collector.cpp */; };
180B9B080F16D94F009BDBC5 /* CurrentTime.h in Headers */ = {isa = PBXBuildFile; fileRef = 180B9AF00F16C569009BDBC5 /* CurrentTime.h */; settings = {ATTRIBUTES = (Private, ); }; };
180B9BFE0F16E94D009BDBC5 /* CurrentTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 180B9AEF0F16C569009BDBC5 /* CurrentTime.cpp */; };
+ 18BAB55310DAE054000D945B /* ThreadIdentifierDataPthreads.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18BAB52710DADFCD000D945B /* ThreadIdentifierDataPthreads.cpp */; };
+ 18BAB55410DAE066000D945B /* ThreadIdentifierDataPthreads.h in Headers */ = {isa = PBXBuildFile; fileRef = 18BAB52810DADFCD000D945B /* ThreadIdentifierDataPthreads.h */; };
1C61516C0EBAC7A00031376F /* ProfilerServer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C61516A0EBAC7A00031376F /* ProfilerServer.mm */; settings = {COMPILER_FLAGS = "-fno-strict-aliasing"; }; };
1C61516D0EBAC7A00031376F /* ProfilerServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C61516B0EBAC7A00031376F /* ProfilerServer.h */; };
41359CF30FDD89AD00206180 /* DateConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = D21202290AD4310C00ED79B6 /* DateConversion.h */; };
@@ -185,6 +189,7 @@
5D53726F0E1C54880021E549 /* Tracing.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D53726E0E1C54880021E549 /* Tracing.h */; };
5D5D8AB60E0D0A7200F9C692 /* jsc in Copy Into Framework */ = {isa = PBXBuildFile; fileRef = 932F5BE10822A1C700736975 /* jsc */; };
5D5D8AD10E0D0EBE00F9C692 /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D5D8AD00E0D0EBE00F9C692 /* libedit.dylib */; };
+ 5D63E9AD10F2BD6E00FC8AE9 /* StringHashFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D63E9AC10F2BD6E00FC8AE9 /* StringHashFunctions.h */; settings = {ATTRIBUTES = (Private, ); }; };
5D6A566B0F05995500266145 /* Threading.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D6A566A0F05995500266145 /* Threading.cpp */; };
5DE6E5B30E1728EC00180407 /* create_hash_table in Headers */ = {isa = PBXBuildFile; fileRef = F692A8540255597D01FF60F7 /* create_hash_table */; settings = {ATTRIBUTES = (); }; };
6507D29E0E871E5E00D7D896 /* JSTypeInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 6507D2970E871E4A00D7D896 /* JSTypeInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -202,8 +207,12 @@
860161E50F3A83C100F84710 /* MacroAssemblerX86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = 860161E10F3A83C100F84710 /* MacroAssemblerX86_64.h */; };
860161E60F3A83C100F84710 /* MacroAssemblerX86Common.h in Headers */ = {isa = PBXBuildFile; fileRef = 860161E20F3A83C100F84710 /* MacroAssemblerX86Common.h */; };
863B23E00FC6118900703AA4 /* MacroAssemblerCodeRef.h in Headers */ = {isa = PBXBuildFile; fileRef = 863B23DF0FC60E6200703AA4 /* MacroAssemblerCodeRef.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 865F408810E7D56300947361 /* APIShims.h in Headers */ = {isa = PBXBuildFile; fileRef = 865F408710E7D56300947361 /* APIShims.h */; };
869083150E6518D7000D36ED /* WREC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 869083130E6518D7000D36ED /* WREC.cpp */; };
869083160E6518D7000D36ED /* WREC.h in Headers */ = {isa = PBXBuildFile; fileRef = 869083140E6518D7000D36ED /* WREC.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 8698B86910D44D9400D8D01B /* StringBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 8698B86810D44D9400D8D01B /* StringBuilder.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 8698BB3910D86BAF00D8D01B /* UStringImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 8698BB3710D86BAF00D8D01B /* UStringImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 8698BB3A10D86BAF00D8D01B /* UStringImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8698BB3810D86BAF00D8D01B /* UStringImpl.cpp */; };
869EBCB70E8C6D4A008722CC /* ResultType.h in Headers */ = {isa = PBXBuildFile; fileRef = 869EBCB60E8C6D4A008722CC /* ResultType.h */; settings = {ATTRIBUTES = (Private, ); }; };
86A90ED00EE7D51F00AB350D /* JITArithmetic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86A90ECF0EE7D51F00AB350D /* JITArithmetic.cpp */; };
86ADD1450FDDEA980006EEC2 /* ARMv7Assembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86ADD1430FDDEA980006EEC2 /* ARMv7Assembler.h */; };
@@ -559,6 +568,7 @@
0B4D7E620F319AC800AD7E58 /* TypeTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypeTraits.h; sourceTree = "<group>"; };
0BDFFAD10FC616EC00D69EF4 /* OwnFastMallocPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OwnFastMallocPtr.h; sourceTree = "<group>"; };
0BDFFAD40FC6171000D69EF4 /* CrossThreadRefCounted.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrossThreadRefCounted.h; sourceTree = "<group>"; };
+ 14035DB010DBFB2A00FFFFE7 /* WeakGCPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakGCPtr.h; sourceTree = "<group>"; };
140D17D60E8AD4A9000CD17D /* JSBasePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSBasePrivate.h; sourceTree = "<group>"; };
141211020A48780900480255 /* minidom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = minidom.c; path = tests/minidom.c; sourceTree = "<group>"; };
1412110D0A48788700480255 /* minidom.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = minidom.js; path = tests/minidom.js; sourceTree = "<group>"; };
@@ -636,6 +646,7 @@
14BD5A2A0A3E91F600BAF59C /* JSContextRef.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSContextRef.h; sourceTree = "<group>"; };
14BD5A2B0A3E91F600BAF59C /* JSValueRef.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSValueRef.cpp; sourceTree = "<group>"; };
14BD5A2D0A3E91F600BAF59C /* testapi.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testapi.c; path = API/tests/testapi.c; sourceTree = "<group>"; };
+ 14BFCE6810CDB1FC00364CCE /* WeakGCMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakGCMap.h; sourceTree = "<group>"; };
14D792640DAA03FB001A9F05 /* RegisterFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterFile.h; sourceTree = "<group>"; };
14D857740A4696C80032146C /* testapi.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = testapi.js; path = API/tests/testapi.js; sourceTree = "<group>"; };
14DA818E0D99FD2000B0A4FB /* JSActivation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSActivation.h; sourceTree = "<group>"; };
@@ -645,6 +656,8 @@
14F3488E0E95EF8A003648BC /* CollectorHeapIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectorHeapIterator.h; sourceTree = "<group>"; };
180B9AEF0F16C569009BDBC5 /* CurrentTime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CurrentTime.cpp; sourceTree = "<group>"; };
180B9AF00F16C569009BDBC5 /* CurrentTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CurrentTime.h; sourceTree = "<group>"; };
+ 18BAB52710DADFCD000D945B /* ThreadIdentifierDataPthreads.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadIdentifierDataPthreads.cpp; sourceTree = "<group>"; };
+ 18BAB52810DADFCD000D945B /* ThreadIdentifierDataPthreads.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadIdentifierDataPthreads.h; sourceTree = "<group>"; };
1C61516A0EBAC7A00031376F /* ProfilerServer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ProfilerServer.mm; path = profiler/ProfilerServer.mm; sourceTree = "<group>"; };
1C61516B0EBAC7A00031376F /* ProfilerServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfilerServer.h; path = profiler/ProfilerServer.h; sourceTree = "<group>"; };
1C9051420BA9E8A70081E9D0 /* Version.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = "<group>"; };
@@ -667,6 +680,7 @@
5D53726E0E1C54880021E549 /* Tracing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tracing.h; sourceTree = "<group>"; };
5D53727D0E1C55EC0021E549 /* TracingDtrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TracingDtrace.h; sourceTree = "<group>"; };
5D5D8AD00E0D0EBE00F9C692 /* libedit.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libedit.dylib; path = /usr/lib/libedit.dylib; sourceTree = "<absolute>"; };
+ 5D63E9AC10F2BD6E00FC8AE9 /* StringHashFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringHashFunctions.h; sourceTree = "<group>"; };
5D6A566A0F05995500266145 /* Threading.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Threading.cpp; sourceTree = "<group>"; };
5DA479650CFBCF56009328A0 /* TCPackedCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TCPackedCache.h; sourceTree = "<group>"; };
5DBD18AF0C5401A700C15EAE /* MallocZoneSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MallocZoneSupport.h; sourceTree = "<group>"; };
@@ -726,8 +740,12 @@
860161E10F3A83C100F84710 /* MacroAssemblerX86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroAssemblerX86_64.h; sourceTree = "<group>"; };
860161E20F3A83C100F84710 /* MacroAssemblerX86Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroAssemblerX86Common.h; sourceTree = "<group>"; };
863B23DF0FC60E6200703AA4 /* MacroAssemblerCodeRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroAssemblerCodeRef.h; sourceTree = "<group>"; };
+ 865F408710E7D56300947361 /* APIShims.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIShims.h; sourceTree = "<group>"; };
869083130E6518D7000D36ED /* WREC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WREC.cpp; sourceTree = "<group>"; };
869083140E6518D7000D36ED /* WREC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WREC.h; sourceTree = "<group>"; };
+ 8698B86810D44D9400D8D01B /* StringBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringBuilder.h; sourceTree = "<group>"; };
+ 8698BB3710D86BAF00D8D01B /* UStringImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UStringImpl.h; sourceTree = "<group>"; };
+ 8698BB3810D86BAF00D8D01B /* UStringImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UStringImpl.cpp; sourceTree = "<group>"; };
869EBCB60E8C6D4A008722CC /* ResultType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResultType.h; sourceTree = "<group>"; };
86A90ECF0EE7D51F00AB350D /* JITArithmetic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITArithmetic.cpp; sourceTree = "<group>"; };
86ADD1430FDDEA980006EEC2 /* ARMv7Assembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMv7Assembler.h; sourceTree = "<group>"; };
@@ -1178,6 +1196,7 @@
isa = PBXGroup;
children = (
1482B78A0A4305AB00517CFC /* APICast.h */,
+ 865F408710E7D56300947361 /* APIShims.h */,
1CAA8B4A0D32C39A0041BCFF /* JavaScript.h */,
1CAA8B4B0D32C39A0041BCFF /* JavaScriptCore.h */,
BC0894D50FAFBA2D00001865 /* JSAPIValueWrapper.cpp */,
@@ -1350,11 +1369,14 @@
969A07290ED1CE6900F1F681 /* SegmentedVector.h */,
FE1B44790ECCD73B004F4DD1 /* StdLibExtras.h */,
E11D51750B2E798D0056C188 /* StringExtras.h */,
+ 5D63E9AC10F2BD6E00FC8AE9 /* StringHashFunctions.h */,
5DA479650CFBCF56009328A0 /* TCPackedCache.h */,
6541BD6E08E80A17002CBEE7 /* TCPageMap.h */,
6541BD6F08E80A17002CBEE7 /* TCSpinLock.h */,
6541BD7008E80A17002CBEE7 /* TCSystemAlloc.cpp */,
6541BD7108E80A17002CBEE7 /* TCSystemAlloc.h */,
+ 18BAB52710DADFCD000D945B /* ThreadIdentifierDataPthreads.cpp */,
+ 18BAB52810DADFCD000D945B /* ThreadIdentifierDataPthreads.h */,
5D6A566A0F05995500266145 /* Threading.cpp */,
E1EE79220D6C95CD00FEA3BA /* Threading.h */,
E1EE793C0D6C9B9200FEA3BA /* ThreadingPthreads.cpp */,
@@ -1392,10 +1414,10 @@
isa = PBXGroup;
children = (
969A07200ED1CE3300F1F681 /* BytecodeGenerator.cpp */,
- 655EB29A10CE2581001A990E /* NodesCodegen.cpp */,
969A07210ED1CE3300F1F681 /* BytecodeGenerator.h */,
969A07270ED1CE6900F1F681 /* Label.h */,
960097A50EBABB58007A7297 /* LabelScope.h */,
+ 655EB29A10CE2581001A990E /* NodesCodegen.cpp */,
969A07280ED1CE6900F1F681 /* RegisterID.h */,
);
path = bytecompiler;
@@ -1530,6 +1552,10 @@
14F252560D08DD8D004ECFFF /* JSVariableObject.h */,
65C7A1710A8EAACB00FA37EA /* JSWrapperObject.cpp */,
65C7A1720A8EAACB00FA37EA /* JSWrapperObject.h */,
+ A7C2216B10C7469C00F97913 /* JSZombie.cpp */,
+ A7C2216B10C7469C00F97913 /* JSZombie.cpp */,
+ A7C2216810C745E000F97913 /* JSZombie.h */,
+ A7C2216810C745E000F97913 /* JSZombie.h */,
A7E2EA6A0FB460CF00601F06 /* LiteralParser.cpp */,
A7E2EA690FB460CF00601F06 /* LiteralParser.h */,
F692A8680255597D01FF60F7 /* Lookup.cpp */,
@@ -1582,6 +1608,7 @@
7E2C6C980D31C6B6002D44E2 /* ScopeChainMark.h */,
93303FE80E6A72B500786E6A /* SmallStrings.cpp */,
93303FEA0E6A72C000786E6A /* SmallStrings.h */,
+ 8698B86810D44D9400D8D01B /* StringBuilder.h */,
BC18C3C00E16EE3300B34460 /* StringConstructor.cpp */,
BC18C3C10E16EE3300B34460 /* StringConstructor.h */,
BC18C3C20E16EE3300B34460 /* StringObject.cpp */,
@@ -1601,9 +1628,11 @@
5D53726E0E1C54880021E549 /* Tracing.h */,
F692A8850255597D01FF60F7 /* UString.cpp */,
F692A8860255597D01FF60F7 /* UString.h */,
+ 8698BB3810D86BAF00D8D01B /* UStringImpl.cpp */,
+ 8698BB3710D86BAF00D8D01B /* UStringImpl.h */,
+ 14BFCE6810CDB1FC00364CCE /* WeakGCMap.h */,
+ 14035DB010DBFB2A00FFFFE7 /* WeakGCPtr.h */,
1420BE7A10AA6DDB00F455D2 /* WeakRandom.h */,
- A7C2216810C745E000F97913 /* JSZombie.h */,
- A7C2216B10C7469C00F97913 /* JSZombie.cpp */,
);
path = runtime;
sourceTree = "<group>";
@@ -1760,6 +1789,7 @@
860161E30F3A83C100F84710 /* AbstractMacroAssembler.h in Headers */,
BC18C3E40E16F5CD00B34460 /* AlwaysInline.h in Headers */,
BC18C3E50E16F5CD00B34460 /* APICast.h in Headers */,
+ 865F408810E7D56300947361 /* APIShims.h in Headers */,
BCF605140E203EF800B9A64D /* ArgList.h in Headers */,
BC257DE80E1F51C50016B6C9 /* Arguments.h in Headers */,
86D3B2C410156BDE002865E7 /* ARMAssembler.h in Headers */,
@@ -1797,6 +1827,7 @@
BCD2034A0E17135E002C7E82 /* DateConstructor.h in Headers */,
41359CF30FDD89AD00206180 /* DateConversion.h in Headers */,
BC1166020E1997B4008066DD /* DateInstance.h in Headers */,
+ 14A1563210966365006FA260 /* DateInstanceCache.h in Headers */,
41359CF70FDD89CB00206180 /* DateMath.h in Headers */,
BCD2034C0E17135E002C7E82 /* DatePrototype.h in Headers */,
BCD203E80E1718F4002C7E82 /* DatePrototype.lut.h in Headers */,
@@ -1813,6 +1844,7 @@
96A746410EDDF70600904779 /* Escapes.h in Headers */,
969A07980ED1D3AE00F1F681 /* EvalCodeCache.h in Headers */,
BC18C4000E16F5CD00B34460 /* ExceptionHelpers.h in Headers */,
+ 86CAFEE31035DDE60028A609 /* Executable.h in Headers */,
A766B44F0EE8DCD1009518CA /* ExecutableAllocator.h in Headers */,
E48E0F2D0F82151700A8CA37 /* FastAllocBase.h in Headers */,
BC18C4020E16F5CD00B34460 /* FastMalloc.h in Headers */,
@@ -1855,6 +1887,7 @@
BC1167DA0E19BCC9008066DD /* JSCell.h in Headers */,
BC18C41D0E16F5CD00B34460 /* JSClassRef.h in Headers */,
BC18C41E0E16F5CD00B34460 /* JSContextRef.h in Headers */,
+ 148CD1D8108CF902008163C6 /* JSContextRefPrivate.h in Headers */,
BC18C41F0E16F5CD00B34460 /* JSFunction.h in Headers */,
BC18C4200E16F5CD00B34460 /* JSGlobalData.h in Headers */,
BC18C4210E16F5CD00B34460 /* JSGlobalObject.h in Headers */,
@@ -1865,12 +1898,14 @@
BC18C4240E16F5CD00B34460 /* JSObject.h in Headers */,
BC18C4250E16F5CD00B34460 /* JSObjectRef.h in Headers */,
A7F9935F0FD7325100A0B2D0 /* JSONObject.h in Headers */,
+ BC87CDB910712AD4000614CF /* JSONObject.lut.h in Headers */,
9534AAFB0E5B7A9600B8A45B /* JSProfilerPrivate.h in Headers */,
BC18C4260E16F5CD00B34460 /* JSRetainPtr.h in Headers */,
BC18C4270E16F5CD00B34460 /* JSString.h in Headers */,
BC18C4280E16F5CD00B34460 /* JSStringRef.h in Headers */,
BC18C4290E16F5CD00B34460 /* JSStringRefCF.h in Headers */,
BC18C42A0E16F5CD00B34460 /* JSType.h in Headers */,
+ 6507D29E0E871E5E00D7D896 /* JSTypeInfo.h in Headers */,
BC18C42B0E16F5CD00B34460 /* JSValue.h in Headers */,
BC18C42C0E16F5CD00B34460 /* JSValueRef.h in Headers */,
BC18C42D0E16F5CD00B34460 /* JSVariableObject.h in Headers */,
@@ -1895,6 +1930,7 @@
860161E60F3A83C100F84710 /* MacroAssemblerX86Common.h in Headers */,
BC18C4390E16F5CD00B34460 /* MainThread.h in Headers */,
BC18C43A0E16F5CD00B34460 /* MallocZoneSupport.h in Headers */,
+ A7795590101A74D500114E55 /* MarkStack.h in Headers */,
BC18C43B0E16F5CD00B34460 /* MathExtras.h in Headers */,
BC18C43C0E16F5CD00B34460 /* MathObject.h in Headers */,
BC18C52A0E16FCC200B34460 /* MathObject.lut.h in Headers */,
@@ -1910,6 +1946,7 @@
BC18C4420E16F5CD00B34460 /* NumberConstructor.lut.h in Headers */,
BC18C4430E16F5CD00B34460 /* NumberObject.h in Headers */,
BC18C4440E16F5CD00B34460 /* NumberPrototype.h in Headers */,
+ 142D3939103E4560007DCB52 /* NumericStrings.h in Headers */,
BC18C4450E16F5CD00B34460 /* ObjectConstructor.h in Headers */,
BC18C4460E16F5CD00B34460 /* ObjectPrototype.h in Headers */,
E124A8F70E555775003091F1 /* OpaqueJSString.h in Headers */,
@@ -1926,11 +1963,13 @@
BC18C44D0E16F5CD00B34460 /* pcre.h in Headers */,
BC18C44E0E16F5CD00B34460 /* pcre_internal.h in Headers */,
BC18C44F0E16F5CD00B34460 /* Platform.h in Headers */,
+ A7D649AA1015224E009B2E1B /* PossiblyNull.h in Headers */,
BC18C4500E16F5CD00B34460 /* Profile.h in Headers */,
95CD45770E1C4FDD0085358E /* ProfileGenerator.h in Headers */,
BC18C4510E16F5CD00B34460 /* ProfileNode.h in Headers */,
BC18C4520E16F5CD00B34460 /* Profiler.h in Headers */,
1C61516D0EBAC7A00031376F /* ProfilerServer.h in Headers */,
+ A7FB61001040C38B0017A286 /* PropertyDescriptor.h in Headers */,
BC95437D0EBA70FD0072B6D3 /* PropertyMapHashTable.h in Headers */,
BC18C4540E16F5CD00B34460 /* PropertyNameArray.h in Headers */,
BC18C4550E16F5CD00B34460 /* PropertySlot.h in Headers */,
@@ -1969,8 +2008,10 @@
BC18C4640E16F5CD00B34460 /* SourceCode.h in Headers */,
BC18C4630E16F5CD00B34460 /* SourceProvider.h in Headers */,
FE1B447A0ECCD73B004F4DD1 /* StdLibExtras.h in Headers */,
+ 8698B86910D44D9400D8D01B /* StringBuilder.h in Headers */,
BC18C4660E16F5CD00B34460 /* StringConstructor.h in Headers */,
BC18C4670E16F5CD00B34460 /* StringExtras.h in Headers */,
+ 5D63E9AD10F2BD6E00FC8AE9 /* StringHashFunctions.h in Headers */,
BC18C4680E16F5CD00B34460 /* StringObject.h in Headers */,
BC18C4690E16F5CD00B34460 /* StringObjectThatMasqueradesAsUndefined.h in Headers */,
BC18C46A0E16F5CD00B34460 /* StringPrototype.h in Headers */,
@@ -1984,36 +2025,31 @@
BC18C46D0E16F5CD00B34460 /* TCPageMap.h in Headers */,
BC18C46E0E16F5CD00B34460 /* TCSpinLock.h in Headers */,
BC18C46F0E16F5CD00B34460 /* TCSystemAlloc.h in Headers */,
+ 18BAB55410DAE066000D945B /* ThreadIdentifierDataPthreads.h in Headers */,
BC18C4700E16F5CD00B34460 /* Threading.h in Headers */,
BC18C4710E16F5CD00B34460 /* ThreadSpecific.h in Headers */,
14A42E400F4F60EE00599099 /* TimeoutChecker.h in Headers */,
5D53726F0E1C54880021E549 /* Tracing.h in Headers */,
- 6507D29E0E871E5E00D7D896 /* JSTypeInfo.h in Headers */,
0B4D7E630F319AC800AD7E58 /* TypeTraits.h in Headers */,
BC18C4720E16F5CD00B34460 /* ucpinternal.h in Headers */,
BC18C4730E16F5CD00B34460 /* Unicode.h in Headers */,
BC18C4740E16F5CD00B34460 /* UnicodeIcu.h in Headers */,
BC18C4750E16F5CD00B34460 /* UnusedParam.h in Headers */,
BC18C4760E16F5CD00B34460 /* UString.h in Headers */,
+ 8698BB3910D86BAF00D8D01B /* UStringImpl.h in Headers */,
BC18C4770E16F5CD00B34460 /* UTF8.h in Headers */,
BC18C4780E16F5CD00B34460 /* Vector.h in Headers */,
BC18C4790E16F5CD00B34460 /* VectorTraits.h in Headers */,
96DD73790F9DA3100027FBCC /* VMTags.h in Headers */,
+ 14BFCE6910CDB1FC00364CCE /* WeakGCMap.h in Headers */,
+ 14035DB110DBFB2A00FFFFE7 /* WeakGCPtr.h in Headers */,
+ 1420BE7B10AA6DDB00F455D2 /* WeakRandom.h in Headers */,
BC18C47A0E16F5CD00B34460 /* WebKitAvailability.h in Headers */,
869083160E6518D7000D36ED /* WREC.h in Headers */,
1429DA830ED2482900B89619 /* WRECFunctors.h in Headers */,
1429DAE00ED2645B00B89619 /* WRECGenerator.h in Headers */,
1429DABF0ED263E700B89619 /* WRECParser.h in Headers */,
9688CB160ED12B4E001D649F /* X86Assembler.h in Headers */,
- A7795590101A74D500114E55 /* MarkStack.h in Headers */,
- A7D649AA1015224E009B2E1B /* PossiblyNull.h in Headers */,
- 86CAFEE31035DDE60028A609 /* Executable.h in Headers */,
- 142D3939103E4560007DCB52 /* NumericStrings.h in Headers */,
- A7FB61001040C38B0017A286 /* PropertyDescriptor.h in Headers */,
- BC87CDB910712AD4000614CF /* JSONObject.lut.h in Headers */,
- 148CD1D8108CF902008163C6 /* JSContextRefPrivate.h in Headers */,
- 14A1563210966365006FA260 /* DateInstanceCache.h in Headers */,
- 1420BE7B10AA6DDB00F455D2 /* WeakRandom.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2390,6 +2426,7 @@
14BD5A320A3E91F600BAF59C /* JSValueRef.cpp in Sources */,
147F39D7107EC37600427A48 /* JSVariableObject.cpp in Sources */,
14280870107EC1340013E7B2 /* JSWrapperObject.cpp in Sources */,
+ A7C2217810C7479400F97913 /* JSZombie.cpp in Sources */,
BCFD8C920EEB2EE700283848 /* JumpTable.cpp in Sources */,
148F21B0107EC5410042EC2C /* Lexer.cpp in Sources */,
A7E2EA6C0FB460CF00601F06 /* LiteralParser.cpp in Sources */,
@@ -2402,6 +2439,7 @@
14469DE0107EC7E700650446 /* NativeErrorConstructor.cpp in Sources */,
14469DE1107EC7E700650446 /* NativeErrorPrototype.cpp in Sources */,
148F21B7107EC5470042EC2C /* Nodes.cpp in Sources */,
+ 655EB29B10CE2581001A990E /* NodesCodegen.cpp in Sources */,
14469DE2107EC7E700650446 /* NumberConstructor.cpp in Sources */,
14469DE3107EC7E700650446 /* NumberObject.cpp in Sources */,
14469DE4107EC7E700650446 /* NumberPrototype.cpp in Sources */,
@@ -2446,18 +2484,18 @@
7E4EE70F0EBB7A5B005934AA /* StructureChain.cpp in Sources */,
BCCF0D0C0EF0B8A500413C8F /* StructureStubInfo.cpp in Sources */,
14F8BA43107EC88C009892DC /* TCSystemAlloc.cpp in Sources */,
+ 18BAB55310DAE054000D945B /* ThreadIdentifierDataPthreads.cpp in Sources */,
5D6A566B0F05995500266145 /* Threading.cpp in Sources */,
E1EE793D0D6C9B9200FEA3BA /* ThreadingPthreads.cpp in Sources */,
14A42E3F0F4F60EE00599099 /* TimeoutChecker.cpp in Sources */,
0B330C270F38C62300692DE3 /* TypeTraits.cpp in Sources */,
14469DEE107EC7E700650446 /* UString.cpp in Sources */,
+ 8698BB3A10D86BAF00D8D01B /* UStringImpl.cpp in Sources */,
E1EF79AA0CE97BA60088D500 /* UTF8.cpp in Sources */,
869083150E6518D7000D36ED /* WREC.cpp in Sources */,
1429DA820ED2482900B89619 /* WRECFunctors.cpp in Sources */,
1429DAE10ED2645B00B89619 /* WRECGenerator.cpp in Sources */,
1429DAC00ED263E700B89619 /* WRECParser.cpp in Sources */,
- A7C2217810C7479400F97913 /* JSZombie.cpp in Sources */,
- 655EB29B10CE2581001A990E /* NodesCodegen.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2556,10 +2594,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 1C9051430BA9E8A70081E9D0 /* JavaScriptCore.xcconfig */;
buildSettings = {
- BUILD_VARIANTS = (
- normal,
- debug,
- );
+ BUILD_VARIANTS = normal;
};
name = Production;
};
diff --git a/JavaScriptCore/JavaScriptCoreSources.bkl b/JavaScriptCore/JavaScriptCoreSources.bkl
index 1f36c1c..e69de29 100644
--- a/JavaScriptCore/JavaScriptCoreSources.bkl
+++ b/JavaScriptCore/JavaScriptCoreSources.bkl
@@ -1,193 +0,0 @@
-<?xml version="1.0" ?>
-<!--
-Copyright (C) 2006, 2007 Kevin Ollivier. 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.
-
-Source files for JSCore.
--->
-<makefile>
- <set append="1" var="JSCORE_API_SOURCES">
- API/JSBase.cpp
- API/JSCallbackConstructor.cpp
- API/JSCallbackFunction.cpp
- API/JSCallbackObject.cpp
- API/JSClassRef.cpp
- API/JSContextRef.cpp
- API/JSObjectRef.cpp
- API/JSStringRef.cpp
- API/JSValueRef.cpp
- API/OpaqueJSString.cpp
- </set>
- <set append="1" var="JSCORE_BYTECOMPILER_SOURCES">
- bytecompiler/BytecodeGenerator.cpp
- bytecompiler/NodesCodegen.cpp
- </set>
- <set append="1" var="JSCORE_DEBUGGER_SOURCES">
- debugger/Debugger.cpp
- debugger/DebuggerActivation.cpp
- debugger/DebuggerCallFrame.cpp
- </set>
- <set append="1" var="JSCORE_JSC_SOURCES">
- DerivedSources/JavaScriptCore/Grammar.cpp
- wtf/dtoa.cpp
- </set>
- <set append="1" var="JSCORE_PCRE_SOURCES">
- pcre/pcre_compile.cpp
- pcre/pcre_exec.cpp
- pcre/pcre_tables.cpp
- pcre/pcre_ucp_searchfuncs.cpp
- pcre/pcre_xclass.cpp
- </set>
- <set append="1" var="JSCORE_PARSER_SOURCES">
- parser/Lexer.cpp
- parser/Nodes.cpp
- parser/Parser.cpp
- parser/ParserArena.cpp
- </set>
- <set append="1" var="JSCORE_PROFILER_SOURCES">
- profiler/HeavyProfile.cpp
- profiler/ProfileGenerator.cpp
- profiler/ProfileNode.cpp
- profiler/Profile.cpp
- profiler/Profiler.cpp
- profiler/TreeProfile.cpp
- </set>
- <set append="1" var="JSCORE_RUNTIME_SOURCES">
- runtime/ArgList.cpp
- runtime/Arguments.cpp
- runtime/ArrayConstructor.cpp
- runtime/ArrayPrototype.cpp
- runtime/BooleanConstructor.cpp
- runtime/BooleanObject.cpp
- runtime/BooleanPrototype.cpp
- runtime/CallData.cpp
- runtime/Collector.cpp
- runtime/CommonIdentifiers.cpp
- runtime/ConstructData.cpp
- runtime/DateConstructor.cpp
- runtime/DateConversion.cpp
- runtime/DateInstance.cpp
- wtf/DateMath.cpp
- runtime/DatePrototype.cpp
- runtime/Error.cpp
- runtime/ErrorConstructor.cpp
- runtime/ErrorInstance.cpp
- runtime/ErrorPrototype.cpp
- interpreter/CallFrame.cpp
- runtime/FunctionConstructor.cpp
- runtime/FunctionPrototype.cpp
- runtime/GetterSetter.cpp
- runtime/GlobalEvalFunction.cpp
- runtime/Identifier.cpp
- runtime/InitializeThreading.cpp
- runtime/InternalFunction.cpp
- runtime/Completion.cpp
- runtime/JSActivation.cpp
- runtime/JSArray.cpp
- runtime/JSByteArray.cpp
- runtime/JSCell.cpp
- runtime/JSFunction.cpp
- runtime/JSGlobalData.cpp
- runtime/JSGlobalObject.cpp
- runtime/JSGlobalObjectFunctions.cpp
- runtime/JSImmediate.cpp
- runtime/JSLock.cpp
- runtime/JSNotAnObject.cpp
- runtime/JSNumberCell.cpp
- runtime/JSObject.cpp
- runtime/JSONObject.cpp
- runtime/JSPropertyNameIterator.cpp
- runtime/JSStaticScopeObject.cpp
- runtime/JSString.cpp
- runtime/JSValue.cpp
- runtime/JSVariableObject.cpp
- runtime/JSWrapperObject.cpp
- runtime/LiteralParser.cpp
- runtime/Lookup.cpp
- runtime/MathObject.cpp
- runtime/NativeErrorConstructor.cpp
- runtime/NativeErrorPrototype.cpp
- runtime/NumberConstructor.cpp
- runtime/NumberObject.cpp
- runtime/NumberPrototype.cpp
- runtime/ObjectConstructor.cpp
- runtime/ObjectPrototype.cpp
- runtime/Operations.cpp
- runtime/PropertyDescriptor.cpp
- runtime/PropertyNameArray.cpp
- runtime/PropertySlot.cpp
- runtime/PrototypeFunction.cpp
- runtime/RegExp.cpp
- runtime/RegExpConstructor.cpp
- runtime/RegExpObject.cpp
- runtime/RegExpPrototype.cpp
- runtime/ScopeChain.cpp
- runtime/SmallStrings.cpp
- runtime/StringConstructor.cpp
- runtime/StringObject.cpp
- runtime/StringPrototype.cpp
- runtime/Structure.cpp
- runtime/StructureChain.cpp
- runtime/UString.cpp
- </set>
- <set append="1" var="JSCORE_VM_SOURCES">
- bytecode/CodeBlock.cpp
- bytecode/StructureStubInfo.cpp
- bytecode/JumpTable.cpp
- runtime/ExceptionHelpers.cpp
- runtime/TimeoutChecker.cpp
- interpreter/Interpreter.cpp
- bytecode/Opcode.cpp
- bytecode/SamplingTool.cpp
- interpreter/RegisterFile.cpp
- jit/ExecutableAllocator.cpp
- </set>
- <set append="1" var="JSCORE_VM_SOURCES_WIN">
- jit/ExecutableAllocatorWin.cpp
- </set>
- <set append="1" var="JSCORE_VM_SOURCES_POSIX">
- jit/ExecutableAllocatorPosix.cpp
- </set>
- <set append="1" var="JSCORE_WTF_SOURCES">
- wtf/Assertions.cpp
- wtf/ByteArray.cpp
- wtf/CurrentTime.cpp
- wtf/FastMalloc.cpp
- wtf/HashTable.cpp
- wtf/MainThread.cpp
- wtf/RandomNumber.cpp
- wtf/RefCountedLeakCounter.cpp
- wtf/TCSystemAlloc.cpp
- wtf/Threading.cpp
- wtf/ThreadingNone.cpp
- wtf/TypeTraits.cpp
- wtf/wx/MainThreadWx.cpp
- wtf/unicode/CollatorDefault.cpp
- wtf/unicode/icu/CollatorICU.cpp
- wtf/unicode/UTF8.cpp
- </set>
-
-</makefile>
diff --git a/JavaScriptCore/assembler/ARMAssembler.cpp b/JavaScriptCore/assembler/ARMAssembler.cpp
index 81c3222..6dd2b87 100644
--- a/JavaScriptCore/assembler/ARMAssembler.cpp
+++ b/JavaScriptCore/assembler/ARMAssembler.cpp
@@ -26,7 +26,7 @@
#include "config.h"
-#if ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
+#if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
#include "ARMAssembler.h"
@@ -34,39 +34,6 @@ namespace JSC {
// Patching helpers
-ARMWord* ARMAssembler::getLdrImmAddress(ARMWord* insn, uint32_t* constPool)
-{
- // Must be an ldr ..., [pc +/- imm]
- ASSERT((*insn & 0x0f7f0000) == 0x051f0000);
-
- if (constPool && (*insn & 0x1))
- return reinterpret_cast<ARMWord*>(constPool + ((*insn & SDT_OFFSET_MASK) >> 1));
-
- ARMWord addr = reinterpret_cast<ARMWord>(insn) + 2 * sizeof(ARMWord);
- if (*insn & DT_UP)
- return reinterpret_cast<ARMWord*>(addr + (*insn & SDT_OFFSET_MASK));
- else
- return reinterpret_cast<ARMWord*>(addr - (*insn & SDT_OFFSET_MASK));
-}
-
-void ARMAssembler::linkBranch(void* code, JmpSrc from, void* to, int useConstantPool)
-{
- ARMWord* insn = reinterpret_cast<ARMWord*>(code) + (from.m_offset / sizeof(ARMWord));
-
- if (!useConstantPool) {
- int diff = reinterpret_cast<ARMWord*>(to) - reinterpret_cast<ARMWord*>(insn + 2);
-
- if ((diff <= BOFFSET_MAX && diff >= BOFFSET_MIN)) {
- *insn = B | getConditionalField(*insn) | (diff & BRANCH_MASK);
- ExecutableAllocator::cacheFlush(insn, sizeof(ARMWord));
- return;
- }
- }
- ARMWord* addr = getLdrImmAddress(insn);
- *addr = reinterpret_cast<ARMWord>(to);
- ExecutableAllocator::cacheFlush(addr, sizeof(ARMWord));
-}
-
void ARMAssembler::patchConstantPoolLoad(void* loadAddr, void* constPoolAddr)
{
ARMWord *ldr = reinterpret_cast<ARMWord*>(loadAddr);
@@ -272,10 +239,8 @@ void ARMAssembler::moveImm(ARMWord imm, int dest)
ARMWord ARMAssembler::encodeComplexImm(ARMWord imm, int dest)
{
- ARMWord tmp;
-
-#if ARM_ARCH_VERSION >= 7
- tmp = getImm16Op2(imm);
+#if WTF_ARM_ARCH_AT_LEAST(7)
+ ARMWord tmp = getImm16Op2(imm);
if (tmp != INVALID_IMM) {
movw_r(dest, tmp);
return dest;
@@ -390,10 +355,17 @@ void* ARMAssembler::executableCopy(ExecutablePool* allocator)
// The last bit is set if the constant must be placed on constant pool.
int pos = (*iter) & (~0x1);
ARMWord* ldrAddr = reinterpret_cast<ARMWord*>(data + pos);
- ARMWord offset = *getLdrImmAddress(ldrAddr);
- if (offset != 0xffffffff) {
- JmpSrc jmpSrc(pos);
- linkBranch(data, jmpSrc, data + offset, ((*iter) & 1));
+ ARMWord* addr = getLdrImmAddress(ldrAddr);
+ if (*addr != 0xffffffff) {
+ if (!(*iter & 1)) {
+ int diff = reinterpret_cast<ARMWord*>(data + *addr) - (ldrAddr + DefaultPrefetching);
+
+ if ((diff <= BOFFSET_MAX && diff >= BOFFSET_MIN)) {
+ *ldrAddr = B | getConditionalField(*ldrAddr) | (diff & BRANCH_MASK);
+ continue;
+ }
+ }
+ *addr = reinterpret_cast<ARMWord>(data + *addr);
}
}
@@ -402,4 +374,4 @@ void* ARMAssembler::executableCopy(ExecutablePool* allocator)
} // namespace JSC
-#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
+#endif // ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
diff --git a/JavaScriptCore/assembler/ARMAssembler.h b/JavaScriptCore/assembler/ARMAssembler.h
index 712473e..6967b37 100644
--- a/JavaScriptCore/assembler/ARMAssembler.h
+++ b/JavaScriptCore/assembler/ARMAssembler.h
@@ -29,7 +29,7 @@
#include <wtf/Platform.h>
-#if ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
+#if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
#include "AssemblerBufferWithConstantPool.h"
#include <wtf/Assertions.h>
@@ -138,11 +138,11 @@ namespace JSC {
FSITOD = 0x0eb80bc0,
FTOSID = 0x0ebd0b40,
FMSTAT = 0x0ef1fa10,
-#if ARM_ARCH_VERSION >= 5
+#if WTF_ARM_ARCH_AT_LEAST(5)
CLZ = 0x016f0f10,
BKPT = 0xe120070,
#endif
-#if ARM_ARCH_VERSION >= 7
+#if WTF_ARM_ARCH_AT_LEAST(7)
MOVW = 0x03000000,
MOVT = 0x03400000,
#endif
@@ -183,6 +183,7 @@ namespace JSC {
};
static const ARMWord INVALID_IMM = 0xf0000000;
+ static const int DefaultPrefetching = 2;
class JmpSrc {
friend class ARMAssembler;
@@ -342,7 +343,7 @@ namespace JSC {
emitInst(static_cast<ARMWord>(cc) | MOV, rd, ARMRegisters::r0, op2);
}
-#if ARM_ARCH_VERSION >= 7
+#if WTF_ARM_ARCH_AT_LEAST(7)
void movw_r(int rd, ARMWord op2, Condition cc = AL)
{
ASSERT((op2 | 0xf0fff) == 0xf0fff);
@@ -530,7 +531,7 @@ namespace JSC {
m_buffer.putInt(static_cast<ARMWord>(cc) | FMSTAT);
}
-#if ARM_ARCH_VERSION >= 5
+#if WTF_ARM_ARCH_AT_LEAST(5)
void clz_r(int rd, int rm, Condition cc = AL)
{
m_buffer.putInt(static_cast<ARMWord>(cc) | CLZ | RD(rd) | RM(rm));
@@ -539,7 +540,7 @@ namespace JSC {
void bkpt(ARMWord value)
{
-#if ARM_ARCH_VERSION >= 5
+#if WTF_ARM_ARCH_AT_LEAST(5)
m_buffer.putInt(BKPT | ((value & 0xff0) << 4) | (value & 0xf));
#else
// Cannot access to Zero memory address
@@ -632,15 +633,32 @@ namespace JSC {
// Patching helpers
- static ARMWord* getLdrImmAddress(ARMWord* insn, uint32_t* constPool = 0);
- static void linkBranch(void* code, JmpSrc from, void* to, int useConstantPool = 0);
+ static ARMWord* getLdrImmAddress(ARMWord* insn)
+ {
+ // Must be an ldr ..., [pc +/- imm]
+ ASSERT((*insn & 0x0f7f0000) == 0x051f0000);
+
+ ARMWord addr = reinterpret_cast<ARMWord>(insn) + DefaultPrefetching * sizeof(ARMWord);
+ if (*insn & DT_UP)
+ return reinterpret_cast<ARMWord*>(addr + (*insn & SDT_OFFSET_MASK));
+ return reinterpret_cast<ARMWord*>(addr - (*insn & SDT_OFFSET_MASK));
+ }
+
+ static ARMWord* getLdrImmAddressOnPool(ARMWord* insn, uint32_t* constPool)
+ {
+ // Must be an ldr ..., [pc +/- imm]
+ ASSERT((*insn & 0x0f7f0000) == 0x051f0000);
+
+ if (*insn & 0x1)
+ return reinterpret_cast<ARMWord*>(constPool + ((*insn & SDT_OFFSET_MASK) >> 1));
+ return getLdrImmAddress(insn);
+ }
static void patchPointerInternal(intptr_t from, void* to)
{
ARMWord* insn = reinterpret_cast<ARMWord*>(from);
ARMWord* addr = getLdrImmAddress(insn);
*addr = reinterpret_cast<ARMWord>(to);
- ExecutableAllocator::cacheFlush(addr, sizeof(ARMWord));
}
static ARMWord patchConstantPoolLoad(ARMWord load, ARMWord value)
@@ -685,12 +703,13 @@ namespace JSC {
void linkJump(JmpSrc from, JmpDst to)
{
ARMWord* insn = reinterpret_cast<ARMWord*>(m_buffer.data()) + (from.m_offset / sizeof(ARMWord));
- *getLdrImmAddress(insn, m_buffer.poolAddress()) = static_cast<ARMWord>(to.m_offset);
+ ARMWord* addr = getLdrImmAddressOnPool(insn, m_buffer.poolAddress());
+ *addr = static_cast<ARMWord>(to.m_offset);
}
static void linkJump(void* code, JmpSrc from, void* to)
{
- linkBranch(code, from, to);
+ patchPointerInternal(reinterpret_cast<intptr_t>(code) + from.m_offset, to);
}
static void relinkJump(void* from, void* to)
@@ -700,12 +719,12 @@ namespace JSC {
static void linkCall(void* code, JmpSrc from, void* to)
{
- linkBranch(code, from, to, true);
+ patchPointerInternal(reinterpret_cast<intptr_t>(code) + from.m_offset, to);
}
static void relinkCall(void* from, void* to)
{
- relinkJump(from, to);
+ patchPointerInternal(reinterpret_cast<intptr_t>(from) - sizeof(ARMWord), to);
}
// Address operations
@@ -747,7 +766,7 @@ namespace JSC {
static ARMWord getOp2(ARMWord imm);
-#if ARM_ARCH_VERSION >= 7
+#if WTF_ARM_ARCH_AT_LEAST(7)
static ARMWord getImm16Op2(ARMWord imm)
{
if (imm <= 0xffff)
@@ -812,6 +831,6 @@ namespace JSC {
} // namespace JSC
-#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
+#endif // ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
#endif // ARMAssembler_h
diff --git a/JavaScriptCore/assembler/ARMv7Assembler.h b/JavaScriptCore/assembler/ARMv7Assembler.h
index e253a53..4e394b2 100644
--- a/JavaScriptCore/assembler/ARMv7Assembler.h
+++ b/JavaScriptCore/assembler/ARMv7Assembler.h
@@ -28,7 +28,7 @@
#include <wtf/Platform.h>
-#if ENABLE(ASSEMBLER) && PLATFORM(ARM_THUMB2)
+#if ENABLE(ASSEMBLER) && CPU(ARM_THUMB2)
#include "AssemblerBuffer.h"
#include <wtf/Assertions.h>
@@ -201,10 +201,10 @@ class ARMThumbImmediate {
ALWAYS_INLINE static void countLeadingZerosPartial(uint32_t& value, int32_t& zeros, const int N)
{
- if (value & ~((1<<N)-1)) /* check for any of the top N bits (of 2N bits) are set */ \
- value >>= N; /* if any were set, lose the bottom N */ \
- else /* if none of the top N bits are set, */ \
- zeros += N; /* then we have identified N leading zeros */
+ if (value & ~((1 << N) - 1)) /* check for any of the top N bits (of 2N bits) are set */
+ value >>= N; /* if any were set, lose the bottom N */
+ else /* if none of the top N bits are set, */
+ zeros += N; /* then we have identified N leading zeros */
}
static int32_t countLeadingZeros(uint32_t value)
@@ -1832,6 +1832,6 @@ private:
} // namespace JSC
-#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_THUMB2)
+#endif // ENABLE(ASSEMBLER) && CPU(ARM_THUMB2)
#endif // ARMAssembler_h
diff --git a/JavaScriptCore/assembler/AbstractMacroAssembler.h b/JavaScriptCore/assembler/AbstractMacroAssembler.h
index 525fe98..198e8d1 100644
--- a/JavaScriptCore/assembler/AbstractMacroAssembler.h
+++ b/JavaScriptCore/assembler/AbstractMacroAssembler.h
@@ -173,16 +173,16 @@ public:
struct Imm32 {
explicit Imm32(int32_t value)
: m_value(value)
-#if PLATFORM(ARM)
+#if CPU(ARM)
, m_isPointer(false)
#endif
{
}
-#if !PLATFORM(X86_64)
+#if !CPU(X86_64)
explicit Imm32(ImmPtr ptr)
: m_value(ptr.asIntptr())
-#if PLATFORM(ARM)
+#if CPU(ARM)
, m_isPointer(true)
#endif
{
@@ -190,7 +190,7 @@ public:
#endif
int32_t m_value;
-#if PLATFORM(ARM)
+#if CPU(ARM)
// We rely on being able to regenerate code to recover exception handling
// information. Since ARMv7 supports 16-bit immediates there is a danger
// that if pointer values change the layout of the generated code will change.
diff --git a/JavaScriptCore/assembler/MacroAssembler.h b/JavaScriptCore/assembler/MacroAssembler.h
index 858707d..76bd205 100644
--- a/JavaScriptCore/assembler/MacroAssembler.h
+++ b/JavaScriptCore/assembler/MacroAssembler.h
@@ -30,19 +30,19 @@
#if ENABLE(ASSEMBLER)
-#if PLATFORM(ARM_THUMB2)
+#if CPU(ARM_THUMB2)
#include "MacroAssemblerARMv7.h"
namespace JSC { typedef MacroAssemblerARMv7 MacroAssemblerBase; };
-#elif PLATFORM(ARM_TRADITIONAL)
+#elif CPU(ARM_TRADITIONAL)
#include "MacroAssemblerARM.h"
namespace JSC { typedef MacroAssemblerARM MacroAssemblerBase; };
-#elif PLATFORM(X86)
+#elif CPU(X86)
#include "MacroAssemblerX86.h"
namespace JSC { typedef MacroAssemblerX86 MacroAssemblerBase; };
-#elif PLATFORM(X86_64)
+#elif CPU(X86_64)
#include "MacroAssemblerX86_64.h"
namespace JSC { typedef MacroAssemblerX86_64 MacroAssemblerBase; };
@@ -60,7 +60,7 @@ public:
using MacroAssemblerBase::jump;
using MacroAssemblerBase::branch32;
using MacroAssemblerBase::branch16;
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
using MacroAssemblerBase::branchPtr;
using MacroAssemblerBase::branchTestPtr;
#endif
@@ -133,7 +133,8 @@ public:
// Ptr methods
// On 32-bit platforms (i.e. x86), these methods directly map onto their 32-bit equivalents.
-#if !PLATFORM(X86_64)
+ // FIXME: should this use a test for 32-bitness instead of this specific exception?
+#if !CPU(X86_64)
void addPtr(RegisterID src, RegisterID dest)
{
add32(src, dest);
diff --git a/JavaScriptCore/assembler/MacroAssemblerARM.cpp b/JavaScriptCore/assembler/MacroAssemblerARM.cpp
index d726ecd..b5b20fa 100644
--- a/JavaScriptCore/assembler/MacroAssemblerARM.cpp
+++ b/JavaScriptCore/assembler/MacroAssemblerARM.cpp
@@ -26,11 +26,11 @@
#include "config.h"
-#if ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
+#if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
#include "MacroAssemblerARM.h"
-#if PLATFORM(LINUX)
+#if OS(LINUX)
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -43,7 +43,7 @@ namespace JSC {
static bool isVFPPresent()
{
-#if PLATFORM(LINUX)
+#if OS(LINUX)
int fd = open("/proc/self/auxv", O_RDONLY);
if (fd > 0) {
Elf32_auxv_t aux;
@@ -62,7 +62,8 @@ static bool isVFPPresent()
const bool MacroAssemblerARM::s_isVFPPresent = isVFPPresent();
-#if defined(ARM_REQUIRE_NATURAL_ALIGNMENT) && ARM_REQUIRE_NATURAL_ALIGNMENT
+#if CPU(ARMV5_OR_LOWER)
+/* On ARMv5 and below, natural alignment is required. */
void MacroAssemblerARM::load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest)
{
ARMWord op2;
@@ -91,4 +92,4 @@ void MacroAssemblerARM::load32WithUnalignedHalfWords(BaseIndex address, Register
}
-#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
+#endif // ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
diff --git a/JavaScriptCore/assembler/MacroAssemblerARM.h b/JavaScriptCore/assembler/MacroAssemblerARM.h
index 24e2e11..21b8de8 100644
--- a/JavaScriptCore/assembler/MacroAssemblerARM.h
+++ b/JavaScriptCore/assembler/MacroAssemblerARM.h
@@ -30,7 +30,7 @@
#include <wtf/Platform.h>
-#if ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
+#if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
#include "ARMAssembler.h"
#include "AbstractMacroAssembler.h"
@@ -224,7 +224,7 @@ public:
m_assembler.baseIndexTransfer32(true, dest, address.base, address.index, static_cast<int>(address.scale), address.offset);
}
-#if defined(ARM_REQUIRE_NATURAL_ALIGNMENT) && ARM_REQUIRE_NATURAL_ALIGNMENT
+#if CPU(ARMV5_OR_LOWER)
void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest);
#else
void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest)
@@ -928,6 +928,6 @@ private:
}
-#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
+#endif // ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
#endif // MacroAssemblerARM_h
diff --git a/JavaScriptCore/assembler/MacroAssemblerCodeRef.h b/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
index 3681af8..cae8bf6 100644
--- a/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
+++ b/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
@@ -37,7 +37,7 @@
// ASSERT_VALID_CODE_POINTER checks that ptr is a non-null pointer, and that it is a valid
// instruction address on the platform (for example, check any alignment requirements).
-#if PLATFORM(ARM_THUMB2)
+#if CPU(ARM_THUMB2)
// ARM/thumb instructions must be 16-bit aligned, but all code pointers to be loaded
// into the processor are decorated with the bottom bit set, indicating that this is
// thumb code (as oposed to 32-bit traditional ARM). The first test checks for both
@@ -130,7 +130,7 @@ public:
}
explicit MacroAssemblerCodePtr(void* value)
-#if PLATFORM(ARM_THUMB2)
+#if CPU(ARM_THUMB2)
// Decorate the pointer as a thumb code pointer.
: m_value(reinterpret_cast<char*>(value) + 1)
#else
@@ -147,7 +147,7 @@ public:
}
void* executableAddress() const { return m_value; }
-#if PLATFORM(ARM_THUMB2)
+#if CPU(ARM_THUMB2)
// To use this pointer as a data address remove the decoration.
void* dataLocation() const { ASSERT_VALID_CODE_POINTER(m_value); return reinterpret_cast<char*>(m_value) - 1; }
#else
diff --git a/JavaScriptCore/assembler/MacroAssemblerX86.h b/JavaScriptCore/assembler/MacroAssemblerX86.h
index 6e96240..ca7c31a 100644
--- a/JavaScriptCore/assembler/MacroAssemblerX86.h
+++ b/JavaScriptCore/assembler/MacroAssemblerX86.h
@@ -28,7 +28,7 @@
#include <wtf/Platform.h>
-#if ENABLE(ASSEMBLER) && PLATFORM(X86)
+#if ENABLE(ASSEMBLER) && CPU(X86)
#include "MacroAssemblerX86Common.h"
diff --git a/JavaScriptCore/assembler/MacroAssemblerX86Common.h b/JavaScriptCore/assembler/MacroAssemblerX86Common.h
index 96d21f1..449df86 100644
--- a/JavaScriptCore/assembler/MacroAssemblerX86Common.h
+++ b/JavaScriptCore/assembler/MacroAssemblerX86Common.h
@@ -542,7 +542,7 @@ public:
m_assembler.movl_i32r(imm.m_value, dest);
}
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
void move(RegisterID src, RegisterID dest)
{
// Note: on 64-bit this is is a full register move; perhaps it would be
@@ -944,8 +944,8 @@ private:
// x86_64, and clients & subclasses of MacroAssembler should be using 'supportsFloatingPoint()'.
friend class MacroAssemblerX86;
-#if PLATFORM(X86)
-#if PLATFORM(MAC)
+#if CPU(X86)
+#if OS(MAC_OS_X)
// All X86 Macs are guaranteed to support at least SSE2,
static bool isSSE2Present()
@@ -953,7 +953,7 @@ private:
return true;
}
-#else // PLATFORM(MAC)
+#else // OS(MAC_OS_X)
enum SSE2CheckState {
NotCheckedSSE2,
@@ -996,8 +996,8 @@ private:
static SSE2CheckState s_sse2CheckState;
-#endif // PLATFORM(MAC)
-#elif !defined(NDEBUG) // PLATFORM(X86)
+#endif // OS(MAC_OS_X)
+#elif !defined(NDEBUG) // CPU(X86)
// On x86-64 we should never be checking for SSE2 in a non-debug build,
// but non debug add this method to keep the asserts above happy.
diff --git a/JavaScriptCore/assembler/MacroAssemblerX86_64.h b/JavaScriptCore/assembler/MacroAssemblerX86_64.h
index 7828cf5..ec93f8c 100644
--- a/JavaScriptCore/assembler/MacroAssemblerX86_64.h
+++ b/JavaScriptCore/assembler/MacroAssemblerX86_64.h
@@ -28,7 +28,7 @@
#include <wtf/Platform.h>
-#if ENABLE(ASSEMBLER) && PLATFORM(X86_64)
+#if ENABLE(ASSEMBLER) && CPU(X86_64)
#include "MacroAssemblerX86Common.h"
diff --git a/JavaScriptCore/assembler/X86Assembler.h b/JavaScriptCore/assembler/X86Assembler.h
index cbbaaa5..ab3d05f 100644
--- a/JavaScriptCore/assembler/X86Assembler.h
+++ b/JavaScriptCore/assembler/X86Assembler.h
@@ -28,7 +28,7 @@
#include <wtf/Platform.h>
-#if ENABLE(ASSEMBLER) && (PLATFORM(X86) || PLATFORM(X86_64))
+#if ENABLE(ASSEMBLER) && (CPU(X86) || CPU(X86_64))
#include "AssemblerBuffer.h"
#include <stdint.h>
@@ -50,7 +50,7 @@ namespace X86Registers {
esi,
edi,
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
r8,
r9,
r10,
@@ -118,12 +118,12 @@ private:
OP_XOR_GvEv = 0x33,
OP_CMP_EvGv = 0x39,
OP_CMP_GvEv = 0x3B,
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
PRE_REX = 0x40,
#endif
OP_PUSH_EAX = 0x50,
OP_POP_EAX = 0x58,
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
OP_MOVSXD_GvEv = 0x63,
#endif
PRE_OPERAND_SIZE = 0x66,
@@ -296,7 +296,7 @@ public:
// Arithmetic operations:
-#if !PLATFORM(X86_64)
+#if !CPU(X86_64)
void adcl_im(int imm, void* addr)
{
if (CAN_SIGN_EXTEND_8_32(imm)) {
@@ -346,7 +346,7 @@ public:
}
}
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
void addq_rr(RegisterID src, RegisterID dst)
{
m_formatter.oneByteOp64(OP_ADD_EvGv, src, dst);
@@ -423,7 +423,7 @@ public:
}
}
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
void andq_rr(RegisterID src, RegisterID dst)
{
m_formatter.oneByteOp64(OP_AND_EvGv, src, dst);
@@ -509,7 +509,7 @@ public:
}
}
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
void orq_rr(RegisterID src, RegisterID dst)
{
m_formatter.oneByteOp64(OP_OR_EvGv, src, dst);
@@ -575,7 +575,7 @@ public:
}
}
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
void subq_rr(RegisterID src, RegisterID dst)
{
m_formatter.oneByteOp64(OP_SUB_EvGv, src, dst);
@@ -641,7 +641,7 @@ public:
}
}
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
void xorq_rr(RegisterID src, RegisterID dst)
{
m_formatter.oneByteOp64(OP_XOR_EvGv, src, dst);
@@ -689,7 +689,7 @@ public:
m_formatter.oneByteOp(OP_GROUP2_EvCL, GROUP2_OP_SHL, dst);
}
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
void sarq_CLr(RegisterID dst)
{
m_formatter.oneByteOp64(OP_GROUP2_EvCL, GROUP2_OP_SAR, dst);
@@ -789,7 +789,7 @@ public:
m_formatter.immediate32(imm);
}
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
void cmpq_rr(RegisterID src, RegisterID dst)
{
m_formatter.oneByteOp64(OP_CMP_EvGv, src, dst);
@@ -897,7 +897,7 @@ public:
m_formatter.immediate32(imm);
}
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
void testq_rr(RegisterID src, RegisterID dst)
{
m_formatter.oneByteOp64(OP_TEST_EvGv, src, dst);
@@ -971,7 +971,7 @@ public:
m_formatter.oneByteOp(OP_XCHG_EvGv, src, dst);
}
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
void xchgq_rr(RegisterID src, RegisterID dst)
{
m_formatter.oneByteOp64(OP_XCHG_EvGv, src, dst);
@@ -1001,7 +1001,7 @@ public:
void movl_mEAX(void* addr)
{
m_formatter.oneByteOp(OP_MOV_EAXOv);
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
m_formatter.immediate64(reinterpret_cast<int64_t>(addr));
#else
m_formatter.immediate32(reinterpret_cast<int>(addr));
@@ -1038,14 +1038,14 @@ public:
void movl_EAXm(void* addr)
{
m_formatter.oneByteOp(OP_MOV_OvEAX);
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
m_formatter.immediate64(reinterpret_cast<int64_t>(addr));
#else
m_formatter.immediate32(reinterpret_cast<int>(addr));
#endif
}
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
void movq_rr(RegisterID src, RegisterID dst)
{
m_formatter.oneByteOp64(OP_MOV_EvGv, src, dst);
@@ -1157,7 +1157,7 @@ public:
{
m_formatter.oneByteOp(OP_LEA, dst, base, offset);
}
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
void leaq_mr(int offset, RegisterID base, RegisterID dst)
{
m_formatter.oneByteOp64(OP_LEA, dst, base, offset);
@@ -1323,7 +1323,7 @@ public:
m_formatter.twoByteOp(OP2_CVTSI2SD_VsdEd, (RegisterID)dst, base, offset);
}
-#if !PLATFORM(X86_64)
+#if !CPU(X86_64)
void cvtsi2sd_mr(void* address, XMMRegisterID dst)
{
m_formatter.prefix(PRE_SSE_F2);
@@ -1343,7 +1343,7 @@ public:
m_formatter.twoByteOp(OP2_MOVD_EdVd, (RegisterID)src, dst);
}
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
void movq_rr(XMMRegisterID src, RegisterID dst)
{
m_formatter.prefix(PRE_SSE_66);
@@ -1369,7 +1369,7 @@ public:
m_formatter.twoByteOp(OP2_MOVSD_VsdWsd, (RegisterID)dst, base, offset);
}
-#if !PLATFORM(X86_64)
+#if !CPU(X86_64)
void movsd_mr(void* address, XMMRegisterID dst)
{
m_formatter.prefix(PRE_SSE_F2);
@@ -1535,7 +1535,7 @@ public:
static void repatchLoadPtrToLEA(void* where)
{
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
// On x86-64 pointer memory accesses require a 64-bit operand, and as such a REX prefix.
// Skip over the prefix byte.
where = reinterpret_cast<char*>(where) + 1;
@@ -1679,7 +1679,7 @@ private:
memoryModRM(reg, base, index, scale, offset);
}
-#if !PLATFORM(X86_64)
+#if !CPU(X86_64)
void oneByteOp(OneByteOpcodeID opcode, int reg, void* address)
{
m_buffer.ensureSpace(maxInstructionSize);
@@ -1722,7 +1722,7 @@ private:
memoryModRM(reg, base, index, scale, offset);
}
-#if !PLATFORM(X86_64)
+#if !CPU(X86_64)
void twoByteOp(TwoByteOpcodeID opcode, int reg, void* address)
{
m_buffer.ensureSpace(maxInstructionSize);
@@ -1732,7 +1732,7 @@ private:
}
#endif
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
// Quad-word-sized operands:
//
// Used to format 64-bit operantions, planting a REX.w prefix.
@@ -1891,7 +1891,7 @@ private:
static const RegisterID noBase = X86Registers::ebp;
static const RegisterID hasSib = X86Registers::esp;
static const RegisterID noIndex = X86Registers::esp;
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
static const RegisterID noBase2 = X86Registers::r13;
static const RegisterID hasSib2 = X86Registers::r12;
@@ -1967,7 +1967,7 @@ private:
void memoryModRM(int reg, RegisterID base, int offset)
{
// A base of esp or r12 would be interpreted as a sib, so force a sib with no index & put the base in there.
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
if ((base == hasSib) || (base == hasSib2)) {
#else
if (base == hasSib) {
@@ -1982,7 +1982,7 @@ private:
m_buffer.putIntUnchecked(offset);
}
} else {
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
if (!offset && (base != noBase) && (base != noBase2))
#else
if (!offset && (base != noBase))
@@ -2001,7 +2001,7 @@ private:
void memoryModRM_disp32(int reg, RegisterID base, int offset)
{
// A base of esp or r12 would be interpreted as a sib, so force a sib with no index & put the base in there.
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
if ((base == hasSib) || (base == hasSib2)) {
#else
if (base == hasSib) {
@@ -2018,7 +2018,7 @@ private:
{
ASSERT(index != noIndex);
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
if (!offset && (base != noBase) && (base != noBase2))
#else
if (!offset && (base != noBase))
@@ -2033,7 +2033,7 @@ private:
}
}
-#if !PLATFORM(X86_64)
+#if !CPU(X86_64)
void memoryModRM(int reg, void* address)
{
// noBase + ModRmMemoryNoDisp means noBase + ModRmMemoryDisp32!
@@ -2048,6 +2048,6 @@ private:
} // namespace JSC
-#endif // ENABLE(ASSEMBLER) && PLATFORM(X86)
+#endif // ENABLE(ASSEMBLER) && CPU(X86)
#endif // X86Assembler_h
diff --git a/JavaScriptCore/bytecode/CodeBlock.cpp b/JavaScriptCore/bytecode/CodeBlock.cpp
index 13bed8c..fd56ece 100644
--- a/JavaScriptCore/bytecode/CodeBlock.cpp
+++ b/JavaScriptCore/bytecode/CodeBlock.cpp
@@ -51,7 +51,7 @@ static UString escapeQuotes(const UString& str)
UString result = str;
int pos = 0;
while ((pos = result.find('\"', pos)) >= 0) {
- result = result.substr(0, pos) + "\"\\\"\"" + result.substr(pos + 1);
+ result = makeString(result.substr(0, pos), "\"\\\"\"", result.substr(pos + 1));
pos += 4;
}
return result;
@@ -62,23 +62,20 @@ static UString valueToSourceString(ExecState* exec, JSValue val)
if (!val)
return "0";
- if (val.isString()) {
- UString result("\"");
- result += escapeQuotes(val.toString(exec)) + "\"";
- return result;
- }
+ if (val.isString())
+ return makeString("\"", escapeQuotes(val.toString(exec)), "\"");
return val.toString(exec);
}
static CString constantName(ExecState* exec, int k, JSValue value)
{
- return (valueToSourceString(exec, value) + "(@k" + UString::from(k - FirstConstantRegisterIndex) + ")").UTF8String();
+ return makeString(valueToSourceString(exec, value), "(@k", UString::from(k - FirstConstantRegisterIndex), ")").UTF8String();
}
static CString idName(int id0, const Identifier& ident)
{
- return (ident.ustring() + "(@id" + UString::from(id0) +")").UTF8String();
+ return makeString(ident.ustring(), "(@id", UString::from(id0), ")").UTF8String();
}
CString CodeBlock::registerName(ExecState* exec, int r) const
@@ -89,25 +86,26 @@ CString CodeBlock::registerName(ExecState* exec, int r) const
if (isConstantRegisterIndex(r))
return constantName(exec, r, getConstant(r));
- return (UString("r") + UString::from(r)).UTF8String();
+ return makeString("r", UString::from(r)).UTF8String();
}
static UString regexpToSourceString(RegExp* regExp)
{
- UString pattern = UString("/") + regExp->pattern() + "/";
+ char postfix[5] = { '/', 0, 0, 0, 0 };
+ int index = 1;
if (regExp->global())
- pattern += "g";
+ postfix[index++] = 'g';
if (regExp->ignoreCase())
- pattern += "i";
+ postfix[index++] = 'i';
if (regExp->multiline())
- pattern += "m";
+ postfix[index] = 'm';
- return pattern;
+ return makeString("/", regExp->pattern(), postfix);
}
static CString regexpName(int re, RegExp* regexp)
{
- return (regexpToSourceString(regexp) + "(@re" + UString::from(re) + ")").UTF8String();
+ return makeString(regexpToSourceString(regexp), "(@re", UString::from(re), ")").UTF8String();
}
static UString pointerToSourceString(void* p)
diff --git a/JavaScriptCore/bytecode/Opcode.h b/JavaScriptCore/bytecode/Opcode.h
index e88f051..d9b2153 100644
--- a/JavaScriptCore/bytecode/Opcode.h
+++ b/JavaScriptCore/bytecode/Opcode.h
@@ -196,8 +196,12 @@ namespace JSC {
#undef VERIFY_OPCODE_ID
#if HAVE(COMPUTED_GOTO)
+#if COMPILER(RVCT)
typedef void* Opcode;
#else
+ typedef const void* Opcode;
+#endif
+#else
typedef OpcodeID Opcode;
#endif
diff --git a/JavaScriptCore/bytecode/SamplingTool.cpp b/JavaScriptCore/bytecode/SamplingTool.cpp
index 865c919..3f0babc 100644
--- a/JavaScriptCore/bytecode/SamplingTool.cpp
+++ b/JavaScriptCore/bytecode/SamplingTool.cpp
@@ -33,7 +33,7 @@
#include "Interpreter.h"
#include "Opcode.h"
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
#include <unistd.h>
#endif
@@ -91,7 +91,7 @@ void SamplingFlags::stop() {}
uint32_t SamplingFlags::s_flags = 1 << 15;
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
static void sleepForMicroseconds(unsigned us)
{
diff --git a/JavaScriptCore/bytecompiler/NodesCodegen.cpp b/JavaScriptCore/bytecompiler/NodesCodegen.cpp
index 80a7a2f..b66c50d 100644
--- a/JavaScriptCore/bytecompiler/NodesCodegen.cpp
+++ b/JavaScriptCore/bytecompiler/NodesCodegen.cpp
@@ -78,10 +78,7 @@ static void substitute(UString& string, const UString& substring)
{
int position = string.find("%s");
ASSERT(position != -1);
- UString newString = string.substr(0, position);
- newString.append(substring);
- newString.append(string.substr(position + 2));
- string = newString;
+ string = makeString(string.substr(0, position), substring, string.substr(position + 2));
}
RegisterID* ThrowableExpressionData::emitThrowError(BytecodeGenerator& generator, ErrorType type, const char* message)
diff --git a/JavaScriptCore/config.h b/JavaScriptCore/config.h
index 30757db..d5fdfe9 100644
--- a/JavaScriptCore/config.h
+++ b/JavaScriptCore/config.h
@@ -25,24 +25,26 @@
#include <wtf/Platform.h>
-#if PLATFORM(WIN_OS) && !defined(BUILDING_WX__) && !COMPILER(GCC)
+#if OS(WINDOWS) && !defined(BUILDING_WX__) && !COMPILER(GCC)
#if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF)
#define JS_EXPORTDATA __declspec(dllexport)
#else
#define JS_EXPORTDATA __declspec(dllimport)
#endif
+#define JS_EXPORTCLASS JS_EXPORTDATA
#else
#define JS_EXPORTDATA
+#define JS_EXPORTCLASS
#endif
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// If we don't define these, they get defined in windef.h.
// We want to use std::min and std::max
#define max max
#define min min
-#if !COMPILER(MSVC7) && !PLATFORM(WINCE)
+#if !COMPILER(MSVC7) && !OS(WINCE)
// We need to define this before the first #include of stdlib.h or it won't contain rand_s.
#ifndef _CRT_RAND_S
#define _CRT_RAND_S
@@ -51,7 +53,7 @@
#endif
-#if PLATFORM(FREEBSD) || PLATFORM(OPENBSD)
+#if OS(FREEBSD) || OS(OPENBSD)
#define HAVE_PTHREAD_NP_H 1
#endif
diff --git a/JavaScriptCore/create_rvct_stubs b/JavaScriptCore/create_rvct_stubs
new file mode 100644
index 0000000..0c49c4f
--- /dev/null
+++ b/JavaScriptCore/create_rvct_stubs
@@ -0,0 +1,52 @@
+#! /usr/bin/perl -w
+#
+# Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+use strict;
+
+my $file = $ARGV[0];
+shift;
+
+my $stub_template = "";
+my $stub = "";
+
+my $rtype = "";
+my $op = "";
+
+my $rtype_template = quotemeta("#rtype#");
+my $op_template = quotemeta("#op#");
+
+print STDERR "Creating RVCT stubs for $file \n";
+open(IN, $file) or die "No such file $file";
+
+while ( $_ = <IN> ) {
+ if ( /^RVCT\((.*)\)/ ) {
+ $stub_template .= $1 . "\n";
+ }
+ if ( /^DEFINE_STUB_FUNCTION\((.*), (.*)\)/ ) {
+ $stub = $stub_template;
+ $rtype = quotemeta($1);
+ $op = quotemeta($2);
+ $stub =~ s/$rtype_template/$rtype/g;
+ $stub =~ s/$op_template/$op/g;
+ $stub =~ s/\\\*/\*/g;
+ print $stub;
+ }
+}
+
+close(IN);
diff --git a/JavaScriptCore/debugger/Debugger.cpp b/JavaScriptCore/debugger/Debugger.cpp
index 902a802..1d2e4fb 100644
--- a/JavaScriptCore/debugger/Debugger.cpp
+++ b/JavaScriptCore/debugger/Debugger.cpp
@@ -67,8 +67,9 @@ void Debugger::recompileAllJSFunctions(JSGlobalData* globalData)
FunctionExecutableSet functionExecutables;
SourceProviderMap sourceProviders;
- Heap::iterator heapEnd = globalData->heap.primaryHeapEnd();
- for (Heap::iterator it = globalData->heap.primaryHeapBegin(); it != heapEnd; ++it) {
+ LiveObjectIterator it = globalData->heap.primaryHeapBegin();
+ LiveObjectIterator heapEnd = globalData->heap.primaryHeapEnd();
+ for ( ; it != heapEnd; ++it) {
if (!(*it)->inherits(&JSFunction::info))
continue;
diff --git a/JavaScriptCore/debugger/Debugger.h b/JavaScriptCore/debugger/Debugger.h
index 3ee9767..3b9bec4 100644
--- a/JavaScriptCore/debugger/Debugger.h
+++ b/JavaScriptCore/debugger/Debugger.h
@@ -42,7 +42,7 @@ namespace JSC {
virtual void detach(JSGlobalObject*);
virtual void sourceParsed(ExecState*, const SourceCode&, int errorLineNumber, const UString& errorMessage) = 0;
- virtual void exception(const DebuggerCallFrame&, intptr_t sourceID, int lineNumber) = 0;
+ virtual void exception(const DebuggerCallFrame&, intptr_t sourceID, int lineNumber, bool hasHandler) = 0;
virtual void atStatement(const DebuggerCallFrame&, intptr_t sourceID, int lineNumber) = 0;
virtual void callEvent(const DebuggerCallFrame&, intptr_t sourceID, int lineNumber) = 0;
virtual void returnEvent(const DebuggerCallFrame&, intptr_t sourceID, int lineNumber) = 0;
diff --git a/JavaScriptCore/debugger/DebuggerActivation.cpp b/JavaScriptCore/debugger/DebuggerActivation.cpp
index d47db5b..0444d23 100644
--- a/JavaScriptCore/debugger/DebuggerActivation.cpp
+++ b/JavaScriptCore/debugger/DebuggerActivation.cpp
@@ -71,9 +71,9 @@ bool DebuggerActivation::deleteProperty(ExecState* exec, const Identifier& prope
return m_activation->deleteProperty(exec, propertyName);
}
-void DebuggerActivation::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void DebuggerActivation::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
- m_activation->getPropertyNames(exec, propertyNames);
+ m_activation->getPropertyNames(exec, propertyNames, mode);
}
bool DebuggerActivation::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
diff --git a/JavaScriptCore/debugger/DebuggerActivation.h b/JavaScriptCore/debugger/DebuggerActivation.h
index 373e62d..3927017 100644
--- a/JavaScriptCore/debugger/DebuggerActivation.h
+++ b/JavaScriptCore/debugger/DebuggerActivation.h
@@ -42,7 +42,7 @@ namespace JSC {
virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
virtual void putWithAttributes(ExecState*, const Identifier& propertyName, JSValue, unsigned attributes);
virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
- virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&);
+ virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
virtual void defineGetter(ExecState*, const Identifier& propertyName, JSObject* getterFunction, unsigned attributes);
virtual void defineSetter(ExecState*, const Identifier& propertyName, JSObject* setterFunction, unsigned attributes);
@@ -51,7 +51,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
diff --git a/JavaScriptCore/interpreter/CallFrame.h b/JavaScriptCore/interpreter/CallFrame.h
index fff4c9b..e3ea689 100644
--- a/JavaScriptCore/interpreter/CallFrame.h
+++ b/JavaScriptCore/interpreter/CallFrame.h
@@ -110,9 +110,9 @@ namespace JSC {
Arguments* optionalCalleeArguments() const { return this[RegisterFile::OptionalCalleeArguments].arguments(); }
Instruction* returnPC() const { return this[RegisterFile::ReturnPC].vPC(); }
- void setCalleeArguments(JSValue arguments) { this[RegisterFile::OptionalCalleeArguments] = arguments; }
- void setCallerFrame(CallFrame* callerFrame) { this[RegisterFile::CallerFrame] = callerFrame; }
- void setScopeChain(ScopeChainNode* scopeChain) { this[RegisterFile::ScopeChain] = scopeChain; }
+ void setCalleeArguments(JSValue arguments) { static_cast<Register*>(this)[RegisterFile::OptionalCalleeArguments] = arguments; }
+ void setCallerFrame(CallFrame* callerFrame) { static_cast<Register*>(this)[RegisterFile::CallerFrame] = callerFrame; }
+ void setScopeChain(ScopeChainNode* scopeChain) { static_cast<Register*>(this)[RegisterFile::ScopeChain] = scopeChain; }
ALWAYS_INLINE void init(CodeBlock* codeBlock, Instruction* vPC, ScopeChainNode* scopeChain,
CallFrame* callerFrame, int returnValueRegister, int argc, JSFunction* function)
@@ -122,8 +122,8 @@ namespace JSC {
setCodeBlock(codeBlock);
setScopeChain(scopeChain);
setCallerFrame(callerFrame);
- this[RegisterFile::ReturnPC] = vPC; // This is either an Instruction* or a pointer into JIT generated code stored as an Instruction*.
- this[RegisterFile::ReturnValueRegister] = Register::withInt(returnValueRegister);
+ static_cast<Register*>(this)[RegisterFile::ReturnPC] = vPC; // This is either an Instruction* or a pointer into JIT generated code stored as an Instruction*.
+ static_cast<Register*>(this)[RegisterFile::ReturnValueRegister] = Register::withInt(returnValueRegister);
setArgumentCount(argc); // original argument count (for the sake of the "arguments" object)
setCallee(function);
setCalleeArguments(JSValue());
@@ -140,9 +140,9 @@ namespace JSC {
CallFrame* removeHostCallFrameFlag() { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) & ~HostCallFrameFlag); }
private:
- void setArgumentCount(int count) { this[RegisterFile::ArgumentCount] = Register::withInt(count); }
- void setCallee(JSFunction* callee) { this[RegisterFile::Callee] = callee; }
- void setCodeBlock(CodeBlock* codeBlock) { this[RegisterFile::CodeBlock] = codeBlock; }
+ void setArgumentCount(int count) { static_cast<Register*>(this)[RegisterFile::ArgumentCount] = Register::withInt(count); }
+ void setCallee(JSFunction* callee) { static_cast<Register*>(this)[RegisterFile::Callee] = callee; }
+ void setCodeBlock(CodeBlock* codeBlock) { static_cast<Register*>(this)[RegisterFile::CodeBlock] = codeBlock; }
static const intptr_t HostCallFrameFlag = 1;
diff --git a/JavaScriptCore/interpreter/Interpreter.cpp b/JavaScriptCore/interpreter/Interpreter.cpp
index ed8bf5b..2498d69 100644
--- a/JavaScriptCore/interpreter/Interpreter.cpp
+++ b/JavaScriptCore/interpreter/Interpreter.cpp
@@ -321,7 +321,13 @@ Interpreter::Interpreter()
: m_sampleEntryDepth(0)
, m_reentryDepth(0)
{
+#if HAVE(COMPUTED_GOTO)
privateExecute(InitializeAndReturn, 0, 0, 0);
+
+ for (int i = 0; i < numOpcodeIDs; ++i)
+ m_opcodeIDTable.add(m_opcodeTable[i], static_cast<OpcodeID>(i));
+#endif // HAVE(COMPUTED_GOTO)
+
#if ENABLE(OPCODE_SAMPLING)
enableSampler();
#endif
@@ -527,7 +533,8 @@ NEVER_INLINE HandlerInfo* Interpreter::throwException(CallFrame*& callFrame, JSV
if (Debugger* debugger = callFrame->dynamicGlobalObject()->debugger()) {
DebuggerCallFrame debuggerCallFrame(callFrame, exceptionValue);
- debugger->exception(debuggerCallFrame, codeBlock->ownerExecutable()->sourceID(), codeBlock->lineNumberForBytecodeOffset(callFrame, bytecodeOffset));
+ bool hasHandler = codeBlock->handlerForBytecodeOffset(bytecodeOffset);
+ debugger->exception(debuggerCallFrame, codeBlock->ownerExecutable()->sourceID(), codeBlock->lineNumberForBytecodeOffset(callFrame, bytecodeOffset), hasHandler);
}
// If we throw in the middle of a call instruction, we need to notify
@@ -1038,23 +1045,27 @@ NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock*
ASSERT(slot.slotBase().isObject());
JSObject* baseObject = asObject(slot.slotBase());
+ size_t offset = slot.cachedOffset();
// Since we're accessing a prototype in a loop, it's a good bet that it
// should not be treated as a dictionary.
- if (baseObject->structure()->isDictionary())
+ if (baseObject->structure()->isDictionary()) {
baseObject->flattenDictionaryObject();
+ offset = baseObject->structure()->get(propertyName);
+ }
ASSERT(!baseObject->structure()->isUncacheableDictionary());
vPC[0] = getOpcode(op_get_by_id_proto);
vPC[5] = baseObject->structure();
- vPC[6] = slot.cachedOffset();
+ vPC[6] = offset;
codeBlock->refStructures(vPC);
return;
}
- size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase());
+ size_t offset = slot.cachedOffset();
+ size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase(), propertyName, offset);
if (!count) {
vPC[0] = getOpcode(op_get_by_id_generic);
return;
@@ -1064,7 +1075,7 @@ NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock*
vPC[4] = structure;
vPC[5] = structure->prototypeChain(callFrame);
vPC[6] = count;
- vPC[7] = slot.cachedOffset();
+ vPC[7] = offset;
codeBlock->refStructures(vPC);
}
@@ -1081,16 +1092,13 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
{
// One-time initialization of our address tables. We have to put this code
// here because our labels are only in scope inside this function.
- if (flag == InitializeAndReturn) {
+ if (UNLIKELY(flag == InitializeAndReturn)) {
#if HAVE(COMPUTED_GOTO)
- #define ADD_BYTECODE(id, length) m_opcodeTable[id] = &&id;
- FOR_EACH_OPCODE_ID(ADD_BYTECODE);
- #undef ADD_BYTECODE
-
- #define ADD_OPCODE_ID(id, length) m_opcodeIDTable.add(&&id, id);
- FOR_EACH_OPCODE_ID(ADD_OPCODE_ID);
- #undef ADD_OPCODE_ID
- ASSERT(m_opcodeIDTable.size() == numOpcodeIDs);
+ #define LIST_OPCODE_LABEL(id, length) &&id,
+ static Opcode labels[] = { FOR_EACH_OPCODE_ID(LIST_OPCODE_LABEL) };
+ for (size_t i = 0; i < sizeof(labels) / sizeof(Opcode); ++i)
+ m_opcodeTable[i] = labels[i];
+ #undef LIST_OPCODE_LABEL
#endif // HAVE(COMPUTED_GOTO)
return JSValue();
}
diff --git a/JavaScriptCore/interpreter/Register.h b/JavaScriptCore/interpreter/Register.h
index d0b0568..ecd7403 100644
--- a/JavaScriptCore/interpreter/Register.h
+++ b/JavaScriptCore/interpreter/Register.h
@@ -51,17 +51,18 @@ namespace JSC {
class Register : public WTF::FastAllocBase {
public:
Register();
- Register(JSValue);
+ Register(const JSValue&);
+ Register& operator=(const JSValue&);
JSValue jsValue() const;
- Register(JSActivation*);
- Register(CallFrame*);
- Register(CodeBlock*);
- Register(JSFunction*);
- Register(JSPropertyNameIterator*);
- Register(ScopeChainNode*);
- Register(Instruction*);
+ Register& operator=(JSActivation*);
+ Register& operator=(CallFrame*);
+ Register& operator=(CodeBlock*);
+ Register& operator=(JSFunction*);
+ Register& operator=(JSPropertyNameIterator*);
+ Register& operator=(ScopeChainNode*);
+ Register& operator=(Instruction*);
int32_t i() const;
JSActivation* activation() const;
@@ -75,12 +76,12 @@ namespace JSC {
static Register withInt(int32_t i)
{
- return Register(i);
+ Register r;
+ r.u.i = i;
+ return r;
}
private:
- Register(int32_t);
-
union {
int32_t i;
EncodedJSValue value;
@@ -98,11 +99,11 @@ namespace JSC {
ALWAYS_INLINE Register::Register()
{
#ifndef NDEBUG
- u.value = JSValue::encode(JSValue());
+ *this = JSValue();
#endif
}
- ALWAYS_INLINE Register::Register(JSValue v)
+ ALWAYS_INLINE Register::Register(const JSValue& v)
{
#if ENABLE(JSC_ZOMBIES)
ASSERT(!v.isZombie());
@@ -110,6 +111,15 @@ namespace JSC {
u.value = JSValue::encode(v);
}
+ ALWAYS_INLINE Register& Register::operator=(const JSValue& v)
+ {
+#if ENABLE(JSC_ZOMBIES)
+ ASSERT(!v.isZombie());
+#endif
+ u.value = JSValue::encode(v);
+ return *this;
+ }
+
ALWAYS_INLINE JSValue Register::jsValue() const
{
return JSValue::decode(u.value);
@@ -117,44 +127,46 @@ namespace JSC {
// Interpreter functions
- ALWAYS_INLINE Register::Register(JSActivation* activation)
+ ALWAYS_INLINE Register& Register::operator=(JSActivation* activation)
{
u.activation = activation;
+ return *this;
}
- ALWAYS_INLINE Register::Register(CallFrame* callFrame)
+ ALWAYS_INLINE Register& Register::operator=(CallFrame* callFrame)
{
u.callFrame = callFrame;
+ return *this;
}
- ALWAYS_INLINE Register::Register(CodeBlock* codeBlock)
+ ALWAYS_INLINE Register& Register::operator=(CodeBlock* codeBlock)
{
u.codeBlock = codeBlock;
+ return *this;
}
- ALWAYS_INLINE Register::Register(JSFunction* function)
+ ALWAYS_INLINE Register& Register::operator=(JSFunction* function)
{
u.function = function;
+ return *this;
}
- ALWAYS_INLINE Register::Register(Instruction* vPC)
+ ALWAYS_INLINE Register& Register::operator=(Instruction* vPC)
{
u.vPC = vPC;
+ return *this;
}
- ALWAYS_INLINE Register::Register(ScopeChainNode* scopeChain)
+ ALWAYS_INLINE Register& Register::operator=(ScopeChainNode* scopeChain)
{
u.scopeChain = scopeChain;
+ return *this;
}
- ALWAYS_INLINE Register::Register(JSPropertyNameIterator* propertyNameIterator)
+ ALWAYS_INLINE Register& Register::operator=(JSPropertyNameIterator* propertyNameIterator)
{
u.propertyNameIterator = propertyNameIterator;
- }
-
- ALWAYS_INLINE Register::Register(int32_t i)
- {
- u.i = i;
+ return *this;
}
ALWAYS_INLINE int32_t Register::i() const
diff --git a/JavaScriptCore/interpreter/RegisterFile.cpp b/JavaScriptCore/interpreter/RegisterFile.cpp
index 5424199..510effe 100644
--- a/JavaScriptCore/interpreter/RegisterFile.cpp
+++ b/JavaScriptCore/interpreter/RegisterFile.cpp
@@ -36,7 +36,7 @@ RegisterFile::~RegisterFile()
#if HAVE(MMAP)
munmap(m_buffer, ((m_max - m_start) + m_maxGlobals) * sizeof(Register));
#elif HAVE(VIRTUALALLOC)
-#if PLATFORM(WINCE)
+#if OS(WINCE)
VirtualFree(m_buffer, DWORD(m_commitEnd) - DWORD(m_buffer), MEM_DECOMMIT);
#endif
VirtualFree(m_buffer, 0, MEM_RELEASE);
diff --git a/JavaScriptCore/interpreter/RegisterFile.h b/JavaScriptCore/interpreter/RegisterFile.h
index 953c70f..1fc4f82 100644
--- a/JavaScriptCore/interpreter/RegisterFile.h
+++ b/JavaScriptCore/interpreter/RegisterFile.h
@@ -176,7 +176,7 @@ namespace JSC {
#if HAVE(MMAP)
m_buffer = static_cast<Register*>(mmap(0, bufferLength, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, VM_TAG_FOR_REGISTERFILE_MEMORY, 0));
if (m_buffer == MAP_FAILED) {
-#if PLATFORM(WINCE)
+#if OS(WINCE)
fprintf(stderr, "Could not allocate register file: %d\n", GetLastError());
#else
fprintf(stderr, "Could not allocate register file: %d\n", errno);
@@ -186,7 +186,7 @@ namespace JSC {
#elif HAVE(VIRTUALALLOC)
m_buffer = static_cast<Register*>(VirtualAlloc(0, roundUpAllocationSize(bufferLength, commitSize), MEM_RESERVE, PAGE_READWRITE));
if (!m_buffer) {
-#if PLATFORM(WINCE)
+#if OS(WINCE)
fprintf(stderr, "Could not allocate register file: %d\n", GetLastError());
#else
fprintf(stderr, "Could not allocate register file: %d\n", errno);
@@ -196,7 +196,7 @@ namespace JSC {
size_t committedSize = roundUpAllocationSize(maxGlobals * sizeof(Register), commitSize);
void* commitCheck = VirtualAlloc(m_buffer, committedSize, MEM_COMMIT, PAGE_READWRITE);
if (commitCheck != m_buffer) {
-#if PLATFORM(WINCE)
+#if OS(WINCE)
fprintf(stderr, "Could not allocate register file: %d\n", GetLastError());
#else
fprintf(stderr, "Could not allocate register file: %d\n", errno);
@@ -242,7 +242,7 @@ namespace JSC {
if (newEnd > m_commitEnd) {
size_t size = roundUpAllocationSize(reinterpret_cast<char*>(newEnd) - reinterpret_cast<char*>(m_commitEnd), commitSize);
if (!VirtualAlloc(m_commitEnd, size, MEM_COMMIT, PAGE_READWRITE)) {
-#if PLATFORM(WINCE)
+#if OS(WINCE)
fprintf(stderr, "Could not allocate register file: %d\n", GetLastError());
#else
fprintf(stderr, "Could not allocate register file: %d\n", errno);
diff --git a/JavaScriptCore/jit/ExecutableAllocator.h b/JavaScriptCore/jit/ExecutableAllocator.h
index 9ca62c8..1fb8ff7 100644
--- a/JavaScriptCore/jit/ExecutableAllocator.h
+++ b/JavaScriptCore/jit/ExecutableAllocator.h
@@ -26,6 +26,7 @@
#ifndef ExecutableAllocator_h
#define ExecutableAllocator_h
+#include <stddef.h> // for ptrdiff_t
#include <limits>
#include <wtf/Assertions.h>
#include <wtf/PassRefPtr.h>
@@ -33,15 +34,21 @@
#include <wtf/UnusedParam.h>
#include <wtf/Vector.h>
-#if PLATFORM(IPHONE)
+#if OS(IPHONE_OS)
#include <libkern/OSCacheControl.h>
#include <sys/mman.h>
#endif
-#if PLATFORM(SYMBIAN)
+#if OS(SYMBIAN)
#include <e32std.h>
#endif
+#if OS(WINCE)
+// From pkfuncs.h (private header file from the Platform Builder)
+#define CACHE_SYNC_ALL 0x07F
+extern "C" __declspec(dllimport) void CacheRangeFlush(LPVOID pAddr, DWORD dwLength, DWORD dwFlags);
+#endif
+
#define JIT_ALLOCATOR_PAGE_SIZE (ExecutableAllocator::pageSize)
#define JIT_ALLOCATOR_LARGE_ALLOC_SIZE (ExecutableAllocator::pageSize * 4)
@@ -78,7 +85,7 @@ private:
struct Allocation {
char* pages;
size_t size;
-#if PLATFORM(SYMBIAN)
+#if OS(SYMBIAN)
RChunk* chunk;
#endif
};
@@ -179,17 +186,17 @@ public:
#endif
-#if PLATFORM(X86) || PLATFORM(X86_64)
+#if CPU(X86) || CPU(X86_64)
static void cacheFlush(void*, size_t)
{
}
-#elif PLATFORM(ARM_THUMB2) && PLATFORM(IPHONE)
+#elif CPU(ARM_THUMB2) && OS(IPHONE_OS)
static void cacheFlush(void* code, size_t size)
{
sys_dcache_flush(code, size);
sys_icache_invalidate(code, size);
}
-#elif PLATFORM(ARM_THUMB2) && PLATFORM(LINUX)
+#elif CPU(ARM_THUMB2) && OS(LINUX)
static void cacheFlush(void* code, size_t size)
{
asm volatile (
@@ -205,12 +212,12 @@ public:
: "r" (code), "r" (reinterpret_cast<char*>(code) + size)
: "r0", "r1", "r2");
}
-#elif PLATFORM(SYMBIAN)
+#elif OS(SYMBIAN)
static void cacheFlush(void* code, size_t size)
{
User::IMB_Range(code, static_cast<char*>(code) + size);
}
-#elif PLATFORM(ARM_TRADITIONAL) && PLATFORM(LINUX)
+#elif CPU(ARM_TRADITIONAL) && OS(LINUX)
static void cacheFlush(void* code, size_t size)
{
asm volatile (
@@ -226,6 +233,11 @@ public:
: "r" (code), "r" (reinterpret_cast<char*>(code) + size)
: "r0", "r1", "r2");
}
+#elif OS(WINCE)
+ static void cacheFlush(void* code, size_t size)
+ {
+ CacheRangeFlush(code, size, CACHE_SYNC_ALL);
+ }
#else
#error "The cacheFlush support is missing on this platform."
#endif
diff --git a/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp b/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
index 7682b9c..dd1db4e 100644
--- a/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
+++ b/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
@@ -29,7 +29,7 @@
#include <errno.h>
-#if ENABLE(ASSEMBLER) && PLATFORM(MAC) && PLATFORM(X86_64)
+#if ENABLE(ASSEMBLER) && OS(DARWIN) && CPU(X86_64)
#include "TCSpinLock.h"
#include <mach/mach_init.h>
diff --git a/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp b/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp
index 13a8626..06375ad 100644
--- a/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp
+++ b/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp
@@ -27,7 +27,7 @@
#include "ExecutableAllocator.h"
-#if ENABLE(ASSEMBLER)
+#if ENABLE(ASSEMBLER) && OS(UNIX) && !OS(SYMBIAN)
#include <sys/mman.h>
#include <unistd.h>
@@ -35,7 +35,7 @@
namespace JSC {
-#if !(PLATFORM(MAC) && PLATFORM(X86_64))
+#if !(OS(DARWIN) && CPU(X86_64))
void ExecutableAllocator::intializePageSize()
{
@@ -57,7 +57,7 @@ void ExecutablePool::systemRelease(const ExecutablePool::Allocation& alloc)
ASSERT_UNUSED(result, !result);
}
-#endif // !(PLATFORM(MAC) && PLATFORM(X86_64))
+#endif // !(OS(DARWIN) && CPU(X86_64))
#if ENABLE(ASSEMBLER_WX_EXCLUSIVE)
void ExecutableAllocator::reprotectRegion(void* start, size_t size, ProtectionSeting setting)
diff --git a/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp b/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp
index c96ecae..e82975c 100644
--- a/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp
+++ b/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp
@@ -22,7 +22,7 @@
#include "ExecutableAllocator.h"
-#if ENABLE(ASSEMBLER) && PLATFORM(SYMBIAN)
+#if ENABLE(ASSEMBLER) && OS(SYMBIAN)
#include <e32hal.h>
#include <e32std.h>
@@ -34,7 +34,7 @@ namespace JSC {
void ExecutableAllocator::intializePageSize()
{
-#if PLATFORM_ARM_ARCH(5)
+#if CPU(ARMV5_OR_LOWER)
// The moving memory model (as used in ARMv5 and earlier platforms)
// on Symbian OS limits the number of chunks for each process to 16.
// To mitigate this limitation increase the pagesize to
diff --git a/JavaScriptCore/jit/ExecutableAllocatorWin.cpp b/JavaScriptCore/jit/ExecutableAllocatorWin.cpp
index e6ac855..e38323c 100644
--- a/JavaScriptCore/jit/ExecutableAllocatorWin.cpp
+++ b/JavaScriptCore/jit/ExecutableAllocatorWin.cpp
@@ -27,7 +27,7 @@
#include "ExecutableAllocator.h"
-#if ENABLE(ASSEMBLER)
+#if ENABLE(ASSEMBLER) && OS(WINDOWS)
#include "windows.h"
diff --git a/JavaScriptCore/jit/JIT.cpp b/JavaScriptCore/jit/JIT.cpp
index 585486f..c0da66d 100644
--- a/JavaScriptCore/jit/JIT.cpp
+++ b/JavaScriptCore/jit/JIT.cpp
@@ -27,7 +27,7 @@
#include "JIT.h"
// This probably does not belong here; adding here for now as a quick Windows build fix.
-#if ENABLE(ASSEMBLER) && PLATFORM(X86) && !PLATFORM(MAC)
+#if ENABLE(ASSEMBLER) && CPU(X86) && !OS(MAC_OS_X)
#include "MacroAssembler.h"
JSC::MacroAssemblerX86Common::SSE2CheckState JSC::MacroAssemblerX86Common::s_sse2CheckState = NotCheckedSSE2;
#endif
diff --git a/JavaScriptCore/jit/JIT.h b/JavaScriptCore/jit/JIT.h
index 0b902b9..8e0c9ac 100644
--- a/JavaScriptCore/jit/JIT.h
+++ b/JavaScriptCore/jit/JIT.h
@@ -192,7 +192,7 @@ namespace JSC {
// on x86/x86-64 it is ecx for performance reasons, since the
// MacroAssembler will need to plant register swaps if it is not -
// however the code will still function correctly.
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
static const RegisterID returnValueRegister = X86Registers::eax;
static const RegisterID cachedResultRegister = X86Registers::eax;
static const RegisterID firstArgumentRegister = X86Registers::edi;
@@ -210,7 +210,7 @@ namespace JSC {
static const FPRegisterID fpRegT0 = X86Registers::xmm0;
static const FPRegisterID fpRegT1 = X86Registers::xmm1;
static const FPRegisterID fpRegT2 = X86Registers::xmm2;
-#elif PLATFORM(X86)
+#elif CPU(X86)
static const RegisterID returnValueRegister = X86Registers::eax;
static const RegisterID cachedResultRegister = X86Registers::eax;
// On x86 we always use fastcall conventions = but on
@@ -228,7 +228,7 @@ namespace JSC {
static const FPRegisterID fpRegT0 = X86Registers::xmm0;
static const FPRegisterID fpRegT1 = X86Registers::xmm1;
static const FPRegisterID fpRegT2 = X86Registers::xmm2;
-#elif PLATFORM(ARM_THUMB2)
+#elif CPU(ARM_THUMB2)
static const RegisterID returnValueRegister = ARMRegisters::r0;
static const RegisterID cachedResultRegister = ARMRegisters::r0;
static const RegisterID firstArgumentRegister = ARMRegisters::r0;
@@ -244,7 +244,7 @@ namespace JSC {
static const FPRegisterID fpRegT0 = ARMRegisters::d0;
static const FPRegisterID fpRegT1 = ARMRegisters::d1;
static const FPRegisterID fpRegT2 = ARMRegisters::d2;
-#elif PLATFORM(ARM_TRADITIONAL)
+#elif CPU(ARM_TRADITIONAL)
static const RegisterID returnValueRegister = ARMRegisters::r0;
static const RegisterID cachedResultRegister = ARMRegisters::r0;
static const RegisterID firstArgumentRegister = ARMRegisters::r0;
@@ -436,7 +436,7 @@ namespace JSC {
void emitSub32Constant(unsigned dst, unsigned op, int32_t constant, ResultType opType);
void emitBinaryDoubleOp(OpcodeID, unsigned dst, unsigned op1, unsigned op2, OperandTypes, JumpList& notInt32Op1, JumpList& notInt32Op2, bool op1IsInRegisters = true, bool op2IsInRegisters = true);
-#if PLATFORM(X86)
+#if CPU(X86)
// These architecture specific value are used to enable patching - see comment on op_put_by_id.
static const int patchOffsetPutByIdStructure = 7;
static const int patchOffsetPutByIdExternalLoad = 13;
@@ -465,7 +465,7 @@ namespace JSC {
static const int patchOffsetMethodCheckProtoObj = 11;
static const int patchOffsetMethodCheckProtoStruct = 18;
static const int patchOffsetMethodCheckPutFunction = 29;
-#elif PLATFORM(ARM_TRADITIONAL)
+#elif CPU(ARM_TRADITIONAL)
// These architecture specific value are used to enable patching - see comment on op_put_by_id.
static const int patchOffsetPutByIdStructure = 4;
static const int patchOffsetPutByIdExternalLoad = 16;
@@ -574,7 +574,7 @@ namespace JSC {
void compileGetDirectOffset(RegisterID base, RegisterID result, RegisterID structure, RegisterID offset, RegisterID scratch);
void compilePutDirectOffset(RegisterID base, RegisterID value, Structure* structure, size_t cachedOffset);
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
// These architecture specific value are used to enable patching - see comment on op_put_by_id.
static const int patchOffsetPutByIdStructure = 10;
static const int patchOffsetPutByIdExternalLoad = 20;
@@ -597,7 +597,7 @@ namespace JSC {
static const int patchOffsetMethodCheckProtoObj = 20;
static const int patchOffsetMethodCheckProtoStruct = 30;
static const int patchOffsetMethodCheckPutFunction = 50;
-#elif PLATFORM(X86)
+#elif CPU(X86)
// These architecture specific value are used to enable patching - see comment on op_put_by_id.
static const int patchOffsetPutByIdStructure = 7;
static const int patchOffsetPutByIdExternalLoad = 13;
@@ -624,7 +624,7 @@ namespace JSC {
static const int patchOffsetMethodCheckProtoObj = 11;
static const int patchOffsetMethodCheckProtoStruct = 18;
static const int patchOffsetMethodCheckPutFunction = 29;
-#elif PLATFORM(ARM_THUMB2)
+#elif CPU(ARM_THUMB2)
// These architecture specific value are used to enable patching - see comment on op_put_by_id.
static const int patchOffsetPutByIdStructure = 10;
static const int patchOffsetPutByIdExternalLoad = 26;
@@ -647,7 +647,7 @@ namespace JSC {
static const int patchOffsetMethodCheckProtoObj = 24;
static const int patchOffsetMethodCheckProtoStruct = 34;
static const int patchOffsetMethodCheckPutFunction = 58;
-#elif PLATFORM(ARM_TRADITIONAL)
+#elif CPU(ARM_TRADITIONAL)
// These architecture specific value are used to enable patching - see comment on op_put_by_id.
static const int patchOffsetPutByIdStructure = 4;
static const int patchOffsetPutByIdExternalLoad = 16;
@@ -954,6 +954,46 @@ namespace JSC {
#endif
#endif
} JIT_CLASS_ALIGNMENT;
+
+ inline void JIT::emit_op_loop(Instruction* currentInstruction)
+ {
+ emitTimeoutCheck();
+ emit_op_jmp(currentInstruction);
+ }
+
+ inline void JIT::emit_op_loop_if_true(Instruction* currentInstruction)
+ {
+ emitTimeoutCheck();
+ emit_op_jtrue(currentInstruction);
+ }
+
+ inline void JIT::emitSlow_op_loop_if_true(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
+ {
+ emitSlow_op_jtrue(currentInstruction, iter);
+ }
+
+ inline void JIT::emit_op_loop_if_false(Instruction* currentInstruction)
+ {
+ emitTimeoutCheck();
+ emit_op_jfalse(currentInstruction);
+ }
+
+ inline void JIT::emitSlow_op_loop_if_false(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
+ {
+ emitSlow_op_jfalse(currentInstruction, iter);
+ }
+
+ inline void JIT::emit_op_loop_if_less(Instruction* currentInstruction)
+ {
+ emitTimeoutCheck();
+ emit_op_jless(currentInstruction);
+ }
+
+ inline void JIT::emitSlow_op_loop_if_less(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
+ {
+ emitSlow_op_jless(currentInstruction, iter);
+ }
+
} // namespace JSC
#endif // ENABLE(JIT)
diff --git a/JavaScriptCore/jit/JITArithmetic.cpp b/JavaScriptCore/jit/JITArithmetic.cpp
index 70f7564..feee8d2 100644
--- a/JavaScriptCore/jit/JITArithmetic.cpp
+++ b/JavaScriptCore/jit/JITArithmetic.cpp
@@ -1116,7 +1116,7 @@ void JIT::emitSlow_op_div(Instruction* currentInstruction, Vector<SlowCaseEntry>
/* ------------------------------ BEGIN: OP_MOD ------------------------------ */
-#if PLATFORM(X86) || PLATFORM(X86_64)
+#if CPU(X86) || CPU(X86_64)
void JIT::emit_op_mod(Instruction* currentInstruction)
{
@@ -1178,7 +1178,7 @@ void JIT::emitSlow_op_mod(Instruction* currentInstruction, Vector<SlowCaseEntry>
stubCall.call(dst);
}
-#else // PLATFORM(X86) || PLATFORM(X86_64)
+#else // CPU(X86) || CPU(X86_64)
void JIT::emit_op_mod(Instruction* currentInstruction)
{
@@ -1196,7 +1196,7 @@ void JIT::emitSlow_op_mod(Instruction*, Vector<SlowCaseEntry>::iterator&)
{
}
-#endif // PLATFORM(X86) || PLATFORM(X86_64)
+#endif // CPU(X86) || CPU(X86_64)
/* ------------------------------ END: OP_MOD ------------------------------ */
@@ -2081,7 +2081,7 @@ void JIT::emitSlow_op_pre_dec(Instruction* currentInstruction, Vector<SlowCaseEn
/* ------------------------------ BEGIN: OP_MOD ------------------------------ */
-#if PLATFORM(X86) || PLATFORM(X86_64)
+#if CPU(X86) || CPU(X86_64)
void JIT::emit_op_mod(Instruction* currentInstruction)
{
@@ -2130,7 +2130,7 @@ void JIT::emitSlow_op_mod(Instruction* currentInstruction, Vector<SlowCaseEntry>
stubCall.call(result);
}
-#else // PLATFORM(X86) || PLATFORM(X86_64)
+#else // CPU(X86) || CPU(X86_64)
void JIT::emit_op_mod(Instruction* currentInstruction)
{
@@ -2149,7 +2149,7 @@ void JIT::emitSlow_op_mod(Instruction*, Vector<SlowCaseEntry>::iterator&)
ASSERT_NOT_REACHED();
}
-#endif // PLATFORM(X86) || PLATFORM(X86_64)
+#endif // CPU(X86) || CPU(X86_64)
/* ------------------------------ END: OP_MOD ------------------------------ */
diff --git a/JavaScriptCore/jit/JITInlineMethods.h b/JavaScriptCore/jit/JITInlineMethods.h
index 1ce6889..5af7565 100644
--- a/JavaScriptCore/jit/JITInlineMethods.h
+++ b/JavaScriptCore/jit/JITInlineMethods.h
@@ -115,7 +115,7 @@ ALWAYS_INLINE JIT::Call JIT::emitNakedCall(CodePtr function)
ALWAYS_INLINE void JIT::beginUninterruptedSequence(int insnSpace, int constSpace)
{
-#if PLATFORM(ARM_TRADITIONAL)
+#if CPU(ARM_TRADITIONAL)
#ifndef NDEBUG
// Ensure the label after the sequence can also fit
insnSpace += sizeof(ARMWord);
@@ -144,7 +144,7 @@ ALWAYS_INLINE void JIT::endUninterruptedSequence(int insnSpace, int constSpace)
#endif
-#if PLATFORM(ARM)
+#if CPU(ARM)
ALWAYS_INLINE void JIT::preserveReturnAddressAfterCall(RegisterID reg)
{
@@ -161,7 +161,7 @@ ALWAYS_INLINE void JIT::restoreReturnAddressBeforeReturn(Address address)
loadPtr(address, linkRegister);
}
-#else // PLATFORM(X86) || PLATFORM(X86_64)
+#else // CPU(X86) || CPU(X86_64)
ALWAYS_INLINE void JIT::preserveReturnAddressAfterCall(RegisterID reg)
{
@@ -194,10 +194,10 @@ ALWAYS_INLINE void JIT::restoreArgumentReference()
}
ALWAYS_INLINE void JIT::restoreArgumentReferenceForTrampoline()
{
-#if PLATFORM(X86)
+#if CPU(X86)
// Within a trampoline the return address will be on the stack at this point.
addPtr(Imm32(sizeof(void*)), stackPointerRegister, firstArgumentRegister);
-#elif PLATFORM(ARM)
+#elif CPU(ARM)
move(stackPointerRegister, firstArgumentRegister);
#endif
// In the trampoline on x86-64, the first argument register is not overwritten.
@@ -265,9 +265,9 @@ ALWAYS_INLINE void JIT::clearSamplingFlag(int32_t flag)
#if ENABLE(SAMPLING_COUNTERS)
ALWAYS_INLINE void JIT::emitCount(AbstractSamplingCounter& counter, uint32_t count)
{
-#if PLATFORM(X86_64) // Or any other 64-bit plattform.
+#if CPU(X86_64) // Or any other 64-bit plattform.
addPtr(Imm32(count), AbsoluteAddress(&counter.m_counter));
-#elif PLATFORM(X86) // Or any other little-endian 32-bit plattform.
+#elif CPU(X86) // Or any other little-endian 32-bit plattform.
intptr_t hiWord = reinterpret_cast<intptr_t>(&counter.m_counter) + sizeof(int32_t);
add32(Imm32(count), AbsoluteAddress(&counter.m_counter));
addWithCarry32(Imm32(0), AbsoluteAddress(reinterpret_cast<void*>(hiWord)));
@@ -278,7 +278,7 @@ ALWAYS_INLINE void JIT::emitCount(AbstractSamplingCounter& counter, uint32_t cou
#endif
#if ENABLE(OPCODE_SAMPLING)
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
ALWAYS_INLINE void JIT::sampleInstruction(Instruction* instruction, bool inHostFunction)
{
move(ImmPtr(m_interpreter->sampler()->sampleSlot()), X86Registers::ecx);
@@ -293,7 +293,7 @@ ALWAYS_INLINE void JIT::sampleInstruction(Instruction* instruction, bool inHostF
#endif
#if ENABLE(CODEBLOCK_SAMPLING)
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
ALWAYS_INLINE void JIT::sampleCodeBlock(CodeBlock* codeBlock)
{
move(ImmPtr(m_interpreter->sampler()->codeBlockSlot()), X86Registers::ecx);
diff --git a/JavaScriptCore/jit/JITOpcodes.cpp b/JavaScriptCore/jit/JITOpcodes.cpp
index 77fec28..d9a32d9 100644
--- a/JavaScriptCore/jit/JITOpcodes.cpp
+++ b/JavaScriptCore/jit/JITOpcodes.cpp
@@ -137,7 +137,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
loadPtr(Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_jitCode)), regT0);
jump(regT0);
-#if PLATFORM(X86) || PLATFORM(ARM_TRADITIONAL)
+#if CPU(X86) || CPU(ARM_TRADITIONAL)
Label nativeCallThunk = align();
preserveReturnAddressAfterCall(regT0);
emitPutToCallFrameHeader(regT0, RegisterFile::ReturnPC); // Push return address
@@ -148,7 +148,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
emitGetFromCallFrameHeaderPtr(RegisterFile::ScopeChain, regT1, regT1);
emitPutToCallFrameHeader(regT1, RegisterFile::ScopeChain);
-#if PLATFORM(X86)
+#if CPU(X86)
emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT0);
/* We have two structs that we use to describe the stackframe we set up for our
@@ -160,7 +160,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
* stack pointer by the right amount after the call.
*/
-#if COMPILER(MSVC) || PLATFORM(LINUX)
+#if COMPILER(MSVC) || OS(LINUX)
#if COMPILER(MSVC)
#pragma pack(push)
#pragma pack(4)
@@ -223,7 +223,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
storePtr(regT2, Address(stackPointerRegister, OBJECT_OFFSETOF(NativeCallFrameStructure, thisValue) + OBJECT_OFFSETOF(JSValue, u.asBits.payload)));
storePtr(regT3, Address(stackPointerRegister, OBJECT_OFFSETOF(NativeCallFrameStructure, thisValue) + OBJECT_OFFSETOF(JSValue, u.asBits.tag)));
-#if COMPILER(MSVC) || PLATFORM(LINUX)
+#if COMPILER(MSVC) || OS(LINUX)
// ArgList is passed by reference so is stackPointerRegister + 4 * sizeof(Register)
addPtr(Imm32(OBJECT_OFFSETOF(NativeCallFrameStructure, result)), stackPointerRegister, X86Registers::ecx);
@@ -248,7 +248,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
// so pull them off now
addPtr(Imm32(NativeCallFrameSize - sizeof(NativeFunctionCalleeSignature)), stackPointerRegister);
-#elif PLATFORM(ARM_TRADITIONAL)
+#elif CPU(ARM_TRADITIONAL)
emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT0);
// Allocate stack space for our arglist
@@ -409,58 +409,6 @@ void JIT::emit_op_jmp(Instruction* currentInstruction)
addJump(jump(), target);
}
-void JIT::emit_op_loop(Instruction* currentInstruction)
-{
- unsigned target = currentInstruction[1].u.operand;
- emitTimeoutCheck();
- addJump(jump(), target);
-}
-
-void JIT::emit_op_loop_if_less(Instruction* currentInstruction)
-{
- unsigned op1 = currentInstruction[1].u.operand;
- unsigned op2 = currentInstruction[2].u.operand;
- unsigned target = currentInstruction[3].u.operand;
-
- emitTimeoutCheck();
-
- if (isOperandConstantImmediateInt(op1)) {
- emitLoad(op2, regT1, regT0);
- addSlowCase(branch32(NotEqual, regT1, Imm32(JSValue::Int32Tag)));
- addJump(branch32(GreaterThan, regT0, Imm32(getConstantOperand(op1).asInt32())), target);
- return;
- }
-
- if (isOperandConstantImmediateInt(op2)) {
- emitLoad(op1, regT1, regT0);
- addSlowCase(branch32(NotEqual, regT1, Imm32(JSValue::Int32Tag)));
- addJump(branch32(LessThan, regT0, Imm32(getConstantOperand(op2).asInt32())), target);
- return;
- }
-
- emitLoad2(op1, regT1, regT0, op2, regT3, regT2);
- addSlowCase(branch32(NotEqual, regT1, Imm32(JSValue::Int32Tag)));
- addSlowCase(branch32(NotEqual, regT3, Imm32(JSValue::Int32Tag)));
- addJump(branch32(LessThan, regT0, regT2), target);
-}
-
-void JIT::emitSlow_op_loop_if_less(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- unsigned op1 = currentInstruction[1].u.operand;
- unsigned op2 = currentInstruction[2].u.operand;
- unsigned target = currentInstruction[3].u.operand;
-
- if (!isOperandConstantImmediateInt(op1) && !isOperandConstantImmediateInt(op2))
- linkSlowCase(iter); // int32 check
- linkSlowCase(iter); // int32 check
-
- JITStubCall stubCall(this, cti_op_jless);
- stubCall.addArgument(op1);
- stubCall.addArgument(op2);
- stubCall.call();
- emitJumpSlowToHot(branchTest32(NonZero, regT0), target);
-}
-
void JIT::emit_op_loop_if_lesseq(Instruction* currentInstruction)
{
unsigned op1 = currentInstruction[1].u.operand;
@@ -709,84 +657,6 @@ void JIT::emit_op_strcat(Instruction* currentInstruction)
stubCall.call(currentInstruction[1].u.operand);
}
-void JIT::emit_op_loop_if_true(Instruction* currentInstruction)
-{
- unsigned cond = currentInstruction[1].u.operand;
- unsigned target = currentInstruction[2].u.operand;
-
- emitTimeoutCheck();
-
- emitLoad(cond, regT1, regT0);
-
- Jump isNotInteger = branch32(NotEqual, regT1, Imm32(JSValue::Int32Tag));
- addJump(branch32(NotEqual, regT0, Imm32(0)), target);
- Jump isNotZero = jump();
-
- isNotInteger.link(this);
-
- addJump(branch32(Equal, regT1, Imm32(JSValue::TrueTag)), target);
- addSlowCase(branch32(NotEqual, regT1, Imm32(JSValue::FalseTag)));
-
- isNotZero.link(this);
-}
-
-void JIT::emitSlow_op_loop_if_true(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- unsigned cond = currentInstruction[1].u.operand;
- unsigned target = currentInstruction[2].u.operand;
-
- linkSlowCase(iter);
-
- JITStubCall stubCall(this, cti_op_jtrue);
- stubCall.addArgument(cond);
- stubCall.call();
- emitJumpSlowToHot(branchTest32(NonZero, regT0), target);
-}
-
-void JIT::emit_op_loop_if_false(Instruction* currentInstruction)
-{
- unsigned cond = currentInstruction[1].u.operand;
- unsigned target = currentInstruction[2].u.operand;
-
- emitTimeoutCheck();
-
- emitLoad(cond, regT1, regT0);
-
- Jump isTrue = branch32(Equal, regT1, Imm32(JSValue::TrueTag));
- addJump(branch32(Equal, regT1, Imm32(JSValue::FalseTag)), target);
-
- Jump isNotInteger = branch32(NotEqual, regT1, Imm32(JSValue::Int32Tag));
- Jump isTrue2 = branch32(NotEqual, regT0, Imm32(0));
- addJump(jump(), target);
-
- if (supportsFloatingPoint()) {
- isNotInteger.link(this);
-
- addSlowCase(branch32(Above, regT1, Imm32(JSValue::LowestTag)));
-
- zeroDouble(fpRegT0);
- emitLoadDouble(cond, fpRegT1);
- addJump(branchDouble(DoubleEqualOrUnordered, fpRegT0, fpRegT1), target);
- } else
- addSlowCase(isNotInteger);
-
- isTrue.link(this);
- isTrue2.link(this);
-}
-
-void JIT::emitSlow_op_loop_if_false(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- unsigned cond = currentInstruction[1].u.operand;
- unsigned target = currentInstruction[2].u.operand;
-
- linkSlowCase(iter);
-
- JITStubCall stubCall(this, cti_op_jtrue);
- stubCall.addArgument(cond);
- stubCall.call();
- emitJumpSlowToHot(branchTest32(Zero, regT0), target);
-}
-
void JIT::emit_op_resolve_base(Instruction* currentInstruction)
{
JITStubCall stubCall(this, cti_op_resolve_base);
@@ -1731,7 +1601,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
emitPutToCallFrameHeader(regT1, RegisterFile::ScopeChain);
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, X86Registers::ecx);
// Allocate stack space for our arglist
@@ -1767,7 +1637,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
call(Address(X86Registers::esi, OBJECT_OFFSETOF(JSFunction, m_data)));
addPtr(Imm32(sizeof(ArgList)), stackPointerRegister);
-#elif PLATFORM(X86)
+#elif CPU(X86)
emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT0);
/* We have two structs that we use to describe the stackframe we set up for our
@@ -1778,7 +1648,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
* not the rest of the callframe so we need a nice way to ensure we increment the
* stack pointer by the right amount after the call.
*/
-#if COMPILER(MSVC) || PLATFORM(LINUX)
+#if COMPILER(MSVC) || OS(LINUX)
struct NativeCallFrameStructure {
// CallFrame* callFrame; // passed in EDX
JSObject* callee;
@@ -1831,7 +1701,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
loadPtr(Address(regT1, -(int)sizeof(Register)), regT1);
storePtr(regT1, Address(stackPointerRegister, OBJECT_OFFSETOF(NativeCallFrameStructure, thisValue)));
-#if COMPILER(MSVC) || PLATFORM(LINUX)
+#if COMPILER(MSVC) || OS(LINUX)
// ArgList is passed by reference so is stackPointerRegister + 4 * sizeof(Register)
addPtr(Imm32(OBJECT_OFFSETOF(NativeCallFrameStructure, result)), stackPointerRegister, X86Registers::ecx);
@@ -1859,7 +1729,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
// so pull them off now
addPtr(Imm32(NativeCallFrameSize - sizeof(NativeFunctionCalleeSignature)), stackPointerRegister);
-#elif PLATFORM(ARM)
+#elif CPU(ARM)
emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT0);
// Allocate stack space for our arglist
@@ -2005,47 +1875,6 @@ void JIT::emit_op_jmp(Instruction* currentInstruction)
RECORD_JUMP_TARGET(target);
}
-void JIT::emit_op_loop(Instruction* currentInstruction)
-{
- emitTimeoutCheck();
-
- unsigned target = currentInstruction[1].u.operand;
- addJump(jump(), target);
-}
-
-void JIT::emit_op_loop_if_less(Instruction* currentInstruction)
-{
- emitTimeoutCheck();
-
- unsigned op1 = currentInstruction[1].u.operand;
- unsigned op2 = currentInstruction[2].u.operand;
- unsigned target = currentInstruction[3].u.operand;
- if (isOperandConstantImmediateInt(op2)) {
- emitGetVirtualRegister(op1, regT0);
- emitJumpSlowCaseIfNotImmediateInteger(regT0);
-#if USE(JSVALUE64)
- int32_t op2imm = getConstantOperandImmediateInt(op2);
-#else
- int32_t op2imm = static_cast<int32_t>(JSImmediate::rawValue(getConstantOperand(op2)));
-#endif
- addJump(branch32(LessThan, regT0, Imm32(op2imm)), target);
- } else if (isOperandConstantImmediateInt(op1)) {
- emitGetVirtualRegister(op2, regT0);
- emitJumpSlowCaseIfNotImmediateInteger(regT0);
-#if USE(JSVALUE64)
- int32_t op1imm = getConstantOperandImmediateInt(op1);
-#else
- int32_t op1imm = static_cast<int32_t>(JSImmediate::rawValue(getConstantOperand(op1)));
-#endif
- addJump(branch32(GreaterThan, regT0, Imm32(op1imm)), target);
- } else {
- emitGetVirtualRegisters(op1, regT0, op2, regT1);
- emitJumpSlowCaseIfNotImmediateInteger(regT0);
- emitJumpSlowCaseIfNotImmediateInteger(regT1);
- addJump(branch32(LessThan, regT0, regT1), target);
- }
-}
-
void JIT::emit_op_loop_if_lesseq(Instruction* currentInstruction)
{
emitTimeoutCheck();
@@ -2284,40 +2113,6 @@ void JIT::emit_op_strcat(Instruction* currentInstruction)
stubCall.call(currentInstruction[1].u.operand);
}
-void JIT::emit_op_loop_if_true(Instruction* currentInstruction)
-{
- emitTimeoutCheck();
-
- unsigned target = currentInstruction[2].u.operand;
- emitGetVirtualRegister(currentInstruction[1].u.operand, regT0);
-
- Jump isZero = branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsNumber(m_globalData, 0))));
- addJump(emitJumpIfImmediateInteger(regT0), target);
-
- addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsBoolean(true)))), target);
- addSlowCase(branchPtr(NotEqual, regT0, ImmPtr(JSValue::encode(jsBoolean(false)))));
-
- isZero.link(this);
-};
-
-void JIT::emit_op_loop_if_false(Instruction* currentInstruction)
-{
- emitTimeoutCheck();
-
-
- unsigned target = currentInstruction[2].u.operand;
- emitGetVirtualRegister(currentInstruction[1].u.operand, regT0);
-
- addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsNumber(m_globalData, 0)))), target);
- Jump isNonZero = emitJumpIfImmediateInteger(regT0);
-
- addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsBoolean(false)))), target);
- addSlowCase(branchPtr(NotEqual, regT0, ImmPtr(JSValue::encode(jsBoolean(true)))));
-
- isNonZero.link(this);
- RECORD_JUMP_TARGET(target);
-};
-
void JIT::emit_op_resolve_base(Instruction* currentInstruction)
{
JITStubCall stubCall(this, cti_op_resolve_base);
@@ -2997,36 +2792,6 @@ void JIT::emitSlow_op_get_by_val(Instruction* currentInstruction, Vector<SlowCas
stubCall.call(dst);
}
-void JIT::emitSlow_op_loop_if_less(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- unsigned op1 = currentInstruction[1].u.operand;
- unsigned op2 = currentInstruction[2].u.operand;
- unsigned target = currentInstruction[3].u.operand;
- if (isOperandConstantImmediateInt(op2)) {
- linkSlowCase(iter);
- JITStubCall stubCall(this, cti_op_jless);
- stubCall.addArgument(regT0);
- stubCall.addArgument(op2, regT2);
- stubCall.call();
- emitJumpSlowToHot(branchTest32(NonZero, regT0), target);
- } else if (isOperandConstantImmediateInt(op1)) {
- linkSlowCase(iter);
- JITStubCall stubCall(this, cti_op_jless);
- stubCall.addArgument(op1, regT2);
- stubCall.addArgument(regT0);
- stubCall.call();
- emitJumpSlowToHot(branchTest32(NonZero, regT0), target);
- } else {
- linkSlowCase(iter);
- linkSlowCase(iter);
- JITStubCall stubCall(this, cti_op_jless);
- stubCall.addArgument(regT0);
- stubCall.addArgument(regT1);
- stubCall.call();
- emitJumpSlowToHot(branchTest32(NonZero, regT0), target);
- }
-}
-
void JIT::emitSlow_op_loop_if_lesseq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
{
unsigned op2 = currentInstruction[2].u.operand;
@@ -3067,24 +2832,6 @@ void JIT::emitSlow_op_put_by_val(Instruction* currentInstruction, Vector<SlowCas
stubPutByValCall.call();
}
-void JIT::emitSlow_op_loop_if_true(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkSlowCase(iter);
- JITStubCall stubCall(this, cti_op_jtrue);
- stubCall.addArgument(regT0);
- stubCall.call();
- emitJumpSlowToHot(branchTest32(NonZero, regT0), currentInstruction[2].u.operand);
-}
-
-void JIT::emitSlow_op_loop_if_false(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkSlowCase(iter);
- JITStubCall stubCall(this, cti_op_jtrue);
- stubCall.addArgument(regT0);
- stubCall.call();
- emitJumpSlowToHot(branchTest32(Zero, regT0), currentInstruction[2].u.operand); // inverted!
-}
-
void JIT::emitSlow_op_not(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
{
linkSlowCase(iter);
diff --git a/JavaScriptCore/jit/JITPropertyAccess.cpp b/JavaScriptCore/jit/JITPropertyAccess.cpp
index e2995a1..ef95f99 100644
--- a/JavaScriptCore/jit/JITPropertyAccess.cpp
+++ b/JavaScriptCore/jit/JITPropertyAccess.cpp
@@ -730,7 +730,7 @@ void JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* str
// Check the prototype object's Structure had not changed.
Structure** prototypeStructureAddress = &(protoObject->m_structure);
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
move(ImmPtr(prototypeStructure), regT3);
Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3);
#else
@@ -810,7 +810,7 @@ void JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, Polymorphi
// Check the prototype object's Structure had not changed.
Structure** prototypeStructureAddress = &(protoObject->m_structure);
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
move(ImmPtr(prototypeStructure), regT3);
Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3);
#else
@@ -863,7 +863,7 @@ void JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, Polymorphi
// Check the prototype object's Structure had not changed.
Structure** prototypeStructureAddress = &(protoObject->m_structure);
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
move(ImmPtr(currStructure), regT3);
bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3));
#else
@@ -918,7 +918,7 @@ void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str
// Check the prototype object's Structure had not changed.
Structure** prototypeStructureAddress = &(protoObject->m_structure);
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
move(ImmPtr(currStructure), regT3);
bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3));
#else
@@ -1051,6 +1051,20 @@ void JIT::emit_op_get_by_val(Instruction* currentInstruction)
emitPutVirtualRegister(dst);
}
+void JIT::compileGetDirectOffset(RegisterID base, RegisterID result, RegisterID structure, RegisterID offset, RegisterID scratch)
+{
+ ASSERT(sizeof(((Structure*)0)->m_propertyStorageCapacity) == sizeof(int32_t));
+ ASSERT(sizeof(JSObject::inlineStorageCapacity) == sizeof(int32_t));
+
+ Jump notUsingInlineStorage = branch32(NotEqual, Address(structure, OBJECT_OFFSETOF(Structure, m_propertyStorageCapacity)), Imm32(JSObject::inlineStorageCapacity));
+ loadPtr(BaseIndex(base, offset, ScalePtr, OBJECT_OFFSETOF(JSObject, m_inlineStorage)), result);
+ Jump finishedLoad = jump();
+ notUsingInlineStorage.link(this);
+ loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_externalStorage)), scratch);
+ loadPtr(BaseIndex(scratch, offset, ScalePtr, 0), result);
+ finishedLoad.link(this);
+}
+
void JIT::emit_op_get_by_pname(Instruction* currentInstruction)
{
unsigned dst = currentInstruction[1].u.operand;
@@ -1477,20 +1491,6 @@ void JIT::compileGetDirectOffset(JSObject* base, RegisterID temp, RegisterID res
}
}
-void JIT::compileGetDirectOffset(RegisterID base, RegisterID result, RegisterID structure, RegisterID offset, RegisterID scratch)
-{
- ASSERT(sizeof(((Structure*)0)->m_propertyStorageCapacity) == sizeof(int32_t));
- ASSERT(sizeof(JSObject::inlineStorageCapacity) == sizeof(int32_t));
-
- Jump notUsingInlineStorage = branch32(NotEqual, Address(structure, OBJECT_OFFSETOF(Structure, m_propertyStorageCapacity)), Imm32(JSObject::inlineStorageCapacity));
- loadPtr(BaseIndex(base, offset, ScalePtr, OBJECT_OFFSETOF(JSObject, m_inlineStorage)), result);
- Jump finishedLoad = jump();
- notUsingInlineStorage.link(this);
- loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_externalStorage)), scratch);
- loadPtr(BaseIndex(scratch, offset, ScalePtr, 0), result);
- finishedLoad.link(this);
-}
-
void JIT::testPrototype(Structure* structure, JumpList& failureCases)
{
if (structure->m_prototype.isNull())
@@ -1676,7 +1676,7 @@ void JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* str
// Check the prototype object's Structure had not changed.
Structure** prototypeStructureAddress = &(protoObject->m_structure);
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
move(ImmPtr(prototypeStructure), regT3);
Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3);
#else
@@ -1751,7 +1751,7 @@ void JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, Polymorphi
// Check the prototype object's Structure had not changed.
Structure** prototypeStructureAddress = &(protoObject->m_structure);
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
move(ImmPtr(prototypeStructure), regT3);
Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3);
#else
@@ -1804,7 +1804,7 @@ void JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, Polymorphi
// Check the prototype object's Structure had not changed.
Structure** prototypeStructureAddress = &(protoObject->m_structure);
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
move(ImmPtr(currStructure), regT3);
bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3));
#else
@@ -1857,7 +1857,7 @@ void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str
// Check the prototype object's Structure had not changed.
Structure** prototypeStructureAddress = &(protoObject->m_structure);
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
move(ImmPtr(currStructure), regT3);
bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3));
#else
diff --git a/JavaScriptCore/jit/JITStubs.cpp b/JavaScriptCore/jit/JITStubs.cpp
index cace8b2..9191907 100644
--- a/JavaScriptCore/jit/JITStubs.cpp
+++ b/JavaScriptCore/jit/JITStubs.cpp
@@ -64,31 +64,37 @@ using namespace std;
namespace JSC {
-#if PLATFORM(DARWIN) || PLATFORM(WIN_OS)
+#if OS(DARWIN) || OS(WINDOWS)
#define SYMBOL_STRING(name) "_" #name
#else
#define SYMBOL_STRING(name) #name
#endif
-#if PLATFORM(IPHONE)
+#if OS(IPHONE_OS)
#define THUMB_FUNC_PARAM(name) SYMBOL_STRING(name)
#else
#define THUMB_FUNC_PARAM(name)
#endif
-#if PLATFORM(LINUX) && PLATFORM(X86_64)
+#if OS(LINUX) && CPU(X86_64)
#define SYMBOL_STRING_RELOCATION(name) #name "@plt"
#else
#define SYMBOL_STRING_RELOCATION(name) SYMBOL_STRING(name)
#endif
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
// Mach-O platform
#define HIDE_SYMBOL(name) ".private_extern _" #name
-#elif PLATFORM(AIX)
+#elif OS(AIX)
// IBM's own file format
#define HIDE_SYMBOL(name) ".lglobl " #name
-#elif PLATFORM(LINUX) || PLATFORM(FREEBSD) || PLATFORM(OPENBSD) || PLATFORM(SOLARIS) || (PLATFORM(HPUX) && PLATFORM(IA64)) || PLATFORM(SYMBIAN) || PLATFORM(NETBSD)
+#elif OS(LINUX) \
+ || OS(FREEBSD) \
+ || OS(OPENBSD) \
+ || OS(SOLARIS) \
+ || (OS(HPUX) && CPU(IA64)) \
+ || OS(SYMBIAN) \
+ || OS(NETBSD)
// ELF platform
#define HIDE_SYMBOL(name) ".hidden " #name
#else
@@ -97,7 +103,7 @@ namespace JSC {
#if USE(JSVALUE32_64)
-#if COMPILER(GCC) && PLATFORM(X86)
+#if COMPILER(GCC) && CPU(X86)
// These ASSERTs remind you that, if you change the layout of JITStackFrame, you
// need to change the assembly trampolines below to match.
@@ -156,7 +162,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
"ret" "\n"
);
-#elif COMPILER(GCC) && PLATFORM(X86_64)
+#elif COMPILER(GCC) && CPU(X86_64)
#if USE(JIT_STUB_ARGUMENT_VA_LIST)
#error "JIT_STUB_ARGUMENT_VA_LIST not supported on x86-64."
@@ -226,7 +232,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
"ret" "\n"
);
-#elif COMPILER(GCC) && PLATFORM(ARM_THUMB2)
+#elif COMPILER(GCC) && CPU(ARM_THUMB2)
#if USE(JIT_STUB_ARGUMENT_VA_LIST)
#error "JIT_STUB_ARGUMENT_VA_LIST not supported on ARMv7."
@@ -292,7 +298,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
"bx lr" "\n"
);
-#elif COMPILER(GCC) && PLATFORM(ARM_TRADITIONAL)
+#elif COMPILER(GCC) && CPU(ARM_TRADITIONAL)
asm volatile (
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
@@ -326,7 +332,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
"mov pc, lr" "\n"
);
-#elif COMPILER(MSVC)
+#elif COMPILER(MSVC) && CPU(X86)
#if USE(JIT_STUB_ARGUMENT_VA_LIST)
#error "JIT_STUB_ARGUMENT_VA_LIST configuration not supported on MSVC."
@@ -390,11 +396,13 @@ extern "C" {
}
}
-#endif // COMPILER(GCC) && PLATFORM(X86)
+#else
+ #error "JIT not supported on this platform."
+#endif
#else // USE(JSVALUE32_64)
-#if COMPILER(GCC) && PLATFORM(X86)
+#if COMPILER(GCC) && CPU(X86)
// These ASSERTs remind you that, if you change the layout of JITStackFrame, you
// need to change the assembly trampolines below to match.
@@ -452,7 +460,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
"ret" "\n"
);
-#elif COMPILER(GCC) && PLATFORM(X86_64)
+#elif COMPILER(GCC) && CPU(X86_64)
#if USE(JIT_STUB_ARGUMENT_VA_LIST)
#error "JIT_STUB_ARGUMENT_VA_LIST not supported on x86-64."
@@ -529,7 +537,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
"ret" "\n"
);
-#elif COMPILER(GCC) && PLATFORM(ARM_THUMB2)
+#elif COMPILER(GCC) && CPU(ARM_THUMB2)
#if USE(JIT_STUB_ARGUMENT_VA_LIST)
#error "JIT_STUB_ARGUMENT_VA_LIST not supported on ARMv7."
@@ -596,7 +604,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
"bx lr" "\n"
);
-#elif COMPILER(GCC) && PLATFORM(ARM_TRADITIONAL)
+#elif COMPILER(GCC) && CPU(ARM_TRADITIONAL)
asm volatile (
".text\n"
@@ -633,7 +641,46 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
"mov pc, lr" "\n"
);
-#elif COMPILER(MSVC)
+#elif COMPILER(RVCT) && CPU(ARM_TRADITIONAL)
+
+__asm EncodedJSValue ctiTrampoline(void*, RegisterFile*, CallFrame*, JSValue*, Profiler**, JSGlobalData*)
+{
+ ARM
+ stmdb sp!, {r1-r3}
+ stmdb sp!, {r4-r8, lr}
+ sub sp, sp, #36
+ mov r4, r2
+ mov r5, #512
+ mov lr, pc
+ bx r0
+ add sp, sp, #36
+ ldmia sp!, {r4-r8, lr}
+ add sp, sp, #12
+ bx lr
+}
+
+__asm void ctiVMThrowTrampoline()
+{
+ ARM
+ PRESERVE8
+ mov r0, sp
+ bl cti_vm_throw
+ add sp, sp, #36
+ ldmia sp!, {r4-r8, lr}
+ add sp, sp, #12
+ bx lr
+}
+
+__asm void ctiOpThrowNotCaught()
+{
+ ARM
+ add sp, sp, #36
+ ldmia sp!, {r4-r8, lr}
+ add sp, sp, #12
+ bx lr
+}
+
+#elif COMPILER(MSVC) && CPU(X86)
#if USE(JIT_STUB_ARGUMENT_VA_LIST)
#error "JIT_STUB_ARGUMENT_VA_LIST configuration not supported on MSVC."
@@ -696,7 +743,9 @@ extern "C" {
}
}
-#endif // COMPILER(GCC) && PLATFORM(X86)
+#else
+ #error "JIT not supported on this platform."
+#endif
#endif // USE(JSVALUE32_64)
@@ -710,7 +759,7 @@ JITThunks::JITThunks(JSGlobalData* globalData)
{
JIT::compileCTIMachineTrampolines(globalData, &m_executablePool, &m_ctiStringLengthTrampoline, &m_ctiVirtualCallLink, &m_ctiVirtualCall, &m_ctiNativeCallThunk);
-#if PLATFORM(ARM_THUMB2)
+#if CPU(ARM_THUMB2)
// Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it contains non POD types),
// and the OBJECT_OFFSETOF macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT
// macros.
@@ -839,21 +888,25 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co
ASSERT(slot.slotBase().isObject());
JSObject* slotBaseObject = asObject(slot.slotBase());
-
+ size_t offset = slot.cachedOffset();
+
// 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())
+ if (slotBaseObject->structure()->isDictionary()) {
slotBaseObject->flattenDictionaryObject();
+ offset = slotBaseObject->structure()->get(propertyName);
+ }
stubInfo->initGetByIdProto(structure, slotBaseObject->structure());
ASSERT(!structure->isDictionary());
ASSERT(!slotBaseObject->structure()->isDictionary());
- JIT::compileGetByIdProto(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, slotBaseObject->structure(), slot.cachedOffset(), returnAddress);
+ JIT::compileGetByIdProto(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, slotBaseObject->structure(), offset, returnAddress);
return;
}
- size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase());
+ 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;
@@ -861,7 +914,7 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co
StructureChain* prototypeChain = structure->prototypeChain(callFrame);
stubInfo->initGetByIdChain(structure, prototypeChain);
- JIT::compileGetByIdChain(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, prototypeChain, count, slot.cachedOffset(), returnAddress);
+ JIT::compileGetByIdChain(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, prototypeChain, count, offset, returnAddress);
}
#endif // ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS)
@@ -957,7 +1010,7 @@ static NEVER_INLINE void throwStackOverflowError(CallFrame* callFrame, JSGlobalD
} \
} while (0)
-#if PLATFORM(ARM_THUMB2)
+#if CPU(ARM_THUMB2)
#define DEFINE_STUB_FUNCTION(rtype, op) \
extern "C" { \
@@ -978,7 +1031,7 @@ static NEVER_INLINE void throwStackOverflowError(CallFrame* callFrame, JSGlobalD
); \
rtype JITStubThunked_##op(STUB_ARGS_DECLARATION) \
-#elif PLATFORM(ARM_TRADITIONAL) && COMPILER(GCC)
+#elif CPU(ARM_TRADITIONAL) && COMPILER(GCC)
#if USE(JSVALUE32_64)
#define THUNK_RETURN_ADDRESS_OFFSET 64
@@ -1002,6 +1055,32 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, thunkReturnAddress) == THUNK_RETUR
); \
rtype JITStubThunked_##op(STUB_ARGS_DECLARATION)
+#elif CPU(ARM_TRADITIONAL) && COMPILER(RVCT)
+
+#define DEFINE_STUB_FUNCTION(rtype, op) rtype JITStubThunked_##op(STUB_ARGS_DECLARATION)
+
+/* The following is a workaround for RVCT toolchain; precompiler macros are not expanded before the code is passed to the assembler */
+
+/* The following section is a template to generate code for GeneratedJITStubs_RVCT.h */
+/* The pattern "#xxx#" will be replaced with "xxx" */
+
+/*
+RVCT(extern "C" #rtype# JITStubThunked_#op#(STUB_ARGS_DECLARATION);)
+RVCT(__asm #rtype# cti_#op#(STUB_ARGS_DECLARATION))
+RVCT({)
+RVCT( ARM)
+RVCT( IMPORT JITStubThunked_#op#)
+RVCT( str lr, [sp, #32])
+RVCT( bl JITStubThunked_#op#)
+RVCT( ldr lr, [sp, #32])
+RVCT( bx lr)
+RVCT(})
+RVCT()
+*/
+
+/* Include the generated file */
+#include "GeneratedJITStubs_RVCT.h"
+
#else
#define DEFINE_STUB_FUNCTION(rtype, op) rtype JIT_STUB cti_##op(STUB_ARGS_DECLARATION)
#endif
@@ -1043,9 +1122,16 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_add)
CallFrame* callFrame = stackFrame.callFrame;
+<<<<<<< HEAD
bool leftIsString = v1.isString();
if (leftIsString && v2.isString()) {
JSValue result = jsString(callFrame, asString(v1), asString(v2));
+=======
+ if (v1.isString()) {
+ JSValue result = v2.isString()
+ ? jsString(callFrame, asString(v1), asString(v2))
+ : jsString(callFrame, asString(v1), v2.toPrimitiveString(callFrame));
+>>>>>>> webkit.org at r54127
CHECK_FOR_EXCEPTION_AT_END();
return JSValue::encode(result);
}
@@ -1375,10 +1461,11 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list)
STUB_INIT_STACK_FRAME(stackFrame);
CallFrame* callFrame = stackFrame.callFrame;
+ const Identifier& propertyName = stackFrame.args[1].identifier();
JSValue baseValue = stackFrame.args[0].jsValue();
PropertySlot slot(baseValue);
- JSValue result = baseValue.get(callFrame, stackFrame.args[1].identifier(), slot);
+ JSValue result = baseValue.get(callFrame, propertyName, slot);
CHECK_FOR_EXCEPTION();
@@ -1393,6 +1480,8 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list)
ASSERT(slot.slotBase().isObject());
JSObject* slotBaseObject = asObject(slot.slotBase());
+
+ size_t offset = slot.cachedOffset();
if (slot.slotBase() == baseValue)
ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
@@ -1400,23 +1489,25 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list)
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())
+ if (slotBaseObject->structure()->isDictionary()) {
slotBaseObject->flattenDictionaryObject();
+ offset = slotBaseObject->structure()->get(propertyName);
+ }
int listIndex;
PolymorphicAccessStructureList* prototypeStructureList = getPolymorphicAccessStructureListSlot(stubInfo, listIndex);
- JIT::compileGetByIdProtoList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, slotBaseObject->structure(), slot.cachedOffset());
+ JIT::compileGetByIdProtoList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, slotBaseObject->structure(), 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())) {
+ } else if (size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase(), propertyName, offset)) {
ASSERT(!asCell(baseValue)->structure()->isDictionary());
int listIndex;
PolymorphicAccessStructureList* prototypeStructureList = getPolymorphicAccessStructureListSlot(stubInfo, listIndex);
StructureChain* protoChain = structure->prototypeChain(callFrame);
- JIT::compileGetByIdChainList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, protoChain, count, slot.cachedOffset());
+ JIT::compileGetByIdChainList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, protoChain, count, offset);
if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
@@ -1561,7 +1652,7 @@ DEFINE_STUB_FUNCTION(void*, op_call_JSFunction)
{
STUB_INIT_STACK_FRAME(stackFrame);
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
CallData callData;
ASSERT(stackFrame.args[0].jsValue().getCallData(callData) == CallTypeJS);
#endif
@@ -1810,7 +1901,7 @@ DEFINE_STUB_FUNCTION(JSObject*, op_construct_JSConstruct)
VM_THROW_EXCEPTION();
}
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
ConstructData constructData;
ASSERT(constructor->getConstructData(constructData) == ConstructTypeJS);
#endif
@@ -2350,8 +2441,6 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_post_inc)
return JSValue::encode(number);
}
-#if USE(JSVALUE32_64)
-
DEFINE_STUB_FUNCTION(int, op_eq)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2359,6 +2448,7 @@ DEFINE_STUB_FUNCTION(int, op_eq)
JSValue src1 = stackFrame.args[0].jsValue();
JSValue src2 = stackFrame.args[1].jsValue();
+#if USE(JSVALUE32_64)
start:
if (src2.isUndefined()) {
return src1.isNull() ||
@@ -2439,8 +2529,18 @@ DEFINE_STUB_FUNCTION(int, op_eq)
src1 = asObject(cell1)->toPrimitive(stackFrame.callFrame);
CHECK_FOR_EXCEPTION();
goto start;
+
+#else // USE(JSVALUE32_64)
+ CallFrame* callFrame = stackFrame.callFrame;
+
+ bool result = JSValue::equalSlowCaseInline(callFrame, src1, src2);
+ CHECK_FOR_EXCEPTION_AT_END();
+ return result;
+#endif // USE(JSVALUE32_64)
}
+#if USE(JSVALUE32_64)
+
DEFINE_STUB_FUNCTION(int, op_eq_strings)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2453,23 +2553,7 @@ DEFINE_STUB_FUNCTION(int, op_eq_strings)
return string1->value(stackFrame.callFrame) == string2->value(stackFrame.callFrame);
}
-#else // USE(JSVALUE32_64)
-
-DEFINE_STUB_FUNCTION(int, op_eq)
-{
- STUB_INIT_STACK_FRAME(stackFrame);
-
- JSValue src1 = stackFrame.args[0].jsValue();
- JSValue src2 = stackFrame.args[1].jsValue();
-
- CallFrame* callFrame = stackFrame.callFrame;
-
- bool result = JSValue::equalSlowCaseInline(callFrame, src1, src2);
- CHECK_FOR_EXCEPTION_AT_END();
- return result;
-}
-
-#endif // USE(JSVALUE32_64)
+#endif
DEFINE_STUB_FUNCTION(EncodedJSValue, op_lshift)
{
diff --git a/JavaScriptCore/jit/JITStubs.h b/JavaScriptCore/jit/JITStubs.h
index f71dc9a..99c2dd2 100644
--- a/JavaScriptCore/jit/JITStubs.h
+++ b/JavaScriptCore/jit/JITStubs.h
@@ -75,7 +75,7 @@ namespace JSC {
ReturnAddressPtr returnAddress() { return ReturnAddressPtr(asPointer); }
};
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
struct JITStackFrame {
void* reserved; // Unused
JITStubArg args[6];
@@ -99,7 +99,7 @@ namespace JSC {
// When JIT code makes a call, it pushes its return address just below the rest of the stack.
ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast<ReturnAddressPtr*>(this) - 1; }
};
-#elif PLATFORM(X86)
+#elif CPU(X86)
#if COMPILER(MSVC)
#pragma pack(push)
#pragma pack(4)
@@ -130,7 +130,7 @@ namespace JSC {
#if COMPILER(MSVC)
#pragma pack(pop)
#endif // COMPILER(MSVC)
-#elif PLATFORM(ARM_THUMB2)
+#elif CPU(ARM_THUMB2)
struct JITStackFrame {
void* reserved; // Unused
JITStubArg args[6];
@@ -158,7 +158,7 @@ namespace JSC {
ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; }
};
-#elif PLATFORM(ARM_TRADITIONAL)
+#elif CPU(ARM_TRADITIONAL)
struct JITStackFrame {
JITStubArg padding; // Unused
JITStubArg args[7];
@@ -202,16 +202,16 @@ namespace JSC {
#define STUB_ARGS_DECLARATION void** args
#define STUB_ARGS (args)
- #if PLATFORM(X86) && COMPILER(MSVC)
+ #if CPU(X86) && COMPILER(MSVC)
#define JIT_STUB __fastcall
- #elif PLATFORM(X86) && COMPILER(GCC)
+ #elif CPU(X86) && COMPILER(GCC)
#define JIT_STUB __attribute__ ((fastcall))
#else
#define JIT_STUB
#endif
#endif
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
struct VoidPtrPair {
void* first;
void* second;
diff --git a/JavaScriptCore/jsc.cpp b/JavaScriptCore/jsc.cpp
index b6bc0aa..252fb96 100644
--- a/JavaScriptCore/jsc.cpp
+++ b/JavaScriptCore/jsc.cpp
@@ -37,7 +37,7 @@
#include <stdlib.h>
#include <string.h>
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
#include <unistd.h>
#endif
@@ -54,10 +54,10 @@
#include <signal.h>
#endif
-#if COMPILER(MSVC) && !PLATFORM(WINCE)
+#if COMPILER(MSVC) && !OS(WINCE)
#include <crtdbg.h>
-#include <windows.h>
#include <mmsystem.h>
+#include <windows.h>
#endif
#if PLATFORM(QT)
@@ -88,8 +88,8 @@ static JSValue JSC_HOST_CALL functionClearSamplingFlags(ExecState*, JSObject*, J
struct Script {
bool isFile;
- char *argument;
-
+ char* argument;
+
Script(bool isFile, char *argument)
: isFile(isFile)
, argument(argument)
@@ -174,12 +174,12 @@ GlobalObject::GlobalObject(const Vector<UString>& arguments)
JSValue JSC_HOST_CALL functionPrint(ExecState* exec, JSObject*, JSValue, const ArgList& args)
{
for (unsigned i = 0; i < args.size(); ++i) {
- if (i != 0)
+ if (i)
putchar(' ');
-
+
printf("%s", args.at(i).toString(exec).UTF8String().c_str());
}
-
+
putchar('\n');
fflush(stdout);
return jsUndefined();
@@ -194,7 +194,7 @@ JSValue JSC_HOST_CALL functionDebug(ExecState* exec, JSObject*, JSValue, const A
JSValue JSC_HOST_CALL functionGC(ExecState* exec, JSObject*, JSValue, const ArgList&)
{
JSLock lock(SilenceAssertionsOnly);
- exec->heap()->collect();
+ exec->heap()->collectAllGarbage();
return jsUndefined();
}
@@ -292,8 +292,18 @@ JSValue JSC_HOST_CALL functionReadline(ExecState* exec, JSObject*, JSValue, cons
JSValue JSC_HOST_CALL functionQuit(ExecState* exec, JSObject*, JSValue, const ArgList&)
{
+ // Technically, destroying the heap in the middle of JS execution is a no-no,
+ // but we want to maintain compatibility with the Mozilla test suite, so
+ // we pretend that execution has terminated to avoid ASSERTs, then tear down the heap.
+ exec->globalData().dynamicGlobalObject = 0;
+
cleanupGlobalData(&exec->globalData());
exit(EXIT_SUCCESS);
+
+#if COMPILER(MSVC) && OS(WINCE)
+ // Without this, Visual Studio will complain that this method does not return a value.
+ return jsUndefined();
+#endif
}
// Use SEH for Release builds only to get rid of the crash report dialog
@@ -313,7 +323,7 @@ int jscmain(int argc, char** argv, JSGlobalData*);
int main(int argc, char** argv)
{
-#if defined(_DEBUG) && PLATFORM(WIN_OS)
+#if defined(_DEBUG) && OS(WINDOWS)
_CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
@@ -322,7 +332,7 @@ int main(int argc, char** argv)
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE);
#endif
-#if COMPILER(MSVC) && !PLATFORM(WINCE)
+#if COMPILER(MSVC) && !OS(WINCE)
timeBeginPeriod(1);
#endif
@@ -463,30 +473,27 @@ static void parseArguments(int argc, char** argv, Options& options, JSGlobalData
int i = 1;
for (; i < argc; ++i) {
const char* arg = argv[i];
- if (strcmp(arg, "-f") == 0) {
+ if (!strcmp(arg, "-f")) {
if (++i == argc)
printUsageStatement(globalData);
options.scripts.append(Script(true, argv[i]));
continue;
}
- if (strcmp(arg, "-e") == 0) {
+ if (!strcmp(arg, "-e")) {
if (++i == argc)
printUsageStatement(globalData);
options.scripts.append(Script(false, argv[i]));
continue;
}
- if (strcmp(arg, "-h") == 0 || strcmp(arg, "--help") == 0) {
- printUsageStatement(globalData, true);
- }
- if (strcmp(arg, "-i") == 0) {
+ if (!strcmp(arg, "-i")) {
options.interactive = true;
continue;
}
- if (strcmp(arg, "-d") == 0) {
+ if (!strcmp(arg, "-d")) {
options.dump = true;
continue;
}
- if (strcmp(arg, "-s") == 0) {
+ if (!strcmp(arg, "-s")) {
#if HAVE(SIGNAL_H)
signal(SIGILL, _exit);
signal(SIGFPE, _exit);
@@ -495,16 +502,18 @@ static void parseArguments(int argc, char** argv, Options& options, JSGlobalData
#endif
continue;
}
- if (strcmp(arg, "--") == 0) {
+ if (!strcmp(arg, "--")) {
++i;
break;
}
+ if (!strcmp(arg, "-h") || !strcmp(arg, "--help"))
+ printUsageStatement(globalData, true);
options.scripts.append(Script(true, argv[i]));
}
-
+
if (options.scripts.isEmpty())
options.interactive = true;
-
+
for (; i < argc; ++i)
options.arguments.append(argv[i]);
}
@@ -532,20 +541,20 @@ static bool fillBufferWithContentsOfFile(const UString& fileName, Vector<char>&
return false;
}
- size_t buffer_size = 0;
- size_t buffer_capacity = 1024;
+ size_t bufferSize = 0;
+ size_t bufferCapacity = 1024;
- buffer.resize(buffer_capacity);
+ buffer.resize(bufferCapacity);
while (!feof(f) && !ferror(f)) {
- buffer_size += fread(buffer.data() + buffer_size, 1, buffer_capacity - buffer_size, f);
- if (buffer_size == buffer_capacity) { // guarantees space for trailing '\0'
- buffer_capacity *= 2;
- buffer.resize(buffer_capacity);
+ bufferSize += fread(buffer.data() + bufferSize, 1, bufferCapacity - bufferSize, f);
+ if (bufferSize == bufferCapacity) { // guarantees space for trailing '\0'
+ bufferCapacity *= 2;
+ buffer.resize(bufferCapacity);
}
}
fclose(f);
- buffer[buffer_size] = '\0';
+ buffer[bufferSize] = '\0';
return true;
}
diff --git a/JavaScriptCore/jscore.bkl b/JavaScriptCore/jscore.bkl
index 25e17d7..e69de29 100644
--- a/JavaScriptCore/jscore.bkl
+++ b/JavaScriptCore/jscore.bkl
@@ -1,150 +0,0 @@
-<?xml version="1.0" ?>
-<!--
-Copyright (C) 2007 Kevin Ollivier. 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.
-
-JavaScriptCore Bakefile project file.
--->
-
-<makefile>
- <set var="SRCDIR">.</set>
-
- <include file="../WebKit/wx/wxwk-settings.bkl"/>
- <include file="JavaScriptCoreSources.bkl"/>
-
- <template id="jscore_base" template="icu,pthreads,wxwk_build_settings">
- <sources>
- $(JSCORE_API_SOURCES)
- $(JSCORE_BYTECOMPILER_SOURCES)
- $(JSCORE_DEBUGGER_SOURCES)
- $(JSCORE_JSC_SOURCES)
- $(JSCORE_PCRE_SOURCES)
- $(JSCORE_PARSER_SOURCES)
- $(JSCORE_PROFILER_SOURCES)
- $(JSCORE_RUNTIME_SOURCES)
- $(JSCORE_VM_SOURCES)
- $(JSCORE_WTF_SOURCES)
- </sources>
-
- <set var="ASSEMBLER_SOURCES">
- <if cond="WX_PORT=='gtk2'">
- $(JSCORE_VM_SOURCES_POSIX)
- </if>
- <if cond="PLATFORM_OS=='mac'">
- $(JSCORE_VM_SOURCES_POSIX)
- </if>
- <if cond="WX_PORT=='msw'">
- $(JSCORE_VM_SOURCES_WIN)
- </if>
- </set>
-
- <sources>
- $(ASSEMBLER_SOURCES)
- </sources>
- <install-to>$(WKOUTPUTDIR)</install-to>
- <pic>on</pic>
- <threading>multi</threading>
-
- <include>$(SRCDIR)</include>
- <include>$(SRCDIR)/..</include>
- <include>$(SRCDIR)/API</include>
- <include>$(SRCDIR)/assembler</include>
- <include>$(SRCDIR)/bytecompiler</include>
- <include>$(SRCDIR)/DerivedSources/JavaScriptCore</include>
- <include>$(SRCDIR)/ForwardingHeaders</include>
- <include>$(SRCDIR)/debugger</include>
- <include>$(SRCDIR)/parser</include>
- <include>$(SRCDIR)/pcre</include>
- <include>$(SRCDIR)/profiler</include>
- <include>$(SRCDIR)/runtime</include>
- <include>$(SRCDIR)/interpreter</include>
- <include>$(SRCDIR)/bytecode</include>
- <include>$(SRCDIR)/wrec</include>
- <include>$(SRCDIR)/jit</include>
- <include>$(SRCDIR)/wtf</include>
- <include>$(SRCDIR)/wtf/unicode</include>
-
- <define>ENABLE_XSLT=1</define>
-
- <if cond="FORMAT=='gnu'">
- <!-- FIXME: we need proper configure checks -->
- <define>HAVE_FUNC_ISNAN</define>
- <!-- check for undefined symbols for debugging reasons -->
- <ldflags>-Wl</ldflags>
- </if>
-
- <if cond="PLATFORM_WIN32=='1'">
- <include>$(SRCDIR)/os-win32</include>
- <define>HAVE_SYS_TIMEB_H=1</define>
- <define>HAVE_FLOAT_H=1</define>
- <define>HAVE_FUNC__FINITE=1</define>
- </if>
-
- </template>
-
- <exe id="jsc" template="icu,jscore,pthreads,wxwk">
- <cxx-rtti>off</cxx-rtti>
- <cxx-exceptions>off</cxx-exceptions>
- <debug-info>on</debug-info>
- <depends>jscore</depends>
- <include>$(SRCDIR)</include>
- <include>$(WK_ROOT)/JavaScriptCore</include>
- <include>$(WK_ROOT)/JavaScriptCore/assembler</include>
- <include>$(WK_ROOT)/JavaScriptCore/bytecompiler</include>
- <include>$(WK_ROOT)/JavaScriptCore/debugger</include>
- <include>$(WK_ROOT)/JavaScriptCore/parser</include>
- <include>$(WK_ROOT)/JavaScriptCore/pcre</include>
- <include>$(WK_ROOT)/JavaScriptCore/profiler</include>
- <include>$(WK_ROOT)/JavaScriptCore/runtime</include>
- <include>$(WK_ROOT)/JavaScriptCore/interpreter</include>
- <include>$(WK_ROOT)/JavaScriptCore/bytecode</include>
- <include>$(WK_ROOT)/JavaScriptCore/jit</include>
- <include>$(WK_ROOT)/JavaScriptCore/wrec</include>
- <include>$(WK_ROOT)/JavaScriptCore/wtf</include>
- <dirname>$(WKOUTPUTDIR)</dirname>
- <sources>$(SRCDIR)/jsc.cpp</sources>
- <set var="READLINE_LIB">
- <if cond="WX_PORT=='mac'">edit</if>
- </set>
- <sys-lib>$(READLINE_LIB)</sys-lib>
- <if cond="FORMAT in ['msvc','msvs2005prj']">
- <include>$(WK_ROOT)/WebKitLibraries/win/include</include>
- <sys-lib>winmm</sys-lib> <!-- for timeGetTime -->
- <lib-path>$(WKOUTPUTDIR)</lib-path>
- <lib-path>$(WK_ROOT)/WebKitLibraries/win/lib</lib-path>
- </if>
-
- </exe>
-
- <action id="DerivedSources">
- <is-phony />
- <command>bash make-generated-sources.sh</command>
- </action>
-
- <lib id="jscore" template="jscore_base,wx-lib">
-
- </lib>
-</makefile>
diff --git a/JavaScriptCore/os-win32/WinMain.cpp b/JavaScriptCore/os-win32/WinMain.cpp
new file mode 100644
index 0000000..17800d0
--- /dev/null
+++ b/JavaScriptCore/os-win32/WinMain.cpp
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2009 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 "Vector.h"
+#include <winbase.h>
+#include <winnls.h>
+#include <wtf/UnusedParam.h>
+
+int main(int argc, char** argv);
+
+static inline char* convertToUtf8(LPCWSTR widecharString, int length)
+{
+ int requiredSize = WideCharToMultiByte(CP_UTF8, 0, widecharString, length, 0, 0, 0, 0);
+ char* multibyteString = new char[requiredSize + 1];
+
+ WideCharToMultiByte(CP_UTF8, 0, widecharString, length, multibyteString, requiredSize, 0, 0);
+ multibyteString[requiredSize] = '\0';
+
+ return multibyteString;
+}
+
+int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
+{
+ UNUSED_PARAM(hInstance);
+ UNUSED_PARAM(hPrevInstance);
+ UNUSED_PARAM(nCmdShow);
+
+ Vector<char*> arguments;
+ TCHAR buffer[MAX_PATH];
+
+ int length = GetModuleFileNameW(0, buffer, MAX_PATH);
+ arguments.append(convertToUtf8(buffer, length));
+
+ WCHAR* commandLine = lpCmdLine;
+ while (commandLine[0] != '\0') {
+ int commandLineLength = 1;
+ WCHAR endChar = ' ';
+
+ while (commandLine[0] == ' ')
+ ++commandLine;
+
+ if (commandLine[0] == '\"') {
+ ++commandLine;
+ endChar = '\"';
+ }
+
+ while (commandLine[commandLineLength] != endChar && commandLine[commandLineLength] != '\0')
+ ++commandLineLength;
+
+ arguments.append(convertToUtf8(commandLine, commandLineLength));
+
+ commandLine += commandLineLength;
+ if (endChar != ' ' && commandLine[0] != '\0')
+ ++commandLine;
+ }
+
+ int res = main(arguments.size(), arguments.data());
+
+ for (size_t i = 0; i < arguments.size(); i++)
+ delete arguments[i];
+
+ return res;
+}
diff --git a/JavaScriptCore/parser/Grammar.y b/JavaScriptCore/parser/Grammar.y
index 6d953df..717a266 100644
--- a/JavaScriptCore/parser/Grammar.y
+++ b/JavaScriptCore/parser/Grammar.y
@@ -43,7 +43,7 @@
// Default values for bison.
#define YYDEBUG 0 // Set to 1 to debug a parse error.
#define jscyydebug 0 // Set to 1 to debug a parse error.
-#if !PLATFORM(DARWIN)
+#if !OS(DARWIN)
// Avoid triggering warnings in older bison by not setting this on the Darwin platform.
// FIXME: Is this still needed?
#define YYERROR_VERBOSE
diff --git a/JavaScriptCore/parser/Lexer.cpp b/JavaScriptCore/parser/Lexer.cpp
index 9148230..83f56bd 100644
--- a/JavaScriptCore/parser/Lexer.cpp
+++ b/JavaScriptCore/parser/Lexer.cpp
@@ -639,6 +639,8 @@ inStringEscapeSequence:
shiftLineTerminator();
goto inString;
}
+ if (m_current == -1)
+ goto returnError;
record16(singleEscape(m_current));
shift1();
goto inString;
diff --git a/JavaScriptCore/pcre/dftables b/JavaScriptCore/pcre/dftables
index 1f0ea01..669b948 100755
--- a/JavaScriptCore/pcre/dftables
+++ b/JavaScriptCore/pcre/dftables
@@ -269,4 +269,5 @@ sub readHeaderValues()
eval $content;
die "$@" if $@;
+ unlink $tempFile;
}
diff --git a/JavaScriptCore/pcre/pcre.pri b/JavaScriptCore/pcre/pcre.pri
index c33c67c..4f59e17 100644
--- a/JavaScriptCore/pcre/pcre.pri
+++ b/JavaScriptCore/pcre/pcre.pri
@@ -3,8 +3,6 @@ VPATH += $$PWD
INCLUDEPATH += $$PWD $$OUTPUT_DIR/JavaScriptCore/tmp
DEPENDPATH += $$PWD
-isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = tmp
-
SOURCES += \
pcre_compile.cpp \
pcre_exec.cpp \
@@ -12,24 +10,3 @@ SOURCES += \
pcre_ucp_searchfuncs.cpp \
pcre_xclass.cpp
-!CONFIG(QTDIR_build) {
- defineTest(addExtraCompiler) {
- QMAKE_EXTRA_COMPILERS += $$1
- generated_files.depends += compiler_$${1}_make_all
- export(QMAKE_EXTRA_COMPILERS)
- export(generated_files.depends)
- return(true)
- }
-}
-
-# GENERATOR: "chartables.c": compile and execute the chartables generator (and add it to sources)
-win32-msvc*|wince*: PREPROCESSOR = "--preprocessor=\"$$QMAKE_CC /E\""
-DFTABLES = $$PWD/dftables
-ctgen.input = DFTABLES
-ctgen.output = $$GENERATED_SOURCES_DIR/chartables.c
-ctgen.commands = perl $$DFTABLES ${QMAKE_FILE_OUT} $$PREPROCESSOR
-ctgen.CONFIG += target_predeps no_link
-ctgen.variable_out = GENERATED_SOURCES
-ctgen.dependency_type = TYPE_C
-ctgen.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR}${QMAKE_FILE_BASE}
-addExtraCompiler(ctgen)
diff --git a/JavaScriptCore/profiler/ProfileNode.cpp b/JavaScriptCore/profiler/ProfileNode.cpp
index 02fb7c9..fb126b3 100644
--- a/JavaScriptCore/profiler/ProfileNode.cpp
+++ b/JavaScriptCore/profiler/ProfileNode.cpp
@@ -33,7 +33,7 @@
#include <stdio.h>
#include <wtf/DateMath.h>
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include <windows.h>
#endif
@@ -43,7 +43,7 @@ namespace JSC {
static double getCount()
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
static LARGE_INTEGER frequency = {0};
if (!frequency.QuadPart)
QueryPerformanceFrequency(&frequency);
diff --git a/JavaScriptCore/profiler/Profiler.cpp b/JavaScriptCore/profiler/Profiler.cpp
index 5585d2e..fe8727a 100644
--- a/JavaScriptCore/profiler/Profiler.cpp
+++ b/JavaScriptCore/profiler/Profiler.cpp
@@ -148,7 +148,7 @@ CallIdentifier Profiler::createCallIdentifier(ExecState* exec, JSValue functionV
}
if (asObject(functionValue)->inherits(&InternalFunction::info))
return CallIdentifier(static_cast<InternalFunction*>(asObject(functionValue))->name(exec), defaultSourceURL, defaultLineNumber);
- return CallIdentifier("(" + asObject(functionValue)->className() + " object)", defaultSourceURL, defaultLineNumber);
+ return CallIdentifier(makeString("(", asObject(functionValue)->className(), " object)"), defaultSourceURL, defaultLineNumber);
}
CallIdentifier createCallIdentifierFromFunctionImp(ExecState* exec, JSFunction* function)
diff --git a/JavaScriptCore/profiler/TreeProfile.cpp b/JavaScriptCore/profiler/TreeProfile.cpp
deleted file mode 100644
index e69de29..0000000
--- a/JavaScriptCore/profiler/TreeProfile.cpp
+++ /dev/null
diff --git a/JavaScriptCore/profiler/TreeProfile.h b/JavaScriptCore/profiler/TreeProfile.h
deleted file mode 100644
index e69de29..0000000
--- a/JavaScriptCore/profiler/TreeProfile.h
+++ /dev/null
diff --git a/JavaScriptCore/qt/api/QtScript.pro b/JavaScriptCore/qt/api/QtScript.pro
new file mode 100644
index 0000000..c87eaf4
--- /dev/null
+++ b/JavaScriptCore/qt/api/QtScript.pro
@@ -0,0 +1,36 @@
+TARGET = QtScript
+TEMPLATE = lib
+QT = core
+
+INCLUDEPATH += $$PWD
+
+CONFIG += building-libs
+
+isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = ../../generated
+CONFIG(debug, debug|release) {
+ OBJECTS_DIR = obj/debug
+} else { # Release
+ OBJECTS_DIR = obj/release
+}
+
+include($$PWD/../../../WebKit.pri)
+include($$PWD/../../JavaScriptCore.pri)
+
+INCLUDEPATH += $$PWD/../../API
+
+SOURCES += $$PWD/qscriptengine.cpp \
+ $$PWD/qscriptengine_p.cpp \
+ $$PWD/qscriptvalue.cpp \
+
+HEADERS += $$PWD/qtscriptglobal.h \
+ $$PWD/qscriptengine.h \
+ $$PWD/qscriptengine_p.h \
+ $$PWD/qscriptvalue.h \
+ $$PWD/qscriptvalue_p.h \
+ $$PWD/qscriptconverter_p.h \
+
+
+!static: DEFINES += QT_MAKEDLL
+
+DESTDIR = $$OUTPUT_DIR/lib
+
diff --git a/JavaScriptCore/qt/api/qscriptconverter_p.h b/JavaScriptCore/qt/api/qscriptconverter_p.h
new file mode 100644
index 0000000..c3ca41f
--- /dev/null
+++ b/JavaScriptCore/qt/api/qscriptconverter_p.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef qscriptconverter_p_h
+#define qscriptconverter_p_h
+
+#include <JavaScriptCore/JavaScript.h>
+#include <QtCore/qstring.h>
+
+/*
+ \internal
+ \class QScriptConverter
+ QScriptValue and QScriptEngine helper class. This class's responsibility is to convert values
+ between JS values and Qt/C++ values.
+
+ This is a nice way to inline these functions in both QScriptValue and QScriptEngine.
+*/
+class QScriptConverter {
+public:
+ static QString toString(const JSStringRef str)
+ {
+ return QString(reinterpret_cast<const QChar*>(JSStringGetCharactersPtr(str)), JSStringGetLength(str));
+ }
+ static JSStringRef toString(const QString& str)
+ {
+ return JSStringCreateWithUTF8CString(str.toUtf8().constData());
+ }
+ static JSStringRef toString(const char* str)
+ {
+ return JSStringCreateWithUTF8CString(str);
+ }
+};
+
+#endif // qscriptconverter_p_h
diff --git a/JavaScriptCore/qt/api/qscriptengine.cpp b/JavaScriptCore/qt/api/qscriptengine.cpp
new file mode 100644
index 0000000..f12f410
--- /dev/null
+++ b/JavaScriptCore/qt/api/qscriptengine.cpp
@@ -0,0 +1,88 @@
+/*
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+
+#include "qscriptengine.h"
+
+#include "qscriptengine_p.h"
+#include "qscriptvalue_p.h"
+
+/*!
+ Constructs a QScriptEngine object.
+
+ The globalObject() is initialized to have properties as described in ECMA-262, Section 15.1.
+*/
+QScriptEngine::QScriptEngine()
+ : d_ptr(new QScriptEnginePrivate(this))
+{
+}
+
+/*!
+ Destroys this QScriptEngine.
+*/
+QScriptEngine::~QScriptEngine()
+{
+}
+
+/*!
+ Evaluates \a program, using \a lineNumber as the base line number,
+ and returns the result of the evaluation.
+
+ The script code will be evaluated in the current context.
+
+ The evaluation of \a program can cause an exception in the
+ engine; in this case the return value will be the exception
+ that was thrown (typically an \c{Error} object). You can call
+ hasUncaughtException() to determine if an exception occurred in
+ the last call to evaluate().
+
+ \a lineNumber is used to specify a starting line number for \a
+ program; line number information reported by the engine that pertain
+ to this evaluation (e.g. uncaughtExceptionLineNumber()) will be
+ based on this argument. For example, if \a program consists of two
+ lines of code, and the statement on the second line causes a script
+ exception, uncaughtExceptionLineNumber() would return the given \a
+ lineNumber plus one. When no starting line number is specified, line
+ numbers will be 1-based.
+
+ \a fileName is used for error reporting. For example in error objects
+ the file name is accessible through the "fileName" property if it's
+ provided with this function.
+*/
+QScriptValue QScriptEngine::evaluate(const QString& program, const QString& fileName, int lineNumber)
+{
+ return QScriptValuePrivate::get(d_ptr->evaluate(program, fileName, lineNumber));
+}
+
+/*!
+ Runs the garbage collector.
+
+ The garbage collector will attempt to reclaim memory by locating and disposing of objects that are
+ no longer reachable in the script environment.
+
+ Normally you don't need to call this function; the garbage collector will automatically be invoked
+ when the QScriptEngine decides that it's wise to do so (i.e. when a certain number of new objects
+ have been created). However, you can call this function to explicitly request that garbage
+ collection should be performed as soon as possible.
+*/
+void QScriptEngine::collectGarbage()
+{
+ d_ptr->collectGarbage();
+}
diff --git a/JavaScriptCore/qt/api/qscriptengine.h b/JavaScriptCore/qt/api/qscriptengine.h
new file mode 100644
index 0000000..cf61d35
--- /dev/null
+++ b/JavaScriptCore/qt/api/qscriptengine.h
@@ -0,0 +1,47 @@
+/*
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef qscriptengine_h
+#define qscriptengine_h
+
+#include <QtCore/qobject.h>
+#include <QtCore/qshareddata.h>
+#include <QtCore/qstring.h>
+
+class QScriptValue;
+class QScriptEnginePrivate;
+
+// Internal typedef
+typedef QExplicitlySharedDataPointer<QScriptEnginePrivate> QScriptEnginePtr;
+
+class QScriptEngine : public QObject {
+public:
+ QScriptEngine();
+ ~QScriptEngine();
+
+ QScriptValue evaluate(const QString& program, const QString& fileName = QString(), int lineNumber = 1);
+ void collectGarbage();
+
+private:
+ friend class QScriptEnginePrivate;
+
+ QScriptEnginePtr d_ptr;
+};
+
+#endif
diff --git a/JavaScriptCore/qt/api/qscriptengine_p.cpp b/JavaScriptCore/qt/api/qscriptengine_p.cpp
new file mode 100644
index 0000000..de8a355
--- /dev/null
+++ b/JavaScriptCore/qt/api/qscriptengine_p.cpp
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+
+#include "qscriptengine_p.h"
+
+#include "qscriptvalue_p.h"
+
+/*!
+ Constructs a default QScriptEnginePrivate object, a new global context will be created.
+ \internal
+*/
+QScriptEnginePrivate::QScriptEnginePrivate(const QScriptEngine* engine)
+ : q_ptr(const_cast<QScriptEngine*>(engine))
+ , m_context(JSGlobalContextCreate(0))
+{
+}
+
+QScriptEnginePrivate::~QScriptEnginePrivate()
+{
+ JSGlobalContextRelease(m_context);
+}
+
+/*!
+ Evaluates program and returns the result of the evaluation.
+ \internal
+*/
+QScriptValuePrivate* QScriptEnginePrivate::evaluate(const QString& program, const QString& fileName, int lineNumber)
+{
+ JSStringRef script = QScriptConverter::toString(program);
+ JSStringRef file = QScriptConverter::toString(fileName);
+ JSValueRef exception;
+ JSValueRef result = JSEvaluateScript(m_context, script, /* Global Object */ 0, file, lineNumber, &exception);
+ if (!result)
+ return new QScriptValuePrivate(this, exception); // returns an exception
+ return new QScriptValuePrivate(this, result);
+}
diff --git a/JavaScriptCore/qt/api/qscriptengine_p.h b/JavaScriptCore/qt/api/qscriptengine_p.h
new file mode 100644
index 0000000..8e27c42
--- /dev/null
+++ b/JavaScriptCore/qt/api/qscriptengine_p.h
@@ -0,0 +1,98 @@
+/*
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef qscriptengine_p_h
+#define qscriptengine_p_h
+
+#include "qscriptconverter_p.h"
+#include "qscriptengine.h"
+#include "qscriptvalue.h"
+#include <JavaScriptCore/JavaScript.h>
+#include <QtCore/qshareddata.h>
+#include <QtCore/qstring.h>
+
+class QScriptEngine;
+
+class QScriptEnginePrivate : public QSharedData {
+public:
+ static QScriptEnginePtr get(const QScriptEngine* q) { Q_ASSERT(q); return q->d_ptr; }
+ static QScriptEngine* get(const QScriptEnginePrivate* d) { Q_ASSERT(d); return d->q_ptr; }
+
+ QScriptEnginePrivate(const QScriptEngine*);
+ ~QScriptEnginePrivate();
+
+ QScriptValuePrivate* evaluate(const QString& program, const QString& fileName, int lineNumber);
+ inline void collectGarbage();
+
+ inline JSValueRef makeJSValue(double number) const;
+ inline JSValueRef makeJSValue(int number) const;
+ inline JSValueRef makeJSValue(uint number) const;
+ inline JSValueRef makeJSValue(const QString& string) const;
+ inline JSValueRef makeJSValue(bool number) const;
+ inline JSValueRef makeJSValue(QScriptValue::SpecialValue value) const;
+
+ inline JSGlobalContextRef context() const;
+private:
+ QScriptEngine* q_ptr;
+ JSGlobalContextRef m_context;
+};
+
+void QScriptEnginePrivate::collectGarbage()
+{
+ JSGarbageCollect(m_context);
+}
+
+JSValueRef QScriptEnginePrivate::makeJSValue(double number) const
+{
+ return JSValueMakeNumber(m_context, number);
+}
+
+JSValueRef QScriptEnginePrivate::makeJSValue(int number) const
+{
+ return JSValueMakeNumber(m_context, number);
+}
+
+JSValueRef QScriptEnginePrivate::makeJSValue(uint number) const
+{
+ return JSValueMakeNumber(m_context, number);
+}
+
+JSValueRef QScriptEnginePrivate::makeJSValue(const QString& string) const
+{
+ return JSValueMakeString(m_context, QScriptConverter::toString(string));
+}
+
+JSValueRef QScriptEnginePrivate::makeJSValue(bool value) const
+{
+ return JSValueMakeBoolean(m_context, value);
+}
+
+JSValueRef QScriptEnginePrivate::makeJSValue(QScriptValue::SpecialValue value) const
+{
+ if (value == QScriptValue::NullValue)
+ return JSValueMakeNull(m_context);
+ return JSValueMakeUndefined(m_context);
+}
+
+JSGlobalContextRef QScriptEnginePrivate::context() const
+{
+ return m_context;
+}
+
+#endif
diff --git a/JavaScriptCore/qt/api/qscriptvalue.cpp b/JavaScriptCore/qt/api/qscriptvalue.cpp
new file mode 100644
index 0000000..127fe04
--- /dev/null
+++ b/JavaScriptCore/qt/api/qscriptvalue.cpp
@@ -0,0 +1,556 @@
+/*
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+
+#include "qscriptvalue.h"
+
+#include "qscriptengine.h"
+#include "qscriptengine_p.h"
+#include "qscriptvalue_p.h"
+#include <QtCore/qdebug.h>
+
+/*!
+ Constructs an invalid value.
+*/
+QScriptValue::QScriptValue()
+ : d_ptr(new QScriptValuePrivate())
+{
+}
+
+/*!
+ Constructs a new QScriptValue with a boolean \a value.
+*/
+QScriptValue::QScriptValue(bool value)
+ : d_ptr(new QScriptValuePrivate(value))
+{
+}
+
+/*!
+ Constructs a new QScriptValue with a number \a value.
+*/
+QScriptValue::QScriptValue(int value)
+ : d_ptr(new QScriptValuePrivate(value))
+{
+}
+
+/*!
+ Constructs a new QScriptValue with a number \a value.
+*/
+QScriptValue::QScriptValue(uint value)
+ : d_ptr(new QScriptValuePrivate(value))
+{
+}
+
+/*!
+ Constructs a new QScriptValue with a number \a value.
+*/
+QScriptValue::QScriptValue(qsreal value)
+ : d_ptr(new QScriptValuePrivate(value))
+{
+}
+
+/*!
+ Constructs a new QScriptValue with a string \a value.
+*/
+QScriptValue::QScriptValue(const QString& value)
+ : d_ptr(new QScriptValuePrivate(value))
+{
+}
+
+/*!
+ Constructs a new QScriptValue with a special \a value.
+*/
+QScriptValue::QScriptValue(SpecialValue value)
+ : d_ptr(new QScriptValuePrivate(value))
+{
+}
+
+/*!
+ Constructs a new QScriptValue with a string \a value.
+*/
+QScriptValue::QScriptValue(const char* value)
+ : d_ptr(new QScriptValuePrivate(QString::fromUtf8(value)))
+{
+}
+
+/*!
+ Block automatic convertion to bool
+ \internal
+*/
+QScriptValue::QScriptValue(void* d)
+{
+ Q_ASSERT(false);
+}
+
+/*!
+ Constructs a new QScriptValue from private
+ \internal
+*/
+QScriptValue::QScriptValue(QScriptValuePrivate* d)
+ : d_ptr(d)
+{
+}
+
+/*!
+ \obsolete
+
+ Constructs a new QScriptValue with the boolean \a value and
+ registers it with the script \a engine.
+*/
+QScriptValue::QScriptValue(QScriptEngine* engine, bool value)
+ : d_ptr(new QScriptValuePrivate(engine, value))
+{
+}
+
+/*!
+ \obsolete
+
+ Constructs a new QScriptValue with the integer \a value and
+ registers it with the script \a engine.
+*/
+QScriptValue::QScriptValue(QScriptEngine* engine, int value)
+ : d_ptr(new QScriptValuePrivate(engine, value))
+{
+}
+
+/*!
+ \obsolete
+
+ Constructs a new QScriptValue with the unsigned integer \a value and
+ registers it with the script \a engine.
+ */
+QScriptValue::QScriptValue(QScriptEngine* engine, uint value)
+ : d_ptr(new QScriptValuePrivate(engine, value))
+{
+}
+
+/*!
+ \obsolete
+
+ Constructs a new QScriptValue with the qsreal \a value and
+ registers it with the script \a engine.
+*/
+QScriptValue::QScriptValue(QScriptEngine* engine, qsreal value)
+ : d_ptr(new QScriptValuePrivate(engine, value))
+{
+}
+
+/*!
+ \obsolete
+
+ Constructs a new QScriptValue with the string \a value and
+ registers it with the script \a engine.
+*/
+QScriptValue::QScriptValue(QScriptEngine* engine, const QString& value)
+ : d_ptr(new QScriptValuePrivate(engine, value))
+{
+}
+
+/*!
+ \obsolete
+
+ Constructs a new QScriptValue with the string \a value and
+ registers it with the script \a engine.
+*/
+QScriptValue::QScriptValue(QScriptEngine* engine, const char* value)
+ : d_ptr(new QScriptValuePrivate(engine, QString::fromUtf8(value)))
+{
+}
+
+/*!
+ \obsolete
+
+ Constructs a new QScriptValue with the special \a value and
+ registers it with the script \a engine.
+*/
+QScriptValue::QScriptValue(QScriptEngine* engine, SpecialValue value)
+ : d_ptr(new QScriptValuePrivate(engine, value))
+{
+}
+
+/*!
+ Constructs a new QScriptValue that is a copy of \a other.
+
+ Note that if \a other is an object (i.e., isObject() would return
+ true), then only a reference to the underlying object is copied into
+ the new script value (i.e., the object itself is not copied).
+*/
+QScriptValue::QScriptValue(const QScriptValue& other)
+ : d_ptr(other.d_ptr)
+{
+}
+
+/*!
+ Destroys this QScriptValue.
+*/
+QScriptValue::~QScriptValue()
+{
+}
+
+/*!
+ Returns true if this QScriptValue is valid; otherwise returns
+ false.
+*/
+bool QScriptValue::isValid() const
+{
+ return d_ptr->isValid();
+}
+
+/*!
+ Returns true if this QScriptValue is of the primitive type Boolean;
+ otherwise returns false.
+
+ \sa toBool()
+*/
+bool QScriptValue::isBool() const
+{
+ return d_ptr->isBool();
+}
+
+/*!
+ \obsolete
+
+ Use isBool() instead.
+ Returns true if this QScriptValue is of the primitive type Boolean;
+ otherwise returns false.
+*/
+bool QScriptValue::isBoolean() const
+{
+ return d_ptr->isBool();
+}
+
+/*!
+ Returns true if this QScriptValue is of the primitive type Number;
+ otherwise returns false.
+
+ \sa toNumber()
+*/
+bool QScriptValue::isNumber() const
+{
+ return d_ptr->isNumber();
+}
+
+/*!
+ Returns true if this QScriptValue is of the primitive type Null;
+ otherwise returns false.
+
+ \sa QScriptEngine::nullValue()
+*/
+bool QScriptValue::isNull() const
+{
+ return d_ptr->isNull();
+}
+
+/*!
+ Returns true if this QScriptValue is of the primitive type String;
+ otherwise returns false.
+
+ \sa toString()
+*/
+bool QScriptValue::isString() const
+{
+ return d_ptr->isString();
+}
+
+/*!
+ Returns true if this QScriptValue is of the primitive type Undefined;
+ otherwise returns false.
+
+ \sa QScriptEngine::undefinedValue()
+*/
+bool QScriptValue::isUndefined() const
+{
+ return d_ptr->isUndefined();
+}
+
+/*!
+ Returns true if this QScriptValue is an object of the Error class;
+ otherwise returns false.
+
+ \sa QScriptContext::throwError()
+*/
+bool QScriptValue::isError() const
+{
+ return d_ptr->isError();
+}
+
+/*!
+ Returns true if this QScriptValue is of the Object type; otherwise
+ returns false.
+
+ Note that function values, variant values, and QObject values are
+ objects, so this function returns true for such values.
+
+ \sa toObject(), QScriptEngine::newObject()
+*/
+bool QScriptValue::isObject() const
+{
+ return d_ptr->isObject();
+}
+
+/*!
+ Returns true if this QScriptValue is a function; otherwise returns
+ false.
+
+ \sa call()
+*/
+bool QScriptValue::isFunction() const
+{
+ return d_ptr->isFunction();
+}
+
+/*!
+ Returns the string value of this QScriptValue, as defined in
+ \l{ECMA-262} section 9.8, "ToString".
+
+ Note that if this QScriptValue is an object, calling this function
+ has side effects on the script engine, since the engine will call
+ the object's toString() function (and possibly valueOf()) in an
+ attempt to convert the object to a primitive value (possibly
+ resulting in an uncaught script exception).
+
+ \sa isString()
+*/
+QString QScriptValue::toString() const
+{
+ return d_ptr->toString();
+}
+
+/*!
+ Returns the number value of this QScriptValue, as defined in
+ \l{ECMA-262} section 9.3, "ToNumber".
+
+ Note that if this QScriptValue is an object, calling this function
+ has side effects on the script engine, since the engine will call
+ the object's valueOf() function (and possibly toString()) in an
+ attempt to convert the object to a primitive value (possibly
+ resulting in an uncaught script exception).
+
+ \sa isNumber(), toInteger(), toInt32(), toUInt32(), toUInt16()
+*/
+qsreal QScriptValue::toNumber() const
+{
+ return d_ptr->toNumber();
+}
+
+/*!
+ Returns the boolean value of this QScriptValue, using the conversion
+ rules described in \l{ECMA-262} section 9.2, "ToBoolean".
+
+ Note that if this QScriptValue is an object, calling this function
+ has side effects on the script engine, since the engine will call
+ the object's valueOf() function (and possibly toString()) in an
+ attempt to convert the object to a primitive value (possibly
+ resulting in an uncaught script exception).
+
+ \sa isBool()
+*/
+bool QScriptValue::toBool() const
+{
+ return d_ptr->toBool();
+}
+
+/*!
+ \obsolete
+
+ Use toBool() instead.
+*/
+bool QScriptValue::toBoolean() const
+{
+ return d_ptr->toBool();
+}
+
+/*!
+ Returns the integer value of this QScriptValue, using the conversion
+ rules described in \l{ECMA-262} section 9.4, "ToInteger".
+
+ Note that if this QScriptValue is an object, calling this function
+ has side effects on the script engine, since the engine will call
+ the object's valueOf() function (and possibly toString()) in an
+ attempt to convert the object to a primitive value (possibly
+ resulting in an uncaught script exception).
+
+ \sa toNumber()
+*/
+qsreal QScriptValue::toInteger() const
+{
+ return d_ptr->toInteger();
+}
+
+/*!
+ Returns the signed 32-bit integer value of this QScriptValue, using
+ the conversion rules described in \l{ECMA-262} section 9.5, "ToInt32".
+
+ Note that if this QScriptValue is an object, calling this function
+ has side effects on the script engine, since the engine will call
+ the object's valueOf() function (and possibly toString()) in an
+ attempt to convert the object to a primitive value (possibly
+ resulting in an uncaught script exception).
+
+ \sa toNumber(), toUInt32()
+*/
+qint32 QScriptValue::toInt32() const
+{
+ return d_ptr->toInt32();
+}
+
+/*!
+ Returns the unsigned 32-bit integer value of this QScriptValue, using
+ the conversion rules described in \l{ECMA-262} section 9.6, "ToUint32".
+
+ Note that if this QScriptValue is an object, calling this function
+ has side effects on the script engine, since the engine will call
+ the object's valueOf() function (and possibly toString()) in an
+ attempt to convert the object to a primitive value (possibly
+ resulting in an uncaught script exception).
+
+ \sa toNumber(), toInt32()
+*/
+quint32 QScriptValue::toUInt32() const
+{
+ return d_ptr->toUInt32();
+}
+
+/*!
+ Returns the unsigned 16-bit integer value of this QScriptValue, using
+ the conversion rules described in \l{ECMA-262} section 9.7, "ToUint16".
+
+ Note that if this QScriptValue is an object, calling this function
+ has side effects on the script engine, since the engine will call
+ the object's valueOf() function (and possibly toString()) in an
+ attempt to convert the object to a primitive value (possibly
+ resulting in an uncaught script exception).
+
+ \sa toNumber()
+*/
+quint16 QScriptValue::toUInt16() const
+{
+ return d_ptr->toUInt16();
+}
+
+/*!
+ Calls this QScriptValue as a function, using \a thisObject as
+ the `this' object in the function call, and passing \a args
+ as arguments to the function. Returns the value returned from
+ the function.
+
+ If this QScriptValue is not a function, call() does nothing
+ and returns an invalid QScriptValue.
+
+ Note that if \a thisObject is not an object, the global object
+ (see \l{QScriptEngine::globalObject()}) will be used as the
+ `this' object.
+
+ Calling call() can cause an exception to occur in the script engine;
+ in that case, call() returns the value that was thrown (typically an
+ \c{Error} object). You can call
+ QScriptEngine::hasUncaughtException() to determine if an exception
+ occurred.
+
+ \snippet doc/src/snippets/code/src_script_qscriptvalue.cpp 2
+
+ \sa construct()
+*/
+QScriptValue QScriptValue::call(const QScriptValue& thisObject, const QScriptValueList& args)
+{
+ return d_ptr->call(thisObject.d_ptr.data(), args);
+}
+
+/*!
+ Returns the QScriptEngine that created this QScriptValue,
+ or 0 if this QScriptValue is invalid or the value is not
+ associated with a particular engine.
+*/
+QScriptEngine* QScriptValue::engine() const
+{
+ QScriptEnginePrivate* engine = d_ptr->engine();
+ if (engine)
+ return QScriptEnginePrivate::get(engine);
+ return 0;
+}
+
+/*!
+ Assigns the \a other value to this QScriptValue.
+
+ Note that if \a other is an object (isObject() returns true),
+ only a reference to the underlying object will be assigned;
+ the object itself will not be copied.
+*/
+QScriptValue& QScriptValue::operator=(const QScriptValue& other)
+{
+ d_ptr = other.d_ptr;
+ return *this;
+}
+
+/*!
+ Returns true if this QScriptValue is equal to \a other, otherwise
+ returns false. The comparison follows the behavior described in
+ \l{ECMA-262} section 11.9.3, "The Abstract Equality Comparison
+ Algorithm".
+
+ This function can return true even if the type of this QScriptValue
+ is different from the type of the \a other value; i.e. the
+ comparison is not strict. For example, comparing the number 9 to
+ the string "9" returns true; comparing an undefined value to a null
+ value returns true; comparing a \c{Number} object whose primitive
+ value is 6 to a \c{String} object whose primitive value is "6"
+ returns true; and comparing the number 1 to the boolean value
+ \c{true} returns true. If you want to perform a comparison
+ without such implicit value conversion, use strictlyEquals().
+
+ Note that if this QScriptValue or the \a other value are objects,
+ calling this function has side effects on the script engine, since
+ the engine will call the object's valueOf() function (and possibly
+ toString()) in an attempt to convert the object to a primitive value
+ (possibly resulting in an uncaught script exception).
+
+ \sa strictlyEquals(), lessThan()
+*/
+bool QScriptValue::equals(const QScriptValue& other) const
+{
+ return d_ptr == other.d_ptr || d_ptr->equals(QScriptValuePrivate::get(other));
+}
+
+/*!
+ Returns true if this QScriptValue is equal to \a other using strict
+ comparison (no conversion), otherwise returns false. The comparison
+ follows the behavior described in \l{ECMA-262} section 11.9.6, "The
+ Strict Equality Comparison Algorithm".
+
+ If the type of this QScriptValue is different from the type of the
+ \a other value, this function returns false. If the types are equal,
+ the result depends on the type, as shown in the following table:
+
+ \table
+ \header \o Type \o Result
+ \row \o Undefined \o true
+ \row \o Null \o true
+ \row \o Boolean \o true if both values are true, false otherwise
+ \row \o Number \o false if either value is NaN (Not-a-Number); true if values are equal, false otherwise
+ \row \o String \o true if both values are exactly the same sequence of characters, false otherwise
+ \row \o Object \o true if both values refer to the same object, false otherwise
+ \endtable
+
+ \sa equals()
+*/
+bool QScriptValue::strictlyEquals(const QScriptValue& other) const
+{
+ return d_ptr == other.d_ptr || d_ptr->strictlyEquals(QScriptValuePrivate::get(other));
+}
diff --git a/JavaScriptCore/qt/api/qscriptvalue.h b/JavaScriptCore/qt/api/qscriptvalue.h
new file mode 100644
index 0000000..d45aed3
--- /dev/null
+++ b/JavaScriptCore/qt/api/qscriptvalue.h
@@ -0,0 +1,99 @@
+/*
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef qscriptvalue_h
+#define qscriptvalue_h
+
+#include <QtCore/qlist.h>
+#include <QtCore/qshareddata.h>
+
+class QScriptEngine;
+class QScriptValuePrivate;
+
+class QScriptValue;
+typedef QList<QScriptValue> QScriptValueList;
+
+typedef double qsreal;
+
+class QScriptValue {
+public:
+ enum SpecialValue {
+ NullValue,
+ UndefinedValue
+ };
+
+ QScriptValue();
+ QScriptValue(bool value);
+ QScriptValue(int value);
+ QScriptValue(uint value);
+ QScriptValue(qsreal value);
+ QScriptValue(const QString& value);
+ QScriptValue(const char* value);
+ QScriptValue(SpecialValue value);
+ QScriptValue(const QScriptValue& other);
+
+ QScriptValue(QScriptEngine* engine, bool value);
+ QScriptValue(QScriptEngine* engine, int value);
+ QScriptValue(QScriptEngine* engine, uint value);
+ QScriptValue(QScriptEngine* engine, qsreal value);
+ QScriptValue(QScriptEngine* engine, const QString& value);
+ QScriptValue(QScriptEngine* engine, const char* value);
+ QScriptValue(QScriptEngine* engine, SpecialValue value);
+
+ ~QScriptValue();
+
+ QScriptValue& operator=(const QScriptValue& other);
+ bool equals(const QScriptValue& other) const;
+ bool strictlyEquals(const QScriptValue& other) const;
+
+ QScriptEngine* engine() const;
+
+ bool isValid() const;
+ bool isBool() const;
+ bool isBoolean() const;
+ bool isNumber() const;
+ bool isFunction() const;
+ bool isNull() const;
+ bool isString() const;
+ bool isUndefined() const;
+ bool isObject() const;
+ bool isError() const;
+
+ QString toString() const;
+ qsreal toNumber() const;
+ bool toBool() const;
+ bool toBoolean() const;
+ qsreal toInteger() const;
+ qint32 toInt32() const;
+ quint32 toUInt32() const;
+ quint16 toUInt16() const;
+
+ QScriptValue call(const QScriptValue& thisObject = QScriptValue(),
+ const QScriptValueList& args = QScriptValueList());
+
+private:
+ QScriptValue(void*);
+ QScriptValue(QScriptValuePrivate*);
+
+ QExplicitlySharedDataPointer<QScriptValuePrivate> d_ptr;
+
+ friend class QScriptValuePrivate;
+};
+
+#endif // qscriptvalue_h
diff --git a/JavaScriptCore/qt/api/qscriptvalue_p.h b/JavaScriptCore/qt/api/qscriptvalue_p.h
new file mode 100644
index 0000000..6a5b388
--- /dev/null
+++ b/JavaScriptCore/qt/api/qscriptvalue_p.h
@@ -0,0 +1,719 @@
+/*
+ Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef qscriptvalue_p_h
+#define qscriptvalue_p_h
+
+#include "qscriptconverter_p.h"
+#include "qscriptengine_p.h"
+#include "qscriptvalue.h"
+#include <JavaScriptCore/JavaScript.h>
+#include <QtCore/qshareddata.h>
+#include <QtCore/qvarlengtharray.h>
+
+class QScriptEngine;
+class QScriptValue;
+
+/*
+ \internal
+ \class QScriptValuePrivate
+
+ Implementation of QScriptValue.
+ The implementation is based on a state machine. The states names are included in
+ QScriptValuePrivate::States. Each method should check for the current state and then perform a
+ correct action.
+
+ States:
+ Invalid -> QSVP is invalid, no assumptions should be made about class members (apart from m_value).
+ CString -> QSVP is created from QString or const char* and no JSC engine has been associated yet.
+ Current value is kept in m_string,
+ CNumber -> QSVP is created from int, uint, double... and no JSC engine has been bind yet. Current
+ value is kept in m_number
+ CBool -> QSVP is created from bool and no JSC engine has been associated yet. Current value is kept
+ in m_number
+ CSpecial -> QSVP is Undefined or Null, but a JSC engine hasn't been associated yet, current value
+ is kept in m_number (cast of QScriptValue::SpecialValue)
+ JSValue -> QSVP is associated with engine, but there is no information about real type, the state
+ have really short live cycle. Normally it is created as a function call result.
+ JSNative -> QSVP is associated with engine, and it is sure that it isn't a JavaScript object.
+ JSObject -> QSVP is associated with engine, and it is sure that it is a JavaScript object.
+
+ Each state keep all necessary information to invoke all methods, if not it should be changed to
+ a proper state. Changed state shouldn't be reverted.
+*/
+
+class QScriptValuePrivate : public QSharedData {
+public:
+ inline static QScriptValuePrivate* get(const QScriptValue& q);
+ inline static QScriptValue get(const QScriptValuePrivate* d);
+ inline static QScriptValue get(QScriptValuePrivate* d);
+
+ inline ~QScriptValuePrivate();
+
+ inline QScriptValuePrivate();
+ inline QScriptValuePrivate(const QString& string);
+ inline QScriptValuePrivate(bool value);
+ inline QScriptValuePrivate(int number);
+ inline QScriptValuePrivate(uint number);
+ inline QScriptValuePrivate(qsreal number);
+ inline QScriptValuePrivate(QScriptValue::SpecialValue value);
+
+ inline QScriptValuePrivate(const QScriptEngine* engine, bool value);
+ inline QScriptValuePrivate(const QScriptEngine* engine, int value);
+ inline QScriptValuePrivate(const QScriptEngine* engine, uint value);
+ inline QScriptValuePrivate(const QScriptEngine* engine, qsreal value);
+ inline QScriptValuePrivate(const QScriptEngine* engine, const QString& value);
+ inline QScriptValuePrivate(const QScriptEngine* engine, QScriptValue::SpecialValue value);
+
+ inline QScriptValuePrivate(const QScriptEnginePrivate* engine, JSValueRef value);
+ inline QScriptValuePrivate(const QScriptEnginePrivate* engine, JSValueRef value, JSObjectRef object);
+
+ inline bool isValid() const;
+ inline bool isBool();
+ inline bool isNumber();
+ inline bool isNull();
+ inline bool isString();
+ inline bool isUndefined();
+ inline bool isError();
+ inline bool isObject();
+ inline bool isFunction();
+
+ inline QString toString() const;
+ inline qsreal toNumber() const;
+ inline bool toBool() const;
+ inline qsreal toInteger() const;
+ inline qint32 toInt32() const;
+ inline quint32 toUInt32() const;
+ inline quint16 toUInt16() const;
+
+ inline bool equals(QScriptValuePrivate* other);
+ inline bool strictlyEquals(const QScriptValuePrivate* other) const;
+ inline bool assignEngine(QScriptEnginePrivate* engine);
+
+ inline QScriptValuePrivate* call(const QScriptValuePrivate* , const QScriptValueList& args);
+
+ inline JSGlobalContextRef context() const;
+ inline JSValueRef value() const;
+ inline JSObjectRef object() const;
+ inline QScriptEnginePrivate* engine() const;
+
+private:
+ // Please, update class documentation when you change the enum.
+ enum States {
+ Invalid = 0,
+ CString = 0x1000,
+ CNumber,
+ CBool,
+ CSpecial,
+ JSValue = 0x2000, // JS values are equal or higher then this value.
+ JSNative,
+ JSObject
+ } m_state;
+ QScriptEnginePtr m_engine;
+ QString m_string;
+ qsreal m_number;
+ JSValueRef m_value;
+ JSObjectRef m_object;
+
+ inline void setValue(JSValueRef);
+
+ inline bool inherits(const char*);
+
+ inline bool isJSBased() const;
+ inline bool isNumberBased() const;
+ inline bool isStringBased() const;
+};
+
+QScriptValuePrivate* QScriptValuePrivate::get(const QScriptValue& q) { return q.d_ptr.data(); }
+
+QScriptValue QScriptValuePrivate::get(const QScriptValuePrivate* d)
+{
+ return QScriptValue(const_cast<QScriptValuePrivate*>(d));
+}
+
+QScriptValue QScriptValuePrivate::get(QScriptValuePrivate* d)
+{
+ return QScriptValue(d);
+}
+
+QScriptValuePrivate::~QScriptValuePrivate()
+{
+ if (m_value)
+ JSValueUnprotect(context(), m_value);
+}
+
+QScriptValuePrivate::QScriptValuePrivate()
+ : m_state(Invalid)
+ , m_value(0)
+{
+}
+
+QScriptValuePrivate::QScriptValuePrivate(const QString& string)
+ : m_state(CString)
+ , m_string(string)
+ , m_value(0)
+{
+}
+
+QScriptValuePrivate::QScriptValuePrivate(bool value)
+ : m_state(CBool)
+ , m_number(value)
+ , m_value(0)
+{
+}
+
+QScriptValuePrivate::QScriptValuePrivate(int number)
+ : m_state(CNumber)
+ , m_number(number)
+ , m_value(0)
+{
+}
+
+QScriptValuePrivate::QScriptValuePrivate(uint number)
+ : m_state(CNumber)
+ , m_number(number)
+ , m_value(0)
+{
+}
+
+QScriptValuePrivate::QScriptValuePrivate(qsreal number)
+ : m_state(CNumber)
+ , m_number(number)
+ , m_value(0)
+{
+}
+
+QScriptValuePrivate::QScriptValuePrivate(QScriptValue::SpecialValue value)
+ : m_state(CSpecial)
+ , m_number(value)
+ , m_value(0)
+{
+}
+
+QScriptValuePrivate::QScriptValuePrivate(const QScriptEngine* engine, bool value)
+ : m_state(JSNative)
+{
+ if (!engine) {
+ // slower path reinitialization
+ m_state = CBool;
+ m_number = value;
+ m_value = 0;
+ } else {
+ m_engine = QScriptEnginePrivate::get(engine);
+ m_value = m_engine->makeJSValue(value);
+ JSValueProtect(context(), m_value);
+ }
+}
+
+QScriptValuePrivate::QScriptValuePrivate(const QScriptEngine* engine, int value)
+ : m_state(JSNative)
+{
+ if (!engine) {
+ // slower path reinitialization
+ m_state = CNumber;
+ m_number = value;
+ m_value = 0;
+ } else {
+ m_engine = QScriptEnginePrivate::get(engine);
+ m_value = m_engine->makeJSValue(value);
+ JSValueProtect(context(), m_value);
+ }
+}
+
+QScriptValuePrivate::QScriptValuePrivate(const QScriptEngine* engine, uint value)
+ : m_state(JSNative)
+{
+ if (!engine) {
+ // slower path reinitialization
+ m_state = CNumber;
+ m_number = value;
+ m_value = 0;
+ } else {
+ m_engine = QScriptEnginePrivate::get(engine);
+ m_value = m_engine->makeJSValue(value);
+ JSValueProtect(context(), m_value);
+ }
+}
+
+QScriptValuePrivate::QScriptValuePrivate(const QScriptEngine* engine, qsreal value)
+ : m_state(JSNative)
+{
+ if (!engine) {
+ // slower path reinitialization
+ m_state = CNumber;
+ m_number = value;
+ m_value = 0;
+ } else {
+ m_engine = QScriptEnginePrivate::get(engine);
+ m_value = m_engine->makeJSValue(value);
+ JSValueProtect(context(), m_value);
+ }
+}
+
+QScriptValuePrivate::QScriptValuePrivate(const QScriptEngine* engine, const QString& value)
+ : m_state(JSNative)
+{
+ if (!engine) {
+ // slower path reinitialization
+ m_state = CString;
+ m_string = value;
+ m_value = 0;
+ } else {
+ m_engine = QScriptEnginePrivate::get(engine);
+ m_value = m_engine->makeJSValue(value);
+ JSValueProtect(context(), m_value);
+ }
+}
+
+QScriptValuePrivate::QScriptValuePrivate(const QScriptEngine* engine, QScriptValue::SpecialValue value)
+ : m_state(JSNative)
+{
+ if (!engine) {
+ // slower path reinitialization
+ m_state = CSpecial;
+ m_number = value;
+ m_value = 0;
+ } else {
+ m_engine = QScriptEnginePrivate::get(engine);
+ m_value = m_engine->makeJSValue(value);
+ JSValueProtect(context(), m_value);
+ }
+}
+
+QScriptValuePrivate::QScriptValuePrivate(const QScriptEnginePrivate* engine, JSValueRef value)
+ : m_state(JSValue)
+ , m_engine(const_cast<QScriptEnginePrivate*>(engine))
+ , m_value(value)
+{
+ Q_ASSERT(engine);
+ JSValueProtect(context(), m_value);
+}
+
+QScriptValuePrivate::QScriptValuePrivate(const QScriptEnginePrivate* engine, JSValueRef value, JSObjectRef object)
+ : m_state(JSObject)
+ , m_engine(const_cast<QScriptEnginePrivate*>(engine))
+ , m_value(value)
+ , m_object(object)
+{
+ Q_ASSERT(engine);
+ JSValueProtect(context(), m_value);
+}
+
+bool QScriptValuePrivate::isValid() const { return m_state != Invalid; }
+
+bool QScriptValuePrivate::isBool()
+{
+ switch (m_state) {
+ case CBool:
+ return true;
+ case JSValue:
+ if (isObject())
+ return false;
+ // Fall-through.
+ case JSNative:
+ return JSValueIsBoolean(context(), value());
+ default:
+ return false;
+ }
+}
+
+bool QScriptValuePrivate::isNumber()
+{
+ switch (m_state) {
+ case CNumber:
+ return m_number;
+ case JSValue:
+ if (isObject())
+ return false;
+ // Fall-through.
+ case JSNative:
+ return JSValueIsNumber(context(), value());
+ default:
+ return false;
+ }
+}
+
+bool QScriptValuePrivate::isNull()
+{
+ switch (m_state) {
+ case CSpecial:
+ return m_number == static_cast<int>(QScriptValue::NullValue);
+ case JSValue:
+ if (isObject())
+ return false;
+ // Fall-through.
+ case JSNative:
+ return JSValueIsNull(context(), value());
+ default:
+ return false;
+ }
+}
+
+bool QScriptValuePrivate::isString()
+{
+ switch (m_state) {
+ case CString:
+ return true;
+ case JSValue:
+ if (isObject())
+ return false;
+ // Fall-through.
+ case JSNative:
+ return JSValueIsString(context(), value());
+ default:
+ return false;
+ }
+}
+
+bool QScriptValuePrivate::isUndefined()
+{
+ switch (m_state) {
+ case CSpecial:
+ return m_number == static_cast<int>(QScriptValue::UndefinedValue);
+ case JSValue:
+ if (isObject())
+ return false;
+ // Fall-through.
+ case JSNative:
+ return JSValueIsUndefined(context(), value());
+ default:
+ return false;
+ }
+}
+
+bool QScriptValuePrivate::isError()
+{
+ switch (m_state) {
+ case JSValue:
+ if (!isObject())
+ return false;
+ // Fall-through.
+ case JSObject:
+ return inherits("Error");
+ default:
+ return false;
+ }
+}
+
+bool QScriptValuePrivate::isObject()
+{
+ switch (m_state) {
+ case JSObject:
+ return true;
+ case JSValue:
+ m_object = JSValueToObject(context(), value(), /* exception */ 0);
+ if (!m_object)
+ return false;
+ m_state = JSObject;
+ return true;
+ default:
+ return false;
+ }
+}
+
+bool QScriptValuePrivate::isFunction()
+{
+ switch (m_state) {
+ case JSValue:
+ m_object = JSValueToObject(context(), value(), /* exception */ 0);
+ if (!m_object)
+ return false;
+ m_state = JSObject;
+ // Fall-through.
+ case JSObject:
+ return JSObjectIsFunction(context(), object());
+ default:
+ return false;
+ }
+}
+
+QString QScriptValuePrivate::toString() const
+{
+ switch (m_state) {
+ case Invalid:
+ return QString();
+ case CBool:
+ return m_number ? QString::fromLatin1("true") : QString::fromLatin1("false");
+ case CString:
+ return m_string;
+ case CNumber:
+ return QString::number(m_number);
+ case CSpecial:
+ return m_number == QScriptValue::NullValue ? QString::fromLatin1("null") : QString::fromLatin1("undefined");
+ case JSValue:
+ case JSNative:
+ case JSObject:
+ return QScriptConverter::toString(JSValueToStringCopy(context(), value(), /* exception */ 0));
+ }
+
+ Q_ASSERT_X(false, "toString()", "Not all states are included in the previous switch statement.");
+ return QString(); // Avoid compiler warning.
+}
+
+qsreal QScriptValuePrivate::toNumber() const
+{
+ // TODO Check it.
+ switch (m_state) {
+ case JSValue:
+ case JSNative:
+ case JSObject:
+ return JSValueToNumber(context(), value(), /* exception */ 0);
+ case CNumber:
+ case CBool:
+ return m_number;
+ case Invalid:
+ case CSpecial:
+ return false;
+ case CString:
+ return m_string.isEmpty();
+ }
+
+ Q_ASSERT_X(false, "toNumber()", "Not all states are included in the previous switch statement.");
+ return 0; // Avoid compiler warning.
+}
+
+bool QScriptValuePrivate::toBool() const
+{
+ switch (m_state) {
+ case JSValue:
+ case JSNative:
+ case JSObject:
+ return JSValueToBoolean(context(), value());
+ case CNumber:
+ case CBool:
+ return m_number;
+ case Invalid:
+ case CSpecial:
+ return false;
+ case CString:
+ return m_string.isEmpty();
+ }
+
+ Q_ASSERT_X(false, "toBool()", "Not all states are included in the previous switch statement.");
+ return false; // Avoid compiler warning.
+}
+
+qsreal QScriptValuePrivate::toInteger() const
+{
+ // TODO it is not true implementation!
+ return toNumber();
+}
+
+qint32 QScriptValuePrivate::toInt32() const
+{
+ // TODO it is not true implementation!
+ return toNumber();
+}
+
+quint32 QScriptValuePrivate::toUInt32() const
+{
+ // TODO it is not true implementation!
+ return toNumber();
+}
+
+quint16 QScriptValuePrivate::toUInt16() const
+{
+ // TODO it is not true implementation!
+ return toNumber();
+}
+
+
+bool QScriptValuePrivate::equals(QScriptValuePrivate* other)
+{
+ if (!isValid() || !other->isValid())
+ return false;
+
+ if ((m_state == other->m_state) && !isJSBased()) {
+ if (isNumberBased())
+ return m_number == other->m_number;
+ return m_string == other->m_string;
+ }
+
+ if (isJSBased() && !other->isJSBased()) {
+ if (!other->assignEngine(engine())) {
+ qWarning("equals(): Cannot compare to a value created in a different engine");
+ return false;
+ }
+ } else if (!isJSBased() && other->isJSBased()) {
+ if (!other->assignEngine(other->engine())) {
+ qWarning("equals(): Cannot compare to a value created in a different engine");
+ return false;
+ }
+ }
+
+ return JSValueIsEqual(context(), value(), other->value(), /* exception */ 0);
+}
+
+bool QScriptValuePrivate::strictlyEquals(const QScriptValuePrivate* other) const
+{
+ if (m_state != other->m_state)
+ return false;
+ if (isJSBased()) {
+ if (other->engine() != engine()) {
+ qWarning("strictlyEquals(): Cannot compare to a value created in a different engine");
+ return false;
+ }
+ return JSValueIsStrictEqual(context(), value(), other->value());
+ }
+ if (isStringBased())
+ return m_string == other->m_string;
+ if (isNumberBased())
+ return m_number == other->m_number;
+
+ return false; // Invalid state.
+}
+
+/*!
+ Tries to assign \a engine to this value. Returns true on success; otherwise returns false.
+*/
+bool QScriptValuePrivate::assignEngine(QScriptEnginePrivate* engine)
+{
+ JSValueRef value;
+ switch (m_state) {
+ case CBool:
+ value = engine->makeJSValue(static_cast<bool>(m_number));
+ break;
+ case CString:
+ value = engine->makeJSValue(m_string);
+ break;
+ case CNumber:
+ value = engine->makeJSValue(m_number);
+ break;
+ case CSpecial:
+ value = engine->makeJSValue(static_cast<QScriptValue::SpecialValue>(m_number));
+ break;
+ default:
+ if (!isJSBased())
+ Q_ASSERT_X(!isJSBased(), "assignEngine()", "Not all states are included in the previous switch statement.");
+ else
+ qWarning("JSValue can't be rassigned to an another engine.");
+ return false;
+ }
+ m_engine = engine;
+ m_state = JSNative;
+ setValue(value);
+ return true;
+}
+
+QScriptValuePrivate* QScriptValuePrivate::call(const QScriptValuePrivate*, const QScriptValueList& args)
+{
+ switch (m_state) {
+ case JSValue:
+ m_object = JSValueToObject(context(), value(), /* exception */ 0);
+ if (!object()) {
+ m_state = JSValue;
+ return new QScriptValuePrivate;
+ }
+ m_state = JSObject;
+ // Fall-through.
+ case JSObject:
+ {
+ // Convert all arguments and bind to the engine.
+ int argc = args.size();
+ QVarLengthArray<JSValueRef, 8> argv(argc);
+ QScriptValueList::const_iterator i = args.constBegin();
+ for (int j = 0; i != args.constEnd(); j++, i++) {
+ QScriptValuePrivate* value = QScriptValuePrivate::get(*i);
+ if (!value->assignEngine(engine())) {
+ qWarning("QScriptValue::call() failed: cannot call function with values created in a different engine");
+ return new QScriptValuePrivate;
+ }
+ argv[j] = value->value();
+ }
+
+ // Make the call
+ JSValueRef exception = 0;
+ JSValueRef result = JSObjectCallAsFunction(context(), object(), /* thisObject */ 0, argc, argv.constData(), &exception);
+ if (!result && exception)
+ return new QScriptValuePrivate(engine(), exception);
+ if (result && !exception)
+ return new QScriptValuePrivate(engine(), result);
+ }
+ // this QSV is not a function <-- !result && !exception. Fall-through.
+ default:
+ return new QScriptValuePrivate;
+ }
+}
+
+QScriptEnginePrivate* QScriptValuePrivate::engine() const
+{
+ // As long as m_engine is an autoinitializated pointer we can safely return it without
+ // checking current state.
+ return m_engine.data();
+}
+
+JSGlobalContextRef QScriptValuePrivate::context() const
+{
+ Q_ASSERT(isJSBased());
+ return m_engine->context();
+}
+
+JSValueRef QScriptValuePrivate::value() const
+{
+ Q_ASSERT(isJSBased());
+ return m_value;
+}
+
+JSObjectRef QScriptValuePrivate::object() const
+{
+ Q_ASSERT(m_state == JSObject);
+ return m_object;
+}
+
+void QScriptValuePrivate::setValue(JSValueRef value)
+{
+ if (m_value)
+ JSValueUnprotect(context(), m_value);
+ if (value)
+ JSValueProtect(context(), value);
+ m_value = value;
+}
+
+/*!
+ \internal
+ Returns true if QSV is created from constructor with the given \a name, it has to be a
+ built-in type.
+*/
+bool QScriptValuePrivate::inherits(const char* name)
+{
+ Q_ASSERT(isJSBased());
+ JSObjectRef globalObject = JSContextGetGlobalObject(context());
+ JSValueRef error = JSObjectGetProperty(context(), globalObject, QScriptConverter::toString(name), 0);
+ return JSValueIsInstanceOfConstructor(context(), value(), JSValueToObject(context(), error, /* exception */ 0), /* exception */ 0);
+}
+
+/*!
+ \internal
+ Returns true if QSV have an engine associated.
+*/
+bool QScriptValuePrivate::isJSBased() const { return m_state >= JSValue; }
+
+/*!
+ \internal
+ Returns true if current value of QSV is placed in m_number.
+*/
+bool QScriptValuePrivate::isNumberBased() const { return !isJSBased() && !isStringBased() && m_state != Invalid; }
+
+/*!
+ \internal
+ Returns true if current value of QSV is placed in m_string.
+*/
+bool QScriptValuePrivate::isStringBased() const { return m_state == CString; }
+
+#endif // qscriptvalue_p_h
diff --git a/JavaScriptCore/qt/api/qtscriptglobal.h b/JavaScriptCore/qt/api/qtscriptglobal.h
new file mode 100644
index 0000000..29749c0
--- /dev/null
+++ b/JavaScriptCore/qt/api/qtscriptglobal.h
@@ -0,0 +1,44 @@
+/*
+ Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef qtscriptglobal_h
+#define qtscriptglobal_h
+
+#include <QtCore/qglobal.h>
+
+#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+# if defined(QT_NODLL)
+# elif defined(QT_MAKEDLL) /* create a Qt DLL library */
+# if defined(QT_BUILD_JAVASCRIPT_LIB)
+# define Q_JAVASCRIPT_EXPORT Q_DECL_EXPORT
+# else
+# define Q_JAVASCRIPT_EXPORT Q_DECL_IMPORT
+# endif
+# elif defined(QT_DLL) /* use a Qt DLL library */
+# define Q_JAVASCRIPT_EXPORT
+# endif
+#endif
+
+#if defined(QT_SHARED)
+# define Q_JAVASCRIPT_EXPORT Q_DECL_EXPORT
+#else
+# define Q_JAVASCRIPT_EXPORT
+#endif
+
+#endif
diff --git a/JavaScriptCore/qt/tests/qscriptengine/qscriptengine.pro b/JavaScriptCore/qt/tests/qscriptengine/qscriptengine.pro
new file mode 100644
index 0000000..0dc0902
--- /dev/null
+++ b/JavaScriptCore/qt/tests/qscriptengine/qscriptengine.pro
@@ -0,0 +1,7 @@
+TEMPLATE = app
+TARGET = tst_qscriptengine
+QT += testlib
+include(../tests.pri)
+
+SOURCES += tst_qscriptengine.cpp
+
diff --git a/JavaScriptCore/qt/tests/qscriptengine/tst_qscriptengine.cpp b/JavaScriptCore/qt/tests/qscriptengine/tst_qscriptengine.cpp
new file mode 100644
index 0000000..37f3d11
--- /dev/null
+++ b/JavaScriptCore/qt/tests/qscriptengine/tst_qscriptengine.cpp
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "qscriptengine.h"
+#include "qscriptvalue.h"
+#include <QtTest/qtest.h>
+
+class tst_QScriptEngine : public QObject {
+ Q_OBJECT
+
+public:
+ tst_QScriptEngine() {}
+ virtual ~tst_QScriptEngine() {}
+
+public slots:
+ void init() {}
+ void cleanup() {}
+
+private slots:
+ void evaluate();
+ void collectGarbage();
+};
+
+/* Evaluating a script that throw an unhandled exception should return an invalid value. */
+void tst_QScriptEngine::evaluate()
+{
+ QScriptEngine engine;
+ QVERIFY2(engine.evaluate("1+1").isValid(), "the expression should be evaluated and an valid result should be returned");
+ QVERIFY2(engine.evaluate("ping").isValid(), "Script throwing an unhandled exception should return an exception value");
+}
+
+/* Test garbage collection, at least try to not crash. */
+void tst_QScriptEngine::collectGarbage()
+{
+ QScriptEngine engine;
+ QScriptValue foo = engine.evaluate("( function foo() {return 'pong';} )");
+ QVERIFY(foo.isFunction());
+ engine.collectGarbage();
+ QCOMPARE(foo.call().toString(), QString::fromAscii("pong"));
+}
+QTEST_MAIN(tst_QScriptEngine)
+#include "tst_qscriptengine.moc"
diff --git a/JavaScriptCore/qt/tests/qscriptvalue/qscriptvalue.pro b/JavaScriptCore/qt/tests/qscriptvalue/qscriptvalue.pro
new file mode 100644
index 0000000..1ce5bc3
--- /dev/null
+++ b/JavaScriptCore/qt/tests/qscriptvalue/qscriptvalue.pro
@@ -0,0 +1,7 @@
+TEMPLATE = app
+TARGET = tst_qscriptvalue
+QT += testlib
+include(../tests.pri)
+
+SOURCES += tst_qscriptvalue.cpp
+
diff --git a/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.cpp b/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.cpp
new file mode 100644
index 0000000..336a1a6
--- /dev/null
+++ b/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.cpp
@@ -0,0 +1,427 @@
+/*
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "qscriptengine.h"
+#include "qscriptvalue.h"
+#include <QtTest/qtest.h>
+
+Q_DECLARE_METATYPE(QScriptValue*);
+Q_DECLARE_METATYPE(QScriptValue);
+
+class tst_QScriptValue : public QObject {
+ Q_OBJECT
+
+public:
+ tst_QScriptValue() {}
+ virtual ~tst_QScriptValue() {}
+
+private slots:
+ void toString_data();
+ void toString();
+ void copyConstructor_data();
+ void copyConstructor();
+ void assignOperator_data();
+ void assignOperator();
+ void dataSharing();
+ void constructors_data();
+ void constructors();
+ void call();
+
+ // copied from Qt's QtScript.
+ void ctor();
+};
+
+void tst_QScriptValue::ctor()
+{
+ QScriptEngine eng;
+ {
+ QScriptValue v;
+ QCOMPARE(v.isValid(), false);
+ QCOMPARE(v.engine(), (QScriptEngine *)0);
+ }
+ {
+ QScriptValue v(&eng, QScriptValue::UndefinedValue);
+ QCOMPARE(v.isValid(), true);
+ QCOMPARE(v.isUndefined(), true);
+ QCOMPARE(v.isObject(), false);
+ QCOMPARE(v.engine(), &eng);
+ }
+ {
+ QScriptValue v(&eng, QScriptValue::NullValue);
+ QCOMPARE(v.isValid(), true);
+ QCOMPARE(v.isNull(), true);
+ QCOMPARE(v.isObject(), false);
+ QCOMPARE(v.engine(), &eng);
+ }
+ {
+ QScriptValue v(&eng, false);
+ QCOMPARE(v.isValid(), true);
+ QCOMPARE(v.isBoolean(), true);
+ QCOMPARE(v.isBool(), true);
+ QCOMPARE(v.isObject(), false);
+ QCOMPARE(v.toBoolean(), false);
+ QCOMPARE(v.engine(), &eng);
+ }
+ {
+ QScriptValue v(&eng, int(1));
+ QCOMPARE(v.isValid(), true);
+ QCOMPARE(v.isNumber(), true);
+ QCOMPARE(v.isObject(), false);
+ QCOMPARE(v.toNumber(), 1.0);
+ QCOMPARE(v.engine(), &eng);
+ }
+ {
+ QScriptValue v(int(0x43211234));
+ QVERIFY(v.isNumber());
+ QCOMPARE(v.toInt32(), 0x43211234);
+ }
+ {
+ QScriptValue v(&eng, uint(1));
+ QCOMPARE(v.isValid(), true);
+ QCOMPARE(v.isNumber(), true);
+ QCOMPARE(v.isObject(), false);
+ QCOMPARE(v.toNumber(), 1.0);
+ QCOMPARE(v.engine(), &eng);
+ }
+ {
+ QScriptValue v(uint(0x43211234));
+ QVERIFY(v.isNumber());
+ QCOMPARE(v.toUInt32(), uint(0x43211234));
+ }
+ {
+ QScriptValue v(&eng, 1.0);
+ QCOMPARE(v.isValid(), true);
+ QCOMPARE(v.isNumber(), true);
+ QCOMPARE(v.isObject(), false);
+ QCOMPARE(v.toNumber(), 1.0);
+ QCOMPARE(v.engine(), &eng);
+ }
+ {
+ QScriptValue v(12345678910.5);
+ QVERIFY(v.isNumber());
+ QCOMPARE(v.toNumber(), 12345678910.5);
+ }
+ {
+ QScriptValue v(&eng, "ciao");
+ QCOMPARE(v.isValid(), true);
+ QCOMPARE(v.isString(), true);
+ QCOMPARE(v.isObject(), false);
+ QCOMPARE(v.toString(), QLatin1String("ciao"));
+ QCOMPARE(v.engine(), &eng);
+ }
+ {
+ QScriptValue v(&eng, QString("ciao"));
+ QCOMPARE(v.isValid(), true);
+ QCOMPARE(v.isString(), true);
+ QCOMPARE(v.isObject(), false);
+ QCOMPARE(v.toString(), QLatin1String("ciao"));
+ QCOMPARE(v.engine(), &eng);
+ }
+ // copy constructor, operator=
+ {
+ QScriptValue v(&eng, 1.0);
+ QScriptValue v2(v);
+ QCOMPARE(v2.strictlyEquals(v), true);
+ QCOMPARE(v2.engine(), &eng);
+
+ QScriptValue v3(v);
+ QCOMPARE(v3.strictlyEquals(v), true);
+ QCOMPARE(v3.strictlyEquals(v2), true);
+ QCOMPARE(v3.engine(), &eng);
+
+ QScriptValue v4(&eng, 2.0);
+ QCOMPARE(v4.strictlyEquals(v), false);
+ v3 = v4;
+ QCOMPARE(v3.strictlyEquals(v), false);
+ QCOMPARE(v3.strictlyEquals(v4), true);
+
+ v2 = QScriptValue();
+ QCOMPARE(v2.strictlyEquals(v), false);
+ QCOMPARE(v.toNumber(), 1.0);
+
+ QScriptValue v5(v);
+ QCOMPARE(v5.strictlyEquals(v), true);
+ v = QScriptValue();
+ QCOMPARE(v5.strictlyEquals(v), false);
+ QCOMPARE(v5.toNumber(), 1.0);
+ }
+
+ // constructors that take no engine argument
+ {
+ QScriptValue v(QScriptValue::UndefinedValue);
+ QCOMPARE(v.isValid(), true);
+ QCOMPARE(v.isUndefined(), true);
+ QCOMPARE(v.isObject(), false);
+ QCOMPARE(v.engine(), (QScriptEngine *)0);
+ }
+ {
+ QScriptValue v(QScriptValue::NullValue);
+ QCOMPARE(v.isValid(), true);
+ QCOMPARE(v.isNull(), true);
+ QCOMPARE(v.isObject(), false);
+ QCOMPARE(v.engine(), (QScriptEngine *)0);
+ }
+ {
+ QScriptValue v(false);
+ QCOMPARE(v.isValid(), true);
+ QCOMPARE(v.isBoolean(), true);
+ QCOMPARE(v.isBool(), true);
+ QCOMPARE(v.isObject(), false);
+ QCOMPARE(v.toBoolean(), false);
+ QCOMPARE(v.engine(), (QScriptEngine *)0);
+ }
+ {
+ QScriptValue v(int(1));
+ QCOMPARE(v.isValid(), true);
+ QCOMPARE(v.isNumber(), true);
+ QCOMPARE(v.isObject(), false);
+ QCOMPARE(v.toNumber(), 1.0);
+ QCOMPARE(v.engine(), (QScriptEngine *)0);
+ }
+ {
+ QScriptValue v(uint(1));
+ QCOMPARE(v.isValid(), true);
+ QCOMPARE(v.isNumber(), true);
+ QCOMPARE(v.isObject(), false);
+ QCOMPARE(v.toNumber(), 1.0);
+ QCOMPARE(v.engine(), (QScriptEngine *)0);
+ }
+ {
+ QScriptValue v(1.0);
+ QCOMPARE(v.isValid(), true);
+ QCOMPARE(v.isNumber(), true);
+ QCOMPARE(v.isObject(), false);
+ QCOMPARE(v.toNumber(), 1.0);
+ QCOMPARE(v.engine(), (QScriptEngine *)0);
+ }
+ {
+ QScriptValue v("ciao");
+ QCOMPARE(v.isValid(), true);
+ QCOMPARE(v.isString(), true);
+ QCOMPARE(v.isObject(), false);
+ QCOMPARE(v.toString(), QLatin1String("ciao"));
+ QCOMPARE(v.engine(), (QScriptEngine *)0);
+ }
+ {
+ QScriptValue v(QString("ciao"));
+ QCOMPARE(v.isValid(), true);
+ QCOMPARE(v.isString(), true);
+ QCOMPARE(v.isObject(), false);
+ QCOMPARE(v.toString(), QLatin1String("ciao"));
+ QCOMPARE(v.engine(), (QScriptEngine *)0);
+ }
+ // copy constructor, operator=
+ {
+ QScriptValue v(1.0);
+ QScriptValue v2(v);
+ QCOMPARE(v2.strictlyEquals(v), true);
+ QCOMPARE(v2.engine(), (QScriptEngine *)0);
+
+ QScriptValue v3(v);
+ QCOMPARE(v3.strictlyEquals(v), true);
+ QCOMPARE(v3.strictlyEquals(v2), true);
+ QCOMPARE(v3.engine(), (QScriptEngine *)0);
+
+ QScriptValue v4(2.0);
+ QCOMPARE(v4.strictlyEquals(v), false);
+ v3 = v4;
+ QCOMPARE(v3.strictlyEquals(v), false);
+ QCOMPARE(v3.strictlyEquals(v4), true);
+
+ v2 = QScriptValue();
+ QCOMPARE(v2.strictlyEquals(v), false);
+ QCOMPARE(v.toNumber(), 1.0);
+
+ QScriptValue v5(v);
+ QCOMPARE(v5.strictlyEquals(v), true);
+ v = QScriptValue();
+ QCOMPARE(v5.strictlyEquals(v), false);
+ QCOMPARE(v5.toNumber(), 1.0);
+ }
+
+ // 0 engine
+ QVERIFY(QScriptValue(0, QScriptValue::UndefinedValue).isUndefined());
+ QVERIFY(QScriptValue(0, QScriptValue::NullValue).isNull());
+ QVERIFY(QScriptValue(0, false).isBool());
+ QVERIFY(QScriptValue(0, int(1)).isNumber());
+ QVERIFY(QScriptValue(0, uint(1)).isNumber());
+ QVERIFY(QScriptValue(0, 1.0).isNumber());
+ QVERIFY(QScriptValue(0, "ciao").isString());
+ QVERIFY(QScriptValue(0, QString("ciao")).isString());
+}
+
+void tst_QScriptValue::toString_data()
+{
+ QTest::addColumn<QString>("code");
+ QTest::addColumn<QString>("result");
+
+ QTest::newRow("string") << QString::fromAscii("'hello'") << QString::fromAscii("hello");
+ QTest::newRow("string utf") << QString::fromUtf8("'ąśćżźółńę'") << QString::fromUtf8("ąśćżźółńę");
+ QTest::newRow("expression") << QString::fromAscii("1 + 4") << QString::fromAscii("5");
+ QTest::newRow("null") << QString::fromAscii("null") << QString::fromAscii("null");
+ QTest::newRow("boolean") << QString::fromAscii("false") << QString::fromAscii("false");
+ QTest::newRow("undefined") << QString::fromAscii("undefined") << QString::fromAscii("undefined");
+ QTest::newRow("object") << QString::fromAscii("new Object") << QString::fromAscii("[object Object]");
+}
+
+/* Test conversion to string from different JSC types */
+void tst_QScriptValue::toString()
+{
+ QFETCH(QString, code);
+ QFETCH(QString, result);
+
+ QScriptEngine engine;
+ QCOMPARE(engine.evaluate(code).toString(), result);
+}
+
+void tst_QScriptValue::copyConstructor_data()
+{
+ QScriptEngine engine;
+ QScriptValue nnumber(123);
+ QScriptValue nstring("ping");
+ QScriptValue number(engine.evaluate("1"));
+ QScriptValue string(engine.evaluate("'foo'"));
+ QScriptValue object(engine.evaluate("new Object"));
+ QScriptValue undefined(engine.evaluate("undefined"));
+ QScriptValue null(engine.evaluate("null"));
+
+ QTest::addColumn<QScriptValue>("value");
+ QTest::addColumn<QString>("result");
+
+ QTest::newRow("native number") << nnumber << QString::number(123);
+ QTest::newRow("native string") << nstring << QString("ping");
+ QTest::newRow("number") << number << QString::fromAscii("1");
+ QTest::newRow("string") << string << QString::fromAscii("foo");
+ QTest::newRow("object") << object << QString::fromAscii("[object Object]");
+ QTest::newRow("undefined") << undefined << QString::fromAscii("undefined");
+ QTest::newRow("null") << null << QString::fromAscii("null");
+}
+
+void tst_QScriptValue::copyConstructor()
+{
+ QFETCH(QScriptValue, value);
+ QFETCH(QString, result);
+
+ QVERIFY(value.isValid());
+ QScriptValue tmp(value);
+ QVERIFY(tmp.isValid());
+ QCOMPARE(tmp.toString(), result);
+}
+
+void tst_QScriptValue::assignOperator_data()
+{
+ copyConstructor_data();
+}
+
+void tst_QScriptValue::assignOperator()
+{
+ QFETCH(QScriptValue, value);
+ QFETCH(QString, result);
+
+ QScriptValue tmp;
+ tmp = value;
+ QVERIFY(tmp.isValid());
+ QCOMPARE(tmp.toString(), result);
+}
+
+/* Test internal data sharing between a diffrenet QScriptValue. */
+void tst_QScriptValue::dataSharing()
+{
+ QScriptEngine engine;
+ QScriptValue v1;
+ QScriptValue v2(v1);
+
+ v1 = engine.evaluate("1"); // v1 == 1 ; v2 invalid.
+ QVERIFY(v1.isValid());
+ QVERIFY(!v2.isValid());
+
+ v2 = v1; // v1 == 1; v2 == 1.
+ QVERIFY(v1.isValid());
+ QVERIFY(v2.isValid());
+
+ v1 = engine.evaluate("obj = new Date"); // v1 == [object Date] ; v2 == 1.
+ QVERIFY(v1.isValid());
+ QVERIFY(v2.isValid());
+ QVERIFY(v2.toString() != v1.toString());
+
+ // TODO add object manipulation (v1 and v2 point to the same object).
+}
+
+void tst_QScriptValue::constructors_data()
+{
+ QScriptEngine engine;
+
+ QTest::addColumn<QScriptValue>("value");
+ QTest::addColumn<QString>("string");
+ QTest::addColumn<bool>("valid");
+ QTest::addColumn<bool>("object");
+
+ QTest::newRow("invalid") << QScriptValue() << QString() << false << false;
+ QTest::newRow("number") << QScriptValue(-21) << QString::number(-21) << true << false;
+ QTest::newRow("bool") << QScriptValue(true) << QString::fromAscii("true") << true << false;
+ QTest::newRow("double") << QScriptValue(21.12) << QString::number(21.12) << true << false;
+ QTest::newRow("string") << QScriptValue("AlaMaKota") << QString::fromAscii("AlaMaKota") << true << false;
+ QTest::newRow("object") << engine.evaluate("new Object") << QString::fromAscii("[object Object]") << true << true;
+ QTest::newRow("null") << QScriptValue(QScriptValue::NullValue)<< QString::fromAscii("null") << true << false;
+ QTest::newRow("undef") << QScriptValue(QScriptValue::UndefinedValue)<< QString::fromAscii("undefined") << true << false;
+}
+
+void tst_QScriptValue::constructors()
+{
+ QFETCH(QScriptValue, value);
+ QFETCH(QString, string);
+ QFETCH(bool, valid);
+ QFETCH(bool, object);
+
+ QCOMPARE(value.isValid(), valid);
+ QCOMPARE(value.toString(), string);
+ QCOMPARE(value.isObject(), object);
+}
+
+void tst_QScriptValue::call()
+{
+ QScriptEngine engine;
+ QScriptValue ping = engine.evaluate("( function() {return 'ping';} )");
+ QScriptValue incr = engine.evaluate("( function(i) {return i + 1;} )");
+ QScriptValue one(1);
+ QScriptValue five(5);
+ QScriptValue result;
+
+ QVERIFY(one.isValid());
+ QVERIFY(five.isValid());
+
+ QVERIFY(ping.isValid());
+ QVERIFY(ping.isFunction());
+ result = ping.call();
+ QVERIFY(result.isValid());
+ QCOMPARE(result.toString(), QString::fromUtf8("ping"));
+
+ QVERIFY(incr.isValid());
+ QVERIFY(incr.isFunction());
+ result = incr.call(QScriptValue(), QScriptValueList() << one);
+ QVERIFY(result.isValid());
+ QCOMPARE(result.toString(), QString("2"));
+
+ QCOMPARE(incr.call(QScriptValue(), QScriptValueList() << five).toString(), QString::fromAscii("6"));
+
+ QVERIFY(incr.call().isValid()); // Exception.
+}
+
+QTEST_MAIN(tst_QScriptValue)
+#include "tst_qscriptvalue.moc"
diff --git a/JavaScriptCore/qt/tests/tests.pri b/JavaScriptCore/qt/tests/tests.pri
new file mode 100644
index 0000000..1ce238f
--- /dev/null
+++ b/JavaScriptCore/qt/tests/tests.pri
@@ -0,0 +1,28 @@
+isEmpty(OUTPUT_DIR) {
+ CONFIG(debug, debug|release) {
+ OUTPUT_DIR=$$PWD/WebKitBuild/Debug
+ } else { # Release
+ OUTPUT_DIR=$$PWD/WebKitBuild/Release
+ }
+}
+
+
+QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
+QMAKE_LIBDIR = $$OUTPUT_DIR/lib $$QMAKE_LIBDIR
+mac:!static:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework) {
+ LIBS += -framework QtScript
+ QMAKE_FRAMEWORKPATH = $$OUTPUT_DIR/lib $$QMAKE_FRAMEWORKPATH
+} else {
+ win32-*|wince* {
+ LIBS += -lQtScript$${QT_MAJOR_VERSION}
+ } else {
+ LIBS += -lQtScript
+ }
+}
+
+CONFIG(release, debug|release) {
+ DEFINES += NDEBUG
+}
+
+INCLUDEPATH += $$PWD/../api
+
diff --git a/JavaScriptCore/qt/tests/tests.pro b/JavaScriptCore/qt/tests/tests.pro
new file mode 100644
index 0000000..6e5edb1
--- /dev/null
+++ b/JavaScriptCore/qt/tests/tests.pro
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+SUBDIRS = qscriptengine \
+ qscriptvalue
diff --git a/JavaScriptCore/runtime/Arguments.cpp b/JavaScriptCore/runtime/Arguments.cpp
index 86a8f0a..bb30e3b 100644
--- a/JavaScriptCore/runtime/Arguments.cpp
+++ b/JavaScriptCore/runtime/Arguments.cpp
@@ -204,6 +204,19 @@ bool Arguments::getOwnPropertyDescriptor(ExecState* exec, const Identifier& prop
return JSObject::getOwnPropertyDescriptor(exec, propertyName, descriptor);
}
+void Arguments::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
+{
+ if (mode == IncludeDontEnumProperties) {
+ for (unsigned i = 0; i < d->numArguments; ++i) {
+ if (!d->deletedArguments || !d->deletedArguments[i])
+ propertyNames.add(Identifier(exec, UString::from(i)));
+ }
+ propertyNames.add(exec->propertyNames().callee);
+ propertyNames.add(exec->propertyNames().length);
+ }
+ JSObject::getOwnPropertyNames(exec, propertyNames, mode);
+}
+
void Arguments::put(ExecState* exec, unsigned i, JSValue value, PutPropertySlot& slot)
{
if (i < d->numArguments && (!d->deletedArguments || !d->deletedArguments[i])) {
diff --git a/JavaScriptCore/runtime/Arguments.h b/JavaScriptCore/runtime/Arguments.h
index 9b674a2..9797e08 100644
--- a/JavaScriptCore/runtime/Arguments.h
+++ b/JavaScriptCore/runtime/Arguments.h
@@ -85,7 +85,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
@@ -96,6 +96,7 @@ namespace JSC {
virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
virtual bool getOwnPropertySlot(ExecState*, unsigned propertyName, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
+ virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
virtual void put(ExecState*, unsigned propertyName, JSValue, PutPropertySlot&);
virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
diff --git a/JavaScriptCore/runtime/ArrayPrototype.cpp b/JavaScriptCore/runtime/ArrayPrototype.cpp
index 5b359e7..ce814b2 100644
--- a/JavaScriptCore/runtime/ArrayPrototype.cpp
+++ b/JavaScriptCore/runtime/ArrayPrototype.cpp
@@ -204,8 +204,7 @@ JSValue JSC_HOST_CALL arrayProtoFuncToString(ExecState* exec, JSObject*, JSValue
buffer.append(rep->data(), rep->size());
}
ASSERT(buffer.size() == totalSize);
- unsigned finalSize = buffer.size();
- return jsString(exec, UString(buffer.releaseBuffer(), finalSize, false));
+ return jsString(exec, UString::adopt(buffer));
}
JSValue JSC_HOST_CALL arrayProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
diff --git a/JavaScriptCore/runtime/BooleanObject.h b/JavaScriptCore/runtime/BooleanObject.h
index 69c2e51..4b02acb 100644
--- a/JavaScriptCore/runtime/BooleanObject.h
+++ b/JavaScriptCore/runtime/BooleanObject.h
@@ -34,7 +34,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
};
diff --git a/JavaScriptCore/runtime/Collector.cpp b/JavaScriptCore/runtime/Collector.cpp
index 1630a58..63139a2 100644
--- a/JavaScriptCore/runtime/Collector.cpp
+++ b/JavaScriptCore/runtime/Collector.cpp
@@ -45,7 +45,7 @@
#include <wtf/UnusedParam.h>
#include <wtf/VMTags.h>
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
#include <mach/mach_init.h>
#include <mach/mach_port.h>
@@ -53,29 +53,29 @@
#include <mach/thread_act.h>
#include <mach/vm_map.h>
-#elif PLATFORM(SYMBIAN)
+#elif OS(SYMBIAN)
#include <e32std.h>
#include <e32cmn.h>
#include <unistd.h>
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
#include <windows.h>
#include <malloc.h>
-#elif PLATFORM(HAIKU)
+#elif OS(HAIKU)
#include <OS.h>
-#elif PLATFORM(UNIX)
+#elif OS(UNIX)
#include <stdlib.h>
-#if !PLATFORM(HAIKU)
+#if !OS(HAIKU)
#include <sys/mman.h>
#endif
#include <unistd.h>
-#if PLATFORM(SOLARIS)
+#if OS(SOLARIS)
#include <thread.h>
#else
#include <pthread.h>
@@ -85,7 +85,7 @@
#include <pthread_np.h>
#endif
-#if PLATFORM(QNX)
+#if OS(QNX)
#include <fcntl.h>
#include <sys/procfs.h>
#include <stdio.h>
@@ -104,21 +104,21 @@ namespace JSC {
const size_t GROWTH_FACTOR = 2;
const size_t LOW_WATER_FACTOR = 4;
-const size_t ALLOCATIONS_PER_COLLECTION = 4000;
+const size_t ALLOCATIONS_PER_COLLECTION = 3600;
// This value has to be a macro to be used in max() without introducing
// a PIC branch in Mach-O binaries, see <rdar://problem/5971391>.
#define MIN_ARRAY_SIZE (static_cast<size_t>(14))
-#if PLATFORM(SYMBIAN)
+#if OS(SYMBIAN)
const size_t MAX_NUM_BLOCKS = 256; // Max size of collector heap set to 16 MB
static RHeap* userChunk = 0;
#endif
#if ENABLE(JSC_MULTIPLE_THREADS)
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
typedef mach_port_t PlatformThread;
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
typedef HANDLE PlatformThread;
#endif
@@ -148,8 +148,8 @@ Heap::Heap(JSGlobalData* globalData)
, m_globalData(globalData)
{
ASSERT(globalData);
-
-#if PLATFORM(SYMBIAN)
+
+#if OS(SYMBIAN)
// Symbian OpenC supports mmap but currently not the MAP_ANON flag.
// Using fastMalloc() does not properly align blocks on 64k boundaries
// and previous implementation was flawed/incomplete.
@@ -167,10 +167,10 @@ Heap::Heap(JSGlobalData* globalData)
if (!userChunk)
CRASH();
}
-#endif // PLATFORM(SYMBIAN)
+#endif // OS(SYMBIAN)
- memset(&primaryHeap, 0, sizeof(CollectorHeap));
- memset(&numberHeap, 0, sizeof(CollectorHeap));
+ memset(&m_heap, 0, sizeof(CollectorHeap));
+ allocateBlock();
}
Heap::~Heap()
@@ -186,6 +186,9 @@ void Heap::destroy()
if (!m_globalData)
return;
+ ASSERT(!m_globalData->dynamicGlobalObject);
+ ASSERT(!isBusy());
+
// The global object is not GC protected at this point, so sweeping may delete it
// (and thus the global data) before other objects that may use the global data.
RefPtr<JSGlobalData> protect(m_globalData);
@@ -193,15 +196,7 @@ void Heap::destroy()
delete m_markListSet;
m_markListSet = 0;
- sweep<PrimaryHeap>();
- // No need to sweep number heap, because the JSNumber destructor doesn't do anything.
-#if ENABLE(JSC_ZOMBIES)
- ASSERT(primaryHeap.numLiveObjects == primaryHeap.numZombies);
-#else
- ASSERT(!primaryHeap.numLiveObjects);
-#endif
- freeBlocks(&primaryHeap);
- freeBlocks(&numberHeap);
+ freeBlocks();
#if ENABLE(JSC_MULTIPLE_THREADS)
if (m_currentThreadRegistrar) {
@@ -220,24 +215,20 @@ void Heap::destroy()
m_globalData = 0;
}
-template <HeapType heapType>
NEVER_INLINE CollectorBlock* Heap::allocateBlock()
{
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
vm_address_t address = 0;
- // FIXME: tag the region as a JavaScriptCore heap when we get a registered VM tag: <rdar://problem/6054788>.
vm_map(current_task(), &address, BLOCK_SIZE, BLOCK_OFFSET_MASK, VM_FLAGS_ANYWHERE | VM_TAG_FOR_COLLECTOR_MEMORY, MEMORY_OBJECT_NULL, 0, FALSE, VM_PROT_DEFAULT, VM_PROT_DEFAULT, VM_INHERIT_DEFAULT);
-#elif PLATFORM(SYMBIAN)
+#elif OS(SYMBIAN)
// Allocate a 64 kb aligned CollectorBlock
unsigned char* mask = reinterpret_cast<unsigned char*>(userChunk->Alloc(BLOCK_SIZE));
if (!mask)
CRASH();
uintptr_t address = reinterpret_cast<uintptr_t>(mask);
-
- memset(reinterpret_cast<void*>(address), 0, BLOCK_SIZE);
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
void* address = VirtualAlloc(NULL, BLOCK_SIZE, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
#if COMPILER(MINGW)
void* address = __mingw_aligned_malloc(BLOCK_SIZE, BLOCK_SIZE);
#else
@@ -247,7 +238,6 @@ NEVER_INLINE CollectorBlock* Heap::allocateBlock()
#elif HAVE(POSIX_MEMALIGN)
void* address;
posix_memalign(&address, BLOCK_SIZE, BLOCK_SIZE);
- memset(address, 0, BLOCK_SIZE);
#else
#if ENABLE(JSC_MULTIPLE_THREADS)
@@ -273,55 +263,63 @@ NEVER_INLINE CollectorBlock* Heap::allocateBlock()
munmap(reinterpret_cast<char*>(address + adjust + BLOCK_SIZE), extra - adjust);
address += adjust;
- memset(reinterpret_cast<void*>(address), 0, BLOCK_SIZE);
#endif
+ // Initialize block.
+
CollectorBlock* block = reinterpret_cast<CollectorBlock*>(address);
- block->freeList = block->cells;
block->heap = this;
- block->type = heapType;
+ clearMarkBits(block);
- CollectorHeap& heap = heapType == PrimaryHeap ? primaryHeap : numberHeap;
- size_t numBlocks = heap.numBlocks;
- if (heap.usedBlocks == numBlocks) {
+ Structure* dummyMarkableCellStructure = m_globalData->dummyMarkableCellStructure.get();
+ for (size_t i = 0; i < HeapConstants::cellsPerBlock; ++i)
+ new (block->cells + i) JSCell(dummyMarkableCellStructure);
+
+ // Add block to blocks vector.
+
+ size_t numBlocks = m_heap.numBlocks;
+ if (m_heap.usedBlocks == numBlocks) {
static const size_t maxNumBlocks = ULONG_MAX / sizeof(CollectorBlock*) / GROWTH_FACTOR;
if (numBlocks > maxNumBlocks)
CRASH();
numBlocks = max(MIN_ARRAY_SIZE, numBlocks * GROWTH_FACTOR);
- heap.numBlocks = numBlocks;
- heap.blocks = static_cast<CollectorBlock**>(fastRealloc(heap.blocks, numBlocks * sizeof(CollectorBlock*)));
+ m_heap.numBlocks = numBlocks;
+ m_heap.blocks = static_cast<CollectorBlock**>(fastRealloc(m_heap.blocks, numBlocks * sizeof(CollectorBlock*)));
}
- heap.blocks[heap.usedBlocks++] = block;
+ m_heap.blocks[m_heap.usedBlocks++] = block;
return block;
}
-template <HeapType heapType>
NEVER_INLINE void Heap::freeBlock(size_t block)
{
- CollectorHeap& heap = heapType == PrimaryHeap ? primaryHeap : numberHeap;
+ m_heap.didShrink = true;
- freeBlock(heap.blocks[block]);
+ ObjectIterator it(m_heap, block);
+ ObjectIterator end(m_heap, block + 1);
+ for ( ; it != end; ++it)
+ (*it)->~JSCell();
+ freeBlockPtr(m_heap.blocks[block]);
// swap with the last block so we compact as we go
- heap.blocks[block] = heap.blocks[heap.usedBlocks - 1];
- heap.usedBlocks--;
+ m_heap.blocks[block] = m_heap.blocks[m_heap.usedBlocks - 1];
+ m_heap.usedBlocks--;
- if (heap.numBlocks > MIN_ARRAY_SIZE && heap.usedBlocks < heap.numBlocks / LOW_WATER_FACTOR) {
- heap.numBlocks = heap.numBlocks / GROWTH_FACTOR;
- heap.blocks = static_cast<CollectorBlock**>(fastRealloc(heap.blocks, heap.numBlocks * sizeof(CollectorBlock*)));
+ if (m_heap.numBlocks > MIN_ARRAY_SIZE && m_heap.usedBlocks < m_heap.numBlocks / LOW_WATER_FACTOR) {
+ m_heap.numBlocks = m_heap.numBlocks / GROWTH_FACTOR;
+ m_heap.blocks = static_cast<CollectorBlock**>(fastRealloc(m_heap.blocks, m_heap.numBlocks * sizeof(CollectorBlock*)));
}
}
-NEVER_INLINE void Heap::freeBlock(CollectorBlock* block)
+NEVER_INLINE void Heap::freeBlockPtr(CollectorBlock* block)
{
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
vm_deallocate(current_task(), reinterpret_cast<vm_address_t>(block), BLOCK_SIZE);
-#elif PLATFORM(SYMBIAN)
+#elif OS(SYMBIAN)
userChunk->Free(reinterpret_cast<TAny*>(block));
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
VirtualFree(block, 0, MEM_RELEASE);
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
#if COMPILER(MINGW)
__mingw_aligned_free(block);
#else
@@ -334,13 +332,34 @@ NEVER_INLINE void Heap::freeBlock(CollectorBlock* block)
#endif
}
-void Heap::freeBlocks(CollectorHeap* heap)
+void Heap::freeBlocks()
{
- for (size_t i = 0; i < heap->usedBlocks; ++i)
- if (heap->blocks[i])
- freeBlock(heap->blocks[i]);
- fastFree(heap->blocks);
- memset(heap, 0, sizeof(CollectorHeap));
+ ProtectCountSet protectedValuesCopy = m_protectedValues;
+
+ clearMarkBits();
+ ProtectCountSet::iterator protectedValuesEnd = protectedValuesCopy.end();
+ for (ProtectCountSet::iterator it = protectedValuesCopy.begin(); it != protectedValuesEnd; ++it)
+ markCell(it->first);
+
+ m_heap.nextCell = 0;
+ m_heap.nextBlock = 0;
+ DeadObjectIterator it(m_heap, m_heap.nextBlock, m_heap.nextCell);
+ DeadObjectIterator end(m_heap, m_heap.usedBlocks);
+ for ( ; it != end; ++it)
+ (*it)->~JSCell();
+
+ ASSERT(!protectedObjectCount());
+
+ protectedValuesEnd = protectedValuesCopy.end();
+ for (ProtectCountSet::iterator it = protectedValuesCopy.begin(); it != protectedValuesEnd; ++it)
+ it->first->~JSCell();
+
+ for (size_t block = 0; block < m_heap.usedBlocks; ++block)
+ freeBlockPtr(m_heap.blocks[block]);
+
+ fastFree(m_heap.blocks);
+
+ memset(&m_heap, 0, sizeof(CollectorHeap));
}
void Heap::recordExtraCost(size_t cost)
@@ -355,123 +374,109 @@ void Heap::recordExtraCost(size_t cost)
// are either very short lived temporaries, or have extremely long lifetimes. So
// if a large value survives one garbage collection, there is not much point to
// collecting more frequently as long as it stays alive.
- // NOTE: we target the primaryHeap unconditionally as JSNumber doesn't modify cost
- primaryHeap.extraCost += cost;
+ if (m_heap.extraCost > maxExtraCost && m_heap.extraCost > m_heap.usedBlocks * BLOCK_SIZE / 2) {
+ // If the last iteration through the heap deallocated blocks, we need
+ // to clean up remaining garbage before marking. Otherwise, the conservative
+ // marking mechanism might follow a pointer to unmapped memory.
+ if (m_heap.didShrink)
+ sweep();
+ reset();
+ }
+ m_heap.extraCost += cost;
}
-template <HeapType heapType> ALWAYS_INLINE void* Heap::heapAllocate(size_t s)
+void* Heap::allocate(size_t s)
{
- typedef typename HeapConstants<heapType>::Block Block;
- typedef typename HeapConstants<heapType>::Cell Cell;
-
- CollectorHeap& heap = heapType == PrimaryHeap ? primaryHeap : numberHeap;
+ typedef HeapConstants::Block Block;
+ typedef HeapConstants::Cell Cell;
+
ASSERT(JSLock::lockCount() > 0);
ASSERT(JSLock::currentThreadIsHoldingLock());
- ASSERT_UNUSED(s, s <= HeapConstants<heapType>::cellSize);
+ ASSERT_UNUSED(s, s <= HeapConstants::cellSize);
- ASSERT(heap.operationInProgress == NoOperation);
- ASSERT(heapType == PrimaryHeap || heap.extraCost == 0);
- // FIXME: If another global variable access here doesn't hurt performance
- // too much, we could CRASH() in NDEBUG builds, which could help ensure we
- // don't spend any time debugging cases where we allocate inside an object's
- // deallocation code.
+ ASSERT(m_heap.operationInProgress == NoOperation);
#if COLLECT_ON_EVERY_ALLOCATION
- collect();
+ collectAllGarbage();
+ ASSERT(m_heap.operationInProgress == NoOperation);
#endif
- size_t numLiveObjects = heap.numLiveObjects;
- size_t usedBlocks = heap.usedBlocks;
- size_t i = heap.firstBlockWithPossibleSpace;
-
- // if we have a huge amount of extra cost, we'll try to collect even if we still have
- // free cells left.
- if (heapType == PrimaryHeap && heap.extraCost > ALLOCATIONS_PER_COLLECTION) {
- size_t numLiveObjectsAtLastCollect = heap.numLiveObjectsAtLastCollect;
- size_t numNewObjects = numLiveObjects - numLiveObjectsAtLastCollect;
- const size_t newCost = numNewObjects + heap.extraCost;
- if (newCost >= ALLOCATIONS_PER_COLLECTION && newCost >= numLiveObjectsAtLastCollect)
- goto collect;
- }
+allocate:
- ASSERT(heap.operationInProgress == NoOperation);
-#ifndef NDEBUG
- // FIXME: Consider doing this in NDEBUG builds too (see comment above).
- heap.operationInProgress = Allocation;
-#endif
+ // Fast case: find the next garbage cell and recycle it.
-scan:
- Block* targetBlock;
- size_t targetBlockUsedCells;
- if (i != usedBlocks) {
- targetBlock = reinterpret_cast<Block*>(heap.blocks[i]);
- targetBlockUsedCells = targetBlock->usedCells;
- ASSERT(targetBlockUsedCells <= HeapConstants<heapType>::cellsPerBlock);
- while (targetBlockUsedCells == HeapConstants<heapType>::cellsPerBlock) {
- if (++i == usedBlocks)
- goto collect;
- targetBlock = reinterpret_cast<Block*>(heap.blocks[i]);
- targetBlockUsedCells = targetBlock->usedCells;
- ASSERT(targetBlockUsedCells <= HeapConstants<heapType>::cellsPerBlock);
- }
- heap.firstBlockWithPossibleSpace = i;
- } else {
+ do {
+ ASSERT(m_heap.nextBlock < m_heap.usedBlocks);
+ Block* block = reinterpret_cast<Block*>(m_heap.blocks[m_heap.nextBlock]);
+ do {
+ ASSERT(m_heap.nextCell < HeapConstants::cellsPerBlock);
+ if (!block->marked.get(m_heap.nextCell)) { // Always false for the last cell in the block
+ Cell* cell = block->cells + m_heap.nextCell;
-collect:
- size_t numLiveObjectsAtLastCollect = heap.numLiveObjectsAtLastCollect;
- size_t numNewObjects = numLiveObjects - numLiveObjectsAtLastCollect;
- const size_t newCost = numNewObjects + heap.extraCost;
+ m_heap.operationInProgress = Allocation;
+ JSCell* imp = reinterpret_cast<JSCell*>(cell);
+ imp->~JSCell();
+ m_heap.operationInProgress = NoOperation;
- if (newCost >= ALLOCATIONS_PER_COLLECTION && newCost >= numLiveObjectsAtLastCollect) {
-#ifndef NDEBUG
- heap.operationInProgress = NoOperation;
-#endif
- bool foundGarbage = collect();
- numLiveObjects = heap.numLiveObjects;
- usedBlocks = heap.usedBlocks;
- i = heap.firstBlockWithPossibleSpace;
-#ifndef NDEBUG
- heap.operationInProgress = Allocation;
-#endif
- if (foundGarbage)
- goto scan;
- }
+ ++m_heap.nextCell;
+ return cell;
+ }
+ } while (++m_heap.nextCell != HeapConstants::cellsPerBlock);
+ m_heap.nextCell = 0;
+ } while (++m_heap.nextBlock != m_heap.usedBlocks);
- // didn't find a block, and GC didn't reclaim anything, need to allocate a new block
- targetBlock = reinterpret_cast<Block*>(allocateBlock<heapType>());
- heap.firstBlockWithPossibleSpace = heap.usedBlocks - 1;
- targetBlockUsedCells = 0;
- }
+ // Slow case: reached the end of the heap. Mark live objects and start over.
- // find a free spot in the block and detach it from the free list
- Cell* newCell = targetBlock->freeList;
+ reset();
+ goto allocate;
+}
- // "next" field is a cell offset -- 0 means next cell, so a zeroed block is already initialized
- targetBlock->freeList = (newCell + 1) + newCell->u.freeCell.next;
+void Heap::resizeBlocks()
+{
+ m_heap.didShrink = false;
- targetBlock->usedCells = static_cast<uint32_t>(targetBlockUsedCells + 1);
- heap.numLiveObjects = numLiveObjects + 1;
+ size_t usedCellCount = markedCells();
+ size_t minCellCount = usedCellCount + max(ALLOCATIONS_PER_COLLECTION, usedCellCount);
+ size_t minBlockCount = (minCellCount + HeapConstants::cellsPerBlock - 1) / HeapConstants::cellsPerBlock;
-#ifndef NDEBUG
- // FIXME: Consider doing this in NDEBUG builds too (see comment above).
- heap.operationInProgress = NoOperation;
-#endif
+ size_t maxCellCount = 1.25f * minCellCount;
+ size_t maxBlockCount = (maxCellCount + HeapConstants::cellsPerBlock - 1) / HeapConstants::cellsPerBlock;
- return newCell;
+ if (m_heap.usedBlocks < minBlockCount)
+ growBlocks(minBlockCount);
+ else if (m_heap.usedBlocks > maxBlockCount)
+ shrinkBlocks(maxBlockCount);
}
-void* Heap::allocate(size_t s)
+void Heap::growBlocks(size_t neededBlocks)
{
- return heapAllocate<PrimaryHeap>(s);
+ ASSERT(m_heap.usedBlocks < neededBlocks);
+ while (m_heap.usedBlocks < neededBlocks)
+ allocateBlock();
}
-void* Heap::allocateNumber(size_t s)
+void Heap::shrinkBlocks(size_t neededBlocks)
{
- return heapAllocate<NumberHeap>(s);
+ ASSERT(m_heap.usedBlocks > neededBlocks);
+
+ // Clear the always-on last bit, so isEmpty() isn't fooled by it.
+ for (size_t i = 0; i < m_heap.usedBlocks; ++i)
+ m_heap.blocks[i]->marked.clear(HeapConstants::cellsPerBlock - 1);
+
+ for (size_t i = 0; i != m_heap.usedBlocks && m_heap.usedBlocks != neededBlocks; ) {
+ if (m_heap.blocks[i]->marked.isEmpty()) {
+ freeBlock(i);
+ } else
+ ++i;
+ }
+
+ // Reset the always-on last bit.
+ for (size_t i = 0; i < m_heap.usedBlocks; ++i)
+ m_heap.blocks[i]->marked.set(HeapConstants::cellsPerBlock - 1);
}
-#if PLATFORM(WINCE)
+#if OS(WINCE)
void* g_stackBase = 0;
inline bool isPageWritable(void* page)
@@ -528,7 +533,7 @@ static void* getStackBase(void* previousFrame)
}
#endif
-#if PLATFORM(QNX)
+#if OS(QNX)
static inline void *currentThreadStackBaseQNX()
{
static void* stackBase = 0;
@@ -557,10 +562,10 @@ static inline void *currentThreadStackBaseQNX()
static inline void* currentThreadStackBase()
{
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
pthread_t thread = pthread_self();
return pthread_get_stackaddr_np(thread);
-#elif PLATFORM(WIN_OS) && PLATFORM(X86) && COMPILER(MSVC)
+#elif OS(WINDOWS) && CPU(X86) && COMPILER(MSVC)
// offset 0x18 from the FS segment register gives a pointer to
// the thread information block for the current thread
NT_TIB* pTib;
@@ -569,10 +574,11 @@ static inline void* currentThreadStackBase()
MOV pTib, EAX
}
return static_cast<void*>(pTib->StackBase);
-#elif PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC)
+#elif OS(WINDOWS) && CPU(X86_64) && COMPILER(MSVC)
+ // FIXME: why only for MSVC?
PNT_TIB64 pTib = reinterpret_cast<PNT_TIB64>(NtCurrentTeb());
return reinterpret_cast<void*>(pTib->StackBase);
-#elif PLATFORM(WIN_OS) && PLATFORM(X86) && COMPILER(GCC)
+#elif OS(WINDOWS) && CPU(X86) && COMPILER(GCC)
// offset 0x18 from the FS segment register gives a pointer to
// the thread information block for the current thread
NT_TIB* pTib;
@@ -580,18 +586,18 @@ static inline void* currentThreadStackBase()
: "=r" (pTib)
);
return static_cast<void*>(pTib->StackBase);
-#elif PLATFORM(QNX)
+#elif OS(QNX)
return currentThreadStackBaseQNX();
-#elif PLATFORM(SOLARIS)
+#elif OS(SOLARIS)
stack_t s;
thr_stksegment(&s);
return s.ss_sp;
-#elif PLATFORM(OPENBSD)
+#elif OS(OPENBSD)
pthread_t thread = pthread_self();
stack_t stack;
pthread_stackseg_np(thread, &stack);
return stack.ss_sp;
-#elif PLATFORM(SYMBIAN)
+#elif OS(SYMBIAN)
static void* stackBase = 0;
if (stackBase == 0) {
TThreadStackInfo info;
@@ -600,11 +606,11 @@ static inline void* currentThreadStackBase()
stackBase = (void*)info.iBase;
}
return (void*)stackBase;
-#elif PLATFORM(HAIKU)
+#elif OS(HAIKU)
thread_info threadInfo;
get_thread_info(find_thread(NULL), &threadInfo);
return threadInfo.stack_end;
-#elif PLATFORM(UNIX)
+#elif OS(UNIX)
static void* stackBase = 0;
static size_t stackSize = 0;
static pthread_t stackThread;
@@ -612,7 +618,7 @@ static inline void* currentThreadStackBase()
if (stackBase == 0 || thread != stackThread) {
pthread_attr_t sattr;
pthread_attr_init(&sattr);
-#if HAVE(PTHREAD_NP_H) || PLATFORM(NETBSD)
+#if HAVE(PTHREAD_NP_H) || OS(NETBSD)
// e.g. on FreeBSD 5.4, neundorf@kde.org
pthread_attr_get_np(thread, &sattr);
#else
@@ -626,7 +632,7 @@ static inline void* currentThreadStackBase()
stackThread = thread;
}
return static_cast<char*>(stackBase) + stackSize;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
if (g_stackBase)
return g_stackBase;
else {
@@ -642,9 +648,9 @@ static inline void* currentThreadStackBase()
static inline PlatformThread getCurrentPlatformThread()
{
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
return pthread_mach_thread_np(pthread_self());
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
return pthread_getw32threadhandle_np(pthread_self());
#endif
}
@@ -714,10 +720,37 @@ void Heap::registerThread()
#endif
-#define IS_POINTER_ALIGNED(p) (((intptr_t)(p) & (sizeof(char*) - 1)) == 0)
+inline bool isPointerAligned(void* p)
+{
+ return (((intptr_t)(p) & (sizeof(char*) - 1)) == 0);
+}
+
+// Cell size needs to be a power of two for isPossibleCell to be valid.
+COMPILE_ASSERT(sizeof(CollectorCell) % 2 == 0, Collector_cell_size_is_power_of_two);
+
+#if USE(JSVALUE32)
+static bool isHalfCellAligned(void *p)
+{
+ return (((intptr_t)(p) & (CELL_MASK >> 1)) == 0);
+}
+
+static inline bool isPossibleCell(void* p)
+{
+ return isHalfCellAligned(p) && p;
+}
+
+#else
+
+static inline bool isCellAligned(void *p)
+{
+ return (((intptr_t)(p) & CELL_MASK) == 0);
+}
-// cell size needs to be a power of two for this to be valid
-#define IS_HALF_CELL_ALIGNED(p) (((intptr_t)(p) & (CELL_MASK >> 1)) == 0)
+static inline bool isPossibleCell(void* p)
+{
+ return isCellAligned(p) && p;
+}
+#endif // USE(JSVALUE32)
void Heap::markConservatively(MarkStack& markStack, void* start, void* end)
{
@@ -728,46 +761,33 @@ void Heap::markConservatively(MarkStack& markStack, void* start, void* end)
}
ASSERT((static_cast<char*>(end) - static_cast<char*>(start)) < 0x1000000);
- ASSERT(IS_POINTER_ALIGNED(start));
- ASSERT(IS_POINTER_ALIGNED(end));
+ ASSERT(isPointerAligned(start));
+ ASSERT(isPointerAligned(end));
char** p = static_cast<char**>(start);
char** e = static_cast<char**>(end);
- size_t usedPrimaryBlocks = primaryHeap.usedBlocks;
- size_t usedNumberBlocks = numberHeap.usedBlocks;
- CollectorBlock** primaryBlocks = primaryHeap.blocks;
- CollectorBlock** numberBlocks = numberHeap.blocks;
-
- const size_t lastCellOffset = sizeof(CollectorCell) * (CELLS_PER_BLOCK - 1);
-
+ CollectorBlock** blocks = m_heap.blocks;
while (p != e) {
char* x = *p++;
- if (IS_HALF_CELL_ALIGNED(x) && x) {
+ if (isPossibleCell(x)) {
+ size_t usedBlocks;
uintptr_t xAsBits = reinterpret_cast<uintptr_t>(x);
xAsBits &= CELL_ALIGN_MASK;
+
uintptr_t offset = xAsBits & BLOCK_OFFSET_MASK;
+ const size_t lastCellOffset = sizeof(CollectorCell) * (CELLS_PER_BLOCK - 1);
+ if (offset > lastCellOffset)
+ continue;
+
CollectorBlock* blockAddr = reinterpret_cast<CollectorBlock*>(xAsBits - offset);
- // Mark the the number heap, we can mark these Cells directly to avoid the virtual call cost
- for (size_t block = 0; block < usedNumberBlocks; block++) {
- if ((numberBlocks[block] == blockAddr) & (offset <= lastCellOffset)) {
- Heap::markCell(reinterpret_cast<JSCell*>(xAsBits));
- goto endMarkLoop;
- }
- }
-
- // Mark the primary heap
- for (size_t block = 0; block < usedPrimaryBlocks; block++) {
- if ((primaryBlocks[block] == blockAddr) & (offset <= lastCellOffset)) {
- if (reinterpret_cast<CollectorCell*>(xAsBits)->u.freeCell.zeroIfFree) {
- markStack.append(reinterpret_cast<JSCell*>(xAsBits));
- markStack.drain();
- }
- break;
- }
+ usedBlocks = m_heap.usedBlocks;
+ for (size_t block = 0; block < usedBlocks; block++) {
+ if (blocks[block] != blockAddr)
+ continue;
+ markStack.append(reinterpret_cast<JSCell*>(xAsBits));
+ markStack.drain();
}
- endMarkLoop:
- ;
}
}
}
@@ -806,9 +826,9 @@ void Heap::markCurrentThreadConservatively(MarkStack& markStack)
static inline void suspendThread(const PlatformThread& platformThread)
{
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
thread_suspend(platformThread);
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
SuspendThread(platformThread);
#else
#error Need a way to suspend threads on this platform
@@ -817,9 +837,9 @@ static inline void suspendThread(const PlatformThread& platformThread)
static inline void resumeThread(const PlatformThread& platformThread)
{
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
thread_resume(platformThread);
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
ResumeThread(platformThread);
#else
#error Need a way to resume threads on this platform
@@ -828,23 +848,23 @@ static inline void resumeThread(const PlatformThread& platformThread)
typedef unsigned long usword_t; // word size, assumed to be either 32 or 64 bit
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
-#if PLATFORM(X86)
+#if CPU(X86)
typedef i386_thread_state_t PlatformThreadRegisters;
-#elif PLATFORM(X86_64)
+#elif CPU(X86_64)
typedef x86_thread_state64_t PlatformThreadRegisters;
-#elif PLATFORM(PPC)
+#elif CPU(PPC)
typedef ppc_thread_state_t PlatformThreadRegisters;
-#elif PLATFORM(PPC64)
+#elif CPU(PPC64)
typedef ppc_thread_state64_t PlatformThreadRegisters;
-#elif PLATFORM(ARM)
+#elif CPU(ARM)
typedef arm_thread_state_t PlatformThreadRegisters;
#else
#error Unknown Architecture
#endif
-#elif PLATFORM(WIN_OS)&& PLATFORM(X86)
+#elif OS(WINDOWS) && CPU(X86)
typedef CONTEXT PlatformThreadRegisters;
#else
#error Need a thread register struct for this platform
@@ -852,21 +872,21 @@ typedef CONTEXT PlatformThreadRegisters;
static size_t getPlatformThreadRegisters(const PlatformThread& platformThread, PlatformThreadRegisters& regs)
{
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
-#if PLATFORM(X86)
+#if CPU(X86)
unsigned user_count = sizeof(regs)/sizeof(int);
thread_state_flavor_t flavor = i386_THREAD_STATE;
-#elif PLATFORM(X86_64)
+#elif CPU(X86_64)
unsigned user_count = x86_THREAD_STATE64_COUNT;
thread_state_flavor_t flavor = x86_THREAD_STATE64;
-#elif PLATFORM(PPC)
+#elif CPU(PPC)
unsigned user_count = PPC_THREAD_STATE_COUNT;
thread_state_flavor_t flavor = PPC_THREAD_STATE;
-#elif PLATFORM(PPC64)
+#elif CPU(PPC64)
unsigned user_count = PPC_THREAD_STATE64_COUNT;
thread_state_flavor_t flavor = PPC_THREAD_STATE64;
-#elif PLATFORM(ARM)
+#elif CPU(ARM)
unsigned user_count = ARM_THREAD_STATE_COUNT;
thread_state_flavor_t flavor = ARM_THREAD_STATE;
#else
@@ -880,9 +900,9 @@ static size_t getPlatformThreadRegisters(const PlatformThread& platformThread, P
CRASH();
}
return user_count * sizeof(usword_t);
-// end PLATFORM(DARWIN)
+// end OS(DARWIN)
-#elif PLATFORM(WIN_OS) && PLATFORM(X86)
+#elif OS(WINDOWS) && CPU(X86)
regs.ContextFlags = CONTEXT_INTEGER | CONTEXT_CONTROL | CONTEXT_SEGMENTS;
GetThreadContext(platformThread, &regs);
return sizeof(CONTEXT);
@@ -893,17 +913,17 @@ static size_t getPlatformThreadRegisters(const PlatformThread& platformThread, P
static inline void* otherThreadStackPointer(const PlatformThreadRegisters& regs)
{
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
#if __DARWIN_UNIX03
-#if PLATFORM(X86)
+#if CPU(X86)
return reinterpret_cast<void*>(regs.__esp);
-#elif PLATFORM(X86_64)
+#elif CPU(X86_64)
return reinterpret_cast<void*>(regs.__rsp);
-#elif PLATFORM(PPC) || PLATFORM(PPC64)
+#elif CPU(PPC) || CPU(PPC64)
return reinterpret_cast<void*>(regs.__r1);
-#elif PLATFORM(ARM)
+#elif CPU(ARM)
return reinterpret_cast<void*>(regs.__sp);
#else
#error Unknown Architecture
@@ -911,11 +931,11 @@ static inline void* otherThreadStackPointer(const PlatformThreadRegisters& regs)
#else // !__DARWIN_UNIX03
-#if PLATFORM(X86)
+#if CPU(X86)
return reinterpret_cast<void*>(regs.esp);
-#elif PLATFORM(X86_64)
+#elif CPU(X86_64)
return reinterpret_cast<void*>(regs.rsp);
-#elif (PLATFORM(PPC) || PLATFORM(PPC64))
+#elif CPU(PPC) || CPU(PPC64)
return reinterpret_cast<void*>(regs.r1);
#else
#error Unknown Architecture
@@ -923,8 +943,8 @@ static inline void* otherThreadStackPointer(const PlatformThreadRegisters& regs)
#endif // __DARWIN_UNIX03
-// end PLATFORM(DARWIN)
-#elif PLATFORM(X86) && PLATFORM(WIN_OS)
+// end OS(DARWIN)
+#elif CPU(X86) && OS(WINDOWS)
return reinterpret_cast<void*>((uintptr_t) regs.Esp);
#else
#error Need a way to get the stack pointer for another thread on this platform
@@ -1009,129 +1029,68 @@ void Heap::markProtectedObjects(MarkStack& markStack)
}
}
-template <HeapType heapType> size_t Heap::sweep()
+void Heap::clearMarkBits()
{
- typedef typename HeapConstants<heapType>::Block Block;
- typedef typename HeapConstants<heapType>::Cell Cell;
+ for (size_t i = 0; i < m_heap.usedBlocks; ++i)
+ clearMarkBits(m_heap.blocks[i]);
+}
- // SWEEP: delete everything with a zero refcount (garbage) and unmark everything else
- CollectorHeap& heap = heapType == PrimaryHeap ? primaryHeap : numberHeap;
-
- size_t emptyBlocks = 0;
- size_t numLiveObjects = heap.numLiveObjects;
+void Heap::clearMarkBits(CollectorBlock* block)
+{
+ // allocate assumes that the last cell in every block is marked.
+ block->marked.clearAll();
+ block->marked.set(HeapConstants::cellsPerBlock - 1);
+}
+
+size_t Heap::markedCells(size_t startBlock, size_t startCell) const
+{
+ ASSERT(startBlock <= m_heap.usedBlocks);
+ ASSERT(startCell < HeapConstants::cellsPerBlock);
+
+ if (startBlock >= m_heap.usedBlocks)
+ return 0;
+
+ size_t result = 0;
+ result += m_heap.blocks[startBlock]->marked.count(startCell);
+ for (size_t i = startBlock + 1; i < m_heap.usedBlocks; ++i)
+ result += m_heap.blocks[i]->marked.count();
+
+ return result;
+}
+
+void Heap::sweep()
+{
+ ASSERT(m_heap.operationInProgress == NoOperation);
+ if (m_heap.operationInProgress != NoOperation)
+ CRASH();
+ m_heap.operationInProgress = Collection;
- for (size_t block = 0; block < heap.usedBlocks; block++) {
- Block* curBlock = reinterpret_cast<Block*>(heap.blocks[block]);
-
- size_t usedCells = curBlock->usedCells;
- Cell* freeList = curBlock->freeList;
-
- if (usedCells == HeapConstants<heapType>::cellsPerBlock) {
- // special case with a block where all cells are used -- testing indicates this happens often
- for (size_t i = 0; i < HeapConstants<heapType>::cellsPerBlock; i++) {
- if (!curBlock->marked.get(i >> HeapConstants<heapType>::bitmapShift)) {
- Cell* cell = curBlock->cells + i;
-
- if (heapType != NumberHeap) {
- JSCell* imp = reinterpret_cast<JSCell*>(cell);
- // special case for allocated but uninitialized object
- // (We don't need this check earlier because nothing prior this point
- // assumes the object has a valid vptr.)
- if (cell->u.freeCell.zeroIfFree == 0)
- continue;
-#if ENABLE(JSC_ZOMBIES)
- if (!imp->isZombie()) {
- const ClassInfo* info = imp->classInfo();
- imp->~JSCell();
- new (imp) JSZombie(info, JSZombie::leakedZombieStructure());
- heap.numZombies++;
- }
-#else
- imp->~JSCell();
-#endif
- }
- --numLiveObjects;
#if !ENABLE(JSC_ZOMBIES)
- --usedCells;
-
- // put cell on the free list
- cell->u.freeCell.zeroIfFree = 0;
- cell->u.freeCell.next = freeList - (cell + 1);
- freeList = cell;
+ Structure* dummyMarkableCellStructure = m_globalData->dummyMarkableCellStructure.get();
#endif
- }
- }
- } else {
- size_t minimumCellsToProcess = usedCells;
- for (size_t i = 0; (i < minimumCellsToProcess) & (i < HeapConstants<heapType>::cellsPerBlock); i++) {
- Cell* cell = curBlock->cells + i;
- if (cell->u.freeCell.zeroIfFree == 0) {
- ++minimumCellsToProcess;
- } else {
- if (!curBlock->marked.get(i >> HeapConstants<heapType>::bitmapShift)) {
- if (heapType != NumberHeap) {
- JSCell* imp = reinterpret_cast<JSCell*>(cell);
+
+ DeadObjectIterator it(m_heap, m_heap.nextBlock, m_heap.nextCell);
+ DeadObjectIterator end(m_heap, m_heap.usedBlocks);
+ for ( ; it != end; ++it) {
+ JSCell* cell = *it;
#if ENABLE(JSC_ZOMBIES)
- if (!imp->isZombie()) {
- const ClassInfo* info = imp->classInfo();
- imp->~JSCell();
- new (imp) JSZombie(info, JSZombie::leakedZombieStructure());
- heap.numZombies++;
- }
+ if (!cell->isZombie()) {
+ const ClassInfo* info = cell->classInfo();
+ cell->~JSCell();
+ new (cell) JSZombie(info, JSZombie::leakedZombieStructure());
+ Heap::markCell(cell);
+ }
#else
- imp->~JSCell();
+ cell->~JSCell();
+ // Callers of sweep assume it's safe to mark any cell in the heap.
+ new (cell) JSCell(dummyMarkableCellStructure);
#endif
- }
-#if !ENABLE(JSC_ZOMBIES)
- --usedCells;
- --numLiveObjects;
-
- // put cell on the free list
- cell->u.freeCell.zeroIfFree = 0;
- cell->u.freeCell.next = freeList - (cell + 1);
- freeList = cell;
-#endif
- }
- }
- }
- }
-
- curBlock->usedCells = static_cast<uint32_t>(usedCells);
- curBlock->freeList = freeList;
- curBlock->marked.clearAll();
-
- if (!usedCells)
- ++emptyBlocks;
}
-
- if (heap.numLiveObjects != numLiveObjects)
- heap.firstBlockWithPossibleSpace = 0;
-
- heap.numLiveObjects = numLiveObjects;
- heap.numLiveObjectsAtLastCollect = numLiveObjects;
- heap.extraCost = 0;
-
- if (!emptyBlocks)
- return numLiveObjects;
-
- size_t neededCells = 1.25f * (numLiveObjects + max(ALLOCATIONS_PER_COLLECTION, numLiveObjects));
- size_t neededBlocks = (neededCells + HeapConstants<heapType>::cellsPerBlock - 1) / HeapConstants<heapType>::cellsPerBlock;
- for (size_t block = 0; block < heap.usedBlocks; block++) {
- if (heap.usedBlocks <= neededBlocks)
- break;
- Block* curBlock = reinterpret_cast<Block*>(heap.blocks[block]);
- if (curBlock->usedCells)
- continue;
-
- freeBlock<heapType>(block);
- block--; // Don't move forward a step in this case
- }
-
- return numLiveObjects;
+ m_heap.operationInProgress = NoOperation;
}
-bool Heap::collect()
+void Heap::markRoots()
{
#ifndef NDEBUG
if (m_globalData->isSharedInstance) {
@@ -1140,23 +1099,29 @@ bool Heap::collect()
}
#endif
- ASSERT((primaryHeap.operationInProgress == NoOperation) | (numberHeap.operationInProgress == NoOperation));
- if ((primaryHeap.operationInProgress != NoOperation) | (numberHeap.operationInProgress != NoOperation))
+ ASSERT(m_heap.operationInProgress == NoOperation);
+ if (m_heap.operationInProgress != NoOperation)
CRASH();
- JAVASCRIPTCORE_GC_BEGIN();
- primaryHeap.operationInProgress = Collection;
- numberHeap.operationInProgress = Collection;
+ m_heap.operationInProgress = Collection;
- // MARK: first mark all referenced objects recursively starting out from the set of root objects
MarkStack& markStack = m_globalData->markStack;
+
+ // Reset mark bits.
+ clearMarkBits();
+
+ // Mark stack roots.
markStackObjectsConservatively(markStack);
+ m_globalData->interpreter->registerFile().markCallFrames(markStack, this);
+
+ // Mark explicitly registered roots.
markProtectedObjects(markStack);
+
+ // Mark misc. other roots.
if (m_markListSet && m_markListSet->size())
MarkedArgumentBuffer::markLists(markStack, *m_markListSet);
if (m_globalData->exception)
markStack.append(m_globalData->exception);
- m_globalData->interpreter->registerFile().markCallFrames(markStack, this);
m_globalData->smallStrings.markChildren(markStack);
if (m_globalData->functionCodeBlockBeingReparsed)
m_globalData->functionCodeBlockBeingReparsed->markAggregate(markStack);
@@ -1165,41 +1130,28 @@ bool Heap::collect()
markStack.drain();
markStack.compact();
- JAVASCRIPTCORE_GC_MARKED();
-
- size_t originalLiveObjects = primaryHeap.numLiveObjects + numberHeap.numLiveObjects;
- size_t numLiveObjects = sweep<PrimaryHeap>();
- numLiveObjects += sweep<NumberHeap>();
- primaryHeap.operationInProgress = NoOperation;
- numberHeap.operationInProgress = NoOperation;
- JAVASCRIPTCORE_GC_END(originalLiveObjects, numLiveObjects);
-
- return numLiveObjects < originalLiveObjects;
+ m_heap.operationInProgress = NoOperation;
}
-size_t Heap::objectCount()
+size_t Heap::objectCount() const
{
- return primaryHeap.numLiveObjects + numberHeap.numLiveObjects - m_globalData->smallStrings.count();
+ return m_heap.nextBlock * HeapConstants::cellsPerBlock // allocated full blocks
+ + m_heap.nextCell // allocated cells in current block
+ + markedCells(m_heap.nextBlock, m_heap.nextCell) // marked cells in remainder of m_heap
+ - m_heap.usedBlocks; // 1 cell per block is a dummy sentinel
}
-template <HeapType heapType>
-static void addToStatistics(Heap::Statistics& statistics, const CollectorHeap& heap)
+void Heap::addToStatistics(Heap::Statistics& statistics) const
{
- typedef HeapConstants<heapType> HC;
- for (size_t i = 0; i < heap.usedBlocks; ++i) {
- if (heap.blocks[i]) {
- statistics.size += BLOCK_SIZE;
- statistics.free += (HC::cellsPerBlock - heap.blocks[i]->usedCells) * HC::cellSize;
- }
- }
+ statistics.size += m_heap.usedBlocks * BLOCK_SIZE;
+ statistics.free += m_heap.usedBlocks * BLOCK_SIZE - (objectCount() * HeapConstants::cellSize);
}
Heap::Statistics Heap::statistics() const
{
Statistics statistics = { 0, 0 };
- JSC::addToStatistics<PrimaryHeap>(statistics, primaryHeap);
- JSC::addToStatistics<NumberHeap>(statistics, numberHeap);
+ addToStatistics(statistics);
return statistics;
}
@@ -1268,17 +1220,61 @@ HashCountedSet<const char*>* Heap::protectedObjectTypeCounts()
bool Heap::isBusy()
{
- return (primaryHeap.operationInProgress != NoOperation) | (numberHeap.operationInProgress != NoOperation);
+ return m_heap.operationInProgress != NoOperation;
+}
+
+void Heap::reset()
+{
+ JAVASCRIPTCORE_GC_BEGIN();
+
+ markRoots();
+
+ JAVASCRIPTCORE_GC_MARKED();
+
+ m_heap.nextCell = 0;
+ m_heap.nextBlock = 0;
+ m_heap.nextNumber = 0;
+ m_heap.extraCost = 0;
+#if ENABLE(JSC_ZOMBIES)
+ sweep();
+#endif
+ resizeBlocks();
+
+ JAVASCRIPTCORE_GC_END();
+}
+
+void Heap::collectAllGarbage()
+{
+ JAVASCRIPTCORE_GC_BEGIN();
+
+ // If the last iteration through the heap deallocated blocks, we need
+ // to clean up remaining garbage before marking. Otherwise, the conservative
+ // marking mechanism might follow a pointer to unmapped memory.
+ if (m_heap.didShrink)
+ sweep();
+
+ markRoots();
+
+ JAVASCRIPTCORE_GC_MARKED();
+
+ m_heap.nextCell = 0;
+ m_heap.nextBlock = 0;
+ m_heap.nextNumber = 0;
+ m_heap.extraCost = 0;
+ sweep();
+ resizeBlocks();
+
+ JAVASCRIPTCORE_GC_END();
}
-Heap::iterator Heap::primaryHeapBegin()
+LiveObjectIterator Heap::primaryHeapBegin()
{
- return iterator(primaryHeap.blocks, primaryHeap.blocks + primaryHeap.usedBlocks);
+ return LiveObjectIterator(m_heap, 0);
}
-Heap::iterator Heap::primaryHeapEnd()
+LiveObjectIterator Heap::primaryHeapEnd()
{
- return iterator(primaryHeap.blocks + primaryHeap.usedBlocks, primaryHeap.blocks + primaryHeap.usedBlocks);
+ return LiveObjectIterator(m_heap, m_heap.usedBlocks);
}
} // namespace JSC
diff --git a/JavaScriptCore/runtime/Collector.h b/JavaScriptCore/runtime/Collector.h
index 9128701..7f7a679 100644
--- a/JavaScriptCore/runtime/Collector.h
+++ b/JavaScriptCore/runtime/Collector.h
@@ -28,9 +28,9 @@
#include <wtf/HashSet.h>
#include <wtf/Noncopyable.h>
#include <wtf/OwnPtr.h>
+#include <wtf/StdLibExtras.h>
#include <wtf/Threading.h>
-// This is supremely lame that we require pthreads to build on windows.
#if ENABLE(JSC_MULTIPLE_THREADS)
#include <pthread.h>
#endif
@@ -47,22 +47,21 @@ namespace JSC {
class MarkStack;
enum OperationInProgress { NoOperation, Allocation, Collection };
- enum HeapType { PrimaryHeap, NumberHeap };
- template <HeapType> class CollectorHeapIterator;
+ class LiveObjectIterator;
struct CollectorHeap {
+ size_t nextBlock;
+ size_t nextCell;
CollectorBlock** blocks;
+
+ void* nextNumber;
+
size_t numBlocks;
size_t usedBlocks;
- size_t firstBlockWithPossibleSpace;
- size_t numLiveObjects;
- size_t numLiveObjectsAtLastCollect;
size_t extraCost;
-#if ENABLE(JSC_ZOMBIES)
- size_t numZombies;
-#endif
+ bool didShrink;
OperationInProgress operationInProgress;
};
@@ -70,21 +69,21 @@ namespace JSC {
class Heap : public Noncopyable {
public:
class Thread;
- typedef CollectorHeapIterator<PrimaryHeap> iterator;
void destroy();
void* allocateNumber(size_t);
void* allocate(size_t);
- bool collect();
bool isBusy(); // true if an allocation or collection is in progress
+ void collectAllGarbage();
- static const size_t minExtraCostSize = 256;
+ static const size_t minExtraCost = 256;
+ static const size_t maxExtraCost = 1024 * 1024;
void reportExtraMemoryCost(size_t cost);
- size_t objectCount();
+ size_t objectCount() const;
struct Statistics {
size_t size;
size_t free;
@@ -114,13 +113,12 @@ namespace JSC {
JSGlobalData* globalData() const { return m_globalData; }
static bool isNumber(JSCell*);
- // Iterators for the object heap.
- iterator primaryHeapBegin();
- iterator primaryHeapEnd();
+ LiveObjectIterator primaryHeapBegin();
+ LiveObjectIterator primaryHeapEnd();
private:
- template <HeapType heapType> void* heapAllocate(size_t);
- template <HeapType heapType> size_t sweep();
+ void reset();
+ void sweep();
static CollectorBlock* cellBlock(const JSCell*);
static size_t cellOffset(const JSCell*);
@@ -128,12 +126,22 @@ namespace JSC {
Heap(JSGlobalData*);
~Heap();
- template <HeapType heapType> NEVER_INLINE CollectorBlock* allocateBlock();
- template <HeapType heapType> NEVER_INLINE void freeBlock(size_t);
- NEVER_INLINE void freeBlock(CollectorBlock*);
- void freeBlocks(CollectorHeap*);
+ NEVER_INLINE CollectorBlock* allocateBlock();
+ NEVER_INLINE void freeBlock(size_t);
+ NEVER_INLINE void freeBlockPtr(CollectorBlock*);
+ void freeBlocks();
+ void resizeBlocks();
+ void growBlocks(size_t neededBlocks);
+ void shrinkBlocks(size_t neededBlocks);
+ void clearMarkBits();
+ void clearMarkBits(CollectorBlock*);
+ size_t markedCells(size_t startBlock = 0, size_t startCell = 0) const;
void recordExtraCost(size_t);
+
+ void addToStatistics(Statistics&) const;
+
+ void markRoots();
void markProtectedObjects(MarkStack&);
void markCurrentThreadConservatively(MarkStack&);
void markCurrentThreadConservativelyInternal(MarkStack&);
@@ -142,8 +150,7 @@ namespace JSC {
typedef HashCountedSet<JSCell*> ProtectCountSet;
- CollectorHeap primaryHeap;
- CollectorHeap numberHeap;
+ CollectorHeap m_heap;
ProtectCountSet m_protectedValues;
@@ -174,7 +181,7 @@ namespace JSC {
#endif
template<> struct CellSize<sizeof(uint64_t)> { static const size_t m_value = 64; };
-#if PLATFORM(WINCE) || PLATFORM(SYMBIAN)
+#if OS(WINCE) || OS(SYMBIAN)
const size_t BLOCK_SIZE = 64 * 1024; // 64k
#else
const size_t BLOCK_SIZE = 64 * 4096; // 256k
@@ -189,87 +196,60 @@ namespace JSC {
const size_t SMALL_CELL_SIZE = CELL_SIZE / 2;
const size_t CELL_MASK = CELL_SIZE - 1;
const size_t CELL_ALIGN_MASK = ~CELL_MASK;
- const size_t CELLS_PER_BLOCK = (BLOCK_SIZE * 8 - sizeof(uint32_t) * 8 - sizeof(void *) * 8 - 2 * (7 + 3 * 8)) / (CELL_SIZE * 8 + 2);
- const size_t SMALL_CELLS_PER_BLOCK = 2 * CELLS_PER_BLOCK;
+ const size_t CELLS_PER_BLOCK = (BLOCK_SIZE - sizeof(Heap*)) * 8 * CELL_SIZE / (8 * CELL_SIZE + 1) / CELL_SIZE; // one bitmap byte can represent 8 cells.
+
const size_t BITMAP_SIZE = (CELLS_PER_BLOCK + 7) / 8;
const size_t BITMAP_WORDS = (BITMAP_SIZE + 3) / sizeof(uint32_t);
-
+
struct CollectorBitmap {
uint32_t bits[BITMAP_WORDS];
bool get(size_t n) const { return !!(bits[n >> 5] & (1 << (n & 0x1F))); }
void set(size_t n) { bits[n >> 5] |= (1 << (n & 0x1F)); }
void clear(size_t n) { bits[n >> 5] &= ~(1 << (n & 0x1F)); }
void clearAll() { memset(bits, 0, sizeof(bits)); }
+ size_t count(size_t startCell = 0)
+ {
+ size_t result = 0;
+ for ( ; (startCell & 0x1F) != 0; ++startCell) {
+ if (get(startCell))
+ ++result;
+ }
+ for (size_t i = startCell >> 5; i < BITMAP_WORDS; ++i)
+ result += WTF::bitCount(bits[i]);
+ return result;
+ }
+ size_t isEmpty() // Much more efficient than testing count() == 0.
+ {
+ for (size_t i = 0; i < BITMAP_WORDS; ++i)
+ if (bits[i] != 0)
+ return false;
+ return true;
+ }
};
struct CollectorCell {
- union {
- double memory[CELL_ARRAY_LENGTH];
- struct {
- void* zeroIfFree;
- ptrdiff_t next;
- } freeCell;
- } u;
- };
-
- struct SmallCollectorCell {
- union {
- double memory[CELL_ARRAY_LENGTH / 2];
- struct {
- void* zeroIfFree;
- ptrdiff_t next;
- } freeCell;
- } u;
+ double memory[CELL_ARRAY_LENGTH];
};
class CollectorBlock {
public:
CollectorCell cells[CELLS_PER_BLOCK];
- uint32_t usedCells;
- CollectorCell* freeList;
- CollectorBitmap marked;
- Heap* heap;
- HeapType type;
- };
-
- class SmallCellCollectorBlock {
- public:
- SmallCollectorCell cells[SMALL_CELLS_PER_BLOCK];
- uint32_t usedCells;
- SmallCollectorCell* freeList;
CollectorBitmap marked;
Heap* heap;
- HeapType type;
};
-
- template <HeapType heapType> struct HeapConstants;
- template <> struct HeapConstants<PrimaryHeap> {
+ struct HeapConstants {
static const size_t cellSize = CELL_SIZE;
static const size_t cellsPerBlock = CELLS_PER_BLOCK;
- static const size_t bitmapShift = 0;
typedef CollectorCell Cell;
typedef CollectorBlock Block;
};
- template <> struct HeapConstants<NumberHeap> {
- static const size_t cellSize = SMALL_CELL_SIZE;
- static const size_t cellsPerBlock = SMALL_CELLS_PER_BLOCK;
- static const size_t bitmapShift = 1;
- typedef SmallCollectorCell Cell;
- typedef SmallCellCollectorBlock Block;
- };
-
inline CollectorBlock* Heap::cellBlock(const JSCell* cell)
{
return reinterpret_cast<CollectorBlock*>(reinterpret_cast<uintptr_t>(cell) & BLOCK_MASK);
}
- inline bool Heap::isNumber(JSCell* cell)
- {
- return Heap::cellBlock(cell)->type == NumberHeap;
- }
-
inline size_t Heap::cellOffset(const JSCell* cell)
{
return (reinterpret_cast<uintptr_t>(cell) & BLOCK_OFFSET_MASK) / CELL_SIZE;
@@ -287,8 +267,20 @@ namespace JSC {
inline void Heap::reportExtraMemoryCost(size_t cost)
{
- if (cost > minExtraCostSize)
- recordExtraCost(cost / (CELL_SIZE * 2));
+ if (cost > minExtraCost)
+ recordExtraCost(cost);
+ }
+
+ inline void* Heap::allocateNumber(size_t s)
+ {
+ if (void* result = m_heap.nextNumber) {
+ m_heap.nextNumber = 0;
+ return result;
+ }
+
+ void* result = allocate(s);
+ m_heap.nextNumber = static_cast<char*>(result) + (CELL_SIZE / 2);
+ return result;
}
} // namespace JSC
diff --git a/JavaScriptCore/runtime/CollectorHeapIterator.h b/JavaScriptCore/runtime/CollectorHeapIterator.h
index e38a852..e4f2f91 100644
--- a/JavaScriptCore/runtime/CollectorHeapIterator.h
+++ b/JavaScriptCore/runtime/CollectorHeapIterator.h
@@ -31,58 +31,108 @@
namespace JSC {
- template <HeapType heapType> class CollectorHeapIterator {
+ class CollectorHeapIterator {
public:
- CollectorHeapIterator(CollectorBlock** block, CollectorBlock** endBlock);
-
- bool operator!=(const CollectorHeapIterator<heapType>& other) { return m_block != other.m_block || m_cell != other.m_cell; }
- CollectorHeapIterator<heapType>& operator++();
+ bool operator!=(const CollectorHeapIterator& other);
JSCell* operator*() const;
- private:
- typedef typename HeapConstants<heapType>::Block Block;
- typedef typename HeapConstants<heapType>::Cell Cell;
-
- Block** m_block;
- Block** m_endBlock;
- Cell* m_cell;
- Cell* m_endCell;
+ protected:
+ CollectorHeapIterator(CollectorHeap&, size_t startBlock, size_t startCell);
+ void advance(size_t cellsPerBlock);
+
+ CollectorHeap& m_heap;
+ size_t m_block;
+ size_t m_cell;
+ };
+
+ class LiveObjectIterator : public CollectorHeapIterator {
+ public:
+ LiveObjectIterator(CollectorHeap&, size_t startBlock, size_t startCell = 0);
+ LiveObjectIterator& operator++();
+ };
+
+ class DeadObjectIterator : public CollectorHeapIterator {
+ public:
+ DeadObjectIterator(CollectorHeap&, size_t startBlock, size_t startCell = 0);
+ DeadObjectIterator& operator++();
+ };
+
+ class ObjectIterator : public CollectorHeapIterator {
+ public:
+ ObjectIterator(CollectorHeap&, size_t startBlock, size_t startCell = 0);
+ ObjectIterator& operator++();
};
- template <HeapType heapType>
- CollectorHeapIterator<heapType>::CollectorHeapIterator(CollectorBlock** block, CollectorBlock** endBlock)
- : m_block(reinterpret_cast<Block**>(block))
- , m_endBlock(reinterpret_cast<Block**>(endBlock))
- , m_cell(m_block == m_endBlock ? 0 : (*m_block)->cells)
- , m_endCell(m_block == m_endBlock ? 0 : (*m_block)->cells + HeapConstants<heapType>::cellsPerBlock)
+ inline CollectorHeapIterator::CollectorHeapIterator(CollectorHeap& heap, size_t startBlock, size_t startCell)
+ : m_heap(heap)
+ , m_block(startBlock)
+ , m_cell(startCell)
+ {
+ }
+
+ inline bool CollectorHeapIterator::operator!=(const CollectorHeapIterator& other)
+ {
+ return m_block != other.m_block || m_cell != other.m_cell;
+ }
+
+ inline JSCell* CollectorHeapIterator::operator*() const
+ {
+ return reinterpret_cast<JSCell*>(m_heap.blocks[m_block]->cells + m_cell);
+ }
+
+ inline void CollectorHeapIterator::advance(size_t cellsPerBlock)
+ {
+ ++m_cell;
+ if (m_cell == cellsPerBlock) {
+ m_cell = 0;
+ ++m_block;
+ }
+ }
+
+ inline LiveObjectIterator::LiveObjectIterator(CollectorHeap& heap, size_t startBlock, size_t startCell)
+ : CollectorHeapIterator(heap, startBlock, startCell - 1)
+ {
+ ++(*this);
+ }
+
+ inline LiveObjectIterator& LiveObjectIterator::operator++()
+ {
+ if (m_block < m_heap.nextBlock || m_cell < m_heap.nextCell) {
+ advance(HeapConstants::cellsPerBlock);
+ return *this;
+ }
+
+ do {
+ advance(HeapConstants::cellsPerBlock);
+ } while (m_block < m_heap.usedBlocks && !m_heap.blocks[m_block]->marked.get(m_cell));
+ return *this;
+ }
+
+ inline DeadObjectIterator::DeadObjectIterator(CollectorHeap& heap, size_t startBlock, size_t startCell)
+ : CollectorHeapIterator(heap, startBlock, startCell - 1)
{
- if (m_cell && m_cell->u.freeCell.zeroIfFree == 0)
- ++*this;
+ ++(*this);
}
- template <HeapType heapType>
- CollectorHeapIterator<heapType>& CollectorHeapIterator<heapType>::operator++()
+ inline DeadObjectIterator& DeadObjectIterator::operator++()
{
do {
- for (++m_cell; m_cell != m_endCell; ++m_cell)
- if (m_cell->u.freeCell.zeroIfFree != 0) {
- return *this;
- }
-
- if (++m_block != m_endBlock) {
- m_cell = (*m_block)->cells;
- m_endCell = (*m_block)->cells + HeapConstants<heapType>::cellsPerBlock;
- }
- } while(m_block != m_endBlock);
-
- m_cell = 0;
+ advance(HeapConstants::cellsPerBlock);
+ ASSERT(m_block > m_heap.nextBlock || (m_block == m_heap.nextBlock && m_cell >= m_heap.nextCell));
+ } while (m_block < m_heap.usedBlocks && m_heap.blocks[m_block]->marked.get(m_cell));
return *this;
}
- template <HeapType heapType>
- JSCell* CollectorHeapIterator<heapType>::operator*() const
+ inline ObjectIterator::ObjectIterator(CollectorHeap& heap, size_t startBlock, size_t startCell)
+ : CollectorHeapIterator(heap, startBlock, startCell - 1)
{
- return reinterpret_cast<JSCell*>(m_cell);
+ ++(*this);
+ }
+
+ inline ObjectIterator& ObjectIterator::operator++()
+ {
+ advance(HeapConstants::cellsPerBlock);
+ return *this;
}
} // namespace JSC
diff --git a/JavaScriptCore/runtime/CommonIdentifiers.h b/JavaScriptCore/runtime/CommonIdentifiers.h
index abe5038..de24f4a 100644
--- a/JavaScriptCore/runtime/CommonIdentifiers.h
+++ b/JavaScriptCore/runtime/CommonIdentifiers.h
@@ -50,6 +50,7 @@
macro(get) \
macro(getPrototypeOf) \
macro(getOwnPropertyDescriptor) \
+ macro(getOwnPropertyNames) \
macro(hasOwnProperty) \
macro(ignoreCase) \
macro(index) \
diff --git a/JavaScriptCore/runtime/Completion.cpp b/JavaScriptCore/runtime/Completion.cpp
index 2507698..2f88df9 100644
--- a/JavaScriptCore/runtime/Completion.cpp
+++ b/JavaScriptCore/runtime/Completion.cpp
@@ -36,6 +36,7 @@ namespace JSC {
Completion checkSyntax(ExecState* exec, const SourceCode& source)
{
JSLock lock(exec);
+ ASSERT(exec->globalData().identifierTable == currentIdentifierTable());
RefPtr<ProgramExecutable> program = ProgramExecutable::create(exec, source);
JSObject* error = program->checkSyntax(exec);
@@ -48,6 +49,7 @@ Completion checkSyntax(ExecState* exec, const SourceCode& source)
Completion evaluate(ExecState* exec, ScopeChain& scopeChain, const SourceCode& source, JSValue thisValue)
{
JSLock lock(exec);
+ ASSERT(exec->globalData().identifierTable == currentIdentifierTable());
RefPtr<ProgramExecutable> program = ProgramExecutable::create(exec, source);
JSObject* error = program->compile(exec, scopeChain.node());
diff --git a/JavaScriptCore/runtime/DateConstructor.cpp b/JavaScriptCore/runtime/DateConstructor.cpp
index 61ec4c5..2e476b3 100644
--- a/JavaScriptCore/runtime/DateConstructor.cpp
+++ b/JavaScriptCore/runtime/DateConstructor.cpp
@@ -35,7 +35,7 @@
#include <wtf/DateMath.h>
#include <wtf/MathExtras.h>
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
extern "C" time_t time(time_t* timer); // Provided by libce.
#endif
@@ -133,7 +133,11 @@ static JSValue JSC_HOST_CALL callDate(ExecState* exec, JSObject*, JSValue, const
tm localTM;
getLocalTime(&localTime, &localTM);
GregorianDateTime ts(exec, localTM);
- return jsNontrivialString(exec, formatDate(ts) + " " + formatTime(ts));
+ DateConversionBuffer date;
+ DateConversionBuffer time;
+ formatDate(ts, date);
+ formatTime(ts, time);
+ return jsNontrivialString(exec, makeString(date, " ", time));
}
CallType DateConstructor::getCallData(CallData& callData)
diff --git a/JavaScriptCore/runtime/DateConversion.cpp b/JavaScriptCore/runtime/DateConversion.cpp
index b9d0e02..f129407 100644
--- a/JavaScriptCore/runtime/DateConversion.cpp
+++ b/JavaScriptCore/runtime/DateConversion.cpp
@@ -62,49 +62,41 @@ double parseDate(ExecState* exec, const UString &date)
return value;
}
-UString formatDate(const GregorianDateTime &t)
+void formatDate(const GregorianDateTime &t, DateConversionBuffer& buffer)
{
- char buffer[100];
- snprintf(buffer, sizeof(buffer), "%s %s %02d %04d",
+ snprintf(buffer, DateConversionBufferSize, "%s %s %02d %04d",
weekdayName[(t.weekDay + 6) % 7],
monthName[t.month], t.monthDay, t.year + 1900);
- return buffer;
}
-UString formatDateUTCVariant(const GregorianDateTime &t)
+void formatDateUTCVariant(const GregorianDateTime &t, DateConversionBuffer& buffer)
{
- char buffer[100];
- snprintf(buffer, sizeof(buffer), "%s, %02d %s %04d",
+ snprintf(buffer, DateConversionBufferSize, "%s, %02d %s %04d",
weekdayName[(t.weekDay + 6) % 7],
t.monthDay, monthName[t.month], t.year + 1900);
- return buffer;
}
-UString formatTime(const GregorianDateTime &t)
+void formatTime(const GregorianDateTime &t, DateConversionBuffer& buffer)
{
- char buffer[100];
int offset = abs(gmtoffset(t));
char timeZoneName[70];
struct tm gtm = t;
strftime(timeZoneName, sizeof(timeZoneName), "%Z", &gtm);
if (timeZoneName[0]) {
- snprintf(buffer, sizeof(buffer), "%02d:%02d:%02d GMT%c%02d%02d (%s)",
+ snprintf(buffer, DateConversionBufferSize, "%02d:%02d:%02d GMT%c%02d%02d (%s)",
t.hour, t.minute, t.second,
gmtoffset(t) < 0 ? '-' : '+', offset / (60*60), (offset / 60) % 60, timeZoneName);
} else {
- snprintf(buffer, sizeof(buffer), "%02d:%02d:%02d GMT%c%02d%02d",
+ snprintf(buffer, DateConversionBufferSize, "%02d:%02d:%02d GMT%c%02d%02d",
t.hour, t.minute, t.second,
gmtoffset(t) < 0 ? '-' : '+', offset / (60*60), (offset / 60) % 60);
}
- return UString(buffer);
}
-UString formatTimeUTC(const GregorianDateTime &t)
+void formatTimeUTC(const GregorianDateTime &t, DateConversionBuffer& buffer)
{
- char buffer[100];
- snprintf(buffer, sizeof(buffer), "%02d:%02d:%02d GMT", t.hour, t.minute, t.second);
- return UString(buffer);
+ snprintf(buffer, DateConversionBufferSize, "%02d:%02d:%02d GMT", t.hour, t.minute, t.second);
}
} // namespace JSC
diff --git a/JavaScriptCore/runtime/DateConversion.h b/JavaScriptCore/runtime/DateConversion.h
index dc980d3..ff32b50 100644
--- a/JavaScriptCore/runtime/DateConversion.h
+++ b/JavaScriptCore/runtime/DateConversion.h
@@ -42,17 +42,21 @@
#ifndef DateConversion_h
#define DateConversion_h
+#include "UString.h"
+
namespace JSC {
class ExecState;
-class UString;
struct GregorianDateTime;
+static const unsigned DateConversionBufferSize = 100;
+typedef char DateConversionBuffer[DateConversionBufferSize];
+
double parseDate(ExecState* exec, const UString&);
-UString formatDate(const GregorianDateTime&);
-UString formatDateUTCVariant(const GregorianDateTime&);
-UString formatTime(const GregorianDateTime&);
-UString formatTimeUTC(const GregorianDateTime&);
+void formatDate(const GregorianDateTime&, DateConversionBuffer&);
+void formatDateUTCVariant(const GregorianDateTime&, DateConversionBuffer&);
+void formatTime(const GregorianDateTime&, DateConversionBuffer&);
+void formatTimeUTC(const GregorianDateTime&, DateConversionBuffer&);
} // namespace JSC
diff --git a/JavaScriptCore/runtime/DateInstance.cpp b/JavaScriptCore/runtime/DateInstance.cpp
index 77a92be..b43b183 100644
--- a/JavaScriptCore/runtime/DateInstance.cpp
+++ b/JavaScriptCore/runtime/DateInstance.cpp
@@ -40,6 +40,12 @@ DateInstance::DateInstance(ExecState* exec, NonNullPassRefPtr<Structure> structu
setInternalValue(jsNaN(exec));
}
+DateInstance::DateInstance(ExecState* exec, NonNullPassRefPtr<Structure> structure, double time)
+ : JSWrapperObject(structure)
+{
+ setInternalValue(jsNumber(exec, timeClip(time)));
+}
+
DateInstance::DateInstance(ExecState* exec, double time)
: JSWrapperObject(exec->lexicalGlobalObject()->dateStructure())
{
diff --git a/JavaScriptCore/runtime/DateInstance.h b/JavaScriptCore/runtime/DateInstance.h
index 44b7521..77d46de 100644
--- a/JavaScriptCore/runtime/DateInstance.h
+++ b/JavaScriptCore/runtime/DateInstance.h
@@ -32,6 +32,7 @@ namespace JSC {
class DateInstance : public JSWrapperObject {
public:
DateInstance(ExecState*, double);
+ DateInstance(ExecState*, NonNullPassRefPtr<Structure>, double);
explicit DateInstance(ExecState*, NonNullPassRefPtr<Structure>);
double internalNumber() const { return internalValue().uncheckedGetNumber(); }
@@ -54,7 +55,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
diff --git a/JavaScriptCore/runtime/DatePrototype.cpp b/JavaScriptCore/runtime/DatePrototype.cpp
index 7a2e802..ca9d4ea 100644
--- a/JavaScriptCore/runtime/DatePrototype.cpp
+++ b/JavaScriptCore/runtime/DatePrototype.cpp
@@ -59,7 +59,7 @@
#include <CoreFoundation/CoreFoundation.h>
#endif
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
extern "C" size_t strftime(char * const s, const size_t maxsize, const char * const format, const struct tm * const t); //provided by libce
#endif
@@ -197,7 +197,7 @@ static JSCell* formatLocaleDate(ExecState* exec, const GregorianDateTime& gdt, L
{
#if HAVE(LANGINFO_H)
static const nl_item formats[] = { D_T_FMT, D_FMT, T_FMT };
-#elif (PLATFORM(WINCE) && !PLATFORM(QT)) || PLATFORM(SYMBIAN)
+#elif (OS(WINCE) && !PLATFORM(QT)) || OS(SYMBIAN)
// strftime() does not support '#' on WinCE or Symbian
static const char* const formatStrings[] = { "%c", "%x", "%X" };
#else
@@ -423,7 +423,11 @@ JSValue JSC_HOST_CALL dateProtoFuncToString(ExecState* exec, JSObject*, JSValue
const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTime(exec);
if (!gregorianDateTime)
return jsNontrivialString(exec, "Invalid Date");
- return jsNontrivialString(exec, formatDate(*gregorianDateTime) + " " + formatTime(*gregorianDateTime));
+ DateConversionBuffer date;
+ DateConversionBuffer time;
+ formatDate(*gregorianDateTime, date);
+ formatTime(*gregorianDateTime, time);
+ return jsNontrivialString(exec, makeString(date, " ", time));
}
JSValue JSC_HOST_CALL dateProtoFuncToUTCString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
@@ -436,7 +440,11 @@ JSValue JSC_HOST_CALL dateProtoFuncToUTCString(ExecState* exec, JSObject*, JSVal
const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTimeUTC(exec);
if (!gregorianDateTime)
return jsNontrivialString(exec, "Invalid Date");
- return jsNontrivialString(exec, formatDateUTCVariant(*gregorianDateTime) + " " + formatTimeUTC(*gregorianDateTime));
+ DateConversionBuffer date;
+ DateConversionBuffer time;
+ formatDateUTCVariant(*gregorianDateTime, date);
+ formatTimeUTC(*gregorianDateTime, time);
+ return jsNontrivialString(exec, makeString(date, " ", time));
}
JSValue JSC_HOST_CALL dateProtoFuncToISOString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
@@ -467,7 +475,9 @@ JSValue JSC_HOST_CALL dateProtoFuncToDateString(ExecState* exec, JSObject*, JSVa
const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTime(exec);
if (!gregorianDateTime)
return jsNontrivialString(exec, "Invalid Date");
- return jsNontrivialString(exec, formatDate(*gregorianDateTime));
+ DateConversionBuffer date;
+ formatDate(*gregorianDateTime, date);
+ return jsNontrivialString(exec, date);
}
JSValue JSC_HOST_CALL dateProtoFuncToTimeString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
@@ -480,7 +490,9 @@ JSValue JSC_HOST_CALL dateProtoFuncToTimeString(ExecState* exec, JSObject*, JSVa
const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTime(exec);
if (!gregorianDateTime)
return jsNontrivialString(exec, "Invalid Date");
- return jsNontrivialString(exec, formatTime(*gregorianDateTime));
+ DateConversionBuffer time;
+ formatTime(*gregorianDateTime, time);
+ return jsNontrivialString(exec, time);
}
JSValue JSC_HOST_CALL dateProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
@@ -554,7 +566,11 @@ JSValue JSC_HOST_CALL dateProtoFuncToGMTString(ExecState* exec, JSObject*, JSVal
const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTimeUTC(exec);
if (!gregorianDateTime)
return jsNontrivialString(exec, "Invalid Date");
- return jsNontrivialString(exec, formatDateUTCVariant(*gregorianDateTime) + " " + formatTimeUTC(*gregorianDateTime));
+ DateConversionBuffer date;
+ DateConversionBuffer time;
+ formatDateUTCVariant(*gregorianDateTime, date);
+ formatTimeUTC(*gregorianDateTime, time);
+ return jsNontrivialString(exec, makeString(date, " ", time));
}
JSValue JSC_HOST_CALL dateProtoFuncGetMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
diff --git a/JavaScriptCore/runtime/DatePrototype.h b/JavaScriptCore/runtime/DatePrototype.h
index f565775..612ca06 100644
--- a/JavaScriptCore/runtime/DatePrototype.h
+++ b/JavaScriptCore/runtime/DatePrototype.h
@@ -39,7 +39,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
diff --git a/JavaScriptCore/runtime/ErrorPrototype.cpp b/JavaScriptCore/runtime/ErrorPrototype.cpp
index a9a7a43..be9e4b8 100644
--- a/JavaScriptCore/runtime/ErrorPrototype.cpp
+++ b/JavaScriptCore/runtime/ErrorPrototype.cpp
@@ -48,21 +48,19 @@ ErrorPrototype::ErrorPrototype(ExecState* exec, NonNullPassRefPtr<Structure> str
JSValue JSC_HOST_CALL errorProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
{
JSObject* thisObj = thisValue.toThisObject(exec);
+ JSValue name = thisObj->get(exec, exec->propertyNames().name);
+ JSValue message = thisObj->get(exec, exec->propertyNames().message);
- UString s = "Error";
+ // Mozilla-compatible format.
- JSValue v = thisObj->get(exec, exec->propertyNames().name);
- if (!v.isUndefined())
- s = v.toString(exec);
-
- v = thisObj->get(exec, exec->propertyNames().message);
- if (!v.isUndefined()) {
- // Mozilla-compatible format.
- s += ": ";
- s += v.toString(exec);
+ if (!name.isUndefined()) {
+ if (!message.isUndefined())
+ return jsNontrivialString(exec, makeString(name.toString(exec), ": ", message.toString(exec)));
+ return jsNontrivialString(exec, name.toString(exec));
}
-
- return jsNontrivialString(exec, s);
+ if (!message.isUndefined())
+ return jsNontrivialString(exec, makeString("Error: ", message.toString(exec)));
+ return jsNontrivialString(exec, "Error");
}
} // namespace JSC
diff --git a/JavaScriptCore/runtime/ExceptionHelpers.cpp b/JavaScriptCore/runtime/ExceptionHelpers.cpp
index 5bead90..9bb740e 100644
--- a/JavaScriptCore/runtime/ExceptionHelpers.cpp
+++ b/JavaScriptCore/runtime/ExceptionHelpers.cpp
@@ -77,9 +77,7 @@ JSValue createUndefinedVariableError(ExecState* exec, const Identifier& ident, u
int endOffset = 0;
int divotPoint = 0;
int line = codeBlock->expressionRangeForBytecodeOffset(exec, bytecodeOffset, divotPoint, startOffset, endOffset);
- UString message = "Can't find variable: ";
- message.append(ident.ustring());
- JSObject* exception = Error::create(exec, ReferenceError, message, line, codeBlock->ownerExecutable()->sourceID(), codeBlock->ownerExecutable()->sourceURL());
+ JSObject* exception = Error::create(exec, ReferenceError, makeString("Can't find variable: ", ident.ustring()), line, codeBlock->ownerExecutable()->sourceID(), codeBlock->ownerExecutable()->sourceURL());
exception->putWithAttributes(exec, Identifier(exec, expressionBeginOffsetPropertyName), jsNumber(exec, divotPoint - startOffset), ReadOnly | DontDelete);
exception->putWithAttributes(exec, Identifier(exec, expressionCaretOffsetPropertyName), jsNumber(exec, divotPoint), ReadOnly | DontDelete);
exception->putWithAttributes(exec, Identifier(exec, expressionEndOffsetPropertyName), jsNumber(exec, divotPoint + endOffset), ReadOnly | DontDelete);
@@ -88,59 +86,36 @@ JSValue createUndefinedVariableError(ExecState* exec, const Identifier& ident, u
static UString createErrorMessage(ExecState* exec, CodeBlock* codeBlock, int, int expressionStart, int expressionStop, JSValue value, UString error)
{
- if (!expressionStop || expressionStart > codeBlock->source()->length()) {
- UString errorText = value.toString(exec);
- errorText.append(" is ");
- errorText.append(error);
- return errorText;
- }
+ if (!expressionStop || expressionStart > codeBlock->source()->length())
+ return makeString(value.toString(exec), " is ", error);
+ if (expressionStart < expressionStop)
+ return makeString("Result of expression '", codeBlock->source()->getRange(expressionStart, expressionStop), "' [", value.toString(exec), "] is ", error, ".");
- UString errorText = "Result of expression ";
-
- if (expressionStart < expressionStop) {
- errorText.append('\'');
- errorText.append(codeBlock->source()->getRange(expressionStart, expressionStop));
- errorText.append("' [");
- errorText.append(value.toString(exec));
- errorText.append("] is ");
- } else {
- // No range information, so give a few characters of context
- const UChar* data = codeBlock->source()->data();
- int dataLength = codeBlock->source()->length();
- int start = expressionStart;
- int stop = expressionStart;
- // Get up to 20 characters of context to the left and right of the divot, clamping to the line.
- // then strip whitespace.
- while (start > 0 && (expressionStart - start < 20) && data[start - 1] != '\n')
- start--;
- while (start < (expressionStart - 1) && isStrWhiteSpace(data[start]))
- start++;
- while (stop < dataLength && (stop - expressionStart < 20) && data[stop] != '\n')
- stop++;
- while (stop > expressionStart && isStrWhiteSpace(data[stop]))
- stop--;
- errorText.append("near '...");
- errorText.append(codeBlock->source()->getRange(start, stop));
- errorText.append("...' [");
- errorText.append(value.toString(exec));
- errorText.append("] is ");
- }
- errorText.append(error);
- errorText.append(".");
- return errorText;
+ // No range information, so give a few characters of context
+ const UChar* data = codeBlock->source()->data();
+ int dataLength = codeBlock->source()->length();
+ int start = expressionStart;
+ int stop = expressionStart;
+ // Get up to 20 characters of context to the left and right of the divot, clamping to the line.
+ // then strip whitespace.
+ while (start > 0 && (expressionStart - start < 20) && data[start - 1] != '\n')
+ start--;
+ while (start < (expressionStart - 1) && isStrWhiteSpace(data[start]))
+ start++;
+ while (stop < dataLength && (stop - expressionStart < 20) && data[stop] != '\n')
+ stop++;
+ while (stop > expressionStart && isStrWhiteSpace(data[stop]))
+ stop--;
+ return makeString("Result of expression near '...", codeBlock->source()->getRange(start, stop), "...' [", value.toString(exec), "] is ", error, ".");
}
JSObject* createInvalidParamError(ExecState* exec, const char* op, JSValue value, unsigned bytecodeOffset, CodeBlock* codeBlock)
{
- UString message = "not a valid argument for '";
- message.append(op);
- message.append("'");
-
int startOffset = 0;
int endOffset = 0;
int divotPoint = 0;
int line = codeBlock->expressionRangeForBytecodeOffset(exec, bytecodeOffset, divotPoint, startOffset, endOffset);
- UString errorMessage = createErrorMessage(exec, codeBlock, line, divotPoint, divotPoint + endOffset, value, message);
+ UString errorMessage = createErrorMessage(exec, codeBlock, line, divotPoint, divotPoint + endOffset, value, makeString("not a valid argument for '", op, "'"));
JSObject* exception = Error::create(exec, TypeError, errorMessage, line, codeBlock->ownerExecutable()->sourceID(), codeBlock->ownerExecutable()->sourceURL());
exception->putWithAttributes(exec, Identifier(exec, expressionBeginOffsetPropertyName), jsNumber(exec, divotPoint - startOffset), ReadOnly | DontDelete);
exception->putWithAttributes(exec, Identifier(exec, expressionCaretOffsetPropertyName), jsNumber(exec, divotPoint), ReadOnly | DontDelete);
diff --git a/JavaScriptCore/runtime/Executable.cpp b/JavaScriptCore/runtime/Executable.cpp
index 7586746..bc18cc9 100644
--- a/JavaScriptCore/runtime/Executable.cpp
+++ b/JavaScriptCore/runtime/Executable.cpp
@@ -30,6 +30,7 @@
#include "CodeBlock.h"
#include "JIT.h"
#include "Parser.h"
+#include "StringBuilder.h"
#include "Vector.h"
namespace JSC {
@@ -265,14 +266,13 @@ PassRefPtr<FunctionExecutable> FunctionExecutable::fromGlobalCode(const Identifi
UString FunctionExecutable::paramString() const
{
FunctionParameters& parameters = *m_parameters;
- UString s("");
+ StringBuilder builder;
for (size_t pos = 0; pos < parameters.size(); ++pos) {
- if (!s.isEmpty())
- s += ", ";
- s += parameters[pos].ustring();
+ if (!builder.isEmpty())
+ builder.append(", ");
+ builder.append(parameters[pos].ustring());
}
-
- return s;
+ return builder.release();
}
};
diff --git a/JavaScriptCore/runtime/FunctionConstructor.cpp b/JavaScriptCore/runtime/FunctionConstructor.cpp
index 9d88400..9d55dd1 100644
--- a/JavaScriptCore/runtime/FunctionConstructor.cpp
+++ b/JavaScriptCore/runtime/FunctionConstructor.cpp
@@ -21,14 +21,15 @@
#include "config.h"
#include "FunctionConstructor.h"
+#include "Debugger.h"
#include "FunctionPrototype.h"
#include "JSFunction.h"
#include "JSGlobalObject.h"
#include "JSString.h"
-#include "Parser.h"
-#include "Debugger.h"
#include "Lexer.h"
#include "Nodes.h"
+#include "Parser.h"
+#include "StringBuilder.h"
namespace JSC {
@@ -76,12 +77,19 @@ JSObject* constructFunction(ExecState* exec, const ArgList& args, const Identifi
if (args.isEmpty())
program = "(function() { \n})";
else if (args.size() == 1)
- program = "(function() { " + args.at(0).toString(exec) + "\n})";
+ program = makeString("(function() { ", args.at(0).toString(exec), "\n})");
else {
- program = "(function(" + args.at(0).toString(exec);
- for (size_t i = 1; i < args.size() - 1; i++)
- program += "," + args.at(i).toString(exec);
- program += ") { " + args.at(args.size() - 1).toString(exec) + "\n})";
+ StringBuilder builder;
+ builder.append("(function(");
+ builder.append(args.at(0).toString(exec));
+ for (size_t i = 1; i < args.size() - 1; i++) {
+ builder.append(",");
+ builder.append(args.at(i).toString(exec));
+ }
+ builder.append(") { ");
+ builder.append(args.at(args.size() - 1).toString(exec));
+ builder.append("\n})");
+ program = builder.release();
}
int errLine;
diff --git a/JavaScriptCore/runtime/FunctionPrototype.cpp b/JavaScriptCore/runtime/FunctionPrototype.cpp
index a3a7479..f08bd5e 100644
--- a/JavaScriptCore/runtime/FunctionPrototype.cpp
+++ b/JavaScriptCore/runtime/FunctionPrototype.cpp
@@ -76,7 +76,7 @@ static inline void insertSemicolonIfNeeded(UString& functionBody)
UChar ch = functionBody[i];
if (!Lexer::isWhiteSpace(ch) && !Lexer::isLineTerminator(ch)) {
if (ch != ';' && ch != '}')
- functionBody = functionBody.substr(0, i + 1) + ";" + functionBody.substr(i + 1, functionBody.size() - (i + 1));
+ functionBody = makeString(functionBody.substr(0, i + 1), ";", functionBody.substr(i + 1, functionBody.size() - (i + 1)));
return;
}
}
@@ -90,13 +90,13 @@ JSValue JSC_HOST_CALL functionProtoFuncToString(ExecState* exec, JSObject*, JSVa
FunctionExecutable* executable = function->jsExecutable();
UString sourceString = executable->source().toString();
insertSemicolonIfNeeded(sourceString);
- return jsString(exec, "function " + function->name(exec) + "(" + executable->paramString() + ") " + sourceString);
+ return jsString(exec, makeString("function ", function->name(exec), "(", executable->paramString(), ") ", sourceString));
}
}
if (thisValue.inherits(&InternalFunction::info)) {
InternalFunction* function = asInternalFunction(thisValue);
- return jsString(exec, "function " + function->name(exec) + "() {\n [native code]\n}");
+ return jsString(exec, makeString("function ", function->name(exec), "() {\n [native code]\n}"));
}
return throwError(exec, TypeError);
diff --git a/JavaScriptCore/runtime/FunctionPrototype.h b/JavaScriptCore/runtime/FunctionPrototype.h
index d1d6a1d..af783f7 100644
--- a/JavaScriptCore/runtime/FunctionPrototype.h
+++ b/JavaScriptCore/runtime/FunctionPrototype.h
@@ -34,7 +34,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue proto)
{
- return Structure::create(proto, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
private:
diff --git a/JavaScriptCore/runtime/GetterSetter.h b/JavaScriptCore/runtime/GetterSetter.h
index 68e9ea3..4e47361 100644
--- a/JavaScriptCore/runtime/GetterSetter.h
+++ b/JavaScriptCore/runtime/GetterSetter.h
@@ -50,7 +50,7 @@ namespace JSC {
void setSetter(JSObject* setter) { m_setter = setter; }
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(GetterSetterType, OverridesMarkChildren));
+ return Structure::create(prototype, TypeInfo(GetterSetterType, OverridesMarkChildren), AnonymousSlotCount);
}
private:
virtual bool isGetterSetter() const;
diff --git a/JavaScriptCore/runtime/GlobalEvalFunction.h b/JavaScriptCore/runtime/GlobalEvalFunction.h
index 389b1c3..a14ce4d 100644
--- a/JavaScriptCore/runtime/GlobalEvalFunction.h
+++ b/JavaScriptCore/runtime/GlobalEvalFunction.h
@@ -37,7 +37,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
diff --git a/JavaScriptCore/runtime/Identifier.cpp b/JavaScriptCore/runtime/Identifier.cpp
index 7db723b..747c4ac 100644
--- a/JavaScriptCore/runtime/Identifier.cpp
+++ b/JavaScriptCore/runtime/Identifier.cpp
@@ -28,6 +28,8 @@
#include <wtf/FastMalloc.h>
#include <wtf/HashSet.h>
+using WTF::ThreadSpecific;
+
namespace JSC {
typedef HashMap<const char*, RefPtr<UString::Rep>, PtrHash<const char*> > LiteralIdentifierTable;
@@ -38,13 +40,13 @@ public:
{
HashSet<UString::Rep*>::iterator end = m_table.end();
for (HashSet<UString::Rep*>::iterator iter = m_table.begin(); iter != end; ++iter)
- (*iter)->setIdentifierTable(0);
+ (*iter)->setIsIdentifier(false);
}
std::pair<HashSet<UString::Rep*>::iterator, bool> add(UString::Rep* value)
{
std::pair<HashSet<UString::Rep*>::iterator, bool> result = m_table.add(value);
- (*result.first)->setIdentifierTable(this);
+ (*result.first)->setIsIdentifier(true);
return result;
}
@@ -52,7 +54,7 @@ public:
std::pair<HashSet<UString::Rep*>::iterator, bool> add(U value)
{
std::pair<HashSet<UString::Rep*>::iterator, bool> result = m_table.add<U, V>(value);
- (*result.first)->setIdentifierTable(this);
+ (*result.first)->setIsIdentifier(true);
return result;
}
@@ -77,7 +79,7 @@ void deleteIdentifierTable(IdentifierTable* table)
bool Identifier::equal(const UString::Rep* r, const char* s)
{
- int length = r->len;
+ int length = r->size();
const UChar* d = r->data();
for (int i = 0; i != length; ++i)
if (d[i] != (unsigned char)s[i])
@@ -87,7 +89,7 @@ bool Identifier::equal(const UString::Rep* r, const char* s)
bool Identifier::equal(const UString::Rep* r, const UChar* s, int length)
{
- if (r->len != length)
+ if (r->size() != length)
return false;
const UChar* d = r->data();
for (int i = 0; i != length; ++i)
@@ -110,13 +112,11 @@ struct CStringTranslator {
static void translate(UString::Rep*& location, const char* c, unsigned hash)
{
size_t length = strlen(c);
- UChar* d = static_cast<UChar*>(fastMalloc(sizeof(UChar) * length));
+ UChar* d;
+ UString::Rep* r = UString::Rep::createUninitialized(length, d).releaseRef();
for (size_t i = 0; i != length; i++)
d[i] = static_cast<unsigned char>(c[i]); // use unsigned char to zero-extend instead of sign-extend
-
- UString::Rep* r = UString::Rep::create(d, static_cast<int>(length)).releaseRef();
- r->_hash = hash;
-
+ r->setHash(hash);
location = r;
}
};
@@ -175,13 +175,11 @@ struct UCharBufferTranslator {
static void translate(UString::Rep*& location, const UCharBuffer& buf, unsigned hash)
{
- UChar* d = static_cast<UChar*>(fastMalloc(sizeof(UChar) * buf.length));
+ UChar* d;
+ UString::Rep* r = UString::Rep::createUninitialized(buf.length, d).releaseRef();
for (unsigned i = 0; i != buf.length; i++)
d[i] = buf.s[i];
-
- UString::Rep* r = UString::Rep::create(d, buf.length).releaseRef();
- r->_hash = hash;
-
+ r->setHash(hash);
location = r;
}
};
@@ -212,19 +210,19 @@ PassRefPtr<UString::Rep> Identifier::add(ExecState* exec, const UChar* s, int le
PassRefPtr<UString::Rep> Identifier::addSlowCase(JSGlobalData* globalData, UString::Rep* r)
{
- ASSERT(!r->identifierTable());
- if (r->len == 1) {
+ ASSERT(!r->isIdentifier());
+ if (r->size() == 1) {
UChar c = r->data()[0];
if (c <= 0xFF)
r = globalData->smallStrings.singleCharacterStringRep(c);
- if (r->identifierTable()) {
+ if (r->isIdentifier()) {
#ifndef NDEBUG
checkSameIdentifierTable(globalData, r);
#endif
return r;
}
}
- if (!r->len) {
+ if (!r->size()) {
UString::Rep::empty().hash();
return &UString::Rep::empty();
}
@@ -238,19 +236,19 @@ PassRefPtr<UString::Rep> Identifier::addSlowCase(ExecState* exec, UString::Rep*
void Identifier::remove(UString::Rep* r)
{
- r->identifierTable()->remove(r);
+ currentIdentifierTable()->remove(r);
}
#ifndef NDEBUG
-void Identifier::checkSameIdentifierTable(ExecState* exec, UString::Rep* rep)
+void Identifier::checkSameIdentifierTable(ExecState* exec, UString::Rep*)
{
- ASSERT(rep->identifierTable() == exec->globalData().identifierTable);
+ ASSERT_UNUSED(exec, exec->globalData().identifierTable == currentIdentifierTable());
}
-void Identifier::checkSameIdentifierTable(JSGlobalData* globalData, UString::Rep* rep)
+void Identifier::checkSameIdentifierTable(JSGlobalData* globalData, UString::Rep*)
{
- ASSERT(rep->identifierTable() == globalData->identifierTable);
+ ASSERT_UNUSED(globalData, globalData->identifierTable == currentIdentifierTable());
}
#else
@@ -265,4 +263,30 @@ void Identifier::checkSameIdentifierTable(JSGlobalData*, UString::Rep*)
#endif
+ThreadSpecific<ThreadIdentifierTableData>* g_identifierTableSpecific = 0;
+
+#if ENABLE(JSC_MULTIPLE_THREADS)
+
+pthread_once_t createIdentifierTableSpecificOnce = PTHREAD_ONCE_INIT;
+static void createIdentifierTableSpecificCallback()
+{
+ ASSERT(!g_identifierTableSpecific);
+ g_identifierTableSpecific = new ThreadSpecific<ThreadIdentifierTableData>();
+}
+void createIdentifierTableSpecific()
+{
+ pthread_once(&createIdentifierTableSpecificOnce, createIdentifierTableSpecificCallback);
+ ASSERT(g_identifierTableSpecific);
+}
+
+#else
+
+void createIdentifierTableSpecific()
+{
+ ASSERT(!g_identifierTableSpecific);
+ g_identifierTableSpecific = new ThreadSpecific<ThreadIdentifierTableData>();
+}
+
+#endif
+
} // namespace JSC
diff --git a/JavaScriptCore/runtime/Identifier.h b/JavaScriptCore/runtime/Identifier.h
index 2249179..1d1bd18 100644
--- a/JavaScriptCore/runtime/Identifier.h
+++ b/JavaScriptCore/runtime/Identifier.h
@@ -22,6 +22,7 @@
#define Identifier_h
#include "JSGlobalData.h"
+#include "ThreadSpecific.h"
#include "UString.h"
namespace JSC {
@@ -92,7 +93,7 @@ namespace JSC {
static PassRefPtr<UString::Rep> add(ExecState* exec, UString::Rep* r)
{
- if (r->identifierTable()) {
+ if (r->isIdentifier()) {
#ifndef NDEBUG
checkSameIdentifierTable(exec, r);
#endif
@@ -102,7 +103,7 @@ namespace JSC {
}
static PassRefPtr<UString::Rep> add(JSGlobalData* globalData, UString::Rep* r)
{
- if (r->identifierTable()) {
+ if (r->isIdentifier()) {
#ifndef NDEBUG
checkSameIdentifierTable(globalData, r);
#endif
@@ -141,6 +142,67 @@ namespace JSC {
IdentifierTable* createIdentifierTable();
void deleteIdentifierTable(IdentifierTable*);
+ struct ThreadIdentifierTableData {
+ ThreadIdentifierTableData()
+ : defaultIdentifierTable(0)
+ , currentIdentifierTable(0)
+ {
+ }
+
+ IdentifierTable* defaultIdentifierTable;
+ IdentifierTable* currentIdentifierTable;
+ };
+
+ extern WTF::ThreadSpecific<ThreadIdentifierTableData>* g_identifierTableSpecific;
+ void createIdentifierTableSpecific();
+
+ inline IdentifierTable* defaultIdentifierTable()
+ {
+ if (!g_identifierTableSpecific)
+ createIdentifierTableSpecific();
+ ThreadIdentifierTableData& data = **g_identifierTableSpecific;
+
+ return data.defaultIdentifierTable;
+ }
+
+ inline void setDefaultIdentifierTable(IdentifierTable* identifierTable)
+ {
+ if (!g_identifierTableSpecific)
+ createIdentifierTableSpecific();
+ ThreadIdentifierTableData& data = **g_identifierTableSpecific;
+
+ data.defaultIdentifierTable = identifierTable;
+ }
+
+ inline IdentifierTable* currentIdentifierTable()
+ {
+ if (!g_identifierTableSpecific)
+ createIdentifierTableSpecific();
+ ThreadIdentifierTableData& data = **g_identifierTableSpecific;
+
+ return data.currentIdentifierTable;
+ }
+
+ inline IdentifierTable* setCurrentIdentifierTable(IdentifierTable* identifierTable)
+ {
+ if (!g_identifierTableSpecific)
+ createIdentifierTableSpecific();
+ ThreadIdentifierTableData& data = **g_identifierTableSpecific;
+
+ IdentifierTable* oldIdentifierTable = data.currentIdentifierTable;
+ data.currentIdentifierTable = identifierTable;
+ return oldIdentifierTable;
+ }
+
+ inline void resetCurrentIdentifierTable()
+ {
+ if (!g_identifierTableSpecific)
+ createIdentifierTableSpecific();
+ ThreadIdentifierTableData& data = **g_identifierTableSpecific;
+
+ data.currentIdentifierTable = data.defaultIdentifierTable;
+ }
+
} // namespace JSC
#endif // Identifier_h
diff --git a/JavaScriptCore/runtime/InitializeThreading.cpp b/JavaScriptCore/runtime/InitializeThreading.cpp
index aad1af8..2605a9a 100644
--- a/JavaScriptCore/runtime/InitializeThreading.cpp
+++ b/JavaScriptCore/runtime/InitializeThreading.cpp
@@ -41,7 +41,7 @@ using namespace WTF;
namespace JSC {
-#if PLATFORM(DARWIN) && ENABLE(JSC_MULTIPLE_THREADS)
+#if OS(DARWIN) && ENABLE(JSC_MULTIPLE_THREADS)
static pthread_once_t initializeThreadingKeyOnce = PTHREAD_ONCE_INIT;
#endif
@@ -49,6 +49,7 @@ static void initializeThreadingOnce()
{
WTF::initializeThreading();
initializeUString();
+ JSGlobalData::storeVPtrs();
#if ENABLE(JSC_MULTIPLE_THREADS)
s_dtoaP5Mutex = new Mutex;
initializeDates();
@@ -57,7 +58,7 @@ static void initializeThreadingOnce()
void initializeThreading()
{
-#if PLATFORM(DARWIN) && ENABLE(JSC_MULTIPLE_THREADS)
+#if OS(DARWIN) && ENABLE(JSC_MULTIPLE_THREADS)
pthread_once(&initializeThreadingKeyOnce, initializeThreadingOnce);
#else
static bool initializedThreading = false;
diff --git a/JavaScriptCore/runtime/InternalFunction.h b/JavaScriptCore/runtime/InternalFunction.h
index fa1e5aa..d19b82b 100644
--- a/JavaScriptCore/runtime/InternalFunction.h
+++ b/JavaScriptCore/runtime/InternalFunction.h
@@ -42,7 +42,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue proto)
{
- return Structure::create(proto, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
diff --git a/JavaScriptCore/runtime/JSAPIValueWrapper.h b/JavaScriptCore/runtime/JSAPIValueWrapper.h
index aca550e..b5016c2 100644
--- a/JavaScriptCore/runtime/JSAPIValueWrapper.h
+++ b/JavaScriptCore/runtime/JSAPIValueWrapper.h
@@ -39,7 +39,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(CompoundType, OverridesMarkChildren | OverridesGetPropertyNames));
+ return Structure::create(prototype, TypeInfo(CompoundType, OverridesMarkChildren | OverridesGetPropertyNames), AnonymousSlotCount);
}
diff --git a/JavaScriptCore/runtime/JSActivation.h b/JavaScriptCore/runtime/JSActivation.h
index ee98191..761bee4 100644
--- a/JavaScriptCore/runtime/JSActivation.h
+++ b/JavaScriptCore/runtime/JSActivation.h
@@ -66,7 +66,7 @@ namespace JSC {
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
- static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(ObjectType, StructureFlags)); }
+ static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); }
protected:
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | NeedsThisConversion | OverridesMarkChildren | OverridesGetPropertyNames | JSVariableObject::StructureFlags;
diff --git a/JavaScriptCore/runtime/JSArray.cpp b/JavaScriptCore/runtime/JSArray.cpp
index b16d3fa..2be7371 100644
--- a/JavaScriptCore/runtime/JSArray.cpp
+++ b/JavaScriptCore/runtime/JSArray.cpp
@@ -152,6 +152,7 @@ JSArray::JSArray(NonNullPassRefPtr<Structure> structure, unsigned initialLength)
m_storage->m_numValuesInVector = 0;
m_storage->m_sparseValueMap = 0;
m_storage->lazyCreationData = 0;
+ m_storage->reportedMapCapacity = 0;
JSValue* vector = m_storage->m_vector;
for (size_t i = 0; i < initialCapacity; ++i)
@@ -172,6 +173,8 @@ JSArray::JSArray(NonNullPassRefPtr<Structure> structure, const ArgList& list)
m_vectorLength = initialCapacity;
m_storage->m_numValuesInVector = initialCapacity;
m_storage->m_sparseValueMap = 0;
+ m_storage->lazyCreationData = 0;
+ m_storage->reportedMapCapacity = 0;
size_t i = 0;
ArgList::const_iterator end = list.end();
@@ -185,6 +188,7 @@ JSArray::JSArray(NonNullPassRefPtr<Structure> structure, const ArgList& list)
JSArray::~JSArray()
{
+ ASSERT(vptr() == JSGlobalData::jsArrayVPtr);
checkConsistency(DestructorConsistencyCheck);
delete m_storage->m_sparseValueMap;
@@ -328,13 +332,24 @@ NEVER_INLINE void JSArray::putSlowCase(ExecState* exec, unsigned i, JSValue valu
}
// We miss some cases where we could compact the storage, such as a large array that is being filled from the end
- // (which will only be compacted as we reach indices that are less than cutoff) - but this makes the check much faster.
+ // (which will only be compacted as we reach indices that are less than MIN_SPARSE_ARRAY_INDEX) - but this makes the check much faster.
if ((i > MAX_STORAGE_VECTOR_INDEX) || !isDenseEnoughForVector(i + 1, storage->m_numValuesInVector + 1)) {
if (!map) {
map = new SparseArrayValueMap;
storage->m_sparseValueMap = map;
}
- map->set(i, value);
+
+ pair<SparseArrayValueMap::iterator, bool> result = map->add(i, value);
+ if (!result.second) { // pre-existing entry
+ result.first->second = value;
+ return;
+ }
+
+ size_t capacity = map->capacity();
+ if (capacity != storage->reportedMapCapacity) {
+ Heap::heap(this)->reportExtraMemoryCost((capacity - storage->reportedMapCapacity) * (sizeof(unsigned) + sizeof(JSValue)));
+ storage->reportedMapCapacity = capacity;
+ }
return;
}
}
@@ -380,8 +395,6 @@ NEVER_INLINE void JSArray::putSlowCase(ExecState* exec, unsigned i, JSValue valu
unsigned vectorLength = m_vectorLength;
- Heap::heap(this)->reportExtraMemoryCost(storageSize(newVectorLength) - storageSize(vectorLength));
-
if (newNumValuesInVector == storage->m_numValuesInVector + 1) {
for (unsigned j = vectorLength; j < newVectorLength; ++j)
storage->m_vector[j] = JSValue();
@@ -402,6 +415,8 @@ NEVER_INLINE void JSArray::putSlowCase(ExecState* exec, unsigned i, JSValue valu
m_storage = storage;
checkConsistency();
+
+ Heap::heap(this)->reportExtraMemoryCost(storageSize(newVectorLength) - storageSize(vectorLength));
}
bool JSArray::deleteProperty(ExecState* exec, const Identifier& propertyName)
@@ -454,7 +469,7 @@ bool JSArray::deleteProperty(ExecState* exec, unsigned i)
return false;
}
-void JSArray::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void JSArray::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
// FIXME: Filling PropertyNameArray with an identifier for every integer
// is incredibly inefficient for large arrays. We need a different approach,
@@ -474,7 +489,10 @@ void JSArray::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNa
propertyNames.add(Identifier::from(exec, it->first));
}
- JSObject::getOwnPropertyNames(exec, propertyNames);
+ if (mode == IncludeDontEnumProperties)
+ propertyNames.add(exec->propertyNames().length);
+
+ JSObject::getOwnPropertyNames(exec, propertyNames, mode);
}
bool JSArray::increaseVectorLength(unsigned newLength)
@@ -492,13 +510,15 @@ bool JSArray::increaseVectorLength(unsigned newLength)
if (!tryFastRealloc(storage, storageSize(newVectorLength)).getValue(storage))
return false;
- Heap::heap(this)->reportExtraMemoryCost(storageSize(newVectorLength) - storageSize(vectorLength));
m_vectorLength = newVectorLength;
for (unsigned i = vectorLength; i < newVectorLength; ++i)
storage->m_vector[i] = JSValue();
m_storage = storage;
+
+ Heap::heap(this)->reportExtraMemoryCost(storageSize(newVectorLength) - storageSize(vectorLength));
+
return true;
}
diff --git a/JavaScriptCore/runtime/JSArray.h b/JavaScriptCore/runtime/JSArray.h
index 8c22451..ad6ee88 100644
--- a/JavaScriptCore/runtime/JSArray.h
+++ b/JavaScriptCore/runtime/JSArray.h
@@ -32,6 +32,7 @@ namespace JSC {
unsigned m_numValuesInVector;
SparseArrayValueMap* m_sparseValueMap;
void* lazyCreationData; // A JSArray subclass can use this to fill the vector lazily.
+ size_t reportedMapCapacity;
JSValue m_vector[1];
};
@@ -87,7 +88,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
inline void markChildrenDirect(MarkStack& markStack);
@@ -97,7 +98,7 @@ namespace JSC {
virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
virtual bool deleteProperty(ExecState*, unsigned propertyName);
- virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&);
+ virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
virtual void markChildren(MarkStack&);
void* lazyCreationData();
diff --git a/JavaScriptCore/runtime/JSByteArray.cpp b/JavaScriptCore/runtime/JSByteArray.cpp
index 5e5003b..803a08c 100644
--- a/JavaScriptCore/runtime/JSByteArray.cpp
+++ b/JavaScriptCore/runtime/JSByteArray.cpp
@@ -42,10 +42,18 @@ JSByteArray::JSByteArray(ExecState* exec, NonNullPassRefPtr<Structure> structure
{
putDirect(exec->globalData().propertyNames->length, jsNumber(exec, m_storage->length()), ReadOnly | DontDelete);
}
-
+
+#if !ASSERT_DISABLED
+JSByteArray::~JSByteArray()
+{
+ ASSERT(vptr() == JSGlobalData::jsByteArrayVPtr);
+}
+#endif
+
+
PassRefPtr<Structure> JSByteArray::createStructure(JSValue prototype)
{
- PassRefPtr<Structure> result = Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ PassRefPtr<Structure> result = Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
return result;
}
@@ -96,12 +104,12 @@ void JSByteArray::put(ExecState* exec, unsigned propertyName, JSValue value)
setIndex(exec, propertyName, value);
}
-void JSByteArray::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void JSByteArray::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
unsigned length = m_storage->length();
for (unsigned i = 0; i < length; ++i)
propertyNames.add(Identifier::from(exec, i));
- JSObject::getOwnPropertyNames(exec, propertyNames);
+ JSObject::getOwnPropertyNames(exec, propertyNames, mode);
}
}
diff --git a/JavaScriptCore/runtime/JSByteArray.h b/JavaScriptCore/runtime/JSByteArray.h
index fe6e124..5b7adcf 100644
--- a/JavaScriptCore/runtime/JSByteArray.h
+++ b/JavaScriptCore/runtime/JSByteArray.h
@@ -33,7 +33,7 @@
namespace JSC {
class JSByteArray : public JSObject {
- friend struct VPtrSet;
+ friend class JSGlobalData;
public:
bool canAccessIndex(unsigned i) { return i < m_storage->length(); }
JSValue getIndex(ExecState* exec, unsigned i)
@@ -82,7 +82,7 @@ namespace JSC {
virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
virtual void put(JSC::ExecState*, unsigned propertyName, JSC::JSValue);
- virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&);
+ virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
virtual const ClassInfo* classInfo() const { return m_classInfo; }
static const ClassInfo s_defaultInfo;
@@ -91,6 +91,10 @@ namespace JSC {
WTF::ByteArray* storage() const { return m_storage.get(); }
+#if !ASSERT_DISABLED
+ virtual ~JSByteArray();
+#endif
+
protected:
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesGetPropertyNames | JSObject::StructureFlags;
diff --git a/JavaScriptCore/runtime/JSCell.cpp b/JavaScriptCore/runtime/JSCell.cpp
index 17410e2..869fbfc 100644
--- a/JavaScriptCore/runtime/JSCell.cpp
+++ b/JavaScriptCore/runtime/JSCell.cpp
@@ -59,10 +59,10 @@ static const union {
} doubles;
} NaNInf = { {
-#if PLATFORM(BIG_ENDIAN)
+#if CPU(BIG_ENDIAN)
{ 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 },
{ 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
-#elif PLATFORM(MIDDLE_ENDIAN)
+#elif CPU(MIDDLE_ENDIAN)
{ 0, 0, 0xf8, 0x7f, 0, 0, 0, 0 },
{ 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 }
#else
@@ -76,11 +76,6 @@ extern const double Inf = NaNInf.doubles.Inf_Double;
#endif // !(defined NAN && defined INFINITY)
-void* JSCell::operator new(size_t size, ExecState* exec)
-{
- return exec->heap()->allocate(size);
-}
-
bool JSCell::getUInt32(uint32_t&) const
{
return false;
diff --git a/JavaScriptCore/runtime/JSCell.h b/JavaScriptCore/runtime/JSCell.h
index c8ba2b8..3c8c829 100644
--- a/JavaScriptCore/runtime/JSCell.h
+++ b/JavaScriptCore/runtime/JSCell.h
@@ -43,14 +43,18 @@ namespace JSC {
friend class JSValue;
friend class JSAPIValueWrapper;
friend class JSZombie;
- friend struct VPtrSet;
+ friend class JSGlobalData;
private:
explicit JSCell(Structure*);
- JSCell(); // Only used for initializing Collector blocks.
virtual ~JSCell();
public:
+ static PassRefPtr<Structure> createDummyStructure()
+ {
+ return Structure::create(jsNull(), TypeInfo(UnspecifiedType), AnonymousSlotCount);
+ }
+
// Querying the type.
#if USE(JSVALUE32)
bool isNumber() const;
@@ -107,6 +111,10 @@ namespace JSC {
virtual JSString* toThisJSString(ExecState*);
virtual JSValue getJSNumber();
void* vptr() { return *reinterpret_cast<void**>(this); }
+ void setVPtr(void* vptr) { *reinterpret_cast<void**>(this) = vptr; }
+
+ protected:
+ static const unsigned AnonymousSlotCount = 0;
private:
// Base implementation; for non-object classes implements getPropertySlot.
@@ -122,11 +130,6 @@ namespace JSC {
{
}
- // Only used for initializing Collector blocks.
- inline JSCell::JSCell()
- {
- }
-
inline JSCell::~JSCell()
{
}
@@ -134,7 +137,7 @@ namespace JSC {
#if USE(JSVALUE32)
inline bool JSCell::isNumber() const
{
- return Heap::isNumber(const_cast<JSCell*>(this));
+ return m_structure->typeInfo().type() == NumberType;
}
#endif
@@ -162,6 +165,11 @@ namespace JSC {
return globalData->heap.allocate(size);
}
+ inline void* JSCell::operator new(size_t size, ExecState* exec)
+ {
+ return exec->heap()->allocate(size);
+ }
+
// --- JSValue inlines ----------------------------
inline bool JSValue::isString() const
diff --git a/JavaScriptCore/runtime/JSFunction.cpp b/JavaScriptCore/runtime/JSFunction.cpp
index 024e586..d213b4a 100644
--- a/JavaScriptCore/runtime/JSFunction.cpp
+++ b/JavaScriptCore/runtime/JSFunction.cpp
@@ -81,6 +81,8 @@ JSFunction::JSFunction(ExecState* exec, NonNullPassRefPtr<FunctionExecutable> ex
JSFunction::~JSFunction()
{
+ ASSERT(vptr() == JSGlobalData::jsFunctionVPtr);
+
// JIT code for other functions may have had calls linked directly to the code for this function; these links
// are based on a check for the this pointer value for this JSFunction - which will no longer be valid once
// this memory is freed and may be reused (potentially for another, different JSFunction).
@@ -206,6 +208,17 @@ bool JSFunction::getOwnPropertySlot(ExecState* exec, const Identifier& propertyN
return Base::getOwnPropertyDescriptor(exec, propertyName, descriptor);
}
+void JSFunction::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
+{
+ if (!isHostFunction() && (mode == IncludeDontEnumProperties)) {
+ propertyNames.add(exec->propertyNames().arguments);
+ propertyNames.add(exec->propertyNames().callee);
+ propertyNames.add(exec->propertyNames().caller);
+ propertyNames.add(exec->propertyNames().length);
+ }
+ Base::getOwnPropertyNames(exec, propertyNames, mode);
+}
+
void JSFunction::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
{
if (isHostFunction()) {
diff --git a/JavaScriptCore/runtime/JSFunction.h b/JavaScriptCore/runtime/JSFunction.h
index fcac9aa..8cd4b51 100644
--- a/JavaScriptCore/runtime/JSFunction.h
+++ b/JavaScriptCore/runtime/JSFunction.h
@@ -36,7 +36,7 @@ namespace JSC {
class JSFunction : public InternalFunction {
friend class JIT;
- friend struct VPtrSet;
+ friend class JSGlobalData;
typedef InternalFunction Base;
@@ -61,7 +61,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
NativeFunction nativeFunction()
@@ -82,6 +82,7 @@ namespace JSC {
virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
+ virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
diff --git a/JavaScriptCore/runtime/JSGlobalData.cpp b/JavaScriptCore/runtime/JSGlobalData.cpp
index 234449f..45abc86 100644
--- a/JavaScriptCore/runtime/JSGlobalData.cpp
+++ b/JavaScriptCore/runtime/JSGlobalData.cpp
@@ -45,10 +45,10 @@
#include "JSNotAnObject.h"
#include "JSPropertyNameIterator.h"
#include "JSStaticScopeObject.h"
-#include "Parser.h"
#include "Lexer.h"
#include "Lookup.h"
#include "Nodes.h"
+#include "Parser.h"
#if ENABLE(JSC_MULTIPLE_THREADS)
#include <wtf/Threading.h>
@@ -71,42 +71,38 @@ extern JSC_CONST_HASHTABLE HashTable regExpTable;
extern JSC_CONST_HASHTABLE HashTable regExpConstructorTable;
extern JSC_CONST_HASHTABLE HashTable stringTable;
-struct VPtrSet {
- VPtrSet();
-
- void* jsArrayVPtr;
- void* jsByteArrayVPtr;
- void* jsStringVPtr;
- void* jsFunctionVPtr;
-};
+void* JSGlobalData::jsArrayVPtr;
+void* JSGlobalData::jsByteArrayVPtr;
+void* JSGlobalData::jsStringVPtr;
+void* JSGlobalData::jsFunctionVPtr;
-VPtrSet::VPtrSet()
+void JSGlobalData::storeVPtrs()
{
CollectorCell cell;
void* storage = &cell;
COMPILE_ASSERT(sizeof(JSArray) <= sizeof(CollectorCell), sizeof_JSArray_must_be_less_than_CollectorCell);
JSCell* jsArray = new (storage) JSArray(JSArray::createStructure(jsNull()));
- jsArrayVPtr = jsArray->vptr();
+ JSGlobalData::jsArrayVPtr = jsArray->vptr();
jsArray->~JSCell();
COMPILE_ASSERT(sizeof(JSByteArray) <= sizeof(CollectorCell), sizeof_JSByteArray_must_be_less_than_CollectorCell);
JSCell* jsByteArray = new (storage) JSByteArray(JSByteArray::VPtrStealingHack);
- jsByteArrayVPtr = jsByteArray->vptr();
+ JSGlobalData::jsByteArrayVPtr = jsByteArray->vptr();
jsByteArray->~JSCell();
COMPILE_ASSERT(sizeof(JSString) <= sizeof(CollectorCell), sizeof_JSString_must_be_less_than_CollectorCell);
JSCell* jsString = new (storage) JSString(JSString::VPtrStealingHack);
- jsStringVPtr = jsString->vptr();
+ JSGlobalData::jsStringVPtr = jsString->vptr();
jsString->~JSCell();
COMPILE_ASSERT(sizeof(JSFunction) <= sizeof(CollectorCell), sizeof_JSFunction_must_be_less_than_CollectorCell);
JSCell* jsFunction = new (storage) JSFunction(JSFunction::createStructure(jsNull()));
- jsFunctionVPtr = jsFunction->vptr();
+ JSGlobalData::jsFunctionVPtr = jsFunction->vptr();
jsFunction->~JSCell();
}
-JSGlobalData::JSGlobalData(bool isShared, const VPtrSet& vptrSet)
+JSGlobalData::JSGlobalData(bool isShared)
: isSharedInstance(isShared)
, clientData(0)
, arrayTable(fastNew<HashTable>(JSC::arrayTable))
@@ -126,13 +122,10 @@ JSGlobalData::JSGlobalData(bool isShared, const VPtrSet& vptrSet)
, propertyNameIteratorStructure(JSPropertyNameIterator::createStructure(jsNull()))
, getterSetterStructure(GetterSetter::createStructure(jsNull()))
, apiWrapperStructure(JSAPIValueWrapper::createStructure(jsNull()))
+ , dummyMarkableCellStructure(JSCell::createDummyStructure())
#if USE(JSVALUE32)
, numberStructure(JSNumberCell::createStructure(jsNull()))
#endif
- , jsArrayVPtr(vptrSet.jsArrayVPtr)
- , jsByteArrayVPtr(vptrSet.jsByteArrayVPtr)
- , jsStringVPtr(vptrSet.jsStringVPtr)
- , jsFunctionVPtr(vptrSet.jsFunctionVPtr)
, identifierTable(createIdentifierTable())
, propertyNames(new CommonIdentifiers(this))
, emptyList(new MarkedArgumentBuffer)
@@ -148,7 +141,7 @@ JSGlobalData::JSGlobalData(bool isShared, const VPtrSet& vptrSet)
, dynamicGlobalObject(0)
, functionCodeBlockBeingReparsed(0)
, firstStringifierToMark(0)
- , markStack(vptrSet.jsArrayVPtr)
+ , markStack(jsArrayVPtr)
, cachedUTCOffset(NaN)
, weakRandom(static_cast<int>(currentTime()))
#ifndef NDEBUG
@@ -201,9 +194,17 @@ JSGlobalData::~JSGlobalData()
delete clientData;
}
-PassRefPtr<JSGlobalData> JSGlobalData::create(bool isShared)
+PassRefPtr<JSGlobalData> JSGlobalData::createNonDefault()
+{
+ return adoptRef(new JSGlobalData(false));
+}
+
+PassRefPtr<JSGlobalData> JSGlobalData::create()
{
- return adoptRef(new JSGlobalData(isShared, VPtrSet()));
+ JSGlobalData* globalData = new JSGlobalData(false);
+ setDefaultIdentifierTable(globalData->identifierTable);
+ setCurrentIdentifierTable(globalData->identifierTable);
+ return adoptRef(globalData);
}
PassRefPtr<JSGlobalData> JSGlobalData::createLeaked()
@@ -223,7 +224,7 @@ JSGlobalData& JSGlobalData::sharedInstance()
{
JSGlobalData*& instance = sharedInstanceInternal();
if (!instance) {
- instance = create(true).releaseRef();
+ instance = new JSGlobalData(true);
#if ENABLE(JSC_MULTIPLE_THREADS)
instance->makeUsableFromMultipleThreads();
#endif
diff --git a/JavaScriptCore/runtime/JSGlobalData.h b/JavaScriptCore/runtime/JSGlobalData.h
index f0c1b5c..0f1f3c6 100644
--- a/JavaScriptCore/runtime/JSGlobalData.h
+++ b/JavaScriptCore/runtime/JSGlobalData.h
@@ -62,7 +62,6 @@ namespace JSC {
struct HashTable;
struct Instruction;
- struct VPtrSet;
struct DSTOffsetCache {
DSTOffsetCache()
@@ -93,8 +92,9 @@ namespace JSC {
static bool sharedInstanceExists();
static JSGlobalData& sharedInstance();
- static PassRefPtr<JSGlobalData> create(bool isShared = false);
+ static PassRefPtr<JSGlobalData> create();
static PassRefPtr<JSGlobalData> createLeaked();
+ static PassRefPtr<JSGlobalData> createNonDefault();
~JSGlobalData();
#if ENABLE(JSC_MULTIPLE_THREADS)
@@ -123,15 +123,17 @@ namespace JSC {
RefPtr<Structure> propertyNameIteratorStructure;
RefPtr<Structure> getterSetterStructure;
RefPtr<Structure> apiWrapperStructure;
+ RefPtr<Structure> dummyMarkableCellStructure;
#if USE(JSVALUE32)
RefPtr<Structure> numberStructure;
#endif
- void* jsArrayVPtr;
- void* jsByteArrayVPtr;
- void* jsStringVPtr;
- void* jsFunctionVPtr;
+ static void storeVPtrs();
+ static JS_EXPORTDATA void* jsArrayVPtr;
+ static JS_EXPORTDATA void* jsByteArrayVPtr;
+ static JS_EXPORTDATA void* jsStringVPtr;
+ static JS_EXPORTDATA void* jsFunctionVPtr;
IdentifierTable* identifierTable;
CommonIdentifiers* propertyNames;
@@ -192,7 +194,7 @@ namespace JSC {
void stopSampling();
void dumpSampleData(ExecState* exec);
private:
- JSGlobalData(bool isShared, const VPtrSet&);
+ JSGlobalData(bool isShared);
static JSGlobalData*& sharedInstanceInternal();
void createNativeThunk();
};
diff --git a/JavaScriptCore/runtime/JSGlobalObject.cpp b/JavaScriptCore/runtime/JSGlobalObject.cpp
index cf3f1d1..4bf0a69 100644
--- a/JavaScriptCore/runtime/JSGlobalObject.cpp
+++ b/JavaScriptCore/runtime/JSGlobalObject.cpp
@@ -128,6 +128,8 @@ void JSGlobalObject::init(JSObject* thisValue)
{
ASSERT(JSLock::currentThreadIsHoldingLock());
+ structure()->disableSpecificFunctionTracking();
+
d()->globalData = Heap::heap(this)->globalData();
d()->globalScopeChain = ScopeChain(this, d()->globalData.get(), this, thisValue);
diff --git a/JavaScriptCore/runtime/JSGlobalObject.h b/JavaScriptCore/runtime/JSGlobalObject.h
index 9e4ef49..bbb6d5e 100644
--- a/JavaScriptCore/runtime/JSGlobalObject.h
+++ b/JavaScriptCore/runtime/JSGlobalObject.h
@@ -267,7 +267,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
@@ -413,11 +413,21 @@ namespace JSC {
{
return new (exec) JSObject(exec->lexicalGlobalObject()->emptyObjectStructure());
}
+
+ inline JSObject* constructEmptyObject(ExecState* exec, JSGlobalObject* globalObject)
+ {
+ return new (exec) JSObject(globalObject->emptyObjectStructure());
+ }
inline JSArray* constructEmptyArray(ExecState* exec)
{
return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure());
}
+
+ inline JSArray* constructEmptyArray(ExecState* exec, JSGlobalObject* globalObject)
+ {
+ return new (exec) JSArray(globalObject->arrayStructure());
+ }
inline JSArray* constructEmptyArray(ExecState* exec, unsigned initialLength)
{
diff --git a/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp b/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
index dc32718..0bc1274 100644
--- a/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
+++ b/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
@@ -27,14 +27,16 @@
#include "CallFrame.h"
#include "GlobalEvalFunction.h"
+#include "Interpreter.h"
#include "JSGlobalObject.h"
-#include "LiteralParser.h"
#include "JSString.h"
-#include "Interpreter.h"
-#include "Parser.h"
-#include "dtoa.h"
#include "Lexer.h"
+#include "LiteralParser.h"
#include "Nodes.h"
+#include "Parser.h"
+#include "StringBuilder.h"
+#include "StringExtras.h"
+#include "dtoa.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -55,24 +57,24 @@ static JSValue encode(ExecState* exec, const ArgList& args, const char* doNotEsc
if (!cstr.c_str())
return throwError(exec, URIError, "String contained an illegal UTF-16 sequence.");
- UString result = "";
+ StringBuilder builder;
const char* p = cstr.c_str();
for (size_t k = 0; k < cstr.size(); k++, p++) {
char c = *p;
if (c && strchr(doNotEscape, c))
- result.append(c);
+ builder.append(c);
else {
char tmp[4];
- sprintf(tmp, "%%%02X", static_cast<unsigned char>(c));
- result += tmp;
+ snprintf(tmp, 4, "%%%02X", static_cast<unsigned char>(c));
+ builder.append((const char*)tmp);
}
}
- return jsString(exec, result);
+ return jsString(exec, builder.release());
}
static JSValue decode(ExecState* exec, const ArgList& args, const char* doNotUnescape, bool strict)
{
- UString result = "";
+ StringBuilder builder;
UString str = args.at(0).toString(exec);
int k = 0;
int len = str.size();
@@ -106,7 +108,7 @@ static JSValue decode(ExecState* exec, const ArgList& args, const char* doNotUne
charLen = 0;
else if (character >= 0x10000) {
// Convert to surrogate pair.
- result.append(static_cast<UChar>(0xD800 | ((character - 0x10000) >> 10)));
+ builder.append(static_cast<UChar>(0xD800 | ((character - 0x10000) >> 10)));
u = static_cast<UChar>(0xDC00 | ((character - 0x10000) & 0x3FF));
} else
u = static_cast<UChar>(character);
@@ -131,9 +133,9 @@ static JSValue decode(ExecState* exec, const ArgList& args, const char* doNotUne
}
}
k++;
- result.append(c);
+ builder.append(c);
}
- return jsString(exec, result);
+ return jsString(exec, builder.release());
}
bool isStrWhiteSpace(UChar c)
@@ -376,7 +378,7 @@ JSValue JSC_HOST_CALL globalFuncEscape(ExecState* exec, JSObject*, JSValue, cons
"0123456789"
"*+-./@_";
- UString result = "";
+ StringBuilder builder;
UString s;
UString str = args.at(0).toString(exec);
const UChar* c = str.data();
@@ -393,15 +395,15 @@ JSValue JSC_HOST_CALL globalFuncEscape(ExecState* exec, JSObject*, JSValue, cons
sprintf(tmp, "%%%02X", u);
s = UString(tmp);
}
- result += s;
+ builder.append(s);
}
- return jsString(exec, result);
+ return jsString(exec, builder.release());
}
JSValue JSC_HOST_CALL globalFuncUnescape(ExecState* exec, JSObject*, JSValue, const ArgList& args)
{
- UString result = "";
+ StringBuilder builder;
UString str = args.at(0).toString(exec);
int k = 0;
int len = str.size();
@@ -420,10 +422,10 @@ JSValue JSC_HOST_CALL globalFuncUnescape(ExecState* exec, JSObject*, JSValue, co
k += 2;
}
k++;
- result.append(*c);
+ builder.append(*c);
}
- return jsString(exec, result);
+ return jsString(exec, builder.release());
}
#ifndef NDEBUG
diff --git a/JavaScriptCore/runtime/JSNotAnObject.cpp b/JavaScriptCore/runtime/JSNotAnObject.cpp
index c36dc10..f4764e2 100644
--- a/JavaScriptCore/runtime/JSNotAnObject.cpp
+++ b/JavaScriptCore/runtime/JSNotAnObject.cpp
@@ -121,7 +121,7 @@ bool JSNotAnObject::deleteProperty(ExecState* exec, unsigned)
return false;
}
-void JSNotAnObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray&)
+void JSNotAnObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray&, EnumerationMode)
{
ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
}
diff --git a/JavaScriptCore/runtime/JSNotAnObject.h b/JavaScriptCore/runtime/JSNotAnObject.h
index a271c4e..339d41f 100644
--- a/JavaScriptCore/runtime/JSNotAnObject.h
+++ b/JavaScriptCore/runtime/JSNotAnObject.h
@@ -62,7 +62,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
private:
@@ -91,7 +91,7 @@ namespace JSC {
virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
virtual bool deleteProperty(ExecState*, unsigned propertyName);
- virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&);
+ virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
JSNotAnObjectErrorStub* m_exception;
};
diff --git a/JavaScriptCore/runtime/JSNumberCell.h b/JavaScriptCore/runtime/JSNumberCell.h
index e9e2470..bcb506b 100644
--- a/JavaScriptCore/runtime/JSNumberCell.h
+++ b/JavaScriptCore/runtime/JSNumberCell.h
@@ -76,7 +76,7 @@ namespace JSC {
return globalData->heap.allocateNumber(size);
}
- static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(NumberType, OverridesGetOwnPropertySlot | NeedsThisConversion)); }
+ static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(NumberType, OverridesGetOwnPropertySlot | NeedsThisConversion), AnonymousSlotCount); }
private:
JSNumberCell(JSGlobalData* globalData, double value)
diff --git a/JavaScriptCore/runtime/JSONObject.cpp b/JavaScriptCore/runtime/JSONObject.cpp
index cc7f6d9..ce0dcff 100644
--- a/JavaScriptCore/runtime/JSONObject.cpp
+++ b/JavaScriptCore/runtime/JSONObject.cpp
@@ -32,6 +32,7 @@
#include "JSArray.h"
#include "LiteralParser.h"
#include "PropertyNameArray.h"
+#include "StringBuilder.h"
#include <wtf/MathExtras.h>
namespace JSC {
@@ -70,24 +71,6 @@ public:
void markAggregate(MarkStack&);
private:
- class StringBuilder : public Vector<UChar> {
- public:
- using Vector<UChar>::append;
-
- inline void append(const char* str)
- {
- size_t len = strlen(str);
- reserveCapacity(size() + len);
- for (size_t i = 0; i < len; i++)
- Vector<UChar>::append(str[i]);
- }
-
- inline void append(const UString& str)
- {
- append(str.data(), str.size());
- }
- };
-
class Holder {
public:
Holder(JSObject*);
@@ -285,9 +268,7 @@ JSValue Stringifier::stringify(JSValue value)
if (m_exec->hadException())
return jsNull();
- result.shrinkToFit();
- size_t length = result.size();
- return jsString(m_exec, UString(result.releaseBuffer(), length, false));
+ return jsString(m_exec, result.release());
}
void Stringifier::appendQuotedString(StringBuilder& builder, const UString& value)
@@ -477,7 +458,7 @@ inline void Stringifier::indent()
// Use a single shared string, m_repeatedGap, so we don't keep allocating new ones as we indent and unindent.
int newSize = m_indent.size() + m_gap.size();
if (newSize > m_repeatedGap.size())
- m_repeatedGap.append(m_gap);
+ m_repeatedGap = makeString(m_repeatedGap, m_gap);
ASSERT(newSize <= m_repeatedGap.size());
m_indent = m_repeatedGap.substr(0, newSize);
}
@@ -520,7 +501,7 @@ bool Stringifier::Holder::appendNextProperty(Stringifier& stringifier, StringBui
m_propertyNames = stringifier.m_arrayReplacerPropertyNames.data();
else {
PropertyNameArray objectPropertyNames(exec);
- m_object->getPropertyNames(exec, objectPropertyNames);
+ m_object->getOwnPropertyNames(exec, objectPropertyNames);
m_propertyNames = objectPropertyNames.releaseData();
}
m_size = m_propertyNames->propertyNameVector().size();
@@ -765,7 +746,7 @@ NEVER_INLINE JSValue Walker::walk(JSValue unfiltered)
objectStack.append(object);
indexStack.append(0);
propertyStack.append(PropertyNameArray(m_exec));
- object->getPropertyNames(m_exec, propertyStack.last());
+ object->getOwnPropertyNames(m_exec, propertyStack.last());
// fallthrough
}
objectStartVisitMember:
diff --git a/JavaScriptCore/runtime/JSONObject.h b/JavaScriptCore/runtime/JSONObject.h
index ec3fa40..905e4bc 100644
--- a/JavaScriptCore/runtime/JSONObject.h
+++ b/JavaScriptCore/runtime/JSONObject.h
@@ -41,7 +41,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
static void markStringifiers(MarkStack&, Stringifier*);
diff --git a/JavaScriptCore/runtime/JSObject.cpp b/JavaScriptCore/runtime/JSObject.cpp
index ed9fdc2..d9500aa 100644
--- a/JavaScriptCore/runtime/JSObject.cpp
+++ b/JavaScriptCore/runtime/JSObject.cpp
@@ -42,7 +42,7 @@ namespace JSC {
ASSERT_CLASS_FITS_IN_CELL(JSObject);
-static inline void getEnumerablePropertyNames(ExecState* exec, const ClassInfo* classInfo, PropertyNameArray& propertyNames)
+static inline void getClassPropertyNames(ExecState* exec, const ClassInfo* classInfo, PropertyNameArray& propertyNames, EnumerationMode mode)
{
// Add properties from the static hashtables of properties
for (; classInfo; classInfo = classInfo->parentClass) {
@@ -55,7 +55,7 @@ static inline void getEnumerablePropertyNames(ExecState* exec, const ClassInfo*
int hashSizeMask = table->compactSize - 1;
const HashEntry* entry = table->table;
for (int i = 0; i <= hashSizeMask; ++i, ++entry) {
- if (entry->key() && !(entry->attributes() & DontEnum))
+ if (entry->key() && (!(entry->attributes() & DontEnum) || (mode == IncludeDontEnumProperties)))
propertyNames.add(entry->key());
}
}
@@ -425,9 +425,9 @@ bool JSObject::getPropertySpecificValue(ExecState*, const Identifier& propertyNa
return false;
}
-void JSObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void JSObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
- getOwnPropertyNames(exec, propertyNames);
+ getOwnPropertyNames(exec, propertyNames, mode);
if (prototype().isNull())
return;
@@ -435,10 +435,10 @@ void JSObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyName
JSObject* prototype = asObject(this->prototype());
while(1) {
if (prototype->structure()->typeInfo().overridesGetPropertyNames()) {
- prototype->getPropertyNames(exec, propertyNames);
+ prototype->getPropertyNames(exec, propertyNames, mode);
break;
}
- prototype->getOwnPropertyNames(exec, propertyNames);
+ prototype->getOwnPropertyNames(exec, propertyNames, mode);
JSValue nextProto = prototype->prototype();
if (nextProto.isNull())
break;
@@ -446,10 +446,10 @@ void JSObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyName
}
}
-void JSObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void JSObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
- m_structure->getEnumerablePropertyNames(propertyNames);
- getEnumerablePropertyNames(exec, classInfo(), propertyNames);
+ m_structure->getPropertyNames(propertyNames, mode);
+ getClassPropertyNames(exec, classInfo(), propertyNames, mode);
}
bool JSObject::toBoolean(ExecState*) const
diff --git a/JavaScriptCore/runtime/JSObject.h b/JavaScriptCore/runtime/JSObject.h
index a5da267..2b31a65 100644
--- a/JavaScriptCore/runtime/JSObject.h
+++ b/JavaScriptCore/runtime/JSObject.h
@@ -122,8 +122,8 @@ namespace JSC {
virtual bool hasInstance(ExecState*, JSValue, JSValue prototypeProperty);
- virtual void getPropertyNames(ExecState*, PropertyNameArray&);
- virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&);
+ virtual void getPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
+ virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
virtual JSValue toPrimitive(ExecState*, PreferredPrimitiveType = NoPreference) const;
virtual bool getPrimitiveNumber(ExecState*, double& number, JSValue& value);
@@ -206,7 +206,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
void flattenDictionaryObject()
@@ -217,13 +217,14 @@ namespace JSC {
protected:
static const unsigned StructureFlags = 0;
- void addAnonymousSlots(unsigned count);
void putAnonymousValue(unsigned index, JSValue value)
{
+ ASSERT(index < m_structure->anonymousSlotCount());
*locationForOffset(index) = value;
}
- JSValue getAnonymousValue(unsigned index)
+ JSValue getAnonymousValue(unsigned index) const
{
+ ASSERT(index < m_structure->anonymousSlotCount());
return *locationForOffset(index);
}
@@ -381,7 +382,7 @@ ALWAYS_INLINE bool JSCell::fastGetOwnPropertySlot(ExecState* exec, const Identif
// It may seem crazy to inline a function this large but it makes a big difference
// since this is function very hot in variable lookup
-inline bool JSObject::getPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+ALWAYS_INLINE bool JSObject::getPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
JSObject* object = this;
while (true) {
@@ -394,7 +395,7 @@ inline bool JSObject::getPropertySlot(ExecState* exec, const Identifier& propert
}
}
-inline bool JSObject::getPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot)
+ALWAYS_INLINE bool JSObject::getPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
JSObject* object = this;
while (true) {
@@ -528,17 +529,6 @@ inline void JSObject::putDirectInternal(JSGlobalData& globalData, const Identifi
putDirectInternal(propertyName, value, attributes, false, slot, getJSFunction(globalData, value));
}
-inline void JSObject::addAnonymousSlots(unsigned count)
-{
- size_t currentCapacity = m_structure->propertyStorageCapacity();
- RefPtr<Structure> structure = Structure::addAnonymousSlotsTransition(m_structure, count);
-
- if (currentCapacity != structure->propertyStorageCapacity())
- allocatePropertyStorage(currentCapacity, structure->propertyStorageCapacity());
-
- setStructure(structure.release());
-}
-
inline void JSObject::putDirect(const Identifier& propertyName, JSValue value, unsigned attributes, bool checkReadOnly, PutPropertySlot& slot)
{
ASSERT(value);
diff --git a/JavaScriptCore/runtime/JSPropertyNameIterator.h b/JavaScriptCore/runtime/JSPropertyNameIterator.h
index 529ae8b..d18c2c5 100644
--- a/JavaScriptCore/runtime/JSPropertyNameIterator.h
+++ b/JavaScriptCore/runtime/JSPropertyNameIterator.h
@@ -47,7 +47,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(CompoundType, OverridesMarkChildren));
+ return Structure::create(prototype, TypeInfo(CompoundType, OverridesMarkChildren), AnonymousSlotCount);
}
virtual bool isPropertyNameIterator() const { return true; }
diff --git a/JavaScriptCore/runtime/JSStaticScopeObject.h b/JavaScriptCore/runtime/JSStaticScopeObject.h
index 2542878..4d156d4 100644
--- a/JavaScriptCore/runtime/JSStaticScopeObject.h
+++ b/JavaScriptCore/runtime/JSStaticScopeObject.h
@@ -57,7 +57,7 @@ namespace JSC{
virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&);
void putWithAttributes(ExecState*, const Identifier&, JSValue, unsigned attributes);
- static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(ObjectType, StructureFlags)); }
+ static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); }
protected:
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | NeedsThisConversion | OverridesMarkChildren | OverridesGetPropertyNames | JSVariableObject::StructureFlags;
diff --git a/JavaScriptCore/runtime/JSString.cpp b/JavaScriptCore/runtime/JSString.cpp
index 28ae6f7..1e23a15 100644
--- a/JavaScriptCore/runtime/JSString.cpp
+++ b/JavaScriptCore/runtime/JSString.cpp
@@ -66,20 +66,6 @@ JSString::Rope::~Rope()
destructNonRecursive();
}
-#define ROPE_COPY_CHARS_INLINE_CUTOFF 20
-
-static inline void copyChars(UChar* destination, const UChar* source, unsigned numCharacters)
-{
-#ifdef ROPE_COPY_CHARS_INLINE_CUTOFF
- if (numCharacters <= ROPE_COPY_CHARS_INLINE_CUTOFF) {
- for (unsigned i = 0; i < numCharacters; ++i)
- destination[i] = source[i];
- return;
- }
-#endif
- memcpy(destination, source, numCharacters * sizeof(UChar));
-}
-
// Overview: this methods converts a JSString from holding a string in rope form
// down to a simple UString representation. It does so by building up the string
// backwards, since we want to avoid recursion, we expect that the tree structure
@@ -96,13 +82,16 @@ void JSString::resolveRope(ExecState* exec) const
// Allocate the buffer to hold the final string, position initially points to the end.
UChar* buffer;
- if (!tryFastMalloc(m_stringLength * sizeof(UChar)).getValue(buffer)) {
- for (unsigned i = 0; i < m_ropeLength; ++i)
+ if (PassRefPtr<UStringImpl> newImpl = UStringImpl::tryCreateUninitialized(m_stringLength, buffer))
+ m_value = newImpl;
+ else {
+ for (unsigned i = 0; i < m_ropeLength; ++i) {
m_fibers[i].deref();
+ m_fibers[i] = static_cast<void*>(0);
+ }
m_ropeLength = 0;
ASSERT(!isRope());
ASSERT(m_value == UString());
-
throwOutOfMemoryError(exec);
return;
}
@@ -125,17 +114,18 @@ void JSString::resolveRope(ExecState* exec) const
currentFiber = rope->fibers(ropeLengthMinusOne);
} else {
UString::Rep* string = currentFiber.string();
- unsigned length = string->len;
+ unsigned length = string->size();
position -= length;
- copyChars(position, string->data(), length);
+ UStringImpl::copyChars(position, string->data(), length);
// Was this the last item in the work queue?
if (workQueue.isEmpty()) {
// Create a string from the UChar buffer, clear the rope RefPtr.
ASSERT(buffer == position);
- m_value = UString::Rep::create(buffer, m_stringLength);
- for (unsigned i = 0; i < m_ropeLength; ++i)
+ for (unsigned i = 0; i < m_ropeLength; ++i) {
m_fibers[i].deref();
+ m_fibers[i] = static_cast<void*>(0);
+ }
m_ropeLength = 0;
ASSERT(!isRope());
diff --git a/JavaScriptCore/runtime/JSString.h b/JavaScriptCore/runtime/JSString.h
index 93b11f1..7288b6f 100644
--- a/JavaScriptCore/runtime/JSString.h
+++ b/JavaScriptCore/runtime/JSString.h
@@ -59,10 +59,13 @@ namespace JSC {
JSString* jsOwnedString(JSGlobalData*, const UString&);
JSString* jsOwnedString(ExecState*, const UString&);
- class JSString : public JSCell {
+ typedef void (*JSStringFinalizerCallback)(JSString*, void* context);
+ JSString* jsStringWithFinalizer(ExecState*, const UString&, JSStringFinalizerCallback callback, void* context);
+
+ class JS_EXPORTCLASS JSString : public JSCell {
public:
friend class JIT;
- friend struct VPtrSet;
+ friend class JSGlobalData;
// A Rope is a string composed of a set of substrings.
class Rope : public RefCounted<Rope> {
@@ -71,10 +74,12 @@ namespace JSC {
// Each Fiber in a rope is either UString::Rep or another Rope.
class Fiber {
public:
- Fiber() {}
+ Fiber() : m_value(0) {}
Fiber(UString::Rep* string) : m_value(reinterpret_cast<intptr_t>(string)) {}
Fiber(Rope* rope) : m_value(reinterpret_cast<intptr_t>(rope) | 1) {}
+ Fiber(void* nonFiber) : m_value(reinterpret_cast<intptr_t>(nonFiber)) {}
+
void deref()
{
if (isRope())
@@ -96,7 +101,7 @@ namespace JSC {
{
if (isString()) {
UString::Rep* rep = string();
- return rep->ref()->len;
+ return rep->ref()->size();
} else {
Rope* r = rope();
r->ref();
@@ -109,6 +114,7 @@ namespace JSC {
bool isString() { return !isRope(); }
UString::Rep* string() { return reinterpret_cast<UString::Rep*>(m_value); }
+ void* nonFiber() { return reinterpret_cast<void*>(m_value); }
private:
intptr_t m_value;
};
@@ -135,7 +141,7 @@ namespace JSC {
{
UString::Rep* rep = string.rep();
m_fibers[index++] = Fiber(rep);
- m_stringLength += rep->ref()->len;
+ m_stringLength += rep->ref()->size();
}
void append(unsigned& index, JSString* jsString)
{
@@ -159,7 +165,7 @@ namespace JSC {
Fiber m_fibers[1];
};
- JSString(JSGlobalData* globalData, const UString& value)
+ ALWAYS_INLINE JSString(JSGlobalData* globalData, const UString& value)
: JSCell(globalData->stringStructure.get())
, m_stringLength(value.size())
, m_value(value)
@@ -219,10 +225,28 @@ namespace JSC {
ASSERT(index == s_maxInternalRopeLength);
}
+ JSString(JSGlobalData* globalData, const UString& value, JSStringFinalizerCallback finalizer, void* context)
+ : JSCell(globalData->stringStructure.get())
+ , m_stringLength(value.size())
+ , m_value(value)
+ , m_ropeLength(0)
+ {
+ // nasty hack because we can't union non-POD types
+ m_fibers[0] = reinterpret_cast<void*>(reinterpret_cast<ptrdiff_t>(finalizer));
+ m_fibers[1] = context;
+ Heap::heap(this)->reportExtraMemoryCost(value.cost());
+ }
+
~JSString()
{
+ ASSERT(vptr() == JSGlobalData::jsStringVPtr);
for (unsigned i = 0; i < m_ropeLength; ++i)
m_fibers[i].deref();
+
+ if (!m_ropeLength && m_fibers[0].nonFiber()) {
+ JSStringFinalizerCallback finalizer = reinterpret_cast<JSStringFinalizerCallback>(m_fibers[0].nonFiber());
+ finalizer(this, m_fibers[1].nonFiber());
+ }
}
const UString& value(ExecState* exec) const
@@ -246,7 +270,7 @@ namespace JSC {
bool canGetIndex(unsigned i) { return i < m_stringLength; }
JSString* getIndex(ExecState*, unsigned);
- static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(StringType, OverridesGetOwnPropertySlot | NeedsThisConversion)); }
+ static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(StringType, OverridesGetOwnPropertySlot | NeedsThisConversion), AnonymousSlotCount); }
private:
enum VPtrStealingHackType { VPtrStealingHack };
@@ -312,10 +336,22 @@ namespace JSC {
friend JSValue jsString(ExecState* exec, JSString* s1, JSString* s2);
friend JSValue jsString(ExecState* exec, Register* strings, unsigned count);
+ friend JSValue jsString(ExecState* exec, JSValue thisValue, const ArgList& args);
+ friend JSString* jsStringWithFinalizer(ExecState*, const UString&, JSStringFinalizerCallback callback, void* context);
};
JSString* asString(JSValue);
+ // When an object is created from a different DLL, MSVC changes vptr to a "local" one right after invoking a constructor,
+ // see <http://groups.google.com/group/microsoft.public.vc.language/msg/55cdcefeaf770212>.
+ // This breaks isJSString(), and we don't need that hack anyway, so we change vptr back to primary one.
+ // The below function must be called by any inline function that invokes a JSString constructor.
+#if COMPILER(MSVC) && !defined(BUILDING_JavaScriptCore)
+ inline JSString* fixupVPtr(JSGlobalData* globalData, JSString* string) { string->setVPtr(globalData->jsStringVPtr); return string; }
+#else
+ inline JSString* fixupVPtr(JSGlobalData*, JSString* string) { return string; }
+#endif
+
inline JSString* asString(JSValue value)
{
ASSERT(asCell(value)->isString());
@@ -331,7 +367,7 @@ namespace JSC {
{
if (c <= 0xFF)
return globalData->smallStrings.singleCharacterString(globalData, c);
- return new (globalData) JSString(globalData, UString(&c, 1));
+ return fixupVPtr(globalData, new (globalData) JSString(globalData, UString(&c, 1)));
}
inline JSString* jsSingleCharacterSubstring(JSGlobalData* globalData, const UString& s, unsigned offset)
@@ -340,7 +376,7 @@ namespace JSC {
UChar c = s.data()[offset];
if (c <= 0xFF)
return globalData->smallStrings.singleCharacterString(globalData, c);
- return new (globalData) JSString(globalData, UString(UString::Rep::create(s.rep(), offset, 1)));
+ return fixupVPtr(globalData, new (globalData) JSString(globalData, UString(UString::Rep::create(s.rep(), offset, 1))));
}
inline JSString* jsNontrivialString(JSGlobalData* globalData, const char* s)
@@ -348,13 +384,13 @@ namespace JSC {
ASSERT(s);
ASSERT(s[0]);
ASSERT(s[1]);
- return new (globalData) JSString(globalData, s);
+ return fixupVPtr(globalData, new (globalData) JSString(globalData, s));
}
inline JSString* jsNontrivialString(JSGlobalData* globalData, const UString& s)
{
ASSERT(s.size() > 1);
- return new (globalData) JSString(globalData, s);
+ return fixupVPtr(globalData, new (globalData) JSString(globalData, s));
}
inline JSString* JSString::getIndex(ExecState* exec, unsigned i)
@@ -373,7 +409,14 @@ namespace JSC {
if (c <= 0xFF)
return globalData->smallStrings.singleCharacterString(globalData, c);
}
- return new (globalData) JSString(globalData, s);
+ return fixupVPtr(globalData, new (globalData) JSString(globalData, s));
+ }
+
+ inline JSString* jsStringWithFinalizer(ExecState* exec, const UString& s, JSStringFinalizerCallback callback, void* context)
+ {
+ ASSERT(s.size() && (s.size() > 1 || s.data()[0] > 0xFF));
+ JSGlobalData* globalData = &exec->globalData();
+ return fixupVPtr(globalData, new (globalData) JSString(globalData, s, callback, context));
}
inline JSString* jsSubstring(JSGlobalData* globalData, const UString& s, unsigned offset, unsigned length)
@@ -388,7 +431,7 @@ namespace JSC {
if (c <= 0xFF)
return globalData->smallStrings.singleCharacterString(globalData, c);
}
- return new (globalData) JSString(globalData, UString(UString::Rep::create(s.rep(), offset, length)));
+ return fixupVPtr(globalData, new (globalData) JSString(globalData, UString(UString::Rep::create(s.rep(), offset, length)), JSString::HasOtherOwner));
}
inline JSString* jsOwnedString(JSGlobalData* globalData, const UString& s)
@@ -401,7 +444,7 @@ namespace JSC {
if (c <= 0xFF)
return globalData->smallStrings.singleCharacterString(globalData, c);
}
- return new (globalData) JSString(globalData, s, JSString::HasOtherOwner);
+ return fixupVPtr(globalData, new (globalData) JSString(globalData, s, JSString::HasOtherOwner));
}
inline JSString* jsEmptyString(ExecState* exec) { return jsEmptyString(&exec->globalData()); }
@@ -469,6 +512,26 @@ namespace JSC {
return asCell()->toString(exec);
}
+ inline UString JSValue::toPrimitiveString(ExecState* exec) const
+ {
+ if (isString())
+ return static_cast<JSString*>(asCell())->value(exec);
+ if (isInt32())
+ return exec->globalData().numericStrings.add(asInt32());
+ if (isDouble())
+ return exec->globalData().numericStrings.add(asDouble());
+ if (isTrue())
+ return "true";
+ if (isFalse())
+ return "false";
+ if (isNull())
+ return "null";
+ if (isUndefined())
+ return "undefined";
+ ASSERT(isCell());
+ return asCell()->toPrimitive(exec, NoPreference).toString(exec);
+ }
+
} // namespace JSC
#endif // JSString_h
diff --git a/JavaScriptCore/runtime/JSValue.h b/JavaScriptCore/runtime/JSValue.h
index fa5b5c0..6da921f 100644
--- a/JavaScriptCore/runtime/JSValue.h
+++ b/JavaScriptCore/runtime/JSValue.h
@@ -158,6 +158,7 @@ namespace JSC {
double toNumber(ExecState*) const;
JSValue toJSNumber(ExecState*) const; // Fast path for when you expect that the value is an immediate number.
UString toString(ExecState*) const;
+ UString toPrimitiveString(ExecState*) const;
JSObject* toObject(ExecState*) const;
// Integer conversions.
@@ -234,7 +235,7 @@ namespace JSC {
union {
EncodedJSValue asEncodedJSValue;
double asDouble;
-#if PLATFORM(BIG_ENDIAN)
+#if CPU(BIG_ENDIAN)
struct {
int32_t tag;
int32_t payload;
diff --git a/JavaScriptCore/runtime/JSVariableObject.cpp b/JavaScriptCore/runtime/JSVariableObject.cpp
index 3aa9e62..7365001 100644
--- a/JavaScriptCore/runtime/JSVariableObject.cpp
+++ b/JavaScriptCore/runtime/JSVariableObject.cpp
@@ -42,15 +42,15 @@ bool JSVariableObject::deleteProperty(ExecState* exec, const Identifier& propert
return JSObject::deleteProperty(exec, propertyName);
}
-void JSVariableObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void JSVariableObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
SymbolTable::const_iterator end = symbolTable().end();
for (SymbolTable::const_iterator it = symbolTable().begin(); it != end; ++it) {
- if (!(it->second.getAttributes() & DontEnum))
+ if (!(it->second.getAttributes() & DontEnum) || (mode == IncludeDontEnumProperties))
propertyNames.add(Identifier(exec, it->first.get()));
}
- JSObject::getOwnPropertyNames(exec, propertyNames);
+ JSObject::getOwnPropertyNames(exec, propertyNames, mode);
}
bool JSVariableObject::isVariableObject() const
diff --git a/JavaScriptCore/runtime/JSVariableObject.h b/JavaScriptCore/runtime/JSVariableObject.h
index 15d6ff5..6c679ce 100644
--- a/JavaScriptCore/runtime/JSVariableObject.h
+++ b/JavaScriptCore/runtime/JSVariableObject.h
@@ -49,7 +49,7 @@ namespace JSC {
virtual void putWithAttributes(ExecState*, const Identifier&, JSValue, unsigned attributes) = 0;
virtual bool deleteProperty(ExecState*, const Identifier&);
- virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&);
+ virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
virtual bool isVariableObject() const;
virtual bool isDynamicScope() const = 0;
@@ -58,7 +58,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
diff --git a/JavaScriptCore/runtime/JSWrapperObject.h b/JavaScriptCore/runtime/JSWrapperObject.h
index 191ff3b..f19cd30 100644
--- a/JavaScriptCore/runtime/JSWrapperObject.h
+++ b/JavaScriptCore/runtime/JSWrapperObject.h
@@ -38,9 +38,12 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
+ protected:
+ static const unsigned AnonymousSlotCount = 1 + JSObject::AnonymousSlotCount;
+
private:
virtual void markChildren(MarkStack&);
@@ -50,7 +53,6 @@ namespace JSC {
inline JSWrapperObject::JSWrapperObject(NonNullPassRefPtr<Structure> structure)
: JSObject(structure)
{
- addAnonymousSlots(1);
putAnonymousValue(0, jsNull());
}
diff --git a/JavaScriptCore/runtime/LiteralParser.cpp b/JavaScriptCore/runtime/LiteralParser.cpp
index d242282..aa1e5ed 100644
--- a/JavaScriptCore/runtime/LiteralParser.cpp
+++ b/JavaScriptCore/runtime/LiteralParser.cpp
@@ -29,6 +29,7 @@
#include "JSArray.h"
#include "JSString.h"
#include "Lexer.h"
+#include "StringBuilder.h"
#include <wtf/ASCIICType.h>
#include <wtf/dtoa.h>
@@ -134,48 +135,48 @@ template <LiteralParser::ParserMode mode> inline LiteralParser::TokenType Litera
{
++m_ptr;
const UChar* runStart;
- token.stringToken = UString();
+ StringBuilder builder;
do {
runStart = m_ptr;
while (m_ptr < m_end && isSafeStringCharacter<mode>(*m_ptr))
++m_ptr;
if (runStart < m_ptr)
- token.stringToken.append(runStart, m_ptr - runStart);
+ builder.append(runStart, m_ptr - runStart);
if ((mode == StrictJSON) && m_ptr < m_end && *m_ptr == '\\') {
++m_ptr;
if (m_ptr >= m_end)
return TokError;
switch (*m_ptr) {
case '"':
- token.stringToken.append('"');
+ builder.append('"');
m_ptr++;
break;
case '\\':
- token.stringToken.append('\\');
+ builder.append('\\');
m_ptr++;
break;
case '/':
- token.stringToken.append('/');
+ builder.append('/');
m_ptr++;
break;
case 'b':
- token.stringToken.append('\b');
+ builder.append('\b');
m_ptr++;
break;
case 'f':
- token.stringToken.append('\f');
+ builder.append('\f');
m_ptr++;
break;
case 'n':
- token.stringToken.append('\n');
+ builder.append('\n');
m_ptr++;
break;
case 'r':
- token.stringToken.append('\r');
+ builder.append('\r');
m_ptr++;
break;
case 't':
- token.stringToken.append('\t');
+ builder.append('\t');
m_ptr++;
break;
@@ -186,7 +187,7 @@ template <LiteralParser::ParserMode mode> inline LiteralParser::TokenType Litera
if (!isASCIIHexDigit(m_ptr[i]))
return TokError;
}
- token.stringToken.append(JSC::Lexer::convertUnicode(m_ptr[1], m_ptr[2], m_ptr[3], m_ptr[4]));
+ builder.append(JSC::Lexer::convertUnicode(m_ptr[1], m_ptr[2], m_ptr[3], m_ptr[4]));
m_ptr += 5;
break;
@@ -199,6 +200,7 @@ template <LiteralParser::ParserMode mode> inline LiteralParser::TokenType Litera
if (m_ptr >= m_end || *m_ptr != '"')
return TokError;
+ token.stringToken = builder.release();
token.type = TokString;
token.end = ++m_ptr;
return TokString;
diff --git a/JavaScriptCore/runtime/Lookup.cpp b/JavaScriptCore/runtime/Lookup.cpp
index 8359ff7..4e9e086 100644
--- a/JavaScriptCore/runtime/Lookup.cpp
+++ b/JavaScriptCore/runtime/Lookup.cpp
@@ -34,7 +34,7 @@ void HashTable::createTable(JSGlobalData* globalData) const
entries[i].setKey(0);
for (int i = 0; values[i].key; ++i) {
UString::Rep* identifier = Identifier::add(globalData, values[i].key).releaseRef();
- int hashIndex = identifier->computedHash() & compactHashSizeMask;
+ int hashIndex = identifier->existingHash() & compactHashSizeMask;
HashEntry* entry = &entries[hashIndex];
if (entry->key()) {
diff --git a/JavaScriptCore/runtime/Lookup.h b/JavaScriptCore/runtime/Lookup.h
index 4d70689..e673c09 100644
--- a/JavaScriptCore/runtime/Lookup.h
+++ b/JavaScriptCore/runtime/Lookup.h
@@ -144,7 +144,7 @@ namespace JSC {
{
ASSERT(table);
- const HashEntry* entry = &table[identifier.ustring().rep()->computedHash() & compactHashSizeMask];
+ const HashEntry* entry = &table[identifier.ustring().rep()->existingHash() & compactHashSizeMask];
if (!entry->key())
return 0;
diff --git a/JavaScriptCore/runtime/MarkStack.h b/JavaScriptCore/runtime/MarkStack.h
index a114ae0..c551bac 100644
--- a/JavaScriptCore/runtime/MarkStack.h
+++ b/JavaScriptCore/runtime/MarkStack.h
@@ -153,7 +153,7 @@ namespace JSC {
ASSERT(0 == (size % MarkStack::pageSize()));
if (size == m_allocated)
return;
-#if PLATFORM(WIN_OS) || PLATFORM(SYMBIAN)
+#if OS(WINDOWS) || OS(SYMBIAN) || PLATFORM(BREWMP)
// We cannot release a part of a region with VirtualFree. To get around this,
// we'll release the entire region and reallocate the size that we want.
releaseStack(m_data, m_allocated);
diff --git a/JavaScriptCore/runtime/MarkStackNone.cpp b/JavaScriptCore/runtime/MarkStackNone.cpp
new file mode 100644
index 0000000..b1ff48b
--- /dev/null
+++ b/JavaScriptCore/runtime/MarkStackNone.cpp
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2009 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 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 "MarkStack.h"
+
+#include "FastMalloc.h"
+
+namespace JSC {
+
+void MarkStack::initializePagesize()
+{
+ MarkStack::s_pageSize = 4096;
+}
+
+void* MarkStack::allocateStack(size_t size)
+{
+ return fastMalloc(size);
+}
+
+void MarkStack::releaseStack(void* addr, size_t)
+{
+ return fastFree(addr);
+}
+
+}
diff --git a/JavaScriptCore/runtime/MarkStackPosix.cpp b/JavaScriptCore/runtime/MarkStackPosix.cpp
index 8e78ff3..c28bc0d 100644
--- a/JavaScriptCore/runtime/MarkStackPosix.cpp
+++ b/JavaScriptCore/runtime/MarkStackPosix.cpp
@@ -24,10 +24,10 @@
*/
#include "config.h"
-
-
#include "MarkStack.h"
+#if OS(UNIX) && !OS(SYMBIAN)
+
#include <unistd.h>
#include <sys/mman.h>
@@ -48,3 +48,5 @@ void MarkStack::releaseStack(void* addr, size_t size)
}
}
+
+#endif
diff --git a/JavaScriptCore/runtime/MarkStackSymbian.cpp b/JavaScriptCore/runtime/MarkStackSymbian.cpp
index a0ce8f6..bda14ac 100644
--- a/JavaScriptCore/runtime/MarkStackSymbian.cpp
+++ b/JavaScriptCore/runtime/MarkStackSymbian.cpp
@@ -20,6 +20,8 @@
#include "config.h"
#include "MarkStack.h"
+#if OS(SYMBIAN)
+
#include <e32hal.h>
namespace JSC {
@@ -42,3 +44,5 @@ void MarkStack::releaseStack(void* addr, size_t size)
}
}
+
+#endif
diff --git a/JavaScriptCore/runtime/MarkStackWin.cpp b/JavaScriptCore/runtime/MarkStackWin.cpp
index 1fdd06a..a171c78 100644
--- a/JavaScriptCore/runtime/MarkStackWin.cpp
+++ b/JavaScriptCore/runtime/MarkStackWin.cpp
@@ -24,10 +24,10 @@
*/
#include "config.h"
-
-
#include "MarkStack.h"
+#if OS(WINDOWS)
+
#include "windows.h"
namespace JSC {
@@ -51,3 +51,5 @@ void MarkStack::releaseStack(void* addr, size_t)
}
}
+
+#endif
diff --git a/JavaScriptCore/runtime/MathObject.h b/JavaScriptCore/runtime/MathObject.h
index 7f474b8..a9f7031 100644
--- a/JavaScriptCore/runtime/MathObject.h
+++ b/JavaScriptCore/runtime/MathObject.h
@@ -37,7 +37,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
diff --git a/JavaScriptCore/runtime/NumberConstructor.h b/JavaScriptCore/runtime/NumberConstructor.h
index cf19b6f..723c4b2 100644
--- a/JavaScriptCore/runtime/NumberConstructor.h
+++ b/JavaScriptCore/runtime/NumberConstructor.h
@@ -39,7 +39,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue proto)
{
- return Structure::create(proto, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
enum { NaNValue, NegInfinity, PosInfinity, MaxValue, MinValue };
diff --git a/JavaScriptCore/runtime/NumberObject.h b/JavaScriptCore/runtime/NumberObject.h
index 8223a90..6c18cdd 100644
--- a/JavaScriptCore/runtime/NumberObject.h
+++ b/JavaScriptCore/runtime/NumberObject.h
@@ -33,7 +33,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
diff --git a/JavaScriptCore/runtime/NumberPrototype.cpp b/JavaScriptCore/runtime/NumberPrototype.cpp
index df31404..67210fa 100644
--- a/JavaScriptCore/runtime/NumberPrototype.cpp
+++ b/JavaScriptCore/runtime/NumberPrototype.cpp
@@ -25,9 +25,10 @@
#include "Error.h"
#include "JSFunction.h"
#include "JSString.h"
+#include "Operations.h"
#include "PrototypeFunction.h"
+#include "StringBuilder.h"
#include "dtoa.h"
-#include "Operations.h"
#include <wtf/Assertions.h>
#include <wtf/MathExtras.h>
#include <wtf/Vector.h>
@@ -73,11 +74,12 @@ static UString integerPartNoExp(double d)
bool resultIsInfOrNan = (decimalPoint == 9999);
size_t length = strlen(result);
- UString str = sign ? "-" : "";
+ StringBuilder builder;
+ builder.append(sign ? "-" : "");
if (resultIsInfOrNan)
- str += result;
+ builder.append((const char*)result);
else if (decimalPoint <= 0)
- str += "0";
+ builder.append("0");
else {
Vector<char, 1024> buf(decimalPoint + 1);
@@ -89,10 +91,10 @@ static UString integerPartNoExp(double d)
strncpy(buf.data(), result, decimalPoint);
buf[decimalPoint] = '\0';
- str.append(buf.data());
+ builder.append((const char*)(buf.data()));
}
- return str;
+ return builder.release();
}
static UString charSequence(char c, int count)
@@ -236,13 +238,16 @@ JSValue JSC_HOST_CALL numberProtoFuncToFixed(ExecState* exec, JSObject*, JSValue
UString s;
if (x < 0) {
- s.append('-');
+ s = "-";
x = -x;
- } else if (x == -0.0)
- x = 0;
+ } else {
+ s = "";
+ if (x == -0.0)
+ x = 0;
+ }
if (x >= pow(10.0, 21.0))
- return jsString(exec, s + UString::from(x));
+ return jsString(exec, makeString(s, UString::from(x)));
const double tenToTheF = pow(10.0, f);
double n = floor(x * tenToTheF);
@@ -253,17 +258,19 @@ JSValue JSC_HOST_CALL numberProtoFuncToFixed(ExecState* exec, JSObject*, JSValue
int k = m.size();
if (k <= f) {
- UString z;
+ StringBuilder z;
for (int i = 0; i < f + 1 - k; i++)
z.append('0');
- m = z + m;
+ z.append(m);
+ m = z.release();
k = f + 1;
ASSERT(k == m.size());
}
int kMinusf = k - f;
+
if (kMinusf < m.size())
- return jsString(exec, s + m.substr(0, kMinusf) + "." + m.substr(kMinusf));
- return jsString(exec, s + m.substr(0, kMinusf));
+ return jsString(exec, makeString(s, m.substr(0, kMinusf), ".", m.substr(kMinusf)));
+ return jsString(exec, makeString(s, m.substr(0, kMinusf)));
}
static void fractionalPartToString(char* buf, int& i, const char* result, int resultLength, int fractionalDigits)
@@ -391,7 +398,8 @@ JSValue JSC_HOST_CALL numberProtoFuncToPrecision(ExecState* exec, JSObject*, JSV
if (x < 0) {
s = "-";
x = -x;
- }
+ } else
+ s = "";
if (!(doublePrecision >= 1 && doublePrecision <= 21)) // true for NaN
return throwError(exec, RangeError, "toPrecision() argument must be between 1 and 21");
@@ -422,10 +430,10 @@ JSValue JSC_HOST_CALL numberProtoFuncToPrecision(ExecState* exec, JSObject*, JSV
m = integerPartNoExp(n);
if (e < -6 || e >= precision) {
if (m.size() > 1)
- m = m.substr(0, 1) + "." + m.substr(1);
+ m = makeString(m.substr(0, 1), ".", m.substr(1));
if (e >= 0)
- return jsNontrivialString(exec, s + m + "e+" + UString::from(e));
- return jsNontrivialString(exec, s + m + "e-" + UString::from(-e));
+ return jsNontrivialString(exec, makeString(s, m, "e+", UString::from(e)));
+ return jsNontrivialString(exec, makeString(s, m, "e-", UString::from(-e)));
}
} else {
m = charSequence('0', precision);
@@ -433,13 +441,13 @@ JSValue JSC_HOST_CALL numberProtoFuncToPrecision(ExecState* exec, JSObject*, JSV
}
if (e == precision - 1)
- return jsString(exec, s + m);
+ return jsString(exec, makeString(s, m));
if (e >= 0) {
if (e + 1 < m.size())
- return jsString(exec, s + m.substr(0, e + 1) + "." + m.substr(e + 1));
- return jsString(exec, s + m);
+ return jsString(exec, makeString(s, m.substr(0, e + 1), ".", m.substr(e + 1)));
+ return jsString(exec, makeString(s, m));
}
- return jsNontrivialString(exec, s + "0." + charSequence('0', -(e + 1)) + m);
+ return jsNontrivialString(exec, makeString(s, "0.", charSequence('0', -(e + 1)), m));
}
} // namespace JSC
diff --git a/JavaScriptCore/runtime/ObjectConstructor.cpp b/JavaScriptCore/runtime/ObjectConstructor.cpp
index 693efc3..0838eb4 100644
--- a/JavaScriptCore/runtime/ObjectConstructor.cpp
+++ b/JavaScriptCore/runtime/ObjectConstructor.cpp
@@ -36,6 +36,7 @@ ASSERT_CLASS_FITS_IN_CELL(ObjectConstructor);
static JSValue JSC_HOST_CALL objectConstructorGetPrototypeOf(ExecState*, JSObject*, JSValue, const ArgList&);
static JSValue JSC_HOST_CALL objectConstructorGetOwnPropertyDescriptor(ExecState*, JSObject*, JSValue, const ArgList&);
+static JSValue JSC_HOST_CALL objectConstructorGetOwnPropertyNames(ExecState*, JSObject*, JSValue, const ArgList&);
static JSValue JSC_HOST_CALL objectConstructorKeys(ExecState*, JSObject*, JSValue, const ArgList&);
static JSValue JSC_HOST_CALL objectConstructorDefineProperty(ExecState*, JSObject*, JSValue, const ArgList&);
static JSValue JSC_HOST_CALL objectConstructorDefineProperties(ExecState*, JSObject*, JSValue, const ArgList&);
@@ -52,6 +53,7 @@ ObjectConstructor::ObjectConstructor(ExecState* exec, NonNullPassRefPtr<Structur
putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, prototypeFunctionStructure, 1, exec->propertyNames().getPrototypeOf, objectConstructorGetPrototypeOf), DontEnum);
putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, prototypeFunctionStructure, 2, exec->propertyNames().getOwnPropertyDescriptor, objectConstructorGetOwnPropertyDescriptor), DontEnum);
+ putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, prototypeFunctionStructure, 1, exec->propertyNames().getOwnPropertyNames, objectConstructorGetOwnPropertyNames), DontEnum);
putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, prototypeFunctionStructure, 1, exec->propertyNames().keys, objectConstructorKeys), DontEnum);
putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, prototypeFunctionStructure, 3, exec->propertyNames().defineProperty, objectConstructorDefineProperty), DontEnum);
putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, prototypeFunctionStructure, 2, exec->propertyNames().defineProperties, objectConstructorDefineProperties), DontEnum);
@@ -126,6 +128,20 @@ JSValue JSC_HOST_CALL objectConstructorGetOwnPropertyDescriptor(ExecState* exec,
}
// FIXME: Use the enumeration cache.
+JSValue JSC_HOST_CALL objectConstructorGetOwnPropertyNames(ExecState* exec, JSObject*, JSValue, const ArgList& args)
+{
+ if (!args.at(0).isObject())
+ return throwError(exec, TypeError, "Requested property names of a value that is not an object.");
+ PropertyNameArray properties(exec);
+ asObject(args.at(0))->getOwnPropertyNames(exec, properties, IncludeDontEnumProperties);
+ JSArray* names = constructEmptyArray(exec);
+ size_t numProperties = properties.size();
+ for (size_t i = 0; i < numProperties; i++)
+ names->push(exec, jsOwnedString(exec, properties[i].ustring()));
+ return names;
+}
+
+// FIXME: Use the enumeration cache.
JSValue JSC_HOST_CALL objectConstructorKeys(ExecState* exec, JSObject*, JSValue, const ArgList& args)
{
if (!args.at(0).isObject())
diff --git a/JavaScriptCore/runtime/ObjectPrototype.cpp b/JavaScriptCore/runtime/ObjectPrototype.cpp
index 0970b7c..3065c6d 100644
--- a/JavaScriptCore/runtime/ObjectPrototype.cpp
+++ b/JavaScriptCore/runtime/ObjectPrototype.cpp
@@ -148,7 +148,7 @@ JSValue JSC_HOST_CALL objectProtoFuncToLocaleString(ExecState* exec, JSObject*,
JSValue JSC_HOST_CALL objectProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
{
- return jsNontrivialString(exec, "[object " + thisValue.toThisObject(exec)->className() + "]");
+ return jsNontrivialString(exec, makeString("[object ", thisValue.toThisObject(exec)->className(), "]"));
}
} // namespace JSC
diff --git a/JavaScriptCore/runtime/Operations.h b/JavaScriptCore/runtime/Operations.h
index 1cab06d..5a905e3 100644
--- a/JavaScriptCore/runtime/Operations.h
+++ b/JavaScriptCore/runtime/Operations.h
@@ -87,6 +87,43 @@ namespace JSC {
return new (globalData) JSString(globalData, rope.release());
}
+ ALWAYS_INLINE JSValue jsString(ExecState* exec, JSValue thisValue, const ArgList& args)
+ {
+ unsigned ropeLength = 0;
+ if (LIKELY(thisValue.isString()))
+ ropeLength += asString(thisValue)->ropeLength();
+ else
+ ++ropeLength;
+ for (unsigned i = 0; i < args.size(); ++i) {
+ JSValue v = args.at(i);
+ if (LIKELY(v.isString()))
+ ropeLength += asString(v)->ropeLength();
+ else
+ ++ropeLength;
+ }
+
+ RefPtr<JSString::Rope> rope = JSString::Rope::createOrNull(ropeLength);
+ if (UNLIKELY(!rope))
+ return throwOutOfMemoryError(exec);
+
+ unsigned index = 0;
+ if (LIKELY(thisValue.isString()))
+ rope->append(index, asString(thisValue));
+ else
+ rope->append(index, thisValue.toString(exec));
+ for (unsigned i = 0; i < args.size(); ++i) {
+ JSValue v = args.at(i);
+ if (LIKELY(v.isString()))
+ rope->append(index, asString(v));
+ else
+ rope->append(index, v.toString(exec));
+ }
+ ASSERT(index == ropeLength);
+
+ JSGlobalData* globalData = &exec->globalData();
+ return new (globalData) JSString(globalData, rope.release());
+ }
+
// ECMA 11.9.3
inline bool JSValue::equal(ExecState* exec, JSValue v1, JSValue v2)
{
@@ -186,7 +223,7 @@ namespace JSC {
return strictEqualSlowCaseInline(exec, v1, v2);
}
- inline bool jsLess(CallFrame* callFrame, JSValue v1, JSValue v2)
+ ALWAYS_INLINE bool jsLess(CallFrame* callFrame, JSValue v1, JSValue v2)
{
if (v1.isInt32() && v2.isInt32())
return v1.asInt32() < v2.asInt32();
@@ -247,6 +284,7 @@ namespace JSC {
ALWAYS_INLINE JSValue jsAdd(CallFrame* callFrame, JSValue v1, JSValue v2)
{
+<<<<<<< HEAD
double left;
double right = 0.0;
@@ -271,13 +309,23 @@ namespace JSC {
if (!value)
return throwOutOfMemoryError(callFrame);
return jsString(callFrame, value.release());
+=======
+ double left = 0.0, right;
+ if (v1.getNumber(left) && v2.getNumber(right))
+ return jsNumber(callFrame, left + right);
+
+ if (v1.isString()) {
+ return v2.isString()
+ ? jsString(callFrame, asString(v1), asString(v2))
+ : jsString(callFrame, asString(v1), v2.toPrimitiveString(callFrame));
+>>>>>>> webkit.org at r54127
}
// All other cases are pretty uncommon
return jsAddSlowCase(callFrame, v1, v2);
}
- inline size_t normalizePrototypeChain(CallFrame* callFrame, JSValue base, JSValue slotBase)
+ inline size_t normalizePrototypeChain(CallFrame* callFrame, JSValue base, JSValue slotBase, const Identifier& propertyName, size_t& slotOffset)
{
JSCell* cell = asCell(base);
size_t count = 0;
@@ -295,8 +343,11 @@ namespace JSC {
// Since we're accessing a prototype in a loop, it's a good bet that it
// should not be treated as a dictionary.
- if (cell->structure()->isDictionary())
+ if (cell->structure()->isDictionary()) {
asObject(cell)->flattenDictionaryObject();
+ if (slotBase == cell)
+ slotOffset = cell->structure()->get(propertyName);
+ }
++count;
}
diff --git a/JavaScriptCore/runtime/PropertyNameArray.cpp b/JavaScriptCore/runtime/PropertyNameArray.cpp
index c28b6a4..5108272 100644
--- a/JavaScriptCore/runtime/PropertyNameArray.cpp
+++ b/JavaScriptCore/runtime/PropertyNameArray.cpp
@@ -30,7 +30,7 @@ static const size_t setThreshold = 20;
void PropertyNameArray::add(UString::Rep* identifier)
{
- ASSERT(identifier == &UString::Rep::null() || identifier == &UString::Rep::empty() || identifier->identifierTable());
+ ASSERT(identifier == &UString::Rep::null() || identifier == &UString::Rep::empty() || identifier->isIdentifier());
size_t size = m_data->propertyNameVector().size();
if (size < setThreshold) {
diff --git a/JavaScriptCore/runtime/RegExp.cpp b/JavaScriptCore/runtime/RegExp.cpp
index 7dd4a8f..4e958f4 100644
--- a/JavaScriptCore/runtime/RegExp.cpp
+++ b/JavaScriptCore/runtime/RegExp.cpp
@@ -65,7 +65,6 @@ inline RegExp::RegExp(JSGlobalData* globalData, const UString& pattern)
inline RegExp::RegExp(JSGlobalData* globalData, const UString& pattern, const UString& flags)
: m_pattern(pattern)
- , m_flags(flags)
, m_flagBits(0)
, m_constructionError(0)
, m_numSubpatterns(0)
diff --git a/JavaScriptCore/runtime/RegExp.h b/JavaScriptCore/runtime/RegExp.h
index 24d4199..61ab0bc 100644
--- a/JavaScriptCore/runtime/RegExp.h
+++ b/JavaScriptCore/runtime/RegExp.h
@@ -49,7 +49,6 @@ namespace JSC {
bool multiline() const { return m_flagBits & Multiline; }
const UString& pattern() const { return m_pattern; }
- const UString& flags() const { return m_flags; }
bool isValid() const { return !m_constructionError; }
const char* errorMessage() const { return m_constructionError; }
@@ -66,7 +65,6 @@ namespace JSC {
enum FlagBits { Global = 1, IgnoreCase = 2, Multiline = 4 };
UString m_pattern; // FIXME: Just decompile m_regExp instead of storing this.
- UString m_flags; // FIXME: Just decompile m_regExp instead of storing this.
int m_flagBits;
const char* m_constructionError;
unsigned m_numSubpatterns;
diff --git a/JavaScriptCore/runtime/RegExpConstructor.cpp b/JavaScriptCore/runtime/RegExpConstructor.cpp
index e5c6909..6f00142 100644
--- a/JavaScriptCore/runtime/RegExpConstructor.cpp
+++ b/JavaScriptCore/runtime/RegExpConstructor.cpp
@@ -302,7 +302,7 @@ JSObject* constructRegExp(ExecState* exec, const ArgList& args)
RefPtr<RegExp> regExp = RegExp::create(&exec->globalData(), pattern, flags);
if (!regExp->isValid())
- return throwError(exec, SyntaxError, UString("Invalid regular expression: ").append(regExp->errorMessage()));
+ return throwError(exec, SyntaxError, makeString("Invalid regular expression: ", regExp->errorMessage()));
return new (exec) RegExpObject(exec->lexicalGlobalObject()->regExpStructure(), regExp.release());
}
diff --git a/JavaScriptCore/runtime/RegExpConstructor.h b/JavaScriptCore/runtime/RegExpConstructor.h
index f9ca9cf..8f4be71 100644
--- a/JavaScriptCore/runtime/RegExpConstructor.h
+++ b/JavaScriptCore/runtime/RegExpConstructor.h
@@ -59,7 +59,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
diff --git a/JavaScriptCore/runtime/RegExpMatchesArray.h b/JavaScriptCore/runtime/RegExpMatchesArray.h
index 829f7cf..38d3cb4 100644
--- a/JavaScriptCore/runtime/RegExpMatchesArray.h
+++ b/JavaScriptCore/runtime/RegExpMatchesArray.h
@@ -79,11 +79,11 @@ namespace JSC {
return JSArray::deleteProperty(exec, propertyName);
}
- virtual void getOwnPropertyNames(ExecState* exec, PropertyNameArray& arr)
+ virtual void getOwnPropertyNames(ExecState* exec, PropertyNameArray& arr, EnumerationMode mode = ExcludeDontEnumProperties)
{
if (lazyCreationData())
fillArrayInstance(exec);
- JSArray::getOwnPropertyNames(exec, arr);
+ JSArray::getOwnPropertyNames(exec, arr, mode);
}
void fillArrayInstance(ExecState*);
diff --git a/JavaScriptCore/runtime/RegExpObject.cpp b/JavaScriptCore/runtime/RegExpObject.cpp
index 679d072..42bfcef 100644
--- a/JavaScriptCore/runtime/RegExpObject.cpp
+++ b/JavaScriptCore/runtime/RegExpObject.cpp
@@ -142,7 +142,7 @@ bool RegExpObject::match(ExecState* exec, const ArgList& args)
UString input = args.isEmpty() ? regExpConstructor->input() : args.at(0).toString(exec);
if (input.isNull()) {
- throwError(exec, GeneralError, "No input to " + toString(exec) + ".");
+ throwError(exec, GeneralError, makeString("No input to ", toString(exec), "."));
return false;
}
diff --git a/JavaScriptCore/runtime/RegExpObject.h b/JavaScriptCore/runtime/RegExpObject.h
index 3117c86..4ad11ef 100644
--- a/JavaScriptCore/runtime/RegExpObject.h
+++ b/JavaScriptCore/runtime/RegExpObject.h
@@ -49,7 +49,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
diff --git a/JavaScriptCore/runtime/RegExpPrototype.cpp b/JavaScriptCore/runtime/RegExpPrototype.cpp
index bbc9e85..5f9d357 100644
--- a/JavaScriptCore/runtime/RegExpPrototype.cpp
+++ b/JavaScriptCore/runtime/RegExpPrototype.cpp
@@ -91,7 +91,7 @@ JSValue JSC_HOST_CALL regExpProtoFuncCompile(ExecState* exec, JSObject*, JSValue
}
if (!regExp->isValid())
- return throwError(exec, SyntaxError, UString("Invalid regular expression: ").append(regExp->errorMessage()));
+ return throwError(exec, SyntaxError, makeString("Invalid regular expression: ", regExp->errorMessage()));
asRegExpObject(thisValue)->setRegExp(regExp.release());
asRegExpObject(thisValue)->setLastIndex(0);
@@ -106,15 +106,17 @@ JSValue JSC_HOST_CALL regExpProtoFuncToString(ExecState* exec, JSObject*, JSValu
return throwError(exec, TypeError);
}
- UString result = "/" + asRegExpObject(thisValue)->get(exec, exec->propertyNames().source).toString(exec);
- result.append('/');
+ char postfix[5] = { '/', 0, 0, 0, 0 };
+ int index = 1;
if (asRegExpObject(thisValue)->get(exec, exec->propertyNames().global).toBoolean(exec))
- result.append('g');
+ postfix[index++] = 'g';
if (asRegExpObject(thisValue)->get(exec, exec->propertyNames().ignoreCase).toBoolean(exec))
- result.append('i');
+ postfix[index++] = 'i';
if (asRegExpObject(thisValue)->get(exec, exec->propertyNames().multiline).toBoolean(exec))
- result.append('m');
- return jsNontrivialString(exec, result);
+ postfix[index] = 'm';
+ UString source = asRegExpObject(thisValue)->get(exec, exec->propertyNames().source).toString(exec);
+ // If source is empty, use "/(?:)/" to avoid colliding with comment syntax
+ return jsNontrivialString(exec, makeString("/", source.size() ? source : UString("(?:)"), postfix));
}
} // namespace JSC
diff --git a/JavaScriptCore/runtime/SmallStrings.cpp b/JavaScriptCore/runtime/SmallStrings.cpp
index 04701cb..ac71735 100644
--- a/JavaScriptCore/runtime/SmallStrings.cpp
+++ b/JavaScriptCore/runtime/SmallStrings.cpp
@@ -41,30 +41,16 @@ public:
UString::Rep* rep(unsigned char character) { return &m_reps[character]; }
private:
- UChar m_characters[numCharactersToStore];
- UString::BaseString m_base;
UString::Rep m_reps[numCharactersToStore];
};
SmallStringsStorage::SmallStringsStorage()
- : m_base(m_characters, numCharactersToStore)
{
- m_base.rc = numCharactersToStore + 1;
- // make sure UString doesn't try to reuse the buffer by pretending we have one more character in it
- m_base.usedCapacity = numCharactersToStore + 1;
- m_base.capacity = numCharactersToStore + 1;
- m_base.checkConsistency();
-
- for (unsigned i = 0; i < numCharactersToStore; ++i)
- m_characters[i] = i;
-
- memset(&m_reps, 0, sizeof(m_reps));
+ UChar* characterBuffer = 0;
+ RefPtr<UStringImpl> baseString = UStringImpl::createUninitialized(numCharactersToStore, characterBuffer);
for (unsigned i = 0; i < numCharactersToStore; ++i) {
- m_reps[i].offset = i;
- m_reps[i].len = 1;
- m_reps[i].rc = 1;
- m_reps[i].setBaseString(&m_base);
- m_reps[i].checkConsistency();
+ characterBuffer[i] = i;
+ new (&m_reps[i]) UString::Rep(&characterBuffer[i], 1, PassRefPtr<UStringImpl>(baseString));
}
}
diff --git a/JavaScriptCore/runtime/StringBuilder.h b/JavaScriptCore/runtime/StringBuilder.h
new file mode 100644
index 0000000..8e18d37
--- /dev/null
+++ b/JavaScriptCore/runtime/StringBuilder.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2009 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 StringBuilder_h
+#define StringBuilder_h
+
+#include <wtf/Vector.h>
+
+namespace JSC {
+
+class StringBuilder {
+public:
+ void append(const UChar u)
+ {
+ buffer.append(u);
+ }
+
+ void append(const char* str)
+ {
+ buffer.append(str, strlen(str));
+ }
+
+ void append(const char* str, size_t len)
+ {
+ buffer.reserveCapacity(buffer.size() + len);
+ for (size_t i = 0; i < len; i++)
+ buffer.append(static_cast<unsigned char>(str[i]));
+ }
+
+ void append(const UChar* str, size_t len)
+ {
+ buffer.append(str, len);
+ }
+
+ void append(const UString& str)
+ {
+ buffer.append(str.data(), str.size());
+ }
+
+ bool isEmpty() { return buffer.isEmpty(); }
+ void reserveCapacity(size_t newCapacity) { buffer.reserveCapacity(newCapacity); }
+ void resize(size_t size) { buffer.resize(size); }
+ size_t size() const { return buffer.size(); }
+
+ UChar operator[](size_t i) const { return buffer.at(i); }
+
+ UString release()
+ {
+ buffer.shrinkToFit();
+ return UString::adopt(buffer);
+ }
+
+private:
+ Vector<UChar, 64> buffer;
+};
+
+}
+
+#endif
diff --git a/JavaScriptCore/runtime/StringConstructor.cpp b/JavaScriptCore/runtime/StringConstructor.cpp
index 2f3adbe..c7b62bf 100644
--- a/JavaScriptCore/runtime/StringConstructor.cpp
+++ b/JavaScriptCore/runtime/StringConstructor.cpp
@@ -30,12 +30,12 @@ namespace JSC {
static NEVER_INLINE JSValue stringFromCharCodeSlowCase(ExecState* exec, const ArgList& args)
{
- UChar* buf = static_cast<UChar*>(fastMalloc(args.size() * sizeof(UChar)));
- UChar* p = buf;
- ArgList::const_iterator end = args.end();
- for (ArgList::const_iterator it = args.begin(); it != end; ++it)
- *p++ = static_cast<UChar>((*it).toUInt32(exec));
- return jsString(exec, UString(buf, p - buf, false));
+ unsigned length = args.size();
+ UChar* buf;
+ PassRefPtr<UStringImpl> impl = UStringImpl::createUninitialized(length, buf);
+ for (unsigned i = 0; i < length; ++i)
+ buf[i] = static_cast<UChar>(args.at(i).toUInt32(exec));
+ return jsString(exec, impl);
}
static JSValue JSC_HOST_CALL stringFromCharCode(ExecState* exec, JSObject*, JSValue, const ArgList& args)
diff --git a/JavaScriptCore/runtime/StringObject.cpp b/JavaScriptCore/runtime/StringObject.cpp
index f23a20d..f8e0e87 100644
--- a/JavaScriptCore/runtime/StringObject.cpp
+++ b/JavaScriptCore/runtime/StringObject.cpp
@@ -86,12 +86,14 @@ bool StringObject::deleteProperty(ExecState* exec, const Identifier& propertyNam
return JSObject::deleteProperty(exec, propertyName);
}
-void StringObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void StringObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
int size = internalValue()->length();
for (int i = 0; i < size; ++i)
propertyNames.add(Identifier(exec, UString::from(i)));
- return JSObject::getOwnPropertyNames(exec, propertyNames);
+ if (mode == IncludeDontEnumProperties)
+ propertyNames.add(exec->propertyNames().length);
+ return JSObject::getOwnPropertyNames(exec, propertyNames, mode);
}
} // namespace JSC
diff --git a/JavaScriptCore/runtime/StringObject.h b/JavaScriptCore/runtime/StringObject.h
index 84e1ad2..e3add77 100644
--- a/JavaScriptCore/runtime/StringObject.h
+++ b/JavaScriptCore/runtime/StringObject.h
@@ -39,7 +39,7 @@ namespace JSC {
virtual void put(ExecState* exec, const Identifier& propertyName, JSValue, PutPropertySlot&);
virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
- virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&);
+ virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
virtual const ClassInfo* classInfo() const { return &info; }
static const JS_EXPORTDATA ClassInfo info;
@@ -48,7 +48,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
diff --git a/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h b/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h
index 69e1939..43c3e38 100644
--- a/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h
+++ b/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h
@@ -44,7 +44,7 @@ namespace JSC {
static PassRefPtr<Structure> createStructure(JSValue proto)
{
- return Structure::create(proto, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | MasqueradesAsUndefined | OverridesGetPropertyNames | StringObject::StructureFlags;
diff --git a/JavaScriptCore/runtime/StringPrototype.cpp b/JavaScriptCore/runtime/StringPrototype.cpp
index 32f9e6b..d002e07 100644
--- a/JavaScriptCore/runtime/StringPrototype.cpp
+++ b/JavaScriptCore/runtime/StringPrototype.cpp
@@ -29,6 +29,7 @@
#include "JSArray.h"
#include "JSFunction.h"
#include "ObjectPrototype.h"
+#include "Operations.h"
#include "PropertyNameArray.h"
#include "RegExpConstructor.h"
#include "RegExpObject.h"
@@ -148,12 +149,11 @@ bool StringPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier
// ------------------------------ Functions --------------------------
-static inline UString substituteBackreferences(const UString& replacement, const UString& source, const int* ovector, RegExp* reg)
+static NEVER_INLINE UString substituteBackreferencesSlow(const UString& replacement, const UString& source, const int* ovector, RegExp* reg, int i)
{
- UString substitutedReplacement;
+ Vector<UChar> substitutedReplacement;
int offset = 0;
- int i = -1;
- while ((i = replacement.find('$', i + 1)) != -1) {
+ do {
if (i + 1 == replacement.size())
break;
@@ -205,15 +205,21 @@ static inline UString substituteBackreferences(const UString& replacement, const
i += 1 + advance;
offset = i + 1;
substitutedReplacement.append(source.data() + backrefStart, backrefLength);
- }
-
- if (!offset)
- return replacement;
+ } while ((i = replacement.find('$', i + 1)) != -1);
if (replacement.size() - offset)
substitutedReplacement.append(replacement.data() + offset, replacement.size() - offset);
- return substitutedReplacement;
+ substitutedReplacement.shrinkToFit();
+ return UString::adopt(substitutedReplacement);
+}
+
+static inline UString substituteBackreferences(const UString& replacement, const UString& source, const int* ovector, RegExp* reg)
+{
+ int i = replacement.find('$', 0);
+ if (UNLIKELY(i != -1))
+ return substituteBackreferencesSlow(replacement, source, ovector, reg, i);
+ return replacement;
}
static inline int localeCompare(const UString& a, const UString& b)
@@ -423,12 +429,14 @@ JSValue JSC_HOST_CALL stringProtoFuncCharCodeAt(ExecState* exec, JSObject*, JSVa
JSValue JSC_HOST_CALL stringProtoFuncConcat(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
- UString s = thisValue.toThisString(exec);
+ if (thisValue.isString() && (args.size() == 1)) {
+ JSValue v = args.at(0);
+ return v.isString()
+ ? jsString(exec, asString(thisValue), asString(v))
+ : jsString(exec, asString(thisValue), v.toString(exec));
+ }
- ArgList::const_iterator end = args.end();
- for (ArgList::const_iterator it = args.begin(); it != end; ++it)
- s += (*it).toString(exec);
- return jsString(exec, s);
+ return jsString(exec, thisValue, args);
}
JSValue JSC_HOST_CALL stringProtoFuncIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
@@ -470,7 +478,7 @@ JSValue JSC_HOST_CALL stringProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSV
dpos = 0;
else if (!(dpos <= len)) // true for NaN
dpos = len;
-#if PLATFORM(SYMBIAN)
+#if OS(SYMBIAN)
// Work around for broken NaN compare operator
else if (isnan(dpos))
dpos = len;
@@ -713,7 +721,7 @@ JSValue JSC_HOST_CALL stringProtoFuncToLowerCase(ExecState* exec, JSObject*, JSV
buffer[i] = toASCIILower(c);
}
if (!(ored & ~0x7f))
- return jsString(exec, UString(buffer.releaseBuffer(), sSize, false));
+ return jsString(exec, UString::adopt(buffer));
bool error;
int length = Unicode::toLower(buffer.data(), sSize, sData, sSize, &error);
@@ -723,9 +731,12 @@ JSValue JSC_HOST_CALL stringProtoFuncToLowerCase(ExecState* exec, JSObject*, JSV
if (error)
return sVal;
}
- if (length == sSize && memcmp(buffer.data(), sData, length * sizeof(UChar)) == 0)
- return sVal;
- return jsString(exec, UString(buffer.releaseBuffer(), length, false));
+ if (length == sSize) {
+ if (memcmp(buffer.data(), sData, length * sizeof(UChar)) == 0)
+ return sVal;
+ } else
+ buffer.resize(length);
+ return jsString(exec, UString::adopt(buffer));
}
JSValue JSC_HOST_CALL stringProtoFuncToUpperCase(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
@@ -747,7 +758,7 @@ JSValue JSC_HOST_CALL stringProtoFuncToUpperCase(ExecState* exec, JSObject*, JSV
buffer[i] = toASCIIUpper(c);
}
if (!(ored & ~0x7f))
- return jsString(exec, UString(buffer.releaseBuffer(), sSize, false));
+ return jsString(exec, UString::adopt(buffer));
bool error;
int length = Unicode::toUpper(buffer.data(), sSize, sData, sSize, &error);
@@ -757,9 +768,12 @@ JSValue JSC_HOST_CALL stringProtoFuncToUpperCase(ExecState* exec, JSObject*, JSV
if (error)
return sVal;
}
- if (length == sSize && memcmp(buffer.data(), sData, length * sizeof(UChar)) == 0)
- return sVal;
- return jsString(exec, UString(buffer.releaseBuffer(), length, false));
+ if (length == sSize) {
+ if (memcmp(buffer.data(), sData, length * sizeof(UChar)) == 0)
+ return sVal;
+ } else
+ buffer.resize(length);
+ return jsString(exec, UString::adopt(buffer));
}
JSValue JSC_HOST_CALL stringProtoFuncLocaleCompare(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
@@ -775,62 +789,62 @@ JSValue JSC_HOST_CALL stringProtoFuncLocaleCompare(ExecState* exec, JSObject*, J
JSValue JSC_HOST_CALL stringProtoFuncBig(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
{
UString s = thisValue.toThisString(exec);
- return jsNontrivialString(exec, "<big>" + s + "</big>");
+ return jsNontrivialString(exec, makeString("<big>", s, "</big>"));
}
JSValue JSC_HOST_CALL stringProtoFuncSmall(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
{
UString s = thisValue.toThisString(exec);
- return jsNontrivialString(exec, "<small>" + s + "</small>");
+ return jsNontrivialString(exec, makeString("<small>", s, "</small>"));
}
JSValue JSC_HOST_CALL stringProtoFuncBlink(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
{
UString s = thisValue.toThisString(exec);
- return jsNontrivialString(exec, "<blink>" + s + "</blink>");
+ return jsNontrivialString(exec, makeString("<blink>", s, "</blink>"));
}
JSValue JSC_HOST_CALL stringProtoFuncBold(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
{
UString s = thisValue.toThisString(exec);
- return jsNontrivialString(exec, "<b>" + s + "</b>");
+ return jsNontrivialString(exec, makeString("<b>", s, "</b>"));
}
JSValue JSC_HOST_CALL stringProtoFuncFixed(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
{
UString s = thisValue.toThisString(exec);
- return jsString(exec, "<tt>" + s + "</tt>");
+ return jsString(exec, makeString("<tt>", s, "</tt>"));
}
JSValue JSC_HOST_CALL stringProtoFuncItalics(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
{
UString s = thisValue.toThisString(exec);
- return jsNontrivialString(exec, "<i>" + s + "</i>");
+ return jsNontrivialString(exec, makeString("<i>", s, "</i>"));
}
JSValue JSC_HOST_CALL stringProtoFuncStrike(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
{
UString s = thisValue.toThisString(exec);
- return jsNontrivialString(exec, "<strike>" + s + "</strike>");
+ return jsNontrivialString(exec, makeString("<strike>", s, "</strike>"));
}
JSValue JSC_HOST_CALL stringProtoFuncSub(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
{
UString s = thisValue.toThisString(exec);
- return jsNontrivialString(exec, "<sub>" + s + "</sub>");
+ return jsNontrivialString(exec, makeString("<sub>", s, "</sub>"));
}
JSValue JSC_HOST_CALL stringProtoFuncSup(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
{
UString s = thisValue.toThisString(exec);
- return jsNontrivialString(exec, "<sup>" + s + "</sup>");
+ return jsNontrivialString(exec, makeString("<sup>", s, "</sup>"));
}
JSValue JSC_HOST_CALL stringProtoFuncFontcolor(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UString s = thisValue.toThisString(exec);
JSValue a0 = args.at(0);
- return jsNontrivialString(exec, "<font color=\"" + a0.toString(exec) + "\">" + s + "</font>");
+ return jsNontrivialString(exec, makeString("<font color=\"", a0.toString(exec), "\">", s, "</font>"));
}
JSValue JSC_HOST_CALL stringProtoFuncFontsize(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
@@ -843,7 +857,8 @@ JSValue JSC_HOST_CALL stringProtoFuncFontsize(ExecState* exec, JSObject*, JSValu
unsigned stringSize = s.size();
unsigned bufferSize = 22 + stringSize;
UChar* buffer;
- if (!tryFastMalloc(bufferSize * sizeof(UChar)).getValue(buffer))
+ PassRefPtr<UStringImpl> impl = UStringImpl::tryCreateUninitialized(bufferSize, buffer);
+ if (!impl)
return jsUndefined();
buffer[0] = '<';
buffer[1] = 'f';
@@ -868,17 +883,17 @@ JSValue JSC_HOST_CALL stringProtoFuncFontsize(ExecState* exec, JSObject*, JSValu
buffer[19 + stringSize] = 'n';
buffer[20 + stringSize] = 't';
buffer[21 + stringSize] = '>';
- return jsNontrivialString(exec, UString(buffer, bufferSize, false));
+ return jsNontrivialString(exec, impl);
}
- return jsNontrivialString(exec, "<font size=\"" + a0.toString(exec) + "\">" + s + "</font>");
+ return jsNontrivialString(exec, makeString("<font size=\"", a0.toString(exec), "\">", s, "</font>"));
}
JSValue JSC_HOST_CALL stringProtoFuncAnchor(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UString s = thisValue.toThisString(exec);
JSValue a0 = args.at(0);
- return jsNontrivialString(exec, "<a name=\"" + a0.toString(exec) + "\">" + s + "</a>");
+ return jsNontrivialString(exec, makeString("<a name=\"", a0.toString(exec), "\">", s, "</a>"));
}
JSValue JSC_HOST_CALL stringProtoFuncLink(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
@@ -891,7 +906,8 @@ JSValue JSC_HOST_CALL stringProtoFuncLink(ExecState* exec, JSObject*, JSValue th
unsigned stringSize = s.size();
unsigned bufferSize = 15 + linkTextSize + stringSize;
UChar* buffer;
- if (!tryFastMalloc(bufferSize * sizeof(UChar)).getValue(buffer))
+ PassRefPtr<UStringImpl> impl = UStringImpl::tryCreateUninitialized(bufferSize, buffer);
+ if (!impl)
return jsUndefined();
buffer[0] = '<';
buffer[1] = 'a';
@@ -910,7 +926,7 @@ JSValue JSC_HOST_CALL stringProtoFuncLink(ExecState* exec, JSObject*, JSValue th
buffer[12 + linkTextSize + stringSize] = '/';
buffer[13 + linkTextSize + stringSize] = 'a';
buffer[14 + linkTextSize + stringSize] = '>';
- return jsNontrivialString(exec, UString(buffer, bufferSize, false));
+ return jsNontrivialString(exec, impl);
}
enum {
diff --git a/JavaScriptCore/runtime/Structure.cpp b/JavaScriptCore/runtime/Structure.cpp
index e4c9ac3..77330aa 100644
--- a/JavaScriptCore/runtime/Structure.cpp
+++ b/JavaScriptCore/runtime/Structure.cpp
@@ -134,6 +134,7 @@ Structure::Structure(JSValue prototype, const TypeInfo& typeInfo)
, m_isPinnedPropertyTable(false)
, m_hasGetterSetterProperties(false)
, m_attributesInPrevious(0)
+ , m_specificFunctionThrashCount(0)
{
ASSERT(m_prototype);
ASSERT(m_prototype.isObject() || m_prototype.isNull());
@@ -156,10 +157,8 @@ Structure::Structure(JSValue prototype, const TypeInfo& typeInfo)
Structure::~Structure()
{
if (m_previous) {
- if (m_nameInPrevious)
- m_previous->table.remove(make_pair(m_nameInPrevious.get(), m_attributesInPrevious), m_specificValueInPrevious);
- else
- m_previous->table.removeAnonymousSlotTransition(m_anonymousSlotsInPrevious);
+ ASSERT(m_nameInPrevious);
+ m_previous->table.remove(make_pair(m_nameInPrevious.get(), m_attributesInPrevious), m_specificValueInPrevious);
}
@@ -275,10 +274,6 @@ void Structure::materializePropertyMap()
for (ptrdiff_t i = structures.size() - 2; i >= 0; --i) {
structure = structures[i];
- if (!structure->m_nameInPrevious) {
- m_propertyTable->anonymousSlotCount += structure->m_anonymousSlotsInPrevious;
- continue;
- }
structure->m_nameInPrevious->ref();
PropertyMapEntry entry(structure->m_nameInPrevious.get(), structure->m_offset, structure->m_attributesInPrevious, structure->m_specificValueInPrevious, ++m_propertyTable->lastIndexUsed);
insertIntoPropertyMapHashTable(entry);
@@ -302,7 +297,7 @@ void Structure::despecifyDictionaryFunction(const Identifier& propertyName)
ASSERT(isDictionary());
ASSERT(m_propertyTable);
- unsigned i = rep->computedHash();
+ unsigned i = rep->existingHash();
#if DUMP_PROPERTYMAP_STATS
++numProbes;
@@ -320,7 +315,7 @@ void Structure::despecifyDictionaryFunction(const Identifier& propertyName)
++numCollisions;
#endif
- unsigned k = 1 | doubleHash(rep->computedHash());
+ unsigned k = 1 | doubleHash(rep->existingHash());
while (1) {
i += k;
@@ -358,6 +353,9 @@ PassRefPtr<Structure> Structure::addPropertyTransition(Structure* structure, con
ASSERT(!structure->isDictionary());
ASSERT(structure->typeInfo().type() == ObjectType);
ASSERT(!Structure::addPropertyTransitionToExistingStructure(structure, propertyName, attributes, specificValue, offset));
+
+ if (structure->m_specificFunctionThrashCount == maxSpecificFunctionThrashCount)
+ specificValue = 0;
if (structure->transitionCount() > s_maxTransitionLength) {
RefPtr<Structure> transition = toCacheableDictionaryTransition(structure);
@@ -378,6 +376,7 @@ PassRefPtr<Structure> Structure::addPropertyTransition(Structure* structure, con
transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity;
transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterProperties;
transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties;
+ transition->m_specificFunctionThrashCount = structure->m_specificFunctionThrashCount;
if (structure->m_propertyTable) {
if (structure->m_isPinnedPropertyTable)
@@ -421,6 +420,7 @@ PassRefPtr<Structure> Structure::changePrototypeTransition(Structure* structure,
transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity;
transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterProperties;
transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties;
+ transition->m_specificFunctionThrashCount = structure->m_specificFunctionThrashCount;
// Don't set m_offset, as one can not transition to this.
@@ -433,11 +433,13 @@ PassRefPtr<Structure> Structure::changePrototypeTransition(Structure* structure,
PassRefPtr<Structure> Structure::despecifyFunctionTransition(Structure* structure, const Identifier& replaceFunction)
{
+ ASSERT(structure->m_specificFunctionThrashCount < maxSpecificFunctionThrashCount);
RefPtr<Structure> transition = create(structure->storedPrototype(), structure->typeInfo());
transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity;
transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterProperties;
transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties;
+ transition->m_specificFunctionThrashCount = structure->m_specificFunctionThrashCount + 1;
// Don't set m_offset, as one can not transition to this.
@@ -445,52 +447,14 @@ PassRefPtr<Structure> Structure::despecifyFunctionTransition(Structure* structur
transition->m_propertyTable = structure->copyPropertyTable();
transition->m_isPinnedPropertyTable = true;
- bool removed = transition->despecifyFunction(replaceFunction);
- ASSERT_UNUSED(removed, removed);
-
- return transition.release();
-}
-
-PassRefPtr<Structure> Structure::addAnonymousSlotsTransition(Structure* structure, unsigned count)
-{
- if (Structure* transition = structure->table.getAnonymousSlotTransition(count)) {
- ASSERT(transition->storedPrototype() == structure->storedPrototype());
- return transition;
- }
- ASSERT(count);
- ASSERT(count < ((1<<6) - 2));
- RefPtr<Structure> transition = create(structure->m_prototype, structure->typeInfo());
-
- transition->m_cachedPrototypeChain = structure->m_cachedPrototypeChain;
- transition->m_previous = structure;
- transition->m_nameInPrevious = 0;
- transition->m_attributesInPrevious = 0;
- transition->m_anonymousSlotsInPrevious = count;
- transition->m_specificValueInPrevious = 0;
- transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity;
- transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterProperties;
- transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties;
-
- if (structure->m_propertyTable) {
- if (structure->m_isPinnedPropertyTable)
- transition->m_propertyTable = structure->copyPropertyTable();
- else {
- transition->m_propertyTable = structure->m_propertyTable;
- structure->m_propertyTable = 0;
- }
- } else {
- if (structure->m_previous)
- transition->materializePropertyMap();
- else
- transition->createPropertyMapHashTable();
+ if (transition->m_specificFunctionThrashCount == maxSpecificFunctionThrashCount)
+ transition->despecifyAllFunctions();
+ else {
+ bool removed = transition->despecifyFunction(replaceFunction);
+ ASSERT_UNUSED(removed, removed);
}
- transition->addAnonymousSlots(count);
- if (transition->propertyStorageSize() > transition->propertyStorageCapacity())
- transition->growPropertyStorageCapacity();
-
- structure->table.addAnonymousSlotTransition(count, transition.get());
- return transition.release();
+ return transition.release();
}
PassRefPtr<Structure> Structure::getterSetterTransition(Structure* structure)
@@ -499,6 +463,7 @@ PassRefPtr<Structure> Structure::getterSetterTransition(Structure* structure)
transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity;
transition->m_hasGetterSetterProperties = transition->m_hasGetterSetterProperties;
transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties;
+ transition->m_specificFunctionThrashCount = structure->m_specificFunctionThrashCount;
// Don't set m_offset, as one can not transition to this.
@@ -518,6 +483,7 @@ PassRefPtr<Structure> Structure::toDictionaryTransition(Structure* structure, Di
transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity;
transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterProperties;
transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties;
+ transition->m_specificFunctionThrashCount = structure->m_specificFunctionThrashCount;
structure->materializePropertyMapIfNecessary();
transition->m_propertyTable = structure->copyPropertyTable();
@@ -582,6 +548,10 @@ PassRefPtr<Structure> Structure::flattenDictionaryStructure(JSObject* object)
size_t Structure::addPropertyWithoutTransition(const Identifier& propertyName, unsigned attributes, JSCell* specificValue)
{
ASSERT(!m_enumerationCache);
+
+ if (m_specificFunctionThrashCount == maxSpecificFunctionThrashCount)
+ specificValue = 0;
+
materializePropertyMapIfNecessary();
m_isPinnedPropertyTable = true;
@@ -667,7 +637,7 @@ size_t Structure::get(const UString::Rep* rep, unsigned& attributes, JSCell*& sp
if (!m_propertyTable)
return notFound;
- unsigned i = rep->computedHash();
+ unsigned i = rep->existingHash();
#if DUMP_PROPERTYMAP_STATS
++numProbes;
@@ -687,7 +657,7 @@ size_t Structure::get(const UString::Rep* rep, unsigned& attributes, JSCell*& sp
++numCollisions;
#endif
- unsigned k = 1 | doubleHash(rep->computedHash());
+ unsigned k = 1 | doubleHash(rep->existingHash());
while (1) {
i += k;
@@ -718,7 +688,7 @@ bool Structure::despecifyFunction(const Identifier& propertyName)
UString::Rep* rep = propertyName._ustring.rep();
- unsigned i = rep->computedHash();
+ unsigned i = rep->existingHash();
#if DUMP_PROPERTYMAP_STATS
++numProbes;
@@ -738,7 +708,7 @@ bool Structure::despecifyFunction(const Identifier& propertyName)
++numCollisions;
#endif
- unsigned k = 1 | doubleHash(rep->computedHash());
+ unsigned k = 1 | doubleHash(rep->existingHash());
while (1) {
i += k;
@@ -759,6 +729,17 @@ bool Structure::despecifyFunction(const Identifier& propertyName)
}
}
+void Structure::despecifyAllFunctions()
+{
+ materializePropertyMapIfNecessary();
+ if (!m_propertyTable)
+ return;
+
+ unsigned entryCount = m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount;
+ for (unsigned i = 1; i <= entryCount; ++i)
+ m_propertyTable->entries()[i].specificValue = 0;
+}
+
size_t Structure::put(const Identifier& propertyName, unsigned attributes, JSCell* specificValue)
{
ASSERT(!propertyName.isNull());
@@ -776,7 +757,7 @@ size_t Structure::put(const Identifier& propertyName, unsigned attributes, JSCel
// FIXME: Consider a fast case for tables with no deleted sentinels.
- unsigned i = rep->computedHash();
+ unsigned i = rep->existingHash();
unsigned k = 0;
bool foundDeletedElement = false;
unsigned deletedElementIndex = 0; // initialize to make the compiler happy
@@ -799,7 +780,7 @@ size_t Structure::put(const Identifier& propertyName, unsigned attributes, JSCel
}
if (k == 0) {
- k = 1 | doubleHash(rep->computedHash());
+ k = 1 | doubleHash(rep->existingHash());
#if DUMP_PROPERTYMAP_STATS
++numCollisions;
#endif
@@ -852,11 +833,6 @@ size_t Structure::put(const Identifier& propertyName, unsigned attributes, JSCel
return newOffset;
}
-void Structure::addAnonymousSlots(unsigned count)
-{
- m_propertyTable->anonymousSlotCount += count;
-}
-
bool Structure::hasTransition(UString::Rep* rep, unsigned attributes)
{
return table.hasTransition(make_pair(rep, attributes));
@@ -879,7 +855,7 @@ size_t Structure::remove(const Identifier& propertyName)
#endif
// Find the thing to remove.
- unsigned i = rep->computedHash();
+ unsigned i = rep->existingHash();
unsigned k = 0;
unsigned entryIndex;
UString::Rep* key = 0;
@@ -893,7 +869,7 @@ size_t Structure::remove(const Identifier& propertyName)
break;
if (k == 0) {
- k = 1 | doubleHash(rep->computedHash());
+ k = 1 | doubleHash(rep->existingHash());
#if DUMP_PROPERTYMAP_STATS
++numCollisions;
#endif
@@ -937,7 +913,7 @@ void Structure::insertIntoPropertyMapHashTable(const PropertyMapEntry& entry)
{
ASSERT(m_propertyTable);
- unsigned i = entry.key->computedHash();
+ unsigned i = entry.key->existingHash();
unsigned k = 0;
#if DUMP_PROPERTYMAP_STATS
@@ -950,7 +926,7 @@ void Structure::insertIntoPropertyMapHashTable(const PropertyMapEntry& entry)
break;
if (k == 0) {
- k = 1 | doubleHash(entry.key->computedHash());
+ k = 1 | doubleHash(entry.key->existingHash());
#if DUMP_PROPERTYMAP_STATS
++numCollisions;
#endif
@@ -1044,7 +1020,7 @@ int comparePropertyMapEntryIndices(const void* a, const void* b)
return 0;
}
-void Structure::getEnumerablePropertyNames(PropertyNameArray& propertyNames)
+void Structure::getPropertyNames(PropertyNameArray& propertyNames, EnumerationMode mode)
{
materializePropertyMapIfNecessary();
if (!m_propertyTable)
@@ -1056,7 +1032,7 @@ void Structure::getEnumerablePropertyNames(PropertyNameArray& propertyNames)
unsigned entryCount = m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount;
for (unsigned k = 1; k <= entryCount; k++) {
ASSERT(m_hasNonEnumerableProperties || !(m_propertyTable->entries()[k].attributes & DontEnum));
- if (m_propertyTable->entries()[k].key && !(m_propertyTable->entries()[k].attributes & DontEnum)) {
+ if (m_propertyTable->entries()[k].key && (!(m_propertyTable->entries()[k].attributes & DontEnum) || (mode == IncludeDontEnumProperties))) {
PropertyMapEntry* value = &m_propertyTable->entries()[k];
int j;
for (j = i - 1; j >= 0 && a[j]->index > value->index; --j)
@@ -1083,7 +1059,7 @@ void Structure::getEnumerablePropertyNames(PropertyNameArray& propertyNames)
PropertyMapEntry** p = sortedEnumerables.data();
unsigned entryCount = m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount;
for (unsigned i = 1; i <= entryCount; i++) {
- if (m_propertyTable->entries()[i].key && !(m_propertyTable->entries()[i].attributes & DontEnum))
+ if (m_propertyTable->entries()[i].key && (!(m_propertyTable->entries()[i].attributes & DontEnum) || (mode == IncludeDontEnumProperties)))
*p++ = &m_propertyTable->entries()[i];
}
@@ -1148,7 +1124,7 @@ void Structure::checkConsistency()
if (!rep)
continue;
++nonEmptyEntryCount;
- unsigned i = rep->computedHash();
+ unsigned i = rep->existingHash();
unsigned k = 0;
unsigned entryIndex;
while (1) {
@@ -1157,7 +1133,7 @@ void Structure::checkConsistency()
if (rep == m_propertyTable->entries()[entryIndex - 1].key)
break;
if (k == 0)
- k = 1 | doubleHash(rep->computedHash());
+ k = 1 | doubleHash(rep->existingHash());
i += k;
}
ASSERT(entryIndex == c + 1);
diff --git a/JavaScriptCore/runtime/Structure.h b/JavaScriptCore/runtime/Structure.h
index c6b7d91..f73f9b8 100644
--- a/JavaScriptCore/runtime/Structure.h
+++ b/JavaScriptCore/runtime/Structure.h
@@ -51,13 +51,26 @@ namespace JSC {
class PropertyNameArray;
class PropertyNameArrayData;
+ enum EnumerationMode {
+ ExcludeDontEnumProperties,
+ IncludeDontEnumProperties
+ };
+
class Structure : public RefCounted<Structure> {
public:
friend class JIT;
friend class StructureTransitionTable;
- static PassRefPtr<Structure> create(JSValue prototype, const TypeInfo& typeInfo)
+ static PassRefPtr<Structure> create(JSValue prototype, const TypeInfo& typeInfo, unsigned anonymousSlotCount)
{
- return adoptRef(new Structure(prototype, typeInfo));
+ Structure* structure = (new Structure(prototype, typeInfo));
+ if (anonymousSlotCount) {
+ structure->materializePropertyMap();
+ structure->m_isPinnedPropertyTable = true;
+ structure->m_propertyTable->anonymousSlotCount = anonymousSlotCount;
+ // Currently we don't allow more anonymous slots than fit in the inline capacity
+ ASSERT(structure->propertyStorageSize() <= structure->propertyStorageCapacity());
+ }
+ return adoptRef(structure);
}
static void startIgnoringLeaks();
@@ -70,7 +83,6 @@ namespace JSC {
static PassRefPtr<Structure> removePropertyTransition(Structure*, const Identifier& propertyName, size_t& offset);
static PassRefPtr<Structure> changePrototypeTransition(Structure*, JSValue prototype);
static PassRefPtr<Structure> despecifyFunctionTransition(Structure*, const Identifier&);
- static PassRefPtr<Structure> addAnonymousSlotsTransition(Structure*, unsigned count);
static PassRefPtr<Structure> getterSetterTransition(Structure*);
static PassRefPtr<Structure> toCacheableDictionaryTransition(Structure*);
static PassRefPtr<Structure> toUncacheableDictionaryTransition(Structure*);
@@ -123,17 +135,23 @@ namespace JSC {
bool hasNonEnumerableProperties() const { return m_hasNonEnumerableProperties; }
bool hasAnonymousSlots() const { return m_propertyTable && m_propertyTable->anonymousSlotCount; }
+ unsigned anonymousSlotCount() const { return m_propertyTable ? m_propertyTable->anonymousSlotCount : 0; }
bool isEmpty() const { return m_propertyTable ? !m_propertyTable->keyCount : m_offset == noOffset; }
- JSCell* specificValue() { return m_specificValueInPrevious; }
void despecifyDictionaryFunction(const Identifier& propertyName);
+ void disableSpecificFunctionTracking() { m_specificFunctionThrashCount = maxSpecificFunctionThrashCount; }
void setEnumerationCache(JSPropertyNameIterator* enumerationCache); // Defined in JSPropertyNameIterator.h.
JSPropertyNameIterator* enumerationCache() { return m_enumerationCache.get(); }
- void getEnumerablePropertyNames(PropertyNameArray&);
-
+ void getPropertyNames(PropertyNameArray&, EnumerationMode mode);
+
private:
+ static PassRefPtr<Structure> create(JSValue prototype, const TypeInfo& typeInfo)
+ {
+ return adoptRef(new Structure(prototype, typeInfo));
+ }
+
Structure(JSValue prototype, const TypeInfo&);
typedef enum {
@@ -145,7 +163,6 @@ namespace JSC {
size_t put(const Identifier& propertyName, unsigned attributes, JSCell* specificValue);
size_t remove(const Identifier& propertyName);
- void addAnonymousSlots(unsigned slotCount);
void expandPropertyMapHashTable();
void rehashPropertyMapHashTable();
@@ -156,6 +173,7 @@ namespace JSC {
void checkConsistency();
bool despecifyFunction(const Identifier&);
+ void despecifyAllFunctions();
PropertyMapHashTable* copyPropertyTable();
void materializePropertyMap();
@@ -180,6 +198,8 @@ namespace JSC {
static const signed char noOffset = -1;
+ static const unsigned maxSpecificFunctionThrashCount = 3;
+
TypeInfo m_typeInfo;
JSValue m_prototype;
@@ -210,7 +230,8 @@ namespace JSC {
#else
unsigned m_attributesInPrevious : 7;
#endif
- unsigned m_anonymousSlotsInPrevious : 6;
+ unsigned m_specificFunctionThrashCount : 2;
+ // 10 free bits
};
inline size_t Structure::get(const Identifier& propertyName)
@@ -223,7 +244,7 @@ namespace JSC {
UString::Rep* rep = propertyName._ustring.rep();
- unsigned i = rep->computedHash();
+ unsigned i = rep->existingHash();
#if DUMP_PROPERTYMAP_STATS
++numProbes;
@@ -240,7 +261,7 @@ namespace JSC {
++numCollisions;
#endif
- unsigned k = 1 | WTF::doubleHash(rep->computedHash());
+ unsigned k = 1 | WTF::doubleHash(rep->existingHash());
while (1) {
i += k;
diff --git a/JavaScriptCore/runtime/StructureTransitionTable.h b/JavaScriptCore/runtime/StructureTransitionTable.h
index 0fa7b73..320dbdd 100644
--- a/JavaScriptCore/runtime/StructureTransitionTable.h
+++ b/JavaScriptCore/runtime/StructureTransitionTable.h
@@ -42,7 +42,7 @@ namespace JSC {
typedef std::pair<RefPtr<UString::Rep>, unsigned> Key;
static unsigned hash(const Key& p)
{
- return p.first->computedHash();
+ return p.first->existingHash();
}
static bool equal(const Key& a, const Key& b)
@@ -69,36 +69,7 @@ namespace JSC {
class StructureTransitionTable {
typedef std::pair<Structure*, Structure*> Transition;
- struct TransitionTable : public HashMap<StructureTransitionTableHash::Key, Transition, StructureTransitionTableHash, StructureTransitionTableHashTraits> {
- typedef HashMap<unsigned, Structure*> AnonymousSlotMap;
-
- void addSlotTransition(unsigned count, Structure* structure)
- {
- ASSERT(!getSlotTransition(count));
- if (!m_anonymousSlotTable)
- m_anonymousSlotTable.set(new AnonymousSlotMap);
- m_anonymousSlotTable->add(count, structure);
- }
-
- void removeSlotTransition(unsigned count)
- {
- ASSERT(getSlotTransition(count));
- m_anonymousSlotTable->remove(count);
- }
-
- Structure* getSlotTransition(unsigned count)
- {
- if (!m_anonymousSlotTable)
- return 0;
-
- AnonymousSlotMap::iterator find = m_anonymousSlotTable->find(count);
- if (find == m_anonymousSlotTable->end())
- return 0;
- return find->second;
- }
- private:
- OwnPtr<AnonymousSlotMap> m_anonymousSlotTable;
- };
+ typedef HashMap<StructureTransitionTableHash::Key, Transition, StructureTransitionTableHash, StructureTransitionTableHashTraits> TransitionTable;
public:
StructureTransitionTable() {
m_transitions.m_singleTransition.set(0);
@@ -154,26 +125,6 @@ namespace JSC {
}
}
- Structure* getAnonymousSlotTransition(unsigned count)
- {
- if (usingSingleTransitionSlot())
- return 0;
- return table()->getSlotTransition(count);
- }
-
- void addAnonymousSlotTransition(unsigned count, Structure* structure)
- {
- if (usingSingleTransitionSlot())
- reifySingleTransition();
- ASSERT(!table()->getSlotTransition(count));
- table()->addSlotTransition(count, structure);
- }
-
- void removeAnonymousSlotTransition(unsigned count)
- {
- ASSERT(!usingSingleTransitionSlot());
- table()->removeSlotTransition(count);
- }
private:
TransitionTable* table() const { ASSERT(!usingSingleTransitionSlot()); return m_transitions.m_table; }
Structure* singleTransition() const {
diff --git a/JavaScriptCore/runtime/TimeoutChecker.cpp b/JavaScriptCore/runtime/TimeoutChecker.cpp
index 2a056c9..250fdaf 100644
--- a/JavaScriptCore/runtime/TimeoutChecker.cpp
+++ b/JavaScriptCore/runtime/TimeoutChecker.cpp
@@ -33,14 +33,18 @@
#include "CallFrame.h"
#include "JSGlobalObject.h"
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
#include <mach/mach.h>
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
#include <windows.h>
#else
#include "CurrentTime.h"
#endif
+#if PLATFORM(BREWMP)
+#include <AEEStdLib.h>
+#endif
+
using namespace std;
namespace JSC {
@@ -54,7 +58,7 @@ static const int intervalBetweenChecks = 1000;
// Returns the time the current thread has spent executing, in milliseconds.
static inline unsigned getCPUTime()
{
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
mach_msg_type_number_t infoCount = THREAD_BASIC_INFO_COUNT;
thread_basic_info_data_t info;
@@ -67,7 +71,7 @@ static inline unsigned getCPUTime()
time += info.system_time.seconds * 1000 + info.system_time.microseconds / 1000;
return time;
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
union {
FILETIME fileTime;
unsigned long long fileTimeAsLong;
@@ -80,6 +84,11 @@ static inline unsigned getCPUTime()
GetThreadTimes(GetCurrentThread(), &creationTime, &exitTime, &kernelTime.fileTime, &userTime.fileTime);
return userTime.fileTimeAsLong / 10000 + kernelTime.fileTimeAsLong / 10000;
+#elif PLATFORM(BREWMP)
+ // This function returns a continuously and linearly increasing millisecond
+ // timer from the time the device was powered on.
+ // There is only one thread in BREW, so this is enough.
+ return GETUPTIMEMS();
#else
// FIXME: We should return the time the current thread has spent executing.
return currentTime() * 1000;
diff --git a/JavaScriptCore/runtime/Tracing.d b/JavaScriptCore/runtime/Tracing.d
index b9efaff..da854b9 100644
--- a/JavaScriptCore/runtime/Tracing.d
+++ b/JavaScriptCore/runtime/Tracing.d
@@ -27,7 +27,7 @@ provider JavaScriptCore
{
probe gc__begin();
probe gc__marked();
- probe gc__end(int, int);
+ probe gc__end();
probe profile__will_execute(int, char*, char*, int);
probe profile__did_execute(int, char*, char*, int);
diff --git a/JavaScriptCore/runtime/Tracing.h b/JavaScriptCore/runtime/Tracing.h
index e544f66..c28c85f 100644
--- a/JavaScriptCore/runtime/Tracing.h
+++ b/JavaScriptCore/runtime/Tracing.h
@@ -33,7 +33,7 @@
#define JAVASCRIPTCORE_GC_BEGIN()
#define JAVASCRIPTCORE_GC_BEGIN_ENABLED() 0
-#define JAVASCRIPTCORE_GC_END(arg0, arg1)
+#define JAVASCRIPTCORE_GC_END()
#define JAVASCRIPTCORE_GC_END_ENABLED() 0
#define JAVASCRIPTCORE_GC_MARKED()
diff --git a/JavaScriptCore/runtime/UString.cpp b/JavaScriptCore/runtime/UString.cpp
index 50d23c4..e75a05c 100644
--- a/JavaScriptCore/runtime/UString.cpp
+++ b/JavaScriptCore/runtime/UString.cpp
@@ -52,52 +52,11 @@ using namespace WTF;
using namespace WTF::Unicode;
using namespace std;
-// This can be tuned differently per platform by putting platform #ifs right here.
-// If you don't define this macro at all, then copyChars will just call directly
-// to memcpy.
-#define USTRING_COPY_CHARS_INLINE_CUTOFF 20
-
namespace JSC {
extern const double NaN;
extern const double Inf;
-// This number must be at least 2 to avoid sharing empty, null as well as 1 character strings from SmallStrings.
-static const int minLengthToShare = 10;
-
-static inline size_t overflowIndicator() { return std::numeric_limits<size_t>::max(); }
-static inline size_t maxUChars() { return std::numeric_limits<size_t>::max() / sizeof(UChar); }
-
-static inline PossiblyNull<UChar*> allocChars(size_t length)
-{
- ASSERT(length);
- if (length > maxUChars())
- return 0;
- return tryFastMalloc(sizeof(UChar) * length);
-}
-
-static inline PossiblyNull<UChar*> reallocChars(UChar* buffer, size_t length)
-{
- ASSERT(length);
- if (length > maxUChars())
- return 0;
- return tryFastRealloc(buffer, sizeof(UChar) * length);
-}
-
-static inline void copyChars(UChar* destination, const UChar* source, unsigned numCharacters)
-{
-#ifdef USTRING_COPY_CHARS_INLINE_CUTOFF
- if (numCharacters <= USTRING_COPY_CHARS_INLINE_CUTOFF) {
- for (unsigned i = 0; i < numCharacters; ++i)
- destination[i] = source[i];
- return;
- }
-#endif
- memcpy(destination, source, numCharacters * sizeof(UChar));
-}
-
-COMPILE_ASSERT(sizeof(UChar) == 2, uchar_is_2_bytes);
-
CString::CString(const char* c)
: m_length(strlen(c))
, m_data(new char[m_length + 1])
@@ -190,371 +149,17 @@ bool operator==(const CString& c1, const CString& c2)
// These static strings are immutable, except for rc, whose initial value is chosen to
// reduce the possibility of it becoming zero due to ref/deref not being thread-safe.
static UChar sharedEmptyChar;
-UString::BaseString* UString::Rep::nullBaseString;
-UString::BaseString* UString::Rep::emptyBaseString;
+UStringImpl* UStringImpl::s_null;
+UStringImpl* UStringImpl::s_empty;
UString* UString::nullUString;
-static void initializeStaticBaseString(UString::BaseString& base)
-{
- base.rc = INT_MAX / 2;
- base.m_identifierTableAndFlags.setFlag(UString::Rep::StaticFlag);
- base.checkConsistency();
-}
-
void initializeUString()
{
- UString::Rep::nullBaseString = new UString::BaseString(0, 0);
- initializeStaticBaseString(*UString::Rep::nullBaseString);
-
- UString::Rep::emptyBaseString = new UString::BaseString(&sharedEmptyChar, 0);
- initializeStaticBaseString(*UString::Rep::emptyBaseString);
-
+ UStringImpl::s_null = new UStringImpl(0, 0, UStringImpl::ConstructStaticString);
+ UStringImpl::s_empty = new UStringImpl(&sharedEmptyChar, 0, UStringImpl::ConstructStaticString);
UString::nullUString = new UString;
}
-static char* statBuffer = 0; // Only used for debugging via UString::ascii().
-
-PassRefPtr<UString::Rep> UString::Rep::createCopying(const UChar* d, int l)
-{
- UChar* copyD = static_cast<UChar*>(fastMalloc(l * sizeof(UChar)));
- copyChars(copyD, d, l);
- return create(copyD, l);
-}
-
-PassRefPtr<UString::Rep> UString::Rep::createFromUTF8(const char* string)
-{
- if (!string)
- return &UString::Rep::null();
-
- size_t length = strlen(string);
- Vector<UChar, 1024> buffer(length);
- UChar* p = buffer.data();
- if (conversionOK != convertUTF8ToUTF16(&string, string + length, &p, p + length))
- return &UString::Rep::null();
-
- return UString::Rep::createCopying(buffer.data(), p - buffer.data());
-}
-
-PassRefPtr<UString::Rep> UString::Rep::create(UChar* string, int length, PassRefPtr<UString::SharedUChar> sharedBuffer)
-{
- PassRefPtr<UString::Rep> rep = create(string, length);
- rep->baseString()->setSharedBuffer(sharedBuffer);
- rep->checkConsistency();
- return rep;
-}
-
-UString::SharedUChar* UString::Rep::sharedBuffer()
-{
- UString::BaseString* base = baseString();
- if (len < minLengthToShare)
- return 0;
-
- return base->sharedBuffer();
-}
-
-void UString::Rep::destroy()
-{
- checkConsistency();
-
- // Static null and empty strings can never be destroyed, but we cannot rely on
- // reference counting, because ref/deref are not thread-safe.
- if (!isStatic()) {
- if (identifierTable())
- Identifier::remove(this);
-
- UString::BaseString* base = baseString();
- if (base == this) {
- if (m_sharedBuffer)
- m_sharedBuffer->deref();
- else
- fastFree(base->buf);
- } else
- base->deref();
-
- delete this;
- }
-}
-
-// Golden ratio - arbitrary start value to avoid mapping all 0's to all 0's
-// or anything like that.
-const unsigned PHI = 0x9e3779b9U;
-
-// Paul Hsieh's SuperFastHash
-// http://www.azillionmonkeys.com/qed/hash.html
-unsigned UString::Rep::computeHash(const UChar* s, int len)
-{
- unsigned l = len;
- uint32_t hash = PHI;
- uint32_t tmp;
-
- int rem = l & 1;
- l >>= 1;
-
- // Main loop
- for (; l > 0; l--) {
- hash += s[0];
- tmp = (s[1] << 11) ^ hash;
- hash = (hash << 16) ^ tmp;
- s += 2;
- hash += hash >> 11;
- }
-
- // Handle end case
- if (rem) {
- hash += s[0];
- hash ^= hash << 11;
- hash += hash >> 17;
- }
-
- // Force "avalanching" of final 127 bits
- hash ^= hash << 3;
- hash += hash >> 5;
- hash ^= hash << 2;
- hash += hash >> 15;
- hash ^= hash << 10;
-
- // this avoids ever returning a hash code of 0, since that is used to
- // signal "hash not computed yet", using a value that is likely to be
- // effectively the same as 0 when the low bits are masked
- if (hash == 0)
- hash = 0x80000000;
-
- return hash;
-}
-
-// Paul Hsieh's SuperFastHash
-// http://www.azillionmonkeys.com/qed/hash.html
-unsigned UString::Rep::computeHash(const char* s, int l)
-{
- // This hash is designed to work on 16-bit chunks at a time. But since the normal case
- // (above) is to hash UTF-16 characters, we just treat the 8-bit chars as if they
- // were 16-bit chunks, which should give matching results
-
- uint32_t hash = PHI;
- uint32_t tmp;
-
- size_t rem = l & 1;
- l >>= 1;
-
- // Main loop
- for (; l > 0; l--) {
- hash += static_cast<unsigned char>(s[0]);
- tmp = (static_cast<unsigned char>(s[1]) << 11) ^ hash;
- hash = (hash << 16) ^ tmp;
- s += 2;
- hash += hash >> 11;
- }
-
- // Handle end case
- if (rem) {
- hash += static_cast<unsigned char>(s[0]);
- hash ^= hash << 11;
- hash += hash >> 17;
- }
-
- // Force "avalanching" of final 127 bits
- hash ^= hash << 3;
- hash += hash >> 5;
- hash ^= hash << 2;
- hash += hash >> 15;
- hash ^= hash << 10;
-
- // this avoids ever returning a hash code of 0, since that is used to
- // signal "hash not computed yet", using a value that is likely to be
- // effectively the same as 0 when the low bits are masked
- if (hash == 0)
- hash = 0x80000000;
-
- return hash;
-}
-
-#ifndef NDEBUG
-void UString::Rep::checkConsistency() const
-{
- const UString::BaseString* base = baseString();
-
- // There is no recursion for base strings.
- ASSERT(base == base->baseString());
-
- if (isStatic()) {
- // There are only two static strings: null and empty.
- ASSERT(!len);
-
- // Static strings cannot get in identifier tables, because they are globally shared.
- ASSERT(!identifierTable());
- }
-
- // The string fits in buffer.
- ASSERT(base->usedPreCapacity <= base->preCapacity);
- ASSERT(base->usedCapacity <= base->capacity);
- ASSERT(-offset <= base->usedPreCapacity);
- ASSERT(offset + len <= base->usedCapacity);
-}
-#endif
-
-UString::SharedUChar* UString::BaseString::sharedBuffer()
-{
- if (!m_sharedBuffer)
- setSharedBuffer(SharedUChar::create(new OwnFastMallocPtr<UChar>(buf)));
- return m_sharedBuffer;
-}
-
-void UString::BaseString::setSharedBuffer(PassRefPtr<UString::SharedUChar> sharedBuffer)
-{
- // The manual steps below are because m_sharedBuffer can't be a RefPtr. m_sharedBuffer
- // is in a union with another variable to avoid making BaseString any larger.
- if (m_sharedBuffer)
- m_sharedBuffer->deref();
- m_sharedBuffer = sharedBuffer.releaseRef();
-}
-
-bool UString::BaseString::slowIsBufferReadOnly()
-{
- // The buffer may not be modified as soon as the underlying data has been shared with another class.
- if (m_sharedBuffer->isShared())
- return true;
-
- // At this point, we know it that the underlying buffer isn't shared outside of this base class,
- // so get rid of m_sharedBuffer.
- OwnPtr<OwnFastMallocPtr<UChar> > mallocPtr(m_sharedBuffer->release());
- UChar* unsharedBuf = const_cast<UChar*>(mallocPtr->release());
- setSharedBuffer(0);
- preCapacity += (buf - unsharedBuf);
- buf = unsharedBuf;
- return false;
-}
-
-// Put these early so they can be inlined.
-static inline size_t expandedSize(size_t capacitySize, size_t precapacitySize)
-{
- // Combine capacitySize & precapacitySize to produce a single size to allocate,
- // check that doing so does not result in overflow.
- size_t size = capacitySize + precapacitySize;
- if (size < capacitySize)
- return overflowIndicator();
-
- // Small Strings (up to 4 pages):
- // Expand the allocation size to 112.5% of the amount requested. This is largely sicking
- // to our previous policy, however 112.5% is cheaper to calculate.
- if (size < 0x4000) {
- size_t expandedSize = ((size + (size >> 3)) | 15) + 1;
- // Given the limited range within which we calculate the expansion in this
- // fashion the above calculation should never overflow.
- ASSERT(expandedSize >= size);
- ASSERT(expandedSize < maxUChars());
- return expandedSize;
- }
-
- // Medium Strings (up to 128 pages):
- // For pages covering multiple pages over-allocation is less of a concern - any unused
- // space will not be paged in if it is not used, so this is purely a VM overhead. For
- // these strings allocate 2x the requested size.
- if (size < 0x80000) {
- size_t expandedSize = ((size + size) | 0xfff) + 1;
- // Given the limited range within which we calculate the expansion in this
- // fashion the above calculation should never overflow.
- ASSERT(expandedSize >= size);
- ASSERT(expandedSize < maxUChars());
- return expandedSize;
- }
-
- // Large Strings (to infinity and beyond!):
- // Revert to our 112.5% policy - probably best to limit the amount of unused VM we allow
- // any individual string be responsible for.
- size_t expandedSize = ((size + (size >> 3)) | 0xfff) + 1;
-
- // Check for overflow - any result that is at least as large as requested (but
- // still below the limit) is okay.
- if ((expandedSize >= size) && (expandedSize < maxUChars()))
- return expandedSize;
- return overflowIndicator();
-}
-
-static inline bool expandCapacity(UString::Rep* rep, int requiredLength)
-{
- rep->checkConsistency();
- ASSERT(!rep->baseString()->isBufferReadOnly());
-
- UString::BaseString* base = rep->baseString();
-
- if (requiredLength > base->capacity) {
- size_t newCapacity = expandedSize(requiredLength, base->preCapacity);
- UChar* oldBuf = base->buf;
- if (!reallocChars(base->buf, newCapacity).getValue(base->buf)) {
- base->buf = oldBuf;
- return false;
- }
- base->capacity = newCapacity - base->preCapacity;
- }
- if (requiredLength > base->usedCapacity)
- base->usedCapacity = requiredLength;
-
- rep->checkConsistency();
- return true;
-}
-
-bool UString::Rep::reserveCapacity(int capacity)
-{
- // If this is an empty string there is no point 'growing' it - just allocate a new one.
- // If the BaseString is shared with another string that is using more capacity than this
- // string is, then growing the buffer won't help.
- // If the BaseString's buffer is readonly, then it isn't allowed to grow.
- UString::BaseString* base = baseString();
- if (!base->buf || !base->capacity || (offset + len) != base->usedCapacity || base->isBufferReadOnly())
- return false;
-
- // If there is already sufficient capacity, no need to grow!
- if (capacity <= base->capacity)
- return true;
-
- checkConsistency();
-
- size_t newCapacity = expandedSize(capacity, base->preCapacity);
- UChar* oldBuf = base->buf;
- if (!reallocChars(base->buf, newCapacity).getValue(base->buf)) {
- base->buf = oldBuf;
- return false;
- }
- base->capacity = newCapacity - base->preCapacity;
-
- checkConsistency();
- return true;
-}
-
-void UString::expandCapacity(int requiredLength)
-{
- if (!JSC::expandCapacity(m_rep.get(), requiredLength))
- makeNull();
-}
-
-void UString::expandPreCapacity(int requiredPreCap)
-{
- m_rep->checkConsistency();
- ASSERT(!m_rep->baseString()->isBufferReadOnly());
-
- BaseString* base = m_rep->baseString();
-
- if (requiredPreCap > base->preCapacity) {
- size_t newCapacity = expandedSize(requiredPreCap, base->capacity);
- int delta = newCapacity - base->capacity - base->preCapacity;
-
- UChar* newBuf;
- if (!allocChars(newCapacity).getValue(newBuf)) {
- makeNull();
- return;
- }
- copyChars(newBuf + delta, base->buf, base->capacity + base->preCapacity);
- fastFree(base->buf);
- base->buf = newBuf;
-
- base->preCapacity = newCapacity - base->capacity;
- }
- if (requiredPreCap > base->usedPreCapacity)
- base->usedPreCapacity = requiredPreCap;
-
- m_rep->checkConsistency();
-}
-
static PassRefPtr<UString::Rep> createRep(const char* c)
{
if (!c)
@@ -565,14 +170,13 @@ static PassRefPtr<UString::Rep> createRep(const char* c)
size_t length = strlen(c);
UChar* d;
- if (!allocChars(length).getValue(d))
+ PassRefPtr<UStringImpl> result = UStringImpl::tryCreateUninitialized(length, d);
+ if (!result)
return &UString::Rep::null();
- else {
- for (size_t i = 0; i < length; i++)
- d[i] = static_cast<unsigned char>(c[i]); // use unsigned char to zero-extend instead of sign-extend
- return UString::Rep::create(d, static_cast<int>(length));
- }
+ for (size_t i = 0; i < length; i++)
+ d[i] = static_cast<unsigned char>(c[i]); // use unsigned char to zero-extend instead of sign-extend
+ return result;
}
static inline PassRefPtr<UString::Rep> createRep(const char* c, int length)
@@ -584,12 +188,13 @@ static inline PassRefPtr<UString::Rep> createRep(const char* c, int length)
return &UString::Rep::empty();
UChar* d;
- if (!allocChars(length).getValue(d))
+ PassRefPtr<UStringImpl> result = UStringImpl::tryCreateUninitialized(length, d);
+ if (!result)
return &UString::Rep::null();
for (int i = 0; i < length; i++)
d[i] = static_cast<unsigned char>(c[i]); // use unsigned char to zero-extend instead of sign-extend
- return UString::Rep::create(d, length);
+ return result;
}
UString::UString(const char* c)
@@ -607,330 +212,21 @@ UString::UString(const UChar* c, int length)
if (length == 0)
m_rep = &Rep::empty();
else
- m_rep = Rep::createCopying(c, length);
-}
-
-UString::UString(UChar* c, int length, bool copy)
-{
- if (length == 0)
- m_rep = &Rep::empty();
- else if (copy)
- m_rep = Rep::createCopying(c, length);
- else
m_rep = Rep::create(c, length);
}
-UString::UString(const Vector<UChar>& buffer)
+UString UString::createFromUTF8(const char* string)
{
- if (!buffer.size())
- m_rep = &Rep::empty();
- else
- m_rep = Rep::createCopying(buffer.data(), buffer.size());
-}
-
-static ALWAYS_INLINE int newCapacityWithOverflowCheck(const int currentCapacity, const int extendLength, const bool plusOne = false)
-{
- ASSERT_WITH_MESSAGE(extendLength >= 0, "extendedLength = %d", extendLength);
-
- const int plusLength = plusOne ? 1 : 0;
- if (currentCapacity > std::numeric_limits<int>::max() - extendLength - plusLength)
- CRASH();
-
- return currentCapacity + extendLength + plusLength;
-}
-
-static ALWAYS_INLINE PassRefPtr<UString::Rep> concatenate(PassRefPtr<UString::Rep> r, const UChar* tData, int tSize)
-{
- RefPtr<UString::Rep> rep = r;
-
- rep->checkConsistency();
-
- int thisSize = rep->size();
- int thisOffset = rep->offset;
- int length = thisSize + tSize;
- UString::BaseString* base = rep->baseString();
-
- // possible cases:
- if (tSize == 0) {
- // t is empty
- } else if (thisSize == 0) {
- // this is empty
- rep = UString::Rep::createCopying(tData, tSize);
- } else if (rep == base && !base->isShared()) {
- // this is direct and has refcount of 1 (so we can just alter it directly)
- if (!expandCapacity(rep.get(), newCapacityWithOverflowCheck(thisOffset, length)))
- rep = &UString::Rep::null();
- if (rep->data()) {
- copyChars(rep->data() + thisSize, tData, tSize);
- rep->len = length;
- rep->_hash = 0;
- }
- } else if (thisOffset + thisSize == base->usedCapacity && thisSize >= minShareSize && !base->isBufferReadOnly()) {
- // this reaches the end of the buffer - extend it if it's long enough to append to
- if (!expandCapacity(rep.get(), newCapacityWithOverflowCheck(thisOffset, length)))
- rep = &UString::Rep::null();
- if (rep->data()) {
- copyChars(rep->data() + thisSize, tData, tSize);
- rep = UString::Rep::create(rep, 0, length);
- }
- } else {
- // This is shared in some way that prevents us from modifying base, so we must make a whole new string.
- size_t newCapacity = expandedSize(length, 0);
- UChar* d;
- if (!allocChars(newCapacity).getValue(d))
- rep = &UString::Rep::null();
- else {
- copyChars(d, rep->data(), thisSize);
- copyChars(d + thisSize, tData, tSize);
- rep = UString::Rep::create(d, length);
- rep->baseString()->capacity = newCapacity;
- }
- }
-
- rep->checkConsistency();
-
- return rep.release();
-}
-
-static ALWAYS_INLINE PassRefPtr<UString::Rep> concatenate(PassRefPtr<UString::Rep> r, const char* t)
-{
- RefPtr<UString::Rep> rep = r;
-
- rep->checkConsistency();
-
- int thisSize = rep->size();
- int thisOffset = rep->offset;
- int tSize = static_cast<int>(strlen(t));
- int length = thisSize + tSize;
- UString::BaseString* base = rep->baseString();
-
- // possible cases:
- if (thisSize == 0) {
- // this is empty
- rep = createRep(t);
- } else if (tSize == 0) {
- // t is empty, we'll just return *this below.
- } else if (rep == base && !base->isShared()) {
- // this is direct and has refcount of 1 (so we can just alter it directly)
- expandCapacity(rep.get(), newCapacityWithOverflowCheck(thisOffset, length));
- UChar* d = rep->data();
- if (d) {
- for (int i = 0; i < tSize; ++i)
- d[thisSize + i] = static_cast<unsigned char>(t[i]); // use unsigned char to zero-extend instead of sign-extend
- rep->len = length;
- rep->_hash = 0;
- }
- } else if (thisOffset + thisSize == base->usedCapacity && thisSize >= minShareSize && !base->isBufferReadOnly()) {
- // this string reaches the end of the buffer - extend it
- expandCapacity(rep.get(), newCapacityWithOverflowCheck(thisOffset, length));
- UChar* d = rep->data();
- if (d) {
- for (int i = 0; i < tSize; ++i)
- d[thisSize + i] = static_cast<unsigned char>(t[i]); // use unsigned char to zero-extend instead of sign-extend
- rep = UString::Rep::create(rep, 0, length);
- }
- } else {
- // This is shared in some way that prevents us from modifying base, so we must make a whole new string.
- size_t newCapacity = expandedSize(length, 0);
- UChar* d;
- if (!allocChars(newCapacity).getValue(d))
- rep = &UString::Rep::null();
- else {
- copyChars(d, rep->data(), thisSize);
- for (int i = 0; i < tSize; ++i)
- d[thisSize + i] = static_cast<unsigned char>(t[i]); // use unsigned char to zero-extend instead of sign-extend
- rep = UString::Rep::create(d, length);
- rep->baseString()->capacity = newCapacity;
- }
- }
-
- rep->checkConsistency();
-
- return rep.release();
-}
-
-PassRefPtr<UString::Rep> concatenate(UString::Rep* a, UString::Rep* b)
-{
- a->checkConsistency();
- b->checkConsistency();
-
- int aSize = a->size();
- int bSize = b->size();
- int aOffset = a->offset;
-
- // possible cases:
-
- UString::BaseString* aBase = a->baseString();
- if (bSize == 1 && aOffset + aSize == aBase->usedCapacity && aOffset + aSize < aBase->capacity && !aBase->isBufferReadOnly()) {
- // b is a single character (common fast case)
- ++aBase->usedCapacity;
- a->data()[aSize] = b->data()[0];
- return UString::Rep::create(a, 0, aSize + 1);
- }
-
- // a is empty
- if (aSize == 0)
- return b;
- // b is empty
- if (bSize == 0)
- return a;
-
- int bOffset = b->offset;
- int length = aSize + bSize;
-
- UString::BaseString* bBase = b->baseString();
- if (aOffset + aSize == aBase->usedCapacity && aSize >= minShareSize && 4 * aSize >= bSize
- && (-bOffset != bBase->usedPreCapacity || aSize >= bSize) && !aBase->isBufferReadOnly()) {
- // - a reaches the end of its buffer so it qualifies for shared append
- // - also, it's at least a quarter the length of b - appending to a much shorter
- // string does more harm than good
- // - however, if b qualifies for prepend and is longer than a, we'd rather prepend
-
- UString x(a);
- x.expandCapacity(newCapacityWithOverflowCheck(aOffset, length));
- if (!a->data() || !x.data())
- return 0;
- copyChars(a->data() + aSize, b->data(), bSize);
- PassRefPtr<UString::Rep> result = UString::Rep::create(a, 0, length);
-
- a->checkConsistency();
- b->checkConsistency();
- result->checkConsistency();
-
- return result;
- }
-
- if (-bOffset == bBase->usedPreCapacity && bSize >= minShareSize && 4 * bSize >= aSize && !bBase->isBufferReadOnly()) {
- // - b reaches the beginning of its buffer so it qualifies for shared prepend
- // - also, it's at least a quarter the length of a - prepending to a much shorter
- // string does more harm than good
- UString y(b);
- y.expandPreCapacity(-bOffset + aSize);
- if (!b->data() || !y.data())
- return 0;
- copyChars(b->data() - aSize, a->data(), aSize);
- PassRefPtr<UString::Rep> result = UString::Rep::create(b, -aSize, length);
-
- a->checkConsistency();
- b->checkConsistency();
- result->checkConsistency();
-
- return result;
- }
-
- // a does not qualify for append, and b does not qualify for prepend, gotta make a whole new string
- size_t newCapacity = expandedSize(length, 0);
- UChar* d;
- if (!allocChars(newCapacity).getValue(d))
- return 0;
- copyChars(d, a->data(), aSize);
- copyChars(d + aSize, b->data(), bSize);
- PassRefPtr<UString::Rep> result = UString::Rep::create(d, length);
- result->baseString()->capacity = newCapacity;
-
- a->checkConsistency();
- b->checkConsistency();
- result->checkConsistency();
-
- return result;
-}
-
-PassRefPtr<UString::Rep> concatenate(UString::Rep* rep, int i)
-{
- UChar buf[1 + sizeof(i) * 3];
- UChar* end = buf + sizeof(buf) / sizeof(UChar);
- UChar* p = end;
-
- if (i == 0)
- *--p = '0';
- else if (i == INT_MIN) {
- char minBuf[1 + sizeof(i) * 3];
- sprintf(minBuf, "%d", INT_MIN);
- return concatenate(rep, minBuf);
- } else {
- bool negative = false;
- if (i < 0) {
- negative = true;
- i = -i;
- }
- while (i) {
- *--p = static_cast<unsigned short>((i % 10) + '0');
- i /= 10;
- }
- if (negative)
- *--p = '-';
- }
+ if (!string)
+ return null();
- return concatenate(rep, p, static_cast<int>(end - p));
+ size_t length = strlen(string);
+ Vector<UChar, 1024> buffer(length);
+ UChar* p = buffer.data();
+ if (conversionOK != convertUTF8ToUTF16(&string, string + length, &p, p + length))
+ return null();
-}
-
-PassRefPtr<UString::Rep> concatenate(UString::Rep* rep, double d)
-{
- // avoid ever printing -NaN, in JS conceptually there is only one NaN value
- if (isnan(d))
- return concatenate(rep, "NaN");
-
- if (d == 0.0) // stringify -0 as 0
- d = 0.0;
-
- char buf[80];
- int decimalPoint;
- int sign;
-
- char result[80];
- WTF::dtoa(result, d, 0, &decimalPoint, &sign, NULL);
- int length = static_cast<int>(strlen(result));
-
- int i = 0;
- if (sign)
- buf[i++] = '-';
-
- if (decimalPoint <= 0 && decimalPoint > -6) {
- buf[i++] = '0';
- buf[i++] = '.';
- for (int j = decimalPoint; j < 0; j++)
- buf[i++] = '0';
- strcpy(buf + i, result);
- } else if (decimalPoint <= 21 && decimalPoint > 0) {
- if (length <= decimalPoint) {
- strcpy(buf + i, result);
- i += length;
- for (int j = 0; j < decimalPoint - length; j++)
- buf[i++] = '0';
- buf[i] = '\0';
- } else {
- strncpy(buf + i, result, decimalPoint);
- i += decimalPoint;
- buf[i++] = '.';
- strcpy(buf + i, result + decimalPoint);
- }
- } else if (result[0] < '0' || result[0] > '9')
- strcpy(buf + i, result);
- else {
- buf[i++] = result[0];
- if (length > 1) {
- buf[i++] = '.';
- strcpy(buf + i, result + 1);
- i += length - 1;
- }
-
- buf[i++] = 'e';
- buf[i++] = (decimalPoint >= 0) ? '+' : '-';
- // decimalPoint can't be more than 3 digits decimal given the
- // nature of float representation
- int exponential = decimalPoint - 1;
- if (exponential < 0)
- exponential = -exponential;
- if (exponential >= 100)
- buf[i++] = static_cast<char>('0' + exponential / 100);
- if (exponential >= 10)
- buf[i++] = static_cast<char>('0' + (exponential % 100) / 10);
- buf[i++] = static_cast<char>('0' + exponential % 10);
- buf[i++] = '\0';
- }
-
- return concatenate(rep, buf);
+ return UString(buffer.data(), p - buffer.data());
}
UString UString::from(int i)
@@ -972,7 +268,7 @@ UString UString::from(long long i)
*--p = '0';
else if (i == std::numeric_limits<long long>::min()) {
char minBuf[1 + sizeof(i) * 3];
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
snprintf(minBuf, sizeof(minBuf) - 1, "%I64d", std::numeric_limits<long long>::min());
#else
snprintf(minBuf, sizeof(minBuf) - 1, "%lld", std::numeric_limits<long long>::min());
@@ -1073,23 +369,24 @@ UString UString::spliceSubstringsWithSeparators(const Range* substringRanges, in
return "";
UChar* buffer;
- if (!allocChars(totalLength).getValue(buffer))
+ PassRefPtr<Rep> rep = Rep::tryCreateUninitialized(totalLength, buffer);
+ if (!rep)
return null();
int maxCount = max(rangeCount, separatorCount);
int bufferPos = 0;
for (int i = 0; i < maxCount; i++) {
if (i < rangeCount) {
- copyChars(buffer + bufferPos, data() + substringRanges[i].position, substringRanges[i].length);
+ UStringImpl::copyChars(buffer + bufferPos, data() + substringRanges[i].position, substringRanges[i].length);
bufferPos += substringRanges[i].length;
}
if (i < separatorCount) {
- copyChars(buffer + bufferPos, separators[i].data(), separators[i].size());
+ UStringImpl::copyChars(buffer + bufferPos, separators[i].data(), separators[i].size());
bufferPos += separators[i].size();
}
}
- return UString::Rep::create(buffer, totalLength);
+ return rep;
}
UString UString::replaceRange(int rangeStart, int rangeLength, const UString& replacement) const
@@ -1102,136 +399,16 @@ UString UString::replaceRange(int rangeStart, int rangeLength, const UString& re
return "";
UChar* buffer;
- if (!allocChars(totalLength).getValue(buffer))
+ PassRefPtr<Rep> rep = Rep::tryCreateUninitialized(totalLength, buffer);
+ if (!rep)
return null();
- copyChars(buffer, data(), rangeStart);
- copyChars(buffer + rangeStart, replacement.data(), replacementLength);
+ UStringImpl::copyChars(buffer, data(), rangeStart);
+ UStringImpl::copyChars(buffer + rangeStart, replacement.data(), replacementLength);
int rangeEnd = rangeStart + rangeLength;
- copyChars(buffer + rangeStart + replacementLength, data() + rangeEnd, size() - rangeEnd);
-
- return UString::Rep::create(buffer, totalLength);
-}
-
-
-UString& UString::append(const UString &t)
-{
- m_rep->checkConsistency();
- t.rep()->checkConsistency();
-
- int thisSize = size();
- int thisOffset = m_rep->offset;
- int tSize = t.size();
- int length = thisSize + tSize;
- BaseString* base = m_rep->baseString();
-
- // possible cases:
- if (thisSize == 0) {
- // this is empty
- *this = t;
- } else if (tSize == 0) {
- // t is empty
- } else if (m_rep == base && !base->isShared()) {
- // this is direct and has refcount of 1 (so we can just alter it directly)
- expandCapacity(newCapacityWithOverflowCheck(thisOffset, length));
- if (data()) {
- copyChars(m_rep->data() + thisSize, t.data(), tSize);
- m_rep->len = length;
- m_rep->_hash = 0;
- }
- } else if (thisOffset + thisSize == base->usedCapacity && thisSize >= minShareSize && !base->isBufferReadOnly()) {
- // this reaches the end of the buffer - extend it if it's long enough to append to
- expandCapacity(newCapacityWithOverflowCheck(thisOffset, length));
- if (data()) {
- copyChars(m_rep->data() + thisSize, t.data(), tSize);
- m_rep = Rep::create(m_rep, 0, length);
- }
- } else {
- // This is shared in some way that prevents us from modifying base, so we must make a whole new string.
- size_t newCapacity = expandedSize(length, 0);
- UChar* d;
- if (!allocChars(newCapacity).getValue(d))
- makeNull();
- else {
- copyChars(d, data(), thisSize);
- copyChars(d + thisSize, t.data(), tSize);
- m_rep = Rep::create(d, length);
- m_rep->baseString()->capacity = newCapacity;
- }
- }
-
- m_rep->checkConsistency();
- t.rep()->checkConsistency();
+ UStringImpl::copyChars(buffer + rangeStart + replacementLength, data() + rangeEnd, size() - rangeEnd);
- return *this;
-}
-
-UString& UString::append(const UChar* tData, int tSize)
-{
- m_rep = concatenate(m_rep.release(), tData, tSize);
- return *this;
-}
-
-UString& UString::append(const char* t)
-{
- m_rep = concatenate(m_rep.release(), t);
- return *this;
-}
-
-UString& UString::append(UChar c)
-{
- m_rep->checkConsistency();
-
- int thisOffset = m_rep->offset;
- int length = size();
- BaseString* base = m_rep->baseString();
-
- // possible cases:
- if (length == 0) {
- // this is empty - must make a new m_rep because we don't want to pollute the shared empty one
- size_t newCapacity = expandedSize(1, 0);
- UChar* d;
- if (!allocChars(newCapacity).getValue(d))
- makeNull();
- else {
- d[0] = c;
- m_rep = Rep::create(d, 1);
- m_rep->baseString()->capacity = newCapacity;
- }
- } else if (m_rep == base && !base->isShared()) {
- // this is direct and has refcount of 1 (so we can just alter it directly)
- expandCapacity(newCapacityWithOverflowCheck(thisOffset, length, true));
- UChar* d = m_rep->data();
- if (d) {
- d[length] = c;
- m_rep->len = length + 1;
- m_rep->_hash = 0;
- }
- } else if (thisOffset + length == base->usedCapacity && length >= minShareSize && !base->isBufferReadOnly()) {
- // this reaches the end of the string - extend it and share
- expandCapacity(newCapacityWithOverflowCheck(thisOffset, length, true));
- UChar* d = m_rep->data();
- if (d) {
- d[length] = c;
- m_rep = Rep::create(m_rep, 0, length + 1);
- }
- } else {
- // This is shared in some way that prevents us from modifying base, so we must make a whole new string.
- size_t newCapacity = expandedSize(length + 1, 0);
- UChar* d;
- if (!allocChars(newCapacity).getValue(d))
- makeNull();
- else {
- copyChars(d, data(), length);
- d[length] = c;
- m_rep = Rep::create(d, length + 1);
- m_rep->baseString()->capacity = newCapacity;
- }
- }
-
- m_rep->checkConsistency();
-
- return *this;
+ return rep;
}
bool UString::getCString(CStringBuffer& buffer) const
@@ -1259,13 +436,15 @@ bool UString::getCString(CStringBuffer& buffer) const
char* UString::ascii() const
{
+ static char* asciiBuffer = 0;
+
int length = size();
int neededSize = length + 1;
- delete[] statBuffer;
- statBuffer = new char[neededSize];
+ delete[] asciiBuffer;
+ asciiBuffer = new char[neededSize];
const UChar* p = data();
- char* q = statBuffer;
+ char* q = asciiBuffer;
const UChar* limit = p + length;
while (p != limit) {
*q = static_cast<char>(p[0]);
@@ -1274,7 +453,7 @@ char* UString::ascii() const
}
*q = '\0';
- return statBuffer;
+ return asciiBuffer;
}
UString& UString::operator=(const char* c)
@@ -1290,21 +469,13 @@ UString& UString::operator=(const char* c)
}
int l = static_cast<int>(strlen(c));
- UChar* d;
- BaseString* base = m_rep->baseString();
- if (!base->isShared() && l <= base->capacity && m_rep == base && m_rep->offset == 0 && base->preCapacity == 0) {
- d = base->buf;
- m_rep->_hash = 0;
- m_rep->len = l;
- } else {
- if (!allocChars(l).getValue(d)) {
- makeNull();
- return *this;
- }
- m_rep = Rep::create(d, l);
- }
- for (int i = 0; i < l; i++)
- d[i] = static_cast<unsigned char>(c[i]); // use unsigned char to zero-extend instead of sign-extend
+ UChar* d = 0;
+ m_rep = Rep::tryCreateUninitialized(l, d);
+ if (m_rep) {
+ for (int i = 0; i < l; i++)
+ d[i] = static_cast<unsigned char>(c[i]); // use unsigned char to zero-extend instead of sign-extend
+ } else
+ makeNull();
return *this;
}
@@ -1462,7 +633,7 @@ uint32_t UString::toStrictUInt32(bool* ok) const
*ok = false;
// Empty string is not OK.
- int len = m_rep->len;
+ int len = m_rep->size();
if (len == 0)
return 0;
const UChar* p = m_rep->data();
@@ -1689,8 +860,8 @@ int compare(const UString& s1, const UString& s2)
bool equal(const UString::Rep* r, const UString::Rep* b)
{
- int length = r->len;
- if (length != b->len)
+ int length = r->size();
+ if (length != b->size())
return false;
const UChar* d = r->data();
const UChar* s = b->data();
diff --git a/JavaScriptCore/runtime/UString.h b/JavaScriptCore/runtime/UString.h
index 9b046f2..0c13689 100644
--- a/JavaScriptCore/runtime/UString.h
+++ b/JavaScriptCore/runtime/UString.h
@@ -24,6 +24,7 @@
#define UString_h
#include "Collector.h"
+#include "UStringImpl.h"
#include <stdint.h>
#include <string.h>
#include <wtf/Assertions.h>
@@ -40,8 +41,6 @@ namespace JSC {
using WTF::PlacementNewAdoptType;
using WTF::PlacementNewAdopt;
- class IdentifierTable;
-
class CString {
public:
CString()
@@ -71,194 +70,47 @@ namespace JSC {
char* m_data;
};
+ bool operator==(const CString&, const CString&);
+
typedef Vector<char, 32> CStringBuffer;
class UString {
friend class JIT;
public:
- typedef CrossThreadRefCounted<OwnFastMallocPtr<UChar> > SharedUChar;
- struct BaseString;
- struct Rep : Noncopyable {
- friend class JIT;
-
- static PassRefPtr<Rep> create(UChar* buffer, int length)
- {
- return adoptRef(new BaseString(buffer, length));
- }
-
- static PassRefPtr<Rep> createEmptyBuffer(size_t size)
- {
- // Guard against integer overflow
- if (size < (std::numeric_limits<size_t>::max() / sizeof(UChar))) {
- void* buf = 0;
- if (tryFastMalloc(size * sizeof(UChar)).getValue(buf))
- return adoptRef(new BaseString(static_cast<UChar*>(buf), 0, size));
- }
- return adoptRef(new BaseString(0, 0, 0));
- }
-
- static PassRefPtr<Rep> createCopying(const UChar*, int);
- static PassRefPtr<Rep> create(PassRefPtr<Rep> base, int offset, int length);
-
- // Constructs a string from a UTF-8 string, using strict conversion (see comments in UTF8.h).
- // Returns UString::Rep::null for null input or conversion failure.
- static PassRefPtr<Rep> createFromUTF8(const char*);
-
- // Uses SharedUChar to have joint ownership over the UChar*.
- static PassRefPtr<Rep> create(UChar*, int, PassRefPtr<SharedUChar>);
-
- SharedUChar* sharedBuffer();
- void destroy();
-
- bool baseIsSelf() const { return m_identifierTableAndFlags.isFlagSet(BaseStringFlag); }
- UChar* data() const;
- int size() const { return len; }
-
- unsigned hash() const { if (_hash == 0) _hash = computeHash(data(), len); return _hash; }
- unsigned computedHash() const { ASSERT(_hash); return _hash; } // fast path for Identifiers
-
- static unsigned computeHash(const UChar*, int length);
- static unsigned computeHash(const char*, int length);
- static unsigned computeHash(const char* s) { return computeHash(s, strlen(s)); }
-
- IdentifierTable* identifierTable() const { return m_identifierTableAndFlags.get(); }
- void setIdentifierTable(IdentifierTable* table) { ASSERT(!isStatic()); m_identifierTableAndFlags.set(table); }
-
- bool isStatic() const { return m_identifierTableAndFlags.isFlagSet(StaticFlag); }
- void setStatic(bool);
- void setBaseString(PassRefPtr<BaseString>);
- BaseString* baseString();
- const BaseString* baseString() const;
-
- Rep* ref() { ++rc; return this; }
- ALWAYS_INLINE void deref() { if (--rc == 0) destroy(); }
-
- void checkConsistency() const;
- enum UStringFlags {
- StaticFlag,
- BaseStringFlag
- };
-
- // unshared data
- int offset;
- int len;
- int rc; // For null and empty static strings, this field does not reflect a correct count, because ref/deref are not thread-safe. A special case in destroy() guarantees that these do not get deleted.
- mutable unsigned _hash;
- PtrAndFlags<IdentifierTable, UStringFlags> m_identifierTableAndFlags;
-
- static BaseString& null() { return *nullBaseString; }
- static BaseString& empty() { return *emptyBaseString; }
-
- bool reserveCapacity(int capacity);
-
- protected:
- // Constructor for use by BaseString subclass; they use the union with m_baseString for another purpose.
- Rep(int length)
- : offset(0)
- , len(length)
- , rc(1)
- , _hash(0)
- , m_baseString(0)
- {
- }
-
- Rep(PassRefPtr<BaseString> base, int offsetInBase, int length)
- : offset(offsetInBase)
- , len(length)
- , rc(1)
- , _hash(0)
- , m_baseString(base.releaseRef())
- {
- checkConsistency();
- }
-
- union {
- // If !baseIsSelf()
- BaseString* m_baseString;
- // If baseIsSelf()
- SharedUChar* m_sharedBuffer;
- };
-
- private:
- // For SmallStringStorage which allocates an array and does initialization manually.
- Rep() { }
-
- friend class SmallStringsStorage;
- friend void initializeUString();
- JS_EXPORTDATA static BaseString* nullBaseString;
- JS_EXPORTDATA static BaseString* emptyBaseString;
- };
-
-
- struct BaseString : public Rep {
- bool isShared() { return rc != 1 || isBufferReadOnly(); }
- void setSharedBuffer(PassRefPtr<SharedUChar>);
-
- bool isBufferReadOnly()
- {
- if (!m_sharedBuffer)
- return false;
- return slowIsBufferReadOnly();
- }
-
- // potentially shared data.
- UChar* buf;
- int preCapacity;
- int usedPreCapacity;
- int capacity;
- int usedCapacity;
-
- size_t reportedCost;
-
- private:
- BaseString(UChar* buffer, int length, int additionalCapacity = 0)
- : Rep(length)
- , buf(buffer)
- , preCapacity(0)
- , usedPreCapacity(0)
- , capacity(length + additionalCapacity)
- , usedCapacity(length)
- , reportedCost(0)
- {
- m_identifierTableAndFlags.setFlag(BaseStringFlag);
- checkConsistency();
- }
-
- SharedUChar* sharedBuffer();
- bool slowIsBufferReadOnly();
-
- friend struct Rep;
- friend class SmallStringsStorage;
- friend void initializeUString();
- };
-
+ typedef UStringImpl Rep;
+
public:
+ // UString constructors passed char*s assume ISO Latin-1 encoding; for UTF8 use 'createFromUTF8', below.
UString();
- // Constructor for null-terminated ASCII string.
- UString(const char*);
- // Constructor for non-null-terminated ASCII string.
+ UString(const char*); // Constructor for null-terminated string.
UString(const char*, int length);
UString(const UChar*, int length);
- UString(UChar*, int length, bool copy);
+ UString(const Vector<UChar>& buffer);
UString(const UString& s)
: m_rep(s.m_rep)
{
}
- UString(const Vector<UChar>& buffer);
+ // Special constructor for cases where we overwrite an object in place.
+ UString(PlacementNewAdoptType)
+ : m_rep(PlacementNewAdopt)
+ {
+ }
~UString()
{
}
- // Special constructor for cases where we overwrite an object in place.
- UString(PlacementNewAdoptType)
- : m_rep(PlacementNewAdopt)
+ template<size_t inlineCapacity>
+ static PassRefPtr<UStringImpl> adopt(Vector<UChar, inlineCapacity>& vector)
{
+ return Rep::adopt(vector);
}
+ static UString createFromUTF8(const char*);
+
static UString from(int);
static UString from(long long);
static UString from(unsigned int);
@@ -285,12 +137,6 @@ namespace JSC {
UString replaceRange(int rangeStart, int RangeEnd, const UString& replacement) const;
- UString& append(const UString&);
- UString& append(const char*);
- UString& append(UChar);
- UString& append(char c) { return append(static_cast<UChar>(static_cast<unsigned char>(c))); }
- UString& append(const UChar*, int size);
-
bool getCString(CStringBuffer&) const;
// NOTE: This method should only be used for *debugging* purposes as it
@@ -309,13 +155,10 @@ namespace JSC {
UString& operator=(const char*c);
- UString& operator+=(const UString& s) { return append(s); }
- UString& operator+=(const char* s) { return append(s); }
-
const UChar* data() const { return m_rep->data(); }
- bool isNull() const { return (m_rep == &Rep::null()); }
- bool isEmpty() const { return (!m_rep->len); }
+ bool isNull() const { return m_rep == &Rep::null(); }
+ bool isEmpty() const { return !m_rep->size(); }
bool is8Bit() const;
@@ -351,22 +194,9 @@ namespace JSC {
ASSERT(m_rep);
}
- size_t cost() const;
-
- // Attempt to grow this string such that it can grow to a total length of 'capacity'
- // without reallocation. This may fail a number of reasons - if the BasicString is
- // shared and another string is using part of the capacity beyond our end point, if
- // the realloc fails, or if this string is empty and has no storage.
- //
- // This method returns a boolean indicating success.
- bool reserveCapacity(int capacity)
- {
- return m_rep->reserveCapacity(capacity);
- }
+ size_t cost() const { return m_rep->cost(); }
private:
- void expandCapacity(int requiredLength);
- void expandPreCapacity(int requiredPreCap);
void makeNull();
RefPtr<Rep> m_rep;
@@ -374,13 +204,9 @@ namespace JSC {
friend void initializeUString();
friend bool operator==(const UString&, const UString&);
- friend PassRefPtr<Rep> concatenate(Rep*, Rep*); // returns 0 if out of memory
};
- PassRefPtr<UString::Rep> concatenate(UString::Rep*, UString::Rep*);
- PassRefPtr<UString::Rep> concatenate(UString::Rep*, int);
- PassRefPtr<UString::Rep> concatenate(UString::Rep*, double);
- inline bool operator==(const UString& s1, const UString& s2)
+ ALWAYS_INLINE bool operator==(const UString& s1, const UString& s2)
{
int size = s1.size();
switch (size) {
@@ -426,117 +252,310 @@ namespace JSC {
return !JSC::operator==(s1, s2);
}
- bool operator==(const CString&, const CString&);
+ int compare(const UString&, const UString&);
- inline UString operator+(const UString& s1, const UString& s2)
+ inline UString::UString()
+ : m_rep(&Rep::null())
{
- RefPtr<UString::Rep> result = concatenate(s1.rep(), s2.rep());
- return UString(result ? result.release() : UString::nullRep());
}
- int compare(const UString&, const UString&);
+ // Rule from ECMA 15.2 about what an array index is.
+ // Must exactly match string form of an unsigned integer, and be less than 2^32 - 1.
+ inline unsigned UString::toArrayIndex(bool* ok) const
+ {
+ unsigned i = toStrictUInt32(ok);
+ if (ok && i >= 0xFFFFFFFFU)
+ *ok = false;
+ return i;
+ }
- bool equal(const UString::Rep*, const UString::Rep*);
+ // We'd rather not do shared substring append for small strings, since
+ // this runs too much risk of a tiny initial string holding down a
+ // huge buffer.
+ // FIXME: this should be size_t but that would cause warnings until we
+ // fix UString sizes to be size_t instead of int
+ static const int minShareSize = Heap::minExtraCost / sizeof(UChar);
- inline PassRefPtr<UString::Rep> UString::Rep::create(PassRefPtr<UString::Rep> rep, int offset, int length)
- {
- ASSERT(rep);
- rep->checkConsistency();
+ struct IdentifierRepHash : PtrHash<RefPtr<JSC::UString::Rep> > {
+ static unsigned hash(const RefPtr<JSC::UString::Rep>& key) { return key->existingHash(); }
+ static unsigned hash(JSC::UString::Rep* key) { return key->existingHash(); }
+ };
- int repOffset = rep->offset;
+ void initializeUString();
- PassRefPtr<BaseString> base = rep->baseString();
+ template<typename StringType>
+ class StringTypeAdapter {
+ };
- ASSERT(-(offset + repOffset) <= base->usedPreCapacity);
- ASSERT(offset + repOffset + length <= base->usedCapacity);
+ template<>
+ class StringTypeAdapter<char*> {
+ public:
+ StringTypeAdapter<char*>(char* buffer)
+ : m_buffer((unsigned char*)buffer)
+ , m_length(strlen(buffer))
+ {
+ }
- // Steal the single reference this Rep was created with.
- return adoptRef(new Rep(base, repOffset + offset, length));
- }
+ unsigned length() { return m_length; }
- inline UChar* UString::Rep::data() const
- {
- const BaseString* base = baseString();
- return base->buf + base->preCapacity + offset;
- }
+ void writeTo(UChar* destination)
+ {
+ for (unsigned i = 0; i < m_length; ++i)
+ destination[i] = m_buffer[i];
+ }
- inline void UString::Rep::setStatic(bool v)
- {
- ASSERT(!identifierTable());
- if (v)
- m_identifierTableAndFlags.setFlag(StaticFlag);
- else
- m_identifierTableAndFlags.clearFlag(StaticFlag);
- }
+ private:
+ const unsigned char* m_buffer;
+ unsigned m_length;
+ };
+
+ template<>
+ class StringTypeAdapter<const char*> {
+ public:
+ StringTypeAdapter<const char*>(const char* buffer)
+ : m_buffer((unsigned char*)buffer)
+ , m_length(strlen(buffer))
+ {
+ }
+
+ unsigned length() { return m_length; }
- inline void UString::Rep::setBaseString(PassRefPtr<BaseString> base)
+ void writeTo(UChar* destination)
+ {
+ for (unsigned i = 0; i < m_length; ++i)
+ destination[i] = m_buffer[i];
+ }
+
+ private:
+ const unsigned char* m_buffer;
+ unsigned m_length;
+ };
+
+ template<>
+ class StringTypeAdapter<UString> {
+ public:
+ StringTypeAdapter<UString>(UString& string)
+ : m_data(string.data())
+ , m_length(string.size())
+ {
+ }
+
+ unsigned length() { return m_length; }
+
+ void writeTo(UChar* destination)
+ {
+ for (unsigned i = 0; i < m_length; ++i)
+ destination[i] = m_data[i];
+ }
+
+ private:
+ const UChar* m_data;
+ unsigned m_length;
+ };
+
+ template<typename StringType1, typename StringType2>
+ UString makeString(StringType1 string1, StringType2 string2)
{
- ASSERT(base != this);
- ASSERT(!baseIsSelf());
- m_baseString = base.releaseRef();
+ StringTypeAdapter<StringType1> adapter1(string1);
+ StringTypeAdapter<StringType2> adapter2(string2);
+
+ UChar* buffer;
+ unsigned length = adapter1.length() + adapter2.length();
+ PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer);
+ if (!resultImpl)
+ return UString();
+
+ UChar* result = buffer;
+ adapter1.writeTo(result);
+ result += adapter1.length();
+ adapter2.writeTo(result);
+
+ return resultImpl;
}
- inline UString::BaseString* UString::Rep::baseString()
+ template<typename StringType1, typename StringType2, typename StringType3>
+ UString makeString(StringType1 string1, StringType2 string2, StringType3 string3)
{
- return !baseIsSelf() ? m_baseString : reinterpret_cast<BaseString*>(this) ;
+ StringTypeAdapter<StringType1> adapter1(string1);
+ StringTypeAdapter<StringType2> adapter2(string2);
+ StringTypeAdapter<StringType3> adapter3(string3);
+
+ UChar* buffer;
+ unsigned length = adapter1.length() + adapter2.length() + adapter3.length();
+ PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer);
+ if (!resultImpl)
+ return UString();
+
+ UChar* result = buffer;
+ adapter1.writeTo(result);
+ result += adapter1.length();
+ adapter2.writeTo(result);
+ result += adapter2.length();
+ adapter3.writeTo(result);
+
+ return resultImpl;
}
- inline const UString::BaseString* UString::Rep::baseString() const
+ template<typename StringType1, typename StringType2, typename StringType3, typename StringType4>
+ UString makeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4)
{
- return const_cast<Rep*>(this)->baseString();
+ StringTypeAdapter<StringType1> adapter1(string1);
+ StringTypeAdapter<StringType2> adapter2(string2);
+ StringTypeAdapter<StringType3> adapter3(string3);
+ StringTypeAdapter<StringType4> adapter4(string4);
+
+ UChar* buffer;
+ unsigned length = adapter1.length() + adapter2.length() + adapter3.length() + adapter4.length();
+ PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer);
+ if (!resultImpl)
+ return UString();
+
+ UChar* result = buffer;
+ adapter1.writeTo(result);
+ result += adapter1.length();
+ adapter2.writeTo(result);
+ result += adapter2.length();
+ adapter3.writeTo(result);
+ result += adapter3.length();
+ adapter4.writeTo(result);
+
+ return resultImpl;
}
-#ifdef NDEBUG
- inline void UString::Rep::checkConsistency() const
+ template<typename StringType1, typename StringType2, typename StringType3, typename StringType4, typename StringType5>
+ UString makeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5)
{
+ StringTypeAdapter<StringType1> adapter1(string1);
+ StringTypeAdapter<StringType2> adapter2(string2);
+ StringTypeAdapter<StringType3> adapter3(string3);
+ StringTypeAdapter<StringType4> adapter4(string4);
+ StringTypeAdapter<StringType5> adapter5(string5);
+
+ UChar* buffer;
+ unsigned length = adapter1.length() + adapter2.length() + adapter3.length() + adapter4.length() + adapter5.length();
+ PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer);
+ if (!resultImpl)
+ return UString();
+
+ UChar* result = buffer;
+ adapter1.writeTo(result);
+ result += adapter1.length();
+ adapter2.writeTo(result);
+ result += adapter2.length();
+ adapter3.writeTo(result);
+ result += adapter3.length();
+ adapter4.writeTo(result);
+ result += adapter4.length();
+ adapter5.writeTo(result);
+
+ return resultImpl;
}
-#endif
- inline UString::UString()
- : m_rep(&Rep::null())
+ template<typename StringType1, typename StringType2, typename StringType3, typename StringType4, typename StringType5, typename StringType6>
+ UString makeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5, StringType6 string6)
{
+ StringTypeAdapter<StringType1> adapter1(string1);
+ StringTypeAdapter<StringType2> adapter2(string2);
+ StringTypeAdapter<StringType3> adapter3(string3);
+ StringTypeAdapter<StringType4> adapter4(string4);
+ StringTypeAdapter<StringType5> adapter5(string5);
+ StringTypeAdapter<StringType6> adapter6(string6);
+
+ UChar* buffer;
+ unsigned length = adapter1.length() + adapter2.length() + adapter3.length() + adapter4.length() + adapter5.length() + adapter6.length();
+ PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer);
+ if (!resultImpl)
+ return UString();
+
+ UChar* result = buffer;
+ adapter1.writeTo(result);
+ result += adapter1.length();
+ adapter2.writeTo(result);
+ result += adapter2.length();
+ adapter3.writeTo(result);
+ result += adapter3.length();
+ adapter4.writeTo(result);
+ result += adapter4.length();
+ adapter5.writeTo(result);
+ result += adapter5.length();
+ adapter6.writeTo(result);
+
+ return resultImpl;
}
- // Rule from ECMA 15.2 about what an array index is.
- // Must exactly match string form of an unsigned integer, and be less than 2^32 - 1.
- inline unsigned UString::toArrayIndex(bool* ok) const
+ template<typename StringType1, typename StringType2, typename StringType3, typename StringType4, typename StringType5, typename StringType6, typename StringType7>
+ UString makeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5, StringType6 string6, StringType7 string7)
{
- unsigned i = toStrictUInt32(ok);
- if (ok && i >= 0xFFFFFFFFU)
- *ok = false;
- return i;
+ StringTypeAdapter<StringType1> adapter1(string1);
+ StringTypeAdapter<StringType2> adapter2(string2);
+ StringTypeAdapter<StringType3> adapter3(string3);
+ StringTypeAdapter<StringType4> adapter4(string4);
+ StringTypeAdapter<StringType5> adapter5(string5);
+ StringTypeAdapter<StringType6> adapter6(string6);
+ StringTypeAdapter<StringType7> adapter7(string7);
+
+ UChar* buffer;
+ unsigned length = adapter1.length() + adapter2.length() + adapter3.length() + adapter4.length() + adapter5.length() + adapter6.length() + adapter7.length();
+ PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer);
+ if (!resultImpl)
+ return UString();
+
+ UChar* result = buffer;
+ adapter1.writeTo(result);
+ result += adapter1.length();
+ adapter2.writeTo(result);
+ result += adapter2.length();
+ adapter3.writeTo(result);
+ result += adapter3.length();
+ adapter4.writeTo(result);
+ result += adapter4.length();
+ adapter5.writeTo(result);
+ result += adapter5.length();
+ adapter6.writeTo(result);
+ result += adapter6.length();
+ adapter7.writeTo(result);
+
+ return resultImpl;
}
- // We'd rather not do shared substring append for small strings, since
- // this runs too much risk of a tiny initial string holding down a
- // huge buffer.
- // FIXME: this should be size_t but that would cause warnings until we
- // fix UString sizes to be size_t instead of int
- static const int minShareSize = Heap::minExtraCostSize / sizeof(UChar);
-
- inline size_t UString::cost() const
+ template<typename StringType1, typename StringType2, typename StringType3, typename StringType4, typename StringType5, typename StringType6, typename StringType7, typename StringType8>
+ UString makeString(StringType1 string1, StringType2 string2, StringType3 string3, StringType4 string4, StringType5 string5, StringType6 string6, StringType7 string7, StringType8 string8)
{
- BaseString* base = m_rep->baseString();
- size_t capacity = (base->capacity + base->preCapacity) * sizeof(UChar);
- size_t reportedCost = base->reportedCost;
- ASSERT(capacity >= reportedCost);
-
- size_t capacityDelta = capacity - reportedCost;
-
- if (capacityDelta < static_cast<size_t>(minShareSize))
- return 0;
-
- base->reportedCost = capacity;
-
- return capacityDelta;
+ StringTypeAdapter<StringType1> adapter1(string1);
+ StringTypeAdapter<StringType2> adapter2(string2);
+ StringTypeAdapter<StringType3> adapter3(string3);
+ StringTypeAdapter<StringType4> adapter4(string4);
+ StringTypeAdapter<StringType5> adapter5(string5);
+ StringTypeAdapter<StringType6> adapter6(string6);
+ StringTypeAdapter<StringType7> adapter7(string7);
+ StringTypeAdapter<StringType8> adapter8(string8);
+
+ UChar* buffer;
+ unsigned length = adapter1.length() + adapter2.length() + adapter3.length() + adapter4.length() + adapter5.length() + adapter6.length() + adapter7.length() + adapter8.length();
+ PassRefPtr<UStringImpl> resultImpl = UStringImpl::tryCreateUninitialized(length, buffer);
+ if (!resultImpl)
+ return UString();
+
+ UChar* result = buffer;
+ adapter1.writeTo(result);
+ result += adapter1.length();
+ adapter2.writeTo(result);
+ result += adapter2.length();
+ adapter3.writeTo(result);
+ result += adapter3.length();
+ adapter4.writeTo(result);
+ result += adapter4.length();
+ adapter5.writeTo(result);
+ result += adapter5.length();
+ adapter6.writeTo(result);
+ result += adapter6.length();
+ adapter7.writeTo(result);
+ result += adapter7.length();
+ adapter8.writeTo(result);
+
+ return resultImpl;
}
- struct IdentifierRepHash : PtrHash<RefPtr<JSC::UString::Rep> > {
- static unsigned hash(const RefPtr<JSC::UString::Rep>& key) { return key->computedHash(); }
- static unsigned hash(JSC::UString::Rep* key) { return key->computedHash(); }
- };
-
- void initializeUString();
} // namespace JSC
namespace WTF {
diff --git a/JavaScriptCore/runtime/UStringImpl.cpp b/JavaScriptCore/runtime/UStringImpl.cpp
new file mode 100644
index 0000000..4b0d1c9
--- /dev/null
+++ b/JavaScriptCore/runtime/UStringImpl.cpp
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2009 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 "UStringImpl.h"
+
+#include "Identifier.h"
+#include "UString.h"
+#include <wtf/unicode/UTF8.h>
+
+using namespace WTF::Unicode;
+using namespace std;
+
+namespace JSC {
+
+SharedUChar* UStringImpl::baseSharedBuffer()
+{
+ ASSERT((bufferOwnership() == BufferShared)
+ || ((bufferOwnership() == BufferOwned) && !m_dataBuffer.asPtr<void*>()));
+
+ if (bufferOwnership() != BufferShared)
+ m_dataBuffer = UntypedPtrAndBitfield(SharedUChar::create(new OwnFastMallocPtr<UChar>(m_data)).releaseRef(), BufferShared);
+
+ return m_dataBuffer.asPtr<SharedUChar*>();
+}
+
+SharedUChar* UStringImpl::sharedBuffer()
+{
+ if (m_length < s_minLengthToShare)
+ return 0;
+ ASSERT(!isStatic());
+
+ UStringImpl* owner = bufferOwnerString();
+ if (owner->bufferOwnership() == BufferInternal)
+ return 0;
+
+ return owner->baseSharedBuffer();
+}
+
+UStringImpl::~UStringImpl()
+{
+ ASSERT(!isStatic());
+ checkConsistency();
+
+ if (isIdentifier())
+ Identifier::remove(this);
+
+ if (bufferOwnership() != BufferInternal) {
+ if (bufferOwnership() == BufferOwned)
+ fastFree(m_data);
+ else if (bufferOwnership() == BufferSubstring)
+ m_dataBuffer.asPtr<UStringImpl*>()->deref();
+ else {
+ ASSERT(bufferOwnership() == BufferShared);
+ m_dataBuffer.asPtr<SharedUChar*>()->deref();
+ }
+ }
+}
+
+}
diff --git a/JavaScriptCore/runtime/UStringImpl.h b/JavaScriptCore/runtime/UStringImpl.h
new file mode 100644
index 0000000..abed637
--- /dev/null
+++ b/JavaScriptCore/runtime/UStringImpl.h
@@ -0,0 +1,303 @@
+/*
+ * Copyright (C) 2009 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 UStringImpl_h
+#define UStringImpl_h
+
+#include <limits>
+#include <wtf/CrossThreadRefCounted.h>
+#include <wtf/OwnFastMallocPtr.h>
+#include <wtf/PossiblyNull.h>
+#include <wtf/StringHashFunctions.h>
+#include <wtf/Vector.h>
+#include <wtf/unicode/Unicode.h>
+
+namespace JSC {
+
+class IdentifierTable;
+
+typedef CrossThreadRefCounted<OwnFastMallocPtr<UChar> > SharedUChar;
+
+class UntypedPtrAndBitfield {
+public:
+ UntypedPtrAndBitfield() {}
+
+ UntypedPtrAndBitfield(void* ptrValue, uintptr_t bitValue)
+ : m_value(reinterpret_cast<uintptr_t>(ptrValue) | bitValue)
+#ifndef NDEBUG
+ , m_leaksPtr(ptrValue)
+#endif
+ {
+ ASSERT(ptrValue == asPtr<void*>());
+ ASSERT((*this & ~s_alignmentMask) == bitValue);
+ }
+
+ template<typename T>
+ T asPtr() const { return reinterpret_cast<T>(m_value & s_alignmentMask); }
+
+ UntypedPtrAndBitfield& operator&=(uintptr_t bits)
+ {
+ m_value &= bits | s_alignmentMask;
+ return *this;
+ }
+
+ UntypedPtrAndBitfield& operator|=(uintptr_t bits)
+ {
+ m_value |= bits & ~s_alignmentMask;
+ return *this;
+ }
+
+ uintptr_t operator&(uintptr_t mask) const
+ {
+ return m_value & mask & ~s_alignmentMask;
+ }
+
+private:
+ static const uintptr_t s_alignmentMask = ~static_cast<uintptr_t>(0x7);
+ uintptr_t m_value;
+#ifndef NDEBUG
+ void* m_leaksPtr; // Only used to allow tools like leaks on OSX to detect that the memory is referenced.
+#endif
+};
+
+class UStringImpl : Noncopyable {
+public:
+ template<size_t inlineCapacity>
+ static PassRefPtr<UStringImpl> adopt(Vector<UChar, inlineCapacity>& vector)
+ {
+ if (unsigned length = vector.size())
+ return adoptRef(new UStringImpl(vector.releaseBuffer(), length, BufferOwned));
+ return &empty();
+ }
+
+ static PassRefPtr<UStringImpl> create(const UChar* buffer, int length)
+ {
+ UChar* newBuffer;
+ if (PassRefPtr<UStringImpl> impl = tryCreateUninitialized(length, newBuffer)) {
+ copyChars(newBuffer, buffer, length);
+ return impl;
+ }
+ return &null();
+ }
+
+ static PassRefPtr<UStringImpl> create(PassRefPtr<UStringImpl> rep, int offset, int length)
+ {
+ ASSERT(rep);
+ rep->checkConsistency();
+ return adoptRef(new UStringImpl(rep->m_data + offset, length, rep->bufferOwnerString()));
+ }
+
+ static PassRefPtr<UStringImpl> create(PassRefPtr<SharedUChar> sharedBuffer, UChar* buffer, int length)
+ {
+ return adoptRef(new UStringImpl(buffer, length, sharedBuffer));
+ }
+
+ static PassRefPtr<UStringImpl> createUninitialized(unsigned length, UChar*& output)
+ {
+ if (!length) {
+ output = 0;
+ return &empty();
+ }
+
+ if (length > ((std::numeric_limits<size_t>::max() - sizeof(UStringImpl)) / sizeof(UChar)))
+ CRASH();
+ UStringImpl* resultImpl = static_cast<UStringImpl*>(fastMalloc(sizeof(UChar) * length + sizeof(UStringImpl)));
+ output = reinterpret_cast<UChar*>(resultImpl + 1);
+ return adoptRef(new(resultImpl) UStringImpl(output, length, BufferInternal));
+ }
+
+ static PassRefPtr<UStringImpl> tryCreateUninitialized(unsigned length, UChar*& output)
+ {
+ if (!length) {
+ output = 0;
+ return &empty();
+ }
+
+ if (length > ((std::numeric_limits<size_t>::max() - sizeof(UStringImpl)) / sizeof(UChar)))
+ return 0;
+ UStringImpl* resultImpl;
+ if (!tryFastMalloc(sizeof(UChar) * length + sizeof(UStringImpl)).getValue(resultImpl))
+ return 0;
+ output = reinterpret_cast<UChar*>(resultImpl + 1);
+ return adoptRef(new(resultImpl) UStringImpl(output, length, BufferInternal));
+ }
+
+ SharedUChar* sharedBuffer();
+ UChar* data() const { return m_data; }
+ int size() const { return m_length; }
+ size_t cost()
+ {
+ // For substrings, return the cost of the base string.
+ if (bufferOwnership() == BufferSubstring)
+ return m_dataBuffer.asPtr<UStringImpl*>()->cost();
+
+ if (m_dataBuffer & s_reportedCostBit)
+ return 0;
+ m_dataBuffer |= s_reportedCostBit;
+ return m_length;
+ }
+ unsigned hash() const { if (!m_hash) m_hash = computeHash(data(), m_length); return m_hash; }
+ unsigned existingHash() const { ASSERT(m_hash); return m_hash; } // fast path for Identifiers
+ void setHash(unsigned hash) { ASSERT(hash == computeHash(data(), m_length)); m_hash = hash; } // fast path for Identifiers
+ bool isIdentifier() const { return m_isIdentifier; }
+ void setIsIdentifier(bool isIdentifier) { m_isIdentifier = isIdentifier; }
+
+ UStringImpl* ref() { m_refCount += s_refCountIncrement; return this; }
+ ALWAYS_INLINE void deref() { if (!(m_refCount -= s_refCountIncrement)) delete this; }
+
+ static void copyChars(UChar* destination, const UChar* source, unsigned numCharacters)
+ {
+ if (numCharacters <= s_copyCharsInlineCutOff) {
+ for (unsigned i = 0; i < numCharacters; ++i)
+ destination[i] = source[i];
+ } else
+ memcpy(destination, source, numCharacters * sizeof(UChar));
+ }
+
+ static unsigned computeHash(const UChar* s, int length) { ASSERT(length >= 0); return WTF::stringHash(s, length); }
+ static unsigned computeHash(const char* s, int length) { ASSERT(length >= 0); return WTF::stringHash(s, length); }
+ static unsigned computeHash(const char* s) { return WTF::stringHash(s); }
+
+ static UStringImpl& null() { return *s_null; }
+ static UStringImpl& empty() { return *s_empty; }
+
+ ALWAYS_INLINE void checkConsistency() const
+ {
+ // There is no recursion of substrings.
+ ASSERT(bufferOwnerString()->bufferOwnership() != BufferSubstring);
+ // Static strings cannot be put in identifier tables, because they are globally shared.
+ ASSERT(!isStatic() || !isIdentifier());
+ }
+
+private:
+ enum BufferOwnership {
+ BufferInternal,
+ BufferOwned,
+ BufferSubstring,
+ BufferShared,
+ };
+
+ // For SmallStringStorage, which allocates an array and uses an in-place new.
+ UStringImpl() { }
+
+ // Used to construct normal strings with an internal or external buffer.
+ UStringImpl(UChar* data, int length, BufferOwnership ownership)
+ : m_data(data)
+ , m_length(length)
+ , m_refCount(s_refCountIncrement)
+ , m_hash(0)
+ , m_isIdentifier(false)
+ , m_dataBuffer(0, ownership)
+ {
+ ASSERT((ownership == BufferInternal) || (ownership == BufferOwned));
+ checkConsistency();
+ }
+
+ // Used to construct static strings, which have an special refCount that can never hit zero.
+ // This means that the static string will never be destroyed, which is important because
+ // static strings will be shared across threads & ref-counted in a non-threadsafe manner.
+ enum StaticStringConstructType { ConstructStaticString };
+ UStringImpl(UChar* data, int length, StaticStringConstructType)
+ : m_data(data)
+ , m_length(length)
+ , m_refCount(s_staticRefCountInitialValue)
+ , m_hash(0)
+ , m_isIdentifier(false)
+ , m_dataBuffer(0, BufferOwned)
+ {
+ checkConsistency();
+ }
+
+ // Used to create new strings that are a substring of an existing string.
+ UStringImpl(UChar* data, int length, PassRefPtr<UStringImpl> base)
+ : m_data(data)
+ , m_length(length)
+ , m_refCount(s_refCountIncrement)
+ , m_hash(0)
+ , m_isIdentifier(false)
+ , m_dataBuffer(base.releaseRef(), BufferSubstring)
+ {
+ // Do use static strings as a base for substrings; UntypedPtrAndBitfield assumes
+ // that all pointers will be at least 8-byte aligned, we cannot guarantee that of
+ // UStringImpls that are not heap allocated.
+ ASSERT(m_dataBuffer.asPtr<UStringImpl*>()->size());
+ ASSERT(!m_dataBuffer.asPtr<UStringImpl*>()->isStatic());
+ checkConsistency();
+ }
+
+ // Used to construct new strings sharing an existing shared buffer.
+ UStringImpl(UChar* data, int length, PassRefPtr<SharedUChar> sharedBuffer)
+ : m_data(data)
+ , m_length(length)
+ , m_refCount(s_refCountIncrement)
+ , m_hash(0)
+ , m_isIdentifier(false)
+ , m_dataBuffer(sharedBuffer.releaseRef(), BufferShared)
+ {
+ checkConsistency();
+ }
+
+ using Noncopyable::operator new;
+ void* operator new(size_t, void* inPlace) { return inPlace; }
+
+ ~UStringImpl();
+
+ // This number must be at least 2 to avoid sharing empty, null as well as 1 character strings from SmallStrings.
+ static const int s_minLengthToShare = 10;
+ static const unsigned s_copyCharsInlineCutOff = 20;
+ static const uintptr_t s_bufferOwnershipMask = 3;
+ static const uintptr_t s_reportedCostBit = 4;
+ // We initialize and increment/decrement the refCount for all normal (non-static) strings by the value 2.
+ // We initialize static strings with an odd number (specifically, 1), such that the refCount cannot reach zero.
+ static const int s_refCountIncrement = 2;
+ static const int s_staticRefCountInitialValue = 1;
+
+ UStringImpl* bufferOwnerString() { return (bufferOwnership() == BufferSubstring) ? m_dataBuffer.asPtr<UStringImpl*>() : this; }
+ const UStringImpl* bufferOwnerString() const { return (bufferOwnership() == BufferSubstring) ? m_dataBuffer.asPtr<UStringImpl*>() : this; }
+ SharedUChar* baseSharedBuffer();
+ unsigned bufferOwnership() const { return m_dataBuffer & s_bufferOwnershipMask; }
+ bool isStatic() const { return m_refCount & 1; }
+
+ // unshared data
+ UChar* m_data;
+ int m_length;
+ unsigned m_refCount;
+ mutable unsigned m_hash : 31;
+ mutable unsigned m_isIdentifier : 1;
+ UntypedPtrAndBitfield m_dataBuffer;
+
+ JS_EXPORTDATA static UStringImpl* s_null;
+ JS_EXPORTDATA static UStringImpl* s_empty;
+
+ friend class JIT;
+ friend class SmallStringsStorage;
+ friend void initializeUString();
+};
+
+bool equal(const UStringImpl*, const UStringImpl*);
+
+}
+
+#endif
diff --git a/JavaScriptCore/runtime/WeakGCMap.h b/JavaScriptCore/runtime/WeakGCMap.h
new file mode 100644
index 0000000..39a91c5
--- /dev/null
+++ b/JavaScriptCore/runtime/WeakGCMap.h
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2009 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 WeakGCMap_h
+#define WeakGCMap_h
+
+#include "Collector.h"
+#include <wtf/HashMap.h>
+
+namespace JSC {
+
+class JSCell;
+
+// A HashMap whose get() function returns emptyValue() for cells awaiting destruction.
+template<typename KeyType, typename MappedType>
+class WeakGCMap : public FastAllocBase {
+ /*
+ Invariants:
+ * A value enters the WeakGCMap marked. (Guaranteed by set().)
+ * A value that becomes unmarked leaves the WeakGCMap before being recycled. (Guaranteed by the value's destructor removing it from the WeakGCMap.)
+ * A value that becomes unmarked leaves the WeakGCMap before becoming marked again. (Guaranteed by all destructors running before the mark phase begins.)
+ * During the mark phase, all values in the WeakGCMap are valid. (Guaranteed by all destructors running before the mark phase begins.)
+ */
+
+public:
+ typedef typename HashMap<KeyType, MappedType>::iterator iterator;
+ typedef typename HashMap<KeyType, MappedType>::const_iterator const_iterator;
+
+ bool isEmpty() { return m_map.isEmpty(); }
+
+ MappedType get(const KeyType& key) const;
+ pair<iterator, bool> set(const KeyType&, const MappedType&);
+ MappedType take(const KeyType& key);
+
+ // These unchecked functions provide access to a value even if the value's
+ // mark bit is not set. This is used, among other things, to retrieve values
+ // during the GC mark phase, which begins by clearing all mark bits.
+
+ MappedType uncheckedGet(const KeyType& key) const { return m_map.get(key); }
+ bool uncheckedRemove(const KeyType&, const MappedType&);
+
+ iterator uncheckedBegin() { return m_map.begin(); }
+ iterator uncheckedEnd() { return m_map.end(); }
+
+ const_iterator uncheckedBegin() const { return m_map.begin(); }
+ const_iterator uncheckedEnd() const { return m_map.end(); }
+
+private:
+ HashMap<KeyType, MappedType> m_map;
+};
+
+template<typename KeyType, typename MappedType>
+inline MappedType WeakGCMap<KeyType, MappedType>::get(const KeyType& key) const
+{
+ MappedType result = m_map.get(key);
+ if (result == HashTraits<MappedType>::emptyValue())
+ return result;
+ if (!Heap::isCellMarked(result))
+ return HashTraits<MappedType>::emptyValue();
+ return result;
+}
+
+template<typename KeyType, typename MappedType>
+MappedType WeakGCMap<KeyType, MappedType>::take(const KeyType& key)
+{
+ MappedType result = m_map.take(key);
+ if (result == HashTraits<MappedType>::emptyValue())
+ return result;
+ if (!Heap::isCellMarked(result))
+ return HashTraits<MappedType>::emptyValue();
+ return result;
+}
+
+template<typename KeyType, typename MappedType>
+pair<typename HashMap<KeyType, MappedType>::iterator, bool> WeakGCMap<KeyType, MappedType>::set(const KeyType& key, const MappedType& value)
+{
+ Heap::markCell(value); // If value is newly allocated, it's not marked, so mark it now.
+ pair<iterator, bool> result = m_map.add(key, value);
+ if (!result.second) { // pre-existing entry
+ result.second = !Heap::isCellMarked(result.first->second);
+ result.first->second = value;
+ }
+ return result;
+}
+
+template<typename KeyType, typename MappedType>
+bool WeakGCMap<KeyType, MappedType>::uncheckedRemove(const KeyType& key, const MappedType& value)
+{
+ iterator it = m_map.find(key);
+ if (it == m_map.end())
+ return false;
+ if (it->second != value)
+ return false;
+ m_map.remove(it);
+ return true;
+}
+
+} // namespace JSC
+
+#endif // WeakGCMap_h
diff --git a/JavaScriptCore/runtime/WeakGCPtr.h b/JavaScriptCore/runtime/WeakGCPtr.h
new file mode 100644
index 0000000..8653721
--- /dev/null
+++ b/JavaScriptCore/runtime/WeakGCPtr.h
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2009 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 WeakGCPtr_h
+#define WeakGCPtr_h
+
+#include "Collector.h"
+#include <wtf/Noncopyable.h>
+
+namespace JSC {
+
+// A smart pointer whose get() function returns 0 for cells awaiting destruction.
+template <typename T> class WeakGCPtr : Noncopyable {
+public:
+ WeakGCPtr() : m_ptr(0) { }
+ WeakGCPtr(T* ptr) { assign(ptr); }
+
+ T* get() const
+ {
+ if (!m_ptr || !Heap::isCellMarked(m_ptr))
+ return 0;
+ return m_ptr;
+ }
+
+ void clear() { m_ptr = 0; }
+
+ T& operator*() const { return *get(); }
+ T* operator->() const { return get(); }
+
+ bool operator!() const { return !get(); }
+
+ // 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 T* WeakGCPtr::*UnspecifiedBoolType;
+ operator UnspecifiedBoolType() const { return get() ? &WeakGCPtr::m_ptr : 0; }
+#endif
+
+ WeakGCPtr& operator=(T*);
+
+private:
+ void assign(T* ptr)
+ {
+ if (ptr)
+ Heap::markCell(ptr);
+ m_ptr = ptr;
+ }
+
+ T* m_ptr;
+};
+
+template <typename T> inline WeakGCPtr<T>& WeakGCPtr<T>::operator=(T* optr)
+{
+ assign(optr);
+ return *this;
+}
+
+template <typename T, typename U> inline bool operator==(const WeakGCPtr<T>& a, const WeakGCPtr<U>& b)
+{
+ return a.get() == b.get();
+}
+
+template <typename T, typename U> inline bool operator==(const WeakGCPtr<T>& a, U* b)
+{
+ return a.get() == b;
+}
+
+template <typename T, typename U> inline bool operator==(T* a, const WeakGCPtr<U>& b)
+{
+ return a == b.get();
+}
+
+template <typename T, typename U> inline bool operator!=(const WeakGCPtr<T>& a, const WeakGCPtr<U>& b)
+{
+ return a.get() != b.get();
+}
+
+template <typename T, typename U> inline bool operator!=(const WeakGCPtr<T>& a, U* b)
+{
+ return a.get() != b;
+}
+
+template <typename T, typename U> inline bool operator!=(T* a, const WeakGCPtr<U>& b)
+{
+ return a != b.get();
+}
+
+template <typename T, typename U> inline WeakGCPtr<T> static_pointer_cast(const WeakGCPtr<U>& p)
+{
+ return WeakGCPtr<T>(static_cast<T*>(p.get()));
+}
+
+template <typename T, typename U> inline WeakGCPtr<T> const_pointer_cast(const WeakGCPtr<U>& p)
+{
+ return WeakGCPtr<T>(const_cast<T*>(p.get()));
+}
+
+template <typename T> inline T* getPtr(const WeakGCPtr<T>& p)
+{
+ return p.get();
+}
+
+} // namespace JSC
+
+#endif // WeakGCPtr_h
diff --git a/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-1.js b/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-1.js
index f887725..f13e9d7 100644
--- a/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-1.js
+++ b/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-1.js
@@ -61,14 +61,18 @@
var DST_END_1998 = UTC( GetFirstSundayInNovember(TimeFromYear(1998)) + 2*msPerHour );
- addTestCase( now );
/*
+ // We don't use |now| because it fails every night at midnight.
+ // The test is more reproducable if we use concrete times.
+ addTestCase( now );
addTestCase( TIME_YEAR_0 );
addTestCase( TIME_1970 );
addTestCase( TIME_1900 );
addTestCase( TIME_2000 );
addTestCase( UTC_FEB_29_2000 );
+*/
addTestCase( UTC_JAN_1_2005 );
+/*
addTestCase( DST_START_1998 );
addTestCase( DST_START_1998-1 );
addTestCase( DST_START_1998+1 );
diff --git a/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.12-1.js b/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.12-1.js
index 437a809..8dcf1a4 100644
--- a/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.12-1.js
+++ b/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.12-1.js
@@ -56,14 +56,19 @@
var UTC_JAN_1_2005 = TIME_2000 + TimeInYear(2000)+TimeInYear(2001)+
TimeInYear(2002)+TimeInYear(2003)+TimeInYear(2004);
- addTestCase( now );
/*
+ // We don't use |now| because it fails every night at midnight.
+ // The test is more reproducable if we use concrete times.
+ addTestCase( now );
+
addTestCase( TIME_YEAR_0 );
addTestCase( TIME_1970 );
addTestCase( TIME_1900 );
addTestCase( TIME_2000 );
addTestCase( UTC_FEB_29_2000 );
+*/
addTestCase( UTC_JAN_1_2005 );
+/*
testcases[tc++] = new TestCase( SECTION,
"(new Date(NaN)).getDay()",
diff --git a/JavaScriptCore/tests/mozilla/ecma_2/RegExp/properties-001.js b/JavaScriptCore/tests/mozilla/ecma_2/RegExp/properties-001.js
index 16f265c..3eb51cb 100644
--- a/JavaScriptCore/tests/mozilla/ecma_2/RegExp/properties-001.js
+++ b/JavaScriptCore/tests/mozilla/ecma_2/RegExp/properties-001.js
@@ -56,8 +56,15 @@ function AddRegExpCases( re, s, g, i, m, l ) {
s,
re.source );
+/*
+ * http://bugzilla.mozilla.org/show_bug.cgi?id=225550 changed
+ * the behavior of toString() and toSource() on empty regexps.
+ * So branch if |s| is the empty string -
+ */
+ var S = s? s : '(?:)';
+
AddTestCase( re + ".toString()",
- "/" + s +"/" + (g?"g":"") + (i?"i":"") +(m?"m":""),
+ "/" + S +"/" + (g?"g":"") + (i?"i":"") +(m?"m":""),
re.toString() );
AddTestCase( re + ".global",
diff --git a/JavaScriptCore/tests/mozilla/js1_2/regexp/toString.js b/JavaScriptCore/tests/mozilla/js1_2/regexp/toString.js
index 554b934..b08b772 100644
--- a/JavaScriptCore/tests/mozilla/js1_2/regexp/toString.js
+++ b/JavaScriptCore/tests/mozilla/js1_2/regexp/toString.js
@@ -41,7 +41,7 @@
// var re = new RegExp(); re.toString()
var re = new RegExp();
testcases[count++] = new TestCase ( SECTION, "var re = new RegExp(); re.toString()",
- '//', re.toString());
+ '/(?:)/', re.toString());
// re = /.+/; re.toString();
re = /.+/;
diff --git a/JavaScriptCore/wrec/WREC.h b/JavaScriptCore/wrec/WREC.h
index 483dce0..13324e7 100644
--- a/JavaScriptCore/wrec/WREC.h
+++ b/JavaScriptCore/wrec/WREC.h
@@ -32,7 +32,7 @@
#include <wtf/unicode/Unicode.h>
-#if COMPILER(GCC) && PLATFORM(X86)
+#if COMPILER(GCC) && CPU(X86)
#define WREC_CALL __attribute__ ((regparm (3)))
#else
#define WREC_CALL
diff --git a/JavaScriptCore/wrec/WRECGenerator.cpp b/JavaScriptCore/wrec/WRECGenerator.cpp
index e62add3..7105984 100644
--- a/JavaScriptCore/wrec/WRECGenerator.cpp
+++ b/JavaScriptCore/wrec/WRECGenerator.cpp
@@ -40,7 +40,7 @@ namespace JSC { namespace WREC {
void Generator::generateEnter()
{
-#if PLATFORM(X86)
+#if CPU(X86)
// On x86 edi & esi are callee preserved registers.
push(X86Registers::edi);
push(X86Registers::esi);
@@ -71,7 +71,7 @@ void Generator::generateReturnSuccess()
store32(index, Address(output, 4)); // match end
// Restore callee save registers.
-#if PLATFORM(X86)
+#if CPU(X86)
pop(X86Registers::esi);
pop(X86Registers::edi);
#endif
@@ -110,7 +110,7 @@ void Generator::generateReturnFailure()
pop();
move(Imm32(-1), returnRegister);
-#if PLATFORM(X86)
+#if CPU(X86)
pop(X86Registers::esi);
pop(X86Registers::edi);
#endif
diff --git a/JavaScriptCore/wrec/WRECGenerator.h b/JavaScriptCore/wrec/WRECGenerator.h
index 294c3d0..d707a6e 100644
--- a/JavaScriptCore/wrec/WRECGenerator.h
+++ b/JavaScriptCore/wrec/WRECGenerator.h
@@ -62,7 +62,7 @@ namespace JSC {
{
}
-#if PLATFORM(X86)
+#if CPU(X86)
static const RegisterID input = X86Registers::eax;
static const RegisterID index = X86Registers::edx;
static const RegisterID length = X86Registers::ecx;
@@ -73,7 +73,7 @@ namespace JSC {
static const RegisterID returnRegister = X86Registers::eax;
#endif
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
static const RegisterID input = X86Registers::edi;
static const RegisterID index = X86Registers::esi;
static const RegisterID length = X86Registers::edx;
diff --git a/JavaScriptCore/wscript b/JavaScriptCore/wscript
index 356950f..f5a041f 100644
--- a/JavaScriptCore/wscript
+++ b/JavaScriptCore/wscript
@@ -34,13 +34,14 @@ jscore_excludes.extend(get_excludes(jscore_dir, ['*CF.cpp', '*Symbian.cpp']))
sources = []
-jscore_excludes.extend(get_excludes(jscore_dir, ['*Win.cpp', '*None.cpp']))
+jscore_excludes.extend(get_excludes(jscore_dir, ['*None.cpp']))
if building_on_win32:
- jscore_excludes += ['ExecutableAllocatorPosix.cpp', 'MarkStackPosix.cpp']
+ jscore_excludes += ['ExecutableAllocatorPosix.cpp', 'MarkStackPosix.cpp', 'ThreadingPthreads.cpp']
sources += ['jit/ExecutableAllocatorWin.cpp', 'runtime/MarkStackWin.cpp']
else:
jscore_excludes.append('JSStringRefBSTR.cpp')
+ jscore_excludes.extend(get_excludes(jscore_dir, ['*Win.cpp']))
def generate_jscore_derived_sources():
# build the derived sources
diff --git a/JavaScriptCore/wtf/AlwaysInline.h b/JavaScriptCore/wtf/AlwaysInline.h
index 64fdd99..4e7224c 100644
--- a/JavaScriptCore/wtf/AlwaysInline.h
+++ b/JavaScriptCore/wtf/AlwaysInline.h
@@ -23,7 +23,7 @@
#ifndef ALWAYS_INLINE
#if COMPILER(GCC) && defined(NDEBUG) && !COMPILER(MINGW)
#define ALWAYS_INLINE inline __attribute__((__always_inline__))
-#elif COMPILER(MSVC) && defined(NDEBUG)
+#elif (COMPILER(MSVC) || COMPILER(RVCT)) && defined(NDEBUG)
#define ALWAYS_INLINE __forceinline
#else
#define ALWAYS_INLINE inline
diff --git a/JavaScriptCore/wtf/Assertions.cpp b/JavaScriptCore/wtf/Assertions.cpp
index 6c5e2e3..cadbc91 100644
--- a/JavaScriptCore/wtf/Assertions.cpp
+++ b/JavaScriptCore/wtf/Assertions.cpp
@@ -35,7 +35,7 @@
#include <CoreFoundation/CFString.h>
#endif
-#if COMPILER(MSVC) && !PLATFORM(WINCE)
+#if COMPILER(MSVC) && !OS(WINCE)
#ifndef WINVER
#define WINVER 0x0500
#endif
@@ -46,7 +46,7 @@
#include <crtdbg.h>
#endif
-#if PLATFORM(WINCE)
+#if OS(WINCE)
#include <winbase.h>
#endif
@@ -82,7 +82,7 @@ static void vprintf_stderr_common(const char* format, va_list args)
break;
if (_vsnprintf(buffer, size, format, args) != -1) {
-#if PLATFORM(WINCE)
+#if OS(WINCE)
// WinCE only supports wide chars
wchar_t* wideBuffer = (wchar_t*)malloc(size * sizeof(wchar_t));
if (wideBuffer == NULL)
@@ -105,7 +105,7 @@ static void vprintf_stderr_common(const char* format, va_list args)
} while (size > 1024);
}
#endif
-#if PLATFORM(SYMBIAN)
+#if OS(SYMBIAN)
vfprintf(stdout, format, args);
#else
vfprintf(stderr, format, args);
@@ -123,7 +123,7 @@ static void printf_stderr_common(const char* format, ...)
static void printCallSite(const char* file, int line, const char* function)
{
-#if PLATFORM(WIN) && !PLATFORM(WINCE) && defined _DEBUG
+#if OS(WIN) && !OS(WINCE) && defined _DEBUG
_CrtDbgReport(_CRT_WARN, file, line, NULL, "%s\n", function);
#else
printf_stderr_common("(%s:%d %s)\n", file, line, function);
diff --git a/JavaScriptCore/wtf/Assertions.h b/JavaScriptCore/wtf/Assertions.h
index e3340f1..352a74b 100644
--- a/JavaScriptCore/wtf/Assertions.h
+++ b/JavaScriptCore/wtf/Assertions.h
@@ -50,7 +50,7 @@
#include <inttypes.h>
#endif
-#if PLATFORM(SYMBIAN)
+#if OS(SYMBIAN)
#include <e32def.h>
#include <e32debug.h>
#endif
@@ -61,24 +61,50 @@
#define ASSERTIONS_DISABLED_DEFAULT 0
#endif
+#if COMPILER(MSVC7) || COMPILER(WINSCW)
+#define HAVE_VARIADIC_MACRO 0
+#else
+#define HAVE_VARIADIC_MACRO 1
+#endif
+
#ifndef ASSERT_DISABLED
#define ASSERT_DISABLED ASSERTIONS_DISABLED_DEFAULT
#endif
+#ifndef ASSERT_MSG_DISABLED
+#if HAVE(VARIADIC_MACRO)
+#define ASSERT_MSG_DISABLED ASSERTIONS_DISABLED_DEFAULT
+#else
+#define ASSERT_MSG_DISABLED 1
+#endif
+#endif
+
#ifndef ASSERT_ARG_DISABLED
#define ASSERT_ARG_DISABLED ASSERTIONS_DISABLED_DEFAULT
#endif
#ifndef FATAL_DISABLED
+#if HAVE(VARIADIC_MACRO)
#define FATAL_DISABLED ASSERTIONS_DISABLED_DEFAULT
+#else
+#define FATAL_DISABLED 1
+#endif
#endif
#ifndef ERROR_DISABLED
+#if HAVE(VARIADIC_MACRO)
#define ERROR_DISABLED ASSERTIONS_DISABLED_DEFAULT
+#else
+#define ERROR_DISABLED 1
+#endif
#endif
#ifndef LOG_DISABLED
+#if HAVE(VARIADIC_MACRO)
#define LOG_DISABLED ASSERTIONS_DISABLED_DEFAULT
+#else
+#define LOG_DISABLED 1
+#endif
#endif
#if COMPILER(GCC)
@@ -125,7 +151,7 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann
/* CRASH -- gets us into the debugger or the crash reporter -- signals are ignored by the crash reporter so we must do better */
#ifndef CRASH
-#if PLATFORM(SYMBIAN)
+#if OS(SYMBIAN)
#define CRASH() do { \
__DEBUGGER(); \
User::Panic(_L("Webkit CRASH"),0); \
@@ -138,9 +164,9 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann
#endif
#endif
-/* ASSERT, ASSERT_WITH_MESSAGE, ASSERT_NOT_REACHED */
+/* ASSERT, ASSERT_NOT_REACHED, ASSERT_UNUSED */
-#if PLATFORM(WINCE) && !PLATFORM(TORCHMOBILE)
+#if OS(WINCE) && !PLATFORM(TORCHMOBILE)
/* FIXME: We include this here only to avoid a conflict with the ASSERT macro. */
#include <windows.h>
#undef min
@@ -148,7 +174,7 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann
#undef ERROR
#endif
-#if PLATFORM(WIN_OS) || PLATFORM(SYMBIAN)
+#if OS(WINDOWS) || OS(SYMBIAN)
/* FIXME: Change to use something other than ASSERT to avoid this conflict with the underlying platform */
#undef ASSERT
#endif
@@ -156,11 +182,6 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann
#if ASSERT_DISABLED
#define ASSERT(assertion) ((void)0)
-#if COMPILER(MSVC7) || COMPILER(WINSCW)
-#define ASSERT_WITH_MESSAGE(assertion) ((void)0)
-#else
-#define ASSERT_WITH_MESSAGE(assertion, ...) ((void)0)
-#endif /* COMPILER(MSVC7) */
#define ASSERT_NOT_REACHED() ((void)0)
#define ASSERT_UNUSED(variable, assertion) ((void)variable)
@@ -172,16 +193,7 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann
CRASH(); \
} \
while (0)
-#if COMPILER(MSVC7) || COMPILER(WINSCW)
-#define ASSERT_WITH_MESSAGE(assertion) ((void)0)
-#else
-#define ASSERT_WITH_MESSAGE(assertion, ...) do \
- if (!(assertion)) { \
- WTFReportAssertionFailureWithMessage(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #assertion, __VA_ARGS__); \
- CRASH(); \
- } \
-while (0)
-#endif /* COMPILER(MSVC7) */
+
#define ASSERT_NOT_REACHED() do { \
WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, 0); \
CRASH(); \
@@ -191,6 +203,24 @@ while (0)
#endif
+/* ASSERT_WITH_MESSAGE */
+
+#if COMPILER(MSVC7)
+#define ASSERT_WITH_MESSAGE(assertion) ((void)0)
+#elif COMPILER(WINSCW)
+#define ASSERT_WITH_MESSAGE(assertion, arg...) ((void)0)
+#elif ASSERT_MSG_DISABLED
+#define ASSERT_WITH_MESSAGE(assertion, ...) ((void)0)
+#else
+#define ASSERT_WITH_MESSAGE(assertion, ...) do \
+ if (!(assertion)) { \
+ WTFReportAssertionFailureWithMessage(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #assertion, __VA_ARGS__); \
+ CRASH(); \
+ } \
+while (0)
+#endif
+
+
/* ASSERT_ARG */
#if ASSERT_ARG_DISABLED
@@ -215,10 +245,12 @@ while (0)
/* FATAL */
-#if FATAL_DISABLED && !COMPILER(MSVC7) && !COMPILER(WINSCW)
-#define FATAL(...) ((void)0)
-#elif COMPILER(MSVC7)
+#if COMPILER(MSVC7)
#define FATAL() ((void)0)
+#elif COMPILER(WINSCW)
+#define FATAL(arg...) ((void)0)
+#elif FATAL_DISABLED
+#define FATAL(...) ((void)0)
#else
#define FATAL(...) do { \
WTFReportFatalError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, __VA_ARGS__); \
@@ -228,20 +260,24 @@ while (0)
/* LOG_ERROR */
-#if ERROR_DISABLED && !COMPILER(MSVC7) && !COMPILER(WINSCW)
-#define LOG_ERROR(...) ((void)0)
-#elif COMPILER(MSVC7) || COMPILER(WINSCW)
+#if COMPILER(MSVC7)
#define LOG_ERROR() ((void)0)
+#elif COMPILER(WINSCW)
+#define LOG_ERROR(arg...) ((void)0)
+#elif ERROR_DISABLED
+#define LOG_ERROR(...) ((void)0)
#else
#define LOG_ERROR(...) WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, __VA_ARGS__)
#endif
/* LOG */
-#if LOG_DISABLED && !COMPILER(MSVC7) && !COMPILER(WINSCW)
-#define LOG(channel, ...) ((void)0)
-#elif COMPILER(MSVC7) || COMPILER(WINSCW)
+#if COMPILER(MSVC7)
#define LOG() ((void)0)
+#elif COMPILER(WINSCW)
+#define LOG(arg...) ((void)0)
+#elif LOG_DISABLED
+#define LOG(channel, ...) ((void)0)
#else
#define LOG(channel, ...) WTFLog(&JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), __VA_ARGS__)
#define JOIN_LOG_CHANNEL_WITH_PREFIX(prefix, channel) JOIN_LOG_CHANNEL_WITH_PREFIX_LEVEL_2(prefix, channel)
@@ -250,10 +286,12 @@ while (0)
/* LOG_VERBOSE */
-#if LOG_DISABLED && !COMPILER(MSVC7) && !COMPILER(WINSCW)
-#define LOG_VERBOSE(channel, ...) ((void)0)
-#elif COMPILER(MSVC7) || COMPILER(WINSCW)
+#if COMPILER(MSVC7)
#define LOG_VERBOSE(channel) ((void)0)
+#elif COMPILER(WINSCW)
+#define LOG_VERBOSE(channel, arg...) ((void)0)
+#elif LOG_DISABLED
+#define LOG_VERBOSE(channel, ...) ((void)0)
#else
#define LOG_VERBOSE(channel, ...) WTFLogVerbose(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, &JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), __VA_ARGS__)
#endif
diff --git a/JavaScriptCore/wtf/CurrentTime.cpp b/JavaScriptCore/wtf/CurrentTime.cpp
index b36cae5..b272874 100644
--- a/JavaScriptCore/wtf/CurrentTime.cpp
+++ b/JavaScriptCore/wtf/CurrentTime.cpp
@@ -33,7 +33,7 @@
#include "config.h"
#include "CurrentTime.h"
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// Windows is first since we want to use hires timers, despite PLATFORM(CF)
// being defined.
@@ -45,7 +45,7 @@
#include <time.h>
#if USE(QUERY_PERFORMANCE_COUNTER)
-#if PLATFORM(WINCE)
+#if OS(WINCE)
extern "C" time_t mktime(struct tm *t);
#else
#include <sys/timeb.h>
@@ -71,7 +71,7 @@ namespace WTF {
const double msPerSecond = 1000.0;
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#if USE(QUERY_PERFORMANCE_COUNTER)
@@ -123,7 +123,7 @@ static double highResUpTime()
static double lowResUTCTime()
{
-#if PLATFORM(WINCE)
+#if OS(WINCE)
SYSTEMTIME systemTime;
GetSystemTime(&systemTime);
struct tm tmtime;
diff --git a/JavaScriptCore/wtf/CurrentTime.h b/JavaScriptCore/wtf/CurrentTime.h
index 472770e..334a6e9 100644
--- a/JavaScriptCore/wtf/CurrentTime.h
+++ b/JavaScriptCore/wtf/CurrentTime.h
@@ -49,7 +49,7 @@ namespace WTF {
inline void getLocalTime(const time_t* localTime, struct tm* localTM)
{
- #if COMPILER(MSVC7) || COMPILER(MINGW) || PLATFORM(WINCE)
+ #if COMPILER(MSVC7) || COMPILER(MINGW) || OS(WINCE)
*localTM = *localtime(localTime);
#elif COMPILER(MSVC)
localtime_s(localTM, localTime);
diff --git a/JavaScriptCore/wtf/DateMath.cpp b/JavaScriptCore/wtf/DateMath.cpp
index 187fa63..b9a0207 100644
--- a/JavaScriptCore/wtf/DateMath.cpp
+++ b/JavaScriptCore/wtf/DateMath.cpp
@@ -88,7 +88,7 @@
#include <errno.h>
#endif
-#if PLATFORM(WINCE)
+#if OS(WINCE)
extern "C" size_t strftime(char * const s, const size_t maxsize, const char * const format, const struct tm * const t);
extern "C" struct tm * localtime(const time_t *timer);
#endif
@@ -120,6 +120,10 @@ static const double secondsPerYear = 24.0 * 60.0 * 60.0 * 365.0;
static const double usecPerSec = 1000000.0;
static const double maxUnixTime = 2145859200.0; // 12/31/2037
+// ECMAScript asks not to support for a date of which total
+// millisecond value is larger than the following value.
+// See 15.9.1.14 of ECMA-262 5th edition.
+static const double maxECMAScriptTime = 8.64E15;
// Day of year for the first day of each month, where index 0 is January, and day 0 is January 1.
// First for non-leap years, then for leap years.
@@ -168,7 +172,7 @@ static inline double msToDays(double ms)
return floor(ms / msPerDay);
}
-static inline int msToYear(double ms)
+int msToYear(double ms)
{
int approxYear = static_cast<int>(floor(ms / (msPerDay * 365.2425)) + 1970);
double msFromApproxYearTo1970 = msPerDay * daysFrom1970ToYear(approxYear);
@@ -179,7 +183,7 @@ static inline int msToYear(double ms)
return approxYear;
}
-static inline int dayInYear(double ms, int year)
+int dayInYear(double ms, int year)
{
return static_cast<int>(msToDays(ms) - daysFrom1970ToYear(year));
}
@@ -225,7 +229,7 @@ static inline int msToHours(double ms)
return static_cast<int>(result);
}
-static inline int monthFromDayInYear(int dayInYear, bool leapYear)
+int monthFromDayInYear(int dayInYear, bool leapYear)
{
const int d = dayInYear;
int step;
@@ -263,7 +267,7 @@ static inline bool checkMonth(int dayInYear, int& startDayOfThisMonth, int& star
return (dayInYear <= startDayOfNextMonth);
}
-static inline int dayInMonthFromDayInYear(int dayInYear, bool leapYear)
+int dayInMonthFromDayInYear(int dayInYear, bool leapYear)
{
const int d = dayInYear;
int step;
@@ -306,7 +310,7 @@ static inline double timeToMS(double hour, double min, double sec, double ms)
return (((hour * minutesPerHour + min) * secondsPerMinute + sec) * msPerSecond + ms);
}
-static int dateToDayInYear(int year, int month, int day)
+double dateToDaysFrom1970(int year, int month, int day)
{
year += month / 12;
@@ -316,7 +320,8 @@ static int dateToDayInYear(int year, int month, int day)
--year;
}
- int yearday = static_cast<int>(floor(daysFrom1970ToYear(year)));
+ double yearday = floor(daysFrom1970ToYear(year));
+ ASSERT((year >= 1970 && yearday >= 0) || (year < 1970 && yearday < 0));
int monthday = monthToDayInYear(month, isLeapYear(year));
return yearday + monthday + day - 1;
@@ -374,7 +379,11 @@ int equivalentYearForDST(int year)
static int32_t calculateUTCOffset()
{
+#if PLATFORM(BREWMP)
+ time_t localTime = static_cast<time_t>(currentTime());
+#else
time_t localTime = time(0);
+#endif
tm localt;
getLocalTime(&localTime, &localt);
@@ -452,7 +461,7 @@ static double calculateDSTOffset(double ms, double utcOffset)
int dayInYearLocal = dayInYear(ms, year);
int dayInMonth = dayInMonthFromDayInYear(dayInYearLocal, leapYear);
int month = monthFromDayInYear(dayInYearLocal, leapYear);
- int day = dateToDayInYear(equivalentYear, month, dayInMonth);
+ double day = dateToDaysFrom1970(equivalentYear, month, dayInMonth);
ms = (day * msPerDay) + msToMilliseconds(ms);
}
@@ -483,7 +492,7 @@ static inline double ymdhmsToSeconds(long year, int mon, int day, int hour, int
// We follow the recommendation of RFC 2822 to consider all
// obsolete time zones not listed here equivalent to "-0000".
static const struct KnownZone {
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
const
#endif
char tzName[4];
@@ -841,7 +850,7 @@ double timeClip(double t)
{
if (!isfinite(t))
return NaN;
- if (fabs(t) > 8.64E15)
+ if (fabs(t) > maxECMAScriptTime)
return NaN;
return trunc(t);
}
@@ -927,7 +936,7 @@ double getUTCOffset(ExecState* exec)
double gregorianDateTimeToMS(ExecState* exec, const GregorianDateTime& t, double milliSeconds, bool inputIsUTC)
{
- int day = dateToDayInYear(t.year + 1900, t.month, t.monthDay);
+ double day = dateToDaysFrom1970(t.year + 1900, t.month, t.monthDay);
double ms = timeToMS(t.hour, t.minute, t.second, milliSeconds);
double result = (day * WTF::msPerDay) + ms;
diff --git a/JavaScriptCore/wtf/DateMath.h b/JavaScriptCore/wtf/DateMath.h
index 6d4ac1e..033d25e 100644
--- a/JavaScriptCore/wtf/DateMath.h
+++ b/JavaScriptCore/wtf/DateMath.h
@@ -76,8 +76,25 @@ const double msPerHour = 60.0 * 60.0 * 1000.0;
const double msPerDay = 24.0 * 60.0 * 60.0 * 1000.0;
const double msPerMonth = 2592000000.0;
+// Returns the number of days from 1970-01-01 to the specified date.
+double dateToDaysFrom1970(int year, int month, int day);
+int msToYear(double ms);
+int dayInYear(double ms, int year);
+int monthFromDayInYear(int dayInYear, bool leapYear);
+int dayInMonthFromDayInYear(int dayInYear, bool leapYear);
+
} // namespace WTF
+using WTF::dateToDaysFrom1970;
+using WTF::dayInMonthFromDayInYear;
+using WTF::dayInYear;
+using WTF::minutesPerHour;
+using WTF::monthFromDayInYear;
+using WTF::msPerDay;
+using WTF::msPerSecond;
+using WTF::msToYear;
+using WTF::secondsPerMinute;
+
#if USE(JSC)
namespace JSC {
class ExecState;
diff --git a/JavaScriptCore/wtf/FastMalloc.cpp b/JavaScriptCore/wtf/FastMalloc.cpp
index 6cd8ef0..7b14809 100644
--- a/JavaScriptCore/wtf/FastMalloc.cpp
+++ b/JavaScriptCore/wtf/FastMalloc.cpp
@@ -114,11 +114,13 @@ static void initializeIsForbiddenKey()
pthread_key_create(&isForbiddenKey, 0);
}
+#if !ASSERT_DISABLED
static bool isForbidden()
{
pthread_once(&isForbiddenKeyOnce, initializeIsForbiddenKey);
return !!pthread_getspecific(isForbiddenKey);
}
+#endif
void fastMallocForbid()
{
@@ -177,6 +179,17 @@ void* fastZeroedMalloc(size_t n)
memset(result, 0, n);
return result;
}
+
+char* fastStrDup(const char* src)
+{
+ int len = strlen(src) + 1;
+ char* dup = static_cast<char*>(fastMalloc(len));
+
+ if (dup)
+ memcpy(dup, src, len);
+
+ return dup;
+}
TryMallocReturnValue tryFastZeroedMalloc(size_t n)
{
@@ -191,13 +204,6 @@ TryMallocReturnValue tryFastZeroedMalloc(size_t n)
#if FORCE_SYSTEM_MALLOC
-#include <stdlib.h>
-#if !PLATFORM(WIN_OS)
- #include <pthread.h>
-#else
- #include "windows.h"
-#endif
-
namespace WTF {
TryMallocReturnValue tryFastMalloc(size_t n)
@@ -349,7 +355,7 @@ FastMallocStatistics fastMallocStatistics()
} // namespace WTF
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
// This symbol is present in the JavaScriptCore exports file even when FastMalloc is disabled.
// It will never be used in this case, so it's type and value are less interesting than its presence.
extern "C" const int jscore_fastmalloc_introspection = 0;
@@ -379,7 +385,7 @@ extern "C" const int jscore_fastmalloc_introspection = 0;
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
-#if PLATFORM(UNIX)
+#if OS(UNIX)
#include <unistd.h>
#endif
#if COMPILER(MSVC)
@@ -391,11 +397,15 @@ extern "C" const int jscore_fastmalloc_introspection = 0;
#if WTF_CHANGES
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
#include "MallocZoneSupport.h"
#include <wtf/HashSet.h>
#include <wtf/Vector.h>
#endif
+#if HAVE(DISPATCH_H)
+#include <dispatch/dispatch.h>
+#endif
+
#ifndef PRIuS
#define PRIuS "zu"
@@ -405,7 +415,7 @@ extern "C" const int jscore_fastmalloc_introspection = 0;
// call to the function on Mac OS X, and it's used in performance-critical code. So we
// use a function pointer. But that's not necessarily faster on other platforms, and we had
// problems with this technique on Windows, so we'll do this only on Mac OS X.
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
static void* (*pthread_getspecific_function_pointer)(pthread_key_t) = pthread_getspecific;
#define pthread_getspecific(key) pthread_getspecific_function_pointer(key)
#endif
@@ -433,7 +443,7 @@ namespace WTF {
#define MESSAGE LOG_ERROR
#define CHECK_CONDITION ASSERT
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
class Span;
class TCMalloc_Central_FreeListPadded;
class TCMalloc_PageHeap;
@@ -990,7 +1000,7 @@ class PageHeapAllocator {
int inuse() const { return inuse_; }
-#if defined(WTF_CHANGES) && PLATFORM(DARWIN)
+#if defined(WTF_CHANGES) && OS(DARWIN)
template <class Recorder>
void recordAdministrativeRegions(Recorder& recorder, const RemoteMemoryReader& reader)
{
@@ -1172,7 +1182,7 @@ template <int BITS> class MapSelector {
};
#if defined(WTF_CHANGES)
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
// On all known X86-64 platforms, the upper 16 bits are always unused and therefore
// can be excluded from the PageMap key.
// See http://en.wikipedia.org/wiki/X86-64#Virtual_address_space_details
@@ -1223,7 +1233,7 @@ static const int kScavengeTimerDelayInSeconds = 5;
static const size_t kMinimumFreeCommittedPageCount = 512;
// During a scavenge, we'll release up to a fraction of the free committed pages.
-#if PLATFORM(WIN)
+#if OS(WINDOWS)
// We are slightly less aggressive in releasing memory on Windows due to performance reasons.
static const int kMaxScavengeAmountFactor = 3;
#else
@@ -1372,26 +1382,34 @@ class TCMalloc_PageHeap {
// Index of last free list we scavenged
size_t scavenge_index_;
-#if defined(WTF_CHANGES) && PLATFORM(DARWIN)
+#if defined(WTF_CHANGES) && OS(DARWIN)
friend class FastMallocZone;
#endif
#if USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY
- static NO_RETURN void* runScavengerThread(void*);
+ void initializeScavenger();
+ ALWAYS_INLINE void signalScavenger();
+ void scavenge();
+ ALWAYS_INLINE bool shouldContinueScavenging() const;
+#if !HAVE(DISPATCH_H)
+ static NO_RETURN void* runScavengerThread(void*);
NO_RETURN void scavengerThread();
- void scavenge();
-
- inline bool shouldContinueScavenging() const;
+ // Keeps track of whether the background thread is actively scavenging memory every kScavengeTimerDelayInSeconds, or
+ // it's blocked waiting for more pages to be deleted.
+ bool m_scavengeThreadActive;
pthread_mutex_t m_scavengeMutex;
-
pthread_cond_t m_scavengeCondition;
+#else // !HAVE(DISPATCH_H)
+ void periodicScavenge();
+
+ dispatch_queue_t m_scavengeQueue;
+ dispatch_source_t m_scavengeTimer;
+ bool m_scavengingScheduled;
+#endif
- // Keeps track of whether the background thread is actively scavenging memory every kScavengeTimerDelayInSeconds, or
- // it's blocked waiting for more pages to be deleted.
- bool m_scavengeThreadActive;
#endif // USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY
};
@@ -1419,15 +1437,23 @@ void TCMalloc_PageHeap::init()
}
#if USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY
+ initializeScavenger();
+#endif // USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY
+}
+
+#if USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY
+
+#if !HAVE(DISPATCH_H)
+
+void TCMalloc_PageHeap::initializeScavenger()
+{
pthread_mutex_init(&m_scavengeMutex, 0);
pthread_cond_init(&m_scavengeCondition, 0);
m_scavengeThreadActive = true;
pthread_t thread;
pthread_create(&thread, 0, runScavengerThread, this);
-#endif // USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY
}
-#if USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY
void* TCMalloc_PageHeap::runScavengerThread(void* context)
{
static_cast<TCMalloc_PageHeap*>(context)->scavengerThread();
@@ -1437,6 +1463,34 @@ void* TCMalloc_PageHeap::runScavengerThread(void* context)
#endif
}
+ALWAYS_INLINE void TCMalloc_PageHeap::signalScavenger()
+{
+ if (!m_scavengeThreadActive && shouldContinueScavenging())
+ pthread_cond_signal(&m_scavengeCondition);
+}
+
+#else // !HAVE(DISPATCH_H)
+
+void TCMalloc_PageHeap::initializeScavenger()
+{
+ m_scavengeQueue = dispatch_queue_create("com.apple.JavaScriptCore.FastMallocSavenger", NULL);
+ m_scavengeTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, m_scavengeQueue);
+ dispatch_time_t startTime = dispatch_time(DISPATCH_TIME_NOW, kScavengeTimerDelayInSeconds * NSEC_PER_SEC);
+ dispatch_source_set_timer(m_scavengeTimer, startTime, kScavengeTimerDelayInSeconds * NSEC_PER_SEC, 1000 * NSEC_PER_USEC);
+ dispatch_source_set_event_handler(m_scavengeTimer, ^{ periodicScavenge(); });
+ m_scavengingScheduled = false;
+}
+
+ALWAYS_INLINE void TCMalloc_PageHeap::signalScavenger()
+{
+ if (!m_scavengingScheduled && shouldContinueScavenging()) {
+ m_scavengingScheduled = true;
+ dispatch_resume(m_scavengeTimer);
+ }
+}
+
+#endif
+
void TCMalloc_PageHeap::scavenge()
{
// If we have to commit memory in the last 5 seconds, it means we don't have enough free committed pages
@@ -1472,7 +1526,7 @@ void TCMalloc_PageHeap::scavenge()
free_committed_pages_ -= pagesDecommitted;
}
-inline bool TCMalloc_PageHeap::shouldContinueScavenging() const
+ALWAYS_INLINE bool TCMalloc_PageHeap::shouldContinueScavenging() const
{
return free_committed_pages_ > kMinimumFreeCommittedPageCount;
}
@@ -1734,8 +1788,7 @@ inline void TCMalloc_PageHeap::Delete(Span* span) {
}
// Make sure the scavenge thread becomes active if we have enough freed pages to release some back to the system.
- if (!m_scavengeThreadActive && shouldContinueScavenging())
- pthread_cond_signal(&m_scavengeCondition);
+ signalScavenger();
#else
IncrementalScavenge(n);
#endif
@@ -2278,7 +2331,9 @@ static inline TCMalloc_PageHeap* getPageHeap()
#define pageheap getPageHeap()
#if USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY
-#if PLATFORM(WIN_OS)
+
+#if !HAVE(DISPATCH_H)
+#if OS(WINDOWS)
static void sleep(unsigned seconds)
{
::Sleep(seconds * 1000);
@@ -2307,6 +2362,23 @@ void TCMalloc_PageHeap::scavengerThread()
}
}
}
+
+#else
+
+void TCMalloc_PageHeap::periodicScavenge()
+{
+ {
+ SpinLockHolder h(&pageheap_lock);
+ pageheap->scavenge();
+ }
+
+ if (!shouldContinueScavenging()) {
+ m_scavengingScheduled = false;
+ dispatch_suspend(m_scavengeTimer);
+ }
+}
+#endif // HAVE(DISPATCH_H)
+
#endif
// If TLS is available, we also store a copy
@@ -2816,7 +2888,7 @@ void TCMalloc_ThreadCache::InitModule() {
}
pageheap->init();
phinited = 1;
-#if defined(WTF_CHANGES) && PLATFORM(DARWIN)
+#if defined(WTF_CHANGES) && OS(DARWIN)
FastMallocZone::init();
#endif
}
@@ -3795,7 +3867,7 @@ void* realloc(void* old_ptr, size_t new_size) {
return new_ptr;
} else {
#if ENABLE(FAST_MALLOC_MATCH_VALIDATION)
- old_ptr = pByte + sizeof(AllocAlignmentInteger); // Set old_ptr back to the user pointer.
+ old_ptr = static_cast<AllocAlignmentInteger*>(old_ptr) + 1; // Set old_ptr back to the user pointer.
#endif
return old_ptr;
}
@@ -4014,7 +4086,7 @@ void *(*__memalign_hook)(size_t, size_t, const void *) = MemalignOverride;
#endif
-#if defined(WTF_CHANGES) && PLATFORM(DARWIN)
+#if defined(WTF_CHANGES) && OS(DARWIN)
class FreeObjectFinder {
const RemoteMemoryReader& m_reader;
@@ -4297,7 +4369,7 @@ extern "C" {
malloc_introspection_t jscore_fastmalloc_introspection = { &FastMallocZone::enumerate, &FastMallocZone::goodSize, &FastMallocZone::check, &FastMallocZone::print,
&FastMallocZone::log, &FastMallocZone::forceLock, &FastMallocZone::forceUnlock, &FastMallocZone::statistics
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !PLATFORM(IPHONE)
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !OS(IPHONE_OS)
, 0 // zone_locked will not be called on the zone unless it advertises itself as version five or higher.
#endif
diff --git a/JavaScriptCore/wtf/FastMalloc.h b/JavaScriptCore/wtf/FastMalloc.h
index abe4a58..74d4307 100644
--- a/JavaScriptCore/wtf/FastMalloc.h
+++ b/JavaScriptCore/wtf/FastMalloc.h
@@ -33,6 +33,7 @@ namespace WTF {
void* fastZeroedMalloc(size_t);
void* fastCalloc(size_t numElements, size_t elementSize);
void* fastRealloc(void*, size_t);
+ char* fastStrDup(const char*);
struct TryMallocReturnValue {
TryMallocReturnValue(void* data)
@@ -188,17 +189,18 @@ using WTF::tryFastZeroedMalloc;
using WTF::tryFastCalloc;
using WTF::tryFastRealloc;
using WTF::fastFree;
+using WTF::fastStrDup;
#ifndef NDEBUG
using WTF::fastMallocForbid;
using WTF::fastMallocAllow;
#endif
-#if COMPILER(GCC) && PLATFORM(DARWIN)
+#if COMPILER(GCC) && OS(DARWIN)
#define WTF_PRIVATE_INLINE __private_extern__ inline __attribute__((always_inline))
#elif COMPILER(GCC)
#define WTF_PRIVATE_INLINE inline __attribute__((always_inline))
-#elif COMPILER(MSVC)
+#elif COMPILER(MSVC) || COMPILER(RVCT)
#define WTF_PRIVATE_INLINE __forceinline
#else
#define WTF_PRIVATE_INLINE inline
diff --git a/JavaScriptCore/wtf/HashFunctions.h b/JavaScriptCore/wtf/HashFunctions.h
index 13afb72..2c66a2d 100644
--- a/JavaScriptCore/wtf/HashFunctions.h
+++ b/JavaScriptCore/wtf/HashFunctions.h
@@ -173,9 +173,6 @@ namespace WTF {
template<typename P> struct DefaultHash<RefPtr<P> > { typedef PtrHash<RefPtr<P> > Hash; };
template<typename T, typename U> struct DefaultHash<std::pair<T, U> > { typedef PairHash<T, U> Hash; };
-
- // Golden ratio - arbitrary start value to avoid mapping all 0's to all 0's
- static const unsigned stringHashingStartValue = 0x9e3779b9U;
} // namespace WTF
diff --git a/JavaScriptCore/wtf/HashMap.h b/JavaScriptCore/wtf/HashMap.h
index ece3812..d63a8d4 100644
--- a/JavaScriptCore/wtf/HashMap.h
+++ b/JavaScriptCore/wtf/HashMap.h
@@ -100,6 +100,8 @@ namespace WTF {
// static translate(ValueType&, const T&, unsigned hashCode);
template<typename T, typename HashTranslator> pair<iterator, bool> add(const T&, const MappedType&);
+ void checkConsistency() const;
+
private:
pair<iterator, bool> inlineAdd(const KeyType&, const MappedType&);
@@ -281,7 +283,7 @@ namespace WTF {
{
if (it.m_impl == m_impl.end())
return;
- m_impl.checkTableConsistency();
+ m_impl.internalCheckTableConsistency();
m_impl.removeWithoutEntryConsistencyCheck(it.m_impl);
}
@@ -311,6 +313,13 @@ namespace WTF {
}
template<typename T, typename U, typename V, typename W, typename X>
+ inline void HashMap<T, U, V, W, X>::checkConsistency() const
+ {
+ m_impl.checkTableConsistency();
+ }
+
+
+ template<typename T, typename U, typename V, typename W, typename X>
bool operator==(const HashMap<T, U, V, W, X>& a, const HashMap<T, U, V, W, X>& b)
{
if (a.size() != b.size())
diff --git a/JavaScriptCore/wtf/HashSet.h b/JavaScriptCore/wtf/HashSet.h
index 0d7b4bb..4429490 100644
--- a/JavaScriptCore/wtf/HashSet.h
+++ b/JavaScriptCore/wtf/HashSet.h
@@ -224,7 +224,7 @@ namespace WTF {
{
if (it.m_impl == m_impl.end())
return;
- m_impl.checkTableConsistency();
+ m_impl.internalCheckTableConsistency();
m_impl.removeWithoutEntryConsistencyCheck(it.m_impl);
}
diff --git a/JavaScriptCore/wtf/HashTable.h b/JavaScriptCore/wtf/HashTable.h
index 3b283f8..f1473e3 100644
--- a/JavaScriptCore/wtf/HashTable.h
+++ b/JavaScriptCore/wtf/HashTable.h
@@ -30,6 +30,7 @@
namespace WTF {
#define DUMP_HASHTABLE_STATS 0
+// Enables internal WTF consistency checks that are invoked automatically. Non-WTF callers can call checkTableConsistency() even if internal checks are disabled.
#define CHECK_HASHTABLE_CONSISTENCY 0
#ifdef NDEBUG
@@ -197,7 +198,7 @@ namespace WTF {
void checkValidity(const const_iterator& other) const
{
ASSERT(m_table);
- ASSERT(other.m_table);
+ ASSERT_UNUSED(other, other.m_table);
ASSERT(m_table == other.m_table);
}
#else
@@ -340,11 +341,18 @@ namespace WTF {
ValueType* lookup(const Key& key) { return lookup<Key, IdentityTranslatorType>(key); }
template<typename T, typename HashTranslator> ValueType* lookup(const T&);
-#if CHECK_HASHTABLE_CONSISTENCY
+#if !ASSERT_DISABLED
void checkTableConsistency() const;
#else
static void checkTableConsistency() { }
#endif
+#if CHECK_HASHTABLE_CONSISTENCY
+ void internalCheckTableConsistency() const { checkTableConsistency(); }
+ void internalCheckTableConsistencyExceptSize() const { checkTableConsistencyExceptSize(); }
+#else
+ static void internalCheckTableConsistencyExceptSize() { }
+ static void internalCheckTableConsistency() { }
+#endif
private:
static ValueType* allocateTable(int size);
@@ -383,7 +391,7 @@ namespace WTF {
iterator makeKnownGoodIterator(ValueType* pos) { return iterator(this, pos, m_table + m_tableSize, HashItemKnownGood); }
const_iterator makeKnownGoodConstIterator(ValueType* pos) const { return const_iterator(this, pos, m_table + m_tableSize, HashItemKnownGood); }
-#if CHECK_HASHTABLE_CONSISTENCY
+#if !ASSERT_DISABLED
void checkTableConsistencyExceptSize() const;
#else
static void checkTableConsistencyExceptSize() { }
@@ -624,7 +632,7 @@ namespace WTF {
if (!m_table)
expand();
- checkTableConsistency();
+ internalCheckTableConsistency();
ASSERT(m_table);
@@ -693,7 +701,7 @@ namespace WTF {
return p;
}
- checkTableConsistency();
+ internalCheckTableConsistency();
return std::make_pair(makeKnownGoodIterator(entry), true);
}
@@ -709,7 +717,7 @@ namespace WTF {
if (!m_table)
expand();
- checkTableConsistency();
+ internalCheckTableConsistency();
FullLookupType lookupResult = fullLookupForWriting<T, HashTranslator>(key);
@@ -738,7 +746,7 @@ namespace WTF {
return p;
}
- checkTableConsistency();
+ internalCheckTableConsistency();
return std::make_pair(makeKnownGoodIterator(entry), true);
}
@@ -805,7 +813,7 @@ namespace WTF {
void HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::removeAndInvalidate(ValueType* pos)
{
invalidateIterators();
- checkTableConsistency();
+ internalCheckTableConsistency();
remove(pos);
}
@@ -823,7 +831,7 @@ namespace WTF {
if (shouldShrink())
shrink();
- checkTableConsistency();
+ internalCheckTableConsistency();
}
template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits>
@@ -892,7 +900,7 @@ namespace WTF {
template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits>
void HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::rehash(int newTableSize)
{
- checkTableConsistencyExceptSize();
+ internalCheckTableConsistencyExceptSize();
int oldTableSize = m_tableSize;
ValueType* oldTable = m_table;
@@ -914,7 +922,7 @@ namespace WTF {
deallocateTable(oldTable, oldTableSize);
- checkTableConsistency();
+ internalCheckTableConsistency();
}
template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits>
@@ -981,13 +989,13 @@ namespace WTF {
return *this;
}
-#if CHECK_HASHTABLE_CONSISTENCY
+#if !ASSERT_DISABLED
template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits>
void HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::checkTableConsistency() const
{
checkTableConsistencyExceptSize();
- ASSERT(!shouldExpand());
+ ASSERT(!m_table || !shouldExpand());
ASSERT(!shouldShrink());
}
@@ -1012,6 +1020,8 @@ namespace WTF {
const_iterator it = find(Extractor::extract(*entry));
ASSERT(entry == it.m_position);
++count;
+
+ KeyTraits::checkValueConsistency(it->first);
}
ASSERT(count == m_keyCount);
@@ -1021,7 +1031,7 @@ namespace WTF {
ASSERT(m_tableSize == m_tableSizeMask + 1);
}
-#endif // CHECK_HASHTABLE_CONSISTENCY
+#endif // ASSERT_DISABLED
#if CHECK_HASHTABLE_ITERATORS
diff --git a/JavaScriptCore/wtf/HashTraits.h b/JavaScriptCore/wtf/HashTraits.h
index c8d40f7..96ecac9 100644
--- a/JavaScriptCore/wtf/HashTraits.h
+++ b/JavaScriptCore/wtf/HashTraits.h
@@ -26,6 +26,13 @@
#include <utility>
#include <limits>
+// For malloc_size and _msize.
+#if OS(DARWIN)
+#include <malloc/malloc.h>
+#elif COMPILER(MSVC)
+#include <malloc.h>
+#endif
+
namespace WTF {
using std::pair;
@@ -51,6 +58,7 @@ namespace WTF {
template<typename T> struct GenericHashTraits : GenericHashTraitsBase<IsInteger<T>::value, T> {
typedef T TraitType;
static T emptyValue() { return T(); }
+ static void checkValueConsistency(const T&) { }
};
template<typename T> struct HashTraits : GenericHashTraits<T> { };
@@ -79,6 +87,19 @@ namespace WTF {
static const bool needsDestruction = false;
static void constructDeletedValue(P*& slot) { slot = reinterpret_cast<P*>(-1); }
static bool isDeletedValue(P* value) { return value == reinterpret_cast<P*>(-1); }
+#if !ASSERT_DISABLED
+ static void checkValueConsistency(const P* p)
+ {
+#if (defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC) || !defined(NDEBUG)
+#if OS(DARWIN)
+ ASSERT(malloc_size(p));
+#elif COMPILER(MSVC)
+ ASSERT(_msize(const_cast<P*>(p)));
+#endif
+#endif
+ HashTraits<P>::checkValueConsistency(*p);
+ }
+#endif
};
template<typename P> struct HashTraits<RefPtr<P> > : GenericHashTraits<RefPtr<P> > {
diff --git a/JavaScriptCore/wtf/MathExtras.h b/JavaScriptCore/wtf/MathExtras.h
index ee2110e..a18949e 100644
--- a/JavaScriptCore/wtf/MathExtras.h
+++ b/JavaScriptCore/wtf/MathExtras.h
@@ -30,17 +30,17 @@
#include <math.h>
#include <stdlib.h>
-#if PLATFORM(SOLARIS)
+#if OS(SOLARIS)
#include <ieeefp.h>
#endif
-#if PLATFORM(OPENBSD)
+#if OS(OPENBSD)
#include <sys/types.h>
#include <machine/ieee.h>
#endif
#if COMPILER(MSVC)
-#if PLATFORM(WINCE)
+#if OS(WINCE)
#include <stdlib.h>
#endif
#include <limits>
@@ -62,7 +62,7 @@ const double piOverFourDouble = M_PI_4;
const float piOverFourFloat = static_cast<float>(M_PI_4);
#endif
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
// Work around a bug in the Mac OS X libc where ceil(-0.1) return +0.
inline double wtf_ceil(double x) { return copysign(ceil(x), x); }
@@ -71,7 +71,7 @@ inline double wtf_ceil(double x) { return copysign(ceil(x), x); }
#endif
-#if PLATFORM(SOLARIS)
+#if OS(SOLARIS)
#ifndef isfinite
inline bool isfinite(double x) { return finite(x) && !isnand(x); }
@@ -85,7 +85,7 @@ inline bool signbit(double x) { return x < 0.0; } // FIXME: Wrong for negative 0
#endif
-#if PLATFORM(OPENBSD)
+#if OS(OPENBSD)
#ifndef isfinite
inline bool isfinite(double x) { return finite(x); }
@@ -98,12 +98,25 @@ inline bool signbit(double x) { struct ieee_double *p = (struct ieee_double *)&x
#if COMPILER(MSVC) || COMPILER(RVCT)
-inline long long llround(double num) { return static_cast<long long>(num > 0 ? num + 0.5 : ceil(num - 0.5)); }
-inline long long llroundf(float num) { return static_cast<long long>(num > 0 ? num + 0.5f : ceil(num - 0.5f)); }
-inline long lround(double num) { return static_cast<long>(num > 0 ? num + 0.5 : ceil(num - 0.5)); }
-inline long lroundf(float num) { return static_cast<long>(num > 0 ? num + 0.5f : ceilf(num - 0.5f)); }
-inline double round(double num) { return num > 0 ? floor(num + 0.5) : ceil(num - 0.5); }
-inline float roundf(float num) { return num > 0 ? floorf(num + 0.5f) : ceilf(num - 0.5f); }
+// We must not do 'num + 0.5' or 'num - 0.5' because they can cause precision loss.
+static double round(double num)
+{
+ double integer = ceil(num);
+ if (num > 0)
+ return integer - num > 0.5 ? integer - 1.0 : integer;
+ return integer - num >= 0.5 ? integer - 1.0 : integer;
+}
+static float roundf(float num)
+{
+ float integer = ceilf(num);
+ if (num > 0)
+ return integer - num > 0.5f ? integer - 1.0f : integer;
+ return integer - num >= 0.5f ? integer - 1.0f : integer;
+}
+inline long long llround(double num) { return static_cast<long long>(round(num)); }
+inline long long llroundf(float num) { return static_cast<long long>(roundf(num)); }
+inline long lround(double num) { return static_cast<long>(round(num)); }
+inline long lroundf(float num) { return static_cast<long>(roundf(num)); }
inline double trunc(double num) { return num > 0 ? floor(num) : ceil(num); }
#endif
diff --git a/JavaScriptCore/wtf/Platform.h b/JavaScriptCore/wtf/Platform.h
index 960b253..5bc9658 100644
--- a/JavaScriptCore/wtf/Platform.h
+++ b/JavaScriptCore/wtf/Platform.h
@@ -27,118 +27,377 @@
#ifndef WTF_Platform_h
#define WTF_Platform_h
-/* PLATFORM handles OS, operating environment, graphics API, and CPU */
+/* ==== PLATFORM handles OS, operating environment, graphics API, and
+ CPU. This macro will be phased out in favor of platform adaptation
+ macros, policy decision macros, and top-level port definitions. ==== */
#define PLATFORM(WTF_FEATURE) (defined WTF_PLATFORM_##WTF_FEATURE && WTF_PLATFORM_##WTF_FEATURE)
+
+
+/* ==== Platform adaptation macros: these describe properties of the target environment. ==== */
+
+/* COMPILER() - the compiler being used to build the project */
#define COMPILER(WTF_FEATURE) (defined WTF_COMPILER_##WTF_FEATURE && WTF_COMPILER_##WTF_FEATURE)
+/* CPU() - the target CPU architecture */
+#define CPU(WTF_FEATURE) (defined WTF_CPU_##WTF_FEATURE && WTF_CPU_##WTF_FEATURE)
+/* HAVE() - specific system features (headers, functions or similar) that are present or not */
#define HAVE(WTF_FEATURE) (defined HAVE_##WTF_FEATURE && HAVE_##WTF_FEATURE)
+/* OS() - underlying operating system; only to be used for mandated low-level services like
+ virtual memory, not to choose a GUI toolkit */
+#define OS(WTF_FEATURE) (defined WTF_OS_##WTF_FEATURE && WTF_OS_##WTF_FEATURE)
+
+
+/* ==== Policy decision macros: these define policy choices for a particular port. ==== */
+
+/* USE() - use a particular third-party library or optional OS service */
#define USE(WTF_FEATURE) (defined WTF_USE_##WTF_FEATURE && WTF_USE_##WTF_FEATURE)
+/* ENABLE() - turn on a specific feature of WebKit */
#define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE)
-/* Operating systems - low-level dependencies */
-/* PLATFORM(DARWIN) */
-/* Operating system level dependencies for Mac OS X / Darwin that should */
-/* be used regardless of operating environment */
+
+/* ==== COMPILER() - the compiler being used to build the project ==== */
+
+/* COMPILER(MSVC) Microsoft Visual C++ */
+/* COMPILER(MSVC7) Microsoft Visual C++ v7 or lower*/
+#if defined(_MSC_VER)
+#define WTF_COMPILER_MSVC 1
+#if _MSC_VER < 1400
+#define WTF_COMPILER_MSVC7 1
+#endif
+#endif
+
+/* COMPILER(RVCT) - ARM RealView Compilation Tools */
+#if defined(__CC_ARM) || defined(__ARMCC__)
+#define WTF_COMPILER_RVCT 1
+#endif
+
+/* COMPILER(GCC) - GNU Compiler Collection */
+/* --gnu option of the RVCT compiler also defines __GNUC__ */
+#if defined(__GNUC__) && !COMPILER(RVCT)
+#define WTF_COMPILER_GCC 1
+#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
+#endif
+
+/* COMPILER(MINGW) - MinGW GCC */
+#if defined(MINGW) || defined(__MINGW32__)
+#define WTF_COMPILER_MINGW 1
+#endif
+
+/* COMPILER(WINSCW) - CodeWarrior for Symbian emulator */
+#if defined(__WINSCW__)
+#define WTF_COMPILER_WINSCW 1
+#endif
+
+
+
+/* ==== CPU() - the target CPU architecture ==== */
+
+/* This also defines CPU(BIG_ENDIAN) or CPU(MIDDLE_ENDIAN) or neither, as appropriate. */
+
+/* CPU(ALPHA) - DEC Alpha */
+#if defined(__alpha__)
+#define WTF_CPU_ALPHA 1
+#endif
+
+/* CPU(IA64) - Itanium / IA-64 */
+#if defined(__ia64__)
+#define WTF_CPU_IA64 1
+#endif
+
+/* CPU(PPC) - PowerPC 32-bit */
+#if defined(__ppc__) \
+ || defined(__PPC__) \
+ || defined(__powerpc__) \
+ || defined(__powerpc) \
+ || defined(__POWERPC__) \
+ || defined(_M_PPC) \
+ || defined(__PPC)
+#define WTF_CPU_PPC 1
+#define WTF_CPU_BIG_ENDIAN 1
+#endif
+
+/* CPU(PPC64) - PowerPC 64-bit */
+#if defined(__ppc64__) \
+ || defined(__PPC64__)
+#define WTF_CPU_PPC64 1
+#define WTF_CPU_BIG_ENDIAN 1
+#endif
+
+/* CPU(SH4) - SuperH SH-4 */
+#if defined(__SH4__)
+#define WTF_CPU_SH4 1
+#endif
+
+/* CPU(SPARC32) - SPARC 32-bit */
+#if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8)
+#define WTF_CPU_SPARC32 1
+#define WTF_CPU_BIG_ENDIAN 1
+#endif
+
+/* CPU(SPARC64) - SPARC 64-bit */
+#if defined(__sparc__) && defined(__arch64__) || defined (__sparcv9)
+#define WTF_CPU_SPARC64 1
+#define WTF_CPU_BIG_ENDIAN 1
+#endif
+
+/* CPU(SPARC) - any SPARC, true for CPU(SPARC32) and CPU(SPARC64) */
+#if CPU(SPARC32) || CPU(SPARC64)
+#define WTF_CPU_SPARC
+#endif
+
+/* CPU(X86) - i386 / x86 32-bit */
+#if defined(__i386__) \
+ || defined(i386) \
+ || defined(_M_IX86) \
+ || defined(_X86_) \
+ || defined(__THW_INTEL)
+#define WTF_CPU_X86 1
+#endif
+
+/* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */
+#if defined(__x86_64__) \
+ || defined(_M_X64)
+#define WTF_CPU_X86_64 1
+#endif
+
+/* CPU(ARM) - ARM, any version*/
+#if defined(arm) \
+ || defined(__arm__)
+#define WTF_CPU_ARM 1
+
+#if defined(__ARMEB__)
+#define WTF_CPU_BIG_ENDIAN 1
+
+#elif !defined(__ARM_EABI__) \
+ && !defined(__EABI__) \
+ && !defined(__VFP_FP__) \
+ && !defined(ANDROID)
+#define WTF_CPU_MIDDLE_ENDIAN 1
+
+#endif
+
+#define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && WTF_ARM_ARCH_VERSION >= N)
+
+/* Set WTF_ARM_ARCH_VERSION */
+#if defined(__ARM_ARCH_4__) \
+ || defined(__ARM_ARCH_4T__) \
+ || defined(__MARM_ARMV4__) \
+ || defined(_ARMV4I_)
+#define WTF_ARM_ARCH_VERSION 4
+
+#elif defined(__ARM_ARCH_5__) \
+ || defined(__ARM_ARCH_5T__) \
+ || defined(__ARM_ARCH_5E__) \
+ || defined(__ARM_ARCH_5TE__) \
+ || defined(__ARM_ARCH_5TEJ__) \
+ || defined(__MARM_ARMV5__)
+#define WTF_ARM_ARCH_VERSION 5
+
+#elif defined(__ARM_ARCH_6__) \
+ || defined(__ARM_ARCH_6J__) \
+ || defined(__ARM_ARCH_6K__) \
+ || defined(__ARM_ARCH_6Z__) \
+ || defined(__ARM_ARCH_6ZK__) \
+ || defined(__ARM_ARCH_6T2__) \
+ || defined(__ARMV6__)
+#define WTF_ARM_ARCH_VERSION 6
+
+#elif defined(__ARM_ARCH_7A__) \
+ || defined(__ARM_ARCH_7R__)
+#define WTF_ARM_ARCH_VERSION 7
+
+/* RVCT sets _TARGET_ARCH_ARM */
+#elif defined(__TARGET_ARCH_ARM)
+#define WTF_ARM_ARCH_VERSION __TARGET_ARCH_ARM
+
+#else
+#define WTF_ARM_ARCH_VERSION 0
+
+#endif
+
+/* Set WTF_THUMB_ARCH_VERSION */
+#if defined(__ARM_ARCH_4T__)
+#define WTF_THUMB_ARCH_VERSION 1
+
+#elif defined(__ARM_ARCH_5T__) \
+ || defined(__ARM_ARCH_5TE__) \
+ || defined(__ARM_ARCH_5TEJ__)
+#define WTF_THUMB_ARCH_VERSION 2
+
+#elif defined(__ARM_ARCH_6J__) \
+ || defined(__ARM_ARCH_6K__) \
+ || defined(__ARM_ARCH_6Z__) \
+ || defined(__ARM_ARCH_6ZK__) \
+ || defined(__ARM_ARCH_6M__)
+#define WTF_THUMB_ARCH_VERSION 3
+
+#elif defined(__ARM_ARCH_6T2__) \
+ || defined(__ARM_ARCH_7__) \
+ || defined(__ARM_ARCH_7A__) \
+ || defined(__ARM_ARCH_7R__) \
+ || defined(__ARM_ARCH_7M__)
+#define WTF_THUMB_ARCH_VERSION 4
+
+/* RVCT sets __TARGET_ARCH_THUMB */
+#elif defined(__TARGET_ARCH_THUMB)
+#define WTF_THUMB_ARCH_VERSION __TARGET_ARCH_THUMB
+
+#else
+#define WTF_THUMB_ARCH_VERSION 0
+#endif
+
+
+/* CPU(ARMV5_OR_LOWER) - ARM instruction set v5 or earlier */
+/* On ARMv5 and below the natural alignment is required.
+ And there are some other differences for v5 or earlier. */
+#if !defined(ARMV5_OR_LOWER) && !WTF_ARM_ARCH_AT_LEAST(6)
+#define WTF_CPU_ARMV5_OR_LOWER 1
+#endif
+
+
+/* CPU(ARM_TRADITIONAL) - Thumb2 is not available, only traditional ARM (v4 or greater) */
+/* CPU(ARM_THUMB2) - Thumb2 instruction set is available */
+/* Only one of these will be defined. */
+#if !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2)
+# if defined(thumb2) || defined(__thumb2__) \
+ || ((defined(__thumb) || defined(__thumb__)) && WTF_THUMB_ARCH_VERSION == 4)
+# define WTF_CPU_ARM_TRADITIONAL 0
+# define WTF_CPU_ARM_THUMB2 1
+# elif WTF_ARM_ARCH_AT_LEAST(4)
+# define WTF_CPU_ARM_TRADITIONAL 1
+# define WTF_CPU_ARM_THUMB2 0
+# else
+# error "Not supported ARM architecture"
+# endif
+#elif CPU(ARM_TRADITIONAL) && CPU(ARM_THUMB2) /* Sanity Check */
+# error "Cannot use both of WTF_CPU_ARM_TRADITIONAL and WTF_CPU_ARM_THUMB2 platforms"
+#endif /* !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2) */
+
+#endif /* ARM */
+
+
+
+/* ==== OS() - underlying operating system; only to be used for mandated low-level services like
+ virtual memory, not to choose a GUI toolkit ==== */
+
+/* OS(ANDROID) - Android */
+#ifdef ANDROID
+#define WTF_OS_ANDROID 1
+#endif
+
+/* OS(AIX) - AIX */
+#ifdef _AIX
+#define WTF_OS_AIX 1
+#endif
+
+/* OS(DARWIN) - Any Darwin-based OS, including Mac OS X and iPhone OS */
#ifdef __APPLE__
-#define WTF_PLATFORM_DARWIN 1
+#define WTF_OS_DARWIN 1
+
+/* FIXME: BUILDING_ON_.., and TARGETING... macros should be folded into the OS() system */
#include <AvailabilityMacros.h>
#if !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
#define BUILDING_ON_TIGER 1
#elif !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
#define BUILDING_ON_LEOPARD 1
+#elif !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
+#define BUILDING_ON_SNOW_LEOPARD 1
#endif
#if !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
#define TARGETING_TIGER 1
#elif !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6
#define TARGETING_LEOPARD 1
+#elif !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7
+#define TARGETING_SNOW_LEOPARD 1
#endif
#include <TargetConditionals.h>
+
#endif
-/* PLATFORM(WIN_OS) */
-/* Operating system level dependencies for Windows that should be used */
-/* regardless of operating environment */
-#if defined(WIN32) || defined(_WIN32)
-#define WTF_PLATFORM_WIN_OS 1
+/* OS(IPHONE_OS) - iPhone OS */
+/* OS(MAC_OS_X) - Mac OS X (not including iPhone OS) */
+#if OS(DARWIN) && ((defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED) \
+ || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) \
+ || (defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR))
+#define WTF_OS_IPHONE_OS 1
+#elif OS(DARWIN) && defined(TARGET_OS_MAC) && TARGET_OS_MAC
+#define WTF_OS_MAC_OS_X 1
#endif
-/* PLATFORM(WINCE) */
-/* Operating system level dependencies for Windows CE that should be used */
-/* regardless of operating environment */
-/* Note that for this platform PLATFORM(WIN_OS) is also defined. */
-#if defined(_WIN32_WCE)
-#define WTF_PLATFORM_WINCE 1
+/* OS(FREEBSD) - FreeBSD */
+#ifdef __FreeBSD__
+#define WTF_OS_FREEBSD 1
#endif
-/* PLATFORM(LINUX) */
-/* Operating system level dependencies for Linux-like systems that */
-/* should be used regardless of operating environment */
+/* OS(HAIKU) - Haiku */
+#ifdef __HAIKU__
+#define WTF_OS_HAIKU 1
+#endif
+
+/* OS(LINUX) - Linux */
#ifdef __linux__
-#define WTF_PLATFORM_LINUX 1
+#define WTF_OS_LINUX 1
#endif
-/* PLATFORM(FREEBSD) */
-/* Operating system level dependencies for FreeBSD-like systems that */
-/* should be used regardless of operating environment */
-#ifdef __FreeBSD__
-#define WTF_PLATFORM_FREEBSD 1
+/* OS(NETBSD) - NetBSD */
+#if defined(__NetBSD__)
+#define WTF_PLATFORM_NETBSD 1
#endif
-/* PLATFORM(OPENBSD) */
-/* Operating system level dependencies for OpenBSD systems that */
-/* should be used regardless of operating environment */
+/* OS(OPENBSD) - OpenBSD */
#ifdef __OpenBSD__
-#define WTF_PLATFORM_OPENBSD 1
+#define WTF_OS_OPENBSD 1
#endif
-/* PLATFORM(SOLARIS) */
-/* Operating system level dependencies for Solaris that should be used */
-/* regardless of operating environment */
-#if defined(sun) || defined(__sun)
-#define WTF_PLATFORM_SOLARIS 1
+/* OS(QNX) - QNX */
+#if defined(__QNXNTO__)
+#define WTF_OS_QNX 1
#endif
-#if defined (__SYMBIAN32__)
-/* we are cross-compiling, it is not really windows */
-#undef WTF_PLATFORM_WIN_OS
-#undef WTF_PLATFORM_WIN
-#define WTF_PLATFORM_SYMBIAN 1
+/* OS(SOLARIS) - Solaris */
+#if defined(sun) || defined(__sun)
+#define WTF_OS_SOLARIS 1
#endif
+/* OS(WINCE) - Windows CE; note that for this platform OS(WINDOWS) is also defined */
+#if defined(_WIN32_WCE)
+#define WTF_OS_WINCE 1
+#endif
-/* PLATFORM(NETBSD) */
-/* Operating system level dependencies for NetBSD that should be used */
-/* regardless of operating environment */
-#if defined(__NetBSD__)
-#define WTF_PLATFORM_NETBSD 1
+/* OS(WINDOWS) - Any version of Windows */
+#if defined(WIN32) || defined(_WIN32)
+#define WTF_OS_WINDOWS 1
#endif
-/* PLATFORM(QNX) */
-/* Operating system level dependencies for QNX that should be used */
-/* regardless of operating environment */
-#if defined(__QNXNTO__)
-#define WTF_PLATFORM_QNX 1
-#endif
-
-/* PLATFORM(UNIX) */
-/* Operating system level dependencies for Unix-like systems that */
-/* should be used regardless of operating environment */
-#if PLATFORM(DARWIN) \
- || PLATFORM(FREEBSD) \
- || PLATFORM(SYMBIAN) \
- || PLATFORM(NETBSD) \
- || defined(unix) \
- || defined(__unix) \
- || defined(__unix__) \
- || defined(_AIX) \
- || defined(__HAIKU__) \
- || defined(__QNXNTO__) \
- || defined(ANDROID)
-#define WTF_PLATFORM_UNIX 1
+/* OS(SYMBIAN) - Symbian */
+#if defined (__SYMBIAN32__)
+/* we are cross-compiling, it is not really windows */
+#undef WTF_OS_WINDOWS
+#undef WTF_PLATFORM_WIN
+#define WTF_OS_SYMBIAN 1
+#endif
+
+/* OS(UNIX) - Any Unix-like system */
+#if OS(AIX) \
+ || OS(ANDROID) \
+ || OS(DARWIN) \
+ || OS(FREEBSD) \
+ || OS(HAIKU) \
+ || OS(LINUX) \
+ || OS(NETBSD) \
+ || OS(OPENBSD) \
+ || OS(QNX) \
+ || OS(SOLARIS) \
+ || OS(SYMBIAN) \
+ || defined(unix) \
+ || defined(__unix) \
+ || defined(__unix__)
+#define WTF_OS_UNIX 1
#endif
/* Operating environments */
+/* FIXME: these are all mixes of OS, operating environment and policy choices. */
/* PLATFORM(CHROMIUM) */
/* PLATFORM(QT) */
/* PLATFORM(WX) */
@@ -156,13 +415,14 @@
#define WTF_PLATFORM_GTK 1
#elif defined(BUILDING_HAIKU__)
#define WTF_PLATFORM_HAIKU 1
-#elif PLATFORM(DARWIN)
+#elif OS(DARWIN)
#define WTF_PLATFORM_MAC 1
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
#define WTF_PLATFORM_WIN 1
#endif
/* PLATFORM(IPHONE) */
+/* FIXME: this is sometimes used as an OS switch and sometimes for higher-level things */
#if (defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
#define WTF_PLATFORM_IPHONE 1
#endif
@@ -180,6 +440,8 @@
#endif
/* PLATFORM(ANDROID) */
+/* FIXME: this is sometimes used as an OS() switch, and other times to drive
+ policy choices */
#if defined(ANDROID)
#define WTF_PLATFORM_ANDROID 1
#endif
@@ -196,202 +458,28 @@
/* PLATFORM(SKIA) for Win/Linux, CG/CI for Mac */
#if PLATFORM(CHROMIUM)
-#if PLATFORM(DARWIN)
+#define ENABLE_HISTORY_ALWAYS_ASYNC 1
+#if OS(DARWIN)
#define WTF_PLATFORM_CG 1
#define WTF_PLATFORM_CI 1
#define WTF_USE_ATSUI 1
+#define WTF_USE_CORE_TEXT 1
#else
#define WTF_PLATFORM_SKIA 1
#endif
#endif
-/* Makes PLATFORM(WIN) default to PLATFORM(CAIRO) */
-/* FIXME: This should be changed from a blacklist to a whitelist */
-#if !PLATFORM(MAC) && !PLATFORM(QT) && !PLATFORM(WX) && !PLATFORM(CHROMIUM) && !PLATFORM(WINCE) && !PLATFORM(HAIKU) && !PLATFORM(ANDROID)
+#if PLATFORM(GTK)
#define WTF_PLATFORM_CAIRO 1
#endif
-/* CPU */
-
-/* PLATFORM(PPC) */
-#if defined(__ppc__) \
- || defined(__PPC__) \
- || defined(__powerpc__) \
- || defined(__powerpc) \
- || defined(__POWERPC__) \
- || defined(_M_PPC) \
- || defined(__PPC)
-#define WTF_PLATFORM_PPC 1
-#define WTF_PLATFORM_BIG_ENDIAN 1
-#endif
-
-/* PLATFORM(SPARC32) */
-#if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8)
-#define WTF_PLATFORM_SPARC32 1
-#define WTF_PLATFORM_BIG_ENDIAN 1
-#endif
-
-#if PLATFORM(SPARC32) || PLATFORM(SPARC64)
-#define WTF_PLATFORM_SPARC
-#endif
-
-/* PLATFORM(PPC64) */
-#if defined(__ppc64__) \
- || defined(__PPC64__)
-#define WTF_PLATFORM_PPC64 1
-#define WTF_PLATFORM_BIG_ENDIAN 1
-#endif
-
-/* PLATFORM(ARM) */
-#define PLATFORM_ARM_ARCH(N) (PLATFORM(ARM) && ARM_ARCH_VERSION >= N)
-
-#if defined(arm) \
- || defined(__arm__)
-#define WTF_PLATFORM_ARM 1
-
-#if defined(__ARMEB__)
-#define WTF_PLATFORM_BIG_ENDIAN 1
-
-#elif !defined(__ARM_EABI__) \
- && !defined(__EABI__) \
- && !defined(__VFP_FP__) \
- && !defined(ANDROID)
-#define WTF_PLATFORM_MIDDLE_ENDIAN 1
-
-#endif
-
-/* Set ARM_ARCH_VERSION */
-#if defined(__ARM_ARCH_4__) \
- || defined(__ARM_ARCH_4T__) \
- || defined(__MARM_ARMV4__) \
- || defined(_ARMV4I_)
-#define ARM_ARCH_VERSION 4
-
-#elif defined(__ARM_ARCH_5__) \
- || defined(__ARM_ARCH_5T__) \
- || defined(__ARM_ARCH_5E__) \
- || defined(__ARM_ARCH_5TE__) \
- || defined(__ARM_ARCH_5TEJ__) \
- || defined(__MARM_ARMV5__)
-#define ARM_ARCH_VERSION 5
-
-#elif defined(__ARM_ARCH_6__) \
- || defined(__ARM_ARCH_6J__) \
- || defined(__ARM_ARCH_6K__) \
- || defined(__ARM_ARCH_6Z__) \
- || defined(__ARM_ARCH_6ZK__) \
- || defined(__ARM_ARCH_6T2__) \
- || defined(__ARMV6__)
-#define ARM_ARCH_VERSION 6
-
-#elif defined(__ARM_ARCH_7A__) \
- || defined(__ARM_ARCH_7R__)
-#define ARM_ARCH_VERSION 7
-
-/* RVCT sets _TARGET_ARCH_ARM */
-#elif defined(__TARGET_ARCH_ARM)
-#define ARM_ARCH_VERSION __TARGET_ARCH_ARM
-
-#else
-#define ARM_ARCH_VERSION 0
-
-#endif
-
-/* Set THUMB_ARM_VERSION */
-#if defined(__ARM_ARCH_4T__)
-#define THUMB_ARCH_VERSION 1
-
-#elif defined(__ARM_ARCH_5T__) \
- || defined(__ARM_ARCH_5TE__) \
- || defined(__ARM_ARCH_5TEJ__)
-#define THUMB_ARCH_VERSION 2
-
-#elif defined(__ARM_ARCH_6J__) \
- || defined(__ARM_ARCH_6K__) \
- || defined(__ARM_ARCH_6Z__) \
- || defined(__ARM_ARCH_6ZK__) \
- || defined(__ARM_ARCH_6M__)
-#define THUMB_ARCH_VERSION 3
-
-#elif defined(__ARM_ARCH_6T2__) \
- || defined(__ARM_ARCH_7__) \
- || defined(__ARM_ARCH_7A__) \
- || defined(__ARM_ARCH_7R__) \
- || defined(__ARM_ARCH_7M__)
-#define THUMB_ARCH_VERSION 4
-
-/* RVCT sets __TARGET_ARCH_THUMB */
-#elif defined(__TARGET_ARCH_THUMB)
-#define THUMB_ARCH_VERSION __TARGET_ARCH_THUMB
-
-#else
-#define THUMB_ARCH_VERSION 0
-#endif
-/* On ARMv5 and below the natural alignment is required. */
-#if !defined(ARM_REQUIRE_NATURAL_ALIGNMENT) && ARM_ARCH_VERSION <= 5
-#define ARM_REQUIRE_NATURAL_ALIGNMENT 1
-#endif
-
-/* Defines two pseudo-platforms for ARM and Thumb-2 instruction set. */
-#if !defined(WTF_PLATFORM_ARM_TRADITIONAL) && !defined(WTF_PLATFORM_ARM_THUMB2)
-# if defined(thumb2) || defined(__thumb2__) \
- || ((defined(__thumb) || defined(__thumb__)) && THUMB_ARCH_VERSION == 4)
-# define WTF_PLATFORM_ARM_TRADITIONAL 0
-# define WTF_PLATFORM_ARM_THUMB2 1
-# elif PLATFORM_ARM_ARCH(4)
-# define WTF_PLATFORM_ARM_TRADITIONAL 1
-# define WTF_PLATFORM_ARM_THUMB2 0
-# else
-# error "Not supported ARM architecture"
-# endif
-#elif PLATFORM(ARM_TRADITIONAL) && PLATFORM(ARM_THUMB2) /* Sanity Check */
-# error "Cannot use both of WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2 platforms"
-#endif // !defined(ARM_TRADITIONAL) && !defined(ARM_THUMB2)
-#endif /* ARM */
-
-/* PLATFORM(X86) */
-#if defined(__i386__) \
- || defined(i386) \
- || defined(_M_IX86) \
- || defined(_X86_) \
- || defined(__THW_INTEL)
-#define WTF_PLATFORM_X86 1
-#endif
-
-/* PLATFORM(X86_64) */
-#if defined(__x86_64__) \
- || defined(_M_X64)
-#define WTF_PLATFORM_X86_64 1
-#endif
-
-/* PLATFORM(IA64) */
-#if defined(__ia64__)
-#define WTF_PLATFORM_IA64 1
-#endif
-
-/* PLATFORM(ALPHA) */
-#if defined(__alpha__)
-#define WTF_PLATFORM_ALPHA 1
-#endif
-
-/* PLATFORM(SH4) */
-#if defined(__SH4__)
-#define WTF_PLATFORM_SH4 1
-#endif
-
-/* PLATFORM(SPARC64) */
-#if defined(__sparc__) && defined(__arch64__) || defined (__sparcv9)
-#define WTF_PLATFORM_SPARC64 1
-#define WTF_PLATFORM_BIG_ENDIAN 1
-#endif
-
-/* PLATFORM(WINCE) && PLATFORM(QT)
+/* OS(WINCE) && PLATFORM(QT)
We can not determine the endianess at compile time. For
Qt for Windows CE the endianess is specified in the
device specific makespec
*/
-#if PLATFORM(WINCE) && PLATFORM(QT)
+#if OS(WINCE) && PLATFORM(QT)
# include <QtGlobal>
# undef WTF_PLATFORM_BIG_ENDIAN
# undef WTF_PLATFORM_MIDDLE_ENDIAN
@@ -402,60 +490,16 @@
# include <ce_time.h>
#endif
-/* Compiler */
-
-/* COMPILER(MSVC) */
-#if defined(_MSC_VER)
-#define WTF_COMPILER_MSVC 1
-#if _MSC_VER < 1400
-#define WTF_COMPILER_MSVC7 1
-#endif
-#endif
-
-/* COMPILER(RVCT) */
-#if defined(__CC_ARM) || defined(__ARMCC__)
-#define WTF_COMPILER_RVCT 1
-#endif
-
-/* COMPILER(GCC) */
-/* --gnu option of the RVCT compiler also defines __GNUC__ */
-#if defined(__GNUC__) && !COMPILER(RVCT)
-#define WTF_COMPILER_GCC 1
-#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
-#endif
-
-/* COMPILER(MINGW) */
-#if defined(MINGW) || defined(__MINGW32__)
-#define WTF_COMPILER_MINGW 1
-#endif
-
-/* COMPILER(BORLAND) */
-/* not really fully supported - is this relevant any more? */
-#if defined(__BORLANDC__)
-#define WTF_COMPILER_BORLAND 1
-#endif
-
-/* COMPILER(CYGWIN) */
-/* not really fully supported - is this relevant any more? */
-#if defined(__CYGWIN__)
-#define WTF_COMPILER_CYGWIN 1
-#endif
-
-/* COMPILER(WINSCW) */
-#if defined(__WINSCW__)
-#define WTF_COMPILER_WINSCW 1
-#endif
-
-#if (PLATFORM(IPHONE) || PLATFORM(MAC) || PLATFORM(WIN) || (PLATFORM(QT) && PLATFORM(DARWIN))) && !defined(ENABLE_JSC_MULTIPLE_THREADS)
+#if (PLATFORM(IPHONE) || PLATFORM(MAC) || PLATFORM(WIN) || (PLATFORM(QT) && OS(DARWIN) && !ENABLE(SINGLE_THREADED))) && !defined(ENABLE_JSC_MULTIPLE_THREADS)
#define ENABLE_JSC_MULTIPLE_THREADS 1
#endif
/* On Windows, use QueryPerformanceCounter by default */
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#define WTF_USE_QUERY_PERFORMANCE_COUNTER 1
#endif
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
#undef ENABLE_JSC_MULTIPLE_THREADS
#define ENABLE_JSC_MULTIPLE_THREADS 0
#define USE_SYSTEM_MALLOC 0
@@ -466,25 +510,25 @@
#define ENABLE_WML 1
#define HAVE_ACCESSIBILITY 0
-#define NOMINMAX // Windows min and max conflict with standard macros
-#define NOSHLWAPI // shlwapi.h not available on WinCe
+#define NOMINMAX /* Windows min and max conflict with standard macros */
+#define NOSHLWAPI /* shlwapi.h not available on WinCe */
-// MSDN documentation says these functions are provided with uspce.lib. But we cannot find this file.
-#define __usp10__ // disable "usp10.h"
+/* MSDN documentation says these functions are provided with uspce.lib. But we cannot find this file. */
+#define __usp10__ /* disable "usp10.h" */
-#define _INC_ASSERT // disable "assert.h"
+#define _INC_ASSERT /* disable "assert.h" */
#define assert(x)
-// _countof is only included in CE6; for CE5 we need to define it ourself
+/* _countof is only included in CE6; for CE5 we need to define it ourself */
#ifndef _countof
#define _countof(x) (sizeof(x) / sizeof((x)[0]))
#endif
-#endif /* PLATFORM(WINCE) && !PLATFORM(QT) */
+#endif /* OS(WINCE) && !PLATFORM(QT) */
#if PLATFORM(QT)
#define WTF_USE_QT4_UNICODE 1
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
#define WTF_USE_WINCE_UNICODE 1
#elif PLATFORM(GTK)
/* The GTK+ Unicode backend is configurable */
@@ -496,7 +540,7 @@
#define WTF_PLATFORM_CF 1
#define WTF_USE_PTHREADS 1
#define HAVE_PTHREAD_RWLOCK 1
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_TIGER) && defined(__x86_64__)
+#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_TIGER) && CPU(X86_64)
#define WTF_USE_PLUGIN_HOST_PROCESS 1
#endif
#if !defined(ENABLE_MAC_JAVA_BRIDGE)
@@ -509,13 +553,13 @@
#define HAVE_RUNLOOP_TIMER 1
#endif /* PLATFORM(MAC) && !PLATFORM(IPHONE) */
-#if PLATFORM(CHROMIUM) && PLATFORM(DARWIN)
+#if PLATFORM(CHROMIUM) && OS(DARWIN)
#define WTF_PLATFORM_CF 1
#define WTF_USE_PTHREADS 1
#define HAVE_PTHREAD_RWLOCK 1
#endif
-#if PLATFORM(QT) && PLATFORM(DARWIN)
+#if PLATFORM(QT) && OS(DARWIN)
#define WTF_PLATFORM_CF 1
#endif
@@ -542,8 +586,8 @@
#define USE_SYSTEM_MALLOC 1
#define ENABLE_MAC_JAVA_BRIDGE 1
#define LOG_DISABLED 1
-// Prevents Webkit from drawing the caret in textfields and textareas
-// This prevents unnecessary invals.
+/* Prevents Webkit from drawing the caret in textfields and textareas
+ This prevents unnecessary invals. */
#define ENABLE_TEXT_CARET 1
#define ENABLE_JAVASCRIPT_DEBUGGER 0
#define ENABLE_ORIENTATION_EVENTS 1
@@ -555,7 +599,7 @@
#if PLATFORM(WX)
#define ENABLE_ASSEMBLER 1
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
#define WTF_PLATFORM_CF 1
#endif
#endif
@@ -582,19 +626,19 @@
#endif
#endif /* !defined(HAVE_ACCESSIBILITY) */
-#if PLATFORM(UNIX) && !PLATFORM(SYMBIAN)
+#if OS(UNIX) && !OS(SYMBIAN)
#define HAVE_SIGNAL_H 1
#endif
-#if !PLATFORM(WIN_OS) && !PLATFORM(SOLARIS) && !PLATFORM(QNX) \
- && !PLATFORM(SYMBIAN) && !PLATFORM(HAIKU) && !COMPILER(RVCT) \
- && !PLATFORM(ANDROID)
+#if !OS(WINDOWS) && !OS(SOLARIS) && !OS(QNX) \
+ && !OS(SYMBIAN) && !OS(HAIKU) && !OS(RVCT) \
+ && !OS(ANDROID)
#define HAVE_TM_GMTOFF 1
#define HAVE_TM_ZONE 1
#define HAVE_TIMEGM 1
-#endif
+#endif
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
#define HAVE_ERRNO_H 1
#define HAVE_LANGINFO_H 1
@@ -606,26 +650,32 @@
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TIMEB_H 1
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !PLATFORM(IPHONE) && !PLATFORM(QT)
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+
+#define HAVE_DISPATCH_H 1
+
+#if !PLATFORM(IPHONE) && !PLATFORM(QT)
#define HAVE_MADV_FREE_REUSE 1
#define HAVE_MADV_FREE 1
#define HAVE_PTHREAD_SETNAME_NP 1
#endif
+#endif
+
#if PLATFORM(IPHONE)
#define HAVE_MADV_FREE 1
#endif
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
-#if PLATFORM(WINCE)
+#if OS(WINCE)
#define HAVE_ERRNO_H 0
#else
#define HAVE_SYS_TIMEB_H 1
#endif
#define HAVE_VIRTUALALLOC 1
-#elif PLATFORM(SYMBIAN)
+#elif OS(SYMBIAN)
#define HAVE_ERRNO_H 1
#define HAVE_MMAP 0
@@ -638,7 +688,7 @@
#define HAVE_SYS_PARAM_H 1
#endif
-#elif PLATFORM(QNX)
+#elif OS(QNX)
#define HAVE_ERRNO_H 1
#define HAVE_MMAP 1
@@ -647,7 +697,7 @@
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_TIME_H 1
-#elif PLATFORM(ANDROID)
+#elif OS(ANDROID)
#define HAVE_ERRNO_H 1
#define HAVE_LANGINFO_H 0
@@ -663,7 +713,7 @@
#define HAVE_ERRNO_H 1
/* As long as Haiku doesn't have a complete support of locale this will be disabled. */
-#if !PLATFORM(HAIKU)
+#if !OS(HAIKU)
#define HAVE_LANGINFO_H 1
#endif
#define HAVE_MMAP 1
@@ -769,11 +819,11 @@
#endif
#if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64)
-#if (PLATFORM(X86_64) && (PLATFORM(UNIX) || PLATFORM(WIN_OS))) || PLATFORM(IA64) || PLATFORM(ALPHA)
+#if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS))) || CPU(IA64) || CPU(ALPHA)
#define WTF_USE_JSVALUE64 1
-#elif PLATFORM(ARM) || PLATFORM(PPC64)
+#elif CPU(ARM) || CPU(PPC64)
#define WTF_USE_JSVALUE32 1
-#elif PLATFORM(WIN_OS) && COMPILER(MINGW)
+#elif OS(WINDOWS) && COMPILER(MINGW)
/* Using JSVALUE32_64 causes padding/alignement issues for JITStubArg
on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#define WTF_USE_JSVALUE32 1
@@ -789,35 +839,37 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#if !defined(ENABLE_JIT)
/* The JIT is tested & working on x86_64 Mac */
-#if PLATFORM(X86_64) && PLATFORM(MAC)
+#if CPU(X86_64) && PLATFORM(MAC)
#define ENABLE_JIT 1
/* The JIT is tested & working on x86 Mac */
-#elif PLATFORM(X86) && PLATFORM(MAC)
+#elif CPU(X86) && PLATFORM(MAC)
#define ENABLE_JIT 1
#define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
-#elif PLATFORM(ARM_THUMB2) && PLATFORM(IPHONE)
+#elif CPU(ARM_THUMB2) && PLATFORM(IPHONE)
#define ENABLE_JIT 1
/* The JIT is tested & working on x86 Windows */
-#elif PLATFORM(X86) && PLATFORM(WIN)
+#elif CPU(X86) && PLATFORM(WIN)
#define ENABLE_JIT 1
#endif
#if PLATFORM(QT)
-#if PLATFORM(X86_64) && PLATFORM(DARWIN)
+#if CPU(X86_64) && OS(DARWIN)
#define ENABLE_JIT 1
-#elif PLATFORM(X86) && PLATFORM(DARWIN)
+#elif CPU(X86) && OS(DARWIN)
#define ENABLE_JIT 1
#define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
-#elif PLATFORM(X86) && PLATFORM(WIN_OS) && COMPILER(MINGW) && GCC_VERSION >= 40100
+#elif CPU(X86) && OS(WINDOWS) && COMPILER(MINGW) && GCC_VERSION >= 40100
#define ENABLE_JIT 1
#define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
-#elif PLATFORM(X86) && PLATFORM(WIN_OS) && COMPILER(MSVC)
+#elif CPU(X86) && OS(WINDOWS) && COMPILER(MSVC)
#define ENABLE_JIT 1
#define WTF_USE_JIT_STUB_ARGUMENT_REGISTER 1
-#elif PLATFORM(X86) && PLATFORM(LINUX) && GCC_VERSION >= 40100
+#elif CPU(X86) && OS(LINUX) && GCC_VERSION >= 40100
#define ENABLE_JIT 1
#define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
-#elif PLATFORM(ARM_TRADITIONAL) && PLATFORM(LINUX)
+#elif CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100
+ #define ENABLE_JIT 1
+#elif CPU(ARM_TRADITIONAL) && OS(LINUX)
#define ENABLE_JIT 1
#endif
#endif /* PLATFORM(QT) */
@@ -839,9 +891,9 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#endif
#endif
-#if PLATFORM(X86) && COMPILER(MSVC)
+#if CPU(X86) && COMPILER(MSVC)
#define JSC_HOST_CALL __fastcall
-#elif PLATFORM(X86) && COMPILER(GCC)
+#elif CPU(X86) && COMPILER(GCC)
#define JSC_HOST_CALL __attribute__ ((fastcall))
#else
#define JSC_HOST_CALL
@@ -861,19 +913,20 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#if !defined(ENABLE_YARR_JIT)
/* YARR supports x86 & x86-64, and has been tested on Mac and Windows. */
-#if (PLATFORM(X86) && PLATFORM(MAC)) \
- || (PLATFORM(X86_64) && PLATFORM(MAC)) \
- || (PLATFORM(ARM_THUMB2) && PLATFORM(IPHONE)) \
- || (PLATFORM(X86) && PLATFORM(WIN))
+#if (CPU(X86) && PLATFORM(MAC)) \
+ || (CPU(X86_64) && PLATFORM(MAC)) \
+ || (CPU(ARM_THUMB2) && PLATFORM(IPHONE)) \
+ || (CPU(X86) && PLATFORM(WIN))
#define ENABLE_YARR 1
#define ENABLE_YARR_JIT 1
#endif
#if PLATFORM(QT)
-#if (PLATFORM(X86) && PLATFORM(WIN_OS) && COMPILER(MINGW) && GCC_VERSION >= 40100) \
- || (PLATFORM(X86) && PLATFORM(WIN_OS) && COMPILER(MSVC)) \
- || (PLATFORM(X86) && PLATFORM(LINUX) && GCC_VERSION >= 40100) \
- || (PLATFORM(ARM_TRADITIONAL) && PLATFORM(LINUX))
+#if (CPU(X86) && OS(WINDOWS) && COMPILER(MINGW) && GCC_VERSION >= 40100) \
+ || (CPU(X86) && OS(WINDOWS) && COMPILER(MSVC)) \
+ || (CPU(X86) && OS(LINUX) && GCC_VERSION >= 40100) \
+ || (CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100) \
+ || (CPU(ARM_TRADITIONAL) && OS(LINUX))
#define ENABLE_YARR 1
#define ENABLE_YARR_JIT 1
#endif
@@ -897,7 +950,7 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#define ENABLE_ASSEMBLER_WX_EXCLUSIVE 0
#endif
-#if !defined(ENABLE_PAN_SCROLLING) && PLATFORM(WIN_OS)
+#if !defined(ENABLE_PAN_SCROLLING) && OS(WINDOWS)
#define ENABLE_PAN_SCROLLING 1
#endif
@@ -927,8 +980,15 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#define WTF_USE_ACCELERATED_COMPOSITING 1
#endif
+/* FIXME: Defining ENABLE_3D_RENDERING here isn't really right, but it's always used with
+ with WTF_USE_ACCELERATED_COMPOSITING, and it allows the feature to be turned on and
+ off in one place. */
#if PLATFORM(WIN)
-#define WTF_USE_ACCELERATED_COMPOSITING 0
+#include "QuartzCorePresent.h"
+#if QUARTZCORE_PRESENT
+#define WTF_USE_ACCELERATED_COMPOSITING 1
+#define ENABLE_3D_RENDERING 1
+#endif
#endif
#if COMPILER(GCC)
@@ -937,7 +997,7 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#define WARN_UNUSED_RETURN
#endif
-#if !ENABLE(NETSCAPE_PLUGIN_API) || (ENABLE(NETSCAPE_PLUGIN_API) && ((PLATFORM(UNIX) && (PLATFORM(QT) || PLATFORM(WX))) || PLATFORM(GTK)))
+#if !ENABLE(NETSCAPE_PLUGIN_API) || (ENABLE(NETSCAPE_PLUGIN_API) && ((OS(UNIX) && (PLATFORM(QT) || PLATFORM(WX))) || PLATFORM(GTK)))
#define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1
#endif
diff --git a/JavaScriptCore/wtf/RandomNumber.cpp b/JavaScriptCore/wtf/RandomNumber.cpp
index 52fb130..fc48263 100644
--- a/JavaScriptCore/wtf/RandomNumber.cpp
+++ b/JavaScriptCore/wtf/RandomNumber.cpp
@@ -34,12 +34,18 @@
#include <stdint.h>
#include <stdlib.h>
-#if PLATFORM(WINCE)
+#if OS(WINCE)
extern "C" {
#include "wince/mt19937ar.c"
}
#endif
+#if PLATFORM(BREWMP)
+#include <AEEAppGen.h>
+#include <AEESource.h>
+#include <AEEStdLib.h>
+#endif
+
namespace WTF {
double weakRandomNumber()
@@ -47,6 +53,10 @@ double weakRandomNumber()
#if COMPILER(MSVC) && defined(_CRT_RAND_S)
// rand_s is incredibly slow on windows so we fall back on rand for Math.random
return (rand() + (rand() / (RAND_MAX + 1.0))) / (RAND_MAX + 1.0);
+#elif PLATFORM(BREWMP)
+ uint32_t bits;
+ GETRAND(reinterpret_cast<byte*>(&bits), sizeof(uint32_t));
+ return static_cast<double>(bits) / (static_cast<double>(std::numeric_limits<uint32_t>::max()) + 1.0);
#else
return randomNumber();
#endif
@@ -66,10 +76,10 @@ double randomNumber()
uint32_t bits;
rand_s(&bits);
return static_cast<double>(bits) / (static_cast<double>(std::numeric_limits<uint32_t>::max()) + 1.0);
-#elif PLATFORM(DARWIN)
+#elif OS(DARWIN)
uint32_t bits = arc4random();
return static_cast<double>(bits) / (static_cast<double>(std::numeric_limits<uint32_t>::max()) + 1.0);
-#elif PLATFORM(UNIX)
+#elif OS(UNIX)
uint32_t part1 = random() & (RAND_MAX - 1);
uint32_t part2 = random() & (RAND_MAX - 1);
// random only provides 31 bits
@@ -80,9 +90,9 @@ double randomNumber()
// Mask off the low 53bits
fullRandom &= (1LL << 53) - 1;
return static_cast<double>(fullRandom)/static_cast<double>(1LL << 53);
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
return genrand_res53();
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
uint32_t part1 = rand() & (RAND_MAX - 1);
uint32_t part2 = rand() & (RAND_MAX - 1);
uint32_t part3 = rand() & (RAND_MAX - 1);
@@ -99,6 +109,16 @@ double randomNumber()
// Mask off the low 53bits
fullRandom &= (1LL << 53) - 1;
return static_cast<double>(fullRandom)/static_cast<double>(1LL << 53);
+#elif PLATFORM(BREWMP)
+ uint32_t bits;
+ ISource* randomSource;
+
+ IShell* shell = reinterpret_cast<AEEApplet*>(GETAPPINSTANCE())->m_pIShell;
+ ISHELL_CreateInstance(shell, AEECLSID_RANDOM, reinterpret_cast<void**>(&randomSource));
+ ISOURCE_Read(randomSource, reinterpret_cast<char*>(&bits), 4);
+ ISOURCE_Release(randomSource);
+
+ return static_cast<double>(bits) / (static_cast<double>(std::numeric_limits<uint32_t>::max()) + 1.0);
#else
uint32_t part1 = rand() & (RAND_MAX - 1);
uint32_t part2 = rand() & (RAND_MAX - 1);
diff --git a/JavaScriptCore/wtf/RandomNumberSeed.h b/JavaScriptCore/wtf/RandomNumberSeed.h
index a66433e..ae414c0 100644
--- a/JavaScriptCore/wtf/RandomNumberSeed.h
+++ b/JavaScriptCore/wtf/RandomNumberSeed.h
@@ -33,12 +33,12 @@
#include <sys/time.h>
#endif
-#if PLATFORM(UNIX)
+#if OS(UNIX)
#include <sys/types.h>
#include <unistd.h>
#endif
-#if PLATFORM(WINCE)
+#if OS(WINCE)
extern "C" {
void init_by_array(unsigned long init_key[],int key_length);
}
@@ -49,9 +49,9 @@ namespace WTF {
inline void initializeRandomNumberGenerator()
{
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
// On Darwin we use arc4random which initialises itself.
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
// initialize rand()
srand(static_cast<unsigned>(time(0)));
@@ -64,7 +64,7 @@ inline void initializeRandomNumberGenerator()
init_by_array(initializationBuffer, 4);
#elif COMPILER(MSVC) && defined(_CRT_RAND_S)
// On Windows we use rand_s which initialises itself
-#elif PLATFORM(UNIX)
+#elif OS(UNIX)
// srandomdev is not guaranteed to exist on linux so we use this poor seed, this should be improved
timeval time;
gettimeofday(&time, 0);
diff --git a/JavaScriptCore/wtf/RefPtrHashMap.h b/JavaScriptCore/wtf/RefPtrHashMap.h
index 9433025..7f6ebfe 100644
--- a/JavaScriptCore/wtf/RefPtrHashMap.h
+++ b/JavaScriptCore/wtf/RefPtrHashMap.h
@@ -285,7 +285,7 @@ namespace WTF {
{
if (it.m_impl == m_impl.end())
return;
- m_impl.checkTableConsistency();
+ m_impl.internalCheckTableConsistency();
m_impl.removeWithoutEntryConsistencyCheck(it.m_impl);
}
diff --git a/JavaScriptCore/wtf/StdLibExtras.h b/JavaScriptCore/wtf/StdLibExtras.h
index dd90c85..9dfb969 100644
--- a/JavaScriptCore/wtf/StdLibExtras.h
+++ b/JavaScriptCore/wtf/StdLibExtras.h
@@ -69,6 +69,14 @@ namespace WTF {
return u.to;
}
+ // Returns a count of the number of bits set in 'bits'.
+ inline size_t bitCount(unsigned bits)
+ {
+ bits = bits - ((bits >> 1) & 0x55555555);
+ bits = (bits & 0x33333333) + ((bits >> 2) & 0x33333333);
+ return (((bits + (bits >> 4)) & 0xF0F0F0F) * 0x1010101) >> 24;
+ }
+
} // namespace WTF
#endif
diff --git a/JavaScriptCore/wtf/StringExtras.cpp b/JavaScriptCore/wtf/StringExtras.cpp
new file mode 100644
index 0000000..1b96417
--- /dev/null
+++ b/JavaScriptCore/wtf/StringExtras.cpp
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2009 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"
+
+#if COMPILER(RVCT) && __ARMCC_VERSION < 400000
+
+#include "StringExtras.h"
+
+#include "ASCIICType.h"
+
+int strcasecmp(const char* s1, const char* s2)
+{
+ while (toASCIIUpper(*s1) == toASCIIUpper(*s2)) {
+ if (*s1 == '\0')
+ return 0;
+ s1++;
+ s2++;
+ }
+
+ return toASCIIUpper(*s1) - toASCIIUpper(*s2);
+}
+
+int strncasecmp(const char* s1, const char* s2, size_t len)
+{
+ while (len > 0 && toASCIIUpper(*s1) == toASCIIUpper(*s2)) {
+ if (*s1 == '\0')
+ return 0;
+ s1++;
+ s2++;
+ len--;
+ }
+
+ if (!len)
+ return 0;
+
+ return toASCIIUpper(*s1) - toASCIIUpper(*s2);
+}
+
+#endif
diff --git a/JavaScriptCore/wtf/StringExtras.h b/JavaScriptCore/wtf/StringExtras.h
index 50efe35..b1ec09f 100644
--- a/JavaScriptCore/wtf/StringExtras.h
+++ b/JavaScriptCore/wtf/StringExtras.h
@@ -34,6 +34,7 @@
#endif
#if COMPILER(MSVC)
+// FIXME: why a COMPILER check instead of OS? also, these should be HAVE checks
inline int snprintf(char* buffer, size_t count, const char* format, ...)
{
@@ -45,7 +46,7 @@ inline int snprintf(char* buffer, size_t count, const char* format, ...)
return result;
}
-#if COMPILER(MSVC7) || PLATFORM(WINCE)
+#if COMPILER(MSVC7) || OS(WINCE)
inline int vsnprintf(char* buffer, size_t count, const char* format, va_list args)
{
@@ -54,7 +55,7 @@ inline int vsnprintf(char* buffer, size_t count, const char* format, va_list arg
#endif
-#if PLATFORM(WINCE)
+#if OS(WINCE)
inline int strnicmp(const char* string1, const char* string2, size_t count)
{
@@ -85,7 +86,8 @@ inline int strcasecmp(const char* s1, const char* s2)
#endif
-#if PLATFORM(WIN_OS) || PLATFORM(LINUX) || PLATFORM(SOLARIS)
+#if OS(WINDOWS) || OS(LINUX) || OS(SOLARIS)
+// FIXME: should check HAVE_STRNSTR
inline char* strnstr(const char* buffer, const char* target, size_t bufferLength)
{
@@ -101,4 +103,11 @@ inline char* strnstr(const char* buffer, const char* target, size_t bufferLength
#endif
+#if COMPILER(RVCT) && __ARMCC_VERSION < 400000
+
+int strcasecmp(const char* s1, const char* s2);
+int strncasecmp(const char* s1, const char* s2, size_t len);
+
+#endif
+
#endif // WTF_StringExtras_h
diff --git a/JavaScriptCore/wtf/StringHashFunctions.h b/JavaScriptCore/wtf/StringHashFunctions.h
new file mode 100644
index 0000000..07f117f
--- /dev/null
+++ b/JavaScriptCore/wtf/StringHashFunctions.h
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2005, 2006, 2008, 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
+ * 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 WTF_StringHashFunctions_h
+#define WTF_StringHashFunctions_h
+
+#include <wtf/unicode/Unicode.h>
+
+namespace WTF {
+
+// Golden ratio - arbitrary start value to avoid mapping all 0's to all 0's
+static const unsigned stringHashingStartValue = 0x9e3779b9U;
+
+// stringHash methods based on Paul Hsieh's SuperFastHash.
+// http://www.azillionmonkeys.com/qed/hash.html
+// char* data is interpreted as latin-encoded (zero extended to 16 bits).
+
+inline unsigned stringHash(const UChar* data, unsigned length)
+{
+ unsigned hash = WTF::stringHashingStartValue;
+ unsigned rem = length & 1;
+ length >>= 1;
+
+ // Main loop
+ for (; length > 0; length--) {
+ hash += data[0];
+ unsigned tmp = (data[1] << 11) ^ hash;
+ hash = (hash << 16) ^ tmp;
+ data += 2;
+ hash += hash >> 11;
+ }
+
+ // Handle end case
+ if (rem) {
+ hash += data[0];
+ hash ^= hash << 11;
+ hash += hash >> 17;
+ }
+
+ // Force "avalanching" of final 127 bits
+ hash ^= hash << 3;
+ hash += hash >> 5;
+ hash ^= hash << 2;
+ hash += hash >> 15;
+ hash ^= hash << 10;
+
+ hash &= 0x7fffffff;
+
+ // this avoids ever returning a hash code of 0, since that is used to
+ // signal "hash not computed yet", using a value that is likely to be
+ // effectively the same as 0 when the low bits are masked
+ if (hash == 0)
+ hash = 0x40000000;
+
+ return hash;
+}
+
+inline unsigned stringHash(const char* data, unsigned length)
+{
+ unsigned hash = WTF::stringHashingStartValue;
+ unsigned rem = length & 1;
+ length >>= 1;
+
+ // Main loop
+ for (; length > 0; length--) {
+ hash += static_cast<unsigned char>(data[0]);
+ unsigned tmp = (static_cast<unsigned char>(data[1]) << 11) ^ hash;
+ hash = (hash << 16) ^ tmp;
+ data += 2;
+ hash += hash >> 11;
+ }
+
+ // Handle end case
+ if (rem) {
+ hash += static_cast<unsigned char>(data[0]);
+ hash ^= hash << 11;
+ hash += hash >> 17;
+ }
+
+ // Force "avalanching" of final 127 bits
+ hash ^= hash << 3;
+ hash += hash >> 5;
+ hash ^= hash << 2;
+ hash += hash >> 15;
+ hash ^= hash << 10;
+
+ hash &= 0x7fffffff;
+
+ // this avoids ever returning a hash code of 0, since that is used to
+ // signal "hash not computed yet", using a value that is likely to be
+ // effectively the same as 0 when the low bits are masked
+ if (hash == 0)
+ hash = 0x40000000;
+
+ return hash;
+}
+
+inline unsigned stringHash(const char* data)
+{
+ unsigned hash = WTF::stringHashingStartValue;
+
+ // Main loop
+ for (;;) {
+ unsigned char b0 = data[0];
+ if (!b0)
+ break;
+ unsigned char b1 = data[1];
+ if (!b1) {
+ hash += b0;
+ hash ^= hash << 11;
+ hash += hash >> 17;
+ break;
+ }
+ hash += b0;
+ unsigned tmp = (b1 << 11) ^ hash;
+ hash = (hash << 16) ^ tmp;
+ data += 2;
+ hash += hash >> 11;
+ }
+
+ // Force "avalanching" of final 127 bits.
+ hash ^= hash << 3;
+ hash += hash >> 5;
+ hash ^= hash << 2;
+ hash += hash >> 15;
+ hash ^= hash << 10;
+
+ hash &= 0x7fffffff;
+
+ // This avoids ever returning a hash code of 0, since that is used to
+ // signal "hash not computed yet", using a value that is likely to be
+ // effectively the same as 0 when the low bits are masked.
+ if (hash == 0)
+ hash = 0x40000000;
+
+ return hash;
+}
+
+} // namespace WTF
+
+#endif // WTF_StringHashFunctions_h
diff --git a/JavaScriptCore/wtf/TCSpinLock.h b/JavaScriptCore/wtf/TCSpinLock.h
index 4cf30c2..8a73e13 100644
--- a/JavaScriptCore/wtf/TCSpinLock.h
+++ b/JavaScriptCore/wtf/TCSpinLock.h
@@ -33,7 +33,7 @@
#ifndef TCMALLOC_INTERNAL_SPINLOCK_H__
#define TCMALLOC_INTERNAL_SPINLOCK_H__
-#if (PLATFORM(X86) || PLATFORM(PPC)) && (COMPILER(GCC) || COMPILER(MSVC))
+#if (CPU(X86) || CPU(X86_64) || CPU(PPC)) && (COMPILER(GCC) || COMPILER(MSVC))
#include <time.h> /* For nanosleep() */
@@ -47,7 +47,7 @@
#include <sys/types.h>
#endif
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
@@ -62,7 +62,7 @@ struct TCMalloc_SpinLock {
inline void Lock() {
int r;
#if COMPILER(GCC)
-#if PLATFORM(X86)
+#if CPU(X86) || CPU(X86_64)
__asm__ __volatile__
("xchgl %0, %1"
: "=r"(r), "=m"(lockword_)
@@ -92,7 +92,7 @@ struct TCMalloc_SpinLock {
inline void Unlock() {
#if COMPILER(GCC)
-#if PLATFORM(X86)
+#if CPU(X86) || CPU(X86_64)
__asm__ __volatile__
("movl $0, %0"
: "=m"(lockword_)
@@ -103,7 +103,7 @@ struct TCMalloc_SpinLock {
("isync\n\t"
"eieio\n\t"
"stw %1, %0"
-#if PLATFORM(DARWIN) || PLATFORM(PPC)
+#if OS(DARWIN) || CPU(PPC)
: "=o" (lockword_)
#else
: "=m" (lockword_)
@@ -138,7 +138,7 @@ static void TCMalloc_SlowLock(volatile unsigned int* lockword) {
while (true) {
int r;
#if COMPILER(GCC)
-#if PLATFORM(X86)
+#if CPU(X86) || CPU(X86_64)
__asm__ __volatile__
("xchgl %0, %1"
: "=r"(r), "=m"(*lockword)
@@ -178,7 +178,7 @@ static void TCMalloc_SlowLock(volatile unsigned int* lockword) {
// from taking 30 seconds to 16 seconds.
// Sleep for a few milliseconds
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
Sleep(2);
#else
struct timespec tm;
diff --git a/JavaScriptCore/wtf/TCSystemAlloc.cpp b/JavaScriptCore/wtf/TCSystemAlloc.cpp
index 659bb0e..4d02919 100644
--- a/JavaScriptCore/wtf/TCSystemAlloc.cpp
+++ b/JavaScriptCore/wtf/TCSystemAlloc.cpp
@@ -47,7 +47,7 @@
#include <sys/types.h>
#endif
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include "windows.h"
#else
#include <errno.h>
diff --git a/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.cpp b/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.cpp
new file mode 100644
index 0000000..042d49e
--- /dev/null
+++ b/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.cpp
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if USE(PTHREADS)
+
+#include "ThreadIdentifierDataPthreads.h"
+
+#include "Threading.h"
+
+namespace WTF {
+
+pthread_key_t ThreadIdentifierData::m_key;
+
+void clearPthreadHandleForIdentifier(ThreadIdentifier);
+
+ThreadIdentifierData::~ThreadIdentifierData()
+{
+ clearPthreadHandleForIdentifier(m_identifier);
+}
+
+ThreadIdentifier ThreadIdentifierData::identifier()
+{
+ initializeKeyOnce();
+ ThreadIdentifierData* threadIdentifierData = static_cast<ThreadIdentifierData*>(pthread_getspecific(m_key));
+
+ return threadIdentifierData ? threadIdentifierData->m_identifier : 0;
+}
+
+void ThreadIdentifierData::initialize(ThreadIdentifier id)
+{
+ ASSERT(!identifier());
+
+ initializeKeyOnce();
+ pthread_setspecific(m_key, new ThreadIdentifierData(id));
+}
+
+void ThreadIdentifierData::destruct(void* data)
+{
+ ThreadIdentifierData* threadIdentifierData = static_cast<ThreadIdentifierData*>(data);
+ ASSERT(threadIdentifierData);
+
+ if (threadIdentifierData->m_isDestroyedOnce) {
+ delete threadIdentifierData;
+ return;
+ }
+
+ threadIdentifierData->m_isDestroyedOnce = true;
+ // Re-setting the value for key causes another destruct() call after all other thread-specific destructors were called.
+ pthread_setspecific(m_key, threadIdentifierData);
+}
+
+void ThreadIdentifierData::initializeKeyOnceHelper()
+{
+ if (pthread_key_create(&m_key, destruct))
+ CRASH();
+}
+
+void ThreadIdentifierData::initializeKeyOnce()
+{
+ static pthread_once_t onceControl = PTHREAD_ONCE_INIT;
+ if (pthread_once(&onceControl, initializeKeyOnceHelper))
+ CRASH();
+}
+
+} // namespace WTF
+
+#endif // USE(PTHREADS)
+
diff --git a/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.h b/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.h
new file mode 100644
index 0000000..3af87a8
--- /dev/null
+++ b/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ThreadIdentifierDataPthreads_h
+#define ThreadIdentifierDataPthreads_h
+
+#include <wtf/Noncopyable.h>
+#include <wtf/Threading.h>
+
+namespace WTF {
+
+// Holds ThreadIdentifier in the thread-specific storage and employs pthreads-specific 2-pass destruction to reliably remove
+// ThreadIdentifier from threadMap. It assumes regular ThreadSpecific types don't use multiple-pass destruction.
+class ThreadIdentifierData : public Noncopyable {
+public:
+ ~ThreadIdentifierData();
+
+ // Creates and puts an instance of ThreadIdentifierData into thread-specific storage.
+ static void initialize(ThreadIdentifier identifier);
+
+ // Returns 0 if thread-specific storage was not initialized.
+ static ThreadIdentifier identifier();
+
+private:
+ ThreadIdentifierData(ThreadIdentifier identifier)
+ : m_identifier(identifier)
+ , m_isDestroyedOnce(false)
+ {
+ }
+
+ // This thread-specific destructor is called 2 times when thread terminates:
+ // - first, when all the other thread-specific destructors are called, it simply remembers it was 'destroyed once'
+ // and re-sets itself into the thread-specific slot to make Pthreads to call it again later.
+ // - second, after all thread-specific destructors were invoked, it gets called again - this time, we remove the
+ // ThreadIdentifier from the threadMap, completing the cleanup.
+ static void destruct(void* data);
+
+ static void initializeKeyOnceHelper();
+ static void initializeKeyOnce();
+
+ ThreadIdentifier m_identifier;
+ bool m_isDestroyedOnce;
+ static pthread_key_t m_key;
+};
+
+} // namespace WTF
+
+#endif // ThreadIdentifierDataPthreads_h
+
+
diff --git a/JavaScriptCore/wtf/ThreadSpecific.h b/JavaScriptCore/wtf/ThreadSpecific.h
index b6f5fd3..7e5679f 100644
--- a/JavaScriptCore/wtf/ThreadSpecific.h
+++ b/JavaScriptCore/wtf/ThreadSpecific.h
@@ -47,13 +47,13 @@
#include <pthread.h>
#elif PLATFORM(QT)
#include <QThreadStorage>
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
#include <windows.h>
#endif
namespace WTF {
-#if !USE(PTHREADS) && !PLATFORM(QT) && PLATFORM(WIN_OS)
+#if !USE(PTHREADS) && !PLATFORM(QT) && OS(WINDOWS)
// ThreadSpecificThreadExit should be called each time when a thread is detached.
// This is done automatically for threads created with WTF::createThread.
void ThreadSpecificThreadExit();
@@ -68,7 +68,7 @@ public:
~ThreadSpecific();
private:
-#if !USE(PTHREADS) && !PLATFORM(QT) && PLATFORM(WIN_OS)
+#if !USE(PTHREADS) && !PLATFORM(QT) && OS(WINDOWS)
friend void ThreadSpecificThreadExit();
#endif
@@ -76,7 +76,7 @@ private:
void set(T*);
void static destroy(void* ptr);
-#if USE(PTHREADS) || PLATFORM(QT) || PLATFORM(WIN_OS)
+#if USE(PTHREADS) || PLATFORM(QT) || OS(WINDOWS)
struct Data : Noncopyable {
Data(T* value, ThreadSpecific<T>* owner) : value(value), owner(owner) {}
#if PLATFORM(QT)
@@ -91,15 +91,44 @@ private:
};
#endif
+#if ENABLE(SINGLE_THREADED)
+ T* m_value;
+#else
#if USE(PTHREADS)
pthread_key_t m_key;
#elif PLATFORM(QT)
QThreadStorage<Data*> m_key;
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
int m_index;
#endif
+#endif
};
+#if ENABLE(SINGLE_THREADED)
+template<typename T>
+inline ThreadSpecific<T>::ThreadSpecific()
+ : m_value(0)
+{
+}
+
+template<typename T>
+inline ThreadSpecific<T>::~ThreadSpecific()
+{
+}
+
+template<typename T>
+inline T* ThreadSpecific<T>::get()
+{
+ return m_value;
+}
+
+template<typename T>
+inline void ThreadSpecific<T>::set(T* ptr)
+{
+ ASSERT(!get());
+ m_value = ptr;
+}
+#else
#if USE(PTHREADS)
template<typename T>
inline ThreadSpecific<T>::ThreadSpecific()
@@ -157,7 +186,12 @@ inline void ThreadSpecific<T>::set(T* ptr)
m_key.setLocalData(data);
}
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
+
+// TLS_OUT_OF_INDEXES is not defined on WinCE.
+#ifndef TLS_OUT_OF_INDEXES
+#define TLS_OUT_OF_INDEXES 0xffffffff
+#endif
// The maximum number of TLS keys that can be created. For simplification, we assume that:
// 1) Once the instance of ThreadSpecific<> is created, it will not be destructed until the program dies.
@@ -171,14 +205,14 @@ template<typename T>
inline ThreadSpecific<T>::ThreadSpecific()
: m_index(-1)
{
- DWORD tls_key = TlsAlloc();
- if (tls_key == TLS_OUT_OF_INDEXES)
+ DWORD tlsKey = TlsAlloc();
+ if (tlsKey == TLS_OUT_OF_INDEXES)
CRASH();
m_index = InterlockedIncrement(&tlsKeyCount()) - 1;
if (m_index >= kMaxTlsKeySize)
CRASH();
- tlsKeys()[m_index] = tls_key;
+ tlsKeys()[m_index] = tlsKey;
}
template<typename T>
@@ -207,10 +241,12 @@ inline void ThreadSpecific<T>::set(T* ptr)
#else
#error ThreadSpecific is not implemented for this platform.
#endif
+#endif
template<typename T>
inline void ThreadSpecific<T>::destroy(void* ptr)
{
+#if !ENABLE(SINGLE_THREADED)
Data* data = static_cast<Data*>(ptr);
#if USE(PTHREADS)
@@ -230,7 +266,7 @@ inline void ThreadSpecific<T>::destroy(void* ptr)
pthread_setspecific(data->owner->m_key, 0);
#elif PLATFORM(QT)
// Do nothing here
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
TlsSetValue(tlsKeys()[data->owner->m_index], 0);
#else
#error ThreadSpecific is not implemented for this platform.
@@ -239,6 +275,7 @@ inline void ThreadSpecific<T>::destroy(void* ptr)
#if !PLATFORM(QT)
delete data;
#endif
+#endif
}
template<typename T>
diff --git a/JavaScriptCore/wtf/Threading.cpp b/JavaScriptCore/wtf/Threading.cpp
index 74c47f4..49de59e 100644
--- a/JavaScriptCore/wtf/Threading.cpp
+++ b/JavaScriptCore/wtf/Threading.cpp
@@ -49,13 +49,14 @@ static void* threadEntryPoint(void* contextData)
{
NewThreadContext* context = reinterpret_cast<NewThreadContext*>(contextData);
- setThreadNameInternal(context->name);
-
- // Block until our creating thread has completed any extra setup work.
+ // Block until our creating thread has completed any extra setup work, including
+ // establishing ThreadIdentifier.
{
MutexLocker locker(context->creationMutex);
}
+ initializeCurrentThreadInternal(context->name);
+
// Grab the info that we need out of the context, then deallocate it.
ThreadFunction entryPoint = context->entryPoint;
void* data = context->data;
diff --git a/JavaScriptCore/wtf/Threading.h b/JavaScriptCore/wtf/Threading.h
index 2a2e9c4..1599562 100644
--- a/JavaScriptCore/wtf/Threading.h
+++ b/JavaScriptCore/wtf/Threading.h
@@ -61,7 +61,7 @@
#include "Platform.h"
-#if PLATFORM(WINCE)
+#if OS(WINCE)
#include <windows.h>
#endif
@@ -69,11 +69,11 @@
#include <wtf/Locker.h>
#include <wtf/Noncopyable.h>
-#if PLATFORM(WIN_OS) && !PLATFORM(WINCE)
+#if OS(WINDOWS) && !OS(WINCE)
#include <windows.h>
-#elif PLATFORM(DARWIN)
+#elif OS(DARWIN)
#include <libkern/OSAtomic.h>
-#elif PLATFORM(ANDROID)
+#elif OS(ANDROID)
#include <cutils/atomic.h>
#elif COMPILER(GCC)
#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
@@ -121,7 +121,7 @@ ThreadIdentifier createThreadInternal(ThreadFunction, void*, const char* threadN
// Called in the thread during initialization.
// Helpful for platforms where the thread name must be set from within the thread.
-void setThreadNameInternal(const char* threadName);
+void initializeCurrentThreadInternal(const char* threadName);
ThreadIdentifier currentThread();
bool isMainThread();
@@ -144,7 +144,7 @@ typedef GOwnPtr<GCond> PlatformCondition;
typedef QT_PREPEND_NAMESPACE(QMutex)* PlatformMutex;
typedef void* PlatformReadWriteLock; // FIXME: Implement.
typedef QT_PREPEND_NAMESPACE(QWaitCondition)* PlatformCondition;
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
struct PlatformMutex {
CRITICAL_SECTION m_internalMutex;
size_t m_recursionCount;
@@ -217,10 +217,10 @@ private:
PlatformCondition m_condition;
};
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#define WTF_USE_LOCKFREE_THREADSAFESHARED 1
-#if COMPILER(MINGW) || COMPILER(MSVC7) || PLATFORM(WINCE)
+#if COMPILER(MINGW) || COMPILER(MSVC7) || OS(WINCE)
inline int atomicIncrement(int* addend) { return InterlockedIncrement(reinterpret_cast<long*>(addend)); }
inline int atomicDecrement(int* addend) { return InterlockedDecrement(reinterpret_cast<long*>(addend)); }
#else
@@ -228,18 +228,18 @@ inline int atomicIncrement(int volatile* addend) { return InterlockedIncrement(r
inline int atomicDecrement(int volatile* addend) { return InterlockedDecrement(reinterpret_cast<long volatile*>(addend)); }
#endif
-#elif PLATFORM(DARWIN)
+#elif OS(DARWIN)
#define WTF_USE_LOCKFREE_THREADSAFESHARED 1
inline int atomicIncrement(int volatile* addend) { return OSAtomicIncrement32Barrier(const_cast<int*>(addend)); }
inline int atomicDecrement(int volatile* addend) { return OSAtomicDecrement32Barrier(const_cast<int*>(addend)); }
-#elif PLATFORM(ANDROID)
+#elif OS(ANDROID)
inline int atomicIncrement(int volatile* addend) { return android_atomic_inc(addend); }
inline int atomicDecrement(int volatile* addend) { return android_atomic_dec(addend); }
-#elif COMPILER(GCC) && !PLATFORM(SPARC64) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc
+#elif COMPILER(GCC) && !CPU(SPARC64) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc
#define WTF_USE_LOCKFREE_THREADSAFESHARED 1
inline int atomicIncrement(int volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, 1) + 1; }
diff --git a/JavaScriptCore/wtf/ThreadingNone.cpp b/JavaScriptCore/wtf/ThreadingNone.cpp
index 46f23d2..2e8a259 100644
--- a/JavaScriptCore/wtf/ThreadingNone.cpp
+++ b/JavaScriptCore/wtf/ThreadingNone.cpp
@@ -30,11 +30,13 @@
#include "config.h"
#include "Threading.h"
+#if ENABLE(SINGLE_THREADED)
+
namespace WTF {
void initializeThreading() { }
ThreadIdentifier createThreadInternal(ThreadFunction, void*, const char*) { return ThreadIdentifier(); }
-void setThreadNameInternal(const char*) { }
+void initializeCurrentThreadInternal(const char*) { }
int waitForThreadCompletion(ThreadIdentifier, void**) { return 0; }
void detachThread(ThreadIdentifier) { }
ThreadIdentifier currentThread() { return ThreadIdentifier(); }
@@ -57,3 +59,5 @@ void lockAtomicallyInitializedStaticMutex() { }
void unlockAtomicallyInitializedStaticMutex() { }
} // namespace WebCore
+
+#endif
diff --git a/JavaScriptCore/wtf/ThreadingPthreads.cpp b/JavaScriptCore/wtf/ThreadingPthreads.cpp
index f5cba5d..e4fc0eb 100644
--- a/JavaScriptCore/wtf/ThreadingPthreads.cpp
+++ b/JavaScriptCore/wtf/ThreadingPthreads.cpp
@@ -37,6 +37,8 @@
#include "MainThread.h"
#include "RandomNumberSeed.h"
#include "StdLibExtras.h"
+#include "ThreadIdentifierDataPthreads.h"
+#include "ThreadSpecific.h"
#include "UnusedParam.h"
#include <errno.h>
@@ -45,8 +47,13 @@
#include <sys/time.h>
#endif
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
#include "JNIUtility.h"
+=======
+#if OS(ANDROID)
+#include "jni_utility.h"
+>>>>>>> webkit.org at r54127
#endif
namespace WTF {
@@ -55,10 +62,12 @@ typedef HashMap<ThreadIdentifier, pthread_t> ThreadMap;
static Mutex* atomicallyInitializedStaticMutex;
-#if !PLATFORM(DARWIN) || PLATFORM(CHROMIUM)
+#if !OS(DARWIN) || PLATFORM(CHROMIUM) || USE(WEB_THREAD)
static pthread_t mainThread; // The thread that was the first to call initializeThreading(), which must be the main thread.
#endif
+void clearPthreadHandleForIdentifier(ThreadIdentifier);
+
static Mutex& threadMapMutex()
{
DEFINE_STATIC_LOCAL(Mutex, mutex, ());
@@ -71,7 +80,7 @@ void initializeThreading()
atomicallyInitializedStaticMutex = new Mutex;
threadMapMutex();
initializeRandomNumberGenerator();
-#if !PLATFORM(DARWIN) || PLATFORM(CHROMIUM)
+#if !OS(DARWIN) || PLATFORM(CHROMIUM) || USE(WEB_THREAD)
mainThread = pthread_self();
#endif
initializeMainThread();
@@ -108,7 +117,7 @@ static ThreadIdentifier identifierByPthreadHandle(const pthread_t& pthreadHandle
return 0;
}
-static ThreadIdentifier establishIdentifierForPthreadHandle(pthread_t& pthreadHandle)
+static ThreadIdentifier establishIdentifierForPthreadHandle(const pthread_t& pthreadHandle)
{
ASSERT(!identifierByPthreadHandle(pthreadHandle));
@@ -128,7 +137,7 @@ static pthread_t pthreadHandleForIdentifier(ThreadIdentifier id)
return threadMap().get(id);
}
-static void clearPthreadHandleForIdentifier(ThreadIdentifier id)
+void clearPthreadHandleForIdentifier(ThreadIdentifier id)
{
MutexLocker locker(threadMapMutex());
@@ -137,7 +146,7 @@ static void clearPthreadHandleForIdentifier(ThreadIdentifier id)
threadMap().remove(id);
}
-#if PLATFORM(ANDROID)
+#if OS(ANDROID)
// On the Android platform, threads must be registered with the VM before they run.
struct ThreadData {
ThreadFunction entryPoint;
@@ -185,13 +194,17 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con
}
#endif
-void setThreadNameInternal(const char* threadName)
+void initializeCurrentThreadInternal(const char* threadName)
{
#if HAVE(PTHREAD_SETNAME_NP)
pthread_setname_np(threadName);
#else
UNUSED_PARAM(threadName);
#endif
+
+ ThreadIdentifier id = identifierByPthreadHandle(pthread_self());
+ ASSERT(id);
+ ThreadIdentifierData::initialize(id);
}
int waitForThreadCompletion(ThreadIdentifier threadID, void** result)
@@ -199,12 +212,13 @@ int waitForThreadCompletion(ThreadIdentifier threadID, void** result)
ASSERT(threadID);
pthread_t pthreadHandle = pthreadHandleForIdentifier(threadID);
+ if (!pthreadHandle)
+ return 0;
int joinResult = pthread_join(pthreadHandle, result);
if (joinResult == EDEADLK)
LOG_ERROR("ThreadIdentifier %u was found to be deadlocked trying to quit", threadID);
- clearPthreadHandleForIdentifier(threadID);
return joinResult;
}
@@ -213,23 +227,27 @@ void detachThread(ThreadIdentifier threadID)
ASSERT(threadID);
pthread_t pthreadHandle = pthreadHandleForIdentifier(threadID);
+ if (!pthreadHandle)
+ return;
pthread_detach(pthreadHandle);
-
- clearPthreadHandleForIdentifier(threadID);
}
ThreadIdentifier currentThread()
{
- pthread_t currentThread = pthread_self();
- if (ThreadIdentifier id = identifierByPthreadHandle(currentThread))
+ ThreadIdentifier id = ThreadIdentifierData::identifier();
+ if (id)
return id;
- return establishIdentifierForPthreadHandle(currentThread);
+
+ // Not a WTF-created thread, ThreadIdentifier is not established yet.
+ id = establishIdentifierForPthreadHandle(pthread_self());
+ ThreadIdentifierData::initialize(id);
+ return id;
}
bool isMainThread()
{
-#if PLATFORM(DARWIN) && !PLATFORM(CHROMIUM)
+#if OS(DARWIN) && !PLATFORM(CHROMIUM) && !USE(WEB_THREAD)
return pthread_main_np();
#else
return pthread_equal(pthread_self(), mainThread);
diff --git a/JavaScriptCore/wtf/ThreadingWin.cpp b/JavaScriptCore/wtf/ThreadingWin.cpp
index cccbda1..73c3f0c 100644
--- a/JavaScriptCore/wtf/ThreadingWin.cpp
+++ b/JavaScriptCore/wtf/ThreadingWin.cpp
@@ -87,10 +87,10 @@
#include "Threading.h"
#include "MainThread.h"
-#if !USE(PTHREADS) && PLATFORM(WIN_OS)
+#if !USE(PTHREADS) && OS(WINDOWS)
#include "ThreadSpecific.h"
#endif
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
#include <process.h>
#endif
#if HAVE(ERRNO_H)
@@ -118,7 +118,7 @@ typedef struct tagTHREADNAME_INFO {
} THREADNAME_INFO;
#pragma pack(pop)
-void setThreadNameInternal(const char* szThreadName)
+void initializeCurrentThreadInternal(const char* szThreadName)
{
THREADNAME_INFO info;
info.dwType = 0x1000;
@@ -161,7 +161,7 @@ void initializeThreading()
initializeRandomNumberGenerator();
initializeMainThread();
mainThreadIdentifier = currentThread();
- setThreadNameInternal("Main Thread");
+ initializeCurrentThreadInternal("Main Thread");
}
}
@@ -205,7 +205,7 @@ static unsigned __stdcall wtfThreadEntryPoint(void* param)
void* result = invocation.function(invocation.data);
-#if !USE(PTHREADS) && PLATFORM(WIN_OS)
+#if !USE(PTHREADS) && OS(WINDOWS)
// Do the TLS cleanup.
ThreadSpecificThreadExit();
#endif
@@ -218,7 +218,7 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con
unsigned threadIdentifier = 0;
ThreadIdentifier threadID = 0;
ThreadFunctionInvocation* invocation = new ThreadFunctionInvocation(entryPoint, data);
-#if PLATFORM(WINCE)
+#if OS(WINCE)
// This is safe on WINCE, since CRT is in the core and innately multithreaded.
// On desktop Windows, need to use _beginthreadex (not available on WinCE) if using any CRT functions
HANDLE threadHandle = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)wtfThreadEntryPoint, invocation, 0, (LPDWORD)&threadIdentifier);
@@ -226,7 +226,7 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con
HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(0, 0, wtfThreadEntryPoint, invocation, 0, &threadIdentifier));
#endif
if (!threadHandle) {
-#if PLATFORM(WINCE)
+#if OS(WINCE)
LOG_ERROR("Failed to create thread at entry point %p with data %p: %ld", entryPoint, data, ::GetLastError());
#elif defined(NO_ERRNO)
LOG_ERROR("Failed to create thread at entry point %p with data %p.", entryPoint, data);
diff --git a/JavaScriptCore/wtf/TypeTraits.cpp b/JavaScriptCore/wtf/TypeTraits.cpp
index 36fc6c6..9e51ad0 100644
--- a/JavaScriptCore/wtf/TypeTraits.cpp
+++ b/JavaScriptCore/wtf/TypeTraits.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2009, 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
@@ -101,6 +101,20 @@ COMPILE_ASSERT((!IsSameType<int, int*>::value), WTF_IsSameType_int_int_pointer_f
COMPILE_ASSERT((!IsSameType<bool, const bool>::value), WTF_IsSameType_const_change_false);
COMPILE_ASSERT((!IsSameType<bool, volatile bool>::value), WTF_IsSameType_volatile_change_false);
+template <typename T>
+class TestBaseClass {
+};
+
+class TestDerivedClass : public TestBaseClass<int> {
+};
+
+COMPILE_ASSERT((IsSubclass<TestDerivedClass, TestBaseClass<int> >::value), WTF_Test_IsSubclass_Derived_From_Base);
+COMPILE_ASSERT((!IsSubclass<TestBaseClass<int>, TestDerivedClass>::value), WTF_Test_IsSubclass_Base_From_Derived);
+COMPILE_ASSERT((IsSubclassOfTemplate<TestDerivedClass, TestBaseClass>::value), WTF_Test_IsSubclassOfTemplate_Base_From_Derived);
+COMPILE_ASSERT((IsSameType<RemoveTemplate<TestBaseClass<int>, TestBaseClass>::Type, int>::value), WTF_Test_RemoveTemplate);
+COMPILE_ASSERT((IsSameType<RemoveTemplate<int, TestBaseClass>::Type, int>::value), WTF_Test_RemoveTemplate_WithoutTemplate);
+
+
COMPILE_ASSERT((IsSameType<bool, RemoveConst<const bool>::Type>::value), WTF_test_RemoveConst_const_bool);
COMPILE_ASSERT((!IsSameType<bool, RemoveConst<volatile bool>::Type>::value), WTF_test_RemoveConst_volatile_bool);
diff --git a/JavaScriptCore/wtf/TypeTraits.h b/JavaScriptCore/wtf/TypeTraits.h
index 9e75e7a..62dbc49 100644
--- a/JavaScriptCore/wtf/TypeTraits.h
+++ b/JavaScriptCore/wtf/TypeTraits.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2009, 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
@@ -104,6 +104,40 @@ namespace WTF {
static const bool value = true;
};
+ template <typename T, typename U> class IsSubclass {
+ typedef char YesType;
+ struct NoType {
+ char padding[8];
+ };
+
+ static YesType subclassCheck(U*);
+ static NoType subclassCheck(...);
+ static T* t;
+ public:
+ static const bool value = sizeof(subclassCheck(t)) == sizeof(YesType);
+ };
+
+ template <typename T, template<class V> class U> class IsSubclassOfTemplate {
+ typedef char YesType;
+ struct NoType {
+ char padding[8];
+ };
+
+ template<typename W> static YesType subclassCheck(U<W>*);
+ static NoType subclassCheck(...);
+ static T* t;
+ public:
+ static const bool value = sizeof(subclassCheck(t)) == sizeof(YesType);
+ };
+
+ template <typename T, template <class V> class OuterTemplate> struct RemoveTemplate {
+ typedef T Type;
+ };
+
+ template <typename T, template <class V> class OuterTemplate> struct RemoveTemplate<OuterTemplate<T>, OuterTemplate> {
+ typedef T Type;
+ };
+
template <typename T> struct RemoveConst {
typedef T Type;
};
diff --git a/JavaScriptCore/wtf/VMTags.h b/JavaScriptCore/wtf/VMTags.h
index 519f518..1ec79d9 100644
--- a/JavaScriptCore/wtf/VMTags.h
+++ b/JavaScriptCore/wtf/VMTags.h
@@ -30,7 +30,7 @@
// On Mac OS X, the VM subsystem allows tagging memory requested from mmap and vm_map
// in order to aid tools that inspect system memory use.
-#if PLATFORM(DARWIN) && !defined(BUILDING_ON_TIGER)
+#if OS(DARWIN) && !defined(BUILDING_ON_TIGER)
#include <mach/vm_statistics.h>
@@ -44,12 +44,12 @@
#define VM_TAG_FOR_REGISTERFILE_MEMORY VM_MAKE_TAG(65)
#endif // defined(VM_MEMORY_JAVASCRIPT_CORE) && defined(VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE) && defined(VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR) && defined(VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR)
-#else // PLATFORM(DARWIN) && !defined(BUILDING_ON_TIGER)
+#else // OS(DARWIN) && !defined(BUILDING_ON_TIGER)
#define VM_TAG_FOR_COLLECTOR_MEMORY -1
#define VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY -1
#define VM_TAG_FOR_REGISTERFILE_MEMORY -1
-#endif // PLATFORM(DARWIN) && !defined(BUILDING_ON_TIGER)
+#endif // OS(DARWIN) && !defined(BUILDING_ON_TIGER)
#endif // VMTags_h
diff --git a/JavaScriptCore/wtf/chromium/ChromiumThreading.h b/JavaScriptCore/wtf/chromium/ChromiumThreading.h
index e9b1f39..b2c5075 100644
--- a/JavaScriptCore/wtf/chromium/ChromiumThreading.h
+++ b/JavaScriptCore/wtf/chromium/ChromiumThreading.h
@@ -33,12 +33,12 @@
namespace WTF {
- // An interface to the embedding layer, which provides threading support.
- class ChromiumThreading {
- public:
- static void initializeMainThread();
- static void scheduleDispatchFunctionsOnMainThread();
- };
+// An interface to the embedding layer, which provides threading support.
+class ChromiumThreading {
+public:
+ static void initializeMainThread();
+ static void scheduleDispatchFunctionsOnMainThread();
+};
} // namespace WTF
diff --git a/JavaScriptCore/wtf/dtoa.cpp b/JavaScriptCore/wtf/dtoa.cpp
index edcb82b..6289d04 100644
--- a/JavaScriptCore/wtf/dtoa.cpp
+++ b/JavaScriptCore/wtf/dtoa.cpp
@@ -159,9 +159,9 @@
#pragma warning(disable: 4554)
#endif
-#if PLATFORM(BIG_ENDIAN)
+#if CPU(BIG_ENDIAN)
#define IEEE_MC68k
-#elif PLATFORM(MIDDLE_ENDIAN)
+#elif CPU(MIDDLE_ENDIAN)
#define IEEE_ARM
#else
#define IEEE_8087
@@ -262,7 +262,8 @@ typedef union { double d; uint32_t L[2]; } U;
#define Pack_32
#endif
-#if PLATFORM(PPC64) || PLATFORM(X86_64)
+#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
@@ -560,7 +561,7 @@ static void mult(BigInt& aRef, const BigInt& bRef)
aRef = c;
}
-struct P5Node {
+struct P5Node : Noncopyable {
BigInt val;
P5Node* next;
};
diff --git a/JavaScriptCore/wtf/gtk/GOwnPtr.cpp b/JavaScriptCore/wtf/gtk/GOwnPtr.cpp
index 8999962..1a151b9 100644
--- a/JavaScriptCore/wtf/gtk/GOwnPtr.cpp
+++ b/JavaScriptCore/wtf/gtk/GOwnPtr.cpp
@@ -57,11 +57,4 @@ template <> void freeOwnedGPtr<GDir>(GDir* ptr)
if (ptr)
g_dir_close(ptr);
}
-
-template <> void freeOwnedGPtr<GHashTable>(GHashTable* ptr)
-{
- if (ptr)
- g_hash_table_unref(ptr);
-}
-
} // namespace WTF
diff --git a/JavaScriptCore/wtf/gtk/GRefPtr.cpp b/JavaScriptCore/wtf/gtk/GRefPtr.cpp
new file mode 100644
index 0000000..e7cf34b
--- /dev/null
+++ b/JavaScriptCore/wtf/gtk/GRefPtr.cpp
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2009 Martin Robinson
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#include "GRefPtr.h"
+
+#include <glib.h>
+
+namespace WTF {
+
+template <> GHashTable* refGPtr(GHashTable* ptr)
+{
+ if (ptr)
+ g_hash_table_ref(ptr);
+ return ptr;
+}
+
+template <> void derefGPtr(GHashTable* ptr)
+{
+ g_hash_table_unref(ptr);
+}
+
+} // namespace WTF
diff --git a/JavaScriptCore/wtf/gtk/GRefPtr.h b/JavaScriptCore/wtf/gtk/GRefPtr.h
new file mode 100644
index 0000000..66739ef
--- /dev/null
+++ b/JavaScriptCore/wtf/gtk/GRefPtr.h
@@ -0,0 +1,187 @@
+/*
+ * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2009 Martin Robinson
+ *
+ * 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 WTF_GRefPtr_h
+#define WTF_GRefPtr_h
+
+#include "AlwaysInline.h"
+#include <algorithm>
+
+typedef struct _GHashTable GHashTable;
+
+namespace WTF {
+
+enum GRefPtrAdoptType { GRefPtrAdopt };
+template <typename T> inline T* refGPtr(T*);
+template <typename T> inline void derefGPtr(T*);
+template <typename T> class GRefPtr;
+template <typename T> GRefPtr<T> adoptGRef(T*);
+template <> GHashTable* refGPtr(GHashTable* ptr);
+template <> void derefGPtr(GHashTable* ptr);
+
+template <typename T> class GRefPtr {
+public:
+ GRefPtr() : m_ptr(0) { }
+ GRefPtr(T* ptr) : m_ptr(ptr) { if (ptr) refGPtr(ptr); }
+ GRefPtr(const GRefPtr& o) : m_ptr(o.m_ptr) { if (T* ptr = m_ptr) refGPtr(ptr); }
+ template <typename U> GRefPtr(const GRefPtr<U>& o) : m_ptr(o.get()) { if (T* ptr = m_ptr) refGPtr(ptr); }
+
+ ~GRefPtr() { if (T* ptr = m_ptr) derefGPtr(ptr); }
+
+ void clear()
+ {
+ if (T* ptr = m_ptr)
+ derefGPtr(ptr);
+ m_ptr = 0;
+ }
+
+ T* get() const { return m_ptr; }
+ T& operator*() const { return *m_ptr; }
+ ALWAYS_INLINE T* operator->() const { return m_ptr; }
+
+ bool operator!() const { return !m_ptr; }
+
+ // This conversion operator allows implicit conversion to bool but not to other integer types.
+ typedef T* GRefPtr::*UnspecifiedBoolType;
+ operator UnspecifiedBoolType() const { return m_ptr ? &GRefPtr::m_ptr : 0; }
+
+ GRefPtr& operator=(const GRefPtr&);
+ GRefPtr& operator=(T*);
+ template <typename U> GRefPtr& operator=(const GRefPtr<U>&);
+
+ void swap(GRefPtr&);
+ friend GRefPtr adoptGRef<T>(T*);
+
+private:
+ static T* hashTableDeletedValue() { return reinterpret_cast<T*>(-1); }
+ // Adopting constructor.
+ GRefPtr(T* ptr, GRefPtrAdoptType) : m_ptr(ptr) {}
+
+ T* m_ptr;
+};
+
+template <typename T> inline GRefPtr<T>& GRefPtr<T>::operator=(const GRefPtr<T>& o)
+{
+ T* optr = o.get();
+ if (optr)
+ refGPtr(optr);
+ T* ptr = m_ptr;
+ m_ptr = optr;
+ if (ptr)
+ derefGPtr(ptr);
+ return *this;
+}
+
+template <typename T> inline GRefPtr<T>& GRefPtr<T>::operator=(T* optr)
+{
+ T* ptr = m_ptr;
+ if (optr)
+ refGPtr(optr);
+ m_ptr = optr;
+ if (ptr)
+ derefGPtr(ptr);
+ return *this;
+}
+
+template <class T> inline void GRefPtr<T>::swap(GRefPtr<T>& o)
+{
+ std::swap(m_ptr, o.m_ptr);
+}
+
+template <class T> inline void swap(GRefPtr<T>& a, GRefPtr<T>& b)
+{
+ a.swap(b);
+}
+
+template <typename T, typename U> inline bool operator==(const GRefPtr<T>& a, const GRefPtr<U>& b)
+{
+ return a.get() == b.get();
+}
+
+template <typename T, typename U> inline bool operator==(const GRefPtr<T>& a, U* b)
+{
+ return a.get() == b;
+}
+
+template <typename T, typename U> inline bool operator==(T* a, const GRefPtr<U>& b)
+{
+ return a == b.get();
+}
+
+template <typename T, typename U> inline bool operator!=(const GRefPtr<T>& a, const GRefPtr<U>& b)
+{
+ return a.get() != b.get();
+}
+
+template <typename T, typename U> inline bool operator!=(const GRefPtr<T>& a, U* b)
+{
+ return a.get() != b;
+}
+
+template <typename T, typename U> inline bool operator!=(T* a, const GRefPtr<U>& b)
+{
+ return a != b.get();
+}
+
+template <typename T, typename U> inline GRefPtr<T> static_pointer_cast(const GRefPtr<U>& p)
+{
+ return GRefPtr<T>(static_cast<T*>(p.get()));
+}
+
+template <typename T, typename U> inline GRefPtr<T> const_pointer_cast(const GRefPtr<U>& p)
+{
+ return GRefPtr<T>(const_cast<T*>(p.get()));
+}
+
+template <typename T> inline T* getPtr(const GRefPtr<T>& p)
+{
+ return p.get();
+}
+
+template <typename T> GRefPtr<T> adoptGRef(T* p)
+{
+ return GRefPtr<T>(p, GRefPtrAdopt);
+}
+
+template <typename T> inline T* refGPtr(T* ptr)
+{
+ if (ptr)
+ g_object_ref_sink(ptr);
+ return ptr;
+}
+
+template <typename T> inline void derefGPtr(T* ptr)
+{
+ if (ptr)
+ g_object_unref(ptr);
+}
+
+} // namespace WTF
+
+using WTF::GRefPtr;
+using WTF::refGPtr;
+using WTF::derefGPtr;
+using WTF::adoptGRef;
+using WTF::static_pointer_cast;
+using WTF::const_pointer_cast;
+
+#endif // WTF_GRefPtr_h
diff --git a/JavaScriptCore/wtf/gtk/ThreadingGtk.cpp b/JavaScriptCore/wtf/gtk/ThreadingGtk.cpp
index b4f4de1..a6ec8f7 100644
--- a/JavaScriptCore/wtf/gtk/ThreadingGtk.cpp
+++ b/JavaScriptCore/wtf/gtk/ThreadingGtk.cpp
@@ -138,7 +138,7 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con
return threadID;
}
-void setThreadNameInternal(const char*)
+void initializeCurrentThreadInternal(const char*)
{
}
diff --git a/JavaScriptCore/wtf/mac/MainThreadMac.mm b/JavaScriptCore/wtf/mac/MainThreadMac.mm
index c79acc1..0ddd5f6 100644
--- a/JavaScriptCore/wtf/mac/MainThreadMac.mm
+++ b/JavaScriptCore/wtf/mac/MainThreadMac.mm
@@ -49,17 +49,28 @@
namespace WTF {
static WTFMainThreadCaller* staticMainThreadCaller = nil;
+#if USE(WEB_THREAD)
+static NSThread* webThread = nil;
+#endif
void initializeMainThreadPlatform()
{
ASSERT(!staticMainThreadCaller);
staticMainThreadCaller = [[WTFMainThreadCaller alloc] init];
+
+#if USE(WEB_THREAD)
+ webThread = [[NSThread currentThread] retain];
+#endif
}
void scheduleDispatchFunctionsOnMainThread()
{
ASSERT(staticMainThreadCaller);
+#if USE(WEB_THREAD)
+ [staticMainThreadCaller performSelector:@selector(call) onThread:webThread withObject:nil waitUntilDone:NO];
+#else
[staticMainThreadCaller performSelectorOnMainThread:@selector(call) withObject:nil waitUntilDone:NO];
+#endif
}
} // namespace WTF
diff --git a/JavaScriptCore/wtf/qt/ThreadingQt.cpp b/JavaScriptCore/wtf/qt/ThreadingQt.cpp
index 1fdd2bb..dc04a68 100644
--- a/JavaScriptCore/wtf/qt/ThreadingQt.cpp
+++ b/JavaScriptCore/wtf/qt/ThreadingQt.cpp
@@ -29,6 +29,8 @@
#include "config.h"
#include "Threading.h"
+#if !ENABLE(SINGLE_THREADED)
+
#include "CurrentTime.h"
#include "HashMap.h"
#include "MainThread.h"
@@ -64,6 +66,21 @@ void ThreadPrivate::run()
m_returnValue = m_entryPoint(m_data);
}
+class ThreadMonitor : public QObject {
+ Q_OBJECT
+public:
+ static ThreadMonitor * instance()
+ {
+ static ThreadMonitor *instance = new ThreadMonitor();
+ return instance;
+ }
+
+public Q_SLOTS:
+ void threadFinished()
+ {
+ sender()->deleteLater();
+ }
+};
static Mutex* atomicallyInitializedStaticMutex;
@@ -155,6 +172,9 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con
LOG_ERROR("Failed to create thread at entry point %p with data %p", entryPoint, data);
return 0;
}
+
+ QObject::connect(thread, SIGNAL(finished()), ThreadMonitor::instance(), SLOT(threadFinished()));
+
thread->start();
QThread* threadRef = static_cast<QThread*>(thread);
@@ -162,7 +182,7 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con
return establishIdentifierForThread(threadRef);
}
-void setThreadNameInternal(const char*)
+void initializeCurrentThreadInternal(const char*)
{
}
@@ -181,8 +201,10 @@ int waitForThreadCompletion(ThreadIdentifier threadID, void** result)
return !res;
}
-void detachThread(ThreadIdentifier)
+void detachThread(ThreadIdentifier threadID)
{
+ ASSERT(threadID);
+ clearThreadForIdentifier(threadID);
}
ThreadIdentifier currentThread()
@@ -267,3 +289,7 @@ void ThreadCondition::broadcast()
}
} // namespace WebCore
+
+#include "ThreadingQt.moc"
+
+#endif
diff --git a/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp b/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp
index 6376bb3..a1753a4 100644
--- a/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp
+++ b/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp
@@ -36,7 +36,7 @@
#include <unicode/ucol.h>
#include <string.h>
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
#include "RetainPtr.h"
#include <CoreFoundation/CoreFoundation.h>
#endif
@@ -59,9 +59,9 @@ Collator::Collator(const char* locale)
std::auto_ptr<Collator> Collator::userDefault()
{
-#if PLATFORM(DARWIN) && PLATFORM(CF)
+#if OS(DARWIN) && PLATFORM(CF)
// Mac OS X doesn't set UNIX locale to match user-selected one, so ICU default doesn't work.
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !PLATFORM(IPHONE)
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !OS(IPHONE_OS)
RetainPtr<CFLocaleRef> currentLocale(AdoptCF, CFLocaleCopyCurrent());
CFStringRef collationOrder = (CFStringRef)CFLocaleGetValue(currentLocale.get(), kCFLocaleCollatorIdentifier);
#else
diff --git a/JavaScriptCore/wtf/win/MainThreadWin.cpp b/JavaScriptCore/wtf/win/MainThreadWin.cpp
index c6dcb7d..ee70b59 100644
--- a/JavaScriptCore/wtf/win/MainThreadWin.cpp
+++ b/JavaScriptCore/wtf/win/MainThreadWin.cpp
@@ -32,7 +32,7 @@
#include "Assertions.h"
#include "Threading.h"
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
#include <windows.h>
#endif
@@ -56,7 +56,8 @@ void initializeMainThreadPlatform()
if (threadingWindowHandle)
return;
-#if PLATFORM(WINCE)
+ HWND hWndParent = 0;
+#if OS(WINCE)
WNDCLASS wcex;
memset(&wcex, 0, sizeof(WNDCLASS));
#else
@@ -66,14 +67,15 @@ void initializeMainThreadPlatform()
#endif
wcex.lpfnWndProc = ThreadingWindowWndProc;
wcex.lpszClassName = kThreadingWindowClassName;
-#if PLATFORM(WINCE)
+#if OS(WINCE)
RegisterClass(&wcex);
#else
RegisterClassEx(&wcex);
+ hWndParent = HWND_MESSAGE;
#endif
threadingWindowHandle = CreateWindow(kThreadingWindowClassName, 0, 0,
- CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, 0, 0, 0);
+ CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, hWndParent, 0, 0, 0);
threadingFiredMessage = RegisterWindowMessage(L"com.apple.WebKit.MainThreadFired");
}
diff --git a/JavaScriptCore/wtf/wince/MemoryManager.cpp b/JavaScriptCore/wtf/wince/MemoryManager.cpp
index b65b368..81d4f80 100644
--- a/JavaScriptCore/wtf/wince/MemoryManager.cpp
+++ b/JavaScriptCore/wtf/wince/MemoryManager.cpp
@@ -139,25 +139,25 @@ void* fastZeroedMalloc(size_t n)
return p;
}
-void* tryFastMalloc(size_t n)
+TryMallocReturnValue tryFastMalloc(size_t n)
{
MemoryAllocationCanFail canFail;
return fastMalloc(n);
}
-void* tryFastZeroedMalloc(size_t n)
+TryMallocReturnValue tryFastZeroedMalloc(size_t n)
{
MemoryAllocationCanFail canFail;
return fastZeroedMalloc(n);
}
-void* tryFastCalloc(size_t n_elements, size_t element_size)
+TryMallocReturnValue tryFastCalloc(size_t n_elements, size_t element_size)
{
MemoryAllocationCanFail canFail;
return fastCalloc(n_elements, element_size);
}
-void* tryFastRealloc(void* p, size_t n)
+TryMallocReturnValue tryFastRealloc(void* p, size_t n)
{
MemoryAllocationCanFail canFail;
return fastRealloc(p, n);
diff --git a/JavaScriptCore/yarr/RegexCompiler.cpp b/JavaScriptCore/yarr/RegexCompiler.cpp
index c7b3c81..9cd3d12 100644
--- a/JavaScriptCore/yarr/RegexCompiler.cpp
+++ b/JavaScriptCore/yarr/RegexCompiler.cpp
@@ -708,7 +708,7 @@ const char* compileRegex(const UString& patternString, RegexPattern& pattern)
unsigned numSubpatterns = pattern.m_numSubpatterns;
constructor.reset();
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
const char* error =
#endif
parse(constructor, patternString, numSubpatterns);
diff --git a/JavaScriptCore/yarr/RegexJIT.cpp b/JavaScriptCore/yarr/RegexJIT.cpp
index 5ce579a..fcb8d86 100644
--- a/JavaScriptCore/yarr/RegexJIT.cpp
+++ b/JavaScriptCore/yarr/RegexJIT.cpp
@@ -44,7 +44,7 @@ namespace JSC { namespace Yarr {
class RegexGenerator : private MacroAssembler {
friend void jitCompileRegex(JSGlobalData* globalData, RegexCodeBlock& jitObject, const UString& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline);
-#if PLATFORM(ARM)
+#if CPU(ARM)
static const RegisterID input = ARMRegisters::r0;
static const RegisterID index = ARMRegisters::r1;
static const RegisterID length = ARMRegisters::r2;
@@ -54,7 +54,7 @@ class RegexGenerator : private MacroAssembler {
static const RegisterID regT1 = ARMRegisters::r6;
static const RegisterID returnRegister = ARMRegisters::r0;
-#elif PLATFORM(X86)
+#elif CPU(X86)
static const RegisterID input = X86Registers::eax;
static const RegisterID index = X86Registers::edx;
static const RegisterID length = X86Registers::ecx;
@@ -64,7 +64,7 @@ class RegexGenerator : private MacroAssembler {
static const RegisterID regT1 = X86Registers::esi;
static const RegisterID returnRegister = X86Registers::eax;
-#elif PLATFORM(X86_64)
+#elif CPU(X86_64)
static const RegisterID input = X86Registers::edi;
static const RegisterID index = X86Registers::esi;
static const RegisterID length = X86Registers::edx;
@@ -1288,11 +1288,11 @@ class RegexGenerator : private MacroAssembler {
void generateEnter()
{
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
push(X86Registers::ebp);
move(stackPointerRegister, X86Registers::ebp);
push(X86Registers::ebx);
-#elif PLATFORM(X86)
+#elif CPU(X86)
push(X86Registers::ebp);
move(stackPointerRegister, X86Registers::ebp);
// TODO: do we need spill registers to fill the output pointer if there are no sub captures?
@@ -1308,7 +1308,7 @@ class RegexGenerator : private MacroAssembler {
#else
loadPtr(Address(X86Registers::ebp, 2 * sizeof(void*)), output);
#endif
-#elif PLATFORM(ARM)
+#elif CPU(ARM)
push(ARMRegisters::r4);
push(ARMRegisters::r5);
push(ARMRegisters::r6);
@@ -1318,15 +1318,15 @@ class RegexGenerator : private MacroAssembler {
void generateReturn()
{
-#if PLATFORM(X86_64)
+#if CPU(X86_64)
pop(X86Registers::ebx);
pop(X86Registers::ebp);
-#elif PLATFORM(X86)
+#elif CPU(X86)
pop(X86Registers::esi);
pop(X86Registers::edi);
pop(X86Registers::ebx);
pop(X86Registers::ebp);
-#elif PLATFORM(ARM)
+#elif CPU(ARM)
pop(ARMRegisters::r6);
pop(ARMRegisters::r5);
pop(ARMRegisters::r4);
diff --git a/JavaScriptCore/yarr/RegexJIT.h b/JavaScriptCore/yarr/RegexJIT.h
index 1872f21..935b9a3 100644
--- a/JavaScriptCore/yarr/RegexJIT.h
+++ b/JavaScriptCore/yarr/RegexJIT.h
@@ -37,7 +37,7 @@
#include <pcre.h>
struct JSRegExp; // temporary, remove when fallback is removed.
-#if PLATFORM(X86) && !COMPILER(MSVC)
+#if CPU(X86) && !COMPILER(MSVC)
#define YARR_CALL __attribute__ ((regparm (3)))
#else
#define YARR_CALL
diff --git a/JavaScriptGlue/ChangeLog b/JavaScriptGlue/ChangeLog
index 95cce28..dc4ede9 100644
--- a/JavaScriptGlue/ChangeLog
+++ b/JavaScriptGlue/ChangeLog
@@ -1,3 +1,111 @@
+2010-01-28 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Simplify anonymous slot implementation
+ https://bugs.webkit.org/show_bug.cgi?id=34282
+
+ Update JSGlue Structure usage to pass the anonymous slot count.
+
+ * UserObjectImp.h:
+ (UserObjectImp::createStructure):
+
+2010-01-12 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Geoffrey Garen.
+
+ [ES5] Implement Object.getOwnPropertyNames
+ https://bugs.webkit.org/show_bug.cgi?id=32242
+
+ Add new argument to the reimplementation of getOwnPropertyNames().
+
+ * UserObjectImp.cpp:
+ (UserObjectImp::getOwnPropertyNames):
+ * UserObjectImp.h:
+
+2010-01-07 Alexey Proskuryakov <ap@apple.com>
+
+ Mac build fix.
+
+ * config.h: Define JS_EXPORTCLASS for JavaScriptGlue.
+
+2010-01-05 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33236
+ Remove m_identifierTable pointer from UString
+
+ Add API shims similar to those used in the JSC API to track the current identifierTable.
+
+ * JSBase.cpp:
+ (JSBase::Release):
+ * JSUtils.cpp:
+ (JSObjectKJSValue):
+ (KJSValueToCFTypeInternal):
+ (unprotectGlobalObject):
+ (JSGlueAPIEntry::JSGlueAPIEntry):
+ (JSGlueAPIEntry::~JSGlueAPIEntry):
+ (JSGlueAPICallback::JSGlueAPICallback):
+ (JSGlueAPICallback::~JSGlueAPICallback):
+ * JSUtils.h:
+ * JSValueWrapper.cpp:
+ (JSValueWrapper::JSObjectCopyPropertyNames):
+ (JSValueWrapper::JSObjectCopyProperty):
+ (JSValueWrapper::JSObjectSetProperty):
+ (JSValueWrapper::JSObjectCallFunction):
+ (JSValueWrapper::JSObjectCopyCFValue):
+ * JavaScriptGlue.cpp:
+ (JSRunCreate):
+ (JSRunEvaluate):
+ (JSRunCheckSyntax):
+ (JSCollect):
+ * JavaScriptGlue.xcodeproj/project.pbxproj:
+ * UserObjectImp.cpp:
+ (UserObjectImp::callAsFunction):
+
+2010-01-04 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add a forwarding header so that StringHashFunctions.h can be found.
+
+ * ForwardingHeaders/wtf/StringHashFunctions.h: Added.
+
+2010-01-04 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Ada Chan and Mark Rowe.
+
+ Updated copyright string
+
+ * Info.plist:
+
+2009-12-21 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32831
+ Replace UString::Rep implementation, following introduction of ropes to JSC.
+
+ * ForwardingHeaders/wtf/PossiblyNull.h: Added.
+ - add forwarding header.
+
+2009-12-16 Mark Rowe <mrowe@apple.com>
+
+ Build fix. Disable debug variants of WebKit frameworks.
+
+ * JavaScriptGlue.xcodeproj/project.pbxproj:
+
+2009-12-13 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Changed GC from mark-sweep to mark-allocate.
+
+ * JavaScriptGlue.cpp:
+ (JSCollect): Updated for rename. Fixed a bug where JSGlue would not check
+ to avoid nested GC calls.
+
2009-12-08 Dmitry Titov <dimich@chromium.org>
Rubber-stamped by David Levin.
diff --git a/JavaScriptGlue/Configurations/Version.xcconfig b/JavaScriptGlue/Configurations/Version.xcconfig
index b3bf41d..75f9bd4 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 = 532;
-MINOR_VERSION = 6;
+MINOR_VERSION = 9;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/JavaScriptGlue/ForwardingHeaders/wtf/PossiblyNull.h b/JavaScriptGlue/ForwardingHeaders/wtf/PossiblyNull.h
new file mode 100644
index 0000000..af7c120
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/wtf/PossiblyNull.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/PossiblyNull.h>
diff --git a/JavaScriptGlue/ForwardingHeaders/wtf/StringHashFunctions.h b/JavaScriptGlue/ForwardingHeaders/wtf/StringHashFunctions.h
new file mode 100644
index 0000000..e903ddd
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/wtf/StringHashFunctions.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/StringHashFunctions.h>
diff --git a/JavaScriptGlue/Info.plist b/JavaScriptGlue/Info.plist
index 0150e76..7232293 100644
--- a/JavaScriptGlue/Info.plist
+++ b/JavaScriptGlue/Info.plist
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundleGetInfoString</key>
- <string>${BUNDLE_VERSION}, Copyright 2003-2009 Apple Inc.</string>
- <key>CFBundleIdentifier</key>
- <string>com.apple.${PRODUCT_NAME}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleShortVersionString</key>
- <string>${SHORT_VERSION_STRING}</string>
- <key>CFBundleVersion</key>
- <string>${BUNDLE_VERSION}</string>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleGetInfoString</key>
+ <string>${BUNDLE_VERSION}, Copyright 2003-2010 Apple Inc.</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.apple.${PRODUCT_NAME}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>${SHORT_VERSION_STRING}</string>
+ <key>CFBundleVersion</key>
+ <string>${BUNDLE_VERSION}</string>
</dict>
</plist>
diff --git a/JavaScriptGlue/JSBase.cpp b/JavaScriptGlue/JSBase.cpp
index 7d44abc..39f24e5 100644
--- a/JavaScriptGlue/JSBase.cpp
+++ b/JavaScriptGlue/JSBase.cpp
@@ -46,7 +46,7 @@ void JSBase::Release()
{
if (--fRetainCount == 0)
{
- JSLock lock(LockForReal);
+ JSGlueAPIEntry entry;
delete this;
}
}
diff --git a/JavaScriptGlue/JSUtils.cpp b/JavaScriptGlue/JSUtils.cpp
index 862ae2e..67dba86 100644
--- a/JavaScriptGlue/JSUtils.cpp
+++ b/JavaScriptGlue/JSUtils.cpp
@@ -128,7 +128,7 @@ JSUserObject* KJSValueToJSObject(JSValue inValue, ExecState *exec)
//--------------------------------------------------------------------------
JSValue JSObjectKJSValue(JSUserObject* ptr)
{
- JSLock lock(LockForReal);
+ JSGlueAPIEntry entry;
JSValue result = jsUndefined();
if (ptr)
@@ -203,7 +203,7 @@ CFTypeRef KJSValueToCFTypeInternal(JSValue inValue, ExecState *exec, ObjectImpLi
CFTypeRef result = 0;
- JSLock lock(LockForReal);
+ JSGlueAPIEntry entry;
if (inValue.isBoolean())
{
@@ -394,7 +394,7 @@ static pthread_once_t globalObjectKeyOnce = PTHREAD_ONCE_INIT;
static void unprotectGlobalObject(void* data)
{
- JSLock lock(LockForReal);
+ JSGlueAPIEntry entry;
gcUnprotect(static_cast<JSGlueGlobalObject*>(data));
}
@@ -424,3 +424,26 @@ ExecState* getThreadGlobalExecState()
exec->clearException();
return exec;
}
+
+JSGlueAPIEntry::JSGlueAPIEntry()
+ : m_lock(LockForReal)
+ , m_storedIdentifierTable(currentIdentifierTable())
+{
+ setCurrentIdentifierTable(getThreadGlobalObject()->globalExec()->globalData().identifierTable);
+}
+
+JSGlueAPIEntry::~JSGlueAPIEntry()
+{
+ setCurrentIdentifierTable(m_storedIdentifierTable);
+}
+
+JSGlueAPICallback::JSGlueAPICallback(ExecState* exec)
+ : m_dropLocks(exec)
+{
+ resetCurrentIdentifierTable();
+}
+
+JSGlueAPICallback::~JSGlueAPICallback()
+{
+ setCurrentIdentifierTable(getThreadGlobalObject()->globalExec()->globalData().identifierTable);
+}
diff --git a/JavaScriptGlue/JSUtils.h b/JavaScriptGlue/JSUtils.h
index fee2663..05bce62 100644
--- a/JavaScriptGlue/JSUtils.h
+++ b/JavaScriptGlue/JSUtils.h
@@ -34,6 +34,7 @@
#include <JavaScriptCore/Collector.h>
#include <JavaScriptCore/JSValue.h>
#include <JavaScriptCore/Completion.h>
+#include <JavaScriptCore/Identifier.h>
#include <JavaScriptCore/JSLock.h>
#include <JavaScriptCore/JSObject.h>
#include <JavaScriptCore/JSGlobalObject.h>
@@ -76,5 +77,23 @@ enum {
kJSUserObjectDataTypeCFType
};
+class JSGlueAPIEntry {
+public:
+ JSGlueAPIEntry();
+ ~JSGlueAPIEntry();
+
+private:
+ JSLock m_lock;
+ IdentifierTable* m_storedIdentifierTable;
+};
+
+class JSGlueAPICallback {
+public:
+ JSGlueAPICallback(ExecState*);
+ ~JSGlueAPICallback();
+
+private:
+ JSLock::DropAllLocks m_dropLocks;
+};
#endif
diff --git a/JavaScriptGlue/JSValueWrapper.cpp b/JavaScriptGlue/JSValueWrapper.cpp
index 24b6f28..e0879a0 100644
--- a/JavaScriptGlue/JSValueWrapper.cpp
+++ b/JavaScriptGlue/JSValueWrapper.cpp
@@ -67,7 +67,7 @@ void JSValueWrapper::JSObjectDispose(void *data)
CFArrayRef JSValueWrapper::JSObjectCopyPropertyNames(void *data)
{
- JSLock lock(LockForReal);
+ JSGlueAPIEntry entry;
CFMutableArrayRef result = 0;
JSValueWrapper* ptr = (JSValueWrapper*)data;
@@ -102,7 +102,7 @@ CFArrayRef JSValueWrapper::JSObjectCopyPropertyNames(void *data)
JSObjectRef JSValueWrapper::JSObjectCopyProperty(void *data, CFStringRef propertyName)
{
- JSLock lock(LockForReal);
+ JSGlueAPIEntry entry;
JSObjectRef result = 0;
JSValueWrapper* ptr = (JSValueWrapper*)data;
@@ -126,7 +126,7 @@ JSObjectRef JSValueWrapper::JSObjectCopyProperty(void *data, CFStringRef propert
void JSValueWrapper::JSObjectSetProperty(void *data, CFStringRef propertyName, JSObjectRef jsValue)
{
- JSLock lock(LockForReal);
+ JSGlueAPIEntry entry;
JSValueWrapper* ptr = (JSValueWrapper*)data;
if (ptr)
@@ -141,7 +141,7 @@ void JSValueWrapper::JSObjectSetProperty(void *data, CFStringRef propertyName, J
JSObjectRef JSValueWrapper::JSObjectCallFunction(void *data, JSObjectRef thisObj, CFArrayRef args)
{
- JSLock lock(LockForReal);
+ JSGlueAPIEntry entry;
JSObjectRef result = 0;
JSValueWrapper* ptr = (JSValueWrapper*)data;
@@ -181,7 +181,7 @@ JSObjectRef JSValueWrapper::JSObjectCallFunction(void *data, JSObjectRef thisObj
CFTypeRef JSValueWrapper::JSObjectCopyCFValue(void *data)
{
- JSLock lock(LockForReal);
+ JSGlueAPIEntry entry;
CFTypeRef result = 0;
JSValueWrapper* ptr = (JSValueWrapper*)data;
diff --git a/JavaScriptGlue/JavaScriptGlue.cpp b/JavaScriptGlue/JavaScriptGlue.cpp
index b4f26e9..134d310 100644
--- a/JavaScriptGlue/JavaScriptGlue.cpp
+++ b/JavaScriptGlue/JavaScriptGlue.cpp
@@ -246,7 +246,7 @@ JSRunRef JSRunCreate(CFStringRef jsSource, JSFlags inFlags)
JSRunRef result = 0;
if (jsSource)
{
- JSLock lock(LockForReal);
+ JSGlueAPIEntry entry;
result = (JSRunRef) new JSRun(jsSource, inFlags);
}
return result;
@@ -291,7 +291,7 @@ JSObjectRef JSRunEvaluate(JSRunRef ref)
JSRun* ptr = (JSRun*)ref;
if (ptr)
{
- JSLock lock(LockForReal);
+ JSGlueAPIEntry entry;
Completion completion = ptr->Evaluate();
if (completion.isValueCompletion())
{
@@ -325,7 +325,7 @@ bool JSRunCheckSyntax(JSRunRef ref)
JSRun* ptr = (JSRun*)ref;
if (ptr)
{
- JSLock lock(LockForReal);
+ JSGlueAPIEntry entry;
result = ptr->CheckSyntax();
}
return result;
@@ -338,8 +338,10 @@ void JSCollect()
{
initializeThreading();
- JSLock lock(LockForReal);
- getThreadGlobalExecState()->heap()->collect();
+ JSGlueAPIEntry entry;
+ Heap* heap = getThreadGlobalExecState()->heap();
+ if (!heap->isBusy())
+ heap->collectAllGarbage();
}
/*
diff --git a/JavaScriptGlue/JavaScriptGlue.xcodeproj/project.pbxproj b/JavaScriptGlue/JavaScriptGlue.xcodeproj/project.pbxproj
index 80c895a..677cf6f 100644
--- a/JavaScriptGlue/JavaScriptGlue.xcodeproj/project.pbxproj
+++ b/JavaScriptGlue/JavaScriptGlue.xcodeproj/project.pbxproj
@@ -537,10 +537,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 1C9051A10BA9F3050081E9D0 /* JavaScriptGlue.xcconfig */;
buildSettings = {
- BUILD_VARIANTS = (
- normal,
- debug,
- );
+ BUILD_VARIANTS = normal;
SECTORDER_FLAGS = (
"-sectorder",
__TEXT,
diff --git a/JavaScriptGlue/UserObjectImp.cpp b/JavaScriptGlue/UserObjectImp.cpp
index 125e349..1fbb982 100644
--- a/JavaScriptGlue/UserObjectImp.cpp
+++ b/JavaScriptGlue/UserObjectImp.cpp
@@ -75,7 +75,7 @@ JSValue UserObjectImp::callAsFunction(ExecState *exec, JSObject *thisObj, const
JSUserObject* jsResult;
{ // scope
- JSLock::DropAllLocks dropLocks(exec);
+ JSGlueAPICallback apiCallback(exec);
// getCallData should have guarded against a NULL fJSUserObject.
assert(fJSUserObject);
@@ -94,7 +94,7 @@ JSValue UserObjectImp::callAsFunction(ExecState *exec, JSObject *thisObj, const
}
-void UserObjectImp::getOwnPropertyNames(ExecState *exec, PropertyNameArray& propertyNames)
+void UserObjectImp::getOwnPropertyNames(ExecState *exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
JSUserObject* ptr = GetJSUserObject();
if (ptr) {
@@ -109,7 +109,7 @@ void UserObjectImp::getOwnPropertyNames(ExecState *exec, PropertyNameArray& prop
CFRelease(cfPropertyNames);
}
}
- JSObject::getOwnPropertyNames(exec, propertyNames);
+ JSObject::getOwnPropertyNames(exec, propertyNames, mode);
}
JSValue UserObjectImp::userObjectGetter(ExecState*, const Identifier& propertyName, const PropertySlot& slot)
diff --git a/JavaScriptGlue/UserObjectImp.h b/JavaScriptGlue/UserObjectImp.h
index 6bb5792..6f857f9 100644
--- a/JavaScriptGlue/UserObjectImp.h
+++ b/JavaScriptGlue/UserObjectImp.h
@@ -44,7 +44,7 @@ public:
virtual CallType getCallData(CallData&);
- virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&);
+ virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
virtual JSValue callAsFunction(ExecState *exec, JSObject *thisObj, const ArgList &args);
virtual bool getOwnPropertySlot(ExecState *, const Identifier&, PropertySlot&);
@@ -61,7 +61,7 @@ public:
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, OverridesGetOwnPropertySlot | OverridesMarkChildren | OverridesGetPropertyNames));
+ return Structure::create(prototype, TypeInfo(ObjectType, OverridesGetOwnPropertySlot | OverridesMarkChildren | OverridesGetPropertyNames), AnonymousSlotCount);
}
private:
diff --git a/JavaScriptGlue/config.h b/JavaScriptGlue/config.h
index 88bbb9a..62a17f0 100644
--- a/JavaScriptGlue/config.h
+++ b/JavaScriptGlue/config.h
@@ -18,3 +18,4 @@
#define WTF_USE_JSC !WTF_USE_V8
#define JS_EXPORTDATA
+#define JS_EXPORTCLASS
diff --git a/SunSpider/ChangeLog b/SunSpider/ChangeLog
index daed7ee..a200015 100644
--- a/SunSpider/ChangeLog
+++ b/SunSpider/ChangeLog
@@ -1,3 +1,209 @@
+2010-01-11 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Sunspider parse-only tests don't run
+ https://bugs.webkit.org/show_bug.cgi?id=33489
+
+ Fix parse-only test list
+
+ * tests/parse-only/LIST:
+
+2009-12-15 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Make SunSpider version more prominent in the title
+ https://bugs.webkit.org/show_bug.cgi?id=32574
+
+ * hosted/sunspider.html:
+ * hosted/versions.html:
+ * resources/driver-TEMPLATE.html:
+ * resources/results-TEMPLATE.html:
+
+2009-12-15 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Make SunSpider refuse to compare results across content versions
+ https://bugs.webkit.org/show_bug.cgi?id=32573
+
+ The results URL now includes a version indicator, and compare mode
+ will refuse to compare between versions.
+
+ * resources/driver-TEMPLATE.html:
+ * resources/results-TEMPLATE.html:
+
+2009-12-14 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Some Browser-hosted SunSpider files are not valid HTML5
+ https://bugs.webkit.org/show_bug.cgi?id=32536
+
+ Made various fixes to validate as HTML5 with no warnings (mainly removing bogus
+ close tags and adding a meta charset declaration).
+
+ * hosted/sunspider.html:
+ * hosted/versions.html:
+ * resources/TEMPLATE.html:
+ * resources/driver-TEMPLATE.html:
+ * resources/results-TEMPLATE.html:
+
+2009-12-14 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Make sunspider-0.9.1 the default content set (both command-line and hosted)
+ https://bugs.webkit.org/show_bug.cgi?id=32537
+
+ * hosted/sunspider.html: Change default suite link.
+ * sunspider: Change default suite.
+ * sunspider-compare-results: Likewise.
+
+2009-12-14 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ in-browser SunSpider suffers excessive penalty under power management
+ https://bugs.webkit.org/show_bug.cgi?id=32505
+
+ I have made a few changes to address this:
+
+ 1) Change how browser-hosted SunSpider loads tests - preload the content and write it in with
+ document.write to reduce triggering of progress UI.
+ 2) Reduce time between tests to 10ms from 500ms, so that power management doesn't keep the CPU
+ stepped all the way down the whole time.
+ 3) Run the test cycle an extra time for warmup before the runs that count.
+
+ * hosted/sunspider-record-result.js: Removed.
+ * make-hosted:
+ * resources/TEMPLATE.html:
+ * resources/driver-TEMPLATE.html:
+
+2009-12-13 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ SunSpider/tests/string-base64.js does not compute a valid base64 encoded string
+ https://bugs.webkit.org/show_bug.cgi?id=16806
+
+ Based on a patch by Eric Seidel.
+
+ Fix the base64 computation to actually compute correct results. The impact on runtime of
+ the test is pretty small, but noticeable for some browsers. But at least it's not
+ doing a wrong and meaningless computation any more.
+
+ * tests/sunspider-0.9.1/string-base64.js:
+ ():
+ (base64ToString):
+
+2009-12-13 Maciej Stachowiak <mjs@apple.com>
+
+ Fixing commit error...
+
+ I accidentally committed my last patch in a form that broke Web-hosted SunSpider. Fixing.
+
+ * resources/driver-TEMPLATE.html:
+
+2009-12-13 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Use JSON.parse instead of eval for Web-hosted SunSpider results processing
+ https://bugs.webkit.org/show_bug.cgi?id=32490
+
+ * hosted/json2.js: Added. Incorporated from json.org
+ * resources/driver-TEMPLATE.html: Fix an HTML validation bug I noticed.
+ * resources/results-TEMPLATE.html: Use JSON.parse instead of eval to process
+ results.
+
+2009-12-12 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Enable Web-hosted version of SunSpider to handle multiple versions
+ https://bugs.webkit.org/show_bug.cgi?id=32478
+
+ * make-hosted: Now generate the hosted version to be able to run both the
+ 0.9 and the 0.9.1 test suites.
+ * hosted: Modified property svn:ignore.
+ * hosted/sunspider-driver.html: Removed.
+ * hosted/sunspider-results.html: Removed.
+ * hosted/sunspider.html:
+ * hosted/versions.html: Added.
+ * resources/TEMPLATE.html:
+ * resources/driver-TEMPLATE.html: Copied from hosted/sunspider-driver.html.
+ * resources/driver-TEMPLATE.html: Copied from hosted/sunspider-results.html.
+
+2009-12-12 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Give command-line sunspider the ability to handle multiple suites and versions
+ https://bugs.webkit.org/show_bug.cgi?id=32477
+
+ Each suite/version's set of tests are now in a separate subdirectory of tests/, with a file named LIST
+ enumerating the tests. Current suites are:
+
+ sunspider-0.9 - riginal SunSpider content
+ sunspider-0.9.1 - SunSpider suite with a few tests fixed (and a few more to come)
+ ubench - "ubench" microbenchmark suite
+ v8-v4 - version 4 of the v8 benchmark
+ parse-only - some parser tests
+
+ Sunspider can now be run with the --suite= parameter to select a
+ suite. The default is --suite=sunspider-0.9.
+
+ * .: Modified property svn:ignore to ignore new results directories.
+ * make-hosted: Generate based on sunspider-0.9 suite.
+ * resources/TEMPLATE.html: Fix an HTML compliance problem.
+ * resources/sunspider-standalone-driver.js: Become aware of suite names.
+ * sunspider: Modified to handle multiple suites as described above.
+ * sunspider-compare-results: ditto
+ * tests/LIST: Moved to tests/sunspider-0.9/ and tests/sunspider-0.9.1/
+ * tests/LIST-PARSE-ONLY: Moved to parse-only/LIST
+ * tests/LIST-UBENCH: Removed.
+ * tests/LIST-V8: Removed.
+ * tests/3d-cube.js: Moved to tests/sunspider-0.9 and tests/sunspider-0.9.1
+ * tests/3d-morph.js: ditto
+ * tests/3d-raytrace.js: ditto
+ * tests/access-binary-trees.js: ditto
+ * tests/access-fannkuch.js: ditto
+ * tests/access-nbody.js: ditto
+ * tests/access-nsieve.js: ditto
+ * tests/bitops-3bit-bits-in-byte.js: ditto
+ * tests/bitops-bits-in-byte.js: ditto
+ * tests/bitops-bitwise-and.js: ditto
+ * tests/bitops-nsieve-bits.js: ditto
+ * tests/controlflow-recursive.js: ditto
+ * tests/crypto-aes.js: ditto
+ * tests/crypto-md5.js: ditto
+ * tests/crypto-sha1.js: ditto
+ * tests/date-format-tofte.js: ditto
+ * tests/date-format-xparb.js: ditto
+ * tests/math-cordic.js: ditto
+ * tests/math-partial-sums.js: ditto
+ * tests/math-spectral-norm.js: ditto
+ * tests/regexp-dna.js: ditto
+ * tests/string-base64.js: ditto
+ * tests/string-fasta.js: ditto
+ * tests/string-tagcloud.js: ditto
+ * tests/string-unpack-code.js: ditto
+ * tests/string-validate-input.js: ditto
+ * tests/sunspider-0.9/: Added
+ * tests/sunspider-0.9/*.js: Moved from one level up
+ * tests/sunspider-0.9.1: Added.
+ * tests/sunspider-0.9.1/*.js: Moved from one level up.
+ * tests/v8-crypto.js: Moved to v8-v4/ directory.
+ * tests/v8-deltablue.js: ditto
+ * tests/v8-earley-boyer.js: ditto
+ * tests/v8-raytrace.js: ditto
+ * tests/v8-regexp.js: ditto
+ * tests/v8-richards.js: ditto
+ * tests/v8-splay.js: ditto
+ * tests/v8-v4: Added.
+
2009-09-30 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
Reviewed by Darin Adler.
diff --git a/SunSpider/hosted/json2.js b/SunSpider/hosted/json2.js
new file mode 100644
index 0000000..39d8f37
--- /dev/null
+++ b/SunSpider/hosted/json2.js
@@ -0,0 +1,481 @@
+/*
+ http://www.JSON.org/json2.js
+ 2009-09-29
+
+ Public Domain.
+
+ NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+
+ See http://www.JSON.org/js.html
+
+
+ This code should be minified before deployment.
+ See http://javascript.crockford.com/jsmin.html
+
+ USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
+ NOT CONTROL.
+
+
+ This file creates a global JSON object containing two methods: stringify
+ and parse.
+
+ JSON.stringify(value, replacer, space)
+ value any JavaScript value, usually an object or array.
+
+ replacer an optional parameter that determines how object
+ values are stringified for objects. It can be a
+ function or an array of strings.
+
+ space an optional parameter that specifies the indentation
+ of nested structures. If it is omitted, the text will
+ be packed without extra whitespace. If it is a number,
+ it will specify the number of spaces to indent at each
+ level. If it is a string (such as '\t' or '&nbsp;'),
+ it contains the characters used to indent at each level.
+
+ This method produces a JSON text from a JavaScript value.
+
+ When an object value is found, if the object contains a toJSON
+ method, its toJSON method will be called and the result will be
+ stringified. A toJSON method does not serialize: it returns the
+ value represented by the name/value pair that should be serialized,
+ or undefined if nothing should be serialized. The toJSON method
+ will be passed the key associated with the value, and this will be
+ bound to the value
+
+ For example, this would serialize Dates as ISO strings.
+
+ Date.prototype.toJSON = function (key) {
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10 ? '0' + n : n;
+ }
+
+ return this.getUTCFullYear() + '-' +
+ f(this.getUTCMonth() + 1) + '-' +
+ f(this.getUTCDate()) + 'T' +
+ f(this.getUTCHours()) + ':' +
+ f(this.getUTCMinutes()) + ':' +
+ f(this.getUTCSeconds()) + 'Z';
+ };
+
+ You can provide an optional replacer method. It will be passed the
+ key and value of each member, with this bound to the containing
+ object. The value that is returned from your method will be
+ serialized. If your method returns undefined, then the member will
+ be excluded from the serialization.
+
+ If the replacer parameter is an array of strings, then it will be
+ used to select the members to be serialized. It filters the results
+ such that only members with keys listed in the replacer array are
+ stringified.
+
+ Values that do not have JSON representations, such as undefined or
+ functions, will not be serialized. Such values in objects will be
+ dropped; in arrays they will be replaced with null. You can use
+ a replacer function to replace those with JSON values.
+ JSON.stringify(undefined) returns undefined.
+
+ The optional space parameter produces a stringification of the
+ value that is filled with line breaks and indentation to make it
+ easier to read.
+
+ If the space parameter is a non-empty string, then that string will
+ be used for indentation. If the space parameter is a number, then
+ the indentation will be that many spaces.
+
+ Example:
+
+ text = JSON.stringify(['e', {pluribus: 'unum'}]);
+ // text is '["e",{"pluribus":"unum"}]'
+
+
+ text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
+ // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
+
+ text = JSON.stringify([new Date()], function (key, value) {
+ return this[key] instanceof Date ?
+ 'Date(' + this[key] + ')' : value;
+ });
+ // text is '["Date(---current time---)"]'
+
+
+ JSON.parse(text, reviver)
+ This method parses a JSON text to produce an object or array.
+ It can throw a SyntaxError exception.
+
+ The optional reviver parameter is a function that can filter and
+ transform the results. It receives each of the keys and values,
+ and its return value is used instead of the original value.
+ If it returns what it received, then the structure is not modified.
+ If it returns undefined then the member is deleted.
+
+ Example:
+
+ // Parse the text. Values that look like ISO date strings will
+ // be converted to Date objects.
+
+ myData = JSON.parse(text, function (key, value) {
+ var a;
+ if (typeof value === 'string') {
+ a =
+/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
+ if (a) {
+ return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
+ +a[5], +a[6]));
+ }
+ }
+ return value;
+ });
+
+ myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
+ var d;
+ if (typeof value === 'string' &&
+ value.slice(0, 5) === 'Date(' &&
+ value.slice(-1) === ')') {
+ d = new Date(value.slice(5, -1));
+ if (d) {
+ return d;
+ }
+ }
+ return value;
+ });
+
+
+ This is a reference implementation. You are free to copy, modify, or
+ redistribute.
+*/
+
+/*jslint evil: true, strict: false */
+
+/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
+ call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
+ getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
+ lastIndex, length, parse, prototype, push, replace, slice, stringify,
+ test, toJSON, toString, valueOf
+*/
+
+
+// Create a JSON object only if one does not already exist. We create the
+// methods in a closure to avoid creating global variables.
+
+if (!this.JSON) {
+ this.JSON = {};
+}
+
+(function () {
+
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10 ? '0' + n : n;
+ }
+
+ if (typeof Date.prototype.toJSON !== 'function') {
+
+ Date.prototype.toJSON = function (key) {
+
+ return isFinite(this.valueOf()) ?
+ this.getUTCFullYear() + '-' +
+ f(this.getUTCMonth() + 1) + '-' +
+ f(this.getUTCDate()) + 'T' +
+ f(this.getUTCHours()) + ':' +
+ f(this.getUTCMinutes()) + ':' +
+ f(this.getUTCSeconds()) + 'Z' : null;
+ };
+
+ String.prototype.toJSON =
+ Number.prototype.toJSON =
+ Boolean.prototype.toJSON = function (key) {
+ return this.valueOf();
+ };
+ }
+
+ var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ gap,
+ indent,
+ meta = { // table of character substitutions
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '"' : '\\"',
+ '\\': '\\\\'
+ },
+ rep;
+
+
+ function quote(string) {
+
+// If the string contains no control characters, no quote characters, and no
+// backslash characters, then we can safely slap some quotes around it.
+// Otherwise we must also replace the offending characters with safe escape
+// sequences.
+
+ escapable.lastIndex = 0;
+ return escapable.test(string) ?
+ '"' + string.replace(escapable, function (a) {
+ var c = meta[a];
+ return typeof c === 'string' ? c :
+ '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ }) + '"' :
+ '"' + string + '"';
+ }
+
+
+ function str(key, holder) {
+
+// Produce a string from holder[key].
+
+ var i, // The loop counter.
+ k, // The member key.
+ v, // The member value.
+ length,
+ mind = gap,
+ partial,
+ value = holder[key];
+
+// If the value has a toJSON method, call it to obtain a replacement value.
+
+ if (value && typeof value === 'object' &&
+ typeof value.toJSON === 'function') {
+ value = value.toJSON(key);
+ }
+
+// If we were called with a replacer function, then call the replacer to
+// obtain a replacement value.
+
+ if (typeof rep === 'function') {
+ value = rep.call(holder, key, value);
+ }
+
+// What happens next depends on the value's type.
+
+ switch (typeof value) {
+ case 'string':
+ return quote(value);
+
+ case 'number':
+
+// JSON numbers must be finite. Encode non-finite numbers as null.
+
+ return isFinite(value) ? String(value) : 'null';
+
+ case 'boolean':
+ case 'null':
+
+// If the value is a boolean or null, convert it to a string. Note:
+// typeof null does not produce 'null'. The case is included here in
+// the remote chance that this gets fixed someday.
+
+ return String(value);
+
+// If the type is 'object', we might be dealing with an object or an array or
+// null.
+
+ case 'object':
+
+// Due to a specification blunder in ECMAScript, typeof null is 'object',
+// so watch out for that case.
+
+ if (!value) {
+ return 'null';
+ }
+
+// Make an array to hold the partial results of stringifying this object value.
+
+ gap += indent;
+ partial = [];
+
+// Is the value an array?
+
+ if (Object.prototype.toString.apply(value) === '[object Array]') {
+
+// The value is an array. Stringify every element. Use null as a placeholder
+// for non-JSON values.
+
+ length = value.length;
+ for (i = 0; i < length; i += 1) {
+ partial[i] = str(i, value) || 'null';
+ }
+
+// Join all of the elements together, separated with commas, and wrap them in
+// brackets.
+
+ v = partial.length === 0 ? '[]' :
+ gap ? '[\n' + gap +
+ partial.join(',\n' + gap) + '\n' +
+ mind + ']' :
+ '[' + partial.join(',') + ']';
+ gap = mind;
+ return v;
+ }
+
+// If the replacer is an array, use it to select the members to be stringified.
+
+ if (rep && typeof rep === 'object') {
+ length = rep.length;
+ for (i = 0; i < length; i += 1) {
+ k = rep[i];
+ if (typeof k === 'string') {
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ } else {
+
+// Otherwise, iterate through all of the keys in the object.
+
+ for (k in value) {
+ if (Object.hasOwnProperty.call(value, k)) {
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ }
+
+// Join all of the member texts together, separated with commas,
+// and wrap them in braces.
+
+ v = partial.length === 0 ? '{}' :
+ gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
+ mind + '}' : '{' + partial.join(',') + '}';
+ gap = mind;
+ return v;
+ }
+ }
+
+// If the JSON object does not yet have a stringify method, give it one.
+
+ if (typeof JSON.stringify !== 'function') {
+ JSON.stringify = function (value, replacer, space) {
+
+// The stringify method takes a value and an optional replacer, and an optional
+// space parameter, and returns a JSON text. The replacer can be a function
+// that can replace values, or an array of strings that will select the keys.
+// A default replacer method can be provided. Use of the space parameter can
+// produce text that is more easily readable.
+
+ var i;
+ gap = '';
+ indent = '';
+
+// If the space parameter is a number, make an indent string containing that
+// many spaces.
+
+ if (typeof space === 'number') {
+ for (i = 0; i < space; i += 1) {
+ indent += ' ';
+ }
+
+// If the space parameter is a string, it will be used as the indent string.
+
+ } else if (typeof space === 'string') {
+ indent = space;
+ }
+
+// If there is a replacer, it must be a function or an array.
+// Otherwise, throw an error.
+
+ rep = replacer;
+ if (replacer && typeof replacer !== 'function' &&
+ (typeof replacer !== 'object' ||
+ typeof replacer.length !== 'number')) {
+ throw new Error('JSON.stringify');
+ }
+
+// Make a fake root object containing our value under the key of ''.
+// Return the result of stringifying the value.
+
+ return str('', {'': value});
+ };
+ }
+
+
+// If the JSON object does not yet have a parse method, give it one.
+
+ if (typeof JSON.parse !== 'function') {
+ JSON.parse = function (text, reviver) {
+
+// The parse method takes a text and an optional reviver function, and returns
+// a JavaScript value if the text is a valid JSON text.
+
+ var j;
+
+ function walk(holder, key) {
+
+// The walk method is used to recursively walk the resulting structure so
+// that modifications can be made.
+
+ var k, v, value = holder[key];
+ if (value && typeof value === 'object') {
+ for (k in value) {
+ if (Object.hasOwnProperty.call(value, k)) {
+ v = walk(value, k);
+ if (v !== undefined) {
+ value[k] = v;
+ } else {
+ delete value[k];
+ }
+ }
+ }
+ }
+ return reviver.call(holder, key, value);
+ }
+
+
+// Parsing happens in four stages. In the first stage, we replace certain
+// Unicode characters with escape sequences. JavaScript handles many characters
+// incorrectly, either silently deleting them, or treating them as line endings.
+
+ cx.lastIndex = 0;
+ if (cx.test(text)) {
+ text = text.replace(cx, function (a) {
+ return '\\u' +
+ ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ });
+ }
+
+// In the second stage, we run the text against regular expressions that look
+// for non-JSON patterns. We are especially concerned with '()' and 'new'
+// because they can cause invocation, and '=' because it can cause mutation.
+// But just to be safe, we want to reject all unexpected forms.
+
+// We split the second stage into 4 regexp operations in order to work around
+// crippling inefficiencies in IE's and Safari's regexp engines. First we
+// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
+// replace all simple value tokens with ']' characters. Third, we delete all
+// open brackets that follow a colon or comma or that begin the text. Finally,
+// we look to see that the remaining characters are only whitespace or ']' or
+// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
+
+ if (/^[\],:{}\s]*$/.
+test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
+replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
+replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
+
+// In the third stage we use the eval function to compile the text into a
+// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
+// in JavaScript: it can begin a block or an object literal. We wrap the text
+// in parens to eliminate the ambiguity.
+
+ j = eval('(' + text + ')');
+
+// In the optional fourth stage, we recursively walk the new structure, passing
+// each name/value pair to a reviver function for possible transformation.
+
+ return typeof reviver === 'function' ?
+ walk({'': j}, '') : j;
+ }
+
+// If the text is not JSON parseable, then a SyntaxError is thrown.
+
+ throw new SyntaxError('JSON.parse');
+ };
+ }
+}());
diff --git a/SunSpider/hosted/sunspider.html b/SunSpider/hosted/sunspider.html
index f7dfd42..ac65970 100644
--- a/SunSpider/hosted/sunspider.html
+++ b/SunSpider/hosted/sunspider.html
@@ -2,6 +2,8 @@
<html>
<head>
+<meta charset=utf8>
+
<!--
Copyright (C) 2007 Apple Inc. All rights reserved.
@@ -26,14 +28,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.
-->
-
-<title>SunSpider JavaScript Benchmark</title>
-<link rel="stylesheet" href="sunspider.css"></link>
+<title>SunSpider 0.9.1 JavaScript Benchmark</title>
+<link rel="stylesheet" href="sunspider.css">
</head>
<body>
-<h2><span id="logo">&#x2600;</span>SunSpider JavaScript Benchmark</h2>
+<h2><span id="logo">&#x2600;</span>SunSpider 0.9.1 JavaScript Benchmark</h2>
<p>This is SunSpider, a JavaScript benchmark. This benchmark tests the
core JavaScript language only, not the DOM or other browser APIs. It
@@ -69,10 +70,12 @@ significant.</dd>
</dl>
-<p><a href="sunspider-driver.html">Start Now!</a><br>
+<p><b>Current version - sunspider-0.9.1:</b> <a href="sunspider-0.9.1/driver.html">Start Now!</a><br>
<small>(When you run the benchmark, be patient - it loops through all of the
test cases five times and can take a minute or longer to complete.)</small></p>
+<a href="versions.html">All versions.</a>
+
</body>
</html>
diff --git a/SunSpider/hosted/versions.html b/SunSpider/hosted/versions.html
new file mode 100644
index 0000000..47741ce
--- /dev/null
+++ b/SunSpider/hosted/versions.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html>
+<head>
+
+<meta charset=utf8>
+
+<!--
+ Copyright (C) 2007 Apple Inc. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<title>SunSpider 0.9.1 JavaScript Benchmark</title>
+<link rel="stylesheet" href="sunspider.css">
+</head>
+
+<body>
+
+<h2><span id="logo">&#x2600;</span>SunSpider 0.9.1 JavaScript Benchmark</h2>
+
+<p>This is SunSpider, a JavaScript benchmark. This benchmark tests the
+core JavaScript language only, not the DOM or other browser APIs. It
+is designed to compare different versions of the same browser, and
+different browsers to each other.</p>
+
+<p>This version of the harness is 0.9.1. This page lists all versions
+of the test content:</p>
+
+<ul>
+<li><a href="sunspider-0.9/driver.html">Version 0.9</a></li>
+<li><a href="sunspider-0.9.1/driver.html">Version 0.9.1</a></li>
+</ul>
+
+</body>
+<html>
diff --git a/SunSpider/make-hosted b/SunSpider/make-hosted
index 303de56..fb4608a 100755
--- a/SunSpider/make-hosted
+++ b/SunSpider/make-hosted
@@ -29,49 +29,84 @@ open TEMPLATE, "<resources/TEMPLATE.html";
my $template = do { local $/; <TEMPLATE> };
close TEMPLATE;
+open DRIVER_TEMPLATE, "<resources/driver-TEMPLATE.html";
+my $driverTemplate = do { local $/; <DRIVER_TEMPLATE> };
+close DRIVER_TEMPLATE;
+
+open RESULTS_TEMPLATE, "<resources/results-TEMPLATE.html";
+my $resultsTemplate = do { local $/; <RESULTS_TEMPLATE> };
+close RESULTS_TEMPLATE;
+
my @tests = ();
my @categories = ();
my %uniqueCategories = ();
-open TESTLIST, "<./tests/LIST";
-while (<TESTLIST>) {
- chomp;
- next unless $_;
- push @tests, $_;
- my $category = $_;
- $category =~ s/-.*//;
- if (!$uniqueCategories{$category}) {
- push @categories, $category;
- $uniqueCategories{$category} = $category;
+my @suites = ("sunspider-0.9", "sunspider-0.9.1");
+
+foreach my $suite (@suites) {
+
+ mkdir "hosted/${suite}";
+
+ open TESTLIST, "<./tests/${suite}/LIST";
+ while (<TESTLIST>) {
+ chomp;
+ next unless $_;
+ push @tests, $_;
+ my $category = $_;
+ $category =~ s/-.*//;
+ if (!$uniqueCategories{$category}) {
+ push @categories, $category;
+ $uniqueCategories{$category} = $category;
+ }
}
-}
-close TESTLIST;
+ close TESTLIST;
+
+ my @testContents = ();
+ for my $test (@tests) {
+ my $name = "${test}";
+
+ open SCRIPT, "<tests/${suite}/${test}.js";
+ my $script = do { local $/; <SCRIPT> };
+ close SCRIPT;
-for my $test (@tests) {
- my $name = "${test}";
+ my $output = $template;
+ $output =~ s/\@NAME\@/${name}/g;
+ $output =~ s/\@SCRIPT\@/${script}/g;
+ $output =~ s/\\/\\\\/g;
+ $output =~ s/"/\\"/g;
+ $output =~ s/\n/\\n\\\n/g;
+ $output = $output;
+ push @testContents, $output;
+ }
+
+ my $output = $driverTemplate;
+ $output =~ s/\@SUITE\@/${suite}/g;
- open SCRIPT, "<tests/${test}.js";
- my $script = do { local $/; <SCRIPT> };
- close SCRIPT;
+ open OUTPUT, ">hosted/${suite}/driver.html";
+ print OUTPUT $output;
+ close OUTPUT;
- my $output = $template;
- $output =~ s/\@NAME\@/${name}/g;
- $output =~ s/\@SCRIPT\@/${script}/g;
+ $output = $resultsTemplate;
+ $output =~ s/\@SUITE\@/${suite}/g;
- open OUTPUT, ">hosted/${test}.html";
+ open OUTPUT, ">hosted/${suite}/results.html";
print OUTPUT $output;
close OUTPUT;
-}
+ my $prefix = "var tests = [ " . join(", ", map { '"' . $_ . '"' } @tests) . " ];\n";
+ $prefix .= "var categories = [ " . join(", ", map { '"' . $_ . '"' } @categories) . " ];\n";
+
+ open PREFIX, ">hosted/${suite}/sunspider-test-prefix.js";
+ print PREFIX $prefix;
+ close PREFIX;
-my $prefix = "var tests = [ " . join(", ", map { '"' . $_ . '"' } @tests) . " ];\n";
-$prefix .= "var categories = [ " . join(", ", map { '"' . $_ . '"' } @categories) . " ];\n";
+ my $contents = "var testContents = [ " . join(", ", map { '"' . $_ . '"' } @testContents) . " ];\n";
-open PREFIX, ">hosted/sunspider-test-prefix.js";
-print PREFIX $prefix;
-close PREFIX;
+ open CONTENTS, ">hosted/${suite}/sunspider-test-contents.js";
+ print CONTENTS $contents;
+ close CONTENTS;
+}
system("cp resources/sunspider-analyze-results.js hosted");
system("cp resources/sunspider-compare-results.js hosted");
-
print "hosted/sunspider.html is ready to use.\n";
diff --git a/SunSpider/resources/TEMPLATE.html b/SunSpider/resources/TEMPLATE.html
index 926150d..3dc3f2f 100644
--- a/SunSpider/resources/TEMPLATE.html
+++ b/SunSpider/resources/TEMPLATE.html
@@ -1,5 +1,8 @@
<!DOCTYPE html>
<head>
+
+<meta charset=utf8>
+
<!--
Copyright (C) 2007 Apple Inc. All rights reserved.
@@ -26,15 +29,20 @@
-->
<title>SunSpider @NAME@</title>
-<link rel="stylesheet" href="sunspider.css"></link>
+<link rel="stylesheet" href="../sunspider.css">
</head>
<body>
<h3>@NAME@</h3>
<div id="console">
</div>
-<script src="sunspider-record-result.js"></script>
<script>
+function record(time) {
+ document.getElementById("console").innerHTML = time + "ms";
+ if (window.parent) {
+ parent.recordResult(time);
+ }
+}
var _sunSpiderStartDate = new Date();
diff --git a/SunSpider/hosted/sunspider-driver.html b/SunSpider/resources/driver-TEMPLATE.html
index 16fbca9..12d0952 100644
--- a/SunSpider/hosted/sunspider-driver.html
+++ b/SunSpider/resources/driver-TEMPLATE.html
@@ -1,6 +1,9 @@
<!DOCTYPE html>
<html>
<head>
+
+<meta charset=utf8>
+
<!--
Copyright (C) 2007 Apple Inc. All rights reserved.
@@ -26,19 +29,21 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
-<title>SunSpider JavaScript Benchmark (In Progress...)</title>
-<link rel="stylesheet" href="sunspider.css"></link>
+<title>SunSpider 0.9.1 JavaScript Benchmark (@SUITE@ test suite - In Progress...)</title>
+<link rel="stylesheet" href="../sunspider.css">
</head>
-<body onload="next()">
+<body onload="start()">
<h2><span id="logo">&#x2600;</span>SunSpider JavaScript Benchmark <small>(In Progress...)</small></h2>
+<h3>Content Version: @SUITE@</h3>
<script src="sunspider-test-prefix.js"></script>
+<script src="sunspider-test-contents.js"></script>
<script>
var testIndex = -1;
-var currentRepeat = 0;
-var repeatCount = 5;
+var currentRepeat = -1;
+var repeatCount = 10;
var output = [];
output.length = repeatCount;
@@ -46,19 +51,31 @@ for (var i = 0; i < output.length; i++) {
output[i] = {};
}
-function next()
+function start()
{
window.setTimeout(reallyNext, 500);
}
+function next()
+{
+ window.setTimeout(reallyNext, 10);
+}
+
function reallyNext()
{
+ document.getElementById("frameparent").innerHTML = "";
+ document.getElementById("frameparent").innerHTML = "<iframe id='testframe'>";
+ var testFrame = document.getElementById("testframe");
testIndex++;
if (testIndex < tests.length) {
- document.getElementById("testframe").src = tests[testIndex] + ".html";
+ testFrame.contentDocument.open();
+ testFrame.contentDocument.write(testContents[testIndex]);
+ testFrame.contentDocument.close;
} else if (++currentRepeat < repeatCount) {
testIndex = 0;
- document.getElementById("testframe").src = tests[testIndex] + ".html";
+ testFrame.contentDocument.open();
+ testFrame.contentDocument.write(testContents[testIndex]);
+ testFrame.contentDocument.close;
} else {
finish();
}
@@ -66,13 +83,15 @@ function reallyNext()
function recordResult(time)
{
- output[currentRepeat][tests[testIndex]] = time;
+ if (currentRepeat >= 0) // negative repeats are warmups
+ output[currentRepeat][tests[testIndex]] = time;
next();
}
function finish()
{
var outputString = "{";
+ outputString += '"v": "@SUITE@", ';
for (var test in output[0]) {
outputString += '"' + test + '":[';
for (var i = 0; i < output.length; i++) {
@@ -84,13 +103,13 @@ function finish()
outputString = outputString.substring(0, outputString.length - 1);
outputString += "}";
- location = "sunspider-results.html?" + encodeURI(outputString);
+ location = "results.html?" + encodeURI(outputString);
}
</script>
-<iframe id="testframe">
-</iframe>
+<div id="frameparent">
+</div>
</body>
</html>
diff --git a/SunSpider/hosted/sunspider-results.html b/SunSpider/resources/results-TEMPLATE.html
index cc74938..d5007fd 100644
--- a/SunSpider/hosted/sunspider-results.html
+++ b/SunSpider/resources/results-TEMPLATE.html
@@ -1,6 +1,9 @@
<!DOCTYPE html>
<html>
<head>
+
+<meta charset=utf8>
+
<!--
Copyright (C) 2007 Apple Inc. All rights reserved.
@@ -26,31 +29,36 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
-<title>SunSpider JavaScript Benchmark Results</title>
-<link rel="stylesheet" href="sunspider.css"></link>
+<title>SunSpider 0.9.1 JavaScript Benchmark Results (@SUITE@ test suite)</title>
+<link rel="stylesheet" href="../sunspider.css">
</head>
<body>
-<h2><span id="logo">&#x2600;</span>SunSpider JavaScript Benchmark Results</h2>
+<h2><span id="logo">&#x2600;</span>SunSpider 0.9.1 JavaScript Benchmark Results</h2>
+
+<h3>Content Version: @SUITE@</h3>
-<p><a href="sunspider-driver.html">Run Again</a></p>
+<p><a href="driver.html">Run Again</a></p>
-<p><input style="width: 90%;" id="selfUrl" type="text" readonly="readonly"></input><br>
+<p><input style="width: 90%;" id="selfUrl" type="text" readonly="readonly"><br>
<small>(You can bookmark this results URL for later comparison.)</small></p>
<form onsubmit="event.preventDefault(); compare(other.value);">To compare to another run, paste a saved result URL in the text field below and press enter:<br>
-<input style="width: 90%;" name="other" type="text"></input><br>
+<input style="width: 90%;" name="other" type="text"><br>
</form>
<pre id="console">
</pre>
-
+<script src="../json2.js"></script>
<script>
var selfUrlInput = document.getElementById("selfUrl");
selfUrlInput.value = location;
-var output = pivot(eval("(" + decodeURI(location.search.substring(1)) + ")"));
+var outputJSON = JSON.parse(decodeURI(location.search.substring(1)));
+var version = outputJSON["v"];
+delete outputJSON["v"];
+var output = pivot(outputJSON);
function pivot(input) {
var output = [];
@@ -72,17 +80,26 @@ function print(str) {
</script>
<script src="sunspider-test-prefix.js"></script>
-<script src="sunspider-analyze-results.js"></script>
-<script src="sunspider-compare-results.js"></script>
+<script src="../sunspider-analyze-results.js"></script>
+<script src="../sunspider-compare-results.js"></script>
<script>
var output2 = output;
+var version2 = version;
function compare(other)
{
document.getElementById("console").innerHTML = "";
- var output1 = pivot(eval("(" + decodeURI(other.split("?")[1]) + ")"));
- sunspiderCompareResults(output1, output2);
+
+ var output1JSON = JSON.parse(decodeURI(other.split("?")[1]));
+ var version1 = output1JSON["v"];
+ delete output1JSON["v"];
+ if (version1 != version2) {
+ print("ERROR: cannot compare version " + version1 + ' with version ' + version2);
+ } else {
+ var output1 = pivot(output1JSON);
+ sunspiderCompareResults(output1, output2);
+ }
}
</script>
diff --git a/SunSpider/resources/sunspider-standalone-driver.js b/SunSpider/resources/sunspider-standalone-driver.js
index 8c6d237..3a8a3e9 100644
--- a/SunSpider/resources/sunspider-standalone-driver.js
+++ b/SunSpider/resources/sunspider-standalone-driver.js
@@ -30,7 +30,7 @@ var times = [];
times.length = tests.length;
for (var j = 0; j < tests.length; j++) {
- var testName = "tests/" + tests[j] + ".js";
+ var testName = "tests/" + suiteName + "/" + tests[j] + ".js";
var startTime = new Date;
if (testName.indexOf('parse-only') >= 0)
checkSyntax(testName);
diff --git a/SunSpider/sunspider b/SunSpider/sunspider
index 20614b1..97a86f1 100755
--- a/SunSpider/sunspider
+++ b/SunSpider/sunspider
@@ -38,7 +38,8 @@ my $runShark20 = 0;
my $runSharkCache = 0;
my $ubench = 0;
my $v8suite = 0;
-my $parseonly = 0;
+my $suite = "";
+my $parseOnly = 0;
my $jsShellPath;
my $jsShellArgs = "";
my $setBaseline = 0;
@@ -57,9 +58,10 @@ Usage: $programName --shell=[path] [options]
--shark Sample execution time with the Mac OS X "Shark" performance testing tool (implies --runs=1)
--shark20 Like --shark, but with a 20 microsecond sampling interval
--shark-cache Like --shark, but performs a L2 cache-miss sample instead of time sample
- --ubench Use microbenchmark suite instead of regular tests (to check for core execution regressions)
- --v8-suite Use the V8 benchmark suite
- --parse-only Use the parse-only benchmark suite
+ --suite Select a specific benchmark suite. The default is sunspider-0.9.1
+ --ubench Use microbenchmark suite instead of regular tests. Same as --suite=ubench
+ --v8-suite Use the V8 benchmark suite. Same as --suite=v8-v4
+ --parse-only Use the parse-only benchmark suite. Same as --suite=parse-only
EOF
GetOptions('runs=i' => \$testRuns,
@@ -69,16 +71,20 @@ GetOptions('runs=i' => \$testRuns,
'shark' => \$runShark,
'shark20' => \$runShark20,
'shark-cache' => \$runSharkCache,
+ 'suite=s' => \$suite,
'ubench' => \$ubench,
'v8-suite' => \$v8suite,
- 'parse-only' => \$parseonly,
+ 'parse-only' => \$parseOnly,
'tests=s' => \$testsPattern,
'help' => \$showHelp);
-my $resultDirectory = "sunspider-results";
-$resultDirectory = "ubench-results" if ($ubench);
-$resultDirectory = "v8-results" if ($v8suite);
-$resultDirectory = "parse-only-results" if ($parseonly);
+
+$suite = "ubench" if ($ubench);
+$suite = "v8-v4" if ($v8suite);
+$suite = "parse-only" if ($parseOnly);
+$suite = "sunspider-0.9.1" if (!$suite);
+
+my $resultDirectory = "${suite}-results";
$runShark = 1 if $runSharkCache;
$runShark = 20 if $runShark20;
@@ -123,12 +129,7 @@ my %uniqueCategories = ();
sub loadTestsList()
{
- my $testlist = "LIST";
- $testlist = "LIST-UBENCH" if ($ubench);
- $testlist = "LIST-V8" if ($v8suite);
- $testlist = "LIST-PARSE-ONLY" if ($parseonly);
-
- open TESTLIST, "<", "tests/${testlist}" or die "Can't find ./tests/${testlist}";
+ open TESTLIST, "<", "tests/${suite}/LIST" or die "Can't find ./tests/${suite}/LIST";
while (<TESTLIST>) {
chomp;
next unless !$testsPattern || /$testsPattern/;
@@ -150,7 +151,8 @@ my $resultsFile = "$resultDirectory/sunspider-results-$timeString.js";
sub writePrefixFile()
{
- my $prefix = "var tests = [ " . join(", ", map { '"' . $_ . '"' } @tests) . " ];\n";
+ my $prefix = "var suiteName = " . '"' . $suite . '"' . ";\n";
+ $prefix .= "var tests = [ " . join(", ", map { '"' . $_ . '"' } @tests) . " ];\n";
$prefix .= "var categories = [ " . join(", ", map { '"' . $_ . '"' } @categories) . " ];\n";
mkdir "$resultDirectory";
diff --git a/SunSpider/sunspider-compare-results b/SunSpider/sunspider-compare-results
index a34f796..09b7052 100755
--- a/SunSpider/sunspider-compare-results
+++ b/SunSpider/sunspider-compare-results
@@ -29,30 +29,35 @@ use File::Basename;
my $showHelp = 0;
my $jsShellPath;
+my $suite = "";
my $ubench = 0;
my $v8suite = 0;
-my $parseonly = 0;
+my $parseOnly = 0;
my $programName = basename($0);
my $usage = <<EOF;
Usage: $programName --shell=[path] [options] FILE FILE
--help Show this help message
--shell Path to javascript shell
- --ubench Compare microbenchmark results
- --v8-suite Compare the V8 benchmark results
+ --suite Select a specific benchmark suite. The default is sunspider-0.9.1
+ --ubench Use microbenchmark suite instead of regular tests. Same as --suite=ubench
+ --v8-suite Use the V8 benchmark suite. Same as --suite=v8-v4
--parse-only Compare the parse-only benchmark results
EOF
GetOptions('shell=s' => \$jsShellPath,
+ 'suite=s' => \$suite,
'ubench' => \$ubench,
'v8-suite' => \$v8suite,
- 'parse-only' => \$parseonly,
+ 'parse-only' => \$parseOnly,
'help' => \$showHelp);
-my $resultDirectory = "sunspider-results";
-$resultDirectory = "ubench-results" if ($ubench);
-$resultDirectory = "v8-results" if ($v8suite);
-$resultDirectory = "parse-only-results" if ($parseonly);
+$suite = "ubench" if ($ubench);
+$suite = "v8-v4" if ($v8suite);
+$suite = "parse-only" if ($parseOnly);
+$suite = "sunspider-0.9.1" if (!$suite);
+
+my $resultDirectory = "${suite}-results";
if ((scalar @ARGV != 0 && scalar @ARGV != 2) || !$jsShellPath || $showHelp) {
print STDERR $usage;
diff --git a/SunSpider/tests/LIST-PARSE-ONLY b/SunSpider/tests/LIST-PARSE-ONLY
deleted file mode 100644
index febcec2..0000000
--- a/SunSpider/tests/LIST-PARSE-ONLY
+++ /dev/null
@@ -1,4 +0,0 @@
-parse-only/jquery-1.3.2
-parse-only/mootools-1.2.2-core-nc
-parse-only/prototype-1.6.0.3
-parse-only/concat-jquery-mootools-prototype
diff --git a/SunSpider/tests/LIST-UBENCH b/SunSpider/tests/LIST-UBENCH
deleted file mode 100644
index 54e3468..0000000
--- a/SunSpider/tests/LIST-UBENCH
+++ /dev/null
@@ -1,9 +0,0 @@
-ubench/function-closure
-ubench/function-empty
-ubench/function-correct-args
-ubench/function-excess-args
-ubench/function-missing-args
-ubench/function-sum
-ubench/loop-empty-resolve
-ubench/loop-empty
-ubench/loop-sum
diff --git a/SunSpider/tests/parse-only/LIST b/SunSpider/tests/parse-only/LIST
new file mode 100644
index 0000000..7ad5006
--- /dev/null
+++ b/SunSpider/tests/parse-only/LIST
@@ -0,0 +1,4 @@
+jquery-1.3.2
+mootools-1.2.2-core-nc
+prototype-1.6.0.3
+concat-jquery-mootools-prototype
diff --git a/SunSpider/tests/3d-cube.js b/SunSpider/tests/sunspider-0.9.1/3d-cube.js
index e2cd6f9..e2cd6f9 100644
--- a/SunSpider/tests/3d-cube.js
+++ b/SunSpider/tests/sunspider-0.9.1/3d-cube.js
diff --git a/SunSpider/tests/3d-morph.js b/SunSpider/tests/sunspider-0.9.1/3d-morph.js
index d4238c0..d4238c0 100644
--- a/SunSpider/tests/3d-morph.js
+++ b/SunSpider/tests/sunspider-0.9.1/3d-morph.js
diff --git a/SunSpider/tests/3d-raytrace.js b/SunSpider/tests/sunspider-0.9.1/3d-raytrace.js
index e7b959e..e7b959e 100644
--- a/SunSpider/tests/3d-raytrace.js
+++ b/SunSpider/tests/sunspider-0.9.1/3d-raytrace.js
diff --git a/SunSpider/tests/LIST b/SunSpider/tests/sunspider-0.9.1/LIST
index 34cfac4..34cfac4 100644
--- a/SunSpider/tests/LIST
+++ b/SunSpider/tests/sunspider-0.9.1/LIST
diff --git a/SunSpider/tests/access-binary-trees.js b/SunSpider/tests/sunspider-0.9.1/access-binary-trees.js
index 2f24e7d..2f24e7d 100644
--- a/SunSpider/tests/access-binary-trees.js
+++ b/SunSpider/tests/sunspider-0.9.1/access-binary-trees.js
diff --git a/SunSpider/tests/access-fannkuch.js b/SunSpider/tests/sunspider-0.9.1/access-fannkuch.js
index 1ea87b4..1ea87b4 100644
--- a/SunSpider/tests/access-fannkuch.js
+++ b/SunSpider/tests/sunspider-0.9.1/access-fannkuch.js
diff --git a/SunSpider/tests/access-nbody.js b/SunSpider/tests/sunspider-0.9.1/access-nbody.js
index f0d080d..f0d080d 100644
--- a/SunSpider/tests/access-nbody.js
+++ b/SunSpider/tests/sunspider-0.9.1/access-nbody.js
diff --git a/SunSpider/tests/access-nsieve.js b/SunSpider/tests/sunspider-0.9.1/access-nsieve.js
index 70fdf1a..70fdf1a 100644
--- a/SunSpider/tests/access-nsieve.js
+++ b/SunSpider/tests/sunspider-0.9.1/access-nsieve.js
diff --git a/SunSpider/tests/bitops-3bit-bits-in-byte.js b/SunSpider/tests/sunspider-0.9.1/bitops-3bit-bits-in-byte.js
index 1d85406..1d85406 100644
--- a/SunSpider/tests/bitops-3bit-bits-in-byte.js
+++ b/SunSpider/tests/sunspider-0.9.1/bitops-3bit-bits-in-byte.js
diff --git a/SunSpider/tests/bitops-bits-in-byte.js b/SunSpider/tests/sunspider-0.9.1/bitops-bits-in-byte.js
index 9a3acd4..9a3acd4 100644
--- a/SunSpider/tests/bitops-bits-in-byte.js
+++ b/SunSpider/tests/sunspider-0.9.1/bitops-bits-in-byte.js
diff --git a/SunSpider/tests/bitops-bitwise-and.js b/SunSpider/tests/sunspider-0.9.1/bitops-bitwise-and.js
index 7c80e69..7c80e69 100644
--- a/SunSpider/tests/bitops-bitwise-and.js
+++ b/SunSpider/tests/sunspider-0.9.1/bitops-bitwise-and.js
diff --git a/SunSpider/tests/bitops-nsieve-bits.js b/SunSpider/tests/sunspider-0.9.1/bitops-nsieve-bits.js
index 6ef0ddb..6ef0ddb 100644
--- a/SunSpider/tests/bitops-nsieve-bits.js
+++ b/SunSpider/tests/sunspider-0.9.1/bitops-nsieve-bits.js
diff --git a/SunSpider/tests/controlflow-recursive.js b/SunSpider/tests/sunspider-0.9.1/controlflow-recursive.js
index fcfe1c4..fcfe1c4 100644
--- a/SunSpider/tests/controlflow-recursive.js
+++ b/SunSpider/tests/sunspider-0.9.1/controlflow-recursive.js
diff --git a/SunSpider/tests/crypto-aes.js b/SunSpider/tests/sunspider-0.9.1/crypto-aes.js
index 93a5969..93a5969 100644
--- a/SunSpider/tests/crypto-aes.js
+++ b/SunSpider/tests/sunspider-0.9.1/crypto-aes.js
diff --git a/SunSpider/tests/crypto-md5.js b/SunSpider/tests/sunspider-0.9.1/crypto-md5.js
index cc7a896..cc7a896 100644
--- a/SunSpider/tests/crypto-md5.js
+++ b/SunSpider/tests/sunspider-0.9.1/crypto-md5.js
diff --git a/SunSpider/tests/crypto-sha1.js b/SunSpider/tests/sunspider-0.9.1/crypto-sha1.js
index ca8d901..ca8d901 100644
--- a/SunSpider/tests/crypto-sha1.js
+++ b/SunSpider/tests/sunspider-0.9.1/crypto-sha1.js
diff --git a/SunSpider/tests/date-format-tofte.js b/SunSpider/tests/sunspider-0.9.1/date-format-tofte.js
index 66e2cef..66e2cef 100644
--- a/SunSpider/tests/date-format-tofte.js
+++ b/SunSpider/tests/sunspider-0.9.1/date-format-tofte.js
diff --git a/SunSpider/tests/date-format-xparb.js b/SunSpider/tests/sunspider-0.9.1/date-format-xparb.js
index 1f09556..1f09556 100644
--- a/SunSpider/tests/date-format-xparb.js
+++ b/SunSpider/tests/sunspider-0.9.1/date-format-xparb.js
diff --git a/SunSpider/tests/math-cordic.js b/SunSpider/tests/sunspider-0.9.1/math-cordic.js
index 4d3833b..4d3833b 100644
--- a/SunSpider/tests/math-cordic.js
+++ b/SunSpider/tests/sunspider-0.9.1/math-cordic.js
diff --git a/SunSpider/tests/math-partial-sums.js b/SunSpider/tests/sunspider-0.9.1/math-partial-sums.js
index d082d79..d082d79 100644
--- a/SunSpider/tests/math-partial-sums.js
+++ b/SunSpider/tests/sunspider-0.9.1/math-partial-sums.js
diff --git a/SunSpider/tests/math-spectral-norm.js b/SunSpider/tests/sunspider-0.9.1/math-spectral-norm.js
index 8139ef3..8139ef3 100644
--- a/SunSpider/tests/math-spectral-norm.js
+++ b/SunSpider/tests/sunspider-0.9.1/math-spectral-norm.js
diff --git a/SunSpider/tests/regexp-dna.js b/SunSpider/tests/sunspider-0.9.1/regexp-dna.js
index b500e68..b500e68 100644
--- a/SunSpider/tests/regexp-dna.js
+++ b/SunSpider/tests/sunspider-0.9.1/regexp-dna.js
diff --git a/SunSpider/tests/sunspider-0.9.1/string-base64.js b/SunSpider/tests/sunspider-0.9.1/string-base64.js
new file mode 100644
index 0000000..dfc949f
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9.1/string-base64.js
@@ -0,0 +1,135 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla XML-RPC Client component.
+ *
+ * The Initial Developer of the Original Code is
+ * Digital Creations 2, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Martijn Pieters <mj@digicool.com> (original author)
+ * Samuel Sieb <samuel@sieb.net>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+// From: http://lxr.mozilla.org/mozilla/source/extensions/xml-rpc/src/nsXmlRpcClient.js#956
+
+/* Convert data (an array of integers) to a Base64 string. */
+var toBase64Table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+var base64Pad = '=';
+
+function toBase64(data) {
+ var result = '';
+ var length = data.length;
+ var i;
+ // Convert every three bytes to 4 ascii characters.
+ for (i = 0; i < (length - 2); i += 3) {
+ result += toBase64Table[data.charCodeAt(i) >> 2];
+ result += toBase64Table[((data.charCodeAt(i) & 0x03) << 4) + (data.charCodeAt(i+1) >> 4)];
+ result += toBase64Table[((data.charCodeAt(i+1) & 0x0f) << 2) + (data.charCodeAt(i+2) >> 6)];
+ result += toBase64Table[data.charCodeAt(i+2) & 0x3f];
+ }
+
+ // Convert the remaining 1 or 2 bytes, pad out to 4 characters.
+ if (length%3) {
+ i = length - (length%3);
+ result += toBase64Table[data.charCodeAt(i) >> 2];
+ if ((length%3) == 2) {
+ result += toBase64Table[((data.charCodeAt(i) & 0x03) << 4) + (data.charCodeAt(i+1) >> 4)];
+ result += toBase64Table[(data.charCodeAt(i+1) & 0x0f) << 2];
+ result += base64Pad;
+ } else {
+ result += toBase64Table[(data.charCodeAt(i) & 0x03) << 4];
+ result += base64Pad + base64Pad;
+ }
+ }
+
+ return result;
+}
+
+/* Convert Base64 data to a string */
+var toBinaryTable = [
+ -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+ -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+ -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
+ 52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1, 0,-1,-1,
+ -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,
+ 15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
+ -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
+ 41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
+];
+
+function base64ToString(data) {
+ var result = '';
+ var leftbits = 0; // number of bits decoded, but yet to be appended
+ var leftdata = 0; // bits decoded, but yet to be appended
+
+ // Convert one by one.
+ for (var i = 0; i < data.length; i++) {
+ var c = toBinaryTable[data.charCodeAt(i) & 0x7f];
+ var padding = (data.charCodeAt(i) == base64Pad.charCodeAt(0));
+ // Skip illegal characters and whitespace
+ if (c == -1) continue;
+
+ // Collect data into leftdata, update bitcount
+ leftdata = (leftdata << 6) | c;
+ leftbits += 6;
+
+ // If we have 8 or more bits, append 8 bits to the result
+ if (leftbits >= 8) {
+ leftbits -= 8;
+ // Append if not padding.
+ if (!padding)
+ result += String.fromCharCode((leftdata >> leftbits) & 0xff);
+ leftdata &= (1 << leftbits) - 1;
+ }
+ }
+
+ // If there are any bits left, the base64 string was corrupted
+ if (leftbits)
+ throw Components.Exception('Corrupted base64 string');
+
+ return result;
+}
+
+var str = "";
+
+for ( var i = 0; i < 8192; i++ )
+ str += String.fromCharCode( (25 * Math.random()) + 97 );
+
+for ( var i = 8192; i <= 16384; i *= 2 ) {
+
+ var base64;
+
+ base64 = toBase64(str);
+ base64ToString(base64);
+
+ // Double the string
+ str += str;
+}
+
+toBinaryTable = null;
diff --git a/SunSpider/tests/string-fasta.js b/SunSpider/tests/sunspider-0.9.1/string-fasta.js
index 14a81f3..14a81f3 100644
--- a/SunSpider/tests/string-fasta.js
+++ b/SunSpider/tests/sunspider-0.9.1/string-fasta.js
diff --git a/SunSpider/tests/string-tagcloud.js b/SunSpider/tests/sunspider-0.9.1/string-tagcloud.js
index d3e5a1f..d3e5a1f 100644
--- a/SunSpider/tests/string-tagcloud.js
+++ b/SunSpider/tests/sunspider-0.9.1/string-tagcloud.js
diff --git a/SunSpider/tests/string-unpack-code.js b/SunSpider/tests/sunspider-0.9.1/string-unpack-code.js
index e6330f1..e6330f1 100644
--- a/SunSpider/tests/string-unpack-code.js
+++ b/SunSpider/tests/sunspider-0.9.1/string-unpack-code.js
diff --git a/SunSpider/tests/string-validate-input.js b/SunSpider/tests/sunspider-0.9.1/string-validate-input.js
index 3455b32..3455b32 100644
--- a/SunSpider/tests/string-validate-input.js
+++ b/SunSpider/tests/sunspider-0.9.1/string-validate-input.js
diff --git a/SunSpider/tests/sunspider-0.9/3d-cube.js b/SunSpider/tests/sunspider-0.9/3d-cube.js
new file mode 100644
index 0000000..e2cd6f9
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/3d-cube.js
@@ -0,0 +1,337 @@
+// 3D Cube Rotation
+// http://www.speich.net/computer/moztesting/3d.htm
+// Created by Simon Speich
+
+var Q = new Array();
+var MTrans = new Array(); // transformation matrix
+var MQube = new Array(); // position information of qube
+var I = new Array(); // entity matrix
+var Origin = new Object();
+var Testing = new Object();
+var LoopTimer;
+
+var DisplArea = new Object();
+DisplArea.Width = 300;
+DisplArea.Height = 300;
+
+function DrawLine(From, To) {
+ var x1 = From.V[0];
+ var x2 = To.V[0];
+ var y1 = From.V[1];
+ var y2 = To.V[1];
+ var dx = Math.abs(x2 - x1);
+ var dy = Math.abs(y2 - y1);
+ var x = x1;
+ var y = y1;
+ var IncX1, IncY1;
+ var IncX2, IncY2;
+ var Den;
+ var Num;
+ var NumAdd;
+ var NumPix;
+
+ if (x2 >= x1) { IncX1 = 1; IncX2 = 1; }
+ else { IncX1 = -1; IncX2 = -1; }
+ if (y2 >= y1) { IncY1 = 1; IncY2 = 1; }
+ else { IncY1 = -1; IncY2 = -1; }
+ if (dx >= dy) {
+ IncX1 = 0;
+ IncY2 = 0;
+ Den = dx;
+ Num = dx / 2;
+ NumAdd = dy;
+ NumPix = dx;
+ }
+ else {
+ IncX2 = 0;
+ IncY1 = 0;
+ Den = dy;
+ Num = dy / 2;
+ NumAdd = dx;
+ NumPix = dy;
+ }
+
+ NumPix = Math.round(Q.LastPx + NumPix);
+
+ var i = Q.LastPx;
+ for (; i < NumPix; i++) {
+ Num += NumAdd;
+ if (Num >= Den) {
+ Num -= Den;
+ x += IncX1;
+ y += IncY1;
+ }
+ x += IncX2;
+ y += IncY2;
+ }
+ Q.LastPx = NumPix;
+}
+
+function CalcCross(V0, V1) {
+ var Cross = new Array();
+ Cross[0] = V0[1]*V1[2] - V0[2]*V1[1];
+ Cross[1] = V0[2]*V1[0] - V0[0]*V1[2];
+ Cross[2] = V0[0]*V1[1] - V0[1]*V1[0];
+ return Cross;
+}
+
+function CalcNormal(V0, V1, V2) {
+ var A = new Array(); var B = new Array();
+ for (var i = 0; i < 3; i++) {
+ A[i] = V0[i] - V1[i];
+ B[i] = V2[i] - V1[i];
+ }
+ A = CalcCross(A, B);
+ var Length = Math.sqrt(A[0]*A[0] + A[1]*A[1] + A[2]*A[2]);
+ for (var i = 0; i < 3; i++) A[i] = A[i] / Length;
+ A[3] = 1;
+ return A;
+}
+
+function CreateP(X,Y,Z) {
+ this.V = [X,Y,Z,1];
+}
+
+// multiplies two matrices
+function MMulti(M1, M2) {
+ var M = [[],[],[],[]];
+ var i = 0;
+ var j = 0;
+ for (; i < 4; i++) {
+ j = 0;
+ for (; j < 4; j++) M[i][j] = M1[i][0] * M2[0][j] + M1[i][1] * M2[1][j] + M1[i][2] * M2[2][j] + M1[i][3] * M2[3][j];
+ }
+ return M;
+}
+
+//multiplies matrix with vector
+function VMulti(M, V) {
+ var Vect = new Array();
+ var i = 0;
+ for (;i < 4; i++) Vect[i] = M[i][0] * V[0] + M[i][1] * V[1] + M[i][2] * V[2] + M[i][3] * V[3];
+ return Vect;
+}
+
+function VMulti2(M, V) {
+ var Vect = new Array();
+ var i = 0;
+ for (;i < 3; i++) Vect[i] = M[i][0] * V[0] + M[i][1] * V[1] + M[i][2] * V[2];
+ return Vect;
+}
+
+// add to matrices
+function MAdd(M1, M2) {
+ var M = [[],[],[],[]];
+ var i = 0;
+ var j = 0;
+ for (; i < 4; i++) {
+ j = 0;
+ for (; j < 4; j++) M[i][j] = M1[i][j] + M2[i][j];
+ }
+ return M;
+}
+
+function Translate(M, Dx, Dy, Dz) {
+ var T = [
+ [1,0,0,Dx],
+ [0,1,0,Dy],
+ [0,0,1,Dz],
+ [0,0,0,1]
+ ];
+ return MMulti(T, M);
+}
+
+function RotateX(M, Phi) {
+ var a = Phi;
+ a *= Math.PI / 180;
+ var Cos = Math.cos(a);
+ var Sin = Math.sin(a);
+ var R = [
+ [1,0,0,0],
+ [0,Cos,-Sin,0],
+ [0,Sin,Cos,0],
+ [0,0,0,1]
+ ];
+ return MMulti(R, M);
+}
+
+function RotateY(M, Phi) {
+ var a = Phi;
+ a *= Math.PI / 180;
+ var Cos = Math.cos(a);
+ var Sin = Math.sin(a);
+ var R = [
+ [Cos,0,Sin,0],
+ [0,1,0,0],
+ [-Sin,0,Cos,0],
+ [0,0,0,1]
+ ];
+ return MMulti(R, M);
+}
+
+function RotateZ(M, Phi) {
+ var a = Phi;
+ a *= Math.PI / 180;
+ var Cos = Math.cos(a);
+ var Sin = Math.sin(a);
+ var R = [
+ [Cos,-Sin,0,0],
+ [Sin,Cos,0,0],
+ [0,0,1,0],
+ [0,0,0,1]
+ ];
+ return MMulti(R, M);
+}
+
+function DrawQube() {
+ // calc current normals
+ var CurN = new Array();
+ var i = 5;
+ Q.LastPx = 0;
+ for (; i > -1; i--) CurN[i] = VMulti2(MQube, Q.Normal[i]);
+ if (CurN[0][2] < 0) {
+ if (!Q.Line[0]) { DrawLine(Q[0], Q[1]); Q.Line[0] = true; };
+ if (!Q.Line[1]) { DrawLine(Q[1], Q[2]); Q.Line[1] = true; };
+ if (!Q.Line[2]) { DrawLine(Q[2], Q[3]); Q.Line[2] = true; };
+ if (!Q.Line[3]) { DrawLine(Q[3], Q[0]); Q.Line[3] = true; };
+ }
+ if (CurN[1][2] < 0) {
+ if (!Q.Line[2]) { DrawLine(Q[3], Q[2]); Q.Line[2] = true; };
+ if (!Q.Line[9]) { DrawLine(Q[2], Q[6]); Q.Line[9] = true; };
+ if (!Q.Line[6]) { DrawLine(Q[6], Q[7]); Q.Line[6] = true; };
+ if (!Q.Line[10]) { DrawLine(Q[7], Q[3]); Q.Line[10] = true; };
+ }
+ if (CurN[2][2] < 0) {
+ if (!Q.Line[4]) { DrawLine(Q[4], Q[5]); Q.Line[4] = true; };
+ if (!Q.Line[5]) { DrawLine(Q[5], Q[6]); Q.Line[5] = true; };
+ if (!Q.Line[6]) { DrawLine(Q[6], Q[7]); Q.Line[6] = true; };
+ if (!Q.Line[7]) { DrawLine(Q[7], Q[4]); Q.Line[7] = true; };
+ }
+ if (CurN[3][2] < 0) {
+ if (!Q.Line[4]) { DrawLine(Q[4], Q[5]); Q.Line[4] = true; };
+ if (!Q.Line[8]) { DrawLine(Q[5], Q[1]); Q.Line[8] = true; };
+ if (!Q.Line[0]) { DrawLine(Q[1], Q[0]); Q.Line[0] = true; };
+ if (!Q.Line[11]) { DrawLine(Q[0], Q[4]); Q.Line[11] = true; };
+ }
+ if (CurN[4][2] < 0) {
+ if (!Q.Line[11]) { DrawLine(Q[4], Q[0]); Q.Line[11] = true; };
+ if (!Q.Line[3]) { DrawLine(Q[0], Q[3]); Q.Line[3] = true; };
+ if (!Q.Line[10]) { DrawLine(Q[3], Q[7]); Q.Line[10] = true; };
+ if (!Q.Line[7]) { DrawLine(Q[7], Q[4]); Q.Line[7] = true; };
+ }
+ if (CurN[5][2] < 0) {
+ if (!Q.Line[8]) { DrawLine(Q[1], Q[5]); Q.Line[8] = true; };
+ if (!Q.Line[5]) { DrawLine(Q[5], Q[6]); Q.Line[5] = true; };
+ if (!Q.Line[9]) { DrawLine(Q[6], Q[2]); Q.Line[9] = true; };
+ if (!Q.Line[1]) { DrawLine(Q[2], Q[1]); Q.Line[1] = true; };
+ }
+ Q.Line = [false,false,false,false,false,false,false,false,false,false,false,false];
+ Q.LastPx = 0;
+}
+
+function Loop() {
+ if (Testing.LoopCount > Testing.LoopMax) return;
+ var TestingStr = String(Testing.LoopCount);
+ while (TestingStr.length < 3) TestingStr = "0" + TestingStr;
+ MTrans = Translate(I, -Q[8].V[0], -Q[8].V[1], -Q[8].V[2]);
+ MTrans = RotateX(MTrans, 1);
+ MTrans = RotateY(MTrans, 3);
+ MTrans = RotateZ(MTrans, 5);
+ MTrans = Translate(MTrans, Q[8].V[0], Q[8].V[1], Q[8].V[2]);
+ MQube = MMulti(MTrans, MQube);
+ var i = 8;
+ for (; i > -1; i--) {
+ Q[i].V = VMulti(MTrans, Q[i].V);
+ }
+ DrawQube();
+ Testing.LoopCount++;
+ Loop();
+}
+
+function Init(CubeSize) {
+ // init/reset vars
+ Origin.V = [150,150,20,1];
+ Testing.LoopCount = 0;
+ Testing.LoopMax = 50;
+ Testing.TimeMax = 0;
+ Testing.TimeAvg = 0;
+ Testing.TimeMin = 0;
+ Testing.TimeTemp = 0;
+ Testing.TimeTotal = 0;
+ Testing.Init = false;
+
+ // transformation matrix
+ MTrans = [
+ [1,0,0,0],
+ [0,1,0,0],
+ [0,0,1,0],
+ [0,0,0,1]
+ ];
+
+ // position information of qube
+ MQube = [
+ [1,0,0,0],
+ [0,1,0,0],
+ [0,0,1,0],
+ [0,0,0,1]
+ ];
+
+ // entity matrix
+ I = [
+ [1,0,0,0],
+ [0,1,0,0],
+ [0,0,1,0],
+ [0,0,0,1]
+ ];
+
+ // create qube
+ Q[0] = new CreateP(-CubeSize,-CubeSize, CubeSize);
+ Q[1] = new CreateP(-CubeSize, CubeSize, CubeSize);
+ Q[2] = new CreateP( CubeSize, CubeSize, CubeSize);
+ Q[3] = new CreateP( CubeSize,-CubeSize, CubeSize);
+ Q[4] = new CreateP(-CubeSize,-CubeSize,-CubeSize);
+ Q[5] = new CreateP(-CubeSize, CubeSize,-CubeSize);
+ Q[6] = new CreateP( CubeSize, CubeSize,-CubeSize);
+ Q[7] = new CreateP( CubeSize,-CubeSize,-CubeSize);
+
+ // center of gravity
+ Q[8] = new CreateP(0, 0, 0);
+
+ // anti-clockwise edge check
+ Q.Edge = [[0,1,2],[3,2,6],[7,6,5],[4,5,1],[4,0,3],[1,5,6]];
+
+ // calculate squad normals
+ Q.Normal = new Array();
+ for (var i = 0; i < Q.Edge.length; i++) Q.Normal[i] = CalcNormal(Q[Q.Edge[i][0]].V, Q[Q.Edge[i][1]].V, Q[Q.Edge[i][2]].V);
+
+ // line drawn ?
+ Q.Line = [false,false,false,false,false,false,false,false,false,false,false,false];
+
+ // create line pixels
+ Q.NumPx = 9 * 2 * CubeSize;
+ for (var i = 0; i < Q.NumPx; i++) CreateP(0,0,0);
+
+ MTrans = Translate(MTrans, Origin.V[0], Origin.V[1], Origin.V[2]);
+ MQube = MMulti(MTrans, MQube);
+
+ var i = 0;
+ for (; i < 9; i++) {
+ Q[i].V = VMulti(MTrans, Q[i].V);
+ }
+ DrawQube();
+ Testing.Init = true;
+ Loop();
+}
+
+for ( var i = 20; i <= 160; i *= 2 ) {
+ Init(i);
+}
+
+Q = null;
+MTrans = null;
+MQube = null;
+I = null;
+Origin = null;
+Testing = null;
+LoopTime = null;
+DisplArea = null;
diff --git a/SunSpider/tests/sunspider-0.9/3d-morph.js b/SunSpider/tests/sunspider-0.9/3d-morph.js
new file mode 100644
index 0000000..d4238c0
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/3d-morph.js
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+var loops = 15
+var nx = 120
+var nz = 120
+
+function morph(a, f) {
+ var PI2nx = Math.PI * 8/nx
+ var sin = Math.sin
+ var f30 = -(50 * sin(f*Math.PI*2))
+
+ for (var i = 0; i < nz; ++i) {
+ for (var j = 0; j < nx; ++j) {
+ a[3*(i*nx+j)+1] = sin((j-1) * PI2nx ) * -f30
+ }
+ }
+}
+
+
+var a = Array()
+for (var i=0; i < nx*nz*3; ++i)
+ a[i] = 0
+
+for (var i = 0; i < loops; ++i) {
+ morph(a, i/loops)
+}
+
+testOutput = 0;
+for (var i = 0; i < nx; i++)
+ testOutput += a[3*(i*nx+i)+1];
+a = null;
diff --git a/SunSpider/tests/sunspider-0.9/3d-raytrace.js b/SunSpider/tests/sunspider-0.9/3d-raytrace.js
new file mode 100644
index 0000000..e7b959e
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/3d-raytrace.js
@@ -0,0 +1,441 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+function createVector(x,y,z) {
+ return new Array(x,y,z);
+}
+
+function sqrLengthVector(self) {
+ return self[0] * self[0] + self[1] * self[1] + self[2] * self[2];
+}
+
+function lengthVector(self) {
+ return Math.sqrt(self[0] * self[0] + self[1] * self[1] + self[2] * self[2]);
+}
+
+function addVector(self, v) {
+ self[0] += v[0];
+ self[1] += v[1];
+ self[2] += v[2];
+ return self;
+}
+
+function subVector(self, v) {
+ self[0] -= v[0];
+ self[1] -= v[1];
+ self[2] -= v[2];
+ return self;
+}
+
+function scaleVector(self, scale) {
+ self[0] *= scale;
+ self[1] *= scale;
+ self[2] *= scale;
+ return self;
+}
+
+function normaliseVector(self) {
+ var len = Math.sqrt(self[0] * self[0] + self[1] * self[1] + self[2] * self[2]);
+ self[0] /= len;
+ self[1] /= len;
+ self[2] /= len;
+ return self;
+}
+
+function add(v1, v2) {
+ return new Array(v1[0] + v2[0], v1[1] + v2[1], v1[2] + v2[2]);
+}
+
+function sub(v1, v2) {
+ return new Array(v1[0] - v2[0], v1[1] - v2[1], v1[2] - v2[2]);
+}
+
+function scalev(v1, v2) {
+ return new Array(v1[0] * v2[0], v1[1] * v2[1], v1[2] * v2[2]);
+}
+
+function dot(v1, v2) {
+ return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
+}
+
+function scale(v, scale) {
+ return [v[0] * scale, v[1] * scale, v[2] * scale];
+}
+
+function cross(v1, v2) {
+ return [v1[1] * v2[2] - v1[2] * v2[1],
+ v1[2] * v2[0] - v1[0] * v2[2],
+ v1[0] * v2[1] - v1[1] * v2[0]];
+
+}
+
+function normalise(v) {
+ var len = lengthVector(v);
+ return [v[0] / len, v[1] / len, v[2] / len];
+}
+
+function transformMatrix(self, v) {
+ var vals = self;
+ var x = vals[0] * v[0] + vals[1] * v[1] + vals[2] * v[2] + vals[3];
+ var y = vals[4] * v[0] + vals[5] * v[1] + vals[6] * v[2] + vals[7];
+ var z = vals[8] * v[0] + vals[9] * v[1] + vals[10] * v[2] + vals[11];
+ return [x, y, z];
+}
+
+function invertMatrix(self) {
+ var temp = new Array(16);
+ var tx = -self[3];
+ var ty = -self[7];
+ var tz = -self[11];
+ for (h = 0; h < 3; h++)
+ for (v = 0; v < 3; v++)
+ temp[h + v * 4] = self[v + h * 4];
+ for (i = 0; i < 11; i++)
+ self[i] = temp[i];
+ self[3] = tx * self[0] + ty * self[1] + tz * self[2];
+ self[7] = tx * self[4] + ty * self[5] + tz * self[6];
+ self[11] = tx * self[8] + ty * self[9] + tz * self[10];
+ return self;
+}
+
+
+// Triangle intersection using barycentric coord method
+function Triangle(p1, p2, p3) {
+ var edge1 = sub(p3, p1);
+ var edge2 = sub(p2, p1);
+ var normal = cross(edge1, edge2);
+ if (Math.abs(normal[0]) > Math.abs(normal[1]))
+ if (Math.abs(normal[0]) > Math.abs(normal[2]))
+ this.axis = 0;
+ else
+ this.axis = 2;
+ else
+ if (Math.abs(normal[1]) > Math.abs(normal[2]))
+ this.axis = 1;
+ else
+ this.axis = 2;
+ var u = (this.axis + 1) % 3;
+ var v = (this.axis + 2) % 3;
+ var u1 = edge1[u];
+ var v1 = edge1[v];
+
+ var u2 = edge2[u];
+ var v2 = edge2[v];
+ this.normal = normalise(normal);
+ this.nu = normal[u] / normal[this.axis];
+ this.nv = normal[v] / normal[this.axis];
+ this.nd = dot(normal, p1) / normal[this.axis];
+ var det = u1 * v2 - v1 * u2;
+ this.eu = p1[u];
+ this.ev = p1[v];
+ this.nu1 = u1 / det;
+ this.nv1 = -v1 / det;
+ this.nu2 = v2 / det;
+ this.nv2 = -u2 / det;
+ this.material = [0.7, 0.7, 0.7];
+}
+
+Triangle.prototype.intersect = function(orig, dir, near, far) {
+ var u = (this.axis + 1) % 3;
+ var v = (this.axis + 2) % 3;
+ var d = dir[this.axis] + this.nu * dir[u] + this.nv * dir[v];
+ var t = (this.nd - orig[this.axis] - this.nu * orig[u] - this.nv * orig[v]) / d;
+ if (t < near || t > far)
+ return null;
+ var Pu = orig[u] + t * dir[u] - this.eu;
+ var Pv = orig[v] + t * dir[v] - this.ev;
+ var a2 = Pv * this.nu1 + Pu * this.nv1;
+ if (a2 < 0)
+ return null;
+ var a3 = Pu * this.nu2 + Pv * this.nv2;
+ if (a3 < 0)
+ return null;
+
+ if ((a2 + a3) > 1)
+ return null;
+ return t;
+}
+
+function Scene(a_triangles) {
+ this.triangles = a_triangles;
+ this.lights = [];
+ this.ambient = [0,0,0];
+ this.background = [0.8,0.8,1];
+}
+var zero = new Array(0,0,0);
+
+Scene.prototype.intersect = function(origin, dir, near, far) {
+ var closest = null;
+ for (i = 0; i < this.triangles.length; i++) {
+ var triangle = this.triangles[i];
+ var d = triangle.intersect(origin, dir, near, far);
+ if (d == null || d > far || d < near)
+ continue;
+ far = d;
+ closest = triangle;
+ }
+
+ if (!closest)
+ return [this.background[0],this.background[1],this.background[2]];
+
+ var normal = closest.normal;
+ var hit = add(origin, scale(dir, far));
+ if (dot(dir, normal) > 0)
+ normal = [-normal[0], -normal[1], -normal[2]];
+
+ var colour = null;
+ if (closest.shader) {
+ colour = closest.shader(closest, hit, dir);
+ } else {
+ colour = closest.material;
+ }
+
+ // do reflection
+ var reflected = null;
+ if (colour.reflection > 0.001) {
+ var reflection = addVector(scale(normal, -2*dot(dir, normal)), dir);
+ reflected = this.intersect(hit, reflection, 0.0001, 1000000);
+ if (colour.reflection >= 0.999999)
+ return reflected;
+ }
+
+ var l = [this.ambient[0], this.ambient[1], this.ambient[2]];
+ for (var i = 0; i < this.lights.length; i++) {
+ var light = this.lights[i];
+ var toLight = sub(light, hit);
+ var distance = lengthVector(toLight);
+ scaleVector(toLight, 1.0/distance);
+ distance -= 0.0001;
+ if (this.blocked(hit, toLight, distance))
+ continue;
+ var nl = dot(normal, toLight);
+ if (nl > 0)
+ addVector(l, scale(light.colour, nl));
+ }
+ l = scalev(l, colour);
+ if (reflected) {
+ l = addVector(scaleVector(l, 1 - colour.reflection), scaleVector(reflected, colour.reflection));
+ }
+ return l;
+}
+
+Scene.prototype.blocked = function(O, D, far) {
+ var near = 0.0001;
+ var closest = null;
+ for (i = 0; i < this.triangles.length; i++) {
+ var triangle = this.triangles[i];
+ var d = triangle.intersect(O, D, near, far);
+ if (d == null || d > far || d < near)
+ continue;
+ return true;
+ }
+
+ return false;
+}
+
+
+// this camera code is from notes i made ages ago, it is from *somewhere* -- i cannot remember where
+// that somewhere is
+function Camera(origin, lookat, up) {
+ var zaxis = normaliseVector(subVector(lookat, origin));
+ var xaxis = normaliseVector(cross(up, zaxis));
+ var yaxis = normaliseVector(cross(xaxis, subVector([0,0,0], zaxis)));
+ var m = new Array(16);
+ m[0] = xaxis[0]; m[1] = xaxis[1]; m[2] = xaxis[2];
+ m[4] = yaxis[0]; m[5] = yaxis[1]; m[6] = yaxis[2];
+ m[8] = zaxis[0]; m[9] = zaxis[1]; m[10] = zaxis[2];
+ invertMatrix(m);
+ m[3] = 0; m[7] = 0; m[11] = 0;
+ this.origin = origin;
+ this.directions = new Array(4);
+ this.directions[0] = normalise([-0.7, 0.7, 1]);
+ this.directions[1] = normalise([ 0.7, 0.7, 1]);
+ this.directions[2] = normalise([ 0.7, -0.7, 1]);
+ this.directions[3] = normalise([-0.7, -0.7, 1]);
+ this.directions[0] = transformMatrix(m, this.directions[0]);
+ this.directions[1] = transformMatrix(m, this.directions[1]);
+ this.directions[2] = transformMatrix(m, this.directions[2]);
+ this.directions[3] = transformMatrix(m, this.directions[3]);
+}
+
+Camera.prototype.generateRayPair = function(y) {
+ rays = new Array(new Object(), new Object());
+ rays[0].origin = this.origin;
+ rays[1].origin = this.origin;
+ rays[0].dir = addVector(scale(this.directions[0], y), scale(this.directions[3], 1 - y));
+ rays[1].dir = addVector(scale(this.directions[1], y), scale(this.directions[2], 1 - y));
+ return rays;
+}
+
+function renderRows(camera, scene, pixels, width, height, starty, stopy) {
+ for (var y = starty; y < stopy; y++) {
+ var rays = camera.generateRayPair(y / height);
+ for (var x = 0; x < width; x++) {
+ var xp = x / width;
+ var origin = addVector(scale(rays[0].origin, xp), scale(rays[1].origin, 1 - xp));
+ var dir = normaliseVector(addVector(scale(rays[0].dir, xp), scale(rays[1].dir, 1 - xp)));
+ var l = scene.intersect(origin, dir);
+ pixels[y][x] = l;
+ }
+ }
+}
+
+Camera.prototype.render = function(scene, pixels, width, height) {
+ var cam = this;
+ var row = 0;
+ renderRows(cam, scene, pixels, width, height, 0, height);
+}
+
+
+
+function raytraceScene()
+{
+ var startDate = new Date().getTime();
+ var numTriangles = 2 * 6;
+ var triangles = new Array();//numTriangles);
+ var tfl = createVector(-10, 10, -10);
+ var tfr = createVector( 10, 10, -10);
+ var tbl = createVector(-10, 10, 10);
+ var tbr = createVector( 10, 10, 10);
+ var bfl = createVector(-10, -10, -10);
+ var bfr = createVector( 10, -10, -10);
+ var bbl = createVector(-10, -10, 10);
+ var bbr = createVector( 10, -10, 10);
+
+ // cube!!!
+ // front
+ var i = 0;
+
+ triangles[i++] = new Triangle(tfl, tfr, bfr);
+ triangles[i++] = new Triangle(tfl, bfr, bfl);
+ // back
+ triangles[i++] = new Triangle(tbl, tbr, bbr);
+ triangles[i++] = new Triangle(tbl, bbr, bbl);
+ // triangles[i-1].material = [0.7,0.2,0.2];
+ // triangles[i-1].material.reflection = 0.8;
+ // left
+ triangles[i++] = new Triangle(tbl, tfl, bbl);
+ // triangles[i-1].reflection = 0.6;
+ triangles[i++] = new Triangle(tfl, bfl, bbl);
+ // triangles[i-1].reflection = 0.6;
+ // right
+ triangles[i++] = new Triangle(tbr, tfr, bbr);
+ triangles[i++] = new Triangle(tfr, bfr, bbr);
+ // top
+ triangles[i++] = new Triangle(tbl, tbr, tfr);
+ triangles[i++] = new Triangle(tbl, tfr, tfl);
+ // bottom
+ triangles[i++] = new Triangle(bbl, bbr, bfr);
+ triangles[i++] = new Triangle(bbl, bfr, bfl);
+
+ //Floor!!!!
+ var green = createVector(0.0, 0.4, 0.0);
+ var grey = createVector(0.4, 0.4, 0.4);
+ grey.reflection = 1.0;
+ var floorShader = function(tri, pos, view) {
+ var x = ((pos[0]/32) % 2 + 2) % 2;
+ var z = ((pos[2]/32 + 0.3) % 2 + 2) % 2;
+ if (x < 1 != z < 1) {
+ //in the real world we use the fresnel term...
+ // var angle = 1-dot(view, tri.normal);
+ // angle *= angle;
+ // angle *= angle;
+ // angle *= angle;
+ //grey.reflection = angle;
+ return grey;
+ } else
+ return green;
+ }
+ var ffl = createVector(-1000, -30, -1000);
+ var ffr = createVector( 1000, -30, -1000);
+ var fbl = createVector(-1000, -30, 1000);
+ var fbr = createVector( 1000, -30, 1000);
+ triangles[i++] = new Triangle(fbl, fbr, ffr);
+ triangles[i-1].shader = floorShader;
+ triangles[i++] = new Triangle(fbl, ffr, ffl);
+ triangles[i-1].shader = floorShader;
+
+ var _scene = new Scene(triangles);
+ _scene.lights[0] = createVector(20, 38, -22);
+ _scene.lights[0].colour = createVector(0.7, 0.3, 0.3);
+ _scene.lights[1] = createVector(-23, 40, 17);
+ _scene.lights[1].colour = createVector(0.7, 0.3, 0.3);
+ _scene.lights[2] = createVector(23, 20, 17);
+ _scene.lights[2].colour = createVector(0.7, 0.7, 0.7);
+ _scene.ambient = createVector(0.1, 0.1, 0.1);
+ // _scene.background = createVector(0.7, 0.7, 1.0);
+
+ var size = 30;
+ var pixels = new Array();
+ for (var y = 0; y < size; y++) {
+ pixels[y] = new Array();
+ for (var x = 0; x < size; x++) {
+ pixels[y][x] = 0;
+ }
+ }
+
+ var _camera = new Camera(createVector(-40, 40, 40), createVector(0, 0, 0), createVector(0, 1, 0));
+ _camera.render(_scene, pixels, size, size);
+
+ return pixels;
+}
+
+function arrayToCanvasCommands(pixels)
+{
+ var s = '<canvas id="renderCanvas" width="30px" height="30px"></canvas><scr' + 'ipt>\nvar pixels = [';
+ var size = 30;
+ for (var y = 0; y < size; y++) {
+ s += "[";
+ for (var x = 0; x < size; x++) {
+ s += "[" + pixels[y][x] + "],";
+ }
+ s+= "],";
+ }
+ s += '];\n var canvas = document.getElementById("renderCanvas").getContext("2d");\n\
+\n\
+\n\
+ var size = 30;\n\
+ canvas.fillStyle = "red";\n\
+ canvas.fillRect(0, 0, size, size);\n\
+ canvas.scale(1, -1);\n\
+ canvas.translate(0, -size);\n\
+\n\
+ if (!canvas.setFillColor)\n\
+ canvas.setFillColor = function(r, g, b, a) {\n\
+ this.fillStyle = "rgb("+[Math.floor(r * 255), Math.floor(g * 255), Math.floor(b * 255)]+")";\n\
+ }\n\
+\n\
+for (var y = 0; y < size; y++) {\n\
+ for (var x = 0; x < size; x++) {\n\
+ var l = pixels[y][x];\n\
+ canvas.setFillColor(l[0], l[1], l[2], 1);\n\
+ canvas.fillRect(x, y, 1, 1);\n\
+ }\n\
+}</scr' + 'ipt>';
+
+ return s;
+}
+
+testOutput = arrayToCanvasCommands(raytraceScene());
diff --git a/SunSpider/tests/sunspider-0.9/LIST b/SunSpider/tests/sunspider-0.9/LIST
new file mode 100644
index 0000000..34cfac4
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/LIST
@@ -0,0 +1,26 @@
+3d-cube
+3d-morph
+3d-raytrace
+access-binary-trees
+access-fannkuch
+access-nbody
+access-nsieve
+bitops-3bit-bits-in-byte
+bitops-bits-in-byte
+bitops-bitwise-and
+bitops-nsieve-bits
+controlflow-recursive
+crypto-aes
+crypto-md5
+crypto-sha1
+date-format-tofte
+date-format-xparb
+math-cordic
+math-partial-sums
+math-spectral-norm
+regexp-dna
+string-base64
+string-fasta
+string-tagcloud
+string-unpack-code
+string-validate-input
diff --git a/SunSpider/tests/sunspider-0.9/access-binary-trees.js b/SunSpider/tests/sunspider-0.9/access-binary-trees.js
new file mode 100644
index 0000000..2f24e7d
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/access-binary-trees.js
@@ -0,0 +1,50 @@
+/* The Great Computer Language Shootout
+ http://shootout.alioth.debian.org/
+ contributed by Isaac Gouy */
+
+function TreeNode(left,right,item){
+ this.left = left;
+ this.right = right;
+ this.item = item;
+}
+
+TreeNode.prototype.itemCheck = function(){
+ if (this.left==null) return this.item;
+ else return this.item + this.left.itemCheck() - this.right.itemCheck();
+}
+
+function bottomUpTree(item,depth){
+ if (depth>0){
+ return new TreeNode(
+ bottomUpTree(2*item-1, depth-1)
+ ,bottomUpTree(2*item, depth-1)
+ ,item
+ );
+ }
+ else {
+ return new TreeNode(null,null,item);
+ }
+}
+
+var ret;
+
+for ( var n = 4; n <= 7; n += 1 ) {
+ var minDepth = 4;
+ var maxDepth = Math.max(minDepth + 2, n);
+ var stretchDepth = maxDepth + 1;
+
+ var check = bottomUpTree(0,stretchDepth).itemCheck();
+
+ var longLivedTree = bottomUpTree(0,maxDepth);
+ for (var depth=minDepth; depth<=maxDepth; depth+=2){
+ var iterations = 1 << (maxDepth - depth + minDepth);
+
+ check = 0;
+ for (var i=1; i<=iterations; i++){
+ check += bottomUpTree(i,depth).itemCheck();
+ check += bottomUpTree(-i,depth).itemCheck();
+ }
+ }
+
+ ret = longLivedTree.itemCheck();
+}
diff --git a/SunSpider/tests/sunspider-0.9/access-fannkuch.js b/SunSpider/tests/sunspider-0.9/access-fannkuch.js
new file mode 100644
index 0000000..1ea87b4
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/access-fannkuch.js
@@ -0,0 +1,66 @@
+/* The Great Computer Language Shootout
+ http://shootout.alioth.debian.org/
+ contributed by Isaac Gouy */
+
+function fannkuch(n) {
+ var check = 0;
+ var perm = Array(n);
+ var perm1 = Array(n);
+ var count = Array(n);
+ var maxPerm = Array(n);
+ var maxFlipsCount = 0;
+ var m = n - 1;
+
+ for (var i = 0; i < n; i++) perm1[i] = i;
+ var r = n;
+
+ while (true) {
+ // write-out the first 30 permutations
+ if (check < 30){
+ var s = "";
+ for(var i=0; i<n; i++) s += (perm1[i]+1).toString();
+ check++;
+ }
+
+ while (r != 1) { count[r - 1] = r; r--; }
+ if (!(perm1[0] == 0 || perm1[m] == m)) {
+ for (var i = 0; i < n; i++) perm[i] = perm1[i];
+
+ var flipsCount = 0;
+ var k;
+
+ while (!((k = perm[0]) == 0)) {
+ var k2 = (k + 1) >> 1;
+ for (var i = 0; i < k2; i++) {
+ var temp = perm[i]; perm[i] = perm[k - i]; perm[k - i] = temp;
+ }
+ flipsCount++;
+ }
+
+ if (flipsCount > maxFlipsCount) {
+ maxFlipsCount = flipsCount;
+ for (var i = 0; i < n; i++) maxPerm[i] = perm1[i];
+ }
+ }
+
+ while (true) {
+ if (r == n) return maxFlipsCount;
+ var perm0 = perm1[0];
+ var i = 0;
+ while (i < r) {
+ var j = i + 1;
+ perm1[i] = perm1[j];
+ i = j;
+ }
+ perm1[r] = perm0;
+
+ count[r] = count[r] - 1;
+ if (count[r] > 0) break;
+ r++;
+ }
+ }
+}
+
+var n = 8;
+var ret = fannkuch(n);
+
diff --git a/SunSpider/tests/sunspider-0.9/access-nbody.js b/SunSpider/tests/sunspider-0.9/access-nbody.js
new file mode 100644
index 0000000..f0d080d
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/access-nbody.js
@@ -0,0 +1,169 @@
+/* The Great Computer Language Shootout
+ http://shootout.alioth.debian.org/
+ contributed by Isaac Gouy */
+
+var PI = 3.141592653589793;
+var SOLAR_MASS = 4 * PI * PI;
+var DAYS_PER_YEAR = 365.24;
+
+function Body(x,y,z,vx,vy,vz,mass){
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.vx = vx;
+ this.vy = vy;
+ this.vz = vz;
+ this.mass = mass;
+}
+
+Body.prototype.offsetMomentum = function(px,py,pz) {
+ this.vx = -px / SOLAR_MASS;
+ this.vy = -py / SOLAR_MASS;
+ this.vz = -pz / SOLAR_MASS;
+ return this;
+}
+
+function Jupiter(){
+ return new Body(
+ 4.84143144246472090e+00,
+ -1.16032004402742839e+00,
+ -1.03622044471123109e-01,
+ 1.66007664274403694e-03 * DAYS_PER_YEAR,
+ 7.69901118419740425e-03 * DAYS_PER_YEAR,
+ -6.90460016972063023e-05 * DAYS_PER_YEAR,
+ 9.54791938424326609e-04 * SOLAR_MASS
+ );
+}
+
+function Saturn(){
+ return new Body(
+ 8.34336671824457987e+00,
+ 4.12479856412430479e+00,
+ -4.03523417114321381e-01,
+ -2.76742510726862411e-03 * DAYS_PER_YEAR,
+ 4.99852801234917238e-03 * DAYS_PER_YEAR,
+ 2.30417297573763929e-05 * DAYS_PER_YEAR,
+ 2.85885980666130812e-04 * SOLAR_MASS
+ );
+}
+
+function Uranus(){
+ return new Body(
+ 1.28943695621391310e+01,
+ -1.51111514016986312e+01,
+ -2.23307578892655734e-01,
+ 2.96460137564761618e-03 * DAYS_PER_YEAR,
+ 2.37847173959480950e-03 * DAYS_PER_YEAR,
+ -2.96589568540237556e-05 * DAYS_PER_YEAR,
+ 4.36624404335156298e-05 * SOLAR_MASS
+ );
+}
+
+function Neptune(){
+ return new Body(
+ 1.53796971148509165e+01,
+ -2.59193146099879641e+01,
+ 1.79258772950371181e-01,
+ 2.68067772490389322e-03 * DAYS_PER_YEAR,
+ 1.62824170038242295e-03 * DAYS_PER_YEAR,
+ -9.51592254519715870e-05 * DAYS_PER_YEAR,
+ 5.15138902046611451e-05 * SOLAR_MASS
+ );
+}
+
+function Sun(){
+ return new Body(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SOLAR_MASS);
+}
+
+
+function NBodySystem(bodies){
+ this.bodies = bodies;
+ var px = 0.0;
+ var py = 0.0;
+ var pz = 0.0;
+ var size = this.bodies.length;
+ for (var i=0; i<size; i++){
+ var b = this.bodies[i];
+ var m = b.mass;
+ px += b.vx * m;
+ py += b.vy * m;
+ pz += b.vz * m;
+ }
+ this.bodies[0].offsetMomentum(px,py,pz);
+}
+
+NBodySystem.prototype.advance = function(dt){
+ var dx, dy, dz, distance, mag;
+ var size = this.bodies.length;
+
+ for (var i=0; i<size; i++) {
+ var bodyi = this.bodies[i];
+ for (var j=i+1; j<size; j++) {
+ var bodyj = this.bodies[j];
+ dx = bodyi.x - bodyj.x;
+ dy = bodyi.y - bodyj.y;
+ dz = bodyi.z - bodyj.z;
+
+ distance = Math.sqrt(dx*dx + dy*dy + dz*dz);
+ mag = dt / (distance * distance * distance);
+
+ bodyi.vx -= dx * bodyj.mass * mag;
+ bodyi.vy -= dy * bodyj.mass * mag;
+ bodyi.vz -= dz * bodyj.mass * mag;
+
+ bodyj.vx += dx * bodyi.mass * mag;
+ bodyj.vy += dy * bodyi.mass * mag;
+ bodyj.vz += dz * bodyi.mass * mag;
+ }
+ }
+
+ for (var i=0; i<size; i++) {
+ var body = this.bodies[i];
+ body.x += dt * body.vx;
+ body.y += dt * body.vy;
+ body.z += dt * body.vz;
+ }
+}
+
+NBodySystem.prototype.energy = function(){
+ var dx, dy, dz, distance;
+ var e = 0.0;
+ var size = this.bodies.length;
+
+ for (var i=0; i<size; i++) {
+ var bodyi = this.bodies[i];
+
+ e += 0.5 * bodyi.mass *
+ ( bodyi.vx * bodyi.vx
+ + bodyi.vy * bodyi.vy
+ + bodyi.vz * bodyi.vz );
+
+ for (var j=i+1; j<size; j++) {
+ var bodyj = this.bodies[j];
+ dx = bodyi.x - bodyj.x;
+ dy = bodyi.y - bodyj.y;
+ dz = bodyi.z - bodyj.z;
+
+ distance = Math.sqrt(dx*dx + dy*dy + dz*dz);
+ e -= (bodyi.mass * bodyj.mass) / distance;
+ }
+ }
+ return e;
+}
+
+var ret;
+
+for ( var n = 3; n <= 24; n *= 2 ) {
+ (function(){
+ var bodies = new NBodySystem( Array(
+ Sun(),Jupiter(),Saturn(),Uranus(),Neptune()
+ ));
+ var max = n * 100;
+
+ ret = bodies.energy();
+ for (var i=0; i<max; i++){
+ bodies.advance(0.01);
+ }
+ ret = bodies.energy();
+ })();
+}
diff --git a/SunSpider/tests/sunspider-0.9/access-nsieve.js b/SunSpider/tests/sunspider-0.9/access-nsieve.js
new file mode 100644
index 0000000..70fdf1a
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/access-nsieve.js
@@ -0,0 +1,38 @@
+// The Great Computer Language Shootout
+// http://shootout.alioth.debian.org/
+//
+// modified by Isaac Gouy
+
+function pad(number,width){
+ var s = number.toString();
+ var prefixWidth = width - s.length;
+ if (prefixWidth>0){
+ for (var i=1; i<=prefixWidth; i++) s = " " + s;
+ }
+ return s;
+}
+
+function nsieve(m, isPrime){
+ var i, k, count;
+
+ for (i=2; i<=m; i++) { isPrime[i] = true; }
+ count = 0;
+
+ for (i=2; i<=m; i++){
+ if (isPrime[i]) {
+ for (k=i+i; k<=m; k+=i) isPrime[k] = false;
+ count++;
+ }
+ }
+ return count;
+}
+
+function sieve() {
+ for (var i = 1; i <= 3; i++ ) {
+ var m = (1<<i)*10000;
+ var flags = Array(m+1);
+ nsieve(m, flags);
+ }
+}
+
+sieve();
diff --git a/SunSpider/tests/sunspider-0.9/bitops-3bit-bits-in-byte.js b/SunSpider/tests/sunspider-0.9/bitops-3bit-bits-in-byte.js
new file mode 100644
index 0000000..1d85406
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/bitops-3bit-bits-in-byte.js
@@ -0,0 +1,32 @@
+// Copyright (c) 2004 by Arthur Langereis (arthur_ext at domain xfinitegames, tld com
+
+// 1 op = 6 ANDs, 3 SHRs, 3 SHLs, 4 assigns, 2 ADDs
+// O(1)
+function fast3bitlookup(b) {
+var c, bi3b = 0xE994; // 0b1110 1001 1001 0100; // 3 2 2 1 2 1 1 0
+c = 3 & (bi3b >> ((b << 1) & 14));
+c += 3 & (bi3b >> ((b >> 2) & 14));
+c += 3 & (bi3b >> ((b >> 5) & 6));
+return c;
+
+/*
+lir4,0xE994; 9 instructions, no memory access, minimal register dependence, 6 shifts, 2 adds, 1 inline assign
+rlwinmr5,r3,1,28,30
+rlwinmr6,r3,30,28,30
+rlwinmr7,r3,27,29,30
+rlwnmr8,r4,r5,30,31
+rlwnmr9,r4,r6,30,31
+rlwnmr10,r4,r7,30,31
+addr3,r8,r9
+addr3,r3,r10
+*/
+}
+
+
+function TimeFunc(func) {
+var x, y, t;
+for(var x=0; x<500; x++)
+for(var y=0; y<256; y++) func(y);
+}
+
+TimeFunc(fast3bitlookup);
diff --git a/SunSpider/tests/sunspider-0.9/bitops-bits-in-byte.js b/SunSpider/tests/sunspider-0.9/bitops-bits-in-byte.js
new file mode 100644
index 0000000..9a3acd4
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/bitops-bits-in-byte.js
@@ -0,0 +1,21 @@
+// Copyright (c) 2004 by Arthur Langereis (arthur_ext at domain xfinitegames, tld com)
+
+
+// 1 op = 2 assigns, 16 compare/branches, 8 ANDs, (0-8) ADDs, 8 SHLs
+// O(n)
+function bitsinbyte(b) {
+var m = 1, c = 0;
+while(m<0x100) {
+if(b & m) c++;
+m <<= 1;
+}
+return c;
+}
+
+function TimeFunc(func) {
+var x, y, t;
+for(var x=0; x<350; x++)
+for(var y=0; y<256; y++) func(y);
+}
+
+TimeFunc(bitsinbyte);
diff --git a/SunSpider/hosted/sunspider-record-result.js b/SunSpider/tests/sunspider-0.9/bitops-bitwise-and.js
index f86749a..7c80e69 100644
--- a/SunSpider/hosted/sunspider-record-result.js
+++ b/SunSpider/tests/sunspider-0.9/bitops-bitwise-and.js
@@ -23,9 +23,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-function record(time) {
- document.getElementById("console").innerHTML = time + "ms";
- if (window.parent) {
- parent.recordResult(time);
- }
-}
+bitwiseAndValue = 4294967296;
+for (var i = 0; i < 600000; i++)
+ bitwiseAndValue = bitwiseAndValue & i;
diff --git a/SunSpider/tests/sunspider-0.9/bitops-nsieve-bits.js b/SunSpider/tests/sunspider-0.9/bitops-nsieve-bits.js
new file mode 100644
index 0000000..6ef0ddb
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/bitops-nsieve-bits.js
@@ -0,0 +1,32 @@
+// The Great Computer Language Shootout
+// http://shootout.alioth.debian.org
+//
+// Contributed by Ian Osgood
+
+function pad(n,width) {
+ var s = n.toString();
+ while (s.length < width) s = ' ' + s;
+ return s;
+}
+
+function primes(isPrime, n) {
+ var i, count = 0, m = 10000<<n, size = m+31>>5;
+
+ for (i=0; i<size; i++) isPrime[i] = 0xffffffff;
+
+ for (i=2; i<m; i++)
+ if (isPrime[i>>5] & 1<<(i&31)) {
+ for (var j=i+i; j<m; j+=i)
+ isPrime[j>>5] &= ~(1<<(j&31));
+ count++;
+ }
+}
+
+function sieve() {
+ for (var i = 4; i <= 4; i++) {
+ var isPrime = new Array((10000<<i)+31>>5);
+ primes(isPrime, i);
+ }
+}
+
+sieve();
diff --git a/SunSpider/tests/sunspider-0.9/controlflow-recursive.js b/SunSpider/tests/sunspider-0.9/controlflow-recursive.js
new file mode 100644
index 0000000..fcfe1c4
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/controlflow-recursive.js
@@ -0,0 +1,25 @@
+// The Computer Language Shootout
+// http://shootout.alioth.debian.org/
+// contributed by Isaac Gouy
+
+function ack(m,n){
+ if (m==0) { return n+1; }
+ if (n==0) { return ack(m-1,1); }
+ return ack(m-1, ack(m,n-1) );
+}
+
+function fib(n) {
+ if (n < 2){ return 1; }
+ return fib(n-2) + fib(n-1);
+}
+
+function tak(x,y,z) {
+ if (y >= x) return z;
+ return tak(tak(x-1,y,z), tak(y-1,z,x), tak(z-1,x,y));
+}
+
+for ( var i = 3; i <= 5; i++ ) {
+ ack(3,i);
+ fib(17.0+i);
+ tak(3*i+3,2*i+2,i+1);
+}
diff --git a/SunSpider/tests/sunspider-0.9/crypto-aes.js b/SunSpider/tests/sunspider-0.9/crypto-aes.js
new file mode 100644
index 0000000..93a5969
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/crypto-aes.js
@@ -0,0 +1,422 @@
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+/*
+ * AES Cipher function: encrypt 'input' with Rijndael algorithm
+ *
+ * takes byte-array 'input' (16 bytes)
+ * 2D byte-array key schedule 'w' (Nr+1 x Nb bytes)
+ *
+ * applies Nr rounds (10/12/14) using key schedule w for 'add round key' stage
+ *
+ * returns byte-array encrypted value (16 bytes)
+ */
+function Cipher(input, w) { // main Cipher function [§5.1]
+ var Nb = 4; // block size (in words): no of columns in state (fixed at 4 for AES)
+ var Nr = w.length/Nb - 1; // no of rounds: 10/12/14 for 128/192/256-bit keys
+
+ var state = [[],[],[],[]]; // initialise 4xNb byte-array 'state' with input [§3.4]
+ for (var i=0; i<4*Nb; i++) state[i%4][Math.floor(i/4)] = input[i];
+
+ state = AddRoundKey(state, w, 0, Nb);
+
+ for (var round=1; round<Nr; round++) {
+ state = SubBytes(state, Nb);
+ state = ShiftRows(state, Nb);
+ state = MixColumns(state, Nb);
+ state = AddRoundKey(state, w, round, Nb);
+ }
+
+ state = SubBytes(state, Nb);
+ state = ShiftRows(state, Nb);
+ state = AddRoundKey(state, w, Nr, Nb);
+
+ var output = new Array(4*Nb); // convert state to 1-d array before returning [§3.4]
+ for (var i=0; i<4*Nb; i++) output[i] = state[i%4][Math.floor(i/4)];
+ return output;
+}
+
+
+function SubBytes(s, Nb) { // apply SBox to state S [§5.1.1]
+ for (var r=0; r<4; r++) {
+ for (var c=0; c<Nb; c++) s[r][c] = Sbox[s[r][c]];
+ }
+ return s;
+}
+
+
+function ShiftRows(s, Nb) { // shift row r of state S left by r bytes [§5.1.2]
+ var t = new Array(4);
+ for (var r=1; r<4; r++) {
+ for (var c=0; c<4; c++) t[c] = s[r][(c+r)%Nb]; // shift into temp copy
+ for (var c=0; c<4; c++) s[r][c] = t[c]; // and copy back
+ } // note that this will work for Nb=4,5,6, but not 7,8 (always 4 for AES):
+ return s; // see fp.gladman.plus.com/cryptography_technology/rijndael/aes.spec.311.pdf
+}
+
+
+function MixColumns(s, Nb) { // combine bytes of each col of state S [§5.1.3]
+ for (var c=0; c<4; c++) {
+ var a = new Array(4); // 'a' is a copy of the current column from 's'
+ var b = new Array(4); // 'b' is a•{02} in GF(2^8)
+ for (var i=0; i<4; i++) {
+ a[i] = s[i][c];
+ b[i] = s[i][c]&0x80 ? s[i][c]<<1 ^ 0x011b : s[i][c]<<1;
+ }
+ // a[n] ^ b[n] is a•{03} in GF(2^8)
+ s[0][c] = b[0] ^ a[1] ^ b[1] ^ a[2] ^ a[3]; // 2*a0 + 3*a1 + a2 + a3
+ s[1][c] = a[0] ^ b[1] ^ a[2] ^ b[2] ^ a[3]; // a0 * 2*a1 + 3*a2 + a3
+ s[2][c] = a[0] ^ a[1] ^ b[2] ^ a[3] ^ b[3]; // a0 + a1 + 2*a2 + 3*a3
+ s[3][c] = a[0] ^ b[0] ^ a[1] ^ a[2] ^ b[3]; // 3*a0 + a1 + a2 + 2*a3
+ }
+ return s;
+}
+
+
+function AddRoundKey(state, w, rnd, Nb) { // xor Round Key into state S [§5.1.4]
+ for (var r=0; r<4; r++) {
+ for (var c=0; c<Nb; c++) state[r][c] ^= w[rnd*4+c][r];
+ }
+ return state;
+}
+
+
+function KeyExpansion(key) { // generate Key Schedule (byte-array Nr+1 x Nb) from Key [§5.2]
+ var Nb = 4; // block size (in words): no of columns in state (fixed at 4 for AES)
+ var Nk = key.length/4 // key length (in words): 4/6/8 for 128/192/256-bit keys
+ var Nr = Nk + 6; // no of rounds: 10/12/14 for 128/192/256-bit keys
+
+ var w = new Array(Nb*(Nr+1));
+ var temp = new Array(4);
+
+ for (var i=0; i<Nk; i++) {
+ var r = [key[4*i], key[4*i+1], key[4*i+2], key[4*i+3]];
+ w[i] = r;
+ }
+
+ for (var i=Nk; i<(Nb*(Nr+1)); i++) {
+ w[i] = new Array(4);
+ for (var t=0; t<4; t++) temp[t] = w[i-1][t];
+ if (i % Nk == 0) {
+ temp = SubWord(RotWord(temp));
+ for (var t=0; t<4; t++) temp[t] ^= Rcon[i/Nk][t];
+ } else if (Nk > 6 && i%Nk == 4) {
+ temp = SubWord(temp);
+ }
+ for (var t=0; t<4; t++) w[i][t] = w[i-Nk][t] ^ temp[t];
+ }
+
+ return w;
+}
+
+function SubWord(w) { // apply SBox to 4-byte word w
+ for (var i=0; i<4; i++) w[i] = Sbox[w[i]];
+ return w;
+}
+
+function RotWord(w) { // rotate 4-byte word w left by one byte
+ w[4] = w[0];
+ for (var i=0; i<4; i++) w[i] = w[i+1];
+ return w;
+}
+
+
+// Sbox is pre-computed multiplicative inverse in GF(2^8) used in SubBytes and KeyExpansion [§5.1.1]
+var Sbox = [0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5,0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76,
+ 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0,0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0,
+ 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc,0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15,
+ 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a,0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75,
+ 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0,0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84,
+ 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b,0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf,
+ 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85,0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8,
+ 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5,0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2,
+ 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17,0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73,
+ 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88,0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb,
+ 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c,0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79,
+ 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9,0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08,
+ 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6,0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a,
+ 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e,0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e,
+ 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94,0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf,
+ 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68,0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16];
+
+// Rcon is Round Constant used for the Key Expansion [1st col is 2^(r-1) in GF(2^8)] [§5.2]
+var Rcon = [ [0x00, 0x00, 0x00, 0x00],
+ [0x01, 0x00, 0x00, 0x00],
+ [0x02, 0x00, 0x00, 0x00],
+ [0x04, 0x00, 0x00, 0x00],
+ [0x08, 0x00, 0x00, 0x00],
+ [0x10, 0x00, 0x00, 0x00],
+ [0x20, 0x00, 0x00, 0x00],
+ [0x40, 0x00, 0x00, 0x00],
+ [0x80, 0x00, 0x00, 0x00],
+ [0x1b, 0x00, 0x00, 0x00],
+ [0x36, 0x00, 0x00, 0x00] ];
+
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+/*
+ * Use AES to encrypt 'plaintext' with 'password' using 'nBits' key, in 'Counter' mode of operation
+ * - see http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
+ * for each block
+ * - outputblock = cipher(counter, key)
+ * - cipherblock = plaintext xor outputblock
+ */
+function AESEncryptCtr(plaintext, password, nBits) {
+ if (!(nBits==128 || nBits==192 || nBits==256)) return ''; // standard allows 128/192/256 bit keys
+
+ // for this example script, generate the key by applying Cipher to 1st 16/24/32 chars of password;
+ // for real-world applications, a more secure approach would be to hash the password e.g. with SHA-1
+ var nBytes = nBits/8; // no bytes in key
+ var pwBytes = new Array(nBytes);
+ for (var i=0; i<nBytes; i++) pwBytes[i] = password.charCodeAt(i) & 0xff;
+ var key = Cipher(pwBytes, KeyExpansion(pwBytes));
+ key = key.concat(key.slice(0, nBytes-16)); // key is now 16/24/32 bytes long
+
+ // initialise counter block (NIST SP800-38A §B.2): millisecond time-stamp for nonce in 1st 8 bytes,
+ // block counter in 2nd 8 bytes
+ var blockSize = 16; // block size fixed at 16 bytes / 128 bits (Nb=4) for AES
+ var counterBlock = new Array(blockSize); // block size fixed at 16 bytes / 128 bits (Nb=4) for AES
+ var nonce = (new Date()).getTime(); // milliseconds since 1-Jan-1970
+
+ // encode nonce in two stages to cater for JavaScript 32-bit limit on bitwise ops
+ for (var i=0; i<4; i++) counterBlock[i] = (nonce >>> i*8) & 0xff;
+ for (var i=0; i<4; i++) counterBlock[i+4] = (nonce/0x100000000 >>> i*8) & 0xff;
+
+ // generate key schedule - an expansion of the key into distinct Key Rounds for each round
+ var keySchedule = KeyExpansion(key);
+
+ var blockCount = Math.ceil(plaintext.length/blockSize);
+ var ciphertext = new Array(blockCount); // ciphertext as array of strings
+
+ for (var b=0; b<blockCount; b++) {
+ // set counter (block #) in last 8 bytes of counter block (leaving nonce in 1st 8 bytes)
+ // again done in two stages for 32-bit ops
+ for (var c=0; c<4; c++) counterBlock[15-c] = (b >>> c*8) & 0xff;
+ for (var c=0; c<4; c++) counterBlock[15-c-4] = (b/0x100000000 >>> c*8)
+
+ var cipherCntr = Cipher(counterBlock, keySchedule); // -- encrypt counter block --
+
+ // calculate length of final block:
+ var blockLength = b<blockCount-1 ? blockSize : (plaintext.length-1)%blockSize+1;
+
+ var ct = '';
+ for (var i=0; i<blockLength; i++) { // -- xor plaintext with ciphered counter byte-by-byte --
+ var plaintextByte = plaintext.charCodeAt(b*blockSize+i);
+ var cipherByte = plaintextByte ^ cipherCntr[i];
+ ct += String.fromCharCode(cipherByte);
+ }
+ // ct is now ciphertext for this block
+
+ ciphertext[b] = escCtrlChars(ct); // escape troublesome characters in ciphertext
+ }
+
+ // convert the nonce to a string to go on the front of the ciphertext
+ var ctrTxt = '';
+ for (var i=0; i<8; i++) ctrTxt += String.fromCharCode(counterBlock[i]);
+ ctrTxt = escCtrlChars(ctrTxt);
+
+ // use '-' to separate blocks, use Array.join to concatenate arrays of strings for efficiency
+ return ctrTxt + '-' + ciphertext.join('-');
+}
+
+
+/*
+ * Use AES to decrypt 'ciphertext' with 'password' using 'nBits' key, in Counter mode of operation
+ *
+ * for each block
+ * - outputblock = cipher(counter, key)
+ * - cipherblock = plaintext xor outputblock
+ */
+function AESDecryptCtr(ciphertext, password, nBits) {
+ if (!(nBits==128 || nBits==192 || nBits==256)) return ''; // standard allows 128/192/256 bit keys
+
+ var nBytes = nBits/8; // no bytes in key
+ var pwBytes = new Array(nBytes);
+ for (var i=0; i<nBytes; i++) pwBytes[i] = password.charCodeAt(i) & 0xff;
+ var pwKeySchedule = KeyExpansion(pwBytes);
+ var key = Cipher(pwBytes, pwKeySchedule);
+ key = key.concat(key.slice(0, nBytes-16)); // key is now 16/24/32 bytes long
+
+ var keySchedule = KeyExpansion(key);
+
+ ciphertext = ciphertext.split('-'); // split ciphertext into array of block-length strings
+
+ // recover nonce from 1st element of ciphertext
+ var blockSize = 16; // block size fixed at 16 bytes / 128 bits (Nb=4) for AES
+ var counterBlock = new Array(blockSize);
+ var ctrTxt = unescCtrlChars(ciphertext[0]);
+ for (var i=0; i<8; i++) counterBlock[i] = ctrTxt.charCodeAt(i);
+
+ var plaintext = new Array(ciphertext.length-1);
+
+ for (var b=1; b<ciphertext.length; b++) {
+ // set counter (block #) in last 8 bytes of counter block (leaving nonce in 1st 8 bytes)
+ for (var c=0; c<4; c++) counterBlock[15-c] = ((b-1) >>> c*8) & 0xff;
+ for (var c=0; c<4; c++) counterBlock[15-c-4] = ((b/0x100000000-1) >>> c*8) & 0xff;
+
+ var cipherCntr = Cipher(counterBlock, keySchedule); // encrypt counter block
+
+ ciphertext[b] = unescCtrlChars(ciphertext[b]);
+
+ var pt = '';
+ for (var i=0; i<ciphertext[b].length; i++) {
+ // -- xor plaintext with ciphered counter byte-by-byte --
+ var ciphertextByte = ciphertext[b].charCodeAt(i);
+ var plaintextByte = ciphertextByte ^ cipherCntr[i];
+ pt += String.fromCharCode(plaintextByte);
+ }
+ // pt is now plaintext for this block
+
+ plaintext[b-1] = pt; // b-1 'cos no initial nonce block in plaintext
+ }
+
+ return plaintext.join('');
+}
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+function escCtrlChars(str) { // escape control chars which might cause problems handling ciphertext
+ return str.replace(/[\0\t\n\v\f\r\xa0'"!-]/g, function(c) { return '!' + c.charCodeAt(0) + '!'; });
+} // \xa0 to cater for bug in Firefox; include '-' to leave it free for use as a block marker
+
+function unescCtrlChars(str) { // unescape potentially problematic control characters
+ return str.replace(/!\d\d?\d?!/g, function(c) { return String.fromCharCode(c.slice(1,-1)); });
+}
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+/*
+ * if escCtrlChars()/unescCtrlChars() still gives problems, use encodeBase64()/decodeBase64() instead
+ */
+var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
+
+function encodeBase64(str) { // http://tools.ietf.org/html/rfc4648
+ var o1, o2, o3, h1, h2, h3, h4, bits, i=0, enc='';
+
+ str = encodeUTF8(str); // encode multi-byte chars into UTF-8 for byte-array
+
+ do { // pack three octets into four hexets
+ o1 = str.charCodeAt(i++);
+ o2 = str.charCodeAt(i++);
+ o3 = str.charCodeAt(i++);
+
+ bits = o1<<16 | o2<<8 | o3;
+
+ h1 = bits>>18 & 0x3f;
+ h2 = bits>>12 & 0x3f;
+ h3 = bits>>6 & 0x3f;
+ h4 = bits & 0x3f;
+
+ // end of string? index to '=' in b64
+ if (isNaN(o3)) h4 = 64;
+ if (isNaN(o2)) h3 = 64;
+
+ // use hexets to index into b64, and append result to encoded string
+ enc += b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);
+ } while (i < str.length);
+
+ return enc;
+}
+
+function decodeBase64(str) {
+ var o1, o2, o3, h1, h2, h3, h4, bits, i=0, enc='';
+
+ do { // unpack four hexets into three octets using index points in b64
+ h1 = b64.indexOf(str.charAt(i++));
+ h2 = b64.indexOf(str.charAt(i++));
+ h3 = b64.indexOf(str.charAt(i++));
+ h4 = b64.indexOf(str.charAt(i++));
+
+ bits = h1<<18 | h2<<12 | h3<<6 | h4;
+
+ o1 = bits>>16 & 0xff;
+ o2 = bits>>8 & 0xff;
+ o3 = bits & 0xff;
+
+ if (h3 == 64) enc += String.fromCharCode(o1);
+ else if (h4 == 64) enc += String.fromCharCode(o1, o2);
+ else enc += String.fromCharCode(o1, o2, o3);
+ } while (i < str.length);
+
+ return decodeUTF8(enc); // decode UTF-8 byte-array back to Unicode
+}
+
+function encodeUTF8(str) { // encode multi-byte string into utf-8 multiple single-byte characters
+ str = str.replace(
+ /[\u0080-\u07ff]/g, // U+0080 - U+07FF = 2-byte chars
+ function(c) {
+ var cc = c.charCodeAt(0);
+ return String.fromCharCode(0xc0 | cc>>6, 0x80 | cc&0x3f); }
+ );
+ str = str.replace(
+ /[\u0800-\uffff]/g, // U+0800 - U+FFFF = 3-byte chars
+ function(c) {
+ var cc = c.charCodeAt(0);
+ return String.fromCharCode(0xe0 | cc>>12, 0x80 | cc>>6&0x3F, 0x80 | cc&0x3f); }
+ );
+ return str;
+}
+
+function decodeUTF8(str) { // decode utf-8 encoded string back into multi-byte characters
+ str = str.replace(
+ /[\u00c0-\u00df][\u0080-\u00bf]/g, // 2-byte chars
+ function(c) {
+ var cc = (c.charCodeAt(0)&0x1f)<<6 | c.charCodeAt(1)&0x3f;
+ return String.fromCharCode(cc); }
+ );
+ str = str.replace(
+ /[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g, // 3-byte chars
+ function(c) {
+ var cc = (c.charCodeAt(0)&0x0f)<<12 | (c.charCodeAt(1)&0x3f<<6) | c.charCodeAt(2)&0x3f;
+ return String.fromCharCode(cc); }
+ );
+ return str;
+}
+
+
+function byteArrayToHexStr(b) { // convert byte array to hex string for displaying test vectors
+ var s = '';
+ for (var i=0; i<b.length; i++) s += b[i].toString(16) + ' ';
+ return s;
+}
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+
+var plainText = "ROMEO: But, soft! what light through yonder window breaks?\n\
+It is the east, and Juliet is the sun.\n\
+Arise, fair sun, and kill the envious moon,\n\
+Who is already sick and pale with grief,\n\
+That thou her maid art far more fair than she:\n\
+Be not her maid, since she is envious;\n\
+Her vestal livery is but sick and green\n\
+And none but fools do wear it; cast it off.\n\
+It is my lady, O, it is my love!\n\
+O, that she knew she were!\n\
+She speaks yet she says nothing: what of that?\n\
+Her eye discourses; I will answer it.\n\
+I am too bold, 'tis not to me she speaks:\n\
+Two of the fairest stars in all the heaven,\n\
+Having some business, do entreat her eyes\n\
+To twinkle in their spheres till they return.\n\
+What if her eyes were there, they in her head?\n\
+The brightness of her cheek would shame those stars,\n\
+As daylight doth a lamp; her eyes in heaven\n\
+Would through the airy region stream so bright\n\
+That birds would sing and think it were not night.\n\
+See, how she leans her cheek upon her hand!\n\
+O, that I were a glove upon that hand,\n\
+That I might touch that cheek!\n\
+JULIET: Ay me!\n\
+ROMEO: She speaks:\n\
+O, speak again, bright angel! for thou art\n\
+As glorious to this night, being o'er my head\n\
+As is a winged messenger of heaven\n\
+Unto the white-upturned wondering eyes\n\
+Of mortals that fall back to gaze on him\n\
+When he bestrides the lazy-pacing clouds\n\
+And sails upon the bosom of the air.";
+
+var password = "O Romeo, Romeo! wherefore art thou Romeo?";
+
+var cipherText = AESEncryptCtr(plainText, password, 256);
+var decryptedText = AESDecryptCtr(cipherText, password, 256);
diff --git a/SunSpider/tests/sunspider-0.9/crypto-md5.js b/SunSpider/tests/sunspider-0.9/crypto-md5.js
new file mode 100644
index 0000000..cc7a896
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/crypto-md5.js
@@ -0,0 +1,286 @@
+/*
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+ * Digest Algorithm, as defined in RFC 1321.
+ * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for more info.
+ */
+
+/*
+ * Configurable variables. You may need to tweak these to be compatible with
+ * the server-side, but the defaults work in most cases.
+ */
+var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
+var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */
+var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */
+
+/*
+ * These are the functions you'll usually want to call
+ * They take string arguments and return either hex or base-64 encoded strings
+ */
+function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));}
+function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));}
+function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));}
+function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); }
+function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); }
+function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); }
+
+/*
+ * Perform a simple self-test to see if the VM is working
+ */
+function md5_vm_test()
+{
+ return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";
+}
+
+/*
+ * Calculate the MD5 of an array of little-endian words, and a bit length
+ */
+function core_md5(x, len)
+{
+ /* append padding */
+ x[len >> 5] |= 0x80 << ((len) % 32);
+ x[(((len + 64) >>> 9) << 4) + 14] = len;
+
+ var a = 1732584193;
+ var b = -271733879;
+ var c = -1732584194;
+ var d = 271733878;
+
+ for(var i = 0; i < x.length; i += 16)
+ {
+ var olda = a;
+ var oldb = b;
+ var oldc = c;
+ var oldd = d;
+
+ a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
+ d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
+ c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);
+ b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
+ a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
+ d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);
+ c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
+ b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
+ a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);
+ d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
+ c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
+ b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
+ a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);
+ d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
+ c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
+ b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);
+
+ a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
+ d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
+ c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);
+ b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
+ a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
+ d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);
+ c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
+ b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
+ a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);
+ d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
+ c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
+ b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);
+ a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
+ d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
+ c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);
+ b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
+
+ a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
+ d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
+ c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);
+ b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
+ a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
+ d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);
+ c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
+ b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
+ a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);
+ d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
+ c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
+ b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);
+ a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
+ d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
+ c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);
+ b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
+
+ a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
+ d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);
+ c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
+ b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
+ a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);
+ d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
+ c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
+ b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
+ a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);
+ d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
+ c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
+ b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);
+ a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
+ d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
+ c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);
+ b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
+
+ a = safe_add(a, olda);
+ b = safe_add(b, oldb);
+ c = safe_add(c, oldc);
+ d = safe_add(d, oldd);
+ }
+ return Array(a, b, c, d);
+
+}
+
+/*
+ * These functions implement the four basic operations the algorithm uses.
+ */
+function md5_cmn(q, a, b, x, s, t)
+{
+ return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
+}
+function md5_ff(a, b, c, d, x, s, t)
+{
+ return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
+}
+function md5_gg(a, b, c, d, x, s, t)
+{
+ return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
+}
+function md5_hh(a, b, c, d, x, s, t)
+{
+ return md5_cmn(b ^ c ^ d, a, b, x, s, t);
+}
+function md5_ii(a, b, c, d, x, s, t)
+{
+ return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
+}
+
+/*
+ * Calculate the HMAC-MD5, of a key and some data
+ */
+function core_hmac_md5(key, data)
+{
+ var bkey = str2binl(key);
+ if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz);
+
+ var ipad = Array(16), opad = Array(16);
+ for(var i = 0; i < 16; i++)
+ {
+ ipad[i] = bkey[i] ^ 0x36363636;
+ opad[i] = bkey[i] ^ 0x5C5C5C5C;
+ }
+
+ var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz);
+ return core_md5(opad.concat(hash), 512 + 128);
+}
+
+/*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+function safe_add(x, y)
+{
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF);
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return (msw << 16) | (lsw & 0xFFFF);
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function bit_rol(num, cnt)
+{
+ return (num << cnt) | (num >>> (32 - cnt));
+}
+
+/*
+ * Convert a string to an array of little-endian words
+ * If chrsz is ASCII, characters >255 have their hi-byte silently ignored.
+ */
+function str2binl(str)
+{
+ var bin = Array();
+ var mask = (1 << chrsz) - 1;
+ for(var i = 0; i < str.length * chrsz; i += chrsz)
+ bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32);
+ return bin;
+}
+
+/*
+ * Convert an array of little-endian words to a string
+ */
+function binl2str(bin)
+{
+ var str = "";
+ var mask = (1 << chrsz) - 1;
+ for(var i = 0; i < bin.length * 32; i += chrsz)
+ str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask);
+ return str;
+}
+
+/*
+ * Convert an array of little-endian words to a hex string.
+ */
+function binl2hex(binarray)
+{
+ var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
+ var str = "";
+ for(var i = 0; i < binarray.length * 4; i++)
+ {
+ str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) +
+ hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF);
+ }
+ return str;
+}
+
+/*
+ * Convert an array of little-endian words to a base-64 string
+ */
+function binl2b64(binarray)
+{
+ var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ var str = "";
+ for(var i = 0; i < binarray.length * 4; i += 3)
+ {
+ var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16)
+ | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 )
+ | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF);
+ for(var j = 0; j < 4; j++)
+ {
+ if(i * 8 + j * 6 > binarray.length * 32) str += b64pad;
+ else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);
+ }
+ }
+ return str;
+}
+
+var plainText = "Rebellious subjects, enemies to peace,\n\
+Profaners of this neighbour-stained steel,--\n\
+Will they not hear? What, ho! you men, you beasts,\n\
+That quench the fire of your pernicious rage\n\
+With purple fountains issuing from your veins,\n\
+On pain of torture, from those bloody hands\n\
+Throw your mistemper'd weapons to the ground,\n\
+And hear the sentence of your moved prince.\n\
+Three civil brawls, bred of an airy word,\n\
+By thee, old Capulet, and Montague,\n\
+Have thrice disturb'd the quiet of our streets,\n\
+And made Verona's ancient citizens\n\
+Cast by their grave beseeming ornaments,\n\
+To wield old partisans, in hands as old,\n\
+Canker'd with peace, to part your canker'd hate:\n\
+If ever you disturb our streets again,\n\
+Your lives shall pay the forfeit of the peace.\n\
+For this time, all the rest depart away:\n\
+You Capulet; shall go along with me:\n\
+And, Montague, come you this afternoon,\n\
+To know our further pleasure in this case,\n\
+To old Free-town, our common judgment-place.\n\
+Once more, on pain of death, all men depart."
+
+for (var i = 0; i <4; i++) {
+ plainText += plainText;
+}
+
+var md5Output = hex_md5(plainText);
diff --git a/SunSpider/tests/sunspider-0.9/crypto-sha1.js b/SunSpider/tests/sunspider-0.9/crypto-sha1.js
new file mode 100644
index 0000000..ca8d901
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/crypto-sha1.js
@@ -0,0 +1,224 @@
+/*
+ * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
+ * in FIPS PUB 180-1
+ * Version 2.1a Copyright Paul Johnston 2000 - 2002.
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for details.
+ */
+
+/*
+ * Configurable variables. You may need to tweak these to be compatible with
+ * the server-side, but the defaults work in most cases.
+ */
+var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
+var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */
+var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */
+
+/*
+ * These are the functions you'll usually want to call
+ * They take string arguments and return either hex or base-64 encoded strings
+ */
+function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));}
+function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length * chrsz));}
+function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length * chrsz));}
+function hex_hmac_sha1(key, data){ return binb2hex(core_hmac_sha1(key, data));}
+function b64_hmac_sha1(key, data){ return binb2b64(core_hmac_sha1(key, data));}
+function str_hmac_sha1(key, data){ return binb2str(core_hmac_sha1(key, data));}
+
+/*
+ * Perform a simple self-test to see if the VM is working
+ */
+function sha1_vm_test()
+{
+ return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d";
+}
+
+/*
+ * Calculate the SHA-1 of an array of big-endian words, and a bit length
+ */
+function core_sha1(x, len)
+{
+ /* append padding */
+ x[len >> 5] |= 0x80 << (24 - len % 32);
+ x[((len + 64 >> 9) << 4) + 15] = len;
+
+ var w = Array(80);
+ var a = 1732584193;
+ var b = -271733879;
+ var c = -1732584194;
+ var d = 271733878;
+ var e = -1009589776;
+
+ for(var i = 0; i < x.length; i += 16)
+ {
+ var olda = a;
+ var oldb = b;
+ var oldc = c;
+ var oldd = d;
+ var olde = e;
+
+ for(var j = 0; j < 80; j++)
+ {
+ if(j < 16) w[j] = x[i + j];
+ else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);
+ var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)),
+ safe_add(safe_add(e, w[j]), sha1_kt(j)));
+ e = d;
+ d = c;
+ c = rol(b, 30);
+ b = a;
+ a = t;
+ }
+
+ a = safe_add(a, olda);
+ b = safe_add(b, oldb);
+ c = safe_add(c, oldc);
+ d = safe_add(d, oldd);
+ e = safe_add(e, olde);
+ }
+ return Array(a, b, c, d, e);
+
+}
+
+/*
+ * Perform the appropriate triplet combination function for the current
+ * iteration
+ */
+function sha1_ft(t, b, c, d)
+{
+ if(t < 20) return (b & c) | ((~b) & d);
+ if(t < 40) return b ^ c ^ d;
+ if(t < 60) return (b & c) | (b & d) | (c & d);
+ return b ^ c ^ d;
+}
+
+/*
+ * Determine the appropriate additive constant for the current iteration
+ */
+function sha1_kt(t)
+{
+ return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 :
+ (t < 60) ? -1894007588 : -899497514;
+}
+
+/*
+ * Calculate the HMAC-SHA1 of a key and some data
+ */
+function core_hmac_sha1(key, data)
+{
+ var bkey = str2binb(key);
+ if(bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz);
+
+ var ipad = Array(16), opad = Array(16);
+ for(var i = 0; i < 16; i++)
+ {
+ ipad[i] = bkey[i] ^ 0x36363636;
+ opad[i] = bkey[i] ^ 0x5C5C5C5C;
+ }
+
+ var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz);
+ return core_sha1(opad.concat(hash), 512 + 160);
+}
+
+/*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+function safe_add(x, y)
+{
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF);
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return (msw << 16) | (lsw & 0xFFFF);
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function rol(num, cnt)
+{
+ return (num << cnt) | (num >>> (32 - cnt));
+}
+
+/*
+ * Convert an 8-bit or 16-bit string to an array of big-endian words
+ * In 8-bit function, characters >255 have their hi-byte silently ignored.
+ */
+function str2binb(str)
+{
+ var bin = Array();
+ var mask = (1 << chrsz) - 1;
+ for(var i = 0; i < str.length * chrsz; i += chrsz)
+ bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (32 - chrsz - i%32);
+ return bin;
+}
+
+/*
+ * Convert an array of big-endian words to a string
+ */
+function binb2str(bin)
+{
+ var str = "";
+ var mask = (1 << chrsz) - 1;
+ for(var i = 0; i < bin.length * 32; i += chrsz)
+ str += String.fromCharCode((bin[i>>5] >>> (32 - chrsz - i%32)) & mask);
+ return str;
+}
+
+/*
+ * Convert an array of big-endian words to a hex string.
+ */
+function binb2hex(binarray)
+{
+ var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
+ var str = "";
+ for(var i = 0; i < binarray.length * 4; i++)
+ {
+ str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) +
+ hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF);
+ }
+ return str;
+}
+
+/*
+ * Convert an array of big-endian words to a base-64 string
+ */
+function binb2b64(binarray)
+{
+ var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ var str = "";
+ for(var i = 0; i < binarray.length * 4; i += 3)
+ {
+ var triplet = (((binarray[i >> 2] >> 8 * (3 - i %4)) & 0xFF) << 16)
+ | (((binarray[i+1 >> 2] >> 8 * (3 - (i+1)%4)) & 0xFF) << 8 )
+ | ((binarray[i+2 >> 2] >> 8 * (3 - (i+2)%4)) & 0xFF);
+ for(var j = 0; j < 4; j++)
+ {
+ if(i * 8 + j * 6 > binarray.length * 32) str += b64pad;
+ else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);
+ }
+ }
+ return str;
+}
+
+
+var plainText = "Two households, both alike in dignity,\n\
+In fair Verona, where we lay our scene,\n\
+From ancient grudge break to new mutiny,\n\
+Where civil blood makes civil hands unclean.\n\
+From forth the fatal loins of these two foes\n\
+A pair of star-cross'd lovers take their life;\n\
+Whole misadventured piteous overthrows\n\
+Do with their death bury their parents' strife.\n\
+The fearful passage of their death-mark'd love,\n\
+And the continuance of their parents' rage,\n\
+Which, but their children's end, nought could remove,\n\
+Is now the two hours' traffic of our stage;\n\
+The which if you with patient ears attend,\n\
+What here shall miss, our toil shall strive to mend.";
+
+for (var i = 0; i <4; i++) {
+ plainText += plainText;
+}
+
+var sha1Output = hex_sha1(plainText);
diff --git a/SunSpider/tests/sunspider-0.9/date-format-tofte.js b/SunSpider/tests/sunspider-0.9/date-format-tofte.js
new file mode 100644
index 0000000..66e2cef
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/date-format-tofte.js
@@ -0,0 +1,299 @@
+function arrayExists(array, x) {
+ for (var i = 0; i < array.length; i++) {
+ if (array[i] == x) return true;
+ }
+ return false;
+}
+
+Date.prototype.formatDate = function (input,time) {
+ // formatDate :
+ // a PHP date like function, for formatting date strings
+ // See: http://www.php.net/date
+ //
+ // input : format string
+ // time : epoch time (seconds, and optional)
+ //
+ // if time is not passed, formatting is based on
+ // the current "this" date object's set time.
+ //
+ // supported:
+ // a, A, B, d, D, F, g, G, h, H, i, j, l (lowercase L), L,
+ // m, M, n, O, r, s, S, t, U, w, W, y, Y, z
+ //
+ // unsupported:
+ // I (capital i), T, Z
+
+ var switches = ["a", "A", "B", "d", "D", "F", "g", "G", "h", "H",
+ "i", "j", "l", "L", "m", "M", "n", "O", "r", "s",
+ "S", "t", "U", "w", "W", "y", "Y", "z"];
+ var daysLong = ["Sunday", "Monday", "Tuesday", "Wednesday",
+ "Thursday", "Friday", "Saturday"];
+ var daysShort = ["Sun", "Mon", "Tue", "Wed",
+ "Thu", "Fri", "Sat"];
+ var monthsShort = ["Jan", "Feb", "Mar", "Apr",
+ "May", "Jun", "Jul", "Aug", "Sep",
+ "Oct", "Nov", "Dec"];
+ var monthsLong = ["January", "February", "March", "April",
+ "May", "June", "July", "August", "September",
+ "October", "November", "December"];
+ var daysSuffix = ["st", "nd", "rd", "th", "th", "th", "th", // 1st - 7th
+ "th", "th", "th", "th", "th", "th", "th", // 8th - 14th
+ "th", "th", "th", "th", "th", "th", "st", // 15th - 21st
+ "nd", "rd", "th", "th", "th", "th", "th", // 22nd - 28th
+ "th", "th", "st"]; // 29th - 31st
+
+ function a() {
+ // Lowercase Ante meridiem and Post meridiem
+ return self.getHours() > 11? "pm" : "am";
+ }
+ function A() {
+ // Uppercase Ante meridiem and Post meridiem
+ return self.getHours() > 11? "PM" : "AM";
+ }
+
+ function B(){
+ // Swatch internet time. code simply grabbed from ppk,
+ // since I was feeling lazy:
+ // http://www.xs4all.nl/~ppk/js/beat.html
+ var off = (self.getTimezoneOffset() + 60)*60;
+ var theSeconds = (self.getHours() * 3600) +
+ (self.getMinutes() * 60) +
+ self.getSeconds() + off;
+ var beat = Math.floor(theSeconds/86.4);
+ if (beat > 1000) beat -= 1000;
+ if (beat < 0) beat += 1000;
+ if ((""+beat).length == 1) beat = "00"+beat;
+ if ((""+beat).length == 2) beat = "0"+beat;
+ return beat;
+ }
+
+ function d() {
+ // Day of the month, 2 digits with leading zeros
+ return new String(self.getDate()).length == 1?
+ "0"+self.getDate() : self.getDate();
+ }
+ function D() {
+ // A textual representation of a day, three letters
+ return daysShort[self.getDay()];
+ }
+ function F() {
+ // A full textual representation of a month
+ return monthsLong[self.getMonth()];
+ }
+ function g() {
+ // 12-hour format of an hour without leading zeros
+ return self.getHours() > 12? self.getHours()-12 : self.getHours();
+ }
+ function G() {
+ // 24-hour format of an hour without leading zeros
+ return self.getHours();
+ }
+ function h() {
+ // 12-hour format of an hour with leading zeros
+ if (self.getHours() > 12) {
+ var s = new String(self.getHours()-12);
+ return s.length == 1?
+ "0"+ (self.getHours()-12) : self.getHours()-12;
+ } else {
+ var s = new String(self.getHours());
+ return s.length == 1?
+ "0"+self.getHours() : self.getHours();
+ }
+ }
+ function H() {
+ // 24-hour format of an hour with leading zeros
+ return new String(self.getHours()).length == 1?
+ "0"+self.getHours() : self.getHours();
+ }
+ function i() {
+ // Minutes with leading zeros
+ return new String(self.getMinutes()).length == 1?
+ "0"+self.getMinutes() : self.getMinutes();
+ }
+ function j() {
+ // Day of the month without leading zeros
+ return self.getDate();
+ }
+ function l() {
+ // A full textual representation of the day of the week
+ return daysLong[self.getDay()];
+ }
+ function L() {
+ // leap year or not. 1 if leap year, 0 if not.
+ // the logic should match iso's 8601 standard.
+ var y_ = Y();
+ if (
+ (y_ % 4 == 0 && y_ % 100 != 0) ||
+ (y_ % 4 == 0 && y_ % 100 == 0 && y_ % 400 == 0)
+ ) {
+ return 1;
+ } else {
+ return 0;
+ }
+ }
+ function m() {
+ // Numeric representation of a month, with leading zeros
+ return self.getMonth() < 9?
+ "0"+(self.getMonth()+1) :
+ self.getMonth()+1;
+ }
+ function M() {
+ // A short textual representation of a month, three letters
+ return monthsShort[self.getMonth()];
+ }
+ function n() {
+ // Numeric representation of a month, without leading zeros
+ return self.getMonth()+1;
+ }
+ function O() {
+ // Difference to Greenwich time (GMT) in hours
+ var os = Math.abs(self.getTimezoneOffset());
+ var h = ""+Math.floor(os/60);
+ var m = ""+(os%60);
+ h.length == 1? h = "0"+h:1;
+ m.length == 1? m = "0"+m:1;
+ return self.getTimezoneOffset() < 0 ? "+"+h+m : "-"+h+m;
+ }
+ function r() {
+ // RFC 822 formatted date
+ var r; // result
+ // Thu , 21 Dec 2000
+ r = D() + ", " + j() + " " + M() + " " + Y() +
+ // 16 : 01 : 07 +0200
+ " " + H() + ":" + i() + ":" + s() + " " + O();
+ return r;
+ }
+ function S() {
+ // English ordinal suffix for the day of the month, 2 characters
+ return daysSuffix[self.getDate()-1];
+ }
+ function s() {
+ // Seconds, with leading zeros
+ return new String(self.getSeconds()).length == 1?
+ "0"+self.getSeconds() : self.getSeconds();
+ }
+ function t() {
+
+ // thanks to Matt Bannon for some much needed code-fixes here!
+ var daysinmonths = [null,31,28,31,30,31,30,31,31,30,31,30,31];
+ if (L()==1 && n()==2) return 29; // leap day
+ return daysinmonths[n()];
+ }
+ function U() {
+ // Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)
+ return Math.round(self.getTime()/1000);
+ }
+ function W() {
+ // Weeknumber, as per ISO specification:
+ // http://www.cl.cam.ac.uk/~mgk25/iso-time.html
+
+ // if the day is three days before newyears eve,
+ // there's a chance it's "week 1" of next year.
+ // here we check for that.
+ var beforeNY = 364+L() - z();
+ var afterNY = z();
+ var weekday = w()!=0?w()-1:6; // makes sunday (0), into 6.
+ if (beforeNY <= 2 && weekday <= 2-beforeNY) {
+ return 1;
+ }
+ // similarly, if the day is within threedays of newyears
+ // there's a chance it belongs in the old year.
+ var ny = new Date("January 1 " + Y() + " 00:00:00");
+ var nyDay = ny.getDay()!=0?ny.getDay()-1:6;
+ if (
+ (afterNY <= 2) &&
+ (nyDay >=4) &&
+ (afterNY >= (6-nyDay))
+ ) {
+ // Since I'm not sure we can just always return 53,
+ // i call the function here again, using the last day
+ // of the previous year, as the date, and then just
+ // return that week.
+ var prevNY = new Date("December 31 " + (Y()-1) + " 00:00:00");
+ return prevNY.formatDate("W");
+ }
+
+ // week 1, is the week that has the first thursday in it.
+ // note that this value is not zero index.
+ if (nyDay <= 3) {
+ // first day of the year fell on a thursday, or earlier.
+ return 1 + Math.floor( ( z() + nyDay ) / 7 );
+ } else {
+ // first day of the year fell on a friday, or later.
+ return 1 + Math.floor( ( z() - ( 7 - nyDay ) ) / 7 );
+ }
+ }
+ function w() {
+ // Numeric representation of the day of the week
+ return self.getDay();
+ }
+
+ function Y() {
+ // A full numeric representation of a year, 4 digits
+
+ // we first check, if getFullYear is supported. if it
+ // is, we just use that. ppks code is nice, but wont
+ // work with dates outside 1900-2038, or something like that
+ if (self.getFullYear) {
+ var newDate = new Date("January 1 2001 00:00:00 +0000");
+ var x = newDate .getFullYear();
+ if (x == 2001) {
+ // i trust the method now
+ return self.getFullYear();
+ }
+ }
+ // else, do this:
+ // codes thanks to ppk:
+ // http://www.xs4all.nl/~ppk/js/introdate.html
+ var x = self.getYear();
+ var y = x % 100;
+ y += (y < 38) ? 2000 : 1900;
+ return y;
+ }
+ function y() {
+ // A two-digit representation of a year
+ var y = Y()+"";
+ return y.substring(y.length-2,y.length);
+ }
+ function z() {
+ // The day of the year, zero indexed! 0 through 366
+ var t = new Date("January 1 " + Y() + " 00:00:00");
+ var diff = self.getTime() - t.getTime();
+ return Math.floor(diff/1000/60/60/24);
+ }
+
+ var self = this;
+ if (time) {
+ // save time
+ var prevTime = self.getTime();
+ self.setTime(time);
+ }
+
+ var ia = input.split("");
+ var ij = 0;
+ while (ia[ij]) {
+ if (ia[ij] == "\\") {
+ // this is our way of allowing users to escape stuff
+ ia.splice(ij,1);
+ } else {
+ if (arrayExists(switches,ia[ij])) {
+ ia[ij] = eval(ia[ij] + "()");
+ }
+ }
+ ij++;
+ }
+ // reset time, back to what it was
+ if (prevTime) {
+ self.setTime(prevTime);
+ }
+ return ia.join("");
+}
+
+var date = new Date("1/1/2007 1:11:11");
+
+for (i = 0; i < 500; ++i) {
+ var shortFormat = date.formatDate("Y-m-d");
+ var longFormat = date.formatDate("l, F d, Y g:i:s A");
+ date.setTime(date.getTime() + 84266956);
+}
+
diff --git a/SunSpider/tests/sunspider-0.9/date-format-xparb.js b/SunSpider/tests/sunspider-0.9/date-format-xparb.js
new file mode 100644
index 0000000..1f09556
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/date-format-xparb.js
@@ -0,0 +1,417 @@
+/*
+ * Copyright (C) 2004 Baron Schwartz <baron at sequent dot org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation, version 2.1.
+ *
+ * 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 Lesser General Public License for more
+ * details.
+ */
+
+Date.parseFunctions = {count:0};
+Date.parseRegexes = [];
+Date.formatFunctions = {count:0};
+
+Date.prototype.dateFormat = function(format) {
+ if (Date.formatFunctions[format] == null) {
+ Date.createNewFormat(format);
+ }
+ var func = Date.formatFunctions[format];
+ return this[func]();
+}
+
+Date.createNewFormat = function(format) {
+ var funcName = "format" + Date.formatFunctions.count++;
+ Date.formatFunctions[format] = funcName;
+ var code = "Date.prototype." + funcName + " = function(){return ";
+ var special = false;
+ var ch = '';
+ for (var i = 0; i < format.length; ++i) {
+ ch = format.charAt(i);
+ if (!special && ch == "\\") {
+ special = true;
+ }
+ else if (special) {
+ special = false;
+ code += "'" + String.escape(ch) + "' + ";
+ }
+ else {
+ code += Date.getFormatCode(ch);
+ }
+ }
+ eval(code.substring(0, code.length - 3) + ";}");
+}
+
+Date.getFormatCode = function(character) {
+ switch (character) {
+ case "d":
+ return "String.leftPad(this.getDate(), 2, '0') + ";
+ case "D":
+ return "Date.dayNames[this.getDay()].substring(0, 3) + ";
+ case "j":
+ return "this.getDate() + ";
+ case "l":
+ return "Date.dayNames[this.getDay()] + ";
+ case "S":
+ return "this.getSuffix() + ";
+ case "w":
+ return "this.getDay() + ";
+ case "z":
+ return "this.getDayOfYear() + ";
+ case "W":
+ return "this.getWeekOfYear() + ";
+ case "F":
+ return "Date.monthNames[this.getMonth()] + ";
+ case "m":
+ return "String.leftPad(this.getMonth() + 1, 2, '0') + ";
+ case "M":
+ return "Date.monthNames[this.getMonth()].substring(0, 3) + ";
+ case "n":
+ return "(this.getMonth() + 1) + ";
+ case "t":
+ return "this.getDaysInMonth() + ";
+ case "L":
+ return "(this.isLeapYear() ? 1 : 0) + ";
+ case "Y":
+ return "this.getFullYear() + ";
+ case "y":
+ return "('' + this.getFullYear()).substring(2, 4) + ";
+ case "a":
+ return "(this.getHours() < 12 ? 'am' : 'pm') + ";
+ case "A":
+ return "(this.getHours() < 12 ? 'AM' : 'PM') + ";
+ case "g":
+ return "((this.getHours() %12) ? this.getHours() % 12 : 12) + ";
+ case "G":
+ return "this.getHours() + ";
+ case "h":
+ return "String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";
+ case "H":
+ return "String.leftPad(this.getHours(), 2, '0') + ";
+ case "i":
+ return "String.leftPad(this.getMinutes(), 2, '0') + ";
+ case "s":
+ return "String.leftPad(this.getSeconds(), 2, '0') + ";
+ case "O":
+ return "this.getGMTOffset() + ";
+ case "T":
+ return "this.getTimezone() + ";
+ case "Z":
+ return "(this.getTimezoneOffset() * -60) + ";
+ default:
+ return "'" + String.escape(character) + "' + ";
+ }
+}
+
+Date.parseDate = function(input, format) {
+ if (Date.parseFunctions[format] == null) {
+ Date.createParser(format);
+ }
+ var func = Date.parseFunctions[format];
+ return Date[func](input);
+}
+
+Date.createParser = function(format) {
+ var funcName = "parse" + Date.parseFunctions.count++;
+ var regexNum = Date.parseRegexes.length;
+ var currentGroup = 1;
+ Date.parseFunctions[format] = funcName;
+
+ var code = "Date." + funcName + " = function(input){\n"
+ + "var y = -1, m = -1, d = -1, h = -1, i = -1, s = -1;\n"
+ + "var d = new Date();\n"
+ + "y = d.getFullYear();\n"
+ + "m = d.getMonth();\n"
+ + "d = d.getDate();\n"
+ + "var results = input.match(Date.parseRegexes[" + regexNum + "]);\n"
+ + "if (results && results.length > 0) {"
+ var regex = "";
+
+ var special = false;
+ var ch = '';
+ for (var i = 0; i < format.length; ++i) {
+ ch = format.charAt(i);
+ if (!special && ch == "\\") {
+ special = true;
+ }
+ else if (special) {
+ special = false;
+ regex += String.escape(ch);
+ }
+ else {
+ obj = Date.formatCodeToRegex(ch, currentGroup);
+ currentGroup += obj.g;
+ regex += obj.s;
+ if (obj.g && obj.c) {
+ code += obj.c;
+ }
+ }
+ }
+
+ code += "if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n"
+ + "{return new Date(y, m, d, h, i, s);}\n"
+ + "else if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n"
+ + "{return new Date(y, m, d, h, i);}\n"
+ + "else if (y > 0 && m >= 0 && d > 0 && h >= 0)\n"
+ + "{return new Date(y, m, d, h);}\n"
+ + "else if (y > 0 && m >= 0 && d > 0)\n"
+ + "{return new Date(y, m, d);}\n"
+ + "else if (y > 0 && m >= 0)\n"
+ + "{return new Date(y, m);}\n"
+ + "else if (y > 0)\n"
+ + "{return new Date(y);}\n"
+ + "}return null;}";
+
+ Date.parseRegexes[regexNum] = new RegExp("^" + regex + "$");
+ eval(code);
+}
+
+Date.formatCodeToRegex = function(character, currentGroup) {
+ switch (character) {
+ case "D":
+ return {g:0,
+ c:null,
+ s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};
+ case "j":
+ case "d":
+ return {g:1,
+ c:"d = parseInt(results[" + currentGroup + "], 10);\n",
+ s:"(\\d{1,2})"};
+ case "l":
+ return {g:0,
+ c:null,
+ s:"(?:" + Date.dayNames.join("|") + ")"};
+ case "S":
+ return {g:0,
+ c:null,
+ s:"(?:st|nd|rd|th)"};
+ case "w":
+ return {g:0,
+ c:null,
+ s:"\\d"};
+ case "z":
+ return {g:0,
+ c:null,
+ s:"(?:\\d{1,3})"};
+ case "W":
+ return {g:0,
+ c:null,
+ s:"(?:\\d{2})"};
+ case "F":
+ return {g:1,
+ c:"m = parseInt(Date.monthNumbers[results[" + currentGroup + "].substring(0, 3)], 10);\n",
+ s:"(" + Date.monthNames.join("|") + ")"};
+ case "M":
+ return {g:1,
+ c:"m = parseInt(Date.monthNumbers[results[" + currentGroup + "]], 10);\n",
+ s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};
+ case "n":
+ case "m":
+ return {g:1,
+ c:"m = parseInt(results[" + currentGroup + "], 10) - 1;\n",
+ s:"(\\d{1,2})"};
+ case "t":
+ return {g:0,
+ c:null,
+ s:"\\d{1,2}"};
+ case "L":
+ return {g:0,
+ c:null,
+ s:"(?:1|0)"};
+ case "Y":
+ return {g:1,
+ c:"y = parseInt(results[" + currentGroup + "], 10);\n",
+ s:"(\\d{4})"};
+ case "y":
+ return {g:1,
+ c:"var ty = parseInt(results[" + currentGroup + "], 10);\n"
+ + "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",
+ s:"(\\d{1,2})"};
+ case "a":
+ return {g:1,
+ c:"if (results[" + currentGroup + "] == 'am') {\n"
+ + "if (h == 12) { h = 0; }\n"
+ + "} else { if (h < 12) { h += 12; }}",
+ s:"(am|pm)"};
+ case "A":
+ return {g:1,
+ c:"if (results[" + currentGroup + "] == 'AM') {\n"
+ + "if (h == 12) { h = 0; }\n"
+ + "} else { if (h < 12) { h += 12; }}",
+ s:"(AM|PM)"};
+ case "g":
+ case "G":
+ case "h":
+ case "H":
+ return {g:1,
+ c:"h = parseInt(results[" + currentGroup + "], 10);\n",
+ s:"(\\d{1,2})"};
+ case "i":
+ return {g:1,
+ c:"i = parseInt(results[" + currentGroup + "], 10);\n",
+ s:"(\\d{2})"};
+ case "s":
+ return {g:1,
+ c:"s = parseInt(results[" + currentGroup + "], 10);\n",
+ s:"(\\d{2})"};
+ case "O":
+ return {g:0,
+ c:null,
+ s:"[+-]\\d{4}"};
+ case "T":
+ return {g:0,
+ c:null,
+ s:"[A-Z]{3}"};
+ case "Z":
+ return {g:0,
+ c:null,
+ s:"[+-]\\d{1,5}"};
+ default:
+ return {g:0,
+ c:null,
+ s:String.escape(character)};
+ }
+}
+
+Date.prototype.getTimezone = function() {
+ return this.toString().replace(
+ /^.*? ([A-Z]{3}) [0-9]{4}.*$/, "$1").replace(
+ /^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/, "$1$2$3");
+}
+
+Date.prototype.getGMTOffset = function() {
+ return (this.getTimezoneOffset() > 0 ? "-" : "+")
+ + String.leftPad(Math.floor(this.getTimezoneOffset() / 60), 2, "0")
+ + String.leftPad(this.getTimezoneOffset() % 60, 2, "0");
+}
+
+Date.prototype.getDayOfYear = function() {
+ var num = 0;
+ Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28;
+ for (var i = 0; i < this.getMonth(); ++i) {
+ num += Date.daysInMonth[i];
+ }
+ return num + this.getDate() - 1;
+}
+
+Date.prototype.getWeekOfYear = function() {
+ // Skip to Thursday of this week
+ var now = this.getDayOfYear() + (4 - this.getDay());
+ // Find the first Thursday of the year
+ var jan1 = new Date(this.getFullYear(), 0, 1);
+ var then = (7 - jan1.getDay() + 4);
+ document.write(then);
+ return String.leftPad(((now - then) / 7) + 1, 2, "0");
+}
+
+Date.prototype.isLeapYear = function() {
+ var year = this.getFullYear();
+ return ((year & 3) == 0 && (year % 100 || (year % 400 == 0 && year)));
+}
+
+Date.prototype.getFirstDayOfMonth = function() {
+ var day = (this.getDay() - (this.getDate() - 1)) % 7;
+ return (day < 0) ? (day + 7) : day;
+}
+
+Date.prototype.getLastDayOfMonth = function() {
+ var day = (this.getDay() + (Date.daysInMonth[this.getMonth()] - this.getDate())) % 7;
+ return (day < 0) ? (day + 7) : day;
+}
+
+Date.prototype.getDaysInMonth = function() {
+ Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28;
+ return Date.daysInMonth[this.getMonth()];
+}
+
+Date.prototype.getSuffix = function() {
+ switch (this.getDate()) {
+ case 1:
+ case 21:
+ case 31:
+ return "st";
+ case 2:
+ case 22:
+ return "nd";
+ case 3:
+ case 23:
+ return "rd";
+ default:
+ return "th";
+ }
+}
+
+String.escape = function(string) {
+ return string.replace(/('|\\)/g, "\\$1");
+}
+
+String.leftPad = function (val, size, ch) {
+ var result = new String(val);
+ if (ch == null) {
+ ch = " ";
+ }
+ while (result.length < size) {
+ result = ch + result;
+ }
+ return result;
+}
+
+Date.daysInMonth = [31,28,31,30,31,30,31,31,30,31,30,31];
+Date.monthNames =
+ ["January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"];
+Date.dayNames =
+ ["Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"];
+Date.y2kYear = 50;
+Date.monthNumbers = {
+ Jan:0,
+ Feb:1,
+ Mar:2,
+ Apr:3,
+ May:4,
+ Jun:5,
+ Jul:6,
+ Aug:7,
+ Sep:8,
+ Oct:9,
+ Nov:10,
+ Dec:11};
+Date.patterns = {
+ ISO8601LongPattern:"Y-m-d H:i:s",
+ ISO8601ShortPattern:"Y-m-d",
+ ShortDatePattern: "n/j/Y",
+ LongDatePattern: "l, F d, Y",
+ FullDateTimePattern: "l, F d, Y g:i:s A",
+ MonthDayPattern: "F d",
+ ShortTimePattern: "g:i A",
+ LongTimePattern: "g:i:s A",
+ SortableDateTimePattern: "Y-m-d\\TH:i:s",
+ UniversalSortableDateTimePattern: "Y-m-d H:i:sO",
+ YearMonthPattern: "F, Y"};
+
+var date = new Date("1/1/2007 1:11:11");
+
+for (i = 0; i < 4000; ++i) {
+ var shortFormat = date.dateFormat("Y-m-d");
+ var longFormat = date.dateFormat("l, F d, Y g:i:s A");
+ date.setTime(date.getTime() + 84266956);
+}
diff --git a/SunSpider/tests/sunspider-0.9/math-cordic.js b/SunSpider/tests/sunspider-0.9/math-cordic.js
new file mode 100644
index 0000000..4d3833b
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/math-cordic.js
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) Rich Moore. 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 CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR 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.
+ */
+
+/////. Start CORDIC
+
+var AG_CONST = 0.6072529350;
+
+function FIXED(X)
+{
+ return X * 65536.0;
+}
+
+function FLOAT(X)
+{
+ return X / 65536.0;
+}
+
+function DEG2RAD(X)
+{
+ return 0.017453 * (X);
+}
+
+var Angles = [
+ FIXED(45.0), FIXED(26.565), FIXED(14.0362), FIXED(7.12502),
+ FIXED(3.57633), FIXED(1.78991), FIXED(0.895174), FIXED(0.447614),
+ FIXED(0.223811), FIXED(0.111906), FIXED(0.055953),
+ FIXED(0.027977)
+ ];
+
+
+function cordicsincos() {
+ var X;
+ var Y;
+ var TargetAngle;
+ var CurrAngle;
+ var Step;
+
+ X = FIXED(AG_CONST); /* AG_CONST * cos(0) */
+ Y = 0; /* AG_CONST * sin(0) */
+
+ TargetAngle = FIXED(28.027);
+ CurrAngle = 0;
+ for (Step = 0; Step < 12; Step++) {
+ var NewX;
+ if (TargetAngle > CurrAngle) {
+ NewX = X - (Y >> Step);
+ Y = (X >> Step) + Y;
+ X = NewX;
+ CurrAngle += Angles[Step];
+ } else {
+ NewX = X + (Y >> Step);
+ Y = -(X >> Step) + Y;
+ X = NewX;
+ CurrAngle -= Angles[Step];
+ }
+ }
+}
+
+///// End CORDIC
+
+function cordic( runs ) {
+ var start = new Date();
+
+ for ( var i = 0 ; i < runs ; i++ ) {
+ cordicsincos();
+ }
+
+ var end = new Date();
+
+ return end.getTime() - start.getTime();
+}
+
+cordic(25000);
diff --git a/SunSpider/tests/sunspider-0.9/math-partial-sums.js b/SunSpider/tests/sunspider-0.9/math-partial-sums.js
new file mode 100644
index 0000000..d082d79
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/math-partial-sums.js
@@ -0,0 +1,33 @@
+// The Computer Language Shootout
+// http://shootout.alioth.debian.org/
+// contributed by Isaac Gouy
+
+function partial(n){
+ var a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = 0.0;
+ var twothirds = 2.0/3.0;
+ var alt = -1.0;
+ var k2 = k3 = sk = ck = 0.0;
+
+ for (var k = 1; k <= n; k++){
+ k2 = k*k;
+ k3 = k2*k;
+ sk = Math.sin(k);
+ ck = Math.cos(k);
+ alt = -alt;
+
+ a1 += Math.pow(twothirds,k-1);
+ a2 += Math.pow(k,-0.5);
+ a3 += 1.0/(k*(k+1.0));
+ a4 += 1.0/(k3 * sk*sk);
+ a5 += 1.0/(k3 * ck*ck);
+ a6 += 1.0/k;
+ a7 += 1.0/k2;
+ a8 += alt/k;
+ a9 += alt/(2*k -1);
+ }
+}
+
+for (var i = 1024; i <= 16384; i *= 2) {
+ partial(i);
+}
+
diff --git a/SunSpider/tests/sunspider-0.9/math-spectral-norm.js b/SunSpider/tests/sunspider-0.9/math-spectral-norm.js
new file mode 100644
index 0000000..8139ef3
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/math-spectral-norm.js
@@ -0,0 +1,51 @@
+// The Great Computer Language Shootout
+// http://shootout.alioth.debian.org/
+//
+// contributed by Ian Osgood
+
+function A(i,j) {
+ return 1/((i+j)*(i+j+1)/2+i+1);
+}
+
+function Au(u,v) {
+ for (var i=0; i<u.length; ++i) {
+ var t = 0;
+ for (var j=0; j<u.length; ++j)
+ t += A(i,j) * u[j];
+ v[i] = t;
+ }
+}
+
+function Atu(u,v) {
+ for (var i=0; i<u.length; ++i) {
+ var t = 0;
+ for (var j=0; j<u.length; ++j)
+ t += A(j,i) * u[j];
+ v[i] = t;
+ }
+}
+
+function AtAu(u,v,w) {
+ Au(u,w);
+ Atu(w,v);
+}
+
+function spectralnorm(n) {
+ var i, u=[], v=[], w=[], vv=0, vBv=0;
+ for (i=0; i<n; ++i) {
+ u[i] = 1; v[i] = w[i] = 0;
+ }
+ for (i=0; i<10; ++i) {
+ AtAu(u,v,w);
+ AtAu(v,u,w);
+ }
+ for (i=0; i<n; ++i) {
+ vBv += u[i]*v[i];
+ vv += v[i]*v[i];
+ }
+ return Math.sqrt(vBv/vv);
+}
+
+for (var i = 6; i <= 48; i *= 2) {
+ spectralnorm(i);
+}
diff --git a/SunSpider/tests/sunspider-0.9/regexp-dna.js b/SunSpider/tests/sunspider-0.9/regexp-dna.js
new file mode 100644
index 0000000..af8ebe6
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/regexp-dna.js
@@ -0,0 +1,1712 @@
+// The Computer Language Shootout
+// http://shootout.alioth.debian.org/
+//
+// contributed by Jesse Millikan
+// Base on the Ruby version by jose fco. gonzalez
+
+var l;
+var dnaInput = ">ONE Homo sapiens alu\n\
+GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGA\n\
+TCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACT\n\
+AAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAG\n\
+GCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCG\n\
+CCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGT\n\
+GGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCA\n\
+GGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAA\n\
+TTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAG\n\
+AATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCA\n\
+GCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGT\n\
+AATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACC\n\
+AGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTG\n\
+GTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACC\n\
+CGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAG\n\
+AGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTT\n\
+TGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACA\n\
+TGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCT\n\
+GTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGG\n\
+TTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGT\n\
+CTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGG\n\
+CGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCG\n\
+TCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTA\n\
+CTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCG\n\
+AGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCG\n\
+GGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACC\n\
+TGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAA\n\
+TACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGA\n\
+GGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACT\n\
+GCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTC\n\
+ACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGT\n\
+TCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGC\n\
+CGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCG\n\
+CTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTG\n\
+GGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCC\n\
+CAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCT\n\
+GGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGC\n\
+GCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGA\n\
+GGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGA\n\
+GACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGA\n\
+GGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTG\n\
+AAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAAT\n\
+CCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCA\n\
+GTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAA\n\
+AAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGC\n\
+GGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCT\n\
+ACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGG\n\
+GAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATC\n\
+GCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGC\n\
+GGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGG\n\
+TCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAA\n\
+AAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAG\n\
+GAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACT\n\
+CCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCC\n\
+TGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAG\n\
+ACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGC\n\
+GTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGA\n\
+ACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGA\n\
+CAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCA\n\
+CTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCA\n\
+ACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCG\n\
+CCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGG\n\
+AGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTC\n\
+CGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCG\n\
+AGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACC\n\
+CCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAG\n\
+CTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAG\n\
+CCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGG\n\
+CCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATC\n\
+ACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAA\n\
+AAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGC\n\
+TGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCC\n\
+ACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGG\n\
+CTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGG\n\
+AGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATT\n\
+AGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAA\n\
+TCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGC\n\
+CTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAA\n\
+TCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAG\n\
+CCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGT\n\
+GGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCG\n\
+GGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAG\n\
+CGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTG\n\
+GGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATG\n\
+GTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGT\n\
+AATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTT\n\
+GCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCT\n\
+CAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCG\n\
+GGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTC\n\
+TCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACT\n\
+CGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAG\n\
+ATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGG\n\
+CGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTG\n\
+AGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATA\n\
+CAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGG\n\
+CAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGC\n\
+ACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCAC\n\
+GCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTC\n\
+GAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCG\n\
+GGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCT\n\
+TGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGG\n\
+CGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCA\n\
+GCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGG\n\
+CCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGC\n\
+GCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGG\n\
+CGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGA\n\
+CTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGG\n\
+CCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAA\n\
+ACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCC\n\
+CAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGT\n\
+GAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAA\n\
+AGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGG\n\
+ATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTAC\n\
+TAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGA\n\
+GGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGC\n\
+GCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGG\n\
+TGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTC\n\
+AGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAA\n\
+ATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGA\n\
+GAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCC\n\
+AGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTG\n\
+TAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGAC\n\
+CAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGT\n\
+GGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAAC\n\
+CCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACA\n\
+GAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACT\n\
+TTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAAC\n\
+ATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCC\n\
+TGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAG\n\
+GTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCG\n\
+TCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAG\n\
+GCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCC\n\
+GTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCT\n\
+ACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCC\n\
+GAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCC\n\
+GGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCAC\n\
+CTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAA\n\
+ATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTG\n\
+AGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCAC\n\
+TGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCT\n\
+CACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAG\n\
+TTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAG\n\
+CCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATC\n\
+GCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCT\n\
+GGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATC\n\
+CCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCC\n\
+TGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGG\n\
+CGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGG\n\
+AGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCG\n\
+AGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGG\n\
+AGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGT\n\
+GAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAA\n\
+TCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGC\n\
+AGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCA\n\
+AAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGG\n\
+CGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTC\n\
+TACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCG\n\
+GGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGAT\n\
+CGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCG\n\
+CGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAG\n\
+GTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACA\n\
+AAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCA\n\
+GGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCAC\n\
+TCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGC\n\
+CTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGA\n\
+GACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGG\n\
+CGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTG\n\
+AACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCG\n\
+ACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGC\n\
+ACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCC\n\
+AACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGC\n\
+GCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCG\n\
+GAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACT\n\
+CCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCC\n\
+GAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAAC\n\
+CCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCA\n\
+GCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGA\n\
+GCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAG\n\
+GCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGAT\n\
+CACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTA\n\
+AAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGG\n\
+CTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGC\n\
+CACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTG\n\
+GCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAG\n\
+GAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAAT\n\
+TAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGA\n\
+ATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAG\n\
+CCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTA\n\
+ATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCA\n\
+GCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGG\n\
+TGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCC\n\
+GGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGA\n\
+GCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTT\n\
+GGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACAT\n\
+GGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTG\n\
+TAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGT\n\
+TGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTC\n\
+TCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGC\n\
+GGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGT\n\
+CTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTAC\n\
+TCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGA\n\
+GATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGG\n\
+GCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCT\n\
+GAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAAT\n\
+ACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAG\n\
+GCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTG\n\
+CACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCA\n\
+CGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTT\n\
+CGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCC\n\
+GGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGC\n\
+TTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGG\n\
+GCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCC\n\
+AGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTG\n\
+GCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCG\n\
+CGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAG\n\
+GCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAG\n\
+ACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAG\n\
+GCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGA\n\
+AACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATC\n\
+CCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAG\n\
+TGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAA\n\
+AAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCG\n\
+GATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTA\n\
+CTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGG\n\
+AGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCG\n\
+CGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCG\n\
+GTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGT\n\
+CAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAA\n\
+AATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGG\n\
+AGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTC\n\
+CAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCT\n\
+GTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGA\n\
+CCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCG\n\
+TGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAA\n\
+CCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGAC\n\
+AGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCAC\n\
+TTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAA\n\
+CATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGC\n\
+CTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGA\n\
+GGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCC\n\
+GTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGA\n\
+GGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCC\n\
+CGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGC\n\
+TACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGC\n\
+CGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGC\n\
+CGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCA\n\
+CCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAA\n\
+AATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCT\n\
+GAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCA\n\
+CTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGC\n\
+TCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGA\n\
+GTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTA\n\
+GCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAAT\n\
+CGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCC\n\
+TGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAAT\n\
+CCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGC\n\
+CTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTG\n\
+GCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGG\n\
+GAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGC\n\
+GAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGG\n\
+GAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGG\n\
+TGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTA\n\
+ATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTG\n\
+CAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTC\n\
+AAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGG\n\
+GCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCT\n\
+CTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTC\n\
+GGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGA\n\
+TCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGC\n\
+GCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGA\n\
+GGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATAC\n\
+AAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGC\n\
+AGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCA\n\
+CTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACG\n\
+CCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCG\n\
+AGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGG\n\
+GCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTT\n\
+GAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGC\n\
+GACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAG\n\
+CACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGC\n\
+CAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCG\n\
+CGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGC\n\
+GGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGAC\n\
+TCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGC\n\
+CGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAA\n\
+CCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCC\n\
+AGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTG\n\
+AGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAA\n\
+GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGA\n\
+TCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACT\n\
+AAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAG\n\
+GCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCG\n\
+CCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGT\n\
+GGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCA\n\
+GGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAA\n\
+TTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAG\n\
+AATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCA\n\
+GCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGT\n\
+AATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACC\n\
+AGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTG\n\
+GTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACC\n\
+CGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAG\n\
+AGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTT\n\
+TGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACA\n\
+TGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCT\n\
+GTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGG\n\
+TTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGT\n\
+CTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGG\n\
+CGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCG\n\
+TCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTA\n\
+CTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCG\n\
+AGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCG\n\
+GGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACC\n\
+TGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAA\n\
+TACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGA\n\
+GGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACT\n\
+GCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTC\n\
+ACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGT\n\
+TCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGC\n\
+CGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCG\n\
+CTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTG\n\
+GGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCC\n\
+CAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCT\n\
+GGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGC\n\
+GCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGA\n\
+GGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGA\n\
+GACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGA\n\
+GGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTG\n\
+AAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAAT\n\
+CCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCA\n\
+GTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAA\n\
+AAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGC\n\
+GGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCT\n\
+ACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGG\n\
+GAGGCTGAGGCAGGAGAATC\n\
+>TWO IUB ambiguity codes\n\
+cttBtatcatatgctaKggNcataaaSatgtaaaDcDRtBggDtctttataattcBgtcg\n\
+tactDtDagcctatttSVHtHttKtgtHMaSattgWaHKHttttagacatWatgtRgaaa\n\
+NtactMcSMtYtcMgRtacttctWBacgaaatatagScDtttgaagacacatagtVgYgt\n\
+cattHWtMMWcStgttaggKtSgaYaaccWStcgBttgcgaMttBYatcWtgacaYcaga\n\
+gtaBDtRacttttcWatMttDBcatWtatcttactaBgaYtcttgttttttttYaaScYa\n\
+HgtgttNtSatcMtcVaaaStccRcctDaataataStcYtRDSaMtDttgttSagtRRca\n\
+tttHatSttMtWgtcgtatSSagactYaaattcaMtWatttaSgYttaRgKaRtccactt\n\
+tattRggaMcDaWaWagttttgacatgttctacaaaRaatataataaMttcgDacgaSSt\n\
+acaStYRctVaNMtMgtaggcKatcttttattaaaaagVWaHKYagtttttatttaacct\n\
+tacgtVtcVaattVMBcttaMtttaStgacttagattWWacVtgWYagWVRctDattBYt\n\
+gtttaagaagattattgacVatMaacattVctgtBSgaVtgWWggaKHaatKWcBScSWa\n\
+accRVacacaaactaccScattRatatKVtactatatttHttaagtttSKtRtacaaagt\n\
+RDttcaaaaWgcacatWaDgtDKacgaacaattacaRNWaatHtttStgttattaaMtgt\n\
+tgDcgtMgcatBtgcttcgcgaDWgagctgcgaggggVtaaScNatttacttaatgacag\n\
+cccccacatYScaMgtaggtYaNgttctgaMaacNaMRaacaaacaKctacatagYWctg\n\
+ttWaaataaaataRattagHacacaagcgKatacBttRttaagtatttccgatctHSaat\n\
+actcNttMaagtattMtgRtgaMgcataatHcMtaBSaRattagttgatHtMttaaKagg\n\
+YtaaBataSaVatactWtataVWgKgttaaaacagtgcgRatatacatVtHRtVYataSa\n\
+KtWaStVcNKHKttactatccctcatgWHatWaRcttactaggatctataDtDHBttata\n\
+aaaHgtacVtagaYttYaKcctattcttcttaataNDaaggaaaDYgcggctaaWSctBa\n\
+aNtgctggMBaKctaMVKagBaactaWaDaMaccYVtNtaHtVWtKgRtcaaNtYaNacg\n\
+gtttNattgVtttctgtBaWgtaattcaagtcaVWtactNggattctttaYtaaagccgc\n\
+tcttagHVggaYtgtNcDaVagctctctKgacgtatagYcctRYHDtgBattDaaDgccK\n\
+tcHaaStttMcctagtattgcRgWBaVatHaaaataYtgtttagMDMRtaataaggatMt\n\
+ttctWgtNtgtgaaaaMaatatRtttMtDgHHtgtcattttcWattRSHcVagaagtacg\n\
+ggtaKVattKYagactNaatgtttgKMMgYNtcccgSKttctaStatatNVataYHgtNa\n\
+BKRgNacaactgatttcctttaNcgatttctctataScaHtataRagtcRVttacDSDtt\n\
+aRtSatacHgtSKacYagttMHtWataggatgactNtatSaNctataVtttRNKtgRacc\n\
+tttYtatgttactttttcctttaaacatacaHactMacacggtWataMtBVacRaSaatc\n\
+cgtaBVttccagccBcttaRKtgtgcctttttRtgtcagcRttKtaaacKtaaatctcac\n\
+aattgcaNtSBaaccgggttattaaBcKatDagttactcttcattVtttHaaggctKKga\n\
+tacatcBggScagtVcacattttgaHaDSgHatRMaHWggtatatRgccDttcgtatcga\n\
+aacaHtaagttaRatgaVacttagattVKtaaYttaaatcaNatccRttRRaMScNaaaD\n\
+gttVHWgtcHaaHgacVaWtgttScactaagSgttatcttagggDtaccagWattWtRtg\n\
+ttHWHacgattBtgVcaYatcggttgagKcWtKKcaVtgaYgWctgYggVctgtHgaNcV\n\
+taBtWaaYatcDRaaRtSctgaHaYRttagatMatgcatttNattaDttaattgttctaa\n\
+ccctcccctagaWBtttHtBccttagaVaatMcBHagaVcWcagBVttcBtaYMccagat\n\
+gaaaaHctctaacgttagNWRtcggattNatcRaNHttcagtKttttgWatWttcSaNgg\n\
+gaWtactKKMaacatKatacNattgctWtatctaVgagctatgtRaHtYcWcttagccaa\n\
+tYttWttaWSSttaHcaaaaagVacVgtaVaRMgattaVcDactttcHHggHRtgNcctt\n\
+tYatcatKgctcctctatVcaaaaKaaaagtatatctgMtWtaaaacaStttMtcgactt\n\
+taSatcgDataaactaaacaagtaaVctaggaSccaatMVtaaSKNVattttgHccatca\n\
+cBVctgcaVatVttRtactgtVcaattHgtaaattaaattttYtatattaaRSgYtgBag\n\
+aHSBDgtagcacRHtYcBgtcacttacactaYcgctWtattgSHtSatcataaatataHt\n\
+cgtYaaMNgBaatttaRgaMaatatttBtttaaaHHKaatctgatWatYaacttMctctt\n\
+ttVctagctDaaagtaVaKaKRtaacBgtatccaaccactHHaagaagaaggaNaaatBW\n\
+attccgStaMSaMatBttgcatgRSacgttVVtaaDMtcSgVatWcaSatcttttVatag\n\
+ttactttacgatcaccNtaDVgSRcgVcgtgaacgaNtaNatatagtHtMgtHcMtagaa\n\
+attBgtataRaaaacaYKgtRccYtatgaagtaataKgtaaMttgaaRVatgcagaKStc\n\
+tHNaaatctBBtcttaYaBWHgtVtgacagcaRcataWctcaBcYacYgatDgtDHccta\n\
+aagacYRcaggattHaYgtKtaatgcVcaataMYacccatatcacgWDBtgaatcBaata\n\
+cKcttRaRtgatgaBDacggtaattaaYtataStgVHDtDctgactcaaatKtacaatgc\n\
+gYatBtRaDatHaactgtttatatDttttaaaKVccYcaaccNcBcgHaaVcattHctcg\n\
+attaaatBtatgcaaaaatYMctSactHatacgaWacattacMBgHttcgaatVaaaaca\n\
+BatatVtctgaaaaWtctRacgBMaatSgRgtgtcgactatcRtattaScctaStagKga\n\
+DcWgtYtDDWKRgRtHatRtggtcgaHgggcgtattaMgtcagccaBggWVcWctVaaat\n\
+tcgNaatcKWagcNaHtgaaaSaaagctcYctttRVtaaaatNtataaccKtaRgtttaM\n\
+tgtKaBtRtNaggaSattHatatWactcagtgtactaKctatttgRYYatKatgtccgtR\n\
+tttttatttaatatVgKtttgtatgtNtataRatWYNgtRtHggtaaKaYtKSDcatcKg\n\
+taaYatcSRctaVtSMWtVtRWHatttagataDtVggacagVcgKWagBgatBtaaagNc\n\
+aRtagcataBggactaacacRctKgttaatcctHgDgttKHHagttgttaatgHBtatHc\n\
+DaagtVaBaRccctVgtgDtacRHSctaagagcggWYaBtSaKtHBtaaactYacgNKBa\n\
+VYgtaacttagtVttcttaatgtBtatMtMtttaattaatBWccatRtttcatagVgMMt\n\
+agctStKctaMactacDNYgKYHgaWcgaHgagattacVgtttgtRaSttaWaVgataat\n\
+gtgtYtaStattattMtNgWtgttKaccaatagNYttattcgtatHcWtctaaaNVYKKt\n\
+tWtggcDtcgaagtNcagatacgcattaagaccWctgcagcttggNSgaNcHggatgtVt\n\
+catNtRaaBNcHVagagaaBtaaSggDaatWaatRccaVgggStctDaacataKttKatt\n\
+tggacYtattcSatcttagcaatgaVBMcttDattctYaaRgatgcattttNgVHtKcYR\n\
+aatRKctgtaaacRatVSagctgtWacBtKVatctgttttKcgtctaaDcaagtatcSat\n\
+aWVgcKKataWaYttcccSaatgaaaacccWgcRctWatNcWtBRttYaattataaNgac\n\
+acaatagtttVNtataNaYtaatRaVWKtBatKagtaatataDaNaaaaataMtaagaaS\n\
+tccBcaatNgaataWtHaNactgtcDtRcYaaVaaaaaDgtttRatctatgHtgttKtga\n\
+aNSgatactttcgagWaaatctKaaDaRttgtggKKagcDgataaattgSaacWaVtaNM\n\
+acKtcaDaaatttctRaaVcagNacaScRBatatctRatcctaNatWgRtcDcSaWSgtt\n\
+RtKaRtMtKaatgttBHcYaaBtgatSgaSWaScMgatNtctcctatttctYtatMatMt\n\
+RRtSaattaMtagaaaaStcgVgRttSVaScagtgDtttatcatcatacRcatatDctta\n\
+tcatVRtttataaHtattcYtcaaaatactttgVctagtaaYttagatagtSYacKaaac\n\
+gaaKtaaatagataatSatatgaaatSgKtaatVtttatcctgKHaatHattagaaccgt\n\
+YaaHactRcggSBNgtgctaaBagBttgtRttaaattYtVRaaaattgtaatVatttctc\n\
+ttcatgBcVgtgKgaHaaatattYatagWacNctgaaMcgaattStagWaSgtaaKagtt\n\
+ttaagaDgatKcctgtaHtcatggKttVDatcaaggtYcgccagNgtgcVttttagagat\n\
+gctaccacggggtNttttaSHaNtatNcctcatSaaVgtactgBHtagcaYggYVKNgta\n\
+KBcRttgaWatgaatVtagtcgattYgatgtaatttacDacSctgctaaaStttaWMagD\n\
+aaatcaVYctccgggcgaVtaaWtStaKMgDtttcaaMtVgBaatccagNaaatcYRMBg\n\
+gttWtaaScKttMWtYataRaDBMaDataatHBcacDaaKDactaMgagttDattaHatH\n\
+taYatDtattDcRNStgaatattSDttggtattaaNSYacttcDMgYgBatWtaMagact\n\
+VWttctttgYMaYaacRgHWaattgRtaagcattctMKVStatactacHVtatgatcBtV\n\
+NataaBttYtSttacKgggWgYDtgaVtYgatDaacattYgatggtRDaVDttNactaSa\n\
+MtgNttaacaaSaBStcDctaccacagacgcaHatMataWKYtaYattMcaMtgSttDag\n\
+cHacgatcaHttYaKHggagttccgatYcaatgatRaVRcaagatcagtatggScctata\n\
+ttaNtagcgacgtgKaaWaactSgagtMYtcttccaKtStaacggMtaagNttattatcg\n\
+tctaRcactctctDtaacWYtgaYaSaagaWtNtatttRacatgNaatgttattgWDDcN\n\
+aHcctgaaHacSgaataaRaataMHttatMtgaSDSKatatHHaNtacagtccaYatWtc\n\
+actaactatKDacSaStcggataHgYatagKtaatKagStaNgtatactatggRHacttg\n\
+tattatgtDVagDVaRctacMYattDgtttYgtctatggtKaRSttRccRtaaccttaga\n\
+gRatagSaaMaacgcaNtatgaaatcaRaagataatagatactcHaaYKBctccaagaRa\n\
+BaStNagataggcgaatgaMtagaatgtcaKttaaatgtaWcaBttaatRcggtgNcaca\n\
+aKtttScRtWtgcatagtttWYaagBttDKgcctttatMggNttattBtctagVtacata\n\
+aaYttacacaaRttcYtWttgHcaYYtaMgBaBatctNgcDtNttacgacDcgataaSat\n\
+YaSttWtcctatKaatgcagHaVaacgctgcatDtgttaSataaaaYSNttatagtaNYt\n\
+aDaaaNtggggacttaBggcHgcgtNtaaMcctggtVtaKcgNacNtatVaSWctWtgaW\n\
+cggNaBagctctgaYataMgaagatBSttctatacttgtgtKtaattttRagtDtacata\n\
+tatatgatNHVgBMtKtaKaNttDHaagatactHaccHtcatttaaagttVaMcNgHata\n\
+tKtaNtgYMccttatcaaNagctggacStttcNtggcaVtattactHaSttatgNMVatt\n\
+MMDtMactattattgWMSgtHBttStStgatatRaDaagattttctatMtaaaaaggtac\n\
+taaVttaSacNaatactgMttgacHaHRttgMacaaaatagttaatatWKRgacDgaRta\n\
+tatttattatcYttaWtgtBRtWatgHaaattHataagtVaDtWaVaWtgStcgtMSgaS\n\
+RgMKtaaataVacataatgtaSaatttagtcgaaHtaKaatgcacatcggRaggSKctDc\n\
+agtcSttcccStYtccRtctctYtcaaKcgagtaMttttcRaYDttgttatctaatcata\n\
+NctctgctatcaMatactataggDaHaaSttMtaDtcNatataattctMcStaaBYtaNa\n\
+gatgtaatHagagSttgWHVcttatKaYgDctcttggtgttMcRaVgSgggtagacaata\n\
+aDtaattSaDaNaHaBctattgNtaccaaRgaVtKNtaaYggHtaKKgHcatctWtctDt\n\
+ttctttggSDtNtaStagttataaacaattgcaBaBWggHgcaaaBtYgctaatgaaatW\n\
+cDcttHtcMtWWattBHatcatcaaatctKMagtDNatttWaBtHaaaNgMttaaStagt\n\
+tctctaatDtcRVaYttgttMtRtgtcaSaaYVgSWDRtaatagctcagDgcWWaaaBaa\n\
+RaBctgVgggNgDWStNaNBKcBctaaKtttDcttBaaggBttgaccatgaaaNgttttt\n\
+tttatctatgttataccaaDRaaSagtaVtDtcaWatBtacattaWacttaSgtattggD\n\
+gKaaatScaattacgWcagKHaaccaYcRcaRttaDttRtttHgaHVggcttBaRgtccc\n\
+tDatKaVtKtcRgYtaKttacgtatBtStaagcaattaagaRgBagSaattccSWYttta\n\
+ttVaataNctgHgttaaNBgcVYgtRtcccagWNaaaacaDNaBcaaaaRVtcWMgBagM\n\
+tttattacgDacttBtactatcattggaaatVccggttRttcatagttVYcatYaSHaHc\n\
+ttaaagcNWaHataaaRWtctVtRYtagHtaaaYMataHYtNBctNtKaatattStgaMc\n\
+BtRgctaKtgcScSttDgYatcVtggaaKtaagatWccHccgKYctaNNctacaWctttt\n\
+gcRtgtVcgaKttcMRHgctaHtVaataaDtatgKDcttatBtDttggNtacttttMtga\n\
+acRattaaNagaactcaaaBBVtcDtcgaStaDctgaaaSgttMaDtcgttcaccaaaag\n\
+gWtcKcgSMtcDtatgtttStaaBtatagDcatYatWtaaaBacaKgcaDatgRggaaYc\n\
+taRtccagattDaWtttggacBaVcHtHtaacDacYgtaatataMagaatgHMatcttat\n\
+acgtatttttatattacHactgttataMgStYaattYaccaattgagtcaaattaYtgta\n\
+tcatgMcaDcgggtcttDtKgcatgWRtataatatRacacNRBttcHtBgcRttgtgcgt\n\
+catacMtttBctatctBaatcattMttMYgattaaVYatgDaatVagtattDacaacDMa\n\
+tcMtHcccataagatgBggaccattVWtRtSacatgctcaaggggYtttDtaaNgNtaaB\n\
+atggaatgtctRtaBgBtcNYatatNRtagaacMgagSaSDDSaDcctRagtVWSHtVSR\n\
+ggaacaBVaccgtttaStagaacaMtactccagtttVctaaRaaHttNcttagcaattta\n\
+ttaatRtaaaatctaacDaBttggSagagctacHtaaRWgattcaaBtctRtSHaNtgta\n\
+cattVcaHaNaagtataccacaWtaRtaaVKgMYaWgttaKggKMtKcgWatcaDatYtK\n\
+SttgtacgaccNctSaattcDcatcttcaaaDKttacHtggttHggRRaRcaWacaMtBW\n\
+VHSHgaaMcKattgtaRWttScNattBBatYtaNRgcggaagacHSaattRtttcYgacc\n\
+BRccMacccKgatgaacttcgDgHcaaaaaRtatatDtatYVtttttHgSHaSaatagct\n\
+NYtaHYaVYttattNtttgaaaYtaKttWtctaNtgagaaaNctNDctaaHgttagDcRt\n\
+tatagccBaacgcaRBtRctRtggtaMYYttWtgataatcgaataattattataVaaaaa\n\
+ttacNRVYcaaMacNatRttcKatMctgaagactaattataaYgcKcaSYaatMNctcaa\n\
+cgtgatttttBacNtgatDccaattattKWWcattttatatatgatBcDtaaaagttgaa\n\
+VtaHtaHHtBtataRBgtgDtaataMttRtDgDcttattNtggtctatctaaBcatctaR\n\
+atgNacWtaatgaagtcMNaacNgHttatactaWgcNtaStaRgttaaHacccgaYStac\n\
+aaaatWggaYaWgaattattcMaactcBKaaaRVNcaNRDcYcgaBctKaacaaaaaSgc\n\
+tccYBBHYaVagaatagaaaacagYtctVccaMtcgtttVatcaatttDRtgWctagtac\n\
+RttMctgtDctttcKtWttttataaatgVttgBKtgtKWDaWagMtaaagaaattDVtag\n\
+gttacatcatttatgtcgMHaVcttaBtVRtcgtaYgBRHatttHgaBcKaYWaatcNSc\n\
+tagtaaaaatttacaatcactSWacgtaatgKttWattagttttNaggtctcaagtcact\n\
+attcttctaagKggaataMgtttcataagataaaaatagattatDgcBVHWgaBKttDgc\n\
+atRHaagcaYcRaattattatgtMatatattgHDtcaDtcaaaHctStattaatHaccga\n\
+cNattgatatattttgtgtDtRatagSacaMtcRtcattcccgacacSattgttKaWatt\n\
+NHcaacttccgtttSRtgtctgDcgctcaaMagVtBctBMcMcWtgtaacgactctcttR\n\
+ggRKSttgYtYatDccagttDgaKccacgVatWcataVaaagaataMgtgataaKYaaat\n\
+cHDaacgataYctRtcYatcgcaMgtNttaBttttgatttaRtStgcaacaaaataccVg\n\
+aaDgtVgDcStctatatttattaaaaRKDatagaaagaKaaYYcaYSgKStctccSttac\n\
+agtcNactttDVttagaaagMHttRaNcSaRaMgBttattggtttaRMggatggcKDgWR\n\
+tNaataataWKKacttcKWaaagNaBttaBatMHtccattaacttccccYtcBcYRtaga\n\
+ttaagctaaYBDttaNtgaaaccHcaRMtKtaaHMcNBttaNaNcVcgVttWNtDaBatg\n\
+ataaVtcWKcttRggWatcattgaRagHgaattNtatttctctattaattaatgaDaaMa\n\
+tacgttgggcHaYVaaNaDDttHtcaaHtcVVDgBVagcMacgtgttaaBRNtatRtcag\n\
+taagaggtttaagacaVaaggttaWatctccgtVtaDtcDatttccVatgtacNtttccg\n\
+tHttatKgScBatgtVgHtYcWagcaKtaMYaaHgtaattaSaHcgcagtWNaatNccNN\n\
+YcacgVaagaRacttctcattcccRtgtgtaattagcSttaaStWaMtctNNcSMacatt\n\
+ataaactaDgtatWgtagtttaagaaaattgtagtNagtcaataaatttgatMMYactaa\n\
+tatcggBWDtVcYttcDHtVttatacYaRgaMaacaStaatcRttttVtagaDtcacWat\n\
+ttWtgaaaagaaagNRacDtttStVatBaDNtaactatatcBSMcccaSttccggaMatg\n\
+attaaWatKMaBaBatttgataNctgttKtVaagtcagScgaaaDggaWgtgttttKtWt\n\
+atttHaatgtagttcactaaKMagttSYBtKtaYgaactcagagRtatagtVtatcaaaW\n\
+YagcgNtaDagtacNSaaYDgatBgtcgataacYDtaaactacagWDcYKaagtttatta\n\
+gcatcgagttKcatDaattgattatDtcagRtWSKtcgNtMaaaaacaMttKcaWcaaSV\n\
+MaaaccagMVtaMaDtMaHaBgaacataBBVtaatVYaNSWcSgNtDNaaKacacBttta\n\
+tKtgtttcaaHaMctcagtaacgtcgYtactDcgcctaNgagagcYgatattttaaattt\n\
+ccattttacatttDaaRctattttWctttacgtDatYtttcagacgcaaVttagtaaKaa\n\
+aRtgVtccataBggacttatttgtttaWNtgttVWtaWNVDaattgtatttBaagcBtaa\n\
+BttaaVatcHcaVgacattccNggtcgacKttaaaRtagRtctWagaYggtgMtataatM\n\
+tgaaRttattttgWcttNtDRRgMDKacagaaaaggaaaRStcccagtYccVattaNaaK\n\
+StNWtgacaVtagaagcttSaaDtcacaacgDYacWDYtgtttKatcVtgcMaDaSKStV\n\
+cgtagaaWaKaagtttcHaHgMgMtctataagBtKaaaKKcactggagRRttaagaBaaN\n\
+atVVcgRcKSttDaactagtSttSattgttgaaRYatggttVttaataaHttccaagDtg\n\
+atNWtaagHtgcYtaactRgcaatgMgtgtRaatRaNaacHKtagactactggaatttcg\n\
+ccataacgMctRgatgttaccctaHgtgWaYcactcacYaattcttaBtgacttaaacct\n\
+gYgaWatgBttcttVttcgttWttMcNYgtaaaatctYgMgaaattacNgaHgaacDVVM\n\
+tttggtHtctaaRgtacagacgHtVtaBMNBgattagcttaRcttacaHcRctgttcaaD\n\
+BggttKaacatgKtttYataVaNattccgMcgcgtagtRaVVaattaKaatggttRgaMc\n\
+agtatcWBttNtHagctaatctagaaNaaacaYBctatcgcVctBtgcaaagDgttVtga\n\
+HtactSNYtaaNccatgtgDacgaVtDcgKaRtacDcttgctaagggcagMDagggtBWR\n\
+tttSgccttttttaacgtcHctaVtVDtagatcaNMaVtcVacatHctDWNaataRgcgt\n\
+aVHaggtaaaaSgtttMtattDgBtctgatSgtRagagYtctSaKWaataMgattRKtaa\n\
+catttYcgtaacacattRWtBtcggtaaatMtaaacBatttctKagtcDtttgcBtKYYB\n\
+aKttctVttgttaDtgattttcttccacttgSaaacggaaaNDaattcYNNaWcgaaYat\n\
+tttMgcBtcatRtgtaaagatgaWtgaccaYBHgaatagataVVtHtttVgYBtMctaMt\n\
+cctgaDcYttgtccaaaRNtacagcMctKaaaggatttacatgtttaaWSaYaKttBtag\n\
+DacactagctMtttNaKtctttcNcSattNacttggaacaatDagtattRtgSHaataat\n\
+gccVgacccgatactatccctgtRctttgagaSgatcatatcgDcagWaaHSgctYYWta\n\
+tHttggttctttatVattatcgactaagtgtagcatVgtgHMtttgtttcgttaKattcM\n\
+atttgtttWcaaStNatgtHcaaaDtaagBaKBtRgaBgDtSagtatMtaacYaatYtVc\n\
+KatgtgcaacVaaaatactKcRgtaYtgtNgBBNcKtcttaccttKgaRaYcaNKtactt\n\
+tgagSBtgtRagaNgcaaaNcacagtVtttHWatgttaNatBgtttaatNgVtctgaata\n\
+tcaRtattcttttttttRaaKcRStctcggDgKagattaMaaaKtcaHacttaataataK\n\
+taRgDtKVBttttcgtKaggHHcatgttagHggttNctcgtatKKagVagRaaaggaaBt\n\
+NatttVKcRttaHctaHtcaaatgtaggHccaBataNaNaggttgcWaatctgatYcaaa\n\
+HaatWtaVgaaBttagtaagaKKtaaaKtRHatMaDBtBctagcatWtatttgWttVaaa\n\
+ScMNattRactttgtYtttaaaagtaagtMtaMaSttMBtatgaBtttaKtgaatgagYg\n\
+tNNacMtcNRacMMHcttWtgtRtctttaacaacattattcYaMagBaacYttMatcttK\n\
+cRMtgMNccattaRttNatHaHNaSaaHMacacaVaatacaKaSttHatattMtVatWga\n\
+ttttttaYctttKttHgScWaacgHtttcaVaaMgaacagNatcgttaacaaaaagtaca\n\
+HBNaattgttKtcttVttaaBtctgctacgBgcWtttcaggacacatMgacatcccagcg\n\
+gMgaVKaBattgacttaatgacacacaaaaaatRKaaBctacgtRaDcgtagcVBaacDS\n\
+BHaaaaSacatatacagacRNatcttNaaVtaaaataHattagtaaaaSWccgtatWatg\n\
+gDttaactattgcccatcttHaSgYataBttBaactattBtcHtgatcaataSttaBtat\n\
+KSHYttWggtcYtttBttaataccRgVatStaHaKagaatNtagRMNgtcttYaaSaact\n\
+cagDSgagaaYtMttDtMRVgWKWtgMaKtKaDttttgactatacataatcNtatNaHat\n\
+tVagacgYgatatatttttgtStWaaatctWaMgagaRttRatacgStgattcttaagaD\n\
+taWccaaatRcagcagaaNKagtaaDggcgccBtYtagSBMtactaaataMataBSacRM\n\
+gDgattMMgtcHtcaYDtRaDaacggttDaggcMtttatgttaNctaattaVacgaaMMt\n\
+aatDccSgtattgaRtWWaccaccgagtactMcgVNgctDctaMScatagcgtcaactat\n\
+acRacgHRttgctatttaatgaattataYKttgtaagWgtYttgcHgMtaMattWaWVta\n\
+RgcttgYgttBHtYataSccStBtgtagMgtDtggcVaaSBaatagDttgBgtctttctc\n\
+attttaNagtHKtaMWcYactVcgcgtatMVtttRacVagDaatcttgctBBcRDgcaac\n\
+KttgatSKtYtagBMagaRtcgBattHcBWcaactgatttaatttWDccatttatcgagS\n\
+KaWttataHactaHMttaatHtggaHtHagaatgtKtaaRactgtttMatacgatcaagD\n\
+gatKaDctataMggtHDtggHacctttRtatcttYattttgacttgaaSaataaatYcgB\n\
+aaaaccgNatVBttMacHaKaataagtatKgtcaagactcttaHttcggaattgttDtct\n\
+aaccHttttWaaatgaaatataaaWattccYDtKtaaaacggtgaggWVtctattagtga\n\
+ctattaagtMgtttaagcatttgSgaaatatccHaaggMaaaattttcWtatKctagDtY\n\
+tMcctagagHcactttactatacaaacattaacttaHatcVMYattYgVgtMttaaRtga\n\
+aataaDatcaHgtHHatKcDYaatcttMtNcgatYatgSaMaNtcttKcWataScKggta\n\
+tcttacgcttWaaagNatgMgHtctttNtaacVtgttcMaaRatccggggactcMtttaY\n\
+MtcWRgNctgNccKatcttgYDcMgattNYaRagatHaaHgKctcataRDttacatBatc\n\
+cattgDWttatttaWgtcggagaaaaatacaatacSNtgggtttccttacSMaagBatta\n\
+caMaNcactMttatgaRBacYcYtcaaaWtagctSaacttWgDMHgaggatgBVgcHaDt\n\
+ggaactttggtcNatNgtaKaBcccaNtaagttBaacagtatacDYttcctNgWgcgSMc\n\
+acatStctHatgRcNcgtacacaatRttMggaNKKggataaaSaYcMVcMgtaMaHtgat\n\
+tYMatYcggtcttcctHtcDccgtgRatcattgcgccgatatMaaYaataaYSggatagc\n\
+gcBtNtaaaScaKgttBgagVagttaKagagtatVaactaSacWactSaKatWccaKaaa\n\
+atBKgaaKtDMattttgtaaatcRctMatcaaMagMttDgVatggMaaWgttcgaWatga\n\
+aatttgRtYtattaWHKcRgctacatKttctaccaaHttRatctaYattaaWatVNccat\n\
+NgagtcKttKataStRaatatattcctRWatDctVagttYDgSBaatYgttttgtVaatt\n\
+taatagcagMatRaacttBctattgtMagagattaaactaMatVtHtaaatctRgaaaaa\n\
+aaatttWacaacaYccYDSaattMatgaccKtaBKWBattgtcaagcHKaagttMMtaat\n\
+ttcKcMagNaaKagattggMagaggtaatttYacatcWaaDgatMgKHacMacgcVaaca\n\
+DtaDatatYggttBcgtatgWgaSatttgtagaHYRVacaRtctHaaRtatgaactaata\n\
+tctSSBgggaaHMWtcaagatKgagtDaSatagttgattVRatNtctMtcSaagaSHaat\n\
+aNataataRaaRgattctttaataaagWaRHcYgcatgtWRcttgaaggaMcaataBRaa\n\
+ccagStaaacNtttcaatataYtaatatgHaDgcStcWttaacctaRgtYaRtataKtgM\n\
+ttttatgactaaaatttacYatcccRWtttHRtattaaatgtttatatttgttYaatMca\n\
+RcSVaaDatcgtaYMcatgtagacatgaaattgRtcaaYaaYtRBatKacttataccaNa\n\
+aattVaBtctggacaagKaaYaaatatWtMtatcYaaVNtcgHaactBaagKcHgtctac\n\
+aatWtaDtSgtaHcataHtactgataNctRgttMtDcDttatHtcgtacatcccaggStt\n\
+aBgtcacacWtccNMcNatMVaVgtccDYStatMaccDatggYaRKaaagataRatttHK\n\
+tSaaatDgataaacttaHgttgVBtcttVttHgDacgaKatgtatatNYataactctSat\n\
+atatattgcHRRYttStggaactHgttttYtttaWtatMcttttctatctDtagVHYgMR\n\
+BgtHttcctaatYRttKtaagatggaVRataKDctaMtKBNtMtHNtWtttYcVtattMc\n\
+gRaacMcctNSctcatttaaagDcaHtYccSgatgcaatYaaaaDcttcgtaWtaattct\n\
+cgttttScttggtaatctttYgtctaactKataHacctMctcttacHtKataacacagcN\n\
+RatgKatttttSaaatRYcgDttaMRcgaaattactMtgcgtaagcgttatBtttttaat\n\
+taagtNacatHgttcRgacKcBBtVgatKttcgaBaatactDRgtRtgaNacWtcacYtt\n\
+aaKcgttctHaKttaNaMgWgWaggtctRgaKgWttSttBtDcNtgtttacaaatYcDRt\n\
+gVtgcctattcNtctaaaDMNttttNtggctgagaVctDaacVtWccaagtaacacaNct\n\
+gaScattccDHcVBatcgatgtMtaatBgHaatDctMYgagaatgYWKcctaatNaStHa\n\
+aaKccgHgcgtYaaYtattgtStgtgcaaRtattaKatattagaWVtcaMtBagttatta\n\
+gNaWHcVgcaattttDcMtgtaRHVYtHtctgtaaaaHVtMKacatcgNaatttMatatg\n\
+ttgttactagWYtaRacgataKagYNKcattataNaRtgaacKaYgcaaYYacaNccHat\n\
+MatDcNgtHttRaWttagaaDcaaaaaatagggtKDtStaDaRtaVtHWKNtgtattVct\n\
+SVgRgataDaRaWataBgaagaaKtaataaYgDcaStaNgtaDaaggtattHaRaWMYaY\n\
+aWtggttHYgagVtgtgcttttcaaDKcagVcgttagacNaaWtagtaataDttctggtt\n\
+VcatcataaagtgKaaaNaMtaBBaattaatWaattgctHaVKaSgDaaVKaHtatatat\n\
+HatcatSBagNgHtatcHYMHgttDgtaHtBttWatcgtttaRaattgStKgSKNWKatc\n\
+agDtctcagatttctRtYtBatBgHHtKaWtgYBgacVVWaKtacKcDttKMaKaVcggt\n\
+gttataagaataaHaatattagtataatMHgttYgaRttagtaRtcaaVatacggtcMcg\n\
+agtaaRttacWgactKRYataaaagSattYaWgagatYagKagatgSaagKgttaatMgg\n\
+tataatgttWYttatgagaaacctNVataatHcccKtDctcctaatactggctHggaSag\n\
+gRtKHaWaattcgSatMatttagaggcYtctaMcgctcataSatatgRagacNaaDagga\n\
+VBagaYttKtacNaKgtSYtagttggaWcatcWttaatctatgaVtcgtgtMtatcaYcg\n\
+tRccaaYgDctgcMgtgtWgacWtgataacacgcgctBtgttaKtYDtatDcatcagKaV\n\
+MctaatcttgVcaaRgcRMtDcgattaHttcaNatgaatMtactacVgtRgatggaWttt\n\
+actaaKatgagSaaKggtaNtactVaYtaaKRagaacccacaMtaaMtKtatBcttgtaa\n\
+WBtMctaataaVcDaaYtcRHBtcgttNtaaHatttBNgRStVDattBatVtaagttaYa\n\
+tVattaagaBcacggtSgtVtatttaRattgatgtaHDKgcaatattKtggcctatgaWD\n\
+KRYcggattgRctatNgatacaatMNttctgtcRBYRaaaHctNYattcHtaWcaattct\n\
+BtMKtVgYataatMgYtcagcttMDataVtggRtKtgaatgccNcRttcaMtRgattaac\n\
+attRcagcctHtWMtgtDRagaKaBtgDttYaaaaKatKgatctVaaYaacWcgcatagB\n\
+VtaNtRtYRaggBaaBtgKgttacataagagcatgtRattccacttaccatRaaatgWgD\n\
+aMHaYVgVtaSctatcgKaatatattaDgacccYagtgtaYNaaatKcagtBRgagtcca\n\
+tgKgaaaccBgaagBtgSttWtacgatWHaYatcgatttRaaNRgcaNaKVacaNtDgat\n\
+tgHVaatcDaagcgtatgcNttaDataatcSataaKcaataaHWataBtttatBtcaKtK\n\
+tatagttaDgSaYctacaRatNtaWctSaatatttYaKaKtaccWtatcRagacttaYtt\n\
+VcKgSDcgagaagatccHtaattctSttatggtKYgtMaHagVaBRatttctgtRgtcta\n\
+tgggtaHKgtHacHtSYacgtacacHatacKaaBaVaccaDtatcSaataaHaagagaat\n\
+ScagactataaRttagcaaVcaHataKgDacatWccccaagcaBgagWatctaYttgaaa\n\
+tctVNcYtttWagHcgcgcDcVaaatgttKcHtNtcaatagtgtNRaactttttcaatgg\n\
+WgBcgDtgVgtttctacMtaaataaaRggaaacWaHttaRtNtgctaaRRtVBctYtVta\n\
+tDcattDtgaccYatagatYRKatNYKttNgcctagtaWtgaactaMVaacctgaStttc\n\
+tgaKVtaaVaRKDttVtVctaDNtataaaDtccccaagtWtcgatcactDgYaBcatcct\n\
+MtVtacDaaBtYtMaKNatNtcaNacgDatYcatcgcaRatWBgaacWttKttagYtaat\n\
+tcggttgSWttttDWctttacYtatatWtcatDtMgtBttgRtVDggttaacYtacgtac\n\
+atgaattgaaWcttMStaDgtatattgaDtcRBcattSgaaVBRgagccaaKtttcDgcg\n\
+aSMtatgWattaKttWtgDBMaggBBttBaatWttRtgcNtHcgttttHtKtcWtagHSt\n\
+aacagttgatatBtaWSaWggtaataaMttaKacDaatactcBttcaatatHttcBaaSa\n\
+aatYggtaRtatNtHcaatcaHtagVtgtattataNggaMtcttHtNagctaaaggtaga\n\
+YctMattNaMVNtcKtactBKcaHHcBttaSagaKacataYgctaKaYgttYcgacWVtt\n\
+WtSagcaacatcccHaccKtcttaacgaKttcacKtNtacHtatatRtaaatacactaBt\n\
+ttgaHaRttggttWtatYagcatYDatcggagagcWBataagRtacctataRKgtBgatg\n\
+aDatataSttagBaHtaatNtaDWcWtgtaattacagKttcNtMagtattaNgtctcgtc\n\
+ctcttBaHaKcKccgtRcaaYagSattaagtKataDatatatagtcDtaacaWHcaKttD\n\
+gaaRcgtgYttgtcatatNtatttttatggccHtgDtYHtWgttatYaacaattcaWtat\n\
+NgctcaaaSttRgctaatcaaatNatcgtttaBtNNVtgttataagcaaagattBacgtD\n\
+atttNatttaaaDcBgtaSKgacgtagataatttcHMVNttgttBtDtgtaWKaaRMcKM\n\
+tHtaVtagataWctccNNaSWtVaHatctcMgggDgtNHtDaDttatatVWttgttattt\n\
+aacctttcacaaggaSaDcggttttttatatVtctgVtaacaStDVaKactaMtttaSNa\n\
+gtgaaattaNacttSKctattcctctaSagKcaVttaagNaVcttaVaaRNaHaaHttat\n\
+gtHttgtgatMccaggtaDcgaccgtWgtWMtttaHcRtattgScctatttKtaaccaag\n\
+tYagaHgtWcHaatgccKNRtttagtMYSgaDatctgtgaWDtccMNcgHgcaaacNDaa\n\
+aRaStDWtcaaaaHKtaNBctagBtgtattaactaattttVctagaatggcWSatMaccc\n\
+ttHttaSgSgtgMRcatRVKtatctgaaaccDNatYgaaVHNgatMgHRtacttaaaRta\n\
+tStRtDtatDttYatattHggaBcttHgcgattgaKcKtttcRataMtcgaVttWacatN\n\
+catacctRataDDatVaWNcggttgaHtgtMacVtttaBHtgagVttMaataattatgtt\n\
+cttagtttgtgcDtSatttgBtcaacHattaaBagVWcgcaSYttMgcttacYKtVtatc\n\
+aYaKctgBatgcgggcYcaaaaacgNtctagKBtattatctttKtaVttatagtaYtRag\n\
+NtaYataaVtgaatatcHgcaaRataHtacacatgtaNtgtcgYatWMatttgaactacR\n\
+ctaWtWtatacaatctBatatgYtaagtatgtgtatSttactVatcttYtaBcKgRaSgg\n\
+RaaaaatgcagtaaaWgtaRgcgataatcBaataccgtatttttccatcNHtatWYgatH\n\
+SaaaDHttgctgtccHtggggcctaataatttttctatattYWtcattBtgBRcVttaVM\n\
+RSgctaatMagtYtttaaaaatBRtcBttcaaVtaacagctccSaaSttKNtHtKYcagc\n\
+agaaaccccRtttttaaDcDtaStatccaagcgctHtatcttaDRYgatDHtWcaaaBcW\n\
+gKWHttHataagHacgMNKttMKHccaYcatMVaacgttaKgYcaVaaBtacgcaacttt\n\
+MctaaHaatgtBatgagaSatgtatgSRgHgWaVWgataaatatttccKagVgataattW\n\
+aHNcYggaaatgctHtKtaDtctaaagtMaatVDVactWtSaaWaaMtaHtaSKtcBRaN\n\
+cttStggtBttacNagcatagRgtKtgcgaacaacBcgKaatgataagatgaaaattgta\n\
+ctgcgggtccHHWHaaNacaBttNKtKtcaaBatatgctaHNgtKcDWgtttatNgVDHg\n\
+accaacWctKaaggHttgaRgYaatHcaBacaatgagcaaattactgtaVaaYaDtagat\n\
+tgagNKggtggtgKtWKaatacagDRtatRaMRtgattDggtcaaYRtatttNtagaDtc\n\
+acaaSDctDtataatcgtactaHttatacaatYaacaaHttHatHtgcgatRRttNgcat\n\
+SVtacWWgaaggagtatVMaVaaattScDDKNcaYBYaDatHgtctatBagcaacaagaa\n\
+tgagaaRcataaKNaRtBDatcaaacgcattttttaaBtcSgtacaRggatgtMNaattg\n\
+gatatWtgagtattaaaVctgcaYMtatgatttttYgaHtgtcttaagWBttHttgtctt\n\
+attDtcgtatWtataataSgctaHagcDVcNtaatcaagtaBDaWaDgtttagYctaNcc\n\
+DtaKtaHcttaataacccaRKtacaVaatNgcWRaMgaattatgaBaaagattVYaHMDc\n\
+aDHtcRcgYtcttaaaWaaaVKgatacRtttRRKYgaatacaWVacVcRtatMacaBtac\n\
+tggMataaattttHggNagSctacHgtBagcgtcgtgattNtttgatSaaggMttctttc\n\
+ttNtYNagBtaaacaaatttMgaccttacataattgYtcgacBtVMctgStgMDtagtaR\n\
+ctHtatgttcatatVRNWataDKatWcgaaaaagttaaaagcacgHNacgtaatctttMR\n\
+tgacttttDacctataaacgaaatatgattagaactccSYtaBctttaataacWgaaaYa\n\
+tagatgWttcatKtNgatttttcaagHtaYgaaRaDaagtaggagcttatVtagtctttc\n\
+attaaaatcgKtattaRttacagVaDatgcatVgattgggtctttHVtagKaaRBtaHta\n\
+aggccccaaaaKatggtttaMWgtBtaaacttcactttKHtcgatctccctaYaBacMgt\n\
+cttBaBaNgcgaaacaatctagtHccHtKttcRtRVttccVctttcatacYagMVtMcag\n\
+aMaaacaataBctgYtaatRaaagattaaccatVRatHtaRagcgcaBcgDttStttttc\n\
+VtttaDtKgcaaWaaaaatSccMcVatgtKgtaKgcgatatgtagtSaaaDttatacaaa\n\
+catYaRRcVRHctKtcgacKttaaVctaDaatgttMggRcWaacttttHaDaKaDaBctg\n\
+taggcgtttaHBccatccattcNHtDaYtaataMttacggctNVaacDattgatatttta\n\
+cVttSaattacaaRtataNDgacVtgaacataVRttttaDtcaaacataYDBtttaatBa\n\
+DtttYDaDaMccMttNBttatatgagaaMgaNtattHccNataattcaHagtgaaggDga\n\
+tgtatatatgYatgaStcataaBStWacgtcccataRMaaDattggttaaattcMKtctM\n\
+acaBSactcggaatDDgatDgcWctaacaccgggaVcacWKVacggtaNatatacctMta\n\
+tgatagtgcaKagggVaDtgtaacttggagtcKatatcgMcttRaMagcattaBRaStct\n\
+YSggaHYtacaactMBaagDcaBDRaaacMYacaHaattagcattaaaHgcgctaaggSc\n\
+cKtgaaKtNaBtatDDcKBSaVtgatVYaagVtctSgMctacgttaacWaaattctSgtD\n\
+actaaStaaattgcagBBRVctaatatacctNttMcRggctttMttagacRaHcaBaacV\n\
+KgaataHttttMgYgattcYaNRgttMgcVaaacaVVcDHaatttgKtMYgtatBtVVct\n\
+WgVtatHtacaaHttcacgatagcagtaaNattBatatatttcVgaDagcggttMaagtc\n\
+ScHagaaatgcYNggcgtttttMtStggtRatctacttaaatVVtBacttHNttttaRca\n\
+aatcacagHgagagtMgatcSWaNRacagDtatactaaDKaSRtgattctccatSaaRtt\n\
+aaYctacacNtaRtaactggatgaccYtacactttaattaattgattYgttcagDtNKtt\n\
+agDttaaaaaaaBtttaaNaYWKMBaaaacVcBMtatWtgBatatgaacVtattMtYatM\n\
+NYDKNcKgDttDaVtaaaatgggatttctgtaaatWtctcWgtVVagtcgRgacttcccc\n\
+taDcacagcRcagagtgtWSatgtacatgttaaSttgtaaHcgatgggMagtgaacttat\n\
+RtttaVcaccaWaMgtactaatSSaHtcMgaaYtatcgaaggYgggcgtgaNDtgttMNg\n\
+aNDMtaattcgVttttaacatgVatgtWVMatatcaKgaaattcaBcctccWcttgaaWH\n\
+tWgHtcgNWgaRgctcBgSgaattgcaaHtgattgtgNagtDttHHgBttaaWcaaWagc\n\
+aSaHHtaaaVctRaaMagtaDaatHtDMtcVaWMtagSagcttHSattaacaaagtRacM\n\
+tRtctgttagcMtcaBatVKtKtKacgagaSNatSactgtatatcBctgagVtYactgta\n\
+aattaaaggcYgDHgtaacatSRDatMMccHatKgttaacgactKtgKagtcttcaaHRV\n\
+tccttKgtSataatttacaactggatDNgaacttcaRtVaagDcaWatcBctctHYatHa\n\
+DaaatttagYatSatccaWtttagaaatVaacBatHcatcgtacaatatcgcNYRcaata\n\
+YaRaYtgattVttgaatgaVaactcRcaNStgtgtattMtgaggtNttBaDRcgaaaagc\n\
+tNgBcWaWgtSaDcVtgVaatMKBtttcgtttctaaHctaaagYactgMtatBDtcStga\n\
+ccgtSDattYaataHctgggaYYttcggttaWaatctggtRagWMaDagtaacBccacta\n\
+cgHWMKaatgatWatcctgHcaBaSctVtcMtgtDttacctaVgatYcWaDRaaaaRtag\n\
+atcgaMagtggaRaWctctgMgcWttaagKBRtaaDaaWtctgtaagYMttactaHtaat\n\
+cttcataacggcacBtSgcgttNHtgtHccatgttttaaagtatcgaKtMttVcataYBB\n\
+aKtaMVaVgtattNDSataHcagtWMtaggtaSaaKgttgBtVtttgttatcatKcgHac\n\
+acRtctHatNVagSBgatgHtgaRaSgttRcctaacaaattDNttgacctaaYtBgaaaa\n\
+tagttattactcttttgatgtNNtVtgtatMgtcttRttcatttgatgacacttcHSaaa\n\
+ccaWWDtWagtaRDDVNacVaRatgttBccttaatHtgtaaacStcVNtcacaSRttcYa\n\
+gacagaMMttttgMcNttBcgWBtactgVtaRttctccaaYHBtaaagaBattaYacgat\n\
+ttacatctgtaaMKaRYtttttactaaVatWgctBtttDVttctggcDaHaggDaagtcg\n\
+aWcaagtagtWttHtgKtVataStccaMcWcaagataagatcactctHatgtcYgaKcat\n\
+cagatactaagNSStHcctRRNtattgtccttagttagMVgtatagactaactctVcaat\n\
+MctgtttgtgttgccttatWgtaBVtttctggMcaaKgDWtcgtaaYStgSactatttHg\n\
+atctgKagtagBtVacRaagRtMctatgggcaaaKaaaatacttcHctaRtgtDcttDat\n\
+taggaaatttcYHaRaaBttaatggcacKtgctHVcaDcaaaVDaaaVcgMttgtNagcg\n\
+taDWgtcgttaatDgKgagcSatatcSHtagtagttggtgtHaWtaHKtatagctgtVga\n\
+ttaBVaatgaataagtaatVatSttaHctttKtttgtagttaccttaatcgtagtcctgB\n\
+cgactatttVcMacHaaaggaatgDatggKtaHtgStatattaaSagctWcctccRtata\n\
+BaDYcgttgcNaagaggatRaaaYtaWgNtSMcaatttactaacatttaaWttHtatBat\n\
+tgtcgacaatNgattgcNgtMaaaKaBDattHacttggtRtttaYaacgVactBtaBaKt\n\
+gBttatgVttgtVttcaatcWcNctDBaaBgaDHacBttattNtgtDtatttVSaaacag\n\
+gatgcRatSgtaSaNtgBatagttcHBgcBBaaattaHgtDattatDaKaatBaaYaaMa\n\
+ataaataKtttYtagtBgMatNcatgtttgaNagtgttgtgKaNaSagtttgaSMaYBca\n\
+aaacDStagttVacaaaaactaaWttBaagtctgtgcgtMgtaattctcctacctcaNtt\n\
+taaccaaaaVtBcacataacaccccBcWMtatVtggaatgaWtcaaWaaaaaaaaWtDta\n\
+atatRcctDWtcctaccMtVVatKttaWaaKaaatataaagScHBagaggBaSMtaWaVt\n\
+atattactSaaaKNaactatNatccttgaYctattcaaaVgatttYHcRagattttaSat\n\
+aggttattcVtaaagaKgtattattKtRttNcggcRgtgtgtWYtaacHgKatKgatYta\n\
+cYagDtWcHBDctctgRaYKaYagcactKcacSaRtBttttBHKcMtNtcBatttatttt\n\
+tgSatVgaaagaWtcDtagDatatgMacaacRgatatatgtttgtKtNRaatatNatgYc\n\
+aHtgHataacKtgagtagtaacYttaNccaaatHcacaacaVDtagtaYtccagcattNt\n\
+acKtBtactaaagaBatVtKaaHBctgStgtBgtatgaSNtgDataaccctgtagcaBgt\n\
+gatcttaDataStgaMaccaSBBgWagtacKcgattgaDgNNaaaacacagtSatBacKD\n\
+gcgtataBKcatacactaSaatYtYcDaactHttcatRtttaatcaattataRtttgtaa\n\
+gMcgNttcatcBtYBagtNWNMtSHcattcRctttttRWgaKacKttgggagBcgttcgc\n\
+MaWHtaatactgtctctatttataVgtttaBScttttaBMaNaatMacactYtBMggtHa\n\
+cMagtaRtctgcatttaHtcaaaatttgagKtgNtactBacaHtcgtatttctMaSRagc\n\
+agttaatgtNtaaattgagagWcKtaNttagVtacgatttgaatttcgRtgtWcVatcgt\n\
+taaDVctgtttBWgaccagaaagtcSgtVtatagaBccttttcctaaattgHtatcggRa\n\
+ttttcaaggcYSKaagWaWtRactaaaacccBatMtttBaatYtaagaactSttcgaaSc\n\
+aatagtattgaccaagtgttttctaacatgtttNVaatcaaagagaaaNattaaRtttta\n\
+VaaaccgcaggNMtatattVctcaagaggaacgBgtttaacaagttcKcYaatatactaa\n\
+ccBaaaSggttcNtattctagttRtBacgScVctcaatttaatYtaaaaaaatgSaatga\n\
+tagaMBRatgRcMcgttgaWHtcaVYgaatYtaatctttYttatRaWtctgBtDcgatNa\n\
+tcKaBaDgatgtaNatWKctccgatattaacattNaaacDatgBgttctgtDtaaaMggt\n\
+gaBaSHataacgccSctaBtttaRBtcNHcDatcDcctagagtcRtaBgWttDRVHagat\n\
+tYatgtatcWtaHtttYcattWtaaagtctNgtStggRNcgcggagSSaaagaaaatYcH\n\
+DtcgctttaatgYcKBVSgtattRaYBaDaaatBgtatgaHtaaRaRgcaSWNtagatHa\n\
+acttNctBtcaccatctMcatattccaSatttgcgaDagDgtatYtaaaVDtaagtttWV\n\
+aagtagYatRttaagDcNgacKBcScagHtattatcDaDactaaaaaYgHttBcgaDttg\n\
+gataaaKSRcBMaBcgaBSttcWtgNBatRaccgattcatttataacggHVtaattcaca\n\
+agagVttaaRaatVVRKcgWtVgacctgDgYaaHaWtctttcacMagggatVgactagMa\n\
+aataKaaNWagKatagNaaWtaaaatttgaattttatttgctaaVgaHatBatcaaBWcB\n\
+gttcMatcgBaaNgttcgSNaggSaRtttgHtRtattaNttcDcatSaVttttcgaaaaa\n\
+ttgHatctaRaggSaNatMDaaatDcacgattttagaHgHaWtYgattaatHNSttatMS\n\
+gggNtcKtYatRggtttgtMWVtttaYtagcagBagHaYagttatatggtBacYcattaR\n\
+SataBatMtttaaatctHcaaaSaaaagttNSaaWcWRccRtKaagtBWtcaaattSttM\n\
+tattggaaaccttaacgttBtWatttatatWcDaatagattcctScacctaagggRaaYt\n\
+aNaatgVtBcttaaBaacaMVaaattatStYgRcctgtactatcMcVKatttcgSgatRH\n\
+MaaaHtagtaaHtVgcaaataatatcgKKtgccaatBNgaaWcVttgagttaKatagttc\n\
+aggKDatDtattgaKaVcaKtaataDataataHSaHcattagttaatRVYcNaHtaRcaa\n\
+ggtNHcgtcaaccaBaaagYtHWaaaRcKgaYaaDttgcWYtataRgaatatgtYtgcKt\n\
+aNttWacatYHctRaDtYtattcBttttatcSataYaYgttWaRagcacHMgtttHtYtt\n\
+YaatcggtatStttcgtRSattaaDaKMaatatactaNBaWgctacacYtgaYVgtgHta\n\
+aaRaaRgHtagtWattataaaSDaaWtgMattatcgaaaagtaYRSaWtSgNtBgagcRY\n\
+aMDtactaacttaWgtatctagacaagNtattHggataatYttYatcataDcgHgttBtt\n\
+ctttVttgccgaaWtaaaacgKgtatctaaaaaNtccDtaDatBMaMggaatNKtatBaa\n\
+atVtccRaHtaSacataHattgtttKVYattcataVaattWtcgtgMttcttKtgtctaa\n\
+cVtatctatatBRataactcgKatStatattcatHHRttKtccaacgtgggtgRgtgaMt\n\
+attattggctatcgtgacMtRcBDtcttgtactaatRHttttaagatcgVMDStattatY\n\
+BtttDttgtBtNttgRcMtYtgBacHaWaBaatDKctaagtgaaactaatgRaaKgatcc\n\
+aagNaaaatattaggWNtaagtatacttttKcgtcggSYtcttgRctataYcttatataa\n\
+agtatattaatttataVaacacaDHatctatttttKYVatHRactttaBHccaWagtact\n\
+BtcacgaVgcgttRtttttttSVgtSagtBaaattctgaHgactcttgMcattttagVta\n\
+agaattHctHtcaDaaNtaacRggWatagttcgtSttgaDatcNgNagctagDgatcNtt\n\
+KgttgtaDtctttRaaYStRatDtgMggactSttaDtagSaVtBDttgtDgccatcacaM\n\
+attaaaMtNacaVcgSWcVaaDatcaHaatgaattaMtatccVtctBtaattgtWattat\n\
+BRcWcaatgNNtactWYtDaKttaaatcactcagtRaaRgatggtKgcgccaaHgaggat\n\
+StattYcaNMtcaBttacttatgagDaNtaMgaaWtgtttcttctaHtMNgttatctaWW\n\
+atMtBtaaatagDVatgtBYtatcggcttaagacMRtaHScgatatYgRDtcattatSDa\n\
+HggaaataNgaWSRRaaaBaatagBattaDctttgHWNttacaataaaaaaatacggttt\n\
+gHgVtaHtWMttNtBtctagtMcgKMgHgYtataHaNagWtcaacYattaataYRgtaWK\n\
+gaBctataaccgatttaHaNBRaRaMtccggtNgacMtctcatttgcaattcWgMactta\n\
+caaDaaNtactWatVtttagccttMaatcagVaagtctVaaDaBtattaattaYtNaYtg\n\
+gattaKtaKctYaMtattYgatattataatKtVgDcttatatNBtcgttgtStttttMag\n\
+aggttaHYSttcKgtcKtDNtataagttataagSgttatDtRttattgttttSNggRtca\n\
+aKMNatgaatattgtBWtaMacctgggYgaSgaagYataagattacgagaatBtggtRcV\n\
+HtgYggaDgaYaKagWagctatagacgaaHgtWaNgacttHRatVaWacKYtgRVNgVcS\n\
+gRWctacatcKSactctgWYtBggtataagcttNRttVtgRcaWaaatDMatYattaact\n\
+ttcgaagRatSctgccttgcRKaccHtttSNVagtagHagBagttagaccaRtataBcca\n\
+taatSHatRtcHagacBWatagcaMtacaRtgtgaaBatctKRtScttccaNaatcNgta\n\
+atatWtcaMgactctBtWtaaNactHaaaaRctcgcatggctMcaaNtcagaaaaacaca\n\
+gtggggWttRttagtaagaVctVMtcgaatcttcMaaaHcaHBttcgattatgtcaDagc\n\
+YRtBtYcgacMgtDcagcgaNgttaataatagcagKYYtcgtaBtYctMaRtaRtDagaa\n\
+aacacatgYaBttgattattcgaaNttBctSataaMataWRgaHtttccgtDgaYtatgg\n\
+tDgHKgMtatttVtMtVagttaRatMattRagataaccctKctMtSttgaHagtcStcta\n\
+tttccSagatgttccacgaggYNttHRacgattcDatatDcataaaatBBttatcgaHtN\n\
+HaaatatDNaggctgaNcaaggagttBttMgRagVatBcRtaWgatgBtSgaKtcgHttt\n\
+gaatcaaDaHttcSBgHcagtVaaSttDcagccgttNBtgttHagYtattctttRWaaVt\n\
+SttcatatKaaRaaaNacaVtVctMtSDtDtRHRcgtaatgctcttaaatSacacaatcg\n\
+HattcaWcttaaaatHaaatcNctWttaNMcMtaKctVtcctaagYgatgatcYaaaRac\n\
+tctaRDaYagtaacgtDgaggaaatctcaaacatcaScttcKttNtaccatNtaNataca\n\
+tttHaaDHgcaDatMWaaBttcRggctMaagctVYcacgatcaDttatYtaatcKatWat\n\
+caatVYtNagatttgattgaYttttYgacttVtcKaRagaaaHVgDtaMatKYagagttN\n\
+atWttaccNtYtcDWgSatgaRgtMatgKtcgacaagWtacttaagtcgKtgatccttNc\n\
+ttatagMatHVggtagcgHctatagccctYttggtaattKNaacgaaYatatVctaataM\n\
+aaaYtgVtcKaYtaataacagaatHcacVagatYWHttagaaSMaatWtYtgtaaagNaa\n\
+acaVgaWtcacNWgataNttcaSagctMDaRttgNactaccgataMaaatgtttattDtc\n\
+aagacgctDHYYatggttcaagccNctccttcMctttagacBtaaWtaWVHggaaaaNat\n\
+ttaDtDtgctaaHHtMtatNtMtagtcatttgcaaaRatacagRHtatDNtgtDgaatVg\n\
+tVNtcaaatYBMaaaagcaKgtgatgatMgWWMaHttttMgMagatDtataaattaacca\n\
+actMtacataaattgRataatacgBtKtaataattRgtatDagDtcRDacctatRcagag\n\
+cSHatNtcaScNtttggacNtaaggaccgtgKNttgttNcttgaaRgYgRtNtcagttBc\n\
+ttttcHtKtgcttYaaNgYagtaaatgaatggWaMattBHtatctatSgtcYtgcHtaat\n\
+tHgaaMtHcagaaSatggtatgccaHBtYtcNattWtgtNgctttaggtttgtWatNtgH\n\
+tgcDttactttttttgcNtactKtWRaVcttcatagtgSNKaNccgaataaBttataata\n\
+YtSagctttaaatSttggctaaKSaatRccgWHgagDttaaatcatgagMtcgagtVtaD\n\
+ggaBtatttgDacataaacgtagYRagBWtgDStKDgatgaagttcattatttaKWcata\n\
+aatWRgatataRgttRacaaNKttNtKagaaYaStaactScattattaacgatttaaatg\n\
+DtaattagatHgaYataaactatggggatVHtgccgtNgatNYcaStRtagaccacWcaM\n\
+tatRagHgVactYtWHtcttcatgatWgagaKggagtatgaWtDtVtNaNtcgYYgtaaa\n\
+ctttaDtBactagtaDctatagtaatatttatatataacgHaaaRagKattSagttYtSt\n\
+>THREE Homo sapiens frequency\n\
+agagagacgatgaaaattaatcgtcaatacgctggcgaacactgagggggacccaatgct\n\
+cttctcggtctaaaaaggaatgtgtcagaaattggtcagttcaaaagtagaccggatctt\n\
+tgcggagaacaattcacggaacgtagcgttgggaaatatcctttctaccacacatcggat\n\
+tttcgccctctcccattatttattgtgttctcacatagaattattgtttagacatccctc\n\
+gttgtatggagagttgcccgagcgtaaaggcataatccatataccgccgggtgagtgacc\n\
+tgaaattgtttttagttgggatttcgctatggattagcttacacgaagagattctaatgg\n\
+tactataggataattataatgctgcgtggcgcagtacaccgttacaaacgtcgttcgcat\n\
+atgtggctaacacggtgaaaatacctacatcgtatttgcaatttcggtcgtttcatagag\n\
+cgcattgaattactcaaaaattatatatgttgattatttgattagactgcgtggaaagaa\n\
+ggggtactcaagccatttgtaaaagctgcatctcgcttaagtttgagagcttacattagt\n\
+ctatttcagtcttctaggaaatgtctgtgtgagtggttgtcgtccataggtcactggcat\n\
+atgcgattcatgacatgctaaactaagaaagtagattactattaccggcatgcctaatgc\n\
+gattgcactgctatgaaggtgcggacgtcgcgcccatgtagccctgataataccaatact\n\
+tacatttggtcagcaattctgacattatacctagcacccataaatttactcagacttgag\n\
+gacaggctcttggagtcgatcttctgtttgtatgcatgtgatcatatagatgaataagcg\n\
+atgcgactagttagggcatagtatagatctgtgtatacagttcagctgaacgtccgcgag\n\
+tggaagtacagctgagatctatcctaaaatgcaaccatatcgttcacacatgatatgaac\n\
+ccagggggaaacattgagttcagttaaattggcagcgaatcccccaagaagaaggcggag\n\
+tgacgttgaacgggcttatggtttttcagtacttcctccgtataagttgagcgaaatgta\n\
+aacagaataatcgttgtgttaacaacattaaaatcgcggaatatgatgagaatacacagt\n\
+gtgagcatttcacttgtaaaatatctttggtagaacttactttgctttaaatatgttaaa\n\
+ccgatctaataatctacaaaacggtagattttgcctagcacattgcgtccttctctattc\n\
+agatagaggcaatactcagaaggttttatccaaagcactgtgttgactaacctaagtttt\n\
+agtctaataatcatgattgattataggtgccgtggactacatgactcgtccacaaataat\n\
+acttagcagatcagcaattggccaagcacccgacttttatttaatggttgtgcaatagtc\n\
+cagattcgtattcgggactctttcaaataatagtttcctggcatctaagtaagaaaagct\n\
+cataaggaagcgatattatgacacgctcttccgccgctgttttgaaacttgagtattgct\n\
+cgtccgaaattgagggtcacttcaaaatttactgagaagacgaagatcgactaaagttaa\n\
+aatgctagtccacagttggtcaagttgaattcatccacgagttatatagctattttaatt\n\
+tatagtcgagtgtacaaaaaacatccacaataagatttatcttagaataacaacccccgt\n\
+atcatcgaaatcctccgttatggcctgactcctcgagcttatagcatttgtgctggcgct\n\
+cttgccaggaacttgctcgcgaggtggtgacgagtgagatgatcagtttcattatgatga\n\
+tacgattttatcgcgactagttaatcatcatagcaagtaaaatttgaattatgtcattat\n\
+catgctccattaacaggttatttaattgatactgacgaaattttttcacaatgggttttc\n\
+tagaatttaatatcagtaattgaagccttcataggggtcctactagtatcctacacgacg\n\
+caggtccgcagtatcctggagggacgtgttactgattaaaagggtcaaaggaatgaaggc\n\
+tcacaatgttacctgcttcaccatagtgagccgatgagttttacattagtactaaatccc\n\
+aaatcatactttacgatgaggcttgctagcgctaaagagaatacatacaccaccacatag\n\
+aattgttagcgatgatatcaaatagactcctggaagtgtcagggggaaactgttcaatat\n\
+ttcgtccacaggactgaccaggcatggaaaagactgacgttggaaactataccatctcac\n\
+gcccgacgcttcactaattgatgatccaaaaaatatagcccggattcctgattagcaaag\n\
+ggttcacagagaaagatattatcgacgtatatcccaaaaaacagacgtaatgtgcatctt\n\
+cgaatcgggatgaatacttgtatcataaaaatgtgacctctagtatacaggttaatgtta\n\
+gtgatacacaatactcgtgggccatgggttctcaaataaaatgtaatattgcgtcgatca\n\
+ctcacccacgtatttggtctaattatgttttatttagtgacaatccaatagataaccggt\n\
+cctattaagggctatatttttagcgaccacgcgtttaaacaaaggattgtatgtagatgg\n\
+taccagtttaattgccagtgggcaatcctaagcaaaatgagattctatcctaaagtttgg\n\
+gcttgatataagatttcggatgtatgggttttataatcgttggagagctcaatcatgagc\n\
+taatacatggatttcgctacctcaccgagagaccttgcatgaagaattctaaccaaaagt\n\
+ttaataggccggattggattgagttaattaagaccttgttcagtcatagtaaaaaccctt\n\
+aaattttaccgattgacaaagtgagcagtcgcaataccctatgcgaaacgcctcgatagt\n\
+gactaggtatacaaggtttttgagttcctttgaaatagttaactaatttaaaattaatta\n\
+acgacatggaaatcacagaacctaatgctttgtaggagttatttatgctgtttactgcct\n\
+ctacaaccctaataaagcagtcctaagaatgaaacgcatcttttagttcagaaagtggta\n\
+tccagggtggtcaatttaataaattcaacatcgggtctcaggatattcggtcatataatt\n\
+tattaagggctcttcgagtcttactctgagtgaaattggaaacagtcatccttttcgttg\n\
+tgaggcatcttacaccgctatcgatatacaatgcattccaccgcggtgtcccgtacacaa\n\
+ggaaacttgttaccttggggatataagaaaactcacacgtctcattattaaactgagtac\n\
+aatttttgcacgagaaagtaatgcaatacaatatgatgaaagccagctaatgaaaaggga\n\
+tggaacgcacctcggatctgttgcactggattaaaatccgattatttttaaaaatattca\n\
+gtgctagagcatatcaggtctacttttttatctggtatgtaaagcccacggagcgatagt\n\
+gagatccttacgactcaacgaaaagttataacataactcccgttagccaaagcccaatcc\n\
+cgattactgccctaccctaacgtctgccatctaaatatcgaacttgttatgatcaatgtg\n\
+actacctcccaccctttccccttcatttgttccactggggataagctagcgttttcagaa\n\
+tcaatgcaataagaatagccaattgtctcacttcatcagagctcttggcaattccaggcg\n\
+ctacgtggttctggaatatattcatttttcaaatagtaatacgtttagtgttgctattgt\n\
+ctacacgtttggatattacgttatgtgagcggacatcaatagttgtctaactctttagta\n\
+agccagagatagcactcttagcgaatggataccatcttccataagtttagttaatagtcc\n\
+gaaacaactgcttcgagcatatttgaacctccttgtaggcaaatagcctcttcaaagcaa\n\
+tcttactaatagatagagtttgttttaagggactactagaaatgggacaatcttaatagt\n\
+atgacctaaactgacatttaaagatatatccaggtggcaagcataaagatcattgcgcca\n\
+cctccaccgtgggattacttatcagtcgatatcctatatgctaagtttgcgacggcagaa\n\
+tacaaactaagctgagttgatgctaaccttacctatgataccccattggaccggttaaca\n\
+gccctacttattccaaataaaagaacttttatgctgtagaagctattatagtgatgcctg\n\
+gtaacttcagtatattaaaatgacacacatacgccatatagagctcctggaactttgaat\n\
+aatgagcgaacttcgaagttgaagagcaagaaaccatatgtcacggttgcctaaagcccg\n\
+gtaaccagacatgtgctatcattgatcattatcgaggttttcataaccttgacccattat\n\
+cggctgtgcgcggacaagtacttaaatcactagtttcttcacctgcttatcggtaagaaa\n\
+taaggttggcaaagaatcgcataagacggacgtagagccgcagcgttgtgcgagtccagg\n\
+tgcatgcgcagcaataggattttaaattttgttccatttttaatttagccgtaaggatgt\n\
+ccgtaaatgattgaaaattggattcaatctttgggcctatgctactggaacctgatcgac\n\
+aaaatttcaaacatacgttaactccgaaagaccgtatttttgcggctagaatagtcagtc\n\
+gcttggagccatataccttaccacttaaacgacgtgctcctgtagttgaaatataaacag\n\
+aacacaaagactaccgatcatatcaactgaagatctttgtaactttgaggcgaagcaccc\n\
+tcttcgagacaactaagagtaaagtaccgggcgccgcaaggagtcgattgggaccctaaa\n\
+tcttgacgaattgctaagaggctcagagctaccactgtaatttctctagagcccataata\n\
+aatgaacgatacatccgtaggtagcacctaagggattataatggaagccaaatgcagtta\n\
+ataatattatatactggcgtacacgattcgacggatctctcacatagtgattcacgaccc\n\
+ccccctttgattgacacagcgtcagcattttgcaagaacgatcttctgcatagggtgcgc\n\
+caccgtaaggatgacgtcgaagctacaactgggtataatttaccatgcttccctgatgct\n\
+gagtgcaatacactaagaatgagtttttaccccatatcaccagtatttgttctgttattg\n\
+cgaagaaatggctatgctgagttggcgactaaagtcacccatcctttttattaggtaacc\n\
+ccctcccttaaactaactgatttgctggagctgccctgcatacatatactttatcattta\n\
+tggacgtccgtgacgcttattatccaccatagtcgatatgctacacggattcattaatgg\n\
+atcgtaggagtttaagttatatttactaagatcggtctcggctactatcccgccttaccc\n\
+ggcgctatttacggccatttttaatatattgacggtaattattcctatggtttcgaccgc\n\
+acgtccttggacaagaaagaatggcaaaaaaaatgtaaaagaaaaaaaatattgagtccc\n\
+taccatcatataaaaaatatgtgatgagtaacttgacgaaatgttagtggttattaaaga\n\
+ctatctattacaccttttgttttctgtcgtagtatattaaagtctagaagccttacagga\n\
+aaatcagggttatacagccgatactccgcagcatgaatcatcgaggaggtgtcctaccat\n\
+cgcgccttgtaatcttgtctgtgtatactgtatttagaccttttatacaaagtaaatatc\n\
+tcggctttatgtgattgggaggggcctactcaaacatgatgacttgacctaataatcact\n\
+gtgcgggcgtcttatgactagctattccttgaaatccaccaccaaatggttaatatgtaa\n\
+aaactttgacgatgaaacaaggtgaatgtgtagttactttgtgtaattagctgcgtcgag\n\
+cattgcttgtaaaaccgtcaatcgcacacgttacttccataaaatttctacgaatacacc\n\
+cttcttaaaaaaaacgtaggaattcacgagtttaacaaacgataactgtataaagtggaa\n\
+gtccgaagaaagcagatgcccgaactactcgaagatgtttcgttttcttaaccatagggg\n\
+cttcttaatggcccactacgcacattttgttcaagcccgagagggacatccccattacgg\n\
+gagtattactaaaactgttccgtaatacgttcagcaagggatgaaaaaggccactgctca\n\
+agttattgacgtgggagtattacatcggaagcctgaatcccacactatgatggtctgtac\n\
+aggcctagggactgcgtctagacggtattaccggcttctaatcatacgatcgtgagtctt\n\
+aacgggaagtaaggctcacacctaccccaaaccatttatctatgtaagtataaaattgtg\n\
+cgtaagtgttcaaagtggacaataaagacgtggcaaaaacccccgcacataagccgcttt\n\
+agatttcacaaataccaatgcggttaaaaacatccttgagtcgtacatacaccatactcg\n\
+cgttaaacggatataacagaagataataaatccggatgtggagtcggtgtaactatagaa\n\
+agccaagtgaaataatgcttaccagtcatttagctatacggctttcatttcatgtcaaga\n\
+gggtggagtttgacctgtacagttgatatatcaccgatacttagaactcacctaaagcta\n\
+aaattgctcgcagcgtgtaatccgcatattacaaacaatagatgggattcattatacata\n\
+agacacgatgatctgctttttcaggttgcgagatgttgcctatcgtcaatcgagtcctgc\n\
+cttacaccacttaaacaaaagtattgacagggaacctattttcgaggtattatatagtcc\n\
+agcttgaatatcaatttgacagttaacctagtgaaaatcagtaagaggaaatacgccaca\n\
+ttctccagtgaaattctacgggttatcgtctagtccaactatcaattataactcacgaga\n\
+tataagtaaattctcgtacttggcctgatttttattatactttggatccttagtaaacag\n\
+gaagggagaaaccttcaacgaaaaacactggattttgttttactctcaaagctcttatat\n\
+gacggaaataccctgtcaagtcttaactttattactagactaatgaaatgggcttggggt\n\
+ggccagaatcatagtacaatttagcggatacactattcggactttcctatcggctgtctg\n\
+gttggataagtatggggactaataggctagacatacctatacttaaactatacaggcgtc\n\
+atctatctctgcaactttggagttccctgatgttctcccgccctttgggttcacatcttc\n\
+tataccgacacccctaataacgattagtttgtgggttagagtaaattaatacggttaata\n\
+ttaatgtatcgttgaaaagctggtgtcgccaataaggtaaccggctaggcagagtatatg\n\
+tcacgaagtataactaccctaatgataagctgtaggaataaaattaatgctgtctctaag\n\
+cgaagagatatttccgactctgttttaatgacgaatctcattacttctgacttgcaaatg\n\
+ttcaatatggcacggtttcacggcacctttgtgacgcatataatgaacttagaagattat\n\
+aacgacggaactttatatgataatccgttacgattaaagaatctgttaaatatcataatg\n\
+gcattcagttctagaccgtgcatcatggtaaacttactttctctgcatggcgacatacat\n\
+ttcgctattcaaattcgcgtgtggttacacccactcgcacctttggaatattaagagaag\n\
+atgatcagaaaatccattcgctcaatttttctgacgtacgtctaatttatcctaggagac\n\
+aaatcgttttatgtctctcacatttttgaagaaaggttcgagagacaatactcaggtcct\n\
+gaactgctagaagatactcggtggagcgtggcaacaatgaaaaactcgtgacataaatga\n\
+atgatacttttccaagttcagttaagtgaatatgtttaacatacccggcttttcgatctt\n\
+aagctgacgctggacgtgcgagtaatgtcagtctcttacatacactagtgactccaagtt\n\
+tcgtcaaaaacgccccctcccttctcgagcccactcacgctatgtattgacgcgaacttg\n\
+ttcgggatcagacttttcaggagttcggtcgcgtgtccctatgtgctaatatataagtta\n\
+gatcgcattagatgctaatctgaatacttatagacgaccttcaacgagaacgggtaccac\n\
+cttgaggctagagttaggtgtgaaacgacaggtagggacatataaaatttgagtgcggct\n\
+ttagttaagggtttaattacctactcaaacatcacgctcgcgcccttcgtacgtaatcga\n\
+ccatctagaggctaaggggactgtactaggtagtgattaatgatatcctagacgcacgtg\n\
+ccttagatcttcagactctgatggtccgcgatcaccgtaattgtagtcctccaactcgat\n\
+cactttgttggcgtcaaagaaattacgatatctaaatacttataatacaataaccaagga\n\
+tgagaatgactcatcgcgttggagttatattgcttgaagttctatggaatgaaagcacgt\n\
+tatctgccgtcccaatatctccagtgagctaattcattggacggtccactttgatcaatc\n\
+cccgaggagatgttcggacactttagtctgtaacacttagcgttgagaccacgaacaatt\n\
+gattactcagtcttgaaggtgttttccaaagttcattttaaataagactacgataggcct\n\
+ttcctattgatataaactacccggctctgttgttcgtgtgagtcgtacttctctgtgttt\n\
+ttctgattatagcaagattcgattcttagtgtaaacagcgatttttatttgacccgtcaa\n\
+tgagaagcgcataggatctaagcaaaattatcaagttgtgccacaaggtaagatctttcc\n\
+agttattgcaggtaggatgtatcccacgttgatagtatgaggtctgacgtcaactgtcta\n\
+ggagagttgaccgcgtgcgggtacaccggatttgcatcgatgttgagaacgcagaactcc\n\
+cactgtcgtggcggcgttcctgatatttagcaagaggcgttgataaagccctcatcatct\n\
+agatctcgacctcatctgccctcttgctccatcattttctacacagactactttcctatc\n\
+tacgttagtataattgctttctatcttagtatcatttagagcttctccgtcaacaggttc\n\
+gtgctattaaagttagtacgaaagggacaacttgtagcaacgcatttaatcggttttcga\n\
+ctacttcgcacaaaatcagataaagaagtttgtcattctattagacattgaattgcgcaa\n\
+ttgacttgtaccacttatgatcgaacactgaatcaagactgtgattaactaaaatagaca\n\
+agccactatatcaactaataaaaacgcccctggtggtcgaacatagttgactacaggata\n\
+attaattggactggagccattacattctctacaatcgtatcacttcccaagtagacaact\n\
+ttgaccttgtagtttcatgtacaaaaaaatgctttcgcaggagcacattggtagttcaat\n\
+agtttcatgggaacctcttgagccgtcttctgtgggtgtgttcggatagtaggtactgat\n\
+aaagtcgtgtcgctttcgatgagagggaattcaccggaaaacaccttggttaacaggata\n\
+gtctatgtaaacttcgagacatgtttaagagttaccagcttaatccacggtgctctacta\n\
+gtatcatcagctgtcttgcctcgcctagaaatatgcattctatcgttatcctatcaacgg\n\
+ttgccgtactgagcagccttattgtggaagagtaatatataaatgtagtcttgtctttac\n\
+gaagcagacgtaagtaataatgacttggaataccaaaactaaacatagtggattatcata\n\
+ctcaagaactctccagataaataacagtttttacgatacgtcaccaatgagcttaaagat\n\
+taggatcctcaaaactgatacaaacgctaattcatttgttattggatccagtatcagtta\n\
+aactgaatggagtgaagattgtagaatgttgttctggcctcgcatggggtctaggtgata\n\
+tacaatttctcatacttacacggtagtggaaatctgattctagcttcgtagctgactata\n\
+ctcaaggaaccactgctcaaggtaggagactagttccgaccctacagtcaaagtggccga\n\
+agcttaaactatagactagttgttaaatgctgatttcaagatatcatctatatacagttt\n\
+ggacaattatgtgtgcgaaactaaaattcatgctattcagatggatttcacttatgcctt\n\
+agaaacagatattgcccgagctcaatcaacagttttagccggaaacaatcgaagcatagg\n\
+gacaatgtatcttttcctaaattgccatgtgcagatttctgagtgtcacgaagcgcataa\n\
+tagaatcttgtgttgcctcaactcgttgaaaagtttaaaacaatcgcagcagtctttttg\n\
+gggtctactgtgtgtttgcaaaataactgaaagaaacgcttgaacaactctgaagtagct\n\
+cgagtactcattaaagtgtaacacattagtgaatatcggccaatgaaccaaacgcttccc\n\
+ggtacgctatctctctcatcgggaggcgatgtgcaggttatctacgaaagcatcccttta\n\
+cgttgagagtgtcgatgcatgaacctcattgtaacaatagcccagcaaattctcatacgt\n\
+gcctcagggtccgggcgtactcctccatggaagggcgcgcatctagtgttataccaactc\n\
+gctttttaactactatgctgtagttctacaggcatagtggccagtattttctaacttctc\n\
+tggatagatgctctcactcctcatccatcacggcttcagtttacgtcttacttgcttgtt\n\
+cagcaacggatggaggcattaagtatcttcactgttccctaaaattgctgttcaatatca\n\
+aagtaaggacgatacagggaaagctcaagcacactcattgaatactgccccagttgcaac\n\
+ctcacttaatctgacaaaaataatgactactctaagtgttgcggaagcagtctcttccac\n\
+gagcttgtctgtatcacttcgtataggcatgtaactcgatagacacgaacaccgagtgag\n\
+aaactatattcttgcttccgtgtgtgtgacaccaggtaattgatgcggatataagctgga\n\
+gatcactcacgcccacacaaggcgctgctacctctttattccaatgtgtaagaatttgct\n\
+aacttcatttctagaccgcagctttgcggtcataatttcacggtacggacccttgggtta\n\
+gagacttgataacacacttcgcagtttccaccgcgcacatgttttagtggcttctaacat\n\
+agaatttttgttgtgacataaagagtgcgtgggagacttgcccgaccgttaagccataat\n\
+caattgaaagccccgtgagtcacatctaattggttgtactgcgcatttagctatccttta\n\
+gctgactcgaagagattcgattcctaatataggttaattagatggctgccgcgcgaagta\n\
+aaacgtgaaaaacgtagtgcgcagatctgcataactcgcgcttaattacttatgagtagt\n\
+tccaagttcgctacgttatgagagagattggaattaagcaaatatgttttatggtgattt\n\
+tgggatgagaaggactgctaagtacggctactaaacaaatttctaaaaccgccatctacc\n\
+ttatcttggagacatttaagttgtatatgtcactagtctagcttttgtctgtgggacgcg\n\
+ttctcggaatgagggaaatgcaagagccgattcatcaaatgcttatctaagaaagtagtg\n\
+gactattacaccaagcacgaatgccagggaactgctttcttgctcaggacctcgcgacaa\n\
+ggtaccccgcataagtcctagaattacatttggtcagcaatgctgacatttgaccgtgaa\n\
+aacataattttaatcagaaggcagctcacccgcttgctctagatcttatctttgtatgaa\n\
+tgtcagaatttactgcaatatccgttccgaatagtgagggcttagtatagttctctgtat\n\
+acaggtcacatcaaactccccctgtcctagtacagctctgagctttaattaattgcatac\n\
+atttccttcaatcatcagatgaaaacaccgcgaatcatgctcttctcgtatagggcaaga\n\
+gaagcaacaaacaactagcccgactcacgttcatccgccgtatccttgttcagttcttac\n\
+tccgtattaggtcagcgaaatctaatcagaataatcggtcgcgtatcaaaattaaaatcc\n\
+cgcttgaggttgacaattaaaacgctgagcagttatcggctattagatagtggggtgaaa\n\
+gtaattggctggaattatgttaaaacgtgatattaagctaaaatacgctacttgttgccg\n\
+acctaattcagtcattcgatattcagttagagccaagaataacaagcttgtataaattga\n\
+acggggtgcactaaacgatgtgttactctaatattcagcttggagtatacctgaaggcga\n\
+attcatgtatcggccaataataagacgttgaagatcacaatttggactagcaaaagaagg\n\
+tgatttatgcgtggggattgagtccactgtacgagtacggtctctggaaaattataggtt\n\
+cagggaatataaggaagtaaagataattaccaagagatttttggtatcgctatgacccag\n\
+aggtgttctaacgtctgttttgatccgcagaatttctgcctcaatgcatatttgacggac\n\
+ttgaactagagcctctaaagttaaatggcgacgcaactgttcctaaacttcaattattac\n\
+tactctttttttcctagggtattgtagaggccagtggacaaaataaatcaaatttaagat\n\
+gtttcggacattaacatcccccgtagcatagaaatcatcagttatccaatctctcatcga\n\
+gcttttacaatttctgctggcgctatggacagcatatgccgcgagacctccgcaagactc\n\
+acttgatcactgtaagtatcttcattagaggttagagcctatagttaagctgctgaccta\n\
+gtaaaattggtattttctaattttattgctcaagttaaaggttagtgaagggataatgac\n\
+gttatttttgaacaatgggttgtattcaattttatatcacgaatggaacccttcattccc\n\
+ggcataatactagacgacacgaacaagctccgatctatcagccaggcacgtgttaaggtt\n\
+taattccggcaaaccaatgaagcatcaaaaggtgacctgatgcaacttagggtcacgatg\n\
+agtttttcaggactacttattacctattaataagttaacatgagccttcataccccgtaa\n\
+gacaatacatactccaccaattagaattctgagccatcttatctttttgtatcatcgaag\n\
+ggtatggccgaataggttaattagttactcctaacgtctctacaggcatgcatttgacgc\n\
+accttcgaaaatagtcaatctctcgccacacgcgtctagtatgcagcatcaaaaatatag\n\
+tccacggtttccggattaccaaacgcggcaaagagaaacattgtatcgacggagataact\n\
+taatacagaaggaaggggcatcttcgaatacggatgaataattctatctgtttattctga\n\
+catcttgttttcaggttaatcttacgcattcaaatgacgcctgccccatgcgtgcgcaat\n\
+tattttctaatattgacgagagcaatctcactccttttgggtctatttatgttttattga\n\
+ggcacaagcctatacagaacaggtactattaaggccgtgagtgtgagactcaaaccgtgg\n\
+aaacaaaggatgggttgttcttggtacaagttttagtgcatgtgggcaatccttaccaaa\n\
+atcagatgctatccttaactttgggctgcatttaagatggcggttggaggcctgtgagaa\n\
+tcctgcgtgtcatctttaatgaccgaattcatccatgtagattcagatcacacactcatt\n\
+ccttgatgttgtctaaacaaaagttgttgtggacgcattggagggagttaagtaacaact\n\
+tgggatcgcatacttataaaaattatatgttaaactttcacaaacgctgaagtccaaagt\n\
+aactagcccaaacgcctcgagagtcactaggtattaatggtgtttgagttcctgtgaaat\n\
+agtgttcgaaggtaaaatttatgtaccaaatcgaaagaacacttaataaggcttgcttgc\n\
+acggaggtatgatgtttactgactctacaaccctaattttccagtacgtacattcattcc\n\
+aataggttagttctcaaagtgctatacaggctcctcaattgatgatatgcttcagccgct\n\
+ctatggatattagctcattttatttaggaagcccgcttagaggcttactatgagggaaat\n\
+gccaaaatgtcatacttttcggtgtgtcccatatgacaccgctttacatagaatttgaat\n\
+taaaacgcgctctcccgttcactaccatacttggtaccgtgcgcatattacatatagata\n\
+taggatcattttttaaagctgtactaggtttgatcgacaatcttatgctatactatatga\n\
+tgtaaccctcataatcaataccgatcgtacgatcctagcataggtggcaagcgattttat\n\
+gccgattattgtgttaaatagtctgtgagtgtgattatcagggctacgttggtagagggg\n\
+ttgtatagacctcgcacacattgtgacatacttaacaatatacgaaaactgatataataa\n\
+atccccttacccaaacaccaatcccgttgaatcaactaccataacgtctcccatataaat\n\
+tgcctacttgtttgcataaatctgaatacataacaccattgcaccttcttgtgttccaat\n\
+cccgttaagattgccttgtcagatgatatgcaagaacaatagcatttgctagcaattatt\n\
+aacagctcttcgaattgcctccacataacgcgggagggtatattttaatttggcaaatac\n\
+taagtactgttggcgtcatatgctattaacggttggatattaagttatgtcagccgtaag\n\
+caagagtgggcgaaatattttgttacccagtgagagcactcttagagtttggatacaata\n\
+ggccatatgttgacttaagaggacgtaactacgccgtacaccattgttcaaccgacttct\n\
+tggcaaatagaatcgtattagcaatcttaagaatagagacacgttcgtgttagggtatac\n\
+tacaaatccgaaaatcttaagaggatcacctaaactgaaatttatacatatttcaacgtg\n\
+gatagatttaacataattcagccacctccaacctgggagtaattttcagtagatttacta\n\
+gatgattagtggcccaacgcacttgactatataagatctggggatcctaacctgacctat\n\
+gagacaaaattggaaacgttaacagcccttatgtgtacaaagaaaagtaagttgttgctg\n\
+ttcaacagatgatagtcatgacgcgtaacttcactatagtaaattgaaacaaatacgcaa\n\
+tttagacagaatggtacggtcatgaatgacagtaattcgaagtgctagaccaacttaaaa\n\
+taggtaaacgtgcccgaaaccccccttaacagaaagctgctatcatggtgcagtatcgac\n\
+gtgttcagaaacttgtaacttttgagcaggtccgagcacatggaagtatatcacgtgttt\n\
+ctgaaccggcttatccctaagatatatccgtcgcaaactttcgatttagtcccacgtaga\n\
+gcccaagcgttgtgcgactccacgtgcatgcccagaaatacgagtttaaatttggttaca\n\
+tggttaattttgaccgaagcatcgcactttatgattgataattggattcaatatgtcgcc\n\
+ctatgcgaatgcaacatgatccacaatttggctataagacgtttaatccgtatcacactt\n\
+tgtttgcggctagtatagtaacgcccgtgcaccaagagtcagtaacaattataagtactc\n\
+cgcaggtacttcaaatataaaaactaatcaaacacgacccatatgatcatctgaagatat\n\
+ttggaactttctcgacaaccaccctcgtactcaatacttacactaatcgacaggcacacg\n\
+caacgtgtacagtcgcaccatattgagtcaagatttgcttagtggcgatgagcgtacacg\n\
+cttatttctctagtcacaattagttatctacgagacatcacgagggagcaaataagcgat\n\
+gttatggctacacataggcacgtatgaatatgatataagccagttaaacagtcgaaccat\n\
+cgagcaaattctcatgcaccaacccacacgttgaggcacaaagagtaagctgtttgaatg\n\
+taacttcttctgctgagcgggccccaacgtaaggatcaactagaagagaaaactcggtat\n\
+tagtttaaatgcgtcacggagcatgagtgcatttcactaagaatgtctgtgtaaccaata\n\
+taacatctatttgttatctgattgcctacttatggctttgcggtcgtggcgactaatgtc\n\
+tccaatccttttgaggtcggtaccaactccctttaaattacgctgtgcaggctcatgcac\n\
+tgcatacatatacggtagcaggtagggacctcacgcacccttattataatcaatagtagt\n\
+tatcagtcaacgaggcaggaatgctgaggtcgaggtgttggtatattttctatgtgccgt\n\
+ctaggcgactatcacgcattaccaggcgagatttaagccaattttgaatatagtcaacgt\n\
+aatttttactatgggttccaccgaaacgccttgcacaactaagaatcccataaaatatcg\n\
+atatcaaataaaagattgtgtcaataccttcatatatattttttcggttgactaacgtga\n\
+actaaggttaggggttttgtatgtctatataggaaacagtttcttttctgtcctacttta\n\
+gtaaagtcttcaagccttactccaaaatcacggtgattaagccgttactcagcagcatga\n\
+ttctgcctgctcgggtcctaaaatccagccttgtaagagtcgctgtgtattagctaggga\n\
+gacctttgttaaaaaggatatatcgcggcgggatgtgagtgcgtggcgcatactcaatct\n\
+tcagctcgtgtcattataatatctctcccccacgcttttcactagatatgccgtgtaagc\n\
+aaacaccttatgcttaatttcgaaaatattggtacttgaaaaaagctgtaggggtactta\n\
+atgtctggtaggagatcaggagagaattgagtgtaaaaccgtaaagccctcacctgactt\n\
+catgtaaatggcttagaagactccatgatttaataaatactacgaaggaaagactggatc\n\
+taaagataactctagtaaggccaactcccttcaatgctgttgccagttataatccaagag\n\
+ctgtccttttctgaaccatagcggcttctgaagcgaactagaagcaaagttggttctagc\n\
+cagacagccacataccctgtacgggtgtattactaaaactggtccggtattagttcacca\n\
+agggaggaattaggcaaaggatctaggtatgcaagtcggagtattacatccctaccctga\n\
+atccatcaataggttcctctgtactggccttcgcaatgagtattcaaggttgtacagccg\n\
+tataataataagatagtgactatgaacgggaagtaacccgctcaccttccccaaaacatt\n\
+gttatatctaagtattaaagtctgccgtagtgttaatactcgaaaataaacaactggcaa\n\
+attacaccgcacttaagccgcttttgatttatatttttccaatgcgcttttaaaaataat\n\
+tcagtcctacatactaattaagacccttaaacggagatatcacaagttaagttttaacca\n\
+tctcgactaggtggaactatagatacccaactcaatttatcattacctgtaatgttccta\n\
+gaaggattgcatttcatgtcaagacggtggagtttcacagcgaaacttcagtgtgaacag\n\
+attctgagaaatcacctaaacctattagtcagagcacccggttagaaccagttgtcaaaa\n\
+aatagagcggttgcatgagacagaagtaacgatgagatccgttgtaacgttgagacatct\n\
+ggcctatcgtcaatacagtcctcccttaaaaatatttttaaatactaggcaaacccaaca\n\
+taggttagtcctatgtgatacgccacatggtatatcattttgtaacgttacctagggata\n\
+atcaggaagtggaattacgcaaaagtagacagtgaaatgcttagggttatagtctagtcc\n\
+aaagataaaggataaagcacgtcagagaactatattagccgaatgggaatcattgttagg\n\
+agactgtggatcatgtctaaaaagcaacgcagaaacagtcatcgaaaaaatctcgttttt\n\
+gtttgaatctaaaagagctttgatgaccgatagtacctgtatactagttactgtattacg\n\
+tgtctaatgatttcggattggggtccccagaatcagacgtcattgtagacgattcaagtt\n\
+taccaatttaatttcccagctctccttggagaactatcgccaataattgcagtcactttc\n\
+cttttctgaaacgataaagccgtcagagttctctgcaacgttggacttacctgaggttct\n\
+aacccactttcggttctaatagtagttaacgacacaacgaataacctttactgtggggct\n\
+ttcacgatattttttcgcttattattaatggttacgtcataagctggtgtccaaattaag\n\
+gttaccggcttcgcagagtagttgtatccaagtataacttccctaatcataagatcgagg\n\
+tagaaaattaatgctgtctctaaccgaacagatatgtcccactatgtggtatggacgttg\n\
+ctaattacttctgaagggaaattggtcattatggatacgtgtctaccatcaggtcggacg\n\
+cagatatggttctgtcttcagttgatccaccgttctttataggataataactgacgatta\n\
+aagattatggtaaatagattaagccaattctcttcttgtcagtgaagcatccttaactga\n\
+cttgctctgcagcccctcatacatttagctattcaaagtaccggctcgtttcaaactctc\n\
+ccacctttggaagaggttgtcaacttgataagtatatcatttacagcattttttcggacg\n\
+tacctctaatgtttcattgcagaaaattagttttttctatcgcacattttgcaagtaacg\n\
+ttagagacacaattatctgcgaatgaactgctagatctgacgaccgggagcctcgcaaat\n\
+atcaaaaaagactgacatatatcaaggagtcgttgacaagtgctggtaagtcaattggtt\n\
+tatctgtcccggcgtttcgatcttaagctgaccatgcacggcagagtaatgtcactctcg\n\
+ttcttacaagtctgtctccaagggtcggcaaaaaagacccctccattctcgagcccactc\n\
+acgatatgtagggacgacaacttgtgcggcttatgaattgtctggactgcgggcgagggt\n\
+ccatatctccgaagttagaagggacatacctttagatgataagatcaattcttattgacg\n\
+aaattcatccacaacggggaacaacttcaccctagacttacgtctgaaaagacacctagc\n\
+gtcttataaaaggtcagtgccccgtttcgtaaggctggaattacctacgcaaacttaaac\n\
+ctcgcgcccttccttacgtatcgacaagatagaggctatcgcgaatgtactacggaggca\n\
+tgaatcatatactagaaccaagtgcctgtgatattaacaagatgatccgacgcgagcacc\n\
+gtaattctaggcataaaactccagcaatttgggggccgaaaacaaatgacgttagctaat\n\
+taattatatgacatgatcaaaggaggtcaatcacgcatcgagttcgacgtatattcattg\n\
+aacttcgtgcgtttgaaagaaacttttatgaaggcaaaattgatcctgtctcctatttca\n\
+tgcgtacctcctagttgataattccccgagcagtggttaggacacttttgtcggtatcaa\n\
+gttccggtctcaaaacgtaaaattctgtaatctgtatggatggtctgtgaattagttaat\n\
+ttttatgaagtcgtcgagacgcagttcctattgatttattctaaacggagatgtgcttcg\n\
+tgggactcggaagtagatctgtgtttatgattattgctactttagatgctgactgttaac\n\
+tccgtgttgtttttcaaccgtatatcacaaccgaattggatagaacctatagtttcaagt\n\
+tctgccacaaggtatcatatttacagttagtgctggttgcttctttcaaacgtggtgagt\n\
+ttgtgctatcacgtcaacggtagagctcagtggaccgagtgcgcgttcaaccctgttcca\n\
+gagagggtgtgatagcacatataccacgctcgtcgaggcgttcatgatagtttgcaagag\n\
+ccggtgttaaacacatattattattgttatccaactaatcggacctatgcataaagcatt\n\
+gtctaaacagaataattgcctatatacggtagttttagtgatttatatcttagtatcagt\n\
+tagagcttcgaactcttcaggttcctcatatttaacgttcttcgaaagcgaaaacttcta\n\
+caaacgaatgtaagcggttttccaagtagtacctataaatcacagaaagatctgtctcag\n\
+tatagttgaaatggtattcagctagtgacgtgtaccaattatcatagttcactcaagcaa\n\
+gacgctcattaacgaatatagacaagacactatatcatataataaaaaagaacatggtgc\n\
+tcgaacatagttgaattcaccatattgaaggggaatgctgacatgtaattcgctactaga\n\
+cgatcaattccctacttgtcaaagttgaactggtacgttcttggaattaaatatgattgc\n\
+gctggaccaaattgcgacttcttgagtttcagggcaaacgattgagccggaggatgtccg\n\
+tctcttacctttcttgcttatgataaacgacggtccctgtacatcactgggaattctcag\n\
+caaaaataattgggtaaatcgagactcgatgtattcggccacaaaggtgttagacgttaa\n\
+agattattcaacggggcgataataggatcataaccggtatgcaagcgcattgaaagagcc\n\
+atgagatccttatccgataaacgctgcacggtatgtgcagccttattgtcgatcacgaat\n\
+ttataaatgtagtctgggctgtaagttgaagacctaagttataatgaagtgcaataccaa\n\
+atcgattcatagtggattatcagactcaagatatctcctgataaattacagttgttaaga\n\
+tacggataaaatgagatttaagattagcagcctctaatctgtttcaatcccgttggaatg\n\
+tggtatgcgatcaaggttaagttaaaatcaagcctgtcttcagtcttgattcttgttctg\n\
+ccatcgcatgcggtctacgtgagttaatatgtagcttacgttctagcttgtgctaatctg\n\
+agtatagattcgtagaggaatattatcaagcttccacgcctcaacgtacgtgtattggtc\n\
+acacaagacactaaaagtggaagtagcgtaaactatagtctagttgttaaatgctcagtt\n\
+cttgttatattcgatatactcttggctaatttatgtctgagtatataaaattaatgatat\n\
+taacttgcatttcacggatcccttagaaaaagattttgaccgagcgcattataaacggtt\n\
+acaccgaatcaatagaagcatacccaatagctttctttgaatttattgcctgcgcaactt\n\
+ggctgactctctagatccgaataattctatatggtcgtgacgaaactagttcattactgt\n\
+ttaaaatgccaacatgtcttttgggccgataatggctctttgcaaaattactcaatgata\n\
+cgattgatcaaagcggtagttgctagtggtagcatgtaagtctatcaaatgtctgattat\n\
+ccgaaaatcttccaaaagagtccacgtaccatatctatctcatagcgacgcgaggggaac\n\
+cttatctaactatcattccatttaccgggtgactctcgatgcaggatccgattgggataa\n\
+attgcccagaaatggctcattcctgactaagggtaaggccgttctcagcaagggaacccc\n\
+gcgaatctaggcttataccatctagattgttaactacttgcctgtagttctacagccata\n\
+ctggacagttgtttctaaatgatcgggattcatgctagcactcctctgaatgcaccgcgt\n\
+aagtttaactattacgtccgtgggcagataaggatggaggctgtatgtatcttaactgtt\n\
+acctaatatggctggtaattatcaaagtaaggaccttaatgccatagcgctagcaatcgc\n\
+tttgtatactgaccatgtgccaacctctcttaatctgtaaaatataatgtcttagctaac\n\
+tgtggacgatcatgtctctgcctagagcttcgctgtatcaattcctatagccagcgtact\n\
+agtgacacaacaacaccgtgtgagaaaagatattagtccttacgtctgtctctctacagc\n\
+ttattgatgaggattgaacatggacatatagctccccctcaaaagcagatgctacctctt\n\
+tattccattctcgaacatttgccgaacttaatttcgacaaacctgaggtcacgtcttaat\n\
+ttatcggtaacgtcacgtccctttgagactggataaatatattaccaggggccaacgagc\n\
+aattgttggaggcgcttctataatacaaggtgtcttgtcaaagaaagacggcgtgcgtct\n\
+cgtgcaactcacttaaccaatattaatgtgaaacccccctctctcacatcttatgcggtg\n\
+tactgccctggtacatttcctgtacaggactccaacagtgtagattcctaagatagctgt\n\
+tggagttgcctcacgccagatcgaaaaactgaataaactagtgagctgagctgcagaaat\n\
+accgcttaattacttatgactagttcaaagggacctacgtgatgtcagacattgcaagga\n\
+agaaattaggtttgtgcgtcattttggctggactagcactccttacttcccctactattc\n\
+aaatgtcgtaaacagcatgagacaggatcgtgctgacatttaaggtctattgggaacgag\n\
+gctacctttggtcgcgcgctcgcgttctccgaatgaccgaaatgcatgagcacagtatgc\n\
+aattgcttatagatctaaggtctggtcgttgaaaccaagcacgtaggcctgggaaatcag\n\
+ttcttcctcagcaactacacaaaagcgtccaagcattagtacttgtagtaaatgtccgaa\n\
+cctatgcgctcatttgaaagtcaaaaaatatttttaagcagtaggcacctaacccgattc\n\
+ctctacttagtagctttctttgattctcagaattgactgcaatatcactgcacaattctg\n\
+tgccattactagacttctctgtattaacgtctcatcttactaacactcgcctaggacaca\n\
+tctgagagtgaagtatttcaatacatttactgaaatcttcagttctaaaatccccgaata\n\
+aggctcttatcggtttggccaacacaagaaaaaaacttcttgcaccactcaccttcatac\n\
+gcaggagcctggggaacttagtaataactatttcggcagacaaagcttataacaagttgc\n\
+cggcgcgtataatatttaaaagaccccttgagctgctcaattaaaacgctcacctggtat\n\
+aggctattagatagtgccgtcttagtaaggggcgggaattatcggataaactgatatttt\n\
+gataaaataaccgacttgttcacgacataagtcactaaggagattttatctttctccaaa\n\
+gtatatcttccttggataatttcaaagcgctgcaatttaagttctgttactagtttatgc\n\
+tgctgggaggtgaccggaaggcgtagtaatctagaggcaaattataagaagttcatcata\n\
+tcattttcgactacaaaaacaaggtgttgtatgccggcgcattgtgtaaactggacgagt\n\
+accctagatggaaaattatacgttaagccaagatttcgatgtaatgataattacctacac\n\
+atttttgctatccataggaacaagagctgttctataggctcgtggcatacgaacatttgc\n\
+tgccgctatgaatattggaagctcttcaactacagactctattcttaattgccgtcgaaa\n\
+atgggccgaatcggctattattaatactcggtttttccgaggggattgttgtcgacagtc\n\
+gtaattattattaatattgatgttggtgaggtcatttaaatacaaccttgcagacaatga\n\
+ataagggatccaatctctcatactccttttacaattgctcatgcccctatgcaaacctta\n\
+tgccgccacacctccgcaactctctcttctgaactgtaagtagcttcattactggtttga\n\
+gactatactgaagctgatgacattctaaaatggctattttcgaatgtgattcataatgtt\n\
+tatcgtttgggatggcagaatcacgttatttttgatatagcccgggtattctattgtata\n\
+gaacgtatgctacaagtcattccccgaagaagactagaagtaaacaacatgcgaccatcg\n\
+ttaagccacgcaaggctgtagctttatttcccgataacctatcttccataaatagcggac\n\
+agcaggatactgacgctcaacatcagtggttatggtctaatttttaacttttaataaggt\n\
+aacttcagcaggcatacacagtaactctttaatttataatcaaattagaagtctgacact\n\
+tcttatatttttctatcatccaacgcgatcgcccattagcttattgtgttactaataacg\n\
+tatctaaaccaatccttttcaagctactgcctatattgtcaatatatacaaacaacagga\n\
+tagtaggctgcttaaaaaatattgtcaaccgtgtacgctttacaatacccggaaatcaca\n\
+aactttgtagacaacgagtgaaatttatacactacgaagggccagcgtacaagacccatg\n\
+aattaggcgatatgtttattctgacatattggtttatccttaatctgtcgctgtaaaatg\n\
+aagccgcccccatccctgcgaattttttttcgaagattcacgactgaaatataaatacgt\n\
+ttggctatatttatgttggagggaggcaatagcctttactgttaaccgaagatttagcca\n\
+gtgagtgtgacactaaaacactggaataaatgcaggcgttcttctgggtaaaaggtttag\n\
+tcaatctcgcctataagttcatatagctctggatataattatctggcccatgcatttatc\n\
+atggcgcttggtgccctgtgtgaagccggcctctcatattgaaggtccgaagtattccat\n\
+gtacattaagatcactctctcattcatgcatcttggcttaacaaatctggttgtccaagc\n\
+tttccaggcacgtatggtacaaattcggatcgaatacttataaaaatgatatgttaaact\n\
+gtctaaaacgctcatctacaaagtaaagtgcactaaccaatagagtctcaagaccgtgta\n\
+atgctggtgcactgaatgtgtaatacggttagaagggattagttatgttacaaatccatt\n\
+gaaaacttaagaagcattgcgtgctcggagggtgcatcttttatcaagagactaacatta\n\
+ttttcaacgacgtacatgctttacaatagggtacttatcaaacgccgagaaacgcgccta\n\
+tagtgatgttatgattatgacccgatatccattggaccgaattttatgtaggttcccagc\n\
+gtactcgcgtaatatctcggtattgccataatgtaatacttgtcggtctctcccagatga\n\
+aaaagcgttacagagtatttcaatgaaaaacagcgcgcaacgtcaatacctttaggggta\n\
+acggccgctgatttcatatagatatacgataagttggtatagctctactaggtggcatcc\n\
+acaatcgttgcatttactatagctggttacaatcataatctataccgttccttacatact\n\
+accatagcgggatagcgtttttttgccgttgattgggtttaagaggatgtcagtctcatt\n\
+atatccgattcggtgggagagccgttgttttcaaatcgcacactttgtgacataatgtac\n\
+aagataacaaaactgatataagatataaactgtcaatatcaccttgacacttgaatcaaa\n\
+gtaaattaactcgcaaatataatttgactaattgggtgcagatttctcaattaataaaaa\n\
+aatggcaccggatgggcttacaagccccttatcattcacttgtatcatgatttccaagaa\n\
+caatagaatttgctagcaagtatgaacagagattcgaattgcatccacagtacgccggag\n\
+cgtttattttaatgtggatatgacgatgtactgttggcggcatttgctagtaaccggtcc\n\
+ttatttacgtagcgcacacgtaagcatgtctgggagaaatatggtggtacaatctcagag\n\
+aaagattacagtttggtttaaataggacttatcgggtcggaagtggaacttaataagcag\n\
+tacacaattgggcaacagacgtcttgcctattacaataggattacaatgcgttagatttc\n\
+agacacgttcgtgtttggctattcgtcaattccctaaatagttagacgatcaactattat\n\
+caaagtgattctttgttcatcctccattcatgtaacagatggcacactacgcataacgcc\n\
+gaggaattttaacgagatttaagagagcagttcgggcacaacccacttgactttataaca\n\
+gctcggcagcataaacggtaatatgtgacaaatttccaaacgttataagaacgtatgtgt\n\
+acttagaaaactaagtggttcatgttcaacagatgtgacgcagcaagcctaacttatcta\n\
+ttggttttgctataaaagaacaaagttacacagaatcctaagggcttgtttcacacttat\n\
+gcctagtgcttcaccatcttaaaatagcgaaaccggcacgaatcaaaccttaaaacaatg\n\
+cgcagatattggtgatggtgactccgggtatgataatggtaactgttgaccagcgcccac\n\
+ctcatcgaagtatagaaagtggttaggataaggatgagaccgaacttatttccggccata\n\
+actttagattttctacctagtacacaacatcagggcggacacgaaaccgccatcacatca\n\
+tataccaggtttaatttgcttaatgggggaagtgtcaacgaaccttcgaactttagcagg\n\
+catatggccattatatatggccccagagcagaatgctacagcagacaaaatttggattta\n\
+tgtagtttaatacctatcaaacttggtgtgaccatacttgtctaacgacagtgcacaaag\n\
+tgtaagttacaattattactactcagcagcttctgcaatgataaaatcttatcatacacg\n\
+tcacatatgataatatctacttagggggaacgggctccacaacctacatagtactcaata\n\
+cttacactattcgacaggcacaccaaacctgtacagtcccaaaagattgagtcaactttg\n\
+cagtactgcagatcacagtaatagcttagttagcgagtcaaaattagttttctacgagac\n\
+tgcacgaccgtgcaaatttccgatgtgttggctacaaatagcaacgtatgaatttgtttg\n\
+aagccacgtaaactgtacaaccttagagataagtctcaggctactaaaaacacgttgtgg\n\
+cactaacaggatcatggttgattcttacttattcggctgaccggcccaataagtaacctt\n\
+caactagaacagaataatcgggagtagtttaattcagtcaaggtgcaggtctcattgtaa\n\
+ctaacaagctctgtgtaaccaagttaaaatcgttttcttagcggattccctacttatgga\n\
+tttgagctcgtccacaatattcgatacaagaagtttgtggtccgtaacaacgaaatttta\n\
+attacgctgtgcagcctcatccaaggaattaatagaaggttgatggtaggctccgaacgc\n\
+tccatgattataatcaagtggactgtgcagtaaacgaggaaggtatcctgacgtcgtggt\n\
+gttcgtttttgttatttgtgccctatacgagtagataaaccatgaacagcacagtgtgaa\n\
+cccatggttgattttaggctaccttatttttaatttccgttacacagaaacgaattccac\n\
+aactaacatgccattaatttttcgatatcttataaaagatggtcgaaattcattcattta\n\
+ttttttttcggttctcgaaagtcaactaagctgtcgcgttttgtttctctttagaggtaa\n\
+aagtggctttgatctcctacgtttggatactagtcaaccattactccatttgatccgtga\n\
+gtatcacctgtctaacatccagcattatgactcctcggcgaagaaaagacacacttctta\n\
+gagtcgatgtgtattagctagggacacagttgtttaatacgatagtgagcccagggaggg\n\
+cagtgcgtcccccagtagatttattcagctagtgtaagtataagatatctcacccacgag\n\
+gttcaagtgatatgcagtcttagaataatacttatcctgaatttcgatattatgggtact\n\
+tcaataatccgctagcgctactttatgtctcgttggacagcaggacacatggcagtctta\n\
+aacactaaagacatcacctgaatgaatgtaatgggattacaagaatcaatgaggtattat\n\
+atacgacgtaggaaactctggatatatacagtaatctagttacgccatcgcacttcattc\n\
+ctctggaaacttagaagacatcagctgtacgtggaggaaccagacccccgtatgtagcca\n\
+aatagaaccaaagttgcttatacaaacacacccaatgacaatggaccgctggagttcgta\n\
+aactcggaacgtagtactgcacaaacccagcatttagcaataggagctacgtatgcaact\n\
+cccacgtggtaataccttcaagctatcaatatataggtgcctagctaatcgcattcgcaa\n\
+gcagtattcaagcttgtaaaccagtataataattacagaggctctatgaaacccaacttt\n\
+ccagctaaaagtcccaattaaatggttatttcgtacttttaaagtcgcccgttctgttat\n\
+tacgcgaattgattctactccaaaattaaacacaaattatcaaccgtttcatttatattt\n\
+gtcaatgcagctgtttaaaataaggctctactaaattataattaagacacttattaccag\n\
+atttctctagttaagtttgaaccagctcgactaccgcgaaagatacattcccttctctat\n\
+ttttcagttcatctatgggtcagagaagcattgaatttattctattcaccctcgtcgttc\n\
+acagcgaatcgtcagtgtgatcagtgtatgagaaatatcctaaaccgtttagtcagacca\n\
+cacgcttagaacaagtggtctaaaaagactgccctggaaggagtaagaagtatacagctg\n\
+atccggtgtatccttcagtcatctgccctatactaattacacgacgcaaggaaaaatagg\n\
+tttattttctaggcaaacccttcataggtgactccgatgtgttacgaatcatgcttgaga\n\
+atgtgctatcgttaccgacggataataacgatctccaatgaaccaaatgtagaatgtcta\n\
+ttgattacccttttactattcgacttagagataggagatagaacctcagtgtactttttt\n\
+agccgaatgggaatctttgggaggtgaatggccataaggtcgtaaatccaaccctcttaa\n\
+agtcttccatattatatcgttgttcgtggaatcgataacagatttgttgacccatagtaa\n\
+atgtatactagtttatgttgtaagtgtagattgttttccgattgccgtccaaactttatg\n\
+tcgtaattgtagaccagtaaagttgaccaaggtaagtgcccagcgatcctgcgagatcga\n\
+tcgccaatttttccagtcactgtaagtgtaggtttagataaagccgtatgagttatatca\n\
+taagggcctcggaaagcagcttcgaaccaaagttcccttataatagtagtttaactataa\n\
+aagtatatactggtctgtcgccctttcacgatttgttttaccggtttatgaagcgttacg\n\
+tcattagagcggctccaatttaaggttaacggcttccatgtgtagttgtatacaaggata\n\
+acttaaagtatctgttcagcgagctagttaagttatcctcgatagaacacaactcagagg\n\
+tcccaagatcgggtttgcaacttgctaatttattctcaaggcaaattgggaattatcgat\n\
+acctgtataccataaggtcgctcgatgtgatgcttatgtcttctggtgatcctaccttag\n\
+ttagtgctgattaacggaacattaatgtttatcgttttgagatttagccaattctctgat\n\
+tctaactcaagatgccttatctgacgtgctatgcagcccctaagtattttacattgtaat\n\
+aggacacgctcctttaaaactcgccaaaaggtcgttgtggttctctactggttaactata\n\
+taatttacagctttgttgagctagttcctctttggtttaagtcctcaatattagttggtt\n\
+cgagcgataagttggctagttaccttagtcactatattagatccgaatgttatgcttcat\n\
+ctgaagaccgccaccctccaaaatttcttttaagactcacttattgcaaggtgtaggtga\n\
+attcggctcgtttctcaagtggtgtatctgtacacgagtttccatattttcatcaacagc\n\
+caccgcacacttatgtcactctaggtattaaaagtcgctctacaaggggacgcaattaag\n\
+aaacagacatgctagtcaaaaataaacatagcgaggcaccactaattcggccgcttatca\n\
+atgggatgctctgcgcgagacgcgccagagctcagtagttagttcggacatacatttact\n\
+tcagatgatcaattagttttctacaaatgcttactctaccccgaaaaaagtcaccagact\n\
+cttacgtctctttagtatccttccgtcttatataaggtcagtcccccgtttcggtaccct\n\
+ggaatttactaagaataatgaaacagcccccaaggacgtacgtttacaaatgatagacca\n\
+gatcgcctagcttattccgacgcatgttgcatagaattgaaccaacggaatgtgagagta\n\
+actagatgagccgaccacagcacccgtttgcgtcgcagaatacgcctgatagttcggcca\n\
+cgaaatcatatgtcctttgagtattaagtatttgtaatgatcaatcgagctcaagcaagc\n\
+ttacacttcctcggatattcagggaacttagtgcctttgaaagatacgttgatcaacgaa\n\
+aaattgataatggctcatatggaatgcctacctcatagtgctgaattaacacagcactgc\n\
+ggacctaacttttcgaggtttcaagttcacgtctcaaaacctaataggctggaatatgta\n\
+gggatcctcggtgaatttgtgattgggtttgttgtagtactgaccaagtgaatattcttt\n\
+ttttctaaaagcagatctgctgccgggcactacgaaggagatctctgtgtatcattattg\n\
+cttcttgacatgatgactcttaaatcactgtgggtgtgcaaaacgatagcacaacccaat\n\
+tcgatagtacatattgttgatacttcgcactaaaccgttcatatttaaaggttgtgctcc\n\
+ttccttcgttaaatactggtgacttggtcctatctactattagctagacctctggggaac\n\
+cacgcccccgtaaaacctgtgcaagagagggggtcatacatcttagacatcgcgcctcca\n\
+ccagggaagcattgggtgattgaccaggtgtgtaacaaatatgattattcttatactaat\n\
+attagcaaagatgcataatgatttgtattaaatgtataattgaattgataagggtctttt\n\
+agtcagtgatagagtagtataaggtagacattagaactcttaaccggacgcagatttttc\n\
+ggtcttagtaagccaattagtcgacaaaacaaggtaagagcggttactagtagtacctat\n\
+aatgcactgaatcttcggtcgaagtatagttctaatgctatgcagattgtgacggcgaca\n\
+aatgttcagacttatatcatgaaacaagctcttgtaagtattgacaaatgaaaagattga\n\
+atatttttaaatacaaaatgcgcctacttattaggggaattaaccagattgaaggccaat\n\
+cctcacatgtaatgagataatagacgataaatgaaattcttgtaatagttgaactgctac\n\
+gtgatgggtattatatatgattgagatcctccaattgccgacgtcttgtcttgatgccca\n\
+aaagattgtcaacgaggagctccctcgcgtacctgtcgtccgtatcataaacgacgcgac\n\
+atgtacagcactccgaagtataagcaataataatgcgggtaatccagactagatcttttc\n\
+ggactcaatgcggtttcacggtaaacatgattaataccggagagtagtcgagcttatcag\n\
+cgatgcaagcgaattcattgtgccaggagatacgttgcagataaaaccggcaacgtatgt\n\
+caacaagttttggcgatctcgttgtttgtattcgacgaggcgcgggaacttcaagaacta\n\
+tcgtatattcaagtccattaccttttagtttcagactggtggagctgactaaagttatat\n\
+catcattttgtacactggtttagttaacgataatttcagatttaacatgaccagacgata\n\
+atcgctgtatatccagttggaatgtggtttgccagaaaggttaacttataatcaagcctc\n\
+tcttcagtcttgattcgtcgtatcccatccattgcgctatacctcagtgtatttggagct\n\
+gtagttataccgtgtgctaagatcagtagacatgacgagagcaatattatctaccttaca\n\
+agcatcaacggacgtctagtcggaacaaaagactctaaaactcgaacttcaggttaatat\n\
+actatagttctgtattcagcagttattcttatattcgatattatcttgcctattggatgt\n\
+ctgactttagtatattaatcatagtatctgccatgtaaaggtgccagtactaaatctgtt\n\
+tcacagtgcgaattataaacggttacaaccattaaagacaacaagaccctatagctttat\n\
+ttgaattttgtcaatgcgcaacttggagctcgcgatacatcccaattagtctatagggtc\n\
+gggacgattctacggcatttctggttataatgacaacatggattgtggcccgagaatcgc\n\
+tctttcattaattaagcaatcattacagtcttataagcgctacttccgagtggtagcagg\n\
+taactcgatataaggtcgcatgagccgaatagcttaaaaaacaggccaccgaacattgat\n\
+agagaataccgaccacagcgcaacctttgattactttcattaaattgtacggctcactcg\n\
+acatcaagcttaagattgcgataatgtgaactcaaatggatcagtactgaagaaccgtaa\n\
+cccacttcgcagaaagcgtacccagagaagatacgctgttacaatatacagggtgaaatt\n\
+attgcctgttcttcgtaaccatttcgccaaacttggttagaaatgatagccattcatgat\n\
+agaaataagctgaatgataccagtatctttaactatgtagtcagggggaagataacgatg\n\
+gtccatgtatgtttctgatatgtgacagtattggccgcgtaatttgctaacgaagctact\n\
+taatgcctttgagcttcatatagatttctttaatcaaaatcggcaaaaagatagtatgag\n\
+ctataatatatgctagtagagaactctggaccatcatctatatgaatactgattcgagcg\n\
+tgcaattactttagcctgcgtactactgactctacaaaacactctgagataagtttgtag\n\
+tcagtaagtcgctctctataaaccttttggatgaccattgtacagccacttatagatccc\n\
+aataaatagcacaggagacagagtttttcaatgctcgatcatttgccgatagtattttcg\n\
+tctaacctcagggcacctattatttgatacctaacctaacggccctttcacaatggagaa\n\
+atatatgacatcgggacaaacacaaatggtgggtggccaggagatatgacatggtggcgt\n\
+ctctaagaaacacggactccctctaggcaaactcacgtaaccaattttaatgtcaaacaa\n\
+aacgctcgaaaagattttgccgtgtaatgacctggtacattgactggtcaggaatacatc\n\
+actgtagttgccgtagtgtcctgttggtgttccatcaagacacatcgtataacgcaattt\n\
+acgacggacatcagatcaagttatacagattatttaagtatcacgtgtgcattgggacat\n\
+aagggatctcacacatgccttggaacatttttgctttgtgccgctttttcgctgcactac\n\
+caatccttacttaccagtatattcaaaggtcgttaacagaatgagaaaggttagggctct\n\
+aagttatcgtcgattgggatagacgagacatttgcgagcgccctccacggatacgaatct\n\
+cccatatcaatgtgaactggatgctatgcagtttagttcttacgtctcctagtggtaaaa\n\
+atcaaagtagcactcgcatagcagttattcagaacctaatacacaaaaccgtcaaacatt\n\
+ttctaattctaggtatgggccgatcataggagctaaggtgaaactcataaatgttttgtt\n\
+agatctagcatcctaaaaagatgcatatactgagtagctggcgtgcattctctcaattgt\n\
+atcctttttaactgaactagtcggtcccatttcgtgactgagatctattaaccgataaga\n\
+ttaataacactcgcattcgtatcagctcagagtgaagtttttcaataatttgactgatat\n\
+attaacttctaaaataaccctttaagcctcggatccgtttcccaatcacatcaaaaattc\n\
+ttattccaactatctacggattaacaacgtgcatggggatcgtagtaagaacttgttccg\n\
+atcactttgagtatatcaagttgacggcccggttattattgaatagaaacattcacctgc\n\
+taaattaaataccgcacatcggatacccgatttcagagggccgtcttactaagggcaggc\n\
+tttgttcggtttaactgagatgttcattattttacagtatgcttcaactaatatgtaacg\n\
+aaggacagtggatctgtctccatagtagatcttcagtcgtgaatttcataccgctcctat\n\
+ttaagttcgcgttcgagttgttgatcatggcacgtgaaagcaacccctagtattctagac\n\
+gaaaattttttctagttcatctgataatttgccaattcaaaaacaaccgctggtttcccg\n\
+gcgcattctctaaaatggaagtcgaacctagagccattatttgtcggtaacccatgagtt\n\
+ccttcttttcagaagttaatacactgtggtcctatacagaggaaaaacagcggttatata\n\
+cgatcgtggcataacaacattggatcaagatagcaatttggctacctattctaattctca\n\
+ctagattcggtattccactacaatatcggcagattaggattggatgaataatcggtgttt\n\
+aagtccggttgcgtctccaatctcctaatttttattaatattgatcttggtgacctattg\n\
+taaataaaaacttcaagactttgaataacggtgaaaagatagaagactcatttgaaaatg\n\
+gatcatccacagatccaaacattagcaagacactaatccccaactagctattctgatcgc\n\
+gatcgtgctgcagtactcctgtcacaatagtctgttcatgatctaattctttttgggctt\n\
+tgttcgatggtgattcagaatctttatccggtcgcttccctgtagctactttgtggggat\n\
+attgcccggggattatagggttgagatcgtttcctaaaagtatttaaaccaagtagactt\n\
+caactaaactacatcagaacatcgtgaagacaccatacgcggtacctttatttaccgata\n\
+acatttcttcaagaaataccggtaagcagcataatgaccctaaacagctcggggtatcgt\n\
+cgtagttttaaattttatttaggttactgctcaaggaataaaaactaactatttaattta\n\
+taataatattacaaggctcacactgattagatttgtctataagacttcgcgatcccccat\n\
+taccggattgtcttaagaataaactagataaaccatgcattttctagataaggcctttag\n\
+tctaattagatacaaaaaacacgatagttgcatccttaatttattgtgtcaaacctggaa\n\
+ccttttaattacccgcaaatcactttatgtcgagactacctctgaaatttattatctacc\n\
+taccgcatgaggacttgaaccatcttgtaggagttatgtttattagctaagattcgttta\n\
+tcctgtagcggtccatgtatattcaacaagcaaaaagcactcagaattgtttttagttga\n\
+gtcaagactgatatataaataagtttccctagttttttcgtggtgggacgatattgaatt\n\
+gaatcttaaccgaagagtttcccactctgtcgcacaataatacacgccaatatttccagc\n\
+cctgcttatgccttaatcggttactcaatctcccattgaagttcattttgatctgcatag\n\
+aagtttcgggcccagccttttttctgccaccttcctccaagctctgtagacgcactctaa\n\
+gattgatgctcacatgtattaattctacattaacataaatatataagtcatgcatcttcg\n\
+agtaaaatatctggttctccaacatgtcctggcacgtatcgttataatgcccatacatgt\n\
+agtattaaaatgattgggttaactggatattaagatcatcgaaattgtaaagtcaaatta\n\
+acaatactgtctcaagaccgtgtattcctcgtgctcggaagggctattacgcttacttcc\n\
+gttttggtatcttaatatgactttcaaaaattaagttgcagtgagtcctacctgcgtgca\n\
+tcggttagcaagagtataaaagttgtttaaacgaactacttgctttacaataccggtcgt\n\
+atatatcgccgtgaatccagaagattgtcttctttggattatcaaccgagatcctgtgga\n\
+ccgatgttttgggaccttcacagaggactccaggtagagctcgcttttgcattaatctaa\n\
+gaattgtacctctctaaaagatctaaaacagtgaatgtgtatttcatggaaaaacacaga\n\
+gaaacgtaaattactttaggccgaaaggcacatgagttattatacatatacgagatggtg\n\
+gtatacatcgaattcggggcatacactatagttgcattgtatttagctgctttaaataat\n\
+atgatattaccttccttacataagacattaccggcataccctggttttcaacttgtgggg\n\
+ctttttgacgatcgcactctcatttgatccgagtagggcggtgacccctgcttttcaaat\n\
+acaaaaatttcgctatgaaggtaatagattacttttcgctgttatgatagaaacggtaaa\n\
+tttaaaattgaaacttctagaaaagtaaagtaacgagaaatgattttgtgaataatgcgg\n\
+tcatgattgcgcaagtaagaaaaaaaggcaaaaggatgcgcggaatagaaacttatcagt\n\
+cacgggtatcttgatttcattcttcttgtcaattgccgacataggatgaaatcagattcc\n\
+aatgcaatacacagtaacccccacccttgattgtaatgtcgatttgaagttgtacgcgtc\n\
+gacgaagtggatagtatacgggccttttgtacggtgcgatcaactatgaatctcggcgag\n\
+ttagatggtcgtacaatctcacacatagaggtcacttgcctgtaatgacgaattttcggc\n\
+taggtactcgaactttattagaagtaaaaatgtgggcaaaagaaggattccattttacaa\n\
+gacgattacaatgagttacatgtctctcaacgtagtctttccctagtagtctttgaacta\n\
+tttaggtactccagaaaattttagcaaagggtttctgtgtgaatccgccattcatgttta\n\
+tgatggaacaataagaataacgccctcgtatgttatcgacagtgaagtcagcagttcggc\n\
+caaaaacatattcaatttagtacagatccccagaagttaagctaagtgctctaaaatggc\n\
+ctaaacggttatcaaagtaggtctaattactatactaacgggtgcatcgtaataactgct\n\
+gtcgatgcaacactatatgatagtgtcgttttgctatatatgtacaatgtgacaaagaag\n\
+ccttagcgattcttgcaaacttaggacttcggattctcaatcttaaatgtccgaaaacgc\n\
+aaagattcaaaaatttaatctatgagcagatatgcctgatggtgactacgcgtatgttaa\n\
+ggctaaatgttgacaaccgcacacataatcgaactattgatagtcgggagcataaccagg\n\
+tgaacgtactttgttcacgacatttattgacatgttctaaatacgtctcaaaatcacggc\n\
+gcactagaaaacgcaatcaaatcattgtcctggtttaagggccgtaatgccggtagtgtc\n\
+aaacttcatgagaactttagctggcttttggccagtatttagggaccaagagcactagcc\n\
+ttaagctgaatattttgccatttatctactgttataactttaaaacttggtggcaccaga\n\
+cttgtcgatacacacgcatcaatctgtaacgtaaaaggtttactaagaacaagcgtagga\n\
+attgagtttatattatatttaaactaaaagatgatattagcttctgagggcgatagggct\n\
+ccaaatcataaagaggaatatattattacacgattagaaacccacaacatacctcgaatc\n\
+gcccaaaagtttgacgaaacttggcagtactccacatctcagtaatacagttgggagagt\n\
+ctcaaatgttgttttattactcaatgaaccaccctcataatttcactgctgttccattaa\n\
+atttgcaaacgatcatttgctttgaagaaacgtaaaatcgacaaaattacagataagtag\n\
+atgcataataaaaaaaactgctcgctataacacgatcatcgtgcattcttacttaggagc\n\
+atcacccgcacaataacgtaccttaaactacaacactattagaccgagtactgtaattca\n\
+cgaaagctcaagctcgcattgtaaagaacttgctctctcgtaaaatgtgataatagtttg\n\
+cggagaggattcaattattttccattgcacctactccactagattcgataaaagaaggtg\n\
+gtcctcccttaaaaagaaatgttaagtaacatcggaaccataagcaaagcatgtaagtga\n\
+accgtcatccttccctaagaaacataaaggtttttaataatgtcgactgtgaactataac\n\
+tgcatcctttcctgacctactccggttccttgttgttatttctgaacgagaccagtagat\n\
+aaacaatgtaaaccacagtgggtaccaatggtgcatgtgacgctaccgttgttttaagtg\n\
+cccgtacaaacataagaagtcataatcttacttgaaattaattttgccttttattttttt\n\
+tcaggctcgaaattaatgatttgttttttttgaccttctagttacgctaatatgcggtcg\n\
+cctgtggtttctattgagtcctataacgggatgggatctaatacgtttggttactagtaa\n\
+acaaggtataaatttgataccggagtatcaactgtataacatcaagctttatgactcata\n\
+cgcgaagtaatgacacaaggctttcaggagatcgcgagtacagagccactaaggggtgta\n\
+ttacgatagtgacaccaccgagcgcactcactccccaagtagatttatgatcctacgcta\n\
+agtattagatatataaccaaagaggttctagtcagtgcaactcttagaataataattagc\n\
+cggttttgcctttttaggcctaatgcaatattcagctagcccttatgtatctcgcgttcc\n\
+acagcaccactcatggcacgcgtttaaactaatcaaatataatctatgaatgttatgcca\n\
+gtacttgaataaatcaggttttttataagtccttgcatactctcgttatatactgttaga\n\
+gtcttaccccatagaaattctttcatctgcaaacttagaagaattctcagctacggggag\n\
+cataaagtccccaggatgttgacaaatacaacaaatgtggcttatacaaacactccatat\n\
+gaaaatcgaaccctcgtggtagttttagccgaaccttgtacggataaatccctccatttt\n\
+ccaatagcagatacctatcctactacctcgtggtattaaattaaagcttgaaatatagag\n\
+ctgcatagcttatccaattcccaagcacgagtctaccgtcgtaaccacgatttgatttac\n\
+agacgctagagcaaacccatctttaaacatataagtaaaaattaaagggtgagtgcgtac\n\
+gtgtttactagcaacttcgcttattaagacaattgtttataagccataattaaaaacata\n\
+tgttcaacaggttcattgatatttgtaattgcacaggtttttaataaggatctacgtaag\n\
+tataatgaacaaactttttaccagagttatattctgtactttgaaaatgctcctctaccg\n\
+ccttagagactttcaattagattttttgcagttaatctatgcgtaagtgaaccatgcaag\n\
+ggatgcgattcaaccgcctcgtgctaaccctatcgtctgtctcataactgtaggtctaat\n\
+ataattttcagttttcgaacacataaccctttgaaaatctgctatttaatgtctcacctg\n\
+catgcactatcttctatactgctcagaacggctatacgtcactatgctccaagtgacgat\n\
+ttaaacgaagcaaggaataataggtttattttagtgcaaaacaattaagtgcggactacg\n\
+tgctctttacaataagccttgtgattgggctataggttaagtcccatattaacgatctcc\n\
+aatgtacaaaatcgacaatcgctttgcattacccggttactagtcgaattacagatagct\n\
+gttagatactcactctaattttggacaacaatcccaatcttggggtcgtctatcgcctga\n\
+agctcgtaaatccttccatcttaaacgattacatattatagacttgttcggggtagagat\n\
+atcacagttgtgcaaacattgtaaatcgatactagtttatgttggtagtctagttgcttt\n\
+taccattccccgaaaaacttgatctactatttcgacaacagtaaacttgaactaggtaag\n\
+tgaaaacagagaatgcctcatagtgccactatttgtccactatatgtaagtgtagcttta\n\
+cataatccactatgactgagatcattacggcctaggaaagcagcgtagaaaaaaagggcc\n\
+cggatattacgactgtaactataaaactagttactggtagcgcgccatgtatagatttgt\n\
+tttaccggttgtggttgcgttaacgaatttcagccgcgaaaattgatccgttaaccagtc\n\
+catctcgacttctataaaacgataaagtaaagttgatgttcagcctccttcttatggttg\n\
+catcgagagtacactactcagtgggaaatagatcggggttcctacttcagattgtattat\n\
+ctaggcaattgccgattgtgccatacctggataaaataagctacctacatgtgatgctta\n\
+tctattatcgtcatactaccttagggtgtcctgttgaacgctacattaatctttagccgt\n\
+ttgagatgttccaatggataggagtctaacgcatgatgaagtttaggaaggcagagcatc\n\
+ccactaagtatgtgacagtgtatttcgaaacgagacgttataaatagaaaaaaggtcctt\n\
+ctggttctattctgctgaactattgaatggaaagattggttgacctacgtactatttgct\n\
+tgaagtcatcaatttgacggggtgagagacatatggtgcatactttacggactctatatt\n\
+ttagatcagaagcttagcagtcttctctacaccccctcacgacataattgcttttaagaa\n\
+tctatgtttgattcctctacgggaattcggatccgttcgcatgtgcggtttatctaaacc\n\
+aggggacatatgttcagctaaagcatacgaacactttgctaactagacgtatgtatagta\n\
+gctataaatcccgacgatatttacaaaaagaaatgagactcaaatatatacatagcgacc\n\
+ctacacttattcgcaccctgatctaggcgatcctagcacccacacccgaaagtgagcact\n\
+agtgtcttccgtattaaatttactgcagttgagattttagttgtctactaaggattactc\n\
+taacccgtaataaggatcaagactcggtactagctttactatcattccctatgtgttttc\n\
+ctaactcacaagggtacgtaccagcctatgtaattacaataatgataaagacacaaagga\n\
+agtaactttacaaatgagtctccagttacactagcttagtccctcccatcttgctttgaa\n\
+gtctaaatacgcaatctctgaggatatacagcagaagaacactcataacgttggagtcca\n\
+agaattagactcatagggcccccaacatttaatatgtactgtgagtttgaaggtgttcta\n\
+ttgttaattcctgctcttgatacatgacacgtactccgtgtttaaggcttcggactgact\n\
+ttctttcataagttgagcaacgaaaatttcagaatcgataagttggattcactaactaat\n\
+acggctgattgaaaactccactccggacctatatggtcgacctttatacgtaaccgatat\n\
+aaaacttataggctggtatatcgagccttcctagcgcaatttcggatggggtttcttcta\n\
+ctactcaacaacggaatagtctttgtttagtaaaccagagctcaggacgcccaatacgta\n\
+ggagagcgctgtggagcatgtgtcattatggactggagcactcttaaatcactctgcgtg\n\
+tgctaaacgatagatcataacatgtcctgagtaaattttcttgatacgtcgcaatatacc\n\
+gttattagttaaacgttctcatccgtcatgcgtgaaatacggctgtcgtgctcagatata\n\
+ctattagcgactcatctcgcctaacacgcacacgtataaactcggaatgactgccgctct\n\
+tacatattagaaatacagactacaccacggaagcattgggtcattctcaaccgctgtata\n\
+aaagatgattagtcttataataagattaccaaagaggcagaatcatgggtagtaaatcta\n\
+ttattcaagtgattaccgtcgtgtaggcagggagtgaggacgagatggtactcaggacaa\n\
+atattaaccggacgaagtggtttacgtcgtactttcactattagtagtaaatacaaggta\n\
+acaccggggaatagtactaaatataatgatatctatcttcgggagaacgagtcgtctatt\n\
+gctttgaacattctcaaggcgtaaaatgtgctgacttatagcatgatacaaccgattgtt\n\
+acttttgtctattcaaaagattgaatagttttttatacaaaagccgcatacttatgacgg\n\
+ctagtatacagtttcatcccctagcatcaatgctatggacagtattgaacttataggaaa\n\
+ttcttctaatagggcaaatccgtcgtgatgcctattttttttcagtcacatcctcaaatg\n\
+gcactagtattgtcgggatcccattaacaggctcaaccacgagctcacgcgaggacatgt\n\
+agtccgtatctttaacgaagcgacagcgacagaactcccatggataaccaattataaggc\n\
+ccgtaatcctctagacatcgtttaccaataaatccgctttctccgtaatcatgttgaata\n\
+ccccagagtagtccagatgataaccgatgaaacacaagtctttctcaatgcacttacggt\n\
+gaacttattaccgccaacgtagctcatcaaggttgcgacatctagttgtgtgtttgcgac\n\
+gagcccagcgaacttcatcaactttcgtatattcaacgccttgtaattttactttaagac\n\
+gcctggtgatgtagattcttagataatcagtttgttatcggctgtactttaccataattt\n\
+cacaggtttcaggtcaagaagattatagctgtatatacagttccatgctcggtgcacaga\n\
+aacgtgatcggataataatcaatcgcttatgtcgtctttaggcgtatccaatacatgccc\n\
+cgataccgcagtgtatttcgacatgtaggtataccgtcgcatttgagctcgagtcaggac\n\
+gtcagctagattagattccttaatagaatataccgacctctagtccgaactaaactatag\n\
+ataacgccaacttcaggttaattgtctagtcgtctgtttgcagatgggattcttagatga\n\
+gtgagtatcggccatattggttcgagcactttagtttttgatgcataggatatgcaatgt\n\
+atagctgaaagtactttatctgtttcaaactcacattgattaaaccggtaaacctttaaa\n\
+gactacaagaaaatattcagtgagggcaattttgtcaatcacaatcttccagctagagat\n\
+acttcacaatttgtcttgaggctacgcaacattagacggattttcgcgttttattgaaat\n\
+aatcgaggggcccaagagtatccatagttcattttgtaagatttctttacaggcttatta\n\
+cagcttcttcagactcctacatgcttacgagttatatgctagcatgtgaacaatagatta\n\
+atatacaggaaaacgtacattgagagagatgaccctacacagcgcaaccgttgagtactt\n\
+tcattaaagggtaacgctctcgagacagcatccttaagatggccttattgtcaaatcatt\n\
+tgcagaagtacgcaagatccctaaccaacgtagaagaatccctacaaacacatgagacgc\n\
+ggtgaaaatagacagggtgttagtattcaatcttcggagtatcaatttcgccaatcttgg\n\
+tgagaaagcataccctttcttcagagaaagaagatcaatcataacactatctttaacgag\n\
+gtacgcacgcgcatcattacctgcctccatggatctttaggatagcggaaagtattggca\n\
+gcgtattgtgatttcgttcctactttatcaatttcacattcatatacatgtcttttatca\n\
+aaatcgccaataagataggatgagctatattagatgctagtagagttcgcgccaacatca\n\
+tcgataggaatactcaggacagcgtgataggacttttcaatccctaatactctctataat\n\
+tataactctctcttaagtttggaggcagtaacgcgctctatataatcagtttgctgcacc\n\
+attcttcagcctctgatacatacaaataaattccacagcagtaagagggtttaattgaga\n\
+catcttgggaacttaggattttactctaacatcaccgaaacgattattggataccgtacc\n\
+taaacgaactttctcaaggcagtaatataggacatccgcaataacacaaatgctgcctcc\n\
+ccaggagttatgtcttcctggaggctatatcttacacccactcactataggcaaactaaa\n\
+gtttaaatgttgattgtctaaaaaaaagatagataagagttggccggcgtagcacatgcg\n\
+aaagtgaatcgtaagctataattctctggacttgaagttctgtcctgttcctctgcaaga\n\
+aacaaacttcctttaaagctatttacgacgcacatctcagcaagttataaacatgttgga\n\
+agtttctagtcggaattcccaaagaacggatctatctaatgcattcctacatttttcctg\n\
+tctgccgatggtgccatcctattcaaagaatttcttaaaagtagattaaatgggactttt\n\
+aacaatgagtaaccttacgcctctaagggttcctcgagtgccatacaccagtcaggtccg\n\
+agccacatacacggagaacattctaacatagcattctcaactcgatcatttgcaggttac\n\
+ttctttcctatcctagtgctaaaaatcatacttgcaatcccatagcacggattaagaacc\n\
+taagaaacaattcagtaaaacatgttcgaattcttggtatgggaacatcattgcagctat\n\
+ggtctaacgcattaatgtttgggtacatcttccatcatataaacaggaagagtctgacga\n\
+cagggagtgcttgcgatcatgtctatcattgtgaaatcaaattgtagctcacatgtcgtc\n\
+tatgagagcgtgtatccgataagatttagaaaaatagaagtcgtataagatctcactgaa\n\
+cttttgaatgaatgtgaagcatatatgatctgctttaataaaactttatccataggatac\n\
+gtttccaaatcaattcaataattattagtcaaaatagataaggatgaacaacctgaaggc\n\
+cgatcggacgtagaaagtggtcccatcactttgagttgatattgttgaaccacacgttat\n\
+tatggttttcaaacagtctcaggatattgtatatacagataatccgataccagttgtctg\n\
+acgcccctcttacgtaccccaccctttgtgacgtttaaagcagttgttcagtattttaaa\n\
+ctaggcggcaactaatttggaaagaagcacagtggatatgtctaaattcttgttattcag\n\
+gcctgaatttaatacaccgcatagttaacttcgcggtagagttgttcatcatgcctcctc\n\
+taagctaccacttctatgatacaccaatagttgttctacggaatctgataattggccaag\n\
+tcataaacttccgctgcgttcaacccccttgctcgaatatccaactcgaaaagacagcct\n\
+tttggtgtccggaacaaatcagttacttcttttctgatgttaattctctgtggtcagata\n\
+cagaccaaaaactccgcggatttaccatcctccaagaacaaatttgcatcaacatagcat\n\
+tttggctacatattctaagtctcaatagtttaggttttcaactacattatcccaacatta\n\
+ggattggaggaataatagctgggtaagtccccttgcgtctacaatcgactattttttatg\n\
+aatatgcttctgccgcacctatggttattaaaaaagtcatgactttgaagaaccctgaaa\n\
+agatagatgaatcaggtgtaatggcagcagccaaagagcatataattagcaacactctaa\n\
+gaacattatagatatgatgatagcgatcgtcatgatgttatccggtcacaatagtagctt\n\
+catcagctaattcgttttgccagtggtgacttgcgctggaagaatcgttatacggtccct\n\
+tccctcttgatacggtgggggcttattcaaccgcgtggattgggttgtcatacttgcatt\n\
+aaacgatgtaaaccatctagtagtcaactatactaaatcacaaaatagtgatcaatacat\n\
+acccgcttcatggttttaaccatttaattgattaaagatattccgctaagaaccattatc\n\
+tacctaaactgatcgccgtatcctagtagtttgaaatttgatgtaccgtaatgatcaacg\n\
+aagtaaaacgttatattgtatgtagaataataggtcttggagctaaatgatgtgattggt\n\
+agtgaagacttacccttacaactttaccggtttctcggaagaatatactagagaatcaat\n\
+gcatgggctacataagcactttagtctaatgagataaaaaatacacgagtcttccatcat\n\
+gaattttttgtcgaaaaactcgaacctggtaatttaaaccatatatctttatgtcgtcaa\n\
+taactctcatatgttttatataacttcccaatcacgacttgtaactgcttgttcgactga\n\
+gctgtttgagctatgaggccgggatccggttgagctacatctatttgctacaagaaaaat\n\
+gaaagcacatttgttgggagttctggctacactcatagagaaataagtggcccgagtggg\n\
+tgcggcctgcctccatattcaagtgtatcttaaaccaagtggttccaacgctcgcgctaa\n\
+agaattaaagcctttatttcctccacggagtagcccgtaatccggttcgaaagagaccat\n\
+tgaagttaattttcatatccagtgaagtttaggcacaagcatgtgttctgccacatgcct\n\
+caaagcgctcttcaaccaagatatgattcatcctaacttcgatgaatgcgtctgtaacat\n\
+aaatatagaaggaatgattcggcgagttaattttcgccttctccaacatggcatccctac\n\
+gttcgttataaggaccatacatgtaggttttaaaggtttgcggttaatcgatatttacat\n\
+catagaaattctatagtcaaatttacaagactctagatactcactcgttgcagccggcta\n\
+ggaagcgctttgtaccttacttcccttttcgttgcgtaatatgaatttcatatagtaagt\n\
+tcaaggcactcatacctccgtgaagagggtagatagactattaaagttgtttaatagtac\n\
+gtattgatggaaatgacccgtaggagatttaccactcaatccacaagattcgctgctgtg\n\
+cattatcaaaacagtgcatgtcgaaacatgggttgggtccttcaaacacgaatccaggta\n\
+gagatacctttgcaattttt\n";
+
+dnaInput = dnaInput + dnaInput + dnaInput;
+
+var ilen, clen,
+ seqs = [
+ /agggtaaa|tttaccct/ig,
+ /[cgt]gggtaaa|tttaccc[acg]/ig,
+ /a[act]ggtaaa|tttacc[agt]t/ig,
+ /ag[act]gtaaa|tttac[agt]ct/ig,
+ /agg[act]taaa|ttta[agt]cct/ig,
+ /aggg[acg]aaa|ttt[cgt]ccct/ig,
+ /agggt[cgt]aa|tt[acg]accct/ig,
+ /agggta[cgt]a|t[acg]taccct/ig,
+ /agggtaa[cgt]|[acg]ttaccct/ig],
+ subs = {
+ B: '(c|g|t)', D: '(a|g|t)', H: '(a|c|t)', K: '(g|t)',
+ M: '(a|c)', N: '(a|c|g|t)', R: '(a|g)', S: '(c|t)',
+ V: '(a|c|g)', W: '(a|t)', Y: '(c|t)' }
+
+ilen = dnaInput.length;
+
+// There is no in-place substitution
+dnaInput = dnaInput.replace(/>.*\n|\n/g,"")
+clen = dnaInput.length
+
+var dnaOutputString;
+
+for(i in seqs)
+ dnaOutputString += seqs[i].source + " " + (dnaInput.match(seqs[i]) || []).length + "\n";
+ // match returns null if no matches, so replace with empty
+
+for(k in subs)
+ dnaInput = dnaInput.replace(k, subs[k], "g")
+ // search string, replacement string, flags
diff --git a/SunSpider/tests/string-base64.js b/SunSpider/tests/sunspider-0.9/string-base64.js
index c9f3a7b..c9f3a7b 100644
--- a/SunSpider/tests/string-base64.js
+++ b/SunSpider/tests/sunspider-0.9/string-base64.js
diff --git a/SunSpider/tests/sunspider-0.9/string-fasta.js b/SunSpider/tests/sunspider-0.9/string-fasta.js
new file mode 100644
index 0000000..14a81f3
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/string-fasta.js
@@ -0,0 +1,85 @@
+// The Great Computer Language Shootout
+// http://shootout.alioth.debian.org
+//
+// Contributed by Ian Osgood
+
+var last = 42, A = 3877, C = 29573, M = 139968;
+
+function rand(max) {
+ last = (last * A + C) % M;
+ return max * last / M;
+}
+
+var ALU =
+ "GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGG" +
+ "GAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGA" +
+ "CCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAAT" +
+ "ACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCA" +
+ "GCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGG" +
+ "AGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCC" +
+ "AGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAA";
+
+var IUB = {
+ a:0.27, c:0.12, g:0.12, t:0.27,
+ B:0.02, D:0.02, H:0.02, K:0.02,
+ M:0.02, N:0.02, R:0.02, S:0.02,
+ V:0.02, W:0.02, Y:0.02
+}
+
+var HomoSap = {
+ a: 0.3029549426680,
+ c: 0.1979883004921,
+ g: 0.1975473066391,
+ t: 0.3015094502008
+}
+
+function makeCumulative(table) {
+ var last = null;
+ for (var c in table) {
+ if (last) table[c] += table[last];
+ last = c;
+ }
+}
+
+function fastaRepeat(n, seq) {
+ var seqi = 0, lenOut = 60;
+ while (n>0) {
+ if (n<lenOut) lenOut = n;
+ if (seqi + lenOut < seq.length) {
+ ret = seq.substring(seqi, seqi+lenOut);
+ seqi += lenOut;
+ } else {
+ var s = seq.substring(seqi);
+ seqi = lenOut - s.length;
+ ret = s + seq.substring(0, seqi);
+ }
+ n -= lenOut;
+ }
+}
+
+function fastaRandom(n, table) {
+ var line = new Array(60);
+ makeCumulative(table);
+ while (n>0) {
+ if (n<line.length) line = new Array(n);
+ for (var i=0; i<line.length; i++) {
+ var r = rand(1);
+ for (var c in table) {
+ if (r < table[c]) {
+ line[i] = c;
+ break;
+ }
+ }
+ }
+ ret = line.join('');
+ n -= line.length;
+ }
+}
+
+var ret;
+
+var count = 7;
+ret = fastaRepeat(2*count*100000, ALU);
+ret = fastaRandom(3*count*1000, IUB);
+ret = fastaRandom(5*count*1000, HomoSap);
+
diff --git a/SunSpider/tests/sunspider-0.9/string-tagcloud.js b/SunSpider/tests/sunspider-0.9/string-tagcloud.js
new file mode 100644
index 0000000..d3e5a1f
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/string-tagcloud.js
@@ -0,0 +1,265 @@
+
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ Portions from:
+ json.js
+ 2007-10-10
+
+ Public Domain
+*/
+
+// This test parses a JSON string giving tag names and popularity, and
+// generates html markup for a "tagcloud" view.
+
+if (!Object.prototype.toJSONString) {
+
+ Array.prototype.toJSONString = function (w) {
+ var a = [], // The array holding the partial texts.
+ i, // Loop counter.
+ l = this.length,
+ v; // The value to be stringified.
+
+ for (i = 0; i < l; i += 1) {
+ v = this[i];
+ switch (typeof v) {
+ case 'object':
+
+ if (v && typeof v.toJSONString === 'function') {
+ a.push(v.toJSONString(w));
+ } else {
+ a.push('null');
+ }
+ break;
+
+ case 'string':
+ case 'number':
+ case 'boolean':
+ a.push(v.toJSONString());
+ break;
+ default:
+ a.push('null');
+ }
+ }
+
+ return '[' + a.join(',') + ']';
+ };
+
+
+ Boolean.prototype.toJSONString = function () {
+ return String(this);
+ };
+
+
+ Date.prototype.toJSONString = function () {
+
+ function f(n) {
+
+ return n < 10 ? '0' + n : n;
+ }
+
+ return '"' + this.getUTCFullYear() + '-' +
+ f(this.getUTCMonth() + 1) + '-' +
+ f(this.getUTCDate()) + 'T' +
+ f(this.getUTCHours()) + ':' +
+ f(this.getUTCMinutes()) + ':' +
+ f(this.getUTCSeconds()) + 'Z"';
+ };
+
+
+ Number.prototype.toJSONString = function () {
+
+ return isFinite(this) ? String(this) : 'null';
+ };
+
+
+ Object.prototype.toJSONString = function (w) {
+ var a = [], // The array holding the partial texts.
+ k, // The current key.
+ i, // The loop counter.
+ v; // The current value.
+
+ if (w) {
+ for (i = 0; i < w.length; i += 1) {
+ k = w[i];
+ if (typeof k === 'string') {
+ v = this[k];
+ switch (typeof v) {
+ case 'object':
+
+ if (v) {
+ if (typeof v.toJSONString === 'function') {
+ a.push(k.toJSONString() + ':' +
+ v.toJSONString(w));
+ }
+ } else {
+ a.push(k.toJSONString() + ':null');
+ }
+ break;
+
+ case 'string':
+ case 'number':
+ case 'boolean':
+ a.push(k.toJSONString() + ':' + v.toJSONString());
+
+ }
+ }
+ }
+ } else {
+
+ for (k in this) {
+ if (typeof k === 'string' &&
+ Object.prototype.hasOwnProperty.apply(this, [k])) {
+ v = this[k];
+ switch (typeof v) {
+ case 'object':
+
+ if (v) {
+ if (typeof v.toJSONString === 'function') {
+ a.push(k.toJSONString() + ':' +
+ v.toJSONString());
+ }
+ } else {
+ a.push(k.toJSONString() + ':null');
+ }
+ break;
+
+ case 'string':
+ case 'number':
+ case 'boolean':
+ a.push(k.toJSONString() + ':' + v.toJSONString());
+
+ }
+ }
+ }
+ }
+
+ return '{' + a.join(',') + '}';
+ };
+
+
+ (function (s) {
+
+ var m = {
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '"' : '\\"',
+ '\\': '\\\\'
+ };
+
+
+ s.parseJSON = function (filter) {
+ var j;
+
+ function walk(k, v) {
+ var i, n;
+ if (v && typeof v === 'object') {
+ for (i in v) {
+ if (Object.prototype.hasOwnProperty.apply(v, [i])) {
+ n = walk(i, v[i]);
+ if (n !== undefined) {
+ v[i] = n;
+ }
+ }
+ }
+ }
+ return filter(k, v);
+ }
+
+ if (/^[\],:{}\s]*$/.test(this.replace(/\\./g, '@').
+ replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g, ']').
+ replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
+
+ j = eval('(' + this + ')');
+
+ return typeof filter === 'function' ? walk('', j) : j;
+ }
+
+ throw new SyntaxError('parseJSON');
+ };
+
+
+ s.toJSONString = function () {
+
+ if (/["\\\x00-\x1f]/.test(this)) {
+ return '"' + this.replace(/[\x00-\x1f\\"]/g, function (a) {
+ var c = m[a];
+ if (c) {
+ return c;
+ }
+ c = a.charCodeAt();
+ return '\\u00' + Math.floor(c / 16).toString(16) +
+ (c % 16).toString(16);
+ }) + '"';
+ }
+ return '"' + this + '"';
+ };
+ })(String.prototype);
+}
+
+var tagInfoJSON = '[\n {\n \"tag\": "titillation",\n \"popularity\": 4294967296\n },\n {\n \"tag\": "foamless",\n \"popularity\": 1257718401\n },\n {\n \"tag\": "snarler",\n \"popularity\": 613166183\n },\n {\n \"tag\": "multangularness",\n \"popularity\": 368304452\n },\n {\n \"tag\": "Fesapo unventurous",\n \"popularity\": 248026512\n },\n {\n \"tag\": "esthesioblast",\n \"popularity\": 179556755\n },\n {\n \"tag\": "echeneidoid",\n \"popularity\": 136641578\n },\n {\n \"tag\": "embryoctony",\n \"popularity\": 107852576\n },\n {\n \"tag\": "undilatory",\n \"popularity\": 87537981\n },\n {\n \"tag\": "predisregard",\n \"popularity\": 72630939\n },\n {\n \"tag\": "allergenic",\n \"popularity\": 61345190\n },\n {\n \"tag\": "uncloudy",\n \"popularity\": 52580571\n },\n {\n \"tag\": "unforeseeably",\n \"popularity\": 45628109\n },\n {\n \"tag\": "sturniform",\n \"popularity\": 40013489\n },\n {\n \"tag\": "anesthetize",\n \"popularity\": 35409226\n },\n {\n \"tag\": "ametabolia",\n \"popularity\": 31583050\n },\n {\n \"tag\": "angiopathy",\n \"popularity\": 28366350\n },\n {\n \"tag\": "sultanaship",\n \"popularity\": 25634218\n },\n {\n \"tag\": "Frenchwise",\n \"popularity\": 23292461\n },\n {\n \"tag\": "cerviconasal",\n \"popularity\": 21268909\n },\n {\n \"tag\": "mercurialness",\n \"popularity\": 19507481\n },\n {\n \"tag\": "glutelin venditate",\n \"popularity\": 17964042\n },\n {\n \"tag\": "acred overblack",\n \"popularity\": 16603454\n },\n {\n \"tag\": "Atik",\n \"popularity\": 15397451\n },\n {\n \"tag\": "puncturer",\n \"popularity\": 14323077\n },\n {\n \"tag\": "pukatea",\n \"popularity\": 13361525\n },\n {\n \"tag\": "suberize",\n \"popularity\": 12497261\n },\n {\n \"tag\": "Godfrey",\n \"popularity\": 11717365\n },\n {\n \"tag\": "tetraptote",\n \"popularity\": 11011011\n },\n {\n \"tag\": "lucidness",\n \"popularity\": 10369074\n },\n {\n \"tag\": "tartness",\n \"popularity\": 9783815\n },\n {\n \"tag\": "axfetch",\n \"popularity\": 9248634\n },\n {\n \"tag\": "preacquittal",\n \"popularity\": 8757877\n },\n {\n \"tag\": "matris",\n \"popularity\": 8306671\n },\n {\n \"tag\": "hyphenate",\n \"popularity\": 7890801\n },\n {\n \"tag\": "semifabulous",\n \"popularity\": 7506606\n },\n {\n \"tag\": "oppressiveness",\n \"popularity\": 7150890\n },\n {\n \"tag\": "Protococcales",\n \"popularity\": 6820856\n },\n {\n \"tag\": "unpreventive",\n \"popularity\": 6514045\n },\n {\n \"tag\": "Cordia",\n \"popularity\": 6228289\n },\n {\n \"tag\": "Wakamba leaflike",\n \"popularity\": 5961668\n },\n {\n \"tag\": "dacryoma",\n \"popularity\": 5712480\n },\n {\n \"tag\": "inguinal",\n \"popularity\": 5479211\n },\n {\n \"tag\": "responseless",\n \"popularity\": 5260507\n },\n {\n \"tag\": "supplementarily",\n \"popularity\": 5055158\n },\n {\n \"tag\": "emu",\n \"popularity\": 4862079\n },\n {\n \"tag\": "countermeet",\n \"popularity\": 4680292\n },\n {\n \"tag\": "purrer",\n \"popularity\": 4508918\n },\n {\n \"tag\": "Corallinaceae",\n \"popularity\": 4347162\n },\n {\n \"tag\": "speculum",\n \"popularity\": 4194304\n },\n {\n \"tag\": "crimpness",\n \"popularity\": 4049690\n },\n {\n \"tag\": "antidetonant",\n \"popularity\": 3912727\n },\n {\n \"tag\": "topeewallah",\n \"popularity\": 3782875\n },\n {\n \"tag\": "fidalgo ballant",\n \"popularity\": 3659640\n },\n {\n \"tag\": "utriculose",\n \"popularity\": 3542572\n },\n {\n \"tag\": "testata",\n \"popularity\": 3431259\n },\n {\n \"tag\": "beltmaking",\n \"popularity\": 3325322\n },\n {\n \"tag\": "necrotype",\n \"popularity\": 3224413\n },\n {\n \"tag\": "ovistic",\n \"popularity\": 3128215\n },\n {\n \"tag\": "swindlership",\n \"popularity\": 3036431\n },\n {\n \"tag\": "augustal",\n \"popularity\": 2948792\n },\n {\n \"tag\": "Titoist",\n \"popularity\": 2865047\n },\n {\n \"tag\": "trisoctahedral",\n \"popularity\": 2784963\n },\n {\n \"tag\": "sequestrator",\n \"popularity\": 2708327\n },\n {\n \"tag\": "sideburns",\n \"popularity\": 2634939\n },\n {\n \"tag\": "paraphrasia",\n \"popularity\": 2564616\n },\n {\n \"tag\": "graminology unbay",\n \"popularity\": 2497185\n },\n {\n \"tag\": "acaridomatium emargination",\n \"popularity\": 2432487\n },\n {\n \"tag\": "roofward",\n \"popularity\": 2370373\n },\n {\n \"tag\": "lauder",\n \"popularity\": 2310705\n },\n {\n \"tag\": "subjunctive",\n \"popularity\": 2253354\n },\n {\n \"tag\": "subelongate",\n \"popularity\": 2198199\n },\n {\n \"tag\": "guacimo",\n \"popularity\": 2145128\n },\n {\n \"tag\": "cockade",\n \"popularity\": 2094033\n },\n {\n \"tag\": "misgauge",\n \"popularity\": 2044818\n },\n {\n \"tag\": "unexpensive",\n \"popularity\": 1997388\n },\n {\n \"tag\": "chebel",\n \"popularity\": 1951657\n },\n {\n \"tag\": "unpursuing",\n \"popularity\": 1907543\n },\n {\n \"tag\": "kilobar",\n \"popularity\": 1864969\n },\n {\n \"tag\": "obsecration",\n \"popularity\": 1823863\n },\n {\n \"tag\": "nacarine",\n \"popularity\": 1784157\n },\n {\n \"tag\": "spirituosity",\n \"popularity\": 1745787\n },\n {\n \"tag\": "movableness deity",\n \"popularity\": 1708692\n },\n {\n \"tag\": "exostracism",\n \"popularity\": 1672816\n },\n {\n \"tag\": "archipterygium",\n \"popularity\": 1638104\n },\n {\n \"tag\": "monostrophic",\n \"popularity\": 1604506\n },\n {\n \"tag\": "gynecide",\n \"popularity\": 1571974\n },\n {\n \"tag\": "gladden",\n \"popularity\": 1540462\n },\n {\n \"tag\": "throughbred",\n \"popularity\": 1509927\n },\n {\n \"tag\": "groper",\n \"popularity\": 1480329\n },\n {\n \"tag\": "Xenosaurus",\n \"popularity\": 1451628\n },\n {\n \"tag\": "photoetcher",\n \"popularity\": 1423788\n },\n {\n \"tag\": "glucosid",\n \"popularity\": 1396775\n },\n {\n \"tag\": "Galtonian",\n \"popularity\": 1370555\n },\n {\n \"tag\": "mesosporic",\n \"popularity\": 1345097\n },\n {\n \"tag\": "theody",\n \"popularity\": 1320370\n },\n {\n \"tag\": "zaffer",\n \"popularity\": 1296348\n },\n {\n \"tag\": "probiology",\n \"popularity\": 1273003\n },\n {\n \"tag\": "rhizomic",\n \"popularity\": 1250308\n },\n {\n \"tag\": "superphosphate",\n \"popularity\": 1228240\n },\n {\n \"tag\": "Hippolytan",\n \"popularity\": 1206776\n },\n {\n \"tag\": "garget",\n \"popularity\": 1185892\n },\n {\n \"tag\": "diploplacula",\n \"popularity\": 1165568\n },\n {\n \"tag\": "orohydrographical",\n \"popularity\": 1145785\n },\n {\n \"tag\": "enhypostatize",\n \"popularity\": 1126521\n },\n {\n \"tag\": "polisman",\n \"popularity\": 1107759\n },\n {\n \"tag\": "acetometer",\n \"popularity\": 1089482\n },\n {\n \"tag\": "unsnatched",\n \"popularity\": 1071672\n },\n {\n \"tag\": "yabber",\n \"popularity\": 1054313\n },\n {\n \"tag\": "demiwolf",\n \"popularity\": 1037390\n },\n {\n \"tag\": "chromascope",\n \"popularity\": 1020888\n },\n {\n \"tag\": "seamanship",\n \"popularity\": 1004794\n },\n {\n \"tag\": "nonfenestrated",\n \"popularity\": 989092\n },\n {\n \"tag\": "hydrophytism",\n \"popularity\": 973771\n },\n {\n \"tag\": "dotter",\n \"popularity\": 958819\n },\n {\n \"tag\": "thermoperiodism",\n \"popularity\": 944222\n },\n {\n \"tag\": "unlawyerlike",\n \"popularity\": 929970\n },\n {\n \"tag\": "enantiomeride citywards",\n \"popularity\": 916052\n },\n {\n \"tag\": "unmetallurgical",\n \"popularity\": 902456\n },\n {\n \"tag\": "prickled",\n \"popularity\": 889174\n },\n {\n \"tag\": "strangerwise manioc",\n \"popularity\": 876195\n },\n {\n \"tag\": "incisorial",\n \"popularity\": 863510\n },\n {\n \"tag\": "irrationalize",\n \"popularity\": 851110\n },\n {\n \"tag\": "nasology",\n \"popularity\": 838987\n },\n {\n \"tag\": "fatuism",\n \"popularity\": 827131\n },\n {\n \"tag\": "Huk",\n \"popularity\": 815535\n },\n {\n \"tag\": "properispomenon",\n \"popularity\": 804192\n },\n {\n \"tag\": "unpummelled",\n \"popularity\": 793094\n },\n {\n \"tag\": "technographically",\n \"popularity\": 782233\n },\n {\n \"tag\": "underfurnish",\n \"popularity\": 771603\n },\n {\n \"tag\": "sinter",\n \"popularity\": 761198\n },\n {\n \"tag\": "lateroanterior",\n \"popularity\": 751010\n },\n {\n \"tag\": "nonpersonification",\n \"popularity\": 741034\n },\n {\n \"tag\": "Sitophilus",\n \"popularity\": 731264\n },\n {\n \"tag\": "unstudded overexerted",\n \"popularity\": 721694\n },\n {\n \"tag\": "tracheation",\n \"popularity\": 712318\n },\n {\n \"tag\": "thirteenth begloze",\n \"popularity\": 703131\n },\n {\n \"tag\": "bespice",\n \"popularity\": 694129\n },\n {\n \"tag\": "doppia",\n \"popularity\": 685305\n },\n {\n \"tag\": "unadorned",\n \"popularity\": 676656\n },\n {\n \"tag\": "dovelet engraff",\n \"popularity\": 668176\n },\n {\n \"tag\": "diphyozooid",\n \"popularity\": 659862\n },\n {\n \"tag\": "mure",\n \"popularity\": 651708\n },\n {\n \"tag\": "Tripitaka",\n \"popularity\": 643710\n },\n {\n \"tag\": "Billjim",\n \"popularity\": 635865\n },\n {\n \"tag\": "pyramidical",\n \"popularity\": 628169\n },\n {\n \"tag\": "circumlocutionist",\n \"popularity\": 620617\n },\n {\n \"tag\": "slapstick",\n \"popularity\": 613207\n },\n {\n \"tag\": "preobedience",\n \"popularity\": 605934\n },\n {\n \"tag\": "unfriarlike",\n \"popularity\": 598795\n },\n {\n \"tag\": "microchromosome",\n \"popularity\": 591786\n },\n {\n \"tag\": "Orphicism",\n \"popularity\": 584905\n },\n {\n \"tag\": "peel",\n \"popularity\": 578149\n },\n {\n \"tag\": "obediential",\n \"popularity\": 571514\n },\n {\n \"tag\": "Peripatidea",\n \"popularity\": 564997\n },\n {\n \"tag\": "undoubtful",\n \"popularity\": 558596\n },\n {\n \"tag\": "lodgeable",\n \"popularity\": 552307\n },\n {\n \"tag\": "pustulated woodchat",\n \"popularity\": 546129\n },\n {\n \"tag\": "antepast",\n \"popularity\": 540057\n },\n {\n \"tag\": "sagittoid matrimoniously",\n \"popularity\": 534091\n },\n {\n \"tag\": "Albizzia",\n \"popularity\": 528228\n },\n {\n \"tag\": "Elateridae unnewness",\n \"popularity\": 522464\n },\n {\n \"tag\": "convertingness",\n \"popularity\": 516798\n },\n {\n \"tag\": "Pelew",\n \"popularity\": 511228\n },\n {\n \"tag\": "recapitulation",\n \"popularity\": 505751\n },\n {\n \"tag\": "shack",\n \"popularity\": 500365\n },\n {\n \"tag\": "unmellowed",\n \"popularity\": 495069\n },\n {\n \"tag\": "pavis capering",\n \"popularity\": 489859\n },\n {\n \"tag\": "fanfare",\n \"popularity\": 484735\n },\n {\n \"tag\": "sole",\n \"popularity\": 479695\n },\n {\n \"tag\": "subarcuate",\n \"popularity\": 474735\n },\n {\n \"tag\": "multivious",\n \"popularity\": 469856\n },\n {\n \"tag\": "squandermania",\n \"popularity\": 465054\n },\n {\n \"tag\": "scintle",\n \"popularity\": 460329\n },\n {\n \"tag\": "hash chirognomic",\n \"popularity\": 455679\n },\n {\n \"tag\": "linseed",\n \"popularity\": 451101\n },\n {\n \"tag\": "redoubtable",\n \"popularity\": 446596\n },\n {\n \"tag\": "poachy reimpact",\n \"popularity\": 442160\n },\n {\n \"tag\": "limestone",\n \"popularity\": 437792\n },\n {\n \"tag\": "serranid",\n \"popularity\": 433492\n },\n {\n \"tag\": "pohna",\n \"popularity\": 429258\n },\n {\n \"tag\": "warwolf",\n \"popularity\": 425088\n },\n {\n \"tag\": "ruthenous",\n \"popularity\": 420981\n },\n {\n \"tag\": "dover",\n \"popularity\": 416935\n },\n {\n \"tag\": "deuteroalbumose",\n \"popularity\": 412950\n },\n {\n \"tag\": "pseudoprophetic",\n \"popularity\": 409025\n },\n {\n \"tag\": "dissoluteness",\n \"popularity\": 405157\n },\n {\n \"tag\": "preinvention",\n \"popularity\": 401347\n },\n {\n \"tag\": "swagbellied",\n \"popularity\": 397592\n },\n {\n \"tag\": "Ophidia",\n \"popularity\": 393892\n },\n {\n \"tag\": "equanimity",\n \"popularity\": 390245\n },\n {\n \"tag\": "troutful",\n \"popularity\": 386651\n },\n {\n \"tag\": "uke",\n \"popularity\": 383108\n },\n {\n \"tag\": "preacquaint",\n \"popularity\": 379616\n },\n {\n \"tag\": "shoq",\n \"popularity\": 376174\n },\n {\n \"tag\": "yox",\n \"popularity\": 372780\n },\n {\n \"tag\": "unelemental",\n \"popularity\": 369434\n },\n {\n \"tag\": "Yavapai",\n \"popularity\": 366134\n },\n {\n \"tag\": "joulean",\n \"popularity\": 362880\n },\n {\n \"tag\": "dracontine",\n \"popularity\": 359672\n },\n {\n \"tag\": "hardmouth",\n \"popularity\": 356507\n },\n {\n \"tag\": "sylvanize",\n \"popularity\": 353386\n },\n {\n \"tag\": "intraparenchymatous meadowbur",\n \"popularity\": 350308\n },\n {\n \"tag\": "uncharily",\n \"popularity\": 347271\n },\n {\n \"tag\": "redtab flexibly",\n \"popularity\": 344275\n },\n {\n \"tag\": "centervelic",\n \"popularity\": 341319\n },\n {\n \"tag\": "unravellable",\n \"popularity\": 338403\n },\n {\n \"tag\": "infortunately",\n \"popularity\": 335526\n },\n {\n \"tag\": "cannel",\n \"popularity\": 332687\n },\n {\n \"tag\": "oxyblepsia",\n \"popularity\": 329885\n },\n {\n \"tag\": "Damon",\n \"popularity\": 327120\n },\n {\n \"tag\": "etherin",\n \"popularity\": 324391\n },\n {\n \"tag\": "luminal",\n \"popularity\": 321697\n },\n {\n \"tag\": "interrogatorily presbyte",\n \"popularity\": 319038\n },\n {\n \"tag\": "hemiclastic",\n \"popularity\": 316414\n },\n {\n \"tag\": "poh flush",\n \"popularity\": 313823\n },\n {\n \"tag\": "Psoroptes",\n \"popularity\": 311265\n },\n {\n \"tag\": "dispirit",\n \"popularity\": 308740\n },\n {\n \"tag\": "nashgab",\n \"popularity\": 306246\n },\n {\n \"tag\": "Aphidiinae",\n \"popularity\": 303784\n },\n {\n \"tag\": "rhapsody nonconstruction",\n \"popularity\": 301353\n },\n {\n \"tag\": "Osmond",\n \"popularity\": 298952\n },\n {\n \"tag\": "Leonis",\n \"popularity\": 296581\n },\n {\n \"tag\": "Lemnian",\n \"popularity\": 294239\n },\n {\n \"tag\": "acetonic gnathonic",\n \"popularity\": 291926\n },\n {\n \"tag\": "surculus",\n \"popularity\": 289641\n },\n {\n \"tag\": "diagonally",\n \"popularity\": 287384\n },\n {\n \"tag\": "counterpenalty",\n \"popularity\": 285154\n },\n {\n \"tag\": "Eugenie",\n \"popularity\": 282952\n },\n {\n \"tag\": "hornbook",\n \"popularity\": 280776\n },\n {\n \"tag\": "miscoin",\n \"popularity\": 278626\n },\n {\n \"tag\": "admi",\n \"popularity\": 276501\n },\n {\n \"tag\": "Tarmac",\n \"popularity\": 274402\n },\n {\n \"tag\": "inexplicable",\n \"popularity\": 272328\n },\n {\n \"tag\": "rascallion",\n \"popularity\": 270278\n },\n {\n \"tag\": "dusterman",\n \"popularity\": 268252\n },\n {\n \"tag\": "osteostomous unhoroscopic",\n \"popularity\": 266250\n },\n {\n \"tag\": "spinibulbar",\n \"popularity\": 264271\n },\n {\n \"tag\": "phototelegraphically",\n \"popularity\": 262315\n },\n {\n \"tag\": "Manihot",\n \"popularity\": 260381\n },\n {\n \"tag\": "neighborhood",\n \"popularity\": 258470\n },\n {\n \"tag\": "Vincetoxicum",\n \"popularity\": 256581\n },\n {\n \"tag\": "khirka",\n \"popularity\": 254713\n },\n {\n \"tag\": "conscriptive",\n \"popularity\": 252866\n },\n {\n \"tag\": "synechthran",\n \"popularity\": 251040\n },\n {\n \"tag\": "Guttiferales",\n \"popularity\": 249235\n },\n {\n \"tag\": "roomful",\n \"popularity\": 247450\n },\n {\n \"tag\": "germinal",\n \"popularity\": 245685\n },\n {\n \"tag\": "untraitorous",\n \"popularity\": 243939\n },\n {\n \"tag\": "nondissenting",\n \"popularity\": 242213\n },\n {\n \"tag\": "amotion",\n \"popularity\": 240506\n },\n {\n \"tag\": "badious",\n \"popularity\": 238817\n },\n {\n \"tag\": "sumpit",\n \"popularity\": 237147\n },\n {\n \"tag\": "ectozoic",\n \"popularity\": 235496\n },\n {\n \"tag\": "elvet",\n \"popularity\": 233862\n },\n {\n \"tag\": "underclerk",\n \"popularity\": 232246\n },\n {\n \"tag\": "reticency",\n \"popularity\": 230647\n },\n {\n \"tag\": "neutroclusion",\n \"popularity\": 229065\n },\n {\n \"tag\": "unbelieving",\n \"popularity\": 227500\n },\n {\n \"tag\": "histogenetic",\n \"popularity\": 225952\n },\n {\n \"tag\": "dermamyiasis",\n \"popularity\": 224421\n },\n {\n \"tag\": "telenergy",\n \"popularity\": 222905\n },\n {\n \"tag\": "axiomatic",\n \"popularity\": 221406\n },\n {\n \"tag\": "undominoed",\n \"popularity\": 219922\n },\n {\n \"tag\": "periosteoma",\n \"popularity\": 218454\n },\n {\n \"tag\": "justiciaryship",\n \"popularity\": 217001\n },\n {\n \"tag\": "autoluminescence",\n \"popularity\": 215563\n },\n {\n \"tag\": "osmous",\n \"popularity\": 214140\n },\n {\n \"tag\": "borgh",\n \"popularity\": 212731\n },\n {\n \"tag\": "bedebt",\n \"popularity\": 211337\n },\n {\n \"tag\": "considerableness adenoidism",\n \"popularity\": 209957\n },\n {\n \"tag\": "sailorizing",\n \"popularity\": 208592\n },\n {\n \"tag\": "Montauk",\n \"popularity\": 207240\n },\n {\n \"tag\": "Bridget",\n \"popularity\": 205901\n },\n {\n \"tag\": "Gekkota",\n \"popularity\": 204577\n },\n {\n \"tag\": "subcorymbose",\n \"popularity\": 203265\n },\n {\n \"tag\": "undersap",\n \"popularity\": 201967\n },\n {\n \"tag\": "poikilothermic",\n \"popularity\": 200681\n },\n {\n \"tag\": "enneatical",\n \"popularity\": 199409\n },\n {\n \"tag\": "martinetism",\n \"popularity\": 198148\n },\n {\n \"tag\": "sustanedly",\n \"popularity\": 196901\n },\n {\n \"tag\": "declaration",\n \"popularity\": 195665\n },\n {\n \"tag\": "myringoplasty",\n \"popularity\": 194442\n },\n {\n \"tag\": "Ginkgo",\n \"popularity\": 193230\n },\n {\n \"tag\": "unrecurrent",\n \"popularity\": 192031\n },\n {\n \"tag\": "proprecedent",\n \"popularity\": 190843\n },\n {\n \"tag\": "roadman",\n \"popularity\": 189666\n },\n {\n \"tag\": "elemin",\n \"popularity\": 188501\n },\n {\n \"tag\": "maggot",\n \"popularity\": 187347\n },\n {\n \"tag\": "alitrunk",\n \"popularity\": 186204\n },\n {\n \"tag\": "introspection",\n \"popularity\": 185071\n },\n {\n \"tag\": "batiker",\n \"popularity\": 183950\n },\n {\n \"tag\": "backhatch oversettle",\n \"popularity\": 182839\n },\n {\n \"tag\": "thresherman",\n \"popularity\": 181738\n },\n {\n \"tag\": "protemperance",\n \"popularity\": 180648\n },\n {\n \"tag\": "undern",\n \"popularity\": 179568\n },\n {\n \"tag\": "tweeg",\n \"popularity\": 178498\n },\n {\n \"tag\": "crosspath",\n \"popularity\": 177438\n },\n {\n \"tag\": "Tangaridae",\n \"popularity\": 176388\n },\n {\n \"tag\": "scrutation",\n \"popularity\": 175348\n },\n {\n \"tag\": "piecemaker",\n \"popularity\": 174317\n },\n {\n \"tag\": "paster",\n \"popularity\": 173296\n },\n {\n \"tag\": "unpretendingness",\n \"popularity\": 172284\n },\n {\n \"tag\": "inframundane",\n \"popularity\": 171281\n },\n {\n \"tag\": "kiblah",\n \"popularity\": 170287\n },\n {\n \"tag\": "playwrighting",\n \"popularity\": 169302\n },\n {\n \"tag\": "gonepoiesis snowslip",\n \"popularity\": 168326\n },\n {\n \"tag\": "hoodwise",\n \"popularity\": 167359\n },\n {\n \"tag\": "postseason",\n \"popularity\": 166401\n },\n {\n \"tag\": "equivocality",\n \"popularity\": 165451\n },\n {\n \"tag\": "Opiliaceae nuclease",\n \"popularity\": 164509\n },\n {\n \"tag\": "sextipara",\n \"popularity\": 163576\n },\n {\n \"tag\": "weeper",\n \"popularity\": 162651\n },\n {\n \"tag\": "frambesia",\n \"popularity\": 161735\n },\n {\n \"tag\": "answerable",\n \"popularity\": 160826\n },\n {\n \"tag\": "Trichosporum",\n \"popularity\": 159925\n },\n {\n \"tag\": "cajuputol",\n \"popularity\": 159033\n },\n {\n \"tag\": "pleomorphous",\n \"popularity\": 158148\n },\n {\n \"tag\": "aculeolate",\n \"popularity\": 157270\n },\n {\n \"tag\": "wherever",\n \"popularity\": 156400\n },\n {\n \"tag\": "collapse",\n \"popularity\": 155538\n },\n {\n \"tag\": "porky",\n \"popularity\": 154683\n },\n {\n \"tag\": "perule",\n \"popularity\": 153836\n },\n {\n \"tag\": "Nevada",\n \"popularity\": 152996\n },\n {\n \"tag\": "conalbumin",\n \"popularity\": 152162\n },\n {\n \"tag\": "tsunami",\n \"popularity\": 151336\n },\n {\n \"tag\": "Gulf",\n \"popularity\": 150517\n },\n {\n \"tag\": "hertz",\n \"popularity\": 149705\n },\n {\n \"tag\": "limmock",\n \"popularity\": 148900\n },\n {\n \"tag\": "Tartarize",\n \"popularity\": 148101\n },\n {\n \"tag\": "entosphenoid",\n \"popularity\": 147310\n },\n {\n \"tag\": "ibis",\n \"popularity\": 146524\n },\n {\n \"tag\": "unyeaned",\n \"popularity\": 145746\n },\n {\n \"tag\": "tritural",\n \"popularity\": 144973\n },\n {\n \"tag\": "hundredary",\n \"popularity\": 144207\n },\n {\n \"tag\": "stolonlike",\n \"popularity\": 143448\n },\n {\n \"tag\": "chorister",\n \"popularity\": 142694\n },\n {\n \"tag\": "mismove",\n \"popularity\": 141947\n },\n {\n \"tag\": "Andine",\n \"popularity\": 141206\n },\n {\n \"tag\": "Annette proneur escribe",\n \"popularity\": 140471\n },\n {\n \"tag\": "exoperidium",\n \"popularity\": 139742\n },\n {\n \"tag\": "disedge",\n \"popularity\": 139019\n },\n {\n \"tag\": "hypochloruria",\n \"popularity\": 138302\n },\n {\n \"tag\": "prepupa",\n \"popularity\": 137590\n },\n {\n \"tag\": "assent",\n \"popularity\": 136884\n },\n {\n \"tag\": "hydrazobenzene",\n \"popularity\": 136184\n },\n {\n \"tag\": "emballonurid",\n \"popularity\": 135489\n },\n {\n \"tag\": "roselle",\n \"popularity\": 134800\n },\n {\n \"tag\": "unifiedly",\n \"popularity\": 134117\n },\n {\n \"tag\": "clang",\n \"popularity\": 133439\n },\n {\n \"tag\": "acetolytic",\n \"popularity\": 132766\n },\n {\n \"tag\": "cladodont",\n \"popularity\": 132098\n },\n {\n \"tag\": "recoast",\n \"popularity\": 131436\n },\n {\n \"tag\": "celebrated tydie Eocarboniferous",\n \"popularity\": 130779\n },\n {\n \"tag\": "superconsciousness",\n \"popularity\": 130127\n },\n {\n \"tag\": "soberness",\n \"popularity\": 129480\n },\n {\n \"tag\": "panoramist",\n \"popularity\": 128838\n },\n {\n \"tag\": "Orbitolina",\n \"popularity\": 128201\n },\n {\n \"tag\": "overlewd",\n \"popularity\": 127569\n },\n {\n \"tag\": "demiquaver",\n \"popularity\": 126942\n },\n {\n \"tag\": "kamelaukion",\n \"popularity\": 126319\n },\n {\n \"tag\": "flancard",\n \"popularity\": 125702\n },\n {\n \"tag\": "tricuspid",\n \"popularity\": 125089\n },\n {\n \"tag\": "bepelt",\n \"popularity\": 124480\n },\n {\n \"tag\": "decuplet",\n \"popularity\": 123877\n },\n {\n \"tag\": "Rockies",\n \"popularity\": 123278\n },\n {\n \"tag\": "unforgeability",\n \"popularity\": 122683\n },\n {\n \"tag\": "mocha",\n \"popularity\": 122093\n },\n {\n \"tag\": "scrunge",\n \"popularity\": 121507\n },\n {\n \"tag\": "delighter",\n \"popularity\": 120926\n },\n {\n \"tag\": "willey Microtinae",\n \"popularity\": 120349\n },\n {\n \"tag\": "unhuntable",\n \"popularity\": 119777\n },\n {\n \"tag\": "historically",\n \"popularity\": 119208\n },\n {\n \"tag\": "vicegerentship",\n \"popularity\": 118644\n },\n {\n \"tag\": "hemangiosarcoma",\n \"popularity\": 118084\n },\n {\n \"tag\": "harpago",\n \"popularity\": 117528\n },\n {\n \"tag\": "unionoid",\n \"popularity\": 116976\n },\n {\n \"tag\": "wiseman",\n \"popularity\": 116429\n },\n {\n \"tag\": "diclinism",\n \"popularity\": 115885\n },\n {\n \"tag\": "Maud",\n \"popularity\": 115345\n },\n {\n \"tag\": "scaphocephalism",\n \"popularity\": 114809\n },\n {\n \"tag\": "obtenebration",\n \"popularity\": 114277\n },\n {\n \"tag\": "cymar predreadnought",\n \"popularity\": 113749\n },\n {\n \"tag\": "discommend",\n \"popularity\": 113225\n },\n {\n \"tag\": "crude",\n \"popularity\": 112704\n },\n {\n \"tag\": "upflash",\n \"popularity\": 112187\n },\n {\n \"tag\": "saltimbank",\n \"popularity\": 111674\n },\n {\n \"tag\": "posthysterical",\n \"popularity\": 111165\n },\n {\n \"tag\": "trample",\n \"popularity\": 110659\n },\n {\n \"tag\": "ungirthed",\n \"popularity\": 110157\n },\n {\n \"tag\": "unshakable",\n \"popularity\": 109658\n },\n {\n \"tag\": "hepatocystic",\n \"popularity\": 109163\n },\n {\n \"tag\": "psammophyte",\n \"popularity\": 108671\n },\n {\n \"tag\": "millionfold",\n \"popularity\": 108183\n },\n {\n \"tag\": "outtaste",\n \"popularity\": 107698\n },\n {\n \"tag\": "poppycockish",\n \"popularity\": 107217\n },\n {\n \"tag\": "viduine",\n \"popularity\": 106739\n },\n {\n \"tag\": "pleasureman",\n \"popularity\": 106264\n },\n {\n \"tag\": "cholesterolemia",\n \"popularity\": 105792\n },\n {\n \"tag\": "hostlerwife",\n \"popularity\": 105324\n },\n {\n \"tag\": "figure undergrass",\n \"popularity\": 104859\n },\n {\n \"tag\": "bedrape",\n \"popularity\": 104398\n },\n {\n \"tag\": "nuttishness",\n \"popularity\": 103939\n },\n {\n \"tag\": "fow",\n \"popularity\": 103484\n },\n {\n \"tag\": "rachianesthesia",\n \"popularity\": 103031\n },\n {\n \"tag\": "recruitable",\n \"popularity\": 102582\n },\n {\n \"tag\": "semianatomical Oenotheraceae",\n \"popularity\": 102136\n },\n {\n \"tag\": "extracapsular",\n \"popularity\": 101693\n },\n {\n \"tag\": "unsigneted",\n \"popularity\": 101253\n },\n {\n \"tag\": "fissural",\n \"popularity\": 100816\n },\n {\n \"tag\": "ayous",\n \"popularity\": 100381\n },\n {\n \"tag\": "crestfallenness odontograph",\n \"popularity\": 99950\n },\n {\n \"tag\": "monopodium",\n \"popularity\": 99522\n },\n {\n \"tag\": "germfree",\n \"popularity\": 99096\n },\n {\n \"tag\": "dauphin",\n \"popularity\": 98673\n },\n {\n \"tag\": "nonagesimal",\n \"popularity\": 98254\n },\n {\n \"tag\": "waterchat",\n \"popularity\": 97836\n },\n {\n \"tag\": "Entelodon",\n \"popularity\": 97422\n },\n {\n \"tag\": "semischolastic",\n \"popularity\": 97010\n },\n {\n \"tag\": "somata",\n \"popularity\": 96602\n },\n {\n \"tag\": "expositorily",\n \"popularity\": 96195\n },\n {\n \"tag\": "bass",\n \"popularity\": 95792\n },\n {\n \"tag\": "calorimetry",\n \"popularity\": 95391\n },\n {\n \"tag\": "entireness",\n \"popularity\": 94993\n },\n {\n \"tag\": "ratline soppiness",\n \"popularity\": 94597\n },\n {\n \"tag\": "shor",\n \"popularity\": 94204\n },\n {\n \"tag\": "coprecipitation",\n \"popularity\": 93813\n },\n {\n \"tag\": "unblushingly",\n \"popularity\": 93425\n },\n {\n \"tag\": "macarize",\n \"popularity\": 93040\n },\n {\n \"tag\": "scruplesomeness",\n \"popularity\": 92657\n },\n {\n \"tag\": "offsaddle",\n \"popularity\": 92276\n },\n {\n \"tag\": "hypertragical",\n \"popularity\": 91898\n },\n {\n \"tag\": "uncassock loined",\n \"popularity\": 91522\n },\n {\n \"tag\": "interlobate",\n \"popularity\": 91149\n },\n {\n \"tag\": "releasor orrisroot stoloniferously",\n \"popularity\": 90778\n },\n {\n \"tag\": "elementoid",\n \"popularity\": 90410\n },\n {\n \"tag\": "Lentilla",\n \"popularity\": 90043\n },\n {\n \"tag\": "distressing",\n \"popularity\": 89679\n },\n {\n \"tag\": "hydrodrome",\n \"popularity\": 89318\n },\n {\n \"tag\": "Jeannette",\n \"popularity\": 88958\n },\n {\n \"tag\": "Kuli",\n \"popularity\": 88601\n },\n {\n \"tag\": "taxinomist",\n \"popularity\": 88246\n },\n {\n \"tag\": "southwestwardly",\n \"popularity\": 87894\n },\n {\n \"tag\": "polyparia",\n \"popularity\": 87543\n },\n {\n \"tag\": "exmeridian",\n \"popularity\": 87195\n },\n {\n \"tag\": "splenius regimentaled",\n \"popularity\": 86849\n },\n {\n \"tag\": "Sphaeropsidaceae",\n \"popularity\": 86505\n },\n {\n \"tag\": "unbegun",\n \"popularity\": 86163\n },\n {\n \"tag\": "something",\n \"popularity\": 85823\n },\n {\n \"tag\": "contaminable nonexpulsion",\n \"popularity\": 85486\n },\n {\n \"tag\": "douser",\n \"popularity\": 85150\n },\n {\n \"tag\": "prostrike",\n \"popularity\": 84817\n },\n {\n \"tag\": "worky",\n \"popularity\": 84485\n },\n {\n \"tag\": "folliful",\n \"popularity\": 84156\n },\n {\n \"tag\": "prioracy",\n \"popularity\": 83828\n },\n {\n \"tag\": "undermentioned",\n \"popularity\": 83503\n },\n {\n \"tag\": "Judaica",\n \"popularity\": 83179\n },\n {\n \"tag\": "multifarious",\n \"popularity\": 82858\n },\n {\n \"tag\": "poogye",\n \"popularity\": 82538\n },\n {\n \"tag\": "Sparganium",\n \"popularity\": 82221\n },\n {\n \"tag\": "thurrock",\n \"popularity\": 81905\n },\n {\n \"tag\": "outblush",\n \"popularity\": 81591\n },\n {\n \"tag\": "Strophanthus supraordination",\n \"popularity\": 81279\n },\n {\n \"tag\": "gingerroot",\n \"popularity\": 80969\n },\n {\n \"tag\": "unconscient",\n \"popularity\": 80661\n },\n {\n \"tag\": "unconstitutionally",\n \"popularity\": 80354\n },\n {\n \"tag\": "plaguily",\n \"popularity\": 80050\n },\n {\n \"tag\": "waterily equatorwards",\n \"popularity\": 79747\n },\n {\n \"tag\": "nondeposition",\n \"popularity\": 79446\n },\n {\n \"tag\": "dronishly",\n \"popularity\": 79147\n },\n {\n \"tag\": "gateado",\n \"popularity\": 78849\n },\n {\n \"tag\": "dislink",\n \"popularity\": 78553\n },\n {\n \"tag\": "Joceline",\n \"popularity\": 78259\n },\n {\n \"tag\": "amphiboliferous",\n \"popularity\": 77967\n },\n {\n \"tag\": "bushrope",\n \"popularity\": 77676\n },\n {\n \"tag\": "plumicorn sulphosalicylic",\n \"popularity\": 77387\n },\n {\n \"tag\": "nonefficiency",\n \"popularity\": 77100\n },\n {\n \"tag\": "hieroscopy",\n \"popularity\": 76815\n },\n {\n \"tag\": "causativeness",\n \"popularity\": 76531\n },\n {\n \"tag\": "swird paleoeremology",\n \"popularity\": 76249\n },\n {\n \"tag\": "camphoric",\n \"popularity\": 75968\n },\n {\n \"tag\": "retaining",\n \"popularity\": 75689\n },\n {\n \"tag\": "thyreoprotein",\n \"popularity\": 75411\n },\n {\n \"tag\": "carbona",\n \"popularity\": 75136\n },\n {\n \"tag\": "protectively",\n \"popularity\": 74861\n },\n {\n \"tag\": "mosasaur",\n \"popularity\": 74589\n },\n {\n \"tag\": "reciprocator",\n \"popularity\": 74317\n },\n {\n \"tag\": "detentive",\n \"popularity\": 74048\n },\n {\n \"tag\": "supravital",\n \"popularity\": 73780\n },\n {\n \"tag\": "Vespertilionidae",\n \"popularity\": 73513\n },\n {\n \"tag\": "parka",\n \"popularity\": 73248\n },\n {\n \"tag\": "pickaway",\n \"popularity\": 72984\n },\n {\n \"tag\": "oleaceous",\n \"popularity\": 72722\n },\n {\n \"tag\": "anticogitative",\n \"popularity\": 72462\n },\n {\n \"tag\": "woe",\n \"popularity\": 72203\n },\n {\n \"tag\": "skeuomorph",\n \"popularity\": 71945\n },\n {\n \"tag\": "helpmeet",\n \"popularity\": 71689\n },\n {\n \"tag\": "Hexactinellida brickmaking",\n \"popularity\": 71434\n },\n {\n \"tag\": "resink",\n \"popularity\": 71180\n },\n {\n \"tag\": "diluter",\n \"popularity\": 70928\n },\n {\n \"tag\": "micromicron",\n \"popularity\": 70677\n },\n {\n \"tag\": "parentage",\n \"popularity\": 70428\n },\n {\n \"tag\": "galactorrhoea",\n \"popularity\": 70180\n },\n {\n \"tag\": "gey",\n \"popularity\": 69934\n },\n {\n \"tag\": "gesticulatory",\n \"popularity\": 69689\n },\n {\n \"tag\": "wergil",\n \"popularity\": 69445\n },\n {\n \"tag\": "Lecanora",\n \"popularity\": 69202\n },\n {\n \"tag\": "malanders karst",\n \"popularity\": 68961\n },\n {\n \"tag\": "vibetoite",\n \"popularity\": 68721\n },\n {\n \"tag\": "unrequitedness",\n \"popularity\": 68483\n },\n {\n \"tag\": "outwash",\n \"popularity\": 68245\n },\n {\n \"tag\": "unsacred",\n \"popularity\": 68009\n },\n {\n \"tag\": "unabetted dividend",\n \"popularity\": 67775\n },\n {\n \"tag\": "untraveling",\n \"popularity\": 67541\n },\n {\n \"tag\": "thermobattery",\n \"popularity\": 67309\n },\n {\n \"tag\": "polypragmist",\n \"popularity\": 67078\n },\n {\n \"tag\": "irrefutableness",\n \"popularity\": 66848\n },\n {\n \"tag\": "remiges",\n \"popularity\": 66620\n },\n {\n \"tag\": "implode",\n \"popularity\": 66393\n },\n {\n \"tag\": "superfluousness",\n \"popularity\": 66166\n },\n {\n \"tag\": "croakily unalleviated",\n \"popularity\": 65942\n },\n {\n \"tag\": "edicule",\n \"popularity\": 65718\n },\n {\n \"tag\": "entophytous",\n \"popularity\": 65495\n },\n {\n \"tag\": "benefactorship Toryish",\n \"popularity\": 65274\n },\n {\n \"tag\": "pseudoamateurish",\n \"popularity\": 65054\n },\n {\n \"tag\": "flueless Iguanodontoidea snipnose",\n \"popularity\": 64835\n },\n {\n \"tag\": "zealotical Zamicrus interpole",\n \"popularity\": 64617\n },\n {\n \"tag\": "whereabout",\n \"popularity\": 64401\n },\n {\n \"tag\": "benzazide",\n \"popularity\": 64185\n },\n {\n \"tag\": "pokeweed",\n \"popularity\": 63971\n },\n {\n \"tag\": "calamitoid",\n \"popularity\": 63757\n },\n {\n \"tag\": "sporozoal",\n \"popularity\": 63545\n },\n {\n \"tag\": "physcioid Welshwoman",\n \"popularity\": 63334\n },\n {\n \"tag\": "wanting",\n \"popularity\": 63124\n },\n {\n \"tag\": "unencumbering",\n \"popularity\": 62915\n },\n {\n \"tag\": "Tupi",\n \"popularity\": 62707\n },\n {\n \"tag\": "potbank",\n \"popularity\": 62501\n },\n {\n \"tag\": "bulked",\n \"popularity\": 62295\n },\n {\n \"tag\": "uparise",\n \"popularity\": 62090\n },\n {\n \"tag\": "Sudra",\n \"popularity\": 61887\n },\n {\n \"tag\": "hyperscrupulosity",\n \"popularity\": 61684\n },\n {\n \"tag\": "subterraneously unmaid",\n \"popularity\": 61483\n },\n {\n \"tag\": "poisonousness",\n \"popularity\": 61282\n },\n {\n \"tag\": "phare",\n \"popularity\": 61083\n },\n {\n \"tag\": "dicynodont",\n \"popularity\": 60884\n },\n {\n \"tag\": "chewer",\n \"popularity\": 60687\n },\n {\n \"tag\": "uliginous",\n \"popularity\": 60490\n },\n {\n \"tag\": "tinman",\n \"popularity\": 60295\n },\n {\n \"tag\": "coconut",\n \"popularity\": 60100\n },\n {\n \"tag\": "phryganeoid",\n \"popularity\": 59907\n },\n {\n \"tag\": "bismillah",\n \"popularity\": 59714\n },\n {\n \"tag\": "tautomeric",\n \"popularity\": 59523\n },\n {\n \"tag\": "jerquer",\n \"popularity\": 59332\n },\n {\n \"tag\": "Dryopithecinae",\n \"popularity\": 59143\n },\n {\n \"tag\": "ghizite",\n \"popularity\": 58954\n },\n {\n \"tag\": "unliveable",\n \"popularity\": 58766\n },\n {\n \"tag\": "craftsmaster",\n \"popularity\": 58579\n },\n {\n \"tag\": "semiscenic",\n \"popularity\": 58394\n },\n {\n \"tag\": "danaid",\n \"popularity\": 58209\n },\n {\n \"tag\": "flawful",\n \"popularity\": 58025\n },\n {\n \"tag\": "risibleness",\n \"popularity\": 57841\n },\n {\n \"tag\": "Muscovite",\n \"popularity\": 57659\n },\n {\n \"tag\": "snaringly",\n \"popularity\": 57478\n },\n {\n \"tag\": "brilliantwise",\n \"popularity\": 57297\n },\n {\n \"tag\": "plebeity",\n \"popularity\": 57118\n },\n {\n \"tag\": "historicalness",\n \"popularity\": 56939\n },\n {\n \"tag\": "piecemeal",\n \"popularity\": 56761\n },\n {\n \"tag\": "maxillipedary",\n \"popularity\": 56584\n },\n {\n \"tag\": "Hypenantron",\n \"popularity\": 56408\n },\n {\n \"tag\": "quaintness avigate",\n \"popularity\": 56233\n },\n {\n \"tag\": "ave",\n \"popularity\": 56059\n },\n {\n \"tag\": "mediaevally",\n \"popularity\": 55885\n },\n {\n \"tag\": "brucite",\n \"popularity\": 55712\n },\n {\n \"tag\": "Schwendenerian",\n \"popularity\": 55541\n },\n {\n \"tag\": "julole",\n \"popularity\": 55370\n },\n {\n \"tag\": "palaeolith",\n \"popularity\": 55199\n },\n {\n \"tag\": "cotyledonary",\n \"popularity\": 55030\n },\n {\n \"tag\": "rond",\n \"popularity\": 54861\n },\n {\n \"tag\": "boomster tassoo",\n \"popularity\": 54694\n },\n {\n \"tag\": "cattishly",\n \"popularity\": 54527\n },\n {\n \"tag\": "tonguefence",\n \"popularity\": 54360\n },\n {\n \"tag\": "hexastylar triskele",\n \"popularity\": 54195\n },\n {\n \"tag\": "ariot",\n \"popularity\": 54030\n },\n {\n \"tag\": "intarsist",\n \"popularity\": 53867\n },\n {\n \"tag\": "Oscines",\n \"popularity\": 53704\n },\n {\n \"tag\": "Spaniolize",\n \"popularity\": 53541\n },\n {\n \"tag\": "smellfungus",\n \"popularity\": 53380\n },\n {\n \"tag\": "redisplay",\n \"popularity\": 53219\n },\n {\n \"tag\": "phosphene",\n \"popularity\": 53059\n },\n {\n \"tag\": "phycomycete",\n \"popularity\": 52900\n },\n {\n \"tag\": "prophetic",\n \"popularity\": 52741\n },\n {\n \"tag\": "overtrustful",\n \"popularity\": 52584\n },\n {\n \"tag\": "pinitol",\n \"popularity\": 52427\n },\n {\n \"tag\": "asthmatic",\n \"popularity\": 52270\n },\n {\n \"tag\": "convulsive",\n \"popularity\": 52115\n },\n {\n \"tag\": "draughtswoman",\n \"popularity\": 51960\n },\n {\n \"tag\": "unetymologizable",\n \"popularity\": 51806\n },\n {\n \"tag\": "centrarchoid",\n \"popularity\": 51652\n },\n {\n \"tag\": "mesioincisal",\n \"popularity\": 51500\n },\n {\n \"tag\": "transbaikal",\n \"popularity\": 51348\n },\n {\n \"tag\": "silveriness",\n \"popularity\": 51196\n },\n {\n \"tag\": "costotomy",\n \"popularity\": 51046\n },\n {\n \"tag\": "caracore",\n \"popularity\": 50896\n },\n {\n \"tag\": "depotentiation",\n \"popularity\": 50747\n },\n {\n \"tag\": "glossoepiglottidean",\n \"popularity\": 50598\n },\n {\n \"tag\": "upswell",\n \"popularity\": 50450\n },\n {\n \"tag\": "flecnodal",\n \"popularity\": 50303\n },\n {\n \"tag\": "coventrate",\n \"popularity\": 50157\n },\n {\n \"tag\": "duchesse",\n \"popularity\": 50011\n },\n {\n \"tag\": "excisemanship trophied",\n \"popularity\": 49866\n },\n {\n \"tag\": "cytinaceous",\n \"popularity\": 49721\n },\n {\n \"tag\": "assuringly",\n \"popularity\": 49577\n },\n {\n \"tag\": "unconducted upliftitis",\n \"popularity\": 49434\n },\n {\n \"tag\": "rachicentesis",\n \"popularity\": 49292\n },\n {\n \"tag\": "antiangular",\n \"popularity\": 49150\n },\n {\n \"tag\": "advisal",\n \"popularity\": 49008\n },\n {\n \"tag\": "birdcatcher",\n \"popularity\": 48868\n },\n {\n \"tag\": "secularistic",\n \"popularity\": 48728\n },\n {\n \"tag\": "grandeeism superinformal",\n \"popularity\": 48588\n },\n {\n \"tag\": "unapprehension",\n \"popularity\": 48449\n },\n {\n \"tag\": "excipulum",\n \"popularity\": 48311\n },\n {\n \"tag\": "decimole",\n \"popularity\": 48174\n },\n {\n \"tag\": "semidrachm",\n \"popularity\": 48037\n },\n {\n \"tag\": "uvulotome",\n \"popularity\": 47901\n },\n {\n \"tag\": "Lemaneaceae",\n \"popularity\": 47765\n },\n {\n \"tag\": "corrade",\n \"popularity\": 47630\n },\n {\n \"tag\": "Kuroshio",\n \"popularity\": 47495\n },\n {\n \"tag\": "Araliophyllum",\n \"popularity\": 47361\n },\n {\n \"tag\": "victoriousness cardiosphygmograph",\n \"popularity\": 47228\n },\n {\n \"tag\": "reinvent",\n \"popularity\": 47095\n },\n {\n \"tag\": "Macrotolagus",\n \"popularity\": 46963\n },\n {\n \"tag\": "strenuousness",\n \"popularity\": 46831\n },\n {\n \"tag\": "deviability",\n \"popularity\": 46700\n },\n {\n \"tag\": "phyllospondylous",\n \"popularity\": 46570\n },\n {\n \"tag\": "bisect rudderhole",\n \"popularity\": 46440\n },\n {\n \"tag\": "crownwork",\n \"popularity\": 46311\n },\n {\n \"tag\": "Ascalabota",\n \"popularity\": 46182\n },\n {\n \"tag\": "prostatomyomectomy",\n \"popularity\": 46054\n },\n {\n \"tag\": "neurosyphilis",\n \"popularity\": 45926\n },\n {\n \"tag\": "tabloid scraplet",\n \"popularity\": 45799\n },\n {\n \"tag\": "nonmedullated servility",\n \"popularity\": 45673\n },\n {\n \"tag\": "melopoeic practicalization",\n \"popularity\": 45547\n },\n {\n \"tag\": "nonrhythmic",\n \"popularity\": 45421\n },\n {\n \"tag\": "deplorer",\n \"popularity\": 45296\n },\n {\n \"tag\": "Ophion",\n \"popularity\": 45172\n },\n {\n \"tag\": "subprioress",\n \"popularity\": 45048\n },\n {\n \"tag\": "semiregular",\n \"popularity\": 44925\n },\n {\n \"tag\": "praelection",\n \"popularity\": 44802\n },\n {\n \"tag\": "discinct",\n \"popularity\": 44680\n },\n {\n \"tag\": "preplace",\n \"popularity\": 44558\n },\n {\n \"tag\": "paternoster",\n \"popularity\": 44437\n },\n {\n \"tag\": "suboccipital",\n \"popularity\": 44316\n },\n {\n \"tag\": "Teutophil",\n \"popularity\": 44196\n },\n {\n \"tag\": "tracheole",\n \"popularity\": 44076\n },\n {\n \"tag\": "subsmile",\n \"popularity\": 43957\n },\n {\n \"tag\": "nonapostatizing",\n \"popularity\": 43839\n },\n {\n \"tag\": "cleidotomy",\n \"popularity\": 43720\n },\n {\n \"tag\": "hingle",\n \"popularity\": 43603\n },\n {\n \"tag\": "jocoque",\n \"popularity\": 43486\n },\n {\n \"tag\": "trundler notidanian",\n \"popularity\": 43369\n },\n {\n \"tag\": "strangling misdaub",\n \"popularity\": 43253\n },\n {\n \"tag\": "noncancellable",\n \"popularity\": 43137\n },\n {\n \"tag\": "lavabo",\n \"popularity\": 43022\n },\n {\n \"tag\": "lanterloo",\n \"popularity\": 42907\n },\n {\n \"tag\": "uncitizenly",\n \"popularity\": 42793\n },\n {\n \"tag\": "autoturning",\n \"popularity\": 42679\n },\n {\n \"tag\": "Haganah",\n \"popularity\": 42566\n },\n {\n \"tag\": "Glecoma",\n \"popularity\": 42453\n },\n {\n \"tag\": "membered",\n \"popularity\": 42341\n },\n {\n \"tag\": "consuetudinal",\n \"popularity\": 42229\n },\n {\n \"tag\": "gatehouse",\n \"popularity\": 42117\n },\n {\n \"tag\": "tetherball",\n \"popularity\": 42006\n },\n {\n \"tag\": "counterrevolutionist numismatical",\n \"popularity\": 41896\n },\n {\n \"tag\": "pagehood plateiasmus",\n \"popularity\": 41786\n },\n {\n \"tag\": "pelterer",\n \"popularity\": 41676\n },\n {\n \"tag\": "splenemphraxis",\n \"popularity\": 41567\n },\n {\n \"tag\": "Crypturidae",\n \"popularity\": 41458\n },\n {\n \"tag\": "caboodle",\n \"popularity\": 41350\n },\n {\n \"tag\": "Filaria",\n \"popularity\": 41242\n },\n {\n \"tag\": "noninvincibility",\n \"popularity\": 41135\n },\n {\n \"tag\": "preadvertisement",\n \"popularity\": 41028\n },\n {\n \"tag\": "bathrobe",\n \"popularity\": 40921\n },\n {\n \"tag\": "nitrifier",\n \"popularity\": 40815\n },\n {\n \"tag\": "furthermore",\n \"popularity\": 40709\n },\n {\n \"tag\": "recrate",\n \"popularity\": 40604\n },\n {\n \"tag\": "inexist",\n \"popularity\": 40499\n },\n {\n \"tag\": "Mocoan",\n \"popularity\": 40395\n },\n {\n \"tag\": "forint",\n \"popularity\": 40291\n },\n {\n \"tag\": "cardiomyoliposis",\n \"popularity\": 40187\n },\n {\n \"tag\": "channeling",\n \"popularity\": 40084\n },\n {\n \"tag\": "quebrachine",\n \"popularity\": 39981\n },\n {\n \"tag\": "magistery",\n \"popularity\": 39879\n },\n {\n \"tag\": "koko",\n \"popularity\": 39777\n },\n {\n \"tag\": "nobilify",\n \"popularity\": 39676\n },\n {\n \"tag\": "articulate taprooted",\n \"popularity\": 39575\n },\n {\n \"tag\": "cardiotonic Nicaragua",\n \"popularity\": 39474\n },\n {\n \"tag\": "assertiveness",\n \"popularity\": 39374\n },\n {\n \"tag\": "springtail",\n \"popularity\": 39274\n },\n {\n \"tag\": "spontoon",\n \"popularity\": 39174\n },\n {\n \"tag\": "plesiobiosis",\n \"popularity\": 39075\n },\n {\n \"tag\": "rooinek",\n \"popularity\": 38976\n },\n {\n \"tag\": "hairif falsehood",\n \"popularity\": 38878\n },\n {\n \"tag\": "synodally",\n \"popularity\": 38780\n },\n {\n \"tag\": "biodynamics",\n \"popularity\": 38683\n },\n {\n \"tag\": "trickling",\n \"popularity\": 38585\n },\n {\n \"tag\": "oxfly daystar",\n \"popularity\": 38489\n },\n {\n \"tag\": "epicycloidal",\n \"popularity\": 38392\n },\n {\n \"tag\": "shorthand",\n \"popularity\": 38296\n },\n {\n \"tag\": "herpolhode",\n \"popularity\": 38201\n },\n {\n \"tag\": "polysynthesism",\n \"popularity\": 38105\n },\n {\n \"tag\": "cany",\n \"popularity\": 38010\n },\n {\n \"tag\": "sideage",\n \"popularity\": 37916\n },\n {\n \"tag\": "strainableness",\n \"popularity\": 37822\n },\n {\n \"tag\": "superformidable",\n \"popularity\": 37728\n },\n {\n \"tag\": "slendang",\n \"popularity\": 37634\n },\n {\n \"tag\": "impropriation",\n \"popularity\": 37541\n },\n {\n \"tag\": "ficklehearted",\n \"popularity\": 37449\n },\n {\n \"tag\": "wintrify",\n \"popularity\": 37356\n },\n {\n \"tag\": "geomorphogenist",\n \"popularity\": 37264\n },\n {\n \"tag\": "smuggleable",\n \"popularity\": 37173\n },\n {\n \"tag\": "delapsion",\n \"popularity\": 37081\n },\n {\n \"tag\": "projective",\n \"popularity\": 36990\n },\n {\n \"tag\": "unglue exfoliation",\n \"popularity\": 36900\n },\n {\n \"tag\": "Acerae",\n \"popularity\": 36810\n },\n {\n \"tag\": "unstaged",\n \"popularity\": 36720\n },\n {\n \"tag\": "ranal",\n \"popularity\": 36630\n },\n {\n \"tag\": "worrier",\n \"popularity\": 36541\n },\n {\n \"tag\": "unhid",\n \"popularity\": 36452\n },\n {\n \"tag\": "adequation",\n \"popularity\": 36363\n },\n {\n \"tag\": "strongylid Sokotri",\n \"popularity\": 36275\n },\n {\n \"tag\": "fumingly",\n \"popularity\": 36187\n },\n {\n \"tag\": "gynosporangium phaenogenetic",\n \"popularity\": 36100\n },\n {\n \"tag\": "uniunguiculate",\n \"popularity\": 36012\n },\n {\n \"tag\": "prudelike",\n \"popularity\": 35926\n },\n {\n \"tag\": "seminomata",\n \"popularity\": 35839\n },\n {\n \"tag\": "trinklet",\n \"popularity\": 35753\n },\n {\n \"tag\": "risorial",\n \"popularity\": 35667\n },\n {\n \"tag\": "pericardiocentesis",\n \"popularity\": 35581\n },\n {\n \"tag\": "filmist",\n \"popularity\": 35496\n },\n {\n \"tag\": "Nana",\n \"popularity\": 35411\n },\n {\n \"tag\": "cynipoid",\n \"popularity\": 35326\n },\n {\n \"tag\": "cteniform",\n \"popularity\": 35242\n },\n {\n \"tag\": "semiflex",\n \"popularity\": 35158\n },\n {\n \"tag\": "solstitially",\n \"popularity\": 35074\n },\n {\n \"tag\": "Algarsife",\n \"popularity\": 34991\n },\n {\n \"tag\": "noncriminal",\n \"popularity\": 34908\n },\n {\n \"tag\": "compassion",\n \"popularity\": 34825\n },\n {\n \"tag\": "Buddhic",\n \"popularity\": 34743\n },\n {\n \"tag\": "vellicative dactylically hotfoot",\n \"popularity\": 34661\n },\n {\n \"tag\": "chicory",\n \"popularity\": 34579\n },\n {\n \"tag\": "transperitoneally",\n \"popularity\": 34497\n },\n {\n \"tag\": "pennae",\n \"popularity\": 34416\n },\n {\n \"tag\": "Flamandize",\n \"popularity\": 34335\n },\n {\n \"tag\": "underviewer",\n \"popularity\": 34254\n },\n {\n \"tag\": "assoil",\n \"popularity\": 34174\n },\n {\n \"tag\": "saccharobacillus",\n \"popularity\": 34094\n },\n {\n \"tag\": "biacetylene",\n \"popularity\": 34014\n },\n {\n \"tag\": "mouchardism",\n \"popularity\": 33935\n },\n {\n \"tag\": "anisomeric",\n \"popularity\": 33856\n },\n {\n \"tag\": "digestive",\n \"popularity\": 33777\n },\n {\n \"tag\": "darlingly",\n \"popularity\": 33698\n },\n {\n \"tag\": "liman",\n \"popularity\": 33620\n },\n {\n \"tag\": "soldanrie",\n \"popularity\": 33542\n },\n {\n \"tag\": "sully",\n \"popularity\": 33464\n },\n {\n \"tag\": "brightsmith",\n \"popularity\": 33387\n },\n {\n \"tag\": "inwrap antiliturgist ureterocervical",\n \"popularity\": 33309\n },\n {\n \"tag\": "discommodity",\n \"popularity\": 33232\n },\n {\n \"tag\": "typical aggrandizer",\n \"popularity\": 33156\n },\n {\n \"tag\": "xenogeny",\n \"popularity\": 33079\n },\n {\n \"tag\": "uncountrified",\n \"popularity\": 33003\n },\n {\n \"tag\": "Podarge",\n \"popularity\": 32928\n },\n {\n \"tag\": "uninterviewed",\n \"popularity\": 32852\n },\n {\n \"tag\": "underprior",\n \"popularity\": 32777\n },\n {\n \"tag\": "leiomyomatous",\n \"popularity\": 32702\n },\n {\n \"tag\": "postdysenteric",\n \"popularity\": 32627\n },\n {\n \"tag\": "Fusicladium",\n \"popularity\": 32553\n },\n {\n \"tag\": "Dulcinea",\n \"popularity\": 32478\n },\n {\n \"tag\": "interspersion",\n \"popularity\": 32404\n },\n {\n \"tag\": "preobligate",\n \"popularity\": 32331\n },\n {\n \"tag\": "subaggregate",\n \"popularity\": 32257\n },\n {\n \"tag\": "grammarianism",\n \"popularity\": 32184\n },\n {\n \"tag\": "palikar",\n \"popularity\": 32111\n },\n {\n \"tag\": "facileness",\n \"popularity\": 32039\n },\n {\n \"tag\": "deuterofibrinose",\n \"popularity\": 31966\n },\n {\n \"tag\": "pseudesthesia",\n \"popularity\": 31894\n },\n {\n \"tag\": "sedimentary",\n \"popularity\": 31822\n },\n {\n \"tag\": "typewrite",\n \"popularity\": 31751\n },\n {\n \"tag\": "immemorable",\n \"popularity\": 31679\n },\n {\n \"tag\": "Myrtus",\n \"popularity\": 31608\n },\n {\n \"tag\": "hauchecornite",\n \"popularity\": 31537\n },\n {\n \"tag\": "galleylike",\n \"popularity\": 31467\n },\n {\n \"tag\": "thimber",\n \"popularity\": 31396\n },\n {\n \"tag\": "Hegelianism",\n \"popularity\": 31326\n },\n {\n \"tag\": "strig",\n \"popularity\": 31256\n },\n {\n \"tag\": "skyre",\n \"popularity\": 31187\n },\n {\n \"tag\": "eupepticism",\n \"popularity\": 31117\n },\n {\n \"tag\": "eponymism",\n \"popularity\": 31048\n },\n {\n \"tag\": "flunkeyhood",\n \"popularity\": 30979\n },\n {\n \"tag\": "Abama",\n \"popularity\": 30911\n },\n {\n \"tag\": "adiadochokinesis",\n \"popularity\": 30842\n },\n {\n \"tag\": "spendthrifty",\n \"popularity\": 30774\n },\n {\n \"tag\": "chalcedony",\n \"popularity\": 30706\n },\n {\n \"tag\": "authorism",\n \"popularity\": 30638\n },\n {\n \"tag\": "nasturtium",\n \"popularity\": 30571\n },\n {\n \"tag\": "Acanthocereus",\n \"popularity\": 30504\n },\n {\n \"tag\": "uncollapsible",\n \"popularity\": 30437\n },\n {\n \"tag\": "excursionist",\n \"popularity\": 30370\n },\n {\n \"tag\": "fogbow",\n \"popularity\": 30303\n },\n {\n \"tag\": "overlie",\n \"popularity\": 30237\n },\n {\n \"tag\": "velours",\n \"popularity\": 30171\n },\n {\n \"tag\": "zoodendria madrigal stagbush",\n \"popularity\": 30105\n },\n {\n \"tag\": "imi",\n \"popularity\": 30039\n },\n {\n \"tag\": "cojudge",\n \"popularity\": 29974\n },\n {\n \"tag\": "depurate argal",\n \"popularity\": 29909\n },\n {\n \"tag\": "unrecognition",\n \"popularity\": 29844\n },\n {\n \"tag\": "paunchful",\n \"popularity\": 29779\n },\n {\n \"tag\": "invalued",\n \"popularity\": 29714\n },\n {\n \"tag\": "probang",\n \"popularity\": 29650\n },\n {\n \"tag\": "chetvert",\n \"popularity\": 29586\n },\n {\n \"tag\": "enactable",\n \"popularity\": 29522\n },\n {\n \"tag\": "detoxicate adhibit",\n \"popularity\": 29458\n },\n {\n \"tag\": "kullaite",\n \"popularity\": 29395\n },\n {\n \"tag\": "undazzling",\n \"popularity\": 29332\n },\n {\n \"tag\": "excalation",\n \"popularity\": 29269\n },\n {\n \"tag\": "sievings",\n \"popularity\": 29206\n },\n {\n \"tag\": "disenthral",\n \"popularity\": 29143\n },\n {\n \"tag\": "disinterestedly",\n \"popularity\": 29081\n },\n {\n \"tag\": "stanner",\n \"popularity\": 29018\n },\n {\n \"tag\": "recapitulative",\n \"popularity\": 28956\n },\n {\n \"tag\": "objectivist",\n \"popularity\": 28895\n },\n {\n \"tag\": "hypermetropia",\n \"popularity\": 28833\n },\n {\n \"tag\": "incumbency",\n \"popularity\": 28772\n },\n {\n \"tag\": "protegee",\n \"popularity\": 28711\n },\n {\n \"tag\": "zealotic",\n \"popularity\": 28650\n },\n {\n \"tag\": "predebit",\n \"popularity\": 28589\n },\n {\n \"tag\": "cupolar",\n \"popularity\": 28528\n },\n {\n \"tag\": "unattributed",\n \"popularity\": 28468\n },\n {\n \"tag\": "louisine",\n \"popularity\": 28408\n },\n {\n \"tag\": "illustrate",\n \"popularity\": 28348\n },\n {\n \"tag\": "inofficiousness",\n \"popularity\": 28288\n },\n {\n \"tag\": "Americawards",\n \"popularity\": 28228\n },\n {\n \"tag\": "foreflap",\n \"popularity\": 28169\n },\n {\n \"tag\": "eruditeness",\n \"popularity\": 28110\n },\n {\n \"tag\": "copiopsia",\n \"popularity\": 28051\n },\n {\n \"tag\": "sporuliferous",\n \"popularity\": 27992\n },\n {\n \"tag\": "muttering",\n \"popularity\": 27934\n },\n {\n \"tag\": "prepsychology adrip",\n \"popularity\": 27875\n },\n {\n \"tag\": "unfriendly",\n \"popularity\": 27817\n },\n {\n \"tag\": "sulphanilic",\n \"popularity\": 27759\n },\n {\n \"tag\": "Coelococcus",\n \"popularity\": 27701\n },\n {\n \"tag\": "undoubtfulness",\n \"popularity\": 27643\n },\n {\n \"tag\": "flaringly",\n \"popularity\": 27586\n },\n {\n \"tag\": "unordain",\n \"popularity\": 27529\n },\n {\n \"tag\": "fratchety",\n \"popularity\": 27472\n },\n {\n \"tag\": "decadentism dolefully",\n \"popularity\": 27415\n },\n {\n \"tag\": "synthronus",\n \"popularity\": 27358\n },\n {\n \"tag\": "maiid",\n \"popularity\": 27301\n },\n {\n \"tag\": "rhinobyon",\n \"popularity\": 27245\n },\n {\n \"tag\": "Didynamia",\n \"popularity\": 27189\n },\n {\n \"tag\": "millionairedom",\n \"popularity\": 27133\n },\n {\n \"tag\": "mulierine",\n \"popularity\": 27077\n },\n {\n \"tag\": "Mayo",\n \"popularity\": 27021\n },\n {\n \"tag\": "perceivedness",\n \"popularity\": 26966\n },\n {\n \"tag\": "unadoration",\n \"popularity\": 26911\n },\n {\n \"tag\": "regraft",\n \"popularity\": 26856\n },\n {\n \"tag\": "witch",\n \"popularity\": 26801\n },\n {\n \"tag\": "ungrow",\n \"popularity\": 26746\n },\n {\n \"tag\": "glossopharyngeus",\n \"popularity\": 26691\n },\n {\n \"tag\": "unstirrable",\n \"popularity\": 26637\n },\n {\n \"tag\": "synodsman",\n \"popularity\": 26583\n },\n {\n \"tag\": "placentalian",\n \"popularity\": 26529\n },\n {\n \"tag\": "corpulently",\n \"popularity\": 26475\n },\n {\n \"tag\": "photochromoscope",\n \"popularity\": 26421\n },\n {\n \"tag\": "indusiate retinasphaltum chokestrap",\n \"popularity\": 26368\n },\n {\n \"tag\": "murdrum",\n \"popularity\": 26314\n },\n {\n \"tag\": "belatedness",\n \"popularity\": 26261\n },\n {\n \"tag\": "Cochin",\n \"popularity\": 26208\n },\n {\n \"tag\": "Leonist",\n \"popularity\": 26155\n },\n {\n \"tag\": "keeker confined",\n \"popularity\": 26102\n },\n {\n \"tag\": "unintellectual",\n \"popularity\": 26050\n },\n {\n \"tag\": "nymphaline bait",\n \"popularity\": 25997\n },\n {\n \"tag\": "sarcosporidiosis",\n \"popularity\": 25945\n },\n {\n \"tag\": "catawamptiously",\n \"popularity\": 25893\n },\n {\n \"tag\": "outshame",\n \"popularity\": 25841\n },\n {\n \"tag\": "animalism",\n \"popularity\": 25790\n },\n {\n \"tag\": "epithalamial",\n \"popularity\": 25738\n },\n {\n \"tag\": "ganner",\n \"popularity\": 25687\n },\n {\n \"tag\": "desilicify",\n \"popularity\": 25635\n },\n {\n \"tag\": "dandyism",\n \"popularity\": 25584\n },\n {\n \"tag\": "hyleg",\n \"popularity\": 25533\n },\n {\n \"tag\": "photophysical",\n \"popularity\": 25483\n },\n {\n \"tag\": "underload",\n \"popularity\": 25432\n },\n {\n \"tag\": "unintrusive",\n \"popularity\": 25382\n },\n {\n \"tag\": "succinamic",\n \"popularity\": 25331\n },\n {\n \"tag\": "matchy",\n \"popularity\": 25281\n },\n {\n \"tag\": "concordal",\n \"popularity\": 25231\n },\n {\n \"tag\": "exteriority",\n \"popularity\": 25181\n },\n {\n \"tag\": "sterculiad",\n \"popularity\": 25132\n },\n {\n \"tag\": "sulfoxylic",\n \"popularity\": 25082\n },\n {\n \"tag\": "oversubscription",\n \"popularity\": 25033\n },\n {\n \"tag\": "chiasmic",\n \"popularity\": 24984\n },\n {\n \"tag\": "pseudoparthenogenesis",\n \"popularity\": 24935\n },\n {\n \"tag\": "indorse",\n \"popularity\": 24886\n },\n {\n \"tag\": "Krishnaite",\n \"popularity\": 24837\n },\n {\n \"tag\": "calcinize",\n \"popularity\": 24788\n },\n {\n \"tag\": "rhodium",\n \"popularity\": 24740\n },\n {\n \"tag\": "tragopan",\n \"popularity\": 24692\n },\n {\n \"tag\": "overwhelmingly",\n \"popularity\": 24643\n },\n {\n \"tag\": "procidence accorporate",\n \"popularity\": 24595\n },\n {\n \"tag\": "polemize speelless",\n \"popularity\": 24548\n },\n {\n \"tag\": "radiocarpal goran",\n \"popularity\": 24500\n },\n {\n \"tag\": "counteroffer Pelodytes",\n \"popularity\": 24452\n },\n {\n \"tag\": "lionhearted",\n \"popularity\": 24405\n },\n {\n \"tag\": "paramastoid",\n \"popularity\": 24358\n },\n {\n \"tag\": "murine",\n \"popularity\": 24310\n },\n {\n \"tag\": "woodbined",\n \"popularity\": 24263\n },\n {\n \"tag\": "packthread",\n \"popularity\": 24217\n },\n {\n \"tag\": "citreous",\n \"popularity\": 24170\n },\n {\n \"tag\": "unfallaciously",\n \"popularity\": 24123\n },\n {\n \"tag\": "tentwork reincarnadine",\n \"popularity\": 24077\n },\n {\n \"tag\": "verminousness",\n \"popularity\": 24030\n },\n {\n \"tag\": "sillometer",\n \"popularity\": 23984\n },\n {\n \"tag\": "jointy",\n \"popularity\": 23938\n },\n {\n \"tag\": "streptolysin",\n \"popularity\": 23892\n },\n {\n \"tag\": "Florentinism",\n \"popularity\": 23847\n },\n {\n \"tag\": "monosomatous",\n \"popularity\": 23801\n },\n {\n \"tag\": "capsulociliary",\n \"popularity\": 23756\n },\n {\n \"tag\": "organum",\n \"popularity\": 23710\n },\n {\n \"tag\": "overtly",\n \"popularity\": 23665\n },\n {\n \"tag\": "ophthalmoscopical",\n \"popularity\": 23620\n },\n {\n \"tag\": "supposititiously",\n \"popularity\": 23575\n },\n {\n \"tag\": "radiochemistry",\n \"popularity\": 23530\n },\n {\n \"tag\": "flaxtail",\n \"popularity\": 23486\n },\n {\n \"tag\": "pretympanic",\n \"popularity\": 23441\n },\n {\n \"tag\": "auscultation",\n \"popularity\": 23397\n },\n {\n \"tag\": "hairdresser",\n \"popularity\": 23352\n },\n {\n \"tag\": "chaffless",\n \"popularity\": 23308\n },\n {\n \"tag\": "polioencephalitis",\n \"popularity\": 23264\n },\n {\n \"tag\": "axolotl",\n \"popularity\": 23220\n },\n {\n \"tag\": "smous",\n \"popularity\": 23177\n },\n {\n \"tag\": "morgen disenamour toothed",\n \"popularity\": 23133\n },\n {\n \"tag\": "chaiseless",\n \"popularity\": 23089\n },\n {\n \"tag\": "frugally",\n \"popularity\": 23046\n },\n {\n \"tag\": "combustive antievolutionist cinenegative",\n \"popularity\": 23003\n },\n {\n \"tag\": "malacolite",\n \"popularity\": 22960\n },\n {\n \"tag\": "borne",\n \"popularity\": 22917\n },\n {\n \"tag\": "mercaptole",\n \"popularity\": 22874\n },\n {\n \"tag\": "judicatory",\n \"popularity\": 22831\n },\n {\n \"tag\": "noctivagation",\n \"popularity\": 22789\n },\n {\n \"tag\": "synthete",\n \"popularity\": 22746\n },\n {\n \"tag\": "tomboyism",\n \"popularity\": 22704\n },\n {\n \"tag\": "serranoid",\n \"popularity\": 22661\n },\n {\n \"tag\": "impostorism",\n \"popularity\": 22619\n },\n {\n \"tag\": "flagellosis Talitha",\n \"popularity\": 22577\n },\n {\n \"tag\": "pseudoviscous",\n \"popularity\": 22535\n },\n {\n \"tag\": "Galleriidae",\n \"popularity\": 22494\n },\n {\n \"tag\": "undulation didelph Comintern",\n \"popularity\": 22452\n },\n {\n \"tag\": "triangulopyramidal",\n \"popularity\": 22411\n },\n {\n \"tag\": "middlings",\n \"popularity\": 22369\n },\n {\n \"tag\": "piperazin",\n \"popularity\": 22328\n },\n {\n \"tag\": "endostitis",\n \"popularity\": 22287\n },\n {\n \"tag\": "swordlike",\n \"popularity\": 22246\n },\n {\n \"tag\": "forthwith",\n \"popularity\": 22205\n },\n {\n \"tag\": "menaceful",\n \"popularity\": 22164\n },\n {\n \"tag\": "explantation defective",\n \"popularity\": 22123\n },\n {\n \"tag\": "arrear",\n \"popularity\": 22083\n },\n {\n \"tag\": "engraft",\n \"popularity\": 22042\n },\n {\n \"tag\": "revolunteer",\n \"popularity\": 22002\n },\n {\n \"tag\": "foliaceous",\n \"popularity\": 21962\n },\n {\n \"tag\": "pseudograph",\n \"popularity\": 21922\n },\n {\n \"tag\": "maenaite",\n \"popularity\": 21882\n },\n {\n \"tag\": "interfinger",\n \"popularity\": 21842\n },\n {\n \"tag\": "macroscopically",\n \"popularity\": 21802\n },\n {\n \"tag\": "bluewood",\n \"popularity\": 21762\n },\n {\n \"tag\": "chikara",\n \"popularity\": 21723\n },\n {\n \"tag\": "reprehension diazeuxis nickelous",\n \"popularity\": 21683\n },\n {\n \"tag\": "vacuation",\n \"popularity\": 21644\n },\n {\n \"tag\": "Sartish",\n \"popularity\": 21605\n },\n {\n \"tag\": "pseudogyny",\n \"popularity\": 21566\n },\n {\n \"tag\": "friedcake",\n \"popularity\": 21527\n },\n {\n \"tag\": "thraw",\n \"popularity\": 21488\n },\n {\n \"tag\": "bifid",\n \"popularity\": 21449\n },\n {\n \"tag\": "truthlessly",\n \"popularity\": 21411\n },\n {\n \"tag\": "lungy",\n \"popularity\": 21372\n },\n {\n \"tag\": "fluoborite",\n \"popularity\": 21334\n },\n {\n \"tag\": "anthropolithic",\n \"popularity\": 21295\n },\n {\n \"tag\": "coachee straw",\n \"popularity\": 21257\n },\n {\n \"tag\": "dehorner Grecize",\n \"popularity\": 21219\n },\n {\n \"tag\": "spondylopyosis",\n \"popularity\": 21181\n },\n {\n \"tag\": "institutionary",\n \"popularity\": 21143\n },\n {\n \"tag\": "agentry",\n \"popularity\": 21105\n },\n {\n \"tag\": "musing bietle",\n \"popularity\": 21068\n },\n {\n \"tag\": "cormophyte",\n \"popularity\": 21030\n },\n {\n \"tag\": "semielliptic",\n \"popularity\": 20993\n },\n {\n \"tag\": "ependytes",\n \"popularity\": 20955\n },\n {\n \"tag\": "coachmaster",\n \"popularity\": 20918\n },\n {\n \"tag\": "overexuberant",\n \"popularity\": 20881\n },\n {\n \"tag\": "selectable",\n \"popularity\": 20844\n },\n {\n \"tag\": "saclike",\n \"popularity\": 20807\n },\n {\n \"tag\": "mullion",\n \"popularity\": 20770\n },\n {\n \"tag\": "pantheonize prevalency",\n \"popularity\": 20733\n },\n {\n \"tag\": "trophosperm",\n \"popularity\": 20697\n },\n {\n \"tag\": "paraphrasist",\n \"popularity\": 20660\n },\n {\n \"tag\": "undercarry",\n \"popularity\": 20624\n },\n {\n \"tag\": "thallogenic",\n \"popularity\": 20587\n },\n {\n \"tag\": "bulgy forbid",\n \"popularity\": 20551\n },\n {\n \"tag\": "proliquor gratulatory",\n \"popularity\": 20515\n },\n {\n \"tag\": "booker",\n \"popularity\": 20479\n },\n {\n \"tag\": "wizen",\n \"popularity\": 20443\n },\n {\n \"tag\": "synchondrosially",\n \"popularity\": 20407\n },\n {\n \"tag\": "herbless",\n \"popularity\": 20371\n },\n {\n \"tag\": "arfvedsonite",\n \"popularity\": 20336\n },\n {\n \"tag\": "Neuroptera",\n \"popularity\": 20300\n },\n {\n \"tag\": "fingerstone",\n \"popularity\": 20265\n },\n {\n \"tag\": "Odontoglossae",\n \"popularity\": 20229\n },\n {\n \"tag\": "transmigrator",\n \"popularity\": 20194\n },\n {\n \"tag\": "Dehaites",\n \"popularity\": 20159\n },\n {\n \"tag\": "Molinist",\n \"popularity\": 20124\n },\n {\n \"tag\": "novelistic",\n \"popularity\": 20089\n },\n {\n \"tag\": "astelic",\n \"popularity\": 20054\n },\n {\n \"tag\": "pyelometry",\n \"popularity\": 20019\n },\n {\n \"tag\": "pigmentation",\n \"popularity\": 19984\n },\n {\n \"tag\": "epinaos",\n \"popularity\": 19950\n },\n {\n \"tag\": "outdare",\n \"popularity\": 19915\n },\n {\n \"tag\": "Funje philaristocracy",\n \"popularity\": 19881\n },\n {\n \"tag\": "keddah",\n \"popularity\": 19846\n },\n {\n \"tag\": "axoidean",\n \"popularity\": 19812\n },\n {\n \"tag\": "ovule",\n \"popularity\": 19778\n },\n {\n \"tag\": "solidify",\n \"popularity\": 19744\n },\n {\n \"tag\": "noncelestial",\n \"popularity\": 19710\n },\n {\n \"tag\": "overmultiplication",\n \"popularity\": 19676\n },\n {\n \"tag\": "hexatetrahedron",\n \"popularity\": 19642\n },\n {\n \"tag\": "pliciform",\n \"popularity\": 19609\n },\n {\n \"tag\": "zimbalon",\n \"popularity\": 19575\n },\n {\n \"tag\": "annexational",\n \"popularity\": 19542\n },\n {\n \"tag\": "eurhodol",\n \"popularity\": 19508\n },\n {\n \"tag\": "yark",\n \"popularity\": 19475\n },\n {\n \"tag\": "illegality nitroalizarin",\n \"popularity\": 19442\n },\n {\n \"tag\": "quadratum",\n \"popularity\": 19409\n },\n {\n \"tag\": "saccharine",\n \"popularity\": 19376\n },\n {\n \"tag\": "unemploy",\n \"popularity\": 19343\n },\n {\n \"tag\": "uniclinal unipotent",\n \"popularity\": 19310\n },\n {\n \"tag\": "turbo",\n \"popularity\": 19277\n },\n {\n \"tag\": "sybarism",\n \"popularity\": 19244\n },\n {\n \"tag\": "motacilline",\n \"popularity\": 19212\n },\n {\n \"tag\": "weaselly",\n \"popularity\": 19179\n },\n {\n \"tag\": "plastid",\n \"popularity\": 19147\n },\n {\n \"tag\": "wasting",\n \"popularity\": 19114\n },\n {\n \"tag\": "begrime fluting",\n \"popularity\": 19082\n },\n {\n \"tag\": "Nephilinae",\n \"popularity\": 19050\n },\n {\n \"tag\": "disregardance",\n \"popularity\": 19018\n },\n {\n \"tag\": "Shakerlike",\n \"popularity\": 18986\n },\n {\n \"tag\": "uniped",\n \"popularity\": 18954\n },\n {\n \"tag\": "knap",\n \"popularity\": 18922\n },\n {\n \"tag\": "electivism undergardener",\n \"popularity\": 18890\n },\n {\n \"tag\": "hulverheaded",\n \"popularity\": 18858\n },\n {\n \"tag\": "unruptured",\n \"popularity\": 18827\n },\n {\n \"tag\": "solemnize credently",\n \"popularity\": 18795\n },\n {\n \"tag\": "pentastomoid possessingly",\n \"popularity\": 18764\n },\n {\n \"tag\": "octose",\n \"popularity\": 18733\n },\n {\n \"tag\": "psithurism indefensibility",\n \"popularity\": 18701\n },\n {\n \"tag\": "torrentuous cyanometer subcrenate",\n \"popularity\": 18670\n },\n {\n \"tag\": "photoplaywright tapaculo",\n \"popularity\": 18639\n },\n {\n \"tag\": "univalence",\n \"popularity\": 18608\n },\n {\n \"tag\": "Porthetria",\n \"popularity\": 18577\n },\n {\n \"tag\": "funambulo",\n \"popularity\": 18546\n },\n {\n \"tag\": "pedion",\n \"popularity\": 18515\n },\n {\n \"tag\": "horticulturally",\n \"popularity\": 18485\n },\n {\n \"tag\": "marennin",\n \"popularity\": 18454\n },\n {\n \"tag\": "horselaugh",\n \"popularity\": 18423\n },\n {\n \"tag\": "semiexecutive",\n \"popularity\": 18393\n },\n {\n \"tag\": "Monopteridae",\n \"popularity\": 18363\n },\n {\n \"tag\": "commonable",\n \"popularity\": 18332\n },\n {\n \"tag\": "dreariment",\n \"popularity\": 18302\n },\n {\n \"tag\": "disbud",\n \"popularity\": 18272\n },\n {\n \"tag\": "monocled",\n \"popularity\": 18242\n },\n {\n \"tag\": "hurlbarrow",\n \"popularity\": 18212\n },\n {\n \"tag\": "opiateproof",\n \"popularity\": 18182\n },\n {\n \"tag\": "Fahrenheit",\n \"popularity\": 18152\n },\n {\n \"tag\": "writhed",\n \"popularity\": 18122\n },\n {\n \"tag\": "Volstead",\n \"popularity\": 18093\n },\n {\n \"tag\": "yesternight",\n \"popularity\": 18063\n },\n {\n \"tag\": "readmittance",\n \"popularity\": 18033\n },\n {\n \"tag\": "reiterable",\n \"popularity\": 18004\n },\n {\n \"tag\": "triquetral",\n \"popularity\": 17975\n },\n {\n \"tag\": "guillotinement",\n \"popularity\": 17945\n },\n {\n \"tag\": "repermission",\n \"popularity\": 17916\n },\n {\n \"tag\": "assishly",\n \"popularity\": 17887\n },\n {\n \"tag\": "daidle",\n \"popularity\": 17858\n },\n {\n \"tag\": "prismatoid",\n \"popularity\": 17829\n },\n {\n \"tag\": "irreptitious",\n \"popularity\": 17800\n },\n {\n \"tag\": "sourdeline",\n \"popularity\": 17771\n },\n {\n \"tag\": "Austrian",\n \"popularity\": 17742\n },\n {\n \"tag\": "psychorrhagic",\n \"popularity\": 17713\n },\n {\n \"tag\": "Monumbo",\n \"popularity\": 17685\n },\n {\n \"tag\": "cloiochoanitic",\n \"popularity\": 17656\n },\n {\n \"tag\": "hant",\n \"popularity\": 17628\n },\n {\n \"tag\": "roily pulldown",\n \"popularity\": 17599\n },\n {\n \"tag\": "recongratulation",\n \"popularity\": 17571\n },\n {\n \"tag\": "Peking",\n \"popularity\": 17543\n },\n {\n \"tag\": "erdvark",\n \"popularity\": 17514\n },\n {\n \"tag\": "antimnemonic",\n \"popularity\": 17486\n },\n {\n \"tag\": "noncapillarity",\n \"popularity\": 17458\n },\n {\n \"tag\": "irrepressive",\n \"popularity\": 17430\n },\n {\n \"tag\": "Petromyzontes",\n \"popularity\": 17402\n },\n {\n \"tag\": "piscatorially",\n \"popularity\": 17374\n },\n {\n \"tag\": "cholesterosis",\n \"popularity\": 17346\n },\n {\n \"tag\": "denunciate",\n \"popularity\": 17319\n },\n {\n \"tag\": "unmetalled",\n \"popularity\": 17291\n },\n {\n \"tag\": "Tigris enruin",\n \"popularity\": 17263\n },\n {\n \"tag\": "anaspalin",\n \"popularity\": 17236\n },\n {\n \"tag\": "monodromy",\n \"popularity\": 17208\n },\n {\n \"tag\": "Canichanan",\n \"popularity\": 17181\n },\n {\n \"tag\": "mesolabe",\n \"popularity\": 17154\n },\n {\n \"tag\": "trichothallic overcunningness",\n \"popularity\": 17127\n },\n {\n \"tag\": "spinsterishly",\n \"popularity\": 17099\n },\n {\n \"tag\": "sensilla",\n \"popularity\": 17072\n },\n {\n \"tag\": "wifelkin",\n \"popularity\": 17045\n },\n {\n \"tag\": "suppositionless",\n \"popularity\": 17018\n },\n {\n \"tag\": "irksomeness",\n \"popularity\": 16991\n },\n {\n \"tag\": "sanbenito",\n \"popularity\": 16964\n },\n {\n \"tag\": "nonstatement",\n \"popularity\": 16938\n },\n {\n \"tag\": "phenoloid",\n \"popularity\": 16911\n },\n {\n \"tag\": "Steinberger",\n \"popularity\": 16884\n },\n {\n \"tag\": "replicated boom",\n \"popularity\": 16858\n },\n {\n \"tag\": "sciomachiology",\n \"popularity\": 16831\n },\n {\n \"tag\": "starwise",\n \"popularity\": 16805\n },\n {\n \"tag\": "prerich",\n \"popularity\": 16778\n },\n {\n \"tag\": "unspawned",\n \"popularity\": 16752\n },\n {\n \"tag\": "unindentable",\n \"popularity\": 16726\n },\n {\n \"tag\": "stromatic",\n \"popularity\": 16700\n },\n {\n \"tag\": "fetishize",\n \"popularity\": 16673\n },\n {\n \"tag\": "dihydroxy",\n \"popularity\": 16647\n },\n {\n \"tag\": "precaudal",\n \"popularity\": 16621\n },\n {\n \"tag\": "Madagascar",\n \"popularity\": 16595\n },\n {\n \"tag\": "repinement",\n \"popularity\": 16570\n },\n {\n \"tag\": "noncathedral wenzel",\n \"popularity\": 16544\n },\n {\n \"tag\": "corollike",\n \"popularity\": 16518\n },\n {\n \"tag\": "pubes unamortization",\n \"popularity\": 16492\n },\n {\n \"tag\": "brickcroft",\n \"popularity\": 16467\n },\n {\n \"tag\": "intertrabecular",\n \"popularity\": 16441\n },\n {\n \"tag\": "formulaic",\n \"popularity\": 16416\n },\n {\n \"tag\": "arienzo",\n \"popularity\": 16390\n },\n {\n \"tag\": "Mazzinian",\n \"popularity\": 16365\n },\n {\n \"tag\": "wallowishly",\n \"popularity\": 16339\n },\n {\n \"tag\": "sysselman",\n \"popularity\": 16314\n },\n {\n \"tag\": "seligmannite",\n \"popularity\": 16289\n },\n {\n \"tag\": "harlequinery",\n \"popularity\": 16264\n },\n {\n \"tag\": "zucchetto",\n \"popularity\": 16239\n },\n {\n \"tag\": "malonyl",\n \"popularity\": 16214\n },\n {\n \"tag\": "patwari",\n \"popularity\": 16189\n },\n {\n \"tag\": "neoholmia venturesomeness",\n \"popularity\": 16164\n },\n {\n \"tag\": "Dehwar",\n \"popularity\": 16139\n },\n {\n \"tag\": "fetiferous",\n \"popularity\": 16114\n },\n {\n \"tag\": "chromatophore",\n \"popularity\": 16090\n },\n {\n \"tag\": "reregistration",\n \"popularity\": 16065\n },\n {\n \"tag\": "alienor",\n \"popularity\": 16040\n },\n {\n \"tag\": "Hexagynia",\n \"popularity\": 16016\n },\n {\n \"tag\": "cerebrotonia",\n \"popularity\": 15991\n },\n {\n \"tag\": "deedbox",\n \"popularity\": 15967\n },\n {\n \"tag\": "staab",\n \"popularity\": 15943\n },\n {\n \"tag\": "uratemia",\n \"popularity\": 15918\n },\n {\n \"tag\": "flaunt",\n \"popularity\": 15894\n },\n {\n \"tag\": "bogy",\n \"popularity\": 15870\n },\n {\n \"tag\": "subcartilaginous",\n \"popularity\": 15846\n },\n {\n \"tag\": "protonephridial",\n \"popularity\": 15822\n },\n {\n \"tag\": "Boswellia",\n \"popularity\": 15798\n },\n {\n \"tag\": "relaxant untiaraed protoepiphyte",\n \"popularity\": 15774\n },\n {\n \"tag\": "nesslerization",\n \"popularity\": 15750\n },\n {\n \"tag\": "precession",\n \"popularity\": 15726\n },\n {\n \"tag\": "peat",\n \"popularity\": 15702\n },\n {\n \"tag\": "unbit",\n \"popularity\": 15678\n },\n {\n \"tag\": "snailish",\n \"popularity\": 15655\n },\n {\n \"tag\": "porismatical",\n \"popularity\": 15631\n },\n {\n \"tag\": "hooflike",\n \"popularity\": 15608\n },\n {\n \"tag\": "resuppose phene cranic",\n \"popularity\": 15584\n },\n {\n \"tag\": "peptonization kipskin",\n \"popularity\": 15561\n },\n {\n \"tag\": "birdstone",\n \"popularity\": 15537\n },\n {\n \"tag\": "empty inferoanterior",\n \"popularity\": 15514\n },\n {\n \"tag\": "androtauric",\n \"popularity\": 15491\n },\n {\n \"tag\": "triamide",\n \"popularity\": 15467\n },\n {\n \"tag\": "showmanry",\n \"popularity\": 15444\n },\n {\n \"tag\": "doing",\n \"popularity\": 15421\n },\n {\n \"tag\": "bouchaleen",\n \"popularity\": 15398\n },\n {\n \"tag\": "precollude",\n \"popularity\": 15375\n },\n {\n \"tag\": "finger",\n \"popularity\": 15352\n },\n {\n \"tag\": "limnetic intermessenger",\n \"popularity\": 15329\n },\n {\n \"tag\": "uncharitable picrotoxic",\n \"popularity\": 15306\n },\n {\n \"tag\": "nationalizer Phasmidae",\n \"popularity\": 15283\n },\n {\n \"tag\": "laughingstock",\n \"popularity\": 15261\n },\n {\n \"tag\": "nondeferential",\n \"popularity\": 15238\n },\n {\n \"tag\": "uproariously",\n \"popularity\": 15215\n },\n {\n \"tag\": "manzanilla",\n \"popularity\": 15193\n },\n {\n \"tag\": "khahoon",\n \"popularity\": 15170\n },\n {\n \"tag\": "olericulturally longshanks",\n \"popularity\": 15148\n },\n {\n \"tag\": "enthusiastically methionic",\n \"popularity\": 15125\n },\n {\n \"tag\": "pobs",\n \"popularity\": 15103\n },\n {\n \"tag\": "tricarpellate",\n \"popularity\": 15081\n },\n {\n \"tag\": "souterrain",\n \"popularity\": 15058\n },\n {\n \"tag\": "tethelin",\n \"popularity\": 15036\n },\n {\n \"tag\": "tartle",\n \"popularity\": 15014\n },\n {\n \"tag\": "tidelike",\n \"popularity\": 14992\n },\n {\n \"tag\": "cosmoramic",\n \"popularity\": 14970\n },\n {\n \"tag\": "pretardiness",\n \"popularity\": 14948\n },\n {\n \"tag\": "insoul",\n \"popularity\": 14926\n },\n {\n \"tag\": "anthroxan",\n \"popularity\": 14904\n },\n {\n \"tag\": "jilter",\n \"popularity\": 14882\n },\n {\n \"tag\": "pectinibranchian trematode",\n \"popularity\": 14860\n },\n {\n \"tag\": "Renaissancist",\n \"popularity\": 14838\n },\n {\n \"tag\": "imaginant",\n \"popularity\": 14817\n },\n {\n \"tag\": "supercensure",\n \"popularity\": 14795\n },\n {\n \"tag\": "festilogy",\n \"popularity\": 14773\n },\n {\n \"tag\": "regression",\n \"popularity\": 14752\n },\n {\n \"tag\": "mesobregmate languorously",\n \"popularity\": 14730\n },\n {\n \"tag\": "unsupernaturalized",\n \"popularity\": 14709\n },\n {\n \"tag\": "boobyish",\n \"popularity\": 14687\n },\n {\n \"tag\": "scopolamine",\n \"popularity\": 14666\n },\n {\n \"tag\": "reamputation unchristianly",\n \"popularity\": 14645\n },\n {\n \"tag\": "cuneatic",\n \"popularity\": 14623\n },\n {\n \"tag\": "heathberry",\n \"popularity\": 14602\n },\n {\n \"tag\": "hate",\n \"popularity\": 14581\n },\n {\n \"tag\": "redeemableness",\n \"popularity\": 14560\n },\n {\n \"tag\": "damasse",\n \"popularity\": 14539\n },\n {\n \"tag\": "thrillsome",\n \"popularity\": 14518\n },\n {\n \"tag\": "disseverment",\n \"popularity\": 14497\n },\n {\n \"tag\": "underbishopric Ostyak",\n \"popularity\": 14476\n },\n {\n \"tag\": "Exoascales",\n \"popularity\": 14455\n },\n {\n \"tag\": "soiled",\n \"popularity\": 14434\n },\n {\n \"tag\": "Cain",\n \"popularity\": 14413\n },\n {\n \"tag\": "mismanageable arenae",\n \"popularity\": 14392\n },\n {\n \"tag\": "manducate unhinderably",\n \"popularity\": 14372\n },\n {\n \"tag\": "peregrin",\n \"popularity\": 14351\n },\n {\n \"tag\": "musicianly",\n \"popularity\": 14330\n },\n {\n \"tag\": "aln",\n \"popularity\": 14310\n },\n {\n \"tag\": "intercentrum",\n \"popularity\": 14289\n },\n {\n \"tag\": "roothold",\n \"popularity\": 14269\n },\n {\n \"tag\": "jane aneurism",\n \"popularity\": 14248\n },\n {\n \"tag\": "insinuatively forefeel phytolatrous",\n \"popularity\": 14228\n },\n {\n \"tag\": "kanchil",\n \"popularity\": 14208\n },\n {\n \"tag\": "Austrophile",\n \"popularity\": 14187\n },\n {\n \"tag\": "unterrorized",\n \"popularity\": 14167\n },\n {\n \"tag\": "admeasure",\n \"popularity\": 14147\n },\n {\n \"tag\": "electrodissolution",\n \"popularity\": 14127\n },\n {\n \"tag\": "unweddedly",\n \"popularity\": 14107\n },\n {\n \"tag\": "unannoying",\n \"popularity\": 14087\n },\n {\n \"tag\": "uningenuous",\n \"popularity\": 14067\n },\n {\n \"tag\": "omnibenevolent",\n \"popularity\": 14047\n },\n {\n \"tag\": "commissure",\n \"popularity\": 14027\n },\n {\n \"tag\": "tellureted",\n \"popularity\": 14007\n },\n {\n \"tag\": "suffragan",\n \"popularity\": 13987\n },\n {\n \"tag\": "sphaeriaceous",\n \"popularity\": 13967\n },\n {\n \"tag\": "unfearing",\n \"popularity\": 13947\n },\n {\n \"tag\": "stentoriousness precounsellor",\n \"popularity\": 13928\n },\n {\n \"tag\": "haemaspectroscope",\n \"popularity\": 13908\n },\n {\n \"tag\": "teras",\n \"popularity\": 13888\n },\n {\n \"tag\": "pulicine",\n \"popularity\": 13869\n },\n {\n \"tag\": "colicystopyelitis",\n \"popularity\": 13849\n },\n {\n \"tag\": "Physalia",\n \"popularity\": 13830\n },\n {\n \"tag\": "Saxicolidae",\n \"popularity\": 13810\n },\n {\n \"tag\": "peritonital",\n \"popularity\": 13791\n },\n {\n \"tag\": "dysphotic",\n \"popularity\": 13771\n },\n {\n \"tag\": "unabandoned",\n \"popularity\": 13752\n },\n {\n \"tag\": "rashful",\n \"popularity\": 13733\n },\n {\n \"tag\": "goodyness Manobo",\n \"popularity\": 13714\n },\n {\n \"tag\": "glaring",\n \"popularity\": 13694\n },\n {\n \"tag\": "horrorful",\n \"popularity\": 13675\n },\n {\n \"tag\": "intercepting",\n \"popularity\": 13656\n },\n {\n \"tag\": "semifine",\n \"popularity\": 13637\n },\n {\n \"tag\": "Gaypoo",\n \"popularity\": 13618\n },\n {\n \"tag\": "Metrosideros",\n \"popularity\": 13599\n },\n {\n \"tag\": "thoracicolumbar",\n \"popularity\": 13580\n },\n {\n \"tag\": "unserried",\n \"popularity\": 13561\n },\n {\n \"tag\": "keeperess cauterization",\n \"popularity\": 13542\n },\n {\n \"tag\": "administrant",\n \"popularity\": 13523\n },\n {\n \"tag\": "unpropitiatedness",\n \"popularity\": 13505\n },\n {\n \"tag\": "pensileness",\n \"popularity\": 13486\n },\n {\n \"tag\": "quinaldic unreceivable",\n \"popularity\": 13467\n },\n {\n \"tag\": "Carnaria",\n \"popularity\": 13448\n },\n {\n \"tag\": "azothionium wurrus",\n \"popularity\": 13430\n },\n {\n \"tag\": "mistresshood",\n \"popularity\": 13411\n },\n {\n \"tag\": "Savara",\n \"popularity\": 13393\n },\n {\n \"tag\": "dasyurine",\n \"popularity\": 13374\n },\n {\n \"tag\": "superideal",\n \"popularity\": 13356\n },\n {\n \"tag\": "Parisianize",\n \"popularity\": 13337\n },\n {\n \"tag\": "underearth",\n \"popularity\": 13319\n },\n {\n \"tag\": "athrogenic",\n \"popularity\": 13301\n },\n {\n \"tag\": "communicate",\n \"popularity\": 13282\n },\n {\n \"tag\": "denervation enworthed",\n \"popularity\": 13264\n },\n {\n \"tag\": "subbromide",\n \"popularity\": 13246\n },\n {\n \"tag\": "stenocoriasis",\n \"popularity\": 13228\n },\n {\n \"tag\": "facetiousness",\n \"popularity\": 13209\n },\n {\n \"tag\": "twaddling",\n \"popularity\": 13191\n },\n {\n \"tag\": "tetartoconid",\n \"popularity\": 13173\n },\n {\n \"tag\": "audiophile",\n \"popularity\": 13155\n },\n {\n \"tag\": "fustigate",\n \"popularity\": 13137\n },\n {\n \"tag\": "Sorbian cacophonia",\n \"popularity\": 13119\n },\n {\n \"tag\": "fondish",\n \"popularity\": 13101\n },\n {\n \"tag\": "endomastoiditis",\n \"popularity\": 13084\n },\n {\n \"tag\": "sniptious",\n \"popularity\": 13066\n },\n {\n \"tag\": "glochidiate",\n \"popularity\": 13048\n },\n {\n \"tag\": "polycarboxylic",\n \"popularity\": 13030\n },\n {\n \"tag\": "stamp",\n \"popularity\": 13012\n },\n {\n \"tag\": "tritonymph endotoxoid",\n \"popularity\": 12995\n },\n {\n \"tag\": "wolfskin",\n \"popularity\": 12977\n },\n {\n \"tag\": "oncosimeter",\n \"popularity\": 12959\n },\n {\n \"tag\": "outward",\n \"popularity\": 12942\n },\n {\n \"tag\": "circumscribed",\n \"popularity\": 12924\n },\n {\n \"tag\": "autohemolytic",\n \"popularity\": 12907\n },\n {\n \"tag\": "isorhamnose",\n \"popularity\": 12889\n },\n {\n \"tag\": "monarchomachic",\n \"popularity\": 12872\n },\n {\n \"tag\": "phaenomenon",\n \"popularity\": 12855\n },\n {\n \"tag\": "angiopressure",\n \"popularity\": 12837\n },\n {\n \"tag\": "similarize",\n \"popularity\": 12820\n },\n {\n \"tag\": "unseeable",\n \"popularity\": 12803\n },\n {\n \"tag\": "Toryize",\n \"popularity\": 12785\n },\n {\n \"tag\": "fruitling",\n \"popularity\": 12768\n },\n {\n \"tag\": "axle",\n \"popularity\": 12751\n },\n {\n \"tag\": "priestal cocked",\n \"popularity\": 12734\n },\n {\n \"tag\": "serotoxin",\n \"popularity\": 12717\n },\n {\n \"tag\": "unmovably",\n \"popularity\": 12700\n },\n {\n \"tag\": "darbha",\n \"popularity\": 12683\n },\n {\n \"tag\": "Mongolize",\n \"popularity\": 12666\n },\n {\n \"tag\": "clusteringly",\n \"popularity\": 12649\n },\n {\n \"tag\": "tendence",\n \"popularity\": 12632\n },\n {\n \"tag\": "foziness",\n \"popularity\": 12615\n },\n {\n \"tag\": "brickkiln lithify",\n \"popularity\": 12598\n },\n {\n \"tag\": "unpriest",\n \"popularity\": 12581\n },\n {\n \"tag\": "convincer",\n \"popularity\": 12564\n },\n {\n \"tag\": "mornlike",\n \"popularity\": 12548\n },\n {\n \"tag\": "overaddiction ostentatiousness",\n \"popularity\": 12531\n },\n {\n \"tag\": "diffusively moccasin pendom",\n \"popularity\": 12514\n },\n {\n \"tag\": "boose",\n \"popularity\": 12498\n },\n {\n \"tag\": "myonosus",\n \"popularity\": 12481\n },\n {\n \"tag\": "handsome",\n \"popularity\": 12464\n },\n {\n \"tag\": "paroxysmic",\n \"popularity\": 12448\n },\n {\n \"tag\": "Ulidian",\n \"popularity\": 12431\n },\n {\n \"tag\": "heartache",\n \"popularity\": 12415\n },\n {\n \"tag\": "torporize",\n \"popularity\": 12398\n },\n {\n \"tag\": "hippish",\n \"popularity\": 12382\n },\n {\n \"tag\": "stigmal militation",\n \"popularity\": 12366\n },\n {\n \"tag\": "matmaker",\n \"popularity\": 12349\n },\n {\n \"tag\": "marantaceous bivoluminous",\n \"popularity\": 12333\n },\n {\n \"tag\": "Uraniidae",\n \"popularity\": 12317\n },\n {\n \"tag\": "risper",\n \"popularity\": 12301\n },\n {\n \"tag\": "tintinnabulation",\n \"popularity\": 12284\n },\n {\n \"tag\": "tributorian",\n \"popularity\": 12268\n },\n {\n \"tag\": "ashamedly",\n \"popularity\": 12252\n },\n {\n \"tag\": "Macrourus",\n \"popularity\": 12236\n },\n {\n \"tag\": "Chora",\n \"popularity\": 12220\n },\n {\n \"tag\": "caul",\n \"popularity\": 12204\n },\n {\n \"tag\": "exsector",\n \"popularity\": 12188\n },\n {\n \"tag\": "acutish",\n \"popularity\": 12172\n },\n {\n \"tag\": "amphichrome",\n \"popularity\": 12156\n },\n {\n \"tag\": "guarder",\n \"popularity\": 12140\n },\n {\n \"tag\": "sculpturally",\n \"popularity\": 12124\n },\n {\n \"tag\": "benightmare",\n \"popularity\": 12108\n },\n {\n \"tag\": "chucky",\n \"popularity\": 12093\n },\n {\n \"tag\": "Venetian",\n \"popularity\": 12077\n },\n {\n \"tag\": "autotheater",\n \"popularity\": 12061\n },\n {\n \"tag\": "planarioid",\n \"popularity\": 12045\n },\n {\n \"tag\": "handkerchiefful",\n \"popularity\": 12030\n },\n {\n \"tag\": "fuliginousness potentize",\n \"popularity\": 12014\n },\n {\n \"tag\": "pantheum",\n \"popularity\": 11998\n },\n {\n \"tag\": "heavyweight",\n \"popularity\": 11983\n },\n {\n \"tag\": "unbrick",\n \"popularity\": 11967\n },\n {\n \"tag\": "duomachy",\n \"popularity\": 11952\n },\n {\n \"tag\": "polyphyodont",\n \"popularity\": 11936\n },\n {\n \"tag\": "hibernacle",\n \"popularity\": 11921\n },\n {\n \"tag\": "undistend",\n \"popularity\": 11905\n },\n {\n \"tag\": "hystericky",\n \"popularity\": 11890\n },\n {\n \"tag\": "paleolimnology",\n \"popularity\": 11875\n },\n {\n \"tag\": "cedarware",\n \"popularity\": 11859\n },\n {\n \"tag\": "overwrested",\n \"popularity\": 11844\n },\n {\n \"tag\": "Syriacism",\n \"popularity\": 11829\n },\n {\n \"tag\": "pretan",\n \"popularity\": 11813\n },\n {\n \"tag\": "formant",\n \"popularity\": 11798\n },\n {\n \"tag\": "pharmacopoeist Fedia",\n \"popularity\": 11783\n },\n {\n \"tag\": "exorcist eerisome",\n \"popularity\": 11768\n },\n {\n \"tag\": "separation",\n \"popularity\": 11753\n },\n {\n \"tag\": "infancy",\n \"popularity\": 11738\n },\n {\n \"tag\": "ecrasite",\n \"popularity\": 11723\n },\n {\n \"tag\": "propolize",\n \"popularity\": 11708\n },\n {\n \"tag\": "uncram phyllin",\n \"popularity\": 11693\n },\n {\n \"tag\": "thymopathy",\n \"popularity\": 11678\n },\n {\n \"tag\": "omniscient",\n \"popularity\": 11663\n },\n {\n \"tag\": "coussinet hazer",\n \"popularity\": 11648\n },\n {\n \"tag\": "contributiveness",\n \"popularity\": 11633\n },\n {\n \"tag\": "septifluous",\n \"popularity\": 11618\n },\n {\n \"tag\": "halfness",\n \"popularity\": 11603\n },\n {\n \"tag\": "tocher",\n \"popularity\": 11589\n },\n {\n \"tag\": "monotonist",\n \"popularity\": 11574\n },\n {\n \"tag\": "headchair",\n \"popularity\": 11559\n },\n {\n \"tag\": "everywhence",\n \"popularity\": 11544\n },\n {\n \"tag\": "gerate",\n \"popularity\": 11530\n },\n {\n \"tag\": "unrepellent",\n \"popularity\": 11515\n },\n {\n \"tag\": "inidoneous",\n \"popularity\": 11500\n },\n {\n \"tag\": "Rifi",\n \"popularity\": 11486\n },\n {\n \"tag\": "unstop",\n \"popularity\": 11471\n },\n {\n \"tag\": "conformer",\n \"popularity\": 11457\n },\n {\n \"tag\": "vivisectionally",\n \"popularity\": 11442\n },\n {\n \"tag\": "nonfinishing",\n \"popularity\": 11428\n },\n {\n \"tag\": "tyranness",\n \"popularity\": 11413\n },\n {\n \"tag\": "shepherdage havoc",\n \"popularity\": 11399\n },\n {\n \"tag\": "coronale",\n \"popularity\": 11385\n },\n {\n \"tag\": "airmarker",\n \"popularity\": 11370\n },\n {\n \"tag\": "subpanel",\n \"popularity\": 11356\n },\n {\n \"tag\": "conciliation",\n \"popularity\": 11342\n },\n {\n \"tag\": "supergun",\n \"popularity\": 11327\n },\n {\n \"tag\": "photoheliography",\n \"popularity\": 11313\n },\n {\n \"tag\": "cacosmia",\n \"popularity\": 11299\n },\n {\n \"tag\": "caressant",\n \"popularity\": 11285\n },\n {\n \"tag\": "swivet",\n \"popularity\": 11270\n },\n {\n \"tag\": "coddler",\n \"popularity\": 11256\n },\n {\n \"tag\": "rakehellish",\n \"popularity\": 11242\n },\n {\n \"tag\": "recohabitation",\n \"popularity\": 11228\n },\n {\n \"tag\": "postillator",\n \"popularity\": 11214\n },\n {\n \"tag\": "receipt",\n \"popularity\": 11200\n },\n {\n \"tag\": "nonconformistical",\n \"popularity\": 11186\n },\n {\n \"tag\": "unglorified",\n \"popularity\": 11172\n },\n {\n \"tag\": "unordinariness",\n \"popularity\": 11158\n },\n {\n \"tag\": "tetrahydroxy",\n \"popularity\": 11144\n },\n {\n \"tag\": "haploperistomic corporeity",\n \"popularity\": 11130\n },\n {\n \"tag\": "varical",\n \"popularity\": 11117\n },\n {\n \"tag\": "pilferment",\n \"popularity\": 11103\n },\n {\n \"tag\": "reverentially playcraft",\n \"popularity\": 11089\n },\n {\n \"tag\": "unretentive",\n \"popularity\": 11075\n },\n {\n \"tag\": "readiness",\n \"popularity\": 11061\n },\n {\n \"tag\": "thermomagnetism",\n \"popularity\": 11048\n },\n {\n \"tag\": "spotless",\n \"popularity\": 11034\n },\n {\n \"tag\": "semishrubby",\n \"popularity\": 11020\n },\n {\n \"tag\": "metrotomy",\n \"popularity\": 11007\n },\n {\n \"tag\": "hocker",\n \"popularity\": 10993\n },\n {\n \"tag\": "anecdotal",\n \"popularity\": 10979\n },\n {\n \"tag\": "tetrabelodont",\n \"popularity\": 10966\n },\n {\n \"tag\": "Ramillied",\n \"popularity\": 10952\n },\n {\n \"tag\": "sympatheticism",\n \"popularity\": 10939\n },\n {\n \"tag\": "kiskatom",\n \"popularity\": 10925\n },\n {\n \"tag\": "concyclically",\n \"popularity\": 10912\n },\n {\n \"tag\": "tunicless",\n \"popularity\": 10899\n },\n {\n \"tag\": "formalistic",\n \"popularity\": 10885\n },\n {\n \"tag\": "thermacogenesis",\n \"popularity\": 10872\n },\n {\n \"tag\": "multimotored",\n \"popularity\": 10858\n },\n {\n \"tag\": "inversive",\n \"popularity\": 10845\n },\n {\n \"tag\": "Jatki",\n \"popularity\": 10832\n },\n {\n \"tag\": "highest",\n \"popularity\": 10818\n },\n {\n \"tag\": "rubidic",\n \"popularity\": 10805\n },\n {\n \"tag\": "acranial",\n \"popularity\": 10792\n },\n {\n \"tag\": "pulvinulus",\n \"popularity\": 10779\n },\n {\n \"tag\": "nattiness",\n \"popularity\": 10766\n },\n {\n \"tag\": "antisimoniacal",\n \"popularity\": 10752\n },\n {\n \"tag\": "tetanize",\n \"popularity\": 10739\n },\n {\n \"tag\": "spectrophobia",\n \"popularity\": 10726\n },\n {\n \"tag\": "monopolitical",\n \"popularity\": 10713\n },\n {\n \"tag\": "teallite",\n \"popularity\": 10700\n },\n {\n \"tag\": "alicyclic interpellator",\n \"popularity\": 10687\n },\n {\n \"tag\": "nonsynthesized",\n \"popularity\": 10674\n },\n {\n \"tag\": "wheelwrighting",\n \"popularity\": 10661\n },\n {\n \"tag\": "pelliculate",\n \"popularity\": 10648\n },\n {\n \"tag\": "Euphyllopoda",\n \"popularity\": 10635\n },\n {\n \"tag\": "graver",\n \"popularity\": 10622\n },\n {\n \"tag\": "automorph",\n \"popularity\": 10609\n },\n {\n \"tag\": "underhanded",\n \"popularity\": 10597\n },\n {\n \"tag\": "causal",\n \"popularity\": 10584\n },\n {\n \"tag\": "odoom",\n \"popularity\": 10571\n },\n {\n \"tag\": "apodictical",\n \"popularity\": 10558\n },\n {\n \"tag\": "foundery",\n \"popularity\": 10545\n },\n {\n \"tag\": "unneighbored",\n \"popularity\": 10533\n },\n {\n \"tag\": "woolshearing",\n \"popularity\": 10520\n },\n {\n \"tag\": "boschveld",\n \"popularity\": 10507\n },\n {\n \"tag\": "unhardened lipopod",\n \"popularity\": 10495\n },\n {\n \"tag\": "unenriching",\n \"popularity\": 10482\n },\n {\n \"tag\": "spak",\n \"popularity\": 10469\n },\n {\n \"tag\": "yogasana",\n \"popularity\": 10457\n },\n {\n \"tag\": "depoetize",\n \"popularity\": 10444\n },\n {\n \"tag\": "parousiamania",\n \"popularity\": 10432\n },\n {\n \"tag\": "longlegs",\n \"popularity\": 10419\n },\n {\n \"tag\": "gelatinizability",\n \"popularity\": 10407\n },\n {\n \"tag\": "edeology",\n \"popularity\": 10394\n },\n {\n \"tag\": "sodwork",\n \"popularity\": 10382\n },\n {\n \"tag\": "somnambule",\n \"popularity\": 10369\n },\n {\n \"tag\": "antiquing",\n \"popularity\": 10357\n },\n {\n \"tag\": "intaker",\n \"popularity\": 10344\n },\n {\n \"tag\": "Gerberia",\n \"popularity\": 10332\n },\n {\n \"tag\": "preadmit",\n \"popularity\": 10320\n },\n {\n \"tag\": "bullhorn",\n \"popularity\": 10307\n },\n {\n \"tag\": "sororal",\n \"popularity\": 10295\n },\n {\n \"tag\": "phaeophyceous",\n \"popularity\": 10283\n },\n {\n \"tag\": "omphalopsychite",\n \"popularity\": 10271\n },\n {\n \"tag\": "substantious",\n \"popularity\": 10258\n },\n {\n \"tag\": "undemonstratively",\n \"popularity\": 10246\n },\n {\n \"tag\": "corallike blackit",\n \"popularity\": 10234\n },\n {\n \"tag\": "amoebous",\n \"popularity\": 10222\n },\n {\n \"tag\": "Polypodium",\n \"popularity\": 10210\n },\n {\n \"tag\": "blodite",\n \"popularity\": 10198\n },\n {\n \"tag\": "hordarian",\n \"popularity\": 10186\n },\n {\n \"tag\": "nonmoral",\n \"popularity\": 10174\n },\n {\n \"tag\": "dredgeful",\n \"popularity\": 10162\n },\n {\n \"tag\": "nourishingly",\n \"popularity\": 10150\n },\n {\n \"tag\": "seamy",\n \"popularity\": 10138\n },\n {\n \"tag\": "vara",\n \"popularity\": 10126\n },\n {\n \"tag\": "incorruptibleness",\n \"popularity\": 10114\n },\n {\n \"tag\": "manipulator",\n \"popularity\": 10102\n },\n {\n \"tag\": "chromodiascope uncountably",\n \"popularity\": 10090\n },\n {\n \"tag\": "typhemia",\n \"popularity\": 10078\n },\n {\n \"tag\": "Smalcaldic",\n \"popularity\": 10066\n },\n {\n \"tag\": "precontrive",\n \"popularity\": 10054\n },\n {\n \"tag\": "sowarry",\n \"popularity\": 10042\n },\n {\n \"tag\": "monopodic",\n \"popularity\": 10031\n },\n {\n \"tag\": "recodify",\n \"popularity\": 10019\n },\n {\n \"tag\": "phosphowolframic rimple",\n \"popularity\": 10007\n },\n {\n \"tag\": "triconch",\n \"popularity\": 9995\n },\n {\n \"tag\": "pycnodontoid",\n \"popularity\": 9984\n },\n {\n \"tag\": "bradyspermatism",\n \"popularity\": 9972\n },\n {\n \"tag\": "extensionist",\n \"popularity\": 9960\n },\n {\n \"tag\": "characterize",\n \"popularity\": 9949\n },\n {\n \"tag\": "anatreptic proteolytic",\n \"popularity\": 9937\n },\n {\n \"tag\": "waterboard",\n \"popularity\": 9925\n },\n {\n \"tag\": "allopathically",\n \"popularity\": 9914\n },\n {\n \"tag\": "arithmetician",\n \"popularity\": 9902\n },\n {\n \"tag\": "subsist",\n \"popularity\": 9891\n },\n {\n \"tag\": "Islamitish",\n \"popularity\": 9879\n },\n {\n \"tag\": "biddy",\n \"popularity\": 9868\n },\n {\n \"tag\": "reverberation",\n \"popularity\": 9856\n },\n {\n \"tag\": "Zaporogue",\n \"popularity\": 9845\n },\n {\n \"tag\": "soapberry",\n \"popularity\": 9833\n },\n {\n \"tag\": "physiognomics",\n \"popularity\": 9822\n },\n {\n \"tag\": "hospitalization",\n \"popularity\": 9810\n },\n {\n \"tag\": "dissembler",\n \"popularity\": 9799\n },\n {\n \"tag\": "festinate",\n \"popularity\": 9788\n },\n {\n \"tag\": "angiectopia",\n \"popularity\": 9776\n },\n {\n \"tag\": "Pulicidae",\n \"popularity\": 9765\n },\n {\n \"tag\": "beslimer",\n \"popularity\": 9754\n },\n {\n \"tag\": "nontreaty",\n \"popularity\": 9743\n },\n {\n \"tag\": "unhaggled",\n \"popularity\": 9731\n },\n {\n \"tag\": "catfall",\n \"popularity\": 9720\n },\n {\n \"tag\": "stola",\n \"popularity\": 9709\n },\n {\n \"tag\": "pataco",\n \"popularity\": 9698\n },\n {\n \"tag\": "ontologistic",\n \"popularity\": 9686\n },\n {\n \"tag\": "aerosphere",\n \"popularity\": 9675\n },\n {\n \"tag\": "deobstruent",\n \"popularity\": 9664\n },\n {\n \"tag\": "threepence",\n \"popularity\": 9653\n },\n {\n \"tag\": "cyprinoid",\n \"popularity\": 9642\n },\n {\n \"tag\": "overbank",\n \"popularity\": 9631\n },\n {\n \"tag\": "prostyle",\n \"popularity\": 9620\n },\n {\n \"tag\": "photoactivation",\n \"popularity\": 9609\n },\n {\n \"tag\": "homothetic",\n \"popularity\": 9598\n },\n {\n \"tag\": "roguedom",\n \"popularity\": 9587\n },\n {\n \"tag\": "underschool",\n \"popularity\": 9576\n },\n {\n \"tag\": "tractility",\n \"popularity\": 9565\n },\n {\n \"tag\": "gardenin",\n \"popularity\": 9554\n },\n {\n \"tag\": "Micromastictora",\n \"popularity\": 9543\n },\n {\n \"tag\": "gossypine",\n \"popularity\": 9532\n },\n {\n \"tag\": "amylodyspepsia",\n \"popularity\": 9521\n },\n {\n \"tag\": "Luciana",\n \"popularity\": 9510\n },\n {\n \"tag\": "meetly nonfisherman",\n \"popularity\": 9500\n },\n {\n \"tag\": "backhanded",\n \"popularity\": 9489\n },\n {\n \"tag\": "decrustation",\n \"popularity\": 9478\n },\n {\n \"tag\": "pinrail",\n \"popularity\": 9467\n },\n {\n \"tag\": "Mahori",\n \"popularity\": 9456\n },\n {\n \"tag\": "unsizable",\n \"popularity\": 9446\n },\n {\n \"tag\": "disawa",\n \"popularity\": 9435\n },\n {\n \"tag\": "launderability inconsidered",\n \"popularity\": 9424\n },\n {\n \"tag\": "unclassical",\n \"popularity\": 9414\n },\n {\n \"tag\": "inobtrusiveness",\n \"popularity\": 9403\n },\n {\n \"tag\": "sialogenous",\n \"popularity\": 9392\n },\n {\n \"tag\": "sulphonamide",\n \"popularity\": 9382\n },\n {\n \"tag\": "diluvion",\n \"popularity\": 9371\n },\n {\n \"tag\": "deuteranope",\n \"popularity\": 9361\n },\n {\n \"tag\": "addition",\n \"popularity\": 9350\n },\n {\n \"tag\": "bockeret",\n \"popularity\": 9339\n },\n {\n \"tag\": "unidentified",\n \"popularity\": 9329\n },\n {\n \"tag\": "caryatic",\n \"popularity\": 9318\n },\n {\n \"tag\": "misattribution",\n \"popularity\": 9308\n },\n {\n \"tag\": "outray",\n \"popularity\": 9297\n },\n {\n \"tag\": "areometrical",\n \"popularity\": 9287\n },\n {\n \"tag\": "antilogism",\n \"popularity\": 9277\n },\n {\n \"tag\": "inadjustable",\n \"popularity\": 9266\n },\n {\n \"tag\": "byssus",\n \"popularity\": 9256\n },\n {\n \"tag\": "trun",\n \"popularity\": 9245\n },\n {\n \"tag\": "thereology",\n \"popularity\": 9235\n },\n {\n \"tag\": "extort",\n \"popularity\": 9225\n },\n {\n \"tag\": "bumpkin",\n \"popularity\": 9214\n },\n {\n \"tag\": "sulphobenzide",\n \"popularity\": 9204\n },\n {\n \"tag\": "hydrogeology",\n \"popularity\": 9194\n },\n {\n \"tag\": "nidulariaceous",\n \"popularity\": 9183\n },\n {\n \"tag\": "propodiale",\n \"popularity\": 9173\n },\n {\n \"tag\": "fierily",\n \"popularity\": 9163\n },\n {\n \"tag\": "aerotonometry",\n \"popularity\": 9153\n },\n {\n \"tag\": "pelobatid oversuperstitious",\n \"popularity\": 9142\n },\n {\n \"tag\": "restringent",\n \"popularity\": 9132\n },\n {\n \"tag\": "tetrapodic",\n \"popularity\": 9122\n },\n {\n \"tag\": "heroicness Vendidad",\n \"popularity\": 9112\n },\n {\n \"tag\": "Sphingurus",\n \"popularity\": 9102\n },\n {\n \"tag\": "sclerote",\n \"popularity\": 9092\n },\n {\n \"tag\": "unkeyed",\n \"popularity\": 9082\n },\n {\n \"tag\": "superparliamentary",\n \"popularity\": 9072\n },\n {\n \"tag\": "hetericism",\n \"popularity\": 9061\n },\n {\n \"tag\": "hucklebone",\n \"popularity\": 9051\n },\n {\n \"tag\": "yojan",\n \"popularity\": 9041\n },\n {\n \"tag\": "bossed",\n \"popularity\": 9031\n },\n {\n \"tag\": "spiderwork",\n \"popularity\": 9021\n },\n {\n \"tag\": "millfeed dullery",\n \"popularity\": 9011\n },\n {\n \"tag\": "adnoun",\n \"popularity\": 9001\n },\n {\n \"tag\": "mesometric",\n \"popularity\": 8992\n },\n {\n \"tag\": "doublehandedness",\n \"popularity\": 8982\n },\n {\n \"tag\": "suppurant",\n \"popularity\": 8972\n },\n {\n \"tag\": "Berlinize",\n \"popularity\": 8962\n },\n {\n \"tag\": "sontag",\n \"popularity\": 8952\n },\n {\n \"tag\": "biplane",\n \"popularity\": 8942\n },\n {\n \"tag\": "insula",\n \"popularity\": 8932\n },\n {\n \"tag\": "unbrand",\n \"popularity\": 8922\n },\n {\n \"tag\": "Basilosaurus",\n \"popularity\": 8913\n },\n {\n \"tag\": "prenomination",\n \"popularity\": 8903\n },\n {\n \"tag\": "untextual",\n \"popularity\": 8893\n },\n {\n \"tag\": "coleslaw",\n \"popularity\": 8883\n },\n {\n \"tag\": "langsyne",\n \"popularity\": 8874\n },\n {\n \"tag\": "impede",\n \"popularity\": 8864\n },\n {\n \"tag\": "irrigator",\n \"popularity\": 8854\n },\n {\n \"tag\": "deflocculation",\n \"popularity\": 8844\n },\n {\n \"tag\": "narghile",\n \"popularity\": 8835\n },\n {\n \"tag\": "unguardedly ebenaceous",\n \"popularity\": 8825\n },\n {\n \"tag\": "conversantly subocular",\n \"popularity\": 8815\n },\n {\n \"tag\": "hydroponic",\n \"popularity\": 8806\n },\n {\n \"tag\": "anthropopsychism",\n \"popularity\": 8796\n },\n {\n \"tag\": "panoptic",\n \"popularity\": 8787\n },\n {\n \"tag\": "insufferable",\n \"popularity\": 8777\n },\n {\n \"tag\": "salema",\n \"popularity\": 8768\n },\n {\n \"tag\": "Myriapoda",\n \"popularity\": 8758\n },\n {\n \"tag\": "regarrison",\n \"popularity\": 8748\n },\n {\n \"tag\": "overlearned",\n \"popularity\": 8739\n },\n {\n \"tag\": "ultraroyalist conventical bureaucratical",\n \"popularity\": 8729\n },\n {\n \"tag\": "epicaridan",\n \"popularity\": 8720\n },\n {\n \"tag\": "poetastress",\n \"popularity\": 8711\n },\n {\n \"tag\": "monophthalmus",\n \"popularity\": 8701\n },\n {\n \"tag\": "simnel",\n \"popularity\": 8692\n },\n {\n \"tag\": "compotor",\n \"popularity\": 8682\n },\n {\n \"tag\": "hydrolase",\n \"popularity\": 8673\n },\n {\n \"tag\": "attemptless",\n \"popularity\": 8663\n },\n {\n \"tag\": "visceroptosis",\n \"popularity\": 8654\n },\n {\n \"tag\": "unpreparedly",\n \"popularity\": 8645\n },\n {\n \"tag\": "mastage",\n \"popularity\": 8635\n },\n {\n \"tag\": "preinfluence",\n \"popularity\": 8626\n },\n {\n \"tag\": "Siwan",\n \"popularity\": 8617\n },\n {\n \"tag\": "ceratotheca belvedere",\n \"popularity\": 8607\n },\n {\n \"tag\": "disenablement",\n \"popularity\": 8598\n },\n {\n \"tag\": "nine",\n \"popularity\": 8589\n },\n {\n \"tag\": "spellingdown abridgment",\n \"popularity\": 8580\n },\n {\n \"tag\": "twilightless",\n \"popularity\": 8571\n },\n {\n \"tag\": "overflow",\n \"popularity\": 8561\n },\n {\n \"tag\": "mismeasurement",\n \"popularity\": 8552\n },\n {\n \"tag\": "nawabship",\n \"popularity\": 8543\n },\n {\n \"tag\": "Phrynosoma",\n \"popularity\": 8534\n },\n {\n \"tag\": "unanticipatingly",\n \"popularity\": 8525\n },\n {\n \"tag\": "blankite",\n \"popularity\": 8516\n },\n {\n \"tag\": "role",\n \"popularity\": 8506\n },\n {\n \"tag\": "peperine edelweiss",\n \"popularity\": 8497\n },\n {\n \"tag\": "unhysterical",\n \"popularity\": 8488\n },\n {\n \"tag\": "attentiveness",\n \"popularity\": 8479\n },\n {\n \"tag\": "scintillant",\n \"popularity\": 8470\n },\n {\n \"tag\": "stenostomatous",\n \"popularity\": 8461\n },\n {\n \"tag\": "pectinite",\n \"popularity\": 8452\n },\n {\n \"tag\": "herring",\n \"popularity\": 8443\n },\n {\n \"tag\": "interroom",\n \"popularity\": 8434\n },\n {\n \"tag\": "laccol",\n \"popularity\": 8425\n },\n {\n \"tag\": "unpartably kylite",\n \"popularity\": 8416\n },\n {\n \"tag\": "spirivalve",\n \"popularity\": 8407\n },\n {\n \"tag\": "hoosegow",\n \"popularity\": 8398\n },\n {\n \"tag\": "doat",\n \"popularity\": 8389\n },\n {\n \"tag\": "amphibian",\n \"popularity\": 8380\n },\n {\n \"tag\": "exposit",\n \"popularity\": 8371\n },\n {\n \"tag\": "canopy",\n \"popularity\": 8363\n },\n {\n \"tag\": "houndlike",\n \"popularity\": 8354\n },\n {\n \"tag\": "spikebill",\n \"popularity\": 8345\n },\n {\n \"tag\": "wiseacre pyrotechnic",\n \"popularity\": 8336\n },\n {\n \"tag\": "confessingly woodman",\n \"popularity\": 8327\n },\n {\n \"tag\": "overside",\n \"popularity\": 8318\n },\n {\n \"tag\": "oftwhiles",\n \"popularity\": 8310\n },\n {\n \"tag\": "Musophagidae",\n \"popularity\": 8301\n },\n {\n \"tag\": "slumberer",\n \"popularity\": 8292\n },\n {\n \"tag\": "leiotrichy",\n \"popularity\": 8283\n },\n {\n \"tag\": "Mantispidae",\n \"popularity\": 8275\n },\n {\n \"tag\": "perceptually",\n \"popularity\": 8266\n },\n {\n \"tag\": "biller",\n \"popularity\": 8257\n },\n {\n \"tag\": "eudaemonical",\n \"popularity\": 8249\n },\n {\n \"tag\": "underfiend",\n \"popularity\": 8240\n },\n {\n \"tag\": "impartible",\n \"popularity\": 8231\n },\n {\n \"tag\": "saxicavous",\n \"popularity\": 8223\n },\n {\n \"tag\": "yapster",\n \"popularity\": 8214\n },\n {\n \"tag\": "aliseptal",\n \"popularity\": 8205\n },\n {\n \"tag\": "omniparient",\n \"popularity\": 8197\n },\n {\n \"tag\": "nishiki",\n \"popularity\": 8188\n },\n {\n \"tag\": "yuzluk",\n \"popularity\": 8180\n },\n {\n \"tag\": "solderer",\n \"popularity\": 8171\n },\n {\n \"tag\": "Pinna",\n \"popularity\": 8162\n },\n {\n \"tag\": "reinterfere",\n \"popularity\": 8154\n },\n {\n \"tag\": "superepic",\n \"popularity\": 8145\n },\n {\n \"tag\": "ronquil",\n \"popularity\": 8137\n },\n {\n \"tag\": "bratstvo",\n \"popularity\": 8128\n },\n {\n \"tag\": "Thea",\n \"popularity\": 8120\n },\n {\n \"tag\": "hermaphroditical",\n \"popularity\": 8111\n },\n {\n \"tag\": "enlief",\n \"popularity\": 8103\n },\n {\n \"tag\": "Jesuate",\n \"popularity\": 8095\n },\n {\n \"tag\": "gaysome",\n \"popularity\": 8086\n },\n {\n \"tag\": "iliohypogastric",\n \"popularity\": 8078\n },\n {\n \"tag\": "regardance",\n \"popularity\": 8069\n },\n {\n \"tag\": "cumulately",\n \"popularity\": 8061\n },\n {\n \"tag\": "haustorial nucleolocentrosome",\n \"popularity\": 8053\n },\n {\n \"tag\": "cosmocrat",\n \"popularity\": 8044\n },\n {\n \"tag\": "onyxitis",\n \"popularity\": 8036\n },\n {\n \"tag\": "Cabinda",\n \"popularity\": 8028\n },\n {\n \"tag\": "coresort",\n \"popularity\": 8019\n },\n {\n \"tag\": "drusy preformant",\n \"popularity\": 8011\n },\n {\n \"tag\": "piningly",\n \"popularity\": 8003\n },\n {\n \"tag\": "bootlessly",\n \"popularity\": 7994\n },\n {\n \"tag\": "talari",\n \"popularity\": 7986\n },\n {\n \"tag\": "amidoacetal",\n \"popularity\": 7978\n },\n {\n \"tag\": "pschent",\n \"popularity\": 7970\n },\n {\n \"tag\": "consumptional scarer titivate",\n \"popularity\": 7962\n },\n {\n \"tag\": "Anserinae",\n \"popularity\": 7953\n },\n {\n \"tag\": "flaunter",\n \"popularity\": 7945\n },\n {\n \"tag\": "reindeer",\n \"popularity\": 7937\n },\n {\n \"tag\": "disparage",\n \"popularity\": 7929\n },\n {\n \"tag\": "superheat",\n \"popularity\": 7921\n },\n {\n \"tag\": "Chromatium",\n \"popularity\": 7912\n },\n {\n \"tag\": "Tina",\n \"popularity\": 7904\n },\n {\n \"tag\": "rededicatory",\n \"popularity\": 7896\n },\n {\n \"tag\": "nontransient",\n \"popularity\": 7888\n },\n {\n \"tag\": "Phocaean brinkless",\n \"popularity\": 7880\n },\n {\n \"tag\": "ventriculose",\n \"popularity\": 7872\n },\n {\n \"tag\": "upplough",\n \"popularity\": 7864\n },\n {\n \"tag\": "succorless",\n \"popularity\": 7856\n },\n {\n \"tag\": "hayrake",\n \"popularity\": 7848\n },\n {\n \"tag\": "merriness amorphia",\n \"popularity\": 7840\n },\n {\n \"tag\": "merycism",\n \"popularity\": 7832\n },\n {\n \"tag\": "checkrow",\n \"popularity\": 7824\n },\n {\n \"tag\": "scry",\n \"popularity\": 7816\n },\n {\n \"tag\": "obvolve",\n \"popularity\": 7808\n },\n {\n \"tag\": "orchard",\n \"popularity\": 7800\n },\n {\n \"tag\": "isomerize",\n \"popularity\": 7792\n },\n {\n \"tag\": "competitrix",\n \"popularity\": 7784\n },\n {\n \"tag\": "unbannered",\n \"popularity\": 7776\n },\n {\n \"tag\": "undoctrined",\n \"popularity\": 7768\n },\n {\n \"tag\": "theologian",\n \"popularity\": 7760\n },\n {\n \"tag\": "nebby",\n \"popularity\": 7752\n },\n {\n \"tag\": "Cardiazol",\n \"popularity\": 7745\n },\n {\n \"tag\": "phagedenic",\n \"popularity\": 7737\n },\n {\n \"tag\": "nostalgic",\n \"popularity\": 7729\n },\n {\n \"tag\": "orthodoxy",\n \"popularity\": 7721\n },\n {\n \"tag\": "oversanguine",\n \"popularity\": 7713\n },\n {\n \"tag\": "lish",\n \"popularity\": 7705\n },\n {\n \"tag\": "ketogenic",\n \"popularity\": 7698\n },\n {\n \"tag\": "syndicalize",\n \"popularity\": 7690\n },\n {\n \"tag\": "leeftail",\n \"popularity\": 7682\n },\n {\n \"tag\": "bulbomedullary",\n \"popularity\": 7674\n },\n {\n \"tag\": "reletter",\n \"popularity\": 7667\n },\n {\n \"tag\": "bitterly",\n \"popularity\": 7659\n },\n {\n \"tag\": "participatory",\n \"popularity\": 7651\n },\n {\n \"tag\": "baldberry",\n \"popularity\": 7643\n },\n {\n \"tag\": "prowaterpower",\n \"popularity\": 7636\n },\n {\n \"tag\": "lexicographical",\n \"popularity\": 7628\n },\n {\n \"tag\": "Anisodactyli",\n \"popularity\": 7620\n },\n {\n \"tag\": "amphipodous",\n \"popularity\": 7613\n },\n {\n \"tag\": "triglandular",\n \"popularity\": 7605\n },\n {\n \"tag\": "xanthopsin",\n \"popularity\": 7597\n },\n {\n \"tag\": "indefinitude",\n \"popularity\": 7590\n },\n {\n \"tag\": "bookworm",\n \"popularity\": 7582\n },\n {\n \"tag\": "suffocative",\n \"popularity\": 7574\n },\n {\n \"tag\": "uncongested tyrant",\n \"popularity\": 7567\n },\n {\n \"tag\": "alow harmoniously Pamir",\n \"popularity\": 7559\n },\n {\n \"tag\": "monander",\n \"popularity\": 7552\n },\n {\n \"tag\": "bagatelle",\n \"popularity\": 7544\n },\n {\n \"tag\": "membranology",\n \"popularity\": 7537\n },\n {\n \"tag\": "parturifacient",\n \"popularity\": 7529\n },\n {\n \"tag\": "excitovascular",\n \"popularity\": 7522\n },\n {\n \"tag\": "homopolar",\n \"popularity\": 7514\n },\n {\n \"tag\": "phobiac",\n \"popularity\": 7507\n },\n {\n \"tag\": "clype",\n \"popularity\": 7499\n },\n {\n \"tag\": "unsubversive",\n \"popularity\": 7492\n },\n {\n \"tag\": "bostrychoidal scorpionwort",\n \"popularity\": 7484\n },\n {\n \"tag\": "biliteralism",\n \"popularity\": 7477\n },\n {\n \"tag\": "dentatocostate",\n \"popularity\": 7469\n },\n {\n \"tag\": "Pici",\n \"popularity\": 7462\n },\n {\n \"tag\": "sideritic",\n \"popularity\": 7454\n },\n {\n \"tag\": "syntaxis",\n \"popularity\": 7447\n },\n {\n \"tag\": "ingest",\n \"popularity\": 7440\n },\n {\n \"tag\": "rigmarolish",\n \"popularity\": 7432\n },\n {\n \"tag\": "ocreaceous",\n \"popularity\": 7425\n },\n {\n \"tag\": "hyperbrachyskelic",\n \"popularity\": 7418\n },\n {\n \"tag\": "basophobia",\n \"popularity\": 7410\n },\n {\n \"tag\": "substantialness",\n \"popularity\": 7403\n },\n {\n \"tag\": "agglutinoid",\n \"popularity\": 7396\n },\n {\n \"tag\": "longleaf",\n \"popularity\": 7388\n },\n {\n \"tag\": "electroengraving",\n \"popularity\": 7381\n },\n {\n \"tag\": "laparoenterotomy",\n \"popularity\": 7374\n },\n {\n \"tag\": "oxalylurea",\n \"popularity\": 7366\n },\n {\n \"tag\": "unattaintedly",\n \"popularity\": 7359\n },\n {\n \"tag\": "pennystone",\n \"popularity\": 7352\n },\n {\n \"tag\": "Plumbaginaceae",\n \"popularity\": 7345\n },\n {\n \"tag\": "horntip",\n \"popularity\": 7337\n },\n {\n \"tag\": "begrudge",\n \"popularity\": 7330\n },\n {\n \"tag\": "bechignoned",\n \"popularity\": 7323\n },\n {\n \"tag\": "hologonidium",\n \"popularity\": 7316\n },\n {\n \"tag\": "Pulian",\n \"popularity\": 7309\n },\n {\n \"tag\": "gratulation",\n \"popularity\": 7301\n },\n {\n \"tag\": "Sebright",\n \"popularity\": 7294\n },\n {\n \"tag\": "coinstantaneous emotionally",\n \"popularity\": 7287\n },\n {\n \"tag\": "thoracostracan",\n \"popularity\": 7280\n },\n {\n \"tag\": "saurodont",\n \"popularity\": 7273\n },\n {\n \"tag\": "coseat",\n \"popularity\": 7266\n },\n {\n \"tag\": "irascibility",\n \"popularity\": 7259\n },\n {\n \"tag\": "occlude",\n \"popularity\": 7251\n },\n {\n \"tag\": "metallurgist",\n \"popularity\": 7244\n },\n {\n \"tag\": "extraviolet",\n \"popularity\": 7237\n },\n {\n \"tag\": "clinic",\n \"popularity\": 7230\n },\n {\n \"tag\": "skater",\n \"popularity\": 7223\n },\n {\n \"tag\": "linguistic",\n \"popularity\": 7216\n },\n {\n \"tag\": "attacheship",\n \"popularity\": 7209\n },\n {\n \"tag\": "Rachianectes",\n \"popularity\": 7202\n },\n {\n \"tag\": "foliolose",\n \"popularity\": 7195\n },\n {\n \"tag\": "claudetite",\n \"popularity\": 7188\n },\n {\n \"tag\": "aphidian scratching",\n \"popularity\": 7181\n },\n {\n \"tag\": "Carida",\n \"popularity\": 7174\n },\n {\n \"tag\": "tiepin polymicroscope",\n \"popularity\": 7167\n },\n {\n \"tag\": "telpherage",\n \"popularity\": 7160\n },\n {\n \"tag\": "meek",\n \"popularity\": 7153\n },\n {\n \"tag\": "swiftness",\n \"popularity\": 7146\n },\n {\n \"tag\": "gentes",\n \"popularity\": 7139\n },\n {\n \"tag\": "uncommemorated",\n \"popularity\": 7132\n },\n {\n \"tag\": "Lazarus",\n \"popularity\": 7125\n },\n {\n \"tag\": "redivive",\n \"popularity\": 7119\n },\n {\n \"tag\": "nonfebrile",\n \"popularity\": 7112\n },\n {\n \"tag\": "nymphet",\n \"popularity\": 7105\n },\n {\n \"tag\": "areologically",\n \"popularity\": 7098\n },\n {\n \"tag\": "undonkey",\n \"popularity\": 7091\n },\n {\n \"tag\": "projecting",\n \"popularity\": 7084\n },\n {\n \"tag\": "pinnigrade",\n \"popularity\": 7077\n },\n {\n \"tag\": "butylation",\n \"popularity\": 7071\n },\n {\n \"tag\": "philologistic lenticle",\n \"popularity\": 7064\n },\n {\n \"tag\": "nooky",\n \"popularity\": 7057\n },\n {\n \"tag\": "incestuousness",\n \"popularity\": 7050\n },\n {\n \"tag\": "palingenetically",\n \"popularity\": 7043\n },\n {\n \"tag\": "mitochondria",\n \"popularity\": 7037\n },\n {\n \"tag\": "truthify",\n \"popularity\": 7030\n },\n {\n \"tag\": "titanyl",\n \"popularity\": 7023\n },\n {\n \"tag\": "bestride",\n \"popularity\": 7016\n },\n {\n \"tag\": "chende",\n \"popularity\": 7010\n },\n {\n \"tag\": "Chaucerian monophote",\n \"popularity\": 7003\n },\n {\n \"tag\": "cutback",\n \"popularity\": 6996\n },\n {\n \"tag\": "unpatiently",\n \"popularity\": 6989\n },\n {\n \"tag\": "subvitreous",\n \"popularity\": 6983\n },\n {\n \"tag\": "organizable",\n \"popularity\": 6976\n },\n {\n \"tag\": "anniverse uncomprehensible",\n \"popularity\": 6969\n },\n {\n \"tag\": "hyalescence",\n \"popularity\": 6963\n },\n {\n \"tag\": "amniochorial",\n \"popularity\": 6956\n },\n {\n \"tag\": "Corybantian",\n \"popularity\": 6949\n },\n {\n \"tag\": "genocide Scaphitidae",\n \"popularity\": 6943\n },\n {\n \"tag\": "accordionist",\n \"popularity\": 6936\n },\n {\n \"tag\": "becheck",\n \"popularity\": 6930\n },\n {\n \"tag\": "overproduce",\n \"popularity\": 6923\n },\n {\n \"tag\": "unmaniac frijolillo",\n \"popularity\": 6916\n },\n {\n \"tag\": "multisulcated",\n \"popularity\": 6910\n },\n {\n \"tag\": "wennebergite",\n \"popularity\": 6903\n },\n {\n \"tag\": "tautousious mowth",\n \"popularity\": 6897\n },\n {\n \"tag\": "marigold",\n \"popularity\": 6890\n },\n {\n \"tag\": "affray",\n \"popularity\": 6884\n },\n {\n \"tag\": "nonidolatrous",\n \"popularity\": 6877\n },\n {\n \"tag\": "aphrasia",\n \"popularity\": 6871\n },\n {\n \"tag\": "muddlingly",\n \"popularity\": 6864\n },\n {\n \"tag\": "clear",\n \"popularity\": 6858\n },\n {\n \"tag\": "Clitoria",\n \"popularity\": 6851\n },\n {\n \"tag\": "apportionment underwaist",\n \"popularity\": 6845\n },\n {\n \"tag\": "kodakist",\n \"popularity\": 6838\n },\n {\n \"tag\": "Momotidae",\n \"popularity\": 6832\n },\n {\n \"tag\": "cryptovalency",\n \"popularity\": 6825\n },\n {\n \"tag\": "floe",\n \"popularity\": 6819\n },\n {\n \"tag\": "aphagia",\n \"popularity\": 6812\n },\n {\n \"tag\": "brontograph",\n \"popularity\": 6806\n },\n {\n \"tag\": "tubulous",\n \"popularity\": 6799\n },\n {\n \"tag\": "unhorse",\n \"popularity\": 6793\n },\n {\n \"tag\": "chlordane",\n \"popularity\": 6787\n },\n {\n \"tag\": "colloquy brochan",\n \"popularity\": 6780\n },\n {\n \"tag\": "sloosh",\n \"popularity\": 6774\n },\n {\n \"tag\": "battered",\n \"popularity\": 6767\n },\n {\n \"tag\": "monocularity pluriguttulate",\n \"popularity\": 6761\n },\n {\n \"tag\": "chiastoneury",\n \"popularity\": 6755\n },\n {\n \"tag\": "Sanguinaria",\n \"popularity\": 6748\n },\n {\n \"tag\": "confessionary",\n \"popularity\": 6742\n },\n {\n \"tag\": "enzymic",\n \"popularity\": 6736\n },\n {\n \"tag\": "cord",\n \"popularity\": 6729\n },\n {\n \"tag\": "oviducal",\n \"popularity\": 6723\n },\n {\n \"tag\": "crozzle outsea",\n \"popularity\": 6717\n },\n {\n \"tag\": "balladical",\n \"popularity\": 6710\n },\n {\n \"tag\": "uncollectibleness",\n \"popularity\": 6704\n },\n {\n \"tag\": "predorsal",\n \"popularity\": 6698\n },\n {\n \"tag\": "reauthenticate",\n \"popularity\": 6692\n },\n {\n \"tag\": "ravissant",\n \"popularity\": 6685\n },\n {\n \"tag\": "advantageousness",\n \"popularity\": 6679\n },\n {\n \"tag\": "rung",\n \"popularity\": 6673\n },\n {\n \"tag\": "duncedom",\n \"popularity\": 6667\n },\n {\n \"tag\": "hematolite",\n \"popularity\": 6660\n },\n {\n \"tag\": "thisness",\n \"popularity\": 6654\n },\n {\n \"tag\": "mapau",\n \"popularity\": 6648\n },\n {\n \"tag\": "Hecatic",\n \"popularity\": 6642\n },\n {\n \"tag\": "meningoencephalocele",\n \"popularity\": 6636\n },\n {\n \"tag\": "confection sorra",\n \"popularity\": 6630\n },\n {\n \"tag\": "unsedate",\n \"popularity\": 6623\n },\n {\n \"tag\": "meningocerebritis",\n \"popularity\": 6617\n },\n {\n \"tag\": "biopsychological",\n \"popularity\": 6611\n },\n {\n \"tag\": "clavicithern",\n \"popularity\": 6605\n },\n {\n \"tag\": "resun",\n \"popularity\": 6599\n },\n {\n \"tag\": "bayamo",\n \"popularity\": 6593\n },\n {\n \"tag\": "seeableness",\n \"popularity\": 6587\n },\n {\n \"tag\": "hypsidolichocephalism",\n \"popularity\": 6581\n },\n {\n \"tag\": "salivous",\n \"popularity\": 6574\n },\n {\n \"tag\": "neumatize",\n \"popularity\": 6568\n },\n {\n \"tag\": "stree",\n \"popularity\": 6562\n },\n {\n \"tag\": "markshot",\n \"popularity\": 6556\n },\n {\n \"tag\": "phraseologically",\n \"popularity\": 6550\n },\n {\n \"tag\": "yealing",\n \"popularity\": 6544\n },\n {\n \"tag\": "puggy",\n \"popularity\": 6538\n },\n {\n \"tag\": "sexadecimal",\n \"popularity\": 6532\n },\n {\n \"tag\": "unofficerlike",\n \"popularity\": 6526\n },\n {\n \"tag\": "curiosa",\n \"popularity\": 6520\n },\n {\n \"tag\": "pedomotor",\n \"popularity\": 6514\n },\n {\n \"tag\": "astrally",\n \"popularity\": 6508\n },\n {\n \"tag\": "prosomatic",\n \"popularity\": 6502\n },\n {\n \"tag\": "bulletheaded",\n \"popularity\": 6496\n },\n {\n \"tag\": "fortuned",\n \"popularity\": 6490\n },\n {\n \"tag\": "pixy",\n \"popularity\": 6484\n },\n {\n \"tag\": "protectrix",\n \"popularity\": 6478\n },\n {\n \"tag\": "arthritical",\n \"popularity\": 6472\n },\n {\n \"tag\": "coction",\n \"popularity\": 6466\n },\n {\n \"tag\": "Anthropos",\n \"popularity\": 6460\n },\n {\n \"tag\": "runer",\n \"popularity\": 6454\n },\n {\n \"tag\": "prenotify",\n \"popularity\": 6449\n },\n {\n \"tag\": "microspheric gastroparalysis",\n \"popularity\": 6443\n },\n {\n \"tag\": "Jovicentrical",\n \"popularity\": 6437\n },\n {\n \"tag\": "ceratopsid",\n \"popularity\": 6431\n },\n {\n \"tag\": "Theodoric",\n \"popularity\": 6425\n },\n {\n \"tag\": "Pactolus",\n \"popularity\": 6419\n },\n {\n \"tag\": "spawning",\n \"popularity\": 6413\n },\n {\n \"tag\": "nonconfidential",\n \"popularity\": 6407\n },\n {\n \"tag\": "halotrichite infumate",\n \"popularity\": 6402\n },\n {\n \"tag\": "undiscriminatingly",\n \"popularity\": 6396\n },\n {\n \"tag\": "unexasperated",\n \"popularity\": 6390\n },\n {\n \"tag\": "isoeugenol",\n \"popularity\": 6384\n },\n {\n \"tag\": "pressboard",\n \"popularity\": 6378\n },\n {\n \"tag\": "unshrew",\n \"popularity\": 6372\n },\n {\n \"tag\": "huffingly",\n \"popularity\": 6367\n },\n {\n \"tag\": "wagaun",\n \"popularity\": 6361\n },\n {\n \"tag\": "squirt Philistine",\n \"popularity\": 6355\n },\n {\n \"tag\": "kryptic",\n \"popularity\": 6349\n },\n {\n \"tag\": "paraform",\n \"popularity\": 6344\n },\n {\n \"tag\": "preverify",\n \"popularity\": 6338\n },\n {\n \"tag\": "dalar",\n \"popularity\": 6332\n },\n {\n \"tag\": "interdictor appraisingly",\n \"popularity\": 6326\n },\n {\n \"tag\": "chipped",\n \"popularity\": 6321\n },\n {\n \"tag\": "Pteropoda",\n \"popularity\": 6315\n },\n {\n \"tag\": "Bohairic",\n \"popularity\": 6309\n },\n {\n \"tag\": "felting",\n \"popularity\": 6303\n },\n {\n \"tag\": "compurgatorial",\n \"popularity\": 6298\n },\n {\n \"tag\": "unclead",\n \"popularity\": 6292\n },\n {\n \"tag\": "stockish",\n \"popularity\": 6286\n },\n {\n \"tag\": "mulligatawny",\n \"popularity\": 6281\n },\n {\n \"tag\": "Monotheletism",\n \"popularity\": 6275\n },\n {\n \"tag\": "lutanist",\n \"popularity\": 6269\n },\n {\n \"tag\": "gluttonize",\n \"popularity\": 6264\n },\n {\n \"tag\": "hackneyed",\n \"popularity\": 6258\n },\n {\n \"tag\": "yield",\n \"popularity\": 6253\n },\n {\n \"tag\": "sulphonamido",\n \"popularity\": 6247\n },\n {\n \"tag\": "granulative",\n \"popularity\": 6241\n },\n {\n \"tag\": "swingy",\n \"popularity\": 6236\n },\n {\n \"tag\": "Desmidiales",\n \"popularity\": 6230\n },\n {\n \"tag\": "tootlish",\n \"popularity\": 6224\n },\n {\n \"tag\": "unsatisfiedly",\n \"popularity\": 6219\n },\n {\n \"tag\": "burucha",\n \"popularity\": 6213\n },\n {\n \"tag\": "premeditatingly",\n \"popularity\": 6208\n },\n {\n \"tag\": "cowrie",\n \"popularity\": 6202\n },\n {\n \"tag\": "pleurolysis",\n \"popularity\": 6197\n },\n {\n \"tag\": "nationalist",\n \"popularity\": 6191\n },\n {\n \"tag\": "Pholadacea",\n \"popularity\": 6186\n },\n {\n \"tag\": "anakrousis",\n \"popularity\": 6180\n },\n {\n \"tag\": "proctorial",\n \"popularity\": 6175\n },\n {\n \"tag\": "cavillation",\n \"popularity\": 6169\n },\n {\n \"tag\": "cervicobregmatic",\n \"popularity\": 6163\n },\n {\n \"tag\": "interspecific",\n \"popularity\": 6158\n },\n {\n \"tag\": "Teutonity",\n \"popularity\": 6152\n },\n {\n \"tag\": "snakeholing",\n \"popularity\": 6147\n },\n {\n \"tag\": "balcony",\n \"popularity\": 6142\n },\n {\n \"tag\": "latchless",\n \"popularity\": 6136\n },\n {\n \"tag\": "Mithraea",\n \"popularity\": 6131\n },\n {\n \"tag\": "pseudepigraph",\n \"popularity\": 6125\n },\n {\n \"tag\": "flosser",\n \"popularity\": 6120\n },\n {\n \"tag\": "kotyle",\n \"popularity\": 6114\n },\n {\n \"tag\": "outdo",\n \"popularity\": 6109\n },\n {\n \"tag\": "interclerical",\n \"popularity\": 6103\n },\n {\n \"tag\": "aurar",\n \"popularity\": 6098\n },\n {\n \"tag\": "apophyseal",\n \"popularity\": 6093\n },\n {\n \"tag\": "Miro",\n \"popularity\": 6087\n },\n {\n \"tag\": "Priscillian",\n \"popularity\": 6082\n },\n {\n \"tag\": "alluvia",\n \"popularity\": 6076\n },\n {\n \"tag\": "exordize",\n \"popularity\": 6071\n },\n {\n \"tag\": "breakage",\n \"popularity\": 6066\n },\n {\n \"tag\": "unclosable",\n \"popularity\": 6060\n },\n {\n \"tag\": "monocondylous",\n \"popularity\": 6055\n },\n {\n \"tag\": "dyarchy",\n \"popularity\": 6050\n },\n {\n \"tag\": "subchelate",\n \"popularity\": 6044\n },\n {\n \"tag\": "hearsay",\n \"popularity\": 6039\n },\n {\n \"tag\": "prestigiously",\n \"popularity\": 6034\n },\n {\n \"tag\": "unimuscular",\n \"popularity\": 6028\n },\n {\n \"tag\": "lingwort",\n \"popularity\": 6023\n },\n {\n \"tag\": "jealous",\n \"popularity\": 6018\n },\n {\n \"tag\": "artilleryman",\n \"popularity\": 6012\n },\n {\n \"tag\": "phantasmagorially",\n \"popularity\": 6007\n },\n {\n \"tag\": "stagnum",\n \"popularity\": 6002\n },\n {\n \"tag\": "organotropism shatteringly",\n \"popularity\": 5997\n },\n {\n \"tag\": "Mytilus Hebraist",\n \"popularity\": 5991\n },\n {\n \"tag\": "returf",\n \"popularity\": 5986\n },\n {\n \"tag\": "townfolk",\n \"popularity\": 5981\n },\n {\n \"tag\": "propitiative",\n \"popularity\": 5976\n },\n {\n \"tag\": "Anita unsullied",\n \"popularity\": 5970\n },\n {\n \"tag\": "bandoleered",\n \"popularity\": 5965\n },\n {\n \"tag\": "cubby",\n \"popularity\": 5960\n },\n {\n \"tag\": "Hexanchus",\n \"popularity\": 5955\n },\n {\n \"tag\": "circuminsular",\n \"popularity\": 5949\n },\n {\n \"tag\": "chamberletted eumycete",\n \"popularity\": 5944\n },\n {\n \"tag\": "secure",\n \"popularity\": 5939\n },\n {\n \"tag\": "Edwardean",\n \"popularity\": 5934\n },\n {\n \"tag\": "strenth",\n \"popularity\": 5929\n },\n {\n \"tag\": "exhaustless",\n \"popularity\": 5923\n },\n {\n \"tag\": "electioneerer",\n \"popularity\": 5918\n },\n {\n \"tag\": "estoile",\n \"popularity\": 5913\n },\n {\n \"tag\": "redden",\n \"popularity\": 5908\n },\n {\n \"tag\": "solicitee",\n \"popularity\": 5903\n },\n {\n \"tag\": "nonpatented",\n \"popularity\": 5898\n },\n {\n \"tag\": "lemming",\n \"popularity\": 5893\n },\n {\n \"tag\": "marled subalate",\n \"popularity\": 5887\n },\n {\n \"tag\": "premial horizonward",\n \"popularity\": 5882\n },\n {\n \"tag\": "nonrefueling",\n \"popularity\": 5877\n },\n {\n \"tag\": "rupturewort",\n \"popularity\": 5872\n },\n {\n \"tag\": "unfed",\n \"popularity\": 5867\n },\n {\n \"tag\": "empanelment",\n \"popularity\": 5862\n },\n {\n \"tag\": "isoosmosis",\n \"popularity\": 5857\n },\n {\n \"tag\": "jipijapa",\n \"popularity\": 5852\n },\n {\n \"tag\": "Fiji",\n \"popularity\": 5847\n },\n {\n \"tag\": "interferant",\n \"popularity\": 5842\n },\n {\n \"tag\": "reconstitution",\n \"popularity\": 5837\n },\n {\n \"tag\": "dockyardman",\n \"popularity\": 5832\n },\n {\n \"tag\": "dolichopodous",\n \"popularity\": 5826\n },\n {\n \"tag\": "whiteworm",\n \"popularity\": 5821\n },\n {\n \"tag\": "atheistically",\n \"popularity\": 5816\n },\n {\n \"tag\": "nonconcern",\n \"popularity\": 5811\n },\n {\n \"tag\": "scarabaeidoid",\n \"popularity\": 5806\n },\n {\n \"tag\": "triumviri",\n \"popularity\": 5801\n },\n {\n \"tag\": "rakit",\n \"popularity\": 5796\n },\n {\n \"tag\": "leecheater",\n \"popularity\": 5791\n },\n {\n \"tag\": "Arthrostraca",\n \"popularity\": 5786\n },\n {\n \"tag\": "upknit",\n \"popularity\": 5781\n },\n {\n \"tag\": "tymbalon",\n \"popularity\": 5776\n },\n {\n \"tag\": "inventurous",\n \"popularity\": 5771\n },\n {\n \"tag\": "perradiate",\n \"popularity\": 5766\n },\n {\n \"tag\": "seer",\n \"popularity\": 5762\n },\n {\n \"tag\": "Auricularia",\n \"popularity\": 5757\n },\n {\n \"tag\": "wettish exclusivity",\n \"popularity\": 5752\n },\n {\n \"tag\": "arteriosympathectomy",\n \"popularity\": 5747\n },\n {\n \"tag\": "tunlike",\n \"popularity\": 5742\n },\n {\n \"tag\": "cephalocercal",\n \"popularity\": 5737\n },\n {\n \"tag\": "meaninglessness",\n \"popularity\": 5732\n },\n {\n \"tag\": "fountful",\n \"popularity\": 5727\n },\n {\n \"tag\": "appraisement",\n \"popularity\": 5722\n },\n {\n \"tag\": "geniculated",\n \"popularity\": 5717\n },\n {\n \"tag\": "rotator",\n \"popularity\": 5712\n },\n {\n \"tag\": "foremarch biography",\n \"popularity\": 5707\n },\n {\n \"tag\": "arid",\n \"popularity\": 5703\n },\n {\n \"tag\": "inapprehensible",\n \"popularity\": 5698\n },\n {\n \"tag\": "chlorosulphonic",\n \"popularity\": 5693\n },\n {\n \"tag\": "braguette",\n \"popularity\": 5688\n },\n {\n \"tag\": "panophthalmitis",\n \"popularity\": 5683\n },\n {\n \"tag\": "pro objurgatorily",\n \"popularity\": 5678\n },\n {\n \"tag\": "zooplasty",\n \"popularity\": 5673\n },\n {\n \"tag\": "Terebratulidae",\n \"popularity\": 5669\n },\n {\n \"tag\": "Mahran",\n \"popularity\": 5664\n },\n {\n \"tag\": "anthologize merocele",\n \"popularity\": 5659\n },\n {\n \"tag\": "firecracker chiropractic",\n \"popularity\": 5654\n },\n {\n \"tag\": "tenorist",\n \"popularity\": 5649\n },\n {\n \"tag\": "amphitene",\n \"popularity\": 5645\n },\n {\n \"tag\": "silverbush toadstone",\n \"popularity\": 5640\n },\n {\n \"tag\": "entozoological",\n \"popularity\": 5635\n },\n {\n \"tag\": "trustlessness",\n \"popularity\": 5630\n },\n {\n \"tag\": "reassay",\n \"popularity\": 5625\n },\n {\n \"tag\": "chrysalides",\n \"popularity\": 5621\n },\n {\n \"tag\": "truncation",\n \"popularity\": 5616\n },\n {\n \"tag\": "unwavered mausoleal",\n \"popularity\": 5611\n },\n {\n \"tag\": "unserrated",\n \"popularity\": 5606\n },\n {\n \"tag\": "frampler",\n \"popularity\": 5602\n },\n {\n \"tag\": "celestial",\n \"popularity\": 5597\n },\n {\n \"tag\": "depreter",\n \"popularity\": 5592\n },\n {\n \"tag\": "retaliate",\n \"popularity\": 5588\n },\n {\n \"tag\": "decempunctate",\n \"popularity\": 5583\n },\n {\n \"tag\": "submitter",\n \"popularity\": 5578\n },\n {\n \"tag\": "phenothiazine",\n \"popularity\": 5573\n },\n {\n \"tag\": "hobbledehoyish",\n \"popularity\": 5569\n },\n {\n \"tag\": "erraticness",\n \"popularity\": 5564\n },\n {\n \"tag\": "ovariodysneuria",\n \"popularity\": 5559\n },\n {\n \"tag\": "puja",\n \"popularity\": 5555\n },\n {\n \"tag\": "cesspool",\n \"popularity\": 5550\n },\n {\n \"tag\": "sonation",\n \"popularity\": 5545\n },\n {\n \"tag\": "moggan",\n \"popularity\": 5541\n },\n {\n \"tag\": "overjutting",\n \"popularity\": 5536\n },\n {\n \"tag\": "cohobate",\n \"popularity\": 5531\n },\n {\n \"tag\": "Distoma",\n \"popularity\": 5527\n },\n {\n \"tag\": "Plectognathi",\n \"popularity\": 5522\n },\n {\n \"tag\": "dumple caliphate",\n \"popularity\": 5517\n },\n {\n \"tag\": "shiko",\n \"popularity\": 5513\n },\n {\n \"tag\": "downness",\n \"popularity\": 5508\n },\n {\n \"tag\": "whippletree",\n \"popularity\": 5504\n },\n {\n \"tag\": "nymphaeum",\n \"popularity\": 5499\n },\n {\n \"tag\": "there trest",\n \"popularity\": 5494\n },\n {\n \"tag\": "psychrometer",\n \"popularity\": 5490\n },\n {\n \"tag\": "pyelograph",\n \"popularity\": 5485\n },\n {\n \"tag\": "unsalvable",\n \"popularity\": 5481\n },\n {\n \"tag\": "bescreen",\n \"popularity\": 5476\n },\n {\n \"tag\": "cushy",\n \"popularity\": 5471\n },\n {\n \"tag\": "plicatolobate",\n \"popularity\": 5467\n },\n {\n \"tag\": "lakie",\n \"popularity\": 5462\n },\n {\n \"tag\": "anthropodeoxycholic",\n \"popularity\": 5458\n },\n {\n \"tag\": "resatisfaction",\n \"popularity\": 5453\n },\n {\n \"tag\": "unravelment unaccidental",\n \"popularity\": 5449\n },\n {\n \"tag\": "telewriter monogeneous",\n \"popularity\": 5444\n },\n {\n \"tag\": "unsabred",\n \"popularity\": 5440\n },\n {\n \"tag\": "startlingly",\n \"popularity\": 5435\n },\n {\n \"tag\": "Aralia",\n \"popularity\": 5431\n },\n {\n \"tag\": "alamonti",\n \"popularity\": 5426\n },\n {\n \"tag\": "Franklinization",\n \"popularity\": 5422\n },\n {\n \"tag\": "parliament",\n \"popularity\": 5417\n },\n {\n \"tag\": "schoolkeeper",\n \"popularity\": 5413\n },\n {\n \"tag\": "nonsociety",\n \"popularity\": 5408\n },\n {\n \"tag\": "parenthetic",\n \"popularity\": 5404\n },\n {\n \"tag\": "stog",\n \"popularity\": 5399\n },\n {\n \"tag\": "Pristipomidae",\n \"popularity\": 5395\n },\n {\n \"tag\": "exocarp",\n \"popularity\": 5390\n },\n {\n \"tag\": "monaxonial",\n \"popularity\": 5386\n },\n {\n \"tag\": "tramroad",\n \"popularity\": 5381\n },\n {\n \"tag\": "hookah",\n \"popularity\": 5377\n },\n {\n \"tag\": "saccharonic",\n \"popularity\": 5372\n },\n {\n \"tag\": "perimetrium",\n \"popularity\": 5368\n },\n {\n \"tag\": "libelluloid",\n \"popularity\": 5364\n },\n {\n \"tag\": "overrunningly",\n \"popularity\": 5359\n },\n {\n \"tag\": "untwister",\n \"popularity\": 5355\n },\n {\n \"tag\": "ninnyhammer",\n \"popularity\": 5350\n },\n {\n \"tag\": "metranate",\n \"popularity\": 5346\n },\n {\n \"tag\": "sarcoblast",\n \"popularity\": 5341\n },\n {\n \"tag\": "porkish",\n \"popularity\": 5337\n },\n {\n \"tag\": "chauvinistic",\n \"popularity\": 5333\n },\n {\n \"tag\": "sexagesimal",\n \"popularity\": 5328\n },\n {\n \"tag\": "hematogenic",\n \"popularity\": 5324\n },\n {\n \"tag\": "selfpreservatory",\n \"popularity\": 5320\n },\n {\n \"tag\": "myelauxe",\n \"popularity\": 5315\n },\n {\n \"tag\": "triply",\n \"popularity\": 5311\n },\n {\n \"tag\": "metaphysicous",\n \"popularity\": 5306\n },\n {\n \"tag\": "vitrinoid",\n \"popularity\": 5302\n },\n {\n \"tag\": "glabellae",\n \"popularity\": 5298\n },\n {\n \"tag\": "moonlighter",\n \"popularity\": 5293\n },\n {\n \"tag\": "monotheistically epexegetical",\n \"popularity\": 5289\n },\n {\n \"tag\": "pseudolateral",\n \"popularity\": 5285\n },\n {\n \"tag\": "heptamethylene",\n \"popularity\": 5280\n },\n {\n \"tag\": "salvadora",\n \"popularity\": 5276\n },\n {\n \"tag\": "unjovial diphenylthiourea",\n \"popularity\": 5272\n },\n {\n \"tag\": "thievishness",\n \"popularity\": 5268\n },\n {\n \"tag\": "unridable",\n \"popularity\": 5263\n },\n {\n \"tag\": "underhandedly",\n \"popularity\": 5259\n },\n {\n \"tag\": "fungiform",\n \"popularity\": 5255\n },\n {\n \"tag\": "scruffle",\n \"popularity\": 5250\n },\n {\n \"tag\": "preindisposition",\n \"popularity\": 5246\n },\n {\n \"tag\": "Amadis",\n \"popularity\": 5242\n },\n {\n \"tag\": "Culex",\n \"popularity\": 5238\n },\n {\n \"tag\": "churning",\n \"popularity\": 5233\n },\n {\n \"tag\": "imperite",\n \"popularity\": 5229\n },\n {\n \"tag\": "levorotation",\n \"popularity\": 5225\n },\n {\n \"tag\": "barbate",\n \"popularity\": 5221\n },\n {\n \"tag\": "knotwort",\n \"popularity\": 5216\n },\n {\n \"tag\": "gypsiferous",\n \"popularity\": 5212\n },\n {\n \"tag\": "tourmalinic",\n \"popularity\": 5208\n },\n {\n \"tag\": "helleboric",\n \"popularity\": 5204\n },\n {\n \"tag\": "pneumograph",\n \"popularity\": 5199\n },\n {\n \"tag\": "Peltigeraceae",\n \"popularity\": 5195\n },\n {\n \"tag\": "busine",\n \"popularity\": 5191\n },\n {\n \"tag\": "Ailuridae",\n \"popularity\": 5187\n },\n {\n \"tag\": "azotate",\n \"popularity\": 5183\n },\n {\n \"tag\": "unlikable",\n \"popularity\": 5178\n },\n {\n \"tag\": "sloyd",\n \"popularity\": 5174\n },\n {\n \"tag\": "biblioclasm",\n \"popularity\": 5170\n },\n {\n \"tag\": "Seres",\n \"popularity\": 5166\n },\n {\n \"tag\": "unaccurateness",\n \"popularity\": 5162\n },\n {\n \"tag\": "scrollwise",\n \"popularity\": 5157\n },\n {\n \"tag\": "flandowser",\n \"popularity\": 5153\n },\n {\n \"tag\": "unblackened",\n \"popularity\": 5149\n },\n {\n \"tag\": "schistosternia",\n \"popularity\": 5145\n },\n {\n \"tag\": "fuse",\n \"popularity\": 5141\n },\n {\n \"tag\": "narthecal",\n \"popularity\": 5137\n },\n {\n \"tag\": "Cueva",\n \"popularity\": 5133\n },\n {\n \"tag\": "appositeness",\n \"popularity\": 5128\n },\n {\n \"tag\": "proindustrial",\n \"popularity\": 5124\n },\n {\n \"tag\": "dermatorrhoea",\n \"popularity\": 5120\n },\n {\n \"tag\": "oxyurous tendential",\n \"popularity\": 5116\n },\n {\n \"tag\": "isopurpurin",\n \"popularity\": 5112\n },\n {\n \"tag\": "impose",\n \"popularity\": 5108\n },\n {\n \"tag\": "wordsmanship",\n \"popularity\": 5104\n },\n {\n \"tag\": "saturator",\n \"popularity\": 5100\n },\n {\n \"tag\": "Nordicity",\n \"popularity\": 5096\n },\n {\n \"tag\": "interaccuse",\n \"popularity\": 5092\n },\n {\n \"tag\": "acridinic",\n \"popularity\": 5087\n },\n {\n \"tag\": "scholion",\n \"popularity\": 5083\n },\n {\n \"tag\": "pseudoaconitine",\n \"popularity\": 5079\n },\n {\n \"tag\": "doctorial",\n \"popularity\": 5075\n },\n {\n \"tag\": "Etchimin",\n \"popularity\": 5071\n },\n {\n \"tag\": "oliviform",\n \"popularity\": 5067\n },\n {\n \"tag\": "Pele",\n \"popularity\": 5063\n },\n {\n \"tag\": "Chiromantis Progymnasium",\n \"popularity\": 5059\n },\n {\n \"tag\": "toxosis",\n \"popularity\": 5055\n },\n {\n \"tag\": "spadilla",\n \"popularity\": 5051\n },\n {\n \"tag\": "Actinopterygii",\n \"popularity\": 5047\n },\n {\n \"tag\": "untiring",\n \"popularity\": 5043\n },\n {\n \"tag\": "butyral",\n \"popularity\": 5039\n },\n {\n \"tag\": "Gymnoderinae",\n \"popularity\": 5035\n },\n {\n \"tag\": "testudo",\n \"popularity\": 5031\n },\n {\n \"tag\": "frigorify",\n \"popularity\": 5027\n },\n {\n \"tag\": "aliency",\n \"popularity\": 5023\n },\n {\n \"tag\": "jargon",\n \"popularity\": 5019\n },\n {\n \"tag\": "counterservice",\n \"popularity\": 5015\n },\n {\n \"tag\": "isostrychnine",\n \"popularity\": 5011\n },\n {\n \"tag\": "tellership",\n \"popularity\": 5007\n },\n {\n \"tag\": "miscegenetic",\n \"popularity\": 5003\n },\n {\n \"tag\": "sorcer",\n \"popularity\": 4999\n },\n {\n \"tag\": "tilewright",\n \"popularity\": 4995\n },\n {\n \"tag\": "cyanoplastid",\n \"popularity\": 4991\n },\n {\n \"tag\": "fluxionally",\n \"popularity\": 4987\n },\n {\n \"tag\": "proudhearted",\n \"popularity\": 4983\n },\n {\n \"tag\": "blithely",\n \"popularity\": 4979\n },\n {\n \"tag\": "jestproof",\n \"popularity\": 4975\n },\n {\n \"tag\": "jestwise",\n \"popularity\": 4971\n },\n {\n \"tag\": "nonassimilable",\n \"popularity\": 4967\n },\n {\n \"tag\": "compurgation",\n \"popularity\": 4964\n },\n {\n \"tag\": "unhate",\n \"popularity\": 4960\n },\n {\n \"tag\": "haplodonty",\n \"popularity\": 4956\n },\n {\n \"tag\": "cardholder",\n \"popularity\": 4952\n },\n {\n \"tag\": "rainlight megohmmeter overstout",\n \"popularity\": 4948\n },\n {\n \"tag\": "itchless",\n \"popularity\": 4944\n },\n {\n \"tag\": "begiggle",\n \"popularity\": 4940\n },\n {\n \"tag\": "chromatosphere",\n \"popularity\": 4936\n },\n {\n \"tag\": "typicality",\n \"popularity\": 4932\n },\n {\n \"tag\": "overgrown",\n \"popularity\": 4928\n },\n {\n \"tag\": "envolume",\n \"popularity\": 4925\n },\n {\n \"tag\": "pachycholia",\n \"popularity\": 4921\n },\n {\n \"tag\": "passageable",\n \"popularity\": 4917\n },\n {\n \"tag\": "pathopoiesis",\n \"popularity\": 4913\n },\n {\n \"tag\": "overbreak",\n \"popularity\": 4909\n },\n {\n \"tag\": "satyric",\n \"popularity\": 4905\n },\n {\n \"tag\": "unaudited",\n \"popularity\": 4901\n },\n {\n \"tag\": "whimble",\n \"popularity\": 4898\n },\n {\n \"tag\": "pressureless",\n \"popularity\": 4894\n },\n {\n \"tag\": "Selene",\n \"popularity\": 4890\n },\n {\n \"tag\": "slithery",\n \"popularity\": 4886\n },\n {\n \"tag\": "nondisfigurement",\n \"popularity\": 4882\n },\n {\n \"tag\": "overdelicious",\n \"popularity\": 4878\n },\n {\n \"tag\": "Perca",\n \"popularity\": 4875\n },\n {\n \"tag\": "Palladium",\n \"popularity\": 4871\n },\n {\n \"tag\": "insagacity",\n \"popularity\": 4867\n },\n {\n \"tag\": "peristoma",\n \"popularity\": 4863\n },\n {\n \"tag\": "uncreativeness",\n \"popularity\": 4859\n },\n {\n \"tag\": "incomparability surfboarding",\n \"popularity\": 4856\n },\n {\n \"tag\": "bacillar",\n \"popularity\": 4852\n },\n {\n \"tag\": "ulcerative",\n \"popularity\": 4848\n },\n {\n \"tag\": "stychomythia",\n \"popularity\": 4844\n },\n {\n \"tag\": "sesma somatics nonentry",\n \"popularity\": 4840\n },\n {\n \"tag\": "unsepulchred",\n \"popularity\": 4837\n },\n {\n \"tag\": "cephalanthium",\n \"popularity\": 4833\n },\n {\n \"tag\": "Asiaticization",\n \"popularity\": 4829\n },\n {\n \"tag\": "killeen",\n \"popularity\": 4825\n },\n {\n \"tag\": "Pseudococcus",\n \"popularity\": 4822\n },\n {\n \"tag\": "untractable",\n \"popularity\": 4818\n },\n {\n \"tag\": "apolegamic",\n \"popularity\": 4814\n },\n {\n \"tag\": "hyperpnea",\n \"popularity\": 4810\n },\n {\n \"tag\": "martyrolatry",\n \"popularity\": 4807\n },\n {\n \"tag\": "Sarmatic",\n \"popularity\": 4803\n },\n {\n \"tag\": "nonsurface",\n \"popularity\": 4799\n },\n {\n \"tag\": "adjoined",\n \"popularity\": 4796\n },\n {\n \"tag\": "vasiform",\n \"popularity\": 4792\n },\n {\n \"tag\": "tastelessness",\n \"popularity\": 4788\n },\n {\n \"tag\": "rumbo",\n \"popularity\": 4784\n },\n {\n \"tag\": "subdititious",\n \"popularity\": 4781\n },\n {\n \"tag\": "reparticipation",\n \"popularity\": 4777\n },\n {\n \"tag\": "Yorkshireism",\n \"popularity\": 4773\n },\n {\n \"tag\": "outcrow",\n \"popularity\": 4770\n },\n {\n \"tag\": "casserole",\n \"popularity\": 4766\n },\n {\n \"tag\": "semideltaic",\n \"popularity\": 4762\n },\n {\n \"tag\": "freemason",\n \"popularity\": 4759\n },\n {\n \"tag\": "catkin",\n \"popularity\": 4755\n },\n {\n \"tag\": "conscient",\n \"popularity\": 4751\n },\n {\n \"tag\": "reliably",\n \"popularity\": 4748\n },\n {\n \"tag\": "Telembi",\n \"popularity\": 4744\n },\n {\n \"tag\": "hide",\n \"popularity\": 4740\n },\n {\n \"tag\": "social",\n \"popularity\": 4737\n },\n {\n \"tag\": "ichneutic",\n \"popularity\": 4733\n },\n {\n \"tag\": "polypotome blouse pentagrammatic",\n \"popularity\": 4729\n },\n {\n \"tag\": "airdrome pesthole",\n \"popularity\": 4726\n },\n {\n \"tag\": "unportended",\n \"popularity\": 4722\n },\n {\n \"tag\": "sheerly",\n \"popularity\": 4719\n },\n {\n \"tag\": "acardiac",\n \"popularity\": 4715\n },\n {\n \"tag\": "fetor",\n \"popularity\": 4711\n },\n {\n \"tag\": "storax",\n \"popularity\": 4708\n },\n {\n \"tag\": "syndactylic",\n \"popularity\": 4704\n },\n {\n \"tag\": "otiatrics",\n \"popularity\": 4700\n },\n {\n \"tag\": "range",\n \"popularity\": 4697\n },\n {\n \"tag\": "branchway",\n \"popularity\": 4693\n },\n {\n \"tag\": "beatific",\n \"popularity\": 4690\n },\n {\n \"tag\": "Rugosa",\n \"popularity\": 4686\n },\n {\n \"tag\": "rafty",\n \"popularity\": 4682\n },\n {\n \"tag\": "gapy",\n \"popularity\": 4679\n },\n {\n \"tag\": "heterocercal",\n \"popularity\": 4675\n },\n {\n \"tag\": "actinopterygious",\n \"popularity\": 4672\n },\n {\n \"tag\": "glauconite",\n \"popularity\": 4668\n },\n {\n \"tag\": "limbless priest",\n \"popularity\": 4665\n },\n {\n \"tag\": "chrysene",\n \"popularity\": 4661\n },\n {\n \"tag\": "isentropic",\n \"popularity\": 4658\n },\n {\n \"tag\": "lairdess",\n \"popularity\": 4654\n },\n {\n \"tag\": "butterhead choliambic",\n \"popularity\": 4650\n },\n {\n \"tag\": "hexaseme",\n \"popularity\": 4647\n },\n {\n \"tag\": "treeify",\n \"popularity\": 4643\n },\n {\n \"tag\": "coronetted fructify",\n \"popularity\": 4640\n },\n {\n \"tag\": "admiralty",\n \"popularity\": 4636\n },\n {\n \"tag\": "Flosculariidae",\n \"popularity\": 4633\n },\n {\n \"tag\": "limaceous",\n \"popularity\": 4629\n },\n {\n \"tag\": "subterconscious",\n \"popularity\": 4626\n },\n {\n \"tag\": "stayless",\n \"popularity\": 4622\n },\n {\n \"tag\": "psha",\n \"popularity\": 4619\n },\n {\n \"tag\": "Mediterraneanize",\n \"popularity\": 4615\n },\n {\n \"tag\": "impenetrably",\n \"popularity\": 4612\n },\n {\n \"tag\": "Myrmeleonidae",\n \"popularity\": 4608\n },\n {\n \"tag\": "germander",\n \"popularity\": 4605\n },\n {\n \"tag\": "Buri",\n \"popularity\": 4601\n },\n {\n \"tag\": "papyrotamia",\n \"popularity\": 4598\n },\n {\n \"tag\": "Toxylon",\n \"popularity\": 4594\n },\n {\n \"tag\": "batatilla",\n \"popularity\": 4591\n },\n {\n \"tag\": "fabella assumer",\n \"popularity\": 4587\n },\n {\n \"tag\": "macromethod",\n \"popularity\": 4584\n },\n {\n \"tag\": "Blechnum",\n \"popularity\": 4580\n },\n {\n \"tag\": "pantography",\n \"popularity\": 4577\n },\n {\n \"tag\": "seminovel",\n \"popularity\": 4574\n },\n {\n \"tag\": "disembarrassment",\n \"popularity\": 4570\n },\n {\n \"tag\": "bushmaking",\n \"popularity\": 4567\n },\n {\n \"tag\": "neurosis",\n \"popularity\": 4563\n },\n {\n \"tag\": "Animalia",\n \"popularity\": 4560\n },\n {\n \"tag\": "Bernice",\n \"popularity\": 4556\n },\n {\n \"tag\": "wisen",\n \"popularity\": 4553\n },\n {\n \"tag\": "subhymenium",\n \"popularity\": 4549\n },\n {\n \"tag\": "esophagomycosis",\n \"popularity\": 4546\n },\n {\n \"tag\": "wireworks",\n \"popularity\": 4543\n },\n {\n \"tag\": "Sabellidae",\n \"popularity\": 4539\n },\n {\n \"tag\": "fustianish",\n \"popularity\": 4536\n },\n {\n \"tag\": "professively",\n \"popularity\": 4532\n },\n {\n \"tag\": "overcorruptly",\n \"popularity\": 4529\n },\n {\n \"tag\": "overcreep",\n \"popularity\": 4526\n },\n {\n \"tag\": "Castilloa",\n \"popularity\": 4522\n },\n {\n \"tag\": "forelady Georgie",\n \"popularity\": 4519\n },\n {\n \"tag\": "outsider",\n \"popularity\": 4515\n },\n {\n \"tag\": "Enukki",\n \"popularity\": 4512\n },\n {\n \"tag\": "gypsy",\n \"popularity\": 4509\n },\n {\n \"tag\": "Passamaquoddy",\n \"popularity\": 4505\n },\n {\n \"tag\": "reposit",\n \"popularity\": 4502\n },\n {\n \"tag\": "overtenderness",\n \"popularity\": 4499\n },\n {\n \"tag\": "keratome",\n \"popularity\": 4495\n },\n {\n \"tag\": "interclavicular hypermonosyllable Susanna",\n \"popularity\": 4492\n },\n {\n \"tag\": "mispropose",\n \"popularity\": 4489\n },\n {\n \"tag\": "Membranipora",\n \"popularity\": 4485\n },\n {\n \"tag\": "lampad",\n \"popularity\": 4482\n },\n {\n \"tag\": "header",\n \"popularity\": 4479\n },\n {\n \"tag\": "triseriate",\n \"popularity\": 4475\n },\n {\n \"tag\": "distrainment",\n \"popularity\": 4472\n },\n {\n \"tag\": "staphyloplastic",\n \"popularity\": 4469\n },\n {\n \"tag\": "outscour",\n \"popularity\": 4465\n },\n {\n \"tag\": "tallowmaking",\n \"popularity\": 4462\n },\n {\n \"tag\": "plugger",\n \"popularity\": 4459\n },\n {\n \"tag\": "fashionize",\n \"popularity\": 4455\n },\n {\n \"tag\": "puzzle",\n \"popularity\": 4452\n },\n {\n \"tag\": "imbrue",\n \"popularity\": 4449\n },\n {\n \"tag\": "osteoblast",\n \"popularity\": 4445\n },\n {\n \"tag\": "Hydrocores",\n \"popularity\": 4442\n },\n {\n \"tag\": "Lutra",\n \"popularity\": 4439\n },\n {\n \"tag\": "upridge scarfy",\n \"popularity\": 4435\n },\n {\n \"tag\": "ancon taffle",\n \"popularity\": 4432\n },\n {\n \"tag\": "impest",\n \"popularity\": 4429\n },\n {\n \"tag\": "uncollatedness",\n \"popularity\": 4426\n },\n {\n \"tag\": "hypersensitize",\n \"popularity\": 4422\n },\n {\n \"tag\": "autographically",\n \"popularity\": 4419\n },\n {\n \"tag\": "louther",\n \"popularity\": 4416\n },\n {\n \"tag\": "Ollie",\n \"popularity\": 4413\n },\n {\n \"tag\": "recompensate",\n \"popularity\": 4409\n },\n {\n \"tag\": "Shan",\n \"popularity\": 4406\n },\n {\n \"tag\": "brachycnemic",\n \"popularity\": 4403\n },\n {\n \"tag\": "Carinatae",\n \"popularity\": 4399\n },\n {\n \"tag\": "geotherm",\n \"popularity\": 4396\n },\n {\n \"tag\": "sawback",\n \"popularity\": 4393\n },\n {\n \"tag\": "Novatianist",\n \"popularity\": 4390\n },\n {\n \"tag\": "reapproach",\n \"popularity\": 4387\n },\n {\n \"tag\": "myelopoietic",\n \"popularity\": 4383\n },\n {\n \"tag\": "cyanin",\n \"popularity\": 4380\n },\n {\n \"tag\": "unsmutted",\n \"popularity\": 4377\n },\n {\n \"tag\": "nonpapist",\n \"popularity\": 4374\n },\n {\n \"tag\": "transbaikalian",\n \"popularity\": 4370\n },\n {\n \"tag\": "connately",\n \"popularity\": 4367\n },\n {\n \"tag\": "tenderize iterance",\n \"popularity\": 4364\n },\n {\n \"tag\": "hydrostatical",\n \"popularity\": 4361\n },\n {\n \"tag\": "unflag",\n \"popularity\": 4358\n },\n {\n \"tag\": "translate",\n \"popularity\": 4354\n },\n {\n \"tag\": "Scorzonera",\n \"popularity\": 4351\n },\n {\n \"tag\": "uncomforted",\n \"popularity\": 4348\n },\n {\n \"tag\": "risser varied",\n \"popularity\": 4345\n },\n {\n \"tag\": "plumbate",\n \"popularity\": 4342\n },\n {\n \"tag\": "Usneaceae",\n \"popularity\": 4338\n },\n {\n \"tag\": "fohat",\n \"popularity\": 4335\n },\n {\n \"tag\": "slagging",\n \"popularity\": 4332\n },\n {\n \"tag\": "superserious",\n \"popularity\": 4329\n },\n {\n \"tag\": "theocracy",\n \"popularity\": 4326\n },\n {\n \"tag\": "valonia",\n \"popularity\": 4323\n },\n {\n \"tag\": "Sapindales",\n \"popularity\": 4319\n },\n {\n \"tag\": "palaeozoologist",\n \"popularity\": 4316\n },\n {\n \"tag\": "yalb",\n \"popularity\": 4313\n },\n {\n \"tag\": "unviewed",\n \"popularity\": 4310\n },\n {\n \"tag\": "polyarteritis",\n \"popularity\": 4307\n },\n {\n \"tag\": "vectorial",\n \"popularity\": 4304\n },\n {\n \"tag\": "skimpingly",\n \"popularity\": 4301\n },\n {\n \"tag\": "athort",\n \"popularity\": 4297\n },\n {\n \"tag\": "tribofluorescence",\n \"popularity\": 4294\n },\n {\n \"tag\": "benzonitrol",\n \"popularity\": 4291\n },\n {\n \"tag\": "swiller subobtuse subjacency",\n \"popularity\": 4288\n },\n {\n \"tag\": "uncompassed",\n \"popularity\": 4285\n },\n {\n \"tag\": "cacochymia",\n \"popularity\": 4282\n },\n {\n \"tag\": "commensalist butadiene",\n \"popularity\": 4279\n },\n {\n \"tag\": "culpable",\n \"popularity\": 4276\n },\n {\n \"tag\": "contributive",\n \"popularity\": 4273\n },\n {\n \"tag\": "attemperately",\n \"popularity\": 4269\n },\n {\n \"tag\": "spelt",\n \"popularity\": 4266\n },\n {\n \"tag\": "exoneration",\n \"popularity\": 4263\n },\n {\n \"tag\": "antivivisectionist",\n \"popularity\": 4260\n },\n {\n \"tag\": "granitification",\n \"popularity\": 4257\n },\n {\n \"tag\": "palladize",\n \"popularity\": 4254\n },\n {\n \"tag\": "marksmanship",\n \"popularity\": 4251\n },\n {\n \"tag\": "bullydom",\n \"popularity\": 4248\n },\n {\n \"tag\": "spirality",\n \"popularity\": 4245\n },\n {\n \"tag\": "caliginous",\n \"popularity\": 4242\n },\n {\n \"tag\": "reportedly",\n \"popularity\": 4239\n },\n {\n \"tag\": "polyad",\n \"popularity\": 4236\n },\n {\n \"tag\": "arthroempyesis",\n \"popularity\": 4233\n },\n {\n \"tag\": "semibay facultatively",\n \"popularity\": 4229\n },\n {\n \"tag\": "metastatically",\n \"popularity\": 4226\n },\n {\n \"tag\": "prophetically",\n \"popularity\": 4223\n },\n {\n \"tag\": "Linguatula elapid",\n \"popularity\": 4220\n },\n {\n \"tag\": "pyknatom",\n \"popularity\": 4217\n },\n {\n \"tag\": "centimeter",\n \"popularity\": 4214\n },\n {\n \"tag\": "mensurate",\n \"popularity\": 4211\n },\n {\n \"tag\": "migraine",\n \"popularity\": 4208\n },\n {\n \"tag\": "pentagamist",\n \"popularity\": 4205\n },\n {\n \"tag\": "querken",\n \"popularity\": 4202\n },\n {\n \"tag\": "ambulance",\n \"popularity\": 4199\n },\n {\n \"tag\": "Stokavian",\n \"popularity\": 4196\n },\n {\n \"tag\": "malvasian",\n \"popularity\": 4193\n },\n {\n \"tag\": "uncouthsome",\n \"popularity\": 4190\n },\n {\n \"tag\": "readable",\n \"popularity\": 4187\n },\n {\n \"tag\": "enlodge",\n \"popularity\": 4184\n },\n {\n \"tag\": "plasterwise Appendiculariidae perspectograph",\n \"popularity\": 4181\n },\n {\n \"tag\": "inkweed",\n \"popularity\": 4178\n },\n {\n \"tag\": "streep",\n \"popularity\": 4175\n },\n {\n \"tag\": "diadelphian cultured",\n \"popularity\": 4172\n },\n {\n \"tag\": "hymenopterous",\n \"popularity\": 4169\n },\n {\n \"tag\": "unexorableness",\n \"popularity\": 4166\n },\n {\n \"tag\": "cascaron",\n \"popularity\": 4163\n },\n {\n \"tag\": "undaintiness",\n \"popularity\": 4160\n },\n {\n \"tag\": "Curtana",\n \"popularity\": 4157\n },\n {\n \"tag\": "scurvied",\n \"popularity\": 4154\n },\n {\n \"tag\": "molluscoidal",\n \"popularity\": 4151\n },\n {\n \"tag\": "yurt",\n \"popularity\": 4148\n },\n {\n \"tag\": "deciduitis",\n \"popularity\": 4145\n },\n {\n \"tag\": "creephole",\n \"popularity\": 4142\n },\n {\n \"tag\": "quatrefeuille",\n \"popularity\": 4139\n },\n {\n \"tag\": "bicapitate adenomatome",\n \"popularity\": 4136\n },\n {\n \"tag\": "damassin",\n \"popularity\": 4134\n },\n {\n \"tag\": "planching",\n \"popularity\": 4131\n },\n {\n \"tag\": "dashedly inferential",\n \"popularity\": 4128\n },\n {\n \"tag\": "lobe",\n \"popularity\": 4125\n },\n {\n \"tag\": "Hyrachyus",\n \"popularity\": 4122\n },\n {\n \"tag\": "knab",\n \"popularity\": 4119\n },\n {\n \"tag\": "discohexaster",\n \"popularity\": 4116\n },\n {\n \"tag\": "malign",\n \"popularity\": 4113\n },\n {\n \"tag\": "pedagoguism",\n \"popularity\": 4110\n },\n {\n \"tag\": "shrubbery",\n \"popularity\": 4107\n },\n {\n \"tag\": "undershrub",\n \"popularity\": 4104\n },\n {\n \"tag\": "bureaucrat",\n \"popularity\": 4101\n },\n {\n \"tag\": "pantaleon",\n \"popularity\": 4098\n },\n {\n \"tag\": "mesoventral",\n \"popularity\": 4096\n }]';
+
+var log2 = Math.log(2);
+var tagInfo = tagInfoJSON.parseJSON(function(a, b) { if (a == "popularity") { return Math.log(b) / log2; } else {return b; } });
+
+function makeTagCloud(tagInfo)
+{
+ var output = '<div class="tagCloud" style="width: 100%">';
+
+ tagInfo.sort(function(a, b) { if (a.tag < b.tag) { return -1; } else if (a.tag == b.tag) { return 0; } else return 1; });
+
+ for (var i = 0; i < tagInfo.length; i++) {
+ var tag = tagInfo[i].tag;
+
+ var validates = true;
+ for (var j = 0; j < tag.length; j++) {
+ var ch = tag.charCodeAt(j);
+ if (ch < 0x20 || ch >= 0x7f) {
+ validates = false;
+ break;
+ }
+ }
+
+ if (!validates)
+ continue;
+
+ var url = "http://example.com/tag/" + tag.replace(" ", "").toLowerCase();
+ var popularity = tagInfo[i].popularity;
+ var color = 'rgb(' + Math.floor(255 * (popularity - 12) / 20) + ', 0, 255)';
+ output += ' <a href="' + url + '" style="font-size: ' + popularity + 'px; color: ' + color + '">' + tag + '</a> \n';
+ }
+
+ output += '</div>';
+ output.replace(" ", "&nbsp;");
+
+ return output;
+}
+
+var tagcloud = makeTagCloud(tagInfo);
+tagInfo = null;
diff --git a/SunSpider/tests/sunspider-0.9/string-unpack-code.js b/SunSpider/tests/sunspider-0.9/string-unpack-code.js
new file mode 100644
index 0000000..e6330f1
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/string-unpack-code.js
@@ -0,0 +1,68 @@
+// This test case unpacks the compressed code for the MochiKit,
+// jQuery, Dojo and Prototype JavaScript libraries.
+
+/***
+ MochiKit.MochiKit 1.3.1 : PACKED VERSION
+ THIS FILE IS AUTOMATICALLY GENERATED. If creating patches, please
+ diff against the source tree, not this file.
+
+ See <http://mochikit.com/> for documentation, downloads, license, etc.
+
+ (c) 2005 Bob Ippolito. All rights Reserved.
+***/
+
+for (var i = 0; i < 2; i++) {
+
+var decompressedMochiKit = function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('if(H(1q)!="L"){1q.2X("B.J")}if(H(B)=="L"){B={}}if(H(B.J)=="L"){B.J={}}B.J.1Y="1.3.1";B.J.1r="B.J";B.J.2l=G(7V,vR){if(7V===O){7V={}}R(u i=1;i<M.K;i++){u o=M[i];if(H(o)!="L"&&o!==O){R(u k in o){7V[k]=o[k]}}}F 7V};B.J.2l(B.J,{1K:G(){F"["+D.1r+" "+D.1Y+"]"},1l:G(){F D.1K()},4f:G(n){if(M.K===0){n=1}F G(){F n++}},4L:G(mw){u me=M.2U;if(M.K==1){me.1U=mw;F Y me()}},bg:G(vQ){u X=[];u m=B.J;u aw=m.1R(O,M);1M(aw.K){u o=aw.2P();if(o&&H(o)=="3n"&&H(o.K)=="2y"){R(u i=o.K-1;i>=0;i--){aw.e9(o[i])}}N{X.1c(o)}}F X},1R:G(7U,1i,av){if(!av){av=0}if(1i){u l=1i.K;if(H(l)!="2y"){if(H(B.15)!="L"){1i=B.15.2G(1i);l=1i.K}N{14 Y 3p("au 2E an at-as 3W B.15 2E ar")}}if(!7U){7U=[]}R(u i=av;i<l;i++){7U.1c(1i[i])}}F 7U},8Z:G(5g,1i){if(5g===O){5g={}}R(u i=1;i<M.K;i++){u o=M[i];if(H(o)!="L"&&o!==O){R(u k in o){u v=o[k];if(H(5g[k])=="3n"&&H(v)=="3n"){M.2U(5g[k],v)}N{5g[k]=v}}}}F 5g},lO:G(6c,1i){if(6c===O){6c={}}R(u i=1;i<M.K;i++){u o=M[i];R(u k in o){if(!(k in 6c)){6c[k]=o[k]}}}F 6c},lN:G(1i){u fj=[];R(u mv in 1i){fj.1c(mv)}F fj},lM:G(1i){u fh=[];u e;R(u fi in 1i){u v;1f{v=1i[fi]}1e(e){2V}fh.1c([fi,v])}F fh},jq:G(fg,ff,fe){fe.1U=Y B.J.5a(fg.1r+"."+ff);fg[ff]=fe},4i:{7L:G(a){F!!a},vP:G(a){F!a},eE:G(a){F a},2E:G(a){F~a},vO:G(a){F-a},vN:G(a,b){F a+b},vM:G(a,b){F a-b},4u:G(a,b){F a/b},vL:G(a,b){F a%b},vK:G(a,b){F a*b},3W:G(a,b){F a&b},or:G(a,b){F a|b},vJ:G(a,b){F a^b},vI:G(a,b){F a<<b},vH:G(a,b){F a>>b},vG:G(a,b){F a>>>b},eq:G(a,b){F a==b},ne:G(a,b){F a!=b},gt:G(a,b){F a>b},ge:G(a,b){F a>=b},lt:G(a,b){F a<b},le:G(a,b){F a<=b},vF:G(a,b){F B.J.2f(a,b)===0},vE:G(a,b){F B.J.2f(a,b)!==0},vD:G(a,b){F B.J.2f(a,b)==1},vC:G(a,b){F B.J.2f(a,b)!=-1},vB:G(a,b){F B.J.2f(a,b)==-1},vA:G(a,b){F B.J.2f(a,b)!=1},vz:G(a,b){F a&&b},vy:G(a,b){F a||b},vx:G(a,b){F b in a}},24:G(mu){F G(){F D[mu].1w(D,M)}},lL:G(mt){F G(a9){F a9[mt]}},66:G(){u fd={};R(u i=0;i<M.K;i++){u 6b=M[i];fd[6b]=6b}F G(){R(u i=0;i<M.K;i++){if(!(H(M[i])in fd)){F 1m}}F 1h}},lJ:G(){R(u i=0;i<M.K;i++){if(M[i]!==O){F 1m}}F 1h},lK:G(){R(u i=0;i<M.K;i++){u o=M[i];if(!(H(o)=="L"||o===O)){F 1m}}F 1h},lI:G(1i){F!B.J.7e.1w(D,M)},7e:G(1i){R(u i=0;i<M.K;i++){u o=M[i];if(!(o&&o.K)){F 1m}}F 1h},3A:G(){R(u i=0;i<M.K;i++){u o=M[i];u 6b=H(o);if((6b!="3n"&&!(6b=="G"&&H(o.vw)=="G"))||o===O||H(o.K)!="2y"){F 1m}}F 1h},eN:G(){R(u i=0;i<M.K;i++){u o=M[i];if(H(o)!="3n"||o===O||H(o.9P)!="G"){F 1m}}F 1h},lH:G(fn){if(fn===O){F B.J.1R(O,M,1)}u fc=[];R(u i=1;i<M.K;i++){fc.1c(fn(M[i]))}F fc},2r:G(fn,1g){u m=B.J;u 6a=B.15;u fb=m.3A;if(M.K<=2){if(!fb(1g)){if(6a){1g=6a.2G(1g);if(fn===O){F 1g}}N{14 Y 3p("au 2E an at-as 3W B.15 2E ar")}}if(fn===O){F m.1R(O,1g)}u 69=[];R(u i=0;i<1g.K;i++){69.1c(fn(1g[i]))}F 69}N{if(fn===O){fn=7o}u 7T=O;R(i=1;i<M.K;i++){if(!fb(M[i])){if(6a){F 6a.2G(6a.4c.1w(O,M))}N{14 Y 3p("au 2E an at-as 3W B.15 2E ar")}}u l=M[i].K;if(7T===O||7T>l){7T=l}}69=[];R(i=0;i<7T;i++){u fa=[];R(u j=1;j<M.K;j++){fa.1c(M[j][i])}69.1c(fn.1w(D,fa))}F 69}},lG:G(fn){u f9=[];if(fn===O){fn=B.J.4i.7L}R(u i=1;i<M.K;i++){u o=M[i];if(fn(o)){f9.1c(o)}}F f9},47:G(fn,1g,7S){u aq=[];u m=B.J;if(!m.3A(1g)){if(B.15){1g=B.15.2G(1g)}N{14 Y 3p("au 2E an at-as 3W B.15 2E ar")}}if(fn===O){fn=m.4i.7L}if(H(7o.1U.47)=="G"){F 7o.1U.47.cz(1g,fn,7S)}N{if(H(7S)=="L"||7S===O){R(u i=0;i<1g.K;i++){u o=1g[i];if(fn(o)){aq.1c(o)}}}N{R(i=0;i<1g.K;i++){o=1g[i];if(fn.cz(7S,o)){aq.1c(o)}}}}F aq},mq:G(7R){F G(){hd(M.K){3j 0:F 7R();3j 1:F 7R(M[0]);3j 2:F 7R(M[0],M[1]);3j 3:F 7R(M[0],M[1],M[2])}u f8=[];R(u i=0;i<M.K;i++){f8.1c("M["+i+"]")}F dB("(1A("+f8.2b(",")+"))")}},lv:G(mr,ms){u m=B.J;F m.1O.1w(D,m.1R([ms,mr],M,2))},1O:G(3c,4o){if(H(3c)=="1n"){3c=4o[3c]}u ao=3c.f5;u 5f=3c.am;u f6=3c.f7;u m=B.J;if(H(3c)=="G"&&H(3c.1w)=="L"){3c=m.mq(3c)}if(H(ao)!="G"){ao=3c}if(H(4o)!="L"){f6=4o}if(H(5f)=="L"){5f=[]}N{5f=5f.9T()}m.1R(5f,M,2);u 7Q=G(){u ap=M;u me=M.2U;if(me.am.K>0){ap=m.2o(me.am,ap)}u 4o=me.f7;if(!4o){4o=D}F me.f5.1w(4o,ap)};7Q.f7=f6;7Q.f5=ao;7Q.am=5f;F 7Q},lF:G(7P){u mp=B.J.1O;R(u k in 7P){u f4=7P[k];if(H(f4)=="G"){7P[k]=mp(f4,7P)}}},5u:G(mo,mn,ml,mk){B.J.ae.5M(mo,mn,ml,mk)},mj:{"5L":1h,"1n":1h,"2y":1h},2f:G(a,b){if(a==b){F 0}u f3=(H(a)=="L"||a===O);u f2=(H(b)=="L"||b===O);if(f3&&f2){F 0}N{if(f3){F-1}N{if(f2){F 1}}}u m=B.J;u f1=m.mj;if(!(H(a)in f1&&H(b)in f1)){1f{F m.ae.3C(a,b)}1e(e){if(e!=m.4d){14 e}}}if(a<b){F-1}N{if(a>b){F 1}}u f0=m.U;14 Y 3p(f0(a)+" 3W "+f0(b)+" 9v 2E be vv")},eM:G(a,b){F B.J.2f(a.9P(),b.9P())},eL:G(a,b){u mi=B.J.2f;u 7O=a.K;u al=0;if(7O>b.K){al=1;7O=b.K}N{if(7O<b.K){al=-1}}R(u i=0;i<7O;i++){u 4j=mi(a[i],b[i]);if(4j){F 4j}}F al},7M:G(mh,mg,mf,md){B.J.ad.5M(mh,mg,mf,md)},U:G(o){if(H(o)=="L"){F"L"}N{if(o===O){F"O"}}1f{if(H(o.1K)=="G"){F o.1K()}N{if(H(o.U)=="G"&&o.U!=M.2U){F o.U()}}F B.J.ad.3C(o)}1e(e){if(H(o.1r)=="1n"&&(o.1l==cZ.1U.1l||o.1l==vu.1U.1l)){F o.1r}}1f{u eZ=(o+"")}1e(e){F"["+H(o)+"]"}if(H(o)=="G"){o=eZ.23(/^\\s+/,"");u 5n=o.2A("{");if(5n!=-1){o=o.3H(0,5n)+"{...}"}}F eZ},eK:G(o){u m=B.J;F"["+m.2r(m.U,o).2b(", ")+"]"},ac:G(o){F("\\""+o.23(/(["\\\\])/g,"\\\\$1")+"\\"").23(/[\\f]/g,"\\\\f").23(/[\\b]/g,"\\\\b").23(/[\\n]/g,"\\\\n").23(/[\\t]/g,"\\\\t").23(/[\\r]/g,"\\\\r")},eJ:G(o){F o+""},ly:G(mc,mb,ma,m9){B.J.ab.5M(mc,mb,ma,m9)},lx:G(){F dB("("+M[0]+")")},lz:G(o){u 5e=H(o);if(5e=="L"){F"L"}N{if(5e=="2y"||5e=="5L"){F o+""}N{if(o===O){F"O"}}}u m=B.J;u eY=m.ac;if(5e=="1n"){F eY(o)}u me=M.2U;u 3S;if(H(o.m8)=="G"){3S=o.m8();if(o!==3S){F me(3S)}}if(H(o.m7)=="G"){3S=o.m7();if(o!==3S){F me(3S)}}if(5e!="G"&&H(o.K)=="2y"){u X=[];R(u i=0;i<o.K;i++){u 2i=me(o[i]);if(H(2i)!="1n"){2i="L"}X.1c(2i)}F"["+X.2b(", ")+"]"}1f{3S=m.ab.3C(o);F me(3S)}1e(e){if(e!=m.4d){14 e}}if(5e=="G"){F O}X=[];R(u k in o){u ak;if(H(k)=="2y"){ak="\\""+k+"\\""}N{if(H(k)=="1n"){ak=eY(k)}N{2V}}2i=me(o[k]);if(H(2i)!="1n"){2V}X.1c(ak+":"+2i)}F"{"+X.2b(", ")+"}"},lE:G(a,b){F(B.J.2f(a,b)===0)},lD:G(eX,4n){if(eX.K!=4n.K){F 1m}F(B.J.2f(eX,4n)===0)},2o:G(){u eW=[];u m6=B.J.1R;R(u i=0;i<M.K;i++){m6(eW,M[i])}F eW},eR:G(2h){u m=B.J;u eU=m.2f;if(M.K==1){F G(a,b){F eU(a[2h],b[2h])}}u eV=m.1R(O,M);F G(a,b){u aj=0;R(u i=0;(aj===0)&&(i<eV.K);i++){u 2h=eV[i];aj=eU(a[2h],b[2h])}F aj}},lC:G(2h){u m5=B.J.eR.1w(D,M);F G(a,b){F m5(b,a)}},2z:G(m4){u m=B.J;F m.1O.1w(D,m.1R([m4,L],M,1))},67:G(m0,1g){if(1g.K===0){F O}u ai=1g[0];u m3=B.J.2f;R(u i=1;i<1g.K;i++){u o=1g[i];if(m3(o,ai)==m0){ai=o}}F ai},lB:G(){F B.J.67(1,M)},lA:G(){F B.J.67(-1,M)},bi:G(1g,lY,lZ,3B){if(H(3B)=="L"||3B===O){3B=1g.K}R(u i=(lZ||0);i<3B;i++){if(1g[i]===lY){F i}}F-1},eO:G(1g,lW,lX,3B){if(H(3B)=="L"||3B===O){3B=1g.K}u 4j=B.J.2f;R(u i=(lX||0);i<3B;i++){if(4j(1g[i],lW)===0){F i}}F-1},d4:G(1j,lV){u ah=[1j];u lU=B.J.1R;1M(ah.K){u X=lV(ah.2P());if(X){lU(ah,X)}}},3f:G(ag){u 2w=ag.1r;if(H(2w)=="L"){2w=""}N{2w=2w+"."}R(u 1b in ag){u o=ag[1b];if(H(o)=="G"&&H(o.1r)=="L"){1f{o.1r=2w+1b}1e(e){}}}},dw:G(3s,68){if(H(B.S)!="L"&&M.K==1&&(H(3s)=="1n"||(H(3s.3T)!="L"&&3s.3T>0))){u kv=B.S.d5(3s);3s=kv[0];68=kv[1]}N{if(M.K==1){u o=3s;3s=[];68=[];R(u k in o){u v=o[k];if(H(v)!="G"){3s.1c(k);68.1c(v)}}}}u W=[];u lT=28.2a(3s.K,68.K);u eT=B.J.af;R(u i=0;i<lT;i++){v=68[i];if(H(v)!="L"&&v!==O){W.1c(eT(3s[i])+"="+eT(v))}}F W.2b("&")},lw:G(lS,lQ){u 7N=lS.23(/\\+/g,"%20").2R("&");u o={};u 5d;if(H(lR)!="L"){5d=lR}N{5d=vt}if(lQ){R(u i=0;i<7N.K;i++){u 2n=7N[i].2R("=");u 1b=5d(2n[0]);u 4n=o[1b];if(!(4n 2C 7o)){4n=[];o[1b]=4n}4n.1c(5d(2n[1]))}}N{R(i=0;i<7N.K;i++){2n=7N[i].2R("=");o[5d(2n[0])]=5d(2n[1])}}F o}});B.J.4a=G(){D.4m=[]};B.J.4a.1U={5M:G(1b,eS,3y,lP){if(lP){D.4m.e9([1b,eS,3y])}N{D.4m.1c([1b,eS,3y])}},3C:G(){R(u i=0;i<D.4m.K;i++){u 2n=D.4m[i];if(2n[1].1w(D,M)){F 2n[2].1w(D,M)}}14 B.J.4d},vs:G(1b){R(u i=0;i<D.4m.K;i++){u 2n=D.4m[i];if(2n[0]==1b){D.4m.4y(i,1);F 1h}}F 1m}};B.J.1z=["4f","4L","1R","2l","8Z","lO","lN","lM","5a","4i","24","lL","66","lo","ln","lK","lJ","lI","7e","3A","eN","lH","2r","lG","47","1O","lF","4d","4a","5u","2f","7M","U","lE","lD","2o","eR","lC","2z","lm","67","lp","eI","lB","lA","d4","ll","af","dw","lz","ly","lx","lw","eO","bi","bg","lv"];B.J.1W=["3f","ae","ad","ab","eM","eL","eK","ac","eJ"];B.J.2Y=G(lu,eP){if(H(B.eQ)=="L"){B.eQ=(B.3d||(H(1x)=="L"&&H(1q)=="L"))}if(!B.eQ){F}u 1p=eP.2k[":1p"];R(u i=0;i<1p.K;i++){lu[1p[i]]=eP[1p[i]]}};B.J.2d=G(){u m=D;m.vr=m.24;m.vq=m.eO;if(H(ls)!="L"){m.af=G(lr){F ls(lr).23(/\\\'/g,"%27")}}N{m.af=G(lq){F vp(lq).23(/\\+/g,"%2B").23(/\\"/g,"%22").W.23(/\\\'/g,"%27")}}m.5a=G(1b){D.43=1b;D.1b=1b};m.5a.1U=Y 2x();m.2l(m.5a.1U,{U:G(){if(D.43&&D.43!=D.1b){F D.1b+"("+m.U(D.43)+")"}N{F D.1b+"()"}},1l:m.24("U")});m.4d=Y m.5a("B.J.4d");m.lp=m.2z(m.67,1);m.eI=m.2z(m.67,-1);m.lo=m.66("G");m.ln=m.66("L");m.lm=m.2z(m.2l,O);m.ll=m.2z(m.2r,O);m.ae=Y m.4a();m.5u("vo",m.eN,m.eM);m.5u("ej",m.3A,m.eL);m.ad=Y m.4a();m.7M("ej",m.3A,m.eK);m.7M("1n",m.66("1n"),m.ac);m.7M("vn",m.66("2y","5L"),m.eJ);m.ab=Y m.4a();u 1p=m.2o(m.1z,m.1W);m.2k={":3e":m.2o(m.1W),":1p":1p};m.3f(D)};B.J.2d();if(!B.3d){2f=B.J.2f}B.J.2Y(D,B.J);if(H(1q)!="L"){1q.2X("B.15");1q.2M("B.J")}if(H(1x)!="L"){1x.26("B.J",[])}1f{if(H(B.J)=="L"){14""}}1e(e){14"B.15 3F on B.J!"}if(H(B.15)=="L"){B.15={}}B.15.1r="B.15";B.15.1Y="1.3.1";B.J.2l(B.15,{1K:G(){F"["+D.1r+" "+D.1Y+"]"},1l:G(){F D.1K()},9W:G(1b,lk,lj,lh){B.15.9Y.5M(1b,lk,lj,lh)},1Q:G(3R,lg){u I=B.15;if(M.K==2){F I.9Z(G(a){F a!=lg},3R)}if(H(3R.1a)=="G"){F 3R}N{if(H(3R.1Q)=="G"){F 3R.1Q()}}1f{F I.9Y.3C(3R)}1e(e){u m=B.J;if(e==m.4d){e=Y 3p(H(3R)+": "+m.U(3R)+" is 2E vm")}14 e}},eu:G(n){if(!n){n=0}u m=B.J;F{U:G(){F"eu("+n+")"},1l:m.24("U"),1a:m.4f(n)}},et:G(p){u I=B.15;u m=B.J;u 1g=[];u lf=I.1Q(p);F{U:G(){F"et(...)"},1l:m.24("U"),1a:G(){1f{u W=lf.1a();1g.1c(W);F W}1e(e){if(e!=I.25){14 e}if(1g.K===0){D.1a=G(){14 I.25}}N{u i=-1;D.1a=G(){i=(i+1)%1g.K;F 1g[i]}}F D.1a()}}}},7b:G(Q,n){u m=B.J;if(H(n)=="L"){F{U:G(){F"7b("+m.U(Q)+")"},1l:m.24("U"),1a:G(){F Q}}}F{U:G(){F"7b("+m.U(Q)+", "+n+")"},1l:m.24("U"),1a:G(){if(n<=0){14 B.15.25}n-=1;F Q}}},1a:G(ld){F ld.1a()},es:G(p,q){u m=B.J;u 1a=B.15.1a;u lc=m.2r(1Q,M);F{U:G(){F"es(...)"},1l:m.24("U"),1a:G(){F m.2r(1a,lc)}}},a1:G(3b,1V){u m=B.J;1V=B.15.1Q(1V);if(3b===O){3b=m.4i.7L}F{U:G(){F"a1(...)"},1l:m.24("U"),1a:G(){1M(1h){u W=1V.1a();if(3b(W)){F W}}F L}}},a0:G(3b,1V){u m=B.J;1V=B.15.1Q(1V);if(3b===O){3b=m.4i.7L}F{U:G(){F"a0(...)"},1l:m.24("U"),1a:G(){1M(1h){u W=1V.1a();if(!3b(W)){F W}}F L}}},er:G(1V){u I=B.15;u m=B.J;1V=I.1Q(1V);u 5c=0;u 2J=0;u 3a=1;u i=-1;if(M.K==2){2J=M[1]}N{if(M.K==3){5c=M[1];2J=M[2]}N{5c=M[1];2J=M[2];3a=M[3]}}F{U:G(){F"er("+["...",5c,2J,3a].2b(", ")+")"},1l:m.24("U"),1a:G(){u W;1M(i<5c){W=1V.1a();i++}if(5c>=2J){14 I.25}5c+=3a;F W}}},4c:G(aa,p,q){u m=B.J;u I=B.15;u lb=m.2r(I.1Q,m.1R(O,M,1));u 2r=m.2r;u 1a=I.1a;F{U:G(){F"4c(...)"},1l:m.24("U"),1a:G(){F aa.1w(D,2r(1a,lb))}}},ep:G(aa,1V,I){1V=B.15.1Q(1V);u m=B.J;F{U:G(){F"ep(...)"},1l:m.24("U"),1a:G(){F aa.1w(I,1V.1a())}}},55:G(p,q){u I=B.15;u m=B.J;if(M.K==1){F I.1Q(M[0])}u 64=m.2r(I.1Q,M);F{U:G(){F"55(...)"},1l:m.24("U"),1a:G(){1M(64.K>1){1f{F 64[0].1a()}1e(e){if(e!=I.25){14 e}64.2P()}}if(64.K==1){u a9=64.2P();D.1a=m.1O("1a",a9);F D.1a()}14 I.25}}},9Z:G(3b,1V){u I=B.15;1V=I.1Q(1V);F{U:G(){F"9Z(...)"},1l:B.J.24("U"),1a:G(){u W=1V.1a();if(!3b(W)){D.1a=G(){14 I.25};D.1a()}F W}}},eo:G(3b,1V){1V=B.15.1Q(1V);u m=B.J;u 1O=m.1O;F{"U":G(){F"eo(...)"},"1l":m.24("U"),"1a":G(){1M(1h){u W=1V.1a();if(!3b(W)){2K}}D.1a=1O("1a",1V);F W}}},a7:G(63,2u,la){2u.62[63]=-1;u m=B.J;u l9=m.eI;F{U:G(){F"en("+63+", ...)"},1l:m.24("U"),1a:G(){u W;u i=2u.62[63];if(i==2u.29){W=la.1a();2u.a8.1c(W);2u.29+=1;2u.62[63]+=1}N{W=2u.a8[i-2u.2a];2u.62[63]+=1;if(i==2u.2a&&l9(2u.62)!=2u.2a){2u.2a+=1;2u.a8.2P()}}F W}}},en:G(a6,n){u W=[];u 2u={"62":[],"a8":[],"29":-1,"2a":-1};if(M.K==1){n=2}u I=B.15;a6=I.1Q(a6);u a7=I.a7;R(u i=0;i<n;i++){W.1c(a7(i,2u,a6))}F W},2G:G(4l){u m=B.J;if(H(4l.9T)=="G"){F 4l.9T()}N{if(m.3A(4l)){F m.2o(4l)}}u I=B.15;4l=I.1Q(4l);u W=[];1f{1M(1h){W.1c(4l.1a())}}1e(e){if(e!=I.25){14 e}F W}F L},7H:G(fn,7K,l8){u i=0;u x=l8;u I=B.15;7K=I.1Q(7K);if(M.K<3){1f{x=7K.1a()}1e(e){if(e==I.25){e=Y 3p("7H() of vl vk vj no vi 3m")}14 e}i++}1f{1M(1h){x=fn(x,7K.1a())}}1e(e){if(e!=I.25){14 e}}F x},7I:G(){u 4k=0;u 2J=0;u 3a=1;if(M.K==1){2J=M[0]}N{if(M.K==2){4k=M[0];2J=M[1]}N{if(M.K==3){4k=M[0];2J=M[1];3a=M[2]}N{14 Y 3p("7I() vh 1, 2, or 3 M!")}}}if(3a===0){14 Y 3p("7I() 3a 5p 2E be 0")}F{1a:G(){if((3a>0&&4k>=2J)||(3a<0&&4k<=2J)){14 B.15.25}u W=4k;4k+=3a;F W},U:G(){F"7I("+[4k,2J,3a].2b(", ")+")"},1l:B.J.24("U")}},l0:G(a5,l7){u x=l7||0;u I=B.15;a5=I.1Q(a5);1f{1M(1h){x+=a5.1a()}}1e(e){if(e!=I.25){14 e}}F x},em:G(a4){u I=B.15;a4=I.1Q(a4);1f{1M(1h){a4.1a()}}1e(e){if(e!=I.25){14 e}}},9a:G(7J,1A,I){u m=B.J;if(M.K>2){1A=m.1O(1A,I)}if(m.3A(7J)){1f{R(u i=0;i<7J.K;i++){1A(7J[i])}}1e(e){if(e!=B.15.25){14 e}}}N{I=B.15;I.em(I.4c(1A,7J))}},kZ:G(l6,1A){u I=B.15;1f{I.a0(1A,l6).1a();F 1m}1e(e){if(e!=I.25){14 e}F 1h}},kY:G(l5,4j){u W=B.15.2G(l5);if(M.K==1){4j=B.J.2f}W.iz(4j);F W},kX:G(l4){u W=B.15.2G(l4);W.vg();F W},kW:G(l3,1A){u I=B.15;1f{I.a1(1A,l3).1a();F 1h}1e(e){if(e!=I.25){14 e}F 1m}},kV:G(1g,5b){if(B.J.3A(5b)){R(u i=0;i<5b.K;i++){1g.1c(5b[i])}}N{u I=B.15;5b=I.1Q(5b);1f{1M(1h){1g.1c(5b.1a())}}1e(e){if(e!=I.25){14 e}}}F 1g},ek:G(a3,eH){u m=B.J;u I=B.15;if(M.K<2){eH=m.4i.eE}a3=I.1Q(a3);u pk=L;u k=L;u v;G eF(){v=a3.1a();k=eH(v)}G l2(){u 7j=v;v=L;F 7j}u eG=1h;F{U:G(){F"ek(...)"},1a:G(){1M(k==pk){eF();if(eG){eG=1m;2K}}pk=k;F[k,{1a:G(){if(v==L){eF()}if(k!=pk){14 I.25}F l2()}}]}}},kU:G(a2,eD){u m=B.J;u I=B.15;if(M.K<2){eD=m.4i.eE}a2=I.1Q(a2);u ey=[];u eA=1h;u ez;1M(1h){1f{u eB=a2.1a();u 2h=eD(eB)}1e(e){if(e==I.25){2K}14 e}if(eA||2h!=ez){u eC=[];ey.1c([2h,eC])}eC.1c(eB);eA=1m;ez=2h}F ey},9X:G(ex){u i=0;F{U:G(){F"9X(...)"},1l:B.J.24("U"),1a:G(){if(i>=ex.K){14 B.15.25}F ex[i++]}}},eh:G(ew){F(ew&&H(ew.ei)=="G")},9V:G(l1){F{U:G(){F"9V(...)"},1l:B.J.24("U"),1a:G(){u W=l1.ei();if(W===O||W===L){14 B.15.25}F W}}}});B.15.1W=["9Y","9X","eh","9V",];B.15.1z=["25","9W","1Q","eu","et","7b","1a","es","a1","a0","er","4c","ep","55","9Z","eo","en","2G","7H","7I","l0","em","9a","kZ","kY","kX","kW","kV","ek","kU"];B.15.2d=G(){u m=B.J;D.25=Y m.5a("25");D.9Y=Y m.4a();D.9W("ej",m.3A,D.9X);D.9W("ei",D.eh,D.9V);D.2k={":3e":D.1z,":1p":m.2o(D.1z,D.1W)};m.3f(D)};B.15.2d();if(!B.3d){7H=B.15.7H}B.J.2Y(D,B.15);if(H(1q)!="L"){1q.2X("B.1H");1q.2M("B.J")}if(H(1x)!="L"){1x.26("B.J",[])}1f{if(H(B.J)=="L"){14""}}1e(e){14"B.1H 3F on B.J!"}if(H(B.1H)=="L"){B.1H={}}B.1H.1r="B.1H";B.1H.1Y="1.3.1";B.1H.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.1H.1l=G(){F D.1K()};B.1H.1z=["5C","49","7A","kR","2L","5Z","kG","ch","kE","kC"];B.1H.1W=["ef","e8","e7"];B.1H.49=G(1P,kT,3z){D.1P=1P;D.3N=kT;D.3z=3z;D.vf=Y 3Q()};B.1H.49.1U={U:G(){u m=B.J;F"49("+m.2r(m.U,[D.1P,D.3N,D.3z]).2b(", ")+")"},1l:B.J.24("U")};B.J.2l(B.1H,{ef:G(7F){u I=B.1H;if(H(7F)=="1n"){7F=I.5C[7F]}F G(1t){u 7G=1t.3N;if(H(7G)=="1n"){7G=I.5C[7G]}F 7G>=7F}},e8:G(){u kS=B.1H.49;R(u i=0;i<M.K;i++){if(!(M[i]2C kS)){F 1m}}F 1h},e7:G(a,b){F B.J.2f([a.3N,a.3z],[b.3N,b.3z])},kR:G(1t){cq("1P: "+1t.1P+"\\ve: "+1t.3N+"\\vd: "+1t.3z.2b(" "))}});B.1H.7A=G(7E){D.4f=0;if(H(7E)=="L"||7E===O){7E=-1}D.ec=7E;D.4h=[];D.7C={};D.e5=1m};B.1H.7A.1U={vc:G(){D.4h.4y(0,D.4h.K)},kK:G(1t){if(H(2O)!="L"&&2O.eg&&2O.eg.5Z){2O.eg.5Z(1t)}N{if(H(7h)!="L"&&7h.kQ){7h.kQ(1t)}N{if(H(5X)=="G"){5X(1t)}}}},kL:G(1t){R(u k in D.7C){u 2n=D.7C[k];if(2n.kO!=k||(2n[0]&&!2n[0](1t))){2V}2n[1](1t)}},hE:G(ee,7D,kP){if(H(7D)=="1n"){7D=B.1H.ef(7D)}u ed=[7D,kP];ed.kO=ee;D.7C[ee]=ed},c9:G(kN){gi D.7C[kN]},kH:G(kM,vb){u 1t=Y B.1H.49(D.4f,kM,B.J.1R(O,M,1));D.4h.1c(1t);D.kL(1t);if(D.e5){D.kK(1t.3N+": "+1t.3z.2b(" "))}D.4f+=1;1M(D.ec>=0&&D.4h.K>D.ec){D.4h.2P()}},c8:G(9U){u ea=0;if(!(H(9U)=="L"||9U===O)){ea=28.29(0,D.4h.K-9U)}F D.4h.9T(ea)},kJ:G(7B){if(H(7B)=="L"||7B===O){7B=30}u 9S=D.c8(7B);if(9S.K){u 1g=2r(G(m){F"\\n ["+m.1P+"] "+m.3N+": "+m.3z.2b(" ")},9S);1g.e9("va "+9S.K+" v9:");F 1g.2b("")}F""},v8:G(kI){if(H(B.1I)=="L"){cq(D.kJ())}N{B.1I.bY(kI||1m)}}};B.1H.2d=G(){D.5C={8M:40,8L:50,8K:30,8J:20,8I:10};u m=B.J;m.5u("49",D.e8,D.e7);u 61=m.2z;u e6=D.7A;u 60=e6.1U.kH;m.2l(D.7A.1U,{kF:61(60,"8I"),5Z:61(60,"8J"),dE:61(60,"8M"),kD:61(60,"8L"),kB:61(60,"8K")});u I=D;u 5Y=G(1b){F G(){I.2L[1b].1w(I.2L,M)}};D.5Z=5Y("5Z");D.kG=5Y("dE");D.ch=5Y("kF");D.kE=5Y("kD");D.kC=5Y("kB");D.2L=Y e6();D.2L.e5=1h;D.2k={":3e":D.1z,":1p":m.2o(D.1z,D.1W)};m.3f(D)};if(H(5X)=="L"&&H(2v)!="L"&&2v.kA&&H(kz)!="L"){5X=G(){5X.3G=M;u ev=2v.kA("v7");ev.v6("5X",1m,1h);kz(ev)}}B.1H.2d();B.J.2Y(D,B.1H);if(H(1q)!="L"){1q.2X("B.1D")}if(H(B)=="L"){B={}}if(H(B.1D)=="L"){B.1D={}}B.1D.1r="B.1D";B.1D.1Y="1.3.1";B.1D.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.1D.1l=G(){F D.1K()};B.1D.ks=G(1y){1y=1y+"";if(H(1y)!="1n"||1y.K===0){F O}u 7z=1y.2R("-");if(7z.K===0){F O}F Y 3Q(7z[0],7z[1]-1,7z[2])};B.1D.ky=/(\\d{4,})(?:-(\\d{1,2})(?:-(\\d{1,2})(?:[T ](\\d{1,2}):(\\d{1,2})(?::(\\d{1,2})(?:\\.(\\d+))?)?(?:(Z)|([+-])(\\d{1,2})(?::(\\d{1,2}))?)?)?)?)?/;B.1D.kr=G(1y){1y=1y+"";if(H(1y)!="1n"||1y.K===0){F O}u X=1y.3C(B.1D.ky);if(H(X)=="L"||X===O){F O}u 5W,7y,7x,9R,2a,9Q,7w;5W=3w(X[1],10);if(H(X[2])=="L"||X[2]===""){F Y 3Q(5W)}7y=3w(X[2],10)-1;7x=3w(X[3],10);if(H(X[4])=="L"||X[4]===""){F Y 3Q(5W,7y,7x)}9R=3w(X[4],10);2a=3w(X[5],10);9Q=(H(X[6])!="L"&&X[6]!=="")?3w(X[6],10):0;if(H(X[7])!="L"&&X[7]!==""){7w=28.ha(c5*4M("0."+X[7]))}N{7w=0}if((H(X[8])=="L"||X[8]==="")&&(H(X[9])=="L"||X[9]==="")){F Y 3Q(5W,7y,7x,9R,2a,9Q,7w)}u 58;if(H(X[9])!="L"&&X[9]!==""){58=3w(X[10],10)*v5;if(H(X[11])!="L"&&X[11]!==""){58+=3w(X[11],10)*kw}if(X[9]=="-"){58=-58}}N{58=0}F Y 3Q(3Q.v4(5W,7y,7x,9R,2a,9Q,7w)-58)};B.1D.dY=G(2g,kx){if(H(2g)=="L"||2g===O){F O}u hh=2g.v3();u mm=2g.v2();u ss=2g.v1();u 1g=[((kx&&(hh<10))?"0"+hh:hh),((mm<10)?"0"+mm:mm),((ss<10)?"0"+ss:ss)];F 1g.2b(":")};B.1D.kq=G(2g,7v){if(H(2g)=="L"||2g===O){F O}u ku=7v?"T":" ";u kt=7v?"Z":"";if(7v){2g=Y 3Q(2g.9P()+(2g.v0()*kw))}F B.1D.dX(2g)+ku+B.1D.dY(2g,7v)+kt};B.1D.dX=G(2g){if(H(2g)=="L"||2g===O){F O}u e4=B.1D.e3;F[2g.dZ(),e4(2g.e1()+1),e4(2g.e0())].2b("-")};B.1D.kp=G(d){d=d+"";if(H(d)!="1n"||d.K===0){F O}u a=d.2R("/");F Y 3Q(a[2],a[0]-1,a[1])};B.1D.e3=G(n){F(n>9)?n:"0"+n};B.1D.ko=G(d){if(H(d)=="L"||d===O){F O}u e2=B.1D.e3;F[e2(d.e1()+1),e2(d.e0()),d.dZ()].2b("/")};B.1D.kn=G(d){if(H(d)=="L"||d===O){F O}F[d.e1()+1,d.e0(),d.dZ()].2b("/")};B.1D.1z=["ks","kr","dY","kq","dX","kp","ko","kn"];B.1D.1W=[];B.1D.2k={":3e":B.1D.1z,":1p":B.1D.1z};B.1D.2d=G(){u 2w=D.1r+".";R(u k in D){u o=D[k];if(H(o)=="G"&&H(o.1r)=="L"){1f{o.1r=2w+k}1e(e){}}}};B.1D.2d();if(H(B.J)!="L"){B.J.2Y(D,B.1D)}N{(G(km,dW){if((H(1x)=="L"&&H(1q)=="L")||(H(B.3d)=="5L"&&B.3d)){u 1p=dW.2k[":1p"];R(u i=0;i<1p.K;i++){km[1p[i]]=dW[1p[i]]}}})(D,B.1D)}if(H(1q)!="L"){1q.2X("B.1s")}if(H(B)=="L"){B={}}if(H(B.1s)=="L"){B.1s={}}B.1s.1r="B.1s";B.1s.1Y="1.3.1";B.1s.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.1s.1l=G(){F D.1K()};B.1s.ke=G(kl,kk,kj,ki,kh,dV,kg,9N,kf){F G(1P){1P=4M(1P);if(H(1P)=="L"||1P===O||k8(1P)){F kl}u 9L=kk;u 9K=kj;if(1P<0){1P=-1P}N{9L=9L.23(/-/,"")}u me=M.2U;u 9M=B.1s.dJ(ki);if(kh){1P=1P*3k;9K=9M.9y+9K}1P=B.1s.dK(1P,dV);u 9O=1P.2R(/\\./);u 3r=9O[0];u 3P=(9O.K==1)?"":9O[1];u X="";1M(3r.K<kg){3r="0"+3r}if(9N){1M(3r.K>9N){u i=3r.K-9N;X=9M.9A+3r.2W(i,3r.K)+X;3r=3r.2W(0,i)}}X=3r+X;if(dV>0){1M(3P.K<kf){3P=3P+"0"}X=X+9M.9z+3P}F 9L+X+9K}};B.1s.k5=G(9J,9H,9G){if(H(9H)=="L"){9H=""}u 3q=9J.3C(/((?:[0#]+,)?[0#]+)(?:\\.([0#]+))?(%)?/);if(!3q){14 3p("uZ uY")}u 7u=9J.3H(0,3q.c6);u kd=9J.3H(3q.c6+3q[0].K);if(7u.uX(/-/)==-1){7u=7u+"-"}u 9I=3q[1];u 3P=(H(3q[2])=="1n"&&3q[2]!="")?3q[2]:"";u kc=(H(3q[3])=="1n"&&3q[3]!="");u dU=9I.2R(/,/);u 9F;if(H(9G)=="L"){9G="dG"}if(dU.K==1){9F=O}N{9F=dU[1].K}u ka=9I.K-9I.23(/0/g,"").K;u k9=3P.K-3P.23(/0/g,"").K;u kb=3P.K;u W=B.1s.ke(9H,7u,kd,9G,kc,kb,ka,9F,k9);u m=B.J;if(m){u fn=M.2U;u 3G=m.2o(M);W.U=G(){F[I.1r,"(",2r(m.U,3G).2b(", "),")"].2b("")}}F W};B.1s.dJ=G(4g){if(H(4g)=="L"||4g===O){4g="dG"}if(H(4g)=="1n"){u W=B.1s.5V[4g];if(H(W)=="1n"){W=M.2U(W);B.1s.5V[4g]=W}F W}N{F 4g}};B.1s.k4=G(dT,9E){if(9E){u X=dT/9E;if(!k8(X)){F B.1s.9B(dT/9E)}}F"0"};B.1s.9B=G(dS){u dR=(dS<0?"-":"");u s=28.8B(28.uW(dS)*3k).1l();if(s=="0"){F s}if(s.K<3){1M(s.3Z(s.K-1)=="0"){s=s.2W(0,s.K-1)}F dR+"0."+s}u 5E=dR+s.2W(0,s.K-2);u 7t=s.2W(s.K-2,s.K);if(7t=="uV"){F 5E}N{if(7t.3Z(1)=="0"){F 5E+"."+7t.3Z(0)}N{F 5E+"."+7t}}};B.1s.dI=G(1y,dQ){1y=1y+"";if(H(1y)!="1n"){F O}if(!dQ){F 1y.23(/^\\s+/,"")}N{F 1y.23(Y 8V("^["+dQ+"]+"),"")}};B.1s.dH=G(1y,dP){1y=1y+"";if(H(1y)!="1n"){F O}if(!dP){F 1y.23(/\\s+$/,"")}N{F 1y.23(Y 8V("["+dP+"]+$"),"")}};B.1s.k2=G(1y,dO){u I=B.1s;F I.dH(I.dI(1y,dO),dO)};B.1s.dL=G(9D,9C){9D=28.8B(9D*28.dN(10,9C));u X=(9D*28.dN(10,-9C)).6I(9C);if(X.3Z(0)=="."){X="0"+X}F X};B.1s.dK=G(k7,dM){F B.1s.dL(k7+0.5*28.dN(10,-dM),dM)};B.1s.k3=G(k6){F B.1s.9B(3k*k6)+"%"};B.1s.1z=["dL","dK","k5","dJ","k4","9B","k3","dI","dH","k2"];B.1s.5V={k1:{9A:",",9z:".",9y:"%"},uU:{9A:".",9z:",",9y:"%"},uT:{9A:" ",9z:",",9y:"%"},"dG":"k1"};B.1s.1W=[];B.1s.2k={":1p":B.1s.1z,":3e":B.1s.1z};B.1s.2d=G(){u 2w=D.1r+".";u k,v,o;R(k in D.5V){o=D.5V[k];if(H(o)=="3n"){o.U=G(){F D.1r};o.1r=2w+"5V."+k}}R(k in D){o=D[k];if(H(o)=="G"&&H(o.1r)=="L"){1f{o.1r=2w+k}1e(e){}}}};B.1s.2d();if(H(B.J)!="L"){B.J.2Y(D,B.1s)}N{(G(k0,dF){if((H(1x)=="L"&&H(1q)=="L")||(H(B.3d)=="5L"&&B.3d)){u 1p=dF.2k[":1p"];R(u i=0;i<1p.K;i++){k0[1p[i]]=dF[1p[i]]}}})(D,B.1s)}if(H(1q)!="L"){1q.2X("B.1k");1q.2M("B.J")}if(H(1x)!="L"){1x.26("B.J",[])}1f{if(H(B.J)=="L"){14""}}1e(e){14"B.1k 3F on B.J!"}if(H(B.1k)=="L"){B.1k={}}B.1k.1r="B.1k";B.1k.1Y="1.3.1";B.1k.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.1k.1l=G(){F D.1K()};B.1k.2t=G(jZ){D.55=[];D.id=D.7n();D.2H=-1;D.54=0;D.53=[O,O];D.7m=jZ;D.7l=1m;D.7r=1m};B.1k.2t.1U={U:G(){u 7s;if(D.2H==-1){7s="uS"}N{if(D.2H===0){7s="uR"}N{7s="dE"}}F"2t("+D.id+", "+7s+")"},1l:B.J.24("U"),7n:B.J.4f(),jY:G(){u I=B.1k;if(D.2H==-1){if(D.7m){D.7m(D)}N{D.7l=1h}if(D.2H==-1){D.52(Y I.di(D))}}N{if((D.2H===0)&&(D.53[0]2C I.2t)){D.53[0].jY()}}},jQ:G(){D.54++},jX:G(){D.54--;if((D.54===0)&&(D.2H>=0)){D.9u()}},jR:G(X){D.9x(X);D.jX()},9x:G(X){D.2H=((X 2C 2x)?1:0);D.53[D.2H]=X;D.9u()},dD:G(){if(D.2H!=-1){if(!D.7l){14 Y B.1k.dj(D)}D.7l=1m;F}},3o:G(X){D.dD();if(X 2C B.1k.2t){14 Y 2x("2t jW 9v aB be 7r if jV jU jT jS of a 3o")}D.9x(X)},52:G(X){D.dD();u I=B.1k;if(X 2C I.2t){14 Y 2x("2t jW 9v aB be 7r if jV jU jT jS of a 3o")}if(!(X 2C 2x)){X=Y I.9p(X)}D.9x(X)},jP:G(fn){if(M.K>1){fn=B.J.2z.1w(O,M)}F D.9w(fn,fn)},5Q:G(fn){if(M.K>1){fn=B.J.2z.1w(O,M)}F D.9w(fn,O)},jA:G(fn){if(M.K>1){fn=B.J.2z.1w(O,M)}F D.9w(O,fn)},9w:G(cb,eb){if(D.7r){14 Y 2x("uQ uP 9v 2E be re-uO")}D.55.1c([cb,eb]);if(D.2H>=0){D.9u()}F D},9u:G(){u dC=D.55;u 56=D.2H;u X=D.53[56];u I=D;u cb=O;1M(dC.K>0&&D.54===0){u 2n=dC.2P();u f=2n[56];if(f===O){2V}1f{X=f(X);56=((X 2C 2x)?1:0);if(X 2C B.1k.2t){cb=G(X){I.jR(X)};D.jQ()}}1e(3O){56=1;if(!(3O 2C 2x)){3O=Y B.1k.9p(3O)}X=3O}}D.2H=56;D.53[56]=X;if(cb&&D.54){X.jP(cb);X.7r=1h}}};B.J.2l(B.1k,{dk:G(){F dB("("+M[0].jN+")")},dp:G(uN){u d=Y B.1k.2t();d.3o.1w(d,M);F d},9q:G(uM){u d=Y B.1k.2t();d.52.1w(d,M);F d},do:G(){u I=M.2U;if(!I.7q){u dy=[G(){F Y 7q()},G(){F Y dA("jO.dz")},G(){F Y dA("uL.dz")},G(){F Y dA("jO.dz.4.0")},G(){14 Y B.1k.dh("uK uJ 2E uI 7q")}];R(u i=0;i<dy.K;i++){u 1A=dy[i];1f{I.7q=1A;F 1A()}1e(e){}}}F I.7q()},dx:G(){},jK:G(d){if(D.uH==4){1f{D.5T=O}1e(e){1f{D.5T=B.1k.dx}1e(e){}}u 5U=O;1f{5U=D.jm;if(!5U&&B.J.7e(D.jN)){5U=jM}}1e(e){}if(5U==hQ||5U==jM){d.3o(D)}N{u 3O=Y B.1k.dg(D,"uG uF");if(3O.2y){d.52(3O)}N{d.52(3O)}}}},jL:G(2s){1f{2s.5T=O}1e(e){1f{2s.5T=B.1k.dx}1e(e){}}2s.uE()},dl:G(2s,7p){if(H(7p)=="L"||7p===O){7p=""}u m=B.J;u I=B.1k;u d=Y I.2t(m.2z(I.jL,2s));1f{2s.5T=m.1O(I.jK,2s,d);2s.uD(7p)}1e(e){1f{2s.5T=O}1e(uC){}d.52(e)}F d},dn:G(5F){u I=B.1k;u 2s=I.do();if(M.K>1){u m=B.J;u qs=m.dw.1w(O,m.1R(O,M,1));if(qs){5F+="?"+qs}}2s.cp("uB",5F,1h);F I.dl(2s)},jv:G(5F){u I=B.1k;u d=I.dn.1w(I,M);d=d.5Q(I.dk);F d},dm:G(jJ,dv){u d=Y B.1k.2t();u m=B.J;if(H(dv)!="L"){d.5Q(G(){F dv})}u jI=uA(m.1O("3o",d),28.8B(jJ*c5));d.7m=G(){1f{uz(jI)}1e(e){}};F d},ju:G(jH,1A){u m=B.J;u jG=m.2z.1w(m,m.1R(O,M,1));F B.1k.dm(jH).5Q(G(X){F jG()})}});B.1k.5O=G(){D.5S=[];D.4e=1m;D.id=D.7n()};B.1k.5O.1U={bX:B.1k.5O,uy:G(){d=Y B.1k.2t();if(D.4e){D.5S.1c(d)}N{D.4e=1h;d.3o(D)}F d},jF:G(){if(!D.4e){14 3p("ux to jF an jE 5O")}D.4e=1m;if(D.5S.K>0){D.4e=1h;D.5S.2P().3o(D)}},7n:B.J.4f(),U:G(){u 9t;if(D.4e){9t="4e, "+D.5S.K+" 5S"}N{9t="jE"}F"5O("+D.id+", "+9t+")"},1l:B.J.24("U")};B.1k.7i=G(2G,du,jC,jB,jD){D.2G=2G;D.9r=Y 7o(D.2G.K);D.55=[];D.id=D.7n();D.2H=-1;D.54=0;D.53=[O,O];D.7m=jD;D.7l=1m;if(D.2G.K===0&&!du){D.3o(D.9r)}D.dr=0;D.jz=du;D.jy=jC;D.jx=jB;u 9s=0;B.J.2r(B.J.1O(G(d){d.5Q(B.J.1O(D.dt,D),9s,1h);d.jA(B.J.1O(D.dt,D),9s,1m);9s+=1},D),D.2G)};B.J.2l(B.1k.7i.1U,B.1k.2t.1U);B.J.2l(B.1k.7i.1U,{dt:G(ds,7k,5R){D.9r[ds]=[7k,5R];D.dr+=1;if(D.2H!==0){if(7k&&D.jz){D.3o([ds,5R])}N{if(!7k&&D.jy){D.52(5R)}N{if(D.dr==D.2G.K){D.3o(D.9r)}}}}if(!7k&&D.jx){5R=O}F 5R}});B.1k.jt=G(jw){u d=Y B.1k.7i(jw,1m,1h,1m);d.5Q(G(dq){u 7j=[];R(u i=0;i<dq.K;i++){7j.1c(dq[i][1])}F 7j});F d};B.1k.jr=G(1A){u I=B.1k;u 5P;1f{u r=1A.1w(O,B.J.1R([],M,1));if(r 2C I.2t){5P=r}N{if(r 2C 2x){5P=I.9q(r)}N{5P=I.dp(r)}}}1e(e){5P=I.9q(e)}F 5P};B.1k.1z=["dj","di","dh","9p","dg","2t","dp","9q","do","dn","jv","dm","ju","dl","5O","7i","jt","jr"];B.1k.1W=["dk"];B.1k.2d=G(){u m=B.J;u ne=m.2z(m.jq,D);ne("dj",G(jp){D.jo=jp});ne("di",G(jn){D.jo=jn});ne("dh",G(1t){D.43=1t});ne("9p",G(1t){D.43=1t});ne("dg",G(2s,1t){D.2s=2s;D.43=1t;1f{D.2y=2s.jm}1e(e){}});D.2k={":3e":D.1z,":1p":m.2o(D.1z,D.1W)};m.3f(D)};B.1k.2d();B.J.2Y(D,B.1k);if(H(1q)!="L"){1q.2X("B.S");1q.2M("B.15")}if(H(1x)!="L"){1x.26("B.15",[])}1f{if(H(B.15)=="L"){14""}}1e(e){14"B.S 3F on B.15!"}if(H(B.S)=="L"){B.S={}}B.S.1r="B.S";B.S.1Y="1.3.1";B.S.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.S.1l=G(){F D.1K()};B.S.1z=["d5","cr","b9","95","94","j3","9k","cX","cw","iT","iV","4X","9j","iQ","hS","cs","ia","i9","i8","i7","i6","i5","i4","hV","i3","i2","i1","cu","hW","ct","i0","hZ","hY","hX","P","io","il","ik","ij","cm","ih","ii","ig","ie","ic","cv","8d","A","6m","ib","1E","$","4q","aH","cO","cN","iM","5G","iK","9d","9e","iH","iD","9c","iB","cG","97","hU","hT","iw","jh","jb","j6","j5","jk","jl"];B.S.1W=["9b"];B.S.5N=G(w,h){D.w=w;D.h=h};B.S.5N.1U.U=G(){u U=B.J.U;F"{w: "+U(D.w)+", h: "+U(D.h)+"}"};B.S.5t=G(x,y){D.x=x;D.y=y};B.S.5t.1U.U=G(){u U=B.J.U;F"{x: "+U(D.x)+", y: "+U(D.y)+"}"};B.S.5t.1U.1l=G(){F D.U()};B.J.2l(B.S,{jl:G(Q,o){Q=B.S.1E(Q);B.S.4X(Q,{"1T":{"9o":o,"-hL-9o":o,"-uw-9o":o,"47":" uv(9o="+(o*3k)+")"}})},jk:G(){u d=Y B.S.5N();u w=B.S.3X;u b=B.S.1Z.5s;if(w.jj){d.w=w.jj;d.h=w.uu}N{if(b.dd.9n){d.w=b.dd.9n;d.h=b.dd.ji}N{if(b&&b.9n){d.w=b.9n;d.h=b.ji}}}F d},jh:G(Q){u I=B.S;if(H(Q.w)=="2y"||H(Q.h)=="2y"){F Y I.5N(Q.w||0,Q.h||0)}Q=I.1E(Q);if(!Q){F L}if(I.4q(Q,"3u")!="98"){F Y I.5N(Q.jg||0,Q.ci||0)}u s=Q.1T;u je=s.dc;u jf=s.6P;s.dc="fR";s.6P="j8";s.3u="";u jd=Q.jg;u jc=Q.ci;s.3u="98";s.6P=jf;s.dc=je;F Y I.5N(jd,jc)},jb:G(Q,4Z){u I=B.S;Q=I.1E(Q);if(!Q){F L}u c=Y I.5t(0,0);if(Q.x&&Q.y){c.x+=Q.x||0;c.y+=Q.y||0;F c}N{if(Q.3t===O||I.4q(Q,"3u")=="98"){F L}}u 51=O;u 2j=O;u d=B.S.1Z;u de=d.7Z;u b=d.5s;if(Q.ja){51=Q.ja();c.x+=51.2I+(de.6y||b.6y)-(de.8q||b.8q);c.y+=51.3D+(de.4C||b.4C)-(de.8p||b.8p)}N{if(d.j9){51=d.j9(Q);c.x+=51.x;c.y+=51.y}N{if(Q.8g){c.x+=Q.db;c.y+=Q.da;2j=Q.8g;if(2j!=Q){1M(2j){c.x+=2j.db;c.y+=2j.da;2j=2j.8g}}u ua=ut.us.8G();if((H(7h)!="L"&&4M(7h.ur())<9)||(ua.2A("uq")!=-1&&I.4q(Q,"6P")=="j8")){c.x-=b.db;c.y-=b.da}}}}if(H(4Z)!="L"){4Z=M.2U(4Z);if(4Z){c.x-=(4Z.x||0);c.y-=(4Z.y||0)}}if(Q.3t){2j=Q.3t}N{2j=O}1M(2j&&2j.j7!="uo"&&2j.j7!="co"){c.x-=2j.6y;c.y-=2j.4C;if(2j.3t){2j=2j.3t}N{2j=O}}F c},j6:G(Q,d9,7g){Q=B.S.1E(Q);if(H(7g)=="L"){7g="px"}B.S.4X(Q,{"1T":{"5A":d9.w+7g,"3V":d9.h+7g}})},j5:G(Q,d8,7f){Q=B.S.1E(Q);if(H(7f)=="L"){7f="px"}B.S.4X(Q,{"1T":{"2I":d8.x+7f,"3D":d8.y+7f}})},cr:G(){F B.S.3X},b9:G(){F B.S.1Z},95:G(2m,1A){u I=B.S;u d6=I.1Z;u d7=I.un;u W;1f{I.3X=2m;I.1Z=2m.2v;W=1A()}1e(e){I.3X=d7;I.1Z=d6;14 e}I.3X=d7;I.1Z=d6;F W},d5:G(Q){u 7d=[];u 7c=[];u m=B.J;u I=B.S;if(H(Q)=="L"||Q===O){Q=I.1Z}N{Q=I.1E(Q)}m.d4(Q,G(Q){u 1b=Q.1b;if(m.7e(1b)){u 4Y=Q.cD;if(4Y=="cv"&&(Q.1J=="um"||Q.1J=="uk")&&!Q.ip){F O}if(4Y=="ct"){if(Q.j4>=0){u 9m=Q.1S[Q.j4];7d.1c(1b);7c.1c((9m.3m)?9m.3m:9m.7X);F O}7d.1c(1b);7c.1c("");F O}if(4Y=="cu"||4Y=="P"||4Y=="8d"||4Y=="6m"){F Q.5h}7d.1c(1b);7c.1c(Q.3m||"");F O}F Q.5h});F[7d,7c]},94:G(1N,1A){u I=B.S;u d3=I.1Z;u W;1f{I.1Z=1N;W=1A()}1e(e){I.1Z=d3;14 e}I.1Z=d3;F W},j3:G(1b,j2,3y,j1){B.S.9b.5M(1b,j2,3y,j1)},9k:G(1j,7a){u im=B.15;u I=B.S;u 1Q=im.1Q;u iY=im.7b;u 4c=im.4c;u iX=I.9b;u iZ=I.9k;u iW=B.J.4d;1M(1h){if(H(1j)=="L"||1j===O){F O}if(H(1j.3T)!="L"&&1j.3T>0){F 1j}if(H(1j)=="2y"||H(1j)=="5L"){1j=1j.1l()}if(H(1j)=="1n"){F I.1Z.4S(1j)}if(H(1j.j0)=="G"){1j=1j.j0(7a);2V}if(H(1j)=="G"){1j=1j(7a);2V}u 9l=O;1f{9l=1Q(1j)}1e(e){}if(9l){F 4c(iZ,9l,iY(7a))}1f{1j=iX.3C(1j,7a);2V}1e(e){if(e!=iW){14 e}}F I.1Z.4S(1j.1l())}F L},iV:G(1j,79,iU){u o={};o[79]=iU;1f{F B.S.4X(1j,o)}1e(e){}F O},iT:G(1j,79){u I=B.S;u d2=I.4U.99[79];1j=I.1E(1j);1f{if(d2){F 1j[d2]}F 1j.fm(79)}1e(e){}F O},4X:G(1j,5K){u Q=1j;u I=B.S;if(H(1j)=="1n"){Q=I.1E(1j)}if(5K){u d0=B.J.8Z;if(I.4U.6X){R(u k in 5K){u v=5K[k];if(H(v)=="3n"&&H(Q[k])=="3n"){d0(Q[k],v)}N{if(k.2W(0,2)=="on"){if(H(v)=="1n"){v=Y cZ(v)}Q[k]=v}N{Q.4p(k,v)}}}}N{u iS=I.4U.99;R(k in 5K){v=5K[k];u d1=iS[k];if(k=="1T"&&H(v)=="1n"){Q.1T.3x=v}N{if(H(d1)=="1n"){Q[d1]=v}N{if(H(Q[k])=="3n"&&H(v)=="3n"){d0(Q[k],v)}N{if(k.2W(0,2)=="on"){if(H(v)=="1n"){v=Y cZ(v)}Q[k]=v}N{Q.4p(k,v)}}}}}}}F Q},9j:G(1j){u Q=1j;u I=B.S;if(H(1j)=="1n"){Q=I.1E(1j)}u 78=[I.9k(B.J.1R(O,M,1),Q)];u iR=B.J.2o;1M(78.K){u n=78.2P();if(H(n)=="L"||n===O){}N{if(H(n.3T)=="2y"){Q.2c(n)}N{78=iR(n,78)}}}F Q},iQ:G(1j){u Q=1j;u I=B.S;if(H(1j)=="1n"){Q=I.1E(1j);M[0]=Q}u cY;1M((cY=Q.6n)){Q.6S(cY)}if(M.K<2){F Q}N{F I.9j.1w(D,M)}},cX:G(1b,4b){u Q;u I=B.S;u m=B.J;if(H(4b)=="1n"||H(4b)=="2y"){u 3G=m.1R([1b,O],M,1);F M.2U.1w(D,3G)}if(H(1b)=="1n"){if(4b&&"1b"in 4b&&!I.4U.6X){1b=("<"+1b+" 1b=\\""+I.9c(4b.1b)+"\\">")}Q=I.1Z.2S(1b)}N{Q=1b}if(4b){I.4X(Q,4b)}if(M.K<=2){F Q}N{u 3G=m.1R([Q],M,2);F I.9j.1w(D,3G)}},cw:G(){u m=B.J;F m.2z.1w(D,m.1R([B.S.cX],M))},cs:G(5J,1d){u I=B.S;5J=I.1E(5J);u cW=5J.3t;if(1d){1d=I.1E(1d);cW.uj(1d,5J)}N{cW.6S(5J)}F 1d},1E:G(id){u I=B.S;if(M.K==1){F((H(id)=="1n")?I.1Z.hN(id):id)}N{F B.J.2r(I.1E,M)}},4q:G(iP,cV,cU){if(M.K==2){cU=cV}u I=B.S;u el=I.1E(iP);u 77=I.1Z;if(!el||el==77){F L}if(el.iO){F el.iO[cV]}if(H(77.5k)=="L"){F L}if(77.5k===O){F L}u 9i=77.5k.g4(el,O);if(H(9i)=="L"||9i===O){F L}F 9i.6q(cU)},aH:G(76,9g,4W){u I=B.S;if(H(76)=="L"||76===O){76="*"}if(H(4W)=="L"||4W===O){4W=I.1Z}4W=I.1E(4W);u 9h=(4W.fr(76)||I.1Z.1p);if(H(9g)=="L"||9g===O){F B.J.1R(O,9h)}u cR=[];R(u i=0;i<9h.K;i++){u cS=9h[i];u cT=cS.3M.2R(" ");R(u j=0;j<cT.K;j++){if(cT[j]==9g){cR.1c(cS);2K}}}F cR},iN:G(5I,9f){u W=G(){u cQ=M.2U.5H;R(u i=0;i<cQ.K;i++){if(cQ[i].1w(D,M)===1m){2K}}if(9f){1f{D[5I]=O}1e(e){}}};W.5H=[];F W},cO:G(cP,5I,1A,9f){u I=B.S;u 4V=cP[5I];u 75=4V;if(!(H(4V)=="G"&&H(4V.5H)=="3n"&&4V.5H!==O)){75=I.iN(5I,9f);if(H(4V)=="G"){75.5H.1c(4V)}cP[5I]=75}75.5H.1c(1A)},cN:G(1A){u I=B.S;I.cO(I.3X,"gh",1A,1h)},iM:G(74){u I=B.S;I.cN(G(){74=I.1E(74);if(74){74.ui()}})},5G:G(iL,cM){u I=B.S;u 1i=I.1E(iL);if(I.4U.6X){1i.4p("iq",cM)}N{1i.4p("3M",cM)}},iK:G(cL){u I=B.S;R(u i=1;i<M.K;i++){u 1i=I.1E(M[i]);if(!I.9d(1i,cL)){I.9e(1i,cL)}}},9d:G(iJ,73){u I=B.S;u 1i=I.1E(iJ);u 2F=1i.3M;if(2F.K===0){I.5G(1i,73);F 1h}if(2F==73){F 1m}u cK=1i.3M.2R(" ");R(u i=0;i<cK.K;i++){if(cK[i]==73){F 1m}}I.5G(1i,2F+" "+73);F 1h},9e:G(iI,cJ){u I=B.S;u 1i=I.1E(iI);u 2F=1i.3M;if(2F.K===0){F 1m}if(2F==cJ){I.5G(1i,"");F 1h}u 72=1i.3M.2R(" ");R(u i=0;i<72.K;i++){if(72[i]==cJ){72.4y(i,1);I.5G(1i,72.2b(" "));F 1h}}F 1m},iH:G(iG,iF,iE){u 1i=B.S.1E(iG);u X=B.S.9e(1i,iF);if(X){B.S.9d(1i,iE)}F X},iD:G(iC,uh){u 1i=B.S.1E(iC);u cI=1i.3M.2R(" ");R(u i=1;i<M.K;i++){u cH=1m;R(u j=0;j<cI.K;j++){if(cI[j]==M[i]){cH=1h;2K}}if(!cH){F 1m}}F 1h},9c:G(s){F s.23(/&/g,"&ug;").23(/"/g,"&uf;").23(/</g,"&lt;").23(/>/g,"&gt;")},iB:G(2q){F B.S.cG(2q).2b("")},cG:G(2q,1g){if(H(1g)=="L"||1g===O){1g=[]}u 70=[2q];u I=B.S;u cB=I.9c;u iA=I.4U;1M(70.K){2q=70.hP();if(H(2q)=="1n"){1g.1c(2q)}N{if(2q.3T==1){1g.1c("<"+2q.cD.8G());u 71=[];u cF=iA(2q);R(u i=0;i<cF.K;i++){u a=cF[i];71.1c([" ",a.1b,"=\\"",cB(a.3m),"\\""])}71.iz();R(i=0;i<71.K;i++){u cE=71[i];R(u j=0;j<cE.K;j++){1g.1c(cE[j])}}if(2q.ue()){1g.1c(">");70.1c("</"+2q.cD.8G()+">");u cC=2q.5h;R(i=cC.K-1;i>=0;i--){70.1c(cC[i])}}N{1g.1c("/>")}}N{if(2q.3T==3){1g.1c(cB(2q.iv))}}}}F 1g},97:G(ix,cA){u m=B.J;u iy=m.1R(O,M,1);B.15.9a(m.47(O,m.2r(B.S.1E,iy)),G(cA){cA.1T.3u=ix})},iw:G(1j,iu){u W=[];(G(1j){u cn=1j.5h;if(cn){R(u i=0;i<cn.K;i++){M.2U.cz(D,cn[i])}}u cy=1j.iv;if(H(cy)=="1n"){W.1c(cy)}})(B.S.1E(1j));if(iu){F W}N{F W.2b("")}},2d:G(2m){u m=B.J;D.1Z=2v;D.3X=2m;D.9b=Y m.4a();u 6Z=D.1Z.2S("cj");u 2T;if(6Z&&6Z.6Y&&6Z.6Y.K>0){u it=m.47;2T=G(1j){F it(2T.ir,1j.6Y)};2T.cx={};B.15.9a(6Z.6Y,G(a){2T.cx[a.1b]=a.3m});2T.ir=G(a){F(2T.cx[a.1b]!=a.3m)};2T.6X=1m;2T.99={"iq":"3M","ip":"ud","uc":"ub","R":"u9"}}N{2T=G(1j){F 1j.6Y};2T.6X=1h;2T.99={}}D.4U=2T;u 1C=D.cw;D.io=1C("ul");D.il=1C("ol");D.ik=1C("li");D.ij=1C("td");D.cm=1C("tr");D.ii=1C("u8");D.ih=1C("u7");D.ig=1C("u6");D.ie=1C("u5");D.ic=1C("th");D.cv=1C("ck");D.8d=1C("cj");D.A=1C("a");D.6m=1C("4u");D.ib=1C("u4");D.ia=1C("2e");D.i9=1C("tt");D.i8=1C("4O");D.i7=1C("h1");D.i6=1C("h2");D.i5=1C("h3");D.i4=1C("br");D.i3=1C("hr");D.i2=1C("u3");D.i1=1C("u2");D.cu=1C("u1");D.P=1C("p");D.ct=1C("u0");D.i0=1C("hJ");D.hZ=1C("tZ");D.hY=1C("tY");D.hX=1C("tX");D.hW=1C("tW");D.hV=1C("tV");D.hU=m.2z(D.97,"98");D.hT=m.2z(D.97,"8c");D.hS=D.cs;D.$=D.1E;D.2k={":3e":D.1z,":1p":m.2o(D.1z,D.1W)};m.3f(D)}});B.S.2d(((H(2O)=="L")?D:2O));if(!B.3d){95=B.S.95;94=B.S.94}B.J.2Y(D,B.S);if(H(1q)!="L"){1q.2X("B.1I");1q.2M("B.1H");1q.2M("B.J")}if(H(1x)!="L"){1x.26("B.1H",[]);1x.26("B.J",[])}1f{if(H(B.J)=="L"||H(B.1H)=="L"){14""}}1e(e){14"B.1I 3F on B.J 3W B.1H!"}if(H(B.1I)=="L"){B.1I={}}B.1I.1r="B.1I";B.1I.1Y="1.3.1";B.1I.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.1I.1l=G(){F D.1K()};B.1I.bY=G(6W){u m=B.1I;6W=!(!6W);if(m.3l&&m.3l.8Q!=6W){m.3l.hA();m.3l=O}if(!m.3l||m.3l.8P){m.3l=Y m.1I(6W,B.1H.2L)}F m.3l};B.1I.1I=G(4R,6V){if(H(6V)=="L"||6V===O){6V=B.1H.2L}D.2L=6V;u tU=B.J.2l;u c3=B.J.8Z;u 1O=B.J.1O;u hM=B.J.4L;u 2m=2O;u 6U="tT";if(H(B.S)!="L"){2m=B.S.cr()}if(!4R){u 5F=2m.tS.tR.2R("?")[0].23(/[:\\/.><&]/g,"hR");u 1b=6U+"hR"+5F;u 5D=2m.cp("",1b,"tQ,tP,3V=hQ");if(!5D){cq("tO tN to cp tM 2O tL to hP-up tK.");F L}5D.2v.fl("<!tJ co tI \\"-//tH//tG co 4.0 tF//tE\\" "+"\\"fq://fp.tD.fo/cm/tC/tB.tA\\">"+"<hO><5E><8Y>[B.1I]</8Y></5E>"+"<5s></5s></hO>");5D.2v.hG();5D.2v.8Y+=" "+2m.2v.8Y;2m=5D}u 1N=2m.2v;D.1N=1N;u 21=1N.hN(6U);u c4=!!21;if(21&&H(21.5B)!="L"){21.5B.2L=D.2L;21.5B.6K();F 21.5B}if(c4){u cl;1M((cl=21.6n)){21.6S(cl)}}N{21=1N.2S("4u");21.id=6U}21.5B=D;u 8T=1N.2S("ck");u 8S=1N.2S("ck");u 6O=1N.2S("2e");u 6N=1N.2S("2e");u 6M=1N.2S("2e");u 6L=1N.2S("2e");u 3L=1N.2S("4u");u 42=1N.2S("4u");u 8U=6U+"tz";D.8N=hM(D.8N);u 4T=[];u 6R=O;u cf=G(1t){u 6T=1t.3N;if(H(6T)=="2y"){6T=B.1H.5C[6T]}F 6T};u cd=G(1t){F 1t.3z.2b(" ")};u ca=1O(G(1t){u 8W=cf(1t);u 7X=cd(1t);u c=D.8N[8W];u p=1N.2S("cj");p.3M="B-49 B-5C-"+8W;p.1T.3x="ty: 2N; 4F-8X: -hL-4O-3y; 4F-8X: -o-4O-3y; 4F-8X: 4O-3y; 4F-8X: 4O-tx; hK-3y: 2K-hK; 3y-hJ: tw; 3U: "+c;p.2c(1N.4S(8W+": "+7X));42.2c(p);42.2c(1N.2S("br"));if(3L.ci>3L.hI){3L.4C=0}N{3L.4C=3L.hI}},D);u hD=G(1t){4T[4T.K]=1t;ca(1t)};u hF=G(){u cg,ce;1f{cg=Y 8V(8T.3m);ce=Y 8V(8S.3m)}1e(e){ch("2x in 47 tv: "+e.43);F O}F G(1t){F(cg.hH(cf(1t))&&ce.hH(cd(1t)))}};u cc=G(){1M(42.6n){42.6S(42.6n)}};u hB=G(){4T=[];cc()};u bZ=1O(G(){if(D.8P){F}D.8P=1h;if(B.1I.3l==D){B.1I.3l=O}D.2L.c9(8U);21.5B=O;if(4R){21.3t.6S(21)}N{D.2m.hG()}},D);u c7=G(){cc();R(u i=0;i<4T.K;i++){u 1t=4T[i];if(6R===O||6R(1t)){ca(1t)}}};D.6K=G(){6R=hF();c7();D.2L.c9(8U);D.2L.hE(8U,6R,hD)};u c0=1O(G(){4T=D.2L.c8();c7()},D);u c2=1O(G(6Q){6Q=6Q||2O.6D;2h=6Q.6w||6Q.8t;if(2h==13){D.6K()}},D);u 31="3u: 8c; z-c6: c5; 2I: 2N; 6f: 2N; 6P: tu; 5A: 3k%; he-3U: 4F; c1: "+D.8O;if(4R){31+="; 3V: ts; 3E-3D: fO 8a 8y"}N{31+="; 3V: 3k%;"}21.1T.3x=31;if(!c4){1N.5s.2c(21)}31={"3x":"5A: 33%; 3u: 8Q; c1: "+D.8O};c3(8T,{"3m":"8L|8M|8K|8J|8I","hC":c2,"1T":31});21.2c(8T);c3(8S,{"3m":".*","hC":c2,"1T":31});21.2c(8S);31="5A: 8%; 3u:8Q; c1: "+D.8O;6O.2c(1N.4S("tq"));6O.8R=1O("6K",D);6O.1T.3x=31;21.2c(6O);6N.2c(1N.4S("tp"));6N.8R=c0;6N.1T.3x=31;21.2c(6N);6M.2c(1N.4S("tn"));6M.8R=hB;6M.1T.3x=31;21.2c(6M);6L.2c(1N.4S("tm"));6L.8R=bZ;6L.1T.3x=31;21.2c(6L);3L.1T.3x="fS: tk; 5A: 3k%";42.1T.3x="5A: 3k%; 3V: "+(4R?"tj":"3k%");3L.2c(42);21.2c(3L);D.6K();c0();if(4R){D.2m=L}N{D.2m=2m}D.8Q=4R;D.hA=bZ;D.8P=1m;F D};B.1I.1I.1U={"8O":"ti tg,tf-te","8N":{"8M":"1v","8L":"gU","8K":"1F","8J":"8y","8I":"bx"}};B.1I.1W=["1I"];B.1I.1z=["bY"];B.1I.2d=G(){D.2k={":3e":D.1z,":1p":B.J.2o(D.1z,D.1W)};B.J.3f(D);B.1I.3l=O};B.1I.2d();B.J.2Y(D,B.1I);if(H(1q)!="L"){1q.2X("B.V");1q.2M("B.J")}if(H(1x)!="L"){1x.26("B.J",[])}1f{if(H(B.J)=="L"){14""}}1e(e){14"B.V 3F on B.J"}if(H(B.V)=="L"){B.V={}}B.V.1r="B.V";B.V.1Y="1.3.1";B.V.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.V.1l=G(){F D.1K()};B.V.V=G(1v,hz,1F,6J){if(H(6J)=="L"||6J===O){6J=1}D.1B={r:1v,g:hz,b:1F,a:6J}};B.V.V.1U={bX:B.V.V,tc:G(hy){u 1B=D.1B;u m=B.V;F m.V.3Y(1B.r,1B.g,1B.b,hy)},tb:G(1o){u 1G=D.41();1G.h=1o;u m=B.V;F m.V.4H(1G)},ta:G(hx){u 1G=D.41();1G.s=hx;u m=B.V;F m.V.4H(1G)},t9:G(hw){u 1G=D.41();1G.l=hw;u m=B.V;F m.V.4H(1G)},t8:G(hv){u 1G=D.41();1G.l=28.29(1G.l-hv,0);u m=B.V;F m.V.4H(1G)},t7:G(hu){u 1G=D.41();1G.l=28.2a(1G.l+hu,1);u m=B.V;F m.V.4H(1G)},fJ:G(ht,5z){if(H(5z)=="L"||5z===O){5z=0.5}u sf=1-5z;u s=D.1B;u d=ht.1B;u df=5z;F B.V.V.3Y((s.r*sf)+(d.r*df),(s.g*sf)+(d.g*df),(s.b*sf)+(d.b*df),(s.a*sf)+(d.a*df))},h4:G(hs){u a=D.6r();u b=hs.6r();F B.J.2f([a.r,a.g,a.b,a.a],[b.r,b.g,b.b,b.a])},hq:G(){F D.41().b>0.5},t6:G(){F(!D.hq())},t5:G(){u c=D.41();u 2Z=B.V.6F;u W=D.ho;if(!W){u 5y=(2Z(c.h,bF).6I(0)+","+2Z(c.s,3k).hp(4)+"%"+","+2Z(c.l,3k).hp(4)+"%");u a=c.a;if(a>=1){a=1;W="1G("+5y+")"}N{if(a<=0){a=0}W="t4("+5y+","+a+")"}D.ho=W}F W},hl:G(){u c=D.1B;u 2Z=B.V.6F;u W=D.hn;if(!W){u 5y=(2Z(c.r,3h).6I(0)+","+2Z(c.g,3h).6I(0)+","+2Z(c.b,3h).6I(0));if(c.a!=1){W="t3("+5y+","+c.a+")"}N{W="1B("+5y+")"}D.hn=W}F W},6r:G(){F B.J.4L(D.1B)},t2:G(){u m=B.V;u c=D.1B;u 2Z=B.V.6F;u W=D.hm;if(!W){W=("#"+m.6E(2Z(c.r,3h))+m.6E(2Z(c.g,3h))+m.6E(2Z(c.b,3h)));D.hm=W}F W},t1:G(){u 2Q=D.2Q;u c=D.1B;if(H(2Q)=="L"||2Q===O){2Q=B.V.bA(D.1B);D.2Q=2Q}F B.J.4L(2Q)},41:G(){u 1G=D.1G;u c=D.1B;if(H(1G)=="L"||1G===O){1G=B.V.bC(D.1B);D.1G=1G}F B.J.4L(1G)},1l:G(){F D.hl()},U:G(){u c=D.1B;u hk=[c.r,c.g,c.b,c.a];F D.bX.1r+"("+hk.2b(", ")+")"}};B.J.2l(B.V.V,{3Y:G(1v,bW,1F,8H){u hj=B.V.V;if(M.K==1){u 1B=1v;1v=1B.r;bW=1B.g;1F=1B.b;if(H(1B.a)=="L"){8H=L}N{8H=1B.a}}F Y hj(1v,bW,1F,8H)},4H:G(1o,t0,sZ,sY){u m=B.V;F m.V.3Y(m.bB.1w(m,M))},sX:G(1o,sW,sV,sU){u m=B.V;F m.V.3Y(m.bz.1w(m,M))},hi:G(1b){u 8F=B.V.V;if(1b.3Z(0)=="\\""){1b=1b.3H(1,1b.K-2)}u bV=8F.by[1b.8G()];if(H(bV)=="1n"){F 8F.bT(bV)}N{if(1b=="aP"){F 8F.sT()}}F O},8f:G(4Q){u I=B.V.V;u bU=4Q.3H(0,3);if(bU=="1B"){F I.h9(4Q)}N{if(bU=="1G"){F I.h8(4Q)}N{if(4Q.3Z(0)=="#"){F I.bT(4Q)}}}F I.hi(4Q)},bT:G(4P){if(4P.3Z(0)=="#"){4P=4P.2W(1)}u 8E=[];u i,5x;if(4P.K==3){R(i=0;i<3;i++){5x=4P.3H(i,1);8E.1c(3w(5x+5x,16)/3h)}}N{R(i=0;i<6;i+=2){5x=4P.3H(i,2);8E.1c(3w(5x,16)/3h)}}u bS=B.V.V;F bS.3Y.1w(bS,8E)},bG:G(4O,hf,hg,4N){if(4N.2A(4O)===0){4N=4N.2W(4N.2A("(",3)+1,4N.K-1)}u bR=4N.2R(/\\s*,\\s*/);u bP=[];R(u i=0;i<bR.K;i++){u c=bR[i];u 2i;u bQ=c.2W(c.K-3);if(c.3Z(c.K-1)=="%"){2i=0.bE*4M(c.2W(0,c.K-1))}N{if(bQ=="sS"){2i=4M(c)/bF}N{if(bQ=="sR"){2i=4M(c)/(28.sQ*2)}N{2i=hg[i]*4M(c)}}}bP.1c(2i)}F D[hf].1w(D,bP)},bN:G(Q,sP,sO){u d=B.S;u 2F=B.V.V;R(Q=d.1E(Q);Q;Q=Q.3t){u bO=d.4q.1w(d,M);if(!bO){2V}u 8D=2F.8f(bO);if(!8D){2K}if(8D.6r().a>0){F 8D}}F O},ba:G(Q){u 2F=B.V.V;F 2F.bN(Q,"aZ","he-3U")||2F.sN()},sM:G(Q){u 2F=B.V.V;F 2F.bN(Q,"3U","3U")||2F.sL()},sK:G(){F B.J.4L(B.V.V.by)}});B.J.2l(B.V,{6F:G(v,8C){v*=8C;if(v<0){F 0}N{if(v>8C){F 8C}N{F v}}},hc:G(n1,n2,1o){if(1o>6){1o-=6}N{if(1o<0){1o+=6}}u 2i;if(1o<1){2i=n1+(n2-n1)*1o}N{if(1o<3){2i=n2}N{if(1o<4){2i=n1+(n2-n1)*(4-1o)}N{2i=n1}}}F 2i},bz:G(1o,5w,3i,bM){if(M.K==1){u 2Q=1o;1o=2Q.h;5w=2Q.s;3i=2Q.v;bM=2Q.a}u 1v;u 3K;u 1F;if(5w===0){1v=0;3K=0;1F=0}N{u i=28.8B(1o*6);u f=(1o*6)-i;u p=3i*(1-5w);u q=3i*(1-(5w*f));u t=3i*(1-(5w*(1-f)));hd(i){3j 1:1v=q;3K=3i;1F=p;2K;3j 2:1v=p;3K=3i;1F=t;2K;3j 3:1v=p;3K=q;1F=3i;2K;3j 4:1v=t;3K=p;1F=3i;2K;3j 5:1v=3i;3K=p;1F=q;2K;3j 6:3j 0:1v=3i;3K=t;1F=p;2K}}F{r:1v,g:3K,b:1F,a:bM}},bB:G(1o,5v,3v,bL){if(M.K==1){u 1G=1o;1o=1G.h;5v=1G.s;3v=1G.l;bL=1G.a}u 1v;u 8A;u 1F;if(5v===0){1v=3v;8A=3v;1F=3v}N{u m2;if(3v<=0.5){m2=3v*(1+5v)}N{m2=3v+5v-(3v*5v)}u m1=(2*3v)-m2;u f=B.V.hc;u h6=1o*6;1v=f(m1,m2,h6+2);8A=f(m1,m2,h6);1F=f(m1,m2,h6-2)}F{r:1v,g:8A,b:1F,a:bL}},bA:G(1v,4K,1F,bK){if(M.K==1){u 1B=1v;1v=1B.r;4K=1B.g;1F=1B.b;bK=1B.a}u 29=28.29(28.29(1v,4K),1F);u 2a=28.2a(28.2a(1v,4K),1F);u 1o;u 8z;u hb=29;if(2a==29){1o=0;8z=0}N{u 6H=(29-2a);8z=6H/29;if(1v==29){1o=(4K-1F)/6H}N{if(4K==29){1o=2+((1F-1v)/6H)}N{1o=4+((1v-4K)/6H)}}1o/=6;if(1o<0){1o+=1}if(1o>1){1o-=1}}F{h:1o,s:8z,v:hb,a:bK}},bC:G(1v,4J,1F,bI){if(M.K==1){u 1B=1v;1v=1B.r;4J=1B.g;1F=1B.b;bI=1B.a}u 29=28.29(1v,28.29(4J,1F));u 2a=28.2a(1v,28.2a(4J,1F));u 1o;u 6G;u bJ=(29+2a)/2;u 4I=29-2a;if(4I===0){1o=0;6G=0}N{if(bJ<=0.5){6G=4I/(29+2a)}N{6G=4I/(2-29-2a)}if(1v==29){1o=(4J-1F)/4I}N{if(4J==29){1o=2+((1F-1v)/4I)}N{1o=4+((1v-4J)/4I)}}1o/=6;if(1o<0){1o+=1}if(1o>1){1o-=1}}F{h:1o,s:6G,l:bJ,a:bI}},6E:G(1P){1P=28.ha(1P);u bH=1P.1l(16);if(1P<16){F"0"+bH}F bH},2d:G(){u m=B.J;D.V.h9=m.1O(D.V.bG,D.V,"1B","3Y",[1/3h,1/3h,1/3h,1]);D.V.h8=m.1O(D.V.bG,D.V,"1G","4H",[1/bF,0.bE,0.bE,1]);u 4G=1/3;u bD={8y:[0,0,0],1F:[0,0,1],gY:[0.6,0.4,0.2],gX:[0,1,1],sJ:[4G,4G,4G],gR:[0.5,0.5,0.5],bx:[0,1,0],sI:[2*4G,2*4G,2*4G],gN:[1,0,1],gL:[1,0.5,0],gK:[0.5,0,0.5],1v:[1,0,0],aP:[0,0,0,0],4F:[1,1,1],gI:[1,1,0]};u h7=G(1b,r,g,b,a){u W=D.3Y(r,g,b,a);D[1b]=G(){F W};F W};R(u k in bD){u 1b=k+"V";u h5=m.2o([h7,D.V,1b],bD[k]);D.V[1b]=m.1O.1w(O,h5)}u h0=G(){R(u i=0;i<M.K;i++){if(!(M[i]2C V)){F 1m}}F 1h};u gZ=G(a,b){F a.h4(b)};m.3f(D);m.5u(D.V.1r,h0,gZ);D.2k={":3e":D.1z,":1p":m.2o(D.1z,D.1W)}}});B.V.1z=["V"];B.V.1W=["6F","bC","bB","bA","bz","6E"];B.V.2d();B.J.2Y(D,B.V);B.V.V.by={sH:"#sG",sF:"#sE",sD:"#gW",sC:"#sB",sA:"#sz",sy:"#sx",sw:"#sv",8y:"#su",st:"#sr",1F:"#sq",sp:"#so",gY:"#sn",sm:"#sl",sk:"#sj",si:"#sh",sg:"#se",sd:"#sc",sb:"#sa",s9:"#s8",s7:"#s6",gX:"#gW",s5:"#s4",s3:"#s2",s1:"#s0",rZ:"#gV",rY:"#rX",rW:"#gV",rV:"#rU",rT:"#rS",rR:"#rQ",rP:"#rO",rN:"#rM",gU:"#rL",rK:"#rJ",rI:"#rH",rG:"#rF",rE:"#gT",rD:"#gT",rC:"#rB",rA:"#rz",ry:"#rx",rw:"#rv",ru:"#gS",rt:"#gS",rs:"#rr",rq:"#rp",ro:"#rn",rm:"#rl",rk:"#gM",rj:"#ri",rh:"#rg",rf:"#rd",rc:"#rb",gR:"#gQ",bx:"#ra",r9:"#r8",r7:"#gQ",r6:"#r5",r4:"#r3",r2:"#r1",r0:"#qZ",qY:"#qX",qW:"#qV",qU:"#qT",qS:"#qR",qQ:"#qP",qO:"#qN",qM:"#qL",qK:"#qJ",qI:"#qH",qG:"#qF",qE:"#gP",qD:"#qC",qB:"#gP",qA:"#qz",qy:"#qx",qw:"#qv",qu:"#qt",qr:"#gO",qq:"#gO",qp:"#qo",qn:"#qm",ql:"#qk",qj:"#qi",qh:"#qg",gN:"#gM",qf:"#qe",qd:"#qc",qb:"#qa",q9:"#q8",q7:"#q6",q5:"#q4",q3:"#q2",q1:"#q0",pZ:"#pY",pX:"#pW",pV:"#pU",pT:"#pS",pR:"#pQ",pP:"#pO",pN:"#pM",pL:"#pK",pJ:"#pI",pH:"#pG",pF:"#pE",gL:"#pD",pC:"#pB",pA:"#pz",py:"#pw",pv:"#pu",pt:"#ps",pr:"#pq",pp:"#po",pn:"#pm",pl:"#pj",pi:"#ph",pg:"#pf",pe:"#pd",gK:"#pc",1v:"#pb",pa:"#p9",p8:"#p7",p6:"#p5",p4:"#p3",p2:"#p1",p0:"#oZ",oY:"#oX",oW:"#oV",oU:"#oT",oS:"#oR",oQ:"#oP",oO:"#gJ",oN:"#gJ",oM:"#oL",oK:"#oJ",oI:"#oH",oG:"#oF",oE:"#oD",oC:"#oB",oA:"#oz",oy:"#ox",ow:"#ov",ou:"#ot",4F:"#os",oq:"#op",gI:"#oo",om:"#ok"};if(H(1q)!="L"){1q.2X("B.1u");1q.2M("B.J");1q.2M("B.S")}if(H(1x)!="L"){1x.26("B.J",[]);1x.26("B.S",[])}1f{if(H(B.J)=="L"){14""}}1e(e){14"B.1u 3F on B.J!"}1f{if(H(B.S)=="L"){14""}}1e(e){14"B.1u 3F on B.S!"}if(H(B.1u)=="L"){B.1u={}}B.1u.1r="B.1u";B.1u.1Y="1.3.1";B.1u.4x=[];B.1u.bq=G(1d,e){D.1L=e||2O.6D;D.gH=1d};B.J.2l(B.1u.bq.1U,{1K:G(){u U=B.J.U;u 1y="{6D(): "+U(D.6D())+", 1d(): "+U(D.1d())+", 1J(): "+U(D.1J())+", 8x(): "+U(D.8x())+", 4E(): "+"{8w: "+U(D.4E().8w)+", 8v: "+U(D.4E().8v)+", 8u: "+U(D.4E().8u)+", 2P: "+U(D.4E().2P)+", bw: "+U(D.4E().bw)+"}";if(D.1J()&&D.1J().2A("2h")===0){1y+=", 2h(): {3J: "+U(D.2h().3J)+", 1n: "+U(D.2h().1n)+"}"}if(D.1J()&&(D.1J().2A("3I")===0||D.1J().2A("gE")!=-1||D.1J()=="gD")){1y+=", 3I(): {4D: "+U(D.3I().4D)+", 6A: "+U(D.3I().6A);if(D.1J()!="gC"){1y+=", 2e: {2I: "+U(D.3I().2e.2I)+", 6v: "+U(D.3I().2e.6v)+", 3g: "+U(D.3I().2e.3g)+"}}"}N{1y+="}"}}if(D.1J()=="gG"||D.1J()=="gF"){1y+=", 6C(): "+U(D.6C())}1y+="}";F 1y},1l:G(){F D.1K()},1d:G(){F D.gH},6D:G(){F D.1L},1J:G(){F D.1L.1J||L},8x:G(){F D.1L.8x||D.1L.oj},6C:G(){if(D.1J()=="gG"){F(D.1L.6C||D.1L.aW)}N{if(D.1J()=="gF"){F(D.1L.6C||D.1L.oi)}}F L},4E:G(){u m={};m.8w=D.1L.oh;m.8v=D.1L.og;m.8u=D.1L.oe||1m;m.2P=D.1L.od;m.bw=m.8w||m.8v||m.2P||m.8u;F m},2h:G(){u k={};if(D.1J()&&D.1J().2A("2h")===0){if(D.1J()=="oc"||D.1J()=="ob"){k.3J=D.1L.8t;k.1n=(B.1u.5r[k.3J]||"oa");F k}N{if(D.1J()=="o9"){k.3J=0;k.1n="";if(H(D.1L.6B)!="L"&&D.1L.6B!==0&&!B.1u.bv[D.1L.6B]){k.3J=D.1L.6B;k.1n=bu.bt(k.3J)}N{if(D.1L.8t&&H(D.1L.6B)=="L"){k.3J=D.1L.8t;k.1n=bu.bt(k.3J)}}F k}}}F L},3I:G(){u m={};u e=D.1L;if(D.1J()&&(D.1J().2A("3I")===0||D.1J().2A("gE")!=-1||D.1J()=="gD")){m.6A=Y B.S.5t(0,0);if(e.6z||e.6x){m.6A.x=(!e.6z||e.6z<0)?0:e.6z;m.6A.y=(!e.6x||e.6x<0)?0:e.6x}m.4D=Y B.S.5t(0,0);if(e.8s||e.8r){m.4D.x=(!e.8s||e.8s<0)?0:e.8s;m.4D.y=(!e.8r||e.8r<0)?0:e.8r}N{u de=B.S.1Z.7Z;u b=B.S.1Z.5s;m.4D.x=e.6z+(de.6y||b.6y)-(de.8q||b.8q);m.4D.y=e.6x+(de.4C||b.4C)-(de.8p||b.8p)}if(D.1J()!="gC"){m.2e={};m.2e.2I=1m;m.2e.3g=1m;m.2e.6v=1m;if(e.6w){m.2e.2I=(e.6w==1);m.2e.6v=(e.6w==2);m.2e.3g=(e.6w==3)}N{m.2e.2I=!!(e.2e&1);m.2e.3g=!!(e.2e&2);m.2e.6v=!!(e.2e&4)}}F m}F L},2J:G(){D.8o();D.8n()},8o:G(){if(D.1L.8o){D.1L.8o()}N{D.1L.o8=1h}},8n:G(){if(D.1L.8n){D.1L.8n()}N{D.1L.o7=1m}}});B.1u.bv={3:"gz",o6:"gA",o5:"gy",o4:"gx",o3:"gw",o2:"gv",o1:"gu",o0:"gs",nZ:"gr",nY:"gq",nX:"gp",nW:"go"};R(i=gB;i<=nV;i++){B.1u.bv[i]="gk"+(i-gB+1)}B.1u.5r={8:"nU",9:"nT",12:"gA",13:"gz",16:"nS",17:"nR",18:"nQ",19:"nP",20:"nO",27:"nN",32:"nM",33:"gy",34:"gx",35:"gw",36:"gv",37:"gu",38:"gs",39:"gr",40:"gq",44:"nL",45:"gp",46:"go",59:"gn",91:"nK",92:"nJ",93:"nI",nH:"nG",nF:"nE",nD:"nC-gm",nB:"nA",nz:"ny",nx:"nw",nv:"nu",nt:"gn",ns:"nr",nq:"np",nn:"nm-gm",nl:"nk",nj:"ni",nh:"ng",nf:"nd",nc:"nb",na:"n9",n8:"n7"};R(u i=48;i<=57;i++){B.1u.5r[i]="gl"+(i-48)}R(i=65;i<=90;i++){B.1u.5r[i]="gl"+bu.bt(i)}R(i=96;i<=n6;i++){B.1u.5r[i]="n5"+(i-96)}R(i=gj;i<=n4;i++){B.1u.5r[i]="gk"+(i-gj+1)}B.J.2l(B.1u,{1K:G(){F"["+D.1r+" "+D.1Y+"]"},1l:G(){F D.1K()},g7:G(){u I=B.1u;u bs=I.4x;R(u i=0;i<bs.K;i++){I.6t(bs[i])}gi I.4x;1f{2O.gh=L}1e(e){}1f{2O.g8=L}1e(e){}},gb:G(1d,1A,1i,gg){u E=B.1u.bq;if(!gg){F B.J.1O(1A,1i)}1i=1i||1d;if(H(1A)=="1n"){F G(gf){1i[1A].1w(1i,[Y E(1d,gf)])}}N{F G(gd){1A.1w(1i,[Y E(1d,gd)])}}},6s:G(1d,2D,5q,4B){1d=B.S.1E(1d);u I=B.1u;if(H(2D)!="1n"){14 Y 2x("\'2D\' 5p be a 1n")}u 1i=O;u 1A=O;if(H(4B)!="L"){1i=5q;1A=4B;if(H(4B)=="1n"){if(H(5q[4B])!="G"){14 Y 2x("\'bp\' 5p be a G on \'gc\'")}}N{if(H(4B)!="G"){14 Y 2x("\'bp\' 5p be a G or 1n")}}}N{if(H(5q)!="G"){14 Y 2x("\'gc\' 5p be a G if \'bp\' is 2E n3")}N{1A=5q}}if(H(1i)=="L"||1i===O){1i=1d}u bm=!!(1d.bo||1d.bn);u 8m=I.gb(1d,1A,1i,bm);if(1d.bo){1d.bo(2D.3H(2),8m,1m)}N{if(1d.bn){1d.bn(2D,8m)}}u bk=[1d,2D,8m,bm,5q,4B];I.4x.1c(bk);F bk},6t:G(6u){if(!6u[3]){F}u 1d=6u[0];u 2D=6u[1];u bj=6u[2];if(1d.ga){1d.ga(2D.3H(2),bj,1m)}N{if(1d.g9){1d.g9(2D,bj)}N{14 Y 2x("\'1d\' 5p be a S n0")}}},8j:G(bh){u I=B.1u;u 5o=I.4x;u m=B.J;if(M.K>1){u 1d=B.S.1E(M[0]);u 2D=M[1];u 1i=M[2];u 1A=M[3];R(u i=5o.K-1;i>=0;i--){u o=5o[i];if(o[0]===1d&&o[1]===2D&&o[4]===1i&&o[5]===1A){I.6t(o);5o.4y(i,1);F 1h}}}N{u 5n=m.bi(5o,bh);if(5n>=0){I.6t(bh);5o.4y(5n,1);F 1h}}F 1m},8i:G(1d,2D){1d=B.S.1E(1d);u m=B.J;u 8l=m.bg(m.1R(O,M,1));u I=B.1u;u bd=I.6t;u 4z=I.4x;if(8l.K===0){R(u i=4z.K-1;i>=0;i--){u 4A=4z[i];if(4A[0]===1d){bd(4A);4z.4y(i,1)}}}N{u bf={};R(u i=0;i<8l.K;i++){bf[8l[i]]=1h}R(u i=4z.K-1;i>=0;i--){u 4A=4z[i];if(4A[0]===1d&&4A[1]in bf){bd(4A);4z.4y(i,1)}}}},8h:G(1d,2D){u bc=B.1u.4x;1d=B.S.1E(1d);u 3G=B.J.1R(O,M,2);u 5m=[];R(u i=0;i<bc.K;i++){u 8k=bc[i];if(8k[0]===1d&&8k[1]===2D){1f{8k[2].1w(1d,3G)}1e(e){5m.1c(e)}}}if(5m.K==1){14 5m[0]}N{if(5m.K>1){u e=Y 2x("mZ bb mY in mX \'2D\', mW bb mV");e.bb=5m;14 e}}}});B.1u.1W=[];B.1u.1z=["6s","8j","8h","8i"];B.1u.2d=G(2m){u m=B.J;D.1Z=2v;D.3X=2m;1f{D.6s(2O,"g8",D.g7)}1e(e){}D.2k={":3e":D.1z,":1p":m.2o(D.1z,D.1W)};m.3f(D)};B.1u.2d(D);if(!B.3d){6s=B.1u.6s;8j=B.1u.8j;8i=B.1u.8i;8h=B.1u.8h}B.J.2Y(D,B.1u);if(H(1q)!="L"){1q.2X("B.1X");1q.2M("B.J");1q.2M("B.S");1q.2M("B.V")}if(H(1x)!="L"){1x.26("B.J",[]);1x.26("B.S",[]);1x.26("B.V",[])}1f{if(H(B.J)=="L"||H(B.S)=="L"||H(B.V)=="L"){14""}}1e(e){14"B.1X 3F on B.J, B.S 3W B.V!"}if(H(B.1X)=="L"){B.1X={}}B.1X.1r="B.1X";B.1X.1Y="1.3.1";B.1X.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.1X.1l=G(){F D.1K()};B.1X.aI=G(e,g6){e=B.S.1E(e);D.fN(g6);if(D.1S.fL){e=D.g5(e)}u 4w=D.1S.3U;u C=B.V.V;if(D.1S.3U=="aW"){4w=C.ba(e)}N{if(!(4w 2C C)){4w=C.8f(4w)}}D.82=(4w.6r().a<=0);u 5l=D.1S.aV;if(D.1S.aV=="fM"){5l=C.ba(e.8g)}N{if(!(5l 2C C)){5l=C.8f(5l)}}D.g3(e,4w,5l)};B.1X.aI.1U={g5:G(e){u mU=e.3t;u 1N=B.S.b9();if(H(1N.5k)=="L"||1N.5k===O){F e}u 4v=1N.5k.g4(e,O);if(H(4v)=="L"||4v===O){F e}u b8=B.S.6m({"1T":{3u:"8c",mT:4v.6q("6p-3D"),85:4v.6q("6p-3g"),mS:4v.6q("6p-6f"),86:4v.6q("6p-2I"),6p:"2N"}});b8.6o=e.6o;e.6o="";e.2c(b8);F e},g3:G(e,b7,8e){if(D.1S.3E){D.g2(e,8e)}if(D.fy()){D.fX(e,b7,8e)}if(D.fx()){D.fV(e,b7,8e)}},g2:G(el,g1){u b6="6l 8a "+D.aQ(g1);u g0="3E-2I: "+b6;u fZ="3E-3g: "+b6;u fY="1T=\'"+g0+";"+fZ+"\'";el.6o="<4u "+fY+">"+el.6o+"</4u>"},fX:G(el,fW,b5){u b4=D.b1(b5);R(u i=0;i<D.1S.89;i++){b4.2c(D.b0(fW,b5,i,"3D"))}el.1T.mR=0;el.mQ(b4,el.6n)},fV:G(el,fU,b3){u b2=D.b1(b3);R(u i=(D.1S.89-1);i>=0;i--){b2.2c(D.b0(fU,b3,i,"6f"))}el.1T.mP=0;el.2c(b2)},b1:G(fT){u 2q=B.S;F 2q.6m({1T:{aZ:fT.1l()}})},b0:G(aY,fQ,n,aX){u 6k=B.S.8d();u 2p=6k.1T;2p.aZ=aY.1l();2p.3u="8c";2p.3V="6l";2p.fS="fR";2p.mO="6l";u 8b=D.aQ(aY,fQ);if(D.1S.3E&&n===0){2p.mN="8a";2p.mM="6l";2p.84="2N";2p.83="2N";2p.mL="2N";2p.3V="2N";2p.fP=8b.1l()}N{if(8b){2p.fP=8b.1l();2p.mK="8a";2p.mJ="2N 6l"}}if(!D.1S.4r&&(n==(D.1S.89-1))){2p.3V="fO"}D.fI(6k,n,aX);D.fG(6k,n,aX);F 6k},fN:G(fK){D.1S={6g:"1p",3U:"aW",aV:"fM",5j:1h,3E:1m,4r:1m,fL:1m};B.J.2l(D.1S,fK);D.1S.89=(D.1S.4r?2:4)},aL:G(){u 88=D.1S.6g;if(D.6h(88,"1p","3D")){F""}u aU=(88.2A("tl")!=-1);u aT=(88.2A("tr")!=-1);if(aU&&aT){F""}if(aU){F"2I"}if(aT){F"3g"}F""},aK:G(){u 87=D.1S.6g;if(D.6h(87,"1p","6f")){F""}u aS=(87.2A("bl")!=-1);u aR=(87.2A("br")!=-1);if(aS&&aR){F""}if(aS){F"2I"}if(aR){F"3g"}F""},aQ:G(aN,aO){if(aN=="aP"){F aO}N{if(D.1S.3E){F D.1S.3E}N{if(D.1S.5j){F aO.fJ(aN)}}}F""},fI:G(el,n,fH){u 6j=D.fE(n)+"px";u aM=(fH=="3D"?D.aL():D.aK());u 4t=el.1T;if(aM=="2I"){4t.86=6j;4t.85="2N"}N{if(aM=="3g"){4t.85=6j;4t.86="2N"}N{4t.86=6j;4t.85=6j}}},fG:G(el,n,fF){u 6i=D.fz(n)+"px";u aJ=(fF=="3D"?D.aL():D.aK());u 4s=el.1T;if(aJ=="2I"){4s.84=6i;4s.83="2N"}N{if(aJ=="3g"){4s.83=6i;4s.84="2N"}N{4s.84=6i;4s.83=6i}}},fE:G(n){if(D.82){F 0}u o=D.1S;if(o.4r&&o.5j){u fD=[1,0];F fD[n]}N{if(o.4r){u fC=[2,1];F fC[n]}N{if(o.5j){u fB=[3,2,1,0];F fB[n]}N{u fA=[5,3,2,1];F fA[n]}}}},fz:G(n){u o=D.1S;u 5i;if(o.4r&&(o.5j||D.82)){F 1}N{if(o.4r){5i=[1,0]}N{if(o.5j){5i=[2,1,1,1]}N{if(o.3E){5i=[0,2,0,0]}N{if(D.82){5i=[5,3,2,1]}N{F 0}}}}}F 5i[n]},6h:G(1y){R(u i=1;i<M.K;i++){if(1y.2A(M[i])!=-1){F 1h}}F 1m},fy:G(){F D.6h(D.1S.6g,"1p","3D","tl","tr")},fx:G(){F D.6h(D.1S.6g,"1p","6f","bl","br")},mI:G(el){F(el.5h.K==1&&el.5h[0].3T==3)}};B.1X.aF=G(e,fw){Y B.1X.aI(e,fw)};B.1X.fs=G(fv,fu,ft){u aG=B.S.aH(fv,fu);R(u i=0;i<aG.K;i++){B.1X.aF(aG[i],ft)}};B.1X.V=B.V.V;B.1X.mH=B.S.4q;B.1X.2d=G(){u m=B.J;m.3f(D);D.2k={":3e":D.1z,":1p":m.2o(D.1z,D.1W)}};B.1X.1z=["aF","fs"];B.1X.1W=[];B.1X.2d();B.J.2Y(D,B.1X);if(H(B)=="L"){B={}}if(H(B.B)=="L"){B.B={}}B.B.1r="B.B";B.B.1Y="1.3.1";B.B.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.B.1l=G(){F D.1K()};B.B.aA=["J","15","1H","1D","1s","1k","S","1I","V","1u","1X"];if(H(1x)!="L"||H(1q)!="L"){if(H(1q)!="L"){1q.2X("B.B");1q.2M("B.*")}if(H(1x)!="L"){1x.26("B.J",[]);1x.26("B.15",[]);1x.26("B.1H",[]);1x.26("B.1D",[]);1x.26("B.1s",[]);1x.26("B.1k",[]);1x.26("B.S",[]);1x.26("B.1I",[]);1x.26("B.V",[]);1x.26("B.1u",[]);1x.26("B.1X",[])}(G(){u 6e=B.J.1R;u I=B.B;u aE=I.aA;u aD=[];u aC=[];u 81={};u i,k,m,1p;R(i=0;i<aE.K;i++){m=B[aE[i]];6e(aD,m.1z);6e(aC,m.1W);R(k in m.2k){81[k]=6e(81[k],m.2k[k])}1p=m.2k[":1p"];if(!1p){1p=6e(O,m.1z,m.1W)}u j;R(j=0;j<1p.K;j++){k=1p[j];I[k]=m[k]}}I.1z=aD;I.1W=aC;I.2k=81}())}N{if(H(B.3d)=="L"){B.3d=1h}(G(){u 80=2v.fr("7W");u ay="fq://fp.mG.fo/mF/mE/mD.is.aB.mC";u 2w=O;u ax=O;u az={};u i;R(i=0;i<80.K;i++){u 1d=80[i].fm("1d");if(!1d){2V}az[1d]=1h;if(1d.3C(/B.js$/)){2w=1d.2W(0,1d.mB("B.js"));ax=80[i]}}if(2w===O){F}u 6d=B.B.aA;R(u i=0;i<6d.K;i++){if(B[6d[i]]){2V}u 7Y=2w+6d[i]+".js";if(7Y in az){2V}if(2v.7Z&&2v.7Z.mA==ay){u s=2v.mz(ay,"7W");s.4p("id","my"+2w+6d[i]);s.4p("1d",7Y);s.4p("1J","mx/x-fk");ax.3t.2c(s)}N{2v.fl("<7W 1d=\\""+7Y+"\\" 1J=\\"7X/fk\\"></7W>")}}})()}',62,1976,'||||||||||||||||||||||||||||||var|||||||MochiKit||this||return|function|typeof|self|Base|length|undefined|arguments|else|null||elem|for|DOM||repr|Color|rval|res|new||||||throw|Iter|||||next|name|push|src|catch|try|lst|true|obj|node|Async|toString|false|string|hue|all|dojo|NAME|Format|msg|Signal|red|apply|JSAN|str|EXPORT|func|rgb|_425|DateTime|getElement|blue|hsl|Logging|LoggingPane|type|__repr__|_event|while|doc|bind|num|iter|extend|options|style|prototype|seq|EXPORT_OK|Visual|VERSION|_document||_434||replace|forwardCall|StopIteration|use||Math|max|min|join|appendChild|__new__|button|compare|date|key|val|_329|EXPORT_TAGS|update|win|pair|concat|_596|dom|map|req|Deferred|sync|document|base|Error|number|partial|indexOf||instanceof|sig|not|cls|list|fired|left|stop|break|logger|require|0px|window|shift|hsv|split|createElement|_423|callee|continue|substring|provide|_exportSymbols|ccc||_464|||||||||step|pred|_51|__compat__|common|nameFunctions|right|255|_517|case|100|_loggingPane|value|object|callback|TypeError|_251|_246|_113|parentNode|display|_522|parseInt|cssText|wrap|info|isArrayLike|end|match|top|border|depends|args|substr|mouse|code|_519|_443|className|level|err|frac|Date|_135|_85|nodeType|color|height|and|_window|fromRGB|charAt||asHSL|_444|message||||filter||LogMessage|AdapterRegistry|_366|imap|NotFound|locked|counter|_262|_messages|operator|cmp|_165|_161|pairs|arr|_52|setAttribute|computedStyle|compact|_614|_610|div|_576|_572|_observers|splice|_565|_566|_555|scrollTop|page|modifier|white|_541|fromHSL|_539|_535|_528|clone|parseFloat|_505|pre|_499|_497|_427|createTextNode|_446|attributeArray|_388|_379|updateNodeAttributes|_341|_326||box|errback|results|paused|chain|_285||ofs||NamedError|_175|_147|_122|_83|_54|_17|childNodes|_619|blend|defaultView|_574|_569|idx|_562|must|_554|_specialKeys|body|Coordinates|registerComparator|_521|_516|hex|mid|_478|width|loggingPane|LogLevel|nwin|head|url|setElementClass|callStack|path|dest|_359|boolean|register|Dimensions|DeferredLock|_313|addCallback|_310|waiting|onreadystatechange|_290|LOCALE|year|printfire|_214|log|_213|_211|pos|_155|_153||typeMatcher|listMinMax|_114|_40|itr|typ|_19|_634|_625|bottom|corners|_hasString|_612|_608|_595|1px|DIV|firstChild|innerHTML|padding|getPropertyValue|asRGB|connect|_disconnect|_559|middle|which|clientY|scrollLeft|clientX|client|charCode|relatedTarget|event|toColorPart|clampColorComponent|_537|_534|toFixed|_468|buildAndApplyFilter|_442|_441|_440|_439|position|_463|_447|removeChild|_449|uid|_428|_426|compliant|attributes|_422|_409|_412|_400|_395|_390|_389|_377|_375|_363|attr|ctx|repeat|_340|_339|isNotEmpty|_335|_333|opera|DeferredList|ret|_309|silentlyCancelled|canceller|_nextId|Array|_293|XMLHttpRequest|chained|_281|tail|_252|_225|msec|day|month|iso|Logger|_208|listeners|_200|_198|_194|_196|reduce|range|_169|_162|truth|registerRepr|_121|_70|_58|_56|_47|_45|_41|_13|_1|script|text|uri|documentElement|_630|_629|isTransparent|borderRightWidth|borderLeftWidth|marginRight|marginLeft|_602|_599|numSlices|solid|_597|block|SPAN|_579|fromString|offsetParent|signal|disconnectAll|disconnect|_570|_563|_557|preventDefault|stopPropagation|clientTop|clientLeft|pageY|pageX|keyCode|meta|ctrl|alt|target|black|_532|_524|floor|_513|_512|_500|_495|toLowerCase|_487|DEBUG|INFO|WARNING|FATAL|ERROR|colorTable|logFont|closed|inline|onclick|_438|_437|_445|RegExp|_452|space|title|updatetree|||||withDocument|withWindow||setDisplayForElement|none|renames|forEach|domConverters|escapeHTML|addElementClass|removeElementClass|once|_378|_380|_376|appendChildNodes|coerceToDOM|_355|opt|clientWidth|opacity|GenericError|fail|resultList|_307|_301|_fire|can|addCallbacks|_resback|percent|decimal|separator|twoDigitFloat|_274|_273|_264|_257|_250|_249|_254|_248|_243|_242|fmt|_240|_245|getTime|sec|hour|_209|slice|_206|iterateNextIter|registerIteratorFactory|arrayLikeIter|iteratorRegistry|takewhile|ifilterfalse|ifilter|_181|_176|_168|_166|_159|_tee|deque|arg|fun|jsonRegistry|reprString|reprRegistry|comparatorRegistry|urlEncode|_110|_108|cur|_95|_87|_71|im_preargs||_53|_57|_46|present|like|array|Argument|_15|_12|_632|_631|_633|SUBMODULES|only|_628|_627|_626|roundElement|_624|getElementsByTagAndClassName|_RoundCorners|_613|_whichSideBottom|_whichSideTop|_609|_605|_606|transparent|_borderColor|_604|_603|_601|_600|bgColor|fromElement|_594|_592|backgroundColor|_createCornerSlice|_createCorner|_590|_589|_587|_586|_581|_578|_577|currentDocument|fromBackground|errors|_568|_564||sigs|flattenArguments|_561|findIdentical|_560|_558||_556|attachEvent|addEventListener|funcOrStr|Event||_548|fromCharCode|String|_specialMacKeys|any|green|_namedColors|hsvToRGB|rgbToHSV|hslToRGB|rgbToHSL|_542|01|360|_fromColorString|_540|_536|_538|_529|_523|_518|fromComputedStyle|_511|_507|_508|_506|_501|fromHexString|_498|_496|_486|__class__|createLoggingPane|_459|_461|font|_462|_430|_435|1000|index|_460|getMessages|removeListener|_451||_457|_450|infore|_448|_456|logDebug|offsetHeight|span|input|_436|TR||HTML|open|alert|currentWindow|swapDOM|SELECT|FORM|INPUT|createDOMFunc|ignoreAttr|_421|call|_417|_410|_415|nodeName|_414|_413|emitHTML|good|_406|_399|_397|_393|_392|addLoadEvent|addToCallStack|_387|_386|_381|_382|_383|_373|_372|_369|createDOM|_365|Function|_360|_362|_358|_344|nodeWalk|formContents|_337|_338|_334|_332|offsetTop|offsetLeft|visibility|parentElement|||XMLHttpRequestError|BrowserComplianceError|CancelledError|AlreadyCalledError|evalJSONRequest|sendXMLHttpRequest|wait|doSimpleXMLHttpRequest|getXMLHttpRequest|succeed|_312|finishedCount|_308|_cbDeferred|_303|_297|queryString|_nothing|_289|XMLHTTP|ActiveXObject|eval|_284|_check|error|_279|default|rstrip|lstrip|formatLocale|roundToFixed|truncToFixed|_276|pow|_272|_271|_270|sign|_265|_263|tmp|_238|_232|toISODate|toISOTime|getFullYear|getDate|getMonth|_230|_padTwo|_228|useNativeConsole|_212|compareLogMessage|isLogMessage|unshift|_207||maxSize|_202|_199|logLevelAtLeast|console|hasIterateNext|iterateNext|arrayLike|groupby||exhaust|tee|dropwhile|applymap||islice|izip|cycle|count||_189|_188|_183|_185|_184|_186|_187|_182|identity|fetch|_180|_177|listMin|reprNumber|reprArrayLike|compareArrayLike|compareDateLike|isDateLike|findValue|_128|__export__|keyComparator|_124|_118|_93|_94|_90|_88|_84|_77|_68|_67|_66|_65|_60|im_func|_55|im_self|_48|_44|_42|_39|_36|_33|_27|_26|_25|_22|_24|_20|javascript|write|getAttribute||org|www|http|getElementsByTagName|roundClass|_623|_622|_621|_620|_isBottomRounded|_isTopRounded|_borderSize|_618|_617|_616|_615|_marginSize|_611|_setBorder|_607|_setMargin|blendedColor|_598|__unstable__wrapElement|fromParent|_setOptions|2px|borderColor|_593|hidden|overflow|_591|_588|_roundBottomCorners|_585|_roundTopCorners|_584|_583|_582|_580|_renderBorder|_roundCornersImpl|getComputedStyle|_doWrap|_571|_unloadCache|onunload|detachEvent|removeEventListener|_listener|objOrFunc|_552||_551|_549|onload|delete|112|KEY_F|KEY_|MINUS|KEY_SEMICOLON|KEY_DELETE|KEY_INSERT|KEY_ARROW_DOWN|KEY_ARROW_RIGHT|KEY_ARROW_UP||KEY_ARROW_LEFT|KEY_HOME|KEY_END|KEY_PAGE_DOWN|KEY_PAGE_UP|KEY_ENTER|KEY_NUM_PAD_CLEAR|63236|mousemove|contextmenu|click|mouseout|mouseover|_src|yellow|708090|purple|orange|ff00ff|magenta|778899|d3d3d3|808080|gray|696969|2f4f4f|darkred|a9a9a9|00ffff|cyan|brown|_547|_546||||compareRGB|_545||_543|fromHSLString|fromRGBString|round|_533|_hslValue|switch|background|_503|_504||fromName|_488|col|toRGBString|_hexString|_rgbString|_hslString|toPrecision|isLight||_481|_477|_476|_475|_474|_473|_469|_466|closePane|_458|onkeypress|_454|addListener|_455|close|test|scrollHeight|option|word|moz|_431|getElementById|html|pop|200|_|removeElement|showElement|hideElement|CANVAS|STRONG|FIELDSET|LEGEND|OPTGROUP|OPTION|TEXTAREA|LABEL|HR|BR|H3|H2|H1|PRE|TT|BUTTON|IMG|TH||TABLE||TFOOT|THEAD|TBODY|TD|LI|OL|||UL|checked|class|ignoreAttrFilter||_424|_419|nodeValue|scrapeText|_416|_418|sort|_411|toHTML|_404|hasElementClass|_403|_402|_401|swapElementClass|_398|_394|toggleElementClass|_391|focusOnLoad|_newCallStack|currentStyle|_371|replaceChildNodes|_364|_361|getNodeAttribute|_357|setNodeAttribute|_354|_352|_350|_353|toDOM|_346|_345|registerDOMConverter|selectedIndex|setElementPosition|setElementDimensions|tagName|absolute|getBoxObjectFor|getBoundingClientRect|elementPosition|_325|_324|_322|_323|offsetWidth|elementDimensions|clientHeight|innerWidth|getViewportDimensions|setOpacity|status|_317|deferred|_316|_newNamedError|maybeDeferred||gatherResults|callLater|loadJSONDoc|_311|consumeErrors|fireOnOneErrback|fireOnOneCallback|addErrback|_305|_304|_306|unlocked|release|_300|_299|_298|_296|_xhr_onreadystatechange|_xhr_canceller|304|responseText|Msxml2|addBoth|_pause|_continue|result|the|are|they|instances|_unpause|cancel|_280|_278|en_US|strip|percentFormat|twoDigitAverage|numberFormatter|_277|_275|isNaN|_259|_258|_260|_255|_253|_numberFormatter|_241|_239|_237|_236|_235|_234|_233|_231|toAmericanDate|toPaddedAmericanDate|americanDate|toISOTimestamp|isoTimestamp|isoDate|foot|sep||60000|_221|_isoRegexp|dispatchEvent|createEvent|warning|logWarning|fatal|logFatal|debug|logError|baseLog|_210|getMessageText|logToConsole|dispatchListeners|_204|_203|ident|_201|postError|alertListener|_197|_192|groupby_as_array|iextend|some|reversed|sorted|every|sum|_190|eat|_174|_173|_172|_171|_167|_163|_158|_157|_151|_144|_141||_139|_136|_134||_133|_132|zip|merge|isUndefined|isCallable|listMax|_131|_130|encodeURIComponent||_127|method|parseQueryString|evalJSON|registerJSON|serializeJSON|objMin|objMax|reverseKeyComparator|arrayEqual|objEqual|bindMethods|xfilter|xmap|isEmpty|isNull|isUndefinedOrNull|itemgetter|items|keys|setdefault|_126|_120|decodeURIComponent|_119|len|_109|_107|_104|_105|_101|_102|_98|||_100|_97|_96|_91|json|__json__|_82|_81|_80|_79|_76||_75|_74|_73|_69|_primitives|_64|_63||_62|_61|_59|_wrapDumbFunction|_49|_50|_31|_30|_21|_7|application|MochiKit_|createElementNS|namespaceURI|lastIndexOf|xul|there|gatekeeper|keymaster|mozilla|getElementsComputedStyle|_hasSingleTextChild|borderWidth|borderStyle|borderBottomWidth|borderTopWidth|borderTopStyle|fontSize|paddingBottom|insertBefore|paddingTop|marginBottom|marginTop|_575|property|see|handling|thrown|Multiple|element|||given|123|KEY_NUM_PAD_|105|KEY_APOSTROPHE|222|KEY_RIGHT_SQUARE_BRACKET|221|KEY_REVERSE_SOLIDUS|220|KEY_LEFT_SQUARE_BRACKET||219|KEY_GRAVE_ACCENT|192|KEY_SOLIDUS|191|KEY_FULL_STOP|190|KEY_HYPHEN|189||KEY_COMMA|188|KEY_EQUALS_SIGN|187|186|KEY_SCROLL_LOCK|145|KEY_NUM_LOCK|144|KEY_NUM_PAD_SOLIDUS|111|KEY_NUM_PAD_FULL_STOP|110|KEY_NUM_PAD_HYPHEN|109|KEY_NUM_PAD_PLUS_SIGN|107|KEY_NUM_PAD_ASTERISK|106|KEY_SELECT|KEY_WINDOWS_RIGHT|KEY_WINDOWS_LEFT|KEY_PRINT_SCREEN|KEY_SPACEBAR|KEY_ESCAPE|KEY_CAPS_LOCK|KEY_PAUSE|KEY_ALT|KEY_CTRL|KEY_SHIFT|KEY_TAB|KEY_BACKSPACE|63242|63272|63302|63233|63235|63232|63234|63273|63275|63277|63276|63289|returnValue|cancelBubble|keypress|KEY_UNKNOWN|keyup|keydown|shiftKey|metaKey||ctrlKey|altKey|toElement|srcElement|9acd32||yellowgreen||ffff00|f5f5f5|whitesmoke||ffffff|f5deb3|wheat|ee82ee|violet|40e0d0|turquoise|ff6347|tomato|d8bfd8|thistle|008080|teal|d2b48c|tan|4682b4|steelblue|00ff7f|springgreen|fffafa|snow|slategrey|slategray|6a5acd|slateblue|87ceeb|skyblue|c0c0c0|silver|a0522d|sienna|fff5ee|seashell|2e8b57|seagreen|f4a460|sandybrown|fa8072|salmon|8b4513|saddlebrown|4169e1|royalblue|bc8f8f|rosybrown|ff0000|800080|b0e0e6|powderblue|dda0dd|plum|ffc0cb|pink|cd853f||peru|ffdab9|peachpuff|ffefd5|papayawhip|db7093|palevioletred|afeeee|paleturquoise|98fb98|palegreen|eee8aa||palegoldenrod|da70d6|orchid|ff4500|orangered|ffa500|6b8e23|olivedrab|808000|olive|fdf5e6|oldlace|000080|navy|ffdead|navajowhite|ffe4b5|moccasin|ffe4e1|mistyrose|f5fffa|mintcream|191970|midnightblue|c71585|mediumvioletred|48d1cc|mediumturquoise|00fa9a|mediumspringgreen|7b68ee|mediumslateblue|3cb371|mediumseagreen|9370db|mediumpurple|ba55d3|mediumorchid|0000cd|mediumblue|66cdaa|mediumaquamarine|800000|maroon|faf0e6|linen|32cd32|limegreen|00ff00|lime|ffffe0|lightyellow|b0c4de|lightsteelblue|lightslategrey|lightslategray||87cefa|lightskyblue|20b2aa|lightseagreen|ffa07a|lightsalmon|ffb6c1|lightpink|lightgrey|90ee90|lightgreen|lightgray|fafad2|lightgoldenrodyellow|e0ffff|lightcyan|f08080|lightcoral|add8e6|lightblue|fffacd|lemonchiffon|7cfc00|lawngreen|fff0f5|lavenderblush|e6e6fa|lavender|f0e68c|khaki|fffff0|ivory|4b0082|indigo|cd5c5c|indianred|ff69b4|hotpink|f0fff0|honeydew|grey|adff2f|greenyellow|008000|daa520|goldenrod|ffd700||gold|f8f8ff|ghostwhite|dcdcdc|gainsboro|fuchsia|228b22|forestgreen|fffaf0|floralwhite|b22222|firebrick|1e90ff|dodgerblue|dimgrey|dimgray|00bfff|deepskyblue|ff1493|deeppink|9400d3|darkviolet|00ced1|darkturquoise|darkslategrey|darkslategray|483d8b|darkslateblue|8fbc8f|darkseagreen|e9967a|darksalmon|8b0000|9932cc|darkorchid|ff8c00|darkorange|556b2f|darkolivegreen|8b008b|darkmagenta|bdb76b|darkkhaki|darkgrey|006400|darkgreen|darkgray|b8860b|darkgoldenrod|008b8b|darkcyan|00008b|darkblue|dc143c|crimson|fff8dc|cornsilk|6495ed|cornflowerblue|ff7f50|coral|d2691e||chocolate|7fff00|chartreuse|5f9ea0|cadetblue|deb887|burlywood|a52a2a|8a2be2|blueviolet|0000ff|ffebcd||blanchedalmond|000000|ffe4c4|bisque|f5f5dc|beige|f0ffff|azure|7fffd4|aquamarine|aqua|faebd7|antiquewhite|f0f8ff|aliceblue|lightGray|darkGray|namedColors|blackColor|fromText|whiteColor|_510|_509|PI|rad|deg|transparentColor|_494|_493|_492|fromHSV|_491|_490|_489|asHSV|toHexString|rgba|hsla|toHSLString|isDark|lighterColorWithLevel|darkerColorWithLevel|colorWithLightness|colorWithSaturation|colorWithHue|colorWithAlpha||serif|sans|Verdana||8pt|8em|auto||Close|Clear||Load|Filter||10em||fixed|regex|emergency|line|margin|_Listener|dtd|loose|html4|w3|EN|Transitional|DTD|W3C|PUBLIC|DOCTYPE|blocking|due|debugging|able|Not|resizable|dependent|href|location|_MochiKit_LoggingPane|_429|canvas|strong|fieldset|legend|optgroup|select|form|textarea|label|img|table|tfoot|thead|tbody|htmlFor||useMap|usemap|defaultChecked|hasChildNodes|quot|amp|_405|focus|replaceChild|checkbox||radio|_win|BODY||safari|version|userAgent|navigator|innerHeight|alpha|khtml|Tried|acquire|clearTimeout|setTimeout|GET|ignore|send|abort|failed|Request|readyState|support|does|Browser|Microsoft|_288|_287|used|Deferreds|Chained|success|unfired|fr_FR|de_DE|00|abs|search|pattern|Invalid|getTimezoneOffset|getSeconds|getMinutes|getHours|UTC|3600000|initEvent|Events|debuggingBookmarklet|MESSAGES|LAST|_205|clear|ninfo|nlevel|timestamp|reverse|takes|initial|with|sequence|empty|iterable|numbers|dateLike|escape|find|forward|unregister|unescape|Object|compared|item|contains|logor|logand|cle|clt|cge|cgt|cne|ceq|zrshift|rshift|lshift|xor|mul|mod|sub|add|neg|lognot|_9|_2'.split('|'),0,{})
+
+
+/*
+ * jQuery 1.2.1 - New Wave Javascript
+ *
+ * Copyright (c) 2007 John Resig (jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $
+ * $Rev: 3353 $
+ */
+
+var decompressedJQuery = function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(G(){9(1m E!="W")H w=E;H E=18.15=G(a,b){I 6 7u E?6.5N(a,b):1u E(a,b)};9(1m $!="W")H D=$;18.$=E;H u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;E.1b=E.3A={5N:G(c,a){c=c||U;9(1m c=="1M"){H m=u.2S(c);9(m&&(m[1]||!a)){9(m[1])c=E.4D([m[1]],a);J{H b=U.3S(m[3]);9(b)9(b.22!=m[3])I E().1Y(c);J{6[0]=b;6.K=1;I 6}J c=[]}}J I 1u E(a).1Y(c)}J 9(E.1n(c))I 1u E(U)[E.1b.2d?"2d":"39"](c);I 6.6v(c.1c==1B&&c||(c.4c||c.K&&c!=18&&!c.1y&&c[0]!=W&&c[0].1y)&&E.2h(c)||[c])},4c:"1.2.1",7Y:G(){I 6.K},K:0,21:G(a){I a==W?E.2h(6):6[a]},2o:G(a){H b=E(a);b.4Y=6;I b},6v:G(a){6.K=0;1B.3A.1a.16(6,a);I 6},N:G(a,b){I E.N(6,a,b)},4I:G(a){H b=-1;6.N(G(i){9(6==a)b=i});I b},1x:G(f,d,e){H c=f;9(f.1c==3X)9(d==W)I 6.K&&E[e||"1x"](6[0],f)||W;J{c={};c[f]=d}I 6.N(G(a){L(H b 1i c)E.1x(e?6.R:6,b,E.1e(6,c[b],e,a,b))})},17:G(b,a){I 6.1x(b,a,"3C")},2g:G(e){9(1m e!="5i"&&e!=S)I 6.4n().3g(U.6F(e));H t="";E.N(e||6,G(){E.N(6.3j,G(){9(6.1y!=8)t+=6.1y!=1?6.6x:E.1b.2g([6])})});I t},5m:G(b){9(6[0])E(b,6[0].3H).6u().3d(6[0]).1X(G(){H a=6;1W(a.1w)a=a.1w;I a}).3g(6);I 6},8m:G(a){I 6.N(G(){E(6).6q().5m(a)})},8d:G(a){I 6.N(G(){E(6).5m(a)})},3g:G(){I 6.3z(1q,Q,1,G(a){6.58(a)})},6j:G(){I 6.3z(1q,Q,-1,G(a){6.3d(a,6.1w)})},6g:G(){I 6.3z(1q,P,1,G(a){6.12.3d(a,6)})},50:G(){I 6.3z(1q,P,-1,G(a){6.12.3d(a,6.2q)})},2D:G(){I 6.4Y||E([])},1Y:G(t){H b=E.1X(6,G(a){I E.1Y(t,a)});I 6.2o(/[^+>] [^+>]/.14(t)||t.1g("..")>-1?E.4V(b):b)},6u:G(e){H f=6.1X(G(){I 6.67?E(6.67)[0]:6.4R(Q)});H d=f.1Y("*").4O().N(G(){9(6[F]!=W)6[F]=S});9(e===Q)6.1Y("*").4O().N(G(i){H c=E.M(6,"2P");L(H a 1i c)L(H b 1i c[a])E.1j.1f(d[i],a,c[a][b],c[a][b].M)});I f},1E:G(t){I 6.2o(E.1n(t)&&E.2W(6,G(b,a){I t.16(b,[a])})||E.3m(t,6))},5V:G(t){I 6.2o(t.1c==3X&&E.3m(t,6,Q)||E.2W(6,G(a){I(t.1c==1B||t.4c)?E.2A(a,t)<0:a!=t}))},1f:G(t){I 6.2o(E.1R(6.21(),t.1c==3X?E(t).21():t.K!=W&&(!t.11||E.11(t,"2Y"))?t:[t]))},3t:G(a){I a?E.3m(a,6).K>0:P},7c:G(a){I 6.3t("."+a)},3i:G(b){9(b==W){9(6.K){H c=6[0];9(E.11(c,"24")){H e=c.4Z,a=[],Y=c.Y,2G=c.O=="24-2G";9(e<0)I S;L(H i=2G?e:0,33=2G?e+1:Y.K;i<33;i++){H d=Y[i];9(d.26){H b=E.V.1h&&!d.9V["1Q"].9L?d.2g:d.1Q;9(2G)I b;a.1a(b)}}I a}J I 6[0].1Q.1p(/\\r/g,"")}}J I 6.N(G(){9(b.1c==1B&&/4k|5j/.14(6.O))6.2Q=(E.2A(6.1Q,b)>=0||E.2A(6.2H,b)>=0);J 9(E.11(6,"24")){H a=b.1c==1B?b:[b];E("9h",6).N(G(){6.26=(E.2A(6.1Q,a)>=0||E.2A(6.2g,a)>=0)});9(!a.K)6.4Z=-1}J 6.1Q=b})},4o:G(a){I a==W?(6.K?6[0].3O:S):6.4n().3g(a)},6H:G(a){I 6.50(a).28()},6E:G(i){I 6.2J(i,i+1)},2J:G(){I 6.2o(1B.3A.2J.16(6,1q))},1X:G(b){I 6.2o(E.1X(6,G(a,i){I b.2O(a,i,a)}))},4O:G(){I 6.1f(6.4Y)},3z:G(f,d,g,e){H c=6.K>1,a;I 6.N(G(){9(!a){a=E.4D(f,6.3H);9(g<0)a.8U()}H b=6;9(d&&E.11(6,"1I")&&E.11(a[0],"4m"))b=6.4l("1K")[0]||6.58(U.5B("1K"));E.N(a,G(){H a=c?6.4R(Q):6;9(!5A(0,a))e.2O(b,a)})})}};G 5A(i,b){H a=E.11(b,"1J");9(a){9(b.3k)E.3G({1d:b.3k,3e:P,1V:"1J"});J E.5f(b.2g||b.6s||b.3O||"");9(b.12)b.12.3b(b)}J 9(b.1y==1)E("1J",b).N(5A);I a}E.1k=E.1b.1k=G(){H c=1q[0]||{},a=1,2c=1q.K,5e=P;9(c.1c==8o){5e=c;c=1q[1]||{}}9(2c==1){c=6;a=0}H b;L(;a<2c;a++)9((b=1q[a])!=S)L(H i 1i b){9(c==b[i])6r;9(5e&&1m b[i]==\'5i\'&&c[i])E.1k(c[i],b[i]);J 9(b[i]!=W)c[i]=b[i]}I c};H F="15"+(1u 3D()).3B(),6p=0,5c={};E.1k({8a:G(a){18.$=D;9(a)18.15=w;I E},1n:G(a){I!!a&&1m a!="1M"&&!a.11&&a.1c!=1B&&/G/i.14(a+"")},4a:G(a){I a.2V&&!a.1G||a.37&&a.3H&&!a.3H.1G},5f:G(a){a=E.36(a);9(a){9(18.6l)18.6l(a);J 9(E.V.1N)18.56(a,0);J 3w.2O(18,a)}},11:G(b,a){I b.11&&b.11.27()==a.27()},1L:{},M:G(c,d,b){c=c==18?5c:c;H a=c[F];9(!a)a=c[F]=++6p;9(d&&!E.1L[a])E.1L[a]={};9(b!=W)E.1L[a][d]=b;I d?E.1L[a][d]:a},30:G(c,b){c=c==18?5c:c;H a=c[F];9(b){9(E.1L[a]){2E E.1L[a][b];b="";L(b 1i E.1L[a])1T;9(!b)E.30(c)}}J{2a{2E c[F]}29(e){9(c.53)c.53(F)}2E E.1L[a]}},N:G(a,b,c){9(c){9(a.K==W)L(H i 1i a)b.16(a[i],c);J L(H i=0,48=a.K;i<48;i++)9(b.16(a[i],c)===P)1T}J{9(a.K==W)L(H i 1i a)b.2O(a[i],i,a[i]);J L(H i=0,48=a.K,3i=a[0];i<48&&b.2O(3i,i,3i)!==P;3i=a[++i]){}}I a},1e:G(c,b,d,e,a){9(E.1n(b))b=b.2O(c,[e]);H f=/z-?4I|7T-?7Q|1r|69|7P-?1H/i;I b&&b.1c==4W&&d=="3C"&&!f.14(a)?b+"2T":b},1o:{1f:G(b,c){E.N((c||"").2l(/\\s+/),G(i,a){9(!E.1o.3K(b.1o,a))b.1o+=(b.1o?" ":"")+a})},28:G(b,c){b.1o=c!=W?E.2W(b.1o.2l(/\\s+/),G(a){I!E.1o.3K(c,a)}).66(" "):""},3K:G(t,c){I E.2A(c,(t.1o||t).3s().2l(/\\s+/))>-1}},2k:G(e,o,f){L(H i 1i o){e.R["3r"+i]=e.R[i];e.R[i]=o[i]}f.16(e,[]);L(H i 1i o)e.R[i]=e.R["3r"+i]},17:G(e,p){9(p=="1H"||p=="2N"){H b={},42,41,d=["7J","7I","7G","7F"];E.N(d,G(){b["7C"+6]=0;b["7B"+6+"5Z"]=0});E.2k(e,b,G(){9(E(e).3t(\':3R\')){42=e.7A;41=e.7w}J{e=E(e.4R(Q)).1Y(":4k").5W("2Q").2D().17({4C:"1P",2X:"4F",19:"2Z",7o:"0",1S:"0"}).5R(e.12)[0];H a=E.17(e.12,"2X")||"3V";9(a=="3V")e.12.R.2X="7g";42=e.7e;41=e.7b;9(a=="3V")e.12.R.2X="3V";e.12.3b(e)}});I p=="1H"?42:41}I E.3C(e,p)},3C:G(h,j,i){H g,2w=[],2k=[];G 3n(a){9(!E.V.1N)I P;H b=U.3o.3Z(a,S);I!b||b.4y("3n")==""}9(j=="1r"&&E.V.1h){g=E.1x(h.R,"1r");I g==""?"1":g}9(j.1t(/4u/i))j=y;9(!i&&h.R[j])g=h.R[j];J 9(U.3o&&U.3o.3Z){9(j.1t(/4u/i))j="4u";j=j.1p(/([A-Z])/g,"-$1").2p();H d=U.3o.3Z(h,S);9(d&&!3n(h))g=d.4y(j);J{L(H a=h;a&&3n(a);a=a.12)2w.4w(a);L(a=0;a<2w.K;a++)9(3n(2w[a])){2k[a]=2w[a].R.19;2w[a].R.19="2Z"}g=j=="19"&&2k[2w.K-1]!=S?"2s":U.3o.3Z(h,S).4y(j)||"";L(a=0;a<2k.K;a++)9(2k[a]!=S)2w[a].R.19=2k[a]}9(j=="1r"&&g=="")g="1"}J 9(h.3Q){H f=j.1p(/\\-(\\w)/g,G(m,c){I c.27()});g=h.3Q[j]||h.3Q[f];9(!/^\\d+(2T)?$/i.14(g)&&/^\\d/.14(g)){H k=h.R.1S;H e=h.4v.1S;h.4v.1S=h.3Q.1S;h.R.1S=g||0;g=h.R.71+"2T";h.R.1S=k;h.4v.1S=e}}I g},4D:G(a,e){H r=[];e=e||U;E.N(a,G(i,d){9(!d)I;9(d.1c==4W)d=d.3s();9(1m d=="1M"){d=d.1p(/(<(\\w+)[^>]*?)\\/>/g,G(m,a,b){I b.1t(/^(70|6Z|6Y|9Q|4t|9N|9K|3a|9G|9E)$/i)?m:a+"></"+b+">"});H s=E.36(d).2p(),1s=e.5B("1s"),2x=[];H c=!s.1g("<9y")&&[1,"<24>","</24>"]||!s.1g("<9w")&&[1,"<6T>","</6T>"]||s.1t(/^<(9u|1K|9t|9r|9p)/)&&[1,"<1I>","</1I>"]||!s.1g("<4m")&&[2,"<1I><1K>","</1K></1I>"]||(!s.1g("<9m")||!s.1g("<9k"))&&[3,"<1I><1K><4m>","</4m></1K></1I>"]||!s.1g("<6Y")&&[2,"<1I><1K></1K><6L>","</6L></1I>"]||E.V.1h&&[1,"1s<1s>","</1s>"]||[0,"",""];1s.3O=c[1]+d+c[2];1W(c[0]--)1s=1s.5p;9(E.V.1h){9(!s.1g("<1I")&&s.1g("<1K")<0)2x=1s.1w&&1s.1w.3j;J 9(c[1]=="<1I>"&&s.1g("<1K")<0)2x=1s.3j;L(H n=2x.K-1;n>=0;--n)9(E.11(2x[n],"1K")&&!2x[n].3j.K)2x[n].12.3b(2x[n]);9(/^\\s/.14(d))1s.3d(e.6F(d.1t(/^\\s*/)[0]),1s.1w)}d=E.2h(1s.3j)}9(0===d.K&&(!E.11(d,"2Y")&&!E.11(d,"24")))I;9(d[0]==W||E.11(d,"2Y")||d.Y)r.1a(d);J r=E.1R(r,d)});I r},1x:G(c,d,a){H e=E.4a(c)?{}:E.5o;9(d=="26"&&E.V.1N)c.12.4Z;9(e[d]){9(a!=W)c[e[d]]=a;I c[e[d]]}J 9(E.V.1h&&d=="R")I E.1x(c.R,"9e",a);J 9(a==W&&E.V.1h&&E.11(c,"2Y")&&(d=="9d"||d=="9a"))I c.97(d).6x;J 9(c.37){9(a!=W){9(d=="O"&&E.11(c,"4t")&&c.12)6G"O 94 93\'t 92 91";c.90(d,a)}9(E.V.1h&&/6C|3k/.14(d)&&!E.4a(c))I c.4p(d,2);I c.4p(d)}J{9(d=="1r"&&E.V.1h){9(a!=W){c.69=1;c.1E=(c.1E||"").1p(/6O\\([^)]*\\)/,"")+(3I(a).3s()=="8S"?"":"6O(1r="+a*6A+")")}I c.1E?(3I(c.1E.1t(/1r=([^)]*)/)[1])/6A).3s():""}d=d.1p(/-([a-z])/8Q,G(z,b){I b.27()});9(a!=W)c[d]=a;I c[d]}},36:G(t){I(t||"").1p(/^\\s+|\\s+$/g,"")},2h:G(a){H r=[];9(1m a!="8P")L(H i=0,2c=a.K;i<2c;i++)r.1a(a[i]);J r=a.2J(0);I r},2A:G(b,a){L(H i=0,2c=a.K;i<2c;i++)9(a[i]==b)I i;I-1},1R:G(a,b){9(E.V.1h){L(H i=0;b[i];i++)9(b[i].1y!=8)a.1a(b[i])}J L(H i=0;b[i];i++)a.1a(b[i]);I a},4V:G(b){H r=[],2f={};2a{L(H i=0,6y=b.K;i<6y;i++){H a=E.M(b[i]);9(!2f[a]){2f[a]=Q;r.1a(b[i])}}}29(e){r=b}I r},2W:G(b,a,c){9(1m a=="1M")a=3w("P||G(a,i){I "+a+"}");H d=[];L(H i=0,4g=b.K;i<4g;i++)9(!c&&a(b[i],i)||c&&!a(b[i],i))d.1a(b[i]);I d},1X:G(c,b){9(1m b=="1M")b=3w("P||G(a){I "+b+"}");H d=[];L(H i=0,4g=c.K;i<4g;i++){H a=b(c[i],i);9(a!==S&&a!=W){9(a.1c!=1B)a=[a];d=d.8M(a)}}I d}});H v=8K.8I.2p();E.V={4s:(v.1t(/.+(?:8F|8E|8C|8B)[\\/: ]([\\d.]+)/)||[])[1],1N:/6w/.14(v),34:/34/.14(v),1h:/1h/.14(v)&&!/34/.14(v),35:/35/.14(v)&&!/(8z|6w)/.14(v)};H y=E.V.1h?"4h":"5h";E.1k({5g:!E.V.1h||U.8y=="8x",4h:E.V.1h?"4h":"5h",5o:{"L":"8w","8v":"1o","4u":y,5h:y,4h:y,3O:"3O",1o:"1o",1Q:"1Q",3c:"3c",2Q:"2Q",8u:"8t",26:"26",8s:"8r"}});E.N({1D:"a.12",8q:"15.4e(a,\'12\')",8p:"15.2I(a,2,\'2q\')",8n:"15.2I(a,2,\'4d\')",8l:"15.4e(a,\'2q\')",8k:"15.4e(a,\'4d\')",8j:"15.5d(a.12.1w,a)",8i:"15.5d(a.1w)",6q:"15.11(a,\'8h\')?a.8f||a.8e.U:15.2h(a.3j)"},G(i,n){E.1b[i]=G(a){H b=E.1X(6,n);9(a&&1m a=="1M")b=E.3m(a,b);I 6.2o(E.4V(b))}});E.N({5R:"3g",8c:"6j",3d:"6g",8b:"50",89:"6H"},G(i,n){E.1b[i]=G(){H a=1q;I 6.N(G(){L(H j=0,2c=a.K;j<2c;j++)E(a[j])[n](6)})}});E.N({5W:G(a){E.1x(6,a,"");6.53(a)},88:G(c){E.1o.1f(6,c)},87:G(c){E.1o.28(6,c)},86:G(c){E.1o[E.1o.3K(6,c)?"28":"1f"](6,c)},28:G(a){9(!a||E.1E(a,[6]).r.K){E.30(6);6.12.3b(6)}},4n:G(){E("*",6).N(G(){E.30(6)});1W(6.1w)6.3b(6.1w)}},G(i,n){E.1b[i]=G(){I 6.N(n,1q)}});E.N(["85","5Z"],G(i,a){H n=a.2p();E.1b[n]=G(h){I 6[0]==18?E.V.1N&&3y["84"+a]||E.5g&&38.33(U.2V["5a"+a],U.1G["5a"+a])||U.1G["5a"+a]:6[0]==U?38.33(U.1G["6n"+a],U.1G["6m"+a]):h==W?(6.K?E.17(6[0],n):S):6.17(n,h.1c==3X?h:h+"2T")}});H C=E.V.1N&&3x(E.V.4s)<83?"(?:[\\\\w*57-]|\\\\\\\\.)":"(?:[\\\\w\\82-\\81*57-]|\\\\\\\\.)",6k=1u 47("^>\\\\s*("+C+"+)"),6i=1u 47("^("+C+"+)(#)("+C+"+)"),6h=1u 47("^([#.]?)("+C+"*)");E.1k({55:{"":"m[2]==\'*\'||15.11(a,m[2])","#":"a.4p(\'22\')==m[2]",":":{80:"i<m[3]-0",7Z:"i>m[3]-0",2I:"m[3]-0==i",6E:"m[3]-0==i",3v:"i==0",3u:"i==r.K-1",6f:"i%2==0",6e:"i%2","3v-46":"a.12.4l(\'*\')[0]==a","3u-46":"15.2I(a.12.5p,1,\'4d\')==a","7X-46":"!15.2I(a.12.5p,2,\'4d\')",1D:"a.1w",4n:"!a.1w",7W:"(a.6s||a.7V||15(a).2g()||\'\').1g(m[3])>=0",3R:\'"1P"!=a.O&&15.17(a,"19")!="2s"&&15.17(a,"4C")!="1P"\',1P:\'"1P"==a.O||15.17(a,"19")=="2s"||15.17(a,"4C")=="1P"\',7U:"!a.3c",3c:"a.3c",2Q:"a.2Q",26:"a.26||15.1x(a,\'26\')",2g:"\'2g\'==a.O",4k:"\'4k\'==a.O",5j:"\'5j\'==a.O",54:"\'54\'==a.O",52:"\'52\'==a.O",51:"\'51\'==a.O",6d:"\'6d\'==a.O",6c:"\'6c\'==a.O",2r:\'"2r"==a.O||15.11(a,"2r")\',4t:"/4t|24|6b|2r/i.14(a.11)",3K:"15.1Y(m[3],a).K",7S:"/h\\\\d/i.14(a.11)",7R:"15.2W(15.32,G(1b){I a==1b.T;}).K"}},6a:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1u 47("^([:.#]*)("+C+"+)")],3m:G(a,c,b){H d,2b=[];1W(a&&a!=d){d=a;H f=E.1E(a,c,b);a=f.t.1p(/^\\s*,\\s*/,"");2b=b?c=f.r:E.1R(2b,f.r)}I 2b},1Y:G(t,o){9(1m t!="1M")I[t];9(o&&!o.1y)o=S;o=o||U;H d=[o],2f=[],3u;1W(t&&3u!=t){H r=[];3u=t;t=E.36(t);H l=P;H g=6k;H m=g.2S(t);9(m){H p=m[1].27();L(H i=0;d[i];i++)L(H c=d[i].1w;c;c=c.2q)9(c.1y==1&&(p=="*"||c.11.27()==p.27()))r.1a(c);d=r;t=t.1p(g,"");9(t.1g(" ")==0)6r;l=Q}J{g=/^([>+~])\\s*(\\w*)/i;9((m=g.2S(t))!=S){r=[];H p=m[2],1R={};m=m[1];L(H j=0,31=d.K;j<31;j++){H n=m=="~"||m=="+"?d[j].2q:d[j].1w;L(;n;n=n.2q)9(n.1y==1){H h=E.M(n);9(m=="~"&&1R[h])1T;9(!p||n.11.27()==p.27()){9(m=="~")1R[h]=Q;r.1a(n)}9(m=="+")1T}}d=r;t=E.36(t.1p(g,""));l=Q}}9(t&&!l){9(!t.1g(",")){9(o==d[0])d.44();2f=E.1R(2f,d);r=d=[o];t=" "+t.68(1,t.K)}J{H k=6i;H m=k.2S(t);9(m){m=[0,m[2],m[3],m[1]]}J{k=6h;m=k.2S(t)}m[2]=m[2].1p(/\\\\/g,"");H f=d[d.K-1];9(m[1]=="#"&&f&&f.3S&&!E.4a(f)){H q=f.3S(m[2]);9((E.V.1h||E.V.34)&&q&&1m q.22=="1M"&&q.22!=m[2])q=E(\'[@22="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.11(q,m[3]))?[q]:[]}J{L(H i=0;d[i];i++){H a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];9(a=="*"&&d[i].11.2p()=="5i")a="3a";r=E.1R(r,d[i].4l(a))}9(m[1]==".")r=E.4X(r,m[2]);9(m[1]=="#"){H e=[];L(H i=0;r[i];i++)9(r[i].4p("22")==m[2]){e=[r[i]];1T}r=e}d=r}t=t.1p(k,"")}}9(t){H b=E.1E(t,r);d=r=b.r;t=E.36(b.t)}}9(t)d=[];9(d&&o==d[0])d.44();2f=E.1R(2f,d);I 2f},4X:G(r,m,a){m=" "+m+" ";H c=[];L(H i=0;r[i];i++){H b=(" "+r[i].1o+" ").1g(m)>=0;9(!a&&b||a&&!b)c.1a(r[i])}I c},1E:G(t,r,h){H d;1W(t&&t!=d){d=t;H p=E.6a,m;L(H i=0;p[i];i++){m=p[i].2S(t);9(m){t=t.7O(m[0].K);m[2]=m[2].1p(/\\\\/g,"");1T}}9(!m)1T;9(m[1]==":"&&m[2]=="5V")r=E.1E(m[3],r,Q).r;J 9(m[1]==".")r=E.4X(r,m[2],h);J 9(m[1]=="["){H g=[],O=m[3];L(H i=0,31=r.K;i<31;i++){H a=r[i],z=a[E.5o[m[2]]||m[2]];9(z==S||/6C|3k|26/.14(m[2]))z=E.1x(a,m[2])||\'\';9((O==""&&!!z||O=="="&&z==m[5]||O=="!="&&z!=m[5]||O=="^="&&z&&!z.1g(m[5])||O=="$="&&z.68(z.K-m[5].K)==m[5]||(O=="*="||O=="~=")&&z.1g(m[5])>=0)^h)g.1a(a)}r=g}J 9(m[1]==":"&&m[2]=="2I-46"){H e={},g=[],14=/(\\d*)n\\+?(\\d*)/.2S(m[3]=="6f"&&"2n"||m[3]=="6e"&&"2n+1"||!/\\D/.14(m[3])&&"n+"+m[3]||m[3]),3v=(14[1]||1)-0,d=14[2]-0;L(H i=0,31=r.K;i<31;i++){H j=r[i],12=j.12,22=E.M(12);9(!e[22]){H c=1;L(H n=12.1w;n;n=n.2q)9(n.1y==1)n.4U=c++;e[22]=Q}H b=P;9(3v==1){9(d==0||j.4U==d)b=Q}J 9((j.4U+d)%3v==0)b=Q;9(b^h)g.1a(j)}r=g}J{H f=E.55[m[1]];9(1m f!="1M")f=E.55[m[1]][m[2]];f=3w("P||G(a,i){I "+f+"}");r=E.2W(r,f,h)}}I{r:r,t:t}},4e:G(b,c){H d=[];H a=b[c];1W(a&&a!=U){9(a.1y==1)d.1a(a);a=a[c]}I d},2I:G(a,e,c,b){e=e||1;H d=0;L(;a;a=a[c])9(a.1y==1&&++d==e)1T;I a},5d:G(n,a){H r=[];L(;n;n=n.2q){9(n.1y==1&&(!a||n!=a))r.1a(n)}I r}});E.1j={1f:G(g,e,c,h){9(E.V.1h&&g.4j!=W)g=18;9(!c.2u)c.2u=6.2u++;9(h!=W){H d=c;c=G(){I d.16(6,1q)};c.M=h;c.2u=d.2u}H i=e.2l(".");e=i[0];c.O=i[1];H b=E.M(g,"2P")||E.M(g,"2P",{});H f=E.M(g,"2t",G(){H a;9(1m E=="W"||E.1j.4T)I a;a=E.1j.2t.16(g,1q);I a});H j=b[e];9(!j){j=b[e]={};9(g.4S)g.4S(e,f,P);J g.7N("43"+e,f)}j[c.2u]=c;6.1Z[e]=Q},2u:1,1Z:{},28:G(d,c,b){H e=E.M(d,"2P"),2L,4I;9(1m c=="1M"){H a=c.2l(".");c=a[0]}9(e){9(c&&c.O){b=c.4Q;c=c.O}9(!c){L(c 1i e)6.28(d,c)}J 9(e[c]){9(b)2E e[c][b.2u];J L(b 1i e[c])9(!a[1]||e[c][b].O==a[1])2E e[c][b];L(2L 1i e[c])1T;9(!2L){9(d.4P)d.4P(c,E.M(d,"2t"),P);J d.7M("43"+c,E.M(d,"2t"));2L=S;2E e[c]}}L(2L 1i e)1T;9(!2L){E.30(d,"2P");E.30(d,"2t")}}},1F:G(d,b,e,c,f){b=E.2h(b||[]);9(!e){9(6.1Z[d])E("*").1f([18,U]).1F(d,b)}J{H a,2L,1b=E.1n(e[d]||S),4N=!b[0]||!b[0].2M;9(4N)b.4w(6.4M({O:d,2m:e}));b[0].O=d;9(E.1n(E.M(e,"2t")))a=E.M(e,"2t").16(e,b);9(!1b&&e["43"+d]&&e["43"+d].16(e,b)===P)a=P;9(4N)b.44();9(f&&f.16(e,b)===P)a=P;9(1b&&c!==P&&a!==P&&!(E.11(e,\'a\')&&d=="4L")){6.4T=Q;e[d]()}6.4T=P}I a},2t:G(d){H a;d=E.1j.4M(d||18.1j||{});H b=d.O.2l(".");d.O=b[0];H c=E.M(6,"2P")&&E.M(6,"2P")[d.O],3q=1B.3A.2J.2O(1q,1);3q.4w(d);L(H j 1i c){3q[0].4Q=c[j];3q[0].M=c[j].M;9(!b[1]||c[j].O==b[1]){H e=c[j].16(6,3q);9(a!==P)a=e;9(e===P){d.2M();d.3p()}}}9(E.V.1h)d.2m=d.2M=d.3p=d.4Q=d.M=S;I a},4M:G(c){H a=c;c=E.1k({},a);c.2M=G(){9(a.2M)a.2M();a.7L=P};c.3p=G(){9(a.3p)a.3p();a.7K=Q};9(!c.2m&&c.65)c.2m=c.65;9(E.V.1N&&c.2m.1y==3)c.2m=a.2m.12;9(!c.4K&&c.4J)c.4K=c.4J==c.2m?c.7H:c.4J;9(c.64==S&&c.63!=S){H e=U.2V,b=U.1G;c.64=c.63+(e&&e.2R||b.2R||0);c.7E=c.7D+(e&&e.2B||b.2B||0)}9(!c.3Y&&(c.61||c.60))c.3Y=c.61||c.60;9(!c.5F&&c.5D)c.5F=c.5D;9(!c.3Y&&c.2r)c.3Y=(c.2r&1?1:(c.2r&2?3:(c.2r&4?2:0)));I c}};E.1b.1k({3W:G(c,a,b){I c=="5Y"?6.2G(c,a,b):6.N(G(){E.1j.1f(6,c,b||a,b&&a)})},2G:G(d,b,c){I 6.N(G(){E.1j.1f(6,d,G(a){E(6).5X(a);I(c||b).16(6,1q)},c&&b)})},5X:G(a,b){I 6.N(G(){E.1j.28(6,a,b)})},1F:G(c,a,b){I 6.N(G(){E.1j.1F(c,a,6,Q,b)})},7x:G(c,a,b){9(6[0])I E.1j.1F(c,a,6[0],P,b)},25:G(){H a=1q;I 6.4L(G(e){6.4H=0==6.4H?1:0;e.2M();I a[6.4H].16(6,[e])||P})},7v:G(f,g){G 4G(e){H p=e.4K;1W(p&&p!=6)2a{p=p.12}29(e){p=6};9(p==6)I P;I(e.O=="4x"?f:g).16(6,[e])}I 6.4x(4G).5U(4G)},2d:G(f){5T();9(E.3T)f.16(U,[E]);J E.3l.1a(G(){I f.16(6,[E])});I 6}});E.1k({3T:P,3l:[],2d:G(){9(!E.3T){E.3T=Q;9(E.3l){E.N(E.3l,G(){6.16(U)});E.3l=S}9(E.V.35||E.V.34)U.4P("5S",E.2d,P);9(!18.7t.K)E(18).39(G(){E("#4E").28()})}}});E.N(("7s,7r,39,7q,6n,5Y,4L,7p,"+"7n,7m,7l,4x,5U,7k,24,"+"51,7j,7i,7h,3U").2l(","),G(i,o){E.1b[o]=G(f){I f?6.3W(o,f):6.1F(o)}});H x=P;G 5T(){9(x)I;x=Q;9(E.V.35||E.V.34)U.4S("5S",E.2d,P);J 9(E.V.1h){U.7f("<7d"+"7y 22=4E 7z=Q "+"3k=//:><\\/1J>");H a=U.3S("4E");9(a)a.62=G(){9(6.2C!="1l")I;E.2d()};a=S}J 9(E.V.1N)E.4B=4j(G(){9(U.2C=="5Q"||U.2C=="1l"){4A(E.4B);E.4B=S;E.2d()}},10);E.1j.1f(18,"39",E.2d)}E.1b.1k({39:G(g,d,c){9(E.1n(g))I 6.3W("39",g);H e=g.1g(" ");9(e>=0){H i=g.2J(e,g.K);g=g.2J(0,e)}c=c||G(){};H f="4z";9(d)9(E.1n(d)){c=d;d=S}J{d=E.3a(d);f="5P"}H h=6;E.3G({1d:g,O:f,M:d,1l:G(a,b){9(b=="1C"||b=="5O")h.4o(i?E("<1s/>").3g(a.40.1p(/<1J(.|\\s)*?\\/1J>/g,"")).1Y(i):a.40);56(G(){h.N(c,[a.40,b,a])},13)}});I 6},7a:G(){I E.3a(6.5M())},5M:G(){I 6.1X(G(){I E.11(6,"2Y")?E.2h(6.79):6}).1E(G(){I 6.2H&&!6.3c&&(6.2Q||/24|6b/i.14(6.11)||/2g|1P|52/i.14(6.O))}).1X(G(i,c){H b=E(6).3i();I b==S?S:b.1c==1B?E.1X(b,G(a,i){I{2H:c.2H,1Q:a}}):{2H:c.2H,1Q:b}}).21()}});E.N("5L,5K,6t,5J,5I,5H".2l(","),G(i,o){E.1b[o]=G(f){I 6.3W(o,f)}});H B=(1u 3D).3B();E.1k({21:G(d,b,a,c){9(E.1n(b)){a=b;b=S}I E.3G({O:"4z",1d:d,M:b,1C:a,1V:c})},78:G(b,a){I E.21(b,S,a,"1J")},77:G(c,b,a){I E.21(c,b,a,"45")},76:G(d,b,a,c){9(E.1n(b)){a=b;b={}}I E.3G({O:"5P",1d:d,M:b,1C:a,1V:c})},75:G(a){E.1k(E.59,a)},59:{1Z:Q,O:"4z",2z:0,5G:"74/x-73-2Y-72",6o:Q,3e:Q,M:S},49:{},3G:G(s){H f,2y=/=(\\?|%3F)/g,1v,M;s=E.1k(Q,s,E.1k(Q,{},E.59,s));9(s.M&&s.6o&&1m s.M!="1M")s.M=E.3a(s.M);9(s.1V=="4b"){9(s.O.2p()=="21"){9(!s.1d.1t(2y))s.1d+=(s.1d.1t(/\\?/)?"&":"?")+(s.4b||"5E")+"=?"}J 9(!s.M||!s.M.1t(2y))s.M=(s.M?s.M+"&":"")+(s.4b||"5E")+"=?";s.1V="45"}9(s.1V=="45"&&(s.M&&s.M.1t(2y)||s.1d.1t(2y))){f="4b"+B++;9(s.M)s.M=s.M.1p(2y,"="+f);s.1d=s.1d.1p(2y,"="+f);s.1V="1J";18[f]=G(a){M=a;1C();1l();18[f]=W;2a{2E 18[f]}29(e){}}}9(s.1V=="1J"&&s.1L==S)s.1L=P;9(s.1L===P&&s.O.2p()=="21")s.1d+=(s.1d.1t(/\\?/)?"&":"?")+"57="+(1u 3D()).3B();9(s.M&&s.O.2p()=="21"){s.1d+=(s.1d.1t(/\\?/)?"&":"?")+s.M;s.M=S}9(s.1Z&&!E.5b++)E.1j.1F("5L");9(!s.1d.1g("8g")&&s.1V=="1J"){H h=U.4l("9U")[0];H g=U.5B("1J");g.3k=s.1d;9(!f&&(s.1C||s.1l)){H j=P;g.9R=g.62=G(){9(!j&&(!6.2C||6.2C=="5Q"||6.2C=="1l")){j=Q;1C();1l();h.3b(g)}}}h.58(g);I}H k=P;H i=18.6X?1u 6X("9P.9O"):1u 6W();i.9M(s.O,s.1d,s.3e);9(s.M)i.5C("9J-9I",s.5G);9(s.5y)i.5C("9H-5x-9F",E.49[s.1d]||"9D, 9C 9B 9A 5v:5v:5v 9z");i.5C("X-9x-9v","6W");9(s.6U)s.6U(i);9(s.1Z)E.1j.1F("5H",[i,s]);H c=G(a){9(!k&&i&&(i.2C==4||a=="2z")){k=Q;9(d){4A(d);d=S}1v=a=="2z"&&"2z"||!E.6S(i)&&"3U"||s.5y&&E.6R(i,s.1d)&&"5O"||"1C";9(1v=="1C"){2a{M=E.6Q(i,s.1V)}29(e){1v="5k"}}9(1v=="1C"){H b;2a{b=i.5s("6P-5x")}29(e){}9(s.5y&&b)E.49[s.1d]=b;9(!f)1C()}J E.5r(s,i,1v);1l();9(s.3e)i=S}};9(s.3e){H d=4j(c,13);9(s.2z>0)56(G(){9(i){i.9q();9(!k)c("2z")}},s.2z)}2a{i.9o(s.M)}29(e){E.5r(s,i,S,e)}9(!s.3e)c();I i;G 1C(){9(s.1C)s.1C(M,1v);9(s.1Z)E.1j.1F("5I",[i,s])}G 1l(){9(s.1l)s.1l(i,1v);9(s.1Z)E.1j.1F("6t",[i,s]);9(s.1Z&&!--E.5b)E.1j.1F("5K")}},5r:G(s,a,b,e){9(s.3U)s.3U(a,b,e);9(s.1Z)E.1j.1F("5J",[a,s,e])},5b:0,6S:G(r){2a{I!r.1v&&9n.9l=="54:"||(r.1v>=6N&&r.1v<9j)||r.1v==6M||E.V.1N&&r.1v==W}29(e){}I P},6R:G(a,c){2a{H b=a.5s("6P-5x");I a.1v==6M||b==E.49[c]||E.V.1N&&a.1v==W}29(e){}I P},6Q:G(r,b){H c=r.5s("9i-O");H d=b=="6K"||!b&&c&&c.1g("6K")>=0;H a=d?r.9g:r.40;9(d&&a.2V.37=="5k")6G"5k";9(b=="1J")E.5f(a);9(b=="45")a=3w("("+a+")");I a},3a:G(a){H s=[];9(a.1c==1B||a.4c)E.N(a,G(){s.1a(3f(6.2H)+"="+3f(6.1Q))});J L(H j 1i a)9(a[j]&&a[j].1c==1B)E.N(a[j],G(){s.1a(3f(j)+"="+3f(6))});J s.1a(3f(j)+"="+3f(a[j]));I s.66("&").1p(/%20/g,"+")}});E.1b.1k({1A:G(b,a){I b?6.1U({1H:"1A",2N:"1A",1r:"1A"},b,a):6.1E(":1P").N(G(){6.R.19=6.3h?6.3h:"";9(E.17(6,"19")=="2s")6.R.19="2Z"}).2D()},1z:G(b,a){I b?6.1U({1H:"1z",2N:"1z",1r:"1z"},b,a):6.1E(":3R").N(G(){6.3h=6.3h||E.17(6,"19");9(6.3h=="2s")6.3h="2Z";6.R.19="2s"}).2D()},6J:E.1b.25,25:G(a,b){I E.1n(a)&&E.1n(b)?6.6J(a,b):a?6.1U({1H:"25",2N:"25",1r:"25"},a,b):6.N(G(){E(6)[E(6).3t(":1P")?"1A":"1z"]()})},9c:G(b,a){I 6.1U({1H:"1A"},b,a)},9b:G(b,a){I 6.1U({1H:"1z"},b,a)},99:G(b,a){I 6.1U({1H:"25"},b,a)},98:G(b,a){I 6.1U({1r:"1A"},b,a)},96:G(b,a){I 6.1U({1r:"1z"},b,a)},95:G(c,a,b){I 6.1U({1r:a},c,b)},1U:G(k,i,h,g){H j=E.6D(i,h,g);I 6[j.3L===P?"N":"3L"](G(){j=E.1k({},j);H f=E(6).3t(":1P"),3y=6;L(H p 1i k){9(k[p]=="1z"&&f||k[p]=="1A"&&!f)I E.1n(j.1l)&&j.1l.16(6);9(p=="1H"||p=="2N"){j.19=E.17(6,"19");j.2U=6.R.2U}}9(j.2U!=S)6.R.2U="1P";j.3M=E.1k({},k);E.N(k,G(c,a){H e=1u E.2j(3y,j,c);9(/25|1A|1z/.14(a))e[a=="25"?f?"1A":"1z":a](k);J{H b=a.3s().1t(/^([+-]=)?([\\d+-.]+)(.*)$/),1O=e.2b(Q)||0;9(b){H d=3I(b[2]),2i=b[3]||"2T";9(2i!="2T"){3y.R[c]=(d||1)+2i;1O=((d||1)/e.2b(Q))*1O;3y.R[c]=1O+2i}9(b[1])d=((b[1]=="-="?-1:1)*d)+1O;e.3N(1O,d,2i)}J e.3N(1O,a,"")}});I Q})},3L:G(a,b){9(E.1n(a)){b=a;a="2j"}9(!a||(1m a=="1M"&&!b))I A(6[0],a);I 6.N(G(){9(b.1c==1B)A(6,a,b);J{A(6,a).1a(b);9(A(6,a).K==1)b.16(6)}})},9f:G(){H a=E.32;I 6.N(G(){L(H i=0;i<a.K;i++)9(a[i].T==6)a.6I(i--,1)}).5n()}});H A=G(b,c,a){9(!b)I;H q=E.M(b,c+"3L");9(!q||a)q=E.M(b,c+"3L",a?E.2h(a):[]);I q};E.1b.5n=G(a){a=a||"2j";I 6.N(G(){H q=A(6,a);q.44();9(q.K)q[0].16(6)})};E.1k({6D:G(b,a,c){H d=b&&b.1c==8Z?b:{1l:c||!c&&a||E.1n(b)&&b,2e:b,3J:c&&a||a&&a.1c!=8Y&&a};d.2e=(d.2e&&d.2e.1c==4W?d.2e:{8X:8W,8V:6N}[d.2e])||8T;d.3r=d.1l;d.1l=G(){E(6).5n();9(E.1n(d.3r))d.3r.16(6)};I d},3J:{6B:G(p,n,b,a){I b+a*p},5q:G(p,n,b,a){I((-38.9s(p*38.8R)/2)+0.5)*a+b}},32:[],2j:G(b,c,a){6.Y=c;6.T=b;6.1e=a;9(!c.3P)c.3P={}}});E.2j.3A={4r:G(){9(6.Y.2F)6.Y.2F.16(6.T,[6.2v,6]);(E.2j.2F[6.1e]||E.2j.2F.6z)(6);9(6.1e=="1H"||6.1e=="2N")6.T.R.19="2Z"},2b:G(a){9(6.T[6.1e]!=S&&6.T.R[6.1e]==S)I 6.T[6.1e];H r=3I(E.3C(6.T,6.1e,a));I r&&r>-8O?r:3I(E.17(6.T,6.1e))||0},3N:G(c,b,e){6.5u=(1u 3D()).3B();6.1O=c;6.2D=b;6.2i=e||6.2i||"2T";6.2v=6.1O;6.4q=6.4i=0;6.4r();H f=6;G t(){I f.2F()}t.T=6.T;E.32.1a(t);9(E.32.K==1){H d=4j(G(){H a=E.32;L(H i=0;i<a.K;i++)9(!a[i]())a.6I(i--,1);9(!a.K)4A(d)},13)}},1A:G(){6.Y.3P[6.1e]=E.1x(6.T.R,6.1e);6.Y.1A=Q;6.3N(0,6.2b());9(6.1e=="2N"||6.1e=="1H")6.T.R[6.1e]="8N";E(6.T).1A()},1z:G(){6.Y.3P[6.1e]=E.1x(6.T.R,6.1e);6.Y.1z=Q;6.3N(6.2b(),0)},2F:G(){H t=(1u 3D()).3B();9(t>6.Y.2e+6.5u){6.2v=6.2D;6.4q=6.4i=1;6.4r();6.Y.3M[6.1e]=Q;H a=Q;L(H i 1i 6.Y.3M)9(6.Y.3M[i]!==Q)a=P;9(a){9(6.Y.19!=S){6.T.R.2U=6.Y.2U;6.T.R.19=6.Y.19;9(E.17(6.T,"19")=="2s")6.T.R.19="2Z"}9(6.Y.1z)6.T.R.19="2s";9(6.Y.1z||6.Y.1A)L(H p 1i 6.Y.3M)E.1x(6.T.R,p,6.Y.3P[p])}9(a&&E.1n(6.Y.1l))6.Y.1l.16(6.T);I P}J{H n=t-6.5u;6.4i=n/6.Y.2e;6.4q=E.3J[6.Y.3J||(E.3J.5q?"5q":"6B")](6.4i,n,0,1,6.Y.2e);6.2v=6.1O+((6.2D-6.1O)*6.4q);6.4r()}I Q}};E.2j.2F={2R:G(a){a.T.2R=a.2v},2B:G(a){a.T.2B=a.2v},1r:G(a){E.1x(a.T.R,"1r",a.2v)},6z:G(a){a.T.R[a.1e]=a.2v+a.2i}};E.1b.6m=G(){H c=0,3E=0,T=6[0],5t;9(T)8L(E.V){H b=E.17(T,"2X")=="4F",1D=T.12,23=T.23,2K=T.3H,4f=1N&&3x(4s)<8J;9(T.6V){5w=T.6V();1f(5w.1S+38.33(2K.2V.2R,2K.1G.2R),5w.3E+38.33(2K.2V.2B,2K.1G.2B));9(1h){H d=E("4o").17("8H");d=(d=="8G"||E.5g&&3x(4s)>=7)&&2||d;1f(-d,-d)}}J{1f(T.5l,T.5z);1W(23){1f(23.5l,23.5z);9(35&&/^t[d|h]$/i.14(1D.37)||!4f)d(23);9(4f&&!b&&E.17(23,"2X")=="4F")b=Q;23=23.23}1W(1D.37&&!/^1G|4o$/i.14(1D.37)){9(!/^8D|1I-9S.*$/i.14(E.17(1D,"19")))1f(-1D.2R,-1D.2B);9(35&&E.17(1D,"2U")!="3R")d(1D);1D=1D.12}9(4f&&b)1f(-2K.1G.5l,-2K.1G.5z)}5t={3E:3E,1S:c}}I 5t;G d(a){1f(E.17(a,"9T"),E.17(a,"8A"))}G 1f(l,t){c+=3x(l)||0;3E+=3x(t)||0}}})();',62,616,'||||||this|||if|||||||||||||||||||||||||||||||||function|var|return|else|length|for|data|each|type|false|true|style|null|elem|document|browser|undefined||options|||nodeName|parentNode||test|jQuery|apply|css|window|display|push|fn|constructor|url|prop|add|indexOf|msie|in|event|extend|complete|typeof|isFunction|className|replace|arguments|opacity|div|match|new|status|firstChild|attr|nodeType|hide|show|Array|success|parent|filter|trigger|body|height|table|script|tbody|cache|string|safari|start|hidden|value|merge|left|break|animate|dataType|while|map|find|global||get|id|offsetParent|select|toggle|selected|toUpperCase|remove|catch|try|cur|al|ready|duration|done|text|makeArray|unit|fx|swap|split|target||pushStack|toLowerCase|nextSibling|button|none|handle|guid|now|stack|tb|jsre|timeout|inArray|scrollTop|readyState|end|delete|step|one|name|nth|slice|doc|ret|preventDefault|width|call|events|checked|scrollLeft|exec|px|overflow|documentElement|grep|position|form|block|removeData|rl|timers|max|opera|mozilla|trim|tagName|Math|load|param|removeChild|disabled|insertBefore|async|encodeURIComponent|append|oldblock|val|childNodes|src|readyList|multiFilter|color|defaultView|stopPropagation|args|old|toString|is|last|first|eval|parseInt|self|domManip|prototype|getTime|curCSS|Date|top||ajax|ownerDocument|parseFloat|easing|has|queue|curAnim|custom|innerHTML|orig|currentStyle|visible|getElementById|isReady|error|static|bind|String|which|getComputedStyle|responseText|oWidth|oHeight|on|shift|json|child|RegExp|ol|lastModified|isXMLDoc|jsonp|jquery|previousSibling|dir|safari2|el|styleFloat|state|setInterval|radio|getElementsByTagName|tr|empty|html|getAttribute|pos|update|version|input|float|runtimeStyle|unshift|mouseover|getPropertyValue|GET|clearInterval|safariTimer|visibility|clean|__ie_init|absolute|handleHover|lastToggle|index|fromElement|relatedTarget|click|fix|evt|andSelf|removeEventListener|handler|cloneNode|addEventListener|triggered|nodeIndex|unique|Number|classFilter|prevObject|selectedIndex|after|submit|password|removeAttribute|file|expr|setTimeout|_|appendChild|ajaxSettings|client|active|win|sibling|deep|globalEval|boxModel|cssFloat|object|checkbox|parsererror|offsetLeft|wrapAll|dequeue|props|lastChild|swing|handleError|getResponseHeader|results|startTime|00|box|Modified|ifModified|offsetTop|evalScript|createElement|setRequestHeader|ctrlKey|callback|metaKey|contentType|ajaxSend|ajaxSuccess|ajaxError|ajaxStop|ajaxStart|serializeArray|init|notmodified|POST|loaded|appendTo|DOMContentLoaded|bindReady|mouseout|not|removeAttr|unbind|unload|Width|keyCode|charCode|onreadystatechange|clientX|pageX|srcElement|join|outerHTML|substr|zoom|parse|textarea|reset|image|odd|even|before|quickClass|quickID|prepend|quickChild|execScript|offset|scroll|processData|uuid|contents|continue|textContent|ajaxComplete|clone|setArray|webkit|nodeValue|fl|_default|100|linear|href|speed|eq|createTextNode|throw|replaceWith|splice|_toggle|xml|colgroup|304|200|alpha|Last|httpData|httpNotModified|httpSuccess|fieldset|beforeSend|getBoundingClientRect|XMLHttpRequest|ActiveXObject|col|br|abbr|pixelLeft|urlencoded|www|application|ajaxSetup|post|getJSON|getScript|elements|serialize|clientWidth|hasClass|scr|clientHeight|write|relative|keyup|keypress|keydown|change|mousemove|mouseup|mousedown|right|dblclick|resize|focus|blur|frames|instanceof|hover|offsetWidth|triggerHandler|ipt|defer|offsetHeight|border|padding|clientY|pageY|Left|Right|toElement|Bottom|Top|cancelBubble|returnValue|detachEvent|attachEvent|substring|line|weight|animated|header|font|enabled|innerText|contains|only|size|gt|lt|uFFFF|u0128|417|inner|Height|toggleClass|removeClass|addClass|replaceAll|noConflict|insertAfter|prependTo|wrap|contentWindow|contentDocument|http|iframe|children|siblings|prevAll|nextAll|wrapInner|prev|Boolean|next|parents|maxLength|maxlength|readOnly|readonly|class|htmlFor|CSS1Compat|compatMode|compatible|borderTopWidth|ie|ra|inline|it|rv|medium|borderWidth|userAgent|522|navigator|with|concat|1px|10000|array|ig|PI|NaN|400|reverse|fast|600|slow|Function|Object|setAttribute|changed|be|can|property|fadeTo|fadeOut|getAttributeNode|fadeIn|slideToggle|method|slideUp|slideDown|action|cssText|stop|responseXML|option|content|300|th|protocol|td|location|send|cap|abort|colg|cos|tfoot|thead|With|leg|Requested|opt|GMT|1970|Jan|01|Thu|area|Since|hr|If|Type|Content|meta|specified|open|link|XMLHTTP|Microsoft|img|onload|row|borderLeftWidth|head|attributes'.split('|'),0,{});
+
+/*
+ Copyright (c) 2004-2007, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+/*
+ This is a compiled version of Dojo, built for deployment and not for
+ development. To get an editable version, please visit:
+
+ http://dojotoolkit.org
+
+ for documentation and information on getting the source.
+*/
+
+var decompressedDojo = function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('if(V z=="1k"){(B(){if(V D["1o"]=="1k"){D.1o={}}if((!D["1z"])||(!1z["ca"])){D.1z={}}A cn=["rA","rz","1K","ry","rx","9f","rw","rv","ru","rt","rs","rr","rq","ro","rn","rm"];A i=0,24;1s(24=cn[i++]){if(!1z[24]){1z[24]=B(){}}}if(V D["z"]=="1k"){D.z={}}z.1W=D;A d3={im:U,rl:U,rk:"",rj:"",ri:"",rh:K,rg:U};R(A 8z in d3){if(V 1o[8z]=="1k"){1o[8z]=d3[8z]}}A jK=["rf","rd","rc","rb"];A t;1s(t=jK.3a()){z["is"+t]=U}})();z.8h=1o.8h;z.cY={jJ:0,jI:9,jH:0,jG:"",jF:2V("$ra: r9 $".1f(/[0-9]+/)[0]),2i:B(){4G(z.cY){C jJ+"."+jI+"."+jH+jG+" ("+jF+")"}}};z.d1=B(jE,jD,1V){A 2h=1V||z.1W;R(A i=0,p;2h&&(p=jE[i]);i++){2h=(p in 2h?2h[p]:(jD?2h[p]={}:1k))}C 2h};z.88=B(jC,jA,jB){A d2=jC.1A("."),p=d2.8q(),M=z.d1(d2,K,jB);C(M&&p?(M[p]=jA):1k)};z.6q=B(jz,jy,jx){C z.d1(jz.1A("."),jy,jx)};z.r8=B(jw,M){C!!z.6q(jw,U,M)};z["3u"]=B(d0){C z.1W.3u?z.1W.3u(d0):3u(d0)};z.ia=B(jv,cZ,cX){A 8y="r7: "+jv;if(cZ){8y+=" "+cZ}if(cX){8y+=" -- r6 be r5 in cY: "+cX}1z.1K(8y)};z.r4=B(ju,cW){A cV="r3: "+ju+" -- r2 r1 4F r0 qZ qY.";if(cW){cV+=" "+cW}1z.1K(cV)};(B(){A cR={53:{},6p:0,1h:{},8k:{z:{1p:"z",1Z:"."},cU:{1p:"cU",1Z:"../qX/cU"},cT:{1p:"cT",1Z:"cT"}},cN:B(cS){A mp=D.8k;C jp(mp[cS]&&mp[cS].1Z)},jk:B(8x){A mp=D.8k;if(D.cN(8x)){C mp[8x].1Z}C 8x},8v:[],6t:U,56:[],8t:[],8u:U};R(A cQ in cR){z[cQ]=cR[cQ]}})();z.jg=B(8w,cP,cb){A 1g=(((8w.2s(0)=="/"||8w.1f(/^\\w+:/)))?"":D.51)+8w;if(1o.jt&&z.c8){1g+="?"+67(1o.jt).2f(/\\W+/g,"")}1u{C!cP?D.cO(1g,cb):D.jq(1g,cP,cb)}1y(e){1z.1K(e);C U}};z.cO=B(1g,cb){if(D.8v[1g]){C K}A 6u=D.iR(1g,K);if(!6u){C U}D.8v[1g]=K;D.8v.Y(1g);if(cb){6u="("+6u+")"}A jr=z["3u"](6u+"\\r\\n//@ qW="+1g);if(cb){cb(jr)}C K};z.jq=B(1g,jo,cb){A ok=U;1u{ok=D.cO(1g,cb)}1y(e){1z.1K("qV je ",1g," 4G 9f: ",e)}C jp(ok&&D.53[jo])};z.6m=B(){D.8u=K;D.6t=K;A 57=D.56;D.56=[];R(A x=0;x<57.G;x++){57[x]()}D.8u=U;if(z.6t&&z.6p==0&&D.56.G>0){z.8s()}};z.ck=B(){A 57=D.8t;1s(57.G){(57.8q())()}};z.qU=B(M,jn){A d=z;if(P.G==1){d.56.Y(M)}I{if(P.G>1){d.56.Y(B(){M[jn]()})}}if(d.6t&&d.6p==0&&!d.8u){d.8s()}};z.dW=B(M,jm){A d=z;if(P.G==1){d.8t.Y(M)}I{if(P.G>1){d.8t.Y(B(){M[jm]()})}}};z.iM=B(){if(D.6t){C}if(D.6p>0){1z.1K("qT qS in qR!");C}z.8s()};z.8s=B(){if(V 5c=="8b"||(1o["qQ"]&&z.2M)){5c("z.6m();",0)}I{z.6m()}};z.cF=B(jl){A 4v=jl.1A(".");R(A i=4v.G;i>0;i--){A 8r=4v.2w(0,i).22(".");if((i==1)&&!D.cN(8r)){4v[0]="../"+4v[0]}I{A cM=D.jk(8r);if(cM!=8r){4v.3S(0,i,cM);3f}}}C 4v};z.jj=U;z.8m=B(2T,qP,55){55=D.jj||55;A 54=D.53[2T];if(54){C 54}A cL=2T.1A(".");A 3L=D.cF(2T);A jh=((3L[0].2s(0)!="/")&&!3L[0].1f(/^\\w+:/));A ji=3L[3L.G-1];A 3m;if(ji=="*"){2T=cL.2w(0,-1).22(".");3L.8q();3m=3L.22("/")+"/"+(1o["qO"]||"qN")+".js";if(jh&&3m.2s(0)=="/"){3m=3m.2w(1)}}I{3m=3L.22("/")+".js";2T=cL.22(".")}A jf=(!55)?2T:L;A ok=D.jg(3m,jf);if((!ok)&&(!55)){2m S 1O("qM 3O 4E \'"+2T+"\'; 72 qL \'"+3m+"\'")}if((!55)&&(!D["qK"])){54=D.53[2T];if(!54){2m S 1O("qJ \'"+2T+"\' is 3O qI a8 je \'"+3m+"\'")}}C 54};z.8c=z.8m;z.1Q=B(cK){A cJ=cK+"";A 8p=cJ;A 6s=cK.1A(/\\./);if(6s[6s.G-1]=="*"){6s.8q();8p=6s.22(".")}A 8o=z.6q(8p,K);D.53[cJ]=8o;D.53[8p]=8o;C 8o};z.qH=B(8n){A jd=8n["qG"]||[];A cI=jd.3U(8n[z.j4]||8n["aY"]||[]);R(A x=0;x<cI.G;x++){A 8l=cI[x];if(8l.1P==4e){z.8m.14(z,8l)}I{z.8m(8l)}}};z.jb=B(jc,qF){if(jc===K){A cH=[];R(A i=1;i<P.G;i++){cH.Y(P[i])}z.8c.14(z,cH)}};z.qE=z.jb;z.io=B(cG,ja){D.8k[cG]={1p:cG,1Z:ja}};z.qD=B(qC,qB,qA,qz){z.8c("z.j9");z.j9.qy.14(z.qx,P)};(B(){A j7=S 9G("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?$");A j6=S 9G("^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$");z.4r=B(){A n=L;A 1V=P;A 1g=1V[0];R(A i=1;i<1V.G;i++){if(!1V[i]){6c}A 1t=S z.4r(1V[i]+"");A 4u=S z.4r(1g+"");if((1t.28=="")&&(!1t.4t)&&(!1t.3l)&&(!1t.1r)){if(1t.52!=n){4u.52=1t.52}1t=4u}I{if(!1t.4t){1t.4t=4u.4t;if(!1t.3l){1t.3l=4u.3l;if(1t.28.2s(0)!="/"){A j8=4u.28.21(0,4u.28.31("/")+1)+1t.28;A 1X=j8.1A("/");R(A j=0;j<1X.G;j++){if(1X[j]=="."){if(j==1X.G-1){1X[j]=""}I{1X.3S(j,1);j--}}I{if(j>0&&!(j==1&&1X[0]=="")&&1X[j]==".."&&1X[j-1]!=".."){if(j==(1X.G-1)){1X.3S(j,1);1X[j-1]=""}I{1X.3S(j-1,2);j-=2}}}}1t.28=1X.22("/")}}}}1g="";if(1t.4t){1g+=1t.4t+":"}if(1t.3l){1g+="//"+1t.3l}1g+=1t.28;if(1t.1r){1g+="?"+1t.1r}if(1t.52){1g+="#"+1t.52}}D.1g=1g.2i();A r=D.1g.1f(j7);D.4t=r[2]||(r[1]?"":n);D.3l=r[4]||(r[3]?"":n);D.28=r[5];D.1r=r[7]||(r[6]?"":n);D.52=r[9]||(r[8]?"":n);if(D.3l!=n){r=D.3l.1f(j6);D.8X=r[3]||n;D.8W=r[4]||n;D.qw=r[5];D.qv=r[7]||n}};z.4r.1C.2i=B(){C D.1g}})();z.qu=B(j5,2E){A 2B=z.cF(j5).22("/");if(!2B){C L}if(2B.31("/")!=2B.G-1){2B+="/"}A cE=2B.T(":");if(2B.2s(0)!="/"&&(cE==-1||cE>2B.T("/"))){2B=z.51+2B}C S z.4r(2B,2E)};if(V 26!="1k"){z.c8=K;z.j4="qt";(B(){A d=z;if(1q&&1q.4I){A 8j=1q.4I("ak");A j3=/z(\\.qs)?\\.js([\\?\\.]|$)/i;R(A i=0;i<8j.G;i++){A 4X=8j[i].5t("4X");if(!4X){6c}A m=4X.1f(j3);if(m){if(!1o["51"]){1o["51"]=4X.21(0,m.hK)}A cD=8j[i].5t("1o");if(cD){A cC=3u("({ "+cD+" })");R(A x in cC){1o[x]=cC[x]}}3f}}}d.51=1o["51"];A n=cq;A 8i=n.iL;A 4Z=n.qr;A 6r=2k(4Z);d.2M=(8i.T("qq")>=0)?6r:0;d.6B=(4Z.T("qo")>=0)||(4Z.T("j2")>=0)?6r:0;d.3o=(4Z.T("j2")>=0)?6r:0;A j1=8i.T("qn");d.gu=d.7B=((j1>=0)&&(!d.6B))?6r:0;d.j0=0;d.1l=0;d.iV=0;1u{if(d.7B){d.j0=2k(8i.1A("qm/")[1].1A(" ")[0])}if((1q.gx)&&(!d.2M)){d.1l=2k(4Z.1A("qk ")[1].1A(";")[0])}}1y(e){}if(z.1l&&(26.8f.cu==="9q:")){1o.iT=K}d.iX=B(){A 2A;A qj;A cB=d.6q("cz.cy");if(cB){C cB}if(V iZ!="1k"){2A=S iZ()}I{if(d.1l){1u{2A=S 9j("qi.qh")}1y(e){}}I{if(cq.qg["8Z/x-iY"]){2A=1q.a9("8b");2A.cA("Z","8Z/x-iY");2A.cA("3n",0);2A.cA("58",0);2A.1c.gq="7C";1q.5K.4c(2A)}}}if(!2A){C L}z.88("cz.cy.qf",2A);C z.6q("cz.cy")};A iW=d.iX();if(iW){d.iV=K}A cm=1q["aX"];d.qe=(cm=="aW")||(cm=="gr")||(d.1l<6);d.8h=1o.8h||(d.1l?n.qd:n.qc).1M();d.qb=1z.1K;d.cx=["iU.8g","em.8g","iU.8g.4.0"];d.9b=B(){A 4s=L;A cv=L;if(!z.1l||!1o.iT){1u{4s=S qa()}1y(e){}}if(!4s){R(A i=0;i<3;++i){A cw=z.cx[i];1u{4s=S 9j(cw)}1y(e){cv=e}if(4s){z.cx=[cw];3f}}}if(!4s){2m S 1O("8g 3O q9: "+cv)}C 4s};d.8Y=B(iS){A 4Y=iS.3N||0;C((4Y>=q8)&&(4Y<q7))||(4Y==q6)||(4Y==q5)||(!4Y&&(8f.cu=="9q:"||8f.cu=="q4:"))};A cs=1q.4I("q3");A iQ=(cs&&cs.G>0);d.iR=B(1g,iP){A 3K=D.9b();if(!iQ&&z.4r){1g=(S z.4r(26.8f,1g)).2i()}3K.dL("dD",1g,U);1u{3K.dI(L);if(!d.8Y(3K)){A 1G=1O("q2 4F 4E "+1g+" 3N:"+3K.3N);1G.3N=3K.3N;1G.2G=3K.2G;2m 1G}}1y(e){if(iP){C L}2m e}C 3K.2G}})();z.iO=U;z.6o=B(e){z.iO=K;A cr=(e&&e.Z)?e.Z.1M():"4E";if(P.2O.iN||(cr!="q1"&&cr!="4E")){C}P.2O.iN=K;if(V z["8e"]!="1k"){dX(z.8e);63 z.8e}if(z.6p==0){z.iM()}};if(1q.66){if(z.2M||(z.7B&&(1o["q0"]===K))){1q.66("pZ",z.6o,L)}26.66("4E",z.6o,L)}if(/(pY|pX)/i.6Z(cq.iL)){z.8e=dN(B(){if(/6m|iJ/.6Z(1q.6F)){z.6o()}},10)}(B(){A 3g=26;A 8d=B(cp,fp){A iK=3g[cp]||B(){};3g[cp]=B(){fp.14(3g,P);iK.14(3g,P)}};if(z.1l){1q.fJ("<iI"+"iH pW 4X=\\"//:\\" "+"pV=\\"if(D.6F==\'iJ\'){z.6o();}\\">"+"</iI"+"iH>");A co=K;8d("iG",B(){3g.5c(B(){co=U},0)});8d("pU",B(){if(co){z.ck()}});1u{1q.pT.2P("v","pS:pR-pQ-pP:pO");1q.pN().pM("v\\\\:*","pL:2E(#aY#pK)")}1y(e){}}I{8d("iG",B(){z.ck()})}})();z.pJ=B(){};z.1e=26["1q"]||L;z.3E=B(){C z.1e.3E||z.1e.4I("3E")[0]};z.ch=B(iF,iE){z.1W=iF;z.1e=iE};z.cf=B(4q,6n,iD){if((6n)&&((V 4q=="3c")||(4q 1N 67))){4q=6n[4q]}C(6n?4q.14(6n,iD||[]):4q())};z.pI=B(cj,iC,iB,iA){A cg;A iz=z.1W;A iy=z.1e;1u{z.ch(cj,cj.1q);cg=z.cf(iC,iB,iA)}ir{z.ch(iz,iy)}C cg};z.pH=B(ix,iw,iv,iu){A ce;A ip=z.1e;1u{z.1e=ix;ce=z.cf(iw,iv,iu)}ir{z.1e=ip}C ce};if(1o["cd"]){R(A cc in 1o["cd"]){z.io(cc,1o["cd"][cc])}}}if(1o.im){if(!1z.ca){z.8c("z.pG.ca")}}}if(!z.1h["z.X.c9"]){z.1h["z.X.c9"]=K;z.1Q("z.X.c9");z.1R=B(it){C(V it=="3c"||it 1N 67)};z.2l=B(it){C(it&&it 1N 4e||V it=="6a"||((V z["1H"]!="1k")&&(it 1N z.1H)))};if(z.c8&&z.3o){z.1Y=B(it){if((V(it)=="B")&&(it=="[8b 1H]")){C U}C(V it=="B"||it 1N bI)}}I{z.1Y=B(it){C(V it=="B"||it 1N bI)}}z.ib=B(it){if(V it=="1k"){C U}C(it===L||V it=="8b"||z.2l(it)||z.1Y(it))};z.pF=B(it){A d=z;if((!it)||(V it=="1k")){C U}if(d.1R(it)){C U}if(d.1Y(it)){C U}if(d.2l(it)){C K}if((it.5w)&&(it.5w.1M()=="3R")){C U}if(pE(it.G)){C K}C U};z.pD=B(it){if(!it){C U}C!z.1Y(it)&&/\\{\\s*\\[il 5h\\]\\s*\\}/.6Z(67(it))};z.c7=B(M,4W){A 8a={};R(A x in 4W){if((V 8a[x]=="1k")||(8a[x]!=4W[x])){M[x]=4W[x]}}if(z.1l){A p=4W.2i;if((V(p)=="B")&&(p!=M.2i)&&(p!=8a.2i)&&(p!="\\pC 2i() {\\n [il 5h]\\n}\\n")){M.2i=4W.2i}}C M};z.1x=B(M,pB){R(A i=1,l=P.G;i<l;i++){z.c7(M,P[i])}C M};z.4M=B(c6,pA){R(A i=1,l=P.G;i<l;i++){z.c7(c6.1C,P[i])}C c6};z.ig=B(c5,89){A ij=z.4d(P,2);A ik=z.1R(89);C B(){A ih=z.4d(P);A f=(ik?(c5||z.1W)[89]:89);C(f)&&(f.14(c5||D,ij.3U(ih)))}};z.2p=B(2z,3k){if(P.G>2){C z.ig.14(z,P)}if(!3k){3k=2z;2z=L}if(z.1R(3k)){2z=2z||z.1W;if(!2z[3k]){2m(["z.2p: ie[\\"",3k,"\\"] is L (ie=\\"",2z,"\\")"].22(""))}C B(){C 2z[3k].14(2z,P||[])}}I{C(!2z?3k:B(){C 3k.14(2z,P||[])})}};z.6j=B(M,c3){B c4(){};c4.1C=M;A c2=S c4();if(c3){z.1x(c2,c3)}C c2};z.7X=B(pz){A Q=[L];C z.2p.14(z,Q.3U(z.4d(P)))};z.4d=B(M,ic){A Q=[];R(A x=ic||0;x<M.G;x++){Q.Y(M[x])}C Q};z.c1=B(o){if(!o){C o}if(z.2l(o)){A r=[];R(A i=0;i<o.G;++i){r.Y(z.c1(o[i]))}C r}I{if(z.ib(o)){if(o.2t&&o.a7){C o.a7(K)}I{A r=S o.1P();R(A i in o){if(!(i in r)||r[i]!=o[i]){r[i]=z.c1(o[i])}}C r}}}C o};z.7g=B(2H){C 2H.2f(/^\\s\\s*/,"").2f(/\\s\\s*$/,"")}}if(!z.1h["z.X.2r"]){z.1h["z.X.2r"]=K;z.1Q("z.X.2r");z.2r=B(6l,4p,3j){if(z.1Y(3j)||(P.G>3)){z.ia("z.2r: R 9P \'"+6l+"\' py pw B as \'1P\' pv pu of as a pt i3.","","1.0");A c=3j;3j=P[3]||{};3j.1P=c}A dd=P.2O,4V=L;if(z.2l(4p)){4V=4p;4p=4V.3a()}if(4V){R(A i=0,m;i<4V.G;i++){m=4V[i];if(!m){2m("ps #"+i+" 4F pr of "+6l+" is L. pq\'s pp a po pl is 3O 6m.")}4p=dd.6j(4p,m)}}A i9=(3j||0).1P,6k=dd.6j(4p),fn;R(A i in 3j){if(z.1Y(fn=3j[i])&&(!0[i])){fn.i4=i}}z.4M(6k,{4o:6l,bY:i9,bZ:L},3j||0);6k.1C.1P=6k;C z.88(6l,6k)};z.1x(z.2r,{6j:B(c0,i8){A bp=(c0||0).1C,mp=(i8||0).1C;A 2S=z.2r.i7();z.1x(2S,{84:bp,1x:mp});if(c0){2S.1C=z.6j(bp)}z.4M(2S,z.2r.i6,mp||0,{bY:L});2S.1C.1P=2S;2S.1C.4o=(bp||0).4o+"pk"+(mp||0).4o;z.88(2S.1C.4o,2S);C 2S},i7:B(){C B(){D.i5(P)}},i6:{i5:B(86){A c=86.2O,s=c.84,ct=s&&s.1P,m=c.1x,87=m&&m.1P,a=86,ii,fn;if(a[0]){if((fn=a[0]["bZ"])){a=fn.14(D,a)||a}}if(fn=c.1C.bZ){a=fn.14(D,a)||a}if(ct&&ct.14){ct.14(D,a)}if(87&&87.14){87.14(D,a)}if(ii=c.1C.bY){ii.14(D,86)}},bX:B(85){A c=D.1P,p,m;1s(c){p=c.84;m=c.1x;if(m==85||(m 1N 85.1P)){C p}if(m&&(m=m.bX(85))){C m}c=p&&p.1P}},6h:B(83,82,bW,6i){A p=bW,c,m,f;do{c=p.1P;m=c.1x;if(m&&(m=D.6h(83,82,m,6i))){C m}if((f=p[83])&&(6i==(f==82))){C p}p=c.84}1s(p);C!6i&&(p=D.bX(bW))&&D.6h(83,82,p,6i)},bU:B(2R,4U,bV){A a=P;if(!z.1R(a[0])){bV=4U;4U=2R;2R=4U.2O.i4}A c=4U.2O,p=D.1P.1C,a=bV||4U,fn,mp;if(D[2R]!=c||p[2R]==c){mp=D.6h(2R,c,p,K);if(!mp){2m(D.4o+": 1p i3 (\\""+2R+"\\") 4F bU pj 1f 2O (2r.js)")}p=D.6h(2R,c,mp,U)}fn=p&&p[2R];if(!fn){1z.1K(mp.4o+": no bU \\""+2R+"\\" ph pg (2r.js)");C}C fn.14(D,a)}}})}if(!z.1h["z.X.2c"]){z.1h["z.X.2c"]=K;z.1Q("z.X.2c");z.3i={i2:B(){C B(){A ap=4e.1C,c=P.2O,ls=c.2b,t=c.5V;A r=t&&t.14(D,P);R(A i in ls){if(!(i in ap)){ls[i].14(D,P)}}C r}},2P:B(6g,bT,i1){6g=6g||z.1W;A f=6g[bT];if(!f||!f.2b){A d=z.3i.i2();d.5V=f;d.2b=[];f=6g[bT]=d}C f.2b.Y(i1)},3J:B(i0,hZ,bS){A f=(i0||z.1W)[hZ];if(f&&f.2b&&bS--){63 f.2b[bS]}}};z.2c=B(M,pd,pc,pa,p9){A a=P,F=[],i=0;F.Y(z.1R(a[0])?L:a[i++],a[i++]);A a1=a[i+1];F.Y(z.1R(a1)||z.1Y(a1)?a[i++]:L,a[i++]);R(A l=a.G;i<l;i++){F.Y(a[i])}C z.by.14(D,F)};z.by=B(M,bR,hY,hX){A l=z.3i,h=l.2P(M,bR,z.2p(hY,hX));C[M,bR,h,l]};z.p8=B(6f){if(6f&&6f[0]!==1k){z.bv.14(D,6f);63 6f[0]}};z.bv=B(M,hV,hU,hW){hW.3J(M,hV,hU)};z.80={};z.p7=B(bQ,hT,hS){C[bQ,z.3i.2P(z.80,bQ,z.2p(hT,hS))]};z.p6=B(81){if(81){z.3i.3J(z.80,81[0],81[1])}};z.hQ=B(hR,F){A f=z.80[hR];(f)&&(f.14(D,F||[]))};z.p5=B(hP,M,bP){A pf=B(){z.hQ(hP,P)};C(bP)?z.2c(M,bP,pf):z.2c(M,pf)}}if(!z.1h["z.X.30"]){z.1h["z.X.30"]=K;z.1Q("z.X.30");z.30=B(hO){D.bM=[];D.id=D.hN();D.2y=-1;D.3M=0;D.4R=[L,L];D.bO=hO;D.7Z=U};z.4M(z.30,{hN:(B(){A n=1;C B(){C n++}})(),4C:B(){if(D.2y==-1){if(D.bO){D.bO(D)}I{D.7Z=K}if(D.2y==-1){A 1G=S 1O("30 p4");1G.dY="4C";D.5i(1G)}}I{if((D.2y==0)&&(D.4R[0]1N z.30)){D.4R[0].4C()}}},7V:B(1v){D.2y=((1v 1N 1O)?1:0);D.4R[D.2y]=1v;D.7U()},bN:B(){if(D.2y!=-1){if(!D.7Z){2m S 1O("p3 p2!")}D.7Z=U;C}},dM:B(1v){D.bN();D.7V(1v)},5i:B(1v){D.bN();if(!(1v 1N 1O)){1v=S 1O(1v)}D.7V(1v)},9e:B(cb,4T){A 6e=z.2p(cb,4T);if(P.G>2){6e=z.7X(6e,P,2)}C D.5k(6e,6e)},ef:B(cb,4T){A 7Y=z.2p(cb,4T);if(P.G>2){7Y=z.7X(7Y,P,2)}C D.5k(7Y,L)},ed:B(cb,4T){A 7W=z.2p(cb,4T);if(P.G>2){7W=z.7X(7W,P,2)}C D.5k(L,7W)},5k:B(cb,eb){D.bM.Y([cb,eb]);if(D.2y>=0){D.7U()}C D},7U:B(){A bL=D.bM;A 4n=D.2y;A 1v=D.4R[4n];A 4S=D;A cb=L;1s((bL.G>0)&&(D.3M==0)){A f=bL.3a()[4n];if(!f){6c}1u{1v=f(1v);4n=((1v 1N 1O)?1:0);if(1v 1N z.30){cb=B(1v){4S.7V(1v);4S.3M--;if((4S.3M==0)&&(4S.2y>=0)){4S.7U()}};D.3M++}}1y(1G){1z.1K(1G);4n=1;1v=1G}}D.2y=4n;D.4R[4n]=1v;if((cb)&&(D.3M)){1v.9e(cb)}}})}if(!z.1h["z.X.2e"]){z.1h["z.X.2e"]=K;z.1Q("z.X.2e");z.5m=B(2e){1u{C 3u("("+2e+")")}1y(e){1z.1K(e);C 2e}};z.bK=B(2H){C("\\""+2H.2f(/(["\\\\])/g,"\\\\$1")+"\\"").2f(/[\\f]/g,"\\\\f").2f(/[\\b]/g,"\\\\b").2f(/[\\n]/g,"\\\\n").2f(/[\\t]/g,"\\\\t").2f(/[\\r]/g,"\\\\r")};z.hM="\\t";z.eq=B(it,4l,4P){4P=4P||"";A 4k=(4l?4P+z.hM:"");A 6b=(4l?"\\n":"");A 4Q=V(it);if(4Q=="1k"){C"1k"}I{if((4Q=="4J")||(4Q=="p1")){C it+""}I{if(it===L){C"L"}}}if(4Q=="3c"){C z.bK(it)}A 6d=P.2O;A 4m;if(V it.hL=="B"){4m=it.hL();if(it!==4m){C 6d(4m,4l,4k)}}if(V it.2e=="B"){4m=it.2e();if(it!==4m){C 6d(4m,4l,4k)}}if(z.2l(it)){A 1v=[];R(A i=0;i<it.G;i++){A 1U=6d(it[i],4l,4k);if(V(1U)!="3c"){1U="1k"}1v.Y(6b+4k+1U)}C"["+1v.22(", ")+6b+4P+"]"}if(4Q=="B"){C L}A bJ=[];R(A 1i in it){A 7T;if(V(1i)=="4J"){7T="\\""+1i+"\\""}I{if(V(1i)=="3c"){7T=z.bK(1i)}I{6c}}1U=6d(it[1i],4l,4k);if(V(1U)!="3c"){6c}bJ.Y(6b+4k+7T+": "+1U)}C"{"+bJ.22(", ")+6b+4P+"}"}}if(!z.1h["z.X.6a"]){z.1h["z.X.6a"]=K;z.1Q("z.X.6a");(B(){A 69=B(Q,M,cb){C[(z.1R(Q)?Q.1A(""):Q),(M||z.1W),(z.1R(cb)?(S bI("1m","hK","6a",cb)):cb)]};z.1x(z,{T:B(bH,hH,hI,hJ){A i=0,2q=1,1d=bH.G;if(hJ){i=1d-1;2q=1d=-1}R(i=hI||i;i!=1d;i+=2q){if(bH[i]==hH){C i}}C-1},31:B(hG,hF,hE){C z.T(hG,hF,hE,K)},1n:B(Q,hD,M){if(!Q||!Q.G){C}A 1I=69(Q,M,hD);Q=1I[0];R(A i=0,l=1I[0].G;i<l;i++){1I[2].2d(1I[1],Q[i],i,Q)}},bE:B(bF,Q,hC,M){A 1I=69(Q,M,hC);Q=1I[0];R(A i=0,l=Q.G;i<l;i++){A bG=!!1I[2].2d(1I[1],Q[i],i,Q);if(bF^bG){C bG}}C bF},ah:B(Q,hB,hA){C D.bE(K,Q,hB,hA)},ag:B(Q,hz,hy){C D.bE(U,Q,hz,hy)},23:B(Q,7t,M){A 1I=69(Q,M,7t);Q=1I[0];A bD=((P[3])?(S P[3]()):[]);R(A i=0;i<Q.G;++i){bD.Y(1I[2].2d(1I[1],Q[i],i,Q))}C bD},3T:B(Q,hx,M){A 1I=69(Q,M,hx);Q=1I[0];A bC=[];R(A i=0;i<Q.G;i++){if(1I[2].2d(1I[1],Q[i],i,Q)){bC.Y(Q[i])}}C bC}})})()}if(!z.1h["z.X.1J"]){z.1h["z.X.1J"]=K;z.1Q("z.X.1J");z.1J=B(bB){if(bB){D.hw(bB)}};z.1J.hp={p0:[0,0,0],oZ:[60,60,60],oY:[2j,2j,2j],oX:[1T,1T,1T],oW:[2j,0,0],oV:[1T,0,0],oU:[2j,0,2j],oT:[1T,0,1T],oS:[0,2j,0],oR:[0,1T,0],oQ:[2j,2j,0],oP:[1T,1T,0],oO:[0,0,2j],oN:[0,0,1T],oM:[0,2j,2j],oL:[0,1T,1T]};z.4M(z.1J,{r:1T,g:1T,b:1T,a:1,bz:B(r,g,b,a){A t=D;t.r=r;t.g=g;t.b=b;t.a=a},hw:B(2Q){A d=z;if(d.1R(2Q)){d.hq(2Q,D)}I{if(d.2l(2Q)){d.7P(2Q,D)}I{D.bz(2Q.r,2Q.g,2Q.b,2Q.a);if(!(2Q 1N d.1J)){D.7Q()}}}C D},7Q:B(){C D},oK:B(){A t=D;C[t.r,t.g,t.b]},oJ:B(){A t=D;C[t.r,t.g,t.b,t.a]},oI:B(){A Q=z.23(["r","g","b"],B(x){A s=D[x].2i(16);C s.G<2?"0"+s:s},D);C"#"+Q.22("")},8F:B(hv){A t=D,7S=t.r+", "+t.g+", "+t.b;C(hv?"hs("+7S+", "+t.a:"7S("+7S)+")"},2i:B(){C D.8F(K)}});z.d8=B(bA,1d,hu,M){A d=z,t=M||S z.1J();d.1n(["r","g","b","a"],B(x){t[x]=bA[x]+(1d[x]-bA[x])*hu;if(x!="a"){t[x]=2Y.oH(t[x])}});C t.7Q()};z.ho=B(ht,M){A m=ht.1M().1f(/^hs?\\(([\\s\\.,0-9]+)\\)/);C m&&z.7P(m[1].1A(/\\s*,\\s*/),M)};z.hn=B(4j,M){A d=z,t=M||S d.1J(),7R=(4j.G==4)?4:8,hr=(1<<7R)-1;4j=2V("oG"+4j.3b(1));if(2L(4j)){C L}d.1n(["b","g","r"],B(x){A c=4j&hr;4j>>=7R;t[x]=7R==4?17*c:c});t.a=1;C t};z.7P=B(a,M){A t=M||S z.1J();t.bz(2V(a[0]),2V(a[1]),2V(a[2]),2V(a[3]));if(2L(t.a)){t.a=1}C t.7Q()};z.hq=B(2H,M){A a=z.1J.hp[2H];C a&&z.7P(a,M)||z.ho(2H,M)||z.hn(2H,M)}}if(!z.1h["z.X"]){z.1h["z.X"]=K;z.1Q("z.X")}if(!z.1h["z.X.5Z"]){z.1h["z.X.5Z"]=K;z.1Q("z.X.5Z");(B(){A 1j=z.b2={2P:B(E,68,fp){if(!E){C}68=1j.4O(68);fp=1j.7G(68,fp);E.66(68,fp,U);C fp},3J:B(E,hm,hl){(E)&&(E.oF(1j.4O(hm),hl,U))},4O:B(1p){C(1p.2w(0,2)=="on"?1p.2w(2):1p)},7G:B(1p,fp){C(1p!="4b"?fp:B(e){C fp.2d(D,1j.4i(e,D))})},4i:B(H,oE){4w(H.Z){2X"4b":1j.7K(H);3f}C H},7K:B(H){H.oD=(H.3h?67.oC(H.3h):"")}};z.oB=B(H,hk){C 1j.4i(H,hk)};z.gY=B(H){H.7J();H.7I()};A 7O=z.3i;z.by=B(M,bx,hh,hg,hi){A hj=M&&(M.2t||M.oA||M.66);A bw=!hj?0:(!hi?1:2),l=[z.3i,1j,7O][bw];A h=l.2P(M,bx,z.2p(hh,hg));C[M,bx,h,bw]};z.bv=B(M,he,hd,hf){([z.3i,1j,7O][hf]).3J(M,he,hd)};z.5W={oz:8,gV:9,oy:12,ox:13,ow:16,ov:17,ou:18,gG:19,ot:20,os:27,or:32,b5:33,b4:34,gE:35,gF:36,b7:37,b9:38,b6:39,b8:40,gD:45,8S:46,oq:47,oo:91,om:92,ol:93,oj:96,oi:97,oh:98,og:99,oe:6D,od:oc,ob:oa,o9:o8,o7:o6,o5:o4,o3:bi,o2:o1,o0:nZ,nY:nX,nW:nV,nU:bk,gS:nT,gR:nS,gQ:nR,gP:nQ,gO:nP,gN:nO,gM:nN,gL:nM,gK:nL,gJ:nK,gI:nJ,gH:nI,nH:nG,nF:nE,nD:nC,gB:nB,gC:nA};if(z.1l){bf=B(e,5h){1u{C(e.3I=5h)}1y(e){C 0}};A 61=z.3i;if(!1o.nz){7O=61=z.gy={b3:[],2P:B(64,bu,hc){64=64||z.1W;A f=64[bu];if(!f||!f.2b){A d=z.gz();d.5V=f&&(7M.Y(f)-1);d.2b=[];f=64[bu]=d}C f.2b.Y(7M.Y(hc)-1)},3J:B(hb,ha,7N){A f=(hb||z.1W)[ha],l=f&&f.2b;if(f&&l&&7N--){63 7M[l[7N]];63 l[7N]}}};A 7M=61.b3}z.1x(1j,{2P:B(E,62,fp){if(!E){C}62=1j.4O(62);if(62=="h3"){A kd=E.bs;if(!kd||!kd.2b||!kd.h9){1j.2P(E,"bs",1j.h4);E.bs.h9=K}}C 61.2P(E,62,1j.7G(fp))},3J:B(E,h8,h7){61.3J(E,1j.4O(h8),h7)},4O:B(7L){C(7L.2w(0,2)!="on"?"on"+7L:7L)},ny:B(){},4i:B(H,4N){if(!H){A w=(4N)&&((4N.aD||4N.1q||4N).nx)||26;H=w.5Z}if(!H){C(H)}H.5V=H.br;H.bh=(4N||H.br);H.nw=H.nv;H.nu=H.nr;A bq=H.br,1e=(bq&&bq.aD)||1q;A bn=((z.1l<6)||(1e["aX"]=="aW"))?1e.3E:1e.5K;A bm=z.aB();H.nq=H.np+z.aH(bn.5I||0)-bm.x;H.nn=H.nm+(bn.5G||0)-bm.y;if(H.Z=="fk"){H.h6=H.nl}if(H.Z=="fj"){H.h6=H.nk}H.7I=1j.bc;H.7J=1j.ba;C 1j.h5(H)},h5:B(H){4w(H.Z){2X"4b":A c=("3h"in H?H.3h:H.3I);if(c==10){c=0;H.3I=13}I{if(c==13||c==27){c=0}I{if(c==3){c=99}}}H.3h=c;1j.7K(H);3f}C H},gZ:{bi:42,bk:47,h2:59,nj:43,ni:44,nh:45,ng:46,nf:47,60:96,h1:91,nb:92,na:93,h0:39},h4:B(H){A kp=H.bh.h3;if(!kp||!kp.2b){C}A k=H.3I;A bj=(k!=13)&&(k!=32)&&(k!=27)&&(k<48||k>90)&&(k<96||k>bk)&&(k<h2||k>60)&&(k<h1||k>h0);if(bj||H.5Y){A c=(bj?0:k);if(H.5Y){if(k==3||k==13){C}I{if(c>95&&c<bi){c-=48}I{if((!H.5X)&&(c>=65&&c<=90)){c+=32}I{c=1j.gZ[c]||c}}}}A 2x=1j.7H(H,{Z:"4b",2x:K,3h:c});kp.2d(H.bh,2x);H.bg=2x.bg;H.bd=2x.bd;bf(H,2x.3I)}},bc:B(){D.bg=K},ba:B(){D.n9=D.3I;if(D.5Y){bf(D,0)}D.bd=U}});z.gY=B(H){H=H||26.5Z;1j.bc.2d(H);1j.ba.2d(H)}}1j.7H=B(H,gX){A 2x=z.1x({},H,gX);1j.7K(2x);2x.7J=B(){H.7J()};2x.7I=B(){H.7I()};C 2x};if(z.2M){z.1x(1j,{4i:B(H,n8){4w(H.Z){2X"4b":A c=H.n7;if(c==3){c=99}c=((c<41)&&(!H.5X)?0:c);if((H.5Y)&&(!H.5X)&&(c>=65)&&(c<=90)){c+=32}C 1j.7H(H,{3h:c})}C H}})}if(z.3o){z.1x(1j,{4i:B(H,n6){4w(H.Z){2X"4b":A c=H.3h,s=H.5X,k=H.3I;k=k||gA[H.gW]||0;if(H.gW=="n5"){c=0}I{if((H.5Y)&&(c>0)&&(c<27)){c+=96}I{if(c==z.5W.gU){c=z.5W.gV;s=K}I{c=(c>=32&&c<gT?c:0)}}}C 1j.7H(H,{3h:c,5X:s,3I:k})}C H}});z.1x(z.5W,{gU:25,b9:gT,b8:n4,b7:n3,b6:n2,gS:n1,gR:n0,gQ:mZ,gP:mY,gO:mX,gN:mW,gM:mV,gL:mU,gK:mT,gJ:mS,gI:mR,gH:mQ,gG:mP,8S:mO,gF:mN,gE:mM,b5:mL,b4:mK,gD:mJ,mI:mH,gC:mG,gB:mF});A dk=z.5W,gA={"mE":dk.b9,"mD":dk.b8,"mC":dk.b7,"mB":dk.b6,"mA":dk.b5,"mz":dk.b4}}})();if(z.1l){z.gz=B(){C B(){A ap=4e.1C,h=z.gy.b3,c=P.2O,ls=c.2b,t=h[c.5V];A r=t&&t.14(D,P);R(A i in ls){if(!(i in ap)){h[ls[i]].14(D,P)}}C r}};z.b2.7G=B(fp){A f=z.b2.4i;C B(e){C fp.2d(D,f(e,D))}}}}if(!z.1h["z.X.b1"]){z.1h["z.X.b1"]=K;z.1Q("z.X.b1");1u{1q.my("mx",U,K)}1y(e){}if(z.1l||z.2M){z.1D=B(id,1e){if(z.1R(id)){A b0=(1e||z.1e);A 11=b0.gv(id);if((11)&&(11.gw.id.1Z==id)){C 11}I{A 5U=b0.gx[id];if(!5U){C}if(!5U.G){C 5U}A i=0;1s(11=5U[i++]){if(11.gw.id.1Z==id){C 11}}}}I{C id}}}I{z.1D=B(id,1e){if(z.1R(id)){C(1e||z.1e).gv(id)}I{C id}}}(B(){A 5T=L;z.mw=B(E){E=z.1D(E);1u{if(!5T){5T=1q.a9("mv")}5T.4c(E.1L?E.1L.fs(E):E);5T.9L=""}1y(e){}};z.mu=B(E,7F){1u{E=z.1D(E);7F=z.1D(7F);1s(E){if(E===7F){C K}E=E.1L}}1y(e){}C U};z.mt=B(E,5S){E=z.1D(E);if(z.gu){E.1c.ms=(5S)?"dg":"7C"}I{if(z.6B){E.1c.mr=(5S)?"8K":"7C"}I{if(z.1l){E.gs=(5S)?"":"on";z.1r("*",E).1n(B(gt){gt.gs=(5S)?"":"on"})}}}};A 5R=B(E,4h){4h.1L.mq(E,4h);C K};A aZ=B(E,4h){A pn=4h.1L;if(4h==pn.fm){pn.4c(E)}I{C 5R(E,4h.71)}C K};z.5E=B(E,2a,3H){if((!E)||(!2a)||(V 3H=="1k")){C U}E=z.1D(E);2a=z.1D(2a);if(V 3H=="4J"){A cn=2a.3W;if(((3H==0)&&(cn.G==0))||(cn.G==3H)){2a.4c(E);C K}if(3H==0){C 5R(E,2a.5A)}C aZ(E,cn[3H-1])}4w(3H.1M()){2X"mo":C 5R(E,2a);2X"a8":C aZ(E,2a);2X"9M":if(2a.5A){C 5R(E,2a.5A)}I{2a.4c(E);C K}3f;aY:2a.4c(E);C K}};z.aP="5g-3G";if(z.1l){A aV=1q.aX;z.aP=(aV=="aW")||(aV=="gr")||(z.1l<6)?"g5-3G":"5g-3G"}A 1E,dv=1q.mn;if(z.3o){1E=B(E){A s=dv.3F(E,L);if(!s&&E.1c){E.1c.gq="";s=dv.3F(E,L)}C s||{}}}I{if(z.1l){1E=B(E){C E.gn}}I{1E=B(E){C dv.3F(E,L)}}}z.3F=1E;if(!z.1l){z.4g=B(mm,gp){C 2k(gp)||0}}I{z.4g=B(go,2N){if(!2N){C 0}if(2N=="ml"){C 4}if(2N.2w&&(2N.2w(-2)=="px")){C 2k(2N)}4G(go){A gm=1c.2g;A gl=aU.2g;aU.2g=gn.2g;1u{1c.2g=2N;2N=1c.mk}1y(e){2N=0}1c.2g=gm;aU.2g=gl}C 2N}}z.ge=(z.1l?B(E){1u{C(E.mj.mi.2W/6D)}1y(e){C 1}}:B(E){C z.3F(E).2W});z.gf=(z.1l?B(E,7D){if(7D==1){E.1c.7E=E.1c.7E.2f(/gk:[^;]*;/i,"");if(E.gj.1M()=="gi"){z.1r("> gh",E).1n(B(i){i.1c.7E=i.1c.7E.2f(/gk:[^;]*;/i,"")})}}I{A o="mh(mg="+(7D*6D)+")";E.1c.3T=o}if(E.gj.1M()=="gi"){z.1r("> gh",E).1n(B(i){i.1c.3T=o})}C 7D}:B(E,gg){C E.1c.2W=gg});A 5Q={3n:K,58:K,2g:K,5J:K};A gd=B(E,Z,5P){Z=Z.1M();if(5Q[Z]===K){C z.4g(E,5P)}I{if(5Q[Z]===U){C 5P}I{if((Z.T("mf")>=0)||(Z.T("md")>=0)||(Z.T("3n")>=0)||(Z.T("58")>=0)||(Z.T("5q")>=0)||(Z.T("mc")>=0)||(Z.T("ma")>=0)){5Q[Z]=K;C z.4g(E,5P)}I{5Q[Z]=U;C 5P}}}};z.1c=B(E,5O,aT){A n=z.1D(E),F=P.G,op=(5O=="2W");if(F==3){C op?z.gf(n,aT):n.1c[5O]=aT}if(F==2&&op){C z.ge(n)}A s=z.3F(n);C(F==1)?s:gd(n,5O,s[5O])};z.7A=B(n,gc){A s=gc||1E(n),px=z.4g,l=px(n,s.m9),t=px(n,s.m8);C{l:l,t:t,w:l+px(n,s.m7),h:t+px(n,s.m6)}};z.5N=B(n,gb){A ne="7C",px=z.4g,s=gb||1E(n),bl=(s.m5!=ne?px(n,s.m4):0),bt=(s.m3!=ne?px(n,s.m2):0);C{l:bl,t:bt,w:bl+(s.m1!=ne?px(n,s.m0):0),h:bt+(s.lZ!=ne?px(n,s.lY):0)}};z.aN=B(n,ga){A s=ga||1E(n),p=z.7A(n,s),b=z.5N(n,s);C{l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h}};z.aM=B(n,g9){A s=g9||1E(n),px=z.4g,l=px(n,s.lX),t=px(n,s.lW),r=px(n,s.lV),b=px(n,s.lU);if(z.3o&&(s.ax!="fU")){r=l}C{l:l,t:t,w:l+r,h:t+b}};z.au=B(E,g8){A s=g8||1E(E),me=z.aM(E,s);A l=E.fT-me.l,t=E.fS-me.t;if(z.7B){A aS=2k(s.2g),aR=2k(s.5J);if(!2L(aS)&&!2L(aR)){l=aS,t=aR}I{A p=E.1L;if(p&&p.1c){A aQ=1E(p);if(aQ.lT!="lS"){A be=z.5N(p,aQ);l+=be.l,t+=be.t}}}}I{if(z.2M){A p=E.1L;if(p){A be=z.5N(p);l-=be.l,t-=be.t}}}C{l:l,t:t,w:E.6v+me.w,h:E.8D+me.h}};z.aK=B(E,g7){A s=g7||1E(E),pe=z.7A(E,s),be=z.5N(E,s),w=E.aF,h;if(!w){w=E.6v,h=E.8D}I{h=E.lR,be.w=be.h=0}if(z.2M){pe.l+=be.l;pe.t+=be.t}C{l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h}};z.lQ=B(E,g6){A s=g6||1E(E),pe=z.7A(E,s),cb=z.aK(E,s);C{l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h}};z.aL=B(E,l,t,w,h,u){u=u||"px";4G(E.1c){if(!2L(l)){2g=l+u}if(!2L(t)){5J=t+u}if(w>=0){3n=w+u}if(h>=0){58=h+u}}};z.aO=B(E){A n=E.5w;C(z.aP=="g5-3G")||(n=="lP")||(n=="lO")};z.fX=B(E,7z,7y,g4){A bb=z.aO(E);if(bb){A pb=z.aN(E,g4);if(7z>=0){7z+=pb.w}if(7y>=0){7y+=pb.h}}z.aL(E,g3,g3,7z,7y)};z.fY=B(E,g1,g0,5M,5L,g2){A s=g2||z.3F(E);A bb=z.aO(E),pb=bb?fZ:z.aN(E,s),mb=z.aM(E,s);if(5M>=0){5M=2Y.5q(5M-pb.w-mb.w,0)}if(5L>=0){5L=2Y.5q(5L-pb.h-mb.h,0)}z.aL(E,g1,g0,5M,5L)};A fZ={l:0,t:0,w:0,h:0};z.lN=B(E,3G){A n=z.1D(E),s=1E(n),b=3G;C!b?z.au(n,s):z.fY(n,b.l,b.t,b.w,b.h,s)};z.lM=B(E,3G){A n=z.1D(E),s=1E(n),b=3G;C!b?z.aK(n,s):z.fX(n,b.w,b.h,s)};A 5H=B(E,1a){if(!(E=(E||0).1L)){C 0}A 1U,aJ=0,2h=z.3E();1s(E&&E.1c){if(1E(E).ax=="lL"){C 0}1U=E[1a];if(1U){aJ+=1U-0;if(E==2h){3f}}E=E.1L}C aJ};z.fQ=B(){A 2h=z.3E();A 3g=z.1W;A de=z.1e.5K;C{y:(3g.lK||de.5G||2h.5G||0),x:(3g.lJ||z.aH(de.5I)||2h.5I||0)}};z.aG=B(){C V z.aI=="1k"?(z.aI=z.3F(z.3E()).lI=="lH"):z.aI};z.aB=B(){A de=z.1e.5K;if(z.1l>=7){C{x:de.aC().2g,y:de.aC().5J}}I{C{x:z.aG()||26.am==26?de.fW:de.6v-de.aF-de.fW,y:de.lG}}};z.aH=B(aE){if(z.1l&&!z.aG()){A de=z.1e.5K;C aE+de.aF-de.lF}C aE};z.fP=B(E,aw){A ay=E.aD;A J={x:0,y:0};A 7w=U;A db=z.3E();if(z.1l){A aA=E.aC();A az=z.aB();J.x=aA.2g-az.x;J.y=aA.5J-az.y}I{if(ay["fV"]){A bo=ay.fV(E);J.x=bo.x-5H(E,"5I");J.y=bo.y-5H(E,"5G")}I{if(E["fR"]){7w=K;A 7x;if(z.3o&&(1E(E).ax=="fU")&&(E.1L==db)){7x=db}I{7x=db.1L}if(E.1L!=db){A nd=E;if(z.2M){nd=db}J.x-=5H(nd,"5I");J.y-=5H(nd,"5G")}A 4f=E;do{A n=4f["fT"];if(!z.2M||n>0){J.x+=2L(n)?0:n}A m=4f["fS"];J.y+=2L(m)?0:m;4f=4f.fR}1s((4f!=7x)&&4f)}I{if(E["x"]&&E["y"]){J.x+=2L(E.x)?0:E.x;J.y+=2L(E.y)?0:E.y}}}}if(7w||aw){A av=z.fQ();A m=7w?(!aw?-1:0):1;J.y+=m*av.y;J.x+=m*av.x}C J};z.af=B(E,fO){A n=z.1D(E),s=1E(n),mb=z.au(n,s);A at=z.fP(n,fO);mb.x=at.x;mb.y=at.y;C mb}})();z.fL=B(E,fN){C((" "+E.3A+" ").T(" "+fN+" ")>=0)};z.7s=B(E,ar){A 7v=E.3A;if((" "+7v+" ").T(" "+ar+" ")<0){E.3A=7v+(7v?" ":"")+ar}};z.7r=B(E,fM){A t=z.7g((" "+E.3A+" ").2f(" "+fM+" "," "));if(E.3A!=t){E.3A=t}};z.lE=B(E,aq,7u){if(V 7u=="1k"){7u=!z.fL(E,aq)}z[7u?"7s":"7r"](E,aq)}}if(!z.1h["z.X.1H"]){z.1h["z.X.1H"]=K;z.1Q("z.X.1H");(B(){A d=z;z.1H=B(){A F=P;if((F.G==1)&&(V F[0]=="4J")){D.G=eK(F[0])}I{if(F.G){d.1n(F,B(i){D.Y(i)},D)}}};z.1H.1C=S 4e;if(d.1l){A fK=B(al){C("A a2 = am."+al+"; "+"A ap = 4e.1C; "+"A ao = a2.1C; "+"R(A x in ao){ ap[x] = ao[x]; } "+"am."+al+" = 4e; ")};A fI=fK("z.1H");A aj=26.lD();aj.1q.fJ("<ak>"+fI+"</ak>");aj.lC(1,1,1,1)}z.4M(z.1H,{T:B(fH,fG){C d.T(D,fH,fG)},31:B(lB,lA){A aa=d.4d(P);aa.ae(D);C d.31.14(d,aa)},ah:B(fF,fE){C d.ah(D,fF,fE)},ag:B(fD,fC){C d.ag(D,fD,fC)},1n:B(fB,fA){d.1n(D,fB,fA);C D},23:B(7t,M){C d.23(D,7t,M,d.1H)},af:B(){C d.23(D,d.af)},1c:B(lz,ly){A aa=d.4d(P);aa.ae(D[0]);A s=d.1c.14(d,aa);C(P.G>1)?D:s},lx:B(lw,lv){A aa=d.4d(P);aa.ae(L);A s=D.23(B(i){aa[0]=i;C d.1c.14(d,aa)});C(P.G>1)?D:s},7s:B(fz){C D.1n(B(i){z.7s(i,fz)})},7r:B(fy){C D.1n(B(i){z.7r(i,fy)})},5E:B(fw,7q){A 1m=d.1r(fw)[0];7q=7q||"72";R(A x=0;x<D.G;x++){d.5E(D[x],1m,7q)}C D},2c:B(fv,fu,ft){D.1n(B(1m){d.2c(1m,fv,fu,ft)});C D},lu:B(ad){A ac=(ad)?d.9t(D,ad):D;ac.1n(B(1m){if(1m["1L"]){1m.1L.fs(1m)}});C ac},lt:B(fr,fq){A 1m=D[0];C d.1r(fr).1n(B(ai){d.5E(ai,1m,(fq||"72"))})},1r:B(7p){7p=7p||"";A J=S d.1H();D.1n(B(1m){d.1r(7p,1m).1n(B(ab){if(V ab!="1k"){J.Y(ab)}})});C J},3T:B(fo){A 5F=D;A 1V=P;A r=S d.1H();A rp=B(t){if(V t!="1k"){r.Y(t)}};if(d.1R(fo)){5F=d.9t(D,1V[0]);if(1V.G==1){C 5F}d.1n(d.3T(5F,1V[1],1V[2]),rp);C r}d.1n(d.3T(5F,1V[0],1V[1]),rp);C r},lr:B(7o,7n){A 1S=d.1e.a9("lq");if(d.1R(7o)){1S.9L=7o}I{1S.4c(7o)}A ct=((7n=="9M")||(7n=="a8"))?"fm":"5A";D.1n(B(1m){A 24=1S.a7(K);1s(24[ct]){d.5E(24[ct],1m,7n)}});C D},7m:B(fl,F){A a5=[];F=F||{};D.1n(B(1m){A a6={E:1m};d.1x(a6,F);a5.Y(d[fl](a6))});C d.fx.lp(a5)},8I:B(F){C D.7m("8I",F)},8H:B(F){C D.7m("8H",F)},6y:B(F){C D.7m("6y",F)}});z.1n(["fk","lo","fj","fi","ln","lm","ll","fi","lk","lj","4b"],B(H){A a4="on"+H;z.1H.1C[a4]=B(a,b){C D.2c(a4,a,b)}})})()}if(!z.1h["z.X.1r"]){z.1h["z.X.1r"]=K;z.1Q("z.X.1r");(B(){A d=z;A 2I=B(q){C[q.T("#"),q.T("."),q.T("["),q.T(":")]};A a0=B(a3,fh){A ql=a3.G;A i=2I(a3);A 1d=ql;R(A x=fh;x<i.G;x++){if(i[x]>=0){if(i[x]<1d){1d=i[x]}}}C(1d<0)?ql:1d};A 6X=B(7l){A i=2I(7l);if(i[0]!=-1){C 7l.21(i[0]+1,a0(7l,1))}I{C""}};A 5r=B(7k){A 5D;A i=2I(7k);if((i[0]==0)||(i[1]==0)){5D=0}I{5D=a0(7k,0)}C((5D>0)?7k.3b(0,5D).1M():"*")};A fg=B(Q){A J=-1;R(A x=0;x<Q.G;x++){A 1S=Q[x];if(1S>=0){if((1S>J)||(J==-1)){J=1S}}}C J};A 9H=B(7i){A i=2I(7i);if(-1==i[1]){C""}A di=i[1]+1;A 7j=fg(i.2w(2));if(di<7j){C 7i.21(di,7j)}I{if(-1==7j){C 7i.3b(di)}I{C""}}};A f3=[{1i:"|=",1f:B(15,fe){C"[5z(3U(\' \',@"+15+",\' \'), \' "+fe+"-\')]"}},{1i:"~=",1f:B(15,fd){C"[5z(3U(\' \',@"+15+",\' \'), \' "+fd+" \')]"}},{1i:"^=",1f:B(15,fb){C"[li-4G(@"+15+", \'"+fb+"\')]"}},{1i:"*=",1f:B(15,fa){C"[5z(@"+15+", \'"+fa+"\')]"}},{1i:"$=",1f:B(15,9Z){C"[21(@"+15+", 3c-G(@"+15+")-"+(9Z.G-1)+")=\'"+9Z+"\']"}},{1i:"!=",1f:B(15,f9){C"[3O(@"+15+"=\'"+f9+"\')]"}},{1i:"=",1f:B(15,f8){C"[@"+15+"=\'"+f8+"\']"}}];A 9C=B(9Y,3Z,f7,f6){A 49;A i=2I(3Z);if(i[2]>=0){A 4L=3Z.T("]",i[2]);A 29=3Z.21(i[2]+1,4L);1s(29&&29.G){if(29.2s(0)=="@"){29=29.2w(1)}49=L;R(A x=0;x<9Y.G;x++){A 1S=9Y[x];A 7h=29.T(1S.1i);if(7h>=0){A 15=29.21(0,7h);A 4a=29.21(7h+1S.1i.G);if((4a.2s(0)=="\\"")||(4a.2s(0)=="\'")){4a=4a.21(1,4a.G-1)}49=1S.1f(d.7g(15),d.7g(4a));3f}}if((!49)&&(29.G)){49=f7(29)}if(49){f6(49)}29=L;A 7f=3Z.T("[",4L);if(0<=7f){4L=3Z.T("]",7f);if(0<=4L){29=3Z.21(7f+1,4L)}}}}};A f0=B(f5){A 4K=".";A 7e=f5.1A(" ");1s(7e.G){A 2K=7e.3a();A 7d;if(2K==">"){7d="/";2K=7e.3a()}I{7d="//"}A f4=5r(2K);4K+=7d+f4;A id=6X(2K);if(id.G){4K+="[@id=\'"+id+"\'][1]"}A cn=9H(2K);if(cn.G){A 9X=" ";if(cn.2s(cn.G-1)=="*"){9X="";cn=cn.3b(0,cn.G-1)}4K+="[5z(3U(\' \',@9P,\' \'), \' "+cn+9X+"\')]"}9C(f3,2K,B(f2){C"[@"+f2+"]"},B(f1){4K+=f1})}C 4K};A 7a={};A eC=B(28){if(7a[28]){C 7a[28]}A 1e=d.1e;A 9W=f0(28);A 4H=B(9V){A J=[];A 7b;1u{7b=1e.9x(9W,9V,L,lh.lg,L)}1y(e){1z.1K("lf in le:",9W,"lc:",9V);1z.1K(e)}A 7c=7b.eZ();1s(7c){J.Y(7c);7c=7b.eZ()}C J};C 7a[28]=4H};A 5x={};A 9B={};A 3y=B(79,78){if(!79){C 78}if(!78){C 79}C B(){C 79.14(26,P)&&78.14(26,P)}};A 75=B(9U,3Y,5B,2J){A 2v=2J+1;A 76=(3Y.G==2v);A 2K=3Y[2J];if(2K==">"){A 77=9U.3W;if(!77.G){C}2v++;76=(3Y.G==2v);A 4H=6O(3Y[2J+1]);R(A x=0,11;x<77.G,11=77[x];x++){if(4H(11)){if(76){5B.Y(11)}I{75(11,3Y,5B,2v)}}}}A 5C=6U(2K)(9U);if(76){1s(5C.G){5B.Y(5C.3a())}}I{1s(5C.G){75(5C.3a(),3Y,5B,2v)}}};A eE=B(9T,eY){A J=[];A x=9T.G-1,11;1s(11=9T[x--]){75(11,eY,J,0)}C J};A 6O=B(3D){if(5x[3D]){C 5x[3D]}A ff=L;A 9S=5r(3D);if(9S!="*"){ff=3y(ff,B(N){C((N.2t==1)&&(9S==N.5w.1M()))})}A 9R=6X(3D);if(9R.G){ff=3y(ff,B(N){C((N.2t==1)&&(N.id==9R))})}if(2Y.5q.14(D,2I(3D).2w(1))>=0){ff=3y(ff,9z(3D))}C 5x[3D]=ff};A 5y=B(E){A pn=E.1L;A 9Q=pn.3W;A 2v=-1;A 3C=pn.5A;if(!3C){C 2v}A ci=E["eW"];A cl=pn["eX"];if(((V cl=="4J")&&(cl!=9Q.G))||(V ci!="4J")){pn["eX"]=9Q.G;A 2J=1;do{if(3C===E){2v=2J}if(3C.2t==1){3C["eW"]=2J;2J++}3C=3C.71}1s(3C)}I{2v=ci}C 2v};A lb=0;A 3X=B(N,15){A 74="";if(15=="9P"){C N.3A||74}if(15=="R"){C N.la||74}C N.5t(15,2)||74};A eH=[{1i:"|=",1f:B(15,9O){A eV=" "+9O+"-";C B(N){A ea=" "+(N.5t(15,2)||"");C((ea==9O)||(ea.T(eV)==0))}}},{1i:"^=",1f:B(15,eU){C B(N){C(3X(N,15).T(eU)==0)}}},{1i:"*=",1f:B(15,eT){C B(N){C(3X(N,15).T(eT)>=0)}}},{1i:"~=",1f:B(15,eS){A 9N=" "+eS+" ";C B(N){A ea=" "+3X(N,15)+" ";C(ea.T(9N)>=0)}}},{1i:"$=",1f:B(15,73){A 9N=" "+73;C B(N){A ea=" "+3X(N,15);C(ea.31(73)==(ea.G-73.G))}}},{1i:"!=",1f:B(15,eR){C B(N){C(3X(N,15)!=eR)}}},{1i:"=",1f:B(15,eQ){C B(N){C(3X(N,15)==eQ)}}}];A 9E=[{1i:"9M-9K",1f:B(1p,l9){C B(N){if(N.2t!=1){C U}A fc=N.eP;1s(fc&&(fc.2t!=1)){fc=fc.eP}C(!fc)}}},{1i:"72-9K",1f:B(1p,l8){C B(N){if(N.2t!=1){C U}A nc=N.71;1s(nc&&(nc.2t!=1)){nc=nc.71}C(!nc)}}},{1i:"l7",1f:B(1p,l6){C B(N){A cn=N.3W;A eO=N.3W.G;R(A x=eO-1;x>=0;x--){A nt=cn[x].2t;if((nt==1)||(nt==3)){C U}}C K}}},{1i:"5z",1f:B(1p,eN){C B(N){C(N.9L.T(eN)>=0)}}},{1i:"3O",1f:B(1p,eM){A eL=6O(eM);C B(N){C(!eL(N))}}},{1i:"l5-9K",1f:B(1p,2u){A pi=eK;if(2u=="l4"){C B(N){C(((5y(N))%2)==1)}}I{if((2u=="2n")||(2u=="l3")){C B(N){C((5y(N)%2)==0)}}I{if(2u.T("l2+")==0){A 70=pi(2u.3b(3));C B(N){C(N.1L.3W[70-1]===N)}}I{if((2u.T("n+")>0)&&(2u.G>3)){A 9J=2u.1A("n+",2);A eJ=pi(9J[0]);A 2J=pi(9J[1]);C B(N){C((5y(N)%eJ)==2J)}}I{if(2u.T("n")==-1){A 70=pi(2u);C B(N){C(5y(N)==70)}}}}}}}}];A 9z=B(3e){A 9I=(9B[3e]||5x[3e]);if(9I){C 9I}A ff=L;A i=2I(3e);if(i[0]>=0){A 24=5r(3e);if(24!="*"){ff=3y(ff,B(N){C(N.5w.1M()==24)})}}A 5u;A 3B=9H(3e);if(3B.G){A 9F=3B.2s(3B.G-1)=="*";if(9F){3B=3B.3b(0,3B.G-1)}A re=S 9G("(?:^|\\\\s)"+3B+(9F?".*":"")+"(?:\\\\s|$)");ff=3y(ff,B(N){C re.6Z(N.3A)})}if(i[3]>=0){A 3z=3e.3b(i[3]+1);A 9D="";A 5v=3z.T("(");A 6Y=3z.31(")");if((0<=5v)&&(0<=6Y)&&(6Y>5v)){9D=3z.21(5v+1,6Y);3z=3z.3b(0,5v)}5u=L;R(A x=0;x<9E.G;x++){A 1S=9E[x];if(1S.1i==3z){5u=1S.1f(3z,9D);3f}}if(5u){ff=3y(ff,5u)}}A eG=(d.1l)?B(5s){A eI=5s.1M();C B(N){C N[5s]||N[eI]}}:B(5s){C B(N){C(N&&N.5t&&N.l1(5s))}};9C(eH,3e,eG,B(eF){ff=3y(ff,eF)});if(!ff){ff=B(){C K}}C 9B[3e]=ff};A 6W={};A 6U=B(3d,1B){A 9A=6W[3d];if(9A){C 9A}A i=2I(3d);A id=6X(3d);if(i[0]==0){C 6W[3d]=B(1B){C[d.1D(id)]}}A 9y=9z(3d);A 5p;if(i[0]>=0){5p=B(1B){A 11=d.1D(id);if(9y(11)){C[11]}}}I{A 3V;A 24=5r(3d);if(2Y.5q.14(D,2I(3d))==-1){5p=B(1B){A J=[];A 11,x=0,3V=1B.4I(24);1s(11=3V[x++]){J.Y(11)}C J}}I{5p=B(1B){A J=[];A 11,x=0,3V=1B.4I(24);1s(11=3V[x++]){if(9y(11)){J.Y(11)}}C J}}}C 6W[3d]=5p};A l0={};A 5o={">":B(1B){A J=[];A 11,x=0,3V=1B.3W;1s(11=3V[x++]){if(11.2t==1){J.Y(11)}}C J}};A 9w=B(6V){if(0>6V.T(" ")){C 6U(6V)}A eD=B(1B){A 6S=6V.1A(" ");A 6T;if(6S[0]==">"){6T=[1B]}I{6T=6U(6S.3a())(1B)}C eE(6T,6S)};C eD};A 9v=((1q["9x"]&&!d.3o)?B(3x){A 6R=3x.1A(" ");if((1q["9x"])&&(3x.T(":")==-1)&&((K))){if(((6R.G>2)&&(3x.T(">")==-1))||(6R.G>3)||(3x.T("[")>=0)||((1==6R.G)&&(0<=3x.T(".")))){C eC(3x)}}C 9w(3x)}:9w);A ey=B(3w){if(5o[3w]){C 5o[3w]}if(0>3w.T(",")){C 5o[3w]=9v(3w)}I{A eB=3w.1A(/\\s*,\\s*/);A 4H=B(1B){A eA=0;A J=[];A 6Q;1s(6Q=eB[eA++]){J=J.3U(9v(6Q,6Q.T(" "))(1B))}C J};C 5o[3w]=4H}};A 5n=0;A ez=B(Q){A J=S d.1H();if(!Q){C J}if(Q[0]){J.Y(Q[0])}if(Q.G<2){C J}5n++;Q[0]["9u"]=5n;R(A x=1,11;11=Q[x];x++){if(Q[x]["9u"]!=5n){J.Y(11)}11["9u"]=5n}C J};d.1r=B(6P,1B){if(V 6P!="3c"){C S d.1H(6P)}if(V 1B=="3c"){1B=d.1D(1B)}C ez(ey(6P)(1B||d.1e))};d.9t=B(ex,9s){A 9r=S d.1H();A ff=(9s)?6O(9s):B(){C K};R(A x=0,11;11=ex[x];x++){if(ff(11)){9r.Y(11)}}C 9r}})()}if(!z.1h["z.X.1b"]){z.1h["z.X.1b"]=K;z.1Q("z.X.1b");z.6K=B(ew){A J={};A iq="kZ[Z!=9q][Z!=kY][Z!=et][Z!=kX][Z!=kW], kV, kU";z.1r(iq,ew).3T(B(E){C(!E.kT)}).1n(B(1m){A 3v=1m.1p;A Z=(1m.Z||"").1M();if((Z=="kS")||(Z=="kR")){if(1m.kQ){J[3v]=1m.1Z}}I{if(1m.kP){A ev=J[3v]=[];z.1r("kO[kN]",1m).1n(B(eu){ev.Y(eu.1Z)})}I{J[3v]=1m.1Z;if(Z=="et"){J[3v+".x"]=J[3v+".y"]=J[3v].x=J[3v].y=0}}}});C J};z.9h=B(23){A ec=kM;A J="";A es={};R(A x in 23){if(23[x]!=es[x]){if(z.2l(23[x])){R(A y=0;y<23[x].G;y++){J+=ec(x)+"="+ec(23[x][y])+"&"}}I{J+=ec(x)+"="+ec(23[x])+"&"}}}if((J.G)&&(J.2s(J.G-1)=="&")){J=J.3b(0,J.G-1)}C J};z.kL=B(er){C z.9h(z.6K(er))};z.kK=B(ep){C z.eq(z.6K(ep))};z.kJ=B(2H){A J={};A qp=2H.1A("&");A dc=kI;z.1n(qp,B(1m){if(1m.G){A 9p=1m.1A("=");A 1p=dc(9p.3a());A 1U=dc(9p.22("="));if(z.1R(J[1p])){J[1p]=[J[1p]]}if(z.2l(J[1p])){J[1p].Y(1U)}I{J[1p]=1U}}});C J};z.e1=U;z.e6={"9g":B(1b){C 1b.2G},"2e":B(1b){if(!1o.eo){1z.1K("kH kG kF a kE of 9g/2e-6M-9m"+" 4F kD kC kB kA 4G en kz"+" (ky 1o.eo=K 4F kx kw D kv)")}C z.5m(1b.2G)},"2e-6M-ku":B(1b){A 6N=1b.2G;A 9o=6N.T("/*");A 9n=6N.31("*/");if((9o==-1)||(9n==-1)){C z.5m(1b.2G)}C z.5m(6N.21(9o+2,9n))},"2e-6M-9m":B(1b){A 6L=1b.2G;A 9l=6L.T("/*");A 9k=6L.31("*/");if((9l==-1)||(9k==-1)){1z.1K("kt en ks\'t 6M 9m!");C""}C z.5m(6L.21(9l+2,9k))},"kr":B(1b){C z.3u(1b.2G)},"kq":B(1b){if(z.1l&&!1b.el){z.1n(["ko","em","kn","km"],B(i){1u{A 1e=S 9j(kl[i]+".kk");1e.kj=U;1e.ki(1b.2G);C 1e}1y(e){}})}I{C 1b.el}}};(B(){z.e5=B(F,ej,ei,eh){A 2F={};2F.F=F;A 6J=L;if(F.3R){A 3R=z.1D(F.3R);A 9i=3R.kh("kg");2F.2E=F.2E||(9i?9i.1Z:L);6J=z.6K(3R)}I{2F.2E=F.2E}A 5l=[{}];if(6J){5l.Y(6J)}if(F.5g){5l.Y(F.5g)}if(F.ek){5l.Y({"z.ek":S 5d().8O()})}2F.1r=z.9h(z.1x.14(L,5l));2F.9d=F.9d||"9g";A d=S z.30(ej);d.5k(ei,B(eg){C eh(eg,d)});A ld=F.4E;if(ld&&z.1Y(ld)){d.ef(B(ee){C ld.2d(F,ee,2F)})}A 1G=F.9f;if(1G&&z.1Y(1G)){d.ed(B(e9){C 1G.2d(F,e9,2F)})}A 6I=F.kf;if(6I&&z.1Y(6I)){d.9e(B(e8){C 6I.2d(F,e8,2F)})}d.1F=2F;C d};A e4=B(O){O.e0=K;A 1b=O.1F.1b;if(V 1b.e7=="B"){1b.e7()}};A e3=B(O){C z.e6[O.1F.9d](O.1F.1b)};A e2=B(9c,O){1z.1K(9c);C 9c};A 3Q=B(F){A O=z.e5(F,e4,e3,e2);O.1F.1b=z.9b(O.1F.F);C O};A 5j=L;A 3t=[];A 94=B(){A dZ=(S 5d()).dU();if(!z.e1){z.1n(3t,B(4D,6H){if(!4D){C}A O=4D.O;1u{if(!O||O.e0||!4D.dT(O)){3t.3S(6H,1);C}if(4D.dR(O)){3t.3S(6H,1);4D.dP(O)}I{if(O.9a){if(O.9a+(O.1F.F.6G||0)<dZ){3t.3S(6H,1);A 1G=S 1O("6G ke");1G.dY="6G";O.5i(1G);O.4C()}}}}1y(e){1z.1K(e);O.5i(S 1O("kc!"))}})}if(!3t.G){dX(5j);5j=L;C}};z.dV=B(){1u{z.1n(3t,B(i){i.O.4C()})}1y(e){}};if(z.1l){z.dW(z.dV)}z.dH=B(O,dS,dQ,dO){if(O.1F.F.6G){O.9a=(S 5d()).dU()}3t.Y({O:O,dT:dS,dR:dQ,dP:dO});if(!5j){5j=dN(94,50)}94()};A dJ="8Z/x-kb-3R-ka";A dG=B(O){C O.1F.1b.6F};A dF=B(O){C 4==O.1F.1b.6F};A dE=B(O){if(z.8Y(O.1F.1b)){O.dM(O)}I{O.5i(S 1O("k9 k8 k7 5h:"+O.1F.1b.3N))}};A 3P=B(Z,O){A 3s=O.1F;A F=3s.F;3s.1b.dL(Z,3s.2E,(F.k6!==K),(F.8X?F.8X:1k),(F.8W?F.8W:1k));if(F.6E){R(A 5f in F.6E){if(5f.1M()==="5g-Z"&&!F.8V){F.8V=F.6E[5f]}I{3s.1b.dK(5f,F.6E[5f])}}}3s.1b.dK("k5-k4",(F.8V||dJ));1u{3s.1b.dI(3s.1r)}1y(e){O.4C()}z.dH(O,dG,dF,dE);C O};z.8T=B(4B){if(4B.1r.G){4B.2E+=(4B.2E.T("?")==-1?"?":"&")+4B.1r;4B.1r=L}};z.k3=B(F){A O=3Q(F);z.8T(O.1F);C 3P("dD",O)};z.k2=B(F){C 3P("dC",3Q(F))};z.k1=B(F){A O=3Q(F);O.1F.1r=F.k0;C 3P("dC",O)};z.jZ=B(F){C 3P("dA",3Q(F))};z.jY=B(F){A O=3Q(F);A dB=O.1F;if(F["8U"]){dB.1r=F.8U;F.8U=L}C 3P("dA",O)};z.jX=B(F){A O=3Q(F);z.8T(O.1F);C 3P("8S",O)};z.dz=B(jW){2m S 1O("z.dz 3O jV jU")}})()}if(!z.1h["z.X.fx"]){z.1h["z.X.fx"]=K;z.1Q("z.X.fx");z.dx=B(dy,1d){D.1w=dy;D.1d=1d;D.4x=B(n){C((D.1d-D.1w)*n)+D.1w}};z.2r("z.d6",L,{1P:B(F){z.1x(D,F);if(z.2l(D.2C)){D.2C=S z.dx(D.2C[0],D.2C[1])}},2C:L,8Q:jT,5a:L,4z:0,dj:10,du:L,6x:L,dt:L,8B:L,dh:L,ds:L,dr:L,dm:L,2D:U,2Z:U,4A:L,8N:L,3r:L,2o:0,4y:0,3q:B(H,F){if(D[H]){D[H].14(D,F||[])}C D},5b:B(dw,8R){if(8R){5e(D.3r);D.2D=D.2Z=U;D.2o=0}I{if(D.2D&&!D.2Z){C D}}D.3q("6x");A d=dw||D.du;if(d>0){5c(z.2p(D,B(){D.5b(L,8R)}),d);C D}D.4A=S 5d().8O();if(D.2Z){D.4A-=D.8Q*D.2o}D.8N=D.4A+D.8Q;D.2D=K;D.2Z=U;A 8P=D.2C.4x(D.2o);if(!D.2o){if(!D.4y){D.4y=D.4z}D.3q("dt",[8P])}D.3q("ds",[8P]);D.8M();C D},jS:B(){5e(D.3r);if(!D.2D){C D}D.2Z=K;D.3q("dr",[D.2C.4x(D.2o)]);C D},jR:B(dq,dp){5e(D.3r);D.2D=D.2Z=K;D.2o=dq*6D;if(dp){D.5b()}C D},jQ:B(dn){if(!D.3r){C}5e(D.3r);if(dn){D.2o=1}D.3q("dm",[D.2C.4x(D.2o)]);D.2D=D.2Z=U;C D},3N:B(){if(D.2D){C D.2Z?"3M":"jP"}C"jO"},8M:B(){5e(D.3r);if(D.2D){A dl=S 5d().8O();A 2q=(dl-D.4A)/(D.8N-D.4A);if(2q>=1){2q=1}D.2o=2q;if(D.5a){2q=D.5a(2q)}D.3q("8B",[D.2C.4x(2q)]);if(2q<1){D.3r=5c(z.2p(D,"8M"),D.dj)}I{D.2D=U;if(D.4z>0){D.4z--;D.5b(L,K)}I{if(D.4z==-1){D.5b(L,K)}I{if(D.4y){D.4z=D.4y;D.4y=0}}}D.2o=0;D.3q("dh")}}C D}});(B(){A df=B(E){if(z.1l){A ns=E.1c;if(!ns.8L.G&&z.1c(E,"8L")=="dg"){ns.8L="1"}if(!ns.3n.G&&z.1c(E,"3n")=="8K"){ns.3n="8K"}}};z.6C=B(F){if(V F.1d=="1k"){2m S 1O("z.6C jN an 1d 1Z")}F.E=z.1D(F.E);A 3p=z.1x({6w:{}},F);A 8J=(3p.6w.2W={});8J.1w=(V 3p.1w=="1k")?B(){C 2V(z.1c(3p.E,"2W"))}:3p.1w;8J.1d=3p.1d;A 2U=z.6y(3p);z.2c(2U,"6x",L,B(){df(3p.E)});C 2U};z.8I=B(F){C z.6C(z.1x({1d:1},F))};z.8H=B(F){C z.6C(z.1x({1d:0},F))};if(z.6B&&!z.3o){z.8E=B(n){C 2k("0.5")+((2Y.da((n+2k("1.5"))*2Y.d9))/2)}}I{z.8E=B(n){C 0.5+((2Y.da((n+1.5)*2Y.d9))/2)}}A d4=B(6A){D.8G=6A;R(A p in 6A){A 1a=6A[p];if(1a.1w 1N z.1J){1a.d7=S z.1J()}}D.4x=B(r){A J={};R(A p in D.8G){A 1a=D.8G[p];A 6z=L;if(1a.1w 1N z.1J){6z=z.d8(1a.1w,1a.1d,r,1a.d7).8F()}I{if(!z.2l(1a.1w)){6z=((1a.1d-1a.1w)*r)+1a.1w+(p!="2W"?1a.jM||"px":"")}}J[p]=6z}C J}};z.6y=B(F){F.E=z.1D(F.E);if(!F.5a){F.5a=z.8E}A 2U=S z.d6(F);z.2c(2U,"6x",2U,B(){A pm={};R(A p in D.6w){A 1a=pm[p]=z.1x({},D.6w[p]);if(z.1Y(1a.1w)){1a.1w=1a.1w()}if(z.1Y(1a.1d)){1a.1d=1a.1d()}A d5=(p.1M().T("jL")>=0);B 8C(E,p){4w(p){2X"58":C E.8D;2X"3n":C E.6v}A v=z.1c(E,p);C(p=="2W")?2V(v):2k(v)};if(V 1a.1d=="1k"){1a.1d=8C(D.E,p)}I{if(V 1a.1w=="1k"){1a.1w=8C(D.E,p)}}if(d5){1a.1w=S z.1J(1a.1w);1a.1d=S z.1J(1a.1d)}I{1a.1w=(p=="2W")?2V(1a.1w):2k(1a.1w)}}D.2C=S d4(pm)});z.2c(2U,"8B",2U,B(8A){R(A s in 8A){z.1c(D.E,s,8A[s])}});C 2U}})()}',62,1711,'|||||||||||||||||||||||||||||||||||dojo|var|function|return|this|node|args|length|evt|else|ret|true|null|obj|elem|dfd|arguments|arr|for|new|indexOf|false|typeof||_base|push|type||te|||apply|attr|||||prop|xhr|style|end|doc|match|uri|_hasResource|key|del|undefined|isIE|item|forEach|djConfig|name|document|query|while|_66|try|res|start|mixin|catch|console|split|root|prototype|byId|gcs|ioArgs|err|NodeList|_p|Color|debug|parentNode|toLowerCase|instanceof|Error|constructor|provide|isString|ta|255|val|_a|global|_69|isFunction|value||substring|join|map|tn||window||path|_343|_220|_listeners|connect|call|json|replace|left|_b|toString|128|parseFloat|isArray|throw||_percent|hitch|step|declare|charAt|nodeType|_3c3|nidx|slice|faux|fired|_c4|_7e|loc|curve|_active|url|_44c|responseText|str|_312|idx|tqp|isNaN|isOpera|_22d|callee|add|_18b|_f8|_e2|_41|anim|Number|opacity|case|Math|_paused|Deferred|lastIndexOf|||||||||shift|substr|string|_3e7|_3ce|break|_w|charCode|_listener|_d5|_c5|authority|_49|width|isSafari|_49e|fire|_timer|_47b|_465|eval|_in|_40c|_409|_362|_3d9|className|_3d5|_386|_37a|body|getComputedStyle|box|_221|keyCode|remove|_8d|_46|paused|status|not|_478|_461|form|splice|filter|concat|tret|childNodes|_38b|_367|_33d||||||||||_340|_348|keypress|appendChild|_toArray|Array|_2b0|_toPixelValue|ref|_fixEvent|_19f|_14c|_14a|_150|_141|declaredClass|_d4|_99|_Url|_83|scheme|_67|_3d|switch|getValue|_startRepeatCount|repeat|_startTime|_47e|cancel|tif|load|to|with|tf|getElementsByTagName|number|_34c|_342|extend|_1e3|_normalizeEventName|_14b|_14e|results|self|cbfn|_f9|_d8|_b2|src|_88|dav||baseUrl|fragment|_loadedModules|_44|_43|_loaders|mll|height||easing|play|setTimeout|Date|clearTimeout|hdr|content|code|errback|_464|addCallbacks|_450|fromJson|_413|_3fc|_3ee|max|_31e|cond|getAttribute|_3d4|obi|tagName|_360|_381|contains|firstChild|_368|_372|_320|place|_2fa|scrollTop|_299|scrollLeft|top|documentElement|_288|_287|_getBorderExtents|_23f|_23d|_239|_218|_216|_211|eles|target|keys|shiftKey|ctrlKey|event|192|iel|_1db|delete|_1cf||addEventListener|String|_1af|_157|array|_14d|continue|_14f|_137|_11f|_106|_findMethod|has|_delegate|_dc|_d3|loaded|_9a|_loadInit|_inFlightCount|getObject|tv|_4f|_postLoad|_2d|offsetWidth|properties|beforeBegin|animateProperty|_4ad|_4a6|isKhtml|_fade|100|headers|readyState|timeout|_469|_457|_44d|formToObject|_441|comment|_43d|_36f|_419|tp|_40a|_406|_407|_373|_403|_3e6|_31b|cbi|test|_3c7|nextSibling|last|_3a1|_38e|_365|_36b|ecn|_364|_363|_356|_35e|_35f|_34f|_34d|_349|trim|tci|_328|_32b|_31f|_31c|_anim|_300|_2ff|_2f5|_2e7|removeClass|addClass|func|_2c4|cls|_2a9|_2ae|_280|_27f|_getPadExtents|isMoz|none|_233|cssText|_214|_fixCallback|_synthesizeEvent|stopPropagation|preventDefault|_setKeyChar|_1e1|ieh|_1d7|_1be|colorFromArray|sanitize|bits|rgb|_156|_fire|_resback|_13d|partial|_13a|silentlyCancelled|_topics|_127|_f1|_f0|superclass|_ec|_e3|mct|setObject|_bf|_b3|object|require|_92|_khtmlTimer|location|XMLHTTP|locale|dua|_71|_modulePrefixes|_55|_loadModule|_51|_50|_4e|pop|_3f|_callLoaded|_unloaders|_loadNotifying|_loadedUrls|_27|_24|_1d|_5|_4b7|onAnimate|getStyle|offsetHeight|_defaultEasing|toCss|_properties|fadeOut|fadeIn|_49f|auto|zoom|_cycle|_endTime|valueOf|_494|duration|_492|DELETE|_ioAddQueryToUrl|putData|contentType|password|user|_isDocumentOk|application|||||_466||||||startTime|_xhrObj|_45f|handleAs|addBoth|error|text|objectToQuery|_44f|ActiveXObject|_443|_442|filtered|_43f|_43e|_437|file|tnl|_41c|_filterQueryResult|_zipIdx|_408|_402|evaluate|_3ed|_380|fHit|_361|_33b|_3da|_3ab|_3d6|RegExp|_327|_3cf|_3c9|child|innerHTML|first|tval|_391|class|pnc|_37e|_37c|_375|_366|_35c|_35a|_353|_33c|_336|_314|||_315|_oe|_307|_309|cloneNode|after|createElement||_2f8|_2ef|_2ee|unshift|coords|some|every||_2cb|script|_2c9|parent||a2p||_2c3|_2bd||abs|_getMarginBox|_2b3|_2a6|position|_2a7|_2ac|_2ab|_getIeDocumentElementOffset|getBoundingClientRect|ownerDocument|_2a3|clientWidth|_isBodyLtr|_fixIeBiDiScrollLeft|_bodyLtr|_29d|_getContentBox|_setBox|_getMarginExtents|_getPadBorderExtents|_usesBorderBox|boxModel|pcs|st|sl|_240|runtimeStyle|_dcm|BackCompat|compatMode|default|_21b|_d|html|_event_listener|handlers|PAGE_DOWN|PAGE_UP|RIGHT_ARROW|LEFT_ARROW|DOWN_ARROW|UP_ARROW|_preventDefault||_stopPropagation|returnValue||_trySetKeyCode|cancelBubble|currentTarget|106|_1ee|111||_1e8|_1e7|||se|srcElement|onkeydown||_1d0|_disconnect|lid|_1c0|_connect|_set|_195|_185|_183|_17d|_everyOrSome|_16b|_172|_15b|Function|_154|_escapeString|_140|chain|_check|canceller|_12d|_124|_11a|_10d|_107|inherited|_fa|_f2|_findMixin|_constructor|preamble|_de|clone|tmp|_c7|TMP|_be|_ba|_mixin|isBrowser|lang|firebug||param|modulePaths|_a7|_fireCallback|_a0|setContext||_9c|unloaded||||_96|_93|navigator|_90|_89||protocol|_84|_86|_XMLHTTP_PROGIDS|gears|google|setAttribute|_80|_77|cfg|_6f|_getModuleSymbols|_5a|_58|_53|_4d|_4c|_45|_40|_moduleHasPrefix|_loadUri|_28|_26|_21|_22|tests|doh|_20|_1f|_1c|version|_1b|_19|_getProp|_11|_4|_4a5|_4b3|_Animation|tempColor|blendColors|PI|sin|||||_49a|normal|onEnd||rate||curr|onStop|_497||_496|pct|onPause|onPlay|onBegin|delay||_491|_Line|_48b|wrapForm|PUT|_487|POST|GET|_476|_474|_472|_ioWatch|send|_471|setRequestHeader|open|callback|setInterval|_470|resHandle|_46f|ioCheck|_46e|validCheck|getTime|_ioCancelAll|addOnUnload|clearInterval|dojoType|now|canceled|_blockAsync|_45e|_45c|_459|_ioSetArgs|_contentHandlers|abort|_458|_456||||addErrback|_454|addCallback|_452|_44b|_44a|_449|preventCache|responseXML|Microsoft|JSON|usePlainJson|_431|toJson|_430|_42d|image|opt|ria|_421|_41b|_40b|_zip|_410|_40d|_357|sqf|_374|_3e5|_3df|_38f|clc|pred|parseInt|ntf|_3bf|_3bc|cnl|previousSibling|_3a9|_3a6|_39c|_399|_396|_392|__cachedIndex|__cachedLength|_376|iterateNext|_34a|_355|_354|_32c|_350|_34b|_33f|_33e|_33a|_338|_334|_332||_330|_32e||_322|_316|mousemove|mouseout|mouseover|_305|lastChild||_2f9||_2f2|_2f1|removeChild|_2ec|_2eb|_2ea|_2e6||_2e4|_2e2|_2d6|_2d5|_2d4|_2d3|_2d2|_2d1|_2cd|_2cc|scs|write|_2c8|hasClass|_2c0|_2bb|_2b5|_abs|_docScroll|offsetParent|offsetTop|offsetLeft|absolute|getBoxObjectFor|clientLeft|_setContentSize|_setMarginBox|_28d|_286|_285|_289|NaN|_281|border|_272|_26b|_260|_258|_253|_24c|_246|_23a|_getOpacity|_setOpacity|_238|td|tr|nodeName|FILTER|_22f|_22e|currentStyle|_22c|_22b|display|QuirksMode|unselectable|_217|isMozilla|getElementById|attributes|all|_ie_listener|_getIeDispatcher|_1fd|NUM_LOCK|SCROLL_LOCK|INSERT|END|HOME|PAUSE|F12|F11|F10|F9|F8|F7|F6|F5|F4|F3|F2|F1|63232|SHIFT_TAB|TAB|keyIdentifier|_1f3|stopEvent|_punctMap|222|219|186|onkeypress|_stealthKeyDown|_fixKeys|relatedTarget|_1e0|_1df|_stealthKeydown|_1d6|_1d5|_1d1|_1ca|_1c9|_1cb|_1c2|_1c1|_1c3|_1c4|_1bc|_1b3|_1b2|colorFromHex|colorFromRgb|named|colorFromString|mask|rgba|_19c|_197|_192|setColor|_180|_178|_177|_175|_174|_16d|_166|_164|_163|_162|_15c|_15d|_15e|index|__json__|toJsonIndentStr|_nextId|_12f|_12b|publish|_128|_126|_125|_122|_121|_123|_11c|_11b|_10c|_10b|_108|getDispatcher|argument|nom|_construct|_core|_makeCtor|_df|_db|deprecated|isObject|_cc||scope||_hitchArgs|_c2||pre|_c1|native|isDebug||registerModulePath|_a8||finally|||_a6|_a5|_a4|_a3|_a2|_a1|_9f|_9e|_9d|_9b|_98|_97|onbeforeunload|ipt|scr|complete|_95|userAgent|_modulesLoaded|initialized|_initFired|_8c|_8a|_getText|_87|ieForceActiveXXhr|Msxml2|isGears|_81|_gearsObject|googlegears|GearsFactory|isFF|_7d|Safari|_72|_name|_6c|ire|ore|_68|i18n|_5b|requireIf|_56|_52|loading|_4a|_loadPath|_47|_48|_global_omit_module_check|_getModulePrefix|_3c|_3a|_37|_30|Boolean|_loadUriAndCheck|_2e||cacheBust|_1e|_1a|_17|_16|_15|_14|_f|_10|_e|_9|_8|revision|flag|patch|minor|major|_6|color|units|needs|stopped|playing|stop|gotoPercent|pause|1000|implemented|yet|_48a|xhrDelete|rawXhrPut|xhrPut|postData|rawXhrPost|xhrPost|xhrGet|Type|Content|sync|response|http|bad|urlencoded|www|_watchInFlightError||exceeded|handle|action|getAttributeNode|loadXML|async|XMLDOM|prefixes|MSXML3|MSXML|MSXML2||xml|javascript|wasn|your|optional|message|off|turn|use|endpoints|issues|security|potential|avoid|mimetype|using|consider|please|decodeURIComponent|queryToObject|formToJson|formToQuery|encodeURIComponent|selected|option|multiple|checked|checkbox|radio|disabled|textarea|select|button|reset|submit|input|_3fb|hasAttribute|0n|even|odd|nth|_3b5|empty|_3b1|_3ad|htmlFor|_38a|under||exprssion|failure|ANY_TYPE|XPathResult|starts|keyup|keydown|mouseup|mousedown|blur|click|combine|span|addContent||adopt|orphan|_2de|_2dd|styles|_2da|_2d9|_2cf|_2ce|show|createPopup|toggleClass|scrollWidth|clientTop|ltr|direction|pageXOffset|pageYOffset|fixed|contentBox|marginBox|BUTTON|TABLE|_getBorderBox|clientHeight|visible|overflow|marginBottom|marginRight|marginTop|marginLeft|borderBottomWidth|borderBottomStyle|borderRightWidth|borderRightStyle|borderTopWidth|borderTopStyle|borderLeftWidth|borderLeftStyle|paddingBottom|paddingRight|paddingTop|paddingLeft|offset||min|padding||margin|Opacity|Alpha|alpha|filters|pixelLeft|medium|_22a|defaultView|before||insertBefore|KhtmlUserSelect|MozUserSelect|setSelectable|isDescendant|div|_destroyElement|BackgroundImageCache|execCommand|PageDown|PageUp|Right|Left|Down|Up|63289|63249|63248|PRINT_SCREEN|63302|63277|63276|63275|63273|63272|63250|63247|63246|63245|63244|63243|63242|63241|63240|63239|63238|63237|63236|63235|63234|63233|Enter|_1f9|which|_1f6|bubbledKeyCode|221|220||||191|190|189|188|187|toElement|fromElement|clientY|pageY||clientX|pageX|offsetY|||layerY|offsetX|layerX|parentWindow|_nop|_allow_leaks|145|144|126|F15|125|F14|124|F13|123|122|121|120|119|118|117|116|115|114|113|112|NUMPAD_DIVIDE|110|NUMPAD_PERIOD|109|NUMPAD_MINUS|108|NUMPAD_ENTER|107|NUMPAD_PLUS|NUMPAD_MULTIPLY|105|NUMPAD_9|104|NUMPAD_8|103|NUMPAD_7|102|NUMPAD_6|101|NUMPAD_5|NUMPAD_4||NUMPAD_3|NUMPAD_2|NUMPAD_1|NUMPAD_0||SELECT|RIGHT_WINDOW||LEFT_WINDOW||HELP|SPACE|ESCAPE|CAPS_LOCK|ALT|CTRL|SHIFT|ENTER|CLEAR|BACKSPACE|attachEvent|fixEvent|fromCharCode|keyChar|_1b9|removeEventListener|0x|round|toHex|toRgba|toRgb|aqua|teal|blue|navy|yellow|olive|lime|green|fuchsia|purple|red|maroon|white|gray|silver|black|boolean|called|already|Cancelled|connectPublisher|unsubscribe|subscribe|disconnect|_113|_112||_111|_110|||found|was||must|_|module|||required|likely|It|declaration|Mixin|separate|instead|property|initializer||pass|_c9|_bb|_b7|nfunction|isAlien|isFinite|isArrayLike|_firebug|withDoc|withGlobal|_writeIncludes|VML|behavior|addRule|createStyleSheet|vml|com|microsoft|schemas|urn|namespaces|onunload|onreadystatechange|defer|khtml|WebKit|DOMContentLoaded|enableMozDomContentLoaded|domcontentloaded|Unable|base|chrome|1223|304|300|200|available|XMLHttpRequest|_println|language|userLanguage|isQuirks|factory|mimeTypes|Factory|Gears|_7f|MSIE||Firefox|Gecko|Konqueror||Opera|appVersion|xd|browser|moduleUrl|port|host|hostenv|_requireLocalization|_5f|_5e|_5d|_5c|requireLocalization|requireAfterIf|_57|common|platformRequire|defined|symbol|_isXDomain|tried|Could|__package__|packageFileName|_42|useXDomain|flight|still|files|addOnLoad|failed|sourceURL|util|notice|without|change|subject|APIs|EXPERIMENTAL|experimental|removed|will|DEPRECATED|exists|10315|Rev|Mobile|Spidermonkey|Rhino||Browser|delayMozLoadingFix|preventBackButtonFix|libraryScriptUri|baseRelativePath|baseScriptUri|allowQueryConfig|warn|trace|timeEnd||time|profileEnd|profile|log|info|groupEnd|group|dirxml|dir|count|assert'.split('|'),0,{});
+
+
+/*
+
+Prototype 1.5 rc0
+ - Adapted from Ruby on Rails - http://dev.rubyonrails.org/browser/spinoffs/prototype/src
+ - By Lunarmedia, 06 August, 2006
+ - Available at (and packed with) JavascriptCompressor.com
+
+Please note this version is missing the selector.js component of the full Prototype library.
+You can get the compressed version of selector at JavascriptCompressor.com
+
+*/
+
+var decompressedPrototype = function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[(function(e){return d[e]})];e=(function(){return'\\w+'});c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('d T={4l:\'1.5.8P\',3E:\'(?:<3G.*?>)((\\n|\\r|.)*?)(?:<\\/3G>)\',2v:7(){},K:7(x){c x}};d 1b={17:7(){c 7(){6.1I.2n(6,N)}}};d 1e=z q();q.u=7(5d,O){G(d 1G 2M O){5d[1G]=O[1G]}c 5d};q.1U=7(U){1j{f(U==1v)c\'1v\';f(U==1L)c\'1L\';c U.1U?U.1U():U.2C()}1s(e){f(e 8R 9l)c\'...\';25 e}};7j.v.1d=7(){d 43=6,23=$A(N),U=23.8S();c 7(){c 43.2n(U,23.3s($A(N)))}};7j.v.8U=7(U){d 43=6;c 7(C){c 43.8V(U,C||1W.C)}};q.u(8Q.v,{8W:7(){d 4Z=6.2C(16);f(6<16)c\'0\'+4Z;c 4Z},5j:7(){c 6+1},8Y:7(o){$R(0,6,11).V(o);c 6}});d 6s={6j:7(){d 48;G(d i=0;i<N.t;i++){d 6L=N[i];1j{48=6L();1y}1s(e){}}c 48}};d 6Q=1b.17();6Q.v={1I:7(1a,1J){6.1a=1a;6.1J=1J;6.41=Y;6.2A()},2A:7(){5Z(6.2D.1d(6),6.1J*4z)},2D:7(){f(!6.41){1j{6.41=11;6.1a()}8Z{6.41=Y}}}};q.u(4b.v,{2T:7(1A,1z){d L=\'\',O=6,I;1z=N.90.52(1z);1H(O.t>0){f(I=O.I(1A)){L+=O.47(0,I.w);L+=(1z(I)||\'\').2C();O=O.47(I.w+I[0].t)}1D{L+=O,O=\'\'}}c L},92:7(1A,1z,3i){1z=6.2T.52(1z);3i=3i===1v?1:3i;c 6.2T(1A,7(I){f(--3i<0)c I[0];c 1z(I)})},93:7(1A,o){6.2T(1A,o);c 6},94:7(t,2S){t=t||30;2S=2S===1v?\'...\':2S;c 6.t>t?6.47(0,t-2S.t)+2S:6},9F:7(){c 6.2y(/^\\s+/,\'\').2y(/\\s+$/,\'\')},71:7(){c 6.2y(/<\\/?[^>]+>/7Y,\'\')},2Q:7(){c 6.2y(z 3O(T.3E,\'5P\'),\'\')},70:7(){d 6Y=z 3O(T.3E,\'5P\');d 5p=z 3O(T.3E,\'98\');c(6.I(6Y)||[]).1C(7(5o){c(5o.I(5p)||[\'\',\'\'])[1]})},3q:7(){c 6.70().1C(7(3G){c 4q(3G)})},9E:7(){d 1q=J.4Y(\'1q\');d 1Y=J.9D(6);1q.75(1Y);c 1q.3h},9c:7(){d 1q=J.4Y(\'1q\');1q.3h=6.71();c 1q.2z[0]?1q.2z[0].6q:\'\'},78:7(){d 7i=6.I(/^\\??(.*)$/)[1].3j(\'&\');c 7i.36({},7(5b,72){d 1i=72.3j(\'=\');5b[1i[0]]=1i[1];c 5b})},1Z:7(){c 6.3j(\'\')},3P:7(){d 2l=6.3j(\'-\');f(2l.t==1)c 2l[0];d 54=6.5g(\'-\')==0?2l[0].7e(0).3Y()+2l[0].7g(1):2l[0];G(d i=1,73=2l.t;i<73;i++){d s=2l[i];54+=s.7e(0).3Y()+s.7g(1)}c 54},1U:7(){c"\'"+6.2y(/\\\\/g,\'\\\\\\\\\').2y(/\'/g,\'\\\\\\\'\')+"\'"}});4b.v.2T.52=7(1z){f(2i 1z==\'7\')c 1z;d 2U=z 3n(1z);c 7(I){c 2U.7a(I)}};4b.v.9h=4b.v.78;d 3n=1b.17();3n.79=/(^|.|\\r|\\n)(#\\{(.*?)\\})/;3n.v={1I:7(2U,1A){6.2U=2U.2C();6.1A=1A||3n.79},7a:7(U){c 6.2U.2T(6.1A,7(I){d 53=I[1];f(53==\'\\\\\')c I[2];c 53+(U[I[3]]||\'\').2C()})}};d $1y=z q();d $49=z q();d 1p={V:7(o){d w=0;1j{6.2m(7(h){1j{o(h,w++)}1s(e){f(e!=$49)25 e}})}1s(e){f(e!=$1y)25 e}},9n:7(o){d L=11;6.V(7(h,w){L=L&&!!(o||T.K)(h,w);f(!L)25 $1y});c L},9o:7(o){d L=11;6.V(7(h,w){f(L=!!(o||T.K)(h,w))25 $1y});c L},3e:7(o){d P=[];6.V(7(h,w){P.W(o(h,w))});c P},7n:7(o){d L;6.V(7(h,w){f(o(h,w)){L=h;25 $1y}});c L},7o:7(o){d P=[];6.V(7(h,w){f(o(h,w))P.W(h)});c P},9p:7(1A,o){d P=[];6.V(7(h,w){d 7c=h.2C();f(7c.I(1A))P.W((o||T.K)(h,w))});c P},1M:7(U){d 51=Y;6.V(7(h){f(h==U){51=11;25 $1y}});c 51},36:7(45,o){6.V(7(h,w){45=o(45,h,w)});c 45},9q:7(1F){d 23=$A(N).47(1);c 6.3e(7(h){c h[1F].2n(h,23)})},9s:7(o){d L;6.V(7(h,w){h=(o||T.K)(h,w);f(L==1v||h>=L)L=h});c L},9u:7(o){d L;6.V(7(h,w){h=(o||T.K)(h,w);f(L==1v||h<L)L=h});c L},9v:7(o){d 50=[],58=[];6.V(7(h,w){((o||T.K)(h,w)?50:58).W(h)});c[50,58]},3r:7(1G){d P=[];6.V(7(h,w){P.W(h[1G])});c P},9x:7(o){d P=[];6.V(7(h,w){f(!o(h,w))P.W(h)});c P},9y:7(o){c 6.3e(7(h,w){c{h:h,59:o(h,w)}}).9z(7(18,3U){d a=18.59,b=3U.59;c a<b?-1:a>b?1:0}).3r(\'h\')},1Z:7(){c 6.3e(T.K)},9B:7(){d o=T.K,23=$A(N);f(2i 23.5e()==\'7\')o=23.9C();d 7l=[6].3s(23).1C($A);c 6.1C(7(h,w){c o(7l.3r(w))})},1U:7(){c\'#<1p:\'+6.1Z().1U()+\'>\'}};q.u(1p,{1C:1p.3e,5v:1p.7n,1k:1p.7o,8M:1p.1M,7p:1p.1Z});d $A=1E.7q=7(2R){f(!2R)c[];f(2R.1Z){c 2R.1Z()}1D{d P=[];G(d i=0;i<2R.t;i++)P.W(2R[i]);c P}};q.u(1E.v,1p);f(!1E.v.4d)1E.v.4d=1E.v.4m;q.u(1E.v,{2m:7(o){G(d i=0;i<6.t;i++)o(6[i])},5i:7(){6.t=0;c 6},7r:7(){c 6[0]},5e:7(){c 6[6.t-1]},7s:7(){c 6.1k(7(h){c h!=1v||h!=1L})},6J:7(){c 6.36([],7(6H,h){c 6H.3s(h&&h.5D==1E?h.6J():[h])})},5s:7(){d 4N=$A(N);c 6.1k(7(h){c!4N.1M(h)})},5g:7(U){G(d i=0;i<6.t;i++)f(6[i]==U)c i;c-1},4m:7(5h){c(5h!==Y?6:6.1Z()).4d()},1U:7(){c\'[\'+6.1C(q.1U).1N(\', \')+\']\'}});d 4h={2m:7(o){G(d 1O 2M 6){d h=6[1O];f(2i h==\'7\')49;d 1i=[1O,h];1i.1O=1O;1i.h=h;o(1i)}},7t:7(){c 6.3r(\'1O\')},4N:7(){c 6.3r(\'h\')},7u:7(2N){c $H(2N).36($H(6),7(4Q,1i){4Q[1i.1O]=1i.h;c 4Q})},7w:7(){c 6.1C(7(1i){c 1i.1C(4n).1N(\'=\')}).1N(\'&\')},1U:7(){c\'#<4h:{\'+6.1C(7(1i){c 1i.1C(q.1U).1N(\': \')}).1N(\', \')+\'}>\'}};7 $H(U){d 2N=q.u({},U||{});q.u(2N,1p);q.u(2N,4h);c 2N};3L=1b.17();q.u(3L.v,1p);q.u(3L.v,{1I:7(22,2x,2H){6.22=22;6.2x=2x;6.2H=2H},2m:7(o){d h=6.22;2q{o(h);h=h.5j()}1H(6.1M(h))},1M:7(h){f(h<6.22)c Y;f(6.2H)c h<6.2x;c h<=6.2x}});d $R=7(22,2x,2H){c z 3L(22,2x,2H)};d M={4w:7(){c 6s.6j(7(){c z 5C()},7(){c z 5n(\'7y.6d\')},7(){c z 5n(\'7z.6d\')})||Y},4s:0};M.2W={3b:[],2m:7(o){6.3b.2m(o)},69:7(4F){f(!6.1M(4F))6.3b.W(4F)},7A:7(5t){6.3b=6.3b.5s(5t)},3y:7(1a,26,E,2Z){6.V(7(3o){f(3o[1a]&&2i 3o[1a]==\'7\'){1j{3o[1a].2n(3o,[26,E,2Z])}1s(e){}}})}};q.u(M.2W,1p);M.2W.69({5G:7(){M.4s++},1B:7(){M.4s--}});M.44=7(){};M.44.v={4a:7(m){6.m={1F:\'4j\',4p:11,5H:\'5E/x-86-Q-7C\',28:\'\'};q.u(6.m,m||{})},3l:7(){c 6.E.32==1v||6.E.32==0||(6.E.32>=84&&6.E.32<7E)},7G:7(){c!6.3l()}};M.3t=1b.17();M.3t.5L=[\'7H\',\'80\',\'7I\',\'7J\',\'4t\'];M.3t.v=q.u(z M.44(),{1I:7(1l,m){6.E=M.4w();6.4a(m);6.26(1l)},26:7(1l){d 28=6.m.28||\'\';f(28.t>0)28+=\'&7K=\';1j{6.1l=1l;f(6.m.1F==\'7L\'&&28.t>0)6.1l+=(6.1l.I(/\\?/)?\'&\':\'?\')+28;M.2W.3y(\'5G\',6,6.E);6.E.7N(6.m.1F,6.1l,6.m.4p);f(6.m.4p){6.E.5T=6.5J.1d(6);2Y((7(){6.4r(1)}).1d(6),10)}6.5A();d 1c=6.m.5V?6.m.5V:28;6.E.7O(6.m.1F==\'4j\'?1c:1L)}1s(e){6.3p(e)}},5A:7(){d 1P=[\'X-7P-7Q\',\'5C\',\'X-T-4l\',T.4l,\'7R\',\'1Y/7m, 1Y/2e, 5E/5F, 1Y/5F, */*\'];f(6.m.1F==\'4j\'){1P.W(\'5Q-2g\',6.m.5H);f(6.E.7S)1P.W(\'7T\',\'7U\')}f(6.m.1P)1P.W.2n(1P,6.m.1P);G(d i=0;i<1P.t;i+=2)6.E.7V(1P[i],1P[i+1])},5J:7(){d 2F=6.E.2F;f(2F!=1)6.4r(6.E.2F)},4A:7(B){1j{c 6.E.7W(B)}1s(e){}},5M:7(){1j{c 4q(\'(\'+6.4A(\'X-7X\')+\')\')}1s(e){}},5R:7(){1j{c 4q(6.E.3F)}1s(e){6.3p(e)}},4r:7(2F){d C=M.3t.5L[2F];d E=6.E,2Z=6.5M();f(C==\'4t\'){1j{(6.m[\'2I\'+6.E.32]||6.m[\'2I\'+(6.3l()?\'81\':\'82\')]||T.2v)(E,2Z)}1s(e){6.3p(e)}f((6.4A(\'5Q-2g\')||\'\').I(/^1Y\\/7m/i))6.5R()}1j{(6.m[\'2I\'+C]||T.2v)(E,2Z);M.2W.3y(\'2I\'+C,6,E,2Z)}1s(e){6.3p(e)}f(C==\'4t\')6.E.5T=T.2v},3p:7(57){(6.m.5W||T.2v)(6,57);M.2W.3y(\'5W\',6,57)}});M.4C=1b.17();q.u(q.u(M.4C.v,M.3t.v),{1I:7(1w,1l,m){6.4x={3m:1w.3m?$(1w.3m):$(1w),3z:1w.3z?$(1w.3z):(1w.3m?1L:$(1w))};6.E=M.4w();6.4a(m);d 1B=6.m.1B||T.2v;6.m.1B=(7(E,U){6.5Y();1B(E,U)}).1d(6);6.26(1l)},5Y:7(){d 3A=6.3l()?6.4x.3m:6.4x.3z;d 3k=6.E.3F;f(!6.m.3q)3k=3k.2Q();f(3A){f(6.m.60){z 6.m.60(3A,3k)}1D{k.6h(3A,3k)}}f(6.3l()){f(6.1B)2Y(6.1B.1d(6),10)}}});M.61=1b.17();M.61.v=q.u(z M.44(),{1I:7(1w,1l,m){6.4a(m);6.1B=6.m.1B;6.1J=(6.m.1J||2);6.2s=(6.m.2s||1);6.4B={};6.1w=1w;6.1l=1l;6.22()},22:7(){6.m.1B=6.63.1d(6);6.2D()},7b:7(){6.4B.1B=1v;89(6.65);(6.1B||T.2v).2n(6,N)},63:7(26){f(6.m.2s){6.2s=(26.3F==6.64?6.2s*6.m.2s:1);6.64=26.3F}6.65=2Y(6.2D.1d(6),6.2s*6.1J*4z)},2D:7(){6.4B=z M.4C(6.1w,6.1l,6.m)}});7 $(){d P=[],4;G(d i=0;i<N.t;i++){4=N[i];f(2i 4==\'8c\')4=J.8d(4);P.W(k.u(4))}c P.t<2?P[0]:P};J.8f=7(1f,6a){d 6b=($(6a)||J.1c).4D(\'*\');c $A(6b).36([],7(12,4E){f(4E.1f.I(z 3O("(^|\\\\s)"+1f+"(\\\\s|$)")))12.W(k.u(4E));c 12})};f(!1W.k)d k=z q();k.u=7(4){f(!4)c;f(4X)c 4;f(!4.6e&&4.1h&&4!=1W){d 2a=k.3d,2r=k.u.2r;G(d 1G 2M 2a){d h=2a[1G];f(2i h==\'7\')4[1G]=2r.4W(h)}}4.6e=11;c 4};k.u.2r={4W:7(h){c 6[h]=6[h]||7(){c h.2n(1L,[6].3s($A(N)))}}};k.3d={4U:7(4){c $(4).l.2B!=\'3Q\'},6N:7(){G(d i=0;i<N.t;i++){d 4=$(N[i]);k[k.4U(4)?\'6f\':\'6w\'](4)}},6f:7(){G(d i=0;i<N.t;i++){d 4=$(N[i]);4.l.2B=\'3Q\'}},6w:7(){G(d i=0;i<N.t;i++){d 4=$(N[i]);4.l.2B=\'\'}},42:7(4){4=$(4);4.1X.8h(4)},6h:7(4,2e){$(4).3h=2e.2Q();2Y(7(){2e.3q()},10)},2y:7(4,2e){4=$(4);f(4.6k){4.6k=2e.2Q()}1D{d 1K=4.6R.6S();1K.56(4);4.1X.8i(1K.6T(2e.2Q()),4)}2Y(7(){2e.3q()},10)},8k:7(4){4=$(4);c 4.2k},3K:7(4){c z k.3S(4)},8l:7(4,1f){f(!(4=$(4)))c;c k.3K(4).1M(1f)},8m:7(4,1f){f(!(4=$(4)))c;c k.3K(4).7k(1f)},8n:7(4,1f){f(!(4=$(4)))c;c k.3K(4).42(1f)},8p:7(4){4=$(4);G(d i=0;i<4.2z.t;i++){d 3M=4.2z[i];f(3M.8q==3&&!/\\S/.4v(3M.6q))k.42(3M)}},8r:7(4){c $(4).3h.I(/^\\s*$/)},8s:7(4,3I){4=$(4),3I=$(3I);1H(4=4.1X)f(4==3I)c 11;c Y},6t:7(4){4=$(4);d x=4.x?4.x:4.2f,y=4.y?4.y:4.29;1W.6t(x,y)},1R:7(4,l){4=$(4);d h=4.l[l.3P()];f(!h){f(J.4J&&J.4J.6v){d 4L=J.4J.6v(4,1L);h=4L?4L.8v(l):1L}1D f(4.6x){h=4.6x[l.3P()]}}f(1W.6E&&[\'18\',\'1n\',\'3U\',\'6G\'].1M(l))f(k.1R(4,\'14\')==\'4G\')h=\'6y\';c h==\'6y\'?1L:h},8x:7(4,l){4=$(4);G(d B 2M l)4.l[B.3P()]=l[B]},8y:7(4){4=$(4);f(k.1R(4,\'2B\')!=\'3Q\')c{21:4.2p,24:4.2k};d 20=4.l;d 6B=20.4O;d 6A=20.14;20.4O=\'31\';20.14=\'2o\';20.2B=\'\';d 6C=4.6m;d 6D=4.6p;20.2B=\'3Q\';20.14=6A;20.4O=6B;c{21:6C,24:6D}},8z:7(4){4=$(4);d 4R=k.1R(4,\'14\');f(4R==\'4G\'||!4R){4.4T=11;4.l.14=\'3T\';f(1W.6E){4.l.1n=0;4.l.18=0}}},8A:7(4){4=$(4);f(4.4T){4.4T=1v;4.l.14=4.l.1n=4.l.18=4.l.6G=4.l.3U=\'\'}},8B:7(4){4=$(4);f(4.3c)c;4.3c=4.l.3V;f((k.1R(4,\'3V\')||\'4U\')!=\'31\')4.l.3V=\'31\'},8D:7(4){4=$(4);f(4.3c)c;4.l.3V=4.3c;4.3c=1v}};q.u(k,k.3d);d 4X=Y;f(!3W&&/3x|3w|3u/.4v(33.62)){d 3W={}};k.6K=7(2a){q.u(k.3d,2a||{});f(2i 3W!=\'1v\'){d 2a=k.3d,2r=k.u.2r;G(d 1G 2M 2a){d h=2a[1G];f(2i h==\'7\')3W.v[1G]=2r.4W(h)}4X=11}};k.6K();d 6M=z q();6M.2B=k.6N;1e.1g=7(3f){6.3f=3f};1e.1g.v={1I:7(4,2t){6.4=$(4);6.2t=2t.2Q();f(6.3f&&6.4.6O){1j{6.4.6O(6.3f,6.2t)}1s(e){d 1h=6.4.1h.2w();f(1h==\'4V\'||1h==\'8N\'){6.2X(6.6U())}1D{25 e}}}1D{6.1K=6.4.6R.6S();f(6.2V)6.2V();6.2X([6.1K.6T(6.2t)])}2Y(7(){2t.3q()},10)},6U:7(){d 1q=J.4Y(\'1q\');1q.3h=\'<6V><4V>\'+6.2t+\'</4V></6V>\';c $A(1q.2z[0].2z[0].2z)}};d 1g=z q();1g.6W=1b.17();1g.6W.v=q.u(z 1e.1g(\'96\'),{2V:7(){6.1K.97(6.4)},2X:7(2h){2h.V((7(2j){6.4.1X.55(2j,6.4)}).1d(6))}});1g.5m=1b.17();1g.5m.v=q.u(z 1e.1g(\'99\'),{2V:7(){6.1K.56(6.4);6.1K.74(11)},2X:7(2h){2h.4m(Y).V((7(2j){6.4.55(2j,6.4.9a)}).1d(6))}});1g.7h=1b.17();1g.7h.v=q.u(z 1e.1g(\'9d\'),{2V:7(){6.1K.56(6.4);6.1K.74(6.4)},2X:7(2h){2h.V((7(2j){6.4.75(2j)}).1d(6))}});1g.76=1b.17();1g.76.v=q.u(z 1e.1g(\'9i\'),{2V:7(){6.1K.9m(6.4)},2X:7(2h){2h.V((7(2j){6.4.1X.55(2j,6.4.9t)}).1d(6))}});k.3S=1b.17();k.3S.v={1I:7(4){6.4=$(4)},2m:7(o){6.4.1f.3j(/\\s+/).1k(7(B){c B.t>0}).2m(o)},5c:7(1f){6.4.1f=1f},7k:7(5a){f(6.1M(5a))c;6.5c(6.1Z().3s(5a).1N(\' \'))},42:7(4c){f(!6.1M(4c))c;6.5c(6.1k(7(1f){c 1f!=4c}).1N(\' \'))},2C:7(){c 6.1Z().1N(\' \')}};q.u(k.3S.v,1p);d 5I={5i:7(){G(d i=0;i<N.t;i++)$(N[i]).h=\'\'},4f:7(4){$(4).4f()},7v:7(){G(d i=0;i<N.t;i++)f($(N[i]).h==\'\')c Y;c 11},1k:7(4){$(4).1k()},5y:7(4){4=$(4);4.4f();f(4.1k)4.1k()}};d D={3a:7(Q){d 12=D.2L($(Q));d 4I=z 1E();G(d i=0;i<12.t;i++){d 4g=D.k.3a(12[i]);f(4g)4I.W(4g)}c 4I.1N(\'&\')},2L:7(Q){Q=$(Q);d 12=z 1E();G(d 1h 2M D.k.2E){d 4H=Q.4D(1h);G(d j=0;j<4H.t;j++)12.W(4H[j])}c 12},7x:7(Q,3N,B){Q=$(Q);d 3H=Q.4D(\'2u\');f(!3N&&!B)c 3H;d 4y=z 1E();G(d i=0;i<3H.t;i++){d 2u=3H[i];f((3N&&2u.2g!=3N)||(B&&2u.B!=B))49;4y.W(2u)}c 4y},7B:7(Q){d 12=D.2L(Q);G(d i=0;i<12.t;i++){d 4=12[i];4.7D();4.4o=\'11\'}},7F:7(Q){d 12=D.2L(Q);G(d i=0;i<12.t;i++){d 4=12[i];4.4o=\'\'}},5z:7(Q){c D.2L(Q).5v(7(4){c 4.2g!=\'31\'&&!4.4o&&[\'2u\',\'1k\',\'3J\'].1M(4.1h.2w())})},7M:7(Q){5I.5y(D.5z(Q))},5w:7(Q){$(Q).5w()}};D.k={3a:7(4){4=$(4);d 1F=4.1h.2w();d 1S=D.k.2E[1F](4);f(1S){d 1O=4n(1S[0]);f(1O.t==0)c;f(1S[1].5D!=1E)1S[1]=[1S[1]];c 1S[1].1C(7(h){c 1O+\'=\'+4n(h)}).1N(\'&\')}},1x:7(4){4=$(4);d 1F=4.1h.2w();d 1S=D.k.2E[1F](4);f(1S)c 1S[1]}};D.k.2E={2u:7(4){6c(4.2g.2w()){1r\'7Z\':1r\'31\':1r\'6l\':1r\'1Y\':c D.k.2E.3J(4);1r\'6g\':1r\'6i\':c D.k.2E.5O(4)}c Y},5O:7(4){f(4.83)c[4.B,4.h]},3J:7(4){c[4.B,4.h]},1k:7(4){c D.k.2E[4.2g==\'1k-6n\'?\'5S\':\'5X\'](4)},5S:7(4){d h=\'\',2b,w=4.85;f(w>=0){2b=4.m[w];h=2b.h||2b.1Y}c[4.B,h]},5X:7(4){d h=[];G(d i=0;i<4.t;i++){d 2b=4.m[i];f(2b.87)h.W(2b.h||2b.1Y)}c[4.B,h]}};d $F=D.k.1x;1e.3D=7(){};1e.3D.v={1I:7(4,1J,1a){6.1J=1J;6.4=$(4);6.1a=1a;6.2K=6.1x();6.2A()},2A:7(){5Z(6.2D.1d(6),6.1J*4z)},2D:7(){d h=6.1x();f(6.2K!=h){6.1a(6.4,h);6.2K=h}}};D.k.3C=1b.17();D.k.3C.v=q.u(z 1e.3D(),{1x:7(){c D.k.1x(6.4)}});D.3C=1b.17();D.3C.v=q.u(z 1e.3D(),{1x:7(){c D.3a(6.4)}});1e.2c=7(){};1e.2c.v={1I:7(4,1a){6.4=$(4);6.1a=1a;6.2K=6.1x();f(6.4.1h.2w()==\'Q\')6.67();1D 6.2A(6.4)},4K:7(){d h=6.1x();f(6.2K!=h){6.1a(6.4,h);6.2K=h}},67:7(){d 12=D.2L(6.4);G(d i=0;i<12.t;i++)6.2A(12[i])},2A:7(4){f(4.2g){6c(4.2g.2w()){1r\'6g\':1r\'6i\':1o.3B(4,\'8j\',6.4K.1d(6));1y;1r\'6l\':1r\'1Y\':1r\'3J\':1r\'1k-6n\':1r\'1k-8t\':1o.3B(4,\'8u\',6.4K.1d(6));1y}}}};D.k.2c=1b.17();D.k.2c.v=q.u(z 1e.2c(),{1x:7(){c D.k.1x(6.4)}});D.2c=1b.17();D.2c.v=q.u(z 1e.2c(),{1x:7(){c D.3a(6.4)}});f(!1W.1o){d 1o=z q()}q.u(1o,{8C:8,8F:9,8H:13,8I:27,8J:37,8L:38,8O:39,8T:40,8X:46,4:7(C){c C.Z||C.91},95:7(C){c(((C.6X)&&(C.6X==1))||((C.6Z)&&(C.6Z==1)))},9b:7(C){c C.9e||(C.9f+(J.3R.2G||J.1c.2G))},9g:7(C){c C.9j||(C.9k+(J.3R.2O||J.1c.2O))},7b:7(C){f(C.7d){C.7d();C.9r()}1D{C.48=Y;C.9w=11}},9A:7(C,1h){d 4=1o.4(C);1H(4.1X&&(!4.1h||(4.1h.3Y()!=1h.3Y())))4=4.1X;c 4},1T:Y,5u:7(4,B,1V,1u){f(!6.1T)6.1T=[];f(4.5f){6.1T.W([4,B,1V,1u]);4.5f(B,1V,1u)}1D f(4.4i){6.1T.W([4,B,1V,1u]);4.4i(\'2I\'+B,1V)}},66:7(){f(!1o.1T)c;G(d i=0;i<1o.1T.t;i++){1o.5N.2n(6,1o.1T[i]);1o.1T[i][0]=1L}1o.1T=Y},3B:7(4,B,1V,1u){d 4=$(4);1u=1u||Y;f(B==\'5U\'&&(33.4u.I(/3x|3w|3u/)||4.4i))B=\'5K\';6.5u(4,B,1V,1u)},5N:7(4,B,1V,1u){d 4=$(4);1u=1u||Y;f(B==\'5U\'&&(33.4u.I(/3x|3w|3u/)||4.4k))B=\'5K\';f(4.5x){4.5x(B,1V,1u)}1D f(4.4k){1j{4.4k(\'2I\'+B,1V)}1s(e){}}}});f(33.4u.I(/\\88\\b/))1o.3B(1W,\'8a\',1o.66,Y);d 2d={6o:Y,4P:7(){6.6z=1W.8e||J.3R.2G||J.1c.2G||0;6.6F=1W.8g||J.3R.2O||J.1c.2O||0},6u:7(4){d 19=0,15=0;2q{19+=4.2O||0;15+=4.2G||0;4=4.1X}1H(4);c[15,19]},35:7(4){d 19=0,15=0;2q{19+=4.29||0;15+=4.2f||0;4=4.1Q}1H(4);c[15,19]},68:7(4){d 19=0,15=0;2q{19+=4.29||0;15+=4.2f||0;4=4.1Q;f(4){p=k.1R(4,\'14\');f(p==\'3T\'||p==\'2o\')1y}}1H(4);c[15,19]},1Q:7(4){f(4.1Q)c 4.1Q;f(4==J.1c)c 4;1H((4=4.1X)&&4!=J.1c)f(k.1R(4,\'14\')!=\'4G\')c 4;c J.1c},8o:7(4,x,y){f(6.6o)c 6.6r(4,x,y);6.3g=x;6.34=y;6.1t=6.35(4);c(y>=6.1t[1]&&y<6.1t[1]+4.2k&&x>=6.1t[0]&&x<6.1t[0]+4.2p)},6r:7(4,x,y){d 4S=6.6u(4);6.3g=x+4S[0]-6.6z;6.34=y+4S[1]-6.6F;6.1t=6.35(4);c(6.34>=6.1t[1]&&6.34<6.1t[1]+4.2k&&6.3g>=6.1t[0]&&6.3g<6.1t[0]+4.2p)},8E:7(3Z,4){f(!3Z)c 0;f(3Z==\'8G\')c((6.1t[1]+4.2k)-6.34)/4.2k;f(3Z==\'8K\')c((6.1t[0]+4.2p)-6.3g)/4.2p},77:7(O,Z){O=$(O);Z=$(Z);Z.l.14=\'2o\';d 2P=6.35(O);Z.l.1n=2P[1]+\'1m\';Z.l.18=2P[0]+\'1m\';Z.l.21=O.2p+\'1m\';Z.l.24=O.2k+\'1m\'},4e:7(4M){d 19=0,15=0;d 4=4M;2q{19+=4.29||0;15+=4.2f||0;f(4.1Q==J.1c)f(k.1R(4,\'14\')==\'2o\')1y}1H(4=4.1Q);4=4M;2q{19-=4.2O||0;15-=4.2G||0}1H(4=4.1X);c[15,19]},77:7(O,Z){d m=q.u({5l:11,5r:11,5B:11,5q:11,29:0,2f:0},N[2]||{});O=$(O);d p=2d.4e(O);Z=$(Z);d 2J=[0,0];d 3v=1L;f(k.1R(Z,\'14\')==\'2o\'){3v=2d.1Q(Z);2J=2d.4e(3v)}f(3v==J.1c){2J[0]-=J.1c.2f;2J[1]-=J.1c.29}f(m.5l)Z.l.18=(p[0]-2J[0]+m.2f)+\'1m\';f(m.5r)Z.l.1n=(p[1]-2J[1]+m.29)+\'1m\';f(m.5B)Z.l.21=O.2p+\'1m\';f(m.5q)Z.l.24=O.2k+\'1m\'},8b:7(4){4=$(4);f(4.l.14==\'2o\')c;2d.4P();d 2P=2d.68(4);d 1n=2P[1];d 18=2P[0];d 21=4.6m;d 24=4.6p;4.6P=18-3X(4.l.18||0);4.6I=1n-3X(4.l.1n||0);4.5k=4.l.21;4.7f=4.l.24;4.l.14=\'2o\';4.l.1n=1n+\'1m\';4.l.18=18+\'1m\';4.l.21=21+\'1m\';4.l.24=24+\'1m\'},8w:7(4){4=$(4);f(4.l.14==\'3T\')c;2d.4P();4.l.14=\'3T\';d 1n=3X(4.l.1n||0)-(4.6I||0);d 18=3X(4.l.18||0)-(4.6P||0);4.l.1n=1n+\'1m\';4.l.18=18+\'1m\';4.l.24=4.7f;4.l.21=4.5k}};f(/3x|3w|3u/.4v(33.62)){2d.35=7(4){d 19=0,15=0;2q{19+=4.29||0;15+=4.2f||0;f(4.1Q==J.1c)f(k.1R(4,\'14\')==\'2o\')1y;4=4.1Q}1H(4);c[15,19]}};',62,600,'||||element||this|function|||||return|var||if||value|||Element|style|options||iterator||Object|||length|extend|prototype|index|||new||name|event|Form|transport||for||match|document||result|Ajax|arguments|source|results|form|||Prototype|object|each|push||false|target||true|elements||position|valueL||create|left|valueT|callback|Class|body|bind|Abstract|className|Insertion|tagName|pair|try|select|url|px|top|Event|Enumerable|div|case|catch|offset|useCapture|undefined|container|getValue|break|replacement|pattern|onComplete|map|else|Array|method|property|while|initialize|frequency|range|null|include|join|key|requestHeaders|offsetParent|getStyle|parameter|observers|inspect|observer|window|parentNode|text|toArray|els|width|start|args|height|throw|request||parameters|offsetTop|methods|opt|EventObserver|Position|html|offsetLeft|type|fragments|typeof|fragment|offsetHeight|oStringList|_each|apply|absolute|offsetWidth|do|cache|decay|content|input|emptyFunction|toLowerCase|end|replace|childNodes|registerCallback|display|toString|onTimerEvent|Serializers|readyState|scrollLeft|exclusive|on|delta|lastValue|getElements|in|hash|scrollTop|offsets|stripScripts|iterable|truncation|gsub|template|initializeRange|Responders|insertContent|setTimeout|json||hidden|status|navigator|ycomp|cumulativeOffset|inject||||serialize|responders|_overflow|Methods|collect|adjacency|xcomp|innerHTML|count|split|response|responseIsSuccess|success|Template|responder|dispatchException|evalScripts|pluck|concat|Request|KHTML|parent|Safari|Konqueror|dispatch|failure|receiver|observe|Observer|TimedObserver|ScriptFragment|responseText|script|inputs|ancestor|textarea|classNames|ObjectRange|node|typeName|RegExp|camelize|none|documentElement|ClassNames|relative|right|overflow|HTMLElement|parseFloat|toUpperCase|mode||currentlyExecuting|remove|__method|Base|memo||slice|returnValue|continue|setOptions|String|classNameToRemove|_reverse|page|focus|queryComponent|Hash|attachEvent|post|detachEvent|Version|reverse|encodeURIComponent|disabled|asynchronous|eval|respondToReadyState|activeRequestCount|Complete|appVersion|test|getTransport|containers|matchingInputs|1000|header|updater|Updater|getElementsByTagName|child|responderToAdd|static|tagElements|queryComponents|defaultView|onElementEvent|css|forElement|values|visibility|prepare|mergedHash|pos|offsetcache|_madePositioned|visible|tbody|findOrStore|_nativeExtensions|createElement|digits|trues|found|prepareReplacement|before|camelizedString|insertBefore|selectNodeContents|exception|falses|criteria|classNameToAdd|params|set|destination|last|addEventListener|indexOf|inline|clear|succ|_originalWidth|setLeft|Top|ActiveXObject|scriptTag|matchOne|setHeight|setTop|without|responderToRemove|_observeAndCache|find|reset|removeEventListener|activate|findFirstElement|setRequestHeaders|setWidth|XMLHttpRequest|constructor|application|xml|onCreate|contentType|Field|onStateChange|keydown|Events|evalJSON|stopObserving|inputSelector|img|Content|evalResponse|selectOne|onreadystatechange|keypress|postBody|onException|selectMany|updateContent|setInterval|insertion|PeriodicalUpdater|userAgent|updateComplete|lastText|timer|unloadCache|registerFormCallbacks|positionedOffset|register|parentElement|children|switch|XMLHTTP|_extended|hide|checkbox|update|radio|these|outerHTML|password|clientWidth|one|includeScrollOffsets|clientHeight|nodeValue|withinIncludingScrolloffsets|Try|scrollTo|realOffset|getComputedStyle|show|currentStyle|auto|deltaX|originalPosition|originalVisibility|originalWidth|originalHeight|opera|deltaY|bottom|array|_originalTop|flatten|addMethods|lambda|Toggle|toggle|insertAdjacentHTML|_originalLeft|PeriodicalExecuter|ownerDocument|createRange|createContextualFragment|contentFromAnonymousTable|table|Before|which|matchAll|button|extractScripts|stripTags|pairString|len|collapse|appendChild|After|clone|toQueryParams|Pattern|evaluate|stop|stringValue|preventDefault|charAt|_originalHeight|substring|Bottom|pairs|Function|add|collections|javascript|detect|findAll|entries|from|first|compact|keys|merge|present|toQueryString|getInputs|Msxml2|Microsoft|unregister|disable|urlencoded|blur|300|enable|responseIsFailure|Uninitialized|Loaded|Interactive|_|get|focusFirstElement|open|send|Requested|With|Accept|overrideMimeType|Connection|close|setRequestHeader|getResponseHeader|JSON|gi|submit|Loading|Success|Failure|checked|200|selectedIndex|www|selected|bMSIE|clearTimeout|unload|absolutize|string|getElementById|pageXOffset|getElementsByClassName|pageYOffset|removeChild|replaceChild|click|getHeight|hasClassName|addClassName|removeClassName|within|cleanWhitespace|nodeType|empty|childOf|multiple|change|getPropertyValue|relativize|setStyle|getDimensions|makePositioned|undoPositioned|makeClipping|KEY_BACKSPACE|undoClipping|overlap|KEY_TAB|vertical|KEY_RETURN|KEY_ESC|KEY_LEFT|horizontal|KEY_UP|member|tr|KEY_RIGHT|0_RC_0|Number|instanceof|shift|KEY_DOWN|bindAsEventListener|call|toColorPart|KEY_DELETE|times|finally|callee|srcElement|sub|scan|truncate|isLeftClick|beforeBegin|setStartBefore|im|afterBegin|firstChild|pointerX|unescapeHTML|beforeEnd|pageX|clientX|pointerY|parseQuery|afterEnd|pageY|clientY|RangeError|setStartAfter|all|any|grep|invoke|stopPropagation|max|nextSibling|min|partition|cancelBubble|reject|sortBy|sort|findElement|zip|pop|createTextNode|escapeHTML|strip'.split('|'),0,{})
+
+} \ No newline at end of file
diff --git a/SunSpider/tests/sunspider-0.9/string-validate-input.js b/SunSpider/tests/sunspider-0.9/string-validate-input.js
new file mode 100644
index 0000000..3455b32
--- /dev/null
+++ b/SunSpider/tests/sunspider-0.9/string-validate-input.js
@@ -0,0 +1,89 @@
+letters = new Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
+numbers = new Array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26);
+colors = new Array("FF","CC","99","66","33","00");
+
+var endResult;
+
+function doTest()
+{
+ endResult = "";
+
+ // make up email address
+ for (var k=0;k<4000;k++)
+ {
+ name = makeName(6);
+ (k%2)?email=name+"@mac.com":email=name+"(at)mac.com";
+
+ // validate the email address
+ var pattern = /^[a-zA-Z0-9\-\._]+@[a-zA-Z0-9\-_]+(\.?[a-zA-Z0-9\-_]*)\.[a-zA-Z]{2,3}$/;
+
+ if(pattern.test(email))
+ {
+ var r = email + " appears to be a valid email address.";
+ addResult(r);
+ }
+ else
+ {
+ r = email + " does NOT appear to be a valid email address.";
+ addResult(r);
+ }
+ }
+
+ // make up ZIP codes
+ for (var s=0;s<4000;s++)
+ {
+ var zipGood = true;
+ var zip = makeNumber(4);
+ (s%2)?zip=zip+"xyz":zip=zip.concat("7");
+
+ // validate the zip code
+ for (var i = 0; i < zip.length; i++) {
+ var ch = zip.charAt(i);
+ if (ch < "0" || ch > "9") {
+ zipGood = false;
+ r = zip + " contains letters.";
+ addResult(r);
+ }
+ }
+ if (zipGood && zip.length>5)
+ {
+ zipGood = false;
+ r = zip + " is longer than five characters.";
+ addResult(r);
+ }
+ if (zipGood)
+ {
+ r = zip + " appears to be a valid ZIP code.";
+ addResult(r);
+ }
+ }
+}
+
+function makeName(n)
+{
+ var tmp = "";
+ for (var i=0;i<n;i++)
+ {
+ var l = Math.floor(26*Math.random());
+ tmp += letters[l];
+ }
+ return tmp;
+}
+
+function makeNumber(n)
+{
+ var tmp = "";
+ for (var i=0;i<n;i++)
+ {
+ var l = Math.floor(9*Math.random());
+ tmp = tmp.concat(l);
+ }
+ return tmp;
+}
+
+function addResult(r)
+{
+ endResult += "\n" + r;
+}
+
+doTest();
diff --git a/SunSpider/tests/ubench/LIST b/SunSpider/tests/ubench/LIST
new file mode 100644
index 0000000..d005340
--- /dev/null
+++ b/SunSpider/tests/ubench/LIST
@@ -0,0 +1,9 @@
+function-closure
+function-empty
+function-correct-args
+function-excess-args
+function-missing-args
+function-sum
+loop-empty-resolve
+loop-empty
+loop-sum
diff --git a/SunSpider/tests/LIST-V8 b/SunSpider/tests/v8-v4/LIST
index 117011b..117011b 100644
--- a/SunSpider/tests/LIST-V8
+++ b/SunSpider/tests/v8-v4/LIST
diff --git a/SunSpider/tests/v8-crypto.js b/SunSpider/tests/v8-v4/v8-crypto.js
index 98e171d..98e171d 100644
--- a/SunSpider/tests/v8-crypto.js
+++ b/SunSpider/tests/v8-v4/v8-crypto.js
diff --git a/SunSpider/tests/v8-deltablue.js b/SunSpider/tests/v8-v4/v8-deltablue.js
index ddbf3bc..ddbf3bc 100644
--- a/SunSpider/tests/v8-deltablue.js
+++ b/SunSpider/tests/v8-v4/v8-deltablue.js
diff --git a/SunSpider/tests/v8-earley-boyer.js b/SunSpider/tests/v8-v4/v8-earley-boyer.js
index 6c4c635..6c4c635 100644
--- a/SunSpider/tests/v8-earley-boyer.js
+++ b/SunSpider/tests/v8-v4/v8-earley-boyer.js
diff --git a/SunSpider/tests/v8-raytrace.js b/SunSpider/tests/v8-v4/v8-raytrace.js
index 0a7a292..0a7a292 100644
--- a/SunSpider/tests/v8-raytrace.js
+++ b/SunSpider/tests/v8-v4/v8-raytrace.js
diff --git a/SunSpider/tests/v8-regexp.js b/SunSpider/tests/v8-v4/v8-regexp.js
index a3ac081..a3ac081 100644
--- a/SunSpider/tests/v8-regexp.js
+++ b/SunSpider/tests/v8-v4/v8-regexp.js
diff --git a/SunSpider/tests/v8-richards.js b/SunSpider/tests/v8-v4/v8-richards.js
index b1a50ea..b1a50ea 100644
--- a/SunSpider/tests/v8-richards.js
+++ b/SunSpider/tests/v8-v4/v8-richards.js
diff --git a/SunSpider/tests/v8-splay.js b/SunSpider/tests/v8-v4/v8-splay.js
index abdbbde..abdbbde 100644
--- a/SunSpider/tests/v8-splay.js
+++ b/SunSpider/tests/v8-v4/v8-splay.js
diff --git a/WebCore/Android.derived.jscbindings.mk b/WebCore/Android.derived.jscbindings.mk
index 1d7c722..067aa0c 100644
--- a/WebCore/Android.derived.jscbindings.mk
+++ b/WebCore/Android.derived.jscbindings.mk
@@ -154,6 +154,7 @@ $(patsubst %.h,%.cpp,$(GEN)): $(intermediates)/dom/%.cpp : $(intermediates)/dom/
# HTML
GEN := \
+ $(intermediates)/html/JSBlob.h \
$(intermediates)/html/JSDataGridColumn.h \
$(intermediates)/html/JSDataGridColumnList.h \
$(intermediates)/html/JSFile.h \
diff --git a/WebCore/Android.derived.mk b/WebCore/Android.derived.mk
index c0afe81..c678e60 100644
--- a/WebCore/Android.derived.mk
+++ b/WebCore/Android.derived.mk
@@ -130,6 +130,14 @@ $(intermediates)/css/UserAgentStyleSheets.cpp : $(GEN)
# XML attribute names
+GEN:= $(intermediates)/XMLNSNames.cpp
+$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
+$(GEN): PRIVATE_CUSTOM_TOOL = perl -I $(PRIVATE_PATH)/bindings/scripts $< --attrs $(xmlns_attrs) --output $(dir $@)
+$(GEN): xmlns_attrs := $(LOCAL_PATH)/xml/xmlnsattrs.in
+$(GEN): $(LOCAL_PATH)/dom/make_names.pl $(xmlns_attrs)
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
GEN:= $(intermediates)/XMLNames.cpp
$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
$(GEN): PRIVATE_CUSTOM_TOOL = perl -I $(PRIVATE_PATH)/bindings/scripts $< --attrs $(xml_attrs) --output $(dir $@)
diff --git a/WebCore/Android.derived.v8bindings.mk b/WebCore/Android.derived.v8bindings.mk
index 44253eb..ff547e6 100644
--- a/WebCore/Android.derived.v8bindings.mk
+++ b/WebCore/Android.derived.v8bindings.mk
@@ -137,6 +137,7 @@ $(patsubst %.h,%.cpp,$(GEN)): $(intermediates)/bindings/%.cpp : $(intermediates)
# HTML
GEN := \
+ $(intermediates)/bindings/V8Blob.h \
$(intermediates)/bindings/V8DataGridColumn.h \
$(intermediates)/bindings/V8DataGridColumnList.h \
$(intermediates)/bindings/V8File.h \
diff --git a/WebCore/Android.jscbindings.mk b/WebCore/Android.jscbindings.mk
index afe0787..0802db7 100644
--- a/WebCore/Android.jscbindings.mk
+++ b/WebCore/Android.jscbindings.mk
@@ -119,7 +119,6 @@ LOCAL_SRC_FILES += \
bindings/js/JSHistoryCustom.cpp \
bindings/js/JSImageConstructor.cpp \
bindings/js/JSImageDataCustom.cpp \
- bindings/js/JSInspectedObjectWrapper.cpp \
bindings/js/JSLazyEventListener.cpp \
bindings/js/JSLocationCustom.cpp \
bindings/js/JSMessageChannelConstructor.cpp \
@@ -146,8 +145,6 @@ LOCAL_SRC_FILES += \
bindings/js/JSSVGMatrixCustom.cpp \
bindings/js/JSSVGPathSegCustom.cpp \
bindings/js/JSSVGPathSegListCustom.cpp \
- bindings/js/JSSVGPointListCustom.cpp \
- bindings/js/JSSVGTransformListCustom.cpp \
bindings/js/JSSharedWorkerConstructor.cpp \
bindings/js/JSSharedWorkerCustom.cpp \
bindings/js/JSStorageCustom.cpp \
diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index 0ee11f2..cbbd22d 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -239,6 +239,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
\
history/android/HistoryItemAndroid.cpp \
\
+ html/Blob.cpp \
html/CollectionCache.cpp \
html/File.cpp \
html/FileList.cpp \
@@ -596,6 +597,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
rendering/RenderBoxModelObject.cpp \
rendering/RenderButton.cpp \
rendering/RenderCounter.cpp \
+ rendering/RenderEmbeddedObject.cpp \
rendering/RenderFieldset.cpp \
rendering/RenderFileUploadControl.cpp \
rendering/RenderFlexibleBox.cpp \
@@ -639,6 +641,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
rendering/RenderSVGInlineText.cpp \
rendering/RenderSVGModelObject.cpp \
rendering/RenderSVGRoot.cpp \
+ rendering/RenderSVGShadowTreeRootContainer.cpp \
rendering/RenderSVGTSpan.cpp \
rendering/RenderSVGText.cpp \
rendering/RenderSVGTextPath.cpp \
@@ -674,9 +677,11 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
rendering/SVGCharacterLayoutInfo.cpp \
rendering/SVGInlineFlowBox.cpp \
rendering/SVGInlineTextBox.cpp \
+ rendering/SVGMarkerLayoutInfo.cpp \
rendering/SVGRenderSupport.cpp \
rendering/SVGRenderTreeAsText.cpp \
- rendering/SVGRootInlineBox.cpp
+ rendering/SVGRootInlineBox.cpp \
+ rendering/SVGShadowTreeElements.cpp
endif
LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
diff --git a/WebCore/Android.v8bindings.mk b/WebCore/Android.v8bindings.mk
index 57c22b9..1576a7c 100644
--- a/WebCore/Android.v8bindings.mk
+++ b/WebCore/Android.v8bindings.mk
@@ -98,7 +98,6 @@ LOCAL_SRC_FILES += \
bindings/v8/custom/V8ClipboardCustom.cpp \
bindings/v8/custom/V8ConsoleCustom.cpp \
bindings/v8/custom/V8CoordinatesCustom.cpp \
- bindings/v8/custom/V8CustomBinding.cpp \
bindings/v8/custom/V8CustomEventListener.cpp \
bindings/v8/custom/V8CustomPositionCallback.cpp \
bindings/v8/custom/V8CustomPositionErrorCallback.cpp \
@@ -108,7 +107,6 @@ LOCAL_SRC_FILES += \
bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp \
bindings/v8/custom/V8CustomVoidCallback.cpp \
bindings/v8/custom/V8DOMApplicationCacheCustom.cpp \
- bindings/v8/custom/V8DOMParserConstructor.cpp \
bindings/v8/custom/V8DOMWindowCustom.cpp \
bindings/v8/custom/V8DataGridColumnListCustom.cpp \
bindings/v8/custom/V8DatabaseCustom.cpp \
@@ -117,6 +115,8 @@ LOCAL_SRC_FILES += \
bindings/v8/custom/V8DocumentLocationCustom.cpp \
bindings/v8/custom/V8ElementCustom.cpp \
bindings/v8/custom/V8EventCustom.cpp \
+ bindings/v8/custom/V8EventSourceConstructor.cpp \
+ bindings/v8/custom/V8EventSourceCustom.cpp \
bindings/v8/custom/V8FileListCustom.cpp \
bindings/v8/custom/V8GeolocationCustom.cpp \
bindings/v8/custom/V8HistoryCustom.cpp \
@@ -143,7 +143,6 @@ LOCAL_SRC_FILES += \
bindings/v8/custom/V8MessageEventCustom.cpp \
bindings/v8/custom/V8NamedNodeMapCustom.cpp \
bindings/v8/custom/V8NamedNodesCollection.cpp \
- bindings/v8/custom/V8NavigatorCustom.cpp \
bindings/v8/custom/V8NodeCustom.cpp \
bindings/v8/custom/V8NodeFilterCustom.cpp \
bindings/v8/custom/V8NodeIteratorCustom.cpp \
@@ -171,10 +170,10 @@ LOCAL_SRC_FILES += \
bindings/v8/custom/V8WorkerCustom.cpp \
bindings/v8/custom/V8XMLHttpRequestConstructor.cpp \
bindings/v8/custom/V8XMLHttpRequestCustom.cpp \
- bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp \
- bindings/v8/custom/V8XMLSerializerConstructor.cpp
+ bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp
LOCAL_SRC_FILES += \
+<<<<<<< HEAD
bridge/jni/JNIBridge.cpp \
bridge/jni/JNIUtility.cpp \
bridge/jni/v8/JNIBridgeV8.cpp \
@@ -182,3 +181,6 @@ LOCAL_SRC_FILES += \
bridge/jni/v8/JavaClassV8.cpp \
bridge/jni/v8/JavaInstanceV8.cpp \
bridge/jni/v8/JavaNPObjectV8.cpp
+=======
+ bridge/jni/JNIUtility.cpp
+>>>>>>> webkit.org at r54127
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4156ead..e69cdc8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
2010-01-29 Steve Falkenburg <sfalken@apple.com>
Reviewed by Darin Adler.
@@ -574,75376 +575,446 @@
(WebCore::GraphicsContext3D::getActiveUniform):
(WebCore::GraphicsContext3D::getError):
(WebCore::GraphicsContext3D::synthesizeGLError):
+=======
+2010-02-01 Philippe Normand <pnormand@igalia.com>
-2009-12-10 Stephen White <senorblanco@chromium.org>
+ Rubber stamped by Xan Lopez.
+>>>>>>> webkit.org at r54127
- Reviewed by Dimitri Glazkov.
+ Fixed compilation warning about unsigned vs signed comparison.
- Fix for assert on Chrome/skia with SVG Filters enabled.
- https://bugs.webkit.org/show_bug.cgi?id=32394
-
- Covered by LayoutTests/svg/W3C-SVG-1.1/filters-tile-01-b.svg and others.
-
- * platform/graphics/skia/ImageBufferSkia.cpp:
- (WebCore::ImageBuffer::platformTransformColorSpace):
-
-2009-12-10 Enrica Casucci <enrica@apple.com>
-
- Reviewed by Darin Adler.
-
- REGRESSION(4.0.4-42a12): With 2 highlighted lines of text in gmail/hotmail selecting Bold selects other 2 edit buttons automatically.
- <rdar://problem/7442065>
- https://bugs.webkit.org/show_bug.cgi?id=32285
-
- When examining the styles of the nodes after the first in a range selection, we take into
- cosideration differences in style of txt nodes only.
-
- Test: editing/execCommand/queryCommandState-02.html
-
- * editing/Editor.cpp:
- (WebCore::Editor::selectionHasStyle):
-
-2009-12-10 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Alexey Proskuryakov.
-
- Crash in XMLTokenizer::popCurrentNode if window.close() is called during parsing
- https://bugs.webkit.org/show_bug.cgi?id=31576
-
- Add a RefCounted wrapper object around xmlParserCtxtPtr so we can
- maintain it's lifetime more effectively.
-
- Test: fast/parser/xhtml-close-while-parsing.xhtml
-
- * dom/XMLTokenizer.cpp:
- (WebCore::XMLTokenizer::popCurrentNode):
- * dom/XMLTokenizer.h:
- (WebCore::XMLParserContext::context):
- (WebCore::XMLParserContext::XMLParserContext):
- (WebCore::XMLTokenizer::context):
- * dom/XMLTokenizerLibxml2.cpp:
- (WebCore::XMLParserContext::createStringParser):
- (WebCore::XMLParserContext::createMemoryParser):
- (WebCore::XMLParserContext::~XMLParserContext):
- (WebCore::XMLTokenizer::~XMLTokenizer):
- (WebCore::XMLTokenizer::doWrite):
- (WebCore::XMLTokenizer::initializeParserContext):
- (WebCore::XMLTokenizer::doEnd):
- (WebCore::XMLTokenizer::lineNumber):
- (WebCore::XMLTokenizer::columnNumber):
- (WebCore::XMLTokenizer::stopParsing):
- (WebCore::parseXMLDocumentFragment):
- (WebCore::parseAttributes):
-
-2009-12-10 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: debugger shortcuts don't work when
- Search field or Console drawer has focus.
-
- https://bugs.webkit.org/show_bug.cgi?id=32392
-
- * inspector/front-end/inspector.js:
- (WebInspector.loaded):
- (WebInspector.documentKeyDown):
- (WebInspector.documentKeyUp):
- (WebInspector.searchKeyDown):
-
-2009-12-10 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Adam Barth.
-
- [V8] Events created in isolated worlds may fire in main world.
- https://bugs.webkit.org/show_bug.cgi?id=32386
-
- Test: http/tests/security/isolatedWorld/events.html
-
- * WebCore.gypi: Added WorldContextHandle.
- * bindings/v8/ScriptEventListener.cpp:
- (WebCore::createAttributeEventListener): Added WorldContextHandle params.
- * bindings/v8/SharedPersistent.h: Fixed a few style/include issues.
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::V8AbstractEventListener): Added WorldContextHandle params.
- (WebCore::V8AbstractEventListener::handleEvent): Adjusted context retrieval to use WorldContextHandle.
- (WebCore::V8AbstractEventListener::invokeEventHandler): Ditto.
- * bindings/v8/V8AbstractEventListener.h:
- (WebCore::V8AbstractEventListener::worldContext): Added WorldContextHandle params.
- * bindings/v8/V8EventListenerList.h:
- (WebCore::V8EventListenerList::findOrCreateWrapper): Ditto.
- * bindings/v8/V8LazyEventListener.cpp:
- (WebCore::V8LazyEventListener::V8LazyEventListener): Ditto.
- (WebCore::V8LazyEventListener::prepareListenerObject): Adjusted context retrieval to use WorldContextHandle.
- * bindings/v8/V8LazyEventListener.h:
- (WebCore::V8LazyEventListener::create): Added WorldContextHandle params.
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::context): Refactored to use mainWorldContext();
- (WebCore::V8Proxy::mainWorldContext): Added.
- (WebCore::toV8Context): Changed to use WorldContextHandle.
- * bindings/v8/V8Proxy.h: Added mainWorldContext decl.
- * bindings/v8/V8Utilities.cpp:
- (WebCore::reportException): Added an extra check to avoid crashes during frame teardown.
- * bindings/v8/V8WorkerContextEventListener.cpp:
- (WebCore::V8WorkerContextEventListener::V8WorkerContextEventListener): Added WorldContextHandle params.
- * bindings/v8/V8WorkerContextEventListener.h:
- (WebCore::V8WorkerContextEventListener::create): Added WorldContextHandle params.
- * bindings/v8/WorldContextHandle.cpp: Added.
- * bindings/v8/WorldContextHandle.h: Added.
- * bindings/v8/custom/V8CustomEventListener.cpp:
- (WebCore::V8EventListener::V8EventListener): Added WorldContextHandle params.
- * bindings/v8/custom/V8CustomEventListener.h:
- (WebCore::V8EventListener::create): Added WorldContextHandle params.
-
-2009-12-10 Jon Honeycutt <jhoneycutt@apple.com>
-
- Pass more information about a plug-in to the PluginHalterDelegate
-
- Reviewed by Adam Roben.
-
- * loader/EmptyClients.h:
- Remove this unused class.
-
- * page/HaltablePlugin.h:
- Add new functions to return the plug-in's name and whether it is
- windowed.
-
- * page/PluginHalter.cpp:
- (WebCore::PluginHalter::timerFired):
- Pass new arguments to the client.
-
- * page/PluginHalterClient.h:
- Add new parameters.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::pluginName):
- Return the name from the PluginPackage.
-
- * plugins/PluginView.h:
- (WebCore::PluginView::isWindowed):
-
-2009-12-09 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Pavel Feldman.
-
- Fixes <http://webkit.org/b/31738>.
- Web Inspector: Console Scope Bar should be on top of console when Console is a Panel.
-
- When the console is set to be shown as a full panel, move the scope bar to the top
- where it looks best. When it is only shown as a drawer, move it to the bottom, where
- it originally was. This takes up less space as a drawer, and makes it more discoverable
- and usable when it is the full panel.
-
- * inspector/front-end/ConsolePanel.js:
- (WebInspector.ConsolePanel.prototype.show): Move filter bar to top.
- (WebInspector.ConsolePanel.prototype.hide): Move filter bar back to bottom.
- * inspector/front-end/inspector.css:
-
-2009-12-10 Stephen White <senorblanco@chromium.org>
-
- Reviewed by Dirk Schulze.
-
- Fix for alpha blending in SVG Filters on Chromium/skia.
- https://bugs.webkit.org/show_bug.cgi?id=32378
-
- Covered by LayoutTests/svg/filters/feGaussianBlur.svg and others.
-
- * platform/graphics/skia/ImageBufferSkia.cpp:
- (WebCore::ImageBuffer::platformTransformColorSpace):
-
-2009-12-10 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Add context menu actions for DOM tree.
-
- https://bugs.webkit.org/show_bug.cgi?id=32348
-
- * English.lproj/localizedStrings.js:
- * inspector/front-end/ContextMenu.js:
- (WebInspector.ContextMenu):
- (WebInspector.ContextMenu.prototype.show):
- (WebInspector.ContextMenu.prototype.appendItem):
- (WebInspector.ContextMenu.prototype.appendSeparator):
- (WebInspector.ContextMenu.prototype._itemSelected):
- (WebInspector.contextMenuItemSelected):
- (WebInspector.contextMenuCleared):
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeOutline.prototype._onmouseout):
- (WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
- (WebInspector.ElementsTreeElement.prototype.ondblclick):
- (WebInspector.ElementsTreeElement.prototype._startEditingFromEvent):
- (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
- (WebInspector.ElementsTreeElement.prototype._populateTextContextMenu):
- (WebInspector.ElementsTreeElement.prototype._startEditing):
- (WebInspector.ElementsTreeElement.prototype._addNewAttribute):
- * inspector/front-end/ObjectPropertiesSection.js:
- (WebInspector.ObjectPropertyTreeElement.prototype.ondblclick):
- * inspector/front-end/ResourceView.js:
- (WebInspector.ResourceView.prototype._toggleURLdecoding):
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylePropertyTreeElement.prototype):
- * inspector/front-end/inspector.js:
- (WebInspector.contextMenuEventFired):
- * inspector/front-end/treeoutline.js:
- (TreeElement.treeElementDoubleClicked):
-
-2009-12-09 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Reviewed by Oliver Hunt.
-
- Filters contain some leaks in untested code
- https://bugs.webkit.org/show_bug.cgi?id=32325
-
- Fix obvious leak in SVGFE*Lighting classes. Implement the create() idiom for
- all classes in svg/graphics, that were missing it. The lighting filters aren't
- implemented so far, but the associated FilterEffect objects are build, which created
- these leaks.
-
- This removes the SVG related failures in the leaks bot.
-
- * svg/SVGFEDiffuseLightingElement.cpp:
- (WebCore::SVGFEDiffuseLightingElement::findLights):
- * svg/SVGFEDiffuseLightingElement.h:
- * svg/SVGFEDistantLightElement.cpp:
- (WebCore::SVGFEDistantLightElement::lightSource):
- * svg/SVGFEDistantLightElement.h:
- * svg/SVGFELightElement.h:
- * svg/SVGFEPointLightElement.cpp:
- (WebCore::SVGFEPointLightElement::lightSource):
- * svg/SVGFEPointLightElement.h:
- * svg/SVGFESpecularLightingElement.cpp:
- (WebCore::SVGFESpecularLightingElement::findLights):
- * svg/SVGFESpecularLightingElement.h:
- * svg/SVGFESpotLightElement.cpp:
- (WebCore::SVGFESpotLightElement::lightSource):
- * svg/SVGFESpotLightElement.h:
- * svg/graphics/filters/SVGDistantLightSource.h:
- (WebCore::DistantLightSource::create):
- (WebCore::DistantLightSource::DistantLightSource):
- * svg/graphics/filters/SVGFEDiffuseLighting.cpp:
- (WebCore::FEDiffuseLighting::FEDiffuseLighting):
- (WebCore::FEDiffuseLighting::create):
- (WebCore::FEDiffuseLighting::setLightSource):
- * svg/graphics/filters/SVGFEDiffuseLighting.h:
- * svg/graphics/filters/SVGFESpecularLighting.cpp:
- (WebCore::FESpecularLighting::FESpecularLighting):
- (WebCore::FESpecularLighting::create):
- (WebCore::FESpecularLighting::setLightSource):
- * svg/graphics/filters/SVGFESpecularLighting.h:
- * svg/graphics/filters/SVGLightSource.h:
- * svg/graphics/filters/SVGPointLightSource.h:
- (WebCore::PointLightSource::create):
- (WebCore::PointLightSource::PointLightSource):
- * svg/graphics/filters/SVGSpotLightSource.h:
- (WebCore::SpotLightSource::create):
- (WebCore::SpotLightSource::SpotLightSource):
-
-2009-12-10 Kenneth Russell <kbr@google.com>
-
- Reviewed by Oliver Hunt.
-
- [Chromium] SporeViewer demo doesn't work in Chromium
- https://bugs.webkit.org/show_bug.cgi?id=32364
-
- Test: fast/canvas/webgl/bug-32364.html
-
- * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::vertexAttribAndUniformHelperf):
- (WebCore::uniformHelperi):
-
-2009-12-09 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=32346 SVG property
- -webkit-shadow should apply shadow on the result after compositing
- -and corresponding-
- <rdar://problem/7389404>
-
- Set a transparency layer when setting a shadow to apply the shadow
- to the composite.
- * rendering/SVGRenderSupport.cpp:
- (WebCore::SVGRenderBase::prepareToRenderSVGContent):
- (WebCore::SVGRenderBase::finishRenderSVGContent):
-
-2009-12-09 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=32332
- WebSocket events should be dispatched synchronously
-
- Updated websocket/tests/simple to test for the new behavior.
-
- When Web Sockets API says that events should be queued for async dispatch, it means something
- different. We should keep this in mind when dealing with other HTML5-related specs.
-
- The model for HTML5 is that code running in response to network events (e.g. WebSocket or
- XMLHttpRequest algorithms) runs in a separate thread of execution, and thus needs to post
- async events as its only way to communicate with client code. As long as network events are
- queued themselves (as they are in WebKit), there is no need to queue JS events for async
- dispatch.
-
- * websockets/WebSocket.cpp:
- (WebCore::WebSocket::didConnect):
- (WebCore::WebSocket::didReceiveMessage):
- (WebCore::WebSocket::didClose):
-
-2009-12-09 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Oliver Hunt.
-
- https://bugs.webkit.org/show_bug.cgi?id=32355
- Assertion failure when opening a WebSocket connection
-
- I couldn't make a reliable test for this. Once the test from bug 32299 is landed, it
- will provide partial coverage, as I was frequently seeing the assertion failure with it.
-
- * platform/network/SocketStreamHandleBase.cpp: (WebCore::SocketStreamHandleBase::send):
- It's not an error if zero is returned from platformSend() - it just means that nothing could
- be pushed down to the network layer, and all data was queued for later.
- * platform/network/cf/SocketStreamHandleCFNet.cpp:
- (WebCore::SocketStreamHandle::readStreamCallback): This will no longer happen with SocketStream,
- but a client can potentially destroy the handle from any callback, so we need to check that
- this didn't happen.
- (WebCore::SocketStreamHandle::writeStreamCallback): Ditto.
-
-2009-12-09 Sam Weinig <sam@webkit.org>
-
- Roll out 51919 and 51920. They were incorrect and unnecessary right now.
-
- * platform/mac/WebCoreObjCExtras.mm:
- (WebCoreObjCScheduleDeallocateOnMainThread):
- * platform/network/mac/NetworkStateNotifierMac.cpp:
- (WebCore::NetworkStateNotifier::NetworkStateNotifier):
-
-2009-12-09 Steve Block <steveblock@google.com>
-
- Reviewed by Darin Fisher.
-
- Adds wtf/StdLibExtras.h include for DEFINE_STATIC_LOCAL in V8 ScriptState.
- https://bugs.webkit.org/show_bug.cgi?id=32330
-
- Build fix only, no new tests.
-
- * bindings/v8/ScriptState.cpp: Modified. Adds wtf/StdLibExtras.h include.
-
-2009-12-09 Steve Block <steveblock@google.com>
-
- Reviewed by Darin Adler.
-
- Adds ENABLE(INSPECTOR) guards around script binding methods that use types
- defined only when INSPECTOR is enabled.
- https://bugs.webkit.org/show_bug.cgi?id=32328
-
- Build fix only, no new tests.
-
- * bindings/js/ScriptValue.cpp: Modified. Added ENABLE(INSPECTOR) guard to ScriptValue::quarantineValue.
- * bindings/v8/ScriptObject.cpp: Modified. Added ENABLE(INSPECTOR) guard to some overloads of ScriptGlobalObject::set.
-
-2009-12-09 Steve Block <steveblock@google.com>
-
- Reviewed by Adam Barth.
-
- Adds Android Makefiles for building with V8.
- Also updates existing Android Makefiles with latest additions.
- https://bugs.webkit.org/show_bug.cgi?id=32278
-
- Build fix only, no new tests.
-
- * Android.derived.jscbindings.mk: Modified.
- * Android.derived.mk: Modified.
- * Android.derived.v8bindings.mk: Added.
- * Android.jscbindings.mk: Modified.
- * Android.mk: Modified.
- * Android.v8bindings.mk: Added.
-
-2009-12-09 Jonathan Dixon <joth@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Bug 32338 - [Chromium] Fix Chromium builder by including missing GeolocationServiceChromium
- https://bugs.webkit.org/show_bug.cgi?id=32338
-
- Fix build break: re-include file dropped out by merge in http://trac.webkit.org/changeset/51681/trunk/WebCore/WebCore.gypi
-
- * WebCore.gypi: Add missing GeolocationServiceChromium.cpp
-
-2009-12-09 Andreas Kling <andreas.kling@nokia.com>
-
- Reviewed by Brady Eidson.
-
- Fixed a typo in http://trac.webkit.org/changeset/51644 that broke
- the QWebPage autotest.
-
- No new test required.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::navigateToDifferentDocument):
-
-2009-12-09 Robert Hogan <robert@roberthogan.net>
-
- Reviewed by Eric Seidel.
-
- Exclude JSSVG*.cpp generated files from --minimal and --no-svg builds.
-
- https://bugs.webkit.org/show_bug.cgi?id=32286
-
- * WebCore.pro:
-
-2009-12-09 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Eric Carlson.
-
- Ogg mimetypes are incorrect
- https://bugs.webkit.org/show_bug.cgi?id=27113
-
- The ogg extension is handled by audio/ogg instead of
- application/ogg. See
- http://wiki.xiph.org/MIME_Types_and_File_Extensions
-
- * platform/MIMETypeRegistry.cpp:
- (WebCore::TypeExtensionPair::):
-
-2009-12-09 Sam Weinig <sam@webkit.org>
-
- Reviewed by Anders Carlsson.
-
- Use the current run loop instead of the main runloop for the NetworkStateNotifier.
-
- * platform/network/mac/NetworkStateNotifierMac.cpp:
- (WebCore::NetworkStateNotifier::NetworkStateNotifier):
-
-2009-12-09 Sam Weinig <sam@webkit.org>
-
- Reviewed by Anders Carlsson.
-
- Use isMainThread() helper instead of pthread_main_np() != 0.
-
- * platform/mac/WebCoreObjCExtras.mm:
- (WebCoreObjCScheduleDeallocateOnMainThread):
-
-2009-12-09 Sam Weinig <sam@webkit.org>
-
- Reviewed by Anders Carlsson.
-
- Add some #ifdefs to allow us to experiment with a single NSView mac WebKit.
-
- * page/Chrome.h:
- * page/EventHandler.h:
- * page/mac/ChromeMac.mm:
- * page/mac/DragControllerMac.mm:
- (WebCore::DragController::dragOperation):
- * page/mac/EventHandlerMac.mm:
- (WebCore::EventHandler::eventLoopHandleMouseDragged):
- (WebCore::EventHandler::eventActivatedView):
- (WebCore::EventHandler::passMousePressEventToSubframe):
- (WebCore::EventHandler::passMouseMoveEventToSubframe):
- (WebCore::EventHandler::passMouseReleaseEventToSubframe):
- (WebCore::EventHandler::passWheelEventToWidget):
- (WebCore::EventHandler::focusDocumentView):
- (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
- (WebCore::EventHandler::createDraggingClipboard):
- (WebCore::isKeyboardOptionTab):
- (WebCore::EventHandler::invertSenseOfTabsToLinks):
- (WebCore::EventHandler::tabsToAllControls):
- (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
- (WebCore::EventHandler::accessKeyModifiers):
- * platform/ScrollView.cpp:
- (WebCore::ScrollView::wheelEvent):
- * platform/Widget.cpp:
- * platform/Widget.h:
- * platform/mac/ScrollViewMac.mm:
- * platform/mac/WidgetMac.mm:
- (WebCore::Widget::Widget):
- (WebCore::Widget::~Widget):
- (WebCore::Widget::show):
- (WebCore::Widget::hide):
- (WebCore::Widget::setCursor):
- (WebCore::Widget::paint):
- (WebCore::Widget::setFocus):
- (WebCore::Widget::setIsSelected):
- (WebCore::Widget::frameRect):
- (WebCore::Widget::setFrameRect):
-
-2009-12-09 Michael Nordman <michaeln@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- Chromium build fix.
-
- No new tests.
-
- * bindings/v8/DOMData.cpp
- * bindings/v8/V8DOMWrapper.cpp
- * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
- (WebCore::vertexAttribAndUniformHelperf):
- (WebCore::uniformHelperi):
- (WebCore::uniformMatrixHelper):
-
-2009-12-09 Søren Gjesse <sgjesse@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- [V8] Isolated world reuse failure
- https://bugs.webkit.org/show_bug.cgi?id=32306
-
- Fixed bug introduced in r51407: (http://trac.webkit.org/changeset/51407) which caused layout test
- LayoutTests/http/tests/security/isolatedWorld/world-reuse.html to fail.
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::setInjectedScriptContextDebugId):
- (WebCore::V8Proxy::contextDebugId):
-
-2009-12-09 Patrick Scott <phanna@email.unc.edu>
-
- Fix the build with ENABLE_ORIENTATION_EVENTS
- https://bugs.webkit.org/show_bug.cgi?id=32321
-
- * page/Frame.cpp:
- (WebCore::Frame::sendOrientationChangeEvent):
-
-2009-12-09 Avi Drissman <avi@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Chromium tickmarks in scrollbar now UX approved.
- https://bugs.webkit.org/show_bug.cgi?id=32069
-
- * platform/chromium/ScrollbarThemeChromiumMac.mm:
- (WebCore::ScrollbarThemeChromiumMac::paint):
-
-2009-12-09 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Adam Roben.
-
- Delay load DLLs for accelerated compositing
- https://bugs.webkit.org/show_bug.cgi?id=31856
-
- Add logic to turn off accelerated compositing if d3d9 or QuartzCore
- DLLs are not present.
-
- This patch also changes the WKCACFLayerRenderer to be a pointer.
- This allows me to have a create() method which will not create it when
- accelerated compositing is disabled because of missing DLLs. It
- avoids having to do so many checks. I also made WebViewWndProc
- a member function to allow several methods to be made protected, which
- allows me to avoid doing availability checks there as well.
-
- * platform/graphics/win/WKCACFLayer.cpp:
- * platform/graphics/win/WKCACFLayer.h:
- * platform/graphics/win/WKCACFLayerRenderer.cpp:
- * platform/graphics/win/WKCACFLayerRenderer.h:
- * rendering/RenderLayerBacking.cpp:
-
-2009-12-09 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Darin Adler.
-
- Rename dom/ClassNames to SpaceSplitString and update build files.
-
- https://bugs.webkit.org/show_bug.cgi?id=32250
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::matchRules):
- * dom/ClassNames.cpp: Removed.
- * dom/ClassNames.h: Removed.
- * dom/ClassNodeList.h:
- * dom/NamedMappedAttrMap.h:
- (WebCore::NamedMappedAttrMap::classNames):
- * dom/SpaceSplitString.cpp: Copied from WebCore/dom/ClassNames.cpp.
- (WebCore::SpaceSplitStringData::createVector):
- (WebCore::SpaceSplitStringData::containsAll):
- * dom/SpaceSplitString.h: Copied from WebCore/dom/ClassNames.h.
- (WebCore::SpaceSplitStringData::SpaceSplitStringData):
- (WebCore::SpaceSplitString::SpaceSplitString):
- (WebCore::SpaceSplitString::set):
- (WebCore::SpaceSplitString::containsAll):
- * dom/StyledElement.h:
- (WebCore::StyledElement::classNames):
- * html/HTMLAnchorElement.cpp:
- (WebCore::HTMLAnchorElement::setRel):
-
-2009-12-09 Stephen White <senorblanco@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Enable SVG filters in Chromium build.
- https://bugs.webkit.org/show_bug.cgi?id=32323
-
- Covered by SVG filter layout tests.
-
- * WebCore.gyp/WebCore.gyp:
- * WebCore.gypi:
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/V8DOMWrapper.cpp:
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
-
-2009-12-09 Oliver Hunt <oliver@apple.com>
-
- Build fix
-
- * bindings/js/JSWebGLRenderingContextCustom.cpp:
- (WebCore::functionForUniform):
-
-2009-12-08 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Darin Adler.
-
- WebSocket allow space (U+0020) in sub protocol name.
- https://bugs.webkit.org/show_bug.cgi?id=32266
-
- Test: websocket/tests/sub-protocol-with-space.html
-
- * websockets/WebSocket.cpp:
- (WebCore::isValidProtocolString):
-
-2009-12-08 Peterson Trethewey <petersont@google.com>
-
- Reviewed by Oliver Hunt.
-
- Implement WebGLUniformLocation and change API to use it.
- https://bugs.webkit.org/show_bug.cgi?id=31173
-
- Test: fast/canvas/webgl/uniform-location.html
-
- * DerivedSources.make:
- * WebCore.gypi:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSWebGLRenderingContextCustom.cpp:
- (WebCore::JSWebGLRenderingContext::getProgramParameter):
- (WebCore::JSWebGLRenderingContext::getUniform):
- (WebCore::functionForUniform):
- (WebCore::dataFunctionf):
- (WebCore::dataFunctioni):
- (WebCore::dataFunctionMatrix):
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
- * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
- (WebCore::toWebGLUniformLocation):
- (WebCore::):
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::isFunctionToCallForAttribute):
- (WebCore::vertexAttribAndUniformHelperf):
- (WebCore::uniformHelperi):
- (WebCore::uniformMatrixHelper):
- * html/canvas/WebGLRenderingContext.cpp:
- (WebCore::WebGLRenderingContext::getUniform):
- (WebCore::WebGLRenderingContext::getUniformLocation):
- (WebCore::WebGLRenderingContext::uniform1f):
- (WebCore::WebGLRenderingContext::uniform1fv):
- (WebCore::WebGLRenderingContext::uniform1i):
- (WebCore::WebGLRenderingContext::uniform1iv):
- (WebCore::WebGLRenderingContext::uniform2f):
- (WebCore::WebGLRenderingContext::uniform2fv):
- (WebCore::WebGLRenderingContext::uniform2i):
- (WebCore::WebGLRenderingContext::uniform2iv):
- (WebCore::WebGLRenderingContext::uniform3f):
- (WebCore::WebGLRenderingContext::uniform3fv):
- (WebCore::WebGLRenderingContext::uniform3i):
- (WebCore::WebGLRenderingContext::uniform3iv):
- (WebCore::WebGLRenderingContext::uniform4f):
- (WebCore::WebGLRenderingContext::uniform4fv):
- (WebCore::WebGLRenderingContext::uniform4i):
- (WebCore::WebGLRenderingContext::uniform4iv):
- (WebCore::WebGLRenderingContext::uniformMatrix2fv):
- (WebCore::WebGLRenderingContext::uniformMatrix3fv):
- (WebCore::WebGLRenderingContext::uniformMatrix4fv):
- * html/canvas/WebGLRenderingContext.h:
- * html/canvas/WebGLRenderingContext.idl:
- * html/canvas/WebGLUniformLocation.cpp: Added.
- (WebCore::WebGLUniformLocation::create):
- (WebCore::WebGLUniformLocation::WebGLUniformLocation):
- * html/canvas/WebGLUniformLocation.h: Added.
- (WebCore::WebGLUniformLocation::~WebGLUniformLocation):
- (WebCore::WebGLUniformLocation::program):
- (WebCore::WebGLUniformLocation::location):
- * html/canvas/WebGLUniformLocation.idl: Added.
-
-2009-12-08 Adam Langley <agl@google.com>
-
- Reviewed by Darin Adler.
-
- Fix assertion failure in WebCore::RenderBlock::startDelayUpdateScrollInfo
-
- startDelayUpdateScrollInfo calls a function that can end up calling
- startDelayUpdateScrollInfo again. However, it's static state is
- inconsistent when this happens leading to an assertion failure (or
- probably a memory leak if assertions are off).
-
- Thanks to Robert Swiecki for the test case.
-
- https://bugs.webkit.org/show_bug.cgi?id=32172
- http://code.google.com/p/chromium/issues/detail?id=28880
-
- Test: fast/css/recursive-delay-update-scroll.html
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
-
-2009-12-08 Steve Falkenburg <sfalken@apple.com>
-
- Reviewed by Adam Roben.
-
- WebCore source level debugging on Windows not reliable in some cases
- https://bugs.webkit.org/show_bug.cgi?id=32297
-
- Customized pdb file name/location for WebCore static library.
-
- * WebCore.vcproj/WebCoreCommon.vsprops: Add ProgramDataBaseFileName.
-
-2009-12-08 Kevin Watters <kevinwatters@gmail.com>
-
- Reviewed by Kevin Ollivier.
-
- [wx] Mac plugins support.
-
- https://bugs.webkit.org/show_bug.cgi?id=32236
-
- * platform/FileSystem.h:
- * platform/cf/BinaryPropertyList.h:
- * platform/network/curl/ResourceHandleManager.cpp:
- * platform/wx/FileSystemWx.cpp:
- (WebCore::fileExists):
- (WebCore::unloadModule):
- (WebCore::wxDirTraverserNonRecursive::wxDirTraverserNonRecursive):
- (WebCore::wxDirTraverserNonRecursive::OnFile):
- (WebCore::wxDirTraverserNonRecursive::OnDir):
- (WebCore::listDirectory):
- * plugins/mac/PluginViewMac.cpp:
- (WebCore::nativeWindowFor):
- (WebCore::cgHandleFor):
- (WebCore::topLevelOffsetFor):
- (WebCore::PluginView::platformStart):
- (WebCore::PluginView::setFocus):
- (WebCore::PluginView::invalidateRect):
- (WebCore::PluginView::handleKeyboardEvent):
- (WebCore::PluginView::globalMousePosForPlugin):
- * plugins/wx/PluginDataWx.cpp: Added.
- (WebCore::PluginData::initPlugins):
- (WebCore::PluginData::refresh):
- * wscript:
-
-2009-12-08 Brady Eidson <beidson@apple.com>
-
- Reviewed by Darin Adler.
-
- Navigating to a cached page can result in accessing a destroyed HTMLInputElement.
- <rdar://problem/6856662> and https://webkit.org/b/32293
-
- Test: fast/loader/input-element-page-cache-crash.html
-
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::parseMappedAttribute): Make sure to unregister for the activation
- callback after the new m_autocomplete setting has been stored so the unregistration actually
- takes place.
-
-2009-12-08 Dmitry Titov <dimich@chromium.org>
-
- Rubber-stamped by David Levin.
-
- Revert and reopen "Add asserts to RefCounted to make sure ref/deref happens on the right thread."
- It may have caused massive increase of reported leaks on the bots.
- https://bugs.webkit.org/show_bug.cgi?id=31639
-
- * ForwardingHeaders/wtf/ThreadVerifier.h: Removed.
- * loader/icon/IconRecord.cpp:
- (WebCore::IconRecord::IconRecord):
- * platform/SharedBuffer.cpp:
- (WebCore::SharedBuffer::SharedBuffer):
- * platform/text/StringImpl.cpp:
- (WebCore::StringImpl::StringImpl):
-
-2009-12-08 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Chromium: support custom WebCore context menu items in Chromium port.
-
- https://bugs.webkit.org/show_bug.cgi?id=32277
-
- * platform/ContextMenu.h:
- * platform/ContextMenuItem.h:
- (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
- * platform/chromium/ContextMenuChromium.cpp:
- (WebCore::ContextMenu::ContextMenu):
- (WebCore::ContextMenu::itemCount):
- (WebCore::ContextMenu::insertItem):
- (WebCore::ContextMenu::appendItem):
- (WebCore::ContextMenu::itemWithAction):
- (WebCore::ContextMenu::itemAtIndex):
- (WebCore::ContextMenu::platformDescription):
- * platform/chromium/ContextMenuItemChromium.cpp:
- (WebCore::ContextMenuItem::ContextMenuItem):
- (WebCore::ContextMenuItem::releasePlatformDescription):
- (WebCore::ContextMenuItem::type):
- (WebCore::ContextMenuItem::action):
- (WebCore::ContextMenuItem::title):
- (WebCore::ContextMenuItem::checked):
- (WebCore::ContextMenuItem::enabled):
- (WebCore::ContextMenuItem::setType):
- (WebCore::ContextMenuItem::setAction):
- (WebCore::ContextMenuItem::setTitle):
- (WebCore::ContextMenuItem::setChecked):
- (WebCore::ContextMenuItem::setEnabled):
-
-2009-12-08 Adam Langley <agl@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- Chromium Linux: set default scrollbar colours.
-
- This is so that layout tests have sane defaults for the scrollbar
- colours, even if the API user doesn't set any.
-
- This is a fix due to r51827.
-
- https://bugs.webkit.org/show_bug.cgi?id=32287
-
- This is very well covered by existing layout tests.
-
- * rendering/RenderThemeChromiumLinux.cpp:
-
-2009-12-08 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Sam Weinig.
-
- Fix for <rdar://problem/7397808> Crash occurs at
- RenderObject::containingBlock() as I type in the Google Search
- field (during page load)
-
- * editing/Editor.cpp:
- (WebCore::Editor::insideVisibleArea): ownerRenderer() needs to be
- null checked.
-
-2009-12-08 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by Darin Adler.
-
- Add asserts to RefCounted to make sure ref/deref happens on the right thread.
- https://bugs.webkit.org/show_bug.cgi?id=31639
-
- * loader/icon/IconRecord.cpp:
- (WebCore::IconRecord::IconRecord): Disable thread verification for this class because of its cross-thread use in IconDatabase.
- * platform/SharedBuffer.cpp:
- (WebCore::SharedBuffer::SharedBuffer): Ditto.
- * platform/text/StringImpl.cpp:
- (WebCore::StringImpl::StringImpl): Disable thread verification for this class, add FIXME to enforce proper usage via crossThreadString.
- * ForwardingHeaders/wtf/ThreadVerifier.h: Added.
-
-2009-12-08 John Gregg <johnnyg@google.com>
-
- Reviewed by Adam Barth.
-
- Inform the NotificationCenter when its window goes away in the same
- manner as other DOMWindow fields, and prevent invalid operations on
- it after that happens.
-
- As part of this, change the V8 bindings for notifications to call
- through the NotificationCenter rather than doing those operations
- itself.
-
- https://bugs.webkit.org/show_bug.cgi?id=31886
-
- Test: fast/notifications/notification-after-close.html
-
- * bindings/v8/custom/V8NotificationCenterCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * notifications/Notification.cpp:
- (WebCore::Notification::Notification):
- * notifications/NotificationCenter.cpp:
- (WebCore::NotificationCenter::checkPermission):
- (WebCore::NotificationCenter::requestPermission):
- * notifications/NotificationCenter.h:
- (WebCore::NotificationCenter::createHTMLNotification):
- (WebCore::NotificationCenter::createNotification):
- (WebCore::NotificationCenter::disconnectFrame):
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::clear):
-
-2009-12-08 Dan Bernstein <mitz@apple.com>
-
- Reviewed by John Sullivan.
-
- Fixed block selection gap repainting in table cells
-
- Test: fast/repaint/block-selection-gap-in-table-cell.html
-
- This recently-introduced regression exposed the fact that
- RenderTableCell did not override offsetFromContainer() to adjust for
- the fact that table cells’ coordinates are relative to the table
- section, not the table row. With this fixed, RenderTableCell no longer
- needs to override mapLocalToContainer() and mapAbsoluteToLocalPoint(),
- since the base class implementations of those use offsetFromContainer().
-
- * rendering/RenderTableCell.cpp:
- (WebCore::RenderTableCell::offsetFromContainer):
- * rendering/RenderTableCell.h:
-
-2009-12-08 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Not reviewed. Sane way to force a rebuild on all win slaves, according to Adam Roben.
-
- * WebCorePrefix.h:
-
-2009-12-08 Dan Bernstein <mitz@apple.com>
-
- Build fix
-
- * loader/loader.cpp:
- (WebCore::cachedResourceTypeToTargetType):
-
-2009-12-08 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Not reviewed. Touch svgtags.in to eventually fix the win debug build.
-
- * svg/svgtags.in:
-
-2009-12-08 Mike Belshe <mike@belshe.com>
-
- Reviewed by Darin Fisher.
-
- https://bugs.webkit.org/show_bug.cgi?id=32167
- Update the ResourceRequest::RequestType. This previously
- was specific to Chromium. Moved into ResourceRequestBase, enabling
- more specificity about the type (which is otherwise only known to the
- loader), and also making this information available to all platforms.
- Any platform with a network layer which can utilize this information
- may want to use it for prioritization.
-
- Note to Chromium glue: TargetIsSubResource renamed to TargetIsSubresource.
-
- * loader/loader.cpp:
- (WebCore::Loader::Loader):
- (WebCore::CachedResourceTypeToTargetType):
- (WebCore::Loader::Host::servePendingRequests):
- * platform/network/ResourceRequestBase.h:
- (WebCore::ResourceRequestBase::):
- (WebCore::ResourceRequestBase::targetType):
- (WebCore::ResourceRequestBase::setTargetType):
- (WebCore::ResourceRequestBase::ResourceRequestBase):
- * platform/network/chromium/ResourceRequest.h:
- (WebCore::ResourceRequest::ResourceRequest):
-
-2009-12-08 Steve Block <steveblock@google.com>
-
- Reviewed by Adam Barth.
-
- [Android] Adds Makefiles for Android port.
- https://bugs.webkit.org/show_bug.cgi?id=31325
-
- Build system change only. No tests possible.
-
- * Android.derived.jscbindings.mk: Added.
- * Android.derived.mk: Added.
- * Android.jscbindings.mk: Added.
- * Android.mk: Added.
- * WebCorePrefix.h: Modified. Sets up some flags and adds a header required for building on Android.
-
-2009-12-08 Christian Dywan <christian@twotoasts.de>
-
- Reviewed by Xan Lopez.
-
- * platform/network/soup/DNSSoup.cpp:
- (WebCore::prefetchDNS): Conditionalize prefetching on
- the libSoup version.
-
-2009-12-08 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Rubber-stamped by Maciej Stachowiak.
-
- Turn on (SVG) Filters for Win.
- https://bugs.webkit.org/show_bug.cgi?id=32224
-
- * WebCore.vcproj/WebCoreCommon.vsprops:
- * WebCore.vcproj/build-generated-files.sh:
- * bindings/scripts/CodeGeneratorCOM.pm: Touch file to assure a world rebuild. Hopefully.
-
-2009-12-08 Carol Szabo <carol.szabo@nokia.com>
-
- Reviewed by Darin Adler.
-
- CSS Counter Nesting still does not work according to the spec.
- https://bugs.webkit.org/show_bug.cgi?id=31723
-
- Test: fast/css/counters/nesting.html
-
- * rendering/RenderCounter.cpp:
- (WebCore::findPlaceForCounter):
- Replaced the faulty counter insertion algorithm with one that works.
-
-2009-12-08 John Sullivan <sullivan@apple.com>
-
- Add isAutofilled getter to match existing setter.
-
- Reviewed by Ada Chan.
-
- * bindings/objc/DOMHTML.mm:
- (-[DOMHTMLInputElement _isAutofilled]):
- Implemented new cover function.
-
- * bindings/objc/DOMPrivate.h:
- Declared new cover function.
-
-2009-12-08 Dominik Röttsches <dominik.roettsches@access-company.com>
-
- Reviewed by Gustavo Noronha Silva.
-
- [Gtk] Create a TextBreakIterator implementation based on GLib (without ICU)
- https://bugs.webkit.org/show_bug.cgi?id=31469
-
- Added a TextBreakIterator implementation based on GLib and pango,
- which allows compiling WebCore without ICU.
-
- * GNUmakefile.am:
- * platform/text/gtk/TextBreakIteratorGtk.cpp: Added.
- (WebCore::):
- (WebCore::setUpIterator):
- (WebCore::characterBreakIterator):
- (WebCore::cursorMovementIterator):
- (WebCore::wordBreakIterator):
- (WebCore::lineBreakIterator):
- (WebCore::sentenceBreakIterator):
- (WebCore::textBreakFirst):
- (WebCore::textBreakLast):
- (WebCore::textBreakNext):
- (WebCore::textBreakPrevious):
- (WebCore::textBreakPreceding):
- (WebCore::textBreakFollowing):
- (WebCore::textBreakCurrent):
- (WebCore::isTextBreak):
-
-2009-12-08 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Change the way cookies are retrieved in the WebInspector frontend.
-
- Moved the cookie filtering from the native code into the frontend so that
- all cookies can be retrieved regardless of the associated domain
- (required for certain audits to run.)
- https://bugs.webkit.org/show_bug.cgi?id=32160
-
- Test: inspector/cookie-resource-match.html
-
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::getCookies):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::getCookies):
- * inspector/InspectorController.h:
- * inspector/front-end/CookieItemsView.js:
- (WebInspector.CookieItemsView.prototype.update.callback):
- (WebInspector.CookieItemsView.prototype.update):
- (WebInspector.CookieItemsView.prototype._cookiesForDomain):
- * inspector/front-end/DOMAgent.js:
- (WebInspector.Cookies.getCookiesAsync):
- (WebInspector.Cookies.cookieMatchesResourceURL):
- (WebInspector.Cookies.cookieDomainMatchesResourceDomain):
- * inspector/front-end/Resource.js:
- (WebInspector.Resource):
- (WebInspector.Resource.prototype.get documentURL):
- (WebInspector.Resource.prototype.set documentURL):
- * inspector/front-end/inspector.js:
- (WebInspector.addResource):
-
-2009-12-08 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Not reviewed. Touch svgtags.in, in order to force SVGNames.* regeneration. Praying for gtk bot to be fixed :-)
-
- * svg/svgtags.in:
-
-2009-12-08 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Not reviewed. Trying to force a rebuild on the Gtk slave. If that doesn't work, someone must force a rebuild from scratch.
-
- * bindings/scripts/CodeGeneratorJS.pm:
-
-2009-12-06 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: provide custom context menu in the front-end window.
-
- https://bugs.webkit.org/show_bug.cgi?id=32200
-
- * English.lproj/localizedStrings.js:
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSInspectorFrontendHostCustom.cpp:
- (WebCore::JSInspectorFrontendHost::showContextMenu):
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::contextMenuItemSelected):
- (WebCore::InspectorFrontend::contextMenuCleared):
- * inspector/InspectorFrontend.h:
- * inspector/InspectorFrontendHost.cpp:
- (WebCore::InspectorFrontendHost::InspectorFrontendHost):
- (WebCore::InspectorFrontendHost::~InspectorFrontendHost):
- (WebCore::InspectorFrontendHost::showContextMenu):
- (WebCore::InspectorFrontendHost::contextMenuItemSelected):
- (WebCore::InspectorFrontendHost::contextMenuCleared):
- * inspector/InspectorFrontendHost.h:
- (WebCore::InspectorFrontendHost::MenuSelectionHandler::create):
- (WebCore::InspectorFrontendHost::MenuSelectionHandler::~MenuSelectionHandler):
- (WebCore::InspectorFrontendHost::MenuSelectionHandler::disconnect):
- (WebCore::InspectorFrontendHost::MenuSelectionHandler::contextMenuItemSelected):
- (WebCore::InspectorFrontendHost::MenuSelectionHandler::contextMenuCleared):
- (WebCore::InspectorFrontendHost::MenuSelectionHandler::MenuSelectionHandler):
- * inspector/InspectorFrontendHost.idl:
- * inspector/front-end/ContextMenu.js: Added.
- * inspector/front-end/WebKit.qrc:
- * inspector/front-end/inspector.html:
- * inspector/front-end/inspector.js:
- (WebInspector.loaded):
- (WebInspector.documentContextMenu):
- * page/ContextMenuController.cpp:
- (WebCore::ContextMenuController::ContextMenuController):
- (WebCore::ContextMenuController::clearContextMenu):
- (WebCore::ContextMenuController::handleContextMenuEvent):
- (WebCore::ContextMenuController::showContextMenu):
- (WebCore::ContextMenuController::createContextMenu):
- (WebCore::ContextMenuController::contextMenuItemSelected):
- * page/ContextMenuController.h:
- * page/ContextMenuSelectionHandler.h: Added.
- (WebCore::ContextMenuSelectionHandler::ContextMenuSelectionHandler):
- (WebCore::ContextMenuSelectionHandler::~ContextMenuSelectionHandler):
- * platform/ContextMenu.cpp:
- (WebCore::ContextMenu::checkOrEnableIfNeeded):
- * platform/ContextMenuItem.h:
-
-2009-12-08 Andras Becsi <abecsi@inf.u-szeged.hu>
-
- Rubber-stamped by Kenneth Rohde Christiansen.
-
- [Qt] Build fix of duplicated platform/graphics/filters/FEGaussianBlur.cpp in WebCore.pro after enabled svg filters.
-
- No new tests needed.
- * WebCore.pro:
-
-2009-12-07 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Darin Adler.
-
- Add a function to show render tree for debugging
- https://bugs.webkit.org/show_bug.cgi?id=31288
-
- No new tests because this just adds a function for debugging.
-
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::showRenderObject):
- (WebCore::RenderObject::showRenderTreeAndMark):
- (showRenderTree):
- * rendering/RenderObject.h:
-
-2009-12-07 Victor Wang <victorw@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Implement NamedPropertyEnumerator and IndexedPropertyEnumerator for
- V8 NPObject. This should make the object enumerable and fix the
- enumeration issue in layout test plugins/netscape-enumerate.html.
-
- Also fix some existing style issues per webkit style guidelines.
-
- https://bugs.webkit.org/show_bug.cgi?id=32254
-
- Test: plugins/netscape-enumerate.html
-
- * bindings/v8/V8NPObject.cpp:
- (npObjectInvokeImpl):
- (npObjectInvokeDefaultHandler):
- (npObjectGetProperty):
- (npObjectPropertyEnumerator):
- (npObjectNamedPropertyEnumerator):
- (npObjectIndexedPropertyEnumerator):
- (createV8ObjectForNPObject):
-
-2009-12-07 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- Fragments now make WebSocket URL parsing fail.
- https://bugs.webkit.org/show_bug.cgi?id=32144
-
- * websockets/WebSocket.cpp:
- (WebCore::WebSocket::connect):
-
-2009-12-07 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Darin Adler.
-
- Fix wrong length parsing in WebSocket.
- https://bugs.webkit.org/show_bug.cgi?id=32203
-
- * websockets/WebSocketChannel.cpp:
- (WebCore::WebSocketChannel::didReceiveData):
-
-2009-12-07 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Rubber-stamped by Maciej Stachowiak.
-
- Turn on (SVG) Filters for Qt.
- https://bugs.webkit.org/show_bug.cgi?id=32224
-
- * WebCore.pro:
-
-2009-12-07 Evan Martin <evan@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Chromium: theme scrollbars to match GTK theme.
- Add functions to RenderThemeChromiumLinux to change the scrollbar
- color.
-
- Since the change is to the Chromium WebKit API layer, testing will
- be in Chromium's test shell.
- http://bugs.webkit.org/show_bug.cgi?id=32048
-
- Patch from Markus Gutschke <markus@chromium.org>.
-
- * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
- (WebCore::saturateAndBrighten):
- (WebCore::outlineColor):
- (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
- (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
- * rendering/RenderThemeChromiumLinux.cpp:
- (WebCore::RenderThemeChromiumLinux::setScrollbarColors):
- * rendering/RenderThemeChromiumLinux.h:
- (WebCore::RenderThemeChromiumLinux::thumbInactiveColor):
- (WebCore::RenderThemeChromiumLinux::thumbActiveColor):
- (WebCore::RenderThemeChromiumLinux::trackColor):
-
-2009-12-08 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Reviewed by Xan Lopez.
-
- [GTK] Doesn't respect Content-Disposition for downloads, and provides no way for apps to do that
- https://bugs.webkit.org/show_bug.cgi?id=32247
-
- Allow creating a ResourceResponse from a SoupMessage.
-
- Covered by API test.
-
- * platform/network/soup/ResourceResponse.h:
- (WebCore::ResourceResponse::ResourceResponse):
- * platform/network/soup/ResourceResponseSoup.cpp:
- (WebCore::ResourceResponse::updateFromSoupMessage):
-
-2009-12-07 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Not reviewed. Reverting problematic patch, causing errors.
-
- Revert r51789 (Avoid zero division during SVGPaintServerPattern::setup()). Crashes on all Windows slaves.
- Reopen bug https://bugs.webkit.org/show_bug.cgi?id=29912.
-
- * svg/graphics/SVGPaintServerPattern.cpp:
- (WebCore::SVGPaintServerPattern::setup):
-
-2009-12-07 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Darin Adler.
-
- Add support for HTMLInputElement::stepUp() and stepDown() for
- type=number and type=range.
- https://bugs.webkit.org/show_bug.cgi?id=27451
-
- Our implementation of stepUp() and stepDown() rounds the resultant
- value to conform to the step value.
- Change the number-string conversion method for RenderSlider to be
- consistent with type=number.
-
- Tests: fast/forms/input-step-number.html
- fast/forms/input-step-range.html
- fast/forms/input-step-unsupported.html
-
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::rangeUnderflow): Unify the code for NUMBER and RANGE.
- (WebCore::HTMLInputElement::rangeOverflow): Unify the code for NUMBER and RANGE.
- (WebCore::HTMLInputElement::minimum): Renamed from rangeMinimum(), and support for NUMBER.
- (WebCore::HTMLInputElement::maximum): Renamed from rangeMaximum(), and support for NUMBER.
- (WebCore::HTMLInputElement::stepBase):
- (WebCore::HTMLInputElement::stepMismatch): Use stepBase().
- (WebCore::HTMLInputElement::applyStepForNumberOrRange):
- (WebCore::HTMLInputElement::stepUp):
- (WebCore::HTMLInputElement::stepDown):
- (WebCore::HTMLInputElement::formStringFromDouble):
- * html/HTMLInputElement.h:
- (WebCore::HTMLInputElement::stepUp):
- (WebCore::HTMLInputElement::stepDown):
- * html/HTMLInputElement.idl: Add stepUp() and stepDown().
- * rendering/RenderSlider.cpp:
- (WebCore::SliderRange::SliderRange): Sync with rangeMinimum()/rangeMaximum() renaming.
- (WebCore::RenderSlider::updateFromElement): Use formStringFromDouble().
- (WebCore::RenderSlider::setValueForPosition): Use formStringFromDouble().
-
-2009-12-07 Albert J. Wong <ajwong@chromium.org>
-
- Not reviewed: Chromium build fix try 2 (dumb error).
-
- * bindings/v8/ScriptValue.h:
- (WebCore::ScriptValue::getString):
-
-2009-12-07 Albert J. Wong <ajwong@chromium.org>
-
- Not reviewed: Chromium build fix.
-
- Fix Chromium build break caused by an added dependency from
- ScriptControllerBase to JSDOMWindowShell, and an API change in
- ScriptValue.
-
- * bindings/ScriptControllerBase.cpp:
- (WebCore::ScriptController::executeIfJavaScriptURL):
- * bindings/v8/ScriptValue.h:
- (WebCore::ScriptValue::getString):
-
-2009-12-07 Enrica Casucci <enrica@apple.com>
-
- Reviewed by Darin Adler.
-
- REGRESSION(4.0.4-42a12): Indent does not work for twice modified with background text in gmail.
- <rdar://problem/7442387>
- https://bugs.webkit.org/show_bug.cgi?id=32233
-
- Fixes problem in re-creating the correct hierarchy under the new block.
- Added extensive testing to cover all the cases.
-
- Test: editing/execCommand/indent-with-style2.html
-
- * editing/CompositeEditCommand.cpp:
- (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
-
-2009-12-07 Dmitry Titov <dimich@chromium.org>
-
- Rubber-stamped by Darin Adler.
-
- Remove ENABLE_SHARED_SCRIPT flags
- https://bugs.webkit.org/show_bug.cgi?id=32245
- This patch was obtained by "git revert" command and then un-reverting of ChangeLog files.
-
- * Configurations/FeatureDefines.xcconfig:
- * GNUmakefile.am:
- * WebCore.pro:
-
-2009-12-07 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Not reviewed. Force JS binding regeneration, eventually fixing the broken tests on the bots.
-
- * bindings/scripts/CodeGeneratorJS.pm:
-
-2009-12-07 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Not reviewed. Try to fix mac builds by touching svgtags.in - I only tried from-scratch builds.
-
- * svg/svgtags.in:
-
-2009-12-07 Gavin Barraclough <barraclough@apple.com>
-
- Reviewed by Oliver Hunt.
-
- https://bugs.webkit.org/show_bug.cgi?id=32184
- Handle out-of-memory conditions with JSC Ropes with a JS exception, rather than crashing.
- Switch from using fastMalloc to tryFastMalloc, pass an ExecState to record the exception on.
-
- * bindings/ScriptControllerBase.cpp:
- (WebCore::ScriptController::executeIfJavaScriptURL):
- * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
- (WebCore::toHTMLCanvasStyle):
- (WebCore::JSCanvasRenderingContext2D::setFillColor):
- (WebCore::JSCanvasRenderingContext2D::setStrokeColor):
- (WebCore::JSCanvasRenderingContext2D::setShadow):
- * bindings/js/ScriptCallStack.cpp:
- (WebCore::ScriptCallStack::ScriptCallStack):
- (WebCore::ScriptCallStack::initialize):
- * bindings/js/ScriptValue.cpp:
- (WebCore::ScriptValue::getString):
- * bindings/js/ScriptValue.h:
- * bindings/js/SerializedScriptValue.cpp:
- (WebCore::SerializingTreeWalker::convertIfTerminal):
- * bindings/objc/WebScriptObject.mm:
- (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
- * page/Console.cpp:
- (WebCore::Console::addMessage):
-
-2009-12-07 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Reviewed by Holger Hans Peter Freyther.
-
- Turn on (SVG) Filters support, by default.
- https://bugs.webkit.org/show_bug.cgi?id=32224
-
- Only enable filters on mac for now, skipped all affected tests on the other platforms.
- Will enable them one after another, to minimize breakage.
-
- * Configurations/FeatureDefines.xcconfig: Enable FILTERS build flag.
-
-2009-12-07 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Darin Adler.
-
- Fix a bug that KURL rejects a host name which has an IPv4 address
- inside an IPv6 form like [::127.0.0.1].
- https://bugs.webkit.org/show_bug.cgi?id=29913
-
- * platform/KURL.cpp:
- (WebCore::characterClassTable): Add IPv6Char to '.'.
-
-2009-12-07 Brady Eidson <beidson@apple.com>
-
- Reviewed by Sam Weinig.
-
- <rdar://problem/7443417> - Closing a window opened with "New windows open with: Same Page" results in crash in ::~HistoryItem
-
- The HistoryItem copy constructor has one very specific use case - to support the feature of a WebView copying another WebView's
- BackForwardList. That constructor wasn't initializing its m_document pointer, leading to this crash in the destructor.
-
- * history/HistoryItem.cpp:
- (WebCore::HistoryItem::~HistoryItem): Change the setDocument(0) to an ASSERT that the document is already 0. A HistoryItem cannot
- outlive its Document and Documents will always clear the back-pointer in their ::detach() method.
- (WebCore::HistoryItem::HistoryItem): Missed the m_document initializer in the copy constructor. Also remove an invalid assertion
- about the original items m_cachedPage object (which is irrelevant to the copy).
-
-2009-12-07 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by Darin Adler.
-
- Remove partial SharedScript implementation.
- https://bugs.webkit.org/show_bug.cgi?id=32237
- The patch was obtained by running "git revert" command and then un-reverting WebCore/ChangeLog.
-
- * DerivedSources.make:
- * SharedScript/SharedScriptContext.cpp: Removed.
- * SharedScript/SharedScriptContext.h: Removed.
- * SharedScript/SharedScriptContext.idl: Removed.
- * SharedScript/SharedScriptController.h: Removed.
- * SharedScript/WebKitSharedScript.cpp: Removed.
- * SharedScript/WebKitSharedScript.h: Removed.
- * SharedScript/WebKitSharedScript.idl: Removed.
- * SharedScript/WebKitSharedScriptRepository.cpp: Removed.
- * SharedScript/WebKitSharedScriptRepository.h: Removed.
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * dom/Document.cpp:
- (WebCore::Document::detach):
- * dom/EventTarget.cpp:
- * dom/EventTarget.h:
- * dom/ScriptExecutionContext.h:
-
-2009-12-07 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Nikolas Zimmermann.
-
- https://bugs.webkit.org/show_bug.cgi?id=32226
- Random crashes in WebSocket tests on Leopard Debug builbot
-
- * platform/network/SocketStreamHandleBase.cpp: (WebCore::SocketStreamHandleBase::close):
- Make sure the object still exists when setting m_state.
-
-2009-12-07 Shiki Okasaka <shiki@google.com>
-
- Reviewed by Dirk Schulze.
-
- Avoid zero division during SVGPaintServerPattern::setup()
- https://bugs.webkit.org/show_bug.cgi?id=29912
-
- Fix zero division bugs in SVGPaintServerPattern::setup() that occurred
- if the tile of a pattern was bigger than the pattern and the pattern
- size was < 0.5, and if the attribute overflow was set to visible.
-
- Test: svg/custom/small-pattern.html
-
- * svg/graphics/SVGPaintServerPattern.cpp:
- (WebCore::SVGPaintServerPattern::setup):
-
-2009-12-07 Kenneth Russell <kbr@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- [v8] WebCore::WebGLArrayBufferInternal::byteLengthAttrGetter NULL pointer
- https://bugs.webkit.org/show_bug.cgi?id=31889
-
- Fixed bug in handling of zero-argument constructor call.
-
- Test: fast/canvas/webgl/bug-31889.html
-
- * bindings/v8/custom/V8WebGLArrayBufferCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-12-07 Gyuyoung Kim <gyuyoung@gmail.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=32024
- [GTK] WebKit does not compile without JAVASCRIPT_DEBUGGER
-
- Fix build errors when javascript-debugger is disabled on GTK
-
- * GNUmakefile.am:
-
-2009-12-07 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Darin Adler.
-
- Fixed <rdar://problem/7437820> Weird selection artifacts
-
- Tests: fast/repaint/block-selection-gap-stale-cache-2.html
- fast/repaint/block-selection-gap-stale-cache.html
-
- Instead of caching the block selection gaps’ bounds in the RenderView at setSelection()
- time, cache them in each RenderLayer at paint time. This prevents the cache from getting
- stale due to layout changes and overflow scrolling.
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::selectionGapRectsForRepaint): Account for overflow scroll.
- (WebCore::RenderBlock::paintSelection): Update the enclosing layer’s selection gaps bounds.
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::addBlockSelectionGapsBounds): Added. Updates the selection gaps
- bounds to include the given rect.
- (WebCore::RenderLayer::clearBlockSelectionGapsBounds): Added. Recursively clears the cached
- selection gaps bounds.
- (WebCore::RenderLayer::repaintBlockSelectionGaps): Added. Recursively invalidates the
- selection gaps bounds.
- * rendering/RenderLayer.h:
- * rendering/RenderView.cpp:
- (WebCore::RenderView::setSelection): Clear the layer-level selection gaps bounds instead
- of the view-level cache.
- (WebCore::RenderView::clearSelection): Changed to call repaintBlockSelectionGaps().
- * rendering/RenderView.h:
-
-2009-12-07 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- Fixed whitelist comment and removed useless (tags, sdp) mimetypes
- from it. Also, GStreamer doesn't handle directly SMIL.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::mimeTypeCache):
-
-2009-12-07 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=25415
- [GTK][ATK] Please implement support for get_text_at_offset
-
- Eliminate the segfaults which occur when accessing the text interface now
- implemented by text controls.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (getPangoLayoutForAtk):
-
-2009-12-07 Gustavo Noronha Silva <gns@gnome.org>
-
- Reviewed by Xan Lopez.
-
- Turn the MediaPlayer supported types blacklist into a whitelist
-
- [GTK] REGRESSION: webkit thinks it can render PDFs
- https://bugs.webkit.org/show_bug.cgi?id=32183
-
- Covered by API test.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::mimeTypeCache):
-
-2009-12-07 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=25524
- [Gtk] Expose the title attribute to assistive technologies
-
- Expose 'alt' attribute from images as accessible name.
- Expose the 'title' core HTML attribute as accessible description.
- This is a modified version of the original fix submitted by Mario Sanchez Prada,
- adjusted so that it doesn't impact other platforms.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (webkit_accessible_get_name):
- (webkit_accessible_get_description):
-
-2009-12-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Fix support for generic font families
-
- By not propagating the resolved font family in FontCacheQt and
- only concidering the font description we ended up passing the
- generic font families to Qt directly. Since most systems don't
- have a mapping for these font families we ended up using the
- default font in most cases.
-
- * platform/graphics/qt/FontCacheQt.cpp:
- * platform/graphics/qt/FontPlatformData.h:
- * platform/graphics/qt/FontPlatformDataQt.cpp:
-
-2009-12-06 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Maciej Stachowiak.
-
- Object.getOwnPropertyDescriptor() allows cross-frame access
- https://bugs.webkit.org/show_bug.cgi?id=32119
-
- Make all implementations of getOwnPropertyDescriptor that have
- cross domain restrictions simply fail immediately on cross domain
- access, rather than trying to mimic the behaviour of normal
- property access.
-
- Test: http/tests/security/cross-frame-access-getOwnPropertyDescriptor.html
-
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
- * bindings/js/JSHistoryCustom.cpp:
- (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
- * bindings/js/JSLocationCustom.cpp:
- (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
- * bindings/scripts/CodeGeneratorJS.pm:
-
-2009-12-07 Steve Block <steveblock@google.com>
-
- Reviewed by Adam Barth.
-
- Moves JSC-specific functions from jni_utility and moves them to new jsc/jni_utility_private files.
- https://bugs.webkit.org/show_bug.cgi?id=32157
-
- Build fix only, no new tests.
-
- * WebCore.xcodeproj/project.pbxproj: Modified. Add jni_utility_private.[cpp|h].
- * bridge/jni/jni_instance.cpp: Modified. Include jni_utility_private.h for JSC.
- * bridge/jni/jni_jsobject.mm: Modified. Include jni_utility_private.h for JSC.
- * bridge/jni/jni_objc.mm: Modified. Include jni_utility_private.h for JSC.
- * bridge/jni/jni_runtime.cpp: Modified. Include jni_utility_private.h for JSC.
- * bridge/jni/jni_utility.cpp: Modified. Removed convertValueToJValue and convertArrayInstanceToJavaArray.
- * bridge/jni/jni_utility.h: Modified. Removed convertValueToJValue and dispatchJNICall.
- * bridge/jni/jsc: Added.
- * bridge/jni/jsc/jni_utility_private.cpp: Added.
- (JSC::Bindings::convertArrayInstanceToJavaArray):
- (JSC::Bindings::convertValueToJValue):
- * bridge/jni/jsc/jni_utility_private.h: Added. Header for convertValueToJValue and dispatchJNICall.
- * platform/android/TemporaryLinkStubs.cpp: Modified. Include jni_utility_private.h for JSC.
-
-2009-12-06 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Maciej Stachowiak.
-
- texImage2D pixel junk for transparency
- https://bugs.webkit.org/show_bug.cgi?id=32188
-
- Use kCGBlendModeCopy when drawing an image to the intermediate context
- used to create a GL texture.
-
- No test as we don't currently have any mechanism to retrieve pixel data
- from the webgl context.
-
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::imageToTexture):
-
-2009-12-03 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- Advertize audio/ogg correctly and refactored mime-type cache
- building.
-
- [GTK] Recognize oga as audio/ogg
- https://bugs.webkit.org/show_bug.cgi?id=31990
-
- Test: media/media-can-play-ogg.html
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::mimeTypeCache):
-
-2009-12-05 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=32175
- REGRESSION: websocket/tests/url-parsing.html is crashing on Leopard Bot
-
- * platform/network/cf/SocketStreamHandleCFNet.cpp:
- (WebCore::SocketStreamHandle::readStreamCallback): Call platformClose() to unschedule both
- streams, guaranteeing that there will be no callbacks after SocketStreamHandle is destroyed.
- (WebCore::SocketStreamHandle::writeStreamCallback): Edited a comment a bit.
-
-2009-12-05 Adam Langley <agl@google.com>
-
- Reviewed by Adam Barth.
-
- Check that a CSS format() argument is of a valid type.
-
- https://bugs.webkit.org/show_bug.cgi?id=31815
- http://code.google.com/p/chromium/issues/detail?id=28582
-
- Test: fast/css/url-format-non-string.html
-
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseFontFaceSrc):
-
-2009-12-04 Adam Langley <agl@google.com>
-
- Reviewed by Eric Seidel.
-
- Chromium: make rounded borders heavier.
-
- Skia draws its rounded corners differently from the other ports.
- Whereas they have anti-aliased clipping regions, Skia only has 1-bit
- regions. (Which is technically more correct, but somewhat unhelpful
- for us.) Instead, with Skia we use a layer and collect all the
- clipping paths in effect. When the state is popped, we paint
- transparency outside the clipping paths and merge the layer down.
-
- This appears to cause rounded borders to look a little thin, which is
- addressed in this patch.
-
- This is well covered by existing tests but will require new baselines
- in the Chromium tree.
-
- https://bugs.webkit.org/show_bug.cgi?id=31778
-
- * platform/graphics/skia/GraphicsContextSkia.cpp:
- (WebCore::GraphicsContext::addInnerRoundedRectClip):
-
-2009-12-04 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- <rdar://problem/7441571> Hardware-backed layers are skipped when printing
-
- When printing, set the PaintBehaviorFlattenCompositingLayers flag so that compositing layers
- paint. This also causes 3D transforms to be flattened to 2D.
-
- Test: printing/compositing-layer-printing.html
-
- * page/FrameView.cpp:
- (WebCore::FrameView::paintContents):
-
-2009-12-04 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Beth Dakin.
-
- Fix up some issues in my SVGListTraits change from yesterday.
-
- * svg/SVGListTraits.h:
- (WebCore::):
-
-2009-12-04 Albert J. Wong <ajwong@chromium.org>
-
- Not reviewed: chromium build fix.
-
- Fix Chromium build break caused by moving of isDefaultPortForProtocol() and
- portAllowed() into KURL.h/KURL.cpp. Cloning code.
-
- * platform/KURLGoogle.cpp:
- (WebCore::isDefaultPortForProtocol):
- (WebCore::portAllowed):
-
-2009-12-04 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Remove suppress highlight when restoring selected node.
-
- https://bugs.webkit.org/show_bug.cgi?id=32152
-
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.prototype.setDocument.selectNode):
- (WebInspector.ElementsPanel.prototype.setDocument.selectLastSelectedNode):
- (WebInspector.ElementsPanel.prototype.setDocument):
-
-2009-12-04 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Nikolas Zimmermann.
-
- Gradient SVG animation demonstrates tearing at animation extremes
- https://bugs.webkit.org/show_bug.cgi?id=11929
-
- The focalPoint of a radial gradient is temporarly substracted by
- the centralPoint, if the focalPoint is not in the radius of the
- gradient. This is needed to calculate a new postion of the focalPoint
- according to the specification. But the new focalPoint needs to be
- moved by the centralPoint after this calculation, which is not the case
- at the moment. This patch fixes this issue. It was also introduced a
- deviation of maximal 0.2% for Cairo to get around the fixed point numbers
- in Cairo.
-
- W3C-SVG-1.1/pservers-grad-13-b needed an update. The missing adjustment
- of the new focalPoint caused wrong results for the last three tests.
-
- Test: svg/custom/radial-gradient-with-outstanding-focalPoint.svg
-
- * svg/SVGRadialGradientElement.cpp:
- (WebCore::SVGRadialGradientElement::buildGradient):
-
-2009-12-04 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Dmitry Titov.
-
- Do not use WebCore::String::String(const UChar*, int length) to convert
- short v8 strings.
-
- Plus added string traits.
- https://bugs.webkit.org/show_bug.cgi?id=31415
-
- * bindings/v8/V8Binding.cpp:
- (WebCore::):
- (WebCore::v8StringToWebCoreString):
-
-2009-12-04 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- REGRESSION: AX: buttons now extremely repetitive
- https://bugs.webkit.org/show_bug.cgi?id=32164
-
- Test: platform/mac/accessibility/button-shouldnot-have-axvalue.html
-
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::isButton):
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
-
-2009-12-04 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
-
- Reviewed by Darin Adler.
-
- Check whether the right side of a string append is non-empty
- https://bugs.webkit.org/show_bug.cgi?id=32151
-
- Especially beneficial for CachedScript::script() method
- which usually appends an empty string returned by flush()
- to its m_script member. m_script is often hundreds of kbytes
- which is duplated without reason.
-
- * platform/text/String.cpp:
- (WebCore::String::append):
-
-2009-12-04 Enrica Casucci <enrica@apple.com>
-
- Reviewed by John Sullivan.
-
- Mail.app crashes when indenting table pasted from Numbers.app.
- <rdar://problem/7209507>
- https://bugs.webkit.org/show_bug.cgi?id=32166
-
- Test: LayoutTests/editing/execCommand/indent-partial-table.html
-
- * editing/IndentOutdentCommand.cpp:
- (WebCore::IndentOutdentCommand::indentRegion): Added test to verify that the end of the paragraph
- after the selection has not been moved.
-
-2009-12-04 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=32085
- WebSocket should block the same ports that are blocked for resource loading
-
- Test: websocket/tests/url-parsing.html
-
- * page/SecurityOrigin.cpp:
- (WebCore::SecurityOrigin::SecurityOrigin):
- (WebCore::SecurityOrigin::localURLSchemes):
- * page/SecurityOrigin.h:
- Move isDefaultPortForProtocol() to KURL, because that's a better place for it (SecurityOrigin
- is not even in WebCore/platform directory).
-
- * html/HTMLAnchorElement.cpp:
- (WebCore::HTMLAnchorElement::host):
- (WebCore::HTMLAnchorElement::setHost):
- (WebCore::HTMLAnchorElement::setPort):
- Updated for the new location of isDefaultPortForProtocol().
-
- * platform/KURL.cpp:
- (WebCore::KURL::protocolIs): In an assertion, compare to "javascript" case-insensitively,
- since the function doesn't require lower case input.
- (WebCore::isDefaultPortForProtocol): Moved from SecurityOrigin.
- (WebCore::portAllowed): Moved from ResourceHandle.
- * platform/KURL.h:
-
- * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::create): Updated for the
- new location of portAllowed().
-
- * websockets/WebSocket.cpp: (WebCore::WebSocket::connect): Per the spec, raise a SECURITY_ERR
- if trying to connect to a blocked port.
-
-2009-12-04 Benjamin Poulain <benjamin.poulain@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- [Qt] WebKit crashes when loading certain SVG images
- https://bugs.webkit.org/show_bug.cgi?id=29443
-
- Remove FontFallbackListQt and rely on the common FontFallbackList
- to handle the fonts. FontCache and FontPlatformData have been
- updated to work with the common FontFallbackList.
-
- In the previous implementation, FontPlatformDataCacheKey
- was a clone of FontPlatformData with the hashing
- capabilities added in order to use it as a key in the cache's
- hashmap. FontPlatformData has been modified to handle the hashing
- function directly so the data are not copied twice in memory.
-
- FontFallbackList::fontDataAt() from FontFallbackListQt was a copy of
- code from FontCache::getFontData() and FontFallbackList::fontDataAt().
- The behavior is similar except currFamily->family().length() was
- not tested and the fallback fonts selector were not used.
-
- Existing tests cover the change.
-
- * WebCore.pro:
- * platform/graphics/qt/FontCacheQt.cpp:
- (WebCore::FontCache::platformInit):
- (WebCore::FontCache::getFontDataForCharacters):
- (WebCore::FontCache::getSimilarFontPlatformData):
- (WebCore::FontCache::getLastResortFallbackFont):
- (WebCore::FontCache::getTraitsInFamily):
- (WebCore::FontCache::createFontPlatformData):
- * platform/graphics/qt/FontCustomPlatformData.cpp:
- (WebCore::FontCustomPlatformData::fontPlatformData):
- * platform/graphics/qt/FontFallbackListQt.cpp:
- Removed. We now use the implementation from FontFallbackList.cpp
- * platform/graphics/qt/FontPlatformData.h:
- Add hashing capabilities to be able to use the data with the FontCache.
- This was previously done in FontCacheQt.cpp
- (WebCore::FontPlatformDataPrivate::FontPlatformDataPrivate):
- (WebCore::FontPlatformData::FontPlatformData):
- (WebCore::FontPlatformData::isHashTableDeletedValue):
- (WebCore::FontPlatformData::font):
- (WebCore::FontPlatformData::size):
- (WebCore::FontPlatformData::family):
- (WebCore::FontPlatformData::bold):
- (WebCore::FontPlatformData::italic):
- (WebCore::FontPlatformData::smallCaps):
- (WebCore::FontPlatformData::pixelSize):
- * platform/graphics/qt/FontPlatformDataQt.cpp:
- (WebCore::FontPlatformData::FontPlatformData):
- (WebCore::FontPlatformData::~FontPlatformData):
- (WebCore::FontPlatformData::operator=):
- (WebCore::FontPlatformData::operator==):
- (WebCore::FontPlatformData::hash):
-
-2009-12-04 Adam Treat <atreat@rim.com>
-
- Reviewed by Dan Bernstein.
-
- Fix wrong assert that was only working through sheer luck.
- https://bugs.webkit.org/show_bug.cgi?id=32162
-
- * platform/text/BidiContext.cpp:
- (WebCore::BidiContext::create):
-
-2009-12-04 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Allow removing 'qrc' as a local security origin scheme
-
- * page/SecurityOrigin.cpp:
-
-2009-12-04 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Allow custom memory allocation control for WebCore's CollectionCache
- https://bugs.webkit.org/show_bug.cgi?id=32109
-
- Inherits the following class from FastAllocBase because it is
- instantiated by 'new':
-
- struct name - instantiated at: WebCore/'location'
-
- struct CollectionCache - dom/Document.cpp:4029
-
- * html/CollectionCache.h:
-
-2009-12-04 Steve Block <steveblock@google.com>
-
- Reviewed by Darin Adler.
-
- Fixes a crashing bug in Geolocation when a watch is cleared from some callbacks.
- https://bugs.webkit.org/show_bug.cgi?id=32111
-
- In Geolocation::GeoNotifier::timerFired, a JS callback may be invoked if a
- fatal error was registered on this GeoNotifier or if this request has timed
- out. If the request is a watch, and is cleared by a call to clearWatch in the
- callback, the GeoNotifier object will be destroyed. We must therefore cache the
- m_geolocation member to allow us to call Geolocation::fatalErrorOccurred or
- Geolocation::requestTimedOut.
-
- Tests: fast/dom/Geolocation/permission-denied-already-clear-watch.html
- fast/dom/Geolocation/timeout-clear-watch.html
-
- * page/Geolocation.cpp: Modified.
- (WebCore::Geolocation::GeoNotifier::timerFired): Modified. Cache the m_geolocation member before invoking the JS callback.
-
-2009-12-04 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Allow custom memory allocation control for 2 classes of the platform directory in WebCore
- https://bugs.webkit.org/show_bug.cgi?id=
-
- Inherits the following class from Noncopyable because it is instantiated
- by 'new' and no need to be copyable:
-
- class/struct name - instantiated at: WebCore/'location'
-
- class SharedTimer - (its child class) workers/WorkerRunLoop.cpp:91
-
- Inherits the following class from FastAllocBase because it is
- instantiated by 'new':
-
- class TransformOperations - rendering/style/RenderStyle.h:1175
-
- Noncopyable.h's include added to SharedTimer.h.
-
- * platform/SharedTimer.h:
- * platform/graphics/transforms/TransformOperations.h:
-
-2009-12-04 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- [GTK]Enable DNS prefetching
- https://bugs.webkit.org/show_bug.cgi?id=23846
-
- Enable DNS prefetching.
-
- Based on a patch by José Millán.
-
- * platform/network/soup/DNSSoup.cpp:
- (WebCore::prefetchDNS):
-
-2009-12-04 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Allow custom memory allocation control for the svg directory in WebCore
- https://bugs.webkit.org/show_bug.cgi?id=
-
- Inherits the following classes from Noncopyable because these are instantiated
- by 'new' and no need to be copyable:
-
- class/struct name - instantiated at: WebCore/'location'
-
- struct ResourceSet - svg/graphics/SVGResource.cpp:148
- class SVGFontData - css/CSSFontFaceSource.cpp:156
- class SVGDocumentExtensions - dom/Document.cpp:3962
- class SVGViewSpec - svg/SVGSVGElement.cpp:191
-
- * svg/SVGDocumentExtensions.h:
- * svg/SVGFontData.h:
- * svg/SVGViewSpec.h:
- * svg/graphics/SVGResource.cpp:
-
-2009-12-03 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Beth Dakin.
-
- WAI-ARIA: aria-activedescendant doesn't work as intended
- https://bugs.webkit.org/show_bug.cgi?id=32100
-
- Fixes a number of issues regarding the "tree" role and aria-activedescendant.
- 1. The indexes were being reported incorrectly by treeitems.
- 2. aria-activedescendant changes were not being sent to the containing item.
- 3. The tree's selected rows need to consult aria-activedescendant.
- 4. Since a tree changes what it returns as its children (it returns its rows)
- the mac-specific array indexing methods need to correctly handle the tree case.
-
- Tests: platform/mac/accessibility/aria-tree-activedescendant.html
- platform/mac/accessibility/aria-tree-index-of-items.html
-
- * accessibility/AXObjectCache.h:
- (WebCore::AXObjectCache::):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::shouldFocusActiveDescendant):
- (WebCore::AccessibilityRenderObject::activeDescendant):
- (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
- (WebCore::AccessibilityRenderObject::ariaTreeSelectedRows):
- * accessibility/mac/AXObjectCacheMac.mm:
- (WebCore::AXObjectCache::postPlatformNotification):
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
- (-[AccessibilityObjectWrapper accessibilityIndexOfChild:]):
- (-[AccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
- * accessibility/win/AXObjectCacheWin.cpp:
- (WebCore::AXObjectCache::postPlatformNotification):
-
-2009-12-03 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Allow custom memory allocation control for the xml directory in WebCore
- https://bugs.webkit.org/show_bug.cgi?id=
-
- Inherits the following class from Noncopyable because it is instantiated
- by 'new' and no need to be copyable:
-
- class/struct name - instantiated at: WebCore/'location'
-
- struct XMLHttpRequestStaticData - xml/XMLHttpRequest.cpp:134
-
- Inherits the following classes from FastAllocBase because these are instantiated by 'new':
-
- class NodeTest - xml/XPathGrammar.y:258
- class NodeSet - xml/XPathValue.cpp:52
- struct EvaluationContext - xml/XPathExpressionNode.cpp:40
-
- * xml/XMLHttpRequest.cpp:
- * xml/XPathExpressionNode.h:
- * xml/XPathNodeSet.h:
- * xml/XPathStep.h:
-
-2009-12-03 Drew Wilson <atwilson@chromium.org>
-
- Reviewed by Adam Barth.
-
- New History changes do not compile for Chromium/V8
- https://bugs.webkit.org/show_bug.cgi?id=32148
-
- Existing tests suffice (just trying to get code to compile).
-
- * WebCore.gypi:
- Added V8HistoryCustom.cpp and other missing files.
- * bindings/v8/custom/V8CustomBinding.h:
- Added custom handlers for History.pushState()/replaceState().
- * bindings/v8/custom/V8HistoryCustom.cpp: Added.
- Added custom handlers for History.pushState()/replaceState().
- * history/BackForwardListChromium.cpp:
- (WebCore::BackForwardList::pushStateItem):
- Stubbed out this routine for now - will implement in the future.
-
-2009-12-03 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- OwnPtr<XBLBindingManager> Document::m_bindingManager;
- https://bugs.webkit.org/show_bug.cgi?id=32147
-
- The document actually owns the bindingManager. That's what the code
- should say.
-
- * dom/Document.cpp:
- (WebCore::Document::~Document):
- * dom/Document.h:
- (WebCore::Document::bindingManager):
-
-2009-12-03 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- OwnPtr<Tokenizer> Document::m_tokenizer;
- https://bugs.webkit.org/show_bug.cgi?id=32145
-
- The document actually owns the tokenizer. That's what the code should say.
-
- * dom/Document.cpp:
- (WebCore::Document::removedLastRef):
- (WebCore::Document::~Document):
- (WebCore::Document::cancelParsing):
- (WebCore::Document::implicitOpen):
- (WebCore::Document::implicitClose):
- * dom/Document.h:
- (WebCore::Document::tokenizer):
-
-2009-12-03 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- OwnPtr<RenderArena> Document::m_renderArena;
- https://bugs.webkit.org/show_bug.cgi?id=32146
-
- The document owns the renderArena. That's what the code should say.
-
- * dom/Document.cpp:
- (WebCore::Document::Document): Also, removed a redundant initialization
- of the tokenizer that I missed in my previous patch.
- (WebCore::Document::~Document):
- (WebCore::Document::attach):
- (WebCore::Document::detach):
- * dom/Document.h:
- (WebCore::Document::renderArena):
-
-2009-12-03 Drew Wilson <atwilson@chromium.org>
-
- Rolling back r51633 because it causes a chromium perf regression.
-
- * platform/graphics/SimpleFontData.h:
- * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
-
-2009-12-03 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- The code should say that Document owns DocLoader
- https://bugs.webkit.org/show_bug.cgi?id=32143
-
- It's the truth.
-
- * dom/Document.cpp:
- (WebCore::Document::~Document):
- * dom/Document.h:
- (WebCore::Document::docLoader):
-
-2009-12-03 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Eric Seidel.
-
- AX: VO just says "term" on many web sites
- https://bugs.webkit.org/show_bug.cgi?id=32139
-
- Test: platform/mac/accessibility/definition-list-term.html
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::accessibilityDescription):
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper subrole]):
- (-[AccessibilityObjectWrapper roleDescription]):
-
-2009-12-03 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Beth Dakin.
-
- Implement WAI-ARIA scrollbar role and related property aria-orientation
- https://bugs.webkit.org/show_bug.cgi?id=32126
-
- Test: accessibility/aria-scrollbar-role.html
-
- * accessibility/AccessibilityObject.cpp:
- (WebCore::createARIARoleMap):
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::isScrollbar):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::valueForRange):
- (WebCore::AccessibilityRenderObject::orientation):
- (WebCore::AccessibilityRenderObject::canHaveChildren):
- * accessibility/AccessibilityRenderObject.h:
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
- (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
- * html/HTMLAttributeNames.in:
-
-2009-12-03 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Darin Adler.
-
- Fixed <rdar://problem/7401617> Selection painting issue in hardware-
- accelerated layers
- which is another part of https://bugs.webkit.org/show_bug.cgi?id=23628
- Fix selection painting to do container-relative repaints
-
- Test: fast/repaint/block-selection-gap-in-composited-layer.html
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::selectionGapRectsForRepaint): Compute and paint
- gap rects in the coordinate space of the repaint container.
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect): Added a
- FIXME.
- * rendering/RenderView.cpp:
- (WebCore::RenderView::setSelection): Map block selection gap rects from
- the repaint container’s coordinate space to the view’s coordinate space
- before adding them to the cached selection bounds.
- (WebCore::RenderView::clearSelection): Changed to use
- repaintRectangleInViewAndCompositedLayers() so that the selection rect
- is invalidated in composited layers as well.
-
-2009-12-03 Jonathan Dixon <joth@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Bug 32066 - Add enable geolocation flag to WebCore::Settings for Chromium
- https://bugs.webkit.org/show_bug.cgi?id=32066
-
- Adds geolocationEnabled in Settings for runtime control of geolocaiton features. This defaults to ON
- as it is intended as a development and testing aid, not a user control. To completely remove geolocation
- from a given port, the compile time ENABLE_GEOLOCATION should still be used.
- Adding placeholder GeolocationServiceChromium implementation, as this is required to allows
- ENABLE_GEOLOCATION to be defined (in turn required for testing), even though this patch does not
- make that the default just yet.
-
- * WebCore.gypi:
- * page/Settings.cpp:
- (WebCore::Settings::Settings): Add new m_geolocationEnabled flag default value
- (WebCore::Settings::setGeolocationEnabled): Setter for m_geolocationEnabled flag
- * page/Settings.h:
- (WebCore::Settings::geolocationEnabled): Add m_geolocationEnabled flag
- * platform/chromium/GeolocationServiceChromium.cpp: Added.
- (WebCore::GeolocationServiceChromium::GeolocationServiceChromium): Place holder GeolocationServiceChromium)
- (WebCore::createGeolocationService): factory function, only required when ENABLED(GEOLOCATION) is true
-
-2009-12-03 Enrica Casucci <enrica@apple.com>
-
- Reviewed by John Sullivan.
-
- SpinTracer: 349 spins in Mail at WebCore::Editor::advanceToNextMisspelling(bool)
- <rdar://problem/7198592>
- https://bugs.webkit.org/show_bug.cgi?id=32129
-
- Fixed the way the next paragraph is calculated.
- I've added a repro case in Safari and attached it to the Bugzilla bug.
-
- * editing/Editor.cpp:
- (WebCore::findFirstMisspellingOrBadGrammarInRange): Changed the way we move to the
- next paragraph in the loop.
-
-2009-12-03 Oliver Hunt <oliver@apple.com>
-
- Build fix
-
- * svg/SVGListTraits.h:
- (WebCore::):
-
-2009-12-03 Oliver Hunt <oliver@apple.com>
-
- Build fix
-
- * svg/SVGListTraits.h:
- (WebCore::):
-
-2009-12-03 Brady Eidson <beidson@apple.com>
-
- No wonder editing WebCore.exp repeatedly while I worked on this patch never seemed to stick.
-
- Long live our auto-generated overlords that I didn't know about...
-
- * WebCore.base.exp:
-
-2009-12-03 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Dan Bernstein.
-
- REGRESSION (r51627): 3 SVG tests are failing
- https://bugs.webkit.org/show_bug.cgi?id=32117
-
- Null checking Items in the SVGList is insufficient as items may
- be floats, etc so add SVGListTraits::isNull and add appropriate
- specializations.
-
- Test: svg/dom/svglist-exception-on-out-bounds-error.html
-
- * svg/SVGList.h:
- (WebCore::SVGListTypeOperations::isNull):
- (WebCore::SVGList::initialize):
- (WebCore::SVGList::insertItemBefore):
- (WebCore::SVGList::replaceItem):
- (WebCore::SVGList::appendItem):
- * svg/SVGListTraits.h:
- (WebCore::):
-
-2009-12-03 Brady Eidson <beidson@apple.com>
-
- No review - release build fix.
-
- * history/HistoryItem.cpp:
- (WebCore::HistoryItem::documentDetached):
-
-2009-12-03 Brady Eidson <beidson@apple.com>
-
- No review - release build fix.
-
- * loader/HistoryController.cpp:
- (WebCore::HistoryController::pushState):
-
-2009-12-03 Enrica Casucci <enrica@apple.com>
-
- Reviewed by Adele Peterson.
-
- Multiple Undos removes the last posted comment and/or the ones before it.
- <rdar://problem/6557066>
- https://bugs.webkit.org/show_bug.cgi?id=32079
-
- The fix consists in preventing Undos and Redos to be applied to elements that
- are no longer editable. We do not attempt to remove the commands from the queue.
- It is a relatively simple fix that comes with a little extra overhead for the apply
- and unapply methods where we are now performing the editability check.
-
- Test: editing/undo/undo-indent-noneditable.html
-
- * editing/AppendNodeCommand.cpp:
- (WebCore::AppendNodeCommand::doApply):
- (WebCore::AppendNodeCommand::doUnapply):
- * editing/DeleteFromTextNodeCommand.cpp:
- (WebCore::DeleteFromTextNodeCommand::doApply):
- (WebCore::DeleteFromTextNodeCommand::doUnapply):
- * editing/InsertIntoTextNodeCommand.cpp:
- (WebCore::InsertIntoTextNodeCommand::doApply):
- (WebCore::InsertIntoTextNodeCommand::doUnapply):
- * editing/InsertNodeBeforeCommand.cpp:
- (WebCore::InsertNodeBeforeCommand::doApply):
- (WebCore::InsertNodeBeforeCommand::doUnapply):
- * editing/JoinTextNodesCommand.cpp:
- (WebCore::JoinTextNodesCommand::doApply):
- (WebCore::JoinTextNodesCommand::doUnapply):
- * editing/MergeIdenticalElementsCommand.cpp:
- (WebCore::MergeIdenticalElementsCommand::doApply):
- (WebCore::MergeIdenticalElementsCommand::doUnapply):
- * editing/RemoveNodeCommand.cpp:
- (WebCore::RemoveNodeCommand::doApply):
- (WebCore::RemoveNodeCommand::doUnapply):
- * editing/SplitElementCommand.cpp:
- (WebCore::SplitElementCommand::executeApply):
- (WebCore::SplitElementCommand::doUnapply):
- * editing/SplitTextNodeCommand.cpp:
- (WebCore::SplitTextNodeCommand::doApply):
- (WebCore::SplitTextNodeCommand::doUnapply):
- * editing/WrapContentsInDummySpanCommand.cpp:
- (WebCore::WrapContentsInDummySpanCommand::doUnapply):
- (WebCore::WrapContentsInDummySpanCommand::doReapply):
-
-2009-12-03 Brady Eidson <beidson@apple.com>
-
- Reviewed by Sam Weinig.
-
- <rdar://problem/7214236> and http://webkit.org/b/32052 - Implement HTML5 state object history API
-
- Tests: fast/loader/stateobjects/document-destroyed-navigate-back.html
- fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll.html
- fast/loader/stateobjects/popstate-after-load-complete-addeventlistener.html
- fast/loader/stateobjects/popstate-after-load-complete-body-attribute.html
- fast/loader/stateobjects/popstate-after-load-complete-window-attribute.html
- fast/loader/stateobjects/pushstate-object-types.html
- fast/loader/stateobjects/pushstate-then-replacestate.html
- fast/loader/stateobjects/pushstate-with-fragment-urls-and-hashchange.html
- fast/loader/stateobjects/replacestate-then-pushstate.html
- http/tests/loading/state-object-security-exception.html
-
- Derived sources and project file changes:
- * DerivedSources.cpp:
- * DerivedSources.make:
- * GNUmakefile.am
- * WebCore.pro
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
-
- Add the new PopStateEvent:
- * dom/PopStateEvent.cpp: Added.
- (WebCore::PopStateEvent::PopStateEvent):
- (WebCore::PopStateEvent::initPopStateEvent):
- * dom/PopStateEvent.h: Added.
- (WebCore::PopStateEvent::create):
- (WebCore::PopStateEvent::isPopStateEvent):
- (WebCore::PopStateEvent::state):
- * dom/PopStateEvent.idl: Added.
- * bindings/js/JSPopStateEventCustom.cpp: Added.
- (WebCore::JSPopStateEvent::initPopStateEvent):
- (WebCore::JSPopStateEvent::state):
- * bindings/js/JSEventCustom.cpp:
- (WebCore::toJS):
- * dom/Event.cpp:
- (WebCore::Event::isPopStateEvent):
- * dom/Event.h:
- * dom/EventNames.h:
-
- Add the "onpopstate" attribute:
- * html/HTMLAttributeNames.in:
- * html/HTMLBodyElement.cpp:
- (WebCore::HTMLBodyElement::parseMappedAttribute):
- * html/HTMLBodyElement.idl:
- * html/HTMLFrameSetElement.cpp:
- (WebCore::HTMLFrameSetElement::parseMappedAttribute):
- * html/HTMLFrameSetElement.h:
- * html/HTMLFrameSetElement.idl:
- * page/DOMWindow.h:
- * page/DOMWindow.idl:
-
- Add pushState and replaceState management to the loader and history machinery:
- * bindings/js/JSHistoryCustom.cpp:
- (WebCore::JSHistory::pushState):
- (WebCore::JSHistory::replaceState):
- * loader/HistoryController.cpp:
- (WebCore::HistoryController::updateForSameDocumentNavigation): Augmented from "scrollToAnchor()", combining
- both the same-document fragment scroll case with the new same-document state object activation case.
- (WebCore::HistoryController::pushState):
- (WebCore::HistoryController::replaceState):
- * loader/HistoryController.h:
- * history/BackForwardList.cpp:
- (WebCore::BackForwardList::addItem): Use insertItemAfterCurrent.
- (WebCore::BackForwardList::insertItemAfterCurrent): Optionally insert the item without clearing the forward
- list, as pushStateItem might've selectively cleared only certain items, with the bulk of the forward list
- meant to remain.
- (WebCore::BackForwardList::pushStateItem): Clear the forward list *only* for the state item's document, then
- insert the new item.
- (WebCore::BackForwardList::removeItem):
- * history/BackForwardList.h:
- * page/History.cpp:
- (WebCore::History::urlForState):
- (WebCore::History::stateObjectAdded):
- * page/History.h:
- * page/History.idl:
-
- Let HistoryItems and Documents associate with each other, as well as letting HistoryItems contain state objects:
- * history/HistoryItem.cpp:
- (WebCore::HistoryItem::HistoryItem):
- (WebCore::HistoryItem::~HistoryItem):
- (WebCore::HistoryItem::setStateObject):
- (WebCore::HistoryItem::setDocument):
- (WebCore::HistoryItem::documentDetached):
- * history/HistoryItem.h:
- (WebCore::HistoryItem::stateObject):
- (WebCore::HistoryItem::document):
- * dom/Document.cpp:
- (WebCore::Document::detach): Notify all back/forward history items owned by this Document that it
- is going away.
- (WebCore::Document::registerHistoryItem): Manage the list of back/forward history items this document owns.
- (WebCore::Document::unregisterHistoryItem): Ditto.
- * dom/Document.h:
-
- Add the ability for Documents, DocumentLoaders, and FrameLoaderClients to be notified when a Documents
- URL changes as the result of pushState(), replaceState(), or a popstate navigation:
- * dom/Document.cpp:
- (WebCore::Document::implicitClose): If there's a pending state object, dispatch the popstate event.
- (WebCore::Document::updateURLForPushOrReplaceState):
- (WebCore::Document::statePopped): If loading is complete, dispatch the popstate event. Otherwise, set
- the pending state object.
- * loader/DocumentLoader.cpp:
- (WebCore::DocumentLoader::replaceRequestURLForSameDocumentNavigation):
- * loader/DocumentLoader.h:
- * loader/FrameLoaderClient.h:
- * loader/EmptyClients.h:
- (WebCore::EmptyFrameLoaderClient::dispatchDidChangeStateObjectForPageForFrame):
-
- Change handling of "loading a HistoryItem" to distinguish between new-Document navigations and same-Document
- navigations, combining the old concept of anchor scrolls with the new concept of state object navigations:
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::loadInSameDocument):
- (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
- (WebCore::FrameLoader::navigateWithinDocument):
- (WebCore::FrameLoader::navigateToDifferentDocument):
- (WebCore::FrameLoader::loadItem):
- * loader/FrameLoader.h:
- * page/Page.cpp:
- (WebCore::Page::goToItem): Changed to allow state object activations to pass through without the load stopping.
-
-2009-12-03 Pavel Feldman <pfeldman@chromium.org>
-
- Not reviewed: chromium build fix.
- r51621 changed JS bindings only, broke v8's.
-
- * bindings/v8/ScriptFunctionCall.cpp:
- (WebCore::ScriptFunctionCall::appendArgument):
- * bindings/v8/ScriptFunctionCall.h:
-
-2009-12-03 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Adam Barth.
-
- [V8] Attributes and NamedNodeMaps aren't tracked correctly and may be prematurely garbage-collected.
- https://bugs.webkit.org/show_bug.cgi?id=32094
-
- Covered by existing test: LayoutTests/fast/dom/Attr/access-after-element-destruction.html
-
- * bindings/v8/DOMObjectsInclude.h:
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getTemplate):
- (WebCore::V8DOMWrapper::convertToV8Object):
- (WebCore::V8DOMWrapper::convertNamedNodeMapToV8Object):
- * bindings/v8/V8DOMWrapper.h:
- * bindings/v8/V8GCController.cpp:
- (WebCore::ObjectGrouperVisitor::visitDOMWrapper):
- * bindings/v8/custom/V8CustomBinding.h:
-
-2009-12-03 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Chromium: Add support for settings containing ":"
-
- https://bugs.webkit.org/show_bug.cgi?id=32118
-
- * inspector/front-end/WatchExpressionsSidebarPane.js:
- (WebInspector.WatchExpressionsSection):
-
-2009-12-03 Rafael Antognolli <antognolli@profusion.mobi>, Kenneth Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Fraser.
-
- repaint events from outside the viewport aren't received
- https://bugs.webkit.org/show_bug.cgi?id=32081
-
- When using a tiled backing store for painting, you need to receive
- event from outside the viewport. Setting the viewport to the size
- of the contents is not an option if you want to make use of WebCore's
- infrastructure for drawing scrollbars etc.
-
- A new property, paintsEntireContents, has been introduced for the
- above use-case. It is settable, as tiling will be optional for Qt,
- and for the not yet upstreamed EFL port, there will be two different
- views, where only one of them are tiled.
-
- No change in behavior, so no new tests added.
-
- * page/FrameView.cpp:
- (WebCore::FrameView::repaintContentRectangle):
- * platform/ScrollView.cpp:
- (WebCore::ScrollView::ScrollView):
- (WebCore::ScrollView::setPaintsEntireContents):
- (WebCore::ScrollView::wheelEvent):
- * platform/ScrollView.h:
- (WebCore::ScrollView::paintsEntireContents):
-
-2009-11-23 Jeremy Moskovich <jeremy@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Switch Chrome/Mac to use Core Text APIs rather than ATSUI APIs.
- https://bugs.webkit.org/show_bug.cgi?id=31802
-
- No test since this is already covered by existing pixel tests.
-
- * platform/graphics/SimpleFontData.h: Change #ifdef to define getNSFont() on Chrome/Mac .
- * platform/graphics/mac/ComplexTextControllerCoreText.cpp: Provide forward declarations
- of Core Text functions that are public on 10.6 but SPI on 10.5.
-
-2009-12-03 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Simplify the settings support in inspector controller.
-
- https://bugs.webkit.org/show_bug.cgi?id=32076
-
- Test: inspector/settings-set-get.html
-
- * WebCore.Inspector.exp:
- * bindings/js/JSInspectorFrontendHostCustom.cpp:
- * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
- * inspector/InspectorClient.h:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::~InspectorController):
- (WebCore::InspectorController::setting):
- (WebCore::InspectorController::setSetting):
- (WebCore::InspectorController::setWindowVisible):
- (WebCore::InspectorController::attachWindow):
- (WebCore::InspectorController::setAttachedWindowHeight):
- (WebCore::InspectorController::storeLastActivePanel):
- (WebCore::InspectorController::scriptObjectReady):
- (WebCore::InspectorController::showWindow):
- (WebCore::InspectorController::enableResourceTracking):
- (WebCore::InspectorController::disableResourceTracking):
- (WebCore::InspectorController::ensureResourceTrackingSettingsLoaded):
- (WebCore::InspectorController::enableProfiler):
- (WebCore::InspectorController::disableProfiler):
- (WebCore::InspectorController::enableDebuggerFromFrontend):
- (WebCore::InspectorController::disableDebugger):
- * inspector/InspectorController.h:
- * inspector/InspectorFrontendHost.cpp:
- (WebCore::InspectorFrontendHost::setting):
- (WebCore::InspectorFrontendHost::setSetting):
- * inspector/InspectorFrontendHost.h:
- * inspector/InspectorFrontendHost.idl:
- * loader/EmptyClients.h:
- (WebCore::EmptyInspectorClient::populateSetting):
- (WebCore::EmptyInspectorClient::storeSetting):
-
-2009-12-03 Ben Murdoch <benm@google.com>
-
- Reviewed by Brady Eidson.
-
- [Android] notifyHistoryItemChanged() should pass a pointer to the HistoryItem that changed.
- https://bugs.webkit.org/show_bug.cgi?id=31915
-
- No change in functionality so no new tests required.
-
- * history/HistoryItem.cpp:
- (WebCore::defaultNotifyHistoryItemChanged): Update this function to pass the HistoryItem that is being changed.
- (WebCore::HistoryItem::setAlternateTitle): Update call to notifyHistoryItemChanged to include the new parameter.
- (WebCore::HistoryItem::setURLString): ditto.
- (WebCore::HistoryItem::setOriginalURLString): ditto.
- (WebCore::HistoryItem::setReferrer): ditto.
- (WebCore::HistoryItem::setTitle): ditto.
- (WebCore::HistoryItem::setTarget): ditto.
- (WebCore::HistoryItem::setDocumentState): On Android, add a call to notifyHistoryItemChanged. See bug for a discussion of why this is needed.
- (WebCore::HistoryItem::clearDocumentState): ditto.
- (WebCore::HistoryItem::setIsTargetItem): ditto.
- (WebCore::HistoryItem::addChildItem): ditto.
- (WebCore::HistoryItem::setFormInfoFromRequest): ditto.
- * history/HistoryItem.h: Update signature of notifyHistoryItemChanged.
-
-2009-12-03 Ben Murdoch <benm@google.com>
-
- Reviewed by Brady Eidson.
-
- [Android] The FrameLoaderClient is unaware of BackForwardList changes.
- https://bugs.webkit.org/show_bug.cgi?id=31914
-
- This change adds three new methods on the FrameLoaderClient interface to receive notifications when the BackForwardList changes.
-
- No new tests required. Functionality on all platforms upstream remains the same. Android is the first platform to make use of these callbacks.
-
- * history/BackForwardList.cpp:
- (WebCore::BackForwardList::addItem): Execute the callback.
- (WebCore::BackForwardList::goBack): ditto.
- (WebCore::BackForwardList::goForward): ditto.
- (WebCore::BackForwardList::goToItem): ditto.
- (WebCore::BackForwardList::setCapacity): dito.
- * loader/EmptyClients.h:
- (WebCore::EmptyFrameLoaderClient::dispatchDidAddBackForwardItem): Add an empty implementation for the callback that does nothing.
- (WebCore::EmptyFrameLoaderClient::dispatchDidRemoveBackForwardItem): ditto.
- (WebCore::EmptyFrameLoaderClient::dispatchDidChangeBackForwardIndex): ditto.
- * loader/FrameLoaderClient.h:
-
-2009-12-03 Ben Murdoch <benm@google.com>
-
- Reviewed by Brady Eidson.
-
- [Android] Upstream WebCore/history/android: Require some platform specific state attached to HistoryItem.
- https://bugs.webkit.org/show_bug.cgi?id=31913
-
- Android stores information such as the zoom scale factor and bridge back to the Java counterpart with HistoryItem.
-
- No new tests required as this is Android specific code.
-
- * history/HistoryItem.h: Add Android specific member data to HistoryItem.
- * history/android: Added.
- * history/android/AndroidWebHistoryBridge.h: Added.
- * history/android/HistoryItemAndroid.cpp: Added, provides implementation for Android specific member functions in HistoryItem.
- (WebCore::HistoryItem::bridge): Added.
- (WebCore::HistoryItem::setBridge): Added.
-
-2009-12-03 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Maciej Stachowiak.
-
- NULL ptr in SVGPathSegList::getPathSegAtLength()
- https://bugs.webkit.org/show_bug.cgi?id=30313
-
- Add exception checks to SVGPathSegList's implementation to catch (and propagate) exceptions.
- Add null checks to SVGList's content manipulation functions to prevent
- null values from entering the list in the first place.
-
- Test: svg/dom/svgpath-out-of-bounds-getPathSeg.html
-
- * svg/SVGList.h:
- (WebCore::SVGList::initialize):
- (WebCore::SVGList::insertItemBefore):
- (WebCore::SVGList::replaceItem):
- (WebCore::SVGList::appendItem):
- * svg/SVGPathElement.cpp:
- (WebCore::SVGPathElement::getPathSegAtLength):
- * svg/SVGPathElement.h:
- * svg/SVGPathElement.idl:
- * svg/SVGPathSegList.cpp:
- (WebCore::SVGPathSegList::getPathSegAtLength):
- (WebCore::SVGPathSegList::toPathData):
- (WebCore::SVGPathSegList::createAnimated):
- * svg/SVGPathSegList.h:
-
-2009-12-02 Yusuke Sato <yusukes@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Sanitize web fonts using the OTS library
- https://bugs.webkit.org/show_bug.cgi?id=31106
-
- Add support for OpenType sanitizer (OTS). It parses OpenType files (from @font-face)
- and attempts to validate and sanitize them. We hope this reduces the attack surface
- of the system font libraries.
-
- * WebCore.gyp/WebCore.gyp: Added dependency to (chromium_src_dir)/third_party/ots/ library.
- * WebCore.gypi: Added new files below.
- * WebCore.xcodeproj/project.pbxproj: Ditto.
- * platform/graphics/chromium/FontCustomPlatformData.cpp: Validate and transcode a web font.
- (WebCore::createFontCustomPlatformData):
- * platform/graphics/mac/FontCustomPlatformData.cpp: Ditto.
- (WebCore::createFontCustomPlatformData):
- * platform/graphics/opentype/OpenTypeSanitizer.cpp: Added.
- (WebCore::OpenTypeSanitizer::sanitize):
- * platform/graphics/opentype/OpenTypeSanitizer.h: Added.
- (WebCore::OpenTypeSanitizer::OpenTypeSanitizer):
-
-2009-12-02 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Sam Weinig.
-
- Web Inspector frontend heap allocates ScriptFunctionCall which is unsafe
- https://bugs.webkit.org/show_bug.cgi?id=32098
-
- Fix is simply to make the ScriptFunctionCall stack allocated as nature intended.
- Doing this required adding an appendArgument(char*) to ScriptFunctionCall so
- that an explicit String cast would not be necessary.
-
- To prevent something like this happening again in future i've added private
- operator new implementations to ScriptFunctionCall making this type of mistake
- produce errors when compiling.
-
- Test case: Inspector tests now pass with GC on every alloc enabled.
-
- * bindings/js/ScriptFunctionCall.cpp:
- (WebCore::ScriptFunctionCall::appendArgument):
- * bindings/js/ScriptFunctionCall.h:
- (WebCore::ScriptFunctionCall::operator new):
- (WebCore::ScriptFunctionCall::operator new[]):
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::addConsoleMessage):
- (WebCore::InspectorFrontend::updateConsoleMessageRepeatCount):
- (WebCore::InspectorFrontend::addResource):
- (WebCore::InspectorFrontend::updateResource):
- (WebCore::InspectorFrontend::removeResource):
- (WebCore::InspectorFrontend::updateFocusedNode):
- (WebCore::InspectorFrontend::setAttachedWindow):
- (WebCore::InspectorFrontend::addRecordToTimeline):
- (WebCore::InspectorFrontend::parsedScriptSource):
- (WebCore::InspectorFrontend::failedToParseScriptSource):
- (WebCore::InspectorFrontend::addProfileHeader):
- (WebCore::InspectorFrontend::setRecordingProfile):
- (WebCore::InspectorFrontend::didGetProfileHeaders):
- (WebCore::InspectorFrontend::didGetProfile):
- (WebCore::InspectorFrontend::pausedScript):
- (WebCore::InspectorFrontend::setDocument):
- (WebCore::InspectorFrontend::setDetachedRoot):
- (WebCore::InspectorFrontend::setChildNodes):
- (WebCore::InspectorFrontend::childNodeCountUpdated):
- (WebCore::InspectorFrontend::childNodeInserted):
- (WebCore::InspectorFrontend::childNodeRemoved):
- (WebCore::InspectorFrontend::attributesUpdated):
- (WebCore::InspectorFrontend::didRemoveNode):
- (WebCore::InspectorFrontend::didGetChildNodes):
- (WebCore::InspectorFrontend::didApplyDomChange):
- (WebCore::InspectorFrontend::didGetEventListenersForNode):
- (WebCore::InspectorFrontend::didGetCookies):
- (WebCore::InspectorFrontend::didDispatchOnInjectedScript):
- (WebCore::InspectorFrontend::addDatabase):
- (WebCore::InspectorFrontend::selectDatabase):
- (WebCore::InspectorFrontend::didGetDatabaseTableNames):
- (WebCore::InspectorFrontend::addDOMStorage):
- (WebCore::InspectorFrontend::selectDOMStorage):
- (WebCore::InspectorFrontend::didGetDOMStorageEntries):
- (WebCore::InspectorFrontend::didSetDOMStorageItem):
- (WebCore::InspectorFrontend::didRemoveDOMStorageItem):
- (WebCore::InspectorFrontend::updateDOMStorage):
- (WebCore::InspectorFrontend::addNodesToSearchResult):
- (WebCore::InspectorFrontend::evaluateForTestInFrontend):
- * inspector/InspectorFrontend.h:
-
-2009-12-02 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=32072, clean up invalid @-rule error handling so that we
- pass more CSS test suite stuff. Make the grammar stop enforcing the ordering of @namespace vs.
- @variables vs. @import. Just let the parser handle that instead. This simplifies the grammar and
- makes error handling deal with more cases correctly.
-
- Added fast/css/namespaces/namespaces-invalid-at-rules.xml
-
- * css/CSSGrammar.y:
- * css/CSSParser.cpp:
- (WebCore::CSSParser::CSSParser):
- (WebCore::CSSParser::parseRule):
- (WebCore::CSSParser::createCharsetRule):
- (WebCore::CSSParser::createImportRule):
- (WebCore::CSSParser::createMediaRule):
- (WebCore::CSSParser::createKeyframesRule):
- (WebCore::CSSParser::createStyleRule):
- (WebCore::CSSParser::createFontFaceRule):
- (WebCore::CSSParser::addNamespace):
- (WebCore::CSSParser::createVariablesRule):
- * css/CSSParser.h:
-
-2009-12-02 Yusuke Sato <yusukes@chromium.org>
-
- Reviewed by Dan Bernstein.
-
- Safari/Chromium for Windows fails to load CJK WebFonts
- https://bugs.webkit.org/show_bug.cgi?id=31804
-
- * platform/graphics/opentype/OpenTypeUtilities.cpp:
- (WebCore::renameAndActivateFont): Load a remote font even if the font has 2 or more faces.
-
-2009-12-02 Avi Drissman <avi@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Chromium: Need tickmarks in scrollbar
- https://bugs.webkit.org/show_bug.cgi?id=32069
-
- * WebCore.gyp/WebCore.gyp:
- * WebCore.gypi:
- * platform/chromium/ScrollbarThemeChromiumMac.h: Added.
- * platform/chromium/ScrollbarThemeChromiumMac.mm: Added.
-
-2009-11-13 Timothy Hatcher <timothy@apple.com>
-
- Expose a function to set the value of an input element on behalf of the user.
- This function will dispatch the change event so the page is notified when autofill
- happens. Also dispatch a change event when a select element is changed by autofill.
-
- <rdar://problem/6760590> Would like a way to detect a login form AutoFill from JavaScript
-
- Reviewed by Darin Adler.
-
- * WebCore.xcodeproj/project.pbxproj: Added the DOMHTMLInputElementPrivate.h header.
- * bindings/objc/DOMHTML.mm:
- (-[DOMHTMLSelectElement _activateItemAtIndex:]): Call setSelectedIndexByUser instead so
- a change event is fired. This method is called by Safari autofill.
- * dom/Document.cpp:
- (WebCore::Document::setFocusedNode): Use dispatchFormControlChangeEvent instead
- of dispatching the change event directly to be consistent.
- * html/HTMLFormControlElement.cpp:
- (WebCore::HTMLInputElement::setValueForUser): Added. Calls setValue with the sendChangeEvent
- (WebCore::HTMLInputElement::setValue): Added the optional sendChangeEvent argument. Mimics setChecked.
- * html/HTMLInputElement.h:
- * html/HTMLInputElement.idl: Added setValueForUser for non-JS languages.
- * html/InputElement.h: Added setValueForUser.
-
-2009-12-02 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: DOM tree selection disappears upon page refresh.
-
- https://bugs.webkit.org/show_bug.cgi?id=31142
-
- Test: inspector/elements-panel-selection-on-refresh.html
-
- * inspector/InjectedScriptHost.cpp:
- (WebCore::InjectedScriptHost::pushNodeByPathToFrontend):
- * inspector/InjectedScriptHost.h:
- * inspector/InjectedScriptHost.idl:
- * inspector/InspectorBackend.h:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::close):
- (WebCore::InspectorController::releaseDOMAgent):
- (WebCore::InspectorController::resetScriptObjects):
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::~InspectorDOMAgent):
- (WebCore::InspectorDOMAgent::reset):
- (WebCore::InspectorDOMAgent::setDocument):
- (WebCore::InspectorDOMAgent::pushDocumentToFrontend):
- (WebCore::InspectorDOMAgent::nodeForPath):
- (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
- * inspector/InspectorDOMAgent.h:
- * inspector/front-end/DOMAgent.js:
- (WebInspector.DOMNode.prototype._renumber):
- (WebInspector.DOMAgent.prototype._setDocument):
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.prototype.reset):
- (WebInspector.ElementsPanel.prototype.setDocument.selectDefaultNode):
- (WebInspector.ElementsPanel.prototype.setDocument.selectLastSelectedNode):
- (WebInspector.ElementsPanel.prototype.setDocument):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.pushNodeByPathToFrontend):
- * inspector/front-end/InjectedScriptAccess.js:
-
-2009-12-01 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=32045, make sure escape sequences work with
- all the @-rules we support. When escape sequences are present, the lexical scanner
- just returns a generic token name: ATKEYWORD. We have to process the escape sequences
- and then recheck against the rules we support with the final processed name. If we
- find a match, we mutate the token value to the appropriate rule name token, e.g.,
- NAMESPACE_SYM.
-
- Added fast/css/namespaces/namespaces-escapes.xml
-
- * css/CSSParser.cpp:
- (WebCore::CSSParser::lex):
- (WebCore::CSSParser::recheckAtKeyword):
- (WebCore::CSSParser::text):
- * css/CSSParser.h:
-
-2009-12-02 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Adam Barth.:w
-
- Allow to skip thread checks when accessing DOMDataStore for processes
- which run V8 in single thread mode.
- https://bugs.webkit.org/show_bug.cgi?id=31877
-
- Should be covered by buildbots.
-
- * bindings/v8/V8DOMMap.cpp:
- (WebCore::getDOMDataStore):
- (WebCore::enableFasterDOMStoreAccess):
- (WebCore::getDOMNodeMap):
- (WebCore::getDOMObjectMap):
- (WebCore::getActiveDOMObjectMap):
- (WebCore::getDOMSVGElementInstanceMap):
- (WebCore::getDOMSVGObjectWithContextMap):
- * bindings/v8/V8DOMMap.h:
-
-2009-12-02 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Code clean up: remove ScriptObjectQuarantine.* as a whole.
-
- https://bugs.webkit.org/show_bug.cgi?id=32060
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * bindings/js/JSBindingsAllInOne.cpp:
- * bindings/js/ScriptObjectQuarantine.cpp: Removed.
- * bindings/js/ScriptObjectQuarantine.h: Removed.
- * bindings/js/ScriptValue.cpp:
- (WebCore::ScriptValue::quarantineValue):
- * bindings/js/ScriptValue.h:
- * bindings/v8/ScriptObjectQuarantine.cpp: Removed.
- * bindings/v8/ScriptObjectQuarantine.h: Removed.
- * bindings/v8/ScriptValue.h:
- (WebCore::ScriptValue::quarantineValue):
- * inspector/ConsoleMessage.cpp:
- (WebCore::ConsoleMessage::ConsoleMessage):
- * inspector/InspectorController.cpp:
- * inspector/InspectorDatabaseResource.cpp:
- (WebCore::InspectorDatabaseResource::bind):
- * inspector/InspectorFrontend.cpp:
-
-2009-12-02 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- WebSocket handshake check query component of URL
- https://bugs.webkit.org/show_bug.cgi?id=31617
-
- Tests: websocket/tests/url-with-credential.html
- websocket/tests/url-with-empty-query.html
- websocket/tests/url-with-fragment.html
- websocket/tests/url-with-query-for-no-query.html
- websocket/tests/url-with-query.html
-
- * platform/KURLGoogle.cpp:
- (WebCore::KURL::query): returns a null if query is not specified and returns an empty if query is specified but empty.
- * websockets/WebSocketHandshake.cpp:
- (WebCore::resourceName): added. add query component to path if specified.
- (WebCore::WebSocketHandshake::clientLocation):
- (WebCore::WebSocketHandshake::clientHandshakeMessage):
-
-2009-12-01 David Levin <levin@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Incorrect code in WebGLRenderingContext.cpp
- https://bugs.webkit.org/show_bug.cgi?id=32046
-
- Fix incorrect code that happened to work. != has higher precendence than &.
- The simplest fix is to remove the "!= 0" which violates WebKit style
- guidelines anyway.
-
- Also added periods to few comments in the same function.
-
- * html/canvas/WebGLRenderingContext.cpp:
- (WebCore::WebGLRenderingContext::validateIndexArray):
-
-2009-12-01 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Darin Adler.
-
- Change [Reflect] to [ConvertNullToNullString, Reflect] for min, max,
- pattern and step attributes of HTMLInputElement.
- https://bugs.webkit.org/show_bug.cgi?id=31708
-
- * html/HTMLInputElement.idl:
-
-2009-12-01 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- WAI-ARIA: implement support for ARIA drag and drop
- https://bugs.webkit.org/show_bug.cgi?id=32007
-
- Test: platform/mac/accessibility/aria-drag-drop.html
-
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::supportsARIADropping):
- (WebCore::AccessibilityObject::supportsARIADragging):
- (WebCore::AccessibilityObject::isARIAGrabbed):
- (WebCore::AccessibilityObject::setARIAGrabbed):
- (WebCore::AccessibilityObject::determineARIADropEffects):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::supportsARIADropping):
- (WebCore::AccessibilityRenderObject::supportsARIADragging):
- (WebCore::AccessibilityRenderObject::isARIAGrabbed):
- (WebCore::AccessibilityRenderObject::setARIAGrabbed):
- (WebCore::AccessibilityRenderObject::determineARIADropEffects):
- * accessibility/AccessibilityRenderObject.h:
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
- (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
- (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
- (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
- * html/HTMLAttributeNames.in:
-
-2009-12-01 Adam Barth <abarth@webkit.org>
-
- https://bugs.webkit.org/show_bug.cgi?id=21288
-
- Unreviewed port of @sandbox to V8.
-
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::isEnabled):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::createWindow):
-
-2009-12-01 Patrik Persson <patrik.j.persson@ericsson.com>
-
- Reviewed by Darin Adler.
-
- Implement HTML5 sandbox attribute for iframes.
- http://www.w3.org/TR/html5/text-level-semantics.html#attr-iframe-sandbox
- https://bugs.webkit.org/show_bug.cgi?id=21288
-
- Tests: fast/frames/sandboxed-iframe-attribute-parsing.html
- fast/frames/sandboxed-iframe-forms.html
- fast/frames/sandboxed-iframe-navigation-allowed.html
- fast/frames/sandboxed-iframe-navigation-parent.html
- fast/frames/sandboxed-iframe-navigation-targetlink.html
- fast/frames/sandboxed-iframe-navigation-windowopen.html
- fast/frames/sandboxed-iframe-plugins.html
- fast/frames/sandboxed-iframe-scripting.html
- fast/frames/sandboxed-iframe-storage.html
- http/tests/security/sandboxed-iframe-document-cookie.html
- http/tests/security/sandboxed-iframe-modify-self.html
- http/tests/security/xss-DENIED-sandboxed-iframe.html
- http/tests/xmlhttprequest/access-control-sandboxed-iframe-allow.html
- http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-without-wildcard.html
- http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied.html
-
- * bindings/js/JSDOMWindowCustom.cpp: sandboxing navigation
- (WebCore::createWindow):
- * bindings/js/ScriptController.cpp: sandboxing scripts
- (WebCore::ScriptController::isEnabled):
- * dom/Document.cpp:
- (WebCore::Document::processHttpEquiv):
- (WebCore::Document::cookie): raise exception when accessed from sandbox
- (WebCore::Document::setCookie): raise exception when accessed from sandbox
- (WebCore::Document::initSecurityContext): updae sandbox status
- (WebCore::Document::updateSandboxFlags):
- * dom/Document.h:
- * dom/Document.idl:
- * html/HTMLAppletElement.cpp: sandboxing applets
- (WebCore::HTMLAppletElement::createRenderer):
- (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
- (WebCore::HTMLAppletElement::canEmbedJava):
- * html/HTMLAppletElement.h:
- * html/HTMLAttributeNames.in:
- * html/HTMLFrameOwnerElement.cpp: management of sandbox flags as stated in attribute
- (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
- (WebCore::HTMLFrameOwnerElement::setSandboxFlags):
- * html/HTMLFrameOwnerElement.h:
- (WebCore::HTMLFrameOwnerElement::sandboxFlags):
- * html/HTMLIFrameElement.cpp: sandbox attribute parsing
- (WebCore::parseSandboxAttribute):
- (WebCore::HTMLIFrameElement::parseMappedAttribute):
- * html/HTMLIFrameElement.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::getCookies):
- * loader/CrossOriginAccessControl.cpp:
- (WebCore::passesAccessControlCheck):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::FrameLoader):
- (WebCore::FrameLoader::init):
- (WebCore::FrameLoader::submitForm): sandboxing forms
- (WebCore::FrameLoader::requestObject): sandboxing plugins
- (WebCore::FrameLoader::shouldAllowNavigation): sandboxing navigation
- (WebCore::FrameLoader::updateSandboxFlags): propagation of sandbox flags
- * loader/FrameLoader.h:
- (WebCore::FrameLoader::ownerElementSandboxFlagsChanged):
- (WebCore::FrameLoader::isSandboxed):
- (WebCore::FrameLoader::sandboxFlags):
- * loader/FrameLoaderTypes.h:
- (WebCore::):
- * page/DOMWindow.cpp: disable storage and databases in sandboxed frames
- (WebCore::DOMWindow::sessionStorage):
- (WebCore::DOMWindow::localStorage):
- (WebCore::DOMWindow::openDatabase):
- * page/SecurityOrigin.cpp: added sandboxing status
- (WebCore::SecurityOrigin::SecurityOrigin):
- (WebCore::SecurityOrigin::canAccess):
- (WebCore::SecurityOrigin::canRequest):
- (WebCore::SecurityOrigin::toString):
- * page/SecurityOrigin.h:
- (WebCore::SecurityOrigin::setSandboxFlags):
- (WebCore::SecurityOrigin::isSandboxed):
- (WebCore::SecurityOrigin::canAccessDatabase):
- (WebCore::SecurityOrigin::canAccessStorage):
- * websockets/WebSocketChannel.cpp:
- (WebCore::WebSocketChannel::didReceiveData):
-
-2009-12-01 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by David Kilzer.
-
- ARIA: support a way to create a static text object
- https://bugs.webkit.org/show_bug.cgi?id=32030
-
- Test: accessibility/aria-text-role.html
-
- * accessibility/AccessibilityObject.cpp:
- (WebCore::createARIARoleMap):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::stringValue):
- (WebCore::AccessibilityRenderObject::isDescendantOfBarrenParent):
- (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
- (WebCore::AccessibilityRenderObject::text):
- * accessibility/AccessibilityRenderObject.h:
-
-2009-12-01 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Maciej Stachowiak.
-
- Inspector crashes when collecting on every allocation
- https://bugs.webkit.org/show_bug.cgi?id=32044
-
- The crash is caused by the prototype wrapper object getting collected
- when allocating the object that is going to use it as a prototype.
- Because the only reference to the prototype wrapper is through the
- new object's Structure it does not get marked automatically.
-
- * bindings/js/JSInspectedObjectWrapper.cpp:
- (WebCore::JSInspectedObjectWrapper::wrap):
- * bindings/js/JSInspectorCallbackWrapper.cpp:
- (WebCore::JSInspectorCallbackWrapper::wrap):
-
-2009-12-01 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Reviewed by Simon Fraser.
-
- Add SVG animation test framework with 'snapshot' functionality
- https://bugs.webkit.org/show_bug.cgi?id=31897
-
- Add 'sampleSVGAnimationForElementAtTime' method to the LayoutTestController,
- for the use within the new SVG animation test framework (LayoutTests/svg/animations/)
-
- layoutTestController.sampleAnimationAtTime(<svg animation id>, <absolute time>, <svg element id>);
- to sample a svg animateMotion/animateColor/animate/set element at certain times.
-
- After the desired SVG animation starts and calling the method above, it's immediately forwarded to
- the desired sampling time. After JS returns from the 'sampleSVGAnimationForElementAtTime' method
- a callback is fired used to sample the animation value at the target time. It's modelled similar
- to the CSS animation/transition testing framework, inspired by
- LayoutTests/animations/animation-test-helpers.js.
-
- Though it has been extended to integrate within the fast/js/js-test-* framework, that's used for
- the SVG dynamic-updates tests, to simplify test creation, by utilizing script-tests/* only.
-
- Adding a simple testcase testing the DRT methods, it will soon be extended to test animVal/baseVal
- interaction, while animating.
-
- Test: svg/animations/animVal-basics.html
-
- * WebCore.base.exp:
- * WebCore.xcodeproj/project.pbxproj:
- * svg/SVGDocumentExtensions.cpp:
- (WebCore::SVGDocumentExtensions::sampleAnimationAtTime):
- * svg/SVGDocumentExtensions.h:
- * svg/animation/SMILTimeContainer.cpp:
- (WebCore::SMILTimeContainer::SMILTimeContainer):
- (WebCore::SMILTimeContainer::sampleAnimationAtTime):
- (WebCore::SMILTimeContainer::updateAnimations):
- * svg/animation/SMILTimeContainer.h:
-
-2009-12-01 Jens Alfke <snej@chromium.org>
-
- Reviewed by Darin Adler.
-
- Add convenience methods to Element and QualifiedName that take
- char* instead of AtomicString, in preparation for removing the
- implicit conversion between the two types (30187).
- https://bugs.webkit.org/show_bug.cgi?id=31749
-
- * dom/Element.cpp:
- (WebCore::Element::setCStringAttribute): Equivalent to setAttribute.
- * dom/Element.h:
- * dom/QualifiedName.cpp:
- (WebCore::QualifiedName::init): Shared impl of both constructors
- (WebCore::QualifiedName::QualifiedName): New c'tor taking char*.
- * dom/QualifiedName.h:
- * platform/network/HTTPHeaderMap.cpp:
- (WebCore::CaseFoldingCStringTranslator): Enables lookup by C string
- (WebCore::HTTPHeaderMap::get): New variant that takes C string
- (WebCore::HTTPHeaderMap::contains): New variant that takes C string
- (WebCore::HTTPHeaderMap::add): New variant that takes C string
- * platform/network/HTTPHeaderMap.h:
- (WebCore::HTTPHeaderMap::get):
- (WebCore::HTTPHeaderMap::add):
- * platform/network/ResourceRequestBase.cpp:
- (WebCore::ResourceRequestBase::httpHeaderField): New variant that takes C string
- * platform/network/ResourceRequestBase.h:
- (WebCore::ResourceRequestBase::setHTTPHeaderField): Use symbolic names for headers
- * platform/network/ResourceResponseBase.cpp:
- (WebCore::ResourceResponseBase::httpHeaderField): New variant that takes C string
- * platform/network/ResourceResponseBase.h:
-
-2009-12-01 Alexey Proskuryakov <ap@apple.com>
-
- More Windows build fix.
-
- * platform/network/cf/CredentialStorageCFNet.cpp:
- (WebCore::CredentialStorage::getFromPersistentStorage):
-
-2009-12-01 Alexey Proskuryakov <ap@apple.com>
-
- Windows build fix.
-
- * platform/network/cf/CredentialStorageCFNet.cpp: Include RetainPtr.h.
-
-2009-12-01 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=32036
- Implement CredentialStorage::getFromPersistentStorage for CFNetwork
-
- * platform/network/cf/CredentialStorageCFNet.cpp:
- (WebCore::CredentialStorage::getFromPersistentStorage):
-
-2009-12-01 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Pavel Feldman.
-
- https://bugs.webkit.org/show_bug.cgi?id=32001
-
- Added missing localized strings (that I left out of the patch for bug #21554):
- %d × %d pixels
- %d × %d pixels (Natural: %d × %d pixels)
-
- Also, changed formatting of these stings to conform with existing ones (added
- a space on both sides of the multiply sign).
-
- * English.lproj/localizedStrings.js: Added stings.
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeElement.prototype.createTooltipForImageNode):
-
-2009-12-01 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Simon Fraser.
-
- Fix for bug 32032, empty namespaces should be allowed in @namespace directives in CSS.
-
- Added fast/css/namespaces/namespaces-empty.xml
-
- * css/CSSStyleSheet.cpp:
- (WebCore::CSSStyleSheet::addNamespace):
- (WebCore::CSSStyleSheet::determineNamespace):
-
-2009-12-01 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Escape key in the Search Field should be more User Friendly
- https://bugs.webkit.org/show_bug.cgi?id=32005
-
- * inspector/front-end/inspector.js:
- (WebInspector.loaded): add mousedown listener on the search field
- (WebInspector.searchFieldManualFocus): user clicked to focus on the search field
- (WebInspector.searchKeyDown): handle escape
-
-2009-12-01 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by David Kilzer.
-
- @namespace directives need to use "maybe_space" in the "maybe_ns_prefix" portion of the grammar to match
- the spec. Not doing so prevent comments from being used immmediately after the namespace prefix.
-
- Added fast/css/namespaces-comments.xml
-
- * css/CSSGrammar.y:
-
-2009-12-01 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Timothy Hatcher.
-
- Reloading WebInspector from context menu is closing it instead of reloading.
- https://bugs.webkit.org/show_bug.cgi?id=32004
-
- When reloading WebInspector, don't delete its m_page.
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::close):
-
-2009-12-01 Steve Block <steveblock@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- Adds V8 bindings for Geolocation.
- https://bugs.webkit.org/show_bug.cgi?id=30206
-
- Also adds Geolocation files to Chrome build files.
-
- * WebCore.gyp/WebCore.gyp: Modified. Corrects list of Geolocation IDL files.
- * WebCore.gypi: Modified. Adds Geolocation files.
- * bindings/v8/DOMObjectsInclude.h: Modified. Adds Geolocation includes.
- * bindings/v8/DerivedSourcesAllInOne.cpp: Modified. Adds Geolocation files.
- * bindings/v8/V8Index.cpp: Modified. Includes Geolocation generated headers.
- * bindings/v8/V8Index.h: Modified. Adds Geolocation types to DOM_OBJECT_TYPES.
- * bindings/v8/custom/V8CoordinatesCustom.cpp: Added. Handles optional properties.
- * bindings/v8/custom/V8CustomBinding.h: Modified. Declares callbacks and getters.
- * bindings/v8/custom/V8CustomPositionCallback.cpp: Added.
- (WebCore::V8CustomPositionCallback::V8CustomPositionCallback): Added. Constructor.
- (WebCore::V8CustomPositionCallback::~V8CustomPositionCallback): Added. Destructor.
- (WebCore::V8CustomPositionCallback::handleEvent): Added. Invokes callback.
- * bindings/v8/custom/V8CustomPositionCallback.h: Added.
- (WebCore::V8CustomPositionCallback::create): Added. Factory method.
- * bindings/v8/custom/V8CustomPositionErrorCallback.cpp: Added.
- (WebCore::V8CustomPositionErrorCallback::V8CustomPositionErrorCallback): Added. Constructor.
- (WebCore::V8CustomPositionErrorCallback::~V8CustomPositionErrorCallback): Added. Destructor.
- (WebCore::V8CustomPositionErrorCallback::handleEvent): Added. Invokes callback.
- * bindings/v8/custom/V8CustomPositionErrorCallback.h: Added.
- (WebCore::V8CustomPositionErrorCallback::create): Added. Factory method.
- * bindings/v8/custom/V8GeolocationCustom.cpp: Added.
- (WebCore::throwTypeMismatchException): Added. Throws a type mismatch error.
- (WebCore::createPositionCallback): Added. Handles type checking for successCallback argument.
- (WebCore::createPositionErrorCallback): Added. Handles type checking for errorCallback argument.
- (WebCore::createPositionOptions): Added. Handles type checking for positionOptions argument.
-
-2009-12-01 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Adam Barth.
-
- Provide a way to get ScriptState for the inspected page.
-
- https://bugs.webkit.org/show_bug.cgi?id=32020
-
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::mainWorldScriptState):
- * bindings/v8/ScriptController.h:
- * bindings/v8/ScriptState.cpp:
- (WebCore::scriptStateFromPage):
-
-2009-12-01 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Adam Roben.
-
- Changed mallocs to fastMallocs and frees to fastFrees in GraphicsContext3D. Also added error returns
- https://bugs.webkit.org/show_bug.cgi?id=30778
-
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::getProgramInfoLog):
- (WebCore::GraphicsContext3D::getShaderInfoLog):
- (WebCore::GraphicsContext3D::getShaderSource):
- (WebCore::imageToTexture):
-
-2009-12-01 Mads Ager <ager@chromium.org>
-
- Reviewed by Eric Seidel.
-
- [V8] Don't crash in DOMWindow event getter in OOM situations
- https://bugs.webkit.org/show_bug.cgi?id=32017
-
- Add missing null handle checks in DOMWindow event property
- accessors. V8Proxy::context(frame) can return a null handle in
- OOM situations either if failing to initialize a context or if an
- OOM is handled gracefully and javascript is disabled.
-
- No new tests because we don't have a good way to test
- out-of-memory bugs.
-
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
-
-2009-12-01 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Updated HTMLCanvasElement to accept "experimental-webgl" as the context name.
- https://bugs.webkit.org/show_bug.cgi?id=31672
-
- * html/HTMLCanvasElement.cpp:
- (WebCore::HTMLCanvasElement::getContext):
-
-2009-12-01 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
-
- Not reviewed: chromium build fix, added missing import.
-
- * inspector/InspectorFrontendHost.cpp:
-
-2009-12-01 Pavel Feldman <pfeldman@chromium.org>
-
- Not reviewed: fix windows build via unexcluding generated files from
- project.
-
- * WebCore.vcproj/WebCore.vcproj:
-
-2009-12-01 Mark Rowe <mrowe@apple.com>
-
- Stop copying IDL files in to the WebCore framework wrapper.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-12-01 Mark Rowe <mrowe@apple.com>
-
- Fix the Tiger build by making the Xcode project compatible with Xcode 2.4.
-
- This was probably broken by hand-editing the project file as Xcode itself
- knows how to keep project files to a backwards-compatible subset of its format.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-12-01 Pavel Feldman <pfeldman@chromium.org>
-
- Not reviewed: windows build fix (bad vcproj in r51528).
-
- * WebCore.vcproj/WebCore.vcproj:
-
-2009-11-27 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
+ * plugins/gtk/PluginViewGtk.cpp:
+ (WebCore::PluginView::paint):
- Reviewed by Timothy Hatcher.
+2010-01-31 Kent Tamura <tkent@chromium.org>
- Web Inspector: Split InspectorBackend into three parts: backend,
- injected script host and frontend host.
-
- https://bugs.webkit.org/show_bug.cgi?id=31888
+ Unreviewed. Revert r54112 and r54124 because of Windows build error.
- * DerivedSources.make:
+ * Android.mk:
* GNUmakefile.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * bindings/js/JSBindingsAllInOne.cpp:
- * bindings/js/JSInspectorBackendCustom.cpp: Removed.
- * bindings/js/JSInspectorFrontendHostCustom.cpp: Added.
- (WebCore::JSInspectorFrontendHost::search):
- (WebCore::JSInspectorFrontendHost::setting):
- (WebCore::JSInspectorFrontendHost::setSetting):
- * bindings/js/ScriptObject.cpp:
- (WebCore::ScriptGlobalObject::set):
- * bindings/js/ScriptObject.h:
- * bindings/v8/DOMObjectsInclude.h:
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/ScriptObject.cpp:
- (WebCore::ScriptGlobalObject::set):
- * bindings/v8/ScriptObject.h:
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: Added.
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8InspectorBackendCustom.cpp: Removed.
- * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: Added.
- (WebCore::CALLBACK_FUNC_DECL):
- * inspector/InjectedScriptHost.cpp: Added.
- (WebCore::InjectedScriptHost::InjectedScriptHost):
- (WebCore::InjectedScriptHost::~InjectedScriptHost):
- (WebCore::InjectedScriptHost::copyText):
- (WebCore::InjectedScriptHost::nodeForId):
- (WebCore::InjectedScriptHost::wrapObject):
- (WebCore::InjectedScriptHost::unwrapObject):
- (WebCore::InjectedScriptHost::pushNodePathToFrontend):
- (WebCore::InjectedScriptHost::addNodesToSearchResult):
- (WebCore::InjectedScriptHost::currentCallFrame):
- (WebCore::InjectedScriptHost::databaseForId):
- (WebCore::InjectedScriptHost::selectDatabase):
- (WebCore::InjectedScriptHost::selectDOMStorage):
- (WebCore::InjectedScriptHost::reportDidDispatchOnInjectedScript):
- (WebCore::InjectedScriptHost::inspectorDOMAgent):
- (WebCore::InjectedScriptHost::inspectorFrontend):
- * inspector/InjectedScriptHost.h: Added.
- (WebCore::InjectedScriptHost::create):
- (WebCore::InjectedScriptHost::inspectorController):
- (WebCore::InjectedScriptHost::disconnectController):
- * inspector/InjectedScriptHost.idl: Added.
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::InspectorBackend):
- (WebCore::InspectorBackend::storeLastActivePanel):
- (WebCore::InspectorBackend::toggleNodeSearch):
- (WebCore::InspectorBackend::resourceTrackingEnabled):
- (WebCore::InspectorBackend::debuggerEnabled):
- (WebCore::InspectorBackend::enableDebugger):
- (WebCore::InspectorBackend::disableDebugger):
- (WebCore::InspectorBackend::addBreakpoint):
- (WebCore::InspectorBackend::updateBreakpoint):
- (WebCore::InspectorBackend::removeBreakpoint):
- (WebCore::InspectorBackend::pauseInDebugger):
- (WebCore::InspectorBackend::resumeDebugger):
- (WebCore::InspectorBackend::stepOverStatementInDebugger):
- (WebCore::InspectorBackend::stepIntoStatementInDebugger):
- (WebCore::InspectorBackend::stepOutOfFunctionInDebugger):
- (WebCore::InspectorBackend::pauseOnExceptions):
- (WebCore::InspectorBackend::setPauseOnExceptions):
- (WebCore::InspectorBackend::profilerEnabled):
- (WebCore::InspectorBackend::enableProfiler):
- (WebCore::InspectorBackend::disableProfiler):
- (WebCore::InspectorBackend::startProfiling):
- (WebCore::InspectorBackend::stopProfiling):
- (WebCore::InspectorBackend::getProfileHeaders):
- (WebCore::InspectorBackend::getProfile):
- (WebCore::InspectorBackend::currentCallFrame):
- (WebCore::InspectorBackend::highlightDOMNode):
- (WebCore::InspectorBackend::hideDOMNodeHighlight):
- (WebCore::InspectorBackend::getCookies):
- (WebCore::InspectorBackend::deleteCookie):
- (WebCore::InspectorBackend::didEvaluateForTestInFrontend):
- (WebCore::InspectorBackend::nodeForId):
- * inspector/InspectorBackend.h:
- (WebCore::InspectorBackend::create):
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::InspectorController):
- (WebCore::InspectorController::~InspectorController):
- (WebCore::InspectorController::inspectedPageDestroyed):
- (WebCore::InspectorController::windowScriptObjectAvailable):
- * inspector/InspectorController.h:
- (WebCore::InspectorController::inspectorFrontendHost):
- (WebCore::InspectorController::injectedScriptHost):
- * inspector/InspectorFrontendHost.cpp: Added.
- (WebCore::InspectorFrontendHost::InspectorFrontendHost):
- (WebCore::InspectorFrontendHost::~InspectorFrontendHost):
- (WebCore::InspectorFrontendHost::loaded):
- (WebCore::InspectorFrontendHost::attach):
- (WebCore::InspectorFrontendHost::detach):
- (WebCore::InspectorFrontendHost::closeWindow):
- (WebCore::InspectorFrontendHost::windowUnloading):
- (WebCore::InspectorFrontendHost::setAttachedWindowHeight):
- (WebCore::InspectorFrontendHost::moveWindowBy):
- (WebCore::InspectorFrontendHost::localizedStringsURL):
- (WebCore::InspectorFrontendHost::hiddenPanels):
- (WebCore::InspectorFrontendHost::platform):
- (WebCore::InspectorFrontendHost::port):
- (WebCore::InspectorFrontendHost::addResourceSourceToFrame):
- (WebCore::InspectorFrontendHost::addSourceToFrame):
- * inspector/InspectorFrontendHost.h: Added.
- (WebCore::InspectorFrontendHost::create):
- (WebCore::InspectorFrontendHost::inspectorController):
- (WebCore::InspectorFrontendHost::disconnectController):
- * inspector/InspectorFrontendHost.idl: Added.
- * inspector/front-end/Breakpoint.js:
- (WebInspector.Breakpoint.prototype.set condition):
- * inspector/front-end/BreakpointsSidebarPane.js:
- (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint):
- (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint):
- (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged):
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype.clearMessages):
- * inspector/front-end/CookieItemsView.js:
- (WebInspector.CookieItemsView.prototype._deleteCookieCallback):
- * inspector/front-end/DOMAgent.js:
- (WebInspector.DOMAgent.prototype.getChildNodesAsync):
- (WebInspector.DOMAgent.prototype.setAttributeAsync):
- (WebInspector.DOMAgent.prototype.removeAttributeAsync):
- (WebInspector.DOMAgent.prototype.setTextNodeValueAsync):
- (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):
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
- (WebInspector.ElementsPanel.prototype.hide):
- (WebInspector.ElementsPanel.prototype.reset):
- (WebInspector.ElementsPanel.prototype.handleCopyEvent):
- (WebInspector.ElementsPanel.prototype._nodeSearchButtonClicked):
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeOutline.prototype.set focusedDOMNode.restoreHighlightToHoveredNode):
- (WebInspector.ElementsTreeOutline.prototype.set focusedDOMNode):
- ():
- * inspector/front-end/EventListenersSidebarPane.js:
- (WebInspector.EventListenersSidebarPane.prototype):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript._evaluateAndWrap):
- (InjectedScript.performSearch.addNodesToResults):
- (InjectedScript.getCallFrames):
- (InjectedScript._callFrameForId):
- (InjectedScript._clearConsoleMessages):
- (InjectedScript._inspectObject):
- (InjectedScript._copy):
- (InjectedScript._ensureCommandLineAPIInstalled):
- (InjectedScript._window):
- (InjectedScript._nodeForId):
- (InjectedScript._objectForId):
- (InjectedScript.pushNodeToFrontend):
- (InjectedScript.executeSql):
- (InjectedScript.executeSql.errorCallback):
- (InjectedScript.executeSql.queryTransaction):
- * inspector/front-end/InjectedScriptAccess.js:
- (InjectedScriptAccess._installHandler.InjectedScriptAccess.methodName):
- (InjectedScriptAccess._installHandler):
- * inspector/front-end/InspectorBackendStub.js: Added.
- (.WebInspector.InspectorBackendStub):
- (.WebInspector.InspectorBackendStub.prototype.wrapCallback):
- (.WebInspector.InspectorBackendStub.prototype.platform):
- (.WebInspector.InspectorBackendStub.prototype.port):
- (.WebInspector.InspectorBackendStub.prototype.closeWindow):
- (.WebInspector.InspectorBackendStub.prototype.attach):
- (.WebInspector.InspectorBackendStub.prototype.detach):
- (.WebInspector.InspectorBackendStub.prototype.storeLastActivePanel):
- (.WebInspector.InspectorBackendStub.prototype.clearMessages):
- (.WebInspector.InspectorBackendStub.prototype.searchingForNode):
- (.WebInspector.InspectorBackendStub.prototype.search):
- (.WebInspector.InspectorBackendStub.prototype.toggleNodeSearch):
- (.WebInspector.InspectorBackendStub.prototype.setAttachedWindowHeight):
- (.WebInspector.InspectorBackendStub.prototype.moveByUnrestricted):
- (.WebInspector.InspectorBackendStub.prototype.addResourceSourceToFrame):
- (.WebInspector.InspectorBackendStub.prototype.addSourceToFrame):
- (.WebInspector.InspectorBackendStub.prototype.getResourceDocumentNode):
- (.WebInspector.InspectorBackendStub.prototype.highlightDOMNode):
- (.WebInspector.InspectorBackendStub.prototype.hideDOMNodeHighlight):
- (.WebInspector.InspectorBackendStub.prototype.inspectedWindow):
- (.WebInspector.InspectorBackendStub.prototype.loaded):
- (.WebInspector.InspectorBackendStub.prototype.localizedStringsURL):
- (.WebInspector.InspectorBackendStub.prototype.windowUnloading):
- (.WebInspector.InspectorBackendStub.prototype.hiddenPanels):
- (.WebInspector.InspectorBackendStub.prototype.debuggerEnabled):
- (.WebInspector.InspectorBackendStub.prototype.enableResourceTracking):
- (.WebInspector.InspectorBackendStub.prototype.disableResourceTracking):
- (.WebInspector.InspectorBackendStub.prototype.resourceTrackingEnabled):
- (.WebInspector.InspectorBackendStub.prototype.enableDebugger):
- (.WebInspector.InspectorBackendStub.prototype.disableDebugger):
- (.WebInspector.InspectorBackendStub.prototype.addBreakpoint):
- (.WebInspector.InspectorBackendStub.prototype.removeBreakpoint):
- (.WebInspector.InspectorBackendStub.prototype.updateBreakpoint):
- (.WebInspector.InspectorBackendStub.prototype.pauseInDebugger):
- (.WebInspector.InspectorBackendStub.prototype.pauseOnExceptions):
- (.WebInspector.InspectorBackendStub.prototype.setPauseOnExceptions):
- (.WebInspector.InspectorBackendStub.prototype.resumeDebugger):
- (.WebInspector.InspectorBackendStub.prototype.profilerEnabled):
- (.WebInspector.InspectorBackendStub.prototype.enableProfiler):
- (.WebInspector.InspectorBackendStub.prototype.disableProfiler):
- (.WebInspector.InspectorBackendStub.prototype.startProfiling):
- (.WebInspector.InspectorBackendStub.prototype.stopProfiling):
- (.WebInspector.InspectorBackendStub.prototype.getProfileHeaders):
- (.WebInspector.InspectorBackendStub.prototype.getProfile):
- (.WebInspector.InspectorBackendStub.prototype.takeHeapSnapshot):
- (.WebInspector.InspectorBackendStub.prototype.databaseTableNames):
- (.WebInspector.InspectorBackendStub.prototype.stepIntoStatementInDebugger):
- (.WebInspector.InspectorBackendStub.prototype.stepOutOfFunctionInDebugger):
- (.WebInspector.InspectorBackendStub.prototype.stepOverStatementInDebugger):
- (.WebInspector.InspectorBackendStub.prototype.setSetting):
- (.WebInspector.InspectorBackendStub.prototype.dispatchOnInjectedScript):
- (.WebInspector.InspectorBackendStub.prototype.releaseWrapperObjectGroup):
- (.WebInspector.InspectorBackendStub.prototype.setting):
- * inspector/front-end/InspectorControllerStub.js:
- * inspector/front-end/InspectorFrontendHostStub.js: Added.
- (.WebInspector.InspectorFrontendHostStub):
- (.WebInspector.InspectorFrontendHostStub.prototype.platform):
- (.WebInspector.InspectorFrontendHostStub.prototype.port):
- (.WebInspector.InspectorFrontendHostStub.prototype.closeWindow):
- (.WebInspector.InspectorFrontendHostStub.prototype.attach):
- (.WebInspector.InspectorFrontendHostStub.prototype.detach):
- (.WebInspector.InspectorFrontendHostStub.prototype.search):
- (.WebInspector.InspectorFrontendHostStub.prototype.setAttachedWindowHeight):
- (.WebInspector.InspectorFrontendHostStub.prototype.moveWindowBy):
- (.WebInspector.InspectorFrontendHostStub.prototype.addResourceSourceToFrame):
- (.WebInspector.InspectorFrontendHostStub.prototype.addSourceToFrame):
- (.WebInspector.InspectorFrontendHostStub.prototype.loaded):
- (.WebInspector.InspectorFrontendHostStub.prototype.localizedStringsURL):
- (.WebInspector.InspectorFrontendHostStub.prototype.hiddenPanels):
- (.WebInspector.InspectorFrontendHostStub.prototype.setSetting):
- (.WebInspector.InspectorFrontendHostStub.prototype.setting):
- * inspector/front-end/ProfileView.js:
- (WebInspector.CPUProfileView):
- (WebInspector.CPUProfileType.prototype.buttonClicked):
- * inspector/front-end/ProfilesPanel.js:
- (WebInspector.ProfilesPanel.prototype._updateInterface):
- (WebInspector.ProfilesPanel.prototype._enableProfiling):
- (WebInspector.ProfilesPanel.prototype._toggleProfiling):
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel.prototype.reset):
- (WebInspector.ResourcesPanel.prototype._toggleLargerResources):
- (WebInspector.ResourcesPanel.prototype._enableResourceTracking):
- (WebInspector.ResourcesPanel.prototype._toggleResourceTracking):
- * inspector/front-end/ScriptView.js:
- (WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded):
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel.prototype.show):
- (WebInspector.ScriptsPanel.prototype.addScript):
- (WebInspector.ScriptsPanel.prototype.attachDebuggerWhenShown):
- (WebInspector.ScriptsPanel.prototype.reset):
- (WebInspector.ScriptsPanel.prototype.canShowResource):
- (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
- (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu):
- (WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsButton):
- (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons):
- (WebInspector.ScriptsPanel.prototype._enableDebugging):
- (WebInspector.ScriptsPanel.prototype._toggleDebugging):
- (WebInspector.ScriptsPanel.prototype._togglePauseOnExceptions):
- (WebInspector.ScriptsPanel.prototype._togglePause):
- (WebInspector.ScriptsPanel.prototype._stepOverClicked):
- (WebInspector.ScriptsPanel.prototype._stepIntoClicked):
- (WebInspector.ScriptsPanel.prototype._stepOutClicked):
- * inspector/front-end/SourceView.js:
- (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded):
- (WebInspector.SourceView.prototype.performSearch.findSearchMatches):
- (WebInspector.SourceView.prototype.performSearch):
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylesSidebarPane.prototype._changeColorFormat):
- * inspector/front-end/TestController.js:
- (WebInspector.TestController.prototype.notifyDone):
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
- * inspector/front-end/WatchExpressionsSidebarPane.js:
- (WebInspector.WatchExpressionsSection.prototype.update):
- (WebInspector.WatchExpressionsSection.prototype.loadSavedExpressions):
- (WebInspector.WatchExpressionsSection.prototype.saveExpressions):
- * inspector/front-end/WebKit.qrc:
- * inspector/front-end/inspector.html:
- * inspector/front-end/inspector.js:
- (WebInspector.pendingDispatches.0.get platform):
- (WebInspector.get port):
- (WebInspector.set currentPanel):
- (WebInspector._createPanels):
- (WebInspector._loadPreferences):
- (WebInspector.set attached):
- (WebInspector._updateHoverHighlight):
- (WebInspector.loaded):
- (windowLoaded):
- (WebInspector.windowUnload):
- (WebInspector.close):
- (WebInspector.toolbarDrag):
- (WebInspector.UIString):
-
-2009-11-30 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Dan Bernstein.
-
- css2.1/t1205-c566-list-stl-00-e-ag.html is failing
- https://bugs.webkit.org/show_bug.cgi?id=23264
- css2.1/t1205-c565-list-pos-00-b.html is failing
- https://bugs.webkit.org/show_bug.cgi?id=23263
-
- Ignore whitespaces after list markers.
- Rendering of this was already done for the case where inside=false.
- This fixes the rendering of inside=true case and calcInlinePrefWidths.
-
- Test: fast/lists/calc-width-with-space.html
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::calcInlinePrefWidths):
- * rendering/RenderBlockLineLayout.cpp:
- (WebCore::RenderBlock::findNextLineBreak):
-
-2009-11-30 Fumitoshi Ukai <ukai@chromium.org>
-
- Unreviewed Chromium build fix introduced by r51212
-
- Fix scriptStateFromNode and ScriptStateFromPage to take DOMWrapperWorld
- as the first argument.
- Move mainThreadNormalWorld() to ScriptState.{h,cpp}.
- Add debuggerWorld() and pluginWorld() in ScriptState.h.
-
- * bindings/v8/ScriptController.cpp:
- * bindings/v8/ScriptController.h:
- * bindings/v8/ScriptState.cpp:
- (WebCore::scriptStateFromNode):
- (WebCore::scriptStateFromPage):
- (WebCore::mainThreadNormalWorld):
- * bindings/v8/ScriptState.h:
- (WebCore::debuggerWorld):
- (WebCore::pluginWorld):
-
-2009-11-30 Enrica Casucci <enrica@apple.com>
-
- Reviewed by Darin Adler.
-
- Can focus but not type into content editable block that contains only non-editable content.
- <rdar://problem/5982901>
- https://bugs.webkit.org/show_bug.cgi?id=31750
-
- The goal is to change the way we choose a visible position
- after hit detection, by preferring a visually equivalent editable
- position if available. By doing this, it is possible to add content
- to an editable block that initially contains only non editable elements.
-
- Test: editing/selection/mixed-editability-10.html
-
- * WebCore.base.exp: Changed to match the new signature of downstream
- and upstream in the Position class.
- * dom/Position.cpp:
- (WebCore::Position::atEditingBoundary): Added.
- (WebCore::Position::upstream): Modified to allow to cross the boundary
- between editable and non editable content if required.
- (WebCore::Position::downstream): Modified to allow to cross the boundary
- between editable and non editable content if required.
- (WebCore::Position::isCandidate): Modified to qualify as candidates positions
- that are at the editability boundary.
- (WebCore::Position::getInlineBoxAndOffset): Modified to retrieve the inline box
- to be used in calculating the caret rectangle.
- * dom/Position.h:
- (WebCore::Position::):
- * dom/PositionIterator.cpp:
- (WebCore::PositionIterator::atEditingBoundary): Added.
- (WebCore::PositionIterator::isCandidate): Modified to qualify as candidates positions
- that are at the editability boundary.
- * dom/PositionIterator.h:
- * editing/htmlediting.cpp:
- (WebCore::firstEditablePositionAfterPositionInRoot): Modified to accept not only
- descendants of the editable container, but the container itself.
- (WebCore::lastEditablePositionBeforePositionInRoot): Modified to accept not only
- descendants of the editable container, but the container itself.
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::createVisiblePosition): Added logic to prefer an editable position,
- if available.
- * rendering/RenderText.cpp:
- (WebCore::RenderText::isAllCollapsibleWhitespace): Added.
- * rendering/RenderText.h:
-
-2009-11-30 Kevin Ollivier <kevino@theolliviers.com>
-
- wx build fix, add header needed for wx build.
-
- * css/CSSFontFaceSrcValue.cpp:
-
-2009-11-30 Mark Rowe <mrowe@apple.com>
-
- Reviewed by David Kilzer.
-
- <rdar://problem/7424387> WebCore binary missing symbols when built for x86_64 from a machine that cannot run x86_64 binaries
-
- The check for whether WTF_USE_PLUGIN_HOST_PROCESS is defined occurs under the native architecture of the build machine.
- If that is 32-bit then WTF_USE_PLUGIN_HOST_PROCESS will not be defined. We work around this by forcing the check to
- be performed against the x86_64 architecture.
-
- * DerivedSources.make:
-
-2009-11-30 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=32000 Crash in
- Safari caused by extreme column-gap and column-width values
- -and corresponding-
- <rdar://problem/7425433>
-
- Prevent desiredColumnCount from being less than 1 since it is used
- as a divisor.
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::calcColumnWidth):
-
-2009-11-30 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Oliver Hunt.
-
- https://bugs.webkit.org/show_bug.cgi?id=31659
- Connection must be closed in case of Web Socket handshake error
-
- The network connection was closed, but the close event wasn't dispatched.
-
- Tested by websocket/tests/handshake-error.html, which is un-skipped now.
-
- * platform/network/cf/SocketStreamHandleCFNet.cpp: (WebCore::SocketStreamHandle::platformClose):
- Call client didHandle() method. This looks strange in CFNetwork implementation, because
- it's the client that asked to close the stream, so it shouldn't need the callback. It makes
- more sense in cross-process implementation, because closing is async there.
-
-2009-11-30 Gavin Barraclough <barraclough@apple.com>
-
- Reviewed by Geoff Garen.
-
- Bug 31859 - Make world selection for JSC IsolatedWorlds automagical.
-
- WebCore presently has to explicitly specify the world before entering into JSC,
- which is a little fragile (particularly since property access via a
- getter/setter might invoke execution). Instead derive the current world from
- the lexical global object.
-
- Remove the last uses of mainThreadCurrentWorld(), so the world is always obtained via
- currentWorld(). Switch this to obtain the world from the ExecsState's lexical global
- object instead. Remove the call/construct/evaluate 'InWorld' methods, since these
- are no longer necessary.
-
- * WebCore.base.exp:
- * bindings/js/JSCallbackData.cpp:
- (WebCore::JSCallbackData::invokeCallback):
- * bindings/js/JSCallbackData.h:
- (WebCore::JSCallbackData::JSCallbackData):
- * bindings/js/JSCustomXPathNSResolver.cpp:
- (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::currentWorld):
- (WebCore::mainThreadNormalWorld):
- * bindings/js/JSDOMBinding.h:
- (WebCore::WebCoreJSClientData::WebCoreJSClientData):
- * bindings/js/JSDOMWindowBase.cpp:
- (WebCore::JSDOMWindowBase::updateDocument):
- * bindings/js/JSDOMWindowBase.h:
- * bindings/js/JSEventListener.cpp:
- (WebCore::JSEventListener::handleEvent):
- (WebCore::JSEventListener::reportError):
- * bindings/js/JSHTMLDocumentCustom.cpp:
- (WebCore::JSHTMLDocument::open):
- * bindings/js/JSNodeFilterCondition.cpp:
- (WebCore::JSNodeFilterCondition::acceptNode):
- * bindings/js/JSQuarantinedObjectWrapper.cpp:
- (WebCore::JSQuarantinedObjectWrapper::construct):
- (WebCore::JSQuarantinedObjectWrapper::call):
- * bindings/js/ScheduledAction.cpp:
- (WebCore::ScheduledAction::executeFunctionInContext):
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::evaluateInWorld):
- (WebCore::ScriptController::initScript):
- (WebCore::ScriptController::updateDocument):
- * bindings/js/ScriptFunctionCall.cpp:
- (WebCore::ScriptFunctionCall::call):
- (WebCore::ScriptFunctionCall::construct):
- * bindings/js/ScriptObjectQuarantine.cpp:
- (WebCore::getQuarantinedScriptObject):
- * bindings/js/ScriptState.cpp:
- (WebCore::scriptStateFromNode):
- (WebCore::scriptStateFromPage):
- * bindings/js/ScriptState.h:
- * bindings/js/WorkerScriptController.cpp:
- (WebCore::WorkerScriptController::evaluate):
- * bindings/objc/WebScriptObject.mm:
- (-[WebScriptObject callWebScriptMethod:withArguments:]):
- (-[WebScriptObject evaluateWebScript:]):
- * bridge/NP_jsobject.cpp:
- (_NPN_InvokeDefault):
- (_NPN_Invoke):
- (_NPN_Evaluate):
- (_NPN_Construct):
- * bridge/jni/jni_jsobject.mm:
- (JavaJSObject::call):
- (JavaJSObject::eval):
- * dom/NodeFilter.h:
- (WebCore::NodeFilter::acceptNode):
- * dom/NodeIterator.h:
- (WebCore::NodeIterator::nextNode):
- (WebCore::NodeIterator::previousNode):
- * dom/TreeWalker.h:
- (WebCore::TreeWalker::parentNode):
- (WebCore::TreeWalker::firstChild):
- (WebCore::TreeWalker::lastChild):
- (WebCore::TreeWalker::previousSibling):
- (WebCore::TreeWalker::nextSibling):
- (WebCore::TreeWalker::previousNode):
- (WebCore::TreeWalker::nextNode):
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::windowScriptObjectAvailable):
- (WebCore::InspectorController::didEvaluateForTestInFrontend):
- * inspector/JavaScriptCallFrame.cpp:
- (WebCore::JavaScriptCallFrame::evaluate):
-
-2009-11-30 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- All HTML5 media element events should be regular events
- https://bugs.webkit.org/show_bug.cgi?id=30513
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::selectMediaResource):
- (WebCore::HTMLMediaElement::noneSupported):
- (WebCore::HTMLMediaElement::mediaEngineError):
- (WebCore::HTMLMediaElement::setNetworkState):
- (WebCore::HTMLMediaElement::userCancelledLoad):
- Call scheduleEvent instead of scheduleProgressEvent.
- (WebCore::HTMLMediaElement::progressEventTimerFired):
- Call scheduleEvent instead of scheduleProgressEvent. Call renderer->updateFromElement
- after scheduling a 'progress' event so the controller will update download
- progress indicator.
- * html/HTMLMediaElement.h:
- Remove scheduleProgressEvent prototype.
-
-2009-11-30 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Pavel Feldman.
-
- Web Inspector: Wrong console output for Regexp escape sequence
- https://bugs.webkit.org/show_bug.cgi?id=31538
-
- Updated inspector/console-format.html
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.createDividerElement): style issues.
- (WebInspector.ConsoleView.createFilterElement): style issues.
- (WebInspector.ConsoleView): added _customFormatters table.
- (WebInspector.ConsoleView.prototype.updateMessageRepeatCount): style isses.
- (WebInspector.ConsoleView.prototype._incrementErrorWarningCount): style issues.
- (WebInspector.ConsoleView.prototype._format): simplified delegation to formatter logic.
- (WebInspector.ConsoleView.prototype._formatobject):
- (WebInspector.ConsoleView.prototype._formatnode):
- (WebInspector.ConsoleView.prototype._printArray):
- (WebInspector.ConsoleMessage.prototype._format): commented and broke down the algorithm into parts.
- (WebInspector.ConsoleMessage.prototype._formatWithSubstitutionString.append): handle substitution string formatting.
- (WebInspector.ConsoleMessage.prototype._formatIndividualValue): handling individual value formatting.
- (WebInspector.ConsoleCommandResult):
- * inspector/front-end/InjectedScript.js: simplified regex formatting.
- * inspector/front-end/inspector.js:
- (WebInspector.linkifyStringAsFragment): converted new RegExp to literal for performance benefits.
- * inspector/front-end/utilities.js:
- (Element.prototype.hasStyleClass): update inaccurate comment.
- (String.prototype.trimURL): converted new RegExp to literal for performance benefits.
-
-2009-11-30 Erik Arvidsson <arv@chromium.org>
-
- Reviewed by Adam Barth.
-
- Clean up V8 bindings for CSSStyleDeclaration and CSSVariableDeclaration
- https://bugs.webkit.org/show_bug.cgi?id=31895
-
- No new tests. This is already covered by:
- fast/dom/CSSStyleDeclaration/css-computed-style-item.html
- fast/dom/CSSStyleDeclaration/css-style-item.html
-
- * bindings/v8/V8Collection.h:
- (WebCore::collectionStringIndexedPropertyGetter):
- (WebCore::setCollectionStringIndexedGetter):
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getTemplate):
-
-2009-11-30 Steve Block <steveblock@google.com>
-
- Reviewed by Eric Seidel.
-
- Adds include of wtf/StdLibExtras.h for DEFINE_STATIC_LOCAL in V8 ScriptController.
- https://bugs.webkit.org/show_bug.cgi?id=31932
-
- Build fix only, no new tests.
-
- * bindings/v8/ScriptController.cpp: Modified. Adds include of wtf/StdLibExtras.h.
-
-2009-11-30 Steve Block <steveblock@google.com>
-
- Reviewed by Eric Seidel.
-
- Adds PassOwnPtr include to ScriptExecutionContext.h.
- https://bugs.webkit.org/show_bug.cgi?id=31929
-
- Build fix only, no new tests.
-
- * dom/ScriptExecutionContext.h: Modified. Adds PassOwnPtr include.
-
-2009-11-30 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Nikolas Zimmermann.
-
- REGRESSION (r49757): masking-mask-01-b.svg rendered incorrectly
- [https://bugs.webkit.org/show_bug.cgi?id=31980]
-
- It turns out, that we did not handle maskUnits="userSpaceOnUse"
- correctly. We just need to move the context of the maskImage
- if maskContentUnits="objectBoundingBox". The context gets scaled
- on this unit combination, so we have to substract the position of
- the targetRect. On userSpaceOnUse the position just depends on the
- position of the mask element.
- I added a test with some senseless and reasonable values for size
- and postion of the mask and it's contents. I also used every
- combination of maskUnits and maskContentUnits to be sure, that it
- is fixed this time.
-
- Test: svg/custom/mask-with-all-units.svg
-
- * svg/SVGMaskElement.cpp:
- (WebCore::SVGMaskElement::drawMaskerContent):
-
-2009-11-30 Steve Block <steveblock@google.com>
-
- Reviewed by Eric Seidel.
-
- Adds ENABLE(INSPECTOR) guards around DOMWindow::inspectorTimelineAgent.
- https://bugs.webkit.org/show_bug.cgi?id=31928
-
- Build fix only, no new tests.
-
- * page/DOMWindow.cpp: Modified. Adds ENABLE(INSPECTOR) guards around DOMWindow::inspectorTimelineAgent.
-
-2009-11-30 Steve Block <steveblock@google.com>
-
- Reviewed by Eric Seidel.
-
- Adds SHARED_WORKERS guards to V8 WorkerContextExecutionProxy.
- https://bugs.webkit.org/show_bug.cgi?id=31926
-
- Build fix only, no new tests.
-
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
- (WebCore::WorkerContextExecutionProxy::convertToV8Object):
- (WebCore::WorkerContextExecutionProxy::convertEventTargetToV8Object):
-
-2009-11-30 Benjamin Poulain <benjamin.poulain@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Chrome::contentsSizeChanged() is called when the content size has not changed
- https://bugs.webkit.org/show_bug.cgi?id=31978
-
- Do not trigger contentsSizeChaned() is the new size is the same as the old one.
-
- * page/FrameView.cpp:
- (WebCore::FrameView::setContentsSize):
-
-2009-11-30 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- [Qt] Fix some compiler warnings seen on QtWebKit/Mac
- https://bugs.webkit.org/show_bug.cgi?id=31962
-
- No new tests as there is no functional change.
-
- * platform/network/ResourceHandle.h: Make destructor virtual as
- after r50772 ResourceHandle has virtual functions.
-
- * plugins/mac/PluginPackageMac.cpp:
- (WebCore::PluginPackage::fetchInfo): Fix typo WTF is a namespace
- not a label
-
- * plugins/mac/PluginViewMac.cpp:
- (WebCore::PluginView::setNPWindowIfNeeded): Add l to the format
- specifier
-
-2009-11-30 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- Add new headers to sources list.
-
- * GNUmakefile.am:
-
-2009-11-30 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Holger Freyther.
-
- [Qt] Mac Plugins : Get context menu to work in QGraphicsView
-
- Flash expects the value in record.where to be the global position for
- displaying the context menu.
-
- https://bugs.webkit.org/show_bug.cgi?id=31979
-
- * plugins/mac/PluginViewMac.cpp:
- (WebCore::PluginView::handleMouseEvent):
-
-2009-11-30 Steve Block <steveblock@google.com>
-
- Reviewed by Eric Seidel.
-
- Adds PLATFORM(CHROMIUM) guards around memory usage code in V8GCController.
- https://bugs.webkit.org/show_bug.cgi?id=31925
-
- This code uses ChromiumBridge and Chromium-specific constant values not
- appropriate for other platforms such as Android.
-
- Build fix only, no new tests.
-
- * bindings/v8/V8GCController.cpp: Modified. Adds PLATFORM(CHROMIUM) around Chromium-specific code.
-
-2009-11-29 Brent Fulgham <bfulgham@webkit.org>
-
- Build fix.
-
- Correct draw signature used in ImageCairoWin.cpp.
-
- * platform/graphics/win/ImageCairoWin.cpp:
- (WebCore::BitmapImage::getHBITMAPOfSize):
- (WebCore::BitmapImage::drawFrameMatchingSourceSize):
-
-2009-11-28 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Sam Weinig.
-
- postMessage should serialize File objects
- https://bugs.webkit.org/show_bug.cgi?id=31955
-
- Update SerializedScriptValue to include support for
- File objects in the serialized object graph.
-
- * bindings/js/SerializedScriptValue.cpp:
- (WebCore::SerializedScriptValueData::SerializedScriptValueData):
- (WebCore::SerializingTreeWalker::convertIfTerminal):
- (WebCore::DeserializingTreeWalker::convertIfTerminal):
- * bindings/js/SerializedScriptValue.h:
- (WebCore::SerializedScriptValueData::):
- (WebCore::SerializedScriptValueData::asString):
-
-2009-11-29 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Optimize the hierarchy rebuilding of compositing layers
- https://bugs.webkit.org/show_bug.cgi?id=31879
-
- When updating the compositing layer hierarchy, instead of removing all
- child layers and then re-adding them one by one, build a vector of child
- layers, and set them in one go.
-
- * platform/graphics/GraphicsLayer.h:
- * platform/graphics/GraphicsLayer.cpp:
- (WebCore::GraphicsLayer::setChildren): New method that takes a Vector of child
- GraphicsLayers.
-
- * platform/graphics/mac/GraphicsLayerCA.h: Override setChildren().
- * platform/graphics/win/GraphicsLayerCACF.h: Ditto.
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayerCA::setChildren): Implement setChildren() to
- set the bit that notes that sublayers changed.
- * platform/graphics/win/GraphicsLayerCACF.cpp:
- (WebCore::GraphicsLayerCACF::setChildren): Implement setChildren() to
- udpate sublayers, with a note that this is not efficient.
-
- * rendering/RenderLayerCompositor.h:
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::updateCompositingLayers):
- When updating compositing layers, use the faster updateLayerTreeGeometry() if
- we know that no layer hierarchy changes are needed, and, at the root, use
- the vector returned from rebuildCompositingLayerTree() to attach the root
- layer.
- (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Changed to
- collect child layers into Vectors of GraphicsLayers, which can be set as
- layer children in one go.
- (WebCore::RenderLayerCompositor::updateLayerTreeGeometry): Split out from
- rebuildCompositingLayerTree() for simplicity, and called when we just need to
- update layer geometry, without doing any reparenting.
-
-2009-11-29 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=31971
-
- Updated comment to reflect latest XSSAuditor bindings.
-
- No functionality was changed. So, no new tests.
-
- * page/XSSAuditor.h:
-
-2009-11-29 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=31969
-
- Removes unnecessary #include files.
-
- No functionality was changed. So, no new tests.
-
- * css/CSSComputedStyleDeclaration.cpp: Removed include CachedImage.h, and
- Pair.h
- * css/CSSCursorImageValue.cpp: Removed include RenderStyle.h
- * css/CSSFontFaceSrcValue.cpp: Removed include Node.h
- * css/CSSFontSelector.cpp: Removed include NodeList.h
- * css/CSSGradientValue.cpp: Removed include GraphicsContext.h, ImageBuffer.h
- * css/CSSImageValue.cpp: Removed include RenderStyle.h
- * css/CSSImportRule.cpp: Removed include MediaList.h
- * css/CSSMutableStyleDeclaration.cpp: Removed include CSSProperty.h
- * css/CSSRule.cpp: Removed include CSSStyleSheet.h
- * css/CSSStyleSelector.cpp: Removed include CSSFontFace.h,
- CSSFontFaceSource.h, and CSSProperty.h
- * page/EventSource.h: Removed include EventListener.h
-
-2009-11-29 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=31965
-
- Removed #include KeyframeList.h from CSSStyleSelector.h. Instead,
- forward declared it.
-
- As a side effect, we need to #include KeyframeList.h in
- RenderLayerBacking.cpp.
-
- No functionality was changed. So, no new tests.
-
- * css/CSSStyleSelector.cpp:
- * css/CSSStyleSelector.h: Removed #include KeyframeList.h
- * rendering/RenderLayerBacking.cpp: Added #include KeyframeList.h
-
-2009-11-29 Shu Chang <Chang.Shu@nokia.com>
-
- Reviewed by Eric Seidel.
-
- Continue to search for matching node in the case where multiple nodes
- have the same id.
- https://bugs.webkit.org/show_bug.cgi?id=31428
-
- Test: fast/dom/Element/id-in-node-list-index01.html
-
- * dom/DynamicNodeList.cpp:
- (WebCore::DynamicNodeList::itemWithName):
-
-2009-11-29 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=31966
-
- Removed #include RenderStyle.h from file KeyframeAnimation.h. Instead,
- forward declared it.
-
- No functionality was changed. So, no new tests.
-
- * page/animation/KeyframeAnimation.cpp:
- * page/animation/KeyframeAnimation.h:
-
-2009-11-29 Daniel Bates <dbates@webkit.org>
-
- Unreviewed, fix change log entry date.
-
- For some reason, bugzilla-tool did not update the date in the change
- log entry for my last commit (r51468). So, this commit fixes the date
- of that entry.
-
-2009-11-29 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=31964
-
- Removed #include StringImpl, StyleImage. Instead, forward declared them.
- Also, we can substitute #include <wtf/PassRefPtr.h> for #include PlatformString.h,
- since it seems we only really used it to include PassRefPtr.h.
-
- No functionality was changed. So, no new tests.
-
- * rendering/style/ContentData.h:
-
-2009-11-29 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Allow custom memory allocation control for classes of the rendering and storage directory in WebCore
- https://bugs.webkit.org/show_bug.cgi?id=31906
-
- Inherits the following classes from Noncopyable because these are instantiated
- by 'new' and no need to be copyable:
-
- class/struct name - instantiated at: WebCore/'location'
-
- class SQLTransactionClient - storage/DatabaseThread.cpp:45
- class SQLTransactionCoordinator - storage/DatabaseThread.cpp:46
- class OriginUsageRecord - storage/OriginQuotaManager.cpp:66
- class DatabaseTracker - storage/DatabaseTracker.cpp:62
- class ScrollbarTheme - (its child class) rendering/RenderScrollbarTheme.cpp:35
- class RenderSelectionInfoBase - (its child class) rendering/RenderView.cpp:310
- class RenderOverflow - rendering/RenderBox.cpp:2846
-
- Inherits the following classes from FastAllocBase because these are instantiated by 'new':
-
- struct FillLayer - css/CSSStyleSelector.cpp:197
- struct ShadowData - rendering/style/ShadowData.cpp:35
- class CounterContent - css/CSSStyleSelector.cpp:4111
-
- * platform/ScrollbarTheme.h:
- * rendering/RenderOverflow.h:
- * rendering/RenderSelectionInfo.h:
- * rendering/style/CounterContent.h:
- * rendering/style/FillLayer.h:
- * rendering/style/ShadowData.h:
- * storage/DatabaseTracker.h:
- * storage/OriginUsageRecord.h:
- * storage/SQLTransactionClient.h:
- * storage/SQLTransactionCoordinator.h:
-
-2009-11-28 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- [Chromium] Sify compose button alerts error
- https://bugs.webkit.org/show_bug.cgi?id=31394
-
- Test: http/tests/security/calling-versus-current.html
-
- We're supposed to use the calling context for security checks. In JSC
- land, this is the lexicalGlobalObject.
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::canAccessPrivate):
-
-2009-11-27 Shinichiro Hamaji <hamaji@chromium.org>
-
- Unreviewed Chromium build fix introduced by r51428.
-
- [Chromium] Ignore line-height CSS property for PushButton
- https://bugs.webkit.org/show_bug.cgi?id=31712
-
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::adjustButtonStyle):
-
-2009-11-27 Shinichiro Hamaji <hamaji@chromium.org>
-
- Unreviewed Chromium test fix by reverting r51413.
-
- [v8] Do not check the thread when accessing DOMDataStore
- https://bugs.webkit.org/show_bug.cgi?id=31877
-
- * bindings/v8/V8DOMMap.cpp:
- (WebCore::getDOMNodeMap):
- (WebCore::getDOMObjectMap):
- (WebCore::getActiveDOMObjectMap):
- (WebCore::getDOMSVGElementInstanceMap):
- (WebCore::getDOMSVGObjectWithContextMap):
-
-2009-11-27 Daniel Bates <dbates@webkit.org>
-
- Unreviewed, comment fix.
-
- Corrected misspelling of the word "implemented".
-
- * inspector/front-end/InjectedScriptAccess.js:
-
-2009-11-27 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=31940
-
- Makes the error messages more descriptive when we refuse to load an object/embed or
- refuse to load from the document base URL.
-
- * page/XSSAuditor.cpp:
- (WebCore::XSSAuditor::canLoadObject): Changed console message to be more descriptive.
- (WebCore::XSSAuditor::canSetBaseElementURL): Ditto.
-
-2009-11-27 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- This is a WebCore part of the fix that allows to view plugin
- resources loaded by plugins.
-
- https://bugs.webkit.org/show_bug.cgi?id=31832
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::willSendRequest):
- (WebCore::InspectorController::didReceiveResponse):
- (WebCore::InspectorController::didReceiveContentLength):
- (WebCore::InspectorController::didFinishLoading):
- (WebCore::InspectorController::didFailLoading):
- * inspector/InspectorController.h:
- * inspector/InspectorResource.cpp:
- (WebCore::InspectorResource::addLength):
- * loader/ResourceLoadNotifier.cpp:
- (WebCore::ResourceLoadNotifier::didFailToLoad):
- (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
- (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
- (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
- (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
-
-2009-11-27 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Instead of generating negative identifiers for cached resources in
- InspectorController and extending identifier type from 'unsigned long' to 'long
- long' reuse progress tracker from the inspected page to generate those
- identifiers. It guarantees that InspectorResources have unique ids since
- all of them are generated by that progress tracker.
-
- Added a couple new overloaded methods to Script* objects that accept
- long and unsigned long arguments. These types of argumens have already
- been passed as long long.
-
- https://bugs.webkit.org/show_bug.cgi?id=31921
-
- * bindings/js/ScriptFunctionCall.cpp:
- (WebCore::ScriptFunctionCall::appendArgument):
- * bindings/js/ScriptFunctionCall.h:
- * bindings/js/ScriptObject.cpp:
- (WebCore::ScriptObject::set):
- * bindings/js/ScriptObject.h:
- * bindings/v8/ScriptFunctionCall.cpp:
- (WebCore::ScriptFunctionCall::appendArgument):
- * bindings/v8/ScriptFunctionCall.h:
- * bindings/v8/ScriptObject.cpp:
- (WebCore::ScriptObject::set):
- * bindings/v8/ScriptObject.h:
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::dispatchOnInjectedScript):
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::InspectorController):
- (WebCore::InspectorController::getTrackedResource):
- (WebCore::InspectorController::didLoadResourceFromMemoryCache): Use inspected page's ProgressTracker to generate unique identifiers for cached resources in InspectorController.
- * inspector/InspectorController.h:
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::buildObjectForNode):
- (WebCore::InspectorDOMAgent::buildObjectForEventListener):
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::addResource):
- (WebCore::InspectorFrontend::updateResource):
- (WebCore::InspectorFrontend::removeResource):
- (WebCore::InspectorFrontend::updateFocusedNode):
- * inspector/InspectorFrontend.h:
- * inspector/InspectorResource.cpp:
- (WebCore::InspectorResource::InspectorResource):
- (WebCore::InspectorResource::createCached):
- * inspector/InspectorResource.h: Change InspectorResource identifier type from 'long long' to 'unsigned long'.
- (WebCore::InspectorResource::create):
- (WebCore::InspectorResource::identifier):
- * inspector/TimelineRecordFactory.cpp:
- (WebCore::TimelineRecordFactory::createResourceSendRequestRecord):
- (WebCore::TimelineRecordFactory::createResourceReceiveResponseRecord):
- (WebCore::TimelineRecordFactory::createResourceFinishRecord):
-
-2009-11-26 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Dan Bernstein.
-
- Assertion failure in RenderBlock::positionForPointWithInlineChildren when running fast/inline/relative-positioned-overflow.html
- https://bugs.webkit.org/show_bug.cgi?id=29966
-
- When an empty inline element is clicked, the root inline box has
- no leaf children. Use the renderer of a normal child instead.
-
- This change resolves Windows port's assertion failure in a layout test.
- Also, this fixes the behavior when a user drags the mouse from an
- empty inline element to above texts.
-
- Test: editing/selection/last-empty-inline.html
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::positionForPointWithInlineChildren):
-
-2009-11-26 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Eric Seidel.
-
- [Chromium] Ignore line-height CSS property specified to push buttons on
- Windows and Linux.
- https://bugs.webkit.org/show_bug.cgi?id=31712
-
- LayoutTests/fast/forms/control-restrict-line-height.html checks that the
- following controls should ignore line-height CSS property.
- - <select>
- - <input type=button>
- - <input type=search>
- This change addresses the <input type=button> issue with Chromium/Windows
- and Chromium/Linux.
-
- * rendering/RenderThemeChromiumSkia.cpp: Implement adjustButtonStyle() to ignore line-height.
- * rendering/RenderThemeChromiumSkia.h: Declare adjustButtonStyle().
-
-2009-11-26 Kinuko Yasuda <kinuko@chromium.com>
-
- Reviewed by Eric Seidel.
-
- Remove the special charset meta tag in the clipboard so that
- copy-and-paste with interchange breaklines/spaces works correctly
- within WebKit.
-
- No new tests. Layout tests that involve copy-and-paste with
- interchange breaklines (like editing/pasteboard/paste-line-endings-00?)
- should pass on Mac/Chromium with this fix.
-
- * platform/chromium/ClipboardChromium.cpp:
- * platform/chromium/PasteboardChromium.cpp:
- (WebCore::Pasteboard::documentFragment):
-
-2009-11-26 İsmail Dönmez <ismail@namtrac.org>
-
- Reviewed by Eric Seidel.
-
- Compile with QT_NO_WHEELEVENT defined.
-
- * platform/qt/WheelEventQt.cpp:
- (WebCore::PlatformWheelEvent::applyDelta):
-
-2009-11-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Oliver Hunt.
-
- Move GOwnPtr* from wtf to wtf/gtk
- https://bugs.webkit.org/show_bug.cgi?id=31793
-
- No new tests as there is no functional change.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: Change the
- path for GOwnPtr.h.
- * platform/text/TextEncoding.cpp: Ditto.
- * platform/text/gtk/TextCodecGtk.cpp: Ditto.
-
-2009-11-26 Yury Semikhatsky <yurys@chromium.org>
-
- Not reviewed. Build fix: revert r51421.
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::willSendRequest):
- (WebCore::InspectorController::didReceiveResponse):
- (WebCore::InspectorController::didReceiveContentLength):
- (WebCore::InspectorController::didFinishLoading):
- (WebCore::InspectorController::didFailLoading):
- * inspector/InspectorController.h:
- * inspector/InspectorResource.cpp:
- (WebCore::InspectorResource::addLength):
- * loader/ResourceLoadNotifier.cpp:
- (WebCore::ResourceLoadNotifier::didFailToLoad):
- (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
- (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
- (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
- (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
-
-2009-11-26 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- This is a WebCore part of the fix that allows to view plugin
- resources loaded by plugins.
-
- https://bugs.webkit.org/show_bug.cgi?id=31832
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::willSendRequest):
- (WebCore::InspectorController::didReceiveResponse):
- (WebCore::InspectorController::didReceiveContentLength):
- (WebCore::InspectorController::didFinishLoading):
- (WebCore::InspectorController::didFailLoading):
- * inspector/InspectorController.h: Remove unused DocumentLoader parameters from inspector methods.
- * inspector/InspectorResource.cpp:
- (WebCore::InspectorResource::addLength): Update loading end time when new data are received.
- * loader/ResourceLoadNotifier.cpp:
- (WebCore::ResourceLoadNotifier::didFailToLoad): Notify InspectorController about the failure.
- (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
- (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
- (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
- (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
-
-2009-11-26 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Pavel Feldman.
-
- https://bugs.webkit.org/show_bug.cgi?id=21554
-
- Implements support for hovering over <img> src to display the height and width of that image
- in a tooltip. Displays both the displayable and natural dimensions of the image.
-
- Test: inspector/elements-img-tooltip.html
-
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeElement.prototype.createTooltipForImageNode): Added.
- (WebInspector.ElementsTreeElement.prototype._updateTitle.callback):
- (WebInspector.ElementsTreeElement.prototype._updateTitle):
- (WebInspector.ElementsTreeElement.prototype._nodeTitleInfo):
- * inspector/front-end/ObjectProxy.js:
- (WebInspector.ObjectProxy.getPropertiesAsync): Added.
- * inspector/front-end/inspector.js:
- (WebInspector.linkifyURLAsNode): Added tooltipText argument.
- (WebInspector.linkifyURL): Ditto.
-
-2009-11-26 Kevin Ollivier <kevino@theolliviers.com>
-
- wx build fix after drawPattern API change.
-
- * platform/graphics/wx/ImageWx.cpp:
- (WebCore::Image::drawPattern):
-
-2009-11-26 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Adam Barth.
-
- Use an internal field instead of hidden property to speedup lookup
- of entered isolated world.
-
- Plus some inlinings.
- https://bugs.webkit.org/show_bug.cgi?id=31884
-
- Covered by layout tests + manual running of some benchmarks as
- content scripts.
-
- * bindings/v8/V8DOMWrapper.cpp:
- * bindings/v8/V8DOMWrapper.h:
- (WebCore::V8DOMWrapper::setDOMWrapper):
- * bindings/v8/V8HiddenPropertyName.h:
- * bindings/v8/V8IsolatedWorld.cpp:
- (WebCore::V8IsolatedWorld::V8IsolatedWorld):
- * bindings/v8/V8IsolatedWorld.h:
- (WebCore::V8IsolatedWorld::getEntered):
- (WebCore::V8IsolatedWorld::getGlobalObject):
- * bindings/v8/custom/V8CustomBinding.h:
-
-2009-11-26 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- [Qt] Corrects build break on Windows.
-
- Rename platform/text/qt/TextBoundaries.cpp to TextBoundariesQt.cpp since
- platform/text/TextBoundaries.cpp was compiled instead when compiling with nmake.
-
- * WebCore.pro:
- * platform/text/qt/TextBoundariesQt.cpp: Renamed from WebCore/platform/text/qt/TextBoundaries.cpp.
- (WebCore::findNextWordFromIndex):
- (WebCore::findWordBoundary):
-
-2009-11-26 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Adam Barth.
-
- Do not check if the thread is main or not when accessing DOMDataStore as currently in Chromium WebKit is used in main thread only.
- https://bugs.webkit.org/show_bug.cgi?id=31877
-
- Covered by layout tests and buildbots.
-
- * bindings/v8/V8DOMMap.cpp:
- (WebCore::getDOMNodeMap):
- (WebCore::getDOMObjectMap):
- (WebCore::getActiveDOMObjectMap):
- (WebCore::getDOMSVGElementInstanceMap):
- (WebCore::getDOMSVGObjectWithContextMap):
-
-2009-11-26 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Holger Freyther.
-
- [Qt] Mac Plugins : Pass mouse position relative to the fake window
-
- When using off-screen rendering, we need to pass mouse events relative
- to the fake window instead of the global position.
-
- https://bugs.webkit.org/show_bug.cgi?id=31794
-
- * plugins/mac/PluginViewMac.cpp:
- (WebCore::PluginView::platformStart):
- (WebCore::PluginView::handleMouseEvent):
-
-2009-11-24 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by Eric Seidel.
-
- [Qt] Use QNetworkReply::rawHeaderPairs
- https://bugs.webkit.org/show_bug.cgi?id=31826
-
- The QNetworkReply is internally storing the HTTP headers
- as a list of pairs. Currently we have to ask the QNetworkReply
- to put all header names into a QStringList. Afterwards we will
- iterate over this QStringList and ask the QNetworkReply to
- give us the value for this header name. The current Qt implementation
- is doing a linear to find the header value.
-
- Use a new API to directly access the list of pairs and push
- this into WebCore. This avoids doing some allocations and doing
- linear searches from within a loop.
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
-
-2009-11-21 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- [Qt] Add Qt specific information of RenderPart
- https://bugs.webkit.org/show_bug.cgi?id=31203
-
- The WebCore::Widget of the RenderPart (RenderWidget) might be
- backed with a platform widget. Print both the WebCore::Widget
- and platform widget state. In the above bug we had a problem
- that the WebCore::Widget was invisible but the QWidget was
- visible.
-
- * rendering/RenderTreeAsText.cpp:
- (WebCore::operator<<): Add special case for RenderPart
-
-2009-11-17 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- [Qt] Call Widget::setSelfVisible from hide/show
- https://bugs.webkit.org/show_bug.cgi?id=31203
-
- Call Widget::setSelfVisible from Widget::show and
- Widget::hide and use isParentVisible to decide
- if the widget should be shown. This way client
- code can rely on isVisible.
-
- Change PluginViewQt::show, PluginViewQt::hide to
- call the base class as it is doing the right thing
- now. Add an assert verify that platfomWidget and
- platformPluginWidget are the same.
-
- * manual-tests/qt/qtplugin.html: Modify manual test
- * platform/qt/WidgetQt.cpp:
- (WebCore::Widget::show):
- (WebCore::Widget::hide):
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::show):
- (WebCore::PluginView::hide):
-
-2009-11-24 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by Alexey Proskuryakov.
-
- Fix compilation of REQUEST_DEBUG debug code
- https://bugs.webkit.org/show_bug.cgi?id=31850
-
- In r47907 the single parameter KURL constructor to parse
- from a WebCore::String was replaced with a two parameter
- constructor. I think in this debug case parsing the urls
- again is no problem and I have changed the code to use the
- two parameter version.
-
- * loader/loader.cpp:
- (WebCore::Loader::Host::didFinishLoading):
-
-2009-11-26 Søren Gjesse <sgjesse@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- [V8] Avoid using JavaScript objects as context data
- https://bugs.webkit.org/show_bug.cgi?id=31873
-
- Change the context "data" from a JavaScript object holding the two properties type and value to
- a string holding type and value separated by a comma.
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::setInjectedScriptContextDebugId):
- (WebCore::V8Proxy::setContextDebugId):
- (WebCore::V8Proxy::contextDebugId):
-
-2009-11-25 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by David Levin.
-
- [Chromium] Implement canSetValueAttribute in the API, the clean-up part.
- https://bugs.webkit.org/show_bug.cgi?id=31894
-
- * accessibility/chromium/AccessibilityObjectWrapper.h: Added RefCounted decl.
- (WebCore::AccessibilityObjectWrapper::AccessibilityObjectWrapper): Removed mis-refcountingness.
-
-2009-11-25 Kenneth Russell <kbr@google.com>
-
- Reviewed by Oliver Hunt.
-
- Off-by-one error in index validation for drawElements and drawArrays
- https://bugs.webkit.org/show_bug.cgi?id=31891
-
- Fixed computation of number of elements for bound array objects.
-
- Test: fast/canvas/webgl/index-validation.html
-
- * html/canvas/WebGLRenderingContext.cpp:
- (WebCore::WebGLRenderingContext::vertexAttribPointer):
-
-2009-11-25 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by David Levin.
-
- Update SharedScript to use eventNames() instead of EventNames()
- https://bugs.webkit.org/show_bug.cgi?id=31890
-
- * SharedScript/WebKitSharedScript.cpp:
- (WebCore::LoadEventTask::performTask):
-
-2009-11-25 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/7409331> Windows: Support closed caption in <video> element
-
- Enable closed captions in QuickTime/Windows media engine.
-
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
- (WebCore::MediaPlayerPrivate::hasClosedCaptions):
- (WebCore::MediaPlayerPrivate::setClosedCaptionsVisible):
- New, all through to m_qtMovie.
-
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
- Make all but the destructor private since MediaPlayer call through the media
- engine interface.
-
- * platform/graphics/win/QTMovieWin.cpp:
- (QTMovieWin::disableUnsupportedTracks):
- Use handy new constants for QuickTime track types.
- (QTMovieWin::hasClosedCaptions):
- (QTMovieWin::setClosedCaptionsVisible):
- New, closed caption support.
- * platform/graphics/win/QTMovieWin.h:
-
- * rendering/RenderMediaControls.cpp:
- (WebCore::RenderMediaControls::paintMediaControlsPart):
- Deal with closed caption buttons.
-
- * rendering/RenderThemeWin.cpp:
- (WebCore::RenderThemeWin::shouldRenderMediaControlPart):
- New, don't ask the media engine if it has closed captions unless the Safari theme will
- be able to render the button.
- (WebCore::RenderThemeWin::paintMediaToggleClosedCaptionsButton):
- New.
- * rendering/RenderThemeWin.h:
-
-2009-11-25 Drew Wilson <atwilson@chromium.org>
-
- Reviewed by David Levin.
-
- MessagePorts always look remotely entangled even when closed.
- https://bugs.webkit.org/show_bug.cgi?id=31698
-
- Tests: Existing tests suffice, Chromium soak test passes now.
-
- * bindings/v8/custom/V8CustomBinding.h:
- Removed kMessagePortEntangledPortIndex which is no longer used.
- * bindings/v8/V8GCController.cpp:
- (WebCore::GCPrologueVisitor::visitDOMWrapper):
- Simplified GC code to reflect the Chromium MessagePort implementation
- (locallyEntangledPort() always returns false).
- (WebCore::GCEpilogueVisitor::visitDOMWrapper):
- Cleaned up epilogue code to handle the case where the port gets closed
- in mid-GC (due to the parent context being freed).
- * dom/MessagePort.cpp:
- (WebCore::MessagePort::MessagePort):
- (WebCore::MessagePort::close):
- Now sets the closed flag.
- (WebCore::MessagePort::disentanglePorts):
- Updated to use new isCloned() API instead of relying on isEntangled(), which was incorrect.
- * dom/MessagePort.h:
- Added a m_closed flag and updated isEntangled() to check it.
- (WebCore::MessagePort::isEntangled):
- Now returns false if the port has been closed.
- (WebCore::MessagePort::isCloned):
- Added new API to differentiate between cloned and closed ports (closed ports can still be passed to postMessage).
-
-2009-11-25 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Fix crash of QtWebKit on any page with Flash when compiled with MinGW.
-
- Fix inline assembly, don't dereference the function pointer twice.
-
- * plugins/win/PluginViewWin.cpp:
- (WebCore::PluginView::hookedBeginPaint):
- (WebCore::PluginView::hookedEndPaint):
-
-2009-11-22 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Adam Barth.
-
- [Qt] Remove the Referer header when redirecting to a non-secure site
- https://bugs.webkit.org/show_bug.cgi?id=31785
-
- This makes Qt pass two tests introduced in r50226.
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
-
-2009-11-25 Andrei Popescu <andreip@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- The select elements do not reflect the actual choice the user makes.
- https://bugs.webkit.org/show_bug.cgi?id=31831
-
- Handle the drawing of the listboxes in Android code.
-
- No new features, just fixing an Android problem. Existing layout tests are sufficient.
-
- * platform/android/RenderThemeAndroid.cpp:
- (WebCore::theme):
- (WebCore::RenderThemeAndroid::platformActiveSelectionBackgroundColor):
- (WebCore::RenderThemeAndroid::platformActiveListBoxSelectionBackgroundColor):
- (WebCore::RenderThemeAndroid::platformInactiveListBoxSelectionBackgroundColor):
- (WebCore::RenderThemeAndroid::platformActiveListBoxSelectionForegroundColor):
- (WebCore::RenderThemeAndroid::platformInactiveListBoxSelectionForegroundColor):
- (WebCore::RenderThemeAndroid::adjustButtonStyle):
- (WebCore::RenderThemeAndroid::paintTextArea):
- (WebCore::RenderThemeAndroid::adjustListboxStyle):
- * platform/android/RenderThemeAndroid.h:
-
-2009-11-25 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Load InspectorResource mime type from CachedResource for 304 responses
-
- For network libraries that do not merge cache data into 304 ResourceResponses,
- the mime type for cached resources is unknown.
- https://bugs.webkit.org/show_bug.cgi?id=31868
-
- * inspector/InspectorResource.cpp:
- (WebCore::InspectorResource::updateResponse):
- (WebCore::InspectorResource::updateScriptObject):
- (WebCore::InspectorResource::type):
-
-2009-11-25 Andrei Popescu <andreip@google.com>
-
- Reviewed by Eric Seidel.
-
- Android is missing implementation of SSL Key generator functions.
- https://bugs.webkit.org/show_bug.cgi?id=31825
-
- This change adds the PlatformBridge class to platform/android.
- PlarformBridge is used to access the embedding layer for things
- such as key generator, cookies, plugins, etc.
-
- No new tests required, this is platform code.
-
- * platform/android/PlatformBridge.h: Added.
- * platform/android/SSLKeyGeneratorAndroid.cpp: Added.
- (WebCore::getSupportedKeySizes):
- (WebCore::signedPublicKeyAndChallengeString):
-
-2009-11-25 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Eric Seidel.
-
- [GTK] use gst_init_check() instead of gst_init()
- https://bugs.webkit.org/show_bug.cgi?id=31864
-
- Use gst_init_check() instead of gst_init() to prevent eventual
- unexpected exit of the application.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::do_gst_init):
- (WebCore::MediaPlayerPrivate::isAvailable):
-
-2009-11-25 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Reviewed by Xan Lopez.
-
- Some tests are crashing from time to time
- https://bugs.webkit.org/show_bug.cgi?id=31866
-
- Make sure we do not notify the client of a finished load, if the
- load has been cancelled, or the client is gone.
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::):
-
-2009-11-24 Ben Murdoch <benm@google.com>
-
- Reviewed by Eric Seidel.
-
- [Android] Upstream Android changes to WebCore/bridge/jni
- https://bugs.webkit.org/show_bug.cgi?id=31824
-
- No new tests required as no new functionality.
-
- * bridge/jni/jni_class.cpp:
- (JavaClass::JavaClass): Add calls to delete allocated references, to avoid potential leaks.
- * bridge/jni/jni_instance.cpp: Add an Android include path.
- * bridge/jni/jni_instance.h: Add getter/setter for JObjectWrapper::_instance and make the JavaInstance ctor and member variables protected. Both needed for the Android port, see bug for discussion.
- (JSC::Bindings::JObjectWrapper::instance): Added.
- (JSC::Bindings::JObjectWrapper::setInstance): Added.
- * bridge/jni/jni_runtime.cpp:
- (JavaMethod::JavaMethod): Delete an allocated reference to avoid a potential leak.
- * bridge/jni/jni_utility.h:
- (JSC::Bindings::callJNIMethodV): Delete an allocated reference to avoid a potential leak.
-
-2009-11-24 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Allow custom memory allocation control for classes of the plugins and rendering directory in WebCore
- https://bugs.webkit.org/show_bug.cgi?id=31827
-
- Inherits the following classes from Noncopyable because these are instantiated
- by 'new' and no need to be copyable:
-
- class/struct name - instantiated at: WebCore/'location'
-
- class PluginRequest - plugins/PluginView.cpp:521
- class PluginMainThreadScheduler - plugins/PluginMainThreadScheduler.cpp:34
- class PluginDatabase - plugins/PluginDatabase.cpp:50
- struct MimeClassInfo - plugins/PluginInfoStore.cpp:50
- struct PluginInfo - plugins/PluginInfoStore.cpp:40
- class RenderArena - dom/Document.cpp:1401
- class RenderImageScaleData - rendering/RenderImage.cpp:149
- class TableLayout - (its child class) rendering/RenderTable.cpp:82
- struct ColumnInfo - rendering/RenderBlock.cpp:3590
- struct FloatingObject - rendering/RenderBlock.cpp:2300
- struct MaxMargin - rendering/RenderBlock.cpp:4794
- class RenderMarquee - rendering/RenderLayer.cpp:3277
-
- * plugins/PluginData.h:
- * plugins/PluginDatabase.h:
- * plugins/PluginMainThreadScheduler.h:
- * plugins/PluginView.h:
- * rendering/RenderArena.h:
- * rendering/RenderBlock.cpp:
- * rendering/RenderBlock.h:
- * rendering/RenderImage.cpp:
- * rendering/RenderMarquee.h:
- * rendering/TableLayout.h:
-
-2009-11-24 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by David Levin.
-
- Initial implementation of WebKitSharedScript and SharedScriptContext
- https://bugs.webkit.org/show_bug.cgi?id=31569
-
- No new tests since there are no bindings yet (soon to come).
-
- * DerivedSources.make: Add WebKitSharedScript and SharedScriptContext to a list of idl files.
- * WebCore.xcodeproj/project.pbxproj:
- * dom/Document.cpp:
- (WebCore::Document::detach): Notify WebKitSharedScriptRepository that document is detaching.
- * dom/EventTarget.cpp: Add new casting methods, since the new types are EventTargets.
- (WebCore::EventTarget::toWebKitSharedScript):
- (WebCore::EventTarget::toSharedScriptContext):
- * dom/EventTarget.h: Ditto
- * dom/ScriptExecutionContext.h:
- (WebCore::ScriptExecutionContext::isSharedScriptContext): New virtual method, since there is a new type of context.
-
- * SharedScript/SharedScriptContext.cpp: Added. Similar to WorkerContext, but w/o threading.
- (WebCore::SharedScriptContext::SharedScriptContext):
- (WebCore::SharedScriptContext::~SharedScriptContext):
- (WebCore::SharedScriptContext::clearScript):
- (WebCore::SharedScriptContext::virtualURL):
- (WebCore::SharedScriptContext::virtualCompleteURL):
- (WebCore::SharedScriptContext::reportException):
- (WebCore::SharedScriptContext::addMessage):
- (WebCore::SharedScriptContext::resourceRetrievedByXMLHttpRequest):
- (WebCore::SharedScriptContext::scriptImported):
- (WebCore::SharedScriptContext::matches):
- (WebCore::SharedScriptContext::addToDocumentsList):
- (WebCore::SharedScriptContext::destructionTimerFired):
- (WebCore::SharedScriptContext::removeFromDocumentList):
- (WebCore::SharedScriptContext::load):
- (WebCore::SharedScriptContext::postTask):
- (WebCore::SharedScriptContext::eventTargetData):
- (WebCore::SharedScriptContext::ensureEventTargetData):
- (WebCore::SharedScriptContext::scriptExecutionContext):
- * SharedScript/SharedScriptContext.h: Added.
- (WebCore::SharedScriptContext::create):
- (WebCore::SharedScriptContext::isSharedScriptContext):
- (WebCore::SharedScriptContext::userAgent):
- (WebCore::SharedScriptContext::toSharedScriptContext):
- (WebCore::SharedScriptContext::self):
- (WebCore::SharedScriptContext::script):
- (WebCore::SharedScriptContext::loaded):
- (WebCore::SharedScriptContext::name):
- (WebCore::SharedScriptContext::refEventTarget):
- (WebCore::SharedScriptContext::derefEventTarget):
- (WebCore::SharedScriptContext::refScriptExecutionContext):
- (WebCore::SharedScriptContext::derefScriptExecutionContext):
- * SharedScript/SharedScriptContext.idl: Added.
-
- * SharedScript/SharedScriptController.h:
- Added. Empty implementation of a ScriptController, will come later as part of bindings. Needed to compile.
-
- * SharedScript/WebKitSharedScript.cpp: Added. EventTarget-based DOM object.
- (WebCore::WebKitSharedScript::WebKitSharedScript):
- (WebCore::WebKitSharedScript::~WebKitSharedScript):
- (WebCore::WebKitSharedScript::setContext):
- (WebCore::LoadEventTask::create): Fires asynchronous 'load' event when underlying SharedScriptContext is initialized.
- (WebCore::LoadEventTask::performTask):
- (WebCore::LoadEventTask::LoadEventTask):
- (WebCore::WebKitSharedScript::scheduleLoadEvent):
- * SharedScript/WebKitSharedScript.h: Added.
- (WebCore::WebKitSharedScript::create):
- (WebCore::WebKitSharedScript::scriptExecutionContext):
- (WebCore::WebKitSharedScript::toWebKitSharedScript):
- (WebCore::WebKitSharedScript::context):
- (WebCore::WebKitSharedScript::refEventTarget):
- (WebCore::WebKitSharedScript::derefEventTarget):
- (WebCore::WebKitSharedScript::eventTargetData):
- (WebCore::WebKitSharedScript::ensureEventTargetData):
- * SharedScript/WebKitSharedScript.idl: Added.
-
- * SharedScript/WebKitSharedScriptRepository.cpp: Added. Implements a list of running SharedScriptContexts.
- (WebCore::ScriptLoader::ScriptLoader): The helper class to load an initial script of SharedScriptContext.
- (WebCore::ScriptLoader::load):
- (WebCore::ScriptLoader::notifyFinished):
- (WebCore::WebKitSharedScriptRepository::instance): Repository has a static global instance.
- (WebCore::WebKitSharedScriptRepository::connect):
- (WebCore::WebKitSharedScriptRepository::documentDetached): Called from Document::detach().
- (WebCore::WebKitSharedScriptRepository::removeSharedScriptContext): Called from ~SharedScriptContext().
- (WebCore::WebKitSharedScriptRepository::connectToSharedScript):
- (WebCore::WebKitSharedScriptRepository::getSharedScriptContext):
- * SharedScript/WebKitSharedScriptRepository.h: Added.
- (WebCore::WebKitSharedScriptRepository::WebKitSharedScriptRepository):
-
-2009-11-24 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit
- https://bugs.webkit.org/show_bug.cgi?id=31444
-
- * Configurations/FeatureDefines.xcconfig:
- * GNUmakefile.am:
- * WebCore.pro:
-
-2009-11-24 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser.
-
- Implement accelerated compositing
- https://bugs.webkit.org/show_bug.cgi?id=27314
-
- This part of the checkin adds the Windows specific GraphicsLayer support files.
- It provides the interface between GraphicsLayer and CACF. It also deals with
- the compositing loop, and provides the plumbing to pass the root layer up to
- WebView.
-
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.vcproj/WebCoreCommon.vsprops:
- * page/FrameView.cpp:
- (WebCore::FrameView::syncCompositingStateRecursive):
- * platform/graphics/GraphicsLayer.cpp:
- (WebCore::GraphicsLayer::GraphicsLayer):
- * platform/graphics/GraphicsLayer.h:
- * platform/graphics/win/GraphicsLayerCACF.cpp: Added.
- * platform/graphics/win/GraphicsLayerCACF.h: Added.
- * platform/graphics/win/WKCACFContextFlusher.cpp: Added.
- * platform/graphics/win/WKCACFContextFlusher.h: Added.
- * platform/graphics/win/WKCACFContextFlusherWin.cpp: Added.
- * platform/graphics/win/WKCACFLayer.cpp: Added.
- * platform/graphics/win/WKCACFLayer.h: Added.
- * platform/graphics/win/WKCACFLayerWindow.cpp: Added.
- * platform/graphics/win/WKCACFLayerWindow.h: Added.
-
-2009-11-24 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Eric Seidel.
-
- Do error checking of parameter to createShader
- https://bugs.webkit.org/show_bug.cgi?id=31808
-
- Test: fast/canvas/webgl/invalidPassedParams.html
-
- * html/canvas/WebGLRenderingContext.cpp:
- (WebCore::WebGLRenderingContext::createShader):
- * html/canvas/WebGLRenderingContext.h:
- * html/canvas/WebGLRenderingContext.idl:
-
-2009-11-24 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Eric Seidel.
-
- [Chromium] Ignore line-height CSS property specified to a search field on
- Windows and Linux.
- https://bugs.webkit.org/show_bug.cgi?id=31820
-
- LayoutTests/fast/forms/control-restrict-line-height.html checks that the
- following controls should ignore line-height CSS property.
- - <select>
- - <input type=button>
- - <input type=search>
- This change addresses the <input type=search> issue with Chromium/Windows
- and Chromium/Linux.
-
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::adjustSearchFieldStyle): Implement this to ignore line-height.
- * rendering/RenderThemeChromiumSkia.h: Declare adjustSearchFieldStyle().
-
-2009-11-24 Simon Fraser <simon.fraser@apple.com>
-
- No review.
-
- Stylistic fix: indent the member var initialisation.
-
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayerCA::GraphicsLayerCA):
-
-2009-11-24 Gavin Barraclough <barraclough@apple.com>
-
- Reviewed by Geoff Garen.
-
- Bug 31848 - Remove uses of mainThreadCurrentWorld, and of currentWorld using a globalData.
-
- These methods get the world from the global data rather than from an execstate.
- If the current world is always read from an exec state then it can be read
- from the global object, and world entry can become automagical, rather than
- being explicitly set by an EnterDOMWrapperWorld.
-
- * bindings/js/JSCSSRuleCustom.cpp:
- (WebCore::toJS):
- * bindings/js/JSCSSValueCustom.cpp:
- (WebCore::toJS):
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::currentWorld):
- (WebCore::DOMObjectWrapperMapFor):
- (WebCore::hasCachedDOMObjectWrapper):
- (WebCore::getCachedDOMObjectWrapper):
- (WebCore::cacheDOMObjectWrapper):
- (WebCore::hasCachedDOMNodeWrapper):
- (WebCore::getCachedDOMNodeWrapper):
- (WebCore::cacheDOMNodeWrapper):
- * bindings/js/JSDOMBinding.h:
- (WebCore::createDOMObjectWrapper):
- (WebCore::getDOMObjectWrapper):
- (WebCore::createDOMNodeWrapper):
- (WebCore::getDOMNodeWrapper):
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::history):
- (WebCore::JSDOMWindow::location):
- * bindings/js/JSDocumentCustom.cpp:
- (WebCore::JSDocument::location):
- (WebCore::toJS):
- * bindings/js/JSElementCustom.cpp:
- (WebCore::toJSNewlyCreated):
- * bindings/js/JSEventCustom.cpp:
- (WebCore::toJS):
- * bindings/js/JSHTMLCollectionCustom.cpp:
- (WebCore::toJS):
- * bindings/js/JSImageDataCustom.cpp:
- (WebCore::toJS):
- * bindings/js/JSNodeCustom.cpp:
- (WebCore::JSNode::markChildren):
- (WebCore::createWrapper):
- (WebCore::toJS):
- * bindings/js/JSSVGPathSegCustom.cpp:
- (WebCore::toJS):
- * bindings/js/JSStyleSheetCustom.cpp:
- (WebCore::toJS):
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::dropProtection):
-
-2009-11-24 Alexey Proskuryakov <ap@apple.com>
-
- Windows build fix.
-
- * platform/network/cf/SocketStreamHandleCFNet.cpp: Also, don't include the wrong one!
-
-2009-11-24 Alexey Proskuryakov <ap@apple.com>
-
- Windows build fix.
-
- * platform/network/cf/SocketStreamHandleCFNet.cpp: Include the proper WKSI header.
-
-2009-11-24 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Oliver Hunt.
-
- SVGUseElement::toClipPath can crash
- <rdar://problem/7385270>
-
- Null-test m_shadowTreeRootElement again, because the call to buildPendingResource() may not
- actually initialize it.
-
- * svg/SVGUseElement.cpp:
- (WebCore::SVGUseElement::toClipPath):
-
-2009-11-24 Simon Fraser <simon.fraser@apple.com>
-
- Windows build fix.
-
- * page/win/FrameCGWin.cpp:
- (WebCore::imageFromRect):
- (WebCore::imageFromSelection):
-
-2009-11-24 Eric Carlson <eric.carlson@apple.com>
-
- Not reviewed. Revert r51351 until a new WebKitSupportLibrary is available.
-
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
- * platform/graphics/win/QTMovieWin.cpp:
- * platform/graphics/win/QTMovieWin.h:
- * rendering/RenderMediaControls.cpp:
- * rendering/RenderThemeWin.cpp:
- * rendering/RenderThemeWin.h:
-
-2009-11-24 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Brady Eidson.
-
- https://bugs.webkit.org/show_bug.cgi?id=31844
- SocketStreamHandleCFNet should support CONNECT proxy credentials
-
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * platform/network/CredentialStorage.h:
- * platform/network/mac/CredentialStorageMac.mm: Added.
- (WebCore::CredentialStorage::getFromPersistentStorage):
- * platform/network/cf/CredentialStorageCFNet.cpp: Added.
- (WebCore::CredentialStorage::getFromPersistentStorage):
- Add support for fetching credentials from persistent storage (CFNet version is currently
- a stub).
-
- * bindings/js/JSWebSocketCustom.cpp: Removed an unneeded include.
-
- * platform/network/cf/SocketStreamHandle.h:
- * platform/network/cf/SocketStreamHandleCFNet.cpp:
- (WebCore::SocketStreamHandle::SocketStreamHandle):
- (WebCore::SocketStreamHandle::createStreams):
- (WebCore::getStoredCONNECTProxyCredentials):
- (WebCore::authenticationSchemeFromAuthenticationMethod):
- (WebCore::SocketStreamHandle::addCONNECTCredentials):
- (WebCore::SocketStreamHandle::readStreamCallback):
- Check if connection attempt was resulted in 407, and try stored credentials if it did.
-
- * platform/mac/WebCoreSystemInterface.h:
- * platform/mac/WebCoreSystemInterface.mm:
- * WebCore.base.exp:
- Updated WKSI.
-
-2009-11-24 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Find highlight is drawn incorrectly on pages with compositing layers
- <rdar://problem/7413925>
-
- Part 2: Add a new bit to the PaintBehavior flags, PaintBehaviorFlattenCompositingLayers,
- and pass that down when painting into an image.
-
- When set, it forces painting of compositing layers to go down a software paint path
- when all layers are painted, irrespective of compositing status, and where
- 3d transforms are flattened to 2d. When doing this, we also need to use temporary
- clip rects for layers which are normally composited.
-
- * page/FrameView.h:
- (WebCore::FrameView::paintBehavior):
- * page/mac/FrameMac.mm:
- (WebCore::Frame::imageFromRect):
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::renderableTransform):
- (WebCore::expandClipRectForDescendantsAndReflection):
- (WebCore::transparencyClipBox):
- (WebCore::RenderLayer::beginTransparencyLayers):
- (WebCore::RenderLayer::paintLayer):
- * rendering/RenderLayer.h:
- (WebCore::RenderLayer::paintsWithTransparency):
- (WebCore::RenderLayer::paintsWithTransform):
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::calculateCompositedBounds):
- * rendering/RenderObject.h:
-
-2009-11-24 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Find highlight is drawn incorrectly on pages with compositing layers
- <rdar://problem/7413925>
-
- Part 1: Rename PaintRestriction to PaintBehavior, and make it a bitmask, in
- preparation for adding a new flag related to painting into an image.
-
- PaintBehaviorSelectionOnly and PaintBehaviorForceBlackText are now separate flags.
-
- * page/FrameView.cpp:
- (WebCore::FrameView::reset):
- (WebCore::FrameView::paintContents):
- (WebCore::FrameView::setPaintBehavior):
- * page/FrameView.h:
- * page/mac/FrameMac.mm:
- (WebCore::Frame::selectionImage):
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::paint):
- (WebCore::RenderLayer::paintLayer):
- * rendering/RenderLayer.h:
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::paintIntoLayer):
- (WebCore::RenderLayerBacking::paintContents):
- * rendering/RenderLayerBacking.h:
- * rendering/RenderObject.h:
- * rendering/RenderReplica.cpp:
- (WebCore::RenderReplica::paint):
-
-2009-11-24 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/7409331> Windows: Support closed caption in <video> element
-
- Enable closed captions in QuickTime/Windows media engine.
-
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
- (WebCore::MediaPlayerPrivate::hasClosedCaptions):
- (WebCore::MediaPlayerPrivate::setClosedCaptionsVisible):
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
- * platform/graphics/win/QTMovieWin.cpp:
- (QTMovieWin::hasClosedCaptions):
- (QTMovieWin::setClosedCaptionsVisible):
- * platform/graphics/win/QTMovieWin.h:
- * rendering/RenderMediaControls.cpp:
- (WebCore::RenderMediaControls::paintMediaControlsPart):
- * rendering/RenderThemeWin.cpp:
- (WebCore::RenderThemeWin::paintMediaToggleClosedCaptionsButton):
- * rendering/RenderThemeWin.h:
-
-2009-11-24 Darin Fisher <darin@chromium.org>
-
- Reviewed by Adam Barth.
-
- [Chromium] Renderer hang when using www.expedia.com
- https://bugs.webkit.org/show_bug.cgi?id=31822
-
- Test: http/tests/cache/subresource-failover-to-network.html
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::loadResourceSynchronously): Use the originalRequest
- when inheriting cache policy. This matches SubresourceLoader::create.
-
-2009-11-23 Kenneth Russell <kbr@google.com>
-
- Reviewed by Oliver Hunt.
-
- Change get... calls to latest spec
- https://bugs.webkit.org/show_bug.cgi?id=30091
-
- Removed old versions of get calls on WebGLRenderingContext and
- added new ones per spec returning "any". New code simplifies
- GraphicsContext3D and fixes previously unimplemented routines.
- Added custom JS and V8 bindings. Added exhaustive test case
- exercising all new code paths. Updated preexisting test cases for
- new APIs. Fixed preexisting bugs in WebKit's and Chrome's WebGL
- implementations.
-
- Ran WebGL layout tests in WebKit (clean) and Chrome (couple of
- preexisting known failures) and manual WebGL tests in both
- browsers.
-
- Test: fast/canvas/webgl/gl-object-get-calls.html
-
- * WebCore.gypi:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSWebGLRenderingContextCustom.cpp:
- (WebCore::toJS):
- (WebCore::):
- (WebCore::getObjectParameter):
- (WebCore::getProgramParameterHelper):
- (WebCore::JSWebGLRenderingContext::getBufferParameter):
- (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
- (WebCore::JSWebGLRenderingContext::getParameter):
- (WebCore::JSWebGLRenderingContext::getProgramParameter):
- (WebCore::JSWebGLRenderingContext::getRenderbufferParameter):
- (WebCore::JSWebGLRenderingContext::getShaderParameter):
- (WebCore::JSWebGLRenderingContext::getTexParameter):
- (WebCore::JSWebGLRenderingContext::getUniform):
- (WebCore::JSWebGLRenderingContext::getVertexAttrib):
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
- (WebCore::toV8):
- (WebCore::):
- (WebCore::getObjectParameter):
- (WebCore::getProgramParameter):
- (WebCore::CALLBACK_FUNC_DECL):
- * html/canvas/CanvasObject.cpp:
- (WebCore::CanvasObject::CanvasObject):
- (WebCore::CanvasObject::setObject):
- (WebCore::CanvasObject::deleteObject):
- * html/canvas/CanvasObject.h:
- * html/canvas/WebGLBuffer.cpp:
- (WebCore::WebGLBuffer::create):
- (WebCore::WebGLBuffer::WebGLBuffer):
- * html/canvas/WebGLBuffer.h:
- * html/canvas/WebGLGetInfo.cpp: Added.
- (WebCore::WebGLGetInfo::WebGLGetInfo):
- (WebCore::WebGLGetInfo::~WebGLGetInfo):
- (WebCore::WebGLGetInfo::getType):
- (WebCore::WebGLGetInfo::getBool):
- (WebCore::WebGLGetInfo::getFloat):
- (WebCore::WebGLGetInfo::getLong):
- (WebCore::WebGLGetInfo::getString):
- (WebCore::WebGLGetInfo::getUnsignedLong):
- (WebCore::WebGLGetInfo::getWebGLBuffer):
- (WebCore::WebGLGetInfo::getWebGLFloatArray):
- (WebCore::WebGLGetInfo::getWebGLFramebuffer):
- (WebCore::WebGLGetInfo::getWebGLIntArray):
- (WebCore::WebGLGetInfo::getWebGLProgram):
- (WebCore::WebGLGetInfo::getWebGLRenderbuffer):
- (WebCore::WebGLGetInfo::getWebGLTexture):
- (WebCore::WebGLGetInfo::getWebGLUnsignedByteArray):
- * html/canvas/WebGLGetInfo.h: Added.
- (WebCore::WebGLGetInfo::):
- * html/canvas/WebGLRenderbuffer.cpp:
- (WebCore::WebGLRenderbuffer::create):
- (WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
- * html/canvas/WebGLRenderbuffer.h:
- * html/canvas/WebGLRenderingContext.cpp:
- (WebCore::WebGLStateRestorer::WebGLStateRestorer):
- (WebCore::WebGLStateRestorer::~WebGLStateRestorer):
- (WebCore::WebGLRenderingContext::WebGLRenderingContext):
- (WebCore::WebGLRenderingContext::activeTexture):
- (WebCore::WebGLRenderingContext::bindBuffer):
- (WebCore::WebGLRenderingContext::bindFramebuffer):
- (WebCore::WebGLRenderingContext::bindRenderbuffer):
- (WebCore::WebGLRenderingContext::bindTexture):
- (WebCore::WebGLRenderingContext::getBufferParameter):
- (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
- (WebCore::WebGLRenderingContext::getParameter):
- (WebCore::WebGLRenderingContext::getProgramParameter):
- (WebCore::WebGLRenderingContext::getProgramInfoLog):
- (WebCore::WebGLRenderingContext::getRenderbufferParameter):
- (WebCore::WebGLRenderingContext::getShaderParameter):
- (WebCore::WebGLRenderingContext::getShaderInfoLog):
- (WebCore::WebGLRenderingContext::getShaderSource):
- (WebCore::WebGLRenderingContext::getString):
- (WebCore::WebGLRenderingContext::getTexParameter):
- (WebCore::WebGLRenderingContext::getUniform):
- (WebCore::WebGLRenderingContext::getVertexAttrib):
- (WebCore::WebGLRenderingContext::useProgram):
- (WebCore::WebGLRenderingContext::getBooleanParameter):
- (WebCore::WebGLRenderingContext::getFloatParameter):
- (WebCore::WebGLRenderingContext::getIntParameter):
- (WebCore::WebGLRenderingContext::getLongParameter):
- (WebCore::WebGLRenderingContext::getUnsignedLongParameter):
- (WebCore::WebGLRenderingContext::getWebGLFloatArrayParameter):
- (WebCore::WebGLRenderingContext::getWebGLIntArrayParameter):
- (WebCore::WebGLRenderingContext::getWebGLUnsignedByteArrayParameter):
- * html/canvas/WebGLRenderingContext.h:
- * html/canvas/WebGLRenderingContext.idl:
- * html/canvas/WebGLTexture.cpp:
- (WebCore::WebGLTexture::create):
- (WebCore::WebGLTexture::WebGLTexture):
- * html/canvas/WebGLTexture.h:
- * manual-tests/webgl/resources/utils3d.js:
- (initWebGL):
- (loadShader):
- (Framerate.prototype.snapshot):
- * platform/graphics/GraphicsContext3D.h:
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::bindRenderbuffer):
- (WebCore::GraphicsContext3D::getBooleanv):
- (WebCore::GraphicsContext3D::getBufferParameteriv):
- (WebCore::GraphicsContext3D::getFloatv):
- (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
- (WebCore::GraphicsContext3D::getIntegerv):
- (WebCore::GraphicsContext3D::getProgramiv):
- (WebCore::GraphicsContext3D::getRenderbufferParameteriv):
- (WebCore::GraphicsContext3D::getShaderiv):
- (WebCore::GraphicsContext3D::getTexParameterfv):
- (WebCore::GraphicsContext3D::getTexParameteriv):
- (WebCore::GraphicsContext3D::getUniformfv):
- (WebCore::GraphicsContext3D::getUniformiv):
- (WebCore::GraphicsContext3D::getVertexAttribfv):
- (WebCore::GraphicsContext3D::getVertexAttribiv):
-
-2009-11-24 Steve Falkenburg <sfalken@apple.com>
-
- Windows build fix.
-
- * WebCore.vcproj/QTMovieWin.vcproj: Add additional search path for QuickTime SDK.
-
-2009-11-24 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Gustavo Noronha Silva.
-
- [Gtk] GStreamer-CRITICAL's (and other warnings) on <video>
- https://bugs.webkit.org/show_bug.cgi?id=26354
-
- Implemented MediaPlayerPrivate::isAvailable by checking the
- presence of the playbin2 GStreamer element.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::isAvailable):
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
-
-2009-11-24 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=25415
- [GTK][ATK] Please implement support for get_text_at_offset
-
- When building up the pango layout from text boxes, only append a
- newline char after verifying there are no more boxes on this line.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (getPangoLayoutForAtk):
-
-2009-11-24 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Pavel Feldman.
-
- Web Inspector: Keyboard Shortcut to Clear Console Messages
- https://bugs.webkit.org/show_bug.cgi?id=31780
-
- All Platforms: Ctrl+L = Clear Console Messages
- Mac Only: Cmd+K = Clear Console Messages
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView): create shortcuts
- (WebInspector.ConsoleView.prototype._promptKeyDown): handle shortcuts
- * inspector/front-end/KeyboardShortcut.js:
- (WebInspector.KeyboardShortcut.makeKey): convenience conversion of "a-z" character to keyCode
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel): style fixes for keyboard shortcuts
-
-2009-11-24 Pavel Feldman <pfeldman@chromium.org>
-
- Not reviewed: touch inspector controller in order to
- kick win bot inspector deploy. rs=aroben.
-
- * inspector/InspectorController.cpp:
-
-2009-11-23 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Implement expandable compartments on timeline panel.
-
- https://bugs.webkit.org/show_bug.cgi?id=31796
-
- * inspector/front-end/TimelineOverviewPane.js:
- (WebInspector.TimelineOverviewPane.prototype._setWindowPosition):
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel):
- (WebInspector.TimelinePanel.prototype.addRecordToTimeline):
- (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
- (WebInspector.TimelinePanel.prototype._formatRecord):
- (WebInspector.TimelinePanel.prototype._refreshRecords):
- (WebInspector.TimelinePanel.prototype._addToRecordsWindow):
- (WebInspector.TimelineRecordListRow):
- (WebInspector.TimelineRecordListRow.prototype.update):
- (WebInspector.TimelineRecordListRow.prototype.dispose):
- (WebInspector.TimelineRecordGraphRow):
- (WebInspector.TimelineRecordGraphRow.prototype.update):
- (WebInspector.TimelineRecordGraphRow.prototype._onClick):
- (WebInspector.TimelineRecordGraphRow.prototype.dispose):
- * inspector/front-end/inspector.css:
-
-2009-11-24 Mark Rowe <mrowe@apple.com>
-
- Fix production builds where the source tree may be read-only.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-11-23 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Include "config.h" to meet Coding Style Guidelines
- https://bugs.webkit.org/show_bug.cgi?id=31792
-
- No new tests as there is no new functionality.
-
- * platform/graphics/win/IntPointWin.cpp:
- * platform/graphics/win/IntRectWin.cpp:
- * platform/graphics/win/IntSizeWin.cpp:
- * platform/network/chromium/ResourceRequest.cpp:
- * platform/win/PlatformMouseEventWin.cpp:
-
-2009-11-23 Jian Li <jianli@chromium.org>
-
- Reviewed by NOBODY (Chromium build fix).
-
- * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * platform/graphics/GraphicsContext3D.h:
-
-2009-11-23 Aaron Golden <agolden@apple.com>
-
- Reviewed by Alexey Proskuryakov.
-
- Prevent ResourceHandleMac's version of ResourceHandle::receivedCredential from stripping
- identity and certificate information from a WebCore::Credential when receivedCredential
- needs to modify the credential's persistence.
-
- Adding a new constructor Credential(const Credential& original, CredentialPersistence)
- that copies every field from original except for persistence.
-
- * platform/network/Credential.cpp:
- (WebCore::Credential::Credential):
- * platform/network/Credential.h:
- * platform/network/mac/ResourceHandleMac.mm:
- (WebCore::ResourceHandle::receivedCredential):
-
-2009-11-23 Gavin Barraclough <barraclough@apple.com>
-
- Reviewed by Geoff Garen.
-
- Part 2/3 of <rdar://problem/7377477> REGRESSION: Many web pages fail to render after interesting script runs in isolated world
-
- Some clients of the JavaScriptCore API expect to be able to make callbacks over the JSC API,
- and for this to automagically cause execution to take place in the world associated with the
- global object associated with the ExecState (JSContextRef) passed. However this is not how
- things work - the world must be explicitly set within WebCore.
-
- Making this work just for API calls to evaluate & call will be a far from perfect solution,
- since direct (non-API) use of JSC still relies on WebCore setting the current world correctly.
- A better solution would be to make this all work automagically all throughout WebCore, but this
- will require more refactoring.
-
- Add references from the JSDOMWindowShell and the JSDOMGlobalObject to the world that owns them,
- so that we can get to the world from the lexical global object of an ExecState. In the long-term
- we should switch over to using this approach for all cases we want to get a world from an exec state.
-
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::WebCoreJSClientData::beginningExecution):
- (WebCore::WebCoreJSClientData::completedExecution):
- * bindings/js/JSDOMBinding.h:
- * bindings/js/JSDOMGlobalObject.h:
- (WebCore::JSDOMGlobalObject::world):
- (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
- * bindings/js/JSDOMWindowBase.cpp:
- (WebCore::JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData):
- * bindings/js/JSDOMWindowBase.h:
- * bindings/js/JSDOMWindowShell.cpp:
- (WebCore::JSDOMWindowShell::JSDOMWindowShell):
- * bindings/js/JSDOMWindowShell.h:
- (WebCore::JSDOMWindowShell::world):
- * bindings/js/JSWorkerContextBase.cpp:
- (WebCore::JSWorkerContextBase::JSWorkerContextBase):
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::initScript):
-
-2009-11-23 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Add range checks to rendering calls in WebGL
- https://bugs.webkit.org/show_bug.cgi?id=31239
-
- I am now tracking the size of the data in each CanvasBuffer object
- and keeping track of the buffer size of each active vertex attrib.
- In drawArrays and drawElements I make sure no attempt is made to
- access elements outside the valid buffer ranges. The test at:
-
- http://cs.helsinki.fi/u/ilmarihe/c3d/functions/drawArraysOutOfBounds.html
-
- no longer crashes.
-
- I also added all the WebGL enumerations to GraphicsContext3D to use them in the validation checks
-
- Tests: fast/canvas/webgl/drawArraysOutOfBounds.html
- fast/canvas/webgl/drawElementssOutOfBounds.html
-
- * bindings/js/JSWebGLArrayCustom.cpp:
- (WebCore::toJS):
- * bindings/js/JSWebGLRenderingContextCustom.cpp:
- (WebCore::JSWebGLRenderingContext::bufferData):
- (WebCore::JSWebGLRenderingContext::bufferSubData):
- (WebCore::JSWebGLRenderingContext::texSubImage2D):
- * html/canvas/WebGLArrayBuffer.cpp:
- (WebCore::WebGLArrayBuffer::create):
- (WebCore::WebGLArrayBuffer::data):
- * html/canvas/WebGLArrayBuffer.h:
- * html/canvas/WebGLBuffer.cpp:
- (WebCore::WebGLBuffer::WebGLBuffer):
- (WebCore::WebGLBuffer::associateBufferData):
- (WebCore::WebGLBuffer::associateBufferSubData):
- (WebCore::WebGLBuffer::byteLength):
- * html/canvas/WebGLBuffer.h:
- (WebCore::WebGLBuffer::elementArrayBuffer):
- * html/canvas/WebGLRenderingContext.cpp:
- (WebCore::WebGLRenderingContext::WebGLRenderingContext):
- (WebCore::WebGLRenderingContext::sizeInBytes):
- (WebCore::WebGLRenderingContext::bindBuffer):
- (WebCore::WebGLRenderingContext::bufferData):
- (WebCore::WebGLRenderingContext::bufferSubData):
- (WebCore::WebGLRenderingContext::createShader):
- (WebCore::WebGLRenderingContext::disableVertexAttribArray):
- (WebCore::WebGLRenderingContext::validateIndexArray):
- (WebCore::WebGLRenderingContext::validateRenderingState):
- (WebCore::WebGLRenderingContext::drawArrays):
- (WebCore::WebGLRenderingContext::drawElements):
- (WebCore::WebGLRenderingContext::enableVertexAttribArray):
- (WebCore::WebGLRenderingContext::isFramebuffer):
- (WebCore::WebGLRenderingContext::isProgram):
- (WebCore::WebGLRenderingContext::isRenderbuffer):
- (WebCore::WebGLRenderingContext::isShader):
- (WebCore::WebGLRenderingContext::isTexture):
- (WebCore::WebGLRenderingContext::useProgram):
- (WebCore::WebGLRenderingContext::validateProgram):
- (WebCore::WebGLRenderingContext::vertexAttribPointer):
- (WebCore::WebGLRenderingContext::detachAndRemoveAllObjects):
- * html/canvas/WebGLRenderingContext.h:
- (WebCore::WebGLRenderingContext::VertexAttribState::VertexAttribState):
- * html/canvas/WebGLRenderingContext.idl:
- * html/canvas/WebGLShader.cpp:
- (WebCore::WebGLShader::create):
- (WebCore::WebGLShader::WebGLShader):
- * html/canvas/WebGLShader.h:
- * platform/graphics/GraphicsContext3D.h:
- (WebCore::GraphicsContext3D::):
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::createShader):
-
-2009-11-23 Erik Arvidsson <arv@chromium.org>
-
- Reviewed by Eric Seidel.
-
- JSC bindings for HasIndexGetter generates incorrect code (affects
- MediaList and CSSStyleDeclaration).
- This cleans up the edge cases for indexing out of range for style and
- computed style objects to return an empty string according to the spec.
- MediaList now returns null when indexed out of range.
- https://bugs.webkit.org/show_bug.cgi?id=31683
-
- Tests: fast/dom/CSSStyleDeclaration/css-computed-style-item.html
- fast/dom/CSSStyleDeclaration/css-style-item.html
- fast/dom/StyleSheet/css-medialist-item.html
-
- * bindings/scripts/CodeGeneratorJS.pm: If IndexGetterReturnsString then
- we do not check the length before calling the item function.
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::CSSComputedStyleDeclaration::item):
- * css/CSSMutableStyleDeclaration.cpp:
- (WebCore::CSSMutableStyleDeclaration::item):
- * css/CSSStyleDeclaration.idl:
-
-2009-11-23 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- DocumentMarkers need to be educated about transforms
- https://bugs.webkit.org/show_bug.cgi?id=31751
-
- Find highlight is incorrect with transforms
- <rdar://problem/6358394>
-
- Allow callers to specify that Frame::selectionTextRects() takes transforms into account
- when computing the set of rects that encompass a selection. For transformed elemenets, the
- selection rect will be the bounding box of the selected content.
-
- Fix DocumentMarkers to cache rects in absolute coordinates, rather than painting coordinates.
-
- Test: editing/selection/transformed-selection-rects.html
-
- * WebCore.base.exp:
- Frame::selectionTextRects() has a new parameter.
-
- * dom/Document.cpp:
- (WebCore::Document::setRenderedRectForMarker):
- * dom/Document.h:
- Pass the marker as a const reference.
-
- * dom/Range.h:
- * dom/Range.cpp:
- (WebCore::Range::textQuads):
- Add a new method, textQuads(), which returns a list of quads, respecting transforms.
-
- * page/Frame.h:
- * page/Frame.cpp:
- (WebCore::Frame::selectionTextRects):
- Add a new parameter, respectTransforms, and when that is RespectTransforms, use the quad
- method to get quads for ranges, and then take their bounding boxes.
-
- * rendering/InlineTextBox.h:
- * rendering/InlineTextBox.cpp:
- (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
- (WebCore::InlineTextBox::paintTextMatchMarker):
- (WebCore::InlineTextBox::computeRectForReplacementMarker):
- (WebCore::InlineTextBox::paintDocumentMarkers):
- (WebCore::InlineTextBox::textPos):
- (WebCore::InlineTextBox::offsetForPosition):
-
- Pass DocumentMarkers as a const references.
- Convert the argument to setRenderedRectForMarker() into absolute coordinates.
-
- * rendering/RenderView.cpp:
- (WebCore::RenderView::selectionBounds):
-
-2009-11-23 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- [Cairo] support blurred test-shadow
- [https://bugs.webkit.org/show_bug.cgi?id=31797]
-
- Support for blurred text-shadows on Cairo. This patch
- reuses the code of blurred box-shadows, introduced in
- bug 26102. For a full textshadow support, a filters enabled
- build is needed.
-
- * platform/graphics/cairo/FontCairo.cpp:
- (WebCore::Font::drawGlyphs):
-
-2009-11-23 Jens Alfke <snej@chromium.org>
-
- Reviewed by Geoffrey Garen.
-
- Change incorrect calls to the constructor "EventNames()" to the correct accessor
- "eventNames()". This saves ~100 AtomicString lookups each time.
- https://bugs.webkit.org/show_bug.cgi?id=31811
-
- * dom/EventNames.h: Make constructor private to prevent this from happening again.
- * history/CachedFrame.cpp:
- (WebCore::CachedFrameBase::restore): EventNames() --> eventNames()
- * html/HTMLFormControlElement.cpp:
- (WebCore::HTMLFormControlElement::checkValidity): EventNames() --> eventNames()
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::stopLoading): EventNames() --> eventNames()
- (WebCore::FrameLoader::pageHidden): EventNames() --> eventNames()
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): EventNames() --> eventNames()
-
-2009-11-23 Adam Langley <agl@google.com>
-
- Reviewed by Dmitry Titov.
-
- Chromium Linux: Limit the stroke width and mitre limit.
-
- Limit the stroke width and mitre limit that we'll pass into Skia to
- avoid overflowing Skia's uint16_t glyph widths.
-
- http://code.google.com/p/chromium/issues/detail?id=28250
- https://bugs.webkit.org/show_bug.cgi?id=31747
-
- * platform/graphics/skia/PlatformContextSkia.cpp:
- (scalarBound):
- (PlatformContextSkia::setupPaintForStroking):
-
-2009-11-23 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Oliver Hunt.
-
- https://bugs.webkit.org/show_bug.cgi?id=31812
- WebSocket code uses RefPtr::get() where it shouldn't
-
- No change in funcitonality, just coding style correction.
-
- * websockets/WebSocket.cpp:
- (WebCore::WebSocket::~WebSocket):
- * websockets/WebSocketChannel.cpp:
- (WebCore::WebSocketChannel::connect):
- (WebCore::WebSocketChannel::send):
- (WebCore::WebSocketChannel::bufferedAmount):
- (WebCore::WebSocketChannel::close):
- (WebCore::WebSocketChannel::disconnect):
- (WebCore::WebSocketChannel::didOpen):
- (WebCore::WebSocketChannel::didClose):
- (WebCore::WebSocketChannel::didReceiveData):
- (WebCore::WebSocketChannel::didFail):
-
-2009-11-23 Alexey Proskuryakov <ap@apple.com>
-
- Build fix.
-
- * platform/network/cf/SocketStreamHandleCFNet.cpp:
- (WebCore::SocketStreamHandle::pacExecutionCallbackMainThread): pacExecutionCallbackMainThread
- is static, so it can't use member variables directly.
-
-2009-11-23 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Brady Eidson.
-
- https://bugs.webkit.org/show_bug.cgi?id=31748
- Make WebSocketHandleCFNet respect proxy auto-configuration files via CFProxySupport
-
- * platform/network/cf/SocketStreamHandle.h: Removed names from some void* arguments, since
- they didn't carry useful information.
-
- * platform/network/cf/SocketStreamHandleCFNet.cpp:
- (WebCore::SocketStreamHandle::SocketStreamHandle): When we need an http-style URL, we actually
- always need https.
- (WebCore::SocketStreamHandle::scheduleStreams): Factored out from constructor, since streams
- only get scheduled after PAC is fetched and executed asynchronously.
- (WebCore::SocketStreamHandle::copyPACExecutionDescription): Return a description for event
- source.
- (WebCore::MainThreadPACCallbackInfo::MainThreadPACCallbackInfo): Forward callback to main thread.
- (WebCore::SocketStreamHandle::pacExecutionCallback): Ditto.
- (WebCore::SocketStreamHandle::pacExecutionCallbackMainThread): Ditto. To avoid code duplication,
- we make the call even on Mac.
- (WebCore::SocketStreamHandle::executePACFileURL): Make an async call to CFNetworkExecuteProxyAutoConfigurationURL.
- (WebCore::SocketStreamHandle::removePACRunLoopSource): Once PAC execution is done or aborted,
- we need to get rid of the event source.
- (WebCore::SocketStreamHandle::chooseProxy): Use stored m_httpsURL.get.
- (WebCore::SocketStreamHandle::chooseProxyFromArray): Factored out from chooseProxy - the
- array may come directly from system configuration, or from PAC.
- (WebCore::SocketStreamHandle::chooseProxy): Tiger version of this function is now completely
- separate.
- (WebCore::SocketStreamHandle::~SocketStreamHandle): Run loop source should be destroyed
- before we get to the destructor.
- (WebCore::SocketStreamHandle::platformClose): Destroy the run loop source, if PAC execution
- is still in progress.
-
-2009-11-23 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Geoff Garen.
-
- Don't leak the CGImage we create when drawing a sub image.
-
- * platform/graphics/cg/ImageCG.cpp:
- (WebCore::BitmapImage::draw):
-
-2009-11-23 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Don't crash when OOM in creating isolated world
- https://bugs.webkit.org/show_bug.cgi?id=31805
-
- We need to add some more null checks to avoid crashing. No new tests
- because we don't have a good way to test out-of-memory bugs.
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::evaluateInIsolatedWorld):
- (WebCore::V8Proxy::evaluateInNewContext):
- (WebCore::V8Proxy::setInjectedScriptContextDebugId):
- * bindings/v8/V8Proxy.h:
-
-2009-11-23 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Nikolas Zimmermann.
-
- This is the implementation of the filterRes attribute. It
- helps the SVG developer to set the quality of a filter by
- giving the width or height of filter.
- This patch also sets the filter resolution to lower values
- if a intermediate ImageBuffer size is bigger than the given
- maximal size.
- The maximal size is set to 5000x5000 by default. This is a
- subjectiv decission. Everthing greater than this values gets
- sensible slower. Values of 10000x10000 crashed on WebKitGtk.
- For mobil devices a maximum size of 100x100 or 200x200 seems
- to be reasonable.
- The important fact on filter resolution is, that the output
- size is still the size given by the <filter> element.
-
- Tests: svg/filters/big-sized-filter-2.svg
- svg/filters/big-sized-filter.svg
- svg/filters/filterRes.svg
-
- * platform/graphics/FloatRect.cpp:
- (WebCore::FloatRect::scale): Add the abbility to scale a rect by x and y.
- * platform/graphics/FloatRect.h:
- (WebCore::FloatRect::scale): Add the abbility to scale a rect by x and y.
- * platform/graphics/cairo/GraphicsContextCairo.cpp:
- (WebCore::GraphicsContext::createPlatformShadow): Use scaledSubRegion for
- calculation.
- * platform/graphics/filters/FEBlend.cpp:
- (WebCore::FEBlend::apply): Use scaledSubRegion for effect intern calculations.
- * platform/graphics/filters/FEColorMatrix.cpp:
- (WebCore::FEColorMatrix::apply): Use scaledSubRegion for effect intern calculations.
- * platform/graphics/filters/FEComponentTransfer.cpp:
- (WebCore::FEComponentTransfer::apply): Use scaledSubRegion for effect intern
- calculations.
- * platform/graphics/filters/FEComposite.cpp:
- (WebCore::FEComposite::apply): Use scaledSubRegion for effect intern calculations.
- * platform/graphics/filters/FEGaussianBlur.cpp:
- (WebCore::FEGaussianBlur::apply): Use scaledSubRegion for effect intern calculations.
- * platform/graphics/filters/Filter.h: Add the abbility to change the quality
- of a filter output.
- (WebCore::Filter::filterResolution):
- (WebCore::Filter::setFilterResolution):
- (WebCore::Filter::calculateEffectSubRegion): Calculates the correct subRegion
- as well as the scaledSubRegion. It also searches for the biggest effect size.
- We have to change the filter resolution, if one intermediate ImageBuffer size
- doesn't fit in the maximal image size.
- * platform/graphics/filters/FilterEffect.cpp:
- (WebCore::FilterEffect::calculateDrawingIntRect): Use scaledSubRegion to get
- the right part of a previous effect result.
- (WebCore::FilterEffect::calculateDrawingRect): Use scaledSubRegion to get
- the right part of a previous effect result.
- (WebCore::FilterEffect::getEffectContext): Use scaledSubRegion to create
- a new intermediate ImageBuffer for the result of the current effect.
- * platform/graphics/filters/FilterEffect.h:
- (WebCore::FilterEffect::scaledSubRegion): The scaled subRegion of a the
- filter effect.
- (WebCore::FilterEffect::setScaledSubRegion):
- (WebCore::FilterEffect::effectBoundaries): The original values of the
- EffectElement for a second subRegion calculation.
- (WebCore::FilterEffect::setEffectBoundaries):
- * platform/graphics/filters/ImageBufferFilter.cpp:
- (WebCore::ImageBufferFilter::ImageBufferFilter): Set the scale factor to one.
- * platform/graphics/filters/ImageBufferFilter.h:
- (WebCore::ImageBufferFilter::maxImageSize):
- (WebCore::ImageBufferFilter::calculateEffectSubRegion):
- * platform/graphics/filters/SourceAlpha.cpp:
- (WebCore::SourceAlpha::calculateEffectRect): Use scaledSubRegion for effect
- intern calculations.
- * platform/graphics/filters/SourceGraphic.cpp:
- (WebCore::SourceGraphic::calculateEffectRect): Use scaledSubRegion for effect
- intern calculations.
- * svg/SVGFilterElement.cpp:
- (WebCore::SVGFilterElement::parseMappedAttribute): Parse filterRes attribute.
- (WebCore::SVGFilterElement::buildFilter): Give SVGResourceFilter the current
- filterResolution.
- * svg/SVGFilterPrimitiveStandardAttributes.cpp:
- (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes): Save
- values to effectBoundaries of the filter effect
- * svg/graphics/SVGResourceFilter.cpp:
- (WebCore::SVGResourceFilter::SVGResourceFilter):
- (WebCore::shouldProcessFilter): Return signal if a neccessary value is zero.
- (WebCore::SVGResourceFilter::fitsInMaximumImageSize): Checks if the given size
- fits into the maximal image size, modifys scale factors if not and return a
- bool: fits.
- (WebCore::SVGResourceFilter::prepareFilter): Scale the SourceImage to
- filterResolution (given by FilterElement or calculated on to big image sizes).
- Set the scale level to SVGFilter.
- (WebCore::SVGResourceFilter::applyFilter): Don't apply filters if shouldProcessFilter
- is wrong.
- * svg/graphics/SVGResourceFilter.h:
- (WebCore::SVGResourceFilter::setFilterResolution): FilterResolution of FilterElement.
- (WebCore::SVGResourceFilter::setHasFilterResolution): Does FilterElement provides
- a FilterResolution?
- (WebCore::SVGResourceFilter::scaleX): Current scale factor for horizontal.
- (WebCore::SVGResourceFilter::scaleY): Current scale factor for vertical.
- * svg/graphics/filters/SVGFEDisplacementMap.cpp:
- (WebCore::FEDisplacementMap::apply): Use scaledSubRegion for effect intern calculations.
- Kernel values are scaled to current filter resolution too.
- * svg/graphics/filters/SVGFEFlood.cpp:
- (WebCore::FEFlood::apply): Use scaledSubRegion for effect intern calculations.
- * svg/graphics/filters/SVGFEMerge.cpp:
- (WebCore::FEMerge::apply): Use scaledSubRegion for effect intern calculations.
- Kernel values are scaled to current filter resolution too.
- * svg/graphics/filters/SVGFEMorphology.cpp:
- (WebCore::FEMorphology::apply): Use scaledSubRegion for effect intern calculations.
- Kernel values are scaled to current filter resolution too.
- * svg/graphics/filters/SVGFEOffset.cpp:
- (WebCore::FEOffset::apply): Use scaledSubRegion for effect intern calculations.
- * svg/graphics/filters/SVGFETile.cpp:
- (WebCore::FETile::apply): Use scaledSubRegion for effect intern calculations.
- * svg/graphics/filters/SVGFilter.cpp:
- (WebCore::SVGFilter::calculateEffectSubRegion): Calculate subRegion for LayoutTests,
- scaledSubRegion according to the current filterResolution and get the maximal image size.
- * svg/graphics/filters/SVGFilter.h:
- (WebCore::SVGFilter::effectBoundingBoxMode): Original values of the FilterElement.
- (WebCore::SVGFilter::filterRegion): Use virtual for clarification.
- (WebCore::SVGFilter::sourceImageRect): Use virtual for clarification.
- (WebCore::SVGFilter::maxImageSize): Get the maximal image size.
-
-2009-11-23 Simon Hausmann <simon.hausmann@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- [Qt] Wrong runtime instance objects of wrapped QObjects may be used if
- the wrapped object died before the gc removed the instance.
-
- https://bugs.webkit.org/show_bug.cgi?id=31681
-
- Before using a cached instance, verify that its wrapped QObject is
- still alive.
-
- * bridge/qt/qt_instance.cpp:
- (JSC::Bindings::QtInstance::getQtInstance):
- * bridge/qt/qt_instance.h:
- (JSC::Bindings::QtInstance::hashKey):
-
-2009-11-22 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Oliver Hunt.
-
- ARIA: support aria-flowto
- https://bugs.webkit.org/show_bug.cgi?id=31762
-
- Test: platform/mac/accessibility/aria-flowto.html
-
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::ariaOwnsElements):
- (WebCore::AccessibilityObject::supportsARIAFlowTo):
- (WebCore::AccessibilityObject::ariaFlowToElements):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::linkedUIElements):
- (WebCore::AccessibilityRenderObject::supportsARIAFlowTo):
- (WebCore::AccessibilityRenderObject::ariaFlowToElements):
- * accessibility/AccessibilityRenderObject.h:
- * html/HTMLAttributeNames.in:
-
-2009-11-22 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Not reviewed. Build fix for WML enabled builds.
- Adopt WebCore API changes.
-
- * wml/WMLAElement.cpp:
- (WebCore::WMLAElement::defaultEventHandler):
- * wml/WMLInputElement.cpp:
- (WebCore::WMLInputElement::defaultEventHandler):
-
-2009-11-22 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Introduce sidebar background on timeline panel in order
- to prevent it from flickering on scroll.
-
- https://bugs.webkit.org/show_bug.cgi?id=31789
-
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel):
- (WebInspector.TimelinePanel.prototype.setSidebarWidth):
- (WebInspector.TimelinePanel.prototype._onScroll):
- (WebInspector.TimelinePanel.prototype._scheduleRefresh):
- * inspector/front-end/inspector.css:
-
-2009-11-22 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Reimplement TimelinePanel to make it fast:
- - Extract grid and overview into separate files
- - Make timeline create only divs for visible rows
-
- https://bugs.webkit.org/show_bug.cgi?id=31784
-
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * inspector/front-end/AbstractTimelinePanel.js:
- (WebInspector.AbstractTimelinePanel.prototype.createInterface):
- (WebInspector.AbstractTimelinePanel.prototype.refresh):
- (WebInspector.AbstractTimelinePanel.prototype.set calculator):
- * inspector/front-end/TimelineGrid.js: Added.
- (WebInspector.TimelineGrid):
- (WebInspector.TimelineGrid.prototype.get itemsGraphsElement):
- (WebInspector.TimelineGrid.prototype.updateDividers):
- (WebInspector.TimelineGrid.prototype.addEventDivider):
- (WebInspector.TimelineGrid.prototype.setScrollAndDividerTop):
- * inspector/front-end/TimelineOverviewPane.js: Added.
- (WebInspector.TimelineOverviewPane):
- (WebInspector.TimelineOverviewPane.prototype._onCheckboxClicked):
- (WebInspector.TimelineOverviewPane.prototype.update):
- (WebInspector.TimelineOverviewPane.prototype.setSidebarWidth):
- (WebInspector.TimelineOverviewPane.prototype.updateMainViewWidth):
- (WebInspector.TimelineOverviewPane.prototype.reset):
- (WebInspector.TimelineOverviewPane.prototype._resizeWindow):
- (WebInspector.TimelineOverviewPane.prototype._windowResizeDragging):
- (WebInspector.TimelineOverviewPane.prototype._dragWindow):
- (WebInspector.TimelineOverviewPane.prototype._windowDragging):
- (WebInspector.TimelineOverviewPane.prototype._resizeWindowLeft):
- (WebInspector.TimelineOverviewPane.prototype._resizeWindowRight):
- (WebInspector.TimelineOverviewPane.prototype._setWindowPosition):
- (WebInspector.TimelineOverviewPane.prototype._endWindowDragging):
- (WebInspector.TimelineOverviewCalculator):
- (WebInspector.TimelineOverviewCalculator.prototype.computeBarGraphPercentages):
- (WebInspector.TimelineOverviewCalculator.prototype.reset):
- (WebInspector.TimelineOverviewCalculator.prototype.updateBoundaries):
- (WebInspector.TimelineOverviewCalculator.prototype.get boundarySpan):
- (WebInspector.TimelineOverviewCalculator.prototype.formatValue):
- (WebInspector.TimelineCategoryTreeElement):
- (WebInspector.TimelineCategoryTreeElement.prototype.onattach):
- (WebInspector.TimelineCategoryGraph):
- (WebInspector.TimelineCategoryGraph.prototype.get graphElement):
- (WebInspector.TimelineCategoryGraph.prototype.addChunk):
- (WebInspector.TimelineCategoryGraph.prototype.clearChunks):
- (WebInspector.TimelineCategoryGraph.prototype.set dimmed):
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel):
- (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
- (WebInspector.TimelinePanel.prototype.addRecordToTimeline):
- (WebInspector.TimelinePanel.prototype._formatRecord):
- (WebInspector.TimelinePanel.prototype.setSidebarWidth):
- (WebInspector.TimelinePanel.prototype.updateMainViewWidth):
- (WebInspector.TimelinePanel.prototype.resize):
- (WebInspector.TimelinePanel.prototype.reset):
- (WebInspector.TimelinePanel.prototype.show):
- (WebInspector.TimelinePanel.prototype._onScroll):
- (WebInspector.TimelinePanel.prototype._scheduleRefresh):
- (WebInspector.TimelinePanel.prototype._refresh):
- (WebInspector.TimelinePanel.prototype._refreshRecords):
- (WebInspector.TimelinePanel.prototype._adjustScrollPosition):
- (WebInspector.TimelineCategory):
- (WebInspector.TimelineCalculator):
- (WebInspector.TimelineCalculator.prototype.get boundarySpan):
- (WebInspector.TimelineRecordListRow):
- (WebInspector.TimelineRecordListRow.prototype.update):
- (WebInspector.TimelineRecordGraphRow):
- (WebInspector.TimelineRecordGraphRow.prototype.update):
- * inspector/front-end/WebKit.qrc:
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.html:
-
-2009-11-22 Chris Evans <cevans@chromium.org>
-
- Reviewed by Adam Barth.
-
- Disable access to file:/// directory listings
- https://bugs.webkit.org/show_bug.cgi?id=31329
-
- Deny access to directory listings. This needs doing in WebKit for
- WebKit clients that do permit top-level navigation to file:///dir.
- This matches Firefox, plus the existing Safari implementation (which
- does not support any directory access at all). It will fix the
- LayoutTest named below for Chromium.
-
- Test: fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html
-
- * page/SecurityOrigin.cpp: Deny access to directory listings.
- (WebCore::SecurityOrigin::SecurityOrigin):
- (WebCore::SecurityOrigin::canRequest):
-
-2009-11-20 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Support Ctrl+P and Ctrl+N, Readline keyboard shortcuts in the Console
- https://bugs.webkit.org/show_bug.cgi?id=31400
-
- Handle the following when on a Mac:
-
- Ctrl+P = Previous (like Up arrow)
- Ctrl+N = Next (like Down arrow)
-
- No longer rerun autocompletion when just pushing a modifier key
- like Control, Alt, Shift, or Meta.
-
- Improved arrow key behavior with Multiline code in the Console, with the following behavior:
-
- Up = Previous Command if on First Line (caret moves to the end of the first line)
- otherwise default caret movement in text.
- Down = Next Command if on Last Line (caret naturally moves to the end)
- otherwise default caret movement in text.
-
- * inspector/front-end/TextPrompt.js:
- (WebInspector.TextPrompt.prototype.handleKeyEvent): handle new keyboard shortcuts
- (WebInspector.TextPrompt.prototype.isCaretOnFirstLine): check if the caret is on the top line
- (WebInspector.TextPrompt.prototype.isCaretOnLastLine): check if the caret is on the bottom line
- (WebInspector.TextPrompt.prototype._upKeyPressed):
- (WebInspector.TextPrompt.prototype._downKeyPressed):
- (WebInspector.TextPrompt.prototype._moveBackInHistory):
- (WebInspector.TextPrompt.prototype._moveForwardInHistory):
-
-2009-11-21 Jessie Berlin <jberlin@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Adds a tooltip containing the full url of the resource to each element
- in the Resources panel so that it is possible to quickly see the query
- parameters.
- https://bugs.webkit.org/show_bug.cgi?id=19103
-
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourceSidebarTreeElement.prototype.refresh):
- Set the tooltip to be the resource's url.
-
-2009-11-21 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- CSSKeyframesRule::findRule() and deleteRule() should accept 'from' and 'to' as well as percentages
- https://bugs.webkit.org/show_bug.cgi?id=31588
-
- In WebKitCSSKeyframesRule::findRuleIndex(), map 'from' to 0% an 'to' to 100%
- so that findRule() and deleteRule() work with these keywords.
-
- * css/WebKitCSSKeyframesRule.cpp:
- (WebCore::WebKitCSSKeyframesRule::findRuleIndex):
-
-2009-11-21 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=31647
-
- Changed KeyboardEvent::m_keyEvent from a raw pointer to an OwnPtr.
-
- No functionality was changed. So, no new tests.
-
- * dom/KeyboardEvent.cpp:
- (WebCore::KeyboardEvent::~KeyboardEvent):
- * dom/KeyboardEvent.h: Changed m_keyEvent to OwnPtr.
- (WebCore::KeyboardEvent::keyEvent):
-
-2009-11-20 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Beth Dakin.
-
- WAI-ARIA: add support for aria-owns
- https://bugs.webkit.org/show_bug.cgi?id=31702
-
- Re-organized how accessibilityAttributeNames are returned so
- that it's possible for an element to add an attribute based on
- a dynamic value. In this case, we only want to add AXOwn if the
- element actually supports aria-owns.
-
- Test: platform/mac/accessibility/aria-owns.html
-
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::supportsARIAOwns):
- (WebCore::AccessibilityObject::ariaOwnsElements):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::ariaOwnsElements):
- (WebCore::AccessibilityRenderObject::supportsARIAOwns):
- * accessibility/AccessibilityRenderObject.h:
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
- (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
- (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
- * html/HTMLAttributeNames.in:
-
-2009-11-20 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/7414396> Leopard & Tiger: Support closed caption in <video> element
-
- * css/mediaControls.css:
- Define closed caption toggle button.
-
- * rendering/RenderMedia.cpp:
- (WebCore::RenderMedia::updateControls):
- Create closed caption toggle button in display order.
-
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderThemeMac::shouldRenderMediaControlPart):
- Don't require MediaControllerThemeQuickTime theme for captions toggle button.
- No need to check if the movie has video, a closed captions track is a video
- track.
-
-2009-11-20 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Running code in the Console that ends with a
- single line comment no longer produces a parse error.
-
- * inspector/front-end/InjectedScript.js:
- (InjectedScript._evaluateOn):
-
-2009-11-20 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Beth Dakin.
-
- WAI-ARIA: add support for 'math' role
- https://bugs.webkit.org/show_bug.cgi?id=31706
-
- * accessibility/AccessibilityObject.cpp:
- * accessibility/AccessibilityObject.h:
- * accessibility/mac/AccessibilityObjectWrapper.mm:
-
-2009-11-20 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- NPN_ReloadPlugins does not reload the page even if reloadPages is true.
- https://bugs.webkit.org/show_bug.cgi?id=30460
-
- Replace call to PluginDatabase::installedPlugins()->refresh() with Page::refreshPlugins().
- It already refreshes plugins and reloads pages when necessary.
-
- Tests: plugins/reloadplugins-and-pages.html
- plugins/reloadplugins-no-pages.html
-
- * plugins/PluginInfoStore.cpp:
- (WebCore::refreshPlugins):
-
-2009-11-20 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Dave Hyatt.
-
- <rdar://7409188> WebKit needs to be able to serialize and deserialize objects.
-
- Expose WebCore object serialization to WebKit.
-
- * WebCore.base.exp:
- * bindings/js/SerializedScriptValue.cpp:
- (WebCore::SerializedScriptValue::~SerializedScriptValue):
- (WebCore::SerializedScriptValue::create):
- (WebCore::SerializedScriptValue::deserialize):
- * bindings/js/SerializedScriptValue.h:
-
-2009-11-20 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Tim Hatcher.
-
- Fixes <http://webkit.org/b/31741>.
- Web Inspector: User Entered Data on the console should show up no matter what filters.
-
- Always show .console-user-command-result, no matter what the filter say
- we should do with the other classes.
-
- * inspector/front-end/inspector.css:
-
-2009-11-20 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Tim Hatcher.
-
- Fixes <http://webkit.org/b/31700>.
- Web Inspector: isMac should be in one central location + Cached.
-
- We should cache the value of isMac, and make the indexOf call in one
- single location, because we are calling it from multiple places, and saving
- the result can save us time, and make the call sites simpler.
-
- * inspector/front-end/AbstractTimelinePanel.js:
- (WebInspector.AbstractTimelinePanel.prototype._updateFilter):
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype._updateFilter):
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.prototype.handleKeyEvent):
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel):
- * inspector/front-end/SourceFrame.js:
- (WebInspector.SourceFrame.prototype._loaded):
- * inspector/front-end/inspector.js:
- (WebInspector.documentKeyDown):
- (WebInspector.isMac):
-
-2009-11-19 Joseph Pecoraro <joepeck@webkit.org>
-
- Removed .DS_Store accidentally added in last (r51245).
-
-2009-11-19 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Add Console Only Layout Mode
- https://bugs.webkit.org/show_bug.cgi?id=30282
-
- Adds a Console Panel, which allows for a Full size Console. This
- extends the Drawer to the size of a Panel. This also fixes previous
- resize issues with the Drawer.
-
- * inspector/front-end/ConsolePanel.js: added.
- (WebInspector.ConsolePanel):
- (WebInspector.ConsolePanel.prototype.toolbarItemClass.get toolbarItemLabel):
- (WebInspector.ConsolePanel.prototype.show):
- (WebInspector.ConsolePanel.prototype.hide):
- * inspector/front-end/Drawer.js:
- (WebInspector.Drawer):
- (WebInspector.Drawer.prototype.set visibleView):
- (WebInspector.Drawer.prototype.get savedHeight): access the saved height of the variable console.
- (WebInspector.Drawer.prototype.show.animationFinished):
- (WebInspector.Drawer.prototype.show):
- (WebInspector.Drawer.prototype.hide.animationFinished):
- (WebInspector.Drawer.prototype.hide):
- (WebInspector.Drawer.prototype.resize): resize appropriately if full/non-full
- (WebInspector.Drawer.prototype.enterPanelMode):
- (WebInspector.Drawer.prototype.exitPanelMode):
- (WebInspector.Drawer.prototype.immediatelyExitPanelMode):
- (WebInspector.Drawer.prototype._cancelAnimationIfNeeded):
- (WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished):
- (WebInspector.Drawer.prototype._animateDrawerHeight):
- (WebInspector.Drawer.prototype._animationDuration):
- (WebInspector.Drawer.prototype._startStatusBarDragging):
- (WebInspector.Drawer.prototype._statusBarDragging):
- (WebInspector.Drawer.prototype._endStatusBarDragging):
-
- Miscellaneous changes and cleanup.
-
- * English.lproj/localizedStrings.js: "Console" toolbar title.
- * inspector/front-end/ConsoleView.js: removed unnecessary element reordering
- * inspector/front-end/Images/consoleIcon.png: added.
- * inspector/front-end/inspector.css: added icon.
- * inspector/front-end/inspector.html:
- * inspector/front-end/inspector.js:
- (WebInspector._createPanels): create console panel
- (WebInspector.windowResize): resize drawer if necessary
- (WebInspector.documentKeyDown): esc should not toggle the console when in panel mode
- (WebInspector.animateStyle): start animation interval, returns the interval key
- (WebInspector.toggleAttach): resize drawer if necessary
- (WebInspector.showConsolePanel): restore the panel when the inspector restarts
- (WebInspector.showProfileForURL): style fix
-
- Restore the panel when the inspector restarts.
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::setWindowVisible):
- (WebCore::InspectorController::specialPanelForJSName):
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::showPanel):
-
- Build files.
-
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * inspector/front-end/WebKit.qrc:
-
-2009-11-20 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Tim Hatcher.
-
- Fixes <http://webkit.org/b/31699>.
- Web Inspector: Should Cache Values of InspectorController.platform() and port().
-
- Refactor the Inspector to cache the value of InspectorController.platform
- and InspectorController.port, because those need to call into C++, they are
- being called more and more as we add platform specific keyboard shortcuts, and
- they shouldn't change in the lifecycle of the Web Inspector.
-
- * inspector/front-end/AbstractTimelinePanel.js:
- (WebInspector.AbstractTimelinePanel.prototype._updateFilter):
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype._updateFilter):
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.prototype.handleKeyEvent):
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel):
- * inspector/front-end/SourceFrame.js:
- (WebInspector.SourceFrame.prototype._loaded):
- * inspector/front-end/inspector.js:
- (WebInspector.get platform):
- (WebInspector.get port):
- (WebInspector.loaded):
- (WebInspector.documentKeyDown):
- (WebInspector.toolbarDragStart):
-
-2009-11-20 Dirk Schulze <krit@webkit.org>
-
- Unreviewed build fix for filters enabled builds.
-
- * platform/graphics/filters/FEColorMatrix.cpp:
- (WebCore::FEColorMatrix::apply):
- * platform/graphics/filters/FEComposite.cpp:
- (WebCore::FEComposite::apply):
- * platform/graphics/filters/SourceGraphic.cpp:
- (WebCore::SourceGraphic::apply):
- * svg/graphics/SVGResourceFilter.cpp:
- (WebCore::SVGResourceFilter::applyFilter):
- * svg/graphics/filters/SVGFEMerge.cpp:
- (WebCore::FEMerge::apply):
- * svg/graphics/filters/SVGFEOffset.cpp:
- (WebCore::FEOffset::apply):
- * svg/graphics/filters/SVGFETile.cpp:
- (WebCore::FETile::apply):
-
-2009-11-20 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/7389945> QTKit based media engine should not claim to support
- fullscreen on Leopard
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::supportsFullscreen):
- Only return true on SnowLeopard for now.
-
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderThemeMac::shouldRenderMediaControlPart):
- No need to special case MediaFullscreenButtonPart as the default implementation
- asks the media engine if it supports fullscreen.
-
-2009-11-18 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Simon Hausmann.
-
- Patch by Yongjun Zhang <yongjun.zhang@nokia.com> and
- Girish Ramakrishnan <girish@forwardbias.in>
-
- [Qt] Implement support for rendering plugins on Qt/Mac when a page is used
- without a QWebView or when inside QGraphicsWebView.
-
- Currently, the code provides the cgcontext of the PlatformPluginWidget to
- the plugin. This approach does not work when we are printing, or using
- QWebFrame::render() to render to a QImage/QPixmap since the plugin ends
- up drawing on the QWebView (i.e platformPluginWidget's cgcontext) instead
- of the QPaintDevice's context.
-
- To solve all cases and keep the code simple, we render the plugin to an
- offscreen pixmap in all cases. This way, the plugin always renders to the
- CGContext of the pixmap and we then use QPainter to blit the pixmap into
- the QPaintDevice. We also create a fake window and set it's WindowRef in
- NPWindow. Only with this WindowRef does Flash paint correctly to the QPixmap.
-
- Now, that's the theory. In practice, ATM, mouse events do not work when using
- the fake window. So, setPlatformPluginWidget() is still called when using QWebView
- so that there are no regressions after this patch. Once we get mouse events
- working, setPlatformPluginWidget will be removed.
-
- https://bugs.webkit.org/show_bug.cgi?id=31183
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::PluginView):
- * plugins/PluginView.h:
- * plugins/mac/PluginViewMac.cpp:
- (WebCore::PluginView::platformStart):
- (WebCore::PluginView::platformDestroy):
- (WebCore::PluginView::setNPWindowIfNeeded):
- (WebCore::PluginView::updatePluginWidget):
- (WebCore::PluginView::paint):
- (WebCore::PluginView::invalidateRect):
-
-2009-11-19 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Resync Resources Backend and Frontend
- https://bugs.webkit.org/show_bug.cgi?id=31705
-
- * inspector/front-end/Resource.js: resync enum values with backend
- (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType): return false if all else fails, not true in all cases
-
-2009-11-19 Steve Block <steveblock@google.com>
-
- Reviewed by Darin Fisher.
-
- Android port lacks configuration in Platform.h and config.h.
- https://bugs.webkit.org/show_bug.cgi?id=31671
-
- Build change only. No new tests possible.
-
- * config.h: Modified. Added Android-specific configuration.
-
-2009-11-20 Roland Steiner <rolandsteiner@chromium.org>
-
- Reviewed by Darin Adler.
-
- Change default stylesheet to reset text indentation for ruby elements by default.
- (https://bugs.webkit.org/show_bug.cgi?id=31247)
-
- Test: fast/ruby/ruby-text-indent.html
-
- * css/html.css: reset text-indent on <ruby> and <rt> elements
-
-2009-11-19 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Darin Adler.
-
- Fixes <http://webkit.org/b/22754>.
- Web Inspector: Keyboard shortcut for Element finder.
-
- Use Command + Shift + C as a shortcut for Node Search, to
- match the Firebug shortcut to do the same thing.
-
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.prototype.handleKeyEvent):
-
-2009-11-19 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=31690
- Make SocketStreamHandleCFNet work on Windows
-
- * WebCore.vcproj/WebCore.vcproj: Added LoaderRunLoopCF.
-
- * platform/network/ResourceHandle.h: Removed loaderRunLoop().
-
- * platform/network/cf/LoaderRunLoopCF.cpp: Added.
- (WebCore::emptyPerform):
- (WebCore::runLoaderThread):
- (WebCore::loaderRunLoop):
- * platform/network/cf/LoaderRunLoopCF.h: Added.
- Moved the run loop that we use for CFNetwork from ResourceHandle to its own file, because
- it's needed for more than just resource loading.
-
- * platform/network/cf/ResourceHandleCFNet.cpp: Use loaderRunLoop() from its new location.
-
- * platform/network/cf/DNSCFNet.cpp: (WebCore::DNSResolveQueue::resolve): Ditto.
-
- * platform/network/cf/SocketStreamHandle.h: Added static callbacks for forwarding events to
- main thread.
- * platform/network/cf/SocketStreamHandleCFNet.cpp:
- (WebCore::SocketStreamHandle::SocketStreamHandle): Use loaderRunLoop() on Windows instead of
- inoperable main run loop.
-
- (WebCore::MainThreadEventCallbackInfo::MainThreadEventCallbackInfo):
- (WebCore::SocketStreamHandle::readStreamCallback):
- (WebCore::SocketStreamHandle::writeStreamCallback):
- (WebCore::SocketStreamHandle::readStreamCallbackMainThread):
- (WebCore::SocketStreamHandle::writeStreamCallbackMainThread):
- Forward stream events to main thread on Windows.
-
-2009-11-19 Avi Drissman <avi@chromium.org>
-
- Reviewed by Darin Adler.
-
- Quick style fix.
- https://bugs.webkit.org/show_bug.cgi?id=27777
-
- * platform/graphics/cg/PDFDocumentImage.cpp:
-
-2009-11-19 Beth Dakin <bdakin@apple.com>
-
- Build fix. No review needed.
-
- * platform/chromium/ScrollbarThemeChromium.cpp:
- (WebCore::ScrollbarThemeChromium::paintTickmarks):
- * rendering/RenderMediaControlsChromium.cpp:
- (WebCore::paintMediaButton):
-
-2009-11-19 Beth Dakin <bdakin@apple.com>
-
- Build fix. No review needed.
-
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::paintCheckbox):
- (WebCore::RenderThemeChromiumSkia::paintRadio):
- (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
- (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
- (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
-
-2009-11-19 Beth Dakin <bdakin@apple.com>
-
- Build fix. No review needed.
-
- * platform/graphics/qt/StillImageQt.cpp:
- (WebCore::StillImage::draw):
- * platform/graphics/qt/StillImageQt.h:
-
-2009-11-19 Beth Dakin <bdakin@apple.com>
-
- Build fix. No review needed.
-
- * rendering/RenderThemeWin.cpp:
- (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
- (WebCore::RenderThemeWin::paintSearchFieldResultsDecoration):
- (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
-
-2009-11-19 Beth Dakin <bdakin@apple.com>
-
- Build fix. No review needed.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::paintMissingPluginIcon):
-
-2009-11-19 Beth Dakin <bdakin@apple.com>
-
- Build fix. No review needed.
-
- * platform/graphics/win/ImageCGWin.cpp:
- (WebCore::BitmapImage::getHBITMAPOfSize):
- (WebCore::BitmapImage::drawFrameMatchingSourceSize):
-
-2009-11-19 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Darin Adler.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=31321 Make -webkit-
- color-correction work with untagged images
-
- Image's draw(), drawPattern(), and fillWithSolidColor() functions
- now take a ColorSpace. A bunch of classes inherit from Image, so
- draw() and drawPattern() functions there must also take a
- ColorSpace.
- * platform/graphics/Image.cpp:
- (WebCore::Image::fillWithSolidColor):
- (WebCore::Image::drawTiled):
- * platform/graphics/Image.h:
- * platform/graphics/BitmapImage.h:
- * platform/graphics/GeneratedImage.cpp:
- (WebCore::GeneratedImage::draw):
- (WebCore::GeneratedImage::drawPattern):
- * platform/graphics/GeneratedImage.h:
- * platform/graphics/cg/PDFDocumentImage.cpp:
- (WebCore::PDFDocumentImage::draw):
- * platform/graphics/cg/PDFDocumentImage.h:
- * svg/graphics/SVGImage.cpp:
- (WebCore::SVGImage::draw):
- * svg/graphics/SVGImage.h:
-
- All of the drawImage() functions and drawTiled() functions of
- GraphicsContext now take a ColorSpace.
- * platform/graphics/GraphicsContext.cpp:
- (WebCore::GraphicsContext::drawImage):
- (WebCore::GraphicsContext::drawTiledImage):
- * platform/graphics/GraphicsContext.h:
-
- This is where the actual work is done.
- * platform/graphics/cg/ImageCG.cpp:
- (WebCore::imageWithColorSpace): New static function that returns a
- copy of the given image in the given ColorSpace *IF* we should use
- the given ColorSpace. We will ignore the color space if the image
- is tagged and return 0.
- (WebCore::BitmapImage::draw): Now takes a ColorSpace and uses it to
- call imageWithColorSpace().
- (WebCore::Image::drawPattern): Same.
-
- Attempt to keep all ports building.
- * platform/graphics/cairo/ImageCairo.cpp:
- (WebCore::BitmapImage::draw):
- (WebCore::Image::drawPattern):
- * platform/graphics/haiku/ImageHaiku.cpp:
- (WebCore::BitmapImage::draw):
- (WebCore::Image::drawPattern):
- * platform/graphics/qt/ImageQt.cpp:
- (WebCore::Image::drawPattern):
- (WebCore::BitmapImage::draw):
- * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
- * platform/graphics/skia/ImageSkia.cpp:
- (WebCore::Image::drawPattern):
- (WebCore::BitmapImage::draw):
- (WebCore::BitmapImageSingleFrameSkia::draw):
- * platform/graphics/wx/ImageWx.cpp:
- (WebCore::BitmapImage::draw):
- (WebCore::BitmapImage::drawPattern):
-
- Callers of GraphicsContext's drawImage() and drawTiled() functions
- now need to send a ColorSpace.
- * html/HTMLCanvasElement.cpp:
- (WebCore::HTMLCanvasElement::paint):
- * html/canvas/CanvasRenderingContext2D.cpp:
- (WebCore::CanvasRenderingContext2D::drawImage):
- (WebCore::CanvasRenderingContext2D::drawImageFromRect):
- * platform/ScrollView.cpp:
- (WebCore::ScrollView::wheelEvent):
- * platform/graphics/filters/FEColorMatrix.cpp:
- (WebCore::FEColorMatrix::apply):
- * platform/graphics/filters/FEComposite.cpp:
- (WebCore::FEComposite::apply):
- * platform/graphics/filters/SourceGraphic.cpp:
- (WebCore::SourceGraphic::apply):
- * platform/mac/ScrollbarThemeMac.mm:
- (WebCore::ScrollbarThemeMac::paint):
- * rendering/RenderBoxModelObject.cpp:
- (WebCore::RenderBoxModelObject::paintFillLayerExtended):
- (WebCore::RenderBoxModelObject::paintNinePieceImage):
- * rendering/RenderImage.cpp:
- (WebCore::RenderImage::paintReplaced):
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::paintResizer):
- * rendering/RenderListMarker.cpp:
- (WebCore::RenderListMarker::paint):
- * rendering/RenderSVGImage.cpp:
- (WebCore::RenderSVGImage::paint):
- * rendering/RenderWidget.cpp:
- (WebCore::RenderWidget::paint):
- * svg/graphics/SVGPaintServerPattern.cpp:
- (WebCore::SVGPaintServerPattern::setup):
- * svg/graphics/SVGResourceFilter.cpp:
- (WebCore::SVGResourceFilter::applyFilter):
- * svg/graphics/filters/SVGFEMerge.cpp:
- (WebCore::FEMerge::apply):
- * svg/graphics/filters/SVGFEOffset.cpp:
- (WebCore::FEOffset::apply):
- * svg/graphics/filters/SVGFETile.cpp:
- (WebCore::FETile::apply):
-
-2009-11-19 Avi Drissman <avi@chromium.org>
-
- Reviewed by Darin Adler.
-
- Properly create a CGImageRef on non-PLATFORM(MAC).
- https://bugs.webkit.org/show_bug.cgi?id=27777
-
- * platform/graphics/cg/ImageSourceCG.cpp:
- (WebCore::sharedBufferGetBytesAtPosition):
- (WebCore::sharedBufferRelease):
- (WebCore::ImageSource::setData):
- * platform/graphics/cg/ImageSourceCG.h:
- * platform/graphics/cg/PDFDocumentImage.cpp:
- (WebCore::PDFDocumentImage::dataChanged):
-
-2009-11-19 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Dave Hyatt.
-
- -webkit-user-drag: element Drag images include overflow decorations from incorrect nodes
- https://bugs.webkit.org/show_bug.cgi?id=31656
-
- Make sure we're a child of the painting root before drawing overflow features.
-
- * manual-tests/user-drag-with-decorations.html: Added.
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::paint):
-
-2009-11-19 Dmitry Titov <dimich@chromium.org>
-
- Not reviewed, attempt to fix Chromium build.
-
- * rendering/RenderMediaControlsChromium.cpp:
- (WebCore::RenderMediaControlsChromium::paintMediaControlsPart): Add new enum values for Show/HideClosedCaptionButton to make it compile.
-
-2009-11-19 Rahul Kuchhal <kuchhal@chromium.org>
-
- Reviewed by Darin Adler.
-
- Do not assert when a high number is used for roman numerals in lists.
- https://bugs.webkit.org/show_bug.cgi?id=31652
-
- Test: fast/lists/ol-start-roman.html
-
- * rendering/RenderListMarker.cpp:
- (WebCore::toRoman): Increase the char array size.
-
-2009-11-19 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Rubber-stamped by Oliver Hunt.
-
- Add translatable strings to cover validationMessage, after
- r51172. Already covered by existing test.
-
- * platform/gtk/LocalizedStringsGtk.cpp:
- (WebCore::validationMessageValueMissingText):
- (WebCore::validationMessageTypeMismatchText):
- (WebCore::validationMessagePatternMismatchText):
- (WebCore::validationMessageTooLongText):
- (WebCore::validationMessageRangeUnderflowText):
- (WebCore::validationMessageRangeOverflowText):
- (WebCore::validationMessageStepMismatchText):
-
-2009-11-19 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Darin Adler.
-
- Remove HAVE(FLOAT_H) guard
- https://bugs.webkit.org/show_bug.cgi?id=31661
-
- WebCore has a dependency on float.h, there is
- no need to guard float.h.
-
- No new tests as there is no functional change.
-
- * html/HTMLInputElement.cpp: Remove include directive
- for float.h as it is included in MathExtras.h already.
-
-2009-11-19 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Pavel Feldman.
-
- Instrumentation should account for painting in compositing layers
- https://bugs.webkit.org/show_bug.cgi?id=31674
-
- Add calls to InspectorTimelineAgent for painting into compositing layers,
- which is not accounted for in FrameView::paintContents().
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::paintIntoLayer):
- Avoid fetching the FrameView multiple times.
-
- (WebCore::inspectorTimelineAgent):
- (WebCore::RenderLayerBacking::paintContents):
-
-2009-11-19 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Dan Bernstein.
-
- <rdar://problem/7035231>
- Support closed caption in <video> element
-
- Test: media/media-captions.html
-
- * WebCore.base.exp:
- * accessibility/AccessibilityMediaControls.cpp:
- (WebCore::AccessibilityMediaControl::controlTypeName):
- Define ShowClosedCaptionsButton and HideClosedCaptionsButton.
-
- * css/CSSPrimitiveValueMappings.h:
- (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
- Add MediaToggleClosedCaptionsButtonPart.
-
- * css/CSSSelector.cpp:
- (WebCore::CSSSelector::extractPseudoType):
- Define and match mediaControlsToggleClosedCaptionsButton.
-
- * css/CSSSelector.h:
- (WebCore::CSSSelector::):
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
- Define and match PseudoMediaControlsToggleClosedCaptions.
-
- * css/CSSValueKeywords.in:
- Define and use media-toggle-closed-captions-button.
-
- * css/mediaControls.css:
- * css/mediaControlsQuickTime.css:
- Add webkit-media-controls-toggle-closed-captions-button.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::HTMLMediaElement):
- Initialize m_closedCaptionsVisible.
- (WebCore::HTMLMediaElement::loadInternal):
- Set m_closedCaptionsVisible to false.
- (WebCore::HTMLMediaElement::hasClosedCaptions):
- (WebCore::HTMLMediaElement::closedCaptionsVisible):
- (WebCore::HTMLMediaElement::setClosedCaptionsVisible):
- New, captions internal methods.
- (WebCore::HTMLMediaElement::setWebkitClosedCaptionsVisible):
- (WebCore::HTMLMediaElement::webkitClosedCaptionsVisible):
- (WebCore::HTMLMediaElement::webkitHasClosedCaptions):
- New, captions DOM API.
-
- * html/HTMLMediaElement.h:
- * html/HTMLMediaElement.idl:
- Declare methods needed for captions API.
-
- * platform/ThemeTypes.h:
- Add MediaToggleClosedCaptionsButtonPart.
-
- * platform/android/LocalizedStringsAndroid.cpp:
- (WebCore::localizedMediaControlElementString):
- (WebCore::localizedMediaControlElementHelpText):
- (WebCore::localizedMediaTimeDescription):
- Add empty implmentations.
-
- * platform/graphics/MediaPlayer.cpp:
- (WebCore::NullMediaPlayerPrivate::hasClosedCaptions):
- (WebCore::NullMediaPlayerPrivate::setClosedCaptionsVisible):
- New, empty implementations of media engine closed caption functions.
- (WebCore::MediaPlayer::hasClosedCaptions):
- (WebCore::MediaPlayer::setClosedCaptionsVisible):
- New, call media engine closed caption functions.
-
- * platform/graphics/MediaPlayer.h:
- * platform/graphics/MediaPlayerPrivate.h:
- (WebCore::MediaPlayerPrivateInterface::hasClosedCaptions):
- (WebCore::MediaPlayerPrivateInterface::setClosedCaptionsVisible):
- Declare new media engine methods.
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::hasClosedCaptions):
- (WebCore::MediaPlayerPrivate::setClosedCaptionsVisible):
- New, QTKit implementation of closed caption methods.
-
- * platform/gtk/LocalizedStringsGtk.cpp:
- (WebCore::localizedMediaControlElementString):
- (WebCore::localizedMediaControlElementHelpText):
- Add help text for ShowClosedCaptionsButton and HideClosedCaptionsButton.
-
- * platform/mac/WebCoreSystemInterface.h:
- * platform/mac/WebCoreSystemInterface.mm:
- Declare and initialize wkQTMovieHasClosedCaptions and wkQTMovieSetShowClosedCaptions.
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlInputElement::MediaControlInputElement):
- Deal with MEDIA_CONTROLS_TOGGLE_CLOSED_CAPTIONS_BUTTON.
- (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
- (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
- (WebCore::MediaControlToggleClosedCaptionsButtonElement::updateDisplayType):
- New, implement the closed caption toggle button,
-
- * rendering/MediaControlElements.h:
- Define MediaShowClosedCaptionsButton and MediaHideClosedCaptionsButton,
- declare MediaControlToggleClosedCaptionsButtonElement.
-
- * rendering/RenderMedia.cpp:
- (WebCore::RenderMedia::styleDidChange):
- (WebCore::RenderMedia::createToggleClosedCaptionsButton):
- (WebCore::RenderMedia::createStatusDisplay):
- (WebCore::RenderMedia::updateControls):
- (WebCore::RenderMedia::forwardEvent):
- * rendering/RenderMedia.h:
- Deal with m_toggleClosedCaptionsButton.
-
- * rendering/RenderTheme.cpp:
- (WebCore::RenderTheme::paint):
- Deal with MediaToggleClosedCaptionsButtonPart.
-
- * rendering/RenderTheme.h:
- * rendering/RenderThemeMac.h:
- Declare paintMediaToggleClosedCaptionsButton.
-
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderThemeMac::paintMediaToggleClosedCaptionsButton):
- New.
- (WebCore::RenderThemeMac::shouldRenderMediaControlPart):
- Don't render captions toggle button unless we are using the new theme, the
- movie has captions, and the movie is in a <video> element since we currently
- rely on QTKit to render the captions.
-
- * rendering/style/RenderStyleConstants.h:
- Define MEDIA_CONTROLS_TOGGLE_CLOSED_CAPTIONS_BUTTON.
-
-2009-11-19 Kevin Ollivier <kevino@theolliviers.com>
-
- wx build fix. Add missing header.
-
- * platform/wx/LocalizedStringsWx.cpp:
-
-2009-11-19 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=31634
- Ignore realm for proxy protection spaces
-
- Only affects WebSocket proxy authentication, cannot be tested in DRT.
-
- * platform/network/ProtectionSpace.cpp:
- (WebCore::operator==):
- * platform/network/ProtectionSpaceHash.h:
- (WebCore::ProtectionSpaceHash::hash):
-
-2009-11-19 Olivier Goffart <ogoffart@trolltech.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Normalize signal and slot signatures.
-
- * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
- (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
-
-2009-11-19 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Store cookie domains in the WebInspector object
-
- The cookie domains have been moved from StoragePanel into WebInspector.
- Also, the document URLs are now passed inside the WebInspector.addResource()
- payload rather than pushed directly from InspectorController.
- https://bugs.webkit.org/show_bug.cgi?id=31627
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::populateScriptObjects):
- (WebCore::InspectorController::didFinishLoading):
- * inspector/InspectorFrontend.cpp:
- * inspector/InspectorFrontend.h:
- * inspector/InspectorResource.cpp:
- (WebCore::InspectorResource::createScriptObject):
- (WebCore::InspectorResource::updateScriptObject):
- * inspector/front-end/StoragePanel.js:
- (WebInspector.StoragePanel.prototype.reset):
- (WebInspector.StoragePanel.prototype.addCookieDomain):
- * inspector/front-end/inspector.js:
- (WebInspector.addResource):
- (WebInspector.addCookieDomain):
- (WebInspector.reset):
-
-2009-11-19 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for the other part of platform directory in WebCore
- https://bugs.webkit.org/show_bug.cgi?id=31585
-
- Inherits the following classes from FastAllocBase because these are
- instantiated by 'new':
-
- class RegularExpression - instantiated at: WebCore/page/Frame.cpp:415
- class TransformationMatrix - instantiated at: WebCore/rendering/TransformState.cpp:62
- class Path - instantiated at: WebCore/html/HTMLAreaElement.cpp:73
- class FontPlatformData - instantiated at: WebCore/platform/graphics/qt/FontCacheQt.cpp:188
-
- Inherits the following classes from Noncopyable because these are
- instantiated by 'new' and no need to be copyable:
-
- class Cursors - instantiated at: WebCore/platform/qt/CursorQt.cpp:146
- class NetworkStateNotifier - instantiated at: WebCore/platform/network/NetworkStateNotifier.cpp:37
- struct CrossThreadResourceRequestData - instantiated at: WebCore/platform/network/ResourceRequestBase.cpp:71
-
- class ImageDecoder - its child class is instantiated at: WebCore/platform/graphics/qt/ImageDecoderQt.cpp:46
- class MediaPlayerPrivateInterface - its child class is instantiated at: WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:119
-
- * platform/graphics/MediaPlayerPrivate.h:
- * platform/graphics/Path.h:
- * platform/graphics/qt/FontPlatformData.h:
- * platform/graphics/transforms/TransformationMatrix.h:
- * platform/image-decoders/ImageDecoder.h:
- * platform/network/NetworkStateNotifier.h:
- * platform/network/ResourceRequestBase.h:
- * platform/qt/CursorQt.cpp:
- * platform/text/RegularExpression.h:
-
-2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Unreviewed.
-
- [Qt] Build fix for QtWebKit after r51172.
-
- * platform/qt/Localizations.cpp:
- (WebCore::validationMessageValueMissingText):
- (WebCore::validationMessageTypeMismatchText):
- (WebCore::validationMessagePatternMismatchText):
- (WebCore::validationMessageTooLongText):
- (WebCore::validationMessageRangeUnderflowText):
- (WebCore::validationMessageRangeOverflowText):
- (WebCore::validationMessageStepMismatchText):
-
-2009-11-18 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Simon Fraser.
-
- Fixed <rdar://problem/7398987> Assertion failure in
- RenderLayer::updateClipRects when a plug-in’s enclosing layer is
- enclosed by a transformed layer
-
- Tests: fast/layers/clip-rects-transformed-2.html
- fast/layers/clip-rects-transformed.html
-
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::clippingRoot): Added. Finds the nearest ancestor
- that is either transformed or composited. During painting and hit
- testing, when a transformed or composited layer is hit, it becomes the
- new root layer, which ultimately gets passed to calculateRects().
- (WebCore::RenderLayer::childrenClipRect): Pass the clipping root as the
- root layer to calculateRects(), and return the bounding box of the
- transformed rectangle.
- (WebCore::RenderLayer::selfClipRect): Ditto.
- * rendering/RenderLayer.h:
-
-2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- [Qt] Remove support for Qt v4.3 or older versions
- https://bugs.webkit.org/show_bug.cgi?id=29469
-
- No new tests as there is no change if compiled with
- Qt v4.4 or later version.
-
- * WebCore.pro:
- * dom/XMLTokenizerQt.cpp:
- (WebCore::EntityResolver::resolveUndeclaredEntity):
- (WebCore::XMLTokenizer::XMLTokenizer):
- (WebCore::XMLTokenizer::~XMLTokenizer):
- (WebCore::XMLTokenizer::doWrite):
- (WebCore::XMLTokenizer::startDocument):
- (WebCore::XMLTokenizer::parseDtd):
- * platform/graphics/qt/FontQt.cpp:
- * platform/graphics/qt/FontQt43.cpp: Removed.
- * platform/graphics/qt/ImageQt.cpp:
- * platform/network/ResourceHandleInternal.h:
- * platform/network/qt/QNetworkReplyHandler.cpp:
- * platform/network/qt/QNetworkReplyHandler.h:
- * platform/network/qt/ResourceHandleQt.cpp:
- (WebCore::ResourceHandle::start):
- (WebCore::ResourceHandle::cancel):
- (WebCore::ResourceHandle::loadResourceSynchronously):
- (WebCore::ResourceHandle::setDefersLoading):
- * platform/network/qt/ResourceRequest.h:
- * platform/network/qt/ResourceRequestQt.cpp:
- * platform/qt/ClipboardQt.cpp:
- (WebCore::ClipboardQt::clearData):
- * platform/qt/CookieJarQt.cpp:
- (WebCore::cookieJar):
- (WebCore::setCookies):
- (WebCore::cookies):
- (WebCore::cookiesEnabled):
- * platform/qt/PlatformKeyboardEventQt.cpp:
- (WebCore::keyIdentifierForQtKeyCode):
- (WebCore::windowsKeyCodeForKeyEvent):
- * platform/text/qt/TextBoundaries.cpp:
- * platform/text/qt/TextBreakIteratorQt.cpp:
- * plugins/qt/PluginDataQt.cpp:
- (WebCore::PluginData::initPlugins):
-
-2009-11-18 Michelangelo De Simone <micdesim@gmail.com>
-
- Reviewed by Darin Adler.
-
- Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
- Support for validationMessage attribute, as per HTML5 specs.
-
- Test: fast/forms/validationMessage.html
-
- * html/HTMLButtonElement.idl: validationMessage attribute
- * html/HTMLFieldSetElement.idl: validationMessage attribute
- * html/HTMLFormControlElement.cpp:
- * html/HTMLFormControlElement.h:
- * html/HTMLInputElement.idl: validationMessage attribute
- * html/HTMLSelectElement.idl: validationMessage attribute
- * html/HTMLTextAreaElement.idl: validationMessage attribute
- * html/ValidityState.cpp: new method to retrieve pertinent localized text
- * html/ValidityState.h:
- * page/mac/WebCoreViewFactory.h:
- * platform/LocalizedStrings.h:
- * platform/android/LocalizedStringsAndroid.cpp:
- * platform/gtk/LocalizedStringsGtk.cpp:
- * platform/haiku/LocalizedStringsHaiku.cpp:
- * platform/mac/LocalizedStringsMac.mm:
- * platform/wx/LocalizedStringsWx.cpp:
-
-2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Unreviewed.
-
- Fix a typo. Remove the trailing semicolon
- from an include directive after r51137.
-
- No new tests as there is no functional change.
-
- * platform/qt/QWebPageClient.h:
-
-2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Unreviewed.
-
- [Qt] Build fix for QtWebKit after r51159.
-
- Include float.h for DBL_MANT_DIG. Not sure why this
- is not a problem for other ports.
-
- * html/HTMLInputElement.cpp:
-
-2009-11-19 Roland Steiner <rolandsteiner@chromium.org>
-
- Reviewed by Darin Adler.
-
- Bug 31574 - Crashing bug when removing <ruby> element
- (https://bugs.webkit.org/show_bug.cgi?id=31574)
-
- Cause of the bug:
- 1.) RenderBlock::destroy() of the RenderRubyRun called destroyLeftoverChildren()
- 2.) that called destroy() of the RenderRubyBase(), which in RenderObject::destroy() calls remove()
- 3.) remove() is being redirected as parent()->removeChild() in RenderObject.h
- 4.) this triggers the special handling of child removal in RenderRubyRun that
- causes it to destroy itself
- 5.) On returning from all this the renderer crashes when accessing a member
- or virtual function on this now illegal object.
-
- I therefore added a flag that tracks if the ruby run is being destroyed.
- If so, avoid doing the special handling in removeChild that caused this.
- It's not the most elegant solution, but the easiest to implement without
- touching unrelated code. Also, it's self-documenting.
-
- Test: fast/ruby/ruby-remove.html
-
- * rendering/RenderRubyRun.cpp:
- (WebCore::RenderRubyRun::RenderRubyRun):
- (WebCore::RenderRubyRun::destroy):
- (WebCore::RenderRubyRun::removeChild):
- * rendering/RenderRubyRun.h:
-
-2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- [Qt] Remove WTF_USE_JAVASCRIPTCORE_BINDINGS as it is no longer used
- https://bugs.webkit.org/show_bug.cgi?id=31643
-
- No new tests as there is no functional change.
-
- * WebCore.pro:
-
-2009-11-18 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Eric Seidel.
-
- Implement TextBoundaries for WINCE port.
- https://bugs.webkit.org/show_bug.cgi?id=27371
-
- * platform/text/wince/TextBoundariesWince.cpp: Added.
-
-2009-11-18 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Eric Seidel.
-
- Implement TextBreakIterator for WINCE port.
- https://bugs.webkit.org/show_bug.cgi?id=27371
-
- * platform/text/wince/TextBreakIteratorWince.cpp: Added.
-
-2009-11-18 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Darin Adler.
-
- Add support for ValidityState.typeMismatch for the following INPUT types:
- date datetime datetime-local month time week
- https://bugs.webkit.org/show_bug.cgi?id=31342
-
- Tests: fast/forms/ValidityState-typeMismatch-date.html
- fast/forms/ValidityState-typeMismatch-datetime.html
- fast/forms/ValidityState-typeMismatch-datetimelocal.html
- fast/forms/ValidityState-typeMismatch-month.html
- fast/forms/ValidityState-typeMismatch-time.html
- fast/forms/ValidityState-typeMismatch-week.html
-
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::formStringToISODateTime): Check the type
- validity of the specified type and string using the ISODateTime class.
- * html/HTMLInputElement.h:
- * html/ValidityState.cpp:
- (WebCore::ValidityState::typeMismatch): Check the type validity
- for date, datetime, datetime-local, month, time and week with
- HTMLInputElemtn::formStringToISODateTime()
-
-2009-11-18 Maciej Stachowiak <mjs@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Fix REGRESSION (r47022): Performance of DocumentFragment.appendChild is 1000x slower sometimes
- https://bugs.webkit.org/show_bug.cgi?id=31237
-
- Also speeds up Dromaeo DOM Core tests by 1.31x.
-
- * bindings/js/JSNodeCustom.cpp:
- (WebCore::JSNode::markChildren): Change marking algorithm to avoid O(N^2) behavior. The subtree
- mark bit was no longer effective; instead I changed things so only a node that has no ancestors
- with wrappers would do marking; there should be only one in the typical case (the root of the
- detached subtree).
- * dom/Node.cpp:
- (WebCore::Node::Node): Remove now useless m_inSubtreeMark bit and related functions.
- * dom/Node.h: ditto
-
-2009-11-18 Darin Adler <darin@apple.com>
-
- Reviewed by Sam Weinig.
-
- Get rid of the redundant strokeType and fillType data members on
- a GraphicsContext as well as the FillOrStrokeType enum. Use
- null pointers instead.
-
- * platform/graphics/GraphicsContext.cpp:
- (WebCore::GraphicsContext::setStrokeColor): Null out the pattern
- and gradient.
- (WebCore::GraphicsContext::setFillColor): Ditto.
- (WebCore::GraphicsContext::setStrokePattern): Null out the graident.
- (WebCore::GraphicsContext::setFillPattern): Ditto.
- (WebCore::GraphicsContext::setStrokeGradient): Null out the pattern.
- (WebCore::GraphicsContext::setFillGradient): Ditto.
-
- * platform/graphics/GraphicsContextPrivate.h: Remove all that stuff.
-
- * platform/graphics/cairo/GraphicsContextCairo.cpp:
- (WebCore::setPlatformFill): Use null checks on fillPattern and
- fillGraident instead of a switch statement.
- (WebCore::setPlatformStroke): Ditto.
-
- * platform/graphics/cg/GraphicsContextCG.cpp:
- (WebCore::GraphicsContext::applyStrokePattern): Removed unneeded get.
- (WebCore::GraphicsContext::applyFillPattern): Ditto.
- (WebCore::calculateDrawingMode): Use fillPattern and strokePattern
- to see if there is a pattern instead of fillType and strokeType.
- (WebCore::GraphicsContext::drawPath): Use fillGradient, strokeGradient,
- fillPattern, and strokePattern instead of fillType and strokeType.
- (WebCore::GraphicsContext::fillPath): Added FIXME about color space that
- is used in the pattern and gradient case probably erroneously. Moved
- gradient code inside an if statement. Streamlined pattern code and
- use an if statement. No switch any more.
- (WebCore::GraphicsContext::strokePath): Ditto.
- (WebCore::GraphicsContext::fillRect): Ditto.
- (WebCore::GraphicsContext::strokeRect): Ditto.
-
- * platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::GraphicsContext::fillPath): Use null checks on fillPattern and
- fillGraident instead of a switch statement.
- (WebCore::GraphicsContext::strokePath): Ditto.
- (WebCore::GraphicsContext::fillRect): Ditto.
-
- * platform/graphics/wince/GraphicsContextWince.cpp:
- (WebCore::GraphicsContext::fillPath): Removed unneeded check of fillType.
- (WebCore::GraphicsContext::fillRect): Ditto.
-
-2009-11-18 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Darin Adler.
-
- Support for step attribute and ValidityStae.stepMismatch for
- type=number and range. stepMismatch will be false if the
- difference between the current value and a multiple of the step
- value is very small.
-
- Change the behavior of RenderSlider so that it always has a value
- rounded to the step attribute value.
-
- https://bugs.webkit.org/show_bug.cgi?id=31331
-
- Tests: fast/forms/ValidityState-stepMismatch-number.html
- fast/forms/ValidityState-stepMismatch-range.html
- fast/forms/ValidityState-stepMismatch-unsupported.html
- fast/forms/input-step.html
-
- * html/HTMLAttributeNames.in: Add "step".
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::stepMismatch):
- (WebCore::HTMLInputElement::getStepParameters):
- (WebCore::HTMLInputElement::getAllowedValueStep):
- * html/HTMLInputElement.h:
- * html/HTMLInputElement.idl: Add "step".
- * html/ValidityState.cpp:
- (WebCore::ValidityState::stepMismatch): Forward to HTMLInputElement::stepMismatch().
- * html/ValidityState.h:
- * rendering/RenderSlider.cpp:
- (WebCore::SliderRange::SliderRange):
- (WebCore::SliderRange::clampValue):
-
-2009-11-18 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by Darin Adler.
-
- Need to ASSERT(isMainThread()) in ThreadShared methods.
- https://bugs.webkit.org/show_bug.cgi?id=31637
-
- Added ASSERT(IsMainThread()) to all following methods:
- * platform/TreeShared.h:
- (WebCore::TreeShared::TreeShared):
- (WebCore::TreeShared::~TreeShared):
- (WebCore::TreeShared::ref):
- (WebCore::TreeShared::deref):
- (WebCore::TreeShared::setParent):
- (WebCore::TreeShared::parent):
-
-2009-11-18 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Eric Seidel.
-
- Add plugin visibility manual test
-
- https://bugs.webkit.org/show_bug.cgi?id=31542
-
- * manual-tests/plugins/windowed.html:
- * manual-tests/plugins/windowless.html:
-
-2009-11-18 Patrick Mueller <Patrick_Mueller@us.ibm.com>
-
- Reviewed by Pavel Feldman.
-
- Web Inspector - remember last script displayed in Scripts panel
- https://bugs.webkit.org/show_bug.cgi?id=27552
-
- Manual test added
-
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel.prototype.showScript):
- (WebInspector.ScriptsPanel.prototype.showResource):
- (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
- (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu):
- (WebInspector.ScriptsPanel.prototype._callFrameSelected):
- (WebInspector.ScriptsPanel.prototype._goBack):
- (WebInspector.ScriptsPanel.prototype._goForward):
- * manual-tests/inspector/remember-last-script.html: Added.
-
-2009-11-18 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Win chromium is slow to draw transparent texts
- https://bugs.webkit.org/show_bug.cgi?id=31258
-
- Create bounded transparency layers instead of just clipping.
-
- No new tests because this is just a performance improvement.
-
- * platform/graphics/chromium/FontChromiumWin.cpp:
- (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
-
-2009-11-18 Shu Chang <Chang.Shu@nokia.com>
-
- Reviewed by Eric Seidel.
-
- [Qt] Add support for displaying deleteButton.
- https://bugs.webkit.org/show_bug.cgi?id=31560
-
- Test: LayoutTests/editing/deleting/5408255.html
-
- * WebCore.qrc:
- * platform/graphics/qt/ImageQt.cpp:
- (loadResourcePixmap):
-
-2009-11-18 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Fix Qt build without JavaScript debugger.
-
- https://bugs.webkit.org/show_bug.cgi?id=31575
-
- * page/Console.idl:
-
-2009-11-18 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Dave Hyatt.
-
- https://bugs.webkit.org/show_bug.cgi?id=24971
- And
- <rdar://problem/7138265>
-
- Fixes an issue where setting the height of a table row programmatically
- (via JavaScript) causes the table to be improperly rendered because the
- height of each row in the table is not recalculated with respect to the
- CSS height property.
-
- In particular, programmatically setting the height of some table row causes
- the rows of that table to be rendered with a height equal to the minimum
- height required by the cells in that row, regardless of any specified cell
- heights. Instead, when RenderTableSection::recalcCells is called, the height
- of each row should be set to the CSS height property just as we do in
- RenderTableSection::addChild.
-
- Test: fast/table/row-height-recalc2.html
-
- * rendering/RenderTableSection.cpp:
- (WebCore::setRowHeightToRowStyleHeightIfNotRelative): Added.
- (WebCore::RenderTableSection::addChild): Moved code that set row height into
- method WebCore::setRowHeightToRowStyleHeightIfNotRelative.
- (WebCore::RenderTableSection::recalcCells): Modified to call
- WebCore::setRowHeightToRowStyleHeightIfNotRelative.
-
-2009-11-18 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for the part of platform directory in WebCore
- https://bugs.webkit.org/show_bug.cgi?id=31473
-
- Inherits the following classes from FastAllocBase because these are
- instantiated by 'new':
-
- class AnimationList - instantiated at WebCore/rendering/style/StyleRareNonInheritedData.cpp:85
- class Color - instantiated at WebCore/rendering/RenderTheme.cpp:48
- struct Length - instantiated at WebCore/platform/Length.cpp:103
- class PlatformKeyboardEvent - instantiated at WebCore/dom/KeyboardEvent.cpp:63
- class ContextMenuItem - instantiated at WebCore/platform/ContextMenu.cpp:70
- class DeprecatedPtrList - instantiated at WebCore/rendering/RenderBlock.cpp:2284
-
- Inherits the following classes from Noncopyable because these are
- instantiated by 'new' and no need to be copyable:
-
- class GraphicsContextPrivate - instantiated at WebCore/platform/graphics/GraphicsContext.cpp:78
- class FontCache - instantiated at WebCore/platform/graphics/qt/FontCacheQt.cpp:43
- struct MediaPlayerFactory - instantiated at WebCore/platform/graphics/MediaPlayer.cpp:163
- class DeprecatedPtrListNode - instantiated at WebCore/platform/DeprecatedPtrListImpl.cpp:53
-
- * platform/ContextMenuItem.h:
- * platform/DeprecatedPtrList.h:
- * platform/DeprecatedPtrListImpl.cpp:
- * platform/Length.h:
- * platform/PlatformKeyboardEvent.h:
- * platform/animation/AnimationList.h:
- * platform/graphics/Color.h:
- * platform/graphics/FontCache.h:
- * platform/graphics/GraphicsContextPrivate.h:
- * platform/graphics/MediaPlayer.cpp:
-
-2009-11-18 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=31186
-
- Renames RenderTextControl::m_edited and RenderTextControl::m_userEdited to
- m_wasChangedSinceLastChangeEvent and m_lastChangeWasUserEdit, respectively.
- These are more descriptive names so as to clear an ambiguity surrounding
- their usage. Also, renames associated setters and getters so that they
- coincide with the renamed fields.
-
- No functionality was changed. So, no tests were included.
-
- * bindings/objc/DOMHTML.mm:
- (-[DOMHTMLInputElement _isEdited]):
- (-[DOMHTMLTextAreaElement _isEdited]):
- * dom/Document.cpp:
- (WebCore::Document::setFocusedNode):
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::defaultEventHandler):
- * rendering/RenderTextControl.cpp:
- (WebCore::RenderTextControl::RenderTextControl):
- (WebCore::RenderTextControl::setInnerTextValue):
- (WebCore::RenderTextControl::setLastChangeWasUserEdit): Formerly named setUserEdited.
- (WebCore::RenderTextControl::subtreeHasChanged):
- * rendering/RenderTextControl.h:
- (WebCore::RenderTextControl::wasChangedSinceLastChangeEvent): Formerly named isEdited.
- (WebCore::RenderTextControl::setChangedSinceLastChangeEvent): Formerly named setEdited.
- (WebCore::RenderTextControl::lastChangeWasUserEdit): Formerly named setUserEdited.
- * rendering/RenderTextControlSingleLine.cpp:
- (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
- * wml/WMLInputElement.cpp:
- (WebCore::WMLInputElement::defaultEventHandler):
-
-2009-11-18 Tony Chang <tony@chromium.org>
-
- Reviewed by Adam Barth.
-
- Remove V8CanvasPixelArrayCustom.cpp because it is no longer used by V8.
- https://bugs.webkit.org/show_bug.cgi?id=31499
-
- No new tests, just a build cleanup.
-
- * WebCore.gypi:
- * bindings/v8/custom/V8CanvasPixelArrayCustom.cpp: Removed.
- * bindings/v8/custom/V8CustomBinding.h:
-
-2009-11-18 Kevin Watters <kevinwatters@gmail.com>
-
- Reviewed by Kevin Ollivier.
-
- Enable wx plugin support using the Windows implementation as a base.
-
- https://bugs.webkit.org/show_bug.cgi?id=31636
-
- * platform/graphics/GraphicsContext.h:
- (WebCore::GraphicsContext::inTransparencyLayer):
- * platform/graphics/wx/GraphicsContextWx.cpp:
- (WebCore::GraphicsContext::getWindowsContext):
- (WebCore::GraphicsContext::releaseWindowsContext):
- * platform/wx/FileSystemWx.cpp:
- (WebCore::unloadModule):
- (WebCore::listDirectory):
- * plugins/PluginDatabase.cpp:
- * plugins/PluginView.cpp:
- (WebCore::PluginView::stop):
- (WebCore::PluginView::PluginView):
- * plugins/PluginView.h:
- * plugins/win/PluginViewWin.cpp:
- (windowHandleForPageClient):
- (WebCore::PluginView::handleMouseEvent):
- (WebCore::PluginView::platformStart):
- (WebCore::PluginView::snapshot):
- * wscript:
-
-2009-11-18 Andrei Popescu <andreip@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- [Android] Add shared timer and sound utilities to platform/android
- https://bugs.webkit.org/show_bug.cgi?id=31584
-
- No new tests required, this is platform specific code.
-
- * platform/android/SharedTimerAndroid.cpp: Added.
- (WebCore::setSharedTimerFiredFunction):
- (WebCore::setSharedTimerFireTime):
- (WebCore::stopSharedTimer):
- * platform/android/SoundAndroid.cpp: Added.
- (WebCore::systemBeep):
-
-2009-11-18 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Fix profile tree nodes loss after focus / restore actions.
-
- Focusing on a node is currently implemented via nodes reattaching
- with some caching involved. It seems that not all code was updated
- to handle this scenario correctly.
-
- https://bugs.webkit.org/show_bug.cgi?id=31553
-
- * inspector/front-end/BottomUpProfileDataGridTree.js:
- (WebInspector.BottomUpProfileDataGridNode):
- (WebInspector.BottomUpProfileDataGridNode.prototype._restore):
- (WebInspector.BottomUpProfileDataGridNode.prototype._sharedPopulate):
- (WebInspector.BottomUpProfileDataGridNode.prototype._willHaveChildren):
- * inspector/front-end/DataGrid.js:
- (WebInspector.DataGrid.prototype.insertChild):
- (WebInspector.DataGridNode.prototype._detach):
- (WebInspector.DataGridNode.prototype.savePosition):
- (WebInspector.DataGridNode.prototype.restorePosition):
- * inspector/front-end/TopDownProfileDataGridTree.js:
- (WebInspector.TopDownProfileDataGridTree.prototype.focus):
- (WebInspector.TopDownProfileDataGridTree.prototype.restore):
-
-2009-11-18 Carol Szabo <carol.szabo@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- [Qt] QWebPageClient.h needs in some cases QCursor, but it does not
- include it
- https://bugs.webkit.org/show_bug.cgi?id=31527
-
- No new tests as this is just a coding style fix that affects the
- build of some not yet submitted patches (i.e. for bug 30173).
-
- * platform/qt/QWebPageClient.h:
-
-2009-11-18 Nicolas Roard <nicolas@roard.com>
-
- Reviewed by Dimitri Glazkov.
-
- InspectorTimelineAgent.h should be guarded by ENABLE(INSPECTOR)
- https://bugs.webkit.org/show_bug.cgi?id=31504
-
- * inspector/InspectorTimelineAgent.h:Added the guard.
-
-2009-11-18 Jens Alfke <snej@chromium.org>
-
- Build fix to my previous checkin, for Windows Chromium
-
- * svg/SVGAnimatedProperty.h:
- (WebCore::PropertySynchronizer::synchronize): Fix implicit-conversion error on AtomicString.
-
-2009-11-18 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Pavel Feldman.
-
- Web Inspector: Directly Access <head> Instead of Searching for It
- https://bugs.webkit.org/show_bug.cgi?id=31641
-
- Changed old access of the head element (document.getElementsByTagName)
- to just use the document.head accessor.
-
- * inspector/front-end/FontView.js:
- (WebInspector.FontView):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.addStyleSelector):
- * inspector/front-end/SourceFrame.js:
- (WebInspector.SourceFrame.prototype._loaded):
- * inspector/front-end/inspector.js:
- (windowLoaded):
-
-2009-11-18 Sam Weinig <sam@webkit.org>
-
- Reviewed by Anders Carlsson.
-
- Fix two Geolocation assertions.
-
- * page/Chrome.cpp:
- (WebCore::Chrome::requestGeolocationPermissionForFrame): No need to use PageGroupLoadDeferrer since this
- is not called from JS.
- * page/Geolocation.cpp:
- (WebCore::Geolocation::Watchers::set): The PassRefPtr was getting nulled out, so we need to put it in
- a RefPtr first.
-
-2009-11-18 Alexey Proskuryakov <ap@apple.com>
-
- Case sensitive file system build fix.
-
- * platform/network/Credential.h: It's not WTF, just wtf.
-
-2009-11-18 Aaron Golden <agolden@apple.com>
-
- Reviewed by Alexey Proskuryakov.
-
- Add support for certificates to WebCore::Credential so we can convert between NSURLCredential
- objects and WebCore::Credential objects without losing certificate information.
-
- * platform/network/Credential.cpp:
- (WebCore::Credential::Credential): Adding a constructor that takes an identity argument and a certificate chain argument
- (WebCore::Credential::isEmpty): Modifying isEmpty to support certificate based credentials (which don't have a username or password)
- (WebCore::Credential::identity): Accessor for the m_identity property
- (WebCore::Credential::certificates): Accessor for the m_certificates property
- (WebCore::Credential::type): Accessor for the m_type property
- (WebCore::operator==): Modifying == to compare the identity and certificate chains of certificate based credentials.
- * platform/network/Credential.h: Adding new fields to WebCore::Credential to support certificate based credentials.
- * platform/network/mac/AuthenticationMac.mm:
- (WebCore::mac): Modifying the mac() conversion method to correctly convert certificate based WebCore::Credential objects.
- (WebCore::core): Modifying the core() conversion method to correctly convert certificate based NSURLCredential objects.
-
-2009-11-18 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Reverting r50919 that has introduced a non-thread-safe refcounting in ScriptExecutionContext::postTaskToMainThread.
- https://bugs.webkit.org/show_bug.cgi?id=31615
-
- * dom/Document.cpp:
- (WebCore::ScriptExecutionContextTaskTimer::ScriptExecutionContextTaskTimer):
- (WebCore::ScriptExecutionContextTaskTimer::fired):
- (WebCore::PerformTaskContext::PerformTaskContext):
- (WebCore::performTask):
- (WebCore::Document::postTask):
- * dom/ScriptExecutionContext.cpp:
- * dom/ScriptExecutionContext.h:
-
-2009-11-18 Jens Alfke <snej@chromium.org>
-
- Reviewed by Darin Adler.
-
- Eliminate unnecessary String-->AtomicString conversions from generated V8 bindings,
- by causing the right v8-to-WebCore conversion function to be called for every parameter.
- This no longer requires any IDL metadata, so I've removed the [HintAtomic] annotations.
- To enforce correctness, I added a mode that disables implicit
- String-->AtomicString conversions while compiling the generated bindings.
- https://bugs.webkit.org/show_bug.cgi?id=31168
-
- * bindings/scripts/CodeGeneratorV8.pm: Generate usage of V8Parameter class.
- * bindings/v8/DerivedSourcesAllInOne.cpp: Enable NO_IMPLICIT_ATOMICSTRING.
- * bindings/v8/V8Binding.h: Add V8Parameter class.
- * css/WebKitCSSKeyframesRule.h: Make AtomicString conversions explicit.
- * dom/Document.idl: Remove obsolete [HintAtomic] annotation.
- * platform/text/AtomicString.h: Added NO_IMPLICIT_ATOMICSTRING option.
- * svg/SVGAnimatedTemplate.h: Change some return types to String to avoid implicit conversion.
- * svg/SVGAnimatedProperty.h: Adapt to changed return types in SVGAnimatedTemplate.
-
-2009-11-18 Darin Adler <darin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Move FillOrStrokeType out of public header.
-
- * platform/graphics/GraphicsContext.h: Updated copyright date to cover
- some years we published Apple changes, sorted forward declarations,
- removed FillOrStrokeType enum.
- * platform/graphics/GraphicsContextPrivate.h: Updated copyright date
- to cover some years we published Apple changes, sorted includes,
- moved FillOrStrokeType enum here.
-
-2009-11-18 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser.
-
- Add Settings for WebKitShowDebugBorders and WebKitShowRepaintCounter
- https://bugs.webkit.org/show_bug.cgi?id=31601
-
- These are used to debug accelerated compositing layers. I removed
- the platform specific code from GraphicsLayerCA.mm and added calls
- to GraphicsLayerClient to get it from the higher levels. The values
- now get cached in RenderLayerCompositing and are queried from there
- by RenderLayerBacking (which implements the GraphicsLayerClient interface).
-
- * WebCore.base.exp:
- * page/FrameView.cpp:
- (WebCore::FrameView::updateCompositingLayers):
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
- (WebCore::Settings::setShowDebugBorders):
- (WebCore::Settings::setShowRepaintCounter):
- * page/Settings.h:
- (WebCore::Settings::showDebugBorders):
- (WebCore::Settings::showRepaintCounter):
- * platform/graphics/GraphicsLayer.h:
- (WebCore::GraphicsLayer::showDebugBorders):
- (WebCore::GraphicsLayer::showRepaintCounter):
- * platform/graphics/GraphicsLayerClient.h:
- * platform/graphics/mac/GraphicsLayerCA.mm:
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::showDebugBorders):
- (WebCore::RenderLayerBacking::showRepaintCounter):
- * rendering/RenderLayerBacking.h:
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::RenderLayerCompositor):
- (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
- * rendering/RenderLayerCompositor.h:
- (WebCore::RenderLayerCompositor::showDebugBorders):
- (WebCore::RenderLayerCompositor::showRepaintCounter):
-
-2009-11-18 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Get rid of metrics and properties sidebars'
- flickering.
-
- https://bugs.webkit.org/show_bug.cgi?id=31629
-
- * inspector/front-end/MetricsSidebarPane.js:
- * inspector/front-end/PropertiesSidebarPane.js:
-
-2009-11-17 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Pavel Feldman.
-
- Fixes <http://webkit.org/b/31606>.
- Web Inspector: Enter/Return key should enter edit mode for Editable Fields.
-
- This implements Enter starting editing mode in an editable DataGrid. If the
- DataGrid is editable and the user hits return, startEditing the first child
- of the selected node. Also refactored some editing functions to take an
- event target instead of the event itself, because the functions only needed
- the target. Lastly, added had return in editing mode stop propogation, because
- when enter was hit to confirm text, it would propagate back to the datagrid
- and try to start editing again.
-
- * inspector/front-end/DataGrid.js:
- (WebInspector.DataGrid.prototype._ondblclick):
- (WebInspector.DataGrid.prototype._startEditing):
- (WebInspector.DataGrid.prototype.handleKeyEvent):
- (WebInspector.DataGrid.prototype.dataGridNodeFromEvent):
- (WebInspector.DataGrid.prototype._mouseDownInDataTable):
- (WebInspector.DataGrid.prototype._clickInDataTable):
- * inspector/front-end/inspector.js:
- (WebInspector.startEditing.element.handleKeyEvent):
- (WebInspector.startEditing):
-
-2009-11-18 Ben Murdoch <benm@google.com>
-
- Reviewed by Darin Adler.
-
- HTMLAnchorElement is inconsistent with its internal handling of the value returned for the href attribute.
- https://bugs.webkit.org/show_bug.cgi?id=31593
-
- Test: fast/dom/HTMLAnchorElement/set-href-attribute-whitespace.html
-
- * html/HTMLAnchorElement.cpp:
- (WebCore::HTMLAnchorElement::href): Add call to deprecatedParseURL.
-
-2009-11-18 Pavel Feldman <pfeldman@chromium.org>
-
- Not reviewed. Touch InspectorController so that frontend
- JS files are deployed on Windows.
-
- * inspector/InspectorController.cpp:
-
-2009-11-18 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: clone timeline records array instead of
- copying reference on invalidate all.
-
- https://bugs.webkit.org/show_bug.cgi?id=31596
-
- * inspector/front-end/AbstractTimelinePanel.js:
- (WebInspector.AbstractTimelinePanel.prototype.invalidateAllItems):
-
-2009-11-18 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Elements don't drop out of compositing layers when animation ends
- https://bugs.webkit.org/show_bug.cgi?id=31613
- <rdar://problem/7402913>
-
- Avoid setting the mustOverlapCompositedLayers flag on RenderLayers which
- are compositing anyway for other reasons. Doing so can cause those layers
- to stay in compositing mode even after animations finish, because needsToBeComposited()
- continues to return true.
-
- No new tests because it's not possible to determine which elements are in
- compositing layers from DRT output.
-
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::computeCompositingRequirements):
-
-2009-11-18 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] Mac Plugins: Remove null timer
-
- A null timer was used to send mouse move events. Instead, we now use
- move events to send nullEvent. This brings down CPU usage by 20-30%.
-
- https://bugs.webkit.org/show_bug.cgi?id=31624
-
- * plugins/PluginView.h:
- * plugins/mac/PluginViewMac.cpp:
- (WebCore::PluginView::platformStart):
- (WebCore::PluginView::handleMouseEvent):
-
-2009-11-18 Benjamin Poulain <benjamin.poulain@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] WebKit crashes when loading certain SVG images
-
- Check if the familly exist before creating the PlatformData from it.
-
- https://bugs.webkit.org/show_bug.cgi?id=29443
-
- Test: svg/text/text-font-invalid.html
-
- * platform/graphics/qt/FontFallbackListQt.cpp:
- (WebCore::FontFallbackList::fontDataAt):
-
-2009-11-17 Nicolas Weber <thakis@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Fix crash in Chromium/Mac where dropdowns weren't dismissed correctly
- after navigation.
- https://bugs.webkit.org/show_bug.cgi?id=31609
-
- * platform/chromium/PopupMenuChromium.cpp:
- (WebCore::PopupContainer::showExternal): Set parent for external
- dropdowns, so that |PopupListBox::hidePopup()| can successfully notify
- its parent's client.
-
-2009-11-17 Hayato Ito <hayato@google.com>
-
- Reviewed by Darin Adler.
-
- Avoid infinite mutual recursion when deeply nested tags are loaded
- https://bugs.webkit.org/show_bug.cgi?id=30651
-
- Test: fast/parser/block-nesting-cap-table.html
-
- * html/HTMLParser.cpp:
- (WebCore::HTMLParser::parseToken):
- (WebCore::tagPriorityOfNode):
- (WebCore::HTMLParser::limitBlockDepth):
- (WebCore::HTMLParser::insertNodeAfterLimitBlockDepth):
- (WebCore::HTMLParser::insertNode):
- * html/HTMLParser.h:
-
-2009-11-17 Brent Fulgham <bfulgham@webkit.org>
-
- Rubber-stamped by Alexey Proskuryakov.
-
- Final clean-ups for minor coding standard violations.
- https://bugs.webkit.org/show_bug.cgi?id=26102.
-
- * platform/graphics/cairo/GraphicsContextCairo.cpp:
-
-2009-11-17 Johnny Ding <jnd@chromium.org>
-
- Reviewed by Darin Adler.
-
- In all valid script tags for JavaScript, the event handler in <script...for> should not get executed.
- https://bugs.webkit.org/show_bug.cgi?id=31567
-
- * dom/ScriptElement.cpp:
- (WebCore::ScriptElementData::shouldExecuteAsJavaScript):
-
-2009-11-17 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Make DRT show web inspector for tests in inspector/ folder.
- - Updated DRT to show/close inspector for all tests under /inspector
- - Introduced LayoutTestController::setTimelineProfilingEnabled and
- WebInspector::setTimelineProfilingEnabled beside setJavaScriptProfilingEnabled
- - Removed reload on each inspector test
- - Renamed fast/inspector to fast/inspector-support in order not to trigger
- inspector for those.
- - Reimplemented timeline tests in order to get rid of reload there.
- - Moved tests that don't require harness into the fast group.
-
- https://bugs.webkit.org/show_bug.cgi?id=31472
-
- * WebCore.Inspector.exp:
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel.prototype._formatRecord):
-
-2009-11-17 Andrei Popescu <andreip@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- [Android] Android is missing the implementation of the GeolocationService iface.
- https://bugs.webkit.org/show_bug.cgi?id=31554
-
- No new tests required as this is platform specific code.
-
- * platform/android/GeolocationServiceAndroid.cpp: Added.
- (WebCore::GeolocationServiceAndroid::create):
- (WebCore::GeolocationServiceAndroid::GeolocationServiceAndroid):
- (WebCore::GeolocationServiceAndroid::startUpdating):
- (WebCore::GeolocationServiceAndroid::stopUpdating):
- (WebCore::GeolocationServiceAndroid::suspend):
- (WebCore::GeolocationServiceAndroid::resume):
- (WebCore::GeolocationServiceAndroid::newPositionAvailable):
- (WebCore::GeolocationServiceAndroid::newErrorAvailable):
- (WebCore::GeolocationServiceAndroid::timerFired):
- (WebCore::GeolocationServiceAndroid::isPositionMovement):
- (WebCore::GeolocationServiceAndroid::isPositionMoreAccurate):
- (WebCore::GeolocationServiceAndroid::isPositionMoreTimely):
- * platform/android/GeolocationServiceAndroid.h: Added.
- (WebCore::GeolocationServiceAndroid::~GeolocationServiceAndroid):
- (WebCore::GeolocationServiceAndroid::lastPosition):
- (WebCore::GeolocationServiceAndroid::lastError):
- * platform/android/GeolocationServiceBridge.cpp: Added.
- (WebCore::):
- (WebCore::GeolocationServiceBridge::GeolocationServiceBridge):
- (WebCore::GeolocationServiceBridge::~GeolocationServiceBridge):
- (WebCore::GeolocationServiceBridge::start):
- (WebCore::GeolocationServiceBridge::stop):
- (WebCore::GeolocationServiceBridge::setEnableGps):
- (WebCore::GeolocationServiceBridge::newLocationAvailable):
- (WebCore::GeolocationServiceBridge::newErrorAvailable):
- (WebCore::GeolocationServiceBridge::toGeoposition):
- (WebCore::GeolocationServiceBridge::startJavaImplementation):
- (WebCore::GeolocationServiceBridge::stopJavaImplementation):
- * platform/android/GeolocationServiceBridge.h: Added.
-
-2009-11-16 Kent Tamura <tkent@chromium.org>
-
- Unreviewd build fix.
-
- - Fix typo in WebCore.vcproj.
- - Intlude limits.h for INT_MAX.
- - Enclose with parenthesis to suspress warning.
-
- * WebCore.vcproj/WebCore.vcproj:
- * html/ISODateTime.cpp:
- (WebCore::ISODateTime::addDay):
-
-2009-11-16 Robin Dunn <robin@alldunn.com>
-
- Reviewed by Kevin Ollivier.
-
- Make sure wx scrollbar drawing code factors in transforms when switching backends,
- fix calcs for scrollbar length, and tweak the Mac scrollbar tracking rects.
-
- https://bugs.webkit.org/show_bug.cgi?id=31570
-
- * platform/wx/ScrollbarThemeWx.cpp:
- (WebCore::ScrollbarThemeWx::minimumThumbLength):
- (WebCore::ScrollbarThemeWx::splitTrack):
- (WebCore::ScrollbarThemeWx::forwardButtonRect):
- * platform/wx/ScrollbarThemeWx.h:
- * platform/wx/wxcode/gtk/scrollbar_render.cpp:
- (wxRenderer_DrawScrollbar):
- * platform/wx/wxcode/scrollbar_render.h:
- (calcThumbStartAndLength):
- * platform/wx/wxcode/win/scrollbar_render.cpp:
- (wxRenderer_DrawScrollbar):
-
-2009-11-16 Kent Tamura <tkent@chromium.org>
-
- Reviewed by David Levin.
-
- Introduce WebCore::ISODateTime class.
- https://bugs.webkit.org/show_bug.cgi?id=31340
-
- This class represents a value of date/time types of the HTML5 INPUT
- element, and has some parsing methods for ISO 8601.
-
- This change has no tests because the class is not used yet.
-
- * GNUmakefile.am: Add ISODateTime.cpp and ISODateTime.h.
- * WebCore.gypi: ditto.
- * WebCore.pro: ditto.
- * WebCore.vcproj/WebCore.vcproj: ditto.
- * WebCore.xcodeproj/project.pbxproj: ditto.
- * WebCoreSources.bkl: ditto.
- * html/ISODateTime.cpp: Added. Implementation of WebCore::ISODateTime class.
- (WebCore::isLeapYear):
- (WebCore::maxDayOfMonth):
- (WebCore::dayOfWeek):
- (WebCore::ISODateTime::maxWeekNumberInYear):
- (WebCore::countDigits):
- (WebCore::toInt):
- (WebCore::ISODateTime::parseYear): Private helper for parseDate() and parseWeek().
- (WebCore::ISODateTime::addDay): Private helper for parseTimeZone().
- (WebCore::ISODateTime::addMinute): ditto.
- (WebCore::ISODateTime::parseTimeZone): Private helper for parseDateTime().
- (WebCore::ISODateTime::parseMonth): Parser for <input type=month>.
- (WebCore::ISODateTime::parseDate): Parser for <input type=date>.
- (WebCore::ISODateTime::parseWeek): Parser for <input type=week>.
- (WebCore::ISODateTime::parseTime): Parser for <input type=time>.
- (WebCore::ISODateTime::parseDateTimeLocal): Parser for <input type=datetime-local>.
- (WebCore::ISODateTime::parseDateTime): Parser for <input type=datetime>.
- * html/ISODateTime.h: Added. Declare WebCore::ISODateTime class.
- (WebCore::ISODateTime::ISODateTime):
- (WebCore::ISODateTime::millisecond):
- (WebCore::ISODateTime::second):
- (WebCore::ISODateTime::minute):
- (WebCore::ISODateTime::hour):
- (WebCore::ISODateTime::monthDay):
- (WebCore::ISODateTime::month):
- (WebCore::ISODateTime::fullYear):
- (WebCore::ISODateTime::week):
-
-2009-11-16 Alexey Proskuryakov <ap@apple.com>
-
- Fix a typo in previous commit.
-
- * platform/network/cf/SocketStreamHandleCFNet.cpp: #ifdef, not #if.
-
-2009-11-16 Alexey Proskuryakov <ap@apple.com>
-
- Fix a typo in previous commit.
-
- * platform/network/cf/SocketStreamHandleCFNet.cpp:
-
-2009-11-16 Alexey Proskuryakov <ap@apple.com>
-
- Tiger build fix.
-
- * platform/network/cf/SocketStreamHandleCFNet.cpp: Define CFN_EXPORT, as this macro was named
- differently in Tiger CFNetwork.
-
-2009-11-16 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Darin Fisher.
-
- [KURLGoogle] setHostAndPort doesn't handle arguments without port correctly.
-
- Fix a bug in the code that was dormant until http://trac.webkit.org/changeset/50784.
-
- Covered by existing test: LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host.html
-
- * platform/KURLGoogle.cpp:
- (WebCore::KURL::setHostAndPort): Added handling of arguments without port specified.
-
-2009-11-16 Alexey Proskuryakov <ap@apple.com>
-
- Rubber-stamped by Jon Honeycutt.
-
- A better Windows build fix
-
- * platform/network/cf/SocketStreamHandleCFNet.cpp: (WebCore::SocketStreamHandle::createStreams):
- Use a macro that inserts __declspec(dllimport) when appropriate for CFNetwork imports.
-
-2009-11-16 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Darin Adler.
-
- Rename protocolIsValid to isValidProtocol.
- https://bugs.webkit.org/show_bug.cgi?id=31503
-
- This name change was suggested in https://bugs.webkit.org/show_bug.cgi?id=29972#c19.
-
- No new tests since no new functionality was introduced.
-
- * html/HTMLAnchorElement.cpp:
- (WebCore::HTMLAnchorElement::setProtocol):
- * platform/KURL.cpp:
- (WebCore::isValidProtocol):
- * platform/KURL.h:
- * platform/KURLGoogle.cpp:
- (WebCore::isValidProtocol):
-
-2009-11-16 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Beth Dakin.
-
- AX: aria-labelledby duplicates some of its WAI-ARIA label
- https://bugs.webkit.org/show_bug.cgi?id=31565
-
- Test: accessibility/aria-labelledby-overrides-label.html
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::hasTextAlternative):
- (WebCore::AccessibilityRenderObject::exposesTitleUIElement):
- (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
- * accessibility/AccessibilityRenderObject.h:
-
-2009-11-16 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Handle the case of a null NPObject* in NPN_SetException in
- the V8 bindings. This allow out of process plugins calling
- NPN_SetException to just send null instead of sending an
- NPObject* that would be an address in a different
- process's memory space.
-
- https://bugs.webkit.org/show_bug.cgi?id=31561
-
- * bindings/v8/NPV8Object.cpp:
- (_NPN_SetException): Allow null NPObject* and just throw a general error.
-
-2009-11-16 Alexey Proskuryakov <ap@apple.com>
-
- Windows build fix.
-
- * platform/network/cf/SocketStreamHandleCFNet.cpp: (WebCore::SocketStreamHandle::createStreams):
- Disable CONNECT proxies on Windows until WebKitSupportLibrary includes support for those.
-
-2009-11-14 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- [Qt] ASSERT failure while running DRT
- https://bugs.webkit.org/show_bug.cgi?id=30978
-
- Add needed Structure typeInfo flags to QtRuntimeObjectImpl and QtRuntimeMethod.
- These flags are needed after r49649, where HasDefaultmark was changed to OverrideMarkChildren.
-
- * bridge/qt/qt_instance.cpp:
- (JSC::Bindings::QtRuntimeObjectImp::createStructure):
- * bridge/qt/qt_runtime.h:
- (JSC::Bindings::QtRuntimeMethod::createStructure):
-
-2009-11-16 Mark Rowe <mrowe@apple.com>
-
- Attempt to fix the build. Land a file that was missing from r51049.
-
- * bindings/js/JSWebGLArrayHelper.h: Copied from WebCore/html/canvas/WebGLByteArray.idl.
- (WebCore::setWebGLArrayFromArray):
-
-2009-11-16 Kenneth Russell <kbr@google.com>
-
- Reviewed by Oliver Hunt.
-
- Update API of WebGLArray and friends
- https://bugs.webkit.org/show_bug.cgi?id=31175
-
- * bindings/js/JSWebGLArrayCustom.cpp:
- (WebCore::toJS):
- * bindings/js/JSWebGLArrayHelper.h: Added.
- (WebCore::setWebGLArrayFromArray):
- * bindings/js/JSWebGLByteArrayCustom.cpp:
- (WebCore::JSWebGLByteArray::set):
- * bindings/js/JSWebGLFloatArrayCustom.cpp:
- (WebCore::JSWebGLFloatArray::set):
- * bindings/js/JSWebGLIntArrayCustom.cpp:
- (WebCore::JSWebGLIntArray::set):
- * bindings/js/JSWebGLShortArrayCustom.cpp:
- (WebCore::JSWebGLShortArray::set):
- * bindings/js/JSWebGLUnsignedByteArrayCustom.cpp:
- (WebCore::JSWebGLUnsignedByteArray::set):
- * bindings/js/JSWebGLUnsignedIntArrayCustom.cpp:
- (WebCore::JSWebGLUnsignedIntArray::set):
- * bindings/js/JSWebGLUnsignedShortArrayCustom.cpp:
- (WebCore::JSWebGLUnsignedShortArray::set):
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::convertToV8Object):
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8WebGLArrayBufferCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WebGLArrayCustom.h:
- (WebCore::constructWebGLArray):
- (WebCore::getWebGLArrayElement):
- (WebCore::setWebGLArrayFromArray):
- (WebCore::setWebGLArray):
- * bindings/v8/custom/V8WebGLByteArrayCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WebGLFloatArrayCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WebGLIntArrayCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WebGLShortArrayCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WebGLUnsignedByteArrayCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WebGLUnsignedIntArrayCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WebGLUnsignedShortArrayCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * html/canvas/WebGLArray.cpp:
- (WebCore::WebGLArray::WebGLArray):
- (WebCore::WebGLArray::~WebGLArray):
- (WebCore::WebGLArray::setImpl):
- * html/canvas/WebGLArray.h:
- (WebCore::WebGLArray::isByteArray):
- (WebCore::WebGLArray::isUnsignedByteArray):
- (WebCore::WebGLArray::isShortArray):
- (WebCore::WebGLArray::isUnsignedShortArray):
- (WebCore::WebGLArray::isIntArray):
- (WebCore::WebGLArray::isUnsignedIntArray):
- (WebCore::WebGLArray::isFloatArray):
- (WebCore::WebGLArray::buffer):
- (WebCore::WebGLArray::baseAddress):
- (WebCore::WebGLArray::byteOffset):
- * html/canvas/WebGLArray.idl:
- * html/canvas/WebGLArrayBuffer.cpp:
- (WebCore::WebGLArrayBuffer::create):
- (WebCore::WebGLArrayBuffer::WebGLArrayBuffer):
- (WebCore::WebGLArrayBuffer::data):
- (WebCore::WebGLArrayBuffer::byteLength):
- (WebCore::WebGLArrayBuffer::~WebGLArrayBuffer):
- * html/canvas/WebGLArrayBuffer.h:
- * html/canvas/WebGLByteArray.cpp:
- (WebCore::WebGLByteArray::create):
- (WebCore::WebGLByteArray::byteLength):
- (WebCore::WebGLByteArray::slice):
- (WebCore::WebGLByteArray::set):
- * html/canvas/WebGLByteArray.h:
- (WebCore::WebGLByteArray::isByteArray):
- (WebCore::WebGLByteArray::data):
- (WebCore::WebGLByteArray::set):
- (WebCore::WebGLByteArray::get):
- (WebCore::WebGLByteArray::item):
- * html/canvas/WebGLByteArray.idl:
- * html/canvas/WebGLFloatArray.cpp:
- (WebCore::WebGLFloatArray::create):
- (WebCore::WebGLFloatArray::WebGLFloatArray):
- (WebCore::WebGLFloatArray::length):
- (WebCore::WebGLFloatArray::byteLength):
- (WebCore::WebGLFloatArray::slice):
- (WebCore::WebGLFloatArray::set):
- * html/canvas/WebGLFloatArray.h:
- (WebCore::WebGLFloatArray::isFloatArray):
- (WebCore::WebGLFloatArray::data):
- (WebCore::WebGLFloatArray::set):
- (WebCore::WebGLFloatArray::get):
- (WebCore::WebGLFloatArray::item):
- * html/canvas/WebGLFloatArray.idl:
- * html/canvas/WebGLIntArray.cpp:
- (WebCore::WebGLIntArray::create):
- (WebCore::WebGLIntArray::WebGLIntArray):
- (WebCore::WebGLIntArray::length):
- (WebCore::WebGLIntArray::byteLength):
- (WebCore::WebGLIntArray::slice):
- (WebCore::WebGLIntArray::set):
- * html/canvas/WebGLIntArray.h:
- (WebCore::WebGLIntArray::isIntArray):
- (WebCore::WebGLIntArray::data):
- (WebCore::WebGLIntArray::set):
- (WebCore::WebGLIntArray::get):
- (WebCore::WebGLIntArray::item):
- * html/canvas/WebGLIntArray.idl:
- * html/canvas/WebGLShortArray.cpp:
- (WebCore::WebGLShortArray::create):
- (WebCore::WebGLShortArray::WebGLShortArray):
- (WebCore::WebGLShortArray::length):
- (WebCore::WebGLShortArray::byteLength):
- (WebCore::WebGLShortArray::slice):
- (WebCore::WebGLShortArray::set):
- * html/canvas/WebGLShortArray.h:
- (WebCore::WebGLShortArray::isShortArray):
- (WebCore::WebGLShortArray::data):
- (WebCore::WebGLShortArray::set):
- (WebCore::WebGLShortArray::get):
- (WebCore::WebGLShortArray::item):
- * html/canvas/WebGLShortArray.idl:
- * html/canvas/WebGLUnsignedByteArray.cpp:
- (WebCore::WebGLUnsignedByteArray::create):
- (WebCore::WebGLUnsignedByteArray::WebGLUnsignedByteArray):
- (WebCore::WebGLUnsignedByteArray::length):
- (WebCore::WebGLUnsignedByteArray::byteLength):
- (WebCore::WebGLUnsignedByteArray::slice):
- (WebCore::WebGLUnsignedByteArray::set):
- * html/canvas/WebGLUnsignedByteArray.h:
- (WebCore::WebGLUnsignedByteArray::isUnsignedByteArray):
- (WebCore::WebGLUnsignedByteArray::data):
- (WebCore::WebGLUnsignedByteArray::set):
- (WebCore::WebGLUnsignedByteArray::get):
- (WebCore::WebGLUnsignedByteArray::item):
- * html/canvas/WebGLUnsignedByteArray.idl:
- * html/canvas/WebGLUnsignedIntArray.cpp:
- (WebCore::WebGLUnsignedIntArray::create):
- (WebCore::WebGLUnsignedIntArray::WebGLUnsignedIntArray):
- (WebCore::WebGLUnsignedIntArray::length):
- (WebCore::WebGLUnsignedIntArray::byteLength):
- (WebCore::WebGLUnsignedIntArray::slice):
- (WebCore::WebGLUnsignedIntArray::set):
- * html/canvas/WebGLUnsignedIntArray.h:
- (WebCore::WebGLUnsignedIntArray::isUnsignedIntArray):
- (WebCore::WebGLUnsignedIntArray::data):
- (WebCore::WebGLUnsignedIntArray::set):
- (WebCore::WebGLUnsignedIntArray::get):
- (WebCore::WebGLUnsignedIntArray::item):
- * html/canvas/WebGLUnsignedIntArray.idl:
- * html/canvas/WebGLUnsignedShortArray.cpp:
- (WebCore::WebGLUnsignedShortArray::create):
- (WebCore::WebGLUnsignedShortArray::WebGLUnsignedShortArray):
- (WebCore::WebGLUnsignedShortArray::length):
- (WebCore::WebGLUnsignedShortArray::byteLength):
- (WebCore::WebGLUnsignedShortArray::slice):
- (WebCore::WebGLUnsignedShortArray::set):
- * html/canvas/WebGLUnsignedShortArray.h:
- (WebCore::WebGLUnsignedShortArray::isUnsignedShortArray):
- (WebCore::WebGLUnsignedShortArray::data):
- (WebCore::WebGLUnsignedShortArray::set):
- (WebCore::WebGLUnsignedShortArray::get):
- (WebCore::WebGLUnsignedShortArray::item):
- * html/canvas/WebGLUnsignedShortArray.idl:
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::bufferData):
- (WebCore::GraphicsContext3D::bufferSubData):
-
-2009-11-16 Alexey Proskuryakov <ap@apple.com>
-
- Windows build fix.
-
- * platform/network/cf/SocketStreamHandleCFNet.cpp: Declare constants as extern "C".
-
-2009-11-15 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- Enable support for webkit-box-shadow in Cairo builds.
- https://bugs.webkit.org/show_bug.cgi?id=26102.
-
- Covered by existing fast/box-shadow tests.
-
- * platform/graphics/cairo/GraphicsContextCairo.cpp: Add
- support for fillRect shadows.
-
-2009-11-16 Alexey Proskuryakov <ap@apple.com>
-
- Windows build fix.
-
- * platform/network/cf/SocketStreamHandleCFNet.cpp: Don't try to include a file that's not
- in WebKitSupportLibrary.
-
-2009-11-16 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=31494
- Add unauthenticated proxy support to SocketStreamHandleCFNet
-
- Cannot be tested in DRT.
-
- * platform/network/cf/SocketStreamHandleCFNet.cpp:
- (WebCore::SocketStreamHandle::chooseProxy): Fetch proxy information from OS.
- (WebCore::SocketStreamHandle::createStreams): Apply it to the newly created streams.
-
-2009-11-14 Antonio Gomes <tonikitoo@webkit.org>
-
- Reviewed by Antti Koivisto.
-
- [Qt] Broken back/forward after using ErrorPageExtension to set error page
- https://bugs.webkit.org/show_bug.cgi?id=30573
-
- Make FrameLoader::checkLoadCompleteForThisFrame method
- to check for any working DocumentLoader instance (through
- activeDocumentLoader()) instead of only checking for
- 'm_provisionalDocumentLoader' in order to decide to if
- it is going to reset of not the back and forward history.
- after an error page has been loaded.
-
- Test: LayoutTests/fast/history/back-forward-reset-after-error-handling.html
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
-
-2009-11-14 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- Need to implement ARIA role="directory"
- https://bugs.webkit.org/show_bug.cgi?id=31516
-
- Test: platform/mac/accessibility/aria-directory.html
-
- * accessibility/AXObjectCache.cpp:
- (WebCore::AXObjectCache::getOrCreate):
- * accessibility/AccessibilityList.cpp:
- (WebCore::AccessibilityList::isOrderedList):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::createARIARoleMap):
-
-2009-11-15 Dave Tapuska <dtapuska@rim.com>
-
- Reviewed by George Staikos.
-
- Compare UChars single unit at a time as opposed to the uint32_t
- approach as casting to unaligned addresses may cause a bus failure
- on ARMv5 and below. This change replicates the same defines that
- exists in AtomicString.cpp
-
- https://bugs.webkit.org/show_bug.cgi?id=31475
-
- * platform/text/StringHash.h:
- (WebCore::StringHash::equal):
-
-2009-11-15 Evan Martin <evan@chromium.org>
-
- Reviewed by Adam Barth.
-
- Wrap some SVG code in V8DOMWrapper with an ENABLE(SVG) test.
-
- https://bugs.webkit.org/show_bug.cgi?id=31490
-
- * bindings/v8/V8DOMWrapper.cpp:
-
-2009-11-15 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Adam Barth.
-
- [Haiku] Build fix. The FileChooser constructor doesn't need to be redefined.
-
- * platform/haiku/FileChooserHaiku.cpp:
-
-2009-11-15 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Adam Barth.
-
- [Haiku] Build fix. ColorSpace name had a wrong CamelCase.
-
- * platform/graphics/haiku/GraphicsContextHaiku.cpp:
- (WebCore::GraphicsContext::setPlatformStrokeColor):
-
-2009-11-15 Daniel Bates <dbates@webkit.org>
-
- No review, rolling out r50999.
- http://trac.webkit.org/changeset/50999
-
- Need to fix some issues in the Windows build. Missed some places where
- RenderTextControl::isEdited is called.
-
- * bindings/objc/DOMHTML.mm:
- (-[DOMHTMLInputElement _isEdited]):
- (-[DOMHTMLTextAreaElement _isEdited]):
- * dom/Document.cpp:
- (WebCore::Document::setFocusedNode):
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::defaultEventHandler):
- * rendering/RenderTextControl.cpp:
- (WebCore::RenderTextControl::RenderTextControl):
- (WebCore::RenderTextControl::setInnerTextValue):
- (WebCore::RenderTextControl::setUserEdited):
- (WebCore::RenderTextControl::subtreeHasChanged):
- * rendering/RenderTextControl.h:
- (WebCore::RenderTextControl::isEdited):
- (WebCore::RenderTextControl::setEdited):
- (WebCore::RenderTextControl::isUserEdited):
- * rendering/RenderTextControlSingleLine.cpp:
- (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
- * wml/WMLInputElement.cpp:
- (WebCore::WMLInputElement::defaultEventHandler):
-
-2009-11-15 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=31186
-
- Renames RenderTextControl::m_edited and RenderTextControl::m_userEdited to
- m_wasChangedSinceLastChangeEvent and m_lastChangeWasUserEdit, respectively.
- These are more descriptive names so as to clear an ambiguity surrounding
- their usage. Also, renames associated setters and getters so that they
- coincide with the renamed fields.
-
- No functionality was changed. So, no tests were included.
-
- * bindings/objc/DOMHTML.mm:
- (-[DOMHTMLInputElement _isEdited]):
- (-[DOMHTMLTextAreaElement _isEdited]):
- * dom/Document.cpp:
- (WebCore::Document::setFocusedNode):
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::defaultEventHandler):
- * rendering/RenderTextControl.cpp:
- (WebCore::RenderTextControl::RenderTextControl):
- (WebCore::RenderTextControl::setInnerTextValue):
- (WebCore::RenderTextControl::setLastChangeWasUserEdit): Formerly named setUserEdited.
- (WebCore::RenderTextControl::subtreeHasChanged):
- * rendering/RenderTextControl.h:
- (WebCore::RenderTextControl::wasChangedSinceLastChangeEvent): Formerly named isEdited.
- (WebCore::RenderTextControl::setChangedSinceLastChangeEvent): Formerly named setEdited.
- (WebCore::RenderTextControl::lastChangeWasUserEdit): Formerly named setUserEdited.
- * rendering/RenderTextControlSingleLine.cpp:
- (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
- * wml/WMLInputElement.cpp:
- (WebCore::WMLInputElement::defaultEventHandler):
-
-2009-11-14 Adele Peterson <adele@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Fix for <rdar://problem/6946165> Would like to be able to specify the number of visible lines when using -webkit-line-clamp
-
- Test: fast/overflow/line-clamp.html
-
- * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Updated to handle different types of values.
- * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): ditto.
- * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): ditto.
-
- * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutVerticalBox):
- Use the line count value if available. Otherwise, convert the percentage to the line count, as we did before. Also,
- if there is anchor as the last child box, still allow adding the ellipsis.
-
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::scrollByRecursively): Call isNone on the LineClampValue to see if the line-clamp property has been set.
- (WebCore::RenderLayer::scrollRectToVisible): ditto.
-
- * WebCore.xcodeproj/project.pbxproj: Added LineClampValue.h
- * rendering/style/LineClampValue.h: Added.
- (WebCore::LineClampValue::LineClampValue):
- (WebCore::LineClampValue::value):
- (WebCore::LineClampValue::isPercentage):
- (WebCore::LineClampValue::isNone):
- (WebCore::LineClampValue::operator==):
- (WebCore::LineClampValue::operator!=):
- * rendering/style/RenderStyleConstants.h: (WebCore::): Define ELineClampType enum for percentage or line count.
-
- * rendering/style/RenderStyle.h: Use LineClampValue.
- (WebCore::InheritedFlags::lineClamp):
- (WebCore::InheritedFlags::setLineClamp):
- (WebCore::InheritedFlags::initialLineClamp):
- * rendering/style/StyleRareNonInheritedData.h:
-
-2009-11-14 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Oliver Hunt.
-
- <rdar://problem/7287487>
- Do not use QuickTime version to detect media controller theme
-
- * WebCore.base.exp: Export wkMediaControllerThemeAvailable
- * platform/mac/WebCoreSystemInterface.h: Ditto.
- * platform/mac/WebCoreSystemInterface.mm: Ditto.
-
- * rendering/RenderThemeMac.mm:
- (WebCore::mediaControllerTheme): Use wkMediaControllerThemeAvailable instead of the
- QuickTime version to see if it is possible to use MediaControllerThemeQuickTime.
-
-2009-11-14 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Darin Adler.
-
- - Recognizes date/datetime/datetime-local/month/time/week types of INPUT element.
- They have no dedicated UI and no type validation for now.
- - Clean up setInputType() and formControlType() of HTMLInputElement.
- https://bugs.webkit.org/show_bug.cgi?id=29004
-
- Test: fast/forms/input-type-change3.html
-
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::valueMissing):
- (WebCore::HTMLInputElement::patternMismatch):
- (WebCore::HTMLInputElement::tooLong):
- (WebCore::createTypeMap):
- (WebCore::HTMLInputElement::setInputType):
- (WebCore::createFormControlTypes):
- (WebCore::HTMLInputElement::formControlType):
- (WebCore::HTMLInputElement::saveFormControlState):
- (WebCore::HTMLInputElement::restoreFormControlState):
- (WebCore::HTMLInputElement::accessKeyAction):
- (WebCore::HTMLInputElement::rendererIsNeeded):
- (WebCore::HTMLInputElement::createRenderer):
- (WebCore::HTMLInputElement::appendFormData):
- (WebCore::HTMLInputElement::isTextField):
- (WebCore::HTMLInputElement::valueWithDefault):
- (WebCore::HTMLInputElement::storesValueSeparateFromAttribute):
- (WebCore::HTMLInputElement::defaultEventHandler):
- (WebCore::HTMLInputElement::isRequiredFormControl):
- (WebCore::HTMLInputElement::dataList):
- * html/HTMLInputElement.h:
- (WebCore::HTMLInputElement::):
-
-2009-11-13 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- WAI-ARIA: checkbox does not determine its label from text content
- https://bugs.webkit.org/show_bug.cgi?id=31456
-
- Test: accessibility/aria-checkbox-text.html
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::title):
-
-2009-11-13 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- [Chromium] Fix build to catch up with http://trac.webkit.org/changeset/50973.
- This is just enough changes to unbreak the port.
-
- * bindings/v8/ScriptController.cpp:
- (WebCore::mainThreadNormalWorld):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::initContextIfNeeded):
- * loader/FrameLoaderClient.h:
-
-2009-11-13 Aaron Boodman <aa@chromium.org>
-
- Unreviewed fix for Chromium build.
-
- * loader/FrameLoaderClient.h:
- (WebCore::FrameLoaderClient::dispatchDidClearWindowObjectInWorld):
- Provide an empty implementation of this method because I don't know
- what it is supposed to do on Chromium.
-
-2009-11-13 Aaron Boodman <aa@chromium.org>
-
- Unreviewed fix for Chromium build.
-
- * loader/FrameLoader.h: Make dispatchDidClearWindowObjectsInAllWorlds()
- public, as Chromium's V8Proxy calls it.
-
-2009-11-13 Aaron Boodman <aa@chromium.org>
-
- Unreviewed fix to Chromium build.
-
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::getAllWorlds):
-
-2009-11-13 Aaron Boodman <aa@chromium.org>
-
- Unreviewed fix for Chromium build.
-
- * platform/text/TextBoundaries.cpp: Use longer path to refer to Unicode.h.
-
-2009-11-13 Adam Barth <abarth@webkit.org>
-
- Unreviewed partial build fix for Chromium. Should fix failure #4.
-
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::getAllWorlds):
- * bindings/v8/ScriptController.h:
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::initContextIfNeeded):
-
-2009-11-13 Adam Barth <abarth@webkit.org>
-
- Unreviewed partial build fix for Chromium.
-
- * bindings/v8/ScriptController.h:
- (WebCore::ScriptController::getAllWorlds):
-
-2009-11-13 Eric Seidel <eric@webkit.org>
-
- No review, build fix only.
-
- Fix Windows and Chromium builds after http://trac.webkit.org/changeset/50977.
-
- Unify TextBoundaries implementations by only relying on WTF Unicode abstractions
- https://bugs.webkit.org/show_bug.cgi?id=31468
-
- * WebCore.gypi: Rename TextBoundariesICU -> TextBoundaries
- * WebCore.vcproj/WebCore.vcproj: Rename TextBoundariesICU -> TextBoundaries
-
-2009-11-12 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Dmitry Titov.
-
- LocalStorage quota should include key sizes in its count
- https://bugs.webkit.org/show_bug.cgi?id=31451
-
- * storage/StorageMap.cpp:
- (WebCore::StorageMap::setItem):
- Count keys in the quota when adding a new item.
- (WebCore::StorageMap::removeItem):
- Remove the key's length from the quota if we're removing the item.
- (WebCore::StorageMap::importItem):
- Assume that we're adding things for the first time.
- Count keys in the quota.
-
-2009-11-13 Dominik Röttsches <dominik.roettsches@access-company.com>
-
- Reviewed by Eric Seidel.
-
- Unify TextBoundaries implementations by only relying on WTF Unicode abstractions
- https://bugs.webkit.org/show_bug.cgi?id=31468
-
- Moving TextBoundariesICU.cpp to TextBoundaries.cpp
- by removing the direct ICU dependency and replacing it
- with WTF functions and WebCore's own TextBreakIterator
- abstractions.
-
- * GNUmakefile.am:
- * platform/graphics/gtk/SimpleFontDataGtk.cpp:
- * platform/text/TextBoundaries.cpp: Added.
- (WebCore::findNextWordFromIndex):
- (WebCore::findWordBoundary):
- * platform/text/TextBoundariesICU.cpp: Removed.
- * platform/text/TextBreakIterator.h:
- * platform/text/TextBreakIteratorICU.cpp:
- (WebCore::textBreakLast):
- (WebCore::textBreakPrevious):
-
-2009-11-13 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Darin Adler.
-
- WebCore::externalRepresentation should update layout before getting render object
- https://bugs.webkit.org/show_bug.cgi?id=31459
-
- * rendering/RenderTreeAsText.cpp:
- (WebCore::externalRepresentation):
-
-2009-11-13 Adam Roben <aroben@apple.com>
-
- Tell FrameLoaderClient when window objects in isolated worlds are
- cleared
-
- Fixes <http://webkit.org/b/31124> Tell the WebFrameLoadDelegate when
- window objects in isolated worlds are cleared
-
- Test: http/tests/security/isolatedWorld/didClearWindowObject.html
-
- Reviewed by Dave Hyatt.
-
- * bindings/js/JSDOMBinding.h:
- (WebCore::WebCoreJSClientData::getAllWorlds): Added. Copies all the
- worlds in m_worldSet to the passed-in Vector.
-
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::getAllWorlds): Added. Calls through to
- WebCoreJSClientData.
- (WebCore::ScriptController::initScript): Changed to call
- FrameLoader::dispatchDidClearWindowObjectInWorld.
-
- * bindings/js/ScriptController.h: Added getAllWorlds.
-
- * loader/EmptyClients.h:
- (WebCore::EmptyFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
- Updated for FrameLoaderClient change.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::receivedFirstData):
- (WebCore::FrameLoader::begin):
- Changed to call dispatchDidClearWindowObjectsInAllWorlds.
-
- (WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds):
- Added. Retrieves all the worlds, then calls through to
- dispatchDidClearWindowObjectInWorld for each one.
- (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld): Replaces
- dispatchWindowObjectAvailable. Calls up to the client, then, if the
- world is the mainThreadNormalWorld(), tells the Inspector about it,
- too.
-
- * loader/FrameLoader.h: Replaced dispatchWindowObjectAvailable with
- dispatchDidClearWindowObjectInWorld. Added
- dispatchDidClearWindowObjectsInAllWorlds.
-
- * loader/FrameLoaderClient.h: Replaced windowObjectCleared with
- dispatchDidClearWindowObjectForWorld.
-
-2009-11-13 Vitaly Repeshko <vitalyr@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Fix SVG context assignment for pod types.
- https://bugs.webkit.org/show_bug.cgi?id=31497
-
- I broke this in r50958.
-
- Tested by svg/custom/viewport-update2.svg.
-
- * bindings/scripts/CodeGeneratorV8.pm:
-
-2009-11-13 Andrei Popescu <andreip@google.com>
-
- Reviewed by Dmitry Titov.
-
- Bring the platform/android files inline with Android 2.0
- https://bugs.webkit.org/show_bug.cgi?id=31423
-
- No new tests required: these are all Android-specific files.
-
- * platform/android/ClipboardAndroid.cpp:
- (WebCore::ClipboardAndroid::files):
- * platform/android/ClipboardAndroid.h:
- * platform/android/FileChooserAndroid.cpp:
- (WebCore::FileChooser::basenameForWidth):
- (WebCore::fileButtonChooseFileLabel):
- * platform/android/KeyEventAndroid.cpp:
- (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
- * platform/android/LocalizedStringsAndroid.cpp:
- (WebCore::contextMenuItemTagOpenLinkInNewWindow):
- (WebCore::contextMenuItemTagDownloadLinkToDisk):
- (WebCore::contextMenuItemTagCopyLinkToClipboard):
- (WebCore::contextMenuItemTagOpenImageInNewWindow):
- (WebCore::contextMenuItemTagDownloadImageToDisk):
- (WebCore::contextMenuItemTagCopyImageToClipboard):
- (WebCore::contextMenuItemTagOpenFrameInNewWindow):
- (WebCore::contextMenuItemTagCopy):
- (WebCore::contextMenuItemTagGoBack):
- (WebCore::contextMenuItemTagGoForward):
- (WebCore::contextMenuItemTagStop):
- (WebCore::contextMenuItemTagReload):
- (WebCore::contextMenuItemTagCut):
- (WebCore::contextMenuItemTagPaste):
- (WebCore::contextMenuItemTagNoGuessesFound):
- (WebCore::contextMenuItemTagIgnoreSpelling):
- (WebCore::contextMenuItemTagLearnSpelling):
- (WebCore::contextMenuItemTagSearchWeb):
- (WebCore::contextMenuItemTagLookUpInDictionary):
- (WebCore::contextMenuItemTagOpenLink):
- (WebCore::contextMenuItemTagIgnoreGrammar):
- (WebCore::contextMenuItemTagSpellingMenu):
- (WebCore::contextMenuItemTagShowSpellingPanel):
- (WebCore::contextMenuItemTagCheckSpelling):
- (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
- (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
- (WebCore::contextMenuItemTagFontMenu):
- (WebCore::contextMenuItemTagBold):
- (WebCore::contextMenuItemTagItalic):
- (WebCore::contextMenuItemTagUnderline):
- (WebCore::contextMenuItemTagOutline):
- (WebCore::contextMenuItemTagWritingDirectionMenu):
- (WebCore::contextMenuItemTagTextDirectionMenu):
- (WebCore::contextMenuItemTagDefaultDirection):
- (WebCore::contextMenuItemTagLeftToRight):
- (WebCore::contextMenuItemTagRightToLeft):
- (WebCore::mediaElementLoadingStateText):
- (WebCore::mediaElementLiveBroadcastStateText):
- (WebCore::searchableIndexIntroduction):
- (WebCore::resetButtonDefaultLabel):
- (WebCore::submitButtonDefaultLabel):
- (WebCore::inputElementAltText):
- * platform/android/RenderThemeAndroid.cpp:
- (WebCore::RenderTheme::themeForPage):
- (WebCore::RenderThemeAndroid::baselinePosition):
- (WebCore::RenderThemeAndroid::paintButton):
- (WebCore::adjustMenuListStyleCommon):
- (WebCore::RenderThemeAndroid::paintCombo):
- * platform/android/ScreenAndroid.cpp:
- * platform/android/ScrollViewAndroid.cpp:
- (WebCore::ScrollView::platformOffscreenContentRectangle):
- * platform/android/TemporaryLinkStubs.cpp:
- (JSC::Bindings::dispatchJNICall):
- * platform/android/WidgetAndroid.cpp:
- (WebCore::Widget::setFrameRect):
-
-2009-11-13 Norbert Leser <norbert.leser&nokia.com>
-
- Reviewed by Eric Seidel.
-
- Added macros for USERINCLUDE paths within symbian blocks
- to guarantee inclusion of respective header files from local path
- first (to avoid clashes with same names of header files in system include path).
-
- * WebCore.pro:
-
-2009-11-13 Hironori Bono <hbono@chromium.org>
-
- Reviewed by Oliver Hunt.
-
- Implement composition events introduced in DOM Level 3.
- This change adds a new IDL which defines the composition events, adds a class which
- implements the composition events, and sends the composition events according to
- the specification.
- https://bugs.webkit.org/show_bug.cgi?id=26310
-
- Test: fast/events/ime-composition-events-001.html
-
- * DerivedSources.make: Added CompositionEvent so we can compile "CompositionEvent.idl".
- * GNUmakefile.am: Added "CompositionEvent.{cpp,h,idl}".
- * WebCore.gypi: ditto.
- * WebCore.pro: ditto
- * WebCore.vcproj/WebCore.vcproj: ditto.
- * WebCore.xcodeproj/project.pbxproj: Added "CompositionEvent.{cpp,h,idl}" and "JSCompositionEvent.{cpp,h}".
- * WebCoreSources.bkl: Added "JSCompositionEvent.{cpp,h}".
- * bindings/js/JSEventCustom.cpp:
- (WebCore::toJS): Call isCompositionEvent() to create the CompositionEvent wrapper.
- * bindings/v8/DOMObjectsInclude.h: Added "JSCompositionEvent.h".
- * bindings/v8/DerivedSourcesAllInOne.cpp: Added "JSCompositionEvent.cpp".
- * bindings/v8/V8DOMWrapper.cpp: Call isCompositionEvent() to identify an event as a CompositionEvent.
- (WebCore::V8DOMWrapper::convertEventToV8Object):
- * bindings/v8/V8Index.cpp: Added "V8CompositionEvent.h".
- * bindings/v8/V8Index.h: Added V8Index::COMPOSITIONEVENT.
- * dom/CompositionEvent.cpp: Implements the CompositionEvent class.
- (WebCore::CompositionEvent::CompositionEvent):
- (WebCore::CompositionEvent::~CompositionEvent):
- (WebCore::CompositionEvent::initCompositionEvent):
- (WebCore::CompositionEvent::isCompositionEvent):
- * dom/CompositionEvent.h: Declares the CompositionEvent class.
- (WebCore::CompositionEvent::create):
- (WebCore::CompositionEvent::data):
- * dom/CompositionEvent.idl: Added the IDL of DOM CompositionEvent.
- * dom/Event.cpp:
- (WebCore::Event::isCompositionEvent): Added a method to identify an event is a CompositionEvent.
- * dom/Event.h:
- * dom/EventNames.h: Added composition{start,update,end} to eventNames.
- * editing/Editor.cpp:
- (WebCore::Editor::confirmComposition): Sent a CompositionEnd event.
- (WebCore::Editor::setComposition): Sent a Composition{Start,Update,End} event.
-
-2009-11-13 Jens Alfke <snej@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Fix a link error in unofficial GCC 4.4 builds on Linux.
- https://bugs.webkit.org/show_bug.cgi?id=31477
-
- * bindings/v8/V8Binding.cpp: Add explicit instantiations of v8StringToWebCoreString template.
-
-2009-11-13 Eric Seidel <eric@webkit.org>
-
- No review, build fix only.
-
- Fix Debug build after http://trac.webkit.org/changeset/50960.
-
- The CounterNode class does not support all methods necessary to efficiently update the counter tree as needed per CSS2.1
- https://bugs.webkit.org/show_bug.cgi?id=31213
-
- * rendering/CounterNode.cpp:
- (WebCore::showTreeAndMark):
- * rendering/RenderCounter.cpp:
- (WebCore::destroyCounterNodeChildren):
-
-2009-11-13 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Gustavo Noronha.
-
- [CAIRO] shadow support for Canvas and SVG
- [https://bugs.webkit.org/show_bug.cgi?id=30960]
-
- We currently fill a path with solid color instead of filling
- a clipping path. This causes problems on some composite operators,
- since Cairo modifies the area outside the path.
- This fixes the behavior of WebKitGtk on fast/canvas/canvas-composite-alpha.html
-
- Thanks to Benjamin Otte for tracking the bug down.
-
- * platform/graphics/cairo/GraphicsContextCairo.cpp:
- (WebCore::setPlatformFill):
-
-2009-11-12 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Adding Chromium's DatabaseTracker implementation.
-
- https://bugs.webkit.org/show_bug.cgi?id=31440
-
- * WebCore.gyp/WebCore.gyp:
- * WebCore.gypi:
- * storage/DatabaseTracker.h:
- * storage/chromium/DatabaseTrackerChromium.cpp:
- (WebCore::DatabaseTracker::fullPathForDatabase):
- (WebCore::DatabaseTracker::getMaxSizeForDatabase):
- * storage/chromium/QuotaTracker.cpp:
- (WebCore::QuotaTracker::updateDatabaseSize):
- * storage/chromium/QuotaTracker.h:
-
-2009-11-13 Carol Szabo <carol.szabo@nokia.com>
-
- Reviewed by Darin Adler.
-
- The CounterNode class is missing some basic tree navigation methods common in other WebKit trees such as the rendering tree
- https://bugs.webkit.org/show_bug.cgi?id=31213
- Added tree navigation methods that permit full implementation of CSS2.1
- counter feature without using recursion proportional to the counter
- tree depth.
- No new tests because I did not find any bug that is fixed by this
- commit yet, this just reduces the size of the patch for 11031 and
- helps respond to some concerns regarding that patch.
-
- * rendering/CounterNode.cpp:
- (WebCore::CounterNode::CounterNode):
-
- (WebCore::CounterNode::nextInPreOrderAfterChildren):
- (WebCore::CounterNode::nextInPreOrder):
- Added to support non-recursive tree traversal necessary for
- efficient full implementation of CSS2.1 counters.
-
- (WebCore::CounterNode::lastDescendant):
- (WebCore::CounterNode::previousInPreOrder):
- Moved this methods such that they occupy a place similar to that of
- identically named methods on the render tree. This allows for their
- broader use needed in full implementation of CSS2.1 counters.
-
- (WebCore::CounterNode::resetRenderer):
- (WebCore::CounterNode::resetRenderers):
- (WebCore::CounterNode::recount):
- (WebCore::CounterNode::insertAfter):
- (WebCore::CounterNode::removeChild):
- Changed such that insertion/removal of a counter, triggers not only
- recalculation of PrefixWidths, but also reassesment of values in
- counter nodes. This is the basis full implementation of CSS2.1
- counters. It does not change current behavior by much because of
- changes needed to the recalculation algorithm, but those are comming
- in the patch for 11031.
- (WebCore::showTreeAndMark):
- * rendering/CounterNode.h:
- * rendering/RenderCounter.cpp:
- (WebCore::counter):
- Only changed argument type to prepare for implementation of Darin
- Adler's recommendation for the patch to 11031.
-
- (WebCore::RenderCounter::invalidate):
- (WebCore::destroyCounterNodeChildren):
- (WebCore::RenderCounter::destroyCounterNodes):
- * rendering/RenderCounter.h:
- * rendering/RenderObjectChildList.cpp:
- (WebCore::invalidateCountersInContainer):
- (WebCore::RenderObjectChildList::invalidateCounters):
- * rendering/RenderObjectChildList.h:
- Added the ability to restrict invalidation to counters with a given
- identifier.
- Also invalidated counters that are on the child container itself
- which were missed by the previous algorithm, but were a valid case.
-
-2009-11-13 Vitaly Repeshko <vitalyr@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Protect SVG animated properties from destruction in bindings.
- https://bugs.webkit.org/show_bug.cgi?id=31474
-
- See http://crbug.com/26719.
-
- Tested by LayoutTests/svg/custom/js-update-transform-addition.svg
- under Valgrind.
-
- Made sure we keep a reference to SVG properties while setting a
- context:
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/V8Proxy.h:
- (WebCore::V8Proxy::withSVGContext):
-
-2009-11-13 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Alexey Proskuryakov.
-
- [CAIRO] shadow support for Canvas and SVG.
- [https://bugs.webkit.org/show_bug.cgi?id=30960]
-
- Incorporate Benjamin Otte's recommendations to avoid
- a buffer overrun, and small performance improvement.
-
- * platform/graphics/cairo/GraphicsContextCairo.cpp:
- (WebCore::copyContextProperties): Correctly size output
- storage for cairo_get_dash to avoid buffer overrun.
- (WebCore::drawPathShadow): Prefer cairo_fill_extents
- to slower cairo_stroke_extents when not drawing shadows.
-
-2009-11-13 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Do not register Chromium's HTML5 DB VFS as the default
- VFS. Otherwise, other sqlite DB users in the same process will
- stop working.
-
- https://bugs.webkit.org/show_bug.cgi?id=31462
-
- * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
- (WebCore::SQLiteFileSystem::openDatabase):
- * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
- (WebCore::SQLiteFileSystem::registerSQLiteVFS):
- * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
- (WebCore::SQLiteFileSystem::registerSQLiteVFS):
-
-2009-11-13 Alexey Proskuryakov <ap@apple.com>
-
- Windows build fix
-
- * platform/network/cf/SocketStreamHandleCFNet.cpp:
- (WebCore::SocketStreamHandle::SocketStreamHandle): Explicitly cast "-1" to CFOptionFlags,
- avoiding a sign mismatch warning.
-
-2009-11-13 Alexey Proskuryakov <ap@apple.com>
-
- Release build fix.
-
- * platform/network/cf/SocketStreamHandleCFNet.cpp:
- (WebCore::SocketStreamHandle::readStreamCallback):
- (WebCore::SocketStreamHandle::writeStreamCallback):
- Use ASSERT_UNUSED for unused stream parameter.
-
-2009-11-12 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=31441
- Implement SocketStreamHandleCFNet
-
- Existing WebSocket tests now pass on Mac. No proxy support yet.
-
- * platform/network/SocketStreamHandleClient.h:
- * platform/network/cf/SocketStreamHandle.h:
- (WebCore::SocketStreamHandle::shouldUseSSL):
- (WebCore::SocketStreamHandle::refAuthenticationClient):
- (WebCore::SocketStreamHandle::derefAuthenticationClient):
- (WebCore::SocketStreamHandle::):
- * platform/network/cf/SocketStreamHandleCFNet.cpp:
- (WebCore::SocketStreamHandle::SocketStreamHandle):
- (WebCore::SocketStreamHandle::chooseProxy):
- (WebCore::SocketStreamHandle::createStreams):
- (WebCore::SocketStreamHandle::copyCFStreamDescription):
- (WebCore::SocketStreamHandle::readStreamCallback):
- (WebCore::SocketStreamHandle::writeStreamCallback):
- (WebCore::SocketStreamHandle::~SocketStreamHandle):
- (WebCore::SocketStreamHandle::platformSend):
- (WebCore::SocketStreamHandle::platformClose):
- (WebCore::SocketStreamHandle::receivedCredential):
- (WebCore::SocketStreamHandle::receivedRequestToContinueWithoutCredential):
- (WebCore::SocketStreamHandle::receivedCancellation):
-
-2009-11-12 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: preload status bar button glyphs
- in order to prevent them from flickering (take 2).
-
- https://bugs.webkit.org/show_bug.cgi?id=31439
-
- * inspector/front-end/inspector.js:
- (preloadImages):
-
-2009-11-13 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Adam Barth.
-
- Chromium: [REGRESSION] Crash while stopping on a breakpoint.
- Rolling back r50890.
-
- https://bugs.webkit.org/show_bug.cgi?id=31467
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::canAccessPrivate):
-
-2009-11-13 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Gustavo Noronha.
-
- [CAIRO] shadow support for Canvas and SVG
- [https://bugs.webkit.org/show_bug.cgi?id=30960]
-
- This is the fix of a regression, caused by the shadow patch
- from the bug above. Reinserted the save and restore calls
- that were accidently removed by the previous patch.
-
- * platform/graphics/cairo/GraphicsContextCairo.cpp:
- (WebCore::setPlatformFill):
- (WebCore::setPlatformStroke):
-
-2009-11-13 Pavel Feldman <pfeldman@chromium.org>
-
- Not reviewed. Reverting r50908 since it makes inspector tests
- time out.
-
- https://bugs.webkit.org/show_bug.cgi?id=31439
-
- * inspector/front-end/inspector.js:
-
-2009-11-13 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Enable 'console.profile()' and 'console.profileEnd()'
- regardless of JAVASCRIPT_DEBUGGER.
-
- https://bugs.webkit.org/show_bug.cgi?id=31293
-
- * WebCore.gypi:
- * bindings/js/JSConsoleCustom.cpp:
- (WebCore::JSConsole::profile):
- (WebCore::JSConsole::profileEnd):
- * bindings/v8/custom/V8ConsoleCustom.cpp: Added.
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8CustomBinding.h:
- * page/Console.idl:
-
-2009-11-12 David Levin <levin@chromium.org>
-
- Reviewed by NOBODY.
-
- Chromium build fix.
-
- * bindings/v8/ScriptController.h:
- (WebCore::ScriptController::evaluateInWorld): Add a dummy
- method which isn't called in chromium to make things compile.
-
-2009-11-12 Anantanarayanan G Iyengar <ananta@chromium.org>
-
- Reviewed by Adam Barth.
-
- The document-open.html test was flaky at times. The test invokes the layout test plugin
- which in its destroy stream handler opens a new document. This basically tears down the
- stream and the associated plugin instance, which causes a crash when the plugin stream
- dereferences an invalid m_client pointer which points to the PluginView instance which
- is invalid at this time. Fix is to set the m_client pointer to NULL in the stop function
- and check for the same.
-
- https://bugs.webkit.org/show_bug.cgi?id=31067
-
- * plugins/PluginStream.cpp:
- (WebCore::PluginStream::stop):
- (WebCore::PluginStream::destroyStream):
-
-2009-11-12 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Renaming some parameters passed to DB-related methods to better
- indicate their purpose.
-
- https://bugs.webkit.org/show_bug.cgi?id=31449
-
- * platform/chromium/ChromiumBridge.h:
-
-2009-11-12 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Transformed reflected elements are clipped inside element with opacity
- https://bugs.webkit.org/show_bug.cgi?id=30957
-
- transparencyClipBox() attemped to minimize the size of the transparency layer by mapping
- each clip rect into painting space before taking the unions. This, however, did not work
- correctly with combinations of reflections and transforms. Fixed by unioning the
- clipRect and mapping through transforms along the way.
-
- Also leave some #ifdeffed code in beginTransparencyLayers() that makes it easy to see
- where the transparency layers are.
-
- Test: fast/reflections/opacity-reflection-transform.html
-
- * rendering/RenderLayer.cpp:
- (WebCore::expandClipRectForDescendantsAndReflection):
- (WebCore::transparencyClipBox):
- (WebCore::RenderLayer::beginTransparencyLayers):
-
-2009-11-12 Adam Barth <abarth@webkit.org>
-
- Reviewed by Darin Fisher.
-
- Improve SecurityOrigin::toString comment
- https://bugs.webkit.org/show_bug.cgi?id=31041
-
- * page/SecurityOrigin.h:
-
-2009-11-12 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Darin Adler.
-
- externalRepresentation should take Frame as the argument
- https://bugs.webkit.org/show_bug.cgi?id=31393
-
- No new tests as this is just a refactoring.
-
- * WebCore.base.exp:
- * rendering/RenderTreeAsText.cpp:
- (WebCore::externalRepresentation):
- * rendering/RenderTreeAsText.h:
-
-2009-11-12 Ben Murdoch <benm@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- [Android] The Android specific files in page/Android are out of date.
- https://bugs.webkit.org/show_bug.cgi?id=31437
-
- No tests required.
-
- * page/android/DragControllerAndroid.cpp:
- (WebCore::DragController::dragOperation): Added.
- (WebCore::DragController::cleanupAfterSystemDrag):
- * page/android/EventHandlerAndroid.cpp:
- (WebCore::EventHandler::accessKeyModifiers): Added.
- * page/android/InspectorControllerAndroid.cpp: Removed.
-
-2009-11-12 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Simon Fraser.
-
- [CAIRO] shadow support for Canvas and SVG.
- [https://bugs.webkit.org/show_bug.cgi?id=30960]
-
- Implement Canvas/SVG shadow support for Cairo. This patch
- uses the filter code from SVG Filters. That means that it is
- necessary to activate filters to see the shadows.
-
- Test: fast/canvas/canvas-shadow.html
-
- * GNUmakefile.am:
- * WebCore.vcproj/WebCore.vcproj: Add new ImageBufferFilter files.
- * platform/graphics/GraphicsContext.h:
- * platform/graphics/cairo/GraphicsContextCairo.cpp:
- (GraphicsContext::calculateShadowBufferDimensions): New helper routine.
- (WebCore::setPlatformFill):
- (WebCore::setPlatformStroke):
- (WebCore::copyContextProperties):
- (WebCore::drawPathShadow):
- (WebCore::GraphicsContext::fillPath):
- (WebCore::GraphicsContext::strokePath):
- (WebCore::GraphicsContext::drawPath):
- (WebCore::GraphicsContext::setPlatformShadow):
- (WebCore::GraphicsContext::createPlatformShadow):
- * platform/graphics/cairo/ImageCairo.cpp:
- (WebCore::BitmapImage::draw): Add filter effect.
- * platform/graphics/filters/Filter.h: Correct 'const' signatures.
- * platform/graphics/filters/ImageBufferFilter.cpp: Added.
- * platform/graphics/filters/ImageBufferFilter.h: Added.
- * svg/graphics/filters/SVGFilter.cpp: Correct 'const' signatures.
- * svg/graphics/filters/SVGFilter.h: Correct 'const' signatures.
-
-2009-11-12 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- Add postTaskToMainThread to ScriptExecutionContext.
- Move the code to post task to the main thread into a new method on ScriptExecutionContext,
- to use as a helper implementation of the virtual ScriptExecutionContext::postTask(Task) in
- contexts that live on the main thread.
- https://bugs.webkit.org/show_bug.cgi?id=31427
-
- No new tests - simply moving the code.
-
- * dom/Document.cpp:
- (WebCore::Document::postTask):
- * dom/ScriptExecutionContext.cpp:
- (WebCore::ScriptExecutionContextTaskTimer::ScriptExecutionContextTaskTimer):
- (WebCore::ScriptExecutionContextTaskTimer::fired):
- (WebCore::PerformTaskData::PerformTaskData):
- (WebCore::PerformTaskData::performTask):
- (WebCore::ScriptExecutionContext::postTaskToMainThread):
- * dom/ScriptExecutionContext.h:
-
-2009-11-12 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Darin Adler.
-
- Fix crash when removing compositing layers when GC is enabled
- https://bugs.webkit.org/show_bug.cgi?id=31429
-
- Workaround <rdar://problem/7390716> by special-casing the removal
- of all sublayers when GC is enabled.
-
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::safeSetSublayers):
- (WebCore::GraphicsLayerCA::updateSublayerList):
- (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
-
-2009-11-12 Jens Alfke <snej@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- The last of the V8 binding optimizations.
- - Replace string-valued element accessors with a shared getter/setter function.
- - Change error handling flow of control to avoid extra branches and function calls.
- https://bugs.webkit.org/show_bug.cgi?id=31443
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/V8Binding.cpp:
- (WebCore::getElementStringAttr): Body of string-valued Element getter function.
- (WebCore::setElementStringAttr): Body of string-valued Element setter function.
- * bindings/v8/V8Binding.h:
-
-2009-11-12 Sam Weinig <sam@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- Fix for <rdar://problem/7267951>
- Canvas methods should reject uses of NaN and Infinity.
-
- Test: fast/canvas/canvas-with-illegal-args.html
-
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::scale):
(WebCore::CanvasRenderingContext2D::rotate):
(WebCore::CanvasRenderingContext2D::translate):
(WebCore::CanvasRenderingContext2D::transform):
(WebCore::CanvasRenderingContext2D::setTransform):
-
-2009-11-12 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: profile timeline panel, fix obvious problems.
-
- https://bugs.webkit.org/show_bug.cgi?id=31432
-
- * inspector/front-end/AbstractTimelinePanel.js:
- (WebInspector.AbstractTimelinePanel.prototype.updateGraphDividersIfNeeded):
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel.prototype._setWindowPosition):
- (WebInspector.TimelineCalculator):
- (WebInspector.TimelineCalculator.prototype.get minimumBoundary):
- (WebInspector.TimelineCalculator.prototype.get maximumBoundary):
- (WebInspector.TimelineCalculator.prototype.reset):
- (WebInspector.TimelineCalculator.prototype.updateBoundaries):
- (WebInspector.TimelineCalculator.prototype.formatValue):
- (WebInspector.TimelineGraph):
- (WebInspector.TimelineGraph.prototype.refresh):
- * inspector/front-end/utilities.js:
- (Element.prototype.hasStyleClass):
-
-2009-11-12 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: preload status bar button glyphs
- in order to prevent them from flickering.
-
- https://bugs.webkit.org/show_bug.cgi?id=31439
-
- * inspector/front-end/inspector.js:
- (preloadImages):
-
-2009-11-12 Adam Roben <aroben@apple.com>
-
- Replace worldIDs with world objects
-
- Part of <http://webkit.org/b/31414> Implement new SPI for dealing with
- user scripts/stylesheets and isolated worlds
-
- Reviewed by Sam Weinig.
-
- Covered by existing tests.
-
- * WebCore.base.exp: Update exported symbols to match what now exists
- and is needed by WebKit.
-
- * bindings/js/ScheduledAction.cpp:
- (WebCore::ScheduledAction::execute): Updated for function rename.
-
- * bindings/js/ScriptController.cpp: Removed code that dealt with
- worldIDs.
- (WebCore::ScriptController::createWorld): Added. Returns a new world
- suitable for use on the main thread.
- (WebCore::ScriptController::executeScriptInWorld): Renamed from
- executeScriptInIsolatedWorld, since this works just fine with a
- "normal" world.
-
- * bindings/js/ScriptController.h: Added createWorld, removed functions
- that took worldIDs, renamed executeScriptInIsolatedWorld to
- executeScriptInWorld.
-
- * page/Frame.cpp:
- (WebCore::Frame::injectUserScripts):
- (WebCore::Frame::injectUserScriptsForWorld):
- Updated for changes to UserScriptMap and ScriptController.
-
- * page/Frame.h: Changed injectUserScriptsForWorld to take a
- DOMWrapperWorld* instead of a worldID.
-
- * page/PageGroup.cpp:
- (WebCore::PageGroup::addUserScriptToWorld):
- (WebCore::PageGroup::addUserStyleSheetToWorld):
- (WebCore::PageGroup::removeUserScriptFromWorld):
- (WebCore::PageGroup::removeUserStyleSheetFromWorld):
- (WebCore::PageGroup::removeUserScriptsFromWorld):
- (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
- * page/PageGroup.h:
- Changed these functions to take a DOMWrapperWorld* instead of a
- worldID. Also updated for changes to UserScript and UserStyleSheet.
-
- * page/UserScript.h:
- * page/UserStyleSheet.h: Changed not to hold a worldID, since it was
- never used.
-
- * page/UserScriptTypes.h:
- * page/UserStyleSheetTypes.h: Changed UserScriptMap and
- UserStyleSheetMap to use a RefPtr<DOMWrapperWorld> instead of a
- worldID as their key type.
-
-
-2009-11-12 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Tim Hatcher.
-
- Fixes <http://webkit.org/b/31260>.
- Web Inspector: Main Resources Other than HTML are mis-detected.
-
- Even if the resource is a main resource, look at its CachedResource type,
- because it might be an image, stylesheet, or JavaScript file, and we
- want to show them all correctly.
-
- * inspector/InspectorResource.cpp:
- (WebCore::InspectorResource::cachedResourceType): Move this method out so it can be called in multiple places.
- (WebCore::InspectorResource::type):
- * inspector/InspectorResource.h:
-
-2009-11-12 Jens Alfke <snej@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Table-driven setup for V8 binding template callback functions. 100k in code savings.
- https://bugs.webkit.org/show_bug.cgi?id=31420
-
- * bindings/scripts/CodeGeneratorV8.pm: Change generated ConfigureXXXTemplate fn
- to call configureTemplate().
- * bindings/v8/V8Binding.cpp:
- (WebCore::configureTemplate): New function; does all the standard configuration work.
- (WebCore::createCallback): De-inlined wrapper for FunctionTemplate creation.
- * bindings/v8/V8Binding.h:
- * bindings/v8/V8Proxy.cpp:
- (WebCore::batchConfigureAttributes): Just wrapped the very long fn parameter list.
- (WebCore::batchConfigureCallbacks): New function, used by configureTemplate.
- (WebCore::batchConfigureConstants): Just wrapped the very long fn parameter list.
- * bindings/v8/V8Proxy.h:
-
-2009-11-12 Dumitru Daniliuc <dumi@chromium.org>
-
- Unreviewed, fix Chromium build after http://trac.webkit.org/changeset/50876.
-
- * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
-
-2009-11-12 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Dan Bernstein.
-
- <rdar://problem/7388969> Add DOM API for fullscreen video
-
- DOM API for fullscreen <video>.
-
- Tests: media/media-fullscreen-inline.html
- media/media-fullscreen-not-in-document.html
-
- * dom/EventNames.h:
- Add webkitbeginfullscreen and webkitendfullscreen.
-
- * html/HTMLAttributeNames.in:
- Add onwebkitbeginfullscreen and onwebkitendfullscreen.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::parseMappedAttribute):
- Deal with onwebkitbeginfullscreen and onwebkitendfullscreen.
- (WebCore::HTMLMediaElement::enterFullscreen):
- Schedule webkitbeginfullscreenEvent event, don't set m_isFullscreen unless we
- actually do enter fullscreen.
- (WebCore::HTMLMediaElement::exitFullscreen):
- Schedule webkitendfullscreenEvent event.
- (WebCore::HTMLMediaElement::webkitEnterFullScreen):
- (WebCore::HTMLMediaElement::webkitExitFullScreen):
- (WebCore::HTMLMediaElement::webkitSupportsFullscreen):
- (WebCore::HTMLMediaElement::webkitDisplayingFullscreen):
- New, access to fullscreen properties and methods.
-
- * html/HTMLMediaElement.h:
- * html/HTMLMediaElement.idl:
- Declare methods needed for fullscreen API.
-
- * html/HTMLVideoElement.cpp:
- (WebCore::HTMLVideoElement::supportsFullscreen):
- Return false if a movie does not have video.
-
- * page/DOMWindow.h:
- Add webkitbeginfullscreen and webkitendfullscreen.
-
-2009-11-12 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- [Chromium] Sify compose button alerts error
- https://bugs.webkit.org/show_bug.cgi?id=31394
-
- Test: http/tests/security/calling-versus-current.html
-
- We're supposed to use the calling context for security checks. In JSC
- land, this is the lexicalGlobalObject.
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::canAccessPrivate):
-
-2009-11-12 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=30291
-
- Fixes an issue where the returned drop effect is incorrect when
- effectAllowed == "uninitialized".
-
- According to section 7.9.2 of the HTML 5 spec.
- <http://dev.w3.org/html5/spec/Overview.html#the-dragevent-and-datatransfer-interfaces>
- when effectAllowed = "uninitialized" the resulting dropEffect should be the
- user-specified dropEffect (i.e. "copy", "move", "link") and "none" for any
- other case.
-
- No test cases are included because we have an existing test case from
- bug #24731.
-
- * dom/Clipboard.cpp:
- (WebCore::dragOpFromIEOp): Added case for op == "uninitialized".
-
-2009-11-12 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Do not highlight node on refresh.
-
- https://bugs.webkit.org/show_bug.cgi?id=31419
-
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.prototype.reset):
-
-2009-11-12 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Minor timeline fixes.
-
- https://bugs.webkit.org/show_bug.cgi?id=31417
-
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel.prototype._getRecordDetails):
- (WebInspector.TimelineRecordTreeElement.prototype.onattach):
- (WebInspector.TimelineRecordTreeElement.prototype._updateDetails):
- (WebInspector.TimelineRecordTreeElement.prototype.refresh):
-
-2009-11-12 Alexey Proskuryakov <ap@apple.com>
-
- SnowLeopard build fix.
-
- Renamed initWithClient to initWithAuthenticationClient.
-
- * platform/network/mac/AuthenticationMac.mm:
- (-[WebCoreAuthenticationClientAsChallengeSender initWithAuthenticationClient:]):
- (WebCore::AuthenticationChallenge::setAuthenticationClient):
-
-2009-11-12 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- ARIA: add alert type roles
- https://bugs.webkit.org/show_bug.cgi?id=31392
-
- Test: platform/mac/accessibility/aria-alerts.html
-
- * accessibility/AccessibilityObject.h:
- * accessibility/AccessibilityRenderObject.cpp:
- * accessibility/mac/AccessibilityObjectWrapper.mm:
-
-2009-11-11 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=31386
- Make Mac AuthenticationChallenge usable from cross-platform code
-
- No change in behavior, so no tests.
-
- * platform/network/ResourceHandle.cpp:
- (WebCore::ResourceHandle::clearAuthentication):
- * platform/network/ResourceHandleInternal.h:
- (WebCore::ResourceHandleInternal::ResourceHandleInternal):
- Don't store m_currentCFChallenge, which was only used for a single assertion. Unlike the
- NSURLConnection case, CF challenge doesn't carry a sender with it, so the copy in web challenge
- is identical.
-
- * platform/network/cf/AuthenticationChallenge.h:
- (WebCore::AuthenticationChallenge::setAuthenticationClient): Added a setter to match the new
- Mac interface. Previously, one had to create a new AuthenticationChallenge to replace client.
-
- * platform/network/cf/ResourceHandleCFNet.cpp:
- (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Fixed assertions after removal
- of m_currentCFChallenge. Also, there is no need to set client now, as it's guaranteed to
- be already set.
-
- * platform/network/mac/AuthenticationChallenge.h:
- (WebCore::AuthenticationChallenge::m_sender): Explained the existence of this member to the
- best of my understanding.
- (WebCore::AuthenticationChallenge::m_nsChallenge): Renamed from m_macChallenge to prevent
- confusion with "mac" and "web" challenges in ResourceHandleInternal.
-
- * platform/network/mac/AuthenticationMac.mm:
- (WebCoreAuthenticationClientAsChallengeSender): Added a Obj-C wrapper for AuthenticationClient,
- making it possible to use the latter with NSURLAuthenticationChallenge.
- (WebCore::AuthenticationChallenge::AuthenticationChallenge): Updated for m_macChallenge ->
- m_nsChallenge renaming.
- (WebCore::AuthenticationChallenge::setAuthenticationClient): Wrap the client in Obj-C and
- set it as sender (or unset, if client is null).
-
- * platform/network/mac/ResourceHandleMac.mm:
- (WebCoreResourceHandleAsDelegate) WebCoreResourceHandleAsDelegate no longer doubles as
- authentication challenge sender.
- (WebCore::ResourceHandle::~ResourceHandle): A navigation can happen underneath an
- authentication sheet.
- (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Form m_currentWebChallenge
- using the new setAuthenticationClient() method.
- (WebCore::ResourceHandle::didCancelAuthenticationChallenge): Fixed an incorrect assertion.
- Since didCancelAuthenticationChallenge is called by connection, the passed challenge is
- the original Mac one, not the one we created for use with authentication sheet. I don't
- know when a connection would cancel authentication in practice, so I haven't tested this.
-
-2009-11-12 Patrick Mueller <Patrick_Mueller@us.ibm.com>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: breakpoint sidebar entries should allow click over entire list item
- https://bugs.webkit.org/show_bug.cgi?id=31411
-
- No new tests; no new functionality, small usability change.
-
- * inspector/front-end/BreakpointsSidebarPane.js:
- (WebInspector.BreakpointsSidebarPane.prototype._appendBreakpointElement):
- (WebInspector.BreakpointsSidebarPane.prototype._appendBreakpointElement.breakpointClicked):
-
-2009-11-12 Patrick Mueller <Patrick_Mueller@us.ibm.com>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: breakpoints in named evals are not restored after a reload
- https://bugs.webkit.org/show_bug.cgi?id=31375
-
- Manual test added
-
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel.prototype.addScript):
- * manual-tests/inspector/bp-in-named-eval-after-reload.html: Added.
-
-2009-11-12 Benjamin Poulain <benjamin.poulain@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Custom printing shrink factors
- https://bugs.webkit.org/show_bug.cgi?id=29042
-
- This reverts commit r49769. The public API for this needs to be reviewed
- before its inclusion in Qt.
-
- * page/PrintContext.cpp:
- (WebCore::PrintContext::begin):
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
- * page/Settings.h:
-
-2009-11-12 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Web Inspector: Resource errors/warnings not shown in the Resource tree.
-
- Error/Warning bubbles are not displayed next to the resource in the
- Resources panel if those occur before the resource is attached to the tree.
- https://bugs.webkit.org/show_bug.cgi?id=31404
-
- Test: manual-tests/inspector/styled-error-bubbles-in-scripts.html
-
- * inspector/front-end/AbstractTimelinePanel.js:
- (WebInspector.AbstractTimelinePanel.prototype.removeItem):
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourceSidebarTreeElement.prototype.onattach):
-
-2009-11-12 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=31047
- [GTK] Failing test media/video-played-ranges-1.html
-
- Follow-up of r50726, don't block the UI thread when calling
- gst_element_get_state(). Also fixed a compilation warning and some
- static casts.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::playbackPosition):
- (WebCore::MediaPlayerPrivate::seek):
- (WebCore::MediaPlayerPrivate::setRate):
-
-2009-11-12 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=31047
- [GTK] Failing test media/video-played-ranges-1.html
-
- don't pause pipeline if already paused, same for play()
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::play):
- (WebCore::MediaPlayerPrivate::pause):
-
-2009-11-12 Kinuko Yasuda <kinuko@google.com>
-
- Reviewed by David Levin.
-
- Support Gtk scrollwheel behavior for horizontal scrollbars on Linux
- Chromium too.
- https://bugs.webkit.org/show_bug.cgi?id=31292
-
- No new tests. (Corresponding test for Gtk+ is
- platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html)
-
- * page/EventHandler.cpp:
- * page/chromium/EventHandlerChromium.cpp:
-
-2009-11-12 Yuta Kitamura <yutak@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Prevent text inside a multi-column block from being split into columns.
-
- If the tentative height of a multi-column block was too small, we need to
- expand the block height and try to layout again, in order to prevent text
- from being split into different columns.
-
- CSS Multicolumn text is split awkwardly
- https://bugs.webkit.org/show_bug.cgi?id=22249
-
- Test: fast/multicol/single-line.html
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::layoutColumns):
- * rendering/RenderBlock.h:
- * rendering/RenderLineBoxList.cpp:
- (WebCore::RenderLineBoxList::paint):
- * rendering/RenderView.h:
- (WebCore::RenderView::setTruncatedAt):
- (WebCore::RenderView::setMinimumColumnHeight):
- (WebCore::RenderView::minimumColumnHeight):
-
-2009-11-11 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Darin Adler.
-
- Fix a bug that RenderFileUploadControl isn't initialized with multiple files.
- https://bugs.webkit.org/show_bug.cgi?id=31195
-
- Test: fast/forms/input-file-re-render.html
-
- * rendering/RenderFileUploadControl.cpp:
- (WebCore::RenderFileUploadControl::RenderFileUploadControl):
-
-2009-11-09 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Fixing Chromium's POSIX VFS implementation, by adding the required
- "used file descriptors" logic.
-
- https://bugs.webkit.org/show_bug.cgi?id=31275
-
- * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
-
-2009-11-11 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Oliver Hunt.
-
- need to implement aria tree roles
- https://bugs.webkit.org/show_bug.cgi?id=31284
-
- Tests: platform/mac/accessibility/aria-multiselectable.html
- platform/mac/accessibility/aria-tree.html
-
- * accessibility/AccessibilityList.cpp:
- (WebCore::AccessibilityList::accessibilityIsIgnored):
- * accessibility/AccessibilityObject.cpp:
- (WebCore::AccessibilityObject::ariaTreeRows):
- (WebCore::AccessibilityObject::ariaTreeItemContent):
- (WebCore::AccessibilityObject::ariaTreeItemDisclosedRows):
- * accessibility/AccessibilityObject.h:
- (WebCore::):
- (WebCore::AccessibilityObject::isTree):
- (WebCore::AccessibilityObject::isTreeItem):
- (WebCore::AccessibilityObject::setIsExpanded):
- (WebCore::AccessibilityObject::canSetExpandedAttribute):
- (WebCore::AccessibilityObject::hierarchicalLevel):
- (WebCore::AccessibilityObject::setSelectedRows):
- (WebCore::AccessibilityObject::performDefaultAction):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::hierarchicalLevel):
- (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
- (WebCore::AccessibilityRenderObject::isExpanded):
- (WebCore::AccessibilityRenderObject::setElementAttributeValue):
- (WebCore::AccessibilityRenderObject::elementAttributeValue):
- (WebCore::AccessibilityRenderObject::setIsExpanded):
- (WebCore::AccessibilityRenderObject::isSelected):
- (WebCore::AccessibilityRenderObject::setSelected):
- (WebCore::AccessibilityRenderObject::setSelectedRows):
- (WebCore::createARIARoleMap):
- (WebCore::AccessibilityRenderObject::canSetExpandedAttribute):
- (WebCore::AccessibilityRenderObject::ariaTreeSelectedRows):
- (WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren):
- (WebCore::AccessibilityRenderObject::selectedChildren):
- * accessibility/AccessibilityRenderObject.h:
- * accessibility/mac/AccessibilityObjectMac.mm:
- (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
- (RoleEntry::):
- (-[AccessibilityObjectWrapper subrole]):
- (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
- (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
- (-[AccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
- (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
- (-[AccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
- * html/HTMLAttributeNames.in:
-
-2009-11-11 Brent Fulgham <bfulgham@webkit.org>
-
- Build fix after @r50760 with ENABLE_FILTERS.
-
- * platform/graphics/filters/SourceAlpha.cpp:
- (WebCore::SourceAlpha::apply): Supply ColorSpace to fillRect.
- * svg/graphics/filters/SVGFEFlood.cpp: Supply ColorSpace argument
- to fillRect.
-
-2009-11-11 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- Fix WebSocket frame parser of frame_type with high-order bit set.
- https://bugs.webkit.org/show_bug.cgi?id=30668
-
- If buffer is smaller than frame's length, it should break the loop
- instead of reading next byte.
-
- Tests: websocket/tests/frame-length-longer-than-buffer.html
- websocket/tests/frame-length-skip.html
-
- * websockets/WebSocketChannel.cpp:
- (WebCore::WebSocketChannel::didReceiveData):
-
-2009-11-11 Yusuke Sato <yusukes@chromium.org>
-
- Reviewed by Adam Barth.
-
- [chromium] Remove t2embed.dll functions from FontCustomPlatformData.cpp for Chromium
- https://bugs.webkit.org/show_bug.cgi?id=31345
-
- Remove dependency on t2embed.dll so that Chromium for Windows can start even if t2embed.dll cannot be accessed.
-
- * platform/graphics/chromium/FontCustomPlatformData.cpp:
- (WebCore::FontCustomPlatformData::~FontCustomPlatformData): Remove TTDeleteEmbeddedFont() call. Always use RemoveFontMemResourceEx().
- (WebCore::FontCustomPlatformData::fontPlatformData): Remove TTGetNewFontName() call.
- (WebCore::createFontCustomPlatformData): Remove TTLoadEmbeddedFont() call. Always use AddFontMemResourceEx() via renameAndActivateFont() in opentype/OpenTypeUtility.h. Remove EOTStream class as well.
-
-2009-11-11 Beth Dakin <bdakin@apple.com>
-
- Build fix. No review needed.
-
- * platform/graphics/gtk/FontGtk.cpp:
- (WebCore::Font::drawComplexText):
-
-2009-11-11 Beth Dakin <bdakin@apple.com>
-
- Build fix. No review needed.
-
- * platform/graphics/cairo/FontCairo.cpp:
- (WebCore::Font::drawGlyphs):
-
-2009-11-11 Beth Dakin <bdakin@apple.com>
-
- Windows build fix. No review needed.
-
- * platform/graphics/win/FontCGWin.cpp:
- (WebCore::Font::drawGlyphs):
-
-2009-11-11 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Simon Fraser.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=31382
- Make -webkit-color-correction work with shadows
-
- From canvas, just send DeviceColorSpace to setShadow() for now.
- Will fix soon when I address https://bugs.webkit.org/show_bug.cgi?id=31319
- * html/canvas/CanvasRenderingContext2D.cpp:
- (WebCore::CanvasRenderingContext2D::setShadow):
- (WebCore::CanvasRenderingContext2D::applyShadow):
-
- setShadow() and setPlatformShadow() now take a ColorSpace.
- * platform/graphics/GraphicsContext.cpp:
- (WebCore::GraphicsContext::setShadow):
+ (WebCore::CanvasRenderingContext2D::isPointInPath):
+ (WebCore::CanvasRenderingContext2D::willDraw):
+ * html/canvas/CanvasRenderingContext2D.h:
* platform/graphics/GraphicsContext.h:
+ * platform/graphics/Path.h:
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
+ * platform/graphics/cairo/PathCairo.cpp:
+ * platform/graphics/cairo/TransformationMatrixCairo.cpp:
* platform/graphics/cg/GraphicsContextCG.cpp:
- (WebCore::createCGColorWithColorSpace): New helper to create a
- color in a ColorSpace.
- (WebCore::setCGFillColor): Call new helper.
- (WebCore::setCGStrokeColor): Call new helper.
- (WebCore::GraphicsContext::setPlatformShadow): Call new helper.
+ * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
+ * platform/graphics/cg/PathCG.cpp:
+ * platform/graphics/cg/TransformationMatrixCG.cpp:
* platform/graphics/haiku/GraphicsContextHaiku.cpp:
- (WebCore::GraphicsContext::setPlatformShadow):
-
- Send appropriate ColorSpace to setShadow().
- * platform/graphics/mac/FontMac.mm:
- (WebCore::Font::drawGlyphs):
- * rendering/EllipsisBox.cpp:
- (WebCore::EllipsisBox::paint):
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::paintTextDecorations):
- * rendering/InlineTextBox.cpp:
- (WebCore::paintTextWithShadows):
- (WebCore::InlineTextBox::paintDecoration):
- * rendering/RenderBoxModelObject.cpp:
- (WebCore::RenderBoxModelObject::paintBoxShadow):
- * rendering/SVGInlineTextBox.cpp:
- (WebCore::SVGInlineTextBox::paintCharacters):
- * rendering/SVGRenderSupport.cpp:
- (WebCore::SVGRenderBase::prepareToRenderSVGContent):
-
- Attempt to keep ports building.
- * platform/graphics/cairo/GraphicsContextCairo.cpp:
- (WebCore::GraphicsContext::setPlatformShadow):
+ * platform/graphics/haiku/PathHaiku.cpp:
* platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::GraphicsContext::setPlatformShadow):
+ * platform/graphics/qt/PathQt.cpp:
+ * platform/graphics/qt/TransformationMatrixQt.cpp:
* platform/graphics/skia/GraphicsContextSkia.cpp:
- (WebCore::GraphicsContext::setPlatformShadow):
+ * platform/graphics/skia/PathSkia.cpp:
+ * platform/graphics/skia/TransformationMatrixSkia.cpp:
+ * platform/graphics/transforms/AffineTransform.cpp: Removed.
+ * platform/graphics/transforms/AffineTransform.h: Removed.
* platform/graphics/wince/GraphicsContextWince.cpp:
- (WebCore::GraphicsContext::setPlatformShadow):
* platform/graphics/wx/GraphicsContextWx.cpp:
- (WebCore::GraphicsContext::setPlatformShadow):
+ * platform/graphics/wx/PathWx.cpp:
+ * platform/graphics/wx/TransformationMatrixWx.cpp:
+ (WebCore::TransformationMatrix::operator wxGraphicsMatrix):
-2009-11-11 Kent Tamura <tkent@chromium.org>
+2010-01-31 Kwang Yul Seo <skyul@company100.net>
Reviewed by Darin Adler.
- Print the file text of a file upload control in DumpRenderTree for ease of tests.
- https://bugs.webkit.org/show_bug.cgi?id=31195
-
- * rendering/RenderFileUploadControl.cpp:
- (WebCore::RenderFileUploadControl::paintObject):
- (WebCore::RenderFileUploadControl::fileTextValue):
- * rendering/RenderFileUploadControl.h:
- (WebCore::RenderFileUploadControl::isFileUploadControl):
- (WebCore::toRenderFileUploadControl):
- * rendering/RenderObject.h:
- (WebCore::RenderObject::isFileUploadControl):
- * rendering/RenderTreeAsText.cpp:
- (WebCore::operator<<):
+ Limit the scope of packing alignment to avoid MSVC C4103 warning.
+ https://bugs.webkit.org/show_bug.cgi?id=34390
-2009-11-11 Gavin Barraclough <barraclough@apple.com>
-
- Reviewed by Sam Weinig.
+ Use pack(push, 16) and pack(pop) to limit the scope of packing
+ alignment change.
- DOM Wrappers for some nodes may not be marked.
- https://bugs.webkit.org/show_bug.cgi?id=31380
+ * bindings/js/JSSVGPODTypeWrapper.h:
- Some markChildren methods are calling getCachedDOMNodeWrapper, which will find
- the wrapper for the current world only. This means that wrappers may be GC'ed
- prematurely, and properties lost.
-
- Move to a model more like markDOMObjectWrapper, mark wrappers for all worlds.
-
- * bindings/js/JSAttrCustom.cpp:
- (WebCore::JSAttr::markChildren):
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::markDOMNodeWrapper):
- * bindings/js/JSDOMBinding.h:
- * bindings/js/JSNamedNodeMapCustom.cpp:
- (WebCore::JSNamedNodeMap::markChildren):
- * bindings/js/JSNodeCustom.cpp:
- (WebCore::JSNode::markChildren):
- * bindings/js/JSSVGElementInstanceCustom.cpp:
- (WebCore::JSSVGElementInstance::markChildren):
- * bindings/js/JSStyleSheetCustom.cpp:
- (WebCore::JSStyleSheet::markChildren):
-
-2009-11-11 Ben Murdoch <benm@google.com>
+2010-01-31 Kent Tamura <tkent@chromium.org>
Reviewed by Darin Adler.
- bindings/js/ScriptObject.cpp is missing and ENABLE(INSPECTOR) guard.
- https://bugs.webkit.org/show_bug.cgi?id=31384
-
- No functionality change so no tests required.
-
- * bindings/js/ScriptObject.cpp: Add ENABLE(INSPECTOR) guard around the JSInspectorBackend.h include.
-
-2009-11-11 Jens Alfke <snej@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- The Big De-Inlining. 450k code size reduction (32-bit x86.)
- - Various inline functions in V8Binding.h made non-inline.
- - Some renaming for consistency.
- - New function createRawTemplate().
- https://bugs.webkit.org/show_bug.cgi?id=31383
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/V8Binding.cpp:
- (WebCore::v8DOMWrapperToNative):
- (WebCore::v8ValueToWebCoreString):
- (WebCore::v8ValueToAtomicWebCoreString):
- (WebCore::toInt32):
- (WebCore::toWebCoreString):
- (WebCore::toWebCoreStringWithNullCheck):
- (WebCore::toAtomicWebCoreStringWithNullCheck):
- (WebCore::toWebCoreStringWithNullOrUndefinedCheck):
- (WebCore::isUndefinedOrNull):
- (WebCore::v8Boolean):
- (WebCore::v8UndetectableString):
- (WebCore::v8StringOrNull):
- (WebCore::v8StringOrUndefined):
- (WebCore::v8StringOrFalse):
- (WebCore::v8StringToWebCoreString):
- (WebCore::v8ExternalString):
- (WebCore::createRawTemplate): New function.
- * bindings/v8/V8Binding.h:
- (WebCore::v8DOMWrapperTo):
- (WebCore::v8DOMWrapperToNode):
- (WebCore::v8StringToWebCoreString):
- (WebCore::v8StringToAtomicWebCoreString):
-
-2009-11-11 Jens Alfke <snej@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- More V8 de-inlining (outlining?) Abstracted a chunk of boilerplate code from every
- event-listener setter into a new subroutine transferHiddenDependency().
- https://bugs.webkit.org/show_bug.cgi?id=31377
-
- * bindings/scripts/CodeGeneratorV8.pm: Replace boilerplate with call to transferHiddenDependency().
- * bindings/v8/V8Utilities.cpp:
- (WebCore::transferHiddenDependency): New.
- * bindings/v8/V8Utilities.h: Declaration of transferHiddenDependency.
-
-2009-11-11 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Beth Dakin.
-
- If we are on Windows, don't try and get the kCGColorSpaceSRGB ColorSpace,
- because there is a CG bug preventing this from working.
-
- * platform/graphics/cg/GraphicsContextCG.cpp:
- (WebCore::sRGBColorSpaceRef):
-
-2009-11-11 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Check that if Storage panel exists before calling its methods
-
- https://bugs.webkit.org/show_bug.cgi?id=31343
-
- * inspector/front-end/inspector.js:
- (WebInspector.addDatabase):
- (WebInspector.addCookieDomain):
- (WebInspector.addDOMStorage):
- (WebInspector.updateDOMStorage):
-
-2009-11-11 Jens Alfke <snej@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- De-inline convertNodeToV8Object(), which expands to a lot of asm code and is inlined 136
- times in the generated V8 bindings.
- https://bugs.webkit.org/show_bug.cgi?id=31368
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::convertNodeToV8Object): Moved body here from .h file
- * bindings/v8/V8DOMWrapper.h: Removed inline method body.
-
-2009-11-11 Jessie Berlin <jberlin@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Display the correct summary in the web inspector for the shorthands
- border-color, border-width, border-style, margin, and padding.
- https://bugs.webkit.org/show_bug.cgi?id=7987
-
- Test: fast/css/shorthands-four-values.html
-
- * css/CSSMutableStyleDeclaration.cpp:
- (WebCore::CSSMutableStyleDeclaration::get4Values):
- Display the summary information in the same way the shorthand would be
- specified in a css rule.
-
-2009-11-11 Jens Alfke <snej@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Make V8 bindings return NULL handles instead of calling v8::Undefined(). This has equivalent
- meaning to the caller, saves code, and appears to save a few cycles at runtime too.
- https://bugs.webkit.org/show_bug.cgi?id=31367
-
- * bindings/scripts/CodeGeneratorV8.pm: Change "v8::Undefined()" to "v8::Handle<v8::Value>()"
-
-2009-11-11 Jens Alfke <snej@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Optimize V8 getDOMNodeMap(), a hot function in Dromaeo DOM tests, by increasing inlining.
-
- * bindings/v8/DOMData.cpp:
- (WebCore::DOMData::getCurrent): Moved getCurrentMainThread to MainThreadDOMData::getCurrent
- so it can be inlined by its caller.
- * bindings/v8/DOMData.h:
- * bindings/v8/MainThreadDOMData.cpp:
- (WebCore::MainThreadDOMData::getCurrent): Moved here from DOMData.cpp.
- (WebCore::MainThreadDOMData::getMainThreadStore): Added UNLIKELY macro to improve codegen.
- (WebCore::MainThreadDOMData::getCurrentMainThreadStore): Combination of getCurrentMainThread
- and getStore, which inline both calls together.
- * bindings/v8/MainThreadDOMData.h:
- (WebCore::MainThreadDOMData::getStore): Broke out nonvirtual getMainThreadStore for inlineability.
- * bindings/v8/V8DOMMap.cpp:
- (WebCore::getDOMNodeMap): Call new getCurrentMainThreadStore, which is faster.
-
-2009-11-11 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Add methods to KURLGoogle.cpp declared in http://trac.webkit.org/changeset/50784 but not defined when using KURLGoogle.
-
- https://bugs.webkit.org/show_bug.cgi?id=31357
-
- * platform/KURLGoogle.cpp:
- (WebCore::isSchemeFirstChar):
- (WebCore::isSchemeChar):
- (WebCore::KURL::hasPort):
- (WebCore::KURL::removePort):
- (WebCore::protocolIsValid):
-
-2009-11-11 Brent Fulgham <bfulgham@webkit.org>
-
- Build fix, no reviewed.
-
- Correct setPlatformFillColor and setPlatformStrokeColor calls
- to match new ColorSpace-supporting signatures.
-
- * platform/graphics/win/GraphicsContextCairoWin.cpp: Add the
- color space to the set[...]Color calls.
-
-2009-11-10 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Sam Weinig.
-
- https://bugs.webkit.org/show_bug.cgi?id=31327
- Clean up SocketStreamHandleClient interface
-
- No change in behavior.
-
- * platform/network/SocketStreamHandleClient.h: Removed willOpenStream and willSendData.
- (WebCore::SocketStreamHandleClient::willOpenStream): Removed. This is currently not used by
- the only client (WebSocketChannel), and it's not clear what this callback's semantics
- should be.
- (WebCore::SocketStreamHandleClient::willSendData): Ditto.
- (WebCore::SocketStreamHandleClient::receivedCancellation): Removed, because it was misplaced.
- For ResourceHandle, this method is called when the user cancels authentication sheet,
- not when something happens with the stream.
-
- * websockets/WebSocketChannel.h: Some WebSocketChannel methods were virtual without any
- reason. Also, added didReceiveAuthenticationChallenge/didCancelAuthenticationChallenge.
-
- * websockets/WebSocketChannel.cpp: Adjusted for the above change. Authentication-related
- callbacks have no real implementation yet.
-
-2009-11-11 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Allow custom memory allocation control for the part of page directory in WebCore
- https://bugs.webkit.org/show_bug.cgi?id=31350
-
- Inherits the following classes from Noncopyable because these are instantiated
- by 'new' and these are no need to be copyable:
-
- class DragController - instantiated at: WebCore/page/Page.cpp:107
- class FocusController - instantiated at: WebCore/page/Page.cpp:109
- class Settings - instantiated at: WebCore/page/Page.cpp:116
- class PluginHalter - instantiated at: WebCore/page/Page.cpp:160
- struct ScheduledEvent - instantiated at: WebCore/page/FrameView.cpp:1275
- class UserScript - instantiated at: WebCore/page/PageGroup.cpp:208
- struct EventHandlerDragState - instantiated at: WebCore/page/EventHandler.cpp:182
- class XSSAuditor - instantiated at: WebCore/bindings/js/ScriptController.cpp:70
- class UserStyleSheet - instantiated at: WebCore/page/PageGroup.cpp:222
-
- Inherits PropertyWrapperBase class from Noncopyable because (its child class)
- PropertyWrapper is instantiated by 'new' in
- WebCore/page/animation/AnimationBase.cpp:564 it is no need to be copyable.
-
- * page/DragController.h:
- * page/EventHandler.h:
- * page/FocusController.h:
- * page/FrameView.cpp:
- * page/PluginHalter.h:
- * page/Settings.h:
- * page/UserScript.h:
- * page/UserStyleSheet.h:
- * page/XSSAuditor.h:
- * page/animation/AnimationBase.cpp:
-
-2009-11-11 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- https://bugs.webkit.org/show_bug.cgi?id=31323
- Fix a few compiler warnings
-
- No new tests as there is no new functionality.
-
- * editing/htmlediting.cpp:
- (WebCore::isRenderedAsNonInlineTableImageOrHR): Use explicit
- parentheses to silence gcc 4.4 -Wparentheses warnings
-
-2009-11-11 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Mark Rowe.
-
- Set m_hasPendingGeometryChange to true by default, so that
- at least one call to NPP_SetWindow is executed, which is
- needed by the DRT plugin testing framework.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::PluginView):
-
-2009-11-11 Csaba Osztrogonác <ossy@webkit.org>
-
- Rubber-stamped by Kenneth Rohde Christiansen.
-
- https://bugs.webkit.org/show_bug.cgi?id=31348
- [Qt] Remove unnecessary LUT creator from WebCore.pro
-
- * WebCore.pro:
+ Fix valueAsNumber calculation for type=month.
+ https://bugs.webkit.org/show_bug.cgi?id=34304
-2009-11-11 Simon Hausmann <simon.hausmann@nokia.com>
+ valueAsNumber calculation for type=month which was checked in as
+ r53893 was the number of milliseconds since UNIX epoch, and it was
+ wrong. The correct way is the number months since UNIX epoch.
- Reviewed by Tor Arne Vestbø.
-
- Introduce a function for querying the input method status
- in QWebPageClient.
-
- * platform/qt/QWebPageClient.h:
-
-2009-11-11 Benjamin Otte <otte@gnome.org>
-
- Reviewed by Jan Alonzo.
-
- [GTK] Black artifacts in youtube.com/html5
-
- Paint the video to the given size. It's the job of the callers to keep
- track of aspect ratio. RenderVideo.cpp does it for the <video>
- element.
- https://bugs.webkit.org/show_bug.cgi?id=30925
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::paint):
-
-2009-11-11 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=30901
- [Gtk] Need to de-lint the Atk a11y code
-
- Cleaned up some missed capitalization style-guideline violations.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
-
-2009-11-11 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
-
- Reviewed by Eric Seidel.
-
- [Qt] Make the default style background color valid.
- Currently the color is transparent but invalid, this causes
- list boxes in QtWebKit to be drawn with a black background
- since r49242.
- https://bugs.webkit.org/show_bug.cgi?id=31295
-
- * rendering/style/RenderStyle.h:
- (WebCore::InheritedFlags::initialBackgroundColor):
- * rendering/style/StyleBackgroundData.cpp:
- (WebCore::StyleBackgroundData::StyleBackgroundData):
-
-2009-11-10 Gavin Barraclough <barraclough@apple.com>
-
- Reviewed by Geoff Garen.
-
- Simplify the ownership model for worlds - rather than having a pair of weak references
- between DOMWrapperWorld and ScriptController/ScriptCachedFrameData, give the latter an
- ref pointer to the former. This reduces complexity & cost of the caching entries in the
- back forward cache.
-
- * WebCore.base.exp:
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
- * bindings/js/JSDOMBinding.h:
- (WebCore::DOMWrapperWorld::forgetDocument):
- * bindings/js/ScriptCachedFrameData.cpp:
- (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
- (WebCore::ScriptCachedFrameData::restore):
- (WebCore::ScriptCachedFrameData::clear):
- * bindings/js/ScriptCachedFrameData.h:
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::~ScriptController):
- (WebCore::ScriptController::clearWindowShell):
- (WebCore::ScriptController::initScript):
- (WebCore::ScriptController::updateDocument):
- * bindings/js/ScriptController.h:
-
-2009-11-10 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Darin Adler.
-
- rename counter to makeCounterNode in RenderCounter.cpp
- https://bugs.webkit.org/show_bug.cgi?id=31289
-
- No new test because this is just a small refactoring.
-
- * rendering/RenderCounter.cpp:
- (WebCore::findPlaceForCounter):
- (WebCore::makeCounterNode):
- (WebCore::RenderCounter::originalText):
-
-2009-11-10 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- https://bugs.webkit.org/show_bug.cgi?id=30754
-
- Patch 2 of 2.
-
- Removed method EventHandler::dragSourceMovedTo, since it is no longer
- needed. This method fired a drag event whenever the mouse moved, but
- section 7.9.4 of the HTML 5 spec. defines the drag-and-drop processing
- model independent of when the mouse moves. See "Among other changes..."
- in the change log for patch 1 for more details.
-
- * WebCore.DragSupport.exp:
- * page/EventHandler.cpp: Removed method EventHandler::dragSourceMovedTo.
- (WebCore::EventHandler::handleDrag): Updated comment about reentrancy issue.
- * page/EventHandler.h:
-
-2009-11-10 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- https://bugs.webkit.org/show_bug.cgi?id=30754
-
- Patch 1 of 2.
-
- As per Section 7.9.4 of the HTML 5 spec. <http://dev.w3.org/html5/spec/Overview.html#drag-and-drop-processing-model>,
- the drag event should always fire before the dragover event.
-
- In fixing this bug, this patch also makes our drag processing model
- conform to the HTML 5 spec.
-
- Among the changes, this patch ensures that the drag event isn't fired outside
- of the drag-and-drop processing loop, WebCore::EventHandler::updateDragAndDrop.
- Currently, the drag event is fired whenever the mouse button is down and the OS
- detects the mouse moved. But, as per the spec, the drag event should
- fire approx. every 350ms so long as the mouse button is down.
-
- Test: fast/events/drag-and-drop-fire-drag-dragover.html
-
- * page/EventHandler.cpp:
- (WebCore::EventHandler::clear):
- (WebCore::EventHandler::canHandleDragAndDropForTarget): Formerly named handleDragAndDropForTarget.
- Modified to determine when we are in the correct instance of EventHandler to service the drag
- and drop operation.
- (WebCore::EventHandler::updateDragAndDrop): Moved code from WebCore::EventHandler::dragSourceMovedTo
- into this method.
- (WebCore::EventHandler::cancelDragAndDrop):
- (WebCore::EventHandler::performDragAndDrop):
- (WebCore::EventHandler::clearDragState):
- * page/EventHandler.h: Added field m_shouldOnlyFireDragOverEvent to determine whether
- we should fire both drag and dragover events or only the dragover event.
-
-2009-11-10 Vitaly Repeshko <vitalyr@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Fix crash in V8CustomXPathNSResolver (http://crbug.com/26726).
- https://bugs.webkit.org/show_bug.cgi?id=31301
-
- Tested by new fast/xpath/xpath-detached-iframe-resolver-crash.html.
-
- Allowed passing V8Proxy for the calling JS context:
- * bindings/v8/V8DOMWrapper.h:
- (WebCore::V8DOMWrapper::getXPathNSResolver):
- * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
- (WebCore::V8CustomXPathNSResolver::create):
- (WebCore::V8CustomXPathNSResolver::V8CustomXPathNSResolver):
- (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
- * bindings/v8/custom/V8CustomXPathNSResolver.h:
- * bindings/v8/custom/V8DocumentCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
+ * html/DateComponents.cpp:
+ (WebCore::DateComponents::setMonthsSinceEpoch):
+ (WebCore::DateComponents::monthsSinceEpoch):
+ * html/DateComponents.h: Declare setMonthsSinceEpoch() and monthsSinceEpoch().
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::parseToDouble):
+ Switch to monthsSinceEpoch() for type=MONTH.
+ (WebCore::HTMLInputElement::valueAsDate):
+ Add code with millisecondsSinceEpoch() for MONTH because
+ parseToDouble() changed its behavior.
+ (WebCore::HTMLInputElement::setValueAsNumber):
+ Use setMonthsSinceEpoch() for MONTH.
-2009-11-10 Yael Aharon <yael.aharon@nokia.com>
+2010-01-31 Dan Bernstein <mitz@apple.com>
Reviewed by Timothy Hatcher.
- Implement URL decomposition IDL attributes for HTMLAnchorElement.
- https://bugs.webkit.org/show_bug.cgi?id=29972.
-
- Add methods for setting different parts of the URL in href attribute.
-
- Tests: fast/dom/HTMLAnchorElement/set-href-attribute-hash.html
- fast/dom/HTMLAnchorElement/set-href-attribute-host.html
- fast/dom/HTMLAnchorElement/set-href-attribute-hostname.html
- fast/dom/HTMLAnchorElement/set-href-attribute-pathname.html
- fast/dom/HTMLAnchorElement/set-href-attribute-port.html
- fast/dom/HTMLAnchorElement/set-href-attribute-protocol.html
- fast/dom/HTMLAnchorElement/set-href-attribute-search.html
-
- * bindings/js/JSLocationCustom.cpp:
- (WebCore::JSLocation::setPort):
- * html/HTMLAnchorElement.cpp:
- (WebCore::parsePortFromStringPosition):
- (WebCore::HTMLAnchorElement::setHash):
- (WebCore::HTMLAnchorElement::setHost):
- (WebCore::HTMLAnchorElement::setHostname):
- (WebCore::HTMLAnchorElement::setPathname):
- (WebCore::HTMLAnchorElement::setPort):
- (WebCore::HTMLAnchorElement::setProtocol):
- (WebCore::HTMLAnchorElement::setSearch):
- * html/HTMLAnchorElement.h:
- * html/HTMLAnchorElement.idl:
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::iconURL):
- * platform/KURL.cpp:
- (WebCore::KURL::removePort):
- (WebCore::KURL::setPort):
- (WebCore::KURL::prettyURL):
- (WebCore::protocolIsValid):
- * platform/KURL.h:
- (WebCore::KURL::canSetHostOrPort):
- (WebCore::KURL::canSetPathname):
- (WebCore::KURL::hasPort):
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::):
-
-2009-11-10 Nate Chapin <japhet@chromium.org>
-
- Unreviewed, fix Chromium build after http://trac.webkit.org/changeset/50760.
-
- * platform/chromium/PopupMenuChromium.cpp:
- (WebCore::PopupContainer::paintBorder):
- (WebCore::PopupListBox::paint):
- (WebCore::PopupListBox::paintRow):
- * platform/graphics/chromium/TransparencyWin.cpp:
- (WebCore::TransparencyWin::setupLayerForWhiteLayer):
- * platform/graphics/skia/GraphicsContextSkia.cpp:
- (WebCore::GraphicsContext::fillRect):
- (WebCore::GraphicsContext::fillRoundedRect):
- (WebCore::GraphicsContext::setPlatformFillColor):
- (WebCore::GraphicsContext::setPlatformStrokeColor):
- * rendering/RenderMediaControlsChromium.cpp:
- (WebCore::paintMediaSlider):
- (WebCore::paintMediaVolumeSlider):
- (WebCore::paintMediaTimelineContainer):
- * rendering/RenderThemeChromiumMac.mm:
- (WebCore::RenderThemeChromiumMac::paintMenuListButton):
-
-2009-11-10 Brady Eidson <beidson@apple.com>
-
- Reviewed by Sam Weinig.
-
- Repro crash saving pcmag.com article as a webarchive.
- <rdar://problem/7381219> and https://webkit.org/b/31322
-
- Test: http/tests/webarchive/cross-origin-stylesheet-crash.html
-
- * css/CSSStyleSheet.cpp:
- (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Walk the stylesheet itself instead
- of creating a CSSRuleList (and subjecting ourselves to the security origin check)
-
-2009-11-10 Beth Dakin <bdakin@apple.com>
-
- Attempt 2 to fix Tiger build. No review needed.
-
- * platform/graphics/cg/GraphicsContextCG.cpp:
- (WebCore::deviceRGBColorSpaceRef):
- (WebCore::sRGBColorSpaceRef):
-
-2009-11-10 Kevin Ollivier <kevino@theolliviers.com>
-
- wx build fix. Changes needed after r50760.
-
- * platform/graphics/wx/GraphicsContextWx.cpp:
- (WebCore::GraphicsContext::GraphicsContext):
- * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp:
- (WebCore::drawTextWithSpacing):
-
-2009-11-10 Alexey Proskuryakov <ap@apple.com>
-
- Qt build fix.
-
- * platform/network/ResourceHandle.h: Only inherit from AuthenticationClient on platforms
- that use ResourceHandle as a delegate (Mac, CFNetwork, Curl).
-
-2009-11-10 Beth Dakin <bdakin@apple.com>
-
- Tiger build fix. No review needed.
-
- * platform/graphics/cg/GraphicsContextCG.cpp:
- (WebCore::sRGBColorSpaceRef):
-
-2009-11-10 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=31312
- Decouple authentication panel callbacks from ResourceHandle
+ Web Inspector: REGRESSION: Numbers in bubbles are vertically off-center
+ https://bugs.webkit.org/show_bug.cgi?id=34398
- No change in functionality.
+ * inspector/front-end/inspector.css: Specify line-height: normal for
+ ".console-message .bubble" and ".sidebar-tree-item .status .bubble".
- SocketStreamHandle also needs to request credentials, so it's not appropriate to store
- ResourceHandle as delegate.
-
- * WebCore.vcproj/WebCore.vcproj:
- * platform/network/AuthenticationClient.h: Added.
- Added a new interface for listening to authentication panel notifications.
-
- * WebCore.xcodeproj/project.pbxproj: Added AuthenticationClient.h. Let Visual Studio do what
- it wants with the project file.
-
- (WebCore::AuthenticationClient::ref): Using our usual method of exposing refcounting on an
- interface class.
- (WebCore::AuthenticationClient::deref): Ditto.
-
- * platform/network/ResourceHandle.h:
- (WebCore::ResourceHandle::refAuthenticationClient): Ditto.
- (WebCore::ResourceHandle::derefAuthenticationClient): Ditto.
-
- * platform/network/cf/AuthenticationCF.cpp:
- (WebCore::AuthenticationChallenge::AuthenticationChallenge):
- (WebCore::AuthenticationChallenge::platformCompare):
- * platform/network/cf/AuthenticationChallenge.h:
- (WebCore::AuthenticationChallenge::authenticationClient):
- * platform/network/chromium/AuthenticationChallenge.h:
- (WebCore::AuthenticationChallenge::authenticationClient):
- * platform/network/curl/AuthenticationChallenge.h:
- (WebCore::AuthenticationChallenge::authenticationClient):
- Keeping a reference to AuthenticationClient, not to ResourceHandle.
-
-2009-11-10 Beth Dakin <bdakin@apple.com>
-
- Second attempted gtk build fix. No review needed.
-
- * html/canvas/CanvasStyle.cpp:
- (WebCore::CanvasStyle::applyStrokeColor):
-
-
-2009-11-10 Gavin Barraclough <barraclough@apple.com>
-
- Reviewed by Geoff Garen.
-
- Fix back/forwards cache with JSC isolated worlds.
- https://bugs.webkit.org/show_bug.cgi?id=31310
- <rdar://problem/7328111> Cached back navigation doesn't restore global object in extension isolated world
-
- Store the global object for all worlds, not just the normal world.
- Also maintain bidirectional weak references between the ScriptCachedFrameData and the DOMWrapperWorld,
- so we can forget global objects if a world goes away.
-
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
- * bindings/js/JSDOMBinding.h:
- (WebCore::DOMWrapperWorld::rememberScriptCachedFrameData):
- (WebCore::DOMWrapperWorld::forgetScriptCachedFrameData):
- * bindings/js/ScriptCachedFrameData.cpp:
- (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
- (WebCore::ScriptCachedFrameData::forgetWorld):
- (WebCore::ScriptCachedFrameData::domWindow):
- (WebCore::ScriptCachedFrameData::restore):
- (WebCore::ScriptCachedFrameData::clear):
- * bindings/js/ScriptCachedFrameData.h:
- * bindings/js/ScriptController.h:
-
-2009-11-10 Csaba Osztrogonác <ossy@webkit.org>
-
- [Qt] Unreviewed buildfix after r50760.
-
- * platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::GraphicsContext::GraphicsContext):
-
-2009-11-10 Beth Dakin <bdakin@apple.com>
-
- Attempted build fix. (No review needed.)
-
- * GNUmakefile.am: Adding ColorSpace.h
-
-2009-11-10 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by NOBODY - Build Fix.
-
- Updated function calls to take a ColorSpace argument, passing
- in DeviceColorSpace for now - this should be fixed. Also added
- ColorSpace.h to WebCore project.
-
- * WebCore.vcproj/WebCore.vcproj:
- * platform/graphics/win/FontCGWin.cpp:
- (WebCore::Font::drawGlyphs):
- * platform/graphics/win/GraphicsContextCGWin.cpp:
- (WebCore::GraphicsContext::GraphicsContext):
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::paint):
- * platform/win/WebCoreTextRenderer.cpp:
- (WebCore::doDrawTextAtPoint):
- * rendering/RenderThemeSafari.cpp:
- (WebCore::RenderThemeSafari::paintMenuListButton):
-
-2009-11-10 Jens Alfke <snej@chromium.org>
+2010-01-28 Ojan Vafai <ojan@chromium.org>
Reviewed by Darin Adler.
- Optimizations to Element::getAttribute
- https://bugs.webkit.org/show_bug.cgi?id=30926
-
- * dom/Element.cpp:
- (WebCore::Element::getAttribute): User case-insensitive compare instead of lowercasing the name.
- * dom/NamedAttrMap.cpp:
- (WebCore::NamedNodeMap::getAttributeItem): Avoid redundant compares, and do fast/likely compares first.
- * platform/text/PlatformString.h:
- (WebCore::equalPossiblyIgnoringCase): New inline method, used by both of the above.
-
-2009-11-10 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Darin Adler.
-
- Fix for <rdar://problem/7059710>
- -and corresponding-
- https://bugs.webkit.org/show_bug.cgi?id=31196 Implement -webkit-
- color-correction for CSS colors
-
- New exported symbol for GraphicsContext::fillColor() which now
- accepts a ColorSpace as an optional parameter.
- * WebCore.base.exp:
-
- Added a new file, ColorSpace.h, to define the ColorSpace enum.
- * WebCore.xcodeproj/project.pbxproj:
-
- Computed Style for -webkit-color-correction
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::):
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
-
- Parse -webkit-color-correction
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue):
-
- Map CSS identifiers to the appropriate values of the ColorSpace enum
- * css/CSSPrimitiveValueMappings.h:
- (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
- (WebCore::CSSPrimitiveValue::operator ColorSpace):
-
- New property -webkit-color-correction
- * css/CSSPropertyNames.in:
-
- Map -webkit-color-correction into the RenderStyle.
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty):
+ Implement CSSOM Range.getClientRects for collapsed selections
+ https://bugs.webkit.org/show_bug.cgi?id=34239
- Add new value sRGB.
- * css/CSSValueKeywords.in:
+ When getting the quads for a range on a text node, allow returning
+ zero width quads. This leaves the case of collapsed selections inside
+ elements still not fixed, but no worse.
- Comment out the reference to sRGB since it will now be inherited as
- a value from CSSValueKeywords.
- * css/SVGCSSValueKeywords.in:
-
- Definition of the ColorSpace enum.
- * platform/graphics/ColorSpace.h: Added.
- (WebCore::):
-
- These functions all now take a ColorSpace as a parameter.
- * platform/graphics/GraphicsContext.cpp:
- (WebCore::GraphicsContext::setStrokeColor):
- (WebCore::GraphicsContext::setFillColor):
- (WebCore::GraphicsContext::drawHighlightForText):
-
- Return the appropriate ColorSpace.
- (WebCore::GraphicsContext::strokeColorSpace):
- (WebCore::GraphicsContext::fillColorSpace):
-
- These functions all call other functions which require a ColorSpace
- as a parameter.
- (WebCore::GraphicsContext::setStrokePattern):
- (WebCore::GraphicsContext::setFillPattern):
- (WebCore::GraphicsContext::setStrokeGradient):
- (WebCore::GraphicsContext::setFillGradient):
-
- All of the GraphicsContext functions that take a Color should now
- also take a ColorSpace.
- * platform/graphics/GraphicsContext.h:
-
- Added new member variables stokeColorSpace and fillColorSpace.
- * platform/graphics/GraphicsContextPrivate.h:
- (WebCore::GraphicsContextState::GraphicsContextState):
-
- Attempt to keep the Cairo port building with all of the massive
- changes to GraphicsContext.
- * platform/graphics/cairo/GraphicsContextCairo.cpp:
- (WebCore::GraphicsContext::fillRect):
- (WebCore::GraphicsContext::setPlatformFillColor):
- (WebCore::GraphicsContext::setPlatformStrokeColor):
- (WebCore::GraphicsContext::fillRoundedRect):
-
-
- * platform/graphics/cg/GraphicsContextCG.cpp:
- (WebCore::sRGBColorSpaceRef): New static function that returns a
- CGColorSpaceRef for the sRGB color space.
- (WebCore::deviceRGBColorSpaceRef): New static function that returns
- a CGColorSpaceRef for the device RGB color space.
-
- (WebCore::setCGFillColor): Now takes a ColorSpace parameter and
- sets the fill color to the specified color in the given ColorSpace.
- (WebCore::setCGStrokeColor): Same, but for stroke.
-
- (WebCore::setCGFillColorSpace): New static to set the
- CGFillColorSpace to the given ColorSpace
- (WebCore::setCGStrokeColorSpace): Same, but for stroke.
-
- Send ColorSpaces when appropriate, set ColorSpaces when
- appropriate, and check ColorSpaces when appropriate.
- (WebCore::GraphicsContext::GraphicsContext):
- (WebCore::GraphicsContext::drawRect):
- (WebCore::GraphicsContext::drawLine):
- (WebCore::GraphicsContext::fillPath):
- (WebCore::GraphicsContext::strokePath):
- (WebCore::GraphicsContext::fillRect):
- (WebCore::GraphicsContext::fillRoundedRect):
- (WebCore::GraphicsContext::strokeRect):
- (WebCore::GraphicsContext::drawLineForText):
- (WebCore::GraphicsContext::setPlatformStrokeColor):
- (WebCore::GraphicsContext::setPlatformFillColor):
-
- Attempt to keep Haiku building.
- * platform/graphics/haiku/GraphicsContextHaiku.cpp:
- (WebCore::GraphicsContext::fillRect):
- (WebCore::GraphicsContext::fillRoundedRect):
- (WebCore::GraphicsContext::setPlatformStrokeColor):
- (WebCore::GraphicsContext::setPlatformFillColor):
-
- Attempt to keep QT building.
- * platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::GraphicsContext::fillRect):
- (WebCore::GraphicsContext::fillRoundedRect):
- (WebCore::GraphicsContext::setPlatformStrokeColor):
- (WebCore::GraphicsContext::setPlatformFillColor):
-
- Attempt to keep Wince building.
- * platform/graphics/wince/GraphicsContextWince.cpp:
- (WebCore::GraphicsContext::fillRect):
- (WebCore::GraphicsContext::setPlatformFillColor):
- (WebCore::GraphicsContext::setPlatformStrokeColor):
- (WebCore::GraphicsContext::clearRect):
- (WebCore::GraphicsContext::fillRoundedRect):
- (WebCore::GraphicsContext::setPlatformShadow):
-
- Attempt to keep WX building.
- * platform/graphics/wx/GraphicsContextWx.cpp:
- (WebCore::GraphicsContext::fillRect):
- (WebCore::GraphicsContext::fillRoundedRect):
- (WebCore::GraphicsContext::setPlatformStrokeColor):
- (WebCore::GraphicsContext::setPlatformFillColor):
-
- Added functions colorSpace() and setColorSpace()
- * rendering/style/RenderStyle.h:
- (WebCore::InheritedFlags::colorSpace):
- (WebCore::InheritedFlags::setColorSpace):
-
- The ColorSpace is stored here.
- * rendering/style/StyleRareInheritedData.cpp:
- (WebCore::StyleRareInheritedData::StyleRareInheritedData):
- (WebCore::StyleRareInheritedData::operator==):
- * rendering/style/StyleRareInheritedData.h:
-
- All of these call sites call GraphicsContext functions which now
- require ColorSpaces.
- * editing/SelectionController.cpp:
- (WebCore::SelectionController::paintCaret):
- * html/canvas/CanvasRenderingContext2D.cpp:
- (WebCore::CanvasRenderingContext2D::drawTextInternal):
- * html/canvas/CanvasStyle.cpp:
- (WebCore::CanvasStyle::applyStrokeColor):
- (WebCore::CanvasStyle::applyFillColor):
- * inspector/InspectorController.cpp:
- (WebCore::drawOutlinedQuad):
- * page/FrameView.cpp:
- (WebCore::FrameView::paintContents):
- * platform/ScrollbarTheme.h:
- (WebCore::ScrollbarTheme::paintScrollCorner):
- * platform/ScrollbarThemeComposite.cpp:
- (WebCore::ScrollbarThemeComposite::paintScrollCorner):
- * platform/graphics/Image.cpp:
- (WebCore::Image::fillWithSolidColor):
- * platform/graphics/mac/FontMac.mm:
- (WebCore::Font::drawGlyphs):
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::paint):
- * rendering/EllipsisBox.cpp:
- (WebCore::EllipsisBox::paint):
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::paintTextDecorations):
* rendering/InlineTextBox.cpp:
- (WebCore::updateGraphicsContext):
- (WebCore::paintTextWithShadows):
- (WebCore::InlineTextBox::paint):
- (WebCore::InlineTextBox::paintSelection):
- (WebCore::InlineTextBox::paintCompositionBackground):
- (WebCore::InlineTextBox::paintDecoration):
- (WebCore::InlineTextBox::paintTextMatchMarker):
- (WebCore::InlineTextBox::paintCompositionUnderline):
- * rendering/InlineTextBox.h:
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::fillHorizontalSelectionGap):
- (WebCore::RenderBlock::fillVerticalSelectionGap):
- (WebCore::RenderBlock::fillLeftSelectionGap):
- (WebCore::RenderBlock::fillRightSelectionGap):
- * rendering/RenderBoxModelObject.cpp:
- (WebCore::RenderBoxModelObject::paintFillLayerExtended):
- (WebCore::RenderBoxModelObject::paintBoxShadow):
- * rendering/RenderFileUploadControl.cpp:
- (WebCore::RenderFileUploadControl::paintObject):
- * rendering/RenderFrameSet.cpp:
- (WebCore::RenderFrameSet::paintColumnBorder):
- (WebCore::RenderFrameSet::paintRowBorder):
- * rendering/RenderImage.cpp:
- (WebCore::RenderImage::paintReplaced):
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::paintScrollCorner):
- (WebCore::RenderLayer::paintResizer):
- * rendering/RenderListBox.cpp:
- (WebCore::RenderListBox::paintItemForeground):
- (WebCore::RenderListBox::paintItemBackground):
- * rendering/RenderListMarker.cpp:
- (WebCore::RenderListMarker::paint):
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::drawLineForBoxSide):
- (WebCore::RenderObject::drawArcForBoxSide):
- * rendering/RenderReplaced.cpp:
- (WebCore::RenderReplaced::paint):
- * rendering/RenderScrollbarTheme.cpp:
- (WebCore::RenderScrollbarTheme::paintScrollCorner):
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderThemeMac::paintMenuListButton):
- * rendering/RenderView.cpp:
- (WebCore::RenderView::paintBoxDecorations):
- * rendering/RenderWidget.cpp:
- (WebCore::RenderWidget::paint):
- * rendering/SVGInlineTextBox.cpp:
- (WebCore::SVGInlineTextBox::paintSelection):
- * svg/graphics/SVGPaintServerGradient.cpp:
- (WebCore::SVGPaintServerGradient::setup):
- * svg/graphics/SVGPaintServerSolid.cpp:
- (WebCore::SVGPaintServerSolid::setup):
-
-2009-11-10 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Speed up syntax highlighter
- https://bugs.webkit.org/show_bug.cgi?id=31291
-
- * inspector/front-end/SourceFrame.js:
- (WebInspector.SourceFrame.prototype._loaded):
- (WebInspector.SourceSyntaxHighlighter.prototype.process.moveToNextLine): Replace the line content node.
- (WebInspector.SourceSyntaxHighlighter.prototype.process):
- (WebInspector.SourceSyntaxHighlighter.prototype.appendNonToken):
- (WebInspector.SourceSyntaxHighlighter.prototype.syntaxHighlightNode):
- (WebInspector.CSSSourceSyntaxHighlighter):
- (WebInspector.JavaScriptSourceSyntaxHighlighter):
-
-2009-11-09 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Remove session storage setting
- https://bugs.webkit.org/show_bug.cgi?id=31279
-
- Remove session storage from Settings. It was added temporarily so we could
- disable it by default at runtime in Chromium. We now disable these things in a
- different way, so it's time to remove it. Qt also depended on this setting for
- a short period of time, but after talking to them we agreed that it should be
- removed.
-
- This bug is the second half of https://bugs.webkit.org/show_bug.cgi?id=30602
-
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::sessionStorage):
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
- * page/Settings.h:
-
-2009-11-10 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Eric Carlson and Darin Adler.
-
- WebCore part of making full-screen video pause during scrubbing.
-
- * WebCore.Video.exp: Sorted and added HTMLMediaElement::beginScrubbing()
- and HTMLMediaElement::endScrubbing().
-
-2009-11-10 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Adam Barth.
-
- Reapply 50562 reverted by 50588 due to issues with sandboxing (should be fine now).
- https://bugs.webkit.org/show_bug.cgi?id=31051
-
- * bindings/v8/V8GCController.cpp:
- (WebCore::V8GCController::gcEpilogue):
- (WebCore::V8GCController::checkMemoryUsage):
- * bindings/v8/V8GCController.h:
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::evaluate):
- (WebCore::V8Proxy::runScript):
- (WebCore::V8Proxy::callFunction):
-
-2009-11-10 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for the part of loader directory in WebCore
- https://bugs.webkit.org/show_bug.cgi?id=31161
-
- Inherits the following classes from Noncopyable because these are instantiated
- by 'new' and these are no need to be copyable:
-
- class Request - WebCore/loader/loader.cpp:100
- struct ScheduledRedirection - WebCore/loader/RedirectScheduler.cpp:164
- class ApplicationCacheStorage - WebCore/loader/appcache/ApplicationCacheStorage.cpp:1121
- class ApplicationCacheHost - WebCore/loader/DocumentLoader.cpp:151
- class ImageEventSender - WebCore/loader/ImageLoader.cpp:54
- struct ProgressItem - WebCore/loader/ProgressTracker.cpp:169
-
- Inherits ThreadableLoaderClient class from Noncopyable because (its child class)
- MainThreadBridge is instantiated by 'new' in
- WebCore/loader/WorkerThreadableLoader.cpp:59 it is no need to be copyable.
-
- ThreadableLoaderClient's inheriting has been changed to public.
-
- * loader/ImageLoader.cpp:
- * loader/ProgressTracker.cpp:
- * loader/RedirectScheduler.cpp:
- * loader/Request.h:
- * loader/ThreadableLoaderClient.h:
- * loader/WorkerThreadableLoader.h:
- * loader/appcache/ApplicationCacheHost.h:
- * loader/appcache/ApplicationCacheStorage.h:
-
-2009-11-10 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=31047
- [GTK] Failing test media/video-played-ranges-1.html
-
- WebKit coding style fixes.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::mediaPlayerPrivateMessageCallback):
- (WebCore::MediaPlayerPrivate::naturalSize):
- (WebCore::MediaPlayerPrivate::paint):
- (WebCore::mimeTypeCache):
-
-2009-11-10 Oliver Hunt <oliver@apple.com>
-
- Remove build failure introduced by earlier build fix.
-
- * bindings/v8/custom/V8WebGLIntArrayCustom.cpp:
-
-2009-11-10 Oliver Hunt <oliver@apple.com>
-
- Is this the last build fix? grep tells me yes.
-
- * bindings/v8/custom/V8DocumentCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-11-10 Oliver Hunt <oliver@apple.com>
-
- Hopefully the last one. Why aren't these autogenerated?
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::setIndexedPropertiesToExternalArray):
- (WebCore::V8DOMWrapper::getTemplate):
- (WebCore::V8DOMWrapper::convertToV8Object):
-
-2009-11-10 Oliver Hunt <oliver@apple.com>
-
- Another chrome build fix.
-
- * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-11-10 Oliver Hunt <oliver@apple.com>
-
- Yet another chrome buildfix
-
- * bindings/v8/custom/V8WebGLArrayBufferCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WebGLArrayCustom.h:
- (WebCore::constructCanvasArray):
- * bindings/v8/custom/V8WebGLByteArrayCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8WebGLFloatArrayCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8WebGLIntArrayCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::vertexAttribAndUniformHelperf):
- (WebCore::uniformHelperi):
- (WebCore::uniformMatrixHelper):
- * bindings/v8/custom/V8WebGLShortArrayCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8WebGLUnsignedByteArrayCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8WebGLUnsignedIntArrayCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8WebGLUnsignedShortArrayCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
-
-2009-11-10 Oliver Hunt <oliver@apple.com>
-
- Chrome build fix.
-
- * bindings/v8/V8Index.h:
-
-2009-11-10 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=30901
- [Gtk] Need to de-lint the Atk a11y code
-
- Removal of various and sundry style-violating nits.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
-
-2009-11-10 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=31047
- [GTK] Failing test media/video-played-ranges-1.html
-
- Fix playback rate setter by remembering the rate was changed. Also
- correctly handle reverse playback by doing a seek from end to
- beginning of the media.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
- (WebCore::MediaPlayerPrivate::currentTime):
- (WebCore::MediaPlayerPrivate::seek):
- (WebCore::MediaPlayerPrivate::hasAudio):
- (WebCore::MediaPlayerPrivate::setVolume):
- (WebCore::MediaPlayerPrivate::setRate):
- (WebCore::MediaPlayerPrivate::updateStates):
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
-
-2009-11-10 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Maciej Stachowiak.
-
- Rename 3D Canvas related classes to use WebGL prefix
- https://bugs.webkit.org/show_bug.cgi?id=29095
-
- Automatic rename of all WebGL related types from Canvas* to
- WebGL* per more recent version of the WebGL spec.
-
- Due to the automatic rename I've removed the 600+ line change list.
-
-2009-11-09 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- SVG feDisplacementMap is not implemented
- [https://bugs.webkit.org/show_bug.cgi?id=31255]
-
- This is the implementation of the SVG filter effect
- feDisplacementMap.
-
- Test: svg/filters/feDisplacementMap.svg
-
- * svg/graphics/filters/SVGFEDisplacementMap.cpp:
- (WebCore::FEDisplacementMap::apply):
-
-2009-11-09 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Darin Adler.
-
- Add a comment about null strings and hash functions.
- https://bugs.webkit.org/show_bug.cgi?id=29118
-
- * platform/text/StringHash.h:
-
-2009-11-09 Martin Robinson <martin.james.robinson@gmail.com>
-
- Reviewed by Darin Adler.
-
- Compiler warnings in InspectorResource.h
- https://bugs.webkit.org/show_bug.cgi?id=29231
-
- Fix compilation warnings by removing addition operation on an enum type.
-
- * inspector/InspectorResource.h:
- (WebCore::InspectorResource::):
- (WebCore::InspectorResource::Changes::hasChange):
- (WebCore::InspectorResource::Changes::set):
- (WebCore::InspectorResource::Changes::setAll):
-
-2009-11-09 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Darin Adler and Dan Bernstein.
-
- <rdar://problem/7328395>
- https://bugs.webkit.org/show_bug.cgi?id=31277
-
- When an object tag's style changes (for example when child nodes are added/removed),
- reuse its Frame (if it has one) instead of creating multiple Frames.
-
- Test: fast/dom/HTMLObjectElement/children-changed.html
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::requestObject):
-
-2009-11-09 Norbert Leser <norbert.leser@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Moved macro MMP_RULES (LINKEROPTION) into symbian instead of symbian-sbsv2,
- since adjustment of RW-section base address will be needed for all new symbian
- tool chains, specifically for arm and gcc compilation targets.
- Also, change target address to 0xE00000 to be sufficient for all targets.
-
- * WebCore.pro:
-
-2009-11-09 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Crash when inspecting
- WebCore\manual-tests\inspector\dom-mutation.html
-
- https://bugs.webkit.org/show_bug.cgi?id=31259
-
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::handleEvent):
-
-2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- [Qt] Few classes have virtual functions but non-virtual destructor
- https://bugs.webkit.org/show_bug.cgi?id=31269
-
- No new tests as there is no functional change.
-
- * platform/qt/QWebPageClient.h:
- (QWebPageClient::~QWebPageClient): Add virtual destructor.
-
-2009-11-09 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- [Qt] Allow setting HTTP headers with empty value in XMLHTTPRequest
- https://bugs.webkit.org/show_bug.cgi?id=31140
-
- QtNetwork interprets null string as request to remove the header, not add it.
- Replace null values with empty values before passing them to QtNetwork.
-
- Test: http/tests/xmlhttprequest/xmlhttprequest-setrequestheader-no-value.html
-
- * platform/network/qt/ResourceRequestQt.cpp:
- (WebCore::ResourceRequest::toNetworkRequest):
-
-2009-11-09 Vadim Zeitlin <vadim@wxwidgets.org>
-
- Reviewed by Kevin Ollivier.
-
- [wx] Fix handling of alpha channel when using wxWidgets 2.9: it was
- simply ignored before resulting in transparent areas being black in PNG
- images for example.
-
- https://bugs.webkit.org/show_bug.cgi?id=30823
-
- * platform/image-decoders/wx/ImageDecoderWx.cpp:
- (WebCore::RGBA32Buffer::asNewNativeImage):
-
-2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
- https://bugs.webkit.org/show_bug.cgi?id=31040
-
- No new tests as there is no functional change.
-
- * dom/Document.cpp:
- (WebCore::Document::recalcStyleSelector):
- * editing/TextIterator.cpp:
- (WebCore::pushFullyClippedState):
- * editing/VisibleSelection.cpp:
- (WebCore::VisibleSelection::appendTrailingWhitespace):
- * html/HTMLLinkElement.cpp:
- (WebCore::HTMLLinkElement::process):
- * loader/RedirectScheduler.cpp:
- (WebCore::RedirectScheduler::mustLockBackForwardList):
- * loader/appcache/ApplicationCacheGroup.cpp:
- (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
- * platform/graphics/qt/FontCacheQt.cpp:
- (WebCore::FontPlatformDataCacheKey::computeHash):
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::handleRunInChild):
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::calcHeight):
- * rendering/RenderTextControlMultiLine.cpp:
- (WebCore::RenderTextControlMultiLine::nodeAtPoint):
- * rendering/style/RenderStyle.cpp:
- (WebCore::RenderStyle::diff):
- * svg/SVGAnimateElement.cpp:
- (WebCore::parseNumberValueAndUnit):
- * svg/SVGAnimationElement.cpp:
- (WebCore::SVGAnimationElement::startedActiveInterval):
- * svg/SVGPreserveAspectRatio.cpp:
- (WebCore::SVGPreserveAspectRatio::getCTM):
-
-2009-11-09 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Win chromium is slow to draw transparent texts
- https://bugs.webkit.org/show_bug.cgi?id=31258
-
- Clip graphics context to reduce calculation.
-
- No new tests because this change only affects performance.
-
- * platform/graphics/chromium/FontChromiumWin.cpp:
- (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
- (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
-
-2009-11-09 Carol Szabo <carol.szabo@nokia.com>
-
- Reviewed by Darin Adler.
-
- showTree(CounterNode*) generates too little info and has too many spaces.
- https://bugs.webkit.org/show_bug.cgi?id=31212
-
- No new tests as the change has no functional effect it is just for
- improved debugging.
-
- * rendering/CounterNode.cpp:
- (WebCore::showTreeAndMark):
- Changed to also show addresses of parent, next and previous
- siblings.
-
-2009-11-09 Stuart Morgan <stuartmorgan@chromium.org>
-
- Reviewed by Darin Adler.
-
- Moves Mac implementation of setUseSecureKeyboardEntry to Frame.cpp and
- enables it PLATFORM(CHROMIUM) in addition to PLATFORM(MAC).
-
- https://bugs.webkit.org/show_bug.cgi?id=31083
-
- No new tests; implementation is unchanged.
-
- * page/Frame.cpp:
- (WebCore::Frame::setUseSecureKeyboardEntry):
- * page/mac/FrameMac.mm:
-
-2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Jan Alonzo.
-
- Make XP_UNIX tests consistent
- https://bugs.webkit.org/show_bug.cgi?id=31250
-
- No new tests as there is no functional change.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::setFrameRect): Test if XP_UNIX is defined
- instead of the value of the macro
-
- * plugins/gtk/PluginViewGtk.cpp:
- (WebCore::PluginView::setNPWindowIfNeeded): Test if the XP_UNIX is
- defined instead of using the PLATFORM macro to be consistent
- (WebCore::PluginView::getValue): Ditto.
-
-2009-11-09 Kevin Watters <kevinwatters@gmail.com>
-
- Reviewed by Darin Adler.
-
- Thunk to the main thread from ~Database to deref Database's m_document.
-
- If the Database was the Document's last referrer, then ~Document occurs on the
- Database thread, and ASSERT(!m_styleRecalcTimer.isActive()) hits a main thread
- ASSERT in debug builds.
-
- * storage/Database.cpp:
- (WebCore::derefDocument):
- (WebCore::Database::~Database):
-
-2009-11-09 Mark Mentovai <mark@chromium.org>
-
- Reviewed by Dan Bernstein.
-
- Track "can have scrollbar" state within FrameView independently of the
- individual scrollbar states in ScrollView.
-
- rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167
- REGRESSION (r48064): mint.com loses scrollbars after coming out of
- edit mode.
-
- rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517
- REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
-
- Test: fast/overflow/scrollbar-restored.html
-
- * WebCore.base.exp:
- * page/FrameView.cpp:
- (WebCore::FrameView::FrameView):
- (WebCore::FrameView::resetScrollbars):
- (WebCore::FrameView::setCanHaveScrollbars):
- (WebCore::FrameView::updateCanHaveScrollbars):
- (WebCore::FrameView::layout):
- * page/FrameView.h:
- * platform/ScrollView.h:
-
-2009-11-09 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: CSS syntax highlighter doesn't recognize negative numbers
- https://bugs.webkit.org/show_bug.cgi?id=31257
-
- * inspector/front-end/SourceFrame.js:
-
-2009-11-09 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Debugger shortcuts (F8, F10, F11) have no effect if the Console view is open
- https://bugs.webkit.org/show_bug.cgi?id=31252
-
- Route F1-F12 keypresses in the Console view to the current panel if there is one.
-
- Test: manual-tests/inspector/debugger-shortcuts-with-console-opened.html
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype._promptKeyDown):
- * inspector/front-end/utilities.js:
- ():
- * manual-tests/inspector/debugger-shortcuts-with-console-opened.html: Added.
-
-2009-11-09 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- [Qt] Pass credentials provided by XMLHTTPRequest to the network request.
- https://bugs.webkit.org/show_bug.cgi?id=31208
-
- After r42483, the credentials are no longer passed to the network request
- in the URL of the request.
- Pass the credentials from XMLHTTPRequest to the network request, the same
- way that other ports do.
-
- After this patch LayoutTests/http/xmlhttprequest/basic-auth.html passes.
-
- * platform/network/qt/ResourceHandleQt.cpp:
- (WebCore::ResourceHandle::start):
- (WebCore::ResourceHandle::loadResourceSynchronously):
-
-2009-11-09 Zoltan Horvath <zoltan@webkit.org>
-
- Unreviewed.
-
- https://bugs.webkit.org/show_bug.cgi?id=31161
-
- Roll back r50657 because it breaks the MAC builds.
-
- * loader/ImageLoader.cpp:
- * loader/ProgressTracker.cpp:
- * loader/RedirectScheduler.cpp:
- * loader/Request.h:
- * loader/ThreadableLoaderClient.h:
- * loader/WorkerThreadableLoader.h:
- * loader/appcache/ApplicationCacheHost.h:
- * loader/appcache/ApplicationCacheStorage.h:
- * loader/icon/IconDatabaseClient.h:
-
-2009-11-09 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for the part of loader directory in WebCore
- https://bugs.webkit.org/show_bug.cgi?id=31161
-
- Inherits the following classes from Noncopyable because these are instantiated
- by 'new' and these are no need to be copyable:
-
- class Request - WebCore/loader/loader.cpp:100
- struct ScheduledRedirection - WebCore/loader/RedirectScheduler.cpp:164
- class IconDatabaseClient - WebCore/loader/icon/IconDatabase.cpp:89
- class ApplicationCacheStorage - WebCore/loader/appcache/ApplicationCacheStorage.cpp:1121
- class ApplicationCacheHost - WebCore/loader/DocumentLoader.cpp:151
- class ImageEventSender - WebCore/loader/ImageLoader.cpp:54
- struct ProgressItem - WebCore/loader/ProgressTracker.cpp:169
-
- Inherits ThreadableLoaderClient class from Noncopyable because (its child class)
- MainThreadBridge is instantiated by 'new' in
- WebCore/loader/WorkerThreadableLoader.cpp:59 it is no need to be copyable.
-
- ThreadableLoaderClient's inheriting has been changed to public.
-
- * loader/ImageLoader.cpp:
- * loader/ProgressTracker.cpp:
- * loader/RedirectScheduler.cpp:
- * loader/Request.h:
- * loader/ThreadableLoaderClient.h:
- * loader/WorkerThreadableLoader.h:
- * loader/appcache/ApplicationCacheHost.h:
- * loader/appcache/ApplicationCacheStorage.h:
- * loader/icon/IconDatabaseClient.h:
-
-2009-11-09 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's DocLoader
- https://bugs.webkit.org/show_bug.cgi?id=31163
-
- Inherits DocLoader class from Noncopyable because it is
- instantiated by 'new' in WebCore/dom/Document.cpp:370 and
- it is no need to be copyable.
-
- * loader/DocLoader.h:
-
-2009-11-09 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's Tokenizer
- https://bugs.webkit.org/show_bug.cgi?id=31162
-
- Inherits Tokenizer class from Noncopyable because (its child class)
- ImageTokenizer instantiated by 'new' in WebCore/loader/ImageDocument.cpp:178
- and it is no need to be copyable.
-
- * dom/Tokenizer.h:
-
-2009-11-09 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's DeleteButtonController
- https://bugs.webkit.org/show_bug.cgi?id=31105
-
- Inherits DeleteButtonController class from Noncopyable because it is
- instantiated by 'new' in WebCore/editing/Editor.cpp:919 and
- it is no need to be copyable.
-
- * editing/DeleteButtonController.h:
-
-2009-11-09 Martin Robinson <martin.james.robinson@gmail.com>
-
- Reviewed by Jan Alonzo.
-
- [GTK] Expose Page::tabKeyCyclesThroughElements in the API
- https://bugs.webkit.org/show_bug.cgi?id=30482
-
- Expose Page::tabKeyCyclesThroughElements as a property of
- WebKitWebView.
-
- No new tests; fast/events/keypress-insert-tab.html is no longer skipped.
-
- * platform/gtk/KeyEventGtk.cpp: Correct m_text for tab key presses.
- (WebCore::singleCharacterString):
-
-2009-11-09 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=25415
- [GTK][ATK] Please implement support for get_text_at_offset
-
- Fix a crasher that occurred with text which included newline
- chars in the markup.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (convertUniCharToUTF8):
-
-2009-11-05 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Holger Freyther.
-
- [Qt] The XML tokenizer reports a parse error twice if it occurs before the document element is found.
- https://bugs.webkit.org/show_bug.cgi?id=31144
-
- XMLTokenizer::doEnd() uses an additional logic to report a parse failure in
- documents that end prematurely but are not considered invalid by QXmlStream.
- This is to stay compatible with the libxml2 implementation.
- However, that code path would be also hit in situations when it should not,
- i.e. the error would have already been caught and handled. As a result, the
- same error would be reported twice.
-
- No new tests, because the problem is already covered by
- fast/parser/xml-declaration-missing-ending-mark.html.
-
- * dom/XMLTokenizerQt.cpp:
- (WebCore::XMLTokenizer::doEnd):
-
-2009-11-08 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Pavel Feldman.
-
- Web Inspector: Inspector should support copy() in the command line
- https://bugs.webkit.org/show_bug.cgi?id=31238
-
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::copyText): Added.
- * inspector/InspectorBackend.h: Added copyText
- * inspector/InspectorBackend.idl: Added copyText
- * inspector/front-end/InjectedScript.js:
- (InjectedScript._copy): Added.
- (InjectedScript._ensureCommandLineAPIInstalled):
-
-2009-11-08 Drew Wilson <atwilson@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- V8 WorkerContextExecutionProxy does not handle SharedWorkers
- https://bugs.webkit.org/show_bug.cgi?id=31226
-
- Now checks to see what type of context is active and creates the
- appropriate wrapper (DEDICATEDWORKERCONTEXT vs SHAREDWORKERCONTEXT).
-
- Added support for converting to SharedWorkers and SharedWorkerContexts.
-
- Test: Existing layout tests cover this case (start passing in Chrome).
-
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
- Now generates the right type of DOMWrapper for SharedWorkerContexts.
- (WebCore::WorkerContextExecutionProxy::convertToV8Object):
- Added support for SHAREDWORKERCONTEXT.
- (WebCore::WorkerContextExecutionProxy::convertEventTargetToV8Object):
- Added support for SharedWorker and SharedWorkerContext.
-
-2009-11-08 Johnny Ding <johnnyding.webkit@gmail.com>
-
- Reviewed by Dimitri Glazkov.
-
- https://bugs.webkit.org/show_bug.cgi?id=31224
- [V8] Return StyleSheet object instead of HTMLStyleElement w/document.styleSheets named property getter.
-
- Test: fast/dom/StyleSheet/get-stylesheet-byname.html
-
- * bindings/v8/custom/V8StyleSheetListCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
-
-2009-11-08 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: "Search again" on scripts panel switches
- to the script this search started with.
-
- https://bugs.webkit.org/show_bug.cgi?id=31243
-
- * inspector/front-end/Panel.js:
- (WebInspector.Panel.prototype.jumpToNextSearchResult):
-
-2009-11-08 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Darin Adler.
-
- Simplify Icon interface.
- https://bugs.webkit.org/show_bug.cgi?id=31154
-
- - Remove Icon::createIconForFile(). createIconForFiles() covers
- createIconForFile()'s role.
- - Remove FileChooser::chooseIcon()
- - Change the parameter types of FileChooser constructor and the
- factory method, String -> const Vector<String>&, in order to
- support initialization with multiple files.
- - Remove the icon loading code in IconChromiumWin.cpp, which
- doesn't work because of the sandbox.
-
- No tests because it's just a refactoring.
-
- * platform/FileChooser.cpp:
- (WebCore::FileChooser::FileChooser):
- (WebCore::FileChooser::create):
- (WebCore::FileChooser::chooseFile):
- (WebCore::FileChooser::chooseFiles):
- * platform/FileChooser.h:
- * platform/graphics/Icon.h:
- * platform/graphics/chromium/IconChromiumLinux.cpp:
- * platform/graphics/chromium/IconChromiumMac.cpp:
- * platform/graphics/chromium/IconChromiumWin.cpp:
- (WebCore::Icon::createIconForFiles):
- * platform/graphics/gtk/IconGtk.cpp:
- (WebCore::Icon::createIconForFiles):
- * platform/graphics/haiku/IconHaiku.cpp:
- * platform/graphics/mac/IconMac.mm:
- (WebCore::Icon::createIconForFiles):
- * platform/graphics/qt/IconQt.cpp:
- (WebCore::Icon::createIconForFiles):
- * platform/graphics/win/IconWin.cpp:
- (WebCore::Icon::createIconForFiles):
- * platform/graphics/wx/IconWx.cpp:
- * rendering/RenderFileUploadControl.cpp:
- (WebCore::RenderFileUploadControl::RenderFileUploadControl):
-
-2009-11-08 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=31098
-
- Allows same-origin plugin-based content to load.
-
- Test: http/tests/security/xssAuditor/object-src-inject.html
-
- * page/XSSAuditor.cpp:
- (WebCore::XSSAuditor::canLoadExternalScriptFromSrc): Modified to call XSSAuditor::isSameOriginResource.
- (WebCore::XSSAuditor::canLoadObject): Ditto.
- (WebCore::XSSAuditor::canSetBaseElementURL): Ditto.
- (WebCore::XSSAuditor::isSameOriginResource): Added.
- * page/XSSAuditor.h:
-
-2009-11-08 David Levin <levin@chromium.org>
-
- Reviewed by NOBODY (chromium build fix).
-
- * platform/network/HTTPParsers.cpp:
- (WebCore::parseDate): Changed this to not
- use a date parser that needs ExecState passed.
-
-2009-11-08 David Levin <levin@chromium.org>
-
- Unreviewed build fix for chromium.
-
- * platform/graphics/skia/GraphicsContextSkia.cpp:
- (WebCore::GraphicsContext::fillPath):
- (WebCore::GraphicsContext::fillRect):
- (WebCore::GraphicsContext::strokePath):
- (WebCore::GraphicsContext::strokeRect):
-
-2009-11-08 David Levin <levin@chromium.org>
-
- Unreviewed build fix for chromium.
-
- Build fix for https://bugs.webkit.org/show_bug.cgi?id=31219
- Clean up GraphicsContext's current concept of ColorSpace
-
- * platform/graphics/skia/GraphicsContextSkia.cpp:
- (WebCore::GraphicsContext::fillPath):
- (WebCore::GraphicsContext::fillRect):
- (WebCore::GraphicsContext::strokePath):
- (WebCore::GraphicsContext::strokeRect):
-
-2009-11-08 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: [REGRESSION] committing style edit
- clears elements panel selection.
-
- https://bugs.webkit.org/show_bug.cgi?id=31242
-
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeOutline.prototype.update):
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylePropertyTreeElement.prototype.):
- (WebInspector.StylePropertyTreeElement.prototype):
-
-2009-11-08 Janne Koskinen <janne.p.koskinen@digia.com>
-
- Reviewed by Holger Freyther.
-
- ResourceRequest to be class instead of struct
- https://bugs.webkit.org/show_bug.cgi?id=30670
-
- Started as a compilation fix for Symbian where the compiler makes a distinction between
- class and struct in function argument signatures.
- Changed all forward declarations of ResourceRequest to have class in the forward
- declaration instead of struct and changed the definition of ResourceRequest to be class
- and added access qualifiers where missing. Additionally two references of friend
- struct ResourceRequestBase changed to class instead.
-
- * history/HistoryItem.h:
- * inspector/InspectorController.h:
- * inspector/InspectorResource.h:
- * loader/DocumentThreadableLoader.h:
- * loader/FrameLoaderClient.h:
- * loader/MainResourceLoader.h:
- * loader/ResourceLoadNotifier.h:
- * loader/SubresourceLoader.h:
- * loader/SubresourceLoaderClient.h:
- * loader/ThreadableLoader.h:
- * loader/WorkerThreadableLoader.h:
- * loader/appcache/ApplicationCache.h:
- * loader/appcache/ApplicationCacheHost.h:
- * platform/CrossThreadCopier.h:
- * platform/network/ResourceHandle.h:
- * platform/network/ResourceHandleClient.h:
- * platform/network/ResourceRequestBase.h:
- * platform/network/cf/ResourceRequest.h:
- * platform/network/cf/ResourceRequestCFNet.h:
- * platform/network/chromium/ResourceRequest.h:
- * platform/network/curl/ResourceRequest.h:
- * platform/network/qt/ResourceRequest.h:
- * platform/network/soup/ResourceRequest.h:
- * xml/XMLHttpRequest.h:
+ (WebCore::InlineTextBox::selectionRect):
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::absoluteQuadsForRange):
-2009-11-08 Dan Bernstein <mitz@apple.com>
+2010-01-31 Oliver Hunt <oliver@apple.com>
Reviewed by Simon Fraser.
- <rdar://problem/7363434> Crash inside RenderObject::localToAbsolute
- below FrameView::layout
- https://bugs.webkit.org/show_bug.cgi?id=31093
-
- Test: fast/block/positioning/relative-positioned-inline-container.html
-
- In <http://trac.webkit.org/changeset/19148>, setStaticY() was changed
- to mark the object for layout, doing so without marking its ancestors.
- However, RenderBlock::skipLeadingWhitespace and
- RenderBlock::skipTrailingWhitespace() call setStaticY() on a relative-
- positioned inline container, causing it to be marked for layout without
- ever going back to give it layout, and thus layout could end with a
- dirty object still in the tree, leading to all sorts of badness.
+ Animated scaling of background-image is too slow
+ https://bugs.webkit.org/show_bug.cgi?id=33808
- The fix is to revert setStaticY() to not marking the object dirty, and
- instead do it in the call sites that require it, which are in
- RenderBlock and RenderFlexibleBox.
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::adjustPositionedBlock):
- * rendering/RenderFlexibleBox.cpp:
- (WebCore::RenderFlexibleBox::layoutHorizontalBox):
- (WebCore::RenderFlexibleBox::layoutVerticalBox):
- * rendering/RenderLayer.cpp:
- * rendering/RenderLayer.h:
- (WebCore::RenderLayer::setStaticY):
-
-2009-11-07 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=20780
-
- Fixes an issue where the onchange event handler is not fired when the
- input field is autocompleted.
-
- We cannot test this using DRT since DRT cannot emulate autocompletion.
- So, a manual-test is included.
-
- Tests: manual-tests/autocompletion-fire-onchange.html
-
- * manual-tests/autocompletion-fire-onchange.html: Added.
- * rendering/RenderTextControl.cpp:
- (WebCore::RenderTextControl::setInnerTextValue):
-
-2009-11-07 Benjamin Otte <otte@gnome.org>
-
- Reviewed by Holger Freyther.
-
- Mark redrawn areas on image surfaces as dirty.
-
- This is required to conform to the Cairo API, but is currently only
- used by debugging tools like cairo-trace.
-
- * platform/graphics/cairo/ImageBufferCairo.cpp:
- (WebCore::ImageBuffer::platformTransformColorSpace):
- (WebCore::putImageData):
-
-2009-11-07 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=30878
- [Gtk] atk_text_get_text() fails in entries when the end_offset is -1
-
- If the end_offset is -1, use the String length as the end_offset.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (webkit_accessible_text_get_text):
-
-2009-11-06 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Adele Peterson.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=31219 Clean up
- GraphicsContext's current concept of ColorSpace
-
- ColorSpace is now called ColorType. The variables on the state we
- appropriately re-named as well. I removed strokeColorSpace() and
- fillColorSpace() from GraphicsContext since they were never called.
+ Implement a version of the RenderImage animated scaling optimisation
+ for background images. Due to the possibility of arbitrary transforms
+ being applied to containing elements we explicitly check the current
+ CTM of the context for scaling or rotation.
* platform/graphics/GraphicsContext.cpp:
- (WebCore::GraphicsContext::setStrokeColor):
- (WebCore::GraphicsContext::setFillColor):
- (WebCore::GraphicsContext::setStrokePattern):
- (WebCore::GraphicsContext::setFillPattern):
- (WebCore::GraphicsContext::setStrokeGradient):
- (WebCore::GraphicsContext::setFillGradient):
+ (WebCore::GraphicsContext::drawTiledImage):
* platform/graphics/GraphicsContext.h:
- (WebCore::):
- * platform/graphics/GraphicsContextPrivate.h:
- (WebCore::GraphicsContextState::GraphicsContextState):
- * platform/graphics/cairo/GraphicsContextCairo.cpp:
- (WebCore::GraphicsContext::fillPath):
- (WebCore::GraphicsContext::strokePath):
- * platform/graphics/cg/GraphicsContextCG.cpp:
- (WebCore::calculateDrawingMode):
- (WebCore::GraphicsContext::drawPath):
- (WebCore::GraphicsContext::fillPath):
- (WebCore::GraphicsContext::strokePath):
- (WebCore::GraphicsContext::fillRect):
- (WebCore::GraphicsContext::strokeRect):
- * platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::GraphicsContext::fillPath):
- (WebCore::GraphicsContext::strokePath):
- (WebCore::GraphicsContext::fillRect):
- * platform/graphics/wince/GraphicsContextWince.cpp:
- (WebCore::GraphicsContext::fillPath):
- (WebCore::GraphicsContext::fillRect):
-
-2009-11-06 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Tim Hatcher.
-
- Fixes <http://webkit.org/b/31177>.
- Web Inspector: Bind backspace to delete cookies and DOM Storage.
-
- Refactor editing code from DOMStorageDataGrid to DataGrid, so other
- places in the inspector can use editing in DataGrid (added a FIXME for
- some stuff that needs to be generalized).
-
- Also added deleting functionality to DataGrid, and implemented it for
- Cookies and DOM Storage. The reason this patch is so big is because of
- the refactoring of editing code, which won't be used yet in a cross-datagrid
- way, but should be able to.
-
- Additionally, moved the callbacks members from DOMStorageDataGrid to
- DOMStorageItemsView, which allowed us to delete DOMStorageDataGrid, to
- make the architecture of DOM Storage look a lot more like the Cookies view.
-
- Lastly, added a preventDefault call in ElementsTreeOutline to prevent the
- inspector from beeping at you when you delete an element.
-
- * WebCore.gypi: Removed DOMStorageDataGrid.
- * WebCore.vcproj/WebCore.vcproj: Removed DOMStorageDataGrid.
- * inspector/front-end/CookieItemsView.js:
- (WebInspector.CookieItemsView.prototype.dataGridForCookies):
- (WebInspector.CookieItemsView.prototype._deleteButtonClicked):
- (WebInspector.CookieItemsView.prototype._deleteCookieCallback):
- * inspector/front-end/DOMStorageDataGrid.js: Removed.
- * inspector/front-end/DOMStorageItemsView.js:
- (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageEntries):
- (WebInspector.DOMStorageItemsView.prototype._deleteButtonClicked):
- (WebInspector.DOMStorageItemsView.prototype._refreshButtonClicked):
- (WebInspector.DOMStorageItemsView.prototype._editingCallback):
- (WebInspector.DOMStorageItemsView.prototype.deleteSelectedRow):
- (WebInspector.DOMStorageItemsView.prototype._deleteCallback):
- * inspector/front-end/DataGrid.js:
- (WebInspector.DataGrid):
- (WebInspector.DataGrid.prototype._ondblclick): Moved from DOMStorageDataGrid to DataGrid + Refactoring.
- (WebInspector.DataGrid.prototype._startEditingColumnOfDataGridNode): Ditto.
- (WebInspector.DataGrid.prototype._startEditing): Ditto.
- (WebInspector.DataGrid.prototype._editingCommitted.moveToNextIfNeeded): Ditto.
- (WebInspector.DataGrid.prototype._editingCommitted): Ditto.
- (WebInspector.DataGrid.prototype._editingCancelled): Ditto.
- (WebInspector.DataGrid.prototype.handleKeyEvent): Added case for delete/backspace.
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeOutline.prototype.handleKeyEvent): Added preventDefault call.
- * inspector/front-end/WebKit.qrc: Removed DOMStorageDataGrid.
- * inspector/front-end/inspector.html: Removed DOMStorageDataGrid.
-
-2009-11-06 Geoffrey Garen <ggaren@apple.com>
-
- Qt build fix: added an ExecState parameter.
-
- * bridge/qt/qt_runtime.cpp:
- (JSC::Bindings::convertValueToQVariant):
- (JSC::Bindings::convertQVariantToValue):
-
-2009-11-06 Geoffrey Garen <ggaren@apple.com>
-
- https://bugs.webkit.org/show_bug.cgi?id=31197
- Implemented a timezone cache not based on Mac OS X's notify_check API.
-
- Updated for JavaScriptCore internal API change.
-
- * bridge/qt/qt_runtime.cpp:
- (JSC::Bindings::convertValueToQVariant):
- (JSC::Bindings::convertQVariantToValue): Updated for namespace change.
-
- * platform/network/HTTPParsers.cpp:
- (WebCore::parseDate): Pass 0 for ExecState, since we don't have one.
- (This function probably shouldn't be using a JavaScript date parser
- to begin with, but oh well.)
-
-2009-11-06 Anantanarayanan G Iyengar <ananta@chromium.org>
-
- Reviewed by Adam Barth.
-
- The associated webkit bug is https://bugs.webkit.org/show_bug.cgi?id=31067,
- which affects Chromium only.
-
- Changes to V8HTMLDocumentCustom.cpp are as below:-
- 1. The HTMLDocumentOpen function would cause a crash in Chromium if
- there was no calling javascript context. We now check for this case
- and pass in NULL to the HTMLDocument::open function which can handle
- a NULL document parameter.
- 2. The other functions like HTMLDocumentWrite, HTMLDocumentWriteln, etc
- had ASSERTS for a NULL caller frame, which was bogus as it would crash
- anyway. We now check for this case and return a failure.
-
- Changes to V8DOMWindowCustom.cpp are as below:-
- 1. Instead of failing the window.open call made by NPAPI for lack of a
- calling javascript context, we now use the entered context as the calling
- context.
-
- Tests: plugins/document-open.html
- plugins/window-open.html
-
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-11-06 Steve Block <steveblock@google.com>
-
- Reviewed by Eric Seidel.
-
- Geolocation error code UNKNOWN_ERROR is deprecated.
- https://bugs.webkit.org/show_bug.cgi?id=31184
-
- Remove this error code from PositionError, both for use from C++ code and from the JS object.
-
- Updated fast/dom/Geolocation/error.html to test this.
-
- * page/PositionError.h: Modified.
- (WebCore::PositionError::): Remove ErrorCode::UNKNOWN_ERROR.
- * page/PositionError.idl: Modified. Remove UNKNOWN_ERROR constant.
- * page/Geolocation.cpp: Modified.
- (WebCore::Geolocation::startRequest): Replace UNKNOWN_ERROR with POSITION_UNAVAILABLE.
- * platform/gtk/GeolocationServiceGtk.cpp: Modified.
- (WebCore::GeolocationServiceGtk::startUpdating): Replace UNKNOWN_ERROR with POSITION_UNAVAILABLE.
-
-2009-11-06 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Nikolas Zimmermann.
-
- feMorphology filter is not implemented
- [https://bugs.webkit.org/show_bug.cgi?id=5863]
-
- The Implementation of feMorphology.
-
- Test: We have allready a test for feMorphology
- svg/W3C-SVG-1.1/filters-morph-01-f.svg
-
- * svg/graphics/filters/SVGFEMorphology.cpp:
- (WebCore::FEMorphology::apply):
-
-2009-11-06 Steve Block <steveblock@google.com>
-
- Reviewed by Eric Seidel.
-
- V8DOMWindowCustom.cpp is missing WEB_SOCKETS guard on include.
- https://bugs.webkit.org/show_bug.cgi?id=31209
-
- Build fix only. No new tests possible.
-
- * bindings/v8/custom/V8DOMWindowCustom.cpp: Modified. Added WEB_SOCKETS guard on inclue of WebSockets.h.
-
-2009-11-06 Drew Wilson <atwilson@chromium.org>
-
- Reviewed by David Levin.
-
- V8 bindings do not support SharedWorkers as event targets
- https://bugs.webkit.org/show_bug.cgi?id=31199
-
- No new tests because existing layout tests suffice (they currently
- crash on Chromium)
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
- Added clause to create a DOM wrapper for SharedWorkers.
-
-2009-11-06 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Adam Barth.
-
- Do not unnecessarly synchronzie in weak reference callbacks.
- https://bugs.webkit.org/show_bug.cgi?id=31191
-
- * bindings/v8/DOMData.h:
- (WebCore::DOMData::handleWeakObject):
-
-2009-11-06 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Fix resource content search.
- https://bugs.webkit.org/show_bug.cgi?id=31202
-
- * inspector/front-end/AbstractTimelinePanel.js:
- (WebInspector.AbstractTimelinePanel.prototype.refresh):
- (WebInspector.AbstractTimelinePanel.prototype.removeItem):
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelineGraph.prototype.refresh):
-
-2009-11-05 Yuta Kitamura <yutak@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Fix ASSERT(currentStyle = renderStyle()).
- https://bugs.webkit.org/show_bug.cgi?id=31152
-
- * dom/Element.cpp:
- (WebCore::Element::pseudoStyleCacheIsInvalid): We should have used "==" instead of "=".
-
-2009-11-05 Alpha Lam <hclam@chromium.org>
-
- Revert 50562 because it broke Chromium. Not reviewed since this is a build fix and revert.
-
- * bindings/v8/V8GCController.cpp:
- (WebCore::V8GCController::gcEpilogue):
- * bindings/v8/V8GCController.h:
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::evaluate):
- (WebCore::V8Proxy::runScript):
- (WebCore::V8Proxy::callFunction):
-
-2009-11-05 Adam Barth <abarth@webkit.org>
-
- Reviewed by Sam Weinig.
-
- Cross-domain access to stylesheet text should not be allowed
- https://bugs.webkit.org/show_bug.cgi?id=20527
-
- Check whether whether the current document can read the cssRules from
- the style sheet. Firefox throws a security error here, but we return
- null instead because that's what we usually do in these cases.
-
- Test: http/tests/security/cannot-read-cssrules-redirect.html
- http/tests/security/cannot-read-cssrules.html
-
- * css/CSSStyleSheet.cpp:
- (WebCore::CSSStyleSheet::cssRules):
-
-2009-11-05 Steve Block <steveblock@google.com>
-
- Reviewed by Eric Seidel.
-
- If the Geolocation service fails to start, invoke the error callback asynchronously.
- https://bugs.webkit.org/show_bug.cgi?id=28276
-
- All Geolocation callbacks must be invoked asynchronously.
- See http://www.w3.org/TR/geolocation-API/#geolocation_interface
-
- No new tests possible with current LayoutTestController.
-
- * page/Geolocation.cpp:
- (WebCore::Geolocation::getCurrentPosition): Modified. Asserts that startRequest returned a notifier.
- (WebCore::Geolocation::watchPosition): Modified. Asserts that startRequest returned a notifier.
- (WebCore::Geolocation::startRequest): Modified. If the Geolocation service fails to start, set a fatal error on the notifier.
-
-2009-11-05 Chris Jerdonek <chris.jerdonek@gmail.com>
-
- Reviewed by Eric Seidel.
-
- Removed the "this is part of the KDE project" comments from
- all *.h, *.cpp, *.idl, and *.pm files.
-
- https://bugs.webkit.org/show_bug.cgi?id=31167
-
- The maintenance and architecture page in the project wiki lists
- this as a task.
-
- This change includes no changes or additions to test cases
- since the change affects only comments.
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/scripts/IDLParser.pm:
- * bindings/scripts/IDLStructure.pm:
- * css/CSSInheritedValue.cpp:
- * css/CSSInitialValue.cpp:
- * css/CSSMediaRule.cpp:
- * css/CSSNamespace.h:
- * css/CSSProperty.cpp:
- * css/CSSProperty.h:
- * css/CSSRuleList.cpp:
- * css/CSSRuleList.h:
- * css/CSSSelector.h:
- * css/CSSValueList.cpp:
- * css/FontValue.cpp:
- * css/MediaFeatureNames.cpp:
- * css/MediaFeatureNames.h:
- * css/Pair.h:
- * css/SVGCSSStyleSelector.cpp:
- * css/ShadowValue.cpp:
- * css/StyleSheet.cpp:
- * css/StyleSheetList.cpp:
- * css/maketokenizer:
- * dom/BeforeUnloadEvent.cpp:
- * dom/BeforeUnloadEvent.h:
- * dom/CSSMappedAttributeDeclaration.cpp:
- * dom/EventNames.cpp:
- * dom/EventTarget.cpp:
- * dom/MappedAttributeEntry.h:
- * dom/MouseRelatedEvent.h:
- * dom/RangeException.h:
- * dom/StyleElement.h:
- * dom/Tokenizer.h:
- * html/HTMLHeadElement.h:
- * html/HTMLHeadingElement.cpp:
- * html/HTMLHeadingElement.h:
- * html/HTMLHtmlElement.h:
- * html/HTMLImageLoader.h:
- * html/HTMLMetaElement.h:
- * html/HTMLModElement.cpp:
- * html/HTMLModElement.h:
- * html/HTMLOptionsCollection.cpp:
- * html/HTMLPlugInElement.cpp:
- * html/HTMLPreElement.cpp:
- * html/HTMLPreElement.h:
- * html/HTMLTableCellElement.cpp:
- * html/HTMLTableCellElement.h:
- * html/HTMLTableColElement.cpp:
- * html/HTMLTableColElement.h:
- * html/HTMLTablePartElement.cpp:
- * html/HTMLTablePartElement.h:
- * html/HTMLTitleElement.h:
- * page/MouseEventWithHitTestResults.h:
- * platform/StaticConstructors.h:
- * platform/text/AtomicStringImpl.h:
- * platform/text/qt/TextBreakIteratorQt.cpp:
- * rendering/AutoTableLayout.h:
- * rendering/CounterNode.cpp:
- * rendering/EllipsisBox.cpp:
- * rendering/EllipsisBox.h:
- * rendering/FixedTableLayout.cpp:
- * rendering/FixedTableLayout.h:
- * rendering/HitTestRequest.h:
- * rendering/HitTestResult.h:
- * rendering/InlineRunBox.h:
- * rendering/PointerEventsHitRules.cpp:
- * rendering/PointerEventsHitRules.h:
- * rendering/RenderBR.cpp:
- * rendering/RenderBR.h:
- * rendering/RenderButton.cpp:
- * rendering/RenderButton.h:
- * rendering/RenderFieldset.cpp:
- * rendering/RenderFrameSet.cpp:
- * rendering/RenderListItem.cpp:
- * rendering/RenderTableRow.cpp:
- * rendering/RenderView.h:
- * rendering/RootInlineBox.h:
- * rendering/SVGInlineTextBox.cpp:
- * rendering/SVGInlineTextBox.h:
- * rendering/TableLayout.h:
- * rendering/break_lines.h:
- * rendering/style/SVGRenderStyle.cpp:
- * rendering/style/SVGRenderStyle.h:
- * rendering/style/SVGRenderStyleDefs.cpp:
- * rendering/style/SVGRenderStyleDefs.h:
- * svg/GradientAttributes.h:
- * svg/LinearGradientAttributes.h:
- * svg/PatternAttributes.h:
- * svg/RadialGradientAttributes.h:
- * svg/SVGAElement.cpp:
- * svg/SVGAngle.idl:
- * svg/SVGAnimateColorElement.cpp:
- * svg/SVGAnimateColorElement.h:
- * svg/SVGAnimateElement.cpp:
- * svg/SVGAnimateElement.h:
- * svg/SVGAnimateTransformElement.h:
- * svg/SVGAnimatedPathData.cpp:
- * svg/SVGAnimatedPathData.h:
- * svg/SVGAnimatedPoints.cpp:
- * svg/SVGAnimatedPoints.h:
- * svg/SVGAnimationElement.cpp:
- * svg/SVGCircleElement.cpp:
- * svg/SVGClipPathElement.cpp:
- * svg/SVGColor.cpp:
- * svg/SVGColor.idl:
- * svg/SVGComponentTransferFunctionElement.cpp:
- * svg/SVGComponentTransferFunctionElement.h:
- * svg/SVGCursorElement.cpp:
- * svg/SVGDefsElement.cpp:
- * svg/SVGDescElement.cpp:
- * svg/SVGDescElement.h:
- * svg/SVGDocument.idl:
- * svg/SVGElement.idl:
- * svg/SVGElementInstanceList.cpp:
- * svg/SVGElementInstanceList.h:
- * svg/SVGEllipseElement.cpp:
- * svg/SVGExternalResourcesRequired.cpp:
- * svg/SVGFEBlendElement.cpp:
- * svg/SVGFEBlendElement.h:
- * svg/SVGFEColorMatrixElement.cpp:
- * svg/SVGFEColorMatrixElement.h:
- * svg/SVGFEComponentTransferElement.cpp:
- * svg/SVGFEComponentTransferElement.h:
- * svg/SVGFECompositeElement.cpp:
- * svg/SVGFECompositeElement.h:
- * svg/SVGFEFloodElement.cpp:
- * svg/SVGFEFloodElement.h:
- * svg/SVGFEFuncAElement.cpp:
- * svg/SVGFEFuncAElement.h:
- * svg/SVGFEFuncBElement.cpp:
- * svg/SVGFEFuncBElement.h:
- * svg/SVGFEFuncGElement.cpp:
- * svg/SVGFEFuncGElement.h:
- * svg/SVGFEFuncRElement.cpp:
- * svg/SVGFEFuncRElement.h:
- * svg/SVGFEGaussianBlurElement.cpp:
- * svg/SVGFEGaussianBlurElement.h:
- * svg/SVGFEImageElement.cpp:
- * svg/SVGFEMergeElement.cpp:
- * svg/SVGFEMergeElement.h:
- * svg/SVGFEMergeNodeElement.cpp:
- * svg/SVGFEOffsetElement.cpp:
- * svg/SVGFEOffsetElement.h:
- * svg/SVGFETileElement.cpp:
- * svg/SVGFETileElement.h:
- * svg/SVGFETurbulenceElement.cpp:
- * svg/SVGFETurbulenceElement.h:
- * svg/SVGFilterElement.cpp:
- * svg/SVGGElement.cpp:
- * svg/SVGGradientElement.cpp:
- * svg/SVGHKernElement.idl:
- * svg/SVGLangSpace.cpp:
- * svg/SVGLangSpace.h:
- * svg/SVGLength.cpp:
- * svg/SVGLength.h:
- * svg/SVGLength.idl:
- * svg/SVGLengthList.cpp:
- * svg/SVGLengthList.h:
- * svg/SVGLineElement.cpp:
- * svg/SVGLinearGradientElement.h:
- * svg/SVGList.h:
- * svg/SVGListTraits.h:
- * svg/SVGLocatable.h:
- * svg/SVGMaskElement.cpp:
- * svg/SVGMatrix.idl:
- * svg/SVGMetadataElement.cpp:
- * svg/SVGMetadataElement.h:
- * svg/SVGMetadataElement.idl:
- * svg/SVGNumber.idl:
- * svg/SVGNumberList.cpp:
- * svg/SVGNumberList.h:
- * svg/SVGPaint.cpp:
- * svg/SVGPathElement.cpp:
- * svg/SVGPathSeg.h:
- * svg/SVGPathSegArc.cpp:
- * svg/SVGPathSegArc.h:
- * svg/SVGPathSegClosePath.cpp:
- * svg/SVGPathSegClosePath.h:
- * svg/SVGPathSegCurvetoCubic.cpp:
- * svg/SVGPathSegCurvetoCubic.h:
- * svg/SVGPathSegCurvetoCubicSmooth.cpp:
- * svg/SVGPathSegCurvetoCubicSmooth.h:
- * svg/SVGPathSegCurvetoQuadratic.cpp:
- * svg/SVGPathSegCurvetoQuadratic.h:
- * svg/SVGPathSegCurvetoQuadraticSmooth.cpp:
- * svg/SVGPathSegCurvetoQuadraticSmooth.h:
- * svg/SVGPathSegLineto.cpp:
- * svg/SVGPathSegLineto.h:
- * svg/SVGPathSegLinetoHorizontal.cpp:
- * svg/SVGPathSegLinetoHorizontal.h:
- * svg/SVGPathSegLinetoVertical.cpp:
- * svg/SVGPathSegLinetoVertical.h:
- * svg/SVGPathSegMoveto.cpp:
- * svg/SVGPathSegMoveto.h:
- * svg/SVGPatternElement.cpp:
- * svg/SVGPoint.idl:
- * svg/SVGPointList.cpp:
- * svg/SVGPointList.h:
- * svg/SVGPolyElement.cpp:
- * svg/SVGPolygonElement.cpp:
- * svg/SVGPolygonElement.h:
- * svg/SVGPolylineElement.cpp:
- * svg/SVGPolylineElement.h:
- * svg/SVGPreserveAspectRatio.cpp:
- * svg/SVGPreserveAspectRatio.h:
- * svg/SVGRadialGradientElement.h:
- * svg/SVGRect.idl:
- * svg/SVGRectElement.cpp:
- * svg/SVGRenderingIntent.h:
- * svg/SVGSVGElement.idl:
- * svg/SVGScriptElement.cpp:
- * svg/SVGSetElement.cpp:
- * svg/SVGSetElement.h:
- * svg/SVGStopElement.cpp:
- * svg/SVGStringList.cpp:
- * svg/SVGStringList.h:
- * svg/SVGStylable.cpp:
- * svg/SVGStylable.h:
- * svg/SVGStyleElement.cpp:
- * svg/SVGStyleElement.h:
- * svg/SVGStyledElement.h:
- * svg/SVGStyledLocatableElement.cpp:
- * svg/SVGStyledLocatableElement.h:
- * svg/SVGStyledTransformableElement.cpp:
- * svg/SVGStyledTransformableElement.h:
- * svg/SVGSwitchElement.cpp:
- * svg/SVGSymbolElement.cpp:
- * svg/SVGTRefElement.cpp:
- * svg/SVGTSpanElement.cpp:
- * svg/SVGTSpanElement.h:
- * svg/SVGTests.h:
- * svg/SVGTextElement.cpp:
- * svg/SVGTextElement.h:
- * svg/SVGTextPathElement.cpp:
- * svg/SVGTextPositioningElement.cpp:
- * svg/SVGTextPositioningElement.h:
- * svg/SVGTitleElement.cpp:
- * svg/SVGTitleElement.h:
- * svg/SVGTransform.cpp:
- * svg/SVGTransform.h:
- * svg/SVGTransform.idl:
- * svg/SVGTransformList.cpp:
- * svg/SVGTransformList.h:
- * svg/SVGTransformable.h:
- * svg/SVGURIReference.h:
- * svg/SVGUnitTypes.h:
- * svg/SVGUseElement.cpp:
- * svg/SVGViewElement.cpp:
- * svg/SVGZoomAndPan.cpp:
- * svg/SVGZoomAndPan.h:
- * svg/SVGZoomEvent.cpp:
-
-2009-11-05 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- REGRESSION Clean up security origin usage in DOM Storage.
- https://bugs.webkit.org/show_bug.cgi?id=31188
-
- Clean up security origin usage in DOM Storage. This fixes a bug in my
- refactoring here: https://bugs.webkit.org/show_bug.cgi?id=31149
-
- Instead of having StorageAreaSync's constructor (which is called in the
- constructor for StorageAreaImpl) calling a method on StoargeAreaImpl to get the
- database identifier, simply have StorageAreaImpl pass the identifier into
- StorageAreaSync.
-
- No test because there's no change in externally observable behavior.
-
- * storage/StorageAreaImpl.cpp:
- (WebCore::StorageAreaImpl::StorageAreaImpl):
- * storage/StorageAreaImpl.h:
- * storage/StorageAreaSync.cpp:
- (WebCore::StorageAreaSync::create):
- (WebCore::StorageAreaSync::StorageAreaSync):
- * storage/StorageAreaSync.h:
-
-2009-11-05 Scott Violet <sky@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- Need notification of scrolling frame
- https://bugs.webkit.org/show_bug.cgi?id=31145
-
- Adds FrameLoaderClient::didChangeScrollOffset that is called when
- the frame scrolls. This will be used to know when history state
- needs to be updated.
-
- * loader/FrameLoaderClient.h:
- (WebCore::FrameLoaderClient::didChangeScrollOffset):
- * page/FrameView.cpp:
- (WebCore::FrameView::valueChanged):
-
-2009-11-05 Kenneth Russell <kbr@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Update bindings to use new API for external arrays
- https://bugs.webkit.org/show_bug.cgi?id=31181
-
- No new tests; covered by existing WebGL tests.
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::setIndexedPropertiesToExternalArray):
- (WebCore::V8DOMWrapper::getTemplate):
- (WebCore::V8DOMWrapper::convertToV8Object):
- * bindings/v8/V8DOMWrapper.h:
- * bindings/v8/custom/V8CanvasArrayCustom.h:
- (WebCore::constructCanvasArray):
-
-2009-11-05 Alpha Lam <hclam@chromium.org>
-
- Not reviewed, Chromium build fix.
-
- 50561 introduces a custom method for SVGMatrix, we need to implement
- this in V8.
-
- * bindings/v8/custom/V8CustomBinding.h:
- Adding definition for V8SVGMatrixMultiply.
- * bindings/v8/custom/V8SVGMatrixCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- Implement V8SVGMatrixMultiply according to the same method in JSC.
-
-2009-11-05 Jeremy Orlow <jorlow@chromium.org>
-
- Revert 50569 since it broke QT. Build fix and just a revert, so no review.
-
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::sessionStorage):
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
- (WebCore::Settings::setSessionStorageEnabled):
- * page/Settings.h:
- (WebCore::Settings::sessionStorageEnabled):
-
-2009-11-05 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- REGRESSION: Web Inspector doesn't show CSS rules properly for iframes
-
- https://bugs.webkit.org/show_bug.cgi?id=30884
-
- Test: inspector/styles-iframe.html
-
- * inspector/front-end/DOMAgent.js:
- (WebInspector.DOMNode):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.getStyles):
- (InjectedScript.getComputedStyle):
- (InjectedScript.addStyleSelector):
- * inspector/front-end/TestController.js:
- (WebInspector.TestController.prototype.notifyDone):
- (WebInspector.TestController.prototype.runAfterPendingDispatches):
- (WebInspector.evaluateForTestInFrontend.invokeMethod):
- (WebInspector.evaluateForTestInFrontend):
-
-2009-11-05 Vitaly Repeshko <vitalyr@chromium.org>
-
- Reviewed by Geoffrey Garen and Dimitri Glazkov.
-
- Rehashing of EventListenerMap leads to loss of EvenListenerList.
- https://bugs.webkit.org/show_bug.cgi?id=31027
-
- Tested by new fast/events/event-listener-map-rehash-crash.html.
-
- EventListenerMap modified to store pointers to listener vectors:
- * dom/EventTarget.cpp:
- (WebCore::EventTargetData::~EventTargetData):
- (WebCore::EventTarget::addEventListener):
- (WebCore::EventTarget::removeEventListener):
- (WebCore::EventTarget::fireEventListeners):
- (WebCore::EventTarget::getEventListeners):
- (WebCore::EventTarget::removeAllEventListeners):
- * dom/EventTarget.h:
-
- Usages updated after interface changes:
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::getEventListenersForNode):
- * svg/SVGUseElement.cpp:
- (WebCore::SVGUseElement::transferEventListenersToShadowTree):
-
-2009-11-05 Dan Kegel <dank@chromium.org>
-
- Reviewed by Dmitri Titov.
-
- Add missing initialization for m_createdByParser.
- https://bugs.webkit.org/show_bug.cgi?id=31089
-
- Test: fast/dom/beforeload/pi-before-load.xhtml in Valgrind
-
- * dom/ProcessingInstruction.cpp:
- (WebCore::ProcessingInstruction::ProcessingInstruction):
-
-2009-11-04 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Adam Barth.
-
- DOM Storage runtime flag changes
- https://bugs.webkit.org/show_bug.cgi?id=30602
-
- Part 2/2.
-
- Revert my changes to Settings and instead implement DOM Storage enabling via
- the methods agreed upon in https://bugs.webkit.org/show_bug.cgi?id=30240
-
- This stuff was (intentionally) never exposed to web pages or DRT, so there's no
- LayoutTest visible changes and thus no tests.
-
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::ACCESSOR_RUNTIME_ENABLER):
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::sessionStorage):
- * page/DOMWindow.idl:
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
- * page/Settings.h:
- * storage/Storage.cpp:
- (WebCore::Storage::setLocalStorageAvailable):
- (WebCore::Storage::localStorageAvailable):
- (WebCore::Storage::setSessionStorageAvailable):
- (WebCore::Storage::sessionStorageAvailable):
- * storage/Storage.h:
-
-2009-11-05 Jian Li <jianli@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Bug 31108 - [V8] REGRESSION: Pause on exception is broken
- https://bugs.webkit.org/show_bug.cgi?id=31108
-
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::invokeEventHandler):
- * bindings/v8/V8Utilities.cpp:
- (WebCore::reportException):
-
-2009-11-05 Jian Li <jianli@chromium.org>
-
- Reviewed by Dmitri Titov.
-
- We should not bubble up events if we drag something to an iframe that
- has an invalid source.
- https://bugs.webkit.org/show_bug.cgi?id=30469
-
- Test: http/tests/misc/bubble-drag-events.html
-
- * page/EventHandler.cpp:
- (WebCore::EventHandler::handleDragAndDropForTarget):
- (WebCore::EventHandler::updateDragAndDrop):
- (WebCore::EventHandler::cancelDragAndDrop):
- (WebCore::EventHandler::performDragAndDrop):
- * page/EventHandler.h:
- (WebCore::EventHandler::):
-
-2009-11-05 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: speed up Timelines Clear by a factor of thousands.
-
- https://bugs.webkit.org/show_bug.cgi?id=31160
-
- * inspector/front-end/utilities.js:
- (Element.prototype.removeChildren):
-
-2009-11-05 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Adam Barth.
-
- If high memory usage is detected, hint to V8 that it might be due
- to external objects retained by V8 objects.
- https://bugs.webkit.org/show_bug.cgi?id=31051
-
- * bindings/v8/V8GCController.cpp:
- (WebCore::GetMemoryUsageInMB):
- (WebCore::V8GCController::gcEpilogue):
- (WebCore::V8GCController::checkMemoryUsage):
- * bindings/v8/V8GCController.h:
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::evaluate):
- (WebCore::V8Proxy::runScript):
- (WebCore::V8Proxy::callFunction):
-
-2009-11-05 Jeff Schiller <codedread@gmail.com>
-
- Reviewed by Simon Fraser.
-
- Correct order of matrix multiplication for SVGMatrix.
- https://bugs.webkit.org/show_bug.cgi?id=16062
-
- Test: svg/dom/SVGMatrix-interface.xhtml
-
- * bindings/js/JSSVGMatrixCustom.cpp:
- (WebCore::JSSVGMatrix::multiply):
- * svg/SVGMatrix.idl:
-
-2009-11-04 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Make resource-related records in timeline
- actually take some time.
-
- https://bugs.webkit.org/show_bug.cgi?id=31139
-
- * English.lproj/localizedStrings.js:
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel):
- (WebInspector.TimelinePanel.prototype._formatRecord):
- (WebInspector.TimelinePanel.prototype._getRecordDetails):
- (WebInspector.TimelinePanel.prototype.reset):
-
-2009-11-04 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Simplify LocalStorageThread
- https://bugs.webkit.org/show_bug.cgi?id=30935
-
- This is a re-submit of 50519. LocalStorageTask should have never been ref
- counted. I've removed that and switched a PassRefPtr over to a PassOwnPtr.
-
- On LocalStoragethread: Remove reference counting. Get rid of locking. Make some
- of the method names a bit more clear. Assert proper thread usage. Join rather
- than detaching the thread and doing an ad-hoc form of join. Avoid touching
- variables on the background thread when simple to do so. Also create a generic
- scheduleTask function rather than one for each task.
-
- No behavior should have changed.
-
- * storage/LocalStorageTask.h:
- * storage/LocalStorageThread.cpp:
- (WebCore::LocalStorageThread::create):
- (WebCore::LocalStorageThread::LocalStorageThread):
- (WebCore::LocalStorageThread::~LocalStorageThread):
- (WebCore::LocalStorageThread::start):
- (WebCore::LocalStorageThread::threadEntryPointCallback):
- (WebCore::LocalStorageThread::threadEntryPoint):
- (WebCore::LocalStorageThread::scheduleTask):
- (WebCore::LocalStorageThread::terminate):
- (WebCore::LocalStorageThread::performTerminate):
- * storage/LocalStorageThread.h:
- * storage/StorageSyncManager.cpp:
- (WebCore::StorageSyncManager::StorageSyncManager):
- (WebCore::StorageSyncManager::~StorageSyncManager):
- (WebCore::StorageSyncManager::scheduleImport):
- (WebCore::StorageSyncManager::scheduleSync):
- * storage/StorageSyncManager.h:
-
-2009-11-04 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Calling databaseIdentifier on LocalStorage's background thread is not safe.
- https://bugs.webkit.org/show_bug.cgi?id=31149
-
- Calling SecurityOrigin::databaseIdentifier on LocalStorage's background thread
- is not safe. databaseIdentifier does a bunch of string concatenation which
- ref-counts StringImpls in some cases. This was caught by valgrind thread
- sanitizer: http://code.google.com/p/chromium/issues/detail?id=25645
-
- There's no way to test for such racyness, unfortunately.
-
- * storage/StorageAreaSync.cpp:
- (WebCore::StorageAreaSync::StorageAreaSync):
- (WebCore::StorageAreaSync::performImport):
- * storage/StorageAreaSync.h:
- * storage/StorageSyncManager.cpp:
- (WebCore::StorageSyncManager::fullDatabaseFilename):
- * storage/StorageSyncManager.h:
-
-2009-11-03 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Clean up StorageAreaSync
- https://bugs.webkit.org/show_bug.cgi?id=31100
-
- Major fixes: Break the ref count cycle for StorageArea on the main
- thread, not the background thread since the latter is not safe.
- Length() needs to block on the import completing.
-
- Small fixes: setItem needs to handle the copy on write case even if it
- has an exception. setItem and removeItem should just bail from the
- the function if the value hasn't changed rather than wrapping the end
- in an if block. Clear should only send an event if it wasn't already
- cleared. StorageAreaSync should assert that the final sync was
- scheduled.
-
- * storage/StorageAreaImpl.cpp:
- (WebCore::StorageAreaImpl::length):
- Forgot to block on the import.
- (WebCore::StorageAreaImpl::key):
- (WebCore::StorageAreaImpl::setItem):
- Handle the copy on write case even when there's an exception.
- (WebCore::StorageAreaImpl::removeItem):
- (WebCore::StorageAreaImpl::clear):
- * storage/StorageAreaSync.cpp:
- (WebCore::StorageAreaSync::~StorageAreaSync):
- (WebCore::StorageAreaSync::scheduleFinalSync):
- (WebCore::StorageAreaSync::performImport):
- (WebCore::StorageAreaSync::markImported):
- (WebCore::StorageAreaSync::blockUntilImportComplete):
- * storage/StorageAreaSync.h:
-
-2009-11-05 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Allow custom memory allocation control for WebCore's CachedResource
- https://bugs.webkit.org/show_bug.cgi?id=31114
-
- Inherits CachedResource class from Noncopyable because its (its child
- class) CachedCSSStyleSheet instantiated by 'new' in WebCore/loader/Cache.cpp:75
- and it is no need to be copyable.
-
- * loader/CachedResource.h:
-
-2009-11-04 Mark Mentovai <mark@chromium.org>
-
- Reviewed by Mark Rowe.
-
- Separate the difference between HAVE(CGINTERPOLATION_MEDIUM), which
- is true when building on 10.6 or later, and USE(CGINTERPOLATION_MEDIUM)
- which is true when targeting 10.6 or later.
-
- HAVE(CGINTERPOLATION_MEDIUM) indicates that kCGInterpolationMedium
- is present in the CGInterpolationQuality enum, and must be handled
- by a switch that has cases for each enumerated value.
-
- USE(CGINTERPOLATION_MEDIUM) indicates that the product will only run
- on 10.6 or later, and that CoreGraphics will understand when
- InterpolationMedium is mapped to kCGInterpolationMedium at runtime.
-
- * platform/graphics/cg/GraphicsContextCG.cpp:
- (WebCore::GraphicsContext::setImageInterpolationQuality):
- (WebCore::GraphicsContext::imageInterpolationQuality):
-
-2009-11-04 Dan Kegel <dank@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- Fix buffer overrun in WebCore::Page::userStyleSheetLocationChanged()
- https://bugs.webkit.org/show_bug.cgi?id=31138
-
- Test: LayoutTests/platform/mac/fast/loader/user-stylesheet-fast-path.html in Valgrind
-
- * page/Page.cpp:
- (WebCore::Page::userStyleSheetLocationChanged):
-
-2009-11-04 Timothy Hatcher <timothy@apple.com>
-
- Update the Web Inspector Timeline panel to better match the mock-up.
-
- https://bugs.webkit.org/show_bug.cgi?id=31150
-
- Reviewed by Pavel Feldman.
-
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel.prototype._getRecordDetails):
- (WebInspector.TimelinePanel.prototype._dragWindow):
- (WebInspector.TimelinePanel.prototype._resizeWindowLeft):
- (WebInspector.TimelinePanel.prototype._resizeWindowRight):
- (WebInspector.TimelineCategoryTreeElement.prototype.onattach):
- (WebInspector.TimelineRecordTreeElement.prototype.onattach):
- (WebInspector.TimelineRecordTreeElement.prototype.refresh):
- (WebInspector.TimelineCategoryGraph):
- * inspector/front-end/inspector.css:
-
-2009-11-05 Justin Garcia <justin.garcia@apple.com>
-
- Reviewed by Adele Peterson.
-
- https://bugs.webkit.org/show_bug.cgi?id=25439
- Deleting when in front of a block image removes character from previous paragraph
-
- Added editing/deleting/25439-{1,2,3}.html
-
- * editing/DeleteSelectionCommand.cpp:
- (WebCore::DeleteSelectionCommand::mergeParagraphs): Block images, tables and HRs cannot
- be made inline with other content. Instead of merging, just move the caret to just before
- the selection we deleted.
- * editing/htmlediting.cpp:
- (WebCore::firstInSpecialElement): Added a FIXME. This function begins iterating up from pos.node(), which
- doesn't necessarily contain pos (suppose pos was [img, 0]).
- (WebCore::lastInSpecialElement): Ditto.
- (WebCore::isRenderedAsNonInlineTableImageOrHR): Moved from visible_units.cpp. Added a check for non-inline images.
- * editing/htmlediting.h:
- * editing/visible_units.cpp:
- (WebCore::startOfParagraph): Use moved/renamed function. Removed FIXME. The problem causing
- 5027702 is now squarely in first/lastInSpecialElement
- (WebCore::endOfParagraph): Ditto.
-
-2009-11-04 Enrica Casucci <enrica@apple.com>
-
- Reviewed by Adele Peterson.
-
- Hang in Mail on attempting to change indent level.
- <rdar://problem/7131805>
- https://bugs.webkit.org/show_bug.cgi?id=31127
-
- The hang was caused by an infinite loop inside outdentRegion.
- The code did not account for the fact that, when a list item
- contains multiple paragraphs, outdent moves all paragraphs at
- once, invalidating some of the positions we keep track of in the loop.
- Some code refactoring has also been done to minimize duplicated code.
-
- Test: editing/execCommand/outdent-multiparagraph-list.html
-
- * editing/IndentOutdentCommand.cpp:
- (WebCore::IndentOutdentCommand::indentRegion): Moved code in common with
- outdentRegion to doApply.
- (WebCore::IndentOutdentCommand::outdentRegion): Fixed endless loop.
- (WebCore::IndentOutdentCommand::doApply): Some code refactoring.
- * editing/IndentOutdentCommand.h: Added VisiblePosition parameters to
- indentRegion and outdentRegion.
-
-2009-11-04 Alpha Lam <hclam@chromium.org>
-
- Reviewed by Eric Carlson.
-
- Volume slider doesn't have a thumb
- https://bugs.webkit.org/show_bug.cgi?id=31135
-
- Fixed an incorrect if statement that prevents volume slider
- being updated.
-
- The statement checks if the slider value equals to the current
- volume value of the media control to avoid updating the volume
- slider. Updating the volume slider control shouldn't be within
- this condition because we explicitly set them to be equals
- during creation of the controls and also when mouse events are
- received on the volume control.
-
- No new tests because existing code breaks:
- LayoutTests/media/video-volume-slider.html
-
- It should now start passing on Chromium.
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlVolumeSliderElement::update):
- Update the volume slider regardless of the current volume value
- of the media control.
-
-2009-11-04 Jenn Braithwaite <jennb@chromium.org>
-
- Reviewed by David Levin.
-
- Need to properly disable applicationCache at runtime
- https://bugs.webkit.org/show_bug.cgi?id=30417
-
- Adding applicationCacheEnabled bit to V8 RuntimeEnabledFeatures.
-
- No new exposed functionality, so no new tests.
-
- * bindings/v8/RuntimeEnabledFeatures.cpp:
- * bindings/v8/RuntimeEnabledFeatures.h:
- (WebCore::RuntimeEnabledFeatures::setApplicationCacheEnabled):
- (WebCore::RuntimeEnabledFeatures::applicationCacheEnabled):
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::ACCESSOR_RUNTIME_ENABLER):
- * page/DOMWindow.idl:
-
-2009-11-04 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=31143
- Assertion failure in CredentialStorage::set() when proxy credentials are being set
-
- No test, cannot test proxy behavior.
-
- * platform/network/CredentialStorage.cpp: (WebCore::CredentialStorage::set): Account for the
- possibility of null url. Release mode changes are likely inconsequential - e.g. we used to
- add "://" to origin set, which is weird, but safe.
-
-2009-11-04 Patrick Mueller <Patrick_Mueller@us.ibm.com>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Leftover Breakpoints in the Sidebar Pane
- https://bugs.webkit.org/show_bug.cgi?id=30659
-
- No new tests.
-
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel.prototype.addScript):
-
-2009-11-04 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Use a different method to identify the webkit port in
- InspectorBackent::platform().
- This corrects the inspector expected behavior with Qt on Windows.
- https://bugs.webkit.org/show_bug.cgi?id=31116
-
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::platform):
- (WebCore::InspectorBackend::port):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/front-end/InspectorControllerStub.js:
- (.WebInspector.InspectorControllerStub.prototype.port):
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.js:
- (WebInspector.loaded):
- (WebInspector.toolbarDragStart):
-
-2009-11-04 Benjamin Otte <otte@gnome.org>
-
- Reviewed by Gustavo Noronha.
-
- Update Cairo requirement to 1.6.
-
- Also remove all conditional code and workarounds for older versions of
- Cairo.
- In particular, gain image quality by removing the use of
- CAIRO_FILTER_NEAREST when rendering images and use the default
- bilinear filter instead.
- https://bugs.webkit.org/show_bug.cgi?id=19266
-
- * platform/graphics/cairo/GraphicsContextCairo.cpp:
- (WebCore::GraphicsContext::clipOut):
- * platform/graphics/cairo/ImageCairo.cpp:
- (WebCore::BitmapImage::draw):
- (WebCore::BitmapImage::drawPattern):
- * platform/graphics/cairo/PathCairo.cpp:
- (WebCore::Path::isEmpty):
- (WebCore::Path::boundingRect):
- * platform/gtk/RenderThemeGtk.cpp:
- (WebCore::paintMozWidget):
-
-2009-11-04 Kevin Ollivier <kevino@theolliviers.com>
-
- wx build fix. Restore removed string conversion after cleanup.
-
- * platform/graphics/wx/FontPlatformDataWx.cpp:
- (WebCore::FontPlatformData::computeHash):
-
-2009-11-04 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Beth Dakin.
-
- Need to implement ARIA role="combobox"
- https://bugs.webkit.org/show_bug.cgi?id=31096
-
- Test: accessibility/aria-combobox.html
-
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::isComboBox):
- (WebCore::AccessibilityObject::isExpanded):
- (WebCore::AccessibilityObject::expandObject):
- (WebCore::AccessibilityObject::increment):
- (WebCore::AccessibilityObject::decrement):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::expandObject):
- (WebCore::AccessibilityRenderObject::isExpanded):
- (WebCore::createARIARoleMap):
- * accessibility/AccessibilityRenderObject.h:
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
- (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
- (-[AccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
- * html/HTMLAttributeNames.in:
-
-2009-11-04 Kelly Norton <knorton@google.com>
-
- Reviewed by Pavel Feldman.
-
- Fixes naming inconsistencies in TimelineRecordFactory.
- https://bugs.webkit.org/show_bug.cgi?id=31132
-
- * inspector/InspectorTimelineAgent.cpp:
- (WebCore::InspectorTimelineAgent::willPaint):
- (WebCore::InspectorTimelineAgent::willChangeXHRReadyState):
- (WebCore::InspectorTimelineAgent::willLoadXHR):
- (WebCore::InspectorTimelineAgent::willEvaluateScript):
- (WebCore::InspectorTimelineAgent::willSendResourceRequest):
- (WebCore::InspectorTimelineAgent::didReceiveResourceResponse):
- (WebCore::InspectorTimelineAgent::didFinishLoadingResource):
- * inspector/TimelineRecordFactory.cpp:
- (WebCore::TimelineRecordFactory::createXHRReadyStateChangeRecord):
- (WebCore::TimelineRecordFactory::createXHRLoadRecord):
- (WebCore::TimelineRecordFactory::createEvaluateScriptRecord):
- (WebCore::TimelineRecordFactory::createMarkTimelineRecord):
- (WebCore::TimelineRecordFactory::createResourceSendRequestRecord):
- (WebCore::TimelineRecordFactory::createResourceReceiveResponseRecord):
- (WebCore::TimelineRecordFactory::createResourceFinishRecord):
- (WebCore::TimelineRecordFactory::createPaintRecord):
- * inspector/TimelineRecordFactory.h:
-
-2009-11-04 Eric Z. Ayers <zundel@google.com>
-
- Reviewed by Pavel Feldman.
-
- Followon to bug 31080, which protects Timeline
- instrumentation in the case where InspectorTimelineAgent
- is enabled or disabled during an event dispatch.
-
- https://bugs.webkit.org/show_bug.cgi?id=31121
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::evaluate):
- * dom/Document.cpp:
- (WebCore::Document::recalcStyle):
- * dom/Node.cpp:
- (WebCore::Node::dispatchGenericEvent):
- * html/HTMLTokenizer.cpp:
- (WebCore::HTMLTokenizer::write):
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::inspectorTimelineAgent):
- (WebCore::DOMWindow::dispatchEvent):
- * page/DOMWindow.h:
- * page/FrameView.cpp:
- (WebCore::FrameView::layout):
- (WebCore::FrameView::paintContents):
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::callReadyStateChangeListener):
-
-2009-11-04 Jeremy Orlow <jorlow@chromium.org>
-
- Revert 50519 while I work out what went wrong.
-
- * storage/LocalStorageThread.cpp:
- (WebCore::LocalStorageThread::create):
- (WebCore::LocalStorageThread::LocalStorageThread):
- (WebCore::LocalStorageThread::start):
- (WebCore::LocalStorageThread::localStorageThreadStart):
- (WebCore::LocalStorageThread::localStorageThread):
- (WebCore::LocalStorageThread::scheduleImport):
- (WebCore::LocalStorageThread::scheduleSync):
- (WebCore::LocalStorageThread::terminate):
- (WebCore::LocalStorageThread::performTerminate):
- * storage/LocalStorageThread.h:
- * storage/StorageSyncManager.cpp:
- (WebCore::StorageSyncManager::StorageSyncManager):
- (WebCore::StorageSyncManager::~StorageSyncManager):
- (WebCore::StorageSyncManager::scheduleImport):
- (WebCore::StorageSyncManager::scheduleSync):
- * storage/StorageSyncManager.h:
-
-2009-11-04 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Add basic support for resource events and marks.
- Couple of drive-by fixes. Enabling the panel!
-
- https://bugs.webkit.org/show_bug.cgi?id=31130
-
- * English.lproj/localizedStrings.js:
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel):
- (WebInspector.TimelinePanel.prototype._formatRecord):
- (WebInspector.TimelinePanel.prototype._getRecordDetails):
- (WebInspector.TimelinePanel.prototype.reset):
- (WebInspector.TimelineCategoryTreeElement.prototype._onCheckboxClicked):
- (WebInspector.TimelineRecordTreeElement.prototype.onattach):
- * inspector/front-end/inspector.js:
- (WebInspector._createPanels):
-
-2009-11-03 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Simplify LocalStorageThread
- https://bugs.webkit.org/show_bug.cgi?id=30935
-
- On LocalStoragethread: Remove reference counting. Get rid of locking. Make some
- of the method names a bit more clear. Assert proper thread usage. Join rather
- than detaching the thread and doing an ad-hoc form of join. Avoid touching
- variables on the background thread when simple to do so. Also create a generic
- scheduleTask function rather than one for each task.
-
- No behavior should have changed.
-
- * storage/LocalStorageThread.cpp:
- (WebCore::LocalStorageThread::create):
- (WebCore::LocalStorageThread::LocalStorageThread):
- (WebCore::LocalStorageThread::~LocalStorageThread):
- (WebCore::LocalStorageThread::start):
- (WebCore::LocalStorageThread::threadEntryPointCallback):
- (WebCore::LocalStorageThread::threadEntryPoint):
- (WebCore::LocalStorageThread::scheduleTask):
- (WebCore::LocalStorageThread::terminate):
- (WebCore::LocalStorageThread::performTerminate):
- * storage/LocalStorageThread.h:
- * storage/StorageSyncManager.cpp:
- (WebCore::StorageSyncManager::StorageSyncManager):
- (WebCore::StorageSyncManager::~StorageSyncManager):
- (WebCore::StorageSyncManager::scheduleImport):
- (WebCore::StorageSyncManager::scheduleSync):
- * storage/StorageSyncManager.h:
-
-2009-11-04 Vadim Zeitlin <vadim@wxwidgets.org>
-
- Reviewed by Eric Seidel.
-
- [wx] Small cleanup: avoid unnecessary wxString::mb_str() calls.
-
- * platform/graphics/wx/FontPlatformDataWx.cpp:
- (WebCore::FontPlatformData::computeHash):
-
-2009-11-04 Kelly Norton <knorton@google.com>
-
- Reviewed by Pavel Feldman.
-
- Adds lightweight network resources to InspectorTimelineAgent.
- https://bugs.webkit.org/show_bug.cgi?id=31065
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::willSendRequest):
- (WebCore::InspectorController::didReceiveResponse):
- (WebCore::InspectorController::didFinishLoading):
- (WebCore::InspectorController::didFailLoading):
- * inspector/InspectorTimelineAgent.cpp:
- (WebCore::InspectorTimelineAgent::willSendResourceRequest):
- (WebCore::InspectorTimelineAgent::didReceiveResourceResponse):
- (WebCore::InspectorTimelineAgent::didFinishLoadingResource):
- * inspector/InspectorTimelineAgent.h:
- (WebCore::):
- * inspector/TimelineRecordFactory.cpp:
- (WebCore::TimelineRecordFactory::createResourceSendRequestTimelineRecord):
- (WebCore::TimelineRecordFactory::createResourceReceiveResponseTimelineRecord):
- (WebCore::TimelineRecordFactory::createResourceFinishTimelineRecord):
- * inspector/TimelineRecordFactory.h:
- * inspector/front-end/TimelineAgent.js:
-
-2009-11-04 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] ASSERT failure when receiving 401 HTTP Authentication response.
- https://bugs.webkit.org/show_bug.cgi?id=31077
-
- Allow sending the response body under the same conditions that we
- allow it to finish without reporting an error.
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
-
-2009-11-04 Adam Roben <aroben@apple.com>
-
- Sort WebCore.base.exp
-
- Rubber-stamped by Dan Bernstein.
-
- * WebCore.base.exp: Sorted.
-
-2009-11-04 Csaba Osztrogonác <ossy@webkit.org>
-
- Unreviewed rollout.
-
- Revert r50496 because it broke all layout tests on QtBuildBot.
-
- * WebCore.pro:
- * platform/graphics/qt/FontCacheQt.cpp:
- (WebCore::fontCache):
- (WebCore::FontCache::FontCache):
- (WebCore::FontCache::getTraitsInFamily):
- (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
- (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
- (WebCore::FontPlatformDataCacheKey::):
- (WebCore::FontPlatformDataCacheKey::operator==):
- (WebCore::FontPlatformDataCacheKey::hash):
- (WebCore::FontPlatformDataCacheKey::computeHash):
- (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize):
- (WebCore::FontPlatformDataCacheKeyHash::hash):
- (WebCore::FontPlatformDataCacheKeyHash::equal):
- (WebCore::FontPlatformDataCacheKeyTraits::emptyValue):
- (WebCore::FontPlatformDataCacheKeyTraits::constructDeletedValue):
- (WebCore::FontPlatformDataCacheKeyTraits::isDeletedValue):
- (WebCore::FontCache::getCachedFontPlatformData):
- (WebCore::FontCache::getCachedFontData):
- (WebCore::FontCache::getLastResortFallbackFont):
- (WebCore::FontCache::releaseFontData):
- (WebCore::FontCache::purgeInactiveFontData):
- (WebCore::FontCache::addClient):
- (WebCore::FontCache::removeClient):
- (WebCore::FontCache::invalidate):
- * platform/graphics/qt/FontFallbackListQt.cpp: Added.
- (WebCore::FontFallbackList::FontFallbackList):
- (WebCore::FontFallbackList::invalidate):
- (WebCore::FontFallbackList::releaseFontData):
- (WebCore::FontFallbackList::determinePitch):
- (WebCore::FontFallbackList::fontDataAt):
- (WebCore::FontFallbackList::fontDataForCharacters):
- (WebCore::FontFallbackList::setPlatformFont):
- * platform/graphics/qt/FontPlatformData.h:
- (WebCore::FontPlatformData::pixelSize):
- * platform/graphics/qt/FontPlatformDataQt.cpp:
- (WebCore::FontPlatformData::FontPlatformData):
-
-2009-11-04 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=31044
- [Gtk] assertion when webkit_accessible_get_index_in_parent attempts to get parent of the web view
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (atkParentOfWebView):
- (webkit_accessible_get_index_in_parent):
- (webkit_accessible_get_parent):
-
-2009-11-04 Dominik Röttsches <dominik.roettsches@access-company.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=15914
- [GTK] Implement Unicode functionality using GLib
-
- Initial version of this patch by Jürg Billeter and Naiem Shaik.
- Patch 2/4 - Moving TextCodecs to GLib
-
- Added probing for a hard-coded lists of text encodings.
- The basis of this list is taken from the encodings supported by iconv,
- then extended by e.g. tis-620, windows-1251, euc-kr, windows-1253 and
- a number of Chinese ones.
-
- Probing is necessary with the current design of text codecs
- as iconv/GLib do not support enumerating available encodings.
-
- * GNUmakefile.am:
- * platform/ThreadGlobalData.cpp:
- (WebCore::ThreadGlobalData::ThreadGlobalData):
- (WebCore::ThreadGlobalData::~ThreadGlobalData):
- * platform/text/TextEncoding.cpp:
- (WebCore::TextEncoding::encode):
- * platform/text/TextEncodingRegistry.cpp:
- (WebCore::buildBaseTextCodecMaps):
- (WebCore::extendTextCodecMaps):
- * platform/text/gtk/TextCodecGtk.cpp: Added.
- (WebCore::):
- (WebCore::newTextCodecGtk):
- (WebCore::TextCodecGtk::isEncodingAvailable):
- (WebCore::TextCodecGtk::registerEncodingNames):
- (WebCore::TextCodecGtk::registerCodecs):
- (WebCore::TextCodecGtk::registerBaseEncodingNames):
- (WebCore::TextCodecGtk::registerBaseCodecs):
- (WebCore::TextCodecGtk::registerExtendedEncodingNames):
- (WebCore::TextCodecGtk::registerExtendedCodecs):
- (WebCore::TextCodecGtk::TextCodecGtk):
- (WebCore::TextCodecGtk::~TextCodecGtk):
- (WebCore::TextCodecGtk::releaseIConv):
- (WebCore::TextCodecGtk::createIConvDecoder):
- (WebCore::TextCodecGtk::createIConvEncoder):
- (WebCore::TextCodecGtk::decode):
- (WebCore::TextCodecGtk::encode):
- * platform/text/gtk/TextCodecGtk.h: Added.
-
-2009-11-04 Martin Robinson <martin.james.robinson@gmail.com>
-
- Reviewed by Jan Alonzo.
-
- [GTK] Enable DOM clipboard and drag-and-drop access
- https://bugs.webkit.org/show_bug.cgi?id=30623
-
- Unify redudant methods which will always return the same value.
-
- * platform/gtk/PasteboardGtk.cpp:
- (WebCore::Pasteboard::writeSelection):
- * platform/gtk/PasteboardHelper.h:
-
-2009-11-04 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=31035
- [GTK] some accessibility tests hitting assertion in debug builds
-
- Removes the assertions in webkit_accessible_ref_child; adds sanity checks.
- Any app or AT can attempt to ref a child at a bogus index.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (webkit_accessible_ref_child):
-
-2009-11-04 Benjamin Otte <otte@gnome.org>
-
- Reviewed by Jan Alonzo.
-
- [gtk] Use gst_element_class_set_details_simple()
-
- Cosmetic change, just code simplification
-
- * platform/graphics/gtk/VideoSinkGStreamer.cpp:
- (webkit_video_sink_base_init):
-2009-11-04 Kelly Norton <knorton@google.com>
-
- Reviewed by Timothy Hatcher.
-
- Adds paint rectangle information to TimelineAgent's didPaint callback.
- https://bugs.webkit.org/show_bug.cgi?id=31087
-
- * inspector/InspectorTimelineAgent.cpp:
- (WebCore::InspectorTimelineAgent::willPaint):
- * inspector/InspectorTimelineAgent.h:
- * inspector/TimelineRecordFactory.cpp:
- (WebCore::TimelineRecordFactory::createPaintTimelineRecord):
- * inspector/TimelineRecordFactory.h:
- * page/FrameView.cpp:
- (WebCore::FrameView::paintContents):
-
-2009-11-04 Jaime Yap <jaimeyap@google.com>
-
- Reviewed by Timothy Hatcher.
-
- This patch adds API to the console object for annotating the
- inspector timeline. This allows developers to mark logical
- checkpoints in their apps and have them overlaid in the event
- record tree.
-
- tests updated: LayoutTests/fast/dom/Window/window-properties.html
- https://bugs.webkit.org/show_bug.cgi?id=31082
-
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::markTimeline):
- * inspector/InspectorController.h:
- * inspector/InspectorTimelineAgent.cpp:
- (WebCore::InspectorTimelineAgent::didMarkTimeline):
- * inspector/InspectorTimelineAgent.h:
- (WebCore::):
- * inspector/TimelineRecordFactory.cpp:
- (WebCore::TimelineRecordFactory::createMarkTimelineRecord):
- * inspector/TimelineRecordFactory.h:
- * inspector/front-end/TimelineAgent.js:
- * page/Console.cpp:
- (WebCore::Console::markTimeline):
- * page/Console.h:
- * page/Console.idl:
-
-2009-11-03 Simon Hausmann <hausmann@webkit.org>
-
- Unreviewed build fix for WebInspector with Qt build.
-
- Simply re-generate the Qt resource file by running
- WebKitTools/Scripts/generate-qt-inspector-resource
-
- * inspector/front-end/WebKit.qrc:
-
-2009-11-02 Benjamin Poulain <benjamin.poulain@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Handle fonts like the other ports
-
- Remove FontFallbackListQt and rely on the common FontFallbackList
- to handle the fonts. FontCache and FontPlatformData have been
- updated to work with the common FontFallbackList.
-
- In the previous implementation, FontPlatformDataCacheKey
- was a clone of FontPlatformData with the hashing
- capabilities added in order to use it as a key in the cache's
- hashmap. FontPlatformData has been modified to handle the hashing
- function directly so the data are not copied twice in memory.
-
- FontFallbackList::fontDataAt() from FontFallbackListQt was a copy of
- code from FontCache::getFontData() and FontFallbackList::fontDataAt().
- The behavior is similar except currFamily->family().length() was
- not tested and the fallback fonts selector were not used.
-
- https://bugs.webkit.org/show_bug.cgi?id=29856
-
- Test: svg/text/text-font-invalid.html
-
- * WebCore.pro:
- * platform/graphics/qt/FontCacheQt.cpp:
- (WebCore::FontCache::platformInit):
- (WebCore::FontCache::getFontDataForCharacters):
- (WebCore::FontCache::getSimilarFontPlatformData):
- (WebCore::FontCache::getLastResortFallbackFont):
- (WebCore::FontCache::getTraitsInFamily):
- (WebCore::FontCache::createFontPlatformData):
- * platform/graphics/qt/FontFallbackListQt.cpp:
- Removed. We now use the implementation from FontFallbackList.cpp
- * platform/graphics/qt/FontPlatformData.h:
- Add hashing capabilities to be able to use the data with the FontCache.
- This was previously done in FontCacheQt.cpp
- (WebCore::FontPlatformData::FontPlatformData):
- Added a boolean to identify deleted value in the hash table.
- (WebCore::FontPlatformData::isHashTableDeletedValue):
- (WebCore::FontPlatformData::hash):
- (WebCore::FontPlatformData::operator==):
- * platform/graphics/qt/FontPlatformDataQt.cpp:
- (WebCore::FontPlatformData::FontPlatformData):
-
-2009-11-03 Dan Bernstein <mitz@apple.com>
-
- Leopard build fix
-
- * platform/network/mac/AuthenticationMac.mm:
- (WebCore::mac):
- (WebCore::core):
-
-2009-11-03 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Alexey Proskuryakov.
-
- Fix an assertion failure in core(NSURLProtectionSpace *) by handling NTLM
- authentication in AuthenticationMac
-
- * platform/network/mac/AuthenticationMac.mm:
-
-2009-11-03 Eric Z. Ayers <zundel@google.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes a problem where the timeline instrumentation crashes if
- timeline profiling is enabled or disabled in the middle of an
- event dispatch.
-
- https://bugs.webkit.org/show_bug.cgi?id=31080
-
- Test: inspector/timeline-trivial.html
-
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::evaluateInWorld):
- (WebCore::ScriptController::processingUserGestureEvent):
- * inspector/InspectorTimelineAgent.cpp:
- (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
- * page/DOMTimer.cpp:
- (WebCore::DOMTimer::fired):
-
-2009-11-03 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Dave Hyatt.
-
- Allow a frame to go back to copy-on-scroll when it ceases being overlapped
-
- The code was not testing slow-scrolling frames for overlappedness, thinking the answer
- would not matter. That is not the case if the only reason for the slow-scrolling is
- being overlapped.
-
- * page/FrameView.cpp:
- (WebCore::FrameView::useSlowRepaintsIfNotOverlapped): Added. Returns whether there is any
- reason besides being overlapped that the frame would need to fully repaint on scroll.
- * page/FrameView.h:
- * rendering/RenderWidget.cpp:
- (WebCore::RenderWidget::paint): Use useSlowRepaintsIfNotOverlapped().
-
-2009-11-03 Dmitry Titov <dimich@chromium.org>
-
- Not reviewed, Qt build fix.
-
- Need to use right capitalization for include file.
-
- * page/Navigator.cpp:
-
-2009-11-03 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Migrate from top bar filters to check boxes in Timeline.
-
- https://bugs.webkit.org/show_bug.cgi?id=31081
-
- * inspector/front-end/AbstractTimelinePanel.js:
- (WebInspector.AbstractTimelinePanel.prototype.showCategory):
- (WebInspector.AbstractTimelinePanel.prototype.hideCategory):
- (WebInspector.AbstractTimelinePanel.prototype.filter):
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel):
- (WebInspector.TimelineCategoryTreeElement.prototype.onattach):
- (WebInspector.TimelineCategoryTreeElement.prototype._onCheckboxClick):
- (WebInspector.TimelineCategoryGraph.prototype.clearChunks):
- (WebInspector.TimelineCategoryGraph.prototype.set dimmed):
- * inspector/front-end/inspector.css:
-
-2009-11-03 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: clear overview on Clear action and panel reset.
-
- https://bugs.webkit.org/show_bug.cgi?id=31078
-
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel.prototype._getRecordDetails):
- (WebInspector.TimelinePanel.prototype.reset):
-
-2009-11-03 Yaar Schnitman <yaar@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Imported action and rules python files that WebCore.gyp depends on.
- These files used to live in chromium.org and deal mostly with auto-generation
- of code by wrapping existing webkit perl scripts.
-
- https://bugs.webkit.org/show_bug.cgi?id=31071
-
- * WebCore.gyp/WebCore.gyp: Fixed paths in actions and rules.
- * WebCore.gyp/scripts/action_csspropertynames.py: Added.
- * WebCore.gyp/scripts/action_cssvaluekeywords.py: Added.
- * WebCore.gyp/scripts/action_makenames.py: Added.
- * WebCore.gyp/scripts/action_maketokenizer.py: Added.
- * WebCore.gyp/scripts/action_useragentstylesheets.py: Added.
- * WebCore.gyp/scripts/rule_binding.py: Added.
- * WebCore.gyp/scripts/rule_bison.py: Added.
- * WebCore.gyp/scripts/rule_gperf.py: Added.
-
-2009-11-03 Bradley Green <brg@chromium.org>
-
- Reviewed by Dmitry Titov.
-
- Implement window.navigator.registerProtocolHandler in webkit,
- https://bugs.webkit.org/b/29651
-
- Also implemented its sister API window.navigator.registerContentHandler.
-
- These methods are as described in the HTML5 specification which can be
- found here,
- http://dev.w3.org/html5/spec/Overview.html#dom-navigator-registerprotocolhandler
- http://dev.w3.org/html5/spec/Overview.html#dom-navigator-registercontenthandler
-
- As specified in the document, the behavior of the browser is determined
- by the current registered handler. The state of a registered handler
- can change at any time, with the user clearing a registered handler,
- registering a different page as handler, or deferring the hander to the
- OS. If webkit was to track the state of the currently registered
- handlers, it would need more APIs and complexity to keep in sync with
- user actions reported to webkit from the UA. For simplicity, the state
- of protocol handlers should be kept isolated from webkit and webkit only
- notifies the UA that a page has made the call. The UA is then
- responsible for correctly handling the registerProtocolHandler call and
- the redirects which result from registration.
-
- We do however follow the specification in insuring that the reserved
- schemes and mimeTypes are not passed to the UA as custom handler
- registration tests. We also insure that the "%s" token is present as
- required by the specification.
-
- Updated test expectations for window.clientInformation and navigator
- objects.
-
- Tests: fast/dom/registerContentHandler.html
- fast/dom/registerProtocolHandler.html
-
- * page/Chrome.cpp:
- (WebCore::Chrome::registerProtocolHandler):
- (WebCore::Chrome::registerContentHandler):
- * page/Chrome.h:
- * page/ChromeClient.h:
- (WebCore::ChromeClient::registerProtocolHandler):
- (WebCore::ChromeClient::registerContentHandler):
- * page/Navigator.cpp:
- (WebCore::verifyCustomHandlerURL):
- (WebCore::verifyProtocolHandlerScheme):
- (WebCore::Navigator::registerProtocolHandler):
- (WebCore::verifyProtocolHandlerMimeType):
- (WebCore::Navigator::registerContentHandler):
- * page/Navigator.h:
- * page/Navigator.idl:
-
-2009-11-03 Brady Eidson <beidson@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=31079 - Remove #include "Page.h" from Document.h
-
- No new tests. (No change in functionality)
-
- * dom/Document.cpp:
- (WebCore::Document::inspectorTimelineAgent): Moved from Document.h
- * dom/Document.h:
-
- Include "Page.h" directly:
- * html/HTMLVideoElement.cpp:
- * loader/RedirectScheduler.cpp:
- * page/History.cpp:
- * rendering/MediaControlElements.cpp:
- * storage/StorageAreaImpl.cpp:
-
-2009-11-03 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: hover over JS "things" in source and see their values
- https://bugs.webkit.org/show_bug.cgi?id=30913
-
- * inspector/front-end/SourceFrame.js:
-
-2009-11-03 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: update timeline content boundaries on timer.
-
- https://bugs.webkit.org/show_bug.cgi?id=31072
-
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel.prototype.refresh):
- (WebInspector.TimelinePanel.prototype._setWindowPosition):
-
-2009-11-03 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Anders Carlsson and Beth Dakin.
-
- https://bugs.webkit.org/show_bug.cgi?id=31070
- Fix <rdar://problem/7194735> Crashes at RenderText::RenderText()
- Fix <rdar://problem/6937089> Crashes at RenderWidget::destroy()
-
- Tests: plugins/attach-during-destroy.html
- plugins/destroy-reentry.html
-
- These crashes were caused by plug-in code running during detach(),
- causing re-entry into RenderWidget::destroy() in one case and a call
- into attach() in the other. The fix is to prevent plug-in code from
- being called at certain unsafe times (during attach(), detach(), and
- recalcStyle()) by deferring changes to the widget hierarchy.
-
- * dom/Document.cpp:
- (WebCore::Document::recalcStyle): Suspend widget hierarchy updates
- during style recalculation.
-
- * dom/Element.cpp:
- (WebCore::Element::attach): Suspend widget hierarchy updates during
- attach().
- (WebCore::Element::detach): Suspend widget hierarchy updates during
- detach().
-
- * rendering/RenderWidget.cpp:
- (WebCore::widgetNewParentMap): Returns a static map of pending changes
- to the widget hierarchy.
- (WebCore::RenderWidget::suspendWidgetHierarchyUpdates): Increments the
- suspend count.
- (WebCore::RenderWidget::resumeWidgetHierarchyUpdates): Decrements the
- suspend count. If the count is going to be zero, updates the widget
- hierarchy by executing the pending changes stored in the map.
- (WebCore::moveWidgetToParentSoon): Updates the widget hierarchy
- immediately or makes or updates an entry in the map, depending on
- whether updates are suspended.
- (WebCore::RenderWidget::destroy): Removed earlier bandaid fix for
- <rdar://problem/6937089>.
- (WebCore::RenderWidget::setWidgetGeometry): Assert that widget updates
- are not suspended, because this function updates the widget’s
- bounds, which can result in arbitrary native and JavaScript code
- execution. I think this assertion is true thanks to some deferred-
- update mechanisms that have already been deployed in other places
- in the code.
- (WebCore::RenderWidget::setWidget): Call moveWidgetToParentSoon instead
- of changing the widget hierarchy directly.
- * rendering/RenderWidget.h: Declared suspendWidgetHierarchyUpdates()
- and resumeWidgetHierarchyUpdates().
-
-2009-11-03 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: only show timeline records that contribute
- to the current window.
-
- https://bugs.webkit.org/show_bug.cgi?id=31069
-
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel.prototype.refresh):
- (WebInspector.TimelineGraph):
- (WebInspector.TimelineGraph.prototype.refresh):
-
-2009-11-03 Patrick Mueller <Patrick_Mueller@us.ibm.com>
-
- Reviewed by Timothy Hatcher.
-
- Watch expression editor should stay open after Add button was clicked
- https://bugs.webkit.org/show_bug.cgi?id=31049
-
- No new tests, was a regression, use existing manual test.
-
- * inspector/front-end/WatchExpressionsSidebarPane.js:
- (WebInspector.WatchExpressionsSection.prototype.update):
- (WebInspector.WatchExpressionsSection.prototype.addExpression):
-
-2009-11-03 Evan Martin <evan@chromium.org>
-
- Reviewed by Darin Adler.
-
- Fix an off-by-one in the CSS lexer that causes memory corruption in
- hard-to-trigger circumstances.
-
- https://bugs.webkit.org/show_bug.cgi?id=30827
-
- Test: fast/css/end-of-buffer-crash.html
-
- * css/maketokenizer: Add comments, fix off-by-one.
-
-2009-11-02 Darin Adler <darin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Crash due to double-destroy related to CSS run-in property
- https://bugs.webkit.org/show_bug.cgi?id=31034
- rdar://problem/7328458
-
- Test: fast/css/run-in-crash.html
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::destroy): Reorder destruction so the
- continuation is destroyed after anonymous children. See comment
- in the code for more details of why this is right.
- * rendering/RenderInline.cpp:
- (WebCore::RenderInline::destroy): Ditto.
-
-2009-11-03 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Fix exception in ElementsPanel.js when moving pointer out of crumbs and window
-
- There might be no new node under mouse if the pointer is moved out of the window
- in which case we get an exception.
- https://bugs.webkit.org/show_bug.cgi?id=31061
-
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.prototype._mouseMovedOutOfCrumbs):
-
-2009-11-03 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for the dom directory of WebCore
- https://bugs.webkit.org/show_bug.cgi?id=31053
-
- Inherits the following classes from Noncopyable because these are
- instantiated by 'new' and these are no need to be copyable:
-
- class EventNames - 'new' call: WebCore/platform/ThreadGlobalData.cpp:73
- struct PerformTaskContext - 'new' call: WebCore/dom/Document.cpp:4581
- class EventData - 'new' call: WebCore/dom/MessagePortChannel.cpp:38
- struct NodeListsNodeData - 'new' call: WebCore/dom/NodeRareData.h:51
- struct EventTargetData - 'new' call: WebCore/dom/NodeRareData.h:100
- class NodeRareData - 'new' call: WebCore/dom/Node.cpp:552
-
- Inherits QualifiedName class from FastAllocBase because it is
- instantiated by 'new' in WebCore/editing/markup.cpp:319
-
- * dom/Document.cpp:
- * dom/EventNames.h:
- * dom/EventTarget.h:
- * dom/MessagePortChannel.h:
- * dom/NodeRareData.h:
- * dom/QualifiedName.h:
-
-2009-11-03 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Implement timeline summary panel.
-
- https://bugs.webkit.org/show_bug.cgi?id=31064
-
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel.prototype._createOverview):
- (WebInspector.TimelinePanel.prototype.refresh):
- (WebInspector.TimelineCategoryGraph):
- (WebInspector.TimelineCategoryGraph.prototype.get graphElement):
- (WebInspector.TimelineCategoryGraph.prototype.addChunk):
- (WebInspector.TimelineCategoryGraph.prototype.clearChunks):
- (WebInspector.TimelineGraph.prototype.refresh):
- * inspector/front-end/inspector.css:
-
-2009-11-03 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Toggle off 'Search for node' when the Inspector window is closing
-
- Searching for node should be toggled off when the Inspector window is closed,
- in a platform-independent manner.
- https://bugs.webkit.org/show_bug.cgi?id=31059
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::setWindowVisible):
-
-2009-11-03 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Prepare for heap profiles upstreaming:
- - pass profile type id from InspectorController;
- - this makes WebInspector.CPUProfile redundant---removed;
- - support multiple profile types when populating profiles.
-
- https://bugs.webkit.org/show_bug.cgi?id=31052
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::createProfileHeader):
- * inspector/front-end/ProfileView.js:
- (WebInspector.CPUProfileView.profileCallback):
- (WebInspector.CPUProfileView):
- (WebInspector.CPUProfileView.prototype._sortData):
- * inspector/front-end/ProfilesPanel.js:
- (WebInspector.ProfilesPanel.prototype.addProfileHeader):
- * inspector/front-end/inspector.js:
- (WebInspector.addProfileHeader):
-
-2009-11-03 Dan Kegel <dank@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- UMR in WebCore::AccessibilityRenderObject::children(); m_childrenDirty uninitialized in constructor
- https://bugs.webkit.org/show_bug.cgi?id=31063
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
-
-2009-11-03 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Implement Timeline Window, wire it to the bottom timeline.
-
- https://bugs.webkit.org/show_bug.cgi?id=31056
-
- * English.lproj/localizedStrings.js:
- * inspector/front-end/AbstractTimelinePanel.js:
- (WebInspector.AbstractTimelinePanel.prototype.get items):
- (WebInspector.AbstractTimelinePanel.prototype.createInterface):
- (WebInspector.AbstractTimelinePanel.prototype.updateGraphDividersIfNeeded):
- (WebInspector.AbstractTimelinePanel.prototype._updateDividersLabelBarPosition):
- (WebInspector.AbstractTimelinePanel.prototype.invalidateAllItems):
- (WebInspector.AbstractTimelinePanel.prototype.refresh):
- (WebInspector.AbstractTimelinePanel.prototype.adjustScrollPosition):
- (WebInspector.AbstractTimelinePanel.prototype.addExtraDivider):
- (WebInspector.TimelineGrid):
- (WebInspector.TimelineGrid.prototype.get itemsGraphsElement):
- (WebInspector.TimelineGrid.prototype.updateDividers):
- (WebInspector.TimelineGrid.prototype.addExtraDivider):
- (WebInspector.TimelineGrid.prototype.setScrollAndDividerTop):
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel):
- (WebInspector.ResourcesPanel.prototype.updateGraphDividersIfNeeded):
- (WebInspector.ResourcesPanel.prototype.get _resources):
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel):
- (WebInspector.TimelinePanel.prototype.get categories):
- (WebInspector.TimelinePanel.prototype._formatRecord):
- (WebInspector.TimelinePanel.prototype.reset):
- (WebInspector.TimelinePanel.prototype._createOverview):
- (WebInspector.TimelinePanel.prototype.setSidebarWidth):
- (WebInspector.TimelinePanel.prototype.updateMainViewWidth):
- (WebInspector.TimelinePanel.prototype.updateGraphDividersIfNeeded):
- (WebInspector.TimelinePanel.prototype.refresh):
- (WebInspector.TimelinePanel.prototype._resizeWindow):
- (WebInspector.TimelinePanel.prototype._windowResizeDragging):
- (WebInspector.TimelinePanel.prototype._dragWindow):
- (WebInspector.TimelinePanel.prototype._windowDragging):
- (WebInspector.TimelinePanel.prototype._resizeWindowLeft):
- (WebInspector.TimelinePanel.prototype._resizeWindowRight):
- (WebInspector.TimelinePanel.prototype._setWindowPosition):
- (WebInspector.TimelinePanel.prototype._endWindowDragging):
- (WebInspector.TimelineCategoryTreeElement):
- (WebInspector.TimelineCategoryTreeElement.prototype.onattach):
- (WebInspector.TimelineCalculator.prototype.computeBarGraphPercentages):
- (WebInspector.TimelineCalculator.prototype.get minimumBoundary):
- (WebInspector.TimelineCalculator.prototype.get maximumBoundary):
- (WebInspector.TimelineCalculator.prototype.reset):
- (WebInspector.TimelineCalculator.prototype.updateBoundaries):
- (WebInspector.TimelineCalculator.prototype.formatValue):
- * inspector/front-end/inspector.css:
-
-2009-11-03 Simon Hausmann <hausmann@webkit.org>
-
- Reviewed by Tor Arne Vestbø.
-
- Make QWebPluginDatabase private API for now.
-
- https://bugs.webkit.org/show_bug.cgi?id=30775
-
- * WebCore.pro:
-
-2009-11-03 Simon Hausmann <hausmann@webkit.org>
-
- Reviewed by Tor Arne Vestbø.
-
- Extended the conversion of the WebCore ResourceRequest to the
- QNetworkRequest with a mandatory originating object argument,
- which is meant to be the QWebFrame the request belongs to.
-
- https://bugs.webkit.org/show_bug.cgi?id=29975
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
- (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
- (WebCore::QNetworkReplyHandler::start):
- * platform/network/qt/ResourceRequest.h:
- * platform/network/qt/ResourceRequestQt.cpp:
- (WebCore::ResourceRequest::toNetworkRequest):
-
-2009-11-03 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Pavel Feldman.
-
- Web Inspector: monitorEvent should be monitorEvents
- https://bugs.webkit.org/show_bug.cgi?id=31042
-
- * inspector/front-end/InjectedScript.js:
- (InjectedScript._ensureCommandLineAPIInstalled):
-
-2009-11-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Rubber-stamped by Antti Koivisto.
-
- [Qt] Build fix for Windows CE
-
- * plugins/PluginDatabase.cpp:
-
-2009-11-02 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by David Levin.
-
- fix accessibility webkit-style-check errors
- https://bugs.webkit.org/show_bug.cgi?id=29672
-
- * accessibility/AXObjectCache.cpp:
- (WebCore::AXObjectCache::getOrCreate):
- (WebCore::AXObjectCache::remove):
- (WebCore::AXObjectCache::platformGenerateAXID):
- (WebCore::AXObjectCache::removeAXID):
- * accessibility/AXObjectCache.h:
- (WebCore::AXObjectCache::enableAccessibility):
- (WebCore::AXObjectCache::enableEnhancedUserInterfaceAccessibility):
- (WebCore::AXObjectCache::accessibilityEnabled):
- (WebCore::AXObjectCache::accessibilityEnhancedUserInterfaceEnabled):
- (WebCore::AXObjectCache::isIDinUse):
- (WebCore::AXObjectCache::objectFromAXID):
- (WebCore::AXObjectCache::):
- (WebCore::AXObjectCache::handleActiveDescendantChanged):
- (WebCore::AXObjectCache::handleAriaRoleChanged):
- (WebCore::AXObjectCache::detachWrapper):
- (WebCore::AXObjectCache::attachWrapper):
- (WebCore::AXObjectCache::selectedChildrenChanged):
- (WebCore::AXObjectCache::postNotification):
- (WebCore::AXObjectCache::postPlatformNotification):
- (WebCore::AXObjectCache::handleFocusedUIElementChanged):
- (WebCore::AXObjectCache::handleScrolledToAnchor):
- * accessibility/AccessibilityARIAGrid.cpp:
- (WebCore::AccessibilityARIAGrid::cellForColumnAndRow):
- * accessibility/AccessibilityAllInOne.cpp:
- * accessibility/AccessibilityImageMapLink.cpp:
- * accessibility/AccessibilityList.h:
- (WebCore::AccessibilityList::isList):
- * accessibility/AccessibilityListBox.cpp:
- * accessibility/AccessibilityListBox.h:
- (WebCore::AccessibilityListBox::isListBox):
- * accessibility/AccessibilityListBoxOption.cpp:
- * accessibility/AccessibilityListBoxOption.h:
- (WebCore::AccessibilityListBoxOption::isListBoxOption):
- * accessibility/AccessibilityMediaControls.h:
- (WebCore::AccessibilityMediaControl::~AccessibilityMediaControl):
- (WebCore::AccessibilityMediaTimeline::~AccessibilityMediaTimeline):
- (WebCore::AccessibilityMediaTimeline::isMediaTimeline):
- (WebCore::AccessibilityMediaControlsContainer::~AccessibilityMediaControlsContainer):
- (WebCore::AccessibilityMediaControlsContainer::roleValue):
- (WebCore::AccessibilityMediaControlsContainer::accessibilityIsIgnored):
- (WebCore::AccessibilityMediaTimeDisplay::~AccessibilityMediaTimeDisplay):
- (WebCore::AccessibilityMediaTimeDisplay::roleValue):
- * accessibility/AccessibilityObject.cpp:
- (WebCore::AccessibilityObject::parentObjectUnignored):
- (WebCore::AccessibilityObject::rightLineVisiblePositionRange):
- (WebCore::replacedNodeNeedsCharacter):
- (WebCore::AccessibilityObject::stringForVisiblePositionRange):
- (WebCore::AccessibilityObject::lengthForVisiblePositionRange):
- (WebCore::AccessibilityObject::actionVerb):
- * accessibility/AccessibilityObject.h:
- (WebCore::PlainTextRange::isNull):
- (WebCore::AccessibilityObject::isAccessibilityRenderObject):
- (WebCore::AccessibilityObject::isAnchor):
- (WebCore::AccessibilityObject::isAttachment):
- (WebCore::AccessibilityObject::isHeading):
- (WebCore::AccessibilityObject::isLink):
- (WebCore::AccessibilityObject::isImage):
- (WebCore::AccessibilityObject::isNativeImage):
- (WebCore::AccessibilityObject::isImageButton):
- (WebCore::AccessibilityObject::isPasswordField):
- (WebCore::AccessibilityObject::isTextControl):
- (WebCore::AccessibilityObject::isNativeTextControl):
- (WebCore::AccessibilityObject::isWebArea):
- (WebCore::AccessibilityObject::isCheckboxOrRadio):
- (WebCore::AccessibilityObject::isListBox):
- (WebCore::AccessibilityObject::isFileUploadButton):
- (WebCore::AccessibilityObject::isProgressIndicator):
- (WebCore::AccessibilityObject::isSlider):
- (WebCore::AccessibilityObject::isControl):
- (WebCore::AccessibilityObject::isList):
- (WebCore::AccessibilityObject::isDataTable):
- (WebCore::AccessibilityObject::isTableRow):
- (WebCore::AccessibilityObject::isTableColumn):
- (WebCore::AccessibilityObject::isTableCell):
- (WebCore::AccessibilityObject::isFieldset):
- (WebCore::AccessibilityObject::isGroup):
- (WebCore::AccessibilityObject::isChecked):
- (WebCore::AccessibilityObject::isEnabled):
- (WebCore::AccessibilityObject::isSelected):
- (WebCore::AccessibilityObject::isFocused):
- (WebCore::AccessibilityObject::isHovered):
- (WebCore::AccessibilityObject::isIndeterminate):
- (WebCore::AccessibilityObject::isLoaded):
- (WebCore::AccessibilityObject::isMultiSelect):
- (WebCore::AccessibilityObject::isOffScreen):
- (WebCore::AccessibilityObject::isPressed):
- (WebCore::AccessibilityObject::isReadOnly):
- (WebCore::AccessibilityObject::isVisited):
- (WebCore::AccessibilityObject::isRequired):
- (WebCore::AccessibilityObject::canSetFocusAttribute):
- (WebCore::AccessibilityObject::canSetTextRangeAttributes):
- (WebCore::AccessibilityObject::canSetValueAttribute):
- (WebCore::AccessibilityObject::hasIntValue):
- (WebCore::AccessibilityObject::accessibilityShouldUseUniqueId):
- (WebCore::AccessibilityObject::accessibilityIsIgnored):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::parentObjectIfExists):
- (WebCore::AccessibilityRenderObject::parentObject):
- (WebCore::AccessibilityRenderObject::isMenuRelated):
- (WebCore::AccessibilityRenderObject::accessibilityDescription):
- (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
- (WebCore::AccessibilityRenderObject::isFocused):
- (WebCore::AccessibilityRenderObject::visiblePositionRangeForLine):
- (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
- (WebCore::AccessibilityRenderObject::doAXRangeForLine):
- (WebCore::AccessibilityRenderObject::doAXStringForRange):
- (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
- (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
- (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
- (WebCore::AccessibilityRenderObject::isPresentationalChildOfAriaRole):
- (WebCore::AccessibilityRenderObject::canSetFocusAttribute):
- (WebCore::AccessibilityRenderObject::canHaveChildren):
- (WebCore::AccessibilityRenderObject::actionVerb):
- (WebCore::shouldReturnTagNameAsRoleForMSAA):
- * accessibility/AccessibilityRenderObject.h:
- (WebCore::AccessibilityRenderObject::isAccessibilityRenderObject):
- * accessibility/AccessibilitySlider.cpp:
- (WebCore::AccessibilitySlider::orientation):
- * accessibility/AccessibilitySlider.h:
- (WebCore::AccessibilitySlider::~AccessibilitySlider):
- (WebCore::AccessibilitySlider::roleValue):
- (WebCore::AccessibilitySlider::accessibilityIsIgnored):
- (WebCore::AccessibilitySlider::isSlider):
- (WebCore::AccessibilitySlider::canSetValueAttribute):
- (WebCore::AccessibilitySliderThumb::~AccessibilitySliderThumb):
- (WebCore::AccessibilitySliderThumb::roleValue):
- (WebCore::AccessibilitySliderThumb::accessibilityIsIgnored):
- (WebCore::AccessibilitySliderThumb::setParentObject):
- (WebCore::AccessibilitySliderThumb::parentObject):
- * accessibility/AccessibilityTable.cpp:
- (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
- * accessibility/AccessibilityTableColumn.cpp:
- * accessibility/AccessibilityTableHeaderContainer.cpp:
- (WebCore::AccessibilityTableHeaderContainer::addChildren):
- * accessibility/AccessibilityTableRow.cpp:
- * accessibility/mac/AccessibilityObjectWrapper.h:
-
-2009-11-02 Darin Fisher <darin@chromium.org>
-
- Fixing JSC build bustage.
-
- * bindings/js/ScriptController.cpp: Added missing #include
-
-2009-10-30 Darin Fisher <darin@chromium.org>
-
- Reviewed by Adam Barth.
-
- Give the FrameLoaderClient the ability to override Settings::isJavaScriptEnabled.
- https://bugs.webkit.org/show_bug.cgi?id=30967
-
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::isEnabled):
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::isEnabled):
- * bindings/v8/V8Proxy.cpp: Move implementation of isEnabled to ScriptController
- * bindings/v8/V8Proxy.h: Ditto
- * loader/FrameLoaderClient.h:
- (WebCore::FrameLoaderClient::allowJavaScript):
- * platform/chromium/ChromiumBridge.h: Delete uiResourceProtocol function
-
-2009-11-02 Brady Eidson <beidson@apple.com>
-
- Rubberstamped by Mark Rowe.
-
- Fix a typo in Mark's last commit.
-
- * loader/archive/ArchiveFactory.cpp:
- (WebCore::archiveMIMETypes):
-
-2009-11-02 Mark Rowe <mrowe@apple.com>
-
- Rubber-stamped by Brady Eidson.
-
- Re-enable support for web archives on Windows. It was mistakenly disabled in r50438.
-
- * loader/archive/ArchiveFactory.cpp:
- (WebCore::archiveMIMETypes):
-
-2009-11-02 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Darin Adler.
-
- PLATFORM(CF) should be set when building for Qt on Darwin
- https://bugs.webkit.org/show_bug.cgi?id=23671
-
- * WebCore.pro: Add SharedBufferCF.cpp and SmartReplaceCF.cpp
- to the Darwin build.
- * loader/archive/ArchiveFactory.cpp: Change the support for
- legacy WebArchive from all CF platforms to Mac and Chromium
- CF platforms.
- (WebCore::archiveMIMETypes):
- * platform/text/AtomicString.h: Remove PLATFORM(QT) &&
- PLATFORM(DARWIN) test as it is redundant now.
- * platform/text/PlatformString.h: Ditto.
- * platform/text/StringImpl.h: Ditto.
- * platform/text/cf/StringCF.cpp: Ditto.
- * platform/text/cf/StringImplCF.cpp: Ditto.
-
-2009-11-02 Adam Barth <abarth@webkit.org>
-
- Reviewed by David Levin.
-
- [Chromium] Actually declare getPluginMimeTypeFromExtension in a header.
- https://bugs.webkit.org/show_bug.cgi?id=30985
-
- Our current code does not conform to our style guide.
-
- * WebCore.gyp/WebCore.gyp:
- * WebCore.gypi:
- * platform/chromium/MIMETypeRegistryChromium.cpp:
- * plugins/chromium/PluginDataChromium.cpp:
- * plugins/chromium/PluginDataChromium.h: Added.
-
-2009-11-02 Adele Peterson <adele@apple.com>
-
- Reviewed by Darin Adler.
-
- Fix for <rdar://problem/7038305> REGRESSION (Safari 4.0.2 - ToT): After navigating back to a known phishy page, the "Ignore warning" button appears highlighted (along with the "Go Back" button)
-
- This bug is timing dependent, and not always reproducible. I could not think of a way to add a
- layout test that would demonstrate the problem and fix.
-
- * platform/mac/ThemeMac.mm:
- (WebCore::checkbox): Update style.
- (WebCore::paintCheckbox): ditto.
- (WebCore::radio): ditto.
- (WebCore::paintRadio): ditto.
- (WebCore::setupButtonCell): Added convenience method.
- (WebCore::button): Use a separate NSButtonCell for defaultButtons and regular buttons.
- (WebCore::paintButton): Don't check for the key window here. Consider that when deciding if the button should have the default style in RenderTheme.
- * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isDefault): Only consider a button to be default if the page is active. This fixes
- a problem I noticed where the button would flicker crazily if the page with the default button was in the background.
-
-2009-11-02 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Anders Carlsson.
-
- Minor RenderWidget clean-up in preparation for deferring widget tree
- mutation when it is not safe.
-
- * rendering/RenderWidget.cpp:
- (WebCore::RenderWidget::RenderWidget): Initialize m_refCount to 1
- instead of calling ref().
- (WebCore::RenderWidget::destroy): Call setWidget(0) instead of
- repeating what it does.
- (WebCore::RenderWidget::setWidgetGeometry): Now returns a boolean
- indicating whether the bounds have changed.
- (WebCore::RenderWidget::setWidget): Replaced all-encompassing if
- statement with an early return.
- (WebCore::RenderWidget::updateWidgetPosition): Call setWidgetGeometry().
- * rendering/RenderWidget.h:
-
-2009-11-02 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Adding Chromium's DatabaseTracker and SQLTransactionClient
- implementations.
-
- https://bugs.webkit.org/show_bug.cgi?id=30701
-
- * storage/chromium: Added.
- * storage/chromium/DatabaseObserver.h: Added.
- * storage/chromium/DatabaseTrackerChromium.cpp: Added.
- * storage/chromium/QuotaTracker.cpp: Added.
- * storage/chromium/QuotaTracker.h: Added.
- * storage/chromium/SQLTransactionClientChromium.cpp: Added.
-
-2009-11-02 Enrica Casucci <enrica@apple.com>
-
- Reviewed by Adele Peterson and Dan Bernstein.
-
- Safari crashes when calling execCommand on formatted html in special case
- <rdar://problem/7318656>
- https://bugs.webkit.org/show_bug.cgi?id=31023
-
- Test: editing/execCommand/align-in-span.html
-
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::containingBlock): Modified comment on containingBlock returning NULL.
- * rendering/RenderText.cpp:
- (WebCore::RenderText::setSelectionState): Added check for NULL return from containingBlock,
- since it is possible when dealing with orphaned trees.
-
-2009-11-02 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Exception checks were being too aggressive
- https://bugs.webkit.org/show_bug.cgi?id=31005
-
- Several calls in CanvasRenderingContext3D are allowed to
- have a null value passed, which indicated that the
- object is being unbound. Handle this case and the corresponding
- null handling in GraphicsContext3DMac.
-
- * html/canvas/CanvasRenderingContext3D.cpp:
- (WebCore::CanvasRenderingContext3D::bindBuffer):
- (WebCore::CanvasRenderingContext3D::bindFramebuffer):
- (WebCore::CanvasRenderingContext3D::bindRenderbuffer):
- (WebCore::CanvasRenderingContext3D::bindTexture):
- (WebCore::CanvasRenderingContext3D::framebufferRenderbuffer):
- (WebCore::CanvasRenderingContext3D::framebufferTexture2D):
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::framebufferRenderbuffer):
- (WebCore::GraphicsContext3D::framebufferTexture2D):
-
-2009-11-02 Patrick Mueller <Patrick_Mueller@us.ibm.com>
-
- Reviewed by Timothy Hatcher.
-
- Each JS execution in console adds extra item into "scripts" combo
- https://bugs.webkit.org/show_bug.cgi?id=30212
-
- Added manual test
-
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
- * manual-tests/inspector/hidden-evals.html: Added.
-
-2009-11-02 Kelly Norton <knorton@google.com>
-
- Reviewed by Timothy Hatcher.
-
- Adds a missed case for InspectorTimeline, DOMWindow dispatch of DOM events.
- https://bugs.webkit.org/show_bug.cgi?id=31030
-
- * dom/Node.cpp:
- (WebCore::eventHasListeners): Checks DOMWindow for listeners.
- (WebCore::Node::dispatchGenericEvent):
-
-2009-11-02 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by David Levin.
-
- Remove threadsafe refcounting from tasks used with WTF::MessageQueue.
- https://bugs.webkit.org/show_bug.cgi?id=30612
-
- No new tests since no new functionality. Storage, MessagePorts and Workers tests cover this.
-
- There are a lot of files but most changes are simply replace RefPtr and PassRefPtr with
- OwnPtr and PassOwnPtr when dealing with Tasks.
-
- ScriptExecutionContext::Task, DatabaseTask and WorkerRunLoop::Task are no longer
- threadsafe refcounted, but simply Noncopyable.
-
- * dom/Document.cpp:
- (WebCore::ScriptExecutionContextTaskTimer::ScriptExecutionContextTaskTimer):
- (WebCore::PerformTaskContext::PerformTaskContext):
- (WebCore::Document::postTask):
- * dom/Document.h:
- * dom/ScriptExecutionContext.cpp:
- (WebCore::ProcessMessagesSoonTask::create):
- * dom/ScriptExecutionContext.h:
- * dom/default/PlatformMessagePortChannel.cpp:
- (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
- * dom/default/PlatformMessagePortChannel.h:
- (WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
- (WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty):
- * loader/FrameLoader.cpp:
- (WebCore::HashChangeEventTask::create):
- * loader/appcache/ApplicationCacheGroup.cpp:
- (WebCore::CallCacheListenerTask::create):
- * storage/Database.cpp:
- (WebCore::Database::openAndVerifyVersion):
- (WebCore::Database::markAsDeletedAndClose):
- (WebCore::Database::scheduleTransaction):
- (WebCore::Database::scheduleTransactionStep):
- (WebCore::Database::tableNames):
- * storage/DatabaseTask.h:
- (WebCore::DatabaseOpenTask::create):
- (WebCore::DatabaseCloseTask::create):
- (WebCore::DatabaseTransactionTask::create):
- (WebCore::DatabaseTableNamesTask::create):
- * storage/DatabaseThread.cpp:
- (WebCore::DatabaseThread::databaseThread):
- (WebCore::DatabaseThread::scheduleTask):
- (WebCore::DatabaseThread::scheduleImmediateTask):
- (WebCore::SameDatabasePredicate::operator()):
- * storage/DatabaseThread.h:
- * storage/LocalStorageTask.h:
- (WebCore::LocalStorageTask::createImport):
- (WebCore::LocalStorageTask::createSync):
- (WebCore::LocalStorageTask::createTerminate):
- * storage/LocalStorageThread.cpp:
- (WebCore::LocalStorageThread::localStorageThread):
- * storage/LocalStorageThread.h:
- * websockets/WebSocket.cpp:
- (WebCore::ProcessWebSocketEventTask::create):
- * workers/DefaultSharedWorkerRepository.cpp:
- (WebCore::SharedWorkerProxy::postTaskToLoader):
- (WebCore::SharedWorkerProxy::postTaskForModeToWorkerContext):
- (WebCore::SharedWorkerConnectTask::create):
- * workers/GenericWorkerTask.h:
- (WebCore::GenericWorkerTask1::create):
- (WebCore::GenericWorkerTask2::create):
- (WebCore::GenericWorkerTask3::create):
- (WebCore::GenericWorkerTask4::create):
- (WebCore::GenericWorkerTask5::create):
- (WebCore::GenericWorkerTask6::create):
- (WebCore::GenericWorkerTask7::create):
- (WebCore::GenericWorkerTask8::create):
- (WebCore::createCallbackTask):
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::postTask):
- * workers/WorkerContext.h:
- * workers/WorkerLoaderProxy.h:
- * workers/WorkerMessagingProxy.cpp:
- (WebCore::MessageWorkerContextTask::create):
- (WebCore::MessageWorkerTask::create):
- (WebCore::WorkerExceptionTask::create):
- (WebCore::WorkerContextDestroyedTask::create):
- (WebCore::WorkerTerminateTask::create):
- (WebCore::WorkerThreadActivityReportTask::create):
- (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerContext):
- (WebCore::WorkerMessagingProxy::postTaskToLoader):
- (WebCore::WorkerMessagingProxy::workerThreadCreated):
- * workers/WorkerMessagingProxy.h:
- * workers/WorkerRunLoop.cpp:
- (WebCore::ModePredicate::operator()):
- (WebCore::WorkerRunLoop::runInMode):
- (WebCore::WorkerRunLoop::postTask):
- (WebCore::WorkerRunLoop::postTaskForMode):
- (WebCore::WorkerRunLoop::Task::create):
- (WebCore::WorkerRunLoop::Task::performTask):
- (WebCore::WorkerRunLoop::Task::Task):
- * workers/WorkerRunLoop.h:
- (WebCore::WorkerRunLoop::Task::~Task):
- (WebCore::WorkerRunLoop::Task::mode):
-
-2009-11-02 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- [GTK] Failing media/video-played-reset.html
- https://bugs.webkit.org/show_bug.cgi?id=30589
-
- new m_seekTime attribute to keep track of the seek position
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::currentTime):
- (WebCore::MediaPlayerPrivate::seek):
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
-
-2009-11-02 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- [GTK] Remove Referer when redirecting to non-secure site
- https://bugs.webkit.org/show_bug.cgi?id=31021
-
- Remove referer from HTTP headers when redirecting to a non-secure
- site.
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::restartedCallback):
-
-2009-11-02 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=18539
- multipart/form-data not being parsed correctly on server due to '+' in boundary string
-
- No test - the characters that the boundary is made of are not deterministic.
-
- * platform/network/FormDataBuilder.cpp: (WebCore::FormDataBuilder::generateUniqueBoundaryString):
- Don't ever put a '+' in boundary string, either. Removed a FIXME to bring '/' back once
- GMail is fixed - I don't think we'll ever want to allow non-alphanumeric characters, as
- they cause problems on many web sites.
-
-2009-10-30 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=30969
- A no-prefix XPath node test should not match no-namespace elements in HTML document
-
- Test: fast/xpath/null-namespace-in-html.html
-
- * xml/XPathStep.cpp: (WebCore::XPath::nodeMatchesBasicTest): Special case non-HTML elements
- in HTML documents (as these are the ones that can have null namespace).
-
-2009-11-02 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: [REGRESSION] No timeline marks on resources panel.
-
- https://bugs.webkit.org/show_bug.cgi?id=31013
-
- * inspector/front-end/AbstractTimelinePanel.js:
- (WebInspector.AbstractTimelinePanel.prototype.updateGraphDividersIfNeeded):
-
-2009-11-02 David Levin <levin@chromium.org>
-
- Reviewed by Dan Bernstein.
-
- Possible crash in RenderSlider::layout.
- https://bugs.webkit.org/show_bug.cgi?id=31016
-
- Fix out of place line of code.
-
- Test: scrollbars/overflow-scrollbar-combinations.html
- This crash only seems to repro when WebKit draws the play controls,
- so the crash repros in chromium running this test but not WebKit
- nightlies which use QuickTime to draw the controls.
-
- * rendering/RenderSlider.cpp:
- (WebCore::RenderSlider::layout):
-
-2009-11-02 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] Fix Qt build on Windows.
- https://bugs.webkit.org/show_bug.cgi?id=30905
-
- * WebCore.pro:
- * platform/graphics/BitmapImage.h:
- * platform/graphics/qt/ImageQt.cpp:
- (WebCore::BitmapImage::BitmapImage):
- (WebCore::BitmapImage::create):
-
-2009-11-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
-
- Reviewed by Adam Barth.
-
- QWebView crash fix.
-
- The QWebView should not crash if the stop() method is called from
- a function triggered by the loadProgress signal.
-
- A null pointer protection was added in the ProgressTracker::incrementProgress.
-
- New autotest was created.
-
- https://bugs.webkit.org/show_bug.cgi?id=29425
-
- * loader/ProgressTracker.cpp:
- (WebCore::ProgressTracker::incrementProgress):
-
-2009-11-02 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Fix a leftover from profiles panel generalization.
-
- https://bugs.webkit.org/show_bug.cgi?id=31010
-
- * inspector/front-end/ProfilesPanel.js:
- (WebInspector.ProfilesPanel.prototype.get searchableViews):
-
-2009-11-02 Kai Koehne <kai.koehne@nokia.com>
-
- Reviewed by Holger Freyther.
-
- Remove implementation of ImageDecocerQt::clearFrameBufferCache.
- The implementation was buggy, and will visually break repeating
- animations anyway.
-
- https://bugs.webkit.org/show_bug.cgi?id=31009
-
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoderQt::clearFrameBufferCache):
-
-2009-11-02 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=30964
- [Gtk] Implemment AtkDocument
-
- Provides access to the reported content language.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (webkit_accessible_document_get_locale):
-
-2009-11-02 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Rewrite CSSSourceSyntaxHighlighter so it shares more code
- https://bugs.webkit.org/show_bug.cgi?id=30907
-
- Test: inspector/css-syntax-highlight.html
-
- * inspector/front-end/ElementsTreeOutline.js:
- * inspector/front-end/SourceFrame.js:
- (WebInspector.SourceFrame.prototype.syntaxHighlightCSS):
- (WebInspector.SourceSyntaxHighlighter):
- (WebInspector.SourceSyntaxHighlighter.prototype.process.processChunk):
- (WebInspector.SourceSyntaxHighlighter.prototype.process.moveToNextLine):
- (WebInspector.SourceSyntaxHighlighter.prototype.process):
- (WebInspector.SourceSyntaxHighlighter.prototype.lex):
- (WebInspector.SourceSyntaxHighlighter.prototype.appendNonToken):
- (WebInspector.SourceSyntaxHighlighter.prototype.syntaxHighlightNode):
- (WebInspector.CSSSourceSyntaxHighlighter):
- * inspector/front-end/inspectorSyntaxHighlight.css:
-
-2009-11-02 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Beth Dakin.
-
- Support ARIA "tab" roles
- https://bugs.webkit.org/show_bug.cgi?id=30842
-
- Implement support for ARIA "tab", "tabpanel" and "tablist".
- As a consequence, we also needed to implement aria-selected
- and aria-controls.
-
- Tests: accessibility/aria-controls-with-tabs.html
- accessibility/aria-tab-roles.html
-
- * accessibility/AXObjectCache.cpp:
- * accessibility/AccessibilityObject.h:
- * accessibility/AccessibilityRenderObject.cpp:
- * accessibility/AccessibilityRenderObject.h:
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- * html/HTMLAttributeNames.in:
-
-2009-10-27 Stephen White <senorblanco@chromium.org>
-
- Reviewed by Dmitry Titov.
-
- This is the WebKit-side change needed to fix canvas.getImageData() for
- Chromium. The unpremultiply code in Skia assumes that unpremultiplied
- values should be rounded, while CG does not. In addition, the fixed
- point inversion used by Skia introduces slight inaccuracies that make
- us fail this test. This change brings Chromium in line with
- the CG path.
- https://bugs.webkit.org/show_bug.cgi?id=30825
-
- Covered by LayoutTests/fast/canvas/canvas-getImageData.html
-
- * platform/graphics/skia/ImageBufferSkia.cpp:
- (WebCore::getImageData):
-
-2009-11-01 Kelly Norton <knorton@google.com>
-
- Reviewed by Timothy Hatcher.
-
- Adds window event dispatches to InspectorTimelineAgent.
- https://bugs.webkit.org/show_bug.cgi?id=31002
-
- * English.lproj/localizedStrings.js:
- * dom/Node.cpp: Updated call site to willDispatchEvent and didDispatchEvent.
- (WebCore::Node::dispatchGenericEvent):
- * inspector/InspectorTimelineAgent.cpp:
- (WebCore::InspectorTimelineAgent::willDispatchEvent): Renamed.
- (WebCore::InspectorTimelineAgent::didDispatchEvent): Renamed.
- * inspector/InspectorTimelineAgent.h:
- (WebCore::):
- * inspector/TimelineRecordFactory.cpp:
- (WebCore::TimelineRecordFactory::createEventDispatchRecord): Renamed.
- * inspector/TimelineRecordFactory.h:
- * inspector/front-end/TimelineAgent.js:
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel.prototype._formatRecord):
- (WebInspector.TimelinePanel.prototype._getRecordDetails):
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::dispatchEvent):
-
-2009-11-01 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Convert script tag event into a more generic
- script eval event in timeline.
-
- https://bugs.webkit.org/show_bug.cgi?id=30999
-
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::evaluateInWorld):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::evaluate):
- * html/HTMLTokenizer.cpp:
- (WebCore::HTMLTokenizer::scriptExecution):
- * inspector/InspectorTimelineAgent.cpp:
- (WebCore::InspectorTimelineAgent::willEvaluateScript):
- (WebCore::InspectorTimelineAgent::didEvaluateScript):
- * inspector/InspectorTimelineAgent.h:
- (WebCore::):
- * inspector/TimelineRecordFactory.cpp:
- (WebCore::TimelineRecordFactory::createEvaluateScriptTimelineRecord):
- * inspector/TimelineRecordFactory.h:
- * inspector/front-end/TimelineAgent.js:
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel.prototype._formatRecord):
- (WebInspector.TimelinePanel.prototype._getRecordDetails):
-
-2009-11-01 Brian Weinstein <bweinstein@apple.com>
-
- Rubber-stamped by Mark Rowe.
-
- Fix for loop to use an size_t instead of unsigned and some spacing
- style fixes.
-
- * dom/Node.cpp:
- (WebCore::eventHasListeners):
-
-2009-11-01 Kelly Norton <knorton@google.com>
-
- Reviewed by Timothy Hatcher.
-
- Does not send DOM dispatches to the InspectorTimelineAgent if there
- are no event listeners.
- https://bugs.webkit.org/show_bug.cgi?id=30995
-
- * dom/Node.cpp:
- (WebCore::eventHasListeners):
- (WebCore::Node::dispatchGenericEvent):
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::callReadyStateChangeListener):
-
-2009-11-01 Roland Steiner <rolandsteiner@chromium.org>
-
- No review (build fix).
-
- Add missing files for Ruby implementation to WebCore.vcproj
- (Fix build break after 50397)
- https://bugs.webkit.org/show_bug.cgi?id=31001
-
- No new tests. (No functional change)
-
- * WebCore.vcproj/WebCore.vcproj:
-
-2009-11-02 Roland Steiner <rolandsteiner@chromium.org>
-
- Reviewed by Dave Hyatt.
-
- Bug 28420 - Implement HTML5 <ruby> rendering
- (https://bugs.webkit.org/show_bug.cgi?id=28420)
-
- First rudimentary implementation of HTML5 ruby rendering support.
-
- Following the HTML 5 spec, the box object model for a <ruby> element allows several runs of ruby
- bases with their respective ruby texts looks as follows:
-
- 1 RenderRuby object, corresponding to the whole <ruby> HTML element
- 1+ RenderRubyRun (anonymous)
- 0 or 1 RenderRubyText - shuffled to the front in order to re-use existing block layouting
- 0-n inline object(s)
- 0 or 1 RenderRubyBase - contains the inline objects that make up the ruby base
- 1-n inline object(s)
-
- Note: <rp> elements are defined as having 'display:none' and thus normally are not assigned a renderer.
-
- New layout tests will be committed in a follow-up patch under fast/ruby.
-
- Makefiles, etc.
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.xcodeproj/project.pbxproj:
-
- CSS
- * css/html.css: Added <ruby> and <rt>
-
- Existing render files:
- * rendering/RenderBlock.cpp: make moveChild a member function moveChildTo
- (WebCore::RenderBlock::moveChildTo):
- (WebCore::RenderBlock::makeChildrenNonInline):
- (WebCore::RenderBlock::removeChild):
- * rendering/RenderBlock.h:
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::createObject): instantiate ruby renderers based on element name
- * rendering/RenderObject.h: add query methods for ruby renderers
- (WebCore::RenderObject::isRuby):
- (WebCore::RenderObject::isRubyBase):
- (WebCore::RenderObject::isRubyRun):
- (WebCore::RenderObject::isRubyText):
-
- New ruby renderers:
- * rendering/RenderRuby.cpp: Added.
- (WebCore::lastRubyRun):
- (WebCore::findRubyRunParent):
- (WebCore::RenderRubyAsInline::RenderRubyAsInline):
- (WebCore::RenderRubyAsInline::~RenderRubyAsInline):
- (WebCore::RenderRubyAsInline::isChildAllowed):
- (WebCore::RenderRubyAsInline::addChild):
- (WebCore::RenderRubyAsInline::removeChild):
- (WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
- (WebCore::RenderRubyAsBlock::~RenderRubyAsBlock):
- (WebCore::RenderRubyAsBlock::isChildAllowed):
- (WebCore::RenderRubyAsBlock::addChild):
- (WebCore::RenderRubyAsBlock::removeChild):
- * rendering/RenderRuby.h: Added.
- (WebCore::RenderRubyAsInline::renderName):
- (WebCore::RenderRubyAsInline::isRuby):
- (WebCore::RenderRubyAsBlock::renderName):
- (WebCore::RenderRubyAsBlock::isRuby):
- * rendering/RenderRubyBase.cpp: Added.
- (WebCore::RenderRubyBase::RenderRubyBase):
- (WebCore::RenderRubyBase::~RenderRubyBase):
- (WebCore::RenderRubyBase::isChildAllowed):
- (WebCore::RenderRubyBase::splitToLeft):
- (WebCore::RenderRubyBase::mergeWithRight):
- * rendering/RenderRubyBase.h: Added.
- (WebCore::RenderRubyBase::renderName):
- (WebCore::RenderRubyBase::isRubyBase):
- * rendering/RenderRubyRun.cpp: Added.
- (WebCore::RenderRubyRun::RenderRubyRun):
- (WebCore::RenderRubyRun::~RenderRubyRun):
- (WebCore::RenderRubyRun::hasRubyText):
- (WebCore::RenderRubyRun::hasRubyBase):
- (WebCore::RenderRubyRun::isEmpty):
- (WebCore::RenderRubyRun::rubyText):
- (WebCore::RenderRubyRun::rubyBase):
- (WebCore::RenderRubyRun::rubyBaseSafe):
- (WebCore::RenderRubyRun::firstLineBlock):
- (WebCore::RenderRubyRun::updateFirstLetter):
- (WebCore::RenderRubyRun::isChildAllowed):
- (WebCore::RenderRubyRun::addChild):
- (WebCore::RenderRubyRun::removeChild):
- (WebCore::RenderRubyRun::createRubyBase):
- (WebCore::RenderRubyRun::staticCreateRubyRun):
- * rendering/RenderRubyRun.h: Added.
- (WebCore::RenderRubyRun::renderName):
- (WebCore::RenderRubyRun::isRubyRun):
- * rendering/RenderRubyText.cpp: Added.
- (WebCore::RenderRubyText::RenderRubyText):
- (WebCore::RenderRubyText::~RenderRubyText):
- (WebCore::RenderRubyText::isChildAllowed):
- * rendering/RenderRubyText.h: Added.
- (WebCore::RenderRubyText::renderName):
- (WebCore::RenderRubyText::isRubyText):
-
-2009-11-01 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=30992
- Node.isDefaultNamespace doesn't convert empty strings to null
-
- Test: fast/dom/Node/default-namespace-empty-argument.html
-
- * dom/Node.cpp: (WebCore::Node::isDefaultNamespace): Per DOM 3 Core, treat empty input
- as null.
-
-2009-11-01 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Darin Adler.
-
- Don't add '/' to the URL path if the it does not include '/' after the protocol component
- https://bugs.webkit.org/show_bug.cgi?id=30971
-
- Match IE8 behaviour, that does not add '/' if there is none after the protocol component.
-
- * platform/KURL.cpp:
- (WebCore::KURL::parse):
-
-2009-10-31 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Darin Adler.
-
- Fix layering violations in GraphicsContext3D
- https://bugs.webkit.org/show_bug.cgi?id=30986
-
- Remove uses of HTMLImageElement and HTMLCanvasElement
-
- * html/canvas/CanvasRenderingContext3D.cpp:
- (WebCore::CanvasRenderingContext3D::texImage2D):
- (WebCore::CanvasRenderingContext3D::texSubImage2D):
- * platform/graphics/GraphicsContext3D.h:
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::texImage2D):
- (WebCore::GraphicsContext3D::texSubImage2D):
-
-2009-11-01 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=30964
- [Gtk] Implemment AtkDocument
-
- Provides access to expected document attributes.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (documentAttributeValue):
- (webkit_accessible_document_get_document_attribute_value):
- (webkit_accessible_document_get_document_attributes):
-
-2009-11-03 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=30964
- [Gtk] Implemment AtkDocument
-
- Implements what has been implemented in AT-SPI.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (GetAtkInterfaceTypeFromWAIType):
- (getInterfaceMaskFromObject):
- (atk_document_interface_init):
- (webkit_accessible_document_get_document_attribute_value):
- (webkit_accessible_document_get_document_attributes):
- (webkit_accessible_document_get_locale):
-
-2009-11-01 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Eric Seidel.
-
- Turn on warnings for QtWebKit for gcc
- https://bugs.webkit.org/show_bug.cgi?id=30958
-
- No new tests as there is no functional change.
-
- * platform/image-decoders/qt/RGBA32BufferQt.cpp:
- (WebCore::RGBA32Buffer::RGBA32Buffer): Reorder
- initialization list to fix compiler warnings.
-
-
-2009-11-01 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Pavel Feldman.
-
- [Regression] monitorEvent doesn't work
-
- * inspector/front-end/InjectedScript.js:
- (InjectedScript._ensureCommandLineAPIInstalled):
-
-2009-11-01 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Pavel Feldman.
-
- Fix Web Inspector: Bug with Message Bubble in Syntax Highlighter
- https://bugs.webkit.org/show_bug.cgi?id=30990
-
- * inspector/front-end/SourceFrame.js:
-
-2009-10-31 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by John Sullivan.
-
- https://bugs.webkit.org/show_bug.cgi?id=30982
- createHTMLDocument doesn't escape ampersand and less-than in title
-
- Test: fast/dom/DOMImplementation/createHTMLDocument-title.html
-
- * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createHTMLDocument):
- Set document title after creating the document, avoiding parser intricacies.
-
-2009-11-01 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Double clicking on a breakpoints should not select text
- https://bugs.webkit.org/show_bug.cgi?id=30950
-
- * inspector/front-end/SourceFrame.js:
- (WebInspector.SourceFrame.prototype._documentMouseDown):
-
-2009-11-01 Yuta Kitamura <yutak@chromium.org>
-
- Reviewed by Darin Adler.
-
- Fix assertion falure in RenderObjectChildList::updateBeforeAfterContent().
-
- [Crash (debug)] Combination of list-item and :after causes assertion failure
- https://bugs.webkit.org/show_bug.cgi?id=30944
-
- Test: fast/css/list-item-pseudo-nocrash.html
-
- * rendering/RenderObjectChildList.cpp:
- (WebCore::RenderObjectChildList::updateBeforeAfterContent):
-
-2009-11-01 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=30586
- [GTK] Failing test media/video-src-empty.html
-
- Correctly set network/ready state depending on GStreamer errors
- received on the bus.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::mediaPlayerPrivateMessageCallback):
-
-2009-10-31 Oliver Hunt <oliver@apple.com>
-
- Build fix
-
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::attachShader):
-
-2009-10-31 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Darin Adler.
-
- Remove obsolete null checks from CanvasRenderingContext3DMac
- https://bugs.webkit.org/show_bug.cgi?id=30983
-
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::attachShader):
- (WebCore::GraphicsContext3D::bindAttribLocation):
- (WebCore::GraphicsContext3D::compileShader):
- (WebCore::GraphicsContext3D::detachShader):
- (WebCore::GraphicsContext3D::framebufferRenderbuffer):
- (WebCore::GraphicsContext3D::framebufferTexture2D):
- (WebCore::GraphicsContext3D::linkProgram):
- (WebCore::GraphicsContext3D::shaderSource):
- (WebCore::GraphicsContext3D::useProgram):
- (WebCore::GraphicsContext3D::validateProgram):
- (WebCore::GraphicsContext3D::getProgramInfoLog):
- (WebCore::GraphicsContext3D::getShaderi):
- (WebCore::GraphicsContext3D::getShaderiv):
- (WebCore::GraphicsContext3D::getShaderInfoLog):
- (WebCore::GraphicsContext3D::getShaderSource):
- (WebCore::GraphicsContext3D::getUniformLocation):
-
-2009-10-31 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Jon Honeycutt.
-
- WebGL allows objects to be used with the wrong context
- https://bugs.webkit.org/show_bug.cgi?id=30981
-
- Simply add null checks and a few context guards to ensure we don't
- deref null or attempt to use an object from a different context.
-
- Tests: fast/canvas/webgl/incorrect-context-object-behaviour.html
- fast/canvas/webgl/null-object-behaviour.html
-
- * html/canvas/CanvasRenderingContext3D.cpp:
- (WebCore::CanvasRenderingContext3D::attachShader):
- (WebCore::CanvasRenderingContext3D::bindAttribLocation):
- (WebCore::CanvasRenderingContext3D::bindBuffer):
- (WebCore::CanvasRenderingContext3D::bindFramebuffer):
- (WebCore::CanvasRenderingContext3D::bindRenderbuffer):
- (WebCore::CanvasRenderingContext3D::bindTexture):
- (WebCore::CanvasRenderingContext3D::compileShader):
- (WebCore::CanvasRenderingContext3D::detachShader):
- (WebCore::CanvasRenderingContext3D::framebufferRenderbuffer):
- (WebCore::CanvasRenderingContext3D::framebufferTexture2D):
- (WebCore::CanvasRenderingContext3D::getProgrami):
- (WebCore::CanvasRenderingContext3D::getProgramiv):
- (WebCore::CanvasRenderingContext3D::getProgramInfoLog):
- (WebCore::CanvasRenderingContext3D::getShaderi):
- (WebCore::CanvasRenderingContext3D::getShaderiv):
- (WebCore::CanvasRenderingContext3D::getShaderInfoLog):
- (WebCore::CanvasRenderingContext3D::getShaderSource):
- (WebCore::CanvasRenderingContext3D::getUniformf):
- (WebCore::CanvasRenderingContext3D::getUniformfv):
- (WebCore::CanvasRenderingContext3D::getUniformi):
- (WebCore::CanvasRenderingContext3D::getUniformiv):
- (WebCore::CanvasRenderingContext3D::getUniformLocation):
- (WebCore::CanvasRenderingContext3D::isBuffer):
- (WebCore::CanvasRenderingContext3D::linkProgram):
- (WebCore::CanvasRenderingContext3D::shaderSource):
- * html/canvas/CanvasRenderingContext3D.h:
- * html/canvas/CanvasRenderingContext3D.idl:
-
-2009-10-30 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's MediaQueryResult
- https://bugs.webkit.org/show_bug.cgi?id=30857
-
- Inherits MediaQueryResult class from Noncopyable because it is
- instantiated by 'new' in WebCore/css/CSSStyleSelector.cpp:5984 and
- it is no need to be copyable.
-
- * css/CSSStyleSelector.h:
-
-2009-10-30 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's MediaQueryEvaluator
- https://bugs.webkit.org/show_bug.cgi?id=30854
-
- Inherits MediaQueryEvaluator class from Noncopyable because it is
- instantiated by 'new' in WebCore/css/CSSStyleSelector.cpp:401 and
- it is no need to be copyable.
-
- * css/MediaQueryEvaluator.h:
-
-2009-10-30 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's CSSRuleSet
- https://bugs.webkit.org/show_bug.cgi?id=30852
-
- Inherits CSSRuleSet class from Noncopyable because it is
- instantiated by 'new' in WebCore/css/CSSStyleSelector.cpp:455 and
- it is no need to be copyable.
-
- * css/CSSStyleSelector.cpp:
-
-2009-10-30 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's CSSRuleData
- https://bugs.webkit.org/show_bug.cgi?id=30851
-
- Inherits CSSRuleData class from Noncopyable because it is
- instantiated by 'new' in WebCore/css/CSSStyleSelector.h:320 and
- it is no need to be copyable.
-
- * css/CSSStyleSelector.h:
-
-2009-10-30 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's CSSRuleDataList
- https://bugs.webkit.org/show_bug.cgi?id=30850
-
- Inherits CSSRuleDataList class from Noncopyable because it has been
- instantiated by 'new' in WebCore/css/CSSStyleSelector.cpp:2715 and
- it is no need to be copyable.
-
- * css/CSSStyleSelector.h:
-
-2009-10-30 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's CSSNamespace
- https://bugs.webkit.org/show_bug.cgi?id=30849
-
- Inherits CSSNamespace struct from Noncopyable because it is
- instantiated by 'new' in WebCore/css/CSSStyleSheet.cpp:141 and
- it is no need to be copyable.
-
- * css/CSSNamespace.h:
-
-2009-10-30 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by David Levin.
-
- Refactor DatabaseTask in preparation for removing threadsafe refcounting from it.
- Move the synchronizer object out of the DatabaseTask so there is no need to keep
- the pointer to Databasetask around after passing it to MessageQueue.
- Also pass the references to return parameters to the task so it can update them.
- https://bugs.webkit.org/show_bug.cgi?id=30941
-
- No new tests, since this is just moving the code around, no change in functionality.
-
- * storage/Database.cpp:
- (WebCore::Database::Database):
- (WebCore::Database::openAndVerifyVersion): Use new DatabaseTaskSynchronizer to wait for task completion.
- (WebCore::Database::markAsDeletedAndClose): Ditto.
- (WebCore::Database::tableNames): Ditto.
- (WebCore::Database::stop): Use the boolean flag rather then 'killed' flag built into MessageQueue.
- (WebCore::Database::scheduleTransaction): Transaction queue is a Deque now, change the way to fetch the transaction.
- * storage/Database.h: Change the SQLTransaction queue to be a Deque rather then a MessageQueue.
- * storage/DatabaseTask.cpp:
- (WebCore::DatabaseTaskSynchronizer::DatabaseTaskSynchronizer):
- (WebCore::DatabaseTaskSynchronizer::waitForTaskCompletion):
- (WebCore::DatabaseTaskSynchronizer::taskCompleted):
- (WebCore::DatabaseTask::DatabaseTask): Ctor takes DatabaseTaskSynchronizer which can be 0.
- (WebCore::DatabaseTask::performTask): Signal completion. m_synchronizer should still be around since main thread is waiting on it.
- (WebCore::DatabaseOpenTask::DatabaseOpenTask): Pass synchronizer and return parameters via constructor.
- (WebCore::DatabaseCloseTask::DatabaseCloseTask): Ditto.
- (WebCore::DatabaseTransactionTask::DatabaseTransactionTask): Ditto.
- (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask): Ditto.
- * storage/DatabaseTask.h:
- (WebCore::DatabaseOpenTask::create):
- (WebCore::DatabaseCloseTask::create):
- (WebCore::DatabaseTransactionTask::create):
- (WebCore::DatabaseTableNamesTask::create):
-
-2009-10-30 Enrica Casucci <enrica@apple.com>
-
- Reviewed by Darin Adler.
-
- REGRESSION: In Mail, Undo does not restore some characters I have deleted at the end of a line
- https://bugs.webkit.org/show_bug.cgi?id=30955
- <rdar://problem/7067033>
-
- When the command is deleteWordBackward or deleteWordForward
- we should not add to the open typing command, but
- create a new one.
-
- Test: editing/undo/undo-deleteWord.html
-
- * editing/TypingCommand.cpp:
- (WebCore::TypingCommand::deleteKeyPressed): Always start a new command if the granularity is
- not CharacterGranularity.
- (WebCore::TypingCommand::forwardDeleteKeyPressed): Always start a new command if the granularity is
- not CharacterGranularity.
-
-2009-10-30 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Darin Adler.
-
- Make MediaPlayer constructor private
- https://bugs.webkit.org/show_bug.cgi?id=30965
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::loadResource):
- (WebCore::HTMLMediaElement::finishParsingChildren): Use MediaPlayer::create.
-
- * platform/graphics/MediaPlayer.h:
- (WebCore::MediaPlayer::create): New.
-
-2009-10-29 Jon Honeycutt <jhoneycutt@apple.com>
-
- MSAA: Accessibility of headings is not correct
-
- https://bugs.webkit.org/show_bug.cgi?id=30937
-
- Reviewed by Alice Liu.
-
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::stringRoleForMSAA):
- (WebCore::AccessibilityObject::descriptionForMSAA):
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::shouldReturnTagNameAsRoleForMSAA):
- If the element's tag name is one of h1, h2, h3, h4, h5, h6, return
- true.
- (WebCore::AccessibilityRenderObject::stringRoleForMSAA):
- If the element should return its tag name as the role, return the tag
- name.
- (WebCore::AccessibilityRenderObject::positionalDescriptionForMSAA):
- If the object is a heading, return the string "L" followed by the
- heading level.
- (WebCore::AccessibilityRenderObject::descriptionForMSAA):
- If the object has a positional description, return it. Otherwise, get
- the accessibility description, and prefix it with "Description" so that
- MSAA clients know that it's not a positional description.
-
- * accessibility/AccessibilityRenderObject.h:
-
-2009-10-29 Jon Honeycutt <jhoneycutt@apple.com>
-
- MSAA: Accessibility of links is wrong
-
- https://bugs.webkit.org/show_bug.cgi?id=30928
-
- Reviewed by Darin Adler.
-
- * accessibility/AccessibilityImageMapLink.cpp:
- (WebCore::AccessibilityImageMapLink::stringValueForMSAA):
- Return the URL.
- (WebCore::AccessibilityImageMapLink::nameForMSAA):
- Return the alt text.
-
- * accessibility/AccessibilityImageMapLink.h:
- (WebCore::AccessibilityImageMapLink::isLinked):
- Return true.
-
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::isLinked):
- (WebCore::AccessibilityObject::stringValueForMSAA):
- (WebCore::AccessibilityObject::nameForMSAA):
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::isLinkable):
- Return true if the element is considered "linkable" with respect to
- accessibility.
- (WebCore::AccessibilityRenderObject::stringValueForMSAA):
- If the element is linkable, check whether it has a parent anchor
- element. If so, return the anchor element's href.
- (WebCore::AccessibilityRenderObject::isLinked):
- Return true if the element is linkable and if it's parent anchor tag's
- href is non-empty.
- (WebCore::AccessibilityRenderObject::nameForMSAA):
- For text nodes, return the text.
-
- * accessibility/AccessibilityRenderObject.h:
-
-2009-10-30 Evan Stade <estade@chromium.org>
-
- Reviewed by David Levin.
-
- Notify the chrome when the focused node has changed.
- https://bugs.webkit.org/show_bug.cgi?id=30832
-
- This is similar to AX code that is already in place, except that this also informs the
- chrome when there stops being a focused node. This is needed for a browser to show the
- anchor for links that have keyboard focus.
-
- * dom/Document.cpp:
- (WebCore::Document::setFocusedNode):
- * loader/EmptyClients.h:
- (WebCore::EmptyChromeClient::focusedNodeChanged):
- * page/Chrome.cpp:
- (WebCore::Chrome::focusedNodeChanged):
- * page/Chrome.h:
- * page/ChromeClient.h:
-
-2009-10-30 Ben Murdoch <benm@google.com>
-
- Reviewed by David Kilzer.
-
- openDatabase() with empty version sets db version up incorrectly
- https://bugs.webkit.org/show_bug.cgi?id=28417
-
- Test: storage/open-database-set-empty-version.html
-
- * storage/Database.cpp:
- (WebCore::Database::performOpenAndVerify): Raise an exception if the current database version does not match the expected version when the current version is the empty string.
-
-2009-10-30 John Gregg <johnnyg@google.com>
-
- Reviewed by David Levin.
-
- Need to turn off notifications properly at runtime
- https://bugs.webkit.org/show_bug.cgi?id=30409
-
- Moving the notificationsEnabled bit from NotificationCenter
- to the new V8 RuntimeEnabledFeatures object.
-
- Just moving a bit around, so no new tests.
-
- * bindings/v8/RuntimeEnabledFeatures.cpp:
- * bindings/v8/RuntimeEnabledFeatures.h:
- (WebCore::RuntimeEnabledFeatures::setNotificationsEnabled):
- (WebCore::RuntimeEnabledFeatures::notificationsEnabled):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::ACCESSOR_RUNTIME_ENABLER):
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::ACCESSOR_RUNTIME_ENABLER):
- * notifications/NotificationCenter.cpp:
- * notifications/NotificationCenter.h:
-
-2009-10-30 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] More cleanup after r49949: remove ListenerGuard.
- ListenerGuard is no longer needed since EventListeners do not depend on frame or v8 context.
- https://bugs.webkit.org/show_bug.cgi?id=30943
-
- Covered by fast/events/add-event-without-document.html which will now pass in Chromium.
-
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::V8AbstractEventListener):
- (WebCore::V8AbstractEventListener::handleEvent):
- * bindings/v8/V8AbstractEventListener.h:
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getEventListener):
- * bindings/v8/V8EventListenerList.h:
- (WebCore::V8EventListenerList::findOrCreateWrapper):
- * bindings/v8/V8LazyEventListener.cpp:
- (WebCore::V8LazyEventListener::V8LazyEventListener):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::V8Proxy):
- (WebCore::V8Proxy::disconnectFrame):
- (WebCore::V8Proxy::clearForNavigation):
- * bindings/v8/V8Proxy.h:
- * bindings/v8/V8WorkerContextEventListener.cpp:
- (WebCore::V8WorkerContextEventListener::V8WorkerContextEventListener):
- (WebCore::V8WorkerContextEventListener::handleEvent):
- (WebCore::V8WorkerContextEventListener::reportError):
- * bindings/v8/V8WorkerContextEventListener.h:
- (WebCore::V8WorkerContextEventListener::create):
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy):
- (WebCore::WorkerContextExecutionProxy::dispose):
- (WebCore::WorkerContextExecutionProxy::findOrCreateEventListener):
- * bindings/v8/WorkerContextExecutionProxy.h:
- * bindings/v8/custom/V8CustomEventListener.cpp:
- (WebCore::V8EventListener::V8EventListener):
- * bindings/v8/custom/V8CustomEventListener.h:
- (WebCore::V8EventListener::create):
-
-2009-10-30 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Darin Adler.
-
- counterValueForElementById should return space-separated string for multiple counters
- https://bugs.webkit.org/show_bug.cgi?id=30939
-
- Test: fast/css/counters/counterValueForElementById.html
-
- * rendering/RenderTreeAsText.cpp:
- (WebCore::writeCounterValuesFromChildren):
- (WebCore::counterValueForElement):
-
-2009-10-30 Sebastian Dröge <sebastian.droege@collabora.co.uk>
-
- Reviewed by Gustavo Noronha.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::paint):
- Add some comments to explain what is happening here.
-
-2009-10-30 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Fix Web Inspector crash on the errors/warnings counter click
-
- RenderObject::createVisiblePosition(const Position& position)
- understands "null Positions", so we can construct such a Position manually.
-
- https://bugs.webkit.org/show_bug.cgi?id=30499
-
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::positionForPoint):
-
-2009-10-30 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=25534
- [GTK] Objects of ROLE_TABLE should implement the accessible table interface
-
- Third part of the implementation of AtkTable.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (nameFromChildren):
- (webkit_accessible_get_name):
- New convenience function to construct an object's name using the name(s) of
- any children it has.
-
- (atk_table_interface_init):
- (webkit_accessible_table_get_column_description):
- (webkit_accessible_table_get_row_description):
- Implemented.
-
- (webkit_accessible_table_get_column_header):
- Stub function added so that webkit_accessible_table_get_column_description
- could be implemented in the meantime.
-
-2009-10-30 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=25534
- [GTK] Objects of ROLE_TABLE should implement the accessible table interface
-
- Second part of the implementation of AtkTable.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (cellAtIndex):
- (webkit_accessible_table_get_column_at_index):
- (webkit_accessible_table_get_row_at_index):
- (webkit_accessible_table_get_caption):
- (atk_table_interface_init):
-
-2009-10-30 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Add TimelinePanel into the panels enum.
-
- https://bugs.webkit.org/show_bug.cgi?id=30915
-
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::showPanel):
- * inspector/front-end/inspector.js:
- (WebInspector.showTimelinePanel):
-
-2009-10-30 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Holger Hans Peter Freyther.
-
- If the owner widget of the page has a palette set, we
- should use that one. This was only working when the
- owner was a QWebView. This patch fixes that.
-
- * platform/qt/RenderThemeQt.cpp:
- (WebCore::RenderThemeQt::applyTheme):
-
-2009-10-30 Pavel Feldman <pfeldman@chromium.org>
-
- Not reviewed: Wire CookieJarChromium to the cookies
- backend. This is a final step of a 3-steps raw cookies
- access implementation in Chromium.
-
- * platform/network/chromium/CookieJarChromium.cpp:
- (WebCore::getRawCookies):
- (WebCore::deleteCookie):
-
-2009-10-30 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Fix Chromium crash in console.log in "deeply recursive" function
-
- Check that result of 'frameSourceName' is not null handle
- before casting it to String.
-
- Allow V8Proxy::sourceName/sourceLineNumber() to report
- that they have failed due to JavaScript stack overflow.
-
- https://bugs.webkit.org/show_bug.cgi?id=30904
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/ScriptCallStack.cpp:
- (WebCore::ScriptCallStack::create):
- (WebCore::ScriptCallStack::ScriptCallStack):
- * bindings/v8/ScriptCallStack.h:
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::sourceLineNumber):
- (WebCore::V8Proxy::sourceName):
- * bindings/v8/V8Proxy.h:
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-10-30 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's MediaQuery
- https://bugs.webkit.org/show_bug.cgi?id=30856
-
- Inherits MediaQuery class from Noncopyable because it is
- instantiated by 'new' in WebCore/css/CSSParser.cpp:4905 and
- it is no need to be copyable.
-
- * css/CSSStyleSelector.h:
-
-2009-10-30 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's MediaQueryExp
- https://bugs.webkit.org/show_bug.cgi?id=30855
-
- Inherits MediaQueryExp class from FastAllocBase because it is
- instantiated by 'new' in WebCore/css/CSSParser.cpp:4874.
-
- * css/MediaQueryExp.h:
-
-2009-10-30 Roland Steiner <rolandsteiner@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak.
-
- Bug 28420 - Implement HTML5 <ruby> rendering
- (https://bugs.webkit.org/show_bug.cgi?id=28420)
-
- No new tests (no functional change).
-
- * Configurations/FeatureDefines.xcconfig:
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.pro:
- * WebCore.vcproj/WebCoreCommon.vsprops:
- * WebCore.vcproj/build-generated-files.sh:
-
-2009-10-30 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Adele Peterson.
-
- Removed test for an impossible condition (a glyph in a right-to-left run not having
- the RTL flag 0x800)
-
- * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
- (WebCore::ComplexTextController::ComplexTextRun::overrideLayoutOperation):
-
-2009-10-29 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Out-of-memory crash in isolated worlds
- https://bugs.webkit.org/show_bug.cgi?id=30906
-
- We need to handle the fact that creating a V8:Context might fail. I
- don't know how to test this change because creating a context usually
- only fails when V8 decides it's using too much memory.
-
- * bindings/v8/V8IsolatedWorld.cpp:
- (WebCore::V8IsolatedWorld::V8IsolatedWorld):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::evaluateInIsolatedWorld):
- (WebCore::V8Proxy::evaluateInNewContext):
-
-2009-10-29 Erik Arvidsson <arv@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Make links mouse focusable only on GTK and QT.
-
- Links are now always mouse focusable on GTK and QT. On other platforms
- the link needs a tabIndex or it needs to be contentEditable.
-
- https://bugs.webkit.org/show_bug.cgi?id=26856
-
- * html/HTMLAnchorElement.cpp:
- (WebCore::HTMLAnchorElement::isMouseFocusable):
-
-2009-10-29 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Sam Weinig.
-
- Complete the fix for hit-testing and selection highlighting in ligatures for the ATSUI
- code path.
-
- * platform/graphics/mac/ComplexTextController.h: Added m_ltr member to ComplexTextRun.
- * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
- (WebCore::ComplexTextController::ComplexTextRun::overrideLayoutOperation): Skip over deleted
- glyphs, but update indexes and advances correctly.
- (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Initialize m_ltr.
-
-2009-10-29 Enrica Casucci <enrica@apple.com>
-
- Reviewed by Darin Adler.
-
- REGRESSION(3.2.3 - 4.0.2): Message composing: when I undo a color change to text in Mail, undo/redo behaves strangely
- <rdar://problem/7115041>
- https://bugs.webkit.org/show_bug.cgi?id=30892
-
- This problem shows in any scenario where it is necessary to split a text
- node to apply a style. SplitElementCommand and WrapContentsInDummySpanCommand both
- have member variables initialized in the constructor to keep reference to elements
- they need to operate upon. These reference are not updated when reapplying the command.
- For this reason it is necessary to guarantee that unapply doesn not delete the references
- and that these commands implement doReapply to correctly reuse the existing
- elements.
-
- Test: editing/undo/redo-style.html
-
- * editing/SplitElementCommand.cpp:
- (WebCore::SplitElementCommand::executeApply): Added.
- (WebCore::SplitElementCommand::doApply): Modified to call executeApply.
- (WebCore::SplitElementCommand::doUnapply): Doesn't release m_element1.
- (WebCore::SplitElementCommand::doReapply): Added.
- * editing/SplitElementCommand.h: Added doReapply and executeApply.
- * editing/WrapContentsInDummySpanCommand.cpp:
- (WebCore::WrapContentsInDummySpanCommand::executeApply): Added.
- (WebCore::WrapContentsInDummySpanCommand::doApply): Modified to call executeApply.
- (WebCore::WrapContentsInDummySpanCommand::doUnapply): Doesn't release m_dummySpan.
- (WebCore::WrapContentsInDummySpanCommand::doReapply): Added.
- * editing/WrapContentsInDummySpanCommand.h: Added doReapply and executeApply.
-
-2009-10-29 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- DOM Storage's condition variable needs to handle spurious wakeups
- https://bugs.webkit.org/show_bug.cgi?id=30920
-
- Add a boolean to keep track of whether it's been terminated. Clean
- up the locking code a tiny bit to make it easier to read. There's
- no way to reproduce this reliably in a LayoutTest.
-
- * storage/LocalStorageThread.cpp:
- (WebCore::LocalStorageThread::LocalStorageThread):
- (WebCore::LocalStorageThread::terminate):
- (WebCore::LocalStorageThread::performTerminate):
- * storage/LocalStorageThread.h:
-
-2009-10-29 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- [Chromium] Include ComplextTextController into Chromium Mac project.
-
- * WebCore.gyp/WebCore.gyp: Added include rule for ComplextText* files.
-
-2009-10-29 Timothy Hatcher <timothy@apple.com>
-
- Fix tabbing through element attributes in the Web Insector.
-
- https://bugs.webkit.org/show_bug.cgi?id=30429
-
- Reviewed by Pavel Feldman.
-
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted): Don't call _updateTitle,
- it is called for us when removeAttribute succeeds in the back-end.
- (WebInspector.ElementsTreeElement.prototype._textNodeEditingCommitted): Ditto except for nodeValue.
- (WebInspector.ElementsTreeElement.prototype._editingCancelled): Don't call _updateTitle, editing code reverts.
- (WebInspector.ElementsTreeElement.prototype._updateTitle): Return early if we are editing.
-
-2009-10-29 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Sam Weinig.
-
- Problem editing or selecting text containing ligatures
- https://bugs.webkit.org/show_bug.cgi?id=30025
-
- Test: platform/mac/fast/text/ligature-subdivision.html
-
- * platform/graphics/mac/ComplexTextController.cpp:
- (WebCore::ComplexTextController::ComplexTextController): Initialize
- m_characterInCurrentGlyph.
- (WebCore::ComplexTextController::offsetForPosition): If the hit glyph spans multiple
- characters, compute the hit character based on dividing the glyph’s total advance into
- a number of equal intervals equal to the number of characters and assigning the hit to the
- character corresponding to the hit interval.
- (WebCore::ComplexTextController::advance): If the final offset occurs mid-glyph, advance
- by a fraction of the glyph’s total advance.
- * platform/graphics/mac/ComplexTextController.h: Added m_characterInCurrentGlyph.
-
-2009-10-29 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <http://webkit.org/b/30918>.
- Web Inspector: Datagrid Rows on Windows not properly aligned.
-
- Use line-height for the table rows to make sure the height
- of our text and the height of the table rows are consistent.
-
- * inspector/front-end/inspector.css:
-
-2009-10-29 Adam Barth <abarth@webkit.org>
-
- No review, rolling out r50296.
- http://trac.webkit.org/changeset/50296
-
- * bindings/v8/V8IsolatedWorld.cpp:
- (WebCore::V8IsolatedWorld::V8IsolatedWorld):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::evaluateInIsolatedWorld):
- (WebCore::V8Proxy::evaluateInNewContext):
-
-2009-10-29 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Out-of-memory crash in isolated worlds
- https://bugs.webkit.org/show_bug.cgi?id=30906
-
- We need to handle the fact that creating a V8:Context might fail. I
- don't know how to test this change because creating a context usually
- only fails when V8 decides it's using too much memory.
-
- * bindings/v8/V8IsolatedWorld.cpp:
- (WebCore::V8IsolatedWorld::V8IsolatedWorld):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::evaluateInIsolatedWorld):
- (WebCore::V8Proxy::evaluateInNewContext):
-
-2009-10-29 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Reviewed by Xan Lopez.
-
- Remove build warning introduced by r50284.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::duration):
-
-2009-10-29 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Adam Barth.
-
- [V8] Remove random crashes by removing retrieval of V8 context during garbage collection.
-
- https://bugs.webkit.org/show_bug.cgi?id=30919
-
- Unfortunately, I haven't been able to trigger this crash explicitly, so no test :(.
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::jsWrapperForDOMObject): Added new "assume-it's-there" getter.
- * bindings/v8/V8DOMWrapper.h: Added getter decl.
- * bindings/v8/V8GCController.cpp:
- (WebCore::GCPrologueVisitor::visitDOMWrapper): Changed to use explicit getter.
-
-2009-10-29 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- [Chromium] Adjust the project files to sync up with
- http://trac.webkit.org/changeset/50259
-
- * WebCore.gypi: Renamed and added files.
-
-2009-10-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] Implement DELETE HTTP method for XmlHttpRequest
- https://bugs.webkit.org/show_bug.cgi?id=30894
-
- No new tests as this functionality is already tested by the
- xmlhttprequest LayoutTests. As this patch depends on an unreleased
- version of the dependent QtNetwork library and the tests will be
- enabled later once the dependent library is released (and the
- buildbot is updated).
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
- (WebCore::QNetworkReplyHandler::start):
-
-2009-10-29 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Part of <http://webkit.org/b/30483>.
- Web Inspector: Always show the Local and Session Storage Views.
-
- Even if the length of the DOM Storage entry array is 0, still
- generate the Datagrid because users can add things storage items
- through the UI, so we should allow them to even if there isn't
- anything there currently.
-
- * English.lproj/localizedStrings.js: Removed "This Storage is Empty".
- * inspector/front-end/DOMStorageItemsView.js:
- (WebInspector.DOMStorageItemsView.prototype._showDOMStorageEntries):
-
-2009-10-29 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Add TimelinePanel into the panels enum.
-
- https://bugs.webkit.org/show_bug.cgi?id=30915
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::specialPanelForJSName):
- * inspector/InspectorController.h:
- (WebCore::InspectorController::):
-
-2009-10-29 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Oliver Hunt.
-
- [GTK] Threading problems with some of the tests
- https://bugs.webkit.org/show_bug.cgi?id=30814
-
- Create strings shared among threads with crossThreadString
- constructor method.
-
- * storage/Database.cpp:
- (WebCore::Database::Database):
-
-2009-10-29 Sebastian Dröge <sebastian.droege@collabora.co.uk>
-
- Reviewed by Gustavo Noronha.
-
- https://bugs.webkit.org/show_bug.cgi?id=30308
-
- Add support for ARGB videos.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::paint):
- Create the Cairo image surface for ARGB32 or RGB24
- depending on the buffer's caps.
-
- * platform/graphics/gtk/VideoSinkGStreamer.cpp:
- (webkit_video_sink_timeout_func):
- (webkit_video_sink_render):
- Handle ARGB video and convert GStreamer's ARGB to
- Cairo's for displaying.
-
-2009-10-29 Anton Muhin <antonm@chromium.org>
-
- Reviewed by David Levin.
-
- [chromium] expose a method to access memory usage information in ChromiumBridge
- Declare a static method to be implemented by http://codereview.chromium.org/332010/
- https://bugs.webkit.org/show_bug.cgi?id=30829
-
- * platform/chromium/ChromiumBridge.h:
-
-2009-10-29 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=25679
- [Gtk] Improve accessibility of focusable lists
-
- Implements the AtkSelection interface and enables the corresponding
- (and expected) object:selection-changed event.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (optionFromList):
- (optionFromSelection):
- (atk_selection_interface_init):
- (webkit_accessible_selection_add_selection):
- (webkit_accessible_selection_clear_selection):
- (webkit_accessible_selection_ref_selection):
- (webkit_accessible_selection_get_selection_count):
- (webkit_accessible_selection_is_child_selected):
- (webkit_accessible_selection_remove_selection):
- (webkit_accessible_selection_select_all_selection):
- (GetAtkInterfaceTypeFromWAIType):
- * accessibility/gtk/AXObjectCacheAtk.cpp:
- (AXObjectCache::postPlatformNotification):
-
-2009-10-29 Jian Li <jianli@chromium.org>
-
- Reviewed by Darin Adler.
-
- Bug 30655 - Only plain text should be copied to clipboard for TextArea.
- https://bugs.webkit.org/show_bug.cgi?id=30655
-
- * editing/Editor.cpp:
- (WebCore::nodeIsInTextFormControl):
- (WebCore::Editor::cut):
- (WebCore::Editor::copy):
-
-2009-10-29 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: hide timeline for now - not yet ready.
-
- https://bugs.webkit.org/show_bug.cgi?id=30912
-
- * inspector/front-end/inspector.js:
- (WebInspector._createPanels):
-
-2009-10-29 Pavel Feldman <pfeldman@chromium.org>
-
- Not reviewed: deploy Web Inspector's images in WebCore.gypi.
-
- * WebCore.gypi:
-
-2009-10-29 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: get rid of timelineProfilerEnabled method.
-
- https://bugs.webkit.org/show_bug.cgi?id=30911
-
- * inspector/InspectorBackend.cpp:
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::setWindowVisible):
- * inspector/InspectorController.h:
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
-
-2009-10-29 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Create stub methods for raw cookies access in ChromiumBridge.h
-
- https://bugs.webkit.org/show_bug.cgi?id=30910
-
- * platform/chromium/ChromiumBridge.h:
-
-2009-10-29 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's RareData
- https://bugs.webkit.org/show_bug.cgi?id=30858
-
- Inherits RareData struct from Noncopyable because it is
- instantiated by 'new' in WebCore/css/CSSSelector.h:259 and
- it is no need to be copyable.
-
- * css/CSSSelector.h:
-
-2009-10-29 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's ShorthandScope
- https://bugs.webkit.org/show_bug.cgi?id=30859
-
- Inherits ShorthandScope class from FastAllocBase because it is
- instantiated by 'new' in WebCore/css/CSSParser.cpp:902 and
- it is no need to be copyable.
-
- * css/CSSParser.h:
-
-2009-10-29 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's AXObjectCache
- https://bugs.webkit.org/show_bug.cgi?id=30848
-
- Inherits AXObjectCache class from FastAllocBase because it is
- instantiated by 'new' in WebCore/dom/Document.cpp:1537 and
- it is no need to be copyable.
-
- * accessibility/AXObjectCache.h:
-
-2009-10-28 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Don't run JavaScript URLs in view source mode
- https://bugs.webkit.org/show_bug.cgi?id=30881
-
- Just say no.
-
- Test: http/tests/security/view-source-no-javascript-url.html
-
- * bindings/ScriptControllerBase.cpp:
- (WebCore::ScriptController::executeIfJavaScriptURL):
-
-2009-10-29 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Unreviewed. Fixes style problems pointed out by Evan Martin.
-
- * platform/gtk/Language.cpp:
- (WebCore::defaultLanguage):
-
-2009-10-29 Dan Bernstein <mitz@apple.com>
-
- Rubber-stamped by Mark Rowe.
-
- 64-bit Leopard build fix after r50259
-
- * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
- Declared ATSUTextInserted in 64-bit.
- (WebCore::fontHasMirroringInfo): Use %d format and cast to int.
- (WebCore::disableLigatures): Ditto.
- (WebCore::initializeATSUStyle): Ditto.
- (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Ditto.
-
-2009-10-29 Dan Bernstein <mitz@apple.com>
-
- Tiger build fix after r50259
-
- * platform/graphics/mac/ComplexTextController.h:
- * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
-
-2009-10-29 Dan Bernstein <mitz@apple.com>
-
- Attempted Tiger build fix after r50259
-
- * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
-
-2009-10-28 Steve Falkenburg <sfalken@apple.com>
-
- Rubber stamped by Mark Rowe.
-
- https://bugs.webkit.org/show_bug.cgi?id=30899
- WebKit fails to build release on 32-bit Windows systems
-
- * WebCore.vcproj/WebCore.vcproj: Excluded files from project.
- * bindings/js/JSBindingsAllInOne.cpp: Added.
-
-2009-10-28 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Jon Honeycutt.
-
- Fixed typos in color names.
-
- * inspector/front-end/Color.js:
-
-2009-10-28 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Sam Weinig.
-
- Share code between the ATSUI- and Core Text-based Font implementations by doing the
- following:
- - Generalize CoreTextController as ComplexTextController, keeping the Core Text-specific
- parts in ComplexTextControllerCoreText.cpp.
- - Generalize FontMacCoreText as FontComplexTextMac using ComplexTextController
- - Implement ATSUI-specific parts of ComplexTextController in ComplexTextControllerATSUI.
- - Remove FontMacATSUI.
-
- * WebCore.xcodeproj/project.pbxproj: Removed CoreTextController.{cpp,h}, FontMacATSUI.mm,
- and FontMacCoreText.cpp, and added ComplexTextController.{cpp,h},
- ComplexTextControllerATSUI.cpp, ComplexTextControllerCoreText.cpp, and
- FontComplexTextMac.cpp.
-
- * platform/graphics/mac/ComplexTextController.cpp: Copied from CoreTextController.cpp and
- kept the non-Core Text-specific bits.
- (WebCore::ComplexTextController::ComplexTextController): Updated for renames, including
- its own.
- (WebCore::ComplexTextController::offsetForPosition): Updated for renames and for
- m_complexTextRuns holding references instead of objects.
- (WebCore::ComplexTextController::collectComplexTextRuns): Updated for renames, including
- its own.
- (WebCore::ComplexTextController::advance): Updated for renames.
- (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Updated for renames and for
- m_complexTextRuns holding references instead of objects, and changed to use the glyphs()
- and advances() accessors.
-
- * platform/graphics/mac/ComplexTextController.h: Copied from CoreTextController.h and
- renamed CoreTextController to ComplexTextController and CoreTextRun to ComplexTextRun. Made
- the latter RefCounted, added ATSUI-specific members to it, and made some other members
- Core Text-specific. Renamed m_coreTextRuns to m_complexTextRuns and made it hold references
- rather than objects.
- (WebCore::ComplexTextController::ComplexTextRun::create):
- (WebCore::ComplexTextController::ComplexTextRun::glyphs):
- (WebCore::ComplexTextController::ComplexTextRun::advances):
-
- * platform/graphics/mac/ComplexTextControllerATSUI.cpp: Added. Includes ATSUI-specific
- parts of the ComplexTextController implementation.
- (WebCore::ComplexTextController::ComplexTextRun::overrideLayoutOperation): This ATSUI
- callback populates the ComplexTextRun’s glyphs, advances and indices vectors. It is invoked
- when the ComplexTextRun constructor calls ATSUGetGlyphBounds().
- (WebCore::isArabicLamWithAlefLigature): Helper function, copied from FontMacATSUI.mm.
- (WebCore::shapeArabic): Helper function, adapted from FontMacATSUI.mm.
- (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Sets up the
- ATSUTextLayout, substituting the text buffer if necessary for things like shaping Arabic,
- mirroring glyphs or directionality overrides, then calls ATSUGetGlyphBounds() in order to
- get the glyphs, advances and indices vectors populated.
- (WebCore::fontHasMirroringInfo): Helper function, copied from FontMacATSUI.mm.
- (WebCore::disableLigatures): Ditto.
- (WebCore::initializeATSUStyle): Ditto, somewhat cleaned up and simplified.
- (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Constructs
- ComplexTextRuns, either missing-glyphs ones or ATSUTextLayout-based ones.
-
- * platform/graphics/mac/ComplexTextControllerCoreText.cpp: Copied from
- CoreTextController.cpp and kept the Core Text-specific bits.
- (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Updated for renames,
- including its own, and moved the code to initialize m_glyphs and m_advances here. Previously
- this was done in adjustGlyphsAndAdvances().
- (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Updated for renames,
- including its own.
- * platform/graphics/mac/CoreTextController.cpp: Removed.
- * platform/graphics/mac/CoreTextController.h: Removed.
- * platform/graphics/mac/FontComplexTextMac.cpp: Renamed FontMacCoreText.cpp to this.
- (WebCore::Font::selectionRectForComplexText): Changed to use ComplexTextController instead
- of CoreTextController.
- (WebCore::Font::drawComplexText): Ditto.
- (WebCore::Font::floatWidthForComplexText): Ditto.
- (WebCore::Font::offsetForPositionForComplexText): Ditto.
- * platform/graphics/mac/FontMacATSUI.mm: Removed.
- * platform/graphics/mac/FontMacCoreText.cpp: Removed.
-
-2009-10-27 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- WAI-ARIA: add support for 'option' role
- https://bugs.webkit.org/show_bug.cgi?id=30843
-
- Test: accessibility/aria-option-role.html
-
- * accessibility/AccessibilityListBoxOption.h:
- (WebCore::AccessibilityListBoxOption::canHaveChildren):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::RoleEntry::):
- (WebCore::AccessibilityRenderObject::canHaveChildren):
-
-2009-10-28 Jens Alfke <snej@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Fix GCC compiler warnings in WebCore, and enable -Wall and -Werror for Chromium build.
- https://bugs.webkit.org/show_bug.cgi?id=30716
-
- * WebCore.gyp/WebCore.gyp: Enable "chromium_code" flag, just on Mac build for now.
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::createARIARoleMap): Fix struct visibiity warning.
- * bindings/v8/ScriptCallStack.h: Fix out-of-order member initialization warning.
- * bindings/v8/V8Collection.h:
- (WebCore::getV8Object): Function in header should not be 'static' (fixes unused-static warning.)
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::convertNewNodeToV8Object): Fix signed/unsigned comparison warning.
- * bindings/v8/V8GCController.cpp:
- (WebCore::ObjectGrouperVisitor::applyGrouping): Fix unused-variable warning.
- * css/CSSPrimitiveValueMappings.h:
- (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Enable ListButtonPart case to avoid
- warning about missing cases in 'switch' statement.
- * editing/EditorCommand.cpp:
- (WebCore::createCommandMap): Fix struct visibiity warning.
- * platform/graphics/skia/PlatformContextSkia.cpp:
- (PlatformContextSkia::State::State): Fix out-of-order member initialization warning.
- * rendering/RenderMediaControlsChromium.cpp:
- (WebCore::RenderMediaControlsChromium::shouldRenderMediaControlPart): Add empty 'default' case in
- 'switch' statement to avoid missing-case warning.
- (WebCore::RenderMediaControlsChromium::paintMediaControlsPart): Ditto.
- * xml/XPathFunctions.cpp:
- (WebCore::XPath::createFunctionMap): Fix struct visibiity warning.
-
-2009-10-29 Adam Barth <abarth@webkit.org>
-
- Reviewed by Darin Adler.
-
- REGRESSION: crashes in WebCore::RedirectScheduler::timerFired(WebCore::Timer<WebCore::RedirectScheduler>*)
- https://bugs.webkit.org/show_bug.cgi?id=30839
-
- Added null check for the case when the frame is detached from the page.
-
- * loader/RedirectScheduler.cpp:
- (WebCore::RedirectScheduler::timerFired):
-
-2009-10-28 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=30817
- Use parentObjectUnignored instead of parentObject in webkit_accessible_get_parent
-
- Also removes the hack I had originally added to solve bug 25411, because
- the fix here is what I should have done in the first place.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (webkit_accessible_get_parent):
-
-2009-10-28 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by David Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=30805
- Add MessageQueue::removeIf(Predicate&) to remove certain tasks without pulling them from the queue.
- Existing Database tests cover this, no change in functionality.
-
- * storage/DatabaseThread.cpp:
- (WebCore::SameDatabasePredicate::SameDatabasePredicate): Added predicate that flags the tasks belonging to a specified database.
- (WebCore::SameDatabasePredicate::operator()):
- (WebCore::DatabaseThread::unscheduleDatabaseTasks): changed to use the new removeIf method.
-
-2009-10-28 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Glue subsequent timeline records with same category
- and title together.
-
- https://bugs.webkit.org/show_bug.cgi?id=30885
-
- * English.lproj/localizedStrings.js:
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel.prototype.addRecordToTimeline):
- (WebInspector.TimelinePanel.prototype._formatRecord):
- (WebInspector.TimelineRecordTreeElement.prototype.onattach):
- (WebInspector.TimelineRecordTreeElement.prototype.refresh):
-
-2009-10-28 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Reviewed by Xan Lopez.
-
- [GTK] Fails new test fast/js/navigator-language.html
- https://bugs.webkit.org/show_bug.cgi?id=30440
-
- Reimplement WebCore::defaultLanguage to account for changes in
- locale done by setLocale.
-
- Already existing test: fast/js/navigator-language.html
-
- * platform/gtk/Language.cpp:
- (WebCore::defaultLanguage):
-
-2009-10-28 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/7303145>
- Can't exit full screen mode or restart movie after pressing command -R.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::removedFromDocument):
- (WebCore::HTMLMediaElement::documentWillBecomeInactive):
- Exit from fullscreen if necessary.
- * html/HTMLMediaElement.h:
-
-2009-10-28 Alexey Proskuryakov <ap@apple.com>
-
- Unreviewed - a trivial fix to get Windows bots running.
-
- https://bugs.webkit.org/show_bug.cgi?id=30841
- <rdar://problem/7342730> WebKit should not pass Referer header through a redirect to a non-secure site
-
- * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::setHeaderFields): Don't try to
- access empty vector's data.
-
-2009-10-28 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=25897
- [Gtk] Extraneous object of ROLE_PANEL in hierarchy for entries
-
- Remove the extraneous object of ROLE_PANEL.
-
- * accessibility/gtk/AccessibilityObjectAtk.cpp:
- (AccessibilityObject::accessibilityPlatformIncludesObject):
-
-2009-10-28 Jonathan Dixon <joth@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Bug 30547: (Chromium) searchbox not rendered properly due to the css property -webkit-border-radius
- https://bugs.webkit.org/show_bug.cgi?id=30547
-
- Test: fast/css/text-input-with-webkit-border-radius.html
-
- * rendering/RenderThemeChromiumWin.cpp:
- (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
- Implemented rounded border rendering in Chromium Windows theme renderer.
-
-2009-10-28 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Pull items collections from resources panel and
- timeline panel into AbstractTimelinePanel.
-
- https://bugs.webkit.org/show_bug.cgi?id=30875
-
- * inspector/front-end/AbstractTimelinePanel.js:
- (WebInspector.AbstractTimelinePanel):
- (WebInspector.AbstractTimelinePanel.prototype.populateSidebar):
- (WebInspector.AbstractTimelinePanel.prototype.createItemTreeElement):
- (WebInspector.AbstractTimelinePanel.prototype.createItemGraph):
- (WebInspector.AbstractTimelinePanel.prototype._showCategory):
- (WebInspector.AbstractTimelinePanel.prototype._hideCategory):
- (WebInspector.AbstractTimelinePanel.prototype.filter):
- (WebInspector.AbstractTimelinePanel.prototype._createGraph):
- (WebInspector.AbstractTimelinePanel.prototype.updateMainViewWidth):
- (WebInspector.AbstractTimelinePanel.prototype.refresh):
- (WebInspector.AbstractTimelinePanel.prototype.reset):
- (WebInspector.AbstractTimelinePanel.prototype.get calculator):
- (WebInspector.AbstractTimelinePanel.prototype.set calculator):
- (WebInspector.AbstractTimelinePanel.prototype.addItem):
- (WebInspector.AbstractTimelinePanel.prototype.removeItem):
- (WebInspector.AbstractTimelinePanel.prototype.refreshItem):
- (WebInspector.AbstractTimelinePanel.prototype.revealAndSelectItem):
- (WebInspector.AbstractTimelinePanel.prototype.sortItems):
- (WebInspector.AbstractTimelinePanel.prototype.adjustScrollPosition):
- (WebInspector.AbstractTimelineCategory):
- (WebInspector.AbstractTimelineCategory.prototype.toString):
- * inspector/front-end/ResourceCategory.js:
- (WebInspector.ResourceCategory):
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel):
- (WebInspector.ResourcesPanel.prototype.createItemTreeElement):
- (WebInspector.ResourcesPanel.prototype.createItemGraph):
- (WebInspector.ResourcesPanel.prototype.isCategoryVisible):
- (WebInspector.ResourcesPanel.prototype.populateSidebar):
- (WebInspector.ResourcesPanel.prototype.get searchableViews):
- (WebInspector.ResourcesPanel.prototype.get searchResultsSortFunction.sortFuction):
- (WebInspector.ResourcesPanel.prototype.get searchResultsSortFunction):
- (WebInspector.ResourcesPanel.prototype.searchMatchFound):
- (WebInspector.ResourcesPanel.prototype.searchCanceled):
- (WebInspector.ResourcesPanel.prototype.performSearch):
- (WebInspector.ResourcesPanel.prototype.refresh):
- (WebInspector.ResourcesPanel.prototype.reset):
- (WebInspector.ResourcesPanel.prototype.removeResource):
- (WebInspector.ResourcesPanel.prototype.addMessageToResource):
- (WebInspector.ResourcesPanel.prototype.clearMessages):
- (WebInspector.ResourcesPanel.prototype.refreshResource):
- (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded):
- (WebInspector.ResourcesPanel.prototype.showResource):
- (WebInspector.ResourcesPanel.prototype._sortResourcesIfNeeded):
- (WebInspector.ResourcesPanel.prototype._toggleLargerResources):
- (WebInspector.ResourcesPanel.prototype._toggleResourceTracking):
- (WebInspector.ResourcesPanel.prototype.get _resources):
- (WebInspector.ResourceTimeCalculator.prototype._upperBound):
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel):
- (WebInspector.TimelinePanel.prototype.get categories):
- (WebInspector.TimelinePanel.prototype.populateSidebar):
- (WebInspector.TimelinePanel.prototype.addRecordToTimeline):
- (WebInspector.TimelinePanel.prototype.createItemTreeElement):
- (WebInspector.TimelinePanel.prototype.createItemGraph):
- (WebInspector.TimelinePanel.prototype._formatRecord):
- (WebInspector.TimelineCategory):
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.html:
-
-2009-10-28 Kelly Norton <knorton@google.com>
-
- Reviewed by Pavel Feldman.
-
- Resets InspectorFrontend in InspectorTimelineAgent instead of removing it so
- that it remains active on refreshs and page transitions.
- https://bugs.webkit.org/show_bug.cgi?id=30874
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::setFrontendProxyObject):
- * inspector/InspectorTimelineAgent.cpp:
- (WebCore::InspectorTimelineAgent::resetFrontendProxyObject):
- * inspector/InspectorTimelineAgent.h:
-
-2009-10-27 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Darin Adler.
-
- Provide a way to get counter values with layoutTestContoller
- https://bugs.webkit.org/show_bug.cgi?id=30555
-
- Expose WebCore::counterValueForElement as a WebCore API.
-
- * WebCore.base.exp:
- * rendering/RenderTreeAsText.cpp:
- (WebCore::writeCounterValuesFromChildren):
- (WebCore::counterValueForElement):
- * rendering/RenderTreeAsText.h:
-
-2009-10-28 Nate Chapin <japhet@chromium.org>
-
- Unreviewed, Chromium build fix for r50225.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::defaultObjectContentType):
-
-2009-10-28 Eric Z. Ayers <zundel@google.com>
-
- Reviewed by Pavel Feldman.
-
- Adds InspectorTimelineAgent instrumentation for encountering a
- <SCRIPT> tag when parsing an HTML document.
-
- https://bugs.webkit.org/show_bug.cgi?id=30861
-
- * bindings/js/ScriptSourceCode.h:
- (WebCore::ScriptSourceCode::ScriptSourceCode):
- (WebCore::ScriptSourceCode::startLine):
- (WebCore::ScriptSourceCode::url):
- * html/HTMLTokenizer.cpp:
- (WebCore::HTMLTokenizer::scriptHandler):
- (WebCore::HTMLTokenizer::scriptExecution):
- * inspector/InspectorTimelineAgent.cpp:
- (WebCore::InspectorTimelineAgent::willLoadXHR):
- (WebCore::InspectorTimelineAgent::willScriptTag):
- (WebCore::InspectorTimelineAgent::didScriptTag):
- * inspector/InspectorTimelineAgent.h:
- (WebCore::):
- * inspector/TimelineRecordFactory.cpp:
- (WebCore::TimelineRecordFactory::createScriptTagTimelineRecord):
- * inspector/TimelineRecordFactory.h:
- * inspector/front-end/TimelineAgent.js:
-
-2009-10-28 Steve Block <steveblock@google.com>
-
- Reviewed by Darin Adler.
-
- Makes sure that Geolocation watch IDs remain positive on overflow.
- https://bugs.webkit.org/show_bug.cgi?id=30122
-
- No new tests possible.
-
- * page/Geolocation.cpp: Modified.
- (WebCore::Geolocation::watchPosition): Modified. Reset the watch ID to 1 on overflow.
-
-2009-10-28 George Staikos <george.staikos@torchmobile.com>
-
- Attempt to fix the Mac debug build after 50225.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::defaultObjectContentType):
-
-2009-10-28 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=30841
- <rdar://problem/7342730> WebKit should not pass Referer header through a redirect to a non-secure site
-
- Tests: http/tests/ssl/referer-301.html
- http/tests/ssl/referer-303.html
-
- * platform/network/mac/ResourceHandleMac.mm:
- (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
- Remove Referer header if redirecting from https to another protocol.
-
- * platform/network/ResourceRequestBase.cpp:
- (WebCore::ResourceRequestBase::clearHTTPReferrer): Update request counterparts, as it is
- always done when changing or adding header fields.
- (WebCore::ResourceRequestBase::clearHTTPOrigin): Ditto.
-
- * platform/network/ResourceRequestBase.h: clearHTTPReferrer() and clearHTTPOrigin() are
- no longer inline, since they have non-trivial implementations.
-
- * platform/network/mac/ResourceRequestMac.mm:
- (WebCore::ResourceRequest::doUpdatePlatformRequest): Fixed to synchronize header field removals.
- (WebCore::ResourceRequest::doUpdateResourceRequest): Ditto.
-
- * platform/network/cf/ResourceHandleCFNet.cpp:
- (WebCore::willSendRequest):
- * platform/network/cf/ResourceRequestCFNet.cpp:
- (WebCore::setHeaderFields):
- (WebCore::ResourceRequest::doUpdatePlatformRequest):
- (WebCore::ResourceRequest::doUpdateResourceRequest):
- Match Mac changes.
-
-2009-10-28 Joe Mason <jmason@rim.com>
-
- Reviewed by Adam Treat.
-
- Add FrameLoader::defaultObjectContentType, containing common code for
- implementing FrameLoaderClient::objectContentType. (Currently the gtk
- and win ports have copied this code, and the qt port uses similar code
- with a few extra clauses. Moving this to a utility function cuts down
- on copied code.) This causes no behavioural change.
-
- https://bugs.webkit.org/show_bug.cgi?id=30868
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::defaultObjectContentType):
- * loader/FrameLoader.h:
-
-2009-10-28 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] QWebHistory::saveState() is inconsistent with the Qt API
- https://bugs.webkit.org/show_bug.cgi?id=30710
-
- Enforce the versioning, by ignoring any version different
- from 1.
-
- * history/qt/HistoryItemQt.cpp:
- (WebCore::HistoryItem::restoreState):
- (WebCore::HistoryItem::saveState):
-
-2009-10-28 Pavel Feldman <pfeldman@chromium.org>
-
- Not reviewed: follow up fix to InspectorControllerStub.
- Define it after inspector.js due to namespace
-
- https://bugs.webkit.org/show_bug.cgi?id=30866
-
- * inspector/front-end/inspector.html:
-
-2009-10-28 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Add InspectorController stub in order to
- support opening in standalone mode.
-
- https://bugs.webkit.org/show_bug.cgi?id=30866
-
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * inspector/front-end/InspectorControllerStub.js: Added.
- (.WebInspector.InspectorControllerStub):
- (.WebInspector.InspectorControllerStub.prototype.wrapCallback):
- (.WebInspector.InspectorControllerStub.prototype.isWindowVisible):
- (.WebInspector.InspectorControllerStub.prototype.platform):
- (.WebInspector.InspectorControllerStub.prototype.closeWindow):
- (.WebInspector.InspectorControllerStub.prototype.attach):
- (.WebInspector.InspectorControllerStub.prototype.detach):
- (.WebInspector.InspectorControllerStub.prototype.storeLastActivePanel):
- (.WebInspector.InspectorControllerStub.prototype.clearMessages):
- (.WebInspector.InspectorControllerStub.prototype.searchingForNode):
- (.WebInspector.InspectorControllerStub.prototype.search):
- (.WebInspector.InspectorControllerStub.prototype.toggleNodeSearch):
- (.WebInspector.InspectorControllerStub.prototype.setAttachedWindowHeight):
- (.WebInspector.InspectorControllerStub.prototype.moveByUnrestricted):
- (.WebInspector.InspectorControllerStub.prototype.addResourceSourceToFrame):
- (.WebInspector.InspectorControllerStub.prototype.addSourceToFrame):
- (.WebInspector.InspectorControllerStub.prototype.getResourceDocumentNode):
- (.WebInspector.InspectorControllerStub.prototype.highlightDOMNode):
- (.WebInspector.InspectorControllerStub.prototype.hideDOMNodeHighlight):
- (.WebInspector.InspectorControllerStub.prototype.inspectedWindow):
- (.WebInspector.InspectorControllerStub.prototype.loaded):
- (.WebInspector.InspectorControllerStub.prototype.localizedStringsURL):
- (.WebInspector.InspectorControllerStub.prototype.windowUnloading):
- (.WebInspector.InspectorControllerStub.prototype.hiddenPanels):
- (.WebInspector.InspectorControllerStub.prototype.debuggerEnabled):
- (.WebInspector.InspectorControllerStub.prototype.enableResourceTracking):
- (.WebInspector.InspectorControllerStub.prototype.disableResourceTracking):
- (.WebInspector.InspectorControllerStub.prototype.resourceTrackingEnabled):
- (.WebInspector.InspectorControllerStub.prototype.enableDebugger):
- (.WebInspector.InspectorControllerStub.prototype.disableDebugger):
- (.WebInspector.InspectorControllerStub.prototype.addBreakpoint):
- (.WebInspector.InspectorControllerStub.prototype.removeBreakpoint):
- (.WebInspector.InspectorControllerStub.prototype.updateBreakpoint):
- (.WebInspector.InspectorControllerStub.prototype.pauseInDebugger):
- (.WebInspector.InspectorControllerStub.prototype.pauseOnExceptions):
- (.WebInspector.InspectorControllerStub.prototype.setPauseOnExceptions):
- (.WebInspector.InspectorControllerStub.prototype.resumeDebugger):
- (.WebInspector.InspectorControllerStub.prototype.profilerEnabled):
- (.WebInspector.InspectorControllerStub.prototype.enableProfiler):
- (.WebInspector.InspectorControllerStub.prototype.disableProfiler):
- (.WebInspector.InspectorControllerStub.prototype.startProfiling):
- (.WebInspector.InspectorControllerStub.prototype.stopProfiling):
- (.WebInspector.InspectorControllerStub.prototype.getProfileHeaders):
- (.WebInspector.InspectorControllerStub.prototype.getProfile):
- (.WebInspector.InspectorControllerStub.prototype.takeHeapSnapshot):
- (.WebInspector.InspectorControllerStub.prototype.databaseTableNames):
- (.WebInspector.InspectorControllerStub.prototype.stepIntoStatementInDebugger):
- (.WebInspector.InspectorControllerStub.prototype.stepOutOfFunctionInDebugger):
- (.WebInspector.InspectorControllerStub.prototype.stepOverStatementInDebugger):
- (.WebInspector.InspectorControllerStub.prototype.setSetting):
- (.WebInspector.InspectorControllerStub.prototype.dispatchOnInjectedScript):
- (.WebInspector.InspectorControllerStub.prototype.releaseWrapperObjectGroup):
- (.WebInspector.InspectorControllerStub.prototype.setting):
- * inspector/front-end/inspector.html:
- * inspector/front-end/inspector.js:
- (WebInspector.UIString):
-
-2009-10-28 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=25897
- [Gtk] Extraneous object of ROLE_PANEL in hierarchy for entries
-
- Expands upon the new funtionality which allows platforms to indicate
- that a particular object should not be ignored, so that they can
- specify that an object should be ignored or that it should be left up
- to the default handling to decide.
-
- * accessibility/AccessibilityObject.h:
- * accessibility/chromium/AccessibilityObjectChromium.cpp:
- * accessibility/gtk/AccessibilityObjectAtk.cpp:
- * accessibility/mac/AccessibilityObjectMac.mm:
- * accessibility/qt/AccessibilityObjectQt.cpp:
- * accessibility/win/AccessibilityObjectWin.cpp:
- * accessibility/wx/AccessibilityObjectWx.cpp:
- (AccessibilityObject::accessibilityPlatformIncludesObject):
- * accessibility/AccessibilityRenderObject.cpp:
- (AccessibilityRenderObject::accessibilityIsIgnored):
-
-
-2009-10-28 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=25534
- [GTK] Objects of ROLE_TABLE should implement the accessible table interface
-
- Expose the table summary as the accessible description because there is no summary object.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (webkit_accessible_get_description):
-
-2009-10-28 Steve Block <steveblock@google.com>
-
- Reviewed by Eric Seidel.
-
- Adds ScriptController::intializeThreading(), with both JSC and V8 implementations.
- https://bugs.webkit.org/show_bug.cgi?id=30678
-
- This new method is used from common code, rather than calling JSC::initializeThreading() (or the V8 equivalent) directly.
-
- Build fix, no new tests required.
-
- * bindings/js/ScriptController.cpp: Modified.
- (WebCore::ScriptController::initializeThreading): Added.
- * bindings/js/ScriptController.h: Modified. Adds ScriptController::initializeThreading().
- * bindings/v8/ScriptController.cpp: Modified.
- (WebCore::ScriptController::initializeThreading): Added.
- * bindings/v8/ScriptController.h: Modified. Adds ScriptController::initializeThreading().
- * loader/icon/IconDatabase.cpp: Modified.
- (WebCore::iconDatabase): Call ScriptController::initializeThreading(), rather than JSC::initializeThreading().
- * storage/Database.cpp: Modified.
- (WebCore::Database::Database): Call ScriptController::initializeThreading(), rather than JSC::initializeThreading().
-
-2009-10-26 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by Darin Adler.
-
- Document a feature of the m_liveDecodedResources list.
- https://bugs.webkit.org/show_bug.cgi?id=30209
-
- The code made the assumption that the list is sorted by
- the m_lastDecodedAccessTime property of the CachedResource.
- The above is not true when CachedResource::setDecodedSize
- is called and the item is inserted the first time. In this
- case the m_lastDecodedAccessTime is still zero and the
- m_liveDecodedResources list becomes unsorted.
-
- It is impossible that Cache::pruneLiveResources will
- stop to process the list too early due this feature and
- the alternatives of updating m_lastDecodedAccessTime in
- CachedResource::setDecodedSize or changing the insert
- to search the right position have a negative impact on
- performance. The best solution for now is to document
- this feature.
-
- * loader/Cache.cpp:
- (WebCore::Cache::pruneLiveResources):
- * loader/CachedResource.cpp:
- (WebCore::CachedResource::setDecodedSize):
-
-2009-10-28 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- [Gtk] Extraneous object of ROLE_PANEL in hierarchy for entries
- https://bugs.webkit.org/show_bug.cgi?id=25897
-
- Make text controls always implement the text interface, and the
- editable text interface when they are not read only. This is what
- ATK-users expect.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (getInterfaceMaskFromObject):
-
-2009-10-27 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by Simon Fraser.
-
- Change HitTestResult methods to use (3d) transformation aware methods
- https://bugs.webkit.org/show_bug.cgi?id=27347
-
- The current HitTestResult methods are not using the (3d)
- transformation aware routines. This can lead to an assertion
- SVGRenderBase::mapLocalToContainer method.
-
- Change HitTestResult::imageRect to use the (3d) transformation
- aware RenderBox::absoluteContentQuad to avoid running into
- an assertion with SVG content.
-
- Remove HitTestResult::boundingBox() as it is only used in
- two places and conceptually doesn't belong into a HitTest
- which is operating on points.
-
- A classic test case is not possible as the methods are not excercised
- from within HTML/SVG but from the WebKit API Layer. A unittest
- for Qt/Gtk+/Mac would need to be written but Qt/Gtk+ currently
- do not support 3d transformations making it impossible to write
- a reliable test case and the Mac port is currently not doing
- unit testing.
-
-
- * rendering/HitTestResult.cpp: Remove boundingBox() method
- (WebCore::HitTestResult::imageRect): Use transformation aware method
- * rendering/HitTestResult.h: Remove boundingBox()
-
-2009-10-26 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by Eric Seidel.
-
- [Qt] Custom Cursor doesn't use hotspot.
- https://bugs.webkit.org/show_bug.cgi?id=30820
-
- Cursors loaded from a QPixmap didn't specifiy the
- hotspot. Take the hotspot values from the mac
- implementation.
-
- * platform/qt/CursorQt.cpp:
-
-2009-10-27 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Initial revision of the Timeline grid.
-
- https://bugs.webkit.org/show_bug.cgi?id=30834
-
- * English.lproj/localizedStrings.js:
- * WebCore.gypi:
- * inspector/front-end/AbstractTimelinePanel.js:
- (WebInspector.AbstractTimelinePanel.prototype.populateSidebar):
- (WebInspector.AbstractTimelinePanel.prototype.refresh):
- (WebInspector.AbstractTimelineCalculator):
- * inspector/front-end/Images/timelineBarBlue.png: Added.
- * inspector/front-end/Images/timelineBarGray.png: Added.
- * inspector/front-end/Images/timelineBarGreen.png: Added.
- * inspector/front-end/Images/timelineBarOrange.png: Added.
- * inspector/front-end/Images/timelineBarPurple.png: Added.
- * inspector/front-end/Images/timelineBarRed.png: Added.
- * inspector/front-end/Images/timelineBarYellow.png: Added.
- * inspector/front-end/Images/timelineCheckmarks.png: Added.
- * inspector/front-end/Images/timelineDots.png: Added.
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourceTimeCalculator):
- (WebInspector.ResourceTransferSizeCalculator):
- * inspector/front-end/TimelineAgent.js:
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel):
- (WebInspector.TimelinePanel.prototype.get statusBarItems):
- (WebInspector.TimelinePanel.prototype.get categories):
- (WebInspector.TimelinePanel.prototype.populateSidebar):
- (WebInspector.TimelinePanel.prototype._createStatusbarButtons):
- (WebInspector.TimelinePanel.prototype.addItemToTimeline):
- (WebInspector.TimelinePanel.prototype.refresh):
- (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClick):
- (WebInspector.TimelinePanel.prototype.reset):
- (WebInspector.TimelinePanel.prototype._formatRecord):
- (WebInspector.TimelinePanel.prototype.showCategory):
- (WebInspector.TimelinePanel.prototype.hideCategory):
- (WebInspector.TimelineRecordTreeElement):
- (WebInspector.TimelineRecordTreeElement.prototype.onattach):
- (WebInspector.TimelineCalculator):
- (WebInspector.TimelineCalculator.prototype.computeBarGraphPercentages):
- (WebInspector.TimelineCalculator.prototype.computePercentageFromEventTime):
- (WebInspector.TimelineCalculator.prototype.computeBarGraphLabels):
- (WebInspector.TimelineCalculator.prototype.updateBoundaries):
- (WebInspector.TimelineCalculator.prototype.formatValue):
- (WebInspector.TimelineGraph):
- (WebInspector.TimelineGraph.prototype.get graphElement):
- (WebInspector.TimelineGraph.prototype.refreshLabelPositions):
- (WebInspector.TimelineGraph.prototype.refresh):
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.js:
- (WebInspector._createPanels):
-
-2009-10-27 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Pavel Feldman.
-
- Web Inspector: Move runAfterPendingDispatches to TestController for Clarity
- https://bugs.webkit.org/show_bug.cgi?id=30844
-
- * inspector/front-end/TestController.js:
- (WebInspector.TestController.prototype.runAfterPendingDispatches):
- * inspector/front-end/inspector.js: moved runAfterPendingDispatches
-
-2009-10-27 Darin Fisher <darin@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Add missing forward declaration of FramelessScrollView.
- https://bugs.webkit.org/show_bug.cgi?id=30824
-
- * platform/chromium/FramelessScrollViewClient.h:
-
-2009-10-27 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Adele Peterson.
-
- WAI-ARIA: add support for 'presentation' role
- https://bugs.webkit.org/show_bug.cgi?id=30806
-
- Test: accessibility/aria-presentational-role.html
-
- * accessibility/AccessibilityObject.h:
- (WebCore::):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
- (WebCore::RoleEntry::):
-
-2009-10-27 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- ARIA menu/menu item need AXRoleDescription
- https://bugs.webkit.org/show_bug.cgi?id=30804
-
- Make sure that role descriptions will default to the system's first, before
- returning an unknown role.
-
- Test: platform/mac/accessibility/aria-menu-role-descriptions.html
-
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper roleDescription]):
-
-2009-10-27 Geoffrey Garen <ggaren@apple.com>
-
- Qt build fix: migrated away from API that no longer exists.
-
- * bridge/qt/qt_runtime.cpp:
- (JSC::Bindings::convertQVariantToValue):
-
-2009-10-27 Geoffrey Garen <ggaren@apple.com>
-
- Qt build fix: migrated away from API that no longer exists.
-
- * bridge/qt/qt_runtime.cpp:
- (JSC::Bindings::convertValueToQVariant):
-
-2009-10-27 Oliver Hunt <oliver@apple.com>
-
- Fix wording in comment.
-
- * bridge/objc/objc_instance.mm:
- (allocateAutoReleasePool):
-
-2009-10-27 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Darin Adler.
-
- Crash occurs after launching Newsfire 1.6 for the first time
- https://bugs.webkit.org/show_bug.cgi?id=30807
-
- We allocate an autorelease pool but then store it off the stack. In a
- GC environment this led to it being collected, and thus caused badness
- to ensue. To work around this we simply avoid using a pool at all in
- a GC environment as it would be a no-op anyway.
-
- * bridge/objc/objc_instance.mm:
- (allocateAutoReleasePool):
- (ObjcInstance::virtualBegin):
-
-2009-10-27 Steve Block <steveblock@google.com>
-
- Reviewed by Darin Adler.
-
- When a Geolocation method is called, immediately calls the error calback asynchronously if permissions
- have already been denied.
- https://bugs.webkit.org/show_bug.cgi?id=27944.
-
- Tests: fast/dom/Geolocation/permission-denied-already-error.html
- fast/dom/Geolocation/permission-denied-already-success.html
-
- * page/Geolocation.cpp: Modified.
- (WebCore::Geolocation::GeoNotifier::GeoNotifier): Modified. GeoNotifier takes Geolocation object as constructor argument.
- (WebCore::Geolocation::GeoNotifier::setFatalError): Added. Sets a fatal error for this notifier, causing it to terminate immediately and call the error callback asynchronously.
- (WebCore::Geolocation::GeoNotifier::timerFired): Added. Used to call the error callback asynchronously on fatal error.
- (WebCore::Geolocation::getCurrentPosition): Modified. Calls startRequest.
- (WebCore::Geolocation::watchPosition): Modified. Calls startRequest.
- (WebCore::Geolocation::startRequest): Added. Common functionality for starting a one-shot or watch request. Sets a fatal error on the notifier if permissions have already been denied.
- (WebCore::Geolocation::fatalErrorOccurred): Added. Registers that a notifier has encountered a fatal error and should be destroyed.
- (WebCore::Geolocation::setIsAllowed): Modified. Uses a standard error message for the error callback when permissions are denied.
- * page/Geolocation.h: Modified.
- (WebCore::Geolocation::isDenied): Added. Determines whether permissions have been denied.
-
-2009-10-27 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Fixed a bug where I was using the wrong Canvas pointer to do a cross-domain check
- https://bugs.webkit.org/show_bug.cgi?id=30840
-
- * html/canvas/CanvasRenderingContext2D.cpp:
- (WebCore::CanvasRenderingContext2D::drawImage):
-
-2009-10-27 Eric Seidel <eric@webkit.org>
-
- Reviewed by Nikolas Zimmermann.
-
- SVGStyledElement::getPresentationAttribute() can return a shared CSSValue (some SVG tests randomly fail on the bot, and in release builds)
- https://bugs.webkit.org/show_bug.cgi?id=29620
-
- SVG was modifying CSSValues cached of off CSSMappedAttributeDeclarations.
- This patch fixes the check to make sure that a new CSSMappedAttributeDeclaration is
- created before returning a CSSValue that JavaScript can modify.
-
- Test: svg/dom/getPresentationAttribute-cache-corruption.svg
-
- * svg/SVGStyledElement.cpp:
- (WebCore::SVGStyledElement::getPresentationAttribute):
-
-2009-10-27 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Simon Fraser.
-
- Incomplete repaint of text field in relative positioned inline at imdb.com
- https://bugs.webkit.org/show_bug.cgi?id=30047
-
- Test: fast/repaint/inline-relative-positioned.html
-
- Implemented offsetFromContainer(), mapLocalToContainer() and
- mapAbsoluteToLocalPoint() in RenderInline.
-
- * rendering/RenderBox.h: Fixed argument names in the declaration of
- mapLocalToContainer().
- * rendering/RenderInline.cpp:
- (WebCore::RenderInline::offsetFromContainer):
- (WebCore::RenderInline::mapLocalToContainer):
- (WebCore::RenderInline::mapAbsoluteToLocalPoint):
- * rendering/RenderInline.h:
-
-2009-10-27 Jeremy Orlow <jorlow@chromium.org>
-
- Speculative build fix for Chromium.
-
- * platform/graphics/GraphicsContext3D.h:
-
-2009-10-27 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser.
-
- Make WebGL context failure more robust and make it succeed in more cases
- https://bugs.webkit.org/show_bug.cgi?id=30349
-
- Bubble a failure to get a CGLContext up to HTMLContextElement so it can
- return null from getContext. Also added a more robust pixel format choosing
- mechanism and can render correctly when a SW renderer is chosen.
-
- * html/HTMLCanvasElement.cpp:
- (WebCore::HTMLCanvasElement::getContext):
- * html/canvas/CanvasRenderingContext.h:
- * html/canvas/CanvasRenderingContext2D.cpp:
- * html/canvas/CanvasRenderingContext3D.cpp:
- * html/canvas/CanvasRenderingContext3D.h:
- (WebCore::CanvasRenderingContext3D::graphicsContext3D):
- (WebCore::CanvasRenderingContext3D::cleanupAfterGraphicsCall):
- * platform/graphics/GraphicsContext3D.h:
- * platform/graphics/mac/Canvas3DLayer.mm:
- (-[Canvas3DLayer copyCGLPixelFormatForDisplayMask:]):
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::setPixelFormat):
- (WebCore::GraphicsContext3D::create):
- (WebCore::GraphicsContext3D::GraphicsContext3D):
- (WebCore::GraphicsContext3D::~GraphicsContext3D):
- (WebCore::GraphicsContext3D::reshape):
- (WebCore::ensureContext):
-
-2009-10-27 Geoffrey Garen <ggaren@apple.com>
-
- Mac build fix: a forwarding header.
-
- * ForwardingHeaders/wtf/DateInstanceCache.h: Added.
-
-2009-10-27 Ryosuke Niwa <rniwa@webkit.org>
-
- No Review.
-
- Making fontWeightIsBold static to fix Snow Leopard build.
-
- * editing/ApplyStyleCommand.cpp:
- (WebCore::fontWeightIsBold):
-
-2009-10-27 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Eric Seidel.
-
- WebKit cannot remove nested bold tags
- https://bugs.webkit.org/show_bug.cgi?id=30784
-
- This patch modifies getPropertiesNotInComputedStyle so that it compares font-weight
- more flexibly. Instead of comparing cssText, it uses fontWeightIsBold which converts
- all font weights to either bold or unbold state.
-
- * editing/ApplyStyleCommand.cpp:
- (WebCore::fontWeightIsBold):
- (WebCore::getPropertiesNotInComputedStyle): Removes font-weight property
- if two style have the same value under getFontWeightValue
-
-2009-10-27 Carol Szabo <carol.szabo@nokia.com>
-
- Reviewed by Darin Adler.
-
- Give an ability to WebKit to free statically allocated pointers
- before quit.
- https://bugs.webkit.org/show_bug.cgi?id=27980
-
- No new tests for this as the change does not affect WebKit
- functionality, but only memory usage.
-
- * JavaScriptCore/wtf/StdLibExtras.h:
- Allowed for the override of DEFINE_STATIC_LOCAL via compiler
- commandline options or elsewhere in the code. Useful for
- implementing custom builds that free resources allocated via
- DEFINE_STATIC_LOCAL.
-
-2009-10-27 Dumitru Daniliuc <dumi@chromium.org>
-
- Build fix, no review needed.
-
- Fixing the BUILD. m_estimatedSize in Database.h should be of type
- 'unsigned long' instead of 'unsigned long long'.
-
- No tests required.
-
- * storage/Database.h:
-
-2009-10-27 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Adam Barth.
-
- Refactoring the Database class to not depend on
- OriginQuotaManager. Also, adding a SecurityOrigin copy to each
- Database instance, that is safe to use on the file
- thread. Finally, adding new simple fields and getters to the
- Database object for storing/getting the display name and estimated
- size specified by the user in the openDatabase() call.
-
- https://bugs.webkit.org/show_bug.cgi?id=30548
-
- * page/SecurityOrigin.h:
- * storage/Database.cpp:
- (WebCore::Database::openDatabase): Storing the display name and
- the estimated size in the Database object.
- (WebCore::Database::Database): Storing the display name and the
- estimated size in the Database object, as well as a SecurityOrigin
- instance that is safe to use on the DB thread.
- (WebCore::Database::maximumSize): Delegate the call to
- DatabaseTracker::getMaxSizeForDatabase().
- (WebCore::Database::databaseThreadSecurityOrigin): Return the
- SecurityOrigin instance that's safe to use on the DB thread.
- (WebCore::Database::threadSafeSecurityOrigin): Return the
- SecurityOrigin instance that's safe to use on the current thread.
- (WebCore::Database::displayName): Return the display name
- specified by the user in the openDatabase() call.
- (WebCore::Database::estimatedSize): Return the estimated size
- specified by the user in the openDatabase() call.
- (WebCore::Database::fileName): Return the name of the file where
- the current Database is tored.
- * storage/Database.h:
- * storage/DatabaseTracker.cpp:
- (WebCore::DatabaseTracker::getMaxSizeForDatabase): Returns the
- maximum size for a DB file based on the current size of that file
- and the space available for that origin.
- * storage/DatabaseTracker.h:
- * storage/SQLTransaction.cpp:
- * storage/SQLTransactionClient.cpp:
- (WebCore::SQLTransactionClient::didCommitTransaction): Use the
- correct SecurityOrigin instance.
-
-2009-10-27 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Pretty Print all HTML Collection Types like we do for NodeList
- https://bugs.webkit.org/show_bug.cgi?id=30709
-
- Test: inspector/console-format-collections.html
-
- * inspector/front-end/InjectedScript.js:
- (Object.type): check for instances of HTMLCollection like we do for NodeList
- * inspector/front-end/inspector.js: added WebInspector.pendingDispatches counter
- (WebInspector.dispatch): increment and decrement dispatch counter
- (WebInspector.runAfterPendingDispatches): run when there are no more dispatches
-
-2009-10-27 Kelly Norton <knorton@google.com>
-
- Reviewed by Timothy Hatcher.
-
- Adds XMLHttpRequest support to InspectorTimelineAgent.
- https://bugs.webkit.org/show_bug.cgi?id=30578
-
- * inspector/InspectorTimelineAgent.cpp:
- (WebCore::InspectorTimelineAgent::willChangeXHRReadyState):
- (WebCore::InspectorTimelineAgent::didChangeXHRReadyState):
- (WebCore::InspectorTimelineAgent::willLoadXHR):
- (WebCore::InspectorTimelineAgent::didLoadXHR):
- * inspector/InspectorTimelineAgent.h:
- (WebCore::):
- * inspector/TimelineRecordFactory.cpp:
- (WebCore::TimelineRecordFactory::createXHRReadyStateChangeTimelineRecord):
- (WebCore::TimelineRecordFactory::createXHRLoadTimelineRecord):
- * inspector/TimelineRecordFactory.h:
- * inspector/front-end/TimelineAgent.js:
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::callReadyStateChangeListener):
-
-2009-10-27 Enrica Casucci <enrica@apple.com>
-
- Reviewed by Adele Peterson.
-
- REGRESSION (Safari 4.0.3-ToT): After pressing Shift-PageDown, pressing Shift-Up
- extends the top of the selection upwards (but should shrink the selection instead)
- <rdar://problem/7269075>
- https://bugs.webkit.org/show_bug.cgi?id=29981
-
- * editing/SelectionController.cpp:
- (WebCore::SelectionController::modify): Added setting m_lastChangeWasHorizontalExtension.
-
-2009-10-27 Brian Weinstein <bweinstein@apple.com>
-
- Rubber-stamped by Tim Hatcher.
-
- Removed an extra console.log from ElementsTreeOutline.
-
- * inspector/front-end/ElementsTreeOutline.js:
-
-2009-10-27 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Rewrote JavaScriptSourceSyntaxHighlighter to be more accurate
- https://bugs.webkit.org/show_bug.cgi?id=27147
-
- Tests: LayoutTests/inspector/javascript-syntax-highlight.html
-
- * inspector/front-end/ElementsTreeOutline.js:
- * inspector/front-end/SourceFrame.js:
- (WebInspector.JavaScriptSourceSyntaxHighlighter.process): Added. Processes 100 tokens at a time.
- (WebInspector.JavaScriptSourceSyntaxHighlighter.lex): Added. Scans for a token.
- (WebInspector.JavaScriptSourceSyntaxHighlighter.appendNonToken): Added. Appends the non-token characters that lex ignored.
- (WebInspector.JavaScriptSourceSyntaxHighlighter.syntaxHighlightNode): Added. To syntax highlight node in ElementsTreeOutline.
-
-2009-10-27 Mads Ager <ager@chromium.org>
-
- Reviewed by Adam Barth.
-
- [V8] Missing null check after string conversion in error reporting
- https://bugs.webkit.org/show_bug.cgi?id=30774
-
- Add null check after string conversion in error reporting code.
- ToString conversion can fail for instance when an exception is
- thrown during conversion.
-
- Test: fast/dom/error-to-string-stack-overflow.html
-
- * bindings/v8/V8Utilities.cpp:
- (WebCore::reportException):
-
-2009-10-27 Steve Block <steveblock@google.com>
-
- Reviewed by Darin Adler.
-
- Use a pair of maps to store Geolocation watchers.
- https://bugs.webkit.org/show_bug.cgi?id=29178
-
- The pair of maps allows us to look up a watcher either by its ID or by its GeoNotifier object.
- The ability to look up by a watcher by its GeoNotifier object will be required when implementing
- Geolocation::fatalErrorOccurred. See https://bugs.webkit.org/show_bug.cgi?id=27944
-
- * page/Geolocation.cpp: Modified.
- (WebCore::Geolocation::Watchers::set): Added. Adds a watcher with the given ID.
- (WebCore::Geolocation::Watchers::remove): Added. Removes a watcher by ID.
- (WebCore::Geolocation::Watchers::remove): Added. Removes a watcher by GeoNotifier object.
- (WebCore::Geolocation::Watchers::clear): Added. Removes all watchers.
- (WebCore::Geolocation::Watchers::isEmpty): Added. Determines if there are no watchers.
- (WebCore::Geolocation::Watchers::getNotifiersVector): Added. Gets a vector of the GeoNotifier objects.
- (WebCore::Geolocation::watchPosition): Modified. Rename watcher identifier static variable.
- (WebCore::Geolocation::stopTimersForWatchers): Modified. Use Watchers::getNotifiersVector.
- (WebCore::Geolocation::handleError): Modified. Use Watchers::getNotifiersVector.
- (WebCore::Geolocation::makeSuccessCallbacks): Modified. Use Watchers::getNotifiersVector.
- * page/Geolocation.h: Modified. Adds Geolocation::Watchers class.
-
-2009-10-27 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] DOM Storage runtime flag should default to on
- https://bugs.webkit.org/show_bug.cgi?id=30828
-
- The DOM Storage runtime flag was supposed to default to on. I accidentally
- changed the logic to default to false when I moved the flag.
-
- * bindings/v8/RuntimeEnabledFeatures.cpp:
-
-2009-10-27 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Fix crash found in chromium test_shell.
- https://bugs.webkit.org/show_bug.cgi?id=30808
-
- When WebSocket is deleted without close, webkit would crash
- when it handles didClose.
-
- Check scriptExecutionContext before post task for event.
- Use WebSocketChannel::disconnect() instead of close() in WebSocket
- destructor, so that WebSocketChannel should not call deleted WebSocket
- back in didClose().
- To make sure WebSocketChannel alive while it is processing WebSocket
- protocol over SocketStreamHandle, ref() in connect() and deref() in
- didClose().
-
- * websockets/WebSocket.cpp:
- (WebCore::WebSocket::~WebSocket):
- (WebCore::WebSocket::didConnect):
- (WebCore::WebSocket::didReceiveMessage):
- (WebCore::WebSocket::didClose):
- * websockets/WebSocketChannel.cpp:
- (WebCore::WebSocketChannel::connect):
- (WebCore::WebSocketChannel::disconnect):
- (WebCore::WebSocketChannel::didClose):
- (WebCore::WebSocketChannel::didReceiveData):
- * websockets/WebSocketChannel.h:
-
-2009-10-27 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Darin Adler.
-
- Updated Apple license
-
- * LICENSE-APPLE:
-
-2009-10-27 Brady Eidson <beidson@apple.com>
-
- Rubberstamped by Sam Weinig.
-
- Re-enable the check that disallows pages with unload handlers in the page cache.
-
- <rdar://problem/7196485> and http://webkit.org/b/29021
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::canCachePageContainingThisFrame):
- (WebCore::FrameLoader::logCanCacheFrameDecision):
-
-2009-10-27 Timothy Hatcher <timothy@apple.com>
-
- Remove more empty files that didn't get removed earlier.
-
- * inspector/DOMDispatchTimelineItem.cpp: Removed.
- * inspector/DOMDispatchTimelineItem.h: Removed.
-
-2009-10-27 Andras Becsi <becsi.andras@stud.u-szeged.hu>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] Fix assertion crashes introduced by changes made in r50110.
-
- * dom/XMLTokenizerQt.cpp:
- (WebCore::XMLTokenizer::parseEndElement): only call popCurrentNode() if there are nodes left in the stack.
-
-2009-10-27 Timothy Hatcher <timothy@apple.com>
-
- Remove empty files that didn't get removed earlier.
-
- * inspector/TimelineItem.cpp: Removed.
- * inspector/TimelineItem.h: Removed.
-
-2009-10-27 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=25534
- [GTK] Objects of ROLE_TABLE should implement the accessible table interface
-
- First part of the implementation of AtkTable.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (getCell):
- (getCellIndex):
- (webkit_accessible_table_ref_at):
- (webkit_accessible_table_get_index_at):
- (webkit_accessible_table_get_n_columns):
- (webkit_accessible_table_get_n_rows):
- (webkit_accessible_table_get_column_extent_at):
- (webkit_accessible_table_get_row_extent_at):
- (webkit_accessible_table_get_row_header):
- (atk_table_interface_init):
- (AtkInterfacesInitFunctions):
- (GetAtkInterfaceTypeFromWAIType):
-
-2009-10-27 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Lars Knoll.
-
- [Qt] Don't lose remainder when computing wheel event deltas
-
- * platform/qt/WheelEventQt.cpp:
-
-2009-10-27 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Antti Koivisto.
-
- Fix QtWebKit build for WIN_OS if Netscape plug-in support
- is turned off and refactor some related code
- https://bugs.webkit.org/show_bug.cgi?id=30786
-
- No new tests as there is no new functionality introduced.
-
- * platform/FileSystem.h: Refactor to make sure that each different
- type definition is only repeated once.
-
- * plugins/PluginPackage.cpp:
- (WebCore::PluginPackage::compareFileVersion): Move it out from the
- ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH guard and combine it with the
- function body from PluginPackageWin.
-
- * plugins/win/PluginPackageWin.cpp: Remove compareFileVersion as
- it is now in PluginPackage.cpp.
-
-2009-10-26 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- https://bugs.webkit.org/show_bug.cgi?id=27011
- [Gtk] Implement support for get_index_in_parent
-
- Implement atk_object_get_index_in_parent.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (webkit_accessible_get_index_in_parent):
-
-2009-10-27 Eric Seidel <eric@webkit.org>
-
- No review, rolling out r50131.
- http://trac.webkit.org/changeset/50131
-
- * bridge/objc/objc_instance.h:
- * bridge/objc/objc_instance.mm:
- (ObjcInstance::ObjcInstance):
- (ObjcInstance::virtualEnd):
-
-2009-10-26 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=30491
-
- Fixes an issue where pressing return/enter on the keyboard
- in <isindex> does not submit it if is not within a <form>.
-
- According to the HTML 2.0 thru HTML 4.01 spec
- (http://www.w3.org/MarkUp/html-spec/html-spec_7.html#SEC7.5), the
- <isindex> element does not need to be within a <form> element in
- order to submit it. It can submitted on its own. Also, if present,
- the href property of the <base> element will dictate where to submit
- the value of the <isindex> element (this is analogous to the action
- property of the <form> element).
-
- Tests: http/tests/misc/isindex-with-no-form-base-href.html
- http/tests/misc/isindex-with-no-form.html
-
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::defaultEventHandler): Calls createTemporaryFormForIsIndex()
- to create a <form> if none is present and we are an <isindex> element.
- (WebCore::HTMLInputElement::createTemporaryFormForIsIndex): Added.
- * html/HTMLInputElement.h:
-
-2009-10-26 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Maciej Stachowiak.
-
- Crash occurs after launching Newsfire 1.6 for the first time
- https://bugs.webkit.org/show_bug.cgi?id=30807
-
- Use a RetainPtr in ObjcBinding to ensure that we adequately
- protect the autorelease pool from GC in GC'd applications.
-
- * bridge/objc/objc_instance.h:
- * bridge/objc/objc_instance.mm:
- (ObjcInstance::ObjcInstance):
- (ObjcInstance::virtualEnd):
-
-2009-10-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Unreviewed.
-
- [Qt] Build fix for QtWebKit after r50125.
-
- * WebCore.pro: Rename TimelineItem to TimelineRecord.
-
-2009-10-26 Matt Mueller <mattm@chromium.org>
-
- Reviewed by Darin Adler.
-
- Refactor synchronizable property handling to store one shouldSynchronize flag per set of properties rather than one per property.
-
- Fixes reading uninitialized memory in SynchronizableProperty hash function as well as simplifying the code.
-
- https://bugs.webkit.org/show_bug.cgi?id=30658
-
- Covered by running various svg tests under valgrind, ex:
- LayoutTests/svg/custom/js-late-mask-and-object-creation.svg
-
- * svg/SynchronizablePropertyController.cpp:
- (WebCore::SynchronizableProperties::addProperty):
- (WebCore::SynchronizableProperties::synchronize):
- (WebCore::SynchronizableProperties::startAnimation):
- (WebCore::SynchronizableProperties::stopAnimation):
- (WebCore::SynchronizablePropertyController::registerProperty):
- (WebCore::SynchronizablePropertyController::setPropertyNeedsSynchronization):
- (WebCore::SynchronizablePropertyController::synchronizeProperty):
- (WebCore::SynchronizablePropertyController::synchronizeAllProperties):
- (WebCore::SynchronizablePropertyController::startAnimation):
- (WebCore::SynchronizablePropertyController::stopAnimation):
- * svg/SynchronizablePropertyController.h:
- (WebCore::SynchronizableProperties::SynchronizableProperties):
- (WebCore::SynchronizableProperties::setNeedsSynchronization):
-
-2009-10-26 Kelly Norton <knorton@google.com>
-
- Reviewed by Timothy Hatcher.
-
- Renames TimelineItem to TimelineRecord and updates all call sites.
- https://bugs.webkit.org/show_bug.cgi?id=30785
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::addRecordToTimeline):
- * inspector/InspectorFrontend.h:
- * inspector/InspectorTimelineAgent.cpp:
- (WebCore::InspectorTimelineAgent::willDispatchDOMEvent):
- (WebCore::InspectorTimelineAgent::didDispatchDOMEvent):
- (WebCore::InspectorTimelineAgent::willLayout):
- (WebCore::InspectorTimelineAgent::didLayout):
- (WebCore::InspectorTimelineAgent::willRecalculateStyle):
- (WebCore::InspectorTimelineAgent::didRecalculateStyle):
- (WebCore::InspectorTimelineAgent::willPaint):
- (WebCore::InspectorTimelineAgent::didPaint):
- (WebCore::InspectorTimelineAgent::willWriteHTML):
- (WebCore::InspectorTimelineAgent::didWriteHTML):
- (WebCore::InspectorTimelineAgent::didInstallTimer):
- (WebCore::InspectorTimelineAgent::didRemoveTimer):
- (WebCore::InspectorTimelineAgent::willFireTimer):
- (WebCore::InspectorTimelineAgent::didFireTimer):
- (WebCore::InspectorTimelineAgent::reset):
- (WebCore::InspectorTimelineAgent::addRecordToTimeline):
- (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
- (WebCore::InspectorTimelineAgent::pushCurrentRecord):
- * inspector/InspectorTimelineAgent.h:
- (WebCore::):
- (WebCore::InspectorTimelineAgent::RecordEntry::RecordEntry):
- * inspector/TimelineItemFactory.cpp: Removed.
- * inspector/TimelineItemFactory.h: Removed.
- * inspector/TimelineRecordFactory.cpp: Added.
- (WebCore::TimelineRecordFactory::createGenericRecord):
- (WebCore::TimelineRecordFactory::createDOMDispatchRecord):
- (WebCore::TimelineRecordFactory::createGenericTimerRecord):
- (WebCore::TimelineRecordFactory::createTimerInstallRecord):
- * inspector/TimelineRecordFactory.h: Added.
- (WebCore::TimelineRecordFactory::TimelineRecordFactory):
- * inspector/front-end/TimelineAgent.js:
- (WebInspector.addRecordToTimeline):
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel.prototype.addRecordToTimeline):
- (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
- (WebInspector.TimelinePanel.prototype.getRecordTypeName):
- (WebInspector.TimelineRecordTreeElement.prototype.onattach):
-
-2009-10-26 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Antti Koivisto.
-
- [Qt] Windowless Plugins : Print preview shows only part of flash when view is scrolled
-
- When printing, QPrinter's preview mode uses a QPicture to capture the output. The
- QPicture holds a reference to the X Pixmap. As a result, the print preview would
- update itself when the X Pixmap changes. To prevent the print preview from updating
- whenever m_drawable is updated (i.e when the view updates), we create a copy.
-
- We require that a QPixmap::copy() result in a QPixmap backed by a XPixmap
- regardless of the graphicssystem. This is taken care of by
- commit d310f7c710ecb331a9689861f0551eabd38e946e in Qt (4.6)
-
- The beauty of this patch is that the newly created X Pixmap is managed by Qt and
- it will free the Pixmap whenever the user closes the print preview dialog and
- handles the case of displaying multiple preview dialogs nicely.
-
- All credit to Samuel Rødal for suggesting usage of QPixmap::copy().
-
- https://bugs.webkit.org/show_bug.cgi?id=30714
-
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::paint):
-
-2009-10-26 Benjamin Otte <otte@gnome.org>
-
- Reviewed by Gustavo Noronha.
-
- Don't store properties in the MediaPlayerPrivate class
-
- Access them via the MediaPlayer class instead.
- https://bugs.webkit.org/show_bug.cgi?id=30462
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
- (WebCore::MediaPlayerPrivate::seek):
- (WebCore::MediaPlayerPrivate::setVolume):
- (WebCore::MediaPlayerPrivate::setRate):
- (WebCore::MediaPlayerPrivate::setVisible):
- (WebCore::MediaPlayerPrivate::paint):
- (WebCore::MediaPlayerPrivate::createGSTPlayBin):
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
-
-2009-10-26 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <http://webkit.org/b/30801>.
- Web Inspector: Control + ]/[ on Windows doesn't change Panels.
-
- In my testing, Windows uses "U+00DB" and "U+00DD" to represent
- [ and ], so we should honor those as well.
-
- * inspector/front-end/inspector.js:
- (WebInspector.documentKeyDown):
-
-2009-10-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Darin Adler.
-
- Make .rc files compile on Windows without depending on MFC headers
- https://bugs.webkit.org/show_bug.cgi?id=30750
-
- * WebCore.vcproj/QTMovieWin.rc: Use winresrc.h because it exists
- even when MFC is not installed, and is all that's needed here.
-
-2009-10-26 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Darin Adler.
-
- Build corrections for ENABLE_FILTERS in Windows.
- https://bugs.webkit.org/show_bug.cgi?id=30797
-
- Build correction for ENABLE_FILTERS feature. No new tests needed.
-
- * platform/graphics/filters/FEColorMatrix.cpp: Use MathExtras.h and
- its piDouble constant.
- * platform/graphics/filters/FEGaussianBlur.cpp: Use MathExtras.h and
- its piDouble constant. Remove unnecessary call to floor used in
- the division of an unsigned, converting to int.
- * platform/graphics/win/SimpleFontDataCairoWin.cpp: Correct include
- style for MathExtras.h.
-
-2009-10-26 Brady Eidson <beidson@apple.com>
-
- Reviewed by Darin Adler.
-
- <rdar://problem/7289467> and http://webkit.org/b/30798 - REGRESSION (r48687): www.myuhc.com doesn't load.
-
- Test: fast/loader/grandparent-completion-starts-redirect.html
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::completed): Notify all descendants that the load completed, not just direct children.
-
-2009-10-26 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Beth Dakin.
-
- Re-add CSSPropertyWebkitBackgroundSize in one more place
-
- Fixes transitions/multiple-background-size-transitions.html, transitions/background-transitions.html
-
- * page/animation/AnimationBase.cpp:
- (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
-
-2009-10-26 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Tidy up the DOM Storage runtime flag stuff
- https://bugs.webkit.org/show_bug.cgi?id=30794
-
- Clean up the DOM Storage runtime flag stuff to match the new way of doing
- things. No behavioral changes.
-
- * bindings/v8/RuntimeEnabledFeatures.cpp:
- * bindings/v8/RuntimeEnabledFeatures.h:
- (WebCore::RuntimeEnabledFeatures::setDatabaseEnabled):
- (WebCore::RuntimeEnabledFeatures::databaseEnabled):
- (WebCore::RuntimeEnabledFeatures::setLocalStorageEnabled):
- (WebCore::RuntimeEnabledFeatures::localStorageEnabled):
- (WebCore::RuntimeEnabledFeatures::setSessionStorageEnabled):
- (WebCore::RuntimeEnabledFeatures::sessionStorageEnabled):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::ACCESSOR_RUNTIME_ENABLER):
- * storage/Storage.cpp:
- * storage/Storage.h:
-
-2009-10-26 Brady Eidson <beidson@apple.com>
-
- Reviewed by Darin Adler.
-
- <rdar://problem/7308952> and http://webkit.org/b/30424 - REGRESSION (r48687): Pages on ucas.com appear blank.
-
- Test: fast/loader/history-forward-in-head.html
-
- * loader/RedirectScheduler.cpp:
- (WebCore::RedirectScheduler::scheduleHistoryNavigation): Restore the moved canGoBackOrForward() check.
- This restores the side effect of an invalid history navigation canceling previous scheduled redirects
- and also fixes the bug of scheduling an invalid history navigation canceling parsing of the current document.
- (WebCore::RedirectScheduler::timerFired): Removed the canGoBackOrForward() check as it is now made before
- the redirect is scheduled.
-
-2009-10-26 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=30049
- <rdar://problem/7286002> Manipulating DOM from a script while parsing XHTML can cause a crash
-
- Tests: fast/parser/remove-current-node-parent-x-2.xhtml
- fast/parser/remove-current-node-parent-x.xhtml
-
- * dom/XMLTokenizer.h: Store the whole stack of parent nodes - element.parentNode() is
- unreliable after DOM manipulation.
-
- * dom/XMLTokenizer.cpp:
- (WebCore::XMLTokenizer::pushCurrentNode): Push the new node onto stack.
- (WebCore::XMLTokenizer::popCurrentNode): This is now called instead of setCurrentNode when
- exiting a node.
- (WebCore::XMLTokenizer::clearCurrentNodeStack): We're aborting; or just done parsing. This
- replaces setCurrentNode(0).
- (WebCore::XMLTokenizer::enterText): Call pushCurrentNode().
- (WebCore::XMLTokenizer::exitText): Call popCurrentNode(), removing a long-standing FIXME
- (not sure if it was ever practical though - how can a parent become null while adding text?)
-
- * dom/XMLTokenizerLibxml2.cpp:
- (WebCore::XMLTokenizer::~XMLTokenizer): Call clearCurrentNodeStack().
- (WebCore::XMLTokenizer::startElementNs): Call pushCurrentNode().
- (WebCore::XMLTokenizer::endElementNs): Call popCurrentNode() to safely get to a parent. Also
- added a check fo script element still being in document - Firefox parses those that aren't,
- but doesn't execute them.
-
- * dom/XMLTokenizerQt.cpp:
- (WebCore::XMLTokenizer::~XMLTokenizer):
- (WebCore::XMLTokenizer::parseStartElement):
- (WebCore::XMLTokenizer::parseEndElement):
- Match libxml2 version changes.
-
-2009-10-26 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Beth Dakin.
-
- background-size: X treated as background-size: X X, not background-size: X auto
- https://bugs.webkit.org/show_bug.cgi?id=28440
-
- Updated fast/backgrounds/size/resources/parsing-background-size-values.js
- and fast/backgrounds/size/resources/parsing-inherit.js
-
- Reinstated -webkit-background-size and kept its behavior of filling in
- the second value with the first one; and changed background-size to have
- the behavior of filling in the second value with 'auto'.
-
- * css/CSSComputedStyleDeclaration.cpp:
- (computedProperties): Re-added CSSPropertyWebkitBackgroundSize.
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Ditto.
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue): Ditto.
- (WebCore::CSSParser::parseFillSize): Adapted for the new parsing rule.
- (WebCore::CSSParser::parseFillProperty): Re-added
- CSSPropertyWebkitBackgroundSize.
- (WebCore::cssPropertyID): Removed mapping of -webkit-background-size to
- background-size.
- * css/CSSParser.h:
- * css/CSSPropertyNames.in: Re-added -webkit-background-size.
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty): Re-added
- CSSPropertyWebkitBackgroundSize.
-
-2009-10-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Eric Seidel.
-
- [Qt] Use "%lli" to format "long long" on WIN_OS to fix HTML5 WebDB crash
- https://bugs.webkit.org/show_bug.cgi?id=30777
-
- No new tests as the crash can be reproduced by existing storage
- LayoutTests (by hitting an assert in debug mode Webkit on WIN_OS).
-
- * platform/text/String.cpp:
- (WebCore::String::number): Qt's QString::vsprintf does not
- understand the "%I64u" format string. Always use the "%lli"
- format string for Qt port.
-
-2009-10-26 Tony Chang <tony@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Roll back r50073 because r50041-50043 were reverted. r50073 was
- a chromium side fix for r50041.
- https://bugs.webkit.org/show_bug.cgi?id=30789
-
- * bindings/v8/V8Collection.h:
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
- (WebCore::getNamedItems):
- (WebCore::getItem):
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
- (WebCore::getNamedItems):
- (WebCore::getItem):
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
-
-2009-10-26 Geoffrey Garen <ggaren@apple.com>
-
- Reviewed by Dimitri Glazkov.
-
- Fixed https://bugs.webkit.org/show_bug.cgi?id=30765
- REGRESSION (r48701): Removing an event listener causes the one added just after it not to fire
-
- and related bugs.
-
- If the event listener being removed is prior to the current firing event
- iterator, we need to decrement the current firing event iterator in
- addition to the endpoint. (Otherwise, shrinking the event listener vector
- by one implicity moves the current firing event iterator forward by one.
- It's like relativity, only without the planets.)
-
- Also took the opportunity to change some pointers to references, since
- they can't be null.
-
- * dom/EventTarget.cpp:
- (WebCore::EventTarget::removeEventListener):
- (WebCore::EventTarget::removeAllEventListeners): Update iterator in addition
- to end, if need be.
- (WebCore::EventTarget::fireEventListeners): Updated for interface changes.
- Added a comment to explain a behavior that was implicit enough to be
- confusing.
-
- * dom/EventTarget.h:
- (WebCore::FiringEventIterator::FiringEventIterator):
- (WebCore::EventTarget::isFiringEventListeners): Updated for interface changes.
-
-2009-10-26 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <http://webkit.org/b/30792>.
- Web Inspector: When changing resource scope, resource graph can get in weird state.
-
- If the user was scrolled down while looking at All resources, and then just
- selects Fonts, or something that doesn't have many resources, then the graph
- will stay scrolled down, even when there is no content there.
-
- When the filter is updated, scroll to the top of the graph view, so this won't
- happen.
-
- * inspector/front-end/AbstractTimelinePanel.js:
- (WebInspector.AbstractTimelinePanel.prototype._updateFilter):
-
-2009-10-26 Sam Weinig <sam@webkit.org>
-
- Fix mac clean build.
-
- * html/HTMLOptionsCollection.idl:
-
-2009-10-26 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Extract AbstractTimelinePanel that will be a base
- class for ResourcesPanel and TimelinePanel.
-
- https://bugs.webkit.org/show_bug.cgi?id=30776
-
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * inspector/front-end/AbstractTimelinePanel.js: Added.
- (WebInspector.AbstractTimelinePanel):
- (WebInspector.AbstractTimelinePanel.prototype.get categories):
- (WebInspector.AbstractTimelinePanel.prototype.showCategory):
- (WebInspector.AbstractTimelinePanel.prototype.hideCategory):
- (WebInspector.AbstractTimelinePanel.prototype.createTimelinePanels):
- (WebInspector.AbstractTimelinePanel.prototype._createFilterPanel.createFilterElement):
- (WebInspector.AbstractTimelinePanel.prototype._createFilterPanel):
- (WebInspector.AbstractTimelinePanel.prototype.filter):
- (WebInspector.AbstractTimelinePanel.prototype._updateFilter):
- (WebInspector.AbstractTimelinePanel.prototype._createGraph):
- (WebInspector.AbstractTimelinePanel.prototype.updateGraphDividersIfNeeded):
- (WebInspector.AbstractTimelinePanel.prototype._updateSummaryGraph):
- (WebInspector.AbstractTimelinePanel.prototype._updateDividersLabelBarPosition):
- (WebInspector.AbstractTimelinePanel.prototype.get needsRefresh):
- (WebInspector.AbstractTimelinePanel.prototype.set needsRefresh):
- (WebInspector.AbstractTimelinePanel.prototype.refreshIfNeeded):
- (WebInspector.AbstractTimelinePanel.prototype.show):
- (WebInspector.AbstractTimelinePanel.prototype.resize):
- (WebInspector.AbstractTimelinePanel.prototype.updateMainViewWidth):
- (WebInspector.TimelineCalculator):
- (WebInspector.TimelineCalculator.prototype.computeSummaryValues):
- (WebInspector.TimelineCalculator.prototype.computeBarGraphPercentages):
- (WebInspector.TimelineCalculator.prototype.computeBarGraphLabels):
- (WebInspector.TimelineCalculator.prototype.get boundarySpan):
- (WebInspector.TimelineCalculator.prototype.updateBoundaries):
- (WebInspector.TimelineCalculator.prototype.reset):
- (WebInspector.TimelineCalculator.prototype._value):
- (WebInspector.TimelineCalculator.prototype.formatValue):
- * inspector/front-end/ResourceCategory.js:
- (WebInspector.ResourceCategory):
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel):
- (WebInspector.ResourcesPanel.prototype.toolbarItemClass.get toolbarItemLabel):
- (WebInspector.ResourcesPanel.prototype.get statusBarItems):
- (WebInspector.ResourcesPanel.prototype.get categories):
- (WebInspector.ResourcesPanel.prototype.showCategory):
- (WebInspector.ResourcesPanel.prototype.hideCategory):
- (WebInspector.ResourcesPanel.prototype.isCategoryVisible):
- (WebInspector.ResourcesPanel.prototype.populateSidebar):
- (WebInspector.ResourcesPanel.prototype.createPanelEnabler):
- (WebInspector.ResourcesPanel.prototype.createStatusbarButtons):
- (WebInspector.ResourcesPanel.prototype.set mainResourceLoadTime):
- (WebInspector.ResourcesPanel.prototype.set mainResourceDOMContentTime):
- (WebInspector.ResourcesPanel.prototype.show):
- (WebInspector.ResourcesPanel.prototype.resize):
- (WebInspector.ResourcesPanel.prototype.reset):
- (WebInspector.ResourcesPanel.prototype.updateGraphDividersIfNeeded):
- (WebInspector.ResourcesPanel.prototype.updateMainViewWidth):
- (WebInspector.ResourceTimeCalculator):
- (WebInspector.ResourceTransferSizeCalculator):
- (WebInspector.ResourceTransferSizeCalculator.prototype.computeBarGraphLabels):
- * inspector/front-end/SummaryBar.js:
- (WebInspector.SummaryBar.prototype.update):
- * inspector/front-end/WebKit.qrc:
- * inspector/front-end/inspector.html:
- * inspector/front-end/inspector.js:
- (WebInspector.loaded):
-
-2009-10-26 Avi Drissman <avi@google.com>
-
- Reviewed by Darin Adler.
-
- Use Helvetica in the Inspector as intended.
- https://bugs.webkit.org/show_bug.cgi?id=30787
-
- * inspector/front-end/inspector.css:
-
-2009-10-26 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- Don't set window.opener to 0 for the current FrameLoader if a noreferrer link was clicked, only suppress opener in a new frame.
- https://bugs.webkit.org/show_bug.cgi?id=30781
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::urlSelected): Don't suppress opener in the current frame for noreferrer navigations.
-
-2009-10-26 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Data loss occurs when unbolding nested bold tags.
- https://bugs.webkit.org/show_bug.cgi?id=30083
-
- Fixes the loop in swapInNodePreservingAttributesAndChildren by saving nextSibling() of child
- to a temporary valuable. It was originally calling nextSibling() after appending the child
- to new parent, in which case, nextSibling is always 0.
-
- Test: editing/style/unbolding-nested-b.html
-
- * editing/ReplaceNodeWithSpanCommand.cpp:
- (WebCore::swapInNodePreservingAttributesAndChildren):
-
-2009-10-21 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Adler.
-
- Storage events should use Document::url() rather than documentURI()
- https://bugs.webkit.org/show_bug.cgi?id=30535
-
- Storage events should use Document::url() rather than Document::documentURI()
- per http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-October/023703.html
-
- Test: storage/domstorage/documentURI.html
-
- * storage/StorageEventDispatcher.cpp:
- (WebCore::StorageEventDispatcher::dispatch):
-
-2009-10-26 Sam Weinig <sam@webkit.org>
-
- Rubber-stamped by Darin Adler.
-
- Rollout r50041-50043. The HTML5 spec changed to make HTMLOptionsCollection
- inherit from HTMLCollection.
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSHTMLAllCollectionCustom.cpp:
- (WebCore::getNamedItems):
- (WebCore::callHTMLAllCollection):
- (WebCore::JSHTMLAllCollection::nameGetter):
- (WebCore::JSHTMLAllCollection::item):
- (WebCore::JSHTMLAllCollection::namedItem):
- * bindings/js/JSHTMLCollectionCustom.cpp:
- (WebCore::getNamedItems):
- (WebCore::callHTMLCollection):
- (WebCore::JSHTMLCollection::nameGetter):
- (WebCore::JSHTMLCollection::item):
- (WebCore::JSHTMLCollection::namedItem):
- (WebCore::toJS):
- * bindings/js/JSHTMLCollectionFunctions.h: Removed.
- * bindings/js/JSHTMLDocumentCustom.cpp:
- * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
- (WebCore::JSHTMLOptionsCollection::length):
- (WebCore::JSHTMLOptionsCollection::indexSetter):
- * bindings/objc/DOMHTML.mm:
- (kitClass):
- * bindings/objc/DOMUtility.mm:
- (JSC::createDOMWrapper):
- * bindings/scripts/CodeGeneratorJS.pm:
- * html/HTMLCollection.idl:
- * html/HTMLOptionsCollection.idl:
-
-2009-10-26 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Adam Roben.
-
- Build fix for ENABLE_FILTERS under Windows.
- https://bugs.webkit.org/show_bug.cgi?id=30762
-
- Build correction for ENABLE_FILTERS feature. No new tests needed.
-
- * WebCore.vcproj/WebCore.vcproj: Make the following changes:
- (1) Create a new 'filters' sub-folder of the platform/graphics
- folder to properly show the sources held in this directory.
- (2) Move the files that are currently shown in svn/graphics/filters
- to platform/graphics/filters (where they actually live on disk).
- (3) Add the missing SVGFilter, SVGFilterBuilder, and SVGFETile to
- the project so they are built.
- (4) Remove SVGFEFloodElement.cpp from the build, since it is already
- being compiled by SVGAllInOne.cpp. Its presence as a separate
- entity is causing a linker warning for duplicate symbols.
- (5) Add ImageBuffer.cpp to the build to support color space
- calculations for non-CG builds.
- * WebCore.vcproj/WebCoreCommon.vsprops: Add the platform/graphics/filters
- path to the search paths in the project.
-
-2009-10-26 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- console.assert should prefix messages with "Assertion failed: "
- https://bugs.webkit.org/show_bug.cgi?id=19135
-
- * English.lproj/localizedStrings.js:
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleMessage.prototype.toMessageElement): Append "Assertion failed: " for AssertMessageType.
- (WebInspector.ConsoleMessage.prototype.toString):
- * page/Console.cpp:
- (WebCore::Console::assertCondition): Use AssertMessageType.
- * page/Console.h:
- (WebCore::MessageType): Added AssertMessageType.
-
-2009-10-26 Rahul Kuchhal <kuchhal@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Prevent crash when optgroup element is empty by adding a NULL check.
-
- https://bugs.webkit.org/show_bug.cgi?id=30365
-
- Test: fast/forms/select-empty-optgroup.html
-
- * dom/SelectElement.cpp:
- (WebCore::SelectElement::appendFormData):
-
-2009-10-21 Steven Knight <sgk@chromium.org>
-
- Reviewed by David Levin.
-
- Refactor gyp for separate webcore_bindings{,_sources} targets.
-
- https://bugs.webkit.org/show_bug.cgi?id=30447
-
- Handle long link lines by building .idl-generated bindings in a
- separate webcore_bindings library target. Avoid Visual Studio
- dependency issues by building additional generated .cpp and .h files
- in a separate webcore_bindings_sources target.
-
- Chrome should still build and test successfully.
-
- * WebCore.gyp/WebCore.gyp:
- * WebCore.gypi:
-
-2009-10-26 Mike Belshe <mike@belshe.com>
-
- Reviewed by Darin Fisher.
-
- Make the number of connections for chromium controlled by
- chromium rather than by ResourceRequestBase.
- https://bugs.webkit.org/show_bug.cgi?id=30661
-
- * platform/network/ResourceRequestBase.cpp:
- * platform/network/chromium/ResourceRequest.cpp:
-
-2009-10-26 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Unreviewed. make distcheck build fixes.
-
- * GNUmakefile.am:
-
-2009-10-26 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Unbreak Chromium build: that requires adding custom implementations
- for HTMLOptionsCollection's item and namedItem. Keep v8 binding
- close to JSC bindings as well.
- https://bugs.webkit.org/show_bug.cgi?id=30780
-
- * bindings/v8/V8Collection.h:
- (WebCore::getNamedItemsFromCollection):
- (WebCore::getItemFromCollection):
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-10-23 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Adam Barth and Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=30723
- <rdar://problem/6189415> Input names added to multipart/form-data headers need to be escaped.
-
- Test: http/tests/security/escape-form-data-field-names.html
-
- * platform/network/FormDataBuilder.cpp:
- (WebCore::appendQuotedString):
- (WebCore::FormDataBuilder::beginMultiPartHeader):
- (WebCore::FormDataBuilder::addFilenameToMultiPartHeader):
- Percent-escape line breaks and quotation marks.
-
-2009-10-26 Kelly Norton <knorton@google.com>
-
- Reviewed by Pavel Feldman.
-
- Adds DOMTimer support to InspectorTimelineAgent.
- https://bugs.webkit.org/show_bug.cgi?id=30467
-
- * inspector/InspectorTimelineAgent.cpp: Added timer support and fixed some method names.
- (WebCore::InspectorTimelineAgent::didDispatchDOMEvent):
- (WebCore::InspectorTimelineAgent::didLayout):
- (WebCore::InspectorTimelineAgent::didRecalculateStyle):
- (WebCore::InspectorTimelineAgent::didPaint):
- (WebCore::InspectorTimelineAgent::didWriteHTML):
- (WebCore::InspectorTimelineAgent::didInstallTimer): Added.
- (WebCore::InspectorTimelineAgent::didRemoveTimer): Added.
- (WebCore::InspectorTimelineAgent::willFireTimer): Added.
- (WebCore::InspectorTimelineAgent::didFireTimer): Added.
- (WebCore::InspectorTimelineAgent::addItemToTimeline): Added.
- (WebCore::InspectorTimelineAgent::didCompleteCurrentTimelineItem): Renamed.
- * inspector/InspectorTimelineAgent.h:
- (WebCore::):
- * inspector/TimelineItemFactory.cpp: Add methods for timer-related ScriptObjects.
- (WebCore::TimelineItemFactory::createGenericTimerTimelineItem):
- (WebCore::TimelineItemFactory::createTimerInstallTimelineItem):
- * inspector/TimelineItemFactory.h:
- * page/DOMTimer.cpp: Added instrumentation points.
- (WebCore::DOMTimer::install):
- (WebCore::DOMTimer::removeById):
- (WebCore::DOMTimer::fired):
-
-2009-10-26 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Sam Weinig.
-
- <rdar://problem/6988966> Hardware layers do not show up in page snapshots
-
- Add a method that gets called when snapshotting Canvas3DLayers for page snapshots,
- that allows the layer to return a CGImageRef of its contents.
-
- * platform/graphics/mac/Canvas3DLayer.h:
- * platform/graphics/mac/Canvas3DLayer.mm:
- (-[Canvas3DLayer copyImageSnapshotWithColorSpace:]):
-
-2009-10-26 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Pass "console" as object group when evaluating selection.
-
- https://bugs.webkit.org/show_bug.cgi?id=30738
-
- * inspector/front-end/SourceFrame.js:
- (WebInspector.SourceFrame.prototype._evalSelectionInCallFrame):
-
-2009-10-26 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Pavel Feldman.
-
- Fix for Console not showing repeat count when repeatedly logging an Event
- https://bugs.webkit.org/show_bug.cgi?id=30324
-
- * inspector/ConsoleMessage.cpp:
- (WebCore::ConsoleMessage::addToConsole):
- (WebCore::ConsoleMessage::updateRepeatCountInConsole): Added.
- * inspector/ConsoleMessage.h:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::addConsoleMessage): Calls updateRepeatCountInConsole if it is a repeating message.
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::addConsoleMessage): Renamed WebCore::InspectorFrontend::addMessageToConsole
- (WebCore::InspectorFrontend::updateConsoleMessageRepeatCount): Added. Called when repeatCount is incremented.
- * inspector/InspectorFrontend.h:
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype.addMessage): Removed calls to msg.isEqual.
- (WebInspector.ConsoleView.prototype.updateMessageRepeatCount): Added.
- (WebInspector.ConsoleView.prototype._incrementErrorWarningCount): Added. Updates the error/warning count.
- (WebInspector.ConsoleView.prototype.clearMessages):
- (WebInspector.ConsoleMessage):
- (WebInspector.ConsoleMessage.prototype.toMessageElement): Use ConsoleMessage._updateRepeatCount
- (WebInspector.ConsoleMessage.prototype._updateRepeatCount):
- * inspector/front-end/inspector.js:
- (WebInspector.addConsoleMessage): Renamed WebInspector.addMessageToConsole.
- (WebInspector.updateConsoleMessageRepeatCount): Added.
-
-2009-10-26 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- crash with AX on when an image map contains an anchor tag
- https://bugs.webkit.org/show_bug.cgi?id=30739
-
- Tests: accessibility/crashing-a-tag-in-map.html
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::addChildren):
-
-2009-10-26 Steve Block <steveblock@google.com>
-
- Reviewed by Eric Seidel.
-
- Adds feature ENABLE guards to V8 bindings.
- https://bugs.webkit.org/show_bug.cgi?id=30697
-
- This adds guards for the following features to the V8 bindings,
- to allow builds with V8 to succeed when these features are not enabled.
- - DATABASE
- - WORKERS
- - SHARED_WORKERS
- - SVG
- - XPATH
- - XSLT
- - INSPECTOR
-
- This is a build fix only, no new tests required.
-
- * bindings/v8/DOMObjectsInclude.h: Modified.
- * bindings/v8/DerivedSourcesAllInOne.cpp: Modified.
- * bindings/v8/V8Index.cpp: Modified.
- * bindings/v8/V8Index.h: Modified.
-
-2009-10-26 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=25679
- [Gtk] Improve accessibility of focusable lists
-
- Fixes the issues with the Atk states exposed for ListBoxOption
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (setAtkStateSetFromCoreObject):
-
-2009-10-26 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=27085
- [Gtk] Incorrect rendering of list
-
- Adds a way for platforms to indicate that a particular object
- should not be ignored.
-
- * accessibility/AccessibilityObject.h:
- * accessibility/chromium/AccessibilityObjectChromium.cpp:
- * accessibility/gtk/AccessibilityObjectAtk.cpp:
- * accessibility/mac/AccessibilityObjectMac.mm:
- * accessibility/qt/AccessibilityObjectQt.cpp:
- * accessibility/win/AccessibilityObjectWin.cpp:
- * accessibility/wx/AccessibilityObjectWx.cpp:
- (AccessibilityObject::accessibilityPlatformIncludesObject):
- * accessibility/AccessibilityRenderObject.cpp:
- (AccessibilityRenderObject::accessibilityIsIgnored):
-
-2009-10-26 Kinuko Yasuda <kinuko@google.com>
-
- Reviewed by Jan Alonzo.
-
- Bug 30619: [Linux] Menu key doesn't work
- https://bugs.webkit.org/show_bug.cgi?id=30619
-
- Test: manual-tests/keyboard-menukey-event.html
- No new layout tests: testing this will require changes in the test
- controller in a platform-specific way.
-
- * platform/chromium/KeyCodeConversionGtk.cpp:
- (WebCore::windowsKeyCodeForKeyEvent): changed switch-case code for
- GDK_Menu to return VKEY_APPS instead of VKEY_MENU.
- * platform/gtk/KeyEventGtk.cpp:
- (WebCore::windowsKeyCodeForKeyEvent): changed switch-case code for
- GDK_Menu to return V_APPS instead of VK_MENU.
-
-2009-10-25 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Adam Barth.
-
- Reuse already fetched proxy.
- https://bugs.webkit.org/show_bug.cgi?id=30747
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::convertNewNodeToV8Object):
-
-2009-10-25 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Unreviewed build fix.
-
- Build fix for WIN_OS if Netscape plugin support is turned off
- https://bugs.webkit.org/show_bug.cgi?id=30753
-
- * plugins/PluginDatabase.cpp:
-
-2009-10-25 Hironori Bono <hbono@chromium.org>
-
- Reviewed by Darin Adler.
-
- A quick fix for Bug 29103.
- Since String::startsWith() cannot fold non-ASCII characters, this change folds the prefix string
- and the option string before calling String::startsWith().
- https://bugs.webkit.org/show_bug.cgi?id=29103
-
- Tests: fast/forms/listbox-typeahead-cyrillic.html
- fast/forms/listbox-typeahead-greek.html
-
- * dom/SelectElement.cpp:
- (WebCore::SelectElement::typeAheadFind):
-
-2009-10-25 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Expanding a node in the Console should not show the element in Elements panel
- https://bugs.webkit.org/show_bug.cgi?id=30749
-
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeElement.prototype.onmousedown): Check if inside disclosure triangle.
-
-2009-10-25 Sam Weinig <sam@webkit.org>
-
- Reviewed by Dan Bernstein.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=30751
- HTMLOptionsCollection should not inherit from HTMLCollection
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- Added JSHTMLCollectionFunctions.h
-
- * bindings/js/JSHTMLAllCollectionCustom.cpp:
- (WebCore::callHTMLAllCollection):
- (WebCore::JSHTMLAllCollection::nameGetter):
- (WebCore::JSHTMLAllCollection::item):
- (WebCore::JSHTMLAllCollection::namedItem):
- * bindings/js/JSHTMLCollectionCustom.cpp:
- (WebCore::callHTMLCollection):
- (WebCore::JSHTMLCollection::nameGetter):
- (WebCore::JSHTMLCollection::item):
- (WebCore::JSHTMLCollection::namedItem):
- * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
- (WebCore::callHTMLCollection):
- (WebCore::JSHTMLOptionsCollection::getCallData):
- (WebCore::JSHTMLOptionsCollection::canGetItemsForName):
- (WebCore::JSHTMLOptionsCollection::nameGetter):
- (WebCore::JSHTMLOptionsCollection::indexSetter):
- (WebCore::JSHTMLOptionsCollection::item):
- (WebCore::JSHTMLOptionsCollection::namedItem):
- Refactor to use generic implementation of HTMLCollection bindings functions
- from JSHTMLCollectionFunctions.h
-
- * bindings/js/JSHTMLCollectionFunctions.h: Added.
- (WebCore::getCollectionNamedItems):
- (WebCore::getCollectionItems):
- (WebCore::callHTMLCollectionGeneric):
- Added generic functions that JSHTMLCollection, JSHTMLAllCollection and
- JSHTMLOptionsCollection can all use.
-
- * bindings/js/JSHTMLDocumentCustom.cpp: Add include of JSHTMLAllCollection.h
- for toJS on document.all.
-
- * bindings/objc/DOMHTML.mm:
- * bindings/objc/DOMUtility.mm:
- (JSC::createDOMWrapper):
- Remove special cases for HTMLOptionsCollection.
-
- * bindings/scripts/CodeGeneratorJS.pm:
- * html/HTMLAllCollection.idl:
- * html/HTMLCollection.idl:
- * html/HTMLOptionsCollection.idl:
-
-2009-10-24 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Fixed issue with IME inside console
- https://bugs.webkit.org/show_bug.cgi?id=30660
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype._promptKeyDown):
- * inspector/front-end/DatabaseQueryView.js:
- (WebInspector.DatabaseQueryView.prototype._promptKeyDown):
- * inspector/front-end/inspector.js:
- (WebInspector.loaded):
- (WebInspector.searchKeyDown): Moved performSearch here from WebInspector.searchKeyUp.
- (WebInspector.startEditing.element.handleKeyEvent):
- (WebInspector.startEditing):
- * inspector/front-end/utilities.js:
- (isEnterKey): Added. Check if in IME.
-
-2009-10-24 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <https://bugs.webkit.org/show_bug.cgi?id=30752>.
- Web Inspector: Multiple Selection on Scope Bars by default Conflicts with other behavior on OSX.
-
- Have the scope bars select one scope by default, but if the multiple selection key
- is pressed, allow for multiple selection.
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView):
- (WebInspector.ConsoleView.prototype._updateFilter):
- (WebInspector.ConsoleView.prototype.filter):
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel):
- (WebInspector.ResourcesPanel.prototype.filter):
- (WebInspector.ResourcesPanel.prototype._updateFilter):
-
-2009-10-24 Timothy Hatcher <timothy@apple.com>
-
- Make the scope bars in the Web Inspector match other scope bars in Mac OS X.
- Also cleans up the CSS to use classes instead of ID selectors.
-
- https://bugs.webkit.org/show_bug.cgi?id=28186
-
- Reviewed by Dan Bernstein.
-
- * inspector/front-end/ResourcesPanel.js: Add the scope-bar class.
- * inspector/front-end/inspector.css: Lots of changes to make it look right.
- * inspector/front-end/inspector.html: Add the scope-bar class.
-
-2009-10-24 Timothy Hatcher <timothy@apple.com>
-
- Fix selecting Resources in the Web Inspector's Resources panel.
-
- https://bugs.webkit.org/show_bug.cgi?id=30743
-
- Reviewed by Pavel Feldman.
-
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel.prototype.isCategoryVisible): Added.
- (WebInspector.ResourceSidebarTreeElement.prototype.get selectable): Call
- isCategoryVisible on the ResourcesPanel.
-
-2009-10-24 Timothy Hatcher <timothy@apple.com>
-
- Fix the Scope Bar in the Web Inspector's Resource panel, so that selecting
- All will deselect the other filters.
-
- https://bugs.webkit.org/show_bug.cgi?id=30744
-
- Reviewed by Pavel Feldman.
-
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel.createFilterElement): Better syntax.
- (WebInspector.ResourcesPanel):
- (WebInspector.ResourcesPanel.prototype.filter): Use a normal for loop,
- and the child variable instead of target in the loop. Other clean up.
-
-2009-10-24 Timothy Hatcher <timothy@apple.com>
-
- Make resizing the Web Inspector's Elements panel sidebar work again.
- Also makes Resources panel use the sidebar code in Panel.
-
- https://bugs.webkit.org/show_bug.cgi?id=30742
-
- Reviewed by Pavel Feldman.
-
- * inspector/front-end/Panel.js:
- (WebInspector.Panel): Don't create the sidebar with an argument.
- (WebInspector.Panel.prototype.show): Call updateSidebarWidth.
- (WebInspector.Panel.prototype.handleKeyEvent): Call handleSidebarKeyEvent.
- (WebInspector.Panel.prototype.handleSidebarKeyEvent): Added.
- (WebInspector.Panel.prototype.createSidebar): Renamed from _createSidebar.
- (WebInspector.Panel.prototype._sidebarDragging): Call updateSidebarWidth.
- (WebInspector.Panel.prototype.updateSidebarWidth): Renamed from _updateSidebarWidth.
- (WebInspector.Panel.prototype.setSidebarWidth): Added. Called by updateSidebarWidth.
- (WebInspector.Panel.prototype.updateMainViewWidth): Renamed from setMainViewWidth.
- * inspector/front-end/ProfilesPanel.js:
- (WebInspector.ProfilesPanel): Call createSidebar.
- (WebInspector.ProfilesPanel.prototype.updateMainViewWidth): Renamed from setMainViewWidth.
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel.prototype.show): Remove call to _updateSidebarWidth.
- (WebInspector.ResourcesPanel.prototype.showResource): Call updateSidebarWidth
- (WebInspector.ResourcesPanel.prototype.closeVisibleResource): Ditto.
- (WebInspector.ResourcesPanel.prototype.setSidebarWidth): Added.
- (WebInspector.ResourcesPanel.prototype.updateMainViewWidth): Added.
- * inspector/front-end/StoragePanel.js:
- (WebInspector.StoragePanel): Call createSidebar.
- (WebInspector.StoragePanel.prototype.updateMainViewWidth): Renamed from setMainViewWidth.
- * inspector/front-end/TimelinePanel.js:
- (WebInspector.TimelinePanel): Call createSidebar.
- (WebInspector.TimelinePanel.prototype.updateMainViewWidth): Renamed from setMainViewWidth.
-
-2009-10-24 Timothy Hatcher <timothy@apple.com>
-
- Call updateSelection() in a few places so hovering in the Web Inspector's
- Elements panel always has the correct row selection height.
-
- https://bugs.webkit.org/show_bug.cgi?id=30735
-
- Reviewed by Pavel Feldman.
-
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeElement.prototype.toggleNewAttributeButton): Call updateSelection().
- (WebInspector.ElementsTreeElement.prototype._insertInLastAttributePosition): Ditto.
- * inspector/front-end/inspector.css: Prevent text wrapping in the middle of the add attribute text.
-
-2009-10-24 Timothy Hatcher <timothy@apple.com>
-
- Remove the re-root tree feature from the Web Inspector's
- Elements panel. This feature wasn't super useful and gets
- in the way of double-click to edit.
-
- https://bugs.webkit.org/show_bug.cgi?id=30736
-
- Reviewed by Pavel Feldman.
-
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeElement.prototype.ondblclick):
-
-2009-10-24 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Adam Barth.
-
- Implements ReturnsNew hint for V8 bindings generation code.
- https://bugs.webkit.org/show_bug.cgi?id=30745
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/V8DOMWrapper.h:
- (WebCore::V8DOMWrapper::convertNewNodeToV8Object):
-
-2009-10-24 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Sam Weinig.
-
- Missing images at 350.org due to wrong URLs
- https://bugs.webkit.org/show_bug.cgi?id=30748
-
- Test: fast/dom/HTMLImageElement/parse-src.html
-
- * dom/Element.cpp:
- (WebCore::Element::getURLAttribute): Pass the attribute value through deprecateParseURL().
- This matches what the Objective-C bindings do, as well as what HTMLImageLoader::sourceURI()
- and SVGImageLoader::sourceURI() do.
-
-2009-10-24 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Unreviewed.
-
- [Qt] Build fix for QtWebKit after r50013.
-
- * WebCore.pro:
-
-2009-10-24 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- [V8] Fix up to accommodate for HTMLAllCollection changes in
- http://trac.webkit.org/changeset/49998.
-
- * WebCore.gypi:
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
-
-2009-10-23 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Alexey Proskuryakov.
-
- <rdar://problem/7294131> Assertion failure in AuthenticationMac at
- mac(const Credential&) after authenticating to MobileMe Gallery movie
-
- * platform/network/Credential.cpp:
- (WebCore::Credential::Credential): Initialize m_persistence.
- (WebCore::Credential::isEmpty): Made this method const.
- * platform/network/Credential.h:
- * platform/network/mac/AuthenticationMac.mm:
- (WebCore::mac): Return nil if the Credential is empty.
-
-2009-10-23 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <https://bugs.webkit.org/show_bug.cgi?id=30617>.
- Web Inspector: Resources Scope Bar Should Allow Combinations.
-
- Refactor the filtering in ResourcePanel to make it match ConsoleView,
- and add a divider between All, and the other choices of Resource types.
-
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel):
- (WebInspector.ResourcesPanel.prototype.filter):
- (WebInspector.ResourcesPanel.prototype._updateFilter):
- * inspector/front-end/inspector.css:
-
-2009-10-23 Chris Evans <cevans@chromium.org>
-
- Reviewed by Adam Barth.
-
- Ignore the Refresh header if we're in view source mode.
-
- https://bugs.webkit.org/show_bug.cgi?id=27239
-
- Test: http/tests/security/view-source-no-refresh.html
-
- * loader/FrameLoader.cpp: ignore Refresh in view-source mode.
-
-2009-10-23 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Sam Weinig.
-
- https://bugs.webkit.org/show_bug.cgi?id=30734
- Remove XMLTokenizer::m_currentNodeIsReferenced
-
- No change in behavior, no tests.
-
- * dom/XMLTokenizer.cpp:
- (WebCore::XMLTokenizer::setCurrentNode):
- * dom/XMLTokenizer.h:
- Don't store a boolean for the current node being the document - we can always check for that.
-
- * dom/XMLTokenizerLibxml2.cpp:
- (WebCore::XMLTokenizer::XMLTokenizer):
- * dom/XMLTokenizerQt.cpp:
- (WebCore::XMLTokenizer::XMLTokenizer):
- A fragment passed to XMLTokenizer is never null - in fact, the first thing we do is dereference
- it unconditionally, and then begin checking it for null, as if it could help.
-
-2009-10-23 Beth Dakin <bdakin@apple.com>
-
- No review since this is a build fix.
-
- Build fix for the Mac. (Build is only broken when SVG filters are
- enabled.)
-
- Labelled these function static.
- * platform/graphics/filters/FEComponentTransfer.cpp:
- (WebCore::identity):
- (WebCore::table):
- (WebCore::discrete):
- (WebCore::linear):
- (WebCore::gamma):
- * platform/graphics/filters/FEGaussianBlur.cpp:
- (WebCore::boxBlur):
-
-2009-10-23 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Implement a Timeline panel.
-
- https://bugs.webkit.org/show_bug.cgi?id=30725
-
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * inspector/front-end/Images/timelineIcon.png: Added.
- * inspector/front-end/TimelineAgent.js:
- (WebInspector.addItemToTimeline):
- (WebInspector.timelineProfilerWasStarted):
- (WebInspector.timelineProfilerWasStopped):
- * inspector/front-end/TimelinePanel.js: Added.
- (WebInspector.TimelinePanel):
- (WebInspector.TimelinePanel.prototype.toolbarItemClass.get toolbarItemLabel):
- (WebInspector.TimelinePanel.prototype.get statusBarItems):
- (WebInspector.TimelinePanel.prototype.handleKeyEvent):
- (WebInspector.TimelinePanel.prototype.timelineWasStarted):
- (WebInspector.TimelinePanel.prototype.timelineWasStopped):
- (WebInspector.TimelinePanel.prototype.addItemToTimeline):
- (WebInspector.TimelinePanel.prototype._innerAddItemToTimeline):
- (WebInspector.TimelinePanel.prototype._toggleTimelineButton):
- (WebInspector.TimelinePanel.prototype.setMainViewWidth):
- (WebInspector.TimelinePanel.prototype.getItemTypeName):
- (WebInspector.TimelineRecordTreeElement):
- (WebInspector.TimelineRecordTreeElement.prototype.onattach):
- * inspector/front-end/WebKit.qrc:
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.html:
- * inspector/front-end/inspector.js:
- (WebInspector._createPanels):
-
-2009-10-23 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Clash Between Search's onkeyup and incremental search events
- https://bugs.webkit.org/show_bug.cgi?id=30731
-
- * inspector/front-end/inspector.js:
- (WebInspector.performSearch): prevent incremental search event from clobbering a forced search
-
-2009-10-23 Kelly Norton <knorton@google.com>
-
- Reviewed by Pavel Feldman.
-
- Removes the need for C++ Timeline types in InspectorTimelineAgent in favor
- of ScriptObjects.
- https://bugs.webkit.org/show_bug.cgi?id=30707
-
- * GNUmakefile.am:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * inspector/DOMDispatchTimelineItem.cpp: Removed.
- * inspector/DOMDispatchTimelineItem.h: Removed.
- * inspector/InspectorTimelineAgent.cpp:
- (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
- (WebCore::InspectorTimelineAgent::willDispatchDOMEvent):
- (WebCore::InspectorTimelineAgent::didDispatchDOMEvent):
- (WebCore::InspectorTimelineAgent::willLayout):
- (WebCore::InspectorTimelineAgent::didLayout):
- (WebCore::InspectorTimelineAgent::willRecalculateStyle):
- (WebCore::InspectorTimelineAgent::didRecalculateStyle):
- (WebCore::InspectorTimelineAgent::willPaint):
- (WebCore::InspectorTimelineAgent::didPaint):
- (WebCore::InspectorTimelineAgent::willWriteHTML):
- (WebCore::InspectorTimelineAgent::didWriteHTML):
- (WebCore::InspectorTimelineAgent::reset):
- (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
- (WebCore::InspectorTimelineAgent::pushCurrentTimelineItem):
- * inspector/InspectorTimelineAgent.h:
- (WebCore::InspectorTimelineAgent::TimelineItemEntry::TimelineItemEntry):
- * inspector/TimelineItem.cpp: Removed.
- * inspector/TimelineItem.h: Removed.
- * inspector/TimelineItemFactory.cpp: Added.
- (WebCore::TimelineItemFactory::createGenericTimelineItem):
- (WebCore::TimelineItemFactory::createDOMDispatchTimelineItem):
- * inspector/TimelineItemFactory.h: Added.
- (WebCore::):
- (WebCore::TimelineItemFactory::TimelineItemFactory):
-
-2009-10-23 Gavin Barraclough <barraclough@apple.com>
-
- Reviewed by Geoff Garen.
-
- https://bugs.webkit.org/show_bug.cgi?id=30729
- Provide private API to request the global context for a specific world.
- Used to initialize parameters on the global object.
-
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::globalObject):
- * bindings/js/ScriptController.h:
-
-2009-10-23 Steve Block <steveblock@google.com>
-
- Reviewed by Eric Seidel.
-
- Fixes style problems in Android-specific files.
- https://bugs.webkit.org/show_bug.cgi?id=30717
-
- Style changes only, no new tests possible.
-
- * page/android/EventHandlerAndroid.cpp: Modified.
- (WebCore::EventHandler::passMouseDownEventToWidget): Fixes whitespace in method signature.
- (WebCore::EventHandler::passSubframeEventToSubframe): Fixes whitespace in method signature.
- (WebCore::EventHandler::passWheelEventToWidget): Fixes whitespace in method signature.
- (WebCore::EventHandler::passMouseMoveEventToSubframe): Fixes whitespace in method signature.
- * platform/android/ClipboardAndroid.h: Modified. Fixes header include order and indenting.
- * platform/android/CursorAndroid.cpp: Modified.
- (WebCore::grabCursor): Fixes function braces.
- (WebCore::grabbingCursor): Fixes function braces.
- * platform/android/FileChooserAndroid.cpp: Modified.
- (WebCore::FileChooser::basenameForWidth): Fixes braces on while statement, and updates String::copy to String::threadsafeCopy.
- * platform/android/FileSystemAndroid.cpp: Modified. Fixes header include order.
- (WebCore::unloadModule): Fixes zero test.
- (WebCore::writeToFile): Fixes if statement structure.
- * platform/android/KeyEventAndroid.cpp: Modified.
- (WebCore::windowsKeyCodeForKeyEvent): Fixes switch statement indenting.
- (WebCore::keyIdentifierForAndroidKeyCode): Fixes switch statement indenting.
- * platform/android/ScreenAndroid.cpp: Modified. Fixes header include order and switch statement indenting.
- * platform/android/TemporaryLinkStubs.cpp: Modified. Fixes header include order.
-
-2009-10-23 Sam Weinig <sam@webkit.org>
-
- Another shot at a fixed build.
-
- * DerivedSources.cpp:
-
-2009-10-23 Sam Weinig <sam@webkit.org>
-
- Another shot at a fixed build.
-
- * html/HTMLOptionsCollection.idl:
-
-2009-10-23 Brady Eidson <beidson@apple.com>
-
- 50,000!
-
- * ChangeLog: Point out revision 50,000.
-
-2009-10-23 Sam Weinig <sam@webkit.org>
-
- Reviewed by Anders Carlsson.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=30695
- Drop .tags() support from HTMLCollection
-
- - Make .tags() only work for HTMLAllCollections in JS. .tags() is still
- available for all HTMLCollection like objects in Objective-C since that
- is API.
- - Auto-generate HTMLAllCollection.
-
- Test: fast/dom/HTMLDocument/document-all.html
-
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSHTMLAllCollection.cpp: Removed.
- * bindings/js/JSHTMLAllCollection.h: Removed.
- * bindings/js/JSHTMLAllCollectionCustom.cpp: Added.
- (WebCore::getNamedItems):
- (WebCore::callHTMLAllCollection):
- (WebCore::JSHTMLAllCollection::getCallData):
- (WebCore::JSHTMLAllCollection::canGetItemsForName):
- (WebCore::JSHTMLAllCollection::nameGetter):
- (WebCore::JSHTMLAllCollection::item):
- (WebCore::JSHTMLAllCollection::namedItem):
- * bindings/js/JSHTMLCollectionCustom.cpp:
- (WebCore::toJS):
- * bindings/js/JSHTMLDocumentCustom.cpp:
- * bindings/scripts/CodeGeneratorJS.pm:
- * dom/Document.cpp:
- (WebCore::Document::all):
- * dom/Document.h:
- * dom/HTMLAllCollection.idl: Removed.
- * html/HTMLAllCollection.cpp: Added.
- (WebCore::HTMLAllCollection::create):
- (WebCore::HTMLAllCollection::HTMLAllCollection):
- (WebCore::HTMLAllCollection::~HTMLAllCollection):
- * html/HTMLAllCollection.h: Added.
- * html/HTMLAllCollection.idl: Added.
- * html/HTMLCollection.h:
- * html/HTMLCollection.idl:
- * html/HTMLDocument.idl:
- * page/DOMWindow.idl:
-
-2009-10-23 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: pull basic sidebar implementation into the Panel.
-
- https://bugs.webkit.org/show_bug.cgi?id=30720
-
- * inspector/front-end/Panel.js:
- (WebInspector.Panel):
- (WebInspector.Panel.prototype.jumpToPreviousSearchResult):
- (WebInspector.Panel.prototype.handleKeyEvent):
- (WebInspector.Panel.prototype._createSidebar):
- (WebInspector.Panel.prototype._startSidebarDragging):
- (WebInspector.Panel.prototype._sidebarDragging):
- (WebInspector.Panel.prototype._endSidebarDragging):
- (WebInspector.Panel.prototype._updateSidebarWidth):
- (WebInspector.Panel.prototype.setCenterViewWidth):
- * inspector/front-end/ProfilesPanel.js:
- (WebInspector.ProfilesPanel):
- (WebInspector.ProfilesPanel.prototype.setCenterViewWidth):
- * inspector/front-end/StoragePanel.js:
- (WebInspector.StoragePanel):
- (WebInspector.StoragePanel.prototype.setCenterViewWidth):
-
-2009-10-23 Jens Alfke <snej@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Slight optimizations to object returning and exception handling in generated V8 bindings.
- https://bugs.webkit.org/show_bug.cgi?id=30599
-
- * bindings/scripts/CodeGeneratorV8.pm: Generate better code
- * bindings/v8/V8DOMWrapper.h:
- (WebCore::V8DOMWrapper::convertToV8Object): Added overload that takes a Ref<>
- * bindings/v8/custom/V8InspectorBackendCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL): Remove unnecessary template param to prevent compile error
-
-2009-10-23 Alpha Lam <hclam@chromium.org>
-
- Reviewed by Eric Carlson.
-
- Volume slider always starts at half volume
- https://bugs.webkit.org/show_bug.cgi?id=28322
-
- Sets the value attribute of volume slider to the volume attribute
- of the media element. Also update the value attribute of the
- input element for the volume slider when the volume attribute
- of the media element is updated.
-
- Test: media/video-volume-slider.html
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlVolumeSliderElement::update):
- Set the value attribute of the input element for the volume slider
- using the current volume of the media element.
- * rendering/MediaControlElements.h:
- Add method definition of update().
- * rendering/RenderMedia.cpp:
- (WebCore::RenderMedia::createVolumeSlider):
- Creates a volume slider with value attribute equals to the current
- volume attribute of the media element.
-
-2009-10-23 Evan Martin <evan@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Chrome Linux: fix caret positioning in LTR complex languages
- The caret is positioned off by one in languages like Thai.
-
- https://bugs.webkit.org/show_bug.cgi?id=28284
-
- A group of us spent a while trying various approaches to write a test
- for this; however, since it is only that the blinking cursor is
- displayed incorrectly, we concluded it can not be tested.
-
- (Patch by Hironori Bono.)
-
- * platform/graphics/chromium/FontLinux.cpp:
- (WebCore::Font::selectionRectForComplexText):
-
-2009-10-23 Tony Chang <tony@chromium.org>
-
- Reviewed by David Levin.
-
- Fix Chromium build after IsoldatedWorld change (r49963).
- https://bugs.webkit.org/show_bug.cgi?id=30719
-
- * bindings/ScriptControllerBase.cpp:
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::executeScriptInIsolatedWorld):
- * bindings/v8/ScriptController.cpp:
- (WebCore::mainThreadNormalWorld):
- * bindings/v8/ScriptController.h:
- (WebCore::ScriptController::windowShell):
- (WebCore::ScriptController::existingWindowShell):
- * dom/Document.cpp:
- (WebCore::Document::createWrapperCache):
- * dom/ScriptExecutionContext.cpp:
- * dom/ScriptExecutionContext.h:
- * xml/XMLHttpRequest.cpp:
- * xml/XMLHttpRequest.h:
-
-2009-10-23 Xiaomei Ji <xji@chromium.org>
-
- Reviewed by Sam Weinig.
-
- Fix caretRangeFromPoint()/elementFromPoint() returns wrong result
- for a zoomed and scrolled page.
- https://bugs.webkit.org/show_bug.cgi?id=30689.
-
- The real cause is the wrong calculation of event.clientX/Y when
- page is zoomed and scolled.
- After Sam fixed the event.clientX/Y in r49551, the hit test point
- should be recalculated (revert r49490).
-
- Test: fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll.html
-
- * dom/Document.cpp:
- (WebCore::Document::elementFromPoint): calculate the correct point
- relative to document when page is zoomed and scrolled.
- (WebCore::Document::caretRangeFromPoint): calculate the correct point
- relative to document when page is zoomed and scrolled.
-
-2009-10-22 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dmitry Titov.
-
- Adding a class that allows us to enable/disable features at
- runtime. Adding a flag to enable database support.
-
- https://bugs.webkit.org/show_bug.cgi?id=30653
-
- * WebCore.gypi:
- * bindings/v8/RuntimeEnabledFeatures.cpp: Added.
- * bindings/v8/RuntimeEnabledFeatures.h: Added.
- (WebCore::RuntimeEnabledFeatures::setDatabaseEnabled):
- (WebCore::RuntimeEnabledFeatures::databaseEnabled):
- (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::ACCESSOR_RUNTIME_ENABLER):
- * page/DOMWindow.idl:
-
-2009-10-23 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Inspector injects _inspectorCommandLineAPI into global object when opened
- https://bugs.webkit.org/show_bug.cgi?id=30675
-
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.getCompletions):
- (InjectedScript._evaluateOn):
- (InjectedScript.addInspectedNode):
- (InjectedScript._ensureCommandLineAPIInstalled): Moved _inspectorCommandLineAPI from window to console.
-
-2009-10-23 Janne Koskinen <janne.p.koskinen@digia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] don't undef NULL in Symbian emulator
-
- npapi.h way of defining mwerks compiler,__intel__
- and win32 are all true for Symbian emulator.
- Changed the definions so that NULL won't be undefined
- when compiling for Symbian emulator nor target HW.
-
- * bridge/npapi.h:
-
-2009-10-23 Janne Koskinen <janne.p.koskinen@digia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] Correct linking of sqlite3 for Symbian
- https://bugs.webkit.org/show_bug.cgi?id=30569
-
- ".lib" will try to include library as static library
- causing the library to be searched from wrong directory and if found
- will be statically linked instead of the inteded dynamic linking.
-
- * WebCore.pro:
-
-2009-10-23 Enrica Casucci <enrica@apple.com>
-
- Reviewed by Adele Peterson.
-
- REGRESSION: Copy is copying incorrect background-color
- <rdar://problem/7248529>
- https://bugs.webkit.org/show_bug.cgi?id=29697
-
- Test: editing/execCommand/indent-paragraphs.html
-
- This change removes the BackgroundColor from the list
- of inheritable CSS properties and changes significantly
- the way we perform indentation.
- The new implementation of IndentOutdentCommand uses a new method
- defined in CompositeEditCommand called moveParagraphWithClones.
- This is an improved version of the original moveParagraph that
- is aimed at preserving the original markup of the paragraph being
- moved.
-
- * editing/ApplyStyleCommand.cpp:
- (WebCore::): removed CSSPropertyBackgroundColor from editingStyleProperties.
- * editing/CompositeEditCommand.cpp:
- (WebCore::CompositeEditCommand::CompositeEditCommand): Removed trailing blanks.
- (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): Removed trailing blanks.
- (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement): Added.
- (WebCore::CompositeEditCommand::cleanupAfterDeletion): Added.
- (WebCore::CompositeEditCommand::moveParagraphWithClones): Added.
- (WebCore::CompositeEditCommand::moveParagraphs): Modified to use cleanupAfterDeletion.
- (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Removed trailing blanks.
- (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph): Removed trailing blanks.
- (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary): Removed trailing blanks.
- * editing/CompositeEditCommand.h: Added three new methods.
- * editing/IndentOutdentCommand.cpp:
- (WebCore::IndentOutdentCommand::tryIndentingAsListItem): Changed to use moveParagraphWithClones.
- (WebCore::IndentOutdentCommand::indentIntoBlockquote): Changed to use moveParagraphWithClones.
- (WebCore::IndentOutdentCommand::indentRegion): Removed comment.
- * editing/IndentOutdentCommand.h: Removed prepareBlockquoteLevelForInsertion method.
-
-2009-10-23 Steve Block <steveblock@google.com>
-
- Reviewed by Eric Seidel.
-
- Adds missing UnusedParam.h includes, required when INSPECTOR is not enabled.
- https://bugs.webkit.org/show_bug.cgi?id=30677
-
- Build fix, no new tests required.
-
- * page/Console.cpp: Modified. Added UnusedParam.h include.
- * workers/WorkerContext.cpp: Modified. Added UnusedParam.h include.
-
-2009-10-23 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Holger Freyther.
-
- [Qt] Plugins : Use window's winId() instead of the widget's.
-
- As per, https://developer.mozilla.org/en/NPN_GetValue
- NPNVnetscapeWindow on Unix/X11: "Gets the browser toplevel window in which the
- plug-in is displayed; returns Window".
-
- The issue was found because NPNVNetscapeWindow winId() ends up creating
- a native window resulting in flicker.
-
- https://bugs.webkit.org/show_bug.cgi?id=30706
-
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::getValue):
-
-2009-10-23 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Holger Freyther.
-
- [Qt] Windowless Plugins : Don't use m_clipRect when painting.
-
- Though it works, it is not correct to use m_clipRect for painting
- in Windowless mode. Instead, the rect paramater that is passed
- as a part of PluginView::paint() must be used. This change will
- also result in some speedup since previously we used to paint all
- the visible parts of a windowless plugin (even if those parts were
- not dirty).
-
- Also, fix invalidateRect() to compute the correct width and height.
-
- https://bugs.webkit.org/show_bug.cgi?id=30711
-
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::paint):
- (WebCore::PluginView::invalidateRect):
-
-2009-10-21 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Holger Freyther.
-
- Plugins : Use test.swf in the plugins manual tests.
-
- They previously referenced youtube videos which among other things are
- cumbersome to use without internet connection. The old youtube link is
- just commented out so that testing with youtube can be done with
- little effort.
-
- https://bugs.webkit.org/show_bug.cgi?id=30662
-
- * manual-tests/plugins/test.swf: Copied from LayoutTests/fast/replaced/resources/test.swf.
- * manual-tests/plugins/windowed.html:
- * manual-tests/plugins/windowless.html:
- * manual-tests/qt/plugin-sibling-frame-include.html:
-
-2009-10-23 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Jon Honeycutt.
-
- Fix the Windows Release build by moving Accessibility files
- into all-in-one file and excluding them from the build.
-
- * WebCore.vcproj/WebCore.vcproj:
- * accessibility/AccessibilityAllInOne.cpp: Added.
-
-2009-10-16 Gavin Barraclough <barraclough@apple.com>
-
- Reviewed by Sam Weinig & Geoff Garen.
-
- https://bugs.webkit.org/show_bug.cgi?id=30696
- Add support for IsolatedWorlds to JSC bindings.
-
- An IsolatedWorld is basically a parallel, separate copy of the window shells and DOM wrapper objects for
- a given document. To support isolation this patch:
-
- * Adds support to the ScriptController to track multiple window shells, one per world.
- * Adds support to Document to support multiple separate wrapper-maps, one per world.
- * Replaces the single global DOM wrapper map (on the WebCoreJSClientData) with separate maps,
- stored on the (new) IsolatedWorld objects.
-
- In addition to supporting separate copies of these objects, two other features are supported:
-
- * It is necessary to track the current world on entry into JSC, so that within callbacks out to WebCore
- we can determine which world (and as such, set of DOM bindings) we should be operating on.
- * EventListeners & Callbacks are run in the world they were registered in.
- This requires the handler to retain a reference to the world.
-
- No new tests. (Enabled existing isolated world layout tests.)
-
- * WebCore.base.exp:
- * bindings/js/JSAbstractWorkerCustom.cpp:
- (WebCore::JSAbstractWorker::addEventListener):
- (WebCore::JSAbstractWorker::removeEventListener):
- * bindings/js/JSCallbackData.cpp:
- (WebCore::JSCallbackData::invokeCallback):
- * bindings/js/JSCallbackData.h:
- (WebCore::JSCallbackData::JSCallbackData):
- * bindings/js/JSCustomXPathNSResolver.cpp:
- (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
- * bindings/js/JSDOMApplicationCacheCustom.cpp:
- (WebCore::JSDOMApplicationCache::addEventListener):
- (WebCore::JSDOMApplicationCache::removeEventListener):
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::removeWrappers):
- (WebCore::DOMObjectWrapperMap::get):
- (WebCore::DOMObjectWrapperMap::set):
- (WebCore::DOMObjectWrapperMap::remove):
- (WebCore::DOMObjectWrapperMap::take):
- (WebCore::IsolatedWorld::IsolatedWorld):
- (WebCore::IsolatedWorld::~IsolatedWorld):
- (WebCore::EnterIsolatedWorld::EnterIsolatedWorld):
- (WebCore::EnterIsolatedWorld::~EnterIsolatedWorld):
- (WebCore::JSGlobalDataWorldIterator::JSGlobalDataWorldIterator):
- (WebCore::JSGlobalDataWorldIterator::operator bool):
- (WebCore::JSGlobalDataWorldIterator::operator*):
- (WebCore::JSGlobalDataWorldIterator::operator->):
- (WebCore::JSGlobalDataWorldIterator::operator++):
- (WebCore::getCurrentWorld):
- (WebCore::getNormalWorld):
- (WebCore::commonNormalWorld):
- (WebCore::commonCurrentWorld):
- (WebCore::DOMObjectHashTableMap::mapFor):
- (WebCore::DOMObjectWrapperMap::mapFor):
- (WebCore::forgetDOMObject):
- (WebCore::getCachedDOMNodeWrapper):
- (WebCore::forgetDOMNode):
- (WebCore::cacheDOMNodeWrapper):
- (WebCore::forgetAllDOMNodesForDocument):
- (WebCore::forgetWorldOfDOMNodesForDocument):
- (WebCore::isObservableThroughDOM):
- (WebCore::markDOMNodesForDocument):
- (WebCore::markActiveObjectsForContext):
- (WebCore::takeWrappers):
- (WebCore::updateDOMNodeDocument):
- (WebCore::markDOMObjectWrapper):
- (WebCore::allowsAccessFromFrame):
- (WebCore::printErrorMessageForFrame):
- (WebCore::JSC_DebuggerCallFrame_evaluateInWorld):
- (WebCore::JSC_callInWorld):
- (WebCore::JSC_constructInWorld):
- (WebCore::JSC_evaluateInWorld):
- * bindings/js/JSDOMBinding.h:
- (WebCore::IsolatedWorld::rememberDocument):
- (WebCore::IsolatedWorld::forgetDocument):
- (WebCore::IsolatedWorld::rememberScriptController):
- (WebCore::IsolatedWorld::forgetScriptController):
- (WebCore::DOMObjectHashTableMap::~DOMObjectHashTableMap):
- (WebCore::DOMObjectHashTableMap::get):
- (WebCore::WebCoreJSClientData::WebCoreJSClientData):
- (WebCore::WebCoreJSClientData::currentWorld):
- (WebCore::WebCoreJSClientData::normalWorld):
- (WebCore::WebCoreJSClientData::rememberWorld):
- (WebCore::WebCoreJSClientData::forgetWorld):
- (WebCore::debuggerWorld):
- (WebCore::pluginWorld):
- * bindings/js/JSDOMGlobalObject.cpp:
- (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
- (WebCore::toJSDOMGlobalObject):
- * bindings/js/JSDOMGlobalObject.h:
- * bindings/js/JSDOMWindowBase.cpp:
- (WebCore::JSDOMWindowBase::printErrorMessage):
- (WebCore::JSDOMWindowBase::commonJSGlobalData):
- (WebCore::toJS):
- (WebCore::toJSDOMWindow):
- * bindings/js/JSDOMWindowBase.h:
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::createWindow):
- (WebCore::JSDOMWindow::open):
- (WebCore::JSDOMWindow::showModalDialog):
- (WebCore::JSDOMWindow::setTimeout):
- (WebCore::JSDOMWindow::setInterval):
- (WebCore::JSDOMWindow::addEventListener):
- (WebCore::JSDOMWindow::removeEventListener):
- * bindings/js/JSDOMWindowShell.cpp:
- (WebCore::toJS):
- (WebCore::toJSDOMWindowShell):
- * bindings/js/JSDOMWindowShell.h:
- * bindings/js/JSDesktopNotificationsCustom.cpp:
- (WebCore::JSNotification::addEventListener):
- (WebCore::):
- * bindings/js/JSEventListener.cpp:
- (WebCore::JSEventListener::JSEventListener):
- (WebCore::JSEventListener::handleEvent):
- (WebCore::JSEventListener::reportError):
- * bindings/js/JSEventListener.h:
- (WebCore::JSEventListener::create):
- * bindings/js/JSEventSourceCustom.cpp:
- (WebCore::JSEventSource::addEventListener):
- (WebCore::JSEventSource::removeEventListener):
- * bindings/js/JSEventTarget.cpp:
- (WebCore::toJS):
- * bindings/js/JSHTMLDocumentCustom.cpp:
- (WebCore::JSHTMLDocument::open):
- * bindings/js/JSHTMLFrameSetElementCustom.cpp:
- (WebCore::JSHTMLFrameSetElement::nameGetter):
- * bindings/js/JSInspectorBackendCustom.cpp:
- (WebCore::JSInspectorBackend::databaseForId):
- (WebCore::JSInspectorBackend::inspectedWindow):
- (WebCore::JSInspectorBackend::nodeForId):
- * bindings/js/JSLazyEventListener.cpp:
- (WebCore::JSLazyEventListener::JSLazyEventListener):
- (WebCore::JSLazyEventListener::parseCode):
- * bindings/js/JSLazyEventListener.h:
- (WebCore::JSLazyEventListener::create):
- * bindings/js/JSMessageChannelCustom.cpp:
- (WebCore::JSMessageChannel::markChildren):
- * bindings/js/JSMessagePortCustom.cpp:
- (WebCore::JSMessagePort::markChildren):
- (WebCore::JSMessagePort::addEventListener):
- (WebCore::JSMessagePort::removeEventListener):
- * bindings/js/JSNodeCustom.cpp:
- (WebCore::JSNode::addEventListener):
- (WebCore::JSNode::removeEventListener):
- (WebCore::JSNode::markChildren):
- * bindings/js/JSNodeFilterCondition.cpp:
- (WebCore::JSNodeFilterCondition::acceptNode):
- * bindings/js/JSQuarantinedObjectWrapper.cpp:
- (WebCore::JSQuarantinedObjectWrapper::construct):
- (WebCore::JSQuarantinedObjectWrapper::call):
- * bindings/js/JSSVGElementInstanceCustom.cpp:
- (WebCore::JSSVGElementInstance::addEventListener):
- (WebCore::JSSVGElementInstance::removeEventListener):
- * bindings/js/JSSharedWorkerCustom.cpp:
- (WebCore::JSSharedWorker::markChildren):
- * bindings/js/JSWebSocketCustom.cpp:
- (WebCore::JSWebSocket::addEventListener):
- (WebCore::JSWebSocket::removeEventListener):
- * bindings/js/JSWorkerContextCustom.cpp:
- (WebCore::JSWorkerContext::addEventListener):
- (WebCore::JSWorkerContext::removeEventListener):
- (WebCore::JSWorkerContext::setTimeout):
- (WebCore::JSWorkerContext::setInterval):
- * bindings/js/JSXMLHttpRequestConstructor.cpp:
- (WebCore::constructXMLHttpRequest):
- * bindings/js/JSXMLHttpRequestCustom.cpp:
- (WebCore::JSXMLHttpRequest::markChildren):
- (WebCore::JSXMLHttpRequest::addEventListener):
- (WebCore::JSXMLHttpRequest::removeEventListener):
- * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
- (WebCore::JSXMLHttpRequestUpload::markChildren):
- (WebCore::JSXMLHttpRequestUpload::addEventListener):
- (WebCore::JSXMLHttpRequestUpload::removeEventListener):
- * bindings/js/ScheduledAction.cpp:
- (WebCore::ScheduledAction::create):
- (WebCore::ScheduledAction::ScheduledAction):
- (WebCore::ScheduledAction::executeFunctionInContext):
- (WebCore::ScheduledAction::execute):
- * bindings/js/ScheduledAction.h:
- (WebCore::ScheduledAction::ScheduledAction):
- * bindings/js/ScriptCachedFrameData.cpp:
- (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
- (WebCore::ScriptCachedFrameData::restore):
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::~ScriptController):
- (WebCore::ScriptController::evaluateInWorld):
- (WebCore::ScriptController::evaluate):
- (WebCore::ScriptController::evaluateInIsolatedWorld):
- (WebCore::ScriptController::clearWindowShell):
- (WebCore::ScriptController::initScript):
- (WebCore::ScriptController::processingUserGestureEvent):
- (WebCore::ScriptController::attachDebugger):
- (WebCore::ScriptController::updateDocument):
- (WebCore::ScriptController::bindingRootObject):
- (WebCore::ScriptController::createRootObject):
- (WebCore::ScriptController::windowScriptNPObject):
- (WebCore::ScriptController::jsObjectForPluginElement):
- * bindings/js/ScriptController.h:
- (WebCore::ScriptController::windowShell):
- (WebCore::ScriptController::existingWindowShell):
- (WebCore::ScriptController::globalObject):
- (WebCore::ScriptController::forgetWorld):
- * bindings/js/ScriptControllerMac.mm:
- (WebCore::ScriptController::windowScriptObject):
- * bindings/js/ScriptEventListener.cpp:
- (WebCore::createAttributeEventListener):
- * bindings/js/ScriptFunctionCall.cpp:
- (WebCore::ScriptFunctionCall::call):
- (WebCore::ScriptFunctionCall::construct):
- * bindings/js/ScriptObjectQuarantine.cpp:
- (WebCore::getQuarantinedScriptObject):
- * bindings/js/ScriptState.cpp:
- (WebCore::scriptStateFromNode):
- (WebCore::scriptStateFromPage):
- * bindings/js/ScriptState.h:
- * bindings/js/WorkerScriptController.cpp:
- (WebCore::WorkerScriptController::WorkerScriptController):
- (WebCore::WorkerScriptController::evaluate):
- * bindings/objc/DOMInternal.mm:
- (-[WebScriptObject _initializeScriptDOMNodeImp]):
- * bindings/objc/WebScriptObject.mm:
- (-[WebScriptObject callWebScriptMethod:withArguments:]):
- (-[WebScriptObject evaluateWebScript:]):
- * bindings/scripts/CodeGeneratorJS.pm:
- * bridge/NP_jsobject.cpp:
- (_NPN_InvokeDefault):
- (_NPN_Invoke):
- (_NPN_Evaluate):
- (_NPN_Construct):
- * bridge/jni/jni_jsobject.mm:
- (JavaJSObject::call):
- (JavaJSObject::eval):
- * dom/Document.cpp:
- (WebCore::Document::createWrapperCache):
- * dom/Document.h:
- (WebCore::Document::wrapperCacheMap):
- (WebCore::Document::getWrapperCache):
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::startUserInitiatedProfiling):
- (WebCore::InspectorController::stopUserInitiatedProfiling):
- * inspector/JavaScriptCallFrame.cpp:
- (WebCore::JavaScriptCallFrame::evaluate):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::dispatchWindowObjectAvailable):
- * platform/network/mac/AuthenticationMac.mm:
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::XMLHttpRequest):
- (WebCore::XMLHttpRequest::dropProtection):
- * xml/XMLHttpRequest.h:
- (WebCore::XMLHttpRequest::create):
-
-2009-10-22 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: EventListenersSidebarPane TODO No Longer Needed
- https://bugs.webkit.org/show_bug.cgi?id=30705
-
- * inspector/front-end/EventListenersSidebarPane.js:
-
-2009-10-22 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Tim Hatcher.
-
- https://bugs.webkit.org/show_bug.cgi?id=30506
- <rdar://problem/7319845> Resources that the server sent as 304 not modified are not shown
- in the inspectors resource pane
-
- I don't know how to make a test for this.
-
- The issue here was that preloaded resources weren't added to DocLoader document resource set,
- but Web Inspector asked DocLoader to fetch data from CachedResource. Even when (if) document
- parser eventually requested the same resource for real and it got added to resource set, it
- was too late - the Inspector wasn't updated.
-
- * inspector/InspectorResource.cpp:
- (WebCore::InspectorResource::cachedResource):
- (WebCore::InspectorResource::type):
- (WebCore::InspectorResource::resourceData):
- * inspector/InspectorResource.h:
- Fix the issue by trying to fetch corresponding CachedResource harder - also look in global
- cache. This seems safe, and easier than updating the Inspector on transitions between
- resource states (revalidate vs. revalidate done and preload vs. non-preload).
-
-2009-10-22 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Fix for <rdar://problem/6942706> ER: Add a CSS property that allows
- shadows to work for SVG content
- -and corresponding-
- https://bugs.webkit.org/show_bug.cgi?id=30479
-
- This patch adds a new SVG-specific CSS property called -webkit-
- shadow that has the same syntax as -webkit-box-shadow
-
- Add CSSPropertyWebkitShadow to the list of SVG CSS properties, and
- make valueForShadow a member function rather than a static function
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::):
- (WebCore::CSSComputedStyleDeclaration::valueForShadow):
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
- * css/CSSComputedStyleDeclaration.h:
-
- Call valueForShadow for CSSPropertyWebkitShadow
- * css/SVGCSSComputedStyleDeclaration.cpp:
- (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
-
- Do standard CSS stuff for CSSPropertyWebkitShadow
- * css/SVGCSSParser.cpp:
- (WebCore::CSSParser::parseSVGValue):
- * css/SVGCSSPropertyNames.in:
- * css/SVGCSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applySVGProperty):
-
- Set the appropriate shadow on the paint context if we have one.
- This seems to be all we have to do to have an SVG-shaped shadow.
- * rendering/SVGRenderSupport.cpp:
- (WebCore::SVGRenderBase::prepareToRenderSVGContent):
-
- Add shadow to SVGRenderStyle. I added a new macro that I don't like
- just because that's the way things are done here right now.
- * rendering/style/SVGRenderStyle.cpp:
- (WebCore::SVGRenderStyle::SVGRenderStyle):
- (WebCore::SVGRenderStyle::operator==):
- * rendering/style/SVGRenderStyle.h:
- * rendering/style/SVGRenderStyleDefs.cpp:
- (StyleShadowSVGData::StyleShadowSVGData):
- (StyleShadowSVGData::operator==):
- * rendering/style/SVGRenderStyleDefs.h:
- (WebCore::StyleShadowSVGData::create):
- (WebCore::StyleShadowSVGData::copy):
- (WebCore::StyleShadowSVGData::operator!=):
-
-2009-10-22 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=25530
- [Gtk] Implement LABEL_FOR/LABELLED_BY relationship pair for labels
-
- Implements atk_object_ref_relation_set and LABEL_FOR/LABELLED_BY.
- Also causes the accessible name for labeled controls to be based on
- the label as expected, rather than based on the contents.
-
- * accessibility/AccessibilityRenderObject.h:
- * accessibility/AccessibilityRenderObject.cpp:
- (correspondingLabelForControlElement):
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (setAtkRelationSetFromCoreObject):
- (webkit_accessible_ref_relation_set):
- (webkit_accessible_class_init):
- (webkit_accessible_get_name):
-
-2009-10-22 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: windowFocused and windowBlured Fail to Clear/Mark Inspector as "inactive"
- https://bugs.webkit.org/show_bug.cgi?id=30663
-
- Correctly handle focusing/blurring on inner <iframe>'s such as Source Frames.
-
- * inspector/front-end/inspector.js:
- (WebInspector.windowFocused): fix for inner iframes
- (WebInspector.windowBlurred): fix for inner iframes
- (WebInspector.addMainEventListeners): change useCapture to false
-
-2009-10-22 Jaime Yap <jaimeyap@google.com>
-
- Reviewed by Timothy Hatcher.
-
- Makes a page reload optional when activating resource monitoring in
- InspectorController. It leaves the default behavior as performing the reload.
- Reload is an optional param so callsites do not have to change.
-
- https://bugs.webkit.org/show_bug.cgi?id=30684
-
- No new tests added.
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::enableResourceTracking):
- * inspector/InspectorController.h:
-
-2009-10-22 Shu Chang <Chang.Shu@nokia.com>
-
- Reviewed by Eric Seidel.
-
- [Qt] Fix memory leak in QNetworkReplyHandler::abort().
- In QNetworkReplyHandler::release(), m_reply should no longer point to its parent
- after being released.
- https://bugs.webkit.org/show_bug.cgi?id=30167
-
- No layout test available as a non-functional fix.
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::abort):
- (WebCore::QNetworkReplyHandler::release):
-
-2009-10-22 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Fix DOMAgent leak.
-
- https://bugs.webkit.org/show_bug.cgi?id=30615
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::~InspectorController):
- (WebCore::InspectorController::setFrontendProxyObject):
- (WebCore::InspectorController::close):
- (WebCore::InspectorController::releaseDOMAgent):
- * inspector/InspectorController.h:
- * inspector/InspectorDOMAgent.h:
- (WebCore::InspectorDOMAgent::create):
-
-2009-10-22 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Adam Barth.
-
- [V8] Rework event listeners to not hold references to frame or V8 context.
-
- https://bugs.webkit.org/show_bug.cgi?id=30648
-
- Covered by existing layout tests: fast/events/attribute-listener*
-
- * bindings/scripts/CodeGeneratorV8.pm: Added passing ScriptExecutionContext*
- to event listener handling code.
- * bindings/v8/DateExtension.cpp:
- (WebCore::DateExtension::setAllowSleep): Changed to use currentContext().
- * bindings/v8/ScriptEventListener.cpp:
- (WebCore::createAttributeEventListener): Reworked to match JSC logic.
- (WebCore::getEventListenerHandlerBody): Added ScriptExecutionContext* param.
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::V8AbstractEventListener): Removed Frame* param
- and usage.
- (WebCore::V8AbstractEventListener::handleEvent): Chaged to use ScriptExecutionContext*.
- (WebCore::V8AbstractEventListener::invokeEventHandler): Ditto.
- * bindings/v8/V8AbstractEventListener.h:
- (WebCore::V8AbstractEventListener::getListenerObject): Ditto.
- (WebCore::V8AbstractEventListener::prepareListenerObject): Ditto.
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::convertEventListenerToV8Object): Added ScriptExecutionContext* param.
- (WebCore::V8DOMWrapper::getEventListener): Ditto.
- * bindings/v8/V8DOMWrapper.h:
- (WebCore::V8DOMWrapper::convertEventListenerToV8Object): Ditto.
- * bindings/v8/V8EventListenerList.h:
- (WebCore::V8EventListenerList::findOrCreateWrapper): Removed ContextType* template param,
- because it's no longer needed.
- * bindings/v8/V8IsolatedWorld.h:
- (WebCore::V8IsolatedWorld::sharedContext): Renamed from shared_context.
- * bindings/v8/V8LazyEventListener.cpp:
- (WebCore::V8LazyEventListener::V8LazyEventListener): Removed Frame* param and usage.
- (WebCore::V8LazyEventListener::callListenerFunction): Added ScriptExecutionContext* param.
- (WebCore::V8LazyEventListener::prepareListenerObject): Ditto.
- * bindings/v8/V8LazyEventListener.h:
- (WebCore::V8LazyEventListener::create): Reordered params to match JSC impl.
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::V8Proxy): Adjusted formatting to match WebKit style.
- (WebCore::V8Proxy::evaluateInNewContext): Changed to use m_context directly.
- (WebCore::V8Proxy::setInjectedScriptContextDebugId): Ditto.
- (WebCore::V8Proxy::createWrapperFromCacheSlowCase): Ditto.
- (WebCore::V8Proxy::isContextInitialized): Ditto.
- (WebCore::V8Proxy::updateDocumentWrapperCache): Ditto.
- (WebCore::V8Proxy::clearDocumentWrapperCache): Ditto.
- (WebCore::V8Proxy::disposeContextHandles): Added explicit disposing of m_context.
- (WebCore::V8Proxy::clearForClose): Changed to use m_context directly.
- (WebCore::V8Proxy::clearForNavigation): Ditto.
- (WebCore::V8Proxy::setSecurityToken): Ditto.
- (WebCore::V8Proxy::updateDocument): Ditto.
- (WebCore::V8Proxy::initContextIfNeeded): Ditto.
- (WebCore::V8Proxy::context): Changed to use v8::Local.
- (WebCore::V8Proxy::mainWorldContext): Changed to use m_context directly.
- (WebCore::V8Proxy::setContextDebugId): Ditto.
- (WebCore::toV8Context):
- * bindings/v8/V8Proxy.h: Removed shared_context decl, changed to use straight
- v8::Persistent for m_context.
- * bindings/v8/V8WorkerContextEventListener.cpp:
- (WebCore::workerProxy): Added.
- (WebCore::V8WorkerContextEventListener::V8WorkerContextEventListener): Removed
- WorkerContextExecutionProxy* param.
- (WebCore::V8WorkerContextEventListener::handleEvent): Started using ScriptExecutionContext*.
- (WebCore::V8WorkerContextEventListener::reportError): Ditto.
- (WebCore::V8WorkerContextEventListener::callListenerFunction): Ditto.
- (WebCore::V8WorkerContextEventListener::getReceiverObject): Ditto.
- * bindings/v8/V8WorkerContextEventListener.h:
- (WebCore::V8WorkerContextEventListener::create): Removed
- WorkerContextExecutionProxy* param.
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::WorkerContextExecutionProxy::findOrCreateEventListener): Removed ContextType*
- template param.
- * bindings/v8/custom/V8CustomEventListener.cpp:
- (WebCore::V8EventListener::V8EventListener): Removed Frame* param.
- (WebCore::V8EventListener::getListenerFunction): Started using ScriptExecutionContext*.
- (WebCore::V8EventListener::callListenerFunction): Ditto.
- * bindings/v8/custom/V8CustomEventListener.h:
- (WebCore::V8EventListener::create): Removed Frame* param.
-
-2009-10-14 Gaurav Shah <gauravsh@google.com>
-
- Reviewed by Darin Fisher.
-
- Replaces temporary link stub for <keygen> tag handler for the Chromium
- browser with a call via the Chromium Bridge.
-
- https://bugs.webkit.org/show_bug.cgi?id=30360
-
- * platform/SSLKeyGenerator.h:
- * platform/chromium/ChromiumBridge.h:
- * platform/chromium/SSLKeyGeneratorChromium.cpp:
- (WebCore::getSupportedKeySizes):
- (WebCore::signedPublicKeyAndChallengeString):
- * platform/chromium/TemporaryLinkStubs.cpp:
- (WebCore::KURL::fileSystemPath):
- (WebCore::SharedBuffer::createWithContentsOfFile):
-
-2009-10-22 Avi Drissman <avi@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Fixes Chromium Mac pasteboard handling to flow through the same code paths as other platforms.
-
- https://bugs.webkit.org/show_bug.cgi?id=30591
-
- * platform/chromium/ChromiumBridge.h:
- * platform/chromium/PasteboardChromium.cpp:
- (WebCore::Pasteboard::writeImage):
-
-2009-10-20 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Darin Adler.
-
- Make accelerated compositing debug indicators work in release builds
- https://bugs.webkit.org/show_bug.cgi?id=30588
-
- Allow some debug indicators, that show which page elements go into compositing layers,
- to work in release builds, when the runtime prefs are set.
-
- * platform/graphics/GraphicsLayer.cpp:
- (WebCore::GraphicsLayer::GraphicsLayer):
- (WebCore::GraphicsLayer::setZPosition):
- * platform/graphics/GraphicsLayer.h:
- * platform/graphics/mac/GraphicsLayerCA.h:
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::clearBorderColor):
- (WebCore::GraphicsLayer::showRepaintCounter):
- (WebCore::GraphicsLayerCA::GraphicsLayerCA):
- (WebCore::GraphicsLayerCA::updateMasksToBounds):
- (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
- (WebCore::GraphicsLayerCA::setDebugBorder):
- (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
- (WebCore::GraphicsLayerCA::setupContentsLayer):
- * platform/graphics/mac/WebLayer.mm:
-
-2009-10-22 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Pavel Feldman.
-
- Inspector should support monitorEvents/un monitorEvents() in the command line
- https://bugs.webkit.org/show_bug.cgi?id=19879
-
- * inspector/front-end/EventListenersSidebarPane.js:
- (WebInspector.EventListenersSidebarPane.prototype.update.callback): Ignores event listeners generated by monitorEvent
- * inspector/front-end/InjectedScript.js:
- (InjectedScript._ensureCommandLineAPIInstalled): Added _inspectorCommandLineAPI._logEvent, _allEventTypes,
- _normalizeEventTypes, monitorEvent, unmonitorEvent.
-
-2009-10-21 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Pavel Feldman.
-
- Web Inspector: windowFocused and windowBlurred Fail to Clear/Mark Inspector as "inactive"
- https://bugs.webkit.org/show_bug.cgi?id=30663
-
- * inspector/front-end/inspector.js:
- (WebInspector.windowFocused):
- (WebInspector.windowBlurred):
-
-2009-10-22 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Pavel Feldman.
-
- Web Inspector: Error - requestContentType [undefined] is not an object
- https://bugs.webkit.org/show_bug.cgi?id=30666
-
- * inspector/front-end/ResourceView.js:
- (WebInspector.ResourceView.prototype._refreshFormData):
-
-2009-10-22 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Holger Freyther.
-
- [Haiku] Correction of the accented letter width (they were 2 characters long).
- https://bugs.webkit.org/show_bug.cgi?id=30629
-
- * platform/graphics/haiku/SimpleFontDataHaiku.cpp:
- (WebCore::SimpleFontData::platformWidthForGlyph):
-
-2009-10-21 Jon Honeycutt <jhoneycutt@apple.com>
-
- <rdar://problem/7270320> Screenshots of off-screen plug-ins are blank
- <rdar://problem/7270314> After halting a transparent PluginView on
- Windows, the transparency is applied twice
-
- Replace use of Frame::nodeImage() with a function that takes a snapshot
- of a PluginView.
-
- Reviewed by Dan Bernstein.
-
- * plugins/PluginView.h:
- Made paintWindowedPluginIntoContext() non-const, as it now calls
- paintIntoTransformedContext(). Declare paintIntoTransformedContext()
- and snapshot() for Windows platforms.
-
- * plugins/win/PluginViewWin.cpp:
- (WebCore::PluginView::paintIntoTransformedContext):
- Paints into the passed HDC without applying any coordinate translations.
- Code moved from paintWindowedPluginIntoContext() and paint(). Removed
- the memset() of windowpos in lieu of assignment.
- (WebCore::PluginView::paintWindowedPluginIntoContext):
- Code moved to paintIntoTransformedContext().
- (WebCore::PluginView::paint):
- Ditto.
- (WebCore::PluginView::snapshot):
- Create a context, and if the plug-in is windowless, translate it so the
- plug-in will draw at the correct location. Create a bitmap, and select
- it into the context. Paint the plug-in, and create a BitmapImage from
- the bitmap.
- (WebCore::PluginView::halt):
- Use snapshot().
-
-2009-10-22 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- Fix calculation of length in WebSocketChannel.cpp
- https://bugs.webkit.org/show_bug.cgi?id=30656
-
- * websockets/WebSocketChannel.cpp:
- (WebCore::WebSocketChannel::didReceiveData):
-
-2009-10-21 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Adding the ability to enable/disable functions in V8 at runtime.
-
- https://bugs.webkit.org/show_bug.cgi?id=30650
-
- * bindings/scripts/CodeGeneratorV8.pm:
-
-2009-10-21 Darin Adler <darin@apple.com>
-
- Swedish search (and other languages as well) is broken while fixing Japanese search
- https://bugs.webkit.org/show_bug.cgi?id=30646
-
- Rolled Japanese tailoring out that was done to fix
- https://bugs.webkit.org/show_bug.cgi?id=30437 earlier.
- It was overriding the locale-specific tailoring.
- We'll land a fix once we figure out how to add the
- Japanese tailoring without removing anything.
-
- * editing/TextIterator.cpp: Rolled out r49924.
-
-2009-10-21 Pavel Feldman <pfeldman@chromium.org>
-
- Not reviewed: chromium build fix - add missing image to gypi.
-
- * WebCore.gypi:
-
-2009-10-21 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Eric Seidel.
-
- Fixes part of <http://webkit.org/b/30522>.
- Web Inspector: DOM Exceptions throughout the Inspector should be more human readable.
-
- Expose the description attribute that is now a member of
- ExceptionBase as of r49723, so when a user logs an exception, they
- can see the description in the Web Inspector.
-
- Test: fast/dom/dom-exception-description.html
-
- * dom/DOMCoreException.idl:
- * dom/EventException.idl:
- * dom/RangeException.idl:
- * svg/SVGException.idl:
- * xml/XMLHttpRequestException.idl:
- * xml/XPathException.idl:
-
-2009-10-21 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <https://bugs.webkit.org/show_bug.cgi?id=30616>.
- REGRESSION (r49036): Web Inspector: Summary graph no longer switching to size summary.
-
- Add a check to make sure a function we need to calculate percentages is
- defined before we use it.
-
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel.prototype._updateGraphDividersIfNeeded):
-
-2009-10-21 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- REGRESSION: Clicking on nodes in the console should take you to the element in the DOM
- https://bugs.webkit.org/show_bug.cgi?id=27231
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype._formatnode): Turns on ElementsTreeOutline.showInElementsPanelEnabled
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeOutline): Added ElementsTreeOutline.showInElementsPanelEnabled
- (WebInspector.ElementsTreeElement.prototype.onmousedown): Reveals the node in the Elements panel if
- treeOutline.showInElementsPanelEnabled is true.
-
-2009-10-21 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=30637
- Fix a compiler warning in windows.
-
- * loader/ResourceLoadNotifier.h:
-
-2009-10-21 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by Darin Adler.
-
- Fix the crash when a node not in a document receives dispatchEvent.
- https://bugs.webkit.org/show_bug.cgi?id=30611
-
- Test: fast/events/dispatch-event-no-document.html
-
- * dom/EventTarget.cpp: Check for scriptExecutionContext() at the moment of dispatchEvent; do nothing if no context.
- (WebCore::EventTarget::dispatchEvent):
-
-2009-10-21 Adam Langley <agl@google.com>
-
- Reviewed by Eric Seidel.
-
- Chromium Linux: disable subpixel text on layers.
-
- https://bugs.webkit.org/show_bug.cgi?id=30635
- http://code.google.com/p/chromium/issues/detail?id=25365
-
- With the addition of layers for drawing rounded corners in r49641,
- subpixel text on rounded rectangles broke. This is because the layer
- only contains a single alpha channel and this is insufficient to
- compose subpixel text correctly.
-
- On Windows, a large body of code in TransparencyWin.cpp exists to try
- to deal with this. Even then, in some cases, it downgrades to
- anti-aliased text. We need a fix for the grevious effects quickly thus
- this patch disables subpixel text when rendering into a layer.
-
- This would be covered by existing tests except that subpixel text is
- disabled for pixel tests on Chromium Linux.
-
- * platform/graphics/chromium/FontLinux.cpp:
- (WebCore::isCanvasMultiLayered):
- (WebCore::adjustTextRenderMode):
- (WebCore::Font::drawGlyphs):
- (WebCore::Font::drawComplexText):
-
-2009-10-21 Kevin Ollivier <kevino@theolliviers.com>
-
- wxMac 10.4 build fix, make sure we specify the Sqlite3 dependency correctly as otherwise
- it will use the sqlite3 system library rather than WebCoreSQLite3.
-
- * wscript:
-
-2009-10-21 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Sam Weinig.
-
- Fixed background-clip parsing regressions introduced in r46240.
-
- Test: fast/css/background-clip-text.html
-
- * css/CSSParser.cpp:
- (WebCore::parseBackgroundClip): Added this helper method.
- (WebCore::CSSParser::parseFillShorthand): Use parseBackgroundClip() to
- reparse the value. The old code called parseFillProperty() again, which
- didn’t work, because parseFillProperty() advances the value list.
- (WebCore::CSSParser::parseFillProperty): Changed to use
- parseBackgroundClip().
- * css/CSSPrimitiveValueMappings.h:
- (WebCore::CSSPrimitiveValue::operator EFillBox): Added a case for
- CSSValueWebkitText.
-
-2009-10-21 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Enable creation of custom SidebarTreeElements for different ProfileTypes
-
- ProfileTypes can now create sidebar tree elements of custom types.
- https://bugs.webkit.org/show_bug.cgi?id=30520
-
- * inspector/front-end/ProfileView.js:
- (WebInspector.CPUProfileType.prototype.setRecordingProfile):
- (WebInspector.CPUProfileType.prototype.createSidebarTreeElementForProfile):
- (WebInspector.CPUProfileType.prototype.createView):
- (WebInspector.CPUProfile.prototype.get head):
- * inspector/front-end/ProfilesPanel.js:
- (WebInspector.ProfileType.prototype.buttonClicked):
- (WebInspector.ProfileType.prototype.viewForProfile):
- (WebInspector.ProfileType.prototype.createView):
- (WebInspector.ProfileType.prototype.createSidebarTreeElementForProfile):
- (WebInspector.ProfilesPanel.prototype.addProfileHeader):
- (WebInspector.ProfilesPanel.prototype.showProfile):
-
-2009-10-20 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Selectors in the Styles pane should trigger a search for that selector when clicked
- https://bugs.webkit.org/show_bug.cgi?id=17126
-
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.prototype.addNodesToSearchResult): only change focusedDOMNode on a manual search
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylePropertiesSection.prototype._clickSelector): trigger a search
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeElement.prototype._startEditing): correctly start editing attribute value instead of name
-
-2009-10-20 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Fix DOM Agent leak.
-
- https://bugs.webkit.org/show_bug.cgi?id=30615
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::~InspectorController):
-
-2009-10-21 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Holger Freyther.
-
- Plugins: Create manual tests for testing plugins
-
- Create two test files:
- 1. windowed.html - Test plugin in windowed mode.
- 2. windowless.html - Test plugin in windowless mode.
-
- https://bugs.webkit.org/show_bug.cgi?id=30503
-
- * manual-tests/plugins/windowed.html: Added.
- * manual-tests/plugins/windowless.html: Added.
-
-2009-10-21 Satoshi Nakagawa <psychs@limechat.net>
-
- Reviewed by Darin Adler.
-
- Fixed Japanese text search problems.
- Treat small kana letters and kana letters as different characters in search.
- Do not ignore diacritic marks in search for Japanese texts.
-
- https://bugs.webkit.org/show_bug.cgi?id=30437
-
- Test: fast/text/international/japanese-kana-letters.html
-
- * editing/TextIterator.cpp:
- (WebCore::createCollator):
- (WebCore::collator):
- (WebCore::createSearcher):
-
-2009-10-20 Eric Z. Ayers <zundel@google.com>
-
- Reviewed by Timothy Hatcher.
-
- Changes TimelineItems to be created with raw timestamps as opposed
- to a time relative to a start of session. Normalized timestamps cause
- problems when monitoring a browsing session across multiple page
- transitions.
-
- * inspector/InspectorTimelineAgent.cpp:
- (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
- (WebCore::InspectorTimelineAgent::willDispatchDOMEvent):
- (WebCore::InspectorTimelineAgent::willLayout):
- (WebCore::InspectorTimelineAgent::willRecalculateStyle):
- (WebCore::InspectorTimelineAgent::willPaint):
- (WebCore::InspectorTimelineAgent::willWriteHTML):
- (WebCore::InspectorTimelineAgent::reset):
- (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
- * inspector/InspectorTimelineAgent.h:
-
-2009-10-20 Mark Rowe <mrowe@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Fix leak of WebSocketChannel by adopting the newly-created reference.
-
- * websockets/WebSocketChannel.h:
- (WebCore::WebSocketChannel::create):
-
-2009-10-20 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Adam Barth.
-
- DOM Storage runtime flag changes
- https://bugs.webkit.org/show_bug.cgi?id=30602
-
- Part 1/2. Removing sessionStorageEnabled in next patch after the
- Chromium side of the changes lands.
-
- Revert my changes to Settings and instead implement DOM Storage enabling via
- the methods agreed upon in https://bugs.webkit.org/show_bug.cgi?id=30240
-
- This stuff was (intentionally) never exposed to web pages or DRT, so there's no
- LayoutTest visible changes and thus no tests.
-
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::ACCESSOR_RUNTIME_ENABLER):
- * page/DOMWindow.idl:
- * storage/Storage.cpp:
- (WebCore::Storage::setLocalStorageAvailable):
- (WebCore::Storage::localStorageAvailable):
- (WebCore::Storage::setSessionStorageAvailable):
- (WebCore::Storage::sessionStorageAvailable):
- * storage/Storage.h:
-
-2009-10-20 John Gregg <johnnyg@google.com>
-
- Reviewed by David Levin.
-
- Need to turn off notifications properly at runtime
- https://bugs.webkit.org/show_bug.cgi?id=30409
-
- This code only affects chromium, and is all behind a compile time
- flag current turned off, so no new tests.
-
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::ACCESSOR_RUNTIME_ENABLER):
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::ACCESSOR_RUNTIME_ENABLER):
- * notifications/NotificationCenter.cpp:
- (WebCore::NotificationCenter::setIsAvailable):
- (WebCore::NotificationCenter::isAvailable):
- * notifications/NotificationCenter.h:
- * page/DOMWindow.idl:
- * workers/WorkerContext.idl:
-
-2009-10-20 James Robinson <jamesr@chromium.org>
-
- Reviewed by Adam Barth.
-
- Fixes RefPtr initialization in the V8 implementation of WebCore::ScriptString to use the ::create() idiom and
- use adoptRef() properly. I failed to read the RefPtr docs the first time through :(
-
- No new tests, error was caught by valgrind on the Chromium builders.
-
- * bindings/v8/ScriptString.h:
- (WebCore::ScriptString::ScriptString):
- (WebCore::ScriptString::operator=):
- * bindings/v8/ScriptStringImpl.h:
- (WebCore::ScriptStringImpl::create):
-
-2009-10-20 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Web Inspector: populate child nodes before sorting them.
-
- https://bugs.webkit.org/show_bug.cgi?id=29673
-
- * inspector/front-end/BottomUpProfileDataGridTree.js:
- (WebInspector.BottomUpProfileDataGridNode): Swapped with BottomUpProfileDataGridTree to be consistent with TopDownProfileDataGridNode.
- (WebInspector.BottomUpProfileDataGridNode.prototype._takePropertiesFromProfileDataGridNode):
- (WebInspector.BottomUpProfileDataGridNode.prototype._keepOnlyChild):
- (WebInspector.BottomUpProfileDataGridNode.prototype._exclude):
- (WebInspector.BottomUpProfileDataGridNode.prototype._merge):
- (WebInspector.BottomUpProfileDataGridNode.prototype._sharedPopulate):
- (WebInspector.BottomUpProfileDataGridTree.prototype.exclude):
- * inspector/front-end/ProfileDataGridTree.js:
- (WebInspector.ProfileDataGridNode.prototype.sort): Added missing parentheses.
- (WebInspector.ProfileDataGridNode.prototype.get _parent):
- (WebInspector.ProfileDataGridNode.prototype._populate):
- * inspector/front-end/TopDownProfileDataGridTree.js:
- (WebInspector.TopDownProfileDataGridNode.prototype._sharedPopulate):
-
-2009-10-20 Jens Alfke <snej@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Remove redundant String ref/deref calls in generated V8 bindings.
- https://bugs.webkit.org/show_bug.cgi?id=30579
-
- * bindings/v8/V8Binding.h:
- (WebCore::toString): Fix return type of 'toString' to make it truly a no-op
- instead of constructing/destructing a String.
-
-2009-10-20 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=25411
- [GTK] ATK accessible ancestry broken
-
- Work around for the problem of bogus additional objects in the ancestry.
- We now set the parent when we ref the child, then ask the Atk child if
- it knows its parent. This solves the bulk of the cases. For those it
- doesn't, fall back to the existing logic.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (webkit_accessible_get_parent):
- (webkit_accessible_ref_child):
-
-2009-10-20 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Alice Liu.
-
- Fixes <http://webkit.org/b/30421>.
- Web Inpsector: Local Files can show up on Cookies List with Cookies from other Domain.
-
- When a page like Google generates an about:blank, it shows up as a local file on
- the list of Cookie domains, but has all of the cookies of Google. When we are adding
- cookie domains to the inspector, we should only add the domain is the URL of the resource
- is in the HTTP protocol family or a file URL.
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::populateScriptObjects):
- (WebCore::InspectorController::didFinishLoading):
-
-2009-10-20 Mark Mentovai <mark@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Use a version of libWebKitSystemInterface with global symbols marked
- private_extern for Chromium Mac.
-
- https://bugs.webkit.org/show_bug.cgi?id=30590
-
- * WebCore.gyp/WebCore.gyp:
- * WebCore.gyp/mac: Added.
- * WebCore.gyp/mac/Empty.cpp: Added.
- * WebCore.gyp/mac/adjust_visibility.sh: Added.
-
-2009-10-20 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Allow custom memory allocation control for WebCore's CSSProperty
- https://bugs.webkit.org/show_bug.cgi?id=30564
-
- Inherits CSSProperty class from FastAllocBase because it has been
- instantiated by 'new' in WebCore/css/CSSParser.cpp:367.
-
- * css/CSSProperty.h:
-
-2009-10-20 Andrew Scherkus <scherkus@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Hide Chromium's media slider thumb if no source has been loaded.
-
- https://bugs.webkit.org/show_bug.cgi?id=30529
-
- Covered by existing layout tests, notably:
- LayoutTests/media/controls-rendering.html
- LayoutTests/media/unsupported-tracks.html
- LayoutTests/media/video-src-none.html
-
- * rendering/RenderMediaControlsChromium.cpp:
- (WebCore::hasSource): Returns true if an HTMLMediaElement has a valid source set.
- (WebCore::paintMediaMuteButton): Refactored to use hasSource().
- (WebCore::paintMediaPlayButton): Ditto.
- (WebCore::paintMediaSliderThumb): Add call to hasSource() to determine if we should paint the thumb.
-
-2009-10-20 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Adam Barth.
-
- Added getter for FrameLoader:m_suppressOpenerInNewFrame.
- This will allow Chromium to more intelligently detect
- noreferrer links and therefore open them in a new process.
-
- https://bugs.webkit.org/show_bug.cgi?id=30581
-
- * loader/FrameLoader.h:
- (WebCore::FrameLoader::suppressOpenerInNewFrame): Added.
-
-2009-10-20 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's CSSParserFunction
- https://bugs.webkit.org/show_bug.cgi?id=30563
-
- Inherits CSSParserFunction struct from FastAllocBase because it has been
- instantiated by 'new' in WebCore/css/CSSParser.cpp:4827.
-
- * css/CSSProperty.h:
-
-2009-10-20 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Watched Expressions Buttons Do Not Match Inspector Styles
- https://bugs.webkit.org/show_bug.cgi?id=30554
-
- * inspector/front-end/inspector.css: added style to pane buttons
-
-2009-10-20 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Set debug id for contexts of isolated worlds to distinguish them in debugger.
-
- https://bugs.webkit.org/show_bug.cgi?id=30559
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::evaluateInIsolatedWorld):
- (WebCore::V8Proxy::evaluateInNewContext):
- (WebCore::V8Proxy::setInjectedScriptContextDebugId):
- * bindings/v8/V8Proxy.h:
-
-2009-10-20 Andras Becsi <becsi.andras@stud.u-szeged.hu>
-
- Unreviewed buildfix.
- [Qt] Add FEGaussianBlur.h and FEGaussianBlur.cpp which were refactored in r49778 to WebCore.pro.
-
- * WebCore.pro:
-
-2009-10-20 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by David Levin.
-
- Set EnabledAtRuntime for WebSocket in DOMWindow
- https://bugs.webkit.org/show_bug.cgi?id=29896
-
- Supported by chromium/v8 only.
- Add WebSocket::isAvailable()/setIsAvailable(bool) to control v8
- bindings.
- Remove Settings::experimentalWebSocketsEnabled() and
- setExperimentalWebSocketsEnabled(bool).
-
- * WebCore.base.exp:
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::webSocket):
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getConstructor):
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::ACCESSOR_RUNTIME_ENABLER):
- * page/DOMWindow.idl:
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
- * page/Settings.h:
- * websockets/WebSocket.cpp:
- (WebCore::WebSocket::setIsAvailable):
- (WebCore::WebSocket::isAvailable):
- * websockets/WebSocket.h:
-
-2009-10-19 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Sam Weinig.
-
- REGRESSION: Dromaeo DOM test is 14% slower
- https://bugs.webkit.org/show_bug.cgi?id=30273
-
- Whoops, make prototype bindings actually use the StructureFlags.
-
- * bindings/scripts/CodeGeneratorJS.pm:
-
-2009-10-19 James Robinson <jamesr@chromium.org>
-
- Reviewed by Adam Barth.
-
- Better implementation of WebCore::ScriptString for the V8 bindings.
-
- https://bugs.webkit.org/show_bug.cgi?id=29909
-
- WebCore::ScriptString is used for XMLHttpRequest's responseText attribute which is
- shared with JavaScript. Thus, simply using a WebCore::String and copying the value
- is pretty inefficient, especially since responseText is built up with a sequence of
- operator+= calls. JSC builds use a JSC::UString to share the buffer when possible,
- this patch adopts a similar approach for V8.
-
- No new tests, behavior is unchanged and covered by LayoutTests/http/tests/xmlhttprequest
-
- * WebCore.gypi:
- * bindings/v8/ScriptString.h:
- (WebCore::ScriptString::ScriptString):
- (WebCore::ScriptString::operator String):
- (WebCore::ScriptString::isNull):
- (WebCore::ScriptString::size):
- (WebCore::ScriptString::operator=):
- (WebCore::ScriptString::operator+=):
- (WebCore::ScriptString::v8StringOrNull):
- * bindings/v8/ScriptStringImpl.cpp: Added.
- (WebCore::ScriptStringImpl::ScriptStringImpl):
- (WebCore::ScriptStringImpl::~ScriptStringImpl):
- (WebCore::ScriptStringImpl::toString):
- (WebCore::ScriptStringImpl::isNull):
- (WebCore::ScriptStringImpl::size):
- (WebCore::ScriptStringImpl::append):
- * bindings/v8/ScriptStringImpl.h: Added.
- (WebCore::ScriptStringImpl::ScriptStringImpl):
- (WebCore::ScriptStringImpl::v8StringHandle):
- * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
-
-2009-10-19 Adam Barth <abarth@webkit.org>
-
- No review, rolling out r49837.
- http://trac.webkit.org/changeset/49837
-
- * page/Settings.cpp:
- (WebCore::Settings::setStandardFontFamily):
- (WebCore::Settings::setFixedFontFamily):
- (WebCore::Settings::setSerifFontFamily):
- (WebCore::Settings::setSansSerifFontFamily):
- (WebCore::Settings::setCursiveFontFamily):
- (WebCore::Settings::setFantasyFontFamily):
- * page/Settings.h:
- (WebCore::Settings::standardFontFamily):
- (WebCore::Settings::fixedFontFamily):
- (WebCore::Settings::serifFontFamily):
- (WebCore::Settings::sansSerifFontFamily):
- (WebCore::Settings::cursiveFontFamily):
- (WebCore::Settings::fantasyFontFamily):
- * platform/text/UScriptCode.h: Removed.
-
-2009-10-19 Kwang Yul Seo <skyul@company100.net>
-
- Reviewed by Eric Seidel.
-
- Check COMPILER(MSVC) instead of PLATFORM(WIN_OS) to avoid the use of vasprintf.
- https://bugs.webkit.org/show_bug.cgi?id=30473
-
- vasprintf is missing in MSVC. Use COMPILER(MSVC) guards instead of
- PLALTFORM(WIN_OS) guards.
-
- * dom/XMLTokenizerLibxml2.cpp:
- (WebCore::XMLTokenizer::error):
-
-2009-10-19 Jungshik Shin <jshin@chromium.org>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=20797
-
- Make generic font family getters/setters accept an additional
- argument (script code). It has a default value so that if an embedder
- does not have/want a per-script font family setting, call-sites
- don't have to be changed.
- This is to prepare for fixing bug 10874 (font selection is not
- language-dependent) and bug 18085.
-
- There should be no change in layout and no new layout test
- is added.
-
- * WebCore.base.exp:
- * page/Settings.cpp:
- * page/Settings.h:
- * platform/text/UScriptCode.h: Added. This is for ports that
- do not use ICU. the part of ICU's common/unicode/uscript.h
- that defines script code enum was copied. To keep enums compatible
- with those in ICU, we don't generate the list out of Scripts.txt
- of the Unicode Data base or CLDR's data.
-
-2009-10-19 Evan Stade <estade@chromium.org>
-
- Reviewed by Darin Adler.
-
- Clarify usage of SuddenTermination API. No code change.
-
- * platform/SuddenTermination.h:
-
-2009-10-19 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Gavin Barraclough.
-
- REGRESSION: Dromaeo DOM test is 14% slower
- https://bugs.webkit.org/show_bug.cgi?id=30273
-
- Make DOM bindings automatically inherit correct structure
- flags rather than being needlessly conservative. This is
- done by making the bindings generator use the same model
- for TypeInfo flags that we now use in JSC.
-
- This gains us about 1% of this regression back.
-
- * bindings/js/JSDOMBinding.h:
- (WebCore::DOMObjectWithGlobalPointer::createStructure):
- (WebCore::DOMConstructorObject::createStructure):
- * bindings/js/JSDOMWindowShell.h:
- (WebCore::JSDOMWindowShell::createStructure):
- * bindings/js/JSHTMLAllCollection.h:
- (WebCore::JSHTMLAllCollection::createStructure):
- * bindings/js/JSQuarantinedObjectWrapper.h:
- (WebCore::JSQuarantinedObjectWrapper::createStructure):
- * bindings/scripts/CodeGeneratorJS.pm:
- * bridge/objc/objc_runtime.h:
- (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
- * bridge/runtime_array.h:
- (JSC::RuntimeArray::createStructure):
- * bridge/runtime_method.h:
- (JSC::RuntimeMethod::createStructure):
- * bridge/runtime_object.h:
- (JSC::RuntimeObjectImp::createStructure):
-
-2009-10-19 Robin Qiu <robin.qiu@torchmobile.com.cn>
-
- Reviewed by Nikolas Zimmermann.
-
- Fixed a bug on nested SVG <use> elements.
- https://bugs.webkit.org/show_bug.cgi?id=26117
- When a <use> element refer to another <use> element which has
- child/children, the instance tree built for this <use> element
- is incorrect (more nodes than expected).
-
- Test: svg/dom/use-on-use-with-child.svg
-
- * svg/SVGUseElement.cpp:
- (WebCore::SVGUseElement::buildInstanceTree):
-
-2009-10-19 Oliver Hunt <oliver@apple.com>
-
- Small changes to fully invalidate and update the JavaScriptCallFrame.
-
- <rdar://problem/7020755> JSDebugger crashes after reloading from a breakpoint
- https://bugs.webkit.org/show_bug.cgi?id=27146
-
- Reviewed by Timothy Hatcher.
-
- * inspector/JavaScriptCallFrame.h:
- (WebCore::JavaScriptCallFrame::invalidate):
- (WebCore::JavaScriptCallFrame::update):
-
-2009-10-19 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Dmitri Titov.
-
- Remove "source" from storage events
- https://bugs.webkit.org/show_bug.cgi?id=30536
-
- Remove "source" from storage events per
- http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-October/023703.html
-
- This was removed because it makes it introduces synchronous access that can
- cross the event loop boundry (since a storage event can fire from one process
- and be handled in another).
-
- * inspector/InspectorDOMStorageResource.cpp:
- (WebCore::InspectorDOMStorageResource::handleEvent):
- * storage/StorageEvent.cpp:
- (WebCore::StorageEvent::create):
- (WebCore::StorageEvent::StorageEvent):
- (WebCore::StorageEvent::initStorageEvent):
- * storage/StorageEvent.h:
- (WebCore::StorageEvent::uri):
- * storage/StorageEvent.idl:
- * storage/StorageEventDispatcher.cpp:
- (WebCore::StorageEventDispatcher::dispatch):
-
-2009-10-19 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Remove ResourceLoadNotifier::activeDocumentLoader
- https://bugs.webkit.org/show_bug.cgi?id=30533
-
- Removing this method from ResourceLoadNotifier better decouples the
- notifier from FrameLoader.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
- (WebCore::FrameLoader::requestFromDelegate):
- * loader/ResourceLoadNotifier.cpp:
- (WebCore::ResourceLoadNotifier::didReceiveResponse):
- * loader/ResourceLoadNotifier.h:
- * loader/ResourceLoader.cpp:
- (WebCore::ResourceLoader::willSendRequest):
-
-2009-10-19 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Move sendRemainingDelegateMessages to ResourceLoadNotifier
- https://bugs.webkit.org/show_bug.cgi?id=30531
-
- This method is about notifying folks and doesn't interact with the rest
- of FrameLoader.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::willLoadMediaElementURL):
- (WebCore::FrameLoader::commitProvisionalLoad):
- (WebCore::FrameLoader::loadResourceSynchronously):
- (WebCore::FrameLoader::loadedResourceFromMemoryCache):
- * loader/FrameLoader.h:
- * loader/ResourceLoadNotifier.cpp:
- (WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages):
- * loader/ResourceLoadNotifier.h:
-
-2009-10-19 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Bypass popup blocker using click event
- https://bugs.webkit.org/show_bug.cgi?id=21501
-
- Keep track of which events were generated by JavaScript and use that
- inforation when figuring out if we're processing a user gesture.
-
- Test: http/tests/security/popup-blocked-from-fake-event.html
-
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::processingUserGestureEvent):
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::processingUserGesture):
- * dom/Document.cpp:
- (WebCore::Document::createEvent):
- * dom/Event.cpp:
- (WebCore::Event::Event):
- * dom/Event.h:
- (WebCore::Event::createdByDOM):
- (WebCore::Event::setCreatedByDOM):
-
-2009-10-19 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Darin Adler.
-
- Fixing a typo.
-
- https://bugs.webkit.org/show_bug.cgi?id=30543
-
- * platform/sql/SQLiteDatabase.h:
-
-2009-10-19 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by Darin Adler.
-
- Manual Test for crash caused by JS accessing DOMWindow which is disconnected from the Frame.
- https://bugs.webkit.org/show_bug.cgi?id=30544
-
- * manual-tests/crash-on-accessing-domwindow-without-frame.html: Added.
-
-2009-10-19 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Darin Adler.
-
- Flash at end of opacity/transform transition sometimes
- https://bugs.webkit.org/show_bug.cgi?id=30501
-
- When a transition finishes, there window of time between when the animation is
- removed, and the final style set on the GraphicsLayer. This caused the layer to revert
- to its old appearance for one or two frames. To avoid this, we set the final
- transform or opacity at the start of the transition; we know that the animation
- will override the final value for as long as its running.
-
- No test because this is a very transient effect that can't be captured
- in a test.
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::createGraphicsLayer):
- (WebCore::RenderLayerBacking::updateLayerOpacity):
- (WebCore::RenderLayerBacking::updateLayerTransform):
- (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
- (WebCore::RenderLayerBacking::startTransition):
- * rendering/RenderLayerBacking.h:
-
-2009-10-19 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Add more stop characters into console completions.
-
- https://bugs.webkit.org/show_bug.cgi?id=30477
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype.completions):
- (WebInspector.ConsoleView.prototype._reportCompletions):
-
-2009-10-19 Marshall Culpepper <mculpepper@appcelerator.com>
-
- Reviewed by Adam Roben.
-
- implemented ClipboardWin::files()
- https://bugs.webkit.org/show_bug.cgi?id=29666
-
- * platform/win/ClipboardWin.cpp:
- (WebCore::ClipboardWin::files):
-
-2009-10-19 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- Add support for link relations in HTMLAnchorElement and implement rel="noreferrer".
-
- https://bugs.webkit.org/show_bug.cgi?id=28986
-
- Tests: http/tests/navigation/no-referrer-reset.html
- http/tests/navigation/no-referrer-same-window.html
- http/tests/navigation/no-referrer-subframe.html
- http/tests/navigation/no-referrer-target-blank.html
-
- * WebCore.base.exp: Update FrameLoader::loadFrameRequest export symbol
- * html/HTMLAnchorElement.cpp: Add support for link relations and implement noreferrer
- (WebCore::HTMLAnchorElement::HTMLAnchorElement):
- (WebCore::HTMLAnchorElement::defaultEventHandler):
- (WebCore::HTMLAnchorElement::parseMappedAttribute):
- (WebCore::HTMLAnchorElement::hasRel):
- (WebCore::HTMLAnchorElement::setRel):
- * html/HTMLAnchorElement.h: Add support for link relations and implement noreferrer
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::FrameLoader):
- (WebCore::FrameLoader::createWindow):
- (WebCore::FrameLoader::changeLocation):
- (WebCore::FrameLoader::urlSelected): Add parameter for referrer policy
- (WebCore::FrameLoader::loadFrameRequest): Add parameter for referrer policy
- (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Suppress opener if requested by ReferrerPolicy
- * loader/FrameLoader.h: Update urlSelected and loadFrameRequest prototypes
- * loader/FrameLoaderTypes.h: Add enum for referrer policy
- * loader/RedirectScheduler.cpp:
- (WebCore::RedirectScheduler::timerFired):
- * page/ContextMenuController.cpp:
- (WebCore::ContextMenuController::contextMenuItemSelected): Update call to urlSelected()
- * svg/SVGAElement.cpp:
- (WebCore::SVGAElement::defaultEventHandler): Update call to urlSelected()
-
-
-2009-10-19 Alpha Lam <hclam@chromium.org>
-
- Reviewed by Dimitri Glazkov (dglazkov@chromium.org).
-
- [v8] typeof(HTMLMediaElement) should return undefined if media
- engine is not available
- https://bugs.webkit.org/show_bug.cgi?id=30343
-
- Check for availability of the media engine to disable
- HTMLMediaElement, HTMLAudioElement, HTMLVideoElement, MediaError
- in runtime.
-
- Try runs and review in Chromium:
- http://codereview.chromium.org/276011
-
- Test: manual-tests/chromium/media-player-not-available.html
-
- The above test can work work in Chromium. Testing procedures:
- 1. Remove all media support libraries in Chromium (e.g. ffmpeg libraries)
- 2. Open Chromium with above test page
- 3. Verify the test results according to the test page
-
- * bindings/v8/custom/V8CustomBinding.h:
- Declare enabler methods.
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- Report enabled only if media player is available.
- * manual-tests/chromium/media-player-not-available.html: Added.
- Manual test, following instruction in this test for procedures.
- * page/DOMWindow.idl:
- Mark HTMLMediaElement, HTMLAudioElement, HTMLVideElement, MediaError
- as enabled at runtime.
-
-2009-10-19 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by David Hyatt.
-
- Refactor out some of the code in paint() into paintPanScrollIcon()
- and paintScrollbars() in preparation of some Qt API changes.
-
- * platform/ScrollView.cpp:
- (WebCore::ScrollView::paint):
- * platform/ScrollView.h:
-
-2009-10-19 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Adam Roben.
-
- Make the local static panScrollIcon into a Image* instead
- of a RefPtr<Image>.
-
- * platform/ScrollView.cpp:
- (WebCore::ScrollView::wheelEvent):
-
-2009-10-19 Andrew Scherkus <scherkus@chromium.org>
-
- Reviewed by David Levin.
-
- Forcefully set antialiasing for Chromium media controls.
-
- https://bugs.webkit.org/show_bug.cgi?id=30521
-
- Before it was nondeterministiacally being enabled based on the previous state of GraphicsContext.
-
- Covered by existing layout tests.
-
- * rendering/RenderMediaControlsChromium.cpp:
- (WebCore::paintMediaSlider): Added setShouldAntialias(true).
-
-2009-10-19 Jens Alfke <jens@mooseyard.com>
-
- Reviewed by Darin Adler.
-
- Optimize string upper/lowercasing
- https://bugs.webkit.org/show_bug.cgi?id=30261
-
- - Added AtomicString::upper() and lower()
- - Further optimized StringImpl::lower()
- - Removed StringImpl::isLower()
- - Added QualifiedName::localNameUpper(), which is cached, thereby saving
- thousands of upper() calls and string allocations.
-
- * dom/Element.cpp:
- (WebCore::Element::setAttribute): Call AtomicString::lower()
- * dom/QualifiedName.cpp:
- (WebCore::QualifiedName::localNameUpper): New method
- * dom/QualifiedName.h: Added localNameUpper() method
- * dom/StyledElement.cpp:
- (WebCore::StyledElement::parseMappedAttribute): Call AtomicString::lower()
- * html/HTMLDocument.cpp:
- (WebCore::HTMLDocument::createElement): Call AtomicString::lower()
- * html/HTMLElement.cpp:
- (WebCore::HTMLElement::nodeName): Call localNameUpper()
- * platform/text/AtomicString.cpp:
- (WebCore::AtomicString::lower): New method
- (WebCore::AtomicString::upper): New method
- * platform/text/AtomicString.h: Added lower() and upper()
- * platform/text/StringImpl.cpp: Removed isLower()
- (WebCore::StringImpl::lower): Further optimization of initial loop
- * platform/text/StringImpl.h: Removed isLower()
-
-2009-10-19 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Adam Barth.
-
- If a call to a plugin's invokeMethod, invokeDefault or construct
- returns false, throw an exception into JS.
-
- https://bugs.webkit.org/show_bug.cgi?id=30239
-
- Test: plugins/netscape-invoke-failure.html
-
- * bindings/v8/V8NPObject.cpp: Check return values of invokeMethod, invokeDefault and construct.
- (npObjectInvokeImpl):
- * bridge/c/c_instance.cpp:
- (JSC::Bindings::CInstance::invokeMethod): Check return value
- (JSC::Bindings::CInstance::invokeDefaultMethod): Check return value
- (JSC::Bindings::CInstance::invokeConstruct): Check return value
-
-2009-10-16 Stephen White <senorblanco@chromium.org>
-
- Reviewed by Adam Barth.
-
- Fix for chromium/skia canvas arc start/end positions, when the arc is
- >= 360 degrees.
- https://bugs.webkit.org/show_bug.cgi?id=30449
-
- Covered by new test:
- LayoutTests/fast/canvas/arc360.html
-
- * platform/graphics/skia/PathSkia.cpp:
- (WebCore::Path::addArc):
-
-2009-10-19 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- Fix uninitialized variable reference in Element::removeAttribute().
- https://bugs.webkit.org/show_bug.cgi?id=30502
-
- * dom/Element.cpp:
- (WebCore::Element::removeAttribute):
+ * platform/graphics/transforms/TransformationMatrix.h:
+ (WebCore::TransformationMatrix::isIdentityOrTranslation):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelScaleData::RenderBoxModelScaleData):
+ (WebCore::RenderBoxModelScaleData::~RenderBoxModelScaleData):
+ (WebCore::RenderBoxModelScaleData::hiqhQualityRepaintTimer):
+ (WebCore::RenderBoxModelScaleData::size):
+ (WebCore::RenderBoxModelScaleData::setSize):
+ (WebCore::RenderBoxModelScaleData::lastPaintTime):
+ (WebCore::RenderBoxModelScaleData::setLastPaintTime):
+ (WebCore::RenderBoxModelScaleData::useLowQualityScale):
+ (WebCore::RenderBoxModelScaleData::transform):
+ (WebCore::RenderBoxModelScaleData::setTransform):
+ (WebCore::RenderBoxModelScaleData::setUseLowQualityScale):
+ (WebCore::RenderBoxModelScaleObserver::boxModelObjectDestroyed):
+ (WebCore::RenderBoxModelScaleObserver::highQualityRepaintTimerFired):
+ (WebCore::RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality):
+ (WebCore::RenderBoxModelObject::highQualityRepaintTimerFired):
+ (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
+ (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+ * rendering/RenderBoxModelObject.h:
-2009-10-19 Eric Carlson <eric.carlson@apple.com>
+2010-01-31 Dirk Schulze <krit@webkit.org>
Reviewed by Simon Fraser.
- https://bugs.webkit.org/show_bug.cgi?id=30463
- Remove HTML5 media element 'loadend' event
-
- * dom/EventNames.h:
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::parseMappedAttribute): Remove 'loadend'.
- (WebCore::HTMLMediaElement::loadInternal): Ditto.
- (WebCore::HTMLMediaElement::noneSupported): Ditto.
- (WebCore::HTMLMediaElement::mediaEngineError): Ditto.
- (WebCore::HTMLMediaElement::setNetworkState): Ditto.
- (WebCore::HTMLMediaElement::userCancelledLoad): Ditto.
+ Add back an AffineTransform class for use by SVG
+ https://bugs.webkit.org/show_bug.cgi?id=33750
-2009-10-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+ These are the first steps on reimplementing AffineTransform. Unlike
+ the old affine code, this one is platform independent like TransformationMatrix.
+ AffineTransform has the benefit, that it stores just 6 doubles instead of
+ 16 in TransformationMatrix. The calculations of transformations are not that
+ complex and can improve the memory usage and speed of SVG.
+ AffineTransform can be used by HTML Canvas3D or SVG, since they are 2D related (at
+ least for the moment).
+ HTML Canvas is the first that makes use of the new AffineTransform. Next patches
+ will introduce the affine code to SVG.
- Reviewed by Adam Barth.
-
- [Qt] Remove deletion of outgoing FormData object when reply is finished.
- The buffers will be destroyed a bit later, when the QNetworkReply is deleted.
- Bug: https://bugs.webkit.org/show_bug.cgi?id=29551
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- * platform/network/qt/QNetworkReplyHandler.h:
-
-2009-10-19 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Darin Adler.
-
- Fix hard-to-reproduce crash in HTMLTokenizer by avoiding a rare
- fastRealloc edge case.
- https://bugs.webkit.org/show_bug.cgi?id=29313
-
- No test, the crash shows up occasionally in crash dumps, we weren't able
- to reproduce it locally.
-
- * html/HTMLTokenizer.cpp:
- (WebCore::HTMLTokenizer::enlargeScriptBuffer): Added an early exit to
- avoid calling fastRealloc with the size of 0.
-
-2009-10-19 Andrew Scherkus <scherkus@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Use fillRect() instead of drawRect() to fix Chromium media controls rendering.
-
- https://bugs.webkit.org/show_bug.cgi?id=30371
-
- Chromium Mac layout tests will need to be rebaselined. Existing layout tests for Linux/Win still pass.
-
- * rendering/RenderMediaControlsChromium.cpp:
- (WebCore::paintMediaSlider): Use fillRect() instead of drawRect().
-
-2009-10-19 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by Adam Barth.
-
- Crash in DOMWindow::clearTimeout etc when DOMWindow is not connected to a frame.
- https://bugs.webkit.org/show_bug.cgi?id=29832
-
- Need to make sure the script caches are reset when frame gets disconnected from still-alive DOMWindow.
- This will prevent JS from calling DOMWindow methods that can not be completed w/o the frame.
-
- I am not sure it's possible to test this since the only file that repros the problem need ~10 seconds to cause crash.
-
- * page/Frame.cpp:
- (WebCore::Frame::~Frame): Right after frame disconnects from DOMWindow, clear WindowShell.
-
-2009-10-19 Csaba Osztrogonác <ossy@webkit.org>
-
- Unreviewed build warning fix.
- [Qt] Apply changes to WebCore.pro introduced in r49778
-
- * WebCore.pro: Removed svg/graphics/filters/SVGFEGaussianBlur.h from HEADERS
-
-2009-10-19 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Darin Adler.
-
- Move feGaussianBlur from WebCore/svg to WebCore/platform
- [https://bugs.webkit.org/show_bug.cgi?id=30495]
-
- This patch moves SVGFRGaussianBlur from svg/graphics/filters
- to platform/graphics/filters/FEGaussianBlur. This is needed
- for shadow support on Qt and Cairo.
- No change in functionality, therfore no new test case needed.
+ No new tests. The new AffineTransformation code is tested by fast/canvas.
+ * Android.mk:
* GNUmakefile.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
- * platform/graphics/filters/FEGaussianBlur.cpp: Added.
- * platform/graphics/filters/FEGaussianBlur.h: Added.
- * svg/SVGFEGaussianBlurElement.h:
- * svg/graphics/filters/SVGFEGaussianBlur.cpp: Removed.
- * svg/graphics/filters/SVGFEGaussianBlur.h: Removed.
-
-2009-10-19 Yael Aharon <yael.aharon@nokia.com>
-
- Unreviewed.
-
- Added reviewer name to r49574.
-
-2009-10-19 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=30489
- [Gtk] The document frame/html container claims to be parentless
-
- Work around for the parentless claim made by the accessible associated
- with the embedded WebView. When we identify this condition, get the
- widget's parent, and then get the AtkObject from that. Admittedly an ugly
- hack, but we'll need it for Yelp and other Gtk+/GNOME applications which
- plan to switch over to WebKit.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (webkit_accessible_get_parent):
-
-2009-10-19 Benjamin Otte <otte@gnome.org>
-
- Reviewed by Jan Alonzo.
-
- Handle duration queries properly
- https://bugs.webkit.org/show_bug.cgi?id=29999
-
- Previously duration queries failed to handle unknown duration
- and didn't treat the returned duration as an unsigned.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::duration):
-
-2009-10-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] Fix build on Windows.
-
- * plugins/win/PluginViewWin.cpp:
- (windowHandleForPageClient):
-
-2009-10-19 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Holger Freyther.
-
- [Qt] Windowed Plugins: Don't crash when client is 0.
-
- Client is 0 when we use QWebPage without a QWebView or QGraphicsWebView.
- In addition, setFrameRect()/updatePluginWidget() is called even if the
- plugin was not succesfully loaded. updatePluginWidget() updates the
- window rect which is, in theory, useful to draw something that indicates
- that we didn't load successfully.
-
- So, a status check is added to setNPWindowIfNeeded.
-
- https://bugs.webkit.org/show_bug.cgi?id=30380
-
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::setNPWindowIfNeeded):
- (WebCore::PluginView::platformStart):
-
-2009-10-19 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Holger Freyther.
-
- [Qt] Windowed Plugins: Fix crash when QWebPage is deleted after QWebView.
-
- Fixes various sources of crashes:
- 1. The PluginContainer is a child of QWebView. When the view gets deleted,
- the PluginView is not notified about the deletion of PluginContainer.
- 2. QWebView destructor does not set client to 0.
- 3. Sometimes pending paint events are sent after the plugin has died, so add
- a check in PluginView::setNPWindowIfNeeded.
-
- https://bugs.webkit.org/show_bug.cgi?id=30354
-
- * plugins/qt/PluginContainerQt.cpp:
- (PluginContainerQt::~PluginContainerQt):
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::setNPWindowIfNeeded):
-
-2009-10-19 Jakob Truelsen <antialize@gmail.com>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=29042
- Allow one to customize the minimal and maximal shrink factors used when printing.
-
- * page/PrintContext.cpp:
- (WebCore::PrintContext::begin):
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
- (WebCore::Settings::setPrintingMinimumShrinkFactor):
- (WebCore::Settings::setPrintingMaximumShrinkFactor):
- * page/Settings.h:
- (WebCore::Settings::printingMinimumShrinkFactor):
- (WebCore::Settings::printingMaximumShrinkFactor):
-
-2009-10-18 Erik Arvidsson <arv@chromium.org>
-
- Reviewed by Adam Barth.
-
- Fixes issue where doubleclicking a word could select following adjacent newlines.
- https://bugs.webkit.org/show_bug.cgi?id=30234
-
- Tests: platform/mac/editing/selection/doubleclick-should-not-expand-across-lines.html
- platform/mac/editing/selection/script-tests/TEMPLATE.html
- platform/win/editing/selection/doubleclick-should-not-expand-across-lines.html
- platform/win/editing/selection/script-tests/TEMPLATE.html
-
- * editing/VisibleSelection.cpp:
- (WebCore::VisibleSelection::appendTrailingWhitespace):
-
-2009-10-18 Kevin Ollivier <kevino@theolliviers.com>
-
- CURL build fix, use proper header name.
-
- * platform/network/curl/ResourceHandleManager.h:
-
-2009-10-18 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Properties on Arrays and NodeLists are not logged correctly.
-
- https://bugs.webkit.org/show_bug.cgi?id=30485
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype._formatarray):
- (WebInspector.ConsoleView.prototype._printArray):
-
-2009-10-18 Pavel Feldman <pfeldman@chromium.org>
-
- Not reviewed: touching WebCore so that it
- initiated inspector frontend deployment on Windows.
-
- Web Inspector: frontend files are not deployed in Windows
- incremental build.
-
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::unbind):
-
-2009-10-18 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Title of dir(["test", "test2"]) should be Array
-
- https://bugs.webkit.org/show_bug.cgi?id=30486
-
- Test: inspector/console-tests.html
-
- * inspector/front-end/InjectedScript.js:
-
-2009-10-18 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Nikolas Zimmermann.
-
- REGRESSION: SVG Mask doesn't work for maskContentUnits="objectBoundingBox"
- [https://bugs.webkit.org/show_bug.cgi?id=30480]
-
- Patch for SVGMaskElement landed in r49598 should correct the location of
- the mask image graphics context. It only corrects the location for userSpaceOnUse
- mode in maskContentUnits but breaks objectBoundingBoxMode.
- The maskDestRect shouldn't be moved. It is not responsible for the correct context
- postioin but for the correct position of the mask image.
- This patch calculates the context postion independently from the maskDestRect.
- It also uses lineareRGB color space for masking on CG now. This is the default
- color space for masking operations.
- We already have tests for both maskContentUnits modes.
-
- *svg/W3C-SVG-1.1/masking-intro-01-f.svg
- *svg/custom/mask-with-default-value.svg
-
- Some tests needed new pixel tests because of the new color space.
-
- * svg/SVGMaskElement.cpp:
- (WebCore::SVGMaskElement::drawMaskerContent):
-
-2009-10-18 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Adam Barth.
-
- Use v8::Integer::NewFromUnsigned when converting unsigneds into V8's numbers.
- That is notably faster for small numbers (most common case).
- https://bugs.webkit.org/show_bug.cgi?id=30493
-
- * bindings/scripts/CodeGeneratorV8.pm:
-
-2009-10-18 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Reviewed by Holger Freyther.
-
- [GTK] Add MathML to the build system
- https://bugs.webkit.org/show_bug.cgi?id=30487
-
- Add MathML sources if MathML support is enabled.
-
- * GNUmakefile.am:
-
-2009-10-18 Kevin Ollivier <kevino@theolliviers.com>
-
- Non-PCH build fix. Added missing header.
-
- * bridge/runtime_root.h:
-
-2009-10-18 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Compositing layers not correctly updated after partial layout
- https://bugs.webkit.org/show_bug.cgi?id=30425
-
- When a partial layout happened, for example as the result of a postion-change-only
- layout, then some compositing layer positions were not correctly updated. To fix
- this, updateLayerPositions() now carries along a flag that is set at the rootmost
- layer being updated, and used to determine when we hit the first compositing layer
- in this update. RenderLayerBacking::updateAfterLayout() makes use of this information
- to do a full geometry update on that layer, which is thus the rootmost compositing
- layer that is being updated.
-
- Test: compositing/geometry/partial-layout-update.html
-
- * page/FrameView.cpp:
- (WebCore::FrameView::layout):
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::updateLayerPositions):
- (WebCore::RenderLayer::scrollToOffset):
- * rendering/RenderLayer.h:
- (WebCore::RenderLayer::):
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::updateAfterLayout):
- * rendering/RenderLayerBacking.h:
-
-2009-09-13 Kevin Watters <kevinwatters@gmail.com>
-
- Reviewed by Kevin Ollivier.
-
- Add support for proxies in CURL.
-
- https://bugs.webkit.org/show_bug.cgi?id=30446
-
- * platform/network/curl/ResourceHandleManager.cpp:
- (WebCore::ResourceHandleManager::setProxyInfo):
- (WebCore::ResourceHandleManager::initializeHandle):
- * platform/network/curl/ResourceHandleManager.h:
- (WebCore::ResourceHandleManager::):
-
-2009-10-18 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez
-
- https://bugs.webkit.org/show_bug.cgi?id=25901
- Use ATK_ROLE_SECTION for divTag and ATK_ROLE_LABEL for labelTag
-
- Replaces the use of ATK_ROLE_PANEL with the expected accessible roles.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (webkit_accessible_get_role):
-
-2009-10-17 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Reviewed by George Staikos.
-
- Cleanup SVGElement code, preparing for animVal support
- https://bugs.webkit.org/show_bug.cgi?id=30466
-
- Add new SynchronizablePropertyController and move the code for SVG property <-> XML attribute synchronization
- from SVGElement. This is a further preparation for animVal support, where SynchronizablePropertyController will
- be used to control the start/end state of an animated property.
-
- We're currently tracking animated properties that need synchronization, generalize this concept and use
- it to track their creation (bound to certain SVG*Element classes) as well as a flag determing the need
- of synchronization (no SVG DOM object wrappers, no synchronization needed).
-
- No change in functionality, thus no tests.
-
- * GNUmakefile.am: Add 'SynchronizablePropertyController.cpp/h' to build
- * WebCore.gypi: Ditto.
- * WebCore.pro: Ditto.
- * WebCore.vcproj/WebCore.vcproj: Ditto.
- * WebCore.xcodeproj/project.pbxproj: Ditto.
- * svg/SVGAllInOne.cpp: Ditto.
- * svg/SVGAnimatedProperty.h: Add registerProperty() function
- (WebCore::::SVGAnimatedProperty): Call registerProperty() function
- (WebCore::::registerProperty): Add new registerProperty() function, announcing new properties to SynchronizablePropertyController.
- * svg/SVGAnimatedTemplate.h: Use propertyController() method, to access the new functions moved from SVGElement.
- (WebCore::lookupOrCreateWrapper):
- * svg/SVGElement.cpp: Adapt to code moving to SynchronizablePropertyController.
- (WebCore::SVGElement::updateAnimatedSVGAttribute):
- * svg/SVGElement.h: Move handling SVG property synchronization to SynchronizablePropertyController.
- (WebCore::SVGElement::propertyController): Expose reference to SynchronizablePropertyController object.
- * svg/SVGViewSpec.cpp: Reorder initialization order of contextElement, leading to possible crashes.
- (WebCore::SVGViewSpec::SVGViewSpec):
- (WebCore::SVGViewSpec::viewTarget):
- * svg/SVGViewSpec.h: Ditto.
- (WebCore::SVGViewSpec::contextElement):
- * svg/SynchronizablePropertyController.cpp: Added.
- (WebCore::SynchronizablePropertyController::SynchronizablePropertyController):
- (WebCore::SynchronizablePropertyController::registerProperty):
- (WebCore::SynchronizablePropertyController::setPropertyNeedsSynchronization):
- (WebCore::SynchronizablePropertyController::synchronizeProperty):
- (WebCore::SynchronizablePropertyController::synchronizeAllProperties):
- (WebCore::SynchronizablePropertyController::startAnimation):
- (WebCore::SynchronizablePropertyController::stopAnimation):
- * svg/SynchronizablePropertyController.h: Added.
- (WebCore::SynchronizableProperty::SynchronizableProperty):
- (WebCore::SynchronizableProperty::isHashTableDeletedValue):
- (WebCore::SynchronizableProperty::operator==):
- (WebCore::SynchronizablePropertyHash::hash):
- (WebCore::SynchronizablePropertyHash::equal):
- (WebCore::SynchronizablePropertyHashTraits::constructDeletedValue):
- (WebCore::SynchronizablePropertyHashTraits::isDeletedValue):
-
-2009-10-17 Joanmarie Diggs <joanmarie.diggs@gmail.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=25413
- [GTK] Please expose the level of headings
-
- Exposes the heading level as an attribute of the AtkObject.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (addAttributeToSet):
- (webkit_accessible_get_attributes):
- (webkit_accessible_class_init):
-
-2009-10-17 Kwang Yul Seo <skyul@company100.net>
-
- Reviewed by Eric Seidel.
-
- EventHandler::eventLoopHandleMouseDragged needs ENABLE(DRAG_SUPPORT) guards
- https://bugs.webkit.org/show_bug.cgi?id=30472
-
- Put ENABLE(DRAG_SUPPORT) guards around EventHandler::eventLoopHandleMouseDragged
- in EventHandler.cpp. MSVC fails to compile when DRAG_SUPPORT not enabled.
-
- * page/EventHandler.cpp:
-
-2009-10-17 Alpha Lam <hclam@chromium.org>
-
- Reviewed by Eric Seidel.
-
- [chromium] Video controls not zoomed / transformed correctly
- https://bugs.webkit.org/show_bug.cgi?id=30461
-
- Draw the images in the controls scaled.
-
- No new tests. With this change Chromium will pass the following tests:
- LayoutTests/media/video-controls-zoomed.html
- LayoutTests/media/video-controls-transformed.html
-
- * rendering/RenderMediaControlsChromium.cpp:
- (WebCore::paintMediaButton):
- Pass along the target rect directly.
- (WebCore::RenderMediaControlsChromium::adjustMediaSliderThumbSize):
- Adjust the thumb slide applied with the scale factor.
-
-2009-10-17 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Unreviewed.
-
- [Gtk] Build fix for WebKitGtk after r49723.
-
- Add bindings/js/JSExceptionBase.* to the build.
-
- * GNUmakefile.am:
-
-2009-10-17 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Unreviewed.
-
- [Qt] Build fix for QtWebKit after r49723.
-
- Add bindings/js/JSExceptionBase.cpp to the build.
-
- * WebCore.pro:
-
-2009-10-16 Steve Falkenburg <sfalken@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=30456
- Fixes for new Debug_All Windows build configuration.
-
- * platform/network/cf/ResourceRequestCFNet.cpp:
- (WebCore::findCFNetworkModule): Ask for the correct library instead of guessing.
- * platform/win/ScrollbarThemeSafari.cpp: Use new DEBUG_ALL preprocessor define for library naming.
- * rendering/RenderMediaControls.cpp: Use new DEBUG_ALL preprocessor define for library naming.
- * rendering/RenderThemeSafari.cpp: Use new DEBUG_ALL preprocessor define for library naming.
-
-2009-10-16 Jon Honeycutt <jhoneycutt@apple.com>
-
- Add SPI to determine whether a plug-in has ever been halted.
-
- Part of <rdar://problem/7312158>.
-
- Reviewed by Dan Bernstein.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::PluginView):
- Initialize m_hasBeenHalted.
-
- * plugins/PluginView.h:
- (WebCore::PluginView::hasBeenHalted):
- Return m_hasBeenHalted.
-
- * plugins/win/PluginViewWin.cpp:
- (WebCore::PluginView::halt):
- Set m_hasBeenHalted.
-
-2009-10-16 Adam Barth <abarth@webkit.org>
-
- Reviewed by Alexey Proskuryakov.
-
- @charset rule after the first byte causes the rest of css to be ignored
- https://bugs.webkit.org/show_bug.cgi?id=18265
-
- Apparently we're supposed to tolerate whitespace before the charset
- rule so folks can write code like this:
-
- <style>
- @charset "utf-8"
- ...
- </style>
-
- I'm told this is one of the top compatability problems in China.
- Tests: fast/css/comment-before-charset-external.html
- fast/css/comment-before-charset.html
- fast/css/many-spaces-before-charset.html
- fast/css/space-before-charset-external.html
- fast/css/space-before-charset.html
-
- * css/CSSGrammar.y:
-
-2009-10-16 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Darin Adler.
-
- Fixes part of <http://webkit.org/b/30412>.
- Web Inspector should get human readable DOM Exceptions.
-
- Add a description field to ExceptionBase, and call it through
- reportException which allows the user/developer to get a more detailed
- and coherent error explanation through the Web Inspector.
-
- This only applies to exceptions that come from a script on the page when
- it is run. DOM Exceptions that come from the code run in the console, or DOM
- exceptions that are caught and logged will come in a future patch.
-
- Tests: inspector/uncaught-dom1-exception.html
- inspector/uncaught-dom3-exception.html
- inspector/uncaught-dom8-exception.html
-
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::reportException):
- * bindings/js/JSExceptionBase.cpp: Added.
- (WebCore::toExceptionBase):
- * bindings/js/JSExceptionBase.h: Added.
- * dom/ExceptionBase.cpp:
- (WebCore::ExceptionBase::ExceptionBase):
- * dom/ExceptionBase.h:
- (WebCore::ExceptionBase::description):
- * dom/ExceptionCode.cpp:
- (WebCore::):
- (WebCore::getExceptionCodeDescription):
- * dom/ExceptionCode.h:
-
-2009-10-16 Geoffrey Garen <ggaren@apple.com>
-
- Build fix: forgot to check in this #include.
-
- * bridge/runtime_root.h:
-
-2009-10-16 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Transform layer gets stuck with the wrong transform after an animation ends
- <rdar://problem/7311662>
-
- Work around a CoreAnimation bug which causes an animated transform layer to
- end up with a stale transform.
-
- Test: compositing/animation/state-at-end-event-transform-layer.html
-
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::bug7311367Workaround):
- (WebCore::GraphicsLayerCA::removeAnimationFromLayer):
-
-2009-10-16 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- After running a transition with an end event listener, can't change the transform
- https://bugs.webkit.org/show_bug.cgi?id=30454
-
- Fix an issue where, if a document had any listener for webkitTransitionEnd or webkitAnimationEnd,
- the animations would not get cleaned up correctly, which broke subsequent changes of transform.
-
- Now, we always clean up the animations right after queuing up the end events.
-
- Tests: animations/state-at-end-event.html
- transitions/move-after-transition.html
-
- * page/animation/ImplicitAnimation.cpp:
- (WebCore::ImplicitAnimation::onAnimationEnd):
- * page/animation/KeyframeAnimation.cpp:
- (WebCore::KeyframeAnimation::onAnimationEnd):
-
-2009-10-15 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Handle the Enter Key in the Elements Tree Hierarchy
- https://bugs.webkit.org/show_bug.cgi?id=30428
-
- TextNode => Edit Text Node
- Has Attributes => Edit First Attribute
- No Attributes => Start Editing New Attribute
-
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeOutline.prototype.handleKeyEvent): handle the "Enter" key
- (WebInspector.ElementsTreeElement.prototype.set hovered): only add new attribute button on nodes with attributes
- (WebInspector.ElementsTreeElement.prototype._addNewAttribute): prevent moving backwards where there are no attributes
- (WebInspector.ElementsTreeElement.prototype._startEditingFromEvent): renamed to be clearer
- (WebInspector.ElementsTreeElement.prototype._startEditing): transition to the appropriate edit state for a tree element
-
-2009-10-16 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Fix header indent style for FrameLoader and friends
- https://bugs.webkit.org/show_bug.cgi?id=30430
-
- * loader/FrameLoader.h:
- (WebCore::FrameLoader::frame):
- (WebCore::FrameLoader::policyChecker):
- (WebCore::FrameLoader::history):
- (WebCore::FrameLoader::notifier):
- (WebCore::FrameLoader::isLoadingMainResource):
- (WebCore::FrameLoader::documentLoader):
- (WebCore::FrameLoader::policyDocumentLoader):
- (WebCore::FrameLoader::provisionalDocumentLoader):
- (WebCore::FrameLoader::state):
- (WebCore::FrameLoader::client):
- (WebCore::FrameLoader::url):
- (WebCore::FrameLoader::isLoadingFromCachedPage):
- (WebCore::FrameLoader::committingFirstRealLoad):
- (WebCore::FrameLoader::committedFirstRealDocumentLoad):
- (WebCore::FrameLoader::creatingInitialEmptyDocument):
- * loader/HistoryController.h:
- (WebCore::HistoryController::currentItem):
- (WebCore::HistoryController::provisionalItem):
- * loader/PolicyCallback.h:
- (WebCore::PolicyCallback::request):
- * loader/PolicyChecker.h:
- (WebCore::PolicyChecker::loadType):
- (WebCore::PolicyChecker::setLoadType):
- (WebCore::PolicyChecker::delegateIsDecidingNavigationPolicy):
- (WebCore::PolicyChecker::delegateIsHandlingUnimplementablePolicy):
- * loader/RedirectScheduler.h:
- * loader/ResourceLoadNotifier.h:
-
-2009-10-16 Steve Falkenburg <sfalken@apple.com>
-
- Reviewed by Adam Roben.
-
- Add a Debug_All configuration to build entire stack as debug.
- Change Debug_Internal to:
- - stop using _debug suffix for all WebKit/Safari binaries
- - not use _debug as a DLL naming suffix
- - use non-debug C runtime lib.
-
- * WebCore.vcproj/QTMovieWin.vcproj: Add Debug_All configuration.
- * WebCore.vcproj/WebCore.make: Debug build in makefile should build Debug_All.
- * WebCore.vcproj/WebCore.sln: Add Debug_All configuration.
- * WebCore.vcproj/WebCore.submit.sln: Add Debug_All configuration.
- * WebCore.vcproj/WebCore.vcproj: Add Debug_All configuration.
- * WebCore.vcproj/WebCoreGenerated.vcproj: Renamed single configuration from "Release" to "all".
-
-2009-10-16 Dimitri Glazkov <dglazkov@chromium.org>
-
- No review, rolling out r49693, because it broke Chromium build.
- http://trac.webkit.org/changeset/49693
-
- * WebCore.gyp/WebCore.gyp:
- * WebCore.gypi:
-
-2009-10-16 Andrew Scherkus <scherkus@chromium.org>
-
- Reviewed by Eric Carlson.
-
- Updated media resource selection algorithm to reflect latest HTML 5 specification.
-
- Noticable changes:
- - Elements with no source should have their network state set to NETWORK_EMPTY as opposed to NETWORK_NO_SOURCE
- - Empty string ("") is now considered a valid URL resolving to the current page and will be loaded
-
- Tests: media/video-src-empty.html
- media/video-src-none.html
-
- https://bugs.webkit.org/show_bug.cgi?id=30407
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::selectMediaResource): Updated code and comments to match spec.
-
-2009-10-16 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Insecure plug-ins don't trigger mixed content
- https://bugs.webkit.org/show_bug.cgi?id=30431
-
- Added the missing check.
-
- Test: http/tests/security/mixedContent/insecure-plugin-in-iframe.html
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::loadPlugin):
-
-2009-10-16 Andrew Scherkus <scherkus@chromium.org>
-
- Reviewed by Eric Carlson.
-
- Set autobuffer to true and schedule load in V8 audio element constructor.
-
- https://bugs.webkit.org/show_bug.cgi?id=30448
-
- Covered by existing tests.
-
- * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL): Set autobuffer to true and schedule load.
-
-2009-10-16 Andrew Scherkus <scherkus@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Remove FIXME in RenderMediaControlsChromium as bug was fixed upstream.
-
- https://bugs.webkit.org/show_bug.cgi?id=30422
-
- Covered by existing media layout tests.
-
- * rendering/RenderMediaControlsChromium.cpp:
- (WebCore::paintMediaSlider): Removed round() and FIXME.
-
-2009-10-16 Andrew Scherkus <scherkus@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Fix Chromium media controls to render a disabled play button when the element is unintialized.
-
- https://bugs.webkit.org/show_bug.cgi?id=30410
-
- Covered by existing layout tests.
-
- * rendering/RenderMediaControlsChromium.cpp:
- (WebCore::paintMediaPlayButton): Include check for NETWORK_EMPTY to render disabled play button.
-
-2009-10-16 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Gavin Barraclough.
-
- Make typeinfo flags default to false
- https://bugs.webkit.org/show_bug.cgi?id=30372
-
- Last part -- replace HasDefaultGetPropertyNames with OverridesGetPropertyNames
- flag.
-
- * bindings/js/JSDOMWindowShell.h:
- (WebCore::JSDOMWindowShell::createStructure):
- * bindings/js/JSHTMLAllCollection.h:
- (WebCore::JSHTMLAllCollection::createStructure):
- * bindings/js/JSQuarantinedObjectWrapper.h:
- (WebCore::JSQuarantinedObjectWrapper::createStructure):
- * bindings/scripts/CodeGeneratorJS.pm:
- * bridge/runtime_array.h:
- (JSC::RuntimeArray::createStructure):
- * bridge/runtime_object.h:
- (JSC::RuntimeObjectImp::createStructure):
-
-2009-10-16 Steven Knight <sgk@chromium.org>
-
- Reviewed by David Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=30447
- Handle long link lines by building .idl-generated bindings in a
- separate webcore_bindings library target. Avoid Visual Studio
- dependency issues by building additional generated .cpp and .h files
- in a separate webcore_bindings_sources target.
-
- Chrome should still build and test successfully.
-
- * WebCore.gyp/WebCore.gyp:
- * WebCore.gypi:
-
-2009-10-16 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Eric Carlson.
-
- Transform transitions that used to be accelerated are no longer so
- https://bugs.webkit.org/show_bug.cgi?id=30453
-
- The change in r49633, to not run accelerated animations/transitions on layers that
- are not attached, broke accelerated transitions/animations in many cases where they start
- as soon as the page loads. This change reverts the code that tests for the GraphicsLayer being
- attached.
-
- No test, because it's not possible from a test to know whether a transition is accelerated or not.
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::startAnimation):
- (WebCore::RenderLayerBacking::startTransition):
-
-2009-10-16 Kevin Ollivier <kevino@theolliviers.com>
-
- wxMSW build fix, build the MSW source to get methods that use the MSW version of
- PlatformModuleVersion.
-
- * wscript:
-
-2009-10-16 Adam Barth <abarth@webkit.org>
-
- Unreviewed build fix. Add back MIMETypeRegistryChromium with the right
- casing.
-
- * platform/chromium/MIMETypeRegistryChromium.cpp: Added.
- (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
- (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
- (WebCore::MIMETypeRegistry::getMIMETypeForPath):
- (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
- (WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType):
- (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding):
- (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
- (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
- (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
- (WebCore::MIMETypeRegistry::isJavaAppletMIMEType):
- (WebCore::MIMETypeRegistry::getMediaMIMETypeForExtension):
- (WebCore::dummyHashSet):
- (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes):
- (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes):
- (WebCore::MIMETypeRegistry::getSupportedImageMIMETypesForEncoding):
- (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes):
- (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
-
-2009-10-16 Adam Barth <abarth@webkit.org>
-
- Reviewed by Darin Adler.
-
- MimeTypeRegistryChromium is mis-casen
- https://bugs.webkit.org/show_bug.cgi?id=30441
-
- Change the case of MimeTypeRegistryChromium to match other platforms.
-
- * WebCore.gypi:
- * platform/chromium/MIMETypeRegistryChromium.cpp: Copied from WebCore/platform/chromium/MimeTypeRegistryChromium.cpp.
- * platform/chromium/MimeTypeRegistryChromium.cpp: Removed.
-
-2009-10-16 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Change EmptyPluginHalterClient in SVGImage to be non-static, to
- match changes made http://trac.webkit.org/changeset/49385.
- https://bugs.webkit.org/show_bug.cgi?id=30403
-
- Run the following layout test sequence:
- LayoutTests/svg/W3C-SVG-1.1/struct-image-01-t.svg
- LayoutTests/svg/W3C-SVG-1.1/struct-image-03-t.svg
- LayoutTests/svg/W3C-SVG-1.1/struct-image-04-t.svg
- LayoutTests/svg/W3C-SVG-1.1/struct-image-05-b.svg
- LayoutTests/svg/W3C-SVG-1.1/struct-image-06-t.svg
- LayoutTests/svg/W3C-SVG-1.1/struct-image-07-t.svg
- LayoutTests/svg/W3C-SVG-1.1/struct-image-08-t.svg
- LayoutTests/svg/W3C-SVG-1.1/struct-image-09-t.svg
- LayoutTests/svg/W3C-SVG-1.1/struct-image-10-t.svg
- LayoutTests/svg/carto.net/scrollbar.svg
- LayoutTests/svg/carto.net/selectionlist.svg
-
- selectionlist.svg should not crash.
-
- * svg/graphics/SVGImage.cpp:
- (WebCore::SVGImage::dataChanged): Made EmptyPluginHalterClient non-static.
-
-2009-10-16 Victor Wang <victorw@chromium.org>
-
- Reviewed by David Levin.
-
- Add beforeload event support to V8DOMWrapper
-
- https://bugs.webkit.org/show_bug.cgi?id=30413
-
- LayoutTests/fast/dom/beforeload/frame-before-load.html
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::convertEventToV8Object):
-
-2009-10-16 Adam Barth <abarth@webkit.org>
-
- Reviewed by Darin Adler.
-
- MimeTypeRegistryChromium is mis-casen
- https://bugs.webkit.org/show_bug.cgi?id=30441
-
- Change the case of MimeTypeRegistryChromium to match other platforms.
-
- * WebCore.gypi:
- * platform/chromium/MIMETypeRegistryChromium.cpp: Copied from WebCore/platform/chromium/MimeTypeRegistryChromium.cpp.
- * platform/chromium/MimeTypeRegistryChromium.cpp: Removed.
-
-2009-10-16 Adam Barth <abarth@webkit.org>
-
- Reviewed by Mark Rowe.
-
- Chrome doesn't set Content-Type for file upload when the file extension
- is not recognized
- https://bugs.webkit.org/show_bug.cgi?id=30433
-
- Apparently, getMIMETypeForPath is supposed to return
- application/octet-stream when it doesn't have a better MIME type.
-
- * platform/chromium/MimeTypeRegistryChromium.cpp:
- (WebCore::MIMETypeRegistry::getMIMETypeForPath):
-
-2009-10-16 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Pull out r49676 as it caused build breakges on Symbian
-
- * plugins/symbian/PluginViewSymbian.cpp:
-
-2009-10-16 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Ariya Hidayat.
-
- Crash fix when loading NPAPI plugins on Qt/Mac
-
- There's no guarantee that the plist will be valid even if we
- ask the plugin to create it. Crash obverved with iGetter.
-
- * plugins/mac/PluginPackageMac.cpp:
-
-2009-10-15 Stephen White <senorblanco@chromium.org>
-
- Reviewed by David Levin.
-
- Fix for Chromium/skia's implementation of canvas's isPointInPath().
- https://bugs.webkit.org/show_bug.cgi?id=30402
-
- Covered by LayoutTests/fast/canvas/pointInPath.html.
-
- * platform/graphics/skia/SkiaUtils.cpp:
- (WebCore::SkPathContainsPoint):
-
-2009-10-15 Adam Barth <abarth@webkit.org>
-
- Reviewed by Darin Adler.
-
- Factor ResourceLoadNotifier out of FrameLoader
- https://bugs.webkit.org/show_bug.cgi?id=30379
-
- These methods have virtually no interaction with the rest of
- FrameLoader.
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * dom/Document.cpp:
- (WebCore::Document::resourceRetrievedByXMLHttpRequest):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::FrameLoader):
- (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
- (WebCore::ResourceLoadNotifier::ResourceLoadNotifier):
- (WebCore::ResourceLoadNotifier::activeDocumentLoader):
- (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
- (WebCore::ResourceLoadNotifier::willSendRequest):
- (WebCore::ResourceLoadNotifier::didReceiveResponse):
- (WebCore::ResourceLoadNotifier::didReceiveData):
- (WebCore::ResourceLoadNotifier::didFailToLoad):
- (WebCore::ResourceLoadNotifier::didLoadResourceByXMLHttpRequest):
- (WebCore::FrameLoader::sendRemainingDelegateMessages):
- (WebCore::FrameLoader::requestFromDelegate):
- (WebCore::ResourceLoadNotifier::didFinishLoad):
- (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
- (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
- (WebCore::ResourceLoadNotifier::dispatchAssignIdentifierToInitialRequest):
- (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
- (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
- (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
- (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
- * loader/FrameLoader.h:
- (WebCore::FrameLoader::notifier):
- * loader/MainResourceLoader.cpp:
- (WebCore::MainResourceLoader::receivedError):
- * loader/ResourceLoadNotifier.cpp: Added.
- (WebCore::ResourceLoadNotifier::ResourceLoadNotifier):
- (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
- (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
- (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
- (WebCore::ResourceLoadNotifier::willSendRequest):
- (WebCore::ResourceLoadNotifier::didReceiveResponse):
- (WebCore::ResourceLoadNotifier::didReceiveData):
- (WebCore::ResourceLoadNotifier::didFinishLoad):
- (WebCore::ResourceLoadNotifier::didFailToLoad):
- (WebCore::ResourceLoadNotifier::didLoadResourceByXMLHttpRequest):
- (WebCore::ResourceLoadNotifier::dispatchAssignIdentifierToInitialRequest):
- (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
- (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
- (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
- (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
- (WebCore::ResourceLoadNotifier::activeDocumentLoader):
- * loader/ResourceLoadNotifier.h: Added.
- * loader/ResourceLoader.cpp:
- (WebCore::ResourceLoader::willSendRequest):
- (WebCore::ResourceLoader::didReceiveResponse):
- (WebCore::ResourceLoader::didReceiveData):
- (WebCore::ResourceLoader::didFinishLoadingOnePart):
- (WebCore::ResourceLoader::didFail):
- (WebCore::ResourceLoader::didCancel):
- (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
- (WebCore::ResourceLoader::didCancelAuthenticationChallenge):
-
-2009-10-15 Roland Steiner <rolandsteiner@google.com>
-
- Reviewed by Darin Fisher.
-
- Bug 30427 - Remove unneeded methods in ChromiumDataObject
- (https://bugs.webkit.org/show_bug.cgi?id=30427)
-
- Remove no longer needed methods from ChromiumDataObject.
-
- No new tests (no functional change)
-
- * platform/chromium/ChromiumDataObject.h:
-
-2009-10-16 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] Need a way to inform the application when a Netscape plugin is created or deleted
- https://bugs.webkit.org/show_bug.cgi?id=30179
-
- Inform the application when a plugin is created or destroyed, but only if the
- application registered for these notifications.
-
- * plugins/symbian/PluginViewSymbian.cpp:
- (WebCore::PluginView::platformStart):
- (WebCore::PluginView::platformDestroy):
-
-2009-10-16 Shu Chang <Chang.Shu@nokia.com>
-
- Reviewed by Eric Seidel.
-
- Default language translation should be determined by locale settings,
- e.g., "en-US".
- https://bugs.webkit.org/show_bug.cgi?id=29653
-
- Test: fast/js/navigator-language.html
-
- * platform/qt/Localizations.cpp:
- (WebCore::defaultLanguage):
-
-2009-10-16 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Ariya Hidayat.
-
- Crash fix when loading NPAPI plugins on Qt/Mac
-
- There's no guarantee that the plist will be valid even if we
- ask the plugin to create it. Crash obverved with iGetter.
-
- * plugins/mac/PluginPackageMac.cpp:
-
-2009-10-15 Stephen White <senorblanco@chromium.org>
-
- Reviewed by David Levin.
-
- Fix for Chromium/skia's implementation of canvas's isPointInPath().
- https://bugs.webkit.org/show_bug.cgi?id=30402
-
- Covered by LayoutTests/fast/canvas/pointInPath.html.
-
- * platform/graphics/skia/SkiaUtils.cpp:
- (WebCore::SkPathContainsPoint):
-
-2009-10-15 Adam Barth <abarth@webkit.org>
-
- Reviewed by Darin Adler.
-
- Factor ResourceLoadNotifier out of FrameLoader
- https://bugs.webkit.org/show_bug.cgi?id=30379
-
- These methods have virtually no interaction with the rest of
- FrameLoader.
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * dom/Document.cpp:
- (WebCore::Document::resourceRetrievedByXMLHttpRequest):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::FrameLoader):
- (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
- (WebCore::ResourceLoadNotifier::ResourceLoadNotifier):
- (WebCore::ResourceLoadNotifier::activeDocumentLoader):
- (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
- (WebCore::ResourceLoadNotifier::willSendRequest):
- (WebCore::ResourceLoadNotifier::didReceiveResponse):
- (WebCore::ResourceLoadNotifier::didReceiveData):
- (WebCore::ResourceLoadNotifier::didFailToLoad):
- (WebCore::ResourceLoadNotifier::didLoadResourceByXMLHttpRequest):
- (WebCore::FrameLoader::sendRemainingDelegateMessages):
- (WebCore::FrameLoader::requestFromDelegate):
- (WebCore::ResourceLoadNotifier::didFinishLoad):
- (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
- (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
- (WebCore::ResourceLoadNotifier::dispatchAssignIdentifierToInitialRequest):
- (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
- (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
- (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
- (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
- * loader/FrameLoader.h:
- (WebCore::FrameLoader::notifier):
- * loader/MainResourceLoader.cpp:
- (WebCore::MainResourceLoader::receivedError):
- * loader/ResourceLoadNotifier.cpp: Added.
- (WebCore::ResourceLoadNotifier::ResourceLoadNotifier):
- (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
- (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
- (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
- (WebCore::ResourceLoadNotifier::willSendRequest):
- (WebCore::ResourceLoadNotifier::didReceiveResponse):
- (WebCore::ResourceLoadNotifier::didReceiveData):
- (WebCore::ResourceLoadNotifier::didFinishLoad):
- (WebCore::ResourceLoadNotifier::didFailToLoad):
- (WebCore::ResourceLoadNotifier::didLoadResourceByXMLHttpRequest):
- (WebCore::ResourceLoadNotifier::dispatchAssignIdentifierToInitialRequest):
- (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
- (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
- (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
- (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
- (WebCore::ResourceLoadNotifier::activeDocumentLoader):
- * loader/ResourceLoadNotifier.h: Added.
- * loader/ResourceLoader.cpp:
- (WebCore::ResourceLoader::willSendRequest):
- (WebCore::ResourceLoader::didReceiveResponse):
- (WebCore::ResourceLoader::didReceiveData):
- (WebCore::ResourceLoader::didFinishLoadingOnePart):
- (WebCore::ResourceLoader::didFail):
- (WebCore::ResourceLoader::didCancel):
- (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
- (WebCore::ResourceLoader::didCancelAuthenticationChallenge):
-
-2009-10-15 Roland Steiner <rolandsteiner@google.com>
-
- Reviewed by Darin Fisher.
-
- Bug 30427 - Remove unneeded methods in ChromiumDataObject
- (https://bugs.webkit.org/show_bug.cgi?id=30427)
-
- Remove no longer needed methods from ChromiumDataObject.
-
- No new tests (no functional change)
-
- * platform/chromium/ChromiumDataObject.h:
-
-2009-10-15 Daniel Bates <dbates@webkit.org>
-
- No review, rolling out r49644.
- http://trac.webkit.org/changeset/49644
-
- We need to think about this change some more. See bug #30418
- for more details.
-
- * page/XSSAuditor.cpp:
- (WebCore::XSSAuditor::canEvaluate):
- (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
- (WebCore::XSSAuditor::canCreateInlineEventListener):
- (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
- (WebCore::XSSAuditor::canLoadObject):
- (WebCore::XSSAuditor::canSetBaseElementURL):
- (WebCore::XSSAuditor::findInRequest):
- * page/XSSAuditor.h:
-
-2009-10-14 Jon Honeycutt <jhoneycutt@apple.com>
-
- Add SPI to determine whether a node is a halted plug-in.
-
- Part of <rdar://problem/7273354> Halted plug-ins should restart on
- mouseover
-
- https://bugs.webkit.org/show_bug.cgi?id=30151
-
- Reviewed by Darin Adler.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::PluginView):
- Initialize m_isHalted.
-
- * plugins/PluginView.h:
- (WebCore::PluginView::isHalted):
- Return m_isHalted.
-
- * plugins/win/PluginViewWin.cpp:
- (WebCore::PluginView::halt):
- Set m_isHalted to true.
- (WebCore::PluginView::restart):
- clear m_isHalted.
-
-2009-10-15 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- [Qt] Build fix for QtWebKit after r49649.
-
- Change JSC::HasNonDefaultMark to OverridesMarkChildren in createStructure function.
-
- * bridge/qt/qt_runtime.h:
- (JSC::Bindings::QtRuntimeMethod::createStructure):
-
-2009-10-15 Pavel Feldman <pfeldman@chromium.org>
-
- Not reviewed - build fix.
-
- Web Inspector: add file missing in r49648
-
- * inspector/front-end/TestController.js: Added.
- (WebInspector.TestController):
- (WebInspector.TestController.prototype.waitUntilDone):
- (WebInspector.TestController.prototype.notifyDone):
- (WebInspector.evaluateForTestInFrontend):
-
-2009-10-15 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Darin Adler.
-
- Make typeinfo flags default to false
- https://bugs.webkit.org/show_bug.cgi?id=30372
-
- Part 2 -- Reverse the TypeInfo HasDefaultMark flag to OverridesMarkChildren, etc
-
- * bindings/js/JSDOMBinding.h:
- (WebCore::DOMObjectWithGlobalPointer::createStructure):
- (WebCore::DOMConstructorObject::createStructure):
- * bindings/js/JSDOMWindowShell.h:
- (WebCore::JSDOMWindowShell::createStructure):
- * bindings/js/JSHTMLAllCollection.h:
- (WebCore::JSHTMLAllCollection::createStructure):
- * bindings/js/JSQuarantinedObjectWrapper.h:
- (WebCore::JSQuarantinedObjectWrapper::createStructure):
- * bindings/scripts/CodeGeneratorJS.pm:
- * bridge/qt/qt_runtime.h:
- (JSC::Bindings::QtRuntimeMethod::createStructure):
- * bridge/runtime_method.h:
- (JSC::RuntimeMethod::createStructure):
-
-2009-10-15 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: introduce test controller with waitUntilDone
- on frontend side.
-
- https://bugs.webkit.org/show_bug.cgi?id=30400
-
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * inspector/front-end/TestController.js: Added.
- (WebInspector.TestController):
- (WebInspector.TestController.prototype.waitUntilDone):
- (WebInspector.TestController.prototype.notifyDone):
- (WebInspector.evaluateForTestInFrontend):
- * inspector/front-end/WebKit.qrc:
- * inspector/front-end/inspector.html:
- * inspector/front-end/inspector.js:
-
-2009-10-15 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=27895
-
- Fixes an issue in which injecting an inline event handler whose value ends in a single-line
- JavaScript comment can bypass the XSSAuditor. Similarly fixes this issue with respect to
- the HTML Base element, HTML Object element, inline and external script tags, and
- JavaScript multi-line variants of all of these attacks.
-
- Tests: http/tests/security/xssAuditor/base-href-comment.html
- http/tests/security/xssAuditor/iframe-javascript-url-comment.html
- http/tests/security/xssAuditor/img-onerror-HTML-comment.html
- http/tests/security/xssAuditor/img-onerror-comment.html
- http/tests/security/xssAuditor/object-tag-comment.html
- http/tests/security/xssAuditor/script-tag-comment-HTML-entity.html
- http/tests/security/xssAuditor/script-tag-comment.html
- http/tests/security/xssAuditor/script-tag-with-source-comment.html
-
- * page/XSSAuditor.cpp: Added constant minAttackLength.
- (WebCore::XSSAuditor::canEvaluate):
- (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
- (WebCore::XSSAuditor::canCreateInlineEventListener):
- (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
- (WebCore::XSSAuditor::canLoadObject):
- (WebCore::XSSAuditor::canSetBaseElementURL):
- (WebCore::XSSAuditor::findInRequest): Added parameter context. Only looks at up
- to minAttackLength of script code plus context (if any).
- * page/XSSAuditor.h:
-
-2009-10-08 Adam Langley <agl@google.com>
-
- Reviewed by Eric Seidel.
-
- Currently, Skia clip paths are 1-bit. This patch makes our path
- clipping anti-aliased for non-canvas drawing.
-
- http://code.google.com/p/chromium/issues/detail?id=5927
- https://bugs.webkit.org/show_bug.cgi?id=28820
- http://www.imperialviolet.org/2009/09/02/anti-aliased-clipping.html
-
- Already covered by layout tests. New baselines will be needed in the
- Chromium tree.
-
- (Reland. First landed in r49329, reverted in r49330 due to Windows
- build break)
-
* html/canvas/CanvasRenderingContext2D.cpp:
- (WebCore::CanvasRenderingContext2D::clip):
+ (WebCore::CanvasRenderingContext2D::scale):
+ (WebCore::CanvasRenderingContext2D::rotate):
+ (WebCore::CanvasRenderingContext2D::translate):
+ (WebCore::CanvasRenderingContext2D::transform):
+ (WebCore::CanvasRenderingContext2D::setTransform):
+ (WebCore::CanvasRenderingContext2D::isPointInPath):
+ (WebCore::CanvasRenderingContext2D::willDraw):
+ * html/canvas/CanvasRenderingContext2D.h:
* platform/graphics/GraphicsContext.h:
+ * platform/graphics/Path.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
- (WebCore::GraphicsContext::canvasClip):
+ (WebCore::GraphicsContext::getAffineCTM):
+ (WebCore::GraphicsContext::concatCTM):
+ * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
+ (WebCore::GraphicsContextPlatformPrivate::concatCTM):
+ * platform/graphics/cairo/PathCairo.cpp:
+ (WebCore::Path::transform):
+ * platform/graphics/cairo/TransformationMatrixCairo.cpp:
+ (WebCore::AffineTransform::operator cairo_matrix_t):
* platform/graphics/cg/GraphicsContextCG.cpp:
- (WebCore::GraphicsContext::canvasClip):
+ (WebCore::GraphicsContext::concatCTM):
+ (WebCore::GraphicsContext::getAffineCTM):
+ * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
+ (WebCore::GraphicsContextPlatformPrivate::concatCTM):
+ * platform/graphics/cg/PathCG.cpp:
+ (WebCore::Path::transform):
+ * platform/graphics/cg/TransformationMatrixCG.cpp:
+ (WebCore::AffineTransform::operator CGAffineTransform):
* platform/graphics/haiku/GraphicsContextHaiku.cpp:
- (WebCore::GraphicsContext::canvasClip):
+ (WebCore::GraphicsContext::getAffineCTM):
+ (WebCore::GraphicsContext::concatCTM):
+ * platform/graphics/haiku/PathHaiku.cpp:
+ (WebCore::Path::transform):
* platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::GraphicsContext::canvasClip):
+ (WebCore::GraphicsContext::getAffineCTM):
+ (WebCore::GraphicsContext::concatCTM):
+ * platform/graphics/qt/PathQt.cpp:
+ (WebCore::Path::transform):
+ * platform/graphics/qt/TransformationMatrixQt.cpp:
+ (WebCore::AffineTransform::operator QTransform):
* platform/graphics/skia/GraphicsContextSkia.cpp:
- (WebCore::GraphicsContext::addInnerRoundedRectClip):
- (WebCore::GraphicsContext::clip):
- (WebCore::GraphicsContext::canvasClip):
- (WebCore::GraphicsContext::clipPath):
- * platform/graphics/skia/PlatformContextSkia.cpp:
- (PlatformContextSkia::clipPathAntiAliased):
- (PlatformContextSkia::restore):
- (PlatformContextSkia::applyAntiAliasedClipPaths):
- * platform/graphics/skia/PlatformContextSkia.h:
- * platform/graphics/win/GraphicsContextWin.cpp:
- (WebCore::GraphicsContext::canvasClip):
+ (WebCore::GraphicsContext::getAffineCTM):
+ * platform/graphics/skia/PathSkia.cpp:
+ (WebCore::Path::transform):
+ * platform/graphics/skia/TransformationMatrixSkia.cpp:
+ (WebCore::AffineTransform::operator SkMatrix):
+ * platform/graphics/transforms/AffineTransform.cpp: Added.
+ (WebCore::affineTransformDecompose):
+ (WebCore::affineTransformCompose):
+ (WebCore::AffineTransform::AffineTransform):
+ (WebCore::AffineTransform::reset):
+ (WebCore::AffineTransform::setMatrix):
+ (WebCore::AffineTransform::isIdentity):
+ (WebCore::AffineTransform::det):
+ (WebCore::AffineTransform::isInvertible):
+ (WebCore::AffineTransform::inverse):
+ (WebCore::AffineTransform::multiply):
+ (WebCore::AffineTransform::multLeft):
+ (WebCore::AffineTransform::rotate):
+ (WebCore::AffineTransform::scale):
+ (WebCore::AffineTransform::translate):
+ (WebCore::AffineTransform::scaleNonUniform):
+ (WebCore::AffineTransform::rotateFromVector):
+ (WebCore::AffineTransform::flipX):
+ (WebCore::AffineTransform::flipY):
+ (WebCore::AffineTransform::shear):
+ (WebCore::AffineTransform::skew):
+ (WebCore::AffineTransform::skewX):
+ (WebCore::AffineTransform::skewY):
+ (WebCore::makeMapBetweenRects):
+ (WebCore::AffineTransform::map):
+ (WebCore::AffineTransform::mapPoint):
+ (WebCore::AffineTransform::mapRect):
+ (WebCore::AffineTransform::blend):
+ * platform/graphics/transforms/AffineTransform.h: Added.
+ (WebCore::AffineTransform::a):
+ (WebCore::AffineTransform::setA):
+ (WebCore::AffineTransform::b):
+ (WebCore::AffineTransform::setB):
+ (WebCore::AffineTransform::c):
+ (WebCore::AffineTransform::setC):
+ (WebCore::AffineTransform::d):
+ (WebCore::AffineTransform::setD):
+ (WebCore::AffineTransform::e):
+ (WebCore::AffineTransform::setE):
+ (WebCore::AffineTransform::f):
+ (WebCore::AffineTransform::setF):
+ (WebCore::AffineTransform::operator== ):
+ (WebCore::AffineTransform::operator!=):
+ (WebCore::AffineTransform::operator*=):
+ (WebCore::AffineTransform::operator*):
+ (WebCore::AffineTransform::setMatrix):
* platform/graphics/wince/GraphicsContextWince.cpp:
- (WebCore::GraphicsContext::canvasClip):
+ (WebCore::GraphicsContext::concatCTM):
+ (WebCore::GraphicsContext::getAffineCTM):
* platform/graphics/wx/GraphicsContextWx.cpp:
- (WebCore::GraphicsContext::canvasClip):
-
-2009-10-15 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/7295738> No way to mute/unmute a movie in full screen video mode
-
- * WebCore.Video.exp: Export muted and setMute.
-
-2009-10-15 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Transitions fail to run sometimes
- https://bugs.webkit.org/show_bug.cgi?id=26770
-
- Fix an issue where we could attempt to start accelerated animations or transitions on
- GraphicsLayer that were not rooted (because of visibility:hidden), which would leave
- the AnimationController's m_waitingForResponse flag in a state that killed subsequent
- software transitions.
-
- * page/animation/AnimationController.cpp:
- (WebCore::AnimationControllerPrivate::AnimationControllerPrivate):
- (WebCore::AnimationControllerPrivate::endAnimationUpdate):
- (WebCore::AnimationControllerPrivate::receivedStartTimeResponse):
- (WebCore::AnimationControllerPrivate::addToStartTimeResponseWaitList):
- (WebCore::AnimationControllerPrivate::startTimeResponse):
- * page/animation/AnimationControllerPrivate.h:
- Make some methods non-inline for ease of debugging (these are not hot methods).
- Rename m_waitingForAResponse to m_waitingForResponse.
-
- * platform/graphics/GraphicsLayer.h:
- * platform/graphics/GraphicsLayer.cpp:
- (WebCore::GraphicsLayer::hasAncestor):
- New method to report whether the receiver has the given layer as an ancestor. Used for checking
- whether a layer is rooted.
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::startAnimation):
- (WebCore::RenderLayerBacking::startTransition):
- Don't try to start accelerated animations or transitions on non-rooted GraphicsLayers.
-
-2009-10-15 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Refactor ProfilesPanel to support multiple profile types
-
- Data describing different profile types are now stored in distinct objects.
- https://bugs.webkit.org/show_bug.cgi?id=30332
-
- * WebCore.vcproj/WebCore.vcproj:
- * inspector/front-end/ProfileView.js:
- (WebInspector.CPUProfileView.profileCallback):
- (WebInspector.CPUProfileView):
- (WebInspector.CPUProfileView.prototype._sortData):
- (WebInspector.CPUProfileType):
- (WebInspector.CPUProfileType.prototype.get buttonTooltip):
- (WebInspector.CPUProfileType.prototype.get buttonStyle):
- (WebInspector.CPUProfileType.prototype.buttonClicked):
- (WebInspector.CPUProfileType.prototype.setRecordingProfile):
- (WebInspector.CPUProfile):
- (WebInspector.CPUProfile.prototype.get title):
- (WebInspector.CPUProfile.prototype.get uid):
- (WebInspector.CPUProfile.prototype.get head):
- (WebInspector.CPUProfile.prototype.createView):
- (WebInspector.CPUProfile.prototype.viewForProfile):
- * inspector/front-end/ProfilesPanel.js:
- (WebInspector.ProfileType):
- (WebInspector.ProfileType.prototype.get buttonTooltip):
- (WebInspector.ProfileType.prototype.get buttonStyle):
- (WebInspector.ProfileType.prototype.get buttonCaption):
- (WebInspector.ProfileType.prototype.get id):
- (WebInspector.ProfileType.prototype.get name):
- (WebInspector.ProfileType.prototype.buttonClicked):
- (WebInspector.ProfilesPanel):
- (WebInspector.ProfilesPanel.prototype.get statusBarItems.clickHandler):
- (WebInspector.ProfilesPanel.prototype.get statusBarItems):
- (WebInspector.ProfilesPanel.prototype.reset):
- (WebInspector.ProfilesPanel.prototype.registerProfileType):
- (WebInspector.ProfilesPanel.prototype._makeKey):
- (WebInspector.ProfilesPanel.prototype.addProfileHeader):
- (WebInspector.ProfilesPanel.prototype.showProfile):
- (WebInspector.ProfilesPanel.prototype.getProfileType):
- (WebInspector.ProfilesPanel.prototype.showProfileForURL):
- (WebInspector.ProfilesPanel.prototype.updateProfileTypeButtons):
- (WebInspector.ProfilesPanel.prototype.displayTitleForProfileLink):
- (WebInspector.ProfilesPanel.prototype.get searchableViews):
- (WebInspector.ProfilesPanel.prototype._updateInterface):
- * inspector/front-end/inspector.js:
- (WebInspector._createPanels):
- (WebInspector.documentClick.followLink):
- (WebInspector.documentClick):
- (WebInspector.addProfileHeader):
- (WebInspector.setRecordingProfile):
- (WebInspector.linkifyStringAsFragment):
- (WebInspector.showProfileForURL):
-
-2009-10-15 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Enable inspector layout tests.
-
- https://bugs.webkit.org/show_bug.cgi?id=30014
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::evaluateForTestInFrontend):
-
-2009-10-15 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- [GStreamer] READY state doesn't mean "enough data"
- https://bugs.webkit.org/show_bug.cgi?id=30003
-
- STATE_READY means MediaPlayer::HaveNothing
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::updateStates):
-
-2009-10-15 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- https://bugs.webkit.org/show_bug.cgi?id=30002
-
- implement cancelLoad
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::cancelLoad):
-
-2009-10-15 Sebastian Dröge <sebastian.droege@collabora.co.uk>
-
- Reviewed by Gustavo Noronha.
-
- https://bugs.webkit.org/show_bug.cgi?id=30353
-
- Fix race condition, leading to a deadlock
-
- * platform/graphics/gtk/VideoSinkGStreamer.cpp:
- (webkit_video_sink_timeout_func):
- (webkit_video_sink_render):
- (unlock_buffer_mutex):
- (webkit_video_sink_unlock):
- (webkit_video_sink_unlock_stop):
- (webkit_video_sink_stop):
- (webkit_video_sink_start):
- (webkit_video_sink_class_init):
- Fix race condition in unlock/render that would lead to deadlocks.
-
-2009-10-15 Sebastian Dröge <sebastian.droege@collabora.co.uk>
-
- Reviewed by Gustavo Noronha.
-
- https://bugs.webkit.org/show_bug.cgi?id=30374
-
- Check if caps are valid before parsing them
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::duration):
- Check if caps are valid before parsing them in ::naturalSize().
- This prevents assertions if the natural size should be calculated
- before the video caps are negotiated.
-
-2009-10-15 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- https://bugs.webkit.org/show_bug.cgi?id=30006
- [GStreamer] Unnecessary checks for Messages types in callbacks
-
- refactored gst message callbacks into a single one
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::mediaPlayerPrivateMessageCallback):
- (WebCore::do_gst_init):
- (WebCore::MediaPlayerPrivate::duration):
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
-
-2009-10-15 Shu Chang <Chang.Shu@nokia.com>
-
- Reviewed by Adele Peterson.
-
- Anchor elements should be mouse focusable regardless isLink flag.
- https://bugs.webkit.org/show_bug.cgi?id=26856
-
- * html/HTMLAnchorElement.cpp:
- * html/HTMLAnchorElement.h:
-
-2009-10-15 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Not reviewed. Sort XCode project file.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-10-15 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Dave Hyatt.
-
- Return correct shorthand property name for
- background-repeat-x, background-repeat-y, background-position-x,
- background-position-y, -webkit-mask-position-x, -webkit-mask-position-y,
- -webkit-mask-repeat-x, -webkit-mask-repeat-y.
-
- https://bugs.webkit.org/show_bug.cgi?id=28972
-
- Test: fast/backgrounds/repeat/background-repeat-shorthand.html
-
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue):
-
-2009-10-14 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Web Inspector: Migrate profiles to the injected script-based schema.
-
- https://bugs.webkit.org/show_bug.cgi?id=30328
-
- * bindings/js/JSInspectorBackendCustom.cpp:
- * bindings/v8/custom/V8CustomBinding.h:
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::getProfileHeaders):
- (WebCore::InspectorBackend::getProfile):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::addProfile):
- (WebCore::InspectorController::getProfileHeaders):
- (WebCore::InspectorController::getProfile):
- (WebCore::InspectorController::createProfileHeader):
- * inspector/InspectorController.h:
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::addProfileHeader):
- (WebCore::InspectorFrontend::didGetProfileHeaders):
- (WebCore::InspectorFrontend::didGetProfile):
- * inspector/InspectorFrontend.h:
- * inspector/JavaScriptProfileNode.cpp:
- (WebCore::ProfileNodeClass):
- * inspector/front-end/ProfileView.js:
- (WebInspector.ProfileView.profileCallback):
- (WebInspector.ProfileView):
- (WebInspector.ProfileView.prototype._mouseDownInDataGrid):
- (WebInspector.ProfileView.prototype._assignParentsInProfile):
- * inspector/front-end/ProfilesPanel.js:
- (WebInspector.ProfilesPanel.prototype.addProfileHeader):
- * inspector/front-end/inspector.js:
- (WebInspector.addProfileHeader):
-
-2009-10-14 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Create and update frontend script objects only when
- web inspector is visible.
-
- https://bugs.webkit.org/show_bug.cgi?id=30376
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::addConsoleMessage):
- (WebCore::InspectorController::populateScriptObjects):
- (WebCore::InspectorController::pruneResources):
- (WebCore::InspectorController::didCommitLoad):
- (WebCore::InspectorController::didLoadResourceFromMemoryCache):
- (WebCore::InspectorController::identifierForInitialRequest):
- (WebCore::InspectorController::mainResourceFiredDOMContentEvent):
- (WebCore::InspectorController::mainResourceFiredLoadEvent):
- (WebCore::InspectorController::willSendRequest):
- (WebCore::InspectorController::didReceiveResponse):
- (WebCore::InspectorController::didReceiveContentLength):
- (WebCore::InspectorController::didFinishLoading):
- (WebCore::InspectorController::didFailLoading):
- (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
- (WebCore::InspectorController::scriptImported):
- (WebCore::InspectorController::didOpenDatabase):
- (WebCore::InspectorController::didUseDOMStorage):
- (WebCore::InspectorController::evaluateForTestInFrontend):
-
-2009-10-15 Joseph Pecoraro <joepeck@webkit.org>
-
- Fix Windows build.
-
- * dom/Document.idl:
-
-2009-10-14 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Adam Barth.
-
- [HTML5] Add document.head
- https://bugs.webkit.org/show_bug.cgi?id=30232
-
- Test is fast/dom/document-head.html
-
- * dom/Document.idl: added readonly attribute head
-
-2009-10-14 Matt Mueller <mattm@chromium.org>
-
- Reviewed by Darin Adler.
-
- Check FNonNeg after the unit switch to avoid valgrind uninitialised conditional reference in WebCore::CSSParser::validUnit. See http://crbug.com/20939.
- https://bugs.webkit.org/show_bug.cgi?id=30347
- https://bugs.webkit.org/show_bug.cgi?id=22772
-
- Covered by running LayoutTests/fast/css/invalid-percentage-property.html under valgrind.
-
- * css/CSSParser.cpp:
- (WebCore::CSSParser::validUnit):
-
-2009-10-14 Adam Barth <abarth@webkit.org>
-
- Reviewed by Sam Weinig.
-
- Move scrolling code from FrameLoader to FrameView
- https://bugs.webkit.org/show_bug.cgi?id=30370
-
- This code is about controlling the Frame's view, not about loading
- stuff into the frame.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::finishedParsing):
- (WebCore::FrameLoader::scrollToAnchor):
- * page/FrameView.cpp:
- (WebCore::FrameView::scrollToFragment):
- (WebCore::FrameView::scrollToAnchor):
- * page/FrameView.h:
-
-2009-10-14 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Geoff Garen.
-
- Make typeinfo flags default to false
- https://bugs.webkit.org/show_bug.cgi?id=30372
-
- Part 1. Reverse the HasStandardGetOwnPropertySlot flag.
-
- * bindings/js/JSDOMBinding.h:
- (WebCore::DOMObjectWithGlobalPointer::createStructure):
- (WebCore::DOMConstructorObject::createStructure):
- * bindings/js/JSDOMWindowShell.h:
- (WebCore::JSDOMWindowShell::createStructure):
- * bindings/js/JSHTMLAllCollection.h:
- (WebCore::JSHTMLAllCollection::createStructure):
- * bindings/js/JSQuarantinedObjectWrapper.h:
- (WebCore::JSQuarantinedObjectWrapper::createStructure):
- * bindings/scripts/CodeGeneratorJS.pm:
- * bridge/objc/objc_runtime.h:
- (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
- * bridge/runtime_array.h:
- (JSC::RuntimeArray::createStructure):
- * bridge/runtime_method.h:
- (JSC::RuntimeMethod::createStructure):
- * bridge/runtime_object.h:
- (JSC::RuntimeObjectImp::createStructure):
-
-2009-10-14 Adam Barth <abarth@webkit.org>
-
- Reviewed by Darin Adler.
-
- [XSSAuditor] Add an exception for local files
- https://bugs.webkit.org/show_bug.cgi?id=30352
-
- Reduce XSS auditor false positives by always letting pages load scripts
- from their own host. We don't actually know of any false positives
- that this prevents, but it seems like a good idea.
-
- One subtly is that we don't add this exception for scripts that have a
- query string because (1) URLs with query strings are more apt to
- confuse servers and (2) it is much less common to load scripts with a
- query string.
-
- Tests: http/tests/security/xssAuditor/script-tag-with-source-same-host-with-query.html
- http/tests/security/xssAuditor/script-tag-with-source-same-host.html
-
- * page/XSSAuditor.cpp:
- (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
-
-2009-10-14 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Reviewed by George Staikos.
-
- Kill virtual contextElement() method spread all over SVG code
- https://bugs.webkit.org/show_bug.cgi?id=30183
-
- Remove virtual contextElement() function from all SVG*Element classes, as all animated properties live in the
- SVG*Element classes now instead of the SVGFitToViewBox / SVGURIReference / SVGExternalResourcesRequired
- subclasses. This is a first step to working animVal support. More patches will follow that depend on this change.
-
- Remove "This file is part of the KDE project" from several files, change my old mail adress wildfox -> zimmermann,
- and remove vim modelines on all files I touched. No change in functionality, thus no new tests.
-
- * svg/SVGAElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
- * svg/SVGAltGlyphElement.h: Remove virtual contextElement() method.
- * svg/SVGAnimatedProperty.h:
- (WebCore::::synchronize):
- (WebCore::::startAnimation):
- (WebCore::::stopAnimation):
- * svg/SVGAnimationElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
- * svg/SVGCircleElement.h: Ditto.
- * svg/SVGClipPathElement.h: Ditto.
- * svg/SVGCursorElement.h: Ditto.
- * svg/SVGDefsElement.h: Ditto.
- * svg/SVGEllipseElement.h: Ditto.
- * svg/SVGExternalResourcesRequired.h: Remove pure-virtual contextElement() method.
- * svg/SVGFEImageElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
- * svg/SVGFELightElement.h: Remove virtual contextElement() method.
- * svg/SVGFEMergeNodeElement.h: Ditto.
- * svg/SVGFilterElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
- * svg/SVGFilterPrimitiveStandardAttributes.h: Remove virtual contextElement() method.
- * svg/SVGFitToViewBox.cpp:
- (WebCore::SVGFitToViewBox::parseViewBox): Add Document* parameter - we used to fetch the Document pointer from the context element.
- (WebCore::SVGFitToViewBox::parseMappedAttribute): Ditto.
- * svg/SVGFitToViewBox.h: Remove pure-virtual contextElement() method.
- * svg/SVGFontElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
- * svg/SVGForeignObjectElement.h: Ditto.
- * svg/SVGGElement.h: Ditto.
- * svg/SVGGradientElement.h: Ditto.
- * svg/SVGImageElement.h: Ditto.
- * svg/SVGLineElement.h: Ditto.
- * svg/SVGMPathElement.h: Ditto. Fix license indention.
- * svg/SVGMarkerElement.cpp:
- (WebCore::SVGMarkerElement::parseMappedAttribute): Pass document() to SVGFitToViewBox::parseMappedAttribute().
- * svg/SVGMarkerElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
- * svg/SVGMaskElement.h: Ditto.
- * svg/SVGPathElement.h: Ditto.
- * svg/SVGPatternElement.cpp:
- (WebCore::SVGPatternElement::parseMappedAttribute): Pass document() to SVGFitToViewBox::parseMappedAttribute().
- * svg/SVGPatternElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
- * svg/SVGPolyElement.cpp:
- (WebCore::SVGPolyElement::updateAnimatedSVGAttribute): synchronizeProperty<...>() has been renamed to PropertySynchronizer<...>::synchronize().
- * svg/SVGPolyElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
- * svg/SVGRectElement.h: Ditto.
- * svg/SVGSVGElement.cpp:
- (WebCore::SVGSVGElement::parseMappedAttribute): Pass document() to SVGFitToViewBox::parseMappedAttribute().
- * svg/SVGSVGElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
- * svg/SVGScriptElement.h: Ditto.
- * svg/SVGSwitchElement.h: Ditto.
- * svg/SVGSymbolElement.cpp:
- (WebCore::SVGSymbolElement::parseMappedAttribute): Pass document() to SVGFitToViewBox::parseMappedAttribute().
- * svg/SVGSymbolElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
- * svg/SVGTRefElement.h: Remove virtual contextElement() method.
- * svg/SVGTextContentElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
- * svg/SVGTextPathElement.h: Remove virtual contextElement() method.
- * svg/SVGUseElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
- * svg/SVGViewElement.cpp:
- (WebCore::SVGViewElement::parseMappedAttribute): Pass document() to SVGFitToViewBox::parseMappedAttribute().
- * svg/SVGViewElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
- * svg/SVGViewSpec.cpp:
- (WebCore::SVGViewSpec::setViewBoxString): Pass document() to SVGFitToViewBox::parseMappedAttribute().
- (WebCore::SVGViewSpec::parseViewSpec): Ditto.
- * svg/SVGViewSpec.h: Devirtualize contextElement() method, it's the only place where contextElement() remains needed.
-
-2009-10-14 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Nikolas Zimmermann.
-
- SVG Masking with wrong offset
- [https://bugs.webkit.org/show_bug.cgi?id=30325]
-
- SVGMaskElement moves the mask image graphics context to the wrong location.
- In objectBoundingBoxMode the maskDestRect gets translated. This transformation
- is not used in the later calculation. Fix by consistenly calculating the translation
- offsets from the final mask destination rect.
-
- Test: svg/custom/mask-with-default-value.svg
-
- * svg/SVGMaskElement.cpp:
- (WebCore::SVGMaskElement::drawMaskerContent):
-
-2009-10-14 Kevin Decker <kdecker@apple.com>
-
- Rubberstamped by Jon Honeycutt.
-
- Export a few more showSubstituteImage() related methods.
-
- * WebCore.base.exp:
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-10-14 Evan Martin <evan@chromium.org>
-
- Reviewed by Darin Adler.
-
- Stringify CSS units manually (without printf) to make the formatting
- locale-insensitive and obey CSS spec with respect to large values.
-
- https://bugs.webkit.org/show_bug.cgi?id=18994
-
- * css/CSSPrimitiveValue.cpp:
- (WebCore::appendCSSDouble):
- (WebCore::formatWithUnits):
- (WebCore::CSSPrimitiveValue::cssText):
-
-2009-10-14 Mark Seaborn <mseaborn@google.com>
-
- Reviewed by Darin Adler.
-
- Check error return value in Perl build script
- https://bugs.webkit.org/show_bug.cgi?id=30316
-
- * css/makevalues.pl: Die if gperf fails.
-
-2009-10-14 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Nikolas Zimmermann.
-
- SVG wrong filterRegions for userSpaceOnUse and percentage values
- [https://bugs.webkit.org/show_bug.cgi?id=30330]
-
- Some clean-up of the SVG filter calculation code. This clean-up
- also fixes the problem with percentage and userSpaceInUse mode.
-
- Test: svg/filters/subRegion-in-userSpace.svg
-
- * platform/graphics/filters/FilterEffect.cpp:
- (WebCore::FilterEffect::FilterEffect):
- * platform/graphics/filters/FilterEffect.h:
- * rendering/SVGRenderSupport.cpp:
- (WebCore::SVGRenderBase::filterBoundingBoxForRenderer):
- * svg/SVGFilterElement.cpp:
- (WebCore::SVGFilterElement::buildFilter):
- (WebCore::SVGFilterElement::canvasResource):
- * svg/SVGFilterElement.h:
- * svg/SVGFilterPrimitiveStandardAttributes.cpp:
- (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes):
- * svg/graphics/SVGResourceFilter.cpp:
- (WebCore::SVGResourceFilter::SVGResourceFilter):
- (WebCore::SVGResourceFilter::~SVGResourceFilter):
- (WebCore::SVGResourceFilter::addFilterEffect):
- (WebCore::SVGResourceFilter::prepareFilter):
- * svg/graphics/SVGResourceFilter.h:
- (WebCore::SVGResourceFilter::create):
- * svg/graphics/filters/SVGFilter.cpp:
- (WebCore::SVGFilter::SVGFilter):
- (WebCore::SVGFilter::calculateEffectSubRegion):
- (WebCore::SVGFilter::create):
- * svg/graphics/filters/SVGFilter.h:
-
-2009-10-14 Chris Marrin <cmarrin@apple.com>
-
- The last change fixed the problem, removing diagnostic printfs.
-
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::GraphicsContext3D):
-
-2009-10-14 Kevin Ollivier <kevino@theolliviers.com>
-
- CURL build fix for versions < 7.18.
-
- * platform/network/curl/ResourceHandleCurl.cpp:
- (WebCore::ResourceHandle::setDefersLoading):
- * platform/network/curl/ResourceHandleManager.cpp:
- (WebCore::ResourceHandleManager::initializeHandle):
-
-2009-10-14 Chris Marrin <cmarrin@apple.com>
-
- One more round of changes to figure out why the webgl
- tests are crashing on the build bot. Here I am trying
- to see if we can create a software renderer. I am also
- printing the found pixel formats.
-
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::GraphicsContext3D):
-
-2009-10-14 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Enabling NPAPI plugin support on Qt Webkit for S60 platform
- https://bugs.webkit.org/show_bug.cgi?id=29302
-
- Also implemented by Mahesh Kulkarni<mahesh.kulkarni@nokia.com>,
- Rohini Ananth <rohini.ananth@nokia.com> and help from Norbert Lesr
- <norbert.leser@nokia.com>
-
- * WebCore.pro:
- Enabling ENABLE_NETSCAPE_PLUGIN_API for S60 and added S60 specific
- new plugin files to be compiled under symbian: macro
-
- * bridge/npapi.h:
- Added NPEvent and NPRegion definition for Symbian
-
- * plugins/PluginPackage.h:
- Added S60 specific plugin interface and plugin loader variables
- * plugins/PluginPackage.cpp:
- (WebCore::PluginPackage::unload): Added !PLATFORM(SYMBIAN) macro.
- Default implementation to be used only for non-symbian platform
- * plugins/PluginDatabase.cpp:
- Macro !SYMBIAN checking
- * plugins/PluginView.h:
- Add Symbian to platforms that support setNPWindowIfNeeded
- * plugins/PluginView.cpp:
- (WebCore::PluginView::setFrameRect): Add Symbian to platforms that
- call setNPWindowRect from setFrameRect
-
- Added folder 'symbian' which contains implementation files for S60
- platform-specific NPAPI plugin functionality, under /plugins folder
- * plugins/symbian
- * plugins/symbian/npinterface.h:
- Plugin Interface to be implemented by S60 NPAPI plugins
- * plugins/symbian/PluginContainerSymbian.h:
- * plugins/symbian/PluginContainerSymbian.cpp:
- * plugins/symbian/PluginDatabaseSymbian.cpp:
- * plugins/symbian/PluginViewSymbian.cpp:
- * plugins/symbian/PluginPackageSymbian.cpp:
-
-2009-10-14 Chris Marrin <cmarrin@apple.com>
-
- More changes to figure out why the webgl tests are crashing on the build bot.
-
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::GraphicsContext3D):
-
-2009-10-14 Victor Wang <victorw@chromium.org>
-
- Reviewed by David Hyatt.
-
- Round non-integer line height values.
-
- Change webkit to rounding non-integer line height values
- instead of truncating them. This fixes a layout test
- failure on Windows and matches the calculation in IE and Firefox.
-
- https://bugs.webkit.org/show_bug.cgi?id=24434
-
- Test: fast/css/line-height-rounding.html
- fast/forms/textarea-scrollbar-height.htm
-
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::computeLogicalBoxHeights):
- * rendering/RenderBR.cpp:
- (WebCore::RenderBR::lineHeight):
- * rendering/style/RenderStyle.h:
- (WebCore::InheritedFlags::computedLineHeight):
-
-2009-10-13 Kelly Norton <knorton@google.com>
-
- Reviewed by Pavel Feldman.
-
- Removes the persistent setting for InspectorTimelineAgent and renames timeline related
- interfaces to be more consistent with the JavaScript profiler.
-
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::startTimelineProfiler):
- (WebCore::InspectorBackend::stopTimelineProfiler):
- (WebCore::InspectorBackend::timelineProfilerEnabled):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::setFrontendProxyObject):
- (WebCore::InspectorController::startTimelineProfiler):
- (WebCore::InspectorController::stopTimelineProfiler):
- (WebCore::InspectorController::timelineProfilerEnabled):
- * inspector/InspectorController.h:
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::timelineProfilerWasStarted):
- (WebCore::InspectorFrontend::timelineProfilerWasStopped):
- * inspector/InspectorFrontend.h:
- * inspector/front-end/TimelineAgent.js:
- (WebInspector.timelineProfilerWasStarted):
- (WebInspector.timelineProfilerWasStopped):
-
-2009-10-01 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Adele Peterson.
-
- Fix crash when loading invalid image data
- https://bugs.webkit.org/show_bug.cgi?id=29980
-
- * rendering/RenderImage.cpp:
- (WebCore::RenderImage::setImageSizeForAltText):
-
-2009-10-09 Stephen White <senorblanco@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Fix for NULL ptr deref in canvas's toDataURL().
- https://bugs.webkit.org/show_bug.cgi?id=30254
-
- Test: fast/canvas/canvas-toDataURL-crash.html
-
- * html/HTMLCanvasElement.cpp:
- (WebCore::HTMLCanvasElement::toDataURL):
-
-2009-10-14 Pavel Feldman <pfeldman@chromium.org>
-
- Not reviewed, reverting r49558 since it broke profiler tests.
-
- https://bugs.webkit.org/show_bug.cgi?id=30328
-
- * bindings/js/JSInspectorBackendCustom.cpp:
- * bindings/v8/custom/V8CustomBinding.h:
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::getProfileHeaders):
- (WebCore::InspectorBackend::getProfile):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::addProfile):
- (WebCore::InspectorController::getProfileHeaders):
- (WebCore::InspectorController::getProfile):
- (WebCore::InspectorController::createProfileHeader):
- * inspector/InspectorController.h:
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::addProfileHeader):
- (WebCore::InspectorFrontend::didGetProfileHeaders):
- (WebCore::InspectorFrontend::didGetProfile):
- * inspector/InspectorFrontend.h:
- * inspector/JavaScriptProfileNode.cpp:
- (WebCore::ProfileNodeClass):
- * inspector/front-end/ProfileView.js:
- (WebInspector.ProfileView.profileCallback):
- (WebInspector.ProfileView):
- (WebInspector.ProfileView.prototype._mouseDownInDataGrid):
- (WebInspector.ProfileView.prototype._assignParentsInProfile):
- * inspector/front-end/ProfilesPanel.js:
- (WebInspector.ProfilesPanel.prototype.addProfileHeader):
- * inspector/front-end/inspector.js:
- (WebInspector.addProfileHeader):
-
-2009-10-13 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by Simon Hausmann.
-
- ImageDecoderQt: Minor tweaks to the decoder
-
- - Only cache the data when we start to use it.
- - Start with a repetition count of none for normal images.
- - Do not use canRead as this will trigger parsing of the full image
- - Cope with a GIF failing to decode the first frame, do not
- set m_failed to true if decoding the first frame failed
- - Inform the QImageReader about the format that was detected
- - Always create a ImageDecoderQt when when we have more
- than four byte.
-
-
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoder::create): Always create QImageReader for a significant speed up
- (WebCore::ImageDecoderQt::ImageDecoderQt): Initialize m_repetitionCount to cAnimationNone
- (WebCore::ImageDecoderQt::setData): Only call ImageDecoder::setData when everything has been received
- (WebCore::ImageDecoderQt::isSizeAvailable): Do not check m_failed twice.
- (WebCore::ImageDecoderQt::filenameExtension): Convert from QByteArray to String
- (WebCore::ImageDecoderQt::frameBufferAtIndex): Check for m_failed before trying to decode
- (WebCore::ImageDecoderQt::internalDecodeSize): Fail if the size is QSize()
- (WebCore::ImageDecoderQt::forceLoadEverything): Handle the case were decoding the first frame fails
- * platform/graphics/qt/ImageDecoderQt.h: Change the m_format type
-
-2009-10-14 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Web Inspector: Migrate profiles to the injected script-based schema.
-
- https://bugs.webkit.org/show_bug.cgi?id=30328
-
- * bindings/js/JSInspectorBackendCustom.cpp:
- * bindings/v8/custom/V8CustomBinding.h:
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::getProfileHeaders):
- (WebCore::InspectorBackend::getProfile):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::addProfile):
- (WebCore::InspectorController::getProfileHeaders):
- (WebCore::InspectorController::getProfile):
- (WebCore::InspectorController::createProfileHeader):
- * inspector/InspectorController.h:
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::addProfileHeader):
- (WebCore::InspectorFrontend::didGetProfileHeaders):
- (WebCore::InspectorFrontend::didGetProfile):
- * inspector/InspectorFrontend.h:
- * inspector/JavaScriptProfileNode.cpp:
- (WebCore::ProfileNodeClass):
- * inspector/front-end/ProfileView.js:
- (WebInspector.ProfileView.profileCallback):
- (WebInspector.ProfileView):
- (WebInspector.ProfileView.prototype._mouseDownInDataGrid):
- (WebInspector.ProfileView.prototype._assignParentsInProfile):
- * inspector/front-end/ProfilesPanel.js:
- (WebInspector.ProfilesPanel.prototype.addProfileHeader):
- * inspector/front-end/inspector.js:
- (WebInspector.addProfileHeader):
-
-2009-10-13 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Pavel Feldman.
-
- Don't collect call frame properties until they're needed for completion.
-
- https://bugs.webkit.org/show_bug.cgi?id=30334
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype.completions):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.getCompletions): if call frame id is specified and the expression is empty collect frame properties.
- (InjectedScript.CallFrameProxy.prototype._wrapScopeChain): don't send call frame properties until they're needed.
- * inspector/front-end/ScriptsPanel.js:
-
-2009-10-13 Yongjun Zhang <yongjun.zhang@nokia.com>
-
- Reviewed by Ariya Hidayat.
-
- https://bugs.webkit.org/show_bug.cgi?id=29106
- [Qt] make CachedResourceHandle.h compile in winscw Symbian compiler.
-
- Don't inline constructor CachedResourceHandle<T>(R*) to stop winscw
- compiler aggressively resolve inheritance of class R.
-
- The winscw compiler bug is reported at:
- https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812.
-
- The change should be reverted when the above bug is fixed in winscw compiler.
-
- * loader/CachedResourceHandle.h:
- (WebCore::::CachedResourceHandle):
-
-2009-10-13 Dimitri Glazkov <dglazkov@chromium.org>
-
- No review, rolling out r49554, because it broke Win and Chromium builds.
- http://trac.webkit.org/changeset/49554
-
- * css/CSSPrimitiveValue.cpp:
- (WebCore::CSSPrimitiveValue::cssText):
-
-2009-10-13 Evan Martin <evan@chromium.org>
-
- Reviewed by Adam Barth.
-
- Stringify CSS units manually (without printf) to make the formatting
- locale-insensitive and obey CSS spec with respect to large values.
-
- https://bugs.webkit.org/show_bug.cgi?id=18994
-
- * css/CSSPrimitiveValue.cpp:
- (WebCore::appendCSSDouble):
- (WebCore::formatWithUnits):
- (WebCore::CSSPrimitiveValue::cssText):
-
-2009-10-13 Evan Martin <evan@chromium.org>
-
- Reviewed by David Levin.
-
- Make grippy lines vertical on horizontal scrollbars in Linux Chrome.
- While we're rebaselining scrollbars, fix an off by one in the vertical
- scrollbar rendering too.
-
- https://bugs.webkit.org/show_bug.cgi?id=30319
-
- Tests: this is covered by every pixel test involving scrollbars.
-
- * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
- (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
-
-2009-10-13 Sam Weinig <sam@webkit.org>
-
- Reviewed by David Hyatt.
-
- Fix issue where clientX and clientY on MouseEvents were wrong when
- the page was zoomed and scrolled.
-
- Test: fast/events/clientXY-in-zoom-and-scroll.html
-
- * dom/MouseRelatedEvent.cpp:
- (WebCore::contentsX): Take page zoom into account.
- (WebCore::contentsY): Ditto.
-
-2009-10-13 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Adam Roben.
-
- Change the order of arguments on some of the user stylesheet/script functions. Split the removal functions
- out into separate ones for scripts and stylesheets.
-
- * WebCore.base.exp:
- * page/PageGroup.cpp:
- (WebCore::PageGroup::addUserScriptToWorld):
- (WebCore::PageGroup::addUserStyleSheetToWorld):
- (WebCore::PageGroup::removeUserScriptFromWorld):
- (WebCore::PageGroup::removeUserStyleSheetFromWorld):
- (WebCore::PageGroup::removeUserScriptsFromWorld):
- (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
- * page/PageGroup.h:
- (WebCore::PageGroup::userScripts):
- (WebCore::PageGroup::userStyleSheets):
-
-2009-10-13 Evan Martin <evan@chromium.org>
-
- Reviewed by Dmitry Titov.
-
- Chrome's "Skia" theme paints select controls backwards in RTL.
-
- https://bugs.webkit.org/show_bug.cgi?id=30320
-
- Test: fast/text/international/bidi-menulist.html
- (The test is about something else, but it includes RTL selects.)
-
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::paintMenuList): flip the arrow position in RTL case.
-
-2009-10-13 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- https://bugs.webkit.org/show_bug.cgi?id=30318
- ScriptExecutionContext is not anymore needed to create an EventListener - remove old code.
- It's a followup to r48884. It removed the need to pass the ScritpExecutionContext
- into EventListener constructor but did not remove the code pulling ScriptExecutionContext.
-
- Tests:
- Test adds event listener to a DocumentType Node which is created without a document
- and then dispatches the event after attaching a node to the tree. Event
- should fire when node is attached to the tree.
-
- * fast/events/add-event-without-document-expected.txt: Added.
- * fast/events/add-event-without-document.html: Added.
-
- All changes in files below are the same - remove the code that calls
- EventTarget::scriptExecutionContext and checks it for NULL.
-
- * bindings/js/JSAbstractWorkerCustom.cpp:
- (WebCore::JSAbstractWorker::addEventListener):
- (WebCore::JSAbstractWorker::removeEventListener):
- * bindings/js/JSDOMApplicationCacheCustom.cpp:
- (WebCore::JSDOMApplicationCache::addEventListener):
- (WebCore::JSDOMApplicationCache::removeEventListener):
- * bindings/js/JSDesktopNotificationsCustom.cpp:
- (WebCore::JSNotification::addEventListener):
- (WebCore::):
- * bindings/js/JSEventSourceCustom.cpp:
- (WebCore::JSEventSource::addEventListener):
- (WebCore::JSEventSource::removeEventListener):
- * bindings/js/JSMessagePortCustom.cpp:
- (WebCore::JSMessagePort::addEventListener):
- (WebCore::JSMessagePort::removeEventListener):
- * bindings/js/JSNodeCustom.cpp:
- (WebCore::JSNode::addEventListener):
- (WebCore::JSNode::removeEventListener):
- * bindings/js/JSSVGElementInstanceCustom.cpp:
- (WebCore::JSSVGElementInstance::addEventListener):
- (WebCore::JSSVGElementInstance::removeEventListener):
- * bindings/js/JSXMLHttpRequestCustom.cpp:
- (WebCore::JSXMLHttpRequest::addEventListener):
- (WebCore::JSXMLHttpRequest::removeEventListener):
- * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
- (WebCore::JSXMLHttpRequestUpload::addEventListener):
- (WebCore::JSXMLHttpRequestUpload::removeEventListener):
- * bindings/js/JSWebSocketCustom.cpp:
- (WebCore::JSWebSocket::addEventListener):
- (WebCore::JSWebSocket::removeEventListener):
-
-2009-10-13 Drew Wilson <atwilson@atwilson-macpro.local>
-
- Reviewed by David Levin.
-
- Enable SHARED_WORKERS for Chromium
- https://bugs.webkit.org/show_bug.cgi?id=30289
-
- Cleaned up bitrot in SharedWorker V8 bindings.
-
- * WebCore.gypi:
- Removed default implementation of SharedWorkerRepository so Chromium can provide its own.
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- Added V8SharedWorkerContext.cpp.
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getTemplate):
- Added case statements for SHAREDWORKER and SHAREDWORKERCONTEXT.
- * bindings/v8/V8Index.cpp:
- Now includes V8SharedWorkerContext.h to allow supporting SharedWorkers.
- * bindings/v8/V8Index.h:
- Added definition for SHAREDWORKERCONTEXT wrapper.
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- Added includes for SharedWorker.h and SharedWorkerContext.h.
- * bindings/v8/custom/V8CustomBinding.h:
- Reorganized Worker field indexes to be clearer, and fixed mismatch in worker field index.
- Also added field indexes for SharedWorkers.
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::ACCESSOR_RUNTIME_ENABLER):
- Added runtime enabler for the SharedWorker constructor.
- * bindings/v8/custom/V8SharedWorkerCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- Cleaned up bitrot (various APIs have changed since this file was written).
- * page/DOMWindow.idl:
- Added EnabledAtRuntime flag to window.SharedWorker.
-
-2009-10-13 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Brady Eidson.
-
- https://bugs.webkit.org/show_bug.cgi?id=30345
- HTTP tests for credential handling fail on Tiger
-
- We cannot prevent NSURLConnection from doing its credentil handling on Tiger anyway; so
- let it do its work without intervention. Once again, we pass explicitly passed credentials
- in URL, fixing regressions from Safari 3.
-
- * platform/network/mac/ResourceHandleMac.mm:
- (WebCore::ResourceHandle::start):
- (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
- (WebCore::ResourceHandle::receivedCredential):
-
-2009-10-13 Roland Steiner <rolandsteiner@google.com>
-
- Reviewed by Adam Barth.
-
- Bug 28964 - [Chromium] ChromiumDataObject should have getter/setter interface
-
- Reworked and added to the getter/setter interface in ChromiumDataObject:
- - added contains...() methods to just query the state
- - added containsValid...URL() methods for URL data members
- - removed takeFileNames() as this was too type-dependent
- - changed return type of fileNames() to Vector<String>
- - added interface methods to allow appending to and iteration over file names
-
- No new tests (no functional behavior changed).
-
- * platform/chromium/ChromiumDataObject.h:
- (WebCore::ChromiumDataObject::containsMainURL):
- (WebCore::ChromiumDataObject::containsValidMainURL):
- (WebCore::ChromiumDataObject::containsMainURLTitle):
- (WebCore::ChromiumDataObject::containsTextPlain):
- (WebCore::ChromiumDataObject::containsTextHTML):
- (WebCore::ChromiumDataObject::containsHTMLBaseURL):
- (WebCore::ChromiumDataObject::containsValidHTMLBaseURL):
- (WebCore::ChromiumDataObject::containsContent):
- (WebCore::ChromiumDataObject::containsContentFileExtension):
- (WebCore::ChromiumDataObject::containsContentFileName):
- (WebCore::ChromiumDataObject::setContentFileName):
- (WebCore::ChromiumDataObject::containsFileNames):
- (WebCore::ChromiumDataObject::fileNames):
- (WebCore::ChromiumDataObject::clearFileNames):
- (WebCore::ChromiumDataObject::countFileNames):
- (WebCore::ChromiumDataObject::fileNameAt):
- (WebCore::ChromiumDataObject::setFileNames):
- (WebCore::ChromiumDataObject::appendToFileNames):
- (WebCore::ChromiumDataObject::popFileName):
-
-2009-10-13 Simon Fraser <simon.fraser@apple.com>
-
- Temporary debugging changes to figure out why the webgl tests are crashing on the build bot.
-
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::GraphicsContext3D):
-
-2009-10-13 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Visibility:visible inside a compositing layer doesn't make the element visible
- https://bugs.webkit.org/show_bug.cgi?id=30339
-
- When deciding if a layer had any renderable content, RenderLayerBacking::paintIntoLayer()
- only consulted hasVisibleContent(), which does not take into a account child layers which
- may be visible. We also have to consult hasVisibleDescendant() as well.
-
- Test: compositing/compositing-visible-descendant.html
-
- * rendering/RenderLayer.h:
- (WebCore::RenderLayer::hasVisibleDescendant):
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::paintIntoLayer):
-
-2009-10-13 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Refactor ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
- https://bugs.webkit.org/show_bug.cgi?id=30278
-
- Move the definition of ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
- from the make system into common code.
-
- Enable ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH if NETSCAPE_PLUGIN_API
- support is not enabled.
-
- Remove notImplemented() from PluginPackageNone.cpp and
- PluginDataNone.cpp make them just empty functions.
-
- * GNUmakefile.am:
- * WebCore.pro:
- * plugins/PluginDataNone.cpp:
- (WebCore::PluginData::initPlugins):
- (WebCore::PluginData::refresh):
- * plugins/PluginPackageNone.cpp:
- (WebCore::PluginPackage::determineQuirks):
- (WebCore::PluginPackage::fetchInfo):
- (WebCore::PluginPackage::load):
-
-2009-10-13 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=30150
- <rdar://problem/7283540> REGRESSION: Crash when accessing clipboardData.types
-
- Test: editing/pasteboard/crash-accessing-clipboardData-types.html
-
- * platform/mac/ClipboardMac.mm: (WebCore::addHTMLClipboardTypesForCocoaType): The String
- class doesn't have operator bool, it's operator NSString* that is invoked instead, and it
- converts null strings to non-null @"".
-
-2009-10-13 Drew Wilson <atwilson@atwilson-macpro.local>
-
- Reviewed by Dimitri Glazkov.
-
- window attributes (like localStorage) that are disabled at runtime are still visible
- https://bugs.webkit.org/show_bug.cgi?id=30240
-
- Adding codegen/bindings to support runtime disabling of attributes.
-
- No new tests (only supported by chrome currently)
-
- * bindings/scripts/CodeGeneratorV8.pm:
- Refactored the guts of GenerateBatchedAttributeData into a separate GenerateSingleBatchedAttribute with a passed-in indentation level to allow generating a single BatchedAttribute struct.
- Added support for the EnabledAtRuntime extended attribute, which generates a call to the appropriate XXXXEnabled() API before adding the attribute to the instance.
- * bindings/v8/V8Proxy.cpp:
- (WebCore::batchConfigureAttributes):
- Refactored attribute setting code into a common inline routine.
- * bindings/v8/V8Proxy.h:
- (WebCore::configureAttribute):
- Inline function which configures a single attribute given a BatchedAttribute struct.
- * bindings/v8/custom/V8CustomBinding.h:
- Added (DECLARE_)ACCESSOR_RUNTIME_ENABLER to allow enabling attributes at runtime.
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- Added code to enable window.Audio only if MediaPlayer.isAvailable() == true
- * page/DOMWindow.idl:
- Added [EnabledAtRuntime] extended attribute to the Audio attribute.
-
-2009-10-13 Michelangelo De Simone <micdesim@gmail.com>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=27457
- Added support for static validation on type=email input elements as per
- HTML5 specs:
- http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state
-
- Test: fast/forms/ValidityState-typeMismatch-email.html
-
- * html/ValidityState.cpp:
- (WebCore::ValidityState::typeMismatch): ValidityState.typeMismatch
- performs validation on type=email input elements now.
- (WebCore::ValidityState::isValidEmailAddress): simple validation method
- * html/ValidityState.h:
-
-2009-10-13 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by Adam Barth.
-
- Event listeners installed on a window object returned from window.open() don't work
- https://bugs.webkit.org/show_bug.cgi?id=28716
-
- Tests: http/tests/security/window-events-clear-domain.html
- http/tests/security/window-events-clear-port.html
- http/tests/security/window-events-pass.html
-
- * dom/Document.cpp: Split code of Document::clear() in a way to avoid removing all
- window event handlers when implicitOpen is called. It is called in 2 cases - on
- committing loaded content (no need to clean handlers) and on document.open() (needs to remove handlers).
-
- (WebCore::Document::open): in addition to calling implicitOpen it also removes window
- event handlers, to preserve the behavior of document.open().
-
- (WebCore::Document::implicitOpen): includes the part of removed Document::clear() that
- does not remove window event handlers.
-
- * dom/Document.h: Removed clear().
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::stopLoading): add check to avoid removing window event handlers
- if we transition from temporary empty document to a loaded one.
-
- (WebCore::FrameLoader::didOpenURL): Remove closeURL() which was called twice when loading.
- (WebCore::FrameLoader::finishedLoadingDocument): add closeURL() to compensate for change above.
-
-2009-10-13 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Pavel Feldman.
-
- Fix a leak in the inspector by calling didRemoveNode with
- an error code when it fails, instead of returning from the
- Backend.
-
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::removeNode):
- * inspector/front-end/ElementsTreeOutline.js:
-
-2009-10-13 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <https://bugs.webkit.org/show_bug.cgi?id=30337>.
- Web Inspector: Should be able to delete nodes from the Elements Tree.
-
- When the delete key is pressed and a element is selected in the tree,
- the element should be deleted from the Elements Tree and the DOM.
-
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::removeNode):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::didRemoveNode):
- * inspector/InspectorFrontend.h:
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.prototype._updateModifiedNodes):
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeOutline.prototype.handleKeyEvent):
-
-2009-10-13 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fix REGRESSION(49479): Mouseover on resources graph doesn't show timings.
-
- Set pointer-events: none on the new overlay so mouseover events are passed
- to the resources graph so we can show timings.
-
- * inspector/front-end/inspector.css:
-
-2009-10-13 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Plugins : Remove all traces of winId. Use ownerWidget() instead.
-
- This is a bug for two reasons:
- 1. Everytime we use winId(), we end up creating a native widget. This causes an
- unnecessary copy of contents from the backing store to the native widget.
- 2. Neither windowed nor windowless plugins require the winId of the QWebView or
- QGraphicsView.
-
- Introduce ownerWidget() which returns a QWidget * without creating a native widget
- (as opposed to QWidget::find(winId)).
-
- https://bugs.webkit.org/show_bug.cgi?id=30170
-
- * platform/qt/PlatformScreenQt.cpp:
- (WebCore::screenDepthPerComponent):
- * platform/qt/PopupMenuQt.cpp:
- (WebCore::PopupMenu::show):
- * platform/qt/QWebPageClient.h:
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::setSharedXEventFields):
- (WebCore::PluginView::initXEvent):
- (WebCore::PluginView::getValue):
- (WebCore::PluginView::platformStart):
-
-2009-10-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Unreviewed build system fix. Typo in a filename.
-
- * GNUmakefile.am:
-
-2009-10-12 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Timothy Hatcher.
- Alter profile link format to enable multiple profile types
- https://bugs.webkit.org/show_bug.cgi?id=30253
-
- The new profile URL includes the profile type along with the
- profile title and uid.
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::addProfileFinishedMessageToConsole):
- (WebCore::InspectorController::addStartProfilingMessageToConsole):
- * inspector/front-end/inspector.js:
- (WebInspector.documentClick.followLink):
- (WebInspector.documentClick):
- (WebInspector.linkifyStringAsFragment):
-
-2009-10-12 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Fix same-named profiles grouping in the Profiles panel.
-
- The tree node re-parenting while adding a new group node was broken.
-
- https://bugs.webkit.org/show_bug.cgi?id=30299
-
- * inspector/front-end/ProfilesPanel.js:
- (WebInspector.ProfilesPanel.prototype.addProfile):
-
-2009-10-12 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Enforce async interaction between inspector controller and frontend.
-
- https://bugs.webkit.org/show_bug.cgi?id=30300
-
- * inspector/front-end/inspector.js:
- (WebInspector.dispatch.delayDispatch):
- (WebInspector.dispatch):
-
-2009-10-12 Xiaomei Ji <xji@chromium.org>
-
- Reviewed by Sam Weinig.
-
- Fix issue caretRangeFromPoint() returns wrong result for a zoomed and
- scrolled page.
- https://bugs.webkit.org/show_bug.cgi?id=30034
-
- * dom/Document.cpp:
- (WebCore::Document::elementFromPoint): calculate the correct point
- relative to document when the page is zoomed and scrolled.
- (WebCore::Document::caretRangeFromPoint): calculate the correct point
- relative to document when the page is zoomed and scrolled.
-
-2009-10-12 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Sam Weinig.
-
- JavaScript bindings of WebSocket addEventListener/removeEventListener
- https://bugs.webkit.org/show_bug.cgi?id=29841
-
- Test: fast/websockets/websocket-event-target.html
-
- * bindings/js/JSWebSocketCustom.cpp:
- (WebCore::JSWebSocket::addEventListener):
- (WebCore::JSWebSocket::removeEventListener):
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8WebSocketCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * websockets/WebSocket.idl:
-
-2009-10-12 Sam Weinig <sam@webkit.org>
-
- Reviewed by Darin Adler.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=29078
- <rdar://problem/7288221>
-
- Add a mechanism to blacklist certain codecs. Initially, just blacklist UTF-7 as HTML5 encourages.
-
- * platform/text/TextEncodingRegistry.cpp:
- (WebCore::pruneBlacklistedCodecs):
- (WebCore::buildBaseTextCodecMaps):
- (WebCore::extendTextCodecMaps):
-
-2009-10-09 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Darin Adler.
-
- Add support for the beforeload event to frames. Complete support of the beforeload event by making sure
- its wrapper gets properly constructed (so that the URL field of the event can be accessed). Add support
- for the Objective-C wrapper class as well.
-
- Added fast/dom/beforeload/frame-before-load.html
-
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSEventCustom.cpp:
- (WebCore::toJS):
- * bindings/objc/DOMEvents.mm:
- (kitClass):
- * dom/BeforeLoadEvent.h:
- (WebCore::BeforeLoadEvent::isBeforeLoadEvent):
- * dom/Event.cpp:
- (WebCore::Event::isBeforeLoadEvent):
- * dom/Event.h:
- * html/HTMLFrameElementBase.cpp:
- (WebCore::HTMLFrameElementBase::parseMappedAttribute):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::loadWithDocumentLoader):
-
-2009-10-12 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Simon Fraser.
-
- Fix <rdar://problem/7094146> Reproducible crash at
- RenderObject::localToAbsolute()
-
- Test: fast/dynamic/position-absolute-to-fixed-crash.html
-
- The crash was caused by stale positioned objects lists following an
- object transitioning from being absolutely position to being fixed
- positioned.
-
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::styleWillChange): In case of a transition between
- absolute and fixed position, mark the parent as having a child needing
- layout, so that this object will get inserted into its new container's
- positioned objects list.
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::styleWillChange): Changed a condition to cover
- this transition, so that this object gets removed from its current
- container's positioned objects list.
-
-2009-10-12 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Hausmann.
-
- Add a palette() method that is needed by our RenderTheme.
-
- * platform/qt/QWebPageClient.h:
-
-2009-10-12 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Nikolas Zimmermann.
-
- SVG Gradients can't handle percentage values in userSpaceOnUse mode
- [https://bugs.webkit.org/show_bug.cgi?id=30286]
-
- Fixed *GradientAttributes to take SVGLength instead of double. This casues
- the problem, that we can't calculate the correct size of a gradient on
- userSpaceOnUse mode with percentage values.
-
- Test: svg/custom/gradient-userSpaceOnUse-with-percentage.svg
-
- * svg/LinearGradientAttributes.h:
- (WebCore::LinearGradientAttributes::LinearGradientAttributes):
- (WebCore::LinearGradientAttributes::x1):
- (WebCore::LinearGradientAttributes::y1):
- (WebCore::LinearGradientAttributes::x2):
- (WebCore::LinearGradientAttributes::y2):
- (WebCore::LinearGradientAttributes::setX1):
- (WebCore::LinearGradientAttributes::setY1):
- (WebCore::LinearGradientAttributes::setX2):
- (WebCore::LinearGradientAttributes::setY2):
- * svg/RadialGradientAttributes.h:
- (WebCore::RadialGradientAttributes::RadialGradientAttributes):
- (WebCore::RadialGradientAttributes::cx):
- (WebCore::RadialGradientAttributes::cy):
- (WebCore::RadialGradientAttributes::r):
- (WebCore::RadialGradientAttributes::fx):
- (WebCore::RadialGradientAttributes::fy):
- (WebCore::RadialGradientAttributes::setCx):
- (WebCore::RadialGradientAttributes::setCy):
- (WebCore::RadialGradientAttributes::setR):
- (WebCore::RadialGradientAttributes::setFx):
- (WebCore::RadialGradientAttributes::setFy):
- * svg/SVGLinearGradientElement.cpp:
- (WebCore::SVGLinearGradientElement::buildGradient):
- (WebCore::SVGLinearGradientElement::collectGradientProperties):
- * svg/SVGRadialGradientElement.cpp:
- (WebCore::SVGRadialGradientElement::buildGradient):
- (WebCore::SVGRadialGradientElement::collectGradientProperties):
-
-2009-10-12 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <http://webkit.org/b/30315>.
- Web Inspector: DOM Content and Load lines in Resources are unclear what they mean.
-
- Add tooltip text to the Load event and DOM Content event lines through
- a new layer that allows these lines to be on top of the view.
-
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel.prototype._updateGraphDividersIfNeeded):
- (WebInspector.ResourcesPanel.prototype._updateDividersLabelBarPosition):
- * inspector/front-end/inspector.css:
-
-2009-10-12 Dimitri Glazkov <dglazkov@chromium.org>
-
- No review, rolling out r49429, because it broke layout tests.
- http://trac.webkit.org/changeset/49429
-
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::~V8AbstractEventListener):
-
-2009-10-12 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Eric Seidel.
-
- SVG - crash on feMerge when input not available
- [https://bugs.webkit.org/show_bug.cgi?id=30297]
-
- Make a early return in SVGFEMergeElement if the needed
- filter effect doesn't exist.
-
- Test: svg/filters/feMerge-wrong-input.svg
-
- * svg/SVGFEMergeElement.cpp:
- (WebCore::SVGFEMergeElement::build):
-
-2009-10-12 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Added automatic flush before compositing
- https://bugs.webkit.org/show_bug.cgi?id=30236
-
- This causes image to always render correctly. In writing a testcase
- I needed to implement readPixels. This exposed a bug in reading back
- values from a CanvasArray subclass, so I fixed that as well. Now when
- you wrap a CanvasArray in a JSValue it actually wraps the specific
- subclass. To do this I need to add virtual methods to each CanvasArray
- subclass to determine the type and a custom toJS method for CanvasArray
- to create the proper wrapper.
-
- Test: fast/canvas/webgl/triangle.html
-
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSCanvasArrayCustom.cpp:
- (WebCore::toJS):
- * html/canvas/CanvasArray.h:
- (WebCore::CanvasArray::isByteArray):
- (WebCore::CanvasArray::isUnsignedByteArray):
- (WebCore::CanvasArray::isShortArray):
- (WebCore::CanvasArray::isUnsignedShortArray):
- (WebCore::CanvasArray::isIntArray):
- (WebCore::CanvasArray::isUnsignedIntArray):
- (WebCore::CanvasArray::isFloatArray):
- * html/canvas/CanvasArray.idl:
- * html/canvas/CanvasByteArray.h:
- (WebCore::CanvasByteArray::isByteArray):
- * html/canvas/CanvasFloatArray.h:
- (WebCore::CanvasFloatArray::isFloatArray):
- * html/canvas/CanvasIntArray.h:
- (WebCore::CanvasIntArray::isIntArray):
- * html/canvas/CanvasRenderingContext3D.cpp:
- (WebCore::CanvasRenderingContext3D::readPixels):
- * html/canvas/CanvasRenderingContext3D.h:
- * html/canvas/CanvasRenderingContext3D.idl:
- * html/canvas/CanvasShortArray.h:
- (WebCore::CanvasShortArray::isShortArray):
- * html/canvas/CanvasUnsignedByteArray.h:
- (WebCore::CanvasUnsignedByteArray::isUnsignedByteArray):
- * html/canvas/CanvasUnsignedIntArray.h:
- (WebCore::CanvasUnsignedIntArray::isUnsignedIntArray):
- * html/canvas/CanvasUnsignedShortArray.h:
- (WebCore::CanvasUnsignedShortArray::isUnsignedShortArray):
- * platform/graphics/GraphicsContext3D.h:
- * platform/graphics/mac/Canvas3DLayer.mm:
- (-[Canvas3DLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]):
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::readPixels):
-
-2009-10-12 Sebastian Dröge <sebastian.droege@collabora.co.uk>
-
- Reviewed by Gustavo Noronha.
-
- https://bugs.webkit.org/show_bug.cgi?id=30307
-
- Fix 0 sentinel for g_object_set() function call.
-
- * platform/graphics/gtk/DataSourceGStreamer.cpp:
- (webkit_data_src_uri_set_uri):
- 0 is passed as 32 bit value on x86-64 in vararg functions, but
- g_object_set() expects a 64 bit 0. This will cause crashes.
-
-2009-10-12 Cameron McCormack <cam@mcc.id.au>
-
- Reviewed by Eric Seidel.
-
- Drop in="" from <feFlood>
- https://bugs.webkit.org/show_bug.cgi?id=29001
-
- This makes <feFlood in="bogus"> have an effect, too.
-
- http://www.w3.org/2003/01/REC-SVG11-20030114-errata#feflood-attribute
-
- Test: svg/dom/feFlood-no-in1.html
-
- * svg/SVGFEFloodElement.cpp:
- (WebCore::SVGFEFloodElement::SVGFEFloodElement):
- (WebCore::SVGFEFloodElement::build):
- * svg/SVGFEFloodElement.h:
- * svg/SVGFEFloodElement.idl:
- * svg/graphics/filters/SVGFEFlood.cpp:
- (WebCore::FEFlood::FEFlood):
- (WebCore::FEFlood::create):
- * svg/graphics/filters/SVGFEFlood.h:
-
-2009-10-12 Sebastian Dröge <sebastian.droege@collabora.co.uk>
-
- Reviewed by Gustavo Noronha.
-
- https://bugs.webkit.org/show_bug.cgi?id=29998
-
- Scale video to completely fill the target surface while
- keeping the aspect ratio. This fixes displaying of the
- YouTube HTML5 sample website.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- Scale video to completely fill the target surface, keep
- the aspect ratio and center it.
-
-2009-10-12 Sebastian Dröge <sebastian.droege@collabora.co.uk>
-
- Reviewed by Gustavo Noronha.
-
- https://bugs.webkit.org/show_bug.cgi?id=29997
-
- Fixes double memcpy of all rendered video frames.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::mediaPlayerPrivateRepaintCallback):
- (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
- (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
- (WebCore::MediaPlayerPrivate::duration):
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
- * platform/graphics/gtk/VideoSinkGStreamer.cpp:
- (webkit_video_sink_timeout_func):
- (webkit_video_sink_dispose):
- (unlock_buffer_mutex):
- (webkit_video_sink_unlock):
- (marshal_VOID__MINIOBJECT):
- (webkit_video_sink_class_init):
- (webkit_video_sink_new):
- * platform/graphics/gtk/VideoSinkGStreamer.h:
- Directly pass the buffers up to the MediaPlayerPrivate::paint()
- method instead of rendering them first to an intermediate cairo
- surface. This should increase performance and peak memory usage.
-
-2009-10-11 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=30242
-
- Fixes an issue where JavaScript URLs that are URL-encoded twice can
- bypass the XSSAuditor.
-
- JavaScript URLs that are completed by method Document::completeURL have added
- URL-encoded characters such that a direct comparison with the URL-decoded
- outgoing HTTP parameters is not sufficient. Instead, the URL-decoded outgoing
- HTTP parameters must be URL-decoded before comparison.
-
- Tests: http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode.html
- http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode2.html
- http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode3.html
-
- * bindings/ScriptControllerBase.cpp:
- (WebCore::ScriptController::executeIfJavaScriptURL): Modified to pass XSSAuditor
- the URL-decoded source code for the JavaScript URL.
- * page/XSSAuditor.cpp:
- (WebCore::isIllegalURICharacter): Minor syntactical change to the comment.
- (WebCore::XSSAuditor::CachingURLCanonicalizer::canonicalizeURL): Added
- parameter decodeURLEscapeSequencesTwice.
- (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
- (WebCore::XSSAuditor::decodeURL): Ditto.
- (WebCore::XSSAuditor::findInRequest): Ditto.
- * page/XSSAuditor.h:
- (WebCore::XSSAuditor::CachingURLCanonicalizer::CachingURLCanonicalizer): Ditto.
-
-2009-10-11 Dominic Cooney <dominicc@google.com>
-
- Reviewed by Adam Barth.
-
- Fixes a build break in the V8 bindings caused by revision 49420.
- https://bugs.webkit.org/show_bug.cgi?id=30294
-
- Revision 49420 introduces an IDL-defined CanvasActiveInfo
- type. This causes a build break in the V8 bindings where
- CanvasGraphicsContext3D naively refers to CanvasActiveInfo as a
- non-ref type.
-
- * WebCore.gypi: Include CanvasActiveInfo.idl in build.
- * bindings/scripts/CodeGeneratorV8.pm: CanvasActiveInfo is a ref
- ptr type.
- * bindings/v8/DOMObjectsInclude.h: Include generated
- CanvasActiveInfo files.
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
-
-2009-10-11 Collin Jackson <collinj@webkit.org>
-
- Reviewed by Adam Barth.
-
- Log mixed content warnings to console
-
- https://bugs.webkit.org/show_bug.cgi?id=30290
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::checkIfDisplayInsecureContent):
- (WebCore::FrameLoader::checkIfRunInsecureContent):
-
-2009-10-11 Søren Gjesse <sgjesse@chromium.org>
-
- Reviewed by Adam Barth.
-
- [V8] Add a context scope in JS listener destructor. The destructor code uses the cotext. See http://crbug.com/24200.
- https://bugs.webkit.org/show_bug.cgi?id=30250
-
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::~V8AbstractEventListener):
-
-2009-10-11 Lyon Chen <lyon.chen@torchmobile.com>
-
- Reviewed by Alexey Proskuryakov.
-
- Correct the position of #endif sentence inside WebCore::Document::finishedParsing().
-
- https://bugs.webkit.org/show_bug.cgi?id=30244
-
- This change requires no test case as it fix a compiling error.
-
- * dom/Document.cpp:
- (WebCore::Document::finishedParsing):
-
-2009-10-11 Dominic Cooney <dominicc@google.com>
-
- Reviewed by Adam Barth.
-
- Sets a 500K stack limit for JavaScript workers in Chromium.
- https://bugs.webkit.org/show_bug.cgi?id=29797
-
- Runaway recursion in JavaScript workers crashes the Chromium
- worker process on OS X. This is because V8's default stack limit
- is 512K on ia32 or 1M on x64, but the worker process runs workers
- on a thread with the OS X default stack size--512K. Because there
- are already some C+frames on the stack when V8 establishes its
- 512K default stack limit, and V8 doesn't precisely enforce the
- stack limit, runaway recursion in V8 workers overflows the OS
- stack and segfaults, killing the worker process. This is described
- in Chromium bug 21653 <http://crbug.com/21653>.
-
- This patch sets the V8 stack limit for worker JavaScript in
- Chromium to a more conservative 500K on all platforms. This allows
- some "headroom" for the C+stack in use when the limit is set up,
- and some "legroom" for the V8 helper functions which in practice
- briefly flout the V8 stack limit.
-
- Test: LayoutTests/fast/workers/use-machine-stack.html
-
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::WorkerContextExecutionProxy::initV8IfNeeded):
- * bindings/v8/WorkerContextExecutionProxy.h:
-
-2009-10-11 Kevin Ollivier <kevino@theolliviers.com>
-
- wx build fix for wxMac 2.9, use wxGC API for measuring text.
-
- * platform/wx/wxcode/mac/carbon/fontprops.cpp:
- (GetTextExtent):
-
-2009-10-10 Cameron McCormack <cam@mcc.id.au>
-
- Reviewed by Sam Weinig.
-
- Allow [Reflect] on SVG elements.
- https://bugs.webkit.org/show_bug.cgi?id=28936
-
- Update the JS binding generators to reference SVGNames instead of
- HTMLNames, if [Reflect]ing an attribute on an SVG element. Make
- SVGElement::id use [Reflect].
-
- Also make [Reflect] on an attribute with a setter exception work in ObjC
- bindings.
-
- Test: svg/dom/id-reflect.html
-
- * bindings/scripts/CodeGenerator.pm: Add a function to determine the
- appropriate C+namespace for attribute name constants.
- * bindings/scripts/CodeGeneratorObjC.pm: Generate ExceptionCode handling
- code for [Reflect] on an attribute with a setter exception.
- * bindings/scripts/CodeGeneratorCOM.pm: Generate "SVGNames" instead of
- "HTMLNames" when appropriate.
- * bindings/scripts/CodeGeneratorJS.pm: Ditto.
- * bindings/scripts/CodeGeneratorV8.pm: Ditto.
- * svg/SVGElement.cpp: Remove getter and setter methods for id.
- * svg/SVGElement.h: Ditto.
- * svg/SVGElement.idl: Add [Reflect] to id.
-
-2009-10-10 Oliver Hunt <oliver@apple.com>
-
- Fix paths in xcode.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-10-10 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Eric Carlson.
-
- Implement getActiveAttrib and getActiveUniform
- https://bugs.webkit.org/show_bug.cgi?id=30276
-
- Implements the getActiveAttrib and getActiveUniform APIs.
- Rather simple patch, adds CanvasActiveInfo definition and implementation
- and adds forwarding to the GraphicsContext3D.
-
- Test: fast/canvas/webgl/getActiveTest.html
-
- * DerivedSources.make:
- * WebCore.xcodeproj/project.pbxproj:
- * html/canvas/CanvasActiveInfo.h: Added.
- (WebCore::CanvasActiveInfo::create):
- (WebCore::CanvasActiveInfo::name):
- (WebCore::CanvasActiveInfo::type):
- (WebCore::CanvasActiveInfo::size):
- (WebCore::CanvasActiveInfo::CanvasActiveInfo):
- * html/canvas/CanvasActiveInfo.idl: Added.
- * html/canvas/CanvasObject.h:
- (WebCore::CanvasObject::context):
- Need to make the context public as it is needed to ensure we don't
- provide a program from one context as an argument to another.
- * html/canvas/CanvasRenderingContext3D.cpp:
- (WebCore::CanvasRenderingContext3D::getActiveAttrib):
- (WebCore::CanvasRenderingContext3D::getActiveUniform):
- * html/canvas/CanvasRenderingContext3D.h:
- * html/canvas/CanvasRenderingContext3D.idl:
- * platform/graphics/GraphicsContext3D.h:
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::getActiveAttrib):
- (WebCore::GraphicsContext3D::getActiveUniform):
-
-2009-10-10 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Adding new attributes in Element Panel is
- counterintuitive.
-
- https://bugs.webkit.org/show_bug.cgi?id=30057
-
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeOutline.prototype._onmousemove):
- (WebInspector.ElementsTreeElement.prototype.set hovered):
- (WebInspector.ElementsTreeElement.prototype.toggleNewAttributeButton):
-
-2009-10-10 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Holger Freyther.
-
- Build fix if Netscape plugin support is turned off
- https://bugs.webkit.org/show_bug.cgi?id=30275
-
- In addition to fixing the build break with guards
- remove notImplemented() from PluginViewNone.cpp and
- make them just just be empty functions.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::handleEvent):
- (WebCore::PluginView::PluginView):
- * plugins/PluginView.h:
- * plugins/PluginViewNone.cpp:
- (WebCore::PluginView::setFocus):
- (WebCore::PluginView::show):
- (WebCore::PluginView::hide):
- (WebCore::PluginView::paint):
- (WebCore::PluginView::handleKeyboardEvent):
- (WebCore::PluginView::handleMouseEvent):
- (WebCore::PluginView::setParent):
- (WebCore::PluginView::setNPWindowRect):
- (WebCore::PluginView::handlePostReadFile):
- (WebCore::PluginView::getValue):
- (WebCore::PluginView::getValueStatic):
- (WebCore::PluginView::invalidateRect):
- (WebCore::PluginView::invalidateRegion):
- (WebCore::PluginView::forceRedraw):
- (WebCore::PluginView::platformStart):
- (WebCore::PluginView::platformDestroy):
- (WebCore::PluginView::setParentVisible):
- (WebCore::PluginView::updatePluginWidget):
-
-2009-10-10 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Unreviewed.
-
- [Qt] Build fix for QtWebKit after r49415.
-
- Add HistoryController.cpp to the build.
-
- * WebCore.pro:
-
-2009-10-09 Darin Fisher <darin@chromium.org>
-
- Reviewed by Eric Seidel.
-
- [Chromium] KURLGoogle's protocolIs barfs on input containing hyphens
- https://bugs.webkit.org/show_bug.cgi?id=30262
-
- This is not testable from WebKit since WebKit never uses the member
- function form of protocolIs with input that can be controlled from a
- web page. It always passes string literals lacking hyphens.
-
- * platform/KURLGoogle.cpp:
- (WebCore::lowerCaseEqualsASCII): Only assert if toASCIILower would
- transform the input character.
-
-2009-10-10 Adam Barth <abarth@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- Move HistoryController to its own file
- https://bugs.webkit.org/show_bug.cgi?id=30272
-
- Purely mechanical.
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * loader/FrameLoader.cpp:
- * loader/FrameLoader.h:
- * loader/HistoryController.cpp: Added.
- * loader/HistoryController.h: Added.
-
-2009-10-09 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Eric Seidel.
-
- ApplyStyleCommand removes presentational tags even when not necessary
- https://bugs.webkit.org/show_bug.cgi?id=28091
-
- This patch updates implicitlyStyledElementShouldBeRemovedWhenApplyingStyle to return true
- (triggering removal of tag) only if the style implicitly added by the element is not present in
- the new style to apply. It also changes surroundNodeRangeWithElement so that it merges the
- surrounding element when possible. applyTextDecorationStyle is modified so that it does not add
- style span when the style attribute is empty.
-
- Test: editing/execCommand/toggle-style-3.html
-
- * editing/ApplyStyleCommand.cpp:
- (WebCore::ApplyStyleCommand::shouldRemoveTextDecorationTag): Returns true if specified text
- decoration is not present in the style to apply
- (WebCore::ApplyStyleCommand::implicitlyStyledElementShouldBeRemovedWhenApplyingStyle): No longer
- returns true if the tag is used in new style
- (WebCore::ApplyStyleCommand::applyTextDecorationStyle): Does not add style-span when redundant
- (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement): Merges the newly created element
- with the surrounding identical elements
- * editing/ApplyStyleCommand.h:
-
-2009-10-09 Adam Barth <abarth@webkit.org>
-
- Reviewed by Darin Adler.
-
- Factor HistoryController out of FrameLoader
- https://bugs.webkit.org/show_bug.cgi?id=30246
-
- HistoryController is in charge of managing the current / previous /
- provisional HistoryItems. The split isn't perfect, but it's a place to
- start. I'll move HistoryController into its own file in another patch.
-
- * WebCore.base.exp:
- * loader/FrameLoader.cpp:
- (WebCore::HistoryController::HistoryController):
- (WebCore::HistoryController::~HistoryController):
- (WebCore::FrameLoader::FrameLoader):
- (WebCore::FrameLoader::closeURL):
- (WebCore::FrameLoader::begin):
- (WebCore::HistoryController::restoreDocumentState):
- (WebCore::HistoryController::setCurrentItem):
- (WebCore::HistoryController::setProvisionalItem):
- (WebCore::FrameLoader::loadURLIntoChildFrame):
- (WebCore::FrameLoader::canCachePageContainingThisFrame):
- (WebCore::FrameLoader::logCanCacheFrameDecision):
- (WebCore::FrameLoader::scrollToAnchor):
- (WebCore::FrameLoader::commitProvisionalLoad):
- (WebCore::FrameLoader::transitionToCommitted):
- (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
- (WebCore::FrameLoader::didFirstLayout):
- (WebCore::HistoryController::updateForFrameLoadCompleted):
- (WebCore::FrameLoader::frameLoadCompleted):
- (WebCore::FrameLoader::detachFromParent):
- (WebCore::FrameLoader::receivedMainResourceError):
- (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
- (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
- (WebCore::HistoryController::addHistoryItemForFragmentScroll):
- (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
- (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent):
- (WebCore::HistoryController::createHistoryItem):
- (WebCore::FrameLoader::checkDidPerformFirstNavigation):
- (WebCore::HistoryController::addBackForwardItemClippedAtTarget):
- (WebCore::HistoryController::createHistoryItemTree):
- (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
- (WebCore::HistoryController::restoreScrollPositionAndViewState):
- (WebCore::HistoryController::invalidateCurrentItemCachedPage):
- (WebCore::HistoryController::saveDocumentState):
- (WebCore::FrameLoader::loadItem):
- (WebCore::HistoryController::urlsMatchItem):
- (WebCore::HistoryController::goToItem):
- (WebCore::HistoryController::recursiveGoToItem):
- (WebCore::HistoryController::childFramesMatchItem):
- (WebCore::HistoryController::updateForStandardLoad):
- (WebCore::HistoryController::updateForClientRedirect):
- (WebCore::HistoryController::updateForBackForwardNavigation):
- (WebCore::HistoryController::updateForReload):
- (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
- (WebCore::HistoryController::updateForCommit):
- (WebCore::HistoryController::updateForAnchorScroll):
- (WebCore::HistoryController::saveDocumentAndScrollState):
- (WebCore::HistoryController::setCurrentItemTitle):
- (WebCore::FrameLoader::didChangeTitle):
- * loader/FrameLoader.h:
- (WebCore::HistoryController::current):
- (WebCore::HistoryController::provisional):
- (WebCore::FrameLoader::policyChecker):
- (WebCore::FrameLoader::history):
- (WebCore::FrameLoader::creatingInitialEmptyDocument):
- * page/Page.cpp:
- (WebCore::Page::goToItem):
-
-2009-10-09 Alexey Proskuryakov <ap@apple.com>
-
- Unreviewed - fixing an obvious typo in my previous check-in.
-
- https://bugs.webkit.org/show_bug.cgi?id=30260
- <rdar://problem/6447115> REGRESSION: Logging out from SAP doesn't work
-
- Fixes existing tests (which I thought I had run the previous time).
-
- * platform/network/CredentialStorage.cpp: (WebCore::originsWithCredentials): Return the
- set by reference.
-
-2009-10-09 David Levin <levin@chromium.org>
-
- Reviewed by Eric Seidel.
-
- [v8] Need change to V8WorkerContextEventListener::reportError signature to match the base class.
- https://bugs.webkit.org/show_bug.cgi?id=30264
-
- The base class method changed in r48884.
-
- Test: fast/worker/worker-script-error.html
-
- * bindings/v8/V8WorkerContextEventListener.cpp:
- (WebCore::V8WorkerContextEventListener::reportError):
- * bindings/v8/V8WorkerContextEventListener.h:
-
-2009-10-09 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Brady Eidson.
-
- https://bugs.webkit.org/show_bug.cgi?id=30260
- <rdar://problem/6447115> REGRESSION: Logging out from SAP doesn't work
-
- Tests: http/tests/xmlhttprequest/logout.html
- http/tests/xmlhttprequest/re-login-async.html
- http/tests/xmlhttprequest/re-login.html
-
- Fix several issues with existing credential handling code.
-
- * platform/network/CredentialStorage.cpp:
- (WebCore::pathToDefaultProtectionSpaceMap): Changed the data structure to a simpler one.
- (WebCore::originsWithCredentials): The reason for two-stage lookup above was that we didn't
- want to iterate paths for origins that never had credentials associated with them. Changed
- to use a separate HashSet for this.
- (WebCore::pathToDefaultProtectionSpaceMap): The concept of default per-path credentials didn't
- match the spec very well. UAs are supposed to deduce protection space from an URL, and then
- use whichever credentials are known for this protection space. So, OriginToDefaultBasicCredentialMap
- is now PathToDefaultProtectionSpaceMap.
- (WebCore::protectionSpaceMapKeyFromURL): Factored out a helper that extracts a directory
- URL from a given URL. These directory URLs are what we use as keys in PathToDefaultProtectionSpaceMap.
- (WebCore::CredentialStorage::set): Updated for above changes.
- (WebCore::findDefaultProtectionSpaceForURL): Factored out code iterating path length to find
- a prefix in OriginToDefaultBasicCredentialMap.
- (WebCore::CredentialStorage::set): Another version of set() can update credentials for a
- URL default protection space. It does nothing if the given URL doesn't correspond to a known
- protection space.
- (WebCore::CredentialStorage::get): Renamed from getDefaultAuthenticationCredential.
-
- * platform/network/CredentialStorage.h: Made the distinction between methods that use a known
- protection space and those that deduce one from URL more clear.
-
- * platform/network/mac/ResourceHandleMac.mm:
- (WebCore::ResourceHandle::start): Update credentials before starting the request for real.
- This makes the following pattern work:
- var req = new XMLHttpRequest("GET", "logout.html", "logout", "logout"); // wrong credentials
- req.send("");
- req.abort();
- Abort() is used here to avoid having UA present an auth dialog after getting a 401 response.
- Note that one cannot log in using the same method, because there isn't a known protection
- space for the URL yet in that case, so the added code has no effect.
- (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Use a correct persistence for
- calling receivedCredential(). This fixes logging in using an async XHR (withut abort(), of
- course), and matches sync case.
- (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]):
- Renamed getDefaultAuthenticationCredential() to get().
-
- * platform/network/cf/ResourceHandleCFNet.cpp:
- (WebCore::ResourceHandle::start):
- (WebCore::WebCoreSynchronousLoader::load):
- Same changes as in Mac code.
-
-2009-10-09 Enrica Casucci <enrica@apple.com>
-
- Reviewed by Adele Peterson.
-
- Undoing a indent removes text instead of it's formatting.
- <rdar://problem/7169206>
- https://bugs.webkit.org/show_bug.cgi?id=28722
- Restored the behavior prior to http://trac.webkit.org/changeset/46143. This change implemented the
- indent command making simple DOM operation, without using moveParagraph which cause undo to be broken.
-
- Added editing/undo/undo-indent.html test.
-
- * editing/IndentOutdentCommand.cpp:
- (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion): Restored.
- (WebCore::IndentOutdentCommand::tryIndentingAsListItem): Merged changes.
- (WebCore::IndentOutdentCommand::indentIntoBlockquote): Restored.
- (WebCore::IndentOutdentCommand::indentRegion): Restored and added call to updateLayout to
- ensure TextIterator could correctly calculate the position starting from the index.
- * editing/IndentOutdentCommand.h: Restored.
-
-2009-10-09 Jens Alfke <snej@chromium.org>
-
- Reviewed by Darin Adler.
-
- Optimization: Many StringImpl transformations are no-ops and should just return 'this'
- https://bugs.webkit.org/show_bug.cgi?id=30186
-
- Optimized StringImpl methods lower(), stripWhiteSpace() and simplifyWhiteSpace() to
- detect no-ops and return this instead of creating a new instance.
- Empirical testing shows that the majority of calls to these methods are no-ops, making
- this worthwhile even if (in the case of lower()) the non-no-op case is slightly slowed.
- Upper() is very rarely a no-op, so it wasn't worthwhile to optimize it.
-
- * platform/text/StringImpl.cpp:
- (WebCore::StringImpl::lower):
- (WebCore::StringImpl::upper): Just add a comment explaining why this wasn't optimized
- (WebCore::StringImpl::stripWhiteSpace):
- (WebCore::StringImpl::simplifyWhiteSpace):
-
-2009-10-09 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- SVG Filter feGaussianBlur implementation is missing
- [https://bugs.webkit.org/show_bug.cgi?id=28141]
-
- This is the implementation of GaussianBlur filter for SVG.
-
- There is already a test for feGaussianBlur
- Test: svg/W3C-SVG-1.1/filters-gauss-01-b-w3c.svg
-
- Test: svg/filters/feGaussianBlur.svg
-
- * platform/graphics/filters/FilterEffect.cpp:
- (WebCore::FilterEffect::FilterEffect):
- * platform/graphics/filters/FilterEffect.h:
- (WebCore::FilterEffect::isAlphaImage):
- (WebCore::FilterEffect::setIsAlphaImage):
- * platform/graphics/filters/SourceAlpha.cpp:
- (WebCore::SourceAlpha::apply):
- * svg/graphics/filters/SVGFEGaussianBlur.cpp:
- (WebCore::boxBlur):
- (WebCore::FEGaussianBlur::apply):
-
-2009-10-09 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- [GTK] QoS support in the video sink
- https://bugs.webkit.org/show_bug.cgi?id=29959
-
- Removed the async buffer queue from the sink. Synchronize the
- render method of the sink using a g_timeout_add() combined with a
- gcond triggered when the buffer has been rendered.
- Also fixed the video sink reference handling in the player, now
- that the idle is not there anymore to mess up things.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
- (WebCore::MediaPlayerPrivate::createGSTPlayBin):
- * platform/graphics/gtk/VideoSinkGStreamer.cpp:
- (webkit_video_sink_init):
- (webkit_video_sink_timeout_func):
- (webkit_video_sink_render):
- (webkit_video_sink_dispose):
- (unlock_buffer_mutex):
- (webkit_video_sink_unlock):
- (webkit_video_sink_stop):
- (webkit_video_sink_class_init):
-
-2009-10-09 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Nikolas Zimmermann.
-
- feMorphology filter is not implemented
- [https://bugs.webkit.org/show_bug.cgi?id=5863]
-
- Adds SVGFEMorphologyElement, for the SVG filter. It also fixes a bug
- with the attribute "operator". It was only accessible via "_operator"
- on JavaScript.
-
- Test: svg/dom/operatorAttribute.xhtml
-
- * DerivedSources.cpp:
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.SVG.Filters.exp:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/objc/DOM.mm:
- (WebCore::createElementClassMap):
- * bindings/objc/DOMSVG.h:
- * bindings/scripts/CodeGeneratorJS.pm:
- * bindings/scripts/CodeGeneratorObjC.pm:
- * page/DOMWindow.idl:
- * svg/SVGAllInOne.cpp:
- * svg/SVGFECompositeElement.idl:
- * svg/SVGFEMorphologyElement.cpp: Added.
- (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
- (WebCore::SVGFEMorphologyElement::~SVGFEMorphologyElement):
- (WebCore::SVGFEMorphologyElement::setRadius):
- (WebCore::SVGFEMorphologyElement::parseMappedAttribute):
- (WebCore::SVGFEMorphologyElement::build):
- * svg/SVGFEMorphologyElement.h: Added.
- * svg/SVGFEMorphologyElement.idl: Added.
- * svg/graphics/filters/SVGFEMorphology.cpp:
- (WebCore::operator<<):
- * svg/graphics/filters/SVGFEMorphology.h:
- (WebCore::):
- * svg/svgtags.in:
-
-2009-10-09 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Fix Chromium breakage.
-
- https://bugs.webkit.org/show_bug.cgi?id=30104
-
- * inspector/front-end/inspector.js:
- (WebInspector.addCookieDomain): check that Storage panel is present before calling its methods.
-
-2009-10-09 Joe Ligman <joseph.ligman@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Added pure virtual methods setInputMethodEnabled and setInputMethodHint to QWebPageClient
-
- https://bugs.webkit.org/show_bug.cgi?id=30023
-
- * platform/qt/QWebPageClient.h:
-
-2009-10-08 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Darin Adler.
-
- Implement beforeload for images. ImageLoadEventSender has been refactored into a more generic
- ImageEventSender that can be used by both load and beforeload events. If the document has any
- beforeload listeners, then the installation of images onto the renderer becomes asynchronous
- and will be held up until the beforeload event can fire at a later date.
-
- Both beforeload and load events now fire at the end of the tokenizer write() methods, so that
- in the typical parsing case we don't have to put off the beforeload/load events until after
- a layout or paint might already have happened. This lets beforeload/load not cause extra
- layouts and repaints.
-
- * dom/ContainerNode.cpp:
- (WebCore::ContainerNode::dispatchBeforeLoadEvent):
- * dom/Document.cpp:
- (WebCore::Document::implicitClose):
- (WebCore::Document::addListenerTypeIfNeeded):
- * dom/Document.h:
- (WebCore::Document::):
- * dom/XMLTokenizer.cpp:
- (WebCore::XMLTokenizer::write):
- * html/HTMLImageElement.cpp:
- (WebCore::HTMLImageElement::attach):
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::attach):
- * html/HTMLTokenizer.cpp:
- (WebCore::HTMLTokenizer::write):
- * loader/ImageLoader.cpp:
- (WebCore::ImageBeforeLoadEventSender::ImageBeforeLoadEventSender):
- (WebCore::ImageLoadEventSender::ImageLoadEventSender):
- (WebCore::beforeLoadEventSender):
- (WebCore::ImageLoader::ImageLoader):
- (WebCore::ImageLoader::~ImageLoader):
- (WebCore::ImageLoader::setImage):
- (WebCore::ImageLoader::setLoadingImage):
- (WebCore::ImageLoader::updateFromElement):
- (WebCore::ImageLoader::notifyFinished):
- (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
- (WebCore::ImageLoader::dispatchPendingEvents):
- (WebCore::ImageEventSender::ImageEventSender):
- (WebCore::ImageEventSender::dispatchEventSoon):
- (WebCore::ImageEventSender::cancelEvent):
- (WebCore::ImageEventSender::dispatchPendingEvents):
- (WebCore::ImageEventSender::timerFired):
- * loader/ImageLoader.h:
- (WebCore::ImageLoader::haveFiredBeforeLoadEvent):
- * wml/WMLImageElement.cpp:
- (WebCore::WMLImageElement::attach):
-
-2009-10-09 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Web Inspector: Wrap Database into ScriptObject in v8 bindings.
-
- https://bugs.webkit.org/show_bug.cgi?id=30174
-
- No tests due to no Script* test infrastructure.
-
- * bindings/v8/ScriptObjectQuarantine.cpp:
- (WebCore::getQuarantinedScriptObject):
-
-2009-10-09 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Windowless Plugins : Fix crash when using QWebPage without QWebView.
-
- 'client' is 0 when we have no view.
-
- https://bugs.webkit.org/show_bug.cgi?id=30251
-
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::paint):
-
-2009-10-09 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Plugins : Add missing setCurrentPlugin(0)
-
- https://bugs.webkit.org/show_bug.cgi?id=30248
-
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::dispatchNPEvent):
-
-2009-10-09 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] beforeload event does not fire on script elements in XML
- https://bugs.webkit.org/show_bug.cgi?id=30235
-
- r49194 was lacking a change to XMLTokenizerQt.cpp, equivalent to the one
- made in XMLTokenizerLibxml2.cpp.
-
- * dom/XMLTokenizerQt.cpp:
- (WebCore::XMLTokenizer::parseEndElement):
-
-2009-10-09 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's CSSParserValueList
- https://bugs.webkit.org/show_bug.cgi?id=30249
-
- Inherits CSSParserValueList class from FastAllocBase because it has
- been instantiated by 'new' in WebCore/css/CSSGrammar.y:1271.
-
- * css/CSSParserValues.h:
-
-2009-10-09 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Windowless Plugins : Create Pixmap only when size changes.
-
- https://bugs.webkit.org/show_bug.cgi?id=30214
-
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::updatePluginWidget):
-
-2009-10-08 Jon Honeycutt <jhoneycutt@apple.com>
-
- Remove the WebKitPluginHalterEnabledPreferenceKey in favor of checking
- for the existence of a PluginHalterDelegate.
-
- This fixes a leak of WebPluginHalterClients:
- https://bugs.webkit.org/show_bug.cgi?id=30119.
-
- Reviewed by Dan Bernstein.
-
- * WebCore.base.exp:
- Removed the export of WebCore::Settings::setPluginHalterEnabled().
-
- * loader/EmptyClients.h:
- (WebCore::EmptyPluginHalterClient::enabled):
-
- * page/Page.cpp:
- (WebCore::Page::Page):
- Remove initialization of m_pluginHalterClient, which was removed. If a
- non-null PluginHalterClient was passed, create the PluginHalter, and
- set its allowed run time.
-
- * page/Page.h:
- Removed pluginHalterEnabledStateChanged() and m_pluginHalterClient.
-
- * page/PluginHalter.cpp:
- (WebCore::PluginHalter::didStartPlugin):
- Check whether the PluginHalterClient is enabled.
- (WebCore::PluginHalter::didStopPlugin):
- Ditto.
-
- * page/PluginHalter.h:
- Made m_client an OwnPtr.
-
- * page/PluginHalterClient.h:
- Added a function to return the enabled state.
-
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
- Remove initialization of removed member.
-
- * page/Settings.h:
- Removed settings for the enabled state of the PluginHalter; we now use
- the existence of a WebPluginHalterDelegate to determine whether the
- PluginHalter is enabled.
-
-2009-10-08 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Move executeScript from FrameLoader to ScriptController
- https://bugs.webkit.org/show_bug.cgi?id=30200
-
- These methods have virtually no interaction with FrameLoader. They
- really seem like they ought to belong to ScriptController.
-
- * WebCore.base.exp:
- * bindings/js/ScheduledAction.cpp:
- (WebCore::ScheduledAction::execute):
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::ScriptController):
- (WebCore::ScriptController::executeScript):
- (WebCore::ScriptController::executeIfJavaScriptURL):
- (WebCore::ScriptController::evaluate):
- * bindings/js/ScriptController.h:
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::ScriptController):
- (WebCore::ScriptController::executeScript):
- (WebCore::ScriptController::executeIfJavaScriptURL):
- * bindings/v8/ScriptController.h:
- * dom/XMLTokenizer.cpp:
- (WebCore::XMLTokenizer::notifyFinished):
- * dom/XMLTokenizerLibxml2.cpp:
- (WebCore::XMLTokenizer::endElementNs):
- * dom/XMLTokenizerQt.cpp:
- (WebCore::XMLTokenizer::parseEndElement):
- * html/HTMLTokenizer.cpp:
- (WebCore::HTMLTokenizer::scriptExecution):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::changeLocation):
- (WebCore::FrameLoader::urlSelected):
- (WebCore::FrameLoader::requestFrame):
- (WebCore::FrameLoader::submitForm):
- (WebCore::FrameLoader::replaceDocument):
- * loader/FrameLoader.h:
- * plugins/PluginView.cpp:
- (WebCore::PluginView::performRequest):
-
-2009-10-08 Geoffrey Garen <ggaren@apple.com>
-
- Windows build fix: added missing #include.
-
- * ForwardingHeaders/runtime/StructureChain.h: Copied from WebCore/ForwardingHeaders/runtime/PropertyNameArray.h.
-
-2009-10-08 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <https://bugs.webkit.org/show_bug.cgi?id=30237>.
- DOM Content and Load lines aren't shown if a page is loaded when the inspector is up.
-
- Make sure to call update script object if we have an InspectorFrontend to
- call it on when we get one of the new events.
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::mainResourceFiredDOMContentEvent):
- (WebCore::InspectorController::mainResourceFiredLoadEvent):
-
-2009-10-08 Geoffrey Garen <ggaren@apple.com>
-
- Build fix: updated for removal of Structure::markAggregate().
-
- * bindings/js/JSDOMGlobalObject.cpp:
- (WebCore::JSDOMGlobalObject::markChildren):
-
-2009-10-08 Jens Alfke <snej@chromium.org>
-
- Reviewed by Darin Adler.
-
- Make AtomicString create its StringImpl via create(), not the constructor,
- so it gets allocated in a single heap block, saving memory and CPU cycles.
- This eliminates two StringImpl constructors, making the remaining ones
- unambiguous, so the "AdoptBuffer" parameter is no longer needed.
- Added const attribute to UChar* in StringImpl constructor, eliminating the
- need for several const_casts in calls to it.
- StringImpl also unfriends AtomicString (OMG drama!!!)
- https://bugs.webkit.org/show_bug.cgi?id=30141
-
- * platform/text/AtomicString.cpp:
- (WebCore::CStringTranslator::translate): Call StringImpl::create().
- (WebCore::UCharBufferTranslator::translate): Ditto.
- (WebCore::HashAndCharactersTranslator::translate): Ditto.
- * platform/text/StringImpl.cpp:
- (WebCore::StringImpl::StringImpl): Remove unnecessary AdoptBuffer param.
- (WebCore::StringImpl::adopt): Ditto.
- (WebCore::StringImpl::createUninitialized): Ditto.
- (WebCore::StringImpl::create): Ditto.
- (WebCore::StringImpl::crossThreadString): Ditto.
- * platform/text/StringImpl.h:
- (WebCore::StringImpl::setHash): Used by AtomicString when creating StringImpls.
-
-2009-10-08 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Sam Weinig.
-
- Remove the shouldLoadMediaElementURL frame loader client function.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::willLoadMediaElementURL):
-
-2009-10-08 John Gregg <johnnyg@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- SVGURIReference Build problem for V8. An additional stale reference to SVGURIReference bindings
- which wasn't exposed until a clean build.
- https://bugs.webkit.org/show_bug.cgi?id=30217
-
- No new tests, just a build fix.
-
- * bindings/v8/V8Index.cpp:
-
-2009-10-08 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Not reviewed. Sort XCode project file.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-10-08 Patrick Mueller <Patrick_Mueller@us.ibm.com>
-
- Reviewed by Timothy Hatcher.
-
- unselectable resources in resource panel
- https://bugs.webkit.org/show_bug.cgi?id=30079
-
- manual test added
-
- Also changed the way DnD for resources in the Resources panel is
- handled.
-
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourceSidebarTreeElement.prototype.onattach):
- (WebInspector.ResourceSidebarTreeElement.prototype.ondragstart):
- * manual-tests/inspector/duplicate-resource-urls.html: Added.
-
-2009-10-08 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <http://webkit.org/b/30233>
- Local Storage and Cookies show Blank Titles on Local Files.
-
- If a local storage or cookies sidebar item has no domain, set the
- title to "Local Files", because that is what it represents.
-
- * English.lproj/localizedStrings.js:
- * inspector/front-end/StoragePanel.js:
- (WebInspector.DOMStorageSidebarTreeElement.prototype.get mainTitle):
- (WebInspector.CookieSidebarTreeElement.prototype.get mainTitle):
- (WebInspector.CookieSidebarTreeElement.prototype.set mainTitle):
-
-2009-10-08 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Fix failing media layout tests. Don't make beforeload block loads of objects that aren't in the
- document, since video/audio (and images eventually too) can load when not in the document yet.
-
- * dom/ContainerNode.cpp:
- (WebCore::ContainerNode::dispatchBeforeLoadEvent):
-
-2009-10-08 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Reviewed by Eric Seidel.
-
- Move SVGFitToViewBox ANIMATED_* macros in classes that inherit from it
- https://bugs.webkit.org/show_bug.cgi?id=30230
-
- This patch also devirtualizes viewBoxToViewTransform(), is it's superflous.
- viewBoxToViewTransform() is now a simple static heper function in SVGFitToViewBox.
- As a result, the SVGSVGElement::viewBoxToViewTransform() function now resuses the same logic.
-
- As side-effect this patch fixes svg/custom/linking-a-03-b-transform.svg, the return
- statement in SVGSVGElement::viewBoxToViewTransform() was clearly wrong.
-
- * svg/SVGFitToViewBox.cpp:
- (WebCore::SVGFitToViewBox::SVGFitToViewBox):
- (WebCore::SVGFitToViewBox::viewBoxToViewTransform):
- * svg/SVGFitToViewBox.h:
- * svg/SVGMarkerElement.cpp:
- (WebCore::SVGMarkerElement::SVGMarkerElement):
- (WebCore::SVGMarkerElement::viewBoxToViewTransform):
- * svg/SVGMarkerElement.h:
- * svg/SVGPatternElement.cpp:
- (WebCore::SVGPatternElement::SVGPatternElement):
- (WebCore::SVGPatternElement::buildPattern):
- * svg/SVGPatternElement.h:
- * svg/SVGSVGElement.cpp:
- (WebCore::SVGSVGElement::SVGSVGElement):
- (WebCore::SVGSVGElement::viewBoxToViewTransform):
- * svg/SVGSVGElement.h:
- * svg/SVGSymbolElement.cpp:
- (WebCore::SVGSymbolElement::SVGSymbolElement):
- * svg/SVGSymbolElement.h:
- * svg/SVGViewElement.cpp:
- (WebCore::SVGViewElement::SVGViewElement):
- * svg/SVGViewElement.h:
- * svg/SVGViewSpec.cpp:
- (WebCore::SVGViewSpec::SVGViewSpec):
- * svg/SVGViewSpec.h:
-
-2009-10-08 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Jon Honeycutt.
-
- Correct a typo that fixes the resizing of columns in Cookie view when you
- resize the Inspector window.
-
- * inspector/front-end/CookieItemsView.js:
- (WebInspector.CookieItemsView.prototype.resize):
-
-2009-10-08 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Adam Roben.
-
- Fixes <https://bugs.webkit.org/show_bug.cgi?id=29811>
- Text in Inspector's Styles gear menu is invisible.
-
- Adds a style rule for the option text and hr's in the gear menu,
- to prevent them from being transparent.
-
- * inspector/front-end/inspector.css:
-
-2009-10-08 John Gregg <johnnyg@google.com>
-
- Reviewed by David Levin.
-
- Fix build problem with SVGURIReference in V8.
- https://bugs.webkit.org/show_bug.cgi?id=30217
-
- No new tests, just a build fix.
-
- * WebCore.gypi:
- * bindings/v8/DerivedSourcesAllInOne.cpp:
-
-2009-10-07 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Eric Carlson.
-
- Make beforeload work on <video>/<audio> elements.
-
- Added fast/dom/beforeload/video-before-load.html
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::parseMappedAttribute):
- (WebCore::HTMLMediaElement::selectMediaResource):
- (WebCore::HTMLMediaElement::selectNextSourceChild):
-
-2009-10-08 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Reviewed by Eric Seidel.
-
- Move SVGExternalResourcesRequired ANIMATED_* macros in classes that inherit from it
- https://bugs.webkit.org/show_bug.cgi?id=30218
-
- The long term goal is to kill the need for the virtual contextElement() function in SVG code.
- No change in functionality, thus no new tests.
-
- * svg/SVGAElement.cpp:
- (WebCore::SVGAElement::SVGAElement):
- * svg/SVGAElement.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/SVGCursorElement.cpp:
- (WebCore::SVGCursorElement::SVGCursorElement):
- * svg/SVGCursorElement.h:
- * svg/SVGDefsElement.cpp:
- (WebCore::SVGDefsElement::SVGDefsElement):
- * svg/SVGDefsElement.h:
- * svg/SVGEllipseElement.cpp:
- (WebCore::SVGEllipseElement::SVGEllipseElement):
- * svg/SVGEllipseElement.h:
- * svg/SVGExternalResourcesRequired.cpp:
- (WebCore::SVGExternalResourcesRequired::SVGExternalResourcesRequired):
- * svg/SVGExternalResourcesRequired.h:
- * svg/SVGFEImageElement.cpp:
- (WebCore::SVGFEImageElement::SVGFEImageElement):
- * svg/SVGFEImageElement.h:
- * svg/SVGFilterElement.cpp:
- (WebCore::SVGFilterElement::SVGFilterElement):
- * svg/SVGFilterElement.h:
- * svg/SVGFontElement.cpp:
- (WebCore::SVGFontElement::SVGFontElement):
- * svg/SVGFontElement.h:
- * svg/SVGForeignObjectElement.cpp:
- (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
- * svg/SVGForeignObjectElement.h:
- * svg/SVGGElement.cpp:
- (WebCore::SVGGElement::SVGGElement):
- * svg/SVGGElement.h:
- * svg/SVGGradientElement.cpp:
- (WebCore::SVGGradientElement::SVGGradientElement):
- * svg/SVGGradientElement.h:
- * svg/SVGImageElement.cpp:
- (WebCore::SVGImageElement::SVGImageElement):
- * svg/SVGImageElement.h:
- * svg/SVGLineElement.cpp:
- (WebCore::SVGLineElement::SVGLineElement):
- * svg/SVGLineElement.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/SVGPathElement.cpp:
- (WebCore::SVGPathElement::SVGPathElement):
- * svg/SVGPathElement.h:
- * svg/SVGPatternElement.cpp:
- (WebCore::SVGPatternElement::SVGPatternElement):
- * svg/SVGPatternElement.h:
- * svg/SVGPolyElement.cpp:
- (WebCore::SVGPolyElement::SVGPolyElement):
- * svg/SVGPolyElement.h:
- * svg/SVGRectElement.cpp:
- (WebCore::SVGRectElement::SVGRectElement):
- * svg/SVGRectElement.h:
- * svg/SVGSVGElement.cpp:
- (WebCore::SVGSVGElement::SVGSVGElement):
- * svg/SVGSVGElement.h:
- * svg/SVGScriptElement.cpp:
- (WebCore::SVGScriptElement::SVGScriptElement):
- * svg/SVGScriptElement.h:
- * svg/SVGSwitchElement.cpp:
- (WebCore::SVGSwitchElement::SVGSwitchElement):
- * svg/SVGSwitchElement.h:
- * svg/SVGSymbolElement.cpp:
- (WebCore::SVGSymbolElement::SVGSymbolElement):
- * svg/SVGSymbolElement.h:
- * svg/SVGTextContentElement.cpp:
- (WebCore::SVGTextContentElement::SVGTextContentElement):
- * svg/SVGTextContentElement.h:
- * svg/SVGUseElement.cpp:
- (WebCore::SVGUseElement::SVGUseElement):
- * svg/SVGUseElement.h:
- * svg/SVGViewElement.cpp:
- (WebCore::SVGViewElement::SVGViewElement):
- * svg/SVGViewElement.h:
-
-2009-10-08 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Darin Adler.
-
- SVG feComposite: operator over mixes up inputs
- [https://bugs.webkit.org/show_bug.cgi?id=30205]
-
- SVG feComposite operator over mixed up the inputs.
- The pixel-test svg/filters/feComposite.svg can already test this.
- No new test result is needed as long as filters are disabled.
-
- * platform/graphics/filters/FEComposite.cpp:
- (WebCore::FEComposite::apply):
-
-2009-10-08 Nikolas Zimmermann <nzimmermann@rim.com>
-
- Reviewed by George Staikos.
-
- Move SVGURIReference ANIMATED_* macros in classes that inherit from it
- https://bugs.webkit.org/show_bug.cgi?id=30184
-
- The long term goal is to kill the need for the virtual contextElement() function in SVG code.
- No change in functionality, thus no new tests.
-
- * svg/SVGAElement.cpp:
- (WebCore::SVGAElement::SVGAElement):
- * svg/SVGAElement.h:
- * svg/SVGAltGlyphElement.cpp:
- (WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
- * svg/SVGAltGlyphElement.h:
- * svg/SVGCursorElement.cpp:
- (WebCore::SVGCursorElement::SVGCursorElement):
- * svg/SVGCursorElement.h:
- * svg/SVGFEImageElement.cpp:
- (WebCore::SVGFEImageElement::SVGFEImageElement):
- * svg/SVGFEImageElement.h:
- * svg/SVGFilterElement.cpp:
- (WebCore::SVGFilterElement::SVGFilterElement):
- * svg/SVGFilterElement.h:
- * svg/SVGForeignObjectElement.cpp:
- (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
- * svg/SVGForeignObjectElement.h:
- * svg/SVGGradientElement.cpp:
- (WebCore::SVGGradientElement::SVGGradientElement):
- * svg/SVGGradientElement.h:
- * svg/SVGImageElement.cpp:
- (WebCore::SVGImageElement::SVGImageElement):
- * svg/SVGImageElement.h:
- * svg/SVGMPathElement.cpp:
- (WebCore::SVGMPathElement::SVGMPathElement):
- (WebCore::SVGMPathElement::pathElement):
- * svg/SVGMPathElement.h:
- * svg/SVGMaskElement.cpp:
- (WebCore::SVGMaskElement::SVGMaskElement):
- * svg/SVGMaskElement.h:
- * svg/SVGPatternElement.cpp:
- (WebCore::SVGPatternElement::SVGPatternElement):
- * svg/SVGPatternElement.h:
- * svg/SVGScriptElement.cpp:
- (WebCore::SVGScriptElement::SVGScriptElement):
- * svg/SVGScriptElement.h:
- * svg/SVGTRefElement.cpp:
- (WebCore::SVGTRefElement::SVGTRefElement):
- * svg/SVGTRefElement.h:
- * svg/SVGTextPathElement.cpp:
- (WebCore::SVGTextPathElement::SVGTextPathElement):
- * svg/SVGTextPathElement.h:
- * svg/SVGURIReference.cpp:
- (WebCore::SVGURIReference::SVGURIReference):
- * svg/SVGURIReference.h:
- * svg/SVGUseElement.cpp:
- (WebCore::SVGUseElement::SVGUseElement):
- * svg/SVGUseElement.h:
-
-2009-10-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Re-add the QApplication::syncX() line for plugin windows removed
- by r49169. Also changed the location of the sync just after the
- creation instead of just before sending it to the plugin.
- https://bugs.webkit.org/show_bug.cgi?id=25053
-
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::platformStart):
-
-2009-10-08 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: NodeLists Don't Display Well in the Console
- https://bugs.webkit.org/show_bug.cgi?id=28061
-
- * inspector/front-end/InjectedScript.js:
- (Object.type):
-
-2009-10-08 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Windowless plugins: Remove unnecessary XSync for opaque mode.
-
- The reason for the XSync was that the plugin would not know about the
- Drawable. It turns out that the real reason behind this is that even
- though XCreatePixmap returns a handle, this id is unknown to the server
- until we flush the connection.
-
- So, move the XSync to right after we create the Pixmap.
-
- https://bugs.webkit.org/show_bug.cgi?id=30207
-
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::updatePluginWidget):
- (WebCore::PluginView::paint):
-
-2009-10-07 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=30188
-
- Fixes an issue where performing a non DHTML drag-and-drop operation
- does not work as expected. For instance, dragging some selected text
- to an external application, such as TextEdit.
-
- This issue was a regression that arose from patching bug #30107.
-
- This change is covered by the manual test:
- drag-out-of-background-window.html
-
- * page/DragController.cpp:
- (WebCore::DragController::startDrag): When performing a non-DHTML drag
- operation then default to drag operations DragOperationGeneric and
- DragOperationCopy according to similar functionality removed when fixing
- bug #30107, see:
- http://trac.webkit.org/browser/trunk/WebKit/mac/WebView/WebHTMLView.mm?rev=48526#L3430
-
-2009-10-07 Xan Lopez <xlopez@igalia.com>
-
- Fix more breakage in the GTKbuild.
-
- * GNUmakefile.am:
-
-2009-10-07 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Move PolicyChecker to it's own file
- https://bugs.webkit.org/show_bug.cgi?id=30193
-
- This is just moving code around and re-naming things.
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * loader/FrameLoader.cpp:
- * loader/FrameLoader.h:
- * loader/PolicyCallback.cpp: Added.
- (WebCore::PolicyCallback::PolicyCallback):
- (WebCore::PolicyCallback::~PolicyCallback):
- (WebCore::PolicyCallback::clear):
- (WebCore::PolicyCallback::set):
- (WebCore::PolicyCallback::call):
- (WebCore::PolicyCallback::clearRequest):
- (WebCore::PolicyCallback::cancel):
- * loader/PolicyCallback.h: Added.
- (WebCore::PolicyCallback::request):
- * loader/PolicyCheck.cpp: Removed.
- * loader/PolicyCheck.h: Removed.
-
-2009-10-07 Joel Stanley <joel@jms.id.au>
-
- Reviewed by Mark Rowe.
-
- Include <limits> for std::numeric_limits. Required by gcc-4.4
- https://bugs.webkit.org/show_bug.cgi?id=30197
-
- * html/canvas/CanvasByteArray.h:
- * html/canvas/CanvasIntArray.h:
- * html/canvas/CanvasShortArray.h:
- * html/canvas/CanvasUnsignedByteArray.h:
- * html/canvas/CanvasUnsignedIntArray.h:
- * html/canvas/CanvasUnsignedShortArray.h:
-
-2009-10-07 Adam Barth <abarth@webkit.org>
-
- Reviewed by Darin Adler.
-
- Factor PolicyChecker out of FrameLoader
- https://bugs.webkit.org/show_bug.cgi?id=30155
-
- This patch separates PolicyChecker from FrameLoader. Loader policy is
- in change of managing the FrameLoaderClient callbacks. Ideally, it
- shouldn't know anything about FrameLoader, but I couldn't quite remove
- all knowledge (although we might be able to do more later). In a
- future patch, I'll move PolicyChecker into a separate file.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::FrameLoader):
- (WebCore::FrameLoader::loadURL):
- (WebCore::FrameLoader::load):
- (WebCore::FrameLoader::loadWithDocumentLoader):
- (WebCore::PolicyChecker::handleUnimplementablePolicy):
- (WebCore::PolicyChecker::cannotShowMIMEType):
- (WebCore::PolicyChecker::PolicyChecker):
- (WebCore::PolicyChecker::checkNavigationPolicy):
- (WebCore::PolicyChecker::checkContentPolicy):
- (WebCore::FrameLoader::shouldReloadToHandleUnreachableURL):
- (WebCore::FrameLoader::stopAllLoaders):
- (WebCore::PolicyChecker::cancelCheck):
- (WebCore::PolicyChecker::stopCheck):
- (WebCore::PolicyChecker::continueAfterContentPolicy):
- (WebCore::PolicyChecker::continueLoadAfterWillSubmitForm):
- (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
- (WebCore::FrameLoader::loadPostRequest):
- (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
- (WebCore::PolicyChecker::checkNewWindowPolicy):
- (WebCore::PolicyChecker::continueAfterNewWindowPolicy):
- (WebCore::PolicyChecker::continueAfterNavigationPolicy):
- (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
- * loader/FrameLoader.h:
- (WebCore::PolicyChecker::loadType):
- (WebCore::PolicyChecker::setLoadType):
- (WebCore::PolicyChecker::delegateIsDecidingNavigationPolicy):
- (WebCore::PolicyChecker::delegateIsHandlingUnimplementablePolicy):
- (WebCore::FrameLoader::policy):
- * loader/FrameLoaderClient.h:
- * loader/MainResourceLoader.cpp:
- (WebCore::MainResourceLoader::didCancel):
- (WebCore::MainResourceLoader::willSendRequest):
- (WebCore::MainResourceLoader::continueAfterContentPolicy):
- (WebCore::MainResourceLoader::didReceiveResponse):
- * svg/graphics/SVGImage.cpp:
- (WebCore::SVGImage::dataChanged):
-
-2009-10-07 Geoffrey Garen <ggaren@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Fixed <rdar://problem/5751979> Database code takes JSLock on secondary
- thread, permanently slowing down JavaScript
-
- Changed callback objects to use a standard helper object. The helper
- object ASSERTs that it is deleted on the main thread, so no lock is
- required when unprotecting its members. It also centralizes some previously
- duplicated code.
-
- Callback objects that might be deleted on a secondary thread use
- callOnMainThread to delete their helper objects on the main thread.
-
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSCallbackData.cpp: Copied from bindings/js/JSCustomSQLTransactionCallback.cpp.
- (WebCore::JSCallbackData::deleteData):
- (WebCore::JSCallbackData::invokeCallback):
- * bindings/js/JSCallbackData.h: Copied from bindings/js/JSCustomSQLTransactionCallback.cpp.
- (WebCore::JSCallbackData::JSCallbackData):
- (WebCore::JSCallbackData::~JSCallbackData):
- (WebCore::JSCallbackData::callback):
- * bindings/js/JSCustomPositionCallback.cpp:
- (WebCore::JSCustomPositionCallback::JSCustomPositionCallback):
- (WebCore::JSCustomPositionCallback::handleEvent):
- * bindings/js/JSCustomPositionCallback.h:
- * bindings/js/JSCustomPositionErrorCallback.cpp:
- (WebCore::JSCustomPositionErrorCallback::JSCustomPositionErrorCallback):
- (WebCore::JSCustomPositionErrorCallback::handleEvent):
- * bindings/js/JSCustomPositionErrorCallback.h:
- * bindings/js/JSCustomSQLStatementCallback.cpp:
- (WebCore::JSCustomSQLStatementCallback::JSCustomSQLStatementCallback):
- (WebCore::JSCustomSQLStatementCallback::~JSCustomSQLStatementCallback):
- (WebCore::JSCustomSQLStatementCallback::handleEvent):
- * bindings/js/JSCustomSQLStatementCallback.h:
- * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
- (WebCore::JSCustomSQLStatementErrorCallback::JSCustomSQLStatementErrorCallback):
- (WebCore::JSCustomSQLStatementErrorCallback::~JSCustomSQLStatementErrorCallback):
- (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
- * bindings/js/JSCustomSQLStatementErrorCallback.h:
- * bindings/js/JSCustomSQLTransactionCallback.cpp:
- (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback):
- (WebCore::JSCustomSQLTransactionCallback::~JSCustomSQLTransactionCallback):
- (WebCore::JSCustomSQLTransactionCallback::handleEvent):
- * bindings/js/JSCustomSQLTransactionCallback.h:
- * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
- (WebCore::JSCustomSQLTransactionErrorCallback::JSCustomSQLTransactionErrorCallback):
- (WebCore::JSCustomSQLTransactionErrorCallback::~JSCustomSQLTransactionErrorCallback):
- (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
- * bindings/js/JSCustomSQLTransactionErrorCallback.h:
- * bindings/js/JSCustomVoidCallback.cpp:
- (WebCore::JSCustomVoidCallback::JSCustomVoidCallback):
- (WebCore::JSCustomVoidCallback::~JSCustomVoidCallback):
- (WebCore::JSCustomVoidCallback::handleEvent):
- * bindings/js/JSCustomVoidCallback.h:
- * storage/Database.cpp:
- (WebCore::Database::Database):
-
-2009-10-07 Jens Alfke <snej@chromium.org>
-
- Reviewed by Dave Levin.
-
- Fix StringImpl::m_buffer
- https://bugs.webkit.org/show_bug.cgi?id=30189
-
- Fix my previous StringImpl patch to avoid using an indefinite-length array member,
- since MSVC doesn't like it. Instead, go back to offsetting by sizeof(StringImpl).
-
- * platform/text/StringImpl.cpp:
- (WebCore::StringImpl::StringImpl):
- (WebCore::StringImpl::createUninitialized):
- * platform/text/StringImpl.h:
- (WebCore::StringImpl::bufferIsInternal):
-
-2009-10-07 Aaron Boodman <aa@chromium.org>
-
- Reviewed by Adam Barth.
-
- Update isolated worlds under v8 to support world reuse.
- https://bugs.webkit.org/show_bug.cgi?id=30145
-
- * bindings/v8/ScriptController.cpp:
- Replace evaluateInNewIsolatedWorld() withe evaluateInIsolatedWorld(id).
- (WebCore::ScriptController::evaluateInIsolatedWorld):
- * bindings/v8/ScriptController.h: Ditto.
- * bindings/v8/V8Proxy.cpp: Ditto.
- (WebCore::V8Proxy::~V8Proxy): Dittio.
- (WebCore::V8Proxy::evaluateInIsolatedWorld): Ditto.
- * bindings/v8/V8Proxy.h: Ditto.
- * bindings/v8/V8IsolatedWorld.cpp:
- Add support for controlling lifetime of a world, rather than relying on GC.
- (WebCore::V8IsolatedWorld::contextWeakReferenceCallback): Ditto.
- (WebCore::V8IsolatedWorld::V8IsolatedWorld): Ditto.
- (WebCore::V8IsolatedWorld::destroy): Ditto.
- * bindings/v8/V8IsolatedWorld.h: Ditto.
-
-2009-10-07 Jeremy Orlow <jorlow@chromium.org>
-
- Build fix for http://trac.webkit.org/changeset/49272 on Windows
-
- * platform/text/StringImpl.h:
-
-2009-10-07 Jens Alfke <snej@chromium.org>
-
- Reviewed by Darin Adler.
-
- Optimization of StringImpl:
- - Remove unnecessary m_bufferIsInternal member (saves 4 bytes). Instead, check whether
- m_data points to just past the end of the object's members.
- - copy() and createWithTerminatingNullCharacter() create the string in a single malloc
- block instead of 2 (saves ~20 bytes and considerable CPU cycles, increases locality).
- - Move m_length next to m_hash to save 4 bytes of padding in 64-bit builds.
-
- https://bugs.webkit.org/show_bug.cgi?id=29500
-
- * platform/text/StringImpl.cpp:
- (WebCore::StringImpl::StringImpl): Re-ordered members.
- (WebCore::StringImpl::~StringImpl): Change to is-buffer-internal check.
- (WebCore::StringImpl::createUninitialized): Use new m_buffer member instead of sizeof()
- to ensure chars are copied to correct location.
- (WebCore::StringImpl::createWithTerminatingNullCharacter): Make sure copy is created
- in a single malloc block.
- (WebCore::StringImpl::threadsafeCopy): Make sure copy is created in a single malloc block.
- (WebCore::StringImpl::crossThreadString): Make sure copy is created in a single malloc block.
- (WebCore::StringImpl::sharedBuffer): Change to is-buffer-internal check.
- * platform/text/StringImpl.h:
- (WebCore::StringImpl::startsWith): Just fixed a confusing param name.
- (WebCore::StringImpl::bufferIsInternal): Changed member var into accessor method.
- (WebCore::StringImpl::m_data): Repositioned for optimal member packing in 64-bit.
- (WebCore::StringImpl::m_buffer): Added to provide an explicit location for where internal buffer goes.
-
-2009-10-07 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=30102
- And
- <rdar://problem/5015957>
-
- Manual test to confirm that the not-allowed cursor is shown for an
- invalid drag-and-drop operation.
-
- We cannot test this using DRT because of a discrepancy between the Windows
- API-based drop effect and the WebKit drop effect. See bug #24731 for more
- details.
-
- * manual-tests/drag-cursor-notallowed.html: Added.
-
-2009-10-07 Mark Rowe <mrowe@apple.com>
-
- Fix the build.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-10-07 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <http://webkit.org/b/30104>.
- Inspector should show cookies of sub-resources on the page.
-
- This function implements showing cookies for all sub-resources of a page.
- When the page is loaded, it populates the Storage Panel with a list of all
- domains that were loaded as part of the full page load (iframes, ads, etc).
- When the user selects one of the domains, the inspector calls back into the
- controller, and the controller combines all of the cookies from that domain
- into a list, and sends that list is sent back to the controller to render.
-
- A domain now needs to be passed into CookieItemsView, and CookieSidebarTreeElement.
-
- As a result of a previous patch, we now have detailed cookie information for
- both Windows on CFNetwork and Mac. Additionally, this patch provides deleteCookie
- support on Windows.
-
- * bindings/js/ScriptObject.cpp:
- (WebCore::ScriptObject::set):
- * bindings/js/ScriptObject.h:
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::getCookies):
- (WebCore::InspectorBackend::deleteCookie):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::populateScriptObjects):
- (WebCore::InspectorController::didFinishLoading):
- (WebCore::InspectorController::getCookies):
- (WebCore::InspectorController::buildArrayForCookies):
- (WebCore::InspectorController::buildObjectForCookie):
- (WebCore::InspectorController::deleteCookie):
- * inspector/InspectorController.h:
- * inspector/InspectorDOMAgent.cpp:
- * inspector/InspectorDOMAgent.h:
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::addCookieDomainForDocument):
- * inspector/InspectorFrontend.h:
- * inspector/front-end/CookieItemsView.js:
- (WebInspector.CookieItemsView):
- (WebInspector.CookieItemsView.prototype.update):
- (WebInspector.CookieItemsView.prototype._deleteButtonClicked):
- * inspector/front-end/DOMAgent.js:
- (WebInspector.Cookies.getCookiesAsync):
- * inspector/front-end/StoragePanel.js:
- (WebInspector.StoragePanel):
- (WebInspector.StoragePanel.prototype.reset):
- (WebInspector.StoragePanel.prototype.addCookieDomain):
- (WebInspector.StoragePanel.prototype.showCookies):
- (WebInspector.CookieSidebarTreeElement):
- (WebInspector.CookieSidebarTreeElement.prototype.onselect):
- * inspector/front-end/inspector.js:
- (WebInspector.addCookieDomain):
- * platform/Cookie.h:
- (WebCore::CookieHash::hash):
- (WebCore::CookieHash::equal):
- (WTF::):
- * platform/network/win/CookieJarCFNetWin.cpp:
- (WebCore::deleteCookie):
-
-2009-10-07 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Add ScriptObject::set(const char*, unsigned).
-
- https://bugs.webkit.org/show_bug.cgi?id=30104
-
- * bindings/v8/ScriptObject.cpp:
- (WebCore::ScriptObject::set):
- * bindings/v8/ScriptObject.h:
-
-2009-10-07 Brent Fulgham <bfulgham@webkit.org>
-
- Unreviewed build fix for Windows (Cairo).
-
- Provide implementation of new BitmapImage::create that was
- added in @r49060.
-
- * platform/graphics/win/ImageCairoWin.cpp:
-
-2009-10-07 Andrew Scherkus <scherkus@chromium.org>
-
- Reviewed by Eric Carlson.
-
- Refactor RenderThemeChromiumMac and RenderThemeChromiumSkia to render media controls using GraphicsContext.
-
- Design was based on existing RenderMediaControls.cpp used by RenderThemeSafari/Win.
-
- https://bugs.webkit.org/show_bug.cgi?id=29987
-
- Covered by existing layout tests as no new functionality was introduced.
-
- * WebCore.gypi: Added RenderMediaControlsChromium.cpp/h.
- * css/mediaControlsChromium.css: Tweaked media slider position and border style.
- * rendering/MediaControlElements.cpp:
- (WebCore::toParentMediaElement): Taken from RenderMediaControls.
- (WebCore::MediaControlElement::rendererIsNeeded): Don't call shouldRenderMediaControlPart() if element has no appearance.
- (WebCore::MediaControlInputElement::rendererIsNeeded): Ditto.
- * rendering/RenderMediaControls.cpp: Moved parentMediaElement() to MediaControlElements.
- * rendering/RenderMediaControlsChromium.cpp: Added.
- (WebCore::platformResource): Helper to load and cache media control image resources.
- (WebCore::mediaSliderThumbImage): Implementation refactored from RenderThemeChromiumMac/Skia.
- (WebCore::mediaVolumeSliderThumbImage): Ditto.
- (WebCore::paintMediaButton): Ditto.
- (WebCore::paintMediaMuteButton): Ditto.
- (WebCore::paintMediaPlayButton): Ditto.
- (WebCore::paintMediaSlider): Ditto.
- (WebCore::paintMediaSliderThumb): Ditto.
- (WebCore::paintMediaVolumeSlider): Ditto.
- (WebCore::paintMediaVolumeSliderThumb): Ditto.
- (WebCore::paintMediaTimelineContainer): Ditto.
- (WebCore::RenderMediaControlsChromium::shouldRenderMediaControlPart): Ditto.
- (WebCore::RenderMediaControlsChromium::paintMediaControlsPart): Same
- (WebCore::RenderMediaControlsChromium::adjustMediaSliderThumbSize):
- * rendering/RenderMediaControlsChromium.h: Added.
- * rendering/RenderThemeChromiumMac.h:
- * rendering/RenderThemeChromiumMac.mm:
- (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize): Implementation delegated to RenderMediaControlsChromium.
- (WebCore::RenderThemeChromiumMac::shouldRenderMediaControlPart): Ditto.
- (WebCore::RenderThemeChromiumMac::paintMediaPlayButton): Ditto.
- (WebCore::RenderThemeChromiumMac::paintMediaMuteButton): Ditto.
- (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack): Ditto.
- (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderTrack): Ditto.
- (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb): Ditto.
- (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderThumb): Ditto.
- (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground): Ditto.
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::paintMediaControlsBackground): Implementation delegated to RenderMediaControlsChromium.
- (WebCore::RenderThemeChromiumSkia::paintMediaSliderTrack): Ditto.
- (WebCore::RenderThemeChromiumSkia::paintMediaVolumeSliderTrack): Ditto.
- (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize): Ditto.
- (WebCore::RenderThemeChromiumSkia::paintMediaSliderThumb): Ditto.
- (WebCore::RenderThemeChromiumSkia::paintMediaVolumeSliderThumb): Ditto.
- (WebCore::RenderThemeChromiumSkia::paintMediaPlayButton): Ditto.
- (WebCore::RenderThemeChromiumSkia::paintMediaMuteButton): Ditto.
- (WebCore::RenderThemeChromiumSkia::shouldRenderMediaControlPart): Ditto.
-
-2009-10-07 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Adam Roben.
-
- Make plugins work with beforeload.
-
- Added fast/dom/beforeload/flash-before-load.html
-
- * html/HTMLObjectElement.cpp:
- (WebCore::HTMLObjectElement::parseMappedAttribute):
- * rendering/RenderPartObject.cpp:
- (WebCore::RenderPartObject::updateWidget):
-
-2009-10-07 Vitaly Repeshko <vitalyr@chromium.org>
-
- Reviewed by Adam Barth.
-
- [V8] Protect JS listener object from GC while clearing a property on it.
- See http://crbug.com/23780.
- https://bugs.webkit.org/show_bug.cgi?id=30137
-
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::~V8AbstractEventListener):
-
-2009-10-07 Zoltan Horvath <zoltan@webkit.org>
-
- Rubber-stamped by Eric Seidel.
-
- Allow custom memory allocation control for WebCore's CachedResourceClient class
- https://bugs.webkit.org/show_bug.cgi?id=30165
-
- Inherits CachedResourceClient class from FastAllocBase because (its
- child class) CSSFontFaceSource has been instantiated by 'new' in WebCore/css/CSSFontFaceSource.h:46.
-
- * loader/CachedResourceClient.h:
-
-2009-10-07 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Allow custom memory allocation control for WebCore's IdentifierRep
- https://bugs.webkit.org/show_bug.cgi?id=30159
-
- Inherits IdentifierRep class from FastAllocBase because it has been
- instantiated by 'new' in WebCore/bridge/IdentifierRep.cpp:61.
-
- * bridge/IdentifierRep.h:
-
-2009-10-07 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Adam Barth.
-
- Fetch pointers to C+DOM window immediately from holder
- object (do not search prototype chain for proper JS wrapper).
- https://bugs.webkit.org/show_bug.cgi?id=29031
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getTemplate):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::createNewContext):
- (WebCore::V8Proxy::installDOMWindow):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::NAMED_ACCESS_CHECK):
- (WebCore::INDEXED_ACCESS_CHECK):
-2009-10-07 Adam Roben <aroben@apple.com>
-
- Fix typo in PluginView::load that was causing cross-origin loads to
- be allowed
-
- This typo was introduced in the build fix in r49213.
-
- Fixes <http://webkit.org/b/30168> REGRESSION (r49213):
- http/tests/plugins/local-geturl-from-remote.html is failing on Windows
-
- Reviewed by Sam Weinig.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::load): Removed a comma operator that was making
- a condition always evaluate to true.
-
-2009-10-07 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Hausmann.
-
- Do not create valid QColor's for invalid WebCore::Color's.
-
- * platform/graphics/qt/ColorQt.cpp:
- (WebCore::Color::operator QColor):
-
-2009-10-07 Janne Koskinen <janne.p.koskinen@digia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Symbian SBSv2 .data segment adress fix
- https://bugs.webkit.org/show_bug.cgi?id=30157
-
- RO-section in qtwebkit.dll exceeds allocated space in SBSv2. Move RW-section
- base address to start from 0x800000 instead of the toolchain default 0x400000
-
- * WebCore.pro:
-
-2009-10-07 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Migrate database inspection to the injected script-based schema.
-
- https://bugs.webkit.org/show_bug.cgi?id=29788
-
- * bindings/js/JSInspectorBackendCustom.cpp:
- (WebCore::JSInspectorBackend::databaseForId):
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8InspectorBackendCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::dispatchOnInjectedScript):
- (WebCore::InspectorBackend::databaseForId):
- (WebCore::InspectorBackend::selectDatabase):
- (WebCore::InspectorBackend::getDatabaseTableNames):
- (WebCore::InspectorBackend::reportDidDispatchOnInjectedScript):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::populateScriptObjects):
- (WebCore::InspectorController::resetScriptObjects):
- (WebCore::InspectorController::selectDatabase):
- (WebCore::InspectorController::databaseForId):
- (WebCore::InspectorController::didOpenDatabase):
- (WebCore::InspectorController::didUseDOMStorage):
- (WebCore::InspectorController::selectDOMStorage):
- (WebCore::InspectorController::getDOMStorageResourceForId):
- * inspector/InspectorController.h:
- * inspector/InspectorDatabaseResource.cpp:
- (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
- (WebCore::InspectorDatabaseResource::bind):
- * inspector/InspectorDatabaseResource.h:
- (WebCore::InspectorDatabaseResource::database):
- (WebCore::InspectorDatabaseResource::id):
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::addDatabase):
- (WebCore::InspectorFrontend::selectDatabase):
- (WebCore::InspectorFrontend::didGetDatabaseTableNames):
- (WebCore::InspectorFrontend::addDOMStorage):
- * inspector/InspectorFrontend.h:
- * inspector/front-end/Database.js:
- (WebInspector.Database):
- (WebInspector.Database.prototype.get id):
- (WebInspector.Database.prototype.set name):
- (WebInspector.Database.prototype.set version):
- (WebInspector.Database.prototype.set domain):
- (WebInspector.Database.prototype.getTableNames):
- (WebInspector.Database.prototype.executeSql):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.dispatch):
- (InjectedScript.executeSql):
- (InjectedScript.executeSql.errorCallback):
- (InjectedScript.executeSql.queryTransaction):
- * inspector/front-end/InjectedScriptAccess.js:
- (InjectedScriptAccess._installHandler.InjectedScriptAccess.methodName):
- (InjectedScriptAccess._installHandler):
- * inspector/front-end/StoragePanel.js:
- (WebInspector.StoragePanel.prototype.selectDatabase):
- (WebInspector.StoragePanel.prototype.dataGridForResult):
- * inspector/front-end/inspector.js:
- (WebInspector.addDatabase):
-
-2009-10-07 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Windowless Plugins: Disable content propagation for QGraphicsView items
-
- We cannot support content propagation for items in QGraphicsView because
- the contents of the backing store might be transformed. So turn it off
- if we are not painting on QWidget.
-
- Note that this check will not work for a QWebView in a
- QGraphicsProxyWidget, but I guess it's fine. Alternative is to do an
- even uglier cast: static_cast painter's paintDevice() to QWidget and
- check if it is the viewport() of QGraphicsView.
-
- https://bugs.webkit.org/show_bug.cgi?id=30149
-
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::paint):
-
-2009-10-07 Simon Hausmann <simon.hausmann@nokia.com>
-
- Fix the Qt build by adding the missing files to the build.
-
- * WebCore.pro:
-
-2009-10-07 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Reviewed by Xan Lopez.
-
- Fix incorrect convertion of double into int while assigning it to
- a float.
-
- * platform/graphics/gtk/SimpleFontDataGtk.cpp:
- (WebCore::SimpleFontData::platformInit):
- * platform/graphics/gtk/SimpleFontDataPango.cpp:
- (WebCore::SimpleFontData::platformInit):
-
-2009-10-07 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Reviewed by Xan Lopez.
-
- Fix rounding error issues in height calculation in 64 bits.
-
- Already covered by existing tests.
-
- * platform/graphics/gtk/SimpleFontDataGtk.cpp:
- (WebCore::SimpleFontData::platformInit):
- * platform/graphics/gtk/SimpleFontDataPango.cpp:
- (WebCore::SimpleFontData::platformInit):
-
-2009-10-07 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Dual lines in css2.1 layout tests do not match:
- https://bugs.webkit.org/show_bug.cgi?id=23262
-
- Now we can put a counter node as the next sibling of a reset node.
- Re-layout the counter content when the count is updated.
-
- Tests: fast/css/counters/t1204-increment-00-c-o.html
- fast/css/counters/t1204-increment-01-c-o.html
-
- * rendering/CounterNode.cpp:
- (WebCore::CounterNode::recount):
- * rendering/RenderCounter.cpp:
- (WebCore::findPlaceForCounter):
-
-2009-10-06 Xan Lopez <xlopez@igalia.com>
-
- Try to fix the GTKbuild.
-
- * GNUmakefile.am:
-
-2009-10-06 Adam Barth <abarth@webkit.org>
-
- Reviewed by Adam Barth.
-
- Removed unused member variable from FrameLoader
- https://bugs.webkit.org/show_bug.cgi?id=30146
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::FrameLoader):
- * loader/FrameLoader.h:
-
-2009-10-06 David Levin <levin@chromium.org>
-
- Reviewed by NOBODY (build fix).
-
- A few small/trivial tweaks to the last build fix.
-
- * bindings/scripts/CodeGeneratorV8.pm:
-
-2009-10-06 David Levin <levin@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [Chromium] Need to adjust MessagePort, etc. code for the post clone work done.
- https://bugs.webkit.org/show_bug.cgi?id=30147
-
- No change in functionality so no new tests.
-
- * WebCore.gypi:
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/SerializedScriptValue.h: Added.
- A very simple implementation of SerializedScriptValue
- that only works for strings.
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8MessageEventCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8MessagePortCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WorkerCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-10-06 Sam Weinig <sam@webkit.org>
-
- Reviewed by Brady Eidson.
-
- Fix for <rdar://problem/7271202>
- Dispatch resource load delegate functions for the media element.
- Since we don't get the required callbacks from the media engine,
- just fake the parameters to the delegate functions as best as possible.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::loadResource):
- (WebCore::HTMLMediaElement::isSafeToLoadURL):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::willLoadMediaElementURL):
- * loader/FrameLoader.h:
-
-2009-10-06 Oliver Hunt <oliver@apple.com>
-
- Reviewed by NOBODY (Build fix).
-
- More build fixes.
-
- * bindings/js/SerializedScriptValue.cpp:
- (WebCore::DeserializingTreeWalker::getProperty):
- (WebCore::TeardownTreeWalker::getProperty):
- * bindings/js/SerializedScriptValue.h:
- (WebCore::SerializedScriptValue::SerializedScriptValue):
-
-2009-10-06 Oliver Hunt <oliver@apple.com>
-
- Reviewed by NOBODY (Build fix).
-
- Build and formatting fix.
-
- * ForwardingHeaders/runtime/ExceptionHelpers.h: Added.
- * bindings/js/SerializedScriptValue.cpp:
- * bindings/js/SerializedScriptValue.h:
- (WebCore::SerializedScriptValueData::operator bool):
- (WebCore::SerializedScriptValueData::release):
- (WebCore::SerializedScriptValue::release):
- (WebCore::SerializedScriptValue::toString):
- (WebCore::SerializedScriptValue::~SerializedScriptValue):
- (WebCore::SerializedScriptValue::SerializedScriptValue):
-
-2009-10-05 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Gavin Barraclough.
-
- It should be possible to post (clone) built-in JS objects to Workers
- https://bugs.webkit.org/show_bug.cgi?id=22878
-
- Implement object cloning semantics for postMessage. Currently only
- a partial implementation of the spec -- cloning of File, FileList,
- ImageData, and RegExp were left out as they would have significantly
- increased patch size.
-
- Cloning requires multiple tree walks so we use a templated tree
- walk function, allowing us to share a single implementation for
- serialization, deserialization, and eventual destruction of the
- serialized object tree.
-
- Test: fast/dom/Window/window-postmessage-clone.html
-
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::postMessage):
- * bindings/js/JSMessageEventCustom.cpp:
- (WebCore::JSMessageEvent::initMessageEvent):
- * bindings/js/JSMessagePortCustom.h:
- (WebCore::handlePostMessage):
- * bindings/js/SerializedScriptValue.cpp: Added.
- (WebCore::SerializedObject::set):
- (WebCore::SerializedObject::names):
- (WebCore::SerializedObject::values):
- (WebCore::SerializedObject::create):
- (WebCore::SerializedObject::clear):
- (WebCore::SerializedObject::SerializedObject):
- (WebCore::SerializedArray::setIndex):
- (WebCore::SerializedArray::canDoFastRead):
- (WebCore::SerializedArray::getIndex):
- (WebCore::SerializedArray::getSparseIndex):
- (WebCore::SerializedArray::length):
- (WebCore::SerializedArray::create):
- (WebCore::SerializedArray::clear):
- (WebCore::SerializedArray::SerializedArray):
- (WebCore::SerializedScriptValueData::SerializedScriptValueData):
- (WebCore::SharedSerializedData::asArray):
- (WebCore::SharedSerializedData::asObject):
- (WebCore::):
- (WebCore::walk):
- (WebCore::BaseWalker::BaseWalker):
- (WebCore::BaseWalker::shouldTerminate):
- (WebCore::BaseWalker::ticksUntilNextCheck):
- (WebCore::BaseWalker::didTimeOut):
- (WebCore::BaseWalker::throwStackOverflow):
- (WebCore::BaseWalker::throwInterruptedException):
- (WebCore::SerializingTreeWalker::SerializingTreeWalker):
- (WebCore::SerializingTreeWalker::null):
- (WebCore::SerializingTreeWalker::isArray):
- (WebCore::SerializingTreeWalker::isObject):
- (WebCore::SerializingTreeWalker::asInputArray):
- (WebCore::SerializingTreeWalker::asInputObject):
- (WebCore::SerializingTreeWalker::createOutputArray):
- (WebCore::SerializingTreeWalker::createOutputObject):
- (WebCore::SerializingTreeWalker::length):
- (WebCore::SerializingTreeWalker::canDoFastRead):
- (WebCore::SerializingTreeWalker::getIndex):
- (WebCore::SerializingTreeWalker::getSparseIndex):
- (WebCore::SerializingTreeWalker::getProperty):
- (WebCore::SerializingTreeWalker::convertIfTerminal):
- (WebCore::SerializingTreeWalker::getPropertyNames):
- (WebCore::SerializingTreeWalker::putIndex):
- (WebCore::SerializingTreeWalker::putProperty):
- (WebCore::SerializingTreeWalker::startArray):
- (WebCore::SerializingTreeWalker::endArray):
- (WebCore::SerializingTreeWalker::startObject):
- (WebCore::SerializingTreeWalker::endObject):
- (WebCore::SerializedScriptValueData::serialize):
- (WebCore::DeserializingTreeWalker::DeserializingTreeWalker):
- (WebCore::DeserializingTreeWalker::null):
- (WebCore::DeserializingTreeWalker::isArray):
- (WebCore::DeserializingTreeWalker::isObject):
- (WebCore::DeserializingTreeWalker::asInputArray):
- (WebCore::DeserializingTreeWalker::asInputObject):
- (WebCore::DeserializingTreeWalker::createOutputArray):
- (WebCore::DeserializingTreeWalker::createOutputObject):
- (WebCore::DeserializingTreeWalker::length):
- (WebCore::DeserializingTreeWalker::canDoFastRead):
- (WebCore::DeserializingTreeWalker::getIndex):
- (WebCore::DeserializingTreeWalker::getSparseIndex):
- (WebCore::DeserializingTreeWalker::getProperty):
- (WebCore::DeserializingTreeWalker::convertIfTerminal):
- (WebCore::DeserializingTreeWalker::getPropertyNames):
- (WebCore::DeserializingTreeWalker::putIndex):
- (WebCore::DeserializingTreeWalker::putProperty):
- (WebCore::DeserializingTreeWalker::startArray):
- (WebCore::DeserializingTreeWalker::endArray):
- (WebCore::DeserializingTreeWalker::startObject):
- (WebCore::DeserializingTreeWalker::endObject):
- (WebCore::SerializedScriptValueData::deserialize):
- (WebCore::TeardownTreeWalker::shouldTerminate):
- (WebCore::TeardownTreeWalker::ticksUntilNextCheck):
- (WebCore::TeardownTreeWalker::didTimeOut):
- (WebCore::TeardownTreeWalker::throwStackOverflow):
- (WebCore::TeardownTreeWalker::throwInterruptedException):
- (WebCore::TeardownTreeWalker::null):
- (WebCore::TeardownTreeWalker::isArray):
- (WebCore::TeardownTreeWalker::isObject):
- (WebCore::TeardownTreeWalker::asInputArray):
- (WebCore::TeardownTreeWalker::asInputObject):
- (WebCore::TeardownTreeWalker::createOutputArray):
- (WebCore::TeardownTreeWalker::createOutputObject):
- (WebCore::TeardownTreeWalker::length):
- (WebCore::TeardownTreeWalker::canDoFastRead):
- (WebCore::TeardownTreeWalker::getIndex):
- (WebCore::TeardownTreeWalker::getSparseIndex):
- (WebCore::TeardownTreeWalker::getProperty):
- (WebCore::TeardownTreeWalker::convertIfTerminal):
- (WebCore::TeardownTreeWalker::getPropertyNames):
- (WebCore::TeardownTreeWalker::putIndex):
- (WebCore::TeardownTreeWalker::putProperty):
- (WebCore::TeardownTreeWalker::startArray):
- (WebCore::TeardownTreeWalker::endArray):
- (WebCore::TeardownTreeWalker::startObject):
- (WebCore::TeardownTreeWalker::endObject):
- (WebCore::SerializedScriptValueData::tearDownSerializedData):
- * bindings/js/SerializedScriptValue.h: Added.
- (WebCore::SharedSerializedData::~SharedSerializedData):
- (WebCore::SerializedScriptValueData::):
- (WebCore::SerializedScriptValueData::type):
- (WebCore::SerializedScriptValueData::~SerializedScriptValueData):
- (WebCore::SerializedScriptValueData::SerializedScriptValueData):
- (WebCore::SerializedScriptValueData::asImmediate):
- (WebCore::SerializedScriptValueData::asDouble):
- (WebCore::SerializedScriptValueData::asString):
- (WebCore::SerializedScriptValueData::asObject):
- (WebCore::SerializedScriptValueData::asArray):
- (WebCore::SerializedScriptValueData::operator bool ):
- (WebCore::SerializedScriptValueData::release):
- (WebCore::SerializedScriptValue::create):
- (WebCore::SerializedScriptValue::release):
- (WebCore::SerializedScriptValue::toString):
- (WebCore::SerializedScriptValue::deserialize):
- (WebCore::SerializedScriptValue::~SerializedScriptValue):
- (WebCore::SerializedScriptValue::SerializedScriptValue):
- * bindings/scripts/CodeGeneratorJS.pm:
- * bindings/scripts/CodeGeneratorObjC.pm:
- * dom/MessageEvent.cpp:
- (WebCore::MessageEvent::MessageEvent):
- (WebCore::MessageEvent::initMessageEvent):
- * dom/MessageEvent.h:
- (WebCore::MessageEvent::create):
- (WebCore::MessageEvent::data):
- * dom/MessageEvent.idl:
- * dom/MessagePort.cpp:
- (WebCore::MessagePort::postMessage):
- * dom/MessagePort.h:
- * dom/MessagePortChannel.cpp:
- (WebCore::MessagePortChannel::EventData::create):
- (WebCore::MessagePortChannel::EventData::EventData):
- * dom/MessagePortChannel.h:
- (WebCore::MessagePortChannel::EventData::message):
- * page/DOMWindow.cpp:
- (WebCore::PostMessageTimer::PostMessageTimer):
- (WebCore::DOMWindow::postMessage):
- * page/DOMWindow.h:
- * page/DOMWindow.idl:
- * page/EventSource.cpp:
- (WebCore::EventSource::createMessageEvent):
- * websockets/WebSocket.cpp:
- (WebCore::WebSocket::didReceiveMessage):
- * workers/DedicatedWorkerContext.cpp:
- (WebCore::DedicatedWorkerContext::postMessage):
- * workers/DedicatedWorkerContext.h:
- * workers/DedicatedWorkerContext.idl:
- * workers/Worker.cpp:
- (WebCore::Worker::postMessage):
- * workers/Worker.h:
- * workers/Worker.idl:
- * workers/WorkerContextProxy.h:
- * workers/WorkerMessagingProxy.cpp:
- (WebCore::MessageWorkerContextTask::create):
- (WebCore::MessageWorkerContextTask::MessageWorkerContextTask):
- (WebCore::MessageWorkerTask::create):
- (WebCore::MessageWorkerTask::MessageWorkerTask):
- (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
- (WebCore::WorkerMessagingProxy::postMessageToWorkerContext):
- * workers/WorkerMessagingProxy.h:
- * workers/WorkerObjectProxy.h:
-
-2009-10-06 Adam Barth <abarth@webkit.org>
-
- Unreviewed build fix for Windows.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::load):
-
-2009-10-06 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Move FrameLoader::canLoad to SecurityOrigin
- https://bugs.webkit.org/show_bug.cgi?id=30111
-
- * WebCore.base.exp:
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::isSafeToLoadURL):
- * loader/Cache.cpp:
- (WebCore::Cache::requestResource):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::loadSubframe):
- (WebCore::FrameLoader::loadPlugin):
- (WebCore::FrameLoader::loadFrameRequest):
- (WebCore::FrameLoader::loadResourceSynchronously):
- (WebCore::FrameLoader::createJavaAppletWidget):
- * loader/FrameLoader.h:
- * loader/SubresourceLoader.cpp:
- (WebCore::SubresourceLoader::create):
- * page/SecurityOrigin.cpp:
- (WebCore::SecurityOrigin::canLoad):
- (WebCore::SecurityOrigin::shouldHideReferrer):
- * page/SecurityOrigin.h:
-
-2009-10-06 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Move setLocalLoadPolicy and friends to SecurityOrigin
- https://bugs.webkit.org/show_bug.cgi?id=30110
-
- These have more to do with security policies than with loading frames.
-
- * WebCore.base.exp:
- * dom/Document.cpp:
- (WebCore::Document::initSecurityContext):
- * loader/Cache.cpp:
- (WebCore::Cache::requestResource):
- * loader/FrameLoader.cpp:
- * loader/FrameLoader.h:
- * loader/SubresourceLoader.cpp:
- (WebCore::SubresourceLoader::create):
- * page/SecurityOrigin.cpp:
- (WebCore::SecurityOrigin::setLocalLoadPolicy):
- (WebCore::SecurityOrigin::restrictAccessToLocal):
- (WebCore::SecurityOrigin::allowSubstituteDataAccessToLocal):
- * page/SecurityOrigin.h:
- (WebCore::SecurityOrigin::):
-
-2009-10-06 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Brady Eidson.
-
- Preparation for <http://webkit.org/b/30104>.
- Inspector should show cookies of sub-resources on the page.
-
- Implement getRawCookies for CFNetwork for Windows, so we can see more
- than just a key/value pair for Cookies when we are on Windows.
-
- * platform/network/win/CookieJarCFNetWin.cpp:
- (WebCore::getRawCookies):
-
-2009-10-06 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Adam Roben.
-
- https://bugs.webkit.org/show_bug.cgi?id=30132, make beforeload work with <link> elements and
- XML processing instructions.
-
- Fix up ProcessingInstruction's setData call so that it actually updates a stylesheet when the
- data gets changed.
-
- Move dispatchBeforeLoadedEvent to ContainerNode so all Elements (and ProcessingInstruction) can
- access it.
-
- Added fast/dom/beforeload/link-before-load.html
-
- * dom/ContainerNode.cpp:
- (WebCore::ContainerNode::dispatchBeforeLoadEvent):
- * dom/ContainerNode.h:
- * dom/ProcessingInstruction.cpp:
- (WebCore::ProcessingInstruction::checkStyleSheet):
- (WebCore::ProcessingInstruction::setData):
- * dom/ScriptElement.cpp:
- (WebCore::ScriptElementData::requestScript):
- * dom/ScriptElement.h:
- * dom/XMLTokenizerLibxml2.cpp:
- (WebCore::XMLTokenizer::endElementNs):
- * html/HTMLLinkElement.cpp:
- (WebCore::HTMLLinkElement::parseMappedAttribute):
- (WebCore::HTMLLinkElement::process):
- * html/HTMLScriptElement.cpp:
- (WebCore::HTMLScriptElement::forAttributeValue):
- * html/HTMLScriptElement.h:
- * svg/SVGScriptElement.cpp:
- * svg/SVGScriptElement.h:
-
-2009-10-06 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Mark Rowe.
-
- accessibility/media-element.html crashes (and has incorrect result)
- https://bugs.webkit.org/show_bug.cgi?id=30108
-
- Fix up the accessibilty label for the newly added fullscreen button,
- and update the test result accordingly.
-
- * accessibility/AccessibilityMediaControls.cpp:
- (WebCore::AccessibilityMediaControl::controlTypeName):
-
-2009-10-06 Kelly Norton <knorton@google.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <https://bugs.webkit.org/show_bug.cgi?id=30028>
- Multiple calls to SetFrontendProxyObject can leave an InspectorTimelineAgent with an invalid
- InspectorFrontend.
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::setFrontendProxyObject): Adds a check for an existing timeline agent.
-
-2009-10-06 Antti Koivisto <antti@apple.com>
-
- Reviewed by Dave Kilzer.
-
- Move textRects to the right category in DOM.mm. Include DOMPrivate.h to ensure that the interfaces match.
-
- * bindings/objc/DOM.mm:
- (-[DOMNode textRects]):
-
-2009-10-06 Benjamin C Meyer <bmeyer@rim.com>
-
- Reviewed by Ariya Hidayat.
-
- Match the behavior of other WebKit browser and have the first url of the drag data be the url passed in declareAndWriteDragImage and set the text of the drag data to be the title argument.
-
- Manual test: Drag the readability js link from http://lab.arc90.com/experiments/readability/
-
- * platform/qt/ClipboardQt.cpp:
- (WebCore::ClipboardQt::declareAndWriteDragImage):
-
-2009-10-06 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Darin Adler.
-
- Implement min/max attributes, ValidityState.rangeUnderflow and
- ValidityState.rangeOverflow for <input type=number> and <input type=range>
- https://bugs.webkit.org/show_bug.cgi?id=29069
-
- HTMLInputElement::max and min are not defined for COM because they
- conflict with the standard min() and max() macros.
-
- Tests: fast/forms/ValidityState-rangeOverflow-number.html
- fast/forms/ValidityState-rangeOverflow-range.html
- fast/forms/ValidityState-rangeUnderflow-number.html
- fast/forms/ValidityState-rangeUnderflow-range.html
- fast/forms/input-minmax.html
-
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::rangeUnderflow):
- (WebCore::HTMLInputElement::rangeOverflow):
- (WebCore::HTMLInputElement::rangeMinimum):
- (WebCore::HTMLInputElement::rangeMaximum):
- * html/HTMLInputElement.h:
- * html/HTMLInputElement.idl:
- * html/ValidityState.cpp:
- (WebCore::ValidityState::rangeUnderflow):
- (WebCore::ValidityState::rangeOverflow):
- * html/ValidityState.h:
- * rendering/RenderSlider.cpp:
- (WebCore::SliderRange::SliderRange):
- (WebCore::SliderRange::valueFromElement):
-
-2009-10-06 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Move m_openedByDOM to Page
- https://bugs.webkit.org/show_bug.cgi?id=30109
-
- We only need one instance of m_openedByDOM per page, we should move it
- to a page-scoped object. Notice that it's only ever touched for the
- main frame.
-
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::createWindow):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::createWindow):
- * loader/FrameLoader.cpp:
- * loader/FrameLoader.h:
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::close):
- * page/Page.cpp:
- (WebCore::Page::Page):
- (WebCore::Page::openedByDOM):
- (WebCore::Page::setOpenedByDOM):
- * page/Page.h:
-
-2009-10-06 Carol Szabo <carol.szabo@nokia.com>
-
- Reviewed by Ariya Hidayat.
-
- [Qt] Some functions in GraphicsContext do not work
- as expected if the associated painter has no clipping.
- https://bugs.webkit.org/show_bug.cgi?id=29691
-
- No new tests are associated with this because DumpRenderTree
- always sets clipping on the painter, thus it would never hit
- the test case, but fast/box-shadow/basic-shadows.html is a
- good example of what happens if the clipping is not set by
- the user of QtWebKit.
-
- * platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::GraphicsContext::clipOut):
- (WebCore::GraphicsContext::clipOutEllipseInRect):
- Fixed to handle the case that there is no clipping
- before the call.
-
-2009-10-06 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Adam Roben.
-
- https://bugs.webkit.org/show_bug.cgi?id=30131, make beforeload fire on script elements.
-
- Added tests in fast/dom/beforeload/.
-
- * dom/ScriptElement.cpp:
- (WebCore::ScriptElementData::requestScript):
- * dom/ScriptElement.h:
- * dom/XMLTokenizerLibxml2.cpp:
- (WebCore::XMLTokenizer::endElementNs):
- * html/HTMLAttributeNames.in:
- * html/HTMLScriptElement.cpp:
- (WebCore::HTMLScriptElement::parseMappedAttribute):
- (WebCore::HTMLScriptElement::dispatchBeforeLoadEvent):
- * html/HTMLScriptElement.h:
- * html/HTMLTokenizer.cpp:
- (WebCore::HTMLTokenizer::scriptHandler):
- * svg/SVGScriptElement.cpp:
- (WebCore::SVGScriptElement::dispatchBeforeLoadEvent):
- * svg/SVGScriptElement.h:
-
-2009-10-06 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=25526
- [Gtk] Additional support is needed for caret browsing
-
- Enable caret movement commands also when caret browsing setting is
- enabled.
-
- * editing/EditorCommand.cpp:
- (WebCore::caretBrowsingEnabled):
- (WebCore::enabledVisibleSelectionOrCaretBrowsing):
- (WebCore::enabledInEditableTextOrCaretBrowsing):
- (WebCore::CommandEntry::):
- * manual-tests/gtk/caret-browsing.html: Added.
-
-2009-10-06 Anton Muhin <antonm@chromium>
-
- Reviewed by Dimitri Glazkov.
-
- Non standard, but popular exetension allows automagically
- turn a function into a namespace resolver. Support that in
- Chromium as well.
-
- Adjust CodeGeneratorV8 to treat XPathNSResolver in a special way.
- https://bugs.webkit.org/show_bug.cgi?id=30128
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/V8DOMWrapper.h:
- (WebCore::V8DOMWrapper::getXPathNSResolver):
- * bindings/v8/custom/V8DocumentCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-10-06 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: close inspector client view on
- InspectorController::close API call.
-
- In order to run batch web inspector layout tests (and not affect
- subsequent tests) we should close inspector client's view upon
- InspectorController::close API call.
-
- https://bugs.webkit.org/show_bug.cgi?id=30009
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::inspectedPageDestroyed):
- (WebCore::InspectorController::close):
-
-2009-10-06 Simon Hausmann <simon.hausmann@nokia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- Fix the Qt/Windows build by stubbing out the still image
- support for halted plugins for the Qt build.
-
- Bugzilla entry https://bugs.webkit.org/show_bug.cgi?id=30130
- tracks removing this by implementing Frame::nodeImage().
-
- * plugins/win/PluginViewWin.cpp:
- (WebCore::PluginView::halt):
-
-2009-10-05 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Change QImageReader usage in ImageDecoderQt
- https://bugs.webkit.org/show_bug.cgi?id=27538
-
- Replace the ReadContext with another appoach to
- reading the image. Attempt to only read meta information
- like the image size and number of frames (for animations)
- first and then when the page is getting drawn decode
- the image with the QImageReader.
-
- This is a huge benefit on pages with many images and saves
- ~2GB of memory on the szeged image test page.
-
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoderQt::ImageDecoderQt):
- (WebCore::ImageDecoderQt::setData):
- (WebCore::ImageDecoderQt::isSizeAvailable):
- (WebCore::ImageDecoderQt::frameCount):
- (WebCore::ImageDecoderQt::repetitionCount):
- (WebCore::ImageDecoderQt::filenameExtension):
- (WebCore::ImageDecoderQt::frameBufferAtIndex):
- (WebCore::ImageDecoderQt::clearFrameBufferCache):
- (WebCore::ImageDecoderQt::internalDecodeSize):
- (WebCore::ImageDecoderQt::internalReadImage):
- (WebCore::ImageDecoderQt::internalHandleCurrentImage):
- (WebCore::ImageDecoderQt::forceLoadEverything):
- (WebCore::ImageDecoderQt::failRead):
- * platform/graphics/qt/ImageDecoderQt.h:
-
-2009-10-05 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Make use of RGBA32Buffer in ImageDecoderQt
- https://bugs.webkit.org/show_bug.cgi?id=27538
-
- Use the RGBA32Buffer instead of the internal ImageData
- to be able to use support of the base class, optionally
- support WebCore decoders for Qt and most importantly
- separate metadata and image data for better cache control.
-
- Remove ImageSourceQt as everything is now shared with
- the normal ImageSource.
-
- Change the ownership of the NativeImagePtr/QPixmap in
- ImageQt.cpp to delete the m_frame to be subject to cache
- control.
-
- * WebCore.pro:
- * platform/graphics/ImageSource.cpp:
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoderQt::ReadContext::ReadContext):
- (WebCore::ImageDecoderQt::ReadContext::read):
- (WebCore::ImageDecoderQt::ReadContext::readImageLines):
- (WebCore::ImageDecoderQt::ImageDecoderQt):
- (WebCore::ImageDecoderQt::setData):
- (WebCore::ImageDecoderQt::frameCount):
- (WebCore::ImageDecoderQt::frameBufferAtIndex):
- (WebCore::ImageDecoderQt::clearFrameBufferCache):
- * platform/graphics/qt/ImageDecoderQt.h:
- * platform/graphics/qt/ImageSourceQt.cpp: Removed.
- * platform/image-decoders/ImageDecoder.h:
- (WebCore::RGBA32Buffer::decodedImage):
- (WebCore::RGBA32Buffer::getAddr):
- * platform/image-decoders/qt/RGBA32BufferQt.cpp: Added.
- (WebCore::RGBA32Buffer::RGBA32Buffer):
- (WebCore::RGBA32Buffer::setDecodedImage):
- (WebCore::RGBA32Buffer::clear):
- (WebCore::RGBA32Buffer::zeroFill):
- (WebCore::RGBA32Buffer::copyBitmapData):
- (WebCore::RGBA32Buffer::setSize):
- (WebCore::RGBA32Buffer::asNewNativeImage):
- (WebCore::RGBA32Buffer::hasAlpha):
- (WebCore::RGBA32Buffer::setHasAlpha):
- (WebCore::RGBA32Buffer::setStatus):
- (WebCore::RGBA32Buffer::operator=):
- (WebCore::RGBA32Buffer::width):
- (WebCore::RGBA32Buffer::height):
-
-2009-10-05 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by Simon Hausmann.
-
- [Qt] ImageDecoderQt avoid QString creation.
- https://bugs.webkit.org/show_bug.cgi?id=27538
-
- Avoid going from CString to QString to String
- and go directly from CString to String. Also
- avoid going to lower case to avoid an extra
- memory allocation.
-
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoder::create):
- (WebCore::ImageDecoderQt::ImageDecoderQt):
- * platform/graphics/qt/ImageDecoderQt.h:
-
-2009-10-05 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Cleanup the ImageDecoder of Qt.
- https://bugs.webkit.org/show_bug.cgi?id=27538
-
- Remove the various enums for partial load. The fact is
- that this image decoder will decode everything that is
- in the file at once. Make it look like it behaves to
- ease fixing this core problem.
-
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoderQt::ImageData::ImageData):
- (WebCore::ImageDecoderQt::ReadContext::ReadContext):
- (WebCore::ImageDecoderQt::ReadContext::read):
- (WebCore::ImageDecoderQt::ReadContext::readImageLines):
- (WebCore::ImageDecoderQt::hasFirstImageHeader):
- (WebCore::ImageDecoderQt::setData):
- * platform/graphics/qt/ImageDecoderQt.h:
-
-2009-10-04 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Reimplement instead of overload frameCount in ImageDecoderQt.cpp
- https://bugs.webkit.org/show_bug.cgi?id=27538
-
- Reimplement frameCount instead of overloading it.
-
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoderQt::frameCount):
- * platform/graphics/qt/ImageDecoderQt.h:
-
-2009-10-04 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by Simon Hausmann.
-
- [Qt] QImageReader does not support progressive reading
- https://bugs.webkit.org/show_bug.cgi?id=27538
-
- Change the ImageDecoderQt::setData to store the encoded
- data in ImageDecoder.
-
- Only call ReadContext when the whole Resource has been
- loaded to avoid needless calls to reset and the
- ReadContext as progressive loading is not supported.
-
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoderQt::setData):
- * platform/graphics/qt/ImageDecoderQt.h:
-
-2009-10-04 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Remove dead code from ImageDecoderQt
- https://bugs.webkit.org/show_bug.cgi?id=27538
-
- Remove unused variables and debugging code. The debug
- code has never been used and does not provide anything
- useful.
-
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoderQt::ReadContext::read):
- (WebCore::ImageDecoderQt::ReadContext::readImageLines):
- (WebCore::ImageDecoderQt::setData):
- (WebCore::ImageDecoderQt::isSizeAvailable):
- (WebCore::ImageDecoderQt::frameCount):
- (WebCore::ImageDecoderQt::repetitionCount):
- (WebCore::ImageDecoderQt::filenameExtension):
- (WebCore::ImageDecoderQt::imageAtIndex):
-
-2009-10-06 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Xan Lopez.
-
- [GTK] segfault when calling gst_video_format_parse_caps in the video sink
- https://bugs.webkit.org/show_bug.cgi?id=30120
-
- Fix use of gst_video_format_parse_caps()
-
- * platform/graphics/gtk/VideoSinkGStreamer.cpp:
- (webkit_video_sink_idle_func):
-
-2009-10-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Update mediaControls CSS
-
- * css/mediaControlsQt.css:
-
-2009-10-06 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Get rid of Preferences.ignoreWhitespace.
-
- https://bugs.webkit.org/show_bug.cgi?id=30092
-
- * inspector/front-end/DOMAgent.js:
- (WebInspector.DOMAgent):
- (WebInspector.DOMAgent.prototype._childNodeCountUpdated):
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeOutline.prototype.update):
- (WebInspector.ElementsTreeElement):
- (WebInspector.ElementsTreeElement.prototype.onpopulate):
- (WebInspector.ElementsTreeElement.prototype._updateChildren.updateChildrenOfNode):
- (WebInspector.ElementsTreeElement.prototype._updateChildren):
- * inspector/front-end/TextPrompt.js:
- (WebInspector.TextPrompt.prototype.isCaretAtEndOfPrompt):
- * inspector/front-end/inspector.js:
- * inspector/front-end/utilities.js:
- (Node.prototype.rangeOfWord):
- (traverseNextNode):
- (traversePreviousNode):
- (onlyTextChild):
-
-2009-10-06 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Do not call nodeTitleInfo twice +
- followup fixes for r49101.
-
- https://bugs.webkit.org/show_bug.cgi?id=30087
-
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeElement):
-
-2009-10-06 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Windowless plugins: Enable painting on printer.
-
- The print preview dialog crashed because the depth of the drawable
- changed owing to a bug in Qt - if you draw onto a 32-bit pixmap,
- and set a 24-bit pixmap as source, it will convert the source to
- 32-bit.
-
- 1210fa5b2d65895ad2be1f9ca7cae586e3b29dc1 is the bug fix in Qt.
-
- https://bugs.webkit.org/show_bug.cgi?id=20081
-
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::paint):
-
-2009-10-06 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Windowless plugins: Make painting and events work when page is zoomed.
-
- The element gets resized when zoomed. So, we have to make sure that we resize
- the drawable and do a setwindow call. Multiple calls to setwindow do not
- crash plugin in windowless mode (unlike in windowed mode).
-
- For mouse events we have to convert the pos to post-zoom position.
-
- https://bugs.webkit.org/show_bug.cgi?id=20081
-
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::setXButtonEventSpecificFields):
- (WebCore::setXMotionEventSpecificFields):
- (WebCore::setXCrossingEventSpecificFields):
- (WebCore::PluginView::handleMouseEvent):
- (WebCore::PluginView::setNPWindowIfNeeded):
-
-2009-10-06 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Windowless plugins: Add PluginQuirkRequiresDefaultScreenDepth quirk for Flash.
-
- Flash does not use the visual provided by us to draw into the drawable.
- It instead uses the system default visual (as returned by XDefaultVisual).
- This means that if the screen default visual is 24-bit, Flash won't be
- able to draw on 32-bit drawable created by us. This is a bug in Flash
- and for the moment, the above quirk is only set for Flash.
-
- Our strategy to create the drawable:
- 1. Create a 32-bit drawable if the default screen depth is 32 or the
- quirk is not set (i.e not flash)
- 2. If we didn't create a 32-bit drawable (maybe the Display has no such
- visual), we create a drawable with default screen depth.
-
- As a result of the above changes, content propagation behavior changes as:
- 1. Content propagation is possible only if the drawable we create and
- Qt's backing store are of the same depth.
- 2. If we created a 32-bit drawable, there is no need for content
- propagation (Qt will take care of it).
-
- https://bugs.webkit.org/show_bug.cgi?id=20081
-
- * plugins/PluginPackage.cpp:
- (WebCore::PluginPackage::determineQuirks):
- * plugins/PluginQuirkSet.h:
- (WebCore::):
- * plugins/PluginView.cpp:
- (WebCore::PluginView::PluginView):
- * plugins/PluginView.h:
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::updatePluginWidget):
- (WebCore::PluginView::paint):
- (WebCore::getVisualAndColormap):
- (WebCore::PluginView::platformStart):
- (WebCore::PluginView::platformDestroy):
-
-2009-10-06 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Ariya Hidayat.
-
- Qt build fix.
- https://bugs.webkit.org/show_bug.cgi?id=29362.
-
- In Qt 4.5, a new function QPainter::fillRect(QRect, QColor) is
- introduced to avoid the expensive construction of QBrush.
- By casting WebCore::Color to QColor, we can compile on Qt 4.4
- and use optimization for solid color fill in Qt 4.5.
-
- * platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::GraphicsContext::drawRect):
- (WebCore::GraphicsContext::drawLine):
- (WebCore::drawBorderlessRectShadow):
-
-2009-10-05 Andrei Popescu <andreip@google.com>
-
- Reviewed by Eric Carlson.
-
- Allow the platform media player to know the <video> poster URL.
- Add MediaPlayerPrivate::prepareToPlay() to support media engines
- that do not buffer video data automatically. This method allows
- such media engines to start the buffering just before starting
- playback.
- https://bugs.webkit.org/show_bug.cgi?id=29133
-
- All platforms that currently implement <video> return false
- in MediaPlayerPrivate::canLoadPoster() and do nothing in
- MediaPlayerPrivate::prepareToPlay() their behavior is
- unchanged. The current set of media test should then be
- sufficient to guarantee that this patch does not break anything.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::loadResource):
- After the MediaPlayer is created, inform it what the poster URL is.
- (WebCore::HTMLMediaElement::updatePlayState):
- Add another case where prepareToPlay is called for the platforms
- that do not buffer video content automatically.
- (WebCore::HTMLMediaElement::couldPlayIfEnoughData)
- Same as potentiallyPlaying, except that we don't check for
- the readyState being at least HAVE_FUTURE_DATA.
- * platform/graphics/MediaPlayer.cpp:
- (WebCore::NullMediaPlayerPrivate::canLoadPoster):
- Empty implementation for the NullMediaPlayerPrivate.
- (WebCore::NullMediaPlayerPrivate::setPoster):
- Empty implementation for the NullMediaPlayerPrivate.
- (WebCore::MediaPlayer::canLoadPoster):
- Proxy to the m_private.
- (WebCore::MediaPlayer::setPoster):
- Proxy to m_private.
- * platform/graphics/MediaPlayer.h:
- * platform/graphics/MediaPlayerPrivate.h:
- (WebCore::MediaPlayerPrivateInterface::canLoadPoster):
- (WebCore::MediaPlayerPrivateInterface::setPoster):
- Add new methods that allow the platform player to receive the poster URL.
- (WebCore::MediaPlayerPrivateInterface::prepareToPlay):
- Notifies the media engine that playback should start. The media engine
- should start preparing (e.g. by initializing the player and starting to buffer)
- and call back when the state is changed to HAVE_FUTURE_DATA.
-
-2009-10-06 David Levin <levin@chromium.org>
-
- Reviewed by Oliver Hunt.
-
- StringImpl needs a method to get an instance for another thread which doesn't copy the underlying buffer.
- https://bugs.webkit.org/show_bug.cgi?id=30095
-
- All String::copy methods were changed to call either threadsafeCopy or crossThreadString. The method
- call was made threadsafeCopy unless I could show that threadsafety wasn't needed.
-
- No visible change in functionality so no new tests.
-
- * dom/MessagePortChannel.cpp:
- (WebCore::MessagePortChannel::EventData::EventData):
- * loader/WorkerThreadableLoader.cpp:
- (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
- * loader/icon/IconDatabase.cpp:
- (WebCore::IconDatabase::open):
- (WebCore::IconDatabase::iconForPageURL):
- (WebCore::IconDatabase::iconURLForPageURL):
- (WebCore::IconDatabase::retainIconForPageURL):
- (WebCore::IconDatabase::releaseIconForPageURL):
- (WebCore::IconDatabase::setIconDataForIconURL):
- (WebCore::IconDatabase::setIconURLForPageURL):
- (WebCore::IconDatabase::databasePath):
- (WebCore::IconDatabase::defaultDatabaseFilename):
- * page/SecurityOrigin.cpp:
- (WebCore::SecurityOrigin::SecurityOrigin): Since this is used by SecurityOrigin::threadsafeCopy,
- it makes threadsafe calls.
- (WebCore::SecurityOrigin::threadsafeCopy): The only place that called this
- needed a threadsafe method.
- * page/SecurityOrigin.h:
- * platform/CrossThreadCopier.cpp:
- (WebCore::::copy):
- * platform/KURL.cpp:
- (WebCore::KURL::copy):
- * platform/network/HTTPHeaderMap.cpp:
- (WebCore::HTTPHeaderMap::copyData):
- * platform/network/ResourceErrorBase.cpp:
- (WebCore::ResourceErrorBase::copy):
- * platform/network/ResourceRequestBase.cpp:
- (WebCore::ResourceRequestBase::copyData):
- * platform/network/ResourceResponseBase.cpp:
- (WebCore::ResourceResponseBase::copyData):
- * platform/sql/SQLValue.cpp:
- (WebCore::SQLValue::SQLValue):
- (WebCore::SQLValue::string):
- * platform/sql/SQLValue.h:
- (WebCore::SQLValue::SQLValue):
- All constructors now initialize the m_number which is a double. Failure to
- do so can result in unexpected crashes when it is copied in the copy constructor.
- See http://blogs.msdn.com/oldnewthing/archive/2008/07/02/8679191.aspx, I was that colleague.
- * platform/text/PlatformString.h:
- * platform/text/String.cpp:
- (WebCore::String::threadsafeCopy):
- (WebCore::String::crossThreadString):
- * platform/text/StringImpl.cpp:
- Removed StringImpl::substringCopy which was no longer being used anywhere.
- (WebCore::StringImpl::threadsafeCopy): Changed the name to indicate that
- it is threadsafe.
- (WebCore::StringImpl::crossThreadString): The way to get strings for
- another thread which is not threadsafe. This shares the underlying buffer
- with both strings and gives them a way to do threadsafe refcounting for it.
- * platform/text/StringImpl.h:
- * storage/ChangeVersionWrapper.cpp:
- (WebCore::ChangeVersionWrapper::ChangeVersionWrapper):
- * storage/Database.cpp:
- (WebCore::updateGuidVersionMap):
- (WebCore::Database::Database):
- (WebCore::Database::getVersionFromDatabase):
- (WebCore::Database::setVersionInDatabase):
- (WebCore::Database::version):
- (WebCore::Database::setExpectedVersion):
- (WebCore::Database::securityOriginCopy):
- (WebCore::Database::stringIdentifier):
- * storage/DatabaseTracker.cpp:
- (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
- * storage/OriginQuotaManager.cpp:
- (WebCore::OriginQuotaManager::addDatabase):
- * storage/SQLError.h:
- (WebCore::SQLError::message):
- (WebCore::SQLError::SQLError):
- * storage/SQLStatement.cpp:
- (WebCore::SQLStatement::SQLStatement):
- * storage/StorageAreaSync.cpp:
- (WebCore::StorageAreaSync::syncTimerFired):
- * storage/StorageMap.cpp:
- (WebCore::StorageMap::importItem):
- * storage/StorageNamespaceImpl.cpp:
- (WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
- * storage/StorageSyncManager.cpp:
- (WebCore::StorageSyncManager::StorageSyncManager):
- * workers/DefaultSharedWorkerRepository.cpp:
- (WebCore::SharedWorkerProxy::url): Do the copy of the url in a way that is threadsafe.
- (WebCore::SharedWorkerProxy::name):
- (WebCore::SharedWorkerProxy::SharedWorkerProxy):
- (WebCore::DefaultSharedWorkerRepository::getProxy): Do the copy of the url in a way that is threadsafe.
- * workers/SharedWorkerThread.cpp:
- (WebCore::SharedWorkerThread::SharedWorkerThread):
- * workers/WorkerMessagingProxy.cpp:
- (WebCore::MessageWorkerContextTask::MessageWorkerContextTask):
- (WebCore::MessageWorkerTask::MessageWorkerTask):
- (WebCore::WorkerExceptionTask::WorkerExceptionTask):
- * workers/WorkerRunLoop.cpp:
- (WebCore::WorkerRunLoop::Task::Task):
- (WebCore::WorkerRunLoop::postTaskForMode):
- * workers/WorkerThread.cpp:
- (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
-
-2009-10-06 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Windowless plugins: Use X Pixmap instead of QPixmap.
-
- This has the following advantages:
- 1. Allows more sharing of code between gtk and Qt ports in the future
- 2. QPixmap creates 24-bit by default. We have to later 'upgrade' it to 32-bit.
- 3. QPixmap may sometime change depth behind our back! This will require us to
- update the plugin about the new visual and colormap.
- 4. We cannot ensure that QPixmap is backed by a X Drawable. For example, with
- -graphicssystem raster, QPixmap uses the raster (image) backend.
-
- https://bugs.webkit.org/show_bug.cgi?id=20081
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::PluginView):
- * plugins/PluginView.h:
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::updatePluginWidget):
- (WebCore::PluginView::paint):
- (WebCore::PluginView::platformDestroy):
-
-2009-10-06 Girish Ramakrishnan <girish@forwardbias.in>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Add support for windowless NPAPI plugins
-
- https://bugs.webkit.org/show_bug.cgi?id=20081
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::setFrameRect):
- (WebCore::PluginView::handleEvent):
- (WebCore::PluginView::PluginView):
- * plugins/PluginView.h:
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::updatePluginWidget):
- (WebCore::PluginView::paint):
- (WebCore::PluginView::dispatchNPEvent):
- (WebCore::setSharedXEventFields):
- (WebCore::PluginView::initXEvent):
- (WebCore::setXKeyEventSpecificFields):
- (WebCore::PluginView::handleKeyboardEvent):
- (WebCore::inputEventState):
- (WebCore::setXButtonEventSpecificFields):
- (WebCore::setXMotionEventSpecificFields):
- (WebCore::setXCrossingEventSpecificFields):
- (WebCore::PluginView::handleMouseEvent):
- (WebCore::PluginView::handleFocusInEvent):
- (WebCore::PluginView::handleFocusOutEvent):
- (WebCore::PluginView::setNPWindowRect):
- (WebCore::PluginView::setNPWindowIfNeeded):
- (WebCore::PluginView::getValueStatic):
- (WebCore::PluginView::invalidateRect):
- (WebCore::PluginView::invalidateRegion):
- (WebCore::PluginView::forceRedraw):
- (WebCore::getPluginDisplay):
- (WebCore::PluginView::platformStart):
-
-2009-10-05 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Nikolas Zimmermann.
-
- SVG Filters do not support source images besides "sourceGraphic"
- [https://bugs.webkit.org/show_bug.cgi?id=6022]
-
- Add support for SourceAlpha to SVG filters.
-
- Test: svg/filters/sourceAlpha.svg
-
- * platform/graphics/filters/SourceAlpha.cpp:
- (WebCore::SourceAlpha::calculateEffectRect):
- (WebCore::SourceAlpha::apply):
- * platform/graphics/filters/SourceAlpha.h:
-
-2009-10-05 John Abd-El-Malek <jam@chromium.org>
-
- Reviewed by Adam Barth.
-
- Fix reliablity bot crash in DateExtension.
- https://bugs.webkit.org/show_bug.cgi?id=30033
-
- There were a few problems using the weak persistent pointers because no one else had a
- handle to them. The new approach stores them as a hidden value on the Date constructor.
-
- * bindings/v8/DateExtension.cpp:
- (WebCore::DateExtension::setAllowSleep):
- (WebCore::DateExtension::GetNativeFunction):
- (WebCore::DateExtension::Setup):
- (WebCore::DateExtension::OnSleepDetected):
- * bindings/v8/DateExtension.h:
- * bindings/v8/V8HiddenPropertyName.cpp:
- (WebCore::V8HiddenPropertyName::sleepFunction):
- * bindings/v8/V8HiddenPropertyName.h:
-
-2009-10-05 Stephanie Lewis <slewis@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Crash when trying to load a null stylesheet for a site specific hack.
- https://bugs.webkit.org/show_bug.cgi?id=30105
-
- Created a testcase and tested in browser. DRT doesn't test
- site specific hacks.
-
- * html/HTMLLinkElement.cpp:
- (WebCore::HTMLLinkElement::setCSSStyleSheet):
-
-2009-10-05 James Robinson <jamesr@google.com>
-
- Reviewed by Darin Adler.
-
- Fix forward declaration (struct vs class mismatch)
-
- https://bugs.webkit.org/show_bug.cgi?id=30094
-
- * loader/RedirectScheduler.h:
-
-2009-10-05 Julie Parent <jparent@chromium.org>
-
- Unreviewed, last Chromium build fix corresponding to revision 49113.
- Add include for BeforeLoadEvent to DOMObjectsInclude.h.
-
- * bindings/v8/DOMObjectsInclude.h:
-
-2009-10-05 Simon Fraser <simon.fraser@apple.com>
-
- Fix Windows build.
-
- * html/HTMLMediaElement.cpp:
-
-2009-10-05 Simon Fraser <simon.fraser@apple.com>
-
- Fix the build: MediaControllerThemeQT was renamed to MediaControllerThemeQuickTime.
-
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderThemeMac::shouldRenderMediaControlPart):
-
-2009-10-05 Pierre d'Herbemont <pdherbemont@webkit.org>
-
- Reviewed by Simon Fraser
-
- Support fullscreen in MediaPlayer (Mac)
- https://bugs.webkit.org/show_bug.cgi?id=26742
-
- Add a fullscreen button to the <video> controller if the media engine,
- and the theme have support for fullscreen, and can show appropriate controls.
- Clicking the button calls through the ChromeClient to the WebVideoFullscreenController
- in WebKit to do a nice animation to fullscreen, with a custom controller.
-
- * DerivedSources.make:
- * WebCore.Video.exp: Added.
- New export file for when VIDEO is enabled.
-
- * WebCore.base.exp: Export WebCore::HTMLNames::videoTag
- * WebCore.xcodeproj/project.pbxproj: New files
-
- * html/HTMLMediaElement.h:
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::HTMLMediaElement):
- (WebCore::HTMLMediaElement::willRemove):
- (WebCore::HTMLMediaElement::screenRect):
- (WebCore::HTMLMediaElement::enterFullscreen):
- (WebCore::HTMLMediaElement::exitFullscreen):
- (WebCore::HTMLMediaElement::platformMedia):
- Add fullscreen logic. platformMedia returns a pointer to platform-specific playback data
- used for fullscreen.
-
- * html/HTMLVideoElement.h:
- * html/HTMLVideoElement.cpp:
- (WebCore::HTMLVideoElement::supportsFullscreen): Check with both the player and the ChromeClient
- to see if it's possile to enter fullscreen for this element.
-
- * page/ChromeClient.h:
- (WebCore::ChromeClient::supportsFullscreenForNode):
- (WebCore::ChromeClient::enterFullscreenForNode):
- (WebCore::ChromeClient::exitFullscreenForNode):
- New methods
-
- * platform/graphics/MediaPlayer.h:
- * platform/graphics/MediaPlayer.cpp:
- (WebCore::NullMediaPlayerPrivate::platformMedia):
- (WebCore::MediaPlayer::platformMedia):
- * platform/graphics/MediaPlayerPrivate.h:
- (WebCore::MediaPlayerPrivateInterface::platformMedia):
- * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::platformMedia):
- (WebCore::MediaPlayerPrivate::supportsFullscreen):
- New methods to return platform-specific playback data for fullscreen.
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
- Hook up the fullscreen button.
- * rendering/RenderThemeMac.h:
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderThemeMac::shouldRenderMediaControlPart):
- Allow the RenderThemeMac to make a decision about the availability of fullscreen based
- on the QuickTime version, since this affects what controls are availabl.e
-
-2009-10-05 Kevin Decker <kdecker@apple.com>
-
- Export a few more methods from Settings.h
-
- Rubberstamped by Jon Honeycutt.
-
- * WebCore.base.exp:
-
-2009-10-05 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by Darin Adler.
-
- 1-char fix for obviously reverse condition.
- https://bugs.webkit.org/show_bug.cgi?id=30100
- No test since the only difference is a timing of GC.
-
- * bindings/js/ScriptCachedFrameData.cpp:
- (WebCore::ScriptCachedFrameData::clear): Revert condition. Almost a typo.
-
-2009-09-30 Kenneth Russell <kbr@google.com>
-
- Reviewed by Darin Fisher.
-
- Update platform-specific #ifdefs in GraphicsContext3D.h for the
- Chromium port.
- https://bugs.webkit.org/show_bug.cgi?id=29936
-
- * platform/graphics/GraphicsContext3D.h:
- Changed #if PLATFORM(SKIA) to #if PLATFORM(CHROMIUM).
-
-2009-10-05 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Darin Adler.
-
- REGRESSION (r47440): Inserting text in the middle of content in a scrolled textfield results in painting bugs
- <rdar://problem/7269108>
- https://bugs.webkit.org/show_bug.cgi?id=29982
-
- Test: fast/repaint/line-in-scrolled-clipped-block.html
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::layoutBlock): Use the unclipped overflow rect
- (including layout overflow) for the repaint rect calculation.
-
-2009-10-05 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- Chromium wants to turn off SharedWorkers at runtime
- https://bugs.webkit.org/show_bug.cgi?id=29757
-
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::sharedWorker):
- Now returns jsUndefined if isAvailable() returns false, to allow SharedWorkers to be disabled at runtime.
- * workers/DefaultSharedWorkerRepository.cpp:
- (WebCore::SharedWorkerRepository::isAvailable):
- Made SharedWorkers available by default.
- * workers/SharedWorkerRepository.h:
- Added definition for SharedWorkerRepository::isAvailable().
-
-2009-10-05 Hironori Bono <hbono@chromium.org>
-
- Reviewed by Eric Seidel.
-
- A super quick fix for Bug 28710.
-
- https://bugs.webkit.org/show_bug.cgi?id=28710
-
- This change just resets the style sent to addStyleMarkup() to avoid an assertion error
- and creates an empty style when computedStyleAtPosition is 0 to avoid a crash.
- (This change is nothing but a better-than-crash change.)
-
- Tests: editing/selection/select-crash-001.html
- editing/selection/select-crash-002.html
-
- * editing/ApplyStyleCommand.cpp:
- (WebCore::editingStyleAtPosition): Resets the style sent to addStyleMarkup() if it is not valid.
- * editing/markup.cpp:
- (WebCore::createMarkup): Creates an empty style if computedStyleAtPosition is 0.
-
-2009-10-05 Sam Weinig <sam@webkit.org>
-
- Reviewed by Mark Rowe.
-
- Silence duplicate errors logged for missing getComputedStyle
- implementations. Improves the error message as well.
-
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::logUnimplementedPropertyID):
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
-
-2009-10-05 Julie Parent <jparent@chromium.org>
-
- Unreviewed, Chromium build fix #3. Add V8BeforeLoadEvent.[cc|h] to derived sources.
-
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/V8Index.cpp:
-
-2009-10-05 Mark Rowe <mrowe@apple.com>
-
- Try and fix the GTK build.
-
- * GNUmakefile.am:
-
-2009-10-05 Julie Parent <jparent@chromium.org>
-
- Unreviewed, Chromium build fix #2. Add new BEFORELOADEVENT to V8ClassIndex.
-
- * bindings/v8/V8Index.h:
-
-2009-10-05 Julie Parent <jparent@chromium.org>
-
- Unreviewed, Chromium build fix. Missing "," after entry for BeforeLoadEvent.idl.
-
- * WebCore.gypi:
-
-2009-10-05 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Sam Weinig.
-
- Add a beforeload event that will be fired before subresources load. (It isn't fired yet.) The event
- has one field, the URL that is going to be requested. Setting preventDefault will stop the load
- from occurring.
-
- * DerivedSources.cpp:
- * DerivedSources.make:
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * dom/BeforeLoadEvent.h: Added.
- (WebCore::BeforeLoadEvent::create):
- (WebCore::BeforeLoadEvent::initBeforeLoadEvent):
- (WebCore::BeforeLoadEvent::url):
- (WebCore::BeforeLoadEvent::BeforeLoadEvent):
- * dom/BeforeLoadEvent.idl: Added.
- * dom/EventNames.h:
- * page/DOMWindow.idl:
-
-2009-10-05 Priit Laes <plaes@plaes.org>
-
- Reviewed by Gustavo Noronha.
-
- Add Gentoo-specific paths for searching browser plugins.
- https://bugs.webkit.org/show_bug.cgi?id=30088
-
- * plugins/PluginDatabase.cpp:
- (WebCore::PluginDatabase::defaultPluginDirectories):
-
-2009-10-02 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Adele Peterson.
-
- Add functionality to pause/throttle CSS transitions/animations in a WebView
- https://bugs.webkit.org/show_bug.cgi?id=29942
-
- Exporting call from AnimationController
-
- * WebCore.base.exp:
-
-2009-10-05 Kevin Decker <kdecker@apple.com>
-
- Rubberstamped by Anders Carlsson.
-
- * WebCore.base.exp: Update export of HaltablePlugin/PluginHalterClient.
- * WebCore.xcodeproj/project.pbxproj: Likewise.
-
-2009-10-05 Eric Seidel <eric@webkit.org>
-
- No review, rolling out r49104.
- http://trac.webkit.org/changeset/49104
-
- * html/HTMLInputElement.cpp:
- * html/HTMLInputElement.h:
- * html/HTMLInputElement.idl:
- * html/ValidityState.cpp:
- * html/ValidityState.h:
- (WebCore::ValidityState::rangeUnderflow):
- (WebCore::ValidityState::rangeOverflow):
- * rendering/RenderSlider.cpp:
- (WebCore::SliderRange::SliderRange):
- (WebCore::SliderRange::valueFromElement):
-
-2009-10-05 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Update style immediately when validation-related values are updated.
- https://bugs.webkit.org/show_bug.cgi?id=28868
-
- In order to apply :valid, :invalid, :optional or :required lively,
- - call setNeedsStyleRecalc() when properties which can change
- willValidate state are updated, and
- (Parent form element, name, disabled, readonly)
- - call updateValidity() when properties which can change validity
- state are updated. (value, pattern, required)
-
- Tests: fast/forms/input-live-pseudo-selectors.html
- fast/forms/textarea-live-pseudo-selectors.html
-
- * html/HTMLFormControlElement.cpp:
- (WebCore::HTMLFormControlElement::HTMLFormControlElement):
- (WebCore::HTMLFormControlElement::parseMappedAttribute):
- (WebCore::HTMLFormControlElement::required):
- (WebCore::HTMLFormControlElement::updateValidity):
- * html/HTMLFormControlElement.h:
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::setInputType):
- (WebCore::HTMLInputElement::parseMappedAttribute):
- (WebCore::HTMLInputElement::setValue):
- (WebCore::HTMLInputElement::setValueFromRenderer):
- (WebCore::HTMLInputElement::setFileListFromRenderer):
- * html/HTMLTextAreaElement.cpp:
- (WebCore::HTMLTextAreaElement::setValue):
- * rendering/RenderTextControlMultiLine.cpp:
- (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
-
-2009-10-05 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Darin Adler.
-
- Implement min/max attributes, ValidityState.rangeUnderflow and
- ValidityState.rangeOverflow for <input type=number> and <input type=range>
- https://bugs.webkit.org/show_bug.cgi?id=29069
-
- Tests: fast/forms/ValidityState-rangeOverflow-number.html
- fast/forms/ValidityState-rangeOverflow-range.html
- fast/forms/ValidityState-rangeUnderflow-number.html
- fast/forms/ValidityState-rangeUnderflow-range.html
- fast/forms/input-minmax.html
-
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::rangeUnderflow):
- (WebCore::HTMLInputElement::rangeOverflow):
- (WebCore::HTMLInputElement::rangeMinimum):
- (WebCore::HTMLInputElement::rangeMaximum):
- * html/HTMLInputElement.h:
- * html/HTMLInputElement.idl:
- * html/ValidityState.cpp:
- (WebCore::ValidityState::rangeUnderflow):
- (WebCore::ValidityState::rangeOverflow):
- * html/ValidityState.h:
- * rendering/RenderSlider.cpp:
- (WebCore::SliderRange::SliderRange):
- (WebCore::SliderRange::valueFromElement):
-
-2009-10-05 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Introduces
- - new CSS pseudo selector: "-webkit-input-list-button"
- - new CSS apperance type: "list-button"
- - new ControlPart value: "ListButtonPart"
- for the UI of the list attribute of the input element, and adds
- implementation to draw ListButtonPart on Mac.
- The code is guarded by ENABLE(DATALIST).
-
- https://bugs.webkit.org/show_bug.cgi?id=27794
-
- Test: platform/mac/fast/forms/input-list-button-size.html
-
- * css/CSSPrimitiveValueMappings.h:
- (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
- * css/CSSSelector.cpp:
- (WebCore::CSSSelector::extractPseudoType):
- * css/CSSSelector.h:
- (WebCore::CSSSelector::):
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
- * css/CSSValueKeywords.in:
- * css/html.css:
- * html/HTMLInputElement.cpp:
- * platform/ThemeTypes.h:
- (WebCore::):
- * platform/mac/ThemeMac.mm:
- (WebCore::listButtonSizes):
- (WebCore::button):
- (WebCore::paintButton):
- (WebCore::ThemeMac::controlSize):
- (WebCore::ThemeMac::minimumControlSize):
- (WebCore::ThemeMac::controlBorder):
- (WebCore::ThemeMac::paint):
- * rendering/RenderTheme.cpp:
- (WebCore::RenderTheme::adjustStyle):
- (WebCore::RenderTheme::paint):
- (WebCore::RenderTheme::paintBorderOnly):
- (WebCore::RenderTheme::paintDecorations):
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderThemeMac::adjustRepaintRect):
- * rendering/style/RenderStyleConstants.h:
- (WebCore::):
-
-2009-10-05 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <https://bugs.webkit.org/show_bug.cgi?id=30065>
- nodeTitleInfo should be placed in ElementsTreeOutline.
-
- Move nodeTitleInfo into ElementsTreeOutline.js from utilities.js.
-
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeElement):
- (WebInspector.ElementsTreeElement.prototype._updateTitle):
- (WebInspector.ElementsTreeElement.prototype._nodeTitleInfo):
- * inspector/front-end/utilities.js:
-
-2009-10-02 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Inform the application when a new request is created
- https://bugs.webkit.org/show_bug.cgi?id=29975
-
- Emit a signal each time a request is created, with the request and the frame
- that created it.
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
- (WebCore::QNetworkReplyHandler::start):
-
-2009-10-05 Ben Murdoch <benm@google.com>
-
- Reviewed by Darin Adler.
-
- Add an ASSERT in updateGuidVersionMap.
- https://bugs.webkit.org/show_bug.cgi?id=30077
-
- * storage/Database.cpp:
- (WebCore::updateGuidVersionMap): ASSERT that the guidMutex() is locked.
-
-2009-10-05 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Allow V8 to throw an exception in _NPN_SetException without worrying about context
- if we don't have enough information to find the correct context.
-
- https://bugs.webkit.org/show_bug.cgi?id=30026
-
- Part of the fix for Chromium's failure of LayouTests/plugins/netscape-throw-exception.html.
-
- * bindings/v8/NPV8Object.cpp:
- (_NPN_SetException): Don't suppress the exception if we can't find the relevant context.
-
-2009-10-05 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Place "Close" button in docked mode on the same side as the window "Close" button in detached mode.
-
- https://bugs.webkit.org/show_bug.cgi?id=29961
-
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.html:
- * inspector/front-end/inspector.js:
- (WebInspector.loaded):
-
-2009-10-05 J-P Nurmi <jpnurmi@gmail.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Added pure virtual QWebPageClient::pluginParent()
-
- https://bugs.webkit.org/show_bug.cgi?id=29710
-
- * platform/qt/QWebPageClient.h:
-
-2009-10-05 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] windowsKeyCodeForKeyEvent() returns a wrong value for the F10 key.
- https://bugs.webkit.org/show_bug.cgi?id=30042
-
- * platform/qt/PlatformKeyboardEventQt.cpp:
- (WebCore::windowsKeyCodeForKeyEvent):
-
-2009-10-05 Fumitoshi Ukai <ukai@chromium.org>
-
- Unreviewed build fix for ENABLE(WEB_SOCKETS) and v8.
-
- V8ObjectEventListener.h has been removed at r48978
-
- * bindings/v8/custom/V8WebSocketCustom.cpp:
-
-2009-10-04 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector console stops working while JS in IFRAME is paused.
-
- https://bugs.webkit.org/show_bug.cgi?id=29958
-
- * inspector/front-end/InjectedScript.js:
- (InjectedScript._evaluateOn):
- (InjectedScript.addInspectedNode):
- (InjectedScript._ensureCommandLineAPIInstalled):
-
-2009-10-04 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Introduce inspected object groups for console
- and watch evaluation results so that they could be released
- explicitly.
-
- https://bugs.webkit.org/show_bug.cgi?id=29891
-
- * bindings/js/JSInspectorBackendCustom.cpp:
- (WebCore::JSInspectorBackend::wrapObject):
- * bindings/v8/custom/V8InspectorBackendCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::wrapObject):
- (WebCore::InspectorBackend::releaseWrapperObjectGroup):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::clearConsoleMessages):
- (WebCore::InspectorController::resetScriptObjects):
- (WebCore::InspectorController::wrapObject):
- (WebCore::InspectorController::unwrapObject):
- (WebCore::InspectorController::releaseWrapperObjectGroup):
- * inspector/InspectorController.h:
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::addMessageToConsole):
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
- (WebInspector.ConsoleView.prototype.doEvalInWindow):
- (WebInspector.ConsoleView.prototype._enterKeyPressed):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.evaluate):
- (InjectedScript._evaluateAndWrap):
- (InjectedScript.evaluateInCallFrame):
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
- (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame):
- * inspector/front-end/WatchExpressionsSidebarPane.js:
- (WebInspector.WatchExpressionsSidebarPane):
- (WebInspector.WatchExpressionsSection.prototype.update):
-
-2009-10-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Eric Carlson.
-
- Move mediaControls extras for the Qt port into WebCore/css like other ports
-
- https://bugs.webkit.org/show_bug.cgi?id=30013
-
- * WebCore.pro:
- * WebCore.qrc:
- * css/mediaControlsQt.css: Renamed from WebCore/css/qt/mediaControls-extras.css.
- * platform/qt/RenderThemeQt.cpp:
- (WebCore::RenderThemeQt::extraMediaControlsStyleSheet):
-
-2009-10-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Eric Carlson.
-
- Rename WebCore/css/mediaControlsQT.css and MediaControllerThemeQT
-
- https://bugs.webkit.org/show_bug.cgi?id=30013
-
- The QT suffix has been expanded to QuickTime, to not cause confusion
- and name-crashes with similar files in the Qt port.
-
- * DerivedSources.make:
- * WebCore.xcodeproj/project.pbxproj:
- * css/mediaControlsQuickTime.css: Renamed from WebCore/css/mediaControlsQT.css.
- * rendering/RenderThemeMac.mm:
- (WebCore::):
- (WebCore::mediaControllerTheme):
- (WebCore::RenderThemeMac::adjustSliderThumbSize):
- (WebCore::getUnzoomedRectAndAdjustCurrentContext):
- (WebCore::RenderThemeMac::extraMediaControlsStyleSheet):
-
-2009-10-04 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <https://bugs.webkit.org/show_bug.cgi?id=30064>
- Syntax Highlighting CSS shouldn't be duplicated.
-
- Refactor syntax highlighting CSS into a new file, add it to the
- projects, and have SourceFrame.js and inspector.html include the
- new CSS file.
-
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * inspector/front-end/SourceFrame.js:
- (WebInspector.SourceFrame.prototype._loaded):
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.html:
- * inspector/front-end/inspectorSyntaxHighlight.css: Added.
- * inspector/front-end/WebKit.qrc:
-
-2009-10-04 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <https://bugs.webkit.org/show_bug.cgi?id=30062>
- Inspector should syntax highlight JS/CSS in elements view.
-
- Add syntax highlighting of CSS and JavaScript tags to the elements panel.
- Copied CSS rules from SourceFrame.js to inspector.css, and have the text nodes
- in utilities.js call the CSS or JS Syntax highlighters if their parent is a script
- or style tag.
-
- * inspector/front-end/inspector.css:
- * inspector/front-end/utilities.js:
-
-2009-10-04 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Eric Seidel
-
- Enable Web Sockets in chromium build.
- https://bugs.webkit.org/show_bug.cgi?id=29917
-
- * WebCore.gyp/WebCore.gyp:
-
-2009-10-04 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustova Noronha.
-
- [GTK] performs a POST when refreshing a view that was obtained with a GET
- https://bugs.webkit.org/show_bug.cgi?id=29761
-
- Update the HTTP method in the request stored by willSendRequest
- after a redirect, since it could have changed.
-
- Test: http/tests/navigation/postredirect-reload.html
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::restartedCallback):
-
-2009-10-04 Xan Lopez <xlopez@igalia.com>
-
- Revert previous patch, as the newly added test breaks other tests.
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::restartedCallback):
-
-2009-10-04 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustova Noronha.
-
- [GTK] performs a POST when refreshing a view that was obtained with a GET
- https://bugs.webkit.org/show_bug.cgi?id=29761
-
- Update the HTTP method in the request stored by willSendRequest
- after a redirect, since it could have changed.
-
- Test: http/tests/navigation/postredirect-reload.html
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::restartedCallback):
-
-2009-10-04 Vitaly Repeshko <vitalyr@chromium.org>
-
- Reviewed by Adam Barth.
-
- [V8] Fixed Function leak in V8LazyEventListener.
- (Should fix the remaning leak in
- https://bugs.webkit.org/show_bug.cgi?id=29093).
- V8LazyEventListeners used to create FunctionTemplates for each
- wrapped listener which in turn created Functions that were cached
- forever in V8 Context. Now there is at most one such Function per
- Context.
- https://bugs.webkit.org/show_bug.cgi?id=30060
-
- Added new hidden property name to store toString result:
- * bindings/v8/V8HiddenPropertyName.cpp:
- * bindings/v8/V8HiddenPropertyName.h:
-
- Switched to static FunctionTemplate:
- * bindings/v8/V8LazyEventListener.cpp:
- (WebCore::V8LazyEventListenerToString):
- (WebCore::V8LazyEventListener::prepareListenerObject):
-
-2009-10-03 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- CSS Source View Should be Syntax Highlighted
- https://bugs.webkit.org/show_bug.cgi?id=14359
-
- Support for WebKit's CSS Variables @variables and var()
-
- * inspector/front-end/SourceFrame.js:
- (WebInspector.CSSSourceSyntaxHighligher):
-
-2009-10-03 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Inspector should remember preferences for docked/undocked etc
- https://bugs.webkit.org/show_bug.cgi?id=29089
-
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel.prototype._toggleLargerResources): toggle the preference
- * inspector/front-end/inspector.js:
- (WebInspector._loadPreferences): factored out loading preferences
- (WebInspector.loaded):
+ (WebCore::GraphicsContext::getAffineCTM):
+ (WebCore::GraphicsContext::concatCTM):
+ * platform/graphics/wx/PathWx.cpp:
+ (WebCore::Path::transform):
+ * platform/graphics/wx/TransformationMatrixWx.cpp:
+ (WebCore::AffineTransform::operator wxGraphicsMatrix):
-2009-10-03 Joseph Pecoraro <joepeck@webkit.org>
+2010-01-31 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Timothy Hatcher.
- CSS Source View Should be Syntax Highlighted
- https://bugs.webkit.org/show_bug.cgi?id=14359
-
- Trigger the Syntax Highlighter for CSS files.
+ Web Inspector: [REGRESSION] Breakpoint source line is not displayed
+ in the breakpoint manager.
* inspector/front-end/SourceFrame.js:
- (WebInspector.SourceFrame.prototype.syntaxHighlightJavascript):
- (WebInspector.SourceFrame.prototype.syntaxHighlightCSS):
- * inspector/front-end/SourceView.js:
- (WebInspector.SourceView.prototype._contentLoaded):
-
- Factored out the Syntax Highlighting procedure into a "Class"
- Added CSSSourceSyntaxHighlighter and JavaScriptSourceSyntaxHighlighter
-
- (WebInspector.SourceSyntaxHighligher):
- (WebInspector.SourceSyntaxHighligher.prototype.createSpan):
- (WebInspector.SourceSyntaxHighligher.prototype.process.processChunk):
- (WebInspector.SourceSyntaxHighligher.prototype.process):
- (WebInspector.CSSSourceSyntaxHighligher): the CSS Highlighter
- (WebInspector.JavaScriptSourceSyntaxHighligher): the JS Highlighter
-
-2009-10-03 Adam Barth <abarth@webkit.org>
-
- Reviewed by Sam Weinig.
-
- Factor back-forward list methods out of FrameLoader
- https://bugs.webkit.org/show_bug.cgi?id=30037
-
- This change moves these back-forward related methods from FrameLoader
- to Page. It's possible we should move these methods into some kind of
- "page controller" object, but we can figure that out in a future patch.
-
- * loader/FrameLoader.cpp:
- * loader/FrameLoader.h:
- * loader/RedirectScheduler.cpp:
- (WebCore::RedirectScheduler::timerFired):
- * page/ContextMenuController.cpp:
- (WebCore::ContextMenuController::contextMenuItemSelected):
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::close):
- * page/History.cpp:
- (WebCore::History::length):
- * page/Page.cpp:
- (WebCore::Page::canGoBackOrForward):
- (WebCore::Page::goBackOrForward):
- (WebCore::Page::getHistoryLength):
- * page/Page.h:
- * platform/ContextMenu.cpp:
- (WebCore::ContextMenu::populate):
- (WebCore::ContextMenu::checkOrEnableIfNeeded):
-
-2009-10-02 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: prepare InspectorController for being used from layout tests.
- This change adds evaluateForTestInFrontend method with the callback that
- allows evaluating arbitrary code in the frontend context.
-
- https://bugs.webkit.org/show_bug.cgi?id=30008
-
- * WebCore.Inspector.exp:
- * WebCore.order:
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::didEvaluateForTestInFrontend):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::populateScriptObjects):
- (WebCore::InspectorController::evaluateForTestInFrontend):
- (WebCore::InspectorController::didEvaluateForTestInFrontend):
- * inspector/InspectorController.h:
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::evaluateForTestInFrontend):
- * inspector/InspectorFrontend.h:
- * inspector/front-end/inspector.js:
- (WebInspector.evaluateForTestInFrontend):
-
-2009-10-02 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Node search mode is not getting reset on element selection.
-
- https://bugs.webkit.org/show_bug.cgi?id=30016
-
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
-
-2009-10-02 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <https://bugs.webkit.org/show_bug.cgi?id=30036>
- Should be able to resize Cookie Columns.
-
- * inspector/front-end/CookieItemsView.js:
- (WebInspector.CookieItemsView.prototype.update.callback):
- (WebInspector.CookieItemsView.prototype.update):
- (WebInspector.CookieItemsView.prototype.resize):
-
-2009-09-25 Jon Honeycutt <jhoneycutt@apple.com>
-
- Make WebCore::PluginView participate in plug-in halting.
-
- Reviewed by Sam Weinig.
-
- * platform/graphics/BitmapImage.h:
- Declare a create() function that takes an HBITMAP.
-
- * platform/graphics/win/ImageCGWin.cpp:
- (WebCore::BitmapImage::create):
- Use GetObject() to fill out a DIBSECTION structure for the given
- HBITMAP. Call CGBitmapContextCreate() to create a CG context from the
- bits of the bitmap. Create a CG image from the context, and pass this
- when creating a new BitmapImage.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::start):
- If we successfully started, tell our parent frame's Page.
- (WebCore::PluginView::stop):
- Tell our parent frame's Page that we stopped.
- (WebCore::PluginView::node):
-
- * plugins/PluginView.h:
- Inherit from HaltablePlugin.
- (WebCore::PluginView::setPlatformPluginWidget):
- On platforms where the platform plug-in widget is the WebCore::Widget's
- platform widget, have setPlatformPluginWidget() call
- setPlatformWidget().
-
- * plugins/PluginViewNone.cpp:
- (WebCore::PluginView::halt):
- Stubbed.
- (WebCore::PluginView::restart):
- Stubbed.
-
- * plugins/gtk/PluginViewGtk.cpp:
- (WebCore::PluginView::halt):
- Stubbed.
- (WebCore::PluginView::restart):
- Stubbed.
-
- * plugins/mac/PluginViewMac.cpp:
- (WebCore::PluginView::halt):
- Stubbed.
- (WebCore::PluginView::restart):
- Stubbed.
-
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::halt):
- Stubbed.
- (WebCore::PluginView::restart):
- Stubbed.
-
- * plugins/win/PluginViewWin.cpp:
- (WebCore::PluginView::platformDestroy):
- After destroying the window, set the platform plug-in widget to 0 to
- ensure that Widget isn't holding a stale handle.
- (WebCore::PluginView::halt):
- Have our element's RenderWidget display a screenshot of the plug-in,
- then stop the plug-in and destroy it.
- (WebCore::PluginView::restart):
- Clear the RenderWidget's substitute image, then start the plug-in.
-
- * rendering/RenderWidget.cpp:
- (WebCore::RenderWidget::showSubstituteImage):
- Set m_substituteImage to the passed image, and repaint.
- (WebCore::RenderWidget::paint):
- If we have a substitute image, paint that instead of allowing the
- widget to paint itself.
-
- * rendering/RenderWidget.h:
- Declare showSubstituteImage(). Added a member to store the substitute
- image.
-
-2009-10-02 Adam Barth <abarth@webkit.org>
-
- Reviewed by Darin Adler.
-
- Move PolicyCheck out of FrameLoader.{h,cpp}
- https://bugs.webkit.org/show_bug.cgi?id=30035
-
- Purely code motion (and adding a destructor).
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * loader/FrameLoader.cpp:
- * loader/FrameLoader.h:
- * loader/PolicyCheck.cpp:
- * loader/PolicyCheck.h:
-
-2009-10-02 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] Add NPNVToolkit value quirk in plugins for nspluginwrapper.
- Plugin error message was:
- ERROR: failed to initialize brower-side RPC events listener
- https://bugs.webkit.org/show_bug.cgi?id=25053
-
- (WebCore::staticPluginQuirkRequiresGtkToolKit_NPN_GetValue):
- (WebCore::PluginPackage::load):
-
-2009-10-02 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] X sync our XEmbed container window creation before sending the
- xid to plugins.
- https://bugs.webkit.org/show_bug.cgi?id=25053
-
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::setNPWindowIfNeeded):
-
-2009-10-02 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Setting zero size on a container of a video element doesn't hide the controller
- https://bugs.webkit.org/show_bug.cgi?id=30031
-
- Fix a logic error in enclosingCompositingLayer() when mixing normal flow and
- positioned layers. This resulted in enclosingCompositingLayer() giving back a different
- answer to the logic used to actually parent compositing layers, so layer positions
- and layer hierarchy would be out of agreement.
-
- Test: compositing/geometry/clipped-video-controller.html
-
- * rendering/RenderLayer.cpp:
- (WebCore::compositingContainer):
- (WebCore::RenderLayer::enclosingCompositingLayer):
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::setCompositingParent):
-
-2009-10-02 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Eric Seidel.
-
- - Move the following methods of HTMLInputElement and HTMLTextAreaElement
- to HTMLTextFormControlElement.
- setSelectionStart()
- setSelectionEnd()
- select()
- setSelectionRange()
- selectionStart()
- selectionEnd()
- selection()
-
- - Introduce cachedSelectionStart() and cachedSelectionEnd().
-
- - Unify HTMLInputElement::isTextFieldWithRenderer() and
- HTMLTextAreaElement::rendererAfterUpdateLayout() into textRendererAfterUpdateLayout().
-
- - Unify a part of parseMappedAttribute() of HTMLInputElement and HTMLTextAreaElement.
-
- https://bugs.webkit.org/show_bug.cgi?id=29782
-
- * html/HTMLFormControlElement.cpp:
- (WebCore::HTMLTextFormControlElement::textRendererAfterUpdateLayout):
- (WebCore::HTMLTextFormControlElement::setSelectionStart):
- (WebCore::HTMLTextFormControlElement::setSelectionEnd):
- (WebCore::HTMLTextFormControlElement::select):
- (WebCore::HTMLTextFormControlElement::setSelectionRange):
- (WebCore::HTMLTextFormControlElement::selectionStart):
- (WebCore::HTMLTextFormControlElement::selectionEnd):
- (WebCore::HTMLTextFormControlElement::selection):
- (WebCore::HTMLTextFormControlElement::parseMappedAttribute):
- * html/HTMLFormControlElement.h:
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::parseMappedAttribute):
- * html/HTMLInputElement.h:
- (WebCore::HTMLInputElement::select):
- (WebCore::HTMLInputElement::cachedSelectionStart):
- (WebCore::HTMLInputElement::cachedSelectionEnd):
- * html/HTMLTextAreaElement.cpp:
- (WebCore::HTMLTextAreaElement::parseMappedAttribute):
- * html/HTMLTextAreaElement.h:
- (WebCore::HTMLTextAreaElement::cachedSelectionStart):
- (WebCore::HTMLTextAreaElement::cachedSelectionEnd):
-
-2009-10-02 Vitaly Repeshko <vitalyr@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Disconnect event listeners on navigation.
- Fixes http://crbug.com/23597.
- https://bugs.webkit.org/show_bug.cgi?id=30027
-
- Added V8ListenerGuard that is shared by listeners and proxy. On
- navigation proxy sets a flag in the guard turning off listeners.
-
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::V8AbstractEventListener):
- * bindings/v8/V8AbstractEventListener.h:
- (WebCore::V8ListenerGuard::create):
- (WebCore::V8ListenerGuard::isDisconnected):
- (WebCore::V8ListenerGuard::disconnectListeners):
- (WebCore::V8ListenerGuard::V8ListenerGuard):
- (WebCore::V8AbstractEventListener::disconnected):
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getEventListener):
- * bindings/v8/V8EventListenerList.h:
- (WebCore::V8EventListenerList::findOrCreateWrapper):
- * bindings/v8/V8LazyEventListener.cpp:
- (WebCore::V8LazyEventListener::V8LazyEventListener):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::V8Proxy):
- (WebCore::V8Proxy::disconnectFrame):
- (WebCore::V8Proxy::disconnectEventListeners):
- (WebCore::V8Proxy::clearForNavigation):
- * bindings/v8/V8Proxy.h:
- (WebCore::V8Proxy::listenerGuard):
- * bindings/v8/V8WorkerContextEventListener.cpp:
- (WebCore::V8WorkerContextEventListener::V8WorkerContextEventListener):
- * bindings/v8/V8WorkerContextEventListener.h:
- (WebCore::V8WorkerContextEventListener::create):
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy):
- (WebCore::WorkerContextExecutionProxy::dispose):
- (WebCore::WorkerContextExecutionProxy::findOrCreateEventListener):
- * bindings/v8/WorkerContextExecutionProxy.h:
- * bindings/v8/custom/V8CustomEventListener.cpp:
- (WebCore::V8EventListener::V8EventListener):
- * bindings/v8/custom/V8CustomEventListener.h:
- (WebCore::V8EventListener::create):
-
-2009-10-02 Kenneth Russell <kbr@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- [chromium] Fix WebGL build after CustomGetter constructor changes
- https://bugs.webkit.org/show_bug.cgi?id=30020
-
- * page/DOMWindow.idl:
- Changed CustomGetter to JSCCustomGetter for CanvasArray constructors.
-
-2009-10-02 Patrick Mueller <Patrick_Mueller@us.ibm.com>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: text in a "Request Payload" section disappears on selection
- https://bugs.webkit.org/show_bug.cgi?id=29967
-
- No new tests.
-
- * inspector/front-end/ResourceView.js:
- (WebInspector.ResourceView.prototype._refreshRequestPayload):
-
-2009-10-02 Vitaly Repeshko <vitalyr@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Recursion guard for V8Proxy::callFunction.
- Fixes http://crbug.com/23278.
- https://bugs.webkit.org/show_bug.cgi?id=29974
-
- Test: fast/xmlhttprequest/xmlhttprequest-recursive-sync-event.html
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::callFunction):
-
-2009-10-02 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Jon Honeycutt.
-
- Fix test breakages by adding null checks, and putting inspector code in
- ENABLE(INSPECTOR).
-
- * dom/Document.cpp:
- (WebCore::Document::finishedParsing):
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::dispatchLoadEvent):
-
-2009-10-02 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Hausmann.
-
- Clean up the QNetworkReplyHandler to only apply HTTP headers
- for protocols in the HTTP family.
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::finish):
- (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
-
-2009-10-02 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Hausmann.
-
- Move error check into sendResponseIfNeeded() as suggested
- by Eric Seidel. Also, remove some dead code.
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::finish):
- (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
-
-2009-10-02 Enrica Casucci <enrica@apple.com>
-
- Reviewed by Adele Peterson.
-
- Assertion failure in CompositeEditCommand::moveParagraphs() and crash in Node::nodeIndex() when pasting.
- <rdar://problem/7148712>
- https://bugs.webkit.org/show_bug.cgi?id=28992
-
- Test: editing/selection/replace-selection-crash.html
-
- * editing/ReplaceSelectionCommand.cpp:
- (WebCore::ReplaceSelectionCommand::mergeEndIfNeeded): Handle properly the case of
- the destination position matching the end of the paragraph to move.
-
-2009-10-02 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Implement per-storage-area quotas for LocalStorage
- https://bugs.webkit.org/show_bug.cgi?id=29991
-
- I put 90% of the code in StorageMap since the decision to allow an update is
- closely tied to quota tracking. The quota is set via a page's Settings class.
- Like with the local storage path and whether it's enabled, it's assumed that
- all pages in the same group will have the same settings. The setting defaults
- to 5mb which is what the spec suggests, but it can easily be changed to
- anything else--including StorageMap::noQuota. Any values in LocalStorage are
- grandfathered in regarudless of quota, so importItem only tracks (and will
- never block) imports.
-
- I believe this change is a good transition to more complex quota management.
- For example, if we wanted to track quotas in the SQLite DB, then we'd just add
- a function to the StorageMap that sets the quota. This would be fine since all
- use of LocalStorage is blocked on the import completing, so you'd never hit a
- quota error in the mean time. Also, if embedders wanted to ask the user
- whether to expand the quota whenever it's hit (before deciding whether or not
- to raise an exception), a callback via the chrome client should be fairly easy.
- That said, I think it's best to add these features in steps rather than one
- huge patch. (Both of these are on my TODO list, btw.)
-
- Included is a layout test that verifies the behavior. It assumes the default
- quota is 5mb (since that's what Settings defaults to).
-
- Test: storage/domstorage/localstorage/quota.html
-
- * page/PageGroup.cpp:
- (WebCore::PageGroup::localStorage):
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
- (WebCore::Settings::setLocalStorageQuota):
- * page/Settings.h:
- (WebCore::Settings::localStorageQuota):
- * storage/StorageAreaImpl.cpp:
- (WebCore::StorageAreaImpl::create):
- (WebCore::StorageAreaImpl::StorageAreaImpl):
- (WebCore::StorageAreaImpl::setItem):
- (WebCore::StorageAreaImpl::clear):
- * storage/StorageAreaImpl.h:
- * storage/StorageMap.cpp:
- (WebCore::StorageMap::create):
- (WebCore::StorageMap::StorageMap):
- (WebCore::StorageMap::copy):
- (WebCore::StorageMap::setItem):
- (WebCore::StorageMap::removeItem):
- (WebCore::StorageMap::importItem):
- * storage/StorageMap.h:
- (WebCore::StorageMap::quota):
- * storage/StorageNamespace.cpp:
- (WebCore::StorageNamespace::localStorageNamespace):
- * storage/StorageNamespace.h:
- * storage/StorageNamespaceImpl.cpp:
- (WebCore::StorageNamespaceImpl::localStorageNamespace):
- (WebCore::StorageNamespaceImpl::sessionStorageNamespace):
- (WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
- (WebCore::StorageNamespaceImpl::copy):
- (WebCore::StorageNamespaceImpl::storageArea):
- * storage/StorageNamespaceImpl.h:
-
-2009-10-02 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Database Inspector crashes Safari when table has more than 21 columns
- https://bugs.webkit.org/show_bug.cgi?id=29924
-
- * inspector/front-end/StoragePanel.js:
- (WebInspector.StoragePanel.prototype.dataGridForResult): adjust the minimum column width percentage to be flexible for many columns.
-
-2009-10-02 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Fixes <http://webkit.org/b/14370>.
- Inspector's timeline should record when certain DOM events fired.
-
- This patch adds calls into the Web Inspector when the main frame
- fires an load event, and when the document fires its DOMContent
- event. Once these values are passed in, they are sent to the Web Inspector
- as a timing change, and these are denoted by vertical lines in the resources
- panel (blue for DOM Content, red for load event).
-
- * English.lproj/localizedStrings.js: Added tooltip text.
- * dom/Document.cpp:
- (WebCore::Document::finishedParsing): Added an Inspector callback for DOM Content.
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::mainResourceFiredDOMContentEvent): Tell the main resource it got the event.
- (WebCore::InspectorController::mainResourceFiredLoadEvent): Ditto.
- * inspector/InspectorController.h:
- * inspector/InspectorResource.cpp:
- (WebCore::InspectorResource::InspectorResource): Added new variables.
- (WebCore::InspectorResource::updateScriptObject): Send new variables to inspector.js.
- (WebCore::InspectorResource::markDOMContentEventTime): Send a TimingChange event.
- (WebCore::InspectorResource::markLoadEventTime): Ditto.
- * inspector/InspectorResource.h:
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel.prototype.get mainResourceLoadTime):
- (WebInspector.ResourcesPanel.prototype.set mainResourceLoadTime):
- (WebInspector.ResourcesPanel.prototype.get mainResourceDOMContentTime):
- (WebInspector.ResourcesPanel.prototype.set mainResourceDOMContentTime):
- (WebInspector.ResourcesPanel.prototype.reset):
- (WebInspector.ResourcesPanel.prototype._updateGraphDividersIfNeeded): Draw dividers for event timings.
- (WebInspector.ResourceTimeCalculator.prototype.computePercentageFromEventTime):
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.js:
- (WebInspector.updateResource):
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::dispatchLoadEvent): Add an Inspector callback for the Load event.
-
-2009-10-02 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Adam Roben.
-
- Add support for blacklist patterns to user stylesheets and scripts in addition to whitelist patterns.
-
- * WebCore.base.exp:
- * dom/Document.cpp:
- (WebCore::Document::pageGroupUserSheets):
- * page/Frame.cpp:
- (WebCore::Frame::injectUserScriptsForWorld):
- * page/PageGroup.cpp:
- (WebCore::PageGroup::addUserScript):
- (WebCore::PageGroup::addUserStyleSheet):
- (WebCore::PageGroup::removeUserContentWithURLForWorld):
- (WebCore::PageGroup::removeUserContentForWorld):
- * page/PageGroup.h:
- * page/UserContentURLPattern.cpp:
- (WebCore::UserContentURLPattern::matchesPatterns):
- * page/UserContentURLPattern.h:
- * page/UserScript.h:
- (WebCore::UserScript::UserScript):
- (WebCore::UserScript::whitelist):
- (WebCore::UserScript::blacklist):
- * page/UserStyleSheet.h:
- (WebCore::UserStyleSheet::UserStyleSheet):
- (WebCore::UserStyleSheet::whitelist):
- (WebCore::UserStyleSheet::blacklist):
-
-2009-10-02 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Darin Adler.
-
- Build fix when SVG is not enabled
- https://bugs.webkit.org/show_bug.cgi?id=30011
-
- Move TextRenderingMode related functions out from
- the ENABLE(SVG) guard.
-
- * css/CSSPrimitiveValueMappings.h:
- (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
- (WebCore::CSSPrimitiveValue::operator TextRenderingMode):
-
-2009-10-02 Kenneth Russell <kbr@google.com>
-
- Reviewed by Oliver Hunt.
-
- WebGL crashes with recent CanvasArray change
- https://bugs.webkit.org/show_bug.cgi?id=30018
-
- Test: fast/canvas/webgl/array-unit-tests.html
-
- * html/canvas/CanvasArray.cpp:
- (WebCore::CanvasArray::CanvasArray):
- Fix bug where PassRefPtr was tested after transferring value to RefPtr.
-
-2009-10-02 Steve Falkenburg <sfalken@apple.com>
-
- Reviewed by Mark Rowe.
-
- <https://bugs.webkit.org/show_bug.cgi?id=29989>
- Safari version number shouldn't be exposed in WebKit code
-
- For a WebKit version of 532.3.4:
- Product version is: 5.32.3.4 (was 4.0.3.0)
- File version is: 5.32.3.4 (was 4.532.3.4)
-
- * WebCore.vcproj/QTMovieWin.rc:
-
-2009-10-02 Stephen White <senorblanco@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Enable two point radial gradients in Chromium/Skia.
-
- https://bugs.webkit.org/show_bug.cgi?id=30017
-
- Covered by the following tests:
-
- LayoutTests/svg/W3C-SVG-1.1/pservers-grad-13-b.svg
- LayoutTests/fast/backgrounds/svg-as-background-3.html
- LayoutTests/fast/gradients/generated-gradients.html
- LayoutTests/fast/gradients/simple-gradients.html
-
- * platform/graphics/skia/GradientSkia.cpp:
- (WebCore::Gradient::platformGradient):
-
-2009-10-02 Norbert Leser <norbert.leser@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Conditionally guard cursor code (cursor and updateCursor functions) with !QT_NO_CURSOR.
- Otherwise, it is inconsistent with class declaration of QCursor.
-
- No new tests.
-
- * platform/qt/QWebPageClient.h:
-
-2009-10-02 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- [GTK] missing support for anamorphic PAR video size
- https://bugs.webkit.org/show_bug.cgi?id=29717
-
- cleanup of caps handling in the video sink
-
- * platform/graphics/gtk/VideoSinkGStreamer.cpp:
- (webkit_video_sink_set_caps):
-
-2009-10-02 Prasanth Ullattil <prasanth.ullattil@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Fix compiler warnings about unused function arguments.
-
- * bridge/qt/qt_class.h:
- * bridge/qt/qt_runtime.cpp:
- (JSC::Bindings::QtRuntimeMetaMethod::call):
- (JSC::Bindings::QtRuntimeConnectionMethod::call):
- * dom/XMLTokenizerQt.cpp:
- (WebCore::XMLTokenizer::initializeParserContext):
- * platform/graphics/qt/FontCacheQt.cpp:
- (WebCore::FontCache::getTraitsInFamily):
- (WebCore::FontCache::getCachedFontPlatformData):
- * platform/graphics/qt/FontFallbackListQt.cpp:
- (WebCore::FontFallbackList::setPlatformFont):
- * platform/graphics/qt/FontQt.cpp:
- (WebCore::Font::offsetForPositionForComplexText):
- * platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::GraphicsContext::drawLineForText):
- (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
- (WebCore::GraphicsContext::setPlatformShadow):
- (WebCore::GraphicsContext::setURLForRect):
- * platform/graphics/qt/IconQt.cpp:
- (WebCore::Icon::createIconForFiles):
- * platform/graphics/qt/ImageBufferQt.cpp:
- (WebCore::ImageBuffer::ImageBuffer):
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoderQt::frameBufferAtIndex):
- * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
- (WebCore::MediaPlayerPrivate::supportsType):
- (WebCore::MediaPlayerPrivate::setEndTime):
- * platform/graphics/qt/SimpleFontDataQt.cpp:
- (WebCore::SimpleFontData::containsCharacters):
- * platform/graphics/qt/StillImageQt.h:
- (WebCore::StillImage::destroyDecodedData):
- * platform/network/qt/DnsPrefetchHelper.h:
- (WebCore::DnsPrefetchHelper::lookedUp):
- * platform/qt/ContextMenuQt.cpp:
- (WebCore::ContextMenu::setPlatformDescription):
- * platform/qt/DragDataQt.cpp:
- (WebCore::DragData::asURL):
- * platform/qt/PopupMenuQt.cpp:
- (WebCore::PopupMenu::populate):
- * platform/qt/RenderThemeQt.cpp:
- (WebCore::RenderThemeQt::supportsFocusRing):
- (WebCore::RenderThemeQt::systemFont):
- (WebCore::RenderThemeQt::adjustButtonStyle):
- (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
- (WebCore::RenderThemeQt::paintMediaSeekBackButton):
- (WebCore::RenderThemeQt::paintMediaSeekForwardButton):
- * platform/qt/ScrollViewQt.cpp:
- (WebCore::ScrollView::platformAddChild):
- * platform/qt/SearchPopupMenuQt.cpp:
- (WebCore::SearchPopupMenu::saveRecentSearches):
- (WebCore::SearchPopupMenu::loadRecentSearches):
- * platform/qt/TemporaryLinkStubs.cpp:
- (WebCore::signedPublicKeyAndChallengeString):
- * platform/qt/WidgetQt.cpp:
- (WebCore::Widget::paint):
- * xml/XSLStyleSheetQt.cpp:
- (WebCore::XSLStyleSheet::loadChildSheet):
- (WebCore::XSLStyleSheet::setParentStyleSheet):
- * xml/XSLTProcessorQt.cpp:
- (WebCore::XSLTMessageHandler::handleMessage):
- (WebCore::XSLTProcessor::transformToString):
-
-2009-10-02 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- [GTK] missing support for anamorphic PAR video size
- https://bugs.webkit.org/show_bug.cgi?id=29717
-
- Scale the cairo surface of the video sink depending on the
- pixel-aspect-ratio of the video buffer to paint. Also
- destruct/re-create the surface when setSize() is called with a new
- size.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::naturalSize):
- (WebCore::MediaPlayerPrivate::setSize):
- (WebCore::MediaPlayerPrivate::paint):
- * platform/graphics/gtk/VideoSinkGStreamer.cpp:
- (webkit_video_sink_idle_func):
-
-2009-10-02 Ben Murdoch <benm@google.com>
-
- Reviewed by David Kilzer.
-
- Stale database version persists through browser refresh (changeVersion doesn't work)
- https://bugs.webkit.org/show_bug.cgi?id=27836
-
- Tests: storage/change-version-handle-reuse.html
- storage/change-version.html
-
- * bindings/v8/custom/V8DatabaseCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL): Implement the V8 binding for database.changeVersion().
- (WebCore::createTransaction): Fix a bug that was checking the wrong argument index to save the success callback.
- * storage/Database.cpp:
- (WebCore::updateGuidVersionMap): Safely update the Guid/version hash map.
- (WebCore::Database::~Database): Remove code that removes the database from the guid->database and guid->version maps.
- (WebCore::Database::setVersionInDatabase): Add a comment to explain some behaviour.
- (WebCore::Database::close): Move the code that updates the maps from the destructor to here.
- (WebCore::Database::performOpenAndVerify): Call updateGuidVersionMap instead of setting the hash map directly.
- (WebCore::Database::setExpectedVersion): Update the in memory guid->version map when we want to update the database version.
-
-2009-10-02 Janne Koskinen <janne.p.koskinen@digia.com>
-
- Reviewed by Simon Hausmann.
-
- Partial WINSCW build fix.
-
- Add parentheses around the function pointer declaration, similar to the
- second hunk in r48825.
-
- * loader/CachedResourceHandle.h:
-
-2009-10-02 Adam Barth <abarth@webkit.org>
-
- Unreviewed attempted build fix by Xcode magic.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-10-02 Adam Barth <abarth@webkit.org>
-
- Unreviewed build fix. Actually add the new files.
-
- * loader/RedirectScheduler.cpp: Added.
- (WebCore::ScheduledRedirection::):
- (WebCore::ScheduledRedirection::ScheduledRedirection):
- (WebCore::RedirectScheduler::RedirectScheduler):
- (WebCore::RedirectScheduler::~RedirectScheduler):
- (WebCore::RedirectScheduler::redirectScheduledDuringLoad):
- (WebCore::RedirectScheduler::clear):
- (WebCore::RedirectScheduler::scheduleRedirect):
- (WebCore::RedirectScheduler::mustLockBackForwardList):
- (WebCore::RedirectScheduler::scheduleLocationChange):
- (WebCore::RedirectScheduler::scheduleFormSubmission):
- (WebCore::RedirectScheduler::scheduleRefresh):
- (WebCore::RedirectScheduler::locationChangePending):
- (WebCore::RedirectScheduler::scheduleHistoryNavigation):
- (WebCore::RedirectScheduler::timerFired):
- (WebCore::RedirectScheduler::schedule):
- (WebCore::RedirectScheduler::startTimer):
- (WebCore::RedirectScheduler::cancel):
- * loader/RedirectScheduler.h: Added.
-
-2009-10-01 Adam Barth <abarth@webkit.org>
-
- Reviewed by Darin Adler.
-
- Move RedirectScheduler to its own file
- https://bugs.webkit.org/show_bug.cgi?id=29952
-
- This change is purely code motion.
-
- No behavior change.
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * loader/FrameLoader.cpp:
- * loader/FrameLoader.h:
- * loader/RedirectScheduler.cpp: Added.
- (WebCore::ScheduledRedirection::):
- (WebCore::ScheduledRedirection::ScheduledRedirection):
- (WebCore::RedirectScheduler::RedirectScheduler):
- (WebCore::RedirectScheduler::~RedirectScheduler):
- (WebCore::RedirectScheduler::redirectScheduledDuringLoad):
- (WebCore::RedirectScheduler::clear):
- (WebCore::RedirectScheduler::scheduleRedirect):
- (WebCore::RedirectScheduler::mustLockBackForwardList):
- (WebCore::RedirectScheduler::scheduleLocationChange):
- (WebCore::RedirectScheduler::scheduleFormSubmission):
- (WebCore::RedirectScheduler::scheduleRefresh):
- (WebCore::RedirectScheduler::locationChangePending):
- (WebCore::RedirectScheduler::scheduleHistoryNavigation):
- (WebCore::RedirectScheduler::timerFired):
- (WebCore::RedirectScheduler::schedule):
- (WebCore::RedirectScheduler::startTimer):
- (WebCore::RedirectScheduler::cancel):
- * loader/RedirectScheduler.h: Added.
-
-2009-10-02 Dave MacLachlan <dmaclach@gmail.com>
-
- Reviewed by David Levin.
-
- Clean up warnings in WebCore/bindings/v8/npruntime.cpp
- https://bugs.webkit.org/show_bug.cgi?id=29971
-
- Gets rid of warnings on gcc about using anonymous namespaces
- warning: 'StringKeyHashTraits' has a base
- 'WTF::GenericHashTraits<<unnamed>::StringKey>'
- whose type uses the anonymous namespace
- and
- warning: 'WTF::PairHashTraits<StringKeyHashTraits,
- WTF::HashTraits<PrivateIdentifier*> >' has a base
- 'WTF::GenericHashTraits<std::pair<<unnamed>::StringKey,
- PrivateIdentifier*> >' whose type uses the anonymous namespace
-
- No tests required.
-
- * bindings/v8/npruntime.cpp:
-
-2009-10-01 Mark Rowe <mrowe@apple.com>
-
- Fix the Tiger build. Don't unconditionally enable 3D canvas as it is not supported on Tiger.
-
- * Configurations/FeatureDefines.xcconfig:
-
-2009-10-01 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Turn on ENABLE_3D_CANVAS in TOT
- https://bugs.webkit.org/show_bug.cgi?id=29906
-
- Fixed a bug found when running tests with flag on
-
- * Configurations/FeatureDefines.xcconfig:
- * WebCore.base.exp:
- * bindings/js/JSCanvasArrayBufferConstructor.h:
- (WebCore::construct):
- * html/HTMLCanvasElement.cpp:
- (WebCore::HTMLCanvasElement::getContext):
- * html/canvas/CanvasArray.cpp:
- (WebCore::CanvasArray::CanvasArray):
- * html/canvas/CanvasByteArray.cpp:
- (WebCore::CanvasByteArray::create):
- * html/canvas/CanvasFloatArray.cpp:
- (WebCore::CanvasFloatArray::create):
- * html/canvas/CanvasIntArray.cpp:
- (WebCore::CanvasIntArray::create):
- * html/canvas/CanvasShortArray.cpp:
- (WebCore::CanvasShortArray::create):
- * html/canvas/CanvasUnsignedByteArray.cpp:
- (WebCore::CanvasUnsignedByteArray::create):
- * html/canvas/CanvasUnsignedIntArray.cpp:
- (WebCore::CanvasUnsignedIntArray::create):
- * html/canvas/CanvasUnsignedShortArray.cpp:
- (WebCore::CanvasUnsignedShortArray::create):
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
- (WebCore::Settings::setWebGLEnabled):
- * page/Settings.h:
- (WebCore::Settings::webGLEnabled):
-
-2009-10-01 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Fix for <rdar://problem/7264725> Re-add a vendor prefix to box-
- shadow (29927)
- -and corresponding-
- https://bugs.webkit.org/show_bug.cgi?id=29927
-
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::):
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue):
- (WebCore::ShadowParseContext::ShadowParseContext):
- (WebCore::ShadowParseContext::commitValue):
- (WebCore::ShadowParseContext::commitLength):
- (WebCore::ShadowParseContext::commitColor):
- (WebCore::cssPropertyID):
- * css/CSSPropertyNames.in:
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty):
- * page/animation/AnimationBase.cpp:
- (WebCore::ensurePropertyMap):
-
-2009-10-01 Beth Dakin <bdakin@apple.com>
-
- Rubber-stamped by Sam Weinig.
-
- At bad merge at some point in the development of my patch must have
- put TextRenderMode.h in a weird spot in the xcodeproj. Moving it
- back where it belongs!
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-09-30 Adam Barth <abarth@webkit.org>
-
- Reviewed by Darin Adler.
-
- Remove FrameLoader::schedule* APIs
- https://bugs.webkit.org/show_bug.cgi?id=29950
-
- Change clients of FrameLoader::schedule* to call redirectScheduler
- directly.
-
- No behavior change.
-
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::setLocation):
- (WebCore::createWindow):
- (WebCore::JSDOMWindow::open):
- * bindings/js/JSDocumentCustom.cpp:
- (WebCore::JSDocument::setLocation):
- * bindings/js/JSLocationCustom.cpp:
- (WebCore::navigateIfAllowed):
- (WebCore::JSLocation::reload):
- * bindings/v8/V8Utilities.cpp:
- (WebCore::navigateIfAllowed):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::createWindow):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8LocationCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * dom/Document.cpp:
- (WebCore::Document::implicitClose):
- (WebCore::Document::processHttpEquiv):
- * html/HTMLTokenizer.cpp:
- (WebCore::HTMLTokenizer::write):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::requestFrame):
- (WebCore::FrameLoader::submitForm):
- (WebCore::FrameLoader::receivedFirstData):
- * loader/FrameLoader.h:
- * loader/appcache/ApplicationCacheGroup.cpp:
- (WebCore::ApplicationCacheGroup::selectCache):
- * page/History.cpp:
- (WebCore::History::back):
- (WebCore::History::forward):
- (WebCore::History::go):
-
-2009-10-01 Beth Dakin <bdakin@apple.com>
-
- Just removing a comment I accidentally committed earlier.
-
- * platform/graphics/mac/SimpleFontDataMac.mm:
- (WebCore::SimpleFontData::getCFStringAttributes):
-
-2009-09-30 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Adler.
-
- Clean up use of const and mutable in StorageMap
- https://bugs.webkit.org/show_bug.cgi?id=29933
-
- What's the point of having every single member variable be mutable and nearly
- every method be const? Let's clean it up.
-
- * storage/StorageMap.cpp:
- (WebCore::StorageMap::setIteratorToIndex):
- (WebCore::StorageMap::key):
- (WebCore::StorageMap::importItem):
- * storage/StorageMap.h:
-
-2009-10-01 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Dave Hyatt.
-
- Fix for <rdar://problem/6934421> Support CSS for Text Kerning and
- ligature
- -and corresponding-
- https://bugs.webkit.org/show_bug.cgi?id=6136
-
- This patch makes the SVG CSS property text-rendering work with any
- HTML, much like it does in Firefox. It accepts four possible input
- values: auto, optimizeSpeed, optimizeLegibility, and
- geometricPrecision. Right now, in this implementation, here is what
- those values correspond to:
-
- auto = optimizeSpeed = what we normally when the value's not set
- optimizeLegibility = geometricPrecision = ligatures kerning
-
- Add new file TextRenderingMode.h to the project files.
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
-
- CSS support for the new CSSPropertyTextRendering
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::):
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue):
- * css/CSSPrimitiveValueMappings.h:
- (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
- (WebCore::CSSPrimitiveValue::operator TextRenderingMode):
- * css/CSSPropertyNames.in:
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty):
- * css/CSSValueKeywords.in:
-
- All the old SVG CSS support for this property can go away. When
- it's used in SVG, it will just fall into the normal HTML case.
- * css/SVGCSSComputedStyleDeclaration.cpp:
- (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
- * css/SVGCSSParser.cpp:
- (WebCore::CSSParser::parseSVGValue):
- * css/SVGCSSPropertyNames.in:
- * css/SVGCSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applySVGProperty):
- * css/SVGCSSValueKeywords.in:
-
- FontDescription stores the m_textRendering bit.
- * platform/graphics/FontDescription.h:
- (WebCore::FontDescription::FontDescription):
- (WebCore::FontDescription::textRenderingMode):
- (WebCore::FontDescription::setTextRenderingMode):
- (WebCore::FontDescription::operator==):
-
- We want to fall into the complex text rendering code path if
- kerning and ligatures have been enabled with this property.
- * platform/graphics/FontFastPath.cpp:
- (WebCore::Font::canUseGlyphCache):
-
- Now takes a TextRenderingMode as a parameter.
- * platform/graphics/SimpleFontData.h:
-
- New header for the enum.
- * platform/graphics/TextRenderingMode.h: Added.
- (WebCore::):
-
- getCFStringAttributes() now takes a TextRenderingMode as an
- attribute.
- * platform/graphics/mac/CoreTextController.cpp:
- (WebCore::CoreTextController::collectCoreTextRunsForCharacters):
-
- Enable kerning and ligatures whenever the TextRenderingMode is
- OptimizeLegibility or GeometricPrecision
- * platform/graphics/mac/FontMacATSUI.mm:
- (WebCore::disableLigatures):
- (WebCore::initializeATSUStyle):
- (WebCore::ATSULayoutParameters::initialize):
- * platform/graphics/mac/SimpleFontDataMac.mm:
- (WebCore::SimpleFontData::getCFStringAttributes):
-
- More SVG CSS stuff that isn't needed anymore since SVG will use the
- new HTML CSS implementation.
- * rendering/style/SVGRenderStyle.h:
- (WebCore::SVGRenderStyle::InheritedFlags::operator==):
- (WebCore::SVGRenderStyle::setBitDefaults):
- * rendering/style/SVGRenderStyleDefs.h:
-
-2009-10-01 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Use isClosure property of scope proxy to decide whether the
- scope is a closure.
-
- https://bugs.webkit.org/show_bug.cgi?id=29965
-
- * inspector/front-end/ScopeChainSidebarPane.js:
- (WebInspector.ScopeChainSidebarPane.prototype.update):
-
-2009-10-01 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt.
-
- Odd color transitions on anchors with transition-property: all
- https://bugs.webkit.org/show_bug.cgi?id=29911
-
- When transitioning maybe-invalid colors, if the source and destination
- color are both invalid, then don't animate.
-
- This fixes an issue where a child element of an element running a color
- transition, with -webkit-transition-property:all, would show a color change.
- This happened because the "maybe invalid color" logic copied the color style
- into -webkit-text-fill-color for both endpoints, causing -webkit-text-fill-color
- to animate while the transition ran, and to then to disappear when the transition
- finished.
-
- Test: transitions/color-transition-all.html
-
- * page/animation/AnimationBase.cpp:
- (WebCore::PropertyWrapperMaybeInvalidColor::equals):
- (WebCore::PropertyWrapperMaybeInvalidColor::blend):
-
-2009-10-01 Victor Wang <victorw@chromium.org>
-
- Reviewed by Oliver Hunt.
-
- Allow dragging a node who has child nodes.
-
- https://bugs.webkit.org/show_bug.cgi?id=28632
-
- Test: fast/events/drag-parent-node.html
-
- * page/EventHandler.cpp:
- (WebCore::EventHandler::shouldDragAutoNode):
-
-2009-10-01 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- [GTK] media player: better mute support
- https://bugs.webkit.org/show_bug.cgi?id=29960
-
- Handle volume and mute state with the two corresponding properties
- of playbin2.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::setMuted):
- (WebCore::MediaPlayerPrivate::setVolume):
-
-2009-10-01 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- [GTK] video sink pad template colorspace is wrong
- https://bugs.webkit.org/show_bug.cgi?id=29953
-
- Set sink pad template colorspace depending on byte order.
-
- * platform/graphics/gtk/VideoSinkGStreamer.cpp:
- (webkit_video_sink_idle_func):
-
-2009-10-01 Vitaly Repeshko <vitalyr@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Refactored V8 event listeners:
- (This change should fix http://crbug.com/21079 and
- https://bugs.webkit.org/show_bug.cgi?id=29093.)
- o All listeners use weak handles to JS objects to avoid creating
- cycles and leaking memory.
- o "Object" variants of listeners removed.
- o All event accessor callbacks are generated.
- o Custom event accessors removed.
- o All wrappers have hidden dependencies on their listeners to
- prevent listeners from being collected.
- o All variats of getEventListener function grouped in V8DOMWrapper.
- o Pointers to C+EventListener wrappers are stored in JS objects
- instead of event listener lists.
- https://bugs.webkit.org/show_bug.cgi?id=29825
-
- * WebCore.gypi: Removed "Object" listeners.
- * bindings/scripts/CodeGeneratorV8.pm: Now handles event accessors.
- * bindings/v8/DOMObjectsInclude.h:
-
- V8AbstractEventListener manages weak JS handle:
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::weakEventListenerCallback):
- (WebCore::V8AbstractEventListener::V8AbstractEventListener):
- (WebCore::V8AbstractEventListener::~V8AbstractEventListener):
- (WebCore::V8AbstractEventListener::handleEvent):
- (WebCore::V8AbstractEventListener::disposeListenerObject):
- (WebCore::V8AbstractEventListener::setListenerObject):
- * bindings/v8/V8AbstractEventListener.h:
- (WebCore::V8AbstractEventListener::cast):
- (WebCore::V8AbstractEventListener::isLazy):
- (WebCore::V8AbstractEventListener::getListenerObject):
- (WebCore::V8AbstractEventListener::getExistingListenerObject):
- (WebCore::V8AbstractEventListener::hasExistingListenerObject):
- (WebCore::V8AbstractEventListener::disconnectFrame):
- (WebCore::V8AbstractEventListener::disconnected):
- (WebCore::V8AbstractEventListener::prepareListenerObject):
- (WebCore::V8AbstractEventListener::lineNumber):
- (WebCore::V8AbstractEventListener::virtualisAttribute):
-
- Grouped getEventListener functions:
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getTemplate):
- (WebCore::V8DOMWrapper::getEventListener):
- * bindings/v8/V8DOMWrapper.h:
-
- Removed most event listener objects bookkeeping:
- * bindings/v8/V8EventListenerList.cpp:
- * bindings/v8/V8EventListenerList.h:
- (WebCore::V8EventListenerList::findWrapper):
- (WebCore::V8EventListenerList::clearWrapper):
- (WebCore::V8EventListenerList::doFindWrapper):
- (WebCore::V8EventListenerList::getHiddenProperty):
- (WebCore::V8EventListenerList::findOrCreateWrapper):
-
- Added hidden properties for storing EventListener wrappers:
- * bindings/v8/V8HiddenPropertyName.cpp:
- (WebCore::V8HiddenPropertyName::listener):
- (WebCore::V8HiddenPropertyName::attributeListener):
- * bindings/v8/V8HiddenPropertyName.h:
-
- * bindings/v8/V8LazyEventListener.cpp:
- (WebCore::V8LazyEventListener::V8LazyEventListener):
- (WebCore::V8LazyEventListener::callListenerFunction):
- (WebCore::V8LazyEventListener::prepareListenerObject):
- * bindings/v8/V8LazyEventListener.h:
- (WebCore::V8LazyEventListener::isLazy):
- * bindings/v8/V8ObjectEventListener.cpp: Removed.
- * bindings/v8/V8ObjectEventListener.h: Removed.
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::disconnectFrame):
- (WebCore::V8Proxy::disconnectEventListeners):
- * bindings/v8/V8Proxy.h:
- * bindings/v8/V8WorkerContextEventListener.cpp:
- (WebCore::V8WorkerContextEventListener::reportError):
- (WebCore::V8WorkerContextEventListener::getReceiverObject):
- * bindings/v8/V8WorkerContextEventListener.h:
- * bindings/v8/V8WorkerContextObjectEventListener.cpp: Removed.
- * bindings/v8/V8WorkerContextObjectEventListener.h: Removed.
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::WorkerContextExecutionProxy::dispose):
- (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
- (WebCore::WorkerContextExecutionProxy::findOrCreateEventListener):
- * bindings/v8/WorkerContextExecutionProxy.h:
- * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8CustomEventListener.cpp:
- (WebCore::V8EventListener::V8EventListener):
- (WebCore::V8EventListener::getListenerFunction):
- (WebCore::V8EventListener::callListenerFunction):
- * bindings/v8/custom/V8CustomEventListener.h:
- * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
- * bindings/v8/custom/V8MessagePortCustom.cpp:
- (WebCore::getEventListener):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8NodeCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8NotificationCenterCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WebSocketCustom.cpp:
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WorkerCustom.cpp:
- * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
- * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
-
-2009-10-01 Alexis Menard <alexis.menard@nokia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- Rename QWebGraphicsItem to QGraphicsWebView
-
- * WebCore.pro:
-
-2009-10-01 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Read-only transactions do not change file sizes and therefore
- should not trigger quota updates.
-
- https://bugs.webkit.org/show_bug.cgi?id=29945
-
- * storage/SQLTransaction.cpp:
- (WebCore::SQLTransaction::openTransactionAndPreflight):
- (WebCore::SQLTransaction::runStatements):
-
-2009-09-30 Timothy Hatcher <timothy@apple.com>
-
- Fix list box scrolling by correctly overriding the scroll()
- function on RenderBox.
-
- <rdar://problem/7255440> REGRESSION (r48683): Mousewheel scrolling
- of listboxes is broken (29756)
-
- Reviewed by Dan Bernstein.
-
- * rendering/RenderListBox.cpp:
- (WebCore::RenderListBox::scroll):
- * rendering/RenderListBox.h:
- * rendering/RenderTextControlSingleLine.cpp:
- (WebCore::RenderTextControlSingleLine::scroll):
- * rendering/RenderTextControlSingleLine.h:
-
-2009-10-01 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Make a copy of listeners array before dispatching an event in
- WebInspector.Object.prototype.dispatchEventToListeners. Otherwise if current
- listener removes itself from the array next listener will be skipped.
-
- https://bugs.webkit.org/show_bug.cgi?id=29920
-
- * inspector/front-end/Object.js:
- (WebInspector.Object.prototype.dispatchEventToListeners): make a copy of listeners array before dispatching an event
-
-2009-10-01 Martin Robinson <martin.james.robinson@gmail.com>
-
- Reviewed by Xan Lopez.
-
- [GTK] GtkIMContext filtering interferes with DOM key events
- https://bugs.webkit.org/show_bug.cgi?id=28733
-
- Ensure that keyboard events filtered by the GtkIMContext still create
- the proper DOM events.
-
- No tests added. Instead previously skipped tests have been enabled.
-
- * platform/gtk/KeyEventGtk.cpp:
- (WebCore::keyIdentifierForGdkKeyCode):
- (WebCore::singleCharacterString):
-
-2009-10-01 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Xan Lopez.
-
- [GTK] data: uri support in media player
- https://bugs.webkit.org/show_bug.cgi?id=29842
-
- New GStreamer element to handle data: uris. For now only base64
- encoded data is supported. Decoded data is handed over to
- giostreamsrc.
-
- * GNUmakefile.am:
- * platform/graphics/gtk/DataSourceGStreamer.cpp: Added.
- (_do_init):
- (webkit_data_src_base_init):
- (webkit_data_src_class_init):
- (webkit_data_src_reset):
- (webkit_data_src_init):
- (webkit_data_src_finalize):
- (webkit_data_src_uri_get_type):
- (webkit_data_src_uri_get_protocols):
- (webkit_data_src_uri_get_uri):
- (webkit_data_src_uri_set_uri):
- (webkit_data_src_uri_handler_init):
- * platform/graphics/gtk/DataSourceGStreamer.h: Added.
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::do_gst_init):
- (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
- (WebCore::MediaPlayerPrivate::mimeTypeCache):
-
-2009-09-30 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=29944
-
- Reduces false positives in the XSSAuditor by explicitly allowing requests
- that do not contain illegal URI characters.
-
- As a side effect of this change, the tests property-inject.html,
- property-escape-noquotes.html, and property-escape-noquotes-tab-slash-chars.html
- fail because these attacks do not contain any illegal URI characters and
- thus are now allowed by the XSSAuditor, where previously they weren't. A future
- change may reinstate this functionality.
-
- Tests: http/tests/security/xssAuditor/script-tag-safe2.html
- http/tests/security/xssAuditor/script-tag-safe3.html
-
- * page/XSSAuditor.cpp:
- (WebCore::isIllegalURICharacter): Added method.
- (WebCore::XSSAuditor::canEvaluate):
- (WebCore::XSSAuditor::canCreateInlineEventListener):
- (WebCore::XSSAuditor::findInRequest): Added parameter
- allowRequestIfNoIllegalURICharacters.
- * page/XSSAuditor.h:
-
-2009-09-30 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Maciej Stachowiak.
-
- reproducible freeze and crash on closing form popup at bosch-home.nl
- https://bugs.webkit.org/show_bug.cgi?id=28948
-
- showModalDialog calls getDirect on what is actually a window shell,
- so ends up not getting a value (since no value can ever be placed
- directly on the shell), which leads to incorrect behaviour.
-
- We use a manual test rather than automatic as it was not
- possible to get a modal run loop to work inside DRT.
-
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::showModalDialog):
- * manual-tests/showModalDialog-returnValue.html: manual testcase.
-
-2009-09-30 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Darin Adler.
-
- Adds ValidityState.tooLong support for <input> and <textarea>.
-
- Introduces tooLong() in HTMLFormControlElement and it always returns false.
- HTMLInputElement and HTMLTextAreaElement overrides it and checks the text
- length and maxLength. tooLong() should work only for `dirty' values.
- So, introduces m_isDirty flag for HTMLTextAreaElement, and
- !m_data.value().isNull() works as a dirty flag for HTMLInputElement.
-
- Renames parameter names of setMaxLength().
-
- https://bugs.webkit.org/show_bug.cgi?id=27454
-
- Tests: fast/forms/ValidityState-tooLong-input.html
- fast/forms/ValidityState-tooLong-textarea.html
-
- * html/HTMLFormControlElement.h:
- (WebCore::HTMLFormControlElement::tooLong):
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::tooLong):
- (WebCore::HTMLInputElement::setMaxLength):
- * html/HTMLInputElement.h:
- * html/HTMLTextAreaElement.cpp:
- (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
- (WebCore::HTMLTextAreaElement::reset):
- (WebCore::HTMLTextAreaElement::updateValue):
- (WebCore::HTMLTextAreaElement::setMaxLength):
- (WebCore::HTMLTextAreaElement::tooLong):
- * html/HTMLTextAreaElement.h:
- * html/ValidityState.h:
- (WebCore::ValidityState::tooLong):
-
-2009-09-30 Adam Barth <abarth@webkit.org>
-
- Reviewed by Maciej Stachowiak.
-
- Factor RedirectScheduler out of FrameLoader
- https://bugs.webkit.org/show_bug.cgi?id=29948
-
- This change introduces a new sub-object of Frame, redirectScheduler.
- The redirectScheduler is responsible for scheduling redirects.
-
- This change leaves the code for the redirectScheduler in
- FrameLoader.cpp. A future change will move the class into its own
- file.
-
- No behavior change (hopefully!).
-
- * loader/FrameLoader.cpp:
- (WebCore::RedirectScheduler::RedirectScheduler):
- (WebCore::RedirectScheduler::~RedirectScheduler):
- (WebCore::RedirectScheduler::redirectScheduledDuringLoad):
- (WebCore::RedirectScheduler::clear):
- (WebCore::FrameLoader::FrameLoader):
- (WebCore::FrameLoader::setDefersLoading):
- (WebCore::FrameLoader::stopLoading):
- (WebCore::FrameLoader::didOpenURL):
- (WebCore::FrameLoader::didExplicitOpen):
- (WebCore::FrameLoader::cancelAndClear):
- (WebCore::FrameLoader::clear):
- (WebCore::FrameLoader::checkCompleted):
- (WebCore::FrameLoader::isScheduledLocationChangePending):
- (WebCore::FrameLoader::scheduleHTTPRedirection):
- (WebCore::RedirectScheduler::scheduleRedirect):
- (WebCore::RedirectScheduler::mustLockBackForwardList):
- (WebCore::FrameLoader::scheduleLocationChange):
- (WebCore::RedirectScheduler::scheduleLocationChange):
- (WebCore::FrameLoader::scheduleFormSubmission):
- (WebCore::RedirectScheduler::scheduleFormSubmission):
- (WebCore::FrameLoader::scheduleRefresh):
- (WebCore::RedirectScheduler::scheduleRefresh):
- (WebCore::RedirectScheduler::locationChangePending):
- (WebCore::FrameLoader::scheduleHistoryNavigation):
- (WebCore::RedirectScheduler::scheduleHistoryNavigation):
- (WebCore::RedirectScheduler::timerFired):
- (WebCore::FrameLoader::provisionalLoadStarted):
- (WebCore::RedirectScheduler::schedule):
- (WebCore::RedirectScheduler::startTimer):
- (WebCore::RedirectScheduler::cancel):
- (WebCore::FrameLoader::completed):
- (WebCore::FrameLoader::open):
- * loader/FrameLoader.h:
- (WebCore::FrameLoader::committedFirstRealDocumentLoad):
- * page/Frame.cpp:
- (WebCore::Frame::Frame):
- (WebCore::Frame::redirectScheduler):
- * page/Frame.h:
-
-2009-09-30 Maciej Stachowiak <mjs@apple.com>
-
- Build fix, not reviewed.
-
- More Windows build fixes for https://bugs.webkit.org/show_bug.cgi?id=29943
-
- * platform/network/cf/ResourceHandleCFNet.cpp:
- (WebCore::willSendRequest):
-
-2009-09-30 Maciej Stachowiak <mjs@apple.com>
-
- Build fix, not reviewed.
-
- Fix windows build for fix for https://bugs.webkit.org/show_bug.cgi?id=29943
-
- * platform/network/cf/ResourceHandleCFNet.cpp:
- (WebCore::willSendRequest):
-
-2009-09-30 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Darin Fisher.
-
- [V8] HTMLAudioElement, HTMLImageElement, and HTMLOptionElement are constructable, but they shouldn't be.
- Only Audio, Image, and Option should be constructable.
- https://bugs.webkit.org/show_bug.cgi?id=29940
-
- Test: fast/dom/dom-constructor.html
-
- * WebCore.gypi: Added new files to project.
- * bindings/scripts/CodeGeneratorV8.pm: Modified to generate custom constructors.
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getTemplate): Removed handling of HTMLImageElement, HTMLOptionElement
- and HTMLAudioElement construction.
- * bindings/v8/V8HTMLAudioElementConstructor.h: Added.
- * bindings/v8/V8HTMLImageElementConstructor.h: Added.
- * bindings/v8/V8HTMLOptionElementConstructor.h: Added.
- * bindings/v8/V8Index.cpp: Added new headers.
- * bindings/v8/V8Index.h: Added Audio, Image and Option decls.
- * bindings/v8/custom/V8CustomBinding.h: Ditto.
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::ACCESSOR_GETTER): Added custom constructors.
- * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
- (WebCore::V8HTMLImageElementConstructor::GetTemplate): Added custom template creator.
- * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
- (WebCore::V8HTMLOptionElementConstructor::GetTemplate): Ditto.
- * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
- (WebCore::V8HTMLImageElementConstructor::GetTemplate): Ditto.
-
-2009-09-30 Maciej Stachowiak <mjs@apple.com>
-
- Reviewed by Brady Eidson.
-
- 307 redirects should pass along http body and Content-Type header
- https://bugs.webkit.org/show_bug.cgi?id=29943
-
- Follow-up fix for:
- <rdar://problem/3802660> SAP: 307 (Temporary Redirect) responses should use POST, not GET
-
- Test: http/tests/loading/resources/redirect-methods-result.php
-
- * platform/network/cf/ResourceHandleCFNet.cpp:
- (WebCore::willSendRequest): Pass along http body and Content-Type header.
- * platform/network/mac/ResourceHandleMac.mm:
- (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): ditto
-
-2009-09-30 Geoffrey Garen <ggaren@apple.com>
-
- Reviewed by Mark Rowe.
-
- Fixed https://bugs.webkit.org/show_bug.cgi?id=29941
- REGRESSION (r48882-r48888): Many memory leaks on SnowLeopard leaks bot
-
- Forgot to implement a destructor for JSDOMWindowBaseData, so it was
- leaking its RefPtr data member.
-
- * bindings/js/JSDOMWindowBase.cpp:
- (WebCore::JSDOMWindowBase::destroyJSDOMWindowBaseData):
- * bindings/js/JSDOMWindowBase.h:
- (WebCore::JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData::JSDOMWindowBaseData):
-
-2009-09-30 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Tim Hatcher.
-
- Make sure the removal of user stylesheets results in all of the WebViews being updated to
- reflect the changes.
-
- * page/PageGroup.cpp:
- (WebCore::PageGroup::removeUserContentWithURLForWorld):
- (WebCore::PageGroup::removeUserContentForWorld):
-
-2009-09-30 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Sam Weinig.
-
- REGRESSION(r47440): drop down menus at americanexpress.com disappear on mouse out
- https://bugs.webkit.org/show_bug.cgi?id=29209
-
- Test: fast/inline/relative-positioned-overflow.html
-
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::computeVerticalOverflow): Add self-painting
- inlines to overflow to ensure that they are included in hit-testing.
-
-2009-09-30 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Mark Rowe.
-
- transforms/3d tests are not run in Release builds
- https://bugs.webkit.org/show_bug.cgi?id=29827
-
- Make sure we export the WebCoreHas3DRendering symbol in Release builds,
- because this symbols is used by run-webkit-tests (via 'nm') to detect whether
- WebCore was built with ENABLE_3D_RENDERING turned on.
-
- * DerivedSources.make:
- * WebCore.3DRendering.exp: Added.
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-09-30 Jeremy Orlow <jorlow@chromium.org>
-
- Build fix for QT. Didn't know WebCore.pro existed.
-
- * WebCore.pro:
-
-2009-09-30 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Adam Roben.
-
- Add a method for removal of user scripts and stylesheets by URL from a specific world.
-
- * page/PageGroup.cpp:
- (WebCore::PageGroup::removeUserContentURLForWorld):
- * page/PageGroup.h:
-
-2009-09-30 Chris Hawk <hawk@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Fix for conditionals in the WebCore gyp file, which contained two separate
- 'conditions' values for the webcore target. The first entry was ignored,
- resulting in some missine defines.
- https://bugs.webkit.org/show_bug.cgi?id=29907
-
- * WebCore.gyp/WebCore.gyp:
-
-2009-09-21 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Adam Barth.
-
- DOM Storage needs to be more careful about where "ThreadSafe" objects are destroyed.
- https://bugs.webkit.org/show_bug.cgi?id=29265
-
- DOM Storage needs to be more careful about where "ThreadSafe" objects are
- destroyed. With the current code, there actually isn't a race condition, but
- it sure would be easy for someone to introduce one. A bunch of
- ThreadSafeShared objects have RefPtrs to objects that are NOT ThreadSafeShared
- objects. If it were possible any of these objects' destructors to be fired off
- the main thread, then the you'd have a race condition. The code should be more
- clear and self-documenting about how things related to each other.
-
- Since the lifetime of a LocalStorageTask is bounded by the LocalStorageThread
- which is bounded by the StorageSyncManager, StorageAreaImpl, and
- StorageAreaSync, there's no reason for LocalStorageTask to store anything other
- than pointers. By breaking this dependency, we can eliminate the risk.
-
- Note that we _could_ have LocalStorageThread's task queue just store
- LocalStorageTask*'s rather than RefPtr<LocalStorageTask>s but then we'd need to
- manually take care of deleting. It'd probably also be possible to change
- LocalStorageThread around so that it needn't hold onto a reference of itself
- and have a more deterministic shutdown, but my initial attempts to do so
- failed, and I decided it wasn't worth changing. The queue is killed before
- hand, so the thread is 100% impotent before the main thread continues anyway.
-
- The constructors and destructors of StorageSyncManager, StorageAreaImpl, and
- StorageAreaSync now have ASSERTs to verify they're running on the main thread.
- I'm fairly positive that it'd be impossible to hit these asserts and the fact
- that these classes are no longer ThreadSafeShared should make it clear how
- they're meant to be used, but I think it's worth it to be extra sure. Of
- course, ideally, we'd have such an assert every time a ref is incremented or
- decremented.
-
- Behavior should be unchanged and this is just an internal code cleanup, so no
- new tests.
-
- * storage/LocalStorageTask.cpp:
- (WebCore::LocalStorageTask::LocalStorageTask):
- (WebCore::LocalStorageTask::performTask):
- * storage/LocalStorageTask.h:
- (WebCore::LocalStorageTask::createImport):
- (WebCore::LocalStorageTask::createSync):
- (WebCore::LocalStorageTask::createTerminate):
- * storage/LocalStorageThread.cpp:
- (WebCore::LocalStorageThread::scheduleImport):
- (WebCore::LocalStorageThread::scheduleSync):
- * storage/LocalStorageThread.h:
- * storage/StorageArea.h:
- * storage/StorageAreaImpl.cpp:
- (WebCore::StorageAreaImpl::~StorageAreaImpl):
- (WebCore::StorageAreaImpl::StorageAreaImpl):
- * storage/StorageAreaSync.cpp:
- (WebCore::StorageAreaSync::StorageAreaSync):
- (WebCore::StorageAreaSync::~StorageAreaSync):
- * storage/StorageSyncManager.cpp:
- (WebCore::StorageSyncManager::StorageSyncManager):
- (WebCore::StorageSyncManager::~StorageSyncManager):
- (WebCore::StorageSyncManager::scheduleImport):
- (WebCore::StorageSyncManager::scheduleSync):
- * storage/StorageSyncManager.h:
-
-2009-09-28 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Chromium needs to be able to override the way storage events are delivered
- https://bugs.webkit.org/show_bug.cgi?id=29655
-
- Chromium needs to be able to override the way storage events are delivered.
- This replaced https://bugs.webkit.org/show_bug.cgi?id=29257 because it'll be
- faster (no vtables and extra allocation) and somewhat cleaner (no dependency
- injection). This is necessary because Chromium needs to transport events across
- a process barrier and then dispatch them without use of a Frame*.
-
- Behavior should not change with this, so no updates to tests.
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * storage/StorageAreaImpl.cpp:
- (WebCore::StorageAreaImpl::setItem):
- (WebCore::StorageAreaImpl::removeItem):
- (WebCore::StorageAreaImpl::clear):
- * storage/StorageAreaImpl.h:
- * storage/StorageEventDispatcher.cpp: Copied from WebCore/storage/StorageAreaImpl.cpp.
- (WebCore::StorageEventDispatcher::dispatch):
- * storage/StorageEventDispatcher.h: Added. (Well, technically in the other half of this patch.)
-
-2009-09-30 Jian Li <jianli@chromium.org>
-
- Reviewed by Darin Adler.
-
- Need to check NULL frame in EventHandler::updateDragAndDrop.
- https://bugs.webkit.org/show_bug.cgi?id=29929
-
- Test: http/tests/misc/drag-over-iframe-invalid-source-crash.html
-
- * page/EventHandler.cpp:
- (WebCore::EventHandler::updateDragAndDrop):
-
-2009-09-29 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- ASSERTION FAILED: !repaintContainer || repaintContainer == this
- https://bugs.webkit.org/show_bug.cgi?id=29755
-
- Generalize the fix for this bug to account for cases where there may be multiple
- containing blocks between the repaint container, and the container of the element
- being repainted.
-
- Test: compositing/repaint/opacity-between-absolute2.html
-
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::mapLocalToContainer):
- Call offsetFromAncestorContainer() to get the correct offset.
-
- (WebCore::RenderBox::computeRectForRepaint): Ditto
- * rendering/RenderInline.cpp:
- (WebCore::RenderInline::computeRectForRepaint): Ditto.
-
- * rendering/RenderObject.h:
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::offsetFromAncestorContainer):
- New method that computes an offset from some object in the ancestor container() chain.
-
-2009-09-30 Andras Becsi <becsi.andras@stud.u-szeged.hu>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Fix TextCodecQt::decode method after r48752 to return a non-null string if the length of the input is 0.
- This fixes https://bugs.webkit.org/show_bug.cgi?id=29736.
-
- * platform/text/qt/TextCodecQt.cpp:
- (WebCore::TextCodecQt::decode):
-
-2009-09-29 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Jon Honeycutt.
-
- Fix a couple of bugs with patterns. Move the setting of the document URL to before the style
- selector gets constructed so that pattern match testing gets the correct URL.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::begin):
- * page/UserContentURLPattern.cpp:
- (WebCore::UserContentURLPattern::parse):
-
-2009-09-29 Alexey Proskuryakov <ap@apple.com>
-
- Rubber-stamped by Brady Eidson.
-
- Assertion failure in http/tests/xmlhttprequest/failed-auth.html.
-
- I couldn't find out why this only started to happen now, but it was incorrect to check
- persistence of a credential returned by CredentialStorage::get() without checking that it
- was non-null. When there is no credential for the protection space in storage, get()
- returns a new object, and Credentil constructor doesn't initialize m_persistence.
-
- * platform/network/mac/ResourceHandleMac.mm:
- (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Moved the
- assertion after credential null check.
- (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Added the same persistence
- assertion, matching sync code (and CF one, as well).
-
-2009-09-29 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Darin Adler.
-
- Add an ASSERT for UTF8Encoding().isValid()
- https://bugs.webkit.org/show_bug.cgi?id=29908
-
- * platform/text/TextEncoding.cpp:
- (WebCore::UTF8Encoding):
-
-2009-09-29 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Jon Honeycutt.
-
- https://bugs.webkit.org/show_bug.cgi?id=29892
- Add support for whitelist patterns to control conditional injection of user scripts and
- user stylesheets.
-
- No new tests. Not testable until WebKit portion is added in followup patch.
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * dom/Document.cpp:
- (WebCore::Document::pageGroupUserSheets):
- * page/Frame.cpp:
- (WebCore::Frame::injectUserScriptsForWorld):
- * page/UserContentURLPattern.cpp: Added.
- (WebCore::UserContentURLPattern::matchesPatterns):
- (WebCore::UserContentURLPattern::parse):
- (WebCore::UserContentURLPattern::matches):
- (WebCore::UserContentURLPattern::matchesHost):
- (WebCore::MatchTester::MatchTester):
- (WebCore::MatchTester::testStringFinished):
- (WebCore::MatchTester::patternStringFinished):
- (WebCore::MatchTester::eatWildcard):
- (WebCore::MatchTester::eatSameChars):
- (WebCore::MatchTester::test):
- (WebCore::UserContentURLPattern::matchesPath):
- * page/UserContentURLPattern.h: Added.
- (WebCore::UserContentURLPattern::UserContentURLPattern):
- (WebCore::UserContentURLPattern::scheme):
- (WebCore::UserContentURLPattern::host):
- (WebCore::UserContentURLPattern::path):
- (WebCore::UserContentURLPattern::matchSubdomains):
-
-2009-09-29 Enrica Casucci <enrica@apple.com>
-
- Reviewed by Adele Peterson.
-
- Reproducible crash pressing return inside quoted content
- at WebCore::BreakBlockquoteCommand::doApply.
- <rdar://problem/7085453>
- In some case, like the one provided in the test case, m_downStreamEnd
- refers to a node that gets deleted when executing the DeleteSelectionCommand.
- We shouldn't use m_downStreamEnd to recalculate the new m_endPosition when
- pruning is needed, because it may be point to a node that has been deleted, but
- rather rely on removeNode in CompositeEditCommand to update m_endPosition correctly.
-
- Test: editing/selection/blockquote-crash.html
-
- * editing/BreakBlockquoteCommand.cpp:
- (WebCore::BreakBlockquoteCommand::doApply): Added check for invalid position
- to avoid dereferencing a null node pointer.
- * editing/DeleteSelectionCommand.cpp:
- (WebCore::DeleteSelectionCommand::mergeParagraphs): Don't reset m_endPosition
- using the value in m_downStreamEnd when it is necessary to prune the start block.
-
-2009-09-29 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Brady Eidson.
-
- Basic authentication credentials are not sent automatically to top resources
- https://bugs.webkit.org/show_bug.cgi?id=29901
-
- No new tests - I don't want to pollute root directory of http tests to check for this rather
- minor issue.
-
- * platform/network/CredentialStorage.cpp:
- (WebCore::CredentialStorage::set): Changed to always preserve leading slash.
- (WebCore::CredentialStorage::getDefaultAuthenticationCredential): Made breaking out of the
- loop more explicit.
-
-2009-09-29 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Oliver Hunt.
-
- Web Inspector REGRESSION(r47820-r47822): Profiles aren't
- added to the inspector unless the inspector is already open
- when the profile completes.
-
- https://bugs.webkit.org/show_bug.cgi?id=29897
-
- * inspector/front-end/ProfilesPanel.js:
- (WebInspector.ProfilesPanel.prototype._populateProfiles):
-
-2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Rubberstamped by David Hyatt.
-
- Fix to logic of earlier commit 48902.
-
- When merging two if's before committing, I forgot to invert the
- bool check.
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::ignoreHttpError):
-
-2009-09-29 Stephen White <senorblanco@chromium.org>
-
- Unreviewed, build fix.
-
- Fixing Chromium build, following r48884.
-
- [https://bugs.webkit.org/show_bug.cgi?id=29894]
-
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::handleEvent):
- * bindings/v8/V8AbstractEventListener.h:
- * bindings/v8/V8WorkerContextEventListener.cpp:
- (WebCore::V8WorkerContextEventListener::handleEvent):
- * bindings/v8/V8WorkerContextEventListener.h:
-
-2009-09-29 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Darin Adler.
-
- Follows HTML5's maxLength change in September 2009.
- - Change HTMLTextAreaElement.maxLength type to signed.
- - HTMLTextAreaElement.maxLength returns -1 if maxlength= attribute is missing.
- - HTMLTextAreaElement.maxLength and HTMLInputElement.maxLength
- throw INDEX_SIZE_ERR for setting negative values.
- https://bugs.webkit.org/show_bug.cgi?id=29796
-
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::setMaxLength):
- * html/HTMLInputElement.h:
- * html/HTMLInputElement.idl:
- * html/HTMLTextAreaElement.cpp:
- (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
- (WebCore::HTMLTextAreaElement::maxLength):
- (WebCore::HTMLTextAreaElement::setMaxLength):
- * html/HTMLTextAreaElement.h:
- * html/HTMLTextAreaElement.idl:
-
-2009-09-29 Dimitri Glazkov <dglazkov@chromium.org>
-
- No review, rolling out r48894, because review discussion was not complete.
- http://trac.webkit.org/changeset/48894
-
- * platform/sql/SQLiteTransaction.cpp:
- (WebCore::SQLiteTransaction::begin):
-
-2009-09-29 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Nikolas Zimmermann.
-
- SVG Filter feComposite implementation is missing
- [https://bugs.webkit.org/show_bug.cgi?id=28362]
-
- feComposite implementation for SVG.
-
- Test: svg/filters/feComposite.svg
-
- * platform/graphics/filters/FEComposite.cpp:
- (WebCore::arithmetic):
- (WebCore::FEComposite::apply):
-
-2009-09-29 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Starting all read-only transactions with an explicit BEGIN
- DEFERRED command instead of BEGIN, since some ports (chromium)
- might compile their own SQLite library and set BEGIN to BEGIN
- IMMEDIATE by default; which would result in a deadlock in case of
- two concurrent read-only transactions on the same DB, and would
- unnecessarily delay other potential transactions to the same DB.
-
- https://bugs.webkit.org/show_bug.cgi?id=29729
-
- * platform/sql/SQLiteTransaction.cpp:
- (WebCore::SQLiteTransaction::begin):
-
-2009-09-29 Kenneth Russell <kbr@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- Add support for run-time flag for 3D canvas
- https://bugs.webkit.org/show_bug.cgi?id=29826
-
- * html/HTMLCanvasElement.cpp:
- (WebCore::HTMLCanvasElement::getContext): Check page settings for
- experimental WebGL flag before returning 3D graphics context.
- * page/Settings.cpp:
- (WebCore::Settings::Settings): Initialize new flag to false.
- (WebCore::Settings::setExperimentalWebGLEnabled):
- * page/Settings.h: Set new flag.
- (WebCore::Settings::experimentalWebGLEnabled): Return new flag.
-
-2009-09-29 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Chromium needs to be able to override the way storage events are delivered - part 1
- https://bugs.webkit.org/show_bug.cgi?id=29889
-
- Chromium needs to be able to override the way storage events are delivered.
- This replaced https://bugs.webkit.org/show_bug.cgi?id=29257 because it'll be
- faster (no vtables and extra allocation) and somewhat cleaner (no dependency
- injection). This is necessary because Chromium needs to transport events across
- a process barrier and then dispatch them without use of a Frame*.
-
- This patch should be a no-op for all ports other than Chromium.
-
- * WebCore.gypi:
- * storage/StorageEventDispatcher.h: Added.
-
-2009-09-29 Oliver Hunt <oliver@apple.com>
-
- Reviewed by NOBODY (missed file).
-
- Adding file missed in previous commit.
-
- * manual-tests/gtk/resources/long_cell.cur: Copied from WebCore/dom/PositionCreationFunctions.h.
-
-2009-09-29 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Darin Fisher.
-
- [V8] Correct an issue with XMLHttpRequest attribute event listeners never being cleared.
- https://bugs.webkit.org/show_bug.cgi?id=29888
-
- Test: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html
-
- * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
- (WebCore::getEventListener): Added isAttribute parameter.
- (WebCore::ACCESSOR_SETTER): Made all event listener setters create attribute listeners.
- (WebCore::CALLBACK_FUNC_DECL): Made addEventListener create object listener.
-
-2009-09-22 Martin Robinson <martin.james.robinson@gmail.com>
-
- Reviewed by Eric Seidel.
-
- Fix corruption for non-square images.
-
- [GTK] REGRESSION: BitmapImage::getGdkPixbuf fails for non-square images
- https://bugs.webkit.org/show_bug.cgi?id=29654
-
- Added an additional manual-test for this issue to the existing Gtk
- cursor image test.
-
- * manual-tests/gtk/cursor-image.html:
- * manual-tests/gtk/resources/long_cell.cur: Added.
- * platform/graphics/gtk/ImageGtk.cpp:
- (WebCore::BitmapImage::getGdkPixbuf):
-
-2009-09-29 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Build fix - pass a proper ScriptExecutipnContext to getEventListenerHandlerBody()
-
- * bindings/js/ScriptEventListener.cpp:
- (WebCore::getEventListenerHandlerBody):
- * bindings/js/ScriptEventListener.h:
- * bindings/v8/ScriptEventListener.cpp:
- (WebCore::getEventListenerHandlerBody):
- * bindings/v8/ScriptEventListener.h:
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::buildObjectForEventListener):
-
-2009-09-29 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Ensure that we don't scroll lock to an anchor node after a
- user-initiated scroll, even if that scroll doesn't propagate
- all the way up to FrameView.
-
- Test: fast/events/node-event-anchor-lock.html
-
- * page/EventHandler.cpp: Call setFrameWasScrolledByUser() when a scroll is handled by a node rather than a frame.
- (WebCore::EventHandler::scrollOverflow):
- (WebCore::EventHandler::handleWheelEvent):
- (WebCore::EventHandler::sendScrollEvent): Use setFrameWasScrolledByUser();
- (WebCore::EventHandler::setFrameWasScrolledByUser): Split out of sendScrollEvent();
- (WebCore::EventHandler::passMousePressEventToScrollbar):
- * page/EventHandler.h: Declare setFrameWasScrolledByUser().
-
-2009-09-28 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler and Sam Weinig.
-
- Onclick not fired for an element copied with cloneContents() or cloneNode()
- https://bugs.webkit.org/show_bug.cgi?id=25130
-
- The change here is that JS event listeners don't keep a reference to a global object from
- where they were created, and instead take it as a parameter when parsing source code. Also,
- the listener creation won't fail just because it happens for an element in a frameless
- document.
- Thus, moving nodes between documents no longer results in having incorrect registered
- lazy event listeners on them.
-
- Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
- fast/events/attribute-listener-cloned-from-frameless-doc-context.html
- fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
- fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
- fast/events/attribute-listener-extracted-from-frameless-doc-context.html
-
- * bindings/js/JSEventListener.cpp:
- (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
- (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
- getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
- (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
- (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
- (WebCore::JSEventListener::reportError): Ditto.
-
- * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
- to JSDOMGlobalObject.
-
- * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
- creation was split between this function and ScriptEventListener; moved it here, as JS
- global object can be different now.
-
- * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
- which can not be determined at parsing time.
-
- * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
- for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
- expect that errors are logged at document parsing time, and because I don't know what other
- side effects moving it vould have.
-
- * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
- because JSC needs a global context here.
-
- * bindings/js/JSAbstractWorkerCustom.cpp:
- (WebCore::JSAbstractWorker::addEventListener):
- (WebCore::JSAbstractWorker::removeEventListener):
- * bindings/js/JSDOMApplicationCacheCustom.cpp:
- (WebCore::JSDOMApplicationCache::addEventListener):
- (WebCore::JSDOMApplicationCache::removeEventListener):
- * bindings/js/JSDOMGlobalObject.cpp:
- (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::addEventListener):
- (WebCore::JSDOMWindow::removeEventListener):
- * bindings/js/JSEventSourceCustom.cpp:
- (WebCore::JSEventSource::addEventListener):
- (WebCore::JSEventSource::removeEventListener):
- * bindings/js/JSMessagePortCustom.cpp:
- (WebCore::JSMessagePort::addEventListener):
- (WebCore::JSMessagePort::removeEventListener):
- * bindings/js/JSNodeCustom.cpp:
- (WebCore::JSNode::addEventListener):
- (WebCore::JSNode::removeEventListener):
- * bindings/js/JSSVGElementInstanceCustom.cpp:
- (WebCore::JSSVGElementInstance::addEventListener):
- (WebCore::JSSVGElementInstance::removeEventListener):
- * bindings/js/JSWorkerContextCustom.cpp:
- (WebCore::JSWorkerContext::addEventListener):
- (WebCore::JSWorkerContext::removeEventListener):
- * bindings/js/JSXMLHttpRequestCustom.cpp:
- (WebCore::JSXMLHttpRequest::addEventListener):
- (WebCore::JSXMLHttpRequest::removeEventListener):
- * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
- (WebCore::JSXMLHttpRequestUpload::addEventListener):
- (WebCore::JSXMLHttpRequestUpload::removeEventListener):
- * bindings/objc/ObjCEventListener.h:
- * bindings/objc/ObjCEventListener.mm:
- (WebCore::ObjCEventListener::handleEvent):
- * bindings/scripts/CodeGeneratorJS.pm:
- * dom/EventTarget.cpp:
- (WebCore::EventTarget::fireEventListeners):
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::handleEvent):
- * inspector/InspectorDOMAgent.h:
- * inspector/InspectorDOMStorageResource.cpp:
- (WebCore::InspectorDOMStorageResource::handleEvent):
- * inspector/InspectorDOMStorageResource.h:
- * loader/ImageDocument.cpp:
- (WebCore::ImageEventListener::handleEvent):
- * svg/animation/SVGSMILElement.cpp:
- (WebCore::ConditionEventListener::handleEvent):
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::reportException):
- Don't pass global object to JSEventListener::create(), which no longer needs it.
- Note that some of these functions still have an early return for null global object, which
- can probably be removed in a later patch.
- Pass ScriptExecutionContext to EventListener methods that now need it.
-
- * bindings/scripts/CodeGeneratorCOM.pm: Don't force EventTarget implementation on Node -
- it doesn't work yet (it didn't quite work before this patch, too, because it assumed that
- any object implementing EventTarget COM interface originated from WebCore).
-
- * dom/EventListener.idl: Just like in ObjC, EventListener should be a pure interface in
- COM bindings.
-
-2009-09-28 Geoffrey Garen <ggaren@apple.com>
-
- Reviewed by Sam Weinig.
-
- Removed virtual destructor from JSGlobalObjectData to eliminate pointer
- fix-ups when accessing JSGlobalObject::d.
-
- Replaced with an explicit destructor function pointer.
-
- * bindings/js/JSDOMGlobalObject.cpp:
- (WebCore::JSDOMGlobalObject::destroyJSDOMGlobalObjectData):
- * bindings/js/JSDOMGlobalObject.h:
- (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
-
-2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Hausmann.
-
- Don't rely on QNetworkReply::NetworkError codes, but
- on HTTP error codes instead.
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::ignoreHttpError):
- (WebCore::QNetworkReplyHandler::finish):
-
-2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Hausmann.
-
- Use const references when using Qt's foreach.
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
-
-2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Hausmann.
-
- Fix handling of QNetworkReply errors.
-
- In the QNetworkReplyHandler::finish() a response was sent even when
- the reply contained an error. This resulted in a sendResponseIfNeeded()
- calling didReceiveResponse on the client, leading to the destruction
- of the m_resourceHandle, discontinuing further processing in finish(),
- and thus not calling didFail on the client.
-
- Instead it continued as everything went fine, and
- FrameLoaderClientQt::dispatchDecidePolicyForMIMEType() changed the
- policy to PolicyDownload due to not being able to show the non existing
- MIMEType. As the download also obviously fails, it ended up with a
- policy change error.
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::finish):
-
-2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Hausmann.
-
- The code for showing error pages when the response was
- a 401/403/404, was not actually doing so. This patch
- fixes that.
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::finish):
-
-2009-09-28 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Brady Eidson.
-
- <rdar://problem/7259965> REGRESSION: http/tests/xmlhttprequest/cross-origin-authorization.html
- is failing/crashing intermittently
- https://bugs.webkit.org/show_bug.cgi?id=29322
-
- This was caused by CStringBuffer::encodeBase64() returning a buffer that wasn't zero terminated.
- The code had other issues as well, so I removed it altogether:
- - it claimed to avoid some buffer copies, but it didn't;
- - and I don't think that base64 encoding should be part of CString interface.
-
- * platform/network/mac/ResourceHandleMac.mm:
- (WebCore::encodeBasicAuthorization): Encode username and password using Base64.h directly.
- (WebCore::ResourceHandle::start): Use encodeBasicAuthorization().
- (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]): Ditto.
- (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): Extended logging
- to synchronous case.
- (-[WebCoreSynchronousLoader connectionShouldUseCredentialStorage:]): Ditto.
- (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Ditto.
- (-[WebCoreSynchronousLoader connection:didReceiveResponse:]): Ditto.
- (-[WebCoreSynchronousLoader connection:didReceiveData:]): Ditto.
- (-[WebCoreSynchronousLoader connectionDidFinishLoading:]): Ditto.
- (-[WebCoreSynchronousLoader connection:didFailWithError:]): Ditto.
-
- * platform/network/cf/ResourceHandleCFNet.cpp: Matched Mac changes.
-
- * platform/text/CString.cpp:
- * platform/text/CString.h:
- (WebCore::CStringBuffer::create):
- (WebCore::CStringBuffer::CStringBuffer):
- Removed code that was added for Base64 in r48363.
-
-2009-09-29 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Fix typo in Localizations.cpp
-
- https://bugs.webkit.org/show_bug.cgi?id=29872
-
- * platform/qt/Localizations.cpp:
- (WebCore::localizedMediaControlElementHelpText):
-
-2009-09-29 Simon Hausmann <simon.hausmann@nokia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- Make the XSLT conditional in DOMWindow.idl's xsltProcessor
- attribute conditional in the generated files, similar to
- r44116.
-
- * page/DOMWindow.idl:
-
-2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Hausmann and Tor Arne Vestbø.
-
- Use the ResourceError as it is supposed to and handle
- not HTTP errors from QNetworkReply.
-
- Thanks to Adam Roben for his input.
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::finish):
-
-2009-09-29 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Encapsulate JS listeners specifics into ScriptEventListener.
-
- https://bugs.webkit.org/show_bug.cgi?id=29816
-
- * bindings/js/ScriptEventListener.cpp:
- (WebCore::getEventListenerHandlerBody):
- * bindings/js/ScriptEventListener.h:
- * bindings/v8/ScriptEventListener.cpp:
- (WebCore::getEventListenerHandlerBody):
- * bindings/v8/ScriptEventListener.h:
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::buildObjectForEventListener):
-
-2009-09-29 Xan Lopez <xlopez@igalia.com>
-
- Unreviewed attempt to fix the build.
-
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
-
-2009-09-28 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Add experimentalWebSocketsEnabled in Settings.
- https://bugs.webkit.org/show_bug.cgi?id=28941
-
- * WebCore.base.exp:
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::webSocket):
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getConstructor):
- * bindings/v8/custom/V8WebSocketCustom.cpp:
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
- (WebCore::Settings::setExperimentalWebSocketsEnabled):
- * page/Settings.h:
- (WebCore::Settings::experimentalWebSocketsEnabled):
-
-2009-09-11 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Adam Barth.
-
- Add platform code to support WebSocket for chromium.
- https://bugs.webkit.org/show_bug.cgi?id=29171
-
- To build within chromium tree, it requires a patch in bug 29174.
- Real implementation will be landed in chromium tree.
-
- * WebCore.gypi:
- * platform/network/chromium/SocketStreamError.h: Added.
- (WebCore::SocketStreamError::SocketStreamError):
- * platform/network/chromium/SocketStreamHandle.h: Added.
- (WebCore::SocketStreamHandle::create):
-
-2009-09-28 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Sam Weinig.
-
- <rdar://problem/7157288> Crash in RenderStyle::computedLineHeight()
- when Times New Roman is not installed
-
- * platform/graphics/win/FontCacheWin.cpp:
- (WebCore::FontCache::getLastResortFallbackFont): If Times New Roman is
- not available, use the Windows default GUI font.
-
-2009-09-28 Jian Li <jianli@chromium.org>
-
- Reviewed by David Levin.
-
- Do not add platform-specific methods to cross-platform header
- FileSystem.h per Darin's feedback for 29109.
- https://bugs.webkit.org/show_bug.cgi?id=29830
-
- * platform/FileSystem.h:
- * platform/chromium/DragDataChromium.cpp:
- (WebCore::DragData::asURL):
- * platform/chromium/FileSystemChromium.cpp:
-
-2009-09-28 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Register Chromium's VFSs with a proper sqlite3_io_methods
- finder. This should only affect the POSIX implementation. The
- Windows change is included for consistency and in case sqlite
- starts using something similar in its Windows VFS in the future.
-
- https://bugs.webkit.org/show_bug.cgi?id=29743
-
- * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
- (WebCore::SQLiteFileSystem::registerSQLiteVFS):
- * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
- (WebCore::SQLiteFileSystem::registerSQLiteVFS):
-
-2009-09-28 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Adam Barth.
-
- Change the V8 bindings' handling of window.toString(),
- so we return [object DOMWindow] (like JSC), not [object global].
-
- https://bugs.webkit.org/show_bug.cgi?id=29742
-
- This will fix a couple of Chromium port test failures and enable us to
- use the default expectations for a bunch more.
-
- * bindings/v8/custom/V8DOMWindowCustom.cpp: Use the DOMWindow wrapper instead
- of the global object wrapper when it's available in the DOMWindow toString callback.
-
-2009-09-28 Nate Chapin <japhet@chromium.org>
-
- Rubber stamped by David Levin.
-
- Chromium build fix, add back in #include of V8Proxy.h in V8WebKitPointConstructor.cpp.
-
- * bindings/v8/custom/V8WebKitPointConstructor.cpp: Re-include V8Proxy.h.
-
-2009-09-28 Geoffrey Garen <ggaren@apple.com>
-
- Reviewed by Darin Adler.
-
- NotNullPassRefPtr: smart pointer optimized for passing references that are not null
- https://bugs.webkit.org/show_bug.cgi?id=29822
-
- Added NotNullPassRefPtr, and deployed it in all places that initialize
- JavaScript objects.
-
- * bindings/js/DOMObjectWithSVGContext.h:
- (WebCore::DOMObjectWithSVGContext::DOMObjectWithSVGContext):
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::cacheDOMStructure):
- * bindings/js/JSDOMBinding.h:
- (WebCore::DOMObject::DOMObject):
- (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
- (WebCore::DOMConstructorObject::DOMConstructorObject):
- (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
- * bindings/js/JSDOMGlobalObject.cpp:
- (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
- * bindings/js/JSDOMGlobalObject.h:
- * bindings/js/JSDOMWindowBase.cpp:
- (WebCore::JSDOMWindowBase::JSDOMWindowBase):
- * bindings/js/JSDOMWindowBase.h:
- * bindings/js/JSHTMLAllCollection.h:
- (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
- * bindings/js/JSInspectedObjectWrapper.cpp:
- (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper):
- * bindings/js/JSInspectedObjectWrapper.h:
- * bindings/js/JSInspectorCallbackWrapper.cpp:
- (WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper):
- * bindings/js/JSInspectorCallbackWrapper.h:
- * bindings/js/JSQuarantinedObjectWrapper.cpp:
- (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper):
- * bindings/js/JSQuarantinedObjectWrapper.h:
- * bindings/js/JSWorkerContextBase.cpp:
- (WebCore::JSWorkerContextBase::JSWorkerContextBase):
- * bindings/js/JSWorkerContextBase.h:
- * bindings/scripts/CodeGeneratorJS.pm:
- * bridge/runtime_object.cpp:
- (JSC::RuntimeObjectImp::RuntimeObjectImp):
- * bridge/runtime_object.h:
-
-2009-09-28 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Allow V8 to handle x/y parameters in a WebKitPoint constructor.
- https://bugs.webkit.org/show_bug.cgi?id=29823
-
- Fixes V8's handling of LayoutTests/fast/dom/Window/webkitConvertPoint.html
-
- * bindings/v8/custom/V8WebKitPointConstructor.cpp: Allow for x/y parameters in constructor.
-
-2009-09-28 Mark Rowe <mrowe@apple.com>
-
- Fix the build by doing something approximating reasonableness in the Xcode project.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-09-28 Simon Hausmann <hausmann@webkit.org>
-
- Prospective Tiger build fix.
-
- * WebCore.xcodeproj/project.pbxproj: Try to use unique IDs for the new files.
-
-2009-09-28 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Add explicit frontend event for commit load.
-
- https://bugs.webkit.org/show_bug.cgi?id=29814
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::didCommitLoad):
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::didCommitLoad):
- * inspector/InspectorFrontend.h:
- * inspector/front-end/DOMAgent.js:
- (WebInspector.DOMAgent.prototype._setDocument):
- * inspector/front-end/inspector.js:
- (WebInspector.addResource):
- (WebInspector.didCommitLoad):
-
-2009-09-28 Yaar Schnitman <yaar@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Chromium port - recognize we are being built independently
- of chromium and look for dependencies under webkit/chromium rather
- than chromium/src.
-
- https://bugs.webkit.org/show_bug.cgi?id=29722
-
- * WebCore.gyp/WebCore.gyp: See above. Also removed a few files from
- the sources list, since they are not supposed to be built here.
-
-2009-09-28 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Implement XSLT support with QtXmlPatterns.
- https://bugs.webkit.org/show_bug.cgi?id=28303
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCoreSources.bkl:
- * dom/Document.cpp:
- (WebCore::Document::Document):
- (WebCore::Document::~Document):
- (WebCore::Document::setTransformSource):
- * dom/Document.h:
- (WebCore::Document::transformSource):
- * dom/TransformSource.h: Added.
- (WebCore::TransformSource::platformSource):
- * dom/TransformSourceLibxslt.cpp: Added.
- (WebCore::TransformSource::TransformSource): Wraps a libxml2 document.
- (WebCore::TransformSource::~TransformSource):
- * dom/TransformSourceQt.cpp: Added.
- (WebCore::TransformSource::TransformSource): Wraps a plain string.
- (WebCore::TransformSource::~TransformSource):
- * dom/XMLTokenizerLibxml2.cpp:
- (WebCore::XMLTokenizer::doEnd):
- * dom/XMLTokenizerQt.cpp:
- (WebCore::XMLTokenizer::doEnd):
- (WebCore::XMLTokenizer::parseProcessingInstruction):
- * xml/XSLStyleSheet.h:
- (WebCore::XSLStyleSheet::sheetString):
- * xml/XSLStyleSheetLibxslt.cpp:
- (WebCore::XSLStyleSheet::document):
- * xml/XSLStyleSheetQt.cpp: Added.
- * xml/XSLTProcessor.h:
- * xml/XSLTProcessorLibxslt.cpp:
- (WebCore::xmlDocPtrFromNode):
- * xml/XSLTProcessorQt.cpp: Added.
- (WebCore::XSLTMessageHandler::XSLTMessageHandler): A subclass of QAbstractMessageHandler.
- (WebCore::XSLTMessageHandler::handleMessage): Forwards all processor messages to the Console.
- (WebCore::XSLTProcessor::transformToString): Uses QXmlQuery.
-
-2009-09-28 Andrew Scherkus <scherkus@chromium.org>
-
- Reviewed by Eric Carlson.
-
- Delegate implementation of rendererIsNeeded() for media control elements to RenderTheme.
-
- https://bugs.webkit.org/show_bug.cgi?id=28689
-
- Covered by LayoutTests/media/video-no-audio.html
-
- * rendering/MediaControlElements.cpp: Removed subclass implementations of rendererIsNeeded().
- (WebCore::MediaControlElement::rendererIsNeeded): Include calling shouldRenderMediaControlPart().
- (WebCore::MediaControlInputElement::rendererIsNeeded): Include calling shouldRenderMediaControlPart().
- * rendering/MediaControlElements.h:
- * rendering/RenderTheme.cpp:
- (WebCore::RenderTheme::shouldRenderMediaControlPart): New method. Contains logic moved from subclass implementations of rendererIsNeeded().
- * rendering/RenderTheme.h:
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::shouldRenderMediaControlPart): Override to always render mute button.
- * rendering/RenderThemeChromiumSkia.h:
-
-2009-09-28 Jian Li <jianli@chromium.org>
-
- Reviewed by David Levin.
-
- [chromium] DragData::asURL should return file URL.
- https://bugs.webkit.org/show_bug.cgi?id=29109
-
- Tested by LayoutTests/fast/events/drag-to-navigate.html.
-
- * platform/FileSystem.h:
- * platform/chromium/ChromiumBridge.h:
- * platform/chromium/DragDataChromium.cpp:
- (WebCore::DragData::asURL):
- * platform/chromium/FileSystemChromium.cpp:
- (WebCore::getAbsolutePath):
- (WebCore::isDirectory):
- (WebCore::filePathToURL):
-
-2009-09-28 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by David Levin.
-
- [V8] Add a special case to handle index arguments, because we need to be
- able to see if they're < 0.
- https://bugs.webkit.org/show_bug.cgi?id=29810
-
- Test: LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative.html
-
- * bindings/scripts/CodeGeneratorV8.pm: Added special case (matching CodeGeneratorJS.pm)
- for index arguments.
-
-2009-09-28 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Darin Adler.
-
- Extend the MediaWiki/KHTMLFixes.css workaround to cover older MediaWiki versions
- https://bugs.webkit.org/show_bug.cgi?id=29792
-
- * html/HTMLLinkElement.cpp:
- (WebCore::HTMLLinkElement::setCSSStyleSheet): If site specific hacks are
- enabled, check if the linked style sheet is one of two versions of the
- MediaWiki KHTMLFixes.css. If so, remove the offending rule.
-
-2009-09-28 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Adam Barth.
-
- [V8] Fix an error in type logic in CodeGeneratorV8.pm, where
- unsigned ints are accidentally used as signed.
- https://bugs.webkit.org/show_bug.cgi?id=29810
-
- Test: LayoutTests/fast/forms/textarea-maxlength.html
-
- * bindings/scripts/CodeGeneratorV8.pm: Made sure "unsigned long" in IDL is
- properly generates on "unsigned" return value.
-
-2009-09-28 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Simon Hausmann.
-
- Rename XSLStyleSheet.cpp to XSLStyleSheetLibxslt.cpp.
- https://bugs.webkit.org/show_bug.cgi?id=28303
-
- In preparation for adding XSLT support with QtXmlPatterns to the Qt
- port, rename XSLStyleSheet.cpp to XSLStyleSheetLibxslt.cpp as we will
- have our own implementation which most likely will not share any code
- with the current one.
-
- Additionally, fix some coding style issues.
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * xml/XSLStyleSheet.cpp: Renamed to XSLStyleSheetLibxslt.cpp.
- * xml/XSLStyleSheetLibxslt.cpp: Added.
-
-2009-09-28 Simon Hausmann <simon.hausmann@nokia.com>
-
- Prospective build fix for r48812.
-
- Forgot to remove the inline reset() implementation when reverting the indentation
- changes in the file.
-
- * xml/XSLTProcessor.h:
-
-2009-09-28 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by nobody (trivial follow up fix), Joseph Pecoraro LGTM-ed.
-
- Web Inspector: Follow up to r48809.
- InspectorController.wrapObject should only be called on the inspectable page side.
-
- https://bugs.webkit.org/show_bug.cgi?id=17429
-
- * inspector/front-end/EventListenersSidebarPane.js:
- (WebInspector.EventListenersSidebarPane.prototype.update.callback):
- (WebInspector.EventListenersSidebarPane.prototype.update):
- (WebInspector.EventListenersSection):
- (WebInspector.EventListenersSection.prototype.update):
- (WebInspector.EventListenerBar):
- (WebInspector.EventListenerBar.prototype.update):
-
-2009-09-28 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Simon Hausmann.
-
- Move the libxslt specific part of XSLTProcessor to a separate file.
- https://bugs.webkit.org/show_bug.cgi?id=28303
-
- In preparation for adding XSLT support with QtXmlPatterns to the Qt
- port, move the libxslt part of the XSLTProcessor implementation into
- another file and leave the part that can be reused and shared.
-
- Additionally, fix some coding style issues.
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * xml/XSLTProcessor.cpp:
- (WebCore::XSLTProcessor::createDocumentFromSource): Remove trailing whitespaces.
- (WebCore::createFragmentFromSource): Remove trailing whitespaces.
- (WebCore::XSLTProcessor::transformToFragment): Remove trailing whitespaces.
- (WebCore::XSLTProcessor::reset): Moved out of the class definition.
- * xml/XSLTProcessorLibxslt.cpp: Added.
- (WebCore::XSLTProcessor::genericErrorFunc): Moved.
- (WebCore::XSLTProcessor::parseErrorFunc): Moved.
- (WebCore::docLoaderFunc): Moved.
- (WebCore::setXSLTLoadCallBack): Moved.
- (WebCore::writeToVector): Moved.
- (WebCore::saveResultToString): Moved.
- (WebCore::xsltParamArrayFromParameterMap): Moved.
- (WebCore::freeXsltParamArray): Moved.
- (WebCore::xsltStylesheetPointer): Moved.
- (WebCore::xmlDocPtrFromNode): Moved.
- (WebCore::resultMIMEType): Moved.
- (WebCore::XSLTProcessor::transformToString): Moved.
-
-2009-09-28 Charles Wei <charles.wei@torchmobile.com.cn>
-
- Reviewed by Nikolas Zimmermann.
-
- Fix the crash of SVG that crashes when use a non-exist symbol
- https://bugs.webkit.org/show_bug.cgi?id=27693
-
- Test: svg/custom/use-non-existing-symbol-crash.svg
-
- * svg/SVGUseElement.cpp:
- (WebCore::shadowTreeContainsChangedNodes):
-
-2009-09-28 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Inspector Should Show Event Listeners/Handlers Registered on each Node
- https://bugs.webkit.org/show_bug.cgi?id=17429
-
- Extracted a method from dispatchEvent to get the event ancestor chain
-
- * dom/Node.cpp:
- (WebCore::Node::eventAncestors): the extracted method
- (WebCore::Node::dispatchGenericEvent): use eventAncestors
- * dom/Node.h:
-
- Asynchronous Flow For the Inspector, Backend -> DOM Agent -> Frontend
- The DOMAgent's getEventListenersForNode handles the logic of finding
- all the relevant listeners in the event flow.
-
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::getEventListenersForNode):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::getEventListenersForNode):
- (WebCore::InspectorDOMAgent::buildObjectForEventListener):
- (WebCore::InspectorDOMAgent::buildObjectForNode): added localName
- * inspector/InspectorDOMAgent.h:
- (WebCore::EventListenerInfo::EventListenerInfo):
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::didGetEventListenersForNode):
- * inspector/InspectorFrontend.h:
- (WebCore::InspectorFrontend::scriptState):
- * inspector/front-end/DOMAgent.js: added localName to WebInspector.DOMNode from payload
- (WebInspector.EventListeners.getEventListenersForNodeAsync.mycallback):
- (WebInspector.EventListeners.getEventListenersForNodeAsync):
-
- New Sidebar Pane in the Element's Panel
- Includes Gear Menu for filtering the Event Listeners on the
- "Selected Node Only" or "All Nodes"
-
- * inspector/front-end/ElementsPanel.js: Handles refreshing the Pane when necessary
- (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
- (WebInspector.ElementsPanel):
- (WebInspector.ElementsPanel.prototype.updateEventListeners):
- * inspector/front-end/EventListenersSidebarPane.js: Added.
- (WebInspector.EventListenersSidebarPane): The 1st level in the Pane
- (WebInspector.EventListenersSidebarPane.prototype.update.callback):
- (WebInspector.EventListenersSidebarPane.prototype.update):
- (WebInspector.EventListenersSection): The 2nd level in the Pane
- (WebInspector.EventListenersSection.prototype.update): filters on Preference
- (WebInspector.EventListenersSection.prototype.addListener):
- (WebInspector.EventListenerBar): The 3rd level in the Pane
- (WebInspector.EventListenerBar.prototype._getNodeDisplayName):
- (WebInspector.EventListenerBar.prototype._getFunctionDisplayName):
- (WebInspector.EventListenersSidebarPane.prototype._changeSetting): For the Gear Menu
-
- Consolidated "appropriateSelectorForNode"
-
- * inspector/front-end/StylesSidebarPane.js:
- * inspector/front-end/utilities.js:
-
- Miscellaneous Updates
-
- * English.lproj/localizedStrings.js: "Event Listeners", "No Event Listeners", "Selected Node Only", "All Nodes"
- * WebCore.gypi: included the new inspector files
- * WebCore.vcproj/WebCore.vcproj: included source files that were missing
- * inspector/front-end/Images/grayConnectorPoint.png: Added. Thanks to Timothy Hatcher.
- * inspector/front-end/Images/whiteConnectorPoint.png: Added. Thanks to Timothy Hatcher.
- * inspector/front-end/inspector.js: Preferences for the Gear Menu Event Listeners filter
- * inspector/front-end/inspector.css: reused as much as possible
- * inspector/front-end/inspector.html: include the new script
- * inspector/front-end/WebKit.qrc: included the new inspector files
-
-2009-09-27 Sam Weinig <sam@webkit.org>
-
- Reviewed by Dan Bernstein.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=29760
- Implement CSSOM Range.getClientRects/getBoundingClientRect
-
- Tests: fast/dom/Range/getBoundingClientRect-getClientRects-relative-to-viewport.html
- fast/dom/Range/getBoundingClientRect.html
- fast/dom/Range/getClientRects.html
-
- * dom/Range.cpp:
- (WebCore::Range::getClientRects):
- (WebCore::Range::getBoundingClientRect):
- (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoom):
- (WebCore::Range::getBorderAndTextQuads):
- * dom/Range.h:
- * dom/Range.idl:
- Implement Range.getClientRects/getBoundingClientRect.
-
- * dom/Element.cpp:
- * rendering/RenderObject.h:
- (WebCore::adjustForAbsoluteZoom):
- (WebCore::adjustIntRectForAbsoluteZoom):
- (WebCore::adjustFloatPointForAbsoluteZoom):
- (WebCore::adjustFloatQuadForAbsoluteZoom):
- Move point/quad adjustment methods from Element.cpp to RenderObject.h
- so that Range.cpp can use them as well.
-
-2009-09-27 Simon Hausmann <hausmann@webkit.org>
-
- Unreviewed fix for WebInspector with Qt build.
-
- Simply re-generate the Qt resource file by running
- WebKitTools/Scripts/generate-qt-inspector-resource
-
- * inspector/front-end/WebKit.qrc:
-
-2009-09-27 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by nobody (trivial ChangeLog fix).
-
- Restore WebCore/ChangeLog truncated in r48778.
-
-2009-09-27 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: DOM store is being unbound twice, leading to assertion failure.
-
- https://bugs.webkit.org/show_bug.cgi?id=29770
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::didOpenDatabase):
- (WebCore::InspectorController::didUseDOMStorage):
- * inspector/InspectorDOMStorageResource.cpp:
- (WebCore::InspectorDOMStorageResource::unbind):
-
-2009-09-26 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Do not track DOM changes while inspector window is closed.
-
- https://bugs.webkit.org/show_bug.cgi?id=29769
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
- (WebCore::InspectorController::populateScriptObjects):
- (WebCore::InspectorController::resetScriptObjects):
- (WebCore::InspectorController::didCommitLoad):
- * inspector/InspectorController.h:
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::setDocument):
- * inspector/InspectorDOMAgent.h:
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::dispatchWindowObjectAvailable):
- * page/android/InspectorControllerAndroid.cpp:
- (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
-
-2009-09-26 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: [REGRESSION] Double Clicking Resources Fails to Open in New Window
-
- https://bugs.webkit.org/show_bug.cgi?id=29762
-
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.setStyleText):
- (InjectedScript.openInInspectedWindow):
- * inspector/front-end/InjectedScriptAccess.js:
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
-
-2009-09-26 David Kilzer <ddkilzer@apple.com>
-
- Part 2 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
-
- Reviewed by Darin Adler.
-
- Fix ENABLE_ORIENTATION_EVENTS for non-Mac platforms.
-
- * DerivedSources.make: Moved Platform.h check for
- ENABLE_ORIENTATION_EVENTS into Mac-only section and added
- default of ENABLE_ORIENTATION_EVENTS = 0 to non-Mac section.
- Added ifndef test to make it possible to override both
- ENABLE_DASHBOARD_SUPPORT and ENABLE_ORIENTATION_EVENTS external
- to the makefile. Moved addition of ENABLE_ORIENTATION_EVENTS to
- ADDITIONAL_IDL_DEFINES to common section.
- * GNUmakefile.am: Added support for ENABLE_ORIENTATION_EVENTS if
- it is ever used.
- * WebCore.pro: Ditto.
-
-2009-09-26 Kent Tamura <tkent@chromium.org>
-
- Reviewed by David Kilzer.
-
- Move placeholder-related code to HTMLTextFormControlElement from
- HTMLInputElement, WMLInputElement, InputElement, and
- HTMLTextAreaElement.
- https://bugs.webkit.org/show_bug.cgi?id=28703
-
- * dom/InputElement.cpp:
- (WebCore::InputElement::dispatchFocusEvent):
- (WebCore::InputElement::dispatchBlurEvent):
- (WebCore::InputElement::setValueFromRenderer):
- * dom/InputElement.h:
- * html/HTMLFormControlElement.cpp:
- (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):
- (WebCore::HTMLTextFormControlElement::~HTMLTextFormControlElement):
- (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
- (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
- (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
- (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
- * html/HTMLFormControlElement.h:
- (WebCore::HTMLTextFormControlElement::handleFocusEvent):
- (WebCore::HTMLTextFormControlElement::handleBlurEvent):
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::HTMLInputElement):
- (WebCore::HTMLInputElement::handleFocusEvent):
- (WebCore::HTMLInputElement::handleBlurEvent):
- (WebCore::HTMLInputElement::parseMappedAttribute):
- (WebCore::HTMLInputElement::createRenderer):
- (WebCore::HTMLInputElement::setValue):
- (WebCore::HTMLInputElement::setValueFromRenderer):
- * html/HTMLInputElement.h:
- (WebCore::HTMLInputElement::supportsPlaceholder):
- (WebCore::HTMLInputElement::isEmptyValue):
- * html/HTMLIsIndexElement.cpp:
- (WebCore::HTMLIsIndexElement::parseMappedAttribute):
- * html/HTMLTextAreaElement.cpp:
- (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
- (WebCore::HTMLTextAreaElement::createRenderer):
- * html/HTMLTextAreaElement.h:
- (WebCore::HTMLTextAreaElement::supportsPlaceholder):
- (WebCore::HTMLTextAreaElement::isEmptyValue):
- * rendering/RenderTextControl.cpp:
- (WebCore::RenderTextControl::RenderTextControl):
- * rendering/RenderTextControl.h:
- * rendering/RenderTextControlMultiLine.cpp:
- (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
- * rendering/RenderTextControlMultiLine.h:
- * rendering/RenderTextControlSingleLine.cpp:
- (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
- (WebCore::RenderTextControlSingleLine::updateFromElement):
- * rendering/RenderTextControlSingleLine.h:
- * wml/WMLInputElement.cpp:
- (WebCore::WMLInputElement::setValue):
- (WebCore::WMLInputElement::createRenderer):
- * wml/WMLInputElement.h:
-
-2009-09-26 Shu Chang <Chang.Shu@nokia.com>
-
- Reviewed by Alexey Proskuryakov.
-
- Optimize the code so only the text from start to end is scanned.
- https://bugs.webkit.org/show_bug.cgi?id=29092
-
- On a platform with webkit+Qt+Symbian, the parsing time for a 600K text
- file improved from 400ms to 40ms (10x faster).
-
- * dom/Text.cpp:
- (WebCore::Text::createWithLengthLimit):
-
-2009-09-26 Xiaomei Ji <xji@chromium.org>
-
- Reviewed by Eric Seidel.
-
- This Patch fixes [chromium] the drop-down is always left-aligned even
- for RTL element.
- https://bugs.webkit.org/show_bug.cgi?id=29612
-
- For auto-complete, the items in drop-down should be right-aligned if
- the directionality of <input> field is RTL.
- For <select><option>, the items in drop-down should be right-aligned
- if the directionality of <select> is RTL.
-
- No automatic test is possible. Manual tests are added.
-
- * manual-tests/autofill_alignment.html: Added.
- * manual-tests/select_alignment.html: Added.
- * platform/chromium/PopupMenuChromium.cpp:
- (WebCore::PopupListBox::paintRow): Adjust the starting x-axis of text to
- be paint if it should be right-aligned.
-
-2009-09-25 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Sam Weinig.
-
- REGRESSION (r48775) FontList.plist written by TOT WebKit causes Safari 4
- to crash on launch
- https://bugs.webkit.org/show_bug.cgi?id=29759
-
- * platform/graphics/win/FontDatabase.cpp:
- (WebCore::writeFontDatabaseToPlist): Reverted to saving the CG font DB
- property list at the root of FontList.plist, but with an additional
- key for the last value of the Fonts registry key.
- (WebCore::populateFontDatabase): Pass the FontList.plist in its entirety
- to populatFontDatabaseFromPlist.
-
-2009-09-25 Kevin Ollivier <kevino@theolliviers.com>
-
- Build fix. Adding missing header files.
-
- * bindings/js/JSNamedNodeMapCustom.cpp:
-
-2009-09-25 David Kilzer <ddkilzer@apple.com>
-
- Part 1 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
-
- Reviewed by Darin Adler.
-
- * DerivedSources.make: Move tests for ENABLE_CONTEXT_MENUS,
- ENABLE_DRAG_SUPPORT and ENABLE_INSPECTOR into Mac-only section.
-
-2009-09-25 Adam Barth <abarth@webkit.org>
-
- Reviewed by Darin Adler.
-
- Load blocks during unload should not affect targeted loads
- https://bugs.webkit.org/show_bug.cgi?id=29747
-
- Move the check of the unload state after checking for targeted links.
-
- Test: fast/loader/unload-hyperlink-targeted.html
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::loadURL):
-
-2009-09-25 Kenneth Russell <kbr@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- [Chromium] Add initial V8 bindings for WebGL
- https://bugs.webkit.org/show_bug.cgi?id=29664
-
- * WebCore.gypi:
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/DOMObjectsInclude.h:
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getTemplate):
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
- * bindings/v8/custom/V8CanvasArrayBufferCustom.cpp: Added.
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8CanvasArrayCustom.h: Added.
- (WebCore::constructCanvasArray):
- * bindings/v8/custom/V8CanvasByteArrayCustom.cpp: Added.
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8CanvasFloatArrayCustom.cpp: Added.
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8CanvasIntArrayCustom.cpp: Added.
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8CanvasRenderingContext3DCustom.cpp: Added.
- (WebCore::jsArrayToFloatArray):
- (WebCore::jsArrayToIntArray):
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::):
- (WebCore::vertexAttribAndUniformHelperf):
- (WebCore::uniformHelperi):
- (WebCore::uniformMatrixHelper):
- * bindings/v8/custom/V8CanvasShortArrayCustom.cpp: Added.
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8CanvasUnsignedByteArrayCustom.cpp: Added.
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8CanvasUnsignedIntArrayCustom.cpp: Added.
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8CanvasUnsignedShortArrayCustom.cpp: Added.
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8DocumentCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * platform/graphics/GraphicsContext3D.h:
-
-2009-09-25 Jeremy Orlow <jorlow@chromium.org>
-
- This is breaking Chromium try bots, so I'm counting this as a build fix.
-
- Add more svn:ignore exceptions. On different platforms, these files are
- generated with different case for WebCore.
-
- * WebCore.gyp: Changed property svn:ignore.
-
-2009-09-25 Alexey Proskuryakov <ap@apple.com>
-
- Reverting r48767, as it broke Windows build in a non-trivial way.
-
- * bindings/js/JSAbstractWorkerCustom.cpp:
- (WebCore::JSAbstractWorker::addEventListener):
- (WebCore::JSAbstractWorker::removeEventListener):
- * bindings/js/JSDOMApplicationCacheCustom.cpp:
- (WebCore::JSDOMApplicationCache::addEventListener):
- (WebCore::JSDOMApplicationCache::removeEventListener):
- * bindings/js/JSDOMGlobalObject.cpp:
- (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::addEventListener):
- (WebCore::JSDOMWindow::removeEventListener):
- * bindings/js/JSEventListener.cpp:
- (WebCore::JSEventListener::JSEventListener):
- (WebCore::JSEventListener::jsFunction):
- (WebCore::JSEventListener::markJSFunction):
- (WebCore::JSEventListener::handleEvent):
- (WebCore::JSEventListener::reportError):
- * bindings/js/JSEventListener.h:
- (WebCore::JSEventListener::create):
- * bindings/js/JSEventSourceCustom.cpp:
- (WebCore::JSEventSource::addEventListener):
- (WebCore::JSEventSource::removeEventListener):
- * bindings/js/JSLazyEventListener.cpp:
- (WebCore::JSLazyEventListener::JSLazyEventListener):
- (WebCore::JSLazyEventListener::jsFunction):
- (WebCore::JSLazyEventListener::parseCode):
- * bindings/js/JSLazyEventListener.h:
- (WebCore::JSLazyEventListener::create):
- * bindings/js/JSMessagePortCustom.cpp:
- (WebCore::JSMessagePort::addEventListener):
- (WebCore::JSMessagePort::removeEventListener):
- * bindings/js/JSNodeCustom.cpp:
- (WebCore::JSNode::addEventListener):
- (WebCore::JSNode::removeEventListener):
- * bindings/js/JSSVGElementInstanceCustom.cpp:
- (WebCore::JSSVGElementInstance::addEventListener):
- (WebCore::JSSVGElementInstance::removeEventListener):
- * bindings/js/JSWorkerContextCustom.cpp:
- (WebCore::JSWorkerContext::addEventListener):
- (WebCore::JSWorkerContext::removeEventListener):
- * bindings/js/JSXMLHttpRequestCustom.cpp:
- (WebCore::JSXMLHttpRequest::addEventListener):
- (WebCore::JSXMLHttpRequest::removeEventListener):
- * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
- (WebCore::JSXMLHttpRequestUpload::addEventListener):
- (WebCore::JSXMLHttpRequestUpload::removeEventListener):
- * bindings/js/ScriptEventListener.cpp:
- (WebCore::createAttributeEventListener):
- * bindings/objc/ObjCEventListener.h:
- * bindings/objc/ObjCEventListener.mm:
- (WebCore::ObjCEventListener::handleEvent):
- * bindings/scripts/CodeGeneratorJS.pm:
- * dom/EventListener.h:
- (WebCore::EventListener::reportError):
- (WebCore::EventListener::jsFunction):
- * dom/EventTarget.cpp:
- (WebCore::EventTarget::fireEventListeners):
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::handleEvent):
- * inspector/InspectorDOMAgent.h:
- * inspector/InspectorDOMStorageResource.cpp:
- (WebCore::InspectorDOMStorageResource::handleEvent):
- * inspector/InspectorDOMStorageResource.h:
- * loader/ImageDocument.cpp:
- (WebCore::ImageEventListener::handleEvent):
- * svg/animation/SVGSMILElement.cpp:
- (WebCore::ConditionEventListener::handleEvent):
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::reportException):
-
-2009-09-24 Tony Chang <tony@chromium.org>
-
- Reviewed by David Levin.
-
- Add a gyp variable to allow building a debug webcore without debug
- symbols. This allows for faster compile, link, and gdb times.
-
- https://bugs.webkit.org/show_bug.cgi?id=29721
-
- No new tests, build config change.
-
- * WebCore.gyp/WebCore.gyp:
-
-2009-09-25 Darin Fisher <darin@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Declare RegisteredEventListener as a class instead of a struct.
- This fixes a warning in the Chromium build.
-
- * dom/RegisteredEventListener.h:
-
-2009-09-25 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Jon Honeycutt.
-
- WebCore part of
- <rdar://problem/7211635> 2 byte characters are displayed as garbaged
- <rdar://problem/7212626> garbled/gibberish text (off-by-one)
-
- When the Windows Fonts directory contains more than one font file for a
- given font name, which of the fonts gets assigned to the name in the
- Core Graphics font database was determined arbitrarily and did not
- always match the font GDI used for the same font name. The mismatch
- caused character-to-glyph mapping to use one font and glyph rendering to
- use another.
-
- The fix is to update the Core Graphics font database from the registry
- entries (that reflect the name-to-font mapping that GDI uses) after
- populating it with the result of scanning the Fonts directory. As a
- consequence, the directory needs to be scanned at startup every time the
- registry key changes, so the last value of the registry key is kept
- in the property list on disk so that it could be compared to the current
- value on startup.
-
- * platform/graphics/win/FontDatabase.cpp:
- (WebCore::populateFontDatabaseFromPlist): Now takes a property list as
- a parameter and avoids round-tripping through XML by calling
- wkAddFontsFromPlist() instead of wkAddFontsFromPlistRepresentation().
- (WebCore::fontFilenamesFromRegistryKey):
- (WebCore::cgFontDBKey):
- (WebCore::writeFontDatabaseToPlist): Now takes the CG font DB property
- list and a property list with the font filenames from the registry and
- writes a dictionary with those property lists as values.
- (WebCore::fontFilenamesFromRegistry): Added. Returns an array with the
- values in the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
- registry key.
- (WebCore::populateFontDatabase): Changed to read the contents of the
- Fonts registry key and compare it with the last-saved value from the
- property list, and to call wkAddFontsFromRegistry() after populating the
- CG font DB from the file system. Uses wkCreateFontsPlist() instead of
- wkCreateFontsPlistRepresentation() to avoid round-tripping through XML.
-
-2009-09-25 Geoffrey Garen <ggaren@apple.com>
-
- Reviewed by Darin Adler.
-
- Inlined some object creation code, including lexicalGlobalObject access
- https://bugs.webkit.org/show_bug.cgi?id=29750
-
- * bindings/js/JSInspectorBackendCustom.cpp:
- (WebCore::JSInspectorBackend::currentCallFrame):
- * inspector/JavaScriptDebugServer.cpp:
- (WebCore::JavaScriptDebugServer::hasBreakpoint): Updated for JavaScriptCore
- API changes.
-
-2009-09-25 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Anders Carlsson.
-
- https://bugs.webkit.org/show_bug.cgi?id=24399
- Make @import work in user stylesheets. The first bug was that the URL wasn't being set on the
- user sheets themselves, so relative @import URLs couldn't resolve properly. The second bug
- was that the loads would be denied. This is fixed by using the requestUserCSSStyleSheet method
- instead of the normal request method. In order to know when to do this, CSSStyleSheets now have
- a propagated boolean, m_isUserStyleSheet, that lets them know if they are user stylesheets or not.
-
- * css/CSSImportRule.cpp:
- (WebCore::CSSImportRule::insertedIntoParent):
- * css/CSSStyleSheet.cpp:
- (WebCore::CSSStyleSheet::CSSStyleSheet):
- * css/CSSStyleSheet.h:
- (WebCore::CSSStyleSheet::setIsUserStyleSheet):
- (WebCore::CSSStyleSheet::isUserStyleSheet):
- * dom/Document.cpp:
- (WebCore::Document::pageUserSheet):
- (WebCore::Document::pageGroupUserSheets):
-
-2009-09-25 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Darin Adler.
-
- ASSERTION FAILED: !repaintContainer || repaintContainer == this
- https://bugs.webkit.org/show_bug.cgi?id=29755
-
- It's possible for RenderObject::container() to return an object that is higher
- in the hierarchy than the repaintContainer that is being used to repaint an
- object. For example, this can happen when running an accelerated opacity
- transition on an element with a position:absolute parent, and a position:absolute child.
-
- In this case we need to detect when RenderObject::container() will skip over
- repaintContainer, and in that case adjust the coords to shift into repaintContainer's space.
-
- Test: compositing/repaint/opacity-between-absolute.html
-
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::mapLocalToContainer):
- (WebCore::RenderBox::computeRectForRepaint):
- * rendering/RenderInline.cpp:
- (WebCore::RenderInline::computeRectForRepaint):
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::container):
- * rendering/RenderObject.h:
-
-2009-09-25 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Darin Adler.
-
- Crash with hardware accelerated rotation of a PDF image in a data URL
- <rdar://problem/7250378>
-
- PDF images don't return a color space from CGImageGetColorSpace(),
- so we need to null-check the return value before use.
-
- Test: compositing/color-matching/pdf-image-match.html
-
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayerCA::setContentsToImage):
-
-2009-09-25 Darin Adler <darin@apple.com>
-
- Reviewed by Geoffrey Garen.
-
- Null-deref when first access to an Attr node is after its Element is destroyed
- https://bugs.webkit.org/show_bug.cgi?id=29748
-
- Test: fast/dom/Attr/access-after-element-destruction.html
-
- * bindings/js/JSAttrCustom.cpp:
- (WebCore::JSAttr::markChildren): Added. Keeps the ownerElement alive as
- long as the Attr is alive.
-
- * bindings/js/JSNamedNodeMapCustom.cpp:
- (WebCore::JSNamedNodeMap::markChildren): Added. Keeps the Element alive as
- long as the NamedNodeMap is alive.
-
- * dom/Attr.idl: Added CustomMarkFunction attribute.
-
- * dom/NamedAttrMap.cpp:
- (WebCore::NamedNodeMap::getAttributeItem): Tweaked formatting.
- (WebCore::NamedNodeMap::detachFromElement): Call clearAttributes so we don't
- have attributes hanging around that might need an Attr node created; that way
- we won't crash with a null-dereference trying to deal with one of them. This
- can't happen when working with JavaScript since the Element will be kept
- alive due to the change above.
- (WebCore::NamedNodeMap::addAttribute): Fix function name in comment.
- (WebCore::NamedNodeMap::removeAttribute): Removed unneeded "1" and added
- missing braces.
-
- * dom/NamedAttrMap.h: Made the element function public so it can be used by
- the JavaScript binding to keep the Element alive.
-
- * dom/NamedNodeMap.idl: Added CustomMarkFunction attribute.
-
-2009-09-24 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler and Sam Weinig.
-
- Onclick not fired for an element copied with cloneContents() or cloneNode()
- https://bugs.webkit.org/show_bug.cgi?id=25130
-
- The change here is that JS event listeners don't keep a reference to a global object from
- where they were created, and instead take it as a parameter when parsing source code. Also,
- the listener creation won't fail just because it happens for an element in a frameless
- document.
- Thus, moving nodes between documents no longer results in having incorrect registered
- lazy event listeners on them.
-
- Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
- fast/events/attribute-listener-cloned-from-frameless-doc-context.html
- fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
- fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
- fast/events/attribute-listener-extracted-from-frameless-doc-context.html
-
- * bindings/js/JSEventListener.cpp:
- (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
- (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
- getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
- (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
- (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
- (WebCore::JSEventListener::reportError): Ditto.
-
- * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
- to JSDOMGlobalObject.
-
- * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
- creation was split between this function and ScriptEventListener; moved it here, as JS
- global object can be different now.
-
- * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
- which can not be determined at parsing time.
-
- * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
- for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
- expect that errors are logged at document parsing time, and because I don't know what other
- side effects moving it vould have.
-
- * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
- because JSC needs a global context here.
-
- * bindings/js/JSAbstractWorkerCustom.cpp:
- (WebCore::JSAbstractWorker::addEventListener):
- (WebCore::JSAbstractWorker::removeEventListener):
- * bindings/js/JSDOMApplicationCacheCustom.cpp:
- (WebCore::JSDOMApplicationCache::addEventListener):
- (WebCore::JSDOMApplicationCache::removeEventListener):
- * bindings/js/JSDOMGlobalObject.cpp:
- (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::addEventListener):
- (WebCore::JSDOMWindow::removeEventListener):
- * bindings/js/JSEventSourceCustom.cpp:
- (WebCore::JSEventSource::addEventListener):
- (WebCore::JSEventSource::removeEventListener):
- * bindings/js/JSMessagePortCustom.cpp:
- (WebCore::JSMessagePort::addEventListener):
- (WebCore::JSMessagePort::removeEventListener):
- * bindings/js/JSNodeCustom.cpp:
- (WebCore::JSNode::addEventListener):
- (WebCore::JSNode::removeEventListener):
- * bindings/js/JSSVGElementInstanceCustom.cpp:
- (WebCore::JSSVGElementInstance::addEventListener):
- (WebCore::JSSVGElementInstance::removeEventListener):
- * bindings/js/JSWorkerContextCustom.cpp:
- (WebCore::JSWorkerContext::addEventListener):
- (WebCore::JSWorkerContext::removeEventListener):
- * bindings/js/JSXMLHttpRequestCustom.cpp:
- (WebCore::JSXMLHttpRequest::addEventListener):
- (WebCore::JSXMLHttpRequest::removeEventListener):
- * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
- (WebCore::JSXMLHttpRequestUpload::addEventListener):
- (WebCore::JSXMLHttpRequestUpload::removeEventListener):
- * bindings/objc/ObjCEventListener.h:
- * bindings/objc/ObjCEventListener.mm:
- (WebCore::ObjCEventListener::handleEvent):
- * bindings/scripts/CodeGeneratorJS.pm:
- * dom/EventTarget.cpp:
- (WebCore::EventTarget::fireEventListeners):
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::handleEvent):
- * inspector/InspectorDOMAgent.h:
- * inspector/InspectorDOMStorageResource.cpp:
- (WebCore::InspectorDOMStorageResource::handleEvent):
- * inspector/InspectorDOMStorageResource.h:
- * loader/ImageDocument.cpp:
- (WebCore::ImageEventListener::handleEvent):
- * svg/animation/SVGSMILElement.cpp:
- (WebCore::ConditionEventListener::handleEvent):
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::reportException):
- Don't pass global object to JSEventListener::create(), which no longer needs it.
- Note that some of these functions still have an early return for null global object, which
- can probably be removed in a later patch.
- Pass ScriptExecutionContext to EventListener methods that now need it.
-
-2009-09-25 Enrica Casucci <enrica@apple.com>
-
- Reviewed by Darin Adler, Dan Bernstein, Adele Peterson, and others.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=29740
- <rdar://problem/7168738> Gmail: After changing a foreground text color, pressing return doesn't apply background to new line
-
- Change the way style is preserved when inserting a new paragraph.
- The original code handled insertion at the beginning and at the end of a paragraph as special
- cases. The newly created paragraph contained a set of nodes generated starting from the
- computed style of the insertion node. This approach has two problems:
- 1. if the insertion node has a non opaque background color and one of the parent element did have
- a solid background color the new paragraph did not have the element with the solid color in the tree.
- 2. in some circumstances it generated more markup than the original paragraph had (a span with bold, italic,
- background color and some font attribute was being reproduced as span bold italic font as separate tags.
- The new approach is to recreate in the new paragraph the same hierarchy of nodes found in the
- paragraph where the insertion point is.
-
- Test: editing/inserting/insert-bg-font.html
-
- * editing/InsertParagraphSeparatorCommand.cpp:
- (WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock): retrieves the list of all the ancestors
- between the insert node and the outer block.
- (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock): uses the list of ancestors to recreate
- in the new paragraph the same element hierarchy present in the starting paragraph.
- (WebCore::InsertParagraphSeparatorCommand::doApply): changed the code to handle the general case of insertion
- in the middle of the paragraph to use the new methods. Changed the handling of the insertion at the beginning and
- at the end of the paragraph to use the new methods instead of applying the calculated style.
- * editing/InsertParagraphSeparatorCommand.h: added methods getAncestorsInsideBlock and cloneHierarchyUnderNewBlock.
-
-2009-09-25 Patrick Mueller <Patrick_Mueller@us.ibm.com>
-
- Reviewed by Timothy Hatcher.
-
- Content-type parameters not taken into account when building form-data
- https://bugs.webkit.org/show_bug.cgi?id=28970
-
- existing manual test case extended with new tests
-
- * English.lproj/localizedStrings.js:
- * inspector/front-end/ResourceView.js:
- (WebInspector.ResourceView.prototype._refreshFormData):
- (WebInspector.ResourceView.prototype._refreshParms):
- * manual-tests/inspector/display-form-data.html:
-
-2009-09-25 Yuan Song <song.yuan@ericsson.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=14566
-
- Raise SECURITY_ERR exception if an attempt is made to change document.domain to an invalid value.
-
- Test: fast/js/invalid-domain-change-throws-exception.html
-
- * dom/Document.cpp:
- (WebCore::Document::setDomain):
- * dom/Document.h:
- * dom/Document.idl:
-
-2009-09-25 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Teach ScheduledAction::execute about isolated worlds
- https://bugs.webkit.org/show_bug.cgi?id=27703
-
- When setTimeout is called with a string argument in an isolated
- world, we now compile the string in the isolated world.
-
- Last time we tried this change, we got a lot of crashes. This
- time we're using a fresh local handle as our context to avoid
- trouble if the peristent handle gets disposed before we leave
- the context.
-
- Test: fast/dom/timer-clear-interval-in-handler-and-generate-error.html
-
- * bindings/v8/ScheduledAction.cpp:
- (WebCore::ScheduledAction::execute):
-
-2009-09-25 Paul Godavari <paul@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Fix a regression in Mac Chromium popup menus, where the user's
- selection was ignored and the popup became unresponsive.
- https://bugs.webkit.org/show_bug.cgi?id=29726
-
- The fix is to notify the popup's client that the popup was hidden,
- even if the popup has no parent.
-
- * platform/chromium/PopupMenuChromium.cpp:
- (WebCore::PopupListBox::hidePopup):
-
-2009-09-25 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Dan Bernstein.
-
- Enable Pasteboard::writePlainText for Chromium and fix code style nits.
- https://bugs.webkit.org/show_bug.cgi?id=29734
-
- * platform/chromium/PasteboardChromium.cpp:
- (WebCore::Pasteboard::writePlainText):
- * platform/gtk/PasteboardGtk.cpp:
- (WebCore::Pasteboard::writePlainText):
- (WebCore::Pasteboard::writeURL):
- * platform/mac/PasteboardMac.mm:
- (WebCore::Pasteboard::writeSelection):
- (WebCore::Pasteboard::writePlainText):
- (WebCore::Pasteboard::writeURL):
- * platform/qt/PasteboardQt.cpp:
- (WebCore::Pasteboard::writePlainText):
-
-2009-09-25 Yongjun Zhang <yongjun.zhang@nokia.com>
-
- Reviewed by Ariya Hidayat.
-
- https://bugs.webkit.org/show_bug.cgi?id=28876
- [Qt] reduce peak memory consumption of text decoding.
-
- Chop large input buffer into small buffers to reduce peak memory
- during decoding.
-
- * platform/text/qt/TextCodecQt.cpp:
- (WebCore::TextCodecQt::decode):
-
-2009-09-24 Jon Honeycutt <jhoneycutt@apple.com>
-
- Add a mechanism for automatically halting plug-ins.
-
- Reviewed by Oliver Hunt and Alice Liu.
-
- * GNUmakefile.am:
-
- * WebCore.base.exp:
- Update export of Page constructor.
-
- * WebCore.gypi:
-
- * WebCore.pro:
-
- * WebCore.vcproj/WebCore.vcproj:
- Add PluginHalter.{h,cpp}, PluginHalterClient.h, and
- HaltablePlugin.h.
-
- * WebCore.xcodeproj/project.pbxproj:
- Add files to Mac project.
-
- * loader/EmptyClients.h:
- Added an empty PluginHalterClient.
- (WebCore::EmptyPluginHalterClient::shouldHaltPlugin):
- Return false.
-
- * page/PluginHalter.cpp: Added.
- (WebCore::PluginHalter::PluginHalter):
- (WebCore::PluginHalter::didStartPlugin):
- Add the object to the plug-in set. If this is the only item in the set,
- set m_oldestStartTime to this object's time, and start the timer.
- (WebCore::PluginHalter::didStopPlugin):
- Remove the plug-in from the set.
- (WebCore::PluginHalter::timerFired):
- Find the cut-off time as the current time minus the allowed run time;
- plug-ins older than this may be halted. Iterate over the plug-ins. Find
- the object with the oldest start time that is too young to be halted;
- we'll use its start time to set the timer's next fire time. For all
- plug-ins that are candidates to be halted, call the
- PluginHalterClient's shouldHaltPlugin(). If this function returns true,
- call the plug-in's halt() function. Remove these objects from the set
- of tracked plug-ins. Call startTimerIfNecessary() to restart the timer.
- (WebCore::PluginHalter::startTimerIfNecessary):
- If the timer is set to fire, or the set of tracked plug-ins is empty,
- return early. Set the timer to fire after the oldest plug-in has run
- for the allowed run time.
-
- * page/PluginHalter.h: Added.
- (WebCore::PluginHalter::setPluginAllowedRunTime):
-
- * page/PluginHalterClient.h: Added.
- (WebCore::PluginHalterClient::~PluginHalterClient):
-
- * page/Page.cpp:
- (WebCore::Page::Page):
- Initialize m_pluginHalterClient. Call pluginHalterEnabledStateChanged()
- to create the PluginHalter if necessary.
- (WebCore::Page::pluginHalterEnabledStateChanged):
- If plug-in halting is enabled, create the PluginHalter. If it is
- disabled, clear it.
- (WebCore::Page::pluginAllowedRunTimeChanged):
- If there is a plug-in halter, call its setPluginAllowedRunTime().
- (WebCore::Page::didStartPlugin):
- If there is a plug-in halter, call its didStartPlugin().
- (WebCore::Page::didStopPlugin):
- If there is a plug-in halter, call its didStopPlugin().
-
- * page/Page.h:
- Add a parameter to the Page constructor for the PluginHalterClient.
- Added declarations for didStartPlugin() and didStopPlugin(), which are
- called when HaltablePlugins are added to or removed from the page. Adds
- pluginAllowedRunTimeChanged() and pluginHalterEnabledStateChanged() to
- notify the Page when these settings are changed. Added members to hold
- the PluginHalter and the PluginHalterClient.
-
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
- (WebCore::Settings::setPluginHalterEnabled):
- If the enabled state has changed, call the Page's
- pluginHalterEnabledStateChanged().
- (WebCore::Settings::setPluginAllowedRunTime):
- Call the Page's pluginAllowedRunTimeChanged().
-
- * page/Settings.h:
- (WebCore::Settings::pluginHalterEnabled):
- (WebCore::Settings::pluginAllowedRunTime):
-
- * page/HaltablePlugin.h: Added. Defines an interface for plug-ins that
- can be automatically halted.
- (WebCore::HaltablePlugin::~HaltablePlugin):
-
- * svg/graphics/SVGImage.cpp:
- (WebCore::SVGImage::dataChanged):
- Pass a dummy PluginHalterClient.
-
-2009-09-24 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- REGRESSION: webkit-transform scale no longer works properly in nightly build
- https://bugs.webkit.org/show_bug.cgi?id=29730
-
- When the initial or final state of a scale animation does not specify a transform,
- use a default scale of 1, rather than zero.
-
- Test: compositing/transitions/scale-transition-no-start.html
-
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::getTransformFunctionValue):
-
-2009-09-24 John Gregg <johnnyg@google.com>
-
- Reviewed by Eric Seidel.
-
- isEnabled switch for notifications (experimental) in Page Settings
- https://bugs.webkit.org/show_bug.cgi?id=28930
-
- Adds a run-time flag in Settings object that controls whether
- to expose desktop notifications.
-
- No new test, but test code also modified to set this preference.
-
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::webkitNotifications): check preference before returning notifications object
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
- (WebCore::Settings::setExperimentalNotificationsEnabled):
- * page/Settings.h:
- (WebCore::Settings::experimentalNotificationsEnabled):
-
-2009-09-24 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Sam Weinig.
-
- Fix <rdar://problem/7162000> Crash while trying to
- calculate the horizontal position of image
-
- Test: fast/inline-block/relative-positioned-rtl-crash.html
-
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::calcAbsoluteHorizontalReplaced): Corrected an
- isInline() test to isRenderInline(). This is similar to r41259.
-
-2009-09-24 Jessie Berlin <jberlin@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Fix expanding profile call stacks being broken after sorting.
- https://bugs.webkit.org/show_bug.cgi?id=26423
-
- * inspector/front-end/ProfileDataGridTree.js:
- (WebInspector.ProfileDataGridNode.prototype.sort):
- Set shouldRefreshChildren to true on collapsed nodes with children so that expanding it
- causes the children to be placed in the right positions.
-
-2009-09-24 Geoffrey Garen <ggaren@apple.com>
-
- Reviewed by Stephanie Lewis.
-
- Fixed sudden termination console spew due to too many calls to
- enableSuddenTermination.
-
- <rdar://problem/7063125> 10A410: Safari logging enableSuddenTermination errors
-
- * page/DOMWindow.cpp:
- (WebCore::removeUnloadEventListener):
- (WebCore::removeAllUnloadEventListeners):
- (WebCore::removeBeforeUnloadEventListener):
- (WebCore::removeAllBeforeUnloadEventListeners): Only
- enableSuddenTermination if the set of listeners is empty *and* this
- window was in the set. Otherwise, a no-op will cause us to enableSuddenTermination.
-
-2009-09-24 Carol Szabo <carol.szabo@nokia.com>
-
- Reviewed by Alexey Proskuryakov.
-
- WebKit returns "" instead of null when getting
- inexistent, forbidden or invalidly named headers.
- https://bugs.webkit.org/show_bug.cgi?id=29140
-
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::getResponseHeader):
- Changed to return null as it should according to the spec.
-
-2009-09-24 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Add GYP generated files to svn:ignore
- https://bugs.webkit.org/show_bug.cgi?id=29724
-
- Adding the following files to the svn:ignore list (all in the
- WebCore/WebCore.gyp directory)
-
- WebCore.xcodeproj
- WebCore.sln
- WebCore.vcproj
- WebCore_Debug.rules
- WebCore_Release.rules
- WebCore_Release - no tcmalloc.rules
- WebCore_Purify.rules
- WebCore.mk
- WebCore_Debug_rules.mk
- WebCore_Release_rules.mk
- WebCore_Release - no tcmalloc_rules.mk
- WebCore_Purify_rules.mk
- WebCore.scons
- WebCore_main.scons
-
- * WebCore.gyp: Changed property svn:ignore.
-
-2009-09-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Unreviewed. Mac build fix.
-
- * page/EventHandler.cpp:
- (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
- remove unused parameter from function signature;
-
-2009-09-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Reviewed by Oliver Hunt.
-
- Implement correct horizontal scrollbar behavior for GTKalso on
- styled scrollbars.
-
- https://bugs.webkit.org/show_bug.cgi?id=29348
- [Gtk] Scrollwheel on horizontal scrollbars should slide horizontally
-
- Test: platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html
-
- * page/EventHandler.cpp:
- (WebCore::EventHandler::handleWheelEvent): on GTK+, when using the
- wheel with the pointer on the horizontal scrollbar, scroll
- horizontally;
- * platform/PlatformWheelEvent.h:
- * platform/gtk/WheelEventGtk.cpp:
- (WebCore::PlatformWheelEvent::swapOrientation): allow adding a
- vertical scroll to the horizontal one;
-
-2009-09-24 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Eric Seidel.
-
- StorageNamespace::storageArea() should take in a PassRefPtr<StorageOrigin>
- https://bugs.webkit.org/show_bug.cgi?id=29290
-
- Modified StorageNamespace::storageArea() to take in a PassRefPtr<StorageOrigin>
- per http://webkit.org/coding/RefPtr.html
-
- No behavior change, so no tests.
-
- * storage/StorageNamespace.h:
- * storage/StorageNamespaceImpl.cpp:
- (WebCore::StorageNamespaceImpl::storageArea):
- * storage/StorageNamespaceImpl.h:
-
-2009-09-24 Geoffrey Garen <ggaren@apple.com>
-
- Reviewed by Sam Weinig.
-
- Added back enable/disableSuddenTermination() functionality I accidentally
- removed in my last patch.
-
- * page/DOMWindow.cpp:
- (WebCore::addUnloadEventListener):
- (WebCore::removeUnloadEventListener):
- (WebCore::removeAllUnloadEventListeners):
- (WebCore::addBeforeUnloadEventListener):
- (WebCore::removeBeforeUnloadEventListener):
- (WebCore::removeAllBeforeUnloadEventListeners):
- (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
- (WebCore::DOMWindow::~DOMWindow):
- (WebCore::DOMWindow::addEventListener):
- (WebCore::DOMWindow::removeEventListener):
- (WebCore::DOMWindow::removeAllEventListeners):
-
-2009-09-24 Sam Weinig <sam@webkit.org>
-
- Reviewed by Steve Falkenburg and Mark Rowe.
-
- Don't pass -F to GCC on non-mac platforms since it is an darwin only.
-
- * DerivedSources.make:
-
-2009-09-24 Sam Weinig <sam@webkit.org>
-
- Fix windows build.
-
- * dom/Element.idl:
-
-2009-09-23 Stephen White <senorblanco@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Revert the relevant parts of r47925, and implement an alternate
- fix (localize the coordinate check to GraphicsContext::clipPath()).
- This fixes http://crbug.com/21174.
-
- Covered by LayoutTests/svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html.
-
- * platform/graphics/skia/GraphicsContextSkia.cpp:
- (WebCore::GraphicsContext::clipPath):
- * platform/graphics/skia/PlatformContextSkia.cpp:
- (PlatformContextSkia::currentPathInLocalCoordinates):
-
-2009-09-24 Brady Eidson <beidson@apple.com>
-
- Reviewed by Sam Weinig.
-
- Merge changes from Mozilla's FTP directory parser.
- <rdar://problem/7227620> and https://bugs.webkit.org/show_bug.cgi?id=29294
-
- FTP layout tests not possible at this time.
- https://bugs.webkit.org/show_bug.cgi?id=29719 tracks making them possible.
-
- * loader/FTPDirectoryParser.cpp:
- (WebCore::ParsingFailed):
- (WebCore::parseOneFTPLine):
-
-2009-09-24 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- [GTK] re-enable some media tests
- https://bugs.webkit.org/show_bug.cgi?id=29716
-
- make canPlayType() return "probably" if mime-type is known
- and codecs string is not empty. If codecs is empty return
- "maybe".
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::supportsType):
-
-2009-09-24 Sam Weinig <sam@webkit.org>
-
- Reviewed by Dan Bernstein.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=29703
- Add a function to element to check whether it matches a CSS selector
-
- Implement Element.webkitMatchesSelector.
-
- * css/CSSSelectorList.cpp:
- (WebCore::forEachTagSelector):
- (WebCore::forEachSelector):
- (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
- (WebCore::CSSSelectorList::selectorsNeedNamespaceResolution):
- * css/CSSSelectorList.h:
- Moved code to iterate the CSSSelectorList and determine if any
- selectors need namespace resolution from a static function in
- Node.cpp to CSSSelectorList so that it can be used by webkitMatchesSelector
- as well as querySelector/querySelectorAll.
-
- * dom/Element.cpp:
- (WebCore::Element::webkitMatchesSelector):
- * dom/Element.h:
- * dom/Element.idl:
- Implement the new function. Handles exceptional cases identically to
- querySelector/querySelectorAll.
-
- * dom/Node.cpp:
- (WebCore::Node::querySelector):
- (WebCore::Node::querySelectorAll):
- Moved selectorsNeedNamespaceResolution to CSSSelectorList from here.
-
-2009-09-24 Vitaly Repeshko <vitalyr@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Fixed bindings build after http://trac.webkit.org/changeset/48701
- https://bugs.webkit.org/show_bug.cgi?id=29713
-
- Got rid of isWindowEvent in function signatures:
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::invokeEventHandler):
- (WebCore::V8AbstractEventListener::handleEvent):
- (WebCore::V8AbstractEventListener::getReceiverObject):
- * bindings/v8/V8AbstractEventListener.h:
- * bindings/v8/V8LazyEventListener.cpp:
- (WebCore::V8LazyEventListener::callListenerFunction):
- * bindings/v8/V8LazyEventListener.h:
- * bindings/v8/V8WorkerContextEventListener.cpp:
- (WebCore::V8WorkerContextEventListener::handleEvent):
- (WebCore::V8WorkerContextEventListener::callListenerFunction):
- (WebCore::V8WorkerContextEventListener::getReceiverObject):
- * bindings/v8/V8WorkerContextEventListener.h:
- * bindings/v8/custom/V8CustomEventListener.cpp:
- (WebCore::V8EventListener::callListenerFunction):
- * bindings/v8/custom/V8CustomEventListener.h:
-
- Switched to EventTarget methods of adding/removing listeners:
- * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
- (WebCore::toEventID):
- (WebCore::ACCESSOR_SETTER):
-
- * dom/EventTarget.h: Some functions were incorrectly marked
- as JSC-specific.
-
-2009-09-24 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Color-code watch expression errors with red.
-
- https://bugs.webkit.org/show_bug.cgi?id=29707
-
- * inspector/front-end/WatchExpressionsSidebarPane.js:
- (WebInspector.WatchExpressionsSection.prototype.update):
- (WebInspector.WatchExpressionTreeElement.prototype.update):
- * inspector/front-end/inspector.css:
-
-2009-09-24 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Fix formatting for messages derived from resource warnings,
- couple of drive-by formatting fixes.
-
- https://bugs.webkit.org/show_bug.cgi?id=29705
-
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::addMessageToConsole):
- * inspector/front-end/ConsoleView.js:
- * inspector/front-end/InjectedScript.js:
- (InjectedScript._evaluateAndWrap):
- * inspector/front-end/WatchExpressionsSidebarPane.js:
- (WebInspector.WatchExpressionsSection.prototype.update):
-
-2009-09-22 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Implement InspectorController::copyNode(id).
-
- https://bugs.webkit.org/show_bug.cgi?id=28357
-
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::copyNode):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.prototype.handleCopyEvent):
-
-2009-09-24 Oliver Hunt <oliver@apple.com>
-
- Reviewed by NOBODY(rollout)
-
- Roll out r48712 as it is incorrect.
-
- Overriding getPropertyNames is incorrect.
-
- * bridge/runtime_array.cpp:
- * bridge/runtime_array.h:
-
-2009-09-24 Xan Lopez <xlopez@igalia.com>
-
- Revert r48697, since it broke key handling notification to GTK+.
-
- * platform/gtk/KeyEventGtk.cpp:
- (WebCore::keyIdentifierForGdkKeyCode):
- (WebCore::singleCharacterString):
-
-2009-09-24 Philippe Normand <pnormand@igalia.com>
-
- Reviewed by Xan Lopez.
-
- [GTK] GStreamer MediaPlayer is unable to correctly querry duration
- https://bugs.webkit.org/show_bug.cgi?id=24639
-
- check duration returned by gst_element_query_duration() only
- when using GStreamer < 0.10.23.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::duration):
-
-2009-09-24 Benjamin Poulain <benjamin.poulain@nokia.com>
-
- Reviewed by Eric Seidel.
-
- The indices of RuntimeArray should be enumerated like for a regular array.
- https://bugs.webkit.org/show_bug.cgi?id=29005
-
- * bridge/runtime_array.cpp:
- (JSC::RuntimeArray::getPropertyNames):
- * bridge/runtime_array.h:
-
-2009-09-23 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Introduce Pasteboard::writePlaintext(const String&) so that copying
- of the inspected elements HTML will be possible in WebInspector.
- https://bugs.webkit.org/show_bug.cgi?id=29634
-
- * platform/Pasteboard.h:
- * platform/android/TemporaryLinkStubs.cpp:
- (Pasteboard::writePlainText):
- * platform/chromium/ChromiumBridge.h:
- * platform/chromium/PasteboardChromium.cpp:
- (WebCore::Pasteboard::writePlainText):
- * platform/gtk/PasteboardGtk.cpp:
- (WebCore::Pasteboard::writePlainText):
- * platform/haiku/PasteboardHaiku.cpp:
- (WebCore::Pasteboard::writePlainText):
- * platform/mac/PasteboardMac.mm:
- (WebCore::Pasteboard::writePlainText):
- * platform/qt/PasteboardQt.cpp:
- (WebCore::Pasteboard::writePlainText):
- * platform/win/PasteboardWin.cpp:
- (WebCore::Pasteboard::writeSelection):
- (WebCore::Pasteboard::writePlainText):
- * platform/wince/PasteboardWince.cpp:
- (WebCore::Pasteboard::writePlainText):
- * platform/wx/PasteboardWx.cpp:
- (WebCore::Pasteboard::writeSelection):
- (WebCore::Pasteboard::writePlainText):
- (WebCore::Pasteboard::writeURL):
-
-2009-09-24 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Fix QApp::translate() calls to provide the correct class name without
- a trailing comma.
-
- * platform/qt/Localizations.cpp:
- (WebCore::localizedMediaTimeDescription):
-
-2009-09-24 Geoffrey Garen <ggaren@apple.com>
-
- More build fix: Removed JSSharedWorkerContextCustom.cpp from project
- files, since it no longer exists in the repository.
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
-
-2009-09-24 Geoffrey Garen <ggaren@apple.com>
-
- Windows build fix: Declare set/unsetPendingActivity public, so
- SharedWorkerScriptLoader can call them.
-
- * dom/ActiveDOMObject.h:
-
-2009-09-24 Geoffrey Garen <ggaren@apple.com>
-
- Fixed a bit of the Windows build.
-
- * workers/SharedWorker.idl: Declare a custom mark function. (I accidentally
- removed this in my last patch.)
- * WebCore.xcodeproj/project.pbxproj: Added JSSharedWorkerCustom.cpp back
- to the build. (I accidentally removed this in my last patch.)
-
-2009-09-23 Geoffrey Garen <ggaren@apple.com>
-
- 32-bit build fix: restore previous cast that I thought was unnecessary.
-
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::didSendData):
- (WebCore::XMLHttpRequest::didReceiveData):
-
-2009-09-23 Geoffrey Garen <ggaren@apple.com>
-
- Reviewed by Sam Weinig.
-
- Bring a little sanity to this crazy EventTarget world of ours
- https://bugs.webkit.org/show_bug.cgi?id=29701
-
- Lots of EventTarget refactoring to achieve a single shared implementation
- that fixes some of the performance and correctness bugs of the many individual
- implementations, and makes reasoning about EventTargets and EventListeners
- much easier.
-
- The basic design is this:
- - EventTarget manages a set of EventListeners.
- - onXXX EventListener attributes forward to standard EventTarget APIs.
- - Since the onXXX code is repetitive, it is usually done with macros
- of the form DEFINE_ATTRIBUTE_EVENT_LISTENER(attributeName).
- - EventTarget provides a shared implementation of dispatchEvent,
- which subclasses with special event dispatch rules, like Node, override.
- - To support Node, which lazily instantiates its EventTarget data,
- EventTarget has no data members, and instead makes a virtual call
- to get its data from wherever its subclass chose to store it.
-
- Code that used to call dispatchEvent, passing an ExceptionCode paratmeter,
- even though no exception could be thrown, has been changed not to do so,
- to improve clarity and performance.
-
- Code that used to call a special dispatchXXXEvent function, which just
- turned around and called dispatchEvent, has been changed to call
- dispatchEvent, to improve clarity and performance.
-
- * WebCore.base.exp:
- * WebCore.xcodeproj/project.pbxproj: Another day in the life of a WebKit
- engineer.
-
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::isObservableThroughDOM): Updated for Node API change. Added
- "is not in the document but is firing event listeners" as a condition
- that makes a Node observable in the DOM, so that event listeners firing
- on removed nodes are not destroyed midstream. (This was a long-standing
- bug that was somewhat hidden by the old implementation's habit of
- copying the RegisteredEventListener vector before firing events, which
- would keep almost all the relevant objects from being destroyed.)
-
- * bindings/js/JSEventListener.cpp:
- (WebCore::JSEventListener::handleEvent): Removed the isWindowEvent flag
- because it was one of the most elaborately planned no-ops in the history
- of software crime, and one of the reasons clients thought they needed more
- than one dispatchEvent function even though they didn't.
- * bindings/js/JSEventListener.h:
-
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::markChildren):
- (WebCore::JSMessagePort::markChildren):
- * bindings/js/JSNodeCustom.cpp:
- (WebCore::JSNode::markChildren):
- * bindings/js/JSAbstractWorkerCustom.cpp:
- * bindings/js/JSDOMApplicationCacheCustom.cpp:
- * bindings/js/JSDedicatedWorkerContextCustom.cpp:
- * bindings/js/JSEventSourceCustom.cpp:
- * bindings/js/JSMessagePortCustom.cpp:
- * bindings/js/JSSharedWorkerContextCustom.cpp: Removed.
- * bindings/js/JSWebSocketCustom.cpp:
- * bindings/js/JSWorkerContextCustom.cpp:
- (WebCore::JSWorkerContext::markChildren):
- * bindings/js/JSWorkerCustom.cpp:
- * bindings/js/JSXMLHttpRequestCustom.cpp:
- (WebCore::JSXMLHttpRequest::markChildren):
- * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
- (WebCore::JSXMLHttpRequestUpload::markChildren): EventListener marking is
- now autogenerated. Classes that still have custom mark functions for other
- reasons now call a shared EventTarget API to mark their EventListeners.
-
- * bindings/objc/ObjCEventListener.h:
- * bindings/objc/ObjCEventListener.mm:
- (WebCore::ObjCEventListener::handleEvent): Bye bye isWindowEvent.
-
- * bindings/scripts/CodeGeneratorJS.pm: Autogeneration support for
- marking and invalidating event listeners.
-
- * dom/CharacterData.cpp:
- (WebCore::CharacterData::dispatchModifiedEvent):
- * dom/ContainerNode.cpp:
- (WebCore::ContainerNode::insertBefore):
- (WebCore::ContainerNode::replaceChild):
- (WebCore::willRemoveChild):
- (WebCore::ContainerNode::appendChild):
- (WebCore::dispatchChildInsertionEvents):
- (WebCore::dispatchChildRemovalEvents):
- * dom/Document.cpp:
- (WebCore::Document::removeAllEventListeners):
- (WebCore::Document::implicitClose):
- (WebCore::Document::setFocusedNode):
- (WebCore::Document::dispatchWindowEvent):
- (WebCore::Document::dispatchWindowLoadEvent):
- (WebCore::Document::finishedParsing):
- * dom/Document.h: Use dispatchEvent directly.
-
- * dom/Element.h: Moved a few event listener attributes down from Node,
- since they don't apply to all Nodes, only Elements.
-
- * dom/EventListener.h: Removed isWindowEvent parameter.
-
- * dom/EventNames.h: Added the "display" event name, so it works correctly
- with attribute macros, and for performance.
-
- * dom/EventTarget.cpp:
- (WebCore::forbidEventDispatch):
- (WebCore::allowEventDispatch):
- (WebCore::eventDispatchForbidden): Made this code (embarrasingly) thread
- safe, since it's now called on multiple threads. (Currently, we only forbid
- event dispatch on the main thread. If we ever want to forbid event dispatch
- on secondary threads, we can improve it then.)
-
- (WebCore::EventTarget::addEventListener):
- (WebCore::EventTarget::removeEventListener):
- (WebCore::EventTarget::setAttributeEventListener):
- (WebCore::EventTarget::getAttributeEventListener):
- (WebCore::EventTarget::clearAttributeEventListener):
- (WebCore::EventTarget::dispatchEvent):
- (WebCore::EventTarget::fireEventListeners):
- (WebCore::EventTarget::getEventListeners):
- (WebCore::EventTarget::removeAllEventListeners):
- * dom/EventTarget.h:
- (WebCore::FiringEventEndIterator::FiringEventEndIterator):
- (WebCore::EventTarget::ref):
- (WebCore::EventTarget::deref):
- (WebCore::EventTarget::markEventListeners):
- (WebCore::EventTarget::invalidateEventListeners):
- (WebCore::EventTarget::isFiringEventListeners):
- (WebCore::EventTarget::hasEventListeners): The ONE TRUE IMPLEMENTATION of
- EventTarget APIs, crafted from an amalgam of all the different versions
- we used to have. The most significant change here is that we no longer
- make a copy of an EventListener vector before firing the events in the
- vector -- instead, we use a reference to the original vector, along with
- a notification mechanism for the unlikely case when an EventListener is
- removed from the vector. This substantially reduces malloc, copying, and
- refcount overhead, and complexity.
-
- * dom/InputElement.cpp:
- (WebCore::InputElement::setValueFromRenderer):
- * dom/MessageEvent.h:
- (WebCore::MessageEvent::create): Use dispatchEvent directly.
-
- * dom/MessagePort.cpp:
- (WebCore::MessagePort::dispatchMessages):
- (WebCore::MessagePort::eventTargetData):
- (WebCore::MessagePort::ensureEventTargetData):
- * dom/MessagePort.h:
- (WebCore::MessagePort::setOnmessage):
- (WebCore::MessagePort::onmessage):
- * dom/MessagePort.idl: Removed custom EventTarget implementation.
-
- * dom/MutationEvent.h:
- (WebCore::MutationEvent::create): Added some default values so callers
- can construct MutationEvents more easily, without calling a custom dispatch
- function.
-
- * dom/Node.cpp:
- (WebCore::Node::addEventListener):
- (WebCore::Node::removeEventListener):
- (WebCore::Node::eventTargetData):
- (WebCore::Node::ensureEventTargetData):
- (WebCore::Node::handleLocalEvents):
- (WebCore::Node::dispatchEvent):
- (WebCore::Node::dispatchGenericEvent):
- (WebCore::Node::dispatchSubtreeModifiedEvent):
- (WebCore::Node::dispatchUIEvent):
- (WebCore::Node::dispatchKeyEvent):
- (WebCore::Node::dispatchMouseEvent):
- (WebCore::Node::dispatchWheelEvent):
- (WebCore::Node::dispatchFocusEvent):
- (WebCore::Node::dispatchBlurEvent):
- * dom/Node.h:
- (WebCore::Node::preDispatchEventHandler):
- (WebCore::Node::postDispatchEventHandler):
- * dom/Node.idl:
- * dom/NodeRareData.h:
- (WebCore::NodeRareData::eventTargetData):
- (WebCore::NodeRareData::ensureEventTargetData): Use the shared EventTarget
- interface, and call dispatchEvent directly instead of custom dispatchXXXEvent
- functions that just forwarded to dispatchEvent.
-
- * dom/RegisteredEventListener.cpp:
- * dom/RegisteredEventListener.h:
- (WebCore::RegisteredEventListener::RegisteredEventListener):
- (WebCore::operator==): This is just a simple struct now, since we no longer
- do a complicated copy / refCount / isRemoved dance just to honor the rule
- that an EventListener can be removed during event dispatch.
-
- * history/CachedFrame.cpp:
- (WebCore::CachedFrameBase::restore): Removed another custom dispatchEvent.
-
- * html/HTMLBodyElement.cpp:
- * html/HTMLBodyElement.h: Use the shared EventTarget API.
-
- * html/HTMLFormControlElement.cpp:
- (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
- (WebCore::HTMLFormControlElement::checkValidity):
- * html/HTMLFormElement.cpp:
- (WebCore::HTMLFormElement::handleLocalEvents):
- (WebCore::HTMLFormElement::prepareSubmit):
- (WebCore::HTMLFormElement::reset):
- * html/HTMLFormElement.h: Use the standard dispatchEvent API.
-
- * html/HTMLFrameSetElement.cpp:
- * html/HTMLFrameSetElement.h: Use the shared EventTarget API.
-
- * html/HTMLImageLoader.cpp:
- (WebCore::HTMLImageLoader::dispatchLoadEvent):
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::onSearch):
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::loadInternal):
- * html/HTMLScriptElement.cpp:
- (WebCore::HTMLScriptElement::dispatchLoadEvent):
- (WebCore::HTMLScriptElement::dispatchErrorEvent):
- * html/HTMLSourceElement.cpp:
- (WebCore::HTMLSourceElement::errorEventTimerFired):
- * html/HTMLTokenizer.cpp:
- (WebCore::HTMLTokenizer::notifyFinished): Use the standard dispatchEvent API.
-
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::handleEvent):
- * inspector/InspectorDOMAgent.h:
- * inspector/InspectorDOMStorageResource.cpp:
- (WebCore::InspectorDOMStorageResource::handleEvent):
- * inspector/InspectorDOMStorageResource.h:
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::stopLoading):
- (WebCore::FrameLoader::canCachePageContainingThisFrame):
- (WebCore::FrameLoader::logCanCacheFrameDecision):
- (WebCore::HashChangeEventTask::performTask):
- (WebCore::FrameLoader::pageHidden): No more isWindowEvent.
-
- * loader/ImageDocument.cpp:
- (WebCore::ImageEventListener::handleEvent):
- * loader/appcache/ApplicationCacheGroup.cpp:
- (WebCore::CallCacheListenerTask::performTask):
- * loader/appcache/ApplicationCacheHost.cpp:
- (WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
- * loader/appcache/ApplicationCacheHost.h:
- * loader/appcache/DOMApplicationCache.cpp:
- (WebCore::DOMApplicationCache::eventTargetData):
- (WebCore::DOMApplicationCache::ensureEventTargetData):
- * loader/appcache/DOMApplicationCache.h:
- * loader/appcache/DOMApplicationCache.idl: Switched to the standard
- EventTarget API. As a part of this, I switched this class from using a
- custom internal event name enumeration to using the standard EventNames.
-
- * notifications/Notification.cpp:
- (WebCore::Notification::eventTargetData):
- (WebCore::Notification::ensureEventTargetData):
- * notifications/Notification.h:
- (WebCore::Notification::scriptExecutionContext):
- * notifications/Notification.idl: Switched to the standard EventTarget API.
-
- * page/DOMWindow.cpp:
- (WebCore::PostMessageTimer::event):
- (WebCore::windowsWithUnloadEventListeners):
- (WebCore::windowsWithBeforeUnloadEventListeners):
- (WebCore::allowsBeforeUnloadListeners):
- (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
- (WebCore::DOMWindow::pendingUnloadEventListeners):
- (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Changed the "pending"
- unload / beforeunload listener tracker just to track which windows had
- such listeners, instead of actually keeping a copy of the listeners. Now,
- this code can use the standard EventTarget API.
-
- (WebCore::DOMWindow::~DOMWindow):
- (WebCore::DOMWindow::postMessageTimerFired):
- (WebCore::DOMWindow::addEventListener):
- (WebCore::DOMWindow::removeEventListener):
- (WebCore::DOMWindow::dispatchLoadEvent):
- (WebCore::DOMWindow::dispatchEvent):
- (WebCore::DOMWindow::removeAllEventListeners):
- (WebCore::DOMWindow::captureEvents):
- (WebCore::DOMWindow::releaseEvents):
- (WebCore::DOMWindow::eventTargetData):
- (WebCore::DOMWindow::ensureEventTargetData):
- * page/DOMWindow.h:
- * page/DOMWindow.idl: Use the standard EventTarget APIs.
-
- * page/EventHandler.cpp:
- (WebCore::EventHandler::canMouseDownStartSelect):
- (WebCore::EventHandler::canMouseDragExtendSelect):
- (WebCore::EventHandler::sendResizeEvent):
- (WebCore::EventHandler::sendScrollEvent): Use dispatchEvent directly.
-
- * page/EventSource.cpp:
- (WebCore::EventSource::endRequest):
- (WebCore::EventSource::didReceiveResponse):
- (WebCore::EventSource::parseEventStreamLine):
- (WebCore::EventSource::stop):
- (WebCore::EventSource::createMessageEvent):
- (WebCore::EventSource::eventTargetData):
- (WebCore::EventSource::ensureEventTargetData):
- * page/EventSource.h:
- * page/EventSource.idl: Use the standard EventTarget APIs.
-
- * page/FocusController.cpp:
- (WebCore::dispatchEventsOnWindowAndFocusedNode):
- (WebCore::FocusController::setFocusedFrame):
- * page/Frame.cpp:
- (WebCore::Frame::shouldClose):
- * page/Frame.h:
- * page/Page.cpp:
- (WebCore::networkStateChanged):
- * page/animation/AnimationController.cpp:
- (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
- * rendering/RenderListBox.cpp:
- (WebCore::RenderListBox::valueChanged):
- * rendering/RenderTextControl.cpp:
- (WebCore::RenderTextControl::selectionChanged):
- * rendering/RenderTextControlMultiLine.cpp:
- (WebCore::RenderTextControlMultiLine::subtreeHasChanged): Use dispatchEvent.
-
- * svg/SVGElement.cpp:
- (WebCore::hasLoadListener): Rewritten for new EventTarget API.
-
- * svg/SVGElementInstance.cpp:
- (WebCore::dummyEventTargetData):
- (WebCore::SVGElementInstance::addEventListener):
- (WebCore::SVGElementInstance::removeEventListener):
- (WebCore::SVGElementInstance::removeAllEventListeners):
- (WebCore::SVGElementInstance::dispatchEvent):
- (WebCore::SVGElementInstance::eventTargetData):
- (WebCore::SVGElementInstance::ensureEventTargetData): Use the EventTarget API.
-
- * svg/SVGElementInstance.h:
- * svg/SVGImageLoader.cpp:
- (WebCore::SVGImageLoader::dispatchLoadEvent):
- * svg/SVGScriptElement.cpp:
- (WebCore::SVGScriptElement::dispatchErrorEvent): Use dispatchEvent directly.
-
- * svg/SVGUseElement.cpp:
- (WebCore::SVGUseElement::transferEventListenersToShadowTree): Updated for
- new EventTarget API.
-
- * svg/animation/SVGSMILElement.cpp:
- (WebCore::ConditionEventListener::handleEvent): No more isWindowEvent.
-
- * websockets/WebSocket.cpp:
- (WebCore::ProcessWebSocketEventTask::create):
- (WebCore::ProcessWebSocketEventTask::performTask):
- (WebCore::ProcessWebSocketEventTask::ProcessWebSocketEventTask):
- (WebCore::WebSocket::didConnect):
- (WebCore::WebSocket::didReceiveMessage):
- (WebCore::WebSocket::didClose):
- (WebCore::WebSocket::eventTargetData):
- (WebCore::WebSocket::ensureEventTargetData):
- * websockets/WebSocket.h:
- * websockets/WebSocket.idl:
- * workers/AbstractWorker.cpp:
- (WebCore::AbstractWorker::eventTargetData):
- (WebCore::AbstractWorker::ensureEventTargetData):
- * workers/AbstractWorker.h:
- * workers/AbstractWorker.idl:
- * workers/DedicatedWorkerContext.cpp:
- * workers/DedicatedWorkerContext.h:
- * workers/DedicatedWorkerContext.idl:
- * workers/DefaultSharedWorkerRepository.cpp:
- (WebCore::SharedWorkerConnectTask::performTask):
- (WebCore::SharedWorkerScriptLoader::load):
- (WebCore::SharedWorkerScriptLoader::notifyFinished):
- * workers/SharedWorker.idl:
- * workers/SharedWorkerContext.cpp:
- (WebCore::createConnectEvent):
- * workers/SharedWorkerContext.h:
- * workers/SharedWorkerContext.idl:
- * workers/Worker.cpp:
- (WebCore::Worker::notifyFinished):
- * workers/Worker.h:
- * workers/Worker.idl:
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::eventTargetData):
- (WebCore::WorkerContext::ensureEventTargetData):
- * workers/WorkerContext.h:
- * workers/WorkerContext.idl:
- * workers/WorkerMessagingProxy.cpp:
- (WebCore::MessageWorkerContextTask::performTask):
- (WebCore::MessageWorkerTask::performTask):
- (WebCore::WorkerExceptionTask::performTask):
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::callReadyStateChangeListener):
- (WebCore::XMLHttpRequest::createRequest):
- (WebCore::XMLHttpRequest::abort):
- (WebCore::XMLHttpRequest::networkError):
- (WebCore::XMLHttpRequest::abortError):
- (WebCore::XMLHttpRequest::didSendData):
- (WebCore::XMLHttpRequest::didReceiveData):
- (WebCore::XMLHttpRequest::eventTargetData):
- (WebCore::XMLHttpRequest::ensureEventTargetData):
- * xml/XMLHttpRequest.h:
- * xml/XMLHttpRequest.idl:
- * xml/XMLHttpRequestProgressEvent.h:
- (WebCore::XMLHttpRequestProgressEvent::create):
- * xml/XMLHttpRequestUpload.cpp:
- (WebCore::XMLHttpRequestUpload::eventTargetData):
- (WebCore::XMLHttpRequestUpload::ensureEventTargetData):
- * xml/XMLHttpRequestUpload.h:
- * xml/XMLHttpRequestUpload.idl: Use new EventTarget API.
-
-2009-09-23 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Darin Adler.
-
- - Support for maxLength of <textarea>
- - Move numGraphemeClusters() and numCharactersInGraphemeClusters() from InputElement to String.
- https://bugs.webkit.org/show_bug.cgi?id=29292
-
- Test: fast/forms/textarea-maxlength.html
-
- * dom/InputElement.cpp:
- (WebCore::InputElement::sanitizeUserInputValue):
- (WebCore::InputElement::handleBeforeTextInsertedEvent):
- * html/HTMLTextAreaElement.cpp:
- (WebCore::HTMLTextAreaElement::defaultEventHandler):
- (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
- (WebCore::HTMLTextAreaElement::sanitizeUserInputValue):
- (WebCore::HTMLTextAreaElement::maxLength):
- (WebCore::HTMLTextAreaElement::setMaxLength):
- * html/HTMLTextAreaElement.h:
- * html/HTMLTextAreaElement.idl:
- * platform/text/PlatformString.h:
- * platform/text/String.cpp:
- (WebCore::String::numGraphemeClusters):
- (WebCore::String::numCharactersInGraphemeClusters):
-
-2009-09-23 Martin Robinson <martin.james.robinson@gmail.com>
-
- Reviewed by Xan Lopez.
-
- [GTK] REGRESSION: BitmapImage::getGdkPixbuf fails for non-square images
- https://bugs.webkit.org/show_bug.cgi?id=29654
-
- Give GDK_Backspace key events the proper text properties.
-
- Instead of adding new tests, this change removes existing tests
- from Gtk's skipped list.
-
- * platform/gtk/KeyEventGtk.cpp:
- (WebCore::keyIdentifierForGdkKeyCode):
- (WebCore::singleCharacterString):
-
-2009-09-23 Sam Weinig <sam@webkit.org>
-
- Reviewed by Adam Barth.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=26989
- Should allow navigation of top-level openers
- <rdar://problem/7034025>
-
- Allow navigation of cross-origin window.opener if it is top-level frame.
-
- Test: http/tests/security/frameNavigation/cross-origin-opener.html
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::shouldAllowNavigation):
-
-2009-09-23 Marshall Culpepper <mculpepper@appcelerator.com>
-
- Reviewed by Eric Seidel.
-
- Added $(WebKitLibrariesDir)/include/cairo so cairo.h is found by
- default when the necessary dependencies are extracted into the
- WebKitLibrariesDir.
- https://bugs.webkit.org/show_bug.cgi?id=29661
-
- * WebCore.vcproj/WebCoreCairo.vsprops:
-
-2009-09-23 Darin Adler <darin@apple.com>
-
- Reviewed by Sam Weinig.
-
- Crash when website does a history.back() followed by an alert()
- https://bugs.webkit.org/show_bug.cgi?id=29686
- rdar://problem/6984996
-
- When loading is deferred, we need to defer timer-based loads
- too, not just networking-driven loads. Otherwise we can get
- syncronouse navigation while running a script, which leads to
- crashes and other badness.
-
- This patch includes a manual test; an automated test may be
- possible some time in the future.
-
- * dom/Document.cpp:
- (WebCore::Document::processHttpEquiv): Use scheduleLocationChange
- instead of scheduleHTTPRedirection to implement the navigation
- needed for x-frame-options.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::FrameLoader): Updated for data members with
- new names and new data members.
- (WebCore::FrameLoader::setDefersLoading): When turning deferral
- off, call startRedirectionTimer and startCheckCompleteTimer, since
- either of them might have been fired and ignored while defersLoading
- was true.
- (WebCore::FrameLoader::clear): Updated for replacement of the
- m_checkCompletedTimer and m_checkLoadCompleteTimer timers.
- (WebCore::FrameLoader::allAncestorsAreComplete): Added.
- (WebCore::FrameLoader::checkCompleted): Added code to set
- m_shouldCallCheckCompleted to false. Changed code that calls
- startRedirectionTimer to call it unconditionally, since that
- function now knows when to do work and doesn't expect callers
- to handle that any more.
- (WebCore::FrameLoader::checkTimerFired): Added. Replaces the old
- timer fired callbacks. Calls checkCompleted and checkLoadComplete
- as appropriate, but not when defersLoading is true.
- (WebCore::FrameLoader::startCheckCompleteTimer): Added. Replaces
- the two different calls to start timers before. Only starts the
- timers if they are needed.
- (WebCore::FrameLoader::scheduleCheckCompleted): Changed to call
- startCheckCompleteTimer after setting boolean.
- (WebCore::FrameLoader::scheduleCheckLoadComplete): Ditto.
- (WebCore::FrameLoader::scheduleHistoryNavigation): Removed
- canGoBackOrForward check. The logic works more naturally when
- we don't do anything until the timer fires.
- (WebCore::FrameLoader::redirectionTimerFired): Do nothing if
- defersLoading is true. Also moved canGoBackOrForward check here.
- (WebCore::FrameLoader::scheduleRedirection): Changed code that
- calls startRedirectionTimer to do so unconditionally. That
- function now handles the rules about when to start the timer
- rather than expecting the caller to do so.
- (WebCore::FrameLoader::startRedirectionTimer): Added code to
- handle the case where there is no redirection scheduled,
- where the timer is already active, or where this is a classic
- redirection and there is an ancestor that has not yet completed
- loading.
- (WebCore::FrameLoader::completed): Call startRedirectionTimer
- here directly instead of calling a cover named parentCompleted.
- Hooray! One less function in the giant FrameLoader class!
- (WebCore::FrameLoader::checkLoadComplete): Added code to set
- m_shouldCallCheckLoadComplete to false.
-
- * loader/FrameLoader.h: Replaced the two functions
- checkCompletedTimerFired and checkLoadCompleteTimerFired with
- one function, checkTimerFired. Removed the parentCompleted
- function. Added the startCheckCompleteTimer and
- allAncestorsAreComplete functions. Replaced the
- m_checkCompletedTimer and m_checkLoadCompleteTimer data
- members with m_checkTimer, m_shouldCallCheckCompleted, and
- m_shouldCallCheckLoadComplete.
-
- * manual-tests/go-back-after-alert.html: Added.
- * manual-tests/resources/alert-and-go-back.html: Added.
-
-2009-09-23 David Kilzer <ddkilzer@apple.com>
-
- <http://webkit.org/b/29660> Move "Generate 64-bit Export File" build phase script into DerivedSources.make
-
- Reviewed by Mark Rowe.
-
- The "Generate 64-bit Export File" build phase script generated
- the WebCore.LP64.exp export file used to link 64-bit WebCore.
- Instead of having a separate build phase script, move its
- generation into DerivedSources.make where WebCore.exp is
- generated.
-
- * DerivedSources.make: Added a rule to make WebCore.LP64.exp.
- Added code to append WebCore.PluginHostProcess.exp to
- $(WEBCORE_EXPORT_DEPENDENCIES) when WTF_USE_PLUGIN_HOST_PROCESS
- is set to 1.
- * WebCore.PluginHostProcess.exp: Renamed from WebCore/WebCore.LP64.exp.
- * WebCore.xcodeproj/project.pbxproj: Removed the "Generate
- 64-bit Export File" build phase script. Renamed WebCore.LP64.exp
- to WebCore.PluginHostProcess.exp.
-
-2009-09-23 Peter Kasting <pkasting@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- https://bugs.webkit.org/show_bug.cgi?id=29694
- [Chromium] Eliminate dependency on gfx::Rect from ImageSkia.
-
- * platform/graphics/skia/ImageSkia.cpp:
- (WebCore::drawResampledBitmap):
-
-2009-09-22 Timothy Hatcher <timothy@apple.com>
-
- Prevent scrolling multiple elements during latched wheel events.
-
- Reviewed by Anders Carlsson.
-
- * page/EventHandler.cpp:
- (WebCore::scrollAndAcceptEvent):
- (WebCore::EventHandler::clear):
- (WebCore::EventHandler::handleWheelEvent):
- * page/EventHandler.h:
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::scroll):
- * rendering/RenderBox.h:
-
-2009-09-23 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=29523
-
- Fixes an issue where a JavaScript URL that was URL-encoded twice can bypass the
- XSSAuditor.
-
- The method FrameLoader::executeIfJavaScriptURL decodes the URL escape
- sequences in a JavaScript URL before it is eventually passed to the XSSAuditor.
- Because the XSSAuditor also decodes the URL escape sequences as part of its
- canonicalization, the double decoding of a JavaScript URL would
- not match the canonicalization of the input parameters.
-
- Tests: http/tests/security/xssAuditor/iframe-javascript-url-url-encoded.html
- http/tests/security/xssAuditor/javascript-link-url-encoded.html
-
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::evaluate): Moved call to
- XSSAuditor::canEvaluateJavaScriptURL into FrameLoader::executeIfJavaScriptURL.
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::evaluate): Ditto.
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::executeIfJavaScriptURL): Modified to call
- XSSAuditor::canEvaluateJavaScriptURL on the JavaScript URL before it is
- decoded.
-
-2009-09-22 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by John Sullivan.
-
- https://bugs.webkit.org/show_bug.cgi?id=29657
- Columns don't break properly in positioned elements with a fixed height. Make sure that
- a block is still considered to have columns even when the column count is 1 if the column
- width is non-auto.
-
- Added fast/multicol/positioned-with-constrained-height.html
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::setDesiredColumnCountAndWidth):
-
-2009-09-23 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Rubber-stamped by Simon Hausmann.
-
- Add a null check for the Document*. In the mirror benchmarking
- application a crash from a call from JavaScript was observed.
-
- I was not able to come up with a test case for this issue.
-
- * platform/qt/CookieJarQt.cpp:
- (WebCore::cookieJar):
-
-2009-09-23 Simon Hausmann <simon.hausmann@nokia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- Fix the Qt/Windows build, after the introduction of
- the page client.
-
- * plugins/win/PluginViewWin.cpp:
- (windowHandleForPageClient):
- (WebCore::PluginView::getValue):
- (WebCore::PluginView::forceRedraw):
- (WebCore::PluginView::platformStart):
-
-2009-09-23 Gustavo Noronha Silva <gns@gnome.org>
-
- Reviewed by Xan Lopez.
-
- [GTK] media tests failing after their rework
- https://bugs.webkit.org/show_bug.cgi?id=29532
-
- Correctly advertise the mime types used by the common formats used
- in the tests.
-
- Tests that regressed, and will pass again:
-
- media/video-canvas-source.html
- media/video-controls.html
- media/video-currentTime-set2.html
- media/video-dom-autoplay.html
- media/video-dom-src.html
- media/video-error-abort.html
- media/video-load-networkState.html
- media/video-load-readyState.html
- media/video-muted.html
- media/video-no-autoplay.html
- media/video-pause-empty-events.html
- media/video-play-empty-events.html
- media/video-seekable.html
- media/video-seeking.html
- media/video-size.html
- media/video-source-type-params.html
- media/video-source-type.html
- media/video-source.html
- media/video-src-change.html
- media/video-src-invalid-remove.html
- media/video-src-remove.html
- media/video-src-set.html
- media/video-src-source.html
- media/video-src.html
- media/video-timeupdate-during-playback.html
- media/video-volume.html
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::mimeTypeCache):
-
-2009-09-22 Charles Wei <charles.wei@torchmobile.com.cn>
-
- Reviewed by Eric Seidel.
-
- Fix the crash problem with absolte positioned children in foreignobject
- htts://bugs.webkit.org/show_bug.cgi?id=26342
-
- Test: svg/custom/foreignobject-crash-with-absolute-positioned-children.svg
-
- * rendering/RenderForeignObject.h:
- (WebCore::RenderForeignObject::isSVGForeignObject):
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::containingBlock):
- * rendering/RenderObject.h:
- (WebCore::RenderObject::isSVGForeignObject):
-
-2009-09-22 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- SharedWorkers "name" attribute is now optional.
- https://bugs.webkit.org/show_bug.cgi?id=28897
-
- Test: fast/workers/shared-worker-name.html
-
- * bindings/js/JSSharedWorkerConstructor.cpp:
- (WebCore::constructSharedWorker):
- Default 'name' attribute to empty string if it is not provided.
- * bindings/v8/custom/V8SharedWorkerCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- Default 'name' attribute to empty string if it is not provided.
- * workers/DefaultSharedWorkerRepository.cpp:
- (WebCore::SharedWorkerProxy::matches):
- Now matches URLs if names are empty strings.
- (WebCore::DefaultSharedWorkerRepository::getProxy):
- Pass URL in to SharedWorkerProxy::matches().
-
-2009-09-22 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, another build fix.
-
- [Chromium] Add another missing include.
- https://bugs.webkit.org/show_bug.cgi?id=29536
-
- * inspector/InspectorController.cpp: Added DOMWindow.h include.
-
-2009-09-22 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- [Chromium] Add missing include.
- https://bugs.webkit.org/show_bug.cgi?id=29536
-
- * inspector/InspectorDOMStorageResource.cpp: Added DOMWindow.h include.
-
-2009-09-22 Darin Adler <darin@apple.com>
-
- Reviewed by Sam Weinig.
-
- Tighten up the ScheduledRedirection machinery to prepare for a bug fix
- https://bugs.webkit.org/show_bug.cgi?id=29663
-
- * loader/FrameLoader.cpp:
- (WebCore::ScheduledRedirection::ScheduledRedirection): Added a boolean,
- initialized to false, to keep track if the redirection has been
- communicated to the client.
- (WebCore::FrameLoader::stopLoading): Tweaked a comment.
- (WebCore::FrameLoader::cancelRedirection): Removed code to clear
- m_scheduledRedirection.clear since stopRedirectionTimer does that now.
- (WebCore::FrameLoader::allChildrenAreComplete): Added.
- (WebCore::FrameLoader::checkCompleted): Use allChildrenAreComplete
- function for clarity.
- (WebCore::FrameLoader::checkCallImplicitClose): Ditto.
- (WebCore::FrameLoader::scheduleRedirection): Changed to take a PassOwnPtr.
- (WebCore::FrameLoader::startRedirectionTimer): Added code to set the
- toldClient flag and not call clientRedirected a second time if it is set.
- (WebCore::FrameLoader::stopRedirectionTimer): Changed so this can be safely
- called multiple times and it will call clientRedirectCancelledOrFinished
- only once.
-
- * loader/FrameLoader.h: Changed scheduleRedirection to be a PassOwnPtr.
- Added allChildrenAreComplete function.
-
-2009-09-22 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Migrate Databases tab to InjectedScript /
- serialized interaction.
-
- DOMStorage interaction is now serialized into JSON messages
- and doesn't require quarantined objects.
-
- https://bugs.webkit.org/show_bug.cgi?id=28873
-
- * dom/EventListener.h:
- (WebCore::EventListener::):
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::selectDOMStorage):
- (WebCore::InspectorBackend::getDOMStorageEntries):
- (WebCore::InspectorBackend::setDOMStorageItem):
- (WebCore::InspectorBackend::removeDOMStorageItem):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::didCommitLoad):
- (WebCore::InspectorController::selectDOMStorage):
- (WebCore::InspectorController::getDOMStorageEntries):
- (WebCore::InspectorController::setDOMStorageItem):
- (WebCore::InspectorController::removeDOMStorageItem):
- (WebCore::InspectorController::getDOMStorageResourceForId):
- * inspector/InspectorController.h:
- * inspector/InspectorDOMStorageResource.cpp:
- (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource):
- (WebCore::InspectorDOMStorageResource::bind):
- (WebCore::InspectorDOMStorageResource::unbind):
- (WebCore::InspectorDOMStorageResource::startReportingChangesToFrontend):
- (WebCore::InspectorDOMStorageResource::handleEvent):
- (WebCore::InspectorDOMStorageResource::operator==):
- * inspector/InspectorDOMStorageResource.h:
- (WebCore::InspectorDOMStorageResource::cast):
- (WebCore::InspectorDOMStorageResource::id):
- (WebCore::InspectorDOMStorageResource::domStorage):
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::selectDOMStorage):
- (WebCore::InspectorFrontend::didGetDOMStorageEntries):
- (WebCore::InspectorFrontend::didSetDOMStorageItem):
- (WebCore::InspectorFrontend::didRemoveDOMStorageItem):
- (WebCore::InspectorFrontend::updateDOMStorage):
- * inspector/InspectorFrontend.h:
- * inspector/front-end/DOMStorage.js:
- (WebInspector.DOMStorage):
- (WebInspector.DOMStorage.prototype.get id):
- (WebInspector.DOMStorage.prototype.get domStorage):
- (WebInspector.DOMStorage.prototype.get isLocalStorage):
- (WebInspector.DOMStorage.prototype.getEntriesAsync):
- (WebInspector.DOMStorage.prototype.setItemAsync):
- (WebInspector.DOMStorage.prototype.removeItemAsync):
- * inspector/front-end/DOMStorageDataGrid.js:
- (WebInspector.DOMStorageDataGrid):
- (WebInspector.DOMStorageDataGrid.prototype._startEditingColumnOfDataGridNode):
- (WebInspector.DOMStorageDataGrid.prototype._startEditing):
- (WebInspector.DOMStorageDataGrid.prototype._editingCommitted):
- (WebInspector.DOMStorageDataGrid.prototype._editingCancelled):
- (WebInspector.DOMStorageDataGrid.prototype.deleteSelectedRow):
- * inspector/front-end/DOMStorageItemsView.js:
- (WebInspector.DOMStorageItemsView.prototype.update):
- (WebInspector.DOMStorageItemsView.prototype._showDOMStorageEntries):
- (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageEntries):
- * inspector/front-end/StoragePanel.js:
- (WebInspector.StoragePanel.prototype.show):
- (WebInspector.StoragePanel.prototype.reset):
- (WebInspector.StoragePanel.prototype.selectDOMStorage):
- (WebInspector.StoragePanel.prototype.updateDOMStorage):
- (WebInspector.StoragePanel.prototype._domStorageForId):
- * inspector/front-end/inspector.js:
- (WebInspector.addDOMStorage):
- (WebInspector.updateDOMStorage):
-
-2009-09-22 Sam Weinig <sam@webkit.org>
-
- Reviewed by Alexey Proskuryakov.
-
- Fix for XMLHttpRequest.abort() should destroy the response text.
- https://bugs.webkit.org/show_bug.cgi?id=29658
- <rdar://problem/5301430>
-
- Clearing the response text after calling XMLHttpRequest.abort() is necessary
- per spec and matches Firefox. It is also a potential memory win.
-
- Test: http/tests/xmlhttprequest/abort-should-destroy-responseText.html
-
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::abort): Clear the response text making sure to
- keep the actual ResourceReponse around so that the response status and response
- status text are kept around.
-
-2009-09-22 Dimitri Glazkov <dglazkov@chromium.org>
-
- No review, rolling out r48639.
- http://trac.webkit.org/changeset/48639
-
- * bindings/v8/V8GCController.cpp:
- (WebCore::ObjectGrouperVisitor::visitDOMWrapper):
-
-2009-09-22 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Changing the transaction coordinator to (re-)allow multiple read
- transactions on the same database to run concurrently (without
- risking a deadlock this time).
-
- https://bugs.webkit.org/show_bug.cgi?id=29115
-
- Tests: storage/read-and-write-transactions-dont-run-together.html
- storage/read-transactions-running-concurrently.html
-
- * storage/SQLTransaction.h:
- (WebCore::SQLTransaction::isReadOnly): Returns the type of the
- transaction.
- * storage/SQLTransactionCoordinator.cpp:
- (WebCore::SQLTransactionCoordinator::acquireLock): Changed to
- allow multiple read transactions on the same DB to run
- concurrently.
- (WebCore::SQLTransactionCoordinator::releaseLock): Changed to
- allow multiple read transactions on the same DB to run
- concurrently.
- (WebCore::SQLTransactionCoordinator::shutdown): Renamed the map.
- * storage/SQLTransactionCoordinator.h:
-
-2009-09-22 Peter Kasting <pkasting@google.com>
-
- Reviewed by David Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=29652
- Support true system colors for CSS system colors in Chromium/Win.
-
- * rendering/RenderThemeChromiumWin.cpp:
- (WebCore::cssValueIdToSysColorIndex):
- (WebCore::RenderThemeChromiumWin::systemColor):
- * rendering/RenderThemeChromiumWin.h:
-
-2009-09-22 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Dave Hyatt.
-
- Fix for <rdar://problem/6925121> SAP: Wrong width calculation in
- table with fixed layout
- -and corresponding-
- https://bugs.webkit.org/show_bug.cgi?id=29501
-
- New Tests:
- * fast/table/fixed-table-with-percent-inside-percent-table.html: Added.
- * fast/table/fixed-table-with-percent-width-inside-auto-table.html: Added.
- * fast/table/fixed-table-with-percent-width-inside-div.html: Added.
- * fast/table/fixed-table-with-percent-width-inside-extra-large-div.html: Added.
- * fast/table/fixed-table-with-percent-width-inside-fixed-width-table.html: Added.
- * fast/table/fixed-table-with-small-percent-width.html: Added.
-
- This new quirk is very similar to an existing one that was
- implemented in revision 4316.
- * rendering/FixedTableLayout.cpp:
- (WebCore::FixedTableLayout::calcPrefWidths):
-
-2009-09-22 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- List HTTP status code with response headers in resources tab of Web Inspector.
- http://webkit.org/b/19945
-
- This patch adds a new top level list in the resources tab, HTTP Information, that
- for now, contains the Request Method (GET, POST, etc.) and the Status Code (200, 404, etc.).
- Additionally, it adds a colored dot next to the requested URL to show the status
- (green for success, orange for redirect, red for error).
-
- * English.lproj/localizedStrings.js:
- * inspector/front-end/ImageView.js:
- (WebInspector.ImageView):
- * inspector/front-end/Images/errorRedDot.png: Added.
- * inspector/front-end/Images/successGreenDot.png: Added.
- * inspector/front-end/Images/warningOrangeDot.png: Added.
- * inspector/front-end/Resource.js:
- (WebInspector.Resource.StatusTextForCode):
- * inspector/front-end/ResourceView.js:
- (WebInspector.ResourceView):
- (WebInspector.ResourceView.prototype._refreshURL):
- (WebInspector.ResourceView.prototype._refreshHTTPInformation):
- * inspector/front-end/inspector.css:
-
-2009-09-22 Brady Eidson <beidson@apple.com>
-
- Reviewed by Darin Adler.
-
- Back list isn't properly updated for fragment changes after a redirect.
- <rdar://problem/6142803> and https://bugs.webkit.org/show_bug.cgi?id=20355
-
- Test: fast/loader/fragment-after-redirect-gets-back-entry.html
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::loadURL): Properly reset the policy FrameLoadType before
- consulting the policy delegate for fragment scrolling.
-
-2009-09-22 Darin Fisher <darin@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Drop down selects get stuck in the non-visible state and cannot be opened.
- https://bugs.webkit.org/show_bug.cgi?id=29645
-
- All paths that lead to hiding the popup menu must call popupDidHide on
- the PopupMenuClient. This change makes it so by moving all of the
- hiding logic to PopupListBox::hidePopup.
-
- * platform/chromium/PopupMenuChromium.cpp:
- (WebCore::PopupContainer::hidePopup):
- (WebCore::PopupListBox::hidePopup):
- * platform/chromium/PopupMenuChromium.h:
-
-2009-09-22 Patrick Mueller <Patrick_Mueller@us.ibm.com>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector.log() function not protected if console not yet created
- https://bugs.webkit.org/show_bug.cgi?id=29336
-
- No new tests. Only affects Web Inspector developers adding logging
- to their code during development.
-
- * inspector/front-end/inspector.js:
- (WebInspector.log.isLogAvailable):
- (WebInspector.log.flushQueue):
- (WebInspector.log.flushQueueIfAvailable):
- (WebInspector.log.logMessage):
- (WebInspector.log):
-
-2009-09-22 Yaar Schnitman <yaar@chromium.org>
-
- Reviewed by David Levin.
-
- Ported chromium.org's webcore.gyp for the webkit chromium port.
-
- https://bugs.webkit.org/show_bug.cgi?id=29617
-
- * WebCore.gyp/WebCore.gyp: Added.
-
-2009-09-22 Christian Plesner Hansen <christian.plesner.hansen@gmail.com>
-
- Reviewed by Adam Barth.
-
- [v8] Don't keep clean wrappers artificially alive
- We currently keep all DOM node wrappers alive, even when there are
- no more references to them from JS, in case they have properties
- that we need to keep around if new JS references are created.
- This changes the policy to only keep wrappers artificially alive
- if they have changed since they were created. Empty wrappers are
- discarded and recreated as needed.
- https://bugs.webkit.org/show_bug.cgi?id=29330
-
- * bindings/v8/V8GCController.cpp:
- (WebCore::ObjectGrouperVisitor::visitDOMWrapper):
-
-2009-09-22 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: console.count and console.timeEnd
- crash when inspector is opened.
-
- https://bugs.webkit.org/show_bug.cgi?id=29632
-
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::addMessageToConsole):
-
-2009-09-22 Adam Barth <abarth@webkit.org>
-
- Unreviewed.
-
- Fix bogus build fix I did last night.
-
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::V8Custom::WindowSetTimeoutImpl):
-
-2009-09-22 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- NPAPI/Mac: Don't paint plugins if we don't have a CGContextRef
-
- * plugins/mac/PluginViewMac.cpp:
-
-2009-09-22 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reivewed by Simon Hausmann.
-
- Fix the Qt/Mac build after r48604 (Implement new QWebPageClient class)
-
- There's no QWidget::x11Info() on Mac, and setPlatformPluginWidget()
- takes a QWidget*, not a QWebPageClient*
-
- * plugins/mac/PluginViewMac.cpp:
- (WebCore::PluginView::platformStart):
-
-2009-09-21 Adam Barth <abarth@webkit.org>
-
- Attempted fix for the V8 build.
-
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::V8Custom::WindowSetTimeoutImpl):
-
-2009-09-21 Adam Barth <abarth@webkit.org>
-
- Reviewed by Sam Weinig.
-
- Don't re-enter JavaScript after performing access checks
- https://bugs.webkit.org/show_bug.cgi?id=29531
-
- Moved the access check slightly later in this functions to avoid
- re-entering the JavaScript interpreter (typically via toString)
- after performing the access check.
-
- I can't really think of a meaningful test for this change. It's more
- security hygiene.
-
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::setLocation):
- (WebCore::JSDOMWindow::open):
- (WebCore::JSDOMWindow::showModalDialog):
- * bindings/js/JSLocationCustom.cpp:
- (WebCore::JSLocation::setHref):
- (WebCore::JSLocation::replace):
- (WebCore::JSLocation::assign):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::V8Custom::WindowSetTimeoutImpl):
- (WebCore::if):
- (CALLBACK_FUNC_DECL):
- (V8Custom::WindowSetLocation):
- (V8Custom::ClearTimeoutImpl):
- * bindings/v8/custom/V8LocationCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-09-21 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Make all write transaction start with a BEGIN IMMEDIATE command
- instead of BEGIN.
-
- We cannot test this change in a layout test, because in order to
- test it we need to spawn two database threads and execute
- transaction steps on these two threads in a very specific order,
- which seems impossible to do when they share the same main thread
- (as they would in a layout test). The SQLite docs and the case
- described in the bug though should be enough proof that we do have
- a problem here and that this patch will fix it.
-
- Relevant SQLite documentation:
- http://www.sqlite.org/lang_transaction.html
- http://www.sqlite.org/lockingv3.html#locking
-
- https://bugs.webkit.org/show_bug.cgi?id=29218
-
- * platform/sql/SQLiteTransaction.cpp:
- (WebCore::SQLiteTransaction::SQLiteTransaction): Added a readOnly
- parameter.
- (WebCore::SQLiteTransaction::begin): Changed to BEGIN IMMEDIATE
- for write transactions.
- * platform/sql/SQLiteTransaction.h:
- * storage/SQLTransaction.cpp:
- (WebCore::SQLTransaction::openTransactionAndPreflight): Passing
- the read-only flag to the SQLiteTransaction instance.
-
-2009-09-21 Brady Eidson <beidson@apple.com>
-
- Rubberstamped by Mark Rowe.
-
- * DerivedSources.make: Fix the Xcode build on SnowLeopard.
-
-2009-09-15 John Abd-El-Malek <jam@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Prevent sleeps in unload handlers.
- https://bugs.webkit.org/show_bug.cgi?id=29193
-
- Test: fast/dom/Window/slow_unload_handler.html
-
- * WebCore.gypi:
- * bindings/v8/DateExtension.cpp: Added.
- (WebCore::DateExtension::DateExtension):
- (WebCore::DateExtension::get):
- (WebCore::DateExtension::setAllowSleep):
- (WebCore::DateExtension::GetNativeFunction):
- (WebCore::DateExtension::weakCallback):
- (WebCore::DateExtension::GiveEnableSleepDetectionFunction):
- (WebCore::DateExtension::OnSleepDetected):
- * bindings/v8/DateExtension.h: Added.
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::invokeEventHandler):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::createNewContext):
- (WebCore::V8Proxy::registerExtensionWithV8):
- (WebCore::V8Proxy::registeredExtensionWithV8):
- * bindings/v8/V8Proxy.h:
-
-2009-09-21 Jian Li <jianli@chromium.org>
-
- Reviewed by David Levin.
-
- [V8] Run-time exception in onmessage handler is not forwarded to the
- worker object.
- https://bugs.webkit.org/show_bug.cgi?id=28980
-
- The previous fix was partially reverted due to a reliability build break
- in chromium. The break happens when an exception is thrown without
- setting a message. We need to check for this scenario and handle it.
-
- Tested by worker-close.html.
-
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::invokeEventHandler):
- * bindings/v8/V8Utilities.cpp:
- (WebCore::reportException):
-
-2009-09-21 Greg Bolsinga <bolsinga@apple.com>
-
- Reviewed by Simon Fraser & Sam Weinig.
-
- Add ENABLE(ORIENTATION_EVENTS)
- https://bugs.webkit.org/show_bug.cgi?id=29508
-
- See documentation here:
- http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW16
-
- * DerivedSources.make: Use new WebCore.OrientationEvents.exp file if ENABLE_ORIENTATION_EVENTS.
- Add ENABLE_ORIENTATION_EVENTS to the new ADDITIONAL_IDL_DEFINES variable that is passed to the IDL
- code generator. This is because ENABLE_ORIENTATION_EVENTS is not in FEATURE_DEFINES.
- * WebCore.OrientationEvents.exp: Added.
- * WebCore.xcodeproj/project.pbxproj: Add WebCore.OrientationEvents.exp.
- * dom/EventNames.h: Add onorientationchange.
- * html/HTMLAttributeNames.in: Ditto.
- * html/HTMLBodyElement.cpp: Handle onorientationchange properly.
- (WebCore::HTMLBodyElement::parseMappedAttribute):
- (WebCore::HTMLBodyElement::onorientationchange):
- (WebCore::HTMLBodyElement::setOnorientationchange):
- * html/HTMLBodyElement.h: Ditto.
- * html/HTMLBodyElement.idl: Ditto.
- * html/HTMLFrameSetElement.cpp: Ditto.
- (WebCore::HTMLFrameSetElement::parseMappedAttribute):
- (WebCore::HTMLFrameSetElement::onorientationchange):
- (WebCore::HTMLFrameSetElement::setOnorientationchange):
- * html/HTMLFrameSetElement.h: Ditto.
- * html/HTMLFrameSetElement.idl: Ditto.
- * page/DOMWindow.cpp: Ditto.
- (WebCore::DOMWindow::orientation): Calls up the to the Frame for the orientation value.
- (WebCore::DOMWindow::onorientationchange):
- (WebCore::DOMWindow::setOnorientationchange):
- * page/DOMWindow.h: Handle onorientationchange properly.
- * page/DOMWindow.idl: Ditto.
- * page/Frame.cpp: Ditto.
- (WebCore::Frame::Frame):
- (WebCore::Frame::sendOrientationChangeEvent):
- * page/Frame.h: Ditto.
- (WebCore::Frame::orientation):
-
-2009-09-18 Anders Carlsson <andersca@apple.com>
-
- Try fixing the build again.
-
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::wndProc):
-
-2009-09-21 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: completions are always evaluated against
- window (discarding call frames).
-
- https://bugs.webkit.org/show_bug.cgi?id=29616
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype.completions):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.getCompletions):
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel.prototype.selectedCallFrameId):
-
-2009-09-21 Brent Fulgham <bfulgham@webkit.org>
-
- Unreviewed build fix for Windows (Cairo) target.
-
- Add stubs for SocketStream classes added in @r47788, which
- broke the WinCairo build.
-
- No new tests. (Build failure).
-
- * WebCore.vcproj/WebCore.vcproj: Add references to new files
- to Cairo build, exclude from standard Apple build.
- * platform/network/curl/SocketStreamError.h: Added.
- * platform/network/curl/SocketStreamHandle.h: Added.
- * platform/network/curl/SocketStreamHandleCurl.cpp: Added.
-
-2009-09-21 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Expose InspectorResource fields.
-
- https://bugs.webkit.org/show_bug.cgi?id=29537
-
- * inspector/InspectorResource.cpp:
- (WebCore::InspectorResource::sourceString):
- (WebCore::InspectorResource::resourceData):
- * inspector/InspectorResource.h:
- (WebCore::InspectorResource::requestHeaderFields):
- (WebCore::InspectorResource::responseHeaderFields):
- (WebCore::InspectorResource::responseStatusCode):
- (WebCore::InspectorResource::requestMethod):
- (WebCore::InspectorResource::requestFormData):
-
-2009-09-21 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: JS error drilling down childless node.
- No need to dispatch double click twice - it is already handled
- in TreeElement.treeElementDoubleClicked.
-
- https://bugs.webkit.org/show_bug.cgi?id=22144
-
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeOutline):
-
-2009-09-21 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Hausmann.
-
- Implement new QWebPageClient class and let our classes
- QWebViewPrivate and QWebGraphicsItemPrivate inherit from it.
-
- For Qt, platformPageClient() will now return a class derived from
- the QWebPageClient, so the patch adapts our Qt hooks to go though
- this class and not depend on the QWebView.
-
- * WebCore.pro:
- * platform/Widget.h:
- * platform/qt/PlatformScreenQt.cpp:
- (WebCore::screenDepth):
- (WebCore::screenDepthPerComponent):
- (WebCore::screenIsMonochrome):
- (WebCore::screenRect):
- (WebCore::screenAvailableRect):
- * platform/qt/PopupMenuQt.cpp:
- (WebCore::PopupMenu::show):
- * platform/qt/QWebPageClient.h: Added.
- * platform/qt/WidgetQt.cpp:
- (WebCore::Widget::setCursor):
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::handleKeyboardEvent):
- (WebCore::PluginView::getValue):
- (WebCore::PluginView::platformStart):
-
-2009-09-21 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Evaluating on call frame always returns "undefined".
-
- https://bugs.webkit.org/show_bug.cgi?id=29613
-
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.evaluate):
- (InjectedScript._evaluateAndWrap):
- (InjectedScript._evaluateOn):
- (InjectedScript.evaluateInCallFrame):
-
-2009-09-21 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Exception formatting is broken in console.
-
- https://bugs.webkit.org/show_bug.cgi?id=29608
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleCommandResult):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.evaluate):
- (InjectedScript.createProxyObject):
-
-2009-09-21 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Console object formatting is broken.
-
- https://bugs.webkit.org/show_bug.cgi?id=29607
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleMessage.prototype._format):
- * inspector/front-end/ObjectProxy.js:
- (WebInspector.ObjectProxy.wrapPrimitiveValue):
-
-2009-09-21 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Crash When Logging an Element Before Opening Inspector
-
- https://bugs.webkit.org/show_bug.cgi?id=29514
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::populateScriptObjects):
-
-2009-09-21 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Incorrect clipping with accelerated compositing content, and position:fixed
- https://bugs.webkit.org/show_bug.cgi?id=29347
-
- Fix the compositing clipping logic to behave correctly when position:fixed
- elements clip, by using the new backgroundClipRect() method to determine
- when we need to clip, and to compute the clipping layer position.
-
- Test: compositing/overflow/fixed-position-ancestor-clip.html
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::clippedByAncestor):
-
-2009-09-21 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Adam Barth.
-
- Add back in a special case for window.top in the V8 bindings.
-
- https://bugs.webkit.org/show_bug.cgi?id=29605
-
- Fixes LayoutTests/fast/dom/Window/window-property-shadowing.html in the Chromium port.
-
- * bindings/scripts/CodeGeneratorV8.pm: Ensure window.top is not marked as read only, as this breaks the shadowing disabling.
-
-2009-09-21 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Brady Eidson.
-
- HTMLMediaElement: media file should not reload when page comes out of page cache
- https://bugs.webkit.org/show_bug.cgi?id=29604
-
- Test: media/restore-from-page-cache.html
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::userCancelledLoad): Do nothing unless the element
- is still loading. Only fire an 'emptied' event if the readyState is HAVE_NOTHING,
- otherwise set the network state to NETWORK_IDLE.
-
-2009-09-21 Sam Weinig <sam@webkit.org>
-
- Reviewed by Geoffrey "Sean/Shawn/Shaun" Garen.
-
- Clarify two FIXMEs.
-
- * bindings/js/JSHTMLCollectionCustom.cpp:
- (WebCore::getNamedItems):
- * bindings/js/JSHTMLFormElementCustom.cpp:
- (WebCore::JSHTMLFormElement::nameGetter):
-
-2009-09-21 Darin Fisher <darin@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Drop down selects fail to close when a value is selected
- https://bugs.webkit.org/show_bug.cgi?id=29582
-
- Implement PopupListBox::hidePopup, which was previously
- declared but unimplemented. Removes the declaration of
- showPopup since that method is not implemented.
-
- PopupListBox::hidePopup takes care of hiding the popup,
- by invoking hidePopup on its parent PopupContainer, and
- then informs the PopupMenuClient that popupDidHide.
- This mimics the old behavior prior to r48370.
-
- * platform/chromium/PopupMenuChromium.cpp:
- (WebCore::PopupListBox::handleKeyEvent):
- (WebCore::PopupListBox::abandon):
- (WebCore::PopupListBox::acceptIndex):
- (WebCore::PopupListBox::hidePopup):
-
-2009-09-21 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
-
- Rubber-stamped by Simon Hausmann.
-
- [Qt] Windows build fix.
- https://bugs.webkit.org/show_bug.cgi?id=29535
-
- * platform/network/qt/DnsPrefetchHelper.cpp: Missing #include "config.h" added.
-
-2009-09-21 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Unreviewed make dist build fix. Missing files.
-
- * GNUmakefile.am:
-
-2009-09-20 Adam Barth <abarth@webkit.org>
-
- Reviewed by Maciej Stachowiak.
-
- Crash when clicking link in unload handler
- https://bugs.webkit.org/show_bug.cgi?id=29525
-
- Test that the first navigation always wins when the page tries to start
- a new navigation in an unload handler.
-
- Tests: fast/loader/unload-form-about-blank.html
- fast/loader/unload-form-post-about-blank.html
- fast/loader/unload-form-post.html
- fast/loader/unload-form.html
- fast/loader/unload-hyperlink.html
- fast/loader/unload-javascript-url.html
- fast/loader/unload-reload.html
- fast/loader/unload-window-location.html
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::loadURL):
- (WebCore::FrameLoader::loadWithDocumentLoader):
-
-2009-09-18 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Reviewed by Xan Lopez.
-
- [GTK] Sometimes crashes when a page is destroyed/loads another URL while playing video
- https://bugs.webkit.org/show_bug.cgi?id=29496
-
- Protect the video sink object, and destroy it in an idle callback
- to hopefully avoid a race condition that leads to a crash.
-
- This is already tested by media/video-seekable.html
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::idleUnref):
- (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
- (WebCore::MediaPlayerPrivate::createGSTPlayBin):
-
-2009-09-19 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Unreviewed build fix for GTKand a blind one for Qt after r48566.
-
- * GNUmakefile.am:
- * WebCore.pro:
-
-2009-09-19 Sam Weinig <sam@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=29519
- Remove JSNameNodeCollection and just use StaticNodeList
-
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * bindings/js/JSHTMLCollectionCustom.cpp:
- (WebCore::getNamedItems):
- * bindings/js/JSHTMLFormElementCustom.cpp:
- (WebCore::JSHTMLFormElement::nameGetter):
- * bindings/js/JSNamedNodesCollection.cpp: Removed.
- * bindings/js/JSNamedNodesCollection.h: Removed.
-
-2009-09-19 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=29511
-
- Fixes an issue where script code that contains non-ASCII characters may bypass the
- XSSAuditor.
-
- Before performing a comparison between the script source code and input parameters, we
- remove all non-ASCII characters, including non-printable ASCII characters from the
- script source code and input parameters.
-
- Tests: http/tests/security/xssAuditor/img-onerror-non-ASCII-char.html
- http/tests/security/xssAuditor/img-onerror-non-ASCII-char-default-encoding.html
- http/tests/security/xssAuditor/img-onerror-non-ASCII-char2-default-encoding.html
- http/tests/security/xssAuditor/img-onerror-non-ASCII-char2.html
-
- * page/XSSAuditor.cpp:
- (WebCore::isNonCanonicalCharacter): Modified to remove all non-ASCII characters,
- including non-printable ASCII characters.
-
-2009-09-19 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Incorrect animation with scale(0) transform (singular matrix)
- https://bugs.webkit.org/show_bug.cgi?id=29465
-
- Make accelerated scale() and translate() animations go through the component animation
- path (rather than just matrix animation) to avoid problems with singular scale matrices,
- and be slightly more efficient.
-
- Test: compositing/transitions/singular-scale-transition.html
-
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::getTransformFunctionValue):
- (WebCore::getValueFunctionNameForTransformOperation):
-
-2009-09-19 Alex Milowski <alex@milowski.com>
-
- Reviewed by Maciej Stachowiak.
-
- Adds CSS styling and basic DOM element support for MathML
-
- * DerivedSources.make:
- Added user stylesheet and tag factory generation
-
- * WebCore.xcodeproj/project.pbxproj:
- Added new DOM element code
-
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseAttr):
- Added check for document since stylesheet can be added before there is a document
-
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::styleForElement):
- Added check to add MathML user agent stylesheet
-
- * css/mathml.css: Added.
- MathML user agent stylesheet
-
- * dom/Document.cpp:
- (WebCore::Document::createElement):
- Added support for creation of MathML DOM objects
-
- * dom/Node.h:
- (WebCore::Node::isMathMLElement):
- Added check method for whether the node is a MathML node
-
- * mathml: Added.
- * mathml/MathMLElement.cpp: Added.
- (WebCore::MathMLElement::MathMLElement):
- (WebCore::MathMLElement::create):
- (WebCore::MathMLElement::createRenderer):
- * mathml/MathMLElement.h: Added.
- (WebCore::MathMLElement::isMathMLElement):
- MathML DOM base class
-
-
- * mathml/MathMLInlineContainerElement.cpp: Added.
- (WebCore::MathMLInlineContainerElement::MathMLInlineContainerElement):
- (WebCore::MathMLInlineContainerElement::create):
- (WebCore::MathMLInlineContainerElement::createRenderer):
- * mathml/MathMLInlineContainerElement.h: Added.
- Base class for non-text containers
-
- * mathml/MathMLMathElement.cpp: Added.
- (WebCore::MathMLMathElement::MathMLMathElement):
- (WebCore::MathMLMathElement::create):
- * mathml/MathMLMathElement.h: Added.
- Root Math element
-
- * mathml/mathtags.in: Added.
- Element list mappings
-
- * page/Frame.cpp:
- (WebCore::Frame::Frame):
- Added MathML name initialization
-2009-09-19 Adam Barth <abarth@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- Canvas drawn with data URL image raises SECURITY_ERR when toDataUrl() called.
- https://bugs.webkit.org/show_bug.cgi?id=29305
-
- We need to special-case data URLs when tainting a canvas because we
- treat data URLs has having no security origin, unlike other
- browsers. The reason we do this is to help sites avoid XSS via data
- URLs, but that consideration doesn't apply to canvas taint.
-
- Also, we were previously incorrectly taking document.domain state
- into account when tainting canvas.
-
- Tests: http/tests/security/canvas-remote-read-data-url-image.html
- http/tests/security/canvas-remote-read-data-url-svg-image.html
- http/tests/security/canvas-remote-read-remote-image-document-domain.html
-
- * html/canvas/CanvasRenderingContext2D.cpp:
- (WebCore::CanvasRenderingContext2D::checkOrigin):
- (WebCore::CanvasRenderingContext2D::createPattern):
- * page/SecurityOrigin.cpp:
- (WebCore::SecurityOrigin::taintsCanvas):
- * page/SecurityOrigin.h:
-
-2009-09-18 Simon Fraser <simon.fraser@apple.com>
-
- Fix stylistic issue raised in code review for previous commit.
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::hasNonZeroTransformOrigin):
-
-2009-09-18 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Element is misplaced during opacity transition with certain configuration of transform-origin and clipping
- https://bugs.webkit.org/show_bug.cgi?id=29495
-
- If an element has zero size, but has a transform origin with absolute values,
- then the transform origin would not be applied because it is implemented via
- anchorPoint, which is expressed as a fraction of the layer size.
-
- Work around this by artificially inflating the size of the backing store when we need to.
-
- Test: compositing/geometry/transfrom-origin-on-zero-size-layer.html
-
- * rendering/RenderLayerBacking.h:
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::RenderLayerBacking):
- Init m_artificiallyInflatedBounds to false.
-
- (WebCore::hasNonZeroTransformOrigin):
- Utility function that describes whether the transform-origin contains non-percentage
- x or y offsets.
-
- (WebCore::RenderLayerBacking::updateCompositedBounds):
- New wrapper method around setCompositedBounds() that applies the size inflation
- when necessary, setting the m_artificiallyInflatedBounds as appropriate.
-
- (WebCore::RenderLayerBacking::updateAfterLayout): Call updateCompositedBounds().
- (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Ditto
-
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Ditto
- (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry): Ditto
-
-2009-09-18 Antti Koivisto <antti@apple.com>
-
- Reviewed by Maciej Stachowiak.
-
- https://bugs.webkit.org/show_bug.cgi?id=29512
- Don't recalculate style when restoring from the page cache
-
- FrameLoaderClient::forceLayout() also forces style recalc. Instead call FrameView::forceLayout()
- directly to update the scrollbars while keeping the existing style.
-
- Makes back/forward really fast on complex pages (in cases where page cache works).
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::commitProvisionalLoad):
-
-2009-09-18 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Geoff Garen.
-
- Implement ES5 Object.defineProperty function
- https://bugs.webkit.org/show_bug.cgi?id=29503
-
- Override defineOwnProperty on JSDOMWindowShell to forward appropriately,
- and then override defineOwnProperty on JSDOMWindow to disallow cross origin
- defineOwnProperty usage. We also override defineOwnProperty on QuarantinedObjectWrapper
- to ensure correct wrapping semantics of quarantined objects.
-
- One major caveat in this patch is that it currently disallows the use
- of Object.defineProperty on DOMObjects other than the window due to
- the significant work involved in correctly propagating attributes and
- ensuring correct semantics on dom objects.
-
- Tests: fast/js/Object-defineProperty.html
- http/tests/security/xss-DENIED-defineProperty.html
-
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::DOMObject::defineOwnProperty):
- * bindings/js/JSDOMBinding.h:
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::defineGetter):
- (WebCore::JSDOMWindow::defineSetter):
- (WebCore::JSDOMWindow::defineOwnProperty):
- * bindings/js/JSDOMWindowShell.cpp:
- (WebCore::JSDOMWindowShell::defineOwnProperty):
- (WebCore::JSDOMWindowShell::defineGetter):
- (WebCore::JSDOMWindowShell::defineSetter):
- * bindings/js/JSDOMWindowShell.h:
- * bindings/js/JSLocationCustom.cpp:
- (WebCore::JSLocation::defineGetter):
- (WebCore::JSLocationPrototype::defineGetter):
- * bindings/js/JSQuarantinedObjectWrapper.cpp:
- (WebCore::JSQuarantinedObjectWrapper::getOwnPropertyDescriptor):
- (WebCore::JSQuarantinedObjectWrapper::defineOwnProperty):
- * bindings/js/JSQuarantinedObjectWrapper.h:
- * bindings/scripts/CodeGeneratorJS.pm:
-
-2009-09-18 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=29510
- Active DOM objects should be suspended while a modal dialog is displayed
-
- * manual-tests/js-timers-beneath-modal-dialog.html: Added a test for JS timers.
-
- * page/PageGroupLoadDeferrer.cpp:
- (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
- (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
- Match other platforms, and make Mac also suspend active DOM objects. Since a page that
- currently displays a modal dialog cannot go into page cache, there is no danger of suspending
- an object twice.
-
-2009-09-18 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
-
- Reviewed by Eric Seidel.
-
- [Qt] Buildfix caused by http://trac.webkit.org/changeset/48513
- https://bugs.webkit.org/show_bug.cgi?id=29351
-
- * bridge/qt/qt_instance.h: createRuntimeObject method renamed to newRuntimeObject.
- * bridge/runtime.h: Visibility of newRuntimeObject method modified to protected.
-
-2009-09-18 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Fix parameter substitutions in console.log().
-
- https://bugs.webkit.org/show_bug.cgi?id=29366
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleMessage.prototype._format):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.getPrototypes):
- (InjectedScript.CallFrameProxy.prototype._wrapScopeChain):
- * inspector/front-end/utilities.js:
- ():
-
-2009-09-18 Sam Weinig <sam@webkit.org>
-
- Reviewed by Geoffrey Garen and Brady Eidson.
-
- Temporarily remove an assertion that was getting hit when going
- back to a page in the page cache while a banner in Safari was visible.
- We should re-enable this once that is fixed. See <rdar://problem/7218118>
-
- * page/FrameView.cpp:
- (WebCore::FrameView::scheduleRelayout):
-
-2009-09-18 Anders Carlsson <andersca@apple.com>
-
- Try fixing the build again.
-
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::wndProc):
-
-2009-09-18 Anders Carlsson <andersca@apple.com>
-
- Fix windows build.
-
- * platform/win/PopupMenuWin.cpp:
-
-2009-09-18 Sam Weinig <sam@webkit.org>
-
- Reviewed by Gavin 'BearClaw' Barraclough.
-
- Convert another callback type object to store the global object
- instead of the frame.
-
- * bindings/js/JSCustomXPathNSResolver.cpp:
- (WebCore::JSCustomXPathNSResolver::create):
- (WebCore::JSCustomXPathNSResolver::JSCustomXPathNSResolver):
- (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
- * bindings/js/JSCustomXPathNSResolver.h:
-
-2009-09-18 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Sam Weinig.
-
- https://bugs.webkit.org/show_bug.cgi?id=29332
- <rdar://problem/7231652>
- REGRESSION (r48446): While a <select> popup menu is open, the
- rest of the WebView doesn't respond to mouse move events.
-
- * platform/win/PopupMenuWin.cpp:
- (WebCore::translatePoint):
- New helper function that translates a point between HWND coordinates.
-
- (WebCore::PopupMenu::show):
- Protect the PopupMenu if someone removes the <select> in response to a mouse
- event. Handle WM_HOST_WINDOW_MOUSEMOVE events.
-
- (WebCore::PopupMenu::wndProc):
- in the WM_MOUSEMOVE handler, if the mouse is not over the popup, post a
- WM_HOST_WINDOW_MOUSEMOVE event so that the host window (the WebView) gets the
- mouse move event.
-
-2009-09-18 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt.
-
- Compositing layers are incorrectly positioned after scrolling with position:fixed
- https://bugs.webkit.org/show_bug.cgi?id=29262
-
- When scrolling a page with compositing layers inside a position:fixed element,
- we need to update the compositing layer positions when the scroll position changes.
-
- Test: compositing/geometry/fixed-position.html
-
- * WebCore.base.exp:
- Export FrameView::scrollPositionChanged()
-
- * page/FrameView.h:
- * page/FrameView.cpp:
- (WebCore::FrameView::scrollPositionChanged):
- New method that sends the scroll event, and updates compositing layers positions if necessary.
-
-2009-09-18 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt.
-
- Transformed elements inside position:fixed container are clipped incorrectly
- https://bugs.webkit.org/show_bug.cgi?id=29346
-
- Fix clipping and hit testing on transformed elements inside a position:fixed element.
- Previously, the code used the overflowClipRect of the parent clip rects, but
- this is not correct for fixed postion elements. Instead, share code that is
- already present in calculateRects() to get the correct rect.
-
- Test: fast/overflow/position-fixed-transform-clipping.html
-
- * rendering/RenderLayer.h:
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::paintLayer):
- (WebCore::RenderLayer::hitTestLayer):
- Call the new backgroundClipRect() to get the correct clipRect.
-
- (WebCore::RenderLayer::backgroundClipRect):
- New method, factored out of calculateRects(), that computes the clip rect,
- doing the right thing for fixed position elements.
-
- (WebCore::RenderLayer::calculateRects):
- Call the new backgroundClipRect() method.
-
-2009-09-18 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Darin Adler.
-
- Fix <rdar://problem/7050773> REGRESSION (r40098) Crash at
- WebCore::RenderBlock::layoutBlock()
- https://bugs.webkit.org/show_bug.cgi?id=29498
-
- Test: accessibility/nested-layout-crash.html
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::updateBackingStore): Changed to
- call Document::updateLayoutIgnorePendingStylesheets() instead of
- calling RenderObject::layoutIfNeeded(). The latter requires that
- there be no pending style recalc, which allows methods that call
- Document::updateLayout() to be called during layout without risking
- re-entry into layout.
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper accessibilityActionNames]): Null-check
- m_object after calling updateBackingStore(), since style recalc may
- destroy the renderer, which destroys the accessibility object and
- detaches it from the wrapper.
- (-[AccessibilityObjectWrapper accessibilityAttributeNames]): Ditto.
- (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): Ditto.
- (-[AccessibilityObjectWrapper accessibilityFocusedUIElement]): Ditto.
- (-[AccessibilityObjectWrapper accessibilityHitTest:]): Ditto.
- (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
- Ditto.
- (-[AccessibilityObjectWrapper accessibilityIsIgnored]): Ditto.
- (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
- Ditto.
- (-[AccessibilityObjectWrapper accessibilityPerformPressAction]): Ditto.
- (-[AccessibilityObjectWrapper accessibilityPerformIncrementAction]):
- Ditto.
- (-[AccessibilityObjectWrapper accessibilityPerformDecrementAction]):
- Ditto.
- (-[AccessibilityObjectWrapper accessibilityPerformAction:]): Ditto.
- (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
- Ditto.
- (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
- Ditto.
- (-[AccessibilityObjectWrapper accessibilityIndexOfChild:]): Ditto.
- (-[AccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
- Ditto.
- (-[AccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
- Ditto.
-
-2009-09-18 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Simon Hausmann.
-
- Update Qt build system for Web Socket.
- https://bugs.webkit.org/show_bug.cgi?id=29270
-
- * WebCore.pro:
- * platform/network/qt/SocketStreamError.h: Added.
- * platform/network/qt/SocketStreamHandle.h: Added.
- * platform/network/qt/SocketStreamHandleSoup.cpp: Added.
-
-2009-09-18 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Darin Adler.
-
- NULL check HTMLMediaElement::m_playedTimeRanges.
- Fix for https://bugs.webkit.org/show_bug.cgi?id=29494
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::addPlayedRange): New. Create m_playedTimeRanges if
- necessary, add range specified.
- (WebCore::HTMLMediaElement::seek): Use addPlayedRange.
- (WebCore::HTMLMediaElement::played): Use addPlayedRange. Change time comparison
- to be more readable.
- (WebCore::HTMLMediaElement::updatePlayState): Ditto.
- * html/HTMLMediaElement.h:
-
-2009-09-18 Sam Weinig <sam@webkit.org>
-
- Reviewed by Adele Peterson.
-
- Follow up fix for https://bugs.webkit.org/show_bug.cgi?id=29276
- REGRESSION(r48334): WebKit crashes on file select by drag
-
- Don't use Document.elementFromPoint since it returns null if the point
- is outside the viewport. Instead, just hit test ourselves.
-
- Test: fast/events/drag-file-crash.html
-
- * page/DragController.cpp:
- (WebCore::elementUnderMouse):
- (WebCore::DragController::tryDocumentDrag):
- (WebCore::DragController::concludeEditDrag):
-
-2009-09-18 Darin Adler <darin@apple.com>
-
- Reviewed by Sam Weinig.
-
- Each wrapped Objective-C object should use a single RuntimeObjectImp
- https://bugs.webkit.org/show_bug.cgi?id=29351
- rdar://problem/7142294
-
- * WebCore.base.exp: Added a newly-needed exported symbol.
-
- * bindings/objc/DOMInternal.h: Eliminated unused
- createWrapperCacheWithIntegerKeys; it has not been needed since the
- RGBColor wrappers were reworked.
- * bindings/objc/DOMInternal.mm: Ditto.
-
- * bridge/objc/objc_instance.h: Made the create function non-inline.
- * bridge/objc/objc_instance.mm:
- (createInstanceWrapperCache): Added. Creates an appropriate map table.
- (ObjcInstance::create): Moved here from header. Uses NSMapGet and
- NSMapInsert to cache the instance in a map table.
- (ObjcInstance::~ObjcInstance): Added a call to NSMapRemove to remove
- the instance from the map table.
-
- * bridge/qt/qt_instance.cpp:
- (JSC::Bindings::QtInstance::~QtInstance): Remove unneeded code to remove
- the instance from cachedObjects, which no longer exists.
- (JSC::Bindings::QtInstance::newRuntimeObject): Renamed to overload new
- bottleneck. Caching is now handled by the base class.
-
- * bridge/runtime.cpp:
- (JSC::Bindings::Instance::Instance): Initialize m_runtimeObject to 0.
- (JSC::Bindings::Instance::~Instance): Assert m_runtimeObject is 0.
- (JSC::Bindings::Instance::createRuntimeObject): Use m_runtimeObject
- if it's already set. Set m_runtimeObject and call addRuntimeObject
- if it's not.
- (JSC::Bindings::Instance::newRuntimeObject): Added. Virtual function,
- used only by createRuntimeObject.
- (JSC::Bindings::Instance::willDestroyRuntimeObject): Added.
- Calls removeRuntimeObject and then clears m_runtimeObject.
- (JSC::Bindings::Instance::willInvalidateRuntimeObject): Added.
- Clears m_runtimeObject.
-
- * bridge/runtime.h: Made createRuntimeObject non-virtual. Added
- willDestroyRuntimeObject, willInvalidateRuntimeObject,
- newRuntimeObject, and m_runtimeObject.
-
- * bridge/runtime_object.cpp:
- (JSC::RuntimeObjectImp::RuntimeObjectImp): Removed addRuntimeObject
- call, now handled by caller.
- (JSC::RuntimeObjectImp::~RuntimeObjectImp): Replaced removeRuntimeObject
- call with willDestroyRuntimeObject call; the latter nows calls
- removeRuntimeObject.
- (JSC::RuntimeObjectImp::invalidate): Added willInvalidateRuntimeObject
- call.
-
- * bridge/runtime_object.h: Made invalidate non-virtual.
-
-2009-09-18 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Hausmann.
-
- Make PlatformWindow return something else than PlatformWidget
- https://bugs.webkit.org/show_bug.cgi?id=29085
-
- Make platformWindow return a PlatformPageClient
- (for now typedef'ed to PlatformWidget)
-
- Also, change the name of platformWindow to platformPageClient()
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (getPangoLayoutForAtk):
- * accessibility/win/AXObjectCacheWin.cpp:
- (WebCore::AXObjectCache::postPlatformNotification):
- (WebCore::AXObjectCache::handleFocusedUIElementChanged):
- * loader/EmptyClients.h:
- (WebCore::EmptyChromeClient::platformPageClient):
- * page/Chrome.cpp:
- (WebCore::Chrome::platformPageClient):
- * page/Chrome.h:
- * page/ChromeClient.h:
- * page/mac/EventHandlerMac.mm:
- (WebCore::EventHandler::wheelEvent):
- (WebCore::EventHandler::currentPlatformMouseEvent):
- (WebCore::EventHandler::sendContextMenuEvent):
- (WebCore::EventHandler::eventMayStartDrag):
- * platform/HostWindow.h:
- * platform/Widget.h:
- * platform/gtk/PlatformScreenGtk.cpp:
- (WebCore::getVisual):
- (WebCore::screenRect):
- (WebCore::screenAvailableRect):
- * platform/gtk/PopupMenuGtk.cpp:
- (WebCore::PopupMenu::show):
- * platform/gtk/ScrollViewGtk.cpp:
- (WebCore::ScrollView::platformAddChild):
- (WebCore::ScrollView::platformRemoveChild):
- (WebCore::ScrollView::visibleContentRect):
- * platform/gtk/WidgetGtk.cpp:
- (WebCore::Widget::setFocus):
- (WebCore::Widget::setCursor):
- * platform/qt/PlatformScreenQt.cpp:
- (WebCore::screenDepth):
- (WebCore::screenDepthPerComponent):
- (WebCore::screenIsMonochrome):
- (WebCore::screenRect):
- (WebCore::screenAvailableRect):
- * platform/qt/PopupMenuQt.cpp:
- (WebCore::PopupMenu::show):
- * platform/qt/WidgetQt.cpp:
- (WebCore::Widget::setCursor):
- * platform/win/PlatformScreenWin.cpp:
- (WebCore::monitorInfoForWidget):
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::show):
- (WebCore::PopupMenu::calculatePositionAndSize):
- (WebCore::PopupMenu::wndProc):
- * platform/wx/RenderThemeWx.cpp:
- (WebCore::nativeWindowForRenderObject):
- * platform/wx/ScrollbarThemeWx.cpp:
- (WebCore::ScrollbarThemeWx::paint):
- * plugins/gtk/PluginViewGtk.cpp:
- (WebCore::PluginView::getValue):
- (WebCore::PluginView::forceRedraw):
- (WebCore::PluginView::platformStart):
- * plugins/mac/PluginViewMac.cpp:
- (WebCore::PluginView::platformStart):
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::handleKeyboardEvent):
- (WebCore::PluginView::getValue):
- (WebCore::PluginView::platformStart):
- * plugins/win/PluginViewWin.cpp:
- (WebCore::PluginView::getValue):
- (WebCore::PluginView::forceRedraw):
- (WebCore::PluginView::platformStart):
-
-2009-09-18 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Web inspector UI adjustments specific to the Qt platform:
- - Hide the close button
- - Hide the dock button
- - Disable the draggable toolbar
-
- https://bugs.webkit.org/show_bug.cgi?id=29384
-
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.js:
- (WebInspector.toolbarDragStart):
-
-2009-09-18 Joerg Bornemann <joerg.bornemann@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- QtWebKit Windows CE compile fixes
-
- Exclude certain pure-WINCE specific code paths from the Qt build.
-
- * platform/graphics/BitmapImage.h:
- * platform/graphics/FontCache.h:
- * platform/graphics/MediaPlayer.cpp:
- * platform/text/TextEncodingRegistry.cpp:
- (WebCore::buildBaseTextCodecMaps):
- (WebCore::extendTextCodecMaps):
- * plugins/PluginView.cpp:
- (WebCore::PluginView::stop): Guard this code block with NETSCAPE_PLUGIN_API as
- the corresponding PluginViewWndProc has the same guard in the header file.
-
-2009-09-18 Steve Block <steveblock@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- Geolocation does not correctly handle Infinity for PositionOptions properties.
- https://bugs.webkit.org/show_bug.cgi?id=29099
-
- * bindings/js/JSGeolocationCustom.cpp: Modified.
- (WebCore::createPositionOptions): Modified. If timeout or maximumAge is positive infinity, applies these values as a special case.
- * page/PositionOptions.h: Modified.
- (WebCore::PositionOptions::hasMaximumAge): Added. Determines whether the object has a maximum age.
- (WebCore::PositionOptions::maximumAge): Modified. Asserts that the object has a maximum age.
- (WebCore::PositionOptions::clearMaximumAge): Added. Clears the maximum age.
- (WebCore::PositionOptions::setMaximumAge): Modified. Registers that the maximum age has been set.
- (WebCore::PositionOptions::PositionOptions): Modified. Registers that the maximum age has been set.
-
-2009-09-17 Sam Weinig <sam@webkit.org>
-
- Reviewed by Adele Peterson.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=29276
- REGRESSION(r48334): WebKit crashes on file select by drag
-
- Document.elementFromPoint now takes point in client space, not page space.
-
- * page/DragController.cpp:
- (WebCore::DragController::tryDocumentDrag):
- (WebCore::DragController::concludeEditDrag):
-
-2009-09-17 Albert J. Wong <ajwong@chromium.org>
-
- Reviewed by David Levin.
-
- Reimplement default media UI for Mac Chromium to match the style
- of the Windows and Linux versions. Also breaks the dependency
- on the internal wk* functions that were previously used to
- render the media controller widgets.
- https://bugs.webkit.org/show_bug.cgi?id=29161
-
- No media layout tests are currently enabled in Mac Chromium, so
- nothing needs rebaselineing, etc.
-
- This is a recommit of r48438 with a compile fix and merges of
- recent changes to the file.
-
- * css/mediaControlsChromium.css:
- * rendering/RenderThemeChromiumMac.h:
- * rendering/RenderThemeChromiumMac.mm:
- (WebCore::mediaElementParent):
- (WebCore::RenderThemeChromiumMac::extraMediaControlsStyleSheet):
- (WebCore::mediaSliderThumbImage):
- (WebCore::mediaVolumeSliderThumbImage):
- (WebCore::RenderThemeChromiumMac::paintSliderTrack):
- (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize):
- (WebCore::RenderThemeChromiumMac::paintMediaButtonInternal):
- (WebCore::RenderThemeChromiumMac::paintMediaPlayButton):
- (WebCore::RenderThemeChromiumMac::paintMediaMuteButton):
- (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
- (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderTrack):
- (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb):
- (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderThumb):
- (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground):
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize):
-
-2009-09-17 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- The Console scope bar should have a divider between All and the other possible
- values (Errors, Warnings, Logs). It will look something like:
-
- All | Errors Warnings Logs.
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.createDividerElement):
- (WebInspector.ConsoleView):
- * inspector/front-end/inspector.css:
-
-2009-09-17 Sam Weinig <sam@webkit.org>
-
- Reviewed by Mark Rowe.
-
- Remove additional references to JSVoidCallback which no longer exists.
-
- * DerivedSources.cpp:
- * WebCore.vcproj/WebCore.vcproj:
-
-2009-09-17 Sam Weinig <sam@webkit.org>
-
- Reviewed by Brady Eidson.
-
- Remove commented out onhashchange attribute now that it is implemented.
-
- * page/DOMWindow.idl:
-
-2009-09-17 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Oliver Hunt.
-
- <rdar://problem/7007541>
- CrashTracer: 4800crashes in Safari at com.apple.WebKit • WTF::HashTableIterator...
-
- Make RuntimeObjectImp more robust against m_instance being a null (which can happen if an OOP plug-in
- crashes while we're calling into it).
-
- * bridge/runtime_object.cpp:
- (JSC::RuntimeObjectImp::RuntimeObjectImp):
- (JSC::RuntimeObjectImp::~RuntimeObjectImp):
- (JSC::RuntimeObjectImp::invalidate):
- (JSC::RuntimeObjectImp::fallbackObjectGetter):
- (JSC::RuntimeObjectImp::fieldGetter):
- (JSC::RuntimeObjectImp::methodGetter):
- (JSC::RuntimeObjectImp::getOwnPropertySlot):
- (JSC::RuntimeObjectImp::getOwnPropertyDescriptor):
- (JSC::RuntimeObjectImp::put):
- (JSC::RuntimeObjectImp::defaultValue):
- (JSC::RuntimeObjectImp::getCallData):
- (JSC::RuntimeObjectImp::getConstructData):
- (JSC::RuntimeObjectImp::getPropertyNames):
- * bridge/runtime_object.h:
- (JSC::RuntimeObjectImp::getInternalInstance):
-
-2009-09-17 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Wrap primitive values (as objects) in InspectorController::wrap.
-
- https://bugs.webkit.org/show_bug.cgi?id=28983
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::wrapObject): objects of any type will be wrapped into proxies,
- only object proxies will have objectId.
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype.completions): there is InjectedScript.getCompletionsi
- that accepts an expression and returns possible completions. This way we don't need to wrap
- and unwrap the completions result into a proxy object.
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.getCompletions):
- (InjectedScript.evaluate):
- (InjectedScript._evaluateOn):
- (InjectedScript.createProxyObject):
- * inspector/front-end/InjectedScriptAccess.js:
-
-2009-09-17 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Wrap PageTransitionEvents properly for V8's use.
-
- https://bugs.webkit.org/show_bug.cgi?id=29340
-
- Fixes Chromium's failures for LayoutTests/fast/events/pageshow-pagehide.html.
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::convertEventToV8Object): Wrap PageTransitionEvents properly.
-
-2009-09-17 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt.
-
- Hardware-accelerated opacity transition on inline asserts
- https://bugs.webkit.org/show_bug.cgi?id=29342
-
- Remove an erroneous toRenderBox() that could be called on a RenderInline; we can just
- pass an empty size, because the box size is only required for transform animations.
-
- Test: compositing/transitions/opacity-on-inline.html
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::startTransition):
-
-2009-09-17 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- [V8] OwnHandle might get a weak callback after destruction
- https://bugs.webkit.org/show_bug.cgi?id=29172
-
- Be sure to clear out weak reference so we don't get a weak callback
- after we've destructed ourselves. Also, removed some tricky methods
- that had no clients.
-
- * bindings/v8/OwnHandle.h:
- (WebCore::OwnHandle::clear):
-
-2009-09-17 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- [V8] Partial roll out of http://trac.webkit.org/changeset/48455 to
- fix crashes that started happening in V8Proxy::getEnteredContext().
-
- * bindings/v8/ScheduledAction.cpp:
- (WebCore::ScheduledAction::execute):
-
-2009-09-17 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Beth Dakin.
-
- AX: labels of checkboxes should, when hit-tested, return the checkbox
- https://bugs.webkit.org/show_bug.cgi?id=29335
-
- When an accessibility hit test is done and it hits the label of a control element,
- the control element should be returned instead of nothing, since the label
- itself is usually ignored.
-
- Test: accessibility/label-for-control-hittest.html
-
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::correspondingControlForLabelElement):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
- (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
- (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement):
- * accessibility/AccessibilityRenderObject.h:
-
-2009-09-17 Avi Drissman <avi@chromium.org>
-
- Reviewed by Dimitri Glazkov, build fix.
-
- Change to make RenderThemeChromiumMac compile inside of non PLATFORM(MAC).
- https://bugs.webkit.org/show_bug.cgi?id=29243
-
- Covered by existing tests.
-
- * rendering/RenderThemeChromiumMac.mm:
- (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
-
-2009-09-17 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Eric Seidel.
-
- [V8] Accessing properties/methods of an object, created with document.implementation.createDocumentType
- creates nodes that have no document (ScriptExecutionContext), which in turn produces NULL-ref crashes.
- https://bugs.webkit.org/show_bug.cgi?id=26402
-
- Test: fast/dom/DOMImplementation/detached-doctype.html
- fast/dom/doctype-event-listener-crash.html
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getEventListener): Added an extra NULL-check.
-
-2009-09-17 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Simon Fraser.
-
- FontDescription.h includes RenderStyleConstants.h, which violates layering
- https://bugs.webkit.org/show_bug.cgi?id=29327
-
- * GNUmakefile.am: Added FontSmoothingMode.h.
- * WebCore.gypi: Added FontSmoothingMode.h.
- * WebCore.vcproj/WebCore.vcproj: Added FontSmoothingMode.h.
- * WebCore.xcodeproj/project.pbxproj: Added FontSmoothingMode.h and made
- it a private header.
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Get the
- font smoothing mode via the font description.
- * css/CSSPrimitiveValueMappings.h: Include FontSmoothingMode.h
- (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Updated for the rename
- of FontSmoothing to FontSmoothingMode.
- (WebCore::CSSPrimitiveValue::operator FontSmoothingMode): Ditto.
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty): Get the font smoothing mode
- via the font description.
- * platform/graphics/FontDescription.h: Do not include
- RenderStyleConstants.h.
- (WebCore::FontDescription::fontSmoothing): Updated for the rename of
- FontSmoothing to FontSmoothingMode.
- (WebCore::FontDescription::setFontSmoothing): Ditto.
- * platform/graphics/FontSmoothingMode.h: Added.
- (WebCore::FontSmoothingMode): Moved the FontSmoothing enum from
- RenderStyleConstants here and renamed it to this.
- * rendering/style/RenderStyle.h:
- (WebCore::InheritedFlags::fontSmoothing): Removed this getter, since
- this can be accessed via the font description.
- * rendering/style/RenderStyleConstants.h: Moved the FontSmoothing enum
- from here to FontSmoothingMode.h.
-
-2009-09-17 Kevin Ollivier <kevino@theolliviers.com>
-
- wx 2.9 build fix.
-
- * platform/wx/wxcode/gtk/scrollbar_render.cpp:
- (wxGetGdkWindowForDC):
-
-2009-09-16 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Elements appear behind <video> when they should be in front sometimes
- https://bugs.webkit.org/show_bug.cgi?id=29314
-
- r45598 added logic that tests for overlap with <video> to determine when to throw
- a layer into compositing mode. That logic was incorrect in some cases, and this patch
- fixes it. When testing overlap, the layer needs to be composited iff some previous layer
- is composited (which adds a rect to the overlay map), and there is overlap.
-
- Test: compositing/geometry/video-opacity-overlay.html
-
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::CompositingState::CompositingState):
- (WebCore::RenderLayerCompositor::computeCompositingRequirements):
-
-2009-09-17 Avi Drissman <avi@google.com>
-
- Reviewed by Darin Fisher.
-
- Update the Chromium Mac theming files (RenderTheme and Theme) to be
- up-to-date.
-
- https://bugs.webkit.org/show_bug.cgi?id=29243
- http://crbug.com/19604
-
- Covered by existing tests.
-
- * WebCore.gypi:
- * platform/chromium/ThemeChromiumMac.h: Added.
- (WebCore::ThemeChromiumMac::ThemeChromiumMac):
- (WebCore::ThemeChromiumMac::~ThemeChromiumMac):
- (WebCore::ThemeChromiumMac::controlRequiresPreWhiteSpace):
- * platform/chromium/ThemeChromiumMac.mm: Added.
- (WebCore::):
- (WebCore::platformTheme):
- (WebCore::controlSizeForFont):
- (WebCore::sizeFromFont):
- (WebCore::setControlSize):
- (WebCore::updateStates):
- (WebCore::inflateRect):
- (WebCore::checkboxSizes):
- (WebCore::checkboxMargins):
- (WebCore::checkboxSize):
- (WebCore::checkbox):
- (WebCore::paintCheckbox):
- (WebCore::radioSizes):
- (WebCore::radioMargins):
- (WebCore::radioSize):
- (WebCore::radio):
- (WebCore::paintRadio):
- (WebCore::buttonSizes):
- (WebCore::buttonMargins):
- (WebCore::button):
- (WebCore::paintButton):
- (WebCore::ThemeChromiumMac::baselinePositionAdjustment):
- (WebCore::ThemeChromiumMac::controlFont):
- (WebCore::ThemeChromiumMac::controlSize):
- (WebCore::ThemeChromiumMac::minimumControlSize):
- (WebCore::ThemeChromiumMac::controlBorder):
- (WebCore::ThemeChromiumMac::controlPadding):
- (WebCore::ThemeChromiumMac::inflateControlPaintRect):
- (WebCore::ThemeChromiumMac::paint):
- * platform/graphics/FloatPoint.h:
- * platform/graphics/FloatRect.h:
- * platform/graphics/FloatSize.h:
- * platform/graphics/IntRect.h:
- * rendering/RenderThemeChromiumMac.h:
- (WebCore::RenderThemeChromiumMac::supportsControlTints):
- (WebCore::RenderThemeChromiumMac::scrollbarControlSizeForPart):
- (WebCore::RenderThemeChromiumMac::supportsSelectionForegroundColors):
- * rendering/RenderThemeChromiumMac.mm:
- (-[WebCoreRenderThemeNotificationObserver systemColorsDidChange:]):
- (-[RTCMFlippedView isFlipped]):
- (-[RTCMFlippedView currentEditor]):
- (WebCore::):
- (WebCore::FlippedView):
- (WebCore::RenderTheme::themeForPage):
- (WebCore::RenderThemeChromiumMac::platformActiveListBoxSelectionForegroundColor):
- (WebCore::RenderThemeChromiumMac::platformInactiveListBoxSelectionForegroundColor):
- (WebCore::RenderThemeChromiumMac::platformInactiveListBoxSelectionBackgroundColor):
- (WebCore::RenderThemeChromiumMac::systemFont):
- (WebCore::convertNSColorToColor):
- (WebCore::menuBackgroundColor):
- (WebCore::RenderThemeChromiumMac::systemColor):
- (WebCore::RenderThemeChromiumMac::isControlStyled):
- (WebCore::RenderThemeChromiumMac::adjustRepaintRect):
- (WebCore::RenderThemeChromiumMac::inflateRect):
- (WebCore::RenderThemeChromiumMac::convertToPaintingRect):
- (WebCore::RenderThemeChromiumMac::setFontFromControlSize):
- (WebCore::RenderThemeChromiumMac::paintTextField):
- (WebCore::RenderThemeChromiumMac::paintCapsLockIndicator):
- (WebCore::RenderThemeChromiumMac::paintTextArea):
- (WebCore::RenderThemeChromiumMac::paintMenuList):
- (WebCore::TopGradientInterpolate):
- (WebCore::BottomGradientInterpolate):
- (WebCore::MainGradientInterpolate):
- (WebCore::TrackGradientInterpolate):
- (WebCore::RenderThemeChromiumMac::paintMenuListButtonGradients):
- (WebCore::RenderThemeChromiumMac::paintMenuListButton):
- (WebCore::RenderThemeChromiumMac::popupInternalPaddingLeft):
- (WebCore::RenderThemeChromiumMac::popupInternalPaddingRight):
- (WebCore::RenderThemeChromiumMac::popupInternalPaddingTop):
- (WebCore::RenderThemeChromiumMac::popupInternalPaddingBottom):
- (WebCore::RenderThemeChromiumMac::adjustMenuListButtonStyle):
- (WebCore::RenderThemeChromiumMac::adjustSliderTrackStyle):
- (WebCore::RenderThemeChromiumMac::adjustSliderThumbStyle):
- (WebCore::RenderThemeChromiumMac::paintSliderThumb):
- (WebCore::RenderThemeChromiumMac::paintSearchField):
- (WebCore::RenderThemeChromiumMac::setSearchCellState):
- (WebCore::RenderThemeChromiumMac::adjustSearchFieldStyle):
- (WebCore::RenderThemeChromiumMac::paintSearchFieldCancelButton):
- (WebCore::RenderThemeChromiumMac::adjustSearchFieldCancelButtonStyle):
- (WebCore::RenderThemeChromiumMac::adjustSearchFieldDecorationStyle):
- (WebCore::RenderThemeChromiumMac::paintSearchFieldDecoration):
- (WebCore::RenderThemeChromiumMac::adjustSearchFieldResultsDecorationStyle):
- (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsDecoration):
- (WebCore::RenderThemeChromiumMac::adjustSearchFieldResultsButtonStyle):
- (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsButton):
- (WebCore::mediaControllerTheme):
- (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize):
- (WebCore::getMediaUIPartStateFlags):
- (WebCore::getUnzoomedRectAndAdjustCurrentContext):
- (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton):
- (WebCore::RenderThemeChromiumMac::paintMediaMuteButton):
- (WebCore::RenderThemeChromiumMac::paintMediaPlayButton):
- (WebCore::RenderThemeChromiumMac::paintMediaSeekBackButton):
- (WebCore::RenderThemeChromiumMac::paintMediaSeekForwardButton):
- (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
- (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb):
- (WebCore::RenderThemeChromiumMac::paintMediaRewindButton):
- (WebCore::RenderThemeChromiumMac::paintMediaReturnToRealtimeButton):
- (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground):
- (WebCore::RenderThemeChromiumMac::paintMediaCurrentTime):
- (WebCore::RenderThemeChromiumMac::paintMediaTimeRemaining):
- (WebCore::RenderThemeChromiumMac::extraMediaControlsStyleSheet):
-
-2009-09-16 Daniel Bates <dbates@webkit.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=29306
-
- Fixes an issue where an attack that contains accented characters can
- bypass the XSSAuditor.
-
- XSSAuditor::decodeURL used the wrong length for the input string.
- When the input string was decoded, the decoded result was truncated.
- Hence, XSSAuditor was comparing the source code of the script to the
- truncated input parameters.
-
- Test: http/tests/security/xssAuditor/img-onerror-accented-char.html
-
- * page/XSSAuditor.cpp:
- (WebCore::XSSAuditor::decodeURL):
-
-2009-09-16 Brady Eidson <beidson@apple.com>
-
- Reviewed by Sam Weinig.
-
- Explore allowing pages with unload handlers into the Page Cache
- https://bugs.webkit.org/show_bug.cgi?id=29021
-
- No new tests. (All previous tests continue to pass)
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::stopLoading): If the document is in the page cache, don't fire the unload event.
-
-2009-09-16 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Teach ScheduledAction::execute about isolated worlds
- https://bugs.webkit.org/show_bug.cgi?id=27703
-
- We now save a handle to the original context. We use that handle to
- call the timeout in the right context / world.
-
- Tests: http/tests/security/isolatedWorld/window-setTimeout-function.html
- http/tests/security/isolatedWorld/window-setTimeout-string.html
-
- * bindings/v8/ScheduledAction.cpp:
- (WebCore::ScheduledAction::ScheduledAction):
- (WebCore::ScheduledAction::execute):
- * bindings/v8/ScheduledAction.h:
- (WebCore::ScheduledAction::ScheduledAction):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::V8Custom::WindowSetTimeoutImpl):
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::SetTimeoutOrInterval):
-
-2009-09-16 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Teach ScheduledAction::execute about isolated worlds
- https://bugs.webkit.org/show_bug.cgi?id=27703
-
- We now save a handle to the original context. We use that handle to
- call the timeout in the right context / world.
-
- Tests: http/tests/security/isolatedWorld/window-setTimeout-function.html
- http/tests/security/isolatedWorld/window-setTimeout-string.html
-
- * bindings/v8/ScheduledAction.cpp:
- (WebCore::ScheduledAction::ScheduledAction):
- (WebCore::ScheduledAction::execute):
- * bindings/v8/ScheduledAction.h:
- (WebCore::ScheduledAction::ScheduledAction):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::V8Custom::WindowSetTimeoutImpl):
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::SetTimeoutOrInterval):
-
-2009-09-16 Sam Weinig <sam@webkit.org>
-
- Reviewed by Anders Carlsson.
-
- Add some groups to the xcode project to make the bindings/js/ group
- a little nicer.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-09-16 Sam Weinig <sam@webkit.org>
-
- Reviewed by Anders Carlsson.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=29320
- JS callback objects should store the global object
-
- This just changes the callback objects to store the global object instead
- of the frame. A follow up patch will change them to store the 'current'
- global object instead of the lexical or dynamic.
-
- * DerivedSources.make: Remove unused VoidCallback.
- * WebCore.xcodeproj/project.pbxproj: Ditto.
- * bindings/js/JSCustomPositionCallback.cpp:
- (WebCore::JSCustomPositionCallback::JSCustomPositionCallback):
- (WebCore::JSCustomPositionCallback::handleEvent):
- * bindings/js/JSCustomPositionCallback.h:
- (WebCore::JSCustomPositionCallback::create):
- * bindings/js/JSCustomPositionErrorCallback.cpp:
- (WebCore::JSCustomPositionErrorCallback::JSCustomPositionErrorCallback):
- (WebCore::JSCustomPositionErrorCallback::handleEvent):
- * bindings/js/JSCustomPositionErrorCallback.h:
- (WebCore::JSCustomPositionErrorCallback::create):
- * bindings/js/JSCustomSQLStatementCallback.cpp:
- (WebCore::JSCustomSQLStatementCallback::JSCustomSQLStatementCallback):
- (WebCore::JSCustomSQLStatementCallback::handleEvent):
- * bindings/js/JSCustomSQLStatementCallback.h:
- (WebCore::JSCustomSQLStatementCallback::create):
- * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
- (WebCore::JSCustomSQLStatementErrorCallback::JSCustomSQLStatementErrorCallback):
- (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
- * bindings/js/JSCustomSQLStatementErrorCallback.h:
- (WebCore::JSCustomSQLStatementErrorCallback::create):
- * bindings/js/JSCustomSQLTransactionCallback.cpp:
- (WebCore::JSCustomSQLTransactionCallback::Data::Data):
- (WebCore::JSCustomSQLTransactionCallback::Data::globalObject):
- (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback):
- (WebCore::JSCustomSQLTransactionCallback::handleEvent):
- * bindings/js/JSCustomSQLTransactionCallback.h:
- (WebCore::JSCustomSQLTransactionCallback::create):
- * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
- (WebCore::JSCustomSQLTransactionErrorCallback::JSCustomSQLTransactionErrorCallback):
- (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
- * bindings/js/JSCustomSQLTransactionErrorCallback.h:
- (WebCore::JSCustomSQLTransactionErrorCallback::create):
- * bindings/js/JSCustomVoidCallback.cpp:
- (WebCore::JSCustomVoidCallback::JSCustomVoidCallback):
- (WebCore::JSCustomVoidCallback::handleEvent):
- * bindings/js/JSCustomVoidCallback.h:
- (WebCore::JSCustomVoidCallback::create):
- * bindings/js/JSDatabaseCustom.cpp:
- (WebCore::JSDatabase::changeVersion):
- (WebCore::createTransaction):
- (WebCore::JSDatabase::transaction):
- (WebCore::JSDatabase::readTransaction):
- * bindings/js/JSGeolocationCustom.cpp:
- (WebCore::createPositionCallback):
- (WebCore::createPositionErrorCallback):
- (WebCore::JSGeolocation::getCurrentPosition):
- (WebCore::JSGeolocation::watchPosition):
- * bindings/js/JSSQLTransactionCustom.cpp:
- (WebCore::JSSQLTransaction::executeSql):
-
-2009-09-15 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Eric Seidel.
-
- <input maxlength=> should restrict only values specified by users.
- https://bugs.webkit.org/show_bug.cgi?id=21271
-
- * dom/InputElement.cpp:
- (WebCore::InputElement::setValueFromRenderer):
- (WebCore::InputElement::sanitizeValue):
- (WebCore::InputElement::sanitizeUserInputValue): Rename from constrainValue().
- (WebCore::InputElement::handleBeforeTextInsertedEvent):
- (WebCore::InputElement::updateValueIfNeeded):
- * dom/InputElement.h:
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::setInputType):
- (WebCore::HTMLInputElement::value):
- (WebCore::HTMLInputElement::setValue):
- (WebCore::HTMLInputElement::sanitizeValue):
- * html/HTMLInputElement.h:
- * rendering/RenderTextControlSingleLine.cpp:
- (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
- * wml/WMLInputElement.cpp:
- (WebCore::WMLInputElement::constrainValue):
- * wml/WMLInputElement.h:
- (WebCore::WMLInputElement::sanitizeValue):
-
-2009-09-16 Enrica Casucci <enrica@apple.com>
-
- Reviewed by Eric Seidel.
-
- Reorganizing helper functions in htmlediting.h to group them by type of object they return/operate upon.
- https://bugs.webkit.org/show_bug.cgi?id=29319
-
- * editing/IndentOutdentCommand.cpp:
- Removed implementation of isAtUnsplittableElement.
-
- * editing/IndentOutdentCommand.h:
- Removed member function isAtUnsplittableElement, because it was not class specific and belonged logically among the helper functions.
-
- * editing/htmlediting.cpp:
- (WebCore::isAtUnsplittableElement): added. The code was taken from IndentOutdentCommand.
-
- * editing/htmlediting.h:
- Reordered functions to group them by type of object returned or operate upon.
- Added comments.
- Added isAtUnsplittableElement declaration.
-
-2009-09-16 Geoffrey Garen <ggaren@apple.com>
-
- Reviewed by Sam Weinig and Anders Carlsson.
-
- Removed some vestigial and potentially crashy code that makes consolidating
- event listeners hard.
-
- * dom/Node.cpp:
- (WebCore::Node::addEventListener): No need to limit when event listeners
- can be added. Other EventTargets don't do this.
-
- Also, check for null when accessing document(). Technically, the JS bindings
- do this check for us, but let's not rely on that.
-
-2009-09-16 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Adam Roben.
-
- <rdar://problem/7155710>
- HTML selects on windows cause containing window to become inactive when opened
-
- Redo the way we handle events when a popup menu is shown, based on
- http://blogs.msdn.com/oldnewthing/archive/2004/08/20/217684.aspx
-
- Since a non-active window can't capture the mouse, we use the owning window
- (the WebView) as the capture window. We then run a recursive message pump that
- forwards all mouse and keyboard events to the popup menu.
-
- * platform/PopupMenu.h:
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::PopupMenu):
- (WebCore::PopupMenu::show):
- (WebCore::PopupMenu::hide):
- (WebCore::PopupMenu::wndProc):
-
-2009-09-16 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Ada Chan.
-
- Speculative fix for
- <rdar://problem/6937089> Crashes at RenderWidget::destroy()
-
- * rendering/RenderWidget.cpp:
- (WebCore::RenderWidget::destroy): Avoid calling renderArena() if node()
- is null. Add two assertions that can help determine how this crash
- happens (in particular, whether node() becomes null during destroy() or
- it is null before destroy() is called).
-
-2009-09-16 Beth Dakin <bdakin@apple.com>
-
- Speculative build fix.
-
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty):
-
-2009-09-16 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Darin Adler.
-
- Fix for <rdar://problem/7083741> Implement a CSS extension to
- adjust sub-pixel anti-aliasing for text
- -and corresponding-
- https://bugs.webkit.org/show_bug.cgi?id=29291
-
- Added tests:
- * fast/css/font-smoothing.html: Added.
- * fast/css/parsing-webkit-font-smoothing.html: Added.
-
- This patch adds a new CSS property called -webkit-font-smoothing
- that accepts the following as valid input: auto | none |
- antialiased | subpixel-antialiased
-
- Return appropriate computed style for -webkit-font-smoothing
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::):
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
-
- Add a case for CSSPropertyWebkitFontSmoothing, and accept valid
- input.
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue):
-
- Add mappings for FontSmoothing to the right CSS values.
- * css/CSSPrimitiveValueMappings.h:
- (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
- (WebCore::CSSPrimitiveValue::operator FontSmoothing):
-
- Add -webkit-font-smoothing
- * css/CSSPropertyNames.in:
-
- Set fontSmoothing on the FontDescription.
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty):
-
- Add antialiased and subpixel-antialiased as possible new CSS
- values.
- * css/CSSValueKeywords.in:
- Store the font smoothing CSS value in the FontDescription.
- * platform/graphics/FontDescription.h:
- (WebCore::FontDescription::FontDescription):
- (WebCore::FontDescription::fontSmoothing):
- (WebCore::FontDescription::setFontSmoothing):
- (WebCore::FontDescription::operator==):
-
- Call setShouldAntialias() and setShouldUseSmoothing() appropriately
- based on the CSS fontSmoothing() value.
- * platform/graphics/mac/FontMac.mm:
- (WebCore::Font::drawGlyphs):
- * platform/graphics/win/FontCGWin.cpp:
- (WebCore::Font::drawGlyphs):
-
- New function fontSmoothing()
- * rendering/style/RenderStyle.h:
- (WebCore::InheritedFlags::fontSmoothing):
-
- New enum FontSmoothing.
- * rendering/style/RenderStyleConstants.h:
- (WebCore::):
-
-2009-09-16 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Remove style property if empty string is entered.
-
- https://bugs.webkit.org/show_bug.cgi?id=29163
-
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeOutline.prototype._onmouseout): fixed null pointer exception
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.applyStyleText): if styletext to apply is empty it will return an array to confirm the property removal
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylePropertyTreeElement.prototype.):
- (WebInspector.StylePropertyTreeElement.prototype):
-
-2009-09-16 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Always reset m_implicitShorthand to false after parsing
- background-repeat style property otherwise properties
- following after it may be erroneously marked as implicit.
-
- https://bugs.webkit.org/show_bug.cgi?id=28972
- https://bugs.webkit.org/show_bug.cgi?id=28973
-
- Test: fast/backgrounds/repeat/margin-shorthand.html
-
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue):
-
-2009-09-16 Carol Szabo <carol.szabo@nokia.com>
-
- Reviewed by Alexey Proskuryakov.
-
- Incorrect behavior of XMLHttpRequest::getAllResponseHeaders and
- XMLHttpRequest::getResponseHeader in the
- HEADERS_RECEIVED readyState.
- https://bugs.webkit.org/show_bug.cgi?id=29121
-
- Tests: http/tests/xmlhttprequest/getAllResponseHeaders.html
- http/tests/xmlhttprequest/getResponseHeader.html
-
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::getAllResponseHeaders):
- (WebCore::XMLHttpRequest::getResponseHeader):
- Changed the minimum valid state from LOADING to HEADERS_RECEIVED.
-
-2009-09-16 Vitaly Repeshko <vitalyr@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Fix style violation in V8AbstractEventListener.
- https://bugs.webkit.org/show_bug.cgi?id=29303
-
- * bindings/v8/V8AbstractEventListener.h:
- (WebCore::V8AbstractEventListener::operator==):
+ (WebInspector.SourceFrame.prototype._addBreakpointToSource):
-2009-09-16 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+2010-01-31 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Timothy Hatcher.
- Add Watch Expression support to inspector
- https://bugs.webkit.org/show_bug.cgi?id=27514
-
- Manual test added.
-
- * English.lproj/localizedStrings.js:
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype.completions):
- (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
- (WebInspector.ConsoleView.prototype._enterKeyPressed):
- * inspector/front-end/ObjectPropertiesSection.js:
- (WebInspector.ObjectPropertiesSection.prototype.update.callback):
- (WebInspector.ObjectPropertiesSection.prototype.update):
- (WebInspector.ObjectPropertiesSection.prototype.updateProperties):
- (WebInspector.ObjectPropertiesSection.CompareProperties):
- (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate.callback):
- (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
- (WebInspector.ObjectPropertyTreeElement.prototype.update):
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel):
- (WebInspector.ScriptsPanel.prototype.reset):
- (WebInspector.ScriptsPanel.prototype._callFrameSelected):
- * inspector/front-end/WatchExpressionsSidebarPane.js: Added.
- (WebInspector.WatchExpressionsSidebarPane):
- (WebInspector.WatchExpressionsSidebarPane.prototype.refreshExpressions):
- (WebInspector.WatchExpressionsSection):
- (WebInspector.WatchExpressionsSection.prototype.update):
- (WebInspector.WatchExpressionsSection.prototype.addExpression):
- (WebInspector.WatchExpressionsSection.prototype.updateExpression):
- (WebInspector.WatchExpressionsSection.prototype.findAddedTreeElement):
- (WebInspector.WatchExpressionsSection.prototype.loadSavedExpressions):
- (WebInspector.WatchExpressionsSection.prototype.saveExpressions):
- (WebInspector.WatchExpressionsSection.CompareProperties):
- (WebInspector.WatchExpressionTreeElement):
- (WebInspector.WatchExpressionTreeElement.prototype.update):
- (WebInspector.WatchExpressionTreeElement.prototype._deleteButtonClicked):
- (WebInspector.WatchExpressionTreeElement.prototype.startEditing):
- (WebInspector.WatchExpressionTreeElement.prototype.editingCancelled):
- (WebInspector.WatchExpressionTreeElement.prototype.applyExpression):
- * inspector/front-end/WebKit.qrc:
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.html:
- * manual-tests/inspector/debugger-watch-expressions.html: Added.
-
-2009-09-16 Greg Bolsinga <bolsinga@apple.com>
-
- Add ENABLE(INSPECTOR)
- https://bugs.webkit.org/show_bug.cgi?id=29260
-
- Reviewed by David Kilzer.
-
- No new tests. (No change in default behavior.)
-
- * DerivedSources.make: Use new WebCore.Inspector.exp file if ENABLE_DRAG_SUPPORT.
- * WebCore.base.exp: Move Inspector only exports to WebCore.Inspector.exp.
- * WebCore.xcodeproj/project.pbxproj: Add WebCore.Inspector.exp.
- * bindings/js/JSDOMWindowBase.cpp: Use ENABLE(INSPECTOR) where applicable.
- (WebCore::JSDOMWindowBase::supportsProfiling):
- * bindings/js/JSInspectedObjectWrapper.cpp: Wrap entire file in ENABLE(INSPECTOR).
- * bindings/js/JSInspectorBackendCustom.cpp: Ditto.
- * bindings/js/JSInspectorCallbackWrapper.cpp: Ditto.
- * bindings/js/ScriptObject.cpp: Use ENABLE(INSPECTOR) where applicable.
- * bindings/js/ScriptObject.h: Ditto.
- * bindings/js/ScriptObjectQuarantine.cpp: Wrap entire file in ENABLE(INSPECTOR).
- * dom/Document.cpp: Use ENABLE(INSPECTOR) where applicable.
- (WebCore::Document::recalcStyle):
- (WebCore::Document::addMessage):
- (WebCore::Document::resourceRetrievedByXMLHttpRequest):
- (WebCore::Document::scriptImported):
- * dom/Document.h: Ditto.
- * dom/Node.cpp: Ditto.
- (WebCore::Node::dispatchGenericEvent):
- * dom/ScriptExecutionContext.h: Ditto.
- (WebCore::):
- * html/HTMLDocument.cpp: Ditto.
- (WebCore::HTMLDocument::createTokenizer):
- * html/HTMLTokenizer.cpp: Ditto.
- (WebCore::HTMLTokenizer::write):
- * inspector/ConsoleMessage.cpp: Ditto.
- (WebCore::ConsoleMessage::ConsoleMessage):
- (WebCore::ConsoleMessage::isEqual):
- * inspector/ConsoleMessage.h: Ditto.
- * inspector/DOMDispatchTimelineItem.cpp: Wrap entire file in ENABLE(INSPECTOR).
- * inspector/InspectorBackend.cpp: Ditto.
- * inspector/InspectorController.cpp: Ditto.
- * inspector/InspectorDOMAgent.cpp: Ditto.
- * inspector/InspectorDOMStorageResource.cpp: Ditto.
- * inspector/InspectorDatabaseResource.cpp: Ditto.
- * inspector/InspectorFrontend.cpp: Ditto.
- * inspector/InspectorResource.cpp: Ditto.
- * inspector/InspectorTimelineAgent.cpp: Ditto.
- * inspector/TimelineItem.cpp: Ditto.
- * loader/FrameLoader.cpp: Use ENABLE(INSPECTOR) where applicable.
- (WebCore::FrameLoader::detachFromParent):
- (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
- (WebCore::FrameLoader::loadedResourceFromMemoryCache):
- (WebCore::FrameLoader::dispatchWindowObjectAvailable):
- (WebCore::FrameLoader::dispatchDidCommitLoad):
- (WebCore::FrameLoader::dispatchAssignIdentifierToInitialRequest):
- (WebCore::FrameLoader::dispatchWillSendRequest):
- (WebCore::FrameLoader::dispatchDidReceiveResponse):
- (WebCore::FrameLoader::dispatchDidReceiveContentLength):
- (WebCore::FrameLoader::dispatchDidFinishLoading):
- * page/Chrome.cpp: Ditto.
- (WebCore::Chrome::mouseDidMoveOverElement):
- * page/Console.cpp: Ditto.
- (WebCore::Console::addMessage):
- (WebCore::Console::count):
- (WebCore::Console::profile):
- (WebCore::Console::profileEnd):
- (WebCore::Console::time):
- (WebCore::Console::timeEnd):
- (WebCore::Console::group):
- (WebCore::Console::groupEnd):
- * page/ContextMenuController.cpp: Ditto.
- (WebCore::ContextMenuController::handleContextMenuEvent):
- (WebCore::ContextMenuController::contextMenuItemSelected):
- * page/DOMWindow.cpp: Ditto.
- (WebCore::DOMWindow::sessionStorage):
- (WebCore::DOMWindow::localStorage):
- * page/EventHandler.cpp: Ditto.
- (WebCore::EventHandler::handleMousePressEvent):
- * page/FrameView.cpp: Ditto.
- (WebCore::FrameView::layout):
- (WebCore::FrameView::paintContents):
- * page/FrameView.h: Ditto.
- * page/Page.cpp: Ditto.
- (WebCore::Page::Page):
- (WebCore::Page::~Page):
- * page/Page.h: Ditto.
- * platform/ContextMenu.cpp: Ditto.
- (WebCore::ContextMenu::checkOrEnableIfNeeded):
- * platform/ContextMenuItem.h: Ditto.
- (WebCore::):
- * storage/Database.cpp: Ditto.
- (WebCore::Database::openDatabase):
- * workers/WorkerContext.cpp: Ditto.
- (WebCore::WorkerContext::importScripts):
- * xml/XMLHttpRequest.cpp: Ditto.
- (WebCore::XMLHttpRequest::didFinishLoading):
-
-2009-09-16 Greg Bolsinga <bolsinga@apple.com>
-
- Add ENABLE(CONTEXT_MENUS)
- https://bugs.webkit.org/show_bug.cgi?id=29225
-
- Reviewed by David Kilzer.
-
- No new tests. (No change in default behavior.)
-
- * DerivedSources.make: Use new WebCore.ContextMenus.exp file if ENABLE_CONTEXT_MENUS.
- * WebCore.base.exp: Move ContextMenu only exports to WebCore.ContextMenus.exp.
- * WebCore.xcodeproj/project.pbxproj: Add WebCore.ContextMenus.exp.
- * dom/Node.cpp: Use ENABLE(CONTEXT_MENUS) where applicable.
- (WebCore::Node::defaultEventHandler):
- * loader/EmptyClients.h: Ditto.
- * page/ContextMenuController.cpp: Wrap entire file in ENABLE(CONTEXT_MENUS).
- * page/EventHandler.cpp: Use ENABLE(CONTEXT_MENUS) where applicable.
- * page/EventHandler.h: Ditto.
- * page/Page.cpp: Ditto.
- (WebCore::Page::Page):
- * page/Page.h: Ditto.
- * page/mac/EventHandlerMac.mm: Ditto.
- * page/mac/WebCoreViewFactory.h: Ditto.
- * platform/ContextMenu.cpp: Wrap entire file in ENABLE(CONTEXT_MENUS).
- * platform/LocalizedStrings.h: Use ENABLE(CONTEXT_MENUS) where applicable.
- * platform/mac/ContextMenuItemMac.mm: Wrap entire file in ENABLE(CONTEXT_MENUS).
- * platform/mac/ContextMenuMac.mm: Ditto.
- * platform/mac/LocalizedStringsMac.mm: Use ENABLE(CONTEXT_MENUS) where applicable.
- * svg/graphics/SVGImage.cpp: Ditto.
- (WebCore::SVGImage::dataChanged):
-
-2009-09-16 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Adam Roben.
-
- Clean up invalidation for repainting. Hoist the dirty rect intersection test in ScrollViewMac up
- into ScrollView so that all platforms do it.
-
- Patch deferred repaints in FrameView::repaintContentRectangle to only add the visible portion of
- the rectangle for repainting.
-
- * page/FrameView.cpp:
- (WebCore::FrameView::repaintContentRectangle):
- * platform/ScrollView.cpp:
- (WebCore::ScrollView::repaintContentRectangle):
- * platform/mac/ScrollViewMac.mm:
- (WebCore::ScrollView::platformRepaintContentRectangle):
-
-2009-09-16 Greg Bolsinga <bolsinga@apple.com>
-
- Add ENABLE(DRAG_SUPPORT)
- https://bugs.webkit.org/show_bug.cgi?id=29233
-
- Reviewed by David Kilzer.
-
- No new tests. (No change in default behavior.)
-
- * DerivedSources.make: Use new WebCore.DragSupport.exp file if ENABLE_DRAG_SUPPORT.
- * WebCore.base.exp: Move Drag Support only exports to WebCore.DragSupport.exp.
- * WebCore.xcodeproj/project.pbxproj: Add WebCore.DragSupport.exp.
- * dom/Clipboard.h: Use ENABLE(DRAG_SUPPORT) where applicable.
- * loader/EmptyClients.h: Ditto.
- * page/DragController.cpp: Wrap entire file in ENABLE(DRAG_SUPPORT).
- * page/EventHandler.cpp: Use ENABLE(DRAG_SUPPORT) where applicable.
- (WebCore::EventHandler::EventHandler):
- (WebCore::EventHandler::clear):
- (WebCore::EventHandler::handleMousePressEvent):
- (WebCore::EventHandler::handleMouseReleaseEvent):
- (WebCore::EventHandler::handleMouseMoveEvent):
- * page/EventHandler.h: Ditto.
- * page/Page.cpp: Ditto.
- (WebCore::Page::Page):
- * page/Page.h: Ditto.
- * page/mac/DragControllerMac.mm: Wrap entire file in ENABLE(DRAG_SUPPORT).
- * page/mac/EventHandlerMac.mm: Use ENABLE(DRAG_SUPPORT) where applicable.
- (WebCore::EventHandler::passSubframeEventToSubframe):
- * platform/DragData.cpp: Wrap entire file in ENABLE(DRAG_SUPPORT).
- * platform/DragImage.cpp: Wrap entire file in ENABLE(DRAG_SUPPORT).
- * platform/mac/ClipboardMac.h: Use ENABLE(DRAG_SUPPORT) where applicable.
- * platform/mac/ClipboardMac.mm: Ditto.
- * platform/mac/DragDataMac.mm: Wrap entire file in ENABLE(DRAG_SUPPORT).
- * platform/mac/DragImageMac.mm: Wrap entire file in ENABLE(DRAG_SUPPORT).
- * rendering/RenderLayer.cpp: Use ENABLE(DRAG_SUPPORT) where applicable.
- (WebCore::RenderLayer::autoscroll):
- * rendering/RenderObject.cpp: Ditto.
- * rendering/RenderObject.h: Ditto.
- * svg/graphics/SVGImage.cpp: Ditto.
- (WebCore::SVGImage::dataChanged):
-
-2009-09-16 Kevin Ollivier <kevino@theolliviers.com>
-
- wxMSW build fix after adding support for high resolution times in Win.
-
- * page/Settings.cpp:
- * page/Settings.h:
-
-2009-09-16 Vitaly Repeshko <vitalyr@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Added operator==() to event listeners. This fixes V8 bindings
- build broken in http://trac.webkit.org/changeset/48402.
- https://bugs.webkit.org/show_bug.cgi?id=29298
-
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::V8AbstractEventListener): Now
- uses JSEventListenerType.
- * bindings/v8/V8AbstractEventListener.h:
- (WebCore::V8AbstractEventListener::operator==): Only compares
- pointers since we create at most one wrapper for a JS object.
-
-2009-09-16 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Reviewed by Xan Lopez.
-
- [GTK] Crash when visiting http://flipper.googlelabs.com/
- https://bugs.webkit.org/show_bug.cgi?id=29293
-
- Check type for being null or empty before looking it up in the
- hash of supported types.
-
- Tested by http/tests/loading/redirect-with-no-location-crash.html
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::supportsType):
-
-2009-09-15 Geoffrey Garen <ggaren@apple.com>
-
- Reviewed by Sam Weinig.
-
- Removed the notion of "disconnected nodes with event listeners" because
- it was vestigial. The reference cycle it tried to solve was solved another
- way in https://bugs.webkit.org/show_bug.cgi?id=21260.
-
- * dom/Document.cpp:
- (WebCore::Document::removeAllEventListeners):
- * dom/Document.h:
- * dom/Node.cpp:
- (WebCore::Node::~Node):
- (WebCore::Node::insertedIntoDocument):
- (WebCore::Node::removedFromDocument):
- (WebCore::Node::willMoveToNewOwnerDocument):
- (WebCore::Node::didMoveToNewOwnerDocument):
- (WebCore::Node::addEventListener):
- (WebCore::Node::removeEventListener):
- (WebCore::Node::clearAttributeEventListener):
-
-2009-09-15 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Beth Dakin.
-
- WAI-ARIA: add support for ranges, including the progressbar, slider, and spinbutton roles
- https://bugs.webkit.org/show_bug.cgi?id=28841
-
- Allow certain ARIA roles to change value with AXIncrement and AXDecrement.
- Consolidate increment/decrement/changeValue methods.
-
- Test: accessibility/aria-slider-value-change.html
-
- * accessibility/AccessibilityObject.cpp:
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::increment):
- (WebCore::AccessibilityRenderObject::decrement):
- (WebCore::AccessibilityRenderObject::changeValueByPercent):
- (WebCore::AccessibilityRenderObject::setValue):
- (WebCore::AccessibilityRenderObject::canSetFocusAttribute):
- * accessibility/AccessibilityRenderObject.h:
- * accessibility/AccessibilitySlider.cpp:
- * accessibility/AccessibilitySlider.h:
- * dom/Element.cpp:
- (WebCore::Element::updateAfterAttributeChanged):
-
-2009-09-15 Geoffrey Garen <ggaren@apple.com>
-
- Reviewed by Sam Weinig.
-
- Removed the jsEventListeners set from JSDOMGlobalObject, to simplify
- creation and destruction of JSDOMGlobalObject and event listeners.
-
- Added an abstract operator==() to EventListener, to replace the
- jsEventListeners set's role in determining if two event listeners are
- equal from the DOM's perspective.
-
- Added a type field to EventListener, and casting operations, to support
- operator==() and other abstract operations.
-
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSAbstractWorkerCustom.cpp:
- (WebCore::JSAbstractWorker::addEventListener):
- (WebCore::JSAbstractWorker::removeEventListener):
- * bindings/js/JSDOMApplicationCacheCustom.cpp:
- (WebCore::JSDOMApplicationCache::addEventListener):
- (WebCore::JSDOMApplicationCache::removeEventListener):
- * bindings/js/JSDOMGlobalObject.cpp:
- * bindings/js/JSDOMGlobalObject.h:
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::addEventListener):
- (WebCore::JSDOMWindow::removeEventListener):
- * bindings/js/JSDesktopNotificationsCustom.cpp:
- (WebCore::JSNotification::addEventListener):
- (WebCore::):
- * bindings/js/JSEventListener.cpp:
- (WebCore::JSEventListener::JSEventListener):
- (WebCore::JSEventListener::~JSEventListener):
- (WebCore::JSEventListener::markJSFunction):
- (WebCore::JSEventListener::handleEvent):
- (WebCore::JSEventListener::reportError):
- (WebCore::JSEventListener::operator==):
- * bindings/js/JSEventListener.h:
- (WebCore::JSEventListener::cast):
- * bindings/js/JSEventSourceCustom.cpp:
- (WebCore::JSEventSource::addEventListener):
- (WebCore::JSEventSource::removeEventListener):
- * bindings/js/JSMessagePortCustom.cpp:
- (WebCore::JSMessagePort::addEventListener):
- (WebCore::JSMessagePort::removeEventListener):
- * bindings/js/JSNodeCustom.cpp:
- (WebCore::JSNode::addEventListener):
- (WebCore::JSNode::removeEventListener):
- * bindings/js/JSSVGElementInstanceCustom.cpp:
- (WebCore::JSSVGElementInstance::addEventListener):
- (WebCore::JSSVGElementInstance::removeEventListener):
- * bindings/js/JSWorkerContextCustom.cpp:
- (WebCore::JSWorkerContext::addEventListener):
- (WebCore::JSWorkerContext::removeEventListener):
- * bindings/js/JSXMLHttpRequestCustom.cpp:
- (WebCore::JSXMLHttpRequest::addEventListener):
- (WebCore::JSXMLHttpRequest::removeEventListener):
- * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
- (WebCore::JSXMLHttpRequestUpload::addEventListener):
- (WebCore::JSXMLHttpRequestUpload::removeEventListener):
- * bindings/objc/ObjCEventListener.h:
- (WebCore::ObjCEventListener::cast):
- * bindings/objc/ObjCEventListener.mm:
- (WebCore::ObjCEventListener::ObjCEventListener):
- (WebCore::ObjCEventListener::operator==):
- * dom/EventListener.h:
- (WebCore::EventListener::):
- (WebCore::EventListener::type):
- (WebCore::EventListener::EventListener):
- * dom/MessagePort.cpp:
- (WebCore::MessagePort::addEventListener):
- (WebCore::MessagePort::removeEventListener):
- * dom/Node.cpp:
- (WebCore::Node::removeEventListener):
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::InspectorDOMAgent):
- (WebCore::InspectorDOMAgent::mainFrameDocument):
- (WebCore::InspectorDOMAgent::operator==):
- * inspector/InspectorDOMAgent.h:
- (WebCore::InspectorDOMAgent::cast):
- * loader/ImageDocument.cpp:
- (WebCore::ImageEventListener::cast):
- (WebCore::ImageEventListener::ImageEventListener):
- (WebCore::ImageEventListener::operator==):
- * loader/appcache/DOMApplicationCache.cpp:
- (WebCore::DOMApplicationCache::addEventListener):
- (WebCore::DOMApplicationCache::removeEventListener):
- * notifications/Notification.cpp:
- (WebCore::Notification::removeEventListener):
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::removeEventListener):
- * page/EventSource.cpp:
- (WebCore::EventSource::addEventListener):
- (WebCore::EventSource::removeEventListener):
- * svg/animation/SVGSMILElement.cpp:
- (WebCore::ConditionEventListener::cast):
- (WebCore::ConditionEventListener::ConditionEventListener):
- (WebCore::ConditionEventListener::operator==):
- (WebCore::ConditionEventListener::handleEvent):
- * workers/AbstractWorker.cpp:
- (WebCore::AbstractWorker::addEventListener):
- (WebCore::AbstractWorker::removeEventListener):
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::addEventListener):
- (WebCore::WorkerContext::removeEventListener):
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::addEventListener):
- (WebCore::XMLHttpRequest::removeEventListener):
- * xml/XMLHttpRequestUpload.cpp:
- (WebCore::XMLHttpRequestUpload::addEventListener):
- (WebCore::XMLHttpRequestUpload::removeEventListener):
-
-2009-09-15 Alex Milowski <alex@milowski.com>
-
- Reviewed by Tor Arne Vestbø.
-
- Added ENABLE_MATHML to feature defines
-
- * Configurations/FeatureDefines.xcconfig:
-
-2009-09-14 Andrew Richards <randrew@gmail.com>
-
- Reviewed by Sam Weinig.
-
- Document.elementFromPoint() and Document.caretRangeFromPoint() erroneously returning null at points visible only after scrolling.
- https://bugs.webkit.org/show_bug.cgi?id=29245
-
- Use visibleContentRect() instead of boundsRect() when checking hit point bounds on viewport.
-
- * dom/Document.cpp:
- (WebCore::Document::elementFromPoint):
- (WebCore::Document::caretRangeFromPoint):
+ Web Inspector: Introduce NativeTextViewer.
-2009-09-15 Jungshik Shin <jshin@chromium.org>
+ This change handles rendering highlighted text, using browser's
+ selection/drag/drop/click logic. Breakpoint decorations and
+ program counter is working.
- Reviewed by Eric Seidel
+ Todo: line numbers are painted 'under' the text when scrolling
+ horizontally, search is not yet implemented.
- http://bugs.webkit.org/show_bug.cgi?id=26660
+ https://bugs.webkit.org/show_bug.cgi?id=34391
- Chromium Windows: When rotated, the baseline for a span of complex
- script is completely misaligned with that of the adjacent
- simple script text. It's fixed by not applying the baseline offset for
- the Skia code path.
-
- Test: transforms/2d/hindi-rotated.html
-
- * platform/graphics/chromium/UniscribeHelper.cpp:
- (WebCore::UniscribeHelper::draw):
-
-2009-09-15 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Adam Roben.
-
- Pass the PopupMenu pointer to CreateWindowEx and then get it from the LPCREATESTRUCT in
- the WM_CREATE handler. This way we don't have to first create an zero size window and then size it.
-
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::show):
- (WebCore::PopupMenu::PopupMenuWndProc):
-
-2009-09-15 Drew Wilson <atwilson@google.com>
-
- Reviewed by Darin Adler.
-
- MessageEvent should not be cancelable by default
- https://bugs.webkit.org/show_bug.cgi?id=27846
-
- * dom/MessageEvent.cpp:
- (WebCore::MessageEvent::MessageEvent):
- Changed constructor to set cancelable=false by default, per the HTML5 spec.
-
-2009-09-15 Charles Wei <charles.wei@torchmobile.com.cn>
-
- Reviewed by George Staikos.
-
- Fix SVG path parsing error if a command starts with dot '.'
- https://bugs.webkit.org/show_bug.cgi?id=29123
-
- * svg/SVGParserUtilities.cpp:
- (WebCore::SVGPathParser::parseSVG):
-
-2009-09-15 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Implement conditional breakpoints in the Web Inspector frontend.
- https://bugs.webkit.org/show_bug.cgi?id=28908
-
- * English.lproj/localizedStrings.js:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
- * inspector/front-end/Breakpoint.js:
- (WebInspector.Breakpoint.prototype.set condition):
- * inspector/front-end/Popup.js: Added.
- (WebInspector.Popup):
- (WebInspector.Popup.prototype.show):
- (WebInspector.Popup.prototype.hide):
- (WebInspector.Popup.prototype.get visible):
- (WebInspector.Popup.prototype.set element):
- (WebInspector.Popup.prototype.get element):
- (WebInspector.Popup.prototype.positionElement):
- (WebInspector.Popup.prototype.set anchor):
- (WebInspector.Popup.prototype.get anchor):
- (WebInspector.Popup.prototype.set autoHide):
- (WebInspector.Popup.prototype._checkNotVisible):
- (WebInspector.Popup.prototype._keyEventHandler):
- (WebInspector.Popup.prototype._mouseDownEventHandler):
+ * inspector/front-end/DivBasedTextViewer.js: Added.
+ (WebInspector.DivBasedTextViewer):
+ (WebInspector.DivBasedTextViewer.prototype._textChanged):
+ (WebInspector.DivBasedTextViewer.prototype._createLineDivs):
+ (WebInspector.DivBasedTextViewer.prototype._updatePreferredSize):
+ (WebInspector.DivBasedTextViewer.prototype._scroll):
+ (WebInspector.DivBasedTextViewer.prototype._registerMouseListeners):
+ (WebInspector.DivBasedTextViewer.prototype._registerKeyboardListeners):
+ (WebInspector.DivBasedTextViewer.prototype._registerClipboardListeners):
+ (WebInspector.DivBasedTextViewer.prototype._paintSelection):
+ (WebInspector.DivBasedTextViewer.prototype._positionDivDecoration):
+ (WebInspector.DivBasedTextViewer.prototype._mouseDown):
+ (WebInspector.DivBasedTextViewer.prototype._contextMenu):
+ (WebInspector.DivBasedTextViewer.prototype._caretForMouseEvent):
+ (WebInspector.DivBasedTextViewer.prototype._paintLine):
+ (WebInspector.DivBasedTextViewer.prototype._createSpan):
+ * inspector/front-end/Settings.js:
* inspector/front-end/SourceFrame.js:
- (WebInspector.SourceFrame.prototype.revealLine):
- (WebInspector.SourceFrame.prototype._loaded):
- (WebInspector.SourceFrame.prototype._documentContextMenu):
- (WebInspector.SourceFrame.prototype._documentMouseDown):
- (WebInspector.SourceFrame.prototype._editBreakpointCondition.committed):
- (WebInspector.SourceFrame.prototype._editBreakpointCondition.dismissed):
- (WebInspector.SourceFrame.prototype._editBreakpointCondition):
- (WebInspector.SourceFrame.prototype._showBreakpointConditionPopup):
- (WebInspector.SourceFrame.prototype._createPopupElement):
- (WebInspector.SourceFrame.prototype._addBreakpointToSource):
- (WebInspector.SourceFrame.prototype._removeBreakpointFromSource):
- (WebInspector.SourceFrame.prototype._drawBreakpointImagesIfNeeded.drawBreakpoint):
- (WebInspector.SourceFrame.prototype._drawBreakpointImagesIfNeeded):
+ (WebInspector.SourceFrame.prototype.clearMessages):
+ (WebInspector.SourceFrame.prototype.sizeToFitContentHeight):
+ (WebInspector.SourceFrame.prototype._createEditorIfNeeded):
+ (WebInspector.SourceFrame.prototype._addMessageToSource):
+ (WebInspector.SourceFrame.prototype.resize):
+ * inspector/front-end/TextEditor.js:
+ (WebInspector.TextEditor):
+ (WebInspector.TextEditor.prototype.setDivDecoration):
+ (WebInspector.TextEditor.prototype._registerMouseListeners):
+ (WebInspector.TextEditor.prototype._registerKeyboardListeners):
+ (WebInspector.TextEditor.prototype._registerClipboardListeners):
+ (WebInspector.TextEditor.prototype.reveal):
+ (WebInspector.TextEditor.prototype._textChanged):
+ (WebInspector.TextEditor.prototype.revalidateDecorationsAndPaint):
+ (WebInspector.TextEditor.prototype._updatePreferredSize):
+ (WebInspector.TextEditor.prototype.resize):
+ (WebInspector.TextEditor.prototype._paintLinesContinuation):
+ (WebInspector.TextEditor.prototype._paintLine):
+ (WebInspector.TextEditor.prototype._contextMenu):
+ (WebInspector.TextEditor.prototype._caretForMouseEvent):
+ (WebInspector.TextEditor.prototype._changeFont):
+ * inspector/front-end/TextEditorHighlighter.js:
+ (WebInspector.TextEditorHighlighter.prototype._lex):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
- * inspector/front-end/inspector.js:
- (WebInspector.set currentFocusElement):
- (WebInspector.set currentPanel):
- (WebInspector.loaded):
- (WebInspector.contextMenu):
- (WebInspector.elementDragStart):
- (WebInspector.updateResource):
- (WebInspector.drawLoadingPieChart):
- (WebInspector.linkifyURLAsNode):
- (WebInspector.startEditing.getContent):
- (WebInspector.startEditing.editingCancelled):
- (WebInspector.startEditing.editingCommitted):
- * inspector/front-end/utilities.js:
- (Element.prototype.positionAt):
- (Element.prototype.offsetRelativeToWindow):
-
-2009-09-14 Brady Eidson <beidson@apple.com>
-
- Reviewed by Darin Adler.
-
- Page cache should support pages with unload handlers as an experiment.
- <rdar://problem/7196485> and https://bugs.webkit.org/show_bug.cgi?id=29021
-
- For the experiment, only allow pages with unload handlers into the Page Cache on
- Mac and Windows.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::canCachePageContainingThisFrame):
- (WebCore::FrameLoader::logCanCacheFrameDecision):
-
-2009-09-14 Simon Fraser <simon.fraser@apple.com>
-
- Fix the change in r48376 to do a null-check to fix a crashing test.
-
- * dom/SelectElement.cpp:
- (WebCore::SelectElement::menuListDefaultEventHandler):
-
-2009-09-14 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- <rdar://problem/7047282> Safari crashes at WebCore::RenderMenuList::adjustInnerStyle() 436
-
- Avoid a crash when a mouse event handler on a <select> changes the select from a popup
- to a list (by setting the 'size' property) inside the event handler.
-
- Test: fast/forms/select-change-popup-to-listbox-in-event-handler.html
-
- * dom/SelectElement.cpp:
- (WebCore::SelectElement::menuListDefaultEventHandler):
-
-2009-09-14 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Jon Honeycutt.
-
- More PopupMenu cleanup.
-
- * platform/PopupMenu.h:
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::show):
- Call registerClass.
-
- (WebCore::PopupMenu::registerClass):
- Make this a private static member function so it can refer to PopupMenuWndProc.
-
- (WebCore::PopupMenu::PopupMenuWndProc):
- Try to get the PopupMenu and call its wndProc member function.
-
- (WebCore::PopupMenu::wndProc):
- Make this a member function.
-
-2009-09-14 Brady Eidson <beidson@apple.com>
-
- Not reviewed, maybe should've been:
-
- Cleaning up more Windows-specific fallout from the fix for:
- <rdar://problem/7174050> and https://bugs.webkit.org/show_bug.cgi?id=29160
-
- * platform/network/cf/ResourceHandleCFNet.cpp:
- (WebCore::WebCoreSynchronousLoader::load): Don't allow empty CFStrings as the stored credentials,
- as related checks all look at nullity when they really mean to be looking for emptiness.
-
-2009-09-14 Anders Carlsson <andersca@apple.com>
-
- Speculative Qt build fix.
-
- * platform/qt/QWebPopup.cpp:
- (WebCore::QWebPopup::hidePopup):
-
-2009-09-14 Dirk Pranke <dpranke@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Fix RenderThemeChromiumWin::determineClassicState so that classic_state
- matches the state values (and you get a single classic_state value
- for a given {part,state} value. This change will be tested by a
- chromium patch that will land after this.
-
- This will be tested by code landing downstream on Chromium.org; the
- code does not execute on webkit.org.
-
- * rendering/RenderThemeChromiumWin.cpp:
- (WebCore::RenderThemeChromiumWin::determineClassicState):
- (WebCore::RenderThemeChromiumWin::getThemeData):
-
-2009-09-14 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Adam Roben.
-
- https://bugs.webkit.org/show_bug.cgi?id=29138
- Simplify popup menu handling.
-
- * platform/PopupMenuClient.h:
- Rename hidePopup to popupDidHide.
-
- * platform/chromium/PopupMenuChromium.cpp:
- (WebCore::PopupListBox::handleKeyEvent):
- (WebCore::PopupListBox::abandon):
- (WebCore::PopupListBox::acceptIndex):
- Call popupDidHide instead of hidePopup.
-
- * platform/gtk/PopupMenuGtk.cpp:
- (WebCore::PopupMenu::menuUnmapped):
- Ditto.
-
- * platform/mac/PopupMenuMac.mm:
- (WebCore::PopupMenu::show):
- Ditto.
-
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::hide):
- Call popupDidHide.
-
- (WebCore::PopupWndProc):
- Call PopupMenu::hide.
-
- * platform/wx/PopupMenuWx.cpp:
- (WebCore::PopupMenu::OnMenuItemSelected):
- Call popupDidHide.
-
- * rendering/RenderMenuList.cpp:
- (WebCore::RenderMenuList::hidePopup):
- (WebCore::RenderMenuList::popupDidHide):
- * rendering/RenderMenuList.h:
- Set the "popup is visible" flag in popupDidHide.
-
- * rendering/RenderTextControlSingleLine.cpp:
- (WebCore::RenderTextControlSingleLine::hidePopup):
- (WebCore::RenderTextControlSingleLine::popupDidHide):
- * rendering/RenderTextControlSingleLine.h:
- Ditto.
-
-2009-09-14 Anders Carlsson <andersca@apple.com>
-
- Reviewed by David Hyatt.
-
- - Fix <rdar://problem/7182275>.
-
- Make sure that the newly created scrollbar's style is up to date.
-
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::~PopupMenu):
- Call setParent so that the scrollbar's parts are torn down correctly.
-
- (WebCore::PopupMenu::show):
- Call styleChanged.
-
-2009-09-11 Jon Honeycutt <jhoneycutt@apple.com>
-
- <rdar://problem/7197644> WebKit should broadcast an MSAA event when
- jumping to a named anchor
-
- https://bugs.webkit.org/show_bug.cgi?id=28899
-
- Reviewed by Adam Roben.
-
- * accessibility/AXObjectCache.h:
- (WebCore::AXObjectCache::):
- Added declaration for handleScrolledToAnchor(). Added a new entry to
- the enum of accessibility notifications.
-
- * accessibility/AccessibilityObject.cpp:
- (WebCore::AccessibilityObject::firstAccessibleObjectFromNode):
- Code moved from AccessibilityRenderObject::internalLinkElement() and
- refactored slightly; walks the tree until it finds a Node (with a
- renderer) whose accessibility is not ignored.
-
- * accessibility/AccessibilityObject.h:
- Added a declaration for firstAccessibleObjectFromNode().
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::internalLinkElement):
- Code moved to AccessibilityObject::firstAccessibleObjectFromNode().
-
- * accessibility/chromium/AXObjectCacheChromium.cpp:
- (WebCore::AXObjectCache::handleScrolledToAnchor):
- Stubbed.
+ * inspector/front-end/textEditor.css:
- * accessibility/gtk/AXObjectCacheAtk.cpp:
- (WebCore::AXObjectCache::handleScrolledToAnchor):
- Stubbed.
-
- * accessibility/mac/AXObjectCacheMac.mm:
- (WebCore::AXObjectCache::postPlatformNotification):
- Add a default case that returns early for notifications that Mac
- doesn't handle.
- (WebCore::AXObjectCache::handleScrolledToAnchor):
- Stubbed.
-
- * accessibility/win/AXObjectCacheWin.cpp:
- (WebCore::AXObjectCache::handleScrolledToAnchor):
- Post an AXScrolledToAnchor notification for the first accessible from
- the anchor Node.
- (WebCore::AXObjectCache::postPlatformNotification):
- If the notification is AXFocusedUIElementChanged, fire an
- EVENT_OBJECT_FOCUS. If the notification is AXScrolledToAnchor, fire
- EVENT_SYSTEM_SCROLLINGSTART, matching Firefox.
- (WebCore::AXObjectCache::handleFocusedUIElementChanged):
- Code moved to postPlatformNotification().
-
- * page/FrameView.cpp:
- (WebCore::FrameView::scrollToAnchor):
- Call AXObjectCache::handleScrolledToAnchor().
-
-2009-09-14 Anthony Ricaud <rik@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Cookies are not inspectable after reloading a page
- https://bugs.webkit.org/show_bug.cgi?id=29222
-
- Create the cookieTreeElement on initialization instead of when the view is shown.
- Reset the selected element of the sidebar on reset.
-
- * inspector/front-end/StoragePanel.js:
- (WebInspector.StoragePanel):
- (WebInspector.StoragePanel.prototype.show):
- (WebInspector.StoragePanel.prototype.reset):
-
-
-2009-09-14 Brady Eidson <beidson@apple.com>
-
- Windows build fix.
-
- * platform/network/cf/ResourceHandleCFNet.cpp:
- (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
- (WebCore::ResourceHandle::receivedCredential):
- (WebCore::WebCoreSynchronousLoader::didReceiveChallenge):
- (WebCore::WebCoreSynchronousLoader::load):
-
-2009-09-14 Brady Eidson <beidson@apple.com>
-
- Reviewed by Alexey Proskuryakov.
-
- Safari 4 cannot be used to update firmware on Linksys routers.
- <rdar://problem/7174050> and https://bugs.webkit.org/show_bug.cgi?id=29160
-
- In http://trac.webkit.org/changeset/42483, we disabled CFNetwork's session credential storage and
- implemented our own in WebCore.
-
- One feature we lost is that CFNetwork would automatically send previously authenticated credentials
- with new connections when the paths match, as allowed by RFC 2617 for HTTP Basic and Digest Authentication.
-
- Even though it's optional for User Agents to do this, (some?) Linksys routers rely on this behavior for
- HTTP Basic Authentication. So now WebCore's CredentialStorage will track URL paths for Basic credentials.
-
- We're not making this enhancement for Digest at this time, since we don't know of anything that broke
- due to the change in Digest behavior.
-
- Test: http/tests/loading/basic-credentials-sent-automatically.html
- http/tests/loading/basic-auth-resend-wrong-credentials.html
-
- * WebCore.base.exp:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
-
- * platform/network/Credential.cpp:
- (WebCore::Credential::isEmpty):
- * platform/network/Credential.h:
-
- Add a slightly more full featured CredentialStore that will track URL paths a credential belongs to:
- * platform/network/CredentialStorage.cpp: Added.
- (WebCore::protectionSpaceToCredentialMap):
- (WebCore::originToDefaultCredentialMap):
- (WebCore::originStringFromURL):
- (WebCore::CredentialStorage::set):
- (WebCore::CredentialStorage::get):
- (WebCore::CredentialStorage::getDefaultAuthenticationCredential):
- * platform/network/CredentialStorage.h: Added.
-
- Allow ProtectionSpace to be a hash key:
- * platform/network/ProtectionSpace.cpp:
- (WebCore::ProtectionSpace::ProtectionSpace):
- * platform/network/ProtectionSpace.h:
- (WebCore::ProtectionSpace::ProtectionSpace):
- (WebCore::ProtectionSpace::isHashTableDeletedValue):
- * platform/network/ProtectionSpaceHash.h: Added.
- (WebCore::ProtectionSpaceHash::hash):
- (WebCore::ProtectionSpaceHash::equal):
-
- Allow ResourceHandles to remember the initial credential they used:
- * platform/network/ResourceHandleInternal.h:
-
- Allow mutable ResourceRequests to update their platform object if HTTP header fields change:
- * platform/network/ResourceRequestBase.cpp:
- (WebCore::ResourceRequestBase::addHTTPHeaderField):
-
- Remove WebCoreCredentialStorage:
- * platform/network/cf/AuthenticationCF.cpp:
- * platform/network/cf/AuthenticationCF.h:
- * platform/network/mac/AuthenticationMac.h:
- * platform/network/mac/AuthenticationMac.mm:
-
- Change ResourceHandleCFNet to try to use stored credentials on new connections, if appropriate:
- * platform/network/cf/ResourceHandleCFNet.cpp:
- (WebCore::ResourceHandle::start):
- (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Only try the ProtectionSpace key'ed
- Credential if it does not match the initially used Credential.
- (WebCore::ResourceHandle::receivedCredential):
- (WebCore::WebCoreSynchronousLoader::didReceiveChallenge): Only try the ProtectionSpace key'ed
- Credential if it does not match the initially used Credential.
- (WebCore::WebCoreSynchronousLoader::load):
-
- Change ResourceHandleMac to try to use stored credentials on new connections, if appropriate:
- * platform/network/mac/ResourceHandleMac.mm:
- (WebCore::ResourceHandle::start):
- (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Only try the ProtectionSpace key'ed
- Credential if it does not match the initially used Credential.
- (WebCore::ResourceHandle::receivedCredential):
- (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Only try the
- ProtectionSpace key'ed Credential if it does not match the initially used Credential.
- (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]):
-
- Add base64-ability to CString:
- * platform/text/CString.cpp:
- (WebCore::CStringBuffer::base64Encode):
- (WebCore::CString::base64Encode):
- * platform/text/CString.h:
- (WebCore::CStringBuffer::create):
- (WebCore::CStringBuffer::CStringBuffer):
-
-2009-09-12 Mark Rowe <mrowe@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Fix <rdar://problem/6954546> Crashes in WebCore::RenderPart::setWidget below FrameLoader::loadPlugin.
-
- The calls to FrameLoader::requestObject within RenderPartObject::updateWidget can result in a plug-in
- being initialized. This can run cause arbitrary JavaScript to run and may result in the RenderPartObject
- being detached from the render tree and destroyed, causing a crash like <rdar://problem/6954546>.
-
- No test is possible until <rdar://problem/7090444> is fixed.
-
- * rendering/RenderPartObject.cpp:
- (WebCore::RenderPartObject::updateWidget): Ensure that we stay alive for the duration of plug-in initialization.
-
-2009-09-12 Mark Rowe <mrowe@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Add RenderWidgetProtector to simplify protecting a RenderWidget from destruction for the
- duration of a function. Deploy it within RenderWidget.
-
- * rendering/RenderWidget.cpp:
- (WebCore::RenderWidget::setWidgetGeometry):
- (WebCore::RenderWidget::updateWidgetPosition): Use a RefPtr rather than explicitly
- ref'ing and deref'ing the node.
- * rendering/RenderWidget.h:
- * rendering/RenderWidgetProtector.h:
- (WebCore::RenderWidgetProtector::RenderWidgetProtector):
- (WebCore::RenderWidgetProtector::~RenderWidgetProtector):
-
-2009-09-14 Cameron McCormack <cam@mcc.id.au>
-
- Reviewed by Eric Seidel.
-
- CodeGenerator.pm needs some cleaning up
- https://bugs.webkit.org/show_bug.cgi?id=29238
-
- * bindings/scripts/CodeGenerator.pm:
- (FindParentsRecursively): Removed; its functionality is now handled in
- AddMethodsConstantsAndAttributesFromParentClasses.
- (ForAllParents): New function that visits an interface's ancestors and
- invokes a callback for each one.
- (AddMethodsConstantsAndAttributesFromParentClasses): Simplified by using
- ForAllParents.
- (GetMethodsAndAttributesFromParentClasses): Ditto.
- (IDLFileForInterface): Factored out previous calls to ScanDirectory into
- this new function, which returns the filename containing a given IDL
- interface definition.
- (ParseInterface): Simplified by using IDLFileForInterface.
- (ScanDirectory): Removed in lieu of IDLFileForInterface.
- * bindings/scripts/CodeGeneratorV8.pm: Drop call to
- FindParentsRecursively and get the list of parents from the
- AddMethodsConstantsAndAttributesFromParentClasses call instead.
-
-2009-09-14 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] Assert hit when dropping a file in QtLauncher
- https://bugs.webkit.org/show_bug.cgi?id=29242
-
- Qt's implementation of DropData::asURL does not return a URL encoded string
- as expected.
-
- * platform/qt/DragDataQt.cpp:
- (WebCore::DragData::asURL):
-
-2009-09-13 Kevin Ollivier <kevino@theolliviers.com>
-
- wx build fix, file was missed during TLS.cpp removal.
-
- * page/wx/FrameWx.cpp: Added.
- (WebCore::Frame::dragImageForSelection):
-
-2009-09-13 Anthony Ricaud <rik@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- Web Inspector: Add "New Style Rule" to the localizedStrings
- https://bugs.webkit.org/show_bug.cgi?id=29237
-
- * English.lproj/localizedStrings.js:
-
-2009-09-13 Kevin Watters <kevinwatters@gmail.com>
-
- Reviewed by Kevin Ollivier.
-
- [wx] Implement filesystem functions.
-
- https://bugs.webkit.org/show_bug.cgi?id=29196
-
- * platform/wx/FileSystemWx.cpp:
- (WebCore::fileExists):
- (WebCore::deleteFile):
- (WebCore::deleteEmptyDirectory):
- (WebCore::getFileSize):
- (WebCore::getFileModificationTime):
- (WebCore::makeAllDirectories):
- (WebCore::pathByAppendingComponent):
- (WebCore::homeDirectoryPath):
- (WebCore::directoryName):
-
-2009-09-12 Kevin Ollivier <kevino@theolliviers.com>
-
- wx build fixes for wx 2.9.
-
- * platform/wx/ScrollbarThemeWx.cpp:
- * platform/wx/wxcode/gtk/scrollbar_render.cpp:
- (wxGetGdkWindowForDC):
-
-2009-09-12 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Maciej Stachowiak.
-
- [ES5] Implement Object.keys
- https://bugs.webkit.org/show_bug.cgi?id=29170
-
- Switch from getPropertyNames to getOwnPropertyNames, and provide custom
- getPropertyNames to DOMWindow, DOMWindowShell and QuarantinedObjectWrapper
- in order to ensure correct semantics are maintained.
-
- Test: fast/js/Object-keys.html
-
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::getOwnPropertyNames):
- * bindings/js/JSDOMWindowShell.cpp:
- (WebCore::JSDOMWindowShell::getOwnPropertyNames):
- * bindings/js/JSDOMWindowShell.h:
- * bindings/js/JSHistoryCustom.cpp:
- (WebCore::JSHistory::getOwnPropertyNames):
- * bindings/js/JSLocationCustom.cpp:
- (WebCore::JSLocation::getOwnPropertyNames):
- * bindings/js/JSQuarantinedObjectWrapper.cpp:
- (WebCore::JSQuarantinedObjectWrapper::getPropertyNames):
- (WebCore::JSQuarantinedObjectWrapper::getOwnPropertyNames):
- * bindings/js/JSQuarantinedObjectWrapper.h:
- * bindings/js/JSStorageCustom.cpp:
- (WebCore::JSStorage::getOwnPropertyNames):
- * bindings/scripts/CodeGeneratorJS.pm:
- * bridge/runtime_object.cpp:
- (JSC::RuntimeObjectImp::getPropertyNames):
- (JSC::RuntimeObjectImp::getOwnPropertyNames):
- * bridge/runtime_object.h:
-
-2009-09-12 Sam Weinig <sam@webkit.org>
-
- Reviewed by Anders Carlsson.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=29219
- Document.elementFromPoint() should take page scroll into consideration
-
- Test: fast/dom/elementFromPoint-relative-to-viewport.html
-
- * dom/Document.cpp:
- (WebCore::Document::elementFromPoint):
- (WebCore::Document::caretRangeFromPoint):
-
-2009-09-12 Sam Weinig <sam@webkit.org>
-
- Reviewed by Maciej Stachowiak.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=29217
- Document.caretRangeFromPoint should take the scroll offset into account before hit testing
-
- In accordance with the CSSOM View Module spec, Document.caretRangeFromPoint should interpret
- the point passed to it as relative to the viewport, not the document.
-
- Test: fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html
-
- * dom/Document.cpp:
- (WebCore::Document::caretRangeFromPoint):
-
-2009-09-11 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Added some manual tests to show WebGL in action
- https://bugs.webkit.org/show_bug.cgi?id=29215
-
- * manual-tests/webgl: Added.
- * manual-tests/webgl/Earth.html: Added.
- * manual-tests/webgl/ManyPlanetsDeep.html: Added.
- * manual-tests/webgl/SpinningBox.html: Added.
- * manual-tests/webgl/TeapotPerPixel.html: Added.
- * manual-tests/webgl/TeapotPerVertex.html: Added.
- * manual-tests/webgl/resources: Added.
- * manual-tests/webgl/resources/CanvasMatrix.js: Added.
- * manual-tests/webgl/resources/earthmap1k.jpg: Added.
- * manual-tests/webgl/resources/mars500x250.png: Added.
- * manual-tests/webgl/resources/teapot.obj: Added.
- * manual-tests/webgl/resources/utils3d.js: Added.
-
-2009-09-10 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- aria definition role spelled wrong "defintion"
- https://bugs.webkit.org/show_bug.cgi?id=28840
-
- Test: accessibility/aria-slider-value-change.html
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::RoleEntry::):
-
-2009-09-11 Erik Arvidsson <arv@chromium.org>
+2010-01-31 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Eric Seidel.
- Fixes an assert in Node::isFocusable which was causing crashes in certain cases.
- https://bugs.webkit.org/show_bug.cgi?id=29210
-
- * dom/Node.cpp:
- (WebCore::Node::isFocusable):
-
-2009-09-11 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Added variants to uniform* and vertexAttrib* calls which take sequence<> in place of CanvasArray
- https://bugs.webkit.org/show_bug.cgi?id=29139
-
- I also added a data() call to each of the CanvasArray subclasses to give back a types pointer
- to the baseAddress().
-
- * Configurations/FeatureDefines.xcconfig:
- * bindings/js/JSCanvasRenderingContext3DCustom.cpp:
- (WebCore::toArray):
- (WebCore::):
- (WebCore::dataFunctionf):
- (WebCore::dataFunctioni):
- (WebCore::dataFunctionMatrix):
- (WebCore::JSCanvasRenderingContext3D::uniform1fv):
- (WebCore::JSCanvasRenderingContext3D::uniform1iv):
- (WebCore::JSCanvasRenderingContext3D::uniform2fv):
- (WebCore::JSCanvasRenderingContext3D::uniform2iv):
- (WebCore::JSCanvasRenderingContext3D::uniform3fv):
- (WebCore::JSCanvasRenderingContext3D::uniform3iv):
- (WebCore::JSCanvasRenderingContext3D::uniform4fv):
- (WebCore::JSCanvasRenderingContext3D::uniform4iv):
- (WebCore::JSCanvasRenderingContext3D::uniformMatrix2fv):
- (WebCore::JSCanvasRenderingContext3D::uniformMatrix3fv):
- (WebCore::JSCanvasRenderingContext3D::uniformMatrix4fv):
- (WebCore::JSCanvasRenderingContext3D::vertexAttrib1fv):
- (WebCore::JSCanvasRenderingContext3D::vertexAttrib2fv):
- (WebCore::JSCanvasRenderingContext3D::vertexAttrib3fv):
- (WebCore::JSCanvasRenderingContext3D::vertexAttrib4fv):
- * html/canvas/CanvasByteArray.h:
- (WebCore::CanvasByteArray::data):
- * html/canvas/CanvasFloatArray.h:
- (WebCore::CanvasFloatArray::data):
- * html/canvas/CanvasIntArray.h:
- (WebCore::CanvasIntArray::data):
- * html/canvas/CanvasRenderingContext3D.cpp:
- (WebCore::CanvasRenderingContext3D::uniform1fv):
- (WebCore::CanvasRenderingContext3D::uniform1iv):
- (WebCore::CanvasRenderingContext3D::uniform2fv):
- (WebCore::CanvasRenderingContext3D::uniform2iv):
- (WebCore::CanvasRenderingContext3D::uniform3fv):
- (WebCore::CanvasRenderingContext3D::uniform3iv):
- (WebCore::CanvasRenderingContext3D::uniform4fv):
- (WebCore::CanvasRenderingContext3D::uniform4iv):
- (WebCore::CanvasRenderingContext3D::uniformMatrix2fv):
- (WebCore::CanvasRenderingContext3D::uniformMatrix3fv):
- (WebCore::CanvasRenderingContext3D::uniformMatrix4fv):
- (WebCore::CanvasRenderingContext3D::vertexAttrib1fv):
- (WebCore::CanvasRenderingContext3D::vertexAttrib2fv):
- (WebCore::CanvasRenderingContext3D::vertexAttrib3fv):
- (WebCore::CanvasRenderingContext3D::vertexAttrib4fv):
- * html/canvas/CanvasRenderingContext3D.h:
- * html/canvas/CanvasRenderingContext3D.idl:
- * html/canvas/CanvasShortArray.h:
- (WebCore::CanvasShortArray::data):
- * html/canvas/CanvasUnsignedByteArray.h:
- (WebCore::CanvasUnsignedByteArray::data):
- * html/canvas/CanvasUnsignedIntArray.h:
- (WebCore::CanvasUnsignedIntArray::data):
- * html/canvas/CanvasUnsignedShortArray.h:
- (WebCore::CanvasUnsignedShortArray::data):
- * platform/graphics/GraphicsContext3D.h:
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::uniform1fv):
- (WebCore::GraphicsContext3D::uniform2fv):
- (WebCore::GraphicsContext3D::uniform3fv):
- (WebCore::GraphicsContext3D::uniform4fv):
- (WebCore::GraphicsContext3D::uniform1iv):
- (WebCore::GraphicsContext3D::uniform2iv):
- (WebCore::GraphicsContext3D::uniform3iv):
- (WebCore::GraphicsContext3D::uniform4iv):
- (WebCore::GraphicsContext3D::uniformMatrix2fv):
- (WebCore::GraphicsContext3D::uniformMatrix3fv):
- (WebCore::GraphicsContext3D::uniformMatrix4fv):
- (WebCore::GraphicsContext3D::vertexAttrib1fv):
- (WebCore::GraphicsContext3D::vertexAttrib2fv):
- (WebCore::GraphicsContext3D::vertexAttrib3fv):
- (WebCore::GraphicsContext3D::vertexAttrib4fv):
-
-2009-09-11 Fumitoshi Ukai <ukai@chromium.org>
+ [Qt] Enable FAST_MOBILE_SCROLLING on Qt embedded platforms
+ https://bugs.webkit.org/show_bug.cgi?id=34168
- Reviewed by Eric Seidel.
-
- Add ENABLE(WEB_SOCKETS) guards.
- https://bugs.webkit.org/show_bug.cgi?id=29174
-
- * bindings/v8/custom/V8WebSocketCustom.cpp:
-
-2009-09-11 Eric Seidel <eric@webkit.org>
-
- No review, rolling out r48229.
- http://trac.webkit.org/changeset/48229
-
- * WebCore.base.exp:
- * dom/Clipboard.cpp:
- (WebCore::Clipboard::Clipboard):
- (WebCore::Clipboard::sourceOperation):
- * page/DragController.cpp:
- (WebCore::DragController::DragController):
- (WebCore::DragController::dragExited):
- (WebCore::DragController::performDrag):
- (WebCore::DragController::dragEnteredOrUpdated):
- (WebCore::DragController::tryDHTMLDrag):
- (WebCore::DragController::startDrag):
- * page/DragController.h:
- * page/EventHandler.cpp:
- (WebCore::EventHandler::updateDragAndDrop):
- (WebCore::EventHandler::dragSourceMovedTo):
- (WebCore::EventHandler::handleDrag):
- * page/EventHandler.h:
-
-2009-09-11 Michelangelo De Simone <micdesim@gmail.com>
-
- Fix the build.
-
- * html/ValidityState.cpp:
- (WebCore::ValidityState::typeMismatch):
-
-2009-09-11 Michelangelo De Simone <micdesim@gmail.com>
-
- Reviewed by Antti Koivisto.
-
- https://bugs.webkit.org/show_bug.cgi?id=27456
- Added support for static validation of url in
- ValidityState, for url state inputs.
- From HTML5 specs:
- http://www.whatwg.org/specs/web-apps/current-work/#url-state
-
- Test: fast/forms/ValidityState-typeMismatch-url.html
-
- * html/ValidityState.cpp:
- (WebCore::ValidityState::typeMismatch):
-
-2009-09-11 Evan Stade <estade@chromium.org>
-
- Reviewed by Darin Adler.
-
- Revert r47992: Expose functions to change the focus ring color for
- Linux Chromium.
-
- As Darin Fisher has pointed out, there is a better way to do this.
-
- * rendering/RenderThemeChromiumLinux.cpp:
- (WebCore::RenderThemeChromiumLinux::RenderThemeChromiumLinux):
- * rendering/RenderThemeChromiumLinux.h:
-
-2009-09-11 Alexey Proskuryakov <ap@webkit.org>
-
- Reviewed by Geoff Garen.
-
- https://bugs.webkit.org/show_bug.cgi?id=29207
- Add checks for using WebCore JS context on secondary threads
-
- * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::commonJSGlobalData):
- Set the new debug-only mainThreadOnly flag.
-
-2009-09-11 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- The inspector should have scope bars.
- https://bugs.webkit.org/show_bug.cgi?id=14353
-
- Add scope bars to the console, so the user can choose which category
- of messages they want to see (All, Errors, Warnings, Logs), and they
- can choose from one or more of {Errors, Warnings, Logs}.
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.createFilterElement):
- (WebInspector.ConsoleView):
- (WebInspector.ConsoleView.prototype._updateFilter):
- (WebInspector.ConsoleView.prototype.filter):
- (WebInspector.ConsoleView.prototype.attach):
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.html:
-
-2009-09-11 Yusuke Sato <yusukes@chromium.org>
-
- Reviewed by Darin Fisher.
-
- [Chromium] Complex text doesn't show up with text stroking
- https://bugs.webkit.org/show_bug.cgi?id=28707
-
- Added extra NULL checks for HDC. This is the second fix for issue 28707,
- and the fix is similar to http://trac.webkit.org/changeset/45482.
-
- * platform/graphics/chromium/FontChromiumWin.cpp:
- (WebCore::Font::drawComplexText):
- * platform/graphics/chromium/UniscribeHelper.cpp:
- (WebCore::UniscribeHelper::draw):
-
-2009-09-11 Cameron McCormack <cam@mcc.id.au>
-
- Reviewed by Eric Seidel.
-
- Make ElementTimeControl methods return void and not throw.
- https://bugs.webkit.org/show_bug.cgi?id=28831
-
- SVG 1.1 erratum:
- http://www.w3.org/2003/01/REC-SVG11-20030114-errata#elementtimecontrol-interface
-
- Test: svg/dom/smil-methods.svg
-
- * svg/ElementTimeControl.h: Change return type from bool to void and remove exception argument.
- * svg/ElementTimeControl.idl: Change return type from bool to void and remove raises claus.
- * svg/SVGAnimationElement.cpp:
- (WebCore::SVGAnimationElement::beginElement): Change return type from bool to void and remove exception argument.
- (WebCore::SVGAnimationElement::beginElementAt): Ditto.
- (WebCore::SVGAnimationElement::endElement): Ditto.
- (WebCore::SVGAnimationElement::endElementAt): Ditto.
- * svg/SVGAnimationElement.h: Ditto.
-
-2009-09-11 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Added support for texImage2D which takes CanvasArray
- https://bugs.webkit.org/show_bug.cgi?id=29191
-
- * bindings/js/JSCanvasRenderingContext3DCustom.cpp:
- (WebCore::JSCanvasRenderingContext3D::texImage2D):
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::texImage2D):
+ Enable FAST_MOBILE_SCROLLING for Qt on Maemo 5, Linux embedded
+ and Symbian
-2009-09-11 Steve Falkenburg <sfalken@apple.com>
-
- Reviewed by Darin Adler.
-
- Allow WebKit clients to opt out of high resolution timers on Windows.
- https://bugs.webkit.org/show_bug.cgi?id=29192
-
- * page/Settings.cpp:
- (WebCore::Settings::setShouldUseHighResolutionTimers): Added.
- * page/Settings.h: Added getter/setter for shouldUseHighResolutionTimers.
- (WebCore::Settings::shouldUseHighResolutionTimers): Added.
- * platform/win/SharedTimerWin.cpp:
- (WebCore::setSharedTimerFireTime): Don't run high resolution timer code if it is disabled.
-
-2009-09-11 Christian Plesner Hansen <christian.plesner.hansen@gmail.com>
-
- Reviewed by Adam Barth.
-
- [v8] Share persistent context handles between events
- Change events to use a single ref-counted shared persistent handle
- to the context in which to run, rather than create a new
- persistent handle for each new event which puts pressure on the
- gc.
-
- https://bugs.webkit.org/show_bug.cgi?id=29077
-
- * bindings/v8/ScheduledAction.cpp:
- (WebCore::ScheduledAction::execute):
- * bindings/v8/SharedPersistent.h: Added.
- (WebCore::SharedPersistent::set):
- (WebCore::SharedPersistent::get):
- (WebCore::SharedPersistent::disposeHandle):
- (WebCore::SharedPersistent::create):
- (WebCore::SharedPersistent::SharedPersistent):
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::V8AbstractEventListener):
- (WebCore::V8AbstractEventListener::handleEvent):
- * bindings/v8/V8AbstractEventListener.h:
- * bindings/v8/V8IsolatedWorld.cpp:
- (WebCore::V8IsolatedWorld::V8IsolatedWorld):
- (WebCore::V8IsolatedWorld::~V8IsolatedWorld):
- * bindings/v8/V8IsolatedWorld.h:
- (WebCore::V8IsolatedWorld::context):
- (WebCore::V8IsolatedWorld::shared_context):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::evaluateInNewContext):
- (WebCore::V8Proxy::createWrapperFromCacheSlowCase):
- (WebCore::V8Proxy::isContextInitialized):
- (WebCore::V8Proxy::updateDocumentWrapperCache):
- (WebCore::V8Proxy::clearDocumentWrapperCache):
- (WebCore::V8Proxy::disposeContextHandles):
- (WebCore::V8Proxy::clearForClose):
- (WebCore::V8Proxy::clearForNavigation):
- (WebCore::V8Proxy::setSecurityToken):
- (WebCore::V8Proxy::updateDocument):
- (WebCore::V8Proxy::initContextIfNeeded):
- (WebCore::V8Proxy::shared_context):
- (WebCore::V8Proxy::mainWorldContext):
- (WebCore::V8Proxy::setContextDebugId):
- * bindings/v8/V8Proxy.h:
- (WebCore::V8Proxy::V8Proxy):
- (WebCore::V8Proxy::context):
- (WebCore::V8Proxy::shared_context):
-
-2009-09-11 Anton Muhin <antonm@chromium.org>
-
- Reviewed by David Levin.
-
- Create a real handle (one which would save an object from GC).
- https://bugs.webkit.org/show_bug.cgi?id=29150
-
- * bindings/v8/V8Binding.cpp:
- (WebCore::v8ExternalString):
-
-2009-09-11 Anton Muhin <antonm@chromium.org>
-
- Reviewed by David Levin.
-
- Inline WebCore::v8String as it only invokes WebCore::v8ExternalString.
- https://bugs.webkit.org/show_bug.cgi?id=29152
-
- * bindings/v8/V8Binding.cpp:
- * bindings/v8/V8Binding.h:
- (WebCore::v8String):
-
-2009-09-11 Ariya Hidayat <ariya.hidayat@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Changed URLs from qtsoftware.com to qt.nokia.com, as part of a general
- renaming.
-
- * ChangeLog-2009-06-16:
-
-2009-09-11 Thiago Macieira <thiago.macieira@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Use LIBS_PRIVATE on Qt/Mac.
-
- On the Mac, it means "-framework ApplicationServices -framework Carbon
- -framework AppKit" are no longer part of the default LIBS in Qt
- applications. This required a lot of fixes where we used Mac-specific
- code in Qt.
-
- * WebCore.pro:
-
-2009-09-11 Cameron McCormack <cam@mcc.id.au>
-
- Reviewed by Eric Seidel.
-
- Remove duplicated WK_{u,l}cfirst subs from CodeGeneratorV8.pm
- https://bugs.webkit.org/show_bug.cgi?id=29165
-
- * bindings/scripts/CodeGeneratorV8.pm: Remove WK_ucfirst and
- WK_lcfirst, and call the ones in CodeGenerator.pm instead.
-
-2009-09-11 Yongjun Zhang <yongjun.zhang@nokia.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=29132
- Symbian winscw compiler fails compiling WebCore/text/RegularExpression.cpp.
-
- Add RegularExpression class qualifier before Private.
-
- * platform/text/RegularExpression.cpp:
-
-2009-09-11 Yongjun Zhang <yongjun.zhang@nokia.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=29131
- Use a different variadic macro format for Symbian compiler.
-
- Use arg... instead of ellipsis in variadic macro.
-
- * platform/StaticConstructors.h:
-
-2009-09-11 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- https://bugs.webkit.org/show_bug.cgi?id=28806
-
- [Qt] Make the WebInspector available as a QWidget.
-
- * WebCore.pro:
-
-2009-09-11 Simon Hausmann <simon.hausmann@nokia.com>
-
- Unreviewed fix for the Web Inspector with the Qt build.
-
- Re-generate the Qt resource file by running
- WebKitTools/Scripts/generate-qt-inspector-resource
-
- * inspector/front-end/WebKit.qrc:
-
-2009-09-11 Simon Hausmann <simon.hausmann@nokia.com>
-
- Fix the Qt build, remove stray semicolon from function definition.
-
- * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
- (WebCore::MediaPlayerPrivate::buffered):
-
-2009-09-10 Adam Barth <abarth@webkit.org>
-
- Reviewed by Sam Weinig.
-
- Detect mixed content
- https://bugs.webkit.org/show_bug.cgi?id=29003
-
- Detect some basic kinds of mixed content (HTTP content loaded into an
- HTTPS context). This new detection logic isn't perfect, but it's a
- place to start.
-
- Tests: http/tests/security/mixedContent/about-blank-iframe-in-main-frame.html
- http/tests/security/mixedContent/data-url-iframe-in-main-frame.html
- http/tests/security/mixedContent/data-url-script-in-iframe.html
- http/tests/security/mixedContent/insecure-css-in-iframe.html
- http/tests/security/mixedContent/insecure-css-in-main-frame.html
- http/tests/security/mixedContent/insecure-iframe-in-iframe.html
- http/tests/security/mixedContent/insecure-iframe-in-main-frame.html
- http/tests/security/mixedContent/insecure-image-in-iframe.html
- http/tests/security/mixedContent/insecure-image-in-main-frame.html
- http/tests/security/mixedContent/insecure-script-in-iframe.html
- http/tests/security/mixedContent/redirect-http-to-https-iframe-in-main-frame.html
- http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe.html
- http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame.html
- http/tests/security/mixedContent/redirect-https-to-http-script-in-iframe.html
-
- * loader/DocLoader.cpp:
- (WebCore::DocLoader::canRequest):
- (WebCore::DocLoader::requestResource):
- (WebCore::DocLoader::checkCacheObjectStatus):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::isMixedContent):
- (WebCore::FrameLoader::checkIfDisplayInsecureContent):
- (WebCore::FrameLoader::checkIfRunInsecureContent):
- * loader/FrameLoader.h:
- * loader/MainResourceLoader.cpp:
- (WebCore::MainResourceLoader::willSendRequest):
-
-2009-09-10 Mark Rowe <mrowe@apple.com>
-
- Fix the Windows build.
-
- Restore platform/mock to the header search path after it was removed in r48270.
-
- * WebCore.vcproj/WebCoreCommon.vsprops:
-
-2009-09-08 Timothy Hatcher <timothy@apple.com>
-
- Web Inspector: Move the option to create a new style rule under the Styles' gear menu.
-
- https://bugs.webkit.org/show_bug.cgi?id=29039
-
- Reviewed by Sam Weinig.
-
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylesSidebarPane): Add "New Style Rule" option to the gear menu.
- (WebInspector.StylesSidebarPane.prototype._update): Check instanceof BlankStylePropertiesSection instead.
- (WebInspector.StylesSidebarPane.prototype._changeSetting): Added. Keeps the color format setting selected
- while calling the correct action.
- (WebInspector.StylesSidebarPane.prototype._createNewRule): Creates a new section and edits the selector.
- (WebInspector.StylesSidebarPane.prototype.addBlankSection): Insert the section in a cleaner way.
- (WebInspector.StylesSidebarPane.prototype.removeSection): Added. Removes the passed in section.
- (WebInspector.StylesSidebarPane.prototype.appropriateSelectorForNode): Return an empty string if there is no node.
- (WebInspector.StylePropertiesSection.prototype.expand): Removed the check for _blank.
- (WebInspector.StylePropertiesSection.prototype.startEditingSelector): No need for the context, the original selector
- is remembered by the editing code.
- (WebInspector.StylePropertiesSection.prototype.editingSelectorCancelled): Do nothing. The original text is already
- restored by the editing code.
- (WebInspector.BlankStylePropertiesSection): Call the StylePropertiesSection constructor with appropriate data.
- Remove event listener code.
- (WebInspector.BlankStylePropertiesSection.prototype.expand): Added. Does nothing to prevent expanding.
- (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted.callback): Correctly construct the
- WebInspector.CSSStyleDeclaration. Call editingSelectorCancelled instead of editingCancelled.
- (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted): Renamed from editingCommitted to
- override the base class.
- (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCancelled): Remove the section.
- (WebInspector.BlankStylePropertiesSection.prototype.makeNormal): Removed event listener code. Removed the delete lines
- since they were doing nothing (deleting nonexistent properties that exist only on the prototype.) Change prototypes at
- the end to correctly swtich to a real StylePropertiesSection.
- * inspector/front-end/inspector.js:
- (WebInspector.startEditing.editingCancelled): Ceck for null/undefined callbacks.
- (WebInspector.startEditing.editingCommitted): Ditto.
-
-2009-09-10 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Eric Seidel.
-
- [Qt] Fix comparison between signed and unsigned integer warnings
- https://bugs.webkit.org/show_bug.cgi?id=29162
-
- No functional change.
-
- * bridge/qt/qt_runtime.cpp:
- (JSC::Bindings::findMethodIndex):
- * platform/MIMETypeRegistry.cpp:
- (WebCore::initializeSupportedImageMIMETypes):
- (WebCore::initializeSupportedImageMIMETypesForEncoding):
- * platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::GraphicsContext::drawFocusRing):
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoderQt::duration):
- (WebCore::ImageDecoderQt::imageAtIndex):
- * plugins/qt/PluginPackageQt.cpp:
- (WebCore::PluginPackage::fetchInfo):
-
-2009-09-10 Martin Robinson <martin.james.robinson@gmail.com>
-
- Reviewed by Gustavo Noronha.
-
- Build fix for GTKafter r48267.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::buffered):
-
-2009-09-08 John Abd-El-Malek <jam@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Remove unneeded define for ActiveX.
- https://bugs.webkit.org/show_bug.cgi?id=29054
-
- * rendering/RenderPartObject.cpp:
- (WebCore::createClassIdToTypeMap):
- (WebCore::serviceTypeForClassId):
- (WebCore::RenderPartObject::updateWidget):
-
-2009-09-10 Mark Rowe <mrowe@apple.com>
-
- Rubber-stamped by Sam Weinig.
-
- Don't copy IDL files in to the built framework.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-09-10 Xiaomei Ji <xji@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Implment Range.expand().
- https://bugs.webkit.org/show_bug.cgi?id=27632
-
- Test: fast/dom/Range/range-expand.html
-
- * dom/Range.cpp:
- (WebCore::Range::expand):
- * dom/Range.h:
- * dom/Range.idl:
-
-2009-09-10 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- WebSocket API implementation.
- https://bugs.webkit.org/show_bug.cgi?id=28038
-
- Add build systems for GNUmakefile.am, WebCore.xcodeproj and
- WebCore.vcproj.
- Add websockets directory and WebSocket.idl in qt build system.
- Tests will be landed once the code is completed and functional.
-
- * DerivedSources.cpp:
- * GNUmakefile.am:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.vcproj/WebCoreCommon.vsprops:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::webSocket):
- * bindings/js/JSEventTarget.cpp:
- (WebCore::toJS):
- (WebCore::toEventTarget):
- * dom/EventTarget.cpp:
- (WebCore::EventTarget::toWebSocket):
- * dom/EventTarget.h:
- * page/DOMWindow.idl:
- * websockets/WebSocket.cpp:
- (WebCore::ProcessWebSocketEventTask::create):
- (WebCore::ProcessWebSocketEventTask::performTask):
- (WebCore::ProcessWebSocketEventTask::ProcessWebSocketEventTask):
- (WebCore::isValidProtocolString):
- (WebCore::WebSocket::connect):
- (WebCore::WebSocket::send):
- (WebCore::WebSocket::close):
- (WebCore::WebSocket::bufferedAmount):
- (WebCore::WebSocket::addEventListener):
- (WebCore::WebSocket::removeEventListener):
- (WebCore::WebSocket::dispatchEvent):
- (WebCore::WebSocket::didConnect):
- (WebCore::WebSocket::didReceiveMessage):
- (WebCore::WebSocket::didClose):
- (WebCore::WebSocket::dispatchOpenEvent):
- (WebCore::WebSocket::dispatchMessageEvent):
- (WebCore::WebSocket::dispatchCloseEvent):
- * websockets/WebSocket.h:
- (WebCore::WebSocket::create):
- (WebCore::WebSocket::):
- (WebCore::WebSocket::setOnopen):
- (WebCore::WebSocket::onopen):
- (WebCore::WebSocket::setOnmessage):
- (WebCore::WebSocket::onmessage):
- (WebCore::WebSocket::setOnclose):
- (WebCore::WebSocket::onclose):
- (WebCore::WebSocket::toWebSocket):
- (WebCore::WebSocket::eventListeners):
- (WebCore::WebSocket::refEventTarget):
- (WebCore::WebSocket::derefEventTarget):
- * websockets/WebSocketChannel.cpp: Added.
- * websockets/WebSocketChannel.h: Added.
- * websockets/WebSocketChannelClient.h: Added.
- * websockets/WebSocketHandshake.cpp: Added.
- * websockets/WebSocketHandshake.h: Added.
-
-2009-09-10 Albert J. Wong <ajwong@chromium.org>
-
- No review, windows build fix only.
-
- Spurious semicolon causing parse error in chromium build on windows.
-
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
- (WebCore::MediaPlayerPrivate::buffered):
-
-2009-09-10 Albert J. Wong <ajwong@chromium.org>
-
- No review, build fix only.
-
- Adding in a missed include from the last patch that is breaking the
- chromium build.
-
- * rendering/RenderThemeChromiumMac.mm: include TimeRanges.h
-
-2009-09-10 Alpha Lam <hclam@chromium.org>
-
- Reviewed by Eric Carlson.
-
- HTMLMediaElement buffered attribute should report a list of time ranges
- https://bugs.webkit.org/show_bug.cgi?id=29041
-
- Changed MediaPlayerPrivateInterface and MediaPlayer's definition to
- report a list of buffered time ranges as WebCore::TimeRanges. This
- change also got rid of the maxTimeBuffered() method.
-
- No new tests since this is a API change.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::percentLoaded):
- Use MediaPlaier::buffered() instead of maxTimeBuffered().
- (WebCore::HTMLMediaElement::buffered):
- ditto.
- * platform/graphics/MediaPlayer.cpp:
- (WebCore::NullMediaPlayerPrivate::buffered):
- Use MediaPlayerPrivateInterface::buffered() instead of maxTimeBuffered().
- (WebCore::MediaPlayer::buffered):
- ditto.
- * platform/graphics/MediaPlayer.h:
- Removed maxTimeBuffered() and defines PassRefPtr<TimeRanges> buffered().
- * platform/graphics/MediaPlayerPrivate.h:
- ditto.
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- Implements PassRefPtr<TimeRanges> buffered();
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
- Removed maxTimeBuffered() and defines PassRefPtr<TimeRanges> buffered().
- * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
- Removed maxTimeBuffered() and defines PassRefPtr<TimeRanges> buffered().
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::buffered):
- Implementation of buffered().
- * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
- Implements PassRefPtr<TimeRanegs> buffered().
- * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
- Removed maxTimeBuffered() and defines PassRefPtr<TimeRanges> buffered().
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
- Implements PassRefPtr<TimeRanges> buffered().
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
- Removed maxTimeBuffered() and defines PassRefPtr<TimeRanges> buffered().
- * platform/graphics/wince/MediaPlayerPrivateWince.h:
- ditto.
- * rendering/RenderThemeChromiumMac.mm:
- (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
- Use buffered() instead of maxTimeBuffered().
- * rendering/RenderThemeChromiumSkia.cpp:
- ditto.
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderThemeMac::paintMediaSliderTrack):
- ditto.
-
-2009-09-10 Cameron McCormack <cam@mcc.id.au>
-
- Reviewed by Eric Seidel.
-
- Make bindings generators more aware of IDL dependencies
- https://bugs.webkit.org/show_bug.cgi?id=29114
-
- Make the JS and ObjC bindings generators able to output dependency
- rules for DerivedSources.make to consume. These rules make a given
- generated binding class file header, JSWhatever.h, depend on Whatever's
- ancestor interfaces.
-
- * DerivedSources.make: Pass --write-dependencies to generate-bindings.pl
- when generating JS and ObjC bindings. Include dependency fies that are
- generated due to that.
- * bindings/scripts/CodeGenerator.pm: Make
- AddMethodsConstantsAndAttributesFromParentClasses accumulate a list of
- the ancestor interfaces that were visited.
- * bindings/scripts/CodeGeneratorJS.pm: Optionally write out a dependency
- file.
- * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
- * bindings/scripts/generate-bindings.pl: Add a --write-dependencies
- option.
-
-2009-09-10 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Reviewed by Xan Lopez and Dan Winship.
-
- Give all requests to libsoup, to let it queue, and schedule them
- itself, instead of throttling the number of requests in WebCore.
-
- * platform/network/ResourceRequestBase.cpp:
- * platform/network/soup/ResourceRequestSoup.cpp:
- (WebCore::initializeMaximumHTTPConnectionCountPerHost):
-
-2009-09-10 Jian Li <jianli@chromium.org>
-
- Reviewed by Eric Seidel.
-
- [V8] Make XMLHttpRequest.send handle File object.
- https://bugs.webkit.org/show_bug.cgi?id=28924
-
- Test: http/tests/local/send-dragged-file.html
-
- * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-09-10 Zoltan Horvath <zoltan@webkit.org>
-
- Reviewed by Darin Adler.
-
- Use fastNew and fastDelete instead of operator new and delete for CSSSelector class.
- https://bugs.webkit.org/show_bug.cgi?id=25930
-
- Change using of operator new to fastNew and operator delete to
- fastDeleteSkippingDestructor for CSSSelector class to avoid mismatched function call.
-
- This change fixes valgrind's 'mismatched free' notification.
-
- * css/CSSParser.cpp:
- (WebCore::CSSParser::~CSSParser):
- (WebCore::CSSParser::createFloatingSelector):
- * css/CSSSelectorList.cpp:
- (WebCore::CSSSelectorList::adoptSelectorVector):
-
-2009-09-10 Steve Block <steveblock@google.com>
-
- Reviewed by Darin Adler.
-
- Geolocation does not correctly handle reentrant calls from callbacks.
- https://bugs.webkit.org/show_bug.cgi?id=29040
-
- Tests: fast/dom/Geolocation/reentrant-error.html
- fast/dom/Geolocation/reentrant-success.html
-
- * page/Geolocation.cpp: Modified.
- (WebCore::Geolocation::handleError): Modified. Call sendError directly, clearing notifier lists before making callback.
- (WebCore::Geolocation::makeSuccessCallbacks): Modified. Call sendPosition directly, clearing notifier lists before making callback.
- * page/Geolocation.h: Modified. Deleted sendErrorToXX and sendPositionToXXX methods.
-
-2009-09-10 Erik Arvidsson <arv@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Fixes issue where focused elements did not get blur and focus events when the window was blurred and focused.
- https://bugs.webkit.org/show_bug.cgi?id=27105
-
- Test: fast/events/blur-focus-window-should-blur-focus-element.html
-
- * page/FocusController.cpp:
- (WebCore::dispatchEventsOnWindowAndFocusedNode):
- (WebCore::FocusController::setFocused):
- (WebCore::FocusController::setActive):
-
-2009-09-10 Adam Roben <aroben@apple.com>
-
- Make the play/pause button in <video> controls indicate the button's
- action, not the movie state
-
- This matches the Mac behavior, iTunes, and many other media players.
-
- No test possible.
-
- Fixes <http://webkit.org/b/29126> Play/pause button in <video>
- controls shows the wrong image
-
- Reviewed by Eric Carlson.
-
- * rendering/RenderMediaControls.cpp:
- (WebCore::RenderMediaControls::paintMediaControlsPart): Reversed when
- we show the play vs. pause artwork, so that the button reflects what
- will happen when you click it, rather than the current state of the
- movie.
-
-2009-09-09 Steve Block <steveblock@google.com>
-
- Reviewed by Maciej Stachowiak.
-
- Geolocation Coordinates::toString() prints bogus values for unspecified properties.
- https://bugs.webkit.org/show_bug.cgi?id=29080
-
- Test: fast/dom/Geolocation/position-string.html
-
- * GNUmakefile.am: Modified. Removes Geoposition.cpp and Coordinates.cpp.
- * WebCore.gypi: Modified. Removes Geoposition.cpp and Coordinates.cpp.
- * WebCore.pro: Modified. Removes Geoposition.cpp and Coordinates.cpp.
- * WebCore.vcproj/WebCore.vcproj: Modified. Removes Geoposition.cpp and Coordinates.cpp.
- * WebCore.xcodeproj/project.pbxproj: Modified. Removes Geoposition.cpp and Coordinates.cpp.
- * WebCoreSources.bkl: Modified. Removes Geoposition.cpp and Coordinates.cpp.
- * page/Coordinates.cpp: Removed.
- * page/Coordinates.h: Modified. Removes toString method.
- * page/Coordinates.idl: Modified. Removes toString method.
- * page/Geoposition.cpp: Removed.
- * page/Geoposition.h: Modified. Removes toString method.
- * page/Geoposition.idl: Modified. Removes toString method.
-
-2009-09-09 Steve Block <steveblock@google.com>
-
- Reviewed by Adam Barth.
-
- Correctly applies the Geolocation timeout property.
- https://bugs.webkit.org/show_bug.cgi?id=27256
-
- If a timeout is specified, the timer is started as soon as the location acquistion process starts.
- If a position fix is not obtained within the timeout interval, the position request is cancelled
- and the error callback (if specified) is invoked. If a position fix is obtained within the timeout
- interval, the timer is stopped. Permissions are then requested from the user if required. See
- http://www.w3.org/TR/geolocation-API/#position-options.
-
- Note that this logic means that the time required to obtain permissions from the user is not
- included in the timeout interval.
-
- Tests: fast/dom/Geolocation/timeout.html
- fast/dom/Geolocation/timeout-zero.html
-
- * page/Geolocation.cpp: Modified.
- (WebCore::Geolocation::GeoNotifier::GeoNotifier): Modified. Takes Geolocation object as parameter.
- (WebCore::Geolocation::GeoNotifier::hasZeroTimeout): Added. Determines whether this request has a zero timeout.
- (WebCore::Geolocation::GeoNotifier::startTimerIfNeeded): Renamed from startTimer. Starts the timer if a timeout was specified.
- (WebCore::Geolocation::GeoNotifier::timerFired): Modified. Calls the error callback if specified, and reports the timeout to the Geolocation object.
- (WebCore::Geolocation::getCurrentPosition): Modified. Calls maybeStartTimer when starting the location acquisition process.
- (WebCore::Geolocation::watchPosition): Modified. Calls maybeStartTimer when starting the location acquisition process.
- (WebCore::Geolocation::requestTimedOut): Added. Cancels a request when it times out.
- (WebCore::Geolocation::setIsAllowed): Modified. No longer starts timers.
- (WebCore::Geolocation::sendPosition): Modified. No longer stops timers.
- (WebCore::Geolocation::stopTimer): Added. Stops the timers for a vector of notifiers.
- (WebCore::Geolocation::stopTimersForOneShots): Added. Stops the timers for all one-shots.
- (WebCore::Geolocation::stopTimersForWatchers): Added. Stops the timers for all watchers.
- (WebCore::Geolocation::stopTimers): Added. Stops the timers for all requests.
- (WebCore::Geolocation::geolocationServicePositionChanged): Modfified. Stops the timers for all requests.
- * page/Geolocation.h: Modified.
- (WebCore::Geolocation::GeoNotifier::create): Modified. Takes Geolocation object as parameter.
-
-2009-09-09 Chris Fleizach <cfleizach@apple.com>
-
- AX notifications should be an ENUM type instead of strings
- https://bugs.webkit.org/show_bug.cgi?id=28963
-
- Build fix for Qt.
-
- * accessibility/AXObjectCache.h:
- (WebCore::AXObjectCache::postNotification):
- (WebCore::AXObjectCache::postPlatformNotification):
-
-2009-09-08 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- AX notifications should be an ENUM type instead of strings
- https://bugs.webkit.org/show_bug.cgi?id=28963
-
- Moves AX notifications over to an ENUM type instead of
- using the actual string values that are used on OS X.
-
- * accessibility/AXObjectCache.cpp:
- (WebCore::AXObjectCache::postNotification):
- (WebCore::AXObjectCache::selectedChildrenChanged):
- * accessibility/AXObjectCache.h:
- (WebCore::AXObjectCache::):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
- * accessibility/chromium/AXObjectCacheChromium.cpp:
- (WebCore::AXObjectCache::postPlatformNotification):
- * accessibility/gtk/AXObjectCacheAtk.cpp:
- (WebCore::AXObjectCache::postPlatformNotification):
- * accessibility/mac/AXObjectCacheMac.mm:
- (WebCore::AXObjectCache::postPlatformNotification):
- * accessibility/win/AXObjectCacheWin.cpp:
- (WebCore::AXObjectCache::postPlatformNotification):
- * dom/Document.cpp:
- (WebCore::Document::implicitClose):
- * dom/Element.cpp:
- (WebCore::Element::updateAfterAttributeChanged):
- * editing/Editor.cpp:
- (WebCore::Editor::respondToChangedContents):
- * editing/mac/SelectionControllerMac.mm:
- (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::setChecked):
- * page/FrameView.cpp:
- (WebCore::FrameView::layout):
- * rendering/RenderTextControl.cpp:
- (WebCore::RenderTextControl::setInnerTextValue):
-
-2009-09-08 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Missing checkout for getSVGDocument()
- https://bugs.webkit.org/show_bug.cgi?id=29064
-
- The V8 code generator didn't understand SVGCheckSecurityDocument.
-
- Tests: http/tests/security/xss-DENIED-getSVGDocument-iframe.html
- http/tests/security/xss-DENIED-getSVGDocument-object.html
-
- * bindings/scripts/CodeGeneratorV8.pm:
-
-2009-09-09 Cameron McCormack <cam@mcc.id.au>
-
- Reviewed by Eric Seidel.
-
- Make SVGStyleElement inherit from SVGLangSpace
- https://bugs.webkit.org/show_bug.cgi?id=29058
-
- Required by SVG 1.1 Second Edition:
- http://dev.w3.org/SVG/profiles/1.1F2/publish/styling.html#InterfaceSVGStyleElement
-
- Test: svg/dom/SVGStyleElement/style-langspace.html
-
- * svg/SVGStyleElement.cpp: Drop methods xmlspace and setXmlspace.
- (WebCore::SVGStyleElement::SVGStyleElement): Add SVGLangSpace()
- initializer.
- (WebCore::SVGStyleElement::parseMappedAttribute): Call
- parseMappedAttribute on SVGLangSpace.
- * svg/SVGStyleElement.h: Drop xmlspace and setXmlspace declarations.
- * svg/SVGStyleElement.idl: Drop xmlspace attribute and add SVGLangSpace
- as a superinterface.
-
-2009-09-09 Nate Chapin <japhet@chromium.org>
-
- Reviewed by David Levin.
-
- Remove unnecessary includes and forward declarations in V8Proxy.h
-
- https://bugs.webkit.org/show_bug.cgi?id=29111
-
- * bindings/v8/V8Proxy.h:
-
-2009-07-30 Eric Seidel <eric@webkit.org>
-
- Reviewed by Adam Barth.
-
- Add more position constructors
- positionBeforeNode, positionAfterNode
- firstPositionInNode, lastPositionInNode
- https://bugs.webkit.org/show_bug.cgi?id=25494
-
- I also added a lastOffsetInNode and deployed it to a couple places.
-
- There are no callers to these new constructors yet, but those
- will be coming in future patches.
-
- * dom/Position.cpp:
- (WebCore::Position::computeOffsetInContainerNode):
- * dom/Position.h:
- (WebCore::positionBeforeNode):
- (WebCore::positionAfterNode):
- (WebCore::lastOffsetInNode):
- (WebCore::firstPositionInNode):
- (WebCore::lastPositionInNode):
- * editing/ApplyStyleCommand.cpp:
- * editing/TextIterator.cpp:
- (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
- * editing/htmlediting.cpp:
- (WebCore::lastOffsetForEditing):
-
-2009-04-30 Eric Seidel <eric@webkit.org>
-
- Reviewed by Adam Barth.
-
- Rename positionBeforeNode to positionInParentBeforeNode
- and positionAfterNode to positionInParentAfterNode
- in preparation for adding a positionBeforeNode
- which returns a neighbor-anchored position.
- https://bugs.webkit.org/show_bug.cgi?id=25494
-
- No functional changes, thus no tests.
-
- * dom/PositionConstructors.h:
- (WebCore::positionInParentBeforeNode):
- (WebCore::positionInParentAfterNode):
- * dom/PositionIterator.cpp:
- (WebCore::PositionIterator::operator Position):
- * editing/ApplyStyleCommand.cpp:
- (WebCore::ApplyStyleCommand::applyInlineStyle):
- * editing/CompositeEditCommand.cpp:
- (WebCore::CompositeEditCommand::positionOutsideTabSpan):
- (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
- (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
- * editing/CreateLinkCommand.cpp:
- (WebCore::CreateLinkCommand::doApply):
- * editing/DeleteButtonController.cpp:
- (WebCore::DeleteButtonController::deleteTarget):
- * editing/DeleteSelectionCommand.cpp:
- (WebCore::DeleteSelectionCommand::initializeStartEnd):
- (WebCore::updatePositionForNodeRemoval):
- * editing/InsertLineBreakCommand.cpp:
- (WebCore::InsertLineBreakCommand::doApply):
- * editing/InsertListCommand.cpp:
- (WebCore::InsertListCommand::doApply):
- * editing/InsertParagraphSeparatorCommand.cpp:
- (WebCore::InsertParagraphSeparatorCommand::doApply):
- * editing/InsertTextCommand.cpp:
- (WebCore::InsertTextCommand::input):
- * editing/ReplaceSelectionCommand.cpp:
- (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent):
- (WebCore::ReplaceSelectionCommand::doApply):
- * editing/VisibleSelection.cpp:
- (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
- * editing/htmlediting.cpp:
- (WebCore::firstEditablePositionAfterPositionInRoot):
- (WebCore::lastEditablePositionBeforePositionInRoot):
- (WebCore::rangeCompliantEquivalent):
- (WebCore::positionBeforeContainingSpecialElement):
- (WebCore::positionAfterContainingSpecialElement):
- (WebCore::positionBeforeTabSpan):
-
-2009-04-30 Eric Seidel <eric@webkit.org>
-
- Reviewed by Adam Barth.
-
- Re-organize position creation functions in preparation for adding more
- https://bugs.webkit.org/show_bug.cgi?id=25494
-
- Make position functions inline to avoid ref-churn.
- Remove startPosition/endPosition as they were only used in one place.
-
- No functional changes, thus no tests.
-
- * dom/Position.cpp:
- * dom/Position.h:
- (WebCore::positionBeforeNode):
- (WebCore::positionAfterNode):
- * editing/SelectionController.cpp:
- (WebCore::SelectionController::moveTo):
- * editing/TypingCommand.cpp:
- * editing/htmlediting.cpp:
- * editing/htmlediting.h:
- (WebCore::firstDeepEditingPositionForNode):
- (WebCore::lastDeepEditingPositionForNode):
- * rendering/RenderObject.cpp:
-
-2009-09-09 Kevin Watters <kevinwatters@gmail.com>
-
- Reviewed by Kevin Ollivier.
-
- [wx] Add wxSize conversions for IntSize.
- https://bugs.webkit.org/show_bug.cgi?id=29104
-
- * platform/graphics/IntSize.h:
- * platform/graphics/wx/IntSizeWx.cpp: Added.
- (WebCore::IntSize::IntSize):
- (WebCore::IntSize::operator wxSize):
-
-2009-09-09 Yaar Schnitman <yaar@chromium.org>
-
- Reviewed by David Levin.
-
- Chromium uses its own config.h file that was forked from webkit's config.h.
- By merging in Chromium's defines, Chromium would again be able to use webkit's
- config.h.
-
- https://bugs.webkit.org/show_bug.cgi?id=28882
-
- * config.h: Added chromium-specific defines.
-
-2009-09-09 Jens Alfke <snej@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Initialize DataTransfer's effectAllowed and dropEffect properties correctly
- according to HTML5 spec (sec. 7.9.2-7.9.3).
- https://bugs.webkit.org/show_bug.cgi?id=26700
- - At the start of a drag operation, the value of effectAllowed should be
- the string "uninitialized".
- - At end of dragstart handler, if effectAllowed hasn't been set yet, it
- should be set to "copy".
- - on dragenter and dragover event, dropEffect should be initialized to a
- default value based on the value of effectAllowed.
- - at end of dragenter and dragover the dropEffect should be set to "none"
- if the value set by the handler doesn't match the effectAllowed.
- - on dragleave event, dropEffect should be "none".
- - on drop event, dropEffect should be the previously negotiated value.
-
- Test: fast/events/drag-dropeffect.html
-
- * WebCore.base.exp:
- Added a parameter to EventHandler::dragSourceMovedTo.
- * dom/Clipboard.cpp:
- (WebCore::Clipboard::Clipboard):
- Initialize m_effectAllowed to "uninitialized".
- (WebCore::Clipboard::sourceOperation):
- Treat "uninitialized" as meaning no value has been set.
- * page/DragController.cpp:
- (WebCore::DragController::DragController):
- Initialize new member m_destinationDragOperation.
- (WebCore::DragController::dragExited):
- Set m_destinationDragOperation to none on dragExit.
- (WebCore::DragController::performDrag):
- Set m_destinationDragOperation to current dropEffect.
- (WebCore::DragController::dragEnteredOrUpdated):
- Make sure to clear the operation if drag source doesn't allow it.
- (WebCore::DragController::tryDHTMLDrag):
- Set a default value for the dst drag op before sending dragEnter/Over.
- (WebCore::DragController::startDrag):
- Clear m_destinationDragOperation at start of drag.
- * page/DragController.h:
- (WebCore::DragController::destinationDragOperation):
- Added new member m_destinationDragOperation, and its public getter.
- * page/EventHandler.cpp:
- (WebCore::EventHandler::updateDragAndDrop):
- dropEffect should be 'none' during dropleave handler, per spec.
- (WebCore::EventHandler::dragSourceMovedTo):
- Added DragOperation parameter, so the handler sees the current dropEffect.
- (WebCore::EventHandler::handleDrag):
- Assume DragOperationEvery for non-DHTML drags.
- * page/EventHandler.h:
- Added DragOperation parameter to dragSourceMovedTo().
-
-2009-09-09 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- 1. Adding support/bindings for read-only transactions.
- 2. Disallowing the SQLITE_*_VIEW and REINDEX operations in the
- private browsing mode.
- 3. Adding an authorizer test.
-
- https://bugs.webkit.org/show_bug.cgi?id=28918
-
- Test: storage/test-authorizer.html
-
- * bindings/js/JSDatabaseCustom.cpp:
- (WebCore::createTransaction): Parses all arguments and executes a
- transaction.
- (WebCore::JSDatabase::transaction): Refactored to use
- createTransaction().
- (WebCore::JSDatabase::readTransaction): Added to execute read-only
- transactions using createTransaction().
- * bindings/v8/custom/V8CustomBinding.h: Added the binding for
- Database::readTransaction().
- * bindings/v8/custom/V8DatabaseCustom.cpp:
- (WebCore::createTransaction): Parses all arguments and executes a
- transaction.
- (WebCore::transaction): Refactored to use createTransaction().
- (WebCore::readTransaction): Added to execute read-only
- transactions using createTransaction().
- * storage/Database.cpp:
- (WebCore::Database::transaction): Added support for read-only
- transactions.
- * storage/Database.h: Added support for read-only transactions.
- * storage/Database.idl: Added support for read-only transactions.
- * storage/DatabaseAuthorizer.cpp:
- (WebCore::DatabaseAuthorizer::createTempTable): Make it obvious
- that the statement will be denied in private browsing mode and
- read-only transactions.
- (WebCore::DatabaseAuthorizer::dropTempTable): Same.
- (WebCore::DatabaseAuthorizer::createTempIndex): Same.
- (WebCore::DatabaseAuthorizer::dropTempIndex): Same.
- (WebCore::DatabaseAuthorizer::createTempTrigger): Same.
- (WebCore::DatabaseAuthorizer::dropTempTrigger): Same.
- (WebCore::DatabaseAuthorizer::createView): Deny in private
- browsing mode and read-only transactions.
- (WebCore::DatabaseAuthorizer::createTempView): Same.
- (WebCore::DatabaseAuthorizer::dropView): Same.
- (WebCore::DatabaseAuthorizer::dropTempView): Same.
- (WebCore::DatabaseAuthorizer::allowReindex): Same.
- * storage/DatabaseAuthorizer.h:
- * storage/SQLTransaction.cpp: Added support for read-only
- transactions.
- (WebCore::SQLTransaction::create):
- (WebCore::SQLTransaction::SQLTransaction):
- (WebCore::SQLTransaction::executeSQL):
- (WebCore::SQLTransaction::acquireLock):
- * storage/SQLTransaction.h:
- * storage/SQLTransactionCoordinator.cpp:
- (WebCore::SQLTransactionCoordinator::acquireLock): Added a new
- parameter in preparation for a change that will allow multiple
- read-only transactions on the same DB to run concurrently.
- * storage/SQLTransactionCoordinator.h:
-
-2009-09-09 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Adam Roben.
-
- https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection. This is similar
- to user script injection but allows for user stylesheets to be added. The stylesheets are applied immediately
- to all Frames in the PageGroup.
-
- Added userscripts/simple-stylesheet.html test case.
-
- * WebCore.base.exp:
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::CSSStyleSelector):
- * css/CSSStyleSelector.h:
- * dom/Document.cpp:
- (WebCore::Document::Document):
- (WebCore::Document::attach):
- (WebCore::Document::pageGroupUserSheets):
- (WebCore::Document::clearPageGroupUserSheets):
- (WebCore::Document::recalcStyleSelector):
- * dom/Document.h:
- * loader/PlaceholderDocument.cpp:
- (WebCore::PlaceholderDocument::attach):
- * page/PageGroup.cpp:
- (WebCore::PageGroup::addUserStyleSheet):
- (WebCore::PageGroup::removeUserContentForWorld):
- (WebCore::PageGroup::removeAllUserContent):
- * page/PageGroup.h:
- (WebCore::PageGroup::userStyleSheets):
- * page/UserStyleSheet.h: Added.
- (WebCore::UserStyleSheet::UserStyleSheet):
- (WebCore::UserStyleSheet::source):
- (WebCore::UserStyleSheet::url):
- (WebCore::UserStyleSheet::patterns):
- (WebCore::UserStyleSheet::worldID):
- * page/UserStyleSheetTypes.h: Added.
-
-2009-09-09 Carol Szabo <carol.szabo@nokia.com>
-
- Reviewed by Ariya Hidayat.
-
- [Qt] CSS Style -webkit-box-shadow is not rendered correctly on
- Qt platform
- https://bugs.webkit.org/show_bug.cgi?id=23291
-
- * platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::GraphicsContext::drawRect):
- (WebCore::GraphicsContext::strokeArc):
- (WebCore::GraphicsContext::drawConvexPolygon):
- (WebCore::GraphicsContext::fillPath):
- (WebCore::GraphicsContext::strokePath):
- (WebCore::GraphicsContext::fillRect):
- (WebCore::GraphicsContext::fillRoundedRect):
- Added the ability to draw shadows for all these curves.
-
-2009-09-09 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Hausmann.
-
- Add the qwebgraphicsitem.cpp to the build system.
-
- https://bugs.webkit.org/show_bug.cgi?id=28862
-
- * WebCore.pro:
-
-2009-09-09 Kevin Watters <kevinwatters@gmail.com>
-
- Reviewed by Kevin Ollivier.
-
- [wx port] Move functions in TemporaryLinkStubs.cpp out to files where
- they belong.
-
- https://bugs.webkit.org/show_bug.cgi?id=29088
-
- * editing/wx/EditorWx.cpp:
- (WebCore::Editor::showColorPanel):
- (WebCore::Editor::showFontPanel):
- (WebCore::Editor::showStylesPanel):
- * platform/graphics/wx/GraphicsContextWx.cpp:
- (WebCore::GraphicsContext::setPlatformShadow):
- (WebCore::GraphicsContext::clearPlatformShadow):
- (WebCore::GraphicsContext::beginTransparencyLayer):
- (WebCore::GraphicsContext::endTransparencyLayer):
- (WebCore::GraphicsContext::clearRect):
- (WebCore::GraphicsContext::strokeRect):
- (WebCore::GraphicsContext::setLineCap):
- (WebCore::GraphicsContext::setLineJoin):
- (WebCore::GraphicsContext::setMiterLimit):
- (WebCore::GraphicsContext::setAlpha):
- (WebCore::GraphicsContext::addInnerRoundedRectClip):
- * platform/graphics/wx/IconWx.cpp: Added.
- (WebCore::Icon::~Icon):
- (WebCore::Icon::createIconForFile):
- (WebCore::Icon::createIconForFiles):
- (WebCore::Icon::paint):
- * platform/graphics/wx/ImageWx.cpp:
- (WebCore::Image::loadPlatformResource):
- (WebCore::Image::drawPattern):
- * platform/wx/CursorWx.cpp:
- (WebCore::moveCursor):
- * platform/wx/FileChooserWx.cpp: Added.
- (WebCore::FileChooser::basenameForWidth):
- * platform/wx/KURLWx.cpp: Added.
- (WebCore::KURL::fileSystemPath):
- * platform/wx/SSLKeyGeneratorWx.cpp: Added.
- (WebCore::getSupportedKeySizes):
- (WebCore::signedPublicKeyAndChallengeString):
- * platform/wx/SearchPopupMenuWx.cpp: Added.
- (WebCore::SearchPopupMenu::SearchPopupMenu):
- (WebCore::SearchPopupMenu::saveRecentSearches):
- (WebCore::SearchPopupMenu::loadRecentSearches):
- (WebCore::SearchPopupMenu::enabled):
- * platform/wx/SharedBufferWx.cpp: Added.
- (WebCore::SharedBuffer::createWithContentsOfFile):
- * platform/wx/SystemTimeWx.cpp: Added.
- (WebCore::userIdleTime):
- * platform/wx/TemporaryLinkStubs.cpp: Removed.
- * platform/wx/TextBreakIteratorInternalICUWx.cpp: Added.
- (WebCore::currentSearchLocaleID):
- (WebCore::currentTextBreakLocaleID):
- * platform/wx/WidgetWx.cpp:
- (WebCore::Widget::setIsSelected):
-
-2009-09-09 Steve Block <steveblock@google.com>
-
- Reviewed by Adam Barth.
-
- Geolocation incorrectly calls error callback in case of exception in success callback.
- https://bugs.webkit.org/show_bug.cgi?id=27255
-
- Test: fast/dom/Geolocation/callback-exception.html
-
- * bindings/js/JSCustomPositionCallback.cpp: Modified.
- (WebCore::JSCustomPositionCallback::handleEvent): Modified. Removed raisedException out param.
- * bindings/js/JSCustomPositionCallback.h: Modified. Removed raisedException out param from handleEvent method and made handleEvent private.
- * bindings/js/JSCustomPositionErrorCallback.h: Modified. Made handleEvent private.
- * page/Geolocation.cpp: Modified.
- (WebCore::Geolocation::sendPosition): Modified. No longer call error callback in case of exception in success callback.
- * page/PositionCallback.h: Modified. Removed raisedException out param from handleEvent method.
-
-2009-09-09 Steve Block <steveblock@google.com>
-
- Reviewed by Darin Adler.
-
- When Geolocation permission is denied, stops watches as well as one-shots.
- https://bugs.webkit.org/show_bug.cgi?id=28305.
-
- Tests: fast/dom/Geolocation/watch.html
- fast/dom/Geolocation/permission-denied-stops-watches.html
-
- * page/Geolocation.cpp: Modified.
- (WebCore::Geolocation::setIsAllowed): Modified. Marks the permission error as fatal.
- (WebCore::Geolocation::handleError): Modified. If the error is fatal, stops watchers as well as one-shots.
- * page/PositionError.h: Modified.
- (WebCore::PositionError::setIsFatal): Added. Marks an error as fatal.
- (WebCore::PositionError::isFatal): Added. Determines whether an error is fatal.
-
-2009-09-09 Roland Steiner <rolandsteiner@google.com>
-
- Reviewed by Eric Seidel.
-
- Bug 28964 - [Chromium] ChromiumDataObject should have getter/setter interface
-
- Added getter/setter methods and trivial inline implementations for each.
- (Note that they are not yet actually used.)
- Once the Chromium code is changed to use them instead of directly accessing the
- member variables, the member variables should be made private and cleaned up.
-
- No new tests (no functional behavior changed).
-
- * platform/chromium/ChromiumDataObject.h:
- (WebCore::ChromiumDataObject::mainURL):
- (WebCore::ChromiumDataObject::setMainURL):
- (WebCore::ChromiumDataObject::mainURLTitle):
- (WebCore::ChromiumDataObject::setMainURLTitle):
- (WebCore::ChromiumDataObject::textPlain):
- (WebCore::ChromiumDataObject::setTextPlain):
- (WebCore::ChromiumDataObject::textHTML):
- (WebCore::ChromiumDataObject::setTextHTML):
- (WebCore::ChromiumDataObject::htmlBaseURL):
- (WebCore::ChromiumDataObject::setHTMLBaseURL):
- (WebCore::ChromiumDataObject::content):
- (WebCore::ChromiumDataObject::releaseContent):
- (WebCore::ChromiumDataObject::setContent):
- (WebCore::ChromiumDataObject::contentFileExtension):
- (WebCore::ChromiumDataObject::setContentFileExtension):
- (WebCore::ChromiumDataObject::contentFileName):
- (WebCore::ChromiumDataObject::setContentFileName):
- (WebCore::ChromiumDataObject::fileNames):
- (WebCore::ChromiumDataObject::setFileNames):
- (WebCore::ChromiumDataObject::takeFileNames):
-
-2009-09-08 Pat Bradley <vincent.bradley@nokia.com>
-
- Reviewed by Ariya Hidayat.
-
- [Qt] locale date displays incorrect date format in symbian.
- https://bugs.webkit.org/show_bug.cgi?id=29032
-
- strftime() in Symbian does not support #
- Layout tests cannot be run on Symbian yet, so they are not updated.
-
- * runtime/DatePrototype.cpp:
- (JSC::formatLocaleDate):
-
-2009-09-09 Rohini Ananth <rohini.ananth@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- NPAPI Plugin NPP_AsFile not working on Qt Webkit
- https://bugs.webkit.org/show_bug.cgi?id=29068
-
- * platform/qt/FileSystemQt.cpp:
- (WebCore::openTemporaryFile)
- Autoremove property of QTemporaryFile has been set to false. Hence closeFile() just closes and does not delete the file.
- This solves the deletion of created temp file in PluginStream::destroyStream() before passing to plugin in NPP_AsFile.
-
-2009-09-08 Oliver Hunt <oliver@apple.com>
-
- Reviewed by NOBODY (Build fix).
-
- Remove a few incorrect changes I left in.
-
- * bindings/scripts/CodeGeneratorJS.pm:
-
-2009-09-08 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Sam Weinig.
-
- Support numeric index getters in bindings
- https://bugs.webkit.org/show_bug.cgi?id=29067
-
- Add HasNumericIndexGetter to indicate a non-custom getter that
- returns a number. The numeric index getter also uses PropertySlot's
- setValue rather than setCustomIndex to avoid an additional indirect
- call.
-
- * bindings/js/JSCanvasByteArrayCustom.cpp:
- * bindings/js/JSCanvasFloatArrayCustom.cpp:
- * bindings/js/JSCanvasIntArrayCustom.cpp:
- * bindings/js/JSCanvasShortArrayCustom.cpp:
- * bindings/js/JSCanvasUnsignedByteArrayCustom.cpp:
- * bindings/js/JSCanvasUnsignedIntArrayCustom.cpp:
- * bindings/js/JSCanvasUnsignedShortArrayCustom.cpp:
- * bindings/scripts/CodeGeneratorJS.pm:
- * html/canvas/CanvasByteArray.h:
- (WebCore::CanvasByteArray::item):
- * html/canvas/CanvasByteArray.idl:
- * html/canvas/CanvasFloatArray.h:
- (WebCore::CanvasFloatArray::get):
- (WebCore::CanvasFloatArray::item):
- * html/canvas/CanvasFloatArray.idl:
- * html/canvas/CanvasIntArray.h:
- (WebCore::CanvasIntArray::get):
- (WebCore::CanvasIntArray::item):
- * html/canvas/CanvasIntArray.idl:
- * html/canvas/CanvasPixelArray.idl:
- * html/canvas/CanvasShortArray.h:
- (WebCore::CanvasShortArray::get):
- (WebCore::CanvasShortArray::item):
- * html/canvas/CanvasShortArray.idl:
- * html/canvas/CanvasUnsignedByteArray.h:
- (WebCore::CanvasUnsignedByteArray::get):
- (WebCore::CanvasUnsignedByteArray::item):
- * html/canvas/CanvasUnsignedByteArray.idl:
- * html/canvas/CanvasUnsignedIntArray.h:
- (WebCore::CanvasUnsignedIntArray::get):
- (WebCore::CanvasUnsignedIntArray::item):
- * html/canvas/CanvasUnsignedIntArray.idl:
- * html/canvas/CanvasUnsignedShortArray.h:
- (WebCore::CanvasUnsignedShortArray::item):
- * html/canvas/CanvasUnsignedShortArray.idl:
-
-2009-09-08 Kevin Ollivier <kevino@theolliviers.com>
-
- wx build fix for 2.8.
-
- * platform/wx/wxcode/mac/carbon/scrollbar_render.cpp:
- (wxRenderer_DrawScrollbar):
-
-2009-09-08 Jens Alfke <snej@chromium.org>
-
- Reviewed by Eric Seidel.
-
- In Mac Chromium, clicking below the last line of an editable area (textarea or
- contenteditable) should put the caret at the end of the last line, as in Mac Safari.
-
- Tests: LayoutTests/editing/selection/click-in-margins-inside-editable-div.html
- LayoutTests/editing/selection/click-in-padding-with-multiple-line-boxes.html
-
- * page/Settings.cpp:
- (WebCore::Settings::Settings): Change #if PLATFORM_MAC to be Mac-Chrome-inclusive.
-
-2009-09-08 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Mark Rowe.
-
- Make sure not to do an early return when a data URL stylesheet successfully loads. We need to still
- clear the old cached sheet out of all existing Frames. Fixes the data URL stylesheet layout test failure.
-
- * page/Page.cpp:
- (WebCore::Page::userStyleSheetLocationChanged):
-
-2009-09-08 Sam Weinig <sam@webkit.org>
-
- Fix windows build.
-
- * dom/Document.idl:
-
-2009-09-08 Kevin Ollivier <kevino@theolliviers.com>
-
- More robust wx build fix for 2.9.
-
- * platform/wx/wxcode/mac/carbon/scrollbar_render.cpp:
- (wxRenderer_DrawScrollbar):
-
-2009-09-08 Sam Weinig <sam@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=27046
- Implement CSSOM DocumentView.caretRangeFromPoint
-
- Tests: fast/dom/Document/CaretRangeFromPoint/basic.html
- fast/dom/Document/CaretRangeFromPoint/replace-element.html
-
- * dom/Document.cpp:
- (WebCore::Document::caretRangeFromPoint):
- * dom/Document.h:
- * dom/Document.idl:
-
-2009-09-08 Kevin Ollivier <kevino@theolliviers.com>
-
- wx build fix, generate derived sources earlier in order to make sure
- they're found by the build system when generating the list of sources to build.
-
- * wscript:
-
-2009-09-08 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- <iterator> include in V8Proxy.h is spurious and causing ObjC compile issues for Chromium.
-
- Test: Chromium mac canary build is fixed.
-
- * bindings/v8/V8Proxy.h: Remove <iterator> include.
-
-2009-09-08 Xan Lopez <xlopez@igalia.com>
-
- Unreviewed attempt to fix the GTKbuild.
-
- * GNUmakefile.am:
-
-2009-09-04 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=28987, make the Document cache the page's user stylesheet in
- parsed form. Allows the sheet to survive across destruction/re-creation of the CSSStyleSelector.
-
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::CSSStyleSelector):
- * css/CSSStyleSelector.h:
- * dom/Document.cpp:
- (WebCore::Document::attach):
- (WebCore::Document::pageUserSheet):
- (WebCore::Document::clearPageUserSheet):
- (WebCore::Document::recalcStyleSelector):
- * dom/Document.h:
- * loader/PlaceholderDocument.cpp:
- (WebCore::PlaceholderDocument::attach):
- * page/Page.cpp:
- (WebCore::Page::userStyleSheetLocationChanged):
- * page/Settings.cpp:
- (WebCore::Settings::setUserStyleSheetLocation):
-
-2009-09-08 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Unreviewed buildfix.
-
- Fix Qt build after 48167, by adding the new cpp/h files
- added to WebCore.gypi to WebCore.pro as well.
-
- * WebCore.pro:
-
-2009-09-08 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- should not pass URI fragments to libsoup
- https://bugs.webkit.org/show_bug.cgi?id=28687
-
- Strip the fragment from the URI before passing it to soup, since
- it forwards it to servers in some cases (like when using a proxy)
- which confuses them and makes them return 403/404.
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::startHttp):
- (WebCore::):
-
-2009-09-08 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Hausmann.
-
- Add QGraphicsScene events support to the Qt platform events.
-
- * platform/PlatformMouseEvent.h:
- * platform/PlatformWheelEvent.h:
- * platform/qt/PlatformMouseEventQt.cpp:
- (WebCore::PlatformMouseEvent::PlatformMouseEvent):
- * platform/qt/WheelEventQt.cpp:
- (WebCore::PlatformWheelEvent::applyDelta):
- (WebCore::PlatformWheelEvent::PlatformWheelEvent):
-
-2009-09-08 Michael Nordman <michaeln@google.com>
-
- Reviewed by Eric Seidel.
-
- [Chromium] Cleanup: remove a few deprecated methods.
- https://bugs.webkit.org/show_bug.cgi?id=28960
-
- No new tests, just syntactic sugar.
-
- * platform/network/chromium/ResourceRequest.h:
- * platform/network/chromium/ResourceResponse.h:
-
-2009-09-08 Yongjun Zhang <yongjun.zhang@nokia.com>
-
- Reviewed by Ariya Hidayat.
-
- https://bugs.webkit.org/show_bug.cgi?id=28981
-
- [Qt] make npapi.h compile in winscw compiler.
-
- Add XP_SYMBIAN macro to identify Symbian OS; this macro should be used for Symbian
- specific changes in npapi.h.
- Undefine XP_WIN when building for Symbian to avoid including Windows specific code.
-
- * bridge/npapi.h:
-
-2009-09-08 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Geoff Garen.
-
- Web Inspector assertion failure related to marking
- https://bugs.webkit.org/show_bug.cgi?id=28997
-
- When wrapping the callback the JSInspectorCallbackWrapper creator was using
- inheritorID for the prototype structure which is unsafe for anything other
- than a pure JS object. Instead we now create a new structure, which while
- inefficient is not problematic as this code is not hit frequently.
-
- * bindings/js/JSInspectorCallbackWrapper.cpp:
- (WebCore::JSInspectorCallbackWrapper::wrap):
-
-2009-09-08 Kelly Norton <knorton@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- Add missing extension to the file entry in WebCore.vcproj.
-
- * WebCore.vcproj/WebCore.vcproj: Added "cpp".
-
-2009-09-08 Jian Li <jianli@chromium.org>
-
- Reviewed by David Levin.
-
- dataTransfer.types() should not return Files if file list is empty in the clipboard.
- https://bugs.webkit.org/show_bug.cgi?id=28891
-
- We change the behavior to handle the empty file list in order to match the spec.
-
- Tested by clipboard-file-access.html.
-
- * platform/mac/ClipboardMac.mm:
- (WebCore::addHTMLClipboardTypesForCocoaType):
- (WebCore::ClipboardMac::types):
-
-2009-09-08 Steve VanDeBogart <vandebo@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Handle middle click in Chromium like QT
- https://bugs.webkit.org/show_bug.cgi?id=28696
-
- Tested by middle-click-onpaste.html.
-
- * platform/Pasteboard.h:
- * platform/chromium/ChromiumBridge.h:
- * platform/chromium/ClipboardChromium.cpp:
- (WebCore::ClipboardChromium::getData):
- * platform/chromium/PasteboardChromium.cpp:
- (WebCore::Pasteboard::Pasteboard):
- (WebCore::Pasteboard::isSelectionMode):
- (WebCore::Pasteboard::setSelectionMode):
- (WebCore::Pasteboard::canSmartReplace):
- (WebCore::Pasteboard::plainText):
- (WebCore::Pasteboard::documentFragment):
- * platform/chromium/PasteboardPrivate.h:
- (WebCore::PasteboardPrivate::):
-
-2009-09-08 Kelly Norton <knorton@google.com>
-
- Reviewed by Eric Seidel.
-
- WebInspector: Adds a timeline agent to InspectorController that collects
- high-level timing data about event dispatch, layout, painting and HTML
- parsing and makes it available to Inspector.
- https://bugs.webkit.org/show_bug.cgi?id=25503
-
- * WebCore.gypi:
- * WebCore.xcodeproj/project.pbxproj:
- * dom/Document.cpp:
- (WebCore::Document::recalcStyle):
- * dom/Document.h:
- (WebCore::Document::inspectorTimelineAgent):
- * dom/Node.cpp:
- (WebCore::Node::dispatchGenericEvent):
- * html/HTMLTokenizer.cpp:
- (WebCore::HTMLTokenizer::write):
- * inspector/DOMDispatchTimelineItem.cpp: Added.
- (WebCore::DOMDispatchTimelineItem::DOMDispatchTimelineItem):
- (WebCore::DOMDispatchTimelineItem::convertToScriptObject):
- * inspector/DOMDispatchTimelineItem.h: Added.
- (WebCore::DOMDispatchTimelineItem::~DOMDispatchTimelineItem):
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::enableTimeline):
- (WebCore::InspectorBackend::disableTimeline):
- (WebCore::InspectorBackend::timelineEnabled):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::setFrontendProxyObject):
- (WebCore::InspectorController::close):
- (WebCore::InspectorController::resetScriptObjects):
- (WebCore::InspectorController::enableTimeline):
- (WebCore::InspectorController::disableTimeline):
- (WebCore::InspectorController::timelineEnabled):
- * inspector/InspectorController.h:
- (WebCore::InspectorController::timelineAgent):
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::timelineWasEnabled):
- (WebCore::InspectorFrontend::timelineWasDisabled):
- (WebCore::InspectorFrontend::addItemToTimeline):
- * inspector/InspectorFrontend.h:
- * inspector/InspectorTimelineAgent.cpp: Added.
- (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
- (WebCore::InspectorTimelineAgent::~InspectorTimelineAgent):
- (WebCore::InspectorTimelineAgent::willDispatchDOMEvent):
- (WebCore::InspectorTimelineAgent::didDispatchDOMEvent):
- (WebCore::InspectorTimelineAgent::willLayout):
- (WebCore::InspectorTimelineAgent::didLayout):
- (WebCore::InspectorTimelineAgent::willRecalculateStyle):
- (WebCore::InspectorTimelineAgent::didRecalculateStyle):
- (WebCore::InspectorTimelineAgent::willPaint):
- (WebCore::InspectorTimelineAgent::didPaint):
- (WebCore::InspectorTimelineAgent::willWriteHTML):
- (WebCore::InspectorTimelineAgent::didWriteHTML):
- (WebCore::InspectorTimelineAgent::reset):
- (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
- (WebCore::InspectorTimelineAgent::currentTimeInMilliseconds):
- (WebCore::InspectorTimelineAgent::sessionTimeInMilliseconds):
- * inspector/InspectorTimelineAgent.h: Added.
- * inspector/TimelineItem.cpp: Added.
- (WebCore::TimelineItem::TimelineItem):
- (WebCore::TimelineItem::addToTimeline):
- (WebCore::TimelineItem::convertToScriptObject):
- (WebCore::TimelineItem::convertChildrenToScriptArray):
- (WebCore::TimelineItem::addChildItem):
- * inspector/TimelineItem.h: Added.
- (WebCore::):
- (WebCore::TimelineItem::~TimelineItem):
- (WebCore::TimelineItem::previous):
- (WebCore::TimelineItem::releasePrevious):
- (WebCore::TimelineItem::setEndTime):
- (WebCore::TimelineItem::type):
- * inspector/front-end/TimelineAgent.js: Added.
- (WebInspector.TimelineAgent):
- (WebInspector.addItemToTimeline):
- (WebInspector.timelineWasEnabled):
- (WebInspector.timelineWasDisabled):
- * inspector/front-end/inspector.html:
- * page/FrameView.cpp:
- (WebCore::FrameView::layout):
- (WebCore::FrameView::paintContents):
- * page/FrameView.h:
- (WebCore::FrameView::inspectorTimelineAgent):
- * page/Page.cpp:
- (WebCore::Page::inspectorTimelineAgent):
- * page/Page.h:
-
-2009-09-08 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Fix unused variable warnings
- https://bugs.webkit.org/show_bug.cgi?id=29018
-
- No functional change, no tests.
-
- * history/qt/HistoryItemQt.cpp:
- (WebCore::HistoryItem::restoreState):
- * platform/graphics/qt/ImageBufferQt.cpp:
- (WebCore::putImageData):
- * platform/qt/RenderThemeQt.cpp:
- (WebCore::RenderThemeQt::paintMenuList):
-
-2009-09-08 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Ariya Hidayat.
-
- [Qt] Use the declaration order in initializer lists
- https://bugs.webkit.org/show_bug.cgi?id=29017
-
- No functional change, no new tests.
-
- * platform/graphics/qt/FontCacheQt.cpp:
- (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
-
-2009-09-08 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Implement ValidityState::typeMismatch() for <input type=number>.
- https://bugs.webkit.org/show_bug.cgi?id=28934
-
- Test: fast/forms/ValidityState-typeMismatch-number.html
-
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::formStringToDouble):
- * html/HTMLInputElement.h:
- * html/ValidityState.cpp:
- (WebCore::ValidityState::typeMismatch):
- * html/ValidityState.h:
-
-2009-09-08 Andras Becsi <becsi.andras@stud.u-szeged.hu>
-
- Reviewed by Gustavo Noronha.
-
- [Gtk] Another attempt of a buildfix.
-
- * GNUmakefile.am: Modified. Remove some extra IDL files added in r48153.
-
-2009-09-08 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Make cursor set cleaner in QtWebKit Api: eliminate SetCursorEvent hack.
- https://bugs.webkit.org/show_bug.cgi?id=28865
-
- Save the QCursor as a property in WidgetQt::setCursor
- and actually change the cursor in QWebView::event() by making use
- of the QEvent::DynamicPropertyChange event type.
- When unsetCursor() is called on the QWidget we can fallback to
- the cursor set by WebCore.
-
- Patch by Kenneth Rohde Christiansen <kenneth@webkit.org> and
- Antonio Gomes <antonio.gomes@openbossa.org> on 2009-09-07
-
- * platform/qt/WidgetQt.cpp:
- (WebCore::Widget::setCursor):
-
-2009-09-08 Andras Becsi <becsi.andras@stud.u-szeged.hu>
-
- Reviewed by Gustavo Noronha.
-
- [Gtk] Buildfix for build error introduced in r48150.
-
- * GNUmakefile.am: Modified. Added missing IDL files.
-
-2009-09-08 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] Buildfix. Build error caused by r48150.
-
- * WebCore.pro: missing IDL files added
-
-2009-09-07 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Update Canvas 3D implementation to match spec
- https://bugs.webkit.org/show_bug.cgi?id=29010
-
- This adds several new CanvasXXXArray classes each of which has a custom constructor
- and custom getters and setters. Also changed CanvasRenderingContext3D and GraphicsContext3D
- to match the new and changed API.
-
- * DerivedSources.make:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSCanvasArrayBufferConstructor.cpp: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasArrayBufferConstructor.h: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasArrayCustom.cpp: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasByteArrayConstructor.cpp: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasByteArrayConstructor.h: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasByteArrayCustom.cpp: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasFloatArrayConstructor.cpp: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasFloatArrayConstructor.h: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasFloatArrayCustom.cpp: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasIntArrayConstructor.cpp: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasIntArrayConstructor.h: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasIntArrayCustom.cpp: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasRenderingContext3DCustom.cpp:
- (WebCore::JSCanvasRenderingContext3D::bufferData):
- (WebCore::JSCanvasRenderingContext3D::bufferSubData):
- (WebCore::JSCanvasRenderingContext3D::texImage2D):
- (WebCore::JSCanvasRenderingContext3D::texSubImage2D):
- * bindings/js/JSCanvasShortArrayConstructor.cpp: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasShortArrayConstructor.h: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasShortArrayCustom.cpp: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasUnsignedByteArrayConstructor.cpp: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasUnsignedByteArrayConstructor.h: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasUnsignedByteArrayCustom.cpp: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasUnsignedIntArrayConstructor.cpp: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasUnsignedIntArrayConstructor.h: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasUnsignedIntArrayCustom.cpp: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasUnsignedShortArrayConstructor.cpp: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasUnsignedShortArrayConstructor.h: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSCanvasUnsignedShortArrayCustom.cpp: Added with properties svn:eol-style and svn:mime-type.
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::canvasArrayBuffer):
- (WebCore::JSDOMWindow::canvasByteArray):
- (WebCore::JSDOMWindow::canvasUnsignedByteArray):
- (WebCore::JSDOMWindow::canvasIntArray):
- (WebCore::JSDOMWindow::canvasUnsignedIntArray):
- (WebCore::JSDOMWindow::canvasShortArray):
- (WebCore::JSDOMWindow::canvasUnsignedShortArray):
- (WebCore::JSDOMWindow::canvasFloatArray):
- * html/HTMLCanvasElement.cpp:
- (WebCore::HTMLCanvasElement::getContext):
- (WebCore::HTMLCanvasElement::paint):
- * html/canvas/CanvasArray.cpp: Added with properties svn:eol-style and svn:mime-type.
- * html/canvas/CanvasArray.h: Added with properties svn:eol-style and svn:mime-type.
- * html/canvas/CanvasArray.idl: Added.
- * html/canvas/CanvasArrayBuffer.cpp: Added with properties svn:eol-style and svn:mime-type.
- * html/canvas/CanvasArrayBuffer.h: Added with properties svn:eol-style and svn:mime-type.
- * html/canvas/CanvasArrayBuffer.idl: Added.
- * html/canvas/CanvasByteArray.cpp:
- * html/canvas/CanvasByteArray.h:
- * html/canvas/CanvasByteArray.idl:
- * html/canvas/CanvasFloatArray.cpp: Added with properties svn:eol-style and svn:mime-type.
- * html/canvas/CanvasFloatArray.h: Added with properties svn:eol-style and svn:mime-type.
- * html/canvas/CanvasFloatArray.idl: Added.
- * html/canvas/CanvasIntArray.cpp: Added with properties svn:eol-style and svn:mime-type.
- * html/canvas/CanvasIntArray.h: Added with properties svn:eol-style and svn:mime-type.
- * html/canvas/CanvasIntArray.idl: Added.
- * html/canvas/CanvasRenderingContext3D.cpp:
- (WebCore::CanvasRenderingContext3D::CanvasRenderingContext3D):
- (WebCore::CanvasRenderingContext3D::markContextChanged):
- (WebCore::CanvasRenderingContext3D::beginPaint):
- (WebCore::CanvasRenderingContext3D::endPaint):
- (WebCore::CanvasRenderingContext3D::reshape):
- (WebCore::CanvasRenderingContext3D::sizeInBytes):
- (WebCore::CanvasRenderingContext3D::bindTexture):
- (WebCore::CanvasRenderingContext3D::bufferData):
- (WebCore::CanvasRenderingContext3D::bufferSubData):
- (WebCore::CanvasRenderingContext3D::checkFramebufferStatus):
- (WebCore::CanvasRenderingContext3D::clear):
- (WebCore::CanvasRenderingContext3D::createBuffer):
- (WebCore::CanvasRenderingContext3D::createFramebuffer):
- (WebCore::CanvasRenderingContext3D::createTexture):
- (WebCore::CanvasRenderingContext3D::createProgram):
- (WebCore::CanvasRenderingContext3D::createRenderbuffer):
- (WebCore::CanvasRenderingContext3D::createShader):
- (WebCore::CanvasRenderingContext3D::deleteBuffer):
- (WebCore::CanvasRenderingContext3D::deleteFramebuffer):
- (WebCore::CanvasRenderingContext3D::deleteProgram):
- (WebCore::CanvasRenderingContext3D::deleteRenderbuffer):
- (WebCore::CanvasRenderingContext3D::deleteShader):
- (WebCore::CanvasRenderingContext3D::deleteTexture):
- (WebCore::CanvasRenderingContext3D::drawArrays):
- (WebCore::CanvasRenderingContext3D::drawElements):
- (WebCore::CanvasRenderingContext3D::getBoolean):
- (WebCore::CanvasRenderingContext3D::getBooleanv):
- (WebCore::CanvasRenderingContext3D::getBufferParameteri):
- (WebCore::CanvasRenderingContext3D::getBufferParameteriv):
- (WebCore::CanvasRenderingContext3D::getFloat):
- (WebCore::CanvasRenderingContext3D::getFloatv):
- (WebCore::CanvasRenderingContext3D::getFramebufferAttachmentParameteri):
- (WebCore::CanvasRenderingContext3D::getFramebufferAttachmentParameteriv):
- (WebCore::CanvasRenderingContext3D::getInteger):
- (WebCore::CanvasRenderingContext3D::getIntegerv):
- (WebCore::CanvasRenderingContext3D::getProgrami):
- (WebCore::CanvasRenderingContext3D::getProgramiv):
- (WebCore::CanvasRenderingContext3D::getProgramInfoLog):
- (WebCore::CanvasRenderingContext3D::getRenderbufferParameteri):
- (WebCore::CanvasRenderingContext3D::getRenderbufferParameteriv):
- (WebCore::CanvasRenderingContext3D::getShaderi):
- (WebCore::CanvasRenderingContext3D::getShaderiv):
- (WebCore::CanvasRenderingContext3D::getShaderInfoLog):
- (WebCore::CanvasRenderingContext3D::getShaderSource):
- (WebCore::CanvasRenderingContext3D::getTexParameterf):
- (WebCore::CanvasRenderingContext3D::getTexParameterfv):
- (WebCore::CanvasRenderingContext3D::getTexParameteri):
- (WebCore::CanvasRenderingContext3D::getTexParameteriv):
- (WebCore::CanvasRenderingContext3D::getUniformf):
- (WebCore::CanvasRenderingContext3D::getUniformfv):
- (WebCore::CanvasRenderingContext3D::getUniformi):
- (WebCore::CanvasRenderingContext3D::getUniformiv):
- (WebCore::CanvasRenderingContext3D::getUniformLocation):
- (WebCore::CanvasRenderingContext3D::getVertexAttribf):
- (WebCore::CanvasRenderingContext3D::getVertexAttribfv):
- (WebCore::CanvasRenderingContext3D::getVertexAttribi):
- (WebCore::CanvasRenderingContext3D::getVertexAttribiv):
- (WebCore::CanvasRenderingContext3D::getVertexAttribOffset):
- (WebCore::CanvasRenderingContext3D::texImage2D):
- (WebCore::CanvasRenderingContext3D::texParameterf):
- (WebCore::CanvasRenderingContext3D::texParameteri):
- (WebCore::CanvasRenderingContext3D::texSubImage2D):
- (WebCore::CanvasRenderingContext3D::uniform1f):
- (WebCore::CanvasRenderingContext3D::uniform1fv):
- (WebCore::CanvasRenderingContext3D::uniform1i):
- (WebCore::CanvasRenderingContext3D::uniform1iv):
- (WebCore::CanvasRenderingContext3D::uniform2f):
- (WebCore::CanvasRenderingContext3D::uniform2fv):
- (WebCore::CanvasRenderingContext3D::uniform2i):
- (WebCore::CanvasRenderingContext3D::uniform2iv):
- (WebCore::CanvasRenderingContext3D::uniform3f):
- (WebCore::CanvasRenderingContext3D::uniform3fv):
- (WebCore::CanvasRenderingContext3D::uniform3i):
- (WebCore::CanvasRenderingContext3D::uniform3iv):
- (WebCore::CanvasRenderingContext3D::uniform4f):
- (WebCore::CanvasRenderingContext3D::uniform4fv):
- (WebCore::CanvasRenderingContext3D::uniform4i):
- (WebCore::CanvasRenderingContext3D::uniform4iv):
- (WebCore::CanvasRenderingContext3D::uniformMatrix2fv):
- (WebCore::CanvasRenderingContext3D::uniformMatrix3fv):
- (WebCore::CanvasRenderingContext3D::uniformMatrix4fv):
- (WebCore::CanvasRenderingContext3D::useProgram):
- (WebCore::CanvasRenderingContext3D::validateProgram):
- (WebCore::CanvasRenderingContext3D::vertexAttrib1f):
- (WebCore::CanvasRenderingContext3D::vertexAttrib1fv):
- (WebCore::CanvasRenderingContext3D::vertexAttrib2f):
- (WebCore::CanvasRenderingContext3D::vertexAttrib2fv):
- (WebCore::CanvasRenderingContext3D::vertexAttrib3f):
- (WebCore::CanvasRenderingContext3D::vertexAttrib3fv):
- (WebCore::CanvasRenderingContext3D::vertexAttrib4f):
- (WebCore::CanvasRenderingContext3D::vertexAttrib4fv):
- (WebCore::CanvasRenderingContext3D::vertexAttribPointer):
- (WebCore::CanvasRenderingContext3D::viewport):
- * html/canvas/CanvasRenderingContext3D.h:
- * html/canvas/CanvasRenderingContext3D.idl:
- * html/canvas/CanvasShortArray.cpp: Added with properties svn:eol-style and svn:mime-type.
- * html/canvas/CanvasShortArray.h: Added with properties svn:eol-style and svn:mime-type.
- * html/canvas/CanvasShortArray.idl: Added.
- * html/canvas/CanvasTexture.cpp:
- (WebCore::CanvasTexture::CanvasTexture):
- * html/canvas/CanvasTexture.h:
- (WebCore::CanvasTexture::isCubeMapRWrapModeInitialized):
- (WebCore::CanvasTexture::setCubeMapRWrapModeInitialized):
- * html/canvas/CanvasUnsignedByteArray.cpp: Added with properties svn:eol-style and svn:mime-type.
- * html/canvas/CanvasUnsignedByteArray.h: Added with properties svn:eol-style and svn:mime-type.
- * html/canvas/CanvasUnsignedByteArray.idl: Added.
- * html/canvas/CanvasUnsignedIntArray.cpp: Added with properties svn:eol-style and svn:mime-type.
- * html/canvas/CanvasUnsignedIntArray.h: Added with properties svn:eol-style and svn:mime-type.
- * html/canvas/CanvasUnsignedIntArray.idl: Added.
- * html/canvas/CanvasUnsignedShortArray.cpp: Added with properties svn:eol-style and svn:mime-type.
- * html/canvas/CanvasUnsignedShortArray.h: Added with properties svn:eol-style and svn:mime-type.
- * html/canvas/CanvasUnsignedShortArray.idl: Added.
- * page/DOMWindow.idl:
- * platform/graphics/GraphicsContext3D.h:
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::beginPaint):
- (WebCore::GraphicsContext3D::endPaint):
- (WebCore::GraphicsContext3D::bindTexture):
- (WebCore::GraphicsContext3D::bufferData):
- (WebCore::GraphicsContext3D::bufferSubData):
- (WebCore::GraphicsContext3D::checkFramebufferStatus):
- (WebCore::GraphicsContext3D::drawArrays):
- (WebCore::GraphicsContext3D::drawElements):
- (WebCore::GraphicsContext3D::texParameterf):
- (WebCore::GraphicsContext3D::texParameteri):
- (WebCore::GraphicsContext3D::uniform1f):
- (WebCore::GraphicsContext3D::uniform1fv):
- (WebCore::GraphicsContext3D::uniform2f):
- (WebCore::GraphicsContext3D::uniform2fv):
- (WebCore::GraphicsContext3D::uniform3f):
- (WebCore::GraphicsContext3D::uniform3fv):
- (WebCore::GraphicsContext3D::uniform4f):
- (WebCore::GraphicsContext3D::uniform4fv):
- (WebCore::GraphicsContext3D::uniform1i):
- (WebCore::GraphicsContext3D::uniform1iv):
- (WebCore::GraphicsContext3D::uniform2i):
- (WebCore::GraphicsContext3D::uniform2iv):
- (WebCore::GraphicsContext3D::uniform3i):
- (WebCore::GraphicsContext3D::uniform3iv):
- (WebCore::GraphicsContext3D::uniform4i):
- (WebCore::GraphicsContext3D::uniform4iv):
- (WebCore::GraphicsContext3D::uniformMatrix2fv):
- (WebCore::GraphicsContext3D::uniformMatrix3fv):
- (WebCore::GraphicsContext3D::uniformMatrix4fv):
- (WebCore::GraphicsContext3D::vertexAttrib1f):
- (WebCore::GraphicsContext3D::vertexAttrib1fv):
- (WebCore::GraphicsContext3D::vertexAttrib2f):
- (WebCore::GraphicsContext3D::vertexAttrib2fv):
- (WebCore::GraphicsContext3D::vertexAttrib3f):
- (WebCore::GraphicsContext3D::vertexAttrib3fv):
- (WebCore::GraphicsContext3D::vertexAttrib4f):
- (WebCore::GraphicsContext3D::vertexAttrib4fv):
- (WebCore::GraphicsContext3D::vertexAttribPointer):
- (WebCore::GraphicsContext3D::getBoolean):
- (WebCore::GraphicsContext3D::getBooleanv):
- (WebCore::GraphicsContext3D::getFloat):
- (WebCore::GraphicsContext3D::getFloatv):
- (WebCore::GraphicsContext3D::getInteger):
- (WebCore::GraphicsContext3D::getIntegerv):
- (WebCore::GraphicsContext3D::getBufferParameteri):
- (WebCore::GraphicsContext3D::getBufferParameteriv):
- (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteri):
- (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
- (WebCore::GraphicsContext3D::getProgrami):
- (WebCore::GraphicsContext3D::getProgramiv):
- (WebCore::GraphicsContext3D::getRenderbufferParameteri):
- (WebCore::GraphicsContext3D::getRenderbufferParameteriv):
- (WebCore::GraphicsContext3D::getShaderi):
- (WebCore::GraphicsContext3D::getShaderiv):
- (WebCore::GraphicsContext3D::getTexParameterf):
- (WebCore::GraphicsContext3D::getTexParameterfv):
- (WebCore::GraphicsContext3D::getTexParameteri):
- (WebCore::GraphicsContext3D::getTexParameteriv):
- (WebCore::GraphicsContext3D::getUniformf):
- (WebCore::GraphicsContext3D::getUniformfv):
- (WebCore::GraphicsContext3D::getUniformi):
- (WebCore::GraphicsContext3D::getUniformiv):
- (WebCore::GraphicsContext3D::getVertexAttribf):
- (WebCore::GraphicsContext3D::getVertexAttribfv):
- (WebCore::GraphicsContext3D::getVertexAttribi):
- (WebCore::GraphicsContext3D::getVertexAttribiv):
- (WebCore::GraphicsContext3D::getVertexAttribOffset):
- (WebCore::GraphicsContext3D::texImage2D):
- (WebCore::GraphicsContext3D::texSubImage2D):
- (WebCore::GraphicsContext3D::sizeInBytes):
-
-2009-09-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
-
- Reviewed by Timothy Hatcher.
-
- Make m_windowVisible more consistent with the actual visibility of the inspector.
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::setWindowVisible):
-
-2009-09-07 Adam Barth <abarth@webkit.org>
-
- Unreviewed speculative build fix for Snow Leopard.
-
- * platform/GeolocationService.cpp:
- (WebCore::createGeolocationServiceNull):
-
-2009-09-07 Steve Block <steveblock@google.com>
-
- Reviewed by Adam Barth.
-
- Adds a mock Geolocation service. This will be used to provide predictable behavior of the
- Geolocation API for use in LayoutTests. Later changes will integrate the the mock
- Geolocation service with DumpRenderTree.
- https://bugs.webkit.org/show_bug.cgi?id=28264
-
- The mock Geolocation service returns a fixed position or error. This position or error can be
- set through static methods on the GeolocationService class. The position or error is shared
- between all instances of the mock Geolocation service.
-
- Implementation details.
- The GeolocationService object maintains a pointer to a factory function which it uses to create
- Geolocation service instances. Each platform implementing Geolocation sets this pointer
- to the factory function for their platform's implementation. When the mock Geolocation service
- is activated, the factory function pointer is reset to the factory function for the mock service.
-
- Test: fast/dom/Geolocation/error.html
-
- * WebCore.base.exp: Modified. Exports GeolocationServiceMock methods.
- * GNUMakefile.am: Modified. Added GeolocationServiceMock files.
- * WebCore.gypi: Modified. Added GeolocationServiceMock files.
- * WebCore.pro: Modified. Added GeolocationServiceMock files.
- * WebCore.vcproj/WebCore.vcproj: Modified. Added GeolocationServiceMock files.
- * WebCore.vcproj/WebCoreCommon.vsprops: Modified. Added mock directory to includes.
- * WebCore.xcodeproj/project.pbxproj: Modified. Added GeolocationServiceMock files and exports some headers.
- * WebCoreSources.bkl: Modified. Added GeolocationServiceMock files.
- * page/ChromeClient.h: Modified. Fixed comment.
- * page/Geolocation.cpp: Modified.
- (WebCore::Geolocation::setIsAllowed): Modified. Fixed error string.
- * platform/GeolocationService.cpp: Modified.
- (WebCore::createGeolocationServiceNull): Added. Returns null in place of a Geolocation service. Used to avoid link errors on platforms where Geolocation is not implemented.
- (WebCore::GeolocationService::create): Added. Uses the factory function pointer to create a Geolocation service implementation.
- (WebCore::GeolocationService::useMock): Added. Configures the GeolocationServie to use the mock implementation.
- * platform/GeolocationService.h: Modified.
- * platform/mock: Added.
- * platform/mock/GeolocationServiceMock.cpp: Added.
- (WebCore::GeolocationServiceMock::create): Added. Creates a GeolocationServiceMock object.
- (WebCore::GeolocationServiceMock::GeolocationServiceMock): Added. Constructor.
- (WebCore::GeolocationServiceMock::~GeolocationServiceMock): Added. Destructor.
- (WebCore::GeolocationServiceMock::setPosition): Added. Sets the position that will be returned by the object.
- (WebCore::GeolocationServiceMock::setError): Added. Sets the error that will be returned by the object.
- (WebCore::GeolocationServiceMock::startUpdating): Added. GeolocationService implementation. Starts the service.
- (WebCore::GeolocationServiceMock::stopUpdating): Added. GeolocationService implementation. Stops the service.
- (WebCore::GeolocationServiceMock::timerFired): Added. Used to provide an asynchronous callback when the service is started.
- (WebCore::GeolocationServiceMock::makeGeolocationCallbackFromAllInstances): Added. Used to call back when the position or error is updated.
- (WebCore::GeolocationServiceMock::makeGeolocationCallback): Added. Used to call back when the service starts.
- (WebCore::GeolocationServiceMock::initStatics): Added. Initializes statics members with constructors.
- (WebCore::GeolocationServiceMock::cleanUpStatics): Added. Cleans up static members with constructors.
- * platform/mock/GeolocationServiceMock.h: Added.
- (WebCore::GeolocationServiceMock::lastPosition): Added. Returns the fixed position.
- (WebCore::GeolocationServiceMock::lastError): Added. Returns the fixed error.
- * platform/gtk/GeolocationServiceGtk.cpp: Modified.
- (WebCore::GeolocationServiceGtk::create): Added. Creates an instance of GeolocationServiceGtk.
- * platform/gtk/GeolocationServiceGtk.h: Modified.
- * platform/mac/GeolocationServiceMac.h: Modified.
- * platform/mac/GeolocationServiceMac.mm: Modified.
- (WebCore::GeolocationServiceMac::create): Added. Creates an instance of GeolocationServiceMac.
-
-2009-09-07 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- https://bugs.webkit.org/show_bug.cgi?id=28985
-
- We need to be slightly more careful about how we pick up a script
- execution context. In particular, we were getting the wrong document
- for frames that had been navigated somewhere else.
-
- In the long term, we should think about a better algorithm for
- computing the script context.
-
- Fixes LayoutTests/http/tests/xmlhttprequest/detaching-frame-2.html
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::retrieveFrame):
-
-2009-09-07 Kevin Ollivier <kevino@theolliviers.com>
-
- wx build fix for 2.8 compilation.
-
- * platform/wx/wxcode/mac/carbon/scrollbar_render.cpp:
- (wxRenderer_DrawScrollbar):
-
-2009-09-07 Drew Wilson <atwilson@google.com>
-
- Unreviewed build fix.
-
- Reverting r48121 to fix Windows build errors.
-
- * DerivedSources.cpp:
- * GNUmakefile.am:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSDOMWindowCustom.cpp:
- * bindings/js/JSEventTarget.cpp:
- (WebCore::toJS):
- (WebCore::toEventTarget):
- * dom/EventTarget.cpp:
- * dom/EventTarget.h:
- * page/DOMWindow.idl:
- * websockets/WebSocket.cpp:
- (WebCore::WebSocket::connect):
- (WebCore::WebSocket::send):
- (WebCore::WebSocket::close):
- (WebCore::WebSocket::bufferedAmount):
- (WebCore::WebSocket::addEventListener):
- (WebCore::WebSocket::removeEventListener):
- (WebCore::WebSocket::dispatchEvent):
- (WebCore::WebSocket::didConnect):
- (WebCore::WebSocket::didReceiveMessage):
- (WebCore::WebSocket::didClose):
- (WebCore::WebSocket::dispatchOpenEvent):
- (WebCore::WebSocket::dispatchMessageEvent):
- (WebCore::WebSocket::dispatchCloseEvent):
- * websockets/WebSocket.h:
- (WebCore::WebSocket::create):
- (WebCore::WebSocket::):
- (WebCore::WebSocket::setOnopen):
- (WebCore::WebSocket::onopen):
- (WebCore::WebSocket::setOnmessage):
- (WebCore::WebSocket::onmessage):
- (WebCore::WebSocket::setOnclose):
- (WebCore::WebSocket::onclose):
- (WebCore::WebSocket::toWebSocket):
- (WebCore::WebSocket::refEventTarget):
- (WebCore::WebSocket::derefEventTarget):
- * websockets/WebSocketChannel.cpp: Removed.
- * websockets/WebSocketChannel.h: Removed.
- * websockets/WebSocketChannelClient.h: Removed.
- * websockets/WebSocketHandshake.cpp: Removed.
- * websockets/WebSocketHandshake.h: Removed.
-
-2009-09-07 Drew Wilson <atwilson@google.com>
-
- Unreviewed speculative build fix.
-
- Reverted previous build fix as it didn't fix the problem.
-
- * bindings/js/JSEventTarget.cpp:
- (WebCore::toEventTarget):
-
-2009-09-07 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Unreviewed, build fix.
-
- [Qt] Fix build after SHARED_WORKERS are enabled by default (r48131)
-
- * WebCore.pro:
-
-2009-09-07 Drew Wilson <atwilson@google.com>
-
- Unreviewed build fix.
-
- Temporarily removed depenency between JSEventTarget.cpp and WebSocket.h in an attempt to fix a windows build break.
-
- * bindings/js/JSEventTarget.cpp:
- (WebCore::toEventTarget):
-
-2009-09-07 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- Enable SHARED_WORKERS by default.
- https://bugs.webkit.org/show_bug.cgi?id=28959
-
- Tests (enabled in a separate patch):
- fast/workers/shared-worker-constructor.html
- fast/workers/shared-worker-context-gc.html
- fast/workers/shared-worker-event-listener.html
- fast/workers/shared-worker-exception.html
- fast/workers/shared-worker-frame-lifecycle.html
- fast/workers/shared-worker-gc.html
- fast/workers/shared-worker-lifecycle.html
- fast/workers/shared-worker-load-error.html
- fast/workers/shared-worker-location.html
- fast/workers/shared-worker-navigator.html
- fast/workers/shared-worker-replace-global-constructor.html
- fast/workers/shared-worker-replace-self.html
- fast/workers/shared-worker-shared.html
- fast/workers/shared-worker-simple.html
- http/tests/workers/shared-worker-importScripts.html
- http/tests/workers/shared-worker-redirect.html
- http/tests/xmlhttprequest/workers/shared-worker-close.html
- http/tests/xmlhttprequest/workers/shared-worker-methods-async.html
- http/tests/xmlhttprequest/workers/shared-worker-methods.html
- http/tests/xmlhttprequest/workers/shared-worker-xhr-file-not-found.html
-
- * config.h: Removed some whitespace/touched the file to force a full rebuild on the build-bots.
- * Configurations/FeatureDefines.xcconfig:
* WebCore.pro:
- * WebCore.vcproj/WebCoreCommon.vsprops:
- * WebCore.vcproj/build-generated-files.sh:
- * dom/DOMWindow.idl: Removed unnecessary whitespace to force a rebuild on the build-bots to pickup the flag change.
- * workers/DefaultSharedWorkerRepository.cpp:
- (WebCore::SharedWorkerScriptLoader::load):
- Clean up bitrot in SharedWorker code - DenyCrossOriginRedirect is now DenyCrossOriginRequests.
- * workers/SharedWorkerContext.cpp:
- (WebCore::SharedWorkerContext::dispatchConnect):
- Clean up bitrot - updated SharedWorker code to reflect new MessageEvent API.
-
-2009-09-07 Xan Lopez <xlopez@igalia.com>
-
- Unreviewed build fix.
-
- Add new file to sources list.
-
- * GNUmakefile.am:
-
-2009-09-07 Kevin Ollivier <kevino@theolliviers.com>
-
- wx build fixes for wx SVN trunk.
-
- * config.h:
- * platform/wx/RenderThemeWx.cpp:
- (WebCore::RenderThemeWx::paintButton):
- * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp:
- (WebCore::drawTextWithSpacing):
- * platform/wx/wxcode/mac/carbon/scrollbar_render.cpp:
- (wxRenderer_DrawScrollbar):
-
-2009-09-07 Chris Hills <chaz@chaz6.com>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] Use direct includes for Phonon, not the pretty ones
-
- * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
-
-2009-09-07 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- WebSocket API implementation.
- https://bugs.webkit.org/show_bug.cgi?id=28038
-
- Add build systems only for GNUmakefile.am and WebCore.xcodeproj now.
- Other build systems will be updated once the code is functional.
- Tests will be landed once the code is completed and functional.
-
- * DerivedSources.cpp:
- * GNUmakefile.am:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::webSocket):
- * bindings/js/JSEventTarget.cpp:
- (WebCore::toJS):
- (WebCore::toEventTarget):
- * dom/EventTarget.cpp:
- (WebCore::EventTarget::toWebSocket):
- * dom/EventTarget.h:
- * page/DOMWindow.idl:
- * websockets/WebSocket.cpp:
- (WebCore::ProcessWebSocketEventTask::create):
- (WebCore::ProcessWebSocketEventTask::performTask):
- (WebCore::ProcessWebSocketEventTask::ProcessWebSocketEventTask):
- (WebCore::isValidProtocolString):
- (WebCore::WebSocket::connect):
- (WebCore::WebSocket::send):
- (WebCore::WebSocket::close):
- (WebCore::WebSocket::bufferedAmount):
- (WebCore::WebSocket::addEventListener):
- (WebCore::WebSocket::removeEventListener):
- (WebCore::WebSocket::dispatchEvent):
- (WebCore::WebSocket::didConnect):
- (WebCore::WebSocket::didReceiveMessage):
- (WebCore::WebSocket::didClose):
- (WebCore::WebSocket::dispatchOpenEvent):
- (WebCore::WebSocket::dispatchMessageEvent):
- (WebCore::WebSocket::dispatchCloseEvent):
- * websockets/WebSocket.h:
- (WebCore::WebSocket::create):
- (WebCore::WebSocket::):
- (WebCore::WebSocket::setOnopen):
- (WebCore::WebSocket::onopen):
- (WebCore::WebSocket::setOnmessage):
- (WebCore::WebSocket::onmessage):
- (WebCore::WebSocket::setOnclose):
- (WebCore::WebSocket::onclose):
- (WebCore::WebSocket::toWebSocket):
- (WebCore::WebSocket::eventListeners):
- (WebCore::WebSocket::refEventTarget):
- (WebCore::WebSocket::derefEventTarget):
- * websockets/WebSocketChannel.cpp: Added.
- * websockets/WebSocketChannel.h: Added.
- * websockets/WebSocketChannelClient.h: Added.
- * websockets/WebSocketHandshake.cpp: Added.
- * websockets/WebSocketHandshake.h: Added.
-
-2009-09-07 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=26854
- [GTK] Needs API to allow more control over outgoing requests
-
- Add infrastructure required to provide the new
- WebKitNetworkResponse object in our API.
-
- * GNUmakefile.am: Add new files to the build.
- * platform/network/soup/ResourceRequestSoup.cpp:
- (WebCore::ResourceRequest::updateFromSoupMessage):
- * platform/network/soup/ResourceResponse.h:
- * platform/network/soup/ResourceResponseSoup.cpp: Added.
- (WebCore::ResourceResponse::toSoupMessage):
-
-2009-09-07 Mads Ager <ager@chromium.org>
-
- Reviewed by Adam Barth.
-
- [V8] Cleanup document/frame null-checking in V8DOMWindowCustom.cpp
- https://bugs.webkit.org/show_bug.cgi?id=29009
-
- Be consistent in document and frame null checks.
-
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::V8Custom::WindowSetTimeoutImpl):
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::V8Custom::ClearTimeoutImpl):
-
-2009-09-07 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- [Soup] Limit the number of connections
- https://bugs.webkit.org/show_bug.cgi?id=18431
-
- Increase the maximum number of per host and total connections to
- similar values than those used by the other modern browsers. Seems
- to significantly improve page loading time in many cases.
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::ensureSessionIsInitialized):
-
-2009-09-07 Michael Nordman <michaeln@google.com>
-
- Reviewed by Darin Fisher.
-
- Various minor chromium appcache modifications.
- https://bugs.webkit.org/show_bug.cgi?id=28960
-
- No new tests.
-
- * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
- Fix a null pointer exception.
- (WebCore::ACCESSOR_GETTER):
- * platform/network/chromium/ResourceRequest.h:
- Switch from appCache 'context' to 'host' terminology.
- Note: leaving the old deprecated accessors in place until the matching
- change in chrome is landed to use the new accessors.
- (WebCore::ResourceRequest::ResourceRequest):
- (WebCore::ResourceRequest::appCacheHostID):
- (WebCore::ResourceRequest::setAppCacheHostID):
- (WebCore::ResourceRequest::appCacheContextID):
- (WebCore::ResourceRequest::setAppCacheContextID):
- * platform/network/chromium/ResourceResponse.h:
- Add an appCacheManifestURL getter/setter.
- Drop the 'get' prefix from the appCacheID getter.
- Note: leaving the old deprecated 'get' prefixed accessor in place until the matching
- change in chrome is landed to use the new accessor.
- (WebCore::ResourceResponse::appCacheID):
- (WebCore::ResourceResponse::appCacheManifestURL):
- (WebCore::ResourceResponse::setAppCacheManifestURL):
- (WebCore::ResourceResponse::getAppCacheID):
-
-2009-09-07 Michael Nordman <michaeln@google.com>
-
- Reviewed by Alexey Proskuryakov.
-
- https://bugs.webkit.org/show_bug.cgi?id=28359
- Cleanup: Undo some accidental changes around DOMApplicationCache.
- - Restore support for constructing a DOMApplicationCache object with a null frame ptr.
- - Return a non-null object for window.applicationCache when the feature is disabled.
- - Simplify the swapCache method.
-
- Test: http/tests/appcache/disabled.html
-
- * loader/appcache/DOMApplicationCache.cpp:
- (WebCore::DOMApplicationCache::DOMApplicationCache):
- (WebCore::DOMApplicationCache::swapCache):
- (WebCore::DOMApplicationCache::scriptExecutionContext):
- * loader/appcache/DOMApplicationCache.h:
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::applicationCache):
-
-2009-09-06 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Darin Adler.
-
- hostname and host are mixed up when manipulating anchor elements.
- https://bugs.webkit.org/show_bug.cgi?id=28954
-
- handle the case of port 0.
-
- * html/HTMLAnchorElement.cpp:
- (WebCore::HTMLAnchorElement::host):
-
-2009-09-06 Erik Arvidsson <arv@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Make hidden elements not focusable.
-
- Clean up supportsFocus and isFocusable.
- supportsFocus now strictly means that the node can be focused by default.
- This is true for links, form controls and content editable elements for example.
- isFocusable means that the user can actually focus it.
- All (2) calls to supportsFocus have been updated to take this into account.
-
- Make a elements without href work correctly as well.
- https://bugs.webkit.org/show_bug.cgi?id=27099
-
- Tests: fast/events/click-focus-anchor.html
- fast/events/tab-focus-anchor.html
- fast/events/tab-focus-hidden.html
-
- * dom/Element.cpp:
- (WebCore::Element::focus):
- * dom/Node.cpp:
- (WebCore::Node::supportsFocus):
- (WebCore::Node::isFocusable):
- * dom/Node.h:
- * html/HTMLAnchorElement.cpp:
- (WebCore::HTMLAnchorElement::supportsFocus):
- (WebCore::HTMLAnchorElement::isMouseFocusable):
- (WebCore::HTMLAnchorElement::isKeyboardFocusable):
- * html/HTMLAnchorElement.h:
- * html/HTMLAreaElement.cpp:
- (WebCore::HTMLAreaElement::supportsFocus):
- * html/HTMLAreaElement.h:
- * html/HTMLElement.cpp:
- (WebCore::HTMLElement::supportsFocus):
- * html/HTMLElement.h:
- * html/HTMLFieldSetElement.cpp:
- (WebCore::HTMLFieldSetElement::supportsFocus):
- * html/HTMLFieldSetElement.h:
- * html/HTMLFormControlElement.cpp:
- (WebCore::HTMLFormControlElement::supportsFocus):
- (WebCore::HTMLFormControlElement::isFocusable):
- * html/HTMLFrameElementBase.cpp:
- (WebCore::HTMLFrameElementBase::supportsFocus):
- * html/HTMLFrameElementBase.h:
- * html/HTMLLegendElement.cpp:
- (WebCore::HTMLLegendElement::supportsFocus):
- * html/HTMLLegendElement.h:
- * html/HTMLOptGroupElement.cpp:
- (WebCore::HTMLOptGroupElement::supportsFocus):
- (WebCore::HTMLOptGroupElement::isFocusable):
- * html/HTMLOptGroupElement.h:
- * html/HTMLOptionElement.cpp:
- (WebCore::HTMLOptionElement::supportsFocus):
- (WebCore::HTMLOptionElement::isFocusable):
- * html/HTMLOptionElement.h:
- * page/EventHandler.cpp:
- (WebCore::EventHandler::dispatchMouseEvent):
- * page/FocusController.cpp:
- (WebCore::FocusController::advanceFocus):
- * svg/SVGAElement.cpp:
- (WebCore::SVGAElement::supportsFocus):
- (WebCore::SVGAElement::isFocusable):
- * wml/WMLAElement.cpp:
- (WebCore::WMLAElement::supportsFocus):
- * wml/WMLAElement.h:
- * wml/WMLFormControlElement.cpp:
- (WebCore::WMLFormControlElement::supportsFocus):
- (WebCore::WMLFormControlElement::isFocusable):
- * wml/WMLFormControlElement.h:
-
-2009-09-06 Joel Stanley <joel@jms.id.au>
-
- Reviewed by Dimitri Glazkov.
-
- Expose functions to set the caret blink interval for Linux Chromium.
- Default value is set to that of RenderTheme::caretBlankInterval().
- Uses caretBlinkIntervalInternal to avoid overriding
- RenderThemeChromiumSkia::caretBlankInterval to preserve the disabling
- of blinking caret required for layout tests.
- https://bugs.webkit.org/show_bug.cgi?id=28931
-
- * rendering/RenderThemeChromiumLinux.cpp:
- (WebCore::RenderThemeChromiumLinux::RenderThemeChromiumLinux):
- (WebCore::RenderThemeChromiumLinux::setCaretBlinkInterval):
- (WebCore::RenderThemeChromiumLinux::caretBlinkIntervalInternal):
- * rendering/RenderThemeChromiumLinux.h:
-
-2009-09-06 Ada Chan <adachan@apple.com>
-
- Remove an extra </File> in WebCore.vcproj.
-
- * WebCore.vcproj/WebCore.vcproj:
-
-2009-09-06 Timothy Hatcher <timothy@apple.com>
-
- Adds a persistent setting for color format in the Web Inspector.
-
- https://bugs.webkit.org/show_bug.cgi?id=28889
-
- Reviewed by Dan Bernstein.
-
- * English.lproj/localizedStrings.js: New strings.
- * inspector/front-end/Color.js: Minor style fixes.
- (WebInspector.Color.prototype.toString): Added. Replaces the individual
- "toFoo" functions. Takes a optional arguments for the color format to return.
- * inspector/front-end/Images/paneSettingsButtons.png: Added.
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylesSidebarPane.prototype._changeColorFormat): Update the sections to show
- the new color format.
- (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processColor.changeColorDisplay):
- Use the new toString function on Color.
- (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processColor): Use the persistent setting
- to format colors by default. Add a tooltip for the color swatch.
- * inspector/front-end/inspector.css: New styles for the settings menu.
- * inspector/front-end/inspector.js:
- (WebInspector.loaded): Initilize the colorFormat preference.
-
-2009-09-06 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Eric Seidel.
-
- [Qt] Remove Qt v4.6 check from the prefetchDNS implementation
- https://bugs.webkit.org/show_bug.cgi?id=28993
-
- * platform/network/qt/DnsPrefetchHelper.cpp:
- * platform/network/qt/DnsPrefetchHelper.h:
-
-2009-09-06 Cameron McCormack <cam@mcc.id.au>
-
- Reviewed by Eric Seidel.
-
- Drop <definition-src> support
- https://bugs.webkit.org/show_bug.cgi?id=28991
-
- http://dev.w3.org/SVG/profiles/1.1F2/publish/changes.html#FontsChapter
-
- * DerivedSources.cpp: Remove references to definition-src.
- * DerivedSources.make: Ditto.
- * GNUmakefile.am: Ditto.
- * WebCore.gypi: Ditto.
- * WebCore.pro: Ditto.
- * WebCore.vcproj/WebCore.vcproj: Ditto.
- * WebCore.xcodeproj/project.pbxproj: Ditto.
- * bindings/objc/DOM.mm:
- (WebCore::createElementClassMap): Ditto.
- * bindings/objc/DOMSVG.h: Ditto.
- * bindings/v8/DerivedSourcesAllInOne.cpp: Ditto.
- * bindings/v8/V8DOMWrapper.cpp: Ditto.
- * bindings/v8/V8Index.cpp: Ditto.
- * bindings/v8/V8Index.h: Ditto.
- * svg/SVGAllInOne.cpp: Ditto.
- * svg/SVGDefinitionSrcElement.cpp: Removed.
- * svg/SVGDefinitionSrcElement.h: Removed.
- * svg/SVGDefinitionSrcElement.idl: Removed.
- * svg/SVGFontFaceElement.cpp:
- (WebCore::SVGFontFaceElement::rebuildFontFace): Don't search for
- definition-src child.
- * svg/svgtags.in: Remove definition-src.
-
-2009-09-05 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- [Chromium] Roll out http://trac.webkit.org/changeset/48094, because the
- logic of retrieving default caret blink interval was incorrect (non-existent)
- and caused layout test flakiness.
-
- * rendering/RenderThemeChromiumLinux.cpp:
- * rendering/RenderThemeChromiumLinux.h:
-
-2009-09-05 Jian Li <jianli@chromium.org>
-
- Reviewed by NOBODY (Chromium reliability build break).
-
- Back up partial change in r48072 in order to fix chromium reliability build break.
-
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::invokeEventHandler):
-
-2009-09-05 Nicolas Weber <thakis@chromium.org>
-
- Reviewed by Darin Fisher.
-
- https://bugs.webkit.org/show_bug.cgi?id=28975
- Fix file upload on chrome/mac. Images that have "Hide Extension" set,
- such as screenshots by default, can now be uploaded to sites such as
- imgur.com.
-
- * platform/FileSystem.h:
- Add pathGetDisplayFileName().
- * platform/chromium/FileChooserChromium.cpp:
- (WebCore::FileChooser::basenameForWidth):
- Call pathGetDisplayFileName() instead of pathGetFileName().
- * platform/chromium/FileSystemChromiumLinux.cpp:
- (WebCore::pathGetDisplayFileName):
- Implement pathGetDisplayFileName() by delegating to pathGetFileName().
- * platform/chromium/FileSystemChromiumMac.mm:
- (WebCore::pathGetFileName):
- Now returns a real filename instead of a presentational one, which
- fixes the problem addressed by this change.
- (WebCore::pathGetDisplayFileName):
- New function that returns a presentational filename; does what
- pathGetDisplayFileName() did prior to this patch.
- * platform/chromium/FileSystemChromiumWin.cpp:
- (WebCore::pathGetDisplayFileName):
- Implement pathGetDisplayFileName() by delegating to pathGetFileName().
-
-2009-09-05 Joel Stanley <joel@jms.id.au>
-
- Reviewed by David Levin.
-
- Expose functions to set the caret blink interval for Linux Chromium.
- https://bugs.webkit.org/show_bug.cgi?id=28931
-
- * rendering/RenderThemeChromiumLinux.cpp:
- (WebCore::RenderThemeChromiumLinux::setCaretBlinkInterval):
- (WebCore::RenderThemeChromiumLinux::caretBlinkInterval):
- * rendering/RenderThemeChromiumLinux.h:
-
-2009-09-04 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by David Levin.
-
- Prevent UI freeze in case when too many timers are in the timer queue.
- https://bugs.webkit.org/show_bug.cgi?id=23865
-
- The fix measures the elapsed time while executing timers. If we have too many
- timers and it takes significant time to fire, quit the loop and reschedule.
- This lets the run loop process user input (close the window for example).
-
- * platform/ThreadTimers.h:
- * platform/ThreadTimers.cpp:
- (WebCore::ThreadTimers::sharedTimerFiredInternal):
- (WebCore::ThreadTimers::fireTimersInNestedEventLoop):
- Removed functions and members used before to grab a list of all expired timers.
- Now we fetch one by one, measuring time and quitting the loop if it takes too long.
- * platform/Timer.cpp:
- (WebCore::TimerBase::isActive):
- (WebCore::TimerBase::setNextFireTime):
- Since timers are now fired one by one, there is no need to keep track of updated timers.
- * manual-tests/input-starved-by-timers.html: Manual test that attempts to freeze browser by
- creating of enough timers. It then keeps UI frozen and after 10 seconds starts to drain the timers
- so the browser un-freezes. This is instead of a regular layout test because we don't have a way
- to inject an input events via regular run loop in DRT - instead they are directly dispatched by
- eventSender, which does not reproduce the UI freeze that happens with real input.
-
-2009-09-04 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Adele Peterson.
-
- <rdar://problem/7201063>
-
- Detach any custom scrollbars before detaching the document.
-
- * page/Frame.cpp:
- (WebCore::Frame::setView):
-
-2009-09-04 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Unreviewed, build fix.
-
- Remove remaining references to UserStyleSheetLoader after r48075.
-
- * WebCore.gypi:
- * WebCore.xcodeproj/project.pbxproj:
- * page/qt/FrameQt.cpp:
- * page/wince/FrameWince.cpp:
-
-2009-09-04 Michelangelo De Simone <micdesim@gmail.com>
-
- Reviewed by David Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=28988
- Minor fix: "novalidate" attribute renamed in "noValidate", according to
- HTML5 specs:
- http://www.whatwg.org/specs/web-apps/current-work/#dom-fs-novalidate
-
- * html/HTMLFormElement.cpp:
- (WebCore::HTMLFormElement::noValidate):
- (WebCore::HTMLFormElement::setNoValidate):
- * html/HTMLFormElement.h:
- * html/HTMLFormElement.idl:
-
-2009-09-04 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by David Levin.
-
- Remove unused line of code from WorkerContext
- https://bugs.webkit.org/show_bug.cgi?id=28990
-
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::importScripts):
-
-2009-09-04 Darin Adler <darin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Fix assertion seen when running buildbot.
-
- * bindings/js/JSDOMBinding.h:
- (WebCore::DOMObjectWithGlobalPointer::createStructure): Create the structure without
- the HasDefaultMark bit since this has a custom mark function.
-
-2009-09-04 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Adam Roben.
-
- https://bugs.webkit.org/show_bug.cgi?id=28984, remove the remote stylesheet loader on Mac/Qt.
- Make sure the other code path (now used by everybody) can handle data URLs.
-
- As per the post on webkit-dev, the ability to work remotely isn't working properly anyway (it doesn't
- hold up the pending sheet count, so you'd just FOUC on every Web page), and it's extremely unlikely
- that anybody is relying on this support.
-
- Tor Arne agreed it was ok to disable (he enabled it on the Qt side), and only Mac/Qt were using this
- code.
-
- * WebCore.pro:
- * WebCore.xcodeproj/project.pbxproj:
- * dom/Document.cpp:
- (WebCore::Document::userStyleSheet):
- * dom/Document.h:
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::begin):
- * loader/UserStyleSheetLoader.cpp: Removed.
- * loader/UserStyleSheetLoader.h: Removed.
- * page/Frame.cpp:
- (WebCore::Frame::reapplyStyles):
- * page/Frame.h:
- * page/Page.cpp:
- (WebCore::Page::userStyleSheetLocationChanged):
- (WebCore::Page::userStyleSheet):
- * page/mac/FrameMac.mm:
- * page/qt/FrameQt.cpp:
-
-2009-09-04 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Add "sampling profiler" preference, simplify data display when it's set.
-
- https://bugs.webkit.org/show_bug.cgi?id=28969
-
- * inspector/front-end/ProfileDataGridTree.js:
- (WebInspector.ProfileDataGridNode.prototype.get data.formatMilliseconds):
- (WebInspector.ProfileDataGridNode.prototype.get data):
- * inspector/front-end/ProfileView.js:
- (WebInspector.ProfileView):
- * inspector/front-end/inspector.js:
-
-2009-09-04 Jian Li <jianli@chromium.org>
-
- Reviewed by Adam Barth.
-
- [V8] Run-time exception in onmessage handler is not forwarded to the worker object.
- https://bugs.webkit.org/show_bug.cgi?id=28980
-
- Tested by worker-close.html.
-
- * bindings/v8/ScriptFunctionCall.cpp:
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::invokeEventHandler):
- * bindings/v8/V8Utilities.cpp:
- (WebCore::getScriptExecutionContext):
- (WebCore::reportException):
- * bindings/v8/V8Utilities.h:
- (WebCore::getScriptExecutionContext):
- * bindings/v8/custom/V8MessageChannelConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8SharedWorkerCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WorkerCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-09-04 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Anders Carlsson.
-
- Remove unused m_sheet variable and setCSSStyleSheet methods.
-
- * dom/Document.cpp:
- * dom/Document.h:
-
-2009-09-04 Anders Carlsson <andersca@apple.com>
-
- Reviewed by David Hyatt and Adele Peterson.
-
- (Based on a patch from Adele).
-
- Fix <rdar://problem/7185875>.
-
- * page/Frame.cpp:
- (WebCore::Frame::setView):
- Detach any custom scroll bars from the old view.
-
- * page/FrameView.cpp:
- (WebCore::FrameView::detachCustomScrollbars):
- Simplify the check (and make it work when body is null) by just checking that the scroll bar owner is
- not a RenderPart object.
-
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::destroy):
- ASSERT that frame() is not null here and also add a null check so that release builds won't crash.
-
-2009-09-04 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Adam Roben.
-
- Make m_userStyleSheetLoader in Frame an OwnPtr.
-
- * page/Frame.cpp:
- (WebCore::Frame::Frame):
- (WebCore::Frame::~Frame):
- * page/Frame.h:
- * page/mac/FrameMac.mm:
- (WebCore::Frame::setUserStyleSheetLocation):
- (WebCore::Frame::setUserStyleSheet):
-
-2009-09-04 Timothy Hatcher <timothy@apple.com>
-
- Show color swatches in the Web Inspector before the color text so clicking them will not
- shift the swatch. Also makes multiple swatches in the single property toggle the color format.
-
- https://bugs.webkit.org/show_bug.cgi?id=28978
-
- Reviewed by Darin Adler.
-
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylePropertyTreeElement.prototype.updateTitle): Some refactoring to consolidate
- the processing we do on the property value. This eliminated the old nickname code, since the new
- WebInspector.Color class handles this. We could also simplify the color regex since more
- is handled by the Color class. Also no longer uses innerHTML for the linkify code.
- (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processValue): Helper function to
- process a value given a regex and processor functions.
- (WebInspector.StylePropertyTreeElement.prototype.updateTitle.linkifyURL): Make an anchor for the
- URL with "url()" syntax surrounding it.
- (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processColor): Makes a color, if
- there was an exception just return a text node.
- (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processColor.changeColorDisplay.changeTo):
- Moved from later in the file.
- (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processColor.changeColorDisplay): Ditto.
- * inspector/front-end/inspector.css:
-
-2009-09-04 Mark Mentovai <mark@chromium.org>
-
- Reviewed by Dave Hyatt.
-
- https://bugs.webkit.org/show_bug.cgi?id=28614
-
- Account for scrollbar state changes that occur during layout.
-
- * platform/ScrollView.cpp:
- (WebCore::ScrollView::updateScrollbars):
-
- Perform a layout prior to checking whether the scrollbar modes are
- off, on, or automatic. The modes may change during layout.
-
- * WebCore.base.exp:
- * WebCore.order:
- * page/Frame.cpp:
- (WebCore::Frame::createView):
- * page/FrameView.cpp:
- (WebCore::FrameView::FrameView):
- (WebCore::FrameView::resetScrollbars):
- (WebCore::FrameView::layout):
- * page/FrameView.h:
- * platform/ScrollView.h:
-
- Eliminate duplicated (and incorrect) scrollbar mode tracking between
- FrameView and ScrollView.
-
-2009-09-04 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Darin Adler.
-
- hostname and host are mixed up when manipulating anchor elements.
- https://bugs.webkit.org/show_bug.cgi?id=28954
-
- Swapped the implementation of host and hostname, and made sure not to return
- the port number if it is default for the given protocol.
- FireFox also avoids returning the protocol number if it is default.
-
- Test: fast/dom/Element/hostname-host.html
-
- * html/HTMLAnchorElement.cpp:
- (WebCore::HTMLAnchorElement::host):
- (WebCore::HTMLAnchorElement::hostname):
- * page/SecurityOrigin.cpp:
- (WebCore::SecurityOrigin::isDefaultPortForProtocol):
- * page/SecurityOrigin.h:
-
-2009-09-04 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Darin Adler and Steve Falkenburg.
-
- Fix <rdar://problem/7192902>.
-
- Add the necessary plumbing for having QTMovieWin use WebCore timers.
-
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
- (WebCore::TaskTimer::initialize):
- Create the timer and call QTMovieWin::setTaskTimerFuncs.
-
- (WebCore::TaskTimer::setTaskTimerDelay):
- Start the timer.
-
- (WebCore::TaskTimer::stopTaskTimer):
- Stop the timer.
-
- (WebCore::TaskTimer::fired):
- Call QTMovieWin::taskTimerFired().
-
- (WebCore::MediaPlayerPrivate::load):
- Initialize the Task timer.
-
- * platform/graphics/win/QTMovieWin.cpp:
- (updateTaskTimer):
- Call the global stopTaskTimer function and setTaskTimerDelay.
-
- (QTMovieWin::taskTimerFired):
- Make this a member function.
-
- (QTMovieWin::setTaskTimerFuncs):
- Set the global function pointers.
-
- (QTMovieWin::initializeQuickTime):
- (DllMain):
- No need to use the QT shared timer.
- * platform/graphics/win/QTMovieWin.h:
-
-2009-09-04 Tony Chang <tony@chromium.org>
-
- Reviewed by David Levin.
-
- Fix Chromium Win compile. Missing return statement in
- WebCore::RenderThemeChromiumSkia::paintSliderThumb.
- https://bugs.webkit.org/show_bug.cgi?id=28974
-
- No new tests, build fix.
-
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::paintSliderThumb):
-
-2009-09-04 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- [Chromium] Rolling out http://trac.webkit.org/changeset/48035, because it broke
- the build.
- https://bugs.webkit.org/show_bug.cgi?id=28696
-
-2009-09-04 Anders Carlsson <andersca@apple.com>
-
- Fix vcproj file.
-
- * WebCore.vcproj/WebCore.vcproj:
-
-2009-09-03 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Adam Roben.
-
- https://bugs.webkit.org/show_bug.cgi?id=28890, make simple user script injection work.
-
- This patch adds new API for adding and removing user scripts from page groups. User scripts
- are bundled together in isolated worlds (you can have multiple scripts together in the same
- world).
-
- Added userscripts/ directory for holding new tests (along with a simple test of script injection).
-
- * WebCore.base.exp:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::evaluateInIsolatedWorld):
- * bindings/js/ScriptController.h:
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::evaluateInIsolatedWorld):
- * bindings/v8/ScriptController.h:
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::finishedParsing):
- (WebCore::FrameLoader::dispatchDocumentElementAvailable):
- * page/Frame.cpp:
- (WebCore::Frame::injectUserScripts):
- (WebCore::Frame::injectUserScriptsForWorld):
- * page/Frame.h:
- * page/PageGroup.cpp:
- (WebCore::PageGroup::~PageGroup):
- (WebCore::PageGroup::addUserScript):
- (WebCore::PageGroup::removeUserContentForWorld):
- (WebCore::PageGroup::removeAllUserContent):
- * page/PageGroup.h:
- (WebCore::PageGroup::userScripts):
- * page/UserScript.h: Added.
- (WebCore::UserScript::UserScript):
- (WebCore::UserScript::source):
- (WebCore::UserScript::url):
- (WebCore::UserScript::patterns):
- (WebCore::UserScript::worldID):
- (WebCore::UserScript::injectionTime):
- * page/UserScriptTypes.h: Added.
- (WebCore::):
-
-2009-09-04 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26402
- Crashes when using a detached DocumentType node
-
- Test: fast/dom/DOMImplementation/detached-doctype.html
-
- DocumentType nodes are the only one that can have null document(), and they can never have
- children, so they are a degenerate case for NodeLists.
-
- * dom/Node.cpp:
- (WebCore::Node::childNodes): Don't try register node list with document if there's no
- document. Since there are no changes possible for a DocumentType's node list, this is not
- necessary.
- (WebCore::Node::registerDynamicNodeList): Ditto.
- (WebCore::Node::unregisterDynamicNodeList): Ditto. I couldn't find a scenario where this
- was invoked for a DocumentType node, but I also couldn't prove that it can't be (the
- de-registration code path that I saw taken was via Node destructor, and that already has
- a null check for document).
-
- * bindings/js/JSNodeCustom.cpp:
- (WebCore::JSNode::addEventListener): Bail out if there is no document (just as we already do
- if there is no window).
- (WebCore::JSNode::removeEventListener): Ditto.
-
-2009-09-04 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- [GTK] loadFinished never emitted
- https://bugs.webkit.org/show_bug.cgi?id=28935
-
- Do not report errors right away from
- ResourceHandle::start. Instead return true and schedule an error
- to be reported in the handle later. Otherwise WebCore gets
- confused and thinks the resource never finished loading, making it
- not emit the finished status.
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::startHttp):
- (WebCore::):
-
-2009-09-04 Ben Murdoch <benm@google.com>
-
- Reviewed by Eric Seidel.
-
- [V8] DOM Storage bindings: Event Handler should create StorageEvents
- https://bugs.webkit.org/show_bug.cgi?id=28942
-
- Tests:
- Causes the following tests that were failing with V8 to pass:
- * storage/domstorage/localstorage/onstorage-attribute-setwindow.html
- * storage/domstorage/localstorage/complex-keys.html
- * storage/domstorage/localstorage/onstorage-attribute-markup.html
- * storage/domstorage/localstorage/simple-events.html
- * storage/domstorage/localstorage/onstorage-attribute-set-attribute.html
- * storage/domstorage/localstorage/index-get-and-set.html
- * storage/domstorage/sessionstorage/onstorage-attribute-setwindow.html
- * storage/domstorage/sessionstorage/onstorage-attribute-markup.html
- * storage/domstorage/sessionstorage/simple-events.html
- * storage/domstorage/sessionstorage/onstorage-attribute-set-attribute.html
- * storage/domstorage/sessionstorage/index-get-and-set.html
-
- Code changes:
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::convertEventToV8Object): Create StorageEvents.
- * bindings/v8/custom/V8StorageCustom.cpp:
- (WebCore::storageGetter): Check if we are retrieving the length property and return the number of items in the object rather than a property named length when invoking the getItem() member of local/sessionStorage.
-
-2009-09-03 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- https://bugs.webkit.org/show_bug.cgi?id=28911
-
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::dispatchOnInjectedScript):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype.doEvalInWindow):
- (WebInspector.ConsoleView.prototype._formatarray):
- (WebInspector.ConsoleView.prototype._formatnode):
- * inspector/front-end/DOMAgent.js:
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
- (WebInspector.ElementsPanel.prototype.searchCanceled):
- (WebInspector.ElementsPanel.prototype.performSearch):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.dispatch):
- * inspector/front-end/InjectedScriptAccess.js: Added.
- (InjectedScriptAccess._installHandler.InjectedScriptAccess.methodName):
- (InjectedScriptAccess._installHandler):
- * inspector/front-end/MetricsSidebarPane.js:
- (WebInspector.MetricsSidebarPane.prototype.update):
- (WebInspector.MetricsSidebarPane.prototype.editingCommitted):
- * inspector/front-end/ObjectPropertiesSection.js:
- (WebInspector.ObjectPropertiesSection.prototype.update):
- (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
- (WebInspector.ObjectPropertyTreeElement.prototype.applyExpression):
- * inspector/front-end/PropertiesSidebarPane.js:
- (WebInspector.PropertiesSidebarPane.prototype.update):
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame):
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylesSidebarPane.prototype.update):
- (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
- (WebInspector.BlankStylePropertiesSection.prototype.editingCommitted):
- (WebInspector.StylePropertyTreeElement.prototype):
- * inspector/front-end/inspector.html:
-
-2009-09-04 Tony Chang <tony@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Implement <input type="range"> for Chromium Linux by painting
- the slider and the thumb using skia.
- https://bugs.webkit.org/show_bug.cgi?id=28928
-
- Covered by existing tests (we're currently hitting an assert for them).
-
- * rendering/RenderThemeChromiumLinux.cpp:
- (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
- * rendering/RenderThemeChromiumLinux.h:
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::drawVertLine):
- (WebCore::drawHorizLine):
- (WebCore::drawBox):
- (WebCore::RenderThemeChromiumSkia::paintSliderTrack):
- (WebCore::RenderThemeChromiumSkia::paintSliderThumb):
- * rendering/RenderThemeChromiumSkia.h:
-
-2009-09-04 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Eric Seidel.
-
- - Implement <input type=color> as a text field.
- - ValidityState::typeMismatch supports for type=color.
- https://bugs.webkit.org/show_bug.cgi?id=28966
-
- Tests: fast/forms/ValidityState-patternMismatch-unsupported.html
- fast/forms/ValidityState-typeMismatch-color.html
-
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::valueMissing):
- (WebCore::HTMLInputElement::patternMismatch):
- (WebCore::HTMLInputElement::setInputType):
- (WebCore::HTMLInputElement::formControlType):
- (WebCore::HTMLInputElement::saveFormControlState):
- (WebCore::HTMLInputElement::restoreFormControlState):
- (WebCore::HTMLInputElement::accessKeyAction):
- (WebCore::HTMLInputElement::rendererIsNeeded):
- (WebCore::HTMLInputElement::createRenderer):
- (WebCore::HTMLInputElement::appendFormData):
- (WebCore::HTMLInputElement::valueWithDefault):
- (WebCore::HTMLInputElement::storesValueSeparateFromAttribute):
- (WebCore::HTMLInputElement::defaultEventHandler):
- (WebCore::HTMLInputElement::isRequiredFormControl):
- (WebCore::HTMLInputElement::dataList):
- * html/HTMLInputElement.h:
- (WebCore::HTMLInputElement::):
- (WebCore::HTMLInputElement::isTextField):
- * html/ValidityState.cpp:
- (WebCore::ValidityState::typeMismatch):
- (WebCore::ValidityState::isValidColorString):
- * html/ValidityState.h:
-
-2009-09-04 Mads Ager <ager@chromium.org>
-
- Reviewed by David Levin.
-
- [V8] Crash when updating document cache
- https://bugs.webkit.org/show_bug.cgi?id=28965
-
- Initialization of a V8 JavaScript context can fail. When that
- happens, do not attempt to update the document wrapper cache.
-
- This code path is exercised by http/tests/security/javascriptURL/javascriptURL-in-new-iframe.html.
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::updateDocument):
-
-2009-09-04 Yaar Schnitman <yaar@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Two bugs:
-
- https://bugs.webkit.org/show_bug.cgi?id=25489
- CSS property background-position is now serialized in shorthand string as
- background-position-x background-position-y, as the specification requires
- (See http://www.w3.org/TR/2008/WD-css3-background-20080910/#the-background-position).
-
-
- https://bugs.webkit.org/show_bug.cgi?id=26541
- CSS background-color is now be serialized before other background properties,
- as CSS specification requires (See http://dev.w3.org/csswg/cssom/#css-value).
-
- An existing layout test that accepted wrong order and skipped position test
- had to be modified.
-
- * css/CSSMutableStyleDeclaration.cpp:
- (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
-
-2009-09-03 Kent Tamura <tkent@chromium.org>
-
- Reviewed by David Levin.
-
- Add support for HTMLTextAreaElement.textLength
- https://bugs.webkit.org/show_bug.cgi?id=28929
-
- Test: fast/forms/textarea-textlength.html
-
- * html/HTMLTextAreaElement.h:
- (WebCore::HTMLTextAreaElement::textLength):
- * html/HTMLTextAreaElement.idl:
-
-2009-09-03 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- <rdar://problem/7180197>, https://bugs.webkit.org/show_bug.cgi?id=28822
- REGRESSION(r31231): Creating document with current document's DOCTYPE causes crashes
-
- Test: fast/dom/DOMImplementation/createDocument-with-used-doctype.html
-
- * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): Even though we
- cannot raise an exception immediately out of fear of breaking Acid3, we shouldn't use a
- DocumentType node in two documents.
-
-2009-09-03 Brady Eidson <beidson@apple.com>
-
- Reviewed by Sam Weinig.
-
- Page Cache should support pages with Frames.
- https://bugs.webkit.org/show_bug.cgi?id=13631
-
- Tests: fast/events/pageshow-pagehide-on-back-cached-with-frames.html
- fast/loader/frames-with-unload-handlers-in-page-cache.html
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::canCachePageContainingThisFrame):
- (WebCore::FrameLoader::logCanCacheFrameDecision):
-
-2009-09-03 Steve VanDeBogart <vandebo@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Handle middle click in Chromium like QT
- https://bugs.webkit.org/show_bug.cgi?id=28696
-
- Tested by middle-click-onpaste.html.
-
- * platform/Pasteboard.h:
- * platform/chromium/ChromiumBridge.h:
- * platform/chromium/ClipboardChromium.cpp:
- (WebCore::ClipboardChromium::getData):
- * platform/chromium/PasteboardChromium.cpp:
- (WebCore::Pasteboard::Pasteboard):
- (WebCore::Pasteboard::isSelectionMode):
- (WebCore::Pasteboard::setSelectionMode):
- (WebCore::Pasteboard::canSmartReplace):
- (WebCore::Pasteboard::plainText):
- (WebCore::Pasteboard::documentFragment):
- * platform/chromium/PasteboardPrivate.h:
- (WebCore::PasteboardPrivate::):
-
-2009-09-03 Brady Eidson <beidson@apple.com>
-
- Reviewed by Sam Weinig.
-
- More partial work towards "Page Cache should support pages with Frames"
- https://bugs.webkit.org/show_bug.cgi?id=13631
-
- Fix a bug where subframes weren't asked if they were cacheable.
-
- No new tests, especially since page caching for frames isn't turned on yet.
- A layout test will come in my next patch, which enables frames in the page cache.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::canCachePageContainingThisFrame):
-
-2009-09-03 Adam Barth <abarth@webkit.org>
-
- Reviewed by eric@webkit.org.
-
- https://bugs.webkit.org/show_bug.cgi?id=24696
-
- Added mixed content methods to FrameLoaderClient.
-
- * loader/EmptyClients.h:
- (WebCore::EmptyFrameLoaderClient::didDisplayInsecureContent):
- (WebCore::EmptyFrameLoaderClient::didRunInsecureContent):
- * loader/FrameLoaderClient.h:
-
-2009-09-03 Kevin Watters <kevinwatters@gmail.com>
-
- Reviewed by Kevin Ollivier.
-
- [wx] Frames support
- https://bugs.webkit.org/show_bug.cgi?id=19041
-
- * page/wx/EventHandlerWx.cpp:
- (WebCore::EventHandler::passMousePressEventToSubframe):
- (WebCore::EventHandler::passMouseMoveEventToSubframe):
- (WebCore::EventHandler::passMouseReleaseEventToSubframe):
- (WebCore::EventHandler::passWheelEventToWidget):
- (WebCore::EventHandler::tabsToAllControls):
- (WebCore::EventHandler::passSubframeEventToSubframe):
- (WebCore::EventHandler::passMouseDownEventToWidget):
- * platform/wx/RenderThemeWx.cpp:
- (WebCore::nativeWindowForRenderObject):
- (WebCore::RenderThemeWx::paintButton):
- (WebCore::RenderThemeWx::paintTextField):
- (WebCore::RenderThemeWx::paintMenuList):
- (WebCore::RenderThemeWx::paintMenuListButton):
- * platform/wx/ScrollbarThemeWx.cpp: Added.
- (WebCore::ScrollbarTheme::nativeTheme):
- (WebCore::ScrollbarThemeWx::~ScrollbarThemeWx):
- (WebCore::ScrollbarThemeWx::scrollbarThickness):
- (WebCore::ScrollbarThemeWx::hasThumb):
- (WebCore::ScrollbarThemeWx::buttonSize):
- (WebCore::ScrollbarThemeWx::backButtonRect):
- (WebCore::ScrollbarThemeWx::forwardButtonRect):
- (WebCore::ScrollbarThemeWx::trackRect):
- (WebCore::ScrollbarThemeWx::paintScrollCorner):
- (WebCore::ScrollbarThemeWx::paint):
- * platform/wx/ScrollbarThemeWx.h: Added.
- (WebCore::ScrollbarThemeWx::hasButtons):
- * platform/wx/TemporaryLinkStubs.cpp:
- * platform/wx/wxcode/gtk/scrollbar_render.cpp: Added.
- (wxStyleForPart):
- (GetButtonWidget):
- (wxGetGdkWindowForDC):
- (wxRenderer_DrawScrollbar):
- * platform/wx/wxcode/mac/carbon/scrollbar_render.cpp: Added.
- (wxScrollbarPartToHIPressedState):
- (wxRenderer_DrawScrollbar):
- * platform/wx/wxcode/scrollbar_render.h: Added.
- (calcThumbStartAndLength):
- * platform/wx/wxcode/win/non-kerned-drawing.cpp:
- (WebCore::drawTextWithSpacing):
- * platform/wx/wxcode/win/scrollbar_render.cpp: Added.
- (GraphicsHDC::GraphicsHDC):
- (GraphicsHDC::~GraphicsHDC):
- (GraphicsHDC::operator HDC):
- (getTSStateForPart):
- (wxRenderer_DrawScrollbar):
- * webcore-wx.bkl:
-
-2009-09-03 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Page content is not displayed in case of HTTP status error
- https://bugs.webkit.org/show_bug.cgi?id=28949
-
- If the server sent content, show it to the user instead of an error,
- even if the HTTP status code is not success.
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
- (WebCore::QNetworkReplyHandler::finish):
- (WebCore::QNetworkReplyHandler::forwardData):
- (WebCore::QNetworkReplyHandler::resetState):
- * platform/network/qt/QNetworkReplyHandler.h:
-
-2009-09-03 Drew Wilson <atwilson@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- Need to update v8 bindings to support passing multiple ports to postMessage()
- https://bugs.webkit.org/show_bug.cgi?id=28839
-
- Added support for passing MessagePortArray to v8 bindings.
-
- New tests that now pass with V8:
- fast/events/message-port-multi.html
- fast/workers/worker-context-multi-port.html
- fast/workers/worker-multi-port.html
-
- * WebCore.gypi:
- Added V8MessageEventCustom.cpp and V8MessagePortCustom.h
- * bindings/v8/custom/V8CustomBinding.h:
- Added custom postMessage() handlers for various classes.
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::DOMWindowPostMessage):
- Added custom handler that supports MessagePortArray.
- * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
- (WebCore::DedicatedWorkerContextPostMessage):
- Added custom handler that supports MessagePortArray.
- * bindings/v8/custom/V8MessageEventCustom.cpp: Added.
- (WebCore::MessageEventPorts):
- Added getter for ports attribute.
- (WebCore::MessageEventInitMessageEvent):
- Added custom handler that supports MessagePortArray.
- * bindings/v8/custom/V8MessagePortCustom.cpp:
- (WebCore::MessagePortPostMessage):
- Added custom handler that supports MessagePortArray.
- (WebCore::getMessagePortArray):
- Added helper function that supports converting from a sequence-like object to a MessagePortArray.
- * bindings/v8/custom/V8MessagePortCustom.h: Added.
- Added declaration for getMessagePortArray().
- * bindings/v8/custom/V8WorkerCustom.cpp:
- (WebCore::WorkerPostMessage):
- Added custom handler that supports MessagePortArray.
-
-2009-09-03 Drew Wilson <atwilson@google.com>
-
- Reviewed by Sam Weinig.
-
- Need to update JS bindings and IDL files to support multiple message ports in postMessage()
- https://bugs.webkit.org/show_bug.cgi?id=28460
-
- Added new toJSSequence() API which validates that a JSValue meets the WebIDL criteria for a sequence.
-
- Tests: fast/events/message-port-multi.html
- fast/workers/worker-context-multi-port.html
- fast/workers/worker-multi-port.html
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- Added JSMessagePortCustom.h and JSMessageEventCustom.cpp.
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::toJSSequence):
- Added toJSSequence() API to do validation on sequence-like objects per WebIDL.
- * bindings/js/JSDOMBinding.h:
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::postMessage):
- Added custom handler for postMessage() that handles being passed MessagePortArrays.
- * bindings/js/JSDedicatedWorkerContextCustom.cpp:
- (WebCore::JSDedicatedWorkerContext::postMessage):
- Added custom handler for postMessage() that handles being passed MessagePortArrays.
- * bindings/js/JSMessageEventCustom.cpp: Added.
- (WebCore::JSMessageEvent::ports):
- Added custom ports() getter that converts from MessagePortArray to JSArray.
- (WebCore::JSMessageEvent::initMessageEvent):
- Added support for passing a MessagePortArray.
- * bindings/js/JSMessagePortCustom.cpp:
- (WebCore::JSMessagePort::postMessage):
- Added custom handler for postMessage() that handles being passed MessagePortArray.
- (WebCore::fillMessagePortArray):
- New helper routine that validates/converts from a JS sequence o a WebCore::MessagePortArray.
- * bindings/js/JSMessagePortCustom.h: Added.
- * bindings/js/JSWorkerCustom.cpp:
- (WebCore::JSWorker::postMessage):
- Added custom handler for postMessage() that handles being passed MessagePortArray.
- * dom/MessageEvent.cpp:
- * dom/MessageEvent.h:
- (WebCore::MessageEvent::ports):
- Changed ports() to return a MessagePortArray* since this value can be null.
- * dom/MessageEvent.idl:
- Updated IDL to match HTML5 spec (now accepts MessagePortArrays instead of a solitary MessagePort).
- * dom/MessagePort.cpp:
- * dom/MessagePort.h:
- * dom/MessagePort.idl:
- Updated IDL to match HTML5 spec (postMessage() now accepts MessagePortArrays instead of a solitary MessagePort).
- * page/DOMWindow.h:
- * page/DOMWindow.idl:
- Updated IDL to match HTML5 spec (postMessage() now accepts MessagePortArrays instead of a solitary MessagePort).
- * workers/DedicatedWorkerContext.cpp:
- * workers/DedicatedWorkerContext.h:
- * workers/DedicatedWorkerContext.idl:
- Updated IDL to match HTML5 spec (postMessage() now accepts MessagePortArrays instead of a solitary MessagePort).
- * workers/Worker.cpp:
- * workers/Worker.h:
- * workers/Worker.idl:
- Updated IDL to match HTML5 spec (postMessage() now accepts MessagePortArrays instead of a solitary MessagePort).
-
-2009-09-03 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Do not query non-function call frames for function name.
-
- https://bugs.webkit.org/show_bug.cgi?id=28799
-
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.CallFrameProxy):
- (InjectedScript.CallFrameProxy.prototype._wrapScopeChain):
-
-2009-09-03 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Crash after typing "clear" and pressing return in inspector console.
-
- https://bugs.webkit.org/show_bug.cgi?id=28684
-
- * inspector/front-end/InjectedScript.js:
- (InjectedScript._clearConsoleMessages):
- (InjectedScript._inspectObject):
- (InjectedScript._ensureCommandLineAPIInstalled):
-
-2009-09-03 Vitaly Repeshko <vitalyr@chromium.org>
-
- Reviewed by Adam Barth.
-
- [V8] Squeezed out some performance from string conversion.
- https://bugs.webkit.org/show_bug.cgi?id=28945
-
- * bindings/v8/V8Binding.cpp:
- (WebCore::WebCoreStringResource::WebCoreStringResource):
- (WebCore::WebCoreStringResource::~WebCoreStringResource):
- (WebCore::WebCoreStringResource::data):
- (WebCore::WebCoreStringResource::length):
- (WebCore::WebCoreStringResource::atomicString):
- (WebCore::WebCoreStringResource::string):
- Avoid calling virtual length method. Be more explicit with
- external memory computation. Avoid function calls in data and
- length.
- (WebCore::):
- (WebCore::v8StringToWebCoreString):
- (WebCore::v8StringToAtomicWebCoreString):
- (WebCore::v8NonStringValueToWebCoreString):
- (WebCore::v8NonStringValueToAtomicWebCoreString):
- Avoid extra calls of WebCoreStringResource::toString. When
- AtomicString is computed pass it immediately when constructing
- WebCoreStringResource. Use inline buffer for small strings.
- * bindings/v8/V8Binding.h:
- (WebCore::v8ValueToWebCoreString):
- (WebCore::v8ValueToAtomicWebCoreString):
- (WebCore::toString):
- Inline dispatch of string vs. non-string values.
-
-2009-09-03 Vitaly Repeshko <vitalyr@chromium.org>
-
- Reviewed by Adam Barth.
-
- [V8] Inlined common case of V8IsolatedWorld::getEntered to speed
- up V8Proxy lookup.
- https://bugs.webkit.org/show_bug.cgi?id=28946
-
- * bindings/v8/V8IsolatedWorld.cpp:
- (WebCore::V8IsolatedWorld::getEnteredImpl):
- * bindings/v8/V8IsolatedWorld.h:
- (WebCore::V8IsolatedWorld::getEntered):
-
-2009-09-03 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Fix a regression bug that maxLength doesn't work for IME input.
- https://bugs.webkit.org/show_bug.cgi?id=25253
-
- Tests: fast/forms/input-maxlength-ime-completed.html
- fast/forms/input-maxlength-ime-preedit.html
-
- * dom/InputElement.cpp:
- (WebCore::InputElement::handleBeforeTextInsertedEvent):
- * dom/InputElement.h:
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::defaultEventHandler):
- * wml/WMLInputElement.cpp:
- (WebCore::WMLInputElement::defaultEventHandler):
-
-2009-09-03 Cameron McCormack <cam@mcc.id.au>
-
- Reviewed by Eric Seidel.
-
- Make SVGStyleElement title/media/type setters do something
- https://bugs.webkit.org/show_bug.cgi?id=28828
-
- Test: svg/dom/style-reflect.html
-
- * svg/SVGStyleElement.cpp:
- (WebCore::SVGStyleElement::setXmlspace): Actually change the attribute.
- (WebCore::SVGStyleElement::setType): Ditto.
- (WebCore::SVGStyleElement::setMedia): Ditto.
- (WebCore::SVGStyleElement::setTitle): Ditto.
-
-2009-09-03 Ben Murdoch <benm@google.com>
-
- https://bugs.webkit.org/show_bug.cgi?id=28872
-
- Fixes a bug where handleEvent() in the V8 Custom SQL Statement Error binding would not return the correct result to WebCore after invoking the callback.
-
- Test: storage/statement-error-callback.html
-
- * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
- (WebCore::V8CustomSQLStatementErrorCallback::handleEvent): Return true from handleEvent() if the callback raised an exception or the callback itself returned true.
-
-2009-09-03 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- [Haiku] Adding three font-specific files to WebCore:
- FontCustomPlatformData.cpp, FontCustomPlatformData.h,
- and FontPlatformData.h
- https://bugs.webkit.org/show_bug.cgi?id=28131
-
- * platform/graphics/haiku/FontCustomPlatformData.cpp: Added.
- (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
- (WebCore::FontCustomPlatformData::fontPlatformData):
- (WebCore::createFontCustomPlatformData):
- * platform/graphics/haiku/FontCustomPlatformData.h: Added.
- (WebCore::FontCustomPlatformData::FontCustomPlatformData):
- * platform/graphics/haiku/FontPlatformData.h: Added.
- (WebCore::FontPlatformData::FontPlatformData):
- (WebCore::FontPlatformData::font):
- (WebCore::FontPlatformData::size):
- (WebCore::FontPlatformData::bold):
- (WebCore::FontPlatformData::oblique):
- (WebCore::FontPlatformData::hashTableDeletedFontValue):
-
-2009-09-02 Brady Eidson <beidson@apple.com>
-
- Reviewed by Darin Adler.
-
- More partial work towards "Page Cache should support pages with Frames"
- https://bugs.webkit.org/show_bug.cgi?id=13631
-
- No new tests. (No change in behavior, current tests pass).
-
- * loader/DocumentLoader.cpp:
- (WebCore::DocumentLoader::stopLoading): Adopt the new enum form for FrameLoader::stopLoading().
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::stopLoading): Take an enum to decide whether to dispatch no unload events,
- only unload, or unload and pagehide.
- (WebCore::FrameLoader::closeURL):
- (WebCore::FrameLoader::scheduleRedirection):
- (WebCore::FrameLoader::cachePageForHistoryItem): Call pageHidden().
- (WebCore::FrameLoader::pageHidden): Add to dispatch the pagehide event to all frames in the case
- where a page is added to the PageCache.
- * loader/FrameLoader.h:
-
- * loader/FrameLoaderTypes.h: Add an UnloadEventPolicy enum.
-
-2009-09-02 Brady Eidson <beidson@apple.com>
-
- Reviewed by Darin Adler.
-
- More partial work towards "Page Cache should support pages with Frames"
- https://bugs.webkit.org/show_bug.cgi?id=13631
-
- - More CachedFrame destruction work.
- - Including related Frame and FrameLoader changes and cleanup.
-
- No new tests. (No change in behavior, current tests pass).
-
- * history/CachedFrame.cpp:
- (WebCore::CachedFrameBase::restore): Rebuild up the whole FrameTree when restoring.
- (WebCore::CachedFrame::CachedFrame): Tear down the entire FrameTree when caching.
- (WebCore::CachedFrame::destroy): For child frames that are being destroyed while in
- the PageCache, do lightweight cleanup to:
- A - Prevent referring to a stale Page object.
- B - Prevent World Leaks of WebKit objects.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::stopAllLoaders): stopAllLoaders() should never be called on Frames that are
- in the PageCache. ASSERT that fact.
- (WebCore::FrameLoader::open): Remove a bogus release-build workaround, as the comment right above it
- explains it is not effective, and it'd be better to see the crash locally instead of downstream.
- (WebCore::FrameLoader::closeAndRemoveChild): Make sure the owner element has a page pointer before
- referencing it.
- (WebCore::FrameLoader::detachFromParent): Use the new detachViewsAndDocumentLoader() call
- (WebCore::FrameLoader::detachViewsAndDocumentLoader): Does lightweight cleanup of client (WebKit) objects.
- * loader/FrameLoader.h:
-
- * page/Frame.cpp:
- (WebCore::Frame::detachFromPage): Simply clear the Page pointer without doing any other work.
- (WebCore::Frame::pageDestroyed): Use the new detachFromPage().
- * page/Frame.h:
-
-2009-09-02 Jungshik Shin <jshin@chromium.org>
-
- Reviewed by Dimitri Glazkov
-
- [Chromium] Add 'icu::' qualifier in preparation for ICU upgrade to 4.2
- in Chromium. This is to fix a new file added in r28742 since the
- last patch for this issue.
-
- https://bugs.webkit.org/show_bug.cgi?id=28410
-
- No change in the test result.
-
- * platform/graphics/chromium/FontLinux.cpp:
- (WebCore::TextRunWalker::getNormalizedTextRun):
-
-2009-09-02 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- [Chromium] Correct a typo to fix bustage, caused by r47991.
- https://bugs.webkit.org/show_bug.cgi?id=27933
-
- * platform/graphics/skia/ImageBufferSkia.cpp: Changed "Unpremultipled" to "Unmultiplied".
-
-2009-09-02 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- [Chromium] Add a missing include to fix bustage, caused by r47991.
- https://bugs.webkit.org/show_bug.cgi?id=27933
-
- * platform/graphics/skia/ImageBufferSkia.cpp: Added SkColorPriv include.
-
-2009-09-02 Jian Li <jianli@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [Chromium] Implement file support for DragData.
- https://bugs.webkit.org/show_bug.cgi?id=28896
-
- * platform/chromium/DragDataChromium.cpp:
- (WebCore::DragData::containsURL):
- (WebCore::DragData::asURL):
- (WebCore::DragData::containsCompatibleContent):
-
-2009-09-02 Kevin Watters <kevinwatters@gmail.com>
-
- Reviewed by Kevin Ollivier.
-
- Protect libcurl shared data with Mutex objects via curl_set_share_opt.
- https://bugs.webkit.org/show_bug.cgi?id=28920
-
- * platform/network/curl/ResourceHandleManager.cpp:
- (WebCore::sharedResourceMutex):
- (WebCore::curl_lock_callback):
- (WebCore::curl_unlock_callback):
- (WebCore::ResourceHandleManager::ResourceHandleManager):
-
-2009-09-02 Evan Stade <estade@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Expose functions to change the focus ring color for Linux Chromium
-
- https://bugs.webkit.org/show_bug.cgi?id=28887
-
- * rendering/RenderThemeChromiumLinux.cpp:
- (WebCore::RenderThemeChromiumLinux::RenderThemeChromiumLinux):
- (WebCore::RenderThemeChromiumLinux::setFocusRingColor):
- (WebCore::RenderThemeChromiumLinux::platformFocusRingColor):
- * rendering/RenderThemeChromiumLinux.h:
-
-2009-09-02 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Eric Seidel.
-
- SVG Filter premultiplied color support for getImageDate/putImageData
- [https://bugs.webkit.org/show_bug.cgi?id=27933]
-
- Patch to get premultiplied color support for Skia on getImageDate/putImageData.
-
- * platform/graphics/skia/ImageBufferSkia.cpp:
- (WebCore::getImageData):
- (WebCore::putImageData):
-
-2009-09-02 Brady Eidson <beidson@apple.com>
-
- Forget to rename openInFrameloader() to open(), which was requested in Darin's review of my last patch.
-
- * history/CachedFrame.cpp:
- (WebCore::CachedFrameBase::restore):
- (WebCore::CachedFrame::open):
- * history/CachedFrame.h:
- * history/CachedPage.cpp:
- (WebCore::CachedPage::restore):
-
-2009-09-02 Brady Eidson <beidson@apple.com>
-
- Reviewed by Darin Adler.
-
- In http://trac.webkit.org/changeset/47943 I added new header dependencies to FrameLoader.h.
- Removing them is a little trouble, but worth it going forward.
- The pattern of creating a "CachedFrameBase" as the interface CachedFrame provides to FrameLoader
- was suggested by Darin Adler.
-
- No new tests. (No change in behavior)
-
- Make CachedFrame inherit privately from CachedFrameBase, which becomes the interface FrameLoader uses:
- * history/CachedFrame.cpp:
- (WebCore::CachedFrameBase::CachedFrameBase):
- (WebCore::CachedFrameBase::~CachedFrameBase):
- (WebCore::CachedFrameBase::restore):
- (WebCore::CachedFrame::CachedFrame):
- (WebCore::CachedFrame::openInFrameLoader):
- * history/CachedFrame.h:
- (WebCore::CachedFrameBase::document):
- (WebCore::CachedFrameBase::view):
- (WebCore::CachedFrameBase::domWindow):
- (WebCore::CachedFrame::create):
- (WebCore::CachedFrame::documentLoader):
- (WebCore::CachedFrame::mousePressNode):
-
- Call the new ::openInFrameLoader() method on the CachedFrame, as CachedFrameBase is now the only
- thing capable of interacting with FrameLoader::open(CachedFrameBase):
- * history/CachedPage.cpp:
- (WebCore::CachedPage::restore):
- * history/CachedPage.h:
- (WebCore::CachedPage::documentLoader):
-
- Make ::open(CachedFrame) public, and change it to ::open(CachedFrameBase):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::open):
- * loader/FrameLoader.h:
-
-2009-09-02 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Cannot pres Enter to escape from bulleted list when <ul> is a child of <li>.
- https://bugs.webkit.org/show_bug.cgi?id=24866
-
- This patch modifies breakOutOfEmptyListItem to break out of a properly nested list
- (a list to break out of is inside another list item).
-
- When the empty list item appears at the end of another list item, WebKit breaks out of
- the outer list item, and adds new item below the outer list item.
- Otherwise, WebKit breaks out of the the inner list item and inserts new paragraph.
-
- Test: editing/execCommand/break-out-of-empty-list-item.html
-
- * editing/CompositeEditCommand.cpp:
- (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
-
-2009-09-02 Brady Eidson <beidson@apple.com>
-
- Reviewed by Sam Weinig.
-
- More partial work towards "Page Cache should support pages with Frames"
- https://bugs.webkit.org/show_bug.cgi?id=13631
-
- This patch is primarily about the "CachedFrame tree" and making slightly different decisions
- based on whether a CachedFrame is the main frame or a subframe.
-
- - Store whether a CachedFrame represents the main frame or a subframe.
- - "Chop off the frame tree" for the main frame when creating its CachedFrame, as main frames
- are reused and need to start new page loads with an empty frame tree.
- - Reattach the frame tree to the main frame when restoring it.
- - open() the cached subframes in their respective loaders when restoring.
- - Properly clear() and destroy() cached subframes.
- - When committing to a new page load, and after caching the previous page, only clear the
- FrameView for the main frame.
-
- Note that all of above will eventually be necessary as I continue to land this work in pieces,
- but doesn't actually change any behavior right now because we still refuse to even *try* to
- cache pages with frames.
-
- No new tests. No change in behavior, and current tests continue to pass.
-
- * history/CachedFrame.cpp:
- (WebCore::CachedFrame::CachedFrame):
- (WebCore::CachedFrame::restore):
- (WebCore::CachedFrame::clear):
- (WebCore::CachedFrame::destroy):
- * history/CachedFrame.h:
- (WebCore::CachedFrame::isMainFrame):
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::clear):
- (WebCore::FrameLoader::open):
- * loader/FrameLoader.h:
-
-2009-09-02 Brady Eidson <beidson@apple.com>
-
- No review, build fix.
-
- http://trac.webkit.org/changeset/47976 broke the build.
- Let's try compiling before we land things, shall we?
-
- * platform/graphics/SimpleFontData.cpp:
- (WebCore::SimpleFontData::SimpleFontData): Order the initialization list correctly.
-
-2009-09-02 Kevin Ollivier <kevino@theolliviers.com>
-
- waf build fixes for Windows/MSVC.
-
- * wscript:
-
-2009-09-02 Ben Murdoch <benm@google.com>
-
- Unreviewed build fix for Chromium.
-
- Missed #including V8Proxy.h in WebCore/bindings/v8/V8Binding.cpp.
-
- * bindings/v8/V8Binding.cpp: add V8Proxy.h as an include
-
-2009-09-02 Kevin Ollivier <kevino@theolliviers.com>
-
- waf build fix, don't define symbols we now grab from other sources.
-
- * platform/wx/TemporaryLinkStubs.cpp:
-
-2009-09-02 Kevin Ollivier <kevino@theolliviers.com>
-
- Build fixes for PluginViewNone.cpp and a wx build fix for PluginView.cpp.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::stop):
- * plugins/PluginViewNone.cpp:
- (WebCore::PluginView::platformDestroy):
-
-2009-09-02 Charles Wei <charles.wei@torchmobile.com.cn>
-
- Reviewed by Eric Seidel.
-
- Fix the build failure of WebKit for Linux/Qt when WML is enabled
-
- No test cases needed since this just fixes the build problem.
-
- * wml/WMLElement.cpp:
- (WebCore::WMLElement::create):
- * wml/WMLTableElement.cpp:
- (WebCore::WMLTableElement::joinSuperflousColumns):
- (WebCore::WMLTableElement::padWithEmptyColumns):
-
-2009-09-02 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Adam Barth.
-
- WINCE PORT: use shared buffer for custom font data
- https://bugs.webkit.org/show_bug.cgi?id=27734
-
- Refactored by Joe Mason <joe.mason@torchmobile.com>
-
- * loader/CachedFont.cpp:
- add WINCE to platforms using cached custom data
- * platform/graphics/opentype/OpenTypeUtilities.cpp:
- (WebCore::renameFont): implement for WinCE
- * platform/graphics/opentype/OpenTypeUtilities.h:
- build fixes
- * platform/graphics/wince/FontCustomPlatformData.cpp:
- (WebCore::setCustomFontCache): add accessor
- (WebCore::createFontCustomPlatformData): change param to SharedBuffer
- * platform/graphics/wince/FontCustomPlatformData.h:
- update function signatures
-
-2009-09-02 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Adam Barth.
-
- WINCE PORT: font-related build fixes and minor bugfixes
- https://bugs.webkit.org/show_bug.cgi?id=27734
-
- * platform/graphics/FontCache.h: declare functions added in https://bugs.webkit.org/show_bug.cgi?id=27509
- * platform/graphics/GlyphPageTreeNode.cpp:
- (WebCore::GlyphPageTreeNode::initializePage): fix ambiguous overload error in min/max on Windows
- * platform/graphics/SimpleFontData.cpp:
- (WebCore::SimpleFontData::SimpleFontData): initialize member vars
- * platform/graphics/SimpleFontData.h: disable unused members on Wince to save space
-
-2009-09-02 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Adam Barth.
-
- Another pass at releasing the storage mutex.
- https://bugs.webkit.org/show_bug.cgi?id=28904
-
- Another pass at releasing the storage mutex (when applicable) when we finish
- executing JavaScript. http://dev.w3.org/html5/spec/Overview.html#storage-mutex
- describes the required behavior.
-
- As it turns out, https://bugs.webkit.org/show_bug.cgi?id=28789 didn't solve
- the problem correctly. First of all, I missed that events and timeouts go
- through a different call path. Second of all, I didn't consider recursion
- correctly. Third of all, my check to see if LocalStorage is alive actually
- instantiates it if it isn't yet. Fourth, I forgot DOM_STORAGE guards around
- it. So I'm reverting that change completely and doing it more cleanly.
- Unfortunately, the solution isn't as portable (and thus I've left out the JSC
- implementation for now).
-
- NOTE: This change now tracks recursion on function callbacks in V8. I ran this
- by Mads Ager and Mike Belshe and they seemed to think adding the checks were
- fine. Most callbacks are asynchronous and thus wouldn't be nested. The few
- scenareos where you can have nested callbacks probably should have always been
- protected by a recursion guard.
-
- Unfortunately, this can't be tested without a hook added to the layout test
- controllers since the lock is (by design) not supposed to be observable by
- JavaScript. https://bugs.webkit.org/show_bug.cgi?id=28906
-
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::evaluate): revert
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::evaluate): revert
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::runScript):
- Add releaseStorageMutex call. A small amount of clean up.
- (WebCore::V8Proxy::callFunction):
- Add releaseStorageMutex call. A small amount of clean up.
- (WebCore::V8Proxy::releaseStorageMutex):
- Check to see if localStorage has been instantiated. If so, tell it to
- unlock all storage areas.
- * bindings/v8/V8Proxy.h:
- * page/PageGroup.h:
- (WebCore::PageGroup::hasLocalStorage): Make hasLocalStorage public.
-
-2009-09-02 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Adam Barth.
-
- WINCE PORT: Implement ImageBuffer for WINCE
- Implement Image interface with a light class BufferedImage
- for rendering ImageBuffer
- https://bugs.webkit.org/show_bug.cgi?id=28167
-
- * platform/graphics/wince/ImageBufferData.h: Added.
- * platform/graphics/wince/ImageBufferWince.cpp: Added.
-
-2009-08-31 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Eric Seidel.
-
- Join the various PluginView destructors into one shared implementation
-
- https://bugs.webkit.org/show_bug.cgi?id=27706
-
- The Qt port used to delete the platform plugin widget as the last step.
- Now this is done before cleaning up the script objects and unloading the
- plugin package, similar to how the Win port does it.
-
- * plugins/PluginView.cpp:
- * plugins/PluginViewNone.cpp:
- * plugins/gtk/PluginViewGtk.cpp:
- * plugins/mac/PluginViewMac.cpp:
- * plugins/qt/PluginViewQt.cpp:
- * plugins/win/PluginViewWin.cpp:
-
-2009-08-31 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Eric Seidel.
-
- Share PluginView::init() between ports
-
- https://bugs.webkit.org/show_bug.cgi?id=27706
-
- The port-spesific bits are moved to platformStart(), which now returns
- a bool based on the success of the platformStart.
-
- m_hasPendingGeometryChange is now initialized in the initializer list
- instead of in PluginViewQt's init()
-
- PluginViewMac (currently used only by the Qt port) used to manually call
- stop() in the case where an unsupported drawing or event model was detected.
- This was wrong, as the m_status and m_isStarted fields should be used to
- guard against doing operations on a plugin in this intermediate state.
-
- * plugins/PluginView.cpp:
- * plugins/PluginView.h:
- * plugins/PluginViewNone.cpp:
- * plugins/gtk/PluginViewGtk.cpp:
- * plugins/mac/PluginViewMac.cpp:
- * plugins/qt/PluginViewQt.cpp:
- * plugins/win/PluginViewWin.cpp:
-
-2009-09-02 Ben Murdoch <benm@google.com>
-
- https://bugs.webkit.org/show_bug.cgi?id=28737
-
- Update JavaScript bindings in JSC and V8 for SQLTransaction to throw exceptions in the right places.
-
- * bindings/js/JSSQLTransactionCustom.cpp:
- (WebCore::JSSQLTransaction::executeSql): Throw an exception if no parameters are passed to executeSql().
- * bindings/v8/V8Binding.cpp:
- (WebCore::v8ValueToWebCoreString): Catch an exception if thrown from toString().
- * bindings/v8/custom/V8SQLTransactionCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL): Allow "arrayish objects" to be passed to executeSql.
-
-2009-09-01 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Migrate Databases tab to InjectedScript /
- serialized interaction.
-
- https://bugs.webkit.org/show_bug.cgi?id=28873
-
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::handleEvent):
- * inspector/front-end/Database.js:
- (WebInspector.Database.prototype.isDB):
- (WebInspector.Database.prototype.runWithTableNames.sortingCallback):
- (WebInspector.Database.prototype.runWithTableNames):
- (WebInspector.Database.prototype.executeSql):
- (WebInspector.Database.prototype.executeSql.errorCallback):
- (WebInspector.Database.prototype.executeSql.queryTransaction):
- * inspector/front-end/DatabaseQueryView.js:
- (WebInspector.DatabaseQueryView.prototype._enterKeyPressed):
- (WebInspector.DatabaseQueryView.prototype._queryFinished):
- * inspector/front-end/DatabaseTableView.js:
- (WebInspector.DatabaseTableView):
- * inspector/front-end/StoragePanel.js:
- (WebInspector.StoragePanel.prototype.selectDatabase):
- (WebInspector.StoragePanel.prototype.updateDatabaseTables.withTableNames):
- (WebInspector.StoragePanel.prototype.updateDatabaseTables):
- (WebInspector.DatabaseSidebarTreeElement.prototype.onpopulate.withTableNames):
- (WebInspector.DatabaseSidebarTreeElement.prototype.onpopulate):
-
-2009-09-02 Pavel Feldman <pfeldman@chromium.org>
-
- Not reviewed (trivial followup fix).
-
- Web Inspector: Trivial follow up fix to r47944.
-
- https://bugs.webkit.org/show_bug.cgi?id=28800
-
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::nodeForId):
-
-2009-09-01 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by John Sullivan.
-
- Fixed a bug in handling of isReadOnly, where textareas were casted to HTMLInputElements.
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::isReadOnly):
-
-2009-09-01 Patrick Mueller <Patrick_Mueller@us.ibm.com>
-
- Reviewed by Timothy Hatcher.
-
- https://bugs.webkit.org/show_bug.cgi?id=28047
- add utility method to enable logging messages for inspector development
-
- manual test case added (see below)
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleMessage.prototype.toMessageElement):
- (WebInspector.ConsoleMessage.prototype.toString):
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.js:
- (WebInspector.log):
- * manual-tests/inspector/webinspector-log.html: Added.
- * page/Console.cpp:
- (WebCore::printMessageSourceAndLevelPrefix):
- * page/Console.h:
- (WebCore::):
-
-2009-09-01 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=21990
- When a rare EUC-JP character is present, explicitly (and correctly) labelled EUC-JP document
- is mistreated as Shift_JIS
-
- <rdar://problem/5828506> Safari should not try auto-detecting if charset information exists
-
- WebKit used to unconditionally auto-detect document encoding if it was one of Japanese ones.
- This didn't really match any browser, and did cause problems on some sites.
-
- Our detector is very quick to label an EUC-JP page as Shift_JIS if it notices a byte that
- cannot be part of EUC-JP source. However, such bytes do appear in Web pages sometimes,
- especially in comments. Also, some valid EUC-JP sequences are not known to it.
-
- Some pages that are fixed by this change:
-
- <rdar://problem/5934750> Encoding in incorrect at http://cocodeparis.blog45.fc2.com/. This
- page has incorrect encoding in title, so no browser displays it 100% fine. We now match
- Firefox and IE.
-
- <rdar://problem/6007713> The web page http://www.sf.us.emb-japan.go.jp/top.htm is garbled
- in Safari. There is a stray byte in comments that was makes charset detector think it can't
- be EUC-JP.
-
- <rdar://problem/6965711> A Japanese web page www.nippontv.studiolegend.tv is garbled in
- Safari. Many comments on this page are encoded as Shift_JIS - IE magically displays that
- fine in View Source mode (it doesn't seem to have an ability to switch between EUC-JP and
- Shift_JIS in normal HTML view though).
-
- Test: fast/encoding/japanese-encoding-mix.html
-
- * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::decode): Only invoke auto-
- detection if there is no solid charset information yet.
-
-2009-09-01 Jian Li <jianli@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] FileList cannot be accessed via index in Chromium.
- https://bugs.webkit.org/show_bug.cgi?id=28883
-
- Tested by clipboard-file-access.html.
-
- * WebCore.gypi:
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getTemplate):
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8FileListCustom.cpp: Added.
-
-2009-08-31 Jon Honeycutt <jhoneycutt@apple.com>
-
- Remove the workaround added in r47316.
-
- Reviewed by Sam Weinig.
-
- * accessibility/AXObjectCache.cpp:
- (WebCore::AXObjectCache::AXObjectCache):
-
- * accessibility/AXObjectCache.h:
- Remove the Document argument to the AXObjectCache constructor and the
- m_document member variable, and replace the no-parameter
- handleFocusedUIElementChanged() with the two-parameter GTK function.
- (WebCore::AXObjectCache::handleFocusedUIElementChanged):
-
- * accessibility/chromium/AXObjectCacheChromium.cpp:
- (WebCore::AXObjectCache::handleFocusedUIElementChanged):
-
- * accessibility/gtk/AXObjectCacheAtk.cpp:
- (WebCore::AXObjectCache::handleFocusedUIElementChanged):
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (fallbackObject):
- Don't pass a null Document when constructing the AXObjectCache.
-
- * accessibility/mac/AXObjectCacheMac.mm:
- (WebCore::AXObjectCache::handleFocusedUIElementChanged):
-
- * accessibility/win/AXObjectCacheWin.cpp:
- (WebCore::AXObjectCache::handleFocusedUIElementChanged):
- Get the document from the RenderObject; m_document was removed.
-
- * dom/Document.cpp:
- (WebCore::Document::axObjectCache):
- Don't pass the Document when constructing the AXObjectCache.
- (WebCore::Document::setFocusedNode):
- Pass the old and new focused RenderObjects when calling
- handleFocusedUIElementChanged().
-
-2009-09-01 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Check that InspectorDOMAgent and InspectorFrontend are not null
- before accessing them in InspectorBackend. They may be null if
- InspectorController is closed before an asynchronous operation is
- started.
-
- https://bugs.webkit.org/show_bug.cgi?id=28800
-
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::getCookies):
- (WebCore::InspectorBackend::getChildNodes):
- (WebCore::InspectorBackend::setAttribute):
- (WebCore::InspectorBackend::removeAttribute):
- (WebCore::InspectorBackend::setTextNodeValue):
- (WebCore::InspectorBackend::highlight):
- (WebCore::InspectorBackend::nodeForId):
- (WebCore::InspectorBackend::pushNodePathToFrontend):
- (WebCore::InspectorBackend::addNodesToSearchResult):
- (WebCore::InspectorBackend::selectDatabase):
- (WebCore::InspectorBackend::selectDOMStorage):
- (WebCore::InspectorBackend::inspectorDOMAgent):
- (WebCore::InspectorBackend::inspectorFrontend):
- * inspector/InspectorBackend.h:
-
-2009-09-01 Brady Eidson <beidson@apple.com>
-
- Reviewed by Sam Weinig.
-
- Page Cache should support pages with frames
- https://bugs.webkit.org/show_bug.cgi?id=13631
-
- Things learned in the full task that this patch addresses:
- - The notions of clearing a CachedFrame and destroying a CachedFrame were two concepts that
- needed to be managed separately.
- - Once we start restoring pages with multiple CachedFrames, we'll have to be calling
- FrameLoader::open(CachedFrame&) multiple times with different CachedFrames, and this process
- will be guided by the CachedFrames themselves.
-
- No new tests. (No change in behavior, current layout tests pass)
-
- * history/CachedFrame.cpp:
- (WebCore::CachedFrame::CachedFrame):
- (WebCore::CachedFrame::~CachedFrame):
- (WebCore::CachedFrame::clear): Only clear pointers out.
- (WebCore::CachedFrame::destroy): Perform the destructive cleanup work here - Things that shouldn't
- occur simply by navigating back to a page with a CachedFrame.
- * history/CachedFrame.h:
-
- * history/CachedPage.cpp:
- (WebCore::CachedPage::~CachedPage):
- (WebCore::CachedPage::restore): Call clear() after restoring.
- (WebCore::CachedPage::clear):
- (WebCore::CachedPage::destroy):
- * history/CachedPage.h:
-
- * history/PageCache.cpp:
- (WebCore::PageCache::releaseAutoreleasedPagesNow): destroy() CachedPages that are being pruned,
- instead of clearing them.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::commitProvisionalLoad): Let the CachedPage clear() itself after restoring.
- (WebCore::FrameLoader::open): Don't ::open() the CachedFrame, as the CachedPage does that now.
- * loader/FrameLoader.h: Add the friending so CachedPage and CachedFrame can better guide the process.
- Even though CachedFrame::restore() isn't used for now, it will be soon.
-
-2009-09-01 Andrei Popescu <andreip@google.com>
-
- Reviewed by David Levin.
-
- Add a "lowMemoryNotification" method to the V8 ScriptController class.
- This is needed in order to allow the host application (Android Web browser in this case)
- to call the v8::V8::LowMemoryNotification() method added to V8 in
- http://code.google.com/p/v8/source/detail?spec=svn2777&r=2725
-
- https://bugs.webkit.org/show_bug.cgi?id=28776
-
-
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::lowMemoryNotification):
- * bindings/v8/ScriptController.h:
-
-2009-09-01 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Adam Barth.
-
- V8 Bindings for WebSocket API.
- https://bugs.webkit.org/show_bug.cgi?id=28844
-
- * bindings/v8/DOMObjectsInclude.h:
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getTemplate):
- (WebCore::V8DOMWrapper::convertToV8Object):
- (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
- * bindings/v8/V8DOMWrapper.h:
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8WebSocketCustom.cpp: Added.
-
-2009-09-01 Peter Kasting <pkasting@google.com>
-
- Unreviewed (build fix).
-
- Missed a "." -> "->" conversion.
-
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoderQt::ReadContext::ReadContext):
-
-2009-09-01 Peter Kasting <pkasting@google.com>
-
- Unreviewed (build fix).
-
- Try to fix Qt build, take 2. The Qt code had what looks like a
- broken virtual function override.
-
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoderQt::ReadContext::ReadContext):
- (WebCore::ImageDecoderQt::setData):
- * platform/graphics/qt/ImageDecoderQt.h:
-
-2009-09-01 Adam Barth <abarth@webkit.org>
-
- Reviewed by Sam Weinig.
-
- Uninitialized variable in XSSAuditor
- https://bugs.webkit.org/show_bug.cgi?id=28874
-
- One ought to initialize variables before use even when it doesn't
- matter. No behavior change.
-
- * page/XSSAuditor.h:
- (WebCore::XSSAuditor::CachingURLCanonicalizer::CachingURLCanonicalizer):
-
-2009-09-01 Peter Kasting <pkasting@google.com>
-
- Unreviewed (build fix).
-
- Try to fix Qt build.
-
- * platform/graphics/ImageSource.cpp:
-
-2009-08-28 Peter Kasting <pkasting@google.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=27965
- Eliminate most of ImageSourceQt.cpp in favor of ImageSource.cpp.
-
- * WebCore.pro:
- * platform/graphics/ImageSource.cpp:
- (WebCore::ImageSource::frameHasAlphaAtIndex):
- * platform/graphics/qt/ImageSourceQt.cpp:
- (WebCore::ImageSource::createFrameAtIndex):
- (WebCore::ImageSource::frameHasAlphaAtIndex):
- (WebCore::ImageSource::frameIsCompleteAtIndex):
-
-2009-09-01 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Make InjectedScript self-contained (move necessary
- methods from utilities.js into InjectedScript).
-
- https://bugs.webkit.org/show_bug.cgi?id=28871
-
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.prototype.generateStylesheet):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript._ensureCommandLineAPIInstalled.inspectObject):
- (InjectedScript._ensureCommandLineAPIInstalled):
- (InjectedScript.pushNodeToFrontend):
- (InjectedScript.createProxyObject):
- (Object.type):
- (Object.hasProperties):
- (Object.className):
- (String.prototype.escapeCharacters):
- * inspector/front-end/utilities.js:
-
-2009-09-01 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: console log message repeat count double.
-
- https://bugs.webkit.org/show_bug.cgi?id=28856
-
- * inspector/front-end/InjectedScript.js:
- (InjectedScript._evaluateOn):
-
-2009-09-01 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Reviewed by Mark Rowe.
-
- [Gtk] Fix DATALIST build
- https://bugs.webkit.org/show_bug.cgi?id=28826
-
- Add ENABLE_DATALIST to FEATURE_DEFINES.
-
- * GNUmakefile.am:
-
-2009-09-01 Cameron McCormack <cam@mcc.id.au>
-
- Reviewed by Eric Seidel.
-
- SVGSVGElement suspend methods argument/return types incorrect
- https://bugs.webkit.org/show_bug.cgi?id=28860
-
- Also fix the style of the argument names.
-
- * svg/SVGSVGElement.cpp:
- (WebCore::SVGSVGElement::suspendRedraw):
- (WebCore::SVGSVGElement::unsuspendRedraw):
- * svg/SVGSVGElement.h:
-
-2009-09-01 Roland Steiner <rolandsteiner@google.com>
-
- Reviewed by Eric Seidel.
-
- Fix bug 28808: [Skia] Fix flaky layout test svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html [DEBUG]
- (https://bugs.webkit.org/show_bug.cgi?id=28808)
-
- The bug fix adds an explicit check for the validity of the path when it is
- transformed into local coordinates.
- This was the most suitable place I could find that didn't cause an inordinate
- amount of refactoring. Also, it seems pertinent and may also catch other cases
- that are not limited to clipping paths.
-
- TEST: existing svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html
-
- * platform/graphics/skia/GraphicsContextSkia.cpp: make isPathSkiaSafe accessible
- (WebCore::):
- * platform/graphics/skia/PlatformContextSkia.cpp:
- (PlatformContextSkia::currentPathInLocalCoordinates): check Skia safety of path
-
-2009-09-01 Yusuke Sato <yusukes@chromium.org>
-
- Reviewed by Eric Seidel.
-
- [Chromium] Combining Diacritical Marks (U+0300..) are not handled correctly.
- https://bugs.webkit.org/show_bug.cgi?id=28742
-
- Normalize (NFC) a TextRun when the run contains combining diacritical marks
- so that Skia can pick a correct glyph without relying on GSUB table in a font.
- This change is for Chromium Linux.
-
- * platform/graphics/chromium/FontLinux.cpp:
- (WebCore::TextRunWalker::getTextRun): Added.
- (WebCore::TextRunWalker::getNormalizedTextRun): Added.
-
- This function is called when the run contains U+0300..U+036F and converts characters in
- the run to the combined form (NFC) using ICU.
-
-2009-09-01 Vitaly Repeshko <vitalyr@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Inlined fast paths of V8DOMWrapper::convertNodeToV8Object and
- V8Proxy::createWrapperFromCache.
- https://bugs.webkit.org/show_bug.cgi?id=28848
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::convertDocumentToV8Object): Special
- function for document wrapping.
- (WebCore::V8DOMWrapper::convertNewNodeToV8Object): Slow case of
- wrapping a new node.
- * bindings/v8/V8DOMWrapper.h:
- (WebCore::V8DOMWrapper::convertNodeToV8Object): Extracted fast
- path from V8DOMWrapper.cpp.
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::createWrapperFromCacheSlowCase):
- * bindings/v8/V8Proxy.h:
- (WebCore::V8Proxy::createWrapperFromCache): Extracted fast path
- from V8Proxy.cpp.
-
-2009-09-01 Eric Seidel <eric@webkit.org>
-
- No review, windows build fix only. Clearly I should have read the patch closer. :(
-
- Allow excluding certain plugins from loading
- https://bugs.webkit.org/show_bug.cgi?id=28677
-
- * plugins/PluginDatabase.cpp:
- (WebCore::PluginDatabase::refresh):
-
-2009-09-01 Alexander Pavlov <apavlov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Implement conditional breakpoints in the Web Inspector backend
- and add frontend JavaScript stubs.
- https://bugs.webkit.org/show_bug.cgi?id=28846
-
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::profiles):
- (WebCore::InspectorBackend::addBreakpoint):
- (WebCore::InspectorBackend::updateBreakpoint):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/JavaScriptDebugServer.cpp:
- (WebCore::JavaScriptDebugServer::BreakpointInfo::condition):
- (WebCore::JavaScriptDebugServer::BreakpointInfo::setCondition):
- (WebCore::JavaScriptDebugServer::addBreakpoint):
- (WebCore::JavaScriptDebugServer::breakpointInfo):
- (WebCore::JavaScriptDebugServer::updateBreakpoint):
- (WebCore::JavaScriptDebugServer::updateBreakpointInfo):
- (WebCore::JavaScriptDebugServer::removeBreakpoint):
- (WebCore::JavaScriptDebugServer::hasBreakpoint):
- (WebCore::JavaScriptDebugServer::clearBreakpoints):
- * inspector/JavaScriptDebugServer.h:
- (WebCore::JavaScriptDebugServer::BreakpointInfo::BreakpointInfo):
- * inspector/front-end/Breakpoint.js:
- (WebInspector.Breakpoint):
- (WebInspector.Breakpoint.prototype.get id):
- (WebInspector.Breakpoint.prototype.get condition):
- (WebInspector.Breakpoint.prototype.set condition):
- * inspector/front-end/BreakpointsSidebarPane.js:
- (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint):
- (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged):
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel.prototype.addScript):
-
-2009-09-01 Marius Renn <damarvy@gmail.com>
-
- Reviewed by Eric Seidel.
-
- Added delegate to PluginDatabase to disable loading certain plugins.
- This is useful when you want to load from the standard plugin
- directory, but want to exclude certain plugins. Plugins may be
- excluded early on by name, so that no plugin code is executed (which
- may have caused a crash).
-
- * plugins/PluginDatabase.cpp:
- (WebCore::PluginDatabase::PluginDatabase):
- (WebCore::PluginDatabase::refresh):
- * plugins/PluginDatabase.h:
- (WebCore::PluginDatabase::setClient):
- * plugins/PluginDatabaseClient.h: Added.
- (WebCore::PluginDatabaseClient::~PluginDatabaseClient):
-
-2009-08-31 Brady Eidson <beidson@apple.com>
-
- Rubberstamped by Sam Weinig
-
- * WebCore.base.exp: Removed an unneeded symbol export.
-
-2009-08-31 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Reviewed by Alexey Proskuryakov.
-
- https://bugs.webkit.org/show_bug.cgi?id=28466
- When downloading a file, two GET requests are sent to the HTTP server
-
- Can't think of a way to test this.
-
- * loader/ResourceLoader.cpp:
- (WebCore::ResourceLoader::releaseResources): only nullify the
- handle's client when it is the ResourceLoader, to support the case
- in which a download API uses a different client
-
-2009-08-31 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Darin Adler.
-
- Text Fields and Text Areas are reported as read-only by inspect32.exe.
- https://bugs.webkit.org/show_bug.cgi?id=28854
-
- Added another case in AcccessibiltyRenderObject::isReadOnly to test if text fields
- and texts areas are read-only.
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::isReadOnly):
- (WebCore::AccessibilityRenderObject::canSetValueAttribute):
-
-2009-08-31 Drew Wilson <atwilson@google.com>
-
- Reviewed by Alexey Proskuryakov.
-
- fast/workers/worker-lifecycle.html crashes intermittently on snowleopard
- https://bugs.webkit.org/show_bug.cgi?id=28795
-
- Changed WorkerContext::close() to no longer stop the worker thread.
- It is now the parent's responsibility to shut down the worker thread when it is notified that the context is closed.
-
- * workers/AbstractWorker.cpp:
- Updated dispatchScriptErrorEvent to pass-through the "handled" value from dispatchEvent(), to allow event handlers added with addEventListener() to mark events as handled.
- * workers/DefaultSharedWorkerRepository.cpp:
- (WebCore::SharedWorkerProxy::workerContextClosed):
- Now shuts down the worker thread when notified that the context is closed.
- (WebCore::SharedWorkerProxy::close):
- Now handles being invoked when the context is already in the process of shutting down.
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::close):
- No longer calls WorkerThread::stop() to avoid race conditions with shutting down the thread while the parent is still interacting with it.
- * workers/WorkerContext.h:
- (WebCore::WorkerContext::isClosing):
- isClosing() is now public so WorkerRunLoop can call it to determine whether to process tasks.
- * workers/WorkerMessagingProxy.cpp:
- (WebCore::WorkerExceptionTask::performTask):
- Error events should still be delivered even if the worker thread is closing.
- Also fixed problem where error events were not dispatched if error handlers were added via addEventListener().
- (WebCore::WorkerTerminateTask::create):
- New task that invokes terminateWorkerContext() on the parent thread when the context is closed.
- (WebCore::WorkerTerminateTask::WorkerTerminateTask):
- (WebCore::WorkerTerminateTask::performTask):
- (WebCore::WorkerMessagingProxy::workerContextClosed):
- Now fires off a WorkerTerminateTask to shut down the thread when the context is closed.
- * workers/WorkerMessagingProxy.h:
- WorkerMessagingProxy now overrides workerContextClosed().
- * workers/WorkerRunLoop.cpp:
- (WebCore::WorkerRunLoop::runInMode):
- Now drops tasks on the floor if the WorkerContext is closing.
-
-2009-08-31 Ojan Vafai <ojan@chromium.org>
-
- Not reviewed (build fix)
-
- Build fix for Chromium to match r49707.
-
- * bindings/v8/ScriptCallFrame.cpp:
- (WebCore::ScriptCallFrame::ScriptCallFrame):
- * bindings/v8/ScriptSourceCode.h:
- (WebCore::ScriptSourceCode::ScriptSourceCode):
- * platform/KURLGoogle.cpp:
- (WebCore::KURL::KURL):
- (WebCore::blankURL):
-
-2009-08-31 Alexey Proskuryakov <ap@webkit.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=28858
- Element.baseURI parses xml:base attribute incorrectly
-
- Test: fast/dom/base-attribute-parsing.xhtml
-
- * dom/Element.cpp: (WebCore::Element::baseURI): Avoid assertion failure (no change in
- release mode).
-
-2009-08-31 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reverting http://trac.webkit.org/changeset/47904, because it caused
- layout test failure.
-
- Test: fast/dom/Window/new-window-opener.html
-
-2009-08-31 Alexey Proskuryakov <ap@webkit.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=28852
- Rename KURL single argument constructor to avoid confusion
-
- * platform/KURL.h: The constructor that used to be single argument should now be invoked
- as KURL(ParsedURLString, myString).
-
- * WebCore.base.exp:
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::createWindow):
- * bindings/js/ScriptCallFrame.cpp:
- (WebCore::ScriptCallFrame::ScriptCallFrame):
- * bindings/v8/NPV8Object.cpp:
- (_NPN_EvaluateHelper):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::createWindow):
- * css/CSSCursorImageValue.cpp:
- (WebCore::isSVGCursorIdentifier):
- * css/CSSImageValue.cpp:
- (WebCore::CSSImageValue::cachedImage):
- * css/CSSImportRule.cpp:
- (WebCore::CSSImportRule::insertedIntoParent):
- * css/StyleBase.cpp:
- (WebCore::StyleBase::baseURL):
- * dom/Document.cpp:
- (WebCore::Document::initSecurityContext):
- * dom/Element.cpp:
- (WebCore::Element::baseURI):
- * editing/markup.cpp:
- (WebCore::completeURLs):
- * history/HistoryItem.cpp:
- (WebCore::HistoryItem::url):
- (WebCore::HistoryItem::originalURL):
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::didLoadResourceFromMemoryCache):
- * inspector/InspectorResource.cpp:
- (WebCore::InspectorResource::createCached):
- * loader/Cache.cpp:
- (WebCore::Cache::revalidateResource):
- * loader/DocLoader.cpp:
- (WebCore::DocLoader::requestResource):
- * loader/DocumentLoader.cpp:
- (WebCore::DocumentLoader::getSubresources):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::init):
- (WebCore::FrameLoader::iconURL):
- (WebCore::FrameLoader::scheduleLocationChange):
- (WebCore::FrameLoader::redirectionTimerFired):
- (WebCore::FrameLoader::loadURLIntoChildFrame):
- (WebCore::FrameLoader::startRedirectionTimer):
- * loader/appcache/ApplicationCache.cpp:
- (WebCore::ApplicationCache::resourceForURL):
- * loader/appcache/ApplicationCacheGroup.cpp:
- (WebCore::ApplicationCacheGroup::startLoadingEntry):
- (WebCore::ApplicationCacheGroup::addEntry):
- * loader/appcache/ApplicationCacheStorage.cpp:
- (WebCore::ApplicationCacheStorage::cacheGroupForURL):
- (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
- (WebCore::ApplicationCacheStorage::loadCache):
- (WebCore::ApplicationCacheStorage::manifestURLs):
- * loader/archive/cf/LegacyWebArchive.cpp:
- (WebCore::LegacyWebArchive::createResource):
- (WebCore::LegacyWebArchive::create):
- * loader/loader.cpp:
- (WebCore::Loader::load):
- * notifications/NotificationCenter.h:
- (WebCore::NotificationCenter::createHTMLNotification):
- * platform/KURL.cpp:
- (WebCore::KURL::KURL):
- (WebCore::blankURL):
- * platform/KURLHash.h:
- * platform/chromium/ClipboardChromium.cpp:
- (WebCore::ClipboardChromium::setData):
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::createQTMovie):
- * platform/network/cf/ResourceErrorCF.cpp:
- (WebCore::ResourceError::operator CFErrorRef):
- * platform/network/cf/ResourceRequest.h:
- (WebCore::ResourceRequest::ResourceRequest):
- * platform/network/chromium/ResourceRequest.h:
- (WebCore::ResourceRequest::ResourceRequest):
- * platform/network/curl/ResourceHandleManager.cpp:
- (WebCore::handleLocalReceiveResponse):
- (WebCore::headerCallback):
- * platform/network/curl/ResourceRequest.h:
- (WebCore::ResourceRequest::ResourceRequest):
- * platform/network/mac/ResourceErrorMac.mm:
- (WebCore::ResourceError::operator NSError*):
- * platform/network/mac/ResourceRequest.h:
- (WebCore::ResourceRequest::ResourceRequest):
- * platform/network/qt/ResourceRequest.h:
- (WebCore::ResourceRequest::ResourceRequest):
- * platform/network/soup/ResourceRequest.h:
- (WebCore::ResourceRequest::ResourceRequest):
- * platform/win/ClipboardWin.cpp:
- (WebCore::filesystemPathFromUrlOrTitle):
- (WebCore::ClipboardWin::setData):
- * svg/graphics/SVGImage.cpp:
- (WebCore::SVGImage::dataChanged):
- * xml/XSLImportRule.cpp:
- (WebCore::XSLImportRule::loadSheet):
- * xml/XSLTProcessor.cpp:
- (WebCore::docLoaderFunc):
- Adapt to the change everywhere the single argument constructor was used. I did a very
- cursory check of whether these locations were using this constructor properly, and didn't
- notice any obvious mistakes. The new explicit name will hopefully suggest checking this
- better when refactoring any such code.
-
-2009-08-31 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Darin Adler.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=28635 [CSS3
- Backgrounds and Borders] Add support for 2-keyword values for
- background-repeat
-
- This patch allows background-repeat to take two values by making
- background-repeat just like background-position internally. There
- is a little extra legwork for background-repeat because the spec
- indicates that its computed value should be equivalent to how it
- was specified. I keep track of the specified thing by setting the
- implicit flag whenever background-repeat is defined with only one
- value (since internally, we now store this as 2 values.)
-
- Here we can't access the implicit flag, so for backwards-
- compatibility's sake, we always return one value when that makes
- sense.
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::fillRepeatToCSSValue):
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
-
- Here we check for the implicit flag and return one value when it is
- set.
- * css/CSSMutableStyleDeclaration.cpp:
- (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
- (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue):
- (WebCore::CSSMutableStyleDeclaration::cssText):
-
- Add support for CSSPropertyBackgroundRepeatX and
- CSSPropertyBackgroundRepeatY
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue):
- (WebCore::CSSParser::parseFillShorthand):
- (WebCore::CSSParser::parseFillRepeat):
- (WebCore::CSSParser::parseFillProperty):
- * css/CSSParser.h:
-
- Get rid of mappings to RepeatXFill and RepeatYFill since we don't
- need those parts of the EFillRepeat enum anymore.
- * css/CSSPrimitiveValueMappings.h:
- (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
- (WebCore::CSSPrimitiveValue::operator EFillRepeat):
-
- Add CSSPropertyBackgroundRepeatX and CSSPropertyBackgroundRepeatY
- * css/CSSPropertyLonghand.cpp:
- (WebCore::initShorthandMap):
-
- Add background-repeat-x and -y.
- * css/CSSPropertyNames.in:
-
- Break repeat into x and y.
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty):
- (WebCore::CSSStyleSelector::mapFillRepeatX):
- (WebCore::CSSStyleSelector::mapFillRepeatY):
- * css/CSSStyleSelector.h:
-
- There is no more RepeatXFill. Instead, look for
- fillLayer->repeatX() == RepeatFill
- * rendering/RenderBoxModelObject.cpp:
- (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
-
- Break m_repeat into m_repeatX and m_repeatY
- * rendering/style/FillLayer.cpp:
- (WebCore::FillLayer::FillLayer):
- (WebCore::FillLayer::operator=):
- (WebCore::FillLayer::operator==):
- (WebCore::FillLayer::fillUnsetProperties):
- (WebCore::FillLayer::cullEmptyLayers):
- * rendering/style/FillLayer.h:
- (WebCore::FillLayer::repeatX):
- (WebCore::FillLayer::repeatY):
- (WebCore::FillLayer::isRepeatXSet):
- (WebCore::FillLayer::isRepeatYSet):
- (WebCore::FillLayer::setRepeatX):
- (WebCore::FillLayer::setRepeatY):
- (WebCore::FillLayer::clearRepeatX):
- (WebCore::FillLayer::clearRepeatY):
- (WebCore::FillLayer::initialFillRepeatX):
- (WebCore::FillLayer::initialFillRepeatY):
-
- Again, break backgroundRepeat into backgroundRepeatX and
- backgroundRepeatY
- * rendering/style/RenderStyle.h:
- (WebCore::InheritedFlags::backgroundRepeatX):
- (WebCore::InheritedFlags::backgroundRepeatY):
- (WebCore::InheritedFlags::maskRepeatX):
- (WebCore::InheritedFlags::maskRepeatY):
-
- We don't need RepeatXFill or RepeatYFill. Now that we store two
- values, they are represented by Repeat-NoRepeat and NoRepeat-
- Repeat, respectively.
- * rendering/style/RenderStyleConstants.h:
- (WebCore::):
-
-2009-08-31 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Compositing layer size needs to take into account software reflections on children.
- https://bugs.webkit.org/show_bug.cgi?id=28837
-
- When computing the bounds of a composited layer, take software-rendered
- reflections into account.
-
- Test: compositing/reflections/reflection-in-composited.html
-
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::calculateCompositedBounds):
-
-2009-08-31 Mark Mentovai <mark@chromium.org>
-
- Reviewed by Dave Hyatt.
-
- https://bugs.webkit.org/show_bug.cgi?id=28614
-
- Perform a layout prior to checking whether the scrollbar modes are
- off, on, or automatic. The modes may change during layout.
-
- * platform/ScrollView.cpp:
- (WebCore::ScrollView::updateScrollbars):
-
-2009-08-31 Patrick Mueller <Patrick_Mueller@us.ibm.com>
-
- Reviewed by Timothy Hatcher.
-
- Inspector Request Headers Should Show Data Sent With Request
- https://bugs.webkit.org/show_bug.cgi?id=22920
-
- Manual test added - see below.
-
- * English.lproj/localizedStrings.js:
- * inspector/InspectorResource.cpp:
- (WebCore::InspectorResource::updateRequest):
- (WebCore::InspectorResource::createScriptObject):
- (WebCore::InspectorResource::updateScriptObject):
- * inspector/InspectorResource.h:
- * inspector/front-end/Resource.js:
- (WebInspector.Resource):
- * inspector/front-end/ResourceView.js:
- (WebInspector.ResourceView):
- (WebInspector.ResourceView.prototype._refreshURL):
- (WebInspector.ResourceView.prototype._refreshQueryString):
- (WebInspector.ResourceView.prototype._refreshFormData):
- (WebInspector.ResourceView.prototype._refreshRequestPayload):
- (WebInspector.ResourceView.prototype._refreshParms):
- (WebInspector.ResourceView.prototype._toggleURLdecoding):
- (WebInspector.ResourceView.prototype._getHeaderValue):
- (WebInspector.ResourceView.prototype._refreshRequestHeaders):
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.js:
- (WebInspector.addResource):
- (WebInspector.updateResource):
- * manual-tests/inspector/display-form-data.html: Added.
-
-2009-08-31 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: pass call frames into the frontend as a part of
- pausedScript event.
-
- https://bugs.webkit.org/show_bug.cgi?id=28847
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::didPause):
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::pausedScript):
- * inspector/InspectorFrontend.h:
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel.prototype.debuggerPaused):
- * inspector/front-end/inspector.js:
- (WebInspector.pausedScript):
-
-2009-08-31 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Ariya Hidayat.
-
- [Qt] Un-blacklist Silverlight on Mac
-
- Does not seem to crash anymore, probably due to how we now handle
- drawing and event model handshake better.
-
- * plugins/mac/PluginPackageMac.cpp:
- (WebCore::PluginPackage::isPluginBlacklisted):
-
-2009-08-31 Cameron McCormack <cam@mcc.id.au>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=28827
- SVGSVGElement.unsuspendRedraw() shouldn't throw
-
- * svg/SVGSVGElement.cpp:
- (WebCore::SVGSVGElement::unsuspendRedraw):
- * svg/SVGSVGElement.h:
- * svg/SVGSVGElement.idl:
-
-2009-08-31 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Eric Seidel.
+2010-01-31 Yury Semikhatsky <yurys@chromium.org>
- - Change the reutrn type of HTMLInputElement::list so that it
- conforms to the standard.
- - Add HTMLInputElement::dataList()
- https://bugs.webkit.org/show_bug.cgi?id=28769
-
-
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::list):
- (WebCore::HTMLInputElement::dataList):
- (WebCore::HTMLInputElement::selectedOption):
- * html/HTMLInputElement.h:
- * html/HTMLInputElement.idl:
-
-2009-08-31 Kwang Yul Seo <skyul@company100.net>
-
- Reviewed by Eric Seidel.
-
- Remove ASSERT(frame) in ResourceHandle::start (ResourceHandleCurl.cpp)
- https://bugs.webkit.org/show_bug.cgi?id=28802
-
- Remove ASSERT because the frame could be null if the
- ResourceHandle is not associated with any frame, e.g. if we are
- downloading a file.
- If the frame is not null but the page is null this must be an
- attempted load from an onUnload handler, so let's just block it.
-
- * platform/network/curl/ResourceHandleCurl.cpp:
- (WebCore::ResourceHandle::start):
-
-2009-08-31 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- Build fix for platforms which don't enable DOM_STORAGE.
- https://bugs.webkit.org/show_bug.cgi?id=28834
-
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::evaluate):
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::evaluate):
-
-2009-08-29 Adele Peterson <adele@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=28829
- Crash in AccessibilityRenderObject::activeDescendant when trying to set aria-activedescendant to something without a renderer
-
- Test: accessibility/aria-activedescendant-crash.html
-
- * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::activeDescendant): Nil check.
-
-2009-08-28 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- Gtk Build broken for OSX Quartz
- https://bugs.webkit.org/show_bug.cgi?id=28727
-
- Check for XP_UNIX instead of GTK or X11 to ease building of the Gtk
- port in Mac and Unix/Linux.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::PluginView):
- * plugins/PluginView.h:
- * plugins/gtk/PluginViewGtk.cpp:
- (WebCore::PluginView::setNPWindowIfNeeded):
- (WebCore::PluginView::getValueStatic):
- (WebCore::PluginView::getValue):
- (WebCore::PluginView::init):
-
-2009-08-28 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Fix positioning error when a compositing, absolutely-positioned element has an ancestor with opacity.
- https://bugs.webkit.org/show_bug.cgi?id=28754
-
- For absolutely-positioned layers, convertToLayerCoords() jumps to the positioned
- ancestor, since the layer x and y are relative to that ancestor. However, this could
- skip over the ancestorLayer, thus giving the wrong result.
-
- Fix by duplicating the enclosingPositionedAncestor() logic in convertToLayerCoords(),
- and checking for ancestorLayer along the way. If found, compute offset of both to
- the enclosingPositionedAncestor() and subtract.
-
- This also fixes a positioning bug with abs. positioned elements in reflections,
- so there is a new reflection test with a pixel result.
-
- Tests: compositing/geometry/abs-position-inside-opacity.html
- fast/reflections/abs-position-in-reflection.html
-
- * rendering/RenderLayer.cpp:
- (WebCore::isPositionedContainer):
- (WebCore::RenderLayer::enclosingPositionedAncestor):
- (WebCore::RenderLayer::enclosingTransformedAncestor):
- (WebCore::RenderLayer::convertToLayerCoords):
-
-2009-08-28 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Mark Rowe
-
- Wrap WebkitCSSTransformValues in the correct class of DOM wrapper.
- https://bugs.webkit.org/show_bug.cgi?id=27727
-
- When fetching the DOM wrapper for a WebkitCSSTransformValue (which is a kind of
- CSSValueList), we need to ask the value list whether it's a WebkitCSSTransformValue,
- because there is not a unique enum value for WebkitCSSTransformValue.
-
- * bindings/objc/DOMCSS.mm:
- (kitClass):
-
-2009-08-28 Peter Kasting <pkasting@google.com>
-
- Reviewed by Jan Michael Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=28308
- Fix some warnings introduced by r47381.
-
- * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
- (WebCore::convertCMYKToRGBA):
- (WebCore::convertRGBToRGBA):
-
-2009-08-28 Ada Chan <adachan@apple.com>
-
- Reviewed by Adam Roben.
-
- https://bugs.webkit.org/show_bug.cgi?id=21442
- Make sure filesystemPathFromUrlOrTitle() returns a string with length
- <= MAX_PATH - 1.
-
- * platform/win/ClipboardWin.cpp:
- (WebCore::filesystemPathFromUrlOrTitle):
-
-2009-08-28 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Adding Chromium's VFS for Linux and Mac.
-
- https://bugs.webkit.org/show_bug.cgi?id=28750
-
- * WebCore.gypi:
- * platform/chromium/ChromiumBridge.h:
- * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
- (WebCore::SQLiteFileSystem::openDatabase):
- (WebCore::SQLiteFileSystem::deleteDatabaseFile):
- * platform/sql/chromium/SQLiteFileSystemChromiumLinux.cpp: Removed.
- * platform/sql/chromium/SQLiteFileSystemChromiumMac.cpp: Removed.
- * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp: Added.
- * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
-
-2009-08-28 Vitaly Repeshko <vitalyr@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Made bindings use Node::setOnEvent functions for Node descendants
- instead of Node::setAttributeEventListener.
-
- Node::setAttributeEventListener is an internal function and
- doesn't do the forwarding to DOM window that is required for some
- HTML elements.
- https://bugs.webkit.org/show_bug.cgi?id=28709
-
- Tests added in http://trac.webkit.org/changeset/47326 now pass with V8.
-
- * bindings/scripts/CodeGeneratorV8.pm:
- Now generates EventListener accessors for Node descendants instead
- of using custom callbacks.
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getEventListener): Moved from V8NodeCustom.cpp.
- * bindings/v8/V8DOMWrapper.h:
- (WebCore::V8DOMWrapper::convertEventListenerToV8Object): Fixed a bug in
- signature.
- * bindings/v8/V8Utilities.cpp:
- (WebCore::createHiddenDependency):
- (WebCore::removeHiddenDependency):
- Changed signature to accept Handle instead of Local.
- * bindings/v8/V8Utilities.h:
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8NodeCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- Removed custom callbacks for EventListener accessors.
-
-2009-08-28 Ben Murdoch <benm@google.com>
-
- https://bugs.webkit.org/show_bug.cgi?id=28803
-
- Implements V8CustomVoidCallback reporting any exceptions that were thrown from the callback function.
-
- * bindings/v8/custom/V8CustomVoidCallback.cpp:
- (WebCore::invokeCallback): Checks if the callback raised an exception and reports it to WebCore if so.
-
-2009-08-28 Peter Kasting <pkasting@google.com>
-
- Not reviewed (build fix).
-
- * platform/graphics/qt/ImageDecoderQt.cpp: Accidentally added some spaces.
- (WebCore::ImageDecoder::create):
- (WebCore::ImageDecoderQt::ImageDecoderQt):
- * platform/graphics/qt/ImageDecoderQt.h: Make constructor public so factory function can access it (this seemed better than making ImageDecoder a friend).
-
-2009-08-28 Peter Kasting <pkasting@google.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=27965
- Move ImageDecoder creation function to a factory function on
- ImageDecoder. This is arguably where it makes the most sense anyway,
- and it will (soon) allow ImageSourceQt.cpp to have one less dedicated
- function.
-
- * platform/graphics/ImageSource.cpp:
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoder::create):
- * platform/graphics/qt/ImageDecoderQt.h:
- * platform/graphics/qt/ImageSourceQt.cpp:
- (WebCore::ImageSource::setData):
- * platform/image-decoders/ImageDecoder.cpp:
- * platform/image-decoders/ImageDecoder.h:
-
-2009-08-28 Peter Kasting <pkasting@google.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=28785
- Combine duplicated code from ImageDecoder*.cpp into the main
- ImageDecoder.cpp.
-
- * platform/image-decoders/ImageDecoder.cpp:
- (WebCore::RGBA32Buffer::RGBA32Buffer):
- (WebCore::RGBA32Buffer::clear):
- (WebCore::RGBA32Buffer::zeroFill):
- (WebCore::RGBA32Buffer::copyBitmapData):
- (WebCore::RGBA32Buffer::setSize):
- (WebCore::RGBA32Buffer::hasAlpha):
- (WebCore::RGBA32Buffer::setHasAlpha):
- (WebCore::RGBA32Buffer::setStatus):
- (WebCore::RGBA32Buffer::operator=):
- (WebCore::RGBA32Buffer::width):
- (WebCore::RGBA32Buffer::height):
- * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
- * platform/image-decoders/haiku/ImageDecoderHaiku.cpp:
- * platform/image-decoders/wx/ImageDecoderWx.cpp:
-
-2009-08-28 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Reviewed by Holger Freyther.
-
- https://bugs.webkit.org/show_bug.cgi?id=25889
- [GTK] scrollbar policy for main frame is not implementable
-
- Override setScrollbarModes to correctly forward scrollbar modes
- policy changes to client code, via a new platform-specific method,
- scrollbarsPolicyDidChange.
-
- * page/ChromeClient.h:
- (WebCore::ChromeClient::scrollbarsPolicyDidChange):
- * platform/ScrollView.cpp:
- (WebCore::ScrollView::createScrollbar):
- * platform/ScrollView.h:
- * platform/gtk/ScrollViewGtk.cpp:
- (WebCore::ScrollView::setScrollbarModes):
-
-2009-08-28 Cédric Luthi <cedric.luthi@gmail.com>
-
- Reviewed by Tor Arne Vestbø
-
- [Qt/Mac] Un-blacklist the QuickTime plugin
-
- https://bugs.webkit.org/show_bug.cgi?id=28768
-
- Now that the drawing model is properly negotiated, there is no need the
- blacklist the QuickTime plugin anymore.
-
- This revealed a bug in PluginView::performRequest: it should not initiate a
- request if the plugin has been stopped, which is what happens when a plugin
- only supports the QuickDraw drawing model.
-
- * plugins/PluginView.cpp:
- * plugins/mac/PluginPackageMac.cpp:
-
-2009-08-28 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Set DOM agent document to 0 in InspectorController::close to
- make DOM agent remove DOM listeners from the inspected document.
-
- Replace windowVisible checks with m_frontend checks to as inspector
- window lives in a different process in Chromium while frontend proxy
- is in the inspected page process.
-
- https://bugs.webkit.org/show_bug.cgi?id=28800
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::inspect):
- (WebCore::InspectorController::addConsoleMessage):
- (WebCore::InspectorController::close):
- (WebCore::InspectorController::pruneResources):
- (WebCore::InspectorController::didCommitLoad):
- (WebCore::InspectorController::didLoadResourceFromMemoryCache):
- (WebCore::InspectorController::identifierForInitialRequest):
- (WebCore::InspectorController::willSendRequest):
- (WebCore::InspectorController::didReceiveResponse):
- (WebCore::InspectorController::didReceiveContentLength):
- (WebCore::InspectorController::didFinishLoading):
- (WebCore::InspectorController::didFailLoading):
- (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
- (WebCore::InspectorController::scriptImported):
- (WebCore::InspectorController::didOpenDatabase):
- (WebCore::InspectorController::didUseDOMStorage):
- (WebCore::InspectorController::addProfile):
- * inspector/InspectorController.h:
-
-2009-08-28 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Remove dependency of SummaryBar on WebInspector.resourceCategories.
-
- https://bugs.webkit.org/show_bug.cgi?id=28801
-
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel):
- (WebInspector.ResourcesPanel.prototype.toolbarItemClass.get categories):
- * inspector/front-end/SummaryBar.js:
- (WebInspector.SummaryBar):
- (WebInspector.SummaryBar.prototype.update):
-
-2009-08-28 Pavel Feldman <pfeldman@chromium.org>
-
- Not reviewed (patching in l18n change that was missing due to
- the git binary diff format).
-
- https://bugs.webkit.org/show_bug.cgi?id=28429
-
- * English.lproj/localizedStrings.js:
-
-2009-08-28 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Make XSSAuditor go fast
- https://bugs.webkit.org/show_bug.cgi?id=28667
-
- Make the XSSAuditor go faster by implementing two optimizations:
-
- 1) We avoid canonicalizing scripts that are larger than the page's URL.
- This saves a bunch of time for large inline scripts.
-
- 2) We memoize canonicalizing the page's URL because it's silly to
- canonicalize repeated for each inline event listener.
-
- These optimizations have a measurable affect on the intl1 page cycler.
-
- No behavior change.
-
- * page/XSSAuditor.cpp:
- (WebCore::XSSAuditor::MemoizingURLCanonicalizer::canonicalizeURL):
- (WebCore::XSSAuditor::canEvaluate):
- (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
- (WebCore::XSSAuditor::canCreateInlineEventListener):
- (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
- (WebCore::XSSAuditor::canLoadObject):
- (WebCore::XSSAuditor::canSetBaseElementURL):
- (WebCore::XSSAuditor::decodeURL):
- (WebCore::XSSAuditor::findInRequest):
- * page/XSSAuditor.h:
-
-2009-08-27 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- Removed ASSERT_NOT_REACHED, because indeed this ASSERT is reached in
- fast/canvas/change-context.html. And it's alright to reach it.
-
- * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL): Removed assertion.
-
-2009-08-27 Jeremy Orlow <jorlow@chromium.org>
-
- Not reviewed. Build fix for http://trac.webkit.org/changeset/47840
-
- Peter's change forgot one m_decoder->
-
- * platform/graphics/ImageSource.cpp:
- (WebCore::ImageSource::frameSizeAtIndex):
-
-2009-08-27 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- [V8] Add NULL-check, since the context ain't changeable no more, and
- thus getContext could return 0.
-
- * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL): Added NULL-check.
-
-2009-08-27 Noel Gordon <noel.gordon@gmail.com>
-
- Reviewed by Eric Seidel.
-
- dataTransfer.types() should include type "Files" when files are present in the clipboard.
- https://bugs.webkit.org/show_bug.cgi?id=28780
-
- Add dataTransfer type "Files" to the chromium port. Add eseidel's
- patch for same for the mac port.
-
- * platform/chromium/ClipboardChromium.cpp:
-
-2009-08-27 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser.
-
- Removed GL_ from all constants, and gl prefix from all calls
- https://bugs.webkit.org/show_bug.cgi?id=28773
-
- This was done for the external API in CanvasRenderingContext3D and
- the internal API in GraphicsContext3D.
-
- * html/canvas/CanvasRenderingContext3D.cpp:
- * html/canvas/CanvasRenderingContext3D.h:
- * bindings/js/JSCanvasRenderingContext3DCustom.cpp:
- * html/canvas/CanvasRenderingContext3D.idl:
- * platform/graphics/GraphicsContext3D.h:
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
-
-2009-08-27 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Qt and Gtk build fixes. Not reviewed.
-
- Add CanvasRenderingContext3D.idl to the build scripts.
-
- * GNUmakefile.am:
- * WebCore.pro:
-
-2009-08-27 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Release the storage mutex whenever leaving JavaScript execution.
- https://bugs.webkit.org/show_bug.cgi?id=28789
-
- http://dev.w3.org/html5/spec/Overview.html#storage-mutex describes the
- required behavior. After we leave JavaScript, we must be sure the storage
- mutex has been released. At the end of evaluate(), if localStorage has been
- instantiated, tell it to release any locks that may be applicable.
-
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::evaluate):
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::evaluate):
-
-2009-08-27 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Oliver Hunt.
-
- https://bugs.webkit.org/show_bug.cgi?id=28753
- <rdar://problem/7173448> Excessive number of threads (and a crash)
-
- Coalesce DNS prefetch requests to reduce strain on CFHost. Currently, the algorithm is as follows:
- - when resolver is idle, the first few requests are sent immediately (they may or may not
- hit the wire);
- - if there are a few requests in flight already, coalesce all requests for one second;
- - to avoid pathological cases with lots of links to different sites on a page, only ask
- CFHost about a handful of names (dropping the rest).
-
- Coalescing reduces the number of requests dramatically, as prefetchDNS is called for each
- link, and these tend to have identical host name.
-
- * platform/network/cf/DNSCFNet.cpp:
- (WebCore::DNSResolveQueue::DNSResolveQueue):
- (WebCore::DNSResolveQueue::shared):
- (WebCore::DNSResolveQueue::add):
- (WebCore::DNSResolveQueue::decrementRequestCount):
- (WebCore::DNSResolveQueue::fired):
- (WebCore::clientCallback):
- (WebCore::DNSResolveQueue::resolve):
- (WebCore::prefetchDNS):
-
-2009-08-27 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser.
-
- Final patch for Canvas 3D support
- https://bugs.webkit.org/show_bug.cgi?id=28018
-
- This hooks everything up and provides a working implementation of
- Canvas 3D. I plumb the creation of the 3D canvas down to GraphicsLayer,
- passing the opaque context and texture pointers so a Canvas3DLayer can be
- created (more on that later). It also plumbs changes to the 3D canvas so
- that Canvas3DLayer can recomposite the results.
-
- A 3D Canvas element needs a RenderLayer and compositing layer to render.
- This is because it renders to an off-screen texture in the GPU and then
- hands it to a Canvas3DLayer, which is a subclass of CAOpenGLLayer, to
- render that texture as a 3D quad. This keeps everything in GPU memory to
- maximize performance. When a CanvasRenderingContext3D is created it
- forces a style recalc which creates the RenderLayer and compositing
- layer if needed.
-
- I repurposed an existing flag which was put in place for animation to accomplish
- this. This flag is passed to setNeedsStyleRecalc(), and I renamed it from
- AnimationStyleChange to SyntheticStyleChange. It essentially says that you need
- to do a complete style recalc, even though the style itself has not really
- changed.
-
- This patch also fixes a couple of bugs discovered when testing with 3d-canvas
- turned on. I also added a constructor DOMWindow.idl for CanvasRenderingContext3D.
- This is needed when making a JS wrapper for the object so the prototype
- property can be set.
-
- Test: fast/canvas/change-context.html
-
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSCanvasRenderingContext3DCustom.cpp:
- (WebCore::JSCanvasRenderingContext3D::glDrawElements):
- * bindings/js/JSCanvasRenderingContextCustom.cpp:
- (WebCore::toJS):
- * dom/Element.cpp:
- (WebCore::Element::recalcStyle):
- * dom/Node.cpp:
- (WebCore::Node::setNeedsStyleRecalc):
- * dom/Node.h:
- (WebCore::):
- * html/HTMLCanvasElement.cpp:
- (WebCore::HTMLCanvasElement::getContext):
- (WebCore::HTMLCanvasElement::is3D):
- * html/HTMLCanvasElement.h:
- * html/canvas/CanvasBuffer.cpp:
- (WebCore::CanvasBuffer::create):
- (WebCore::CanvasBuffer::CanvasBuffer):
- (WebCore::CanvasBuffer::_deleteObject):
- * html/canvas/CanvasBuffer.h:
- * html/canvas/CanvasFramebuffer.cpp:
- (WebCore::CanvasFramebuffer::create):
- (WebCore::CanvasFramebuffer::CanvasFramebuffer):
- (WebCore::CanvasFramebuffer::_deleteObject):
- * html/canvas/CanvasFramebuffer.h:
- * html/canvas/CanvasObject.cpp:
- (WebCore::CanvasObject::CanvasObject):
- (WebCore::CanvasObject::~CanvasObject):
- (WebCore::CanvasObject::deleteObject):
- * html/canvas/CanvasObject.h:
- (WebCore::CanvasObject::context):
- * html/canvas/CanvasProgram.cpp:
- (WebCore::CanvasProgram::create):
- (WebCore::CanvasProgram::CanvasProgram):
- (WebCore::CanvasProgram::_deleteObject):
- * html/canvas/CanvasProgram.h:
- * html/canvas/CanvasRenderbuffer.cpp:
- (WebCore::CanvasRenderbuffer::create):
- (WebCore::CanvasRenderbuffer::CanvasRenderbuffer):
- (WebCore::CanvasRenderbuffer::_deleteObject):
- * html/canvas/CanvasRenderbuffer.h:
- * html/canvas/CanvasRenderingContext3D.cpp:
- (WebCore::CanvasRenderingContext3D::createBuffer):
- (WebCore::CanvasRenderingContext3D::createFramebuffer):
- (WebCore::CanvasRenderingContext3D::createTexture):
- (WebCore::CanvasRenderingContext3D::createProgram):
- (WebCore::CanvasRenderingContext3D::createRenderbuffer):
- (WebCore::CanvasRenderingContext3D::createShader):
- * html/canvas/CanvasRenderingContext3D.h:
- (WebCore::CanvasRenderingContext3D::graphicsContext3D):
- * html/canvas/CanvasShader.cpp:
- (WebCore::CanvasShader::create):
- (WebCore::CanvasShader::CanvasShader):
- (WebCore::CanvasShader::_deleteObject):
- * html/canvas/CanvasShader.h:
- * html/canvas/CanvasTexture.cpp:
- (WebCore::CanvasTexture::create):
- (WebCore::CanvasTexture::CanvasTexture):
- (WebCore::CanvasTexture::_deleteObject):
- * html/canvas/CanvasTexture.h:
- * page/DOMWindow.idl:
- * page/animation/AnimationBase.cpp:
- (WebCore::AnimationBase::setNeedsStyleRecalc):
- * page/animation/AnimationController.cpp:
- (WebCore::AnimationControllerPrivate::updateAnimationTimer):
- (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
- (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
- (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
- (WebCore::AnimationController::cancelAnimations):
- * platform/graphics/GraphicsContext3D.h:
- (WebCore::GraphicsContext3D::platformGraphicsContext3D):
- (WebCore::GraphicsContext3D::platformTexture):
- * platform/graphics/GraphicsLayer.h:
- (WebCore::GraphicsLayer::setContentsToGraphicsContext3D):
- (WebCore::GraphicsLayer::setGraphicsContext3DNeedsDisplay):
- * platform/graphics/mac/GraphicsContext3DMac.cpp:
- (WebCore::GraphicsContext3D::~GraphicsContext3D):
- (WebCore::GraphicsContext3D::reshape):
- * platform/graphics/mac/GraphicsLayerCA.h:
- (WebCore::GraphicsLayerCA::):
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayerCA::GraphicsLayerCA):
- (WebCore::GraphicsLayerCA::commitLayerChanges):
- (WebCore::GraphicsLayerCA::updateContentsGraphicsContext3D):
- (WebCore::GraphicsLayerCA::setContentsToGraphicsContext3D):
- (WebCore::GraphicsLayerCA::setGraphicsContext3DNeedsDisplay):
- * rendering/RenderHTMLCanvas.cpp:
- (WebCore::RenderHTMLCanvas::requiresLayer):
- * rendering/RenderHTMLCanvas.h:
- (WebCore::RenderHTMLCanvas::isCanvas):
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
- (WebCore::RenderLayerBacking::canUseDirectCompositing):
- (WebCore::RenderLayerBacking::rendererContentChanged):
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::requiresCompositingLayer):
- (WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
- * rendering/RenderLayerCompositor.h:
- * rendering/RenderObject.h:
- (WebCore::RenderObject::isCanvas):
-
-2009-08-27 Peter Kasting <pkasting@google.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=28751
- Clean up ImageDecoder*.cpp a bit.
-
- * platform/image-decoders/ImageDecoder.cpp: Put functions in the same
- order as in the header file. Also, since there's already an anonymous
- namespace in this file, use it to enclose the local helper functions.
- (WebCore::):
- (WebCore::ImageDecoder::upperBoundScaledX):
- (WebCore::ImageDecoder::lowerBoundScaledX):
- (WebCore::ImageDecoder::scaledY):
- * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
- (WebCore::RGBA32Buffer::width): Style fix.
- (WebCore::RGBA32Buffer::height): Style fix.
- * platform/image-decoders/haiku/ImageDecoderHaiku.cpp:
- (WebCore::RGBA32Buffer::copyBitmapData): Ensure m_size is set correctly.
- (WebCore::RGBA32Buffer::asNewNativeImage): Remove unneeded temp.
- (WebCore::RGBA32Buffer::operator=): Simplify.
- * platform/image-decoders/wx/ImageDecoderWx.cpp:
- (WebCore::RGBA32Buffer::asNewNativeImage): Try and collect spaced-out temps under loop comment to show they're all related. Use size_t for iterating over elements of a Vector.
- (WebCore::RGBA32Buffer::width): Style fix.
- (WebCore::RGBA32Buffer::height): Style fix.
-
-2009-08-27 Peter Kasting <pkasting@google.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=28751
- Clean up ImageSource.* in preparation for more fixes on bug 27965.
-
- * platform/graphics/ImageSource.cpp: Put functions in the same order as in header file.
- (WebCore::ImageSource::isSizeAvailable): Shorten.
- (WebCore::ImageSource::size): Shorten.
- (WebCore::ImageSource::frameSizeAtIndex): Shorten.
- (WebCore::ImageSource::repetitionCount): Shorten.
- (WebCore::ImageSource::frameIsCompleteAtIndex):
- * platform/graphics/ImageSource.h: Shorten #ifdef section a bit by sharing common typedefs.
-
-2009-08-27 Peter Kasting <pkasting@google.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=28785
- Add ImageDecoder.cpp to various build files so platforms will be able to
- use it. Move an ENABLE to not cover the whole file, in preparation for
- adding a bunch of code. Simplify #ifdefs in ImageDecoder.h to be "Skia
- vs. everyone else", which also gives new platforms a reasonable default
- behavior.
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCoreSources.bkl:
- * platform/image-decoders/ImageDecoder.cpp:
- (WebCore::):
- * platform/image-decoders/ImageDecoder.h:
- (WebCore::RGBA32Buffer::getAddr):
-
-2009-08-27 Antti Koivisto <antti@apple.com>
-
- Reviewed by Dave Kilzer.
-
- https://bugs.webkit.org/show_bug.cgi?id=28784
-
- Add an exported method to flush pending repaints.
-
- * WebCore.base.exp:
- * page/FrameView.cpp:
- (WebCore::FrameView::layoutIfNeededRecursive):
- (WebCore::FrameView::flushDeferredRepaints):
- * page/FrameView.h:
-
-2009-08-27 Noel Gordon <noel.gordon@gmail.com>
-
- Reviewed by Eric Seidel.
-
- [V8] Expose files from the pasteboard in drop events.
- https://bugs.webkit.org/show_bug.cgi?id=28782
-
- Update chromium port to expose dataTransfer.files() as per
- HTML5 drag drop (Aug 2009 edition).
-
- * platform/chromium/ClipboardChromium.cpp:
-
-2009-08-27 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Dmitry Glazkov.
+ Reviewed by Pavel Feldman.
- ScriptState now keeps explicit Handle of devtools front-end
- utility context instead of trying to retrieve it from inspected
- Frame.
+ Make ScriptState destructor protected since all non-empty
+ ScriptStates are managed by GC. Remove obsolete constructor.
- https://bugs.webkit.org/show_bug.cgi?id=28772
+ https://bugs.webkit.org/show_bug.cgi?id=34266
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::ScriptController):
- * bindings/v8/ScriptController.h:
- * bindings/v8/ScriptObjectQuarantine.cpp:
- (WebCore::getQuarantinedScriptObject):
- * bindings/v8/ScriptScope.cpp:
- (WebCore::ScriptScope::ScriptScope):
* bindings/v8/ScriptState.cpp:
- (WebCore::ScriptState::ScriptState):
- (WebCore::ScriptState::~ScriptState):
- (WebCore::scriptStateFromPage):
* bindings/v8/ScriptState.h:
- (WebCore::ScriptState::context):
- * bindings/v8/ScriptValue.h:
- (WebCore::ScriptValue::~ScriptValue):
- * inspector/InspectorController.h:
- (WebCore::InspectorController::frontendScriptState):
-
-2009-08-27 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Console won't close.
-
- https://bugs.webkit.org/show_bug.cgi?id=28778
-
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.prototype._updateModifiedNodes):
- * inspector/front-end/utilities.js:
- (Node.prototype.isAncestor):
-
-2009-08-27 Eric Seidel <eric@webkit.org>
-
- Reviewed by Adam Barth.
-
- Fix a typo in files() causing image drags to have junk file arrays.
- https://bugs.webkit.org/show_bug.cgi?id=28755
-
- Test: editing/pasteboard/files-during-page-drags.html
-
- * platform/mac/ClipboardMac.mm:
- (WebCore::ClipboardMac::files):
-
-2009-08-27 Jeremy Orlow <jorlow@chromium.org>
-
- Not reviewed. Build fix for Chromium.
-
- * bindings/v8/DOMObjectsInclude.h:
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
-
-2009-08-27 Alexey Proskuryakov <ap@apple.com>
-
- Windows build fix.
-
- * DerivedSources.cpp: Added JSPageTransitionEvent.cpp to DerivedSources.cpp.
-
-2009-08-26 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Adele Peterson.
-
- https://bugs.webkit.org/show_bug.cgi?id=28758
- <rdar://problem/6440869> Implement pageshow and pagehide events for b/f cache (28758)
-
- Tests: fast/events/pageshow-pagehide-on-back-cached.html
- fast/events/pageshow-pagehide-on-back-uncached.html
- fast/events/pageshow-pagehide.html
-
- * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): Dispatch pagehide event
- (this function is called both when a document goes away, and when it goes to b/f cache).
-
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Dispatch pagehide right before unload.
- (WebCore::DOMWindow::dispatchPageTransitionEvent): Do what it takes to add a new event handler
- that can be installed on Window object.
- (WebCore::DOMWindow::onpagehide): Ditto.
- (WebCore::DOMWindow::setOnpagehide): Ditto.
- (WebCore::DOMWindow::onpageshow): Ditto.
- (WebCore::DOMWindow::setOnpageshow): Ditto.
-
- * history/CachedFrame.cpp: (WebCore::CachedFrame::restore): Dispatch pageshow for a page
- that isn't being restored from cache.
-
- * dom/PageTransitionEvent.cpp: Added.
- (WebCore::PageTransitionEvent::PageTransitionEvent):
- (WebCore::PageTransitionEvent::~PageTransitionEvent):
- (WebCore::PageTransitionEvent::initPageTransitionEvent):
- * dom/PageTransitionEvent.h: Added.
- (WebCore::PageTransitionEvent::create):
- (WebCore::PageTransitionEvent::isPageTransitionEvent):
- (WebCore::PageTransitionEvent::persisted):
- * dom/PageTransitionEvent.idl: Added.
- Add event class implementation.
-
- * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): Support
- inline listener definition (note that adding listeners to document.body programmatically
- is not supported, matching Firefox).
-
- * dom/Document.cpp:
- (WebCore::Document::implicitClose): Dispatch pageshow event right before load event.
- (WebCore::Document::dispatchPageTransitionEvent): Do what it takes to add a new event for
- Docuemnt.
- (WebCore::Document::createEvent): Ditto.
-
- * dom/Document.h: Added dispatchPageTransitionEvent.
-
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * bindings/js/JSEventCustom.cpp: (WebCore::toJS):
- * dom/Event.cpp: (WebCore::Event::isPageTransitionEvent):
- * dom/Event.h:
- * dom/EventNames.h:
- * html/HTMLAttributeNames.in:
- * page/DOMWindow.h:
- * page/DOMWindow.idl:
- Do what it takes to add a new event type.
-
-2009-08-27 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by NOBODY (build fix).
-
- Adding missing file from previous commit.
-
- https://bugs.webkit.org/show_bug.cgi?id=28740
-
- * inspector/front-end/SummaryBar.js: Added.
- (WebInspector.SummaryBar):
- (WebInspector.SummaryBar.prototype.get calculator):
- (WebInspector.SummaryBar.prototype.set calculator):
- (WebInspector.SummaryBar.prototype.reset):
- (WebInspector.SummaryBar.prototype.update):
- (WebInspector.SummaryBar.prototype._drawSwatch.drawSwatchSquare):
- (WebInspector.SummaryBar.prototype._drawSwatch):
- (WebInspector.SummaryBar.prototype._drawSummaryGraph.var):
- (WebInspector.SummaryBar.prototype._drawSummaryGraph):
- (WebInspector.SummaryBar.prototype._drawSummaryGraph.drawPill):
- (WebInspector.SummaryBar.prototype._fadeOutRect):
- (WebInspector.SummaryBar.prototype._makeLegendElement):
-
-2009-08-27 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Factor out Factor out summary bar from Resources panel.
-
- https://bugs.webkit.org/show_bug.cgi?id=28740
-
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel.prototype.reset):
- (WebInspector.ResourcesPanel.prototype._updateSummaryGraph):
- (WebInspector.ResourcesPanel.prototype._updateDividersLabelBarPosition):
- (WebInspector.ResourcesPanel.prototype._changeSortingFunction):
- * inspector/front-end/SummaryBar.js: Added.
- (WebInspector.SummaryBar):
- (WebInspector.SummaryBar.prototype.get calculator):
- (WebInspector.SummaryBar.prototype.set calculator):
- (WebInspector.SummaryBar.prototype.reset):
- (WebInspector.SummaryBar.prototype.update):
- (WebInspector.SummaryBar.prototype._drawSwatch.drawSwatchSquare):
- (WebInspector.SummaryBar.prototype._drawSwatch):
- (WebInspector.SummaryBar.prototype._drawSummaryGraph.var):
- (WebInspector.SummaryBar.prototype._drawSummaryGraph):
- (WebInspector.SummaryBar.prototype._drawSummaryGraph.drawPill):
- (WebInspector.SummaryBar.prototype._fadeOutRect):
- (WebInspector.SummaryBar.prototype._makeLegendElement):
- * inspector/front-end/WebKit.qrc:
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.html:
-
-2009-08-26 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Start adding heap profiler to Inspector (hidden behind a flag.)
-
- https://bugs.webkit.org/show_bug.cgi?id=28429
-
- * English.lproj/localizedStrings.js:
- * inspector/front-end/ProfilesPanel.js:
- (WebInspector.ProfilesPanel):
- (WebInspector.ProfilesPanel.prototype.get statusBarItems):
- (WebInspector.ProfilesPanel.prototype.reset):
- (WebInspector.ProfilesPanel.prototype.addProfile):
- (WebInspector.ProfilesPanel.prototype._updateInterface):
- (WebInspector.ProfilesPanel.prototype._snapshotClicked):
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.js: added Preferences.heapProfilerPresent flag.
-
-2009-08-27 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Metrics sidebar editing is broken.
-
- https://bugs.webkit.org/show_bug.cgi?id=28434
-
- * inspector/front-end/MetricsSidebarPane.js:
- (WebInspector.MetricsSidebarPane.prototype.update):
-
-2009-08-27 Darin Fisher <darin@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- https://bugs.webkit.org/show_bug.cgi?id=28767
-
- Make KURLGoogle.cpp's decodeURLEscapeSequences decode %00 to match
- KURL.cpp. This makes the XSSAuditor tests pass when using KURLGoogle.
-
- * platform/KURLGoogle.cpp:
- (WebCore::decodeURLEscapeSequences):
-
-2009-08-27 Ariya Hidayat <ariya.hidayat@nokia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- [Qt] Build fix, missing functions after r47763.
-
- * platform/qt/Localizations.cpp:
- (WebCore::localizedMediaControlElementString):
- (WebCore::localizedMediaControlElementHelpText):
- (WebCore::localizedMediaTimeDescription):
-
-2009-08-26 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Adam Barth.
-
- Removing trailing whitespaces from all storage classes.
-
- https://bugs.webkit.org/show_bug.cgi?id=28075
-
- * storage/ChangeVersionWrapper.cpp:
- * storage/Database.cpp:
- * storage/Database.h:
- * storage/DatabaseDetails.h:
- * storage/DatabaseThread.cpp:
- * storage/DatabaseTracker.cpp:
- * storage/DatabaseTracker.h:
- * storage/LocalStorageTask.cpp:
- * storage/LocalStorageTask.h:
- * storage/LocalStorageThread.cpp:
- * storage/LocalStorageThread.h:
- * storage/OriginQuotaManager.cpp:
- * storage/OriginUsageRecord.cpp:
- * storage/OriginUsageRecord.h:
- * storage/SQLError.h:
- * storage/SQLResultSetRowList.h:
- * storage/SQLStatement.cpp:
- * storage/SQLStatement.h:
- * storage/SQLStatementCallback.h:
- * storage/SQLStatementErrorCallback.h:
- * storage/SQLTransaction.cpp:
- * storage/SQLTransaction.h:
- * storage/SQLTransactionCallback.h:
- * storage/SQLTransactionErrorCallback.h:
- * storage/Storage.cpp:
- * storage/Storage.h:
- * storage/StorageArea.h:
- * storage/StorageAreaImpl.cpp:
- * storage/StorageAreaImpl.h:
- * storage/StorageAreaSync.cpp:
- * storage/StorageAreaSync.h:
- * storage/StorageEvent.cpp:
- * storage/StorageEvent.h:
- * storage/StorageMap.cpp:
- * storage/StorageMap.h:
- * storage/StorageNamespaceImpl.cpp:
- * storage/StorageSyncManager.cpp:
- * storage/StorageSyncManager.h:
-
-2009-08-26 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Anders Carlsson.
-
- https://bugs.webkit.org/show_bug.cgi?id=28763, flickering when opacity changes.
-
- Make opacity changes from < 1 to 1 and from 1 to < 1 cause a relayout to happen. We need
- to do this in order for overflow information to be properly recomputed.
-
- * rendering/style/RenderStyle.cpp:
- (WebCore::RenderStyle::diff):
-
-2009-08-26 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- HTMLMediaElement sometimes loses events
- https://bugs.webkit.org/show_bug.cgi?id=28762
- <rdar://problem/7172437>
-
- A media element triggers the resource selection algorithm if 
- play() is called when the networkState attribute is NETWORK_EMPTY, but
- it also immediately queues 'play' and either 'waiting' or 'playing' events.
- One of the steps in preparing to load is to flush pending events, so those 
- events were lost if the load timer fired quickly enough. Fixed by deleting
- pending events before scheduling the load timer.
-
- Test: media/audio-play-event.html
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::scheduleLoad):
- Do nothing if the load timer is already scheduled. Call prepareForLoad so queue of
- pending events is flushed immediately.
- (WebCore::HTMLMediaElement::scheduleNextSourceChild):
- New, start the load timer without flushing pending events.
- (WebCore::HTMLMediaElement::load):
- Call prepareForLoad();
- (WebCore::HTMLMediaElement::prepareForLoad):
- New, load setup code moved from loadInternal.
- (WebCore::HTMLMediaElement::loadInternal):
- Moved some setup code to prepareForLoad so it can be invoked immediately before
- arming the load timer.
- (WebCore::HTMLMediaElement::setNetworkState):
- Call scheduleNextSourceChild instead of scheduleLoad as the later now clears
- pending events.
- * html/HTMLMediaElement.h:
- Declare scheduleNextSourceChild.
-
-2009-08-26 Peter Kasting <pkasting@google.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=28751
- Switch ICO decoder from a Vector of raw pointers to a Vector of
- OwnPtrs now that that is possible. Makes code slightly simpler.
-
- * platform/image-decoders/ico/ICOImageDecoder.cpp:
- (WebCore::ICOImageDecoder::decodeAtIndex):
- (WebCore::ICOImageDecoder::processDirectory):
- * platform/image-decoders/ico/ICOImageDecoder.h:
-
-2009-08-26 Dave Hyatt <hyatt@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=28718, image inside relpositioned inline doesn't paint.
- Make sure vertical overflow is still computed across self-painting layers, even though it isn't
- propagated to parents.
-
- Added fast/repaint/rel-positioned-inline-with-overflow.html
-
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::computeVerticalOverflow):
-
-2009-08-26 David Levin <levin@chromium.org>
-
- Reviewed by Darin Fisher.
-
- ResourceRequestBase::*[Aa]llowHTTPCookies shouldn't mention http.
- https://bugs.webkit.org/show_bug.cgi?id=28735
-
- Renaming the method to imply its wider implications of affecting cookies
- over any protocol that supports them.
-
- No change in functionality so no new tests.
-
- * WebCore.order:
- * loader/DocumentThreadableLoader.cpp:
- (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
- (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
- (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
- * platform/network/ResourceRequestBase.cpp:
- (WebCore::ResourceRequestBase::adopt):
- (WebCore::ResourceRequestBase::copyData):
- (WebCore::ResourceRequestBase::allowCookies):
- (WebCore::ResourceRequestBase::setAllowCookies):
- (WebCore::equalIgnoringHeaderFields):
- * platform/network/ResourceRequestBase.h:
- (WebCore::ResourceRequestBase::ResourceRequestBase):
- * platform/network/cf/ResourceRequestCFNet.cpp:
- (WebCore::ResourceRequest::doUpdatePlatformRequest):
- (WebCore::ResourceRequest::doUpdateResourceRequest):
- * platform/network/mac/ResourceRequestMac.mm:
- (WebCore::ResourceRequest::doUpdateResourceRequest):
- (WebCore::ResourceRequest::doUpdatePlatformRequest):
- * platform/network/soup/ResourceRequestSoup.cpp:
- (WebCore::ResourceRequest::updateFromSoupMessage):
-
-2009-08-26 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Dave Hyatt.
-
- Made RenderInline::clippedOverflowRectForRepaint() actually include
- overflow.
-
- Test: fast/repaint/inline-overflow.html
-
- * rendering/RenderInline.cpp:
- (WebCore::RenderInline::linesVisibleOverflowBoundingBox): Added. Returns
- the bounding box of all lines’ visible overflow boxes (under the
- assumption that the first and last lines determine the top and
- bottom, respectively).
- (WebCore::RenderInline::clippedOverflowRectForRepaint): Changed to use
- linesVisibleOverflowBoundingBox() instead of linesBoundingBox().
- * rendering/RenderInline.h:
-
-2009-08-26 John Gregg <johnnyg@google.com>
-
- Reviewed by David Levin.
-
- minor style correction and include fix for notifications
- https://bugs.webkit.org/show_bug.cgi?id=28745
-
- No change in behavior, so no tests.
-
- * bindings/js/JSDesktopNotificationsCustom.cpp: add include of Error.h
- * notifications/Notification.cpp: change enum style to InterCaps
- (WebCore::Notification::Notification):
- * notifications/NotificationPresenter.h:
- (WebCore::NotificationPresenter::):
-
-2009-08-25 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- postMessage() spec now supports sending arrays of ports
- https://bugs.webkit.org/show_bug.cgi?id=26902
-
- Added support for sending multiple ports at once via postMessage(). JS bindings will be updated in an upcoming patch.
-
- No new tests, since the new functionality is not exposed via new JS bindings yet, so the old tests suffice.
-
- * WebCore.xcodeproj/project.pbxproj:
- Mark MessagePort.h and MessagePortChannel.h as private since they are used by WebKit now.
- * dom/MessageEvent.cpp:
- Updated APIs to support passing MessagePortArrays.
- (WebCore::MessageEvent::MessageEvent):
- (WebCore::MessageEvent::initMessageEvent):
- (WebCore::MessageEvent::messagePort):
- * dom/MessageEvent.h:
- (WebCore::MessageEvent::create):
- Now accepts a MessagePortArray parameter instead of a single MessagePort.
- (WebCore::MessageEvent::ports):
- * dom/MessagePort.cpp:
- (WebCore::MessagePort::postMessage):
- (WebCore::MessagePort::dispatchMessages):
- (WebCore::MessagePort::disentanglePorts):
- Added new static function to extract a MessagePortChannelArray from a MessagePortArray.
- (WebCore::MessagePort::entanglePorts):
- Added new static function to generate a MessagePortArray (entangled ports) from a MessagePortChannelArray.
- * dom/MessagePort.h:
- * dom/MessagePortChannel.cpp:
- EventData now contains a MessagePortChannelArray field instead of a single MessagePortChannel.
- (WebCore::MessagePortChannel::EventData::create):
- (WebCore::MessagePortChannel::EventData::EventData):
- * dom/MessagePortChannel.h:
- (WebCore::MessagePortChannel::EventData::channels):
- * page/DOMWindow.cpp:
- (WebCore::PostMessageTimer::PostMessageTimer):
- (WebCore::PostMessageTimer::event):
- (WebCore::DOMWindow::postMessage):
- Now accepts a MessagePortArray parameter instead of a single MessagePort.
- * page/DOMWindow.h:
- * workers/DedicatedWorkerContext.cpp:
- (WebCore::DedicatedWorkerContext::postMessage):
- Now accepts a MessagePortArray parameter instead of a single MessagePort.
- (WebCore::DedicatedWorkerContext::dispatchMessage):
- * workers/DedicatedWorkerContext.h:
- * workers/Worker.cpp:
- (WebCore::Worker::postMessage):
- Now accepts a MessagePortArray parameter instead of a single MessagePort.
- (WebCore::Worker::dispatchMessage):
- * workers/Worker.h:
- * workers/WorkerContextProxy.h:
- * workers/WorkerMessagingProxy.cpp:
- Updated WorkerObjectProxy and WorkerContextProxy API implementations to support sending multiple MessagePorts.
- (WebCore::MessageWorkerContextTask::create):
- (WebCore::MessageWorkerContextTask::MessageWorkerContextTask):
- (WebCore::MessageWorkerContextTask::performTask):
- (WebCore::MessageWorkerTask::create):
- (WebCore::MessageWorkerTask::MessageWorkerTask):
- (WebCore::MessageWorkerTask::performTask):
- (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
- (WebCore::WorkerMessagingProxy::postMessageToWorkerContext):
- * workers/WorkerMessagingProxy.h:
- * workers/WorkerObjectProxy.h:
- Updated WorkerObjectProxy and WorkerContextProxy APIs to support sending multiple MessagePorts.
-
-2009-08-26 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- SocketStreamHandle interface for WebSocket API
- https://bugs.webkit.org/show_bug.cgi?id=28037
-
- Add build systems only for GNUmakefile.am and WebCore.xcodeproj.now.
- Other build systems will be updated once the code is functional.
- Tests will be landed once this code is complete and functional.
-
- * GNUmakefile.am:
- * WebCore.xcodeproj/project.pbxproj:
- * platform/network/SocketStreamErrorBase.cpp: Added.
- * platform/network/SocketStreamErrorBase.h: Added.
- * platform/network/SocketStreamHandleBase.cpp: Added.
- * platform/network/SocketStreamHandleBase.h: Added.
- * platform/network/SocketStreamHandleClient.h: Added.
- * platform/network/cf/SocketStreamError.h: Added.
- * platform/network/cf/SocketStreamHandle.h: Added.
- * platform/network/cf/SocketStreamHandleCFNet.cpp: Added.
- * platform/network/soup/SocketStreamError.h: Added.
- * platform/network/soup/SocketStreamHandle.h: Added.
- * platform/network/soup/SocketStreamHandleSoup.cpp: Added.
-
-2009-08-26 Mads Ager <ager@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] setTimeout does not convert non-string argument to string
- https://bugs.webkit.org/show_bug.cgi?id=28739
-
- Convert non-string argument to setTimeout to string in the V8
- bindings.
-
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::V8Custom::WindowSetTimeoutImpl):
-
-2009-08-25 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Gavin Barraclough.
-
- [ES5] Implement getOwnPropertyDescriptor
- https://bugs.webkit.org/show_bug.cgi?id=28724
-
- Implement the WebCore side of getOwnPropertyDescriptor. This
- requires a custom implementation of getOwnPropertyDescriptor
- for every class with a custom implementation of getOwnPropertySlot.
-
- The bindings generator has been updated to generate appropriate
- versions of getOwnPropertyDescriptor for the general case where
- a custom getOwnPropertyDescriptor is not needed. ES5 is vague
- about how getOwnPropertyDescriptor should work in the context of
- "host" functions with polymorphic [[GetOwnProperty]], so it seems
- okay that occasionally we "guess" what attributes -- eg. determining
- whether a property is writable.
-
- Test: fast/js/getOwnPropertyDescriptor.html
-
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
- * bindings/js/JSDOMWindowShell.cpp:
- (WebCore::JSDOMWindowShell::getOwnPropertyDescriptor):
- * bindings/js/JSDOMWindowShell.h:
- * bindings/js/JSHTMLAppletElementCustom.cpp:
- (WebCore::JSHTMLAppletElement::getOwnPropertyDescriptorDelegate):
- * bindings/js/JSHTMLEmbedElementCustom.cpp:
- (WebCore::JSHTMLEmbedElement::getOwnPropertyDescriptorDelegate):
- * bindings/js/JSHTMLObjectElementCustom.cpp:
- (WebCore::JSHTMLObjectElement::getOwnPropertyDescriptorDelegate):
- * bindings/js/JSHistoryCustom.cpp:
- (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
- * bindings/js/JSLocationCustom.cpp:
- (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
- * bindings/js/JSNamedNodesCollection.cpp:
- (WebCore::JSNamedNodesCollection::getOwnPropertyDescriptor):
- * bindings/js/JSNamedNodesCollection.h:
- * bindings/js/JSPluginElementFunctions.cpp:
- (WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
- * bindings/js/JSPluginElementFunctions.h:
- * bindings/js/JSQuarantinedObjectWrapper.cpp:
- (WebCore::JSQuarantinedObjectWrapper::getOwnPropertyDescriptor):
- * bindings/js/JSQuarantinedObjectWrapper.h:
- * bindings/js/JSWorkerContextCustom.cpp:
- (WebCore::JSWorkerContext::getOwnPropertyDescriptorDelegate):
- * bindings/scripts/CodeGeneratorJS.pm:
- * bridge/objc/objc_runtime.h:
- * bridge/objc/objc_runtime.mm:
- (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertyDescriptor):
- * bridge/runtime.h:
- (JSC::Bindings::Instance::getOwnPropertyDescriptor):
- * bridge/runtime_array.cpp:
- (JSC::RuntimeArray::getOwnPropertyDescriptor):
- * bridge/runtime_array.h:
- * bridge/runtime_method.cpp:
- (JSC::RuntimeMethod::getOwnPropertyDescriptor):
- * bridge/runtime_method.h:
- * bridge/runtime_object.cpp:
- (JSC::RuntimeObjectImp::getOwnPropertyDescriptor):
- * bridge/runtime_object.h:
-
-2009-08-26 Vincent Untz <vuntz@gnome.org>
-
- Reviewed by Xan Lopez.
-
- GObject checks for NULL (and not 0) in g_object_get, so use that
- as we were already doing elsewhere to make the compiler happy.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::hasAudio):
-
-2009-08-26 Alpha Lam <hclam@chromium.org>
-
- Reviewed by David Levin.
-
- RenderThemeMac.mm has incorrect casting for media control element.
- https://bugs.webkit.org/show_bug.cgi?id=28730
-
- MediaControlMuteButtonElement was incorrectly casted to
- MediaControlPlayButtonElement. This is corrected in this patch.
-
- No new tests because this is code cleanup and is already covered by existing
- media layout tests.
-
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderThemeMac::paintMediaMuteButton):
-
-2009-08-26 Robert Sesek <rsesek@chromium.org>
-
- Reviewed by Eric Seidel.
-
- [Chromium] Multi-value select boxes cannot do non-contiguous selection on Mac
- https://bugs.webkit.org/show_bug.cgi?id=28670
-
- Change the condition regarding the key modifier check for non-contiguous
- selection on a multi-value list from just PLATFORM(MAC) to
- PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN)).
-
- No new tests. This patch only changes the condition on which a certain mouse
- event modifier key is used.
-
- * dom/SelectElement.cpp:
- (WebCore::SelectElement::listBoxDefaultEventHandler):
-
-2009-08-25 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Dan Bernstein
-
- r47744 causes media/video-controls-with-mutation-event-handler.html to crash
- https://bugs.webkit.org/show_bug.cgi?id=28732
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement):
- Don't call setAttribute from the construtor, any registered mutation event
- listener will cause a crash.
-
- * rendering/RenderMedia.cpp:
- (WebCore::RenderMedia::createVolumeSlider):
- Set the maxAttr here instead of in the constructor.
-
-2009-08-25 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by Brady Eidson.
-
- Timers from cached pages fire instantly rather than the after the specified timeout delay
- https://bugs.webkit.org/show_bug.cgi?id=28683
-
- Test: fast/dom/Window/timer-resume-on-navigation-back.html
-
- * history/CachedPage.cpp:
- (WebCore::CachedPage::restore): Remove duplicated Frame::restore() call, since
- it should be done only once in FrameLoader::open(cachedFrame)
- * page/DOMTimer.cpp: Added a debug-only flag and ASSERT to catch out-of-order suspense/restore.
- (WebCore::DOMTimer::DOMTimer): Ditto.
- (WebCore::DOMTimer::suspend): Ditto.
- (WebCore::DOMTimer::resume): Ditto.
- * page/DOMTimer.h: Ditto.
-
-2009-08-25 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- Setting the volume of a media element has no effect if called too early
- https://bugs.webkit.org/show_bug.cgi?id=28731
-
- * manual-tests/audio-volume.html:
- Added.
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::setVolume):
- (WebCore::MediaPlayerPrivate::setRate):
- Don't bail if metadata hasn't been loaded, it is fine to set rate and/or
- volume as soon as the movie has been created.
-
-2009-08-25 David Levin <levin@chromium.org>
-
- Reviewed by Maciej Stachowiak.
-
- DocumentThreadableLoader::getShouldUseCredentialStorage should allow for synchronous callbacks from SubresourceLoader::create.
- https://bugs.webkit.org/show_bug.cgi?id=28728
-
- Test: This code path is exercised while running xhr layout tests in chromium.
-
- * loader/DocumentThreadableLoader.cpp:
- (WebCore::DocumentThreadableLoader::getShouldUseCredentialStorage): When called
- back synchronously, the loader is 0, so the assert is changed to allow for that.
- (WebCore::DocumentThreadableLoader::loadRequest): Synchronous callbacks may be
- done before SubresourceLoader::create finishes, so ensure that any previous loader
- -- from a preflight request -- is cleared before calling SubresourceLoader::create.
-
-2009-08-25 Mark Rowe <mrowe@apple.com>
-
- Stop installing IDL files in to the framework.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-08-25 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Support for HTMLInputElement::list and HTMLInputElement::selectedOption.
- https://bugs.webkit.org/show_bug.cgi?id=27756
-
- Tests: fast/forms/input-list.html
- fast/forms/input-selectedoption.html
-
- * html/HTMLAttributeNames.in:
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::parseMappedAttribute):
- (WebCore::HTMLInputElement::list):
- (WebCore::HTMLInputElement::selectedOption):
- * html/HTMLInputElement.h:
- * html/HTMLInputElement.idl:
-
-2009-08-25 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Oliver Hunt.
-
- <video> and <audio> controller should be accessible (edit)
- https://bugs.webkit.org/show_bug.cgi?id=28081
-
- Test: accessibility/media-element.html
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- Add AccessibilityMediaControls.cpp/.h
-
- * accessibility/AXObjectCache.cpp:
- * accessibility/AXObjectCache.h:
- (WebCore::AXObjectCache::getOrCreate):
- Create AccessibilityMediaControl. Update Copyright
-
- * accessibility/AccessibilityMediaControls.cpp:
- * accessibility/AccessibilityMediaControls.h:
- Added.
-
- * accessibility/AccessibilityObject.cpp:
- * accessibility/AccessibilityObject.h:
- Add isMediaTimeline. Update Copyright.
-
- * accessibility/AccessibilitySlider.h:
- Make constructor protected instead of private so AccessibilityMediaTimeline can
- call it.
-
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
- Add NSAccessibilityValueDescriptionAttribute to range attributes.
- (-[AccessibilityObjectWrapper subrole]):
- Return NSAccessibilityTimelineSubrole for AccessibilityMediaTimeline.
-
- * dom/Node.h:
- add isMediaControlElement.
-
- * page/mac/WebCoreViewFactory.h:
- * platform/LocalizedStrings.h:
- * platform/mac/LocalizedStringsMac.mm:
- (WebCore::localizedMediaControlElementString):
- (WebCore::localizedMediaControlElementHelpText):
- (WebCore::localizedMediaTimeDescription):
- New, return localized media controller strings.
-
- * platform/gtk/LocalizedStringsGtk.cpp:
- (WebCore::mediaElementLoadingStateText):
- (WebCore::mediaElementLiveBroadcastStateText):
- Move inside of "#if ENABLE(VIDEO)"
- (WebCore::localizedMediaControlElementString):
- (WebCore::localizedMediaControlElementHelpText):
- (WebCore::localizedMediaTimeDescription):
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlElement::MediaControlElement):
- Initialize m_displayType.
- (WebCore::MediaControlElement::MediaControlElement):
- (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement):
- Fix style.
- (WebCore::MediaControlInputElement::MediaControlInputElement):
- Set m_displayType based on pseudo style ID.
- (WebCore::MediaControlInputElement::MediaControlInputElement):
- rename local "o" to "object".
- (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement):
- (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement):
- (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement):
- (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement):
- (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement):
- (WebCore::MediaControlTimelineElement::MediaControlTimelineElement):
- (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement):
- (WebCore::MediaControlTimelineElement::MediaControlTimelineElement):
- (WebCore::MediaControlTimelineElement::MediaControlTimelineElement):
- (WebCore::MediaControlTimelineElement::MediaControlTimelineElement):
- Update for MediaControlInputElement constructor change.
- (WebCore::MediaControlTimeDisplayElement::formatTime):
- New, moved here from RenderMedia so AccessibilityMediaTimeDisplay can use it.
- (WebCore::MediaControlTimeDisplayElement::setCurrentValue):
- New, set text to current time.
- * rendering/MediaControlElements.h:
-
- * rendering/RenderMedia.cpp:
- (WebCore::RenderMedia::updateControls):
- Create controls in tab order.
- (WebCore::RenderMedia::formatTime):
- Moved to MediaControlTimeDisplayElement::formatTime.
- (WebCore::RenderMedia::updateTimeDisplay):
- Call MediaControlTimeDisplayElement::setCurrentValue.
- * rendering/RenderMedia.h:
-
-2009-08-25 Jian Li <jianli@chromium.org>
-
- Reviewed by David Levin.
-
- [V8] Fix Canvas layout test failures in Chromium build.
- https://bugs.webkit.org/show_bug.cgi?id=28720
-
- The previous fix r47757 does not handle the V8 object conversion correctly.
-
- * bindings/v8/custom/V8DocumentCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-08-25 Jian Li <jianli@chromium.org>
-
- Reviewed by David Levin.
-
- [V8] Fix compiling errors in Chromium build caused by Canvas3D changes from r47752.
- https://bugs.webkit.org/show_bug.cgi?id=28717
-
- * bindings/v8/DOMObjectsInclude.h:
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
- * bindings/v8/custom/V8DocumentCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-08-25 Alpha Lam <hclam@chromium.org>
-
- Reviewed by David Levin.
-
- [chromium] Implement media volume slider for chromium
- https://bugs.webkit.org/show_bug.cgi?id=28715
-
- Provided the implementation of the volume slider and its container for
- chromium port. With this change there will be a usable volume control
- slider for chromium theme.
-
- No new tests since this is covered by existing media layout tests.
-
- * css/mediaControlsChromium.css: CSS style for the volume slider.
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::mediaSliderThumbImage): Returns the image for slider thumb.
- (WebCore::mediaVolumeSliderThumbImage): Returns the image for volume slider thumb.
- (WebCore::RenderThemeChromiumSkia::paintMediaVolumeSliderTrack): Paints the track with one vertical white line.
- (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize): Adjusts thumb sizes according to the images.
- (WebCore::RenderThemeChromiumSkia::paintMediaSliderThumb): Paints slider thumb image.
- (WebCore::RenderThemeChromiumSkia::paintMediaVolumeSliderThumb): Paints volume slider thumb image.
-
-2009-08-25 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser.
-
- Missed checking in 2 Canvas3D files
- https://bugs.webkit.org/show_bug.cgi?id=28018
-
- * bindings/js/JSCanvasRenderingContextCustom.cpp: Implements toJS to do proper subclass binding
- * bindings/js/JSCanvasRenderingContext3DCustom.cpp: Argument marshaling for 3D calls
-
-2009-08-25 Mads Ager <ager@chromium.org>
-
- Reviewed by Adam Barth.
-
- [V8] Exception from JavaScript propagates to main script
- https://bugs.webkit.org/show_bug.cgi?id=26433
-
- Make sure that exceptions thrown both at compile time and at
- runtime in javascript URLs are isolated from the main script.
-
- Test: fast/dom/javascript-url-exception-isolation.html
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::evaluate):
-
-2009-08-25 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser.
-
- Added all new Canvas3D files to the build
- https://bugs.webkit.org/show_bug.cgi?id=28018
-
- This also hooks up CanvasRenderingContext as the common base class for
- CanvasRenderingContext2D and CanvasRenderingContext3D. And it adds a bit
- of logic throughout to support the new CanvasRenderingContext3D object.
- But nothing is hooked up yet.
-
- * DerivedSources.make:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore/GNUmakefile.am:
- * WebCore/WebCore.gypi:
- * WebCore/WebCoreSources.bkl:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
- (WebCore::JSCanvasRenderingContext2D::strokeStyle):
- (WebCore::JSCanvasRenderingContext2D::setStrokeStyle):
- (WebCore::JSCanvasRenderingContext2D::fillStyle):
- (WebCore::JSCanvasRenderingContext2D::setFillStyle):
- (WebCore::JSCanvasRenderingContext2D::setFillColor):
- (WebCore::JSCanvasRenderingContext2D::setStrokeColor):
- (WebCore::JSCanvasRenderingContext2D::strokeRect):
- (WebCore::JSCanvasRenderingContext2D::drawImage):
- (WebCore::JSCanvasRenderingContext2D::drawImageFromRect):
- (WebCore::JSCanvasRenderingContext2D::setShadow):
- (WebCore::JSCanvasRenderingContext2D::createPattern):
- (WebCore::JSCanvasRenderingContext2D::putImageData):
- (WebCore::JSCanvasRenderingContext2D::fillText):
- (WebCore::JSCanvasRenderingContext2D::strokeText):
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::isObservableThroughDOM):
- * bindings/js/JSDocumentCustom.cpp:
- * bindings/js/JSHTMLCanvasElementCustom.cpp:
- (WebCore::JSHTMLCanvasElement::markChildren):
- * dom/Document.cpp:
- (WebCore::Document::getCSSCanvasContext):
- * dom/Document.h:
- * html/HTMLCanvasElement.cpp:
- (WebCore::HTMLCanvasElement::getContext):
- (WebCore::HTMLCanvasElement::willDraw):
- (WebCore::HTMLCanvasElement::reset):
- (WebCore::HTMLCanvasElement::paint):
- (WebCore::HTMLCanvasElement::is3D):
- (WebCore::HTMLCanvasElement::context3D):
- (WebCore::HTMLCanvasElement::texture3D):
- * html/HTMLCanvasElement.h:
- (WebCore::HTMLCanvasElement::renderingContext):
- * html/canvas/CanvasObject.cpp:
- (WebCore::CanvasObject::~CanvasObject):
- * html/canvas/CanvasRenderingContext.idl:
- * html/canvas/CanvasRenderingContext2D.cpp:
- (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
- (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D):
- * html/canvas/CanvasRenderingContext2D.h:
- (WebCore::CanvasRenderingContext2D::is2d):
- * html/canvas/CanvasRenderingContext2D.idl:
- * html/canvas/CanvasRenderingContext3D.cpp:
- * html/canvas/CanvasRenderingContext3D.idl:
-
-2009-08-25 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Anders Carlsson.
-
- REGRESSION (r47630): fast/repaint/background-generated.html is failing
- https://bugs.webkit.org/show_bug.cgi?id=28704
-
- * rendering/RenderBoxModelObject.cpp:
- (WebCore::RenderBoxModelObject::calculateFillTileSize): Handle SizeNone.
- * rendering/style/FillLayer.cpp:
- (WebCore::FillLayer::FillLayer): Initialize the size type to SizeNone.
- * rendering/style/FillLayer.h:
- (WebCore::FillSize::FillSize): Changed assignment to initialization and
- removed redundant assignment to size.
-
-2009-08-25 Yusuke Sato <yusukes@chromium.org>
-
- Reviewed by Darin Fisher.
-
- [Chromium] Complex text doesn't show up with text stroking
- https://bugs.webkit.org/show_bug.cgi?id=28707
-
- Skip the NULL check of m_hdc if Windows GDI is not in use.
-
- * platform/graphics/chromium/FontChromiumWin.cpp:
- (WebCore::Font::drawComplexText):
-
-2009-08-25 Alpha Lam <hclam@chromium.org>
-
- Reviewed by David Levin.
-
- Media controls panel does not have a volume control slider
- https://bugs.webkit.org/show_bug.cgi?id=28241
-
- Introduced "-webkit-media-controls-volume-slider",
- "-webkit-media-controls-volume-slider-container" and the supporting
- implementation. Also added appearances of "media-volume-slider" and
- "media-volume-slider-container".
-
- The implementation of the controls are in WebCore::MediaControlElements.
- Logic to trigger the display of the volume controls are in WebCore::RenderMedia.
-
- No new tests since this change doesn't have theme implementation and the
- volume slider is disabled by default.
-
- * accessibility/AccessibilitySlider.cpp:
- (WebCore::AccessibilitySlider::orientation): Marks that volume slider is vertical.
- * css/CSSPrimitiveValueMappings.h:
- (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added corresponding CSS values.
- * css/CSSSelector.cpp:
- (WebCore::CSSSelector::extractPseudoType): ditto.
- * css/CSSSelector.h:
- (WebCore::CSSSelector::): ditto.
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): ditto.
- * css/CSSValueKeywords.in: ditto.
- * css/mediaControls.css: Makes the volume slider disabled by default.
- * platform/ThemeTypes.h: Defines theme parts for volume slider and its container.
- (WebCore::):
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement):
- (WebCore::MediaControlVolumeSliderContainerElement::styleForElement):
- Adjust the CSS values for "display", "postion", "left" and "top" according to member variables.
- (WebCore::MediaControlVolumeSliderContainerElement::setVisible): Affects the "display" CSS value.
- (WebCore::MediaControlVolumeSliderContainerElement::setPosition): Affects the "left" and "top" CSS values.
- (WebCore::MediaControlVolumeSliderContainerElement::hitTest): Hit testing this element.
- (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement):
- (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): Modifies the volume using the slider value, allows dragging.
- * rendering/MediaControlElements.h:
- (WebCore::): Added definition for MediaControlVolumeSliderElement and MediaControlVolumeSliderContainerElement.
- (WebCore::MediaControlVolumeSliderContainerElement::isVisible): Inline getter.
- * rendering/RenderMedia.cpp:
- (WebCore::RenderMedia::styleDidChange): Updates styles for volume container and volume slider.
- (WebCore::RenderMedia::createVolumeSliderContainer): Creates volume slider container and attach to panel.
- (WebCore::RenderMedia::createVolumeSlider): Creates volume slider and attach to volume slider container.
- (WebCore::RenderMedia::updateControls): Updates volume container and volume slider.
- (WebCore::RenderMedia::updateVolumeSliderContainer): Sets the visibility and position of volume slider container and its child.
- (WebCore::RenderMedia::forwardEvent):
- Hit testing the volume slider container and volume slider to toggle the visibility and forward events to slider.
- * rendering/RenderMedia.h:
- Added definition for RenderMedia::updateVolumeSliderContainer().
- * rendering/RenderMediaControls.cpp:
- (WebCore::RenderMediaControls::paintMediaControlsPart): Not implemented.
- * rendering/RenderSlider.cpp:
- (WebCore::RenderSlider::createThumbStyle): Makes volume slider vertical.
- (WebCore::RenderSlider::thumbRect): ditto.
- (WebCore::RenderSlider::mouseEventIsInThumb): ditto.
- (WebCore::RenderSlider::setValueForPosition): ditto.
- (WebCore::RenderSlider::positionForOffset): ditto.
- (WebCore::RenderSlider::currentPosition): ditto.
- (WebCore::RenderSlider::trackSize): ditto.
- * rendering/RenderTheme.cpp:
- (WebCore::RenderTheme::adjustStyle): Adjust style for volume slider thumb.
- (WebCore::RenderTheme::paint): Paints volume control parts using theme.
- * rendering/RenderTheme.h:
- (WebCore::RenderTheme::paintMediaVolumeSliderContainer): Naive implementation to be overridden.
- (WebCore::RenderTheme::paintMediaVolumeSliderTrack): ditto.
- (WebCore::RenderTheme::paintMediaVolumeSliderThumb): ditto.
- * rendering/style/RenderStyleConstants.h:
- (WebCore::): Constants for volume control parts.
-
-2009-08-25 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Ariya Hidayat.
-
- [Qt/Mac] Use CONFIG+=build_all only when building libraries
-
- If no configuration is specified when building WebKit we pass the
- debug_and_release option to QMake which results in Makefiles for
- both configurations being generated.
-
- Previously we built both of these configurations by default, for
- all targets (both the QtWebKit framework/dyldlib and the various
- executables such as QtLauncher and tests). This makes sense for
- the libraries, which get the _debug suffix and can be loaded on
- demand by setting the DYLD_IMAGE_SUFFIX, but for executables we
- ended up building the same executable twice.
-
- We now only build one instance of each executable, and since this
- is a developer build we build the debug-version. Passing either
- --debug or --release to build-webkit will override this, and
- even in the default case the release version can still be built
- by running 'make release' in the the build directory of each
- target.
-
- * WebCore.pro:
-
-2009-08-25 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=28690
- Build failure in webkitgtk+-1.1.3
-
- Do not use deprecated function to unref a pixbuf.
-
- * platform/gtk/CursorGtk.cpp:
- (WebCore::Cursor::Cursor):
-
-2009-08-24 Hironori Bono <hbono@chromium.org>
-
- Reviewed by Adam Barth.
-
- Fix Bug 27827 "[Chromium] Functions Keys don't work in google spreadsheet".
- <https://bugs.webkit.org/show_bug.cgi?id=27827>.
-
- Because of the lack of mappings from GDK key-codes to WebKit key-codes,
- Chromium cannot send valid key-codes to JavaScript when a user types
- function keys. This change just copies the mappings from 'KeyEventGtk.cpp'.
-
- To write layout tests for this issue, added mappings from function-key
- names to platform-specific key-codes to EventSendingController objects
- so that eventSender.keyDown() can send function-key events without using
- platform-specific key codes. (Unfortunately, this eventSender.keyDown() change
- is only for Mac. So this change adds this new test to Skipped tests for other
- platforms to prevent this change from crashing the build trees.)
-
- Test: fast/events/keydown-function-keys.html
-
- * platform/chromium/KeyCodeConversionGtk.cpp: Add mappings from GDK key-codes
- to WebKit key-code for function keys.
- (WebCore::windowsKeyCodeForKeyEvent):
-
-2009-08-24 Antti Koivisto <antti@apple.com>
-
- Reviewed by Simon Fraser.
-
- https://bugs.webkit.org/show_bug.cgi?id=28698
- Avoid unnecessary transformations for the window resizer rect.
-
- * platform/Scrollbar.cpp:
- (WebCore::Scrollbar::setFrameRect):
-
-2009-08-24 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Anders Carlsson.
-
- <rdar://problem/7161900> REGRESSION: 100 MB membuster leak on windows due to 47391
- (DNS prefetching support)
-
- * platform/network/cf/DNSCFNet.cpp: (WebCore::prefetchDNS): Use a run loop from secondary
- thread on Windows, because there isn't one on main one.
-
-2009-08-24 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=28374
- Cross-scheme requests should not be blocked by appcache rules
-
- Test: http/tests/appcache/different-scheme.html
-
- * loader/appcache/ApplicationCacheHost.cpp:
- (WebCore::ApplicationCacheHost::shouldLoadResourceFromApplicationCache):
- Resources with different schemes can never be loaded from appcache.
-
-2009-08-24 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler and Sam Weinig.
-
- https://bugs.webkit.org/show_bug.cgi?id=28688
- REGRESSION(r24994): Cannot create a frame with a javascript URL
-
- Test: http/tests/security/javascriptURL/javascriptURL-in-new-iframe.html
-
- * bindings/js/JSAttrCustom.cpp: (WebCore::JSAttr::setValue):
- * bindings/js/JSElementCustom.cpp: (WebCore::allowSettingSrcToJavascriptURL):
- * bindings/js/JSHTMLFrameElementCustom.cpp: (WebCore::allowSettingJavascriptURL):
- * bindings/js/JSHTMLIFrameElementCustom.cpp: (WebCore::JSHTMLIFrameElement::setSrc):
- Omit the checks if there is no document in frame yet.
-
-2009-08-24 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Fix crash in fast/css/rem-dynamic-scaling.html due to a freed
- RenderStyle being accessed.
-
- https://bugs.webkit.org/show_bug.cgi?id=28681
-
- * dom/Element.cpp:
- (WebCore::Element::recalcStyle): Make currentStyle a RefPtr.
-
-2009-08-24 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/5743105> Long freezing during loading and selecting text
- of a large table
- https://bugs.webkit.org/show_bug.cgi?id=14918
-
- * rendering/RenderView.cpp:
- (WebCore::RenderView::setSelection): Added calls to
- beginDeferredRepaints() and endDeferredRepaints() around the
- invalidation of the selection, in order to better coalesce multiple
- invalid rectangles.
-
-2009-08-24 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Simplify findTreeElement code, get rid of potential infinite loop.
-
- https://bugs.webkit.org/show_bug.cgi?id=28680
-
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.prototype.updateBreadcrumb):
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeOutline.prototype.findTreeElement):
- * inspector/front-end/treeoutline.js:
- (TreeOutline.prototype.getCachedTreeElement):
- (TreeOutline.prototype.findTreeElement):
- * inspector/front-end/utilities.js:
- (isAncestorNode):
- ():
-
-2009-08-24 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Do expand local scope when hitting the break
-
- https://bugs.webkit.org/show_bug.cgi?id=28678
-
- * inspector/front-end/ScopeChainSidebarPane.js:
- (WebInspector.ScopeChainSidebarPane.prototype.update):
-
-2009-08-24 Ada Chan <adachan@apple.com>
-
- Reviewed by Steve Falkenburg.
-
- Make sure we use the current FrameView's frame rect when
- going back to a cached page.
-
- https://bugs.webkit.org/show_bug.cgi?id=28659
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::open):
-
-2009-08-24 Cameron McCormack <cam@mcc.id.au>
-
- Reviewed by Darin Adler.
-
- Modifying <text rotate=""> doesn't clear the corresponding SVGAnimatedNumberList
- https://bugs.webkit.org/show_bug.cgi?id=28673
-
- Test: svg/dom/text-rotate-live.html
-
- * svg/SVGNumberList.cpp:
- (WebCore::SVGNumberList::parse): Clear the list before adding the parsed
- numbers.
-
-2009-08-24 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by NOBODY (build fix)
-
- Turn off ENABLE_3D_CANVAS in the xconfig files.
-
- * Configurations/FeatureDefines.xcconfig:
-
-2009-08-24 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Only expand local scope when hitting the break
-
- https://bugs.webkit.org/show_bug.cgi?id=28678
-
- * inspector/front-end/ScopeChainSidebarPane.js:
- (WebInspector.ScopeChainSidebarPane.prototype.update):
-
-2009-08-24 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Simon Fraser.
-
- background-size fails to parse if a single length/percentage/auto is followed by a comma
- https://bugs.webkit.org/show_bug.cgi?id=28674
-
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseFillSize): Added an allowComma parameter,
- which is set to false when this method consumes a comma. Moved
- handling of 'contain' and 'cover' from parseFillProperty into this
- method.
- (WebCore::CSSParser::parseFillProperty): Set allowComma to true before
- processing the next value, and pass allowComma to parseFillSize.
- * css/CSSParser.h:
-
-2009-08-17 Martin Robinson <martin.james.robinson@gmail.com>
-
- Reviewed by Gustavo Noronha.
-
- [GTK] Support for cursors that are images
- https://bugs.webkit.org/show_bug.cgi?id=28346
-
- Added support for cursors which are images for CursorGtk. Added
- a manual test for this.
-
- * manual-tests/gtk/cursor-image.html: Added.
- * manual-tests/gtk/resources/redcursor.cur: Added.
- * platform/gtk/CursorGtk.cpp:
- (WebCore::Cursor::Cursor):
-
-2009-08-24 Zan Dobersek <zandobersek@gmail.com>
-
- Reviewed by Gustavo Noronha.
-
- [GTK] Integrate GStreamer video with the graphics backend
- https://bugs.webkit.org/show_bug.cgi?id=16356
-
- Improves GStreamer backend implementation of MediaPlayerPrivate class.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::mediaPlayerPrivateErrorCallback): Send proper MediaPlayer
- error for different GStreamer errors to MediaPlayerPrivate.
- (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Move static
- initialization boolean to a better place.
- (WebCore::MediaPlayerPrivate::play):
- (WebCore::MediaPlayerPrivate::pause):
- (WebCore::MediaPlayerPrivate::duration): Return if error occured, do not
- consider the source as stream if duration query failed.
- (WebCore::MediaPlayerPrivate::currentTime): Return if error occured, use
- an early return.
- (WebCore::MediaPlayerPrivate::seek): Return if error occured.
- (WebCore::MediaPlayerPrivate::setEndTime): Remove implementation since this
- function doesn't seem to be used anywhere in WebCore.
- (WebCore::MediaPlayerPrivate::paused):
- (WebCore::MediaPlayerPrivate::seeking):
- (WebCore::MediaPlayerPrivate::setRate): Seek to current time when rate is set.
- (WebCore::MediaPlayerPrivate::maxTimeBuffered): Return if error occured.
- (WebCore::MediaPlayerPrivate::maxTimeSeekable): Ditto.
- (WebCore::MediaPlayerPrivate::maxTimeLoaded): Ditto.
- (WebCore::MediaPlayerPrivate::bytesLoaded):
- (WebCore::MediaPlayerPrivate::totalBytesKnown):
- (WebCore::MediaPlayerPrivate::totalBytes): Ditto.
- (WebCore::MediaPlayerPrivate::updateStates): Return if error occured, update
- after seek ended with a successful change
- (WebCore::MediaPlayerPrivate::didEnd): Do not pause the playbin when end is reached.
- (WebCore::MediaPlayerPrivate::loadingFailed): Update network state with the given error.
- (WebCore::mimeTypeCache): Gather supported mime types from GStreamer.
- (WebCore::MediaPlayerPrivate::getSupportedTypes):
- (WebCore::MediaPlayerPrivate::supportsType):
- (WebCore::MediaPlayerPrivate::hasSingleSecurityOrigin):
- (WebCore::MediaPlayerPrivate::supportsFullscreen): First step towards fullscreen
- support.
- (WebCore::MediaPlayerPrivate::createGSTPlayBin): Use playbin2 instead of playbin,
- do not set playbin's audio sink.
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
- * platform/graphics/gtk/VideoSinkGStreamer.cpp:
- (webkit_video_sink_idle_func): Use C+casts, decrease reference count of async
- queue at the end of the idle function.
- (webkit_video_sink_render): Increase reference count of async queue.
- (webkit_video_sink_stop): Remove any idle functions with the sink as data.
-
-2009-08-23 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser.
-
- Remaining new files for Canvas3D
- https://bugs.webkit.org/show_bug.cgi?id=28018
-
- * bindings/js/JSHTMLCanvasElementCustom.cpp: Added Canvas3D method behind an ifdef
- * html/canvas/CanvasByteArray.cpp: Added. Efficient array of bytes for passing to GL functions
- * html/canvas/CanvasByteArray.h: Added.
- * html/canvas/CanvasByteArray.idl: Added.
- * html/canvas/CanvasNumberArray.cpp: Added. Efficient array of 32 bit floats for passing to GL functions
- * html/canvas/CanvasNumberArray.h: Added.
- * html/canvas/CanvasNumberArray.idl: Added.
-
-2009-08-24 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Migrate call frames interaction to the InjectedScript-based schema.
-
- https://bugs.webkit.org/show_bug.cgi?id=28408
-
- * inspector/front-end/CallStackSidebarPane.js:
- (WebInspector.CallStackSidebarPane.prototype.update):
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype.doEvalInWindow):
- (WebInspector.ConsoleTextMessage):
- * inspector/front-end/DOMAgent.js:
- (WebInspector.DOMAgent.prototype.get domWindow):
- (InspectorController.openInInspectedWindow):
- (InspectorController.getCallFrames):
- (InspectorController.evaluateInCallFrame):
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.prototype.reset):
- (WebInspector.ElementsPanel.prototype.generateStylesheet):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.evaluate):
- (InjectedScript._evaluateOn):
- (InjectedScript.openInInspectedWindow):
- (InjectedScript.getCallFrames):
- (InjectedScript.evaluateInCallFrame):
- (InjectedScript._callFrameForId):
- (InjectedScript._objectForId):
- (InjectedScript.CallFrameProxy):
- (InjectedScript.CallFrameProxy.prototype._wrapScopeChain):
- * inspector/front-end/ObjectPropertiesSection.js:
- (WebInspector.ObjectPropertiesSection.prototype._update):
- * inspector/front-end/ObjectProxy.js:
- (WebInspector.ObjectPropertyProxy):
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
- * inspector/front-end/ScopeChainSidebarPane.js:
- (WebInspector.ScopeChainSidebarPane):
- (WebInspector.ScopeChainSidebarPane.prototype.update):
- (WebInspector.ScopeVariableTreeElement.prototype.onattach):
- (WebInspector.ScopeVariableTreeElement.prototype.onexpand):
- (WebInspector.ScopeVariableTreeElement.prototype.oncollapse):
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame):
- (WebInspector.ScriptsPanel.prototype.variablesInSelectedCallFrame):
- (WebInspector.ScriptsPanel.prototype.debuggerPaused.callback):
- (WebInspector.ScriptsPanel.prototype.debuggerPaused):
-
-2009-08-24 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Add support for the placeholder attribute and DOM property of the textarea element.
- https://bugs.webkit.org/show_bug.cgi?id=21248
-
- A DOM node for an INPUT element doesn't have a flag for placeholder
- visibility anymore. This patch also fixes a bug that a renderer
- doesn't reflect a corresponding DOM value change.
-
- Tests: fast/forms/textarea-placeholder-dom-property.html
- fast/forms/textarea-placeholder-pseudo-style.html
- fast/forms/textarea-placeholder-set-attribute.html
- fast/forms/textarea-placeholder-set-value.html
-
- * css/html.css: Add the default style for placeholder of textarea.
- * dom/InputElement.cpp: Cleanup for m_placeholderShouldBeVisible removal
- (WebCore::InputElement::dispatchFocusEvent):
- (WebCore::InputElement::dispatchBlurEvent):
- (WebCore::InputElement::placeholderShouldBeVisible):
- (WebCore::InputElement::updatePlaceholderVisibility):
- (WebCore::InputElement::setValueFromRenderer):
- (WebCore::InputElementData::InputElementData):
- * dom/InputElement.h:
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::dispatchFocusEvent):
- (WebCore::HTMLInputElement::dispatchBlurEvent):
- (WebCore::HTMLInputElement::setValue):
- (WebCore::HTMLInputElement::placeholderShouldBeVisible):
- * html/HTMLInputElement.h:
- (WebCore::HTMLInputElement::updatePlaceholderVisibility):
- * html/HTMLTextAreaElement.cpp:
- (WebCore::HTMLTextAreaElement::parseMappedAttribute):
- (WebCore::HTMLTextAreaElement::setValue):
- (WebCore::HTMLTextAreaElement::placeholderShouldBeVisible):
- (WebCore::HTMLTextAreaElement::updatePlaceholderVisibility):
- (WebCore::HTMLTextAreaElement::dispatchFocusEvent):
- (WebCore::HTMLTextAreaElement::dispatchBlurEvent):
- * html/HTMLTextAreaElement.h:
- * html/HTMLTextAreaElement.idl:
- * rendering/RenderTextControl.cpp:
- (WebCore::RenderTextControl::RenderTextControl):
- (WebCore::RenderTextControl::styleDidChange):
- (WebCore::RenderTextControl::setInnerTextStyle):
- (WebCore::RenderTextControl::updatePlaceholderVisibility):
- * rendering/RenderTextControl.h:
- * rendering/RenderTextControlMultiLine.cpp:
- (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
- (WebCore::RenderTextControlMultiLine::nodeAtPoint):
- (WebCore::RenderTextControlMultiLine::updateFromElement):
- (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
- (WebCore::RenderTextControlMultiLine::textBaseStyle):
- * rendering/RenderTextControlMultiLine.h:
- * rendering/RenderTextControlSingleLine.cpp:
- (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
- (WebCore::RenderTextControlSingleLine::textBaseStyle):
- (WebCore::RenderTextControlSingleLine::updateFromElement):
- (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
- * rendering/RenderTextControlSingleLine.h:
- * wml/WMLInputElement.cpp:
- (WebCore::WMLInputElement::dispatchFocusEvent):
- (WebCore::WMLInputElement::dispatchBlurEvent):
- (WebCore::WMLInputElement::setValue):
- (WebCore::WMLInputElement::placeholderShouldBeVisible):
-
-2009-08-23 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Mark Rowe.
-
- Code clean-up and build fix for filters enabled builds. Moved SVGNames.h
- into #if ENABLE(SVG) for Document.cpp and added SVGNames.h to the other
- files. They are needed there after r47688.
-
- * dom/Document.cpp:
- * svg/SVGComponentTransferFunctionElement.h:
- * svg/SVGFELightElement.h:
- * svg/SVGFEMergeNodeElement.h:
- * svg/SVGFilterPrimitiveStandardAttributes.h:
-
-2009-08-23 Gustavo Noronha Silva <gns@gnome.org>
-
- Unreviewed, build fix for make distcheck on GTK+.
-
- * GNUmakefile.am: Added files needed for the build.
- * bindings/js/JSDOMWindowCustom.cpp: Protect SharedWorker include
- with #if clause.
- * bindings/js/JSEventTarget.cpp: Dito.
- * dom/Document.cpp: Dito.
- * loader/FrameLoader.cpp: Dito.
-
-2009-08-23 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: Throws an Error on "null"
- https://bugs.webkit.org/show_bug.cgi?id=28665
-
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.evaluate):
-
-2009-08-23 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: REGRESSION Formatting Function in Console is Abbreviated Too Often
-
- https://bugs.webkit.org/show_bug.cgi?id=28666
-
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.getProperties):
- (InjectedScript.createProxyObject):
-
-2009-08-22 Martin Robinson <martin.james.robinson@gmail.com>
-
- Reviewed by Xan Lopez.
-
- [GTK] BitmapImage::getGdkPixbuf does not handle alpha channels properly
- https://bugs.webkit.org/show_bug.cgi?id=28345
-
- When doing the conversion between cairo_surface_t* and GdkPixbuf*
- account for the differences in the respective formats' in-memory
- image format.
-
- * platform/graphics/gtk/ImageGtk.cpp:
- (WebCore::getCairoSurfacePixel):
- (WebCore::getGdkPixbufPixel):
- (WebCore::BitmapImage::getGdkPixbuf):
-
-2009-08-22 Darin Adler <darin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Make DOM classes start with a reference count of 1, like all other RefCounted
-
- Next step: Element, HTMLElement, HTMLAnchorElement, HTMLAppletElement,
- HTMLAreaElement, HTMLEmbedElement, HTMLFrameElement, HTMLIFrameElement,
- HTMLObjectElement, HTMLPlugInElement, HTMLPlugInImageElement.
-
- * DerivedSources.make: Fix error seen every time we build by escaping the $
- in the build rule, since you have to use $$ for that in make.
-
- * WebCore.base.exp: Updated.
-
- * bindings/objc/DOM.mm:
- Added now-needed include of SVGNames.h.
-
- * dom/Document.cpp: Added now-needed include of SVGNames.h.
- (WebCore::Document::createElement): Use create instead of new.
-
- * dom/Element.cpp:
- (WebCore::Element::Element): Added ConstructionType argument so the caller
- can determine whether this starts with a reference count of either 0 or 1.
- Later we will remove this again once they are all 1.
- (WebCore::Element::create): Added.
-
- * dom/Element.h: Added create and made constructor protected.
-
- * dom/StyledElement.cpp:
- (WebCore::StyledElement::StyledElement): Added ConstructionType argument.
- * dom/StyledElement.h: Made many functions protected or private, including
- the constructor.
-
- * dom/make_names.pl: Use create to create the base elements HTMLElement,
- SVGElement, and WMLElement.
-
- * editing/CreateLinkCommand.cpp:
- (WebCore::CreateLinkCommand::doApply): Use create instead of new.
- * editing/UnlinkCommand.cpp:
- (WebCore::UnlinkCommand::doApply): Ditto.
-
- * html/HTMLAnchorElement.cpp:
- (WebCore::HTMLAnchorElement::create): Added.
- * html/HTMLAnchorElement.h: Made constructor protected and added create.
- Also made m_rootEditableElementForSelectionOnMouseDown a RefPtr.
-
- * html/HTMLAppletElement.cpp:
- (WebCore::HTMLAppletElement::create): Added.
- * html/HTMLAppletElement.h: Made constructor private and added create.
-
- * html/HTMLAreaElement.cpp:
- (WebCore::HTMLAreaElement::create): Added.
- * html/HTMLAreaElement.h: Made constructor private and added create.
-
- * html/HTMLElement.cpp:
- (WebCore::HTMLElement::create): Added.
- * html/HTMLElement.h: Made constructor protected and added create.
- Made other functions protected and private. Also added inline
- definition of constructor.
-
- * html/HTMLEmbedElement.cpp:
- (WebCore::HTMLEmbedElement::create): Added.
- * html/HTMLEmbedElement.h: Made constructor private and added create.
- Made other functions private.
-
- * html/HTMLFrameElement.cpp:
- (WebCore::HTMLFrameElement::create): Added.
- (WebCore::HTMLFrameElement::parseMappedAttribute):
- * html/HTMLFrameElement.h: Made constructor private and added create.
- Made other functions private.
-
- * html/HTMLFrameElementBase.h: Made functions protected and private.
-
- * html/HTMLFrameOwnerElement.cpp:
- (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement): Pass
- CreateElement so reference count starts at 1.
-
- * html/HTMLFrameOwnerElement.h: Made functions protected and private.
-
- * html/HTMLIFrameElement.cpp:
- (WebCore::HTMLIFrameElement::create): Added.
- * html/HTMLIFrameElement.h: Made constructor private and added create.
- Made other functions private.
-
- * html/HTMLObjectElement.cpp:
- (WebCore::HTMLObjectElement::create): Added.
- (WebCore::HTMLObjectElement::containsJavaApplet): Changed while loop
- into a for loop and tweaked formatting.
- * html/HTMLObjectElement.h: Made constructor private and added create.
- Made other functions private.
-
- * html/HTMLPlugInElement.h: Made constructor protected.
- Made other functions protected and private.
-
- * html/HTMLPlugInImageElement.h: Made constructor and another function
- protected.
-
- * html/HTMLTagNames.in: Removed createWithNew from all classes that
- now have create functions. Moved conditional noscript to a separate
- paragraph.
-
- * html/HTMLViewSourceDocument.cpp:
- (WebCore::HTMLViewSourceDocument::addSpanWithClassName): Use create.
- (WebCore::HTMLViewSourceDocument::addLink): Ditto.
- * page/DragController.cpp:
- (WebCore::documentFragmentFromDragData): Ditto.
-
- * svg/SVGElement.cpp:
- (WebCore::SVGElement::SVGElement): Pass CreateElementZeroRefCount
- so reference count still starts at 0. Will change this class later.
- (WebCore::SVGElement::create): Added.
- * svg/SVGElement.h: Added create, made constructor protected, and
- made other functions protected and private. Removed unneeded
- SVGNames.h include.
-
- * svg/SVGExternalResourcesRequired.h: Added now-needed SVGNames.h
- include.
-
- * svg/SVGStopElement.h: Added now-needed SVGNames.h include.
- Made functions private.
-
- * wml/WMLElement.cpp:
- (WebCore::WMLElement::WMLElement): Pass CreateElementZeroRefCount
- so reference count still starts at 0. Will change this class later.
- (WebCore::WMLElement::create): Added.
- * wml/WMLElement.h: Added create and made constructor protected.
-
- * wml/WMLTagNames.in: Removed createWithNew from WMLElement.
-
-2009-08-22 Adele Peterson <adele@apple.com>
-
- Reviewed by Anders Carlsson.
-
- Fix for <rdar://problem/7161656> Crash in RenderObject::destroy when using custom scrollbars
-
- Custom scrollbars normally get detached when a document gets detached. In this case, a crash was happening when the document had gone into the page cache
- and then was getting destroyed without proper scrollbar teardown. This change makes custom scrollbars get detached when the document enters the cache.
-
- I couldn't figure out a way to reliably cause this to happen in DRT, since the reproducible case relies on the cache being purged at a particular time.
-
- * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): Detach custom scrollbars when the CachedFrame is created.
- They'll get reattached when the document comes out of the page cache.
- * page/FrameView.cpp: (WebCore::FrameView::~FrameView): Added some asserts to catch this problem earlier in debug builds.
-
-2009-08-22 David Hyatt <hyatt@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Make sure self-collapsing blocks that clear floats are still able to collapse their bottom margins with
- the bottom of their parent blocks. The old code prevented all collapsing, but all CSS2.1 states is that:
- "An element that has had clearance applied to it never collapses its top margin with its parent block's bottom margin."
-
- The implication is that the bottom margin can still collapse, and the block-inside-inline form of
- fast/block/margin-collapse/025.html (added as fast/block/margin-collapse/block-inside-inline/025.html) depends
- on it to get comparable results.
-
- Added block-inside-inline tests (a whole slew of them) in fast/block/margin-collapse/block-inside-inline/
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::MarginInfo::MarginInfo):
- (WebCore::RenderBlock::collapseMargins):
- (WebCore::RenderBlock::clearFloatsIfNeeded):
- (WebCore::RenderBlock::handleBottomOfBlock):
- * rendering/RenderBlock.h:
- (WebCore::RenderBlock::MarginInfo::clearMargin):
- (WebCore::RenderBlock::MarginInfo::canCollapseBottomWithChildren):
-
-2009-08-22 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- Need to implement ARIA role="listitem" and role="list"
- https://bugs.webkit.org/show_bug.cgi?id=28606
-
- Test: platform/mac-snowleopard/accessibility/aria-list-and-listitem.html
-
- * accessibility/AXObjectCache.cpp:
- (WebCore::AXObjectCache::getOrCreate):
- * accessibility/AccessibilityList.cpp:
- (WebCore::AccessibilityList::isUnorderedList):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::RoleEntry::):
-
-2009-08-21 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Darin Adler.
-
- Clean up fill image geometry calculation
- https://bugs.webkit.org/show_bug.cgi?id=28652
-
- * rendering/RenderBoxModelObject.cpp:
- (WebCore::RenderBoxModelObject::calculateFillTileSize): Renamed
- calculateBackgroundSize() to this. Replaced separate scaledWidth and
- scaledHeight parameters with a single scaledSize parameter. Renamed
- parameters and local variables.
- (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Changed
- to use CSS3 Backgrounds and Borders terminology in comments and
- local variable names. Renamed, clarified and consolidated some local
- variables.
- * rendering/RenderBoxModelObject.h: Made calculateFillTileSize() private.
-
-2009-08-22 Chris Marrin <cmarrin@apple.com>
-
- Unreviewed, build fix.
-
- Backing out http://trac.webkit.org/changeset/47669
-
- * html/canvas/CanvasRenderingContext2D.cpp:
- * html/canvas/CanvasRenderingContext2D.h:
-
-2009-08-22 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- Backing out http://trac.webkit.org/changeset/47671 in preparation of
- rolling out http://trac.webkit.org/changeset/47669.
-
-2009-08-22 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Anders Carlsson.
-
- Build fix, add CanvasRenderingContext to build systems.
- https://bugs.webkit.org/show_bug.cgi?id=28018
-
- * DerivedSources.make: Added CanvasRenderinContext.
- * GNUmakefile.am: Ditto.
- * WebCore.gypi: Ditto.
- * WebCore.pro: Ditto.
- * WebCore.xcodeproj/project.pbxproj: Ditto.
- * WebCoreSources.bkl: Ditto.
-
-2009-08-21 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- New files implementing GL buffer wrappers, and support to make them platform independent
- https://bugs.webkit.org/show_bug.cgi?id=28018
-
- * html/canvas/CanvasBuffer.cpp: Added. Wrapper around GL Buffer object
- * html/canvas/CanvasBuffer.h: Added.
- * html/canvas/CanvasBuffer.idl: Added.
- * html/canvas/CanvasFramebuffer.cpp: Added. Wrapper around GL Framebuffer object
- * html/canvas/CanvasFramebuffer.h: Added.
- * html/canvas/CanvasFramebuffer.idl: Added.
- * html/canvas/CanvasObject.h: Expose m_context
- * html/canvas/CanvasProgram.cpp: Added. Wrapper around GL Program object
- * html/canvas/CanvasProgram.h: Added.
- * html/canvas/CanvasProgram.idl: Added.
- * html/canvas/CanvasRenderbuffer.cpp: Added. Wrapper around GL Renderbuffer object
- * html/canvas/CanvasRenderbuffer.h: Added.
- * html/canvas/CanvasRenderbuffer.idl: Added.
- * html/canvas/CanvasRenderingContext3D.cpp: Move m_objects hash table from GraphicsContext3D to here
- * html/canvas/CanvasRenderingContext3D.h:
- * html/canvas/CanvasShader.cpp: Added. Wrapper around GL Shader object
- * html/canvas/CanvasShader.h: Added.
- * html/canvas/CanvasShader.idl: Added.
- * html/canvas/CanvasTexture.cpp: Added. Wrapper around GL Texture object
- * html/canvas/CanvasTexture.h: Added.
- * html/canvas/CanvasTexture.idl: Added.
- * platform/graphics/GraphicsContext3D.cpp: Removed.
- * platform/graphics/GraphicsContext3D.h: Move m_objects hash table from here to CanvasRenderingContext3D
- * platform/graphics/mac/GraphicsContext3DMac.cpp: Implement platform dependent code for GL object creation/destruction
-
-2009-08-21 Darin Adler <darin@apple.com>
-
- * WebCore.vcproj/build-generated-files.sh:
- * make-generated-sources.sh:
- Removed obsolete code to set up CREATE_HASH_TABLE.
-
-2009-08-21 Adele Peterson <adele@apple.com>
-
- Reviewed by Mark Rowe.
-
- <rdar://problem/7162322> Custom style sheet ignored if UAC is enabled
-
- * platform/win/SharedBufferWin.cpp: (WebCore::SharedBuffer::createWithContentsOfFile):
- No need to open the file with write access. Only read access is needed.
-
-2009-08-21 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- <rdar://problem/7161454> Leaks seen during http/tests/xmlhttprequest/cross-origin-no-authorization.html
-
- Also fixes leaks seen on appcache tests.
-
- * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::cancel): Work around
- something that's likely a CFNetwork issue. Note that on Windows, there is no matching API
- to call, and we do not think that the leak occurs there anyway.
-
-2009-08-21 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by David Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=28650
- Remove cross-thread code from CrossOriginPreflightResultCache.
- Removed mutexes, atomic initializer and string copy.
-
- No new tests, the worker tests cover this.
-
- * loader/CrossOriginPreflightResultCache.cpp:
- (WebCore::addToAccessControlAllowList):
- (WebCore::CrossOriginPreflightResultCache::shared):
- (WebCore::CrossOriginPreflightResultCache::appendEntry):
- (WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
- (WebCore::CrossOriginPreflightResultCache::empty):
- * loader/CrossOriginPreflightResultCache.h:
-
-2009-08-21 Michelangelo De Simone <micdesim@gmail.com>
-
- Reviewed by Jan Alonzo.
-
- Buildfix after http://trac.webkit.org/changeset/47655.
-
- * html/HTMLFormControlElement.h:
-
-2009-08-19 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: Improve Cookie DataGrid to Show Hidden Data
- https://bugs.webkit.org/show_bug.cgi?id=28269
-
- Removed Custom Bindings
-
- * bindings/js/JSInspectorBackendCustom.cpp:
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8InspectorBackendCustom.cpp:
- * inspector/InspectorBackend.cpp:
-
- Made Non-Custom Bindings in the Backend
-
- (WebCore::InspectorBackend::getCookies):
- (WebCore::InspectorBackend::deleteCookie):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::deleteCookie):
- * inspector/InspectorController.h:
-
- Build the Cookie ScriptObjects, handles using document.cookie in
- case the platform hasn't implemented raw cookie access.
-
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::getCookies):
- (WebCore::InspectorDOMAgent::buildObjectForCookie):
- (WebCore::InspectorDOMAgent::buildArrayForCookies):
- * inspector/InspectorDOMAgent.h:
-
- Complete the Asynchronous Calls
-
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::didGetCookies):
- * inspector/InspectorFrontend.h:
-
- Asynchronous Functions to get Cookie Data
-
- * inspector/front-end/DOMAgent.js:
- (WebInspector.Cookies.getCookiesAsync):
- (WebInspector.Cookies.buildCookiesFromString): fallback behavior
-
- Refactor to use the Asynchronous Functions
-
- * inspector/front-end/CookieItemsView.js:
- (WebInspector.CookieItemsView):
- (WebInspector.CookieItemsView.prototype.get statusBarItems):
- (WebInspector.CookieItemsView.prototype.update.callback):
- (WebInspector.CookieItemsView.prototype.update):
- (WebInspector.CookieItemsView.prototype.simpleDataGridForCookies):
- (WebInspector.CookieItemsView.prototype._deleteButtonClicked):
-
- Cleaned/Commented Related Code
-
- (InspectorController.searchCanceled):
- * inspector/front-end/InjectedScript.js:
- * platform/Cookie.h:
- * English.lproj/localizedStrings.js: the new strings that were supposed to have gone in last time
-
-2009-08-21 Michelangelo De Simone <micdesim@gmail.com>
-
- Reviewed by Adele Peterson.
-
- https://bugs.webkit.org/show_bug.cgi?id=28145
- Add support for novalidate/formnovalidate attribute, from HTML5 specs:
- http://www.whatwg.org/specs/web-apps/current-work/#attr-fs-novalidate
-
- Tests: fast/forms/formnovalidate-attribute.html
- fast/forms/novalidate-attribute.html
-
- * html/HTMLAttributeNames.in: added novalidate, formnovalidate
- * html/HTMLButtonElement.idl: formnovalidate attribute exposed
- * html/HTMLFormControlElement.cpp:
- (WebCore::HTMLFormControlElement::formNoValidate): attribute getter
- (WebCore::HTMLFormControlElement::setFormNoValidate): attribute setter
- * html/HTMLFormControlElement.h:
- * html/HTMLFormElement.cpp:
- (WebCore::HTMLFormElement::novalidate): attribute getter
- (WebCore::HTMLFormElement::setNovalidate): attribute setter
- * html/HTMLFormElement.h:
- * html/HTMLFormElement.idl: novalidate attribute exposed
- * html/HTMLInputElement.idl: formNoValidate attribute exposed
-
-2009-08-21 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Beth Dakin.
-
- Rendering changes to complete
- [CSS3 Backgrounds and Borders] Add support for the "contain" value for
- background-size
- https://bugs.webkit.org/show_bug.cgi?id=27573
- and
- [CSS3 Backgrounds and Borders] Add support for the "cover" value for
- background-size
- https://bugs.webkit.org/show_bug.cgi?id=27574
-
- Test: fast/backgrounds/size/contain-and-cover.html
-
- * rendering/RenderBoxModelObject.cpp:
- (WebCore::RenderBoxModelObject::calculateBackgroundSize):
- * rendering/RenderObject.cpp:
- (WebCore::mustRepaintFillLayers):
-
-2009-08-21 Michelangelo De Simone <micdesim@gmail.com>
-
- Reviewed by Adele Peterson.
-
- https://bugs.webkit.org/show_bug.cgi?id=27452
- Add support for checkValidity() method and invalid event, from HTML5
- specs:
- http://www.whatwg.org/specs/web-apps/current-work/#dom-form-checkvalidity
-
- Tests: fast/events/invalid-001.html
- fast/events/invalid-002.html
- fast/events/invalid-003.html
- fast/events/invalid-004.html
- fast/events/invalid-005.html
- fast/forms/checkValidity-001.html
- fast/forms/checkValidity-002.html
- fast/forms/checkValidity-003.html
- fast/forms/checkValidity-004.html
-
- * dom/Document.idl: oninvalid event handler
- * dom/Element.idl: ditto
- * dom/EventNames.h: added invalid event
- * dom/Node.cpp:
- (WebCore::Node::oninvalid): ditto
- (WebCore::Node::setOninvalid): ditto
- * dom/Node.h: ditto
- * html/HTMLAttributeNames.in: oninvalid attribute
- * html/HTMLButtonElement.idl: added checkValidity() method
- * html/HTMLElement.cpp:
- (WebCore::HTMLElement::parseMappedAttribute): parses oninvalid
- * html/HTMLFieldSetElement.idl: added checkValidity() method
- * html/HTMLFormControlElement.cpp:
- (WebCore::HTMLFormControlElement::checkValidity): checkValidity()
- implementation
- * html/HTMLFormControlElement.h:
- * html/HTMLFormElement.cpp:
- (WebCore::HTMLFormElement::checkValidity): checkValidity() implementation
- for form elements
- * html/HTMLFormElement.h: checkValidity() definition
- * html/HTMLFormElement.idl: added checkValidity() method
- * html/HTMLInputElement.idl: added checkValidity() method
- * html/HTMLSelectElement.idl: added checkValidity() method
- * html/HTMLTextAreaElement.idl: added checkValidity() method
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::oninvalid): oninvalid event handler
- (WebCore::DOMWindow::setOninvalid): ditto
- * page/DOMWindow.h: ditto
- * page/DOMWindow.idl: ditto
-
-2009-08-21 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- The CSS part of https://bugs.webkit.org/show_bug.cgi?id=27571 [CSS3
- Backgrounds and Borders] Add support for the "round" value for
- background-repeat
- -and-
- https://bugs.webkit.org/show_bug.cgi?id=27570 [CSS3 Backgrounds and
- Borders] Add support for the "space" value for background-repeat
-
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseFillProperty):
- * css/CSSPrimitiveValueMappings.h:
- (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
- (WebCore::CSSPrimitiveValue::operator EFillRepeat):
- * css/CSSValueKeywords.in:
- * rendering/style/FillLayer.h:
- * rendering/style/RenderStyleConstants.h:
- (WebCore::):
-
-2009-08-21 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- New files for Canvas 3D feature
- https://bugs.webkit.org/show_bug.cgi?id=28018
-
- This is all the new files for implementing Canvas 3D. None of them are hooked up and
- are not even included in the build yet. This incorporates the reviews from Simon
- and Ollie for these files.
-
- * bindings/js/JSCanvasNumberArrayCustom.cpp: Added. Custom JS binding to do implicit conversion from JS Array
- * html/CanvasObject.cpp: Added. Base class for all GL object containers
- * html/CanvasObject.h: Added.
- * html/CanvasRenderingContext.cpp: Added. Base class for CanvasRenderingContext2D and CanvasRenderingContext3D
- * html/CanvasRenderingContext.h: Added.
- * html/CanvasRenderingContext.idl: Added.
- * html/CanvasRenderingContext3D.cpp: Added. 3D context returned from Canvas.getContext()
- * html/CanvasRenderingContext3D.h: Added.
- * html/CanvasRenderingContext3D.idl: Added.
- * platform/graphics/GraphicsContext3D.cpp: Added. Platform interface between CanvasRenderingContext3D and 3D graphics engine
- * platform/graphics/GraphicsContext3D.h: Added.
- * platform/graphics/mac/Canvas3DLayer.h: Added. CALayer subclass to composite 3D canvas
- * platform/graphics/mac/Canvas3DLayer.mm: Added.
- * platform/graphics/mac/GraphicsContext3DMac.cpp: Added. Mac specific interface (OpenGL based)
-
-2009-08-21 Ryosuke Niwa <rniwa@webkit.org>
-
- No Review.
-
- Another Windows build fix.
-
- * editing/ApplyStyleCommand.cpp:
- (WebCore::diffTextDecorations):
-
-2009-08-21 David Hyatt <hyatt@apple.com>
-
- Reviewed by Simon Fraser.
-
- https://bugs.webkit.org/show_bug.cgi?id=28625, focus rings don't respect the non-strict mode
- line box shrinking quirk. Make sure outlines don't extend outside the lineTop and lineBottom
- of the root line box.
-
- Covered by existing tests.
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::addFocusRingRects):
- * rendering/RenderInline.cpp:
- (WebCore::RenderInline::addFocusRingRects):
- (WebCore::RenderInline::paintOutline):
-
-2009-08-21 Ryosuke Niwa <rniwa@webkit.org>
-
- No Review.
-
- Windows build fix.
-
- * editing/ApplyStyleCommand.cpp:
- (WebCore::setTextDecorationProperty): Made it static
- (WebCore::diffTextDecorations): Made it static
-
-2009-08-21 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Eric Seidel.
-
- execCommand("Underline") uses CSS even when styleWithCSS has been turned off
- https://bugs.webkit.org/show_bug.cgi?id=23892
-
- This patch adds support for u and s in StyleChange and addInlineStyleIfNeeded so that
- WebKit does not use CSS to decorate texts when styleWithCSS is set to false.
-
- * css/CSSValueList.cpp:
- (WebCore::CSSValueList::copy): Added.
- * css/CSSValueList.h: Added copy.
- * editing/ApplyStyleCommand.cpp:
- (WebCore::StyleChange::applyUnderline):
- (WebCore::StyleChange::applyLineThrough):
- (WebCore::StyleChange::StyleChange): Added a boolean trimTextDecorations argument.
- (WebCore::StyleChange::init): Ditto.
- (WebCore::StyleChange::extractTextStyles): Handles text decorations.
- (WebCore::getPropertiesNotInComputedStyle): Handles text decorations properly.
- (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Adds u and s if needed.
-
-2009-08-21 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: Rename "Databases" Panel as "Storage"
- https://bugs.webkit.org/show_bug.cgi?id=28620
-
- Updated enum from "DatabasesPanel" to "StoragePanel" and wherever it was used.
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::specialPanelForJSName): string to display StoragePanel can be either "databases" or "storage"
- * inspector/InspectorController.h:
- (WebCore::InspectorController::):
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::showPanel):
-
- Updated All Direct Access from WebInspector.panels.databases to WebInspector.panels.storage,
- any DatabasesPanel constructors and appropriate function names.
-
- * inspector/front-end/DOMStorageDataGrid.js:
- (WebInspector.DOMStorageDataGrid.prototype._startEditingColumnOfDataGridNode):
- (WebInspector.DOMStorageDataGrid.prototype._startEditing):
- (WebInspector.DOMStorageDataGrid.prototype._editingCommitted):
- (WebInspector.DOMStorageDataGrid.prototype._editingCancelled):
- (WebInspector.DOMStorageDataGrid.prototype.deleteSelectedRow):
- * inspector/front-end/DOMStorageItemsView.js:
- (WebInspector.DOMStorageItemsView.prototype.update):
- * inspector/front-end/DatabaseQueryView.js:
- (WebInspector.DatabaseQueryView.prototype._queryFinished):
- * inspector/front-end/DatabaseTableView.js:
- (WebInspector.DatabaseTableView.prototype._queryFinished):
- * inspector/front-end/inspector.js:
- (WebInspector._createPanels): updated string that comes from hiddenPanels to be "databases" or "storage"
- (WebInspector.showStoragePanel):
- (WebInspector.selectDatabase):
- (WebInspector.selectDOMStorage):
- (WebInspector.addDatabase):
- (WebInspector.addDOMStorage):
-
- Renamed some files and Updated Accordingly.
-
- * inspector/front-end/StoragePanel.js: Renamed from WebCore/inspector/front-end/DatabasesPanel.js.
- * inspector/front-end/Images/storageIcon.png: Renamed from WebCore/inspector/front-end/Images/databasesIcon.png.
- * inspector/front-end/WebKit.qrc: use new file names
- * inspector/front-end/inspector.css: use new images name and class names
- * inspector/front-end/inspector.html: use new file name
- * WebCore.gypi: use new file names
-
- Miscellaneous Updates.
-
- * English.lproj/localizedStrings.js: Updated Tooltip from "Databases" to "Storage"
-
-2009-08-21 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Oliver Hunt.
-
- [Haiku] Adding three font-specific files to WebCore:
- FontCacheHaiku.cpp, FontHaiku.cpp, and SimpleFontDataHaiku.cpp
- https://bugs.webkit.org/show_bug.cgi?id=28131
-
- * platform/graphics/haiku/FontCacheHaiku.cpp: Added.
- (WebCore::FontCache::platformInit):
- (WebCore::FontCache::getFontDataForCharacters):
- (WebCore::FontCache::getSimilarFontPlatformData):
- (WebCore::FontCache::getLastResortFallbackFont):
- (WebCore::FontCache::createFontPlatformData):
- (WebCore::FontCache::getTraitsInFamily):
- * platform/graphics/haiku/FontHaiku.cpp: Added.
- (charUnicodeToUTF8HACK):
- (WebCore::Font::canReturnFallbackFontsForComplexText):
- (WebCore::Font::drawGlyphs):
- (WebCore::Font::drawComplexText):
- (WebCore::Font::floatWidthForComplexText):
- (WebCore::Font::selectionRectForComplexText):
- (WebCore::Font::offsetForPositionForComplexText):
- * platform/graphics/haiku/SimpleFontDataHaiku.cpp: Added.
- (WebCore::SimpleFontData::platformInit):
- (WebCore::SimpleFontData::platformCharWidthInit):
- (WebCore::SimpleFontData::platformDestroy):
- (WebCore::SimpleFontData::smallCapsFontData):
- (WebCore::SimpleFontData::containsCharacters):
- (WebCore::SimpleFontData::determinePitch):
- (WebCore::SimpleFontData::platformWidthForGlyph):
-
-2009-08-21 Philippe Beauchamp <philippe.beauchamp@gmail.com>
-
- Reviewed by Adam Roben.
-
- Middle click panning icon is offset by 3 pixels
- https://bugs.webkit.org/show_bug.cgi?id=28611
-
- * platform/ScrollView.cpp:
- panIconSizeLength initialized to 20 instead of 16 to match icon dimension (2 pixels offset)
- * platform/win/CursorWin.cpp:
- (WebCore::middlePanningCursor):
- Hotspot initialized to (8,8) instead of (7,7) (one pixel offset)
-
-2009-08-21 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Eric Seidel.
-
- [Qt] Remove inspector resources for Symbian
- https://bugs.webkit.org/show_bug.cgi?id=28610
-
- Based on an idea from Simon Hausmann.
-
- * WebCore.pro:
-
-2009-08-21 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Inspector: Remove Unused Variable
- https://bugs.webkit.org/show_bug.cgi?id=28616
-
- * inspector/front-end/Resource.js:
- (WebInspector.Resource.prototype._checkWarning):
-
-2009-08-21 Joseph Pecoraro <joepeck@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: Console Array Formatter Shows Extra Properties
- https://bugs.webkit.org/show_bug.cgi?id=28615
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype._formatarray): do not ignore hasOwnProperties
-
-2009-08-21 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- The CSS part of https://bugs.webkit.org/show_bug.cgi?id=27574 [CSS3
- Backgrounds and Borders] Add support for the "contain" value for
- background-size
- -and-
- https://bugs.webkit.org/show_bug.cgi?id=27573 [CSS3 Backgrounds and
- Borders] Add support for the "cover" value for background-size
-
- Return contain or cover when appropriate, and otherwise do what we
- used to do.
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
-
- Accept contain and cover as valid values for background-size.
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseFillProperty):
-
- Handle setting the size and the sizeLength if appropriate.
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::mapFillSize):
-
- Added new keywords contain and cover.
- * css/CSSValueKeywords.in:
-
- Use just sizeLength instead of size to match old behavior.
- * page/animation/AnimationBase.cpp:
- (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
- * rendering/RenderBoxModelObject.cpp:
- (WebCore::RenderBoxModelObject::calculateBackgroundSize):
- * rendering/RenderObject.cpp:
- (WebCore::mustRepaintFillLayers):
-
- The variable m_sizeType is an EBackgroundSize, and m_sizeLength is
- a LengthSize (the equivalent of what m_size used to be). I got rid
- of m_sizeSet and made isSizeSet() dynamic. I also defined a new
- struct, FillSize that can be used to set or get m_size and
- m_sizeLength both at once.
- * rendering/style/FillLayer.cpp:
- (WebCore::FillLayer::FillLayer):
- (WebCore::FillLayer::operator=):
- (WebCore::FillLayer::operator==):
- (WebCore::FillLayer::fillUnsetProperties):
- * rendering/style/FillLayer.h:
- (WebCore::FillSize::FillSize):
- (WebCore::FillSize::operator==):
- (WebCore::FillSize::operator!=):
- (WebCore::FillLayer::sizeLength):
- (WebCore::FillLayer::size):
- (WebCore::FillLayer::isSizeSet):
- (WebCore::FillLayer::setSizeType):
- (WebCore::FillLayer::setSizeLength):
- (WebCore::FillLayer::setSize):
- (WebCore::FillLayer::clearSize):
- (WebCore::FillLayer::initialFillSizeType):
- (WebCore::FillLayer::initialFillSizeLength):
- (WebCore::FillLayer::initialFillSize):
-
- This is all boiler-plate stuff to adjust to the new size() vs.
- sizeType() vs. sizeLength() distinction.
- * rendering/style/RenderStyle.h:
- (WebCore::InheritedFlags::backgroundSizeType):
- (WebCore::InheritedFlags::backgroundSizeLength):
- (WebCore::InheritedFlags::maskSize):
- (WebCore::InheritedFlags::setBackgroundSize):
- (WebCore::InheritedFlags::setBackgroundSizeLength):
- (WebCore::InheritedFlags::setMaskSize):
-
- Definition for EBackgroundSizeType.
- * rendering/style/RenderStyleConstants.h:
- (WebCore::):
-
-2009-08-21 Ariya Hidayat <ariya.hidayat@nokia.com>
-
- Not reviewed, build fix after r47580.
-
- [Qt] Adjust the files.
-
- * inspector/front-end/WebKit.qrc:
-
-2009-08-20 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- Enable various "grouping" ARIA roles
- https://bugs.webkit.org/show_bug.cgi?id=28486
-
- Test: platform/mac/accessibility/aria-grouping-roles.html
-
- * accessibility/AccessibilityObject.h:
- * accessibility/AccessibilityRenderObject.cpp:
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- * page/mac/WebCoreViewFactory.h:
- * platform/LocalizedStrings.h:
- * platform/mac/LocalizedStringsMac.mm:
-
-2009-08-20 David Levin <levin@chromium.org>
-
- Unreviewed trivial comment fix.
-
- Update a bug link in a comment due to bugzilla amnesia.
-
- * loader/CachedResource.cpp:
- (WebCore::CachedResource::setResourceToRevalidate):
-
-2009-08-20 Albert J. Wong <ajwong@chromium.org>
-
- Reviewed by David Levin.
-
- HTML5 media elements do not fire waiting events correctly
- https://bugs.webkit.org/show_bug.cgi?id=28335
-
- Fire the waiting event before seeking, and fix a case where firing of
- the seeked event is missed when the ready state is changed during
- a seek.
-
- Added video-waiting-seeking.html into manual tests because not
- all platforms allow seeking into non-buffered ranges.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::setReadyState): add support for
- waiting event when seeking.
- (WebCore::HTMLMediaElement::finishSeek): send seeked event
- whenever seeking finishes.
- (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): dispatch to
- new function.
- * html/HTMLMediaElement.h:
- * manual-tests/video-waiting-seeking.html: Added.
-
-2009-08-20 Dan Bernstein <mitz@apple.com>
-
- Reviewed by John Sullivan.
-
- Fix more cases of
- <rdar://problem/7154521> Lots of "<Error>: doClip: empty path." spew in
- the console with certain content
-
- If the border box is empty, simply avoid painting instead of trying to
- clip to the empty path.
-
- * rendering/RenderBoxModelObject.cpp:
- (WebCore::RenderBoxModelObject::paintFillLayerExtended):
- * rendering/RenderReplaced.cpp:
- (WebCore::RenderReplaced::paint):
- * rendering/RenderWidget.cpp:
- (WebCore::RenderWidget::paint):
-
-2009-08-20 Jeremy Orlow <jorlow@chromium.org>
-
- Build fix. Forgot a svn add for a patch I landed. :-(
-
- * storage/SQLTransactionClient.cpp: Added.
- (WebCore::SQLTransactionClient::didCommitTransaction):
- (WebCore::SQLTransactionClient::didExecuteStatement):
- (WebCore::SQLTransactionClient::didExceedQuota):
- * storage/SQLTransactionClient.h: Added.
-
-2009-08-20 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Added a client to SQLTransaction. In addition to being a place to
- get notifications about certain events in a transaction, it is
- also an abstraction layer that allows us to plug in different
- implementations for each port for how transactions interract with
- the main DB. For example, WebCore's default implementation will
- make direct calls to DatabaseTracker's methods. At the same time,
- Chromium's implementation will send IPCs to the browser process
- whenever a transaction needs something from the main DB.
-
- All storage tests pass.
-
- https://bugs.webkit.org/show_bug.cgi?id=27967
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * storage/Database.cpp:
- (WebCore::Database::transactionClient):
- * storage/Database.h:
- * storage/DatabaseThread.cpp:
- (WebCore::DatabaseThread::DatabaseThread):
- * storage/DatabaseThread.h:
- (WebCore::DatabaseThread::transactionClient):
- * storage/SQLTransaction.cpp:
- (WebCore::SQLTransaction::runCurrentStatement):
- (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
- (WebCore::SQLTransaction::postflightAndCommit):
- * storage/SQLTransactionClient.cpp: Added.
- * storage/SQLTransactionClient.h: Added.
-
-2009-08-20 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Steve Falkenburg.
-
- Fix of <https://bugs.webkit.org/show_bug.cgi?id=24793>
- Auto scroll speed is faster than in IE, Firefox.
-
- Changed pan scrolling speed to match Firefox's algorithm.
-
- * rendering/RenderLayer.cpp:
- (WebCore::adjustedScrollDelta):
- (WebCore::RenderLayer::panScrollFromPoint):
-
-2009-08-20 Stephen White <senorblanco@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Fix for assert in Chromium page cycler: drawRect() was re-using
- an SkPaint, but not resetting it before calling
- PlatformGraphicsSkia::setupPaintForFilling() a second time. This
- CL fixes drawRect(), and re-enables the assert.
- http://bugs.webkit.org/show_bug.cgi?id=28172
- http://crbug.com/19797
-
- Covered by Chromium page cycler tests.
-
- * platform/graphics/skia/PlatformContextSkia.cpp:
- (PlatformContextSkia::drawRect):
- (PlatformContextSkia::setupPaintCommon):
-
-2009-08-20 Anders Carlsson <andersca@apple.com>
+2010-01-30 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dan Bernstein.
- <rdar://problem/7159016> Popup menus don't disappear when you click outside the window.
-
- Revert r47535 which introduced this.
-
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::show):
- (WebCore::PopupWndProc):
-
-2009-08-20 David Levin <levin@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- Crashes on sites with lots of images
- https://bugs.webkit.org/show_bug.cgi?id=28473
-
- The problem is that m_resourceToRevalidate::m_isBeingRevalidated is false while
- CachedResource is still referring to it, so it may get deleted before
- Cache::revalidationSucceeded calls CachedResource::clearResourceToRevalidate.
-
- * loader/Cache.cpp:
- (WebCore::Cache::revalidateResource): Added assert to verify the resource
- being revalidated is physically in the cache.
- (WebCore::Cache::revalidationSucceeded): Changed to do one call to switch from the revalidating
- resource to the revalidated resource. This allows for proper lifetime management of the
- revalidated resource. Added assert to verify that the revalidatingResource is in the cache.
- (WebCore::Cache::pruneDeadResources): Don't remove items from the cache that are in the
- process of being validated (or else they can get added twice: Once through the normal mechanism
- and then again during revalidateResource).
-
- * loader/CachedResource.cpp:
- (WebCore::CachedResource::CachedResource):
- (WebCore::CachedResource::isSafeToMakePurgeable):
- Changed m_isBeingRevalidated to m_proxyResource to allow finding out
- who the validating resource (or proxy) is.
-
- (WebCore::CachedResource::~CachedResource): Removed code to handle m_resourceToRevalidate
- being non-zero because this shouldn't be possible due to checks in canDelete. Added asserts
- as well.
- (WebCore::CachedResource::setResourceToRevalidate): Adjusted for the change to m_proxyResource
- and added a comment about the assert.
- (WebCore::CachedResource::clearResourceToRevalidate):
- Only clean up the resourceToRevalidate if it hasn't gotten a new proxy resource.
- * loader/CachedResource.h:
- (WebCore::CachedResource::setInCache): Don't clear m_proxyResource because the resource
- is still being referred to by it and the code it robust to this being switched to a new proxy
- resource without it being cleared first.
- (WebCore::CachedResource::canDelete): Changed m_isBeingRevalidated to m_proxyResource.
-
-2009-08-20 Xiaomei Ji <xji@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Fix "Chromium RTL autocomplete popup is not layout correctly".
- https://bugs.webkit.org/show_bug.cgi?id=27889
-
- The complete fix of the issue consists 2 parts: the patch in webkit
- and the patch in Chromium's own code.
-
- This webkit patch only affects Chromium autofill. It
- 1. introduces a new flag in WebCore::PopupContainerSettings to
- distinguish whether the width of the drop-down should be restricted
- or not.
- For autofill, the width of the drop-down is restricted to
- be the same as that of the input field (the new flag is set in
- Chromium's own code). But width is not restricted for <select> (same as before).
- 2. introduce a new flag in WebCore::PopContainerSettings to
- indicate what heuristics to use when displaying text in drop-down menu.
- For autofill, use drop-down item's directionality to display drop-down items.
- Previously, drop-down item is displayed in the its first strong
- directional character's directionality.
- (drop-down item's directionality is set in Chromium's own code.
- It is set the same as the directionality of the element.
- For autofill, it is the same directionality as that of the input field.)
- For <select>, still use the text's first strong directional character's
- directionality to display the text.
-
-
- Since the patch only affects the chromium client, not webcore part or
- other clients. No automatic tests is possible.
-
- * manual-tests/autofill-popup-width-and-item-direction.html: Added.
- * platform/chromium/PopupMenuChromium.cpp:
- (WebCore::):
- (WebCore::PopupListBox::paintRow): If list box width is restricted and
- an item is longer to fit in a list box, truncate it and draw part of the text and append ellipses.
- (WebCore::PopupListBox::layout): Restrict width of list box if applicable.
- * platform/chromium/PopupMenuChromium.h:
- (WebCore::PopupItem::PopupItem): style change.
- (WebCore::PopupContainerSettings::): Add 2 new flags in PopupContainerSetting to
- distinguish whether to restrict width of list box and
- in what directionality to display the text in drop-down.
-
-2009-08-20 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Adele Peterson.
-
- Fix of <https://bugs.webkit.org/show_bug.cgi?id=28504>.
- Pan Scrolling can scroll while showing the middlePanScroll icon.
-
- Fixed an off by one error between RenderLayer::panScrollFromPoint and EventHandler::updatePanScrollState.
- In RenderLayer::panScrollFromPoint, we were setting the icon to be an arrow if the difference between the start
- of the pan scroll and the current mouseposition is > 15. However, in EventHandler::updatePanScrollState, we would
- set our amount to scroll to 0 only if the difference in mouse position is < 15. I made this check a <= 15, to fix
- the off by one error.
-
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::panScrollFromPoint):
-
-2009-08-20 David Hyatt <hyatt@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Pull the code in layoutBlockChildren for handling a normal flow block child into a helper method,
- layoutBlockChild.
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::layoutBlockChildren):
- (WebCore::RenderBlock::layoutBlockChild):
- * rendering/RenderBlock.h:
-
-2009-08-20 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Adam Roben.
-
- Made subframeForHitTargetNode a public static method, so WebView can call it
- during hit testing.
-
- * page/EventHandler.cpp:
- (WebCore::subframeForHitTestResult):
- (WebCore::EventHandler::subframeForTargetNode):
- * page/EventHandler.h:
-
-2009-08-20 Brent Fulgham <bfulgham@webkit.org>
-
- Rubberstamped by Kevin Ollivier.
-
- Check for null bundle before attempting to use it.
-
- * platform/network/curl/ResourceHandleManager.cpp:
- (WebCore::certificatePath): Add null check on return of
- CFBundleGetBundleWithIdentifier.
-
-2009-08-20 David Hyatt <hyatt@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=28497, images and inline replaced elements don't propagate overflow properly on a line.
-
- Added fast/repaint/inline-block-overflow.html and updated another test.
-
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::placeBoxesHorizontally):
- (WebCore::InlineFlowBox::computeVerticalOverflow):
- Make sure to still propagate the border box of the replaced element as layout overflow when overflow clip is set on the
- replaced element. Make sure to use the InlineBox x/y positions instead of the RenderBox x/y, since the position of the
- RenderBox has not been updated to the new values yet.
-
- * rendering/RenderLineBoxList.cpp:
- (WebCore::RenderLineBoxList::paint):
- Don't use the root line box's overflow. Use the actual line box overflow values instead. In the case of an inline
- with a layer, our overflow didn't propagate to the root line, so we always need to use our values.
-
- * rendering/RenderPartObject.cpp:
- (WebCore::RenderPartObject::layout):
- * rendering/RenderReplaced.cpp:
- (WebCore::RenderReplaced::layout):
- Make sure to clear shadow overflow when doing layout of replaced elements, so that we don't leave a stale overflow
- value around if a box-shadow goes away.
-
-2009-08-20 Dmitry Titov <dimich@chromium.org>
-
- Another attempt to fix Chromium build.
-
- * WebCore.gypi: now use the correct name of the image file.
-
-2009-08-20 Dan Bernstein <mitz@apple.com>
-
- Make the Windows build even fixeder
-
- * platform/graphics/win/GraphicsContextCGWin.cpp:
- (WebCore::GraphicsContextPlatformPrivate::flush):
-
-2009-08-20 Dmitry Titov <dimich@chromium.org>
-
- Not reviewed, Chromium build fix.
-
- * WebCore.gypi: add new Webinspector image files (localStorage.png and sessionStorage.png)
-
-2009-08-20 Dan Bernstein <mitz@apple.com>
-
- Windows build fix after the last change
-
- * platform/graphics/win/GraphicsContextCGWin.cpp:
- (WebCore::GraphicsContext::GraphicsContext):
- (WebCore::GraphicsContext::releaseWindowsContext):
- (WebCore::GraphicsContext::drawWindowsBitmap):
-
-2009-08-20 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Geoffrey Garen.
-
- Replace many manually-released CFTypeRefs with RetainPtrs
- https://bugs.webkit.org/show_bug.cgi?id=28498
-
- * platform/graphics/cg/ColorCG.cpp:
- (WebCore::createCGColor):
- * platform/graphics/cg/GradientCG.cpp:
- (WebCore::Gradient::platformGradient):
- * platform/graphics/cg/GraphicsContextCG.cpp:
- (WebCore::GraphicsContext::platformContext):
- (WebCore::GraphicsContext::applyStrokePattern):
- (WebCore::GraphicsContext::applyFillPattern):
- (WebCore::GraphicsContext::setPlatformShadow):
- (WebCore::GraphicsContext::setURLForRect):
- * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
- (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
- (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
- * platform/graphics/cg/ImageBufferCG.cpp:
- (WebCore::ImageBuffer::ImageBuffer):
- * platform/graphics/cg/ImageCG.cpp:
- (WebCore::BitmapImage::checkForSolidColor):
- (WebCore::Image::drawPattern):
- * platform/graphics/cg/ImageSourceCG.cpp:
- (WebCore::ImageSource::setData):
- (WebCore::ImageSource::isSizeAvailable):
- (WebCore::ImageSource::frameSizeAtIndex):
- (WebCore::ImageSource::repetitionCount):
- (WebCore::ImageSource::createFrameAtIndex):
- (WebCore::ImageSource::frameDurationAtIndex):
- * platform/graphics/cg/PDFDocumentImage.cpp:
- (WebCore::PDFDocumentImage::dataChanged):
- * platform/graphics/cg/PathCG.cpp:
- (WebCore::createScratchContext):
- (WebCore::Path::contains):
- * platform/graphics/mac/FontCustomPlatformData.cpp:
- (WebCore::createFontCustomPlatformData):
- * platform/graphics/mac/GraphicsContextMac.mm:
- (WebCore::GraphicsContext::drawFocusRing):
- * platform/graphics/mac/ImageMac.mm:
- (WebCore::BitmapImage::getTIFFRepresentation):
- * platform/mac/ClipboardMac.mm:
- (WebCore::cocoaTypeFromMIMEType):
- (WebCore::MIMETypeFromCocoaType):
- * platform/mac/WebCoreNSStringExtras.mm:
- (stringEncodingForResource):
- * platform/network/mac/FormDataStreamMac.mm:
- (WebCore::advanceCurrentStream):
- (WebCore::setHTTPBody):
- * platform/text/mac/TextCodecMac.cpp:
- (WebCore::TextCodecMac::encode):
-
-2009-08-20 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Output actual values of counters in showTree
- https://bugs.webkit.org/show_bug.cgi?id=28481
-
- No new tests because this patch just improves debugging outputs.
-
- * rendering/CounterNode.cpp:
- (WebCore::showTreeAndMark):
-
-2009-08-20 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by NOBODY (build fix).
-
- Add file missed in last check-in.
-
- * html/HTMLAttributeNames.in:
-
-2009-08-19 Timothy Hatcher <timothy@apple.com>
-
- Adds new icons to the Web Inspector for Local Storage,
- Session Storage and Cookies.
-
- https://bugs.webkit.org/show_bug.cgi?id=28470
-
- Reviewed by Eric Seidel.
-
- * inspector/front-end/DatabasesPanel.js:
- (WebInspector.DatabasesPanel.prototype.addDOMStorage):
- (WebInspector.DOMStorageSidebarTreeElement):
- * inspector/front-end/Images/cookie.png:
- * inspector/front-end/Images/domStorage.png: Removed.
- * inspector/front-end/Images/localStorage.png: Added.
- * inspector/front-end/Images/sessionStorage.png: Added.
- * inspector/front-end/inspector.css:
-
-2009-08-20 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Anders Carlsson.
-
- HTML5 media elements must fire 'loadend' progress event
- https://bugs.webkit.org/show_bug.cgi?id=28419
-
- * dom/EventNames.h:
- Define loadend.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::parseMappedAttribute):
- Deal with onloadend.
- (WebCore::HTMLMediaElement::loadInternal):
- Post 'loadend' immediately after 'abort'.
- (WebCore::HTMLMediaElement::noneSupported):
- Post 'loadend' immediately after 'error'.
- (WebCore::HTMLMediaElement::mediaEngineError):
- Ditto.
- (WebCore::HTMLMediaElement::setNetworkState):
- Post 'loadend' immediately after 'load'.
- (WebCore::HTMLMediaElement::userCancelledLoad):
- Post 'loadend' immediately after 'abort'.
-
-2009-08-20 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Darin Adler.
-
- REGESSION(r45316), Crash: WebKit crashes in Google Sites when indenting a table
- https://bugs.webkit.org/show_bug.cgi?id=28474
-
- This patch fixes a crash when indenting at right after a table.
- The bug was caused by Node* blockNode = enclosingBlock(endOfCurrentParagraph.deepEquivalent().node());
- where node() is equal to blockNode. Because blockNode is the enclosing block node, this patch changes it to
- enclosingBlock(endOfCurrentParagraph.deepEquivalent().node()->parentNode());
-
- Test: editing/execCommand/indent-right-after-table.html
-
- * editing/IndentOutdentCommand.cpp:
- (WebCore::IndentOutdentCommand::indentRegion): Fixed so that blockNode != endOfCurrentParagraph.deepEquivalent().node()
-
-2009-08-20 Andrew Scherkus <scherkus@chromium.org>
-
- Reviewed by David Levin.
-
- Render disabled mute button during an error or if no audio is present.
-
- https://bugs.webkit.org/show_bug.cgi?id=28475
-
- Covered by existing layout tests:
- media/video-controls-visible-audio-only.html
- media/video-no-audio.html
-
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::paintMediaMuteButton):
-
-2009-08-20 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Darin Adler.
-
- <rdar://problem/7154605> Loading page with 1px wide <select> makes the
- toolbar go blank
- and
- <rdar://problem/7154521> Lots of "<Error>: doClip: empty path." spew in
- the console with certain content
-
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderThemeMac::paintMenuListButtonGradients): Return early
- if the rectangle is empty. Use RenderStyle::getBorderRadiiForRect() to
- adjust the radii in case the sides of the rectangle are smaller than sum
- of the radii, so that the gradient background matches the border (which
- already uses getBorderRadiiForRect()). Check if bottomGradient is empty
- to avoid clipping to an empty path.
- (WebCore::RenderThemeMac::paintMenuListButton): Moved a
- GraphicContext::save() down to avoid a save/restore imbalance in the
- early return case.
-
- * rendering/RenderThemeSafari.cpp: Made the same changes.
- (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
- (WebCore::RenderThemeSafari::paintMenuListButton):
-
-2009-08-20 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Reviewed by Gustavo Noronha.
-
- [Gtk][REGRESSION] XHR test failures after r45558
- https://bugs.webkit.org/show_bug.cgi?id=27143
-
- Disable sniffing if it's explicitly requested. Updated patch
- originally by Gustavo Noronha.
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::statusWillBeHandledBySoup):
- (WebCore::gotHeadersCallback):
- (WebCore::contentSniffedCallback):
- (WebCore::gotChunkCallback):
- (WebCore::startHttp):
-
-2009-08-20 Ariya Hidayat <ariya.hidayat@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Swap the pixels since QImage expect ARGB while ImageData
- stores them as RGBA.
-
- This fixes the fast/canvas/canvas-copyPixels.html test.
-
- * platform/graphics/qt/ImageBufferQt.cpp:
- (WebCore::putImageData):
-
-2009-08-20 Christian Plesner Hansen <christian.plesner.hansen@gmail.com>
-
- Reviewed by David Levin.
-
- [v8] Use atomic string caching for createElement
- Extend atomic string caching to createElement. Fix a bug in idl
- parser that caused incorrect parsing if a function argument
- attribute list contained a comma.
- https://bugs.webkit.org/show_bug.cgi?id=28449
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/scripts/IDLParser.pm:
- * bindings/v8/V8Binding.h:
- (WebCore::v8ValueToAtomicWebCoreStringWithNullCheck):
- * dom/Document.idl:
-
-2009-08-20 Ariya Hidayat <ariya.hidayat@nokia.com>
-
- Not reviewed, build fix after r47515.
-
- [Qt] There is no Phonon::MediaObject::hasAudio() function.
-
- * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
- (WebCore::MediaPlayerPrivate::hasAudio): Assume true.
-
-2009-08-20 Darin Fisher <darin@chromium.org>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=28483
- The V8 ScriptController's cleanupScriptObjectsForPlugin should take a
- Widget* instead of void* to avoid the need for manual casting to Widget*
- at the callsite.
-
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::cleanupScriptObjectsForPlugin):
- * bindings/v8/ScriptController.h:
-
-2009-08-19 David Levin <levin@chromium.org>
-
- Unreviewed speculative build fix for qt.
-
- * page/OriginAccessEntry.cpp:
-
-2009-08-19 Aaron Boodman <aa@chromium.org>
-
- Reviewed by David Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=24853: Provide a way for WebKit clients to
- specify a more granular policy for cross-origin XHR access.
-
- Tests: http/tests/xmlhttprequest/origin-whitelisting-all.html
- http/tests/xmlhttprequest/origin-whitelisting-exact-match.html
- http/tests/xmlhttprequest/origin-whitelisting-https.html
- http/tests/xmlhttprequest/origin-whitelisting-ip-addresses-with-subdomains.html
- http/tests/xmlhttprequest/origin-whitelisting-ip-addresses.html
- http/tests/xmlhttprequest/origin-whitelisting-subdomains.html
-
- * WebCore.base.exp: Export methods to manipulate origin access whitelists to enable
- testing via layout tests.
-
- * WebCore.xcodeproj/project.pbxproj: Add OriginAccessEntry.*
- * GNUmakefile.am: Ditto.
- * WebCore.gypi: Ditto.
- * WebCore.pro: Ditto.
- * WebCore.vcproj/WebCore.vcproj: Ditto.
- * WebCoreSources.blk: Ditto.
-
- * page/SecurityOrigin.h: Implement origin access whitelists.
- (WebCore::originAccessMap): Static getter for access whitelists.
- (WebCore::SecurityOrigin::canRequest): Modify request checking logic to check whitelists.
- (WebCore::SecurityOrigin::whiteListAccessFromOrigin): Add an entry to a whitelist.
- (WebCore::SecurityOrigin::resetOriginAccessWhiteLists): Clear all the whitelists.
-
- * page/OriginAccessEntry.h: Added. An entry in an origin access whitelist.
- * page/OriginAccessEntry.cpp: Ditto.
-
-2009-08-19 Kevin Ollivier <kevino@theolliviers.com>
-
- Non-precomp headers build fix.
-
- * platform/image-decoders/ImageDecoder.cpp:
-
-2009-08-19 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Disable a bad SKIA assert
- https://bugs.webkit.org/show_bug.cgi?id=28482
-
- In http://trac.webkit.org/changeset/47386/ an assert was "fixed" in SKIA code.
- When this was pulled into Chromium, it started breaking the page cycler.
- Disable it again until we can figure out what's going on.
-
- * platform/graphics/skia/PlatformContextSkia.cpp:
- (PlatformContextSkia::setupPaintCommon):
-
-2009-08-19 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Darin Adler.
-
- queryCommandState('underline') returns false if the selected text is also bold and italic
- https://bugs.webkit.org/show_bug.cgi?id=11022
-
- This patch modifies stateStrikethrough and stateUnderline to use the value -webkit-text-decorations-in-effect
- instead of text-decoration. Because text-decoration only retrieves explicit styling at the node on which
- the query was sent, we need to use -webkit-text-decorations-in-effect to include decorations added by ancestors
- and also u, s, and strike tags.
-
- Test: editing/style/text-decoration-state.html
-
- * editing/EditorCommand.cpp:
- (WebCore::stateStrikethrough): Use -webkit-test-decorations-in-effect instead of text-decoration.
- (WebCore::stateUnderline): Ditto.
-
-2009-08-19 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Darin Adler.
-
- - Fix <rdar://problem/7155710>
- HTML selects on windows cause containing window to become inactive when opened.
-
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::show):
- Pass SWP_NOACTIVATE to SetWindowPos, remove AW_ACTIVATE from AnimateWindow and pass
- SW_SHOWNOACTIVATE to ShowWindow.
-
- (WebCore::PopupWndProc):
- Prevent mouse activation from activating the window.
-
-2009-08-19 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Darin Adler.
-
- Images flash as you hover them on http://www.atebits.com/scribbles/
- <rdar://problem/7143958>
-
- Tag images with the device colorspace with the colorspace of the main display, rather than
- GenericRGB, so that composited images color-match those rendered via Core Graphics.
-
- Covered by LayoutTests/compositing/color-matching/image-color-matching.html
-
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayerCA::setContentsToImage):
-
-2009-08-19 Anders Carlsson <andersca@apple.com>
-
- Reviewed by David Hyatt and Dan Bernstein.
-
- - Fix <rdar://problem/7152589> Stylable scrollbar corners aren't working.
-
- * page/FrameView.cpp:
- (WebCore::FrameView::FrameView):
- Initialize m_scrollCorner.
-
- (WebCore::FrameView::~FrameView):
- Assert that m_scrollCorner is null.
-
- (WebCore::FrameView::detachCustomScrollbars):
- Destroy m_scrollCorner.
-
- (WebCore::FrameView::invalidateScrollCorner):
- Invalidate the scroll corner.
-
- (WebCore::FrameView::updateScrollCorner):
- Create/destroy the scroll corner.
-
- (WebCore::FrameView::paintScrollCorner):
- Paint the scroll corner.
-
- * page/FrameView.h:
- (WebCore::FrameView::isFrameViewScrollCorner):
- Return whether a RenderScrollbarPart is the frame view scroll corner.
-
- * platform/ScrollView.cpp:
- (WebCore::ScrollView::updateScrollbars):
- Go ahead and update the scroll corner.
-
- (WebCore::ScrollView::setScrollbarsSuppressed):
- Pass the scroll corner rect to invalidateRect.
-
- (WebCore::ScrollView::scrollCornerRect):
- Return the scroll corner rect.
-
- * platform/ScrollView.h:
- * rendering/RenderScrollbarPart.cpp:
- (WebCore::RenderScrollbarPart::imageChanged):
- If this scrollbar part is the frame view scroll corner, invalidate it.
-
-2009-08-19 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- SVG feComponentTransfer needs to be implemented
- [https://bugs.webkit.org/show_bug.cgi?id=27768]
-
- Implementation of SVG Filter feComponentTransfer.
-
- There is already a test case
- Test: svg/W3C-SVG-1.1/filters-comptran-01-b.svg
-
- * platform/graphics/filters/FEComponentTransfer.cpp:
- (WebCore::identity):
- (WebCore::table):
- (WebCore::discrete):
- (WebCore::linear):
- (WebCore::gamma):
- (WebCore::FEComponentTransfer::apply):
-
-2009-08-19 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Dave Hyatt.
-
- <rdar://problem/7141522> Incorrect layout of product table at henry.com
-
- Test: fast/block/basic/quirk-percent-height-table-cell.html
-
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::calcPercentageHeight): Tweak the quirk that allows
- percentage-height children of auto-height blocks to look for an ancestor
- with non-auto height and compute their height based on it. The change is
- that if that ancestor is a table cell, it is ignored and the percent
- height computes to zero (just like in strict mode). This matches Firefox
- and IE.
-
-2009-08-19 Jungshik Shin <jshin@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Add 'icu::' qualifier when refering to ICU C+names to the other
- file with this issue missed in the previous check-in.
-
- https://bugs.webkit.org/show_bug.cgi?id=28410
-
- No change in the test result.
-
- * platform/graphics/chromium/FontUtilsChromiumWin.cpp:
- (WebCore::):
-
-2009-08-19 Peter Kasting <pkasting@google.com>
-
- Unreviewed (build fix for Skia).
-
- https://bugs.webkit.org/show_bug.cgi?id=28268
-
- * platform/graphics/skia/GraphicsContextSkia.cpp:
- (WebCore::GraphicsContext::drawLine):
-
-2009-08-19 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Reviewed by Eric Seidel.
-
- [CAIRO] Remove setFont indirection
- https://bugs.webkit.org/show_bug.cgi?id=28453
-
- Remove the indirection and just set the font in Font::drawGlyphs.
-
- * platform/graphics/SimpleFontData.h:
- * platform/graphics/cairo/FontCairo.cpp:
- (WebCore::Font::drawGlyphs):
- * platform/graphics/gtk/FontPlatformData.h:
- (WebCore::FontPlatformData::scaledFont):
- * platform/graphics/gtk/FontPlatformDataGtk.cpp:
- (WebCore::FontPlatformData::~FontPlatformData):
- * platform/graphics/gtk/FontPlatformDataPango.cpp:
- * platform/graphics/gtk/SimpleFontDataGtk.cpp:
- * platform/graphics/gtk/SimpleFontDataPango.cpp:
- * platform/graphics/win/FontPlatformData.h:
- * platform/graphics/win/FontPlatformDataCairoWin.cpp:
- * platform/graphics/win/SimpleFontDataCairoWin.cpp:
-
-2009-08-19 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: When adding style selector, generate default name based
- on id / class / type.
-
- https://bugs.webkit.org/show_bug.cgi?id=28468
-
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylesSidebarPane.prototype.appropriateSelectorForNode):
-
-2009-08-19 David Hyatt <hyatt@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Rename combinedOverflow to visibleOverflow, since that's what it actually represents.
-
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::nodeAtPoint):
- (WebCore::InlineFlowBox::paint):
- * rendering/InlineFlowBox.h:
- (WebCore::InlineFlowBox::topvisibleOverflow):
- (WebCore::InlineFlowBox::bottomvisibleOverflow):
- (WebCore::InlineFlowBox::leftvisibleOverflow):
- (WebCore::InlineFlowBox::rightvisibleOverflow):
- (WebCore::InlineFlowBox::visibleOverflowRect):
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::layoutBlock):
- (WebCore::RenderBlock::paint):
- (WebCore::RenderBlock::floatRect):
- (WebCore::RenderBlock::nodeAtPoint):
- * rendering/RenderBlock.h:
- * rendering/RenderBlockLineLayout.cpp:
- (WebCore::RenderBlock::layoutInlineChildren):
- (WebCore::RenderBlock::matchedEndLine):
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::clippedOverflowRectForRepaint):
- * rendering/RenderBox.h:
- (WebCore::RenderBox::visibleOverflowRect):
- (WebCore::RenderBox::topvisibleOverflow):
- (WebCore::RenderBox::bottomvisibleOverflow):
- (WebCore::RenderBox::leftvisibleOverflow):
- (WebCore::RenderBox::rightvisibleOverflow):
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::localBoundingBox):
- * rendering/RenderLineBoxList.cpp:
- (WebCore::RenderLineBoxList::paint):
- (WebCore::RenderLineBoxList::hitTest):
- * rendering/RenderOverflow.h:
- (WebCore::RenderOverflow::visibleOverflowRect):
- * rendering/RenderReplaced.cpp:
- (WebCore::RenderReplaced::shouldPaint):
- (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
- * rendering/RenderTable.cpp:
- (WebCore::RenderTable::layout):
- (WebCore::RenderTable::paint):
- * rendering/RenderTableCell.cpp:
- (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
-
-2009-08-19 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Eric Seidel.
-
- Sound button appears in controller with movies that have no audio
- https://bugs.webkit.org/show_bug.cgi?id=28464
-
- Test: media/video-no-audio.html
-
- * html/HTMLMediaElement.cpp:
- * html/HTMLMediaElement.h:
- (WebCore::HTMLMediaElement::hasAudio):
- Added hasAudio.
-
- * platform/graphics/MediaPlayer.h:
- * platform/graphics/MediaPlayer.cpp:
- (WebCore::NullMediaPlayerPrivate::hasAudio):
- (WebCore::MediaPlayer::hasVideo):
- Make const.
- (WebCore::MediaPlayer::hasAudio):
- Added hasAudio.
-
- * platform/graphics/MediaPlayerPrivate.h:
- Add hasAudio.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::hasAudio):
- Ditto.
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::hasAudio):
- Ditto.
-
- * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
- * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
- (WebCore::MediaPlayerPrivate::hasAudio):
- Ditto.
-
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
- (WebCore::MediaPlayerPrivate::hasAudio):
- Ditto.
-
- * platform/graphics/win/QTMovieWin.h:
- * platform/graphics/win/QTMovieWin.cpp:
- (QTMovieWin::hasAudio):
- Ditto.
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlMuteButtonElement::disabled):
- New, return true if media element doesn't have audio.
- (WebCore::MediaControlMuteButtonElement::rendererIsNeeded):
- Renderer is not needed if element has no audio.
- * rendering/MediaControlElements.h:
- (WebCore::MediaControlInputElement::disabled):
-
- * rendering/RenderThemeMac.mm:
- (WebCore::getMediaUIPartStateFlags):
- Return MediaUIPartDisabledFlag if node is disabled.
-
-
-2009-08-19 Michelangelo De Simone <micdesim@gmail.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=27357
- Removed the two unnecessary overridden willValidate() methods introduced
- in r47444.
-
- * html/HTMLKeygenElement.h:
- * html/HTMLObjectElement.h:
-
-2009-08-19 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Allow dumping dangling nodes to the console.
-
- https://bugs.webkit.org/show_bug.cgi?id=28458
-
- * bindings/js/JSInspectorBackendCustom.cpp:
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8InspectorBackendCustom.cpp:
- * inspector/InspectorBackend.cpp:
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::clearConsoleMessages):
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::releaseDanglingNodes):
- (WebCore::InspectorDOMAgent::startListening):
- (WebCore::InspectorDOMAgent::stopListening):
- (WebCore::InspectorDOMAgent::handleEvent):
- (WebCore::InspectorDOMAgent::bind):
- (WebCore::InspectorDOMAgent::unbind):
- (WebCore::InspectorDOMAgent::pushDocumentToFrontend):
- (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
- (WebCore::InspectorDOMAgent::discardBindings):
- (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
- (WebCore::InspectorDOMAgent::buildObjectForNode):
- (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
- * inspector/InspectorDOMAgent.h:
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::setDetachedRoot):
- (WebCore::InspectorFrontend::childNodeCountUpdated):
- * inspector/InspectorFrontend.h:
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype._formatnode):
- * inspector/front-end/DOMAgent.js:
- (WebInspector.DOMAgent.prototype._setDetachedRoot):
- (WebInspector.DOMAgent.prototype._childNodeCountUpdated):
- (WebInspector.setDetachedRoot):
- (WebInspector.childNodeCountUpdated):
- (InspectorController.pushNodeToFrontend):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.pushNodeToFrontend):
- (InjectedScript.createProxyObject):
-
-2009-08-19 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Anders Carlsson.
-
- https://bugs.webkit.org/show_bug.cgi?id=27464
- Implement application cache online whitelist wildcard flag
-
- Test: http/tests/appcache/whitelist-wildcard.html
-
- A "*" in NETWORK section means that network loading needn't be blocked.
-
- * loader/appcache/ApplicationCache.cpp:
- (WebCore::ApplicationCache::isURLInOnlineWhitelist):
- * loader/appcache/ApplicationCache.h:
- (WebCore::ApplicationCache::setAllowsAllNetworkRequests):
- (WebCore::ApplicationCache::allowsAllNetworkRequests):
- * loader/appcache/ApplicationCacheGroup.cpp:
- (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
- * loader/appcache/ApplicationCacheStorage.cpp:
- (WebCore::ApplicationCacheStorage::openDatabase):
- (WebCore::ApplicationCacheStorage::store):
- (WebCore::ApplicationCacheStorage::loadCache):
- * loader/appcache/ManifestParser.cpp:
- (WebCore::parseManifest):
- * loader/appcache/ManifestParser.h:
-
-2009-08-19 Brady Eidson <beidson@apple.com>
-
- Reviewed by Kevin Decker.
-
- <rdar://problem/7042555> Loading certain pages on Tiger will start a spurious download
-
- Get rid of method swizzling entirely. This created problems when lower level
- Foundation code would call into our own swizzled method.
-
- * platform/network/mac/ResourceHandleMac.mm:
- (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
- * platform/network/mac/WebCoreURLResponse.h:
- * platform/network/mac/WebCoreURLResponse.mm:
- (-[NSURLResponse adjustMIMETypeIfNecessary]):
-
-2009-08-19 Adam Roben <aroben@apple.com>
-
- Fix linker warnings on Windows
-
- Reviewed by Anders Carlsson.
-
- Fixes <http://webkit.org/b/28462> WebCore causes linker warnings on
- Windows about multiply-defined JSHTMLDataListElement symbols
-
- * WebCore.vcproj/WebCore.vcproj: Exclude JSHTMLDataListElement.cpp
- from the build (just like we do for the other generated bindings
- files) so that we don't get warnings about multiply-defined symbols in
- JSHTMLDataListElement.cpp and DerivedSources.cpp. Also removed
- duplicate versions of JSSVGElementWrapperFactory.cpp, and let VS
- reorder a few files.
-
-2009-08-19 Jungshik Shin <jshin@chromium.org>
-
- Reviewed by Eric Seidel
-
- Add 'icu::' qualifier when refering to ICU C+names.
-
- https://bugs.webkit.org/show_bug.cgi?id=28410
-
- No change in the test result.
-
- * platform/graphics/chromium/FontCacheChromiumWin.cpp:
- (WebCore::fontContainsCharacter):
-
-2009-08-19 David Hyatt <hyatt@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Cleanup from my patch thet rewrote overflow. Remove unused member variables from RenderTableSection and
- move the addition of overflow from children into a separate pass after the height of the section has been
- set. This prevents the RenderOverflow struct from being aggressively allocated for all table sections.
- (Not a a correctness issue, just a memory issue.)
-
- * rendering/RenderTableSection.cpp:
- (WebCore::RenderTableSection::RenderTableSection):
- (WebCore::RenderTableSection::layoutRows):
- * rendering/RenderTableSection.h:
-
-2009-08-19 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Reviewed by Xan Lopez.
-
- [Gtk] Remove bogus dependency rules for built sources that derive
- from HTMLTagNames.in, HTMLAttributeNames.in and xmlattrs.in. The
- header files should be generated regardless of whether the source
- file changed or not. We should only rely on the *.in files being
- changed.
-
- * GNUmakefile.am:
-
-2009-08-18 Maciej Stachowiak <mjs@apple.com>
-
- Reviewed by Oliver Hunt.
-
- convert FormatBlock candidate tag list from if chain to hash lookup
- https://bugs.webkit.org/show_bug.cgi?id=28448
-
- No behavior change, just cleanup.
-
- * editing/htmlediting.cpp:
- (WebCore::validBlockTag):
- * editing/htmlediting.h:
-
-2009-08-19 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by Eric Seidel.
-
- Update GraphicsContextSkia's version of drawLine to make use of the shared
- adjustLineToPixelBoundaries function and elimination overlapping code.
-
- https://bugs.webkit.org/show_bug.cgi?id=28268
-
- * platform/graphics/skia/GraphicsContextSkia.cpp:
- (WebCore::GraphicsContext::drawLine):
-
-2009-08-18 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by Eric Seidel.
-
- Style fixes based on cpp_style.py and WebKit Style guide for
- GraphicsContextSkia.cpp
-
- https://bugs.webkit.org/show_bug.cgi?id=28268
-
- * platform/graphics/skia/GraphicsContextSkia.cpp:
- (WebCore::GraphicsContext::addInnerRoundedRectClip):
- (WebCore::GraphicsContext::drawFocusRing):
- (WebCore::GraphicsContext::roundToDevicePixels):
- (WebCore::GraphicsContext::setLineDash):
- (WebCore::GraphicsContext::setPlatformShadow):
-
-2009-08-18 Alexey Proskuryakov <ap@webkit.org>
-
- Reviewed by Maciej Stachowiak.
-
- https://bugs.webkit.org/show_bug.cgi?id=28446
- Custom request headers shouldn't be sent with cross-origin preflight request
-
- Tests: http/tests/xmlhttprequest/access-control-preflight-headers-async.html
- http/tests/xmlhttprequest/access-control-preflight-headers-sync.html
-
- * loader/DocumentThreadableLoader.cpp:
- (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
- Don't copy headers to OPTIONS request. The spec is vague about this, but the intention was
- that they shouldn't be sent, and Firefox doesn't send them.
-
-2009-08-18 John Gregg <johnnyg@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- V8 Bindings for Desktop Notifications feature.
- https://bugs.webkit.org/show_bug.cgi?id=28271
-
- * WebCore.gypi:
- added notification files to build (all still behind a flag that's not on)
- * bindings/scripts/CodeGeneratorV8.pm:
- added special case in DOMWindow/AppCache style for named event handlers
- * bindings/v8/DOMObjectsInclude.h:
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getTemplate):
- (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
- * bindings/v8/V8Proxy.h:
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::WorkerContextExecutionProxy::convertToV8Object):
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8NotificationCenterCustom.cpp: Added.
- * notifications/Notification.h:
- made event handler routines public (as they are in DOMWindow, eg) for
- binding access.
- * notifications/NotificationCenter.idl:
- needed to make methods V8Custom to support different behaviors in
- worker/page context in chromium.
- * workers/WorkerThread.h:
- (WebCore::WorkerThread::getNotificationPresenter):
- (WebCore::WorkerThread::setNotificationPresenter):
- needed to make these methods public as well so chromium can inject
- the notification presenter into the worker thread.
-
-2009-08-13 Maciej Stachowiak <mjs@apple.com>
-
- Reviewed by Sam Weinig.
-
- - Implement HTML5 nav element
- https://bugs.webkit.org/show_bug.cgi?id=27937
-
- <nav> should behave essentially the same as <div> for parsing
- etc. This is implemented by the changes below.
-
- Tests: fast/html/nav-element.html
-
- * css/html.css:
- * editing/htmlediting.cpp:
- (WebCore::validBlockTag):
- * html/HTMLElement.cpp:
- (WebCore::HTMLElement::tagPriority):
- (WebCore::blockTagList):
- * html/HTMLParser.cpp:
- (WebCore::HTMLParser::getNode):
- * html/HTMLTagNames.in:
-
-2009-08-18 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Adele Peterson, David Hyatt and Dan Bernstein.
-
- - Fix <rdar://problem/7152727>
-
- If a page has custom scroll bars, they will not update correctly when the window is activated/deactivated.
-
- * page/FrameView.cpp:
- (WebCore::FrameView::hasCustomScrollbars):
- Check if the frame view or any of its subviews have custom scroll bars.
-
- (WebCore::FrameView::updateControlTints):
- Go ahead and update control tints if the frame view has custom scroll bars.
-
- * page/FrameView.h:
-
-2009-08-18 Mark Rowe <mrowe@apple.com>
-
- Roll out r47477 as it introduced assertion failures and crashes on the build bots.
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * storage/Database.cpp:
- * storage/Database.h:
- * storage/DatabaseThread.cpp:
- (WebCore::DatabaseThread::DatabaseThread):
- * storage/DatabaseThread.h:
- * storage/SQLTransaction.cpp:
- (WebCore::SQLTransaction::runCurrentStatement):
- (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
- (WebCore::SQLTransaction::postflightAndCommit):
- * storage/SQLTransactionClient.cpp: Removed.
- * storage/SQLTransactionClient.h: Removed.
-
-2009-08-18 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- [Haiku] Adding the SharedTimer file for WebCore.
- https://bugs.webkit.org/show_bug.cgi?id=28126
-
- * platform/haiku/SharedTimerHaiku.cpp: Added.
- (WebCore::):
- (WebCore::SharedTimerHaiku::SharedTimerHaiku):
- (WebCore::SharedTimerHaiku::~SharedTimerHaiku):
- (WebCore::SharedTimerHaiku::instance):
- (WebCore::SharedTimerHaiku::start):
- (WebCore::SharedTimerHaiku::stop):
- (WebCore::SharedTimerHaiku::Filter):
- (WebCore::setSharedTimerFiredFunction):
- (WebCore::setSharedTimerFireTime):
- (WebCore::stopSharedTimer):
-
-2009-08-18 Mark Rowe <mrowe@apple.com>
-
- Release build fix.
-
- * xml/XMLHttpRequest.cpp: Sprinkle some #ifndef NDEBUG around.
- (WebCore::XMLHttpRequest::XMLHttpRequest):
- (WebCore::XMLHttpRequest::~XMLHttpRequest):
-
-2009-08-18 Aaron Boodman <aa@chromium.org>
-
- Reviewed by Maciej Stachowiak.
-
- https://bugs.webkit.org/show_bug.cgi?id=28412: Leak of WebCore::XMLHttpRequest object during layout tests.
-
- No new tests: Already covered by existing tests.
-
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::XMLHttpRequest): Add instrumentation for this kind of leak.
- (WebCore::XMLHttpRequest::~XMLHttpRequest): Ditto.
- (WebCore::XMLHttpRequest::createRequest): Only setPendingActivity() if we actually started a request. Also,
- restore a call to nonCacheRequestInFlight() that got lost in a recent refactor.
-
-2009-08-18 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Added a client to SQLTransaction. In addition to being a place to
- get notifications about certain events in a transaction, it is
- also an abstraction layer that allows us to plug in different
- implementations for each port for how transactions interract with
- the main DB. For example, WebCore's default implementation will
- make direct calls to DatabaseTracker's methods. At the same time,
- Chromium's implementation will send IPCs to the browser process
- whenever a transaction needs something from the main DB.
-
- All storage tests pass.
-
- https://bugs.webkit.org/show_bug.cgi?id=27967
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * storage/Database.cpp:
- (WebCore::Database::transactionClient):
- * storage/Database.h:
- * storage/DatabaseThread.cpp:
- (WebCore::DatabaseThread::DatabaseThread):
- * storage/DatabaseThread.h:
- (WebCore::DatabaseThread::transactionClient):
- * storage/SQLTransaction.cpp:
- (WebCore::SQLTransaction::runCurrentStatement):
- (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
- (WebCore::SQLTransaction::postflightAndCommit):
- * storage/SQLTransactionClient.cpp: Added.
- * storage/SQLTransactionClient.h: Added.
-
-2009-08-18 Julie Parent <jparent@chromium.org>
-
- Not reviewed, build fix for Chromium.
-
- Final change for v8 corresponding to http://trac.webkit.org/changeset/47469.
-
- * bindings/v8/custom/V8HTMLFrameElementCustom.cpp: Added missing using statment
-
-2009-08-18 Julie Parent <jparent@chromium.org>
-
- Not reviewed, build fix for Chromium.
-
- More corresponding changes to V8 from http://trac.webkit.org/changeset/47469.
-
- * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
- (WebCore::ACCESSOR_SETTER): Use srcAttr instead of the src function.
-
-2009-08-18 Julie Parent <jparent@chromium.org>
-
- Not reviewed, build fix for Chromium.
-
- Make corresponding changes to V8 from http://trac.webkit.org/changeset/47469.
-
- * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
- (WebCore::ACCESSOR_SETTER): Use srcAttr instead of the src function.
-
-2009-08-18 Dan Bernstein <mitz@apple.com>
-
- Build fix.
-
- * editing/ApplyStyleCommand.cpp:
- (WebCore::getIdentifierValue):
-
-2009-08-18 Darin Adler <darin@apple.com>
-
- Reviewed by Sam Weinig.
-
- More work on making DOM classes start with reference count of 1
- https://bugs.webkit.org/show_bug.cgi?id=28068
-
- Some related clean-up and preparation steps so the subsequent
- patches will be as small as possible.
-
- * WebCore.base.exp: Sorted this file.
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::accessibilityDescription):
- Use nameAttr instead of the name function.
-
- * bindings/js/JSHTMLFrameElementCustom.cpp:
- (WebCore::JSHTMLFrameElement::setSrc):
- Use srcAttr instead of the src function.
-
- * bindings/js/JSHTMLIFrameElementCustom.cpp:
- (WebCore::JSHTMLIFrameElement::setSrc):
- Use srcAttr instead of the src function.
-
- * bindings/objc/DOM.mm: Sorted includes.
- * dom/Document.cpp: Ditto.
-
- * dom/StyledElement.cpp: Made invalidateStyleAttribute inline.
- * dom/StyledElement.h: Ditto.
-
- * dom/make_names.pl: Changed default of createWithNew to 0.
- Eventually all elements will be created with create instead of new.
-
- * html/HTMLTagNames.in:
- * svg/svgtags.in:
- * wml/WMLTagNames.in:
- Added createWithNew for every tag. We'll remove it as we convert
- element classes to use create.
-
- * html/HTMLAppletElement.h: Removed unneeded forward declarations.
- * html/HTMLFrameElement.h: Ditto.
-
- * html/HTMLEmbedElement.cpp: Removed many attribute get and
- set functions.
- * html/HTMLEmbedElement.h: Ditto.
- * html/HTMLIFrameElement.cpp: Ditto.
- * html/HTMLIFrameElement.h: Ditto.
- * html/HTMLObjectElement.cpp: Ditto.
- * html/HTMLObjectElement.h: Ditto.
- * html/HTMLPlugInElement.cpp: Ditto.
- * html/HTMLPlugInElement.h: Ditto.
-
- * html/HTMLFrameElementBase.cpp: Removed many attribute get and
- set functions.
- (WebCore::HTMLFrameElementBase::location): Changed to use
- srcAttr instead of src.
- * html/HTMLFrameElementBase.h: Removed many attribute get and set
- functions.
-
- * loader/MediaDocument.cpp:
- (WebCore::MediaDocument::replaceMediaElementTimerFired):
- Use srcAttr and typeAttr instead of setSrc and setType.
- * loader/PluginDocument.cpp:
- (WebCore::PluginTokenizer::createDocumentStructure): Ditto.
-
- * rendering/RenderPartObject.cpp:
- (WebCore::RenderPartObject::updateWidget): Use nameAttr instead
- of name -- this avoids an extra AtomicString round trip and a little
- ref count churn too.
-
-2009-08-18 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- SharedWorkers need to support loading.
- https://bugs.webkit.org/show_bug.cgi?id=28342
-
- Added loader support to shared workers, and refactored worker tests to also test SharedWorkers
-
- * workers/DefaultSharedWorkerRepository.cpp:
- (WebCore::SharedWorkerProxy::postTaskToLoader):
- Forwards load requests to an arbitrary document from the list of worker's documents.
- (WebCore::SharedWorkerProxy::postTaskForModeToWorkerContext):
- Posts responses back to the shared worker thread.
-
-2009-08-18 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Darin Adler.
-
- StyleChange::init needs clean up before fixing the bug 23892
- https://bugs.webkit.org/show_bug.cgi?id=27749
-
- This patch simplifies StyleChange::init by removing the iteration on CSS properties,
- and adding functions reconcileTextDecorationProperties and extractTextStyle to handle the style.
-
- Because there is a bug in how text decorations are processes in getPropertiesNotInComputedStyle,
- this patch simplifies the treatment in order to preserve the original behavior of WebKit.
- However, the current implementation is not best (adds redundant text-decorations) and we should fix it later.
-
- No test is added since there is no change in behavior.
-
- * editing/ApplyStyleCommand.cpp:
- (WebCore::StyleChange::init): Uses getPropertiesNotInComputedStyle instead of iterating through the properties
- (WebCore::StyleChange::reconcileTextDecorationProperties): Removes -webkit-text-decorations-in-effects and redundant "none"
- (WebCore::getIdentifierValue): Obtains the identifier of a CSSPrimitiveValue
- (WebCore::StyleChange::extractTextStyles): Converts properties in style to m_apply* and removes the property
- (WebCore::getPropertiesNotInComputedStyle): Fixed a bug with how text decorations are treated
-
-2009-08-18 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Fixing a DB file naming bug in Chromium. The origin should come
- before the DB name in the file name.
-
- https://bugs.webkit.org/show_bug.cgi?id=28331
-
- * storage/DatabaseTracker.cpp:
- (WebCore::DatabaseTracker::fullPathForDatabase):
-
-2009-08-18 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- [Haiku] Adding four image-specific files to WebCore:
- IconHaiku.cpp, ImageBufferData.h, ImageBufferHaiku.cpp, ImageHaiku.cpp
- https://bugs.webkit.org/show_bug.cgi?id=28130
+ Use CGGradient on Leopard and later, since it's faster than CGShading
+ https://bugs.webkit.org/show_bug.cgi?id=34384
- * platform/graphics/Icon.h:
- * platform/graphics/haiku/IconHaiku.cpp: Added.
- (WebCore::Icon::~Icon):
- (WebCore::Icon::createIconForFile):
- (WebCore::Icon::createIconForFiles):
- (WebCore::Icon::paint):
- * platform/graphics/haiku/ImageBufferData.h: Added.
- * platform/graphics/haiku/ImageBufferHaiku.cpp: Added.
- (WebCore::ImageBufferData::ImageBufferData):
- (WebCore::ImageBuffer::ImageBuffer):
- (WebCore::ImageBuffer::~ImageBuffer):
- (WebCore::ImageBuffer::context):
- (WebCore::ImageBuffer::getUnmultipliedImageData):
- (WebCore::ImageBuffer::getPremultipliedImageData):
- (WebCore::ImageBuffer::putUnmultipliedImageData):
- (WebCore::ImageBuffer::putPremultipliedImageData):
- (WebCore::ImageBuffer::toDataURL):
- (WebCore::ImageBuffer::image):
- (WebCore::ImageBuffer::platformTransformColorSpace):
- * platform/graphics/haiku/ImageHaiku.cpp: Added.
- (WebCore::FrameData::clear):
- (WebCore::Image::loadPlatformResource):
- (WebCore::BitmapImage::initPlatformData):
- (WebCore::BitmapImage::invalidatePlatformData):
- (WebCore::BitmapImage::draw):
- (WebCore::Image::drawPattern):
- (WebCore::BitmapImage::checkForSolidColor):
- (WebCore::BitmapImage::getBBitmap):
+ Use CGGradient on Leopard and later, rather than CGShading, for
+ performance.
-2009-08-18 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=27575 [CSS3
- Backgrounds and Borders] Drop the prefix from background-size
-
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::):
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue):
- (WebCore::CSSParser::parseFillProperty):
- (WebCore::cssPropertyID):
- * css/CSSPropertyNames.in:
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty):
- * page/animation/AnimationBase.cpp:
- (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
- (WebCore::ensurePropertyMap):
-
-2009-08-18 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- SharedWorkers need to forward exceptions to parent documents
- https://bugs.webkit.org/show_bug.cgi?id=28320
-
- Changed SharedWorkerProxy to have individual mutexes (so workers can interact with their parent documents without contention).
-
- Updated SharedWorkerProxy to forward exceptions/console messages to all parent documents.
-
- * bindings/js/JSSharedWorkerConstructor.cpp:
- Cleaned up bitrot - added missing include.
- * workers/DefaultSharedWorkerRepository.cpp:
- (WebCore::postExceptionTask):
- Callback used to deliver exceptions to a document.
- (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
- Forwards exceptions to all parent documents for presentation to the user.
- (WebCore::postConsoleMessageTask):
- (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
- Forwards console messages to all parent documents for presentation to the user.
- (WebCore::SharedWorkerProxy::addToWorkerDocuments):
- Grabs the mutex before accessing workerDocuments.
- (WebCore::SharedWorkerProxy::documentDetached):
- Grabs the mutex before accessing workerDocuments.
-
-2009-08-18 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Adele Peterson.
-
- <rdar://problem/7135588> HTMLMediaElement should ask WebPolicyLoadDelegate before loading resource
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::isSafeToLoadURL):
- Call FrameLoaderClient::shouldLoadMediaElementURL.
-
- * loader/FrameLoaderClient.h:
- (WebCore::FrameLoaderClient::shouldLoadMediaElementURL):
- Return true by default.
-
-2009-08-18 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- openDatabase() should not execute any SQL statement on the
- database it's trying to open, unless there are no other open
- handles to the same database. Otherwise, we might run into a
- deadlock.
-
- Test: storage/open-database-while-transaction-in-progress.html
-
- https://bugs.webkit.org/show_bug.cgi?id=28207
-
- * storage/Database.cpp:
- (WebCore::Database::performOpenAndVerify):
-
-2009-08-18 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- SVG Filter feBlend implementation missing
- [https://bugs.webkit.org/show_bug.cgi?id=28133]
-
- Implementation of SVG Filter feBlend.
-
- FilterEffect.cp needed changes to optimize the rendering. With the old code
- we drew a subEffect on the current FilterEffect by drawImage, got the PixelArray,
- cleared the drawing area, drew the next FilterEffect with drawImage and picked this
- PixelArray again. This was unefficient and slow. Now we calculate the requested area
- of the subEffect and ask the FilterEffect's ImageBuffer for the PixelArray directly,
- without any drawing operations on GraphicsContext.
-
- There is already a test case
- Test: svg/W3C-SVG-1.1/filters-blend-01-b.svg
-
- * html/canvas/CanvasPixelArray.h:
- (WebCore::CanvasPixelArray::set):
- (WebCore::CanvasPixelArray::get):
- * platform/graphics/filters/FEBlend.cpp:
- (WebCore::unknown):
- (WebCore::normal):
- (WebCore::multiply):
- (WebCore::screen):
- (WebCore::darken):
- (WebCore::lighten):
- (WebCore::FEBlend::apply):
- * platform/graphics/filters/FEBlend.h:
- * platform/graphics/filters/FilterEffect.cpp:
- (WebCore::FilterEffect::calculateDrawingIntRect):
- * platform/graphics/filters/FilterEffect.h:
-
-2009-08-18 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Fix array formatter followup: node formatter.
-
- https://bugs.webkit.org/show_bug.cgi?id=28427
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype._format):
-
-2009-08-18 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Metrics sidebar broken
-
- https://bugs.webkit.org/show_bug.cgi?id=28434
-
- * inspector/front-end/MetricsSidebarPane.js:
-
-2009-08-18 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=28432
- String::createCFString() returns a non-retained empty string
-
- No known change in functionality, so no test.
-
- * platform/text/cf/StringCF.cpp: (WebCore::String::createCFString): Retain the CFSTR result.
-
-2009-08-18 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Fix of <https://bugs.webkit.org/show_bug.cgi?id=28326> DRT on Windows doesn't support
- LayoutTestController::setQuota or print a callback on UIDelegate::exceededDatabaseQuota.
-
- Removed an early return that can cause deleteOrigin or deleteAllDatabases to fail when
- it doesn't have to.
-
- * storage/DatabaseTracker.cpp:
- (WebCore::DatabaseTracker::deleteOrigin):
-
-2009-08-18 Michelangelo De Simone <micdesim@gmail.com>
-
- Reviewed by Adele Peterson.
-
- https://bugs.webkit.org/show_bug.cgi?id=27357
- Support for :valid and :invalid CSS selectors, from HTML5 specs.
- http://www.whatwg.org/specs/web-apps/current-work/#selector-valid
-
- Tests: fast/css/pseudo-invalid-001.html
- fast/css/pseudo-invalid-002.html
- fast/css/pseudo-valid-001.html
- fast/css/pseudo-valid-002.html
- fast/css/pseudo-valid-003.html
- fast/css/pseudo-valid-004.html
- fast/css/pseudo-valid-005.html
- fast/css/pseudo-valid-006.html
- fast/css/pseudo-valid-007.html
-
- * css/CSSSelector.cpp:
- (WebCore::CSSSelector::extractPseudoType): extracts new pseudo-classes
- * css/CSSSelector.h:
- (WebCore::CSSSelector::):
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::canShareStyleWithElement): Make sure we don't share style between
-form controls that have different validity states.
- (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): applies
- style associated to new pseudo-classes
- * dom/Element.h:
- (WebCore::Element::willValidate): pushed up in hierarchy
- (WebCore::Element::isValidFormControlElement): checks for valid form
- control elements (wraps ValidityState::valid())
- * html/HTMLFormControlElement.cpp:
- (WebCore::HTMLFormControlElement::willValidate): minor clean up
- (WebCore::HTMLFormControlElement::isValidFormControlElement): ditto
- * html/HTMLFormControlElement.h:
- * html/HTMLKeygenElement.h:
- (WebCore::HTMLKeygenElement::willValidate): added
- * html/HTMLObjectElement.h:
- (WebCore::HTMLObjectElement::willValidate): added
- * html/HTMLObjectElement.idl:
-
-2009-08-18 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Fix array formatter.
-
- https://bugs.webkit.org/show_bug.cgi?id=28427
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype._formatarray):
-
-2009-08-17 Joe Mason <joe.mason@torchmobile.com>
-
- Reviewed by George Staikos
-
- Replace repeated string of PLATFORM(FOO) with a single define
- https://bugs.webkit.org/show_bug.cgi?id=27734
-
- * loader/CachedFont.cpp:
- (WebCore::CachedFont::~CachedFont):
- (WebCore::CachedFont::ensureCustomFontData):
- (WebCore::CachedFont::platformDataFromCustomData):
- (WebCore::CachedFont::allClientsRemoved):
-
-2009-08-16 David Hyatt <hyatt@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=20329, shadows and reflections incorrectly
- considered part of scrollable overflow.
-
- This patch takes the engine's concept of overflow and splits it into two types:
- layout overflow and visual overflow.
-
- Layout overflow is about other boxes that spill out of an enclosing box, For example,
- in the inline flow case a tall image could spill out of a line box. Examples of
- visual overflow are shadows, text stroke (and eventually outline and
- border-image).
-
- Three objects tracked overflow before this patch: RenderBlock had
- m_overflowLeft/Top/Width/Height variables. RootInlineBox had an Overflow*
- that also had four overflow values. Finally RenderReplaced elements tracked shadow/reflection
- overflow using a map that cached four values.
-
- This patch takes all of these different overflow models and unifies them into a single
- new class called RenderOverflow. This class is now a member variable in RenderBox and
- InlineFlowBoxes. It is only allocated if overflow actually exists. Instead of tracking
- four values, it tracks eight: left/top/right/bottom for layout overflow and
- left/top/right/bottom for visual overflow.
-
- Overflow computation is now done after layout is finished rather than during layout
- (when child objects can be churning and moving around). A number of layout tests progressed
- by deferring overflow computation to a separate pass.
-
- All inline flow boxes now track overflow (and not just the root line box). This allows
- repainting of line boxes to actually be tight and bail early if the overflow rect of a box
- doesn't intersect. The old code always visited all object on a line if the root line box
- intersected at all.
-
- Line box overflow no longer propagates across self-painting layers. This fixes a number of
- issues with incorrect scrollbars appearing when relative positioned inlines were used in a page.
-
- Layer bounds have been modified to exclude visual overflow. The width/height members only really
- have one reason for continued existence, and that is that they happen to be used in repaint()
- when an overflow clip object's height isn't accurate. In this case, the bounds should exclude
- visual overflow anyway, so this change tightens that repaint up.
-
- Root lines have renamed m_selectionTop/Bottom to m_lineTop/Bottom and positionForPoint methods have
- been changed to use these instead of relying on overflow (which was totally wrong).
-
- Significant changes have been made to the "almost strict mode" line box quirk where objects with no
- text children have no effect on the height of a line. Instead of making the height() of the objects
- variable and dependent on overflow, the objects now have their full height and get placed on
- the baseline properly. They simply don't contribute to overflow above lineTop/Bottom.
-
- Reflections are no longer considered overflow of any kind. Because reflections have their own layers,
- it is not necessary to treat them as visual or layout overflow in the RenderObject tree. The end result
- of not incorporating them into RenderOverflow is that they have no effect on scrolling. transparencyClipBox
- has been extended to support fully reflecting the entire clip box when a reflection exists. This fixes
- numerous repaint bugs in transparent objects with reflections when the transparent objects had self-painting
- sublayers.
-
- * WebCore.xcodeproj/project.pbxproj:
- * dom/ContainerNode.cpp:
- (WebCore::ContainerNode::getUpperLeftCorner):
- * editing/visible_units.cpp:
- (WebCore::previousLinePosition):
- (WebCore::nextLinePosition):
- * page/FrameView.cpp:
- (WebCore::FrameView::adjustViewSize):
- (WebCore::FrameView::adjustPageHeight):
- * rendering/InlineBox.cpp:
- (WebCore::InlineBox::height):
- * rendering/InlineBox.h:
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::adjustPosition):
- (WebCore::InlineFlowBox::placeBoxesHorizontally):
- (WebCore::InlineFlowBox::placeBoxesVertically):
- (WebCore::InlineFlowBox::computeVerticalOverflow):
- (WebCore::InlineFlowBox::nodeAtPoint):
- (WebCore::InlineFlowBox::paint):
- * rendering/InlineFlowBox.h:
- (WebCore::InlineFlowBox::InlineFlowBox):
- (WebCore::InlineFlowBox::topCombinedOverflow):
- (WebCore::InlineFlowBox::bottomCombinedOverflow):
- (WebCore::InlineFlowBox::leftCombinedOverflow):
- (WebCore::InlineFlowBox::rightCombinedOverflow):
- (WebCore::InlineFlowBox::combinedOverflowRect):
- (WebCore::InlineFlowBox::topLayoutOverflow):
- (WebCore::InlineFlowBox::bottomLayoutOverflow):
- (WebCore::InlineFlowBox::leftLayoutOverflow):
- (WebCore::InlineFlowBox::rightLayoutOverflow):
- (WebCore::InlineFlowBox::layoutOverflowRect):
- (WebCore::InlineFlowBox::topVisualOverflow):
- (WebCore::InlineFlowBox::bottomVisualOverflow):
- (WebCore::InlineFlowBox::leftVisualOverflow):
- (WebCore::InlineFlowBox::rightVisualOverflow):
- (WebCore::InlineFlowBox::visualOverflowRect):
- (WebCore::InlineFlowBox::setHorizontalOverflowPositions):
- (WebCore::InlineFlowBox::setVerticalOverflowPositions):
- * rendering/InlineTextBox.cpp:
- (WebCore::InlineTextBox::paint):
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::RenderBlock):
- (WebCore::RenderBlock::layout):
- (WebCore::RenderBlock::layoutBlock):
- (WebCore::RenderBlock::addOverflowFromBlockChildren):
- (WebCore::RenderBlock::handleBottomOfBlock):
- (WebCore::RenderBlock::layoutBlockChildren):
- (WebCore::RenderBlock::paint):
- (WebCore::RenderBlock::fillInlineSelectionGaps):
- (WebCore::RenderBlock::floatRect):
- (WebCore::RenderBlock::lowestPosition):
- (WebCore::RenderBlock::rightmostPosition):
- (WebCore::RenderBlock::leftmostPosition):
- (WebCore::RenderBlock::addOverhangingFloats):
- (WebCore::RenderBlock::nodeAtPoint):
- (WebCore::RenderBlock::positionForPointWithInlineChildren):
- (WebCore::RenderBlock::layoutColumns):
- (WebCore::getHeightForLineCount):
- * rendering/RenderBlock.h:
- * rendering/RenderBlockLineLayout.cpp:
- (WebCore::RenderBlock::computeHorizontalPositionsForLine):
- (WebCore::RenderBlock::computeVerticalPositionsForLine):
- (WebCore::RenderBlock::layoutInlineChildren):
- (WebCore::RenderBlock::matchedEndLine):
- (WebCore::RenderBlock::addOverflowFromInlineChildren):
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::destroy):
- (WebCore::RenderBox::clippedOverflowRectForRepaint):
- (WebCore::RenderBox::localCaretRect):
- (WebCore::RenderBox::addShadowAndReflectionOverflow):
- (WebCore::RenderBox::addOverflowFromChild):
- (WebCore::RenderBox::addLayoutOverflow):
- (WebCore::RenderBox::addVisualOverflow):
- (WebCore::RenderBox::clearLayoutOverflow):
- * rendering/RenderBox.h:
- (WebCore::RenderBox::combinedOverflowRect):
- (WebCore::RenderBox::topCombinedOverflow):
- (WebCore::RenderBox::bottomCombinedOverflow):
- (WebCore::RenderBox::leftCombinedOverflow):
- (WebCore::RenderBox::rightCombinedOverflow):
- (WebCore::RenderBox::layoutOverflowRect):
- (WebCore::RenderBox::topLayoutOverflow):
- (WebCore::RenderBox::bottomLayoutOverflow):
- (WebCore::RenderBox::leftLayoutOverflow):
- (WebCore::RenderBox::rightLayoutOverflow):
- (WebCore::RenderBox::visualOverflowRect):
- (WebCore::RenderBox::topVisualOverflow):
- (WebCore::RenderBox::bottomVisualOverflow):
- (WebCore::RenderBox::leftVisualOverflow):
- (WebCore::RenderBox::rightVisualOverflow):
- * rendering/RenderFlexibleBox.cpp:
- (WebCore::RenderFlexibleBox::layoutBlock):
- (WebCore::RenderFlexibleBox::layoutHorizontalBox):
- (WebCore::RenderFlexibleBox::layoutVerticalBox):
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::updateLayerPosition):
- (WebCore::RenderLayer::localBoundingBox):
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::updateRootLayerPosition):
- (WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
- * rendering/RenderLineBoxList.cpp:
- (WebCore::RenderLineBoxList::paint):
- (WebCore::RenderLineBoxList::hitTest):
- * rendering/RenderListItem.cpp:
- (WebCore::RenderListItem::positionListMarker):
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::RenderObject):
- * rendering/RenderObject.h:
- * rendering/RenderOverflow.h: Added.
- (WebCore::RenderOverflow::RenderOverflow):
- (WebCore::RenderOverflow::topLayoutOverflow):
- (WebCore::RenderOverflow::bottomLayoutOverflow):
- (WebCore::RenderOverflow::leftLayoutOverflow):
- (WebCore::RenderOverflow::rightLayoutOverflow):
- (WebCore::RenderOverflow::topVisualOverflow):
- (WebCore::RenderOverflow::bottomVisualOverflow):
- (WebCore::RenderOverflow::leftVisualOverflow):
- (WebCore::RenderOverflow::rightVisualOverflow):
- (WebCore::RenderOverflow::setTopLayoutOverflow):
- (WebCore::RenderOverflow::setBottomLayoutOverflow):
- (WebCore::RenderOverflow::setLeftLayoutOverflow):
- (WebCore::RenderOverflow::setRightLayoutOverflow):
- (WebCore::RenderOverflow::setTopVisualOverflow):
- (WebCore::RenderOverflow::setBottomVisualOverflow):
- (WebCore::RenderOverflow::setLeftVisualOverflow):
- (WebCore::RenderOverflow::setRightVisualOverflow):
- (WebCore::RenderOverflow::layoutOverflowRect):
- (WebCore::RenderOverflow::visualOverflowRect):
- (WebCore::RenderOverflow::combinedOverflowRect):
- (WebCore::RenderOverflow::move):
- (WebCore::RenderOverflow::addLayoutOverflow):
- (WebCore::RenderOverflow::addVisualOverflow):
- (WebCore::RenderOverflow::resetLayoutOverflow):
- * rendering/RenderPartObject.cpp:
- (WebCore::RenderPartObject::layout):
- * rendering/RenderReplaced.cpp:
- (WebCore::RenderReplaced::~RenderReplaced):
- (WebCore::RenderReplaced::layout):
- (WebCore::RenderReplaced::shouldPaint):
- (WebCore::RenderReplaced::positionForPoint):
- (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
- * rendering/RenderReplaced.h:
- * rendering/RenderScrollbarPart.cpp:
- (WebCore::RenderScrollbarPart::layout):
- (WebCore::RenderScrollbarPart::paintIntoRect):
- * rendering/RenderSlider.cpp:
- (WebCore::RenderSlider::layout):
- * rendering/RenderTable.cpp:
- (WebCore::RenderTable::layout):
- (WebCore::RenderTable::paint):
- * rendering/RenderTableCell.cpp:
- (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
- * rendering/RenderTableSection.cpp:
- (WebCore::RenderTableSection::layoutRows):
- * rendering/RenderTableSection.h:
- * rendering/RenderText.cpp:
- (WebCore::RenderText::positionForPoint):
- (WebCore::RenderText::localCaretRect):
- * rendering/RenderView.cpp:
- (WebCore::RenderView::layout):
- * rendering/RootInlineBox.cpp:
- (WebCore::RootInlineBox::addHighlightOverflow):
- (WebCore::RootInlineBox::adjustPosition):
- (WebCore::RootInlineBox::verticallyAlignBoxes):
- (WebCore::RootInlineBox::selectionTop):
- * rendering/RootInlineBox.h:
- (WebCore::RootInlineBox::RootInlineBox):
- (WebCore::RootInlineBox::nextRootBox):
- (WebCore::RootInlineBox::prevRootBox):
- (WebCore::RootInlineBox::lineTop):
- (WebCore::RootInlineBox::lineBottom):
- (WebCore::RootInlineBox::selectionBottom):
- (WebCore::RootInlineBox::selectionHeight):
- (WebCore::RootInlineBox::floats):
- (WebCore::RootInlineBox::floatsPtr):
- (WebCore::RootInlineBox::setLineTopBottomPositions):
- * rendering/SVGRootInlineBox.cpp:
- (WebCore::SVGRootInlineBox::layoutInlineBoxes):
-
-2009-08-18 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=28431
- <rdar://problem/7137610> Application Cache doesn't work with HTTP authentication
-
- Test: http/tests/appcache/auth.html
-
- * loader/appcache/ApplicationCacheGroup.h:
- (WebCore::ApplicationCacheGroup::shouldUseCredentialStorage): If appcache is enabled,
- always allow it to use stored credentials (we can't ask WebKit client, and maybe we
- shouldn't ask it, because it's not a document that's loading these resources).
-
-2009-08-18 Anders Carlsson <andersca@apple.com>
-
- Reviewed by John Sullivan and David Hyatt.
-
- Fix <rdar://problem/7147996>
-
- * platform/ScrollView.cpp:
- (WebCore::ScrollView::setHasHorizontalScrollbar):
- (WebCore::ScrollView::setHasVerticalScrollbar):
- Update the style of the scroll bars.
-
- * rendering/RenderScrollbar.cpp:
- (WebCore::RenderScrollbar::RenderScrollbar):
- Calculate the size of the scrollbar and set it as the frame size.
-
-2009-08-18 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- HTMLMediaElement should fire 'progress' event before 'load'
- https://bugs.webkit.org/show_bug.cgi?id=28314
-
- Test: media/progress-event-at-least-one.html
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::setNetworkState):
- Schedule 'progress' event before 'load'.
-
-2009-08-18 Peter Kasting <pkasting@google.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=28415
- Set svn:eol-style CRLF on all .sln and .vcproj files that don't already
- have it.
-
- * WebCore.vcproj/QTMovieWin.vcproj:
- * WebCore.vcproj/WebCoreGenerated.vcproj:
-
-2009-08-18 Drew Wilson <atwilson@google.com>
-
- Reviewed by Eric Seidel.
-
- Need to extend DumpRenderTree to expose number of worker threads
- https://bugs.webkit.org/show_bug.cgi?id=28292
-
- Expose WorkerThread::workerThreadCount() for DumpRenderTree so we can write worker lifecycle tests.
-
- Tests: fast/workers/shared-worker-lifecycle.html-disabled
- fast/workers/worker-lifecycle.html
-
- * WebCore.base.exp:
- Exported WorkerThread::workerThreadCount().
- * WebCore.xcodeproj/project.pbxproj:
- * workers/WorkerThread.cpp:
- Added tracking of the number of worker threads.
- (WebCore::threadCountMutex):
- (WebCore::WorkerThread::workerThreadCount):
- (WebCore::WorkerThread::WorkerThread):
- (WebCore::WorkerThread::~WorkerThread):
- * workers/WorkerThread.h:
-
-2009-08-18 Ariya Hidayat <ariya.hidayat@nokia.com>
-
- Unreviewed, build fix.
-
- [Qt] Add new files I forgot to add in r47424.
-
-2009-08-18 Markus Goetz <Markus.Goetz@nokia.com>
-
- Reviewed by Ariya Hidayat.
-
- [Qt] Implement prefetchDNS() function.
-
- * WebCore.pro:
- * platform/qt/TemporaryLinkStubs.cpp:
-
-2009-08-18 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Support for parsing <datalist> element and generating HTMLDataListElement nodes.
- https://bugs.webkit.org/show_bug.cgi?id=26915
-
- Tests: fast/forms/datalist-nonoption-child.html
- fast/forms/datalist.html
-
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.vcproj/WebCoreCommon.vsprops:
- * WebCore.vcproj/build-generated-files.sh:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * css/html.css:
- * html/CollectionType.h:
- (WebCore::):
- * html/HTMLCollection.cpp:
- (WebCore::HTMLCollection::itemAfter):
- * html/HTMLDataListElement.cpp: Added.
- (WebCore::HTMLDataListElement::HTMLDataListElement):
- (WebCore::HTMLDataListElement::~HTMLDataListElement):
- (WebCore::HTMLDataListElement::checkDTD):
- (WebCore::HTMLDataListElement::options):
- * html/HTMLDataListElement.h: Added.
- * html/HTMLDataListElement.idl: Added.
- * html/HTMLElement.cpp:
- (WebCore::inlineTagList):
- * html/HTMLParser.cpp:
- (WebCore::HTMLParser::isAffectedByResidualStyle):
- * html/HTMLTagNames.in:
-
-2009-08-17 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Eric Seidel.
-
- -webkit-box-orient:horizontal doesn't work on <button> tag
- https://bugs.webkit.org/show_bug.cgi?id=34445
-
- Make a flexible button's anonymous child flexible and pass the
- parent's box-orient to the anonymous child.
-
- Also, added a renderName for anonymous flexible boxes.
-
- Test: fast/flexbox/box-orient-button.html
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::createAnonymousBlock):
- * rendering/RenderBlock.h:
- * rendering/RenderButton.cpp:
- (WebCore::RenderButton::addChild):
- (WebCore::RenderButton::setupInnerStyle):
- * rendering/RenderFlexibleBox.cpp:
- (WebCore::RenderFlexibleBox::renderName):
-
-2009-08-17 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt.
-
- Render -webkit-mask via compositing layers when possible
- https://bugs.webkit.org/show_bug.cgi?id=28414
-
- Implement accelerated compositing of -webkit-mask, when combined
- with already-composited content.
-
- RenderLayerBacking now creates an additional GraphicsLayer for the mask contents,
- and sets this as the mask on another GraphicsLayer via the setMaskLayer() method.
- GraphicsLayerCA then applies the mask using -[CALayer setMask:].
-
- The enum values for GraphicsLayerPaintingPhase were renamed to avoid the
- confusion with "mask", and a new value, GraphicsLayerPaintMask, was added which
- indicates that just the mask is painting.
-
- When painting the composited mask, we need to paint with the normal compositing
- mode rather than CompositeDestinationIn, so InlineFlowBox and RenderBox now consult
- layer()->hasCompositedMask() to pick the mode. If the mask is composited, they no longer
- need to make transparency layers.
-
- We no longer have to throw video rendering into software because of masks.
-
- When a masked element has composited descendants, that element needs to
- become composited so that the mask can be applied via compositing.
-
- Tests: compositing/masks/masked-ancestor.html
- compositing/masks/simple-composited-mask.html
-
- * platform/graphics/GraphicsLayer.cpp:
- (WebCore::GraphicsLayer::GraphicsLayer):
- * platform/graphics/GraphicsLayer.h:
- (WebCore::GraphicsLayer::maskLayer):
- (WebCore::GraphicsLayer::setMaskLayer):
- (WebCore::GraphicsLayer::paintingPhase):
- (WebCore::GraphicsLayer::setPaintingPhase):
- * platform/graphics/GraphicsLayerClient.h:
- (WebCore::):
- * platform/graphics/mac/GraphicsLayerCA.h:
- (WebCore::GraphicsLayerCA::):
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayerCA::setMaskLayer):
- (WebCore::GraphicsLayerCA::recursiveCommitChanges):
- (WebCore::GraphicsLayerCA::commitLayerChanges):
- (WebCore::GraphicsLayerCA::updateMaskLayer):
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::paintMask):
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::paintMaskImages):
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::hasCompositedMask):
- * rendering/RenderLayer.h:
- (WebCore::RenderLayer::hasCompositedMask):
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::~RenderLayerBacking):
- (WebCore::RenderLayerBacking::destroyGraphicsLayer):
- (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
- (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
- (WebCore::RenderLayerBacking::updateForegroundLayer):
- (WebCore::RenderLayerBacking::updateMaskLayer):
- (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer):
- (WebCore::RenderLayerBacking::setContentsNeedDisplay):
- (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
- (WebCore::RenderLayerBacking::paintIntoLayer):
- (WebCore::RenderLayerBacking::paintContents):
- * rendering/RenderLayerBacking.h:
- (WebCore::RenderLayerBacking::hasMaskLayer):
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::computeCompositingRequirements):
- (WebCore::RenderLayerCompositor::canAccelerateVideoRendering):
- (WebCore::RenderLayerCompositor::requiresCompositingWhenDescendantsAreCompositing):
- * rendering/RenderLayerCompositor.h:
-
-2009-08-17 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt.
-
- Layer content misplaced with compositing, z-index and overflow
- https://bugs.webkit.org/show_bug.cgi?id=28361
-
- The foreground GraphicsLayer (used to render element foreground when the element has
- negative z-order children) was misplaced when there is a clipping layer (which clips
- children). The foreground layer is parented under the clipping layer so that the foreground
- depth-sorts with the layer's children, so its geometry needs to be computed relative to
- that clipping layer.
-
- Also clarified some FIXME comments, and corrected a debug-only layer name.
-
- Test: compositing/geometry/clipping-foreground.html
-
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayerCA::updateSublayerList):
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
- (WebCore::RenderLayerBacking::updateForegroundLayer):
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
-
-2009-08-17 Mark Rowe <mrowe@apple.com>
-
- Reviewed by Sam Weinig.
-
- Fix leaks of SVGElementInstance seen during regression tests.
-
- r47313 made TreeShared types start with a ref-count of 1, but SVGElementInstance was mistakenly
- not updated to have a create method that adopted the initial reference. This lead to the instances
- of SVGElementInstance allocated by SVGUseElement being leaked.
-
- * svg/SVGElementInstance.h:
- (WebCore::SVGElementInstance::create):
- * svg/SVGUseElement.cpp:
- (WebCore::SVGUseElement::buildPendingResource):
- (WebCore::SVGUseElement::buildInstanceTree):
- (WebCore::SVGUseElement::handleDeepUseReferencing):
-
-2009-08-17 Brady Eidson <beidson@apple.com>
-
- Reviewed by Sam Weinig.
-
- Some cleanup towards https://bugs.webkit.org/show_bug.cgi?id=13631
- Page Cache should support pages with frames.
-
- - Re-factor all remaining page cache code out of DocumentLoader, as CachedPage/CacheFrame loads
- are solely the responsibility of FrameLoader.
- - Enhance some page cache related Logging to help development.
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::didCommitLoad):
- (WebCore::InspectorController::identifierForInitialRequest):
-
- * loader/DocumentLoader.cpp:
- (WebCore::DocumentLoader::DocumentLoader):
- * loader/DocumentLoader.h:
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::FrameLoader):
- (WebCore::FrameLoader::commitProvisionalLoad):
- (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
- (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
- * loader/FrameLoader.h:
- (WebCore::FrameLoader::isLoadingFromCachedPage):
-
-2009-08-17 Roland Steiner <rolandsteiner@google.com>
-
- Reviewed by Eric Seidel.
-
- Moved implementation of isAfterContent to RenderObject
- (as inline method to avoid potential performance regressions).
-
- BUG 28376 - [Cleanup] isAfterContent() implemented twice, should be member of RenderObject
- (https://bugs.webkit.org/show_bug.cgi?id=28376)
-
- * rendering/RenderBox.cpp:
- * rendering/RenderBox.h:
- * rendering/RenderInline.cpp:
- * rendering/RenderObject.h:
- (WebCore::RenderObject::isAfterContent):
-
-2009-08-17 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Darin Adler.
-
- Assertion failure in WebCore::RenderHTMLCanvas::layout
- https://bugs.webkit.org/show_bug.cgi?id=12052
-
- Don't handle run-in if the element is not a block element.
-
- Test: fast/runin/nonblock-runin.html
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::handleRunInChild):
-
-2009-08-17 Benjamin C Meyer <benjamin.meyer@torchmobile.com>
-
- Reviewed by Darin Adler.
-
- Fix createImageData to raise the NOT_SUPPORTED_ERR exception when
- either of the arguments are not finite.
-
- According to
- http://www.whatwg.org/specs/web-apps/current-work/#pixel-manipulation:
- "If any of the arguments to createImageData() or getImageData() are
- infinite or NaN, or if the createImageData() method is invoked with
- only one argument but that argument is null, the method must instead
- raise a NOT_SUPPORTED_ERR exception."
-
- Test: http://philip.html5.org/tests/canvas/suite/tests/2d.imageData.create.nonfinite.html
-
- * html/canvas/CanvasRenderingContext2D.cpp:
- (WebCore::CanvasRenderingContext2D::createImageData):
- * html/canvas/CanvasRenderingContext2D.h:
- * html/canvas/CanvasRenderingContext2D.idl:
-
-2009-08-17 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Add a way to release the storage lock
- https://bugs.webkit.org/show_bug.cgi?id=28411
-
- Two scripts within the same origin that are accessing LocalStorage must not do
- it simultaneously, according to the spec. There are some cases, however, where
- a script might want to override this behavior. navigator.getStorageUpdates()
- was added for this reason:
- http://dev.w3.org/html5/spec/Overview.html#manually-releasing-the-storage-mutex
-
- Add this function to navigator and hook it up to DOM Storage.
-
- * page/Navigator.cpp:
- (WebCore::Navigator::getStorageUpdates):
- * page/Navigator.h:
- * page/Navigator.idl:
- * storage/StorageNamespace.h:
- * storage/StorageNamespaceImpl.cpp:
- (WebCore::StorageNamespaceImpl::unlock):
- * storage/StorageNamespaceImpl.h:
-
-2009-08-17 Mark Rowe <mrowe@apple.com>
-
- Build fix.
-
- CFNetwork isn't present in the framework search path on Mac OS X so we can't directly include its headers.
- We include CoreServices.h, the umbrella framework that contains CFNetwork, from the prefix header which
- results in the CFNetwork headers being included on Mac OS X. CoreServices.h doesn't include CFNetwork.h on
- Windows though so we explicitly include this header from the prefix header when on Windows.
-
- * WebCorePrefix.h:
- * platform/network/cf/DNSCFNet.cpp: Remove #include that is no longer needed.
-
-2009-08-17 Alexey Proskuryakov <ap@apple.com>
-
- Trying a better build fix (the previous one broke Leopard bots, although it did build for me).
-
- * platform/network/cf/DNSCFNet.cpp: Include CFNetwork/CFNetwork.h instead.
-
-2009-08-17 Alexey Proskuryakov <ap@apple.com>
-
- Trying to fix Windows build.
-
- * platform/network/cf/DNSCFNet.cpp: Include CFNetwork/CFHost.h.
-
-2009-08-17 Peter Kasting <pkasting@google.com>
-
- Reviewed by Steve Falkenburg.
-
- https://bugs.webkit.org/show_bug.cgi?id=27323
- Only add Cygwin to the path when it isn't already there. This avoids
- causing problems for people who purposefully have non-Cygwin versions of
- executables like svn in front of the Cygwin ones in their paths.
-
- * WebCore.vcproj/QTMovieWin.vcproj:
- * WebCore.vcproj/WebCoreCommon.vsprops:
- * WebCore.vcproj/WebCoreGenerated.vcproj:
-
-2009-08-17 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Geoff Garen.
-
- https://bugs.webkit.org/show_bug.cgi?id=28401
- Add support for DNS prefetching with CFNetwork
-
- This is just an optimization, no behavior change, so no tests.
-
- * platform/network/cf/DNSCFNet.cpp:
- (WebCore::clientCallback):
- (WebCore::prefetchDNS):
- Use async CFHostStartInfoResolution() for implementation.
-
-2009-08-17 Aaron Boodman <aa@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- https://bugs.webkit.org/show_bug.cgi?id=28313: Combine ThreadableLoaderOptions::crossOriginRequestPolicy and
- ThreadableLoaderOptions::crossOriginRedirectPolicy since they are always set the same way.
-
- Also, tightened up behavior of XMLHttpRequest with cross-origin redirects and access control. We have not implemented
- redirects access control, so we should never redirect across origins. But in two edge cases, we were:
-
- * Asynchronous XHR: Script on origin A requests resource from origin B. Server redirects (without sending access control
- authorization headers) to a resource on origin A.
- * Synchronous XHR: Script on origin A requests resource from origin B. Server redirects (without sending access control
- authorization headers) to another resource on origin B (this time sending access control authorization headers).
-
- Test: http/tests/xmlhttprequest/access-control-and-redirects.html
-
- * loader/DocumentThreadableLoader.cpp:
- (WebCore::DocumentThreadableLoader::willSendRequest): Refactor redirect checking code into shared location.
- (WebCore::DocumentThreadableLoader::loadRequest): Ditto.
- (WebCore::DocumentThreadableLoader::isAllowedRedirect): Ditto.
- * loader/DocumentThreadableLoader.h:
- * loader/ThreadableLoader.h:
- (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Remove ThreadableLoaderOptions::crossOriginRedirectPolicy.
- * page/EventSource.cpp:
- (WebCore::EventSource::connect): Ditto.
- * workers/Worker.cpp: Ditto.
- (WebCore::Worker::Worker): Ditto.
- * workers/WorkerContext.cpp: Ditto.
- (WebCore::WorkerContext::importScripts): Ditto.
- * workers/WorkerScriptLoader.cpp:
- (WebCore::WorkerScriptLoader::loadSynchronously): Ditto.
- (WebCore::WorkerScriptLoader::loadAsynchronously): Ditto.
- * workers/WorkerScriptLoader.h:
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::createRequest): Ditto.
-
-2009-08-17 Adam Langley <agl@google.com>
-
- Reviewed by Dan Bernstein (relanding of r47157).
-
- Fix a typo in platform/graphics/skia/PlatformContextSkia.cpp
-
- https://bugs.webkit.org/show_bug.cgi?id=28172
-
- This was originally fixed in r47157, however it triggered a bug in
- Skia which caused Chromium Linux to fail layout tests in debug mode.
- It was reverted in r47189 while we sorted it out.
-
- The Skia bug was fixed in Skia's r321 [1] and rolled into Chromium in
- Chromium's r23523. This is a reland of the original patch.
-
- No new tests because it's a just typo fix.
-
- [1] http://code.google.com/p/skia/source/detail?r=321
-
- * platform/graphics/skia/PlatformContextSkia.cpp:
- (PlatformContextSkia::setupPaintCommon):
-
-2009-08-17 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Reviewed by Xan Lopez.
-
- Protect ResourceHandle for g_file_query_info_async call, using the
- same technique we already use for HTTP requests that take the soup
- path.
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
- (WebCore::ResourceHandle::~ResourceHandle):
- (WebCore::finishedCallback):
- (WebCore::):
-
-2009-08-17 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Darin Adler.
-
- REGRESSION (r47255): MediaWiki's (including Wikipedia) navigation pane
- appears below the main content
- https://bugs.webkit.org/show_bug.cgi?id=28350
-
- A particular version of the MediaWiki software detects WebKit through
- user agent sniffing and imports a style sheet called KHTMLFixes.css,
- which contains a single rule that was meant to work around some KHTML
- bug, but currently has the sole effect of causing the float containing
- the main article content to extend all the way to the left and thus push
- down the left navigation pane.
-
- * css/CSSImportRule.cpp:
- (WebCore::CSSImportRule::setCSSStyleSheet): If site specific hacks are
- enabled, check if the imported style sheet is the MediaWiki
- KHTMLFixes.css. If so, remove the offending rule.
-
-2009-08-17 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Kevin Ollivier.
-
- Correct crash when processing local cancelled requests.
-
- No new tests. Existing fast/images/favicon-as-image.html
- displays the problem.
-
- * platform/network/curl/ResourceHandleManager.cpp:
- (WebCore::writeCallback): Add check for m_cancelled after
- performing local-file processing.
- (WebCore::ResourceHandleManager::downloadTimerCallback): Add
- check for m_cancelled after performing local-file processing.
-
-2009-08-17 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Unreviewed. Reverts 47371, since it breaks GTK+.
-
- * platform/graphics/ImageSource.cpp:
- (WebCore::ImageSource::setData):
- * platform/image-decoders/ImageDecoder.cpp: Removed.
- * platform/image-decoders/ImageDecoder.h:
- (WebCore::ImageDecoder::ImageDecoder):
- * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
- (WebCore::convertCMYKToRGBA):
- (WebCore::convertRGBToRGBA):
- (WebCore::JPEGImageDecoder::outputScanlines):
- * platform/image-decoders/jpeg/JPEGImageDecoder.h:
- * platform/image-decoders/png/PNGImageDecoder.cpp:
- (WebCore::PNGImageDecoder::headerAvailable):
- (WebCore::PNGImageDecoder::rowAvailable):
-
-2009-08-17 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Adam Treat.
-
- Allow image decoders to down-sample the image directly
- to scaled output buffer. This can be enabled/disabled by
- macro ENABLE(IMAGE_DECODER_DOWN_SAMPLING).
- Only JPEG and PNG decoders are modified to support it now.
- https://bugs.webkit.org/show_bug.cgi?id=28308
-
- * platform/graphics/ImageSource.cpp:
- (WebCore::ImageSource::setData):
- * platform/image-decoders/ImageDecoder.cpp: Added.
- * platform/image-decoders/ImageDecoder.h:
- (WebCore::ImageDecoder::ImageDecoder):
- (WebCore::ImageDecoder::setMaxNumPixels):
- * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
- (WebCore::convertCMYKToRGBA):
- (WebCore::convertRGBToRGBA):
- (WebCore::JPEGImageDecoder::outputScanlines):
- * platform/image-decoders/jpeg/JPEGImageDecoder.h:
- (WebCore::JPEGImageDecoder::setSize):
- * platform/image-decoders/png/PNGImageDecoder.cpp:
- (WebCore::PNGImageDecoder::headerAvailable):
- (WebCore::PNGImageDecoder::rowAvailable):
-
-2009-08-17 Simon Fraser <simon.fraser@apple.com>
-
- Build fix: fix float literals to avoid casting warnings.
-
- * rendering/MediaControlElements.cpp:
-
-2009-08-17 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Eric Seidel.
-
- Use OwnPtrs for GraphicsLayers
- https://bugs.webkit.org/show_bug.cgi?id=28399
-
- Convert RenderLayerBacking and RenderLayerCompositor to use OwnPtrs
- for their references to GraphicsLayers.
-
- * platform/graphics/GraphicsLayer.h:
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayer::create):
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::RenderLayerBacking):
- (WebCore::RenderLayerBacking::createGraphicsLayer):
- (WebCore::RenderLayerBacking::destroyGraphicsLayer):
- (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
- (WebCore::RenderLayerBacking::updateInternalHierarchy):
- (WebCore::RenderLayerBacking::updateClippingLayers):
- (WebCore::RenderLayerBacking::updateForegroundLayer):
- (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
- * rendering/RenderLayerBacking.h:
- (WebCore::RenderLayerBacking::graphicsLayer):
- (WebCore::RenderLayerBacking::clippingLayer):
- (WebCore::RenderLayerBacking::ancestorClippingLayer):
- (WebCore::RenderLayerBacking::foregroundLayer):
- (WebCore::RenderLayerBacking::parentForSublayers):
- (WebCore::RenderLayerBacking::childForSuperlayers):
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::~RenderLayerCompositor):
- (WebCore::RenderLayerCompositor::rootPlatformLayer):
- (WebCore::RenderLayerCompositor::didMoveOnscreen):
- (WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
- (WebCore::RenderLayerCompositor::destroyRootPlatformLayer):
- * rendering/RenderLayerCompositor.h:
-
-2009-08-17 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Reset InjectedScript styles cache on document change.
-
- https://bugs.webkit.org/show_bug.cgi?id=28390
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::close):
- (WebCore::InspectorController::populateScriptObjects):
- (WebCore::InspectorController::didCommitLoad):
- (WebCore::InspectorController::resetInjectedScript):
- * inspector/InspectorController.h:
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::setDocument):
- * inspector/InspectorDOMAgent.h:
- * inspector/front-end/InjectedScript.js:
- (InjectedScript._reset):
-
-2009-08-17 Darin Adler <darin@apple.com>
-
- Reviewed by Sam Weinig.
-
- * rendering/MediaControlElements.cpp: Removed unneeded include of CString.h,
- resorted includes, renamed "doc" to "document" and fixed formatting.
-
-2009-08-17 Darin Adler <darin@apple.com>
-
- Reviewed by Sam Weinig.
-
- Removed functions now unneeded due to use of Reflect to create
- language bindings.
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap):
- Get at usemap attribute directly.
-
- * editing/DeleteButtonController.cpp:
- (WebCore::DeleteButtonController::createDeletionUI):
- Get at id attribute directly.
- * editing/EditorCommand.cpp:
- (WebCore::executeInsertHorizontalRule): Ditto.
-
- * html/HTMLDocument.cpp:
- (WebCore::HTMLDocument::dir): Get at dir attribute of body directly.
- (WebCore::HTMLDocument::setDir): Ditto.
-
- * html/HTMLElement.cpp: Deleted unused functions.
- * html/HTMLElement.h: Ditto.
-
- * html/HTMLImageElement.cpp: Deleted unused functions.
- (WebCore::HTMLImageElement::alt): Changed to return const AtomicString&.
- (WebCore::HTMLImageElement::addSubresourceAttributeURLs): Changed to
- get at usemap attribute directly, but added a FIXME because although
- it is what the old code did, it looks to not be entirely correct.
-
- * html/HTMLImageElement.h: Deleted unused functions.
-
- * rendering/HitTestResult.cpp:
- (WebCore::HitTestResult::altDisplayString): Get at alt attribute directly.
-
- * rendering/RenderImage.cpp:
- (WebCore::RenderImage::imageMap): Get at usemap attribute directly.
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::createGraphicsLayer): Get at id attribute
- directly.
- (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): Removed
- explicit HTMLNames namespace qualification.
-
-2009-08-17 Darin Adler <darin@apple.com>
-
- Reviewed by Sam Weinig.
-
- * dom/Document.cpp:
- (WebCore::Document::setFocusedNode): Removed unneeded calls
- to RefPtr::get.
-
-2009-08-17 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Discard DOM Node bindings on any document change.
-
- https://bugs.webkit.org/show_bug.cgi?id=28389
-
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::setDocument):
-
-2009-08-13 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: Improve Cookie DataGrid to Show Hidden Data
- https://bugs.webkit.org/show_bug.cgi?id=28269
-
- * English.lproj/localizedStrings.js: DataGrid Headers "Name", "Value", "Size", ...
- * WebCore.gypi: added missing files
-
- Implemented Bindings for InspectorController.deleteCookie(name)
-
- * inspector/InspectorBackend.idl:
- * bindings/js/JSInspectorBackendCustom.cpp:
- (WebCore::JSInspectorBackend::cookies):
- (WebCore::JSInspectorBackend::deleteCookie):
-
- v8 Bindings Stubs
-
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8InspectorBackendCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
- Removed WebInspector.Cookie
-
- * inspector/front-end/Cookie.js: Removed.
- * inspector/front-end/inspector.html:
- * inspector/front-end/WebKit.qrc:
-
- Improved DataGrid and Kept Fallback Behavior for Platforms that don't
- yet provide access to raw cookies.
-
- * inspector/front-end/CookieItemsView.js:
- (WebInspector.CookieItemsView):
- (WebInspector.CookieItemsView.prototype.get statusBarItems):
- (WebInspector.CookieItemsView.prototype.update):
- (WebInspector.CookieItemsView.prototype.buildCookies):
- (WebInspector.CookieItemsView.prototype.dataGridForCookies):
- (WebInspector.CookieItemsView.prototype.fallbackUpdate.callback):
- (WebInspector.CookieItemsView.prototype.fallbackUpdate):
- (WebInspector.CookieItemsView.prototype.fallbackBuildCookiesFromString):
- (WebInspector.CookieItemsView.prototype.fallbackDataGridForCookies):
- (WebInspector.CookieItemsView.prototype._deleteButtonClicked):
-
- Interaction with the page through Injected Script (for fallback behavior)
-
- * inspector/front-end/DOMAgent.js:
- (InspectorController.getCookies):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.setStyleProperty): style fix
- (InjectedScript.getCookies):
-
- Allow alignment of text inside DataGrids.
-
- * inspector/front-end/DataGrid.js:
- (WebInspector.DataGrid):
- (WebInspector.DataGridNode.prototype.createCell):
- * inspector/front-end/DatabasesPanel.js:
- (WebInspector.DatabasesPanel.prototype.dataGridForDOMStorage):
- * inspector/front-end/inspector.css:
-
- Added deleteCookie(., ., String name)
- Modified getRawCookies to return a bool to know if its implemented
-
- * platform/CookieJar.h:
-
-
- Implemented deleteCookie for Macs
-
- * platform/mac/CookieJar.mm:
- (WebCore::getRawCookies):
- (WebCore::deleteCookie):
-
- Stub Implementations for Other Platforms
-
- * platform/haiku/CookieJarHaiku.cpp:
- (WebCore::getRawCookies):
- (WebCore::deleteCookie):
- * platform/network/chromium/CookieJarChromium.cpp:
- (WebCore::getRawCookies):
- (WebCore::deleteCookie):
- * platform/network/curl/CookieJarCurl.cpp:
- (WebCore::getRawCookies):
- (WebCore::deleteCookie):
- * platform/network/soup/CookieJarSoup.cpp:
- (WebCore::getRawCookies):
- (WebCore::deleteCookie):
- * platform/network/win/CookieJarCFNetWin.cpp:
- (WebCore::getRawCookies):
- (WebCore::deleteCookie):
- * platform/network/win/CookieJarWin.cpp:
- (WebCore::getRawCookies):
- (WebCore::deleteCookie):
- * platform/qt/CookieJarQt.cpp:
- (WebCore::getRawCookies):
- (WebCore::deleteCookie):
-
-2009-08-17 Adam Treat <adam.treat@torchmobile.com>
-
- Blind build fix for Leopard.
-
- * platform/graphics/GraphicsContext.cpp:
- (WebCore::GraphicsContext::adjustLineToPixelBoundaries):
-
-2009-08-13 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by Adam Treat.
-
- Style fixes based on cpp_style.py and WebKit Style guide for
- GraphicsContextCG.cpp
-
- https://bugs.webkit.org/show_bug.cgi?id=28268
-
- * platform/graphics/cg/GraphicsContextCG.cpp:
- (WebCore::GraphicsContext::drawLine):
- (WebCore::GraphicsContext::drawEllipse):
- (WebCore::GraphicsContext::strokeArc):
- (WebCore::GraphicsContext::drawConvexPolygon):
- (WebCore::GraphicsContext::applyStrokePattern):
- (WebCore::GraphicsContext::drawPath):
- (WebCore::GraphicsContext::clipOut):
- (WebCore::GraphicsContext::clipOutEllipseInRect):
- (WebCore::GraphicsContext::addInnerRoundedRectClip):
- (WebCore::GraphicsContext::clipToImageBuffer):
- (WebCore::GraphicsContext::setPlatformShadow):
- (WebCore::GraphicsContext::setLineCap):
- (WebCore::GraphicsContext::setLineJoin):
- (WebCore::GraphicsContext::roundToDevicePixels):
- (WebCore::GraphicsContext::drawLineForText):
- (WebCore::GraphicsContext::setURLForRect):
- (WebCore::GraphicsContext::setImageInterpolationQuality):
- (WebCore::GraphicsContext::imageInterpolationQuality):
- (WebCore::GraphicsContext::setPlatformTextDrawingMode):
- (WebCore::GraphicsContext::setCompositeOperation):
-
-2009-08-13 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by Adam Treat.
-
- Style fixes based on cpp_style.py and WebKit Style guide for
- GraphicsContext.cpp/h, GraphicsContextCairo.cpp and GraphicsContextQt.cpp.
-
- https://bugs.webkit.org/show_bug.cgi?id=28268
-
- * platform/graphics/GraphicsContext.cpp:
- (WebCore::GraphicsContext::save):
- (WebCore::GraphicsContext::restore):
- (GraphicsContext::drawText):
- (GraphicsContext::initFocusRing):
- (GraphicsContext::focusRingBoundingRect):
- (GraphicsContext::drawImage):
- * platform/graphics/GraphicsContext.h:
- * platform/graphics/cairo/GraphicsContextCairo.cpp:
- (WebCore::GraphicsContext::drawLine):
- (WebCore::GraphicsContext::strokeArc):
- (WebCore::GraphicsContext::setLineCap):
- (WebCore::GraphicsContext::setLineJoin):
- (WebCore::toCairoOperator):
- * platform/graphics/qt/GraphicsContextQt.cpp:
-
-2009-08-17 Darin Adler <darin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Change HTMLAreaElement to use OwnArrayPtr
- https://bugs.webkit.org/show_bug.cgi?id=28386
-
- * html/HTMLAreaElement.cpp:
- (WebCore::HTMLAreaElement::HTMLAreaElement): Removed unneeded initializer.
- (WebCore::HTMLAreaElement::~HTMLAreaElement): Removed unneeded delete call.
- (WebCore::HTMLAreaElement::parseMappedAttribute): Use the set function
- instead of deletion followed by assignment.
- * html/HTMLAreaElement.h: Use OwnArrayPtr.
-
-2009-08-17 Darin Adler <darin@apple.com>
-
- Fix Windows build.
-
- * dom/make_names.pl: Add back cast to (void*) needed on Windows.
-
-2009-08-17 Darin Adler <darin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Move noResize from HTMLFrameElementBase to HTMLFrameElement
- https://bugs.webkit.org/show_bug.cgi?id=28384
-
- * html/HTMLFrameElement.cpp:
- (WebCore::HTMLFrameElement::HTMLFrameElement): Initialize m_noResize.
- (WebCore::HTMLFrameElement::parseMappedAttribute): Set m_noResize to true
- here if noresizeAttr is changed. This code was moved here from
- HTMLFrameElementBase, but I added some FIXME comments.
- (WebCore::HTMLFrameElement::setNoResize): Set the attribute based on
- boolean argument. Moved here from HTMLFrameElementBase.
-
- * html/HTMLFrameElement.h: Moved noResize, setNoResize, and m_noResize
- here from HTMLFrameElementBase.
-
- * html/HTMLFrameElementBase.cpp:
- (WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Removed m_noResize.
- (WebCore::HTMLFrameElementBase::parseMappedAttribute): Removed code to parse
- noresizeAttr.
-
- * html/HTMLFrameElementBase.h: Removed noResize, setNoResize, and m_noResize.
-
-2009-08-17 Darin Adler <darin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Tweak HTMLFrameElementBase so that m_URL can be private
- https://bugs.webkit.org/show_bug.cgi?id=28385
-
- * html/HTMLFrameElement.cpp:
- (WebCore::HTMLFrameElement::rendererIsNeeded): Removed m_URL argument.
- * html/HTMLFrameElementBase.cpp:
- (WebCore::HTMLFrameElementBase::isURLAllowed): Use m_URL instead of
- taking an argument.
- (WebCore::HTMLFrameElementBase::openURL): Removed m_URL argument.
- * html/HTMLFrameElementBase.h: Removed argument from isURLAllowed function.
- * html/HTMLIFrameElement.cpp:
- (WebCore::HTMLIFrameElement::rendererIsNeeded): Removed m_URL argument.
-
-2009-08-17 Darin Adler <darin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- HTMLViewSourceDocument should use smart pointers
- https://bugs.webkit.org/show_bug.cgi?id=28378
-
- * html/HTMLViewSourceDocument.cpp:
- (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument): Don't initialize
- pointers any more since RefPtr starts 0 by default.
- (WebCore::HTMLViewSourceDocument::createContainingTable): Use more specific
- types for local variables.
- (WebCore::HTMLViewSourceDocument::addSpanWithClassName): Return a PassRefPtr,
- and use a RefPtr of a more specific type for a local variable.
- (WebCore::HTMLViewSourceDocument::addLine): Use more specific types for local
- variables, and use RefPtr as well.
- (WebCore::HTMLViewSourceDocument::addLink): Return a PassRefPtr, and use a
- RefPtr of a more specific type for a local variable.
-
- * html/HTMLViewSourceDocument.h: Change return types to PassRefPtr and
- data member types to RefPtr.
-
-2009-08-17 Darin Adler <darin@apple.com>
-
- Reviewed by Sam Weinig.
-
- DOM attribute getter/setter functions should use const AtomicString& type
- https://bugs.webkit.org/show_bug.cgi?id=25425
-
- Convert 4 more classes. These are classes I am going to make other changes
- to soon, so it's good to have this use of Reflect in the IDL out of the way.
-
- * html/HTMLEmbedElement.idl: Use Reflect for many attributes.
- * html/HTMLFrameElement.idl: Ditto.
- * html/HTMLIFrameElement.idl: Ditto.
- * html/HTMLObjectElement.idl: Ditto.
-
-2009-08-17 Darin Adler <darin@apple.com>
-
- Reviewed by Sam Weinig.
-
- Script to create element factory needs changes to accommodate calling create
- https://bugs.webkit.org/show_bug.cgi?id=28379
-
- * dom/make_names.pl: Tweak formatting. Remove lots of unneeded quotes
- around names used inside {}. Added new createWithNew property for tags
- that makes the factory use a create function instead of calling new.
- Renamed functions with initialize in their name to have default in their
- name, since they return an array full of default values and don't themselves
- initialize anything.
-
-2009-08-16 Darin Adler <darin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- StyledElement should use ASCIICType instead of having its own toHex function
- https://bugs.webkit.org/show_bug.cgi?id=28377
-
- * dom/StyledElement.cpp:
- (WebCore::StyledElement::addCSSColor): Use isASCIIHexDigit and toASCIIHexValue.
-
-2009-08-16 Darin Adler <darin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- execCommand("InsertHorizontalRule") inserts a broken <hr> element
- https://bugs.webkit.org/show_bug.cgi?id=28375
-
- * editing/EditorCommand.cpp:
- (WebCore::executeInsertHorizontalRule): Create an HTMLHRElement
- instead of just an HTMLElement.
-
-2009-08-16 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by George Staikos.
-
- [WML] <option> element & 'onpick' events - history navigation is broken
- https://bugs.webkit.org/show_bug.cgi?id=28371
-
- After selecting an option element with an 'onpick' event associated with a 'go' task,
- the navigation is executed. When going back in history, the same 'onpick' event is fired
- again. Fix that problem, add wml/option-element-onpick-recursion.html covering the bug.
-
- Test: wml/option-element-onpick-recursion.html
-
- * wml/WMLOptionElement.cpp:
- (WebCore::WMLOptionElement::handleIntrinsicEventIfNeeded):
- * wml/WMLSelectElement.cpp:
- (WebCore::WMLSelectElement::WMLSelectElement):
- (WebCore::WMLSelectElement::selectInitialOptions):
- * wml/WMLSelectElement.h:
- (WebCore::WMLSelectElement::initialized):
-
-2009-08-16 Anthony Ricaud <rik@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Inspector Resource filtering: keyboard Navigation always uses ALL resources
- https://bugs.webkit.org/show_bug.cgi?id=28231
-
- Determine if a resource is selectable on user action.
-
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourceSidebarTreeElement.prototype.get selectable):
-
-2009-08-16 David Kilzer <ddkilzer@apple.com>
-
- <http://webkit.org/b/28355> Replace MAX()/MIN() macros with type-safe std::max()/min() templates
-
- Reviewed by Dan Bernstein.
-
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (AXAttributeStringSetSpelling): Changed MIN() to min().
- * platform/graphics/mac/FontMacATSUI.mm:
- (WebCore::Font::selectionRectForComplexText): Changed MAX() to
- max() and MIN() to min().
- (WebCore::Font::floatWidthForComplexText): Ditto.
- * platform/graphics/mac/SimpleFontDataMac.mm: Added using
- std::max statement.
- (WebCore::SimpleFontData::platformInit): Changed MAX() to max().
- * platform/text/mac/TextCodecMac.cpp:
- (WebCore::TextCodecMac::decode): Changed MIN() to min().
-
-2009-08-16 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by George Staikos.
-
- [WML] Cleanup WMLIntrinsicEventHandling code
- https://bugs.webkit.org/show_bug.cgi?id=28358
-
- Remove superflous "Event* evt" parameter from executeTask() methods. It's a leftover from the initial WML merge.
-
- * wml/WMLAnchorElement.cpp:
- (WebCore::WMLAnchorElement::defaultEventHandler):
- * wml/WMLDoElement.cpp:
- (WebCore::WMLDoElement::defaultEventHandler):
- * wml/WMLGoElement.cpp:
- (WebCore::WMLGoElement::executeTask):
- * wml/WMLGoElement.h:
- * wml/WMLIntrinsicEventHandler.cpp:
- (WebCore::WMLIntrinsicEventHandler::triggerIntrinsicEvent):
- * wml/WMLPrevElement.cpp:
- (WebCore::WMLPrevElement::executeTask):
- * wml/WMLPrevElement.h:
- * wml/WMLRefreshElement.cpp:
- (WebCore::WMLRefreshElement::executeTask):
- * wml/WMLRefreshElement.h:
- * wml/WMLTaskElement.h:
-
-2009-08-16 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: A handful of DOMAgent-related fixes and cleanups.
-
- - renamed elementId to nodeId in operations on nodes.
- - added load listeners to frame owners in InspectorDOMAgent.
- - removed InspectorController::inspectedWindowScriptObjectCleared event.
- - preserved isViaInspector flag for 'via inspector' marker to survive styles update.
- - removed contentDocument-related logic from ElementsPanel since it is handled in
- the InspectorDOMAgent.
- - removed DOM listeners unregistration and corresponding events from InspectorController.
- - made this.styles 'private' in ElementsPanel.
- - added TODO for the handleCopy processing.
-
- https://bugs.webkit.org/show_bug.cgi?id=28356
-
- * WebCore.order:
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::getChildNodes):
- (WebCore::InspectorBackend::setTextNodeValue):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- * inspector/InspectorController.h:
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::startListening):
- (WebCore::InspectorDOMAgent::stopListening):
- (WebCore::InspectorDOMAgent::handleEvent):
- (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
- (WebCore::InspectorDOMAgent::getChildNodes):
- (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
- (WebCore::InspectorDOMAgent::setTextNodeValue):
- (WebCore::InspectorDOMAgent::buildObjectForNode):
- (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
- (WebCore::InspectorDOMAgent::innerParentNode):
- * inspector/InspectorDOMAgent.h:
- * inspector/InspectorFrontend.cpp:
- * inspector/InspectorFrontend.h:
- * inspector/front-end/DOMAgent.js:
- (WebInspector.DOMDocument.prototype.addEventListener):
- (WebInspector.DOMDocument.prototype.removeEventListener):
- (WebInspector.DOMDocument.prototype._fireDomEvent):
- (WebInspector.DOMAgent.prototype.getChildNodesAsync.mycallback):
- (WebInspector.DOMAgent.prototype.getChildNodesAsync):
- (WebInspector.DOMAgent.prototype._setChildNodes):
- (WebInspector.CSSStyleDeclaration.parseRule):
- (WebInspector.childNodeInserted):
- (WebInspector.childNodeRemoved):
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel):
- (WebInspector.ElementsPanel.prototype.reset):
- (WebInspector.ElementsPanel.prototype.addStyleChange):
- (WebInspector.ElementsPanel.prototype.removeStyleChange):
- (WebInspector.ElementsPanel.prototype._updateModifiedNodes):
- (WebInspector.ElementsPanel.prototype.updateBreadcrumb):
- (WebInspector.ElementsPanel.prototype.handleCopyEvent):
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeOutline.prototype.set rootDOMNode):
- (WebInspector.ElementsTreeOutline.prototype.findTreeElement):
- (WebInspector.ElementsTreeElement):
- (WebInspector.ElementsTreeElement.prototype._updateChildren.updateChildrenOfNode):
- (WebInspector.ElementsTreeElement.prototype._updateChildren):
- (WebInspector.ElementsTreeElement.prototype.onexpand):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.addStyleSelector):
- (InjectedScript._serializeRule):
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylePropertiesSection):
- * inspector/front-end/inspector.js:
- (WebInspector.set hoveredDOMNode):
- * inspector/front-end/treeoutline.js:
- (TreeOutline.prototype.findTreeElement):
- * inspector/front-end/utilities.js:
- (Node.prototype.enclosingNodeOrSelfWithNodeNameInArray):
- (Node.prototype.enclosingNodeOrSelfWithClass):
- (isAncestorNode):
- (firstCommonNodeAncestor):
- (traverseNextNode):
- (traversePreviousNode):
- ():
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::dispatchWindowObjectAvailable):
- * page/android/InspectorControllerAndroid.cpp:
-
-2009-08-15 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt
-
- Optimize updateFillImages() to not add/remove clients every time
- https://bugs.webkit.org/show_bug.cgi?id=28334
-
- Optimize the case where old and new just have a single layer pointing to the same (or no)
- image.
-
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::updateFillImages):
-
-2009-08-15 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Anders Carlsson.
-
- Implement animations of multiple text-shadows and -webkit-box-shadows.
- https://bugs.webkit.org/show_bug.cgi?id=28266
-
- Test: transitions/multiple-shadow-transitions.html
-
- * page/animation/AnimationBase.cpp:
- (WebCore::PropertyWrapperShadow::equals):
- (WebCore::PropertyWrapperShadow::blend):
-
-2009-08-15 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Anders Carlsson.
-
- Make transitions work for position and size of multiple backgrounds and masks.
- https://bugs.webkit.org/show_bug.cgi?id=28266
-
- Make background-position, background-size, -webkit-mask-position and -webkit-mask-size
- properties animatable with multiple backgrounds, rather than just animating the first one.
-
- Tests: transitions/multiple-background-size-transitions.html
- transitions/multiple-background-transitions.html
- transitions/multiple-mask-transitions.html
-
- * page/animation/AnimationBase.cpp:
- (WebCore::FillLayerPropertyWrapperBase::FillLayerPropertyWrapperBase):
- (WebCore::FillLayerPropertyWrapperBase::~FillLayerPropertyWrapperBase):
- (WebCore::FillLayerPropertyWrapperGetter::FillLayerPropertyWrapperGetter):
- (WebCore::FillLayerPropertyWrapperGetter::equals):
- (WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper):
- (WebCore::FillLayerPropertyWrapper::blend):
- (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
- (WebCore::FillLayersPropertyWrapper::equals):
- (WebCore::FillLayersPropertyWrapper::blend):
- (WebCore::ensurePropertyMap):
- * rendering/style/FillLayer.h:
- (WebCore::FillLayer::setXPosition):
- (WebCore::FillLayer::setYPosition):
- (WebCore::FillLayer::setSize):
-
-2009-08-15 George Staikos <george.staikos@torchmobile.com>
-
- Reviewed by Jan Alonzo.
-
- Don't crash in fieldset code when WML is enabled.
- https://bugs.webkit.org/show_bug.cgi?id=28012
-
- Test: fast/wml/html-fieldset-crash.html
-
- * rendering/RenderFieldset.cpp:
- (WebCore::RenderFieldset::findLegend): ++brackets
-
-2009-08-15 Sam Weinig <sam@webkit.org>
-
- Try and enable EventSource on Windows.
-
- * WebCore.vcproj/WebCoreCommon.vsprops:
- * WebCore.vcproj/build-generated-files.sh:
-
-2009-08-15 Sam Weinig <sam@webkit.org>
-
- Reviewed by Dan Bernstein.
-
- Setting attribute event listeners to the body does not set them on the window
- https://bugs.webkit.org/show_bug.cgi?id=28343
-
- Tests: fast/dom/Window/HTMLBodyElement-window-eventListener-attributes.html
- fast/dom/Window/HTMLFrameSetElement-window-eventListener-attributes.html
-
- * html/HTMLBodyElement.cpp:
- (WebCore::HTMLBodyElement::setOnblur): Use setWindowAttributeEventListener instead of setAttributeEventListener.
- (WebCore::HTMLBodyElement::setOnerror): Ditto.
- (WebCore::HTMLBodyElement::setOnfocus): Ditto.
- (WebCore::HTMLBodyElement::setOnload): Ditto.
- (WebCore::HTMLBodyElement::setOnbeforeunload): Ditto.
- (WebCore::HTMLBodyElement::setOnmessage): Ditto.
- (WebCore::HTMLBodyElement::setOnoffline): Ditto.
- (WebCore::HTMLBodyElement::setOnonline): Ditto.
- (WebCore::HTMLBodyElement::setOnresize): Ditto.
- (WebCore::HTMLBodyElement::setOnstorage): Ditto.
- (WebCore::HTMLBodyElement::setOnunload): Ditto.
- * html/HTMLFrameSetElement.cpp:
- (WebCore::HTMLFrameSetElement::setOnblur): Ditto.
- (WebCore::HTMLFrameSetElement::setOnerror): Ditto.
- (WebCore::HTMLFrameSetElement::setOnfocus): Ditto.
- (WebCore::HTMLFrameSetElement::setOnload): Ditto.
- (WebCore::HTMLFrameSetElement::setOnbeforeunload): Ditto.
- (WebCore::HTMLFrameSetElement::setOnmessage): Ditto.
- (WebCore::HTMLFrameSetElement::setOnoffline): Ditto.
- (WebCore::HTMLFrameSetElement::setOnonline): Ditto.
- (WebCore::HTMLFrameSetElement::setOnresize): Ditto.
- (WebCore::HTMLFrameSetElement::setOnstorage): Ditto.
- (WebCore::HTMLFrameSetElement::setOnunload): Ditto.
-
-2009-08-15 Sam Weinig <sam@webkit.org>
-
- Reviewed by Dan Bernstein.
-
- Fix up some IDL comments.
-
- * html/HTMLBodyElement.idl:
- * html/HTMLFrameSetElement.idl:
-
-2009-08-15 Adam Bergkvist <adam.bergkvist@ericsson.com>
-
- Reviewed by Sam Weinig.
-
- Added implementation of the EventSource object that enables
- server-sent events from HTML5.
- http://dev.w3.org/html5/eventsource/
- https://bugs.webkit.org/show_bug.cgi?id=14997
-
- Tests: fast/eventsource/eventsource-attribute-listeners.html
- fast/eventsource/eventsource-constructor.html
- http/tests/eventsource/eventsource-bad-mime-type.html
- http/tests/eventsource/eventsource-parse-event-stream.html
- http/tests/eventsource/eventsource-reconnect.html
- http/tests/eventsource/eventsource-status-code-states.html
- http/tests/eventsource/workers/eventsource-simple.html
-
- * Configurations/FeatureDefines.xcconfig:
- * DerivedSources.cpp:
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::eventSource):
- * bindings/js/JSEventSourceConstructor.cpp: Added.
- (WebCore::):
- (WebCore::JSEventSourceConstructor::JSEventSourceConstructor):
- (WebCore::constructEventSource):
- (WebCore::JSEventSourceConstructor::getConstructData):
- * bindings/js/JSEventSourceConstructor.h: Added.
- (WebCore::JSEventSourceConstructor::classInfo):
- * bindings/js/JSEventSourceCustom.cpp: Added.
- (WebCore::JSEventSource::markChildren):
- (WebCore::JSEventSource::addEventListener):
- (WebCore::JSEventSource::removeEventListener):
- * bindings/js/JSEventTarget.cpp:
- (WebCore::toJS):
- (WebCore::toEventTarget):
- * bindings/js/JSWorkerContextCustom.cpp:
- (WebCore::JSWorkerContext::eventSource):
- * dom/EventNames.h:
- * dom/EventTarget.cpp:
- (WebCore::EventTarget::toEventSource):
- * dom/EventTarget.h:
- * page/DOMWindow.idl:
- * page/EventSource.cpp: Added.
- (WebCore::EventSource::EventSource):
- (WebCore::EventSource::~EventSource):
- (WebCore::EventSource::connect):
- (WebCore::EventSource::endRequest):
- (WebCore::EventSource::scheduleReconnect):
- (WebCore::EventSource::reconnectTimerFired):
- (WebCore::EventSource::url):
- (WebCore::EventSource::readyState):
- (WebCore::EventSource::close):
- (WebCore::EventSource::scriptExecutionContext):
- (WebCore::EventSource::addEventListener):
- (WebCore::EventSource::removeEventListener):
- (WebCore::EventSource::dispatchEvent):
- (WebCore::EventSource::didReceiveResponse):
- (WebCore::EventSource::didReceiveData):
- (WebCore::EventSource::didFinishLoading):
- (WebCore::EventSource::didFail):
- (WebCore::EventSource::didFailRedirectCheck):
- (WebCore::EventSource::parseEventStream):
- (WebCore::EventSource::parseEventStreamLine):
- (WebCore::EventSource::dispatchGenericEvent):
- (WebCore::EventSource::dispatchMessageEvent):
- (WebCore::EventSource::stop):
- * page/EventSource.h: Added.
- (WebCore::EventSource::create):
- (WebCore::EventSource::):
- (WebCore::EventSource::setOnopen):
- (WebCore::EventSource::onopen):
- (WebCore::EventSource::setOnmessage):
- (WebCore::EventSource::onmessage):
- (WebCore::EventSource::setOnerror):
- (WebCore::EventSource::onerror):
- (WebCore::EventSource::toEventSource):
- (WebCore::EventSource::eventListeners):
- (WebCore::EventSource::refEventTarget):
- (WebCore::EventSource::derefEventTarget):
- * page/EventSource.idl: Added.
- * workers/WorkerContext.idl:
-
-2009-08-15 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Minor DOMAgent bugfixes.
-
- https://bugs.webkit.org/show_bug.cgi?id=28177
-
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::nodeForId):
- * inspector/front-end/DOMAgent.js:
- (WebInspector.DOMAgent):
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
-
-2009-08-15 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Evaluating objects while on a breakpoint dumps string
- representation instead of live object.
-
- https://bugs.webkit.org/show_bug.cgi?id=28280
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype.completions.this._evalInInspectedWindow):
- (WebInspector.ConsoleView.prototype.completions):
- (WebInspector.ConsoleView.prototype._reportCompletions):
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame.delayedEvaluation):
- (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame):
- (WebInspector.ScriptsPanel.prototype.variablesInSelectedCallFrame):
-
-2009-08-15 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- [Haiku] Adding two new files to WebCore/platform/haiku:
- LocalizedStringsHaiku.cpp and LoggingHaiku.cpp
- https://bugs.webkit.org/show_bug.cgi?id=28129
-
- * platform/haiku/LocalizedStringsHaiku.cpp: Added.
- (WebCore::submitButtonDefaultLabel):
- (WebCore::inputElementAltText):
- (WebCore::resetButtonDefaultLabel):
- (WebCore::defaultLanguage):
- (WebCore::searchableIndexIntroduction):
- (WebCore::fileButtonChooseFileLabel):
- (WebCore::fileButtonNoFileSelectedLabel):
- (WebCore::contextMenuItemTagOpenLinkInNewWindow):
- (WebCore::contextMenuItemTagDownloadLinkToDisk):
- (WebCore::contextMenuItemTagCopyLinkToClipboard):
- (WebCore::contextMenuItemTagOpenImageInNewWindow):
- (WebCore::contextMenuItemTagDownloadImageToDisk):
- (WebCore::contextMenuItemTagCopyImageToClipboard):
- (WebCore::contextMenuItemTagOpenFrameInNewWindow):
- (WebCore::contextMenuItemTagCopy):
- (WebCore::contextMenuItemTagGoBack):
- (WebCore::contextMenuItemTagGoForward):
- (WebCore::contextMenuItemTagStop):
- (WebCore::contextMenuItemTagReload):
- (WebCore::contextMenuItemTagCut):
- (WebCore::contextMenuItemTagPaste):
- (WebCore::contextMenuItemTagNoGuessesFound):
- (WebCore::contextMenuItemTagIgnoreSpelling):
- (WebCore::contextMenuItemTagLearnSpelling):
- (WebCore::contextMenuItemTagSearchWeb):
- (WebCore::contextMenuItemTagLookUpInDictionary):
- (WebCore::contextMenuItemTagOpenLink):
- (WebCore::contextMenuItemTagIgnoreGrammar):
- (WebCore::contextMenuItemTagSpellingMenu):
- (WebCore::contextMenuItemTagShowSpellingPanel):
- (WebCore::contextMenuItemTagCheckSpelling):
- (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
- (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
- (WebCore::contextMenuItemTagFontMenu):
- (WebCore::contextMenuItemTagBold):
- (WebCore::contextMenuItemTagItalic):
- (WebCore::contextMenuItemTagUnderline):
- (WebCore::contextMenuItemTagOutline):
- (WebCore::contextMenuItemTagWritingDirectionMenu):
- (WebCore::contextMenuItemTagDefaultDirection):
- (WebCore::contextMenuItemTagLeftToRight):
- (WebCore::contextMenuItemTagRightToLeft):
- (WebCore::contextMenuItemTagInspectElement):
- (WebCore::searchMenuNoRecentSearchesText):
- (WebCore::searchMenuRecentSearchesText):
- (WebCore::searchMenuClearRecentSearchesText):
- (WebCore::unknownFileSizeText):
- (WebCore::AXWebAreaText):
- (WebCore::AXLinkText):
- (WebCore::AXListMarkerText):
- (WebCore::AXImageMapText):
- (WebCore::AXHeadingText):
- (WebCore::imageTitle):
- (WebCore::contextMenuItemTagTextDirectionMenu):
- (WebCore::AXButtonActionVerb):
- (WebCore::AXTextFieldActionVerb):
- (WebCore::AXRadioButtonActionVerb):
- (WebCore::AXCheckedCheckBoxActionVerb):
- (WebCore::AXUncheckedCheckBoxActionVerb):
- (WebCore::AXLinkActionVerb):
- (WebCore::AXDefinitionListTermText):
- (WebCore::AXDefinitionListDefinitionText):
- * platform/haiku/LoggingHaiku.cpp: Added.
- (WebCore::InitializeLoggingChannelsIfNecessary):
-
-2009-08-15 Darin Adler <darin@apple.com>
-
- Fix GTK build.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (fallbackObject): Pass 0 for document. Should be OK at least for now.
-
-2009-08-15 Darin Adler <darin@apple.com>
-
- Fix Qt build.
-
- * dom/XMLTokenizerQt.cpp: Use create functions instead of calling new
- directly to make CDATASection and Comment nodes.
-
-2009-08-14 Darin Adler <darin@apple.com>
-
- Reviewed by Sam Weinig.
-
- Make DOM classes start with a reference count of 1, like all other RefCounted
- https://bugs.webkit.org/show_bug.cgi?id=28068
-
- First half, everything except for element classes.
-
- * GNUmakefile.am: Removed DocPtr.h.
- * WebCore.gypi: Ditto.
- * WebCore.vcproj/WebCore.vcproj: Ditto.
- * WebCore.xcodeproj/project.pbxproj: Ditto.
-
- * dom/Attr.cpp:
- (WebCore::Attr::Attr): Added a call to createTextChild here so callers don't
- have to call it explicitly.
- (WebCore::Attr::create): Added.
- (WebCore::Attr::setValue): Changed to take AtomicString.
- (WebCore::Attr::cloneNode): Use create.
-
- * dom/Attr.h: Added a create function. Made the constructor private,
- and a lot of other functions private as well.
-
- * dom/Attribute.cpp:
- (WebCore::Attribute::createAttrIfNeeded): Use Attr::create.
-
- * dom/CDATASection.cpp:
- (WebCore::CDATASection::create): Added.
- (WebCore::CDATASection::cloneNode): Use create.
- (WebCore::CDATASection::virtualCreate): Ditto.
-
- * dom/CDATASection.h: Added a create function. Made everything private.
- Removed unneeded destructor declaration.
-
- * dom/CharacterData.cpp:
- (WebCore::CharacterData::CharacterData): Replaced the multiple constructors
- with a single one that takes ConstructionType.
-
- * dom/CharacterData.h: Made more functions be protected and private.
- Made m_data be private.
-
- * dom/Comment.cpp:
- (WebCore::Comment::Comment): Got rid of an extra constructor.
- (WebCore::Comment::create): Added.
- (WebCore::Comment::cloneNode): Call create.
-
- * dom/Comment.h: Added a create function. Made everything private.
-
- * dom/ContainerNode.cpp:
- (WebCore::dispatchChildInsertionEvents): Use RefPtr instead of DocPtr.
- (WebCore::dispatchChildRemovalEvents): Ditto.
-
- * dom/ContainerNode.h: Made the constructor protected and passed
- ConstructionType instead of an isElement boolean.
-
- * dom/DocPtr.h: Removed.
-
- * dom/Document.cpp:
- (WebCore::Document::Document): Simplified the code that sets m_document
- since it's no longer a smart pointer.
- (WebCore::Document::removedLastRef): Use explicit calls to selfOnlyRef
- and selfOnlyDeref instead of a DocPtr in here.
- (WebCore::Document::~Document): Simplified the code that sets m_document
- since it's no longer a smart pointer.
- (WebCore::Document::createDocumentFragment): Call create.
- (WebCore::Document::createTextNode): Ditto.
- (WebCore::Document::createComment): Ditto.
- (WebCore::Document::createCDATASection): Ditto.
- (WebCore::Document::createProcessingInstruction): Ditto.
- (WebCore::Document::createEntityReference): Ditto.
- (WebCore::Document::createEditingTextNode): Ditto.
- (WebCore::Document::importNode): Call Attr::create.
- (WebCore::Document::createAttributeNS): Ditto.
-
- * dom/Document.h: Call adoptRef. Made a lot of functions private and
- protected and sorted them so public functions come first.
-
- * dom/DocumentFragment.cpp:
- (WebCore::DocumentFragment::create): Added.
- (WebCore::DocumentFragment::cloneNode): Call create.
- * dom/DocumentFragment.h: Added create.
-
- * dom/DocumentType.cpp:
- (WebCore::DocumentType::DocumentType): Pass type to Node constructor.
- (WebCore::DocumentType::cloneNode): Use create.
- * dom/DocumentType.h:
- (WebCore::DocumentType::create): Call adoptRef.
-
- * dom/EditingText.cpp:
- (WebCore::EditingText::create): Added.
- * dom/EditingText.h: Added a create function. Made everything private.
-
- * dom/Element.cpp:
- (WebCore::Element::Element): Pass CreateElementZeroRefCount to preserve
- the zero reference count behavior for classes derived from Element.
-
- * dom/EntityReference.cpp:
- (WebCore::EntityReference::create): Added.
- (WebCore::EntityReference::cloneNode): Call create.
- * dom/EntityReference.h: Added create. Made everything private.
-
- * dom/Node.cpp:
- (WebCore::Node::initialRefCount): Added. Inline helper function for
- the constructor.
- (WebCore::Node::isContainer): Ditto.
- (WebCore::Node::isElement): Ditto.
- (WebCore::Node::isText): Ditto.
- (WebCore::Node::Node): Changed to take a construction type argument.
- Since m_document is now a normal pointer, added a call to selfOnlyRef.
- (WebCore::Node::~Node): Ditto, but selfOnlyDeref.
- (WebCore::Node::setDocument): Added selfOnlyRef/Deref calls.
- (WebCore::Node::appendTextContent): Use the data function instead of
- calling nodeValue functions, which do the same thing in a roundabout way.
-
- * dom/Node.h: Made the constructor protected and replaced the multiple
- arguments iwth a single ConstructionType argument. Sorted the public
- things first.
-
- * dom/Notation.h: Made most things private.
- * dom/Notation.cpp: Removed extra constructor.
-
- * dom/ProcessingInstruction.cpp:
- (WebCore::ProcessingInstruction::create): Added.
- (WebCore::ProcessingInstruction::cloneNode): Call create.
- * dom/ProcessingInstruction.h: Added create function. Made many other
- members private.
-
- * dom/Range.cpp:
- (WebCore::Range::processContents): Use DocumentFragment::create.
-
- * dom/Text.cpp:
- (WebCore::Text::Text): Updated for base class change.
- (WebCore::Text::create): Added.
- (WebCore::Text::splitText): Changed to not require access to m_data.
- (WebCore::Text::cloneNode): Call create.
- (WebCore::Text::createRenderer): Call dataImpl.
- (WebCore::Text::attach): Call data.
- (WebCore::Text::recalcStyle): Call dataImpl.
- (WebCore::Text::virtualCreate): Call create.
- (WebCore::Text::createWithLengthLimit): Call create.
- (WebCore::Text::formatForDebugger): Call data.
-
- * dom/Text.h: Added a create function. Made many other members private.
- Renamed createNew to virtualCreate.
-
- * dom/XMLTokenizer.cpp:
- (WebCore::XMLTokenizer::enterText): Call Text::create.
-
- * dom/XMLTokenizerLibxml2.cpp:
- (WebCore::XMLTokenizer::cdataBlock): Call CDATASection::create.
- (WebCore::XMLTokenizer::comment): Call Comment::create.
-
- * editing/CompositeEditCommand.cpp:
- (WebCore::CompositeEditCommand::deleteInsignificantText):
- Call data instead of string.
-
- * editing/CreateLinkCommand.cpp:
- (WebCore::CreateLinkCommand::doApply): Call Text::create.
-
- * editing/EditorCommand.cpp:
- (WebCore::executeInsertNode): Call DocumentFragment::create.
-
- * editing/SplitTextNodeCommand.cpp:
- (WebCore::SplitTextNodeCommand::doApply): Call Text::create.
-
- * editing/markup.cpp:
- (WebCore::appendStartMarkup): Call data instead of nodeValue.
-
- * html/HTMLDocument.h:
- (WebCore::HTMLDocument::create): Call adoptRef.
-
- * html/HTMLElement.cpp:
- (WebCore::HTMLElement::createContextualFragment): Call DocumentFragment::create.
- (WebCore::replaceChildrenWithFragment): Call data instead of string.
- (WebCore::replaceChildrenWithText): Call Text::create.
- (WebCore::HTMLElement::setInnerText): Call DocumentFragment::create and
- Text::create.
- (WebCore::HTMLElement::setOuterText): Call Text::create.
-
- * html/HTMLKeygenElement.cpp:
- (WebCore::HTMLKeygenElement::HTMLKeygenElement): Call Text::create.
-
- * html/HTMLOptionElement.cpp:
- (WebCore::HTMLOptionElement::setText): Call Text::create.
-
- * html/HTMLParser.cpp:
- (WebCore::HTMLParser::textCreateErrorCheck): Call Text::create.
- (WebCore::HTMLParser::commentCreateErrorCheck): Call Comment::create.
- (WebCore::HTMLParser::handleIsindex): Call Text::create.
-
- * html/HTMLViewSourceDocument.cpp:
- (WebCore::HTMLViewSourceDocument::addText): Call Text::create.
-
- * html/HTMLViewSourceDocument.h:
- (WebCore::HTMLViewSourceDocument::create): Call adoptRef.
-
- * loader/FTPDirectoryDocument.cpp:
- (WebCore::FTPDirectoryTokenizer::appendEntry): Call Text::create.
- (WebCore::FTPDirectoryTokenizer::createTDForFilename): Call Text::create.
-
- * loader/FTPDirectoryDocument.h:
- (WebCore::FTPDirectoryDocument::create): Call adoptRef.
- * loader/ImageDocument.h:
- (WebCore::ImageDocument::create): Ditto.
- * loader/MediaDocument.h:
- (WebCore::MediaDocument::create): Ditto.
- * loader/PlaceholderDocument.h:
- (WebCore::PlaceholderDocument::create): Ditto.
- * loader/PluginDocument.h:
- (WebCore::PluginDocument::create): Ditto.
- * loader/TextDocument.h:
- (WebCore::TextDocument::create): Ditto.
-
- * loader/loader.cpp:
- (WebCore::Loader::Host::didFinishLoading): Use RefPtr instead of DocPtr.
- (WebCore::Loader::Host::didFail): Ditto.
-
- * platform/TreeShared.h:
- (WebCore::TreeShared::TreeShared): Added an initialRefCount argument,
- defaulting to 1. Node still sometimes initializes it to 0 instead for now.
-
- * rendering/RenderText.cpp:
- (WebCore::RenderText::originalText): Use dataImpl instead of string.
-
- * rendering/RenderTextFragment.cpp:
- (WebCore::RenderTextFragment::originalText): Use dataImpl instead of string.
- (WebCore::RenderTextFragment::previousCharacter): Ditto.
-
- * svg/SVGDocument.h:
- (WebCore::SVGDocument::create): Use adoptRef.
-
- * svg/SVGElementInstance.cpp:
- (WebCore::SVGElementInstance::SVGElementInstance): Updated to take a
- PassRefPtr.
-
- * svg/SVGElementInstance.h: Made everything private.
-
- * wml/WMLDocument.h:
- (WebCore::WMLDocument::create): Called adoptRef.
-
- * xml/XPathNamespace.cpp:
- (WebCore::XPathNamespace::XPathNamespace): Take AtomicString arguments.
- * xml/XPathNamespace.h: Made everything private.
-
- * xml/XSLTProcessor.cpp:
- (WebCore::createFragmentFromSource): Use DocumentFragment::create and
- Text::create.
-
-2009-08-13 Jon Honeycutt <jhoneycutt@apple.com>
-
- Part of <rdar://problem/6218721> No MSAA focus events fired for Webkit
- nightly (20866)
-
- https://bugs.webkit.org/show_bug.cgi?id=20866
-
- Reviewed by Oliver Hunt.
-
- * accessibility/AXObjectCache.cpp:
- (WebCore::AXObjectCache::AXObjectCache):
- Changed to take a pointer to its owner document. This is used by
- AXObjectCache::handleFocusedUIElementChanged().
- (WebCore::AXObjectCache::focusedUIElementForPage):
- Code moved from AccessibilityRenderObject::focusedUIElement(). Modified
- to be a static function and to take a pointer to a Page.
- (WebCore::AXObjectCache::platformGenerateAXID):
- Moved the code to generate the next AXID from getAXID() to here. Added
- a #if to make this non-WIN only, because Windows has its own
- implementation.
- (WebCore::AXObjectCache::getAXID):
- Ensure that we generate a positive AXID, ranging from 1 to LONG_MAX.
-
- * accessibility/AXObjectCache.h:
- Add a declaration for Document and Page. Removed the declaration of
- AccessibilityObject, because we include the header. Reordered the
- declaration of Node alphabetically. Moved the typedef for AXID to
- AccessibilityObject. Removed some trailing whitespace. Added a member
- variable to hold a pointer to the owner Document.
- (WebCore::AXObjectCache::AXObjectCache):
- Changed to take a pointer to its owner Document.
- (WebCore::AXObjectCache::focusedUIElementForPage):
- Added; code moved from AccessiblityRenderObject::focusedUIElement().
- Returns the focused element with respect to accessibility.
- (WebCore::AXObjectCache::platformGenerateAXID):
- Declare a function to generate an AXID.
- (WebCore::AXObjectCache::objectFromAXID):
- Return the AccessibilityObject with the given AXID.
-
- * accessibility/AccessibilityObject.h:
- Moved the typedef for AXID from AXObjectCache to here. Made the m_id
- member use the typedef.
- (WebCore::AccessibilityObject::axObjectID):
- Changed the return type to use the typedef.
- (WebCore::AccessibilityObject::setAXObjectID):
- Changed the argument type to use the typedef.
-
- * accessibility/AccessibilityRenderObject.cpp:
- Removed some unneeded #includes.
- (WebCore::AccessibilityRenderObject::focusedUIElement):
- Moved the code to AXObjectCache::focusedUIElementForPage(), which we now
- call.
-
- * accessibility/win/AXObjectCacheWin.cpp:
- (WebCore::AXObjectCache::platformGenerateAXID):
- Ensure that we generate an AXID that is in the range 1 to LONG_MAX.
- (WebCore::AXObjectCache::handleFocusedUIElementChanged):
- If the Document has no Page, return. If the Page has not focused
- element (respecting accessibility), return. Assert that the
- accessibility of the focused element is not ignored, and that the
- object's AXID will be negative and fit into a LONG when negated.
- Broadcast a focus event for the object.
-
- * dom/Document.cpp:
- (WebCore::Document::axObjectCache):
- Pass this when creating the AXObjectCache.
- (WebCore::Document::setFocusedNode):
- Call AXObjectCache::handleFocusedUIElementChanged() on Windows.
-
-2009-08-14 Jiahua Huang <jhuangjiahua@gmail.com>
-
- Reviewed by Jan Alonzo.
-
- [gtk] Pasteboard/GtkClipboard can't handle the "text/html" target.
- https://bugs.webkit.org/show_bug.cgi?id=27028
-
- Remove the improper set of enum WebKitWebViewTargetInfo
- by grabbing the target infos via m_helper.
-
- * manual-tests/gtk/copy-htmltext.html: Added.
- * platform/Pasteboard.h:
- * platform/gtk/PasteboardGtk.cpp:
- (WebCore::clipboard_get_contents_cb):
- * platform/gtk/PasteboardHelper.h:
-
-2009-08-14 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt.
-
- Fix an assertion when bringing up the Inspector.
- https://bugs.webkit.org/show_bug.cgi?id=28318
-
- The fix for bug 28295 assumed that image clients count the number of times
- addClient/removeClient is called. That was true for CachedResource clients,
- but not StyleGeneratedImage clients, which pass the call onto CSSImageGeneratorValue.
-
- Fix by making CSSImageGeneratorValue count the number of times a client is
- added/removed.
-
- * css/CSSCanvasValue.cpp:
- (WebCore::CSSCanvasValue::canvasChanged):
- (WebCore::CSSCanvasValue::canvasResized):
- * css/CSSImageGeneratorValue.cpp:
- (WebCore::CSSImageGeneratorValue::addClient):
- (WebCore::CSSImageGeneratorValue::removeClient):
- (WebCore::CSSImageGeneratorValue::getImage):
- * css/CSSImageGeneratorValue.h:
-
-2009-08-14 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Kevin Ollivier.
-
- Correct libcurl crash when downloading local files.
- https://bugs.webkit.org/show_bug.cgi?id=28312
-
- No new tests. Test is covered by fast/encoding/char-encoding-mac.html.
-
- * platform/network/curl/ResourceHandleManager.cpp:
- (WebCore::handleLocalReceiveResponse): New static function that
- performs the local setting of valid URL and firing didReceiveResponse.
- This code was moved from writeCallback.
- (WebCore::writeCallback): Move local file handling to static function
- (above) and use the function instead.
- (WebCore::readCallback): Add check
- for responseFired, and handle as a local file if it was not.
-
-2009-08-14 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Oliver Hunt.
-
- [Haiku] Fix RenderThemeHaiku build.
- https://bugs.webkit.org/show_bug.cgi?id=28307
-
- * platform/haiku/RenderThemeHaiku.cpp: Included RenderThemeHaiku.h
- instead of RenderTheme.h.
- (WebCore::RenderThemeHaiku::paintCheckbox): Removed the wrong 'virtual'
- before the function.
- (WebCore::RenderThemeHaiku::paintRadio): Removed the wrong 'virtual'
- before the function.
- * platform/haiku/RenderThemeHaiku.h: Corrected wrong function definitions.
-
-2009-08-14 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Oliver Hunt.
-
- [Haiku] Adding SharedBufferHaiku to WebCore.
- https://bugs.webkit.org/show_bug.cgi?id=28309
-
- * platform/haiku/SharedBufferHaiku.cpp: Added.
- (WebCore::SharedBuffer::createWithContentsOfFile):
- * platform/haiku/TemporaryLinkStubs.cpp: Removed unnecessary headers
- and functions.
- (WebCore::signedPublicKeyAndChallengeString):
- (WebCore::getSupportedKeySizes):
-
-2009-08-14 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Ensure we're getting the right v8 context in the V8 DOMWindowEvent custom getter.
-
- https://bugs.webkit.org/show_bug.cgi?id=28311
-
- This should fix Chromium failing LayoutTests/fast/events/set-event-in-another-frame.html.
-
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
-
-2009-08-14 Aaron Boodman <aa@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- BUG 28134: Move the remaining parts of Access Control from XMLHttpRequest to ThreadableDocumentLoader.
- https://bugs.webkit.org/show_bug.cgi?id=28134
-
- No new tests added since Access Control was already well tested and this is a pure refactor.
-
- * loader/DocumentThreadableLoader.cpp: Move a lot of the access control code from XHR in, preserving its
- basic strategy. Also, modify the synchronous path to not be a special case, but reuse more of the async
- path.
-
- (WebCore::DocumentThreadableLoader::loadResourceSynchronously): Go through the async path and pass additional flags.
- (WebCore::DocumentThreadableLoader::create): Group enum params into an options struct.
- (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Ditto.
- (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest): Brought mostly from XHR.
- (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight): Ditto.
- (WebCore::DocumentThreadableLoader::willSendRequest): Handle preflight case.
- (WebCore::DocumentThreadableLoader::didReceiveResponse): Ditto.
- (WebCore::DocumentThreadableLoader::didFinishLoading): Ditto.
- (WebCore::DocumentThreadableLoader::getShouldUseCredentialStorage): Ditto.
- (WebCore::DocumentThreadableLoader::preflightSuccess): Preflight handling.
- (WebCore::DocumentThreadableLoader::preflightFailure): Ditto.
- (WebCore::DocumentThreadableLoader::loadRequest): Common request function that handles async/sync.
- * loader/DocumentThreadableLoader.h: Group enum params into an options struct.
- * loader/ThreadableLoader.cpp: Ditto.
- (WebCore::ThreadableLoader::create): Ditto.
- (WebCore::ThreadableLoader::loadResourceSynchronously): Ditto.
- * loader/ThreadableLoader.h: Ditto.
- (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Ditto.
- * loader/WorkerThreadableLoader.cpp: Ditto.
- (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):Ditto.
- (WebCore::WorkerThreadableLoader::loadResourceSynchronously): Ditto.
- (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Ditto.
- (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader): Ditto.
- * loader/WorkerThreadableLoader.h: Ditto.
- (WebCore::WorkerThreadableLoader::create): Ditto.
- * platform/CrossThreadCopier.h: Allow ThreadableLoaderOptions to be copied across threads.
- (WebCore::):
- * workers/WorkerScriptLoader.cpp: More enum->struct grouping.
- (WebCore::WorkerScriptLoader::loadSynchronously): More enum->struct grouping.
- (WebCore::WorkerScriptLoader::loadAsynchronously): More enum->struct grouping.
- * xml/XMLHttpRequest.cpp: Remove all the access control code and some supporting state.
- (WebCore::XMLHttpRequest::XMLHttpRequest): Ditto.
- (WebCore::XMLHttpRequest::createRequest): Ditto.
- (WebCore::XMLHttpRequest::didFinishLoading): Ditto.
- (WebCore::XMLHttpRequest::didReceiveResponse): Ditto.
- (WebCore::XMLHttpRequest::didReceiveData): Ditto.
- * xml/XMLHttpRequest.h: Ditto.
-
-2009-08-14 Darin Adler <darin@apple.com>
-
- Reviewed by Sam Weinig.
-
- Rename the confusing isObject(<class>) to inherits(<class>).
- It still works on non-objects, returning false.
-
- * bindings/js/JSEventTarget.cpp:
- (WebCore::toEventTarget):
- * bindings/js/JSGeolocationCustom.cpp:
- (WebCore::createPositionCallback):
- (WebCore::createPositionErrorCallback):
- * bindings/js/JSNodeFilterCustom.cpp:
- (WebCore::toNodeFilter):
- * bindings/js/JSXMLHttpRequestCustom.cpp:
- (WebCore::JSXMLHttpRequest::send):
- * bindings/js/JSXSLTProcessorCustom.cpp:
- (WebCore::JSXSLTProcessor::importStylesheet):
- (WebCore::JSXSLTProcessor::transformToFragment):
- (WebCore::JSXSLTProcessor::transformToDocument):
- * bindings/scripts/CodeGeneratorJS.pm:
- * bridge/objc/objc_runtime.mm:
- (JSC::Bindings::callObjCFallbackObject):
- * bridge/runtime_method.cpp:
- (JSC::callRuntimeMethod):
- Updated to new name, inherits, from old name, isObject.
-
-2009-08-14 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Allow Qt API to list and to remove URL schemes that were registered as
- local URL schemes.
- [Qt] Allow applications to register their own local URL scheme.
- https://bugs.webkit.org/show_bug.cgi?id=28240
-
- * page/SecurityOrigin.cpp:
- (WebCore::SecurityOrigin::removeURLSchemeRegisteredAsLocal):
- (WebCore::SecurityOrigin::localURLSchemes):
- * page/SecurityOrigin.h:
-
-2009-08-14 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Wrap console objects late (in the frontend) so that injected
- script was already in place.
-
- https://bugs.webkit.org/show_bug.cgi?id=28297
-
- * inspector/ConsoleMessage.cpp:
- (WebCore::ConsoleMessage::ConsoleMessage):
- * inspector/ConsoleMessage.h:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::addMessageToConsole):
- (WebCore::InspectorController::startGroup):
- (WebCore::InspectorController::setFrontendProxyObject):
- * inspector/InspectorController.h:
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::InspectorFrontend):
- (WebCore::InspectorFrontend::addMessageToConsole):
- * inspector/InspectorFrontend.h:
-
-2009-08-13 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Fix logic in RenderObject::updateFillImages() that led to incorrect client
- counts if an image was used twice in the background-image property.
- https://bugs.webkit.org/show_bug.cgi?id=28295
-
- Test: fast/backgrounds/multiple-backgrounds-assert.html
-
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::updateFillImages):
- Simplify the logic to call addClient()/removeClient() for every background
- image, but go through the new layers first to avoid removing all the
- clients of an image.
-
-2009-08-13 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Maciej Stachowiak.
-
- Devirtualise marking
- https://bugs.webkit.org/show_bug.cgi?id=28294
-
- Make sure we override the JSObject createStructure method on those
- objects that have custom marking routines.
-
- * bindings/scripts/CodeGeneratorJS.pm:
-
-2009-08-13 Darin Adler <darin@apple.com>
-
- Reviewed by Mark Rowe.
-
- Follow-up to earlier work to remove dependencies on JavaScriptCore.
-
- * ForwardingHeaders/parser/Parser.h: Removed.
- * inspector/JavaScriptDebugServer.cpp: Removed now-unneeded includes
- of Parser.h.
-
-2009-08-13 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Eric Seidel.
-
- 'box-orient: block-axis' behaves like 'box-orient: horizontal', causes
- an assertion failure in debug builds
- https://bugs.webkit.org/show_bug.cgi?id=28279
-
- Test: fast/flexbox/block-axis.html
-
- * css/CSSPrimitiveValueMappings.h:
- (WebCore::CSSPrimitiveValue::operator EBoxOrient): Map block-axis to
- vertical.
-
-2009-08-13 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Fix crash when removing reflection on an absolutely-positioned image.
- https://bugs.webkit.org/show_bug.cgi?id=28289
-
- Make sure we clean up the reflection layer when removing the reflection,
- so that the RenderLayer tree does not contain pointers to deleted layers.
-
- Test: fast/reflections/reflected-img-crash.html
-
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::~RenderLayer):
- (WebCore::RenderLayer::styleChanged):
- (WebCore::RenderLayer::removeReflection):
- * rendering/RenderLayer.h:
-
-2009-08-13 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Simon Fraser.
-
- misalignment because of float:left of <div> tag
- https://bugs.webkit.org/show_bug.cgi?id=15869
-
- One section of http://edgar.sec.gov site draws to the right of the rest
- of the content
- <rdar://problem/7135951>
-
- Tests: fast/block/float/avoidance-percent-width-compat.html
- fast/block/float/avoidance-percent-width-strict.html
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::getClearDelta): Changed to apply the same float
- avoidance logic in strict mode and in compatibility mode, which
- matches Firefox and IE. Changed to compute and use the computed
- width of the child, instead of ignoring non-fixed widths.
-
-2009-08-13 Steve Block <steveblock@google.com>
-
- Reviewed by Darin Adler.
-
- Geolocation PositionOptions does not use correct default values.
- https://bugs.webkit.org/show_bug.cgi?id=27254
-
- Sets the correct default values for the properties of the PositionOptions object
- passed to Geolocation methods. See http://www.w3.org/TR/geolocation-API/.
-
- Also adds checking to throw an exception if arguments of the incorrect type are
- passed to Geolocation methods. Adds a layout test to test this. This test should
- pass on all platforms where Geolocation is implemented.
-
- Test: fast/dom/Geolocation/argument-types.html
-
- * bindings/js/JSGeolocationCustom.cpp:
- (WebCore::createPositionCallback): Added. Creates the callback.
- (WebCore::createPositionErrorCallback): Added. Creates the calback.
- (WebCore::createPositionOptions): Added. Creates the PositionOptions object, setting defaults where required.
- (WebCore::JSGeolocation::getCurrentPosition): Modified. Now uses above helper functions.
- (WebCore::JSGeolocation::watchPosition): Modified. Now uses above helper functions.
- * page/Geolocation.cpp:
- (WebCore::Geolocation::GeoNotifier::GeoNotifier): Modified. Asserts that PositionOptions object is present.
- (WebCore::Geolocation::GeoNotifier::startTimer): Modified. Only starts timer if timeout has been set.
- * page/PositionOptions.h:
- (WebCore::PositionOptions::create): Modified. Creates object with default values.
- (WebCore::PositionOptions::timeout): Modified. Uses correct type.
- (WebCore::PositionOptions::hasTimeout): Added. Determines whether a timeout has been set.
- (WebCore::PositionOptions::setTimeout): Modified. Uses correct type.
- (WebCore::PositionOptions::maximumAge): Modified. Uses correct type.
- (WebCore::PositionOptions::setMaximumAge): Modified. Uses correct type.
- (WebCore::PositionOptions::PositionOptions): Modified. Creates object with default values.
-
-2009-08-13 David Levin <levin@chromium.org>
-
- Unreviewed chromium build fix.
-
- [Chromium] Let CodeGeneratorV8.pm know that RGBColor is ref-counted.
-
- * bindings/scripts/CodeGeneratorV8.pm:
-
-2009-08-13 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- Merge error in SharedWorker code
- https://bugs.webkit.org/show_bug.cgi?id=28277
-
- Fixed merge error that prevents WebKit from compiling with SHARED_WORKERS enabled.
- No new tests needed.
-
- * workers/DefaultSharedWorkerRepository.cpp:
- Removed duplicated functions.
-
-2009-08-13 Kyle Prete <kylep@chromium.org>
-
- Reviewed by Dave Levin.
-
- Chromium: Show a "Playback Disabled" button on media error.
- https://bugs.webkit.org/show_bug.cgi?id=28196
- Use a disabled play button when the media file cannot be played.
-
- No new tests needed. Covered by LayoutTests/media/video-empty-source.html
-
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::paintMediaPlayButton):
-
-2009-08-13 Mark Rowe <mrowe@apple.com>
-
- Try and fix the Qt build.
-
- * bridge/qt/qt_runtime.cpp:
-
-2009-08-13 Zan Dobersek <zandobersek@gmail.com>
-
- Reviewed by Gustavo Noronha.
-
- [GTK] Drag and drop support
- https://bugs.webkit.org/show_bug.cgi?id=23642
-
- Utilizes functions that are being called upon drag and drop actions.
- Uses different GTK clipboards that hold different types
- of drag data - images, HTML markup, text, URL, URL label.
- Also clears each clipboard before setting new data to it.
-
- No new tests - despite some implementations, no new functionality
- is added until implementations of the GTK drag and drop protocol
- in WebKit part.
-
- * platform/gtk/ClipboardGtk.cpp:
- (WebCore::ClipboardGtk::ClipboardGtk):
- (WebCore::ClipboardGtk::~ClipboardGtk):
- (WebCore::getCachedImage):
- (WebCore::ClipboardGtk::declareAndWriteDragImage):
- (WebCore::ClipboardGtk::writeURL):
- (WebCore::ClipboardGtk::writeRange):
- * platform/gtk/ClipboardGtk.h: ClipboardGdk -> ClipboardGtk
-
-2009-08-13 Darin Adler <darin@apple.com>
-
- Reviewed by David Levin.
-
- JavaScriptCore tweaks to get ready for the parser arena
- https://bugs.webkit.org/show_bug.cgi?id=28243
-
- * ForwardingHeaders/runtime/CollectorHeapIterator.h: Removed.
-
- * WebCore.xcodeproj/project.pbxproj: Exposed a couple header
- files as Private that are now needed to compile Mac WebKit.
-
- * bindings/js/JSAudioConstructor.cpp:
- * bindings/js/JSDOMBinding.cpp:
- * bindings/js/JSDOMBinding.h:
- * bindings/js/JSDOMWindowCustom.cpp:
- * bindings/js/JSHTMLInputElementCustom.cpp:
- * bindings/js/JSHistoryCustom.cpp:
- * bindings/js/JSImageConstructor.cpp:
- * bindings/js/JSLazyEventListener.cpp:
- * bindings/js/JSLocationCustom.cpp:
- * bindings/js/JSMessageChannelConstructor.cpp:
- * bindings/js/JSOptionConstructor.cpp:
- * bindings/js/JSWebSocketConstructor.cpp:
- * bindings/js/JSWebSocketCustom.cpp:
- * bindings/js/JSWorkerConstructor.cpp:
- * bindings/js/JSXMLHttpRequestConstructor.cpp:
- * bridge/jni/jni_jsobject.mm:
- Updated includes.
-
- * inspector/JavaScriptDebugServer.cpp:
- (WebCore::JavaScriptDebugServer::sourceParsed):
- Change to not assert if this is called with no listeners.
- I don't think this was guaranteed before, and we now use
- this code path when recompiling. Slightly less efficient,
- but this is a one-time cost when turning on the debugger.
- (WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
- Change to call Debugger::recompileAllJSFunctions.
-
-2009-08-13 Brady Eidson <beidson@apple.com>
-
- Reviewed by Eric Seidel.
-
- <rdar://problem/7138591> and https://bugs.webkit.org/show_bug.cgi?id=28260
- onhashchange property cannot be set from javascript.
-
- Test: fast/loader/onhashchange-attribute-listeners.html
-
- * html/HTMLBodyElement.cpp:
- (WebCore::HTMLBodyElement::onhashchange):
- (WebCore::HTMLBodyElement::setOnhashchange):
- * html/HTMLBodyElement.h:
- * html/HTMLBodyElement.idl:
-
- * html/HTMLFrameSetElement.cpp:
- (WebCore::HTMLFrameSetElement::onhashchange):
- (WebCore::HTMLFrameSetElement::setOnhashchange):
- * html/HTMLFrameSetElement.h:
- * html/HTMLFrameSetElement.idl:
-
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::onhashchange):
- (WebCore::DOMWindow::setOnhashchange):
- * page/DOMWindow.h:
- * page/DOMWindow.idl:
-
-2009-08-13 Mark Rowe <mrowe@apple.com>
-
- Reviewed by Geoff Garen.
-
- Fix leaks of RGBColor instances from below SVGColor::rgbColor.
-
- * svg/SVGColor.cpp:
- (WebCore::SVGColor::rgbColor): Return a PassRefPtr to ensure that the newly-allocated
- RGBColor is cleaned up by the caller.
- * svg/SVGColor.h:
-
-2009-08-13 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Migrate to DOMAgent (serialized access to DOM).
-
- https://bugs.webkit.org/show_bug.cgi?id=28177
-
- * bindings/js/JSInspectorBackendCustom.cpp:
- (WebCore::JSInspectorBackend::highlightDOMNode):
- (WebCore::JSInspectorBackend::nodeForId):
- (WebCore::JSInspectorBackend::idForNode):
- (WebCore::JSInspectorBackend::wrapObject):
- (WebCore::JSInspectorBackend::unwrapObject):
- (WebCore::JSInspectorBackend::pushNodePathToFrontend):
- (WebCore::JSInspectorBackend::selectDatabase):
- (WebCore::JSInspectorBackend::selectDOMStorage):
- * bindings/js/ScriptObjectQuarantine.cpp:
- (WebCore::getQuarantinedScriptObject):
- * bindings/js/ScriptObjectQuarantine.h:
- * bindings/js/ScriptValue.cpp:
- (WebCore::ScriptValue::isObject):
- * bindings/js/ScriptValue.h:
- * bindings/v8/ScriptObjectQuarantine.cpp:
- (WebCore::getQuarantinedScriptObject):
- * bindings/v8/ScriptObjectQuarantine.h:
- * bindings/v8/ScriptValue.h:
- (WebCore::ScriptValue::isObject):
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8InspectorBackendCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * inspector/ConsoleMessage.cpp:
- (WebCore::ConsoleMessage::ConsoleMessage):
- * inspector/ConsoleMessage.h:
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::clearMessages):
- (WebCore::InspectorBackend::loaded):
- (WebCore::InspectorBackend::highlight):
- (WebCore::InspectorBackend::nodeForId):
- (WebCore::InspectorBackend::idForNode):
- (WebCore::InspectorBackend::wrapObject):
- (WebCore::InspectorBackend::unwrapObject):
- (WebCore::InspectorBackend::pushNodePathToFrontend):
- (WebCore::InspectorBackend::addNodesToSearchResult):
- (WebCore::InspectorBackend::selectDatabase):
- (WebCore::InspectorBackend::selectDOMStorage):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::InspectorController):
- (WebCore::InspectorController::focusNode):
- (WebCore::InspectorController::addMessageToConsole):
- (WebCore::InspectorController::clearConsoleMessages):
- (WebCore::InspectorController::startGroup):
- (WebCore::InspectorController::scriptObjectReady):
- (WebCore::InspectorController::setFrontendProxyObject):
- (WebCore::InspectorController::close):
- (WebCore::InspectorController::didCommitLoad):
- (WebCore::InspectorController::wrapObject):
- (WebCore::InspectorController::unwrapObject):
- * inspector/InspectorController.h:
- * inspector/InspectorDOMAgent.cpp:
- (WebCore::InspectorDOMAgent::setDocument):
- (WebCore::InspectorDOMAgent::handleEvent):
- (WebCore::InspectorDOMAgent::pushDocumentToFrontend):
- (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
- (WebCore::InspectorDOMAgent::nodeForId):
- (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
- (WebCore::InspectorDOMAgent::buildObjectForNode):
- (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
- (WebCore::InspectorDOMAgent::innerParentElement):
- * inspector/InspectorDOMAgent.h:
- * inspector/InspectorDOMStorageResource.cpp:
- (WebCore::InspectorDOMStorageResource::bind):
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::clearConsoleMessages):
- (WebCore::InspectorFrontend::updateFocusedNode):
- (WebCore::InspectorFrontend::setDocument):
- (WebCore::InspectorFrontend::selectDatabase):
- (WebCore::InspectorFrontend::selectDOMStorage):
- (WebCore::InspectorFrontend::addNodesToSearchResult):
- * inspector/InspectorFrontend.h:
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype.clearMessages):
- (WebInspector.ConsoleView.prototype.completions):
- (WebInspector.ConsoleView.prototype._reportCompletions):
- (WebInspector.ConsoleView.prototype._messagesClicked):
- (WebInspector.ConsoleView.prototype.doEvalInWindow.evalCallback):
- (WebInspector.ConsoleView.prototype.doEvalInWindow):
- (WebInspector.ConsoleView.prototype._format):
- (WebInspector.ConsoleView.prototype._formatfunction):
- (WebInspector.ConsoleView.prototype._formatdate):
- (WebInspector.ConsoleView.prototype._formatregexp):
- (WebInspector.ConsoleView.prototype._formatnode):
- (WebInspector.ConsoleView.prototype._formatobject):
- * inspector/front-end/DOMAgent.js:
- (WebInspector.DOMNode):
- (WebInspector.DOMNode.prototype._renumber):
- (WebInspector.DOMDocument):
- (WebInspector.DOMAgent):
- (WebInspector.DOMAgent.prototype.getChildNodesAsync):
- (WebInspector.DOMAgent.prototype.setAttributeAsync):
- (WebInspector.DOMAgent.prototype.removeAttributeAsync):
- (WebInspector.DOMAgent.prototype.setTextNodeValueAsync):
- (WebInspector.DOMAgent.prototype.nodeForId):
- (WebInspector.DOMAgent.prototype._setDocument):
- (WebInspector.DOMAgent.prototype._setChildNodes):
- (WebInspector.DOMAgent.prototype._bindNodes):
- (WebInspector.DOMAgent.prototype._childNodeInserted):
- (WebInspector.CSSStyleDeclaration):
- (WebInspector.CSSStyleDeclaration.parseRule):
- (WebInspector.setDocument):
- (InspectorController.getStyles):
- (InspectorController.getComputedStyle):
- (InspectorController.getInlineStyle):
- (InspectorController.applyStyleText):
- (InspectorController.setStyleText):
- (InspectorController.toggleStyleEnabled):
- (InspectorController.applyStyleRuleText):
- (InspectorController.addStyleSelector):
- (InspectorController.setStyleProperty):
- (InspectorController.getPrototypes):
- (InspectorController.getProperties):
- (InspectorController.setPropertyValue):
- (InspectorController.evaluate):
- (InspectorController.addInspectedNode):
- (InspectorController.performSearch):
- (InspectorController.searchCanceled):
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
- (WebInspector.ElementsPanel.prototype.searchCanceled):
- (WebInspector.ElementsPanel.prototype.performSearch):
- (WebInspector.ElementsPanel.prototype._updateMatchesCount):
- (WebInspector.ElementsPanel.prototype._updateMatchesCountSoon):
- (WebInspector.ElementsPanel.prototype.addNodesToSearchResult):
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeOutline.prototype.set focusedDOMNode.restoreHighlightToHoveredNode):
- (WebInspector.ElementsTreeOutline.prototype.set focusedDOMNode):
- (WebInspector.ElementsTreeElement.prototype.updateChildren):
- (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.applyStyleRuleText):
- (InjectedScript.addStyleSelector):
- (InjectedScript._doesSelectorAffectNode):
- (InjectedScript._serializeRule):
- (InjectedScript._serializeStyle):
- (InjectedScript.getProperties):
- (InjectedScript.evaluate):
- (InjectedScript.addInspectedNode):
- (InjectedScript.performSearch.addNodesToResults):
- (InjectedScript.performSearch.matchExactItems):
- (InjectedScript.performSearch.matchExactId.addNodesToResults.call):
- (InjectedScript.performSearch.matchExactId):
- (InjectedScript.performSearch):
- (InjectedScript.performSearch.matchExactTagNames):
- (InjectedScript.performSearch.matchExactAttributeNames):
- (InjectedScript.performSearch.matchPartialTagNames):
- (InjectedScript.performSearch.matchStartOfTagNames):
- (InjectedScript.performSearch.matchPartialTagNamesAndAttributeValues):
- (InjectedScript.performSearch.matchPartialAttributeValues):
- (InjectedScript.performSearch.matchStyleSelector):
- (InjectedScript.performSearch.matchPlainText):
- (InjectedScript.performSearch.matchXPathQuery):
- (InjectedScript.performSearch.finishedSearching):
- (InjectedScript.performSearch.processChunk):
- (InjectedScript.searchCanceled):
- (InjectedScript._ensureCommandLineAPIInstalled.inspectObject):
- (InjectedScript._ensureCommandLineAPIInstalled):
- (InjectedScript._resolveObject):
- (InjectedScript._nodeForId):
- (InjectedScript._objectForId):
- (InjectedScript._createProxyObject):
- * inspector/front-end/ObjectPropertiesSection.js:
- (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
- (WebInspector.ObjectPropertyTreeElement.prototype.update):
- * inspector/front-end/ObjectProxy.js:
- (WebInspector.ObjectProxy):
- (WebInspector.ObjectPropertyProxy):
- * inspector/front-end/PropertiesSidebarPane.js:
- (WebInspector.PropertiesSidebarPane.prototype.update.callback):
- (WebInspector.PropertiesSidebarPane.prototype.update):
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylesSidebarPane.prototype.update.callback):
- (WebInspector.StylesSidebarPane.prototype.update):
- (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
- (WebInspector.StylePropertiesSection.prototype.editingSelectorCancelled):
- (WebInspector.BlankStylePropertiesSection.prototype.editingCommitted.callback):
- (WebInspector.BlankStylePropertiesSection.prototype.editingCommitted):
- (WebInspector.StylePropertyTreeElement.prototype):
- * inspector/front-end/inspector.js:
- (WebInspector._updateHoverHighlight):
- (WebInspector.loaded):
- (WebInspector.clearConsoleMessages):
- (WebInspector.selectDatabase):
- (WebInspector.selectDOMStorage):
- (WebInspector.updateFocusedNode):
- (WebInspector.addNodesToSearchResult):
- * inspector/front-end/utilities.js:
- (Object.proxyType):
- * storage/Storage.h:
- (WebCore::Storage::frame):
-
-2009-08-13 Mark Rowe <mrowe@apple.com>
-
- Reviewed by Geoff Garen.
-
- Fix leaks of RGBColor instances from below CSSPrimitiveValue::getRGBColorValue.
-
- * css/CSSPrimitiveValue.cpp:
- (WebCore::CSSPrimitiveValue::getRGBColorValue): Return a PassRefPtr to ensure that the
- newly-allocated RGBColor is cleaned up by the caller.
- * css/CSSPrimitiveValue.h:
-
-2009-08-13 Eric Seidel <eric@webkit.org>
-
- Reviewed by David Hyatt.
-
- wrong font size when css font-family includes monospace
- https://bugs.webkit.org/show_bug.cgi?id=19161
-
- Firefox only uses fixed-width default size for exactly "font-family: monospace;".
- WebKit has historically used fixed-width default size any time a
- font-family includes monospace in the fallback list.
-
- This patch corrects WebKit's behavior to match Firefox.
- I also had to fix a bug in WebKit's font-family fallback behavior where
- child elements would inherit parts of their parents fallback lists.
-
- This patch is mostly just replacing all cases where we used to check for:
- fontDescription.genericFontFamily() == MonospaceFamily
- with:
- fontDescription.useFixedDefaultSize()
-
- Tests: fast/css/getComputedStyle/computed-style-font-family-monospace.html
- fast/css/getComputedStyle/font-family-fallback-reset.html
-
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty):
- Deploy useFixedDefaultSize(). Also fix the bug where child
- FontDescriptions would carry part of the parent font-family fallback list.
- (WebCore::CSSStyleSelector::checkForGenericFamilyChange):
- It's no longer alright to just check genericFontFamily(),
- we have to check to make sure the changed style has a matching useFixedDefaultSize().
- * platform/graphics/FontDescription.h:
- (WebCore::FontDescription::useFixedDefaultSize):
- Only use the fixed default size if we have one font family and it is "monospace".
- "-webkit-monospace" is the internal representation of the CSS identifier "monospace".
-
-2009-08-13 Christian Plesner Hansen <christian.plesner.hansen@gmail.com>
-
- Reviewed by Dimitri Glazkov.
-
- [v8] Fix atomic string externalization crash.
- Atomic string externalization assumes that all non-empty strings
- can be externalized which is untrue on 64-bit. This change fixed
- that.
-
- https://bugs.webkit.org/show_bug.cgi?id=28215
-
- This bug causes loads of test crashes, no need to add new tests
- specifically for this.
-
- * bindings/v8/V8Binding.cpp:
- (WebCore::v8StringToAtomicWebCoreString):
-
-2009-08-13 George Staikos <george.staikos@torchmobile.com>
-
- Rubberstamped by Darin Adler.
-
- Use ASSERT_UNUSED instead of UNUSED_PARAM
-
- * wml/WMLAnchorElement.cpp:
- (WebCore::WMLAnchorElement::deregisterTask):
- * wml/WMLDoElement.cpp:
- (WebCore::WMLDoElement::deregisterTask):
-
-2009-08-13 Steve Block <steveblock@google.com>
-
- Reviewed by Darin Adler.
-
- Fixes a couple of bugs in SecurityOrigin::createFromDatabaseIdentifier.
- https://bugs.webkit.org/show_bug.cgi?id=28262
-
- No new tests possible.
-
- * page/SecurityOrigin.cpp:
- (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
-
-2009-08-13 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Eric Seidel.
-
- [CAIRO] getImageData fails on a given rect bigger than the image rect
-
- The destination image and the source image was mixed up on creating the
- imageData.
-
- This is just a clean up and doesn't affect the current behavior. It's not
- possible to test this failure in a LayoutTest. Only canvas uses getImageData
- at the moment and returns before calling getImageData, if the image rect does
- not contain the requested rect.
-
- * platform/graphics/cairo/ImageBufferCairo.cpp:
- (WebCore::getImageData):
-
-2009-08-13 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- [Haiku] Adding RenderTheme to WebCore.
- https://bugs.webkit.org/show_bug.cgi?id=28258
-
- * platform/haiku/RenderThemeHaiku.cpp: Added.
- (WebCore::RenderThemeHaiku::create):
- (WebCore::RenderTheme::themeForPage):
- (WebCore::RenderThemeHaiku::RenderThemeHaiku):
- (WebCore::RenderThemeHaiku::~RenderThemeHaiku):
- (WebCore::supportsFocus):
- (WebCore::RenderThemeHaiku::supportsFocusRing):
- (WebCore::RenderThemeHaiku::platformActiveSelectionBackgroundColor):
- (WebCore::RenderThemeHaiku::platformInactiveSelectionBackgroundColor):
- (WebCore::RenderThemeHaiku::platformActiveSelectionForegroundColor):
- (WebCore::RenderThemeHaiku::platformInactiveSelectionForegroundColor):
- (WebCore::RenderThemeHaiku::platformTextSearchHighlightColor):
- (WebCore::RenderThemeHaiku::systemFont):
- (WebCore::RenderThemeHaiku::paintCheckbox):
- (WebCore::RenderThemeHaiku::setCheckboxSize):
- (WebCore::RenderThemeHaiku::paintRadio):
- (WebCore::RenderThemeHaiku::setRadioSize):
- (WebCore::RenderThemeHaiku::adjustMenuListStyle):
- (WebCore::RenderThemeHaiku::paintMenuList):
- * platform/haiku/RenderThemeHaiku.h: Added.
- (WebCore::RenderThemeHaiku::supportsHover):
-
-2009-08-13 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- [Haiku] Remove the "m_point" code from ContextMenuHaiku.cpp
- https://bugs.webkit.org/show_bug.cgi?id=28256
-
- * platform/haiku/ContextMenuHaiku.cpp:
- (WebCore::ContextMenuReceiver::ContextMenuReceiver):
- (WebCore::ContextMenu::ContextMenu):
- (WebCore::ContextMenu::appendItem):
- (WebCore::ContextMenu::insertItem):
-
-2009-08-13 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Darin Adler.
-
- Inspector: Show Hidden Cookie Data
- https://bugs.webkit.org/show_bug.cgi?id=28185
-
- Added new file Cookie.h to the WebCore XCode
-
- * WebCore.xcodeproj/project.pbxproj:
-
- InspectorController.cookies() binding
-
- * bindings/js/JSInspectorBackendCustom.cpp:
- (WebCore::JSInspectorBackend::cookies):
- * inspector/InspectorBackend.idl:
-
- Struct for static Cookie information
- (name, value, path, domain, expires, httpOnly, secure, session)
-
- * platform/Cookie.h: Added.
- (WebCore::Cookie::Cookie):
-
- Getter for the a list of raw Cookies
- getRawCookies(., ., out Vector<Cookie>)
-
- * platform/CookieJar.h:
-
- Implementation of getRawCookies for the mac platform.
-
- * platform/mac/CookieJar.mm:
- (WebCore::getRawCookies):
-
- Stub other CookieJar implementations to satisfy the interface.
-
- * platform/haiku/CookieJarHaiku.cpp:
- (WebCore::getRawCookies):
- * platform/network/chromium/CookieJarChromium.cpp:
- (WebCore::getRawCookies):
- * platform/network/curl/CookieJarCurl.cpp:
- (WebCore::getRawCookies):
- * platform/network/soup/CookieJarSoup.cpp:
- (WebCore::getRawCookies):
- * platform/network/win/CookieJarCFNetWin.cpp:
- (WebCore::getRawCookies):
- * platform/network/win/CookieJarWin.cpp:
- (WebCore::getRawCookies):
- * platform/qt/CookieJarQt.cpp:
- (WebCore::getRawCookies):
-
-2009-08-13 Patrick Mueller <Patrick_Mueller@us.ibm.com>
-
- Reviewed by Timothy Hatcher.
-
- Add a new gesture in Web Inspector to remove breakpoints
- https://bugs.webkit.org/show_bug.cgi?id=19131
-
- * inspector/front-end/SourceFrame.js:
- (WebInspector.SourceFrame.prototype._documentMouseDown):
-
-2009-08-13 Norbert Leser <norbert.leser@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Symbian target components (library and executable files)
- require Unique Identifiers (i.e., UID3).
- These identifiers are defined in the respective project
- file, conditionally for "symbian" platform.
-
- * WebCore.pro:
-
-2009-08-13 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Eric Seidel.
-
- wrong calculation of overflow size for flexbox and table
- https://bugs.webkit.org/show_bug.cgi?id=28064
-
- RenderFlexibleBox and RenderTable were using the width of overflow
- to update height of overflow, so height became wrong value and
- width was not updated. As the corresponding code of RenderBlock
- was sane, I factored it out and used from RenderFlexibleBox and
- RenderTable.
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::updateOverflowWithShadowAndReflection): created from code of layoutBlock
- (WebCore::RenderBlock::layoutBlock):
- * rendering/RenderBlock.h:
- * rendering/RenderFlexibleBox.cpp: use updateOverflowWithShadowAndReflection
- (WebCore::RenderFlexibleBox::layoutBlock):
- * rendering/RenderTable.cpp:
- (WebCore::RenderTable::layout): use updateOverflowWithShadowAndReflection
-
-2009-08-13 Mark Rowe <mrowe@apple.com>
-
- Revert r47185, the fix for <https://bugs.webkit.org/show_bug.cgi?id=28185>, as it broke the
- Windows build in a non-obvious manner.
-
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSInspectorBackendCustom.cpp:
- * inspector/InspectorBackend.idl:
- * platform/Cookie.h: Removed.
- * platform/CookieJar.h:
- * platform/haiku/CookieJarHaiku.cpp:
- (WebCore::setCookies):
- (WebCore::cookies):
- * platform/mac/CookieJar.mm:
- * platform/network/chromium/CookieJarChromium.cpp:
- * platform/network/curl/CookieJarCurl.cpp:
- * platform/network/soup/CookieJarSoup.cpp:
- * platform/network/win/CookieJarCFNetWin.cpp:
- * platform/network/win/CookieJarWin.cpp:
- * platform/qt/CookieJarQt.cpp:
-
-2009-08-13 Ariya Hidayat <ariya.hidayat@nokia.com>
-
- Not reviewed: build fix (for r47192), adding new file from
- https://bugs.webkit.org/show_bug.cgi?id=28174
-
- * inspector/front-end/StatusBarButton.js: Added.
-
-2009-08-13 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Introduced StatusBarButton class that encapsulates glyphs support.
- Views updated accordingly.
-
- https://bugs.webkit.org/show_bug.cgi?id=28174
-
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * inspector/front-end/CookieItemsView.js:
- (WebInspector.CookieItemsView):
- (WebInspector.CookieItemsView.prototype.get statusBarItems): Updated to retrieve DOM element from StatusBarButton instance (here and in similar getters below.)
- (WebInspector.CookieItemsView.prototype.hide):
- (WebInspector.CookieItemsView.prototype.update):
- * inspector/front-end/DOMStorageItemsView.js:
- (WebInspector.DOMStorageItemsView):
- (WebInspector.DOMStorageItemsView.prototype.get statusBarItems):
- (WebInspector.DOMStorageItemsView.prototype.hide):
- (WebInspector.DOMStorageItemsView.prototype.update):
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel):
- (WebInspector.ElementsPanel.prototype.get statusBarItems):
- (WebInspector.ElementsPanel.prototype.hide):
- (WebInspector.ElementsPanel.prototype._nodeSearchButtonClicked):
- * inspector/front-end/Panel.js:
- * inspector/front-end/ProfileView.js:
- (WebInspector.ProfileView):
- (WebInspector.ProfileView.prototype.get statusBarItems):
- (WebInspector.ProfileView.prototype._updatePercentButton):
- (WebInspector.ProfileView.prototype._focusClicked):
- (WebInspector.ProfileView.prototype._excludeClicked):
- (WebInspector.ProfileView.prototype._resetClicked):
- * inspector/front-end/ProfilesPanel.js:
- (WebInspector.ProfilesPanel):
- (WebInspector.ProfilesPanel.prototype.get statusBarItems):
- (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
- (WebInspector.ProfilesPanel.prototype._updateInterface):
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel.prototype.get statusBarItems):
- (WebInspector.ResourcesPanel.prototype.reset):
- (WebInspector.ResourcesPanel.prototype._toggleLargerResources):
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel):
- (WebInspector.ScriptsPanel.prototype.get statusBarItems):
- (WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsButton):
- (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons):
- * inspector/front-end/StatusBarButton.js: Added.
- (WebInspector.StatusBarButton):
- (WebInspector.StatusBarButton.prototype._clicked):
- (WebInspector.StatusBarButton.prototype.get disabled):
- (WebInspector.StatusBarButton.prototype.set disabled):
- (WebInspector.StatusBarButton.prototype.get title):
- (WebInspector.StatusBarButton.prototype.set title):
- (WebInspector.StatusBarButton.prototype.get toggled):
- (WebInspector.StatusBarButton.prototype.set toggled):
- (WebInspector.StatusBarButton.prototype.get visible):
- (WebInspector.StatusBarButton.prototype.set visible):
- * inspector/front-end/WebKit.qrc:
- * inspector/front-end/inspector.css: For uniformity, class names are always used to identify status bar buttons. Also, fixed "Reload" button style to use glyphs.
- * inspector/front-end/inspector.html:
-
-2009-08-12 Ariya Hidayat <ariya.hidayat@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Add shadow support in GraphicsContext::fillRect().
-
- * platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::GraphicsContext::fillRect): Paint shadow if necessary.
- (WebCore::GraphicsContext::setPlatformShadow): Inverse y offset.
-
-2009-08-13 David Levin <levin@chromium.org>
-
- Unreviewed build fix for Chromium Linux.
-
- Rollback r47157 as this broke debug tests of Chromium Linux.
-
- * platform/graphics/skia/PlatformContextSkia.cpp:
- (PlatformContextSkia::setupPaintCommon):
-
-2009-08-13 David Levin <levin@chromium.org>
-
- Unreviewed build fix for chromium.
-
- The chromium build broke due to r47185 which added
- a cookies array to inspector/InspectorBackend.idl.
-
- * bindings/v8/custom/V8CustomBinding.h: Added the declaration for the cookies callback.
- * bindings/v8/custom/V8InspectorBackendCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL(InspectorBackendCookies)): Stubbed out an implementation
- for the cookies callback.
-
-2009-08-12 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: Show Hidden Cookie Data
- https://bugs.webkit.org/show_bug.cgi?id=28185
-
- Added new file Cookie.h to the WebCore XCode
-
- * WebCore.xcodeproj/project.pbxproj:
-
- InspectorController.cookies() binding
-
- * bindings/js/JSInspectorBackendCustom.cpp:
- (WebCore::JSInspectorBackend::cookies):
- * inspector/InspectorBackend.idl:
-
- Struct for static Cookie information
- (name, value, path, domain, expires, httpOnly, secure, session)
-
- * platform/Cookie.h: Added.
- (WebCore::Cookie::Cookie):
-
- Getter for the a list of raw Cookies
- getRawCookies(., ., out Vector<Cookie>)
-
- * platform/CookieJar.h:
-
- Implementation of getRawCookies for the mac platform.
-
- * platform/mac/CookieJar.mm:
- (WebCore::getRawCookies):
-
- Stub other CookieJar implementations to satisfy the interface.
-
- * platform/haiku/CookieJarHaiku.cpp:
- (WebCore::getRawCookies):
- * platform/network/chromium/CookieJarChromium.cpp:
- (WebCore::getRawCookies):
- * platform/network/curl/CookieJarCurl.cpp:
- (WebCore::getRawCookies):
- * platform/network/soup/CookieJarSoup.cpp:
- (WebCore::getRawCookies):
- * platform/network/win/CookieJarCFNetWin.cpp:
- (WebCore::getRawCookies):
- * platform/network/win/CookieJarWin.cpp:
- (WebCore::getRawCookies):
- * platform/qt/CookieJarQt.cpp:
- (WebCore::getRawCookies):
-
-2009-08-08 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: Cookies in Storage Panel
- https://bugs.webkit.org/show_bug.cgi?id=27202
-
- Data Structure for a Cookie. Just Key/Value for Now:
-
- * inspector/front-end/Cookie.js: Added.
- (WebInspector.Cookie):
- (WebInspector.Cookie.prototype.get key):
- (WebInspector.Cookie.prototype.set key):
- (WebInspector.Cookie.prototype.get value):
- (WebInspector.Cookie.prototype.set value):
-
- A Storage View for Cookies. Allows for Refresh/Delete:
-
- * inspector/front-end/CookieItemsView.js: Added.
- (WebInspector.CookieItemsView):
- (WebInspector.CookieItemsView.prototype.get statusBarItems): refresh and delete buttons
- (WebInspector.CookieItemsView.prototype.show):
- (WebInspector.CookieItemsView.prototype.hide):
- (WebInspector.CookieItemsView.prototype.update):
- (WebInspector.CookieItemsView.prototype.buildCookies): parses the inspected window's document.cookie string
- (WebInspector.CookieItemsView.prototype.dataGridForCookies): creates a datagrid for cookies
- (WebInspector.CookieItemsView.prototype._deleteButtonClicked): attempt at deleting the cookie (not flawless)
- (WebInspector.CookieItemsView.prototype._refreshButtonClicked): rebuild the datagrid
-
- Include a SidebarSection Section in the Databases Panel:
-
- * inspector/front-end/DatabasesPanel.js:
- (WebInspector.DatabasesPanel):
- (WebInspector.DatabasesPanel.prototype.show): calls populateInterface
- (WebInspector.DatabasesPanel.prototype.populateInterface): adds cookies if they don't exist
- (WebInspector.DatabasesPanel.prototype.reset): remove cookie specific parts
- (WebInspector.DatabasesPanel.prototype.addCookies): add cookies sidebar tree element
- (WebInspector.DatabasesPanel.prototype.showCookies): sets the visible view to a CookiesItemView
- (WebInspector.CookieSidebarTreeElement):
- (WebInspector.CookieSidebarTreeElement.prototype.onselect):
- (WebInspector.CookieSidebarTreeElement.prototype.get mainTitle): just "Cookies" at the moment
- (WebInspector.CookieSidebarTreeElement.prototype.set mainTitle):
- (WebInspector.CookieSidebarTreeElement.prototype.get subtitle): no subtitle yet
- (WebInspector.CookieSidebarTreeElement.prototype.set subtitle):
-
- New "Cookies" Image for the Sidebar:
-
- * inspector/front-end/Images/cookie.png: Added.
- * inspector/front-end/inspector.css:
-
- Include the Added Files where appropriate:
-
- * inspector/front-end/WebKit.qrc:
- * inspector/front-end/inspector.html:
-
-2009-08-12 George Wright <george.wright@torchmobile.com>
-
- Reviewed by George Staikos.
-
- Add SQLTransactionCoordinator.[h,cpp] to WebCore.pro.
-
- https://bugs.webkit.org/show_bug.cgi?id=28246
-
- * WebCore.pro:
-
-2009-08-12 George Staikos <george.staikos@torchmobile.com>
-
- Reviewed by Adam Treat.
-
- Mark unused variables to avoid compile failures in -Werror.
-
- * wml/WMLAnchorElement.cpp:
- (WebCore::WMLAnchorElement::deregisterTask):
- * wml/WMLDoElement.cpp:
- (WebCore::WMLDoElement::deregisterTask):
-
-2009-08-12 Charles Wei <charles.wei@torchmobile.com.cn>
-
- Reviewed by Niko Zimmermann.
-
- This is to add WCSS marquee support , which is defined by OMA and is an extension for CSS2,
- It extends CSS display with "display:-wap-marquee;-wap-marquee-dir:xxx;-wap-marquee-speed:xxx;-wap-marquee-style:xxx"
- Minor fixes by Eric Seidel and George Staikos.
- https://bugs.webkit.org/show_bug.cgi?id=23727
-
- No new tests, the tests have already been landed at LayoutTests/fast/wcss/
-
- * WebCore.pro:
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue):
- * css/CSSPrimitiveValueMappings.h:
- (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty):
- * css/CSSValueKeywords.in:
- * css/WCSSPropertyNames.in: Added.
- * css/WCSSValueKeywords.in: Added.
- * rendering/RenderMarquee.cpp:
- (WebCore::RenderMarquee::start):
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::createObject):
- * rendering/style/RenderStyleConstants.h:
- (WebCore::):
-
-2009-08-12 George Wright <george.wright@torchmobile.com>
-
- Reviewed by David Hyatt.
-
- Update the canvas renderer's intrinsic size with the zoomed
- lengths and ensure the intrinsic size is correct when setting
- an initial style.
-
- https://bugs.webkit.org/show_bug.cgi?id=26908
-
- Test: fast/canvas/canvas-zoom.html
-
- * rendering/RenderHTMLCanvas.cpp:
- (WebCore::RenderHTMLCanvas::canvasSizeChanged):
- * rendering/RenderReplaced.cpp:
- (WebCore::RenderReplaced::styleDidChange):
-
-2009-08-12 Alpha Lam <hclam@chromium.org>
-
- Reviewed by Simon Fraser.
-
- Fix regression for dragging the media controller thumb.
- https://bugs.webkit.org/show_bug.cgi?id=28211
-
- Modified the conditions for rejecting events on the media controller
- to only rejecting mouse events not from the left button.
-
- Test: media/controls-drag-timebar.html
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlTimelineElement::defaultEventHandler):
-
-2009-08-12 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Fixing a deadlock caused by two transactions that run on two
- different database handles for the same DB. Adding a per-DB thread
- transaction coordinator that allows the DB thread to run only one
- transaction per DB file at any given time.
-
- Adding a regression test for this bug.
-
- Test: storage/multiple-transactions-on-different-handles.html
-
- https://bugs.webkit.org/show_bug.cgi?id=27966
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * storage/Database.cpp:
- (WebCore::Database::transactionCoordinator):
- * storage/Database.h:
- * storage/DatabaseThread.cpp:
- (WebCore::DatabaseThread::DatabaseThread):
- * storage/DatabaseThread.h:
- (WebCore::DatabaseThread::transactionCoordinator):
- * storage/SQLTransaction.cpp:
- (WebCore::SQLTransaction::SQLTransaction):
- (WebCore::SQLTransaction::debugStepName):
- (WebCore::SQLTransaction::performNextStep):
- (WebCore::SQLTransaction::aquireLock):
- (WebCore::SQLTransaction::lockAquired):
- (WebCore::SQLTransaction::cleanupAfterSuccessCallback):
- (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
- * storage/SQLTransaction.h:
- * storage/SQLTransactionCoordinator.cpp: Added.
- * storage/SQLTransactionCoordinator.h: Added.
-
-2009-08-12 Darin Adler <darin@apple.com>
-
- Reviewed by Geoff Garen.
-
- Custom properties on DOM objects are lost after GC (as demonstrated by the gc-9.html test)
- https://bugs.webkit.org/show_bug.cgi?id=28194
-
- * GNUmakefile.am: Added the two new source files.
- * WebCore.gypi: Ditto.
- * WebCore.pro: Ditto.
- * WebCore.vcproj/WebCore.vcproj: Ditto.
- * WebCore.xcodeproj/project.pbxproj: Ditto.
- * WebCoreSources.bkl: Ditto.
-
- * bindings/js/JSCSSRuleListCustom.cpp: Added.
- (WebCore::JSCSSRuleList::markChildren): Call markDOMObjectWrapper
- on rules in the list.
-
- * bindings/js/JSCSSStyleDeclarationCustom.cpp:
- (WebCore::JSCSSStyleDeclaration::markChildren): Added. Call
- markDOMObjectWrapper on the CSSValue objects that are owned by the
- declaration as values of the properties.
-
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::isObservableThroughDOM): Added code to handle some
- cases where nodes are observable because they own objects that
- in turn have custom properties.
-
- * bindings/js/JSDOMBinding.h: Fix a typo in the header.
-
- * bindings/js/JSDocumentCustom.cpp:
- (WebCore::JSDocument::markChildren): Added call to markDOMObjectWrapper
- for implementation and styleSheets.
-
- * bindings/js/JSElementCustom.cpp:
- (WebCore::JSElement::markChildren): Added. Calls markDOMObjectWrapper
- for attributes and style.
-
- * bindings/js/JSHTMLCanvasElementCustom.cpp: Added.
- (WebCore::JSHTMLCanvasElement::markChildren): Call markDOMObjectWrapper
- on the rendering context.
-
- * bindings/js/JSStyleSheetCustom.cpp:
- (WebCore::JSStyleSheet::markChildren): Call markDOMObjectWrapper on
- items in the stylesheet.
-
- * bindings/js/JSStyleSheetListCustom.cpp:
- (WebCore::JSStyleSheetList::markChildren): Added. Calls
- markDOMObjectWrapper on stylesheets in the list.
-
- * css/CSSRuleList.idl: Added CustomMarkFunction.
- * css/CSSStyleDeclaration.idl: Ditto.
- * css/StyleSheetList.idl: Ditto.
- * dom/Element.idl: Ditto.
- * html/HTMLCanvasElement.idl: Ditto.
-
- * dom/Element.h: Made everything private that could be.
- Added access to the attributeMap that does returns
- the existing map without doing any of the lazy-updating work. This
- is needed to get at the existing attributes during garbage collection
- without having side effects.
-
- * html/HTMLCanvasElement.h: Cleaned up the header a bit, making
- members private. Added renderingContext2D function for use in
- JSHTMLCanvasElement::markChildren.
-
-2009-08-12 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Eric Seidel.
-
- Fixes two bugs about Pan Scrolling - Scrolling with middle mouse button doesn't
- work in Expanded view on reader.google.com, and Can enter auto scroll from a non-scrollable area.
- https://bugs.webkit.org/show_bug.cgi?id=28023
- https://bugs.webkit.org/show_bug.cgi?id=24794
-
- Added a new method to RenderBox seeing if the Box can be scrolled and actually has something to
- scroll, and use that for pan scrolling.
-
- Test: platform/win/fast/events/panScroll-nested-divs.html
-
- * page/EventHandler.cpp:
- (WebCore::EventHandler::handleMouseDraggedEvent):
- (WebCore::EventHandler::updateAutoscrollRenderer):
- (WebCore::EventHandler::handleMousePressEvent):
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::canBeScrolledAndHasScrollableArea):
- * rendering/RenderBox.h:
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::scrollByRecursively):
-
-2009-08-12 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Adam Roben.
-
- Fix of <rdar://6728361> Mouse wheel scrolling on a page with expanded drop down
- list detaches drop down.
-
- Added a function for Windows PopupMenu's to return their class name.
-
- * platform/PopupMenu.h:
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::popupClassName):
-
-2009-08-12 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Dan Bernstein.
-
- WINCE PORT: Color and Gradient
- https://bugs.webkit.org/show_bug.cgi?id=27511
-
- * platform/graphics/wince/ColorWince.cpp: Added.
- * platform/graphics/wince/GradientWince.cpp: Added.
-
-2009-08-12 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Eric Seidel.
-
- fix a typo in platform/graphics/skia/PlatformContextSkia.cpp
- https://bugs.webkit.org/show_bug.cgi?id=28172
-
- No new tests because it's a just typo fix.
-
- * platform/graphics/skia/PlatformContextSkia.cpp:
- (PlatformContextSkia::setupPaintCommon):
-
-2009-08-12 Michelangelo De Simone <micdesim@gmail.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=27458
- Support for the :default CSS pseudoclass, as per HTML5 spec.
- http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#selector-default
-
- Tests: fast/css/pseudo-default-001.html
- fast/css/pseudo-default-002.html
- fast/css/pseudo-default-003.html
- fast/css/pseudo-default-004.html
-
- * css/CSSSelector.cpp:
- (WebCore::CSSSelector::extractPseudoType): pseudoDefault
- * css/CSSSelector.h:
- (WebCore::CSSSelector::):
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::canShareStyleWithElement): sharing stuff is
- aware that only one default button can be present in a form
- (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): applies
- the :default CSS pseudoclass
- * dom/Element.h:
- (WebCore::Element::isDefaultButtonForForm): new method to determine
- whether a FormControl is a default button for a given form
- * html/HTMLFormControlElement.cpp:
- (WebCore::HTMLFormControlElement::isDefaultButtonForForm): ditto
- * html/HTMLFormControlElement.h:
- * html/HTMLFormElement.cpp:
- (WebCore::HTMLFormElement::defaultButton): extracts the default button
- from the form
- * html/HTMLFormElement.h:
-
-2009-08-12 David Levin <levin@chromium.org>
-
- No review, rolling out r47106.
- https://bugs.webkit.org/show_bug.cgi?id=28215
-
- This patch relied on a new version of v8 which is not available
- in chromium yet.
-
- * bindings/v8/V8Binding.cpp:
- (WebCore::v8StringToAtomicWebCoreString):
-
-2009-08-12 Steve Block <steveblock@google.com>
-
- Reviewed by Eric Seidel.
-
- Bug 26993 : Geolocation::requestPermission()
- https://bugs.webkit.org/show_bug.cgi?id=26993
-
- Second patch to allow the Geolocation permission request to chrome to be asynchronous
- or synchronous. Fixes a bug where callbacks were called twice when permissions
- are granted synchronously.
-
- No new tests required.
-
- * page/Geolocation.cpp:
- (WebCore::Geolocation::setIsAllowed): Modified. Calls makeSuccessCallbacks() rather than geolocationServicePositionChanged().
- (WebCore::Geolocation::geolocationServicePositionChanged): Modified. Updated logic to avoid repeated callbacks when permissions are granted synchronously.
- (WebCore::Geolocation::makeSuccessCallbacks): Added. Calls success callbacks.
- * page/Geolocation.h: Modified. Adds makeSuccessCallbacks().
-
-2009-08-12 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Sam Weinig.
-
- <rdar://problem/6952336>
- CrashTracer: [USER] 3 crashes in Safari at com.apple.WebCore • WebCore::SecurityOrigin::canAccess const 27
-
- Make sure to set the security origin before calling dispatchWindowObjectAvailable.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::begin):
-
-2009-08-12 Xiaomei Ji <xji@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Fix [Chromium] drop down menu letter selection, skip selections
- https://bugs.webkit.org/show_bug.cgi?id=28205
-
- Not auto-testable since it is chromim platform specific code, and it involves sending a keyboard
- event to the popup, which is not possible (eventSender sends the key
- events through webview, we want to go through the webwidget).
-
- * manual-tests/keyboard_select_elements_with_same_beginning.html: Added.
- * platform/chromium/PopupMenuChromium.cpp:
- (WebCore::isCharacterTypeEvent): style change.
- (WebCore::PopupListBox::handleKeyEvent): typeAheadFind should be called only when the event is
- a character type event to avoid calling twice for English.
- (WebCore::PopupListBox::typeAheadFind): remove unnecessary checking of isCharacterTypeEvent() since the whole function is only called under that condition.
-
-2009-08-12 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- [Haiku] Adding GraphicsContext to WebCore/platform/graphics/haiku.
- https://bugs.webkit.org/show_bug.cgi?id=28130
-
- * platform/graphics/haiku/GraphicsContextHaiku.cpp: Added.
- (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
- (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
- (WebCore::GraphicsContext::GraphicsContext):
- (WebCore::GraphicsContext::~GraphicsContext):
- (WebCore::GraphicsContext::platformContext):
- (WebCore::GraphicsContext::savePlatformState):
- (WebCore::GraphicsContext::restorePlatformState):
- (WebCore::GraphicsContext::drawRect):
- (WebCore::GraphicsContext::drawLine):
- (WebCore::GraphicsContext::drawEllipse):
- (WebCore::GraphicsContext::strokeArc):
- (WebCore::GraphicsContext::strokePath):
- (WebCore::GraphicsContext::drawConvexPolygon):
- (WebCore::GraphicsContext::fillRect):
- (WebCore::GraphicsContext::fillRoundedRect):
- (WebCore::GraphicsContext::fillPath):
- (WebCore::GraphicsContext::beginPath):
- (WebCore::GraphicsContext::addPath):
- (WebCore::GraphicsContext::clip):
- (WebCore::GraphicsContext::drawFocusRing):
- (WebCore::GraphicsContext::drawLineForText):
- (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
- (WebCore::GraphicsContext::roundToDevicePixels):
- (WebCore::GraphicsContext::beginTransparencyLayer):
- (WebCore::GraphicsContext::endTransparencyLayer):
- (WebCore::GraphicsContext::clearRect):
- (WebCore::GraphicsContext::strokeRect):
- (WebCore::GraphicsContext::setLineCap):
- (WebCore::GraphicsContext::setLineJoin):
- (WebCore::GraphicsContext::setMiterLimit):
- (WebCore::GraphicsContext::setAlpha):
- (WebCore::GraphicsContext::setCompositeOperation):
- (WebCore::GraphicsContext::clipOut):
- (WebCore::GraphicsContext::clipToImageBuffer):
- (WebCore::GraphicsContext::getCTM):
- (WebCore::GraphicsContext::translate):
- (WebCore::GraphicsContext::origin):
- (WebCore::GraphicsContext::rotate):
- (WebCore::GraphicsContext::scale):
- (WebCore::GraphicsContext::clipOutEllipseInRect):
- (WebCore::GraphicsContext::addInnerRoundedRectClip):
- (WebCore::GraphicsContext::concatCTM):
- (WebCore::GraphicsContext::setPlatformShouldAntialias):
- (WebCore::GraphicsContext::setImageInterpolationQuality):
- (WebCore::GraphicsContext::setURLForRect):
- (WebCore::GraphicsContext::setPlatformFont):
- (WebCore::GraphicsContext::setPlatformStrokeColor):
- (WebCore::GraphicsContext::getHaikuStrokeStyle):
- (WebCore::GraphicsContext::setPlatformStrokeStyle):
- (WebCore::GraphicsContext::setPlatformStrokeThickness):
- (WebCore::GraphicsContext::setPlatformFillColor):
- (WebCore::GraphicsContext::clearPlatformShadow):
- (WebCore::GraphicsContext::setPlatformShadow):
-
-2009-08-12 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- [Haiku] Modifying WebCore/platform/graphics files to allow Haiku port.
- https://bugs.webkit.org/show_bug.cgi?id=28128
-
- * platform/graphics/BitmapImage.h: Adding getBBitmap() function.
- * platform/graphics/Color.h: rgb_color is the Color struct in Haiku.
- * platform/graphics/FloatPoint.h: BPoint is the Point class in Haiku.
- * platform/graphics/FloatRect.h: BRect is the Rect class in Haiku.
- * platform/graphics/GraphicsContext.cpp:
- * platform/graphics/GraphicsContext.h: BView is the PlatformGraphicsContext
- class for Haiku. Adding getHaikuStrokeStyle() function.
- * platform/graphics/Icon.h: Adding an empty Icon() constructor because
- this class isn't implemented for the moment.
- * platform/graphics/ImageSource.h: BBitmap is the native bitmap class
- for Haiku.
- * platform/graphics/IntPoint.h: BPoint is the Point class in Haiku.
- * platform/graphics/IntRect.h: BRect is the Rect class in Haiku.
- * platform/graphics/IntSize.h: BSize is the Size class in Haiku.
- * platform/graphics/Path.h: BRegion is the Path class in Haiku.
- * platform/graphics/Pattern.h: Adding the GraphicsDef.h header and the
- native pattern type.
- * platform/graphics/SimpleFontData.h: Adding Haiku's Font.h header.
-
-2009-08-12 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- [Haiku] Adding modification to the WebCore/platform/ files to allow
- the Haiku port.
- https://bugs.webkit.org/show_bug.cgi?id=28128
-
- * platform/ContextMenuItem.h: BMenu is the PlatformMenuItemDescription
- class of Haiku.
- * platform/Cursor.h: BCursor is the Cursor class of Haiku.
- * platform/DragData.h: Use a BMessage as DragDataRef.
- * platform/DragImage.h: Use a BBitmap as DragImageRef.
- * platform/PlatformKeyboardEvent.h: Use BMessage as event vehicle.
- * platform/PlatformMenuDescription.h: BMenu is the
- PlatformMenuDescription class of Haiku.
- * platform/PlatformMouseEvent.h: Use BMessage as event vehicle.
- * platform/PlatformWheelEvent.h: Use BMessage as event vehicle.
- * platform/PopupMenu.h: Adding a m_menu attribute for Haiku.
- * platform/Widget.h: BView is the PlatformWidget class of Haiku.
-
-2009-08-12 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- [Haiku] Tiny modifications on WebCore files to allow Haiku port.
- https://bugs.webkit.org/show_bug.cgi?id=28128
-
- * bindings/js/ScriptControllerHaiku.cpp: Style cleanup.
- * loader/CachedFont.cpp: Haiku behaves like Qt, Gtk, or Chromium,
- so many PLATFORM(HAIKU) were added to these functions.
- (WebCore::CachedFont::~CachedFont):
- (WebCore::CachedFont::ensureCustomFontData):
- (WebCore::CachedFont::platformDataFromCustomData):
- (WebCore::CachedFont::allClientsRemoved):
- * page/EventHandler.cpp: Like the mac and Qt port, Haiku doesn't need the
- invertSenseOfTabsToLinks() function.
- * page/haiku/DragControllerHaiku.cpp: Style cleanup.
- * platform/image-decoders/ImageDecoder.h: For image decoding Haiku
- behaves like Cairo or Wx, (not like Skia).
- (WebCore::RGBA32Buffer::getAddr):
- * platform/text/PlatformString.h: Adding the String(BString&) and BString()
- methods specific to Haiku.
- * platform/text/UnicodeRange.h: Haiku needs to include stdint.h.
- * platform/text/haiku/TextBreakIteratorInternalICUHaiku.cpp:
- (WebCore::currentSearchLocaleID): Missing function.
-
-2009-08-12 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- [Haiku] Adding the ScrollbarTheme files.
- https://bugs.webkit.org/show_bug.cgi?id=28125
-
- * platform/haiku/ScrollbarThemeHaiku.cpp: Added.
- (buttonWidth):
- (WebCore::ScrollbarTheme::nativeTheme):
- (WebCore::ScrollbarThemeHaiku::ScrollbarThemeHaiku):
- (WebCore::ScrollbarThemeHaiku::~ScrollbarThemeHaiku):
- (WebCore::ScrollbarThemeHaiku::scrollbarThickness):
- (WebCore::ScrollbarThemeHaiku::hasButtons):
- (WebCore::ScrollbarThemeHaiku::hasThumb):
- (WebCore::ScrollbarThemeHaiku::backButtonRect):
- (WebCore::ScrollbarThemeHaiku::forwardButtonRect):
- (WebCore::ScrollbarThemeHaiku::trackRect):
- (WebCore::ScrollbarThemeHaiku::paintScrollbarBackground):
- (WebCore::ScrollbarThemeHaiku::paintButton):
- (WebCore::ScrollbarThemeHaiku::paintThumb):
- * platform/haiku/ScrollbarThemeHaiku.h: Added.
-
-2009-08-12 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- [Haiku] Adding eight simple files to WebCore/platform/graphics/haiku.
- https://bugs.webkit.org/show_bug.cgi?id=28122
-
- * platform/graphics/haiku/ColorHaiku.cpp: Added.
- (WebCore::Color::Color):
- (WebCore::Color::operator rgb_color):
- (WebCore::focusRingColor):
- * platform/graphics/haiku/FloatPointHaiku.cpp: Added.
- (WebCore::FloatPoint::FloatPoint):
- (WebCore::FloatPoint::operator BPoint):
- * platform/graphics/haiku/FloatRectHaiku.cpp: Added.
- (WebCore::FloatRect::FloatRect):
- (WebCore::FloatRect::operator BRect):
- * platform/graphics/haiku/GradientHaiku.cpp: Added.
- (WebCore::Gradient::platformDestroy):
- (WebCore::Gradient::platformGradient):
- (WebCore::Gradient::fill):
- * platform/graphics/haiku/IntPointHaiku.cpp: Added.
- (WebCore::IntPoint::IntPoint):
- (WebCore::IntPoint::operator BPoint):
- * platform/graphics/haiku/IntRectHaiku.cpp: Added.
- (WebCore::IntRect::IntRect):
- (WebCore::IntRect::operator BRect):
- * platform/graphics/haiku/IntSizeHaiku.cpp: Added.
- (WebCore::IntSize::IntSize):
- (WebCore::IntSize::operator BSize):
- * platform/graphics/haiku/PathHaiku.cpp: Added.
- (WebCore::Path::Path):
- (WebCore::Path::~Path):
- (WebCore::Path::operator=):
- (WebCore::Path::hasCurrentPoint):
- (WebCore::Path::contains):
- (WebCore::Path::translate):
- (WebCore::Path::boundingRect):
- (WebCore::Path::moveTo):
- (WebCore::Path::addLineTo):
- (WebCore::Path::addQuadCurveTo):
- (WebCore::Path::addBezierCurveTo):
- (WebCore::Path::addArcTo):
- (WebCore::Path::closeSubpath):
- (WebCore::Path::addArc):
- (WebCore::Path::addRect):
- (WebCore::Path::addEllipse):
- (WebCore::Path::clear):
- (WebCore::Path::isEmpty):
- (WebCore::Path::debugString):
- (WebCore::Path::apply):
- (WebCore::Path::transform):
- (WebCore::Path::strokeBoundingRect):
-
-2009-08-12 Lyon Chen <lyon.chen@torchmobile.com>
-
- Reviewed by George Staikos.
-
- WINCE PORT: Implement Keygen for WINCE
- https://bugs.webkit.org/show_bug.cgi?id=27543
-
- * platform/wince/KeygenWince.cpp: Added.
-
-2009-08-12 Brent Fulgham <bfulgham@webkit.org>
-
- Rubber-stamped by Kevin Ollivier.
-
- Handle crash in wx due to null value passed to strlen in
- the CString constructor.
-
- * platform/network/curl/ResourceHandleManager.cpp:
- (WebCore::certificatePath): Check for null return from getenv
- and use default CString constructor instead.
-
-2009-08-12 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Eric Seidel.
-
- WINCE PORT: simple stubs to make it build for WINCE
- https://bugs.webkit.org/show_bug.cgi?id=27543
-
- * platform/wince/DragDataWince.cpp: Added.
- * platform/wince/DragImageWince.cpp: Added.
- * platform/wince/EditorWince.cpp: Added.
- * platform/wince/KURLWince.cpp: Added.
-
-2009-08-12 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by George Staikos.
-
- WINCEPORT: FileSystem and FileChooser
- https://bugs.webkit.org/show_bug.cgi?id=27543
-
- * platform/wince/FileChooserWince.cpp: Added.
- * platform/wince/FileSystemWince.cpp: Added.
-
-2009-08-12 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Eric Seidel.
-
- WINCE PORT: implement Cursor for WINCE. There's no real cursor on most
- WinMob devices. We pass the cursor info to application, which so that
- can determine what to do.
- https://bugs.webkit.org/show_bug.cgi?id=27543
-
- * platform/wince/CursorWince.cpp: Added.
-
-2009-08-12 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by George Staikos.
-
- WINCE PORT: MIMETypeRegistry
- https://bugs.webkit.org/show_bug.cgi?id=27543
-
- * platform/wince/MIMETypeRegistryWince.cpp: Added.
-
-2009-08-12 Joe Mason <joe.mason@torchmobile.com>
-
- Reviewed by George Staikos.
-
- WINCE PORT: Pasteboard and SearchPopupMenu
- https://bugs.webkit.org/show_bug.cgi?id=27543
-
- * platform/wince/PasteboardWince.cpp: Added.
- * platform/wince/SearchPopupMenuWince.cpp: Added.
-
-2009-08-12 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by George Staikos.
-
- WINCE PORT: Add SharedTimerWince.cpp and SystemTimeWince.cpp
- https://bugs.webkit.org/show_bug.cgi?id=27543
-
- * platform/wince/SharedTimerWince.cpp: Added.
- * platform/wince/SystemTimeWince.cpp: Added.
-
-2009-08-12 Mark Mentovai <mark@chromium.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=28204
- Allow C+exceptions to be disabled in WebCore's V8 Mac build.
-
- * WebCorePrefix.h:
- Only undefine |try| and |catch| when building Objective-C[++],
- leaving the C+library definitions intact for C++.
-
-2009-08-12 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Adam Barth.
-
- Add a Custom Setter for DOMWindowEvent in the V8 bindings.
- https://bugs.webkit.org/show_bug.cgi?id=27719
-
- Tests: fast/events/set-event-in-another-frame.html
- fast/events/set-event-to-null.html
-
- * bindings/scripts/CodeGeneratorV8.pm: Clean up custom getter/setter code,
- as it currently doesn't support a custom getter
- and a v8-specific custom setter simultaneously.
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- * page/DOMWindow.idl:
-
-2009-08-12 Peter Kasting <pkasting@google.com>
-
- Reviewed by Adam Treat.
-
- https://bugs.webkit.org/show_bug.cgi?id=27965
- Merge wx/ImageSourceWx.cpp into ImageSource.cpp. No changes to
- ImageSource.cpp were needed, so this just deletes ImageSourceWx.cpp.
-
- * WebCore.gypi:
- * WebCoreSources.bkl:
- * platform/graphics/wx/ImageSourceWx.cpp: Removed.
- * webcore-wx.bkl:
-
-2009-08-12 Peter Kasting <pkasting@google.com>
-
- Reviewed by Dave Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=27933
- Build fix after r47099.
-
- * platform/graphics/skia/ImageBufferSkia.cpp:
- (WebCore::getImageData):
- (WebCore::putImageData):
-
-2009-08-08 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Adam Treat.
-
- WINCE PORT: Implement Path for WINCE. Most code can be
- reused for other ports that don't have native path support
- https://bugs.webkit.org/show_bug.cgi?id=28188
-
- Written also by George Staikos (including quadCurve() and bezier())
-
- * platform/graphics/wince/PathWince.cpp: Added.
- * platform/graphics/wince/PlatformPathWince.cpp: Added.
- * platform/graphics/wince/PlatformPathWince.h: Added.
- * platform/graphics/wince/WinceGraphicsExtras.h: Added.
-
-2009-08-12 Joseph Pecoraro <joepeck02@gmail.com>
-
- "Double-click to add" new style button does not always show up [quick fix]
- https://bugs.webkit.org/show_bug.cgi?id=28187
-
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylePropertyTreeElement.prototype.updateTitle):
-
-2009-08-12 Crystal Zhang <crystal.zhang@torchmobile.com>
-
- Reviewed by George Staikos.
-
- WINCE PORT: MediaPlayerProxy and MediaPlayerPrivate
- https://bugs.webkit.org/show_bug.cgi?id=28178
-
- * platform/graphics/wince/MediaPlayerPrivateWince.h: Added.
- * platform/graphics/wince/MediaPlayerProxy.cpp: Added.
- * platform/graphics/wince/MediaPlayerProxy.h: Added.
-
-2009-08-12 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Eric Seidel.
-
- HTML 5 database and LocalStorage is not persistent on the Symbian port of QtWebKit
- https://bugs.webkit.org/show_bug.cgi?id=28175
-
- Call QDir::toNativeSeparators() before the path is passed to the OS.
-
- Based on work by David Leong.
-
- * platform/qt/FileSystemQt.cpp:
- (WebCore::pathByAppendingComponent):
-
-2009-08-12 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Ariya Hidayat.
-
- Minor build-fix for SVG Filter. Use getUnmultipliedImageData instead
- of getImageData. This changed since r47099.
-
- * platform/graphics/filters/FEColorMatrix.cpp:
- (WebCore::FEColorMatrix::apply):
-
-2009-08-12 Viet-Trung Luu <viettrungluu@gmail.com>
-
- Reviewed by Dimitri Glazkov.
-
- Explicitly set control tints for Chromium/Mac, since the controls'
- NSCell(s) lack an NSView and hence their tint isn't updated
- automatically when the application is activated/deactivated.
- https://bugs.webkit.org/show_bug.cgi?id=28108
- http://crbug.com/18199
-
- * rendering/RenderThemeChromiumMac.mm:
- (WebCore::updateNSCellControlTint):
- (WebCore::RenderThemeChromiumMac::paintCheckbox):
- (WebCore::RenderThemeChromiumMac::paintRadio):
- (WebCore::RenderThemeChromiumMac::paintButton):
- (WebCore::RenderThemeChromiumMac::paintMenuList):
- (WebCore::RenderThemeChromiumMac::paintSliderThumb):
- (WebCore::RenderThemeChromiumMac::paintSearchField):
- (WebCore::RenderThemeChromiumMac::paintSearchFieldCancelButton):
- (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsDecoration):
- (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsButton):
-
-2009-08-12 Christian Plesner Hansen <christian.plesner.hansen@gmail.com>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Fix atomic string externalization crash.
- Atomic string externalization assumes that all non-empty strings
- can be externalized which is untrue on 64-bit. This change fixed
- that.
-
- https://bugs.webkit.org/show_bug.cgi?id=28215
-
- This bug causes loads of test crashes, no need to add new tests
- specifically for this.
-
- * bindings/v8/V8Binding.cpp:
- (WebCore::v8StringToAtomicWebCoreString):
-
-2009-08-12 Ariya Hidayat <ariya.hidayat@nokia.com>
-
- Reviewed by Holger Freyther.
-
- [Qt] Fix box-shadow painting in r47103. The edge should not be blurry.
- Also optimize by not having to save and restore painter state.
-
- * platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::GraphicsContext::drawRect):
- (WebCore::GraphicsContext::fillRect):
-
-2009-08-12 Ariya Hidayat <ariya.hidayat@nokia.com>
-
- Reviewed by Adam Treat.
-
- [Qt] Fix coding style in GraphicsContextQt.cpp
-
- * platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::toQtCompositionMode):
- (WebCore::toQtLineCap):
- (WebCore::toQtLineJoin):
- (WebCore::GraphicsContextPlatformPrivate::p):
- (WebCore::GraphicsContext::drawLine):
- (WebCore::GraphicsContext::strokeArc):
- (WebCore::GraphicsContext::drawConvexPolygon):
- (WebCore::GraphicsContext::pen):
- (WebCore::GraphicsContext::fillPath):
- (WebCore::GraphicsContext::strokePath):
- (WebCore::GraphicsContext::fillRect):
- (WebCore::GraphicsContext::clipPath):
- (WebCore::GraphicsContext::drawFocusRing):
- (WebCore::GraphicsContext::beginTransparencyLayer):
- (WebCore::GraphicsContext::endTransparencyLayer):
- (WebCore::GraphicsContext::clearRect):
- (WebCore::GraphicsContext::setLineCap):
- (WebCore::GraphicsContext::setLineJoin):
- (WebCore::GraphicsContext::setMiterLimit):
- (WebCore::GraphicsContext::setAlpha):
- (WebCore::GraphicsContext::clipOut):
- (WebCore::GraphicsContext::clipOutEllipseInRect):
- (WebCore::GraphicsContext::addInnerRoundedRectClip):
- (WebCore::GraphicsContext::setPlatformStrokeColor):
- (WebCore::GraphicsContext::setPlatformStrokeStyle):
- (WebCore::GraphicsContext::setPlatformStrokeThickness):
-
-2009-08-12 Szabo Carol <carol.szabo@nokia.com>
-
- Reviewed by Simon Hausmann and Ariya Hidayat.
-
- https://bugs.webkit.org/show_bug.cgi?id=23291
-
- [Qt] Partial support for -webkit-box-shadow. Blur is not support and
- the shadow still does not go well with border radius.
-
- * platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::GraphicsContext::drawRect):
- (WebCore::GraphicsContext::fillRect):
-
-2009-08-12 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- Use AM_V_GEN in a few more places, for less noisy builds.
-
- * GNUmakefile.am:
-
-2009-08-12 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- SVG Filter premultiplied color support for getImageDate/putImageData
- [https://bugs.webkit.org/show_bug.cgi?id=27933]
-
- Some SVG Filters need premultiplied ImageData for the calculation. Therefore getImageData
- and putImageData of ImageBuffer need support for premultiplied colors.
-
- * html/CanvasRenderingContext2D.cpp:
- (WebCore::CanvasRenderingContext2D::getImageData):
- (WebCore::CanvasRenderingContext2D::putImageData):
- * platform/graphics/ImageBuffer.h:
- (WebCore::):
- * platform/graphics/cairo/ImageBufferCairo.cpp:
- (WebCore::getImageData):
- (WebCore::ImageBuffer::getUnmultipliedImageData):
- (WebCore::ImageBuffer::getPremultipliedImageData):
- (WebCore::putImageData):
- (WebCore::ImageBuffer::putUnmultipliedImageData):
- (WebCore::ImageBuffer::putPremultipliedImageData):
- * platform/graphics/cg/ImageBufferCG.cpp:
- (WebCore::getImageData):
- (WebCore::ImageBuffer::getUnmultipliedImageData):
- (WebCore::ImageBuffer::getPremultipliedImageData):
- (WebCore::putImageData):
- (WebCore::ImageBuffer::putUnmultipliedImageData):
- (WebCore::ImageBuffer::putPremultipliedImageData):
- * platform/graphics/qt/ImageBufferQt.cpp:
- (WebCore::getImageData):
- (WebCore::ImageBuffer::getUnmultipliedImageData):
- (WebCore::ImageBuffer::getPremultipliedImageData):
- (WebCore::putImageData):
- (WebCore::ImageBuffer::putUnmultipliedImageData):
- (WebCore::ImageBuffer::putPremultipliedImageData):
- * platform/graphics/skia/ImageBufferSkia.cpp:
- (WebCore::getImageData):
- (WebCore::ImageBuffer::getUnmultipliedImageData):
- (WebCore::ImageBuffer::getPremultipliedImageData):
- (WebCore::putImageData):
- (WebCore::ImageBuffer::putUnmultipliedImageData):
- (WebCore::ImageBuffer::putPremultipliedImageData):
- * platform/graphics/wx/ImageBufferWx.cpp:
- (WebCore::ImageBuffer::getUnmultipliedImageData):
- (WebCore::ImageBuffer::getPremultipliedImageData):
- (WebCore::ImageBuffer::putUnmultipliedImageData):
- (WebCore::ImageBuffer::putPremultipliedImageData):
- * svg/graphics/SVGResourceMasker.cpp:
- (WebCore::SVGResourceMasker::applyMask):
-
-2009-08-12 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Changed Number.bytesToString to support low-resolution output.
-
- https://bugs.webkit.org/show_bug.cgi?id=28146
-
- * inspector/front-end/utilities.js:
- (Number.bytesToString):
-
-2009-08-12 Prasanth Ullattil <prasanth.ullattil@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Add support for hooking BeginPaint/EndPaint on 64Bit Windows
-
- Webkit uses the runtime patching trick explained by "Feng Yuan" for
- hooking these paint functions. It currently supports only 32bit assembly
- code. This patch adds support for 64Bit version. Since inline-assemblies
- are not supported for 64Bit, we have use a seperate .asm file.
-
- * WebCore.pro:
- * plugins/win/PaintHooks.asm: Added.
- * plugins/win/PluginViewWin.cpp:
- (WebCore::PluginView::hookedBeginPaint):
- (WebCore::PluginView::hookedEndPaint):
- (WebCore::hook):
-
-2009-08-11 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Gavin Barraclough.
-
- Make it harder to misuse try* allocation routines
- https://bugs.webkit.org/show_bug.cgi?id=27469
-
- Add forwarding header for PossiblyNull type, and add missing null check
- to ImageBuffer creation.
-
- * ForwardingHeaders/wtf/PossiblyNull.h: Added.
- * platform/graphics/cg/ImageBufferCG.cpp:
- (WebCore::ImageBuffer::ImageBuffer):
-
-2009-08-11 Gavin Barraclough <barraclough@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Restrict use of FuncDeclNode & FuncExprNode to the parser.
- https://bugs.webkit.org/show_bug.cgi?id=28209
-
- * inspector/JavaScriptDebugServer.cpp:
- (WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
- Function signature change.
-
-2009-08-11 Peter Kasting <pkasting@google.com>
-
- Reviewed by Adam Treat.
-
- https://bugs.webkit.org/show_bug.cgi?id=27965
- Merge skia/ImageSourceSkia.cpp into ImageSource.cpp.
-
- * WebCore.gypi: Remove deleted file, plus a file that was deleted a while back.
- * platform/graphics/ImageSource.cpp:
- (WebCore::ImageSource::setData): Use slightly shorter syntax.
- (WebCore::ImageSource::filenameExtension): Use shorter syntax.
- (WebCore::ImageSource::createFrameAtIndex): Remove redundant call, clarify comments, reject all empty images.
- (WebCore::ImageSource::frameHasAlphaAtIndex): Clarify comments, use shorter syntax.
- * platform/graphics/skia/ImageSourceSkia.cpp: Removed.
-
-2009-08-11 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- SharedWorkers do not exit when the last parent document exits
- https://bugs.webkit.org/show_bug.cgi?id=28170
-
- Prevents Documents from being suspended/placed in the page cache if they are associated with shared workers.
-
- Added vector cache instead of nested hash tables for SharedWorker repository.
-
- Added SharedWorkerRepository::documentDetached API.
-
- * dom/Document.cpp:
- (WebCore::Document::detach):
- Notifies SharedWorkerRepository when the document is closing.
- * loader/FrameLoader.cpp:
- Updated FrameLoader to not cache the Document if it is associated with a SharedWorker (since we can't suspend workers yet, we need to shut them down).
- (WebCore::FrameLoader::canCachePageContainingThisFrame):
- (WebCore::FrameLoader::logCanCacheFrameDecision):
- * workers/DefaultSharedWorkerRepository.cpp:
- (WebCore::SharedWorkerProxy::create):
- (WebCore::SharedWorkerProxy::isClosing):
- Renamed from closing().
- (WebCore::SharedWorkerProxy::matches):
- Added manual equality function to replace old hash lookup.
- (WebCore::SharedWorkerProxy::isDocumentInWorkerDocuments):
- Checks to see if a document is in the worker's list of documents. Used to determine if page is suspendable.
- (WebCore::SharedWorkerProxy::SharedWorkerProxy):
- (WebCore::SharedWorkerProxy::addToWorkerDocuments):
- Added tracking of the worker's list of documents for lifecycle purposes.
- (WebCore::SharedWorkerProxy::documentDetached):
- Shuts down the proxy when the last associated document is detached.
- (WebCore::SharedWorkerProxy::close):
- Marks the proxy as closed so it is no longer shared with new instances.
- (WebCore::SharedWorkerProxy::workerContextDestroyed):
- Removes the proxy from the repository/frees the proxy when the associated SharedWorkerContext is destroyed.
- (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
- closing()->isClosing()
- (WebCore::SharedWorkerRepository::documentDetached):
- (WebCore::SharedWorkerRepository::hasSharedWorkers):
- Used by FrameLoader to determine if a page has shared workers and so cannot be suspended/cached.
- (WebCore::DefaultSharedWorkerRepository::hasSharedWorkers):
- (WebCore::DefaultSharedWorkerRepository::removeProxy):
- Invoked by workerContextDestroyed() to remove a SharedWorkerProxy from the repository.
- (WebCore::DefaultSharedWorkerRepository::documentDetached):
- (WebCore::DefaultSharedWorkerRepository::connectToWorker):
- (WebCore::DefaultSharedWorkerRepository::getProxy):
- * workers/DefaultSharedWorkerRepository.h:
- * workers/SharedWorkerRepository.h:
-
-2009-08-11 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- Bug 28200 - ListMarker should be included as part of the text value to parse
- https://bugs.webkit.org/show_bug.cgi?id=28200
-
- When returning text through the marker range attributes, the list marker text should
- also be included. It isn't included by default because a TextIterator is used which
- only looks at Nodes for text. A list marker does not have a corresponding node,
- so its text is not returned through accessibility. That is, until now.
-
- Test: platform/mac/accessibility/string-range-contains-listmarker.html
-
- * accessibility/AccessibilityObject.cpp:
- (WebCore::AccessibilityObject::listMarkerTextForRange):
- (WebCore::AccessibilityObject::stringForVisiblePositionRange):
- * accessibility/AccessibilityObject.h:
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):
- (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
- (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
- * rendering/RenderListItem.h:
-
- Make markerText() public so that accessibility code can access it.
-
-2009-08-11 Peter Kasting <pkasting@google.com>
-
- Reviewed by Adam Treat.
-
- https://bugs.webkit.org/show_bug.cgi?id=27965
- Move cairo/ImageSourceCairo.cpp to ImageSource.cpp in preparation for
- merging most of the other ImageSource*.cpp files with it.
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.vcproj/WebCore.vcproj:
- * platform/graphics/ImageSource.cpp: Copied from WebCore/platform/graphics/cairo/ImageSourceCairo.cpp.
- * platform/graphics/cairo/ImageSourceCairo.cpp: Removed.
-
-2009-08-10 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Adam Roben.
-
- Cairo-based Windows port does not handle the https protocol.
- https://bugs.webkit.org/show_bug.cgi?id=28171.
-
- No new tests needed. Existing https tests show this failure
- for WinCairo builds.
-
- * WebCore.vcproj/WebCoreCURL.vsprops: Add a few preprocessor
- definitions for SSL support in cURL.
- * platform/network/curl/ResourceHandleManager.h: Add new
- certificate path member variable.
- * platform/network/curl/ResourceHandleManager.cpp:
- (WebCore::certificateBundlePath): New method to retrieve the
- proper certificate resource bundle path.
- (WebCore::ResourceHandleManager::initializeHandle): Check for
- the resource bundle and use if available to activate SSL
- support.
-
-2009-08-11 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- [Haiku] Use Clipboard::create() instead of the constructor of Clipboard.
- https://bugs.webkit.org/show_bug.cgi?id=28127
-
- * editing/haiku/EditorHaiku.cpp:
- (WebCore::Editor::newGeneralClipboard):
- * page/haiku/EventHandlerHaiku.cpp:
- (WebCore::EventHandler::passWheelEventToWidget):
- (WebCore::EventHandler::createDraggingClipboard):
- * platform/haiku/ClipboardHaiku.cpp: Style cleanup. There were many whitespace end of lines.
- (WebCore::ClipboardHaiku::ClipboardHaiku):
- (WebCore::ClipboardHaiku::clearAllData):
- (WebCore::ClipboardHaiku::getData):
- (WebCore::ClipboardHaiku::setData):
- (WebCore::ClipboardHaiku::types):
- (WebCore::ClipboardHaiku::dragLocation):
- (WebCore::ClipboardHaiku::dragImage):
- (WebCore::ClipboardHaiku::setDragImage):
- (WebCore::ClipboardHaiku::dragImageElement):
- (WebCore::ClipboardHaiku::createDragImage):
- (WebCore::ClipboardHaiku::declareAndWriteDragImage):
- (WebCore::ClipboardHaiku::writeURL):
- (WebCore::ClipboardHaiku::writeRange):
- (WebCore::ClipboardHaiku::hasData):
- * platform/haiku/DragDataHaiku.cpp:
- (WebCore::DragData::createClipboard):
-
-2009-08-11 Drew Wilson <atwilson@google.com>
-
- Reviewed by NOBODY (build break).
-
- Speculative GTK build fix
-
- * GNUmakefile.am:
- Added missing .idl file, and added notifications directory to IDL_PATH.
-
-2009-08-11 Drew Wilson <atwilson@google.com>
-
- Reviewed by NOBODY (build break).
-
- Speculative Windows build fix
-
- * WebCore.vcproj/WebCore.vcproj:
- Added missing build steps for non-debug targets.
-
-2009-08-11 Drew Wilson <atwilson@google.com>
-
- Reviewed by NOBODY (build break)
-
- Speculative build fix for Qt build.
-
- * WebCore.pro: Added /notifications to include path
-
-2009-08-11 John Gregg <johnnyg@google.com>
-
- Reviewed by Maciej Stachowiak.
-
- Desktop Notifications API
- https://bugs.webkit.org/show_bug.cgi?id=25463
-
- Adds an implementation of desktop notifications, behind the compile-time
- flag ENABLE(NOTIFICATIONS). This code simply relays calls on the JavaScript
- API through a NotificationProvider interface, which must provide the services
- to actually notify the user and manage the desktop. This provider is injected
- into WebKit through the ChromeClient for normal page contexts and through the
- WorkerThread for worker contexts.
-
- A permissions API is defined on a per-origin basis, which allows a web page
- to check if its origin is allowed to show desktop notifications, and to request
- permission for its origin.
-
- * Configurations/FeatureDefines.xcconfig:
- * DerivedSources.cpp:
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.vcproj/WebCoreCommon.vsprops:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSDOMWindowCustom.cpp:
- * bindings/js/JSDesktopNotificationsCustom.cpp: Added.
- (WebCore::JSNotificationCenter::requestPermission):
- (WebCore::JSNotification::addEventListener):
- (WebCore::JSNotification::removeEventListener):
- * bindings/js/JSEventTarget.cpp:
- (WebCore::toJS):
- (WebCore::toEventTarget):
- * dom/EventTarget.cpp:
- (WebCore::EventTarget::toNotification):
- * dom/EventTarget.h:
- * loader/EmptyClients.h:
- (WebCore::EmptyChromeClient::notificationPresenter):
- * notifications: Added.
- * notifications/Notification.cpp: Added.
- (WebCore::Notification::Notification):
- (WebCore::Notification::~Notification):
- (WebCore::Notification::show):
- (WebCore::Notification::cancel):
- (WebCore::Notification::ondisplay):
- (WebCore::Notification::setOndisplay):
- (WebCore::Notification::onerror):
- (WebCore::Notification::setOnerror):
- (WebCore::Notification::onclose):
- (WebCore::Notification::setOnclose):
- (WebCore::Notification::getAttributeEventListener):
- (WebCore::Notification::setAttributeEventListener):
- (WebCore::Notification::clearAttributeEventListener):
- (WebCore::Notification::dispatchDisplayEvent):
- (WebCore::Notification::dispatchErrorEvent):
- (WebCore::Notification::dispatchCloseEvent):
- (WebCore::Notification::addEventListener):
- (WebCore::Notification::removeEventListener):
- (WebCore::Notification::handleEvent):
- (WebCore::Notification::dispatchEvent):
- * notifications/Notification.h: Added.
- (WebCore::Notification::create):
- (WebCore::Notification::isHTML):
- (WebCore::Notification::url):
- (WebCore::Notification::contents):
- (WebCore::Notification::scriptExecutionContext):
- (WebCore::Notification::toNotification):
- (WebCore::Notification::refEventTarget):
- (WebCore::Notification::derefEventTarget):
- * notifications/Notification.idl: Added.
- * notifications/NotificationCenter.cpp: Added.
- (WebCore::NotificationCenter::NotificationCenter):
- (WebCore::NotificationCenter::checkPermission):
- (WebCore::NotificationCenter::requestPermission):
- * notifications/NotificationCenter.h: Added.
- (WebCore::NotificationCenter::create):
- (WebCore::NotificationCenter::createHTMLNotification):
- (WebCore::NotificationCenter::createNotification):
- (WebCore::NotificationCenter::context):
- (WebCore::NotificationCenter::presenter):
- * notifications/NotificationCenter.idl: Added.
- * notifications/NotificationContents.h: Added.
- (WebCore::NotificationContents::NotificationContents):
- (WebCore::NotificationContents::icon):
- (WebCore::NotificationContents::title):
- (WebCore::NotificationContents::body):
- * notifications/NotificationPresenter.h: Added.
- (WebCore::NotificationPresenter::):
- (WebCore::NotificationPresenter::~NotificationPresenter):
- * page/Chrome.cpp:
- (WebCore::Chrome::notificationPresenter):
- * page/Chrome.h:
- * page/ChromeClient.h:
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::clear):
- (WebCore::DOMWindow::webkitNotifications):
- * page/DOMWindow.h:
- * page/DOMWindow.idl:
- * page/Page.h:
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::~WorkerContext):
- (WebCore::WorkerContext::webkitNotifications):
- * workers/WorkerContext.h:
- * workers/WorkerContext.idl:
- * workers/WorkerThread.h:
- (WebCore::WorkerThread::getNotificationPresenter):
- (WebCore::WorkerThread::setNotificationPresenter):
-
-2009-08-11 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: Console Drawer is Toggling instead of Staying Open
- https://bugs.webkit.org/show_bug.cgi?id=28115
-
- * inspector/front-end/Drawer.js:
- (WebInspector.Drawer.prototype.showView): ensures the drawer will be open and showing the provided view
- * inspector/front-end/inspector.js:
- (WebInspector.showConsole): usees the new showView to guarantee the Drawer will be open
- (WebInspector.showChanges): uses the new showView guarantee the Drawer will be open
-
-2009-08-11 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by George Staikos.
-
- [WML] WMLPageState is not allowed to store the active card, it needs to be done per document
- https://bugs.webkit.org/show_bug.cgi?id=28180
-
- Don't store the active WMLCardElement in WMLPageState, but in WMLDocument.
- Otherwhise this may lead to crashes related to intrinsic event exeuction.
-
- Unfortunately select elements aren't testable by the layout tests, so adding
- a new manual test reproducing the crash.
-
- * manual-tests/wml/select-onpick-event-crash.wml: Added.
- * wml/WMLCardElement.cpp:
- (WebCore::WMLCardElement::determineActiveCard):
- * wml/WMLDoElement.cpp:
- (WebCore::WMLDoElement::defaultEventHandler):
- * wml/WMLDocument.cpp:
- (WebCore::WMLDocument::finishedParsing):
- * wml/WMLDocument.h:
- (WebCore::WMLDocument::activeCard):
- * wml/WMLGoElement.cpp:
- (WebCore::WMLGoElement::executeTask):
- * wml/WMLPageState.cpp:
- (WebCore::WMLPageState::WMLPageState):
- * wml/WMLPageState.h:
- * wml/WMLPrevElement.cpp:
- (WebCore::WMLPrevElement::executeTask):
- * wml/WMLRefreshElement.cpp:
- (WebCore::WMLRefreshElement::executeTask):
-
-2009-08-07 Peter Kasting <pkasting@google.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=28073
- Treat icons with no bit count and no color count as 256-color for
- purposes of quality ranking. Also fix a couple cases of a style
- violation.
-
- Test: fast/images/icon-0colors.html
-
- * platform/image-decoders/ico/ICOImageDecoder.cpp:
- (WebCore::ICOImageDecoder::processDirectory):
- (WebCore::ICOImageDecoder::readDirectoryEntry):
-
-2009-08-11 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- Need to refactor WorkerObjectProxy.
- https://bugs.webkit.org/show_bug.cgi?id=28136
-
- Added WorkerReportingProxy for reporting worker state (exceptions, console messages, thread exited) to the parent.
-
- Existing tests are sufficient, as this is only a refactoring.
-
- * GNUmakefile.am:
- Added WorkerReportingProxy.h to build.
- * WebCore.gypi:
- Added WorkerReportingProxy.h to build.
- * WebCore.vcproj/WebCore.vcproj:
- Added WorkerReportingProxy.h to build.
- * WebCore.xcodeproj/project.pbxproj:
- Added WorkerReportingProxy.h to build.
- * workers/DedicatedWorkerContext.cpp:
- * workers/DedicatedWorkerContext.h:
- Removed addMessage/forwardException() APIs - now handled by WorkerReportingProxy.
- * workers/DedicatedWorkerThread.cpp:
- (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
- Changed constructor to pass WorkerReportingProxy to base class.
- * workers/DefaultSharedWorkerRepository.cpp:
- Updated SharedWorkerProxy to implement WorkerReportingProxy interface.
- (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
- (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
- (WebCore::SharedWorkerProxy::workerContextClosed):
- (WebCore::SharedWorkerProxy::workerContextDestroyed):
- (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
- Now passes in WorkerReportingProxy when creating SharedWorkerThread.
- * workers/SharedWorkerContext.cpp:
- * workers/SharedWorkerContext.h:
- Removed addMessage/forwardException() APIs - now handled by WorkerReportingProxy.
- * workers/SharedWorkerThread.cpp:
- (WebCore::SharedWorkerThread::create):
- (WebCore::SharedWorkerThread::SharedWorkerThread):
- Passes WorkerReportingProxy to base class constructor.
- * workers/SharedWorkerThread.h:
- Constructor now takes a WorkerReportingProxy.
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::~WorkerContext):
- Moved code that calls workerContextDestroyed() into base class so shared workers share this functionality.
- (WebCore::WorkerContext::close):
- Now notifies WorkerReportingProxy when the thread is closing.
- (WebCore::WorkerContext::reportException):
- Reports exceptions via WorkerReportingProxy.
- (WebCore::WorkerContext::addMessage):
- Reports console messages via WorkerReportingProxy.
- * workers/WorkerContext.h:
- * workers/WorkerObjectProxy.h:
- (WebCore::WorkerObjectProxy::workerContextClosed):
- Default empty implementation for dedicated workers.
- * workers/WorkerReportingProxy.h: Added.
- Base interface that contains APIs moved from WorkerObjectProxy.
- (WebCore::WorkerReportingProxy::~WorkerReportingProxy):
- * workers/WorkerThread.cpp:
- (WebCore::WorkerThread::WorkerThread):
- Updated constructor to accept a WorkerReportingProxy.
- * workers/WorkerThread.h:
- (WebCore::WorkerThread::workerReportingProxy):
-
-2009-08-11 Simon Hausmann <simon.hausmann@nokia.com>
-
- Reviewed by NOBODY (build fix).
-
- Fix the Qt build after r47022.
-
- Use the new markChildren() pattern for marking aggregate/child objects.
-
- * bridge/qt/qt_instance.cpp:
- (JSC::Bindings::QtRuntimeObjectImp::markChildren):
- (JSC::Bindings::QtInstance::markAggregate):
- * bridge/qt/qt_instance.h:
- * bridge/qt/qt_runtime.cpp:
- (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
- * bridge/qt/qt_runtime.h:
-
-2009-08-11 Simon Hausmann <simon.hausmann@nokia.com>
-
- Reviewed by Holger Freyther.
-
- Fix the build on the Qt build bot by making the generated JS bindings
- files depend on the code generator itself.
-
- * WebCore.pro:
-
-2009-08-07 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Sam Weinig
-
- Stack overflow crash in JavaScript garbage collector mark pass
- https://bugs.webkit.org/show_bug.cgi?id=12216
-
- Make WebCore use the new iterative marking logic.
-
- Tests: fast/js/nested-object-gc.html
-
- * bindings/js/JSAbstractWorkerCustom.cpp:
- (WebCore::JSAbstractWorker::markChildren):
- * bindings/js/JSDOMApplicationCacheCustom.cpp:
- (WebCore::JSDOMApplicationCache::markChildren):
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::markDOMNodesForDocument):
- (WebCore::markActiveObjectsForContext):
- (WebCore::markDOMObjectWrapper):
- * bindings/js/JSDOMBinding.h:
- (WebCore::DOMObjectWithGlobalPointer::markChildren):
- * bindings/js/JSDOMGlobalObject.cpp:
- (WebCore::JSDOMGlobalObject::markChildren):
- * bindings/js/JSDOMGlobalObject.h:
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::markChildren):
- * bindings/js/JSDOMWindowShell.cpp:
- (WebCore::JSDOMWindowShell::markChildren):
- * bindings/js/JSDOMWindowShell.h:
- * bindings/js/JSDedicatedWorkerContextCustom.cpp:
- (WebCore::JSDedicatedWorkerContext::markChildren):
- * bindings/js/JSDocumentCustom.cpp:
- (WebCore::JSDocument::markChildren):
- * bindings/js/JSEventListener.cpp:
- (WebCore::JSEventListener::markJSFunction):
- * bindings/js/JSEventListener.h:
- * bindings/js/JSMessageChannelCustom.cpp:
- (WebCore::JSMessageChannel::markChildren):
- * bindings/js/JSMessagePortCustom.cpp:
- (WebCore::JSMessagePort::markChildren):
- * bindings/js/JSNavigatorCustom.cpp:
- (WebCore::JSNavigator::markChildren):
- * bindings/js/JSNodeCustom.cpp:
- (WebCore::JSNode::markChildren):
- * bindings/js/JSNodeFilterCondition.cpp:
- (WebCore::JSNodeFilterCondition::markAggregate):
- * bindings/js/JSNodeFilterCondition.h:
- * bindings/js/JSNodeFilterCustom.cpp:
- (WebCore::JSNodeFilter::markChildren):
- * bindings/js/JSNodeIteratorCustom.cpp:
- (WebCore::JSNodeIterator::markChildren):
- * bindings/js/JSQuarantinedObjectWrapper.cpp:
- (WebCore::JSQuarantinedObjectWrapper::markChildren):
- * bindings/js/JSQuarantinedObjectWrapper.h:
- * bindings/js/JSSVGElementInstanceCustom.cpp:
- (WebCore::JSSVGElementInstance::markChildren):
- * bindings/js/JSSharedWorkerCustom.cpp:
- (WebCore::JSSharedWorker::markChildren):
- * bindings/js/JSStyleSheetCustom.cpp:
- (WebCore::JSStyleSheet::markChildren):
- * bindings/js/JSTreeWalkerCustom.cpp:
- (WebCore::JSTreeWalker::markChildren):
- * bindings/js/JSWebSocketCustom.cpp:
- (WebCore::JSWebSocket::markChildren):
- * bindings/js/JSWorkerContextCustom.cpp:
- (WebCore::JSWorkerContext::markChildren):
- * bindings/js/JSWorkerCustom.cpp:
- (WebCore::JSWorker::markChildren):
- * bindings/js/JSXMLHttpRequestCustom.cpp:
- (WebCore::JSXMLHttpRequest::markChildren):
- * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
- (WebCore::JSXMLHttpRequestUpload::markChildren):
- * bindings/scripts/CodeGeneratorJS.pm:
- * dom/EventListener.h:
- (WebCore::EventListener::markJSFunction):
- (WebCore::markIfNotNull):
- * dom/NodeFilter.h:
- (WebCore::NodeFilter::markAggregate):
- * dom/NodeFilterCondition.h:
- (WebCore::NodeFilterCondition::markAggregate):
- * dom/RegisteredEventListener.h:
- (WebCore::markEventListeners):
- * page/DOMWindow.h:
- * workers/WorkerContext.h:
-
-2009-08-10 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Renamed all V8 NPN_ functions to _NPN_ to match JSC and make them "private".
- https://bugs.webkit.org/show_bug.cgi?id=28089
-
- Rename all the NPN_foo functions to _NPN_foo so that they can't directly be
- called by mistake. This roughly matches the way JSC does it, which is an
- additional advantage.
-
- * bindings/v8/NPV8Object.cpp:
- (npCreateV8ScriptObject):
- (_NPN_Invoke):
- (_NPN_InvokeDefault):
- (_NPN_Evaluate):
- (_NPN_EvaluateHelper):
- (_NPN_GetProperty):
- (_NPN_SetProperty):
- (_NPN_RemoveProperty):
- (_NPN_HasProperty):
- (_NPN_HasMethod):
- (_NPN_SetException):
- (_NPN_Enumerate):
- (_NPN_Construct):
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::clearScriptObjects):
- (WebCore::ScriptController::createScriptInstanceForWidget):
- (WebCore::ScriptController::cleanupScriptObjectsForPlugin):
- * bindings/v8/V8NPObject.cpp:
- (npObjectInvokeImpl):
- (npObjectGetProperty):
- (npObjectIndexedPropertyGetter):
- (npObjectGetIndexedProperty):
- (npObjectSetProperty):
- (npObjectIndexedPropertySetter):
- (npObjectSetIndexedProperty):
- (weakNPObjectCallback):
- (createV8ObjectForNPObject):
- (forgetV8ObjectForNPObject):
- * bindings/v8/V8NPUtils.cpp:
- (getStringIdentifier):
- * bindings/v8/npruntime.cpp:
- * bindings/v8/npruntime_impl.h:
-
-2009-08-10 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Brady Eidson.
-
- Change ___Storage.key() to match current spec behavior.
- https://bugs.webkit.org/show_bug.cgi?id=28112
-
- The current WebStorage spec says that ___Storage.key() should return null when
- the index is out of bounds, rather than an exception. A bunch of logic can be
- simplified after this change.
-
- * bindings/js/JSStorageCustom.cpp:
- (WebCore::JSStorage::getPropertyNames):
- * bindings/v8/custom/V8StorageCustom.cpp:
- (WebCore::V8Custom::v8StorageNamedPropertyEnumerator):
- * storage/Storage.cpp:
- (WebCore::Storage::key):
- * storage/Storage.h:
- * storage/Storage.idl:
- * storage/StorageArea.h:
- * storage/StorageAreaImpl.cpp:
- (WebCore::StorageAreaImpl::key):
- * storage/StorageAreaImpl.h:
- * storage/StorageMap.cpp:
- (WebCore::StorageMap::key):
- * storage/StorageMap.h:
-
-2009-08-07 Michael Nordman <michaeln@google.com>
-
- Reviewed by Darin Fisher.
-
- https://bugs.webkit.org/show_bug.cgi?id=28087
-
- Mods for a chrome specific impl of ApplicationCacheHost.
-
- * The public section of the interface is the same, but we use
- PLATFORM(CHROMIUM) to identify which parts of the private
- section are shared. The chrome specific internals are encapsulated
- in a seperate ApplicationCacheHostInternal class. WebCore common
- code only contains a forward reference to this class.
-
- * Cleanup a couple of stale comments.
-
- * Have window.applicationCache return null to script when the
- feature is disabled in the preferences.
-
- No new tests.
-
- * loader/appcache/ApplicationCacheHost.cpp:
- * loader/appcache/ApplicationCacheHost.h:
- (WebCore::ApplicationCacheHost::documentLoader):
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::applicationCache):
-
-2009-08-10 Crystal Zhang <crystal.zhang@torchmobile.com>
-
- Reviewed by George Staikos.
-
- Implement GraphicsContext::fillRoundRect() for WINCE port
- https://bugs.webkit.org/show_bug.cgi?id=27842
-
- * platform/graphics/GraphicsContext.h:
- * platform/graphics/wince/GraphicsContextWince.cpp:
- (WebCore::rectCenterPoint):
- (WebCore::GraphicsContext::fillRoundedRect):
- (WebCore::GraphicsContext::drawRoundCorner):
-
-2009-08-10 Anthony Ricaud <rik@webkit.org>
-
- Reviewed by Timothy Hatcher.
-
- Inspector Resources / Graphs should support filtering
- https://bugs.webkit.org/show_bug.cgi?id=20629
-
- Introduces a filter bar for resources.
-
- Thanks to Matt Lilek for the CSS scope bar.
-
- * English.lproj/localizedStrings.js:
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel.createFilterElement):
- (WebInspector.ResourcesPanel):
- (WebInspector.ResourcesPanel.prototype.toolbarItemClass.categoryOrder.filter):
- (WebInspector.ResourcesPanel.prototype._updateFilter):
- (WebInspector.ResourcesPanel.prototype._updateSummaryGraph):
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.js:
- (WebInspector.loaded):
-
-2009-08-10 Brent Fulgham <bfulgham@webkit.org>
-
- Unreviewed build correction after http://trac.webkit.org/changeset/46978
-
- * platform/network/curl/ResourceHandleManager.cpp:
- (WebCore::ResourceHandleManager::initializeHandle): Correct
- deprecated removeRef to new removeFragmentIdentifier.
-
-2009-08-07 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Justin Garcia.
-
- Background color formatting lost on enter
- https://bugs.webkit.org/show_bug.cgi?id=20348
-
- This patch makes background color be preserved during editing.
- In particular, editingStyleAtPosition would include the background color when obtaining styles.
-
- * editing/ApplyStyleCommand.cpp:
- (WebCore::): Added CSSPropertyBackgroundColor to editingStyleProperties
-
-2009-08-10 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Hausmann.
-
- Stop sending QEvent::CursorChange to Qt for mouse move.
-
- Verify if the cursor didn't change in WidgetQt::setCursor,
- just like the mac port does.
-
- Thanks to Adriano Rezendo for spotting and debugging the
- issue.
-
- * platform/qt/WidgetQt.cpp:
- (WebCore::Widget::setCursor):
-
-2009-08-10 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Brady Eidson.
-
- https://bugs.webkit.org/show_bug.cgi?id=28165
- Application cache maximum size cannot be set before the database is opened
-
- * loader/appcache/ApplicationCacheStorage.cpp:
- (WebCore::ApplicationCacheStorage::vacuumDatabaseFile): Open appcache database if it isn't
- open yet.
-
-2009-08-10 Vitaly Repeshko <vitalyr@quad.spb.corp.google.com>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Fix memory leak in node event listeners. See http://crbug.com/17400.
- https://bugs.webkit.org/show_bug.cgi?id=28156
-
- * bindings/scripts/CodeGeneratorV8.pm: Custom event handler accessors now apply to all Node descendants.
- * bindings/v8/V8AbstractEventListener.h:
- (WebCore::V8AbstractEventListener::isObjectListener): Added virtual method to detect listeners that have weak references to JS objects.
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getTemplate):
- * bindings/v8/V8ObjectEventListener.cpp:
- * bindings/v8/V8ObjectEventListener.h:
- (WebCore::V8ObjectEventListener::isObjectListener):
- * bindings/v8/V8Utilities.cpp:
- (WebCore::removeHiddenDependency):
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8ElementCustom.cpp:
- * bindings/v8/custom/V8NodeCustom.cpp: Moved custom accessors from V8ElementCustom.cpp.
- (WebCore::toEventType):
- (WebCore::getEventListener):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::ACCESSOR_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
- (WebCore::getEventListener): Made static.
-
-2009-08-10 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Cleanup DOM Storage namespace shutdown code usage of security origin.
- https://bugs.webkit.org/show_bug.cgi?id=28094
-
- If a storage namespace is not explicitly closed, be sure to do so on
- destruction of the object. In addition, the close call should wait
- on the background thread finishing its syncing. (Not doing so is actually
- a regression from the original LocalStorage code.)
-
- There's no point to passing in the SecurityOrigin when copying a storage
- area since what was passed in is exactly what is stored within each
- storage area. In addition, the non-copy constructor should take in a
- PassRefPtr rather than a pointer since that pointer was only passed into
- the constuctor for RefPtr's anyway.
-
- * storage/StorageAreaImpl.cpp:
- (WebCore::StorageAreaImpl::StorageAreaImpl):
- (WebCore::StorageAreaImpl::copy):
- * storage/StorageAreaImpl.h:
- * storage/StorageNamespaceImpl.cpp:
- (WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
- (WebCore::StorageNamespaceImpl::~StorageNamespaceImpl):
- (WebCore::StorageNamespaceImpl::copy):
- (WebCore::StorageNamespaceImpl::close):
- * storage/StorageNamespaceImpl.h:
-
-2009-08-10 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Not reviewed, build fix.
-
- Rename ref() to fragmentIdentifier() in the wml/ subdirectory.
-
- * wml/WMLCardElement.cpp:
- (WebCore::WMLCardElement::determineActiveCard):
- * wml/WMLGoElement.cpp:
- (WebCore::WMLGoElement::executeTask):
- * wml/WMLPageState.cpp:
- (WebCore::WMLPageState::canAccessDeck):
-
-2009-08-10 Steve Falkenburg <sfalken@apple.com>
-
- Windows build fix.
-
- Exclude JSMedia.cpp from build since it is included in DerivedSources.cpp.
- Fixes linker warnings.
-
- Corrected spelling of JSInspectorBackend.cpp.
-
- Other changes related to actually using a Visual Studio to open/save the vcproj file.
-
- * WebCore.vcproj/WebCore.vcproj:
-
-2009-08-10 Sam Weinig <sam@webkit.org>
-
- Reviewed by Anders Carlsson.
-
- Remove a dead #define.
-
- * bindings/js/JSDOMBinding.cpp:
-
-2009-08-10 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- [Chromium] Update KURLGoogle for ref* method renames in
- http://trac.webkit.org/changeset/46978.
- https://bugs.webkit.org/show_bug.cgi?id=28084
-
- * bindings/v8/custom/V8LocationCustom.cpp:
- (WebCore::ACCESSOR_SETTER): Renamed ref and setRef to fragmentIdentifier and
- setFragmentIdentifier, respectively.
- * platform/KURLGoogle.cpp: Ditto, plus all other ref* method names.
-
-2009-08-10 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- [Gtk] Unreviewed. Fix the nit as suggested by Darin in bug #28144
- for r46989.
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::finishedCallback):
-
-2009-08-10 John Kjellberg <john.kjellberg@power.alstom.com>
-
- Reviewed by Darin Adler.
-
- Memory leak in error handling code for SOUP interface
- https://bugs.webkit.org/show_bug.cgi?id=28144
-
- Freed memory leaked in error handling code for soup requests.
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::finishedCallback):
- (WebCore::):
-
-2009-08-10 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Darin Adler.
-
- Provide graceful handling of the situation when an embedder invokes
- visited link update methods before a Page constructor has been called.
- https://bugs.webkit.org/show_bug.cgi?id=28149
-
- * page/Page.cpp:
- (WebCore::Page::allVisitedStateChanged): Added a null-check for allPages.
- (WebCore::Page::visitedStateChanged): Ditto.
-
-2009-08-10 Xan Lopez <xlopez@igalia.com>
-
- Fix GTKbuild.
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::):
-
-2009-08-10 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Anders Carlsson.
-
- Remove the redundant, Windows CE-only GlyphBuffer::advnaceData()
-
- * platform/graphics/GlyphBuffer.h: Removed advanceData().
- * platform/graphics/wince/GraphicsContextWince.cpp:
- (WebCore::GraphicsContext::drawText): Changed to use advances(from)
- instead of advanceData() from.
-
-2009-08-10 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- Remove workaround for older libsoup versions.
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::fillResponseFromMessage):
-
-2009-08-10 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- Let startHttp validate the URI instead of doing it, with potential
- crashes, in ::start.
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::startHttp):
-
-2009-08-10 Darin Adler <darin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- When empty <input> is focused, getSelection() exposes shadow tree nodes
- https://bugs.webkit.org/show_bug.cgi?id=15903
-
- Test: fast/forms/shadow-tree-exposure.html
-
- * page/DOMSelection.cpp:
- (WebCore::selectionShadowAncestor): Added.
- (WebCore::DOMSelection::anchorNode): Return the parent of the shadow
- ancestor if the selection is in a shadow tree. Matches Firefox.
- (WebCore::DOMSelection::anchorOffset): Return the index of the shadow
- ancestor if the selection is in a shadow tree. Matches Firefox.
- (WebCore::DOMSelection::focusNode): Ditto.
- (WebCore::DOMSelection::focusOffset): Ditto.
- (WebCore::DOMSelection::baseNode): More of the same, but since this
- is a WebKit-invented property, it does not match Firefox.
- (WebCore::DOMSelection::baseOffset): Ditto.
- (WebCore::DOMSelection::extentNode): Ditto.
- (WebCore::DOMSelection::extentOffset): Ditto.
- (WebCore::DOMSelection::isCollapsed): Return true even when the
- selection is a range, if the selection is in the shadow tree.
- Matches Firefox. Also changed behavior when called and the frame
- is gone to return true instead of false which makes more sense.
- (WebCore::DOMSelection::empty): Use clear() just like the other
- selection-clearing function in this file does.
- (WebCore::DOMSelection::getRangeAt): Return a range that starts
- and ends before the shadow ancestor. Matches Firefox.
-
-2009-08-10 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Make all status bar button images glyph-based.
-
- https://bugs.webkit.org/show_bug.cgi?id=28124
-
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel):
- * inspector/front-end/Images/clearConsoleButtonGlyph.png: Added.
- * inspector/front-end/Images/clearConsoleButtons.png: Removed.
- * inspector/front-end/Images/consoleButtonGlyph.png: Added.
- * inspector/front-end/Images/consoleButtons.png: Removed.
- * inspector/front-end/Images/dockButtonGlyph.png: Added.
- * inspector/front-end/Images/dockButtons.png: Removed.
- * inspector/front-end/Images/enableButtons.png: Removed.
- * inspector/front-end/Images/enableOutlineButtonGlyph.png: Added.
- * inspector/front-end/Images/enableSolidButtonGlyph.png: Added.
- * inspector/front-end/Images/excludeButtonGlyph.png: Added.
- * inspector/front-end/Images/excludeButtons.png: Removed.
- * inspector/front-end/Images/focusButtonGlyph.png: Added.
- * inspector/front-end/Images/focusButtons.png: Removed.
- * inspector/front-end/Images/largerResourcesButtonGlyph.png: Added.
- * inspector/front-end/Images/largerResourcesButtons.png: Removed.
- * inspector/front-end/Images/nodeSearchButtonGlyph.png: Added.
- * inspector/front-end/Images/nodeSearchButtons.png: Removed.
- * inspector/front-end/Images/pauseOnExceptionButtonGlyph.png: Added.
- * inspector/front-end/Images/pauseOnExceptionButtons.png: Removed.
- * inspector/front-end/Images/percentButtonGlyph.png: Added.
- * inspector/front-end/Images/percentButtons.png: Removed.
- * inspector/front-end/Images/recordButtonGlyph.png: Added.
- * inspector/front-end/Images/recordButtons.png: Removed.
- * inspector/front-end/Images/recordToggledButtonGlyph.png: Added.
- * inspector/front-end/Images/reloadButtonGlyph.png: Added.
- * inspector/front-end/Images/reloadButtons.png: Removed.
- * inspector/front-end/Images/undockButtonGlyph.png: Added.
- * inspector/front-end/Panel.js:
- (WebInspector.Panel.prototype.createStatusBarButton):
- * inspector/front-end/ProfilesPanel.js:
- (WebInspector.ProfilesPanel):
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel):
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel):
- * inspector/front-end/WebKit.qrc:
- * inspector/front-end/inspector.css:
- * inspector/front-end/inspector.html:
-
-2009-08-07 Brady Eidson <beidson@apple.com>
-
- Reviewed by Darin Adler.
-
- KURL ref() methods should be fragmentIdentifier() methods
- https://bugs.webkit.org/show_bug.cgi?id=28084
-
- In addition to the renames, also took the chance to replace all use of:
- setRef(String());
- with:
- removeFragmentIdentifier();
-
- * platform/KURL.cpp:
- (WebCore::KURL::fragmentIdentifier):
- (WebCore::KURL::hasFragmentIdentifier):
- (WebCore::KURL::setFragmentIdentifier):
- (WebCore::KURL::removeFragmentIdentifier):
- (WebCore::KURL::prettyURL):
- (WebCore::equalIgnoringFragmentIdentifier):
- * platform/KURL.h:
-
- * bindings/js/JSLocationCustom.cpp:
- (WebCore::JSLocation::setHash): Rework with new names, and to use the new equalIgnoringNullity() method.
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::internalLinkElement):
- * css/CSSCursorImageValue.cpp:
- (WebCore::isSVGCursorIdentifier):
- * history/HistoryItem.cpp:
- (WebCore::HistoryItem::isCurrentDocument):
- * html/HTMLAnchorElement.cpp:
- (WebCore::HTMLAnchorElement::hash):
- * html/HTMLFrameElementBase.cpp:
- (WebCore::HTMLFrameElementBase::isURLAllowed):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::begin):
- (WebCore::FrameLoader::gotoAnchor):
- (WebCore::FrameLoader::scheduleLocationChange):
- (WebCore::FrameLoader::scrollToAnchor):
- (WebCore::FrameLoader::shouldReload):
- (WebCore::FrameLoader::urlsMatchItem):
- * loader/appcache/ApplicationCache.cpp:
- (WebCore::ApplicationCache::resourceForURL):
- (WebCore::ApplicationCache::resourceForRequest):
- * loader/appcache/ApplicationCacheGroup.cpp:
- (WebCore::ApplicationCacheGroup::cacheForMainRequest):
- (WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest):
- (WebCore::ApplicationCacheGroup::selectCache):
- (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
- (WebCore::ApplicationCacheGroup::didReceiveResponse):
- (WebCore::ApplicationCacheGroup::didFail):
- (WebCore::ApplicationCacheGroup::addEntry):
- * loader/appcache/ApplicationCacheResource.h:
- (WebCore::ApplicationCacheResource::create):
- * loader/appcache/ApplicationCacheStorage.cpp:
- (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
- (WebCore::ApplicationCacheStorage::cacheGroupForURL):
- (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
- * loader/appcache/ManifestParser.cpp:
- (WebCore::parseManifest):
- * page/Location.cpp:
- (WebCore::Location::hash):
- * page/Page.cpp:
- (WebCore::Page::goToItem):
- * rendering/RenderPartObject.cpp:
- (WebCore::isURLAllowed):
- * workers/WorkerLocation.cpp:
- (WebCore::WorkerLocation::hash):
-
-2009-08-10 Andy Shaw <andy.shaw@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Fix endless loop when the application is quit by a secondary thread during a sync xml http request.
-
- Replace the m_finished state variable and the call to QCoreApplication::processEvents() with
- a dedicated QEventLoop, that can be terminated from within WebCoreSynchronousLoader as well
- as from Qt through its knowledge of globally registered eventloops.
-
- There is no unit test for this bug as it would require exporting additional symbols and
- introduce the synchronous loader as global variable just for the test.
-
- * platform/network/qt/ResourceHandleQt.cpp:
- (WebCore::WebCoreSynchronousLoader::didFinishLoading):
- (WebCore::WebCoreSynchronousLoader::didFail):
- (WebCore::WebCoreSynchronousLoader::waitForCompletion):
-
-2009-08-10 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Make properties inspection serialized.
-
- https://bugs.webkit.org/show_bug.cgi?id=28078
-
- * inspector/front-end/DOMAgent.js:
- (InspectorController.getPrototypes):
- (InspectorController.getProperties):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.getPrototypes):
- (InjectedScript.getProperties):
- (InjectedScript.setPropertyValue):
- * inspector/front-end/ObjectPropertiesSection.js:
- (WebInspector.ObjectRef):
- (WebInspector.ObjectPropertyRef):
- (WebInspector.ObjectPropertiesSection.prototype.onpopulate):
- (WebInspector.ObjectPropertiesSection.prototype.update.callback):
- (WebInspector.ObjectPropertiesSection.prototype.update):
- (WebInspector.ObjectPropertiesSection.prototype._update):
- (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate.callback):
- (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
- (WebInspector.ObjectPropertyTreeElement.prototype.onattach):
- (WebInspector.ObjectPropertyTreeElement.prototype.update):
- * inspector/front-end/PropertiesSidebarPane.js:
- (WebInspector.PropertiesSidebarPane.prototype.update.callback):
- (WebInspector.PropertiesSidebarPane.prototype.update):
-
-2009-08-09 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by George Staikos.
-
- [WML] wml.css lacks <pre> support
- https://bugs.webkit.org/show_bug.cgi?id=28135
-
- Add <pre> support for WML.
- Extended fast/wml/text-emphasis.wml to cover <pre> support.
-
- * css/wml.css: <pre> section copied from html.css
-
-2009-08-09 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by Oliver Hunt.
-
- Fix non-WML enabled builds. Remove ENABLE(WML) guards around the switch cases 'FrameLoadTypeBackWMLDeckNotAccessible'.
-
- * loader/FrameLoader.cpp:
- (WebCore::isBackForwardLoadType):
- (WebCore::FrameLoader::restoreDocumentState):
- (WebCore::FrameLoader::transitionToCommitted):
- (WebCore::FrameLoader::loadItem):
-
-2009-08-09 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by George Staikos.
-
- [WML] Deck access control is completly broken
- https://bugs.webkit.org/show_bug.cgi?id=27721
-
- Rewrite WML deck access control, actually works now standalone and within LayoutTests.
- Added several new layout tests covering local & remote access support.
-
- In order to detect WML task execution failures from within the WML layout tests a new
- method Console::lastWMLErrorMessage() has been added, returning the last recorded WML
- error message. Change WML log messages to dump to InspectorClient, just like it's done
- for HTML - we used to behave like JSMessageSource, which is wrong.
-
- Tests: http/tests/wml/access-target-domain-deny.html
- http/tests/wml/access-target-path-deny.html
- http/tests/wml/access-target.html
- wml/access-target-deny.html
- wml/access-target.html
-
- * inspector/ConsoleMessage.h:
- (WebCore::ConsoleMessage::source): Added public method to fetch the message source type.
- (WebCore::ConsoleMessage::message): Added public method to access the error message.
- * inspector/InspectorController.h:
- (WebCore::InspectorController::consoleMessages): Added for Console::lastWMLErrorMessage(), to be able to crawl through the list of dumped messages.
- * loader/FrameLoader.cpp: Recognize 'FrameLoadTypeBackWMLDeckNotAccessible', all guarded by ENABLE(WML).
- (WebCore::isBackForwardLoadType):
- (WebCore::FrameLoader::restoreDocumentState):
- (WebCore::FrameLoader::transitionToCommitted):
- (WebCore::FrameLoader::loadItem):
- * loader/FrameLoaderTypes.h:
- (WebCore::): Add new load type 'FrameLoadTypeBackWMLDeckNotAccessible', behaving like FrameLoadTypeBack plus WML specific information.
- * page/Console.cpp:
- (WebCore::Console::addMessage): Don't dump WML messages using ChromeClient (as it's done for JSMessageSource), but go through InspectorController.
- (WebCore::Console::lastWMLErrorMessage): Crawl InspectorController::consoleMssages() to look up the last WML error message, if present.
- * page/Console.h:
- * page/Console.idl: Add "[DontEnum] DOMString lastWMLErrorMessage()".
- * wml/WMLAccessElement.cpp: Store path/domain as member variables and pass them to WMLPageState once in insertedIntoDocument().
- (WebCore::WMLAccessElement::parseMappedAttribute):
- (WebCore::WMLAccessElement::insertedIntoDocument):
- * wml/WMLAccessElement.h:
- * wml/WMLCardElement.cpp: Handle 'FrameLoadTypeBackWMLDeckNotAccessible' as deck-entry method. Report WML error in current deck.
- (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded):
- * wml/WMLDocument.cpp: Enable deck-access control in finishedParsing. Take care of method name changes in WMLPageState.
- (WebCore::WMLDocument::finishedParsing):
- (WebCore::WMLDocument::initialize):
- * wml/WMLErrorHandling.cpp: Never report 'WMLErrorDeckNotAccessible' messages through the tokenizer, that would alter the page into error state.
- (WebCore::reportWMLError):
- * wml/WMLPageState.cpp: Completly rewrote access path/domain parsing & deck-access control, strictly following the WML spec. All covered by tests.
- (WebCore::WMLPageState::WMLPageState):
- (WebCore::normalizedHostName):
- (WebCore::hostFromURL):
- (WebCore::urlForHistoryItem):
- (WebCore::tryAccessHistoryURLs):
- (WebCore::WMLPageState::processAccessControlData):
- (WebCore::WMLPageState::resetAccessControlData):
- (WebCore::WMLPageState::canAccessDeck):
- (WebCore::WMLPageState::hostIsAllowedToAccess):
- (WebCore::WMLPageState::pathIsAllowedToAccess):
- * wml/WMLPageState.h:
-
-2009-08-09 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by Maciej Stachowiak.
-
- FrameLoadType / WebFrameLoadType enums are out of sync
- https://bugs.webkit.org/show_bug.cgi?id=28132
-
- Modify FrameLoadType enum to match the order of WebFrameLoadType in WebFramePrivate.h / IWebFramePrivate.idl.
- The mac/win public API exposes the old 'FrameLoadTypeReloadAllowingStaleData' value, which resides between
- 'FrameLoadTypeReload' and 'FrameLoadTypeSame'. Work around this problem, by assigning 'FrameLoadTypeSame = FrameLoadTypeReload 2'.
-
- Add a note to the FrameLoadType enum to keep it in sync with WebFramePrivate.h & IWebFramePrivate.idl.
-
- * loader/FrameLoaderTypes.h:
- (WebCore::):
-
-2009-08-09 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by George Staikos.
-
- [WML] manual-tests/wml/onevent-prev.wml crashes
- https://bugs.webkit.org/show_bug.cgi?id=27722
-
- Fix intrinsic event execution, leading to crashes.
- First finish parsing the document, then execute the events. Not the other way round.
- -> exposes bugs all over the WML layout tests, which relied on that quirk.
-
- Fixes manual-tests/wml/onevent-prev.wml.
-
- * wml/WMLDocument.cpp:
- (WebCore::WMLDocument::WMLDocument):
- (WebCore::WMLDocument::finishedParsing):
- (WebCore::WMLDocument::initialize):
- * wml/WMLDocument.h:
-
-2009-08-08 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- [Chromium] Update WebCore.gyp to add ImageBuffer.cpp,
- introduced by http://trac.webkit.org/changeset/46956.
- https://bugs.webkit.org/show_bug.cgi?id=27844
-
- * WebCore.gypi: Added ImageBuffer.cpp.
-
-2009-08-08 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Rubber-stamped by Jan Michael Alonzo.
-
- Add [DontEnum] to WML specific initializeWMLPageState/resetWMLPageState methods, to assure
- fast/dom/Window/window-properties.html doesn't show any differences when WML is enabled.
-
- * dom/Document.idl:
-
-2009-08-08 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Eric Seidel.
-
- SVG Filter need feColorMatrix implementation
- [https://bugs.webkit.org/show_bug.cgi?id=27711]
-
- Adds the filter effect feColorMatrix to SVG filters.
-
- There is already a test in the w3c directory.
- Test: svg/W3C-SVG-1.1/filters-color-01-b.svg
-
- * platform/graphics/filters/FEColorMatrix.cpp:
- (WebCore::matrix):
- (WebCore::saturate):
- (WebCore::huerotate):
- (WebCore::luminance):
- (WebCore::FEColorMatrix::apply):
-
-2009-08-08 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- Build fix for Tiger.
- https://bugs.webkit.org/show_bug.cgi?id=27844
-
- * platform/graphics/cg/ImageBufferCG.cpp:
- (WebCore::ImageBuffer::ImageBuffer):
-
-2009-08-08 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- This is an initial implementation for linearRGB and sRGB support for all
- platforms. Some platforms like Cg support different color spaces
- natively, others like Qt, Cairo and Skia do not. This patch uses the
- native implementation of platforms if possible and offers a common version
- if not.
-
- Different color spaces are used in SVG Filters. Nearly every Filter test
- case is a test for this patch and will be enabled, once Filters are enabled.
- https://bugs.webkit.org/show_bug.cgi?id=27844
-
- * GNUmakefile.am:
- * WebCore.pro:
- * html/canvas/CanvasRenderingContext2D.cpp:
- (WebCore::CanvasRenderingContext2D::drawTextInternal):
- * html/HTMLCanvasElement.cpp:
- (WebCore::HTMLCanvasElement::createImageBuffer):
- * platform/graphics/GeneratedImage.cpp:
- (WebCore::GeneratedImage::drawPattern):
- * platform/graphics/ImageBuffer.cpp: Added.
- (WebCore::ImageBuffer::transformColorSpace):
- * platform/graphics/ImageBuffer.h:
- (WebCore::):
- (WebCore::ImageBuffer::create):
- * platform/graphics/cairo/ImageBufferCairo.cpp:
- (WebCore::ImageBuffer::ImageBuffer):
- (WebCore::ImageBuffer::platformTransformColorSpace):
- * platform/graphics/cairo/ImageCairo.cpp:
- (WebCore::Image::drawPattern):
- * platform/graphics/cg/ImageBufferCG.cpp:
- (WebCore::ImageBuffer::ImageBuffer):
- * platform/graphics/chromium/TransparencyWin.cpp:
- (WebCore::TransparencyWin::OwnedBuffers::OwnedBuffers):
- * platform/graphics/filters/FilterEffect.cpp:
- (WebCore::FilterEffect::getEffectContext):
- * platform/graphics/qt/ImageBufferQt.cpp:
- (WebCore::ImageBuffer::ImageBuffer):
- (WebCore::ImageBuffer::platformTransformColorSpace):
- * platform/graphics/qt/PathQt.cpp:
- (WebCore::Path::strokeContains):
- (WebCore::Path::strokeBoundingRect):
- * platform/graphics/skia/ImageBufferSkia.cpp:
- (WebCore::ImageBuffer::ImageBuffer):
- (WebCore::ImageBuffer::platformTransformColorSpace):
- * platform/graphics/skia/SkiaUtils.cpp:
- (WebCore::scratchContext):
- * platform/graphics/wx/ImageBufferWx.cpp:
- (WebCore::ImageBuffer::ImageBuffer):
- * platform/mac/ScrollbarThemeMac.mm:
- (WebCore::ScrollbarThemeMac::paint):
- * rendering/RenderBoxModelObject.cpp:
- (WebCore::RenderBoxModelObject::paintFillLayerExtended):
- * svg/SVGMaskElement.cpp:
- (WebCore::SVGMaskElement::drawMaskerContent):
- * svg/SVGPatternElement.cpp:
- (WebCore::SVGPatternElement::buildPattern):
- * svg/graphics/SVGImage.cpp:
- (WebCore::SVGImage::nativeImageForCurrentFrame):
- * svg/graphics/SVGPaintServerGradient.cpp:
- (WebCore::createMaskAndSwapContextForTextGradient):
- * svg/graphics/SVGPaintServerPattern.cpp:
- (WebCore::SVGPaintServerPattern::setup):
- * svg/graphics/SVGResourceFilter.cpp:
- (WebCore::SVGResourceFilter::prepareFilter):
- (WebCore::SVGResourceFilter::applyFilter):
- * svg/graphics/SVGResourceMasker.cpp:
- (WebCore::SVGResourceMasker::applyMask):
- * svg/graphics/filters/SVGFETile.cpp:
- (WebCore::FETile::apply):
-
-2009-08-08 Xan Lopez <xlopez@igalia.com>
-
- Roll out r46928, since it wasn't done in accordance with the
- agreed naming.
-
- * bindings/gdom/GdomDOMObject.cpp: Removed.
-
-2009-08-08 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Reviewed by Xan Lopez.
-
- [Gtk] Enable accessibility in Gtk DRT
- https://bugs.webkit.org/show_bug.cgi?id=25989
-
- Add SPI to get the focused accessible element to be used by DRT.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (webkit_accessible_get_focused_element):
- * accessibility/gtk/AccessibilityObjectWrapperAtk.h:
-
-2009-08-07 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Gtk build fix - add html/canvas to the binding generator's include path
-
- * GNUmakefile.am:
-
-2009-08-07 Oliver Hunt <oliver@apple.com>
-
- Another attempt to fix windows.
-
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.vcproj/WebCoreCommon.vsprops:
-
-2009-08-07 Oliver Hunt <oliver@apple.com>
-
- Windows build fix
-
- * WebCore.vcproj/WebCore.vcproj:
-
-2009-08-07 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Gtk build fix - add html/canvas to the include path.
-
- * GNUmakefile.am:
-
-2009-08-07 Adam Treat <adam.treat@torchmobile.com>
-
- Prospective build fix for Qt following r46937.
-
- * WebCore.pro:
-
-2009-08-07 Yong Li <yong.li@torchmobile.com>
-
- WINCE PORT: store only width for GlyphBufferAdvance, to save space on low-memory devices
- https://bugs.webkit.org/show_bug.cgi?id=27734
-
- * platform/graphics/GlyphBuffer.h:
- (WebCore::GlyphBuffer::advanceAt):
- (WebCore::GlyphBuffer::advanceData):
- (WebCore::GlyphBuffer::add):
-
-2009-08-07 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Eric Seidel.
-
- WINCE PORT: pass unrecognized glyphs to GDI to handle
- https://bugs.webkit.org/show_bug.cgi?id=27734
-
- * platform/graphics/FontFastPath.cpp:
- (WebCore::Font::glyphDataForCharacter):
-
-2009-08-07 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Move Canvas related file to a subdirectories
- https://bugs.webkit.org/show_bug.cgi?id=28026
-
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * html/CanvasGradient.cpp: Removed.
- * html/CanvasGradient.h: Removed.
- * html/CanvasGradient.idl: Removed.
- * html/CanvasPattern.cpp: Removed.
- * html/CanvasPattern.h: Removed.
- * html/CanvasPattern.idl: Removed.
- * html/CanvasPixelArray.cpp: Removed.
- * html/CanvasPixelArray.h: Removed.
- * html/CanvasPixelArray.idl: Removed.
- * html/CanvasRenderingContext2D.cpp: Removed.
- * html/CanvasRenderingContext2D.h: Removed.
- * html/CanvasRenderingContext2D.idl: Removed.
- * html/CanvasStyle.cpp: Removed.
- * html/CanvasStyle.h: Removed.
- * html/canvas: Added.
- * html/canvas/CanvasGradient.cpp: Copied from WebCore/html/CanvasGradient.cpp.
- * html/canvas/CanvasGradient.h: Copied from WebCore/html/CanvasGradient.h.
- * html/canvas/CanvasGradient.idl: Copied from WebCore/html/CanvasGradient.idl.
- * html/canvas/CanvasPattern.cpp: Copied from WebCore/html/CanvasPattern.cpp.
- * html/canvas/CanvasPattern.h: Copied from WebCore/html/CanvasPattern.h.
- * html/canvas/CanvasPattern.idl: Copied from WebCore/html/CanvasPattern.idl.
- * html/canvas/CanvasPixelArray.cpp: Copied from WebCore/html/CanvasPixelArray.cpp.
- * html/canvas/CanvasPixelArray.h: Copied from WebCore/html/CanvasPixelArray.h.
- * html/canvas/CanvasPixelArray.idl: Copied from WebCore/html/CanvasPixelArray.idl.
- * html/canvas/CanvasRenderingContext2D.cpp: Copied from WebCore/html/CanvasRenderingContext2D.cpp.
- * html/canvas/CanvasRenderingContext2D.h: Copied from WebCore/html/CanvasRenderingContext2D.h.
- * html/canvas/CanvasRenderingContext2D.idl: Copied from WebCore/html/CanvasRenderingContext2D.idl.
- * html/canvas/CanvasStyle.cpp: Copied from WebCore/html/CanvasStyle.cpp.
- * html/canvas/CanvasStyle.h: Copied from WebCore/html/CanvasStyle.h.
-
-2009-08-07 Szabo Carol <carol.szabo@nokia.com>
-
- Reviewed by David Hyatt.
-
- QtWebkit ignores letter-spacing and word-spacing styles.
- QtWebkit handles custom letter-spacing and word-spacing in the native QFont
- class, but the values for these options are not not passed on from
- the platform independent part of the Font class.
- Fixed QtWebkit behavior by applying the options to QFont when it is
- returned via Font::font()
-
- http://bugs.webkit.org/show_bug.cgi?id=27988
-
- LayoutTests:
- fast/css/word-space-extra.html
- css2.1/t1604-c542-letter-sp-00-b-a.html
- css2.1/t1604-c541-word-sp-01-b-a.html
- css1/text_properties/word_spacing.html
-
- * platform/graphics/qt/FontQt.cpp:
- (WebCore::Font::font):
-
-2009-08-07 Nicolas Weber <thakis@chromium.org>
-
- Reviewed by Darin Adler.
-
- Use correct highlight color for listboxes and completion popups.
-
- https://bugs.webkit.org/show_bug.cgi?id=28090
-
- * rendering/RenderThemeChromiumMac.h:
- * rendering/RenderThemeChromiumMac.mm:
- Rename activeListBoxSelectionBackgroundColor to
- platformActiveListBoxSelectionBackgroundColor, so that it actually
- overrides a virtual method.
-
-2009-08-07 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- Added a fourth bunch of Haiku-specific files for WebCore.
- https://bugs.webkit.org/show_bug.cgi?id=26988
-
- * platform/haiku/PasteboardHaiku.cpp: Added.
- (WebCore::Pasteboard::Pasteboard):
- (WebCore::Pasteboard::generalPasteboard):
- (WebCore::Pasteboard::writeSelection):
- (WebCore::Pasteboard::canSmartReplace):
- (WebCore::Pasteboard::plainText):
- (WebCore::Pasteboard::documentFragment):
- (WebCore::Pasteboard::writeURL):
- (WebCore::Pasteboard::writeImage):
- (WebCore::Pasteboard::clear):
- * platform/haiku/PlatformKeyboardEventHaiku.cpp: Added.
- (WebCore::keyIdentifierForHaikuKeyCode):
- (WebCore::windowsKeyCodeForKeyEvent):
- (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
- (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
- (WebCore::PlatformKeyboardEvent::currentCapsLockState):
- * platform/haiku/PlatformMouseEventHaiku.cpp: Added.
- (WebCore::PlatformMouseEvent::PlatformMouseEvent):
- * platform/haiku/PlatformWheelEventHaiku.cpp: Added.
- (WebCore::PlatformWheelEvent::PlatformWheelEvent):
-
-2009-08-07 Nicolas Weber <thakis@chromium.org>
-
- Teach WebKit how to decode jpegs in cmyk and ycck color spaces.
- Heavily inspired by Firefox's take on this issue.
-
- https://bugs.webkit.org/show_bug.cgi?id=27909
-
- Reviewed by Eric Seidel.
-
- * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
- (WebCore::JPEGImageReader::decode):
- Tell jpeglib to convert ycck to cmyk and keep cmyk.
- (WebCore::convertCMYKToRGBA):
- Added function to convert cmyk to rgb.
- (WebCore::convertRGBToRGBA):
- Extracted existing conversion logic into its own function.
- (WebCore::JPEGImageDecoder::outputScanlines):
- Call convertCMYKToRGBA for cmyk images, convertRGBToRGBA for rgb
- images.
-
-2009-08-07 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- SharedWorkers should be shared
- https://bugs.webkit.org/show_bug.cgi?id=28058
-
- Added tracking of shared workers to the SharedWorkerRepository.
-
- * workers/DefaultSharedWorkerRepository.cpp:
- (WebCore::SharedWorkerProxy::create):
- Changed SharedWorkerProxy to derive from ThreadSafeShared, as it needs to outlive the repository (if closed while some documents are still loading).
- (WebCore::SharedWorkerProxy::thread):
- (WebCore::SharedWorkerProxy::closing):
- Added flag used to determine whether the worker has closed itself while loading.
- (WebCore::SharedWorkerProxy::url):
- (WebCore::SharedWorkerProxy::name):
- Proxy now tracks worker URL and name to allow validity checks per section 4.8.3 of the WebWorkers spec.
- (WebCore::SharedWorkerProxy::SharedWorkerProxy):
- (WebCore::SharedWorkerProxy::addToDocumentSet):
- Added API to track the document set for a worker to allow worker shutdown. Currently does nothing.
- (WebCore::SharedWorkerScriptLoader::SharedWorkerScriptLoader):
- Renamed SharedWorkerLoader to be SharedWorkerScriptLoader for clarity.
- (WebCore::SharedWorkerScriptLoader::load):
- (WebCore::SharedWorkerScriptLoader::notifyFinished):
- (WebCore::DefaultSharedWorkerRepository::instance):
- (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
- Now handles "worker already loaded" case.
- (WebCore::SharedWorkerRepository::connect):
- Delegates to DefaultSharedWorkerRepository::connectToWorker
- (WebCore::DefaultSharedWorkerRepository::connectToWorker):
- Added code to track the SharedWorkerProxy in a map, and to handle the "worker already loaded" case.
- (WebCore::DefaultSharedWorkerRepository::getProxy):
- Atomic get-or-create operation on the internal tracking HashMap.
- * workers/DefaultSharedWorkerRepository.h:
- * workers/SharedWorker.cpp:
- (WebCore::SharedWorker::SharedWorker):
- * workers/SharedWorkerRepository.h:
- Removed instance() API and made constructor private to prevent instantiation.
- (WebCore::SharedWorkerRepository::SharedWorkerRepository):
-
-2009-08-07 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- Added four Haiku-specific files for WebCore:
- PopupMenuHaiku.cpp, ScreenHaiku.cpp,
- SearchPopupMenuHaiku.cpp and SoundHaiku.cpp
- https://bugs.webkit.org/show_bug.cgi?id=28080
-
- * platform/haiku/PopupMenuHaiku.cpp: Added.
- (WebCore::PopupMenu::PopupMenu):
- (WebCore::PopupMenu::~PopupMenu):
- (WebCore::PopupMenu::show):
- (WebCore::PopupMenu::hide):
- (WebCore::PopupMenu::updateFromElement):
- (WebCore::PopupMenu::itemWritingDirectionIsNatural):
- * platform/haiku/ScreenHaiku.cpp: Added.
- (WebCore::screenRect):
- (WebCore::screenAvailableRect):
- (WebCore::screenDepth):
- (WebCore::screenDepthPerComponent):
- (WebCore::screenIsMonochrome):
- * platform/haiku/SearchPopupMenuHaiku.cpp: Added.
- (WebCore::SearchPopupMenu::SearchPopupMenu):
- (WebCore::SearchPopupMenu::saveRecentSearches):
- (WebCore::SearchPopupMenu::loadRecentSearches):
- (WebCore::SearchPopupMenu::enabled):
- * platform/haiku/SoundHaiku.cpp: Added.
- (WebCore::systemBeep):
-
-2009-08-07 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- Added two Haiku-specific files to WebCore:
- TemporaryLinkStubs.cpp and WidgetHaiku.cpp
- https://bugs.webkit.org/show_bug.cgi?id=28080
-
- * platform/haiku/TemporaryLinkStubs.cpp: Added.
- (loadResourceIntoArray):
- (WebCore::historyContains):
- (WebCore::supportedKeySizes):
- (WebCore::signedPublicKeyAndChallengeString):
- (WebCore::userIdleTime):
- (WebCore::callOnMainThread):
- (WebCore::SharedBuffer::createWithContentsOfFile):
- (WebCore::KURL::fileSystemPath):
- (WebCore::getSupportedKeySizes):
- * platform/haiku/WidgetHaiku.cpp: Added.
- (WebCore::Widget::Widget):
- (WebCore::Widget::~Widget):
- (WebCore::Widget::frameRect):
- (WebCore::Widget::setFrameRect):
- (WebCore::Widget::setFocus):
- (WebCore::Widget::setCursor):
- (WebCore::Widget::show):
- (WebCore::Widget::hide):
- (WebCore::Widget::paint):
- (WebCore::Widget::setIsSelected):
-
-2009-08-07 Jian Li <jianli@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Fix the problem that isAttribute is set to false for onerror and
- onmessage in worker custom code.
- https://bugs.webkit.org/show_bug.cgi?id=28083
-
- * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
- (WebCore::getEventListener):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8WorkerCustom.cpp:
- (WebCore::getEventListener):
- (WebCore::ACCESSOR_SETTER):
-
-2009-08-07 Vitaly Repeshko <vitalyr@quad.spb.corp.google.com>
-
- Reviewed by Dimitri Glazkov.
-
- V8 bindings: speed up lookupDOMWrapper by using new V8 API function.
-
- https://bugs.webkit.org/show_bug.cgi?id=28071
-
- * bindings/v8/V8DOMWrapper.cpp:
- * bindings/v8/V8DOMWrapper.h:
- (WebCore::V8DOMWrapper::lookupDOMWrapper):
-
-2009-08-07 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Justin Garcia.
-
- selectionHasStyle doesn't handle text-specific properties properly
- https://bugs.webkit.org/show_bug.cgi?id=27858
-
- This patch modifies selectionHasStyle so that it returns TrueTriState when text styles
- (text-decoration, font-style, font-weight, & color) are present in all text nodes,
- regardless of whether the style is also present in their ancestor nodes or not.
- e.g. New behavior concludes that <b><i>hello</i><i>world</i></b> has italic style.
-
- WebKit now applies the text styles (bold, italic, etc) if the specified style was not present on
- at least one text node, rather than at the beginning of selection except on Mac.
- On Mac, WebKit applies the text style if the style was not present at the beginning of style.
-
- Test: editing/execCommand/toggle-compound-styles.html
-
- * editing/ApplyStyleCommand.cpp:
- (WebCore::getPropertiesNotInComputedStyle): bug fix, must use copy instead of makeMutable for a mutable style.
- * editing/Editor.cpp:
- (WebCore::):
- (WebCore::triStateOfStyleInComputedStyle): Added a boolean type to ignore text-specific styles
- (WebCore::Editor::selectionHasStyle): Ignores text-specific styles for all but text nodes
- * editing/EditorCommand.cpp:
- (WebCore::executeToggleStyle): Uses selectionHasStyle instead of selectionStartHasStyle
-
-2009-08-07 Jian Li <jianli@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Do not register V8 error message listener in WorkerContextExecutionProxy.
- https://bugs.webkit.org/show_bug.cgi?id=28082
-
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::WorkerContextExecutionProxy::initV8IfNeeded):
-
-2009-08-07 Kwang Yul Seo <skyul@company100.net>
-
- Reviewed by Eric Seidel.
-
- Cairo-based Windows port does not handle cookies properly
- https://bugs.webkit.org/show_bug.cgi?id=27414
-
- curl handles cookies by itself, so using WinINet functions
- to get and set cookies is wrong.
-
- Replace CookieJarWin.cpp with CookieJarCurl.cpp so that
- cookies can be implemented later once curl provides an API to
- get and set cookies.
-
- * WebCore.vcproj/WebCore.vcproj:
-
-2009-08-07 Michael Nordman <michaeln@google.com>
-
- Reviewed by Dimitri Glazkov.
-
- https://bugs.webkit.org/show_bug.cgi?id=28074
-
- V8 bindings for the window.applicationCache attribute.
-
- * WebCore.gypi:
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/DOMObjectsInclude.h:
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getTemplate):
- (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp: Added.
-
-2009-08-07 Alpha Lam <hclam@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Right click on timeline of media controls panel cause seek
- https://bugs.webkit.org/show_bug.cgi?id=27920
-
- Add a test simulate the behavior of seeking by right clicking
- on the time bar of media controls while playing.
-
- * media/controls-right-click-on-timebar-expected.txt: Added.
- * media/controls-right-click-on-timebar.html: Added.
-
-2009-08-07 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Justin Garcia.
-
- deprecatedCopyInheritableProperties must be replaced by two different functions
- https://bugs.webkit.org/show_bug.cgi?id=28057
-
- This patch deletes deprecatedInheritableProperties and modifies call callees to call either editingStyleAtPosition
- or prepareEditingStyleToApplyAt. The concept of editing style is introduced in this patch,
- which consists of all CSS properties need to be preserved under editing operations.
-
- No test is added since this patch does not change any behavior.
-
- * css/CSSComputedStyleDeclaration.cpp: Removed deprecatedCopyInheritableProperties
- * css/CSSComputedStyleDeclaration.h: Removed deprecatedCopyInheritableProperties
- * editing/ApplyStyleCommand.cpp:
- (WebCore::):
- (WebCore::editingStyleAtPosition): Obtains the editing-specific computed style at the position
- (WebCore::prepareEditingStyleToApplyAt): Removes redundant editing styles at the specified position
- (WebCore::removeStylesAddedByNode): Removes the style derived from the specified node
- * editing/ApplyStyleCommand.h:
- (WebCore::):
- * editing/CompositeEditCommand.cpp:
- (WebCore::CompositeEditCommand::moveParagraphs): Uses editingStyleAtPosition
- (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Uses editingStyleAtPosition
- * editing/DeleteSelectionCommand.cpp:
- (WebCore::removeEnclosingAnchorStyle): Uses removeStyleOfNode
- (WebCore::DeleteSelectionCommand::saveTypingStyleState): Uses editingStyleAtPosition
- (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Uses prepareEditingStyleToApplyAt
- * editing/EditCommand.cpp:
- * editing/EditCommand.h:
- * editing/InsertParagraphSeparatorCommand.cpp:
- (WebCore::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Uses editingStyleAtPosition
- (WebCore::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Uses prepareEditingStyleToApplyAt
- * editing/RemoveFormatCommand.cpp:
- (WebCore::RemoveFormatCommand::doApply): Uses editingStyleAtPosition
- * editing/ReplaceSelectionCommand.cpp:
- (WebCore::handleStyleSpansBeforeInsertion): Uses editingStyleAtPosition
- (WebCore::ReplaceSelectionCommand::handleStyleSpans): Uses editingStyleAtPosition and prepareEditingStyleToApplyAt
- (WebCore::ReplaceSelectionCommand::doApply): Uses prepareEditingStyleToApplyAt
- * editing/markup.cpp:
- (WebCore::removeEnclosingMailBlockquoteStyle): Uses removeStyleOfNode
- (WebCore::removeDefaultStyles): Uses prepareEditingStyleToApplyAt
- (WebCore::createMarkup): Uses editingStyleAtPosition
-
-2009-08-07 Steve Block <steveblock@google.com>
-
- Reviewed by Darin Adler.
-
- Bug 27250: Geolocation callback function IDL files are superfluous
- https://bugs.webkit.org/show_bug.cgi?id=27250
-
- The objects for the Geolocation success and error callbacks are created 'manually' in
- WebCore/bindings/js/JSGeolocationCustom.cpp. Furthermore, the callback interfaces are
- marked 'NoInterfaceObject' in the W3C spec, so the prototype should not
- appear on the window object. Hence IDL files for these callbacks are not required.
-
- See http://www.w3.org/TR/geolocation-API/#geolocation_interface and
- http://www.w3.org/TR/WebIDL/#NoInterfaceObject.
-
- No new tests required.
-
- * DerivedSources.make: Modified. Removed reference to IDL files.
- * WebCore.gypi: Modified. Removed reference to IDL files.
- * WebCore.xcodeproj/project.pbxproj: Modified. Removed reference to IDL files.
- * page/PositionCallback.idl: Removed.
- * page/PositionErrorCallback.idl: Removed.
-
-2009-08-07 Adam Treat <adam.treat@torchmobile.com>
-
- Reviewed by David Levin.
-
- Build fix for Qt when ENABLE_VIDEO = 0. This was necessitated by r46890 which
- put the idl files back into play regardless of compile time defines.
-
- * html/TimeRanges.idl:
-
-2009-08-07 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by George Staikos.
-
- Coding style patches for RenderThemeQt.cpp based on results from cpp_style.py.
-
- https://bugs.webkit.org/show_bug.cgi?id=28050
-
- * platform/qt/RenderThemeQt.cpp:
- (WebCore::RenderThemeQt::baselinePosition):
- (WebCore::inflateButtonRect):
- (WebCore::RenderThemeQt::supportsFocus):
- (WebCore::RenderThemeQt::applyTheme):
-
-2009-08-07 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by Eric Seidel.
-
- Prevent RenderThemeQt AdjustStyle based calls for TextField, MenuList and MenuListButton
- from discarding style colour.
-
- Add tests and remove tests from platform/qt/Skipped that now pass.
-
- https://bugs.webkit.org/show_bug.cgi?id=28050
-
- Tests: fast/forms/menulist-style-color.html
- fast/forms/text-style-color.html
-
- * platform/qt/RenderThemeQt.cpp:
- (WebCore::RenderThemeQt::adjustTextFieldStyle):
- (WebCore::RenderThemeQt::adjustMenuListStyle):
- (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
-
-2009-08-07 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- https://bugs.webkit.org/show_bug.cgi?id=22495
- [V8] Re-land http://trac.webkit.org/changeset/46821, now that
- http://trac.webkit.org/changeset/46874 re-landed
-
- * bindings/v8/DOMObjectsInclude.h:
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
-
-2009-08-07 Adam Treat <adam.treat@torchmobile.com>
-
- Reviewed by Darin Adler and George Staikos.
-
- Add rectToRect convenience function which returns the TransformationMatrix
- which maps the 'from' rectangle to the 'to' rectangle.
-
- https://bugs.webkit.org/show_bug.cgi?id=28067
-
- No tests as this would require binding the method to js and since it is static
- that doesn't seem possible. Please check the math.
-
- * platform/graphics/transforms/TransformationMatrix.cpp:
- (WebCore::TransformationMatrix::rectToRect):
- * platform/graphics/transforms/TransformationMatrix.h:
-
-2009-08-07 Brady Eidson <beidson@apple.com>
-
- Reviewed by Darin Adler.
-
- Implement the HTML5 hashchange event.
- https://bugs.webkit.org/show_bug.cgi?id=21605
-
- Test: fast/loader/hashchange-event.html
-
- * dom/EventNames.h: Add "hashchange"
- * html/HTMLAttributeNames.in: Add "onhashchange"
-
- * loader/FrameLoader.cpp:
- (WebCore::HashChangeEventTask::create):
- (WebCore::HashChangeEventTask::performTask):
- (WebCore::HashChangeEventTask::HashChangeEventTask):
- (WebCore::FrameLoader::scrollToAnchor): When an anchor navigation is completed and the
- new fragment identifier is different from the old one, queue a hash change event
- on the Document.
-
- Add a window event listener for the hashchange event if onhashchange is encountered:
- * html/HTMLBodyElement.cpp:
- (WebCore::HTMLBodyElement::parseMappedAttribute):
- * html/HTMLFrameSetElement.cpp:
- (WebCore::HTMLFrameSetElement::parseMappedAttribute):
-
- Add a new string utility method that gives "null and empty are equivalent" behavior:
- * platform/text/PlatformString.h:
- (WebCore::equalIgnoringNullity):
- * platform/text/StringImpl.cpp:
- (WebCore::equalIgnoringNullity):
- * platform/text/StringImpl.h:
-
-2009-08-07 Jessie Berlin <jberlin@apple.com>
-
- Reviewed by Timothy Hatcher.
-
- Add the initial implementation of the ability to resize the columns in
- a DataGrid in the Web Inspector. Enables that functionality in both the
- Profile View and in the Local Storage View.
-
- https://bugs.webkit.org/show_bug.cgi?id=26182
-
- In this version, resizing a column can change the width of at most two
- columns (the columns to the left and right of the resizer being dragged).
-
- Possible changes in future patches:
-
- 1) Be able to specify the minimum size of a column and the maximum size
- of a column. If the minimum size is equal to the maximum size, the
- column can't be resized.
- 2) Make the behavior more in line with the following description:
-
- Everything before the column that is resized stays fixed size. The
- resized column changes sizes. The other columns except the last stay
- the same size. And the last column adjusts to fit with a minimum size.
- If the last column is already the minimum, the next to last column
- shrinks, etc.
-
- 3) Make it possible to scale the column sizes appropriately when the
- Web Inspector window gets resized.
-
- * inspector/front-end/DOMStorageItemsView.js:
- (WebInspector.DOMStorageItemsView.prototype.update):
- Once the DataGrid is added to the DOM, update the widths of the
- DataGrid in order to put the resizers in place.
- (WebInspector.DOMStorageItemsView.prototype.resize):
- Update the widths of the DataGrid in order to correctly adjust the
- positions of the resizers.
-
- * inspector/front-end/DataGrid.js:
- (WebInspector.DataGrid):
- Store column groups whose widths can later be changed when the columns
- are resized by the user.
- Also, keep track of whether the widths of the columns have been
- initialized.
- (WebInspector.DataGrid.prototype.updateWidths):
- Create the resizers for the columns.
- (WebInspector.DataGrid.prototype._clickInDataTable):
- Didn't actually change anything in this method, just added a comma to
- the end of the function.
- (WebInspector.DataGrid.prototype._startResizerDragging):
- Store the resizer that is currently dragging.
- (WebInspector.DataGrid.prototype._resizerDragging):
- Constrain the area that the resizer can be dragged to the column to
- it's left and right, with some padding added to make sure that the
- neighboring columns don't disappear.
- (WebInspector.DataGrid.prototype._endResizerDragging):
-
- * inspector/front-end/DatabasesPanel.js:
- (WebInspector.DatabasesPanel.prototype.resize):
- Resize the view.
- (WebInspector.DatabasesPanel.prototype._updateSidebarWidth):
- ditto.
-
- * inspector/front-end/ProfileView.js:
- (WebInspector.ProfileView.prototype.show):
- Now that the DataGrid is actually attached to the DOM, update the
- widths of the DataGrid in order to put the resizers in place.
- (WebInspector.ProfileView.prototype.resize):
- Update the widths of the DataGrid in order to correctly adjust the
- positions of the resizers.
-
- * inspector/front-end/ProfilesPanel.js:
- (WebInspector.ProfilesPanel.prototype.resize):
- Resize the view.
- (WebInspector.ProfilesPanel.prototype._updateSidebarWidth):
- ditto.
-
- * inspector/front-end/inspector.css:
- Add in a style rule for a resizer in the Data Grid.
-
-2009-08-07 Simon Hausmann <simon.hausmann@nokia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- Back out r46847 and fix the Qt build system to always generate
- all the JS binding files from IDL files. The generated files
- have #if feature guards, so the #ifs are not needed in the
- files using them.
-
- * WebCore.pro:
- * bindings/js/JSEventTarget.cpp:
- * bindings/js/JSWorkerContextBase.cpp:
- * bindings/js/WorkerScriptController.cpp:
-
-2009-08-07 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Adele Peterson.
-
- Cannot scroll for box-reflect:right
- https://bugs.webkit.org/show_bug.cgi?id=27979
-
- Update m_overflowLeft an m_overflowWidth for reflection just like
- m_overflowTop and m_overflowHeight.
-
- Test: fast/reflections/reflection-overflow-scroll.html
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::layoutBlock):
-
-2009-08-06 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Adam Barth.
-
- box-shadow's spread is ignored with <table>
- https://bugs.webkit.org/show_bug.cgi?id=28017
-
- Use RenderStyle::getBoxShadowExtent just like RenderBlock.
-
- Test: fast/box-shadow/box-shadow-overflow-scroll.html
-
- * rendering/RenderTable.cpp:
- (WebCore::RenderTable::layout):
-
-2009-08-06 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: NodeLists Don't Display Well in the Console
- https://bugs.webkit.org/show_bug.cgi?id=28061
-
- * inspector/front-end/ConsoleView.js:
- (WebInspector.ConsoleView.prototype._format): Specific check if the object is a NodeList, display as an "array"
-
-2009-08-06 Yusuke Sato <yusukes@chromium.org>
-
- Reviewed by David Levin.
-
- Chromium Linux: add support for @font-face
- https://bugs.webkit.org/show_bug.cgi?id=28015
-
- * loader/CachedFont.cpp:
- (WebCore::CachedFont::~CachedFont):
- (WebCore::CachedFont::ensureCustomFontData):
- (WebCore::CachedFont::platformDataFromCustomData):
- (WebCore::CachedFont::allClientsRemoved):
-
- Modified #ifdefs so that chromium linux can load remote fonts.
-
- * platform/graphics/chromium/FontCustomPlatformData.cpp:
- (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
- (WebCore::FontCustomPlatformData::fontPlatformData):
- (WebCore::createFontCustomPlatformData):
-
- Create SkTypeface for a web font by calling SkTypeface::CreateFromStream function.
-
- (WebCore::RemoteFontStream::RemoteFontStream):
- (WebCore::RemoteFontStream::~RemoteFontStream):
- (WebCore::RemoteFontStream::rewind):
- (WebCore::RemoteFontStream::read):
-
- New class that implements SkStream interface and wraps wtf's SharedBuffer.
-
- * platform/graphics/chromium/FontCustomPlatformData.h:
- (WebCore::FontCustomPlatformData::FontCustomPlatformData):
-
- Added member variables for Linux.
-
-2009-08-06 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Eric Seidel.
-
- Fix JPEGImageDecoder.cpp compile error on WinCE
- https://bugs.webkit.org/show_bug.cgi?id=28051
-
- * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
-
-2009-08-06 Kevin Ollivier <kevino@theolliviers.com>
-
- Reviewed by Eric Seidel.
-
- Adding WebCore support for the waf build system for wx.
-
- https://bugs.webkit.org/show_bug.cgi?id=27619
-
- * wscript: Added.
-
-2009-08-06 Adam Barth <abarth@webkit.org>
-
- Unreviewed revert.
-
- http://bugs.webkit.org/show_bug.cgi?id=27879
-
- Revert 46877 because it broke GTK.
-
- * platform/graphics/wince/GraphicsContextWince.cpp:
-
-2009-08-06 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Eric Seidel.
-
- Bug 27956 - AX: roleValue should be cached for performance
- https://bugs.webkit.org/show_bug.cgi?id=27956
-
- Caches the role value of an accessibility object instead of calculating it everytime.
- The changes gained a 5% speedup using VoiceOver to navigate a webpage.
-
- * accessibility/AXObjectCache.cpp:
- (WebCore::AXObjectCache::handleAriaRoleChanged):
-
- Use generic role setter instead of specific ARIA role setter.
-
- * accessibility/AccessibilityObject.cpp:
- (WebCore::AccessibilityObject::AccessibilityObject):
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::headingLevel):
-
- Make headingLevel into instance method so that it can *safely* be called in the constructor.
-
- (WebCore::AccessibilityObject::setRoleValue):
- (WebCore::AccessibilityObject::roleValue):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
- (WebCore::AccessibilityRenderObject::headingLevel):
- (WebCore::AccessibilityRenderObject::intValue):
- (WebCore::AccessibilityRenderObject::updateAccessibilityRole):
- (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
- * accessibility/AccessibilityRenderObject.h:
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (AXAttributeStringSetHeadingLevel):
-
-2009-08-06 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
-
- Reviewed by Adam Barth.
-
- Change Noncopyable inheriting to public
- http://bugs.webkit.org/show_bug.cgi?id=27879
-
- Since Noncopyable is inherited from FastAllocBase, Noncopyable's
- inheriting has been changed to public.
-
- * platform/graphics/wince/GraphicsContextWince.cpp:
-
-2009-08-06 Mark Rowe <mrowe@apple.com>
-
- Rubber-stamped by Sam Weinig.
-
- Add explicit dependencies for our build verification scripts to ensure that they always run after linking has completed.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-08-05 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Darin Adler.
-
- Implement the matchMedium method on the Media interface described in the CSSOM View Module.
- https://bugs.webkit.org/show_bug.cgi?id=22495
-
- Add a new Media interface, obtainable via the AbstractView, that can
- evaluate queries via its matchesMedium() method.
-
- Test: fast/media/matchmedium-query-api.html
-
- * DerivedSources.cpp:
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- Add Media.* files to the build.
-
- * css/Media.cpp: Added.
- (WebCore::Media::Media):
- (WebCore::Media::type):
- (WebCore::Media::matchMedium):
- * css/Media.h: Added.
- (WebCore::Media::create):
- (WebCore::Media::document):
- * css/Media.idl: Added.
- Media::matchMedium() uses a MediaQueryEvaluator() to test the query.
-
- * page/AbstractView.idl:
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::media):
- * page/DOMWindow.h:
- * page/DOMWindow.idl:
- Add a readonly attribute for Media.
-
-2009-08-06 Michelangelo De Simone <micdesim@gmail.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=27455
- Support for a custom validation message in ValidityState and related
- form controls.
- http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#dom-cva-setcustomvalidity
-
- Tests: fast/forms/ValidityState-customError-001.html
- fast/forms/ValidityState-customError-002.html
- fast/forms/ValidityState-customError-003.html
- fast/forms/ValidityState-customError-004.html
-
- * html/HTMLButtonElement.idl: setCustomValidity DOM method
- * html/HTMLFieldSetElement.idl: ditto
- * html/HTMLFormControlElement.cpp:
- (WebCore::HTMLFormControlElement::setCustomValidity): ditto
- * html/HTMLFormControlElement.h:
- (WebCore::HTMLFormControlElement::valueMissing): moved down
- * html/HTMLInputElement.idl: ditto
- * html/HTMLSelectElement.idl: ditto
- * html/HTMLTextAreaElement.idl:
- * html/ValidityState.h:
- (WebCore::ValidityState::setCustomErrorMessage): method to set custom
- validation message
- (WebCore::ValidityState::customError): validation flag
-
-2009-08-06 Mark Rowe <mrowe@apple.com>
-
- Bring a little order to our otherwise out of control lives.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-08-06 Mark Rowe <mrowe@apple.com>
-
- Stop copying .idl files in to the framework resources directory.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-08-06 Mark Rowe <mrowe@apple.com>
-
- Fix the build some more.
-
- Add JSWebSocket.cpp and JSWebSocket.h to the Xcode project, and move the WebSocket-related
- files and groups in to the appropriate locations.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-08-06 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by Alexey Proskuryakov.
-
- Add WebSocket.idl
- https://bugs.webkit.org/show_bug.cgi?id=27209
-
- Add WebSocket.idl in WebCore/websockets/.
- Add build systems only for GNUmakefile.am and WebCore.xcodeproj now.
- Other build systems will be updated once the code is functional.
-
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSWebSocketConstructor.cpp: Added.
- * bindings/js/JSWebSocketConstructor.h: Added.
- * bindings/js/JSWebSocketCustom.cpp: Added.
- * websockets/WebSocket.cpp: Added.
- * websockets/WebSocket.h: Added.
- * websockets/WebSocket.idl: Added.
-
-2009-08-06 Jian Li <jianli@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Style cleaning for WorkerContextExecutionProxy.
- https://bugs.webkit.org/show_bug.cgi?id=27997
-
- Cleanup WorkerContextExecutioonProxy related files to follow
- WebKit coding styles after all V8 binding codes are upstreamed.
- 1) Lower-case the first letter of remaining functins in class
- WorkerContextExecutionProxy. Update the V8 code generator
- and all other references accordingly.
- 2) Integrate getConstructor from WorkerContextExecutionProxy
- to V8DOMWrapper.
- 3) Other misc changes, like removing trailing whitespaces and
- sorting the include files.
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/ScheduledAction.cpp:
- (WebCore::ScheduledAction::execute):
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getConstructorForContext):
- (WebCore::V8DOMWrapper::convertToV8Object):
- * bindings/v8/V8DOMWrapper.h:
- * bindings/v8/V8WorkerContextEventListener.cpp:
- (WebCore::V8WorkerContextEventListener::~V8WorkerContextEventListener):
- (WebCore::V8WorkerContextEventListener::handleEvent):
- (WebCore::V8WorkerContextEventListener::reportError):
- (WebCore::V8WorkerContextEventListener::getReceiverObject):
- * bindings/v8/V8WorkerContextObjectEventListener.cpp:
- (WebCore::weakObjectEventListenerCallback):
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::handleConsoleMessage):
- (WebCore::WorkerContextExecutionProxy::dispose):
- (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
- (WebCore::WorkerContextExecutionProxy::convertToV8Object):
- (WebCore::WorkerContextExecutionProxy::convertEventToV8Object):
- (WebCore::WorkerContextExecutionProxy::convertEventTargetToV8Object):
- (WebCore::WorkerContextExecutionProxy::convertWorkerContextToV8Object):
- (WebCore::WorkerContextExecutionProxy::toV8):
- (WebCore::WorkerContextExecutionProxy::forgetV8EventObject):
- (WebCore::WorkerContextExecutionProxy::removeEventListener):
- * bindings/v8/WorkerContextExecutionProxy.h:
- (WebCore::WorkerContextExecutionProxy::context):
- (WebCore::WorkerContextExecutionProxy::convertToV8Object):
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-08-06 Darin Adler <darin@apple.com>
-
- Fix Mac Leopard debug build.
-
- * platform/text/StringImpl.cpp:
- (WebCore::equalIgnoringCase): Removed meaningless assertion; an unsigned
- is always >= 0 and checking causes a warning in the newer versions of gcc.
-
-2009-08-06 Adam Barth <abarth@webkit.org>
-
- Unreview rollout.
-
- Revert 46840 because it broke the reliability tests.
-
- * bindings/v8/ScheduledAction.cpp:
- (WebCore::ScheduledAction::ScheduledAction):
- (WebCore::ScheduledAction::execute):
- * bindings/v8/ScheduledAction.h:
- (WebCore::ScheduledAction::ScheduledAction):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::V8Custom::WindowSetTimeoutImpl):
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::SetTimeoutOrInterval):
-
-2009-08-06 Adam Barth <abarth@webkit.org>
-
- Unreviewed rollout.
-
- Revert 46840 in preparation to revert 46838, which broke the reliability tests.
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::updateDocumentWrapperCache):
- (WebCore::V8Proxy::initContextIfNeeded):
- (WebCore::V8Proxy::mainWorldContext):
- * bindings/v8/V8Proxy.h:
- (WebCore::V8Proxy::context):
-
-2009-08-06 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: move style-related utilities into InjectedScript.
-
- http://bugs.webkit.org/show_bug.cgi?id=27939
-
- * inspector/front-end/DOMAgent.js:
- (WebInspector.CSSStyleDeclaration):
- (WebInspector.CSSStyleDeclaration.prototype.isPropertyImplicit):
- (WebInspector.CSSStyleDeclaration.prototype.styleTextWithShorthands):
- (WebInspector.CSSStyleDeclaration.prototype.getLonghandProperties):
- (WebInspector.CSSStyleDeclaration.prototype.getShorthandPriority):
- * inspector/front-end/InjectedScript.js:
- (InjectedScript.applyStyleText):
- (InjectedScript.toggleStyleEnabled):
- (InjectedScript._serializeStyle):
- (InjectedScript._getUniqueStyleProperties):
- (InjectedScript._getLonghandProperties):
- (InjectedScript._getShorthandPriority):
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylesSidebarPane.prototype._update):
- (WebInspector.StylePropertiesSection.prototype.isPropertyOverloaded):
- (WebInspector.StylePropertiesSection.prototype.onpopulate):
- (WebInspector.StylePropertyTreeElement.prototype.get priority):
- (WebInspector.StylePropertyTreeElement.prototype.get value):
- (WebInspector.StylePropertyTreeElement.prototype):
- * inspector/front-end/utilities.js:
-
-2009-08-06 Simon Hausmann <simon.hausmann@nokia.com>
-
- Unreviewed build fix, add #ifdef guards around
- inclusions of shared worker specific files.
-
- * bindings/js/JSEventTarget.cpp:
- * bindings/js/JSWorkerContextBase.cpp:
- * bindings/js/WorkerScriptController.cpp:
-
-2009-08-06 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Darin Adler.
-
- cssgrammar.cpp fails to compile with RVCT compiler
- https://bugs.webkit.org/show_bug.cgi?id=27952
-
- * css/CSSGrammar.y: Do not convert to String to get rid of the stray
- memory allocation
-
- * platform/text/StringImpl.cpp:
- (WebCore::equalIgnoringCase):
- * platform/text/StringImpl.h:
- (WebCore::equalIgnoringCase): Add charactersEqualIgnoringCase
- function that works with a character pointer and length
-
-2009-08-06 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- Created first working implementation of SharedWorkers (execution only, no sharing).
- https://bugs.webkit.org/show_bug.cgi?id=27927
-
- Added initial implementations of SharedWorkerThread and SharedWorkerContext.
- No v8 bindings yet.
-
- * DerivedSources.cpp:
- Added shared worker files.
- * DerivedSources.make:
- Added shared worker files.
- * GNUmakefile.am:
- Added shared worker files.
- * WebCore.gypi:
- Added shared worker files.
- * WebCore.pro:
- Added shared worker files.
- * WebCore.vcproj/WebCore.vcproj:
- Added shared worker files.
- * WebCore.xcodeproj/project.pbxproj:
- Added shared worker files.
- * bindings/js/JSEventTarget.cpp:
- (WebCore::toJS):
- Added code to convert from EventTarget to correct JS class.
- (WebCore::toEventTarget):
- Added code to cast from JS object to appropriate EventTarget impl class.
- * bindings/js/JSSharedWorkerConstructor.cpp:
- (WebCore::JSSharedWorkerConstructor::JSSharedWorkerConstructor):
- (WebCore::constructSharedWorker):
- Tweaked the constructor code to pass in the lexical global object like normal workers.
- * bindings/js/JSSharedWorkerContextCustom.cpp: Added.
- (WebCore::JSSharedWorkerContext::mark):
- Custom marking of the onconnect handler.
- * bindings/js/JSWorkerContextBase.cpp:
- (WebCore::toJSSharedWorkerContext):
- (WebCore::toJSWorkerContext):
- Added proper conversion to the correct WorkerContext derived class.
- * bindings/js/JSWorkerContextBase.h:
- * bindings/js/WorkerScriptController.cpp:
- (WebCore::WorkerScriptController::initScript):
- Updated WorkerScriptController to create the correct type of binding object (JSSharedWorkerContext vs JSDedicatedWorkerContext)
- * bindings/scripts/CodeGeneratorV8.pm:
- Added support for SharedWorkerContext.
- * bindings/v8/DOMObjectsInclude.h:
- Added shared worker bindings files.
- * dom/EventNames.h:
- Added connect event.
- * dom/EventTarget.cpp:
- (WebCore::EventTarget::toSharedWorkerContext):
- Added API for casting to new derived class (SharedWorkerContext).
- * dom/EventTarget.h:
- * workers/AbstractWorker.cpp:
- (WebCore::AbstractWorker::resolveURL):
- Moved code that resolves/validates URLs to base class so it can be shared between dedicated/shared workers.
- * workers/AbstractWorker.h:
- * workers/DedicatedWorkerContext.cpp:
- (WebCore::DedicatedWorkerContext::logException):
- Refactored exception handling code - moved onerror handling to base class.
- * workers/DedicatedWorkerContext.h:
- (WebCore::DedicatedWorkerContext::isDedicatedWorkerContext):
- * workers/SharedWorker.cpp:
- (WebCore::SharedWorker::SharedWorker):
- Changed constructor to fire up worker thread.
- * workers/SharedWorker.h:
- * workers/SharedWorkerContext.cpp: Added.
- (WebCore::SharedWorkerContext::SharedWorkerContext):
- (WebCore::SharedWorkerContext::~SharedWorkerContext):
- (WebCore::SharedWorkerContext::logException):
- (WebCore::SharedWorkerContext::addMessage):
- Placeholder methods until we add support for sending exceptions/messages to console.
- (WebCore::SharedWorkerContext::dispatchConnect):
- (WebCore::SharedWorkerContext::thread):
- * workers/SharedWorkerContext.h: Added.
- (WebCore::SharedWorkerContext::create):
- (WebCore::SharedWorkerContext::isSharedWorkerContext):
- (WebCore::SharedWorkerContext::toSharedWorkerContext):
- (WebCore::SharedWorkerContext::setOnconnect):
- (WebCore::SharedWorkerContext::onconnect):
- (WebCore::SharedWorkerContext::name):
- * workers/SharedWorkerContext.idl: Added.
- * workers/SharedWorkerRepository.h: Added.
- (WebCore::SharedWorkerRepository::~SharedWorkerRepository):
- * workers/DefaultSharedWorkerRepository.cpp: Added.
- Implementation of core singleton class that will be used to implement sharing.
- (WebCore::SharedWorkerProxy::setThread):
- Proxy object used to handle resource loading for a given shared worker.
- (WebCore::SharedWorkerProxy::postTaskToLoader):
- (WebCore::SharedWorkerProxy::postTaskForModeToWorkerContext):
- Placeholder routines until we implement loading.
- (WebCore::SharedWorkerConnectTask::create):
- Creates a task to fire off a connect event on the worker thread.
- (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
- (WebCore::SharedWorkerConnectTask::performTask):
- (WebCore::SharedWorkerLoader::SharedWorkerLoader):
- Added helper object to load the initial script for the worker.
- (WebCore::SharedWorkerLoader::load):
- (WebCore::SharedWorkerLoader::notifyFinished):
- (WebCore::SharedWorkerRepository::instance):
- (WebCore::DefaultSharedWorkerRepository::instance):
- (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
- Fires off the worker thread once the script is loaded.
- (WebCore::SharedWorkerRepository::connect):
- (WebCore::DefaultSharedWorkerRepository::DefaultSharedWorkerRepository):
- (WebCore::DefaultSharedWorkerRepository::~DefaultSharedWorkerRepository):
- * workers/DefaultSharedWorkerRepository.h: Added.
- * workers/SharedWorkerThread.cpp: Added.
- (WebCore::SharedWorkerThread::create):
- (WebCore::SharedWorkerThread::SharedWorkerThread):
- (WebCore::SharedWorkerThread::~SharedWorkerThread):
- (WebCore::SharedWorkerThread::createWorkerContext):
- * workers/SharedWorkerThread.h: Added.
- * workers/Worker.cpp:
- (WebCore::Worker::Worker):
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::reportException):
- * workers/WorkerContext.h:
- (WebCore::WorkerContext::isSharedWorkerContext):
- (WebCore::WorkerContext::isDedicatedWorkerContext):
- Added APIs to determine the type of a given context.
-
-2009-08-06 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by David Hyatt.
-
- Added ENABLE_3D_CANVAS flag to build, default to off
-
- * Configurations/FeatureDefines.xcconfig:
-
-2009-08-06 Andras Becsi <becsi.andras@stud.u-szeged.hu>
-
- Reviewed by Simon Hausmann.
-
- [Qt] windowsKeyCodeForKeyEvent fix
-
- Fix windowsKeyCodeForKeyEvent to determine wheter the event comes from the keypad.
-
- * platform/qt/PlatformKeyboardEventQt.cpp:
- (WebCore::windowsKeyCodeForKeyEvent):
- (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
-
-2009-08-06 George Staikos <george.staikos@torchmobile.com>
-
- Rubber-stamped by Ariya Hidayat.
-
- Remove the dead wince/ directory that should never have gone in.
-
- * svg/graphics/wince: Removed.
- * svg/graphics/wince/SVGResourceFilterWince.cpp: Removed.
-
-2009-08-06 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Extract style editing into a separate file that is
- going to be loaded in page context.
-
- https://bugs.webkit.org/show_bug.cgi?id=27939
-
- * inspector/front-end/InjectedScript.js: Added.
- (InjectedScript.applyStyleText):
- (InjectedScript.setStyleText):
- (InjectedScript.toggleStyleEnabled):
- (InjectedScript.setStyleRule):
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.callback):
- (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
- (WebInspector.StylePropertyTreeElement.prototype.):
- (WebInspector.StylePropertyTreeElement.prototype):
- * inspector/front-end/WebKit.qrc:
- * inspector/front-end/inspector.html:
-
-2009-08-06 Adam Barth <abarth@webkit.org>
-
- Reviewed by David Levin.
-
- [V8] Remove bug-bait V8Proxy::context()
- https://bugs.webkit.org/show_bug.cgi?id=27826
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::updateDocumentWrapperCache):
- (WebCore::V8Proxy::initContextIfNeeded):
- (WebCore::V8Proxy::mainWorldContext):
- * bindings/v8/V8Proxy.h:
-
-2009-08-06 Adam Barth <abarth@webkit.org>
-
- Unreviewed attempt to fix the Chromium Linux build. This function is
- not used.
-
- * bindings/v8/OwnHandle.h:
-
-2009-08-06 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- [V8] Teach ScheduledAction::execute about isolated worlds
- https://bugs.webkit.org/show_bug.cgi?id=27703
-
- We now save a weak handle to the original context. We use that handle
- to call the timeout in the right context / world.
-
- Tests: http/tests/security/isolatedWorld/window-setTimeout-function.html
- http/tests/security/isolatedWorld/window-setTimeout-string.html
-
- * bindings/v8/ScheduledAction.cpp:
- (WebCore::ScheduledAction::ScheduledAction):
- (WebCore::ScheduledAction::execute):
- * bindings/v8/ScheduledAction.h:
- (WebCore::ScheduledAction::ScheduledAction):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::V8Custom::WindowSetTimeoutImpl):
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::SetTimeoutOrInterval):
-
-2009-08-05 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- [V8] Revert http://trac.webkit.org/changeset/46821, which was
- landed to supplement http://trac.webkit.org/changeset/46816, but
- now that the latter is reverted, the former needs the same.
-
- * bindings/v8/DOMObjectsInclude.h:
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
-
-2009-08-05 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Color is only reported in rgb() format; should toggle between rgb() and hex
- https://bugs.webkit.org/show_bug.cgi?id=13516
-
- New Class to Parse and Change Between Color Representations:
-
- * inspector/front-end/Color.js: Added.
- (WebInspector.Color):
-
- Representations of Colors in Raw Form. (May be Lazy Loaded):
-
- (WebInspector.Color.prototype.get shorthex):
- (WebInspector.Color.prototype.get hex):
- (WebInspector.Color.prototype.set hex):
- (WebInspector.Color.prototype.get rgb):
- (WebInspector.Color.prototype.set rgb):
- (WebInspector.Color.prototype.get hsl):
- (WebInspector.Color.prototype.set hsl):
- (WebInspector.Color.prototype.get nickname):
- (WebInspector.Color.prototype.set nickname):
- (WebInspector.Color.prototype.get rgba):
- (WebInspector.Color.prototype.set rgba):
- (WebInspector.Color.prototype.get hsla):
- (WebInspector.Color.prototype.set hsla):
-
- Helpers and Standard String Representations:
-
- (WebInspector.Color.prototype.hasShortHex):
- (WebInspector.Color.prototype.toRgb):
- (WebInspector.Color.prototype.toHsl):
- (WebInspector.Color.prototype.toShortHex):
- (WebInspector.Color.prototype.toHex):
- (WebInspector.Color.prototype.toRgba):
- (WebInspector.Color.prototype.toHsla):
- (WebInspector.Color.prototype.toNickname):
-
- Conversion Functions to Determine Other Representations:
- My Sources for all algorithms and sample data:
- Wikipedia: http://en.wikipedia.org/wiki/HSV_color_space
- CSS Specification: http://www.w3.org/TR/css3-color/#hsla-color
-
- (WebInspector.Color.prototype.rgbToHex):
- (WebInspector.Color.prototype.hexToRgb):
- (WebInspector.Color.prototype.rgbToHsl):
- (WebInspector.Color.prototype.hslToRgb.hueToRgb):
- (WebInspector.Color.prototype.hslToRgb):
- (WebInspector.Color.prototype.rgbaToHsla):
- (WebInspector.Color.prototype.hslaToRgba):
-
- Called from the constructor, attempts to parse and will throw an error
- if it cannot parse. If simple then the "hex" value is guarenteed.
- If advanced then both the "rgba" and "hsla" are guarenteed. If it is
- a nickname in any way (e.g. "transparent", "black") then this is
- guarenteed to be set as well.
-
- (WebInspector.Color.prototype.parse):
-
- Clicking on the swatch will rotate through Color Representations.
- Simple: rgb -> hsl -> nickname? -> shorthex? -> hex -> (loop around)
- Advanced: rgba -> hsla -> nickname? -> (loop around)
-
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylePropertyTreeElement.prototype.updateTitle.value.):
- (WebInspector.StylePropertyTreeElement.prototype.updateTitle):
-
- Load Color.js:
-
- * inspector/front-end/inspector.html:
-
-2009-08-05 John Abd-El-Malek <jam@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Support setting event listeners for message ports in the worker process.
-
- https://bugs.webkit.org/show_bug.cgi?id=28004
-
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::WorkerContextExecutionProxy::retrieve):
- (WebCore::WorkerContextExecutionProxy::EventTargetToV8Object):
- * bindings/v8/WorkerContextExecutionProxy.h:
- * bindings/v8/custom/V8MessagePortCustom.cpp:
- (WebCore::getEventListener):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-08-05 Stephen White <senorblanco@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- http://bugs.webkit.org/show_bug.cgi?id=28022
-
- Minor fix for media code on chromium/skia.
-
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::paintMediaSliderTrack):
-
-2009-08-05 Darin Adler <darin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Client side image maps did not handle zoom correctly.
- Client side image maps did not handle border and padding correctly.
-
- Test: fast/images/image-map-zoom.html
-
- * rendering/RenderImage.cpp:
- (WebCore::RenderImage::nodeAtPoint): Compute the values to pass in to the map
- element using the content box and the effective zoom.
-
-2009-08-05 Alexey Proskuryakov <ap@apple.com>
-
- Reviewed by Oliver Hunt.
-
- https://bugs.webkit.org/show_bug.cgi?id=28027
- <rdar://7064428> Files with accents in names are submitted incorrectly due to use of
- precomposed Unicode
-
- * platform/network/mac/FormDataStreamMac.mm: (WebCore::setHTTPBody): Use getFileSize() from
- FileSystem.h instead of custom code for getting file size. This adds path normalization
- necessary with some file systems on Mac. This also loses a S_IFMT check, which didn't seem
- important anyway.
-
-2009-08-05 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- [V8] Include Media into V8 bindings.
-
- * bindings/v8/DOMObjectsInclude.h: Added Media include.
- * bindings/v8/DerivedSourcesAllInOne.cpp: Added V8Media include.
- * bindings/v8/V8Index.cpp: Added decl for V8Media.
- * bindings/v8/V8Index.h: Added V8Media include.
-
-2009-08-04 Jon Honeycutt <jhoneycutt@apple.com>
-
- Fix Windows layout test crashes.
-
- PluginView::removeFromUnstartedListIfNecessary() would try to remove
- any unstarted PluginView from the Page's set of unstarted plug-ins,
- regardless of why the PluginView wasn't started. If we tried to start a
- plug-in, but it failed to start, we would hit an assertion in
- Page::removeUnstartedPlugin() that asserts that we would only modify the
- unstarted plug-ins set if we were not currently starting plug-ins.
-
- Fix this by having PluginView track whether it's waiting to be started,
- and to check this before trying to remove itself from the Page's
- unstarted plug-ins set.
-
- Reviewed by Darin Adler.
-
- * page/Page.cpp:
- (WebCore::Page::removeUnstartedPlugin):
- Assert that the passed PluginView is in the unstarted set.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::start):
- Set that we are not waiting to be started.
- (WebCore::PluginView::startOrAddtoUnstartedList):
- Set that we are waiting to be started.
- (WebCore::PluginView::removeFromUnstartedListIfNecessary):
- Check not whether we are started, but whether we are waiting to be
- started.
- (WebCore::PluginView::PluginView):
-
- * plugins/PluginView.h:
-
-2009-08-05 Jeremy Orlow <jorlow@chromium.org>
-
- Fix DOM Storage memory leak
- https://bugs.webkit.org/show_bug.cgi?id=28029
-
- Forgot to use adoptRef in one place. This caused the = operator to
- increment the ref count when it shouldn't have, so StorageAreaImpl's were
- never freed.
-
- * storage/StorageNamespaceImpl.cpp:
- (WebCore::StorageNamespaceImpl::storageArea):
-
-2009-08-05 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- [Chromium] Let CodeGeneratorV8.pm know that Media is ref-counted.
-
- * bindings/scripts/CodeGeneratorV8.pm: Added Media check to IsRefPtrType.
-
-2009-08-05 Darin Adler <darin@apple.com>
-
- Reviewed by David Levin.
-
- Use checked casts for render tree
- https://bugs.webkit.org/show_bug.cgi?id=23522
-
- Last patch. Makes all the casts of RenderObject use checked
- casts instead of using static_cast directly.
-
- * accessibility/AccessibilityListBox.cpp:
- (WebCore::AccessibilityListBox::visibleChildren):
- (WebCore::AccessibilityListBox::doAccessibilityHitTest):
- * accessibility/AccessibilityListBoxOption.cpp:
- (WebCore::AccessibilityListBoxOption::elementRect):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::textUnderElement):
- (WebCore::AccessibilityRenderObject::stringValue):
- (WebCore::AccessibilityRenderObject::titleUIElement):
- (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
- * accessibility/AccessibilitySlider.cpp:
- (WebCore::AccessibilitySliderThumb::elementRect):
- * dom/InputElement.cpp:
- (WebCore::InputElement::updatePlaceholderVisibility):
- * dom/SelectElement.cpp:
- (WebCore::SelectElement::scrollToSelection):
- (WebCore::SelectElement::recalcStyle):
- (WebCore::SelectElement::setRecalcListItems):
- (WebCore::SelectElement::menuListDefaultEventHandler):
- (WebCore::SelectElement::listBoxDefaultEventHandler):
- * editing/BreakBlockquoteCommand.cpp:
- (WebCore::BreakBlockquoteCommand::doApply):
- * html/HTMLAppletElement.cpp:
- (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
- * html/HTMLCanvasElement.cpp:
- (WebCore::HTMLCanvasElement::reset):
- * html/HTMLEmbedElement.cpp:
- (WebCore::HTMLEmbedElement::updateWidget):
- * html/HTMLFrameElementBase.cpp:
- (WebCore::HTMLFrameElementBase::attach):
- * html/HTMLFrameSetElement.cpp:
- (WebCore::HTMLFrameSetElement::defaultEventHandler):
- * html/HTMLIFrameElement.cpp:
- (WebCore::HTMLIFrameElement::attach):
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::defaultEventHandler):
- (WebCore::HTMLInputElement::addSearchResult):
- (WebCore::HTMLInputElement::onSearch):
- * html/HTMLLIElement.cpp:
- (WebCore::HTMLLIElement::parseMappedAttribute):
- (WebCore::HTMLLIElement::attach):
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::setReadyState):
- (WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
- (WebCore::HTMLMediaElement::mediaPlayerSizeChanged):
- (WebCore::HTMLMediaElement::mediaPlayerRenderingCanBeAccelerated):
- (WebCore::HTMLMediaElement::mediaPlayerGraphicsLayer):
- (WebCore::HTMLMediaElement::defaultEventHandler):
- (WebCore::HTMLMediaElement::finishParsingChildren):
- * html/HTMLOListElement.cpp:
- (WebCore::HTMLOListElement::parseMappedAttribute):
- * html/HTMLObjectElement.cpp:
- (WebCore::HTMLObjectElement::updateWidget):
- * html/HTMLTextAreaElement.cpp:
- (WebCore::HTMLTextAreaElement::defaultEventHandler):
- * page/DragController.cpp:
- (WebCore::DragController::concludeEditDrag):
- * page/EventHandler.cpp:
- (WebCore::EventHandler::selectCursor):
- (WebCore::EventHandler::capsLockStateMayHaveChanged):
- * page/Frame.cpp:
- (WebCore::Frame::ownerRenderer):
- * page/FrameView.cpp:
- (WebCore::FrameView::detachCustomScrollbars):
- * page/wince/FrameWince.cpp:
- (WebCore::computePageRectsForFrame):
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::placeBoxesHorizontally):
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlTimelineElement::defaultEventHandler):
- * rendering/RenderBlockLineLayout.cpp:
- (WebCore::RenderBlock::findNextLineBreak):
- * rendering/RenderCounter.cpp:
- (WebCore::planCounter):
- * rendering/RenderFrameSet.cpp:
- (WebCore::RenderFrameSet::computeEdgeInfo):
- (WebCore::RenderFrameSet::setIsResizing):
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::contentsBox):
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::updateBacking):
- (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
- * rendering/RenderListItem.cpp:
- (WebCore::previousListItem):
- (WebCore::RenderListItem::explicitValueChanged):
- * rendering/RenderObject.cpp:
- (WebCore::updateListMarkerNumbers):
- * rendering/RenderObjectChildList.cpp:
- (WebCore::updateListMarkerNumbers):
- (WebCore::invalidateCountersInContainer):
- * rendering/RenderScrollbarTheme.cpp:
- (WebCore::RenderScrollbarTheme::minimumThumbLength):
- (WebCore::RenderScrollbarTheme::backButtonRect):
- (WebCore::RenderScrollbarTheme::forwardButtonRect):
- (WebCore::RenderScrollbarTheme::trackRect):
- (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
- (WebCore::RenderScrollbarTheme::paintScrollbarBackground):
- (WebCore::RenderScrollbarTheme::paintTrackBackground):
- (WebCore::RenderScrollbarTheme::paintTrackPiece):
- (WebCore::RenderScrollbarTheme::paintButton):
- (WebCore::RenderScrollbarTheme::paintThumb):
- * rendering/RenderSlider.cpp:
- (WebCore::SliderThumbElement::defaultEventHandler):
- * rendering/RenderThemeChromiumMac.mm:
- (WebCore::RenderThemeChromiumMac::paintSliderThumb):
- (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
- * rendering/RenderThemeChromiumWin.cpp:
- (WebCore::RenderThemeChromiumWin::determineSliderThumbState):
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderThemeMac::paintSliderThumb):
- * rendering/RenderThemeSafari.cpp:
- (WebCore::RenderThemeSafari::paintSliderThumb):
- * rendering/RenderThemeWin.cpp:
- (WebCore::RenderThemeWin::determineSliderThumbState):
- * rendering/SVGCharacterLayoutInfo.cpp:
- (WebCore::SVGCharacterLayoutInfo::addLayoutInformation):
- * rendering/SVGRootInlineBox.cpp:
- (WebCore::findSVGRootObject):
- * rendering/TextControlInnerElements.cpp:
- (WebCore::RenderTextControlInnerBlock::nodeAtPoint):
- (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
- * svg/SVGImageElement.cpp:
- (WebCore::SVGImageElement::attach):
- * svg/SVGMarkerElement.cpp:
- (WebCore::SVGMarkerElement::canvasResource):
- * svg/SVGTextContentElement.cpp:
- (WebCore::rootInlineBoxForTextContentElement):
- * wml/WMLInputElement.cpp:
- (WebCore::WMLInputElement::defaultEventHandler):
- Use checked casts.
-
- * rendering/RenderApplet.h:
- * rendering/RenderCounter.h:
- * rendering/RenderFieldset.h:
- * rendering/RenderFileUploadControl.h:
- * rendering/RenderFrame.h:
- * rendering/RenderFrameSet.h:
- * rendering/RenderHTMLCanvas.h:
- * rendering/RenderListBox.h:
- * rendering/RenderListItem.h:
- * rendering/RenderListMarker.h:
- * rendering/RenderMedia.h:
- * rendering/RenderMenuList.h:
- * rendering/RenderPart.h:
- * rendering/RenderPartObject.h:
- * rendering/RenderPath.h:
- * rendering/RenderSVGContainer.h:
- * rendering/RenderSVGRoot.h:
- * rendering/RenderSVGTextPath.h:
- * rendering/RenderSVGViewportContainer.h:
- * rendering/RenderScrollbar.h:
- * rendering/RenderSlider.h:
- * rendering/RenderTextControlMultiLine.h:
- * rendering/RenderTextControlSingleLine.h:
- * rendering/RenderVideo.h:
- Added a checked cast. Also made most members protected or private.
-
- * rendering/RenderBlock.h:
- * rendering/RenderInline.h:
- * rendering/RenderReplaced.h:
- * rendering/RenderSVGBlock.h:
- * rendering/RenderSVGImage.h:
- * rendering/RenderSVGInlineText.h:
- * rendering/RenderSVGText.h:
- * rendering/RenderTextControl.h:
- Made most members protected or private.
-
- * rendering/RenderInline.cpp:
- * rendering/RenderSVGContainer.cpp:
- * rendering/RenderSVGHiddenContainer.cpp:
- * rendering/RenderSVGImage.cpp:
- * rendering/RenderSVGRoot.cpp:
- Removed unneeded destructor.
-
- * rendering/RenderSVGHiddenContainer.h:
- Removed unneeded virtual function overrides that did the same as
- the default and base class.
-
- * rendering/RenderSVGViewportContainer.cpp:
- (WebCore::RenderSVGViewportContainer::paint): Updated to use m_viewport
- directly instead of using a function call.
- (WebCore::RenderSVGViewportContainer::applyViewportClip): Ditto.
- (WebCore::RenderSVGViewportContainer::viewportTransform): Ditto.
- (WebCore::RenderSVGViewportContainer::localToParentTransform): Ditto.
- (WebCore::RenderSVGViewportContainer::pointIsInsideViewportClip): Ditto.
-
- * rendering/RenderScrollbar.cpp:
- (WebCore::pseudoForScrollbarPart): Changed switch statement to use cases for
- all values instead of using a default case.
-
- * rendering/RenderTreeAsText.cpp:
- (WebCore::operator<<): Removed dependency on casting to types that don't
- have any public members we need to get at. Instead, use function names to
- identify the type rather than doing so much overloading. Changed to use
- checked casts.
- (WebCore::write): Ditto.
-
- * rendering/SVGRenderSupport.cpp:
- (WebCore::renderSubtreeToImage): Changed to use a checked cast and also
- added a comment about the fact that the code does not do sufficient type
- checking before doing the cast.
-
- * rendering/SVGRenderTreeAsText.cpp:
- (WebCore::writeRenderSVGTextBox): Renamed this from operator<<.
- (WebCore::writeSVGInlineTextBoxes): Renamed this from writeSVGInlineText.
- (WebCore::writeSVGText): Renamed this from write.
- (WebCore::writeSVGInlineText): Ditto.
- (WebCore::writeSVGImage): Ditto.
- * rendering/SVGRenderTreeAsText.h: Updated for name changes. Removed
- unneeded default arguments.
-
-2009-08-05 Peter Kasting <pkasting@google.com>
-
- Reviewed by Sam Weinig.
-
- https://bugs.webkit.org/show_bug.cgi?id=27851
- Fix a pair of compiler warnings on the GTK Linux buildbot.
-
- * platform/image-decoders/bmp/BMPImageDecoder.cpp:
- (WebCore::BMPImageDecoder::processFileHeader): Don't use multi-character constants, they're not portable.
- * platform/image-decoders/ico/ICOImageDecoder.cpp:
- (WebCore::ICOImageDecoder::setSize): Simpler code that also doesn't compare signed with unsigned.
-
-2009-08-05 Peter Kasting <pkasting@google.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26460
- Return multiple icon entries from the ICO decoder as separate frames,
- sorted by decreasing quality (much like the CG ICO decoder does).
-
- As a result of this change, we can eliminate the Skia-specific setData()
- hack that the Chromium port used to select the desired icon size -- now
- callers can just enumerate the frames and ask for the data from the one
- they like.
-
- Under the hood, the ICO decoder now keeps vectors for a number of things
- (including directory entries and image decoders) where it used to have
- single members. However, callers (that I have seen) will only request
- one frame from the icon, so practically there aren't going to be lots of
- instantiated image decoders.
-
- * platform/graphics/ImageSource.h: Move |m_decoder| back to private now that Skia no longer needs to access it.
- * platform/graphics/cairo/ImageSourceCairo.cpp:
- (WebCore::createDecoder): Remove size argument from ICO decoder instantiation.
- * platform/graphics/skia/ImageSourceSkia.cpp:
- (WebCore::createDecoder): Remove size argument from ICO decoder instantiation.
- (WebCore::ImageSource::setData): Remove function to ask for a particular icon size.
- * platform/graphics/skia/ImageSourceSkia.h: Removed.
- * platform/graphics/wx/ImageSourceWx.cpp:
- (WebCore::createDecoder): Remove size argument from ICO decoder instantiation.
- * platform/image-decoders/ico/ICOImageDecoder.cpp:
- (WebCore::ICOImageDecoder::ICOImageDecoder):
- (WebCore::ICOImageDecoder::~ICOImageDecoder): Delete all instantiated per-frame decoders.
- (WebCore::ICOImageDecoder::setData): Send data to all instantiated per-frame decoders.
- (WebCore::ICOImageDecoder::isSizeAvailable): Use size from icon directory instead of PNG decoder (if applicable) so we can report it without decoding the PNG frames.
- (WebCore::ICOImageDecoder::size): Report frame-specific size if BMP decoder is calling. Otherwise, use size from icon directory instead of PNG decoder (if applicable).
- (WebCore::ICOImageDecoder::frameSizeAtIndex): Implement.
- (WebCore::ICOImageDecoder::setSize): Sanity check value if BMP decoder is calling.
- (WebCore::ICOImageDecoder::frameCount): Implement.
- (WebCore::ICOImageDecoder::frameBufferAtIndex): Sanity check size for PNG frames.
- (WebCore::ICOImageDecoder::compareEntries): Add utility function for sorting entries.
- (WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex): Factor out utility function for passing correct data blob to a PNG decoder.
- (WebCore::ICOImageDecoder::decodeWithCheckForDataEnded): Split decode() into two pieces.
- (WebCore::ICOImageDecoder::decodeDirectory): The first part of the old decode().
- (WebCore::ICOImageDecoder::decodeAtIndex): The second part of the old decode(), split off so we avoid decoding an entry until it's requested.
- (WebCore::ICOImageDecoder::processDirectory): Add resizing of internal data structures based on directory contents.
- (WebCore::ICOImageDecoder::processDirectoryEntries): Sort entries by quality.
- (WebCore::ICOImageDecoder::imageTypeAtIndex): Return type to caller instead of setting a member.
- * platform/image-decoders/ico/ICOImageDecoder.h:
-
-2009-08-05 Szabo Carol <carol.szabo@nokia.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=27942
-
- Test: fast/forms/select-reset-multiple-selections-4-single-selection.html
-
- * dom/SelectElement.cpp:
- (WebCore::SelectElement::reset):
- Added HTML 4.01 compliant handling of broken webpages that
- specify more than one selected option for single selection SELECT
- element, in a manner that emulates Firefox and is similar to IE 7
-
-
-2009-08-05 Andras Becsi <becsi.andras@stud.u-szeged.hu>
-
- Reviewed by Simon Hausmann.
-
- WebCore.pro bugfix
-
- Fix the gperf lines to properly include the string.h header at compilation with gperf version 3.0.3 and newer.
-
- * WebCore.pro:
-
-2009-08-05 Chris Fleizach <cfleizach@apple.com>
-
- Fix Tiger build breakage.
-
- * accessibility/mac/AccessibilityObjectWrapper.mm:
-
-2009-08-04 Simon Hausmann <hausmann@webkit.org>
-
- Prospective build fix for Qt build bot: Fix dependency of HTMLNames.cpp
- to both source files, HTMLTagNames.in and HTMLAttributeNames.in
-
- * WebCore.pro:
-
-2009-08-04 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Adele Peterson.
-
- Keypress should exit from pan scrolling mode.
- https://bugs.webkit.org/show_bug.cgi?id=28005
-
- Change the logic from only exiting pan scrolling on escape to exiting on any key press,
- making it easier for users to back out of an accidental pan scroll.
-
- * page/EventHandler.cpp:
- (WebCore::EventHandler::keyEvent):
-
-2009-08-04 Eric Seidel <eric@webkit.org>
-
- Reviewed by Simon Fraser.
-
- REGRESSION (r45064): Drop caret remains in text control after the mouse exits
- https://bugs.webkit.org/show_bug.cgi?id=26787
-
- Add back missing dragController()->clear() call.
-
- * manual-tests/drag-caret.html: Added.
- * page/DragController.cpp:
- (WebCore::DragController::tryDocumentDrag):
-
-2009-08-04 Chris Fleizach <cfleizach@apple.com>
-
- Bug 27994 - WAI-ARIA: aria-valuetext needs to be implemented
- https://bugs.webkit.org/show_bug.cgi?id=27994
-
- Forgot to commit attribute names.
-
- * html/HTMLAttributeNames.in:
-
-2009-08-04 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- Bug 27994 - WAI-ARIA: aria-valuetext needs to be implemented
- https://bugs.webkit.org/show_bug.cgi?id=27994
-
- Test: platform/mac/accessibility/aria-valuetext.html
-
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::valueDescription):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::valueDescription):
- * accessibility/AccessibilityRenderObject.h:
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
- * html/HTMLAttributeNames.in:
-
-2009-08-04 Michael Nordman <michaeln@google.com>
-
- Reviewed by Alexey Proskuryakov.
-
- https://bugs.webkit.org/show_bug.cgi?id=27821
-
- No new features, no new tests. Existing layout tests pass.
-
- * WebCore.base.exp:
-
- Export AppliationCacheGroup::storeCopyOfCache
-
- * WebCore.xcodeproj/project.pbxproj:
-
- Restore DOMApplicationCache.h and ApplicationCacheHost.h to 'project' headers
- instead of 'private' headers since they're no longer in the DocumentLoader.h
- include graph.
-
- * html/HTMLHtmlElement.cpp:
- (WebCore::HTMLHtmlElement::insertedIntoDocument):
-
- Reinstate the test for manifest.isNull instead of .isEmtpty().
- Added a FIXME to revisit once the spec gets clarified.
-
- * loader/DocumentLoader.cpp:
- (WebCore::DocumentLoader::DocumentLoader):
- (WebCore::DocumentLoader::mainReceivedError):
- (WebCore::DocumentLoader::detachFromFrame):
- * loader/DocumentLoader.h:
- (WebCore::DocumentLoader::applicationCacheHost):
-
- ApplicationCacheHost is held in an OwnPtr<> by DocumentLoader. This was done
- for compile time friendliness, it results in a smaller include graph for files
- dependent on DocumentLoader.h.
-
- * loader/FrameLoader.cpp:
- * loader/MainResourceLoader.cpp:
- * loader/ResourceLoader.cpp:
-
- Cleanup ussage of ENABLE(xxx) around includes, generally remove those guards.
- This was done for readability at the include site. The included files contain appropriate guards,
- so they're not needed at the include site.
-
- * loader/appcache/ApplicationCacheGroup.cpp:
- (WebCore::ApplicationCacheGroup::selectCache):
- (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
- (WebCore::ApplicationCacheGroup::failedLoadingMainResource):
- (WebCore::ApplicationCacheGroup::update):
- (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
- (WebCore::ApplicationCacheGroup::manifestNotFound):
- (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
- (WebCore::ApplicationCacheGroup::startLoadingEntry):
- (WebCore::CallCacheListenerTask::create):
- (WebCore::CallCacheListenerTask::performTask):
- (WebCore::CallCacheListenerTask::CallCacheListenerTask):
- (WebCore::ApplicationCacheGroup::postListenerTask):
- * loader/appcache/ApplicationCacheGroup.h:
-
- Use ApplicationCachHost defined constants, no longer depends on DOMApplicationCache.
-
- * loader/appcache/ApplicationCacheHost.cpp:
- (WebCore::ApplicationCacheHost::ApplicationCacheHost):
- (WebCore::ApplicationCacheHost::setDOMApplicationCache):
- (WebCore::ApplicationCacheHost::notifyEventListener):
- (WebCore::ApplicationCacheHost::status):
- * loader/appcache/ApplicationCacheHost.h:
- (WebCore::ApplicationCacheHost::):
- * loader/appcache/ApplicationCacheStorage.cpp:
- (WebCore::ApplicationCacheStorage::storeCopyOfCache):
- * loader/appcache/ApplicationCacheStorage.h:
-
- Merge recently added transferApplicationCache and pre-existing storeCopyOfCache methods.
-
- * loader/appcache/DOMApplicationCache.cpp:
- (WebCore::DOMApplicationCache::status):
- (WebCore::DOMApplicationCache::addEventListener):
- (WebCore::DOMApplicationCache::removeEventListener):
- (WebCore::DOMApplicationCache::callListener):
- (WebCore::DOMApplicationCache::toEventType):
- (WebCore::DOMApplicationCache::toEventID):
- * loader/appcache/DOMApplicationCache.h:
- (WebCore::DOMApplicationCache::setAttributeEventListener):
- (WebCore::DOMApplicationCache::getAttributeEventListener):
- (WebCore::DOMApplicationCache::clearAttributeEventListener):
- (WebCore::DOMApplicationCache::callEventListener):
- (WebCore::DOMApplicationCache::setOnchecking):
- (WebCore::DOMApplicationCache::onchecking):
- (WebCore::DOMApplicationCache::setOnerror):
- (WebCore::DOMApplicationCache::onerror):
- (WebCore::DOMApplicationCache::setOnnoupdate):
- (WebCore::DOMApplicationCache::onnoupdate):
- (WebCore::DOMApplicationCache::setOndownloading):
- (WebCore::DOMApplicationCache::ondownloading):
- (WebCore::DOMApplicationCache::setOnprogress):
- (WebCore::DOMApplicationCache::onprogress):
- (WebCore::DOMApplicationCache::setOnupdateready):
- (WebCore::DOMApplicationCache::onupdateready):
- (WebCore::DOMApplicationCache::setOncached):
- (WebCore::DOMApplicationCache::oncached):
- (WebCore::DOMApplicationCache::setOnobsolete):
- (WebCore::DOMApplicationCache::onobsolete):
-
- Use ApplicationCachHost defined constants for Status and EventIDs.
-
-2009-08-04 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Revert r46421 and r46769, which appear to have totally hosed the v8 bindings.
-
- https://bugs.webkit.org/show_bug.cgi?id=27719
-
- * bindings/v8/V8AbstractEventListener.cpp: Revert r46421.
- (WebCore::V8AbstractEventListener::invokeEventHandler):
- * bindings/v8/custom/V8DOMWindowCustom.cpp: Revert r46769.
- (WebCore::ACCESSOR_GETTER):
-
-2009-08-04 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- Bug 27993 - AXSliders are missing required attributes and actions
- https://bugs.webkit.org/show_bug.cgi?id=27993
-
- Expose appropriate actions and attributes for sliders.
-
- Test: platform/mac/accessibility/slider-supports-actions.html
-
- * accessibility/AccessibilityObject.cpp:
- (WebCore::AccessibilityObject::orientation):
- * accessibility/AccessibilityObject.h:
- (WebCore::):
- * accessibility/AccessibilitySlider.cpp:
- (WebCore::AccessibilitySlider::orientation):
- * accessibility/AccessibilitySlider.h:
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper accessibilityActionNames]):
- (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
- (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
-
-2009-08-04 Jian Li <jianli@chromium.org>
-
- Reviewed by David Levin.
-
- [V8] Fix an assert in WebCoreStringResource that causes worker script
- evaluation failed.
- https://bugs.webkit.org/show_bug.cgi?id=27996
-
- The fix is to check for the same thread, instead of the main thread.
- This is because Chromium's workers use v8 in a single thread that is
- not the main thread.
-
- * bindings/v8/V8Binding.cpp:
- (WebCore::WebCoreStringResource::WebCoreStringResource):
- (WebCore::WebCoreStringResource::~WebCoreStringResource):
- (WebCore::WebCoreStringResource::atomicString):
-
-2009-08-04 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt.
-
- Add support for transitions/animations of text-indent.
-
- Test: transitions/text-indent-transition.html
-
- * page/animation/AnimationBase.cpp:
- (WebCore::ensurePropertyMap):
-
-2009-08-04 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt.
-
- Add support for transitions of min- and max-width, and min- and max-height.
- https://bugs.webkit.org/show_bug.cgi?id=27990
-
- Test: transitions/min-max-width-height-transitions.html
-
- * page/animation/AnimationBase.cpp:
- (WebCore::ensurePropertyMap):
-
-2009-08-04 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- Bug 27964 - WAI-ARIA: radio button does not determine its label from text content
- https://bugs.webkit.org/show_bug.cgi?id=27964
-
- ARIA radio buttons also need to use the text inside of them, like buttons and other roles.
- Also fixed an issue where an extra space was being appended to some ARIA labels.
-
- Test: platform/mac/accessibility/aria-radiobutton-text.html
-
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::ariaAccessibilityName):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::ariaAccessibilityName):
- (WebCore::AccessibilityRenderObject::ariaLabeledByAttribute):
- (WebCore::AccessibilityRenderObject::title):
- (WebCore::AccessibilityRenderObject::ariaDescribedByAttribute):
- * accessibility/AccessibilityRenderObject.h:
-
-2009-08-04 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Missed a place that expects window.event to be hidden when it shouldn't be.
-
- https://bugs.webkit.org/show_bug.cgi?id=27719
-
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::ACCESSOR_GETTER): window.event is no longer hidden.
-
-2009-08-03 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Jon Honeycutt.
-
- Bug 27958 - WAI-ARIA: Implement 'aria-required' attribute.
- https://bugs.webkit.org/show_bug.cgi?id=27958
-
- Test: platform/mac/accessibility/aria-required.html
-
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::isRequired):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::isRequired):
- * accessibility/AccessibilityRenderObject.h:
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
- (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
- * html/HTMLAttributeNames.in:
-
-2009-08-04 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Simon Hausmann.
-
- Add QWebPluginDatabase API to the Qt API.
-
- https://bugs.webkit.org/show_bug.cgi?id=27651
-
- * WebCore.pro:
-
-2009-08-04 Ariya Hidayat <ariya.hidayat@nokia.com>
-
- Reviewed by Adam Treat.
-
- [Qt] PlusDarker is not supported. Fall back to CompositionMode_Darken
- (as it is the closest match) instead of CompositionMode_SourceOver.
-
- * platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::toQtCompositionMode):
-
-2009-08-04 Christian Plesner Hansen <christian.plesner.hansen@gmail.com>
-
- Reviewed by Adam Barth.
-
- [v8] Fix crash when converting empty v8 string to atomic webkit string.
- https://bugs.webkit.org/show_bug.cgi?id=27975
-
- collection-null-like-arguments.html tests for this.
-
- * bindings/v8/V8Binding.cpp:
- (WebCore::v8StringToAtomicWebCoreString):
-
-2009-08-04 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Eric Seidel.
-
- selectionHasStyle needs clean up to fix Bug 27858
- https://bugs.webkit.org/show_bug.cgi?id=27865
-
- This patch cleans up selectionStartHasStyle and selectionHasStyle.
- No test is added because the patch does not change any behavior.
-
- * editing/ApplyStyleCommand.cpp:
- (WebCore::getPropertiesNotInComputedStyle): Used in triStateOfStyleInComputedStyle but will be used here as well
- * editing/ApplyStyleCommand.h: Added the prototype of getPropertiesNotInComputedStyle
- * editing/Editor.cpp:
- (WebCore::triStateOfStyleInComputedStyle): Determines if the specified style is present in the specified computed style.
- (WebCore::Editor::selectionStartHasStyle): Uses triStateOfStyleInComputedStyle
- (WebCore::Editor::selectionHasStyle): Uses triStateOfStyleInComputedStyle instead of updateState
-
-2009-08-03 John Abd-El-Malek <jam@chromium.org>
-
- Reviewed by David Levin.
-
- Fix MessagePort construction in worker process. Also make the other object constructions match this.
-
- https://bugs.webkit.org/show_bug.cgi?id=27906
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::convertToV8Object):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::setDOMException):
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::WorkerContextExecutionProxy::ToV8Object):
-
-2009-08-03 Christian Plesner Hansen <christian.plesner.hansen@gmail.com>
-
- Reviewed by David Levin.
-
- [V8] Cache atomic strings in externalized v8 strings
- https://bugs.webkit.org/show_bug.cgi?id=27762
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/V8Binding.cpp:
- (WebCore::WebCoreStringResource::WebCoreStringResource):
- (WebCore::WebCoreStringResource::~WebCoreStringResource):
- (WebCore::WebCoreStringResource::data):
- (WebCore::WebCoreStringResource::length):
- (WebCore::WebCoreStringResource::webcoreString):
- (WebCore::WebCoreStringResource::atomicString):
- (WebCore::WebCoreStringResource::toStringResource):
- (WebCore::v8StringToWebCoreString):
- (WebCore::v8StringToAtomicWebCoreString):
- (WebCore::v8ValueToWebCoreString):
- (WebCore::v8ValueToAtomicWebCoreString):
- * bindings/v8/V8Binding.h:
- (WebCore::):
- * dom/Document.idl:
-
-2009-08-03 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: DOM Storage Live Updating Should Not Affect Tabbing
- https://bugs.webkit.org/show_bug.cgi?id=27957
-
- * inspector/front-end/DOMStorageDataGrid.js:
- (WebInspector.DOMStorageDataGrid.prototype._startEditingColumnOfDataGridNode): disable storage event listener
- (WebInspector.DOMStorageDataGrid.prototype._startEditing): disable storage event listener
- (WebInspector.DOMStorageDataGrid.prototype._editingCancelled): enable storage event listener
- * inspector/front-end/DatabasesPanel.js:
- (WebInspector.DatabasesPanel.prototype._unregisterStorageEventListener): quick return if no listener
-
-2009-08-03 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Eric Seidel.
-
- [Qt] Consolidate common gcc flags to WebKit.pri
- https://bugs.webkit.org/show_bug.cgi?id=27934
-
- * WebCore.pro:
-
-2009-08-03 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Chromium code sometimes isn't sandboxed and needs to access the FS.
- https://bugs.webkit.org/show_bug.cgi?id=27954
-
- These changes are the WebKit side of http://codereview.chromium.org/159778 which
- aims to make LocalStorage persistent.
-
- This change runs all FileSystem routines through the ChromiumBridge so that
- WebKitClients can handle them if they choose to. For now, the only such client
- will be the one running in the browser process.
-
- It also adds a method called sandboxEnabled to the Chromium bridge so that the
- SQLite file system code can shift its behavior depending on whether we're
- inside a sandbox or not.
-
- * platform/chromium/ChromiumBridge.h:
- * platform/chromium/FileSystemChromium.cpp:
- (WebCore::deleteFile):
- (WebCore::deleteEmptyDirectory):
- (WebCore::getFileModificationTime):
- (WebCore::directoryName):
- (WebCore::pathByAppendingComponent):
- (WebCore::makeAllDirectories):
- (WebCore::fileExists):
- * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
- (WebCore::SQLiteFileSystem::openDatabase):
- * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
- (WebCore::SQLiteFileSystem::registerSQLiteVFS):
-
-2009-08-03 Alpha Lam <hclam@chromium.org>
-
- Reviewed by David Levin.
-
- [chromium] Implement media slider for chromium
- https://bugs.webkit.org/show_bug.cgi?id=27859
-
- Implemented the media slider for chromium port. The implementation
- is using Skia for drawing the thumb and buffered region instead of
- using any native system controls so different platforms would have
- the same look and feel.
-
- No new tests because this is covered by existing tests.
-
- * css/mediaControlsChromium.css:
- * rendering/RenderThemeChromiumSkia.cpp:
- * rendering/RenderThemeChromiumSkia.h:
- * rendering/RenderThemeChromiumWin.cpp:
-
-2009-07-27 Peter Kasting <pkasting@google.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26460
- Plumbing and cleanup in advance of returning multiple frames from the
- ICOImageDecoder:
- * Make ImageDecoder::frameCount() return a size_t like
- ImageSource::frameCount() and BitmapImage::frameCount() already do.
- * Add ImageDecoder::frameSizeAtIndex() alongside size(), to report the
- size of a particular frame. Hook all the
- ImageSource::frameSizeAtIndex() implementations to this. No
- ImageDecoder implements this yet; that will come in my next change.
-
- * platform/graphics/cairo/ImageSourceCairo.cpp:
- (WebCore::ImageSource::frameSizeAtIndex): Hook to ImageDecoder function.
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoderQt::frameCount): returns size_t.
- * platform/graphics/qt/ImageDecoderQt.h: frameCount() returns size_t.
- * platform/graphics/qt/ImageSourceQt.cpp:
- (WebCore::ImageSource::frameSizeAtIndex): Hook to ImageDecoder function.
- * platform/graphics/skia/ImageSourceSkia.cpp:
- (WebCore::ImageSource::frameSizeAtIndex): Hook to ImageDecoder function.
- * platform/graphics/win/ImageCGWin.cpp:
- (WebCore::BitmapImage::drawFrameMatchingSourceSize): frameCount() returns size_t.
- * platform/graphics/win/ImageCairoWin.cpp:
- (WebCore::BitmapImage::drawFrameMatchingSourceSize): frameCount() returns size_t.
- * platform/graphics/wx/ImageSourceWx.cpp:
- (WebCore::ImageSource::frameSizeAtIndex): Hook to ImageDecoder function.
- * platform/image-decoders/ImageDecoder.h:
- (WebCore::ImageDecoder::size): Clarify comment.
- (WebCore::ImageDecoder::frameSizeAtIndex): Add.
- (WebCore::ImageDecoder::frameCount): returns size_t.
- (WebCore::ImageDecoder::frameBufferAtIndex): Remove unneeded param name.
- * platform/image-decoders/gif/GIFImageDecoder.cpp:
- (WebCore::GIFImageDecoder::frameCount): returns size_t.
- (WebCore::GIFImageDecoder::frameBufferAtIndex): frameCount() returns size_t.
- * platform/image-decoders/gif/GIFImageDecoder.h: frameCount() returns size_t.
-
-2009-08-03 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Darin Adler.
-
- Fix a bug that could cause an ASSERT to fail incorrectly, leading
- to a renderer crash in Chromium.
-
- https://bugs.webkit.org/show_bug.cgi?id=27947
-
- All tests in storage/ pass.
-
- * platform/sql/SQLiteTransaction.cpp:
- (WebCore::SQLiteTransaction::~SQLiteTransaction):
- (WebCore::SQLiteTransaction::begin):
-
-2009-08-03 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Simon Hausmann.
-
- Based on work by Yael Aharon.
-
- Implement keyboard event forwarding for windowless plugins
- for the Qt port.
-
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::dispatchNPEvent):
- (WebCore::setSharedXEventFields):
- (WebCore::setXKeyEventSpecificFields):
- (WebCore::PluginView::handleKeyboardEvent):
- (WebCore::PluginView::handleMouseEvent):
-
-2009-08-03 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: Make Bottom "Drawer" More Extensible To Support Other Views
- https://bugs.webkit.org/show_bug.cgi?id=27928
-
- * English.lproj/localizedStrings.js:
-
- "Show changes view", "Hide changes view", "Clear changes log", "%d style change", "%d style changes"
-
- * inspector/front-end/ChangesView.js: Added.
- (WebInspector.ChangesView):
- (WebInspector.ChangesView.prototype._clearButtonClicked):
- (WebInspector.ChangesView.prototype._toggleChangesButtonClicked):
- (WebInspector.ChangesView.prototype.attach):
- (WebInspector.ChangesView.prototype.show):
- (WebInspector.ChangesView.prototype.hide):
-
- To be a new view to show Changes made via the inspector. DOM, CSS, or otherwise.
-
- * inspector/front-end/Console.js: Removed.
-
- Sliding View aspect moved to Drawer.js. The "console" itself has moved to ConsoleView.js
-
- * inspector/front-end/ConsoleView.js: Added.
-
- Little has changed from its move from Console.js other then support for working with the Drawer.
-
- * inspector/front-end/Drawer.js: Added.
- (WebInspector.Drawer):
- (WebInspector.Drawer.prototype.get visibleView):
- (WebInspector.Drawer.prototype.set visibleView):
- (WebInspector.Drawer.prototype.show.animationFinished):
- (WebInspector.Drawer.prototype.show):
- (WebInspector.Drawer.prototype.hide.animationFinished):
- (WebInspector.Drawer.prototype.hide):
- (WebInspector.Drawer.prototype._safelyRemoveChildren):
- (WebInspector.Drawer.prototype._startStatusBarDragging):
- (WebInspector.Drawer.prototype._statusBarDragging):
- (WebInspector.Drawer.prototype._endStatusBarDragging):
-
- Allow for multiple views inside the Sliding Drawer.
-
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel):
- (WebInspector.ElementsPanel.prototype.renameSelector):
- (WebInspector.ElementsPanel.prototype.addStyleChange):
- (WebInspector.ElementsPanel.prototype.removeStyleChange):
- (WebInspector.ElementsPanel.prototype.generateStylesheet):
-
- Starting work on the "Changes" Panel. The ability to generate a Stylesheet from Styles added via the Inspector.
-
- * inspector/front-end/Images/styleIcon.png: Added.
-
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylePropertiesSection.prototype.isInspectorStylesheet):
- (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
- (WebInspector.BlankStylePropertiesSection.prototype.makeNormal):
- (WebInspector.StylePropertyTreeElement.prototype):
-
- Interface with ElementsPanel for generating a Stylesheet of Changes.
-
- * inspector/front-end/WebKit.qrc:
- * inspector/front-end/inspector.css: Refactored to allow for multiple views in the drawer.
- * inspector/front-end/inspector.html: Refactored to allow for multiple views in the drawer.
-
- * inspector/front-end/inspector.js:
- (WebInspector.get styleChanges):
- (WebInspector.set styleChanges):
- (WebInspector._updateChangesCount):
- (WebInspector.loaded):
- (WebInspector.documentKeyDown):
- (WebInspector.showConsole):
- (WebInspector.showChanges):
-
- Support for the drawer and "styles changed icon" similar to the "errors and warnings" icons.
-
-2009-08-03 Dean McNamee <deanm@chromium.org>
-
- Reviewed by Adam Barth.
-
- Correct an assert on a PassRefPtr in the v8 svg bindings.
- https://bugs.webkit.org/show_bug.cgi?id=27951
-
- * bindings/v8/V8SVGPODTypeWrapper.h:
- (WebCore::V8SVGDynamicPODTypeWrapper::V8SVGDynamicPODTypeWrapper):
-
-2009-08-03 Dirk Pranke <dpranke@chromium.org>
-
- Reviewed by Sam Weinig.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=27748
- crash w/ stack overflow when same CSS file loaded repeatedly
-
- Fix crash caused by a stack overflow when repeatedly loading very large
- CSS files. CSSRuleData in CSSStyleSelector.h destroyed itself
- recursively rather than iteratively.
-
- Test: fast/css/large-list-of-rules-crash.html
-
- * css/CSSStyleSelector.h:
- (WebCore::CSSRuleData::~CSSRuleData):
- (WebCore::CSSRuleDataList::~CSSRuleDataList):
-
-2009-08-03 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Make the DRT APIs to pause transitions and animations work for accelerated animations
- <https://bugs.webkit.org/show_bug.cgi?id=27627>
- <rdar://problem/6442932>
-
- Fix the 'pauseAnimationAtTimeOnElementWithId' and 'pauseTransitionAtTimeOnElementWithId' APIs
- available to LayoutTests to work with accelerated animations and transitions. Done by sending
- the pause time down to the GraphicsLayer, and using it to stop time on the layer.
-
- I also added an assertion to check that the animation has actually started when we
- try to pause it, to check that the pause time we compute is valid. This revealed a number
- of tests that tried to pause before animations started, required some amount of test fixing.
-
- * page/animation/AnimationBase.cpp:
- (WebCore::AnimationBase::freezeAtTime):
- * page/animation/AnimationBase.h:
- * page/animation/CompositeAnimation.cpp:
- (WebCore::CompositeAnimation::pauseAnimationAtTime):
- (WebCore::CompositeAnimation::pauseTransitionAtTime):
- * platform/graphics/GraphicsLayer.cpp:
- (WebCore::GraphicsLayer::suspendAnimations):
- * platform/graphics/GraphicsLayer.h:
- * platform/graphics/mac/GraphicsLayerCA.h:
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayerCA::suspendAnimations):
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::suspendAnimations):
- * rendering/RenderLayerBacking.h:
-
-2009-08-03 Tony Chang <tony@chromium.org>
-
- Reviewed by Darin Adler.
-
- Fix Chromium build by removing PluginView.h from Page.cpp.
- Chromium doesn't use PluginView and the pointer is never
- dereferenced so the header doesn't need to be included.
- https://bugs.webkit.org/show_bug.cgi?id=27946
-
- No new tests because this is a build fix.
-
- * page/Page.cpp:
-
-2009-08-03 Eric Carlson <eric.carlson@apple.com>
-
- One more build fix after https://bugs.webkit.org/show_bug.cgi?id=46720.
-
- Unreviewed.
-
- * WebCoreSources.bkl:
-
-2009-08-03 Eric Carlson <eric.carlson@apple.com>
-
- Build fix after https://bugs.webkit.org/show_bug.cgi?id=46720.
-
- Unreviewed.
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
-
-2009-08-03 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- Bug 27943: Need to implement ARIA role="radiogroup"
- https://bugs.webkit.org/show_bug.cgi?id=27943
-
- Test: platform/mac/accessibility/aria-radiogroup.html
-
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::isRadioGroup):
- (WebCore::AccessibilityObject::selectedRadioButton):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::selectedRadioButton):
- (WebCore::RoleEntry::):
- * accessibility/AccessibilityRenderObject.h:
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper roleDescription]):
- (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
-
-2009-08-03 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Eric Seidel.
-
- HTMLInputElement is not controllable by assistive technologies
- https://bugs.webkit.org/show_bug.cgi?id=27941
-
- Test: accessibility/input-slider.html
-
- * WebCore.xcodeproj/project.pbxproj:
- Add AccessibilitySlider.cpp/.h
-
- * accessibility/AXObjectCache.cpp:
- (WebCore::AXObjectCache::getOrCreate):
- Create AccessibilitySlider and AccessibilitySliderThumb.
-
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::increment):
- (WebCore::AccessibilityObject::decrement):
- Add default, do nothing, base class methods.
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::canSetFocusAttribute):
- Correct typo.
-
- * accessibility/AccessibilitySlider.cpp: Added.
- (WebCore::AccessibilitySlider::AccessibilitySlider):
- (WebCore::AccessibilitySlider::create):
- (WebCore::AccessibilitySlider::children):
- (WebCore::AccessibilitySlider::addChildren):
- (WebCore::AccessibilitySlider::getAttribute):
- (WebCore::AccessibilitySlider::valueForRange):
- (WebCore::AccessibilitySlider::maxValueForRange):
- (WebCore::AccessibilitySlider::minValueForRange):
- (WebCore::AccessibilitySlider::changeValue):
- (WebCore::AccessibilitySlider::setValue):
- (WebCore::AccessibilitySlider::increment):
- (WebCore::AccessibilitySlider::decrement):
- (WebCore::AccessibilitySlider::element):
- (WebCore::AccessibilitySliderThumb::AccessibilitySliderThumb):
- (WebCore::AccessibilitySliderThumb::create):
- (WebCore::AccessibilitySliderThumb::elementRect):
- (WebCore::AccessibilitySliderThumb::size):
- * accessibility/AccessibilitySlider.h: Added.
- (WebCore::AccessibilitySlider::~AccessibilitySlider):
- (WebCore::AccessibilitySlider::roleValue):
- (WebCore::AccessibilitySlider::accessibilityIsIgnored):
- (WebCore::AccessibilitySlider::isSlider):
- (WebCore::AccessibilitySlider::canSetValueAttribute):
- (WebCore::AccessibilitySliderThumb::~AccessibilitySliderThumb):
- (WebCore::AccessibilitySliderThumb::roleValue):
- (WebCore::AccessibilitySliderThumb::accessibilityIsIgnored):
- (WebCore::AccessibilitySliderThumb::setParentObject):
- (WebCore::AccessibilitySliderThumb::parentObject):
-
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (RoleEntry::):
- SliderThumbRole -> NSAccessibilityValueIndicatorRole
- (-[AccessibilityObjectWrapper roleDescription]):
- Return role description for NSAccessibilitySliderRole and NSAccessibilityValueIndicatorRole.
- (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
- Minor coding style correction.
- (-[AccessibilityObjectWrapper accessibilityPerformPressAction]):
- If attachement view handles press action, don't also call object wrapper.
- (-[AccessibilityObjectWrapper accessibilityPerformIncrementAction]):
- New, call object's increment() method.
- (-[AccessibilityObjectWrapper accessibilityPerformDecrementAction]):
- New, call object's decrement() method.
- (-[AccessibilityObjectWrapper accessibilityPerformAction:]):
- Respond to NSAccessibilityIncrementAction and NSAccessibilityDecrementAction.
-
- * rendering/RenderSlider.cpp:
- (WebCore::RenderSlider::thumbRect):
- Factor logic out of layout so AccessibilitySliderThumb can get thumb location/size.
- (WebCore::RenderSlider::layout):
- Move code to thumbRect().
- * rendering/RenderSlider.h:
-
-2009-08-03 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Eric Seidel.
-
- Build fix if Netscape plugin support is turned off
- https://bugs.webkit.org/show_bug.cgi?id=27940
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::stop): Do not call NPN_MemFree if NPAPI is
- disabled
- * plugins/PluginViewNone.cpp:
- (WebCore::PluginView::platformStart): Empty stub.
-
-2009-07-31 Joe Mason <joe.mason@torchmobile.com>
-
- Reviewed by George Staikos.
-
- WINCE port: LOAD_WITH_ALTERED_SEARCH_PATH param of LoadLibraryEx not supported on WINCE
- https://bugs.webkit.org/show_bug.cgi?id=27917
-
- * plugins/win/PluginPackageWin.cpp:
- (WebCore::PluginPackage::load): use LoadLibrary instead of LoadLibraryEx
-
-2009-08-02 Adam Barth <abarth@webkit.org>
- Reviewed by Darin Adler.
-
- SVGElementInstance::scriptExecutionContext should call document() instead of scriptExecutionContext()
-
- https://bugs.webkit.org/show_bug.cgi?id=27932
-
- There's no reason to pay for a virtual function call in this case. We
- can just call document() directly because we know that element is a
- Node*.
-
- * svg/SVGElementInstance.cpp:
- (WebCore::SVGElementInstance::scriptExecutionContext):
-
-2009-08-02 Adam Barth <abarth@webkit.org>
-
- Reviewed by Darin Adler.
-
- JSNodeCustom should call document() instead of scriptExecutionContext()
- https://bugs.webkit.org/show_bug.cgi?id=27931
-
- We want to call document() because it's in inline function, instead of
- scriptExecutionContext() because it's a virtual function. If we have a
- Node*, then we know that the virtual function will always return the
- document anyway.
-
- There are more instance of this bug, but I'd like to start with a small
- patch and work up.
-
- * bindings/js/JSDOMGlobalObject.cpp:
- (WebCore::toJSDOMGlobalObject):
- * bindings/js/JSDOMGlobalObject.h:
- * bindings/js/JSNodeCustom.cpp:
- (WebCore::JSNode::addEventListener):
- (WebCore::JSNode::removeEventListener):
-
-2009-08-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Anders Carlsson.
-
- Share implementation of PluginView::userAgent() and userAgentStatic()
-
- https://bugs.webkit.org/show_bug.cgi?id=27706
-
- Differences to the original implementation are as follows:
-
- - The Win port used to return 0 for userAgentStatic, but now
- returns the quirk mode MozillaUserAgent as the other ports.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::userAgent):
- (WebCore::PluginView::userAgentStatic):
- * plugins/PluginViewNone.cpp:
- * plugins/gtk/PluginViewGtk.cpp:
- * plugins/mac/PluginViewMac.cpp:
- * plugins/qt/PluginViewQt.cpp:
- * plugins/win/PluginViewWin.cpp:
-
-2009-07-27 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Anders Carlsson.
-
- Unregister plugin from PluginMainThreadScheduler if NPP_New fails
-
- https://bugs.webkit.org/show_bug.cgi?id=27706
-
- Since the plugin has not been started yet (m_isStarted is not set),
- calling stop() will not have any affect, so we manually unregister
- in start() before returning.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::start):
-
-2009-07-27 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Anders Carlsson.
-
- Join the various versions of PluginView::stop() into one shared implementation
-
- https://bugs.webkit.org/show_bug.cgi?id=27706
-
- The platform-dependent bits are now ifdef'ed in the shared implementation,
- using the XP_ defines (XP_WIN, XP_MACOSX, XP_UNIX) from npapi.h
-
- Differences to the original implementation are as follows:
-
- - The Qt port unregistered the plugin before calling NP_SetWindow
- with a 0 window handle. Now it's done after (similar to Win)
-
- - The GTK and Qt ports unregistered the plugin before clearing
- the m_npWindow.ws_info struct. Now it's done after.
-
- - The Win port constructed the DropAllLocks after unsubclassing
- the window. Now it's done before.
-
- - The Mac, Qt, and GTK ports did not pass a NPSavedData struct
- to NP_Destroy (like the Win port). Now all ports do.
-
- - The Win port did not call PluginView::setCurrentPluginView()
- before calling to NP-functions. Now it does.
-
- * plugins/PluginView.cpp:
- * plugins/PluginViewNone.cpp:
- * plugins/gtk/PluginViewGtk.cpp:
- * plugins/mac/PluginViewMac.cpp:
- * plugins/qt/PluginViewQt.cpp:
- * plugins/win/PluginViewWin.cpp:
-
-2009-07-30 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: let me *edit* css styles in the web inspector.
- https://bugs.webkit.org/show_bug.cgi?id=27124
-
- * English.lproj/localizedStrings.js:
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel): added property stylesheet pointing to 1 stylesheet added to the page if needed
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylesSidebarPane.prototype.update): handle blank sections
- (WebInspector.StylesSidebarPane.prototype.addBlankSection): blank section in the correct position
- (WebInspector.StylesSidebarPane.prototype.appropriateSelectorForNode): helper to get a nice selector for the selectd node
- (WebInspector.StylePropertiesSection):
- (WebInspector.StylePropertiesSection.prototype.expand):
- (WebInspector.StylePropertiesSection.prototype.isPropertyInherited):
- (WebInspector.StylePropertiesSection.prototype.isPropertyOverloaded):
- (WebInspector.StylePropertiesSection.prototype.addNewBlankProperty):
- (WebInspector.StylePropertiesSection.prototype._dblclickEmptySpace): easily create new properties
- (WebInspector.StylePropertiesSection.prototype._dblclickSelector):
- (WebInspector.StylePropertiesSection.prototype.startEditingSelector): allow for editing selectors
- (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
- (WebInspector.StylePropertiesSection.prototype.editingSelectorCancelled):
- (WebInspector.StylePropertiesSection.prototype._doesSelectorAffectSelectedNode): helper to check if a selector applies to the selected node
- (WebInspector.BlankStylePropertiesSection.prototype._dblclick):
- (WebInspector.BlankStylePropertiesSection.prototype.startEditing):
- (WebInspector.BlankStylePropertiesSection.prototype.editingCancelled):
- (WebInspector.BlankStylePropertiesSection.prototype.editingCommitted):
- (WebInspector.BlankStylePropertiesSection.prototype.makeNormal): morph into a StylePropertiesSection
- (WebInspector.StylePropertyTreeElement.prototype):
- (WebInspector.StylePropertyTreeElement.prototype.):
- * inspector/front-end/inspector.css:
-
-2009-07-31 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Adam Barth.
-
- [v8] check if proxy is present before invoking a handler
- https://bugs.webkit.org/show_bug.cgi?id=27883
-
- Do not invoke handler function if proxy is null pointer (that would lead to access violation
- anyway)
-
- * bindings/v8/custom/V8CustomEventListener.cpp:
- (WebCore::V8EventListener::callListenerFunction):
-
-2009-08-01 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Reimplement Elements Panel so that its
- interaction with DOM is serialized.
-
- This is a first cut wuth read support for DOM elements
- tree as well as some limited editing. No properties, no
- styles, no search capabilities are implemented yet.
- Set Preferences.useDOMAgent to true in order to try it
- out, otherwise disabled by default.
-
- https://bugs.webkit.org/show_bug.cgi?id=27771
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * inspector/InspectorBackend.cpp:
- (WebCore::InspectorBackend::getChildNodes):
- (WebCore::InspectorBackend::setAttribute):
- (WebCore::InspectorBackend::removeAttribute):
- (WebCore::InspectorBackend::setTextNodeValue):
- * inspector/InspectorBackend.h:
- * inspector/InspectorBackend.idl:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::windowScriptObjectAvailable):
- (WebCore::InspectorController::setFrontendProxyObject):
- (WebCore::InspectorController::close):
- (WebCore::InspectorController::populateScriptObjects):
- (WebCore::InspectorController::didCommitLoad):
- * inspector/InspectorController.h:
- (WebCore::InspectorController::domAgent):
- * inspector/InspectorDOMAgent.cpp: Added.
- * inspector/InspectorDOMAgent.h: Added.
- * inspector/InspectorFrontend.cpp:
- * inspector/InspectorFrontend.h:
- * inspector/front-end/Callback.js: Added.
- * inspector/front-end/DOMAgent.js: Added.
- * inspector/front-end/ElementsPanel.js:
- * inspector/front-end/WebKit.qrc:
- * inspector/front-end/inspector.html:
- * inspector/front-end/inspector.js:
- (WebInspector.loaded):
-
-2009-08-01 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Adele Peterson.
-
- isContentEditable function in htmlediting.* must be removed
- https://bugs.webkit.org/show_bug.cgi?id=27870
-
- This patch removes isContentEditable function in htmlediting.cpp and
- replaces all usage by calling Node::isContentEditable or its derivatives.
-
- * editing/AppendNodeCommand.cpp: ditto
- (WebCore::AppendNodeCommand::AppendNodeCommand): ditto
- * editing/IndentOutdentCommand.cpp: ditto
- (WebCore::IndentOutdentCommand::outdentParagraph): ditto
- * editing/InsertNodeBeforeCommand.cpp: ditto
- (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand): ditto
- * editing/htmlediting.cpp: ditto
- (WebCore::enclosingNodeWithTag): ditto
- (WebCore::enclosingNodeOfType): ditto
- (WebCore::canMergeLists): ditto
- * editing/htmlediting.h: Updated prototype
-
-2009-08-01 John Abd-El-Malek <jam@chromium.org>
-
- Reviewed by Adam Barth.
-
- Fix a message port handle always getting marked as reachable once it gets entangled.
-
- https://bugs.webkit.org/show_bug.cgi?id=27824
-
- No tests since this only arises with the Chromium multi-process message port implementation
- which isn't in this repostiory.
-
- * bindings/v8/V8GCController.cpp:
- (WebCore::GCEpilogueVisitor::visitDOMWrapper):
-
-2009-07-31 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Adam Barth.
-
- Fix Geolocation permission problem
- https://bugs.webkit.org/show_bug.cgi?id=26993
-
- * page/Geolocation.cpp:
- (WebCore::Geolocation::requestPermission):
-
-2009-07-31 Norbert Leser <norbert.leser@nokia.com>
-
- Reviewed by Eric Seidel.
-
- Added project properties as needed by symbian platform
-
- * WebCore.pro:
-
-2009-07-31 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Holger Freyther.
-
- Fix compiler warning.
-
- Initialize member variables in the correct order.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::PluginView):
-
-2009-07-31 Jon Honeycutt <jhoneycutt@apple.com>
-
- Windows build fix!
-
- Unreviewed.
-
- * page/win/PageWin.cpp:
-
-2009-07-31 Jon Honeycutt <jhoneycutt@apple.com>
-
- Mac build fix.
-
- Unreviewed.
-
- * page/Page.cpp:
- Move setCanStartPlugins() from here...
- * page/win/PageWin.cpp:
- (WebCore::Page::setCanStartPlugins):
- ... to here.
-
-2009-07-29 Jon Honeycutt <jhoneycutt@apple.com>
-
- <rdar://problem/5698113> Safari shouldn't auto-activate plug-ins in
- background tabs (make Win consistent with Mac)
-
- https://bugs.webkit.org/show_bug.cgi?id=27855
-
- Reviewed by Anders Carlsson.
-
- * loader/FrameLoaderClient.h:
- (WebCore::FrameLoaderClient::dispatchDidFailToStartPlugin):
- Declare a new function to dispatch failures to start plug-ins.
-
- * page/Page.cpp:
- (WebCore::Page::Page):
- Initialize new member variable.
- (WebCore::Page::addUnstartedPlugin):
- Add the PluginView to the set of unstarted plug-ins.
- (WebCore::Page::removeUnstartedPlugin):
- Remove the PluginView from the set of unstarted plug-ins.
- (WebCore::Page::setCanStartPlugins):
- If we can now start plug-ins, iterate the set of unstarted plug-ins,
- starting them. If a plug-in fails to start, dispatch a failed-to-start-
- plug-in error. Clear the list of unstarted plug-ins.
-
- * page/Page.h:
- Added m_canStartPlugins to track whether we can currently start
- plug-ins. Added m_unstartedPlugins to keep track of plug-ins in the
- page that are waiting to be started.
- (WebCore::Page::canStartPlugins):
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::start):
- m_mimeType is now a WebCore::String, so we call .utf8(). If NPP_New()
- fails, set m_status to reflect this; this used to be set by init(), but
- start() will not be called by init() if we are delaying start().
- If NPP_New() succeeds, set m_status to reflect this, and call
- platformStart().
- (WebCore::PluginView::startOrAddToUnstartedList):
- If we cannot start plug-ins, add this view to the Page's list of
- unstarted plug-ins and return true. Otherwise, call start() and return
- the result.
- (WebCore::PluginView::removeFromUnstartedListIfNecessary):
- If we've been started or we don't have a Page, return early. Remove
- ourselves from the Page's list of unstarted plug-ins.
- (WebCore::PluginView::bindingInstance):
- If we haven't been started yet, return 0. This matches the Mac
- behavior.
- (WebCore::PluginView::setParameters):
- If we find the "plug-ins page" parameter, record it; it may be used if
- we fail to start the plug-in.
- (WebCore::PluginView::PluginView):
- Initialize new members m_haveUpdatedPluginWidget. Initialize m_mimeType
- with mimeType directly; m_mimeType is now a WebCore::String.
-
- * plugins/PluginView.h:
- Made start() public, so Page can call it when we start unstarted
- plug-ins. Changed m_mimeType from CString to String and added
- m_pluginsPage; these are needed by dispatchDidFailToStartPlugin().
- (WebCore::PluginView::pluginsPage):
- Added for dispatchDidFailToStartPlugin().
- (WebCore::PluginView::mimeType):
- Ditto.
- (WebCore::PluginView::url):
- Ditto.
-
- * plugins/gtk/PluginViewGtk.cpp:
- (WebCore::PluginView::platformStart):
- Stubbed.
-
- * plugins/mac/PluginViewMac.cpp:
- (WebCore::PluginView::platformStart):
- Stubbed.
-
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::platformStart):
- Stubbed.
-
- * plugins/win/PluginViewWin.cpp:
- (WebCore::PluginView::updatePluginWidget):
- Use m_haveUpdatedPluginWidget to ensure that we will call MoveWindow()
- and SetWindowRgn() to position the plug-in and set its clip rect if an
- earlier call to updatePluginWidget() was made before
- setPlatformPluginWidget() was called to set the plug-in's HWND.
- (WebCore::PluginView::~PluginView):
- Call removeFromUnstartedListIfNecessary() to remove the plug-in from
- the unstarted list if the plug-in is destroyed before it is started.
- (WebCore::PluginView::init):
- Call startOrAddtoUnstartedList to start the plug-in or, if plug-ins
- cannot be started, to add it to the list of plug-ins waiting to be
- started. Set m_status to indicate success; this is also set by start(),
- but that may be delayed, and we don't want the loader to dispatch a
- failed-to-start-plug-in error when we return from init().
- (WebCore::PluginView::platformStart):
- Added; code moved from init(). This is now called by start() to perform
- any platform-specific tasks that need to take place after the plug-in
- has started. Added a call to updatePluginWidget() to ensure we position
- the plug-in and set its clip rect after the plug-in has started.
- Removed the setting of m_status; start() does this before calling this
- function (and we assert this at the head of the function).
-
-2009-07-30 Darin Adler <darin@apple.com>
-
- Reviewed by David Levin.
-
- Use checked casts for render tree
- https://bugs.webkit.org/show_bug.cgi?id=23522
-
- Next step: Add casts for all the RenderTable classes and use them everywhere.
-
- Also added a few uses in places that were still using static_cast.
- Also made some virtual member functions private.
- Also changed RenderTable::m_tableLayout to use OwnPtr.
-
- * accessibility/AccessibilityTable.cpp:
- (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
- (WebCore::AccessibilityTable::addChildren):
- (WebCore::AccessibilityTable::cellForColumnAndRow):
- * accessibility/AccessibilityTableCell.cpp:
- (WebCore::AccessibilityTableCell::parentTable):
- (WebCore::AccessibilityTableCell::rowIndexRange):
- (WebCore::AccessibilityTableCell::columnIndexRange):
- (WebCore::AccessibilityTableCell::titleUIElement):
- * accessibility/AccessibilityTableColumn.cpp:
- (WebCore::AccessibilityTableColumn::headerObject):
- * accessibility/AccessibilityTableRow.cpp:
- (WebCore::AccessibilityTableRow::parentTable):
- * editing/DeleteSelectionCommand.cpp:
- (WebCore::DeleteSelectionCommand::removeNode):
- * editing/TextIterator.cpp:
- (WebCore::shouldEmitTabBeforeNode):
- (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
- * html/HTMLTableCellElement.cpp:
- (WebCore::HTMLTableCellElement::parseMappedAttribute):
- * html/HTMLTableColElement.cpp:
- (WebCore::HTMLTableColElement::parseMappedAttribute):
- * page/Frame.cpp:
- (WebCore::Frame::searchForLabelsAboveCell):
- * page/mac/FrameMac.mm:
- (WebCore::Frame::searchForNSLabelsAboveCell):
- * rendering/AutoTableLayout.cpp:
- (WebCore::AutoTableLayout::recalcColumn):
- (WebCore::AutoTableLayout::fullRecalc):
- (WebCore::shouldScaleColumns):
- * rendering/FixedTableLayout.cpp:
- (WebCore::FixedTableLayout::calcWidthArray):
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::calcPrefWidths):
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::calcPercentageHeight):
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::addChild):
- (WebCore::RenderObject::containingBlock):
- * rendering/RenderTableCell.cpp:
- (WebCore::RenderTableCell::collapsedBottomBorder):
- * rendering/RenderTableCol.cpp:
- (WebCore::RenderTableCol::table):
- * rendering/RenderTableRow.cpp:
- (WebCore::RenderTableRow::addChild):
- (WebCore::RenderTableRow::layout):
- (WebCore::RenderTableRow::paint):
- * rendering/RenderTableSection.cpp:
- (WebCore::RenderTableSection::addChild):
- (WebCore::RenderTableSection::layoutRows):
- (WebCore::RenderTableSection::lowestPosition):
- (WebCore::RenderTableSection::rightmostPosition):
- (WebCore::RenderTableSection::leftmostPosition):
- (WebCore::RenderTableSection::paintObject):
- (WebCore::RenderTableSection::recalcCells):
- * rendering/RenderTreeAsText.cpp:
- (WebCore::operator<<):
- (WebCore::writeTextRun):
- Use checked casts.
-
- * rendering/RenderTable.cpp:
- (WebCore::RenderTable::styleDidChange): Updated to use OwnPtr.
- (WebCore::RenderTable::addChild): Use checked cast.
- (WebCore::RenderTable::layout): Ditto.
- (WebCore::RenderTable::setCellWidths): Ditto.
- (WebCore::RenderTable::paintObject): Ditto.
- (WebCore::RenderTable::splitColumn): Ditto.
- (WebCore::RenderTable::appendColumn): Ditto.
- (WebCore::RenderTable::colElement): Ditto.
- (WebCore::RenderTable::recalcSections): Ditto.
- (WebCore::RenderTable::outerBorderBottom): Ditto.
- (WebCore::RenderTable::outerBorderLeft): Ditto.
- (WebCore::RenderTable::outerBorderRight): Ditto.
- (WebCore::RenderTable::sectionAbove): Ditto.
- (WebCore::RenderTable::sectionBelow): Ditto.
-
- * rendering/RenderTable.h: Added checked cast. Made virtual
- functions private. Changed m_tableLayout to be a OwnPtr.
-
- * rendering/RenderTableCell.h: Added checked cast.
- * rendering/RenderTableCol.h: Ditto. Made virtual functions private.
- * rendering/RenderTableRow.h: Ditto.
- * rendering/RenderTableSection.h: Ditto.
-
-2009-07-31 Brady Eidson <beidson@apple.com>
-
- Reviewed by John Sullivan.
-
- <rdar://problem/6973106> and https://bugs.webkit.org/show_bug.cgi?id=27896
- Favicons are still loaded when automatic image loading is disabled.
-
- People who want to avoid loading images generally want to avoid loading all images.
-
- Test: http/tests/misc/favicon-loads-with-images-disabled.html
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::startIconLoader): After committing the URL mapping, don't actually
- perform the load if images shouldn't be loading.
-
-2009-07-31 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Anders Carlsson.
-
- Accelerated animations stutter on pages with lots of animations and 3d transforms
- https://bugs.webkit.org/show_bug.cgi?id=27884
-
- This patch changes the strategy for synchronizing painting view the view,
- and compositing layer updates. Previously the strategy was to disable screen
- updates between the time we updated the layer tree, and painted the view. That
- left screen updates disabled for too long (hundreds of milliseconds) in some
- cases, causing animation stutter.
-
- The new strategy is to batch up changes to the CA layer tree, and commit them
- all at once just before painting happens (referred to as a "sync" in the code).
- GraphicsLayerCA now keeps a bitmask of changed properties, and then migrates
- the values stored in GraphicsLayer into the CA layer tree at commit time.
-
- Compositing layers are then synced in FrameView::paintContents(). However, not
- all style/layout changes will result in painting; to deal with style changes that
- touch only compositing properties, we set up a runloop observer that takes care
- of comitting layer changes when no painting happens.
-
- * WebCore.base.exp: Export FrameView::syncCompositingStateRecursive()
-
- * loader/EmptyClients.h: scheduleViewUpdate() renamed to syncCompositingStateRecursive()
- * page/ChromeClient.h: scheduleViewUpdate() renamed to syncCompositingStateRecursive()
-
- * page/FrameView.h:
- * page/FrameView.cpp:
- (WebCore::FrameView::syncCompositingStateRecursive): syncCompositingState() on the
- view and all subviews. Like layoutIfNeededRecursive(). If layout is pending, does not
- sync and returns false, since we only want to sync when layout is done.
-
- (WebCore::FrameView::paintContents): syncCompositingState() before painting.
-
- * page/animation/KeyframeAnimation.cpp:
- (WebCore::KeyframeAnimation::endAnimation):
- Call animationPaused() to notify the graphics layers about animation pausing.
-
- * platform/graphics/FloatPoint3D.h:
- (WebCore::operator==):
- (WebCore::operator!=):
- Add missing comparison operators.
-
- * platform/graphics/GraphicsLayer.cpp:
- (WebCore::GraphicsLayer::setOpacity):
- (WebCore::GraphicsLayer::setBackgroundColor): Simple setters no longer care about animation info.
-
- (WebCore::GraphicsLayer::paintGraphicsLayerContents): Null-check client.
-
- * platform/graphics/GraphicsLayer.h:
- (WebCore::AnimationValue:):
- (WebCore::TransformAnimationValue:):
- (WebCore::KeyframeValueList:):
- (WebCore::KeyframeValueList::insert):
- Cleaned up versions of FloatValue and TransformValue, used to store information
- about keyframes values.
-
- (WebCore::GraphicsLayer::contentsRect):
- (WebCore::GraphicsLayer::setContentsRect):
- ContentsRect is now a simple setter.
-
- (WebCore::GraphicsLayer::addAnimation):
- (WebCore::GraphicsLayer::removeAnimationsForProperty):
- (WebCore::GraphicsLayer::removeAnimationsForKeyframes):
- (WebCore::GraphicsLayer::pauseAnimation):
- Simplified animation api.
-
- (WebCore::GraphicsLayer::setGeometryOrientation):
- (WebCore::GraphicsLayer::geometryOrientation):
- setGeometryOrientation is now just a normal member variable.
-
- (WebCore::GraphicsLayer::contentsOrientation): add a getter.
- (WebCore::GraphicsLayer::syncCompositingState): Entry into the layer sync code.
-
- * platform/graphics/GraphicsLayerClient.h: scheduleViewUpdate() renamed to syncCompositingStateRecursive)
-
- * platform/graphics/mac/GraphicsLayerCA.h:
- * platform/graphics/mac/GraphicsLayerCA.mm:
- Lots of cleanup and refactoring. Main points:
- - Layer changes are all batched, and only committed to the CA layer on syncCompositingState().
- - Bitmask is used to store which properties have changed. More efficient than before.
- - Simpler animation interface; simple setters are no longer confounded with animations.
- - Refactored code that creates CA animations, and stores which animations are running.
-
- * platform/graphics/transforms/TransformOperations.h:
- (WebCore::TransformOperations::size):
- (WebCore::TransformOperations::at): Useful accessors for size and indexed access.
-
- * rendering/RenderLayerBacking.h:
- * rendering/RenderLayerBacking.cpp:
- Renamed 'contentsLayer' to 'foregroundLayer' to avoid confusion with GraphicsLayer's
- contentsLayer.
- Adapt to GraphicsLayer's simpler animation API.
- Pass animation pausing through to the graphics layers.
- contentsBox() is no longer a callback via GraphicsLayerClient.
-
- * rendering/RenderLayerCompositor.h:
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::setCompositingLayersNeedRebuild):
- (WebCore::RenderLayerCompositor::scheduleSync):
- (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
- scheduleViewUpdate() is no longer required. Instead, we plumb through "compositingLayerSync"
- notifications, which travel up to WebKit and set up a runloop observer.
-
-2009-07-30 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by David Levin.
-
- Guard needs //'s between #endif and ENABLE(DATAGRID)
- https://bugs.webkit.org/show_bug.cgi?id=27862
-
- Compiling this file causes a build break without this change.
-
- * bindings/v8/custom/V8DataGridColumnListCustom.cpp:
-
-2009-07-31 Greg Bolsinga <bolsinga@apple.com>
-
- Reviewed by Eric Seidel.
-
- Geolocation clean up when no longer updating
- https://bugs.webkit.org/show_bug.cgi?id=27888
-
- When Geolocation::disconnectFrame() is called, need to call
- Document::setUsingGeolocation(false) to mirror the true call
- when it is set up.
-
- When handling an error, and there are no more listeners, call
- GeolocationService::stopUpdating().
-
- * page/Geolocation.cpp:
- (WebCore::Geolocation::disconnectFrame):
- (WebCore::Geolocation::handleError):
-
-2009-07-31 Greg Bolsinga <bolsinga@apple.com>
-
- Reviewed by George Staikos.
-
- Consolidate GeoLocation code to send positions and errors
- https://bugs.webkit.org/show_bug.cgi?id=27863
-
- Create helper methods that will send positions and errors to either
- one shots or watchers.
-
- * page/Geolocation.cpp:
- (WebCore::Geolocation::sendError):
- (WebCore::Geolocation::sendErrorToOneShots):
- (WebCore::Geolocation::sendErrorToWatchers):
- (WebCore::Geolocation::sendPosition):
- (WebCore::Geolocation::sendPositionToOneShots):
- (WebCore::Geolocation::sendPositionToWatchers):
- * page/Geolocation.h:
-
-2009-07-31 Xan Lopez <xlopez@igalia.com>
-
- Roll out previous change as it might be causing some weirdness in
- the bots.
-
- * platform/image-decoders/bmp/BMPImageDecoder.cpp:
- (WebCore::BMPImageDecoder::processFileHeader):
-
-2009-07-31 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Mark Rowe.
-
- Fix compiler warning.
- https://bugs.webkit.org/show_bug.cgi?id=27851
-
- GCC does not like multi-character character constants, so use the
- explicit numerical value of 'BM' in the enum.
-
- * platform/image-decoders/bmp/BMPImageDecoder.cpp:
- (WebCore::BMPImageDecoder::processFileHeader):
-
-2009-07-30 Brady Eidson <beidson@apple.com>
-
- Reviewed by Mark Rowe, but Dan Bernstein also reviewed and asked thoughtful questions.
-
- <rdar://problem/7106968> and https://bugs.webkit.org/show_bug.cgi?id=27868
- http://www.ruthhuntcandy.com/ goes into infinite refresh in WebKit, works in others.
-
- Test: http/tests/misc/meta-refresh-stray-single-quote.html
-
- * platform/network/HTTPParsers.cpp:
- (WebCore::parseHTTPRefresh): Allow for a stray quote character at the start of the URL string.
-
-2009-07-30 Mark Rowe <mrowe@apple.com>
-
- Reviewed by Adele Peterson and Jon Honeycutt.
-
- Fix <https://bugs.webkit.org/show_bug.cgi?id=27828> for Mac.
- Bug 27828: Title attribute is not respected on option elements
-
- No tests added as it is not clear how to test a tool tip from DumpRenderTree.
-
- * platform/PopupMenuClient.h: Add a method for retrieving the tool tip of an item.
- * platform/mac/PopupMenuMac.mm:
- (WebCore::PopupMenu::populate): Set the tool tip of the menu item to that of the represented item.
- * rendering/RenderMenuList.cpp:
- (WebCore::RenderMenuList::itemToolTip): Expose the title attribute of the element as the tool tip.
- * rendering/RenderMenuList.h:
- * rendering/RenderTextControlSingleLine.h:
- (WebCore::RenderTextControlSingleLine::itemToolTip): Return an empty string, indicating no tool tip, for
- the popup menu in RenderTextControlSingleLine.
-
-2009-07-30 Xiaomei Ji <xji@chromium.org>
-
- Reviewed by Dan Bernstein.
-
- Remove ChromeClientChromium::setToolTip().
- https://bugs.webkit.org/show_bug.cgi?id=27861
-
- This patch is just to remove a temporarily introduced overloaded empty
- virtual function. No test is needed.
-
- * page/chromium/ChromeClientChromium.h:
-
-2009-07-30 Michael Nordman <michaeln@google.com>
-
- Reviewed by Darin Fisher.
-
- https://bugs.webkit.org/show_bug.cgi?id=27821
-
- ApplicationCacheHost refactoring.
-
- 1) Better encapsulate the interfaces between webcore common code
- and the appcache system within a new class ApplicationCacheHost.
-
- 2) Use that interface throughout the loader system, replacing inline appcache logic.
-
- 3) Implement the interface in terms of webcore's appcache system.
-
- 4) Add the new files to various makefiles.
-
- 5) Implement protocolHostAndPortAreEqual() in KURLGoogle.cpp
-
- No new features, no new tests. The existing layout tests all pass.
-
- * GNUmakefile.am:
- * WebCore.base.exp:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * html/HTMLHtmlElement.cpp:
- (WebCore::HTMLHtmlElement::insertedIntoDocument):
- * loader/DocumentLoader.cpp:
- (WebCore::DocumentLoader::DocumentLoader):
- (WebCore::DocumentLoader::~DocumentLoader):
- (WebCore::DocumentLoader::mainReceivedError):
- (WebCore::DocumentLoader::detachFromFrame):
- (WebCore::DocumentLoader::setPrimaryLoadComplete):
- * loader/DocumentLoader.h:
- (WebCore::DocumentLoader::applicationCacheHost):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::canCachePageContainingThisFrame):
- (WebCore::FrameLoader::logCanCacheFrameDecision):
- (WebCore::FrameLoader::loadResourceSynchronously):
- * loader/MainResourceLoader.cpp:
- (WebCore::MainResourceLoader::didReceiveResponse):
- (WebCore::MainResourceLoader::didReceiveData):
- (WebCore::MainResourceLoader::didFinishLoading):
- (WebCore::MainResourceLoader::didFail):
- (WebCore::MainResourceLoader::load):
- * loader/MainResourceLoader.h:
- * loader/ResourceLoader.cpp:
- (WebCore::ResourceLoader::load):
- (WebCore::ResourceLoader::willSendRequest):
- (WebCore::ResourceLoader::didReceiveResponse):
- (WebCore::ResourceLoader::didFail):
- * loader/ResourceLoader.h:
- * loader/appcache/ApplicationCacheGroup.cpp:
- (WebCore::ApplicationCacheGroup::selectCache):
- (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
- (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
- (WebCore::ApplicationCacheGroup::failedLoadingMainResource):
- (WebCore::ApplicationCacheGroup::disassociateDocumentLoader):
- (WebCore::ApplicationCacheGroup::update):
- (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
- (WebCore::ApplicationCacheGroup::manifestNotFound):
- (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
- (WebCore::ApplicationCacheGroup::startLoadingEntry):
- (WebCore::ApplicationCacheGroup::associateDocumentLoaderWithCache):
- (WebCore::CallCacheListenerTask::create):
- (WebCore::CallCacheListenerTask::performTask):
- (WebCore::CallCacheListenerTask::CallCacheListenerTask):
- (WebCore::ApplicationCacheGroup::postListenerTask):
- * loader/appcache/ApplicationCacheGroup.h:
- * loader/appcache/ApplicationCacheHost.cpp: Added.
- * loader/appcache/ApplicationCacheHost.h: Added.
- * loader/appcache/ApplicationCacheStorage.cpp:
- (WebCore::ApplicationCacheStorage::transferApplicationCache):
- * loader/appcache/ApplicationCacheStorage.h:
- * loader/appcache/DOMApplicationCache.cpp:
- (WebCore::DOMApplicationCache::DOMApplicationCache):
- (WebCore::DOMApplicationCache::disconnectFrame):
- (WebCore::DOMApplicationCache::applicationCacheHost):
- (WebCore::DOMApplicationCache::status):
- (WebCore::DOMApplicationCache::update):
- (WebCore::DOMApplicationCache::swapCache):
- (WebCore::DOMApplicationCache::addEventListener):
- (WebCore::DOMApplicationCache::removeEventListener):
- (WebCore::DOMApplicationCache::dispatchEvent):
- (WebCore::DOMApplicationCache::callListener):
- (WebCore::DOMApplicationCache::toEventName):
- (WebCore::DOMApplicationCache::toEventType):
- * loader/appcache/DOMApplicationCache.h:
- (WebCore::DOMApplicationCache::):
- (WebCore::DOMApplicationCache::setAttributeEventListener):
- (WebCore::DOMApplicationCache::getAttributeEventListener):
- (WebCore::DOMApplicationCache::clearAttributeEventListener):
- (WebCore::DOMApplicationCache::callEventListener):
- (WebCore::DOMApplicationCache::setOnchecking):
- (WebCore::DOMApplicationCache::onchecking):
- (WebCore::DOMApplicationCache::setOnerror):
- (WebCore::DOMApplicationCache::onerror):
- (WebCore::DOMApplicationCache::setOnnoupdate):
- (WebCore::DOMApplicationCache::onnoupdate):
- (WebCore::DOMApplicationCache::setOndownloading):
- (WebCore::DOMApplicationCache::ondownloading):
- (WebCore::DOMApplicationCache::setOnprogress):
- (WebCore::DOMApplicationCache::onprogress):
- (WebCore::DOMApplicationCache::setOnupdateready):
- (WebCore::DOMApplicationCache::onupdateready):
- (WebCore::DOMApplicationCache::setOncached):
- (WebCore::DOMApplicationCache::oncached):
- (WebCore::DOMApplicationCache::setOnobsolete):
- (WebCore::DOMApplicationCache::onobsolete):
- (WebCore::DOMApplicationCache::~DOMApplicationCache):
- * platform/KURLGoogle.cpp:
- (WebCore::protocolHostAndPortAreEqual):
-
-2009-07-30 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- Bug 27854 - crash at WebCore::AXObjectCache::notificationPostTimerFired
- https://bugs.webkit.org/show_bug.cgi?id=27854
-
- AccessibilityObjects need to be retained while waiting to fire their notifications, otherwise
- they can disappear and then lead to crashes.
-
- * accessibility/AXObjectCache.cpp:
- (WebCore::AXObjectCache::notificationPostTimerFired):
- (WebCore::AXObjectCache::postNotification):
- * accessibility/AXObjectCache.h:
-
-2009-07-30 Simon Fraser <simon.fraser@apple.com>
-
- Minor change to earlier commit suggested by Darin Adler.
- Use the variable rather than dereferencing 'it' again.
-
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
-
-2009-07-30 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Animation with a timing function property in a keyframe eats CPU
- https://bugs.webkit.org/show_bug.cgi?id=27856
- <rdar://problem/7104476> Animation demo uses lots of CPU
-
- Don't include animation-timing-function in the list of properties to
- animate in a keyframe animation, because this property is not animated;
- instead, it describes the timing function to apply to this keyframe.
-
- This prevents the animation code from thinking that there's a property
- that it has to software-animate, and thus firing the animation timer frequently.
-
- Not testable because there is no visible impact.
-
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::keyframeStylesForAnimation): Don't add
- CSSPropertyWebkitAnimationTimingFunction to the list of properties to animate.
-
- * page/animation/KeyframeAnimation.cpp
- (WebCore::KeyframeAnimation::getKeyframeAnimationInterval): Add a comment
-
-2009-07-30 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by Adam Treat.
-
- Apply colour style to buttons that use Theme settings in Qt.
-
- https://bugs.webkit.org/show_bug.cgi?id=27814
-
- * platform/qt/RenderThemeQt.cpp:
- (WebCore::RenderThemeQt::adjustButtonStyle):
-
-=== End merge of nitro-extreme branch 2009-07-30 ===
-
-2009-05-11 Geoffrey Garen <ggaren@apple.com>
-
- Reviewed by Sam Weinig.
-
- Make WebCore compile with the new JS number representation.
-
- * ForwardingHeaders/runtime/JSAPIValueWrapper.h: Added.
- * ForwardingHeaders/runtime/JSNumberCell.h: Removed.
- * bindings/js/ScriptEventListener.cpp:
- * bindings/scripts/CodeGeneratorJS.pm:
- * bridge/c/c_instance.cpp:
-
-=== Start merge of nitro-extreme branch 2009-07-30 ===
-
-2009-07-30 Dean McNamee <deanm@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Don't try to hash member function pointers, instead use a precomputed value based on the field.
- https://bugs.webkit.org/show_bug.cgi?id=27843
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/V8SVGPODTypeWrapper.h:
- (WebCore::PODTypeWrapperCacheInfo::PODTypeWrapperCacheInfo):
- (WebCore::PODTypeWrapperCacheInfo::operator==):
- (WebCore::PODTypeWrapperCacheInfoHash::hash):
- (WebCore::V8SVGDynamicPODTypeWrapperCache::lookupOrCreateWrapper):
-
-2009-07-30 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Simon Fraser.
-
- Fix compiler warning.
-
- * dom/SelectElement.cpp:
- (WebCore::SelectElement::menuListDefaultEventHandler):
-
-2009-07-29 Matt Perry <mpcomplete@chromium.org>
-
- Reviewed by Adam Barth.
-
- Add a way to register V8 extensions for Isolated Worlds only.
- https://bugs.webkit.org/show_bug.cgi?id=27785
-
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::evaluateInNewWorld):
- (WebCore::ScriptController::evaluateInNewContext):
- * bindings/v8/ScriptController.h:
- * bindings/v8/V8IsolatedWorld.cpp:
- (WebCore::V8IsolatedWorld::evaluate):
- * bindings/v8/V8IsolatedWorld.h:
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::evaluateInNewWorld):
- (WebCore::V8Proxy::evaluateInNewContext):
- (WebCore::V8Proxy::createNewContext):
- (WebCore::V8Proxy::initContextIfNeeded):
- (WebCore::V8Proxy::registerExtensionWithV8):
- (WebCore::V8Proxy::registerExtension):
- * bindings/v8/V8Proxy.h:
-
-2009-07-30 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by Adam Treat.
-
- Add previously defined out support to PopupMenuQt for marking entries as
- disabled and for selecting the desired item.
-
- https://bugs.webkit.org/show_bug.cgi?id=27772
-
- * platform/qt/PopupMenuQt.cpp:
- (WebCore::PopupMenu::populate):
-
-2009-07-30 Darin Adler <darin@apple.com>
-
- Reviewed by David Levin.
-
- Use checked casts for render tree
- https://bugs.webkit.org/show_bug.cgi?id=23522
-
- Next step: Add new toRenderWidget cast and use it everywhere.
-
- Use checked casts in all the places that were using static_cast
- but there is a checked cast available.
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::stringValue):
- (WebCore::AccessibilityRenderObject::widget):
- (WebCore::AccessibilityRenderObject::widgetForAttachmentView):
- (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (getPangoLayoutForAtk):
- * dom/Document.cpp:
- (WebCore::widgetForNode):
- (WebCore::Document::setFocusedNode):
- * html/HTMLEmbedElement.cpp:
- (WebCore::findWidgetRenderer):
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::defaultEventHandler):
- * html/HTMLObjectElement.cpp:
- (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
- * html/HTMLPlugInElement.cpp:
- (WebCore::HTMLPlugInElement::defaultEventHandler):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::loadSubframe):
- * loader/PluginDocument.cpp:
- (WebCore::PluginTokenizer::writeRawData):
- * page/EventHandler.cpp:
- (WebCore::EventHandler::hitTestResultAtPoint):
- (WebCore::subframeForTargetNode):
- (WebCore::EventHandler::handleWheelEvent):
- * page/Frame.cpp:
- (WebCore::isFrameElement):
- * page/PrintContext.cpp:
- (WebCore::PrintContext::computePageRects):
- * page/android/EventHandlerAndroid.cpp:
- (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
- * page/chromium/EventHandlerChromium.cpp:
- (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
- * page/chromium/FrameChromium.cpp:
- (WebCore::computePageRectsForFrame):
- * page/gtk/EventHandlerGtk.cpp:
- (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
- * page/haiku/EventHandlerHaiku.cpp:
- (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
- * page/mac/EventHandlerMac.mm:
- (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
- (WebCore::EventHandler::passSubframeEventToSubframe):
- * page/win/FrameWin.cpp:
- (WebCore::computePageRectsForFrame):
- * page/wx/EventHandlerWx.cpp:
- (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
- * platform/chromium/ClipboardChromium.cpp:
- (WebCore::getCachedImage):
- * platform/chromium/PasteboardChromium.cpp:
- (WebCore::Pasteboard::writeImage):
- * platform/gtk/PasteboardGtk.cpp:
- (WebCore::Pasteboard::writeImage):
- * platform/mac/PasteboardMac.mm:
- (WebCore::Pasteboard::writeImage):
- * platform/qt/ClipboardQt.cpp:
- (WebCore::getCachedImage):
- * platform/qt/PasteboardQt.cpp:
- (WebCore::Pasteboard::writeImage):
- * platform/win/ClipboardWin.cpp:
- (WebCore::getCachedImage):
- * platform/win/PasteboardWin.cpp:
- (WebCore::Pasteboard::writeImage):
- * rendering/InlineBox.h:
- (WebCore::InlineBox::boxModelObject):
- * rendering/RenderInline.cpp:
- (WebCore::RenderInline::splitInlines):
- (WebCore::RenderInline::addChildToContinuation):
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::updateImageContents):
- * rendering/TextControlInnerElements.cpp:
- (WebCore::RenderTextControlInnerBlock::positionForPoint):
- Use checked cast instead of static_cast.
-
- * rendering/RenderWidget.h: Added toRenderWidget.
-
-2009-07-30 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by George Staikos.
-
- WINCE PORT: some files modified to build for WINCE
- https://bugs.webkit.org/show_bug.cgi?id=27816
-
- * accessibility/AccessibilityObject.h:
- * page/win/EventHandlerWin.cpp:
- (WebCore::EventHandler::createDraggingClipboard):
- * platform/win/PlatformMouseEventWin.cpp:
- (WebCore::messageToEventType):
- (WebCore::PlatformMouseEvent::PlatformMouseEvent):
- * platform/win/PlatformScreenWin.cpp:
- (WebCore::deviceInfoForWidget):
- (WebCore::screenIsMonochrome):
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::show):
- (WebCore::PopupMenu::paint):
- (WebCore::registerPopup):
- (WebCore::PopupWndProc):
-
-2009-07-30 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by George Staikos.
-
- WINCE PORT: modified graphics files
- https://bugs.webkit.org/show_bug.cgi?id=27779
-
- * platform/graphics/BitmapImage.h:
- (WebCore::BitmapImage::mayFillWithSolidColor):
* platform/graphics/Gradient.h:
- * platform/graphics/GraphicsContext.cpp:
- * platform/graphics/GraphicsContext.h:
- * platform/graphics/ImageSource.h:
- * platform/graphics/MediaPlayer.cpp:
- * platform/graphics/Path.h:
- * platform/graphics/Pattern.h:
- * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
- (WebCore::Matrix3DTransformOperation::blend):
- * platform/graphics/transforms/MatrixTransformOperation.cpp:
- (WebCore::MatrixTransformOperation::blend):
- * platform/graphics/transforms/TransformationMatrix.h:
- (WebCore::TransformationMatrix::operator*):
- * platform/graphics/win/IconWin.cpp:
- (WebCore::Icon::createIconForFile):
- (WebCore::Icon::createIconForFiles):
- (WebCore::Icon::paint):
-
-2009-07-30 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Ariya Hidayat.
-
- Improve efficiency by rewriting code doing three hash table
- lookups, which can be replaced by just one as pointed out
- by Darin Adler.
-
- Though being slightly less clear, this should be considerable
- faster.
-
- * plugins/PluginDatabase.cpp:
- (WebCore::PluginDatabase::remove):
-
-2009-07-30 Antonio Gomes <antonio.gomes@openbossa.org>
-
- Reviewed by Gustavo Noronha.
-
- [Gtk] Code cleanup in MediaPlayerPrivateGStreamer.cpp|h and VideoSinkGStreamer.cpp|h (Part 2)
- https://bugs.webkit.org/show_bug.cgi?id=27651
-
- Removed unneeded includes (gdk.h and gtk.h) and added glib.h and cairo.h instead.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
-
-2009-07-30 Antonio Gomes <antonio.gomes@openbossa.org>
-
- Reviewed by Gustavo Noronha.
-
- [Gtk] Code cleanup in MediaPlayerPrivateGStreamer.cpp|h and VideoSinkGStreamer.cpp|h (Part 1)
- https://bugs.webkit.org/show_bug.cgi?id=27651
-
- Fixed many code style issues pointed by WebKitTools/Scripts/modules/cpplint.py
- No functionality change at all.
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
- * platform/graphics/gtk/VideoSinkGStreamer.cpp:
- * platform/graphics/gtk/VideoSinkGStreamer.h:
-
-2009-07-30 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Simon Hausmann.
-
- Allow to explicitly choose a preferred plugin for a mimetype.
-
- https://bugs.webkit.org/show_bug.cgi?id=27651
-
- When the preferred plugin is set for a specific MIME type, it will be
- always picked up, regardless of its version, quirks etc.
-
- Client applications may want to use that API to resolve mimetype
- ambiguity in a custom way, rather than in the default way that is
- currently used in WebKit.
-
- * plugins/PluginDatabase.cpp:
- (WebCore::PluginDatabase::pluginForMIMEType):
- (WebCore::PluginDatabase::MIMETypeForExtension):
- (WebCore::PluginDatabase::setPreferredPluginForMIMEType): Added.
- (WebCore::PluginDatabase::remove):
- (WebCore::PluginDatabase::clear):
- * plugins/PluginDatabase.h:
-
-2009-07-30 Jakub Wieczorek <faw217@gmail.com>
-
- [Qt] Fix build with Qt 4.4 after r46535.
-
- * platform/network/qt/ResourceHandleQt.cpp:
-
-2009-07-30 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- Video elements fires another "load" event when attached to DOM
- https://bugs.webkit.org/show_bug.cgi?id=27623
-
- Test: media/media-load-event.html
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::insertedIntoDocument):
- Only schedule load when element's network state is NETWORK_EMPTY.
-
-2009-07-30 Anton Muhin <antonm@chromium.org>
-
- Reviewed by David Levin.
-
- Cache v8 strings when converting from WebCore::String to v8 string.
- https://bugs.webkit.org/show_bug.cgi?id=27655
-
- * bindings/v8/V8Binding.cpp:
- (WebCore::v8String): now just immediately calls v8ExternalString
- (WebCore::enableStringImplCache): enables caching of conversions from WebCore::StringImpl to
- v8::String
- (WebCore::makeExternalString): utilty function to create external v8::String out of
- WebCore::String
- (WebCore::getStringCache): static function to access string cache
- (WebCore::cachedStringCallback): callback for weak handles of v8::Strings stored in the
- cache
- (WebCore::v8ExternalString): if caching enabled, checks if there is already v8::String for
- the given WebCore::StringImpl. If present, returns it, otherwise creates a new v8 external
- string.
- * bindings/v8/V8Binding.h:
-
-2009-07-30 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Maciej Stachowiak.
-
- https://bugs.webkit.org/show_bug.cgi?id=25535
- [GTK] object:state-changed:checked events missing for radio buttons and checkboxes
-
- Implement state-changed:checked for radio buttons and checkboxes.
-
- * accessibility/gtk/AXObjectCacheAtk.cpp:
- (WebCore::AXObjectCache::postPlatformNotification):
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::setChecked):
-
-2009-07-30 Xan Lopez <xlopez@igalia.com>
-
- Forgot the 'break'.
-
- * platform/ContextMenu.cpp:
- (WebCore::ContextMenu::checkOrEnableIfNeeded):
-
-2009-07-30 Xan Lopez <xlopez@igalia.com>
-
- Try to fix Mac build.
-
- * platform/ContextMenu.cpp:
- (WebCore::ContextMenu::checkOrEnableIfNeeded):
-
-2009-07-29 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Adam Barth.
-
- Add missing enumeration value to switch.
-
- * platform/ContextMenu.cpp:
- (WebCore::ContextMenu::checkOrEnableIfNeeded):
-
-2009-07-29 Jian Li <jianli@chromium.org>
-
- Reviewed by Darin Adler.
-
- Workers need to throw an exception when presented with invalid URLs.
- https://bugs.webkit.org/show_bug.cgi?id=27770
-
- Tests covered by worker-constructor.html and worker-redirect.html.
-
- * bindings/js/JSWorkerConstructor.cpp:
- (WebCore::constructWorker):
- * bindings/v8/custom/V8WorkerCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * workers/Worker.cpp:
- (WebCore::Worker::Worker):
- * workers/Worker.h:
- (WebCore::Worker::create):
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::importScripts):
- * workers/WorkerScriptLoader.cpp:
- (WebCore::WorkerScriptLoader::loadSynchronously):
- (WebCore::WorkerScriptLoader::loadAsynchronously):
- (WebCore::WorkerScriptLoader::createResourceRequest):
- * workers/WorkerScriptLoader.h:
-
-2009-07-29 Brady Eidson <beidson@apple.com>
-
- Reviewed by Darin Adler.
-
- (REGRESSION: r46039) Should restore previous connections-per-host limit for non-http(s) hosts
- https://bugs.webkit.org/show_bug.cgi?id=27822 and <rdar://problem/7091659>
-
- * loader/loader.cpp:
- (WebCore::Loader::Host::servePendingRequests): For non-http(s) hosts, restore the previous behavior of
- only limiting connections while parsing and still trying to figure out stylesheet urls.
-
-2009-07-29 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by George Staikos.
-
- WINCE PORT: Add WebCore/page/wince/FrameWince.cpp
- https://bugs.webkit.org/show_bug.cgi?id=27729
-
- * page/wince/FrameWince.cpp: Added.
-
-2009-07-29 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Justin Garcia.
-
- REGRESSION(r46370-46426): /editing/style/remove-underline-from-stylesheet.html fails
- https://bugs.webkit.org/show_bug.cgi?id=27809
-
- The patch primarily rebaselines the tests but also fixes the bug in currentlyHasStyle.
- To determine that a particular text decoration is present, currentlyHasStyle should refer to
- -webkit-text-decorations-in-effect to take care of styles set by u, s, strike tags and ancestors' CSS.
- We also need to update layout to accommodate the changes made within ApplyStyleCommand.
-
- * editing/ApplyStyleCommand.cpp: ditto
- (WebCore::StyleChange::currentlyHasStyle): ditto
-
-2009-07-29 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by George Staikos.
-
- WINCE PORT: changes to platform/text files
- https://bugs.webkit.org/show_bug.cgi?id=27715
-
- * platform/text/String.cpp:
- (WebCore::String::format):
- * platform/text/TextEncoding.cpp:
- (WebCore::TextEncoding::encode):
- * platform/text/TextEncodingRegistry.cpp:
- (WebCore::buildBaseTextCodecMaps):
- (WebCore::extendTextCodecMaps):
-
-2009-07-29 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Adam Roben.
-
- FIX: HDC leaks in PopupMenuWin.cpp
- https://bugs.webkit.org/show_bug.cgi?id=27817
-
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::~PopupMenu):
- (WebCore::PopupMenu::paint):
-
-2009-07-29 Darin Adler <darin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Illegal values for <ol start> cause list numbering start at 0 (should start at 1)
- https://bugs.webkit.org/show_bug.cgi?id=27810
-
- Test: fast/lists/ol-start-parsing.html
-
- * html/HTMLOListElement.cpp:
- (WebCore::HTMLOListElement::parseMappedAttribute): Check the result of toInt
- and use the value 1 if it failed to parse. Before we were getting toInt's default
- behavior, which is to return 0.
-
-2009-07-29 Kevin McCullough <kmccullough@apple.com>
-
- Reviewed by Darin Adler.
-
- Added foundation work to allow a testing infrastructure for the Web
- Inspector.
-
- * inspector/InspectorClient.h:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::scriptObjectReady): Tell the testing
- harness that the window object is ready.
- * loader/EmptyClients.h: Empty class support for SVG.
- (WebCore::EmptyInspectorClient::inspectorWindowObjectCleared):
-
-2009-07-29 Chris Fleizach <cfleizach@apple.com>
-
- Build fix for windows after landing
- Bug 27807 - AX: move re-usable code into more common areas for other platforms
-
- Apparently bzero doesn't exist on windows.
-
- * accessibility/AXObjectCache.cpp:
- (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
-
-2009-07-29 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Justin Garcia.
-
- Bug 27807 - AX: move re-usable code into more common areas for other platforms
- https://bugs.webkit.org/show_bug.cgi?id=27807
-
- Moves some accessibility code that was in the Mac file to a more common place so
- it can be used by other platforms.
- This includes:
- Making TextMarkerData from a VisiblePosition.
- Making a VisiblePosition from TextMarkerData.
- Finding the anchor accessibility object for an arbitrary Node.
-
- * accessibility/AXObjectCache.cpp:
- (WebCore::AXObjectCache::visiblePositionForTextMarkerData):
- (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
- * accessibility/AXObjectCache.h:
- * accessibility/AccessibilityObject.cpp:
- (WebCore::AccessibilityObject::anchorElementForNode):
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::visiblePositionForIndex):
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (textMarkerForVisiblePosition):
- (visiblePositionForTextMarker):
- (AXAttributedStringAppendText):
-
-2009-07-29 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Simon Fraser.
-
- Inset box shadows are incorrectly accounted for in visual overflow
- computations
- https://bugs.webkit.org/show_bug.cgi?id=27811
-
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::placeBoxesHorizontally): Use
- getBoxShadowHorizontalExtent().
- (WebCore::InlineFlowBox::placeBoxesVertically): Use
- getBoxShadowVerticalExtent(). Removed duplicate code to get the
- text-shadow overflow.
- (WebCore::InlineFlowBox::paint): Use getBoxShadowHorizontalExtent().
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::overflowHeight): Use
- getBoxShadowVerticalExtent().
- (WebCore::RenderBlock::overflowWidth): Use
- getBoxShadowHorizontalExtent().
- (WebCore::RenderBlock::overflowLeft): Ditto.
- (WebCore::RenderBlock::overflowTop): Use getBoxShadowVerticalExtent().
- (WebCore::RenderBlock::overflowRect): Use getBoxShadowExtent().
- (WebCore::RenderBlock::layoutBlock): Ditto.
- * rendering/RenderFlexibleBox.cpp:
- (WebCore::RenderFlexibleBox::layoutBlock): Ditto.
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::calculateRects): Exclude inset shadows.
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Use
- getBoxShadowHorizontalExtent() and getBoxShadowVerticalExtent().
- (WebCore::RenderObject::adjustRectForOutlineAndShadow): Exclude inset
- shadows.
- * rendering/RenderReplaced.cpp:
- (WebCore::RenderReplaced::adjustOverflowForBoxShadowAndReflect): Ditto.
- * rendering/style/RenderStyle.cpp:
- (WebCore::RenderStyle::setTextShadow): Also assert that text-shadows are
- not inset.
- (WebCore::RenderStyle::getBoxShadowExtent): Added. Excludes inset
- shadows.
- (WebCore::RenderStyle::getBoxShadowHorizontalExtent): Ditto.
- (WebCore::RenderStyle::getBoxShadowVerticalExtent): Ditto.
- * rendering/style/RenderStyle.h:
-
-2009-07-29 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Fix crash when an element with display: table-row is composited (e.g. via a 3d-transform)
- https://bugs.webkit.org/show_bug.cgi?id=27796
-
- Avoid repainting when a layer becomes composited if the renderer is not parented
- yet, because it makes no sense to do so.
-
- If the table row is a repaint container, default to the RenderBox implementation
- of clippedOverflowRectForRepaint(), because we cannot hand off the repaint rect
- computation to something that is above the repaint container.
-
- Test: fast/table/table-row-compositing-repaint-crash.html
-
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::repaintOnCompositingChange):
- * rendering/RenderTableRow.cpp:
- (WebCore::RenderTableRow::clippedOverflowRectForRepaint):
-
-2009-07-29 Brady Eidson <beidson@apple.com>
-
- Reviewed by Sam Weinig.
-
- https://bugs.webkit.org/show_bug.cgi?id=27791
- 307 redirects of POSTs should use POST, not GET
-
- Test: http/tests/loading/redirect-methods.html
-
- * platform/network/cf/ResourceHandleCFNet.cpp:
- (WebCore::willSendRequest):
-
- * platform/network/mac/ResourceHandleMac.mm:
- (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
-
-2009-07-29 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser.
-
- Adding -webkit-animation-play-state back in
- https://bugs.webkit.org/show_bug.cgi?id=26867
-
- We've decided to keep -webkit-animation-play-state. So this
- just adds back in the code from https://bugs.webkit.org/show_bug.cgi?id=22907.
-
- Test: animations/play-state.html
-
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::):
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue):
- (WebCore::CSSParser::parseAnimationPlayState):
- (WebCore::CSSParser::parseAnimationProperty):
- * css/CSSParser.h:
- * css/CSSPropertyNames.in:
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty):
- (WebCore::CSSStyleSelector::mapAnimationPlayState):
- * css/CSSStyleSelector.h:
- * platform/animation/Animation.h:
- * rendering/style/RenderStyleConstants.h:
- (WebCore::):
-
-2009-07-29 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Simon Hausmann.
-
- Expose the default plugin directories and the current directory set of
- the plugin database as public API.
-
- https://bugs.webkit.org/show_bug.cgi?id=27651
-
- * plugins/PluginDatabase.h:
- (WebCore::PluginDatabase::pluginDirectories):
-
-2009-07-29 Alpha Lam <hclam@chromium.org>
-
- Reviewed by David Levin.
-
- [chromium] Font size for current time display in media controls panel
- is affected by body font size.
- https://bugs.webkit.org/show_bug.cgi?id=27799
-
- Fixing the problem of rendering by explicitly setting the font size
- for the time displays.
-
- No new tests since this is covered by existing media tests.
-
- * css/mediaControlsChromium.css:
-
-2009-07-29 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by David Levin.
-
- Update WebCore/page/ContextMenuController.cpp to conform to WebKit
- Style Guidelines as identified by cpp_style.py.
- https://bugs.webkit.org/show_bug.cgi?id=27613
-
- * page/ContextMenuController.cpp:
- (WebCore::openNewWindow):
- (WebCore::ContextMenuController::contextMenuItemSelected):
-
-2009-07-29 Dean McNamee <deanm@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Removed unused wrapCPointer/extractCPointer from the v8 bindings.
- https://bugs.webkit.org/show_bug.cgi?id=27805
-
- * bindings/v8/V8DOMWrapper.h:
-
-2009-07-29 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Simon Hausmann.
-
- Expose the PluginDatabase::pluginForMIMEType() function as public API.
- https://bugs.webkit.org/show_bug.cgi?id=27651
-
- It can be used to determine the appropriate plugin for a mime type,
- without guessing the mimetype from the extension.
-
- * plugins/PluginDatabase.h:
-
-2009-07-29 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Adam Treat.
-
- Allow to enable/disable particular plugin packages.
- https://bugs.webkit.org/show_bug.cgi?id=27651
-
- Disabled plugins will not be picked up when looking for a plugin
- supporting the requested mimetypes.
-
- Client applications may want to use that API to disable specific
- plugins.
-
- * plugins/PluginDatabase.cpp:
- (WebCore::PluginDatabase::pluginForMIMEType):
- (WebCore::PluginDatabase::MIMETypeForExtension):
- * plugins/PluginPackage.cpp:
- (WebCore::PluginPackage::PluginPackage):
- (WebCore::PluginPackage::setEnabled):
- * plugins/PluginPackage.h:
- (WebCore::PluginPackage::isEnabled):
-
-2009-07-29 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by Adam Treat.
-
- [WML] Running WML tests in random order multiple times exposes subtle bugs
- https://bugs.webkit.org/show_bug.cgi?id=27801
-
- Remove superflous assertions regarding the parent node. Under certain circumstances
- these can even fire (related to garbage collection while destructing). Fixes random order
- WML tests (run-webkit-tests fast/wml wml http/tests/wml fast/wml ... --random)
-
- The wml/enter-first-card-with-events.html test relied on a bug in our implementation of
- WMLPageState::reset() - the history stack should still contain the current card afterwards.
- Fix that bug by preserving the first item in BackForwardList::clearWMLPageHistory().
-
- * history/BackForwardList.cpp: Preserve first item in history stack, as demanded by the spec.
- (WebCore::BackForwardList::clearWMLPageHistory):
- * wml/WMLDoElement.cpp:
- (WebCore::WMLDoElement::insertedIntoDocument):
- (WebCore::WMLDoElement::removedFromDocument):
- * wml/WMLNoopElement.cpp:
- (WebCore::WMLNoopElement::insertedIntoDocument):
- * wml/WMLOnEventElement.cpp:
- (WebCore::eventHandlingParent):
- * wml/WMLPostfieldElement.cpp:
- (WebCore::WMLPostfieldElement::insertedIntoDocument):
- (WebCore::WMLPostfieldElement::removedFromDocument):
- * wml/WMLSetvarElement.cpp:
- (WebCore::WMLSetvarElement::insertedIntoDocument):
- (WebCore::WMLSetvarElement::removedFromDocument):
- * wml/WMLTaskElement.cpp:
- (WebCore::WMLTaskElement::insertedIntoDocument):
- (WebCore::WMLTaskElement::removedFromDocument):
- * wml/WMLTimerElement.cpp:
- (WebCore::WMLTimerElement::insertedIntoDocument):
- (WebCore::WMLTimerElement::removedFromDocument):
-
-2009-07-29 Yongjun Zhang <yongjun.zhang@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- https://bugs.webkit.org/show_bug.cgi?id=26848
- [Qt] ResourceHandle::willLoadFromCache needs to be implemented QtWebKit.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::loadItem):
- * platform/network/ResourceHandle.h:
- * platform/network/cf/ResourceHandleCFNet.cpp:
- (WebCore::ResourceHandle::willLoadFromCache):
- * platform/network/curl/ResourceHandleCurl.cpp:
- (WebCore::ResourceHandle::willLoadFromCache):
- * platform/network/mac/ResourceHandleMac.mm:
- (WebCore::ResourceHandle::willLoadFromCache):
- * platform/network/qt/ResourceHandleQt.cpp:
- (WebCore::ResourceHandle::willLoadFromCache):
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::):
-
-2009-07-29 Alpha Lam <hclam@chromium.org>
-
- Reviewed by David Levin.
-
- Media control panel for <video> in MediaDocument is mis-placed
- https://bugs.webkit.org/show_bug.cgi?id=27798
-
- Fixing a rendering problem: When <video> is displayed in MediaDocument,
- the media control panel overlaps with the video by 16 pixels.
-
- No new tests as this is covered by existing media tests.
-
- * css/mediaControlsChromium.css:
-
-2009-07-29 Adam Barth <abarth@webkit.org>
-
- Unreviewed build fix for Chromium. Those last two patches weren't
- independent despite the clean merge.
-
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::V8AbstractEventListener):
-
-2009-07-29 Avi Drissman <avi@chromium.org>
-
- Reviewed by Darin Adler.
-
- ImageSourceCG makes bad data refs (race condition causes blank images)
- https://bugs.webkit.org/show_bug.cgi?id=27777
-
- Make ImageSourceCG guarantee that the lifetime of the SharedBuffer that
- backs the CFDataRef will be long enough.
-
- No new tests, as this fixes a bug with a race condition that is
- difficult to trigger.
-
- * platform/graphics/cg/ImageSourceCG.cpp:
- (WebCore::ImageSource::setData):
-
-2009-07-29 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: Console should show completions for the command line APIs
- https://bugs.webkit.org/show_bug.cgi?id=27696
-
- * inspector/front-end/Console.js:
- (WebInspector.Console.prototype._reportCompletions): Adds properties from _inspectorCommandLineAPI to
- completions when available.
- * inspector/front-end/utilities.js:
- (Object.properties): Added.
- (Object.sortedProperties):
-
-2009-07-29 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Refactor the first step of layout in RenderFlexibleBox.cpp
- https://bugs.webkit.org/show_bug.cgi?id=27704
-
- No new tests as this change is just a refactoring.
-
- * rendering/RenderFlexibleBox.cpp:
- (WebCore::gatherFlexChildrenInfo):
- (WebCore::RenderFlexibleBox::layoutHorizontalBox):
- (WebCore::RenderFlexibleBox::layoutVerticalBox):
-
-2009-07-29 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Nikolas Zimmermann.
-
- Fix a bug that HTMLOptionElement::value() returns an incorrect
- value in a case that the element has a label attribute and no
- value attribute.
- https://bugs.webkit.org/show_bug.cgi?id=27760
-
- Test: fast/forms/option-value-and-label.html
-
- * dom/OptionElement.cpp:
- (WebCore::OptionElement::collectOptionLabelOrText):
- (WebCore::OptionElement::collectOptionInnerText):
- (WebCore::OptionElement::normalizeText):
- (WebCore::OptionElement::collectOptionTextRespectingGroupLabel):
- (WebCore::OptionElement::collectOptionValue):
- * dom/OptionElement.h:
- * html/HTMLOptionElement.cpp:
- (WebCore::HTMLOptionElement::text):
- * wml/WMLOptionElement.cpp:
- (WebCore::WMLOptionElement::text):
-
-2009-07-29 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Fix isolated world wrappers for event handlers
- https://bugs.webkit.org/show_bug.cgi?id=27533
-
- Instead of getting the context from the frame, we cache the context
- when the listener is created so that we get the context for the right
- world.
-
- Test: http/tests/security/isolatedWorld/click-event.html
-
- * WebCore.gypi:
- * bindings/v8/OwnHandle.h: Added.
- (WebCore::OwnHandle::OwnHandle):
- (WebCore::OwnHandle::~OwnHandle):
- (WebCore::OwnHandle::get):
- (WebCore::OwnHandle::set):
- (WebCore::OwnHandle::release):
- (WebCore::OwnHandle::adopt):
- (WebCore::OwnHandle::swap):
- (WebCore::OwnHandle::clear):
- (WebCore::OwnHandle::makeWeak):
- (WebCore::OwnHandle::weakCallback):
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::V8AbstractEventListener):
- (WebCore::V8AbstractEventListener::handleEvent):
- * bindings/v8/V8AbstractEventListener.h:
- * bindings/v8/V8DOMWrapper.h:
-
-2009-07-29 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Teach V8Proxy::context about isolated worlds
- https://bugs.webkit.org/show_bug.cgi?id=27701
-
- Change V8Proxy::context(Frame*) to understand isolated worlds. Audit
- all callers of this method to make sure they want isolated worlds. In
- cases where we really want the main world, I've changed the call to
- V8Proxy::mainWorldContext(Frame*).
-
- The main visible change is to the document.open method when called with
- more than two arguments. This design seems more likely to lead to
- future correct code.
-
- Test: http/tests/security/isolatedWorld/document-open.html
-
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::processingUserGesture):
- (WebCore::ScriptController::evaluate):
- (WebCore::ScriptController::bindToWindowObject):
- (WebCore::ScriptController::collectGarbage):
- (WebCore::createScriptObject):
- (WebCore::ScriptController::createScriptObjectForPluginElement):
- * bindings/v8/ScriptObjectQuarantine.cpp:
- (WebCore::getQuarantinedScriptObject):
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::handleEvent):
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getConstructor):
- (WebCore::V8DOMWrapper::setHiddenWindowReference):
- (WebCore::V8DOMWrapper::convertNodeToV8Object):
- (WebCore::V8DOMWrapper::convertWindowToV8Object):
- * bindings/v8/V8Helpers.cpp:
- (WebCore::toV8Context):
- * bindings/v8/V8LazyEventListener.cpp:
- (WebCore::V8LazyEventListener::getListenerFunction):
- (WebCore::V8LazyEventListener::getWrappedListenerFunction):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::context):
- (WebCore::V8Proxy::mainWorldContext):
- (WebCore::V8Proxy::bindJsObjectToWindow):
- * bindings/v8/V8Proxy.h:
-
-2009-07-29 Balazs Kelemen <kelemen.balazs.3@stud.u-szeged.hu>
-
- Reviewed by Simon Hausmann.
-
- Fix the Qt build, add missing file.
-
- * WebCore.pro:
-
-2009-07-28 Jon Honeycutt <jhoneycutt@apple.com>
-
- Speculative fix for <rdar://problem/7005077> WER: Crash in
- WebCore::PluginStream::destroyStream+279 (1310510882)
-
- Reviewed by Oliver Hunt.
-
- * plugins/PluginStream.cpp:
- (WebCore::PluginStream::destroyStream):
- Move the "protector" RefPtr out of the block that dispatches
- notifications and into the function level; if NPN_DestroyStream were
- called from NPP_NewStream as the comment warns, we would be deleted at
- the end of the block.
-
-2009-07-28 Joseph Pecoraro <joepeck02@gmail.com>
-
- Inspector: Tab Through the DOM Storage DataGrid when Editing
-
- https://bugs.webkit.org/show_bug.cgi?id=27746
-
- Reviewed by Timothy Hatcher.
-
- * inspector/front-end/DOMStorageDataGrid.js:
- (WebInspector.DOMStorageDataGrid.prototype._startEditingColumnOfDataGridNode): refactored to directly edit and select a column
- (WebInspector.DOMStorageDataGrid.prototype._startEditing):
- (WebInspector.DOMStorageDataGrid.prototype._editingCommitted.moveToNextIfNeeded): handles moveDirection on a commit
- (WebInspector.DOMStorageDataGrid.prototype._editingCommitted): uses moveToNext to traverse appropriately
-
-2009-07-28 Joseph Pecoraro <joepeck02@gmail.com>
-
- Inspector: Create New DOM Storage Items via DataGrid
-
- https://bugs.webkit.org/show_bug.cgi?id=27322
-
- Reviewed by Timothy Hatcher.
-
- * inspector/front-end/DOMStorageDataGrid.js:
- (WebInspector.DOMStorageDataGrid.prototype._startEditing): click anyway means creationNode
- (WebInspector.DOMStorageDataGrid.prototype._editingCommitted): fix unintended globals
- (WebInspector.DOMStorageDataGrid.prototype.deleteSelectedRow): creationNode is special case
- * inspector/front-end/DataGrid.js:
- (WebInspector.DataGrid.prototype.addCreationNode): maintain a quick ref to the single creationNode
- (WebInspector.CreationDataGridNode): new type of node
- (WebInspector.CreationDataGridNode.prototype.makeNormal): convert to a normal node
- * inspector/front-end/DatabasesPanel.js:
- (WebInspector.DatabasesPanel.prototype.dataGridForDOMStorage): add a creationNode to the GridData
-
-2009-07-28 Joseph Pecoraro <joepeck02@gmail.com>
-
- Inspector: Automatically Refresh DOM Storage Grids on "storage" event
-
- https://bugs.webkit.org/show_bug.cgi?id=27400
-
- Reviewed by Timothy Hatcher.
-
- * inspector/front-end/DatabasesPanel.js:
- (WebInspector.DatabasesPanel.prototype.show): trigger adding the listener
- (WebInspector.DatabasesPanel.prototype.reset): trigger removing the listener
- (WebInspector.DatabasesPanel.prototype._registerStorageEventListener): register the listener on the inspected window
- (WebInspector.DatabasesPanel.prototype._unregisterStorageEventListener): unregister the listener on the inspected window
- (WebInspector.DatabasesPanel.prototype._storageEvent): handle the storage event
-
-2009-07-28 Keishi Hattori <casey.hattori@gmail.com>
-
- Inspector should support inspect() in the command line.
-
- https://bugs.webkit.org/show_bug.cgi?id=19874
- rdar://problem/6070225
-
- Reviewed by Timothy Hatcher.
-
- * inspector/front-end/Console.js:
- (WebInspector.Console.prototype._ensureCommandLineAPIInstalled.inspectObject):
- (WebInspector.Console.prototype._ensureCommandLineAPIInstalled):
- * inspector/front-end/DatabasesPanel.js:
- (WebInspector.DatabasesPanel.prototype.revealAndSelectDomStorage): Added.
- (WebInspector.DatabasesPanel.prototype.revealAndSelectDatabase): Added.
- (WebInspector.DatabasesPanel.prototype.showDatabase):
-
-2009-07-28 Keishi Hattori <casey.hattori@gmail.com>
-
- The rest of: Web Inspector: Add inspected node using public console API.
-
- https://bugs.webkit.org/show_bug.cgi?id=27758
-
- Reviewed by Timothy Hatcher.
-
- * inspector/front-end/Console.js:
- (WebInspector.Console.prototype._ensureCommandLineAPIInstalled): Removed _inspectorCommandLineAPI._addInspectedNode.
- (WebInspector.Console.prototype.addInspectedNode): Added.
-
-2009-07-28 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Accept autocomplete on 'End' key pressed.
-
- https://bugs.webkit.org/show_bug.cgi?id=27447.
-
- * inspector/front-end/TextPrompt.js:
- (WebInspector.TextPrompt.prototype.handleKeyEvent):
-
-2009-07-28 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by David Levin.
-
- [Qt] Build fix after r46502
- https://bugs.webkit.org/show_bug.cgi?id=27789
-
- * WebCore.pro: Remove StorageArea.cpp
-
-2009-07-28 Mark Rowe <mrowe@apple.com>
-
- Reviewed by Darin Adler.
-
- Follow-on fix to r35582. Replace main thread assertions with WebCoreObjCScheduleDeallocateOnMainThread
- in -dealloc overrides in DOMObject subclasses.
-
- * bindings/scripts/CodeGeneratorObjC.pm:
-
-2009-07-28 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by Adam Treat.
-
- [WML] WML*Element classes mostly implement insertedIntoDocument(), not removedFromDocument()
- https://bugs.webkit.org/show_bug.cgi?id=27786
-
- WML*Element classes mostly implement insertedIntoDocument(), not removedFromDocument().
- The only case where this is relevant in WML is error handling. The parsed WML
- tree fragment is inserted in an XHTML compound error document. This requires
- removedFromDocument() to be correctly implemented otherwhise we run into
- trouble (visible when using run-webkit-tests fast/wml --random).
-
- * wml/WMLAnchorElement.cpp:
- (WebCore::WMLAnchorElement::registerTask):
- (WebCore::WMLAnchorElement::deregisterTask):
- * wml/WMLAnchorElement.h:
- * wml/WMLDoElement.cpp:
- (WebCore::WMLDoElement::removedFromDocument):
- (WebCore::WMLDoElement::registerTask):
- (WebCore::WMLDoElement::deregisterTask):
- * wml/WMLDoElement.h:
- * wml/WMLEventHandlingElement.cpp:
- (WebCore::WMLEventHandlingElement::registerDoElement):
- (WebCore::WMLEventHandlingElement::deregisterDoElement):
- * wml/WMLEventHandlingElement.h:
- * wml/WMLFieldSetElement.cpp:
- (WebCore::WMLFieldSetElement::removedFromDocument):
- * wml/WMLGoElement.cpp:
- (WebCore::WMLGoElement::registerPostfieldElement):
- (WebCore::WMLGoElement::deregisterPostfieldElement):
- * wml/WMLGoElement.h:
- * wml/WMLIntrinsicEventHandler.cpp:
- (WebCore::WMLIntrinsicEventHandler::deregisterIntrinsicEvent):
- * wml/WMLIntrinsicEventHandler.h:
- * wml/WMLOnEventElement.cpp:
- (WebCore::eventHandlingParent):
- (WebCore::WMLOnEventElement::registerTask):
- (WebCore::WMLOnEventElement::deregisterTask):
- * wml/WMLOnEventElement.h:
- * wml/WMLPostfieldElement.cpp:
- (WebCore::WMLPostfieldElement::removedFromDocument):
- * wml/WMLPostfieldElement.h:
- * wml/WMLSetvarElement.cpp:
- (WebCore::WMLSetvarElement::removedFromDocument):
- * wml/WMLSetvarElement.h:
- * wml/WMLTaskElement.cpp:
- (WebCore::WMLTaskElement::removedFromDocument):
- (WebCore::WMLTaskElement::registerVariableSetter):
- (WebCore::WMLTaskElement::deregisterVariableSetter):
- (WebCore::WMLTaskElement::storeVariableState):
- * wml/WMLTaskElement.h:
- * wml/WMLTimerElement.cpp:
- (WebCore::WMLTimerElement::removedFromDocument):
- * wml/WMLTimerElement.h:
-
-2009-07-28 David Levin <levin@chromium.org>
-
- Suggested by Drew Wilson.
-
- Speculative gtk build fix, follow up to:
- https://bugs.webkit.org/show_bug.cgi?id=27697
-
- * GNUmakefile.am:
-
-2009-07-28 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Simon Fraser.
-
- [CSS3 Backgrounds and Borders] Drop the prefix from the border-radius
- properties
- https://bugs.webkit.org/show_bug.cgi?id=27578
-
- [CSS3 Backgrounds and Borders] Handle the / and 4 values in
- border-radius
- https://bugs.webkit.org/show_bug.cgi?id=27584
-
- Test: fast/borders/border-radius-parsing.html
-
- Dropped the -webkit- prefix from the individual corner border-radius
- properties. Added border-radius with the / and 4-value syntax, and
- maintained -webkit-border-radius with legacy 2-value syntax.
-
- * css/CSSComputedStyleDeclaration.cpp:
- (computedProperties): Removed Webkit prefix.
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Ditto.
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue): Removed Webkit prefix from the
- single-corner properties. Call out to parseBorderRadius() to parse
- border-radius and -webkit-border-radius.
- (WebCore::completeBorderRadii): Added this helper function that
- completes the values for all four corners when fewer than four are
- specified.
- (WebCore::CSSParser::parseBorderRadius): Added.
- (WebCore::cssPropertyID): Map -webkit-border-*-*-radius to the
- unprefixed property.
- * css/CSSParser.h:
- * css/CSSPropertyLonghand.cpp:
- (WebCore::initShorthandMap): Removed the Webkit prefix. Added an entry
- for border-radius. Kept the entry for -webkit-border-radius.
- * css/CSSPropertyNames.in: Removed the -webkit- prefix from the
- single-corenr properties. Added border-radius. Kept
- -webkit-border-radius because of its conflicting syntax.
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty): Removed the Webkit prefix.
- * page/animation/AnimationBase.cpp:
- (WebCore::ensurePropertyMap): Ditto.
-
-2009-07-28 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- Refactored dedicated-worker-specific code from WorkerThread into DedicatedWorkerThread class.
-
- WorkerThread needs to be refactored to separate out dedicated-worker functionality.
- https://bugs.webkit.org/show_bug.cgi?id=27697
-
- This is just a refactoring, so existing tests suffice.
-
- * GNUmakefile.am:
- Added DedicatedWorkerThread.h/.cpp
- * WebCore.gypi:
- Added DedicatedWorkerThread.h/.cpp
- * WebCore.pro:
- Added DedicatedWorkerThread.h/.cpp
- * WebCore.vcproj/WebCore.vcproj:
- Added DedicatedWorkerThread.h/.cpp
- * WebCore.xcodeproj/project.pbxproj:
- Added DedicatedWorkerThread.h/.cpp
- * bindings/js/WorkerScriptController.cpp:
- (WebCore::WorkerScriptController::evaluate):
- Removed code to track pending activity - this is handled by DedicatedWorkerContext::importScripts() now.
- * bindings/v8/WorkerScriptController.cpp:
- (WebCore::WorkerScriptController::evaluate):
- Removed code to track pending activity - this is handled by DedicatedWorkerContext::importScripts() now.
- * workers/DedicatedWorkerContext.cpp:
- (WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
- (WebCore::DedicatedWorkerContext::addMessage):
- Forwards console messages to parent document.
- (WebCore::DedicatedWorkerContext::importScripts):
- Now sends the updated pending activity status after importing scripts.
- (WebCore::DedicatedWorkerContext::thread):
- Helper routine that casts WorkerThread to DedicatedWorkerThread.
- * workers/DedicatedWorkerContext.h:
- (WebCore::DedicatedWorkerContext::create):
- * workers/DedicatedWorkerThread.cpp: Added.
- (WebCore::DedicatedWorkerThread::create):
- (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
- (WebCore::DedicatedWorkerThread::~DedicatedWorkerThread):
- (WebCore::DedicatedWorkerThread::createWorkerContext):
- Implementation of the base class factory method to create the appropriate worker context.
- (WebCore::DedicatedWorkerThread::runEventLoop):
- Reports pending activity before running the event loop.
- * workers/DedicatedWorkerThread.h: Added.
- (WebCore::DedicatedWorkerThread::workerObjectProxy):
- Moved from base class.
- * workers/WorkerContext.cpp:
- * workers/WorkerContext.h:
- * workers/WorkerMessagingProxy.cpp:
- (WebCore::WorkerMessagingProxy::startWorkerContext):
- Now creates DedicatedWorkerThread.
- (WebCore::WorkerMessagingProxy::workerThreadCreated):
- Now is passed a DedicatedWorkerThread.
- * workers/WorkerMessagingProxy.h:
- * workers/WorkerThread.cpp:
- (WebCore::WorkerThread::WorkerThread):
- Moved workerObjectProxy param into derived class constructor.
- (WebCore::WorkerThread::workerThread):
- (WebCore::WorkerThread::runEventLoop):
- Moved the event loop execution into a virtual function so DedicatedWorkerThread could report pending activity first.
- * workers/WorkerThread.h:
- (WebCore::WorkerThread::workerContext):
-
-2009-07-28 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Fix V8NPUtils' handling of UTF8 identifiers.
-
- https://bugs.webkit.org/show_bug.cgi?id=27782
-
- * bindings/v8/V8NPUtils.cpp:
- (getStringIdentifier): Treat the input string as UTF8 instead of ASCII,
- since NPN_GetStringIdentifier() is expecting UTF8.
-
-2009-07-28 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Misc cleanup in DOM Storage.
- https://bugs.webkit.org/show_bug.cgi?id=27517
-
- The StorageAreaImpl changes are all for Chromium. Because the DOM Storage implementation
- runs in a different process from where the Frame object lives, Chromium passes in NULL
- for the sourceFrame. This affects events and handling privateBrowsing. Chromium's
- incognito mode does not use the private browsing setting, so that's not a concern. As for
- events, I've decided to simply disable them for now.
-
- The StorageNamespaceImpl changes get rid of a stale comment (path is .copy'ed for thread-
- safety) and to add an assert that .copy is only ever called on a SessionStorage namespace.
-
- Also cleaned up tailing whitespace in several parts of StorageAreaImpl.cpp
-
- * storage/StorageArea.cpp: Removed. (It was empty anyway.)
- * storage/StorageAreaImpl.cpp:
- (WebCore::privateBrowsingEnabled): Factored out the check.
- (WebCore::StorageAreaImpl::setItem): Make frame optional.
- (WebCore::StorageAreaImpl::removeItem): ditto
- (WebCore::StorageAreaImpl::clear): ditto
- (WebCore::StorageAreaImpl::dispatchStorageEvent): Disable in Chromium for now.
- * storage/StorageNamespaceImpl.cpp:
- (WebCore::StorageNamespaceImpl::StorageNamespaceImpl): Remove stale comment.
- (WebCore::StorageNamespaceImpl::copy): Add assert that it's SessionStorage.
-
-2009-07-28 Alpha Lam <hclam@google.com>
-
- Reviewed by David Levin.
-
- [chromium] Default UI controls for <video> has rendering problems
- https://bugs.webkit.org/show_bug.cgi?id=27669
-
- Fixes the bug that <video> in MediaDocument is 1 pixel tall if
- it is playing an audio file by changing the style to be 32px
- tall.
-
- Also fixes a problem of default styled audio tag that hides the
- all the time digits by expanding the width to 300px.
-
- Changed the size and position of the current time and remaining
- display to give enough space for the hour digit to be shown.
-
- There are no new tests provided because this is already covered
- by existing tests.
-
- * css/mediaControlsChromium.css:
-
-2009-07-28 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Eric Seidel.
-
- Fix style in PluginPackage and PluginDatabase.
- Part of https://bugs.webkit.org/show_bug.cgi?id=27651
-
- * plugins/PluginDatabase.cpp:
- (WebCore::PluginDatabase::refresh):
- (WebCore::PluginDatabase::findPlugin):
- * plugins/PluginDatabase.h:
- * plugins/PluginPackage.cpp:
- (WebCore::PluginPackage::~PluginPackage):
- (WebCore::PluginPackage::freeLibrarySoon):
- (WebCore::PluginPackage::freeLibraryTimerFired):
- (WebCore::PluginPackage::unloadWithoutShutdown):
- (WebCore::PluginPackage::initializeBrowserFuncs):
- * plugins/PluginPackage.h:
-
-2009-07-28 Anantanarayanan Iyengar <ananta@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- https://bugs.webkit.org/show_bug.cgi?id=27769
- The V8 bindings function V8Proxy::createNewContext can be
- called during frame shutdown where the activeDocumentLoader
- function in FrameLoader can return NULL. Added a check for the
- same.
-
- No new tests added as this is an edge case where the V8
- bindings code is reentered via NPAPI during shutdown. It is
- difficult to write a consistently reproducible test for this.
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::createNewContext):
-
-2009-07-28 Ivan Posva <iposva@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Associate the CanvasPixelData backing store with the
- indexed properties of the wrapper object.
-
- https://bugs.webkit.org/show_bug.cgi?id=27773
-
- No new tests: Relying on existing Canvas tests.
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getTemplate):
- (WebCore::V8DOMWrapper::convertToV8Object):
-
-2009-07-28 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- Nuke all references to JSWorkerContextBase.lut.h, it was removed
- back in April.
-
- * GNUmakefile.am:
-
-2009-07-28 Robert Agoston <Agoston.Robert@stud.u-szeged.hu>
-
- Reviewed by Simon Hausmann.
-
- Fixed references to script generate-webkitversion.pl, and
- removed duplicated generate-webkitversion.pl
-
- https://bugs.webkit.org/show_bug.cgi?id=27158
-
- * WebCore.pro:
- * platform/generate-webkitversion.pl: Removed.
-
-2009-07-28 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Dmitry Glazkov.
-
- Web Inspector: encapsulate ScriptState into the ScriptObject, get rid of
- InspectorJSONObject.
-
- https://bugs.webkit.org/show_bug.cgi?id=27766
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * bindings/js/ScriptArray.cpp:
- (WebCore::ScriptArray::ScriptArray):
- (WebCore::ScriptArray::set):
- (WebCore::ScriptArray::length):
- (WebCore::ScriptArray::createNew):
- * bindings/js/ScriptArray.h:
- * bindings/js/ScriptFunctionCall.cpp:
- (WebCore::ScriptFunctionCall::construct):
- * bindings/js/ScriptObject.cpp:
- (WebCore::ScriptObject::ScriptObject):
- (WebCore::ScriptObject::set):
- (WebCore::ScriptObject::createNew):
- (WebCore::ScriptGlobalObject::get):
- * bindings/js/ScriptObject.h:
- * bindings/js/ScriptObjectQuarantine.cpp:
- (WebCore::getQuarantinedScriptObject):
- * bindings/v8/ScriptArray.cpp:
- (WebCore::ScriptArray::ScriptArray):
- (WebCore::ScriptArray::set):
- (WebCore::ScriptArray::length):
- (WebCore::ScriptArray::createNew):
- * bindings/v8/ScriptArray.h:
- * bindings/v8/ScriptFunctionCall.cpp:
- (WebCore::ScriptFunctionCall::construct):
- * bindings/v8/ScriptObject.cpp:
- (WebCore::ScriptObject::ScriptObject):
- (WebCore::ScriptObject::set):
- (WebCore::ScriptObject::createNew):
- (WebCore::ScriptGlobalObject::get):
- * bindings/v8/ScriptObject.h:
- (WebCore::ScriptObject::ScriptObject):
- * bindings/v8/ScriptObjectQuarantine.cpp:
- (WebCore::getQuarantinedScriptObject):
- * inspector/ConsoleMessage.cpp:
- (WebCore::ConsoleMessage::addToConsole):
- * inspector/InspectorDOMStorageResource.cpp:
- (WebCore::InspectorDOMStorageResource::bind):
- * inspector/InspectorDatabaseResource.cpp:
- (WebCore::InspectorDatabaseResource::bind):
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::newScriptArray):
- (WebCore::InspectorFrontend::newScriptObject):
- (WebCore::InspectorFrontend::addMessageToConsole):
- (WebCore::InspectorFrontend::addResource):
- (WebCore::InspectorFrontend::updateResource):
- (WebCore::InspectorFrontend::addDatabase):
- (WebCore::InspectorFrontend::addDOMStorage):
- * inspector/InspectorFrontend.h:
- * inspector/InspectorJSONObject.cpp: Removed.
- * inspector/InspectorJSONObject.h: Removed.
- * inspector/InspectorResource.cpp:
- (WebCore::populateHeadersObject):
- (WebCore::InspectorResource::createScriptObject):
- (WebCore::InspectorResource::updateScriptObject):
-
-2009-07-28 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by George Staikos.
-
- [WML] Variable substitution recursion seems to have bugs
- https://bugs.webkit.org/show_bug.cgi?id=27726
-
- Allow <setvar> elements to depend on the value specified by preceeding <setvar> elements.
- Required by the specification - assure it only works in linear order. A setvar element may
- not depend on the variable state of a following setvar element, only the previous ones.
-
- Extend wml/variable-reference-valid.html layout test to cover these cases.
-
- * wml/WMLTaskElement.cpp:
- (WebCore::WMLTaskElement::storeVariableState):
-
-2009-07-28 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by George Staikos.
-
- [WML] Page title doesn't update after variable substitution, if it contained variables
- https://bugs.webkit.org/show_bug.cgi?id=27725
-
- Fix bug in containsVariableReference() function, we we're decreasing the nameEndPosition
- too much, leading to a bug with 1-char variable names, which were not detected properly.
-
- Extend wml/variable-reference-valid.html layout test to cover 1-char variable names.
- Also fixes manual-tests/wml/task-refresh-in-anchor.wml, which happened to use 1-char variable names.
-
- * wml/WMLVariables.cpp:
- (WebCore::containsVariableReference):
-
-2009-07-28 Robert Hogan <robert@roberthogan.net>
-
- Reviewed by Simon Hausmann.
-
- Add WebKit version API to Qt.
-
- Get the current version of WebKit from WebKit/mac/Configurations/Version.xcconfig
- at compile time and make it available to webkit ports through WebKitVersion.h.
-
- https://bugs.webkit.org/show_bug.cgi?id=27158
-
- * WebCore.pro: Call generate-webkitversion.pl
-
-2009-07-28 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Unreviewed make dist build fix.
-
- * GNUmakefile.am:
-
-2009-07-28 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by Adam Treat.
-
- Replace hardcoded separator text with proper separator.
- Also adjusts include order as per style guidelines.
-
- https://bugs.webkit.org/show_bug.cgi?id=27763
-
- * platform/qt/PopupMenuQt.cpp:
- (WebCore::PopupMenu::populate):
-
-2009-07-28 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Steve Falkenburg.
-
- Add output directory for VS pre-build steps to enable out-of-tree builds
-
- https://bugs.webkit.org/show_bug.cgi?id=27700
-
- The tmp.obj file is now placed in the intermediate build directory.
-
- * WebCore.vcproj/WebCoreCommon.vsprops:
-
-2009-07-28 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Add inspected node using public console API.
-
- https://bugs.webkit.org/show_bug.cgi?id=27758
-
- * inspector/front-end/Console.js:
- (WebInspector.Console.prototype.addInspectedNode):
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
- (WebInspector.ElementsPanel):
-
-2009-07-28 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by George Staikos.
-
- [WML] <do> elements with a <noop> task shouldn't be exposed to the user
- https://bugs.webkit.org/show_bug.cgi?id=27724
-
- Fix WMLNoopElement to disable it's parent WMLDoElement, as required by the spec.
- Moved manual-tests/wml/task-noop-in-do.wml to LayoutTests/fast/wml/task-noop-in-do.wml.
-
- * manual-tests/wml/task-noop-in-do.wml: Removed.
- * wml/WMLNoopElement.cpp:
- (WebCore::WMLNoopElement::insertedIntoDocument):
-
-2009-07-28 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Disable some compiler warnings for the win build
- https://bugs.webkit.org/show_bug.cgi?id=27709
-
- * WebCore.pro: Move the msvc options to WebKit.pri
-
-2009-07-28 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Reviewed by Tor Arne Vestbø
-
- Make equality checks for logging channel names ignore casing.
-
- * platform/Logging.cpp:
- (WebCore::getChannelFromName):
-
-2009-07-28 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Reviewed by Xan Lopez.
-
- [Gtk] Refactor ResourceHandleSoup - make start* functions static
- https://bugs.webkit.org/show_bug.cgi?id=27687
-
- * platform/network/ResourceHandle.h:
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::startData):
- (WebCore::startHttp):
- (WebCore::):
-
-2009-07-28 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- https://bugs.webkit.org/show_bug.cgi?id=25415
- [GTK][ATK] Please implement support for get_text_at_offset
-
- Do not cache the pango layout in the object, since the layout of
- the page can change between calls.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
-
-2009-07-23 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Adam Barth.
-
- Simplify management of Nodes in weak handles callbacks.
- https://bugs.webkit.org/show_bug.cgi?id=27628
-
- * bindings/v8/V8DOMMap.cpp:
- (WebCore::weakNodeCallback):
-
-2009-07-28 Brian Weinstein <bweinstein@apple.com>
-
- Rubber-stamped by David Levin.
-
- Fix error handling of GetIconInfo (returns a bool).
-
- * platform/win/DragImageWin.cpp:
- (WebCore::createDragImageIconForCachedImage):
-
-2009-07-27 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Jon Honeycutt.
-
- Fix of <rdar://5015949> Drag Icon is not produced for over sized images.
-
- Implemented the createDragImageIconForCachedImage function by using the Windows
- SHFILEINFO structure.
-
- * platform/win/DragImageWin.cpp:
- (WebCore::createDragImageIconForCachedImage):
-
-2009-07-25 Adam Barth <abarth@webkit.org>
-
- Reviewed by David Levin.
-
- [V8] Split up V8DOMMap.cpp by class
- https://bugs.webkit.org/show_bug.cgi?id=27685
-
- No behavior change. Just copy-and-paste.
-
- * WebCore.gypi:
- * bindings/v8/ChildThreadDOMData.cpp: Added.
- (WebCore::ChildThreadDOMData::ChildThreadDOMData):
- (WebCore::ChildThreadDOMData::getStore):
- * bindings/v8/ChildThreadDOMData.h: Added.
- * bindings/v8/DOMData.cpp: Added.
- (WebCore::DOMData::DOMData):
- (WebCore::DOMData::getCurrent):
- (WebCore::DOMData::getCurrentMainThread):
- (WebCore::DOMData::handleWeakObject):
- (WebCore::DOMData::ensureDeref):
- (WebCore::DOMData::derefObject):
- (WebCore::DOMData::derefDelayedObjects):
- (WebCore::DOMData::derefDelayedObjectsInCurrentThread):
- (WebCore::DOMData::removeObjectsFromWrapperMap):
- * bindings/v8/DOMData.h: Added.
- (WebCore::):
- * bindings/v8/DOMDataStore.cpp: Added.
- (WebCore::DOMDataStore::DOMDataStore):
- (WebCore::DOMDataStore::~DOMDataStore):
- (WebCore::DOMDataStore::allStores):
- (WebCore::DOMDataStore::allStoresMutex):
- (WebCore::DOMDataStore::getDOMWrapperMap):
- (WebCore::forget):
- (WebCore::DOMDataStore::weakDOMObjectCallback):
- (WebCore::DOMDataStore::weakActiveDOMObjectCallback):
- (WebCore::DOMDataStore::weakNodeCallback):
- (WebCore::DOMDataStore::weakSVGElementInstanceCallback):
- (WebCore::DOMDataStore::weakSVGObjectWithContextCallback):
- * bindings/v8/DOMDataStore.h: Added.
- (WebCore::DOMDataStore::):
- (WebCore::DOMDataStore::InternalDOMWrapperMap::InternalDOMWrapperMap):
- (WebCore::DOMDataStore::InternalDOMWrapperMap::forgetOnly):
- (WebCore::DOMDataStore::domData):
- (WebCore::DOMDataStore::domNodeMap):
- (WebCore::DOMDataStore::domObjectMap):
- (WebCore::DOMDataStore::activeDomObjectMap):
- (WebCore::DOMDataStore::domSvgElementInstanceMap):
- (WebCore::DOMDataStore::domSvgObjectWithContextMap):
- * bindings/v8/MainThreadDOMData.cpp: Added.
- (WebCore::MainThreadDOMData::MainThreadDOMData):
- (WebCore::MainThreadDOMData::getStore):
- * bindings/v8/MainThreadDOMData.h: Added.
- * bindings/v8/ScopedDOMDataStore.cpp: Added.
- (WebCore::ScopedDOMDataStore::ScopedDOMDataStore):
- (WebCore::ScopedDOMDataStore::~ScopedDOMDataStore):
- * bindings/v8/ScopedDOMDataStore.h: Added.
- * bindings/v8/StaticDOMDataStore.cpp: Added.
- (WebCore::StaticDOMDataStore::StaticDOMDataStore):
- * bindings/v8/StaticDOMDataStore.h: Added.
- * bindings/v8/V8DOMMap.cpp:
-
-2009-07-27 Mark Rowe <mrowe@apple.com>
-
- Reviewed by Darin Adler.
-
- <rdar://problem/7091036> REGRESSION: Microsoft Messenger crashes during file send/receive due to use of WebKit on non-main thread
-
- Add a method for detecting if we're being used within Microsoft Messenger.
-
- * WebCore.base.exp: Export applicationIsMicrosoftMessenger and sort existing entries.
- * platform/mac/RuntimeApplicationChecks.h:
- * platform/mac/RuntimeApplicationChecks.mm:
- (WebCore::applicationIsMicrosoftMessenger):
-
-2009-07-27 Jian Li <jianli@chromium.org>
-
- Reviewed by David Levin.
-
- [V8] Implement EventListener::reportError for V8 event listeners in worker context.
- https://bugs.webkit.org/show_bug.cgi?id=27731
-
- * bindings/v8/V8WorkerContextEventListener.cpp:
- (WebCore::V8WorkerContextEventListener::reportError):
- * bindings/v8/V8WorkerContextEventListener.h:
-
-2009-07-27 Stephen White <senorblanco@chromium.org>
-
- Reviewed by Eric Seidel and David Levin.
-
- Re-apply chromium/skia border fix (originally landed in r46157,
- reverted in r46363), since it was not the cause of the reliability
- failures in Chromium.
-
- http://bugs.webkit.org/show_bug.cgi?id=27388
-
- * platform/graphics/skia/GraphicsContextSkia.cpp:
- (WebCore::GraphicsContext::drawLine):
- * platform/graphics/skia/PlatformContextSkia.cpp:
- (PlatformContextSkia::setupPaintForStroking):
-
-2009-07-27 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Justin Garcia.
-
- createMarkup does not handle CSS properly
- https://bugs.webkit.org/show_bug.cgi?id=27660
-
- This patch isolates code that creates markup for styles in addStyleMarkup
- It also makes all presentational elements (u, s, strike, i, em, b, strong) special ancestor in createMarkup
- so that we can assume no text decoration style is passed to addStyleMarkup.
-
- * editing/markup.cpp:
- (WebCore::propertyMissingOrEqualToNone): Changed the first argument from CSSMutableStyleDecleration to CSSStyleDeclaration
- (WebCore::isElementPresentational): Used to be elementHasTextDecorationProperty, now supports presentational tags
- (WebCore::addStyleMarkup): Adds markup for style span and div
- (WebCore::createMarkup): Uses isElementPresentational and addStyleMarkup
-
-2009-07-27 Eric Seidel <eric@webkit.org>
-
- Reviewed by Adam Barth.
-
- fix more obvious global object lookups
- https://bugs.webkit.org/show_bug.cgi?id=27745
-
- No new tests for these changes. I believe in many cases
- testing to be impossible. Lack of testing justification next to
- each change below. The remaining pieces of bug 27634 will all
- need tests.
-
- * bindings/js/JSDOMWindowBase.cpp:
- (WebCore::JSDOMWindowBase::updateDocument): not testable.
- * bindings/js/JSDataGridColumnListCustom.cpp:
- (WebCore::JSDataGridColumnList::nameGetter): no testing for this incomplete feature.
- * bindings/js/JSEventListener.cpp:
- (WebCore::JSEventListener::handleEvent): would require outer frame to trigger an event in the inner frame
- * bindings/js/JSEventTarget.cpp:
- (WebCore::toJS): covered by other tests, always correct to pass the globalObject through.
- * bindings/js/JSHTMLElementCustom.cpp:
- (WebCore::JSHTMLElement::pushEventHandlerScope): unclear when this could be triggered.
- * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
- (WebCore::JSHTMLOptionsCollection::remove): toJS seems superfluous here to begin with.
- * bindings/js/JSLazyEventListener.cpp:
- (WebCore::JSLazyEventListener::parseCode): would require outer frame to trigger inner frame event.
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::jsObjectForPluginElement): only used for NPAPI binding, unclear how to test.
- * bindings/js/ScriptEventListener.cpp:
- (WebCore::createAttributeEventListener): unclear how to test.
- * bindings/js/ScriptObject.cpp:
- (WebCore::ScriptGlobalObject::set): unclear how to test/inspector only.
- * bindings/js/ScriptObjectQuarantine.cpp:
- (WebCore::getQuarantinedScriptObject): unclear how to test.
- * bindings/objc/DOMInternal.mm:
- (-[WebScriptObject _initializeScriptDOMNodeImp]): unclear how to test.
-
-2009-07-27 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by George Staikos.
-
- [WML] 'title' attribute handling not correct for <a> / <anchor> elements
- https://bugs.webkit.org/show_bug.cgi?id=27720
-
- Unify title() implementation in WMLElement instead of several copies of the same logic.
- We forgot WMLAnchorElement/WMLAElement, that lead to bugs. Fixes hovering links in the
- WML manual-test suite.
-
- * wml/WMLCardElement.cpp:
- * wml/WMLCardElement.h:
- * wml/WMLElement.cpp:
- (WebCore::WMLElement::title):
- * wml/WMLElement.h:
- * wml/WMLOptGroupElement.cpp:
- * wml/WMLOptGroupElement.h:
- * wml/WMLSelectElement.cpp:
- * wml/WMLSelectElement.h:
-
-2009-07-27 Adam Treat <adam.treat@torchmobile.com>
-
- Speculative build fix for Windows and WinCE.
-
- * plugins/win/PluginPackageWin.cpp:
- (WebCore::PluginPackage::load):
-
-2009-07-27 Ojan Vafai <ojan@chromium.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=27474
- Fixes crashes due to renderer getting destroyed in updateLayout.
- We need to call updateLayout before we call into the renderer.
- Removed the updateLayout call from RenderTextControl and moved it
- into the calling sites.
-
- Also changes updateLayout to updateLayoutIgnorePendingStylesheets so
- this works with pending stylesheets. Unfortunately, this seems to be
- untestable. Loading an external stylesheet and then having an inline
- script hit this code did not result in an pending stylesheets.
-
- The are other cases of this bug in the rendering code. I'll file a
- followup bug to audit the calls to updateLayout.
-
- Test: fast/dom/text-control-crash-on-select.html
-
- * dom/Document.h:
- (WebCore::Document::inStyleRecalc): Added so the ASSERTs in updateFocusAppearance
- and setSelectionRange could deal with cases of reentrancy into updateLayout
- calls. This happens in a couple layout tests.
- * dom/InputElement.cpp:
- (WebCore::InputElement::updateSelectionRange):
- * html/HTMLInputElement.cpp:
- (WebCore::isTextFieldWithRendererAfterUpdateLayout):
- (WebCore::HTMLInputElement::setSelectionStart):
- (WebCore::HTMLInputElement::setSelectionEnd):
- (WebCore::HTMLInputElement::select):
- * html/HTMLTextAreaElement.cpp:
- (WebCore::rendererAfterUpdateLayout):
- (WebCore::HTMLTextAreaElement::setSelectionStart):
- (WebCore::HTMLTextAreaElement::setSelectionEnd):
- (WebCore::HTMLTextAreaElement::select):
- (WebCore::HTMLTextAreaElement::setSelectionRange):
- (WebCore::HTMLTextAreaElement::updateFocusAppearance):
- * rendering/RenderTextControl.cpp:
- (WebCore::RenderTextControl::setSelectionRange):
-
-2009-07-27 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Dave Levin.
-
- [V8] Remove parameterless frame/window retrieval methods from V8Proxy.
- https://bugs.webkit.org/show_bug.cgi?id=27737
-
- Refactoring, no new behavior, covered by existing tests.
-
- * bindings/v8/ScriptCallStack.cpp:
- (WebCore::ScriptCallStack::ScriptCallStack):
- * bindings/v8/V8NPUtils.cpp:
- (convertV8ObjectToNPVariant): Ditto.
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::retrieve): Ditto.
- (WebCore::V8Proxy::canAccessPrivate): Ditto.
- * bindings/v8/V8Proxy.h: Removed parameterless retrieveWindow/retrieveProxy decls.
- * bindings/v8/custom/V8DatabaseCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL): Changed to use V8Proxy::retrieveFrameForCurrentContext().
- * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL): Ditto.
- * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL): Ditto.
- * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL): Ditto.
- * bindings/v8/custom/V8MessageChannelConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL): Ditto.
- * bindings/v8/custom/V8SQLTransactionCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL): Ditto.
- * bindings/v8/custom/V8WorkerCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL): Ditto.
- * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL): Ditto.
-
-2009-07-27 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by George Staikos.
-
- [WML] 'onpick' intrinsic event handling missing
- https://bugs.webkit.org/show_bug.cgi?id=27723
-
- Trigger 'onpick' intrinsic events from WMLOptionElement::setSelectedState().
- All was in place, just forgot to enable the relevant code.
-
- Fixes manual-tests/wml/select-onpick-event.wml
- Test: wml/option-element-onpick.html
-
- * wml/WMLOptionElement.cpp:
- (WebCore::WMLOptionElement::setSelectedState):
-
-2009-07-27 Alexey Proskuryakov <ap@webkit.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=27735
- Give a helpful name to JSLock constructor argument
-
- * bindings/js/GCController.cpp:
- (WebCore::collect):
- (WebCore::GCController::gcTimerFired):
- (WebCore::GCController::garbageCollectNow):
- * bindings/js/JSCustomPositionCallback.cpp:
- (WebCore::JSCustomPositionCallback::handleEvent):
- * bindings/js/JSCustomPositionErrorCallback.cpp:
- (WebCore::JSCustomPositionErrorCallback::handleEvent):
- * bindings/js/JSCustomSQLStatementCallback.cpp:
- (WebCore::JSCustomSQLStatementCallback::handleEvent):
- * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
- (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
- * bindings/js/JSCustomSQLTransactionCallback.cpp:
- (WebCore::JSCustomSQLTransactionCallback::handleEvent):
- * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
- (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
- * bindings/js/JSCustomVoidCallback.cpp:
- (WebCore::JSCustomVoidCallback::handleEvent):
- * bindings/js/JSCustomXPathNSResolver.cpp:
- (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
- * bindings/js/JSEventCustom.cpp:
- (WebCore::toJS):
- * bindings/js/JSEventListener.cpp:
- (WebCore::JSEventListener::handleEvent):
- * bindings/js/JSInspectorBackendCustom.cpp:
- (WebCore::JSInspectorBackend::currentCallFrame):
- (WebCore::JSInspectorBackend::profiles):
- * bindings/js/JSNodeFilterCondition.cpp:
- (WebCore::JSNodeFilterCondition::acceptNode):
- * bindings/js/ScheduledAction.cpp:
- (WebCore::ScheduledAction::executeFunctionInContext):
- * bindings/js/ScriptArray.cpp:
- (WebCore::ScriptArray::set):
- (WebCore::ScriptArray::createNew):
- * bindings/js/ScriptCachedFrameData.cpp:
- (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
- (WebCore::ScriptCachedFrameData::restore):
- (WebCore::ScriptCachedFrameData::clear):
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::evaluate):
- (WebCore::ScriptController::clearWindowShell):
- (WebCore::ScriptController::initScript):
- (WebCore::ScriptController::updateDocument):
- (WebCore::ScriptController::bindingRootObject):
- (WebCore::ScriptController::windowScriptNPObject):
- (WebCore::ScriptController::jsObjectForPluginElement):
- (WebCore::ScriptController::clearScriptObjects):
- * bindings/js/ScriptControllerMac.mm:
- (WebCore::ScriptController::windowScriptObject):
- * bindings/js/ScriptEventListener.cpp:
- (WebCore::createAttributeEventListener):
- * bindings/js/ScriptFunctionCall.cpp:
- (WebCore::ScriptFunctionCall::appendArgument):
- (WebCore::ScriptFunctionCall::call):
- (WebCore::ScriptFunctionCall::construct):
- * bindings/js/ScriptObject.cpp:
- (WebCore::ScriptObject::set):
- (WebCore::ScriptObject::createNew):
- (WebCore::ScriptGlobalObject::set):
- (WebCore::ScriptGlobalObject::get):
- (WebCore::ScriptGlobalObject::remove):
- * bindings/js/ScriptObjectQuarantine.cpp:
- (WebCore::quarantineValue):
- (WebCore::getQuarantinedScriptObject):
- * bindings/js/ScriptValue.cpp:
- (WebCore::ScriptValue::getString):
- * bindings/js/WorkerScriptController.cpp:
- (WebCore::WorkerScriptController::initScript):
- (WebCore::WorkerScriptController::evaluate):
- * bindings/objc/WebScriptObject.mm:
- (-[WebScriptObject callWebScriptMethod:withArguments:]):
- (-[WebScriptObject evaluateWebScript:]):
- (-[WebScriptObject setValue:forKey:]):
- (-[WebScriptObject valueForKey:]):
- (-[WebScriptObject removeWebScriptKey:]):
- (-[WebScriptObject stringRepresentation]):
- (-[WebScriptObject webScriptValueAtIndex:]):
- (-[WebScriptObject setWebScriptValueAtIndex:value:]):
- (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
- * bridge/NP_jsobject.cpp:
- (_NPN_InvokeDefault):
- (_NPN_Invoke):
- (_NPN_Evaluate):
- (_NPN_GetProperty):
- (_NPN_SetProperty):
- (_NPN_RemoveProperty):
- (_NPN_HasProperty):
- (_NPN_HasMethod):
- (_NPN_Enumerate):
- (_NPN_Construct):
- * bridge/c/c_class.cpp:
- (JSC::Bindings::CClass::~CClass):
- (JSC::Bindings::CClass::methodsNamed):
- (JSC::Bindings::CClass::fieldNamed):
- * bridge/c/c_instance.cpp:
- (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
- (JSC::Bindings::CInstance::invokeMethod):
- (JSC::Bindings::CInstance::invokeDefaultMethod):
- (JSC::Bindings::CInstance::invokeConstruct):
- (JSC::Bindings::CInstance::getPropertyNames):
- * bridge/c/c_runtime.cpp:
- (JSC::Bindings::CField::valueFromInstance):
- (JSC::Bindings::CField::setValueToInstance):
- * bridge/c/c_utility.cpp:
- (JSC::Bindings::convertValueToNPVariant):
- (JSC::Bindings::convertNPVariantToValue):
- * bridge/jni/jni_class.cpp:
- (JavaClass::JavaClass):
- (JavaClass::~JavaClass):
- * bridge/jni/jni_instance.cpp:
- (JavaInstance::stringValue):
- * bridge/jni/jni_jsobject.mm:
- (JavaJSObject::call):
- (JavaJSObject::eval):
- (JavaJSObject::getMember):
- (JavaJSObject::setMember):
- (JavaJSObject::removeMember):
- (JavaJSObject::getSlot):
- (JavaJSObject::setSlot):
- (JavaJSObject::toString):
- (JavaJSObject::convertValueToJObject):
- (JavaJSObject::convertJObjectToValue):
- * bridge/jni/jni_objc.mm:
- (JSC::Bindings::dispatchJNICall):
- * bridge/jni/jni_runtime.cpp:
- (JavaMethod::signature):
- * bridge/jni/jni_runtime.h:
- (JSC::Bindings::JavaString::JavaString):
- (JSC::Bindings::JavaString::_commonInit):
- (JSC::Bindings::JavaString::~JavaString):
- (JSC::Bindings::JavaString::UTF8String):
- * bridge/jni/jni_utility.cpp:
- (JSC::Bindings::convertValueToJValue):
- * bridge/objc/objc_instance.mm:
- (ObjcInstance::moveGlobalExceptionToExecState):
- (ObjcInstance::invokeMethod):
- (ObjcInstance::invokeDefaultMethod):
- (ObjcInstance::setValueOfUndefinedField):
- (ObjcInstance::getValueOfUndefinedField):
- * bridge/objc/objc_runtime.mm:
- (JSC::Bindings::ObjcField::valueFromInstance):
- (JSC::Bindings::ObjcField::setValueToInstance):
- * bridge/objc/objc_utility.mm:
- (JSC::Bindings::convertValueToObjcValue):
- (JSC::Bindings::convertNSStringToString):
- (JSC::Bindings::convertObjcValueToValue):
- * bridge/qt/qt_instance.cpp:
- (JSC::Bindings::QtRuntimeObjectImp::removeFromCache):
- (JSC::Bindings::QtInstance::~QtInstance):
- (JSC::Bindings::QtInstance::getQtInstance):
- (JSC::Bindings::QtInstance::createRuntimeObject):
- * bridge/qt/qt_runtime.cpp:
- (JSC::Bindings::convertValueToQVariant):
- (JSC::Bindings::convertQVariantToValue):
- (JSC::Bindings::QtRuntimeMetaMethod::call):
- (JSC::Bindings::QtRuntimeConnectionMethod::call):
- (JSC::Bindings::QtConnectionObject::execute):
- * bridge/runtime.cpp:
- (JSC::Bindings::Instance::createRuntimeObject):
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::addScriptProfile):
- * inspector/JavaScriptCallFrame.cpp:
- (WebCore::JavaScriptCallFrame::evaluate):
- * inspector/JavaScriptDebugServer.cpp:
- (WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
- * inspector/JavaScriptProfileNode.cpp:
- (WebCore::getTotalTime):
- (WebCore::getSelfTime):
- (WebCore::getTotalPercent):
- (WebCore::getSelfPercent):
- (WebCore::getNumberOfCalls):
- (WebCore::getChildren):
- (WebCore::getParent):
- (WebCore::getHead):
- (WebCore::getVisible):
- (WebCore::getCallUID):
- * plugins/PluginView.cpp:
- (WebCore::PluginView::start):
- (WebCore::getString):
- (WebCore::PluginView::performRequest):
- (WebCore::PluginView::bindingInstance):
- * plugins/gtk/PluginViewGtk.cpp:
- (WebCore::PluginView::dispatchNPEvent):
- (WebCore::PluginView::handleKeyboardEvent):
- (WebCore::PluginView::handleMouseEvent):
- (WebCore::PluginView::setNPWindowIfNeeded):
- (WebCore::PluginView::stop):
- (WebCore::PluginView::init):
- * plugins/mac/PluginViewMac.cpp:
- (WebCore::PluginView::stop):
- (WebCore::PluginView::setNPWindowIfNeeded):
- (WebCore::PluginView::dispatchNPEvent):
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::setNPWindowIfNeeded):
- (WebCore::PluginView::stop):
- (WebCore::PluginView::init):
- * plugins/win/PluginViewWin.cpp:
- (WebCore::PluginView::dispatchNPEvent):
- (WebCore::PluginView::handleKeyboardEvent):
- (WebCore::PluginView::handleMouseEvent):
- (WebCore::PluginView::setNPWindowRect):
- (WebCore::PluginView::stop):
-
-2009-07-27 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by George Staikos.
-
- WINCE PORT: Make plugin work for WINCE
- https://bugs.webkit.org/show_bug.cgi?id=27713
-
- * plugins/win/PluginDatabaseWin.cpp:
- (SHGetValue):
- (PathRemoveFileSpec):
- (WebCore::addWindowsMediaPlayerPluginDirectory):
- (WebCore::addMacromediaPluginDirectories):
- * plugins/win/PluginPackageWin.cpp:
- (WebCore::PluginPackage::load):
- * plugins/win/PluginViewWin.cpp:
- (WebCore::registerPluginView):
- (WebCore::PluginView::wndProc):
- (WebCore::PluginView::updatePluginWidget):
- (WebCore::PluginView::paintWindowedPluginIntoContext):
- (WebCore::PluginView::paint):
- (WebCore::PluginView::handleMouseEvent):
- (WebCore::PluginView::setParent):
- (WebCore::PluginView::setNPWindowRect):
- (WebCore::PluginView::stop):
- (WebCore::PluginView::init):
-
-2009-07-27 Joseph Pecoraro <joepeck02@gmail.com>
-
- Inspector: Tab Through Element Attributes and CSS Properties When Editing
-
- https://bugs.webkit.org/show_bug.cgi?id=27673
-
- Reviewed by Timothy Hatcher.
-
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeElement):
- (WebInspector.ElementsTreeElement.prototype._startEditing): refactored parameter
- (WebInspector.ElementsTreeElement.prototype._addNewAttribute): refactored to remove excess
- (WebInspector.ElementsTreeElement.prototype._triggerEditAttribute): provide an attribute name and this will start editing it
- (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted.moveToNextAttributeIfNeeded): move between attributes
- (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
- * inspector/front-end/StylesSidebarPane.js:
- (WebInspector.StylePropertiesSection.prototype.onpopulate):
- (WebInspector.StylePropertiesSection.prototype.findTreeElementWithName): search through treeElements for a style property name
- (WebInspector.StylePropertiesSection.prototype.addNewBlankProperty): initialize a blank property for adding new properties
- (WebInspector.StylePropertyTreeElement.prototype.updateTitle): add references to the name and value elements
- (WebInspector.StylePropertyTreeElement.prototype.):
- (WebInspector.StylePropertyTreeElement.prototype):
- * inspector/front-end/inspector.js:
- (WebInspector.startEditing.editingCommitted): include the move direction as a parameter to the commit callback
- (WebInspector.startEditing.element.handleKeyEvent): handle the tab key to specify the move direction
- (WebInspector.startEditing):
-
-2009-07-27 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by Adam Treat.
-
- Add mapping FontWeight to QFont::Weight values as requested via FIXME.
- https://bugs.webkit.org/show_bug.cgi?id=27663
-
- * platform/graphics/qt/FontCacheQt.cpp:
- (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
- * platform/graphics/qt/FontPlatformData.h:
- (WebCore::FontPlatformData::toQFontWeight):
- * platform/graphics/qt/FontPlatformDataQt.cpp:
- (WebCore::FontPlatformData::FontPlatformData):
-
-2009-07-27 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Adam Treat.
-
- When clearing the plugin database, clear also the timestamp map.
-
- https://bugs.webkit.org/show_bug.cgi?id=27651
-
- Currently, if we clear the database, it will still think that it is up
- to date with the plugin directories so refreshing the database again
- after changing the search paths may not work.
-
- * plugins/PluginDatabase.cpp:
- (WebCore::PluginDatabase::clear):
-
-2009-07-27 Albert J. Wong <ajwong@chromium.org>
-
- Reviewed by David Levin.
-
- Add in trivial implementation of FontPlatformData::description() for
- linux to fix build bustage in chromium.
-
- Fix chromium linux build by adding missing function implementation.
- https://bugs.webkit.org/show_bug.cgi?id=27732
-
- Tested with a build of chromium on linux.
-
- * platform/graphics/chromium/FontPlatformDataLinux.cpp:
- (WebCore::FontPlatformData::description):
- * platform/graphics/chromium/FontPlatformDataLinux.h:
-
-2009-07-27 Brent Fulgham <bfulgham@webkit.org>
-
- Build correct, no review.
-
- Final correction for WinCairo builds.
- CoreServices only exists in Apple builds, but
- some of its internal includes (e.g., <windows.h>) are needed
- for other Windows targets.
-
- * WebCorePrefix.h: When building for WinCairo, make sure
- to include <windows.h>, <stdio.h>, and <ConditionalMacros.h>
-
-2009-07-27 Michelangelo De Simone <micdesim@gmail.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=25552
- Added new "pattern" attribute to HTMLInputElement and validation code
- (validity.patternMismatch) as per HTML5 specs.
- http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#attr-input-pattern
-
- Tests: fast/forms/ValidityState-002.html
- fast/forms/ValidityState-patternMismatch-001.html
- fast/forms/ValidityState-patternMismatch-002.html
- fast/forms/ValidityState-patternMismatch-003.html
- fast/forms/ValidityState-patternMismatch-004.html
- fast/forms/ValidityState-patternMismatch-005.html
- fast/forms/ValidityState-patternMismatch-006.html
- fast/forms/ValidityState-patternMismatch-007.html
- fast/forms/pattern-attribute-001.html
- fast/forms/pattern-attribute-002.html
- fast/forms/pattern-attribute-003.html
-
- * html/HTMLAttributeNames.in: pattern attribute
- * html/HTMLFormControlElement.h:
- (WebCore::HTMLFormControlElement::patternMismatch): method definition
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::patternMismatch): validation method
- * html/HTMLInputElement.h:
- * html/HTMLInputElement.idl:
- * html/ValidityState.h:
- (WebCore::ValidityState::patternMismatch): validation flag
-
-2009-07-27 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by George Staikos.
-
- [WML] Manual WML tests aren't properly working
- https://bugs.webkit.org/show_bug.cgi?id=27718
-
- Fix file paths in the manual WML layout tests, remove unneeded tests (already covered by DRT tests).
- Add missing resources directory and test image. Reformat all testcases to a common style.
- Add new StartTests.wml file, which should be used as starting point to crawl through the manual tests.
-
- Filing bugs soon for all tests exposing bugs (7 in total).
-
- * manual-tests/wml/StartTests.wml: Added.
- * manual-tests/wml/a-br-element.wml:
- * manual-tests/wml/a-element.wml:
- * manual-tests/wml/a-img-element.wml:
- * manual-tests/wml/access-target.wml:
- * manual-tests/wml/anchor-br-element.wml:
- * manual-tests/wml/anchor-element.wml:
- * manual-tests/wml/anchor-img-element.wml:
- * manual-tests/wml/card-newcontext-attr.wml:
- * manual-tests/wml/card-onenterbackward.wml:
- * manual-tests/wml/card-onenterforward.wml:
- * manual-tests/wml/card-ontimer.wml:
- * manual-tests/wml/card-title-attr.wml: Removed.
- * manual-tests/wml/deck-access-control.wml:
- * manual-tests/wml/go-element.wml: Removed.
- * manual-tests/wml/input-emptyok.wml: Removed.
- * manual-tests/wml/input-format.wml:
- * manual-tests/wml/onevent-go.wml:
- * manual-tests/wml/onevent-noop.wml:
- * manual-tests/wml/onevent-prev.wml:
- * manual-tests/wml/onevent-refresh.wml:
- * manual-tests/wml/onevent-shadow.wml:
- * manual-tests/wml/postfield-get.wml: Removed.
- * manual-tests/wml/postfield-post.wml: Removed.
- * manual-tests/wml/resources: Added.
- * manual-tests/wml/resources/smiley.png: Added.
- * manual-tests/wml/select-element.wml:
- * manual-tests/wml/select-onpick-event.wml:
- * manual-tests/wml/setvar-element.wml:
- * manual-tests/wml/targetdeck.wml:
- * manual-tests/wml/task-go-in-anchor.wml:
- * manual-tests/wml/task-noop-in-do.wml:
- * manual-tests/wml/task-noop-in-onevent.wml: Removed.
- * manual-tests/wml/task-prev-in-anchor.wml:
- * manual-tests/wml/task-refresh-in-anchor.wml:
- * manual-tests/wml/template-go.wml:
- * manual-tests/wml/template-onevent.wml: Removed.
- * manual-tests/wml/template-ontimer.wml:
- * manual-tests/wml/timer.wml:
- * manual-tests/wml/variable-substitution.wml:
-
-2009-07-27 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Fix a regression introduced in r42671, which caused the js event
- object to be hidden (some websites depend on being able to access it).
-
- https://bugs.webkit.org/show_bug.cgi?id=27719
-
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::invokeEventHandler): Make the event object visible to javascript, instead of hidden.
-
-2009-07-27 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Removing a no-op block of code in DatabaseTracker.cpp that
- should've been removed in the patch for bug 26054.
-
- https://bugs.webkit.org/show_bug.cgi?id=27666
-
- All tests in WebCore/storage pass.
-
- * storage/DatabaseTracker.cpp:
- (WebCore::DatabaseTracker::fullPathForDatabase): Removed a no-op
- block of code that was moved to SQLiteFileSystem.cpp and should
- have been removed from DatabaseTracker.cpp
-
-2009-07-27 Jian Li <jianli@chromium.org>
-
- Reviewed by David Levin.
-
- Fix error handling in dedicated worker and worker context.
- https://bugs.webkit.org/show_bug.cgi?id=27525
-
- The following problems have been fixed:
- 1) The uncaught runtime script error is not reported using the
- WorkerGlobalScope object's onerror attribute.
- 2) If the error is still not handled afterwards (onerror attribute
- is not defined as a function or it returns true), the error should
- be reported back to the associated Worker object by firing an
- ErrorEvent.
- 3) If the error is still not handled by the associated Worker
- object, the error should be reported to the user.
-
- Test: fast/workers/worker-script-error.html
-
- * bindings/js/JSEventListener.cpp:
- (WebCore::JSEventListener::reportError):
- * bindings/js/JSEventListener.h:
- * dom/EventListener.h:
- (WebCore::EventListener::reportError): adds a function to call
- EventListener as a function with 3 arguments to report an error.
- * workers/AbstractWorker.cpp:
- (WebCore::AbstractWorker::dispatchScriptErrorEvent):
- * workers/AbstractWorker.h:
- * workers/DedicatedWorkerContext.cpp:
- (WebCore::DedicatedWorkerContext::reportException):
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::reportException):
- * workers/WorkerContext.h:
- * workers/WorkerMessagingProxy.cpp:
- (WebCore::WorkerExceptionTask::performTask):
- * workers/WorkerMessagingProxy.h:
-
-2009-07-27 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by George Staikos.
-
- [WML] History handling / page cache / loading is buggy and depends on several hacks
- https://bugs.webkit.org/show_bug.cgi?id=27707
-
- Redesign WML history/loading handling. In detail:
-
- - Remove FrameLoader::setForceReloadWmlDeck(). WML used to force a special loading behaviour
- by calling this method from WMLGoElement & friends - instead teach FrameLoader to detect
- WML content itself.
-
- WML content is usually a standalone WML document (isWMLDocument()=true) or as special case
- an XHTML document which embeds a WML document (that's the way the WML layout tests work).
- Force WML loading behaviour even for XHTML document which embed WML documents. This only
- applies to our layout tests, not for any real world site. Though it gives us a perfect
- way to test the WML loading code even when we're not operating on a standalone WML document.
-
- Whenever a WMLCardElement is inserted into the document it will check wheter it's inserted
- in a standalone WML document or wheter the main frame document is different. If it differs
- the main frame documents' "containsWMLContent" property is set to true.
-
- -> Make FrameLoader::shouldReload() use the new frameContainsWMLContent() method, which
- checks if the associated frame document is a WML document or wheter it contains WML content.
-
- - Change FrameLoader::loadItem() to use the new frameContainsWMLContent() method for 'shouldScroll'
- detection. WML documents (or those containing WML content) always want new loads even for in-page
- navigation. No "scroll to anchor" mechanism should apply.
-
- - Modify FrameLoader::canCachePageContainingThisFrame() to check for !frameContainsWMLContent().
- WML pages should never be cached, potential security problem due the use of variables (per spec).
-
- Add two new WML tests which were broken before, testing onenterforward/onenterbackward event handling
- and history navigation (<prev/> task).
-
- Tests: wml/enter-card-with-events.html
- wml/enter-first-card-with-events.html
-
- * dom/Document.cpp: Initialize new 'm_containsWMLContent' property.
- (WebCore::Document::Document):
- * dom/Document.h: Add new helper methods and 'm_containsWMLContent" variable (explained above).
- (WebCore::Document::setContainsWMLContent):
- (WebCore::Document::containsWMLContent):
- * history/BackForwardList.cpp:
- (WebCore::BackForwardList::clearWMLPageHistory): Renamed from clearWmlPageHistory() & slight cleanup.
- * history/BackForwardList.h:
- * loader/FrameLoader.cpp: Rework WML loading behaviour (explained above).
- (WebCore::FrameLoader::FrameLoader):
- (WebCore::frameContainsWMLContent):
- (WebCore::FrameLoader::canCachePageContainingThisFrame):
- (WebCore::FrameLoader::shouldReload):
- (WebCore::FrameLoader::loadItem):
- * loader/FrameLoader.h:
- * wml/WMLCardElement.cpp:
- (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded): No need anymore to manually track history length.
- (WebCore::WMLCardElement::insertedIntoDocument): Handle setting containsWMLContent on the main frame document.
- * wml/WMLGoElement.cpp:
- (WebCore::WMLGoElement::executeTask): Remove call to FrameLoader::setForceReloadWmlDeck()
- * wml/WMLPageState.cpp: Remove 'm_historyLength' - no need anymore to track history length on our own.
- (WebCore::WMLPageState::WMLPageState):
- (WebCore::WMLPageState::dump):
- (WebCore::WMLPageState::reset):
- * wml/WMLPageState.h:
-
-2009-07-27 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Adam Roben.
-
- Fix Chromium build breakage introduced in 46388.
-
- https://bugs.webkit.org/show_bug.cgi?id=27705
-
- * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
- (WebCore::FontPlatformData::description):
- * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
-
-2009-07-27 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Add some more debug logging to PluginViewMac.
-
- * plugins/mac/PluginViewMac.cpp:
-
-2009-07-27 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Jan Michael Alonzo.
-
- Remove dead code from the GTK NPAPI implementation.
-
- * plugins/gtk/PluginViewGtk.cpp:
-
-2009-07-27 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Buildfix on Windows.
- https://bugs.webkit.org/show_bug.cgi?id=27702
-
- * plugins/win/PluginViewWin.cpp:
- (WebCore::PluginView::hookedEndPaint):
- Constraint of (*endPaint) operand modified from "g" to "m" (memory) in inline
- assembly, because with "g" constraint, wrong assembly code generated.
-
-2009-07-27 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebCore bindings: Implement ScriptArray bindings.
-
- https://bugs.webkit.org/show_bug.cgi?id=27691
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/ScriptArray.cpp: Added.
- (WebCore::ScriptArray::ScriptArray):
- (WebCore::handleException):
- (WebCore::ScriptArray::set):
- (WebCore::length):
- (WebCore::ScriptArray::createNew):
- * bindings/js/ScriptArray.h: Added.
- (WebCore::ScriptArray::ScriptArray):
- (WebCore::ScriptArray::jsArray):
- * bindings/v8/ScriptArray.cpp: Added.
- (WebCore::ScriptArray::ScriptArray):
- (WebCore::ScriptArray::set):
- (WebCore::ScriptArray::length):
- (WebCore::ScriptArray::createNew):
- * bindings/v8/ScriptArray.h: Added.
- (WebCore::ScriptArray::ScriptArray):
- (WebCore::ScriptArray::~ScriptArray):
-
-2009-07-27 Brent Fulgham <bfulgham@webkit.org>
-
- Build correct, no review.
-
- Change in r46407 broke Apple Windows build.
- Switch to WinCairo-only test, to avoid any
- other platform break.
-
- * WebCorePrefix.h:
-
-2009-07-26 Brent Fulgham <bfulgham@webkit.org>
-
- Build correct, no review.
-
- Change in r46407 broke Apple Windows build.
-
- * WebCorePrefix.h: Use WTF_PLATFORM_CG to decide if
- CoreServices.h should be included.
-
-2009-07-26 Brent Fulgham <bfulgham@webkit.org>
-
- Build correction, no review.
-
- Change in r46195 broke WinCairo build.
-
- * WebCorePrefix.h: CoreServices should be ignored
- for non-Apple build.
-
-2009-07-26 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Implement the breakpoints sidebar pane.
- This change adds simple UI support into the existing
- BreakpointSidebarPane.
-
- https://bugs.webkit.org/show_bug.cgi?id=11175
-
- * inspector/front-end/Breakpoint.js:
- (WebInspector.Breakpoint.prototype.set enabled):
- (WebInspector.Breakpoint.prototype.get label):
- (WebInspector.Breakpoint.prototype.get id):
- * inspector/front-end/BreakpointsSidebarPane.js:
- (WebInspector.BreakpointsSidebarPane):
- (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint):
- (WebInspector.BreakpointsSidebarPane.prototype._appendBreakpointElement):
- (WebInspector.BreakpointsSidebarPane.prototype._appendBreakpointElement.labelClicked):
- (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint):
- (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged):
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel):
- (WebInspector.ScriptsPanel.prototype.scriptOrResourceForID):
- * inspector/front-end/inspector.css:
-
-2009-07-16 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Oliver Hunt.
-
- Canvas: rotation of 'no-repeat' pattern still has small error
- https://bugs.webkit.org/show_bug.cgi?id=26749
-
- Use 1<<22 as steps of no-repeat pattern to make the error less
- than 0.5. The previous value may cause 1 pixel errors.
-
- Add another test to show this bug clearly.
- Also add png expected image which was missing in the previous patch.
-
- Test: fast/canvas/image-pattern-rotate.html
-
- * platform/graphics/cg/PatternCG.cpp:
- (WebCore::Pattern::createPlatformPattern):
-
-2009-07-25 Kwang Yul Seo <skyul@company100.net>
-
- Reviewed by Darin Adler.
-
- Windows build break due to warning C4819
- https://bugs.webkit.org/show_bug.cgi?id=27416
-
- Disable C4819 warning to fix build.
-
- * WebCore.vcproj/QTMovieWin.vcproj:
- * WebCore.vcproj/WebCore.vcproj:
-
-2009-07-25 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Kevin McCullough.
-
- Inspector: Keyboard Shortcuts to Switch Panels
- https://bugs.webkit.org/show_bug.cgi?id=27286
-
- * inspector/front-end/inspector.js:
- (WebInspector.loaded): save a list of the order of the panels
- (WebInspector.documentKeyDown): handle the keyboard shortcuts to traverse the panels
-
-2009-07-25 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by George Staikos.
-
- [Qt] Fix build break after r46369
- https://bugs.webkit.org/show_bug.cgi?id=27680
-
- * WebCore.pro:
-
-2009-07-25 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by George Staikos.
-
- [WML] Variable substitution is buggy
- https://bugs.webkit.org/show_bug.cgi?id=27677
-
- Substitute variables upon attach() time instead of insertedIntoDocument(). Otherwhise variable substitution
- won't work during inter-deck jumps (same URL, different fragment). Covered by new test fast/wml/newcontext-same-deck.html.
-
- * dom/Text.cpp:
- (WebCore::Text::attach):
- * dom/Text.h:
-
-2009-07-25 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by George Staikos.
-
- [WML] WMLDoElement doesn't update its RenderButton object upon attach()
- https://bugs.webkit.org/show_bug.cgi?id=27676
-
- WMLDoElement needs to implement attach() and call updateFromElement() on its associated RenderButton.
- Mimics HTMLButtonElement/HTMLFormControlElement behaviour and fixes several painting/styling issues covered by existing tests in fast/wml.
-
- * wml/WMLDoElement.cpp:
- (WebCore::WMLDoElement::attach):
- * wml/WMLDoElement.h:
-
-2009-07-25 Pavel Feldman <pfeldman@chromium.org>
-
- Fix Windows build breakage introduced in 46390.
-
- * WebCore.vcproj/WebCore.vcproj:
-
-2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Oliver Hunt.
-
- Inspector: Properties Should be Sorted more Naturally
- https://bugs.webkit.org/show_bug.cgi?id=27329
-
- * inspector/front-end/ObjectPropertiesSection.js:
- (WebInspector.ObjectPropertiesSection.prototype.update): use the displaySort when showing properties
- (WebInspector.ObjectPropertiesSection.prototype._displaySort): alphaNumerical sort
- (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate): use the displaySort when showing properties
- * inspector/front-end/utilities.js:
- (Object.sortedProperties): allow for an optional sorting function in Object.sortedProperties
-
-2009-07-24 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Split InspectorController into InspectorController
- and InspectorBackend. Everything frontend needs from InspectorController
- will slowly migrate into the InspectorBackend.
-
- https://bugs.webkit.org/show_bug.cgi?id=27541
-
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * bindings/js/JSInspectorBackendCustom.cpp: Added.
- (WebCore::JSInspectorBackend::highlightDOMNode):
- (WebCore::JSInspectorBackend::search):
- (WebCore::JSInspectorBackend::databaseTableNames):
- (WebCore::JSInspectorBackend::inspectedWindow):
- (WebCore::JSInspectorBackend::setting):
- (WebCore::JSInspectorBackend::setSetting):
- (WebCore::JSInspectorBackend::wrapCallback):
- (WebCore::JSInspectorBackend::currentCallFrame):
- (WebCore::JSInspectorBackend::profiles):
- * bindings/v8/custom/V8InspectorBackendCustom.cpp: Added.
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/js/JSInspectorControllerCustom.cpp: Removed.
- * bindings/js/ScriptObject.cpp:
- (WebCore::ScriptGlobalObject::set):
- * bindings/js/ScriptObject.h:
- * bindings/v8/DOMObjectsInclude.h:
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/ScriptObject.cpp:
- (WebCore::ScriptGlobalObject::set):
- * bindings/v8/ScriptObject.h:
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8InspectorControllerCustom.cpp: Removed.
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::InspectorController):
- (WebCore::InspectorController::windowScriptObjectAvailable):
- * inspector/InspectorController.h:
- (WebCore::InspectorController::inspectorBackend):
- * inspector/InspectorBackend.cpp: Added.
- * inspector/InspectorBackend.h: Added.
- (WebCore::InspectorBackend::create):
- (WebCore::InspectorBackend::inspectorController):
- * inspector/InspectorBackend.idl: Added.
- * inspector/InspectorController.idl: Removed.
- * inspector/front-end/Resource.js:
- * page/Page.cpp:
- (WebCore::Page::Page):
- * page/Page.h:
-
-2009-07-25 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by George Staikos.
-
- Update WebCore/page/Frame.cpp/h to conform to WebKit
- Style Guidelines as identified by cpplint.py.
- https://bugs.webkit.org/show_bug.cgi?id=27654
-
- * page/Frame.cpp:
- (WebCore::Frame::Frame):
- (WebCore::Frame::~Frame):
- (WebCore::Frame::setDocument):
- (WebCore::Frame::firstRectForRange):
- (WebCore::createRegExpForLabels):
- (WebCore::Frame::searchForLabelsBeforeElement):
- (WebCore::Frame::matchLabelsAgainstElement):
- (WebCore::Frame::selectionLayoutChanged):
- (WebCore::Frame::setZoomFactor):
- (WebCore::Frame::reapplyStyles):
- (WebCore::Frame::isContentEditable):
- (WebCore::Frame::computeAndSetTypingStyle):
- (WebCore::Frame::selectionStartStylePropertyValue):
- (WebCore::Frame::selectionComputedStyle):
- (WebCore::Frame::applyEditingStyleToBodyElement):
- (WebCore::Frame::removeEditingStyleFromBodyElement):
- (WebCore::Frame::applyEditingStyleToElement):
- (WebCore::Frame::selectionBounds):
- (WebCore::Frame::currentForm):
- (WebCore::Frame::revealSelection):
- (WebCore::Frame::styleForSelectionStart):
- (WebCore::Frame::setSelectionFromNone):
- (WebCore::Frame::findString):
- (WebCore::Frame::markAllMatchesForText):
- (WebCore::Frame::setMarkedTextMatchesAreHighlighted):
- (WebCore::Frame::clearFormerDOMWindow):
- (WebCore::Frame::unfocusWindow):
- (WebCore::Frame::respondToChangedSelection):
- (WebCore::Frame::documentAtPoint):
- * page/Frame.h:
- (WebCore::Frame::create):
- (WebCore::Frame::displayStringModifiedByEncoding):
- (WebCore::Frame::pageZoomFactor):
- (WebCore::Frame::textZoomFactor):
-
-2009-07-24 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Darin Adler.
-
- Add functions to print the glyph page trees for debugging
- https://bugs.webkit.org/show_bug.cgi?id=27671
-
- * platform/graphics/FontData.h: Defined a description() method.
-
- * platform/graphics/GlyphPageTreeNode.cpp:
- (WebCore::GlyphPageTreeNode::showSubtree): Added. Prints the node and
- its descendants.
- (showGlyphPageTrees): Added. Prints all glyph page trees.
- (showGlyphPageTree): Added. Prints the glyph page tree for a given page.
- * platform/graphics/GlyphPageTreeNode.h:
-
- * platform/graphics/SegmentedFontData.cpp:
- (WebCore::SegmentedFontData::description): Added.
-
- * platform/graphics/SegmentedFontData.h:
- * platform/graphics/SimpleFontData.cpp:
- (WebCore::SimpleFontData::description): Added. Uses the platform data
- as the description for non-svg, non-custom fonts.
- * platform/graphics/SimpleFontData.h:
-
- * platform/graphics/gtk/FontPlatformData.h:
- * platform/graphics/gtk/FontPlatformDataGtk.cpp:
- (WebCore::FontPlatformData::description): Added. Returns a null string.
- * platform/graphics/gtk/FontPlatformDataPango.cpp:
- (WebCore::FontPlatformData::description): Added. Returns a null string.
-
- * platform/graphics/mac/FontPlatformData.h:
- * platform/graphics/mac/FontPlatformDataMac.mm:
- (WebCore::FontPlatformData::description): Added. Returns the
- description of the CGFont, the size and the synthetic style flags,
- if set.
-
- * platform/graphics/qt/FontPlatformData.h:
- * platform/graphics/qt/FontPlatformDataQt.cpp:
- (WebCore::FontPlatformData::description): Added. Returns a null string.
-
- * platform/graphics/win/FontPlatformData.h:
- * platform/graphics/win/FontPlatformDataWin.cpp:
- (WebCore::FontPlatformData::description): Added. Returns a null string.
-
- * platform/graphics/wince/FontPlatformData.cpp:
- (WebCore::FontPlatformData::description): Added. Returns a null string.
- * platform/graphics/wince/FontPlatformData.h:
-
- * platform/graphics/wx/FontPlatformData.h:
- * platform/graphics/wx/FontPlatformDataWx.cpp:
- (WebCore::FontPlatformData::description): Added. Returns a null string.
-
-2009-07-24 Mads Ager <ager@chromium.org>
-
- Reviewed by Adam Barth.
-
- SVG and XPath memory leaks in V8 bindings
- https://bugs.webkit.org/show_bug.cgi?id=27488
-
- Add proper 'create' methods to SVGPodTypeWrappers and
- XPathNSResolvers in the V8 bindings to avoid memory leaks.
-
- Introduce convertToV8Object methods that accept PassRefPtrs and
- clean up the use of get() and release() on RefPtrs.
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/V8DOMWrapper.h:
- (WebCore::V8DOMWrapper::convertNodeToV8Object):
- (WebCore::V8DOMWrapper::convertEventToV8Object):
- (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
- (WebCore::V8DOMWrapper::convertEventListenerToV8Object):
- * bindings/v8/V8SVGPODTypeWrapper.h:
- (WebCore::V8SVGPODTypeWrapperCreatorForList::create):
- (WebCore::V8SVGPODTypeWrapperCreatorForList::V8SVGPODTypeWrapperCreatorForList):
- (WebCore::V8SVGStaticPODTypeWrapper::create):
- (WebCore::V8SVGStaticPODTypeWrapper::V8SVGStaticPODTypeWrapper):
- (WebCore::V8SVGStaticPODTypeWrapperWithPODTypeParent::create):
- (WebCore::V8SVGStaticPODTypeWrapperWithPODTypeParent::V8SVGStaticPODTypeWrapperWithPODTypeParent):
- (WebCore::V8SVGStaticPODTypeWrapperWithParent::create):
- (WebCore::V8SVGStaticPODTypeWrapperWithParent::V8SVGStaticPODTypeWrapperWithParent):
- (WebCore::V8SVGDynamicPODTypeWrapper::create):
- (WebCore::V8SVGDynamicPODTypeWrapper::V8SVGDynamicPODTypeWrapper):
- (WebCore::V8SVGDynamicPODTypeWrapperCache::lookupOrCreateWrapper):
- * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8ClientRectListCustom.cpp:
- (WebCore::INDEXED_PROPERTY_GETTER):
- * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
- (WebCore::V8CustomXPathNSResolver::create):
- * bindings/v8/custom/V8CustomXPathNSResolver.h:
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- * bindings/v8/custom/V8DocumentCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8ElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
- (WebCore::getNamedItems):
- (WebCore::getItem):
- * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::ACCESSOR_GETTER):
- * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::NAMED_PROPERTY_GETTER):
- * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
- (WebCore::INDEXED_PROPERTY_GETTER):
- * bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- * bindings/v8/custom/V8InspectorControllerCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::NAMED_PROPERTY_GETTER):
- * bindings/v8/custom/V8NodeIteratorCustom.cpp:
- (WebCore::toV8):
- * bindings/v8/custom/V8NodeListCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- * bindings/v8/custom/V8SVGMatrixCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8TreeWalkerCustom.cpp:
- (WebCore::toV8):
- * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-07-24 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Jon Honeycutt.
-
- Fix of <rdar://6310538> Middle-click panning should be springloaded while dragging
- https://bugs.webkit.org/show_bug.cgi?id=21794
-
- Create two new booleans to determine whether we have done a springloaded pan scroll, and update
- the name of setPanScrollCursor to updatePanScrollState to more accurately describe what the function
- does.
-
- * page/EventHandler.cpp:
- (WebCore::EventHandler::EventHandler): Initialized two new booleans.
- (WebCore::EventHandler::autoscrollTimerFired):
- (WebCore::EventHandler::updatePanScrollState): Renamed from setPanScrollCursor.
- (WebCore::EventHandler::stopAutoscrollTimer): Clear the pan scrolling in progress flag.
- (WebCore::EventHandler::handleMouseReleaseEvent): Clear the pan scrolling button pressed flag.
- * page/EventHandler.h:
-
-2009-07-24 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by George Staikos.
-
- https://bugs.webkit.org/show_bug.cgi?id=27657
- Add more wince port files to WebCore
-
- Written by Yong Li <yong.li@torchmobile.com> and Lyon Chen <lyon.chen@torchmobile.com>
-
- * loader/icon/wince/IconDatabaseWince.cpp: Added.
- * rendering/RenderThemeWince.cpp: Added.
- * rendering/RenderThemeWince.h: Added.
- * storage/wince/DatabaseThreadWince.cpp: Added.
- * storage/wince/DatabaseThreadWince.h: Added.
- * storage/wince/LocalStorageThreadWince.cpp: Added.
- * storage/wince/LocalStorageThreadWince.h: Added.
- * svg/graphics/wince/SVGResourceFilterWince.cpp: Added.
-
-2009-07-24 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Justin Garcia.
-
- execCommand('underline') can modify DOM outside of the contentEditable area
- https://bugs.webkit.org/show_bug.cgi?id=24333
-
- highestAncestorWithTextDecoration stops at the closest unsplittable element so that if text-decoration is applied
- outside of it, we don't accidently modify the style attribute.
-
- Tests: editing/style/textdecoration-outside-of-rooteditable.html
- editing/style/textdecoration-outside-of-unsplittable-element.html
-
- * editing/ApplyStyleCommand.cpp:
- (WebCore::StyleChange::init):
- (WebCore::highestAncestorWithTextDecoration):
-
-2009-07-24 Daniel Bates <dbates@intudata.com>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=27639
-
- Fixes false positives when evaluating certain strings that only contain
- non-canonical characters.
-
- Test: http/tests/security/xssAuditor/script-tag-safe.html
-
- * page/XSSAuditor.cpp:
- (WebCore::isNonCanonicalCharacter):
- (WebCore::XSSAuditor::findInRequest):
-
-2009-07-24 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- Changed WorkerContext destructor to not access possibly-freed WorkerThread.
-
- Failed assertion in WorkerContext::~WorkerContext().
- https://bugs.webkit.org/show_bug.cgi?id=27665
-
- * workers/DedicatedWorkerContext.cpp:
- (WebCore::DedicatedWorkerContext::~DedicatedWorkerContext):
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::~WorkerContext):
- Removed assertion that relies on WorkerThread still being alive (moved to DedicatedWorkerContext destructor).
-
-2009-07-24 Drew Wilson <atwilson@google.com>
-
- Reviewed by Adam Barth.
-
- Updated code generator to properly generate bindings for WorkerContext exposed functions.
-
- Storing a reference to WorkerContext.postMessage() and calling it later yields a TypeError
- https://bugs.webkit.org/show_bug.cgi?id=27419
-
- Test: fast/workers/worker-call.html
-
- * bindings/js/JSWorkerContextBase.cpp:
- (WebCore::toJSDedicatedWorkerContext):
- (WebCore::toJSWorkerContext):
- Functions that convert from JSValue to the appropriate WorkerContext/DedicatedWorkerContext object.
- * bindings/js/JSWorkerContextBase.h:
- Added toJS*WorkerContext APIs.
- * bindings/scripts/CodeGeneratorJS.pm:
- Added code to appropriately check the passed-in this object when invoking functions at global scope.
-
-2009-07-24 Drew Wilson <atwilson@google.com>
-
- Reviewed by Adam Barth.
-
- Refactor WorkerContext to move DedicatedWorker-specific APIs into DedicatedWorkerContext
- https://bugs.webkit.org/show_bug.cgi?id=27420
-
- No new tests as the existing tests already provide sufficient coverage (this is just a refactoring with no new functionality).
-
- * DerivedSources.cpp:
- Added JSDerivedWorkerContext.cpp
- * DerivedSources.make:
- Added DerivedWorkerContext files
- * GNUmakefile.am:
- Added DerivedWorkerContext files
- * WebCore.gypi:
- Added DerivedWorkerContext files
- * WebCore.pro:
- Added DerivedWorkerContext files
- * WebCore.vcproj/WebCore.vcproj:
- Added DerivedWorkerContext files
- * WebCore.xcodeproj/project.pbxproj:
- Added DerivedWorkerContext files
- * bindings/js/JSDedicatedWorkerContextCustom.cpp: Added.
- (WebCore::JSDedicatedWorkerContext::mark):
- Custom mark function for onmessage event handler.
- * bindings/js/JSEventTarget.cpp:
- (WebCore::toJS):
- Supports conversion to JSDedicatedWorkerContext.
- (WebCore::toEventTarget):
- * bindings/js/JSWorkerContextCustom.cpp:
- (WebCore::JSWorkerContext::mark):
- Moved onmessage mark handling into DedicatedWorkerContext.
- * bindings/js/WorkerScriptController.cpp:
- Added appropriate casts to DedicatedWorkerContext for postMessage().
- (WebCore::WorkerScriptController::initScript):
- Manually sets up the prototype chain for the worker context.
- * bindings/scripts/CodeGeneratorJS.pm:
- Changed special case code for WorkerContext to be triggered by new IsWorkerContext attribute.
- * bindings/scripts/CodeGeneratorV8.pm:
- Changed hard-coded tests for WorkerContext to support DedicatedWorkerContext.
- * bindings/v8/DOMObjectsInclude.h:
- Added DedicatedWorkerContext.h
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- Added V8DedicatedWorkerContext.cpp
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getTemplate):
- Added code to reserve extra fields for V8DedicatedWorkerContext.
- * bindings/v8/V8Index.cpp:
- Now includes V8DedicatedWorkerContext.h in addition to V8WorkerContext.h
- * bindings/v8/V8Index.h:
- Added DedicatedWorkerContext as a non-node wrapper type.
- Removed WORKERCONTEXT as a valid template type.
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
- Creates DedicatedWorkerContext instead of WorkerContext.
- (WebCore::WorkerContextExecutionProxy::EventTargetToV8Object):
- Returns DedicatedWorkerContext instead of WorkerContext.
- (WebCore::WorkerContextExecutionProxy::retrieve):
- Refactored to deal with DedicatedWorkerContext.
- * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp: Added.
- Moved onmessage code from V8WorkerContextCustom.cpp
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- Moved onmessage code to V8DedicatedWorkerContextCustom.cpp
- * dom/EventTarget.cpp:
- (WebCore::EventTarget::toDedicatedWorkerContext):
- * dom/EventTarget.h:
- * workers/DedicatedWorkerContext.cpp: Added.
- Moved DedicatedWorker-only APIs from WorkerContext.
- (WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
- (WebCore::DedicatedWorkerContext::~DedicatedWorkerContext):
- (WebCore::DedicatedWorkerContext::reportException):
- (WebCore::DedicatedWorkerContext::postMessage):
- (WebCore::DedicatedWorkerContext::dispatchMessage):
- * workers/DedicatedWorkerContext.h: Added.
- Moved DedicatedWorker-only APIs from WorkerContext.
- (WebCore::DedicatedWorkerContext::create):
- (WebCore::DedicatedWorkerContext::toDedicatedWorkerContext):
- (WebCore::DedicatedWorkerContext::setOnmessage):
- (WebCore::DedicatedWorkerContext::onmessage):
- * workers/DedicatedWorkerContext.idl: Added.
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::~WorkerContext):
- Moved code that notifies parent that worker is closing down into DedicatedWorkerContext.
- * workers/WorkerContext.h:
- (WebCore::WorkerContext::isClosing):
- Exposed closing flag as an API so derived classes can access it.
- * workers/WorkerContext.idl:
- * workers/WorkerMessagingProxy.cpp:
- (WebCore::MessageWorkerContextTask::performTask):
- Calls into DedicatedWorkerContext to handle message.
- * workers/WorkerThread.cpp:
- (WebCore::WorkerThread::workerThread):
- Creates a DedicatedWorkerContext when the thread starts up.
-
-2009-07-24 Eric Seidel <eric@webkit.org>
-
- Reviewed by Adam Barth.
-
- Move more callers to using 3 argument toJS
- https://bugs.webkit.org/show_bug.cgi?id=27661
-
- No functional changes, thus no tests.
- These are all the places where we can't yet pass the
- correct globalObject because we don't have or don't know the right one.
-
- * bindings/js/JSCustomPositionCallback.cpp:
- (WebCore::JSCustomPositionCallback::handleEvent):
- * bindings/js/JSCustomPositionErrorCallback.cpp:
- (WebCore::JSCustomPositionErrorCallback::handleEvent):
- * bindings/js/JSCustomSQLStatementCallback.cpp:
- (WebCore::JSCustomSQLStatementCallback::handleEvent):
- * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
- (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
- * bindings/js/JSCustomSQLTransactionCallback.cpp:
- (WebCore::JSCustomSQLTransactionCallback::handleEvent):
- * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
- (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
- * bindings/js/JSNodeFilterCondition.cpp:
- (WebCore::JSNodeFilterCondition::acceptNode):
-
-2009-07-24 Eric Seidel <eric@webkit.org>
-
- Reviewed by Adam Barth.
-
- Fix the last of the x-frame constructor calls to have the right prototype chains
- https://bugs.webkit.org/show_bug.cgi?id=27645
-
- Fix the last few constructors to use their stored globalObject pointer when
- constructing objects instead of the lexicalGlobalObject().
-
- * bindings/js/JSAudioConstructor.cpp:
- (WebCore::constructAudio):
- * bindings/js/JSImageConstructor.cpp:
- (WebCore::constructImage):
- * bindings/js/JSMessageChannelConstructor.cpp:
- (WebCore::JSMessageChannelConstructor::construct):
- * bindings/js/JSOptionConstructor.cpp:
- (WebCore::constructHTMLOptionElement):
- * bindings/js/JSWebKitPointConstructor.cpp:
- (WebCore::constructWebKitPoint):
- * bindings/js/JSWorkerConstructor.cpp:
- (WebCore::constructWorker):
-
-2009-07-24 Jian Li <jianli@chromium.org>
-
- Reviewed by Adam Barth.
-
- [V8] Cleanup exception handling in worker evaluation code.
- https://bugs.webkit.org/show_bug.cgi?id=27282
-
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::WorkerContextExecutionProxy::evaluate):
- * bindings/v8/WorkerContextExecutionProxy.h:
- (WebCore::WorkerContextExecutionState::WorkerContextExecutionState):
- * bindings/v8/WorkerScriptController.cpp:
- (WebCore::WorkerScriptController::evaluate):
- (WebCore::WorkerScriptController::setException):
-
-2009-07-24 Stephen White <senorblanco@chromium.org>
-
- Reviewed by David Levin.
-
- Reverting r46157, since it may be causing problems with Chromium
- reliability (see http://crbug.com/17569).
-
- https://bugs.webkit.org/show_bug.cgi?id=27388
-
- * platform/graphics/skia/GraphicsContextSkia.cpp:
- (WebCore::GraphicsContext::drawLine):
- * platform/graphics/skia/PlatformContextSkia.cpp:
- (PlatformContextSkia::setupPaintForStroking):
-
-2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- REGRESSION: inspector seems broken in ToT WebKit
- https://bugs.webkit.org/show_bug.cgi?id=27646
-
- * inspector/front-end/Console.js:
- (WebInspector.Console.prototype._ensureCommandLineAPIInstalled):
-
-2009-07-24 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Anders Carlsson.
-
- Add the shadow style member to the ShadowData constructor and ==
- operator
-
- * rendering/style/ShadowData.cpp:
- (WebCore::ShadowData::ShadowData):
- (WebCore::ShadowData::operator==):
-
-2009-07-24 Jian Li <jianli@chromium.org>
-
- Reviewed by Eric Seidel.
-
- [V8] More V8 bindings changes to use ErrorEvent.
- https://bugs.webkit.org/show_bug.cgi?id=27630
-
- * bindings/v8/DOMObjectsInclude.h:
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::convertEventToV8Object):
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
-
-2009-07-24 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Dave Hyatt.
-
- Clean up dependencies on Apple support libraries for non-Apple build.
- http://bugs.webkit.org/show_bug.cgi?id=27532.
-
- * platform/graphics/win/SimpleFontDataWin.cpp: Conditionalize references
- to ApplicationServices.h and WebKitSystemInterface.h
-
-2009-07-24 Dan Bernstein <mitz@apple.com>
-
- Another attempted build fix
-
- * bindings/js/JSAbstractWorkerCustom.cpp:
-
-2009-07-24 Dan Bernstein <mitz@apple.com>
-
- Attempted build fix
-
- * bindings/js/JSAbstractWorkerCustom.cpp:
- (WebCore::toJS):
-
-2009-07-24 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Build fix for 64 bit Linux.
-
- int64_t is long on Linux 64 bit and not long long, thus
- getFileSize with a int64_t out value fails to build.
-
- Use a temporary to work around the problem.
-
- * loader/appcache/ApplicationCacheStorage.cpp:
- (WebCore::ApplicationCacheStorage::spaceNeeded):
-
-2009-07-24 Eric Seidel <eric@webkit.org>
-
- Reviewed by Adam Barth.
-
- Update all CREATE_DOM_*_WRAPPER callers to pass globalObject
- https://bugs.webkit.org/show_bug.cgi?id=27644
-
- This is another attempt at making the change for bug 27634 smaller.
- I included the changes to make_names.pl as well as any file which
- used CREATE_DOM_*_WRAPPER macros.
-
- The changes to the construct* functions are what fix the cases in
- fast/dom/constructed-objects-prototypes.html
-
- The changes to passing globalObject through CREATE_* are what fix
- fast/dom/prototype-inheritance-2.html
-
- * bindings/js/JSCDATASectionCustom.cpp:
- (WebCore::toJSNewlyCreated): pass globalObject.
- * bindings/js/JSCSSRuleCustom.cpp:
- (WebCore::toJS): pass globalObject.
- * bindings/js/JSCSSValueCustom.cpp:
- (WebCore::toJS): pass globalObject.
- * bindings/js/JSDOMBinding.h: updated macros to pass globalObject.
- * bindings/js/JSDocumentCustom.cpp:
- (WebCore::toJS): pass globalObject.
- * bindings/js/JSElementCustom.cpp:
- (WebCore::JSElement::setAttributeNode): use globalObject() for wrapping return value.
- (WebCore::JSElement::setAttributeNodeNS): use globalObject() for wrapping return value.
- (WebCore::toJSNewlyCreated): pass globalObject.
- * bindings/js/JSEventCustom.cpp:
- (WebCore::JSEvent::clipboardData): pass globalObject.
- (WebCore::toJS): pass globalObject.
- * bindings/js/JSHTMLCollectionCustom.cpp:
- (WebCore::getNamedItems): use globalObject() for wrapping returned collection items.
- (WebCore::callHTMLCollection): use globalObject() for wrapping returned collection items.
- (WebCore::JSHTMLCollection::item): use globalObject() for wrapping returned collection items.
- (WebCore::toJS): pass globalObject.
- * bindings/js/JSImageDataCustom.cpp:
- (WebCore::toJS): pass globalObject.
- * bindings/js/JSNodeCustom.cpp:
- (WebCore::createWrapper): pass globalObject.
- * bindings/js/JSSVGPathSegCustom.cpp:
- (WebCore::toJS): pass globalObject.
- * bindings/js/JSStyleSheetCustom.cpp:
- (WebCore::toJS): pass globalObject.
- * bindings/js/JSTextCustom.cpp:
- (WebCore::toJSNewlyCreated): pass globalObject.
- * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
- (WebCore::constructWebKitCSSMatrix): use constructors globalObject when constructing
- * bindings/js/JSXMLHttpRequestConstructor.cpp:
- (WebCore::constructXMLHttpRequest): use constructors globalObject when constructing
- * bindings/js/JSXSLTProcessorConstructor.cpp:
- (WebCore::constructXSLTProcessor): use constructors globalObject when constructing
- * dom/make_names.pl:
- Pass globalObject through CREATE_* macros and various support functions.
-
-2009-07-24 Eric Seidel <eric@webkit.org>
-
- Reviewed by Adam Barth.
-
- Update CodeGeneratorJS.pm to support passing JSDOMGlobalObject* to toJS calls
- https://bugs.webkit.org/show_bug.cgi?id=27643
-
- This is an attempt to make this change as small as possible.
- I started by including all changes to CodeGeneratorJS.pm from bug 27634,
- and then made the minimal amount of other changes needed to support that change.
-
- Most toJS implementations ignore their passed JSDOMGlobalObject.
- There are stub 2-argument toJS, toJSNewlyCreated implementations to help compiling.
- All places where it is not clear what we should pass as the global object
- (or where the global object is simply not available, like for some SVG bindings)
- we pass deprecatedGlobalObjectForPrototype instead.
-
- * bindings/js/JSCDATASectionCustom.cpp:
- (WebCore::toJSNewlyCreated): add ignored JSDOMGlobalObject*
- * bindings/js/JSCSSRuleCustom.cpp:
- (WebCore::toJS): add ignored JSDOMGlobalObject*
- * bindings/js/JSCSSValueCustom.cpp:
- (WebCore::toJS): add ignored JSDOMGlobalObject*
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::setDOMException): pass the wrong globalObject for now
- * bindings/js/JSDOMBinding.h:
- Pass the wrong global object to the CREATE_ macros for now.
- In the next change we'll come back and pass the correct one.
- That will require changes to make_names.pl.
- (WebCore::DOMObjectWithGlobalPointer::scriptExecutionContext):
- (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
- (WebCore::DOMObjectWithGlobalPointer::~DOMObjectWithGlobalPointer):
- (WebCore::createDOMObjectWrapper):
- (WebCore::getDOMObjectWrapper):
- (WebCore::createDOMNodeWrapper):
- (WebCore::getDOMNodeWrapper):
- (WebCore::toJS): added to convert 2 arg calls to 3 arg calls to limit the scope of this change.
- (WebCore::toJSNewlyCreated):
- * bindings/js/JSDOMWindowBase.cpp:
- (WebCore::toJS): DOMWindow always uses its own prototype chain.
- * bindings/js/JSDOMWindowBase.h:
- * bindings/js/JSDocumentCustom.cpp:
- (WebCore::toJS): add ignored JSDOMGlobalObject*
- * bindings/js/JSElementCustom.cpp:
- (WebCore::toJSNewlyCreated): add ignored JSDOMGlobalObject*
- * bindings/js/JSEventCustom.cpp:
- (WebCore::toJS): add ignored JSDOMGlobalObject*
- * bindings/js/JSEventTarget.cpp:
- (WebCore::toJS): add ignored JSDOMGlobalObject*
- * bindings/js/JSEventTarget.h:
- * bindings/js/JSHTMLCollectionCustom.cpp:
- (WebCore::toJS): add ignored JSDOMGlobalObject*
- * bindings/js/JSImageDataCustom.cpp:
- (WebCore::toJS): add ignored JSDOMGlobalObject*
- * bindings/js/JSNodeCustom.cpp:
- (WebCore::createWrapper): pass globalObject to toJS(Document*) to avoid recursion
- (WebCore::toJSNewlyCreated): add ignored JSDOMGlobalObject*
- (WebCore::toJS): add ignored JSDOMGlobalObject*
- * bindings/js/JSSVGElementInstanceCustom.cpp:
- (WebCore::toJS): pass globalObject along
- * bindings/js/JSSVGMatrixCustom.cpp:
- (WebCore::JSSVGMatrix::inverse): pass wrong globalObject for now.
- (WebCore::JSSVGMatrix::rotateFromVector): pass wrong globalObject for now.
- * bindings/js/JSSVGPathSegCustom.cpp:
- (WebCore::toJS):
- * bindings/js/JSSVGPathSegListCustom.cpp:
- All of these methods need a globalObject, but most SVG binding don't have
- space for one, so we just pass the lexicalGlobalObject for now.
- (WebCore::JSSVGPathSegList::initialize):
- (WebCore::JSSVGPathSegList::getItem):
- (WebCore::JSSVGPathSegList::insertItemBefore):
- (WebCore::JSSVGPathSegList::replaceItem):
- (WebCore::JSSVGPathSegList::removeItem):
- (WebCore::JSSVGPathSegList::appendItem):
- * bindings/js/JSSVGPointListCustom.cpp:
- (WebCore::finishGetter): pass wrong globalObject for now.
- (WebCore::finishSetter):
- (WebCore::finishSetterReadOnlyResult):
- * bindings/js/JSSVGTransformListCustom.cpp:
- (WebCore::finishGetter): pass wrong globalObject for now.
- (WebCore::finishSetter):
- (WebCore::finishSetterReadOnlyResult):
- * bindings/js/JSStyleSheetCustom.cpp:
- (WebCore::toJS): add ignored JSDOMGlobalObject*
- * bindings/js/JSTextCustom.cpp:
- (WebCore::toJSNewlyCreated): add ignored JSDOMGlobalObject*
- * bindings/js/JSWorkerContextBase.cpp:
- (WebCore::toJS): WorkerContext always uses its own prototype chain since it's a GlobalObject subclass.
- * bindings/js/JSWorkerContextBase.h:
- * bindings/scripts/CodeGeneratorJS.pm:
- All generated toJS calls now pass a globalObject.
- All generated toJS implementations now expect a globalObject.
- Simplified all the slot casts by using a "castedThis" local.
- SVG bindings which don't have a globalObject() accessor pass the deprecated lexicalGlobalObject instead.
- Simplified printing of constructor objects using a $constructorClassName variable.
- All generated constructor functions follow the construct$className form to match the custom constructors.
-
-2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- typing "document.__proto__" in inspector throws exception
- https://bugs.webkit.org/show_bug.cgi?id=27169
-
- * inspector/front-end/utilities.js:
- (Object.type):
-
-2009-07-24 Andrei Popescu <andreip@google.com>
-
- Reviewed by Anders Carlsson.
-
- ApplicationCache should have size limit
- https://bugs.webkit.org/show_bug.cgi?id=22700
-
- https://lists.webkit.org/pipermail/webkit-dev/2009-May/007560.html
-
- This change implements a mechanism for limiting the maximum size of
- the application cache file. When this size is reached, a ChromeClient
- callback is invoked asynchronously and the saving of the last (failed)
- cache is retried automatically.
-
- This change also extends the ApplicationCacheStorage API by allowing
- a client to query or modify the application cache without having to
- load any resources into memory.
-
- Test: http/tests/appcache/max-size.html
-
- * WebCore.base.exp:
- Exports the symbols required by the DumpRenderTree test application.
- * loader/EmptyClients.h:
- Adds empty implementation of the new ChromeClient methods.
- * loader/appcache/ApplicationCache.cpp:
- * loader/appcache/ApplicationCache.h:
- Adds the ability to calculate the approximate size of an ApplicationCache object.
- * loader/appcache/ApplicationCacheGroup.cpp:
- * loader/appcache/ApplicationCacheGroup.h:
- Invokes the ChromeClient callback when the storage layer runs out of space.
- After the callback is invoked, we re-attempt to store the newest cache,
- in case the ChromeClient has freed some space.
- * loader/appcache/ApplicationCacheResource.cpp:
- * loader/appcache/ApplicationCacheResource.h:
- Adds the ability to calculate the approximate size of an ApplicationCacheResource object.
- * loader/appcache/ApplicationCacheStorage.cpp:
- * loader/appcache/ApplicationCacheStorage.h:
- Enforces a maximum size for the application cache file.
- * page/ChromeClient.h:
- Adds a new callback, invoked when the ApplicationCacheStorage reports that it has
- reached the maximum size for its database file.
- * platform/sql/SQLiteDatabase.cpp:
- * platform/sql/SQLiteDatabase.h:
- Adds a new method that allows querying for the amount of unused space inside the
- application cache database file.
-
-2009-07-24 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=25415
- [GTK][ATK] Please implement support for get_text_at_offset
-
- Use TextEncoding facilities to convert between UTF16 and UTF8
- instead of rolling our own solution.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (convertUniCharToUTF8):
-
-2009-07-24 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=25415
- [GTK][ATK] Please implement support for get_text_at_offset
-
- Fix confusion in g_substr between length in bytes and length in
- characters. Was causing crashes in some situations when dealing
- with non-ASCII text encoded as UTF8.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (g_substr):
-
-2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: Impossible to add an attribute to a node without attributes
- https://bugs.webkit.org/show_bug.cgi?id=21108
-
- * inspector/front-end/ElementsTreeOutline.js:
- (WebInspector.ElementsTreeElement):
- (WebInspector.ElementsTreeElement.prototype.set hovered):
- (WebInspector.ElementsTreeElement.prototype.toggleNewButton):
- (WebInspector.ElementsTreeElement.prototype.ondblclick):
- (WebInspector.ElementsTreeElement.prototype._startEditing):
- (WebInspector.ElementsTreeElement.prototype._addNewAttribute):
- (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
- * inspector/front-end/inspector.css:
-
-2009-07-24 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Adds support for Firebug's magic $0 variable to access inspected node
- https://bugs.webkit.org/show_bug.cgi?id=17907
-
- * inspector/front-end/Console.js:
- (WebInspector.Console.prototype._ensureCommandLineAPIInstalled): Added _inspectorCommandLineAPI.{
- _inspectedNodes, _addInspectedNode, $0, $1, $n}
- * inspector/front-end/ElementsPanel.js:
- (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged): Stores the inspected node history
- in _inspectorCommandLineAPI._inspectedNodes
- (WebInspector.ElementsPanel):
-
-2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Dragging a resource in the sidebar should drag it's URL
- https://bugs.webkit.org/show_bug.cgi?id=14410
-
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourceSidebarTreeElement.prototype.onattach):
-
-2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Double click on a resource in the sidebar should open that resource in Safari
- https://bugs.webkit.org/show_bug.cgi?id=14409
-
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick): open a resource url
-
-2009-07-24 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Reviewed by Xan Lopez.
-
- Bump pango version requirement to 1.12 and remove unnecessary #ifdefs.
-
- * platform/graphics/gtk/FontGtk.cpp:
- (WebCore::getDefaultPangoLayout):
- * platform/graphics/gtk/FontPlatformDataPango.cpp:
- (WebCore::FontPlatformData::FontPlatformData):
- * platform/gtk/Language.cpp:
-
-2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: Missing UIString and other localizedString.js fixes
- https://bugs.webkit.org/show_bug.cgi?id=27288
-
- * English.lproj/localizedStrings.js:
-
-2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Inspector: Should Syntax Highlight JSON
- https://bugs.webkit.org/show_bug.cgi?id=27503
-
- * inspector/front-end/SourceView.js:
- (WebInspector.SourceView.prototype._contentLoaded):
-
-2009-07-24 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by Eric Seidel.
-
- Update WebCore/page/DOMTimer.cpp/h to conform to WebKit
- Style Guidelines as identified by cpplint.py.
- https://bugs.webkit.org/show_bug.cgi?id=27624
-
- * page/DragController.cpp:
- (WebCore::DragController::~DragController):
- (WebCore::documentFragmentFromDragData):
- (WebCore::DragController::dragEnded):
- (WebCore::DragController::dragEntered):
- (WebCore::DragController::dragExited):
- (WebCore::DragController::dragUpdated):
- (WebCore::DragController::performDrag):
- (WebCore::asFileInput):
- (WebCore::DragController::tryDocumentDrag):
- (WebCore::DragController::delegateDragSourceAction):
- (WebCore::DragController::concludeEditDrag):
- (WebCore::DragController::canProcessDrag):
- (WebCore::DragController::tryDHTMLDrag):
- (WebCore::DragController::mayStartDragAtEventLocation):
- (WebCore::getCachedImage):
- (WebCore::getImage):
- (WebCore::prepareClipboardForImageDrag):
- (WebCore::dragLocForDHTMLDrag):
- (WebCore::DragController::startDrag):
- (WebCore::DragController::doImageDrag):
- (WebCore::DragController::doSystemDrag):
- (WebCore::DragController::placeDragCaret):
-
-2009-07-24 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by Eric Seidel.
-
- Update WebCore/page/Chrome.cpp to conform to WebKit
- Style Guidelines as identified by cpplint.py.
- https://bugs.webkit.org/show_bug.cgi?id=27608
-
- * page/Chrome.cpp:
- (WebCore::Chrome::runBeforeUnloadConfirmPanel):
- (WebCore::Chrome::runJavaScriptAlert):
- (WebCore::Chrome::runJavaScriptConfirm):
- (WebCore::Chrome::runJavaScriptPrompt):
- (WebCore::Chrome::shouldInterruptJavaScript):
- (WebCore::Chrome::setToolTip):
- (WebCore::Chrome::requestGeolocationPermissionForFrame):
- (WebCore::ChromeClient::generateReplacementFile):
- (WebCore::ChromeClient::paintCustomScrollbar):
-
-2009-07-24 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by Eric Seidel.
-
- Update WebCore/page/Coordinates.cpp to conform to WebKit
- Style Guidelines as identified by cpplint.py.
- https://bugs.webkit.org/show_bug.cgi?id=27614
-
- * page/Coordinates.cpp:
- (WebCore::Coordinates::toString):
-
-2009-07-24 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by Eric Seidel.
-
- Update WebCore/page/DOMSelection.cpp/h to conform to WebKit
- Style Guidelines as identified by cpplint.py.
- https://bugs.webkit.org/show_bug.cgi?id=27614
-
- * page/DOMSelection.cpp:
- (WebCore::DOMSelection::setBaseAndExtent):
- (WebCore::DOMSelection::modify):
- (WebCore::DOMSelection::addRange):
- (WebCore::DOMSelection::deleteFromDocument):
- * page/DOMSelection.h:
-
-2009-07-24 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by Eric Seidel.
-
- Update WebCore/page/DOMTimer.cpp/h to conform to WebKit
- Style Guidelines as identified by cpplint.py.
- https://bugs.webkit.org/show_bug.cgi?id=27618
-
- * page/DOMTimer.cpp:
- (WebCore::DOMTimer::DOMTimer):
- (WebCore::DOMTimer::~DOMTimer):
- (WebCore::DOMTimer::fired):
- (WebCore::DOMTimer::suspend):
- (WebCore::DOMTimer::resume):
- (WebCore::DOMTimer::canSuspend):
- * page/DOMTimer.h:
- (WebCore::DOMTimer::minTimerInterval):
- (WebCore::DOMTimer::setMinTimerInterval):
-
-2009-07-24 Eric Seidel <eric@webkit.org>
-
- Reviewed by Adam Barth.
-
- Classes call DOMObject::mark() explicitly, should call DOMObjectWithGlobal::mark() instead
- https://bugs.webkit.org/show_bug.cgi?id=27641
-
- Nothing uses globalObject() yet, but this was causing crashes
- in the patch for bug 27634. This is covered by fast/dom/gc-6.html.
-
- I decided to change these to Base:: instead of DOMObjectWithGlobal::
- for future-proofing. All autogenerated classes use a typedef Base
- to avoid bugs like these. Sadly C+does not have a built-in super:: we could use.
-
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSAbstractWorkerCustom.cpp:
- (WebCore::JSAbstractWorker::mark):
- * bindings/js/JSDOMApplicationCacheCustom.cpp:
- (WebCore::JSDOMApplicationCache::mark):
- * bindings/js/JSMessageChannelCustom.cpp:
- (WebCore::JSMessageChannel::mark):
- * bindings/js/JSMessagePortCustom.cpp:
- (WebCore::JSMessagePort::mark):
- * bindings/js/JSNamedNodesCollection.cpp:
- (WebCore::JSNamedNodesCollection::getOwnPropertySlot):
- * bindings/js/JSNodeCustom.cpp:
- (WebCore::JSNode::mark):
- * bindings/js/JSNodeFilterCustom.cpp:
- (WebCore::JSNodeFilter::mark):
- * bindings/js/JSNodeIteratorCustom.cpp:
- (WebCore::JSNodeIterator::mark):
- * bindings/js/JSSVGElementInstanceCustom.cpp:
- (WebCore::JSSVGElementInstance::mark):
- * bindings/js/JSTreeWalkerCustom.cpp:
- (WebCore::JSTreeWalker::mark):
-
-2009-07-22 Eric Seidel <eric@webkit.org>
-
- Reviewed by Adam Barth.
-
- Make most DOMObjects hold onto a JSDOMGlobalObject*
- https://bugs.webkit.org/show_bug.cgi?id=27588
-
- This change is almost entirely plumbing. Only one functional
- change as part of this all (window.document.constructor has the correct prototype)
- Changes are detailed below.
-
- inner.document.constructor is fixed because all properties on the window
- object are created with the correct globalObject (instead of the lexical one).
- Since all objects now carry a globalObject pointer, when document creates
- HTMLDocumentConstructor it now has the right globalObject to use.
-
- Tests:
- fast/dom/prototype-inheritance.html
- fast/dom/prototype-inheritance-2.html
-
- * bindings/js/DOMObjectWithSVGContext.h:
- (WebCore::DOMObjectWithSVGContext::DOMObjectWithSVGContext):
- Update the comment and add an ignored globalObject argument.
- * bindings/js/JSDOMBinding.h:
- Pass a globalObject to all DOMObjects during creation. Currently it's the wrong global object.
- Once toJS is passed a globalObject it will be the right one.
- (WebCore::createDOMObjectWrapper):
- (WebCore::createDOMNodeWrapper):
- * bindings/js/JSDOMGlobalObject.h:
- (WebCore::JSDOMGlobalObject::globalObject): Makes binding generation easier.
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::history): JSHistory is now passed a globalObject, but since it has no custom constructor it doesn't use it.
- (WebCore::JSDOMWindow::location): JSLocation is now passed a globalObject, but since it has no custom constructor it doesn't use it.
- * bindings/js/JSDocumentCustom.cpp:
- (WebCore::JSDocument::location): JSLocation is now passed a globalObject, but since it has no custom constructor it doesn't use it.
- * bindings/js/JSHTMLAllCollection.h:
- (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
- * bindings/js/JSHTMLCollectionCustom.cpp: Re-factoring needed to pass globalObject to JSNamedNodesCollection constructor.
- (WebCore::getNamedItems):
- (WebCore::callHTMLCollection):
- (WebCore::JSHTMLCollection::canGetItemsForName):
- (WebCore::JSHTMLCollection::nameGetter):
- (WebCore::JSHTMLCollection::item):
- (WebCore::JSHTMLCollection::namedItem):
- * bindings/js/JSHTMLFormElementCustom.cpp:
- (WebCore::JSHTMLFormElement::nameGetter):
- * bindings/js/JSNamedNodesCollection.cpp:
- Now passed globalObject. This is tested by inner.document.forms.testForm.
- The passed globalObject is still wrong until toJS is fixed.
- (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
- * bindings/js/JSNamedNodesCollection.h:
- * bindings/js/JSSharedWorkerConstructor.cpp:
- Add DOMConstructorObject missed by http://trac.webkit.org/changeset/45938
- This class is not compiled by default, so not testable.
- (WebCore::JSSharedWorkerConstructor::JSSharedWorkerConstructor):
- * bindings/js/JSSharedWorkerConstructor.h:
- * bindings/scripts/CodeGeneratorJS.pm:
- Make all bindings objects carry a globalObject pointer using DOMObjectWithGlobalPointer.
- SVG bindings which need a context() pointer do not have enough space for globalObject() too.
- WorkerContext does not need a globalObject (it is one), so special case it.
- Make all .constructor calls use the stored globalObject(). This is what fixes window.document.constructor.
- Make all constructors inherit from DOMConstructorObject for consistency. Since the auto-bound constructors
- override createStructure anyway, there is no functional change here. Just completing work started in r45938.
-
-2009-07-23 Brady Eidson <beidson@apple.com>
-
- Reviewed by Geoff Garen.
-
- WebCore has a few places that don't gracefully handle a null request returned from willSendRequest.
- https://bugs.webkit.org/show_bug.cgi?id=27595
-
- Test: http/tests/misc/will-send-request-returns-null-on-redirect.html
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::removeResource): Null-check the request URL.
-
- * platform/network/cf/ResourceHandleCFNet.cpp: Ditto, and return null instead of creating an empty one.
- (WebCore::willSendRequest):
-
-2009-07-23 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- Bug 27633 - AXLoadComplete can be fired off to frequently
- https://bugs.webkit.org/show_bug.cgi?id=27633
-
- An integration issue left out some curly braces.
-
- * dom/Document.cpp:
- (WebCore::Document::implicitClose):
-
-2009-07-23 Darin Adler <darin@apple.com>
-
- Reviewed by Brady Eidson.
-
- URL appears in back/forward button menu instead of title for items with custom representation
- https://bugs.webkit.org/show_bug.cgi?id=27586
- rdar://problem/5060337
-
- * WebCore.base.exp: Exported DocumentLoader::setTitle for use by Mac WebKit.
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::didChangeTitle): Tightened code to check if the document
- loader is the correct one; previously this would never happen because we'd
- commit the load before any title changes could be registered, but now we can
- encounter a case where we get a title during a provisional load.
-
-2009-07-23 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Dave Hyatt.
-
- [CSS3 Backgrounds and Borders] Add support for inset box shadows
- https://bugs.webkit.org/show_bug.cgi?id=27582
-
- Test: fast/box-shadow/inset.html
-
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::valueForShadow): Set the ShadowValue’s shadow style to 'inset'
- as needed.
-
- * css/CSSParser.cpp:
- (WebCore::ShadowParseContext::ShadowParseContext): Added style and allowStyle
- members. Initialize the allowStyle member.
- (WebCore::ShadowParseContext::commitValue): Pass the style value to the
- ShadowValue constructor. Reset allowStyle.
- (WebCore::ShadowParseContext::commitLength): Update allowStyle.
- (WebCore::ShadowParseContext::commitColor): Ditto.
- (WebCore::ShadowParseContext::commitStyle): Added. Sets the style member and
- updates the state.
- (WebCore::CSSParser::parseShadow): Parse the 'inset' keyword.
-
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty): Get the style value from the
- shadow value and pass it to the ShadowData constructor.
-
- * css/ShadowValue.cpp:
- (WebCore::ShadowValue::ShadowValue): Added style.
- (WebCore::ShadowValue::cssText): Added style.
-
- * css/ShadowValue.h:
- (WebCore::ShadowValue::create): Added style.
-
- * page/animation/AnimationBase.cpp:
- (WebCore::blendFunc): Added a blend function for shadow styles. When blending
- between normal and inset shadows, all intermediate values map to normal.
- (WebCore::PropertyWrapperShadow::blend): Added normal style to the default
- shadow.
-
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::paintBoxShadow): Added a shadow style parameter,
- which is passed through to RenderBoxModelObject::paintBoxShadow().
-
- (WebCore::InlineFlowBox::paintBoxDecorations): Paint inset shadows on top of
- the background.
-
- * rendering/InlineFlowBox.h:
-
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::paintBoxDecorations): Paint inset shadows on top of the
- background.
-
- * rendering/RenderBoxModelObject.cpp:
- (WebCore::RenderBoxModelObject::paintBoxShadow): Added a shadow style
- parameter, and code to paint inset shadows.
-
- * rendering/RenderBoxModelObject.h:
-
- * rendering/RenderFieldset.cpp:
- (WebCore::RenderFieldset::paintBoxDecorations): Paint inset shadows on top of
- the background.
-
- * rendering/RenderTable.cpp:
- (WebCore::RenderTable::paintBoxDecorations): Ditto.
-
- * rendering/RenderTableCell.cpp:
- (WebCore::RenderTableCell::paintBoxDecorations): Ditto.
-
- * rendering/style/ShadowData.h:
- Added a ShadowStyle enum.
- (WebCore::ShadowData::ShadowData): Add and initialize a style member.
-
-2009-07-23 Simon Fraser <simon.fraser@apple.com>
-
- Fix the build with UNUSED_PARAM(frame) for when ENABLE(3D_RENDERING) is not defined.
-
- * css/MediaQueryEvaluator.cpp:
- (WebCore::transform_3dMediaFeatureEval):
-
-2009-07-23 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Adele Peterson.
-
- 3d-transforms media query needs to look check that accelerated compositing is enabled
- https://bugs.webkit.org/show_bug.cgi?id=27621
-
- When evaluating a media query with '-webkit-transform-3d', we need to check the
- runtime switch that toggles accererated compositing, and therefore 3D.
-
- No test because we can't disable the pref dynamically in DRT.
-
- * css/MediaQueryEvaluator.cpp:
- (WebCore::transform_3dMediaFeatureEval):
-
-2009-07-22 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Eric Seidel.
-
- execCommand('underline') can't remove <U> underlines
- https://bugs.webkit.org/show_bug.cgi?id=20215
-
- This patch adds support for u, s, and strike to implicitlyStyledElementShouldBeRemovedWhenApplyingStyle so that
- WebKit can remove those presentational tags when necessary.
- It also modifies StyleChange::init not to add "text-decoration: none". Not only is this style meaningless
- (does not override inherited styles) but it was also causing WebKit to generate extra spans with this style.
-
- * css/CSSValueList.cpp:
- (WebCore::CSSValueList::hasValue): True if the property contains the specified value
- * css/CSSValueList.h: Updated prototype
- * editing/ApplyStyleCommand.cpp:
- (WebCore::StyleChange::init): No longer adds "text-decoration: none"
- (WebCore::ApplyStyleCommand::implicitlyStyledElementShouldBeRemovedWhenApplyingStyle): Supports text-decoration-related elements
-
-2009-07-23 Jessie Berlin <jberlin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=27554
- Expose the value of text-overflow in getComputedStyle.
-
- Test: fast/css/getComputedStyle/getComputedStyle-text-overflow.html
-
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::):
- Add text-overflow to the list of computedProperties.
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
- Return the value of the text-overflow property.
-
-2009-07-23 Yongjun Zhang <yongjun.zhang@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- https://bugs.webkit.org/show_bug.cgi?id=27510
-
- [S60 QtWebKit] Don't put some intermediate generated files into the final mmp project
- file for linking. This is a temporary workaround for qmake bug in Symbian port, should
- be reverted after qmake is fixed.
-
- * WebCore.pro:
-
-2009-07-23 Jian Li <jianli@chromium.org>
-
- Reviewed by David Levin.
-
- [V8] Fix an assert in running workers in Chrome.
- https://bugs.webkit.org/show_bug.cgi?id=27620
-
- The fix is to change V8DOMMap::removeAllDOMObjectsInCurrentThreadHelper
- to do not call removeObjectsFromWrapperMap for certain types of DOM
- objects that exist only in main thread.
-
- * bindings/v8/V8DOMMap.cpp:
- (WebCore::removeAllDOMObjectsInCurrentThreadHelper):
-
-2009-07-23 David Hyatt <hyatt@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=27572
- Implement support for background-attachment:local.
-
- Added new test fast/overflow/overflow-with-local-attachment.html.
-
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseFillProperty):
- * css/CSSPrimitiveValueMappings.h:
- (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
- (WebCore::CSSPrimitiveValue::operator EFillAttachment):
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::mapFillAttachment):
- * css/CSSValueKeywords.in:
- * rendering/RenderBoxModelObject.cpp:
- (WebCore::RenderBoxModelObject::paintFillLayerExtended):
- (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
- * rendering/style/FillLayer.h:
- (WebCore::FillLayer::attachment):
- (WebCore::FillLayer::setAttachment):
- (WebCore::FillLayer::hasFixedImage):
- (WebCore::FillLayer::initialFillAttachment):
- * rendering/style/RenderStyle.h:
- (WebCore::InheritedFlags::backgroundAttachment):
- (WebCore::InheritedFlags::maskAttachment):
- * rendering/style/RenderStyleConstants.h:
- (WebCore::):
-
-2009-07-23 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Eric Seidel.
-
- copyInheritableProperties and removeComputedInheritablePropertiesFrom should be deprecated
- https://bugs.webkit.org/show_bug.cgi?id=27325
-
- This patch deprecates copyInheritableProperties because it has been used for two different purposes:
- 1. Calculating the typing style.
- 2. Moving HTML subtrees and seeking to remove redundant styles.
- These tasks should be broken out into two separate functions. New code should not use this function.
-
- It deletes removeComputedInheritablePropertiesFrom because it hasn't been used anywhere.
-
- There is no test since the patch does not change any behavior.
-
- * css/CSSComputedStyleDeclaration.cpp: removeComputedInheritablePropertiesFrom has been removed
- (WebCore::CSSComputedStyleDeclaration::deprecatedCopyInheritableProperties): has been renamed from copyInheritableProperties
- * css/CSSComputedStyleDeclaration.h: ditto
- * editing/DeleteSelectionCommand.cpp: ditto
- (WebCore::removeEnclosingAnchorStyle): ditto
- (WebCore::DeleteSelectionCommand::saveTypingStyleState): ditto
- * editing/EditCommand.cpp: ditto
- (WebCore::EditCommand::styleAtPosition): ditto
- * editing/RemoveFormatCommand.cpp: ditto
- (WebCore::RemoveFormatCommand::doApply): ditto
- * editing/ReplaceSelectionCommand.cpp: ditto
- (WebCore::handleStyleSpansBeforeInsertion): ditto
- (WebCore::ReplaceSelectionCommand::handleStyleSpans): ditto
- * editing/markup.cpp: ditto
- (WebCore::removeEnclosingMailBlockquoteStyle): ditto
- (WebCore::removeDefaultStyles): ditto
- (WebCore::createMarkup): ditto
-
-2009-07-22 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Simon Fraser.
-
- Audio element at default width shouldn't have time field.
- https://bugs.webkit.org/show_bug.cgi?id=27589
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlTimeDisplayElement::setVisible): Make sure we don't
- forget to remember the visibility if there is no renderer.
-
-2009-07-23 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Darin Adler.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=27598 Clean up the
- AccessibilityObject class
-
- Mostly this is just moving empty stubs into the header rather than
- muddying the cpp file with them. A few functions were made pure
- virtual.
-
- * accessibility/AccessibilityObject.cpp:
- (WebCore::AccessibilityObject::isARIAControl):
- (WebCore::AccessibilityObject::clickPoint):
- (WebCore::AccessibilityObject::documentFrameView):
- (WebCore::AccessibilityObject::actionVerb):
- * accessibility/AccessibilityObject.h:
- (WebCore::AccessibilityObject::intValue):
- (WebCore::AccessibilityObject::layoutCount):
- (WebCore::AccessibilityObject::doAccessibilityHitTest):
- (WebCore::AccessibilityObject::focusedUIElement):
- (WebCore::AccessibilityObject::firstChild):
- (WebCore::AccessibilityObject::lastChild):
- (WebCore::AccessibilityObject::previousSibling):
- (WebCore::AccessibilityObject::nextSibling):
- (WebCore::AccessibilityObject::parentObjectIfExists):
- (WebCore::AccessibilityObject::observableObject):
- (WebCore::AccessibilityObject::linkedUIElements):
- (WebCore::AccessibilityObject::titleUIElement):
- (WebCore::AccessibilityObject::ariaRoleAttribute):
- (WebCore::AccessibilityObject::isPresentationalChildOfAriaRole):
- (WebCore::AccessibilityObject::ariaRoleHasPresentationalChildren):
- (WebCore::AccessibilityObject::roleValue):
- (WebCore::AccessibilityObject::ariaAccessiblityName):
- (WebCore::AccessibilityObject::ariaLabeledByAttribute):
- (WebCore::AccessibilityObject::ariaDescribedByAttribute):
- (WebCore::AccessibilityObject::accessibilityDescription):
- (WebCore::AccessibilityObject::ariaSelectedTextDOMRange):
- (WebCore::AccessibilityObject::axObjectCache):
- (WebCore::AccessibilityObject::axObjectID):
- (WebCore::AccessibilityObject::setAXObjectID):
- (WebCore::AccessibilityObject::anchorElement):
- (WebCore::AccessibilityObject::actionElement):
- (WebCore::AccessibilityObject::boundingBoxRect):
- (WebCore::AccessibilityObject::selectedTextRange):
- (WebCore::AccessibilityObject::selectionStart):
- (WebCore::AccessibilityObject::selectionEnd):
- (WebCore::AccessibilityObject::url):
- (WebCore::AccessibilityObject::selection):
- (WebCore::AccessibilityObject::stringValue):
- (WebCore::AccessibilityObject::title):
- (WebCore::AccessibilityObject::helpText):
- (WebCore::AccessibilityObject::textUnderElement):
- (WebCore::AccessibilityObject::text):
- (WebCore::AccessibilityObject::textLength):
- (WebCore::AccessibilityObject::selectedText):
- (WebCore::AccessibilityObject::accessKey):
- (WebCore::AccessibilityObject::widget):
- (WebCore::AccessibilityObject::widgetForAttachmentView):
- (WebCore::AccessibilityObject::setFocused):
- (WebCore::AccessibilityObject::setSelectedText):
- (WebCore::AccessibilityObject::setSelectedTextRange):
- (WebCore::AccessibilityObject::setValue):
- (WebCore::AccessibilityObject::setSelected):
- (WebCore::AccessibilityObject::makeRangeVisible):
- (WebCore::AccessibilityObject::childrenChanged):
- (WebCore::AccessibilityObject::addChildren):
- (WebCore::AccessibilityObject::hasChildren):
- (WebCore::AccessibilityObject::selectedChildren):
- (WebCore::AccessibilityObject::visibleChildren):
- (WebCore::AccessibilityObject::visiblePositionRange):
- (WebCore::AccessibilityObject::visiblePositionRangeForLine):
- (WebCore::AccessibilityObject::boundsForVisiblePositionRange):
- (WebCore::AccessibilityObject::setSelectedVisiblePositionRange):
- (WebCore::AccessibilityObject::visiblePositionForPoint):
- (WebCore::AccessibilityObject::nextVisiblePosition):
- (WebCore::AccessibilityObject::previousVisiblePosition):
- (WebCore::AccessibilityObject::visiblePositionForIndex):
- (WebCore::AccessibilityObject::indexForVisiblePosition):
- (WebCore::AccessibilityObject::index):
- (WebCore::AccessibilityObject::doAXRangeForLine):
- (WebCore::AccessibilityObject::doAXRangeForIndex):
- (WebCore::AccessibilityObject::doAXStringForRange):
- (WebCore::AccessibilityObject::doAXBoundsForRange):
- (WebCore::AccessibilityObject::updateBackingStore):
-
-2009-07-23 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by David Hyatt.
-
- Fix of <rdar://4877658> Dragging from the area between the horizontal/vertical scrollbars when status bar is showing starts a selection and autoscroll.
-
- * page/EventHandler.cpp:
- (WebCore::EventHandler::handleMousePressEvent):
- * platform/ScrollView.cpp:
- (WebCore::ScrollView::wheelEvent):
- * platform/ScrollView.h:
-
-2009-07-23 David Hyatt <hyatt@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=27581
- Drop the prefix from the box-shadow property.
-
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::):
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue):
- (WebCore::ShadowParseContext::commitLength):
- (WebCore::cssPropertyID):
- * css/CSSPropertyNames.in:
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty):
- * page/animation/AnimationBase.cpp:
- (WebCore::ensurePropertyMap):
-
-2009-07-22 Viet-Trung Luu <viettrungluu@gmail.com>
-
- Reviewed by David Hyatt.
-
- https://bugs.webkit.org/show_bug.cgi?id=27289
- When a mouse click occurs on a scrollbar without a preceding mouse move
- onto it, the release isn't handled correctly (since
- EventHandler::m_lastScrollbarUnderMouse isn't set on mouse down, but
- only on mouse move). (Side comment: That scrollbar-handling code
- in EventHandler is ugly. It should be fixed properly.)
-
- Tests: scrollbars/scrollbar-miss-mousemove.html
- scrollbars/scrollbar-miss-mousemove-disabled.html
-
- * page/EventHandler.cpp:
- (WebCore::EventHandler::handleMousePressEvent):
- (WebCore::EventHandler::handleMouseMoveEvent):
- (WebCore::EventHandler::updateLastScrollbarUnderMouse):
- * page/EventHandler.h:
-
-2009-07-23 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by David Levin.
-
- Update WebCore/page/BarInfo.cpp to conform to WebKit
- Style Guidelines as identified by cpplint.py.
- https://bugs.webkit.org/show_bug.cgi?id=27606
-
- * page/BarInfo.cpp:
- (WebCore::BarInfo::visible):
-
-2009-07-23 Mike Fenton <mike.fenton@torchmobile.com>
-
- Reviewed by David Levin.
-
- Update WebCore/page/Console.cpp to conform to WebKit
- Style Guidelines as identified by cpplint.py.
- https://bugs.webkit.org/show_bug.cgi?id=27606
-
- * page/Console.cpp:
- (WebCore::printMessageSourceAndLevelPrefix):
- (WebCore::Console::profile):
- (WebCore::Console::time):
-
-2009-07-23 Simon Hausmann <simon.hausmann@nokia.com>
-
- Reviewed by Holger Freyther.
-
- Fix crashes with the QObject bindings after garbage collection.
-
- There is one QtInstance per wrapped QObject, and that QtInstance keeps
- references to cached JSObjects for slots. When those objects get
- deleted due to GC, then they becoming dangling pointers.
-
- When a cached member dies, it is now removed from the QtInstance's
- cache.
-
- As we cannot track the lifetime of the children, we have to remove
- them from QtInstance alltogether. They are not cached and were
- only used for mark(), but we _want_ them to be subject to gc.
-
- * bridge/qt/qt_instance.cpp:
- (JSC::Bindings::QtInstance::~QtInstance): Minor coding style cleanup,
- use qDeleteAll().
- (JSC::Bindings::QtInstance::removeCachedMethod): New function, to
- clean m_methods and m_defaultMethod.
- (JSC::Bindings::QtInstance::mark): Avoid marking already marked objects.
- (JSC::Bindings::QtField::valueFromInstance): Don't save children for
- marking.
- * bridge/qt/qt_instance.h: Declare removeCachedMethod.
- * bridge/qt/qt_runtime.cpp:
- (JSC::Bindings::QtRuntimeMethod::~QtRuntimeMethod): Call removeCachedMethod
- with this on the instance.
-
-2009-07-23 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Mark Rowe.
-
- https://bugs.webkit.org/show_bug.cgi?id=27599
- 'const unsigned' in return value
-
- Remove const modifier from unsigned return value, as it does not
- make sense.
-
- * dom/ErrorEvent.h:
-
-2009-07-22 Jens Alfke <snej@chromium.org>
-
- Reviewed by David Levin.
-
- Bug 22784: Improve keyboard navigation of Select elements.
- Home/End and PageUp/PageDn buttons do not do anything in drop down lists,
- on non-Mac platforms.
- https://bugs.webkit.org/show_bug.cgi?id=22784
- http://code.google.com/p/chromium/issues/detail?id=4576
-
- New test: LayoutTests/fast/forms/select-popup-pagekeys.html
-
- * dom/SelectElement.cpp:
- (WebCore::nextValidIndex):
- New utility fn for traversing items of a select's list.
- (WebCore::SelectElement::menuListDefaultEventHandler):
- Added code to handle Home/End and PageUp/PageDn when ARROW_KEYS_POP_MENU is false.
-
-2009-07-23 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Mark Rowe.
-
- Fix a couple of compiler warnings.
-
- * platform/graphics/cairo/ImageBufferCairo.cpp:
- (copySurface):
- * platform/graphics/gtk/SimpleFontDataGtk.cpp:
- (WebCore::SimpleFontData::containsCharacters):
-
-2009-07-22 Simon Hausmann <simon.hausmann@nokia.com>
-
- Rubber-stamped by David Levin.
-
- Enable HTML5 Datagrid defines for the Qt build.
-
- * WebCore.pro:
-
-2009-07-22 Adam Barth <abarth@webkit.org>
-
- Reviewed by David Levin.
-
- [V8] Make Node wrappers go fast
- https://bugs.webkit.org/show_bug.cgi?id=27597
-
- Profiles indicate we're spending a lot of time asking whether we're on
- the main thread when looking up DOM wrappers for Nodes, but there isn't
- much point in doing that work because Nodes only exist on the main
- thread. I've also added an assert to keep us honest in this regard.
-
- * bindings/v8/V8DOMMap.cpp:
- (WebCore::):
- (WebCore::getDOMNodeMap):
- (WebCore::DOMData::getCurrent):
- (WebCore::DOMData::getCurrentMainThread):
-
-2009-07-22 Adam Barth <abarth@webkit.org>
-
- Reviewed by Alexey Proskuryakov.
-
- Remove unneeded virtual destructor from ScriptSourceProvider
- https://bugs.webkit.org/show_bug.cgi?id=27563
-
- * bindings/js/ScriptSourceProvider.h:
-
-2009-07-22 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Eric Seidel.
-
- execCommand('underline' / 'strikeThrough') doesn't work properly with multiple styles in text-decoration
- https://bugs.webkit.org/show_bug.cgi?id=27476
-
- executeStrikethrough and executeUnderline were toggling between "line-through" / "underline" and "none".
- This patch adds executeToggleStyleInList that toggles a style in CSSValueList instead of toggling the entire value.
- It modifies CSSComputedStyleDeclaration to return CSSValueList instead of CSSPrimitiveValue for text decorations,
- and adds removeAll member function to CSSValueList.
-
- Tests: editing/execCommand/toggle-text-decorations.html
- fast/css/getComputedStyle/getComputedStyle-text-decoration.html
-
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::renderTextDecorationFlagsToCSSValue): Creates a CSSValueList
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Returns a CSSValueList instead of CSSValue
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue): Text decorations are space separated instead of comma separated
- * css/CSSValueList.cpp:
- (WebCore::CSSValueList::removeAll): Removes all values that match the specified value
- * css/CSSValueList.h:
- * editing/EditorCommand.cpp:
- (WebCore::applyCommandToFrame): Apply style to a frame using specified command
- (WebCore::executeApplyStyle): Uses applyCommandToFrame
- (WebCore::executeToggleStyleInList): Uses applyCommandToFrame
- (WebCore::executeToggleStyle): Toggles a style in CSSValueList
- (WebCore::executeStrikethrough): Uses executeToggleStyleInList
- (WebCore::executeUnderline): Uses executeToggleStyleInList
-
-2009-07-22 Daniel Bates <dbates@intudata.com>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=27174
- And
- https://bugs.webkit.org/show_bug.cgi?id=26938
-
- Code cleanup. Implements support for detecting attacks transformed by
- PHP Magic Quotes/PHP addslashes().
-
- Tests: http/tests/security/xssAuditor/script-tag-addslashes-backslash.html
- http/tests/security/xssAuditor/script-tag-addslashes-double-quote.html
- http/tests/security/xssAuditor/script-tag-addslashes-null-char.html
- http/tests/security/xssAuditor/script-tag-addslashes-single-quote.html
-
- * page/XSSAuditor.cpp:
- (WebCore::isInvalidCharacter):
- (WebCore::XSSAuditor::canEvaluate):
- (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
- (WebCore::XSSAuditor::canLoadObject):
- (WebCore::XSSAuditor::normalize): Decodes HTML entities, removes backslashes,
- and removes control characters that could otherwise cause a discrepancy between
- the source code of a script and the outgoing HTTP parameters.
- (WebCore::XSSAuditor::decodeURL):
- (WebCore::XSSAuditor::decodeHTMLEntities):
- (WebCore::XSSAuditor::findInRequest):
- * page/XSSAuditor.h:
-
-2009-07-22 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Adele Peterson.
-
- Null deref in JSObject::mark due to null xhr wrapper
- https://bugs.webkit.org/show_bug.cgi?id=27565
-
- Make event target binding for appcache and xhr behave in the same way as
- it does for all other events.
-
- No test as I couldn't make a testcase which was remotely reliable.
-
- * bindings/js/JSEventTarget.cpp:
- (WebCore::toJS):
-
-2009-07-22 Mads Ager <ager@chromium.org>
-
- Reviewed by David Levin.
-
- Inform V8 of the amount of WebCore string memory it is keeping alive.
- https://bugs.webkit.org/show_bug.cgi?id=27537
-
- V8 uses external strings that are backed by WebCore strings. Since
- the external strings themselves are small, V8 has no way of
- knowing how much memory it is actually holding on to. With this
- change, we inform V8 of the amount of WebCore string data it is
- holding on to with external strings.
-
- * bindings/v8/V8Binding.cpp:
- (WebCore::WebCoreStringResource::WebCoreStringResource):
- (WebCore::WebCoreStringResource::~WebCoreStringResource):
-
-2009-07-22 David Hyatt <hyatt@apple.com>
-
- Reviewed by Beth Dakin.
-
- https://bugs.webkit.org/show_bug.cgi?id=27562
- Add the finalized versions of background-clip and background-origin. Remove background-clip from
- the background shorthand and have it be auto-set based off background-origin's value.
-
- Three new tests added in fast/backgrounds/size
-
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::):
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
- * css/CSSMutableStyleDeclaration.cpp:
- (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue):
- (WebCore::CSSParser::parseFillShorthand):
- (WebCore::CSSParser::parseFillProperty):
- * css/CSSPropertyLonghand.cpp:
- (WebCore::initShorthandMap):
- * css/CSSPropertyNames.in:
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty):
- * css/CSSValueKeywords.in:
-
-2009-07-22 Jens Alfke <snej@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Hook up V8 bindings for DataGrid elements.
- https://bugs.webkit.org/show_bug.cgi?id=27383
- http://code.google.com/p/chromium/issues/detail?id=16730
-
- Tests: Enhanced LayoutTests/fast/dom/HTMLDataGridElement/*
- to handle exceptions, check appropriate JS prototypes, and
- test column-list's item() method as well as array-indexing.
-
- * WebCore.gypi: Added new source files.
- * bindings/scripts/CodeGeneratorV8.pm: Made GenerateBatchedAttributeData put #if's around conditional attributes.
- * bindings/v8/DOMObjectsInclude.h: #include DataGrid headers.
- * bindings/v8/V8DOMWrapper.cpp: Add bindings from HTML tags to datagrid templates.
- (WebCore::V8DOMWrapper::getTemplate): Customize datagrid template.
- * bindings/v8/V8DataGridDataSource.cpp: Added. (Based on JSDataGridDataSource)
- (WebCore::V8DataGridDataSource::V8DataGridDataSource):
- (WebCore::V8DataGridDataSource::~V8DataGridDataSource):
- * bindings/v8/V8DataGridDataSource.h: Added. (Based on JSDataGridDataSource)
- (WebCore::V8DataGridDataSource::create):
- (WebCore::V8DataGridDataSource::isJSDataGridDataSource):
- (WebCore::V8DataGridDataSource::jsDataSource):
- (WebCore::asV8DataGridDataSource):
- * bindings/v8/V8GCController.h: Added new handle type "DATASOURCE".
- * bindings/v8/V8Index.h: Conditionalize datagrid stuff.
- * bindings/v8/custom/V8CustomBinding.h: Declare more accessors. Conditionalize.
- * bindings/v8/custom/V8DataGridColumnListCustom.cpp: Added.
- * bindings/v8/custom/V8HTMLDataGridElementCustom.cpp: Fill in dataSource accessors.
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
-
-2009-07-22 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Eric Seidel.
-
- pushDownTextDecorationStyleAroundNode needs clean up
- https://bugs.webkit.org/show_bug.cgi?id=27556
-
- Cleaned up. pushDownTextDecorationStyleAroundNode traverses tree vertically from highestAncestor to targetNode
- While traversing, it will apply the specified style to all nodes but targetNode.
- i.e. the style is applies to all ancestor nodes and their siblings of targetNode.
-
- * editing/ApplyStyleCommand.cpp:
- (WebCore::ApplyStyleCommand::pushDownTextDecorationStyleAroundNode): Cleaned up and added comments
- * editing/ApplyStyleCommand.h: Updated prototype
-
-2009-07-22 Peter Kasting <pkasting@google.com>
-
- Reviewed by David Kilzer.
-
- https://bugs.webkit.org/show_bug.cgi?id=27323
- Handle any type of line endings in WebCore/css/*CSSPropertyNames.in.
-
- * DerivedSources.make:
- * css/makeprop.pl:
- * css/makevalues.pl:
-
-2009-07-22 Paul Godavari <paul@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Chromium has a build break after removal of JSRGBColor bindings
- https://bugs.webkit.org/show_bug.cgi?id=27548
-
- Fix a build break in Chromium V8 after the JSRGBColor bindings change:
- https://bugs.webkit.org/show_bug.cgi?id=27242
-
- * bindings/scripts/CodeGeneratorV8.pm:
-
-2009-07-22 Adam Langley <agl@google.com>
-
- Reviewed by Darin Fisher.
-
- Chromium Linux: add static functions to FontPlatformData which allow
- for setting the global font rendering preferences.
-
- https://bugs.webkit.org/show_bug.cgi?id=27513
- http://code.google.com/p/chromium/issues/detail?id=12179
-
- This should not affect any layout tests.
-
- * platform/graphics/chromium/FontPlatformDataLinux.cpp:
- (WebCore::FontPlatformData::setHinting):
- (WebCore::FontPlatformData::setAntiAlias):
- (WebCore::FontPlatformData::setSubpixelGlyphs):
- (WebCore::FontPlatformData::setupPaint):
- * platform/graphics/chromium/FontPlatformDataLinux.h:
-
-2009-07-22 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Move Inspector panels creation into a function to make possible introducing
- custom panels.
-
- * inspector/front-end/inspector.js:
- (WebInspector._createPanels):
- (WebInspector.loaded):
-
-2009-07-22 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Print console command message upon evaluate
- selection request; Handle errors in evaluation request
- properly.
-
- https://bugs.webkit.org/show_bug.cgi?id=27535
-
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
- * inspector/front-end/SourceFrame.js:
- (WebInspector.SourceFrame.prototype._evalSelectionInCallFrame):
-
-2009-07-22 Xan Lopez <xlopez@igalia.com>
-
- Attempt to fix the GTKbuild.
-
- * GNUmakefile.am:
-
-2009-07-21 Simon Hausmann <simon.hausmann@nokia.com>
-
- Fix the Qt build.
-
- * WebCore.pro: Add RGBColor.cpp to the build, remove JSRGBColor.
-
-2009-07-21 Daniel Bates <dbates@intudata.com>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=27494
-
- Fixes an issue that can cause a crash or unexpected behavior when calling
- WebCore::ScriptSourceCode::source on a cached script.
-
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/CachedScriptSourceProvider.h: Modified to inherit from
- WebCore::ScriptSourceCode.
- (WebCore::CachedScriptSourceProvider::source):
- (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
- * bindings/js/ScriptSourceCode.h:
- (WebCore::ScriptSourceCode::ScriptSourceCode): Separated out source provider and
- rewrote to use WebCore::ScriptSourceProvider.
- (WebCore::ScriptSourceCode::source):
- * bindings/js/ScriptSourceProvider.h: Added.
- (WebCore::ScriptSourceProvider::ScriptSourceProvider):
- (WebCore::ScriptSourceProvider::~ScriptSourceProvider):
- * bindings/js/StringSourceProvider.h: Modified to inherit from
- WebCore::ScriptSourceCode.
- (WebCore::StringSourceProvider::StringSourceProvider):
-
-2009-07-21 Sam Weinig <sam@webkit.org>
-
- Another attempt to fix the Windows build.
-
- * WebCore.vcproj/WebCore.vcproj:
-
-2009-07-21 Sam Weinig <sam@webkit.org>
-
- Attempt to fix the Windows build.
-
- * DerivedSources.cpp:
-
-2009-07-21 Sam Weinig <sam@webkit.org>
-
- Attempt to fix the GTK build.
-
- * GNUmakefile.am:
-
-2009-07-21 Sam Weinig <sam@webkit.org>
-
- Reviewed by Dan Bernstein.
-
- Autogenerate Objective-C binding implementation for RGBColor.
-
- No functionality change.
-
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/objc/DOMRGBColor.mm: Removed.
- * bindings/scripts/CodeGeneratorObjC.pm: Add logic to convert from
- WebCore::Color to NSColor*.
- * css/RGBColor.idl:
-
-2009-07-21 Sam Weinig <sam@webkit.org>
-
- Reviewed by Dan Bernstein.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=27242
- JSC bindings should use an auto-bound RGBColor class instead of hand-rolled JSRGBColor
-
- Move the JSC and Objective-C bindings onto using the RGBColor object instead
- of just an unsigned int. The JSC bindings are now completely autogenerated for
- this class. (Also removes the last lut from WebCore).
-
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * bindings/js/JSRGBColor.cpp: Removed.
- * bindings/js/JSRGBColor.h: Removed.
- * bindings/objc/DOM.mm:
- (-[DOMRGBColor _color]):
- * bindings/objc/DOMRGBColor.mm:
- (-[DOMRGBColor dealloc]):
- (-[DOMRGBColor finalize]):
- (-[DOMRGBColor red]):
- (-[DOMRGBColor green]):
- (-[DOMRGBColor blue]):
- (-[DOMRGBColor alpha]):
- (-[DOMRGBColor color]):
- * bindings/scripts/CodeGenerator.pm:
- * bindings/scripts/CodeGeneratorJS.pm:
- * bindings/scripts/CodeGeneratorObjC.pm:
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseColor):
- * css/CSSPrimitiveValue.cpp:
- (WebCore::CSSPrimitiveValue::getRGBColorValue):
- * css/CSSPrimitiveValue.h:
- (WebCore::CSSPrimitiveValue::getRGBA32Value):
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
- * css/RGBColor.cpp:
- (WebCore::RGBColor::alpha):
- * css/RGBColor.h:
- (WebCore::RGBColor::color):
- (WebCore::RGBColor::RGBColor):
- * css/RGBColor.idl:
- * page/DOMWindow.idl:
- * svg/SVGColor.cpp:
- (WebCore::SVGColor::rgbColor):
- * svg/SVGColor.h:
-
-2009-07-21 Jian Li <jianli@chromium.org>
-
- Reviewed by David Levin.
-
- Implement AbstractWorker::dispatchScriptErrorEvent by generating an ErrorEvent.
- https://bugs.webkit.org/show_bug.cgi?id=27515
-
- * workers/AbstractWorker.cpp:
- (WebCore::AbstractWorker::dispatchScriptErrorEvent):
-
-2009-07-21 Eric Seidel <eric@webkit.org>
-
- Reviewed by Adam Barth.
-
- Move m_context out of generator into a superclass
- https://bugs.webkit.org/show_bug.cgi?id=27521
-
- Mostly this is removing code from CodeGeneratorJS
- and instead using a DOMObjectWithSVGContext superclass in JSDOMBinding.h.
-
- DOMObjectWithSVGContext.h is its own file so that WebKit doesn't need to
- know about SVGElement.h (WebKit includes JSDOMBinding.h for some reason).
-
- I also removed context pointer from SVGZoomEvent since it was never used.
-
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/DOMObjectWithSVGContext.h: Added.
- (WebCore::DOMObjectWithSVGContext::context):
- (WebCore::DOMObjectWithSVGContext::DOMObjectWithSVGContext):
- * bindings/js/JSDOMBinding.h:
- * bindings/js/JSEventCustom.cpp:
- (WebCore::toJS):
- * bindings/scripts/CodeGeneratorJS.pm:
-
-2009-07-21 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Eric Seidel.
-
- REGRESSION (r46142): editing/execCommand/19087.html & editing/execCommand/19653-1.html fail in Windows build
- https://bugs.webkit.org/show_bug.cgi?id=27480
-
- Because m_anchorType : 2 is treated as a signed integer by cl.exe, anchorType() wasn't returning the correct value.
- We made m_anchorType unsigned so that anchorType() returns the correct value.
-
- * dom/Position.h:
- (WebCore::Position::anchorType): statically cast to AnchorType
-
-2009-07-21 Jian Li <jianli@chromium.org>
-
- Reviewed by David Levin.
-
- [V8] Add V8 bindings for onerror in WorkerContext.
- https://bugs.webkit.org/show_bug.cgi?id=27518
-
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
-
-2009-07-21 Jian Li <jianli@chromium.org>
-
- Fix the incorrect patch being landed for bug 27516 that has already been reviewed.
- https://bugs.webkit.org/show_bug.cgi?id=27516
-
- * workers/WorkerContext.h:
- (WebCore::WorkerContext::setOnerror):
- (WebCore::WorkerContext::onerror):
- * workers/WorkerContext.idl:
-
-2009-07-21 Jian Li <jianli@chromium.org>
-
- Reviewed by David Levin.
-
- Add onerror to WorkerContext.
- https://bugs.webkit.org/show_bug.cgi?id=27516
-
- * bindings/js/JSWorkerContextCustom.cpp:
- (WebCore::JSWorkerContext::mark):
- * workers/WorkerContext.h:
- (WebCore::WorkerContext::setOnerror):
- (WebCore::WorkerContext::onerror):
- * workers/WorkerContext.idl:
-
-2009-07-21 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by George Staikos.
-
- https://bugs.webkit.org/show_bug.cgi?id=27509
- Add font-related files for the WinCE port.
-
- Written by Yong Li <yong.li@torchmobile.com>
-
- * platform/graphics/wince/FontCacheWince.cpp: Added.
- * platform/graphics/wince/FontCustomPlatformData.cpp: Added.
- * platform/graphics/wince/FontCustomPlatformData.h: Added.
- * platform/graphics/wince/FontPlatformData.cpp: Added.
- * platform/graphics/wince/FontPlatformData.h: Added.
- * platform/graphics/wince/FontWince.cpp: Added.
- * platform/graphics/wince/GlyphPageTreeNodeWince.cpp: Added.
- * platform/graphics/wince/SimpleFontDataWince.cpp: Added.
-
-2009-07-21 Kevin Ollivier <kevino@theolliviers.com>
-
- Fix the Windows build, and update the comment on top now that wx uses WebCorePrefix.h too.
-
- * WebCorePrefix.h:
-
-2009-07-21 Kevin Ollivier <kevino@theolliviers.com>
-
- WebCorePrefix.h build fixes for non-Mac and wx / CURL builds.
-
- * WebCorePrefix.h:
-
-2009-07-21 Eric Seidel <eric@webkit.org>
-
- Reviewed by Adam Barth.
-
- All DOMConstructorObjects should hold a pointer to the JSDOMGlobalObject
- https://bugs.webkit.org/show_bug.cgi?id=27478
-
- This is just moving code.
- I've added two new classes: DOMObjectWithGlobalPointer and DOMConstructorWithDocument.
-
- DOMObjectWithGlobalPointer is a new baseclass for DOMConstructorObject.
- (It's a baseclass because eventually all DOMObjects will have a global pointer, but
- I'll be moving them onto DOMObjectWithGlobalPointer in stages.)
-
- DOMConstructorWithDocument is a new baseclass for the 3 constructor objects
- which require a backpointer to the Document to function. I made this a subclass of
- DOMConstructorObject to make clear that most constructors can hold no-such assumptions
- about having a back-pointer to the Document (since many constructors can be used from Workers).
-
- * bindings/js/JSAudioConstructor.cpp:
- (WebCore::JSAudioConstructor::JSAudioConstructor):
- * bindings/js/JSAudioConstructor.h:
- * bindings/js/JSDOMBinding.h:
- (WebCore::DOMObjectWithGlobalPointer::globalObject):
- (WebCore::DOMObjectWithGlobalPointer::scriptExecutionContext):
- (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
- (WebCore::DOMObjectWithGlobalPointer::mark):
- (WebCore::DOMConstructorObject::DOMConstructorObject):
- (WebCore::DOMConstructorWithDocument::document):
- (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
- * bindings/js/JSImageConstructor.cpp:
- (WebCore::JSImageConstructor::JSImageConstructor):
- * bindings/js/JSImageConstructor.h:
- * bindings/js/JSMessageChannelConstructor.cpp:
- (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
- * bindings/js/JSMessageChannelConstructor.h:
- * bindings/js/JSOptionConstructor.cpp:
- (WebCore::JSOptionConstructor::JSOptionConstructor):
- * bindings/js/JSOptionConstructor.h:
- * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
- (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor):
- * bindings/js/JSWebKitPointConstructor.cpp:
- (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor):
- * bindings/js/JSWorkerConstructor.cpp:
- (WebCore::JSWorkerConstructor::JSWorkerConstructor):
- * bindings/js/JSXMLHttpRequestConstructor.cpp:
- (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
- * bindings/js/JSXMLHttpRequestConstructor.h:
- * bindings/js/JSXSLTProcessorConstructor.cpp:
- (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
-
-2009-07-21 James Hawkins <jhawkins@google.com>
-
- Reviewed by David Hyatt.
-
- https://bugs.webkit.org/show_bug.cgi?id=27453
- Initialize isInt when creating a CSSParserValue for a function.
-
- No change in behavior, so no tests.
-
- * css/CSSFunctionValue.cpp:
- (WebCore::CSSFunctionValue::parserValue):
-
-2009-07-20 Jens Alfke <snej@google.com>
-
- Reviewed by David Levin.
-
- Bug 27448: [Chromium] On Mac, arrow keys should cause Select to pop up its menu.
- Mac build of Chromium doesn't follow Mac HI guidelines to pop up the menu when
- an arrow key is pressed.
- https://bugs.webkit.org/show_bug.cgi?id=27448
-
- No new tests; affects only control response to user input.
-
- * dom/SelectElement.cpp:
- Changed definition of ARROW_KEYS_POP_MENU to make it true in Mac Chromium,
- so it will behave compatibly with Mac HI guidelines on pop-up menus.
- It's not possible to have PLATFORM(MAC) be true in the Mac build of Chromium.
-
-2009-07-21 Paul Godavari <paul@chromium.org>
-
- Reviewed by Eric Seidel.
-
- [Chromium] popup menus can crash when the selected index is -1
- https://bugs.webkit.org/show_bug.cgi?id=27275
-
- Crash reports from users indicate a crash can occur when PopupListBox::isSelectableItem
- is passed an index of less than 0 (which is possible under certain circumstances). This
- change prevents such a value from causing a crash by enforcing valid index values passed
- by all callers of isSelectableItem. isSelectableItem is now a private method of
- PopupListBox, as there are no external callers.
-
- Also cleaned up a small amount of code for style and grammar errors.
-
- No automatic test is provided since we cannot send events to the child window used by
- the popup menu.
-
- * platform/chromium/PopupMenuChromium.cpp:
- (WebCore::PopupListBox::acceptIndex):
- (WebCore::PopupListBox::selectIndex):
- (WebCore::PopupListBox::isSelectableItem):
- (WebCore::PopupListBox::selectPreviousRow):
-
-2009-07-21 Kevin Ollivier <kevino@theolliviers.com>
-
- wx build fix. Don't include winsock2.h on wx, it conflicts with wx's inclusion of winsock.
-
- * platform/network/curl/ResourceHandleManager.h:
-
-2009-07-21 Adam Roben <aroben@apple.com>
-
- Roll out r46153, r46154, and r46155
-
- These changes were causing build failures and assertion failures on
- Windows.
-
- * ForwardingHeaders/wtf/PossiblyNull.h: Removed.
- * platform/graphics/cg/ImageBufferCG.cpp:
-
-2009-07-21 Jian Li <jianli@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Implement ErrorEvent API.
- https://bugs.webkit.org/show_bug.cgi?id=27387
-
- * DerivedSources.cpp:
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * bindings/js/JSEventCustom.cpp:
- (WebCore::toJS):
- * dom/ErrorEvent.cpp: Added.
- * dom/ErrorEvent.h: Added.
- * dom/ErrorEvent.idl: Added.
- * dom/Event.cpp:
- (WebCore::Event::isErrorEvent):
- * dom/Event.h:
-
-2009-07-21 Priit Laes <plaes@plaes.org>
-
- Reviewed by Gustavo Noronha.
-
- [Gtk] Searching in thepiratebay.org doesn't work with more than 1 word
- https://bugs.webkit.org/show_bug.cgi?id=24602
-
- Remove workaround required for <=libsoup-2.26.1
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::restartedCallback):
-
-2009-07-21 Adam Barth <abarth@webkit.org>
-
- Reviewed by David Levin.
-
- V8IsolatedWorld keeps a handle to a disposed context
- https://bugs.webkit.org/show_bug.cgi?id=27397
-
- Make a copy of the context handle before making it weak. We don't want
- to make the original handle weak because we want it to survive for the
- length of the V8IsolatedWorld::evaluate method.
-
- * bindings/v8/V8IsolatedWorld.cpp:
- (WebCore::V8IsolatedWorld::V8IsolatedWorld):
-
-2009-07-21 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Web Inspector: Add ability to evaluate selection while on break point.
-
- https://bugs.webkit.org/show_bug.cgi?id=27502
-
- * inspector/front-end/SourceFrame.js:
- (WebInspector.SourceFrame.prototype._loaded):
- (WebInspector.SourceFrame.prototype._documentKeyDown):
-
-2009-07-21 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Special case ConsolePanel opening since
- it is a 'fast view'.
-
- https://bugs.webkit.org/show_bug.cgi?id=27493
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::setWindowVisible):
-
-2009-07-20 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Fix Qt code to follow the WebKit Coding Style.
-
- * platform/graphics/qt/FontQt.cpp:
- (WebCore::qstring):
- (WebCore::fixSpacing):
- * platform/graphics/qt/FontQt43.cpp:
- (WebCore::generateComponents):
- (WebCore::Font::offsetForPositionForComplexText):
- (WebCore::cursorToX):
- * platform/graphics/qt/GradientQt.cpp:
- (WebCore::Gradient::platformGradient):
- * platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::toQtFillRule):
- (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
- (WebCore::GraphicsContext::~GraphicsContext):
- (WebCore::GraphicsContext::getCTM):
- (WebCore::GraphicsContext::concatCTM):
- (WebCore::GraphicsContext::getWindowsContext):
- * platform/graphics/qt/IconQt.cpp:
- (WebCore::Icon::paint):
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoderQt::ReadContext::read):
- (WebCore::ImageDecoderQt::ReadContext::readImageLines):
- (WebCore::ImageDecoderQt::setData):
- * platform/graphics/qt/ImageQt.cpp:
- (WebCore::Image::drawPattern):
- (WebCore::BitmapImage::draw):
- * platform/graphics/qt/ImageSourceQt.cpp:
- (WebCore::ImageSource::frameDurationAtIndex):
- (WebCore::ImageSource::frameHasAlphaAtIndex):
- (WebCore::ImageSource::frameIsCompleteAtIndex):
- * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
- (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
- (WebCore::MediaPlayerPrivate::create):
- (WebCore::MediaPlayerPrivate::bytesLoaded):
- (WebCore::MediaPlayerPrivate::updateStates):
- * platform/graphics/qt/PathQt.cpp:
- (WebCore::Path::addArcTo):
- (WebCore::Path::isEmpty):
- * platform/graphics/qt/TransformationMatrixQt.cpp:
- (WebCore::TransformationMatrix::operator QTransform):
- * platform/qt/ClipboardQt.cpp:
- (WebCore::ClipboardQt::ClipboardQt):
- (WebCore::ClipboardQt::clearData):
- (WebCore::ClipboardQt::clearAllData):
- (WebCore::ClipboardQt::getData):
- (WebCore::ClipboardQt::setData):
- (WebCore::ClipboardQt::setDragImage):
- (WebCore::getCachedImage):
- (WebCore::ClipboardQt::declareAndWriteDragImage):
- (WebCore::ClipboardQt::writeURL):
- (WebCore::ClipboardQt::writeRange):
- (WebCore::ClipboardQt::hasData):
- * platform/qt/ClipboardQt.h:
- * platform/qt/ContextMenuItemQt.cpp:
- (WebCore::ContextMenuItem::action):
- (WebCore::ContextMenuItem::title):
- * platform/qt/CursorQt.cpp:
- (WebCore::westPanningCursor):
- (WebCore::notAllowedCursor):
- * platform/qt/DragDataQt.cpp:
- (WebCore::DragData::containsFiles):
- (WebCore::DragData::asFilenames):
- (WebCore::DragData::asPlainText):
- (WebCore::DragData::asFragment):
- * platform/qt/DragImageQt.cpp:
- (WebCore::createDragImageIconForCachedImage):
- * platform/qt/FileSystemQt.cpp:
- (WebCore::getFileSize):
- (WebCore::unloadModule):
- * platform/qt/Localizations.cpp:
- (WebCore::contextMenuItemTagShowSpellingPanel):
- * platform/qt/MIMETypeRegistryQt.cpp:
- (WebCore::):
- * platform/qt/PasteboardQt.cpp:
- (WebCore::Pasteboard::Pasteboard):
- (WebCore::Pasteboard::writeSelection):
- (WebCore::Pasteboard::plainText):
- * platform/qt/PlatformKeyboardEventQt.cpp:
- (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
- * platform/qt/PlatformMouseEventQt.cpp:
- (WebCore::PlatformMouseEvent::PlatformMouseEvent):
- * platform/qt/PopupMenuQt.cpp:
- (WebCore::PopupMenu::populate):
- * platform/qt/RenderThemeQt.cpp:
- (WebCore::RenderThemeQt::fallbackStyle):
- (WebCore::inflateButtonRect):
- (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
- (WebCore::RenderThemeQt::paintButton):
- (WebCore::RenderThemeQt::paintMenuList):
- (WebCore::RenderThemeQt::applyTheme):
- (WebCore::WorldMatrixTransformer::WorldMatrixTransformer):
- (WebCore::RenderThemeQt::paintMediaBackground):
- (WebCore::RenderThemeQt::paintMediaFullscreenButton):
- * platform/qt/RenderThemeQt.h:
- * platform/qt/ScreenQt.cpp:
- (WebCore::screenRect):
- (WebCore::usableScreenRect):
- * platform/qt/ScrollbarQt.cpp:
- (WebCore::Scrollbar::contextMenu):
- * platform/qt/ScrollbarThemeQt.cpp:
- (WebCore::scPart):
- (WebCore::scrollbarPart):
- * platform/qt/ScrollbarThemeQt.h:
- * platform/qt/SharedBufferQt.cpp:
- (WebCore::SharedBuffer::createWithContentsOfFile):
- * platform/qt/TemporaryLinkStubs.cpp:
- (PluginDatabase::defaultPluginDirectories):
- (PluginDatabase::getPluginPathsInDirectories):
- (PluginDatabase::isPreferredPluginDirectory):
- (WebCore::getSupportedKeySizes):
- (WebCore::signedPublicKeyAndChallengeString):
- (WebCore::userIdleTime):
- (WebCore::prefetchDNS):
- * platform/text/qt/StringQt.cpp:
- (WebCore::String::String):
- * platform/text/qt/TextBoundaries.cpp:
- * platform/text/qt/TextBreakIteratorQt.cpp:
- (WebCore::TextBreakIterator::following):
- (WebCore::TextBreakIterator::preceding):
- (WebCore::WordBreakIteratorQt::first):
- (WebCore::WordBreakIteratorQt::next):
- (WebCore::WordBreakIteratorQt::previous):
- (WebCore::CharBreakIteratorQt::first):
- (WebCore::CharBreakIteratorQt::next):
- (WebCore::CharBreakIteratorQt::previous):
- (WebCore::characterBreakIterator):
- * plugins/qt/PluginPackageQt.cpp:
- (WebCore::PluginPackage::fetchInfo):
- * plugins/qt/PluginViewQt.cpp:
- (WebCore::PluginView::userAgentStatic):
- (WebCore::PluginView::handlePostReadFile):
- (WebCore::PluginView::init):
-
-2009-07-21 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by David Levin.
-
- Added a first bunch of Haiku-specific files for WebCore.
- https://bugs.webkit.org/show_bug.cgi?id=26988
-
- * platform/haiku/ClipboardHaiku.cpp: Added.
- (WebCore::ClipboardHaiku::ClipboardHaiku):
- (WebCore::ClipboardHaiku::clearData):
- (WebCore::ClipboardHaiku::clearAllData):
- (WebCore::ClipboardHaiku::getData):
- (WebCore::ClipboardHaiku::setData):
- (WebCore::ClipboardHaiku::types):
- (WebCore::ClipboardHaiku::files):
- (WebCore::ClipboardHaiku::dragLocation):
- (WebCore::ClipboardHaiku::dragImage):
- (WebCore::ClipboardHaiku::setDragImage):
- (WebCore::ClipboardHaiku::dragImageElement):
- (WebCore::ClipboardHaiku::setDragImageElement):
- (WebCore::ClipboardHaiku::createDragImage):
- (WebCore::ClipboardHaiku::declareAndWriteDragImage):
- (WebCore::ClipboardHaiku::writeURL):
- (WebCore::ClipboardHaiku::writeRange):
- (WebCore::ClipboardHaiku::hasData):
- * platform/haiku/ClipboardHaiku.h: Added.
- (WebCore::ClipboardHaiku::create):
- (WebCore::ClipboardHaiku::~ClipboardHaiku):
- * platform/haiku/CookieJarHaiku.cpp: Added.
- (WebCore::setCookies):
- (WebCore::cookies):
- (WebCore::cookiesEnabled):
- * platform/haiku/CursorHaiku.cpp: Added.
- (WebCore::Cursor::Cursor):
- (WebCore::Cursor::~Cursor):
- (WebCore::Cursor::operator=):
- (WebCore::pointerCursor):
- (WebCore::moveCursor):
- (WebCore::crossCursor):
- (WebCore::handCursor):
- (WebCore::iBeamCursor):
- (WebCore::waitCursor):
- (WebCore::helpCursor):
- (WebCore::eastResizeCursor):
- (WebCore::northResizeCursor):
- (WebCore::northEastResizeCursor):
- (WebCore::northWestResizeCursor):
- (WebCore::southResizeCursor):
- (WebCore::southEastResizeCursor):
- (WebCore::southWestResizeCursor):
- (WebCore::westResizeCursor):
- (WebCore::northSouthResizeCursor):
- (WebCore::eastWestResizeCursor):
- (WebCore::northEastSouthWestResizeCursor):
- (WebCore::northWestSouthEastResizeCursor):
- (WebCore::columnResizeCursor):
- (WebCore::rowResizeCursor):
- (WebCore::verticalTextCursor):
- (WebCore::cellCursor):
- (WebCore::contextMenuCursor):
- (WebCore::noDropCursor):
- (WebCore::copyCursor):
- (WebCore::progressCursor):
- (WebCore::aliasCursor):
- (WebCore::noneCursor):
- (WebCore::notAllowedCursor):
- (WebCore::zoomInCursor):
- (WebCore::zoomOutCursor):
- (WebCore::grabCursor):
- (WebCore::grabbingCursor):
-
-2009-07-21 Albert Astals Cid <aacid@kde.org>
-
- Reviewed by Tor Arne Vestbø.
-
- Change #error line not to have a ' (single quote)
-
- * DerivedSources.cpp:
-
-2009-07-21 Roland Steiner <rolandsteiner@google.com>
-
- Reviewed by David Levin.
-
- Add ENABLE_RUBY to list of build options
- https://bugs.webkit.org/show_bug.cgi?id=27324
-
- Added flag ENABLE_RUBY:
-
- * Configurations/FeatureDefines.xcconfig:
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.pro:
- * WebCore.vcproj/WebCoreCommon.vsprops:
- * WebCore.vcproj/build-generated-files.sh:
-
-2009-07-21 James Hawkins <jhawkins@google.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=27467
- Return an empty path in PlatformContextSkia::currentPathInLocalCoordinates
- if matrix.invert() fails. This prevents the use of an uninitialized
- value in inverseMatrix.
-
- No new tests added. Run
- LayoutTests/svg/dynamic-updates/SVGMarkerElement-dom-markerHeight-attr.html
- under valgrind and notice there are no errors.
-
- * platform/graphics/skia/PlatformContextSkia.cpp:
- (PlatformContextSkia::currentPathInLocalCoordinates):
-
-2009-07-21 Stephen White <senorblanco@chromium.org>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=27388
-
- Fix dotted and dashed borders on Chromium/skia. This follows
- the logic in the Cg path, so results are much closer to Safari now
- (some tests won't be exactly the same due to font layout differences).
-
- * platform/graphics/skia/GraphicsContextSkia.cpp:
- (WebCore::GraphicsContext::drawLine):
- * platform/graphics/skia/PlatformContextSkia.cpp:
- (PlatformContextSkia::setupPaintForStroking):
-
-2009-07-20 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Gavin Barraclough.
-
- Make it harder to misuse try* allocation routines
- https://bugs.webkit.org/show_bug.cgi?id=27469
-
- Add forwarding header for PossiblyNull type, and add missing null check
- to ImageBuffer creation.
-
- * ForwardingHeaders/wtf/PossiblyNull.h: Added.
- * platform/graphics/cg/ImageBufferCG.cpp:
- (WebCore::ImageBuffer::ImageBuffer):
-
-2009-07-20 Adam Langley <agl@google.com>
-
- Reviewed by Eric Seidel.
-
- Guard access to installedMediaEngines()[0].
-
- https://bugs.webkit.org/show_bug.cgi?id=27479
- http://code.google.com/p/chromium/issues/detail?id=16541
-
- Else where in the file, installedMediaEngines is always checked for
- being empty because access. This patch adds a case which missed that
- check.
-
- This triggered a crash in Chromium:
- http://www.yakeze.com/chat/example-chromium-crash/
-
- * platform/graphics/MediaPlayer.cpp:
- (WebCore::MediaPlayer::load):
-
-2009-07-20 Adam Langley <agl@google.com>
-
- Reviewed by Eric Seidel.
-
- Allow search entries to render with a CSS border if the RenderTheme
- doesn't paint them.
-
- https://bugs.webkit.org/show_bug.cgi?id=27466
- http://code.google.com/p/chromium/issues/detail?id=16958
-
- <input type="search"> is very much like a text entry except that,
- currently, if the RenderTheme doesn't deal with it, nothing is
- rendered. With this patch, the default CSS border is rendered if the
- RenderTheme requests it.
-
- This will affect many layout tests, but only for Chromium Linux and
- those results are not currently in the WebKit tree.
-
- * rendering/RenderTheme.cpp:
- (WebCore::RenderTheme::paintBorderOnly):
-
-2009-07-17 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Adam Barth.
-
- Switch to faster methods to access internal fields.
- https://bugs.webkit.org/show_bug.cgi?id=27372
-
- Minor refactoring.
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::convertToSVGPODTypeImpl):
- (WebCore::V8DOMWrapper::setDOMWrapper):
- * bindings/v8/V8DOMWrapper.h:
- (WebCore::V8DOMWrapper::convertDOMWrapperToNative):
- (WebCore::V8DOMWrapper::convertDOMWrapperToNode):
- (WebCore::V8DOMWrapper::convertToNativeObject):
- (WebCore::V8DOMWrapper::convertToNativeEvent):
- * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8ClipboardCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8DocumentCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8ElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
- (WebCore::removeElement):
- * bindings/v8/custom/V8InspectorControllerCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8NodeCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-07-20 Adam Langley <agl@google.com>
-
- Reviewed by Eric Seidel.
-
- Chromium Linux: cache Harfbuzz faces.
-
- https://bugs.webkit.org/show_bug.cgi?id=27473
-
- Previously, we recreated the Harfbuzz face for each script-run. With
- this patch, we keep the Harfbuzz face in the FontPlatformData (created
- as needed) and so they will persist for the duration of the
- FontPlatformData.
-
- Shouldn't affect any layout tests. Results in a significant win on the
- intl2 page cycler time.
-
- * platform/graphics/chromium/FontLinux.cpp:
- (WebCore::TextRunWalker::~TextRunWalker):
- (WebCore::TextRunWalker::setupFontForScriptRun):
- * platform/graphics/chromium/FontPlatformDataLinux.cpp:
- (WebCore::FontPlatformData::RefCountedHarfbuzzFace::~RefCountedHarfbuzzFace):
- (WebCore::FontPlatformData::FontPlatformData):
- (WebCore::FontPlatformData::harfbuzzFace):
- * platform/graphics/chromium/FontPlatformDataLinux.h:
- (WebCore::FontPlatformData::RefCountedHarfbuzzFace::create):
- (WebCore::FontPlatformData::RefCountedHarfbuzzFace::face):
- (WebCore::FontPlatformData::RefCountedHarfbuzzFace::RefCountedHarfbuzzFace):
- * platform/graphics/chromium/HarfbuzzSkia.h: Added.
-
-2009-07-20 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Simon Fraser.
-
- REGRESSION (r46142): Need to remove showTreeThisForThis
- https://bugs.webkit.org/show_bug.cgi?id=27475
-
- Removes showTreeThisForThis
-
- * editing/IndentOutdentCommand.cpp:
- (WebCore::IndentOutdentCommand::appendParagraphIntoNode):
-
-2009-07-19 Ryosuke Niwa <rniwa@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Refactoring of indentRegion to fix bugs 26816 and 25317
- https://bugs.webkit.org/show_bug.cgi?id=26816
- https://bugs.webkit.org/show_bug.cgi?id=25317
- https://bugs.webkit.org/show_bug.cgi?id=23995 (partially)
-
- This patch implements appendParagraphIntoNode, a simpler specialized version of moveParagraph
- and replaces all calls inside indentRegion. The following is the new behavior of indentRegion.
-
- 1. We try to indent as many wrapping nodes as possible.
- e.g. when indenting "hello" in <div>hello</div>, we try to indent div as well.
- 2. We do not delete any wrapping elements
- With moveParagraph, we used to remove all wrapping nodes, and replaced with a blockquote.
- This was causing https://bugs.webkit.org/show_bug.cgi?id=23995 for indentation.
- With appendParagraphIntoNode, we can preserve all wrapping nodes.
- 3. We only split the tree until the closest block node instead of until the root editable node.
- This behavioral change fixes the bug 25317.
- 4. When multiple paragraphs are indented, we indent the highest common ancestor within the selection.
- e.g. when a list is a child node of a div, and the entire div is intended,
- we enclose the div by a single blockquote.
-
- Note that new behavior is more consistent with that of Internet Explorer and Firefox.
- To demonstrate this, the following tests are added.
-
- Tests: editing/execCommand/indent-div-inside-list.html
- editing/execCommand/indent-nested-blockquotes.html
- editing/execCommand/indent-nested-div.html
- editing/execCommand/indent-second-paragraph-in-blockquote.html
-
- * editing/IndentOutdentCommand.cpp: prepareBlockquoteLevelForInsertion is removed
- (WebCore::IndentOutdentCommand::tryIndentingAsListItem): uses appendParagraphIntoNode now
- (WebCore::IndentOutdentCommand::indentIntoBlockquote): uses appendParagraphIntoNode now
- (WebCore::IndentOutdentCommand::appendParagraphIntoNode): removes a paragraph and appends it to a new node
- (WebCore::IndentOutdentCommand::removeUnnecessaryLineBreakAt): removes a break element at the specified position
- (WebCore::IndentOutdentCommand::indentRegion): exhibits the described behavior
- * editing/IndentOutdentCommand.h: updated prototype
-
-2009-07-20 Dan Bernstein <mitz@apple.com>
-
- Try to fix release builds after r46136
-
- * dom/Element.cpp:
-
-2009-07-17 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Eric Seidel.
-
- Media Controls: We are specifying the text height, where it is unneeded and the slider is 2px off.
- https://bugs.webkit.org/show_bug.cgi?id=27380
-
- Adjust the margin of the slider and remove useless height specification to fix alignement of the media controls.
-
- * css/mediaControlsQT.css:
-
-2009-07-20 Peter Kasting <pkasting@google.com>
-
- Reviewed by Mark Rowe.
-
- https://bugs.webkit.org/show_bug.cgi?id=27468
- Back out r46060, which caused problems for some Apple developers.
-
- * WebCore.vcproj/QTMovieWin.vcproj:
- * WebCore.vcproj/WebCoreCommon.vsprops:
- * WebCore.vcproj/WebCoreGenerated.vcproj:
-
-2009-07-20 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Anders Carlsson.
-
- When loading a custom view into a frame, the old document is still
- around
- <rdar://problem/5145841>
-
- Safari fires onload before PDF is loaded into the browser
- <rdar://problem/6618869>
-
- Test: fast/loader/non-html-load-event.html
-
- * GNUmakefile.am: Added PlaceholderDocument.{cpp,h}
- * WebCore.gypi: Ditto.
- * WebCore.pro: Ditto.
- * WebCore.vcproj/WebCore.vcproj: Ditto.
- * WebCore.xcodeproj/project.pbxproj: Ditto.
- * WebCoreSources.bkl: Ditto.
- * dom/Document.h:
- (WebCore::Document::setStyleSelector): Added this protected accessor for
- PlaceholderDocument to use.
- * dom/Element.cpp:
- (WebCore::Element::clientWidth): Check whether the document has a
- renderer.
- (WebCore::Element::clientHeight): Ditto.
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::begin): Create a PlaceholderDocument for frames
- that do not use an HTML view. Do not nullify the content size in
- that case.
- (WebCore::FrameLoader::transitionToCommitted): For frames that do not
- use an HTML view, call receivedFirstData(), which sets up the
- frame with a new PlaceHolderDocument.
- * loader/PlaceholderDocument.cpp: Added.
- (WebCore::PlaceholderDocument::attach): Sets up the style selector but
- does not create a RenderView.
- * loader/PlaceholderDocument.h: Added.
- (WebCore::PlaceholderDocument::create):
- (WebCore::PlaceholderDocument::PlaceholderDocument):
-
-2009-07-20 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser.
-
- Handle opacity and opacity animations on transform layers in Leopard
- https://bugs.webkit.org/show_bug.cgi?id=27398
-
- This makes two changes, and only for Leopard.
-
- First, whenever opacity is changed on a layer I propagate the
- change into the content layer and all the children if the layer
- on which opacity is set is a transform layer (preserve3D is true).
- The opacity set is the accumulated opacity from this layer
- and all its direct ancestor transform layers. Second, I turn off all
- hardware opacity animation.
-
- * platform/graphics/GraphicsLayer.cpp:
- (WebCore::GraphicsLayer::accumulatedOpacity):
- (WebCore::GraphicsLayer::distributeOpacity):
- * platform/graphics/GraphicsLayer.h:
- (WebCore::GraphicsLayer::setOpacityInternal):
- * platform/graphics/mac/GraphicsLayerCA.h:
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayerCA::setPreserves3D):
- (WebCore::GraphicsLayerCA::setOpacity):
- (WebCore::GraphicsLayerCA::animateFloat):
- (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
- (WebCore::GraphicsLayerCA::setOpacityInternal):
- (WebCore::GraphicsLayerCA::updateOpacityOnLayer):
-
-2009-07-20 Yong Li <yong.li@torchmobile.com>
-
- Reviewed by Adam Roben.
-
- https://bugs.webkit.org/show_bug.cgi?id=27349
- Add GraphicsContext implementation for the WinCE port.
-
- Written by Yong Li <yong.li@torchmobile.com>, George Staikos <george.staikos@torchmobile.com> and Lyon Chen <lyon.chen@torchmobile.com>
- with trivial style fixes by Adam Treat <adam.treat@torchmobile.com>
-
- * platform/graphics/wince/GraphicsContextWince.cpp: Added.
-
-2009-07-20 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Adding the Win SQLite VFS implementation for Chromium, and stubs
- for the Mac and Linux VFSs.
-
- https://bugs.webkit.org/show_bug.cgi?id=26940
-
- * WebCore.gypi:
- * platform/chromium/ChromiumBridge.h:
- * platform/sql/chromium/SQLiteFileSystemChromium.cpp: Added.
- * platform/sql/chromium/SQLiteFileSystemChromiumLinux.cpp: Added.
- * platform/sql/chromium/SQLiteFileSystemChromiumMac.cpp: Added.
- * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: Added.
-
-2009-07-20 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- https://bugs.webkit.org/show_bug.cgi?id=27097
- [Gtk] Segfault when examining an object of ROLE_TABLE via at-spi
-
- Check that an object is a RenderObject before trying to access its
- renderer and related node.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (webkit_accessible_get_role):
-
-2009-07-20 Balazs Kelemen <kelemen.balazs.3@stud.u-szeged.hu>
-
- Reviewed by Simon Hausmann.
-
- [Qt] font cache reworking
- https://bugs.webkit.org/show_bug.cgi?id=27265
-
- Reimplemented Qt's FontCache in a way that follows the shared one.
- Now we can release its elements when those became inactive.
- FontFallbackList had been changed to be able to hold WebCore fonts in its list and to be able to release a FontData what is in the cache.
-
- No change in behavior, so no tests.
-
- * platform/graphics/qt/FontCacheQt.cpp:
- (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
- (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
- (WebCore::FontPlatformDataCacheKey::): Key type for the cache of FontPlatformData objects.
- It can be constructed from a FontPlatformData or from a FontDescription. The keys have to be consistent
- with FontPlatformData::FontPlatformData(const FontDescription&) - if we create the same
- FontPlatformData from two FontDescription then we have to create the same key from them, and vica versa.
- (WebCore::FontPlatformDataCacheKey::operator==):
- (WebCore::FontPlatformDataCacheKey::hash):
- (WebCore::FontPlatformDataCacheKey::computeHash):
- (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize):
- (WebCore::FontPlatformDataCacheKeyHash::hash):
- (WebCore::FontPlatformDataCacheKeyHash::equal):
- (WebCore::FontPlatformDataCacheKeyTraits::emptyValue):
- (WebCore::FontPlatformDataCacheKeyTraits::constructDeletedValue):
- (WebCore::FontPlatformDataCacheKeyTraits::isDeletedValue):
- (WebCore::FontCache::getCachedFontPlatformData): Get a FontDescription and returns a FontPlatformData.
- (WebCore::FontCache::getCachedFontData): Get a FontPlatformData and returns a SimpleFontData.
- (WebCore::FontCache::releaseFontData): Get a SimpleFontData and releases it from the cache. Also releases the appropriate FontPlatformData.
- (WebCore::FontCache::purgeInactiveFontData): Frees inactive elements.
- (WebCore::FontCache::invalidate): Frees all inactive elements (call purgeInactiveFontData with default argument)
- * platform/graphics/qt/FontFallbackListQt.cpp:
- (WebCore::FontFallbackList::releaseFontData):
- (WebCore::FontFallbackList::fontDataAt):
- * platform/graphics/qt/FontPlatformData.h:
- (WebCore::FontPlatformData::family): Getter. It is needed for FontPlatformDataCacheKey.
- (WebCore::FontPlatformData::bold): Ditto.
- (WebCore::FontPlatformData::italic): Ditto.
- (WebCore::FontPlatformData::smallCaps): Ditto.
- (WebCore::FontPlatformData::pixelSize): Ditto.
- * platform/graphics/qt/FontPlatformDataQt.cpp:
- (WebCore::FontPlatformData::FontPlatformData): Set m_bold.
-
-2009-07-20 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Holger Freyther.
-
- https://bugs.webkit.org/show_bug.cgi?id=26716
- [Gtk] Each XMLHttpRequest leaks memory.
-
- Free the SoupURI we create to check the URI. Fix suggested by John
- Kjellberg.
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::):
-
-2009-07-20 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Holger Freyther.
-
- [Qt] On Symbian link against system sqlite3
- https://bugs.webkit.org/show_bug.cgi?id=27368
-
- Add an option to force linking against system sqlite3
- by adding system-sqlite to the CONFIG variable.
-
- The Symbian specific part of this patch is contributed by
- Norbert Leser.
-
- * WebCore.pro:
-
-2009-07-20 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- Change the glib version check to check for the first unstable
- release with g_mapped_file_unref. Otherwise this would be useless
- until 2.22 is released, a few months from now.
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::ResourceHandle::startHttp):
-
-2009-07-20 Simon Hausmann <simon.hausmann@nokia.com>
-
- Reviewed by and done with Tor Arne Vestbø.
-
- Fix fast/css/pseudo-required-optional-*.html in the Qt build
- after r46062.
-
- These tests triggered a bug in RenderThemeQt where we did not fall back
- to the unstyled painting of text areas and input fields when they have
- a styled background.
-
- Our re-implementation of isControlStyled incorrectly only checked the
- border for determining whether to style or not. The base-implementation
- performs the same check, but also includes the background. Removing
- our implementation fixes the appearance.
-
- * platform/qt/RenderThemeQt.cpp: Removed isControlStyled reimplementation.
- * platform/qt/RenderThemeQt.h: Ditto.
-
-2009-07-20 Simon Hausmann <simon.hausmann@nokia.com>
-
- Rubber-stamped by Tor Arne Vestbø.
-
- Add missing (sorted) header files to the HEADERS variable in the qmake
- .pro file for improved completion in IDEs.
-
- * WebCore.pro:
-
-2009-07-19 Adam Barth <abarth@webkit.org>
-
- Reviewed by David Levin.
-
- [V8] Factor V8ConsoleMessage out of V8Proxy
- https://bugs.webkit.org/show_bug.cgi?id=27421
-
- No behavior change.
-
- * WebCore.gypi:
- * bindings/v8/V8ConsoleMessage.cpp: Added.
- (WebCore::V8ConsoleMessage::V8ConsoleMessage):
- (WebCore::V8ConsoleMessage::dispatchNow):
- (WebCore::V8ConsoleMessage::dispatchLater):
- (WebCore::V8ConsoleMessage::processDelayed):
- (WebCore::V8ConsoleMessage::handler):
- * bindings/v8/V8ConsoleMessage.h: Added.
- (WebCore::V8ConsoleMessage::Scope::Scope):
- (WebCore::V8ConsoleMessage::Scope::~Scope):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::logInfo):
- (WebCore::reportUnsafeAccessTo):
- (WebCore::V8Proxy::runScript):
- (WebCore::V8Proxy::callFunction):
- (WebCore::V8Proxy::newInstance):
- (WebCore::V8Proxy::initContextIfNeeded):
- (WebCore::V8Proxy::processConsoleMessages):
-
-2009-07-19 Rob Buis <rwlbuis@gmail.com>
-
- Reviewed by Adam Barth.
-
- Remove unused member variable.
-
- * svg/SVGPolyElement.h:
-
-2009-07-19 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Dan Bernstein.
-
- HTMLAudioElement: constructor should set "autobuffer" attribute
- https://bugs.webkit.org/show_bug.cgi?id=27422
-
- Test: media/audio-constructor-autobuffer.html
-
- * bindings/js/JSAudioConstructor.cpp:
- (WebCore::constructAudio):
- Set 'autobuffer' attribute.
-
-2009-07-19 Thierry Bastian <thierry.bastian@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Fix the Qt build with mingw.
-
- * WebCore.pro: Don't use MSVC commandline options to disable warnings
- with mingw.
-
-2009-07-19 Adam Barth <abarth@webkit.org>
-
- Reviewed by David Levin.
-
- [V8] Phase 2: Remove event listener methods from V8Proxy
- https://bugs.webkit.org/show_bug.cgi?id=27415
-
- No behavior change.
-
- * bindings/v8/V8ObjectEventListener.cpp:
- (WebCore::weakObjectEventListenerCallback):
- (WebCore::V8ObjectEventListener::~V8ObjectEventListener):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::disconnectEventListeners):
- * bindings/v8/V8Proxy.h:
- (WebCore::V8Proxy::eventListeners):
- (WebCore::V8Proxy::objectListeners):
- * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
- (WebCore::getEventListener):
- * bindings/v8/custom/V8CustomEventListener.cpp:
- (WebCore::V8EventListener::~V8EventListener):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8ElementCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8MessagePortCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8NodeCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WorkerCustom.cpp:
- (WebCore::getEventListener):
- * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
- (WebCore::getEventListener):
- * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-07-18 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Reviewed by Gustavo Noronha.
-
- [Gtk] soup/ResourceHandleSoup.cpp:533: error: 'g_mapped_file_free' was not declared in this scope
- https://bugs.webkit.org/show_bug.cgi?id=27230
-
- Use g_mapped_file_unref for GLIB version 2.22 onwards.
-
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::ResourceHandle::startHttp):
-
-2009-07-18 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Anders Carlsson.
-
- Add spread radius support to -webkit-box-shadow
- https://bugs.webkit.org/show_bug.cgi?id=27417
- rdar://problem/7072267
-
- Test: fast/box-shadow/spread.html
-
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::valueForShadow): Added a property ID parameter and used it to
- include the spread length for box-shadow but not for text-shadow.
- (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
- Pass the property ID to valueForShadow().
-
- * css/CSSParser.cpp:
- (WebCore::ShadowParseContext::ShadowParseContext): Added property,
- spread, and allowSpread members. Added a property ID parameter to
- the constructor. Initialize the property and allowSpread members.
- (WebCore::ShadowParseContext::allowLength): Added allowSpread.
- (WebCore::ShadowParseContext::commitValue): Pass the spread value to
- the ShadowValue constructor. Reset allowSpread.
- (WebCore::ShadowParseContext::commitLength): Allow spread after blur
- for the box-shadow property.
- (WebCore::ShadowParseContext::commitColor): Reset allowSpread.
- (WebCore::CSSParser::parseShadow): Pass the property ID to
- ShadowParseContext().
-
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty): Get the spread value from
- the shadow value and pass it to the ShadowData constructor.
-
- * css/ShadowValue.cpp:
- (WebCore::ShadowValue::ShadowValue): Added spread.
- (WebCore::ShadowValue::cssText): Added spread.
-
- * css/ShadowValue.h:
- (WebCore::ShadowValue::create): Added spread.
-
- * page/animation/AnimationBase.cpp:
- (WebCore::blendFunc): Blend the spread value.
- (WebCore::PropertyWrapperShadow::blend): Added 0 spread to the default
- shadow.
-
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::placeBoxesHorizontally): Account for spread in
- the visual overflow calculations.
- (WebCore::InlineFlowBox::placeBoxesVertically): Ditto.
- (WebCore::InlineFlowBox::paint): Ditto.
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::overflowHeight): Ditto.
- (WebCore::RenderBlock::overflowWidth): Ditto.
- (WebCore::RenderBlock::overflowLeft): Ditto.
- (WebCore::RenderBlock::overflowTop): Ditto.
- (WebCore::RenderBlock::overflowRect): Ditto.
- (WebCore::RenderBlock::layoutBlock): Ditto.
-
- * rendering/RenderBoxModelObject.cpp:
- (WebCore::RenderBoxModelObject::paintBoxShadow): Inflate the shadow-
- casting rect by the shadow spread value. Adjust border radii if
- necessary.
-
- * rendering/RenderFlexibleBox.cpp:
- (WebCore::RenderFlexibleBox::layoutBlock): Account for spread in the
- visual overflow calculations.
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::calculateRects): Ditto.
-
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Account for spread.
- (WebCore::RenderObject::adjustRectForOutlineAndShadow): Ditto.
-
- * rendering/RenderReplaced.cpp:
- (WebCore::RenderReplaced::adjustOverflowForBoxShadowAndReflect): Ditto.
-
- * rendering/style/RenderStyle.cpp:
- (WebCore::RenderStyle::setTextShadow): Assert that text shadows do not
- have spread.
-
- * rendering/style/ShadowData.cpp:
- (WebCore::ShadowData::ShadowData): Added spread.
- (WebCore::ShadowData::operator==): Compare spread.
- * rendering/style/ShadowData.h:
- (WebCore::ShadowData::ShadowData): Added spread.
-
-2009-07-18 Adam Barth <abarth@webkit.org>
-
- Reviewed by Jan Alonzo.
-
- Minor FrameLoader.cpp cleanup
- https://bugs.webkit.org/show_bug.cgi?id=27406
-
- No behavior change.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::executeIfJavaScriptURL):
-
-2009-07-18 Adam Barth <abarth@webkit.org>
-
- Reviewed by Darin Fisher.
-
- [V8] Move event listener methods from V8Proxy to V8EventListenerList
- https://bugs.webkit.org/show_bug.cgi?id=27408
-
- Move some event listener code out of V8Proxy and into the event
- listener list.
-
- I'd like to remove these methods from V8Proxy entirely and just expose
- getters for the lists themselves, but I'll do that in a follow up
- patch.
-
- * bindings/v8/V8EventListenerList.cpp:
- (WebCore::V8EventListenerList::findWrapper):
- * bindings/v8/V8EventListenerList.h:
- (WebCore::V8EventListenerList::findOrCreateWrapper):
- * bindings/v8/V8ObjectEventListener.cpp:
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::findV8EventListener):
- (WebCore::V8Proxy::findOrCreateV8EventListener):
- (WebCore::V8Proxy::removeV8EventListener):
- (WebCore::V8Proxy::findObjectEventListener):
- (WebCore::V8Proxy::findOrCreateObjectEventListener):
- (WebCore::V8Proxy::removeObjectEventListener):
- * bindings/v8/V8Proxy.h:
-
-2009-07-18 Jeremy Orlow <jorlow@chromium.org>
-
- Rubber stamped by Adam Barth.
-
- Revert https://bugs.webkit.org/show_bug.cgi?id=27383
- https://bugs.webkit.org/show_bug.cgi?id=27407
-
- Revert Jens' patch. I believe he forgot to include a file.
-
- * WebCore.gypi:
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/DOMObjectsInclude.h:
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getTemplate):
- * bindings/v8/V8DataGridDataSource.cpp: Removed.
- * bindings/v8/V8DataGridDataSource.h: Removed.
- * bindings/v8/V8GCController.h:
- * bindings/v8/V8Index.h:
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8HTMLDataGridElementCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
-
-2009-07-17 Daniel Bates <dbates@intudata.com>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=27405
-
- Fixes an issue when decoding HTML entities with an unknown named entity that
- caused null-characters to be inserted into the decoded result.
-
- Test: http/tests/security/xssAuditor/link-onclick-ampersand.html
- http/tests/security/xssAuditor/javascript-link-ampersand.html
-
- * page/XSSAuditor.cpp:
- (WebCore::XSSAuditor::decodeHTMLEntities): Added check to conditional so that
- non-zero entity values are not inserted during decoding process.
-
-2009-07-17 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- <http://webkit.org/b/18363> [GTK] Combo boxes cannot be opened pressing space
-
- Reviewed by Holger Freyther.
-
- Add Gtk to platforms that want to open the menulist using the
- spacebar.
-
- * dom/SelectElement.cpp:
- (WebCore::SelectElement::menuListDefaultEventHandler):
-
-2009-07-17 Mario Sanchez Prada <msanchez@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=25523
- [GTK] The text displayed by push buttons is not exposed to assistive technologies
-
- Add new public method text() to RenderButton and use it from
- AccessibilityRenderObject::stringValue().
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::stringValue):
- * rendering/RenderButton.cpp:
- (WebCore::RenderButton::text):
- * rendering/RenderButton.h:
-
-2009-07-17 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Restore proxy retrieval
- https://bugs.webkit.org/show_bug.cgi?id=27369
-
- No new tests are needed.
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::instantiateV8Object):
-
-2009-07-17 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by George Staikos.
-
- https://bugs.webkit.org/show_bug.cgi?id=27351
- Added platform "Symbian" to WEBCORE_NAVIGATOR_PLATFORM
- Use uname to find the correct platform for Linux.
-
- * page/NavigatorBase.cpp:
- (WebCore::NavigatorBase::platform):
-
-2009-07-17 Jens Alfke <snej@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Hook up V8 bindings for DataGrid elements.
- https://bugs.webkit.org/show_bug.cgi?id=27383
- http://code.google.com/p/chromium/issues/detail?id=16730
-
- Tests: Enhanced LayoutTests/fast/dom/HTMLDataGridElement/*
- to handle exceptions, check appropriate JS prototypes, and
- test column-list's item() method as well as array-indexing.
-
- * WebCore.gypi: Added new source files.
- * bindings/scripts/CodeGeneratorV8.pm: Made GenerateBatchedAttributeData put #if's around conditional attributes.
- * bindings/v8/DOMObjectsInclude.h: #include DataGrid headers.
- * bindings/v8/V8DOMWrapper.cpp: Add bindings from HTML tags to datagrid templates.
- (WebCore::V8DOMWrapper::getTemplate): Customize datagrid template.
- * bindings/v8/V8DataGridDataSource.cpp: Added. (Based on JSDataGridDataSource)
- (WebCore::V8DataGridDataSource::V8DataGridDataSource):
- (WebCore::V8DataGridDataSource::~V8DataGridDataSource):
- * bindings/v8/V8DataGridDataSource.h: Added. (Based on JSDataGridDataSource)
- (WebCore::V8DataGridDataSource::create):
- (WebCore::V8DataGridDataSource::isJSDataGridDataSource):
- (WebCore::V8DataGridDataSource::jsDataSource):
- (WebCore::asV8DataGridDataSource):
- * bindings/v8/V8GCController.h: Added new handle type "DATASOURCE".
- * bindings/v8/V8Index.h: Conditionalize datagrid stuff.
- * bindings/v8/custom/V8CustomBinding.h: Declare more accessors. Conditionalize.
- * bindings/v8/custom/V8HTMLDataGridElementCustom.cpp: Fill in dataSource accessors.
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
-
-2009-07-17 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- StorageArea should only contain methods we intend to proxy.
- https://bugs.webkit.org/show_bug.cgi?id=27181
-
- Right now, StorageAreaSync takes in a StorageArea* and calls methods
- like importItem. Really, StorageAreaSync should be operating directly
- on StorageAreaImpl* and those methods should be removed from StorageArea
- since StorageAreaSync should never be attached to anything other than a
- StorageAreaImpl.
-
- This was pointed out in the review for
- https://bugs.webkit.org/show_bug.cgi?id=27072
-
- Also clean up StorageNamespaceImpl to operate directly on
- StorageAreaImpl. Also, get rid of the factory for StorageArea
- since nothing should ever create a StorageArea directly.
-
- * GNUmakefile.am:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * storage/StorageArea.cpp: Removed.
- * storage/StorageArea.h:
- (WebCore::StorageArea::~StorageArea):
- * storage/StorageAreaImpl.cpp:
- (WebCore::StorageAreaImpl::copy):
- * storage/StorageAreaImpl.h:
- * storage/StorageAreaSync.cpp:
- (WebCore::StorageAreaSync::create):
- (WebCore::StorageAreaSync::StorageAreaSync):
- * storage/StorageAreaSync.h:
- * storage/StorageNamespaceImpl.cpp:
- (WebCore::StorageNamespaceImpl::copy):
- (WebCore::StorageNamespaceImpl::storageArea):
- * storage/StorageNamespaceImpl.h:
-
-2009-07-17 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Add v8 implementation for DOM Storage ScriptObjectQuarantine.
- https://bugs.webkit.org/show_bug.cgi?id=27327
-
- Wrap the storage object with a generic object as is done elsewhere in
- the file (but continue to hit a NOTIMPLEMENTED if DOM_STORAGE is not
- enabled.
-
- * bindings/v8/ScriptObjectQuarantine.cpp:
- (WebCore::getQuarantinedScriptObject):
-
-2009-07-17 Mads Ager <ager@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- https://bugs.webkit.org/show_bug.cgi?id=27394
- Fix access to global object wrappers after navigation of their
- frame in the V8 bindings. This fixes selenium test failures.
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::updateDocument):
-
-2009-07-17 Mark Rowe <mrowe@apple.com>
-
- Fix the 32-bit build by removing implicit float <-> double conversions.
-
- * inspector/InspectorController.cpp:
- (WebCore::constrainedAttachedWindowHeight):
-
-2009-07-17 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Adam Roben.
-
- Fix of <rdar://problem/5712795> Win: Cannot change the height of the docked Web Inspector (14272)
- https://bugs.webkit.org/show_bug.cgi?id=14272
-
- Moved preference setting for attached inspector height and inspector height calculation from
- WebInspectorClient.mm into InspectorController.cpp, to make this code cross-platform and enable
- Windows resizing of attached inspector.
-
- * inspector/InspectorController.cpp:
- * inspector/InspectorController.h:
-
-2009-07-17 Dan Bernstein <mitz@apple.com>
-
- Another attempt at fixing the build after r46063
-
- * WebCore.xcodeproj/project.pbxproj: Made ExceptionCode.h a private
- header, because it is now included from htmlediting.h, which is
- a private header.
-
-2009-07-17 Alexey Proskuryakov <ap@webkit.org>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=27396
- Moving cursor in Thai text sometimes jumps over two characters
-
- Test: editing/text-iterator/thai-cursor-movement.html
-
- * platform/text/TextBreakIteratorICU.cpp: (WebCore::cursorMovementIterator): Added a special
- case for five Thai characters, matching ICU/CLDR changes.
-
-2009-07-14 Eric Seidel <eric@webkit.org>
-
- Reviewed by Adam Barth.
-
- Some constructor objects exposed on Window have the wrong prototype chain
- https://bugs.webkit.org/show_bug.cgi?id=27276
-
- Several Constructor classes were already being passed a global object
- during construction, but they were ignoring it for prototype lookup.
- I've fixed those to use the passed global object instead.
-
- Most of these Constructor classes should just be auto-generated, but I
- refrained from changing them over to auto-gen in this patch.
-
- Fixed CodeGeneratorJS to pass a global object to getDOMConstructor when
- available, otherwise default to deprecatedGlobalObjectForPrototype(exec)
- to match existing behavior.
-
- Test: fast/dom/prototype-inheritance.html
-
- * bindings/js/JSAudioConstructor.cpp:
- (WebCore::JSAudioConstructor::JSAudioConstructor): use the existing globalObject pointer for prototype lookup
- * bindings/js/JSDOMBinding.h:
- (WebCore::deprecatedGlobalObjectForPrototype): Make it easy to detect where the wrong global object is being used.
- (WebCore::deprecatedGetDOMStructure):
- * bindings/js/JSDOMGlobalObject.h: remove error-prone getDOMConstructor, require passing JSDOMGlobalObject*
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::webKitPoint): pass "this" for the global object.
- (WebCore::JSDOMWindow::webKitCSSMatrix): pass "this" for the global object.
- (WebCore::JSDOMWindow::xsltProcessor): pass "this" for the global object.
- (WebCore::JSDOMWindow::worker): pass "this" for the global object.
- * bindings/js/JSImageConstructor.cpp:
- (WebCore::JSImageConstructor::JSImageConstructor): use the existing globalObject pointer for prototype lookup
- * bindings/js/JSMessageChannelConstructor.cpp:
- (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor): use the existing globalObject pointer for prototype lookup
- * bindings/js/JSOptionConstructor.cpp:
- (WebCore::JSOptionConstructor::JSOptionConstructor): use the existing globalObject pointer for prototype lookup
- * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
- (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor): add new globalObject parameter and use it
- * bindings/js/JSWebKitCSSMatrixConstructor.h:
- * bindings/js/JSWebKitPointConstructor.cpp:
- (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor): add new globalObject parameter and use it
- * bindings/js/JSWebKitPointConstructor.h:
- * bindings/js/JSWorkerConstructor.cpp:
- (WebCore::JSWorkerConstructor::JSWorkerConstructor): add new globalObject parameter and use it
- * bindings/js/JSWorkerConstructor.h:
- * bindings/js/JSXMLHttpRequestConstructor.cpp:
- (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor): use the existing globalObject pointer for prototype lookup
- -- XMLHttpRequest constructor was also missing a length. Added one.
- * bindings/js/JSXSLTProcessorConstructor.cpp:
- (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
- * bindings/js/JSXSLTProcessorConstructor.h:
- * bindings/scripts/CodeGeneratorJS.pm:
-
-2009-07-17 Dan Bernstein <mitz@apple.com>
-
- Build fix
-
- * editing/htmlediting.cpp:
- (WebCore::visiblePositionBeforeNode):
- (WebCore::visiblePositionAfterNode):
-
-2009-07-17 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Gtk build fix for symbol lookup error.
-
- Move AbstractWorker from SHARED_WORKERS to WORKERS as Worker derives from it now
- Changed in http://trac.webkit.org/changeset/46048
-
- * GNUmakefile.am:
-
-2009-07-17 Ryosuke Niwa <ryosuke.niwa@gmail.com>
-
- Reviewed by Eric Seidel.
-
- htmlediting.cpp needs more utility functions to fix the bug 26816
- https://bugs.webkit.org/show_bug.cgi?id=27038
-
- In order to fix the bug 26816, we need several utility functions be added to htmlediting.cpp
-
- No tests because functions haven't been used anywhere yet.
-
- * dom/Range.cpp:
- (WebCore::Range::create):
- (WebCore::Range::comparePoint): added const qualifier
- (WebCore::Range::compareNode): added const qualifier
- * dom/Range.h:
- * editing/htmlediting.cpp:
- (WebCore::unsplittableElementForPosition): find the enclosing unsplittable element (editing root & table cell)
- (WebCore::positionBeforeNode): added ASSERT(node)
- (WebCore::positionAfterNode): added ASSERT(node)
- (WebCore::visiblePositionBeforeNode):
- (WebCore::visiblePositionAfterNode):
- (WebCore::createRange): create a range object from two visible positions
- (WebCore::extendRangeToWrappingNodes): extend range to include nodes that starts and ends at the boundaries
- (WebCore::canMergeLists): typo
- (WebCore::indexForVisiblePosition): added const qualifier
- (WebCore::isVisiblyAdjacent): typo
- (WebCore::isNodeVisiblyContainedWithin): determine if a node is inside a range or within the visible boundaries of the range
- * editing/htmlediting.h:
-
-2009-07-17 Michelangelo De Simone <micdesim@gmail.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=25551
- Added support for the "required" attribute, the valueMissing flag
- to the ValidityState object and :required/:optional CSS pseudoclasses.
- Part of HTML5 sec. Forms specs.
- http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#attr-input-required
-
- Tests: fast/css/pseudo-required-optional-001.html
- fast/css/pseudo-required-optional-002.html
- fast/css/pseudo-required-optional-003.html
- fast/css/pseudo-required-optional-004.html
- fast/css/pseudo-required-optional-005.html
- fast/css/pseudo-required-optional-006.html
- fast/forms/ValidityState-valueMissing-001.html
- fast/forms/ValidityState-valueMissing-002.html
- fast/forms/ValidityState-valueMissing-003.html
- fast/forms/ValidityState-valueMissing-004.html
- fast/forms/ValidityState-valueMissing-005.html
- fast/forms/ValidityState-valueMissing-006.html
- fast/forms/ValidityState-valueMissing-007.html
- fast/forms/ValidityState-valueMissing-008.html
- fast/forms/ValidityState-valueMissing-009.html
- fast/forms/required-attribute-001.html
- fast/forms/required-attribute-002.html
-
- * css/CSSSelector.cpp:
- (WebCore::CSSSelector::extractPseudoType): pseudoRequired/pseudoOptional
- * css/CSSSelector.h:
- (WebCore::CSSSelector::): ditto
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): ditto
- * dom/Element.h:
- (WebCore::Element::isOptionalFormControl): check for optional controls
- (WebCore::Element::isRequiredFormControl): check for required controls
- * html/HTMLAttributeNames.in: required attribute
- * html/HTMLButtonElement.h:
- (WebCore::HTMLButtonElement::isOptionalFormControl): ditto
- * html/HTMLFormControlElement.cpp:
- (WebCore::HTMLFormControlElement::required): requiredAttr getter
- (WebCore::HTMLFormControlElement::setRequired): requiredAttr setter
- * html/HTMLFormControlElement.h:
- (WebCore::HTMLFormControlElement::valueMissing): method definition
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::valueMissing): validation code
- (WebCore::HTMLInputElement::isRequiredFormControl): ditto
- * html/HTMLInputElement.h:
- (WebCore::HTMLInputElement::isOptionalFormControl): ditto
- * html/HTMLInputElement.idl: required DOM attribute
- * html/HTMLSelectElement.h:
- (WebCore::HTMLSelectElement::isOptionalFormControl): ditto
- * html/HTMLTextAreaElement.h:
- (WebCore::HTMLTextAreaElement::valueMissing): validation code
- (WebCore::HTMLTextAreaElement::isOptionalFormControl): ditto
- (WebCore::HTMLTextAreaElement::isRequiredFormControl): ditto
- * html/HTMLTextAreaElement.idl: required DOM attribute
- * html/ValidityState.cpp:
- * html/ValidityState.h:
- (WebCore::ValidityState::valueMissing): validation flag
-
-2009-07-17 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Darin Adler.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=27390 CSS custom
- cursor hotspots should work in quirks mode
- - and corresponding <rdar://problem/6554340>
-
- Enable hotspots in quirks mode.
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue):
-
- Update this manual test to reflect the fact that hotspots are now
- expected to work in quirks mode.
- * manual-tests/css3-cursor-fallback-quirks.html:
-
-2009-07-17 Peter Kasting <pkasting@google.com>
-
- Reviewed by Steve Falkenburg.
-
- https://bugs.webkit.org/show_bug.cgi?id=27323
- Only add Cygwin to the path when it isn't already there. This avoids
- causing problems for people who purposefully have non-Cygwin versions of
- executables like svn in front of the Cygwin ones in their paths.
-
- * WebCore.vcproj/QTMovieWin.vcproj:
- * WebCore.vcproj/WebCoreCommon.vsprops:
- * WebCore.vcproj/WebCoreGenerated.vcproj:
-
-2009-07-17 Alexey Proskuryakov <ap@webkit.org>
-
- Reviewed by David Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=27384
- Random crashes in appcache/update-cache.html test
-
- * loader/appcache/ApplicationCacheGroup.cpp:
- (WebCore::ApplicationCacheGroup::didReceiveResponse): Reorder code to avoid using a handle
- after canceling it.
-
-2009-07-17 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- Need to refactor Worker to derive from AbstractWorker
- https://bugs.webkit.org/show_bug.cgi?id=26948
-
- Changed Worker to derive from AbstractWorker, which involved moving
- AbstractWorker files from being wrapped by ENABLE_SHARED_WORKERS to
- ENABLE_WORKERS.
-
- Removed obsolete functionality from the JS/V8 bindings that is now
- inherited from AbstractWorker.
-
- * WebCore.pro:
- Moved AbstractWorker files out of SHARED_WORKERS section and into WORKERS.
- * bindings/js/JSAbstractWorkerCustom.cpp:
- Changed to be wrapped by ENABLE(WORKERS), not ENABLE(SHARED_WORKERS).
- * bindings/js/JSWorkerCustom.cpp:
- Removed obsolete event listener code (now in base class)
- (WebCore::JSWorker::mark):
- No longer need to explicitly mark event listeners (handled by base class).
- * bindings/v8/V8Index.h:
- Moved AbstractWorker lines out of SHARED_WORKERS section and into WORKERS.
- * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
- Changed to be wrapped by ENABLE(WORKERS), not ENABLE(SHARED_WORKERS).
- * bindings/v8/custom/V8CustomBinding.h:
- Moved AbstractWorker lines out of SHARED_WORKERS section and into WORKERS.
- * bindings/v8/custom/V8WorkerCustom.cpp:
- Removed obsolete event listener code that now lives in the base class.
- (WebCore::V8WorkerConstructor): Cleaned up legacy style nits.
- * workers/AbstractWorker.cpp:
- Changed to be wrapped by ENABLE(WORKERS), not ENABLE(SHARED_WORKERS).
- * workers/AbstractWorker.h:
- Changed to be wrapped by ENABLE(WORKERS), not ENABLE(SHARED_WORKERS).
- * workers/Worker.cpp:
- Removed event listener code (now in base class).
- (WebCore::Worker::Worker): Now derives from AbstractWorker.
- (WebCore::Worker::notifyFinished): Calls dispatchLoadErrorEvent on base class.
- * workers/Worker.h:
- Removed APIs that now live in the base class.
- * workers/Worker.idl:
- Now derives from AbstractWorker.
- Removed APIs that live in the base class, and added a GenerateToJS flag.
-
-2009-07-17 David Hyatt <hyatt@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=27379
- Absolutely-positioned elements with a scrollbar wrap prematurely. Make sure to include
- the vertical scrollbar width for overflow:scroll elements.
-
- Added fast/css/positioned-overflow-scroll.html
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::calcPrefWidths):
- * rendering/RenderFlexibleBox.cpp:
- (WebCore::RenderFlexibleBox::calcPrefWidths):
-
-2009-07-17 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Need a DOM_STORAGE guard in DerivedSroucesAllInOne.cpp
- https://bugs.webkit.org/show_bug.cgi?id=27375
-
- In https://bugs.webkit.org/show_bug.cgi?id=27360 I added Storage.cpp
- and StorageEvent.cpp. Unfortunately, until later this afternoon,
- DOM_STORAGE is not turned on by default in Chromium, and so these two
- files are never generated. This breaks the compile.
-
- There are no other instances of guards in the file, which puzzles me...
- but I think adding guards is the right way to go about this.
-
- * bindings/v8/DerivedSourcesAllInOne.cpp: Added the guard.
-
-2009-07-17 Brady Eidson <beidson@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=26496
-
- Let WebCore always enforce the connection-per-host limit itself.
-
- * loader/loader.cpp:
- (WebCore::Loader::Host::servePendingRequests):
-
-2009-07-17 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by David Hyatt.
-
- Some transitions don't work correctly on Leopard
- https://bugs.webkit.org/show_bug.cgi?id=27356
-
- We only have code to do component animation using valueFunction.
- So on Leopard we always need to do matrix animation in hardware.
- This fix ensures that.
-
- This is currently not testable because it appears only in the
- hardware animation and we can't yet do pixel tests while
- hardware animating.
-
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayerCA::animateTransform):
-
-2009-07-17 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by Gustavo Noronha.
-
- [GTK+] Crash in screenAvailable due a null Widget*
-
- JSDOMWindow::open called screenAvailableRect(0). The other
- Screen methods can be called with a null widget as well, fix the
- crashing test by checking for null.
-
- In screenRect and screenAvailableRect it is not tried to use
- a default screen as the existing implementation didn't try either
- in case of not having a toplevel widget.
-
- LayoutTests/fast/frames/crash-removed-iframe.html caused a crash.
-
- * platform/gtk/PlatformScreenGtk.cpp:
- (WebCore::getVisual): New method to get a visual or return zero.
- (WebCore::screenDepth): Use getVisual.
- (WebCore::screenDepthPerComponent): Use getVisual.
- (WebCore::screenIsMonochrome): Use screenDepth which will do the null checking
- (WebCore::screenRect): Check for !widget.
- (WebCore::screenAvailableRect): Check for !widget.
-
-2009-07-17 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Fix the include path for the Symbian port
- https://bugs.webkit.org/show_bug.cgi?id=27358
-
- * WebCore.pro:
-
-2009-07-17 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
-
- Reviewed by Simon Hausmann.
-
- Make it possible to set the plugin directories from the DRT.
- Part of https://bugs.webkit.org/show_bug.cgi?id=27215
-
- * plugins/PluginDatabase.cpp:
- (WebCore::PluginDatabase::installedPlugins): Now optionally takes
- a populate argument, so we can avoid loading system plugins from the
- DRT and thus avoid their strerr errors that can make tests fail.
- (WebCore::PluginDatabase::clear): Make it possible to clear the
- database. Called from setPluginDirectories.
- * plugins/PluginDatabase.h:
- (WebCore::PluginDatabase::setPluginDirectories): Make public
-
-2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- PluginViewMac: Stop the plugin when loading fails
-
- Also, prevent event propagation when in the stopped state
-
- * plugins/mac/PluginViewMac.cpp:
-
-2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- PluginViewMac: Allow query and set of drawing and event models
-
- We now support querying and setting of the drawing and event model,
- but we still only support the CoreGraphics drawing model, and the
- Carbon event model.
-
- If unsupported drawing or event models are detected we show the
- missing-plugin icon.
-
- * plugins/PluginView.cpp:
- * plugins/PluginView.h:
- * plugins/mac/PluginViewMac.cpp:
-
-2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Initialize two PluginView members using memset
-
- m_npWindow is used on all platforms, not just for XP_UNIX,
- so always initialize it. m_npCgContext on the other hand
- is only used for XP_MACOSX.
-
- * plugins/PluginView.cpp:
-
-2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Add more debug logging in PluginView
-
- * plugins/PluginView.cpp: Add debug for setValue
- * plugins/gtk/PluginViewGtk.cpp: Add debug for getValue
- * plugins/mac/PluginViewMac.cpp: Add debug for getValue and more
- * plugins/qt/PluginViewQt.cpp: Add debug for getValue
- * plugins/win/PluginViewWin.cpp: Add debug for getValue
-
-2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Holger Freyther.
-
- Use same license in PluginDebug.cpp as in the original PluginDebug.h
-
- * plugins/PluginDebug.cpp: Use license from PluginDebug.h
-
-2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Add more debugging functionality for the WebCore NPAPI layer
-
- * GNUmakefile.am: Add PluginDebug.cpp
- * WebCore.gypi: Add PluginDebug.cpp
- * WebCore.pro: Add PluginDebug.cpp
- * WebCore.vcproj/WebCore.vcproj: Add PluginDebug.cpp
- * WebCoreSources.bkl: Add PluginDebug.cpp
- * plugins/PluginDebug.h: Move errorStrings to PluginDebug.cpp
- * plugins/PluginDebug.cpp: New file
-
-2009-07-17 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by David Levin.
-
- Fix Chromium build with DOM_STORAGE enabled.
- https://bugs.webkit.org/show_bug.cgi?id=27360
-
- 2 minor changes as noted below:
-
- * bindings/v8/DerivedSourcesAllInOne.cpp: Add the generated .cpp files.
- * storage/StorageAreaImpl.cpp: #include "DOMWindow.h"
-
-2009-07-16 Fumitoshi Ukai <ukai@chromium.org>
-
- Reviewed by David Levin.
-
- Add --web-sockets flag and ENABLE_WEB_SOCKETS define.
- https://bugs.webkit.org/show_bug.cgi?id=27206
-
- Add ENABLE_WEB_SOCKETS
-
- * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS
- * GNUmakefile.am: add ENABLE_WEB_SOCKETS
- * WebCore.vcproj/WebCoreCommon.vsprops: add ENABLE_WEB_SOCKETS
- * WebCore.vcproj/build-generated-files.sh: add ENABLE_WEB_SOCKETS
-
-2009-07-16 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Oliver Hunt.
-
- Added a third bunch of Haiku-specific files for WebCore.
- https://bugs.webkit.org/show_bug.cgi?id=26952
-
- Adding five files, EventLoopHaiku.cpp, FileChooserHaiku.cpp,
- FileSystemHaiku.cpp, KeyboardCodes.h and MIMETypeRegistryHaiku.cpp
-
- * platform/haiku/EventLoopHaiku.cpp: Added.
- (WebCore::EventLoop::cycle):
- * platform/haiku/FileChooserHaiku.cpp: Added.
- (WebCore::FileChooser::FileChooser):
- (WebCore::FileChooser::basenameForWidth):
- * platform/haiku/FileSystemHaiku.cpp: Added.
- (WebCore::fileSystemRepresentation):
- (WebCore::homeDirectoryPath):
- (WebCore::openTemporaryFile):
- (WebCore::closeFile):
- (WebCore::writeToFile):
- (WebCore::unloadModule):
- (WebCore::listDirectory):
- * platform/haiku/KeyboardCodes.h: Added.
- * platform/haiku/MIMETypeRegistryHaiku.cpp: Added.
- (WebCore::):
- (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
-
-2009-07-16 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Oliver Hunt.
-
- Added a second bunch of Haiku-specific files for WebCore.
- https://bugs.webkit.org/show_bug.cgi?id=26952
-
- Adding four files, ContextMenuHaiku.cpp, ContextMenuItemHaiku.cpp,
- DragDataHaiku.cpp and DragImageHaiku.cpp
-
- * platform/haiku/ContextMenuHaiku.cpp: Added.
- (WebCore::ContextMenuReceiver::ContextMenuReceiver):
- (WebCore::ContextMenuReceiver::HandleMessage):
- (WebCore::ContextMenuReceiver::Result):
- (WebCore::ContextMenu::ContextMenu):
- (WebCore::ContextMenu::~ContextMenu):
- (WebCore::ContextMenu::appendItem):
- (WebCore::ContextMenu::itemCount):
- (WebCore::ContextMenu::insertItem):
- (WebCore::ContextMenu::platformDescription):
- (WebCore::ContextMenu::setPlatformDescription):
- * platform/haiku/ContextMenuItemHaiku.cpp: Added.
- (ContextMenuItem::ContextMenuItem):
- (ContextMenuItem::~ContextMenuItem):
- (ContextMenuItem::releasePlatformDescription):
- (ContextMenuItem::type):
- (ContextMenuItem::setType):
- (ContextMenuItem::action):
- (ContextMenuItem::setAction):
- (ContextMenuItem::title):
- (ContextMenuItem::setTitle):
- (ContextMenuItem::platformSubMenu):
- (ContextMenuItem::setSubMenu):
- (ContextMenuItem::setChecked):
- (ContextMenuItem::setEnabled):
- (ContextMenuItem::enabled):
- * platform/haiku/DragDataHaiku.cpp: Added.
- (WebCore::DragData::canSmartReplace):
- (WebCore::DragData::containsColor):
- (WebCore::DragData::containsFiles):
- (WebCore::DragData::asFilenames):
- (WebCore::DragData::containsPlainText):
- (WebCore::DragData::asPlainText):
- (WebCore::DragData::asColor):
- (WebCore::DragData::createClipboard):
- (WebCore::DragData::containsCompatibleContent):
- (WebCore::DragData::containsURL):
- (WebCore::DragData::asURL):
- (WebCore::DragData::asFragment):
- * platform/haiku/DragImageHaiku.cpp: Added.
- (WebCore::dragImageSize):
- (WebCore::deleteDragImage):
- (WebCore::scaleDragImage):
- (WebCore::dissolveDragImageToFraction):
- (WebCore::createDragImageFromImage):
- (WebCore::createDragImageIconForCachedImage):
-
-2009-07-16 Stephen White <senorblanco@chromium.org>
-
- Reviewed by Darin Fisher and Brett Wilson.
-
- Refactor Skia implementation of gradients and patterns.
-
- http://bugs.webkit.org/show_bug.cgi?id=26618
-
- The following layout tests were breaking on Chromium/Linux:
-
- LayoutTests/svg/custom/js-late-gradient-creation.svg (bad baseline PNG)
- LayoutTests/svg/custom/js-late-gradient-and-object.creation.svg
- LayoutTests/svg/custom/js-late-pattern-creation.svg (bad baseline PNG)
- LayoutTests/svg/custom/js-late-pattern-and-object-creation.svg
-
- I could've fixed these the easy way, by copying the same 5
- lines of code we use everywhere we need patterns or gradients, but
- I decided to fix it the hard way: by refactoring the code so that
- PlatformContextSkia::setupPaintForFilling() and
- PlatformContextSkia::setupPaintForStroking() do the right thing,
- and also handle gradients and patterns.
-
- This required pushing the gradients and patterns set in
- (generic) GraphicsContext::setFillPattern() and friends down into
- PlatformContextSkia. For this, I followed the setPlatformXXX()
- pattern used elsewhere in GraphicsContext, and stubbed them out on
- the other platforms with #if !PLATFORM(SKIA). This also required
- pushing changes to the gradientSpaceTransform from the Gradient into
- GradientSkia.
-
- Since it's a Skia context, I decided to cache the values as
- SkShaders. There were existing m_pattern and m_gradient SkShaders,
- but they were unused, and whose use was ambiguous, so I
- replaced them with one SkShader each for filling and stroking.
-
* platform/graphics/Gradient.cpp:
- (WebCore::Gradient::setGradientSpaceTransform):
- (WebCore::Gradient::setPlatformGradientSpaceTransform):
- * platform/graphics/Gradient.h:
- * platform/graphics/GraphicsContext.cpp:
- (WebCore::GraphicsContext::setStrokePattern):
- (WebCore::GraphicsContext::setFillPattern):
- (WebCore::GraphicsContext::setStrokeGradient):
- (WebCore::GraphicsContext::setFillGradient):
- (WebCore::GraphicsContext::setPlatformFillGradient):
- (WebCore::GraphicsContext::setPlatformFillPattern):
- (WebCore::GraphicsContext::setPlatformStrokeGradient):
- (WebCore::GraphicsContext::setPlatformStrokePattern):
- * platform/graphics/GraphicsContext.h:
- * platform/graphics/skia/GradientSkia.cpp:
- (WebCore::Gradient::setPlatformGradientSpaceTransform):
- * platform/graphics/skia/GraphicsContextSkia.cpp:
- (WebCore::GraphicsContext::fillPath):
- (WebCore::GraphicsContext::fillRect):
- (WebCore::GraphicsContext::setPlatformFillGradient):
- (WebCore::GraphicsContext::setPlatformFillPattern):
- (WebCore::GraphicsContext::setPlatformStrokeGradient):
- (WebCore::GraphicsContext::setPlatformStrokePattern):
- (WebCore::GraphicsContext::strokePath):
- (WebCore::GraphicsContext::strokeRect):
- * platform/graphics/skia/PlatformContextSkia.cpp:
- (PlatformContextSkia::State::State):
- (PlatformContextSkia::State::~State):
- (PlatformContextSkia::drawRect):
- (PlatformContextSkia::setupPaintCommon):
- (PlatformContextSkia::setupPaintForFilling):
- (PlatformContextSkia::setupPaintForStroking):
- (PlatformContextSkia::setFillColor):
- (PlatformContextSkia::setStrokeColor):
- (PlatformContextSkia::setStrokeShader):
- (PlatformContextSkia::setFillShader):
- * platform/graphics/skia/PlatformContextSkia.h:
- * platform/graphics/skia/SkiaFontWin.cpp:
- (WebCore::skiaDrawText):
- (WebCore::paintSkiaText):
- * svg/graphics/SVGPaintServer.cpp:
- (WebCore::SVGPaintServer::teardown):
-
-2009-07-16 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Oliver Hunt.
-
- Added Haiku-specific files for WebCore/platform/image-decoders/.
- https://bugs.webkit.org/show_bug.cgi?id=26949
-
- Adding a new file, ImageDecoderHaiku.cpp.
-
- * platform/image-decoders/haiku/ImageDecoderHaiku.cpp: Added.
- (WebCore::RGBA32Buffer::RGBA32Buffer):
- (WebCore::RGBA32Buffer::clear):
- (WebCore::RGBA32Buffer::zeroFill):
- (WebCore::RGBA32Buffer::copyBitmapData):
- (WebCore::RGBA32Buffer::setSize):
- (WebCore::RGBA32Buffer::asNewNativeImage):
- (WebCore::RGBA32Buffer::hasAlpha):
- (WebCore::RGBA32Buffer::setHasAlpha):
- (WebCore::RGBA32Buffer::setStatus):
- (WebCore::RGBA32Buffer::operator=):
- (WebCore::RGBA32Buffer::width):
- (WebCore::RGBA32Buffer::height):
-
-2009-07-16 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- Added Haiku-specific files for WebCore/page/.
- https://bugs.webkit.org/show_bug.cgi?id=26949
-
- Adding three new files, DragControllerHaiku.cpp, EventHandlerHaiku.cpp
- and FrameHaiku.cpp
-
- * page/haiku/DragControllerHaiku.cpp: Added.
- (WebCore::DragController::isCopyKeyDown):
- (WebCore::DragController::dragOperation):
- (WebCore::DragController::maxDragImageSize):
- (WebCore::DragController::cleanupAfterSystemDrag):
- * page/haiku/EventHandlerHaiku.cpp: Added.
- (WebCore::isKeyboardOptionTab):
- (WebCore::EventHandler::invertSenseOfTabsToLinks):
- (WebCore::EventHandler::tabsToAllControls):
- (WebCore::EventHandler::focusDocumentView):
- (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
- (WebCore::EventHandler::passMouseDownEventToWidget):
- (WebCore::EventHandler::eventActivatedView):
- (WebCore::EventHandler::passSubframeEventToSubframe):
- (WebCore::EventHandler::passWheelEventToWidget):
- (WebCore::EventHandler::createDraggingClipboard):
- (WebCore::EventHandler::passMousePressEventToSubframe):
- (WebCore::EventHandler::passMouseMoveEventToSubframe):
- (WebCore::EventHandler::passMouseReleaseEventToSubframe):
- (WebCore::EventHandler::accessKeyModifiers):
- * page/haiku/FrameHaiku.cpp: Added.
- (WebCore::Frame::dragImageForSelection):
-
-2009-07-16 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- Added Haiku-specific files for WebCore/editing/.
- https://bugs.webkit.org/show_bug.cgi?id=26949
-
- Adding one new file, EditorHaiku.cpp
-
- * editing/haiku/EditorHaiku.cpp: Added.
- (WebCore::Editor::newGeneralClipboard):
-
-2009-07-16 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- Added Haiku-specific files for WebCore/bindings/js/.
- https://bugs.webkit.org/show_bug.cgi?id=26949
-
- Adding a new file, ScriptControllerHaiku.cpp
-
- * bindings/js/ScriptControllerHaiku.cpp: Added.
- (WebCore::ScriptController::createScriptInstanceForWidget):
-
-2009-07-16 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- Added Haiku-specific files for WebCore/platform/text/.
- https://bugs.webkit.org/show_bug.cgi?id=26949
-
- Adding two new files, StringHaiku.cpp
- and TextBreakIteratorInternalICUHaiku.cpp
-
- * platform/text/haiku/StringHaiku.cpp: Added.
- (WebCore::String::String):
- (WebCore::String::operator BString):
- * platform/text/haiku/TextBreakIteratorInternalICUHaiku.cpp: Added.
- (WebCore::currentTextBreakLocaleID):
-
-2009-07-16 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Sends the basename of a selected file for non-multipart form submission.
- <https://bugs.webkit.org/show_bug.cgi?id=26505>
-
- Test: fast/forms/get-file-upload.html
-
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::appendFormData):
-
-2009-07-16 Adam Barth <abarth@webkit.org>
-
- Reviewed by David Levin.
-
- [V8] Centralize hidden property names
- https://bugs.webkit.org/show_bug.cgi?id=27359
-
- No behavior change. Just moving these names to a central location.
- I'll move the rest of our hidden property names as I sweep though the
- bindings.
-
- * WebCore.gypi:
- * bindings/v8/V8HiddenPropertyName.cpp: Added.
- (WebCore::V8HiddenPropertyName::objectPrototype):
- (WebCore::V8HiddenPropertyName::isolatedWorld):
- * bindings/v8/V8HiddenPropertyName.h: Added.
- * bindings/v8/V8IsolatedWorld.cpp:
- (WebCore::V8IsolatedWorld::V8IsolatedWorld):
- (WebCore::V8IsolatedWorld::getEntered):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::getHiddenObjectPrototype):
- (WebCore::V8Proxy::installHiddenObjectPrototype):
-
-2009-07-16 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Simon Fraser.
-
- REGRESSION (r41238) Repainted portion of a scaled image does not line up with full image
- https://bugs.webkit.org/show_bug.cgi?id=26747
- rdar://problem/7009243
-
- Test: fast/repaint/background-misaligned.html
-
- * platform/graphics/Image.cpp:
- (WebCore::Image::drawTiled): Moved a variable definition closer to where
- it is used.
- * platform/graphics/cg/ImageCG.cpp:
- (WebCore::BitmapImage::draw): In the subimage code path, compute a
- pixel-aligned source rect, because the subiamge is always pixel-aligned
- in source space, and adjust the destination rect to preserve the
- source -> destination mapping. Clip to the (original) destination rect
- to prevent bleeding out.
-
-2009-07-16 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Adam Barth.
-
- Add a sessionStorageEnabled setting to the settings class.
- https://bugs.webkit.org/show_bug.cgi?id=27318
-
- Allow LocalStorage to be enabled without enabling SessionStorage at
- runtime. There is a settings class setting for localStorage, but not
- for sessionStorage. We want to be able to test one of these features
- without necessarily enabling the other.
-
- SessionStorage defaults to true so as to not change behavior and
- because there really aren't any security concerns around SessionStorage
- (unlike LocalsStorage). The flag is needed in Chromium only because
- we want to enable the compile time flag in the default build, but don't
- want it on by default until it's been thoroughly tested.
-
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::sessionStorage): Check the new flag
- (WebCore::DOMWindow::localStorage): A bit of cleanup
- * page/Settings.cpp:
- (WebCore::Settings::Settings): Default the flag to true
- (WebCore::Settings::setSessionStorageEnabled): Add the new flag
- * page/Settings.h:
- (WebCore::Settings::sessionStorageEnabled): Get the new flag
-
-2009-07-16 Adam Barth <abarth@webkit.org>
-
- Unreviewed.
-
- Revert 45987. Tests did not pass on Windows.
-
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::appendFormData):
-
-2009-07-16 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- Added SHARED_WORKER flag to Windows build files, as well as associated .ccp/.h files.
- Added missing V8 bindings to the AllInOne file
-
- https://bugs.webkit.org/show_bug.cgi?id=27321
-
- * WebCore.vcproj/WebCore.vcproj:
- Added missing files to build.
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- Added missing V8 bindings (V8AbstractWorker.cpp and V8SharedWorker.cpp)
- * DerivedSources.cpp
- Added missing JS bindings (JSAbstractWorker.cpp and JSSharedWorker.cpp)
-
-2009-07-16 John Abd-El-Malek <jam@chromium.org>
-
- Reviewed by David Levin.
-
- Add a getter in MessagePortChannel for the PlatformMessagePortChannel.
-
- https://bugs.webkit.org/show_bug.cgi?id=27337
-
- * dom/MessagePortChannel.h:
- (WebCore::MessagePortChannel::channel):
-
-2009-07-16 Xiaomei Ji <xji@chromium.org>
-
- Reviewed by Darin Adler.
-
- Fix tooltip does not get its directionality from its element's directionality.
- https://bugs.webkit.org/show_bug.cgi?id=24187
-
- Per mitz's suggestion in comment #6, while getting the plain-text
- title, we also get the directionality of the title. How to handle
- the directionality is up to clients. Clients could ignore it,
- or use attribute or unicode control characters to display the title
- as what they want.
-
- WARNING: NO TEST CASES ADDED OR CHANGED
-
- * WebCore.base.exp: Replace 2 names due to signature change.
- * loader/EmptyClients.h:
- (WebCore::EmptyChromeClient::setToolTip): Add direction as 2nd parameter.
- * page/Chrome.cpp:
- (WebCore::Chrome::setToolTip): Calculate tooltip direction as well and pass it to client to take care when display tooltip.
- * page/ChromeClient.h: Add direction as 2nd parameter to pure virtual function setToolTip().
- * page/chromium/ChromeClientChromium.h:
- (WebCore::ChromeClientChromium::setToolTip): Add setToolTip()
- temprarily to make chromium compile after pick up this webkit patch.
- * rendering/HitTestResult.cpp:
- (WebCore::HitTestResult::spellingToolTip): Besides getting the
- spelling tooltip, get its directionality as well.
- (WebCore::HitTestResult::title): Besides getting the title,
- get its directionality as well.
- * rendering/HitTestResult.h: Add 2 more methods.
-
-2009-07-16 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Oliver Hunt.
-
- [CAIRO] pattern of a canvas-element changes after modifications on canvas-element
- https://bugs.webkit.org/show_bug.cgi?id=20578
-
- Copy pixel image in ImageBuffer::image() just like CG and Skia glue.
-
- Test: fast/canvas/canvas-pattern-modify.html
-
- * platform/graphics/cairo/ImageBufferCairo.cpp:
- (copySurface):
- (WebCore::ImageBuffer::image):
-
-2009-07-16 David Hyatt <hyatt@apple.com>
-
- Reviewed by Beth Dakin.
-
- https://bugs.webkit.org/show_bug.cgi?id=27353
- Images mispositioned because of bug in percentage-based relative positioning.
-
- Added fast/css/nested-floating-relative-position-percentages.html
-
- * rendering/RenderBoxModelObject.cpp:
- (WebCore::RenderBoxModelObject::relativePositionOffsetX):
-
-2009-07-16 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Sends the basename of a selected file for non-multipart form submission.
- <https://bugs.webkit.org/show_bug.cgi?id=26505>
-
- Test: fast/forms/get-file-upload.html
-
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::appendFormData):
-
-2009-07-16 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Darin Adler.
-
- Video size sometimes jumps just after the video starts loading
- https://bugs.webkit.org/show_bug.cgi?id=27352
-
- Ensure that the media player is at or after the 'HaveMetadata' state so that
- the instrinsic size is known before we create the layer for video. This avoids
- a flash caused by computing the video rect using the default intrinsic size, and then
- re-computing it when that size changes.
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::isReadyForRendering):
- (WebCore::MediaPlayerPrivate::updateStates):
- (WebCore::MediaPlayerPrivate::supportsAcceleratedRendering):
-
-2009-07-16 Brady Eidson <beidson@apple.com>
-
- Reviewed by Antti Koivisto.
- Patch by Brady Eidson and Alexey Proskuryakov.
-
- https://bugs.webkit.org/show_bug.cgi?id=26496
- <rdar://problem/7065391> Microsoft Outlook Web Access fails because XHR stream connection blocks script loading/revalidation
-
- After refreshing a page and when all CachedResources on that page are in validation mode, they got an exemption
- from the connection-per-host limit. Removing that exemption makes the test case load smoothly after reloads.
-
- * loader/loader.cpp:
- (WebCore::Loader::Host::servePendingRequests): Remove the resourceIsCacheValidator exemption to the connection-per-host limit.
-
-2009-07-16 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] V8IsolatedWorld::evaluate needs to call didCreateIsolatedScriptContext
- https://bugs.webkit.org/show_bug.cgi?id=27335
-
- evaluateInNewContext makes this delegate call. evaluateInNewWorld
- needs to make the same call. This does not appear to be testable with
- our current technology.
-
- * bindings/v8/V8IsolatedWorld.cpp:
- (WebCore::V8IsolatedWorld::evaluate):
-
-2009-07-15 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Simon Hausmann.
-
- Fix a typo: application/atom=xml -> application/atom+xml.
-
- * dom/ProcessingInstruction.cpp:
- (WebCore::ProcessingInstruction::checkStyleSheet):
-
-2009-07-16 Dean McNamee <deanm@chromium.org>
-
- Reviewed by Oliver Hunt.
-
- https://bugs.webkit.org/show_bug.cgi?id=27292
- Improve handling of <canvas> path operations on an empty path.
- Implement Skia's Path::hasCurrentPoint().
-
- * html/CanvasRenderingContext2D.cpp:
- (WebCore::CanvasRenderingContext2D::lineTo):
- (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
- (WebCore::CanvasRenderingContext2D::bezierCurveTo):
- * platform/graphics/skia/PathSkia.cpp:
- (WebCore::Path::hasCurrentPoint):
-
-2009-07-15 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Setting white-space and word-wrap via CSS in textarea doesn't override the wrap attribute
- https://bugs.webkit.org/show_bug.cgi?id=26254
-
- Make it so that setting white-space and word-wrap via CSS
- overrides the wrap attribute.
-
- This involves having the shadow div in the textarea inherit
- the CSS from its parent instead of hard-coding it in
- RenderTextControlMultiline.
-
- Committer note: Earlier I reverted this change because I did it incorrectly
- by leaving out css/html.css. In the patch, the filename was the old name
- css/html4.css and that led to my error.
-
- * css/html.css:
- * html/HTMLTextAreaElement.cpp:
- (WebCore::HTMLTextAreaElement::parseMappedAttribute):
- * rendering/RenderTextControlMultiLine.cpp:
- (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
-
-2009-07-15 James Hawkins <jhawkins@google.com>
-
- Reviewed by Adam Barth.
-
- [V8] Remove a local variable that is shadowing a function parameter.
- https://bugs.webkit.org/show_bug.cgi?id=27309
-
- No test required as this modification does not change the current behavior.
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::instantiateV8Object):
-
-2009-07-15 Adam Langley <agl@google.com>
-
- No review: reverting previous change.
-
- Revert r45959:
-
- 2009-07-15 Dumitru Daniliuc <dumi@chromium.org>
- Reviewed by Dimitri Glazkov.
-
- Adding the Win SQLite VFS implementation for Chromium.
-
- https://bugs.webkit.org/show_bug.cgi?id=26940
-
-
- The Chromium side of this patch was landed in 20839, but broke the build. It
- was reverted in r20840. Thus, I'm reverting this side of the patch too.
-
- * WebCore.gypi:
- * platform/chromium/ChromiumBridge.h:
- * platform/sql/chromium/SQLiteFileSystemChromium.cpp: Removed.
- * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: Removed.
-
-2009-07-15 David Levin <levin@chromium.org>
-
- Layout test fix, reverting previous change.
-
- Reverting r45962 as it caused several layout test failures.
-
- * html/HTMLTextAreaElement.cpp:
- (WebCore::HTMLTextAreaElement::parseMappedAttribute):
- * rendering/RenderTextControlMultiLine.cpp:
- (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
-
-2009-06-08 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Setting white-space and word-wrap via CSS in textarea doesn't override the wrap attribute
- https://bugs.webkit.org/show_bug.cgi?id=26254
-
- Make it so that setting white-space and word-wrap via CSS
- overrides the wrap attribute.
-
- This involves having the shadow div in the textarea inherit
- the CSS from its parent instead of hard-coding it in
- RenderTextControlMultiline.
-
- * css/html4.css:
- * html/HTMLTextAreaElement.cpp:
- (WebCore::HTMLTextAreaElement::parseMappedAttribute):
- * rendering/RenderTextControlMultiLine.cpp:
- (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
-
-2009-07-15 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Adding the Win SQLite VFS implementation for Chromium.
-
- https://bugs.webkit.org/show_bug.cgi?id=26940
-
- * platform/chromium/ChromiumBridge.h:
- * platform/sql/chromium: Added.
- * platform/sql/chromium/SQLiteFileSystemChromium.cpp: Added.
- * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: Added.
-
-2009-07-15 Jian Li <jianli@chromium.org>
-
- Reviewed by David Levin.
-
- Bug 25151 - workers that fail to load scripts not firing error event.
- https://bugs.webkit.org/show_bug.cgi?id=25151
-
- This fixes the problem that an error event is not fired when the worker
- script fails to load. Some reasons this may occur are an invalid URL for
- the worker script or a cross-origin redirect.
-
- We also moves the code to complete the URL and check its origin from
- Worker constructor to WorkerScriptLoader loading functions in order to
- move the exception throwing logic out of the scope of Worker constructor.
- Due to this change, we also remove the output ExceptionCode parameter
- in the worker constructor. Corresponding JS/V8 binding codes have been
- updated to reflect this change.
-
- * bindings/js/JSWorkerConstructor.cpp:
- (WebCore::constructWorker):
- * bindings/v8/custom/V8WorkerCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * workers/Worker.cpp:
- (WebCore::Worker::Worker):
- (WebCore::Worker::notifyFinished):
- * workers/Worker.h:
- (WebCore::Worker::create):
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::importScripts):
- * workers/WorkerScriptLoader.cpp:
- (WebCore::toCrossOriginRedirectPolicy):
- (WebCore::WorkerScriptLoader::loadSynchronously):
- (WebCore::WorkerScriptLoader::loadAsynchronously):
- (WebCore::notifyLoadErrorTask):
- (WebCore::WorkerScriptLoader::createResourceRequest):
- (WebCore::WorkerScriptLoader::didFail):
- (WebCore::WorkerScriptLoader::didFailRedirectCheck):
- (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation):
- (WebCore::WorkerScriptLoader::notifyError):
- * workers/WorkerScriptLoader.h:
- (WebCore::):
- (WebCore::WorkerScriptLoader::url):
-
-2009-07-15 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Dave Hyatt.
-
- text-shadow is not drawn for text with transparent colour
- https://bugs.webkit.org/show_bug.cgi?id=21374
-
- Test: fast/text/shadow-translucent-fill.html
-
- * rendering/InlineTextBox.cpp:
- (WebCore::paintTextWithShadows): If the text fill color is not opaque,
- paint all shadows separately from the text, by casting them from
- clipped-out opaque text.
-
-2009-07-15 Adam Treat <adam.treat@torchmobile.com>
-
- Fix the Qt build.
-
- * html/HTMLAreaElement.cpp:
-
-2009-07-15 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Cleanup DOM Storage dependencies.
- https://bugs.webkit.org/show_bug.cgi?id=27180
-
- DOM Storage had several unnecessary (and probably unintended)
- dependencies. This patch replaces many includes of header files with
- forward declaration of classes, making some destructors explicit, and
- taking some factories out of the header files.
-
- This will allow things like StorageAreaSync to take a StorageAreaImpl*
- (as it should) rather than a StorageArea* which previously weren't
- possible because the dependencies were such a tangled mess.
-
- * storage/LocalStorageTask.cpp:
- (WebCore::LocalStorageTask::~LocalStorageTask):
- * storage/LocalStorageTask.h:
- * storage/Storage.cpp:
- (WebCore::Storage::~Storage):
- * storage/Storage.h:
- * storage/StorageArea.cpp:
- * storage/StorageArea.h:
- * storage/StorageAreaImpl.cpp:
- * storage/StorageAreaImpl.h:
- * storage/StorageAreaSync.cpp:
- (WebCore::StorageAreaSync::~StorageAreaSync):
- * storage/StorageAreaSync.h:
- * storage/StorageEvent.cpp:
- (WebCore::StorageEvent::create):
- (WebCore::StorageEvent::StorageEvent):
- * storage/StorageEvent.h:
- * storage/StorageNamespace.h:
- * storage/StorageNamespaceImpl.cpp:
- * storage/StorageNamespaceImpl.h:
- * storage/StorageSyncManager.cpp:
- (WebCore::StorageSyncManager::~StorageSyncManager):
- * storage/StorageSyncManager.h:
-
-2009-07-15 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser.
-
- Incorrect animation when trying to duplicate effect of transform-origin
- https://bugs.webkit.org/show_bug.cgi?id=27310
-
- The bug is that matrix animation is being used when animating
- a list of transform functions that match in the from and to states.
- This sometimes works. But because of the way CA does matrix animation
- function lists like the one shown in the testcase animate incorrectly.
-
- This fixes the bug by always doing component animation
- as long as the function lists match. This allows CA
- to animate the components and then recompose the result
- into the correct matrix.
-
- Test: animations/transform-origin-vs-functions.html
-
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayerCA::animateTransform):
-
-2009-07-15 Albert J. Wong <ajwong@chromium.org>
-
- Reviewed by David Levin.
-
- Upstream the V8NPObject and NPV8Object build changes for WebCore.gypi.
-
- Add upstreamed V8 bindings files into WebCore.gypi so they can be seen
- downstream
- https://bugs.webkit.org/show_bug.cgi?id=27274
-
- Changes the build file for chromium. Test built the chromium tree
- to verify.
-
- * WebCore.gypi:
-
-2009-07-15 Mark Rowe <mrowe@apple.com>
-
- I like it when the code compiles.
-
- * WebCore.base.exp:
-
-2009-07-15 Darin Adler <darin@apple.com>
-
- Reviewed by Sam Weinig.
-
- Renamed parseURL to deprecatedParseURL.
-
- * bindings/js/JSAttrCustom.cpp:
- (WebCore::JSAttr::setValue): Renamed.
- * bindings/js/JSElementCustom.cpp:
- (WebCore::allowSettingSrcToJavascriptURL): Renamed.
- * bindings/js/JSHTMLFrameElementCustom.cpp:
- (WebCore::allowSettingJavascriptURL): Renamed.
- * bindings/js/JSHTMLIFrameElementCustom.cpp:
- (WebCore::JSHTMLIFrameElement::setSrc): Renamed.
- * bindings/objc/DOM.mm:
- (-[DOMElement _getURLAttribute:]): Renamed.
- * bindings/objc/DOMHTML.mm:
- (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]): Renamed.
- * bindings/v8/custom/V8CustomBinding.cpp:
- (WebCore::allowSettingFrameSrcToJavascriptUrl): Renamed.
- * css/CSSHelper.cpp:
- (WebCore::deprecatedParseURL): Renamed.
- * css/CSSHelper.h: Renamed and updated comment.
- * html/HTMLAnchorElement.cpp:
- (WebCore::HTMLAnchorElement::defaultEventHandler): Renamed.
- (WebCore::HTMLAnchorElement::parseMappedAttribute): Renamed.
- * html/HTMLBaseElement.cpp:
- (WebCore::HTMLBaseElement::parseMappedAttribute): Renamed.
- * html/HTMLBodyElement.cpp:
- (WebCore::HTMLBodyElement::parseMappedAttribute): Renamed.
- * html/HTMLEmbedElement.cpp:
- (WebCore::HTMLEmbedElement::parseMappedAttribute): Renamed.
- * html/HTMLFormElement.cpp:
- (WebCore::HTMLFormElement::parseMappedAttribute): Renamed.
- * html/HTMLFrameElementBase.cpp:
- (WebCore::HTMLFrameElementBase::parseMappedAttribute): Renamed.
- * html/HTMLImageElement.cpp:
- (WebCore::HTMLImageElement::parseMappedAttribute): Renamed.
- * html/HTMLImageLoader.cpp:
- (WebCore::HTMLImageLoader::sourceURI): Renamed.
- * html/HTMLLinkElement.cpp:
- (WebCore::HTMLLinkElement::parseMappedAttribute): Renamed.
- * html/HTMLObjectElement.cpp:
- (WebCore::HTMLObjectElement::parseMappedAttribute): Renamed.
- * html/HTMLTableElement.cpp:
- (WebCore::HTMLTableElement::parseMappedAttribute): Renamed.
- * html/HTMLTablePartElement.cpp:
- (WebCore::HTMLTablePartElement::parseMappedAttribute): Renamed.
- * html/HTMLTokenizer.cpp:
- (WebCore::HTMLTokenizer::parseTag): Renamed.
- * html/PreloadScanner.cpp:
- (WebCore::PreloadScanner::processAttribute): Renamed.
- (WebCore::PreloadScanner::emitCSSRule): Renamed.
- * platform/chromium/ClipboardChromium.cpp:
- (WebCore::ClipboardChromium::declareAndWriteDragImage): Renamed.
- * platform/chromium/PasteboardChromium.cpp:
- (WebCore::Pasteboard::writeImage): Renamed.
- * platform/qt/ClipboardQt.cpp:
- (WebCore::ClipboardQt::declareAndWriteDragImage): Renamed.
- * platform/win/ClipboardWin.cpp:
- (WebCore::ClipboardWin::declareAndWriteDragImage): Renamed.
- * rendering/HitTestResult.cpp:
- (WebCore::HitTestResult::absoluteImageURL): Renamed.
- (WebCore::HitTestResult::absoluteMediaURL): Renamed.
- (WebCore::HitTestResult::absoluteLinkURL): Renamed.
- * svg/SVGAElement.cpp:
- (WebCore::SVGAElement::defaultEventHandler): Renamed.
- * svg/SVGImageLoader.cpp:
- (WebCore::SVGImageLoader::sourceURI): Renamed.
- * wml/WMLAElement.cpp:
- (WebCore::WMLAElement::defaultEventHandler): Renamed.
- * wml/WMLImageLoader.cpp:
- (WebCore::WMLImageLoader::sourceURI): Renamed.
-
-2009-07-15 Darin Adler <darin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- CSSHelper.h's parseURL is a function that no one should ever call
- Part 1: Eliminate callers in the CSS parser.
- https://bugs.webkit.org/show_bug.cgi?id=26599
-
- Test: fast/css/uri-token-parsing.html
-
- * css/CSSHelper.h: Added a comment explaining why nobody should ever call this
- function. A FIXME suggests a next step, which would be to rename it deprecatedParseURL.
-
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue): Removed unneeded call to parseURL;
- CSSParser::text already takes care of parsing the URI token syntax, and the
- parseURL function does no good.
- (WebCore::CSSParser::parseContent): Ditto.
- (WebCore::CSSParser::parseFillImage): Ditto.
- (WebCore::CSSParser::parseFontFaceSrc): Ditto.
- (WebCore::CSSParser::parseBorderImage): Ditto.
- (WebCore::isCSSWhitespace): Added. Helper function that makes the text function
- easier to read.
- (WebCore::CSSParser::text): Tweak logic so that leading and trailing whitespace
- are both trimmed before removing the quote marks. Changed to use the
- isCSSWhitespace, isASCIIHexDigit, and toASCIIHexValue functions for clarity.
-
- * css/CSSParser.h: Removed stray "public:" in this header.
-
- * platform/text/StringImpl.cpp:
- (WebCore::StringImpl::substring): Optimized the case where the substring covers
- the entire string, so we just share the StringImpl instead of making a new one.
- This case came up in earlier versions of the CSS parser changes above.
- (WebCore::StringImpl::substringCopy): Streamlined the logic here and made it
- not call substring any more. Before, this was relying on the substring function
- always making a copy of any non-empty substring.
-
-2009-07-15 Darin Adler <darin@apple.com>
-
- Reviewed by John Sullivan.
-
- After double-clicking a word, using Shift-arrow to select behaves unpredictably
- https://bugs.webkit.org/show_bug.cgi?id=27177
- rdar://problem/7034324
-
- Test: editing/selection/extend-selection-after-double-click.html
-
- The bug was due to the m_lastChangeWasHorizontalExtension flag, which was not
- being cleared in many cases where it should have been.
-
- * editing/SelectionController.cpp:
- (WebCore::SelectionController::setSelection): Set m_lastChangeWasHorizontalExtension
- to false. This catches all sorts of cases that don't flow through the modify function.
- Before, the flag would reflect the last call to the modify function, which was not
- necessarily the last selection change.
- (WebCore::SelectionController::willBeModified): Rearrange function for clarity.
- Remove code that sets m_lastChangeWasHorizontalExtension; that is now handled elsewhere.
- (WebCore::SelectionController::modify): Call setLastChangeWasHorizontalExtension after
- setSelection when setting up a trial selection controller, since setSelection now
- clears that flag. Also changed both trial selection controller cases to set the flag,
- although it's not strictly necessary in both cases. Added code to set
- m_lastChangeWasHorizontalExtension when extending the selection, which used to be
- handled in willBeModified. Now we need to do it after the selection change.
-
-2009-07-15 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Need to update DOM Storage files in GYPI file.
- https://bugs.webkit.org/show_bug.cgi?id=27317
-
- Need to update DOM Storage files in the GYPI file. They're pretty out
- of date and we're on the path towards enabling them for everyone!
-
- * WebCore.gypi:
-
-2009-07-15 Kwang Yul Seo <skyul@company100.net>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26794
- Make Yacc-generated parsers to use fastMalloc/fastFree.
-
- Define YYMALLOC and YYFREE to fastMalloc and fastFree
- respectively.
-
- * css/CSSGrammar.y:
- * xml/XPathGrammar.y:
-
-2009-07-15 David Hyatt <hyatt@apple.com>
-
- Reviewed by Adam Roben.
-
- https://bugs.webkit.org/show_bug.cgi?id=27193
- Don't run in to anonymous blocks. No other browsers do this, and our implementation of run-in
- is effectively broken as a result.
-
- No new tests. Changed fast/runin/001.html and fast/runin/generated.html to match new behavior.
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::handleRunInChild):
-
-2009-07-15 Yuzo Fujishima <yuzo@google.com>
-
- Reviewed by Darin Adler.
-
- Test: fast/js/instanceof-operator.html
-
- Fix for: Bug 25205 - XMLHttpRequest instance is not an instanceof XMLHttpRequest
- https://bugs.webkit.org/show_bug.cgi?id=25205
-
- In addition to for XMLHttpRequest, this also fixes for:
- - Audio
- - Image
- - MessageChannel
- - Option
- - WebKitCSSMatrix
- - WebKitPoint
- - Worker
- - XSLTProcessor
-
- * bindings/js/JSAudioConstructor.cpp:
- (WebCore::JSAudioConstructor::JSAudioConstructor):
- * bindings/js/JSAudioConstructor.h:
- * bindings/js/JSDOMBinding.h:
- (WebCore::DOMConstructorObject::createStructure):
- (WebCore::DOMConstructorObject::DOMConstructorObject):
- * bindings/js/JSImageConstructor.cpp:
- (WebCore::JSImageConstructor::JSImageConstructor):
- * bindings/js/JSImageConstructor.h:
- * bindings/js/JSMessageChannelConstructor.cpp:
- (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
- * bindings/js/JSMessageChannelConstructor.h:
- * bindings/js/JSOptionConstructor.cpp:
- (WebCore::JSOptionConstructor::JSOptionConstructor):
- * bindings/js/JSOptionConstructor.h:
- * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
- (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor):
- * bindings/js/JSWebKitCSSMatrixConstructor.h:
- * bindings/js/JSWebKitPointConstructor.cpp:
- (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor):
- * bindings/js/JSWebKitPointConstructor.h:
- * bindings/js/JSWorkerConstructor.cpp:
- (WebCore::JSWorkerConstructor::JSWorkerConstructor):
- * bindings/js/JSWorkerConstructor.h:
- * bindings/js/JSXMLHttpRequestConstructor.cpp:
- (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
- * bindings/js/JSXMLHttpRequestConstructor.h:
- * bindings/js/JSXSLTProcessorConstructor.cpp:
- (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
- * bindings/js/JSXSLTProcessorConstructor.h:
-
-2009-07-15 Kai Br�ning <kai@granus.net>
-
- Reviewed by Dave Hyatt.
-
- CSS21 attribute selectors not dynamic for xml.
- https://bugs.webkit.org/show_bug.cgi?id=25072
-
- Moved the relevant test in StyledElement::attributeChanged()
- to a new function Element::recalcStyleIfNeededAfterAttributeChanged()
- so it can be called from both StyledElement::attributeChanged()
- and Element::attributeChanged().
- Refactored Element::attributeChanged() into
- Element::updateAfterAttributeChanged() and
- Element::recalcStyleIfNeededAfterAttributeChanged(), which are called
- separately from StyledElement::attributeChanged().
-
- Test: fast/css/attribute-selector-dynamic.xml
-
- * dom/Element.cpp:
- (WebCore::Element::attributeChanged):
- (WebCore::Element::updateAfterAttributeChanged):
- (WebCore::Element::recalcStyleIfNeededAfterAttributeChanged):
- * dom/Element.h:
- * dom/StyledElement.cpp:
- (WebCore::StyledElement::attributeChanged):
-
-2009-07-15 Alpha Lam <hclam@chromium.org>
-
- Reviewed by David Levin.
-
- [V8] Layout test failures for drawImage in Canvas
- https://bugs.webkit.org/show_bug.cgi?id=27311
-
- Fixing several canvas layout tests failures due to a
- missing return statement in CanvasRenderingContext2DDrawImage() which
- was accidentally removed in r45929.
-
- * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
-
-2009-07-15 Robert Hogan <robert@roberthogan.net>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26969
-
- If the httpMethod() of the request passed to SubresourceLoader::create is not
- supported by the client we must expect to call didFail() while m_loader is still null.
-
- * loader/DocumentThreadableLoader.cpp:
- (DocumentThreadableLoader::didFail):Changed.
-
-2009-07-15 Mark Rowe <mrowe@apple.com>
-
- Fix the Mac build.
-
- * WebCore.base.exp:
- * css/MediaQueryEvaluator.cpp:
- * rendering/SVGRenderTreeAsText.cpp:
- * rendering/style/SVGRenderStyle.cpp:
- * svg/graphics/SVGPaintServer.cpp:
-
-2009-07-07 Alpha Lam <hclam@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] drawImage method of HTMLCanvasElement to accept HTMLVideoElement as argument
- https://bugs.webkit.org/show_bug.cgi?id=27170
-
- Changed CanvasRenderingContext2DDrawImage() to accept HTMLVideoElement
- as a parameter of drawImage() for HTMLCanvasElement.
-
- * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
-
-2009-07-15 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Fix isolated world constructors
- https://bugs.webkit.org/show_bug.cgi?id=27287
-
- Don't enter V8Proxy::m_context before creating DOM constructors.
- Instead, use getWrapperContext to get the right context.
-
- After this patch, all my tests pass. I'll enable the feature
- downstream and land the tests.
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getConstructor):
- (WebCore::V8DOMWrapper::lookupDOMWrapper):
- * bindings/v8/V8DOMWrapper.h:
- * bindings/v8/V8IsolatedWorld.cpp:
- (WebCore::V8IsolatedWorld::evaluate):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::createWrapperFromCache):
- (WebCore::V8Proxy::isContextInitialized):
- (WebCore::V8Proxy::disposeContextHandles):
- (WebCore::V8Proxy::installDOMWindow):
- (WebCore::V8Proxy::initContextIfNeeded):
- (WebCore::V8Proxy::getHiddenObjectPrototype):
- (WebCore::V8Proxy::installHiddenObjectPrototype):
- * bindings/v8/V8Proxy.h:
-
-2009-07-15 Antonio Gomes <antonio.gomes@openbossa.org>
-
- Reviewed by Darin Adler.
-
- useless null-check statement in visible_units.cpp@logicalStartOfLine
- https://bugs.webkit.org/show_bug.cgi?id=27154
-
- Simple fix.
-
- * editing/visible_units.cpp:
- (WebCore::logicalStartOfLine): Doubled honorEditableBoundaryAtOrAfter() call removed.
-
-2009-07-15 Brady Eidson <beidson@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=27304
- WebKit should provide usage and eligibility information about the page cache.
-
- * WebCore.base.exp:
-
- * history/CachedFrame.cpp:
- (WebCore::CachedFrame::childFrameCount):
- * history/CachedFrame.h:
-
- * history/PageCache.cpp:
- (WebCore::PageCache::frameCount):
- (WebCore::PageCache::autoreleasedPageCount):
- * history/PageCache.h:
- (WebCore::PageCache::pageCount):
-
-2009-07-15 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by David Levin.
-
- Chromium's canvas forgets its context after fillText again
- https://bugs.webkit.org/show_bug.cgi?id=27293
-
- No new tests because the test for this was already added in
- https://bugs.webkit.org/show_bug.cgi?id=26436
-
- * platform/graphics/chromium/TransparencyWin.cpp:
- (WebCore::TransparencyWin::compositeTextComposite):
-
-2009-07-14 David Hyatt <hyatt@apple.com>
-
- Reviewed by Simon Fraser.
-
- https://bugs.webkit.org/show_bug.cgi?id=27283
-
- Implement the new 'rem' unit from CSS3.
-
- Added some rem-* tests in fast/css.
-
- * css/CSSGrammar.y:
- * css/CSSParser.cpp:
- (WebCore::CSSParser::validUnit):
- (WebCore::unitFromString):
- (WebCore::CSSParser::parseValue):
- (WebCore::CSSParser::lex):
- * css/CSSParserValues.cpp:
- (WebCore::CSSParserValue::createCSSValue):
- * css/CSSPrimitiveValue.cpp:
- (WebCore::CSSPrimitiveValue::computeLengthInt):
- (WebCore::CSSPrimitiveValue::computeLengthIntForLength):
- (WebCore::CSSPrimitiveValue::computeLengthShort):
- (WebCore::CSSPrimitiveValue::computeLengthFloat):
- (WebCore::CSSPrimitiveValue::computeLengthDouble):
- (WebCore::CSSPrimitiveValue::cssText):
- (WebCore::CSSPrimitiveValue::parserValue):
- * css/CSSPrimitiveValue.h:
- (WebCore::CSSPrimitiveValue::):
- (WebCore::CSSPrimitiveValue::isUnitTypeLength):
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::initForStyleResolve):
- (WebCore::convertToLength):
- (WebCore::CSSStyleSelector::applyProperty):
- (WebCore::CSSStyleSelector::mapFillSize):
- (WebCore::CSSStyleSelector::mapFillXPosition):
- (WebCore::CSSStyleSelector::mapFillYPosition):
- (WebCore::CSSStyleSelector::createTransformOperations):
- * css/CSSStyleSelector.h:
- * css/MediaQueryEvaluator.cpp:
- (WebCore::device_heightMediaFeatureEval):
- (WebCore::device_widthMediaFeatureEval):
- (WebCore::heightMediaFeatureEval):
- (WebCore::widthMediaFeatureEval):
- * css/WebKitCSSMatrix.cpp:
- (WebCore::WebKitCSSMatrix::setMatrixValue):
- * css/tokenizer.flex:
- * dom/Document.cpp:
- (WebCore::Document::Document):
- * dom/Document.h:
- (WebCore::Document::usesRemUnits):
- (WebCore::Document::setUsesRemUnits):
- * dom/Element.cpp:
- (WebCore::Element::recalcStyle):
- * rendering/SVGRenderTreeAsText.cpp:
- (WebCore::writeStyle):
- * rendering/style/SVGRenderStyle.cpp:
- (WebCore::SVGRenderStyle::cssPrimitiveToLength):
- * svg/graphics/SVGPaintServer.cpp:
- (WebCore::applyStrokeStyleToContext):
- (WebCore::dashArrayFromRenderingStyle):
- * svg/graphics/SVGPaintServer.h:
-
-2009-07-15 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- Remove extraneous qualifier, accidentally added in http://trac.webkit.org/changeset/45884.
-
- * bindings/v8/V8DOMWrapper.h: Removed extraneous qualifier.
-
-2009-07-15 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Darin Fisher.
-
- [V8] Update bindings for ValiditeState patch.
- https://bugs.webkit.org/show_bug.cgi?id=19562
-
- * bindings/v8/DOMObjectsInclude.h:
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
-
-2009-07-15 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Cleanup - Remove obsolete code from the make system
- https://bugs.webkit.org/show_bug.cgi?id=27299
-
- * WebCore.pro:
-
-2009-07-15 Simon Hausmann <simon.hausmann@nokia.com>
-
- Reviewed by Ariya Hidayat.
-
- Fix the build without media elements.
-
- * rendering/HitTestResult.cpp:
- (WebCore::HitTestResult::absoluteMediaURL): Add #if ENABLE(VIDEO)
- markers around the body of the method.
-
-2009-07-14 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Move storeLastActivePanel out of the
- ifdef ENABLE_JAVASCRIPT_DEBUGGER section in IDL;
- Add default panel for the first opening of the
- WebInspector.
-
- https://bugs.webkit.org/show_bug.cgi?id=27263
-
- * inspector/InspectorController.cpp:
- (InspectorController::setWindowVisible):
- * inspector/InspectorController.idl:
-
-2009-07-14 Darin Adler <darin@apple.com>
-
- Try to fix Windows build.
-
- * bindings/scripts/CodeGeneratorCOM.pm: Add Reflect and ReflectURL support.
-
-2009-07-14 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Oliver Hunt.
-
- HTMLMediaElement::supportsFullscreen() should return false
- https://bugs.webkit.org/show_bug.cgi?id=27284
-
- (Reverting a part of 45875)
-
- HTMLVideoElement::supportsFullscreen() will properly do the
- job, and check if the backend supports fullscreen.
-
- HTMLVideoElement is the only subclass to support fullscreen
- (conditionnaly). HTMLAudioElement fullscreen is not supported
- and is a different kind of fullscreen, if it comes to be wanted.
-
- No test can be done currently given that none of the media
- backends support fullscreen.
-
- * html/HTMLMediaElement.cpp:
- * html/HTMLMediaElement.h:
- (WebCore::HTMLMediaElement::supportsFullscreen):
-
-2009-07-14 Darin Adler <darin@apple.com>
-
- Reviewed by Dimitri Glazkov.
-
- Next step in making DOM attribute getter/setters consistently use AtomicString
- https://bugs.webkit.org/show_bug.cgi?id=25425
-
- This covers eight DOM classes, and for each one of the classes:
-
- - Changes the IDL to use the Reflect syntax for all simple cases.
- - Removes unused functions in the classes, mainly newly unused ones that were
- used for reflection before.
- - Removes unneeded explicitly defined destructors.
- - Explicitly declares destructors as virtual.
- - Removes unneeded includes.
- - Makes members protected or private rather than public where possible.
- - Renames "doc" to "document".
- - Tweaks formatting to match our latest style in a few places.
- - Improves some FIXME comments.
-
- Over time we'll want to do this for all HTML DOM classes.
-
- * html/HTMLAnchorElement.cpp:
- (WebCore::HTMLAnchorElement::HTMLAnchorElement):
- * html/HTMLAnchorElement.h:
- (WebCore::HTMLAnchorElement::endTagRequirement):
- (WebCore::HTMLAnchorElement::tagPriority):
- * html/HTMLAnchorElement.idl:
- * html/HTMLAppletElement.cpp:
- * html/HTMLAppletElement.h:
- * html/HTMLAppletElement.idl:
- * html/HTMLAreaElement.cpp:
- (WebCore::HTMLAreaElement::parseMappedAttribute):
- * html/HTMLAreaElement.h:
- (WebCore::HTMLAreaElement::endTagRequirement):
- (WebCore::HTMLAreaElement::tagPriority):
- * html/HTMLAreaElement.idl:
- * html/HTMLBRElement.cpp:
- (WebCore::HTMLBRElement::parseMappedAttribute):
- * html/HTMLBRElement.h:
- * html/HTMLBRElement.idl:
- * html/HTMLBaseElement.cpp:
- (WebCore::HTMLBaseElement::HTMLBaseElement):
- (WebCore::HTMLBaseElement::removedFromDocument):
- (WebCore::HTMLBaseElement::process):
- * html/HTMLBaseElement.h:
- * html/HTMLBaseElement.idl:
- * html/HTMLBaseFontElement.cpp:
- (WebCore::HTMLBaseFontElement::HTMLBaseFontElement):
- * html/HTMLBaseFontElement.h:
- (WebCore::HTMLBaseFontElement::endTagRequirement):
- (WebCore::HTMLBaseFontElement::tagPriority):
- * html/HTMLBaseFontElement.idl:
- * html/HTMLBlockquoteElement.cpp:
- (WebCore::HTMLBlockquoteElement::HTMLBlockquoteElement):
- * html/HTMLBlockquoteElement.h:
- (WebCore::HTMLBlockquoteElement::tagPriority):
- * html/HTMLBlockquoteElement.idl:
- * html/HTMLBodyElement.cpp:
- (WebCore::HTMLBodyElement::HTMLBodyElement):
- (WebCore::HTMLBodyElement::addSubresourceAttributeURLs):
- * html/HTMLBodyElement.h:
- (WebCore::HTMLBodyElement::endTagRequirement):
- (WebCore::HTMLBodyElement::tagPriority):
- * html/HTMLBodyElement.idl:
- Made changes as described above.
-
- * loader/FrameLoader.cpp: Removed unneeded include of HTMLAnchorElement.h.
-
-2009-07-14 Steve Falkenburg <sfalken@apple.com>
-
- Reorganize JavaScriptCore headers into:
- API: include/JavaScriptCore/
- Private: include/private/JavaScriptCore/
-
- Reviewed by Darin Adler.
-
- * WebCore.vcproj/QTMovieWin.vcproj:
- * WebCore.vcproj/WebCoreCommon.vsprops:
- * WebCore.vcproj/build-generated-files.sh:
-
-2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
-
- Reviewed by Darin Adler.
-
- Change all Noncopyable inheriting visibility to public.
- https://bugs.webkit.org/show_bug.cgi?id=27225
-
- Change all Noncopyable inheriting visibility to public because
- it is needed to the custom allocation framework (bug #20422).
-
- * bindings/js/GCController.h:
- * bindings/js/WorkerScriptController.h:
- * bindings/v8/V8DOMMap.cpp:
- (WebCore::):
- * bridge/runtime.h:
- * css/CSSSelector.h:
- * css/CSSSelectorList.h:
- * css/CSSStyleSelector.h:
- * dom/ClassNames.h:
- * dom/MessagePortChannel.h:
- * dom/XMLTokenizerLibxml2.cpp:
- * dom/XMLTokenizerScope.h:
- * editing/ReplaceSelectionCommand.cpp:
- * editing/SelectionController.h:
- * editing/TextIterator.cpp:
- * history/PageCache.h:
- * html/CanvasRenderingContext2D.h:
- * html/HTMLParser.h:
- * html/HTMLParserQuirks.h:
- * html/PreloadScanner.h:
- * loader/Cache.h:
- * loader/CrossOriginPreflightResultCache.h:
- * loader/FrameLoader.h:
- * loader/ProgressTracker.h:
- * loader/ThreadableLoader.h:
- * loader/appcache/ApplicationCacheGroup.h:
- * loader/archive/ArchiveResourceCollection.h:
- * loader/icon/IconDatabase.h:
- * loader/icon/IconLoader.h:
- * loader/icon/PageURLRecord.h:
- * loader/loader.h:
- * page/ContextMenuController.h:
- * page/EventHandler.h:
- * page/FrameTree.h:
- * page/Page.h:
- * page/PageGroup.h:
- * page/PageGroupLoadDeferrer.h:
- * page/mac/EventHandlerMac.mm:
- * platform/AutodrainedPool.h:
- * platform/ContextMenu.h:
- * platform/EventLoop.h:
- * platform/HostWindow.h:
- * platform/Pasteboard.h:
- * platform/PurgeableBuffer.h:
- * platform/RunLoopTimer.h:
- * platform/ThreadGlobalData.h:
- * platform/ThreadTimers.h:
- * platform/Timer.h:
- * platform/TreeShared.h:
- * platform/graphics/FontData.h:
- * platform/graphics/GlyphWidthMap.h:
- * platform/graphics/GraphicsContext.h:
- * platform/graphics/ImageBuffer.h:
- * platform/graphics/ImageSource.h:
- * platform/graphics/MediaPlayer.h:
- * platform/graphics/skia/GraphicsContextPlatformPrivate.h:
- * platform/graphics/skia/PlatformContextSkia.h:
- * platform/graphics/win/QTMovieWin.cpp:
- * platform/mac/LocalCurrentGraphicsContext.h:
- * platform/network/FormDataBuilder.h:
- * platform/network/ResourceHandleInternal.h:
- * platform/network/soup/ResourceHandleSoup.cpp:
- * platform/text/StringBuffer.h:
- * platform/text/TextCodec.h:
- * platform/win/WindowMessageBroadcaster.h:
- * rendering/CounterNode.h:
- * rendering/LayoutState.h:
- * rendering/RenderFrameSet.h:
- * rendering/RenderView.h:
- * rendering/TransformState.h:
- * svg/SVGAnimatedProperty.h:
- * svg/SynchronizableTypeWrapper.h:
- * workers/WorkerMessagingProxy.h:
- * workers/WorkerRunLoop.cpp:
- * xml/XPathExpressionNode.h:
- * xml/XPathParser.h:
- * xml/XPathPredicate.h:
- * xml/XPathStep.h:
-
-2009-07-14 Darin Fisher <darin@chromium.org>
-
- Reviewed by Darin Adler.
-
- Fails to save document state when navigating away from a page with a
- reference fragment.
- https://bugs.webkit.org/show_bug.cgi?id=27281
-
- Test: fast/history/saves-state-after-fragment-nav.html
-
- * history/HistoryItem.cpp:
- (WebCore::HistoryItem::isCurrentDocument): Use equalIgnoringRef
- to compare URLs.
-
-2009-07-14 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Sam Weinig.
-
- Inspector: Remove Unintended Global Variables
- https://bugs.webkit.org/show_bug.cgi?id=27203
-
- * inspector/front-end/Console.js:
- (WebInspector.Console.prototype._ensureCommandLineAPIInstalled):
- * inspector/front-end/DatabasesPanel.js:
- (WebInspector.DatabasesPanel.prototype.dataGridForDOMStorage):
- * inspector/front-end/ObjectPropertiesSection.js:
- (WebInspector.ObjectPropertyTreeElement.prototype.update):
- * inspector/front-end/inspector.js:
- (WebInspector.animateStyle):
-
-2009-07-14 Michelangelo De Simone <micdesim@gmail.com>
-
- Reviewed by Adele Peterson.
-
- https://bugs.webkit.org/show_bug.cgi?id=19562
- Added build stuff and stub for the ValidityState class, part of HTML5
- section Forms:
- http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#validitystate
-
- Test: fast/forms/ValidityState-001.html
-
- * DerivedSources.cpp: Inclusion of ValidityState files
- * DerivedSources.make: ditto
- * GNUmakefile.am: ditto
- * WebCore.gypi: ditto
- * WebCore.pro: ditto
- * WebCore.vcproj/WebCore.vcproj: ditto
- * WebCore.xcodeproj/project.pbxproj: ditto
- * WebCoreSources.bkl: ditto
- * html/HTMLButtonElement.idl: validity attribute
- * html/HTMLFieldSetElement.idl: ditto
- * html/HTMLFormControlElement.cpp:
- (WebCore::HTMLFormControlElement::validity): ValidityState getter
- * html/HTMLFormControlElement.h: ditto
- * html/HTMLInputElement.idl: validity attribute
- * html/HTMLSelectElement.idl: ditto
- * html/HTMLTextAreaElement.idl: ditto
- * html/ValidityState.cpp: Added.
- (WebCore::ValidityState::ValidityState):
- (WebCore::ValidityState::valid): validation flag
- * html/ValidityState.h: Added.
- (WebCore::ValidityState::create): validation flag
- (WebCore::ValidityState::control): ditto
- (WebCore::ValidityState::valueMissing): ditto
- (WebCore::ValidityState::typeMismatch): ditto
- (WebCore::ValidityState::patternMismatch): ditto
- (WebCore::ValidityState::tooLong): ditto
- (WebCore::ValidityState::rangeUnderflow): ditto
- (WebCore::ValidityState::rangeOverflow): ditto
- (WebCore::ValidityState::stepMismatch): ditto
- (WebCore::ValidityState::customError): ditto
- * html/ValidityState.idl: Added.
-
-2009-07-14 Ryosuke Niwa <rniwa@google.com>
-
- Reviewed by Eric Seidel.
-
- Outdenting a line inside a blockquote tag does nothing
- https://bugs.webkit.org/show_bug.cgi?id=25316
-
- The bug was caused by the code checking whether the blockquote is created by WebKit or not.
- We simply remove this code to be consistent with Firefox and Internet Explorer.
- Also, enclosingBlockFlow == enclosingNode in outdentParagraph isn't a sufficient condition to insert
- the placeholder before the enclosingNode because there could be contents before the current paragraph.
- Instead, we should split the enclosingNode (which is a blockquote) at the starting position of outdentation.
- It turned out that this solves the bug 25315 also: https://bugs.webkit.org/show_bug.cgi?id=25315
-
- Test: editing/execCommand/outdent-regular-blockquote.html
-
- * editing/IndentOutdentCommand.cpp:
- (WebCore::isIndentBlockquote): no longer checks whether a blockquote is created by WebKit or not.
- (WebCore::IndentOutdentCommand::outdentParagraph): takes care of the case enclosingBlockFlow == enclosingNode
-
-2009-07-14 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Fix isolated world wrappers for Node prototypes
- https://bugs.webkit.org/show_bug.cgi?id=27277
-
- This change does two things:
-
- 1) We bypass the wrapper cache in the isolated world. This is because
- the wrapper template cache has prototypes that lead to the main
- world. We can add a template cache for the isolated world if
- performance warrants.
-
- 2) We introduce a smarter way to grab the wrapper context for a frame
- that is aware that proxy <-> context do not stand in one-to-one
- correspondence. This generalizes our solution for the node wrapper
- case to prototypes.
-
- The net result is that Node wrappers get the right prototypes. As
- before, tests to follow.
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::setHiddenWindowReference):
- (WebCore::V8DOMWrapper::instantiateV8Object):
- (WebCore::V8DOMWrapper::convertNodeToV8Object):
- (WebCore::V8DOMWrapper::convertWindowToV8Object):
- (WebCore::V8DOMWrapper::getWrapperContext):
- * bindings/v8/V8DOMWrapper.h:
-
-2009-07-14 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Fix isolated world wrappers for Nodes
- https://bugs.webkit.org/show_bug.cgi?id=27271
-
- Previously, we keepy a pointer to the DOMMap on V8Proxy, but this
- caused us to miss the branch in V8DOMMap.cpp for isolated worlds.
-
- I have tests, but I can't land them until I get this feature under
- control.
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::convertNodeToV8Object):
- * bindings/v8/V8Proxy.h:
- (WebCore::V8Proxy::V8Proxy):
-
-2009-07-14 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Fix isolated world crash on getting window.location
- https://bugs.webkit.org/show_bug.cgi?id=27268
-
- I have a test for this locally, but it requires a compile-time hack to
- run. Once I get the feature's stability under control, we can turn the
- feature on and add the tests.
-
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::setHiddenWindowReference):
- * bindings/v8/V8IsolatedWorld.h:
- (WebCore::V8IsolatedWorld::context):
-
-2009-07-14 Brent Fulgham <bfulgham@webkit.org>
-
- Correct failing tests after r45875. The original patch did not
- test the m_player member for null, causing crashes. This will
- happen fairly frequently in real use. Was this original patch
- ever tested?
- https://bugs.webkit.org/show_bug.cgi?id=27246
-
- Test via existing media tests.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::supportsFullscreen): Check for null pointer.
- (WebCore::HTMLMediaElement::supportsSave): Check for null pointer.
-
-2009-07-14 Avi Drissman <avi@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Explicitly mark the HTML generated for the Mac as being UTF-8 encoded.
- The Windows clipboard format is explicitly documented as being UTF-8,
- and all Linux apps assume UTF-8. On the Mac, though, unless otherwise
- indicated, Windows-1252 is assumed, which is wrong.
-
- Bug: https://bugs.webkit.org/show_bug.cgi?id=27262
-
- No new tests.
-
- * platform/chromium/ClipboardChromium.cpp:
- (WebCore::ClipboardChromium::writeRange):
- * platform/chromium/PasteboardChromium.cpp:
- (WebCore::Pasteboard::writeSelection):
-
-2009-07-14 Albert J. Wong <ajwong@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Upstream V8NPObject.h and V8NPObject.cpp.
- https://bugs.webkit.org/show_bug.cgi?id=27103
-
- This just upstreams the files from the chromium code base. Only
- minor changes to formatting and similar were done, so no testing
- is required because nothing really changed. Code verified to compile.
-
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::bindToWindowObject):
- (WebCore::ScriptController::createScriptInstanceForWidget):
- * bindings/v8/V8NPObject.cpp: Added.
- (npObjectInvokeImpl):
- (npObjectMethodHandler):
- (npObjectInvokeDefaultHandler):
- (weakTemplateCallback):
- (npObjectGetProperty):
- (npObjectNamedPropertyGetter):
- (npObjectIndexedPropertyGetter):
- (npObjectGetNamedProperty):
- (npObjectGetIndexedProperty):
- (npObjectSetProperty):
- (npObjectNamedPropertySetter):
- (npObjectIndexedPropertySetter):
- (npObjectSetNamedProperty):
- (npObjectSetIndexedProperty):
- (weakNPObjectCallback):
- (createV8ObjectForNPObject):
- (forgetV8ObjectForNPObject):
- * bindings/v8/V8NPObject.h: Added.
- * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::NAMED_PROPERTY_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
-
-
-2009-07-14 Albert J. Wong <ajwong@chromium.org>
-
- Reviewed by Darin Adler.
-
- Add HTMLMediaElement::supportSave() and a
- HitTestResult::absoluteMediaURL() functions
- https://bugs.webkit.org/show_bug.cgi?id=27246
-
- Added an implementation of supportsSave() into HTMLMediaElement
- that delegates to MediaPlayerPrivateImpl so that the media engine
- is able to signal whether or not a media source supports saving.
-
- Also added a function to HitTestResult that allows for retrieval
- of the currentSrc associated with the "hit" media element.
-
- These functions are just pipeing with no visible UI change so there
- are no related layout test changes.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::supportsFullscreen):
- (WebCore::HTMLMediaElement::supportsSave):
- * html/HTMLMediaElement.h:
- * platform/graphics/MediaPlayer.cpp:
- (WebCore::MediaPlayer::supportsSave):
- * platform/graphics/MediaPlayer.h:
- * platform/graphics/MediaPlayerPrivate.h:
- (WebCore::MediaPlayerPrivateInterface::supportsFullscreen):
- (WebCore::MediaPlayerPrivateInterface::supportsSave):
- * rendering/HitTestResult.cpp:
- (WebCore::HitTestResult::altDisplayString):
- (WebCore::HitTestResult::absoluteMediaURL):
- * rendering/HitTestResult.h:
-
-2009-07-14 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Adam Barth.
-
- [V8] Implement Reflect and ReflectURL attribute support.
- https://bugs.webkit.org/show_bug.cgi?id=27273
-
- * bindings/scripts/CodeGeneratorV8.pm: Added support for Reflect and ReflectURL attributes.
-
-2009-07-14 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=27266
- Add hasCurrentPoint() to WebCore::Path.
- This fixes Skia-based Chromium regression caused by the fix for
- https://bugs.webkit.org/show_bug.cgi?id=27187.
- For Skia, the new method always returns 'true', pending actual implementation.
- This means Chromium still will differ from Gecko behavior, but at least its Canvas
- will not be completely broken.
-
- Existing Canvas Layout Tests should pass in Chromium after this change.
-
- * html/CanvasRenderingContext2D.cpp:
- (WebCore::CanvasRenderingContext2D::lineTo): insteand of Path::isEmpty() test for hasCurrentPoint().
- (WebCore::CanvasRenderingContext2D::quadraticCurveTo): ditto.
- (WebCore::CanvasRenderingContext2D::bezierCurveTo): ditto.
-
- * platform/graphics/Path.h:
- * platform/graphics/cairo/PathCairo.cpp:
- (WebCore::Path::hasCurrentPoint):
- * platform/graphics/cg/PathCG.cpp:
- (WebCore::Path::isEmpty):
- (WebCore::Path::hasCurrentPoint):
- * platform/graphics/qt/PathQt.cpp:
- (WebCore::Path::hasCurrentPoint):
- * platform/graphics/skia/PathSkia.cpp:
- (WebCore::Path::hasCurrentPoint):
- * platform/graphics/wx/PathWx.cpp:
- (WebCore::Path::hasCurrentPoint):
- All these files add a Path::hasCurrentPoint() for various platforms.
-
-2009-07-14 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Sam Weinig.
-
- Upstream RGBColor from src.chromium.org.
-
- https://bugs.webkit.org/show_bug.cgi?id=27133
-
- * WebCore.gypi: Add RGBColor
- * css/RGBColor.cpp: Added.
- (WebCore::RGBColor::create):
- (WebCore::RGBColor::red):
- (WebCore::RGBColor::green):
- (WebCore::RGBColor::blue):
- * css/RGBColor.h: Added.
- (WebCore::RGBColor::RGBColor):
-
-2009-07-10 Matt Perry <mpcomplete@chromium.org>
-
- Reviewed by Darin Fisher.
-
- [V8] Rename the didCreate/DestroyScriptContext calls to make it
- clear that that those refer to the frame's contxt. Add another
- similar call for when creating contexts via evaluateInNewContext.
- https://bugs.webkit.org/show_bug.cgi?id=27104
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::evaluateInNewContext):
- (WebCore::V8Proxy::disposeContextHandles):
- (WebCore::V8Proxy::initContextIfNeeded):
- * loader/EmptyClients.h:
- (WebCore::EmptyFrameLoaderClient::didCreateScriptContextForFrame):
- (WebCore::EmptyFrameLoaderClient::didDestroyScriptContextForFrame):
- (WebCore::EmptyFrameLoaderClient::didCreateIsolatedScriptContext):
- * loader/FrameLoaderClient.h:
-
-2009-07-14 Brent Fulgham <bfulgham@webkit.org>
-
- Revert http://trac.webkit.org/changeset/45864 after
- breaking of Windows build.
-
- * storage/LocalStorageTask.cpp:
- * storage/LocalStorageTask.h:
- * storage/Storage.cpp:
- * storage/Storage.h:
- * storage/StorageArea.cpp:
- * storage/StorageArea.h:
- * storage/StorageAreaImpl.cpp:
- * storage/StorageAreaImpl.h:
- * storage/StorageAreaSync.cpp:
- * storage/StorageAreaSync.h:
- * storage/StorageEvent.cpp:
- * storage/StorageEvent.h:
- (WebCore::StorageEvent::create):
- (WebCore::StorageEvent::StorageEvent):
- * storage/StorageNamespace.h:
- * storage/StorageNamespaceImpl.cpp:
- * storage/StorageNamespaceImpl.h:
- * storage/StorageSyncManager.cpp:
- * storage/StorageSyncManager.h:
-
-2009-07-11 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Adler.
-
- Cleanup DOM Storage dependencies.
- https://bugs.webkit.org/show_bug.cgi?id=27180
-
- DOM Storage had several unnecessary (and probably unintended)
- dependencies. This patch replaces many includes of header files with
- forward declaration of classes, making some destructors explicit, and
- taking some factories out of the header files.
-
- This will allow things like StorageAreaSync to take a StorageAreaImpl*
- (as it should) rather than a StorageArea* which previously weren't
- possible because the dependencies were such a tangled mess.
-
- * storage/LocalStorageTask.cpp:
- (WebCore::LocalStorageTask::~LocalStorageTask):
- * storage/LocalStorageTask.h:
- * storage/Storage.cpp:
- (WebCore::Storage::~Storage):
- * storage/Storage.h:
- * storage/StorageArea.cpp:
- * storage/StorageArea.h:
- * storage/StorageAreaImpl.cpp:
- * storage/StorageAreaImpl.h:
- * storage/StorageAreaSync.cpp:
- (WebCore::StorageAreaSync::~StorageAreaSync):
- * storage/StorageAreaSync.h:
- * storage/StorageEvent.cpp:
- (WebCore::StorageEvent::create):
- (WebCore::StorageEvent::StorageEvent):
- * storage/StorageEvent.h:
- * storage/StorageNamespace.h:
- * storage/StorageNamespaceImpl.cpp:
- * storage/StorageNamespaceImpl.h:
- * storage/StorageSyncManager.cpp:
- (WebCore::StorageSyncManager::~StorageSyncManager):
- * storage/StorageSyncManager.h:
-
-
-2009-07-14 Adam Treat <adam.treat@torchmobile.com>
-
- Reviewed by David Hyatt.
-
- https://bugs.webkit.org/show_bug.cgi?id=26983
-
- Check to make sure the view is attached to a frame() in the visibleContentsResized()
- method as it can be triggered before the view is attached by Frame::createView(...)
- setting various values such as setScrollBarModes(...) for example. An ASSERT is
- triggered when a view is layout before being attached to a frame().
-
- * page/FrameView.cpp:
- (WebCore::FrameView::visibleContentsResized):
- * page/FrameView.h:
-
-2009-07-14 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: show last opened panel when invoking inspector.
-
- https://bugs.webkit.org/show_bug.cgi?id=27263
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::InspectorController):
- (WebCore::InspectorController::setWindowVisible):
- (WebCore::InspectorController::storeLastActivePanel):
- (WebCore::InspectorController::specialPanelForJSName):
- * inspector/InspectorController.h:
- (WebCore::InspectorController::Setting::Setting):
- * inspector/InspectorController.idl:
- * inspector/front-end/inspector.js:
- (WebInspector.set currentPanel):
- (WebInspector.loaded):
-
-2009-07-14 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Speed up access to NodeList length.
- https://bugs.webkit.org/show_bug.cgi?id=27264
-
- That's a minimal alternation of the code.
-
- * bindings/v8/custom/V8NodeListCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER): 1) use AtomicString for comparison, 2) use
- v8::Integer::New instead of v8::Number::New.
-
-2009-07-14 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Do not do unnecessary conversions from v8::Handle<v8::Value> to
- v8::Handle<v8::Object> and accompanying changes.
- https://bugs.webkit.org/show_bug.cgi?id=26953
-
- Three things:
-
- 1) do not cast from v8::Value to v8::Object if unnecessary---casts are cheap,
- but are not free (they check for emptiness of handle);
- 2) inline conversion from wrapper to node;
- 3) simplify case to an ASSERT.
-
- This is just a refactoring, so no new tests are needed.
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::evaluateInNewContext):
- (WebCore::V8Proxy::convertToSVGPODTypeImpl):
- * bindings/v8/V8Proxy.h:
- (WebCore::V8Proxy::convertDOMWrapperToNative):
- (WebCore::V8Proxy::convertToNativeObject):
- (WebCore::V8Proxy::convertToNativeEvent):
- * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
- (WebCore::toCanvasStyle):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8CustomBinding.cpp:
- (WebCore::V8Custom::GetTargetFrame):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::V8Custom::ClearTimeoutImpl):
- (WebCore::NAMED_ACCESS_CHECK):
- (WebCore::INDEXED_ACCESS_CHECK):
- * bindings/v8/custom/V8DocumentCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8LocationCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-07-14 Darin Adler <darin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Straight quotes should match fancy quotes in in-page search
- https://bugs.webkit.org/show_bug.cgi?id=27217
-
- Tests: fast/text/find-quotes.html
-
- * editing/TextIterator.cpp:
- (WebCore::foldQuoteMark): Added.
- (WebCore::foldQuoteMarks): Added.
- (WebCore::SearchBuffer::SearchBuffer): Call foldQuoteMarks on the target string.
- (WebCore::SearchBuffer::append): Call foldQuoteMarks on characters as they are
- added to the search buffer.
-
- * platform/text/CharacterNames.h: Added more quotation mark character names.
- Sorted character names with the sort tool.
-
-2009-07-13 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: handle debugger shortcuts while on source frame or on
- script file selector.
-
- https://bugs.webkit.org/show_bug.cgi?id=27224
-
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel):
- * inspector/front-end/SourceFrame.js:
- (WebInspector.SourceFrame.prototype._loaded):
-
-2009-07-13 Sam Weinig <sam@webkit.org>
-
- Reviewed by Darin Adler.
-
- Use standard HashCountedSet instead of a hand rolled one
- in HTMLDocument.
-
- * html/HTMLDocument.cpp:
- (WebCore::addItemToMap):
- (WebCore::removeItemFromMap):
- * html/HTMLDocument.h:
-
-2009-07-13 Erik Arvidsson <arv@chromium.org>
-
- Reviewed by Darin Adler and Maciej Stachowiak.
-
- Implement HTML5 draggable
- https://bugs.webkit.org/show_bug.cgi?id=26262
-
- This adds support for the HTML5 draggable attribute and its DOM binding. It maps the draggable property
- to the CSS properties -webkit-user-drag and -webkit-user-select respectively.
-
- Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#the-draggable-attribute
-
- Test: fast/html/draggable.html
-
- * css/html.css:
- * html/HTMLAnchorElement.cpp:
- (WebCore::HTMLAnchorElement::draggable):
- * html/HTMLAnchorElement.h:
- * html/HTMLAttributeNames.in:
- * html/HTMLElement.cpp:
- (WebCore::HTMLElement::draggable):
- (WebCore::HTMLElement::setDraggable):
- * html/HTMLElement.h:
- * html/HTMLElement.idl:
- * html/HTMLImageElement.cpp:
- (WebCore::HTMLImageElement::draggable):
- * html/HTMLImageElement.h:
-
-2009-07-13 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Image rendered as layer contents looks different from image rendered via CG.
- <rdar://problem/7048830>
-
- Fix a visible color profile difference between between images rendered via Core Graphics
- and those rendered via a compositing layer, by assigning the GenericRGB profile to
- untagged images (which come through as having the DeviceRGB profile) when they are set
- as layer contents.
-
- Test: compositing/color-matching/image-color-matching.html
-
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayerCA::setContentsToImage):
-
-2009-07-13 Darin Adler <darin@apple.com>
-
- Reviewed by Oliver Hunt.
-
- https://bugs.webkit.org/show_bug.cgi?id=27220
- Assertion failure in createSearcher() (usearch_open() status is U_USING_DEFAULT_WARNING)
-
- * editing/TextIterator.cpp:
- (WebCore::createSearcher): Add U_USING_DEFAULT_WARNING as a possible status code
- in the assertion. Affects only the assertion.
-
-2009-07-13 Alexey Proskuryakov <ap@webkit.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=26925
- <rdar://problem/7027850> URL Fragment Breaks Application Cache Loads
-
- Test: http/tests/appcache/main-resource-hash.html
-
- * loader/appcache/ApplicationCache.cpp:
- (WebCore::ApplicationCache::resourceForURL):
- (WebCore::ApplicationCache::resourceForRequest):
- * loader/appcache/ApplicationCacheGroup.cpp:
- (WebCore::ApplicationCacheGroup::cacheForMainRequest):
- (WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest):
- (WebCore::ApplicationCacheGroup::selectCache):
- (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
- (WebCore::ApplicationCacheGroup::didReceiveResponse):
- (WebCore::ApplicationCacheGroup::didFail):
- (WebCore::ApplicationCacheGroup::addEntry):
- Remove URL fragment at appcache code borders.
-
- * loader/appcache/ApplicationCacheResource.h:
- (WebCore::ApplicationCacheResource::create):
- * loader/appcache/ApplicationCacheStorage.cpp:
- (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
- (WebCore::ApplicationCacheStorage::cacheGroupForURL):
- (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
- Assert that there is no URL fragment in URL at key points in appcache code.
-
-2009-07-13 Darin Adler <darin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=27166
- rdar://problem/7015857
- Find for strings composed entirely of spaces doesn't work
-
- Test: fast/text/find-spaces.html
-
- * editing/TextIterator.cpp:
- (WebCore::findPlainText): Removed unneeded special case.
- The empty string case already works correctly.
-
-2009-07-13 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Kevin Decker.
-
- Remove NPPVpluginPrivateModeBool, it was removed from the spec.
-
- * bridge/npapi.h:
-
-2009-07-13 Feng Qian <feng@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=27237
-
- Make V8DOMMap.h compiling with gcc option -Werror=non=virtual-dtor.
-
- * bindings/v8/V8DOMMap.h:
- (WebCore::WeakReferenceMap::WeakReferenceMap):
- (WebCore::WeakReferenceMap::~WeakReferenceMap):
-
-2009-07-13 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Remove an accidental add of bidi.(cpp|h) to WebCore.gypi.
-
- * WebCore.gypi: Removed bidi.cpp and bidi.h
-
-2009-07-13 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Update WebCore.gyp in preparation to hooking it up.
-
- * WebCore.gypi: Added files that were mid-stream while switching over.
-
-2009-07-13 Dmitry Titov <dimich@chromium.org>
-
- Not reviewed, another small fix for Chromium build.
-
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::evaluate):
-
-2009-07-13 Dmitry Titov <dimich@chromium.org>
-
- Not reviewed, fix Chromium build bustage.
-
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::evaluate):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::JavaScriptConsoleMessage::addToPage):
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::handleConsoleMessage):
-
-2009-07-13 Sam Weinig <sam@webkit.org>
-
- Reviewed by Darin Adler.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=27234
- <rdar://problem/7054356>
-
- Add null page check in HTMLDocument::hasFocus.
-
- Test: fast/dom/HTMLDocument/hasFocus-frameless-crash.html
-
- * html/HTMLDocument.cpp:
- (WebCore::HTMLDocument::hasFocus): Add page null check.
- (WebCore::HTMLDocument::createTokenizer): Cleanup page null check.
-
-2009-07-13 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Darin Adler.
-
- Disable continuous spell checking in the inspector
- https://bugs.webkit.org/show_bug.cgi?id=27131
-
- * inspector/front-end/inspector.html: Added spellcheck="false" to the
- main-panels and console-prompt containers.
-
-2009-07-13 Adam Langley <agl@google.com>
-
- Reviewed by Eric Seidel.
-
- Chromium Linux: fix assertion when rendering google.com.kh
-
- https://bugs.webkit.org/show_bug.cgi?id=26924
-
- Some shapers (i.e. Khmer) will produce cluster logs which report that
- /no/ code points contributed to certain glyphs. Because of this, we
- take any code point which contributed to the glyph in question, or any
- subsequent glyph. If we run off the end, then we take the last code
- point.
-
- Added LayoutTests/fast/text/international/khmar-selection.html
-
- * platform/graphics/chromium/FontLinux.cpp:
- (WebCore::Font::offsetForPositionForComplexText):
-
-2009-07-13 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Darin Adler.
-
- spellcheck="false" is ignored
- <rdar://problem/7054177>
-
- * editing/Editor.cpp:
- (WebCore::markMisspellingsOrBadGrammar): Moved code to check the
- spellcheck attribute from here...
- (WebCore::Editor::spellCheckingEnabledInFocusedNode): ...to here.
- (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Bail out
- if spell chcking is disabled by the spellcheck attribute.
- * editing/Editor.h:
-
-2009-07-13 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Adam Roben.
-
- Add new configuration flag for redistributable Windows build.
- https://bugs.webkit.org/show_bug.cgi=27087
-
- * WebCore.vcproj/WebCore.vcproj: Add new WinCairo.vsprops to
- Debug_Cairo and Release_Cairo builds.
- * config.h: Check for presence of WIN_CAIRO and select appropriate
- configuration. Defaults to standard Apple build.
-
-2009-07-13 Peter Kasting <pkasting@google.com>
-
- https://bugs.webkit.org/show_bug.cgi?id=19562
- Back out previous patch for this bug (too many problems).
-
- * DerivedSources.cpp:
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.gypi:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * html/HTMLButtonElement.idl:
- * html/HTMLFieldSetElement.idl:
- * html/HTMLFormControlElement.cpp:
- * html/HTMLFormControlElement.h:
- (WebCore::HTMLFormControlElement::form):
- * html/HTMLInputElement.idl:
- * html/HTMLSelectElement.idl:
- * html/HTMLTextAreaElement.idl:
- * html/ValidityState.cpp: Removed.
- * html/ValidityState.h: Removed.
- * html/ValidityState.idl: Removed.
-
-2009-07-13 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Add HTMLAllCollection to WebCore.gypi.
-
- https://bugs.webkit.org/show_bug.cgi?id=27223
-
- * WebCore.gypi: Add HTMLAllCollection.
-
-2009-07-13 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Darin Fisher.
-
- [V8] Add a missing check for constructor call in WebKitCSSMatrixConstructor.
- https://bugs.webkit.org/show_bug.cgi?id=27218
-
- Test: fast/css/matrix-as-function-crash.html
-
- * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL): Added a check for constructor call.
-
-2009-07-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Unreviewed make dist build fix.
-
- * GNUmakefile.am:
-
-2009-07-13 Cédric Luthi <cedric.luthi@gmail.com>
-
- Reviewed by Tor Arne Vestbø.
-
- Fix NPWindow clip rect in PluginViewMac
-
- The rect should be in window-coordinates. This bug can be observed
- with Flash 10 here: http://www.permadi.com/tutorial/cursorTracker/
-
- * plugins/mac/PluginViewMac.cpp:
-
-2009-07-13 Simon Hausmann <hausmann@webkit.org>
-
- Reviewed by Ariya Hidayat.
-
- Fix Qt implementation of WebCore::directoryName to return the absolute
- directory name instead of the base file name.
-
- * platform/qt/FileSystemQt.cpp:
- (WebCore::directoryName):
-
-2009-07-13 Simon Hausmann <hausmann@webkit.org>
-
- Reviewed by Ariya Hidayat.
-
- Fix WebCore::Path::isEmpty() for the Qt port to return true
- if there is no element in the path.
-
- QPainterPath::isEmpty() returns also true if there is one single
- MoveTo element inside, which makes sense but doesn't patch Webcore's
- is-empty definition.
-
- * platform/graphics/qt/PathQt.cpp:
- (WebCore::Path::isEmpty): Use elementCount() == 0.
-
-2009-07-13 Albert J. Wong <ajwong@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Upstream fixes to NPV8Object.cpp that make ~30 layout tests pass.
- https://bugs.webkit.org/show_bug.cgi?id=27127
-
- There were a number of bugs introduced during the last upstreaming
- effort that broke around 30 layout tests. This fixes those bugs.
- It also has compile fixes to match the recent cutting apart of
- V8Proxy.
-
- * bindings/v8/NPV8Object.cpp:
- (freeV8NPObject):
- (npCreateV8ScriptObject):
- (NPN_Invoke):
- (NPN_InvokeDefault):
- (NPN_EvaluateHelper):
- (NPN_SetException):
- (NPN_Construct):
-
-2009-07-13 Mads Ager <ager@chromium.org>
-
- Reviewed by Adam Barth.
-
- Fix memory leak in the V8 binding layer.
- https://bugs.webkit.org/show_bug.cgi?id=27163
-
- Reinitializing the context is not necessary when clearing the proxy for navigation
- and it will lead us to hold on to an empty context for each frame.
-
- Test for empty context instead of empty global object handle when
- updating the document for a context.
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::clearForNavigation):
- (WebCore::V8Proxy::updateDocument):
-
-2009-07-13 John Gregg <johnnyg@google.com>
-
- Reviewed by David Levin.
-
- Correct the logic to determine if a V8 callback returns a value.
- https://bugs.webkit.org/show_bug.cgi?id=27155
-
- * bindings/v8/custom/V8CustomVoidCallback.cpp:
- (WebCore::invokeCallback):
- - Don't crash if result.IsEmpty().
-
-2009-07-13 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
- https://bugs.webkit.org/show_bug.cgi?id=26932
-
- Initial IDL definition and bindings for SharedWorkers.
-
- * Configurations/FeatureDefines.xcconfig:
- Added new files for SharedWorker support.
- * DerivedSources.make:
- Added new files for SharedWorker support.
- * GNUmakefile.am:
- Added new files for SharedWorker support.
- * WebCore.gypi:
- Added new files for SharedWorker support.
- * WebCore.pro:
- Added new files for SharedWorker support.
- * WebCore.xcodeproj/project.pbxproj:
- Added new files for SharedWorker support.
- * bindings/js/JSAbstractWorkerCustom.cpp: Added.
- (WebCore::JSAbstractWorker::mark):
- Custom mark handler that marks the event listeners.
- (WebCore::JSAbstractWorker::addEventListener):
- (WebCore::JSAbstractWorker::removeEventListener):
- (WebCore::JSAbstractWorker::toJS):
- Custom toJS handler which differentiates between various subclasses.
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::sharedWorker):
- SharedWorker constructor (only enabled when SHARED_WORKERS is
- enabled).
- * bindings/js/JSEventTarget.cpp:
- (WebCore::toJS):
- (WebCore::toEventTarget):
- Added support for converting to/from SharedWorkers.
- * bindings/js/JSSharedWorkerConstructor.cpp: Added.
- (WebCore::JSSharedWorkerConstructor::JSSharedWorkerConstructor):
- (WebCore::constructSharedWorker):
- (WebCore::JSSharedWorkerConstructor::getConstructData):
- * bindings/js/JSSharedWorkerConstructor.h: Added.
- (WebCore::JSSharedWorkerConstructor::classInfo):
- * bindings/js/JSSharedWorkerCustom.cpp: Added.
- (WebCore::JSSharedWorker::mark):
- Custom mark function that marks the internal MessagePort.
- * bindings/v8/DOMObjectsInclude.h:
- Updated to include new header files.
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
- * bindings/v8/custom/V8AbstractWorkerCustom.cpp: Added.
- (WebCore::getEventListener):
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- V8 handlers for add/removeEventListener().
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8SharedWorkerCustom.cpp: Added.
- (WebCore::CALLBACK_FUNC_DECL):
- Custom constructor for SharedWorker.
- * dom/EventTarget.cpp:
- (WebCore::EventTarget::toSharedWorker):
- * dom/EventTarget.h:
- * page/DOMWindow.idl:
- * workers/AbstractWorker.cpp: Added.
- (WebCore::AbstractWorker::AbstractWorker):
- Common base class for SharedWorker and (soon) Worker. The functions below were copied from Worker.cpp.
- This is the first step in refactoring Worker to derive from AbstractWorker to enable code sharing.
- (WebCore::AbstractWorker::~AbstractWorker):
- (WebCore::AbstractWorker::addEventListener):
- (WebCore::AbstractWorker::removeEventListener):
- (WebCore::AbstractWorker::dispatchEvent):
- (WebCore::AbstractWorker::dispatchLoadErrorEvent):
- (WebCore::AbstractWorker::dispatchScriptErrorEvent):
- * workers/AbstractWorker.h: Added.
- Definitions of functionality shared by Worker.h and SharedWorker.h. In a future patch, Worker will derive from AbstractWorker.
- (WebCore::AbstractWorker::scriptExecutionContext):
- (WebCore::AbstractWorker::setOnerror):
- (WebCore::AbstractWorker::onerror):
- (WebCore::AbstractWorker::eventListeners):
- (WebCore::AbstractWorker::refEventTarget):
- (WebCore::AbstractWorker::derefEventTarget):
- * workers/AbstractWorker.idl: Added.
- * workers/SharedWorker.cpp: Added.
- (WebCore::SharedWorker::SharedWorker):
- (WebCore::SharedWorker::~SharedWorker):
- * workers/SharedWorker.h: Added.
- (WebCore::SharedWorker::create):
- (WebCore::SharedWorker::port):
- (WebCore::SharedWorker::toSharedWorker):
- * workers/SharedWorker.idl: Added.
-
-2009-07-13 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Cleanup - Remove prf install target
- https://bugs.webkit.org/show_bug.cgi?id=27191
-
- qtwebkit.prf has been removed; this cleans up the related
- install target as well.
-
- * WebCore.pro: Remove prf install target
-
-2009-07-12 Adam Barth <abarth@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- Facebook Chat is broken due to XSS auditor
- https://bugs.webkit.org/show_bug.cgi?id=27179
-
- Instead of just using the script's URL as to detect an XSS attack, we
- now use a bit of context before the URL. In particular, we use the
- bytes from the beginning of the attribute name to the end of the
- attribute value. In virtually all injection attacks, the attacker
- would need to supply the attribute name as well as the attribute value.
- However, in the Facebook false positive, the attribute name is not
- present in the URL.
-
- Tests: http/tests/security/xssAuditor/script-tag-src-redirect-safe.html
- http/tests/security/xssAuditor/script-tag-with-source-double-quote.html
- http/tests/security/xssAuditor/script-tag-with-source-no-quote.html
-
- * html/HTMLTokenizer.cpp:
- (WebCore::HTMLTokenizer::parseTag):
- * html/HTMLTokenizer.h:
- * page/XSSAuditor.cpp:
- (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
- * page/XSSAuditor.h:
-
-2009-07-12 Keishi Hattori <casey.hattori@gmail.com>
-
- Reviewed by Timothy Hatcher.
-
- Refactor ConsoleMessage to add MessageType attribute.
- https://bugs.webkit.org/show_bug.cgi?id=20625
-
- * bindings/js/JSCustomXPathNSResolver.cpp:
- (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
- * bindings/js/JSDOMWindowBase.cpp:
- (WebCore::JSDOMWindowBase::printErrorMessage):
- * dom/Document.cpp:
- (WebCore::Document::reportException):
- (WebCore::Document::addMessage):
- * dom/Document.h:
- * dom/ScriptExecutionContext.h:
- * html/HTMLParser.cpp:
- (WebCore::HTMLParser::reportErrorToConsole):
- * inspector/ConsoleMessage.cpp:
- (WebCore::ConsoleMessage::ConsoleMessage):
- (WebCore::ConsoleMessage::addToConsole):
- (WebCore::ConsoleMessage::isEqual):
- * inspector/ConsoleMessage.h:
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::addMessageToConsole):
- (WebCore::InspectorController::startGroup):
- (WebCore::InspectorController::endGroup):
- (WebCore::InspectorController::addProfileFinishedMessageToConsole):
- (WebCore::InspectorController::addStartProfilingMessageToConsole):
- (WebCore::InspectorController::count):
- * inspector/InspectorController.h:
- * inspector/front-end/Console.js:
- (WebInspector.Console.prototype.addMessage):
- (WebInspector.ConsoleMessage): Added type property.
- (WebInspector.ConsoleMessage.prototype.toMessageElement):
- (WebInspector.ConsoleMessage.prototype.toString):
- (WebInspector.ConsoleMessage.prototype.isEqual):
- (WebInspector.ConsoleCommandResult):
- (WebInspector.ConsoleGroup.prototype.addMessage):
- (WebInspector.ConsoleGroup.prototype._titleClicked):
- * inspector/front-end/Resource.js:
- (WebInspector.Resource.prototype._addTip):
- (WebInspector.Resource.prototype._checkWarning):
- * inspector/front-end/inspector.css: Changed ".console-group-title-level" to ".console-group-title"
- * inspector/front-end/inspector.js:
- (WebInspector.addMessageToConsole):
- * loader/DocLoader.cpp:
- (WebCore::DocLoader::printAccessDeniedMessage):
- * loader/EmptyClients.h:
- (WebCore::EmptyChromeClient::addMessageToConsole):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::reportLocalLoadFailed):
- (WebCore::FrameLoader::shouldAllowNavigation):
- * page/ChromeClient.h:
- * page/Console.cpp:
- (WebCore::printMessageSourceAndLevelPrefix):
- (WebCore::Console::addMessage):
- (WebCore::Console::error):
- (WebCore::Console::log):
- (WebCore::Console::dir):
- (WebCore::Console::trace):
- (WebCore::Console::assertCondition):
- (WebCore::Console::timeEnd):
- (WebCore::Console::warn):
- * page/Console.h: Added MessageType enum.
- (WebCore::):
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::postMessageTimerFired):
- * page/XSSAuditor.cpp:
- (WebCore::XSSAuditor::canEvaluate):
- (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
- (WebCore::XSSAuditor::canLoadObject):
- * svg/SVGDocumentExtensions.cpp:
- (WebCore::SVGDocumentExtensions::reportWarning):
- (WebCore::SVGDocumentExtensions::reportError):
- * wml/WMLErrorHandling.cpp:
- (WebCore::reportWMLError):
- * workers/GenericWorkerTask.h: Added GenericWorkerTask8 for the extra argument.
- (WebCore::GenericWorkerTask8::create):
- (WebCore::GenericWorkerTask8::GenericWorkerTask8):
- (WebCore::GenericWorkerTask8::performTask):
- (WebCore::createCallbackTask):
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::addMessage):
- (WebCore::WorkerContext::importScripts):
- * workers/WorkerContext.h:
- * workers/WorkerMessagingProxy.cpp:
- (WebCore::postConsoleMessageTask):
- (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
- * workers/WorkerMessagingProxy.h:
- * workers/WorkerObjectProxy.h:
- * xml/XMLHttpRequest.cpp:
- (WebCore::reportUnsafeUsage):
- (WebCore::XMLHttpRequest::didFinishLoading):
- * xml/XSLTProcessor.cpp:
- (WebCore::XSLTProcessor::parseErrorFunc):
-
-2009-07-12 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Upstream UndetectableHTMLCollection.idl as HTMLAllCollection.idl.
-
- https://bugs.webkit.org/show_bug.cgi?id=27132
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/DOMObjectsInclude.h:
- * bindings/v8/DerivedSourcesAllInOne.cpp:
- * bindings/v8/V8DOMWrapper.cpp:
- (WebCore::V8DOMWrapper::getTemplate):
- (WebCore::V8DOMWrapper::instantiateV8Object):
- * bindings/v8/V8Index.cpp:
- * bindings/v8/V8Index.h:
- * dom/HTMLAllCollection.idl: Added.
-
-2009-07-12 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Maciej Stachowiak.
-
- Inspector: Duplicate Computation in Autocompletion
- https://bugs.webkit.org/show_bug.cgi?id=26778
-
- * inspector/front-end/TextPrompt.js:
- (WebInspector.TextPrompt.prototype._completionsReady):
-
-2009-07-12 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Maciej Stachowiak.
-
- https://bugs.webkit.org/show_bug.cgi?id=27196
- Rename bidi.cpp to RenderBlockLineLayout.cpp and remove bidi.h
-
- * GNUmakefile.am: Updated.
- * WebCore.gypi: Updated.
- * WebCore.pro: Updated.
- * WebCore.vcproj/WebCore.vcproj: Updated.
- * WebCore.xcodeproj/project.pbxproj: Updated.
- * WebCoreSources.bkl: Updated.
- * rendering/RenderBlock.h: Removed unnecessary forward declaration and
- updated comments.
- * rendering/RenderBlockLineLayout.cpp: Copied from WebCore/rendering/bidi.cpp.
- Removed unnecessary #include statements.
- (WebCore::BidiRun::BidiRun): Moved here from bidi.h.
- (WebCore::RenderBlock::layoutInlineChildren): Removed outdated comment.
- * rendering/bidi.cpp: Removed.
- * rendering/bidi.h: Removed.
-
-2009-07-12 Dan Bernstein <mitz@apple.com>
-
- - Windows build fix
-
- * platform/graphics/cg/PDFDocumentImage.cpp:
- (WebCore::PDFDocumentImage::dataChanged):
-
-2009-07-12 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Sam Weinig.
-
- - Image cleanup
-
- * platform/graphics/BitmapImage.cpp:
- (WebCore::BitmapImage::destroyDecodedData): Use the data() accessor
- instead of the m_data member.
- (WebCore::BitmapImage::dataChanged): Ditto.
- * platform/graphics/Image.h: Re-ordered #includes and class
- declarations. Removed the drawPatternCallback() declaration. Made member
- variables private.
- * platform/graphics/cg/ImageCG.cpp:
- (WebCore::drawPatternCallback): Changed this from a member function to a
- static function.
- * platform/graphics/cg/PDFDocumentImage.cpp:
- (WebCore::PDFDocumentImage::dataChanged): Use the data() accessor
- instead of the m_data member.
- * svg/graphics/SVGImage.cpp:
- (WebCore::SVGImage::dataChanged): Ditto.
-
-2009-07-12 Daniel Bates <dbates@intudata.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=27189
-
- Fixes insufficient check in XSSAuditor::canSetBaseElementURL that caused
- XSSAuditor to incorrectly block HTML Base elements whose base path coincided
- with the URL of the page.
-
- Test: http/tests/security/xssAuditor/base-href-safe3.html
-
- * page/XSSAuditor.cpp:
- (WebCore::XSSAuditor::canSetBaseElementURL): Changed conditional to only call
- XSSAuditor::findInRequest() if the host in the page URL disagrees with the host
- in the base element URL.
-
-2009-07-12 Darin Adler <darin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Text searching with ICU should take the user's default locale into account
- https://bugs.webkit.org/show_bug.cgi?id=27184
- rdar://problem/6812121
-
- No simple way to test this since it's dependent on user locale.
- After this, the user's default locale is used only on Mac.
-
- * editing/TextIterator.cpp:
- (WebCore::createSearcher): Pass result of the currentSearchLocaleID
- function as the locale.
-
- * platform/text/TextBreakIteratorInternalICU.h: Added declaration of
- currentSearchLocaleID function.
-
- * platform/text/android/TextBreakIteratorInternalICU.cpp:
- (WebCore::currentSearchLocaleID): Added. Returns the empty string.
- * platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp:
- (WebCore::currentSearchLocaleID): Ditto.
- * platform/text/gtk/TextBreakIteratorInternalICUGtk.cpp:
- (WebCore::currentSearchLocaleID): Ditto.
-
- * platform/text/mac/TextBreakIteratorInternalICUMac.mm:
- (WebCore::textBreakLocalePreference): Added. Returns the value of
- the AppleTextBreakLocale preference.
- (WebCore::topLanguagePreference): Added. Returns the value of the
- first item in the AppleLanguages preference.
- (WebCore::canonicalLanguageIdentifier): Added. Cover for the
- CFLocaleCreateCanonicalLanguageIdentifierFromString function.
- (WebCore::getLocale): Added. Transfers the locale from a CFStringRef
- into a buffer.
- (WebCore::getSearchLocale): Added. Calls topLanguagePreference,
- canonicalLanguageIdentifier, and getLocale.
- (WebCore::currentSearchLocaleID): Added. Calls getSearchLocale once.
- (WebCore::getTextBreakLocale): Changed to call
- textBreakLocalePreference, topLanguagePreference,
- canonicalLanguageIdentifier, and getLocale.
-
- * platform/text/win/TextBreakIteratorInternalICUWin.cpp:
- (WebCore::currentSearchLocaleID): Added. Returns the empty string.
- * platform/wx/TemporaryLinkStubs.cpp:
- (WebCore::currentSearchLocaleID): Ditto.
-
-2009-07-12 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- https://bugs.webkit.org/show_bug.cgi?id=25415
- [GTK][ATK] Please implement support for get_text_at_offset
-
- Create a PangoLayout that properly represents the visual
- appearance of the text in the web page so that the line boundary
- modes of getText{At,Before,After}Offset work correctly.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (UTF16ToUTF8):
- (g_substr):
- (convertUniCharToUTF8):
- (getPangoLayoutForAtk):
-
-2009-07-11 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Simon Fraser.
-
- Bug 27187 - Match Gecko behaviour for canvas path mutation APIs on an empty path
- <https://bugs.webkit.org/show_bug.cgi?id=27187>
-
- Simple API change, check for the empty path and add appropriate point if necessary.
-
- Test: fast/canvas/canvas-modify-emptyPath.html
-
- * Info.plist:
- * WebCore.xcodeproj/project.pbxproj:
- * html/CanvasRenderingContext2D.cpp:
- (WebCore::CanvasRenderingContext2D::lineTo):
- (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
- (WebCore::CanvasRenderingContext2D::bezierCurveTo):
-
-2009-07-11 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Antti Koivisto.
-
- HTMLMediaElement.canPlayType "maybe" and "probably" reversed
- https://bugs.webkit.org/show_bug.cgi?id=27186
-
- * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
- (WebCore::MediaPlayerPrivate::supportsType):
- Return "probably" if type has codecs parameter.
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::supportsType):
- Ditto.
-
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
- (WebCore::MediaPlayerPrivate::supportsType):
- Ditto.
-
-2009-07-11 Brady Eidson <beidson@apple.com>
-
- Reviewed by Mark Rowe.
-
- A worker-thread inspired follow-up for:
- https://bugs.webkit.org/show_bug.cgi?id=26496 and <rdar://problem/7046520>
- REGRESSION: XHR stream connection blocks iFrame loading and resource downloading
-
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::loadRequestAsynchronously): Don't perform the XHR compensation when the XHR
- is running on a worker thread. Accessing the global Cache data structures from a non-main thread is
- not currently supported.
-
-2009-07-11 Simon Fraser <simon.fraser@apple.com>
-
- Enable support for accelerated compositing and 3d transforms on Leopard.
- <https://bugs.webkit.org/show_bug.cgi?id=20166>
- <rdar://problem/6120614>
-
- Reviewed by Oliver Hunt.
-
- * Configurations/FeatureDefines.xcconfig:
-
-2009-07-11 Simon Hausmann <hausmann@webkit.org>
-
- Fix the Qt build after r45724.
-
- * bridge/qt/qt_instance.cpp:
- (JSC::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp):
- * bridge/qt/qt_runtime.cpp:
- (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
-
-2009-07-10 Daniel Bates <dbates@intudata.com>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=26921
-
- Implements support for HTML entities, so XSSAuditor can protect against attacks
- encoded with HTML entities.
-
- Tests: http/tests/security/xssAuditor/inline-event-HTML-entities.html
- http/tests/security/xssAuditor/javascript-link-HTML-entities-control-char.html
- http/tests/security/xssAuditor/javascript-link-HTML-entities-named.html
- http/tests/security/xssAuditor/javascript-link-HTML-entities-null-char.html
- http/tests/security/xssAuditor/javascript-link-HTML-entities.html
- http/tests/security/xssAuditor/link-onclick-entities.html
- http/tests/security/xssAuditor/script-tag-entities.html
- http/tests/security/xssAuditor/script-tag-with-source-entities.html
-
- * page/XSSAuditor.cpp:
- (WebCore::XSSAuditor::canEvaluate):
- (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
- (WebCore::XSSAuditor::decodeURL): Modified to call WebCore::XSSAuditor::decodeHTMLEntities
- to decode HTML entities.
- (WebCore::XSSAuditor::decodeHTMLEntities): Added method to decode HTML entities.
- (WebCore::XSSAuditor::findInRequest):
- * page/XSSAuditor.h:
-
-2009-07-10 David Kilzer <ddkilzer@apple.com>
-
- Bug 27007: Build fixes when ICONDATABASE is disabled
-
- <https://bugs.webkit.org/show_bug.cgi?id=27007>
-
- Reviewed by Sam Weinig.
-
- * WebCore.xcodeproj/project.pbxproj: Added IconDatabaseNone.cpp
- to the project.
- * loader/icon/IconDatabase.cpp: Added
- #if ENABLE(ICONDATABASE)/#endif macro guard.
- * loader/icon/IconDatabase.h: Removed three public methods from
- #if ENABLE(ICONDATABASE)/#endif macro so that they may be
- stubbed out in IconDatabaseNone.cpp.
- * loader/icon/IconDatabaseNone.cpp: Added
- #if !ENABLE(ICONDATABASE)/#endif macro guard.
- (WebCore::IconDatabase::importIconURLForPageURL): Added.
- (WebCore::IconDatabase::importIconDataForIconURL): Added.
- (WebCore::IconDatabase::shouldStopThreadActivity): Added.
-
-2009-07-10 Daniel Bates <dbates@intudata.com>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=27151
-
- Fixes issue where JavaScript URLs that contain null- and non-null control characters can
- bypass XSSAuditor.
-
- Tests: http/tests/security/xssAuditor/javascript-link-control-char.html
- http/tests/security/xssAuditor/javascript-link-null-char.html
- http/tests/security/xssAuditor/javascript-link.html
-
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::evaluate): Separated out logic for JavaScript URLs from
- inline scripts. For JavaScript URLs, calls XSSAuditor::canEvaluateJavaScriptURL.
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::evaluate): Made similar changes to evaluate() as in
- bindings/js/ScriptController.cpp.
- * page/XSSAuditor.cpp:
- (WebCore::XSSAuditor::canEvaluateJavaScriptURL): Separated out logic for JavaScript URLs
- into its own method.
- * page/XSSAuditor.h:
-
-2009-07-10 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by David Kilzer.
-
- WebKit needs a style linting tool
- https://bugs.webkit.org/show_bug.cgi?id=25884
-
- Fix bunch of style issues by autofix of cpplint.
- This patch is created to demonstrate the autofix of cpplint.py.
-
- No new testcases because it's a style fix
-
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseMediaQuery):
- (WebCore::CSSParser::validUnit):
- (WebCore::CSSParser::parseValue):
- (WebCore::skipCommaInDashboardRegion):
- (WebCore::CSSParser::parseDashboardRegions):
- (WebCore::ShadowParseContext::commitValue):
- (WebCore::ShadowParseContext::commitLength):
- (WebCore::ShadowParseContext::commitColor):
- (WebCore::BorderImageParseContext::commitNumber):
- (WebCore::BorderImageParseContext::commitWidth):
- (WebCore::BorderImageParseContext::commitRule):
- (WebCore::BorderImageParseContext::commitBorderImage):
- (WebCore::CSSParser::lex):
- (WebCore::CSSParser::text):
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty):
- * css/MediaList.cpp:
- (WebCore::MediaList::deleteMedium):
- * css/MediaQuery.h:
- * css/MediaQueryEvaluator.cpp:
- (WebCore::parseAspectRatio):
- * css/MediaQueryEvaluator.h:
- * css/MediaQueryExp.h:
- (WebCore::MediaQueryExp::operator==):
- * css/WebKitCSSMatrix.h:
- * dom/Comment.h:
- * dom/Document.cpp:
- (WebCore::Document::setFocusedNode):
- * dom/Document.h:
- (WebCore::Document::setHasDashboardRegions):
- * dom/DocumentFragment.cpp:
- (WebCore::DocumentFragment::nodeName):
- * dom/DocumentFragment.h:
- * dom/DynamicNodeList.h:
- * dom/EditingText.h:
- * dom/Element.cpp:
- (WebCore::Element::dispatchAttrAdditionEvent):
- * dom/NamedAttrMap.cpp:
- (WebCore::NamedNodeMap::item):
- * dom/Node.cpp:
- (WebCore::Node::nodeValue):
- (WebCore::Node::nodeIndex):
- * dom/NodeRareData.h:
- (WebCore::NodeListsNodeData::create):
- * dom/Notation.h:
- * dom/ProcessingInstruction.h:
- * dom/Range.cpp:
- (WebCore::Range::processContents):
- * dom/StyledElement.cpp:
- (WebCore::toHex):
- * dom/XMLTokenizerLibxml2.cpp:
- (WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback):
- (WebCore::PendingCallbacks::PendingStartElementNSCallback::call):
- (WebCore::PendingCallbacks::):
- (WebCore::OffsetBuffer::readOutBytes):
- (WebCore::handleElementNamespaces):
- (WebCore::handleElementAttributes):
- (WebCore::attributesStartElementNsHandler):
- * dom/XMLTokenizerQt.cpp:
- (WebCore::attributesStartElementNsHandler):
- (WebCore::XMLTokenizer::parseStartElement):
- * editing/ApplyStyleCommand.cpp:
- (WebCore::ApplyStyleCommand::applyInlineStyle):
- * editing/DeleteSelectionCommand.cpp:
- (WebCore::DeleteSelectionCommand::removeNode):
- * editing/Editor.cpp:
- (WebCore::Editor::pasteAsPlainText):
- * editing/SelectionController.cpp:
- (WebCore::SelectionController::directionOfEnclosingBlock):
- * editing/SmartReplaceICU.cpp:
- (WebCore::addAllCodePoints):
- * history/HistoryItem.cpp:
- (WebCore::HistoryItem::icon):
- (WebCore::HistoryItem::adoptVisitCounts):
- * html/CanvasStyle.cpp:
- (WebCore::CanvasStyle::applyFillColor):
- * html/HTMLAnchorElement.cpp:
- (WebCore::HTMLAnchorElement::setActive):
- (WebCore::HTMLAnchorElement::isLiveLink):
- * html/HTMLAppletElement.h:
- * html/HTMLAudioElement.h:
- * html/HTMLBRElement.h:
- * html/HTMLBaseElement.h:
- * html/HTMLBaseFontElement.h:
- * html/HTMLDListElement.h:
- * html/HTMLDirectoryElement.h:
- * html/HTMLFieldSetElement.cpp:
- (WebCore::HTMLFieldSetElement::HTMLFieldSetElement):
- * html/HTMLFormElement.cpp:
- (WebCore::HTMLFormElement::reset):
- * html/HTMLHRElement.cpp:
- (WebCore::HTMLHRElement::parseMappedAttribute):
- * html/HTMLHeadElement.h:
- * html/HTMLHtmlElement.h:
- * html/HTMLImageElement.h:
- (WebCore::HTMLImageElement::setLoadManually):
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::selection):
- * html/HTMLIsIndexElement.h:
- * html/HTMLMarqueeElement.cpp:
- * html/HTMLMediaElement.h:
- (WebCore::HTMLMediaElement::):
- * html/HTMLMenuElement.h:
- * html/HTMLMetaElement.h:
- * html/HTMLModElement.h:
- * html/HTMLOListElement.h:
- * html/HTMLOptionElement.cpp:
- (WebCore::HTMLOptionElement::childrenChanged):
- * html/HTMLParamElement.h:
- * html/HTMLQuoteElement.h:
- * html/HTMLStyleElement.h:
- * html/HTMLTableCaptionElement.h:
- * html/HTMLTableCellElement.h:
- * html/HTMLTableColElement.h:
- * html/HTMLTableSectionElement.cpp:
- (WebCore::HTMLTableSectionElement::deleteRow):
- * html/HTMLTitleElement.h:
- * html/HTMLTokenizer.cpp:
- (WebCore::HTMLTokenizer::parseNonHTMLText):
- (WebCore::HTMLTokenizer::parseEntity):
- (WebCore::HTMLTokenizer::parseTag):
- (WebCore::HTMLTokenizer::write):
- * html/HTMLUListElement.h:
- * html/HTMLVideoElement.h:
- * html/TimeRanges.h:
- (WebCore::TimeRanges::Range::Range):
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::enableResourceTracking):
- (WebCore::InspectorController::disableResourceTracking):
- * inspector/InspectorFrontend.cpp:
- (WebCore::InspectorFrontend::newInspectorJSONObject):
- * page/Console.cpp:
- (WebCore::Console::addMessage):
- * page/EventHandler.cpp:
- (WebCore::EventHandler::handleMousePressEvent):
- (WebCore::EventHandler::selectCursor):
- (WebCore::EventHandler::defaultKeyboardEventHandler):
- * page/Frame.cpp:
- (WebCore::Frame::jsDefaultStatusBarText):
- * page/android/DragControllerAndroid.cpp:
- (WebCore::DragController::dragOperation):
- * page/android/EventHandlerAndroid.cpp:
- (WebCore::EventHandler::tabsToAllControls):
- (WebCore::EventHandler::eventActivatedView):
- * page/animation/AnimationController.cpp:
- (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
- * page/gtk/DragControllerGtk.cpp:
- (WebCore::DragController::dragOperation):
- * page/qt/DragControllerQt.cpp:
- * page/win/DragControllerWin.cpp:
- (WebCore::DragController::isCopyKeyDown):
- * page/win/FrameWin.h:
- * rendering/RenderSlider.cpp:
- (WebCore::RenderSlider::mouseEventOffsetToThumb):
- * rendering/style/RenderStyle.h:
- (WebCore::InheritedFlags::setVerticalAlignLength):
- (WebCore::InheritedFlags::setUnicodeBidi):
- (WebCore::InheritedFlags::setCursor):
- * rendering/style/RenderStyleConstants.h:
- (WebCore::):
- * rendering/style/SVGRenderStyleDefs.h:
- * rendering/style/StyleInheritedData.h:
- (WebCore::StyleInheritedData::operator!=):
- * storage/DatabaseTask.h:
- * svg/GradientAttributes.h:
- * svg/LinearGradientAttributes.h:
- * svg/PatternAttributes.h:
- * svg/RadialGradientAttributes.h:
- * svg/SVGAnimatedPathData.h:
- * svg/SVGAnimatedPoints.h:
- * svg/SVGAnimationElement.h:
- * svg/SVGClipPathElement.h:
- * svg/SVGElementInstance.h:
- * svg/SVGFEBlendElement.cpp:
- (WebCore::SVGFEBlendElement::build):
- * svg/SVGFEBlendElement.h:
- * svg/SVGFEColorMatrixElement.cpp:
- (WebCore::SVGFEColorMatrixElement::build):
- * svg/SVGFEComponentTransferElement.cpp:
- (WebCore::SVGFEComponentTransferElement::build):
- * svg/SVGFECompositeElement.cpp:
- (WebCore::SVGFECompositeElement::build):
- * svg/SVGFEDiffuseLightingElement.cpp:
- (WebCore::SVGFEDiffuseLightingElement::build):
- * svg/SVGFEDisplacementMapElement.cpp:
- (WebCore::SVGFEDisplacementMapElement::build):
- * svg/SVGFEDistantLightElement.h:
- * svg/SVGFEFloodElement.cpp:
- (WebCore::SVGFEFloodElement::build):
- * svg/SVGFEFloodElement.h:
- * svg/SVGFEFuncAElement.h:
- * svg/SVGFEFuncBElement.h:
- * svg/SVGFEFuncGElement.h:
- * svg/SVGFEFuncRElement.h:
- * svg/SVGFEGaussianBlurElement.cpp:
- (WebCore::SVGFEGaussianBlurElement::build):
- * svg/SVGFEImageElement.cpp:
- (WebCore::SVGFEImageElement::build):
- * svg/SVGFEMergeElement.cpp:
- (WebCore::SVGFEMergeElement::build):
- * svg/SVGFEOffsetElement.cpp:
- (WebCore::SVGFEOffsetElement::build):
- * svg/SVGFEPointLightElement.h:
- * svg/SVGFESpecularLightingElement.cpp:
- (WebCore::SVGFESpecularLightingElement::build):
- * svg/SVGFESpotLightElement.h:
- * svg/SVGFETileElement.cpp:
- (WebCore::SVGFETileElement::build):
- * svg/SVGLineElement.cpp:
- (WebCore::SVGLineElement::parseMappedAttribute):
- * svg/SVGList.h:
- * svg/SVGListTraits.h:
- (WebCore::):
- * svg/SVGMPathElement.h:
- * svg/SVGMetadataElement.h:
- * svg/SVGParserUtilities.cpp:
- (WebCore::SVGPathParser::parseSVG):
- (WebCore::SVGPathParser::calculateArc):
- * svg/SVGPathElement.h:
- * svg/SVGPathSegClosePath.h:
- * svg/SVGSVGElement.h:
- * svg/SVGSetElement.h:
- * svg/SVGSwitchElement.h:
- * svg/SVGTextPathElement.cpp:
- (WebCore::SVGTextPathElement::parseMappedAttribute):
- * svg/SVGTextPathElement.h:
- * svg/SVGTitleElement.h:
- * svg/SVGTransformable.cpp:
- (WebCore::):
- * svg/SVGViewSpec.cpp:
- (WebCore::):
- * svg/animation/SMILTime.cpp:
- (WebCore::operator+):
- (WebCore::operator-):
- (WebCore::operator*):
- * svg/animation/SVGSMILElement.h:
- * svg/graphics/SVGResource.cpp:
- (WebCore::clientMap):
- * wml/WMLPostfieldElement.cpp:
- (WebCore::WMLPostfieldElement::value):
- * wml/WMLSetvarElement.cpp:
- (WebCore::WMLSetvarElement::value):
- * workers/WorkerRunLoop.cpp:
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::dropProtection):
- * xml/XPathPath.h:
-
-2009-07-10 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/7049066>.
- Update SnowLeopard media controller layout.
-
- * css/mediaControlsQT.css:
- Update for new layout.
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::movieLoadType):
- Added to replace isStreaming.
- * html/HTMLMediaElement.h:
- Declare movieLoadType, remove isStreaming.
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlStatusDisplayElement::update):
- Use movieLoadType instead of isStreaming.
- (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded):
- MediaControlElement is the base class, not HTMLInputElement.
- (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded):
- Ditto.
- (WebCore::MediaControlRewindButtonElement::rendererIsNeeded):
- Don't display rewind button for live streams.
- (WebCore::MediaControlReturnToRealtimeButtonElement::rendererIsNeeded):
- MediaControlInputElement is the base class, not HTMLInputElement.
- * rendering/MediaControlElements.h:
-
- * rendering/RenderThemeMac.h:
- * rendering/RenderThemeMac.mm:
- (WebCore::getMediaUIPartStateFlags):
- New, return wkDrawMediaUIPart flags.
- (WebCore::RenderThemeMac::paintMediaFullscreenButton):
- (WebCore::RenderThemeMac::paintMediaMuteButton):
- (WebCore::RenderThemeMac::paintMediaPlayButton):
- (WebCore::RenderThemeMac::paintMediaSeekBackButton):
- (WebCore::RenderThemeMac::paintMediaSeekForwardButton):
- (WebCore::RenderThemeMac::paintMediaSliderTrack):
- (WebCore::RenderThemeMac::paintMediaSliderThumb):
- (WebCore::RenderThemeMac::paintMediaRewindButton):
- (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton):
- (WebCore::RenderThemeMac::paintMediaControlsBackground):
- (WebCore::RenderThemeMac::paintMediaCurrentTime):
- (WebCore::RenderThemeMac::paintMediaTimeRemaining):
- Use getMediaUIPartStateFlags.
-
-2009-07-10 Michelangelo De Simone <micdesim@gmail.com>
-
- Reviewed by Adele Peterson.
-
- https://bugs.webkit.org/show_bug.cgi?id=19562
- Added build stuff and stub for the ValidityState class, part of HTML5
- section Forms:
- http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#validitystate
-
- Test: fast/forms/ValidityState-001.html
-
- * DerivedSources.cpp: Fix aimed to include ValidityState files
- * DerivedSources.make: ditto
- * GNUmakefile.am: ditto
- * WebCore.gypi: ditto
- * WebCore.pro: ditto
- * WebCore.vcproj/WebCore.vcproj: ditto
- * WebCore.xcodeproj/project.pbxproj: ditto
- * WebCoreSources.bkl: ditto
- * html/HTMLButtonElement.idl: "validity" attribute
- * html/HTMLFieldSetElement.idl: ditto
- * html/HTMLFormControlElement.cpp: object getter
- (WebCore::HTMLFormControlElement::validity):
- * html/HTMLFormControlElement.h: ditto
- * html/HTMLInputElement.idl: "validity" attribute
- * html/HTMLSelectElement.idl: ditto
- * html/HTMLTextAreaElement.idl: ditto
- * html/ValidityState.cpp: Added.
- (WebCore::ValidityState::ValidityState):
- (WebCore::ValidityState::valid): validation flag
- * html/ValidityState.h: Added.
- (WebCore::ValidityState::create): creation routine
- (WebCore::ValidityState::control): ValidityState's parent getter
- (WebCore::ValidityState::valueMissing): validation flag
- (WebCore::ValidityState::typeMismatch): ditto
- (WebCore::ValidityState::patternMismatch): ditto
- (WebCore::ValidityState::tooLong): ditto
- (WebCore::ValidityState::rangeUnderflow): ditto
- (WebCore::ValidityState::rangeOverflow): ditto
- (WebCore::ValidityState::stepMismatch): ditto
- (WebCore::ValidityState::customError): ditto
- * html/ValidityState.idl: Added.
-
-2009-07-10 Brady Eidson <beidson@apple.com>
-
- Style cleanup over my last patch.
-
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::~XMLHttpRequest):
-
-2009-07-10 Kevin McCullough <kmccullough@apple.com>
-
- Reviewed by Geoffrey Garen.
-
- * inspector/JavaScriptCallFrame.cpp:
- (WebCore::JavaScriptCallFrame::dynamicGlobalObject):
- * inspector/JavaScriptCallFrame.h: New helper method, used below.
-
- * inspector/JavaScriptDebugServer.cpp:
- (WebCore::JavaScriptDebugServer::detach): In the special case
- where we detach from a window currently executing JavaScript,
- manually tear down our representation of the JavaScript
- call stack, since we won't get any more callbacks from JavaScriptCore
- to automatically tear it down. It's too bad that WebCore is
- responsible for this kind of tracking -- in the future, it would
- be nice if more of the breakpoint handling was inside of JavaScriptCore.
-
-2009-07-10 Brady Eidson <beidson@apple.com>
-
- Reviewed by Antti Koivisto.
-
- https://bugs.webkit.org/show_bug.cgi?id=26496 and <rdar://problem/7046520>
- REGRESSION: XHR stream connection blocks iFrame loading and resource downloading
-
- With this test we ended up going over the maximum-connections-per-host limit that CFNetwork expected.
- When that happened, the first request that was over the limit ended up in a bizarre state where it
- wasn't fully serviced until after the long running XHR was complete.
-
- Loader and Loader::Host work together to try to not exceed the max-connection limit but non-cache
- resources - such as XHR - could still end up causing this limit to be exceeded.
-
- This fix adds a workaround specifically for XHR while we hash out a more thorough solution that will
- handle this at the resource handle level.
-
- * loader/loader.cpp:
- (WebCore::Loader::nonCacheRequestInFlight):
- (WebCore::Loader::nonCacheRequestComplete):
- (WebCore::Loader::Host::Host):
- (WebCore::Loader::Host::nonCacheRequestInFlight):
- (WebCore::Loader::Host::nonCacheRequestComplete):
- (WebCore::Loader::Host::servePendingRequests): Take nonCacheRequestsInFlight into account.
- * loader/loader.h:
- (WebCore::Loader::Host::processingResource): Take nonCacheRequestsInFlight into account.
-
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::XMLHttpRequest):
- (WebCore::XMLHttpRequest::~XMLHttpRequest):
- (WebCore::XMLHttpRequest::loadRequestAsynchronously): Bump the nonCacheRequestInFlight count.
- (WebCore::XMLHttpRequest::didFail): Decrement that count if the Loader was notified.
- (WebCore::XMLHttpRequest::didFinishLoading): Ditto.
-
-2009-07-10 Antti Koivisto <antti@apple.com>
-
- Try to unbreak non-Mac build.
-
- * page/ChromeClient.h:
- (WebCore::ChromeClient::formDidFocus):
- (WebCore::ChromeClient::formDidBlur):
-
-2009-07-10 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Anders Carlsson.
-
- The rest of the fix for <rdar://problem/7038831> REGRESSION (TOT):
- In Mail, a crash occurs at WebCore::Widget::afterMouseDown() after
- clicking To Do's close box
-
- Make the Widget* in passMouseDownEventToWidget() a RefPtr.
-
- * page/mac/EventHandlerMac.mm:
- (WebCore::EventHandler::passMouseDownEventToWidget):
-
-2009-07-10 Eric Seidel <eric@webkit.org>
-
- Reviewed by Adam Barth.
-
- rename getDOMStructure calls w/o JSGlobalObject* to deprecatedGetDOMStructure
- https://bugs.webkit.org/show_bug.cgi?id=27157
-
- This is the first step to fixing
- https://bugs.webkit.org/show_bug.cgi?id=27088
-
- * WebCore.xcodeproj/project.pbxproj:
- * bindings/js/JSDOMBinding.h:
- (WebCore::deprecatedGetDOMStructure):
- (WebCore::createDOMObjectWrapper):
- (WebCore::createDOMNodeWrapper):
- * bindings/js/JSNamedNodesCollection.cpp:
- (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
- * bindings/js/JSRGBColor.cpp:
- (WebCore::JSRGBColor::JSRGBColor):
- * bridge/objc/objc_runtime.mm:
- (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
- * bridge/runtime_array.cpp:
- (JSC::RuntimeArray::RuntimeArray):
- * bridge/runtime_method.cpp:
- (JSC::RuntimeMethod::RuntimeMethod):
- * bridge/runtime_object.cpp:
- (JSC::RuntimeObjectImp::RuntimeObjectImp):
-
-2009-07-10 Greg Bolsinga <bolsinga@apple.com>
-
- Reviewed by Antti Koivisto.
-
- Add delegate methods about focus and blur and state change
- https://bugs.webkit.org/show_bug.cgi?id=27153
-
- Call the appropriate new ChromeClient methods for focus and blur.
-
- * html/HTMLFormControlElement.cpp:
- (WebCore::HTMLFormControlElement::dispatchFocusEvent):
- (WebCore::HTMLFormControlElement::dispatchBlurEvent):
- * html/HTMLFormControlElement.h:
- * loader/EmptyClients.h:
- (WebCore::EmptyChromeClient::formDidFocus):
- (WebCore::EmptyChromeClient::formDidBlur):
- * page/ChromeClient.h:
-
-2009-07-10 Steve Falkenburg <sfalken@apple.com>
-
- <rdar://problem/7048741> REGRESSION: Error about missing SwMenuX.dll opening pages with Shockwave
-
- Use altered search path while loading plug-ins. This modifies the DLL search order
- to look in the directory containing the plug-in even if a call to SetDllDirectory
- was previously made. Use of SetDllDirectory removes the current directory from the search path,
- breaking the previous strategy for locating any dependent DLLs of the plug-in.
-
- Reviewed by Jon Honeycutt.
-
- * plugins/win/PluginPackageWin.cpp:
- (WebCore::PluginPackage::load): Use LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH
-
-2009-07-10 Adam Roben <aroben@apple.com>
-
- Sort all our Xcode projects
-
- Accomplished using sort-Xcode-project-file.
-
- Requested by Dave Kilzer.
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-07-10 Adam Langley <agl@google.com>
-
- Reviewed by Darin Fisher.
-
- Chromium Linux: use disabled images for disabled widgets.
-
- https://bugs.webkit.org/show_bug.cgi?id=27106
-
- Previously, checkboxes and radio controls rendered the same even if disabled.
- The Chromium side of this change is r20224.
-
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::paintCheckbox):
- (WebCore::RenderThemeChromiumSkia::paintRadio):
-
-2009-07-10 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by John Sullivan.
-
- Fix crash when changing the zoom level in http://iphone.akamai.com/
- <rdar://problem/7029077>
-
- RenderLayerBacking's paintIntoLayer() method called updateLayerListsIfNeeded(),
- which could potentially destroy that compositing layer, causing a crash.
- Prevent this from happening by not doing a compositing update from paintIntoLayer().
-
- The existing updateLayerListsIfNeeded() was renamed to updateCompositingAndLayerListsIfNeeded(),
- and still does the compositing update. The new updateLayerListsIfNeeded() does not touch
- compositing layers, and is still called from paintIntoLayer().
-
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::paintLayer):
- (WebCore::RenderLayer::hitTestLayer):
- (WebCore::RenderLayer::updateLayerListsIfNeeded):
- (WebCore::RenderLayer::updateCompositingAndLayerListsIfNeeded):
- * rendering/RenderLayer.h:
-
-2009-07-10 Drew Wilson <atwilson@google.com>
-
- Reviewed by Darin Adler.
-
- Need to remove UsesManualToJSImplementation() in favor of CustomToJS.
- https://bugs.webkit.org/show_bug.cgi?id=27010
-
- Added support for CustomToJS IDL attribute to replace the hard-coded class list in UsesManualToJSImplementation().
-
- This is just a cleanup of existing functionality, so existing LayoutTests adequately cover this patch.
-
- * bindings/scripts/CodeGeneratorJS.pm:
- Removed UsesManualToJSImplementation(), added support for CustomToJS attribute.
- * css/CSSRule.idl:
- * css/CSSValue.idl:
- * css/StyleSheet.idl:
- * dom/Document.idl:
- * dom/Event.idl:
- * dom/Node.idl:
- * html/ImageData.idl:
- * svg/SVGElementInstance.idl:
- * svg/SVGPathSeg.idl:
- Added CustomToJS attribute to all the above IDL files.
-
-2009-07-10 Dan Bernstein <mitz@apple.com>
-
- - fix the build by reverting the ill-advised r45711
-
- * page/FrameView.cpp:
- (WebCore::FrameView::scrollToAnchor):
-
-2009-07-09 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Tim Hatcher.
-
- Updated WebCore.base.exp to add some needed functions.
-
- * WebCore.base.exp:
-
-2009-07-10 Dan Bernstein <mitz@apple.com>
-
- - address a review comment from Simon Fraser which I forgot to include
- in the last check-in
-
- * page/FrameView.cpp:
- (WebCore::FrameView::scrollToAnchor): Pass true to getRect() for
- maximum transform friendliness!
-
-2009-07-10 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Simon Fraser.
-
- - fix https://bugs.webkit.org/show_bug.cgi?id=27137
- <rdar://problem/7043124> REGRESSION (r44311): Reproducible crash due
- to infinite recursion into FrameLoader::gotoAnchor() ->
- FrameView::layout()
-
- Test: fast/loader/goto-anchor-infinite-layout.html
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::gotoAnchor): Moved the code to update layout,
- find the renderer to scroll to, and scroll from here to methods on
- FrameView, and replaced it with a call to
- FrameView::maintainScrollPositionAtAnchor().
- (WebCore::FrameLoader::completed): Call maintainScrollPositionAtAnchor()
- instead of setLockedToAnchor().
-
- * page/FrameView.cpp:
- (WebCore::FrameView::FrameView): Removed initialization of
- m_lockedToAnchor.
- (WebCore::FrameView::reset): Reset m_maintainScrollPositionAnchor instead
- of m_lockedToAnchor.
- (WebCore::FrameView::layout): Removed the code related to scrolling to
- the anchor from here, because scrolling can trigger events which
- invalidate the layout, and as such, belongs with the post-layout tasks.
- (WebCore::FrameView::maintainScrollPositionAtAnchor): Added. When called
- with a node scrolls the view to the top of that node and maintains it
- scrolled to the top of the node during subsequent layouts, until
- this function is called with 0 or other things trigger scrolling.
- (WebCore::FrameView::scrollRectIntoViewRecursively): Reset
- m_maintainScrollPositionAnchor.
- (WebCore::FrameView::setScrollPosition): Ditto.
- (WebCore::FrameView::scrollToAnchor): Added. Scrolls to the top of
- m_maintainScrollPositionAnchor, if it is set.
- (WebCore::FrameView::performPostLayoutTasks): Call scrollToAnchor().
- (WebCore::FrameView::setWasScrolledByUser): Reset
- m_maintainScrollPositionAnchor.
-
- * page/FrameView.h: Removed lockedToAnchor(), setLockedToAnchor(),
- and m_lockedToAnchor. Added maintainScrollPositionAtAnchor() and
- m_maintainScrollPositionAnchor.
-
-2009-07-04 Sriram Yadavalli <sriram.yadavalli@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- https://bugs.webkit.org/show_bug.cgi?id=26439
-
- QtWebKit fails in loading www.nytimes.com in Windows/Linux
-
- QNetworkReplyHandler is ignoring content associated with 401 error.
- This causes the XHR response handling to fail.
-
- Simon: Added also ProxyAuthenticationRequiredError, to handle the same
- case when going through proxies, as suggested by Prasanth.
-
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::finish):
-
-2009-07-10 Simon Hausmann <simon.hausmann@nokia.com>
-
- Reviewed by Holger Freyther.
-
- Enable HTML 5 Messaging to fix message channel Qt DRT failures in
- fast/events.
-
- * WebCore.pro:
-
-2009-07-09 Roland Steiner <rolandsteiner@google.com>
-
- Reviewed by Maciej Stachowiak.
-
- added InlineBox::isLeaf()
- firstLeafChild()/lastLeafChild() not virtual and not callable on InlineBox anymore.
- firstLeafChild()/lastLeafChild() will no longer return a node outside of the given subtree.
- Removed firstLeafChildAfterBox()/lastLeafChildBeforeBox()
- Removed potentially quadratic behavior if all nodes before/after a given box are empty InlineFlowBoxes
-
- Currently, these methods are called on RootInlineBox objects only, so above changes should not have
- any observable effect (only the removal of the square performance behavior could apply,
- but the conditions for that are probably of a rather theoretical nature).
-
- * rendering/InlineBox.cpp:
- (WebCore::InlineBox::nextLeafChild):
- (WebCore::InlineBox::prevLeafChild):
- * rendering/InlineBox.h:
- (WebCore::InlineBox::isLeaf):
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::firstLeafChild):
- (WebCore::InlineFlowBox::lastLeafChild):
- * rendering/InlineFlowBox.h:
- (WebCore::InlineFlowBox::firstChild):
- (WebCore::InlineFlowBox::lastChild):
- (WebCore::InlineFlowBox::isLeaf):
- * rendering/RootInlineBox.cpp:
- (WebCore::RootInlineBox::closestLeafChildForXPos):
-
-2009-07-09 Roland Steiner <rolandsteiner@google.com>
-
- Reviewed by Maciej Stachowiak.
-
- Added InlineBox::baselinePosition() and lineHeight() methods
- (adapted remaining code accordingly to use those methods)
-
- No change in functionality.
-
- * rendering/InlineBox.h:
- (WebCore::InlineBox::baselinePosition):
- (WebCore::InlineBox::lineHeight):
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
- (WebCore::InlineFlowBox::computeLogicalBoxHeights):
- (WebCore::InlineFlowBox::placeBoxesVertically):
-
-2009-07-09 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Maciej Stachowiak.
-
- Bug 27142 - canPlayType() should return empty string for unsupported content
- <https://bugs.webkit.org/show_bug.cgi?id=27142>
-
- Return "" instead of "no" for unsupport media types.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::canPlayType):
-
-2009-07-09 Roland Steiner <rolandsteiner@google.com>
-
- Reviewed by Maciej Stachowiak.
-
- Implement the part of HTML5 spec that deals with parsing of <rp> and <rt> tags
- in that their end tags are optional if followed by <rp>/<rt>.
-
- Also specify a new accessibility role "annotation" for <rp> and <rt>.
-
- Affected code parts are not enclosed in #IF ENABLE(RUBY), since the parsing
- is not affected by whether ruby is rendered properly or not (in fact, it may
- be more profound without ruby layouting, since the contents of <rp> are not hidden).
-
- Test: fast/ruby/parse-rp.html
-
- * accessibility/AccessibilityObject.h:
- (WebCore::):
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::roleValue):
- * html/HTMLElement.cpp:
- (WebCore::HTMLElement::endTagRequirement):
- (WebCore::HTMLElement::tagPriority):
- (WebCore::inlineTagList):
- * html/HTMLParser.cpp:
- (WebCore::HTMLParser::rpCreateErrorCheck):
- (WebCore::HTMLParser::rtCreateErrorCheck):
- (WebCore::HTMLParser::getNode):
- * html/HTMLParser.h:
- * html/HTMLTagNames.in:
-
-2009-07-09 Dmitry Titov <dimich@chromium.org>
-
- Not reviewed, fix for previous commit.
-
- The change http://trac.webkit.org/changeset/45695 did not correctly
- enabled GTL and QT build flags. This caused layout tests failure.
- This is speculative fix for those failures.
-
- * GNUmakefile.am: added ENABLE_CHANNEL_MESSAGING flag.
- * WebCore.pro: ditto.
- * page/DOMWindow.idl: touched to cause recompile.
- * workers/WorkerContext.idl: ditto.
-
-2009-07-09 Drew Wilson <atwilson@google.com>
-
- Reviewed by Alexey Proskuryakov.
-
- https://bugs.webkit.org/show_bug.cgi?id=26903
-
- Turned on CHANNEL_MESSAGING by default because the MessageChannel API
- is now implemented for Web Workers and is reasonably stable.
-
- Tests: fast/events/message-channel-gc-2.html
- fast/events/message-channel-gc-3.html
- fast/events/message-channel-gc-4.html
- fast/events/message-channel-gc.html
- fast/events/message-channel-listener-circular-ownership.html
- fast/events/message-port-clone.html
- fast/events/message-port-constructor-for-deleted-document.html
- fast/events/message-port-deleted-document.html
- fast/events/message-port-deleted-frame.html
- fast/events/message-port-inactive-document.html
- fast/events/message-port-no-wrapper.html
- fast/events/message-port.html
- fast/workers/worker-cloneport.html
- fast/workers/worker-messageport-gc.html
- fast/workers/worker-messageport.html
-
- * Configurations/FeatureDefines.xcconfig: Turned on ENABLE_CHANNEL_MESSAGING.
- * WebCore/WebCore.vcproj/WebCoreCommon.vsprops: ditto.
- * WebCore/WebCore.vcproj/build-generated-files.sh: ditto.
- * WebCore/page/DOMWindow.idl: touch the file to cause re-generation of headers.
- * WebCore/workers/WorkerContext.idl: ditto.
-
-
-2009-07-09 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Simon Fraser.
-
- Full page zoom breaks remaining and elapsed time display in the <video> controller.
- https://bugs.webkit.org/show_bug.cgi?id=27123
-
- We are changing the size of the time remaining and time elapsed field, to
- automatically hide them, when the controller is too short.
-
- Because we toggle the size between 0 and the previous value of the
- controller, we miss any width change that may occur during full page zoom,
- and we fail to restore a correct width.
-
- This change fixes that problem by using a cloned style on which we
- set the width to 0, and restoring the previous style when going back to
- the normal width.
-
- We take care about properly using the cloned style or the pseudo style,
- by overriding styleForElement().
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlElement::styleForElement):
- (WebCore::MediaControlElement::attach):
- (WebCore::MediaControlElement::updateStyle):
- (WebCore::MediaControlInputElement::styleForElement):
- (WebCore::MediaControlInputElement::attach):
- (WebCore::MediaControlInputElement::updateStyle):
- (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement):
- (WebCore::MediaControlTimeDisplayElement::styleForElement):
- (WebCore::MediaControlTimeDisplayElement::setVisible):
- * rendering/MediaControlElements.h:
- * rendering/RenderMedia.cpp:
- (WebCore::RenderMedia::shouldShowTimeDisplayControls): Make sure
- we take in account the zoom level when deciding if we should hide the
- ellapsed and remaining time.
-
-2009-07-09 Michael Nordman <michaeln@google.com>
-
- Reviewed by Darin Adler.
-
- Fix chromium build bustage due to Widget being a RefCounted class.
- https://bugs.webkit.org/show_bug.cgi?id=27139
-
- * platform/chromium/PopupMenuChromium.cpp:
- * platform/chromium/PopupMenuChromium.h:
-
-2009-07-09 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- Bug 27130 - Need to implement ARIA role="toolbar"
- https://bugs.webkit.org/show_bug.cgi?id=27130
-
- Test: platform/mac/accessibility/aria-toolbar.html
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::RoleEntry::):
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper roleDescription]):
-
-2009-07-09 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Darin Fisher.
-
- [Chromium] Upstream WebCore.gypi, the project file for Chromium build.
- https://bugs.webkit.org/show_bug.cgi?id=27135
-
- * WebCore.gypi: Added.
-
-2009-07-09 Jon Honeycutt <jhoneycutt@apple.com>
-
- A more robust fix for <rdar://problem/6930280> Reproducible crash at
- USA Today photo gallery
-
- Reviewed by Steve Falkenburg.
-
- * plugins/win/PluginMessageThrottlerWin.cpp:
- (WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
- Protect the PluginView from destruction before calling its window proc.
-
-2009-07-09 Jon Honeycutt <jhoneycutt@apple.com>
-
- <rdar://problem/6978804> WER #16: Repro Access Violation in
- WebCore::PluginView::bindingInstance (1310178023)
-
- Reviewed by Darin Adler.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::bindingInstance):
- Protect the PluginView from destruction before calling NPN_GetValue. If
- the renderer for the PluginView was destroyed during the call, and the
- PluginView's ref count is now 1, return null.
-
-2009-07-09 Jon Honeycutt <jhoneycutt@apple.com>
-
- Speculative fix for <rdar://problem/6991251> WER #13: Crash in
- WebKit!WebCore::PluginView::performRequest+203 (1311461169)
-
- Reviewed by Darin Adler.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::performRequest):
- Protect the PluginView from destruction before performing a load.
- Removed some trailing whitespace.
-
-2009-07-09 Jon Honeycutt <jhoneycutt@apple.com>
-
- Build fix.
-
- * inspector/JavaScriptDebugServer.cpp:
- (WebCore::JavaScriptDebugServer::setJavaScriptPaused):
-
-2009-07-09 Beth Dakin and Jon Honeycutt <bdakin@apple.com>
-
- Reviewed by Dave Hyatt.
-
- Make Widget RefCounted to fix or make fixable:
-
- <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs
- at WebCore::Widget::afterMouseDown() after clicking To Do's close
- box
- <rdar://problem/6978804> WER #16: Repro Access Violation in
- WebCore::PluginView::bindingInstance (1310178023)
- -and-
- <rdar://problem/6991251> WER #13: Crash in WebKit!
- WebCore::PluginView::performRequest+203 (1311461169)
-
- * loader/EmptyClients.h:
- (WebCore::EmptyFrameLoaderClient::createPlugin):
- Changed to return PassRefPtr
- (WebCore::EmptyFrameLoaderClient::createJavaAppletWidget):
- Ditto.
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::loadSubframe):
- (WebCore::FrameLoader::loadPlugin):
- Make the widget variable a RefPtr. Use .get() when passing it to
- RenderPart::setWidget().
- (WebCore::FrameLoader::createJavaAppletWidget):
- Make the widget variable a RefPtr.
-
- * loader/FrameLoader.h:
- Changed the return type of createJavaAppletWidget().
-
- * loader/FrameLoaderClient.h:
- Change the return types of createPlugin() and
- createJavaAppletWidget().
-
- * page/Frame.cpp:
- (WebCore::Frame::createView):
- No need to call .get() since setWidget() takes a RefPtr.
-
- * page/FrameView.cpp:
- (WebCore::FrameView::layoutIfNeededRecursive):
- children() now returns a HashSet of RefPtrs.
-
- * page/FrameView.h:
- Remove inheritance from RefCounted; we pick this up from ScrollView
- through Widget.
-
- * platform/ScrollView.cpp:
- (WebCore::ScrollView::addChild):
- addChild() now takes a PassRefPtr and m_children now keeps a
- HashSet of RefPtrs.
-
- * platform/ScrollView.h:
- ScrollView constructor is now protected.
- (WebCore::ScrollView::children):
- m_children is now a HashSet of RefPtrs.
+ (WebCore::Gradient::sortStopsIfNecessary): Utility method to sort stops.
+ Did not call this from getColor() to avoid overhead of a function call.
- * platform/Scrollbar.h:
- Remove inheritance from RefCounted; we pick this up from ScrollView
- through Widget.
-
- * platform/Widget.h:
- Inherit from RefCounted. Cleaned up some whitespace. Make m_widget
- a RefPtr.
-
- * plugins/PluginView.cpp:
- (WebCore::PluginView::create):
- Adopt the PluginView when returning it.
-
- * plugins/PluginView.h:
- Changed create() to return a PassRefPtr.
-
- * rendering/RenderApplet.cpp:
- Receive result in a RefPtr when calling createJavaAppletWidget().
-
- * rendering/RenderPart.cpp:
- (WebCore::RenderPart::setWidget):
- setWidget() now takes a PassRefPtr. Also removed the manual ref of
- FrameViews. This is handled by having m_widget be a RefPtr. Removed
- deleteWidget().
-
- * rendering/RenderPart.h:
- Removed override of deleteWidget().
-
- * rendering/RenderWidget.cpp:
- (WebCore::RenderWidget::destroy):
- (WebCore::RenderWidget::setWidget):
- (WebCore::RenderWidget::paint):
- (WebCore::RenderWidget::setOverlapTestResult):
- (WebCore::RenderWidget::updateWidgetPosition):
- Use .get().
- (WebCore::RenderWidget::clearWidget):
- Don't call deleteWidget(). It was removed.
-
- * rendering/RenderWidget.h:
- Removed deleteWidget(). Made m_widget a RefPtr.
- (WebCore::RenderWidget::widget):
- Use .get().
-
-2009-07-09 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- Bug 27129 - AX: possible assertion for a non-native image in accessibility
- https://bugs.webkit.org/show_bug.cgi?id=27129
-
- It's possible for an image that is not really an image to assert, because its renderer
- is turned into a RenderImage.
-
- Test: accessibility/non-native-image-crash.html
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
- (WebCore::RoleEntry::):
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper roleDescription]):
-
-2009-07-09 Simon Fraser <simon.fraser@apple.com>
-
- Build fix for SnowLeopard.
-
- Avoid using the contentsTransform methods if not on Leopard, because
- we don't need to call them.
-
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayerCA::updateContentsTransform):
- * platform/graphics/mac/WebLayer.mm:
- (-[WebLayer setNeedsDisplayInRect:]):
- * platform/graphics/mac/WebTiledLayer.mm:
- (-[WebTiledLayer setNeedsDisplayInRect:]):
-
-2009-07-09 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt
-
- Improve the appearance of text in compositing layers when -[CALayer geometryFlipped]
- is not available.
- <rdar://problem/6120614>
-
- * platform/graphics/GraphicsLayer.h:
- (WebCore::GraphicsLayer::setContentsOrientation):
- (WebCore::GraphicsLayer::contentsOrientation):
- * platform/graphics/GraphicsLayer.cpp:
- (WebCore::GraphicsLayer::GraphicsLayer):
- Add a m_contentsOrientation member and getter/setter to control whether
- the contents of this layer have a transform applied to them before display.
-
- * platform/graphics/mac/GraphicsLayerCA.h:
- New method to return the default contents orientation.
-
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::flipTransform):
- Convenience method to return a transform with a Y flip.
-
- (WebCore::GraphicsLayerCA::GraphicsLayerCA):
- (WebCore::GraphicsLayerCA::setSize):
- After the size changes we have to update the contentsTransform.
-
- (WebCore::GraphicsLayerCA::setGeometryOrientation):
- (WebCore::GraphicsLayerCA::geometryOrientation):
- If -setGeometryFlipped: is not available, use a children transform.
-
- (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
- Tiled layers have issues with flipped contentsTransform, so just use
- top-down drawing for them. Call updateContentsTransform() to set the
- new contents transform after swapping layers.
-
- (WebCore::GraphicsLayerCA::defaultContentsOrientation):
- Use bottom-up when -geometryFlipped is not available, otherwise top-down.
-
- (WebCore::GraphicsLayerCA::updateContentsTransform):
- Set the layer contents transform based on contentsOrientation().
-
- (WebCore::GraphicsLayerCA::setContentsLayer):
- We have to manually flip contents layers if we're not using -geometryFlipped.
-
- * platform/graphics/mac/WebLayer.h:
- * platform/graphics/mac/WebLayer.mm:
- Do early return if layerContents is nil. Flip the CTM if the layer has
- bottom-up coordinates, so that CG sees a CTM with no flip.
- Do the CGContextRestoreGState() after drawing the debug indicator.
-
- (-[WebLayer setNeedsDisplayInRect:]):
- * platform/graphics/mac/WebTiledLayer.mm:
- (-[WebTiledLayer setNeedsDisplayInRect:]):
- Need to map the dirty rect through the contentsTransform.
-
-2009-07-09 Alexey Proskuryakov <ap@webkit.org>
-
- Reviewed by Geoff Garen.
-
- <rdar://problem/6921671> Visit counter shouldn't be incremented by redirects.
-
- Can't test this functionality with layout tests.
-
- * WebCore.base.exp:
- * history/HistoryItem.cpp:
- (WebCore::HistoryItem::recordVisitAtTime):
- (WebCore::HistoryItem::visited):
- * history/HistoryItem.h:
- Only increase visit count if explicitly told to. Now, some visits change last access time,
- but do not increase visit count.
-
-2009-07-09 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/7046098> MediaControllerThemeQT requires QuickTime 7.6.3
-
- Require QuickTime 7.6.3 or higher to enable the new media controller UI.
-
- * rendering/RenderThemeMac.mm:
- (WebCore::mediaControllerTheme):
-
-2009-07-09 Sam Weinig <sam@webkit.org>
-
- Reviewed by Beth Dakin.
-
- Remove incorrect comment.
-
- * page/MouseEventWithHitTestResults.h:
-
-2009-07-09 Mads Ager <ager@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Update the V8 bindings codegenerator to use the RGBColor::create
- method to handle refcounts for RGBColor objects correctly.
-
- * bindings/scripts/CodeGeneratorV8.pm: Use RGBColor::create to create RGBColor objects.
-
-2009-07-09 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Adele Peterson.
-
- Crash in RenderMedia::styleDidChange.
- <rdar://problem/7044313> CrashTracer: quicklook crashed generating thumbnail for page with
- media element (RenderMedia::styleDidChange 115)
-
- Speculative fix for crash in styleDidChange. Null check controller elements before tell
- them to update style.
-
- * rendering/RenderMedia.cpp:
- (WebCore::RenderMedia::styleDidChange):
-
-2009-07-09 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- [V8] Move V8DOMWrapper to its own file
- https://bugs.webkit.org/show_bug.cgi?id=27121
-
- * bindings/v8/V8DOMWrapper.cpp: Added.
- (WebCore::GetToStringName):
- (WebCore::ConstructorToString):
- (WebCore::V8DOMWrapper::convertSVGElementInstanceToV8Object):
- (WebCore::V8DOMWrapper::convertSVGObjectWithContextToV8Object):
- (WebCore::V8DOMWrapper::domObjectHasJSWrapper):
- (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
- (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
- (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
- (WebCore::V8DOMWrapper::getTemplate):
- (WebCore::V8DOMWrapper::convertToV8Object):
- (WebCore::V8DOMWrapper::setHiddenWindowReference):
- (WebCore::V8DOMWrapper::domWrapperType):
- (WebCore::V8DOMWrapper::convertToNativeObjectImpl):
- (WebCore::V8DOMWrapper::convertToSVGPODTypeImpl):
- (WebCore::V8DOMWrapper::lookupDOMWrapper):
- (WebCore::V8DOMWrapper::convertDOMWrapperToNodeHelper):
- (WebCore::V8DOMWrapper::wrapNativeNodeFilter):
- (WebCore::V8DOMWrapper::instantiateV8Object):
- (WebCore::V8DOMWrapper::setDOMWrapper):
- (WebCore::V8DOMWrapper::maybeDOMWrapper):
- (WebCore::V8DOMWrapper::isDOMEventWrapper):
- (WebCore::V8DOMWrapper::isWrapperOfType):
- (WebCore::V8DOMWrapper::htmlElementType):
- (WebCore::V8DOMWrapper::svgElementType):
- (WebCore::V8DOMWrapper::convertEventToV8Object):
- (WebCore::):
- (WebCore::V8DOMWrapper::convertNodeToV8Object):
- (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
- (WebCore::V8DOMWrapper::convertEventListenerToV8Object):
- (WebCore::V8DOMWrapper::convertDOMImplementationToV8Object):
- (WebCore::V8DOMWrapper::convertStyleSheetToV8Object):
- (WebCore::V8DOMWrapper::convertCSSValueToV8Object):
- (WebCore::V8DOMWrapper::convertCSSRuleToV8Object):
- (WebCore::V8DOMWrapper::convertWindowToV8Object):
- * bindings/v8/V8DOMWrapper.h: Added.
- (WebCore::V8DOMWrapper::convertDOMWrapperToNative):
- (WebCore::V8DOMWrapper::wrapCPointer):
- (WebCore::V8DOMWrapper::extractCPointer):
- (WebCore::V8DOMWrapper::convertDOMWrapperToNode):
- (WebCore::V8DOMWrapper::convertToV8Object):
- (WebCore::V8DOMWrapper::convertToNativeObject):
- (WebCore::V8DOMWrapper::convertToNativeEvent):
- (WebCore::V8DOMWrapper::extractCPointerImpl):
- (WebCore::V8DOMWrapper::instantiateV8Object):
- * bindings/v8/V8Proxy.cpp:
- * bindings/v8/V8Proxy.h:
-
-2009-07-09 David Hyatt <hyatt@apple.com>
-
- Reviewed by Adele Peterson.
-
- Crash in setFocusedFrame.
- <rdar://7032869> Crashing in setFocusedFrame on blogger.com.
-
- Speculative fix for crasher in setFocusedFrame. Make sure to ref both frames and fire
- the events only after the local member has been updated.
-
- * page/FocusController.cpp:
- (WebCore::FocusController::setFocusedFrame):
-
-2009-07-09 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Adele Peterson.
-
- Possible crashes when mouse clicks not dispatched because range input destroyed while
- thumb is being dragged (e.g. scrub to end of movie)
- <rdar://problem/7037494>
- https://bugs.webkit.org/show_bug.cgi?id=27101
-
- Some shadow nodes "capture" all mouse events from mouseDown to mouseUp so they continue to
- get mouse events even when the mouse is moved outside of the node. This is done by putting
- EventHandler into a mode where it sends all mouse events to the node regardless of the
- actual mouse position. The mode is set on mouseDown and cleared on mouseUp but if the
- node is deleted while in this mode, the mouseUp is never sent and EventHandler continues
- to try to send events to the deleted node. This sometimes results in a crash, and sometimes
- in a page that doesn't respond to click events.
-
- Tests: fast/forms/search-delete-while-cancel-button-clicked.html
- fast/forms/slider-delete-while-dragging-thumb.html
- media/audio-delete-while-slider-thumb-clicked.html
- media/audio-delete-while-step-button-clicked.html
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlSeekButtonElement::detach):
- New, call setCapturingMouseEventsNode if capturing mouse events.
- * rendering/MediaControlElements.h:
- Declare detach().
-
- * rendering/RenderSlider.cpp:
- (WebCore::SliderThumbElement::detach):
- New, call setCapturingMouseEventsNode if capturing mouse events.
-
- * rendering/TextControlInnerElements.cpp:
- (WebCore::SearchFieldCancelButtonElement::detach):
- New, call setCapturingMouseEventsNode if capturing mouse events.
- * rendering/TextControlInnerElements.h:
- Declare detach().
-
-2009-07-09 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Enter the Frame's context before creating new objects in setContextDebugId.
-
- https://bugs.webkit.org/show_bug.cgi?id=27112
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::setContextDebugId):
-
-2009-07-09 Simon Hausmann <hausmann@webkit.org>
-
- Fix the Qt build.
-
- * WebCore.pro: Add new storage impl files to the build.
-
-2009-07-08 Adam Barth <abarth@webkit.org>
-
- Rubber stamped by Eric Seidel.
-
- [V8] Move DOM wrapper functions in V8Proxy to V8DOMWrapper
- https://bugs.webkit.org/show_bug.cgi?id=27107
-
- This patch is just renaming. Code motion will occur next.
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::processingUserGesture):
- (WebCore::createScriptObject):
- (WebCore::ScriptController::createScriptObjectForPluginElement):
- * bindings/v8/ScriptObject.cpp:
- (WebCore::ScriptGlobalObject::set):
- * bindings/v8/ScriptObjectQuarantine.cpp:
- (WebCore::getQuarantinedScriptObject):
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::handleEvent):
- (WebCore::V8AbstractEventListener::getReceiverObject):
- * bindings/v8/V8Collection.cpp:
- (WebCore::toOptionsCollectionSetter):
- * bindings/v8/V8Collection.h:
- (WebCore::getV8Object):
- (WebCore::getNamedPropertyOfCollection):
- (WebCore::nodeCollectionNamedPropertyGetter):
- (WebCore::getIndexedPropertyOfCollection):
- (WebCore::nodeCollectionIndexedPropertyGetter):
- (WebCore::nodeCollectionIndexedPropertyEnumerator):
- (WebCore::collectionIndexedPropertyEnumerator):
- (WebCore::collectionStringOrNullIndexedPropertyGetter):
- * bindings/v8/V8DOMMap.cpp:
- (WebCore::DOMData::handleWeakObject):
- (WebCore::DOMData::removeObjectsFromWrapperMap):
- * bindings/v8/V8GCController.cpp:
- (WebCore::enumerateDOMObjectMap):
- (WebCore::DOMObjectVisitor::visitDOMWrapper):
- (WebCore::GCPrologueVisitor::visitDOMWrapper):
- (WebCore::GCEpilogueVisitor::visitDOMWrapper):
- * bindings/v8/V8Helpers.cpp:
- (WebCore::wrapNPObject):
- * bindings/v8/V8NodeFilterCondition.cpp:
- (WebCore::V8NodeFilterCondition::acceptNode):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8DOMWrapper::convertSVGElementInstanceToV8Object):
- (WebCore::V8DOMWrapper::convertSVGObjectWithContextToV8Object):
- (WebCore::V8DOMWrapper::domObjectHasJSWrapper):
- (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
- (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
- (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
- (WebCore::V8Proxy::evaluateInNewContext):
- (WebCore::V8Proxy::getConstructor):
- (WebCore::V8DOMWrapper::getTemplate):
- (WebCore::V8Proxy::retrieveWindow):
- (WebCore::V8Proxy::updateDocumentWrapperCache):
- (WebCore::V8Proxy::clearForNavigation):
- (WebCore::V8Proxy::installDOMWindow):
- (WebCore::setDOMExceptionHelper):
- (WebCore::V8DOMWrapper::convertToV8Object):
- (WebCore::V8DOMWrapper::setHiddenWindowReference):
- (WebCore::V8DOMWrapper::domWrapperType):
- (WebCore::V8DOMWrapper::convertToNativeObjectImpl):
- (WebCore::V8DOMWrapper::convertToSVGPODTypeImpl):
- (WebCore::V8DOMWrapper::lookupDOMWrapper):
- (WebCore::V8DOMWrapper::convertDOMWrapperToNodeHelper):
- (WebCore::V8DOMWrapper::wrapNativeNodeFilter):
- (WebCore::V8DOMWrapper::instantiateV8Object):
- (WebCore::V8DOMWrapper::setDOMWrapper):
- (WebCore::V8DOMWrapper::maybeDOMWrapper):
- (WebCore::V8DOMWrapper::isDOMEventWrapper):
- (WebCore::V8DOMWrapper::isWrapperOfType):
- (WebCore::V8DOMWrapper::htmlElementType):
- (WebCore::V8DOMWrapper::svgElementType):
- (WebCore::V8DOMWrapper::convertEventToV8Object):
- (WebCore::V8DOMWrapper::convertNodeToV8Object):
- (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
- (WebCore::V8DOMWrapper::convertEventListenerToV8Object):
- (WebCore::V8DOMWrapper::convertDOMImplementationToV8Object):
- (WebCore::V8DOMWrapper::convertStyleSheetToV8Object):
- (WebCore::V8DOMWrapper::convertCSSValueToV8Object):
- (WebCore::V8DOMWrapper::convertCSSRuleToV8Object):
- (WebCore::V8DOMWrapper::convertWindowToV8Object):
- (WebCore::V8Proxy::bindJsObjectToWindow):
- * bindings/v8/V8Proxy.h:
- (WebCore::V8DOMWrapper::convertDOMWrapperToNative):
- (WebCore::V8DOMWrapper::wrapCPointer):
- (WebCore::V8DOMWrapper::extractCPointer):
- (WebCore::V8DOMWrapper::convertDOMWrapperToNode):
- (WebCore::V8DOMWrapper::convertToV8Object):
- (WebCore::V8DOMWrapper::convertToNativeObject):
- (WebCore::V8DOMWrapper::convertToNativeEvent):
- (WebCore::V8DOMWrapper::extractCPointerImpl):
- (WebCore::V8DOMWrapper::instantiateV8Object):
- (WebCore::V8Proxy::constructDOMObject):
- (WebCore::toV8):
- * bindings/v8/V8SVGPODTypeWrapper.h:
- (WebCore::V8SVGPODTypeUtil::toSVGPODType):
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::WorkerContextExecutionProxy::retrieve):
- (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
- (WebCore::WorkerContextExecutionProxy::GetConstructor):
- (WebCore::WorkerContextExecutionProxy::ToV8Object):
- (WebCore::WorkerContextExecutionProxy::EventToV8Object):
- (WebCore::WorkerContextExecutionProxy::toV8):
- * bindings/v8/custom/V8AttrCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::NAMED_PROPERTY_SETTER):
- * bindings/v8/custom/V8CanvasPixelArrayCustom.cpp:
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
- (WebCore::toV8):
- (WebCore::toCanvasStyle):
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8ClientRectListCustom.cpp:
- (WebCore::INDEXED_PROPERTY_GETTER):
- * bindings/v8/custom/V8ClipboardCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8CustomBinding.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::INDEXED_ACCESS_CHECK):
- (WebCore::NAMED_ACCESS_CHECK):
- (WebCore::V8Custom::GetTargetFrame):
- * bindings/v8/custom/V8CustomSQLStatementCallback.cpp:
- (WebCore::V8CustomSQLStatementCallback::handleEvent):
- * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
- (WebCore::V8CustomSQLStatementErrorCallback::handleEvent):
- * bindings/v8/custom/V8CustomSQLTransactionCallback.cpp:
- (WebCore::V8CustomSQLTransactionCallback::handleEvent):
- * bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp:
- (WebCore::V8CustomSQLTransactionErrorCallback::handleEvent):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::V8Custom::WindowSetTimeoutImpl):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::ACCESSOR_GETTER):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::V8Custom::ClearTimeoutImpl):
- (WebCore::NAMED_ACCESS_CHECK):
- (WebCore::INDEXED_ACCESS_CHECK):
- * bindings/v8/custom/V8DatabaseCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8DocumentCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8DocumentLocationCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8ElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::ACCESSOR_GETTER):
- * bindings/v8/custom/V8EventCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- (WebCore::ACCESSOR_GETTER):
- * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
- (WebCore::getNamedItems):
- (WebCore::getItem):
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::ACCESSOR_GETTER):
- * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::NAMED_PROPERTY_SETTER):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::removeElement):
- * bindings/v8/custom/V8InspectorControllerCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8LocationCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- (WebCore::ACCESSOR_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_ACCESS_CHECK):
- (WebCore::NAMED_ACCESS_CHECK):
- * bindings/v8/custom/V8MessageChannelConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8MessagePortCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::NAMED_PROPERTY_GETTER):
- * bindings/v8/custom/V8NavigatorCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- * bindings/v8/custom/V8NodeCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8NodeIteratorCustom.cpp:
- (WebCore::toV8):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8NodeListCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8SQLTransactionCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8SVGLengthCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8SVGMatrixCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8StorageCustom.cpp:
- (WebCore::V8Custom::v8StorageNamedPropertyEnumerator):
- (WebCore::storageGetter):
- (WebCore::storageSetter):
- (WebCore::storageDeleter):
- * bindings/v8/custom/V8StyleSheetListCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- * bindings/v8/custom/V8TreeWalkerCustom.cpp:
- (WebCore::toV8):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::SetTimeoutOrInterval):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WorkerCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-07-08 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Simon Fraser.
-
- Make sure we can click outside the slider thumb and start dragging.
- https://bugs.webkit.org/show_bug.cgi?id=26229
-
- Previously we were assuming that if the thumb hasn't been clicked, we
- wouldn't issue any value change upon dragging.
-
- We need to handle the two different cases:
- - Clicked in the thumb, we need to make sure the cursor is always pointing
- the same slider thumb point.
- - Clicked outside, the cursor should always be pointing to the center of
- the thumb.
-
- For simplicity, we don't remember the original point of the mouse down,
- but a vector between that point and the thumb.
-
- * rendering/RenderSlider.cpp:
- (WebCore::SliderThumbElement::SliderThumbElement):
- (WebCore::SliderThumbElement::defaultEventHandler):
- (WebCore::RenderSlider::mouseEventVectorToThumb): Utility function.
- * rendering/RenderSlider.h:
-
-2009-07-08 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Simon Fraser.
-
- https://bugs.webkit.org/show_bug.cgi?id=27100
- <rdar://problem/7042621>
-
- Don't display "loading" in the <video> controller when
- there is no src specified.
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlStatusDisplayElement::update): The only
- way to find out if we have an element is currentSrc(). networkState()
- will always report LOADING according to the spec.
-
-2009-07-08 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- [V8] Move V8GCController functions to their own file
- https://bugs.webkit.org/show_bug.cgi?id=27102
-
- * bindings/v8/V8GCController.cpp: Added.
- * bindings/v8/V8GCController.h: Added.
- * bindings/v8/V8Proxy.cpp:
- * bindings/v8/V8Proxy.h:
-
-2009-07-08 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Split StorageArea and StorageNamespace into an interface and implementation.
- https://bugs.webkit.org/show_bug.cgi?id=27072
-
- I need to split StorageNamespace and StorageArea into an interface and
- implementation. In a later patch, I'll implement a proxy interface
- that'll run inside the Chromium renderer process.
-
- Additionally, fix the alphabetical ordering of files I recently added
- in the project files.
-
- This is a continuation of other refactoring work:
- https://bugs.webkit.org/show_bug.cgi?id=25376
-
- * GNUmakefile.am:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * storage/StorageArea.cpp:
- (WebCore::StorageArea::create):
- * storage/StorageArea.h:
- (WebCore::StorageArea::~StorageArea):
- * storage/StorageAreaImpl.cpp: Copied from WebCore/storage/StorageArea.cpp.
- (WebCore::StorageAreaImpl::create):
- (WebCore::StorageAreaImpl::~StorageAreaImpl):
- (WebCore::StorageAreaImpl::StorageAreaImpl):
- (WebCore::StorageAreaImpl::copy):
- (WebCore::StorageAreaImpl::length):
- (WebCore::StorageAreaImpl::key):
- (WebCore::StorageAreaImpl::getItem):
- (WebCore::StorageAreaImpl::setItem):
- (WebCore::StorageAreaImpl::removeItem):
- (WebCore::StorageAreaImpl::clear):
- (WebCore::StorageAreaImpl::contains):
- (WebCore::StorageAreaImpl::importItem):
- (WebCore::StorageAreaImpl::securityOrigin):
- (WebCore::StorageAreaImpl::close):
- (WebCore::StorageAreaImpl::blockUntilImportComplete):
- (WebCore::StorageAreaImpl::dispatchStorageEvent):
- * storage/StorageAreaImpl.h: Copied from WebCore/storage/StorageArea.h.
- * storage/StorageAreaSync.h:
- * storage/StorageNamespace.cpp:
- (WebCore::StorageNamespace::localStorageNamespace):
- (WebCore::StorageNamespace::sessionStorageNamespace):
- * storage/StorageNamespace.h:
- (WebCore::StorageNamespace::~StorageNamespace):
- * storage/StorageNamespaceImpl.cpp: Copied from WebCore/storage/StorageNamespace.cpp.
- (WebCore::StorageNamespaceImpl::localStorageNamespace):
- (WebCore::StorageNamespaceImpl::sessionStorageNamespace):
- (WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
- (WebCore::StorageNamespaceImpl::~StorageNamespaceImpl):
- (WebCore::StorageNamespaceImpl::copy):
- (WebCore::StorageNamespaceImpl::storageArea):
- (WebCore::StorageNamespaceImpl::close):
- * storage/StorageNamespaceImpl.h: Copied from WebCore/storage/StorageNamespace.h.
-
-2009-07-08 Adam Barth <abarth@webkit.org>
-
- Reviewed by Eric Seidel.
-
- [V8] Move garbage collector related functions from V8Proxy to V8GCController
- https://bugs.webkit.org/show_bug.cgi?id=26967
-
- This patch just moves the functions around in V8Proxy. We'll actually
- move them to a separate file in another patch.
-
- * bindings/v8/NPV8Object.cpp:
- (freeV8NPObject):
- * bindings/v8/ScheduledAction.cpp:
- (WebCore::ScheduledAction::ScheduledAction):
- (WebCore::ScheduledAction::~ScheduledAction):
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::gcProtectJSWrapper):
- (WebCore::ScriptController::gcUnprotectJSWrapper):
- * bindings/v8/ScriptInstance.cpp:
- (WebCore::V8ScriptInstance::clear):
- (WebCore::V8ScriptInstance::set):
- * bindings/v8/ScriptValue.h:
- (WebCore::ScriptValue::ScriptValue):
- (WebCore::ScriptValue::operator=):
- (WebCore::ScriptValue::clear):
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::disposeListenerObject):
- * bindings/v8/V8LazyEventListener.cpp:
- (WebCore::V8LazyEventListener::~V8LazyEventListener):
- (WebCore::V8LazyEventListener::getListenerFunction):
- (WebCore::V8LazyEventListener::getWrappedListenerFunction):
- * bindings/v8/V8NodeFilterCondition.cpp:
- (WebCore::V8NodeFilterCondition::V8NodeFilterCondition):
- (WebCore::V8NodeFilterCondition::~V8NodeFilterCondition):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8GCController::registerGlobalHandle):
- (WebCore::V8GCController::unregisterGlobalHandle):
- (WebCore::V8GCController::gcProtect):
- (WebCore::V8GCController::gcUnprotect):
- (WebCore::V8Proxy::destroyGlobal):
- (WebCore::V8Proxy::updateDocumentWrapper):
- (WebCore::V8Proxy::clearDocumentWrapper):
- (WebCore::V8Proxy::disposeContextHandles):
- (WebCore::V8Proxy::initContextIfNeeded):
- * bindings/v8/V8Proxy.h:
- (WebCore::):
- (WebCore::GlobalHandleInfo::GlobalHandleInfo):
- * bindings/v8/custom/V8CustomEventListener.cpp:
- (WebCore::V8EventListener::V8EventListener):
-
-2009-07-08 Daniel Bates <dbates@intudata.com>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=26918
-
- Prevents injection of HTML Base tag.
-
- Tests: http/tests/security/xssAuditor/base-href-control-char.html
- http/tests/security/xssAuditor/base-href-null-char.html
- http/tests/security/xssAuditor/base-href-safe.html
- http/tests/security/xssAuditor/base-href-safe2.html
- http/tests/security/xssAuditor/base-href-scheme-relative.html
- http/tests/security/xssAuditor/base-href.html
-
- * html/HTMLBaseElement.cpp:
- (WebCore::HTMLBaseElement::parseMappedAttribute):
- (WebCore::HTMLBaseElement::process): Modified to call XSSAuditor::canSetBaseElementURL
- to determine if it is safe to use base element URL.
- * html/HTMLBaseElement.h: Added field m_hrefAttrValue to store unparsed base element URL.
- * page/XSSAuditor.cpp:
- (WebCore::XSSAuditor::canSetBaseElementURL):
- * page/XSSAuditor.h:
-
-2009-07-08 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Upstream V8 npruntime bindings.
-
- https://bugs.webkit.org/show_bug.cgi?id=27094
-
- * bindings/v8/npruntime.cpp: Upstreamed from src.chromium.org.
- (StringKey::operator==):
- (StringKey::StringKeyHash::hash):
- (StringKey::StringKeyHash::equal):
- (StringKeyHashTraits::constructDeletedValue):
- (StringKeyHashTraits::isDeletedValue):
- (getStringIdentifierMap):
- (getIntIdentifierMap):
- * bindings/v8/npruntime_impl.h: Upstreamed from src.chromium.org.
- * bindings/v8/npruntime_internal.h: Upstreamed from src.chromium.org.
- * bindings/v8/npruntime_priv.h: Upstreamed from src.chromium.org.
-
-2009-07-08 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Extending the PlatformFileHandle definition from PLATFORM(WIN) to
- PLATFORM(WIN_OS)
-
- https://bugs.webkit.org/show_bug.cgi?id=27013
-
- * platform/FileSystem.h:
-
-2009-07-08 Daniel Bates <dbates@intudata.com>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=27071
-
- Resolves issue when HTTP parameters contain null- and non-null-control- characters.
-
- Tests: http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event-null-char.html
- http/tests/security/xssAuditor/embed-tag-control-char.html
- http/tests/security/xssAuditor/embed-tag-null-char.html
- http/tests/security/xssAuditor/embed-tag.html
- http/tests/security/xssAuditor/link-onclick-control-char.html
- http/tests/security/xssAuditor/link-onclick-null-char.html
- http/tests/security/xssAuditor/object-embed-tag-control-char.html
- http/tests/security/xssAuditor/object-embed-tag-null-char.html
- http/tests/security/xssAuditor/object-embed-tag.html
- http/tests/security/xssAuditor/object-tag.html
- http/tests/security/xssAuditor/script-tag-post-control-char.html
- http/tests/security/xssAuditor/script-tag-post-null-char.html
- http/tests/security/xssAuditor/script-tag-with-source-control-char.html
- http/tests/security/xssAuditor/script-tag-with-source-null-char.html
-
- * page/XSSAuditor.cpp:
- (WebCore::isNonNullControlCharacter): Called by XSSAuditor::decodeURL.
- (WebCore::XSSAuditor::canEvaluate):
- (WebCore::XSSAuditor::canCreateInlineEventListener):
- (WebCore::XSSAuditor::canLoadObject):
- (WebCore::XSSAuditor::decodeURL): Added parameters matchNullCharacters,
- and matchNonNullControlCharacters.
- (WebCore::XSSAuditor::findInRequest): Added parameters matchNullCharacters,
- and matchNonNullControlCharacters.
- * page/XSSAuditor.h:
-
-2009-07-08 Marc-Antoine Ruel <maruel@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Add DerivesSourcesAllInOne.cpp to help with release windows compilation.
- https://bugs.webkit.org/show_bug.cgi?id=27093
-
- This is specific for v8, no change in behavior.
-
- * bindings/v8/DerivedSourcesAllInOne.cpp: Added.
-
-2009-07-08 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Simon Fraser.
-
- https://bugs.webkit.org/show_bug.cgi?id=27086
-
- Make sure the Media controller doesn't fade in for no reason.
- This is happening because a update() call to the controller
- panel may reset the opacity to 1.0, given that it reloads the
- style.
-
- We also add a different fade in and fade out time to soften
- the fade out effect.
-
- No test case because this depends on how the movie is loaded.
-
- * rendering/RenderMedia.cpp:
- (WebCore::RenderMedia::RenderMedia):
- (WebCore::RenderMedia::updateControls):
- (WebCore::RenderMedia::updateControlVisibility): Simplify
- , and make sure we stop the timer if there is no animation
- to do.
- (WebCore::RenderMedia::opacityAnimationTimerFired):
- * rendering/RenderMedia.h:
-
-2009-07-08 David Kilzer <ddkilzer@apple.com>
-
- Bug 27081: Wrap RunLoopTimerCF.cpp in PLATFORM(MAC) && HAVE(RUNLOOP_TIMER)
-
- <https://bugs.webkit.org/show_bug.cgi?id=27081>
-
- Reviewed by Timothy Hatcher.
-
- * platform/cf/RunLoopTimerCF.cpp: This code is only used on
- Mac OS X when HAVE(RUNLOOP_TIMER) is enabled, so wrap the code
- in that macro as well.
-
-2009-07-08 Greg Bolsinga <bolsinga@apple.com>
-
- Reviewed by Darin Adler.
-
- Add -[WebView _isProcessingUserGesture]
- https://bugs.webkit.org/show_bug.cgi?id=27084
-
- Rename FrameLoader::userGestureHint() to FrameLoader::isProcessingUserGesture()
- for clarity.
-
- * WebCore.base.exp: Add WebCore::FrameLoader::isProcessingUserGesture()
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::processingUserGesture):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::requestFrame):
- (WebCore::FrameLoader::isProcessingUserGesture):
- * loader/FrameLoader.h:
-
-2009-07-08 Alexey Proskuryakov <ap@webkit.org>
-
- Reviewed (an earlier version) by Geoff Garen.
-
- https://bugs.webkit.org/show_bug.cgi?id=27090
- Remove lockBackForwardList argument from HTMLFormElement::submit()
-
- No change in behavior, so no tests.
-
- * bindings/js/JSHTMLFormElementCustom.cpp:
- (WebCore::JSHTMLFormElement::submit):
- * html/HTMLFormElement.cpp:
- (WebCore::HTMLFormElement::submit):
- * html/HTMLFormElement.h:
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::submitForm):
- (WebCore::FrameLoader::scheduleFormSubmission):
- * loader/FrameLoader.h:
- Don't pass lockBackForwardList around when it's known to be false.
-
-2009-07-08 Marc-Antoine Ruel <maruel@chromium.org>
-
- Reviewed by Adam Barth.
-
- Fix V8 idl codegen to use unique constant names
- <https://bugs.webkit.org/show_bug.cgi?id=27089>
-
- Embed the interface name in the global constant names so coagulating all
- the .cc files into one compile unit works with V8 bindings.
-
- Nothing added; Still compiles and pass tests.
-
- * bindings/scripts/CodeGeneratorV8.pm:
-
-2009-07-08 Brent Fulgham <bfulgham@webkit.org>
-
- Build fix: Add missing #includes for Windows (cURL) build.
- The <winsock2.h> and <windows.h> headers were not being
- included in Windows cURL builds.
-
- * platform/network/ResourceHandleInternal.h:
- * platform/network/curl/ResourceHandleManager.h:
-
-2009-07-08 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by David Kilzer.
-
- WebKit needs a style linting tool
- https://bugs.webkit.org/show_bug.cgi?id=25884
-
- Fix bunch of style issues in WebCore/rendering.
- This patch is created to demonstrate cpplint.py.
-
- No testcase because it's just a style fixes.
-
- * rendering/AutoTableLayout.cpp:
- (WebCore::AutoTableLayout::recalcColumn):
- (WebCore::AutoTableLayout::layout):
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::placeEllipsisBox):
- * rendering/InlineTextBox.cpp:
- (WebCore::InlineTextBox::paintTextMatchMarker):
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlTimelineElement::defaultEventHandler):
- * rendering/MediaControlElements.h:
- * rendering/RenderArena.cpp:
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::startDelayUpdateScrollInfo):
- (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
- (WebCore::RenderBlock::updateScrollInfoAfterLayout):
- (WebCore::RenderBlock::positionNewFloats):
- (WebCore::RenderBlock::newLine):
- (WebCore::RenderBlock::floatBottom):
- (WebCore::RenderBlock::leftBottom):
- (WebCore::RenderBlock::rightBottom):
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::calcReplacedWidthUsing):
- * rendering/RenderFieldset.cpp:
- (WebCore::RenderFieldset::layoutLegend):
- * rendering/RenderFlexibleBox.cpp:
- (WebCore::FlexBoxIterator::FlexBoxIterator):
- (WebCore::FlexBoxIterator::reset):
- (WebCore::FlexBoxIterator::first):
- (WebCore::FlexBoxIterator::next):
- (WebCore::RenderFlexibleBox::layoutVerticalBox):
- * rendering/RenderFrameSet.cpp:
- (WebCore::borderStartEdgeColor):
- * rendering/RenderFrameSet.h:
- * rendering/RenderImage.cpp:
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::updateVisibilityStatus):
- (WebCore::RenderLayer::calculateClipRects):
- (WebCore::RenderLayer::calculateRects):
- * rendering/RenderListBox.cpp:
- (WebCore::RenderListBox::panScroll):
- * rendering/RenderMarquee.cpp:
- (WebCore::RenderMarquee::updateMarqueeStyle):
- * rendering/RenderMedia.cpp:
- (WebCore::RenderMedia::updateControls):
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::drawLineForBoxSide):
- (WebCore::RenderObject::localCaretRect):
- * rendering/RenderSVGImage.cpp:
- (WebCore::RenderSVGImage::adjustRectsForAspectRatio):
- * rendering/RenderSlider.h:
- * rendering/RenderTable.cpp:
- (WebCore::RenderTable::outerBorderBottom):
- * rendering/RenderTableCol.h:
- * rendering/RenderTextControlSingleLine.cpp:
- (WebCore::RenderTextControlSingleLine::itemIsSeparator):
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::supportsHover):
- * rendering/RenderThemeChromiumWin.cpp:
- (WebCore::RenderThemeChromiumWin::supportsFocusRing):
- * rendering/SVGCharacterLayoutInfo.cpp:
- (WebCore::SVGCharacterLayoutInfo::addStackContent):
- * rendering/SVGCharacterLayoutInfo.h:
- * rendering/TextControlInnerElements.h:
- * rendering/bidi.cpp:
- (WebCore::RenderBlock::computeHorizontalPositionsForLine):
-
-2009-07-07 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Maciej Stachowiak.
-
- Reduce complexity of lifetime management in DynamicNodeList caches
- <https://bugs.webkit.org/show_bug.cgi?id=27068>
-
- Switch the Cache object used by DynamicNodeList into a normal
- refcounted object rather than having a weird flag controlled
- refcounting system, where positive refcount did not automatically
- imply the cache object would actually still be live.
-
- * dom/DynamicNodeList.cpp:
- (WebCore::DynamicNodeList::DynamicNodeList):
- (WebCore::DynamicNodeList::~DynamicNodeList):
- (WebCore::DynamicNodeList::Caches::Caches):
- (WebCore::DynamicNodeList::Caches::create):
- * dom/DynamicNodeList.h:
- * dom/Node.cpp:
- (WebCore::Node::childNodes):
- (WebCore::Node::getElementsByTagNameNS):
- (WebCore::Node::getElementsByName):
- (WebCore::Node::getElementsByClassName):
- (WebCore::NodeListsNodeData::invalidateCaches):
- (WebCore::NodeListsNodeData::isEmpty):
- * dom/NodeRareData.h:
- (WebCore::NodeListsNodeData::NodeListsNodeData):
-
-2009-07-07 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- -webkit-perspective should be a Length
- https://bugs.webkit.org/show_bug.cgi?id=27066
-
- -webkit-perspective should not take a magic valueless number, but should
- be a normal Length value which responds to zooming. Treat valueless numbers
- as pixels for backward compatibility.
-
- Test: transforms/3d/general/perspective-units.html
-
- * css/CSSParser.cpp:
- (WebCore::CSSParser::parseValue):
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::applyProperty):
-
-2009-07-07 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Simon Fraser.
-
- https://bugs.webkit.org/show_bug.cgi?id=27047
-
- We need to make sure that when we reattach, we also reattach
- the children in every MediaControlElement. Else we may end up
- having no remaining or elapsed time.
-
- We have to handle that, because we are using a special shadow
- tree in the DOM, and that we are ourselves handling
- attaching/detaching the renderer.
-
- The strategy here is to try to implement ::attach(), and try
- to reuse as much code as we can from the super class, including
- children attachement.
-
- Test: media/controls-after-reload.html
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlElement::styleForElement): Code factoring.
- (WebCore::MediaControlElement::rendererIsNeeded): Code factoring.
- (WebCore::MediaControlElement::attach): Implement attach
- and call super class so that children are also attached.
- (WebCore::MediaControlElement::updateStyle): Use attach()
- (WebCore::MediaControlInputElement::styleForElement): Code factoring.
- (WebCore::MediaControlInputElement::rendererIsNeeded): Code factoring.
- (WebCore::MediaControlInputElement::attach): See above.
- (WebCore::MediaControlInputElement::updateStyle): Use attach()
- * rendering/MediaControlElements.h:
- * rendering/RenderMedia.cpp:
- (WebCore::RenderMedia::updateControls): Directly run attach() on
- the m_panel, which is a root node for our shadow tree.
-
-2009-07-07 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Repaint issue after layer drops out of composited mode.
- <https://bugs.webkit.org/show_bug.cgi?id=27022>
-
- RenderLayers cache repaint rects in the form of m_repaintRect and m_outlineBox,
- and expect these to stay valid from one style change to the next. These rects
- are relative to the repaint container, so if a layer stops being composited,
- we need to recompute them.
-
- Test: compositing/repaint/layer-repaint-rects.html
-
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::computeRepaintRects):
- * rendering/RenderLayer.h:
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::updateBacking):
-
-2009-07-07 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Dave Hyatt and Darin Adler.
-
- - fix https://bugs.webkit.org/show_bug.cgi?id=26963
- <rdar://problem/7030998> Reproducible crash at
- FontCache::getFontData() when a custom font is used in a pseudo-style
-
- Test: fast/css/pseudo-cache-stale.html
-
- * dom/Element.cpp:
- (WebCore::Element::pseudoStyleCacheIsInvalid): Added. Given the old
- style and the new style, goes over cached pseudo-styles in the old
- style and re-resolves the same style types off the new style. If any of
- the new pseudo-styles is different from the currently cached
- corresponding style, returns true. Otherwise, returns false.
- (WebCore::Element::recalcStyle): Validate the pseudo-style cache before
- deciding to keep the existing style.
- * dom/Element.h:
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::uncachedFirstLineStyle): Added this version that
- returns an uncached first-line style based off the given style.
- (WebCore::RenderObject::getUncachedPseudoStyle): Added the 'ownStyle'
- parameter.
- * rendering/RenderObject.h:
- * rendering/style/RenderStyle.cpp:
- (WebCore::RenderStyle::getPseudoStyleCache): Added. Returns the cached
- pseudo-styles in the passed-in vector.
- * rendering/style/RenderStyle.h:
-
-2009-07-07 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Simon Fraser.
-
- - fix https://bugs.webkit.org/show_bug.cgi?id=27042
- <rdar://problem/7010981> Incomplete painting of newly created floats
-
- Tests: fast/repaint/float-in-new-block-with-layout-delta.html
- fast/repaint/float-new-in-block.html
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::layoutBlockChildren): If the child has never been
- laid out before, paint its overhanging floats in addition to itself.
- * rendering/RenderBlock.h:
- (WebCore::RenderBlock::FloatWithRect::FloatWithRect): Added and
- initialized a boolean everHadLayout member.
- * rendering/bidi.cpp:
- (WebCore::RenderBlock::layoutInlineChildren): Paint floats that have
- never been laid out before and did not move from (0, 0).
-
-2009-07-07 Brady Eidson <beidson@apple.com>
-
- Contributions from both Darin Adler and Brady Eidson.
- Reviewed by Darin Adler.
-
- <rdar://problem/7024039> REGRESSION (r42158): Back-forward navigation does not work correctly on nytimes.com
-
- In r42158 we lost some exclusions to making back/forward items for subframe navigations when a main frame
- navigation was still in progress.
-
- This patch makes things even better than it used to be by:
- - Locking back/forward history at the time the navigation is scheduled, not after the load has committed.
- - Locking back/forward history if *any* ancestor frame is still loading instead of just the main frame.
-
- Test: fast/loader/subframe-navigate-during-main-frame-load.html
-
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::submitForm): Move out the history locking logic into a standalone function so it can be
- used from multiple sites.
- (WebCore::mustLockBackForwardList): Returns true if any ancestor frame is still loading.
- (WebCore::FrameLoader::scheduleLocationChange): Respect mustLockBackForwardList() in addition to the passed in
- lockBackForwardList flag.
- (WebCore::FrameLoader::scheduleFormSubmission): Ditto.
-
-2009-07-07 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Upstream DOMObjectsInclude.h from src.chromium.org.
-
- https://bugs.webkit.org/show_bug.cgi?id=27035
-
- * bindings/v8/DOMObjectsInclude.h: Added.
-
-2009-07-07 Nate Chapin <japhet@chromium.org>
-
- Reviewed by David Levin.
-
- Relanding r45559, which was rolled back at r45574.
-
- https://bugs.webkit.org/show_bug.cgi?id=26857
-
- * bindings/scripts/CodeGeneratorV8.pm: Updated a function name in auto-generated bindings.
- * bindings/v8/V8Binding.cpp: Moved from src.chromium.org.
- * bindings/v8/V8Binding.h: Contents moved from src.chromium.org.
- * bindings/v8/V8LazyEventListener.cpp:
- (WebCore::V8LazyEventListener::getListenerFunction):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::handleConsoleMessage):
- (WebCore::V8Proxy::compileScript):
- (WebCore::V8Proxy::sourceName):
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::handleConsoleMessage):
- * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
- (WebCore::NAMED_PROPERTY_SETTER):
- * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
- (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
- (WebCore::removeElement):
- * bindings/v8/custom/V8SQLTransactionCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::SetTimeoutOrInterval):
- * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-07-07 Gregory Hughes <gfhughesVO+webkit@gmail.com>
-
- Reviewed by Darin Adler.
-
- AX: Some webpages do not send AXLoadComplete
- https://bugs.webkit.org/show_bug.cgi?id=26995
-
- When sending the AXLayoutComplete notification it is possible
- that the AXObjectCache was cleared, resulting in no valid
- object to send the notification to. This fix ensures that an
- AX object is created and cached if one does not already exist.
-
- Not able to add a test because notifications get sent after the layout test is completed.
-
- * dom/Document.cpp:
- (WebCore::Document::implicitClose):
-
-2009-07-06 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Simon Fraser.
-
- https://bugs.webkit.org/show_bug.cgi?id=27015
-
- Make sure that the CSS properties letter-spacing, word-spacing,
- line-height, text-transform, text-indent, text-shadow,
- text-decoration and color do not affect the media element controls,
- that display text.
-
- Controls that display text are only present in when the theme
- MediaControllerThemeQT is being used.
-
- Test: media/controls-styling.html
-
- * css/mediaControlsQT.css:
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlElement::updateStyle): Special case for
- text-decoration. text-decoration can't be overriden from CSS, because
- text-decoration is additive for historical reasons.
-
-2009-07-07 Albert Wong <ajwong@chromium.org>
-
- Not reviewed, Chromium build fix.
-
- Add in missing header fix syntax issue that crept into last patch.
- https://bugs.webkit.org/show_bug.cgi?id=27027
-
- * rendering/RenderThemeChromiumMac.mm:
- (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton):
-
-2009-07-07 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt.
-
- Make use of geometry information to decide which layers become composited.
-
- <rdar://problem/7011947>
- <https://bugs.webkit.org/show_bug.cgi?id=27021>
-
- In addition to looking at painting order, also, optionally, take layer
- overlap into account when deciding which RenderLayers need to be composited.
-
- No testcase because DRT doesn't dump which layers are composited.
-
- * page/FrameView.h:
- * page/FrameView.cpp:
- (WebCore::FrameView::updateCompositingLayers):
- Removed the unused CompositingUpdate parameter, and just do an early return
- when there is no view.
-
- * rendering/RenderLayer.h:
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::rendererContentChanged):
- (WebCore::RenderLayer::dirtyZOrderLists):
- (WebCore::RenderLayer::dirtyNormalFlowList):
- (WebCore::RenderLayer::styleChanged):
- (WebCore::RenderLayer::mustOverlapCompositedLayers):
- (WebCore::RenderLayer::setMustOverlapCompositedLayers):
- Change "overlay" to "overlap" for consistency with the use of "overlap"
- elsewhere.
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::updateAfterLayout):
- compositingLayersNeedUpdate() renamed to compositingLayersNeedRebuild().
-
- (WebCore::RenderLayerBacking::startAnimation):
- (WebCore::RenderLayerBacking::startTransition):
- Tell the compositor that we started an accelerated animation or transition.
-
- * rendering/RenderLayerCompositor.h:
- (WebCore::RenderLayerCompositor::compositingLayersNeedRebuild):
- Renamed, since it's explicitly about changes in hierarchy now.
-
- (WebCore::RenderLayerCompositor::setCompositingConsultsOverlap):
- (WebCore::RenderLayerCompositor::compositingConsultsOverlap):
- New getter and setter for whether compositing should take overlap into account.
-
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::RenderLayerCompositor):
- Add m_compositingConsultsOverlap, re-order some member variables.
-
- (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingEnabledFlag):
- Whitespace cleanup and method rename.
-
- (WebCore::RenderLayerCompositor::setCompositingLayersNeedRebuild):
- Method and variable renaming.
-
- (WebCore::RenderLayerCompositor::updateCompositingLayers):
- Now we have to run through the layer hierarchy every time if looking
- at overlap, because changes in layout can now alter compositing behavior.
- We minimize work by tracking whether we actually need to change the layer
- hierarchy via needLayerRebuild.
-
- (WebCore::RenderLayerCompositor::updateBacking):
- 3D transforms turn off overlap mode.
-
- (WebCore::RenderLayerCompositor::layerWasAdded):
- (WebCore::RenderLayerCompositor::layerWillBeRemoved):
- Method rename.
-
- (WebCore::RenderLayerCompositor::addToOverlapMap):
- (WebCore::RenderLayerCompositor::overlapsCompositedLayers):
- Utility methods to add a layer to the overlapMap (computing the absolute
- bounding box only if we haven't already done so), and testing the map
- entries.
-
- (WebCore::RenderLayerCompositor::computeCompositingRequirements):
- If a layer would composite only because it comes after other compositing
- layers in the painting order, then consult the overlap map to determine whether
- it overlaps, and thus actually needs to composite.
-
- Add layers to the map when they must be composited.
-
- (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
- Only do re-parenting work if the updateHierarchy flag is set.
-
- (WebCore::RenderLayerCompositor::didStartAcceleratedAnimation):
- When we start an accelerated transition or animation, we stop looking at
- overlap because we can no longer guarantee correct front-to-back ordering while the
- accelerated animation is running.
-
- (WebCore::RenderLayerCompositor::needsToBeComposited):
- Method renames.
-
- * rendering/RenderView.cpp:
- (WebCore::RenderView::setMaximalOutlineSize):
- Add comment indicating that this could be optimized.
-
-2009-07-14 Anton Muhin <antonm@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Speed up creation of V8 wrappers for DOM nodes.
-
- https://bugs.webkit.org/show_bug.cgi?id=26882
-
- This patch doesn't require new tests as it a set of refactorings
- to speed up wrapper creation.
-
- * bindings/v8/V8Proxy.cpp:
- * bindings/v8/V8Proxy.h:
-
-2009-07-07 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Reviewed by Gustavo Noronha.
-
- [GTK] textarea height property works only if other property are defined
- https://bugs.webkit.org/show_bug.cgi?id=18984
-
- Let WebCore handle textarea's metrics instead of readjusting it RenderthemeGtk.
-
- Test: fast/forms/textarea-metrics.html
-
- * platform/gtk/RenderThemeGtk.cpp:
- * platform/gtk/RenderThemeGtk.h:
-
-2009-07-07 Ben Murdoch <benm@google.com>
-
- Reviewed by Antti Koivisto.
-
- HTML5 Database becomes locked if a transaction is in progress when the page is refreshed.
- https://bugs.webkit.org/show_bug.cgi?id=25711
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=25711 where web
- storage databases could become locked until the browser is shut
- down if the page is refreshed whilst a transaction is in progress.
-
- Test: storage/database-lock-after-reload.html
-
- * storage/Database.cpp:
- (WebCore::Database::Database):
- (WebCore::Database::close): add code to inform the database thread we've closed the database.
- (WebCore::Database::performOpenAndVerify): add code to inform the database thread we've opened a database.
- * storage/Database.h:
- (WebCore::Database::opened): return true iff the underlying sqlite database has been opened but not closed.
- * storage/DatabaseThread.cpp:
- (WebCore::DatabaseThread::databaseThread): Before the database thread terminates, close any databases that ran transactions in this thread.
- (WebCore::DatabaseThread::recordDatabaseOpen): Records a database that executed a transaction in this thread.
- (WebCore::DatabaseThread::recordDatabaseClosed): Removes a database from the set of open databases.
- * storage/DatabaseThread.h:
- (WebCore::DatabaseThread::getThreadID): return the thread id for the database thread.
-
-2009-07-07 Jiahua Huang <jhuangjiahua@gmail.com>
-
- Reviewed by Jan Alonzo.
-
- [Gtk] Paste of rich text from firefox results garbled markup
- https://bugs.webkit.org/show_bug.cgi?id=26791
-
- Fix problem with UTF-16 clipboard pasted.
-
- * manual-tests/gtk/paste-richtext-from-firefox.html: Added.
- * platform/gtk/PasteboardGtk.cpp:
- (WebCore::Pasteboard::documentFragment):
-
-2009-07-07 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Change 'Continue debug' shortcut from F5 to F8 for consistency with Firebug.
-
- https://bugs.webkit.org/show_bug.cgi?id=23849
-
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel):
-
-2009-07-06 Albert J. Wong <ajwong@chromium.org>
-
- Reviewed by Maciej Stachowiak.
-
- Update RenderThemeChromiumMac for wkDrawMediaUIPart and wkDrawMediaSlider API
- change.
-
- Fix compile RenderThemeChromiumMac.mm due to API changes from r45572
- https://bugs.webkit.org/show_bug.cgi?id=27018
-
- This is mainly an API change update to fix the chromium compile. It
- also has a small fix of a typo in RenderThemeMac.mm.
-
- Compilation against the head of chromium trunk passed. Since this is
- a compile fix, that should be sufficient.
-
- * rendering/RenderThemeChromiumMac.mm:
- (WebCore::):
- (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton):
- (WebCore::RenderThemeChromiumMac::paintMediaMuteButton):
- (WebCore::RenderThemeChromiumMac::paintMediaPlayButton):
- (WebCore::RenderThemeChromiumMac::paintMediaSeekBackButton):
- (WebCore::RenderThemeChromiumMac::paintMediaSeekForwardButton):
- (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
- (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb):
- * rendering/RenderThemeMac.mm:
- (WebCore::):
-
-2009-07-06 David Kilzer <ddkilzer@apple.com>
-
- Bug 27002: Build fix when DASHBOARD_SUPPORT is disabled with -Wunused-parameter
-
- <https://bugs.webkit.org/show_bug.cgi?id=27002>
-
- Reviewed by Geoff Garen.
-
- * html/CanvasRenderingContext2D.cpp:
- (WebCore::CanvasRenderingContext2D::prepareGradientForDashboard):
- Mark gradient as an unused parameter when DASHBOARD_SUPPORT is
- disabled.
-
-2009-07-06 David Kilzer <ddkilzer@apple.com>
-
- Bug 27001: Fix improper use of PassRefPtr<Node> to RefPtr<Node>
-
- <https://bugs.webkit.org/show_bug.cgi?id=27001>
-
- Reviewed by Geoff Garen.
-
- PassRefPtr<> should only be used for arguments to functions that
- take ownership of the object, or as return values from functions
- that relinquish ownership of the object.
-
- * editing/Editor.cpp:
- (WebCore::Editor::increaseSelectionListLevelOrdered): Changed
- stack-allocated PassRefPtr<Node> to RefPtr<Node> and call
- release() on returned object.
- (WebCore::Editor::increaseSelectionListLevelUnordered): Ditto.
-
-2009-07-06 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/7035474> Make new media controller UI default on SnowLeopard
-
- * rendering/RenderThemeMac.mm:
- (WebCore::mediaControllerTheme):
- New media controller UI is enabled by default on SnowLeopard.
-
-2009-07-06 Nate Chapin <japhet@chromium.org>
-
- Unreviewed, build fix.
-
- Roll out r45559 to fix Chromium canary.
-
- https://bugs.webkit.org/show_bug.cgi?id=26857
-
- * bindings/scripts/CodeGeneratorV8.pm:
- * bindings/v8/V8Binding.cpp: Removed.
- * bindings/v8/V8Binding.h:
- (WebCore::toInt32):
- (WebCore::toWebCoreString):
- (WebCore::fromWebCoreString):
- (WebCore::toWebCoreStringWithNullCheck):
- (WebCore::isUndefinedOrNull):
- (WebCore::v8Boolean):
- * bindings/v8/V8LazyEventListener.cpp:
- (WebCore::V8LazyEventListener::getListenerFunction):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::handleConsoleMessage):
- (WebCore::V8Proxy::compileScript):
- (WebCore::V8Proxy::sourceName):
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::handleConsoleMessage):
- * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
- (WebCore::NAMED_PROPERTY_SETTER):
- * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
- (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
- (WebCore::removeElement):
- * bindings/v8/custom/V8SQLTransactionCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::SetTimeoutOrInterval):
- * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-07-06 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Darin Adler.
-
- <rdar://problem/7008093> Media controller can’t be used to scrub when movie is
- narrow — track is too narrow
-
- Do not show media controller time display elements when the a movie is too narrow.
-
- * platform/mac/WebCoreSystemInterface.h:
- * platform/mac/WebCoreSystemInterface.mm:
- The 'state' parameter to wkDrawMediaUIPart is now an unsigned bitfield.
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement):
- Give current time and time remaining controls a common base class.
- (WebCore::MediaControlTimeDisplayElement::setVisible):
- New method, hide and show the element.
- * rendering/MediaControlElements.h:
-
- * rendering/RenderMedia.cpp:
- (WebCore::RenderMedia::RenderMedia):
- Initialize m_previousVisible.
- (WebCore::RenderMedia::layout):
- Show/hide the time display elements as the movie width changes.
- (WebCore::RenderMedia::createCurrentTimeDisplay):
- (WebCore::RenderMedia::createTimeRemainingDisplay):
- Base class is now MediaControlTimeDisplayElement, not MediaControlElement.
- (WebCore::RenderMedia::shouldShowTimeDisplayControls):
- New, decide if time display elements should be visible or not.
- * rendering/RenderMedia.h:
-
- * rendering/RenderThemeMac.mm:
- (WebCore::):
- (WebCore::RenderThemeMac::paintMediaFullscreenButton):
- (WebCore::RenderThemeMac::paintMediaMuteButton):
- (WebCore::RenderThemeMac::paintMediaPlayButton):
- (WebCore::RenderThemeMac::paintMediaSeekBackButton):
- (WebCore::RenderThemeMac::paintMediaSeekForwardButton):
- (WebCore::RenderThemeMac::paintMediaSliderTrack):
- (WebCore::RenderThemeMac::paintMediaSliderThumb):
- (WebCore::RenderThemeMac::paintMediaRewindButton):
- (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton):
- (WebCore::RenderThemeMac::paintMediaControlsBackground):
- (WebCore::RenderThemeMac::paintMediaCurrentTime):
- (WebCore::RenderThemeMac::paintMediaTimeRemaining):
- The 'state' parameter to wkDrawMediaUIPart is now an unsigned bitfield.
-
-2009-07-06 David Kilzer <ddkilzer@apple.com>
-
- Bug 27000: Minor clean up to runtime_root.{cpp|h}
-
- <https://bugs.webkit.org/show_bug.cgi?id=27000>
-
- Reviewed by Geoff Garen.
-
- * bridge/runtime_root.cpp: Added blank line between license and
- the first #include statement.
- * bridge/runtime_root.h: Added comment to #endif.
-
-2009-07-06 Roland Steiner <rolandsteiner@google.com>
-
- Reviewed by Maciej Stachowiak.
-
- generalize the special height treatment for SVG (to be re-used for ruby):
- renamed InlineBox::m_isSVG to m_hasVirtualHeight
- renamed InlineBox::isSVG() to hasVirtualHeight()
- renamed InlineBox::setIsSVG() to setHasVirtualHeight()
-
- * rendering/InlineBox.cpp:
- (WebCore::InlineBox::height):
- * rendering/InlineBox.h:
- (WebCore::InlineBox::InlineBox):
- (WebCore::InlineBox::isText):
- (WebCore::InlineBox::setIsText):
- (WebCore::InlineBox::isSVGRootInlineBox):
- (WebCore::InlineBox::hasVirtualHeight):
- (WebCore::InlineBox::setHasVirtualHeight):
- (WebCore::InlineBox::virtualHeight):
- * rendering/RenderSVGInline.cpp:
- (WebCore::RenderSVGInline::createFlowBox):
- * rendering/RenderSVGInlineText.cpp:
- (WebCore::RenderSVGInlineText::createTextBox):
- * rendering/RenderSVGText.cpp:
- (WebCore::RenderSVGText::createRootBox):
- * rendering/SVGInlineFlowBox.h:
- (WebCore::SVGInlineFlowBox::virtualHeight):
- * rendering/SVGInlineTextBox.h:
- (WebCore::SVGInlineTextBox::virtualHeight):
- * rendering/SVGRootInlineBox.h:
- (WebCore::SVGRootInlineBox::virtualHeight):
-
-2009-07-06 Alice Liu <alice.liu@apple.com>
-
- Reviewed by Darin Adler.
-
- REGRESSION(r45285): focus rings are black on windows safari
- https://bugs.webkit.org/show_bug.cgi?id=26821
- <rdar://problem/7018252>
-
- Add a mechanism for setting a custom focus ring color, and relocate the
- determination of focus ring color to base class RenderTheme.
-
- No new tests. Already-existing tests run in pixel mode would have caught this regression
-
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Move the responsibility
- of determining focus color to base class RenderTheme.
- * rendering/RenderTheme.cpp:
- (WebCore::customFocusRingColor): Added static local.
- (WebCore::RenderTheme::setCustomFocusRingColor): Added
- (WebCore::RenderTheme::focusRingColor): Use custom color over platform color.
- * rendering/RenderTheme.h:
- (WebCore::RenderTheme::platformFocusRingColor): default implementation, black color
- * rendering/RenderThemeSafari.cpp:
- (WebCore::RenderTheme::themeForPage): Circumstances that lead to returning the RenderThemeWin
- are the same under which we want to use the focus ring color from SafariTheme.
- (WebCore::RenderThemeSafari::platformFocusRingColor): Renamed from focusRingColor
- * rendering/RenderThemeSafari.h:
-
- Renaming focusRingColor to platformFocusRingColor in these files:
- * rendering/RenderThemeChromiumMac.h:
- * rendering/RenderThemeChromiumMac.mm:
- (WebCore::RenderThemeChromiumMac::platformFocusRingColor):
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::platformFocusRingColor):
- * rendering/RenderThemeChromiumSkia.h:
- * rendering/RenderThemeMac.h:
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderThemeMac::platformFocusRingColor):
-
- Cleanup leftover from removal of WebCore::Color in r45285 in these files:
- * WebCore.order:
- * platform/graphics/Color.h:
-
-2009-07-06 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by David Hyatt.
-
- Bug 15135: REGRESSION (r19843-r19850): Changing a flexbox's
- contents makes its container scroll to the top
- https://bugs.webkit.org/show_bug.cgi?id=15135
-
- Delay updateing scroll bar of descendants of flexbox until their
- positions are determined. In this way we can prevent descendants
- of flexible boxes from changing positions of their scrollbars
- using tentative positions.
-
- Test: fast/flexbox/repaint-scrollbar.html
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::startDelayUpdateScrollInfo):
- (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
- (WebCore::RenderBlock::updateScrollInfoAfterLayout):
- (WebCore::RenderBlock::layoutBlock):
- (WebCore::RenderBlock::layoutOnlyPositionedObjects):
- * rendering/RenderBlock.h:
- * rendering/RenderFlexibleBox.cpp:
- (WebCore::RenderFlexibleBox::layoutHorizontalBox):
- (WebCore::RenderFlexibleBox::layoutVerticalBox):
-
-2009-07-06 Hironori Bono <hbono@chromium.org>
-
- Reviewed by Maciej Stachowiak.
-
- Make unconfirmed IME text affect textarea's value.
- This matches input and contentEditable elements as well
- IE and Firefox.
-
- This fixes https://bugs.webkit.org/show_bug.cgi?id=25061.
-
- Input elements would go down this code path because it
- would always get a null compositionNode from frame->editor().
- Special casing compositionNodes is wrong because we explicitly
- want unconfirmed IME input in the textarea's value (assuming we
- want to match IE and Firefox here).
-
- This change is originally created by Ojan Vafai <ojan@chromium.org> and
- I just changed its manual tests with an automated test on his behalf.
-
- Test: platform/mac/editing/input/text-control-ime-input.html
+ * platform/graphics/cg/GradientCG.cpp:
+ (WebCore::Gradient::platformDestroy): Use CGGradientRelease() post-Tiger.
+ (WebCore::Gradient::platformGradient): Create and return a CGGradientRef post-Tiger.
+ (WebCore::Gradient::fill): Call new paint() method.
+ (WebCore::Gradient::paint): New convenence method that avoids testing
+ isRadial() in a bunch of other places.
- * rendering/RenderTextControl.cpp:
- (WebCore::RenderTextControl::text):
- (WebCore::RenderTextControl::textWithHardLineBreaks):
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::GraphicsContext::fillPath): Call the gradient's paint() method.
+ (WebCore::GraphicsContext::strokePath): Ditto
+ (WebCore::GraphicsContext::fillRect): Ditto
+ (WebCore::GraphicsContext::strokeRect): Ditto
-2009-07-06 Anders Carlsson <andersca@apple.com>
+2010-01-30 Simon Fraser <simon.fraser@apple.com>
Reviewed by Adele Peterson.
- Add the ability for wheel events to latch to a node.
+ Do color animations on premultiplied colors
+ https://bugs.webkit.org/show_bug.cgi?id=34383
- * WebCore.base.exp:
- * page/EventHandler.cpp:
- (WebCore::EventHandler::EventHandler):
- (WebCore::EventHandler::clear):
- (WebCore::EventHandler::handleWheelEvent):
- * page/EventHandler.h:
- * page/mac/EventHandlerMac.mm:
- (WebCore::EventHandler::wheelEvent):
- * platform/mac/WebCoreSystemInterface.h:
- * platform/mac/WebCoreSystemInterface.mm:
-
-2009-07-06 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Fix a bunch of layout test crahses in Chromium caused by a bad usage of DEFINE_STATIC_LOCAL.
-
- https://bugs.webkit.org/show_bug.cgi?id=26997
-
- * bindings/v8/V8Binding.cpp:
- (WebCore::v8ValueToWebCoreString): Use a regular static declaration instead of DEFINE_STATIC_LOCAL.
-
-2009-07-06 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: suggest global properties based on async evaluation.
-
- https://bugs.webkit.org/show_bug.cgi?id=26976
-
- Before this change, empty string was evaluated to the global object
- (or scope chain object) synchronously. This is now fixed and global
- object is evaluated using the same control flow.
-
- * inspector/front-end/Console.js:
- (WebInspector.Console.prototype.completions):
- (WebInspector.Console.prototype._evalInInspectedWindow):
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel.prototype._variablesInScope):
-
-2009-07-06 Ojan Vafai <ojan@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Fix crash when indenting in an empty table cell.
- https://bugs.webkit.org/show_bug.cgi?id=26872
+ Convert colors to premultiplied alpha before interpolating them,
+ then convert the result back to non-premultiplied. This gives better
+ results when animating from transparent colors.
- The crash is that we would call splitTreeToNode where the node
- and the nodeToSplitTo were the same node.
-
- Test: editing/execCommand/indent-empty-table-cell.html
-
- * editing/CompositeEditCommand.cpp:
- (WebCore::CompositeEditCommand::splitTreeToNode):
- Added an assert in that node and nodeToSplitTo
- are different nodes to make this assumption explicit.
-
- * editing/IndentOutdentCommand.cpp:
- (WebCore::IndentOutdentCommand::isAtUnsplittableElement):
- (WebCore::IndentOutdentCommand::indentRegion):
- * editing/IndentOutdentCommand.h:
-
-2009-07-06 Nate Chapin <japhet@chromium.org>
-
- Reviewed by David Levin.
-
- Upstream V8Binding and update some function names.
-
- https://bugs.webkit.org/show_bug.cgi?id=26857
-
- * bindings/scripts/CodeGeneratorV8.pm: Update function names in auto-generated files.
- * bindings/v8/V8Binding.cpp: Upstreamed from src.chromium.org.
- * bindings/v8/V8Binding.h: Upstreamed from src.chromium.org.
- * bindings/v8/V8LazyEventListener.cpp:
- (WebCore::V8LazyEventListener::getListenerFunction):
- * bindings/v8/V8Proxy.cpp:
- (WebCore::handleConsoleMessage):
- (WebCore::V8Proxy::compileScript):
- (WebCore::V8Proxy::sourceName):
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::handleConsoleMessage):
- * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
- (WebCore::NAMED_PROPERTY_SETTER):
- * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
- (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
- (WebCore::removeElement):
- * bindings/v8/custom/V8SQLTransactionCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::SetTimeoutOrInterval):
- * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-07-06 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Reviewed by Jan Alonzo.
-
- Use soup's content sniffing
- https://bugs.webkit.org/show_bug.cgi?id=26982
-
- Drop our hackish content sniffing code, and use the new libsoup
- feature to do that job for us.
-
- Testing this is in a cross-platform way is not obvious or possible
- while we are using platform-specific code for sniffing.
-
- * platform/network/ResourceHandleInternal.h:
- (WebCore::ResourceHandleInternal::ResourceHandleInternal):
- * platform/network/soup/ResourceHandleSoup.cpp:
- (WebCore::gotHeadersCallback):
- (WebCore::contentSniffedCallback):
- (WebCore::gotChunkCallback):
- (WebCore::ResourceHandle::startHttp):
-
-2009-07-05 Antonio Gomes <antonio.gomes@openbossa.org>
-
- Reviewed by Darin Adler.
-
- REGRESSION (r40499): fast/dom/cssTarget-crash.html fails
- https://bugs.webkit.org/show_bug.cgi?id=20342
-
- Re-added code removed by commit r40499.
- Without this, both Qt and Mac were crashing while running the test.
-
- Note that this does not entirely fix the bug. It fixes the WebCore
- crash, but the test no longer seems to work due to loader changes.
- So this patch does not reenable the test. The test probably has to
- be rewritten.
-
- * dom/ContainerNode.cpp:
- (WebCore::ContainerNode::removedFromDocument): Re-added code to
- set the CSS target of the document to 0.
-
-2009-07-05 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser.
-
- https://bugs.webkit.org/show_bug.cgi?id=26943
-
- When one transition finishes slightly before another the longer
- one will fire a second time. This is because the second
- ImplicitAnmation object is culled too early, before its final
- RenderStyle is in place. This is done by cleanupFinishedAnimations()
- so I got rid of that method completely and now cleanup each
- transition or animation at the point where I am setting the final
- style, or when I detect that the transition or animation has been
- terminated early (which happens when you remove it from the style).
-
- Test: transitions/extra-transition.html
-
- * page/animation/AnimationController.cpp:
- (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
- * page/animation/CompositeAnimation.cpp:
- (WebCore::CompositeAnimation::updateTransitions):
- (WebCore::CompositeAnimation::updateKeyframeAnimations):
- (WebCore::CompositeAnimation::animate):
- * page/animation/CompositeAnimation.h:
-
- * page/animation/AnimationBase.cpp:
- (WebCore::AnimationBase::getTimeToNextEvent):
- Avoid a divide by zero if m_animation->duration() is zero, which can happen
- if the duration is changed to zero while the animation is running.
-
-2009-07-05 Simon Fraser <simon.fraser@apple.com>
-
- Revert the previous commit because it broke the
- animations/transition-and-animation-1.html
- testcase.
-
- * page/animation/AnimationBase.cpp:
- (WebCore::AnimationBase::getTimeToNextEvent):
- * page/animation/AnimationController.cpp:
- (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
- * page/animation/CompositeAnimation.cpp:
- (WebCore::CompositeAnimation::updateTransitions):
- (WebCore::CompositeAnimation::updateKeyframeAnimations):
- (WebCore::CompositeAnimation::animate):
- (WebCore::CompositeAnimation::cleanupFinishedAnimations):
- * page/animation/CompositeAnimation.h:
-
-2009-07-05 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser.
-
- https://bugs.webkit.org/show_bug.cgi?id=26943
-
- When one transition finishes slightly before another the longer
- one will fire a second time. This is because the second
- ImplicitAnmation object is culled too early, before its final
- RenderStyle is in place. This is done by cleanupFinishedAnimations()
- so I got rid of that method completely and now cleanup each
- transition or animation at the point where I am setting the final
- style, or when I detect that the transition or animation has been
- terminated early (which happens when you remove it from the style).
-
- Test: transitions/extra-transition.html
-
- * page/animation/AnimationController.cpp:
- (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
- * page/animation/CompositeAnimation.cpp:
- (WebCore::CompositeAnimation::updateTransitions):
- (WebCore::CompositeAnimation::updateKeyframeAnimations):
- (WebCore::CompositeAnimation::animate):
- * page/animation/CompositeAnimation.h:
+ Test: transitions/color-transition-premultiplied.html
* page/animation/AnimationBase.cpp:
- (WebCore::AnimationBase::getTimeToNextEvent):
- Avoid a divide by zero if m_animation->duration() is zero, which can happen
- if the duration is changed to zero while the animation is running.
-
-2009-07-05 Lars Knoll <lars.knoll@nokia.com>
-
- Reviewed by Maciej Stachowiak.
-
- https://bugs.webkit.org/show_bug.cgi?id=26843
-
- Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.
-
- The Metrowerks compiler on the Symbian platform moves the globally
- defined Hashtables into read-only memory, despite one of the members
- being mutable. This causes crashes at run-time due to write access to
- read-only memory.
-
- Avoid the use of const with this compiler by introducing the
- JSC_CONST_HASHTABLE macro.
-
- Based on idea by Norbert Leser.
-
- * bindings/scripts/CodeGeneratorJS.pm: Use JSC_CONST_HASHTABLE for hash tables
- define in the bindings.
-
-2009-07-05 Rob Buis <rwlbuis@gmail.com>
-
- Reviewed by Maciej Stachowiak.
-
- Bug 26897 - Dynamic SVG images do not display correctly
- https://bugs.webkit.org/show_bug.cgi?id=26897
-
- Use repaint() to fix a rendering problem with a SVG image embedded in xhtml.
-
- Test: svg/custom/createImageElement2.xhtml
-
- * rendering/RenderSVGImage.cpp:
- (WebCore::RenderSVGImage::imageChanged):
-
-2009-07-05 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=26960
- [Gtk] caret offset not updated when selecting text
-
- Report the caret offset from the end of the selection so it works
- correctly for multi-char selections too (ie, anything that is not
- the zero width caret).
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (webkit_accessible_text_get_caret_offset):
-
-2009-07-05 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Unreviewed link fix for Qt.
-
- Fix Qt link error by adding two new localized strings
-
- In r45474 two new strings got added to LocalizedStrings.h add
- the definition of them to Qt.
-
- * platform/qt/Localizations.cpp:
- (WebCore::mediaElementLoadingStateText):
- (WebCore::mediaElementLiveBroadcastStateText):
-
-2009-07-03 Darin Adler <darin@apple.com>
-
- Reviewed by Adele Peterson.
-
- REGRESSION (r44670-r44680): Typing is suprisingly slow in password field on reddit.com
- https://bugs.webkit.org/show_bug.cgi?id=26959
- rdar://problem/7029882
-
- The code to handle iteration boundaries was malfunctioning when the boundary was
- at the edge of a shadow tree. This happens all the time with <input> elements.
-
- It's not immediately obvious how to make a regression test for this since the
- symptom was a performance problem, not incorrect behavior. I'll add a test if I
- figure out a way to make one.
-
- * editing/TextIterator.cpp:
- (WebCore::parentCrossingShadowBoundaries): Renamed from parentOrShadowParent.
- (WebCore::depthCrossingShadowBoundaries): Updated for name change.
- (WebCore::nextInPreOrderCrossingShadowBoundaries): Added.
- (WebCore::previousInPostOrderCrossingShadowBoundaries): Added.
- (WebCore::setUpFullyClippedStack): Updated for name change.
- (WebCore::TextIterator::TextIterator): Updated for name change. Use
- nextInPreOrderCrossingShadowBoundaries instead of Range::pastLastNode to fix the bug.
- (WebCore::TextIterator::advance): Updated for name change.
- (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
- Tweaked formatting.
- (WebCore::SimplifiedBackwardsTextIterator::advance): Ditto. Changed code that
- initializes m_pastStartNode to use previousInPostOrderCrossingShadowBoundaries.
- (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode): Tweaked formatting.
- (WebCore::SimplifiedBackwardsTextIterator::exitNode): Ditto.
-
-2009-07-03 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Sam Weinig.
-
- Background audio stops playing when JS GC runs
- https://bugs.webkit.org/show_bug.cgi?id=26956
-
- Ensure we keep the Audio object around while it is playing, so that it
- doesn't get collected.
-
- Not testable because there's no way to know whether the audio keeps
- playing without holding a reference to it.
-
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::isObservableThroughDOM):
-
-2009-07-02 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=26814
- [Gtk] Caret-moved events are not issued for the correct offset
- when text is selected forward
-
- Report the caret offset from the end of the selection, otherwise
- we'll report the same offset when moving the caret while
- modififying the selection (eg, with Shift Right).
-
- * editing/gtk/SelectionControllerGtk.cpp:
- (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
-
-2009-07-02 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=26815
- [Gtk] text-selection-changed events are not issued for the correct
- object when the selection spans multiple objects
-
- Get the focused node from the end of the selection, not the start,
- so we can detect when we cross object boundaries.
-
- * editing/gtk/SelectionControllerGtk.cpp:
- (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
-
-2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Simon Fraser.
-
- https://bugs.webkit.org/show_bug.cgi?id=26947
-
- Fix the media controls hit tests. They may lose click events.
-
- Test cases already covered in the video-controls-zoomed tests.
-
- Don't trust wkHitTestMediaUIPart for the tests. We are accurate enough.
-
- * rendering/RenderThemeMac.h: Remove hitTestMediaControlPart.
- * rendering/RenderThemeMac.mm: Remove hitTestMediaControlPart.
-
-2009-07-02 Roland Steiner <rolandsteiner@google.com>
-
- Reviewed by Eric Seidel.
-
- RenderBlock and RenderInline have confusingly named object creation methods:
- RenderBlock::createRootBox/createRootInlineBox
- RenderInline::createFlowBox/createInlineFlowBox
- where the 2nd method in both cases just calls the first and then appends the created object.
- I therefore renamed those methods to something IMHO more informative:
-
- createRootBox() -> createRootInlineBox()
- createRootInlineBox() -> createAndAppendRootInlineBox();
- createFlowBox() -> createInlineFlowBox();
- createInlineFlowBox() -> createAndAppendInlineFlowBox();
-
- https://bugs.webkit.org/show_bug.cgi?id=26828
-
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::createRootInlineBox):
- (WebCore::RenderBlock::createAndAppendRootInlineBox):
- * rendering/RenderBlock.h:
- * rendering/RenderInline.cpp:
- (WebCore::RenderInline::createInlineFlowBox):
- (WebCore::RenderInline::createAndAppendInlineFlowBox):
- * rendering/RenderInline.h:
- * rendering/RenderSVGInline.cpp:
- (WebCore::RenderSVGInline::createInlineFlowBox):
- * rendering/RenderSVGInline.h:
- * rendering/RenderSVGText.cpp:
- (WebCore::RenderSVGText::createRootInlineBox):
- * rendering/RenderSVGText.h:
- * rendering/bidi.cpp:
- (WebCore::createInlineBoxForRenderer):
-
-2009-07-02 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Fix typo in the resource panel enabler caption.
-
- https://bugs.webkit.org/show_bug.cgi?id=26753
-
- * English.lproj/localizedStrings.js:
- * inspector/front-end/ResourcesPanel.js:
- (WebInspector.ResourcesPanel):
-
-2009-07-02 Erik Arvidsson <arv@chromium.org>
-
- Reviewed by Adam Roben.
-
- [Win] HTML5 Drag and drop, dragend is not fired when pressing Esc
- https://bugs.webkit.org/show_bug.cgi?id=26699
-
- * manual-tests/drag-escape.html: Added.
- * page/EventHandler.cpp:
- (WebCore::EventHandler::dragSourceEndedAt):
-
-2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Simon Fraser.
-
- https://bugs.webkit.org/show_bug.cgi?id=26944
-
- Make sure we support full page zoom in video controls.
-
- This is tracked by a the video-controls-zoom test case.
-
- * css/mediaControlsQT.css: Make sure we don't have any inherited margin.
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlElement::updateStyle): Propagate the style to the innertext.
- * rendering/RenderThemeMac.mm: Adjust the painting rect.
- (WebCore::getUnzoomedRectAndAdjustCurrentContext):
- (WebCore::RenderThemeMac::paintMediaSliderTrack):
- (WebCore::RenderThemeMac::paintMediaCurrentTime):
- (WebCore::RenderThemeMac::paintMediaTimeRemaining):
-
-2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Fix the Gtk build after r45474. The localized strings should
- have been added there.
-
- * platform/gtk/LocalizedStringsGtk.cpp:
- (WebCore::mediaElementLoadingStateText):
- (WebCore::mediaElementLiveBroadcastStateText):
-
-2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Simon Fraser.
-
- https://bugs.webkit.org/show_bug.cgi?id=26939
-
- Media controller is rendered badly at http://www.mozilla.com/en-US/firefox/video/firefox-3.5.html
-
- We fix two things:
- - We use px instead of em, because px is used everywhere else
- and because 0.09em hit the font size limit.
- - We use -webkit-box instead of inline-block because in strict mode
- inline-block has a different behavior.
-
- Test: media/controls-strict.html
-
- * css/mediaControlsQT.css:
-
-2009-07-02 David Hyatt <hyatt@apple.com>
-
- Reviewed by Dan Bernstein.
-
- TextIterator should use hasOverflowClip when checking for overflow instead of looking at the style.
- https://bugs.webkit.org/show_bug.cgi?id=26942
-
- * editing/TextIterator.cpp:
- (WebCore::fullyClipsContents):
-
-2009-07-02 Sam Weinig <sam@webkit.org>
-
- Reviewed by Dave Hyatt.
-
- Fix for <rdar://problem/5230700>
- Remove local .xhtml file workaround
-
- * platform/network/mac/ResourceResponseMac.mm:
- (WebCore::ResourceResponse::platformLazyInit): Work around is no longer necessary.
-
-2009-07-02 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Sort, add functions used by WebKit.
-
- * WebCore.base.exp:
-
-2009-07-02 Brady Eidson <beidson@apple.com>
-
- Rubberstamped by Sam Weinig.
-
- More of <rdar://problem/6969425> Safari 4.0 doesn't recognize text/plain files if their extension is unknown.
-
- * platform/network/mac/WebCoreURLResponse.mm:
- (webNSURLResponseMIMEType): Give Tiger a chance to query the UTI machinery.
-
-2009-07-02 Adam Langley <agl@google.com>
-
- Reviewed by Eric Seidel.
-
- Chromium Linux: fix complex text rendering with line break characters.
-
- https://bugs.webkit.org/show_bug.cgi?id=26935
-
- If the CSS white-space property is inhibiting line breaking, we might
- find end-of-line characters rendered via the complex text path. Fonts
- don't provide glyphs for these code points so, if we find one, we
- simulate the space glyph being interposed in this case. Because the
- input is variable-length per code point, we walk the input in step
- with the output.
-
- Covered by:
- LayoutTests/fast/text/international/bidi-linebreak-002.html
- LayoutTests/fast/text/international/bidi-linebreak-003.html
- LayoutTests/fast/text/international/hindi-whitespace.html
-
- * platform/graphics/chromium/HarfbuzzSkia.cpp:
- (WebCore::stringToGlyphs):
-
-2009-07-02 Victor Wang <victorw@chromium.org>
-
- Reviewed by Darin Fisher.
-
- https://bugs.webkit.org/show_bug.cgi?id=26521
- Expose file size to chromium.
-
- Implement getFileSize() for Chromium.
-
- * platform/chromium/ChromiumBridge.h:
- * platform/chromium/FileSystemChromium.cpp:
- (WebCore::getFileSize):
-
-2009-07-02 Nate Chapin <japhet@chromium.org>
-
- Unreviewed, build fix.
-
- * bindings/v8/V8SVGPODTypeWrapper.h: Lost a space in nested template argument list.
-
-2009-07-02 Simon Fraser <simon.fraser@apple.com>
-
- Build fix: add missing #include.
-
- * platform/mac/ThemeMac.mm:
-
-2009-07-02 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt.
-
- <rdar://problem/7028682> ThemeMac::paintRadio() throws Obj-C exceptions when zoomed
-
- Add BEGIN_BLOCK_OBJC_EXCEPTIONS/END_BLOCK_OBJC_EXCEPTIONS guards around code
- that can possibly throw Objective-C exceptions when drawing Mac form controls.
-
- * platform/mac/ThemeMac.mm:
- (WebCore::paintCheckbox):
- (WebCore::paintRadio):
- (WebCore::paintButton):
- (WebCore::ThemeMac::inflateControlPaintRect):
-
-2009-07-02 Nate Chapin <japhet@chromium.org>
-
- Reviewed by David Levin.
-
- Upstream V8SVGPODTypeWrapper.
-
- https://bugs.webkit.org/show_bug.cgi?id=26907
-
- * bindings/scripts/CodeGeneratorV8.pm: Update function being renamed in V8SVGPODTypeWrapper.h.
- * bindings/v8/V8SVGPODTypeWrapper.h: Upstreamed from src.chromium.org.
-
-2009-07-02 Dumitru Daniliuc <dumi@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Adds an abstraction layer between the DB classes and the file
- system, which allows us to add our own logic for storing, opening,
- deleting, etc. databases.
-
- The patch was tested using the tests in WebCore/storage.
-
- https://bugs.webkit.org/show_bug.cgi?id=26054
-
- * GNUmakefile.am:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * platform/sql/SQLiteDatabase.cpp:
- (WebCore::SQLiteDatabase::open): Delegating the job of opening DB files to SQLiteFileSystem to allow use of custom VFSs.
- * platform/sql/SQLiteFileSystem.cpp: Added.
- * platform/sql/SQLiteFileSystem.h: Added.
- * platform/win/FileSystemWin.cpp:
- (WebCore::directoryName): Implemented.
- * storage/Database.cpp:
- (WebCore::Database::databaseSize): The code that returns the size of a DB file moved to SQLiteFileSystem.
- * storage/DatabaseTracker.cpp:
- (WebCore::DatabaseTracker::DatabaseTracker): Added the ability to register a custom SQLite VFS.
- (WebCore::DatabaseTracker::trackerDatabasePath): DB file-related operations moved to SQLiteFileSystem.
- (WebCore::DatabaseTracker::openTrackerDatabase): DB file-related operations moved to SQLiteFileSystem.
- (WebCore::DatabaseTracker::originPath): DB file-related operations moved to SQLiteFileSystem.
- (WebCore::DatabaseTracker::fullPathForDatabase): DB file-related operations moved to SQLiteFileSystem.
- (WebCore::DatabaseTracker::usageForDatabase): DB file-related operations moved to SQLiteFileSystem.
- (WebCore::DatabaseTracker::deleteOrigin): DB file-related operations moved to SQLiteFileSystem.
- (WebCore::DatabaseTracker::deleteDatabaseFile): DB file-related operations moved to SQLiteFileSystem.
- * storage/OriginUsageRecord.cpp:
- (WebCore::OriginUsageRecord::diskUsage): DB file-related operations moved to SQLiteFileSystem.
-
-2009-07-02 David Hyatt <hyatt@apple.com>
-
- Reviewed by Simon Fraser.
-
- Always clip replaced elements to border radii.
- https://bugs.webkit.org/show_bug.cgi?id=26933
-
- Make sure to always clip replaced elements to border radii, even when overflow is visible.
- Stop defaulting those elements to overflow:hidden in the UA sheet, since it is now no longer
- necessary.
-
- Covered by existing tests (since the UA default changing keeps the behavior exactly the same).
-
- * css/html.css:
- * rendering/RenderReplaced.cpp:
- (WebCore::RenderReplaced::paint):
- * rendering/RenderWidget.cpp:
- (WebCore::RenderWidget::paint):
-
-2009-07-02 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Simon Fraser.
-
- convertFromScrollbarToContainingView and friends should be in ScrollView
- https://bugs.webkit.org/show_bug.cgi?id=26929
-
- This is breaking Chromium's build because PopupMenuChromium inherits
- from ScrollView, but these functions are pure virtual in it. I could
- put it directly in PopupMenuChromium, but that seems a bit silly since
- the functions are fairly generic.
-
- Passes existing layout tests.
-
- * page/FrameView.cpp: Remove the 4 functions Hyatt just added
- (IntRect WebCore::FrameView::convertFromScrollbarToContainingView):
- (IntRect WebCore::FrameView::convertFromContainingViewToScrollBar):
- (IntPoint WebCore::FrameView::convertFromScrollbarToContainingView):
- (IntPoint WebCore::FrameView::convertFromContainingViewToScrollBar):
- * page/FrameView.h: ditto
- * platform/ScrollView.cpp: Move the 4 functions from FrameView here
- (IntRect WebCore::ScrollView::convertFromScrollbarToContainingView):
- (IntRect WebCore::ScrollView::convertFromContainingViewToScrollBar):
- (IntPoint WebCore::ScrollView::convertFromScrollbarToContainingView):
- (IntPoint WebCore::ScrollView::convertFromContainingViewToScrollBar):
- * platform/ScrollView.h: ditto
-
-2009-07-02 Dirk Pranke <dpranke@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Fix https://bugs.webkit.org/show_bug.cgi?id=26088 - TransparencyWin
- doesn't handle errors well at all; revise it to fail silently
- (drawing nothing), and bulletproof FontChromiumWin to handle the
- failure accordingly.
-
- Tests: fast/text/text-large-negative-letter-spacing-with-opacity.html
- fast/text/text-letter-spacing.html
-
- * platform/graphics/chromium/FontChromiumWin.cpp:
- (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
- (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
- (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter):
- (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter):
- (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
- (WebCore::Font::drawGlyphs):
- (WebCore::Font::drawComplexText):
- * platform/graphics/chromium/TransparencyWin.cpp:
- (WebCore::TransparencyWin::TransparencyWin):
- (WebCore::TransparencyWin::setupLayerForNoLayer):
- (WebCore::TransparencyWin::setupLayerForOpaqueCompositeLayer):
- (WebCore::TransparencyWin::setupLayerForWhiteLayer):
- (WebCore::TransparencyWin::setupTransformForKeepTransform):
- (WebCore::TransparencyWin::setupTransformForScaleTransform):
- (WebCore::TransparencyWin::initializeNewContext):
- (WebCore::TransparencyWin::compositeOpaqueComposite):
- (WebCore::TransparencyWin::compositeTextComposite):
- (WebCore::TransparencyWin::makeLayerOpaque):
- * platform/graphics/chromium/TransparencyWin.h:
- (WebCore::TransparencyWin::platformContext):
-
-2009-07-02 Eric Carlson <eric.carlson@apple.com>
-
- Change #import to #include to fix non-ObjC builds.
-
- * rendering/MediaControlElements.cpp:
-
-2009-07-02 Anders Carlsson <andersca@apple.com>
-
- Build fix.
-
- * platform/network/mac/WebCoreURLResponse.mm:
- (mimeTypeFromUTITree):
-
-2009-07-02 David Hyatt <hyatt@apple.com>
-
- Reviewed by Simon Fraser.
-
- Fix for bug 22119, clicks in the scrollbars of transformed content don't work. Add new
- conversion methods for going across parent/child widget boundaries that can be implemented
- by the FrameView and ScrollbarClient to be transform-aware.
-
- Test cases added in platform/mac/fast/forms and platform/mac/fast/overflow.
-
- * WebCore.base.exp:
- * page/EventHandler.cpp:
- (WebCore::EventHandler::handleMouseMoveEvent):
- * page/FrameView.cpp:
- (WebCore::FrameView::convertFromScrollbarToContainingView):
- (WebCore::FrameView::convertFromContainingViewToScrollbar):
- (WebCore::FrameView::convertFromRenderer):
- (WebCore::FrameView::convertToRenderer):
- (WebCore::FrameView::convertToContainingView):
- (WebCore::FrameView::convertFromContainingView):
- * page/FrameView.h:
- * platform/ScrollView.h:
- * platform/Scrollbar.cpp:
- (WebCore::Scrollbar::convertToContainingView):
- (WebCore::Scrollbar::convertFromContainingView):
- * platform/Scrollbar.h:
- * platform/ScrollbarClient.h:
- (WebCore::ScrollbarClient::convertFromScrollbarToContainingView):
- (WebCore::ScrollbarClient::convertFromContainingViewToScrollbar):
- * platform/Widget.cpp:
- (WebCore::Widget::convertFromContainingWindow):
- (WebCore::Widget::convertToContainingWindow):
- (WebCore::Widget::convertFromRootToContainingWindow):
- (WebCore::Widget::convertFromContainingWindowToRoot):
- (WebCore::Widget::convertToContainingView):
- (WebCore::Widget::convertFromContainingView):
- * platform/Widget.h:
- * platform/graphics/IntPoint.h:
- (WebCore::IntPoint::move):
- * platform/mac/WidgetMac.mm:
- (WebCore::Widget::convertFromRootToContainingWindow):
- (WebCore::Widget::convertFromContainingWindowToRoot):
- * rendering/RenderBlock.cpp:
- (WebCore::RenderBlock::isPointInOverflowControl):
- * rendering/RenderDataGrid.cpp:
- (WebCore::RenderDataGrid::convertFromScrollbarToContainingView):
- (WebCore::RenderDataGrid::convertFromContainingViewToScrollbar):
- * rendering/RenderDataGrid.h:
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::convertFromScrollbarToContainingView):
- (WebCore::RenderLayer::convertFromContainingViewToScrollbar):
- (WebCore::RenderLayer::scrollbarOffset):
- (WebCore::RenderLayer::hitTestOverflowControls):
- * rendering/RenderLayer.h:
- * rendering/RenderListBox.cpp:
- (WebCore::RenderListBox::isPointInOverflowControl):
- (WebCore::RenderListBox::convertFromScrollbarToContainingView):
- (WebCore::RenderListBox::convertFromContainingViewToScrollbar):
- * rendering/RenderListBox.h:
-
-2009-07-02 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Dave Hyatt and Simon Fraser.
-
- - fix <rdar://problem/6933052> SPOD playing video in a div with a box
- shadow
-
- Test: fast/box-shadow/transform-fringing.html
-
- * rendering/RenderBoxModelObject.cpp:
- (WebCore::RenderBoxModelObject::paintBoxShadow): Clip out the
- box even if it has an opaque background, but in that case, inset the
- clip path by 1 pixel, to avoid antialiasing artifacts.
- Do not inset the clip rect by 1 pixel if the CTM is purely a
- translation.
- Move the shadow-casting path away in the non-rounded-rect case (it
- was already being done in the rounded-rect case), to avoid a black
- fringe when the CTM is not purely a translation.
-
-2009-07-02 Brady Eidson <beidson@apple.com>
-
- Reviewed by Sam Weinig.
-
- <rdar://problem/6969425> Safari 4.0 doesn't recognize text/plain files if their extension is unknown.
-
- Walk the CoreTypes UTI tree for extensions with unknown MIME types, using the first MIME type found.
-
- For many types of text files (such as source code files) this ends up being text/plain.
-
- * platform/network/mac/ResourceHandleMac.mm:
- (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Tweak the logging output.
-
- * platform/network/mac/WebCoreURLResponse.h:
- * platform/network/mac/WebCoreURLResponse.mm:
- (mimeTypeFromUTITree):
- (webNSURLResponseMIMEType): Use mimeTypeFromUTITree() to find a UTI-based MIME type for this file's extension.
- (-[NSURLResponse _webcore_reportedMIMEType]): Return the actual MIME type that CFNetwork gave us.
-
-2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/6518119>
-
- Add a rewind button and hide the timeline for live broadcasts when
- in MediaUI mode.
-
- * css/CSSPrimitiveValueMappings.h:
- (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add the new pseudo element.
-
- * css/CSSSelector.cpp:
- (WebCore::CSSSelector::extractPseudoType): Ditto.
- * css/CSSSelector.h:
-
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
-
- * css/CSSValueKeywords.in: Ditto.
- * css/mediaControls.css: Ditto.
- * css/mediaControlsQT.css: Ditto.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::rewind): New.
- (WebCore::HTMLMediaElement::returnToRealTime): New.
- (WebCore::HTMLMediaElement::isStreaming): New.
- * html/HTMLMediaElement.h:
-
- * page/mac/WebCoreViewFactory.h: Declare mediaElementLoadingStateText and mediaElementLiveBroadcastStateText.
-
- * platform/LocalizedStrings.h: Add localized media state messages.
-
- * platform/ThemeTypes.h: Add the new pseudo element.
-
- * platform/mac/LocalizedStringsMac.mm:
- (WebCore::mediaElementLoadingStateText): Add localized media state.
- (WebCore::mediaElementLiveBroadcastStateText): Ditto.
-
- * platform/mac/WebCoreSystemInterface.h: Change BOOL param wkDrawMediaUIPart to an int to support
- multiple states.
- * platform/mac/WebCoreSystemInterface.mm: Ditto.
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlElement::MediaControlElement): Deal with new elements.
- (WebCore::MediaControlElement::attachToParent): Ditto.
- (WebCore::MediaControlElement::update): Ditto.
- (WebCore::MediaControlElement::updateStyle): Ditto.
- (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement): Ditto.
- (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded): Ditto.
- (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement): Ditto.
- (WebCore::MediaControlStatusDisplayElement::update): Ditto.
- (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded): Ditto.
- (WebCore::MediaControlInputElement::MediaControlInputElement): Ditto.
- (WebCore::MediaControlInputElement::attachToParent): Ditto.
- (WebCore::MediaControlInputElement::updateStyle): Ditto.
- (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Ditto.
- (WebCore::MediaControlRewindButtonElement::defaultEventHandler): Ditto.
- (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Ditto.
- (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): Ditto.
- (WebCore::MediaControlReturnToRealtimeButtonElement::rendererIsNeeded): Ditto.
- (WebCore::MediaControlTimelineElement::defaultEventHandler): Ditto.
- (WebCore::MediaControlTimelineElement::update): Ditto.
- (WebCore::MediaControlFullscreenButtonElement::rendererIsNeeded): Ditto.
- * rendering/MediaControlElements.h: Ditto.
-
- * rendering/RenderMedia.cpp:
- (WebCore::RenderMedia::styleDidChange): Deal with the new elements.
- (WebCore::RenderMedia::createPanel): Ditto.
- (WebCore::RenderMedia::createRewindButton): Ditto.
- (WebCore::RenderMedia::createReturnToRealtimeButton): Ditto.
- (WebCore::RenderMedia::createStatusDisplay): Ditto.
- (WebCore::RenderMedia::createTimelineContainer): Ditto.
- (WebCore::RenderMedia::createCurrentTimeDisplay): Ditto.
- (WebCore::RenderMedia::createTimeRemainingDisplay): Ditto.
- (WebCore::RenderMedia::updateControls): Ditto.
- (WebCore::RenderMedia::forwardEvent): Ditto.
- * rendering/RenderMedia.h:
-
- * rendering/RenderTheme.cpp:
- (WebCore::RenderTheme::paint): Deal with the new elements.
-
- * rendering/RenderTheme.h:
- (WebCore::RenderTheme::paintMediaRewindButton): Deal with the new elements.
- (WebCore::RenderTheme::paintMediaReturnToRealtimeButton): Ditto.
- (WebCore::RenderTheme::paintMediaControlsBackground): Ditto.
-
- * rendering/RenderThemeMac.h:
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderThemeMac::paintMediaRewindButton): Deal with the new elements.
- (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): Ditto.
- (WebCore::RenderThemeMac::paintMediaControlsBackground): Ditto.
-
- * rendering/style/RenderStyleConstants.h: Add constants for the new elements.
-
-2009-07-01 John Abd-El-Malek <jam@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Small refactoring of MessagePortChannel so that PlatformMessagePortChannel
- may be defined at the WebKit layer.
-
- https://bugs.webkit.org/show_bug.cgi?id=26905
-
- * dom/MessageChannel.cpp:
- (WebCore::MessageChannel::MessageChannel):
- * dom/MessagePortChannel.cpp:
- * dom/MessagePortChannel.h:
- * dom/default/PlatformMessagePortChannel.cpp:
- (WebCore::MessagePortChannel::createChannel):
- (WebCore::MessagePortChannel::create):
- (WebCore::MessagePortChannel::MessagePortChannel):
- (WebCore::MessagePortChannel::~MessagePortChannel):
-
-2009-07-01 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- <video> fails to show on http://camendesign.com/code/video_for_everybody
- <rdar://problem/7026010>
- https://bugs.webkit.org/show_bug.cgi?id=26919
-
- Fix an issue introduced in r44961. In that revision we changed to only update
- compositing layer geometry when all siblings had been laid out (i.e. we pushed
- the updates one level down). However, that left out the root layer, so this
- fix ensures that the root layer geometry gets updated at the end.
-
- Test: compositing/geometry/root-layer-update.html
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::updateAfterLayout):
-
-2009-07-01 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein
-
- <rdar://problem/7026010> <video> fails to show on http://camendesign.com/code/video_for_everybody
-
- First part of fix: when outline width changes, don't to a synchronous
- layer update right away, but just set the flag to say that compositing
- layers need updating. The synchronous layer update left the layer geometries
- out of whack when it happened in the middle of layout (e.g. when inside ::first-letter).
-
- Test: compositing/geometry/outline-change.html
-
- * rendering/RenderView.cpp:
- (WebCore::RenderView::setMaximalOutlineSize):
-
-2009-07-01 Kwang Yul Seo <skyul@company100.net>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26842
- Build fix when ENABLE_DATABASE is off
-
- Move Database.h into ENABLE(DATABASE) guard so toggling ENABLE_DATABASE
- off does not break builds.
-
- * bindings/js/ScriptObjectQuarantine.cpp:
-
-2009-07-01 Daniel Bates <dbates@intudata.com>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=26899
-
- Modified XSSAuditor::decodeURL to only remove null characters so that
- it is consistent with the behavior of HTMLTokenizer and prevents
- injected scripts that contain control characters.
-
- Tests: http/tests/security/xssAuditor/script-tag-control-char.html
- http/tests/security/xssAuditor/script-tag-null-char.html
-
- * page/XSSAuditor.cpp:
- (WebCore::XSSAuditor::decodeURL): Modified to only remove null characters.
- * page/XSSAuditor.h: Reverted naming of third argument of method XSSAuditor::decodeURL
- from allowControlCharacters back to allowNullCharacters.
- * platform/network/ResourceResponseBase.cpp: Reverted back to rev #45003.
- (WebCore::isControlCharacter):
- * platform/network/ResourceResponseBase.h: Reverted back to rev #45003.
-
-2009-07-01 Yury Semikhatsky <yurys@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- - supported keyboard shortcuts compatible with Firebug in Scripts Debugger:
- F5, Ctrl+/ (win,lin), Command+/ (mac) - continue
- F10, Ctrl+' (win, lin), Command+' (mac) - step over
- F11, Ctrl+; (win, lin), Command+; (mac) - step into
- Shift+F11, Ctrl+Shift+; (win, lin), Command+Shift+; (mac) - step out
-
- - added call stack navigation shortcuts:
- Ctrl+. - next call frame
- Ctrl+, - previouse call frame
-
- https://bugs.webkit.org/show_bug.cgi?id=23849
-
- * inspector/front-end/CallStackSidebarPane.js:
- (WebInspector.CallStackSidebarPane):
- (WebInspector.CallStackSidebarPane.prototype.handleKeyEvent):
- (WebInspector.CallStackSidebarPane.prototype._selectNextCallFrameOnStack):
- (WebInspector.CallStackSidebarPane.prototype._selectPreviousCallFrameOnStack):
- (WebInspector.CallStackSidebarPane.prototype._selectedPlacardByIndex):
- (WebInspector.CallStackSidebarPane.prototype._selectedCallFrameIndex):
- * inspector/front-end/KeyboardShortcut.js: Added.
- (WebInspector.KeyboardShortcut):
- (WebInspector.KeyboardShortcut.makeKey):
- (WebInspector.KeyboardShortcut.makeKeyFromEvent):
- (WebInspector.KeyboardShortcut.makeKeyFromCodeAndModifiers_):
- * inspector/front-end/ScriptsPanel.js:
- (WebInspector.ScriptsPanel):
- (WebInspector.ScriptsPanel.prototype.handleKeyEvent):
- * inspector/front-end/WebKit.qrc:
- * inspector/front-end/inspector.html:
-
-2009-07-01 Daniel Erat <derat@google.com>
-
- Reviewed by David Levin.
-
- Chromium Linux: Move the scrollbar thumb on middle-click.
-
- https://bugs.webkit.org/show_bug.cgi?id=26910
- http://code.google.com/p/chromium/issues/detail?id=11976
-
- Tested by building Chrome and checking that the scrollbar moves as expected.
-
- * platform/chromium/ScrollbarThemeChromium.cpp:
- * platform/chromium/ScrollbarThemeChromium.h:
- * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
- * platform/chromium/ScrollbarThemeChromiumLinux.h:
- * platform/chromium/ScrollbarThemeChromiumWin.cpp:
- * platform/chromium/ScrollbarThemeChromiumWin.h:
-
-2009-07-01 Brady Eidson <beidson@apple.com>
-
- Reviewed by Sam Weinig.
-
- Add a preference/setting to toggle whether content sniffing is enabled for file URLs.
-
- * WebCore.base.exp:
-
- * page/Settings.cpp:
- (WebCore::Settings::setLocalFileContentSniffingEnabled):
- * page/Settings.h:
- (WebCore::Settings::localFileContentSniffingEnabled):
-
- * platform/network/mac/ResourceHandleMac.mm:
- (WebCore::ResourceHandle::start):
- (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
-
-2009-07-01 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Bug 26909: aria-label needs to be supported
- https://bugs.webkit.org/show_bug.cgi?id=26909
-
- Test: accessibility/aria-label.html
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::accessibilityDescription):
- * html/HTMLAttributeNames.in:
-
-2009-07-01 David Hyatt <hyatt@apple.com>
-
- Reviewed by Oliver Hunt.
-
- More datagrid columns work. Make sure columns cache both a style for the column header as well
- as a style for the column background (behind the cells).
-
- Hook up to CSSStyleSelector methods for obtaining the pseudo styles for columns (stubbed out and
- unimplemented).
-
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::pseudoStyleForDataGridColumn):
- (WebCore::CSSStyleSelector::pseudoStyleForDataGridColumnHeader):
- * css/CSSStyleSelector.h:
- * html/DataGridColumn.h:
- (WebCore::DataGridColumn::setColumnList):
- (WebCore::DataGridColumn::columnStyle):
- (WebCore::DataGridColumn::setColumnStyle):
- (WebCore::DataGridColumn::headerStyle):
- (WebCore::DataGridColumn::setHeaderStyle):
- * rendering/RenderDataGrid.cpp:
- (WebCore::RenderDataGrid::recalcStyleForColumn):
- (WebCore::RenderDataGrid::columnStyle):
- (WebCore::RenderDataGrid::headerStyle):
- (WebCore::RenderDataGrid::paintColumnHeaders):
- * rendering/RenderDataGrid.h:
-
-2009-07-01 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Oliver Hunt.
-
- <rdar://problem/7009870> After <audio> movie finishes playing, Pause button fails to change
- back to Play button
-
- Grab onto the current time when QTKit "ended" notification fires and use it as
- duration from that point on as QuickTime sometimes refuses to play all the way to
- the time it reports for duration and buffered. HTMLMediaElement assumes that there
- more to play in this situation and tries to restart playback, endlessly.
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
- Rename m_duration to m_reportedDuration. Declare m_cachedDuration.
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
- Rename m_duration to m_reportedDuration. Initialize m_cachedDuration.
- (WebCore::MediaPlayerPrivate::duration):
- Return m_cachedDuration once it has been set.
- (WebCore::MediaPlayerPrivate::updateStates):
- Rename m_duration to m_reportedDuration.
- (WebCore::MediaPlayerPrivate::didEnd):
- Set m_cachedDuration to currentTime().
-
-2009-07-01 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Beth Dakin.
-
- Bug 26900: AX: Manual spell check with Command-; does not bring up suggestions
- https://bugs.webkit.org/show_bug.cgi?id=26900
-
- Editable web areas should have a clickpoint that uses where the selection is.
-
- Test: accessibility/editable-webarea-context-menu-point.html
-
- * accessibility/AccessibilityObject.h:
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::clickPoint):
- * accessibility/AccessibilityRenderObject.h:
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
-
-2009-07-01 David Levin <levin@chromium.org>
-
- Reviewed by Eric Seidel.
-
- Remove unused code in SVGTransformList and SVGTransformDistance
- <https://bugs.webkit.org/show_bug.cgi?id=26891>
-
- * svg/SVGTransformDistance.cpp:
- (WebCore::SVGTransformDistance::SVGTransformDistance):
- * svg/SVGTransformList.cpp:
- * svg/SVGTransformList.h:
-
-2009-07-01 David Hyatt <hyatt@apple.com>
-
- Reviewed by Anders Carlsson.
-
- Begin stubbing out functions for layout, painting and style/geometry caching on columns. Not enough
- is implemented for this to do much of anything yet, but it should help keep patch sizes down. :)
-
- * html/DataGridColumn.cpp:
- (WebCore::DataGridColumn::columnChanged):
- * html/DataGridColumn.h:
- (WebCore::DataGridColumn::setId):
- (WebCore::DataGridColumn::setLabel):
- (WebCore::DataGridColumn::setType):
- (WebCore::DataGridColumn::setSortable):
- (WebCore::DataGridColumn::setSortDirection):
- (WebCore::DataGridColumn::setColumnList):
- (WebCore::DataGridColumn::style):
- (WebCore::DataGridColumn::setStyle):
- (WebCore::DataGridColumn::rect):
- (WebCore::DataGridColumn::setRect):
- * html/DataGridColumnList.cpp:
- (WebCore::DataGridColumnList::DataGridColumnList):
- (WebCore::DataGridColumnList::setDataGridNeedsLayout):
- (WebCore::DataGridColumnList::add):
- (WebCore::DataGridColumnList::remove):
- (WebCore::DataGridColumnList::move):
- (WebCore::DataGridColumnList::clear):
- (WebCore::DataGridColumnList::primaryColumnChanged):
- * html/DataGridColumnList.h:
- (WebCore::DataGridColumnList::create):
- (WebCore::DataGridColumnList::dataGrid):
- (WebCore::DataGridColumnList::clearDataGrid):
- * html/HTMLDataGridColElement.cpp:
- (WebCore::HTMLDataGridColElement::HTMLDataGridColElement):
- (WebCore::HTMLDataGridColElement::findDataGridAncestor):
- (WebCore::HTMLDataGridColElement::insertedIntoTree):
- (WebCore::HTMLDataGridColElement::removedFromTree):
- * html/HTMLDataGridColElement.h:
- (WebCore::HTMLDataGridColElement::dataGrid):
- * html/HTMLDataGridElement.cpp:
- (WebCore::HTMLDataGridElement::HTMLDataGridElement):
- (WebCore::HTMLDataGridElement::~HTMLDataGridElement):
- * rendering/RenderDataGrid.cpp:
- (WebCore::RenderDataGrid::styleDidChange):
- (WebCore::RenderDataGrid::recalcStyleForColumns):
- (WebCore::RenderDataGrid::recalcStyleForColumn):
- (WebCore::RenderDataGrid::styleForColumn):
- (WebCore::RenderDataGrid::layout):
- (WebCore::RenderDataGrid::layoutColumns):
- (WebCore::RenderDataGrid::paintColumnHeaders):
- (WebCore::RenderDataGrid::paintColumnHeader):
- * rendering/RenderDataGrid.h:
- (WebCore::RenderDataGrid::renderName):
- (WebCore::RenderDataGrid::canHaveChildren):
-
-2009-07-01 Daniel Bates <dbates@intudata.com>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=26807
-
- Fixes this address by checking whether frame->document()->decoder() is null.
-
- * page/XSSAuditor.cpp:
- (WebCore::XSSAuditor::findInRequest):
-
-2009-07-01 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by George Staikos.
-
- Fixes: https://bugs.webkit.org/show_bug.cgi?id=26885
-
- Correctly reset history length to '0', not '1'. Old relict from early WML days.
- Add some new WML testcases covering the use of history length (by onenterforward event handling)
-
- Tests: wml/onenterforward-event.html
- wml/onenterforward-inline-event.html
- wml/ontimer-event.html
-
- * wml/WMLPageState.cpp:
- (WebCore::WMLPageState::reset):
-
-2009-07-01 David Hyatt <hyatt@apple.com>
-
- Reviewed by Simon Fraser.
-
- Make sure setting attributes on dcol elements properly updates the corresponding DataGridColumn object.
-
- Added new test in fast/dom/HTMLDataGridElement.
-
- * html/HTMLDataGridColElement.cpp:
- (WebCore::HTMLDataGridColElement::parseMappedAttribute):
- * html/HTMLDataGridColElement.h:
-
-2009-07-01 David Hyatt <hyatt@apple.com>
-
- Reviewed by Tim Hatcher.
-
- <rdar://problem/6998524> REGRESSION (r44474): Form text field has focus ring, looks focused,
- even though the field is not actually focused for keyboard input
-
- Add the concept of whether or not the Page is focused by adding a boolean to the focusController. This allows the
- focused frame and focused node to both be cached and changed programmatically even when the Page itself doesn't
- actually happen to have focus at that time.
-
- * WebCore.base.exp:
- * page/FocusController.cpp:
- (WebCore::FocusController::FocusController):
- (WebCore::FocusController::setFocusedFrame):
- (WebCore::FocusController::setFocused):
- (WebCore::FocusController::setActive):
- * page/FocusController.h:
- (WebCore::FocusController::isFocused):
-
-2009-07-01 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] Move some API headers from WebCore.pro to headers.pri so that they
- get installed when running make install from the build directory.
-
- * WebCore.pro:
-
-2009-07-01 Simon Hausmann <simon.hausmann@nokia.com>
-
- Rubber-stamped by Ariya Hidayat.
-
- Ran WebKitTools/Scripts/generate-qt-inspector-resource to update the
- qrc file with new png files from the web inspector.
-
- * inspector/front-end/WebKit.qrc:
-
-2009-06-30 Mark Rowe <mrowe@apple.com>
-
- Land some code that has a hope of compiling.
-
- * platform/graphics/cg/ImageSourceCG.cpp:
- (WebCore::imageSourceOptions):
-
-2009-06-30 Stephanie Lewis <slewis@apple.com>
-
- Reviewed by Simon Fraser.
-
- Flip back on block caching. Throwing away block data, while
- a perceived memory win, is a performance hit in cases where we
- are repainting large images (i.e. backgrounds) frequently
- (i.e. a flash video playing on top).
- <rdar://problem/6933515> REGRESSION(L-SL): Large JPEG images are
- decoded on drawing, slowing down painting of sites that frequently
- repaint e.g. because of Flash (pandora.com, Starcraft 2)
-
- * platform/graphics/cg/ImageSourceCG.cpp:
- (WebCore::imageSourceOptions):
-
-2009-06-30 Maciej Stachowiak <mjs@apple.com>
-
- Reviewed by Sam Weinig.
-
- - Rename html4.css to html.css, since we target HTML5 now
- https://bugs.webkit.org/show_bug.cgi?id=26873
-
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * css/CSSStyleSelector.cpp:
- (WebCore::loadFullDefaultStyle):
- * css/html.css: Copied from css/html4.css.
- * css/html4.css: Removed.
- * css/themeWin.css:
- * platform/Theme.h:
- * platform/qt/RenderThemeQt.cpp:
- (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
- * rendering/RenderTheme.h:
-
-2009-06-30 Zan Dobersek <zandobersek@gmail.com>
-
- Reviewed by Gustavo Noronha.
-
- [GTK] Drag and drop support
- https://bugs.webkit.org/show_bug.cgi?id=23642
-
- Define DragImageRef as GdkPixbuf and implement essential
- functions which manipulate drag images.
-
- * platform/DragImage.h:
- * platform/gtk/DragImageGtk.cpp:
- (WebCore::dragImageSize):
- (WebCore::deleteDragImage):
- (WebCore::scaleDragImage):
- (WebCore::createDragImageFromImage):
-
-2009-06-30 Maxime Simon <simon.maxime@gmail.com>
-
- Reviewed by Eric Seidel.
-
- StorageNamespace.cpp build issue
- https://bugs.webkit.org/show_bug.cgi?id=26859
-
- Moved #endif //ENABLE(DOM_STORAGE) position
- so that the build doesn't fail.
- The namespace WebCore was started after the #if ENABLE(DOM_STORAGE)
- but closed after the #endif.
-
- * storage/StorageNamespace.cpp:
-
-2009-06-30 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Oliver Hunt.
-
- <rdar://problem/7020825> HTMLMediaElement should not assume seeking is only possible in
- buffered time ranges
-
- * html/HTMLMediaElement.cpp:
- Don't ASSERT if the network state goes to Idle when when the ready state is
- HaveEnoughData or higher, it is perfectly legal.
- (WebCore::HTMLMediaElement::setReadyState):
- Don't clear m_seeking after posting a 'seeking' event.
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::seek):
- Do nothing when asked to seek to the same time we are already seeking to. Check requested
- seek time against maxTimeSeekable, not maxTimeLoaded.
- (WebCore::MediaPlayerPrivate::doSeek):
- Don't bother stopping a movie that isn't playing. Minor cleanup to make the code more readable.
- (WebCore::MediaPlayerPrivate::seekTimerFired):
- Check requested seek time against maxTimeSeekable, not maxTimeLoaded.
- (WebCore::MediaPlayerPrivate::updateStates):
- A streaming movie has as much data as it needs once it reaches "playable", so
- set the ready state to HaveFutureData. A movie with metadata doesn't drop back
- to "have nothing" when seeking. A streaming movie doesn't use the network when paused.
- (WebCore::MediaPlayerPrivate::timeChanged):
- It may not be possible to seek to a specific time in a streamed movie but when seeking
- in a streaming movie QuickTime sets the time to closest time possible and posts a
- timechanged notification, so update m_seekTo so we can detect when the seek completes.
-
-2009-06-30 Steve Falkenburg <sfalken@apple.com>
-
- https://bugs.webkit.org/show_bug.cgi?id=26860
-
- Reviewed by Sam Weinig.
-
- Blacklist Yahoo Application State plug-in for versions prior to 1.0.0.6.
- Earlier versions cause corruption crashes.
-
- * plugins/win/PluginPackageWin.cpp:
- (WebCore::PluginPackage::isPluginBlacklisted):
-
-2009-06-30 Dean Jackson <dino@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/7005207> <video> in canvas broken with ACCEL_COMPOSITING
-
- Fix drawImage of video in CanvasRenderingContext2D when
- accelerated compositing is enabled. This is done by
- adding a new paint method to HTMLVideoElement that
- is only called from canvas, which will create the software
- renderer if necessary, but otherwise calls the regular
- paint method. Meanwhile, add logic to the software video
- renderer so that it can be created without calling repaint
- every time it sees a new frame.
-
- * html/CanvasRenderingContext2D.cpp:
- (WebCore::CanvasRenderingContext2D::drawImage):
- * html/HTMLVideoElement.cpp:
- (WebCore::HTMLVideoElement::paintCurrentFrameInContext):
- * html/HTMLVideoElement.h:
- * platform/graphics/MediaPlayer.cpp:
- (WebCore::MediaPlayer::paintCurrentFrameInContext):
- * platform/graphics/MediaPlayer.h:
- * platform/graphics/MediaPlayerPrivate.h:
- (WebCore::MediaPlayerPrivateInterface::paintCurrentFrameInContext):
- * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::createQTMovie):
- (WebCore::MediaPlayerPrivate::createQTVideoRenderer):
- (WebCore::MediaPlayerPrivate::currentRenderingMode):
- (WebCore::MediaPlayerPrivate::setUpVideoRendering):
- (WebCore::MediaPlayerPrivate::tearDownVideoRendering):
- (WebCore::MediaPlayerPrivate::paintCurrentFrameInContext):
-
-2009-06-30 David Hyatt <hyatt@apple.com>
-
- Reviewed by Beth Dakin.
-
- https://bugs.webkit.org/show_bug.cgi?id=26858
-
- Get <dcol> elements reflected into the datagrid's column list. Make sure columns get added/removed
- properly. (Attribute changes are still not caught. That is coming in a separate patch.)
-
- Added fast/dom/HTMLDataGridElement/DataGridColumns-dom.html
-
- * html/DataGridColumn.h:
- (WebCore::DataGridColumn::create):
- (WebCore::DataGridColumn::setColumnList):
- (WebCore::DataGridColumn::DataGridColumn):
- * html/DataGridColumnList.cpp:
- (WebCore::DataGridColumnList::add):
- (WebCore::DataGridColumnList::remove):
- (WebCore::DataGridColumnList::clear):
- * html/DataGridColumnList.h:
- * html/HTMLDataGridColElement.cpp:
- (WebCore::HTMLDataGridColElement::HTMLDataGridColElement):
- (WebCore::HTMLDataGridColElement::findDatagridAncestor):
- (WebCore::HTMLDataGridColElement::ensureColumn):
- (WebCore::HTMLDataGridColElement::insertedIntoTree):
- (WebCore::HTMLDataGridColElement::removedFromTree):
- (WebCore::HTMLDataGridColElement::sortable):
- (WebCore::HTMLDataGridColElement::setSortable):
- * html/HTMLDataGridColElement.h:
- (WebCore::HTMLDataGridColElement::column):
- (WebCore::HTMLDataGridColElement::setColumn):
- (WebCore::HTMLDataGridColElement::datagrid):
- * html/HTMLDataGridElement.cpp:
- (WebCore::HTMLDataGridElement::setDataSource):
- (WebCore::HTMLDataGridElement::dataSource):
-
-2009-06-30 Jeremy Orlow (jorlow@chromium.org)
-
- Reviewed by David Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=26852
-
- Fix some minor build issues in the v8 bindings.
-
- * bindings/v8/custom/V8StorageCustom.cpp:
- (WebCore::V8Custom::v8StorageNamedPropertyEnumerator):
- (WebCore::storageGetter):
- (WebCore::storageSetter):
- (WebCore::storageDeleter):
- * storage/StorageArea.cpp:
-
-2009-06-30 Adam Langley <agl@google.com>
-
- Reviewed by Eric Seidel.
-
- Chromium Linux: use different fonts for each script run.
-
- https://bugs.webkit.org/show_bug.cgi?id=26853
-
- Previously, when rendering complex text, we picked a single font which
- could render all the glyphs needed for the run. However, this meant
- that sometimes lines were rendered with, for example, [LATIN, THAI,
- LATIN] and we could end up with a different font for the Latin parts
- than for lines without Thai in them.
-
- With this patch, we pick a font for each script run.
-
- This change is covered by existing layout tests.
-
- * platform/graphics/chromium/FontLinux.cpp:
- (WebCore::Font::drawGlyphs):
- (WebCore::TextRunWalker::TextRunWalker):
- (WebCore::TextRunWalker::~TextRunWalker):
- (WebCore::TextRunWalker::nextScriptRun):
- (WebCore::TextRunWalker::fontPlatformDataForScriptRun):
- (WebCore::TextRunWalker::setupFontForScriptRun):
- (WebCore::TextRunWalker::allocHarfbuzzFont):
- (WebCore::setupForTextPainting):
- (WebCore::Font::drawComplexText):
- (WebCore::Font::floatWidthForComplexText):
- (WebCore::Font::offsetForPositionForComplexText):
- (WebCore::Font::selectionRectForComplexText):
- * platform/graphics/chromium/FontPlatformDataLinux.cpp:
- (WebCore::FontPlatformData::setupPaint):
-
-2009-06-30 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt, Dan Bernstein.
-
- <rdar://problem/6191676> Redraw issues scrolling overflow:scroll div with compositing
-
- There are two parts to this fix. First, if a compositing layer has overflow clipping
- or a mask, then the compositing layer does not need to be sized to encompass all
- non-composited children.
-
- Second, when scrolling, we have to back up to the compositing ancestor and have
- it reposition descendant compositing layers, because overflow doesn't follow
- the z-order tree.
-
- Test: compositing/overflow/overflow-scroll.html
-
- * page/FrameView.cpp:
- (WebCore::FrameView::layout):
- Pass the UpdateCompositingLayers flag when updating layers after layout, so that
- we can reposition compositing layers if we're not about to do a layer rebuild.
-
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::updateLayerPositions):
- Only update compositing layers if the flag is set.
-
- (WebCore::RenderLayer::scrollToOffset):
- Do compositing layer updates from the compositing ancestor in one fell swoop.
-
- * rendering/RenderLayer.h:
- Replace the unused FullUpdate flag with one that allows us to specify whether
- compositing layers should be updated.
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::updateAfterLayout):
- * rendering/RenderLayerBacking.h:
- New param that we can pass to updateCompositingDescendantGeometry to control
- whether the update goes deep.
-
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::calculateCompositedBounds):
- We can return earlier if this is not a self-painting layer.
- If the layer has overflow clip or a mask, then the composited bounds are just the
- local bounds, excluding descendants.
-
- (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
- * rendering/RenderLayerCompositor.h:
- Renamed from updateCompositingChildrenGeometry, and added a flag that allows
- us to do a deep update.
-
-2009-06-30 Alexey Proskuryakov <ap@webkit.org>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=26764
- Uncaught NOT_FOUND_ERR: DOMException 8 loading empty text file
-
- Test: fast/parser/empty-text-resource.html
-
- * loader/TextDocument.cpp: (WebCore::TextTokenizer::finish): Create document tree if it
- hasn't been created yet.
-
-2009-06-30 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Adam Roben.
-
- Renamed scrollbarUnderPoint to scrollbarAtPoint.
-
- * page/EventHandler.cpp:
- (WebCore::EventHandler::hitTestResultAtPoint):
- (WebCore::EventHandler::handleMousePressEvent):
- (WebCore::EventHandler::handleMouseMoveEvent):
- * platform/ScrollView.cpp:
- (WebCore::ScrollView::scrollbarAtPoint):
- * platform/ScrollView.h:
- * platform/chromium/PopupMenuChromium.cpp:
- (WebCore::PopupListBox::handleMouseDownEvent):
- (WebCore::PopupListBox::handleMouseMoveEvent):
-
-2009-06-30 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Geoff Garen.
-
- <rdar://problem/6960286> CrashTracer: [REGRESSION] 1120 crashes in Safari at com.apple.WebCore WebCore::JSLazyEventListener::parseCode const 62
-
- <select> elements and other elements the produce popups can keep their popups
- live across a page load. If this occurs and the <select> element has an
- onchange handler it is possible to get into a state where we try to execute
- JS on a page that no longer has an execution context.
-
- * bindings/js/JSLazyEventListener.cpp:
- (WebCore::JSLazyEventListener::parseCode):
- Be paranoid and add a null check, but assert as well because we shouldn't
- actually get to this point.
- * rendering/RenderMenuList.cpp:
- (WebCore::RenderMenuList::valueChanged):
-
-2009-06-30 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- <https://bugs.webkit.org/show_bug.cgi?id=25435>
-
- Added support for sending MessagePorts to/from Workers via postMessage().
-
- * bindings/js/JSWorkerContextCustom.cpp:
- (WebCore::JSWorkerContext::messageChannel):
- Exposes MessageChannel constructor WorkerContext.
- * bindings/js/JSWorkerCustom.cpp:
- * bindings/v8/custom/V8MessageChannelConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- Now correctly handles being instantiated from within a Worker.
- * platform/CrossThreadCopier.h:
- (WebCore::GenericWorkerTaskTraits<PassOwnPtr>):
- Added support for passing PassOwnPtr as argument to GenericWorkerTask
- * workers/GenericWorkerTask.h:
- (WebCore::):
- * workers/Worker.cpp:
- (WebCore::Worker::postMessage):
- Now handles disentangling/entangling MessagePorts sent to/from via postMessage.
- (WebCore::Worker::dispatchMessage):
- * workers/Worker.h:
- * workers/Worker.idl:
- Added an optional MessagePort argument to postMessage()
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::hasPendingActivity):
- Workers now report pending activity whenever there are remotely entangled ports.
- (WebCore::WorkerContext::postMessage):
- Now handles disentangling/entangling MessagePorts sent to/from via postMessage.
- (WebCore::WorkerContext::dispatchMessage):
- * workers/WorkerContext.h:
- * workers/WorkerContext.idl:
- Added an optional MessagePort argument to postMessage()
- * workers/WorkerContextProxy.h:
- * workers/WorkerMessagingProxy.cpp:
- Updated messaging infrastructure to transport an optional MessagePort/MessagePortChannel.
- (WebCore::MessageWorkerContextTask::create):
- (WebCore::MessageWorkerContextTask::MessageWorkerContextTask):
- (WebCore::MessageWorkerContextTask::performTask):
- (WebCore::MessageWorkerTask::create):
- (WebCore::MessageWorkerTask::MessageWorkerTask):
- (WebCore::MessageWorkerTask::performTask):
- (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
- (WebCore::WorkerMessagingProxy::postMessageToWorkerContext):
- * workers/WorkerMessagingProxy.h:
- Added additional postMessage() API that accepts a MessagePort
- * workers/WorkerObjectProxy.h:
- Added additional postMessage() API that accepts a MessagePort
-
-2009-06-30 Adam Langley <agl@google.com>
-
- Reviewed by Eric Seidel.
-
- Chromium: Add complex text support on Linux.
-
- https://bugs.webkit.org/show_bug.cgi?id=25068
-
- This patch adds complex text support on Linux using Harfbuzz. It's not
- the fastest code possible: some caching of font tables will certainly
- be required. However, it's probably the simplest code that works.
-
- This will require checking in new baselines in the Chromium tree for
- those layout tests which now pass.
-
- * platform/graphics/chromium/FontLinux.cpp:
- (WebCore::Font::drawGlyphs):
- (WebCore::truncateFixedPointToInteger):
- (WebCore::TextRunWalker::TextRunWalker):
- (WebCore::TextRunWalker::~TextRunWalker):
- (WebCore::TextRunWalker::reset):
- (WebCore::TextRunWalker::setXOffsetToZero):
- (WebCore::TextRunWalker::rtl):
- (WebCore::TextRunWalker::setBackwardsIteration):
- (WebCore::TextRunWalker::nextScriptRun):
- (WebCore::TextRunWalker::glyphs):
- (WebCore::TextRunWalker::length):
- (WebCore::TextRunWalker::xPositions):
- (WebCore::TextRunWalker::advances):
- (WebCore::TextRunWalker::width):
- (WebCore::TextRunWalker::logClusters):
- (WebCore::TextRunWalker::numCodePoints):
- (WebCore::TextRunWalker::widthOfFullRun):
- (WebCore::TextRunWalker::allocHarfbuzzFont):
- (WebCore::TextRunWalker::deleteGlyphArrays):
- (WebCore::TextRunWalker::createGlyphArrays):
- (WebCore::TextRunWalker::expandGlyphArrays):
- (WebCore::TextRunWalker::shapeGlyphs):
- (WebCore::TextRunWalker::setGlyphXPositions):
- (WebCore::setupForTextPainting):
- (WebCore::fontPlatformDataForTextRun):
- (WebCore::Font::drawComplexText):
- (WebCore::Font::floatWidthForComplexText):
- (WebCore::glyphIndexForXPositionInScriptRun):
- (WebCore::Font::offsetForPositionForComplexText):
- (WebCore::Font::selectionRectForComplexText):
- * platform/graphics/chromium/HarfbuzzSkia.cpp: Added.
- (WebCore::SkiaScalarToHarfbuzzFixed):
- (WebCore::stringToGlyphs):
- (WebCore::glyphsToAdvances):
- (WebCore::canRender):
- (WebCore::getOutlinePoint):
- (WebCore::getGlyphMetrics):
- (WebCore::getFontMetric):
- (WebCore::harfbuzzSkiaGetTable):
-
-2009-06-30 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/7019799> Slow loading MediaDocument can fall back to plug-in unnecessarily
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::updateStates):
- Always fall back to a plug-in if m_hasUnsupportedTracks is set.
- (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
- Set m_hasUnsupportedTracks if we disable a track.
-
-2009-06-30 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Fix inverted if/else that's causing a layout test in src.chromium.org to fail.
-
- https://bugs.webkit.org/show_bug.cgi?id=26820
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::GCPrologueVisitor::visitDOMWrapper): if (port2), not if (!port2).
-
-2009-06-30 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Dave Hyatt.
-
- - fix <rdar://problem/6946611> REGRESSION (r30673): Shade10:" D_Snap
- to Grid" window is clipping
-
- Added an app-specific quirk to revert the behavior of <link> elements
- to the way it was before r30673, namely that if the rel attribute
- is not "stylesheet" but the type attribute contains "text/css", the
- link behaves as a stylesheet link.
-
- * WebCore.base.exp: Exported setTreatsAnyTextCSSLinkAsStylesheet().
- * html/HTMLLinkElement.cpp:
- (WebCore::HTMLLinkElement::process): Check
- Settings::treatsAnyTextCSSLinkAsStylesheet() and if true, allow a
- style sheet link if the type contains "text/css".
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
- Initialize m_treatsAnyTextCSSLinkAsStylesheet.
- (WebCore::Settings::setTreatsAnyTextCSSLinkAsStylesheet): Added.
- * page/Settings.h:
- (WebCore::Settings::treatsAnyTextCSSLinkAsStylesheet): Added.
-
-2009-06-30 Adrien Nader <camaradetux@gmail.com>
-
- Reviewed by Xan Lopez.
-
- Fix typo in GNUMakefile.am: it reads WebCOre instead of WebCore.
-
- * GNUmakefile.am:
-
-2009-06-30 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Reviewed by Xan Lopez.
-
- [Gtk] Turn on ENABLE_DATAGRID so we can run the layout tests.
-
- * GNUmakefile.am:
-
-2009-06-30 Raju Kunnath <raju.kunnath@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- <https://bugs.webkit.org/show_bug.cgi?id=26752>
-
- [Qt] Windows release build issue with Qt4.5 due to -GL flag on msvc2005 and msvc2008.
-
- * WebCore.pro: Removed -GL compiler option for win32-msvc2005|win32-msvc2008.
-
-2009-06-30 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- Initialize member variables in the right order. Fixes compiler
- warning.
-
- * platform/image-decoders/bmp/BMPImageReader.cpp:
- (WebCore::BMPImageReader::BMPImageReader):
-
-2009-06-29 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by David Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=26831
- Fix compiler warning in WorkerLoaderProxy.h
-
- Forward declaration of a class within a class is not allowed,
- since the compiler can't know if the declaration is legal at that
- point. This gives the following compiler warning:
-
- ../../WebCore/workers/WorkerLoaderProxy.h:40: warning: declaration
- "class WebCore::ScriptExecutionContext::Task" does not declare
- anything
-
- Include the full ScriptExecutionHeader header instead.
-
- * workers/WorkerLoaderProxy.h:
-
-2009-06-29 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- Remove unused function.
-
- * plugins/gtk/PluginPackageGtk.cpp:
-
-2009-06-29 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Change RenderLayer::updateLayerPositions() to use a bitmask instead of two
- boolean arguments. FullUpdate is unused at present, but will be used soon.
-
- * page/FrameView.cpp:
- (WebCore::FrameView::layout):
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::updateLayerPositions):
- (WebCore::RenderLayer::scrollToOffset):
- * rendering/RenderLayer.h:
- (WebCore::RenderLayer::):
-
-2009-06-29 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Fix one more bad merge in V8Proxy.
-
- https://bugs.webkit.org/show_bug.cgi?id=26819
-
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::setDOMException): setDOMExceptionHelper() instead of convertToV8Object().
-
-2009-06-29 Sam Weinig <sam@webkit.org>
-
- Reviewed by Mark Rowe.
-
- Remove more unused scons support.
-
- * SConstruct: Removed.
-
-2009-06-29 Sam Weinig <sam@webkit.org>
-
- Reviewed by Dave Hyatt.
-
- Fix some incorrect create functions.
-
- * html/DataGridColumn.h:
- (WebCore::DataGridColumn::create):
- * html/DataGridColumnList.h:
- (WebCore::DataGridColumnList::create):
-
-2009-06-29 Sam Weinig <sam@webkit.org>
-
- Reviewed by Dave Hyatt.
-
- Remove initialize method from DataGridDataSource and add
- DOMDataGridDataSource.
-
- * GNUmakefile.am:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * bindings/js/JSDataGridDataSource.cpp:
- * bindings/js/JSDataGridDataSource.h:
- * bindings/js/JSHTMLDataGridElementCustom.cpp:
- (WebCore::JSHTMLDataGridElement::setDataSource):
- * html/DOMDataGridDataSource.cpp: Added.
- (WebCore::DOMDataGridDataSource::DOMDataGridDataSource):
- (WebCore::DOMDataGridDataSource::~DOMDataGridDataSource):
- * html/DOMDataGridDataSource.h: Added.
- (WebCore::DOMDataGridDataSource::create):
- (WebCore::DOMDataGridDataSource::isDOMDataGridDataSource):
- (WebCore::asDOMDataGridDataSource):
- * html/DataGridDataSource.h:
- (WebCore::DataGridDataSource::isDOMDataGridDataSource):
- (WebCore::DataGridDataSource::isJSDataGridDataSource):
- * html/HTMLDataGridElement.cpp:
- (WebCore::HTMLDataGridElement::HTMLDataGridElement):
- (WebCore::HTMLDataGridElement::setDataSource):
- (WebCore::HTMLDataGridElement::dataSource):
- * html/HTMLDataGridElement.h:
-
-2009-06-29 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Fix a couple of bad merge items from my previous V8Proxy patch.
-
- https://bugs.webkit.org/show_bug.cgi?id=26813
-
- * bindings/v8/V8Collection.h:
- (WebCore::nodeCollectionNamedPropertyGetter): Fix a bad function name that slipped through.
- * bindings/v8/V8Proxy.cpp:
- (WebCore::V8Proxy::setDOMException): Fix a bad merge that caused a couple of lines of extraneous, breaking code to get in.
-
-2009-06-29 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser <simon.fraser@apple.com>.
-
- https://bugs.webkit.org/show_bug.cgi?id=26706
-
- Fixed crash due to dereference of m_toStyle
-
- * page/animation/ImplicitAnimation.cpp:
- (WebCore::ImplicitAnimation::isTargetPropertyEqual):
-
-2009-06-29 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/7014813> Ask media engine if a movie is streamed or downloaded.
-
- * WebCore.base.exp:
- Export _wkQTMovieGetType
-
- * platform/graphics/MediaPlayer.cpp:
- (WebCore::MediaPlayer::hasSingleSecurityOrigin):
- Move to keep with other non-callback functions.
- (WebCore::MediaPlayer::movieLoadType):
- New, returns the movie type.
- * platform/graphics/MediaPlayer.h:
- Declare MovieLoadType enum and movieLoadType method.
-
- * platform/graphics/MediaPlayerPrivate.h:
- (WebCore::MediaPlayerPrivateInterface::movieLoadType):
- Default implementation of movieLoadType
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::createQTMovie):
- Don't base m_isStreaming on protocol, there are other types of streaming movies.
- (WebCore::MediaPlayerPrivate::maxTimeBuffered):
- Don't assume all streams are unbuffered.
- (WebCore::MediaPlayerPrivate::updateStates):
- Update m_isStreaming once we have metadata.
- (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
- Tracks that are disabled to begin with shouldn't be included in m_enabledTrackCount.
- (WebCore::MediaPlayerPrivate::movieLoadType):
- New, return movie type.
-
- * platform/mac/WebCoreSystemInterface.h:
- * platform/mac/WebCoreSystemInterface.mm:
- Add wkQTMovieGetType.
-
-2009-06-29 Alice Liu <alice.liu@apple.com>
-
- Fixed <rdar://problem/6930280> Reproducible crash at USA Today photo gallery
-
- Reviewed by Anders Carlsson.
-
- No test added because the crash requires a flash plugin
-
- * plugins/win/PluginMessageThrottlerWin.cpp:
- Rely on the hWnd of the plugin to tell us whether the PluginView has
- been deleted during execution of its wndProc.
- (WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
-
-2009-06-29 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by David Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=26811
- [Chromium] Remove a flag and functions used to enable workers in runtime.
-
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- * bindings/v8/WorkerContextExecutionProxy.h:
-
-2009-06-29 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt.
-
- <rdar://problem/6976712> Text antialiasing problems when rendering into compositing layers.
-
- Improve the appearance of text in compositing layers by making use of
- CA's layer geometry flipping, rather that doing it ourselves with a flip
- transform. This allows CG to use font autohinting in the layer text.
-
- * platform/graphics/GraphicsLayer.h:
- (WebCore::GraphicsLayer::setGeometryOrientation):
- (WebCore::GraphicsLayer::geometryOrientation):
- New methods to set whether this layer uses flipped geometry.
-
- * platform/graphics/mac/GraphicsLayerCA.h:
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayerCA::setGeometryOrientation):
- (WebCore::GraphicsLayerCA::geometryOrientation):
- Subclass in order to call into CA
-
- (WebCore::GraphicsLayerCA::setContentsLayer):
- Now that CA is doing the geometry flipping, we no longer need to flip the content
- layers for image and video manually
-
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
- Turn on flipping on the root layer.
-
-2009-06-29 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by Adam Treat.
-
- Fixes: https://bugs.webkit.org/show_bug.cgi?id=26246
-
- Implement most WML specific <select> element features.
- Add 'iname' / 'ivalue' support and support variable references.
-
- Add two tests covering most select/variable related functionality.
- Needs more tests when adding full 'iname' / 'ivalue' support (used in conjuction with onpick).
-
- Tests: http/tests/wml/post-data-to-server.html
- wml/select-element-variables.html
-
- * dom/SelectElement.cpp:
- (WebCore::SelectElement::optionCount): Refactored from HTMLSelectElement::length() for use within HTML & WML.
- * dom/SelectElement.h:
- * html/HTMLSelectElement.cpp:
- (WebCore::HTMLSelectElement::length): Use new SelectElement::optionCount() function. (no functional changes for HTML).
- * wml/WMLCardElement.cpp:
- (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded): Activated commented code taking care of WMLSelectElement initialization.
- * wml/WMLSelectElement.cpp: Add a bunch of new code handling WML specific feature processing.
- (WebCore::WMLSelectElement::title):
- (WebCore::WMLSelectElement::formControlName):
- (WebCore::WMLSelectElement::defaultEventHandler):
- (WebCore::WMLSelectElement::selectInitialOptions):
- (WebCore::WMLSelectElement::calculateDefaultOptionIndices):
- (WebCore::WMLSelectElement::selectDefaultOptions):
- (WebCore::WMLSelectElement::initializeVariables):
- (WebCore::WMLSelectElement::updateVariables):
- (WebCore::WMLSelectElement::parseIndexValueString):
- (WebCore::WMLSelectElement::valueStringToOptionIndices):
- (WebCore::WMLSelectElement::optionIndicesToValueString):
- (WebCore::WMLSelectElement::optionIndicesToString):
- (WebCore::WMLSelectElement::name):
- (WebCore::WMLSelectElement::value):
- (WebCore::WMLSelectElement::iname):
- (WebCore::WMLSelectElement::ivalue):
- * wml/WMLSelectElement.h:
-
-2009-06-29 David Hyatt <hyatt@apple.com>
-
- Reviewed by Adam Roben.
-
- Put <datagrid> behind an ifdef.
-
- * Configurations/FeatureDefines.xcconfig:
- * bindings/js/JSDataGridColumnListCustom.cpp:
- * bindings/js/JSDataGridDataSource.cpp:
- * bindings/js/JSDataGridDataSource.h:
- * bindings/js/JSHTMLDataGridElementCustom.cpp:
- * html/DataGridColumn.cpp:
- * html/DataGridColumn.h:
- * html/DataGridColumn.idl:
- * html/DataGridColumnList.cpp:
- * html/DataGridColumnList.h:
- * html/DataGridColumnList.idl:
- * html/DataGridDataSource.h:
- * html/HTMLDataGridCellElement.cpp:
- * html/HTMLDataGridCellElement.h:
- * html/HTMLDataGridCellElement.idl:
- * html/HTMLDataGridColElement.cpp:
- * html/HTMLDataGridColElement.h:
- * html/HTMLDataGridColElement.idl:
- * html/HTMLDataGridElement.cpp:
- * html/HTMLDataGridElement.h:
- * html/HTMLDataGridElement.idl:
- * html/HTMLDataGridRowElement.cpp:
- * html/HTMLDataGridRowElement.h:
- * html/HTMLDataGridRowElement.idl:
- * html/HTMLTagNames.in:
- * page/DOMWindow.idl:
- * rendering/RenderDataGrid.cpp:
- * rendering/RenderDataGrid.h:
-
-2009-06-29 Simon Hausmann <simon.hausmann@nokia.com>
-
- Reviewed by Ariya Hidayat and Adam Roben.
-
- Fix compilation with MINGW. Ported MSVC inline assembly to
- GNU inline assembly. Also fixed casting errors where gcc
- refused to cast a pointer-to-function to a pointer-to-object,
- without an intermediate cast to a non-pointer type.
-
- * plugins/win/PluginViewWin.cpp:
- (WebCore::PluginView::hookedBeginPaint):
- (WebCore::PluginView::hookedEndPaint):
- (WebCore::hook):
- (WebCore::setUpOffscreenPaintingHooks):
-
-2009-06-26 John Sullivan <sullivan@apple.com>
-
- Added Speech submenu to context menu on Mac when there's a non-editable selection
- (it was already present when there's an editable selection).
- Also added support for disabling "Stop Speaking" when there is no speaking to stop.
-
- Reviewed by Tim Hatcher.
-
- * loader/EmptyClients.h:
- (WebCore::EmptyContextMenuClient::isSpeaking):
- implemented this new virtual function to return false
-
- * page/ContextMenuClient.h:
- declared this new pure virtual function
-
- * platform/ContextMenu.cpp:
- (WebCore::ContextMenu::populate):
- insert Speech item (after a separator) on Mac when there's selected non-editable text
- (WebCore::ContextMenu::checkOrEnableIfNeeded):
- enable Stop Speaking item only if the context menu client returns true for isSpeaking()
-
-2009-06-28 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Simon Fraser.
-
- - fix https://bugs.webkit.org/show_bug.cgi?id=26783
- <rdar://problem/7014543> REGRESSION (r45296): Subfolders not displayed
- in MobileMe iDisk Web App
-
- Test: added a case to fast/dom/Element/scrollWidth.html
-
- Ensure that scroll{Width, Height} is greater or equal to
- client{Width, Height}.
-
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::scrollWidth):
- (WebCore::RenderBox::scrollHeight):
-
-2009-06-27 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26780
-
- Do not make compositing layers for non-self-painting RenderLayers,
- since these exist only to push a clip onto the clipping stack. If such
- a layer gets compositied for some other reason, it should not paint.
-
- Also ensure that we update composited layer positions correctly
- inside overflow:scroll layers. We can't assume that the contents
- are child layers, so we have to go up to the compositing ancestor,
- and tell it to update all its child layer positions as we do
- after layout.
-
- Tests: compositing/layers-inside-overflow-scroll.html
- compositing/self-painting-layers.html
-
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::scrollToOffset):
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::paintIntoLayer):
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::calculateCompositedBounds):
- (WebCore::RenderLayerCompositor::needsToBeComposited):
-
-2009-06-28 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
-
- Reviewed by Eric Seidel.
-
- PurgeableBuffer #defines leave out functions on gtk MacOSX 10.4 build
- https://bugs.webkit.org/show_bug.cgi?id=23057
-
- Define these functions for Gtk as well.
-
- * platform/PurgeableBuffer.h:
-
-2009-06-28 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Update CodeGeneratorV8.pm to match the new api for V8Proxy.
-
- https://bugs.webkit.org/show_bug.cgi?id=26765
-
- * bindings/scripts/CodeGeneratorV8.pm: Match the current version of V8Proxy.
-
-2009-06-28 Nicolas Sylvain <nsylvain@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- If loading a font fails because of the sandbox, we ask the browser process to
- try to load it by calling ensureFontLoaded. If it still fails after
- ensureFontLoaded, we hit a ASSERT_NOT_REACHED.
-
- This case happens once in a while during browser shutdown. The browser will
- queue a message to the renderer to shutdown, and will then stop answering sync
- messages from the renderer. If the renderer is still loading a page during this
- time, it might try to call the browser process to ask to load a font. The
- browser process will ignore the request, and the font will fail to load, even
- after the second try.
-
- This is unfortunate, but there is no real risk here, since the renderer will be
- going away as soon as it processes another message.
-
- This can't be layout tested as it depends on the sandbox.
-
- https://bugs.webkit.org/show_bug.cgi?id=26743
-
- * platform/graphics/chromium/FontChromiumWin.cpp:
- * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
- * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
- * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
-
-2009-06-28 John Abd-El-Malek <jam@chromium.org>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=15457
-
- Test: plugins/netscape-plugin-map-data-to-src.html
-
- Fix problems with Real or WMP plugins not displaying because "data" was set
- on the OBJECT tag instead of "src". This is based on what Firefox does, see
- http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsObjectFrame.cpp#3045
-
- * rendering/RenderPartObject.cpp:
- (WebCore::mapDataParamToSrc):
- (WebCore::RenderPartObject::updateWidget):
-
-2009-06-27 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Jan Alonzo.
-
- [Qt] Build fix after r45290
- https://bugs.webkit.org/show_bug.cgi?id=26769
-
- * WebCore.pro:
-
-2009-06-27 Emilio Pozuelo Monfort <pochu27@gmail.com>
-
- Reviewed by Jan Alonzo.
-
- [GTK] Don't use deprecated GTKsymbols.
- https://bugs.webkit.org/show_bug.cgi?id=26583
-
- * plugins/gtk/gtk2xtbin.c:
- (gtk_xtbin_class_init):
- (gtk_xtbin_new):
- (gtk_xtbin_destroy):
-
-2009-06-27 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=26780
-
- Fix up previous change. When computeCompositingRequirements() determines
- that the current layer is composited, it needs to inform its parent
- by setting compositingState.m_subtreeIsCompositing() to true. That didn't
- always happen after the previous patch. Clarified the logic here.
-
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::CompositingState::CompositingState):
- (WebCore::RenderLayerCompositor::computeCompositingRequirements):
-
-2009-06-27 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=26780
-
- First part: fix the RenderLayer::hasCompositingDescendant() flag to be set
- correctly.
-
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::computeCompositingRequirements):
- Do not unconditionally set compositingState.m_subtreeIsCompositing, because
- that can clobber the value from an earlier sibling. Add some more comments.
-
- Remove a final use of Vector iterators.
-
- (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect):
- Move the normalFlowList() processing outside the test for isStackingContext().
-
-2009-06-27 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Simon Fraser and Antti Koivisto.
-
- - make paintFillLayerExtended() non-virtual and remove its clipY and
- clipH parameters
-
- These parameters were computed and passed along to
- paintFillLayerExtended in order to vertically constrain the rect fill to
- the damage rect, because Qt cannot paint tall rectangles (see
- <http://websvn.kde.org/?view=rev&revision=42721>). Since the damage rect
- is passed along in the PaintInfo, the extra parameters are redundant,
- and the intersection can just take place in paintFillLayerExtended().
-
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::paintFillLayers):
- (WebCore::InlineFlowBox::paintFillLayer):
- (WebCore::InlineFlowBox::paintBoxDecorations):
- (WebCore::InlineFlowBox::paintMask):
- * rendering/InlineFlowBox.h:
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::paintRootBoxDecorations):
- (WebCore::RenderBox::paintBoxDecorations):
- (WebCore::RenderBox::paintMask):
- (WebCore::RenderBox::paintMaskImages):
- (WebCore::RenderBox::paintFillLayers):
- (WebCore::RenderBox::paintFillLayer):
- * rendering/RenderBox.h:
- * rendering/RenderBoxModelObject.cpp:
- (WebCore::RenderBoxModelObject::paintFillLayerExtended):
- * rendering/RenderBoxModelObject.h:
- * rendering/RenderFieldset.cpp:
- (WebCore::RenderFieldset::paintBoxDecorations):
- (WebCore::RenderFieldset::paintMask):
- * rendering/RenderTable.cpp:
- (WebCore::RenderTable::paintBoxDecorations):
- (WebCore::RenderTable::paintMask):
- * rendering/RenderTableCell.cpp:
- (WebCore::RenderTableCell::paintBackgroundsBehindCell):
- (WebCore::RenderTableCell::paintMask):
-
-2009-06-27 Ryosuke Niwa <rniwa@google.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26762
-
- Clean up for IndentOutdentCommand::indentRegion, and solved most of problems related to the bug 21712.
- https://bugs.webkit.org/show_bug.cgi?id=21712
-
- Added few utility functions to htmlediting.h/cpp
-
- isVisibilyAdjacent checks whether the first position is visibly next to the second position.
- i.e. there is no visible node between the first and second positions
-
- canMergeLists checks whether two lists can be merged.
- It checks the type of list, the editing boundary, and adjacency of the lists.
-
- Tests: editing/execCommand/indent-nested-lists-1.html
- editing/execCommand/indent-nested-lists-2.html
- editing/execCommand/indent-nested-lists-3.html
- editing/execCommand/indent-nested-lists-4.html
- editing/execCommand/indent-nested-lists-5.html
- editing/execCommand/indent-nested-lists-6.html
- editing/execCommand/indent-nested-lists-7.html
- editing/execCommand/outdent-nested-lists-1.html
- editing/execCommand/outdent-nested-lists-2.html
- editing/execCommand/outdent-nested-lists-3.html
- editing/execCommand/outdent-nested-lists-4.html
-
- * editing/IndentOutdentCommand.cpp:
- (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion):
- (WebCore::IndentOutdentCommand::tryIndentingAsListItem):
- (WebCore::IndentOutdentCommand::indentIntoBlockquote):
- (WebCore::IndentOutdentCommand::indentRegion):
- * editing/IndentOutdentCommand.h:
- * editing/htmlediting.cpp:
- (WebCore::enclosingListChild):
- (WebCore::canMergeLists):
- (WebCore::isVisibilyAdjacent):
- * editing/htmlediting.h:
-
-2009-06-27 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- WebInspector: Fix completion when iterating options using Tab.
-
- https://bugs.webkit.org/show_bug.cgi?id=26722
-
- * inspector/front-end/TextPrompt.js:
- (WebInspector.TextPrompt.prototype._completionsReady):
-
-2009-06-27 Gustavo Noronha Silva <gns@gnome.org>
-
- Reviewed by Holger Freyther.
-
- https://bugs.webkit.org/show_bug.cgi?id=25889
- [GTK] scrollbar policy for main frame is not implementable
-
- Override visibleContentRect to handle GTK+'s case, in which
- scrollbars or equivalent decoration are painted by the parent
- widget.
-
- * platform/ScrollView.cpp:
- * platform/gtk/ScrollViewGtk.cpp:
- (WebCore::ScrollView::visibleContentRect):
-
-2009-06-27 Daniel Bates <dbates@intudata.com>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=26708
-
- Fix addresses false negatives with respect to scheme relative paths, iFrame JavaScript URLs,
- and UTF-7 encoded payloads.
-
- Tests: http/tests/security/xssAuditor/http-equiv-utf-7-encoded.html
- http/tests/security/xssAuditor/iframe-javascript-url.html
- http/tests/security/xssAuditor/script-tag-utf-7-encoded.html
- http/tests/security/xssAuditor/script-tag-with-source-relative-scheme.html
-
- * html/HTMLTokenizer.cpp:
- (WebCore::HTMLTokenizer::scriptHandler): Moved XSSAuditor check to HTMLTokenizer::parseTag.
- (WebCore::HTMLTokenizer::parseTag):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::loadSubframe): Modified to inform XSSAuditor of parent frame so
- as to compare against iFrame javascript URL.
- * page/XSSAuditor.cpp: Removed method XSSAuditor::isControlCharacter. Instead, exposed method
- isControlCharacter in ResourceResponseBase.cpp.
- (WebCore::XSSAuditor::XSSAuditor):
- (WebCore::XSSAuditor::decodeURL): Modified to decode string using specified encoder.
- (WebCore::XSSAuditor::findInRequest): Generalized to arbitrary frame so as to prevent execution
- of iFrame javascript URL.
- * page/XSSAuditor.h: Added field m_parentFrame.
- * platform/network/ResourceResponseBase.cpp:
- (WebCore::isControlCharacter):
- * platform/network/ResourceResponseBase.h:
-
-2009-06-27 Oliver Hunt <oliver@apple.com>
-
- Reviewed by Maciej Stachowiak.
-
- Bug 26771: Canvas is incorrectly tainted when drawing from a video element that uses <source> elements
-
- The drawImage(<video>) logic naively assumes that it just needs
- to check the src attribute of the video element when in fact it
- needs to look at the url that is being played instead. Failure
- to do this means that video provided through source elements
- taints the canvas.
-
- Test: media/video-canvas-source.html
-
- * html/CanvasRenderingContext2D.cpp:
- (WebCore::CanvasRenderingContext2D::checkOrigin):
- (WebCore::CanvasRenderingContext2D::drawImage):
- * html/CanvasRenderingContext2D.h:
-
-2009-06-26 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Simon Fraser.
-
- https://bugs.webkit.org/show_bug.cgi?id=26695
-
- Added the ability to do scrollbar hit testing in EventHandler, changed the
- signature of a PlatformWheelEvent constructor, and changed scrollbarUnderMouse
- to scrollbarUnderPoint, and updated all calls to that function.
-
- * page/EventHandler.cpp:
- (WebCore::EventHandler::hitTestResultAtPoint):
- (WebCore::EventHandler::handleMousePressEvent):
- (WebCore::EventHandler::handleMouseMoveEvent):
- * page/EventHandler.h:
- (WebCore::):
- * platform/PlatformWheelEvent.h:
- * platform/ScrollView.cpp:
- (WebCore::ScrollView::scrollbarUnderPoint):
- * platform/ScrollView.h:
- * platform/chromium/PopupMenuChromium.cpp:
- (WebCore::PopupListBox::handleMouseDownEvent):
- (WebCore::PopupListBox::handleMouseMoveEvent):
- * platform/win/WheelEventWin.cpp:
- (WebCore::PlatformWheelEvent::PlatformWheelEvent):
-
-
-2009-06-26 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- <rdar://problem/7011924> Opacity transitions should not trigger hardware compositing mode
-
- Don't go into compositing mode just for opacity transitions, but they will be
- hardware acclerated if we're already compositing.
-
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::requiresCompositingLayer):
- (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
- (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
- * rendering/RenderLayerCompositor.h:
-
-2009-06-26 Simon Fraser <simon.fraser@apple.com>
-
- Rubber-stamped by Dave Levin
-
- Rename ioCompState to compositingState to better match WebCore coding style.
-
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::computeCompositingRequirements):
- (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
-
-2009-06-26 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Mark Rowe.
-
- - revert unintentional project changes from r45277
-
- * WebCore.xcodeproj/project.pbxproj:
-
-2009-06-26 Mark Rowe <mrowe@apple.com>
-
- Fix the Windows build.
-
- * WebCore.vcproj/WebCore.vcproj: Remove ColorSafari.cpp as
- the file was deleted from SVN.
-
-2009-06-26 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=26766
-
- Change to use array indexing rather than Vector enumerators; the former
- are preferred style.
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::hasNonCompositingContent):
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::calculateCompositedBounds):
- (WebCore::RenderLayerCompositor::computeCompositingRequirements):
- (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
- (WebCore::RenderLayerCompositor::updateCompositingChildrenGeometry):
- (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect):
- (WebCore::RenderLayerCompositor::layerHas3DContent):
-
-2009-06-26 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Oliver Hunt.
-
- - fix <rdar://problem/6961476> REGRESSION (r42043): scrollWidth reported
- as 1 px
-
- Test: fast/dom/Element/scrollWidth.html
-
- Changed scrollWidth and scrollHeight to use the same logic for
- visible overflow boxes that is used for clipped overflow boxes. In
- particular, borders are not included and
- {leftmost,rightmost,lowest}Position() are used. This logic matches IE8.
-
- * rendering/RenderBox.cpp:
- (WebCore::RenderBox::scrollWidth):
- (WebCore::RenderBox::scrollHeight):
-
-2009-06-26 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Bug 26725: aria-hidden, aria-disabled, aria-readonly need to be implemented
- https://bugs.webkit.org/show_bug.cgi?id=26725
-
- Tests: accessibility/aria-disabled.html
- accessibility/aria-hidden.html
- accessibility/aria-readonly.html
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::ariaIsHidden):
- (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
- (WebCore::AccessibilityRenderObject::isEnabled):
- (WebCore::AccessibilityRenderObject::canSetValueAttribute):
- * accessibility/AccessibilityRenderObject.h:
- * html/HTMLAttributeNames.in:
-
-2009-06-26 Brett Wilson <brettw@chromium.org>
-
- Reviewed by David Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=26759
-
- GIFImageDecoder is broken.
-
- Make the GIFImageDecoder.repetitionCount function const to match the
- base class. The mismatched definitions were causing the function to not
- get called.
-
- * platform/image-decoders/gif/GIFImageDecoder.cpp:
- (WebCore::GIFImageDecoder::repetitionCount):
- * platform/image-decoders/gif/GIFImageDecoder.h:
-
-2009-06-26 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser <simon.fraser@apple.com>.
-
- Additional fix for https://bugs.webkit.org/show_bug.cgi?id=26651
-
- The flag should always default to true to avoid it getting set
- to false in a build with accelerated compositing turned off
- and then disabling accelerated compositing when subsequently
- running a build with it turned on.
-
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
-
-2009-06-26 Brady Eidson <beidson@apple.com>
-
- Reviewed by Sam Weinig.
-
- Followup for the fix for <rdar://problem/6961578> REGRESSION (r43511): Opening .fdf files from Acrobat Professional fails
-
- Now that other MIME type correction stuff is in our swizzled method, Tiger needs it too!
-
- * platform/network/mac/ResourceHandleMac.mm:
- (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
- * platform/network/mac/WebCoreURLResponse.h:
-
-2009-06-26 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- https://bugs.webkit.org/show_bug.cgi?id=26732
-
- For the final step of https://bugs.webkit.org/show_bug.cgi?id=25376,
- combine LocalStorage and SessionStorage into StorageNamespace. The
- synching code (for LocalStorage) has already been removed, so these
- classes are now very similar. All they do is essentially contain a
- logical grouping of origins that are attached to specific contexts
- (be it PageGroups for LocalStorage and Page for SessionStorage).
-
- * GNUmakefile.am:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * page/Chrome.cpp:
- (WebCore::Chrome::createWindow):
- * page/DOMWindow.cpp:
- (WebCore::DOMWindow::localStorage):
- * page/DOMWindow.h:
- * page/Page.cpp:
- (WebCore::Page::sessionStorage):
- (WebCore::Page::setSessionStorage):
- * page/Page.h:
- * page/PageGroup.cpp:
- (WebCore::PageGroup::localStorage):
- * page/PageGroup.h:
- * storage/LocalStorage.cpp: Removed.
- * storage/LocalStorage.h: Removed.
- * storage/LocalStorageTask.cpp:
- * storage/LocalStorageThread.cpp:
- * storage/SessionStorage.cpp: Removed.
- * storage/SessionStorage.h: Removed.
- * storage/StorageArea.cpp:
- (WebCore::StorageArea::create):
- (WebCore::StorageArea::StorageArea):
- (WebCore::StorageArea::copy):
- (WebCore::StorageArea::length):
- (WebCore::StorageArea::key):
- (WebCore::StorageArea::getItem):
- (WebCore::StorageArea::setItem):
- (WebCore::StorageArea::removeItem):
- (WebCore::StorageArea::clear):
- (WebCore::StorageArea::contains):
- (WebCore::StorageArea::importItem):
- (WebCore::StorageArea::close):
- (WebCore::StorageArea::dispatchStorageEvent):
- * storage/StorageArea.h:
- (WebCore::):
- * storage/StorageAreaSync.cpp:
- (WebCore::StorageAreaSync::scheduleFinalSync):
- * storage/StorageNamespace.cpp: Copied from WebCore/storage/LocalStorage.cpp.
- (WebCore::localStorageNamespaceMap):
- (WebCore::StorageNamespace::localStorageNamespace):
- (WebCore::StorageNamespace::sessionStorageNamespace):
- (WebCore::StorageNamespace::StorageNamespace):
- (WebCore::StorageNamespace::~StorageNamespace):
- (WebCore::StorageNamespace::copy):
- (WebCore::StorageNamespace::storageArea):
- (WebCore::StorageNamespace::close):
- * storage/StorageNamespace.h: Copied from WebCore/storage/LocalStorage.h.
-
-2009-06-26 Nate Chapin <japhet@chromium.org>
-
- Reviewed by David Levin.
-
- Upstream V8Proxy. This involved updating a lot of function and variable names to match WebKit style, hence the large size.
-
- https://bugs.webkit.org/show_bug.cgi?id=26623
-
- * bindings/v8/ScheduledAction.cpp:
- (WebCore::ScheduledAction::ScheduledAction):
- (WebCore::ScheduledAction::~ScheduledAction):
- (WebCore::ScheduledAction::execute):
- * bindings/v8/ScriptCallStack.cpp:
- (WebCore::ScriptCallStack::ScriptCallStack):
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::isSafeScript):
- (WebCore::ScriptController::gcProtectJSWrapper):
- (WebCore::ScriptController::gcUnprotectJSWrapper):
- (WebCore::ScriptController::processingUserGesture):
- (WebCore::ScriptController::evaluate):
- (WebCore::ScriptController::setEventHandlerLineNumber):
- (WebCore::ScriptController::bindToWindowObject):
- (WebCore::ScriptController::collectGarbage):
- (WebCore::ScriptController::haveInterpreter):
- (WebCore::createScriptObject):
- (WebCore::ScriptController::createScriptObjectForPluginElement):
- * bindings/v8/ScriptInstance.cpp:
- (WebCore::V8ScriptInstance::clear):
- (WebCore::V8ScriptInstance::set):
- * bindings/v8/ScriptObject.cpp:
- (WebCore::ScriptGlobalObject::set):
- * bindings/v8/ScriptObjectQuarantine.cpp:
- (WebCore::getQuarantinedScriptObject):
- * bindings/v8/ScriptScope.cpp:
- (WebCore::ScriptScope::ScriptScope):
- * bindings/v8/ScriptValue.h:
- (WebCore::ScriptValue::ScriptValue):
- (WebCore::ScriptValue::operator=):
- (WebCore::ScriptValue::clear):
- * bindings/v8/V8AbstractEventListener.cpp:
- (WebCore::V8AbstractEventListener::invokeEventHandler):
- (WebCore::V8AbstractEventListener::handleEvent):
- (WebCore::V8AbstractEventListener::disposeListenerObject):
- (WebCore::V8AbstractEventListener::getReceiverObject):
- * bindings/v8/V8Collection.cpp:
- (WebCore::toOptionsCollectionSetter):
- * bindings/v8/V8Collection.h:
- (WebCore::getV8Object):
- (WebCore::getNamedPropertyOfCollection):
- (WebCore::nodeCollectionNamedPropertyGetter):
- (WebCore::getIndexedPropertyOfCollection):
- (WebCore::nodeCollectionIndexedPropertyGetter):
- (WebCore::nodeCollectionIndexedPropertyEnumerator):
- (WebCore::collectionIndexedPropertyEnumerator):
- (WebCore::collectionStringOrNullIndexedPropertyGetter):
- * bindings/v8/V8DOMMap.cpp:
- (WebCore::weakDOMObjectCallback):
- (WebCore::DOMData::removeObjectsFromWrapperMap):
- * bindings/v8/V8Helpers.cpp:
- (WebCore::wrapNPObject):
- (WebCore::toV8Context):
- * bindings/v8/V8LazyEventListener.cpp:
- (WebCore::V8LazyEventListener::~V8LazyEventListener):
- (WebCore::V8LazyEventListener::getListenerFunction):
- (WebCore::V8LazyEventListener::callListenerFunction):
- (WebCore::V8LazyEventListener::getWrappedListenerFunction):
- * bindings/v8/V8NodeFilterCondition.cpp:
- (WebCore::V8NodeFilterCondition::V8NodeFilterCondition):
- (WebCore::V8NodeFilterCondition::~V8NodeFilterCondition):
- (WebCore::V8NodeFilterCondition::acceptNode):
- * bindings/v8/V8ObjectEventListener.cpp:
- (WebCore::weakObjectEventListenerCallback):
- (WebCore::V8ObjectEventListener::~V8ObjectEventListener):
- * bindings/v8/V8Proxy.cpp: Added.
- * bindings/v8/V8Proxy.h:
- (WebCore::):
- (WebCore::GlobalHandleInfo::GlobalHandleInfo):
- (WebCore::V8Proxy::):
- (WebCore::V8Proxy::V8Proxy):
- (WebCore::V8Proxy::frame):
- (WebCore::V8Proxy::inlineCode):
- (WebCore::V8Proxy::setInlineCode):
- (WebCore::V8Proxy::timerCallback):
- (WebCore::V8Proxy::setTimerCallback):
- (WebCore::V8Proxy::setEventHandlerLineNumber):
- (WebCore::V8Proxy::finishedWithEvent):
- (WebCore::V8Proxy::wrapCPointer):
- (WebCore::V8Proxy::extractCPointer):
- (WebCore::V8Proxy::convertDOMWrapperToNative):
- (WebCore::V8Proxy::convertDOMWrapperToNode):
- (WebCore::V8Proxy::convertToV8Object):
- (WebCore::V8Proxy::convertToNativeObject):
- (WebCore::V8Proxy::convertToNativeEvent):
- (WebCore::V8Proxy::context):
- (WebCore::V8Proxy::extractCPointerImpl):
- (WebCore::V8Proxy::utilityContext):
- (WebCore::V8Proxy::constructDOMObject):
- (WebCore::throwError):
- (WebCore::toV8):
- * bindings/v8/V8Utilities.h:
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::WorkerContextExecutionProxy::retrieve):
- (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
- (WebCore::WorkerContextExecutionProxy::GetConstructor):
- (WebCore::WorkerContextExecutionProxy::ToV8Object):
- (WebCore::WorkerContextExecutionProxy::EventToV8Object):
- (WebCore::WorkerContextExecutionProxy::toV8):
- (WebCore::WorkerContextExecutionProxy::forgetV8EventObject):
- (WebCore::WorkerContextExecutionProxy::evaluate):
- (WebCore::WorkerContextExecutionProxy::runScript):
- * bindings/v8/custom/V8AttrCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::NAMED_PROPERTY_SETTER):
- * bindings/v8/custom/V8CanvasPixelArrayCustom.cpp:
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
- (WebCore::toV8):
- (WebCore::toCanvasStyle):
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8ClientRectListCustom.cpp:
- (WebCore::INDEXED_PROPERTY_GETTER):
- * bindings/v8/custom/V8ClipboardCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8CustomBinding.cpp:
- (WebCore::allowSettingFrameSrcToJavascriptUrl):
- (WebCore::ACCESSOR_GETTER):
- (WebCore::INDEXED_ACCESS_CHECK):
- (WebCore::NAMED_ACCESS_CHECK):
- (WebCore::V8Custom::GetTargetFrame):
- * bindings/v8/custom/V8CustomEventListener.cpp:
- (WebCore::V8EventListener::V8EventListener):
- (WebCore::V8EventListener::~V8EventListener):
- (WebCore::V8EventListener::callListenerFunction):
- * bindings/v8/custom/V8CustomSQLStatementCallback.cpp:
- (WebCore::V8CustomSQLStatementCallback::handleEvent):
- * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
- (WebCore::V8CustomSQLStatementErrorCallback::handleEvent):
- * bindings/v8/custom/V8CustomSQLTransactionCallback.cpp:
- (WebCore::V8CustomSQLTransactionCallback::handleEvent):
- * bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp:
- (WebCore::V8CustomSQLTransactionErrorCallback::handleEvent):
- * bindings/v8/custom/V8CustomVoidCallback.cpp:
- (WebCore::V8CustomVoidCallback::handleEvent):
- (WebCore::invokeCallback):
- * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
- (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
- * bindings/v8/custom/V8DOMParserConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8DOMWindowCustom.cpp:
- (WebCore::V8Custom::WindowSetTimeoutImpl):
- (WebCore::convertBase64):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::ACCESSOR_GETTER):
- (WebCore::createWindow):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::V8Custom::ClearTimeoutImpl):
- (WebCore::NAMED_ACCESS_CHECK):
- (WebCore::INDEXED_ACCESS_CHECK):
- * bindings/v8/custom/V8DatabaseCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8DocumentCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8DocumentLocationCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8ElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::ACCESSOR_GETTER):
- * bindings/v8/custom/V8EventCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- (WebCore::ACCESSOR_GETTER):
- * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
- (WebCore::getNamedItems):
- (WebCore::getItem):
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::ACCESSOR_GETTER):
- * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::NAMED_PROPERTY_SETTER):
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- (WebCore::INDEXED_PROPERTY_SETTER):
- * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::removeElement):
- * bindings/v8/custom/V8InspectorControllerCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8LocationCustom.cpp:
- (WebCore::ACCESSOR_SETTER):
- (WebCore::ACCESSOR_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::INDEXED_ACCESS_CHECK):
- (WebCore::NAMED_ACCESS_CHECK):
- * bindings/v8/custom/V8MessageChannelConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8MessagePortCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
- (WebCore::INDEXED_PROPERTY_GETTER):
- (WebCore::NAMED_PROPERTY_GETTER):
- * bindings/v8/custom/V8NavigatorCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- * bindings/v8/custom/V8NodeCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8NodeIteratorCustom.cpp:
- (WebCore::toV8):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8NodeListCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8SQLTransactionCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8SVGLengthCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8SVGMatrixCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8StyleSheetListCustom.cpp:
- (WebCore::NAMED_PROPERTY_GETTER):
- * bindings/v8/custom/V8TreeWalkerCustom.cpp:
- (WebCore::toV8):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WebKitPointConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::SetTimeoutOrInterval):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WorkerCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- (WebCore::getEventListener):
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
- (WebCore::getEventListener):
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
- (WebCore::ACCESSOR_GETTER):
- (WebCore::ACCESSOR_SETTER):
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8XMLSerializerConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8XPathEvaluatorConstructor.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-06-26 Kevin McCullough <kmccullough@apple.com>
-
- Reviewed by Tim Hatcher.
-
- <rdar://problem/7011047> Profiler shows the record button 'on' even
- though it's finished
-
- I consolidated the creation of the user initiated profile name into
- its own function and then called it from console::profile instead of
- calling startUserInitiatedProfiling(). This way we don't call
- toggleRecordButton() which turns on the record button.
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::didCommitLoad):
- (WebCore::InspectorController::getCurrentUserInitiatedProfileName):
- (WebCore::InspectorController::startUserInitiatedProfiling):
- (WebCore::InspectorController::stopUserInitiatedProfiling):
- * inspector/InspectorController.h:
- * page/Console.cpp:
- (WebCore::Console::profile):
- (WebCore::Console::profileEnd):
-
-2009-06-26 Jeremy Moskovich <jeremy@chromium.org>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26691
-
- Cleanup: Move focusRingColor to RenderTheme.
-
- Most of this CL involves deleting files and removing dead code.
-
- focusRingColor() is now defined in RenderTheme rather than in
- misc. places on each port. The default color is specified as
- black in renderTheme and ports can override it in their own
- custom renderThemes.
-
- Behavior should be identical except for the following cases,
- this lists platform and what the focus ring color used to be
- before this cl and the file where it used to be defined:
-
- Android - red
- WebCore/platform/android/TemporaryLinkStubs.cpp
-
- Cairo - aqua focus ring color - 0xFF7DADD9
- WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
-
- wx - red
- WebCore/platform/wx/TemporaryLinkStubs.cpp
-
- QT - black
- WebCore/platform/graphics/qt/GraphicsContextQt.cpp
-
- Manual test: manual-tests/focusringcolor-change-on-theme-change.html
-
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
- * manual-tests/focusringcolor-change-on-theme-change.html: Added.
- * platform/android/TemporaryLinkStubs.cpp:
- * platform/graphics/cairo/GraphicsContextCairo.cpp:
- * platform/graphics/chromium/ColorChromium.cpp: Removed.
- * platform/graphics/chromium/ColorChromiumMac.mm: Removed.
- * platform/graphics/mac/ColorMac.h:
- * platform/graphics/mac/ColorMac.mm:
- (WebCore::oldAquaFocusRingColor):
- (WebCore::setUsesTestModeFocusRingColor):
- (WebCore::usesTestModeFocusRingColor):
- * platform/graphics/qt/GraphicsContextQt.cpp:
- * platform/graphics/skia/GraphicsContextSkia.cpp:
- (WebCore::GraphicsContext::drawFocusRing):
- * platform/graphics/win/ColorSafari.cpp: Removed.
- * platform/wx/TemporaryLinkStubs.cpp:
- * rendering/RenderTheme.cpp:
- (WebCore::RenderTheme::focusRingColor):
- * rendering/RenderTheme.h:
- * rendering/RenderThemeChromiumMac.h:
- * rendering/RenderThemeChromiumMac.mm:
- (WebCore::RenderThemeChromiumMac::focusRingColor):
- (WebCore::RenderThemeChromiumMac::systemColor):
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::focusRingColor):
- * rendering/RenderThemeChromiumSkia.h:
- * rendering/RenderThemeMac.h:
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderThemeMac::focusRingColor):
- (WebCore::RenderThemeMac::systemColor):
- * rendering/RenderThemeSafari.cpp:
- (WebCore::makeRGBAFromCGColor):
- (WebCore::RenderThemeSafari::focusRingColor):
- * rendering/RenderThemeSafari.h:
-
-2009-06-26 Dmitry Titov <dimich@chromium.org>
-
- Reviewed by David Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=26761
- [Chromium] Enable Dedicated Workers in Chromium.
-
- * bindings/v8/custom/V8WorkerCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- Remove the check that prevented workers from being created w/o a command-line switch.
- The flag itself and methods will be removed in a subsequent patch, after
- corresponding change in Chromium.
-
-2009-06-26 Jessie Berlin <jberlin@apple.com>
-
- Reviewed by Mark Rowe.
-
- Fix: https://bugs.webkit.org/show_bug.cgi?id=26723
- Where the m_mouseDown event was never being set on windows, so the
- client X and Y coordinates were always being reported as zero in a
- dragstart handler.
-
- Test: editing/selection/drag-start-event-client-x-y.html
-
- * page/EventHandler.cpp:
- (WebCore::EventHandler::handleMousePressEvent):
- Set the m_mouseDown event when the mouse press is handled.
- * page/mac/EventHandlerMac.mm:
- (WebCore::EventHandler::mouseDown):
- Removed now redundant setting of m_mouseDown.
-
-2009-06-26 Brady Eidson <beidson@apple.com>
-
- Tiger build fix
-
- * WebCore.xcodeproj/project.pbxproj:
- * platform/network/mac/WebCoreURLResponse.mm:
- (swizzleMIMETypeMethodIfNecessary):
-
-2009-06-26 Alexey Proskuryakov <ap@webkit.org>
-
- Reviewed by Sam Weinig.
-
- https://bugs.webkit.org/show_bug.cgi?id=26681
- Problem updating applicationCache when server returns 304
-
- Improve the fix, make the test pass on Tiger.
-
- * loader/appcache/ApplicationCacheGroup.cpp:
- (WebCore::ApplicationCacheGroup::didReceiveResponse): Fix another code path to remove the
- current item from list.
-
- * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::start): On Tiger,
- conditional requests that cannot be cached by network layer cause errors with default cache
- policy.
-
-2009-06-26 Brady Eidson <beidson@apple.com>
-
- Reviewed by Sam Weinig
-
- <rdar://problem/6961578> REGRESSION (r43511): Opening .fdf files from Acrobat Professional fails
-
- When we disabled content sniffing for file urls we lost knowledge of many file extensions that we
- didn't intend to lose. Turns out the CoreTypes UTI database doesn't know about every extension Gatekeeper
- knew about.
-
- By comparing CoreTypes' database to Gatekeepers, this patch adds a hardcoded list of file extension to MIME
- type mappings that are missing in CoreType's database.
-
- Test: platform/mac/fast/loader/file-url-mimetypes.html
-
- * platform/network/mac/ResourceHandleMac.mm:
- (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Move the MIME Type swizzling code to
- WebCoreURLResponse.
-
- * platform/network/mac/ResourceResponseMac.mm:
- (WebCore::ResourceResponse::platformLazyInit): _webcore_MIMEType -> MIMEType, as we now have only one place
- where we do all MIMEType correction.
-
- * platform/network/mac/WebCoreURLResponse.h: Remove _webcore_MIMEType, as it is now folded into the swizzled
- implementation of MIMEType.
- * platform/network/mac/WebCoreURLResponse.mm:
- (createBinaryExtensionsSet):
- (createExtensionToMIMETypeMap):
- (swizzleMIMETypeMethodIfNecessary):
- (webNSURLResponseMIMEType): If it's a file URL and there's no MIME type, see if the extension exists in the
- extension -> MIME type map before turning to the default MIME type. Also roll in what was previously
- implemented in _webcore_MIMEType.
-
- * svg/graphics/SVGImage.cpp:
- (WebCore::SVGImage::~SVGImage): Tweak this ASSERT - SVGImages might get destroyed without ever having a client.
-
-2009-06-25 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Simon Fraser.
-
- Show the fullscreen button only if the backend has support for it.
-
- https://bugs.webkit.org/show_bug.cgi?id=26661
-
- No test since this is not reachable via the DOM.
-
- * html/HTMLMediaElement.h:
- (WebCore::HTMLMediaElement::supportsFullscreen): new
- * html/HTMLVideoElement.h:
- (WebCore::HTMLVideoElement::supportsFullscreen): new
- * platform/graphics/MediaPlayer.cpp:
- (WebCore::NullMediaPlayerPrivate::supportsFullscreen): new
- (WebCore::MediaPlayer::supportsFullscreen): new
- * platform/graphics/MediaPlayer.h: new
- * platform/graphics/MediaPlayerPrivate.h: new
- (WebCore::MediaPlayerPrivateInterface::supportsFullscreen): new
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlFullscreenButtonElement::rendererIsNeeded): new
- * rendering/MediaControlElements.h:
-
-2009-06-25 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/7007776> Controller doesn't automatically update counters when file
- is playing ( http://www.jazzguitar.be/mp3/Michael%20Lewis%20-%20SSSJ.mp3 )
-
- Update the time display when the movie time changes.
-
- * rendering/RenderMedia.cpp:
- (WebCore::RenderMedia::updateControls):
-
-2009-06-25 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Simon Fraser.
-
- https://bugs.webkit.org/show_bug.cgi?id=26659
-
- Support hidding a control bar element from the Media element controller.
-
- Update layout tests since the fullscreen button no longer has a renderer.
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaTextDisplayElement::update): call updateStyle() so everything
- is updated properly.
- (WebCore::MediaControlInputElement::MediaControlInputElement):
- (WebCore::MediaControlInputElement::update): call updateStyle()
- (WebCore::MediaControlInputElement::updateStyle): create the renderer properly
- or not depending on what rendererIsNeeded() return.
- * rendering/MediaControlElements.h:
-
-2009-06-26 Kevin McCullough <kmccullough@apple.com>
-
- Reviewed by Oliver Hunt.
-
- <rdar://problem/6968137> Profiler title numbers increment even after a
- reload.
-
- - Now the numbers are reset when the profiles are.
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::didCommitLoad):
-
-2009-06-26 Adele Peterson <adele@apple.com>
-
- Reviewed by Darin Adler.
-
- Fix for <rdar://problem/7000796>
- REGRESSION(34681): Breaking up quoted text makes new, unquoted text blue after certain steps; repros with some messages
-
- Test: editing/inserting/break-blockquote-after-delete.html
-
- Keep track of whether the typing style should be preserved after the TypingCommand is applied. When adding onto an open
- typing command, keep that flag up to date.
-
- In this case, an InsertParagraphSeparatorInQuotedContent command, which should not preserve typing style,
- was following an open Delete command, which does preserve the typing style. So we were applying the original
- typing style (from before the delete, so blue text) to the cursor in the unquoted area after breaking up the blockquote.
-
- * editing/TypingCommand.cpp:
- (WebCore::TypingCommand::TypingCommand):
- (WebCore::TypingCommand::typingAddedToOpenCommand):
- (WebCore::TypingCommand::insertTextRunWithoutNewlines):
- (WebCore::TypingCommand::insertLineBreak):
- (WebCore::TypingCommand::insertParagraphSeparator):
- (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
- (WebCore::TypingCommand::deleteKeyPressed):
- (WebCore::TypingCommand::forwardDeleteKeyPressed):
- (WebCore::TypingCommand::deleteSelection):
- (WebCore::TypingCommand::updatePreservesTypingStyle):
- * editing/TypingCommand.h: (WebCore::TypingCommand::preservesTypingStyle):
-
-2009-06-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Add support for saving and loading of QWebHistory to and from a QByteArray.
-
- This includes streaming operators for QWebHistory. for convenience.
-
- New autotests that test QWebHistory and QWebHistoryItem serialization.
-
- * WebCore.pro:
- * history/HistoryItem.h:
- (WebCore::HistoryItem::dailyVisitCounts):
- (WebCore::HistoryItem::weeklyVisitCounts):
- * history/qt/HistoryItemQt.cpp: Added.
- (WebCore::HistoryItem::restoreState):
- (WebCore::HistoryItem::saveState):
-
-2009-06-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Add support for QDataStream operators to String and IntPoint.
-
- * platform/graphics/IntPoint.h:
- (WebCore::operator<<):
- (WebCore::operator>>):
- * platform/text/PlatformString.h:
- * platform/text/qt/StringQt.cpp:
- (WebCore::operator<<):
- (WebCore::operator>>):
-
-2009-06-26 Ben Murdoch <benm@google.com>
-
- Reviewed by Darin Fisher.
-
- Add #if ENABLE(DOM_STORAGE) to the V8 custom bindings for local/session storage.
- https://bugs.webkit.org/show_bug.cgi?id=26757
-
- * bindings/v8/custom/V8StorageCustom.cpp
-
-2009-06-26 Yongjun Zhang <yongjun.zhang@nokia.com>
-
- Reviewed by Eric Seidel.
-
- Test: platform/qt/fast/events/event-sender-keydown-frame.html
-
- Bug 20303: [Qt] Key events are not working in frames.
+ (WebCore::blendFunc):
- Merge scrolling handling code in qt and win port, move it to
- EventHandler.
+2010-01-30 Gustavo Noronha Silva <gns@gnome.org>
- * page/EventHandler.cpp:
- (WebCore::EventHandler::scrollRecursively):
- * page/EventHandler.h:
-
-2009-06-26 Rob Buis <rwlbuis@gmail.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26682
- Bug 26682: It should be possible to add image to SVG DOM programmatically (using JavaScript)
-
- Make sure the xlink:href animated property setting syncs the corresponding attribute with the right namespace.
-
- Test: svg/custom/createImageElement.svg
-
- * svg/SVGAnimatedProperty.h:
- (WebCore::synchronizeProperty):
-
-2009-06-26 Takeshi Yoshino <tyoshino@google.com>
-
- Reviewed by Timothy Hatcher.
-
- Bug 26156: In view-source mode, always render the contents using HTMLViewSourceDocument
- https://bugs.webkit.org/show_bug.cgi?id=26156
-
- When in view-source mode, render the contents using HTMLViewSourceDocument
- regardless it's applicable for any plugin or not.
-
- Chromium tells WebCore to render the contents of specified URL when
- view-source: prefix is added to the URL. But currently, DOMImplementation
- ignores inViewSourceMode() when the MIME type is indicating that the contents
- are neither texts nor HTML family documents.
-
- For example, we can check the contents of asf file without launching media
- player. Rendering contents for view-source:-specified input is not what user
- expects.
-
- http://code.google.com/p/chromium/issues/detail?id=10545
-
- I want to fix this issue by this patch. IMHO, regardless of this Chromium
- specific issue, I think we should force use of HTMLViewSourceDocument when
- inViewSourceMode() is specified.
-
- Test: fast/frames/viewsource-on-image-file.html
-
- * dom/DOMImplementation.cpp:
- (WebCore::DOMImplementation::createDocument):
- * html/HTMLViewSourceDocument.cpp:
- (WebCore::HTMLViewSourceDocument::createTokenizer):
- * html/HTMLViewSourceDocument.h:
-
-2009-06-26 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Jan Alonzo.
-
- https://bugs.webkit.org/show_bug.cgi?id=25529
- [Gtk] Expected states not exposed to assistive technologies
-
- Add support for VISIBLE, EDITABLE and SENSITIVE states.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (setAtkStateSetFromCoreObject):
-
-2009-06-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Darin Adler.
-
- "Pointer to incomplete class type is not allowed" error with RVCT
- https://bugs.webkit.org/show_bug.cgi?id=26721
-
- Based on Norbert Leser's work.
-
- * dom/Document.cpp:
- (WebCore::Document::setFocusedNode):
- * dom/Node.cpp:
- (WebCore::Node::dispatchMouseEvent):
- * dom/Node.h: Remove the default value for PassRefPtr<Event> args,
- to eliminate dependency on the Event class definition
-
-2009-06-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Maciej Stachowiak.
-
- [Qt] Build fix after r45183
- https://bugs.webkit.org/show_bug.cgi?id=26748
-
- * WebCore.pro:
-
-2009-06-25 Alexey Proskuryakov <ap@webkit.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=26681
- <rdar://problem/7003461> Problem updating applicationCache when server returns 304
-
- Test: http/tests/appcache/update-cache.html
-
- * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::didReceiveResponse):
- We're already done with the resource, don't try to load it again.
-
-2009-06-25 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Oliver Hunt.
-
- <rdar://problem/6990481>
-
- Handle perspective computation on non-layer objects.
-
- Test: transforms/3d/general/perspective-non-layer.html
-
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::getTransformFromContainer):
-
-2009-06-25 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26653
-
- Use flex box in the mediaControls.css style, to nicely scale if a button gets
- dynamically added or removed.
-
- Media tests results are affected by this changes.
-
- * css/mediaControls.css:
- * css/mediaControlsQT.css:
-
-2009-06-25 Albert J. Wong <ajwong@chromium.org>
-
- Reviewed by Darin Fisher.
-
- https://bugs.webkit.org/show_bug.cgi?id=26724
-
- Move relavent part of setDefaultFontSize from RenderThemeChromiumWin
- up into RenderThemeChromiumSkia.
-
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::setDefaultFontSize):
- * rendering/RenderThemeChromiumSkia.h:
- * rendering/RenderThemeChromiumWin.cpp:
- (WebCore::RenderThemeChromiumWin::setDefaultFontSize):
- * rendering/RenderThemeChromiumWin.h:
-
-2009-06-25 Matt Perry <mpcomplete@chromium.org>
-
- Reviewed by Darin Fisher.
-
- https://bugs.webkit.org/show_bug.cgi?id=26733
-
- Add V8-only methods to FrameLoaderClient that V8 can use to send
- out notifications when it creates/destroys a script context.
-
- * loader/EmptyClients.h:
- (WebCore::EmptyFrameLoaderClient::didCreateScriptContext):
- (WebCore::EmptyFrameLoaderClient::didDestroyScriptContext):
- * loader/FrameLoaderClient.h:
- (WebCore::FrameLoaderClient::didCreateScriptContext):
- (WebCore::FrameLoaderClient::didDestroyScriptContext):
-
-2009-06-25 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by David Levin.
-
- Correct a few typos that snuck in when I was reformatting CodeGeneratorV8.pm
- to match WebKit style.
-
- * bindings/scripts/CodeGeneratorV8.pm: Corrected lots of typos.
-
-2009-06-25 Adam Langley <agl@google.com>
-
- TBRed: fix for Chromium tree.
-
- Add missing include for r45199.
-
- https://bugs.webkit.org/show_bug.cgi?id=26736
-
- r45199 added a reference to throwError without including V8Proxy.h
-
- * bindings/v8/WorkerScriptController.cpp:
-
-2009-06-25 Adam Langley <agl@google.com>
-
- TBRed: fix for Chromium tree.
-
- https://bugs.webkit.org/show_bug.cgi?id=26735
-
- Fix V8IsolatedWorld to point to the correct include file.
-
- The deprecated v8_index.h was removed from the Chromium tree in r19291
- and upstreamed into WebKit with r45193. However V8IsolatedWorld
- slipped in between the cracks and broke the build.
-
- * bindings/v8/V8IsolatedWorld.h: update with new header location.
-
-2009-06-25 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser <simon.fraser@apple.com>.
-
- https://bugs.webkit.org/show_bug.cgi?id=26651
-
- Preference is named "WebKitAcceleratedCompositingEnabled"
- and is a boolean value. When false, prevents compositing layers from
- being created, which prevents hardware animation from running.
- Also forces video to do software rendering. Added a cache for
- the flag in RenderLayerCompositing and made it all work
- on-the-fly when the flag is changed while a page is loaded.
-
- * WebCore.base.exp:
- * page/FrameView.cpp:
- (WebCore::FrameView::updateCompositingLayers):
- * page/Settings.cpp:
- (WebCore::setNeedsReapplyStylesInAllFrames):
- (WebCore::Settings::Settings):
- (WebCore::Settings::setAcceleratedCompositingEnabled):
- * page/Settings.h:
- (WebCore::Settings::acceleratedCompositingEnabled):
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::hasAcceleratedCompositing):
- (WebCore::RenderLayer::updateTransform):
- (WebCore::RenderLayer::currentTransform):
- * rendering/RenderLayer.h:
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::updateLayerTransform):
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::RenderLayerCompositor):
- (WebCore::RenderLayerCompositor::enableCompositingMode):
- (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingEnabledFlag):
- (WebCore::RenderLayerCompositor::updateCompositingLayers):
- (WebCore::RenderLayerCompositor::canAccelerateVideoRendering):
- (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
- (WebCore::RenderLayerCompositor::needsToBeComposited):
- (WebCore::RenderLayerCompositor::destroyRootPlatformLayer):
- * rendering/RenderLayerCompositor.h:
- (WebCore::RenderLayerCompositor::hasAcceleratedCompositing):
- * rendering/RenderObject.h:
- (WebCore::makeMatrixRenderable):
-
-2009-06-25 Jian Li <jianli@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Bug 26701: Implement the missing code for "FIXME: Need to return an
- exception" in WorkerScriptController::evaluate for v8 bindings.
- https://bugs.webkit.org/show_bug.cgi?id=26701
-
- * bindings/v8/WorkerScriptController.cpp:
- (WebCore::WorkerScriptController::evaluate):
-
-2009-06-25 Nate Chapin <japhet@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Upstream V8Index.
-
- https://bugs.webkit.org/show_bug.cgi?id=26495
-
- * bindings/v8/V8Index.cpp: Added.
- (WebCore::V8ClassIndex::GetFactory): Moved from src.chromium.org.
- (WebCore::V8ClassIndex::GetCache): Moved from src.chromium.org.
- * bindings/v8/V8Index.h:
- (WebCore::V8ClassIndex::): Moved from src.chromium.org.
- (WebCore::V8ClassIndex::ToInt): Moved from src.chromium.org.
- (WebCore::V8ClassIndex::FromInt): Moved from src.chromium.org.
-
-2009-06-25 Adam Langley <agl@google.com>
-
- Reviewed by Darin Fisher.
-
- https://bugs.webkit.org/show_bug.cgi?id=26529
-
- This is hopefully the last step before our renderers can run
- cleanly in a chroot.
-
- WebKit needs to be able to ask for the correct font to use in
- the case that the current font doesn't include glyphs for
- certain code points. Currently we make a fontconfig call in our
- WebKit port to handle this.
-
- This patch changes this so that the call is sent our via
- ChromiumBridge.
-
- http://codereview.chromium.org/132007
-
- This should not affect any layout tests.
-
- * platform/chromium/ChromiumBridge.h:
- * platform/graphics/chromium/FontCacheLinux.cpp:
- (WebCore::FontCache::getFontDataForCharacters):
-
-2009-06-25 Albert J. Wong <ajwong@chromium.org>
-
- Reviewed by David Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=26566
- Upstream these files from the chromium v8 code. No tests were
- affected because this is essentially a code move.
-
- * bindings/v8/NPV8Object.cpp: Added.
- (allocV8NPObject):
- (freeV8NPObject):
- (listFromVariantArgs):
- (npIdentifierToV8Identifier):
- (npCreateV8ScriptObject):
- (NPN_Invoke):
- (NPN_InvokeDefault):
- (NPN_Evaluate):
- (NPN_EvaluateHelper):
- (NPN_GetProperty):
- (NPN_SetProperty):
- (NPN_RemoveProperty):
- (NPN_HasProperty):
- (NPN_HasMethod):
- (NPN_SetException):
- (NPN_Enumerate):
- (NPN_Construct):
- * bindings/v8/NPV8Object.h: Added.
- (PrivateIdentifier::):
- * bindings/v8/V8NPUtils.cpp: Added.
- (convertV8ObjectToNPVariant):
- (convertNPVariantToV8Object):
- (getStringIdentifier):
- * bindings/v8/V8NPUtils.h: Added.
-
-2009-06-25 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- https://bugs.webkit.org/show_bug.cgi?id=26436
-
- Windows Chromium bug fix: save context of destination canvas in
- TransparencyWin::compositeTextComposite() before the function
- modifies the context.
-
- Test: fast/canvas/translate-text.html
-
- * platform/graphics/chromium/TransparencyWin.cpp:
- (WebCore::TransparencyWin::compositeTextComposite):
-
-2009-06-25 Patrick Mueller <Patrick_Mueller@us.ibm.com>
-
- Reviewed by Timothy Hatcher.
-
- Show the filename and first line for "(program)" in the Profiler/Debugger
- https://bugs.webkit.org/show_bug.cgi?id=25475
-
- Add support to associate a sourceURL with an eval()'d string
- via a @sourceURL comment. Currently the sourceURL is only available
- in the script debugger, not in the console or profiler, but it's
- most needed in the script debugger.
-
- * English.lproj/localizedStrings.js: added new "(program): %s" string
- * inspector/front-end/Script.js:
- (WebInspector.Script): if no sourceURL is available for the Script,
- search for a comment of the form //@ sourceURL=(url) to use
- as the sourceURL instead.
- * manual-tests/inspector/named-evals.html: Added.
-
-2009-06-25 John Gregg <johnnyg@google.com>
-
- Reviewed by Sam Weinig.
-
- Bug 23721: Changing dropdown's selectedIndex within onchange handler fires another onchange
- https://bugs.webkit.org/show_bug.cgi?id=23721
-
- onchange events fire when a SELECT element has
- focus and the selectedIndex is updated by script in some way--either
- during another onchange, onkeypress, onfocus, or timer--and then
- focus is lost.
-
- Fixed by making a separate method for user-driven selectedIndex
- changes, leaving scripts to use one which doesn't cause onchange to
- be queued.
-
- Test: fast/forms/select-script-onchange.html
-
- * dom/SelectElement.cpp: check if the pending change is user driven
- before calling onchange
- (WebCore::SelectElement::menuListOnChange):
- (WebCore::SelectElement::setSelectedIndex):
- * dom/SelectElement.h: store whether the pending change is user driven
- (WebCore::SelectElementData::userDrivenChange):
- (WebCore::SelectElementData::setUserDrivenChange):
- * html/HTMLSelectElement.cpp: split into two methods -- script version
- [non-user-driven] corresponds to IDL defined property name
- (WebCore::HTMLSelectElement::setSelectedIndex):
- (WebCore::HTMLSelectElement::setSelectedIndexByUser):
- * html/HTMLSelectElement.h:
- * rendering/RenderMenuList.cpp: use ByUser method when coming through
- the renderer
- (WebCore::RenderMenuList::valueChanged):
-
-2009-06-25 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- https://bugs.webkit.org/show_bug.cgi?id=26698
-
- Combined LocalStorageArea and SessionStorageArea into StorageArea since
- (after my other refactorings) there are no longer substantial
- differences between the two.
-
- * GNUmakefile.am:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * storage/LocalStorage.cpp:
- (WebCore::LocalStorage::storageArea):
- * storage/LocalStorage.h:
- * storage/LocalStorageArea.cpp: Removed.
- * storage/LocalStorageArea.h: Removed.
- * storage/SessionStorage.cpp:
- (WebCore::SessionStorage::copy):
- (WebCore::SessionStorage::storageArea):
- * storage/SessionStorage.h:
- * storage/SessionStorageArea.cpp: Removed.
- * storage/SessionStorageArea.h: Removed.
- * storage/StorageArea.cpp:
- (WebCore::StorageArea::createLocalStorage):
- (WebCore::StorageArea::StorageArea):
- (WebCore::StorageArea::createSessionStorage):
- (WebCore::StorageArea::copy):
- (WebCore::StorageArea::setItem):
- (WebCore::StorageArea::removeItem):
- (WebCore::StorageArea::clear):
- (WebCore::StorageArea::scheduleFinalSync):
- (WebCore::StorageArea::blockUntilImportComplete):
- (WebCore::StorageArea::dispatchStorageEvent):
- * storage/StorageArea.h:
- * storage/StorageAreaSync.cpp:
- (WebCore::StorageAreaSync::StorageAreaSync):
- (WebCore::StorageAreaSync::scheduleFinalSync):
- (WebCore::StorageAreaSync::syncTimerFired):
- (WebCore::StorageAreaSync::performImport):
- * storage/StorageAreaSync.h:
- * storage/StorageSyncManager.h:
-
-2009-06-25 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Darin Adler.
-
- - fix https://bugs.webkit.org/show_bug.cgi?id=26671
- <rdar://problem/7001880> Safari 4.0 crashes in
- WebCore::DOMTimer::fired()
-
- Test: fast/dom/style-sheet-candidate-remove-unrendered-document.html
-
- When a "style sheet candidate" element is removed from a document,
- call Document::removeStyleSheetCandidateNode() regardless of whether
- the document is rendered. Otherwise, the document's style sheet
- candidate set can end up containing stale references.
-
- * dom/ProcessingInstruction.cpp:
- (WebCore::ProcessingInstruction::removedFromDocument):
- * html/HTMLLinkElement.cpp:
- (WebCore::HTMLLinkElement::removedFromDocument):
- * html/HTMLStyleElement.cpp:
- (WebCore::HTMLStyleElement::removedFromDocument):
-
-2009-06-25 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Update CodeGeneratorV8.pm to sync up with the changes downstream.
-
- * bindings/scripts/CodeGeneratorV8.pm: Added HTMLFrameSetElement check,
- FileList as a ref-counted type, and DataGridColumn as typeCanFailConversion.
-
-2009-06-25 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, build fix.
-
- Add FileList.h include to fix Chromium build.
-
- * platform/chromium/ClipboardChromium.cpp: Added FileList.h include.
-
-2009-06-25 Joseph Pecoraro <joepeck02@gmail.com>
-
- Reviewed by Jan Alonzo.
-
- Bug 26489: Web Inspector: Typo in DatabaseQuery Error Message
- https://bugs.webkit.org/show_bug.cgi?id=26489
-
- Fixed a Typo in a Web Inspector error message.
-
- * English.lproj/localizedStrings.js:
- * inspector/front-end/DatabaseQueryView.js:
- (WebInspector.DatabaseQueryView.prototype._queryError):
-
-2009-06-25 Simon Hausmann <simon.hausmann@nokia.com>
-
- Fix the Qt build, add missing StorageAreaSync files to the build.
-
- * WebCore.pro:
-
-2009-06-25 Simon Hausmann <simon.hausmann@nokia.com>
-
- Reviewed by and done with Tor Arne Vestbø.
-
- Fix shortcut keyboard handling with plugins on the Qt/Mac build.
-
- When we receive shortcut events like Ctrl+V then the text in the QKeyEvent is
- empty. If we're asked to disambiguate the event into a Char keyboard event,
- we try to detect this situation and still set the text, to ensure that the
- general event handling sends a key press event after this disambiguation.
-
- * platform/qt/PlatformKeyboardEventQt.cpp:
- (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
-
-2009-06-25 Eric Seidel <eric@webkit.org>
-
- Build fix only, no review.
-
- Add FileList.h and NotImplemented.h includes in an attempt to fix bots.
-
- * platform/gtk/ClipboardGtk.cpp:
- * platform/qt/ClipboardQt.cpp:
- * platform/win/ClipboardWin.cpp:
- * platform/wx/ClipboardWx.cpp:
-
-2009-05-21 Eric Seidel <eric@webkit.org>
-
- Reviewed by Maciej Stachowiak.
-
- Expose files in the clipboard in ondrop events
- https://bugs.webkit.org/show_bug.cgi?id=25916
-
- Make it possible for applications like gmail to implement
- drag and drop of attachments onto email messages.
-
- This patch exposes an event.dataTransfer.files accessor
- on the drop event. No information is exposed during dragover.
- This follows the HTML 5 drag and drop security model:
- http://www.w3.org/TR/html5/editing.html#security-risks-in-the-drag-and-drop-model
- The test http/tests/security/clipboard/clipboard-file-access.html
- verifies this behavior.
-
- Internet Explorer shows historical documentation of supporting
- getData('File') as a way of exposing files on the pasteboard. The current version of their docs:
- http://msdn.microsoft.com/en-us/library/ms537658(VS.85).aspx
- has removed this reference (as far as I can tell IE never implemented it)
- I have a printed copy of that URL from 2008 on my desk describing getData('File') in IE.
- IE does not follow the HTML5 clipboard security model and always allows access to the full clipboard, even on dragover.
-
- I choose not to use IE's getData('File') and instead added .files
- so that the accessor could have a type, matching WebKit's existing
- .files accessor on HTMLInputElement.
-
- Mozilla has equivalent file access:
- event.dataTransfer.mozGetDataAt("application/x-moz-file", 0);
- which also does not return a typed value.
- https://developer.mozilla.org/En/DragDrop/Recommended_Drag_Types#Dragging_Files
-
- This is only implemented for Mac WebKit. All other platforms (including Apple's Win WebKit)
- have incomplete Clipboard implementations and will require experts from those platforms
- to add this functionality. Right now they all have Clipboard*::files() methods which call notImplemented();
-
- Test: http/tests/security/clipboard/clipboard-file-access.html
-
- * dom/Clipboard.h:
- * dom/Clipboard.idl:
- * platform/chromium/ClipboardChromium.cpp:
- (WebCore::ClipboardChromium::files):
- * platform/chromium/ClipboardChromium.h:
- * platform/gtk/ClipboardGtk.cpp:
- (WebCore::ClipboardGtk::files):
- * platform/gtk/ClipboardGtk.h:
- * platform/mac/ClipboardMac.h:
- * platform/mac/ClipboardMac.mm:
- (WebCore::absoluteURLsFromPasteboardFilenames):
- (WebCore::absoluteURLsFromPasteboard):
- (WebCore::ClipboardMac::files):
- * platform/qt/ClipboardQt.cpp:
- (WebCore::ClipboardQt::files):
- * platform/qt/ClipboardQt.h:
- * platform/win/ClipboardWin.cpp:
- (WebCore::ClipboardWin::files):
- * platform/win/ClipboardWin.h:
- * platform/wx/ClipboardWx.cpp:
- (WebCore::ClipboardWx::files):
- * platform/wx/ClipboardWx.h:
-
-2009-06-25 Eric Seidel <eric@webkit.org>
-
- No review, only completing revert of r45144.
-
- Add back files deleted by r45144.
-
- * storage/LocalStorageArea.cpp: Added.
- (WebCore::LocalStorageArea::create):
- (WebCore::LocalStorageArea::LocalStorageArea):
- (WebCore::LocalStorageArea::scheduleFinalSync):
- (WebCore::LocalStorageArea::itemChanged):
- (WebCore::LocalStorageArea::itemRemoved):
- (WebCore::LocalStorageArea::areaCleared):
- (WebCore::LocalStorageArea::blockUntilImportComplete):
- (WebCore::LocalStorageArea::dispatchStorageEvent):
- * storage/LocalStorageArea.h: Added.
- * storage/SessionStorageArea.cpp: Added.
- (WebCore::SessionStorageArea::copy):
- (WebCore::SessionStorageArea::SessionStorageArea):
- (WebCore::SessionStorageArea::itemChanged):
- (WebCore::SessionStorageArea::itemRemoved):
- (WebCore::SessionStorageArea::areaCleared):
- (WebCore::SessionStorageArea::blockUntilImportComplete):
- (WebCore::SessionStorageArea::dispatchStorageEvent):
- * storage/SessionStorageArea.h: Added.
- (WebCore::SessionStorageArea::create):
-
-2009-06-25 Eric Seidel <eric@webkit.org>
-
- No review, reverting r45144 only.
-
- Roll out r45144 after 18 test failures appeared on the bots.
- https://bugs.webkit.org/show_bug.cgi?id=26698
-
- * GNUmakefile.am:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * storage/LocalStorage.cpp:
- (WebCore::LocalStorage::storageArea):
- * storage/LocalStorage.h:
- * storage/SessionStorage.cpp:
- (WebCore::SessionStorage::copy):
- (WebCore::SessionStorage::storageArea):
- * storage/SessionStorage.h:
- * storage/StorageArea.cpp:
- (WebCore::StorageArea::StorageArea):
- (WebCore::StorageArea::~StorageArea):
- (WebCore::StorageArea::setItem):
- (WebCore::StorageArea::removeItem):
- (WebCore::StorageArea::clear):
- * storage/StorageArea.h:
- * storage/StorageAreaSync.cpp:
- (WebCore::StorageAreaSync::StorageAreaSync):
- (WebCore::StorageAreaSync::scheduleFinalSync):
- (WebCore::StorageAreaSync::syncTimerFired):
- (WebCore::StorageAreaSync::performImport):
- * storage/StorageAreaSync.h:
- * storage/StorageSyncManager.h:
-
-2009-06-24 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- https://bugs.webkit.org/show_bug.cgi?id=26698
-
- Combined LocalStorageArea and SessionStorageArea into StorageArea since
- (after my other refactorings) there are no longer substantial
- differences between the two.
-
- * GNUmakefile.am:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * storage/LocalStorage.cpp:
- (WebCore::LocalStorage::storageArea):
- * storage/LocalStorage.h:
- * storage/LocalStorageArea.cpp: Removed.
- * storage/LocalStorageArea.h: Removed.
- * storage/SessionStorage.cpp:
- (WebCore::SessionStorage::copy):
- (WebCore::SessionStorage::storageArea):
- * storage/SessionStorage.h:
- * storage/SessionStorageArea.cpp: Removed.
- * storage/SessionStorageArea.h: Removed.
- * storage/StorageArea.cpp:
- (WebCore::StorageArea::createLocalStorage):
- (WebCore::StorageArea::StorageArea):
- (WebCore::StorageArea::createSessionStorage):
- (WebCore::StorageArea::copy):
- (WebCore::StorageArea::setItem):
- (WebCore::StorageArea::removeItem):
- (WebCore::StorageArea::clear):
- (WebCore::StorageArea::scheduleFinalSync):
- (WebCore::StorageArea::blockUntilImportComplete):
- (WebCore::StorageArea::dispatchStorageEvent):
- * storage/StorageArea.h:
- * storage/StorageAreaSync.cpp:
- (WebCore::StorageAreaSync::StorageAreaSync):
- (WebCore::StorageAreaSync::scheduleFinalSync):
- (WebCore::StorageAreaSync::syncTimerFired):
- (WebCore::StorageAreaSync::performImport):
- * storage/StorageAreaSync.h:
- * storage/StorageSyncManager.h:
-
-2009-06-24 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Simon Fraser.
-
- - fix <rdar://problem/7001817> REGRESSION (r41902): Base position track
- at UCSC Genome Browser doesn't work because image map prevents img
- from hit-testing
-
- Test: fast/replaced/image-map-2.html
-
- * rendering/RenderImage.cpp:
- (WebCore::RenderImage::nodeAtPoint): Do not reset 'inside' to false if
- the image map failed the hit test.
-
-2009-06-22 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- https://bugs.webkit.org/show_bug.cgi?id=26366
-
- Refactor V8DOMMap to support isolated worlds.
-
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::evaluateInNewWorld):
- * bindings/v8/ScriptController.h:
- * bindings/v8/V8DOMMap.cpp:
- (WebCore::DOMDataStore::InternalDOMWrapperMap::InternalDOMWrapperMap):
- (WebCore::DOMDataStore::allStores):
- (WebCore::DOMDataStore::allStoresMutex):
- (WebCore::DOMDataStore::domData):
- (WebCore::ScopedDOMDataStore::ScopedDOMDataStore):
- (WebCore::ScopedDOMDataStore::~ScopedDOMDataStore):
- (WebCore::StaticDOMDataStore::StaticDOMDataStore):
- (WebCore::):
- (WebCore::MainThreadDOMData::MainThreadDOMData):
- (WebCore::MainThreadDOMData::getStore):
- (WebCore::ChildThreadDOMData::ChildThreadDOMData):
- (WebCore::ChildThreadDOMData::getStore):
- (WebCore::DOMDataStore::DOMDataStore):
- (WebCore::DOMDataStore::~DOMDataStore):
- (WebCore::DOMDataStoreHandle::DOMDataStoreHandle):
- (WebCore::DOMDataStoreHandle::~DOMDataStoreHandle):
- (WebCore::forget):
- (WebCore::getDOMNodeMap):
- (WebCore::getDOMObjectMap):
- (WebCore::getActiveDOMObjectMap):
- (WebCore::getDOMSVGElementInstanceMap):
- (WebCore::getDOMSVGObjectWithContextMap):
- (WebCore::DOMData::getCurrent):
- (WebCore::DOMData::handleWeakObject):
- (WebCore::DOMData::ensureDeref):
- (WebCore::weakDOMObjectCallback):
- (WebCore::weakActiveDOMObjectCallback):
- (WebCore::weakNodeCallback):
- (WebCore::weakSVGElementInstanceCallback):
- (WebCore::weakSVGObjectWithContextCallback):
- (WebCore::DOMData::derefObject):
- (WebCore::DOMData::derefDelayedObjects):
- (WebCore::DOMData::derefDelayedObjectsInCurrentThread):
- (WebCore::DOMData::removeObjectsFromWrapperMap):
- (WebCore::removeAllDOMObjectsInCurrentThreadHelper):
- (WebCore::visitDOMNodesInCurrentThread):
- (WebCore::visitDOMObjectsInCurrentThread):
- (WebCore::visitActiveDOMObjectsInCurrentThread):
- (WebCore::visitDOMSVGElementInstancesInCurrentThread):
- (WebCore::visitSVGObjectsInCurrentThread):
- * bindings/v8/V8DOMMap.h:
- (WebCore::DOMDataStoreHandle::getStore):
- * bindings/v8/V8IsolatedWorld.cpp: Added.
- (WebCore::getIsolatedWorldKey):
- (WebCore::contextWeakReferenceCallback):
- (WebCore::V8IsolatedWorld::evaluate):
- (WebCore::V8IsolatedWorld::V8IsolatedWorld):
- (WebCore::V8IsolatedWorld::~V8IsolatedWorld):
- (WebCore::V8IsolatedWorld::getEntered):
- * bindings/v8/V8IsolatedWorld.h: Added.
- (WebCore::V8IsolatedWorld::getDOMDataStore):
-
-2009-06-24 Mikhail Naganov <mnaganov@chromium.org>
-
- Reviewed by Timothy Hatcher.
-
- Bug 26604: Search doesn't work in Web Inspector Profiler
- https://bugs.webkit.org/show_bug.cgi?id=26604
-
- Seems like search was damaged in revision 42808.
-
- * inspector/front-end/ProfileView.js:
- (WebInspector.ProfileView.prototype.refresh):
- Here and in other functions: nodes we're searching in are profile data grid
- nodes, so there is no more need for '_dataGridNode' references.
- (WebInspector.ProfileView.prototype.searchCanceled):
- (WebInspector.ProfileView.prototype.performSearch.matchesQuery):
- Fixed accidental semicolon that caused 'matchesQuery' always return true.
- (WebInspector.ProfileView.prototype.performSearch):
- To perform search correctly in the case of bottom up tree, we need to populate
- the tree, because there's no 1-to-1 correspondence between profile nodes and
- data grid nodes in this case.
- (WebInspector.ProfileView.prototype._jumpToSearchResult):
-
-2009-06-24 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Darin Adler.
-
- <rdar://problem/6450239&6574516>
-
- Fix flashing issues caused by compositing layers rendering content before
- a deferred layout has happened. Because the -viewWillDraw machinery doesn't
- work for composited layers, we need to use scheduleViewUpdate() to queue
- up a layout via the run loop observer in WebKit, whenever we know we
- are going to be painting soon.
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::setContentsNeedDisplay):
- (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
-
-2009-06-24 David Levin <levin@chromium.org>
-
- Fix all builds.
-
- * ForwardingHeaders/wtf/FastAllocBase.h: Added.
-
-2009-06-24 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- https://bugs.webkit.org/show_bug.cgi?id=26658
-
- Split the syncing portions of LocalStorageArea into StorageAreaSync.
- This name will make more sense in the next patch (in this set) when
- LocalStorageArea and SessionStorageArea are merged to become simply
- StorageArea. (Thus the synching portion of StorageArea is in
- StorageAreaSync.)
-
- This looks like a big patch, but really all it's doing is splitting
- code and patching split-related things up.
-
- * GNUmakefile.am:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * storage/LocalStorageArea.cpp:
- (WebCore::LocalStorageArea::create):
- (WebCore::LocalStorageArea::LocalStorageArea):
- (WebCore::LocalStorageArea::scheduleFinalSync):
- (WebCore::LocalStorageArea::itemChanged):
- (WebCore::LocalStorageArea::itemRemoved):
- (WebCore::LocalStorageArea::areaCleared):
- (WebCore::LocalStorageArea::blockUntilImportComplete):
- * storage/LocalStorageArea.h:
- * storage/LocalStorageTask.cpp:
- (WebCore::LocalStorageTask::LocalStorageTask):
- * storage/LocalStorageTask.h:
- (WebCore::LocalStorageTask::createImport):
- (WebCore::LocalStorageTask::createSync):
- * storage/LocalStorageThread.cpp:
- (WebCore::LocalStorageThread::scheduleImport):
- (WebCore::LocalStorageThread::scheduleSync):
- * storage/LocalStorageThread.h:
- * storage/SessionStorageArea.cpp:
- (WebCore::SessionStorageArea::blockUntilImportComplete):
- * storage/SessionStorageArea.h:
- * storage/StorageArea.h:
- * storage/StorageAreaSync.cpp: Copied from WebCore/storage/LocalStorageArea.cpp.
- * storage/StorageAreaSync.h: Copied from WebCore/storage/LocalStorageArea.h.
- * storage/StorageSyncManager.cpp:
- (WebCore::StorageSyncManager::scheduleImport):
- (WebCore::StorageSyncManager::scheduleSync):
- * storage/StorageSyncManager.h:
-
-2009-06-24 Adam Treat <adam.treat@torchmobile.com>
-
- Fix Qt build.
-
- * WebCore.pro:
-
-2009-06-24 David Levin <levin@chromium.org>
-
- Reviewed by David Hyatt.
-
- Bug 26696: Member functions in DataGridColumnList should return pointers instead of PassRefPtr.
- https://bugs.webkit.org/show_bug.cgi?id=26696
-
- * html/DataGridColumnList.cpp:
- (WebCore::DataGridColumnList::itemWithName):
- (WebCore::DataGridColumnList::add):
- * html/DataGridColumnList.h:
- (WebCore::DataGridColumnList::item):
- (WebCore::DataGridColumnList::primaryColumn):
- (WebCore::DataGridColumnList::sortColumn):
-
-2009-06-24 Sam Weinig <sam@webkit.org>
-
- Reviewed by Dave "Messy" Hyatt.
-
- Little bit of style cleanup.
-
- * html/DataGridColumn.cpp:
- * html/DataGridColumn.h:
- * html/DataGridColumn.idl:
- * html/DataGridColumnList.cpp:
- * html/DataGridColumnList.h:
- * html/DataGridColumnList.idl:
- * html/HTMLDataGridCellElement.cpp:
- * html/HTMLDataGridCellElement.h:
- * html/HTMLDataGridCellElement.idl:
- * html/HTMLDataGridColElement.cpp:
- * html/HTMLDataGridColElement.h:
- * html/HTMLDataGridColElement.idl:
- * html/HTMLDataGridElement.h:
- * html/HTMLDataGridElement.idl:
- * html/HTMLDataGridRowElement.cpp:
- * html/HTMLDataGridRowElement.h:
- * html/HTMLDataGridRowElement.idl:
-
-2009-06-24 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Oliver Hunt.
-
- Bug 26668: AX: need a way to retrieve the language for an element
-
- Provides a way to retrieve the language associated with a specific accessibility element.
-
- Test: accessibility/language-attribute.html
-
- * accessibility/AccessibilityObject.cpp:
- (WebCore::AccessibilityObject::language):
- * accessibility/AccessibilityObject.h:
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::language):
- * accessibility/AccessibilityRenderObject.h:
- * accessibility/mac/AccessibilityObjectWrapper.mm:
- (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
-
-2009-06-24 Brady Eidson <beidson@apple.com>
-
- Reviewed by Dan Bernstein.
-
- <rdar://problem/6893811> Instead of downloading files linked from Google Earth, file contents displayed in browser window as text.
-
- * platform/network/mac/WebCoreURLResponse.mm:
- (createBinaryExtensionsSet): Add '.kmz' to the list of known-to-be-binary extensions.
-
-2009-06-24 Nicolas Weber <thakis@chromium.org>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26685
- Accomodate for backwards-incompatible skia api changes.
-
- * platform/graphics/skia/GraphicsContextSkia.cpp:
- (WebCore::GraphicsContext::clearRect):
- (WebCore::GraphicsContext::setCompositeOperation):
- * platform/graphics/skia/ImageBufferSkia.cpp:
- (WebCore::ImageBuffer::ImageBuffer):
- * platform/graphics/skia/ImageSkia.cpp:
- (WebCore::paintSkBitmap):
- (WebCore::Image::drawPattern):
- * platform/graphics/skia/PlatformContextSkia.cpp:
- (PlatformContextSkia::State::State):
- (PlatformContextSkia::setupPaintCommon):
- (PlatformContextSkia::setXfermodeMode):
- (PlatformContextSkia::applyClipFromImage):
- * platform/graphics/skia/PlatformContextSkia.h:
- * platform/graphics/skia/SkiaUtils.cpp:
- (WebCore::):
- (WebCore::WebCoreCompositeToSkiaComposite):
- * platform/graphics/skia/SkiaUtils.h:
-
-2009-06-24 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Gtk build fix. Add files that were added in r45093 and r45096
-
- * GNUmakefile.am:
-
-2009-06-24 Brady Eidson <beidson@apple.com>
-
- Fix 64-bit SnowLeopard build.
-
- * html/DataGridColumnList.cpp:
- (WebCore::DataGridColumnList::remove):
- (WebCore::DataGridColumnList::move):
-
-2009-06-24 Rob Buis <rwlbuis@gmail.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26392
- Bug 26392: In html, modification of xlink:href of an newly inserted svg image does not work.
- https://bugs.webkit.org/show_bug.cgi?id=26328
- Bug 26328: changing href attribute of svg images does not work when changing display attribute as well
-
- React to href updates even when there is no renderer, i.e. display=none.
-
- Tests: svg/custom/js-update-image-and-display.svg
- svg/custom/js-update-image-and-display2.svg
- svg/custom/js-update-image-and-display3.svg
-
- * svg/SVGImageElement.cpp:
- (WebCore::SVGImageElement::svgAttributeChanged):
-
-2009-06-24 David Hyatt <hyatt@apple.com>
-
- Reviewed by Sam Weinig.
-
- https://bugs.webkit.org/show_bug.cgi?id=26687
-
- Add basic back-end column support to datagrid.
-
- Added fast/dom/HTMLDataGridElement/ column tests.
-
- * DerivedSources.cpp:
- * DerivedSources.make:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * html/DataGridColumn.cpp: Added.
- (WebCore::DataGridColumn::setPrimary):
- * html/DataGridColumn.h: Added.
- (WebCore::DataGridColumn::create):
- (WebCore::DataGridColumn::id):
- (WebCore::DataGridColumn::setId):
- (WebCore::DataGridColumn::label):
- (WebCore::DataGridColumn::setLabel):
- (WebCore::DataGridColumn::type):
- (WebCore::DataGridColumn::setType):
- (WebCore::DataGridColumn::sortable):
- (WebCore::DataGridColumn::setSortable):
- (WebCore::DataGridColumn::sortDirection):
- (WebCore::DataGridColumn::setSortDirection):
- (WebCore::DataGridColumn::primary):
- (WebCore::DataGridColumn::detachFromColumnList):
- (WebCore::DataGridColumn::DataGridColumn):
- * html/DataGridColumn.idl: Added.
- * html/DataGridColumnList.cpp: Added.
- (WebCore::DataGridColumnList::~DataGridColumnList):
- (WebCore::DataGridColumnList::itemWithName):
- (WebCore::DataGridColumnList::add):
- (WebCore::DataGridColumnList::remove):
- (WebCore::DataGridColumnList::move):
- (WebCore::DataGridColumnList::clear):
- (WebCore::DataGridColumnList::primaryColumnChanged):
- * html/DataGridColumnList.h: Added.
- (WebCore::DataGridColumnList::create):
- (WebCore::DataGridColumnList::length):
- (WebCore::DataGridColumnList::item):
- (WebCore::DataGridColumnList::primaryColumn):
- (WebCore::DataGridColumnList::sortColumn):
- * html/DataGridColumnList.idl: Added.
- * html/HTMLDataGridColElement.cpp:
- (WebCore::HTMLDataGridColElement::sortable):
- (WebCore::HTMLDataGridColElement::setSortable):
- (WebCore::HTMLDataGridColElement::sortDirection):
- (WebCore::HTMLDataGridColElement::setSortDirection):
- * html/HTMLDataGridColElement.h:
- * html/HTMLDataGridColElement.idl:
- * html/HTMLDataGridElement.cpp:
- (WebCore::HTMLDataGridElement::HTMLDataGridElement):
- * html/HTMLDataGridElement.h:
- (WebCore::HTMLDataGridElement::columns):
- * html/HTMLDataGridElement.idl:
- * rendering/RenderDataGrid.cpp:
- (WebCore::RenderDataGrid::paintObject):
- (WebCore::RenderDataGrid::paintColumnHeaders):
- (WebCore::RenderDataGrid::rebuildColumns):
- * rendering/RenderDataGrid.h:
- (WebCore::RenderDataGrid::gridElement):
-
-2009-06-24 Jessie Berlin <jberlin@apple.com>
-
- Reviewed by Adam Roben.
-
- Partially fixes: https://bugs.webkit.org/show_bug.cgi?id=24735
- (<rdar://problem/5015942>)
- Where on windows it was not possible to set an element as the drag
- image using setDragImage on the dataTransfer object.
-
- Does not "fix" the case of dragging a link where the default link image
- is still used, even when the -webkit-user-drag is set to "element". This
- is the same behavior as is found on OS X.
-
- Added a manual test because it is not possible to check that what is
- contained in the image snapshot is indeed the requested element.
-
- * dom/Clipboard.h:
- (WebCore::Clipboard::dragImageElement):
- Made getting the raw pointer from the RefPtr a const operation.
- * manual-tests/drag-with-div-or-image-as-data-image.html: Added.
- * platform/win/ClipboardWin.cpp:
- (WebCore::ClipboardWin::createDragImage):
- Get an image of the rendered element and its subtree.
-
-2009-06-24 Darin Fisher <darin@chromium.org>
-
- Reviewed by David Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=26683
- Fix Chromium build bustage: Add custom binding for HTMLDataGridElement.dataSource
-
- This change just adds a stub implementation for now to help fix the build.
-
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8HTMLDataGridElementCustom.cpp: Added.
-
-2009-06-24 David Kilzer <ddkilzer@apple.com>
-
- Build fixes for ENABLE(PLUGIN_PROXY_FOR_VIDEO)
-
- Reviewed by Adam Roben.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::deliverNotification): Removed
- ExceptionCode parameter from togglePlayState().
- (WebCore::HTMLMediaElement::initialURL): Don't convert a KURL
- object to a String when assigning to a KURL variable.
-
-2009-06-24 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by Adam Treat.
-
- Save memory by not storing attribute values in member variables, if not absolutely needed.
- Also fixes bugs where we're substituting variables too early (noticeable with the upcoming <select> element).
-
- * wml/WMLDoElement.cpp:
- (WebCore::WMLDoElement::parseMappedAttribute):
- (WebCore::WMLDoElement::label):
- * wml/WMLDoElement.h:
- * wml/WMLFieldSetElement.cpp:
- (WebCore::WMLFieldSetElement::insertedIntoDocument):
- * wml/WMLFieldSetElement.h:
- * wml/WMLOptGroupElement.cpp:
- (WebCore::WMLOptGroupElement::title):
- (WebCore::WMLOptGroupElement::parseMappedAttribute):
- (WebCore::WMLOptGroupElement::groupLabelText):
- * wml/WMLOptGroupElement.h:
- * wml/WMLPostfieldElement.cpp:
- (WebCore::WMLPostfieldElement::name):
- (WebCore::WMLPostfieldElement::value):
- (WebCore::WMLPostfieldElement::encodeData):
- * wml/WMLPostfieldElement.h:
- * wml/WMLSetvarElement.cpp:
- (WebCore::WMLSetvarElement::parseMappedAttribute):
- (WebCore::WMLSetvarElement::name):
- (WebCore::WMLSetvarElement::value):
- * wml/WMLSetvarElement.h:
- * wml/WMLTimerElement.cpp:
- (WebCore::WMLTimerElement::parseMappedAttribute):
- (WebCore::WMLTimerElement::insertedIntoDocument):
- (WebCore::WMLTimerElement::timerFired):
- (WebCore::WMLTimerElement::start):
- (WebCore::WMLTimerElement::value):
- * wml/WMLTimerElement.h:
-
-2009-06-24 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Reviewed by Adam Roben.
-
- Forgot to initialize m_task member variable. Results in crashes sometimes.
-
- * wml/WMLAnchorElement.cpp:
- (WebCore::WMLAnchorElement::WMLAnchorElement):
-
-2009-06-24 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
-
- Not reviewed. Forgot to include within last patch.
-
- * manual-tests/wml/card-title-attr.wml: Added.
-
-2009-06-24 Wajahat Siddiqui <wajahatmeister@gmail.com>
-
- Reviewed by Nikolas Zimmermann.
-
- Fixes: https://bugs.webkit.org/show_bug.cgi?id=26474
- Adding WML <card> title attribute handling.
-
- * wml/WMLElement.h: marking parseValueSubstitutingVariableReferences and parseValueForbiddingVariableReferences as const
- * wml/WMLElement.cpp:
- * wml/WMLCardElement.h:
- (WebCore::WMLCardElement::title):
- * wml/WMLCardElement.cpp:
- * wml/manual-test/card-title-attr.wml: Manual test
-
-2009-06-24 Simon Hausmann <simon.hausmann@nokia.com>
-
- Reviewed by Tor Arne Vestbø.
-
- Fix the build without ENABLE_VIDEO.
-
- * html/CanvasRenderingContext2D.cpp: Add #if ENABLE guards.
- * html/CanvasRenderingContext2D.h: Ditto.
-
-2009-06-24 Siddhartha Chattopadhyay <sidchat@google.com>
-
- Reviewed by Eric Seidel.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=26200 which I introduced earlier. I had
- the smartReplace set TRUE initially, which was wrong since the purpose of this call is
- to just replace the selection, and place the caret at the end of the selection it replaced.
-
- * editing/Editor.cpp:
- (WebCore::Editor::markMisspellingsAfterTypingToPosition):
- * manual-tests/textarea-caret-position-after-auto-spell-correct.html: Added.
-
-2009-06-24 Kevin Watters <kevinwatters@gmail.com>
-
- Reviewed by Kevin Ollivier.
-
- Don't use an unsigned int for intervalInMS because we sometimes initialize
- it with a negative value.
-
- * platform/wx/SharedTimerWx.cpp:
- (WebCore::setSharedTimerFireTime):
-
-2009-06-24 Eric Seidel <eric@webkit.org>
-
- No review, build fix only.
-
- The previous checkin had an improper merge. This fixes the build.
-
- * page/DragController.cpp:
- (WebCore::DragController::tryDocumentDrag):
-
-2009-06-05 Eric Seidel <eric@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- https://bugs.webkit.org/show_bug.cgi?id=25922
- JS setting dropEffect = "none" causes tryDHTMLDrag
- to return DragOperationNone. Which is also the value
- tryDHTMLDrag previously used to indicate JS did not
- want to handle the drag.
-
- Make it possible for the DragController::try* methods
- to return a bool to indicate if javascript accepted
- or rejected the drag event, separate from the DragOperation.
-
- Tests:
- - fast/events/drag-to-navigate.html
- - fast/events/prevent-drag-to-navigate.html
-
- * page/DragController.cpp:
- (WebCore::DragController::dragEnteredOrUpdated):
- (WebCore::DragController::tryDocumentDrag):
- (WebCore::defaultOperationForDrag):
- (WebCore::DragController::tryDHTMLDrag):
- * page/DragController.h:
-
-2009-06-23 Oliver Hunt <oliver@apple.com> and Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Sam Weinig and Dave Hyatt.
-
- <rdar://problem/6164797> Add Canvas API to allow drawing of <video> frames
- <https://bugs.webkit.org/show_bug.cgi?id=25920>
-
- Add support for drawing the contents of the video element to the canvas
- in accordance with the current HTML5 draft.
-
- Test: media/video-canvas.html
-
- * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
- (WebCore::JSCanvasRenderingContext2D::drawImage):
- Standard custom bindings stuff we need to do for all canvas methods.
- * html/CanvasRenderingContext2D.cpp:
- (WebCore::size): Helper function for finding the size of a video element
- (WebCore::CanvasRenderingContext2D::checkOrigin): moved up in the file.
- (WebCore::CanvasRenderingContext2D::drawImage): The various overloads of HTML5's drawImage(<video>)
- * html/CanvasRenderingContext2D.h:
- * html/HTMLMediaElement.h:
- (WebCore::HTMLMediaElement::hasSingleSecurityOrigin):
- hasSingleSecurityOrigin is needed for security, currently all implementations are trivial
- as we force QT to maintain a single origin.
- * html/HTMLVideoElement.cpp:
- (WebCore::HTMLVideoElement::paint):
- Paint routine on video so we don't have to look at MediaPlayer directly
- * html/HTMLVideoElement.h:
- * platform/graphics/MediaPlayer.cpp:
- (WebCore::NullMediaPlayerPrivate::hasSingleSecurityOrigin):
- (WebCore::MediaPlayer::hasSingleSecurityOrigin):
- Default implementations of hasSingleSecurityOrigin
- * platform/graphics/MediaPlayer.h:
- * platform/graphics/MediaPlayerPrivate.h:
- * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::setUpVideoRendering):
- A video may need a player now even if it is not visible.
- (WebCore::MediaPlayerPrivate::hasSingleSecurityOrigin):
- Always return true due to restrictions we've placed on QT.
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
- (WebCore::MediaPlayerPrivate::paint):
- Jump through some hoops to allow windows QT to draw to an intermediate buffer.
- In the long term we'd like to cache the HDC, but this will do for now.
- (WebCore::MediaPlayerPrivate::hasSingleSecurityOrigin):
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
- As for Mac we force QT to only allow same origin loads.
-
-2009-06-23 Adam Langley <agl@google.com>
-
- Reviewed by Eric Seidel.
-
- Chromium: Fix crash with inherited font-size in <option>
-
- https://bugs.webkit.org/show_bug.cgi?id=26656
- http://code.google.com/p/chromium/issues/detail?id=14853
-
- In r42597 (https://bugs.webkit.org/show_bug.cgi?id=25244), I changed
- the <select> handing for Chromium to fix a rendering bug. However,
- although the font-size is correctly ignored, getRowHeight wasn't
- updated and so was calculating the height of the rows in an
- inconsistent manner. This can lead to a crash.
-
- * manual-tests/optgroup-empty-and-nested.html: adding test case for crash
- * platform/chromium/PopupMenuChromium.cpp:
- (WebCore::PopupListBox::getRowHeight):
-
-2009-06-23 Brady Eidson <beidson@apple.com>
-
- Patch by Antti Koivisto.
- Reviewed by Brady Eidson.
-
- <rdar://problem/6988010> Failed resources not reloaded when built against Tiger SDK
-
- A latent bug that cache revalidation uncovered. When a CachedResource failed to load,
- it should always be revalidated upon reload.
-
- * loader/CachedResource.cpp:
- (WebCore::CachedResource::canUseCacheValidator):
- (WebCore::CachedResource::mustRevalidate):
-
-2009-06-23 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Darin Adler.
-
- - fix <rdar://problem/6634228> Crash in [NSScroller mouseDown:] beneath
- EventHandler::passMouseDownEventToWidget()
-
- * page/mac/EventHandlerMac.mm:
- (WebCore::EventHandler::passMouseDownEventToWidget): Surround the
- -mouseDown: call with calls to Widget::beforeMouseDown() and
- Widget::afterMouseDown(), which prevent the widget's view hierarchy from
- being removed from its parent view while the scroller is tracking the
- mouse.
-
-2009-06-23 Sam Weinig <sam@webkit.org>
-
- Reviewed by Dave Hyatt.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=26516
- Add initial implementation of DataGridDataSource
-
- - Initial implementation only supports the initialize callback function.
-
- Test: fast/dom/HTMLDataGridElement/DataGridDataSource-basic.html
-
- * WebCore.xcodeproj/project.pbxproj:
- * GNUmakefile.am:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * bindings/js/JSDataGridDataSource.cpp: Added.
- (WebCore::JSDataGridDataSource::JSDataGridDataSource):
- (WebCore::JSDataGridDataSource::~JSDataGridDataSource):
- (WebCore::JSDataGridDataSource::initialize):
- * bindings/js/JSDataGridDataSource.h: Added.
- (WebCore::JSDataGridDataSource::create):
- (WebCore::JSDataGridDataSource::isJSDataGridDataSource):
- (WebCore::JSDataGridDataSource::jsDataSource):
- (WebCore::asJSDataGridDataSource):
- * bindings/js/JSHTMLDataGridElementCustom.cpp: Added.
- (WebCore::JSHTMLDataGridElement::listener):
- (WebCore::JSHTMLDataGridElement::setListener):
- * html/DataGridDataSource.h: Added.
- (WebCore::DataGridDataSource::~DataGridDataSource):
- (WebCore::DataGridDataSource::isJSDataGridDataSource):
- * html/HTMLDataGridElement.cpp:
- (WebCore::HTMLDataGridElement::HTMLDataGridElement):
- (WebCore::HTMLDataGridElement::setDataSource):
- (WebCore::HTMLDataGridElement::initializationTimerFired):
- * html/HTMLDataGridElement.h:
- (WebCore::HTMLDataGridElement::dataSource):
- * html/HTMLDataGridElement.idl:
-
-2009-06-23 Ryosuke Niwa <rniwa@google.com>
-
- Reviewed by Justin Garcia.
-
- Undo the changeset 21212 to fix the regression bug 14062.
- The changeset 21212 attempted to fix rdar://problem/5002441.
- The changeset 21212 modified InsertTextCommand::input so as to convert
- all spaces in text to non-breaking spaces for rdar://problem/5002441.
- However, the bug was originally caused by rebalanceWhitespaceAt
- and this workaround introduced a regression bug 14062.
- Because rebalanceWhitespaceAt appears to behave correctly now,
- the workaround introduced in 21212 is no longer needed.
-
- Test: editing/inserting/space-after-removeformat.html
-
- * editing/InsertTextCommand.cpp:
- (WebCore::InsertTextCommand::input):
-
-2009-06-23 Beth Dakin <bdakin@apple.com>
-
- Reviewed by Dave Hyatt.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=26523 <col>
- elements width can't be changed with javascript
-
- This patch both fixes setting the width attribute directly in
- JavaScript, and setting the width on the style attribute.
-
- * html/HTMLTableColElement.cpp:
- (WebCore::HTMLTableColElement::parseMappedAttribute): If we have a
- new width, call setNeedsLayoutAndPrefWidthsRecalc()
-
- Call calcPrefWidths() on the table cols.
- * rendering/AutoTableLayout.cpp:
- (WebCore::AutoTableLayout::recalcColumn):
- * rendering/FixedTableLayout.cpp:
- (WebCore::FixedTableLayout::calcWidthArray):
-
- Call layoutIfNeeded on the table cols.
- * rendering/RenderTable.cpp:
- (WebCore::RenderTable::layout):
-
- * rendering/RenderTableCol.cpp:
- (WebCore::RenderTableCol::clippedOverflowRectForRepaint): Use new
- table() convenience function.
- (WebCore::RenderTableCol::calcPrefWidths): Just call
- setPrefWidthsDirty(false) on ourself and our children.
- (WebCore::RenderTableCol::table):
- * rendering/RenderTableCol.h:
-
-2009-06-23 Ojan Vafai <ojan@chromium.org>
-
- Reviewed by Dan Bernstein.
-
- Add logic to CSSStyleDeclaration::diff to deal with font-sizes that are
- keyword values. When diff is called on a CSSStyleDeclaration, we check
- the keywordSize to see if font-size matches a keyword value.
-
- This ensures that when we diff a CSSMutableStyleDeclaration returned from
- copyInheritableProperties on a CSSComputedStyleDeclaration that we
- correctly identify matching font-sizes.
-
- https://bugs.webkit.org/show_bug.cgi?id=26279
-
- Test: editing/inserting/font-size-clears-from-typing-style.html
-
- * css/CSSComputedStyleDeclaration.cpp:
- (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
- * css/CSSComputedStyleDeclaration.h:
- * css/CSSStyleDeclaration.cpp:
- (WebCore::CSSStyleDeclaration::cssPropertyMatches):
- (WebCore::CSSStyleDeclaration::diff):
- * css/CSSStyleDeclaration.h:
-
-2009-06-23 Kevin McCullough <kmccullough@apple.com>
-
- Reviewed by Darin Adler.
-
- <rdar://problem/6994790> CrashTracer: [USER] 8 crashes in Mail trying to
- add a blank line to pasted Facebook content (under
- CompositeEditCommand::positionAvoidingSpecialElementBoundary)
-
- - Just added null checks and I will create a new bug to prevent the
- bad behavior.
-
- * editing/CompositeEditCommand.cpp:
- (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
-
-2009-06-23 Simon Fraser <simon.fraser@apple.com>
-
- Build fix.
-
- Wrap shouldDoSoftwarePaint() in #if USE(ACCELERATED_COMPOSITING) to avoid warning when
- ACCELERATED_COMPOSITING is not defined.
-
- * rendering/RenderLayer.cpp:
-
-2009-06-23 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt.
-
- https://bugs.webkit.org/show_bug.cgi?id=24863
-
- Fix reflection painting on elements with compositing layers.
-
- Test: compositing/reflections/reflection-on-composited.html
-
- * rendering/RenderLayer.h:
- Add a new PaintLayerPaintingReflection flag which is set while painting inside
- reflections.
- (WebCore::RenderLayer::setPaintingInsideReflection):
- Add a setter so that RenderLayerBacking can call it.
-
- * rendering/RenderLayer.cpp:
- (WebCore::shouldDoSoftwarePaint):
- Utility to clarify the logic of when a composited layer should do a software paint.
-
- (WebCore::RenderLayer::paintLayer):
- Use shouldDoSoftwarePaint() to determine when to software-paint a reflected layer.
- Remove transform-related tests from the reflection-painting if test because they appear
- to be unnecessary.
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::paintIntoLayer):
- Add the code to paint reflections to the composited layer painting method.
-
- * rendering/RenderReplica.cpp:
- (WebCore::RenderReplica::paint):
- Set the PaintLayerPaintingReflection flag.
-
-2009-06-23 Antti Koivisto <antti@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=26643
- Memory cache should respect Cache-Control: no-store
-
- Make resources with Cache-Control: no-store uncacheable in the memory cache.
- They get evicted immediately when all clients are gone and are always
- reloaded from the server.
-
- Conforms to RFC2616 14.9.2 and seems also match Firefox behavior.
-
- * loader/CachedResource.cpp:
- (WebCore::CachedResource::removeClient):
- (WebCore::CachedResource::canUseCacheValidator):
- (WebCore::CachedResource::mustRevalidate):
- * platform/network/ResourceResponseBase.cpp:
- (WebCore::ResourceResponseBase::ResourceResponseBase):
- (WebCore::ResourceResponseBase::parseCacheControlDirectives):
- (WebCore::ResourceResponseBase::cacheControlContainsNoStore):
- * platform/network/ResourceResponseBase.h:
-
-2009-06-23 Brady Eidson <beidson@apple.com>
-
- Windows build fix.
-
- * platform/graphics/win/QTMovieWin.cpp:
- (QTMovieWin::play):
- (QTMovieWin::pause):
- (QTMovieWin::setRate):
- (QTMovieWin::setCurrentTime):
-
-2009-06-23 Kevin McCullough <kmccullough@apple.com>
-
- Reviewed by Adele Peterson.
-
- <rdar://problem/6902203> REGRESSION: 'Return' insertion point incorrect
- after manually quoting blank line then hitting return
-
- If the insertion point is both the begining and ending visible position
- then we need to insert at the end instead of the begining, which is what
- would normally happen if the insertion point was as the begining.
-
- * editing/BreakBlockquoteCommand.cpp:
- (WebCore::BreakBlockquoteCommand::doApply):
-
-2009-06-23 Brady Eidson <beidson@apple.com>
-
- Reviewed by Sam Weinig, and looked over by Eric Carlson.
-
- <rdar://problem/6980466> Media elements should provide option for changing pitch correction
-
- Introduce a new boolean property to HTMLMediaElement called webkitPreservesPitch for script to control this.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::HTMLMediaElement): Currently the platforms that have a flexible pitch preservation
- property (Quicktime on Mac and Win) have had it on by default, so continue that default for now.
- (WebCore::HTMLMediaElement::loadResource):
- (WebCore::HTMLMediaElement::webkitPreservesPitch):
- (WebCore::HTMLMediaElement::setWebkitPreservesPitch):
- * html/HTMLMediaElement.h:
- * html/HTMLMediaElement.idl:
-
- * platform/graphics/MediaPlayer.cpp:
- (WebCore::NullMediaPlayerPrivate::setPreservesPitch):
- (WebCore::MediaPlayer::MediaPlayer):
- (WebCore::MediaPlayer::preservesPitch):
- (WebCore::MediaPlayer::setPreservesPitch):
- * platform/graphics/MediaPlayer.h:
- * platform/graphics/MediaPlayerPrivate.h:
- (WebCore::MediaPlayerPrivateInterface::setPreservesPitch):
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
- (WebCore::MediaPlayerPrivate::createQTMovie): Rework to allow recreation of the movie with almost the
- exact same attributes as before, with pitch preservation being the difference.
- (WebCore::MediaPlayerPrivate::setPreservesPitch): Recreate the QTMovie if the flag actually changes.
- (WebCore::MediaPlayerPrivate::updateStates): Restore current time and rate if this is a recreated movie.
- (WebCore::MediaPlayerPrivate::timeChanged): Clear the time-to-be-restored, as this callback means it
- has been effectively overwritten.
-
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
- (WebCore::MediaPlayerPrivate::load):
- (WebCore::MediaPlayerPrivate::setPreservesPitch):
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
- * platform/graphics/win/QTMovieWin.cpp:
- (QTMovieWinPrivate::QTMovieWinPrivate):
- (QTMovieWinPrivate::~QTMovieWinPrivate):
- (QTMovieWinPrivate::task): Restore current time and rate if this is a re-created movie.
- (QTMovieWin::play): Clear the time-to-be-restored, as this effectively overwrites it.
- (QTMovieWin::pause): Ditto.
- (QTMovieWin::setRate): Ditto.
- (QTMovieWin::setCurrentTime): Ditto.
- (QTMovieWin::setPreservesPitch): Recreate the Movie if the flag actually changes.
- (QTMovieWin::load): Rework to allow recreation of the Movie with similar state as the movie before it,
- but changing the pitch preservation flag.
- * platform/graphics/win/QTMovieWin.h:
-
-2009-06-23 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/6998286> Crash after leaving page with <video>
-
- Don't try to post events after going into the page cache.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::documentWillBecomeInactive): Cancel pending events and stop
- event timers so we won't try to post events after going into the cache.
-
-2009-06-23 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Brady Eidson.
-
- Simplify the interaction between LocalStorageArea/SessionStorageArea
- and StorageArea by creating a "blockUntilImportComplete()" function
- rather than bouncing back and forth between the child and parent
- classes in a somewhat unintuitive manner.
-
- This patch also paves the way for LocalStorageArea and
- SessionStorageArea being merged into one. It's part of several in a
- set which are separating syncing (to disk) code from the rest of the
- implementation so that local storage and session storage's code can be
- unified.
-
- https://bugs.webkit.org/show_bug.cgi?id=25376
-
- * storage/LocalStorageArea.cpp:
- (WebCore::LocalStorageArea::blockUntilImportComplete):
- * storage/LocalStorageArea.h:
- * storage/StorageArea.cpp:
- (WebCore::StorageArea::length):
- (WebCore::StorageArea::key):
- (WebCore::StorageArea::getItem):
- (WebCore::StorageArea::setItem):
- (WebCore::StorageArea::removeItem):
- (WebCore::StorageArea::clear):
- (WebCore::StorageArea::contains):
- * storage/StorageArea.h:
- (WebCore::StorageArea::blockUntilImportComplete):
-
-2009-06-23 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt
-
- First part of https://bugs.webkit.org/show_bug.cgi?id=26652
-
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::paint):
- (WebCore::RenderLayer::paintLayer):
- * rendering/RenderLayer.h:
- (WebCore::RenderLayer::):
- * rendering/RenderReplica.cpp:
- (WebCore::RenderReplica::paint):
- Replace the 3 boolean params to RenderLayer::paintLayer() with a bit mask for readability.
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::paintIntoLayer):
- (WebCore::RenderLayerBacking::paintContents):
- * rendering/RenderLayerBacking.h:
- Remove the unused 'haveTransparency' param to paintIntoLayer().
-
-2009-06-23 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Darin Adler.
-
- <rdar://problem/6997929> Assertion at WebCore::RenderLayer::updateClipRects with hardware acceleration
-
- The updatingControlTints() painting pass goes through compositing layer boundaries,
- so we need to ensure we don't cache clip rects computed with the wrong root by
- setting temporaryClipRects to true.
-
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::paintLayer):
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
- Remove a printf that I left in by mistake.
-
-2009-06-23 Anders Carlsson <andersca@apple.com>
-
- Reviewed by Darin Adler.
-
- WebCore side of <rdar://problem/6946094>.
-
- * platform/win/ClipboardWin.cpp:
- (WebCore::ClipboardWin::setExternalDataObject):
- * platform/win/ClipboardWin.h:
-
-2009-06-23 Darin Fisher <darin@chromium.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=26650
-
- Add setFormContentType and setFormData since it is awkward for Chromium
- to use setFormInfoFromRequest to set the underlying members. Also, add
- a clearChildren method that Chromium needs. These methods are used as
- part of the Chromium code that serializes a HistoryItem for storing in
- the browser's session history.
-
- * history/HistoryItem.cpp:
- * history/HistoryItem.h:
-
-2009-06-23 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Darin Adler.
-
- <rdar://problem/6978938> Need HTML 5 event attributes for media elements
-
- Test: media/event-attributes.html
-
- * html/HTMLAttributeNames.in: Add media event attribute names.
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::parseMappedAttribute): Handle media event attributes.
-
-2009-06-23 Thiago Macieira <thiago.macieira@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Fix Qt build with Phonon.
-
- The #include <phonon> header no longer exists. And the <Phonon> or
- <Phonon/Phonon> headers have never existed (neither for us nor for the
- Phonon sources). You have to select each and every header that you do
- want now.
-
- * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
-
-2009-06-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Remove duplicated code in Qt & GTK logging initialization
-
- We now share the getChannelFromName() function in Logging.cpp
-
- * platform/gtk/LoggingGtk.cpp:
- * platform/qt/LoggingQt.cpp:
-
-2009-06-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Rename the plugin logging channel to plural form 'Plugins'
-
- This matches both the other logging channel names, as well as the
- WebKit logging channel used by Safari/Mac for plugins.
-
- * platform/Logging.cpp:
- * platform/Logging.h:
- * platform/gtk/LoggingGtk.cpp:
- * platform/mac/LoggingMac.mm:
- * platform/qt/LoggingQt.cpp:
- * platform/win/LoggingWin.cpp:
- * plugins/PluginDebug.h:
- * plugins/gtk/PluginPackageGtk.cpp:
- * plugins/mac/PluginPackageMac.cpp:
- * plugins/mac/PluginViewMac.cpp:
- * plugins/qt/PluginPackageQt.cpp:
-
-2009-06-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Simon Hausmann.
-
- Fix NPAPI mouse translation issues on Mac
-
- The WindowRef we pass to the plugin refers to the the top level window,
- so the x and y positions have to be relative to this position, but we
- have to manually compensate for title bar decorations and other parents
- of the QWebView since contentsToWindow() only traverses to the QWebView.
-
- Previously we did this compensation when passing on mouse coordinates to
- the plugin, which caused various issues with translations such as not
- being able to close the Flash settings dialog, or the hand cursor not
- appearing over links.
-
- We now do the compensation as part of the call to NPP_SetWindow, and
- then pass mouse coordinates in global context without any compensation,
- similar to how both Safari and Mozilla does it.
-
- * plugins/mac/PluginViewMac.cpp:
- (WebCore::PluginView::updatePluginWidget):
- (WebCore::PluginView::globalMousePosForPlugin):
-
-2009-06-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Rubber-stamped by Simon Hausmann.
-
- [Qt] Resolve absolute path to library install_name manually
-
- Since our target.path is set to the Qt directory (to be able
- to do 'make install') the 'absolute_library_soname' option
- to QMake did not do the right thing.
-
- We now compute the absolute path manually using DESTDIR.
-
- * WebCore.pro:
-
-2009-06-22 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Oliver Hunt.
-
- <rdar://problem/6991146> Scrollbars in hardware layers don't change to the
- inactive look in background windows
-
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::paintLayer):
- Don't short-circuit the "painting" pass that is used to udpate control tints.
-
-2009-06-22 Dimitri Glazkov <dglazkov@chromium.org>
-
- Reviewed by Sam Weinig.
-
- https://bugs.webkit.org/show_bug.cgi?id=26567
- Upstream V8 bindings code generator. With this change, also added interface ancestor
- traversal to IDL parser, which is necessary for V8 bindings. The traversal is used
- to determine whether an interface is a Node to facilitate proper casting and storage
- in V8DOMMap.
-
- * bindings/scripts/CodeGenerator.pm: Added parent traversal sub, needed
- by V8 bindings.
- * bindings/scripts/CodeGeneratorV8.pm: Added.
- * bindings/scripts/IDLParser.pm: Modified to allow limited parsing for
- parent traversal cases.
-
-2009-06-22 Sam Weinig <sam@webkit.org>
-
- Reviewed by Gavin Barraclough.
-
- Add event handler attribute getter/setters to HTMLFrameSetElement
- as specified in HTML 5. These match the ones on HTMLBodyElement.
-
- * dom/Node.h:
- * html/HTMLFrameSetElement.cpp:
- (WebCore::HTMLFrameSetElement::parseMappedAttribute):
- (WebCore::HTMLFrameSetElement::onblur):
- (WebCore::HTMLFrameSetElement::setOnblur):
- (WebCore::HTMLFrameSetElement::onerror):
- (WebCore::HTMLFrameSetElement::setOnerror):
- (WebCore::HTMLFrameSetElement::onfocus):
- (WebCore::HTMLFrameSetElement::setOnfocus):
- (WebCore::HTMLFrameSetElement::onload):
- (WebCore::HTMLFrameSetElement::setOnload):
- (WebCore::HTMLFrameSetElement::onbeforeunload):
- (WebCore::HTMLFrameSetElement::setOnbeforeunload):
- (WebCore::HTMLFrameSetElement::onmessage):
- (WebCore::HTMLFrameSetElement::setOnmessage):
- (WebCore::HTMLFrameSetElement::onoffline):
- (WebCore::HTMLFrameSetElement::setOnoffline):
- (WebCore::HTMLFrameSetElement::ononline):
- (WebCore::HTMLFrameSetElement::setOnonline):
- (WebCore::HTMLFrameSetElement::onresize):
- (WebCore::HTMLFrameSetElement::setOnresize):
- (WebCore::HTMLFrameSetElement::onstorage):
- (WebCore::HTMLFrameSetElement::setOnstorage):
- (WebCore::HTMLFrameSetElement::onunload):
- (WebCore::HTMLFrameSetElement::setOnunload):
- * html/HTMLFrameSetElement.h:
- * html/HTMLFrameSetElement.idl:
-
-2009-06-22 Darin Adler <darin@apple.com>
-
- Reviewed by Sam Weinig.
-
- Bug 25425: DOM attribute getter/setter functions should use const AtomicString& type
- https://bugs.webkit.org/show_bug.cgi?id=25425
-
- * bindings/scripts/CodeGeneratorJS.pm: Added handling for ReflectURL.
- * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
-
- * dom/Element.cpp:
- (WebCore::Element::getURLAttribute): Added. For use implementing getters
- for ReflectURL.
- * dom/Element.h: Added getURLAttribute.
-
- * html/HTMLImageElement.idl: Use Reflect and ReflectURL.
-
-2009-06-22 Jian Li <jianli@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Bug 26626: Make WorkerContextExecutionProxy::toV8Object handle exception
- objects.
- https://bugs.webkit.org/show_bug.cgi?id=26626
-
- * bindings/v8/WorkerContextExecutionProxy.cpp:
- (WebCore::WorkerContextExecutionProxy::ToV8Object):
-
-2009-06-22 David Hyatt <hyatt@apple.com>
-
- Reviewed by Sam Weinig.
-
- Add RenderDataGrid to the build. Give it some basic default styling (that more or less matches a listbox). It has a default size
- of 300x150.
-
- * GNUmakefile.am:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * css/html4.css:
- * html/HTMLDataGridElement.cpp:
- (WebCore::HTMLDataGridElement::createRenderer):
- * html/HTMLDataGridElement.h:
- * html/HTMLDataGridElement.idl:
- * rendering/RenderDataGrid.cpp: Added.
- (WebCore::RenderDataGrid::RenderDataGrid):
- (WebCore::RenderDataGrid::~RenderDataGrid):
- (WebCore::RenderDataGrid::calcPrefWidths):
- (WebCore::RenderDataGrid::paintObject):
- (WebCore::RenderDataGrid::valueChanged):
- (WebCore::RenderDataGrid::invalidateScrollbarRect):
- (WebCore::RenderDataGrid::isActive):
- * rendering/RenderDataGrid.h: Added.
- (WebCore::RenderDataGrid::renderName):
- (WebCore::RenderDataGrid::canHaveChildren):
- (WebCore::RenderDataGrid::scrollbarCornerPresent):
-
-2009-06-22 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt.
-
- https://bugs.webkit.org/show_bug.cgi?id=26430
- <rdar://problem/6944442> Elements jump around when they become composited (WWDC checkers demo)
- <rdar://problem/6989006> Lots of time spent in RenderLayerCompositor::calculateCompositedBounds()
- during window resize when using hardware layers
-
- Fix an ordering dependency which caused the compositing position of a layer
- to be affected by some later sibling, which affected the compositing ancestor's
- composited bounds.
-
- The fix is to only update the compositing positions of layers in some subtree
- when updateAfterLayout() has been called on all the layers in that subtree,
- from the ancestor down.
-
- Also cache the composited bounds of a RenderLayerBacking, now that we can
- guarantee that those bounds are accurate.
-
- Test: compositing/sibling-positioning.html
-
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::updateLayerPositions):
- (WebCore::RenderLayer::hitTestLayer):
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::RenderLayerBacking):
- (WebCore::RenderLayerBacking::updateAfterLayout):
- (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
- (WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
- (WebCore::RenderLayerBacking::paintContents):
- (WebCore::RenderLayerBacking::compositedBounds):
- (WebCore::RenderLayerBacking::setCompositedBounds):
- * rendering/RenderLayerBacking.h:
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::updateBacking):
- (WebCore::RenderLayerCompositor::updateLayerCompositingState):
- (WebCore::RenderLayerCompositor::calculateCompositedBounds):
- (WebCore::RenderLayerCompositor::layerWillBeRemoved):
- (WebCore::RenderLayerCompositor::computeCompositingRequirements):
- (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
- (WebCore::RenderLayerCompositor::updateCompositingChildrenGeometry):
- * rendering/RenderLayerCompositor.h:
-
-2009-06-22 Jeremy Orlow <jorlow@chromium.org>
-
- Reviewed by Darin Fisher.
-
- First step in https://bugs.webkit.org/show_bug.cgi?id=25376
-
- Add StorageSyncManager.cpp/h
-
- * GNUmakefile.am:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
-
- In preparation for combining SessionStorage and LocalStorage into a
- single StorageManager, move the syncing bits out of LocalStorage and
- into its own class.
-
- The next step is to combine LocalStorageArea and SessionStorageArea
- into one. Then SessionStorage and LocalStorage can be combined.
-
- Note that combining them will cut down on code paths that must be
- proxied, eliminate virtual dispatch, and allow Chromium to (eventually)
- write historical sessionStorage to disk when memory is getting tight.
-
- Also remove a couple bits of cruft including code for quotas which is
- unnecessary (since a meta-data db is unnecessary since you can just
- count bytes as you read the local storage databases into memory).
-
- * storage/LocalStorage.cpp:
- (WebCore::LocalStorage::LocalStorage):
- (WebCore::LocalStorage::storageArea):
- (WebCore::LocalStorage::close):
- * storage/LocalStorage.h:
- * storage/LocalStorageArea.cpp:
- (WebCore::LocalStorageArea::LocalStorageArea):
- (WebCore::LocalStorageArea::scheduleFinalSync):
- (WebCore::LocalStorageArea::syncTimerFired):
- (WebCore::LocalStorageArea::performImport):
- * storage/LocalStorageArea.h:
- (WebCore::LocalStorageArea::create):
- * storage/LocalStorageTask.cpp:
- (WebCore::LocalStorageTask::performTask):
- * storage/LocalStorageTask.h:
- (WebCore::LocalStorageTask::):
- (WebCore::LocalStorageTask::createImport):
- * storage/LocalStorageThread.cpp:
- * storage/LocalStorageThread.h:
- * storage/SessionStorage.h:
- * storage/StorageSyncManager.cpp: Copied from WebCore/storage/LocalStorage.cpp.
- (WebCore::StorageSyncManager::create):
- (WebCore::StorageSyncManager::StorageSyncManager):
- (WebCore::StorageSyncManager::fullDatabaseFilename):
- (WebCore::StorageSyncManager::close):
- (WebCore::StorageSyncManager::scheduleImport):
- (WebCore::StorageSyncManager::scheduleSync):
- * storage/StorageSyncManager.h: Copied from WebCore/storage/LocalStorage.h.
- (WebCore::):
-
-2009-06-22 Darin Fisher <darin@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- https://bugs.webkit.org/show_bug.cgi?id=26622
- Add ChromiumDataObject::copy()
-
- * platform/chromium/ChromiumDataObject.cpp:
- * platform/chromium/ChromiumDataObject.h:
-
-2009-06-22 Timothy Hatcher <timothy@apple.com>
-
- Add a silhouette image for the enable view of the Resource panel.
-
- Reviewed by Kevin McCullough.
-
- * inspector/front-end/Images/resourcesSilhouette.png: Added.
- * inspector/front-end/inspector.css:
-
-2009-06-22 Kyle Prete <kylep@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- https://bugs.webkit.org/show_bug.cgi?id=26552
- Add V8 JS bindings for Audio Constructor.
-
- * bindings/v8/custom/V8CustomBinding.h:
- Added a callback declaration for audio ctor to macro.
- * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
- Added the whole file.
-
-2009-06-22 Alexey Proskuryakov <ap@webkit.org>
-
- Reviewed by David Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=26600
- StringImpl::copy() no longer copies empty string correctly
-
- * platform/text/StringImpl.cpp:
- (WebCore::StringImpl::ustring): Changed method calling syntax to look less like calling a
- static method.
- (WebCore::StringImpl::copy): Reverted part of r41917 that caused the problem.
-
-2009-06-22 Xiaomei Ji <xji@chromium.org>
-
- Reviewed by Eric Seidel
-
- Not auto-testable since it involves sending a keyboard event to
- the popup, which is not possible (eventSender sends the key
- events through webview, we want to go through the webwidget).
-
- This patch is one part of the fix for issue "keyboard selection in
- Hebrew select element does not work in Windows". The other part of the
- fix is in chromium's webkit/glue layer.
- https://bugs.webkit.org/show_bug.cgi?id=25899
-
- * manual-tests/keyboard_select_non_english.html: Added.
- * platform/chromium/PopupMenuChromium.cpp:
- (WebCore::isCharacterTypeEvent): Added. Check whether the event is a
- character type event. "Char" in Windows or "KeyDown" in Mac is character
- type event.
- (WebCore::PopupListBox::typeAheadFind): Since m_lastCharTime is used to
- indicate whether user types multiple characters continuely as a search
- prefix or not, it should be only assigned when the event is character
- type event.
-
-2009-06-22 Kevin McCullough <kmccullough@apple.com>
-
- Reviewed by Darin Adler.
-
- <rdar://problem/6115819> Notify of profile start in console
-
- Put a message in the console that announces that a profile has started,
- similar to how a console message announces that a profile has finished.
-
- * inspector/InspectorController.cpp:
- (WebCore::InspectorController::addProfile): Use renamed function.
- (WebCore::InspectorController::addProfileFinishedMessageToConsole):
- Renamed.
- (WebCore::InspectorController::addStartProfilingMessageToConsole):
- New function that logs the message about the profile starting.
- (WebCore::InspectorController::startUserInitiatedProfiling): Ditto
- * inspector/InspectorController.h:
- * inspector/front-end/ProfilesPanel.js: Print the "run" of the profile's
- title if there are multiple profiles, and take into account the fact
- that titles are displayed twice as much now.
- (WebInspector.ProfilesPanel.prototype.displayTitleForProfileLink):
- * page/Console.cpp:
- (WebCore::Console::profile): Call new function.
-
-2009-06-22 David Hyatt <hyatt@apple.com>
-
- Reviewed by Sam Weinig.
-
- https://bugs.webkit.org/show_bug.cgi?id=26615
-
- Add IDL interface for datagrid cell elements. Add a few more properties to the datagrid itself that
- correspond to ones you find on <select> elements.
-
- Add an expanded property to row elements.
-
- * DerivedSources.cpp:
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * html/HTMLAttributeNames.in:
- * html/HTMLDataGridCellElement.cpp: Added.
- (WebCore::HTMLDataGridCellElement::HTMLDataGridCellElement):
- (WebCore::HTMLDataGridCellElement::label):
- (WebCore::HTMLDataGridCellElement::setLabel):
- (WebCore::HTMLDataGridCellElement::focused):
- (WebCore::HTMLDataGridCellElement::setFocused):
- (WebCore::HTMLDataGridCellElement::checked):
- (WebCore::HTMLDataGridCellElement::setChecked):
- (WebCore::HTMLDataGridCellElement::indeterminate):
- (WebCore::HTMLDataGridCellElement::setIndeterminate):
- (WebCore::HTMLDataGridCellElement::progress):
- (WebCore::HTMLDataGridCellElement::setProgress):
- * html/HTMLDataGridCellElement.h: Added.
- (WebCore::HTMLDataGridCellElement::endTagRequirement):
- (WebCore::HTMLDataGridCellElement::tagPriority):
- * html/HTMLDataGridCellElement.idl: Added.
- * html/HTMLDataGridElement.cpp:
- (WebCore::HTMLDataGridElement::autofocus):
- (WebCore::HTMLDataGridElement::setAutofocus):
- (WebCore::HTMLDataGridElement::disabled):
- (WebCore::HTMLDataGridElement::setDisabled):
- (WebCore::HTMLDataGridElement::size):
- (WebCore::HTMLDataGridElement::setSize):
- * html/HTMLDataGridElement.h:
- * html/HTMLDataGridElement.idl:
- * html/HTMLDataGridRowElement.cpp:
- (WebCore::HTMLDataGridRowElement::checkDTD):
- (WebCore::HTMLDataGridRowElement::expanded):
- (WebCore::HTMLDataGridRowElement::setExpanded):
- * html/HTMLDataGridRowElement.h:
- * html/HTMLDataGridRowElement.idl:
- * html/HTMLElementsAllInOne.cpp:
- * html/HTMLTagNames.in:
-
-2009-06-22 Sam Weinig <sam@webkit.org>
-
- Reviewed by Mark Rowe.
-
- Add event handler attribute getter/setters to HTMLBodyElement
- as specified in HTML 5.
-
- - Removes erroneous inclusion of the onresize and onunload event
- handler attributes in Element and Document.
-
- * dom/Document.cpp:
- (WebCore::Document::getWindowAttributeEventListener):
- * dom/Document.h:
- * dom/Document.idl:
- * dom/Element.idl:
- * dom/Node.cpp:
- * dom/Node.h: onblur, onerror, onfocus, and onload all need to be declared
- virtual, since their behavior for HTMLBodyElement differs from the base
- implementation.
- * html/HTMLBodyElement.cpp:
- (WebCore::HTMLBodyElement::onblur):
- (WebCore::HTMLBodyElement::setOnblur):
- (WebCore::HTMLBodyElement::onerror):
- (WebCore::HTMLBodyElement::setOnerror):
- (WebCore::HTMLBodyElement::onfocus):
- (WebCore::HTMLBodyElement::setOnfocus):
- (WebCore::HTMLBodyElement::onload):
- (WebCore::HTMLBodyElement::setOnload):
- (WebCore::HTMLBodyElement::onbeforeunload):
- (WebCore::HTMLBodyElement::setOnbeforeunload):
- (WebCore::HTMLBodyElement::onmessage):
- (WebCore::HTMLBodyElement::setOnmessage):
- (WebCore::HTMLBodyElement::onoffline):
- (WebCore::HTMLBodyElement::setOnoffline):
- (WebCore::HTMLBodyElement::ononline):
- (WebCore::HTMLBodyElement::setOnonline):
- (WebCore::HTMLBodyElement::onresize):
- (WebCore::HTMLBodyElement::setOnresize):
- (WebCore::HTMLBodyElement::onstorage):
- (WebCore::HTMLBodyElement::setOnstorage):
- (WebCore::HTMLBodyElement::onunload):
- (WebCore::HTMLBodyElement::setOnunload):
- * html/HTMLBodyElement.h:
- * html/HTMLBodyElement.idl:
-
-2009-06-22 Alexey Proskuryakov <ap@webkit.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=26601
- Remove disabled code for appcache dynamic entries
-
- This also removes code for DOM 3 Core DOMStringList, which we don't use for anything else yet.
-
- * DerivedSources.cpp:
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * bindings/js/JSDOMStringListCustom.cpp: Removed.
- * bindings/v8/custom/V8CustomBinding.h:
- * bindings/v8/custom/V8DOMStringListCustom.cpp: Removed.
- * dom/DOMStringList.cpp: Removed.
- * dom/DOMStringList.h: Removed.
- * dom/DOMStringList.idl: Removed.
- * dom/StaticStringList.cpp: Removed.
- * dom/StaticStringList.h: Removed.
- * loader/DocumentLoader.cpp:
- (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache):
- * loader/appcache/ApplicationCache.cpp:
- (WebCore::ApplicationCache::addResource):
- * loader/appcache/ApplicationCache.h:
- * loader/appcache/ApplicationCacheGroup.cpp:
- (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
- (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
- * loader/appcache/ApplicationCacheResource.cpp:
- (WebCore::ApplicationCacheResource::dumpType):
- * loader/appcache/ApplicationCacheResource.h:
- (WebCore::ApplicationCacheResource::):
- * loader/appcache/ApplicationCacheStorage.cpp:
- (WebCore::ApplicationCacheStorage::storeUpdatedType):
- * loader/appcache/DOMApplicationCache.cpp:
- * loader/appcache/DOMApplicationCache.h:
- * loader/appcache/DOMApplicationCache.idl:
- * page/DOMWindow.idl:
-
-2009-06-22 Steve Falkenburg <sfalken@apple.com>
-
- Windows build fix.
-
- * DerivedSources.cpp:
- * html/HTMLElementsAllInOne.cpp:
-
-2009-06-22 Alexey Proskuryakov <ap@webkit.org>
-
- Reviewed by John Sullivan.
-
- <rdar://problem/6956606> REGRESSION (S4Beta -> Final): After the password is input,
- Japanese can't be input.
-
- WebKit uses a per-frame input context for most editable fields, and application's global
- context for password fields, manually controlling secure input state and the list of available
- input sources.
-
- We were setting TSMDocument property to disable non-Roman input methods after focus changed
- to a password field, but before selection was updated. This resulted in the property being
- applied to a wrong TSMDocument in some cases, because TSMGetActiveDocument() uses input
- context cached by +[NSApplication updateWindows], we change context based on selection,
- not on focus.
-
- * page/mac/FrameMac.mm: (WebCore::Frame::setUseSecureKeyboardEntry): Since there is only one
- context that we use for password fields - the global one - there is no need to get the active
- one.
-
-2009-06-22 David Levin <levin@chromium.org>
-
- Reviewed by David Hyatt and Eric Seidel.
-
- REGRESSION: When the main page (ScrollView) has a custom scrollbar, it crashes on destruction.
- https://bugs.webkit.org/show_bug.cgi?id=26326
-
- Test: scrollbars/scrollbar-crash-on-refresh.html
-
- * dom/Document.cpp:
- (WebCore::Document::detach):
- Gives the FrameView a change to do any necessary cleanup on
- Document::detach() which is where the renderArena gets detroyed.
- * page/FrameView.cpp:
- (WebCore::FrameView::detachCustomScrollbars):
- Gets rid of any custom scrollbars (if the docment supplied them).
- * page/FrameView.h:
- * platform/Scrollbar.h:
- (WebCore::Scrollbar::isCustomScrollbar):
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::destroy):
- Removed the check for document()->frame(). If frame() is 0 in this code,
- then the call to animation() is also incorrect (since it does document()->frame()->animation()).
- * rendering/RenderScrollbar.h:
- (WebCore::RenderScrollbar::isCustomScrollbar):
-
-2009-06-22 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Simon Fraser.
-
- - fix https://bugs.webkit.org/show_bug.cgi?id=23606
- <rdar://problem/6537777> CSS gradient not repainted when image load
- completes
-
- Test: fast/repaint/background-generated.html
-
- * rendering/RenderObject.cpp:
- (WebCore::mustRepaintFillLayers): Return true if the layer does not
- specify a size and the image uses the container size.
-
-2009-06-22 David Hyatt <hyatt@apple.com>
-
- Reviewed by Sam Weinig.
-
- https://bugs.webkit.org/show_bug.cgi?id=26607
-
- Add IDL for HTMLDataGridRowElement.
-
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * html/HTMLAttributeNames.in:
- * html/HTMLDataGridColElement.cpp:
- (WebCore::HTMLDataGridColElement::primary):
- (WebCore::HTMLDataGridColElement::setPrimary):
- * html/HTMLDataGridColElement.h:
- * html/HTMLDataGridColElement.idl:
- * html/HTMLDataGridElement.cpp:
- (WebCore::HTMLDataGridElement::checkDTD):
- (WebCore::HTMLDataGridElement::multiple):
- (WebCore::HTMLDataGridElement::setMultiple):
- * html/HTMLDataGridElement.h:
- * html/HTMLDataGridElement.idl:
- * html/HTMLDataGridRowElement.cpp: Added.
- (WebCore::HTMLDataGridRowElement::HTMLDataGridRowElement):
- (WebCore::HTMLDataGridRowElement::selected):
- (WebCore::HTMLDataGridRowElement::setSelected):
- (WebCore::HTMLDataGridRowElement::focused):
- (WebCore::HTMLDataGridRowElement::setFocused):
- * html/HTMLDataGridRowElement.h: Added.
- (WebCore::HTMLDataGridRowElement::tagPriority):
- * html/HTMLDataGridRowElement.idl: Added.
- * html/HTMLTagNames.in:
-
-2009-06-19 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Holger Freyther.
-
- https://bugs.webkit.org/show_bug.cgi?id=26556
-
- Fix a crash in case that the QNetworkReply::readReady signal is
- "stuck" in deferred mode due to JavaScript alert, and in the meantime,
- QNetworkreply::finished signal is received and processed before
- QNetworkReply::readReady is processed.
-
- * manual-tests/qt/unload-alert.html: Added.
- * platform/network/qt/QNetworkReplyHandler.cpp:
- (WebCore::QNetworkReplyHandler::setLoadMode):
- (WebCore::QNetworkReplyHandler::finish):
- (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
- (WebCore::QNetworkReplyHandler::forwardData):
- (WebCore::QNetworkReplyHandler::start):
- (WebCore::QNetworkReplyHandler::sendQueuedItems):
- * platform/network/qt/QNetworkReplyHandler.h:
- (WebCore::QNetworkReplyHandler::):
-
-2009-06-22 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Fix the Qt build.
-
- * WebCore.pro:
-
-2009-06-21 Darin Adler <darin@apple.com>
-
- Reviewed by Sam Weinig.
-
- Bug 25425: DOM attribute getter/setter functions should use const AtomicString& type
- https://bugs.webkit.org/show_bug.cgi?id=25425
-
- * bindings/scripts/CodeGeneratorJS.pm: Tweaked mechanism for includes to be a bit
- more consistent and to make SVGElement.h be included in the header rather than in
- every implementation file that includes the header. Added code to use getAttribute
- and setAttribute directly when the [Reflect] extended attribute is used.
-
- * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
-
- * html/HTMLElement.idl: Used [Reflect] for all the attributes in this class that
- reflect content attributes. Restricting this to one class for now to keep the
- patch small and start out slowly.
-
-2009-06-21 Sam Weinig <sam@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=26596
- Only expose event handler attributes to elements and documents.
-
- Test: fast/dom/event-attribute-availability.html
-
- * dom/Document.idl:
- * dom/Element.idl:
- * dom/Node.cpp:
- * dom/Node.h:
- * dom/Node.idl:
-
-2009-06-21 Daniel Bates <dbates@intudata.com>
-
- Reviewed by Adam Barth.
-
- https://bugs.webkit.org/show_bug.cgi?id=26580
-
- Fix to enable XSSAuditor on child windows.
-
- Test: http/tests/security/xssAuditor/link-opens-new-window.html
-
- * page/XSSAuditor.cpp:
- (WebCore::XSSAuditor::XSSAuditor):
- (WebCore::XSSAuditor::isEnabled):
- (WebCore::XSSAuditor::canEvaluate):
- (WebCore::XSSAuditor::canCreateInlineEventListener):
- (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
- (WebCore::XSSAuditor::canLoadObject):
- * page/XSSAuditor.h: Removed method setXSSAuditorEnabled, and field m_isEnabled.
- Moved implementation of isEnabled to XSSAuditor.cpp and changed implementation
- to query Settings.
-
-2009-06-21 David Levin <levin@chromium.org>
-
- Reviewed by NOBODY.
-
- Speculative windows build fix (idea by Mark Rowe).
-
- * WebCore.vcproj/WebCore.vcproj:
-
-2009-06-21 David Levin <levin@chromium.org>
-
- Reviewed by NOBODY (Speculative gtk build fix).
+ Build fixes needed for make distcheck.
* GNUmakefile.am:
-2009-06-21 David Levin <levin@chromium.org>
-
- Reviewed by NOBODY.
-
- Speculative tiger build fix and a windows build fix.
- More fixes may still be in order.
-
- * WebCore.vcproj/WebCoreCommon.vsprops:
- * dom/default/PlatformMessagePortChannel.h:
- (WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
-
-2009-06-21 David Levin <levin@chromium.org>
-
- Reviewed by NOBODY (Speculative tiger build fix).
-
- * dom/default/PlatformMessagePortChannel.h:
- (WebCore::PlatformMessagePortChannel::MessagePortQueue::~MessagePortQueue):
-
-2009-06-21 Drew Wilson <atwilson@google.com>
+2010-01-29 Mark Rowe <mrowe@apple.com>
- Reviewed by David Levin.
-
- <https://bugs.webkit.org/show_bug.cgi?id=26448>
-
- Added optimized GC for MessagePorts when the entangled port is run by the same thread.
- Fixed bug in isProxyFor() that was not properly throwing an exception when trying to clone the entangled port.
+ Stop copying an IDL file in to the framework wrapper.
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::markActiveObjectsForContext):
- Now marks remotely entangled ports as in-use, in addition to those with pending activity.
- * bindings/js/JSMessagePortCustom.cpp:
- (WebCore::JSMessagePort::mark):
- Now checks if the entangled port is local (run by same thread) and if so mark()s it.
- * dom/MessagePort.cpp:
- (WebCore::MessagePort::postMessage):
- (WebCore::MessagePort::disentangle):
- Removes cloned ports from the ScriptExecutionContext - this allows cloned ports to be GC'd as otherwise they look like remotely entangled ports.
- (WebCore::MessagePort::start):
- (WebCore::MessagePort::locallyEntangledPort):
- Added API for fetching the entangled port if it is run by the same thread
- * dom/MessagePort.h:
- * dom/MessagePortProxyWrapper.h:
- * dom/default/MessagePortProxy.cpp:
- (WebCore::MessagePortProxyWrapper::locallyEntangledPort):
- Added API for fetching the entangled port if it is run by the same thread
- (WebCore::MessagePortProxy::hasPendingActivity):
- Changed definition of hasPendingActivity() to be stricter - only returns true if there are pending messages.
- (WebCore::MessagePortProxy::locallyEntangledPort):
- * dom/default/MessagePortProxy.h:
-
-2009-06-21 Drew Wilson <atwilson@google.com>
-
- Reviewed by David Levin.
-
- <https://bugs.webkit.org/show_bug.cgi?id=25043>
- Removed obsolete MessagePort.startConversation(), active and onclose APIs.
-
- Refactored MessagePortProxy into MessagePortChannel and a platform-dependent PlatformMessagePortChannel
- implementation. Modified APIs to simplify cross-process implementations by moving the messaging code
- entirely into the platform-dependent proxy.
-
- Created a thread-safe default PlatformMessagePortChannel implementation.
-
- Changed DOMWindow messaging to create the MessageEvent in the target ScriptExecutionContext to match how
- cross-thread MessagePorts work.
-
- * GNUMakefile.am:
- * WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
- Added MessagePortChannel/PlatformMessagePortChannel files.
- * bindings/js/JSMessagePortCustom.cpp:
- (WebCore::JSMessagePort::mark):
- Changed ports to not mark their entangled pair as reachable, per the spec.
- * bindings/v8/custom/V8MessagePortCustom.cpp:
- * dom/MessageChannel.cpp:
- (WebCore::MessageChannel::MessageChannel):
- Updated to use PlatformMessagePortChannel::createChannel() to entangle the ports.
- * dom/MessagePort.cpp:
- (WebCore::MessagePort::MessagePort):
- (WebCore::MessagePort::~MessagePort):
- (WebCore::MessagePort::postMessage):
- (WebCore::MessagePort::disentangle):
- (WebCore::MessagePort::messageAvailable):
- (WebCore::MessagePort::start):
- (WebCore::MessagePort::close):
- (WebCore::MessagePort::entangle):
- (WebCore::MessagePort::contextDestroyed):
- (WebCore::MessagePort::dispatchMessages):
- (WebCore::MessagePort::setOnmessage):
- (WebCore::MessagePort::hasPendingActivity):
- Changed these APIs to delegate to new PlatformMessagePortChannel APIs.
- * dom/MessagePort.h:
- Renamed isQueueOpen() to started().
- * dom/MessagePort.idl:
- Removed startConversation and onclose.
- * dom/MessagePortProxy.h: Removed.
- * dom/MessagePortChannel.cpp: Added.
- (WebCore::MessagePortChannel::EventData::create):
- (WebCore::MessagePortChannel::EventData::EventData):
- (WebCore::MessagePortChannel::~MessagePortChannel):
- * dom/MessagePortChannel.h: Added.
- (WebCore::MessagePortChannel::EventData::message):
- (WebCore::MessagePortChannel::EventData::channel):
- Changed EventData to hold a reference to a MessagePortChannel object instead of a MessagePort to enable cross-thread messaging.
- (WebCore::MessagePortChannel::MessagePortChannel):
- (WebCore::MessagePortChannel::create):
- * dom/ScriptExecutionContext.cpp:
- (WebCore:ScriptExecutionContext::dispatchMessagePortEvents):
- Renamed isQueueOpen() to started().
- * dom/default/PlatformMessagePortChannel.cpp: Added.
- (WebCore::MessagePortChannel::entangleIfOpen):
- (WebCore::MessagePortChannel::disentangle):
- (WebCore::MessagePortChannel::postMessageToRemote):
- (WebCore::MessagePortChannel::tryGetMessageFromRemote):
- (WebCore::MessagePortChannel::close):
- (WebCore::MessagePortChannel::isConnectedTo):
- (WebCore::MessagePortChannel::hasPendingActivity):
- (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
- (WebCore::PlatformMessagePortChannel::~PlatformMessagePortChannel):
- (WebCore::PlatformMessagePortChannel::createChannel):
- (WebCore::PlatformMessagePortChannel::entangleIfOpen):
- (WebCore::PlatformMessagePortChannel::disentangle):
- (WebCore::PlatformMessagePortChannel::setRemotePort):
- (WebCore::PlatformMessagePortChannel::remotePort):
- (WebCore::PlatformMessagePortChannel::entangledChannel):
- (WebCore::PlatformMessagePortChannel::setEntangledChannel):
- (WebCore::PlatformMessagePortChannel::postMessageToRemote):
- (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
- (WebCore::PlatformMessagePortChannel::isConnectedTo):
- (WebCore::PlatformMessagePortChannel::close):
- (WebCore::PlatformMessagePortChannel::closeInternal):
- (WebCore::PlatformMessagePortChannel::hasPendingActivity):
- * dom/default/PlatformMessagePortChannel.h: Added.
- (WebCore::PlatformMessagePortChannel::MessagePortQueue::create):
- (WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
- (WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty):
- (WebCore::PlatformMessagePortChannel::MessagePortQueue::isEmpty):
- (WebCore::PlatformMessagePortChannel::MessagePortQueue::MessagePortQueue):
- * page/DOMWindow.cpp:
- (WebCore::PostMessageTimer::PostMessageTimer):
- Changed DOMWindow messaging to create the MessageEvent in the target ScriptExecutionContext to match how cross-thread MessagePorts work.
- (WebCore::PostMessageTimer::event):
- (WebCore::DOMWindow::postMessage):
- (WebCore::DOMWindow::postMessageTimerFired):
-
-2009-06-21 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Sam Weinig.
-
- - fix https://bugs.webkit.org/show_bug.cgi?id=15383
- <rdar://problem/5682745> resize: vertical does not restrict to vertical
- resize
-
- Test: fast/css/resize-single-axis.html
-
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::resize): Ignore movement along the non-resizing
- axis.
-
-2009-06-21 Sam Weinig <sam@webkit.org>
-
- Reviewed by Eric Seidel
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=26578
- event.currentTarget for listener registered on window should point to the window object like in Firefox
-
- Test: fast/events/event-trace.html
-
- * dom/Node.cpp:
- (WebCore::Node::dispatchGenericEvent): Make the DOMWindow the currentTarget when events are dispatched
- to it. We previously used the document because DOMWindow was not yet an EventTarget.
-
-2009-06-21 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Sam Weinig.
-
- - fix https://bugs.webkit.org/show_bug.cgi?id=9694
- resize value not compared
-
- Test: fast/css/resize-value-compared.html
-
- * rendering/style/StyleRareInheritedData.cpp:
- (WebCore::StyleRareInheritedData::operator==): Compare the resize
- member.
-
-2009-06-19 Alice Liu <alice.liu@apple.com>
-
- Fix https://bugs.webkit.org/show_bug.cgi?id=26568
- Repro crash animating GIF if previously used in a closed window's back/forward list
- Also filed as <rdar://problem/6978362>
-
- Reviewed by Maciej Stachowiak.
-
- Can't test this bug with an automated layout test since it requires b/f caching
- * manual-tests/animated-gif-bfcache-crash.html: Added.
- * manual-tests/resources/containsAnimatedGif.html: Added.
-
- Adding checks for hostWindow() since there is no guarantee that the Page is alive
- * platform/ScrollView.cpp:
- (WebCore::ScrollView::scrollRectIntoViewRecursively):
- (WebCore::ScrollView::contentsToScreen):
- (WebCore::ScrollView::screenToContents):
- (WebCore::ScrollView::wheelEvent):
-
-2009-06-20 Sam Weinig <sam@webkit.org>
-
- Reviewed by Adam Barth.
-
- Fix for https://bugs.webkit.org/show_bug.cgi?id=26554
- Shadowing of top and parent
-
- * page/DOMWindow.idl:
-
-2009-06-20 Mark Rowe <mrowe@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Fix <https://bugs.webkit.org/show_bug.cgi?id=15106>.
- Bug 15106: REGRESSION: Can't drag text as element when user-select is set to none
-
- We allow selections to begin within an element that has -webkit-user-select: none set,
- unless the element is draggable as dragging should take priority over starting a selection.
-
- Test: editing/selection/user-drag-element-and-user-select-none.html
-
- * dom/Node.cpp:
- (WebCore::Node::canStartSelection):
-
-2009-06-20 Darin Adler <darin@apple.com>
-
- Reviewed by Dan Bernstein.
-
- Bug 26528: REGRESSION (r44674): Assertion in TextIterator::pushFullyClippedState while counting matches for "a" on apple.com
- https://bugs.webkit.org/show_bug.cgi?id=26528
- rdar://problem/6985329
-
- * editing/TextIterator.cpp:
- (WebCore::TextIterator::handleReplacedElement): When entering a text control,
- start at the top of the shadow tree (by calling shadowTreeRootNode). Also
- remove assumption that innerTextElement will never be 0 since RenderTextControl
- doesn't really guarantee this.
-
-2009-06-20 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Reviewed by NOBODY.
-
- Speculative Qt build fix - add HTMLDataGridColElement to the build script.
-
- * WebCore.pro:
-
-2009-06-19 Adam Barth <abarth@webkit.org>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=26561
-
- Remove a memcpy by retrieving the already existing copy of a string
- instead of making a new one.
-
- * bindings/js/ScriptSourceCode.h:
- (WebCore::ScriptSourceCode::ScriptSourceCode):
- (WebCore::ScriptSourceCode::source):
- * bindings/js/StringSourceProvider.h:
- (WebCore::StringSourceProvider::source):
-
-2009-06-19 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Steve Falkenburg.
-
- https://bugs.webkit.org/show_bug.cgi?id=26488
- No Support for Single Finger or Two Finger Panning in Windows 7
-
- The code in WebCore allows us to interpret a Pan gesture as
- a mousewheel event, and we are able to reuse the scrolling code.
- Another constructor was created in WheelEventWin which takes data
- better suited to the pan guesture than what was currently there.
-
- Unable to add tests to simulate touch behavior/gestures.
-
- * platform/PlatformWheelEvent.h:
- * platform/win/WheelEventWin.cpp:
-
-2009-06-19 Chris Marrin <cmarrin@apple.com>
-
- Fixed a build error, which only shows up in the i386 compile
-
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayerCA::animateTransform):
-
-2009-06-19 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Oliver Hunt.
-
- <rdar://problem/6988385> REGRESSION: In full page video player, movie's
- video track becomes detached from its controller.
-
- When in the media document, the MediaPlayer should not report that it
- is capable of hardware acceleration, because it renders via a QTMovieView
- which is already accelerated.
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::supportsAcceleratedRendering):
-
-2009-06-19 Kevin Ollivier <kevino@theolliviers.com>
-
- Adding XSSAuditor.cpp to the wx build.
-
- * WebCoreSources.bkl:
-
-2009-06-19 Chris Marrin <cmarrin@apple.com>
-
- Reviewed by Simon Fraser <simon.fraser@apple.com>.
-
- https://bugs.webkit.org/show_bug.cgi?id=26544
-
- If I am doing a Matrix hardware animation and any matrix is singular, I revert to software.
- This is not really testable, since we can't see what the hardware animation is doing.
-
- * platform/graphics/mac/GraphicsLayerCA.mm:
- (WebCore::GraphicsLayerCA::animateTransform):
-
-2009-06-19 Geoffrey Garen <ggaren@apple.com>
-
- Reviewed by Maciej Stachowiak.
-
- An additional fix for Bug 26532: Native functions do not correctly unlink
- from optimised callsites when they're collected
- <https://bugs.webkit.org/show_bug.cgi?id=26532> | <rdar://problem/6625385>
-
- Use "NativeFunctionWrapper" instead of "PrototypeFunction" in cross-frame
- accessors, so the type of object you get to wrap a function is the same,
- regardless of whether the access to the function is cross-frame.
-
- This is faster and more idiomatic than what we had before. It also would
- have avoided Bug 26532 because it would have prevented a conflicting
- PrototypeFunction from being allocated to wrap postMessage, where a
- NativeFunctionWrapper had been allocated previously.
-
- * bindings/js/JSDOMBinding.cpp:
- (WebCore::objectToStringFunctionGetter):
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::nonCachingStaticFunctionGetter):
- * bindings/js/JSHistoryCustom.cpp:
- (WebCore::nonCachingStaticBackFunctionGetter):
- (WebCore::nonCachingStaticForwardFunctionGetter):
- (WebCore::nonCachingStaticGoFunctionGetter):
- * bindings/js/JSLocationCustom.cpp:
- (WebCore::nonCachingStaticReplaceFunctionGetter):
- (WebCore::nonCachingStaticReloadFunctionGetter):
- (WebCore::nonCachingStaticAssignFunctionGetter):
-
-2009-06-19 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by John Sullivan
-
- <rdar://problem/6953673> Crash in RenderLayerCompositor::setCompositingParent
-
- Fix a crash that could occur in complex content due to timing issues
- when doing a partial layer tree rebuild which is required when painting;
- setCompositingParent() could be called with a parent which has not been made
- compositing yet.
-
-2009-06-19 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
-
- Build fix. Adding missing HTMLDataGrid* files to the build.
-
- * GNUmakefile.am:
-
-2009-06-19 Peter Kasting <pkasting@google.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26460 part three
- Make BMPImageReader a standalone class that is used by ICOImageDecoder
- and BMPImageDecoder to decode individual BMPs within a file. These
- decoders now inherit directly from ImageDecoder.
-
- This also makes these decoders decode on-demand in isSizeAvailable() and
- frameBufferAtIndex(), like the other decoders, instead of when setData()
- is called, like before. This should provide a speedup on pages
- containing BMPs that aren't immediately onscreen.
-
- * platform/image-decoders/bmp/BMPImageDecoder.cpp:
- (WebCore::BMPImageDecoder::BMPImageDecoder):
- (WebCore::BMPImageDecoder::setData):
- (WebCore::BMPImageDecoder::isSizeAvailable):
- (WebCore::BMPImageDecoder::frameBufferAtIndex):
- (WebCore::BMPImageDecoder::decodeWithCheckForDataEnded):
- (WebCore::BMPImageDecoder::decode):
- (WebCore::BMPImageDecoder::processFileHeader):
- * platform/image-decoders/bmp/BMPImageDecoder.h:
- (WebCore::BMPImageDecoder::readUint32):
- * platform/image-decoders/bmp/BMPImageReader.cpp:
- (WebCore::BMPImageReader::BMPImageReader):
- (WebCore::BMPImageReader::decodeBMP):
- (WebCore::BMPImageReader::readInfoHeaderSize):
- (WebCore::BMPImageReader::processInfoHeader):
- (WebCore::BMPImageReader::readInfoHeader):
- (WebCore::BMPImageReader::processBitmasks):
- (WebCore::BMPImageReader::processColorTable):
- (WebCore::BMPImageReader::processRLEData):
- (WebCore::BMPImageReader::processNonRLEData):
- (WebCore::BMPImageReader::setFailed):
- * platform/image-decoders/bmp/BMPImageReader.h:
- (WebCore::BMPImageReader::readUint16):
- (WebCore::BMPImageReader::readUint32):
- (WebCore::BMPImageReader::setBuffer):
- (WebCore::BMPImageReader::setData):
- (WebCore::BMPImageReader::):
- (WebCore::BMPImageReader::pastEndOfImage):
- (WebCore::BMPImageReader::readCurrentPixel):
- (WebCore::BMPImageReader::setRGBA):
- * platform/image-decoders/ico/ICOImageDecoder.cpp:
- (WebCore::ICOImageDecoder::ICOImageDecoder):
- (WebCore::ICOImageDecoder::setData):
- (WebCore::ICOImageDecoder::isSizeAvailable):
- (WebCore::ICOImageDecoder::size):
- (WebCore::ICOImageDecoder::frameBufferAtIndex):
- (WebCore::ICOImageDecoder::decodeWithCheckForDataEnded):
- (WebCore::ICOImageDecoder::decode):
- (WebCore::ICOImageDecoder::processDirectory):
- (WebCore::ICOImageDecoder::processDirectoryEntries):
- (WebCore::ICOImageDecoder::readDirectoryEntry):
- (WebCore::ICOImageDecoder::processImageType):
- * platform/image-decoders/ico/ICOImageDecoder.h:
- (WebCore::ICOImageDecoder::readUint16):
- (WebCore::ICOImageDecoder::readUint32):
-
-2009-06-19 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- https://bugs.webkit.org/show_bug.cgi?id=26555
-
- Fix the Chromium canary bot. Turns out ScriptSourceCode doesn't have
- the same API in V8 and JSC.
-
- * WebCore/bindings/js/ScriptController.cpp:
- * WebCore/bindings/js/ScriptSourceCode.h:
- * WebCore/bindings/v8/ScriptController.cpp:
- * WebCore/page/XSSAuditor.cpp:
- * WebCore/page/XSSAuditor.h:
-
-2009-06-19 David Hyatt <hyatt@apple.com>
-
- Reviewed by Anders Carlsson.
-
- https://bugs.webkit.org/show_bug.cgi?id=26547
-
- Implement the IDL interface for HTMLDataGridColElement.
-
- * DerivedSources.cpp:
- * DerivedSources.make:
- * GNUmakefile.am:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * html/HTMLAttributeNames.in:
- * html/HTMLDataGridColElement.cpp: Added.
- (WebCore::HTMLDataGridColElement::HTMLDataGridColElement):
- (WebCore::HTMLDataGridColElement::label):
- (WebCore::HTMLDataGridColElement::setLabel):
- (WebCore::HTMLDataGridColElement::type):
- (WebCore::HTMLDataGridColElement::setType):
- (WebCore::HTMLDataGridColElement::sortable):
- (WebCore::HTMLDataGridColElement::setSortable):
- (WebCore::HTMLDataGridColElement::sortDirection):
- (WebCore::HTMLDataGridColElement::setSortDirection):
- (WebCore::HTMLDataGridColElement::selected):
- (WebCore::HTMLDataGridColElement::setSelected):
- * html/HTMLDataGridColElement.h: Added.
- (WebCore::HTMLDataGridColElement::endTagRequirement):
- (WebCore::HTMLDataGridColElement::tagPriority):
- * html/HTMLDataGridColElement.idl: Added.
- * html/HTMLDataGridElement.h:
- * html/HTMLElementsAllInOne.cpp:
- * html/HTMLTagNames.in:
- * page/DOMWindow.idl:
-
-2009-06-19 Chris Evans <scarybeasts@gmail.com>
- Reviewed by Eric Seidel.
-
- There is no new test because this cannot be tested deterministically.
- I've not been able to cause a crash at all in the test framework, but
- I have verified that this is happening in the wild and that the patch
- fixes the likely cause in the debugger.
-
- * loader/TextResourceDecoder.cpp: careful not to iterate off the end
- of our input buffer looking for the end of the comment.
-
-2009-06-19 Adam Barth <abarth@webkit.org>
-
- Reviewed by Dimitri Glazkov.
-
- https://bugs.webkit.org/show_bug.cgi?id=26536
-
- Fix external-script-URL-location.html and
- write-external-script-open.html LayoutTests.
-
- implicitOpen is called from several places. We need to setXSSAuditor
- each time, so I moved the call inside implicitOpen.
-
- * dom/Document.cpp:
- (WebCore::Document::open):
- (WebCore::Document::implicitOpen):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::begin):
-
-2009-06-19 Kent Tamura <tkent@chromium.org>
-
- Reviewed by David Levin.
-
- Use WebCore::multipleFileUploadText() in Chromium to fix a problem
- that Chromium shows only the first filename even if a user selects
- multiple files for <input type=file multiple>.
- <https://bugs.webkit.org/show_bug.cgi?id=26502>
-
- * platform/chromium/FileChooserChromium.cpp:
- (WebCore::FileChooser::basenameForWidth):
-
-2009-06-19 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Dave Hyatt.
-
- - fix <rdar://problem/6967596> Safari hung using 100% CPU when I tried
- to look up a word in Dictionary using command-control-d
-
- Test: editing/selection/move-by-line-005.html
-
- The root cause of this bug was searchAheadForBetterMatch() continuing
- past the first rendered text object after the given object. While we
- want to skip non-rendered text and empty containers, when we encounter
- rendered text object, we must return a text box for that object.
-
- * dom/Position.cpp:
- (WebCore::searchAheadForBetterMatch):
-
-2009-06-19 Jungshik Shin <jshin@chromium.org>
-
- Reviewed by David Levin
-
- https://bugs.webkit.org/show_bug.cgi?id=25657
-
- Chromium Linux port does not handle non-BMP characters properly.
- It's fixed with a 'UTF-16 iterator macro' to extract Unicode
- codepoints out of a UTF-16 input string.
-
- A manual test is added for non-BMP character rendering,
- which we can use until a small freely-distributable font
- covering non-BMP is added to the Webkit source tree.
-
-
- * platform/graphics/chromium/FontCacheLinux.cpp:
- (WebCore::FontCache::getFontDataForCharacters):
- * manual-tests/non-bmp.html: Added.
-
-2009-06-19 Pavel Feldman <pfeldman@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- V8 Bindings: return proper state from the script stack.
-
- https://bugs.webkit.org/show_bug.cgi?id=26512
-
- * bindings/v8/ScriptCallStack.cpp:
- (WebCore::ScriptCallStack::ScriptCallStack):
- * bindings/v8/ScriptCallStack.h:
- (WebCore::ScriptCallStack::state):
-
-2009-06-19 Jessie Berlin <jberlin@apple.com>
-
- Reviewed by Simon Fraser.
-
- Windows build fix.
-
- * platform/graphics/cg/PatternCG.cpp:
- (WebCore::Pattern::createPlatformPattern):
-
-2009-06-19 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Simon Hausmann.
- Build fix after 44825.
-
- * platform/graphics/qt/ImageDecoderQt.cpp:
- (WebCore::ImageDecoderQt::isSizeAvailable):
- * platform/graphics/qt/ImageDecoderQt.h:
-
-2009-06-18 Shinichiro Hamaji <hamaji@chromium.org>
-
- Reviewed by Oliver Hunt.
-
- Bug 26426: Canvas: rotation of 'no-repeat' pattern is weird
- <https://bugs.webkit.org/show_bug.cgi?id=26426>
-
- Use 1<<23-1 as steps of no-repeat patterns instead of 100000000.0f.
- The original number cannot be represented by mantissa of float
- (23bit) so that it caused some error.
-
- Test: fast/canvas/image-object-in-canvas.html:
-
- * platform/graphics/cg/PatternCG.cpp:
- (WebCore::Pattern::createPlatformPattern):
-
-2009-06-19 Adam Barth <abarth@webkit.org>
-
- Unreviewed attempt to fix the Chromium build.
-
- * bindings/v8/ScriptController.cpp:
- (WebCore::ScriptController::ScriptController):
- (WebCore::ScriptController::evaluate):
- * bindings/v8/ScriptController.h:
- (WebCore::ScriptController::xssAuditor):
- * bindings/v8/ScriptEventListener.cpp:
- (WebCore::createAttributeEventListener):
-
-2009-06-18 Adam Barth <abarth@webkit.org>
-
- Reviewed by Sam Weinig.
+2010-01-29 Mark Rowe <mrowe@apple.com>
- https://bugs.webkit.org/show_bug.cgi?id=26199
+ Sort Xcode projects.
- Added an experimental reflective XSS filter. The filter is disabled by
- default.
-
- Test: http/tests/security/xssAuditor/script-tag.html
-
- * GNUmakefile.am:
- * WebCore.base.exp:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
- * bindings/js/ScriptController.cpp:
- (WebCore::ScriptController::ScriptController):
- (WebCore::ScriptController::evaluate):
- * bindings/js/ScriptController.h:
- (WebCore::ScriptController::xssAuditor):
- * bindings/js/ScriptEventListener.cpp:
- (WebCore::createAttributeEventListener):
- * dom/Tokenizer.h:
- (WebCore::Tokenizer::xssAuditor):
- (WebCore::Tokenizer::setXSSAuditor):
- (WebCore::Tokenizer::Tokenizer):
- * html/HTMLTokenizer.cpp:
- (WebCore::HTMLTokenizer::scriptHandler):
- * loader/FrameLoader.cpp:
- (WebCore::FrameLoader::begin):
- (WebCore::FrameLoader::requestObject):
- * page/Settings.cpp:
- (WebCore::Settings::Settings):
- (WebCore::Settings::setXSSAuditorEnabled):
- * page/Settings.h:
- (WebCore::Settings::xssAuditorEnabled):
- * page/XSSAuditor.cpp: Added.
- (WebCore::isControlCharacter):
- (WebCore::XSSAuditor::XSSAuditor):
- (WebCore::XSSAuditor::~XSSAuditor):
- (WebCore::XSSAuditor::canEvaluate):
- (WebCore::XSSAuditor::canCreateInlineEventListener):
- (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
- (WebCore::XSSAuditor::canLoadObject):
- (WebCore::XSSAuditor::decodeURL):
- (WebCore::XSSAuditor::findInRequest):
- * page/XSSAuditor.h: Added.
- (WebCore::XSSAuditor::isEnabled):
- (WebCore::XSSAuditor::setXSSAuditorEnabled):
-
-2009-06-18 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- feOffset and objectBoundingBox
- [https://bugs.webkit.org/show_bug.cgi?id=26441]
-
- If we use objectBoundingBox for primitiveUnits, the fractions given
- to dx or dy of feOffset must be multiplied with the referenced objects
- objectBoundingBox size.
-
- Test: svg/filters/feOffset.svg
-
- * svg/graphics/filters/SVGFEOffset.cpp:
- (WebCore::FEOffset::apply):
-
-2009-06-18 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- feTile implementation missing
- [https://bugs.webkit.org/show_bug.cgi?id=26419]
-
- Implementation of feTile, a pattern effect for SVG filters. It was
- necessary to modify FilterEffect since source inputs need a secial
- logic and we have to identify if an effect is a source input.
-
- Tests: svg/batik/filters/feTile.svg
- svg/filters/feTile.svg
-
- * platform/graphics/filters/FilterEffect.h:
- (WebCore::FilterEffect::isSourceInput):
- * platform/graphics/filters/SourceAlpha.h:
- (WebCore::SourceAlpha::isSourceInput):
- * platform/graphics/filters/SourceGraphic.h:
- (WebCore::SourceGraphic::isSourceInput):
- * svg/graphics/filters/SVGFETile.cpp:
- (WebCore::FETile::apply):
-
-2009-06-18 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- feMerge implementation
- [https://bugs.webkit.org/show_bug.cgi?id=26480]
-
- Added feMerge to the SVG Filter system.
-
- Test: svg/filters/feMerge.svg
-
- * svg/graphics/filters/SVGFEMerge.cpp:
- (WebCore::FEMerge::uniteChildEffectSubregions):
- (WebCore::FEMerge::apply):
- * svg/graphics/filters/SVGFEMerge.h:
-
-2009-06-18 Mark Rowe <mrowe@apple.com>
-
- Speculative Windows build fix.
-
- * page/win/FrameCGWin.cpp: Add missing #include.
-
-2009-06-17 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Dave Levin.
-
- https://bugs.webkit.org/show_bug.cgi?id=26425
- Final refactorings, picking up a few places where BitmapInfo
- could be used.
-
- * page/win/FrameCGWin.cpp:
- (WebCore::imageFromRect):
- * platform/win/CursorWin.cpp:
- (WebCore::Cursor::Cursor):
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::paint):
-
-2009-06-18 Chris Fleizach <cfleizach@apple.com>
-
- Reviewed by Darin Adler.
-
- Bug 26522: In DOM mode, VoiceOver reads some mouseover text on web sites strangely
- https://bugs.webkit.org/show_bug.cgi?id=26522
-
- Test: accessibility/non-data-table-cell-title-ui-element.html
-
- * accessibility/AccessibilityTableCell.cpp:
- (WebCore::AccessibilityTableCell::titleUIElement):
-
-2009-06-18 Kevin Ollivier <kevino@theolliviers.com>
-
- wx build fix after recent RenderTheme changes.
-
- * platform/wx/RenderThemeWx.cpp:
- (WebCore::RenderThemeWx::~RenderThemeWx):
- (WebCore::RenderTheme::themeForPage):
-
-2009-06-18 Peter Kasting <pkasting@google.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26460 part two
- Attempt to minimize diff of following functional change by first landing
- non-functional change to:
- * Make readUintX() public and static (since they will need to be once
- BMPImageReader is included in *ImageDecoder via composition rather
- than inheritance). Add wrappers in each class so callers can be
- simpler. In the next patch, these wrappers will be beefed up slightly
- and the callers will get even simpler.
- * Change direct setting of m_failed to use setFailed(), since in the
- next patch much of this code won't even have direct access to m_failed
- * Add a helper function in ICOImageDecoder to determine the image type
- instead of simply doing it inline
- * Rewrap lines that used to be <=80 cols and slipped over it during the
- original landing of these decoders
- * Other misc. changes, e.g. adding constructor definitions, reordering
- functions, changing RGBA32Buffer& to RGBA32Buffer*, etc. that have no
- functional effect but minimize the subsequent diff for readability
-
-
- * platform/image-decoders/bmp/BMPImageDecoder.cpp:
- (WebCore::BMPImageDecoder::BMPImageDecoder):
- (WebCore::BMPImageDecoder::processFileHeader):
- * platform/image-decoders/bmp/BMPImageDecoder.h:
- (WebCore::BMPImageDecoder::readUint32):
- * platform/image-decoders/bmp/BMPImageReader.cpp:
- (WebCore::BMPImageReader::decodeBMP):
- (WebCore::BMPImageReader::getInfoHeaderSize):
- (WebCore::BMPImageReader::processInfoHeader):
- (WebCore::BMPImageReader::readInfoHeader):
- (WebCore::BMPImageReader::processBitmasks):
- (WebCore::BMPImageReader::processColorTable):
- (WebCore::BMPImageReader::processRLEData):
- (WebCore::BMPImageReader::processNonRLEData):
- * platform/image-decoders/bmp/BMPImageReader.h:
- (WebCore::BMPImageReader::readUint16Helper):
- (WebCore::BMPImageReader::readUint32Helper):
- (WebCore::BMPImageReader::):
- (WebCore::BMPImageReader::readUint16):
- (WebCore::BMPImageReader::readUint32):
- (WebCore::BMPImageReader::readCurrentPixel):
- (WebCore::BMPImageReader::getComponent):
- (WebCore::BMPImageReader::setI):
- (WebCore::BMPImageReader::setRGBA):
- (WebCore::BMPImageReader::fillRGBA):
- * platform/image-decoders/ico/ICOImageDecoder.cpp:
- (WebCore::ICOImageDecoder::ICOImageDecoder):
- (WebCore::ICOImageDecoder::isSizeAvailable):
- (WebCore::ICOImageDecoder::size):
- (WebCore::ICOImageDecoder::decodeImage):
- (WebCore::ICOImageDecoder::processDirectory):
- (WebCore::ICOImageDecoder::processDirectoryEntries):
- (WebCore::ICOImageDecoder::isBetterEntry):
- (WebCore::ICOImageDecoder::processImageType):
- * platform/image-decoders/ico/ICOImageDecoder.h:
- (WebCore::ICOImageDecoder::readUint16):
- (WebCore::ICOImageDecoder::readUint32):
-
-2009-06-18 Peter Kasting <pkasting@google.com>
-
- Fix build bustage.
-
- * platform/image-decoders/gif/GIFImageDecoder.h:
-
-2009-06-18 Kevin McCullough <kmccullough@apple.com>
-
- Reviewed by Oliver Hunt.
-
- <rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit
-
- Convert intptr_t to Strings so that we don't loose bits in the
- conversion to JS. Previously they were being put into 32bit ints.
-
- * inspector/InspectorController.cpp: Convert the String back to an
- intptr_t.
- (WebCore::InspectorController::addBreakpoint):
- (WebCore::InspectorController::removeBreakpoint):
- * inspector/InspectorController.h:
- * inspector/InspectorController.idl: Use strings in JS to avoid 32bit
- truncation.
- * inspector/InspectorFrontend.cpp: Make the intptr_t into a String.
- (WebCore::InspectorFrontend::parsedScriptSource):
- * platform/text/PlatformString.h: Implemented the necessary conversion
- functions to be able to convert to and from an intptr_t.
- * platform/text/String.cpp: Ditto.
- (WebCore::String::toIntPtrStrict):
- (WebCore::String::toIntPtr):
- (WebCore::charactersToIntPtrStrict):
- (WebCore::charactersToIntPtr):
- * platform/text/StringImpl.cpp: Ditto.
- (WebCore::StringImpl::toIntPtrStrict):
- (WebCore::StringImpl::toIntPtr):
- * platform/text/StringImpl.h: Ditto.
-
-2009-06-17 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Final cleanups in this refactoring:
- (1) Move WindowsBitmap implementation from CG-specific file to
- the platform-common GraphicsContextWin.cpp, since it is
- equally useful on both platforms.
- (2) Revise the TransformationMatrix logic as suggested by
- Adam Roben in his review comments to Part #2 of this
- refactoring.
-
- * platform/graphics/win/GraphicsContextCGWin.cpp:
- * platform/graphics/win/GraphicsContextWin.cpp:
- (WebCore::GraphicsContext::WindowsBitmap::WindowsBitmap):
- (WebCore::GraphicsContext::WindowsBitmap::~WindowsBitmap):
- (WebCore::GraphicsContext::createWindowsBitmap):
- (WebCore::GraphicsContext::getWindowsContext):
- (WebCore::GraphicsContextPlatformPrivate::scale):
- (WebCore::GraphicsContextPlatformPrivate::rotate):
- (WebCore::GraphicsContextPlatformPrivate::translate):
- (WebCore::GraphicsContextPlatformPrivate::concatCTM):
-
-2009-06-18 Peter Kasting <pkasting@google.com>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26460 part one
- Make isSizeAvailable non-const, since it's not logically const (it
- triggers lazy decoding), and simplify all the implementations (without
- changing behavior; just make less verbose). Remove some other
- inappropriate consts, which enables the removal of all the mutable
- declarations in the decoders.
-
- * platform/image-decoders/ImageDecoder.h:
- (WebCore::ImageDecoder::isSizeAvailable):
- (WebCore::ImageDecoder::setSize): Make public to avoid needing a friend declaration in the JPEG decoder, and because the ICO/BMP decoders will soon need this.
- * platform/image-decoders/gif/GIFImageDecoder.cpp:
- (WebCore::GIFImageDecoder::isSizeAvailable):
- (WebCore::GIFImageDecoder::repetitionCount):
- (WebCore::GIFImageDecoder::decode):
- * platform/image-decoders/gif/GIFImageDecoder.h:
- * platform/image-decoders/ico/ICOImageDecoder.cpp:
- (WebCore::ICOImageDecoder::isSizeAvailable):
- * platform/image-decoders/ico/ICOImageDecoder.h:
- * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
- (WebCore::JPEGImageDecoder::isSizeAvailable):
- (WebCore::JPEGImageDecoder::decode):
- * platform/image-decoders/jpeg/JPEGImageDecoder.h:
- * platform/image-decoders/png/PNGImageDecoder.cpp:
- (WebCore::PNGImageDecoder::isSizeAvailable):
- (WebCore::PNGImageDecoder::decode):
- * platform/image-decoders/png/PNGImageDecoder.h:
- * platform/image-decoders/xbm/XBMImageDecoder.cpp:
- (WebCore::XBMImageDecoder::isSizeAvailable):
- (WebCore::XBMImageDecoder::frameBufferAtIndex):
- (WebCore::XBMImageDecoder::decode):
- * platform/image-decoders/xbm/XBMImageDecoder.h: Rename decodeXBM() to decode() for consistency with the JPEG/PNG decoders, and in the future the ICO/BMP decoders.
-
-2009-06-17 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Eric Seidel.
-
- Move some common functions out of platform files and into
- the common implementation.
-
- https://bugs.webkit.org/show_bug.cgi?id=26425.
- Add a new platform context method (flush) so that the
- getWindowsContext method can be consolidated into the common
- GraphicsContextWin.cpp file.
-
- * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
- (WebCore::GraphicsContextPlatformPrivate::flush):
- * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
- (WebCore::GraphicsContextPlatformPrivate::flush):
- * platform/graphics/win/GraphicsContextCGWin.cpp: Remove
- getWindowContext method.
- * platform/graphics/win/GraphicsContextCairoWin.cpp: Remove
- getWindowContext method and fillWithClearColor methods.
- * platform/graphics/win/GraphicsContextWin.cpp:
- (WebCore::fillWithClearColor): Moved from *CairoWin.cpp
- (WebCore::GraphicsContext::getWindowsContext): Moved
- from *CairoWin.cpp
-
-2009-06-18 Ojan Vafai <ojan@chromium.org>
-
- Reviewed by Oliver Hunt.
-
- Remove code that I accidentally committed in r44811.
-
- * editing/markup.cpp:
- (WebCore::createMarkup):
-
-2009-06-18 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dan Bernstein.
-
- <rdar://problem/6983207> Non-layer content is not re-rendered when transition
- starts sometimes (with hardware acceleration).
-
- When deciding which RenderLayers should be composited, when a layer goes into
- compositing mode we repaint the old location. However, we did that before
- we'd looked at all the factors that may force a layer to composite, so missed
- some cases. Fix by doing the repaint once we really know whether it's going
- to composite.
-
- Test: compositing/repaint/become-overlay-composited-layer.html
-
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::computeCompositingRequirements):
-
-2009-06-18 Simon Fraser <simon.fraser@apple.com>
-
- Fix the Leopard build where USE(ACCELERATED_COMPOSITING) is not defined, and
- the Tiger build where QTMovieLayer does not exist.
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::createQTMovieLayer):
- (WebCore::MediaPlayerPrivate::destroyQTMovieLayer):
- (WebCore::MediaPlayerPrivate::currentRenderingMode):
- (WebCore::MediaPlayerPrivate::setUpVideoRendering):
- (WebCore::MediaPlayerPrivate::tearDownVideoRendering):
- (WebCore::MediaPlayerPrivate::hasSetUpVideoRendering):
-
-2009-06-18 Simon Fraser <simon.fraser@apple.com>
-
- Fix the Leopard build where USE(ACCELERATED_COMPOSITING) is not defined.
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::currentRenderingMode):
- (WebCore::MediaPlayerPrivate::setUpVideoRendering):
- (WebCore::MediaPlayerPrivate::tearDownVideoRendering):
-
-2009-06-17 Erik Arvidsson <arv@chromium.org>
-
- Reviewed by Adele Peterson.
-
- https://bugs.webkit.org/show_bug.cgi?id=15189
- Adds the HTML5 input event support for textarea.
-
- Also, moves the oninput attribute parse handling to HTMLElement so that
- it can be set on any HTML element so that bubbling events can be handled
- using HTML attribute handlers.
-
- Test: fast/forms/textarea-input-event.html
-
- * html/HTMLElement.cpp:
- (WebCore::HTMLElement::parseMappedAttribute):
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::parseMappedAttribute):
- * rendering/RenderTextControlMultiLine.cpp:
- (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
-
-2009-06-18 Dirk Schulze <krit@webkit.org>
-
- Reviewed by Oliver Hunt.
-
- Share code between filterEffects
- [https://bugs.webkit.org/show_bug.cgi?id=26479]
-
- Share more code of filter effects. The imageBuffer creation can move to
- FilterEffect ant every effect asks for the GraphicsContext. Move the
- drawingRect calculation to FilterEffect.
-
- * platform/graphics/filters/FilterEffect.cpp:
- (WebCore::FilterEffect::calculateDrawingRect):
- (WebCore::FilterEffect::getEffectContext):
- * platform/graphics/filters/FilterEffect.h:
- * platform/graphics/filters/SourceGraphic.cpp:
- (WebCore::SourceGraphic::apply):
- * svg/graphics/filters/SVGFEFlood.cpp:
- (WebCore::FEFlood::apply):
- * svg/graphics/filters/SVGFEOffset.cpp:
- (WebCore::FEOffset::apply):
-
-2009-06-18 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Dave Hyatt.
-
- https://bugs.webkit.org/show_bug.cgi?id=26499
-
- Support hardware-accelerationed rendering of video elements.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks):
- (WebCore::HTMLMediaElement::mediaPlayerRepaint):
- Just move these methods to group the render-related methods together.
-
- (WebCore::HTMLMediaElement::mediaPlayerRenderingCanBeAccelerated):
- Call out method to ask the RenderLayerCompositor if presentation of this video
- can be acclerated. It might say no, if, for example, the video has a reflection.
-
- (WebCore::HTMLMediaElement::mediaPlayerGraphicsLayer):
- Fetch the GraphicsLayer from the RenderVideo that will host the movie layer.
-
- * html/HTMLMediaElement.h:
- Reordered the rendering-related methods, and added two methods related to video
- acceleration.
-
- * platform/graphics/MediaPlayer.cpp:
- (WebCore::MediaPlayer::acceleratedRenderingStateChanged):
- Called by the rendering system when it determines that the video must go into, or
- fall off of the hardware-accelerated path.
-
- (WebCore::MediaPlayer::supportsAcceleratedRendering):
- Method to say whether the media engine supports accelerated rendering.
-
- * platform/graphics/MediaPlayer.h:
- (WebCore::MediaPlayerClient::mediaPlayerRepaint):
- (WebCore::MediaPlayerClient::mediaPlayerSizeChanged):
- Moved.
-
- (WebCore::MediaPlayerClient::mediaPlayerRenderingCanBeAccelerated):
- (WebCore::MediaPlayerClient::mediaPlayerGraphicsLayer):
- New methods to ask the client if the rendering system can support accelerated
- rendering, and to get a GraphicsLayer to plug the movie layer into.
-
- * platform/graphics/MediaPlayerPrivate.h:
- (WebCore::MediaPlayerPrivateInterface::supportsAcceleratedRendering):
- (WebCore::MediaPlayerPrivateInterface::acceleratedRenderingStateChanged):
- Forwarding methods from MediaPlayer.
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
- Some new methods related to using a QTMovieLayer, and to simplify the rendering mode logic.
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::createQTMovieLayer):
- (WebCore::MediaPlayerPrivate::destroyQTMovieLayer):
- Methods to create and destroy the QTMovieLayer.
-
- (WebCore::MediaPlayerPrivate::currentRenderingMode):
- (WebCore::MediaPlayerPrivate::preferredRenderingMode):
- Methods to clarify the code that decides which of the 3 rendering modes to use.
-
- (WebCore::MediaPlayerPrivate::setUpVideoRendering):
- Changed to use the new rendering mode methods.
-
- (WebCore::MediaPlayerPrivate::tearDownVideoRendering):
- Destroy the layer if we have one.
-
- (WebCore::MediaPlayerPrivate::hasSetUpVideoRendering):
- Small utility method.
-
- (WebCore::MediaPlayerPrivate::updateStates):
- Move the call to setUpVideoRendering() to before we send out the state notifications,
- so that we will have created the rendering objects already.
-
- (WebCore::MediaPlayerPrivate::supportsAcceleratedRendering):
- Return true if we have QTMovieLayer.
-
- (WebCore::MediaPlayerPrivate::acceleratedRenderingStateChanged):
- We've been told that we went into or out of accelerated mode; maybe reset
- the renderer, and set the layer if we have to.
-
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::rendererContentChanged):
- We may need to udpate compositing layers if the video went into accelerated mode.
-
- * rendering/RenderLayerBacking.cpp:
- (WebCore::RenderLayerBacking::canUseDirectCompositing):
- Add smarts to deal with video, which allows us to avoid extra backing store.
-
- (WebCore::RenderLayerBacking::contentsBox):
- Use the videoBox to use the content layer for video layers.
-
- * rendering/RenderLayerCompositor.cpp:
- (WebCore::RenderLayerCompositor::updateLayerCompositingState):
- Poke the RenderVideo if the state changed.
-
- (WebCore::RenderLayerCompositor::computeCompositingRequirements):
- Handle an edge case when the video element itself is a stacking context
- because of opacity or transform.
-
- (WebCore::RenderLayerCompositor::canAccelerateVideoRendering):
- (WebCore::RenderLayerCompositor::requiresCompositingLayer):
- (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
- Allow video to throw us into compositing mode if the media engine supports it.
-
- * rendering/RenderLayerCompositor.h:
- New methods related to video.
-
- * rendering/RenderVideo.h:
- * rendering/RenderVideo.cpp:
- (WebCore::RenderVideo::updatePlayer):
- Call rendererContentChanged() to give the compositor a change to throw the video into
- compositing mode.
-
- (WebCore::RenderVideo::supportsAcceleratedRendering):
- (WebCore::RenderVideo::acceleratedRenderingStateChanged):
- (WebCore::RenderVideo::videoGraphicsLayer):
- Methods to allow the MediaPlayer to do rendering-related stuff via the media element.
-
-2009-06-18 Rob Buis <rwlbuis@gmail.com>
-
- Reviewed by Niko.
-
- https://bugs.webkit.org/show_bug.cgi?id=26385
- Root SVG element is not checked on requiredFeatures, requiredExtension like other elements
-
- Also do the isValid check for outer <svg>.
-
- Test: svg/custom/outer-svg-unknown-feature.svg
-
- * svg/SVGDocument.cpp:
- (WebCore::SVGDocument::childShouldCreateRenderer):
- * svg/SVGDocument.h:
-
-2009-06-18 Dan Bernstein <mitz@apple.com>
-
- Reviewed by Darin Adler.
-
- - fix <rdar://problem/6913221> REGRESSION (Safari 3-4): Search field on
- apple.com cuts entered text
-
- Test: fast/forms/search-vertical-alignment.html
-
- * rendering/RenderTextControlSingleLine.cpp:
- (WebCore::RenderTextControlSingleLine::layout): Vertically center the
- the search field's inner block.
-
-2009-06-18 Janne Koskinen <janne.p.koskinen@digia.com>
-
- Reviewed by Simon Hausmann.
-
- Fix compilation with Symbian WINSCW compiler, which produced
- multiple definitions of the CSSPrimitiveValue conversion operators.
-
- It turns out that they are defined inline but not declared inline.
-
- Adding the inline keyword to the declaration fixes the build.
-
- * css/CSSPrimitiveValue.h:
-
-2009-06-18 Markus Goetz <Markus.Goetz@nokia.com>
-
- Reviewed by Simon Hausman.
-
- Clarify in docs how to compile with debug information.
-
- * WebCore.pro:
-
-2009-06-18 Jakub Wieczorek <faw217@gmail.com>
-
- Reviewed by Simon Hausmann.
-
- [Qt] When writing an URL to the clipboard, save the corresponding title
- in the mime data as well.
-
- * platform/qt/ClipboardQt.cpp:
- (WebCore::ClipboardQt::writeURL):
-
-2009-06-18 Jakub Wieczorek <faw217@gmail.com>
-
- [Qt] Fix build. Add HTMLDataGridElement.
-
- * WebCore.pro:
-
-2009-06-18 Jan Michael Alonzo <jmalonzo@webkit.org>
-
- Gtk build fix.
-
- Add HTMLDataGridElement header and IDL to the build script.
-
- * GNUmakefile.am:
-
-2009-06-18 Chris Evans <scarybeasts@gmail.com>
-
- Reviewed by Adam Barth.
-
- Fix 8-digit long hex entities. Fixes bug 26454
- https://bugs.webkit.org/show_bug.cgi?id=26454
-
- Test: fast/parser/eightdigithexentity.html
-
- * html/HTMLTokenizer.cpp: fix off-by-ones.
-
-2009-06-18 David Levin <levin@chromium.org>
-
- Fix chromium linux build.
-
- Fixes a mistake that happened during the complicated merge for
- landing r44775, r44776, r44777.
-
- * rendering/RenderThemeChromiumLinux.cpp:
- (WebCore::RenderThemeChromiumLinux::create):
-
-2009-06-17 Simon Fraser <simon.fraser@apple.com>
-
- Reviewed by Darin Adler.
-
- https://bugs.webkit.org/show_bug.cgi?id=26499
-
- First step to making video rendering be hardware-accelerated:
- make <video> elements get self-painting RenderLayers, and add
- an isVideo() virtual method to RenderObject.
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::setReadyState):
- (WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
- (WebCore::HTMLMediaElement::mediaPlayerSizeChanged):
- * rendering/RenderLayer.cpp:
- (WebCore::RenderLayer::shouldBeNormalFlowOnly):
- (WebCore::RenderLayer::isSelfPaintingLayer):
- * rendering/RenderObject.h:
- (WebCore::RenderObject::isVideo):
- * rendering/RenderVideo.h:
- (WebCore::RenderVideo::requiresLayer):
- (WebCore::RenderVideo::isVideo):
-
-2009-06-17 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Adam Roben.
-
- Refactor a few common routines in the various Windows ports
- and reduce some duplicated code.
-
- (1) Create TransformationMatrix XFORM casting operator, and
- switch various XFORM structure uses to utilize it.
- (2) Push concatCTM call to GraphicsContextWin now that the
- TransformationMatrix can directly create XFORM (rather
- than converting to CGAffineTransform/cairo_matrix_t first.)
-
- * WebCore.vcproj/WebCore.vcproj: Add new BitmapInfo structure.
- * platform/graphics/transforms/TransformationMatrix.h:
- * platform/graphics/win/GraphicsContextCGWin.cpp:
- * platform/graphics/win/GraphicsContextCairoWin.cpp:
- * platform/graphics/win/GraphicsContextWin.cpp:
- (WebCore::GraphicsContextPlatformPrivate::scale):
- (WebCore::GraphicsContextPlatformPrivate::rotate):
- (WebCore::GraphicsContextPlatformPrivate::translate):
- (WebCore::GraphicsContextPlatformPrivate::concatCTM):
- * platform/graphics/win/TransformationMatrixWin.cpp: Added.
- (WebCore::TransformationMatrix::operator XFORM): New operator
-
-2009-06-17 Brent Fulgham <bfulgham@webkit.org>
-
- Non-CG Windows build fix after @r44758.
-
- * rendering/RenderThemeWin.cpp:
- (WebCore::RenderTheme::themeForPage):
-
-2009-06-17 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Adam Roben.
-
- Refactor a few common routines in the various Windows ports
- and reduce some duplicated code.
- https://bugs.webkit.org/show_bug.cgi?id=26425.
-
- Refactor use of BITMAPINFO for the new BitmapInfo structure.
-
- * WebCore.vcproj/WebCore.vcproj:
- * platform/win/BitmapInfo.cpp: Added.
- (WebCore::bitmapInfoForSize):
- (WebCore::BitmapInfo::create):
- (WebCore::BitmapInfo::createBottomUp):
- * platform/win/BitmapInfo.h: Added.
- * platform/graphics/win/GraphicsContextCairoWin.cpp:
- * platform/graphics/win/GraphicsContextCGWin.cpp:
- * platform/graphics/win/TransformationMatrixWin.cpp: Added.
- (WebCore::TransformationMatrix::operator XFORM): New operator
- * platform/win/DragImageCGWin.cpp:
- (WebCore::allocImage):
- * platform/win/DragImageCairoWin.cpp:
- (WebCore::allocImage):
- * platform/win/PasteboardWin.cpp:
- (WebCore::Pasteboard::writeImage):
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::paint):
-
-2009-06-17 Adam Roben <aroben@apple.com>
-
- Remove unnecessary 6th parameter from SOFT_LINK_OPTIONAL
-
- Reviewed by Mark Rowe.
-
- * platform/graphics/win/ColorSafari.cpp: Removed the 6th parameter and
- an unnecessary parameter name.
- * platform/win/SoftLinking.h: Removed the unused 6th parameter.
-
-2009-06-17 Adam Roben <aroben@apple.com>
-
- Make Settings::shouldPaintNativeControls default to true
-
- This matches the default up in WebKit (that was changed in r43318).
-
- Fixes Bug 26493: REGRESSION (r44758): First tab always uses Mac-style
- form controls
- <https://bugs.webkit.org/show_bug.cgi?id=26493>
-
- Reviewed by Darin Adler and Dave Hyatt.
-
- No test possible since DRT always uses Mac-style form controls.
-
- * page/Settings.cpp: Changed the initial value of
- gShouldPaintNativeControls to true.
-
- * rendering/RenderThemeSafari.cpp:
- (WebCore::RenderTheme::themeForPage): Added a FIXME about the design
- flaw here involving querying Settings before it's been initialized.
-
-2009-06-17 David Levin <levin@chromium.org>
-
- Fix chromium windows build.
-
- A mistake that happened during the complicated merge for
- landing r44775, r44776, r44777.
-
- * rendering/RenderThemeChromiumWin.h:
- (WebCore::RenderThemeChromiumWin::RenderThemeChromiumWin):
- (WebCore::RenderThemeChromiumWin::~RenderThemeChromiumWin):
-
-2009-06-17 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- <rdar://problem/6981193> Crash in MediaControlInputElement::attachToParent
-
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaTextDisplayElement::attachToParent): NULL check element renderer or parent renderer.
- (WebCore::MediaControlInputElement::attachToParent): Ditto.
-
-2009-06-17 David Hyatt <hyatt@apple.com>
-
- Fix Windows build. There's no HTMLDataGridElement.cpp file yet.
-
- * html/HTMLElementsAllInOne.cpp:
-
-2009-06-17 David Hyatt <hyatt@apple.com>
-
- Reviewed by Adam Roben and Anders Carlsson.
-
- Stub out the HTMLDataGridElement.
-
- * DerivedSources.make:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * WebCoreSources.bkl:
- * css/CSSStyleSelector.cpp:
- (WebCore::CSSStyleSelector::adjustRenderStyle):
- * editing/htmlediting.cpp:
- (WebCore::canHaveChildrenForEditing):
- * html/HTMLDataGridElement.h: Added.
- (WebCore::HTMLDataGridElement::HTMLDataGridElement):
- (WebCore::HTMLDataGridElement::tagPriority):
- * html/HTMLDataGridElement.idl: Added.
- * html/HTMLElement.cpp:
- (WebCore::inlineTagList):
- * html/HTMLParser.cpp:
- (WebCore::HTMLParser::isAffectedByResidualStyle):
- * html/HTMLTagNames.in:
-
-2009-06-17 David Levin <levin@chromium.org>
-
- Reviewed by NOBODY (chromium build fix).
-
- Fix typo in previous changes.
-
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::RenderThemeChromiumSkia::defaultGUIFont):
-
-2009-06-17 Albert J. Wong <ajwong@chromium.org>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26148
- Remove common code from RenderThemeChromiumWin that is shared with
- RenderThemeChromiumSkia.
-
- Also move supportsControlTints to RenderThemeChromiumLinux since it
- is linux specific.
-
- There are no tests changed because this just removes functions with
- duplicate implementations between the base and derived classes.
-
- * rendering/RenderThemeChromiumLinux.cpp:
- (WebCore::RenderThemeChromiumLinux::supportsControlTints):
- * rendering/RenderThemeChromiumLinux.h:
- * rendering/RenderThemeChromiumSkia.cpp:
- * rendering/RenderThemeChromiumSkia.h:
- * rendering/RenderThemeChromiumWin.cpp:
- (WebCore::):
- (WebCore::getNonClientMetrics):
- (WebCore::RenderThemeChromiumWin::RenderThemeChromiumWin):
- (WebCore::RenderThemeChromiumWin::~RenderThemeChromiumWin):
- (WebCore::RenderThemeChromiumWin::systemFont):
- (WebCore::RenderThemeChromiumWin::paintCheckbox):
- (WebCore::RenderThemeChromiumWin::paintRadio):
- (WebCore::RenderThemeChromiumWin::paintSliderThumb):
- (WebCore::RenderThemeChromiumWin::caretBlinkIntervalInternal):
- * rendering/RenderThemeChromiumWin.h:
-
-2009-06-17 Albert J. Wong <ajwong@chromium.org>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26148
- Move RenderThemeChromiumSkia into its own file. This is purely a code move.
-
- * rendering/RenderThemeChromiumLinux.cpp:
- * rendering/RenderThemeChromiumLinux.h:
- * rendering/RenderThemeChromiumSkia.cpp:
- (WebCore::):
- (WebCore::setSizeIfAuto):
- (WebCore::mediaElementParent):
- (WebCore::RenderThemeChromiumSkia::defaultGUIFont):
- (WebCore::RenderThemeChromiumSkia::RenderThemeChromiumSkia):
- (WebCore::RenderThemeChromiumSkia::~RenderThemeChromiumSkia):
- (WebCore::RenderThemeChromiumSkia::extraDefaultStyleSheet):
- (WebCore::RenderThemeChromiumSkia::extraQuirksStyleSheet):
- (WebCore::RenderThemeChromiumSkia::extraMediaControlsStyleSheet):
- (WebCore::RenderThemeChromiumSkia::supportsHover):
- (WebCore::RenderThemeChromiumSkia::supportsFocusRing):
- (WebCore::RenderThemeChromiumSkia::platformActiveSelectionBackgroundColor):
- (WebCore::RenderThemeChromiumSkia::platformInactiveSelectionBackgroundColor):
- (WebCore::RenderThemeChromiumSkia::platformActiveSelectionForegroundColor):
- (WebCore::RenderThemeChromiumSkia::platformInactiveSelectionForegroundColor):
- (WebCore::RenderThemeChromiumSkia::platformTextSearchHighlightColor):
- (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
- (WebCore::RenderThemeChromiumSkia::systemFont):
- (WebCore::RenderThemeChromiumSkia::minimumMenuListSize):
- (WebCore::RenderThemeChromiumSkia::paintCheckbox):
- (WebCore::RenderThemeChromiumSkia::setCheckboxSize):
- (WebCore::RenderThemeChromiumSkia::paintRadio):
- (WebCore::RenderThemeChromiumSkia::setRadioSize):
- (WebCore::brightenColor):
- (WebCore::paintButtonLike):
- (WebCore::RenderThemeChromiumSkia::paintButton):
- (WebCore::RenderThemeChromiumSkia::paintTextField):
- (WebCore::RenderThemeChromiumSkia::paintTextArea):
- (WebCore::RenderThemeChromiumSkia::paintSearchField):
- (WebCore::RenderThemeChromiumSkia::adjustSearchFieldCancelButtonStyle):
- (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
- (WebCore::RenderThemeChromiumSkia::adjustSearchFieldDecorationStyle):
- (WebCore::RenderThemeChromiumSkia::adjustSearchFieldResultsDecorationStyle):
- (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
- (WebCore::RenderThemeChromiumSkia::adjustSearchFieldResultsButtonStyle):
- (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
- (WebCore::RenderThemeChromiumSkia::paintMediaButtonInternal):
- (WebCore::RenderThemeChromiumSkia::paintMediaPlayButton):
- (WebCore::RenderThemeChromiumSkia::paintMediaMuteButton):
- (WebCore::RenderThemeChromiumSkia::adjustMenuListStyle):
- (WebCore::RenderThemeChromiumSkia::paintMenuList):
- (WebCore::RenderThemeChromiumSkia::adjustMenuListButtonStyle):
- (WebCore::RenderThemeChromiumSkia::paintMenuListButton):
- (WebCore::RenderThemeChromiumSkia::popupInternalPaddingLeft):
- (WebCore::RenderThemeChromiumSkia::popupInternalPaddingRight):
- (WebCore::RenderThemeChromiumSkia::popupInternalPaddingTop):
- (WebCore::RenderThemeChromiumSkia::popupInternalPaddingBottom):
- (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingLeft):
- (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingRight):
- (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingTop):
- (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingBottom):
- (WebCore::RenderThemeChromiumSkia::caretBlinkIntervalInternal):
- (WebCore::RenderThemeChromiumSkia::menuListInternalPadding):
- * rendering/RenderThemeChromiumSkia.h:
- (WebCore::RenderThemeChromiumSkia::supportsControlTints):
-
-2009-06-17 Albert J. Wong <ajwong@chromium.org>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=26148
- Extract RenderThemeChromiumSkia out of RenderThemeChromiumLinux. This
- is mostly a code shuffle. The non-suffle changes are:
- 1) Creation of a caretBlinkIntervalInternal.
- 2) Moving of some inline functions into the implementation files.
- 3) Changing of defaultGUIFont into a static class constant from a
- static function. Also the type is changed to String.
- 4) Changing of defaultFontSize into a static class constant from a
- static variable in the file scope.
- 5) The static supportsFocus function was collapsed into
- supportsFocusRing.
- 6) Split the extraDefaultStyleSheet into Skia and Linux versions.
-
- * rendering/RenderThemeChromiumLinux.cpp:
- (WebCore::RenderThemeChromiumSkia::defaultGUIFont):
- (WebCore::RenderThemeChromiumSkia::RenderThemeChromiumSkia):
- (WebCore::RenderThemeChromiumSkia::~RenderThemeChromiumSkia):
- (WebCore::RenderThemeChromiumSkia::extraDefaultStyleSheet):
- (WebCore::RenderThemeChromiumSkia::extraQuirksStyleSheet):
- (WebCore::RenderThemeChromiumSkia::extraMediaControlsStyleSheet):
- (WebCore::RenderThemeChromiumSkia::supportsHover):
- (WebCore::RenderThemeChromiumSkia::supportsFocusRing):
- (WebCore::RenderThemeChromiumSkia::platformActiveSelectionBackgroundColor):
- (WebCore::RenderThemeChromiumSkia::platformInactiveSelectionBackgroundColor):
- (WebCore::RenderThemeChromiumSkia::platformActiveSelectionForegroundColor):
- (WebCore::RenderThemeChromiumSkia::platformInactiveSelectionForegroundColor):
- (WebCore::RenderThemeChromiumSkia::platformTextSearchHighlightColor):
- (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
- (WebCore::RenderThemeChromiumSkia::systemFont):
- (WebCore::RenderThemeChromiumSkia::minimumMenuListSize):
- (WebCore::RenderThemeChromiumSkia::paintCheckbox):
- (WebCore::RenderThemeChromiumSkia::setCheckboxSize):
- (WebCore::RenderThemeChromiumSkia::paintRadio):
- (WebCore::RenderThemeChromiumSkia::setRadioSize):
- (WebCore::RenderThemeChromiumSkia::paintButton):
- (WebCore::RenderThemeChromiumSkia::paintTextField):
- (WebCore::RenderThemeChromiumSkia::paintTextArea):
- (WebCore::RenderThemeChromiumSkia::paintSearchField):
- (WebCore::RenderThemeChromiumSkia::adjustSearchFieldCancelButtonStyle):
- (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
- (WebCore::RenderThemeChromiumSkia::adjustSearchFieldDecorationStyle):
- (WebCore::RenderThemeChromiumSkia::adjustSearchFieldResultsDecorationStyle):
- (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
- (WebCore::RenderThemeChromiumSkia::adjustSearchFieldResultsButtonStyle):
- (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
- (WebCore::RenderThemeChromiumSkia::paintMediaButtonInternal):
- (WebCore::RenderThemeChromiumSkia::paintMediaPlayButton):
- (WebCore::RenderThemeChromiumSkia::paintMediaMuteButton):
- (WebCore::RenderThemeChromiumSkia::adjustMenuListStyle):
- (WebCore::RenderThemeChromiumSkia::paintMenuList):
- (WebCore::RenderThemeChromiumSkia::adjustMenuListButtonStyle):
- (WebCore::RenderThemeChromiumSkia::paintMenuListButton):
- (WebCore::RenderThemeChromiumSkia::popupInternalPaddingLeft):
- (WebCore::RenderThemeChromiumSkia::popupInternalPaddingRight):
- (WebCore::RenderThemeChromiumSkia::popupInternalPaddingTop):
- (WebCore::RenderThemeChromiumSkia::popupInternalPaddingBottom):
- (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingLeft):
- (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingRight):
- (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingTop):
- (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingBottom):
- (WebCore::RenderThemeChromiumSkia::caretBlinkIntervalInternal):
- (WebCore::RenderThemeChromiumLinux::RenderThemeChromiumLinux):
- (WebCore::RenderThemeChromiumLinux::~RenderThemeChromiumLinux):
- (WebCore::RenderThemeChromiumLinux::systemColor):
- (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
- (WebCore::RenderThemeChromiumSkia::menuListInternalPadding):
- * rendering/RenderThemeChromiumLinux.h:
-
-2009-06-17 Adam Roben <aroben@apple.com>
-
- Add a SOFT_LINK_OPTIONAL macro
-
- This macro is useful when soft-linking functions that are present in
- only some versions of a particular library (e.g., APIs added in
- Windows Vista that aren't available on Windows XP).
-
- Reviewed by Ada Chan.
-
- * platform/graphics/win/ColorSafari.cpp:
- (WebCore::focusRingColor):
- Use the SoftLinking.h macros instead of doing the soft-link ourselves.
- Also removed an unused call to focusRingColor.isValid().
-
- * platform/win/SoftLinking.h: Added SOFT_LINK_OPTIONAL.
-
-2009-06-17 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Gustavo Noronha.
-
- Fixes: https://bugs.webkit.org/show_bug.cgi?id=26470.
- The use of zero-width or zero-height rectangles in generating
- gradients caused Windows Cairo to crash, and webkitgtk to
- produce invalid images.
-
- We now test for NaN in the phase argument, which is calculated
- using fmodf and can blow up when the width/height values passed
- are zero.
-
- Test: fast/gradients/border-image-gradient-sides-and-corners.html
-
- * platform/graphics/cairo/ImageCairo.cpp:
- (WebCore::Image::drawPattern):
-
-2009-06-17 Ojan Vafai <ojan@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- If loading a font fails because of the sandbox, we ask the browser process to
- try to load it by calling ensureFontLoaded. If it still fails after
- ensureFontLoaded, we hit a ASSERT_NOT_REACHED.
-
- This case happens once in a while during browser shutdown. The browser will
- queue a message to the renderer to shutdown, and will then stop answering sync
- messages from the renderer. If the renderer is still loading a page during this
- time, it might try to call the browser process to ask to load a font. The
- browser process will ignore the request, and the font will fail to load, even
- after the second try.
-
- This is unfortunate, but there is no real risk here, since the renderer will be
- going away as soon as it processes another message.
-
- This can't be layout tested as it depends on the sandbox.
-
- https://bugs.webkit.org/show_bug.cgi?id=26484
-
- * platform/graphics/chromium/FontCacheChromiumWin.cpp:
- (WebCore::fontContainsCharacter):
-
-2009-06-17 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Dan Bernstein.
-
- https://bugs.webkit.org/show_bug.cgi?id=26482
- <rdar://problem/6978590> When setting playback rate to 0, the audio element stops
- playing (doesn't resume later)
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::setRate): Always set the rate, even when "paused".
-
- * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
- (WebCore::MediaPlayerPrivate::setRate): Ditto.
-
-2009-06-17 Adam Roben <aroben@apple.com>
-
- Add all the generated JS*.cpp files back to WebCore.vcproj
-
- They are not compiled by the vcproj directly. Instead they are
- compiled as part of DerivedSources.cpp. Having them listed in the
- vcproj makes them be included in Project Find, etc.
-
- Rubber-stamped in advance by Steve Falkenburg.
-
- * WebCore.vcproj/WebCore.vcproj:
-
-2009-06-17 Kent Tamura <tkent@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Don't fire redundant 'change' events for a file upload form.
- https://bugs.webkit.org/show_bug.cgi?id=26471
-
- * platform/FileChooser.cpp:
- (WebCore::FileChooser::chooseFiles): Suppress change event if the
- existing selected files and the incoming selected files are equal.
- (WebCore::FileChooser::chooseIcon): Returns 0 if there is no selected
- files.
-
-2009-06-17 Adam Treat <adam.treat@torchmobile.com>
-
- Reviewed by George Staikos.
-
- https://bugs.webkit.org/show_bug.cgi?id=23155
- Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
-
- * platform/KeyboardCodes.h:
-
-2009-06-17 George Staikos <george.staikos@torchmobile.com>
-
- Reviewed by Adam Treat.
-
- https://bugs.webkit.org/show_bug.cgi?id=23155
- Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
-
- * platform/graphics/qt/GraphicsContextQt.cpp:
- (WebCore::GraphicsContext::getWindowsContext):
- * platform/win/SystemTimeWin.cpp:
- (WebCore::userIdleTime):
-
-2009-06-17 Adam Roben <aroben@apple.com>
-
- Speculative Mac build fix
-
- * page/Page.h: Forward-declare RenderTheme instead of including
- RenderTheme.h so that we don't need to make RenderTheme.h a private
- header for WebKit's benefit.
-
- * editing/SelectionController.cpp:
- * rendering/InlineTextBox.cpp:
- * rendering/RenderObject.cpp:
- Added #includes of RenderTheme.h.
-
-2009-06-17 Adam Roben <aroben@apple.com>
-
- Speculative Mac build fix
-
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderTheme::create): Added.
-
-2009-06-17 Adam Roben <aroben@apple.com>
-
- Speculative Mac build fix
-
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderTheme::themeForPage): Remove the name of an unused
- parameter.
-
-2009-06-17 Adam Roben <aroben@apple.com>
-
- Speculative Mac build fix
-
- * page/Page.cpp:
- (WebCore::Page::Page): Change the initializer order to match the
- declaration order.
-
-2009-06-16 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
-
- Reviewed by Simon Hausmann.
-
- Follow up to bug https://bugs.webkit.org/show_bug.cgi?id=26278
- Patch that make WebCore have a RenderTheme per page
-
- Make the Qt implementation of RenderTheme create a theme per page,
- and use the QStyle associated with the view of each page, in order
- to make the QWidget setStyle() method work as advertised.
-
- * platform/qt/RenderThemeQt.cpp:
- (WebCore::RenderThemeQt::RenderThemeQt):
- (WebCore::RenderThemeQt::qStyle):
- (WebCore::findFrameLineWidth):
- (WebCore::inflateButtonRect):
- (WebCore::RenderThemeQt::adjustRepaintRect):
- (WebCore::RenderThemeQt::isControlStyled):
- (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
- (WebCore::RenderThemeQt::setButtonPadding):
- (WebCore::RenderThemeQt::paintButton):
- (WebCore::RenderThemeQt::paintTextField):
- (WebCore::RenderThemeQt::setPopupPadding):
- * platform/qt/RenderThemeQt.h:
-
-2009-06-16 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
-
- Reviewed by Dave Hyatt and Adam Roben.
-
- https://bugs.webkit.org/show_bug.cgi?id=26278
- Patch that make WebCore have a RenderTheme per page
-
-
- Create a different RenderTheme per page, so that RenderTheme has
- access to page specific theming. This is needed for the Qt port, as Qt
- supports setting the theme (style) per widget.
-
- This change was suggested and discussed with Dave Hyatt.
-
- More detailed:
-
- 1) Create a theme per page or one global one, depending on the needs
- of the platform.
- 2) Add an accesser to the theme from RenderObject.
- 3) Change all uses of the theming to access the theme through
- RenderObject, using the global default theme as fallback, when the
- document of RenderObject has no page.
- When we don't have access to a RenderObject, use the default theme.
- 4) Modify all RenderTheme platform implementations to work with the
- above changes, still creating only one global theme.
-
-
- * accessibility/AccessibilityRenderObject.cpp:
- (WebCore::AccessibilityRenderObject::boundingBoxRect):
- * css/CSSStyleSelector.cpp:
- (WebCore::loadFullDefaultStyle):
- (WebCore::CSSStyleSelector::styleForElement):
- (WebCore::CSSStyleSelector::adjustRenderStyle):
- (WebCore::CSSStyleSelector::applyProperty):
- * dom/ContainerNode.cpp:
- (WebCore::ContainerNode::setActive):
- (WebCore::ContainerNode::setHovered):
- * editing/SelectionController.cpp:
- (WebCore::SelectionController::focusedOrActiveStateChanged):
- * html/HTMLFormControlElement.cpp:
- (WebCore::HTMLFormControlElement::parseMappedAttribute):
- * html/HTMLInputElement.cpp:
- (WebCore::HTMLInputElement::setChecked):
- (WebCore::HTMLInputElement::setIndeterminate):
- * page/Frame.cpp:
- (WebCore::Frame::selectionLayoutChanged):
- * page/FrameView.cpp:
- (WebCore::FrameView::updateControlTints):
- * page/Page.cpp:
- (WebCore::Page::Page):
- * page/Page.h:
- (WebCore::Page::theme):
- * platform/chromium/PopupMenuChromium.cpp:
- (WebCore::PopupListBox::paintRow):
- * platform/gtk/RenderThemeGtk.cpp:
- (WebCore::RenderThemeGtk::create):
- (WebCore::RenderTheme::themeForPage):
- (WebCore::RenderThemeGtk::RenderThemeGtk):
- (WebCore::RenderThemeGtk::~RenderThemeGtk):
- (WebCore::RenderThemeGtk::gtkEntry):
- (WebCore::RenderThemeGtk::gtkTreeView):
- * platform/gtk/RenderThemeGtk.h:
- * platform/qt/RenderThemeQt.cpp:
- (WebCore::RenderThemeQt::create):
- (WebCore::RenderTheme::themeForPage):
- * platform/qt/RenderThemeQt.h:
- * platform/win/PopupMenuWin.cpp:
- (WebCore::PopupMenu::paint):
- * rendering/RenderMediaControls.cpp:
- (WebCore::determineState):
- * platform/wx/RenderThemeWx.cpp:
- (WebCore::RenderThemeWx::create):
- (WebCore::RenderTheme::themeForPage):
- * rendering/InlineTextBox.cpp:
- (WebCore::InlineTextBox::paintTextMatchMarker):
- * rendering/MediaControlElements.cpp:
- (WebCore::MediaControlInputElement::hitTest):
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::theme):
- * rendering/RenderObject.h:
- * rendering/RenderTheme.cpp:
- (WebCore::RenderTheme::adjustStyle):
- * rendering/RenderTheme.h:
- (WebCore::RenderTheme::defaultTheme):
- * rendering/RenderThemeChromiumLinux.cpp:
- (WebCore::RenderThemeChromiumLinux::create):
- (WebCore::RenderTheme::themeForPage):
- * rendering/RenderThemeChromiumLinux.h:
- (WebCore::RenderThemeChromiumLinux::~RenderThemeChromiumLinux):
- * rendering/RenderThemeChromiumMac.h:
- * rendering/RenderThemeChromiumMac.mm:
- (WebCore::RenderThemeChromiumMac::create):
- (WebCore::RenderTheme::themeForPage):
- * rendering/RenderThemeChromiumWin.cpp:
- (WebCore::RenderThemeChromiumWin::create):
- (WebCore::RenderTheme::themeForPage):
- * rendering/RenderThemeChromiumWin.h:
- (WebCore::RenderThemeChromiumWin::RenderThemeChromiumWin):
- (WebCore::RenderThemeChromiumWin::~RenderThemeChromiumWin):
- * rendering/RenderThemeMac.h:
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderTheme::themeForPage):
- * rendering/RenderThemeSafari.cpp:
- (WebCore::RenderThemeSafari::create):
- (WebCore::RenderTheme::themeForPage):
- * rendering/RenderThemeSafari.h:
- * rendering/RenderThemeWin.cpp:
- (WebCore::RenderThemeWin::create):
- (WebCore::RenderTheme::themeForPage):
- * rendering/RenderThemeWin.h:
-
-2009-06-17 Gavin Barraclough <barraclough@apple.com>
-
- Reviewed by Oliver Hunt.
-
- <rdar://problem/6974175> ASSERT in JITStubs.cpp at appsaccess.apple.com
-
- JSDOMWindowCustom was using PropertySlot::putValue, however this interface
- appears to be fundaementally incorrect - PropertySlots are only used to get
- values, all puts use PutPropertySlot. However PutPropertySlot cannot be
- used in the fashion desired here - it only reports the caching type of a
- write that has been performed.
-
- (This caused a bug where the put should have triggered a transition, and
- failed to do so.)
-
- Removing the faulty case from the optimization leads to a ~0.5% progression
- on in-browser SunSpider (presumably the very first case was not being hit
- often, and the simplification here is beneficial).
-
- * bindings/js/JSDOMWindowCustom.cpp:
- (WebCore::JSDOMWindow::put):
-
-2009-06-17 David Levin <levin@chromium.org>
-
- Reviewed by NOBODY, layout tests fix.
-
- https://bugs.webkit.org/show_bug.cgi?id=26326
- This reverts commit r44751.
-
- Once that change was checked scrollbars/scrollbar-orientation.html started
- crashing on Windows.
-
- * dom/Document.cpp:
- (WebCore::Document::detach):
- * page/FrameView.cpp:
- * page/FrameView.h:
- * platform/Scrollbar.h:
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::destroy):
- * rendering/RenderScrollbar.h:
-
-2009-06-16 Kevin Watters <kevinwatters@gmail.com>
-
- Reviewed by Kevin Ollivier.
-
- In ImageSource::setData, delete the old m_encoder before replacing it with a new one.
-
- https://bugs.webkit.org/show_bug.cgi?id=26458
-
- * platform/graphics/wx/ImageSourceWx.cpp:
- (WebCore::ImageSource::setData):
-
-2009-06-16 David Levin <levin@chromium.org>
-
- Reviewed by David Hyatt.
-
- REGRESSION: When the main page (ScrollView) has a custom scrollbar, it crashes on destruction.
- https://bugs.webkit.org/show_bug.cgi?id=26326
-
- Test: scrollbars/scrollbar-crash-on-refresh.html
-
- * dom/Document.cpp:
- (WebCore::Document::detach):
- Gives the FrameView a change to do any necessary cleanup on
- Document::detach() which is where the renderArena gets detroyed.
- * page/FrameView.cpp:
- (WebCore::FrameView::detachCustomScrollbars):
- Gets rid of any custom scrollbars (if the docment supplied them).
- * page/FrameView.h:
- * platform/Scrollbar.h:
- (WebCore::Scrollbar::isCustomScrollbar):
- * rendering/RenderObject.cpp:
- (WebCore::RenderObject::destroy):
- Removed the check for document()->frame(). If frame() is 0 in this code,
- then the call to animation() is also incorrect (since it does document()->frame()->animation()).
- * rendering/RenderScrollbar.h:
- (WebCore::RenderScrollbar::isCustomScrollbar):
-
-2009-06-16 Brian Weinstein <bweinstein@apple.com>
-
- Reviewed by Adele Peterson.
-
- Fix of <rdar://6967547> Ctrl-C copies null value erasing text in clipboard in Safari.
- This patch kept the way events were firing as they were before, and Windows events are
- consistent with Mac.
-
- * editing/Editor.cpp:
- (WebCore::Editor::tryDHTMLCopy): Added check for canCopy() before clearing PasteBoard
- (WebCore::Editor::tryDHTMLCut): Added check for canCut() before clearing PasteBoard
-
-2009-06-16 Antti Koivisto <antti@apple.com>
-
- Reviewed by Brady Eidson.
-
- <rdar://problem/6660037> CrashTracer: [USER] 46 crashes in Safari at com.apple.WebCore • WebCore::CachedCSSStyleSheet::addClient 53
-
- When revalidating a resource, calling addClient() on one client might cause another to get removed.
-
- - made CachedResource::addClient() non-virtual and added virtual didAddClient()
- - in CachedResource::switchClientsToRevalidatedResource() add all clients to the client set of the revalidated resource first
- - check if the client is still in the set before invoking didAddClient() for it
-
- No test case, I didn't manage to construct one. You need some combination of 304 revalidation, stylesheets that
- reference each other via @imports and reloading.
-
- * WebCore.base.exp:
- * loader/CachedCSSStyleSheet.cpp:
- (WebCore::CachedCSSStyleSheet::didAddClient):
- * loader/CachedCSSStyleSheet.h:
- * loader/CachedFont.cpp:
- (WebCore::CachedFont::didAddClient):
- * loader/CachedFont.h:
- * loader/CachedImage.cpp:
- (WebCore::CachedImage::didAddClient):
- * loader/CachedImage.h:
- * loader/CachedResource.cpp:
- (WebCore::CachedResource::addClient):
- (WebCore::CachedResource::addClientToSet):
- (WebCore::CachedResource::switchClientsToRevalidatedResource):
- * loader/CachedResource.h:
- * loader/CachedScript.cpp:
- (WebCore::CachedScript::didAddClient):
- * loader/CachedScript.h:
- * loader/CachedXSLStyleSheet.cpp:
- (WebCore::CachedXSLStyleSheet::didAddClient):
- * loader/CachedXSLStyleSheet.h:
-
-2009-06-16 Simon Fraser <simon.fraser@apple.com>
-
- No Review
-
- Fix code inside an #ifdef that draws the video framerate.
-
- * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
- (WebCore::MediaPlayerPrivate::paint):
-
-2009-06-16 Jian Li <jianli@chromium.org>
-
- Reviewed by Dimitri Glazkov.
-
- Bug 26456: Hook up V8 bindings for Worker's importScripts functionality.
- https://bugs.webkit.org/show_bug.cgi?id=26456
-
- * bindings/v8/custom/V8WorkerContextCustom.cpp:
- (WebCore::CALLBACK_FUNC_DECL):
- * bindings/v8/custom/V8WorkerCustom.cpp: Fixed missing exception code
- handling in Worker constructor for V8 bindings.
- (WebCore::CALLBACK_FUNC_DECL):
-
-2009-06-16 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Maciej Stachowiak.
-
- Update of https://bugs.webkit.org/show_bug.cgi?id=26353.
- Provide an assignment operator to avoid improper reference
- counts on the Cairo font objects. This brings the Windows
- Cairo port in line with the GTKport.
-
- * platform/graphics/win/FontPlatformData.h:
- * platform/graphics/win/FontPlatformDataCairoWin.cpp:
- (WebCore::FontPlatformData::FontPlatformData):
- (WebCore::FontPlatformData::operator=):
-
-2009-06-16 Eric Carlson <eric.carlson@apple.com>
-
- Reviewed by Simon Fraser.
-
- Fix for <rdar://problem/6890126> Theme code should fetch the MediaControlElementType from
- the MediaControlInputElement, rather than computing it again
-
- * html/HTMLMediaElement.cpp:
- (WebCore::HTMLMediaElement::percentLoaded): New, utility function for controller implementation.
- * html/HTMLMediaElement.h:
-
- * rendering/MediaControlElements.h:
- (WebCore::MediaControlInputElement::displayType): New, return m_displayType.
-
- * rendering/RenderMediaControls.cpp:
- (WebCore::RenderMediaControls::paintMediaControlsPart): Stop using MediaPlayer object, get button
- state from the button itself and get movie state from HTMLMediaElement.
-
- * rendering/RenderThemeMac.mm:
- (WebCore::RenderThemeMac::paintMediaMuteButton): Get state from button instead of MediaPlayer.
- (WebCore::RenderThemeMac::paintMediaPlayButton): Ditto.
-
-2009-06-16 Jian Li <jianli@chromium.org>
-
- Reviewed by David Levin.
-
- Bug 26450: Rename values of enum RedirectOriginCheck to make them
- clearer.
- https://bugs.webkit.org/show_bug.cgi?id=26450
-
- * loader/DocumentThreadableLoader.cpp:
- (WebCore::DocumentThreadableLoader::create):
- (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
- (WebCore::DocumentThreadableLoader::willSendRequest):
- * loader/DocumentThreadableLoader.h:
- * loader/ThreadableLoader.cpp:
- (WebCore::ThreadableLoader::create):
- (WebCore::ThreadableLoader::loadResourceSynchronously):
- * loader/ThreadableLoader.h:
- * workers/Worker.cpp:
- (WebCore::Worker::Worker):
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::importScripts):
- * loader/WorkerThreadableLoader.cpp:
- (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
- (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
- (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
- (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
- * loader/WorkerThreadableLoader.h:
- (WebCore::WorkerThreadableLoader::create):
- * workers/WorkerScriptLoader.cpp:
- (WebCore::WorkerScriptLoader::loadSynchronously):
- (WebCore::WorkerScriptLoader::loadAsynchronously):
- * workers/WorkerScriptLoader.h:
- (WebCore::WorkerContext::importScripts):
- * xml/XMLHttpRequest.cpp:
- (WebCore::XMLHttpRequest::loadRequestAsynchronously):
-
-2009-06-16 Tony Chang <tony@chromium.org>
-
- Reviewed by Darin Fisher.
-
- Fix a UMR in WebCore::BitStack by initializing new memory to 0.
- https://bugs.webkit.org/show_bug.cgi?id=26449
- No new tests, covered by purify.
-
- * editing/TextIterator.cpp:
- (WebCore::BitStack::push):
-
-2009-06-16 Brent Fulgham <bfulgham@webkit.org>
-
- Reviewed by Xan Lopez.
-
- Test: fast/multicol/columns-shorthand-parsing.html
-
- Fixes https://bugs.webkit.org/show_bug.cgi?id=26453.
- Null Cairo contextwill crash Windows Cairo build.
-
- * platform/graphics/win/GraphicsContextCairoWin.cpp:
- (WebCore::GraphicsContextPlatformPrivate::syncContext):
- Add a check for null context before attempting to
- retrieve the Cairo surface.
-
-2009-06-16 Peter Kasting <pkasting@google.com>
-
- Reviewed by Xan Lopez.
-
- https://bugs.webkit.org/show_bug.cgi?id=26447
- Fix animated GIF breakage in Cairo/wx ports.
-
- * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
- (WebCore::RGBA32Buffer::copyBitmapData):
- (WebCore::RGBA32Buffer::operator=):
- * platform/image-decoders/wx/ImageDecoderWx.cpp:
- (WebCore::RGBA32Buffer::copyBitmapData):
- (WebCore::RGBA32Buffer::operator=):
-
-2009-06-16 Pierre d'Herbemont <pdherbemont@apple.com>
-
- Reviewed by John Sullivan
-
- <rdar://problem/6937882>
-
- Tweak "time remaining" and "time elapsed" fields in the overlay video controller.
-
- * css/mediaControlsQT.css:
-
-2009-06-16 Jian Li <jianli@chromium.org>
-
- Reviewed by Adam Barth and David Levin.
-
- Bug 26146: Change to use ThreadableLoader to load the worker script
- in order to check URL origin for redirection.
- https://bugs.webkit.org/show_bug.cgi?id=26146
-
- Test: http/tests/workers/worker-redirect.html
-
- * GNUmakefile.am:
- * WebCore.pro:
- * WebCore.vcproj/WebCore.vcproj:
- * WebCore.xcodeproj/project.pbxproj:
- * workers/Worker.cpp:
- (WebCore::Worker::Worker):
- (WebCore::Worker::notifyFinished):
- * workers/Worker.h:
- * workers/WorkerContext.cpp:
- (WebCore::WorkerContext::importScripts):
- * workers/WorkerImportScriptsClient.cpp: Removed.
- * workers/WorkerImportScriptsClient.h: Removed.
- * workers/WorkerScriptLoader.cpp: Renamed from workers/WorkerImportScriptsClient.cpp.
- This to make it more generic so worker script loading could use it.
- (WebCore::WorkerScriptLoader::loadSynchronously):
- (WebCore::WorkerScriptLoader::loadAsynchronously):
- (WebCore::WorkerScriptLoader::didFinishLoading):
- (WebCore::WorkerScriptLoader::didFail):
- (WebCore::WorkerScriptLoader::didFailRedirectCheck):
- (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation):
- (WebCore::WorkerScriptLoader::notifyFinished):
- * workers/WorkerScriptLoader.h: Renamed from workers/WorkerImportScriptsClient.h.
- This to make it more generic so worker script loading could use it.
- * workers/WorkerScriptLoaderClient.h: Added.
-
-2009-06-16 Brent Fulgham <bfulgham@gmail.com>
-
- Reviewed by Darin Adler.
-
- Use consistent GUID comparison functions.
- https://bugs.webkit.org/show_bug.cgi?id=26427
-
- * platform/win/WCDataObject.cpp:
- (WebCore::WCDataObject::QueryInterface):
-
-2009-06-16 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- Fix compiler warning.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (webkit_accessible_class_init):
-
-2009-08-07 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
-
- Reviewed by Eric Seidel.
-
- https://bugs.webkit.org/show_bug.cgi?id=27424
-
- * WebKit/gtk/gdom/ConvertToGCharPrivate.h: Added.
- (copyAsGChar): added to help GObject bindings convert various types to glib's gchar*
-
-2009-06-16 Xan Lopez <xlopez@igalia.com>
-
- Reviewed by Gustavo Noronha.
-
- Remove dummy AtkStreamableContent implementation.
-
- It's completely empty, we'll add it back (and conditionally
- instead of unconditionally) when it does something.
-
- * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
- (GetAtkInterfaceTypeFromWAIType):
- (getInterfaceMaskFromObject):
-== Rolled over to ChangeLog-2009-06-16 ==
+== Rolled over to ChangeLog-2010-01-29 ==
diff --git a/WebCore/ChangeLog-2010-01-29 b/WebCore/ChangeLog-2010-01-29
new file mode 100644
index 0000000..cce1125
--- /dev/null
+++ b/WebCore/ChangeLog-2010-01-29
@@ -0,0 +1,98486 @@
+2010-01-29 Mark Rowe <mrowe@apple.com>
+
+ Fix the Mac build.
+
+ Disable ENABLE_INDEXED_DATABASE since it is "completely non-functional".
+
+ As the comment in FeatureDefines.xcconfig notes, the list of feature defines
+ needs to be kept in sync across the various files. The default values also
+ need to be kept in sync between these files and build-webkit.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-01-29 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Timeout for client-based Geolocation shouldn't start until user gives consent
+ https://bugs.webkit.org/show_bug.cgi?id=34352
+
+ * page/Geolocation.cpp:
+ (WebCore::Geolocation::startRequest): Don't start timer if we're blocked on user consent.
+ (WebCore::Geolocation::setIsAllowed): Start timer after user gives consent.
+
+2010-01-29 Jakob Petsovits <jpetsovits@rim.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ [OpenVG] Implement more graphics primitives
+ https://bugs.webkit.org/show_bug.cgi?id=34339
+
+ Adds lines, arcs, ellipses, polygons and rounded
+ rectangles to PainterOpenVG and GraphicsContext.
+
+ Rounded rects support by Eli Fidler <efidler@rim.com>.
+
+ * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
+ (WebCore::GraphicsContext::drawLine):
+ (WebCore::GraphicsContext::drawEllipse):
+ (WebCore::GraphicsContext::strokeArc):
+ (WebCore::GraphicsContext::drawConvexPolygon):
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::fillRoundedRect):
+ (WebCore::GraphicsContext::drawFocusRing):
+ (WebCore::GraphicsContext::drawLineForText):
+ (WebCore::GraphicsContext::clearRect):
+ (WebCore::GraphicsContext::strokeRect):
+ * platform/graphics/openvg/PainterOpenVG.cpp:
+ (WebCore::PainterOpenVG::drawRect):
+ (WebCore::PainterOpenVG::drawRoundedRect):
+ (WebCore::PainterOpenVG::drawLine):
+ (WebCore::PainterOpenVG::drawArc):
+ (WebCore::PainterOpenVG::drawEllipse):
+ (WebCore::PainterOpenVG::drawPolygon):
+ * platform/graphics/openvg/PainterOpenVG.h:
+
+2010-01-29 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ A first step towards the Indexed Database API
+ https://bugs.webkit.org/show_bug.cgi?id=34342
+
+ Flesh out the first part of Indexed Database API.
+ Currently only compiles with v8 + chromium for now.
+ Completely non-functional, but it seems best to do
+ this in chunks.
+
+ No tests because nothing works yet.
+
+ * Configurations/FeatureDefines.xcconfig:
+ * WebCore.gypi:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/RuntimeEnabledFeatures.cpp:
+ * bindings/v8/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::setIndexedDatabaseEnabled):
+ (WebCore::RuntimeEnabledFeatures::indexedDatabaseEnabled):
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8DOMWindow::IndexedDBEnabled):
+ * bindings/v8/custom/V8IDBRequestCustom.cpp: Added.
+ (WebCore::V8IDBRequest::resultAccessorGetter):
+ * bindings/v8/custom/V8IndexedDatabaseRequestCustom.cpp: Added.
+ (WebCore::V8IndexedDatabaseRequest::openCallback):
+ * dom/EventNames.h:
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::indexedDB):
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl:
+ * storage/IDBDatabaseError.h: Added.
+ (WebCore::IDBDatabaseError::create):
+ (WebCore::IDBDatabaseError::~IDBDatabaseError):
+ (WebCore::IDBDatabaseError::code):
+ (WebCore::IDBDatabaseError::setCode):
+ (WebCore::IDBDatabaseError::message):
+ (WebCore::IDBDatabaseError::setMessage):
+ (WebCore::IDBDatabaseError::IDBDatabaseError):
+ * storage/IDBDatabaseError.idl: Added.
+ * storage/IDBDatabaseException.h: Added.
+ (WebCore::IDBDatabaseException::create):
+ (WebCore::IDBDatabaseException::~IDBDatabaseException):
+ (WebCore::IDBDatabaseException::code):
+ (WebCore::IDBDatabaseException::setCode):
+ (WebCore::IDBDatabaseException::message):
+ (WebCore::IDBDatabaseException::setMessage):
+ (WebCore::IDBDatabaseException::IDBDatabaseException):
+ * storage/IDBDatabaseException.idl: Added.
+ * storage/IDBRequest.cpp: Added.
+ (WebCore::IDBRequest::IDBRequest):
+ (WebCore::IDBRequest::~IDBRequest):
+ (WebCore::IDBRequest::abort):
+ (WebCore::IDBRequest::eventTargetData):
+ (WebCore::IDBRequest::ensureEventTargetData):
+ * storage/IDBRequest.h: Added.
+ (WebCore::IDBRequest::create):
+ (WebCore::IDBRequest::readyState):
+ (WebCore::IDBRequest::error):
+ (WebCore::IDBRequest::result):
+ (WebCore::IDBRequest::scriptExecutionContext):
+ (WebCore::IDBRequest::toIDBRequest):
+ (WebCore::IDBRequest::refEventTarget):
+ (WebCore::IDBRequest::derefEventTarget):
+ * storage/IDBRequest.idl: Added.
+ * storage/IndexedDatabaseRequest.cpp: Added.
+ (WebCore::IndexedDatabaseRequest::IndexedDatabaseRequest):
+ (WebCore::IndexedDatabaseRequest::~IndexedDatabaseRequest):
+ (WebCore::IndexedDatabaseRequest::open):
+ * storage/IndexedDatabaseRequest.h: Added.
+ (WebCore::IndexedDatabaseRequest::create):
+ (WebCore::IndexedDatabaseRequest::request):
+ * storage/IndexedDatabaseRequest.idl: Added.
+
+2010-01-29 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Drag and Drop: Windows uses "stop" sign as cursor when dragging
+ https://bugs.webkit.org/show_bug.cgi?id=34305
+ <rdar://problem/7589672>
+
+ Add a FIXME for the code that needs to be changed to support full
+ custom cursors.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleDrag):
+
+2010-01-29 Victor Wang <victorw@chromium.org>
+
+ Reviewed by darin@apple.com.
+
+ Fix the issue that both main frome and iframe are
+ focused if window.onblur calls window.focus.
+ https://bugs.webkit.org/show_bug.cgi?id=31692
+
+ The problem is caused by the focused frame in FocusController
+ is messed up if window.onblur calls window.focus:
+ When user clicks iframe to switch focus from main frame to iframe,
+ FocusController::setFocusedFrame fires onblur event, which calls
+ window.focus and then calls setFocusedFrame again to switch back.
+ This messes up the old focused frame and new focused frame and
+ leaves the FocusController confused. As a result, controlls
+ in both main frame and iframe look like get focused.
+
+ To fix it, add a flag to FocusController and do no switch the focused
+ frame when FocusController is in the middle of changing the focused frame.
+
+ Test: fast/events/change-frame-focus.html
+
+ * page/FocusController.cpp:
+ (WebCore::FocusController::FocusController):
+ (WebCore::FocusController::setFocusedFrame):
+ * page/FocusController.h:
+ (WebCore::FocusController::focusedFrame):
+ (WebCore::FocusController::isActive):
+ (WebCore::FocusController::isFocused):
+
+2010-01-29 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7441982> REGRESSION (TOT): Adobe CS4: Installer alerts are displayed as
+ blank windows
+
+ We probably shouldn't be deferring loads below modal dialogs and alerts, because that's not
+ what being modal means. But making such a change for general Web content would require fixes
+ in other parts of code, which I'm not ready to implement right now, so making it application
+ specific.
+
+ * page/Page.cpp: (WebCore::Page::setDefersLoading): Do nothing if load deferring is not
+ enabled in page settings.
+
+ * WebCore.base.exp:
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setLoadDeferringEnabled):
+ * page/Settings.h: (WebCore::Settings::loadDeferringEnabled):
+ Add the ability for client to disable page deferring (still enabled by default).
+
+ * platform/mac/RuntimeApplicationChecks.h:
+ * platform/mac/RuntimeApplicationChecks.mm: (WebCore::applicationIsAdobeInstaller):
+ Added a bundle ID test for Adobe installer.
+
+2010-01-29 Steve Falkenburg <sfalken@apple.com>
+
+ Build fix.
+
+ * page/Geolocation.cpp:
+ (WebCore::Geolocation::startUpdating):
+
+2010-01-29 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Client-based Geolocation starts updating before getting consent from the user
+ https://bugs.webkit.org/show_bug.cgi?id=34343
+
+ * page/Geolocation.cpp:
+ (WebCore::Geolocation::startRequest): Pass notifier instead of options to startUpdating.
+ (WebCore::Geolocation::setIsAllowed): Add the observer or notify of error for deferred startUpdating.
+ (WebCore::Geolocation::startUpdating): Pass notifier instead of options, since we may need to call it if we fail to get user consent.
+ Defer adding the observer if we don't yet have user consent, since this could kick off
+ server-based wifi Geolocation requests.
+ * page/Geolocation.h:
+
+2010-01-28 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: Crash when posting a notification for a detached object
+
+ https://bugs.webkit.org/show_bug.cgi?id=34309
+ <rdar://problem/7409759>
+
+ Reviewed by Darin Adler.
+
+ Test: platform/win/accessibility/detached-object-notification-crash.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (AccessibilityRenderObject::document):
+ Null check m_renderer. This is the bug fix; the other changes in the
+ patch are for the test.
+
+ * accessibility/win/AXObjectCacheWin.cpp:
+ (WebCore::AXObjectCache::postPlatformNotification):
+ Map AXValueChanged to EVENT_OBJECT_VALUECHANGED, so we'll post a
+ notification when AXValueChanged is posted. Receiving an event of this
+ type tells us that the test passed.
+
+2010-01-29 Darin Fisher <darin@chromium.org>
+
+ Okayed by Oliver Hunt.
+
+ Rollout r53949, r53951 and r54013 due to a Chromium regression that it
+ causes. Somehow this code change is triggering an endless repaint loop.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33808
+
+ * platform/graphics/GraphicsContext.cpp:
+ (WebCore::GraphicsContext::drawTiledImage):
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/transforms/TransformationMatrix.h:
+ (WebCore::TransformationMatrix::isIdentityOrTranslation):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
+ (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+ * rendering/RenderBoxModelObject.h:
+
+2010-01-29 Tony Chang <tony@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Add gdb helper methods for Ranges like we have for VisibleSelections.
+ https://bugs.webkit.org/show_bug.cgi?id=34308
+
+ No new tests, these are only for debugging.
+
+ * dom/Position.cpp:
+ (WebCore::Position::showTreeForThis):
+ * dom/Range.cpp:
+ (showTree):
+ * dom/Range.h:
+
+2010-01-29 Drew Wilson <atwilson@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ V8 implementation of MessageEvent.initMessageEvent() does not set source correctly.
+ https://bugs.webkit.org/show_bug.cgi?id=34292
+
+ Test: fast/events/init-events.html will pass in Chrome now.
+
+ * bindings/v8/custom/V8MessageEventCustom.cpp:
+ (WebCore::V8MessageEvent::initMessageEventCallback):
+ Now properly extracts the reference to the DOMWindow object from the passed-in window parameter.
+
+2010-01-29 Ben Murdoch <benm@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Android] Android needs functionality in the ChromeClient to be informed when touch events are and are not needed by the webpage.
+ https://bugs.webkit.org/show_bug.cgi?id=34215
+
+ Add a function on the ChromeClient that WebCore can use to inform the platform when it needs touch events. This way the platform can optimise by not forwarding the events if they are not required.
+
+ No new tests as the only implementation is specific to Android.
+
+ * dom/Document.cpp:
+ (WebCore::Document::detach): Check if this is the top level document and if so, stop forwarding touch events.
+ (WebCore::Document::addListenerTypeIfNeeded): Inform the ChromeClient it should start forwarding touch events and guard touch event code properly.
+ * history/CachedFrame.cpp:
+ (WebCore::CachedFrameBase::restore): If the document uses touch events, inform the ChromeClient to start forwarding them.
+ (WebCore::CachedFrame::CachedFrame): If the document uses touch events, inform the ChromeClient to stop forwarding them, as the document is being put into the page cache.
+ * loader/EmptyClients.h:
+ (WebCore::EmptyChromeClient::needTouchEvents): Add an empty implementation.
+ * page/ChromeClient.h: Add the needTouchEvents() function.
+
+2010-01-29 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Fix toolbar gradient to match the window's titlebar on Snow Leopard
+ https://bugs.webkit.org/show_bug.cgi?id=34320
+
+ * inspector/front-end/inspector.css:
+
+2010-01-29 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Fix MacOS X version detection
+
+ MacOS X version can have 2 or 3 segments.
+ https://bugs.webkit.org/show_bug.cgi?id=34322
+
+ * inspector/front-end/inspector.js:
+ (WebInspector._detectPlatform):
+
+2010-01-29 Jakob Petsovits <jpetsovits@rim.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ [OpenVG] Implement a basic GraphicsContext on top of a new PainterOpenVG class
+ https://bugs.webkit.org/show_bug.cgi?id=33405
+
+ PainterOpenVG provides painter state management that works
+ on a single (EGL) context, and apart from painter state
+ implements a single drawing operation (for now), drawRect().
+
+ It is a generic painter class that cooperates with
+ SurfaceOpenVG to enable robust surface/context switching
+ (given that EGL doesn't notify us if somebody switches
+ the surface/context behind our backs), and provides
+ painting operations close to OpenVG's way of working
+ that GraphicsContext, Path, Image, Font and other WebKit
+ platform classes can use to draw on.
+
+ Initial code for state management and OpenVG scissoring by
+ Eli Fidler <efidler@rim.com>. VGRect/VGMatrix and the bulk
+ of the transformations code by Adam Treat <atreat@rim.com>.
+ Preliminary drawFocusRing() implementation by Yong Li <yoli@rim.com>.
+
+ * platform/graphics/FloatRect.h:
+ * platform/graphics/GraphicsContext.cpp:
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/openvg/GraphicsContextOpenVG.cpp: Added.
+ (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
+ (WebCore::GraphicsContext::GraphicsContext):
+ (WebCore::GraphicsContext::~GraphicsContext):
+ (WebCore::GraphicsContext::platformContext):
+ (WebCore::GraphicsContext::getCTM):
+ (WebCore::GraphicsContext::savePlatformState):
+ (WebCore::GraphicsContext::restorePlatformState):
+ (WebCore::GraphicsContext::drawRect):
+ (WebCore::GraphicsContext::drawLine):
+ (WebCore::GraphicsContext::drawEllipse):
+ (WebCore::GraphicsContext::strokeArc):
+ (WebCore::GraphicsContext::drawConvexPolygon):
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::strokePath):
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::fillRoundedRect):
+ (WebCore::GraphicsContext::beginPath):
+ (WebCore::GraphicsContext::addPath):
+ (WebCore::GraphicsContext::clip):
+ (WebCore::GraphicsContext::clipPath):
+ (WebCore::GraphicsContext::drawFocusRing):
+ (WebCore::GraphicsContext::drawLineForText):
+ (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
+ (WebCore::GraphicsContext::roundToDevicePixels):
+ (WebCore::GraphicsContext::setPlatformShadow):
+ (WebCore::GraphicsContext::clearPlatformShadow):
+ (WebCore::GraphicsContext::beginTransparencyLayer):
+ (WebCore::GraphicsContext::endTransparencyLayer):
+ (WebCore::GraphicsContext::clearRect):
+ (WebCore::GraphicsContext::strokeRect):
+ (WebCore::GraphicsContext::setLineCap):
+ (WebCore::GraphicsContext::setLineDash):
+ (WebCore::GraphicsContext::setLineJoin):
+ (WebCore::GraphicsContext::setMiterLimit):
+ (WebCore::GraphicsContext::setAlpha):
+ (WebCore::GraphicsContext::setCompositeOperation):
+ (WebCore::GraphicsContext::canvasClip):
+ (WebCore::GraphicsContext::clipOut):
+ (WebCore::GraphicsContext::scale):
+ (WebCore::GraphicsContext::rotate):
+ (WebCore::GraphicsContext::translate):
+ (WebCore::GraphicsContext::origin):
+ (WebCore::GraphicsContext::clipOutEllipseInRect):
+ (WebCore::GraphicsContext::clipToImageBuffer):
+ (WebCore::GraphicsContext::addInnerRoundedRectClip):
+ (WebCore::GraphicsContext::concatCTM):
+ (WebCore::GraphicsContext::setURLForRect):
+ (WebCore::GraphicsContext::setPlatformStrokeColor):
+ (WebCore::GraphicsContext::setPlatformStrokeStyle):
+ (WebCore::GraphicsContext::setPlatformStrokeThickness):
+ (WebCore::GraphicsContext::setPlatformFillColor):
+ (WebCore::GraphicsContext::setPlatformShouldAntialias):
+ (WebCore::GraphicsContext::setImageInterpolationQuality):
+ (WebCore::GraphicsContext::imageInterpolationQuality):
+ * platform/graphics/openvg/PainterOpenVG.cpp: Added.
+ (WebCore::isNonRotatedAffineTransformation):
+ (WebCore::toVGCapStyle):
+ (WebCore::toVGJoinStyle):
+ (WebCore::toVGFillRule):
+ (WebCore::colorToVGColor):
+ (WebCore::setVGSolidColor):
+ (WebCore::PlatformPainterState::PlatformPainterState):
+ (WebCore::PlatformPainterState::copyPaintState):
+ (WebCore::PlatformPainterState::applyState):
+ (WebCore::PlatformPainterState::applyBlending):
+ (WebCore::PlatformPainterState::applyTransformationMatrix):
+ (WebCore::PlatformPainterState::applyScissorRect):
+ (WebCore::PlatformPainterState::applyStrokeStyle):
+ (WebCore::PlatformPainterState::strokeDisabled):
+ (WebCore::PlatformPainterState::fillDisabled):
+ (WebCore::PainterOpenVG::PainterOpenVG):
+ (WebCore::PainterOpenVG::~PainterOpenVG):
+ (WebCore::PainterOpenVG::begin):
+ (WebCore::PainterOpenVG::end):
+ (WebCore::PainterOpenVG::destroyPainterStates):
+ (WebCore::PainterOpenVG::applyState):
+ (WebCore::PainterOpenVG::blitToSurface):
+ (WebCore::PainterOpenVG::transformationMatrix):
+ (WebCore::PainterOpenVG::concatTransformationMatrix):
+ (WebCore::PainterOpenVG::setTransformationMatrix):
+ (WebCore::PainterOpenVG::compositeOperation):
+ (WebCore::PainterOpenVG::setCompositeOperation):
+ (WebCore::PainterOpenVG::opacity):
+ (WebCore::PainterOpenVG::setOpacity):
+ (WebCore::PainterOpenVG::strokeThickness):
+ (WebCore::PainterOpenVG::setStrokeThickness):
+ (WebCore::PainterOpenVG::strokeStyle):
+ (WebCore::PainterOpenVG::setStrokeStyle):
+ (WebCore::PainterOpenVG::setLineDash):
+ (WebCore::PainterOpenVG::setLineCap):
+ (WebCore::PainterOpenVG::setLineJoin):
+ (WebCore::PainterOpenVG::setMiterLimit):
+ (WebCore::PainterOpenVG::strokeColor):
+ (WebCore::PainterOpenVG::setStrokeColor):
+ (WebCore::PainterOpenVG::fillColor):
+ (WebCore::PainterOpenVG::setFillColor):
+ (WebCore::PainterOpenVG::antialiasingEnabled):
+ (WebCore::PainterOpenVG::setAntialiasingEnabled):
+ (WebCore::PainterOpenVG::scale):
+ (WebCore::PainterOpenVG::rotate):
+ (WebCore::PainterOpenVG::translate):
+ (WebCore::PainterOpenVG::intersectScissorRect):
+ (WebCore::PainterOpenVG::intersectClipRect):
+ (WebCore::PainterOpenVG::drawRect):
+ (WebCore::PainterOpenVG::save):
+ (WebCore::PainterOpenVG::restore):
+ * platform/graphics/openvg/PainterOpenVG.h: Added.
+ (WebCore::PainterOpenVG::):
+ (WebCore::PainterOpenVG::surface):
+ * platform/graphics/openvg/SurfaceOpenVG.cpp:
+ (WebCore::SurfaceOpenVG::SurfaceOpenVG):
+ (WebCore::SurfaceOpenVG::~SurfaceOpenVG):
+ (WebCore::SurfaceOpenVG::makeCurrent):
+ (WebCore::SurfaceOpenVG::makeCompatibleCurrent):
+ (WebCore::SurfaceOpenVG::setActivePainter):
+ (WebCore::SurfaceOpenVG::activePainter):
+ * platform/graphics/openvg/SurfaceOpenVG.h:
+ (WebCore::SurfaceOpenVG::):
+ * platform/graphics/openvg/VGUtils.cpp: Added.
+ (WebCore::VGMatrix::VGMatrix):
+ (WebCore::VGMatrix::operator TransformationMatrix):
+ (WebCore::TransformationMatrix::operator VGMatrix):
+ (WebCore::VGRect::VGRect):
+ (WebCore::VGRect::operator FloatRect):
+ (WebCore::FloatRect::operator VGRect):
+ * platform/graphics/openvg/VGUtils.h:
+ (WebCore::VGMatrix::toVGfloat):
+ (WebCore::VGRect::toVGfloat):
+ * platform/graphics/transforms/TransformationMatrix.h:
+
+2010-01-29 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [Gtk] Vimeo HTML5 player doesn't work
+ https://bugs.webkit.org/show_bug.cgi?id=34327
+
+ Send Referer when requesting media over HTTP.
+
+ Test: http/tests/media/video-referer.html
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mediaPlayerPrivateSourceChangedCallback):
+
+2010-01-29 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Speed up the WebCore::String -> QString conversion
+
+ Use QString(const QChar *, int len) constructor instead of QString::fromUtf16 to
+ avoid BOM checks and byteswapping.
+
+ * bridge/qt/qt_class.cpp:
+ (JSC::Bindings::QtClass::fieldNamed):
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::convertValueToQVariant):
+
+2010-01-29 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Source view displays text using wrong fonts
+ https://bugs.webkit.org/show_bug.cgi?id=34269
+
+ * inspector/front-end/TextEditor.js:
+ (WebInspector.TextEditor):
+ (WebInspector.TextEditor.prototype._initFont):
+ * inspector/front-end/inspector.js:
+
+2010-01-29 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [Gtk] Apple trailers don't play anymore
+ https://bugs.webkit.org/show_bug.cgi?id=34316
+
+ Fake QuickTime when accessing movie trailers.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mediaPlayerPrivateSourceChangedCallback):
+
+2010-01-29 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: migrate to tokenizer-based highlighting in the Elements panel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34273
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/CSSSourceSyntaxHighlighter.js: Removed.
+ * inspector/front-end/DOMSyntaxHighlighter.js: Added.
+ (WebInspector.DOMSyntaxHighlighter):
+ (WebInspector.DOMSyntaxHighlighter.prototype.createSpan):
+ (WebInspector.DOMSyntaxHighlighter.prototype.syntaxHighlightNode):
+ * inspector/front-end/ElementsTreeOutline.js:
+ * inspector/front-end/JavaScriptSourceSyntaxHighlighter.js: Removed.
+ * inspector/front-end/SourceCSSTokenizer.js:
+ (WebInspector.SourceCSSTokenizer):
+ (WebInspector.SourceCSSTokenizer.prototype.nextToken):
+ * inspector/front-end/SourceCSSTokenizer.re2js:
+ * inspector/front-end/SourceHTMLTokenizer.js:
+ (WebInspector.SourceHTMLTokenizer):
+ (WebInspector.SourceHTMLTokenizer.prototype.nextToken):
+ * inspector/front-end/SourceHTMLTokenizer.re2js:
+ * inspector/front-end/SourceJavaScriptTokenizer.js:
+ (WebInspector.SourceJavaScriptTokenizer):
+ (WebInspector.SourceJavaScriptTokenizer.prototype.nextToken):
+ * inspector/front-end/SourceJavaScriptTokenizer.re2js:
+ * inspector/front-end/SourceSyntaxHighlighter.js: Removed.
+ * inspector/front-end/SourceTokenizer.js: Added.
+ (WebInspector.SourceTokenizer):
+ (WebInspector.SourceTokenizer.prototype.set line):
+ (WebInspector.SourceTokenizer.prototype.set condition):
+ (WebInspector.SourceTokenizer.prototype.get condition):
+ (WebInspector.SourceTokenizer.prototype.hasCondition):
+ (WebInspector.SourceTokenizer.prototype.getLexCondition):
+ (WebInspector.SourceTokenizer.prototype.setLexCondition):
+ (WebInspector.SourceTokenizer.prototype._charAt):
+ (WebInspector.SourceTokenizer.Registry):
+ (WebInspector.SourceTokenizer.Registry.getInstance):
+ (WebInspector.SourceTokenizer.Registry.prototype.getTokenizer):
+ * inspector/front-end/TextEditorHighlighter.js:
+ (WebInspector.TextEditorHighlighter):
+ (WebInspector.TextEditorHighlighter.prototype.set mimeType):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+
+2010-01-29 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: No need to render background sources
+ when performing search.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34263
+
+ * inspector/front-end/ScriptView.js:
+ (WebInspector.ScriptView):
+ (WebInspector.ScriptView.prototype.show):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame):
+ (WebInspector.SourceFrame.prototype.set visible):
+ (WebInspector.SourceFrame.prototype.set executionLine):
+ (WebInspector.SourceFrame.prototype.revealLine):
+ (WebInspector.SourceFrame.prototype.clearMessages):
+ (WebInspector.SourceFrame.prototype.sizeToFitContentHeight):
+ (WebInspector.SourceFrame.prototype.setContent):
+ (WebInspector.SourceFrame.prototype._createEditorIfNeeded):
+ (WebInspector.SourceFrame.prototype.setSelection):
+ (WebInspector.SourceFrame.prototype.clearSelection):
+ (WebInspector.SourceFrame.prototype._contextMenu.addConditionalBreakpoint):
+ (WebInspector.SourceFrame.prototype._contextMenu):
+ (WebInspector.SourceFrame.prototype._toggleBreakpoint):
+ (WebInspector.SourceFrame.prototype.resize):
+ (WebInspector.BreakpointLineNumberDecorator):
+ * inspector/front-end/SourceView.js:
+ (WebInspector.SourceView):
+ (WebInspector.SourceView.prototype.show):
+ (WebInspector.SourceView.prototype.hide):
+ (WebInspector.SourceView.prototype.resize):
+ * inspector/front-end/TextEditor.js:
+ (WebInspector.TextEditor):
+ * inspector/front-end/TextEditorHighlighter.js:
+ (WebInspector.TextEditorHighlighter):
+ * inspector/front-end/TextEditorModel.js:
+ (WebInspector.TextEditorModel):
+ (WebInspector.TextEditorModel.prototype.set changeListener):
+ (WebInspector.TextEditorModel.prototype.setText):
+
+2010-01-29 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Remove ScriptState::frame which is only used for reporting exceptions
+ in some cases in a way that diverges from the regular exception reporting in
+ v8 bindings.
+
+ Cache ScriptState directly on v8::Context instead of providing
+ implementations specific for isolated worlds and ScriptController.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34266
+
+ * bindings/js/ScriptController.cpp:
+ * bindings/js/ScriptController.h:
+ * bindings/js/ScriptState.cpp:
+ (WebCore::mainWorldScriptState):
+ * bindings/js/ScriptState.h:
+ * bindings/v8/ScriptCallStack.cpp:
+ (WebCore::ScriptCallStack::ScriptCallStack):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate):
+ (WebCore::ScriptController::clearWindowShell):
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/ScriptScope.cpp:
+ (WebCore::ScriptScope::ScriptScope):
+ (WebCore::ScriptScope::success):
+ * bindings/v8/ScriptScope.h:
+ * bindings/v8/ScriptState.cpp:
+ (WebCore::ScriptState::ScriptState):
+ (WebCore::ScriptState::forContext):
+ (WebCore::ScriptState::current):
+ (WebCore::ScriptState::weakReferenceCallback):
+ (WebCore::mainWorldScriptState):
+ (WebCore::scriptStateFromPage):
+ * bindings/v8/ScriptState.h:
+ (WebCore::ScriptState::ScriptState):
+ (WebCore::EmptyScriptState::EmptyScriptState):
+ (WebCore::EmptyScriptState::~EmptyScriptState):
+ * bindings/v8/V8HiddenPropertyName.h:
+ * bindings/v8/V8IsolatedContext.cpp:
+ * bindings/v8/V8IsolatedContext.h:
+ * bindings/v8/V8Utilities.cpp:
+ (WebCore::getScriptExecutionContext):
+ (WebCore::reportException):
+ * bindings/v8/custom/V8NodeIteratorCustom.cpp:
+ (WebCore::V8NodeIterator::nextNodeCallback):
+ (WebCore::V8NodeIterator::previousNodeCallback):
+ * bindings/v8/custom/V8TreeWalkerCustom.cpp:
+ (WebCore::V8TreeWalker::parentNodeCallback):
+ (WebCore::V8TreeWalker::firstChildCallback):
+ (WebCore::V8TreeWalker::lastChildCallback):
+ (WebCore::V8TreeWalker::nextNodeCallback):
+ (WebCore::V8TreeWalker::previousNodeCallback):
+ (WebCore::V8TreeWalker::nextSiblingCallback):
+ (WebCore::V8TreeWalker::previousSiblingCallback):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::injectedScriptForNodeId):
+
+2010-01-29 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add FrameLoaderClient::allowImages method to allow the client to
+ overrule image loading policy on a per frame basis.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34225
+
+ For completeness, this patch also adds Settings::areImagesEnabled.
+ This is different from loadsImagesAutomatically as is explained in
+ Settings.h.
+
+ * loader/DocLoader.cpp:
+ (WebCore::DocLoader::requestImage):
+ * loader/FrameLoaderClient.h:
+ (WebCore::FrameLoaderClient::allowImages):
+ * loader/ImageDocument.cpp:
+ (WebCore::ImageTokenizer::writeRawData):
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setImagesEnabled):
+ * page/Settings.h:
+ (WebCore::Settings::areImagesEnabled):
+
+2010-01-28 Nicholas Young <nicholas.young@nokia.com>
+
+ Reviewed by Eric Carlson.
+
+ Prefer provided video element width/height properties to hard coded
+ defaults for intrinsic size when natural video size is unavailable.
+ https://bugs.webkit.org/show_bug.cgi?id=34302
+
+ No new tests needed.
+
+ * rendering/RenderVideo.cpp: Attempt to use width/height properties
+ (WebCore::RenderVideo::RenderVideo):
+ * rendering/RenderVideo.h: More appropriate constructor signature
+
+2010-01-28 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ MessageEvent.data should not be repeated deserialised
+ https://bugs.webkit.org/show_bug.cgi?id=34311
+
+ Cache the result of deserialising the event data
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * dom/MessageEvent.idl:
+
+2010-01-28 Hayato Ito <hayato@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Change CSS 'page-break-inside' property from inherited one to non-inherited one because CSS specification defines so.
+
+ Note: Currently, the 'page-break-inside' property is used only when parsing the CSS. That property is not used when rendering.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34195
+
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::NonInheritedFlags::operator==):
+ (WebCore::InheritedFlags::setBitDefaults):
+ (WebCore::InheritedFlags::pageBreakInside):
+ (WebCore::InheritedFlags::setPageBreakInside):
+ * rendering/style/StyleInheritedData.cpp:
+ (WebCore::StyleInheritedData::StyleInheritedData):
+ (WebCore::StyleInheritedData::operator==):
+ * rendering/style/StyleInheritedData.h:
+
+2010-01-28 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ ApplicationCache events should be deferred until after Document onload has fired.
+ https://bugs.webkit.org/show_bug.cgi?id=29690
+
+ Test: http/tests/appcache/deferred-events.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::handledOnloadEvents): Tells the ApplicationCacheHost to stop deferring events.
+ * loader/appcache/ApplicationCacheHost.cpp:
+ (WebCore::ApplicationCacheHost::ApplicationCacheHost): Initialize m_isDeferringEvents to true.
+ (WebCore::ApplicationCacheHost::notifyDOMApplicationCache): Depending, defer or raise the event.
+ (WebCore::ApplicationCacheHost::stopDeferringEvents): Raise any deferred events and reset the flag.
+ * loader/appcache/ApplicationCacheHost.h: Declare new data members and method.
+
+2010-01-28 Kavita Kanetkar <kkanetkar@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Generate header declaration for custom constructor callbacks
+ https://bugs.webkit.org/show_bug.cgi?id=33680
+
+ Added handling of 'CanBeConstructed' and 'OmitConstructor' and a new extended attribute
+ CustomConstructor'.
+
+ Deleted implementation .cpp files for corresponding 'CanBeConstructed'
+ extended attributes. These are now generated via CodeGeneratorV8.pm
+ Treating 'OmitConstructor' and 'CustomConstructor' to be the same in
+ CodeGeneratorJS.pm
+ Cleaned idls that had 'CustomConstructor' and 'OmitConstructor' together, and
+ same with CustomConstructor and CanBeConstructed.
+
+ * Android.v8bindings.mk:
+ * WebCore.gypi: Removed deps for classes being generated.
+ * bindings/scripts/CodeGeneratorJS.pm: OmitConstructor and CustomConstructor have the same behavior in generator.
+ * bindings/scripts/CodeGeneratorV8.pm: Generating the callbacks for constructors.
+ * bindings/v8/V8DOMWrapper.cpp: Removed manual calls to SetCallHandler() for constructor callbacks.
+ (WebCore::V8DOMWrapper::getTemplate):
+ * bindings/v8/custom/V8CustomBinding.h: Removed manual declarations of constructor callbacks.
+ * bindings/v8/custom/V8DOMParserConstructor.cpp:
+ * bindings/v8/custom/V8EventSourceConstructor.cpp:
+ (WebCore::V8EventSource::constructorCallback):
+ * bindings/v8/custom/V8MessageChannelConstructor.cpp:
+ (WebCore::V8MessageChannel::constructorCallback):
+ * bindings/v8/custom/V8SharedWorkerCustom.cpp:
+ (WebCore::V8SharedWorker::constructorCallback):
+ * bindings/v8/custom/V8WebGLArrayBufferCustom.cpp:
+ (WebCore::V8WebGLArrayBuffer::constructorCallback):
+ * bindings/v8/custom/V8WebGLByteArrayCustom.cpp:
+ (WebCore::V8WebGLByteArray::constructorCallback):
+ * bindings/v8/custom/V8WebGLFloatArrayCustom.cpp:
+ (WebCore::V8WebGLFloatArray::constructorCallback):
+ * bindings/v8/custom/V8WebGLIntArrayCustom.cpp:
+ (WebCore::V8WebGLIntArray::constructorCallback):
+ * bindings/v8/custom/V8WebGLShortArrayCustom.cpp:
+ (WebCore::V8WebGLShortArray::constructorCallback):
+ * bindings/v8/custom/V8WebGLUnsignedByteArrayCustom.cpp:
+ (WebCore::V8WebGLUnsignedByteArray::constructorCallback):
+ * bindings/v8/custom/V8WebGLUnsignedIntArrayCustom.cpp:
+ (WebCore::V8WebGLUnsignedIntArray::constructorCallback):
+ * bindings/v8/custom/V8WebGLUnsignedShortArrayCustom.cpp:
+ (WebCore::V8WebGLUnsignedShortArray::constructorCallback):
+ * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp:
+ (WebCore::V8WebKitCSSMatrix::constructorCallback):
+ * bindings/v8/custom/V8WebKitPointConstructor.cpp:
+ (WebCore::V8WebKitPoint::constructorCallback):
+ * bindings/v8/custom/V8WebSocketCustom.cpp:
+ (WebCore::V8WebSocket::constructorCallback):
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ (WebCore::V8Worker::constructorCallback):
+ * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
+ (WebCore::V8XMLHttpRequest::constructorCallback):
+ * bindings/v8/custom/V8XMLSerializerConstructor.cpp:
+ * bindings/v8/custom/V8XPathEvaluatorConstructor.cpp: Deleted the file. Implementation now being generated.
+ * bindings/v8/custom/V8XSLTProcessorCustom.cpp: Deleted the file. Implementation now being generated.
+ (WebCore::V8XSLTProcessor::constructorCallback): Deleted the file. Implementation now being generated.
+ * css/WebKitCSSMatrix.idl: Added CustomConstructor attribute.
+ * dom/MessageChannel.idl: Added CustomConstructor attribute.
+ * html/canvas/WebGLArrayBuffer.idl: Added CustomConstructor attribute.
+ * html/canvas/WebGLByteArray.idl: Added CustomConstructor attribute.
+ * html/canvas/WebGLFloatArray.idl: Added CustomConstructor attribute.
+ * html/canvas/WebGLIntArray.idl: Added CustomConstructor attribute.
+ * html/canvas/WebGLShortArray.idl: Added CustomConstructor attribute.
+ * html/canvas/WebGLUnsignedByteArray.idl: Added CustomConstructor attribute.
+ * html/canvas/WebGLUnsignedIntArray.idl: Added CustomConstructor attribute.
+
+2010-01-28 Steve Block <steveblock@google.com>
+
+ Reviewed by David Levin.
+
+ Add stub for AXObjectCache::contentChanged when HAVE(ACCESSIBILITY) is not defined
+ https://bugs.webkit.org/show_bug.cgi?id=34271
+
+ No new tests, build fix only.
+
+ * accessibility/AXObjectCache.cpp: Modified. Added HAVE(ACCESSIBILITY) guards around contentChanged
+ * accessibility/AXObjectCache.h: Modified.
+ (WebCore::AXObjectCache::contentChanged): Added stub
+
+2010-01-28 Steve Block <steveblock@google.com>
+
+ Reviewed by David Levin.
+
+ Use long long rather than int64 in V8Binding.h
+ https://bugs.webkit.org/show_bug.cgi?id=34270
+
+ No new tests, build fix only.
+
+ * bindings/v8/V8Binding.h: Modified.
+ (WebCore::toInt64): Returns long long
+
+2010-01-28 Avi Drissman <avi@chromium.org>
+
+ Reviewed by David Levin.
+
+ Unused variable in ThemeMac (followup to change 49103).
+ https://bugs.webkit.org/show_bug.cgi?id=34274
+
+ Covered by existing tests.
+
+ * platform/mac/ThemeMac.mm:
+ (WebCore::setupButtonCell):
+
+2010-01-28 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Huge plain text pastes are slow
+ <rdar://problem/5195056>
+ https://bugs.webkit.org/show_bug.cgi?id=34237
+
+ No new tests. It is a performance improvement.
+
+ The performance of the plain text paste is now linear.
+ We treat as a special case, a fragment that has been
+ created from plain text. Finding VisiblePositions and
+ applying style is greatly simplified, given the nature of
+ the fragment.
+
+ * editing/ReplaceSelectionCommand.cpp:
+ (WebCore::ReplaceSelectionCommand::doApply):
+ * editing/markup.cpp:
+ (WebCore::isPlainTextMarkup):
+ * editing/markup.h:
+
+2010-01-28 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Initialize DOM Storage's quota's current length parameter when we clone it.
+ https://bugs.webkit.org/show_bug.cgi?id=34294
+
+ * storage/StorageMap.cpp:
+ (WebCore::StorageMap::copy):
+
+2010-01-28 Brent Fulgham <bfulgham@webkit.org>
+
+ Unreviewed build fix after r53411 on WinCairo.
+
+ * platform/image-decoders/gif/GIFImageDecoder.cpp:
+ (WebCore::GIFImageDecoder::frameCount):
+
+2010-01-28 Nayan Kumar K <nayankk@gmail.com>
+
+ Reviewed by Laszlo Gombos.
+
+ Fix for compilation error in WML enabled build introduced because of the changeset 53514.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34254
+
+ * wml/WMLDocument.cpp:
+ (WebCore::WMLDocument::WMLDocument):
+
+2010-01-28 Alex Milowski <alex@milowski.com>
+
+ Reviewed by Eric Seidel.
+
+ Update to CSS to remove unnecessary line-height settings
+
+ * css/mathml.css:
+
+2010-01-28 Steve Block <steveblock@google.com>
+
+ Reviewed by David Levin.
+
+ Add missing includes for HashMap/HashSet
+ https://bugs.webkit.org/show_bug.cgi?id=34276
+
+ No new tests, build fix only.
+
+ * platform/KURL.cpp: Modified. Include HashMap.h
+ * platform/network/CredentialStorage.cpp: Modified. Include HashMap.h and HashSet.h
+ * platform/network/ProtectionSpaceHash.h: Modified. Include HashTraits.h
+
+2010-01-28 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
+ Reviewed by Gustavo Noronha.
+
+ Pass cookies to the GStreamer HTTP source
+ https://bugs.webkit.org/show_bug.cgi?id=34003
+
+ Test: http/tests/media/video-cookie.html
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mediaPlayerPrivateSourceChangedCallback):
+ When using an appropiate GStreamer HTTP source element, pass
+ the cookies for the media URI to it. This fixes playback of
+ the YouTube HTML5 videos.
+
+2010-01-28 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Unreviewed buildfix after r54022.
+
+ * bridge/qt/qt_instance.cpp:
+ (JSC::Bindings::QtRuntimeObjectImp::createStructure):
+ * bridge/qt/qt_pixmapruntime.cpp:
+ (JSC::Bindings::QtPixmapRuntimeObjectImp::createStructure):
+ * bridge/qt/qt_runtime.h:
+ (JSC::Bindings::QtRuntimeMethod::createStructure):
+
+2010-01-28 Adam Roben <aroben@apple.com>
+
+ Fix an assertion beneath SerializedScriptValue::deserialize on 32-bit
+ builds (e.g., on Windows)
+
+ Passing a JSValue to toRef on 32-bit builds can perform an allocation,
+ so we need to make sure we hold a JSLock when that occurs.
+
+ Reviewed by Oliver Hunt.
+
+ * bindings/js/SerializedScriptValue.cpp:
+ (WebCore::SerializedScriptValueData::serialize):
+ (WebCore::SerializedScriptValueData::deserialize):
+ Moved JSLocks from here...
+
+ (WebCore::SerializedScriptValue::create):
+ (WebCore::SerializedScriptValue::deserialize):
+ ...to this higher level, from which toRef can be called.
+
+2010-01-28 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ DOM Objects shouldn't all require custom mark functions
+ https://bugs.webkit.org/show_bug.cgi?id=34291
+
+ Make DOMObjectWithGlobalPointer use an anonymous slot to store the global object
+ reference.
+
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::DOMObjectWithGlobalPointer::globalObject):
+ (WebCore::DOMObjectWithGlobalPointer::scriptExecutionContext):
+ (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
+
+2010-01-28 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Simplify anonymous slot implementation
+ https://bugs.webkit.org/show_bug.cgi?id=34282
+
+ Update the WebCore JS DOM bindings to correctly pass and
+ propagate the anonymous slot count information.
+
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::DOMObjectWithGlobalPointer::createStructure):
+ (WebCore::DOMConstructorObject::createStructure):
+ * bindings/js/JSDOMWindowShell.h:
+ (WebCore::JSDOMWindowShell::createStructure):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bridge/objc/objc_runtime.h:
+ (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
+ * bridge/runtime_array.h:
+ (JSC::RuntimeArray::createStructure):
+ * bridge/runtime_method.h:
+ (JSC::RuntimeMethod::createStructure):
+ * bridge/runtime_object.h:
+ (JSC::RuntimeObjectImp::createStructure):
+
+2010-01-27 Evan Martin <evan@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] hebrew vowel marks incorrectly positioned
+ https://bugs.webkit.org/show_bug.cgi?id=34234
+
+ Fix glyph metrics computation such that the glyph offsets
+ are correct, so we can now make use of them.
+
+ Test: fast/text/international/hebrew-vowels.html
+
+ * platform/graphics/chromium/FontLinux.cpp:
+ (WebCore::TextRunWalker::createGlyphArrays): initialize per-glyph
+ offset table.
+ (WebCore::TextRunWalker::setGlyphXPositions): use per-glyph
+ offsets.
+ * platform/graphics/chromium/HarfbuzzSkia.cpp:
+ (WebCore::getGlyphMetrics): fix metrics computation such that
+ per-glyph offsets are computed correctly.
+
+2010-01-28 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed build fix.
+
+ [Qt] Build fix if websockets support is turned off after r53947.
+
+ * WebCore.pro:
+
+2010-01-28 Dimitri Glazkov <dglazkov@chromium.org>
+
+ No review, rolling out r54012.
+ http://trac.webkit.org/changeset/54012
+ https://bugs.webkit.org/show_bug.cgi?id=34266
+
+ Introduced 33 crashes in V8 traversal/ tests.
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::mainWorldScriptState):
+ * bindings/js/ScriptController.h:
+ * bindings/js/ScriptState.cpp:
+ * bindings/js/ScriptState.h:
+ * bindings/v8/ScriptCallStack.cpp:
+ (WebCore::ScriptCallStack::ScriptCallStack):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::mainWorldScriptState):
+ (WebCore::ScriptController::currentScriptState):
+ (WebCore::ScriptController::clearWindowShell):
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/ScriptScope.cpp:
+ (WebCore::ScriptScope::ScriptScope):
+ (WebCore::ScriptScope::success):
+ * bindings/v8/ScriptScope.h:
+ * bindings/v8/ScriptState.cpp:
+ (WebCore::ScriptState::ScriptState):
+ (WebCore::scriptStateFromPage):
+ * bindings/v8/ScriptState.h:
+ (WebCore::ScriptState::ScriptState):
+ (WebCore::ScriptState::frame):
+ * bindings/v8/V8HiddenPropertyName.h:
+ * bindings/v8/V8IsolatedContext.cpp:
+ (WebCore::V8IsolatedContext::scriptState):
+ * bindings/v8/V8IsolatedContext.h:
+ * bindings/v8/V8Utilities.cpp:
+ (WebCore::getScriptExecutionContext):
+ (WebCore::reportException):
+ * bindings/v8/custom/V8NodeIteratorCustom.cpp:
+ (WebCore::V8NodeIterator::nextNodeCallback):
+ (WebCore::V8NodeIterator::previousNodeCallback):
+ * bindings/v8/custom/V8TreeWalkerCustom.cpp:
+ (WebCore::V8TreeWalker::parentNodeCallback):
+ (WebCore::V8TreeWalker::firstChildCallback):
+ (WebCore::V8TreeWalker::lastChildCallback):
+ (WebCore::V8TreeWalker::nextNodeCallback):
+ (WebCore::V8TreeWalker::previousNodeCallback):
+ (WebCore::V8TreeWalker::nextSiblingCallback):
+ (WebCore::V8TreeWalker::previousSiblingCallback):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::injectedScriptForNodeId):
+
+2010-01-28 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ Fix missing forward-declarations and includes in V8 bindings
+ https://bugs.webkit.org/show_bug.cgi?id=34272
+
+ No new tests, build fix only.
+
+ * bindings/v8/ScriptController.h: Modified. Forward-declare NPObject
+ * bindings/v8/V8DOMWindowShell.cpp: Modified. Include CString.h and PlatformBridge.h
+ * bindings/v8/V8DOMWrapper.h: Modified. Forward-declare V8Proxy
+
+2010-01-28 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Remove ScriptState::frame which is only used for reporting exceptions
+ in some cases in a way that diverges from the regular exception reporting in
+ v8 bindings.
+
+ Cache ScriptState directly on v8::Context instead of providing
+ implementations specific for isolated worlds and ScriptController.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34266
+
+ * bindings/js/ScriptController.cpp:
+ * bindings/js/ScriptController.h:
+ * bindings/js/ScriptState.cpp:
+ (WebCore::mainWorldScriptState):
+ * bindings/js/ScriptState.h:
+ * bindings/v8/ScriptCallStack.cpp:
+ (WebCore::ScriptCallStack::ScriptCallStack):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::clearWindowShell):
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/ScriptScope.cpp:
+ (WebCore::ScriptScope::ScriptScope):
+ (WebCore::ScriptScope::success):
+ * bindings/v8/ScriptScope.h:
+ * bindings/v8/ScriptState.cpp:
+ (WebCore::ScriptState::ScriptState):
+ (WebCore::ScriptState::forContext):
+ (WebCore::ScriptState::current):
+ (WebCore::ScriptState::empty):
+ (WebCore::ScriptState::weakReferenceCallback):
+ (WebCore::mainWorldScriptState):
+ (WebCore::scriptStateFromPage):
+ * bindings/v8/ScriptState.h:
+ * bindings/v8/V8HiddenPropertyName.h:
+ * bindings/v8/V8IsolatedContext.cpp:
+ * bindings/v8/V8IsolatedContext.h:
+ * bindings/v8/V8Utilities.cpp:
+ (WebCore::getScriptExecutionContext):
+ (WebCore::reportException):
+ * bindings/v8/custom/V8NodeIteratorCustom.cpp:
+ (WebCore::V8NodeIterator::nextNodeCallback):
+ (WebCore::V8NodeIterator::previousNodeCallback):
+ * bindings/v8/custom/V8TreeWalkerCustom.cpp:
+ (WebCore::V8TreeWalker::parentNodeCallback):
+ (WebCore::V8TreeWalker::firstChildCallback):
+ (WebCore::V8TreeWalker::lastChildCallback):
+ (WebCore::V8TreeWalker::nextNodeCallback):
+ (WebCore::V8TreeWalker::previousNodeCallback):
+ (WebCore::V8TreeWalker::nextSiblingCallback):
+ (WebCore::V8TreeWalker::previousSiblingCallback):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::injectedScriptForNodeId):
+
+2010-01-28 Adam Barth <abarth@webkit.org>
+
+ Reviewed by David Levin.
+
+ Remove XSSAuditor false positive for Google Translate
+ https://bugs.webkit.org/show_bug.cgi?id=34242
+
+ Google translate takes a base URL as a parameter, causing a false
+ positive in the XSS filter. This patch removes the false positive by
+ allowing direct injections into the href property of the base tag.
+
+ Test: http/tests/security/xssAuditor/base-href-direct.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canSetBaseElementURL):
+
+2010-01-28 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Save additional memory in SVG*Element classes, by introducing SVGElementRareData
+ https://bugs.webkit.org/show_bug.cgi?id=34268
+
+ Introduce SVGElementRareData, to remove the need to store any members in SVGElement/SVGStyledElement.
+ This saves some additional MB for the svg-node-count-vs-scroll.xhtml testcase.
+
+ SVGElementRareData works just like NodeRareData. Unlike ElementRareData, we're not inheriting from
+ NodeRareData in SVG, as we don't need all the rare data stored there, unlike Element.
+
+ * GNUmakefile.am: Add SVGElementRareData.h to build.
+ * WebCore.gypi: Ditto.
+ * WebCore.pro: Ditto.
+ * WebCore.vcproj/WebCore.vcproj: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * dom/Node.cpp: Use Nodes bitfield to keep track wheter a SVGElement has a SVGElementRareData object associated.
+ (WebCore::Node::Node):
+ * dom/Node.h: Add m_hasRareSVGData flag, merged with the existing bitfield, 10 bits remaining now.
+ (WebCore::Node::hasRareSVGData):
+ * svg/SVGAnimateMotionElement.cpp: SVGElement::instancesForElement() now returns a const-reference to the HashMap instead of copying.
+ (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
+ * svg/SVGAnimateTransformElement.cpp: Ditto.
+ (WebCore::SVGAnimateTransformElement::applyResultsToTarget):
+ * svg/SVGAnimationElement.cpp: Ditto.
+ (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
+ * svg/SVGElement.cpp: Move the element instances HashSet and two cursor-related pointers into SVGElementRareData.
+ (WebCore::SVGElement::SVGElement):
+ (WebCore::SVGElement::~SVGElement):
+ (WebCore::SVGElement::rareSVGData): Modelled just like Node::rareData().
+ (WebCore::SVGElement::ensureRareSVGData): Dito.
+ (WebCore::SVGElement::accessDocumentSVGExtensions):
+ (WebCore::SVGElement::mapInstanceToElement): Route call through SVGElementRareData.
+ (WebCore::SVGElement::removeInstanceMapping): Ditto.
+ (WebCore::SVGElement::instancesForElement): Ditto.
+ (WebCore::SVGElement::setCursorElement): Ditto.
+ (WebCore::SVGElement::setCursorImageValue): Ditto.
+ * svg/SVGElement.h:
+ * svg/SVGElementInstance.cpp: Ditto.
+ (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
+ * svg/SVGElementRareData.h: Added. Based on NodeRareData - works exactly the same.
+ (WebCore::SVGElementRareData::SVGElementRareData):
+ (WebCore::SVGElementRareData::rareDataMap):
+ (WebCore::SVGElementRareData::rareDataFromMap):
+ (WebCore::SVGElementRareData::elementInstances):
+ (WebCore::SVGElementRareData::instanceUpdatesBlocked):
+ (WebCore::SVGElementRareData::setInstanceUpdatesBlocked):
+ (WebCore::SVGElementRareData::cursorElement):
+ (WebCore::SVGElementRareData::setCursorElement):
+ (WebCore::SVGElementRareData::cursorImageValue):
+ (WebCore::SVGElementRareData::setCursorImageValue):
+ * svg/SVGStyledElement.cpp: Move m_instancesUpdatesBlocked into SVGElementRareData.
+ (WebCore::SVGStyledElement::SVGStyledElement):
+ (WebCore::SVGStyledElement::instanceUpdatesBlocked):
+ (WebCore::SVGStyledElement::setInstanceUpdatesBlocked):
+ * svg/SVGStyledElement.h:
+ * svg/SVGUseElement.cpp: Adapt to element instances changes, now passed as const-reference.
+ (WebCore::dumpInstanceTree):
+
+2010-01-28 Aaron Boodman <aa@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Expand the NotificationPresenter::checkPermission() interface to send the full
+ URL of the requesting context, as well as a pointer to the document if that
+ context was a document.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34238
+
+ * notifications/Notification.cpp:
+ (WebCore::Notification::Notification):
+ * notifications/NotificationCenter.cpp:
+ (WebCore::NotificationCenter::NotificationCenter):
+ (WebCore::NotificationCenter::checkPermission):
+ Pass the full URL and document from the requesting context when calling
+ NotificationPresenter::checkPermission().
+
+ * notifications/NotificationPresenter.h:
+ (WebCore::NotificationPresenter::):
+ Expand interface.
+
+2010-01-28 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Video can overlap position:fixed element when scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=32180
+
+ When the scroll position changes, and we're using overlap to decide what gets composited,
+ then we need to re-evaluate what gets compositing when scrolling in case fixed postion elements
+ overlap composited elements (e.g. video).
+
+ Test: compositing/geometry/video-fixed-scrolling.html
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::updateCompositingLayers):
+ (WebCore::FrameView::scrollPositionChanged): Annotate the calls to updateCompositingLayers()
+ with the type of change that occurred.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateCompositingAndLayerListsIfNeeded): Ditto.
+
+ * rendering/RenderLayerCompositor.h:
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::updateCompositingLayers): For scroll changes, check
+ for hierarchy update if m_compositingConsultsOverlap is true, and do
+ a geometry update. For other changes, always check for hierarchy updates.
+
+2010-01-27 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for user stylesheet bugs where they get parsed using the wrong compatibility mode. This was a regression
+ caused from Safari 3 -> 4 by the Acid3 fixes to create a real DOCTYPE in the DOM.
+
+ This patch makes style selector creation lazy, so that the selector isn't built unless someone asks for it.
+
+ In order to avoid creating the style selector before the compatibility mode has been determined, document
+ style is now created without having a dependence on an instantiated style selector. The creation of the style
+ is now done as a static method on CSSStyleSelector called styleForDocument, and a couple of font-related
+ functions have been made static as well so that they can be used by this method.
+
+ m_styleSelector on Document is now an OwnPtr.
+
+ Added userscripts/mixed-case-stylesheet.html
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::styleForDocument):
+ (WebCore::CSSStyleSelector::applyProperty):
+ (WebCore::CSSStyleSelector::checkForGenericFamilyChange):
+ (WebCore::CSSStyleSelector::setFontSize):
+ (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
+ (WebCore::CSSStyleSelector::fontSizeForKeyword):
+ * css/CSSStyleSelector.h:
+ * dom/Document.cpp:
+ (WebCore::Document::Document):
+ (WebCore::Document::~Document):
+ (WebCore::Document::recalcStyle):
+ (WebCore::Document::createStyleSelector):
+ (WebCore::Document::attach):
+ (WebCore::Document::setVisuallyOrdered):
+ (WebCore::Document::recalcStyleSelector):
+ * dom/Document.h:
+ (WebCore::Document::styleSelector):
+ (WebCore::Document::visuallyOrdered):
+ * html/HTMLDocument.cpp:
+ (WebCore::HTMLDocument::determineParseMode):
+ * loader/PlaceholderDocument.cpp:
+ (WebCore::PlaceholderDocument::attach):
+
+2010-01-28 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Rename ISODateTime.{cpp,h} to DateComponents.{cpp,h}
+ https://bugs.webkit.org/show_bug.cgi?id=34245
+
+ No functional changes.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * html/DateComponents.cpp: Copied from WebCore/html/ISODateTime.cpp.
+ (WebCore::DateComponents::maxWeekNumberInYear):
+ (WebCore::DateComponents::parseYear):
+ (WebCore::DateComponents::addDay):
+ (WebCore::DateComponents::addMinute):
+ (WebCore::DateComponents::parseTimeZone):
+ (WebCore::DateComponents::parseMonth):
+ (WebCore::DateComponents::parseDate):
+ (WebCore::DateComponents::parseWeek):
+ (WebCore::DateComponents::parseTime):
+ (WebCore::DateComponents::parseDateTimeLocal):
+ (WebCore::DateComponents::parseDateTime):
+ (WebCore::DateComponents::setMillisecondsSinceMidnightInternal):
+ (WebCore::DateComponents::setMillisecondsSinceEpochForDateInternal):
+ (WebCore::DateComponents::setMillisecondsSinceEpochForDate):
+ (WebCore::DateComponents::setMillisecondsSinceEpochForDateTime):
+ (WebCore::DateComponents::setMillisecondsSinceEpochForDateTimeLocal):
+ (WebCore::DateComponents::setMillisecondsSinceEpochForMonth):
+ (WebCore::DateComponents::setMillisecondsSinceMidnight):
+ (WebCore::DateComponents::setMillisecondsSinceEpochForWeek):
+ (WebCore::DateComponents::millisecondsSinceEpochForTime):
+ (WebCore::DateComponents::millisecondsSinceEpoch):
+ (WebCore::DateComponents::toStringForTime):
+ (WebCore::DateComponents::toString):
+ * html/DateComponents.h: Copied from WebCore/html/ISODateTime.h.
+ (WebCore::DateComponents::DateComponents):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::parseToDouble):
+ (WebCore::HTMLInputElement::valueAsDate):
+ (WebCore::HTMLInputElement::setValueAsDate):
+ (WebCore::HTMLInputElement::setValueAsNumber):
+ (WebCore::HTMLInputElement::formStringToDateComponents):
+ * html/HTMLInputElement.h:
+ * html/ISODateTime.cpp: Removed.
+ * html/ISODateTime.h: Removed.
+ * html/ValidityState.cpp:
+ (WebCore::ValidityState::typeMismatch):
+
+2010-01-28 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Use platform-specific monospace fonts in the Web Inspector
+
+ Move the OS version detection code into the frontend,
+ add custom CSS monospace styles for known platforms.
+ https://bugs.webkit.org/show_bug.cgi?id=34040
+
+ * inspector/InspectorFrontendHost.cpp:
+ (WebCore::InspectorFrontendHost::platform):
+ * inspector/front-end/BreakpointsSidebarPane.js:
+ (WebInspector.BreakpointsSidebarPane.prototype._appendBreakpointElement):
+ * inspector/front-end/DatabaseQueryView.js:
+ (WebInspector.DatabaseQueryView):
+ * inspector/front-end/InspectorBackendStub.js:
+ (.WebInspector.InspectorBackendStub.prototype.releaseWrapperObjectGroup):
+ (.WebInspector.InspectorBackendStub.prototype.setInjectedScriptSource):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._createConditionElement):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector.URLRegExp.i.get platform):
+ (WebInspector._detectPlatform):
+
+2010-01-28 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Simplify views logic in Profiler panel, and fix the problem described in the issue.
+ Remove image from Welcome view.
+ Preserve border on status bar-like buttons in Welcome view on window deactivation.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34201
+
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype.show):
+ (WebInspector.ProfilesPanel.prototype.reset):
+ (WebInspector.ProfilesPanel.prototype.addProfileHeader):
+ (WebInspector.ProfilesPanel.prototype.showView):
+ (WebInspector.ProfilesPanel.prototype._updateInterface):
+ * inspector/front-end/WelcomeView.js:
+ (WebInspector.WelcomeView):
+ * inspector/front-end/inspector.css:
+
+2010-01-18 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Speed up KURL to QUrl conversion
+ https://bugs.webkit.org/show_bug.cgi?id=33873
+
+ The WebCore::String::utf8 method will use the generic WebCore::TextCodec
+ and then call the encode method on it. In QtWebKit this class is implemented
+ around the QTextCodec class. Instead of going the generic codec way we treat
+ the WebCore::String as a QString (no copying) and then use the built-in
+ QString::toUtf8 to do the conversion.
+
+ * platform/qt/KURLQt.cpp:
+ (WebCore::KURL::operator QUrl):
+
+2010-01-28 Ben Murdoch <benm@google.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Android] [Qt] Touch event page co-ordinates are incorrect when touch is received in an iframe.
+ https://bugs.webkit.org/show_bug.cgi?id=34162
+
+ The pageX/pageY co-ordinates of a touch event should be relative to the containing frame, not the main frame. This change implements that and also updates the existing touch-inside-iframe test to also examine the page co-ordinates.
+
+ * dom/Touch.cpp:
+ (WebCore::Touch::Touch): Remove dead code.
+ * dom/Touch.h: Remove dead code.
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleTouchEvent): Rename framePoint to pagePoint, as it seems a clearer name. Also adjust the pagePoint to be relative to the touch target element's containing frame rather than the main frame.
+ * platform/PlatformTouchEvent.h: Rename Android specific constructor parameter to better reflect it's contents.
+ * platform/PlatformTouchPoint.h: Ditto.
+ * platform/android/PlatformTouchEventAndroid.cpp: Ditto.
+ * platform/android/PlatformTouchPointAndroid.cpp: Ditto.
+
+2010-01-28 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Simplify isActivation method.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34161
+
+ Test: WebCore/manual-tests/inspector/debugger-scopes-inspection.html
+
+ * bindings/js/JSInjectedScriptHostCustom.cpp:
+ (WebCore::JSInjectedScriptHost::isActivation):
+
+2010-01-27 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ rangeOverflow/rangeUnderflow support for type=date
+ https://bugs.webkit.org/show_bug.cgi?id=34209
+
+ Add DATE type support to rangeUnderflow(), rangeOverflow(),
+ minimum(), and maximum() of HTMLInputElement.
+ In order to unify parsing code for value, min, and max strings,
+ introduce parseToDouble() function and it is called by
+ valueAsDate() and valueAsNumber() too.
+
+ Tests: fast/forms/ValidityState-rangeOverflow-date.html
+ fast/forms/ValidityState-rangeUnderflow-date.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::rangeUnderflow): Support DATE type, and use parseToDouble().
+ (WebCore::HTMLInputElement::rangeOverflow): ditto.
+ (WebCore::HTMLInputElement::minimum): ditto.
+ (WebCore::HTMLInputElement::maximum): ditto.
+ (WebCore::HTMLInputElement::doubleValueFor): Added.
+ (WebCore::HTMLInputElement::valueAsDate): Use parseToDouble().
+ (WebCore::HTMLInputElement::valueAsNumber): Use parseToDouble().
+ * html/HTMLInputElement.h: Declare parseToDouble().
+
+2010-01-27 Darin Fisher <darin@chromium.org>
+
+ Fix chromium build bustage (take 2).
+
+ * bindings/scripts/CodeGeneratorV8.pm: Really treat V8CustomGetter like CustomGetter in all cases.
+
+2010-01-27 Darin Fisher <darin@chromium.org>
+
+ Fix chromium build bustage.
+
+ * bindings/scripts/CodeGeneratorV8.pm: Treat V8CustomGetter like CustomGetter in all cases.
+
+2010-01-27 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ MessageEvent.data should deserialize in the context of the MessageEvent's global object
+ https://bugs.webkit.org/show_bug.cgi?id=34227
+
+ Make ScriptValue deserialisation support the provision of a specific global
+ object to use when creating new objects. This then allows us to make
+ MessageEvent.data and PopStateEvent.state deserialize in the correct
+ context.
+
+ Test: fast/dom/Window/window-postmessage-clone-frames.html
+
+ * bindings/js/JSPopStateEventCustom.cpp:
+ Remove custom implementation of state getter
+ * bindings/js/SerializedScriptValue.cpp:
+ (WebCore::DeserializingTreeWalker::DeserializingTreeWalker):
+ (WebCore::DeserializingTreeWalker::createOutputArray):
+ (WebCore::DeserializingTreeWalker::createOutputObject):
+ (WebCore::DeserializingTreeWalker::convertIfTerminal):
+ (WebCore::SerializedScriptValueData::deserialize):
+ (WebCore::SerializedScriptValue::deserialize):
+ * bindings/js/SerializedScriptValue.h:
+ (WebCore::SerializedScriptValue::deserialize):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ Update bindings generation to pass the correct global object, and to
+ treat "any" as synonymous with SerializedValue.
+ * dom/PopStateEvent.idl:
+
+2010-01-27 Nicholas Young <nicholas.young@nokia.com>
+
+ Reviewed by Eric Carlson.
+
+ Make media controls fade in/out transition duration configurable on a theme level.
+ https://bugs.webkit.org/show_bug.cgi?id=34196
+
+ No new tests needed (I hope).
+
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::RenderMedia): Removed constant from contructor - the initial value is meaningless.
+ (WebCore::RenderMedia::updateControlVisibility): Get fade in/out duration from theme.
+ * rendering/RenderTheme.h:
+ (WebCore::RenderTheme::mediaControlsFadeInDuration): New virtual method.
+ (WebCore::RenderTheme::mediaControlsFadeOutDuration): New virtual method.
+
+2010-01-27 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Tests that when a page removes an iframe that sleeps in its unload handler and
+ terminates its JS execution, the outer page's JS continues running.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34226
+
+ Tests: fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html
+ fast/dom/Window/slow-unload-handler.html
+
+ * bindings/v8/DateExtension.cpp:
+ (WebCore::DateExtension::OnSleepDetected):
+
+2010-01-27 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Add valueAsNumber support for type=datetime-local.
+ https://bugs.webkit.org/show_bug.cgi?id=34200
+
+ Implement necessary methods of ISODateTime, and call them from
+ HTMLInputElement.
+
+ Test: fast/forms/input-valueasnumber-datetimelocal.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::valueAsNumber):
+ (WebCore::HTMLInputElement::setValueAsNumber):
+ * html/ISODateTime.cpp:
+ (WebCore::ISODateTime::setMillisecondsSinceEpochForDateTimeLocal):
+ Implemented. Just call setMillisecondsSinceEpochForDateTime().
+ (WebCore::ISODateTime::millisecondsSinceEpochForTime):
+ Accept to be called for m_type=DateTimeLocal.
+ (WebCore::ISODateTime::toString): Add DateTimeLocal support.
+ * html/ISODateTime.h: Declare new methods.
+
+2010-01-27 Steve Falkenburg <sfalken@apple.com>
+
+ Windows Debug_All build fix.
+
+ * platform/graphics/win/WKCACFLayer.cpp:
+ * platform/graphics/win/WKCACFLayerRenderer.cpp:
+
+2010-01-27 Evan Martin <evan@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] complex text draws newlines as bells
+ https://bugs.webkit.org/show_bug.cgi?id=34186
+
+ Revert r45496 -- once we've got a glyph array, it is too late to normalize
+ because we could have had multiple codepoints combine into one glyph. The
+ Uniscribe code it mentions it's duplicating uses the log cluster map to fix
+ this.
+
+ Instead, we just normalize the input text if it contains any non-ascii-space
+ whitespace.
+
+ This fixes fast/text/international/hindi-whitespace, which currently has an
+ incorrect baseline containing a square box glyph.
+
+ * platform/graphics/chromium/FontLinux.cpp:
+ (WebCore::TextRunWalker::getTextRun):
+ (WebCore::TextRunWalker::getNormalizedTextRun):
+ * platform/graphics/chromium/HarfbuzzSkia.cpp:
+ (WebCore::stringToGlyphs):
+
+2010-01-27 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34150
+ WebKit needs a mechanism to catch stale HashMap entries
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSRuleSet::getIDRules):
+ (WebCore::CSSRuleSet::getClassRules):
+ (WebCore::CSSRuleSet::getTagRules):
+ (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
+ * dom/CheckedRadioButtons.cpp:
+ (WebCore::CheckedRadioButtons::checkedButtonForGroup):
+ (WebCore::CheckedRadioButtons::removeButton):
+ * editing/markup.cpp:
+ (WebCore::shouldAddNamespaceAttr):
+ (WebCore::appendNamespace):
+ (WebCore::appendStartMarkup):
+ * html/HTMLCollection.cpp:
+ (WebCore::HTMLCollection::namedItems):
+ (WebCore::HTMLCollection::nextNamedItem):
+ * html/HTMLFormCollection.cpp:
+ (WebCore::HTMLFormCollection::formCollectionInfo):
+ * html/HTMLSelectElement.h:
+ (WebCore::HTMLSelectElement::collectionInfo):
+ * loader/loader.cpp:
+ (WebCore::Loader::load):
+ (WebCore::Loader::servePendingRequests):
+ (WebCore::Loader::nonCacheRequestInFlight):
+ (WebCore::Loader::nonCacheRequestComplete):
+ (WebCore::Loader::cancelRequests):
+ * page/animation/CompositeAnimation.cpp:
+ (WebCore::CompositeAnimation::clearRenderer):
+ (WebCore::CompositeAnimation::updateKeyframeAnimations):
+ (WebCore::CompositeAnimation::animate):
+ (WebCore::CompositeAnimation::getAnimatedStyle):
+ (WebCore::CompositeAnimation::setAnimating):
+ (WebCore::CompositeAnimation::timeToNextService):
+ (WebCore::CompositeAnimation::getAnimationForProperty):
+ (WebCore::CompositeAnimation::suspendAnimations):
+ (WebCore::CompositeAnimation::resumeAnimations):
+ (WebCore::CompositeAnimation::isAnimatingProperty):
+ (WebCore::CompositeAnimation::pauseAnimationAtTime):
+ (WebCore::CompositeAnimation::numberOfActiveAnimations):
+ Added checkConsistency checks before lookups in HashMaps with AtomicStringImpl* keys.
+
+ * dom/Document.cpp:
+ (WebCore::Document::removedLastRef): Clear m_elementsById map, because removeAllChildren()
+ doesn't always update it correctly when called during docuemnt destruction.
+ (WebCore::Document::getElementById): Added checkConsistency().
+ (WebCore::Document::removeElementById): Ditto.
+ (WebCore::Document::removeImageMap): Ditto.
+ (WebCore::Document::getImageMap): Ditto.
+ (WebCore::Document::nameCollectionInfo): Ditto.
+ * dom/Document.h:
+ (WebCore::Document::collectionInfo): Ditto.
+
+ * html/CollectionCache.cpp:
+ (WebCore::CollectionCache::checkConsistency):
+ * html/CollectionCache.h:
+ Added a checkConsistency() method that checks both HashMaps in the cache.
+
+ * platform/TreeShared.h:
+ (WebCore::TreeShared::~TreeShared): Assert that m_refCount is null. Since Nodes can be
+ destroyed with operator delete (as done in ContainerNodeAlgorithms), this is important to check.
+ (WebCore::TreeShared::deref): Assert that m_refCount isn't already negative.
+
+2010-01-27 Brian Tarricone <brian@kakai.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [gtk] Add support for windowless NPAPI plugins
+
+ Much of this is a translation of how the Qt backend does this,
+ modified for Gtk.
+
+ https://bugs.webkit.org/show_bug.cgi?id=18831
+
+ No new tests; there is already a windowless test in the tree.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::handleEvent):
+ (WebCore::PluginView::PluginView):
+ * plugins/PluginView.h:
+ * plugins/gtk/PluginViewGtk.cpp:
+ (WebCore::getRootWindow):
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::paint):
+ (WebCore::PluginView::handleKeyboardEvent):
+ (WebCore::inputEventState):
+ (WebCore::PluginView::initXEvent):
+ (WebCore::setXButtonEventSpecificFields):
+ (WebCore::setXMotionEventSpecificFields):
+ (WebCore::setXCrossingEventSpecificFields):
+ (WebCore::PluginView::handleMouseEvent):
+ (WebCore::PluginView::handleFocusInEvent):
+ (WebCore::PluginView::handleFocusOutEvent):
+ (WebCore::PluginView::setNPWindowRect):
+ (WebCore::PluginView::setNPWindowIfNeeded):
+ (WebCore::PluginView::getValueStatic):
+ (WebCore::PluginView::invalidateRect):
+ (WebCore::getPluginDisplay):
+ (WebCore::plug_removed_cb):
+ (WebCore::getVisualAndColormap):
+ (WebCore::PluginView::platformStart):
+ (WebCore::PluginView::platformDestroy):
+
+2010-01-27 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by David Levin.
+
+ [v8] minor cosmetic fix in V8 bindings codegenerator
+ https://bugs.webkit.org/show_bug.cgi?id=34224
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+
+2010-01-27 Darin Fisher <darin@chromium.org>
+
+ Fix Chromium build bustage.
+
+ * rendering/RenderBoxModelObject.cpp: Add wtf/CurrentTime.h include.
+
+2010-01-26 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Brady Eidson and David Levin.
+
+ Chains of history items representing same-document navigation need to
+ always remember that association
+
+ https://bugs.webkit.org/show_bug.cgi?id=33224
+
+ Replace HistoryItem's Document pointer with a DocumentSequenceNumber.
+ During session history traversal, if the current HistoryItem and the
+ target HistoryItem have the same DocumentSequenceNumber, then it means
+ that the current Document should remain.
+
+ NOTE: To support Chromium's serialization of HistoryItems, I generate
+ DocumentSequenceNumbers that are unique across application launches.
+ DocumentSequenceNumbers are generated using a counter initialized with
+ the time of day.
+
+ Test: fast/loader/stateobjects/document-destroyed-navigate-back.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::detach):
+ * dom/Document.h:
+ * history/BackForwardList.cpp:
+ (WebCore::BackForwardList::pushStateItem):
+ * history/BackForwardListChromium.cpp:
+ (WebCore::BackForwardList::pushStateItem):
+ * history/HistoryItem.cpp:
+ (WebCore::generateDocumentSequenceNumber):
+ (WebCore::HistoryItem::HistoryItem):
+ (WebCore::HistoryItem::~HistoryItem):
+ (WebCore::HistoryItem::setStateObject):
+ * history/HistoryItem.h:
+ (WebCore::HistoryItem::setDocumentSequenceNumber):
+ (WebCore::HistoryItem::documentSequenceNumber):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::navigateWithinDocument):
+ (WebCore::FrameLoader::loadItem):
+ * loader/HistoryController.cpp:
+ (WebCore::HistoryController::updateBackForwardListForFragmentScroll):
+ (WebCore::HistoryController::pushState):
+ (WebCore::HistoryController::replaceState):
+ * loader/RedirectScheduler.cpp:
+ (WebCore::RedirectScheduler::scheduleHistoryNavigation):
+ * page/History.cpp:
+ (WebCore::History::stateObjectAdded):
+ * page/Page.cpp:
+ (WebCore::Page::goToItem):
+
+2010-01-27 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Animated scaling of background-image is too slow
+ https://bugs.webkit.org/show_bug.cgi?id=33808
+
+ Implement a version of the RenderImage animated scaling optimisation
+ for background images. Due to the possibility of arbitrary transforms
+ being applied to containing elements we explicitly check the current
+ CTM of the context for scaling or rotation.
+
+ * platform/graphics/GraphicsContext.cpp:
+ (WebCore::GraphicsContext::drawTiledImage):
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/transforms/TransformationMatrix.h:
+ (WebCore::TransformationMatrix::isIdentityOrTranslation):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelScaleData::RenderBoxModelScaleData):
+ (WebCore::RenderBoxModelScaleData::~RenderBoxModelScaleData):
+ (WebCore::RenderBoxModelScaleData::size):
+ (WebCore::RenderBoxModelScaleData::time):
+ (WebCore::RenderBoxModelScaleData::useLowQualityScale):
+ (WebCore::RenderBoxModelScaleData::hiqhQualityRepaintTimer):
+ (WebCore::RenderBoxModelScaleData::setSize):
+ (WebCore::RenderBoxModelScaleData::setTime):
+ (WebCore::RenderBoxModelScaleData::setUseLowQualityScale):
+ (WebCore::RenderBoxModelScaleObserver::boxModelObjectDestroyed):
+ (WebCore::RenderBoxModelScaleObserver::highQualityRepaintTimerFired):
+ (WebCore::RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality):
+ (WebCore::RenderBoxModelObject::highQualityRepaintTimerFired):
+ (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
+ (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+ * rendering/RenderBoxModelObject.h:
+
+2010-01-27 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Enable websockets support in QtWebKit
+ https://bugs.webkit.org/show_bug.cgi?id=34180
+
+ Connected between SocketStreamHandle and QTcpSocket/QSslSocket
+ to enable support for websockets.
+ Proxy authentication is not yet supported.
+ SSL certificate errors are ignored while this is under development.
+
+ * WebCore.pro:
+ * platform/network/qt/SocketStreamHandle.h:
+ * platform/network/qt/SocketStreamHandlePrivate.h: Added.
+ * platform/network/qt/SocketStreamHandleQt.cpp:
+ (WebCore::SocketStreamHandlePrivate::SocketStreamHandlePrivate):
+ (WebCore::SocketStreamHandlePrivate::~SocketStreamHandlePrivate):
+ (WebCore::SocketStreamHandlePrivate::socketConnected):
+ (WebCore::SocketStreamHandlePrivate::socketReadyRead):
+ (WebCore::SocketStreamHandlePrivate::send):
+ (WebCore::SocketStreamHandlePrivate::close):
+ (WebCore::SocketStreamHandlePrivate::socketSentdata):
+ (WebCore::SocketStreamHandlePrivate::socketClosed):
+ (WebCore::SocketStreamHandlePrivate::socketError):
+ (WebCore::SocketStreamHandlePrivate::socketClosedCallback):
+ (WebCore::SocketStreamHandlePrivate::socketErrorCallback):
+ (WebCore::SocketStreamHandlePrivate::socketSslErrors):
+ (WebCore::SocketStreamHandle::SocketStreamHandle):
+ (WebCore::SocketStreamHandle::~SocketStreamHandle):
+ (WebCore::SocketStreamHandle::platformSend):
+ (WebCore::SocketStreamHandle::platformClose):
+
+2010-01-27 Mads Ager <ager@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Support getting integer-named properties using indexing notation on document object
+ https://bugs.webkit.org/show_bug.cgi?id=34211
+
+ Add indexed property getter to HTMLDocument to support getting
+ elements with integer names using indexing notation on document.
+
+ Test: fast/dom/HTMLDocument/get-iframe-with-integer-name.html
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+ (WebCore::V8HTMLDocument::indexedPropertyGetter):
+
+2010-01-27 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ Instead of relying on Object.prototype.toString result use JSObject::isActivationObject
+ to check if a scope node is a JSActivation. Object.prototype.toString for JSActivation
+ will call JSActivation::toThisObject whose result depends on the current call stack.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34161
+
+ Test: WebCore/manual-tests/inspector/debugger-scopes-inspection.html
+
+ * bindings/js/JSInjectedScriptHostCustom.cpp:
+ (WebCore::JSInjectedScriptHost::isActivation):
+ * inspector/InjectedScriptHost.idl:
+ * inspector/front-end/InjectedScript.js:
+ (injectedScriptConstructor.):
+ * manual-tests/inspector/debugger-scopes-inspection.html: Added.
+
+2010-01-27 Anton Muhin <antonm@google.com>
+ Review by Adam Barth.
+
+ Implement Node map in intrusive way for better speed.
+ https://bugs.webkit.org/show_bug.cgi?id=33957
+
+ * bindings/v8/DOMData.h:
+ (WebCore::DOMData::removeObjectsFromWrapperMap):
+ * bindings/v8/DOMDataStore.cpp:
+ (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::get):
+ (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::set):
+ (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::removeIfPresent):
+ (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::contains):
+ (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::visit):
+ (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::clear):
+ (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::allocateTableEntry):
+ (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::freeTableEntry):
+ * bindings/v8/DOMDataStore.h:
+ (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::IntrusiveDOMWrapperMap):
+ (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::clearEntry):
+ (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::clearEntries):
+ (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::visitEntries):
+ (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::TableChunk::TableChunk):
+ (WebCore::DOMDataStore::domNodeMap):
+ * bindings/v8/StaticDOMDataStore.cpp:
+ (WebCore::StaticDOMDataStore::StaticDOMDataStore):
+ * bindings/v8/StaticDOMDataStore.h:
+ * bindings/v8/V8DOMMap.cpp:
+ (WebCore::getDOMNodeMap):
+ * bindings/v8/V8DOMMap.h:
+ (WebCore::AbstractWeakReferenceMap::AbstractWeakReferenceMap):
+ (WebCore::AbstractWeakReferenceMap::weakReferenceCallback):
+ (WebCore::WeakReferenceMap::WeakReferenceMap):
+ (WebCore::WeakReferenceMap::set):
+ (WebCore::WeakReferenceMap::visit):
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertDocumentToV8Object):
+ (WebCore::getWrapper):
+ (WebCore::V8DOMWrapper::convertNodeToV8Object):
+ (WebCore::V8DOMWrapper::convertNewNodeToV8Object):
+ * bindings/v8/V8DOMWrapper.h:
+
+2010-01-27 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Add key event mappings for numpad keys for Gtk and Chromium/Gtk.
+ http://bugs.webkit.org/show_bug.cgi?id=28247
+
+ Test: fast/events/keydown-numpad-keys.html
+
+ * platform/chromium/KeyCodeConversionGtk.cpp:
+ (WebCore::windowsKeyCodeForKeyEvent):
+ * platform/gtk/KeyEventGtk.cpp:
+ (WebCore::windowsKeyCodeForKeyEvent):
+
+2010-01-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: migrate from SourceFrame to SourceFrame2.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34171
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * bindings/js/JSInspectorFrontendHostCustom.cpp:
+ * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
+ * inspector/InspectorFrontendHost.cpp:
+ * inspector/InspectorFrontendHost.h:
+ * inspector/InspectorFrontendHost.idl:
+ * inspector/front-end/InspectorBackendStub.js:
+ * inspector/front-end/InspectorFrontendHostStub.js:
+ * inspector/front-end/ResourceView.js:
+ (WebInspector.ResourceView.prototype._innerSelectContentTab):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.getResourceContent):
+ * inspector/front-end/ScriptView.js:
+ (WebInspector.ScriptView):
+ (WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype._sidebarResizeDrag):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame):
+ (WebInspector.SourceFrame.prototype.set executionLine):
+ (WebInspector.SourceFrame.prototype.revealLine):
+ (WebInspector.SourceFrame.prototype.addBreakpoint):
+ (WebInspector.SourceFrame.prototype.removeBreakpoint):
+ (WebInspector.SourceFrame.prototype.addMessage):
+ (WebInspector.SourceFrame.prototype.clearMessages):
+ (WebInspector.SourceFrame.prototype.sizeToFitContentHeight):
+ (WebInspector.SourceFrame.prototype.setContent):
+ (WebInspector.SourceFrame.prototype.findSearchMatches):
+ (WebInspector.SourceFrame.prototype._collectRegexMatches):
+ (WebInspector.SourceFrame.prototype.setSelection):
+ (WebInspector.SourceFrame.prototype._incrementMessageRepeatCount):
+ (WebInspector.SourceFrame.prototype._addExistingMessagesToSource):
+ (WebInspector.SourceFrame.prototype._addMessageToSource):
+ (WebInspector.SourceFrame.prototype._addExistingBreakpointsToSource):
+ (WebInspector.SourceFrame.prototype._addBreakpointToSource):
+ (WebInspector.SourceFrame.prototype._removeBreakpointFromSource):
+ (WebInspector.SourceFrame.prototype._contextMenu.addConditionalBreakpoint):
+ (WebInspector.SourceFrame.prototype._contextMenu):
+ (WebInspector.SourceFrame.prototype._toggleBreakpoint):
+ (WebInspector.SourceFrame.prototype._editBreakpointCondition.committed):
+ (WebInspector.SourceFrame.prototype._editBreakpointCondition.dismissed):
+ (WebInspector.SourceFrame.prototype._editBreakpointCondition):
+ (WebInspector.SourceFrame.prototype._showBreakpointConditionPopup):
+ (WebInspector.SourceFrame.prototype._createConditionElement):
+ (WebInspector.SourceFrame.prototype._keyDown):
+ (WebInspector.SourceFrame.prototype._evalSelectionInCallFrame):
+ (WebInspector.SourceFrame.prototype._breakpointChanged):
+ (WebInspector.SourceFrame.prototype.resize):
+ (WebInspector.BreakpointLineNumberDecorator):
+ (WebInspector.BreakpointLineNumberDecorator.prototype.decorate):
+ (WebInspector.BreakpointLineNumberDecorator.prototype._paintBreakpoint):
+ (WebInspector.BreakpointLineNumberDecorator.prototype._paintProgramCounter):
+ (WebInspector.BreakpointLineNumberDecorator.prototype.mouseDown):
+ (WebInspector.BreakpointLineNumberDecorator.prototype.contextMenu):
+ (WebInspector.ExecutionLineDecorator):
+ (WebInspector.ExecutionLineDecorator.prototype.decorate):
+ * inspector/front-end/SourceFrame2.js: Removed.
+ * inspector/front-end/SourceView.js:
+ (WebInspector.SourceView):
+ (WebInspector.SourceView.prototype.show):
+ (WebInspector.SourceView.prototype.resize):
+ (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded):
+ (WebInspector.SourceView.prototype._contentLoaded):
+ (WebInspector.SourceView.prototype.performSearch.findSearchMatches):
+ (WebInspector.SourceView.prototype.performSearch):
+ (WebInspector.SourceView.prototype._jumpToSearchResult):
+ (WebInspector.SourceView.prototype._sourceFrameSetupFinished):
+ * inspector/front-end/TextEditor.js:
+ (WebInspector.TextEditor.prototype._mouseDown):
+ (WebInspector.TextEditor.prototype._copy.delayCopy):
+ (WebInspector.TextEditor.prototype._copy):
+ (WebInspector.TextEditor.prototype._cut):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+
+2010-01-27 Dominik Röttsches <dominik.roettsches@access-company.com>
+
+ Reviewed by Xan Lopez.
+
+ [Gtk] For removing ICU, implement IDN support by means of libidn
+ https://bugs.webkit.org/show_bug.cgi?id=31470
+
+ In order to avoid a new dependency,
+ IDN support now based on GLib for the GLib unicode backend.
+
+ * platform/KURL.cpp:
+ (WebCore::appendEncodedHostname):
+
+2010-01-27 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] For package builds use the .def files on Symbian
+
+ * WebCore.pro:
+
+2010-01-27 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Avoid watch expressions duplication
+ https://bugs.webkit.org/show_bug.cgi?id=33996
+
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSidebarPane.prototype._settingsLoaded):
+
+2010-01-27 Marcus Bulach <bulach@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Adds EventSource bindings for V8
+ https://bugs.webkit.org/show_bug.cgi?id=33695
+
+ No new tests (existing layout tests for EventSource should pass).
+
+ * Android.v8bindings.mk:
+ * WebCore.gypi:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8DOMWrapper.cpp:
+ * bindings/v8/V8DOMWrapper.h:
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8EventSourceConstructor.cpp: Added.
+ * bindings/v8/custom/V8EventSourceCustom.cpp: Added.
+
+2010-01-27 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Meta-methods can't be introspected using ES5 API
+ https://bugs.webkit.org/show_bug.cgi?id=34087
+
+ Add getOwnPropertyDescriptor() and getOwnPropertyNames() reimplementations.
+
+ Tests are in WebKit/qt/tests/qwebframe
+
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::QtRuntimeMetaMethod::getOwnPropertyDescriptor):
+ (JSC::Bindings::QtRuntimeMetaMethod::getOwnPropertyNames):
+ (JSC::Bindings::QtRuntimeConnectionMethod::getOwnPropertyDescriptor):
+ (JSC::Bindings::QtRuntimeConnectionMethod::getOwnPropertyNames):
+ * bridge/qt/qt_runtime.h:
+
+2010-01-27 Tony Chang <tony@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix a crash when trying to indent a block element that was contained
+ in a list. This was happening because enclosingBlock() in
+ htmlediting.cpp can return the current the same Node when a block
+ element (like an <hr> or a <table>) is passed in. This causes
+ the indent command to think that it is not in a list item.
+
+ Work around this by checking to see if enclosingBlock returned the
+ same Node.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32390
+
+ Test: editing/execCommand/indent-block-in-list.html
+
+ * editing/IndentOutdentCommand.cpp:
+ (WebCore::IndentOutdentCommand::tryIndentingAsListItem):
+
+2010-01-27 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Add the "d" suffix to QtWebKit's dll on Windows.
+
+ * WebCore.pro:
+
+2010-01-27 Matt Perry <mpcomplete@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix a bug where dispatchDocumentElementAvailable was fired for fragment parsing on XML documents.
+ https://bugs.webkit.org/show_bug.cgi?id=33920
+
+ Tests: userscripts/script-not-run-for-fragments.html
+ userscripts/script-run-at-start.html
+
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::XMLTokenizer::startElementNs):
+
+2010-01-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Improve SourceHTMLTokenizer so that it treats script tag well.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34177
+
+ * inspector/front-end/SourceHTMLTokenizer.js:
+ (WebInspector.SourceHTMLTokenizer):
+ (WebInspector.SourceHTMLTokenizer.prototype._isAttribute):
+ (WebInspector.SourceHTMLTokenizer.prototype._isAttributeValue):
+ (WebInspector.SourceHTMLTokenizer.prototype._setAttributeValue):
+ (WebInspector.SourceHTMLTokenizer.prototype._setAttribute):
+ (WebInspector.SourceHTMLTokenizer.prototype._stringToken):
+ (WebInspector.SourceHTMLTokenizer.prototype.nextToken):
+ * inspector/front-end/SourceHTMLTokenizer.re2js:
+
+2010-01-26 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: nuke quarantine wrappers.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34203
+
+ * Android.jscbindings.mk:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * bindings/js/JSBindingsAllInOne.cpp:
+ * bindings/js/JSInspectedObjectWrapper.cpp: Removed.
+ * bindings/js/JSInspectedObjectWrapper.h: Removed.
+ * bindings/js/JSInspectorCallbackWrapper.cpp: Removed.
+ * bindings/js/JSInspectorCallbackWrapper.h: Removed.
+ * bindings/js/JSQuarantinedObjectWrapper.cpp: Removed.
+ * bindings/js/JSQuarantinedObjectWrapper.h: Removed.
+
+2010-01-27 Alexey Proskuryakov <ap@apple.com>
+
+ Revert r53899 (HashMap<AtomicStringImpl*, Value> key checks) and subsequent build fixes,
+ because they make SVG tests crash in release builds.
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSRuleSet::getIDRules):
+ (WebCore::CSSRuleSet::getClassRules):
+ (WebCore::CSSRuleSet::getTagRules):
+ (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
+ * dom/CheckedRadioButtons.cpp:
+ (WebCore::CheckedRadioButtons::checkedButtonForGroup):
+ (WebCore::CheckedRadioButtons::removeButton):
+ * dom/ContainerNodeAlgorithms.h:
+ (WebCore::removeAllChildrenInContainer):
+ * dom/Document.cpp:
+ (WebCore::Document::getElementById):
+ (WebCore::Document::removeElementById):
+ (WebCore::Document::removeImageMap):
+ (WebCore::Document::getImageMap):
+ (WebCore::Document::nameCollectionInfo):
+ * dom/Document.h:
+ (WebCore::Document::collectionInfo):
+ * editing/markup.cpp:
+ (WebCore::shouldAddNamespaceAttr):
+ (WebCore::appendNamespace):
+ (WebCore::appendStartMarkup):
+ * html/CollectionCache.cpp:
+ * html/CollectionCache.h:
+ * html/HTMLCollection.cpp:
+ (WebCore::HTMLCollection::namedItems):
+ (WebCore::HTMLCollection::nextNamedItem):
+ * html/HTMLFormCollection.cpp:
+ (WebCore::HTMLFormCollection::formCollectionInfo):
+ * html/HTMLSelectElement.h:
+ (WebCore::HTMLSelectElement::collectionInfo):
+ * loader/loader.cpp:
+ (WebCore::Loader::load):
+ (WebCore::Loader::servePendingRequests):
+ (WebCore::Loader::nonCacheRequestInFlight):
+ (WebCore::Loader::nonCacheRequestComplete):
+ (WebCore::Loader::cancelRequests):
+ * page/animation/CompositeAnimation.cpp:
+ (WebCore::CompositeAnimation::clearRenderer):
+ (WebCore::CompositeAnimation::updateKeyframeAnimations):
+ (WebCore::CompositeAnimation::animate):
+ (WebCore::CompositeAnimation::getAnimatedStyle):
+ (WebCore::CompositeAnimation::setAnimating):
+ (WebCore::CompositeAnimation::timeToNextService):
+ (WebCore::CompositeAnimation::getAnimationForProperty):
+ (WebCore::CompositeAnimation::suspendAnimations):
+ (WebCore::CompositeAnimation::resumeAnimations):
+ (WebCore::CompositeAnimation::isAnimatingProperty):
+ (WebCore::CompositeAnimation::pauseAnimationAtTime):
+ (WebCore::CompositeAnimation::numberOfActiveAnimations):
+ * platform/TreeShared.h:
+ (WebCore::TreeShared::~TreeShared):
+ (WebCore::TreeShared::deref):
+
+2010-01-25 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Eric Seidel.
+
+ autobuffer value not forwarded media element to MediaPlayer
+ https://bugs.webkit.org/show_bug.cgi?id=33889
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::loadResource): Forward autobuffer
+ value to MediaPlayer instance.
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::MediaPlayer::load): Forward autobuffer and
+ preservesPitch values to newly created platform media player instance.
+
+2010-01-25 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Gtk] media/video-reverse-play-duration.html fails on and off on Gtk buildbots
+ https://bugs.webkit.org/show_bug.cgi?id=34086
+
+ Cache media duration and fix didEnd() in case of reverse
+ playback. When EOS was reached but in case of reverse playback the
+ position is not always 0. So to not confuse the HTMLMediaElement
+ we synchronize position and duration values.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::duration):
+ (WebCore::MediaPlayerPrivate::updateStates):
+ (WebCore::MediaPlayerPrivate::didEnd):
+ (WebCore::MediaPlayerPrivate::durationChanged):
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+
+2010-01-27 Alexey Proskuryakov <ap@apple.com>
+
+ * WebCore.xcodeproj/project.pbxproj: Actually land the change to add ContainerNodeAlgorithms.h
+ (it's "svn resolved", not "svn revert"!).
+
+2010-01-26 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34150
+ WebKit needs a mechanism to catch stale HashMap entries
+
+ * WebCore.xcodeproj/project.pbxproj: Added ContainerNodeAlgorithms.h to the project to make
+ it easier to search for.
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSRuleSet::getIDRules):
+ (WebCore::CSSRuleSet::getClassRules):
+ (WebCore::CSSRuleSet::getTagRules):
+ (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
+ * dom/CheckedRadioButtons.cpp:
+ (WebCore::CheckedRadioButtons::checkedButtonForGroup):
+ (WebCore::CheckedRadioButtons::removeButton):
+ * dom/Document.cpp:
+ (WebCore::Document::getElementById):
+ (WebCore::Document::removeElementById):
+ (WebCore::Document::removeImageMap):
+ (WebCore::Document::getImageMap):
+ (WebCore::Document::nameCollectionInfo):
+ * dom/Document.h:
+ (WebCore::Document::collectionInfo):
+ * editing/markup.cpp:
+ (WebCore::shouldAddNamespaceAttr):
+ (WebCore::appendNamespace):
+ (WebCore::appendStartMarkup):
+ * html/HTMLCollection.cpp:
+ (WebCore::HTMLCollection::namedItems):
+ (WebCore::HTMLCollection::nextNamedItem):
+ * html/HTMLFormCollection.cpp:
+ (WebCore::HTMLFormCollection::formCollectionInfo):
+ * html/HTMLSelectElement.h:
+ (WebCore::HTMLSelectElement::collectionInfo):
+ * loader/loader.cpp:
+ (WebCore::Loader::load):
+ (WebCore::Loader::servePendingRequests):
+ (WebCore::Loader::nonCacheRequestInFlight):
+ (WebCore::Loader::nonCacheRequestComplete):
+ (WebCore::Loader::cancelRequests):
+ * page/animation/CompositeAnimation.cpp:
+ (WebCore::CompositeAnimation::clearRenderer):
+ (WebCore::CompositeAnimation::updateKeyframeAnimations):
+ (WebCore::CompositeAnimation::animate):
+ (WebCore::CompositeAnimation::getAnimatedStyle):
+ (WebCore::CompositeAnimation::setAnimating):
+ (WebCore::CompositeAnimation::timeToNextService):
+ (WebCore::CompositeAnimation::getAnimationForProperty):
+ (WebCore::CompositeAnimation::suspendAnimations):
+ (WebCore::CompositeAnimation::resumeAnimations):
+ (WebCore::CompositeAnimation::isAnimatingProperty):
+ (WebCore::CompositeAnimation::pauseAnimationAtTime):
+ (WebCore::CompositeAnimation::numberOfActiveAnimations):
+ Added checkConsistency checks before lookups in HashMaps with AtomicStringImpl* keys.
+
+ * dom/ContainerNodeAlgorithms.h: (WebCore::removeAllChildrenInContainer): Be sure to notify
+ about removed child nodes that can be deleted immediately.
+
+ * html/CollectionCache.cpp:
+ (WebCore::CollectionCache::checkConsistency):
+ * html/CollectionCache.h:
+ Added a checkConsistency() method that checks both HashMaps in the cache.
+
+ * platform/TreeShared.h:
+ (WebCore::TreeShared::~TreeShared): Assert that m_refCount is null. Since Nodes can be
+ destroyed with operator delete (as done in ContainerNodeAlgorithms), this is important to check.
+ (WebCore::TreeShared::deref): Assert that m_refCount isn't already negative.
+
+2010-01-26 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29564
+
+ [Qt] Fixes an issue where the height of <button>- and
+ <input type="button">- elements are fixed to the height of the
+ button label font plus padding. That is, the CSS height property
+ is being ignored.
+
+ Instead, we should honor the user-specified height, if appropriate
+ for the platform and context. Notice, the Mac ports do not honor the
+ height for <input type="button"> elements unless a border and/or
+ background is also specified.
+
+ Test: fast/css/button-height.html
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::adjustButtonStyle):
+
+2010-01-26 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Enable the Audits panel via a shortcut (Cmd/Ctrl+Alt+A)
+ https://bugs.webkit.org/show_bug.cgi?id=34158
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.documentKeyDown):
+
+2010-01-26 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ HTMLInputElement::valueAsNumber support except type=datetime-local.
+ https://bugs.webkit.org/show_bug.cgi?id=32696
+
+ Tests: fast/forms/input-valueasnumber-date.html
+ fast/forms/input-valueasnumber-datetime.html
+ fast/forms/input-valueasnumber-month.html
+ fast/forms/input-valueasnumber-number.html
+ fast/forms/input-valueasnumber-range.html
+ fast/forms/input-valueasnumber-time.html
+ fast/forms/input-valueasnumber-unsupported.html
+ fast/forms/input-valueasnumber-week.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::valueAsNumber):
+ According to the specification, we should return NaN for invalid values.
+ (WebCore::HTMLInputElement::setValueAsNumber):
+ According to the specification, throws NOT_SUPPORTED_ERR for Infinitiy or NaN,
+ and throws INVALID_STATE_ERR for unsupported types.
+ (WebCore::HTMLInputElement::formStringToDouble):
+ According to the step 14 of Real Number in the specification, we
+ should round -0 to 0.
+ * html/HTMLInputElement.h: Declare valueAsNumber() and setValueAsNumber().
+ * html/HTMLInputElement.idl: Add valueAsNumber.
+
+2010-01-26 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Make sure there is a lock on serialize in SerializedScriptValueData, since type errors can be created when
+ exceptions are thrown.
+
+ * bindings/js/SerializedScriptValue.cpp:
+ (WebCore::SerializedScriptValueData::serialize):
+
+2010-01-26 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Add Date type support for Objective-C binding.
+ https://bugs.webkit.org/show_bug.cgi?id=32810
+
+ The Date type in IDLs is mapped to NSTimeInterval in Objective-C.
+
+ * bindings/objc/DOMInternal.h: Add kit() and core() for NSTimeInterval.
+ * bindings/scripts/CodeGenerator.pm: Make Date a primitive type.
+ * bindings/scripts/CodeGeneratorJS.pm: Move some code for the CodeGeenrator.pm change.
+ * bindings/scripts/CodeGeneratorObjC.pm:
+ * bindings/scripts/CodeGeneratorV8.pm: Move some code for the CodeGeenrator.pm change.
+ * html/HTMLInputElement.idl: Remove Objective-C exclusion for valueAsDate.
+
+2010-01-26 Dmitry Titov <dimich@chromium.org>
+
+ Not reviewed, attempt to fix Tiger build.
+
+ * rendering/RenderTreeAsText.cpp:
+ (WebCore::write): Use UNUSED_PARAM macros to prevent compiler warning on targets without accelerated compositing.
+
+2010-01-26 Roland Steiner <rolandsteiner@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Incorrect boolean expression in isMailBlockquote() (WebCore/htmlediting.cpp)
+ https://bugs.webkit.org/show_bug.cgi?id=34156
+
+ No new tests (minor code change).
+
+ * editing/htmlediting.cpp:
+ (WebCore::isMailBlockquote):
+
+2010-01-26 Peter Kasting <pkasting@google.com>
+
+ Reviewed by David Levin.
+
+ Handle broken images more correctly in the open-source image decoders.
+ https://bugs.webkit.org/show_bug.cgi?id=33747
+
+ No tests since Safari doesn't use these decoders and there's already a
+ broken-image test in the tree.
+
+ * platform/graphics/ImageSource.cpp:
+ (WebCore::ImageSource::createFrameAtIndex): No need to check isSizeAvailable() since size() is now always safe.
+ * platform/image-decoders/ImageDecoder.h:
+ (WebCore::ImageDecoder::size): Don't assert that the bitmap is valid; we don't need a complete successful decode to be able to give info about the size.
+ * platform/image-decoders/qt/RGBA32BufferQt.cpp:
+ (WebCore::RGBA32Buffer::setSize): Don't set the frame to complete on failure, since it's not complete, but empty, and callers can better handle empty frames.
+ * platform/image-decoders/skia/ImageDecoderSkia.cpp:
+ (WebCore::RGBA32Buffer::setSize): Don't set the frame to complete on failure, since it's not complete, but empty, and callers can better handle empty frames.
+
+2010-01-26 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Synchronize Qt/Gtk build systems with Mac/Win, should fix Qt compilation. Gtk results still pending.
+
+ * GNUmakefile.am:
+ * WebCore.pro:
+
+2010-01-26 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Attempt to fix V8 - change SetterMethod function signatures, just like it has been done for JSSVGPODTypeWrapper.
+
+ * bindings/v8/V8SVGPODTypeWrapper.h:
+
+2010-01-26 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Revert Base.xcconfig changes, was not meant to be committed.
+
+ * Configurations/Base.xcconfig:
+
+2010-01-26 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Oliver Hunt.
+
+ SVG consumes way too much memory to store animated properties in the DOM
+ https://bugs.webkit.org/show_bug.cgi?id=34188
+
+ Shrink WebCore library size to 75% (measured in debug builds) and reduce SVG memory usage to <25%.
+ Adding Oliver testcase as manual-tests/svg-node-count-vs-scroll.xhtml, which creates an arbitary number of
+ rects (50.000 <rect> elements added to the DOM by default) - memory usage down to 111M from 503M (RPRVT).
+ The SVG DOM side is almost fine, still some optimizations possible, that will be implemented soon - next
+ target is the SVG render tree, there are plenty of possibilities to reduce memory usage there.
+
+ Redesign the way we store animated properties in the individual SVG*Element files. Short story: In order
+ to support SVG DOM through the bindings (e.g. JS) we need to associate SVGAnimatedProperty objects with
+ the SVGElement object that created it - we used to store this pointer directly in the SVGAnimatedProperty.
+ This means, every SVGAnimatedProperty stored in a SVGRectElement, stored a pointer to the SVGRectElement, resulting
+ in excessive memory usage. This is now properly implemented, without wasting tons of memory. Unfortunately this
+ requires touching all SVG*Element files.
+
+ Detailed list of changes:
+ - Remove template bloat by not specializing class templates for each attributeName/tagName combination. Instead
+ SVGAnimatedProperty is a non-specialized template class now, only depending on the AnimatedType (ie. SVGLength for SVGAnimatedLength)
+ -> This heavily reduces the generated code, thus shrinking WebCore size. I hope we can build windows again without SVGAllInOne.cpp
+
+ - Remove "exportStrings" / "exportString" handling from make_names.pl - SVG defined string literals for each QualifiedName,
+ in order to use template specialization based on "const char*" parameters. All that bloat is gone, so there's no need for it anymore.
+
+ - Redesign SVGAnimatedProperty so it does not need any back-pointers to the SVGElement that created it
+
+ - Don't actually store the XML DOM attribute name associated with a SVG DOM property in SVGAnimatedProperty, move the associatedAttributeName()
+ function inside the macro declaration and just return the passed macro parameter DOMAttribute there, storing is inefficient and useless.
+
+ - Remove SynchronizablePropertyController, which was living in SVGElement as member variable, keeping a HashMap<AttributeName, SVGAnimatedProperty>.
+ It was needed before to lookup a SVGAnimatedProperty for a XML DOM attribute, in order to synchronize SVG <-> XML dom properties/attributes.
+ Instead just add a "synchronizeProperty(const QualifiedName&)" method to all SVG*Element classes. As each SVG*Element class knows about its
+ animated properties it can just ask them to synchronize themselves - no need for any dynamic lookups anymore.
+
+ - Remove SynchronizableTypeWrapper which added more complexity for the sake of SVG <-> XML DOM synchronization, all replaced by synchronizeProperty.
+
+ - Pass around any POD objects as const references, instead of copying them for no reason.
+
+ - Clean up SVGAnimatedProperty, splitting up into SVGAnimatedProperty/PropertySynchronizer/PropertyTraits.
+
+ - Remove baseValue/setBaseValue code from SVGDocumentExtensions, not needed anymore.
+
+ ... and tons of changes to all SVG*Element classes, adapting to the new way of handling animated properties.
+
+ * GNUmakefile.am: Remove Synchronizable* from build, add new SVGAnimatedPropertySynchronizer/Traits files
+ * WebCore.gypi: Ditto.
+ * WebCore.vcproj/WebCore.vcproj: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * bindings/js/JSSVGPODTypeWrapper.h: Change synchronization callback signatures, as we pass around const-references now.
+ * dom/Element.cpp: Let updateAnimatedSVGAttribute take a QualifiedName instead of pure Strings.
+ (WebCore::Element::getAttribute):
+ (WebCore::Element::hasAttributes):
+ * dom/Element.h:
+ (WebCore::Element::updateAnimatedSVGAttribute):
+ (WebCore::Element::attributes):
+ * dom/make_names.pl: Remove SVG specific "exportString" / "exportStrings" functionality, see above.
+ * html/HTMLAttributeNames.in: Remove "exportString" tag from "className" attribute.
+ * manual-tests/svg-node-count-vs-scroll.xhtml: Added. Can be used to verify memory consumption with a lot of DOM objects.
+ * mathml/mathattrs.in: MathML doesn't need "exportStrings" - remove it.
+ * mathml/mathtags.in: Ditto.
+ * svg/SVGAElement.cpp:
+ (WebCore::SVGAElement::SVGAElement):
+ (WebCore::SVGAElement::synchronizeProperty):
+ * svg/SVGAElement.h:
+ * svg/SVGAllInOne.cpp: Remove SynchronizablePropertyController.cpp
+ * svg/SVGAltGlyphElement.cpp:
+ (WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
+ (WebCore::SVGAltGlyphElement::synchronizeProperty):
+ * svg/SVGAltGlyphElement.h:
+ * svg/SVGAnimateTransformElement.cpp:
+ (WebCore::SVGAnimateTransformElement::applyResultsToTarget):
+ * svg/SVGAnimatedProperty.h: Rewritten, see above for details.
+ (WebCore::SVGAnimatedPropertyTearOff::create):
+ (WebCore::SVGAnimatedPropertyTearOff::setBaseVal):
+ (WebCore::SVGAnimatedPropertyTearOff::setAnimVal):
+ (WebCore::SVGAnimatedPropertyTearOff::baseVal):
+ (WebCore::SVGAnimatedPropertyTearOff::animVal):
+ (WebCore::SVGAnimatedPropertyTearOff::associatedAttributeName):
+ (WebCore::SVGAnimatedPropertyTearOff::SVGAnimatedPropertyTearOff):
+ (WebCore::SVGAnimatedPropertyTearOff::~SVGAnimatedPropertyTearOff):
+ (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
+ (WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
+ (WebCore::SVGAnimatedProperty::value):
+ (WebCore::SVGAnimatedProperty::baseValue):
+ (WebCore::SVGAnimatedProperty::setValue):
+ (WebCore::SVGAnimatedProperty::setBaseValue):
+ (WebCore::SVGAnimatedProperty::shouldSynchronize):
+ (WebCore::SVGAnimatedProperty::setShouldSynchronize):
+ * svg/SVGAnimatedPropertySynchronizer.h: Added.
+ (WebCore::):
+ * svg/SVGAnimatedPropertyTraits.h: Added.
+ (WebCore::):
+ * svg/SVGAnimatedTemplate.h: Move SVGAnimatedPropertyTraits into its own file.
+ (WebCore::SVGAnimatedTemplate::forgetWrapper):
+ (WebCore::lookupOrCreateWrapper):
+ * svg/SVGAnimationElement.cpp:
+ (WebCore::SVGAnimationElement::SVGAnimationElement):
+ (WebCore::SVGAnimationElement::synchronizeProperty):
+ * svg/SVGAnimationElement.h:
+ * svg/SVGCircleElement.cpp:
+ (WebCore::SVGCircleElement::SVGCircleElement):
+ (WebCore::SVGCircleElement::synchronizeProperty):
+ * svg/SVGCircleElement.h:
+ * svg/SVGClipPathElement.cpp:
+ (WebCore::SVGClipPathElement::SVGClipPathElement):
+ (WebCore::SVGClipPathElement::synchronizeProperty):
+ * svg/SVGClipPathElement.h:
+ * svg/SVGComponentTransferFunctionElement.cpp:
+ (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
+ (WebCore::SVGComponentTransferFunctionElement::parseMappedAttribute):
+ (WebCore::SVGComponentTransferFunctionElement::synchronizeProperty):
+ * svg/SVGComponentTransferFunctionElement.h:
+ * svg/SVGCursorElement.cpp:
+ (WebCore::SVGCursorElement::SVGCursorElement):
+ (WebCore::SVGCursorElement::synchronizeProperty):
+ * svg/SVGCursorElement.h:
+ * svg/SVGDefsElement.cpp:
+ (WebCore::SVGDefsElement::SVGDefsElement):
+ (WebCore::SVGDefsElement::synchronizeProperty):
+ * svg/SVGDefsElement.h:
+ * svg/SVGDocumentExtensions.h:
+ * svg/SVGElement.cpp: Adapt to synchronization changes: use synchronizeProperty() call, instead of SynchronizablePropertyController.
+ (WebCore::SVGElement::updateAnimatedSVGAttribute):
+ * svg/SVGElement.h: Don't store SynchronizablePropertyController anymore, it's gone.
+ (WebCore::SVGElement::synchronizeProperty):
+ (WebCore::SVGElement::setSynchronizedSVGAttributes):
+ * svg/SVGEllipseElement.cpp:
+ (WebCore::SVGEllipseElement::SVGEllipseElement):
+ (WebCore::SVGEllipseElement::synchronizeProperty):
+ * svg/SVGEllipseElement.h:
+ * svg/SVGExternalResourcesRequired.cpp:
+ * svg/SVGExternalResourcesRequired.h:
+ * svg/SVGFEBlendElement.cpp:
+ (WebCore::SVGFEBlendElement::SVGFEBlendElement):
+ (WebCore::SVGFEBlendElement::synchronizeProperty):
+ * svg/SVGFEBlendElement.h:
+ * svg/SVGFEColorMatrixElement.cpp:
+ (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
+ (WebCore::SVGFEColorMatrixElement::synchronizeProperty):
+ * svg/SVGFEColorMatrixElement.h:
+ * svg/SVGFEComponentTransferElement.cpp:
+ (WebCore::SVGFEComponentTransferElement::SVGFEComponentTransferElement):
+ (WebCore::SVGFEComponentTransferElement::synchronizeProperty):
+ * svg/SVGFEComponentTransferElement.h:
+ * svg/SVGFECompositeElement.cpp:
+ (WebCore::SVGFECompositeElement::SVGFECompositeElement):
+ (WebCore::SVGFECompositeElement::parseMappedAttribute):
+ (WebCore::SVGFECompositeElement::synchronizeProperty):
+ * svg/SVGFECompositeElement.h:
+ * svg/SVGFEDiffuseLightingElement.cpp:
+ (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
+ (WebCore::SVGFEDiffuseLightingElement::synchronizeProperty):
+ * svg/SVGFEDiffuseLightingElement.h:
+ * svg/SVGFEDisplacementMapElement.cpp:
+ (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
+ (WebCore::SVGFEDisplacementMapElement::synchronizeProperty):
+ * svg/SVGFEDisplacementMapElement.h:
+ * svg/SVGFEGaussianBlurElement.cpp:
+ (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
+ (WebCore::SVGFEGaussianBlurElement::synchronizeProperty):
+ * svg/SVGFEGaussianBlurElement.h:
+ * svg/SVGFEImageElement.cpp:
+ (WebCore::SVGFEImageElement::SVGFEImageElement):
+ (WebCore::SVGFEImageElement::synchronizeProperty):
+ * svg/SVGFEImageElement.h:
+ * svg/SVGFELightElement.cpp:
+ (WebCore::SVGFELightElement::SVGFELightElement):
+ (WebCore::SVGFELightElement::synchronizeProperty):
+ * svg/SVGFELightElement.h:
+ * svg/SVGFEMergeNodeElement.cpp:
+ (WebCore::SVGFEMergeNodeElement::SVGFEMergeNodeElement):
+ (WebCore::SVGFEMergeNodeElement::synchronizeProperty):
+ * svg/SVGFEMergeNodeElement.h:
+ * svg/SVGFEMorphologyElement.cpp:
+ (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
+ (WebCore::SVGFEMorphologyElement::synchronizeProperty):
+ * svg/SVGFEMorphologyElement.h:
+ * svg/SVGFEOffsetElement.cpp:
+ (WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
+ (WebCore::SVGFEOffsetElement::synchronizeProperty):
+ * svg/SVGFEOffsetElement.h:
+ * svg/SVGFESpecularLightingElement.cpp:
+ (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
+ (WebCore::SVGFESpecularLightingElement::synchronizeProperty):
+ * svg/SVGFESpecularLightingElement.h:
+ * svg/SVGFETileElement.cpp:
+ (WebCore::SVGFETileElement::SVGFETileElement):
+ (WebCore::SVGFETileElement::synchronizeProperty):
+ * svg/SVGFETileElement.h:
+ * svg/SVGFETurbulenceElement.cpp:
+ (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
+ (WebCore::SVGFETurbulenceElement::synchronizeProperty):
+ * svg/SVGFETurbulenceElement.h:
+ * svg/SVGFilterElement.cpp:
+ (WebCore::SVGFilterElement::SVGFilterElement):
+ (WebCore::SVGFilterElement::synchronizeProperty):
+ * svg/SVGFilterElement.h:
+ * svg/SVGFilterPrimitiveStandardAttributes.cpp:
+ (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
+ (WebCore::SVGFilterPrimitiveStandardAttributes::synchronizeProperty):
+ * svg/SVGFilterPrimitiveStandardAttributes.h:
+ * svg/SVGFitToViewBox.cpp:
+ * svg/SVGFitToViewBox.h:
+ * svg/SVGFontElement.cpp:
+ (WebCore::SVGFontElement::SVGFontElement):
+ (WebCore::SVGFontElement::synchronizeProperty):
+ * svg/SVGFontElement.h:
+ * svg/SVGForeignObjectElement.cpp:
+ (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
+ (WebCore::SVGForeignObjectElement::synchronizeProperty):
+ * svg/SVGForeignObjectElement.h:
+ * svg/SVGGElement.cpp:
+ (WebCore::SVGGElement::SVGGElement):
+ (WebCore::SVGGElement::synchronizeProperty):
+ * svg/SVGGElement.h:
+ * svg/SVGGradientElement.cpp:
+ (WebCore::SVGGradientElement::SVGGradientElement):
+ (WebCore::SVGGradientElement::synchronizeProperty):
+ * svg/SVGGradientElement.h:
+ * svg/SVGImageElement.cpp:
+ (WebCore::SVGImageElement::SVGImageElement):
+ (WebCore::SVGImageElement::synchronizeProperty):
+ * svg/SVGImageElement.h:
+ * svg/SVGLineElement.cpp:
+ (WebCore::SVGLineElement::SVGLineElement):
+ (WebCore::SVGLineElement::synchronizeProperty):
+ * svg/SVGLineElement.h:
+ * svg/SVGLinearGradientElement.cpp:
+ (WebCore::SVGLinearGradientElement::SVGLinearGradientElement):
+ (WebCore::SVGLinearGradientElement::synchronizeProperty):
+ * svg/SVGLinearGradientElement.h:
+ * svg/SVGList.h: Adapt to const-reference changes.
+ (WebCore::SVGPODListItem::setValue):
+ * svg/SVGMPathElement.cpp:
+ (WebCore::SVGMPathElement::SVGMPathElement):
+ (WebCore::SVGMPathElement::synchronizeProperty):
+ * svg/SVGMPathElement.h:
+ * svg/SVGMarkerElement.cpp:
+ (WebCore::SVGMarkerElement::SVGMarkerElement):
+ (WebCore::SVGMarkerElement::synchronizeProperty):
+ * svg/SVGMarkerElement.h:
+ * svg/SVGMaskElement.cpp:
+ (WebCore::SVGMaskElement::SVGMaskElement):
+ (WebCore::SVGMaskElement::synchronizeProperty):
+ * svg/SVGMaskElement.h:
+ * svg/SVGPathElement.cpp:
+ (WebCore::SVGPathElement::SVGPathElement):
+ (WebCore::SVGPathElement::synchronizeProperty):
+ * svg/SVGPathElement.h:
+ * svg/SVGPatternElement.cpp:
+ (WebCore::SVGPatternElement::SVGPatternElement):
+ (WebCore::SVGPatternElement::synchronizeProperty):
+ * svg/SVGPatternElement.h:
+ * svg/SVGPolyElement.cpp:
+ (WebCore::SVGPolyElement::SVGPolyElement):
+ (WebCore::SVGPolyElement::svgAttributeChanged):
+ (WebCore::SVGPolyElement::synchronizeProperty):
+ * svg/SVGPolyElement.h:
+ * svg/SVGRadialGradientElement.cpp:
+ (WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
+ (WebCore::SVGRadialGradientElement::synchronizeProperty):
+ * svg/SVGRadialGradientElement.h:
+ * svg/SVGRectElement.cpp:
+ (WebCore::SVGRectElement::SVGRectElement):
+ (WebCore::SVGRectElement::synchronizeProperty):
+ * svg/SVGRectElement.h:
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::SVGSVGElement):
+ (WebCore::SVGSVGElement::synchronizeProperty):
+ * svg/SVGSVGElement.h:
+ * svg/SVGScriptElement.cpp:
+ (WebCore::SVGScriptElement::SVGScriptElement):
+ (WebCore::SVGScriptElement::synchronizeProperty):
+ * svg/SVGScriptElement.h:
+ * svg/SVGStopElement.cpp:
+ (WebCore::SVGStopElement::SVGStopElement):
+ (WebCore::SVGStopElement::synchronizeProperty):
+ * svg/SVGStopElement.h:
+ * svg/SVGStyledElement.cpp:
+ (WebCore::SVGStyledElement::SVGStyledElement):
+ (WebCore::SVGStyledElement::parseMappedAttribute):
+ (WebCore::SVGStyledElement::synchronizeProperty):
+ * svg/SVGStyledElement.h:
+ * svg/SVGStyledTransformableElement.cpp:
+ (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
+ (WebCore::SVGStyledTransformableElement::synchronizeProperty):
+ * svg/SVGStyledTransformableElement.h:
+ * svg/SVGSwitchElement.cpp:
+ (WebCore::SVGSwitchElement::SVGSwitchElement):
+ (WebCore::SVGSwitchElement::synchronizeProperty):
+ * svg/SVGSwitchElement.h:
+ * svg/SVGSymbolElement.cpp:
+ (WebCore::SVGSymbolElement::SVGSymbolElement):
+ (WebCore::SVGSymbolElement::synchronizeProperty):
+ * svg/SVGSymbolElement.h:
+ * svg/SVGTRefElement.cpp:
+ (WebCore::SVGTRefElement::SVGTRefElement):
+ (WebCore::SVGTRefElement::synchronizeProperty):
+ * svg/SVGTRefElement.h:
+ * svg/SVGTextContentElement.cpp:
+ (WebCore::SVGTextContentElement::SVGTextContentElement):
+ (WebCore::SVGTextContentElement::synchronizeProperty):
+ * svg/SVGTextContentElement.h:
+ * svg/SVGTextElement.cpp:
+ (WebCore::SVGTextElement::SVGTextElement):
+ (WebCore::SVGTextElement::synchronizeProperty):
+ * svg/SVGTextElement.h:
+ * svg/SVGTextPathElement.cpp:
+ (WebCore::SVGTextPathElement::SVGTextPathElement):
+ (WebCore::SVGTextPathElement::synchronizeProperty):
+ * svg/SVGTextPathElement.h:
+ * svg/SVGTextPositioningElement.cpp:
+ (WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
+ (WebCore::SVGTextPositioningElement::synchronizeProperty):
+ * svg/SVGTextPositioningElement.h:
+ * svg/SVGURIReference.cpp:
+ * svg/SVGURIReference.h:
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::SVGUseElement):
+ (WebCore::SVGUseElement::synchronizeProperty):
+ * svg/SVGUseElement.h:
+ * svg/SVGViewElement.cpp:
+ (WebCore::SVGViewElement::SVGViewElement):
+ (WebCore::SVGViewElement::synchronizeProperty):
+ * svg/SVGViewElement.h:
+ * svg/SVGViewSpec.cpp:
+ (WebCore::SVGViewSpec::SVGViewSpec):
+ * svg/SVGViewSpec.h:
+ (WebCore::SVGViewSpec::contextElement):
+ * svg/SynchronizablePropertyController.cpp: Removed.
+ * svg/SynchronizablePropertyController.h: Removed.
+ * svg/SynchronizableTypeWrapper.h: Removed.
+ * svg/svgattrs.in: Remove "exportStrings" tag.
+ * svg/svgtags.in: Ditto.
+ * svg/xlinkattrs.in:
+
+2010-01-26 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for <rdar://problem/7169464> REGRESSION (r47444): PLT is 1% slower due to implementation of :valid and :invalid CSS selectors
+ https://bugs.webkit.org/show_bug.cgi?id=34029
+
+ If we never hit the valid or invalid selectors for a particular document,
+ then we'll skip the validity checks when deciding about style sharing.
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::canShareStyleWithElement):
+ (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
+
+ * dom/Document.cpp: (WebCore::Document::Document):
+ * dom/Document.h:
+ (WebCore::Document::considerValidity):
+ (WebCore::Document::setConsiderValidity):
+
+2010-01-26 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Simon Fraser.
+
+ Revert 53797 as it seems to be causing crashes.
+ https://bugs.webkit.org/show_bug.cgi?id=34153
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::useSlowRepaints):
+ (WebCore::FrameView::useSlowRepaintsIfNotOverlapped):
+ * page/FrameView.h:
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::scrollContents):
+ * platform/ScrollView.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::styleWillChange):
+ (WebCore::RenderObject::destroy):
+
+2010-01-26 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Steve Falkenburg.
+
+ DumpRenderTree silently crashes at the end of the run because geolocationControllerClient pointer is 0.
+ https://bugs.webkit.org/show_bug.cgi?id=34191
+
+ * page/GeolocationController.cpp:
+ (WebCore::GeolocationController::~GeolocationController): Add check for m_client being 0.
+ (WebCore::GeolocationController::addObserver): Ditto.
+ (WebCore::GeolocationController::removeObserver): Ditto.
+ (WebCore::GeolocationController::lastPosition): Ditto.
+
+2010-01-26 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Enhance externalRepresentation() to make it more useful for layer debugging
+ https://bugs.webkit.org/show_bug.cgi?id=34143
+
+ Enhance externalRepresentation() to output additional information about layers when certain flags are passed.
+ The new flags allow you to show all layers (not just those that would paint), to the structure of the z-order
+ and normal flow lists, and to show which layers are composited.
+
+ * WebCore.base.exp: The signature of externalRepresentation() changed.
+
+ * platform/text/TextStream.h: Add operator<<(void*)
+ * platform/text/TextStream.cpp: Implement operator<<(void*)
+
+ * rendering/RenderLayer.h:
+ * rendering/RenderLayer.cpp:
+ (showLayerTree): New method outside the WebCore namespace, for ease of calling from gdb.
+
+ * rendering/RenderTreeAsText.h: New behavior flags for externalRepresentation().
+ * rendering/RenderTreeAsText.cpp:
+ (WebCore::write): Output compositing information if requested. Also clean up some -1/1 magic
+ numbers with an enum.
+ (WebCore::writeLayers): If requested, show layer nesting via the z-order and normal flow lists.
+ (WebCore::externalRepresentation): New arguments
+
+2010-01-26 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Fixed an off-by-one error.
+
+ * rendering/break_lines.cpp:
+ (WebCore::shouldBreakAfter):
+
+2010-01-26 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by David Levin.
+
+ Avoid reloading iframe on re-parenting between documents.
+ https://bugs.webkit.org/show_bug.cgi?id=32848
+
+ Achieved by setting a flag on iframe element when it is a target of document.adoptNode(node) operation.
+ The flag prevents unload/load cycle and is reset once element is attached to a new document.
+ If iframe is adopted but not actually inserted into the tree, it gets unloaded by async timer
+ once JS yields, to avoid having active content in non-attached iframe.
+
+ Test: fast/frames/iframe-reparenting.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::adoptNode): If the adopted node is iframe, set a remainsAliveOnRemovalFromTree on it.
+ * html/HTMLFrameElementBase.h:
+ * html/HTMLFrameElementBase.cpp:
+ (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
+ (WebCore::HTMLFrameElementBase::attach): Skip actual loading of the frame if it has remainsAliveOnRemovalFromTree flag. Reset the flag.
+ (WebCore::HTMLFrameElementBase::willRemove): Skip unloading the frame if it has remainsAliveOnRemovalFromTree flag set.
+ (WebCore::HTMLFrameElementBase::setRemainsAliveOnRemovalFromTree): Set the flag, start the async timer to check if the frame was actually attached.
+ (WebCore::HTMLFrameElementBase::checkAttachedTimerFired):
+ * html/HTMLFrameOwnerElement.h:
+ (WebCore::HTMLFrameOwnerElement::willRemove): Move from private to protected, since it is conditionally called in HTMLFrameElementBase::willRemove now.
+
+2010-01-26 Adam Roben <aroben@apple.com>
+
+ No review, rolling out r53861.
+ http://trac.webkit.org/changeset/53861
+ https://bugs.webkit.org/show_bug.cgi?id=33224
+
+ Caused 2 regression tests to fail.
+
+ * dom/Document.cpp:
+ (WebCore::Document::detach):
+ (WebCore::Document::registerHistoryItem):
+ (WebCore::Document::unregisterHistoryItem):
+ * dom/Document.h:
+ * history/BackForwardList.cpp:
+ (WebCore::BackForwardList::pushStateItem):
+ * history/BackForwardListChromium.cpp:
+ (WebCore::BackForwardList::pushStateItem):
+ * history/HistoryItem.cpp:
+ (WebCore::HistoryItem::HistoryItem):
+ (WebCore::HistoryItem::~HistoryItem):
+ (WebCore::HistoryItem::setStateObject):
+ (WebCore::HistoryItem::setDocument):
+ (WebCore::HistoryItem::documentDetached):
+ * history/HistoryItem.h:
+ (WebCore::HistoryItem::document):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::navigateWithinDocument):
+ (WebCore::FrameLoader::loadItem):
+ * loader/HistoryController.cpp:
+ (WebCore::HistoryController::updateBackForwardListForFragmentScroll):
+ (WebCore::HistoryController::pushState):
+ (WebCore::HistoryController::replaceState):
+ * loader/RedirectScheduler.cpp:
+ (WebCore::RedirectScheduler::scheduleHistoryNavigation):
+ * page/History.cpp:
+ (WebCore::History::stateObjectAdded):
+ * page/Page.cpp:
+ (WebCore::Page::goToItem):
+
+2010-01-26 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ <rdar://problem/7576663> Crash caused by anonymous list item
+ https://bugs.webkit.org/show_bug.cgi?id=34183
+
+ Test: fast/lists/anonymous-items.html
+
+ enclosingList() and previousListItem() were DOM-based, but in order to work with anonymous
+ list items, they need to work with rthe render tree.
+
+ * rendering/RenderListItem.cpp:
+ (WebCore::isList): Factored out.
+ (WebCore::enclosingList): Added this variant that takes a RenderObject.
+ (WebCore::previousListItem): Changed to travers the render tree.
+ (WebCore::RenderListItem::calcValue): Use the RenderObject version of enclosingList()
+ (WebCore::RenderListItem::setExplicitValue): Added an assertion.
+ (WebCore::RenderListItem::clearExplicitValue): Ditto.
+
+2010-01-26 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Crash in WebKit!WebCore::RenderMenuList::itemStyle
+ https://bugs.webkit.org/show_bug.cgi?id=34182
+ <rdar://7087757>
+
+ Added bounds checks in RenderMenuList to make sure we are
+ not making an out of bounds check in a vector once an option
+ element has been deleted. If we are out of bounds, we fall back to
+ a default value and return early, and in the case of itemStyle, we use a
+ previous option's style, if it is available.
+
+ * manual-tests/select-delete-item.html: Added.
+ * rendering/RenderMenuList.cpp:
+ (WebCore::RenderMenuList::itemText): If out of bounds check, return early.
+ (WebCore::RenderMenuList::itemToolTip): Ditto.
+ (WebCore::RenderMenuList::itemIsEnabled): Ditto.
+ (WebCore::RenderMenuList::itemStyle): If out of bounds check, try using the 0th index
+ option style, then fall back to the select's style if that option doesn't exist.
+ (WebCore::RenderMenuList::itemBackgroundColor): If out of bounds check, return early.
+ (WebCore::RenderMenuList::itemIsSeparator): Ditto.
+ (WebCore::RenderMenuList::itemIsLabel): Ditto.
+ (WebCore::RenderMenuList::itemIsSelected): Ditto.
+
+2010-01-25 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Some methods in JSC JNI bridge need more error checking of results from JNI.
+ https://bugs.webkit.org/show_bug.cgi?id=34149
+
+ In JNIUtility.h, callJNIMethodV<jobject> might return null (from CallObjectMethodV, via
+ JNICaller<jobject>::callV) if an exception is thrown. All clients of callJNIMethodV<jobject>
+ that are calling methods on the returned object should null check first.
+
+ * bridge/jni/JNIBridge.cpp:
+ (JavaField::JavaField):
+ (JavaMethod::JavaMethod):
+ * bridge/jni/JNIUtility.h:
+ (JSC::Bindings::):
+ * bridge/jni/jni_jsobject.mm:
+ (JavaJSObject::convertJObjectToValue):
+ * bridge/jni/jsc/JavaClassJSC.cpp:
+ (JavaClass::JavaClass):
+ * bridge/jni/jsc/JavaInstanceJSC.cpp:
+ (JavaInstance::stringValue):
+
+2010-01-26 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Windows build references non-existent include paths
+ https://bugs.webkit.org/show_bug.cgi?id=34175
+
+ * WebCore.vcproj/QTMovieWin.vcproj:
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+
+2010-01-26 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Brady Eidson.
+
+ Chains of history items representing same-document navigation need to
+ always remember that association
+
+ https://bugs.webkit.org/show_bug.cgi?id=33224
+
+ Replace HistoryItem's Document pointer with a DocumentSequenceNumber.
+ During session history traversal, if the current HistoryItem and the
+ target HistoryItem have the same DocumentSequenceNumber, then it means
+ that the current Document should remain.
+
+ NOTE: To support Chromium's serialization of HistoryItems, I generate
+ DocumentSequenceNumbers that are unique across application launches.
+ DocumentSequenceNumbers are generated using a counter initialized with
+ the time of day.
+
+ Test: fast/loader/stateobjects/document-destroyed-navigate-back.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::detach):
+ * dom/Document.h:
+ * history/BackForwardList.cpp:
+ (WebCore::BackForwardList::pushStateItem):
+ * history/BackForwardListChromium.cpp:
+ (WebCore::BackForwardList::pushStateItem):
+ * history/HistoryItem.cpp:
+ (WebCore::generateDocumentSequenceNumber):
+ (WebCore::HistoryItem::HistoryItem):
+ (WebCore::HistoryItem::~HistoryItem):
+ (WebCore::HistoryItem::setStateObject):
+ * history/HistoryItem.h:
+ (WebCore::HistoryItem::setDocumentSequenceNumber):
+ (WebCore::HistoryItem::documentSequenceNumber):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::navigateWithinDocument):
+ (WebCore::FrameLoader::loadItem):
+ * loader/HistoryController.cpp:
+ (WebCore::HistoryController::updateBackForwardListForFragmentScroll):
+ (WebCore::HistoryController::pushState):
+ (WebCore::HistoryController::replaceState):
+ * loader/RedirectScheduler.cpp:
+ (WebCore::RedirectScheduler::scheduleHistoryNavigation):
+ * page/History.cpp:
+ (WebCore::History::stateObjectAdded):
+ * page/Page.cpp:
+ (WebCore::Page::goToItem):
+
+2010-01-26 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add ability for image maps to be focused via tabbing
+ https://bugs.webkit.org/show_bug.cgi?id=17513
+
+ Test: fast/events/tab-imagemap.html
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::focusedImageMapUIElement):
+ (WebCore::AXObjectCache::focusedUIElementForPage):
+ * accessibility/AXObjectCache.h:
+ * accessibility/AccessibilityImageMapLink.h:
+ (WebCore::AccessibilityImageMapLink::areaElement):
+ (WebCore::AccessibilityImageMapLink::mapElement):
+ (WebCore::AccessibilityImageMapLink::isImageMapLink):
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::isImageMapLink):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap):
+ * html/HTMLAreaElement.cpp:
+ (WebCore::HTMLAreaElement::getPath):
+ (WebCore::HTMLAreaElement::getRect):
+ (WebCore::HTMLAreaElement::imageElement):
+ (WebCore::HTMLAreaElement::isKeyboardFocusable):
+ (WebCore::HTMLAreaElement::isFocusable):
+ (WebCore::HTMLAreaElement::dispatchBlurEvent):
+ (WebCore::HTMLAreaElement::updateFocusAppearance):
+ (WebCore::HTMLAreaElement::supportsFocus):
+ * html/HTMLAreaElement.h:
+ * html/HTMLMapElement.cpp:
+ (WebCore::HTMLMapElement::imageElement):
+ * html/HTMLMapElement.h:
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::drawFocusRing):
+ * platform/graphics/haiku/GraphicsContextHaiku.cpp:
+ (WebCore::GraphicsContext::drawFocusRing):
+ * platform/graphics/mac/GraphicsContextMac.mm:
+ (WebCore::drawFocusRingToContext):
+ (WebCore::GraphicsContext::drawFocusRing):
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::drawFocusRing):
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::drawFocusRing):
+ * platform/graphics/win/GraphicsContextCGWin.cpp:
+ (WebCore::GraphicsContext::drawFocusRing):
+ * platform/graphics/wince/GraphicsContextWince.cpp:
+ (WebCore::GraphicsContext::drawFocusRing):
+ * platform/graphics/wx/GraphicsContextWx.cpp:
+ (WebCore::GraphicsContext::drawFocusRing):
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::paint):
+ (WebCore::RenderImage::paintFocusRings):
+ (WebCore::RenderImage::imageMap):
+ * rendering/RenderImage.h:
+ * rendering/RenderReplaced.h:
+
+2010-01-26 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: add support for breakpoints, messages and search into the SourceFrame2.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34165
+
+ * inspector/front-end/SourceFrame2.js:
+ (WebInspector.SourceFrame2):
+ (WebInspector.SourceFrame2.prototype.get executionLine):
+ (WebInspector.SourceFrame2.prototype.set executionLine):
+ (WebInspector.SourceFrame2.prototype.revealLine):
+ (WebInspector.SourceFrame2.prototype.addBreakpoint):
+ (WebInspector.SourceFrame2.prototype.removeBreakpoint):
+ (WebInspector.SourceFrame2.prototype.sizeToFitContentHeight):
+ (WebInspector.SourceFrame2.prototype.setContent):
+ (WebInspector.SourceFrame2.prototype.findSearchMatches):
+ (WebInspector.SourceFrame2.prototype.setSelection):
+ (WebInspector.SourceFrame2.prototype._addMessageToSource):
+ (WebInspector.SourceFrame2.prototype._addExistingBreakpointsToSource):
+ (WebInspector.SourceFrame2.prototype._addBreakpointToSource):
+ (WebInspector.SourceFrame2.prototype._removeBreakpointFromSource):
+ (WebInspector.SourceFrame2.prototype._contextMenu.addConditionalBreakpoint):
+ (WebInspector.SourceFrame2.prototype._contextMenu):
+ (WebInspector.SourceFrame2.prototype._toggleBreakpoint):
+ (WebInspector.SourceFrame2.prototype._editBreakpointCondition.committed):
+ (WebInspector.SourceFrame2.prototype._editBreakpointCondition.dismissed):
+ (WebInspector.SourceFrame2.prototype._editBreakpointCondition):
+ (WebInspector.SourceFrame2.prototype._showBreakpointConditionPopup):
+ (WebInspector.SourceFrame2.prototype._createConditionElement):
+ (WebInspector.SourceFrame2.prototype._keyDown):
+ (WebInspector.SourceFrame2.prototype._evalSelectionInCallFrame):
+ (WebInspector.SourceFrame2.prototype._breakpointChanged):
+ (WebInspector.SourceFrame2.prototype.resize):
+ (WebInspector.BreakpointLineNumberDecorator.prototype.decorate):
+ (WebInspector.BreakpointLineNumberDecorator.prototype._paintBreakpoint):
+ (WebInspector.BreakpointLineNumberDecorator.prototype.mouseDown):
+ (WebInspector.BreakpointLineNumberDecorator.prototype.contextMenu):
+ (WebInspector.ExecutionLineDecorator.prototype.decorate):
+ * inspector/front-end/TextEditor.js:
+ (WebInspector.TextEditor):
+ (WebInspector.TextEditor.prototype.set mimeType):
+ (WebInspector.TextEditor.prototype.set readOnly):
+ (WebInspector.TextEditor.prototype.setDivDecoration):
+ (WebInspector.TextEditor.prototype.reveal):
+ (WebInspector.TextEditor.prototype.packAndRepaintAll):
+ (WebInspector.TextEditor.prototype._updateSize):
+ (WebInspector.TextEditor.prototype.updateCanvasSize):
+ (WebInspector.TextEditor.prototype.repaintAll):
+ (WebInspector.TextEditor.prototype._paintLinesContinuation):
+ (WebInspector.TextEditor.prototype._repaintOnScroll):
+ (WebInspector.TextEditor.prototype._mouseDown):
+ (WebInspector.TextEditor.prototype._contextMenu):
+ (WebInspector.TextEditor.prototype._caretForMouseEvent):
+ (WebInspector.TextEditor.prototype._columnForOffset):
+ (WebInspector.TextEditor.prototype._handleNavigationKey):
+ (WebInspector.TextEditor.prototype._positionDivDecoration):
+ (WebInspector.TextEditor.prototype._replaceSelectionWith):
+ (WebInspector.TextEditor.prototype.setCoalescingUpdate):
+ (WebInspector.TextEditor.prototype._handleUndo):
+ (WebInspector.TextEditor.prototype._handleRedo):
+ (WebInspector.TextEditor.prototype._changeFont):
+ * inspector/front-end/TextEditorHighlighter.js:
+ (WebInspector.TextEditorHighlighter):
+ (WebInspector.TextEditorHighlighter.prototype.set mimeType):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/textEditor.css:
+
+2010-01-26 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: add methods for getting resource content from within frontend.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34163
+
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::getResourceContent):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::didGetResourceContent):
+ * inspector/InspectorFrontend.h:
+ * inspector/InspectorFrontendHost.cpp:
+ * inspector/InspectorFrontendHost.h:
+ * inspector/InspectorFrontendHost.idl:
+ * inspector/front-end/InspectorBackendStub.js:
+ (.WebInspector.InspectorBackendStub.prototype.getResourceContent):
+ * inspector/front-end/InspectorFrontendHostStub.js:
+
+2010-01-26 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed: added null check into the timeline agent getter.
+
+ * inspector/InspectorTimelineAgent.h:
+ (WebCore::InspectorTimelineAgent::retrieve):
+
+2010-01-26 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ Moves JSC-specific classes from bridge/jni/JNIBridge to bridge/jni/jsc/JNIBridgeJSC
+ https://bugs.webkit.org/show_bug.cgi?id=33958
+
+ This allows bridge/jni/JNIBridge to be used with both JSC and V8.
+ A later change will add the V8 equivalent of these JSC-specific classes.
+
+ No new tests, refactoring only.
+
+ * Android.jscbindings.mk: Modified. Added JNIBridgeJSC.cpp
+ * GNUmakefile.am: Modified. Added JNIBridgeJSC.h
+ * WebCore.xcodeproj/project.pbxproj: Modified. Added JNIBridgeJSC.[cpp|h]
+ * bridge/jni/JNIBridge.cpp: Modified. Moved JavaField and JavaArray to JNIBridgeJSC.cpp
+ (appendClassName): Modfied. Guard calls to JSLock
+ (JavaMethod::signature): Modfied. Guard calls to JSLock
+ * bridge/jni/JNIBridge.h: Modified. Moved JavaField and JavaArray to JNIBridgeJSC.h
+ * bridge/jni/jsc/JNIBridgeJSC.cpp: Copied from WebCore/bridge/jni/JNIBridge.cpp.
+ * bridge/jni/jsc/JNIBridgeJSC.h: Copied from WebCore/bridge/jni/JNIBridge.h.
+ * bridge/jni/jsc/JNIUtilityPrivate.cpp: Modified. Include JNIBridgeJSC.h
+ * bridge/jni/jsc/JavaClassJSC.h: Modified. Include JNIBridgeJSC.h
+ * bridge/jni/jsc/JavaInstanceJSC.cpp: Modified. Include JNIBridgeJSC.h
+
+2010-01-26 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Unreviewed build fix.
+
+ [Qt] Fix Windows build when sqlite is not available.
+
+ * WebCore.pri:
+ * WebCore.pro:
+
+2010-01-26 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] JavaScript prompt is currently broken.
+ https://bugs.webkit.org/show_bug.cgi?id=30914
+
+ Remove the manual test case in favor of an automated
+ test case in WebKit/qt/tests/qwebpage.
+
+ * manual-tests/qt/java-script-prompt.html: Removed.
+
+2010-01-26 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Implement HTML and CSS highlighters.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34144
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/JavaScriptTokenizer.js: Removed.
+ * inspector/front-end/JavaScriptTokenizer.re2js: Removed.
+ * inspector/front-end/SourceCSSTokenizer.js: Added.
+ (WebInspector.SourceCSSTokenizer):
+ (WebInspector.SourceCSSTokenizer.prototype._stringToken):
+ (WebInspector.SourceCSSTokenizer.prototype._isPropertyValue):
+ (WebInspector.SourceCSSTokenizer.prototype.nextToken):
+ * inspector/front-end/SourceCSSTokenizer.re2js: Added.
+ * inspector/front-end/SourceHTMLTokenizer.js: Added.
+ (WebInspector.SourceHTMLTokenizer):
+ (WebInspector.SourceHTMLTokenizer.prototype._stringToken):
+ (WebInspector.SourceHTMLTokenizer.prototype.nextToken):
+ * inspector/front-end/SourceHTMLTokenizer.re2js: Added.
+ * inspector/front-end/SourceJavaScriptTokenizer.js: Added.
+ (WebInspector.SourceJavaScriptTokenizer):
+ (WebInspector.SourceJavaScriptTokenizer.prototype.nextToken):
+ * inspector/front-end/SourceJavaScriptTokenizer.re2js: Added.
+ * inspector/front-end/TextEditorHighlighter.js:
+ (WebInspector.TextEditorHighlighter):
+ (WebInspector.TextEditorHighlighter.prototype._highlightLines):
+ (WebInspector.TextEditorHighlighter.Tokenizer):
+ (WebInspector.TextEditorHighlighter.Tokenizer.prototype.set line):
+ (WebInspector.TextEditorHighlighter.Tokenizer.prototype.set condition):
+ (WebInspector.TextEditorHighlighter.Tokenizer.prototype.get condition):
+ (WebInspector.TextEditorHighlighter.Tokenizer.prototype.hasCondition):
+ (WebInspector.TextEditorHighlighter.Tokenizer.prototype.getLexCondition):
+ (WebInspector.TextEditorHighlighter.Tokenizer.prototype.setLexCondition):
+ (WebInspector.TextEditorHighlighter.Tokenizer.prototype._charAt):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+
+2010-01-26 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ REGRESSION(r53835): Fix editing/pasteboard/paste-noscript-xhtml.xhtml
+ https://bugs.webkit.org/show_bug.cgi?id=34157
+
+ Pass the FragmentScriptingPermission correctly through to the DOM
+ and disallow scripting elements in parseEndElement(), similar to
+ the libxml tokenizer change in r53835.
+
+ * dom/XMLTokenizerQt.cpp:
+ (WebCore::handleElementNamespaces):
+ (WebCore::handleElementAttributes):
+ (WebCore::XMLTokenizer::parseStartElement):
+ (WebCore::XMLTokenizer::parseEndElement):
+
+2010-01-26 Garret Kelly <gdk@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Add missing declaration for the feMorphology SVG element.
+ https://bugs.webkit.org/show_bug.cgi?id=34151
+
+ * bindings/v8/V8DOMWrapper.cpp:
+
+2010-01-26 Andras Becsi <abecsi@inf.u-szeged.hu>
+
+ Unreviewed build fix.
+
+ [Qt] Build fix after API changes in r53835.
+
+ No new tests needed.
+
+ * dom/XMLTokenizerQt.cpp:
+ (WebCore::XMLTokenizer::XMLTokenizer):
+ (WebCore::parseXMLDocumentFragment):
+
+2010-01-22 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Make storage events match the spec.
+ https://bugs.webkit.org/show_bug.cgi?id=30546
+
+ This meat of the patch I just posted is very simple. It's just making events
+ asynchronous, not posting them to the frame that generated them, passing a null
+ for the key when issuing a clear storage event, and making the events
+ non-cancelable/non-bubbleable...all of which are clearly stated in the spec.
+
+ The asynchronous and not posting to the frame that generated them forced me to
+ re-write all the layout tests that dealt with storage events. There's a lot of
+ code there, but I tried to be fairly careful to ensure that test coverage did
+ not shrink in any area.
+
+ Tests: storage/domstorage/events/basic-body-attribute.html
+ storage/domstorage/events/basic-setattribute.html
+ storage/domstorage/events/basic.html
+ storage/domstorage/events/case-sensitive.html
+ storage/domstorage/events/documentURI.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::Document):
+ (WebCore::Document::enqueueStorageEvent):
+ (WebCore::Document::storageEventTimerFired):
+ * dom/Document.h:
+ * storage/StorageEvent.cpp:
+ (WebCore::StorageEvent::StorageEvent):
+ * storage/StorageEvent.idl:
+ * storage/StorageEventDispatcher.cpp:
+ (WebCore::StorageEventDispatcher::dispatch):
+
+2010-01-25 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7573493> Error with line break inside ?&raquo; pair of characters.
+ https://bugs.webkit.org/show_bug.cgi?id=17475
+
+ Test: fast/text/line-break-after-question-mark.html
+
+ Instead of unconditionally allowing lines to break after a question mark, which was intended
+ to mimic Internet Explorer, apply the Unicode line breaking behavior after a question mark,
+ with one exception in the ASCII range to match IE, namely not allowing a line break between
+ a question mark and a vertical line.
+
+ * rendering/break_lines.cpp:
+ (WebCore::shouldBreakAfter): Added a next character parameter. Changed to consult a table
+ for the question mark case in order to keep it fast and not require a text break iterator in
+ the ASCII case.
+ (WebCore::nextBreakablePosition): Pass the next character to shouldBreakAfter.
+
+2010-01-25 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Dan Bernstein.
+
+ Mac scrollbar thumbs were drawn with the wrong size.
+ https://bugs.webkit.org/show_bug.cgi?id=34049
+
+ * platform/chromium/ScrollbarThemeChromiumMac.mm:
+ (WebCore::ScrollbarThemeChromiumMac::paint):
+ * platform/mac/ScrollbarThemeMac.mm:
+ (WebCore::ScrollbarThemeMac::paint):
+
+2010-01-25 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Cleanup unwanted tags after pasting.
+ https://bugs.webkit.org/show_bug.cgi?id=34148
+
+ Test: editing/pasteboard/paste-noscript-xhtml.xhtml
+
+ * dom/Element.cpp:
+ (WebCore::Element::setAttributeNS):
+ * dom/Element.h:
+ * dom/XMLTokenizer.h:
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::XMLTokenizer::XMLTokenizer):
+ (WebCore::handleElementNamespaces):
+ (WebCore::handleElementAttributes):
+ (WebCore::XMLTokenizer::startElementNs):
+ (WebCore::XMLTokenizer::endElementNs):
+ (WebCore::parseXMLDocumentFragment):
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::createContextualFragment):
+
+2010-01-25 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ A WebGeolocationControllerClient is leaked for every WebView
+ https://bugs.webkit.org/show_bug.cgi?id=34145
+
+ * page/GeolocationController.cpp:
+ (WebCore::GeolocationController::~GeolocationController):
+ * page/GeolocationControllerClient.h:
+
+2010-01-25 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Fixed bug in positioning of scroll layer within the
+ parent root layer.
+ https://bugs.webkit.org/show_bug.cgi?id=33847
+
+ * platform/graphics/win/WKCACFLayerRenderer.cpp:
+ (WebCore::WKCACFLayerRenderer::setScrollFrame):
+ (WebCore::WKCACFLayerRenderer::createRenderer):
+
+2010-01-25 Alexey Proskuryakov <ap@apple.com>
+
+ Rubber-stamped by Geoffrey Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34076
+ An image remains accessible via form.property syntax after being removed from document.
+
+ Fix crashing regression tests (tables/mozilla/bugs/bug4527.html et al.)
+
+ * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::insertedIntoTree): Remove incorrect
+ assertions added in the previous patch - it's mot true that m_for is always a parent; table
+ parsing can reparent the image element, but m_form still needs to be set.
+
+2010-01-25 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34076
+ An image remains accessible via form.property syntax after being removed from document.
+
+ Tests: fast/forms/removed-image-as-property.html
+ fast/forms/reparented-image-as-property.html
+
+ * html/HTMLImageElement.cpp:
+ (WebCore::HTMLImageElement::~HTMLImageElement): This is called during GC - not a good time
+ to make observable changes to DOM.
+ (WebCore::HTMLImageElement::insertedIntoTree): This is the right place to do any work that
+ depends on connectedness to some ancestor. We still allow for m_form to be set via constructor,
+ which happens during parsing.
+ (WebCore::HTMLImageElement::removedFromTree): Ditto.
+
+ * html/HTMLImageElement.h: Added removedFromTree/insertedIntoTree, moved removedFromDocument
+ and insertedIntoDocument to private section, as they shouldn't be called directly.
+
+2010-01-25 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34073
+
+ Fixes misspelled words in comments.
+
+ * accessibility/AccessibilityListBox.cpp:
+ (WebCore::AccessibilityListBox::addChildren):
+ (WebCore::AccessibilityListBox::doAccessibilityHitTest):
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper detach]):
+ (AXAttributeStringSetElement):
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::completeURL):
+ * bindings/js/JSDOMWindowBase.cpp:
+ * bindings/js/JSDOMWindowBase.h:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::getOwnPropertySlot):
+ * bindings/js/JSSVGPODTypeWrapper.h:
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluateInWorld):
+ * bridge/NP_jsobject.cpp:
+ (_NPN_SetException):
+ * bridge/jni/jsc/JavaInstanceJSC.cpp:
+ (JavaInstance::invokeMethod):
+ (JObjectWrapper::JObjectWrapper):
+ * bridge/objc/objc_instance.mm:
+ (ObjcInstance::setValueOfUndefinedField):
+ (ObjcInstance::getValueOfUndefinedField):
+ * css/CSSFontSelector.cpp:
+ (WebCore::CSSFontSelector::addFontFaceRule):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::CSSStyleSelector):
+ (WebCore::CSSStyleSelector::sortMatchedRules):
+ (WebCore::CSSStyleSelector::applyDeclarations):
+ (WebCore::CSSStyleSelector::applyProperty):
+ * dom/Document.cpp:
+ (WebCore::Document::updateLayoutIgnorePendingStylesheets):
+ (WebCore::Document::detach):
+ * dom/Document.h:
+ * dom/Element.cpp:
+ (WebCore::Element::updateFocusAppearance):
+ * dom/Element.h:
+ * dom/MessagePortChannel.h:
+ * dom/MouseRelatedEvent.cpp:
+ (WebCore::MouseRelatedEvent::receivedTarget):
+ * dom/Node.cpp:
+ (WebCore::Node::isFocusable):
+ (WebCore::Node::shadowAncestorNode):
+ * dom/Node.h:
+ * dom/Position.cpp:
+ (WebCore::Position::upstream):
+ * dom/Position.h:
+ * dom/Range.cpp:
+ (WebCore::Range::processContents):
+ * dom/StyledElement.cpp:
+ (WebCore::StyledElement::addCSSColor):
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::StyleChange::reconcileTextDecorationProperties):
+ (WebCore::StyleChange::extractTextStyles):
+ (WebCore::prepareEditingStyleToApplyAt):
+ * editing/DeleteButtonController.cpp:
+ (WebCore::isDeletableElement):
+ * editing/DeleteSelectionCommand.cpp:
+ (WebCore::DeleteSelectionCommand::initializeStartEnd):
+ * editing/Editor.cpp:
+ (WebCore::Editor::learnSpelling):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleMessage.prototype._format):
+ * loader/Cache.cpp:
+ (WebCore::Cache::pruneLiveResources):
+ (WebCore::Cache::pruneDeadResources):
+ * loader/Cache.h:
+ * loader/CachedResource.cpp:
+ (WebCore::CachedResource::makePurgeable):
+ * loader/CachedResource.h:
+ * loader/CachedResourceHandle.h:
+ * loader/DocumentLoader.h:
+ * loader/FTPDirectoryParser.cpp:
+ (WebCore::parseOneFTPLine):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::didExplicitOpen):
+ * loader/ResourceLoader.cpp:
+ (WebCore::ResourceLoader::didCancel):
+ * loader/WorkerThreadableLoader.h:
+ * loader/appcache/ApplicationCacheStorage.cpp:
+ (WebCore::ApplicationCacheStorage::spaceNeeded):
+ * notifications/NotificationPresenter.h:
+ (WebCore::NotificationPresenter::):
+ * page/animation/AnimationController.cpp:
+ (WebCore::AnimationController::updateAnimations):
+ * platform/LinkHash.cpp:
+ (WebCore::cleanPath):
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::calculateDrawingMode):
+ * platform/graphics/cg/PatternCG.cpp:
+ (WebCore::Pattern::createPlatformPattern):
+ * platform/graphics/mac/ComplexTextController.cpp:
+ (WebCore::ComplexTextController::offsetForPosition):
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::ensureStructuralLayer):
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::doSeek):
+ (WebCore::MediaPlayerPrivate::setClosedCaptionsVisible):
+ (WebCore::MediaPlayerPrivate::hasAvailableVideoFrame):
+ * platform/mac/PasteboardMac.mm:
+ (WebCore::Pasteboard::writeSelection):
+ (WebCore::Pasteboard::writePlainText):
+ (WebCore::Pasteboard::writeURL):
+ * platform/text/TextCodecICU.cpp:
+ (WebCore::TextCodecICU::registerExtendedEncodingNames):
+ * platform/text/TextEncodingDetectorICU.cpp:
+ (WebCore::detectTextEncoding):
+ * rendering/AutoTableLayout.cpp:
+ (WebCore::AutoTableLayout::calcEffectiveWidth):
+ (WebCore::AutoTableLayout::layout):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::calcAbsoluteHorizontalValues):
+ (WebCore::RenderBox::calcAbsoluteVerticalValues):
+ (WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
+ (WebCore::RenderBox::calcAbsoluteVerticalReplaced):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::scrollByRecursively):
+ (WebCore::RenderLayer::paintLayer):
+ (WebCore::RenderLayer::hitTestLayer):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::destroy):
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::setInnerTextValue):
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::stateChanged):
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderBase::mapLocalToContainer):
+ * rendering/SVGRootInlineBox.cpp:
+ (WebCore::SVGRootInlineBox::buildTextChunks):
+ * rendering/TransformState.cpp:
+ (WebCore::TransformState::flattenWithTransform):
+ * wml/WMLInputElement.cpp:
+ (WebCore::WMLInputElement::dispatchBlurEvent):
+ (WebCore::WMLInputElement::suggestedValue):
+
+2010-01-25 Geoffrey Garen <ggaren@apple.com>
+
+ Suggested by Darin Adler.
+
+ Fixed a spelling error, tightened up some grammar.
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::forgetDOMObject):
+ (WebCore::forgetDOMNode):
+
+2010-01-25 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Instead of adding inspector methods to the inspected global objects
+ use private implementation visible from inspector code only.
+ https://bugs.webkit.org/show_bug.cgi?id=34089
+
+ Test: inspector/inspected-objects-not-overriden.html
+
+ * inspector/front-end/InjectedScript.js:
+ (injectedScriptConstructor):
+
+2010-01-25 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: don't show headers/content tabs in scripts view.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34083
+
+ * inspector/front-end/ResourceView.js:
+ (WebInspector.ResourceView):
+ (WebInspector.ResourceView.prototype.set headersVisible):
+ (WebInspector.ResourceView.prototype._selectContentTab):
+ (WebInspector.ResourceView.prototype._innerSelectContentTab):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype.show):
+ (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded):
+ (WebInspector.ResourcesPanel.prototype.showResource):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.show):
+ (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
+ * inspector/front-end/inspector.css:
+
+2010-01-25 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Reduce the size of the library when compiling for Maemo5
+ https://bugs.webkit.org/show_bug.cgi?id=34050
+
+ Exclude the Web Inspector's qrc file in the Maemo5 build, just
+ like we do for the Symbian build. Saves about ~900k.
+
+ * WebCore.pro:
+
+2010-01-25 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] In the StyledPainter determine the style from the Render and Scrollbar theme instead of from the paint device
+ https://bugs.webkit.org/show_bug.cgi?id=34054
+
+ Getting the style from the painter's paint device is a hack that breaks when
+ the paint device's style is different than the style that is used when
+ calculating the metries earlier when there is no painter available.
+
+ This change moves us closer to always using the same style.
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::StylePainter::StylePainter):
+ (WebCore::StylePainter::init):
+ (WebCore::RenderThemeQt::paintButton):
+ (WebCore::RenderThemeQt::paintTextField):
+ (WebCore::RenderThemeQt::paintMenuList):
+ (WebCore::RenderThemeQt::paintMenuListButton):
+ (WebCore::RenderThemeQt::paintSliderTrack):
+ (WebCore::RenderThemeQt::paintMediaMuteButton):
+ (WebCore::RenderThemeQt::paintMediaPlayButton):
+ (WebCore::RenderThemeQt::paintMediaSliderTrack):
+ (WebCore::RenderThemeQt::paintMediaSliderThumb):
+ * platform/qt/RenderThemeQt.h:
+ * platform/qt/ScrollbarThemeQt.cpp:
+ (WebCore::ScrollbarThemeQt::paint):
+ (WebCore::ScrollbarThemeQt::hitTest):
+ (WebCore::ScrollbarThemeQt::shouldCenterOnThumb):
+ (WebCore::ScrollbarThemeQt::scrollbarThickness):
+ (WebCore::ScrollbarThemeQt::thumbLength):
+ (WebCore::ScrollbarThemeQt::trackPosition):
+ (WebCore::ScrollbarThemeQt::trackLength):
+ (WebCore::ScrollbarThemeQt::paintScrollCorner):
+ (WebCore::ScrollbarThemeQt::style):
+ * platform/qt/ScrollbarThemeQt.h:
+
+2010-01-25 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] In RenderThemeQt determine the QStyle from the page client instead of the page's view
+ https://bugs.webkit.org/show_bug.cgi?id=34053
+
+ * platform/qt/QWebPageClient.h: Add function to return the style.
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::qStyle): Determine the style from the page client instead of the page's view.
+
+2010-01-25 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Kenneth Christiansen.
+
+ [Qt] Clean up code to determine palette from page client in RenderThemeQt
+ https://bugs.webkit.org/show_bug.cgi?id=34052
+
+ Use the RenderTheme's associated page instead of going through the
+ render tree and the document.
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::setPaletteFromPageClientIfExists):
+ (WebCore::RenderThemeQt::initializeCommonQStyleOptions):
+ * platform/qt/RenderThemeQt.h:
+
+2010-01-25 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Phone backup support for QtWebkit for Symbian devices.
+ https://bugs.webkit.org/show_bug.cgi?id=34077
+
+ * WebCore.pro:
+
+2010-01-25 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Antti Koivisto.
+
+ Do not render the full frame when there is some elements with fixed positioning
+ https://bugs.webkit.org/show_bug.cgi?id=33150
+
+ Do not render the full frame when there is some elements with fixed positioning
+ https://bugs.webkit.org/show_bug.cgi?id=33150
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::useSlowRepaints):
+ (WebCore::FrameView::useSlowRepaintsIfNotOverlapped):
+ (WebCore::FrameView::registerFixedPositionedObject):
+ (WebCore::FrameView::unregisterFixedPositionedObject):
+ (WebCore::FrameView::scrollContentsFastPath):
+ * page/FrameView.h:
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::scrollContents):
+ (WebCore::ScrollView::scrollContentsFastPath):
+ * platform/ScrollView.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::styleWillChange):
+ (WebCore::RenderObject::destroy):
+
+2010-01-24 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Add support for addMessage/clearMessages to SourceFrame2.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33904
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/SourceFrame2.js:
+ (WebInspector.SourceFrame2):
+ (WebInspector.SourceFrame2.prototype.addMessage):
+ (WebInspector.SourceFrame2.prototype.clearMessages):
+ (WebInspector.SourceFrame2.prototype._incrementMessageRepeatCount):
+ (WebInspector.SourceFrame2.prototype._addExistingMessagesToSource):
+ (WebInspector.SourceFrame2.prototype._addMessageToSource):
+ (WebInspector.SourceFrame2.prototype.resize):
+ * inspector/front-end/TextEditor.js:
+ (WebInspector.TextEditor):
+ (WebInspector.TextEditor.prototype.setDivDecoration):
+ (WebInspector.TextEditor.prototype._lineHeight):
+ (WebInspector.TextEditor.prototype._highlightChanged):
+ (WebInspector.TextEditor.prototype.packAndRepaintAll):
+ (WebInspector.TextEditor.prototype._updateSize):
+ (WebInspector.TextEditor.prototype._repaintAll):
+ (WebInspector.TextEditor.prototype._paint):
+ (WebInspector.TextEditor.prototype._paintLinesContinuation):
+ (WebInspector.TextEditor.prototype._mouseOut):
+ (WebInspector.TextEditor.prototype._updateDivDecorations):
+ (WebInspector.TextEditor.prototype._positionDivDecoration):
+ (WebInspector.TextEditor.prototype._paintSelection):
+ (WebInspector.TextEditor.prototype._replaceSelectionWith):
+ * inspector/front-end/TextEditorHighlighter.js:
+ (WebInspector.TextEditorHighlighter.prototype.updateHighlight):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/textEditor.css: Added.
+
+2010-01-24 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Replace split pane with tabbed pane in resource
+ contents view.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32453
+
+ * inspector/front-end/ResourceView.js:
+ (WebInspector.ResourceView):
+ (WebInspector.ResourceView.prototype.attach):
+ (WebInspector.ResourceView.prototype.show):
+ (WebInspector.ResourceView.prototype._selectTab):
+ (WebInspector.ResourceView.prototype._selectHeadersTab):
+ (WebInspector.ResourceView.prototype._selectContentTab):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype.show):
+ (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded):
+ (WebInspector.ResourcesPanel.prototype.showResource):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.show):
+ (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
+ * inspector/front-end/Settings.js:
+ (WebInspector.Settings.prototype._load):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._loaded):
+ * inspector/front-end/SourceView.js:
+ (WebInspector.SourceView):
+ * inspector/front-end/inspector.css:
+
+2010-01-24 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Media element duration changes to zero after playing in reverse
+ https://bugs.webkit.org/show_bug.cgi?id=34041
+
+ Test: media/video-reverse-play-duration.html
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::didEnd): QTKit's ended notification fires at time zero when
+ playing in reverse, so don't reset duration in that case.
+
+2010-01-24 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Content with heavily nested residual style is so slow, it seems like a hang
+ https://bugs.webkit.org/show_bug.cgi?id=34059
+ <rdar://problem/7292906>
+
+ Test cast: fast/parser/residual-style-hang.html
+
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
+ Limit the number of iterations of the main loop to 5.
+
+ The reason this limit is necessary is that otherwise, N misnested open tags followed
+ by N misnested close tags will cause O(N^2) of work due to cloning and attaching subtrees;
+ at a fixed limit, the cost is at worst O(N).
+
+ The code that was in the loop originally ran exactly once - the loop was added in
+ r21472 to fix <https://bugs.webkit.org/show_bug.cgi?id=13603>. I have verified that
+ with the iteration limit, the bug is still fixed, both with the original test case
+ and with the layout tests tht were added.
+
+2010-01-24 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ HTMLInputElement::valueAsDate setter support for type=week.
+ https://bugs.webkit.org/show_bug.cgi?id=33986
+
+ Introduce ISODateTime::setMillisecondsSinceEpochForWeek() and add
+ Week type support to ISODateTime::toString().
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::valueAsDate): Avoid default:.
+ (WebCore::HTMLInputElement::setValueAsDate):
+ Add WEEK type handling and avoid default:.
+ * html/ISODateTime.cpp:
+ (WebCore::offsetTo1stWeekStart):
+ (WebCore::ISODateTime::setMillisecondsSinceEpochForWeek):
+ (WebCore::ISODateTime::millisecondsSinceEpoch):
+ (WebCore::ISODateTime::toString):
+ Add Week type support and avoid default:.
+ * html/ISODateTime.h:
+
+2010-01-24 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Object Serialization assumes deserialization will always occur in the context of a webpage
+ https://bugs.webkit.org/show_bug.cgi?id=34056
+ rdar://7573833
+
+ Added ClassInfo to JSDOMGlobalObject and make the window and worker class info
+ inherit from it. With this in place we're able to determine whether a given
+ global object is a DOMGlobalObject, and then use that information to avoid
+ attempting to deserialize types that require the presence of the DOM.
+
+ No test as all global objects in webkit inherit from JSDOMGlobalObject.
+
+ * bindings/js/JSDOMGlobalObject.cpp:
+ (WebCore::):
+ * bindings/js/JSDOMGlobalObject.h:
+ (WebCore::JSDOMGlobalObject::classInfo):
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::):
+ * bindings/js/JSWorkerContextBase.cpp:
+ (WebCore::):
+ * bindings/js/SerializedScriptValue.cpp:
+ (WebCore::DeserializingTreeWalker::DeserializingTreeWalker):
+ (WebCore::DeserializingTreeWalker::convertIfTerminal):
+
+2010-01-24 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34047
+ <rdar://problem/7573699>
+ Media element "endedPlayback" logic doesn't match spec
+
+ Test: media/video-timeupdate-reverse-play.html
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::ended): The 'ended' attribute should only be true when playback
+ rate is positive.
+ (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Always schedule a 'timeupdate' event when
+ the media engine signals a time discontinuity, scheduleTimeupdateEvent will only queue an event
+ if one hasn't already been posted for the current movie time.
+ (WebCore::HTMLMediaElement::endedPlayback): Update to match the spec logic.
+
+2010-01-23 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Video that loads inside reflection doesn't get reflected
+ https://bugs.webkit.org/show_bug.cgi?id=34046
+
+ ensureCloneLayers() made an incorrect assumption that if a clone of the primaryLayer
+ exists already, then the structural layer and content layer can just be returned.
+ However, this doesn't account for the situation where a content layer may have
+ been create after the clone tree was last updated.
+
+ Fix by always creating the structural and clone layers on demand.
+
+ Test: compositing/reflections/load-video-in-reflection.html
+
+ * platform/graphics/mac/GraphicsLayerCA.h: Added utility method, findOrMakeClone().
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::findOrMakeClone): Utility that efficiently finds
+ or creates a layer in a LayerMap.
+ (WebCore::GraphicsLayerCA::ensureCloneLayers): Always look for or clone the
+ structural and content layers, rather than relying on whether there's a primary
+ layer clone already.
+
+2010-01-23 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Implement support for FileList cloning in postMessage
+ https://bugs.webkit.org/show_bug.cgi?id=34048
+
+ Support passing FileList through postMessage APIs. Basically
+ mechanical task in line with other terminals in the object
+ graph.
+
+ * bindings/js/SerializedScriptValue.cpp:
+ (WebCore::SerializedFileList::create):
+ (WebCore::SerializedFileList::length):
+ (WebCore::SerializedFileList::item):
+ (WebCore::SerializedFileList::SerializedFileList):
+ (WebCore::SerializedScriptValueData::SerializedScriptValueData):
+ (WebCore::SharedSerializedData::asFileList):
+ (WebCore::SerializingTreeWalker::convertIfTerminal):
+ (WebCore::DeserializingTreeWalker::convertIfTerminal):
+ (WebCore::TeardownTreeWalker::convertIfTerminal):
+ Rearrange these functions to not use 'default:' handling
+ so that the compiler will actually tell us when we're
+ not handling cases.
+ * bindings/js/SerializedScriptValue.h:
+ (WebCore::SerializedScriptValueData::):
+ (WebCore::SerializedScriptValueData::asFileList):
+
+2010-01-23 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Inject inspector script directly into the inspected context. All the
+ communication between the script and the frontend is serialized into
+ JSON strings. It allows to get rid of object quarantines in Web Inspector.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32554
+
+ Test: inspector/console-log-before-inspector-open.html
+
+ * bindings/js/JSInjectedScriptHostCustom.cpp:
+ (WebCore::JSInjectedScriptHost::databaseForId):
+ (WebCore::JSInjectedScriptHost::currentCallFrame):
+ (WebCore::JSInjectedScriptHost::nodeForId):
+ (WebCore::JSInjectedScriptHost::pushNodePathToFrontend):
+ (WebCore::JSInjectedScriptHost::selectDatabase):
+ (WebCore::JSInjectedScriptHost::selectDOMStorage):
+ * bindings/js/ScriptCallStack.h:
+ (WebCore::ScriptCallStack::globalState):
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::mainWorldScriptState):
+ * bindings/js/ScriptController.h:
+ * bindings/js/ScriptObject.h:
+ (WebCore::ScriptObject::scriptState):
+ * bindings/js/ScriptValue.cpp:
+ * bindings/js/ScriptValue.h:
+ * bindings/v8/ScriptCallStack.h:
+ (WebCore::ScriptCallStack::globalState):
+ * bindings/v8/ScriptObject.h:
+ (WebCore::ScriptObject::scriptState):
+ * bindings/v8/ScriptValue.h:
+ * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
+ * inspector/ConsoleMessage.cpp:
+ (WebCore::ConsoleMessage::ConsoleMessage):
+ (WebCore::ConsoleMessage::addToConsole):
+ (WebCore::ConsoleMessage::isEqual):
+ * inspector/ConsoleMessage.h:
+ * inspector/InjectedScriptHost.cpp:
+ (WebCore::InjectedScriptHost::releaseWrapperObjectGroup):
+ * inspector/InjectedScriptHost.h:
+ * inspector/InjectedScriptHost.idl:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::setInjectedScriptSource):
+ (WebCore::InspectorBackend::dispatchOnInjectedScript):
+ (WebCore::InspectorBackend::releaseWrapperObjectGroup):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::InspectorController):
+ (WebCore::InspectorController::clearConsoleMessages):
+ (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
+ (WebCore::InspectorController::windowScriptObjectAvailable):
+ (WebCore::InspectorController::scriptObjectReady):
+ (WebCore::InspectorController::setFrontendProxyObject):
+ (WebCore::InspectorController::close):
+ (WebCore::InspectorController::resetScriptObjects):
+ (WebCore::InspectorController::didPause):
+ (WebCore::InspectorController::injectedScriptForNodeId):
+ * inspector/InspectorController.h:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addConsoleMessage):
+ (WebCore::InspectorFrontend::pausedScript):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/AuditsPanel.js:
+ (WebInspector.AuditsPanel.prototype._reloadResources):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.requestClearMessages):
+ (WebInspector.ConsoleView.prototype.doEvalInWindow):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMNode):
+ (WebInspector.CSSStyleDeclaration):
+ (WebInspector.CSSStyleDeclaration.parseRule):
+ * inspector/front-end/Database.js:
+ (WebInspector.Database.prototype.executeSql):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged.InjectedScriptAccess.get addInspectedNode):
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
+ (WebInspector.ElementsPanel.prototype.setDocument):
+ (WebInspector.ElementsPanel.prototype.searchCanceled):
+ (WebInspector.ElementsPanel.prototype.performSearch):
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype.createTooltipForImageNode):
+ * inspector/front-end/EventListenersSidebarPane.js:
+ ():
+ * inspector/front-end/InjectedScript.js:
+ (injectedScriptConstructor):
+ (injectedScriptConstructor.):
+ * inspector/front-end/InjectedScriptAccess.js:
+ (InjectedScriptAccess):
+ (InjectedScriptAccess.getDefault):
+ (get InjectedScriptAccess):
+ (InjectedScriptAccess._installHandler.InjectedScriptAccess.prototype.methodName):
+ (InjectedScriptAccess._installHandler):
+ * inspector/front-end/MetricsSidebarPane.js:
+ (WebInspector.MetricsSidebarPane):
+ (WebInspector.MetricsSidebarPane.prototype.update.inlineStyleCallback):
+ * inspector/front-end/ObjectPropertiesSection.js:
+ * inspector/front-end/ObjectProxy.js:
+ (WebInspector.ObjectProxy):
+ * inspector/front-end/PropertiesSidebarPane.js:
+ (WebInspector.PropertiesSidebarPane.prototype.update.callback):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
+ * inspector/front-end/ScriptsPanel.js:
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertyTreeElement.prototype):
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSection.prototype.update):
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+ (WebInspector.pausedScript):
+ (WebInspector.addConsoleMessage):
+ (WebInspector.log.logMessage):
+ (WebInspector.log):
+
+2010-01-22 Alex Milowski <alex@milowski.com>
+
+ Reviewed by David Hyatt.
+
+ Added support for RenderMathMLBlock base object and isRenderMathMLBlock()
+ method on RenderObject.
+
+ Added support for text elements and updated tag and attribute names
+
+ Also, updated the stylesheet added files to the project
+
+ * DerivedSources.make:
+ * WebCore.xcodeproj/project.pbxproj:
+ * css/mathml.css:
+ * mathml/MathMLInlineContainerElement.cpp:
+ (WebCore::MathMLInlineContainerElement::createRenderer):
+ * mathml/MathMLTextElement.cpp: Added.
+ (WebCore::MathMLTextElement::MathMLTextElement):
+ (WebCore::MathMLTextElement::create):
+ (WebCore::MathMLTextElement::createRenderer):
+ * mathml/MathMLTextElement.h: Added.
+ * mathml/RenderMathMLBlock.cpp: Added.
+ (WebCore::RenderMathMLBlock::RenderMathMLBlock):
+ (WebCore::RenderMathMLBlock::styleDidChange):
+ (WebCore::RenderMathMLBlock::isChildAllowed):
+ (WebCore::RenderMathMLBlock::makeBlockStyle):
+ (WebCore::RenderMathMLBlock::nonOperatorHeight):
+ (WebCore::RenderMathMLBlock::stretchToHeight):
+ * mathml/RenderMathMLBlock.h: Added.
+ (WebCore::RenderMathMLBlock::isRenderMathMLBlock):
+ (WebCore::RenderMathMLBlock::isRenderMathMLOperator):
+ (WebCore::RenderMathMLBlock::isRenderMathMLRow):
+ (WebCore::RenderMathMLBlock::isRenderMathMLMath):
+ (WebCore::RenderMathMLBlock::hasBase):
+ (WebCore::toRenderMathMLBlock):
+ * mathml/mathattrs.in: Added.
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::isRenderMathMLBlock):
+
+2010-01-22 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Ensures that the 'selected' attribute of an <option> is correct
+ https://bugs.webkit.org/show_bug.cgi?id=32641
+
+ Adds a check in OptionElement::selected() that checks if list items need to be recalculated and does so if needed,
+ so the attribute is up to date more often. Also gets rid of most of the recalcStyle() side effects.
+
+ Our behavior now matches Firefox 3.5 and IE8 after the </select> is parsed.
+
+ Tests: fast/forms/HTMLOptionElement_selected2.html
+ fast/forms/HTMLOptionElement_selected3.html
+
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::setOptionsChangedOnRenderer):
+ (WebCore::SelectElement::setRecalcListItems):
+ (WebCore::SelectElement::recalcListItems):
+ (WebCore::SelectElement::restoreFormControlState):
+ (WebCore::SelectElement::reset):
+ (WebCore::SelectElement::typeAheadFind):
+ * dom/SelectElement.h:
+ * html/HTMLOptionElement.cpp:
+ (WebCore::HTMLOptionElement::selected):
+ (WebCore::HTMLOptionElement::insertedIntoTree):
+ * html/HTMLSelectElement.cpp:
+ (WebCore::HTMLSelectElement::recalcStyle):
+ (WebCore::HTMLSelectElement::recalcListItemsIfNeeded):
+ * html/HTMLSelectElement.h:
+ * wml/WMLSelectElement.cpp:
+ (WebCore::WMLSelectElement::recalcStyle):
+
+2010-01-22 Chris Rogers <crogers@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Need to handle WebGLUnsignedByteArray as method argument for V8 binding
+ https://bugs.webkit.org/show_bug.cgi?id=33929
+
+ V8 code generator does not have associated tests
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+
+2010-01-22 Elliot Glaysher <erg@chromium.org>
+
+ Reviewed by David Levin.
+
+ Chromium: theme selection colors to match gtk theme
+ Add functions to RenderThemeChromiumLinux to change the selection color
+ according to the current GTK+ theme.
+
+ Since the change is to the Chromium WebKit API layer, testing is done
+ in Chromium's test shell (see Chromium side of this patch:
+ http://codereview.chromium.org/554004)
+
+ https://bugs.webkit.org/show_bug.cgi?id=33921
+
+ * rendering/RenderThemeChromiumLinux.cpp:
+ (WebCore::RenderThemeChromiumLinux::platformActiveSelectionBackgroundColor):
+ (WebCore::RenderThemeChromiumLinux::platformInactiveSelectionBackgroundColor):
+ (WebCore::RenderThemeChromiumLinux::platformActiveSelectionForegroundColor):
+ (WebCore::RenderThemeChromiumLinux::platformInactiveSelectionForegroundColor):
+ (WebCore::RenderThemeChromiumLinux::setSelectionColors):
+ * rendering/RenderThemeChromiumLinux.h: Adds static members.
+
+2010-01-22 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ [wx] Remove the Bakefile build system, which is no longer being used.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34022
+
+ * WebCoreSources.bkl: Removed.
+ * webcore-base.bkl: Removed.
+ * webcore-wx.bkl: Removed.
+
+2010-01-22 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Darin Adler.
+
+ Remove unnecessary copy of zlib.
+ https://bugs.webkit.org/show_bug.cgi?id=34028
+
+ * platform/image-decoders/zlib: Removed.
+ * platform/image-decoders/zlib/adler32.c: Removed.
+ * platform/image-decoders/zlib/compress.c: Removed.
+ * platform/image-decoders/zlib/crc32.c: Removed.
+ * platform/image-decoders/zlib/crc32.h: Removed.
+ * platform/image-decoders/zlib/deflate.c: Removed.
+ * platform/image-decoders/zlib/deflate.h: Removed.
+ * platform/image-decoders/zlib/gzio.c: Removed.
+ * platform/image-decoders/zlib/infback.c: Removed.
+ * platform/image-decoders/zlib/inffast.c: Removed.
+ * platform/image-decoders/zlib/inffast.h: Removed.
+ * platform/image-decoders/zlib/inffixed.h: Removed.
+ * platform/image-decoders/zlib/inflate.c: Removed.
+ * platform/image-decoders/zlib/inflate.h: Removed.
+ * platform/image-decoders/zlib/inftrees.c: Removed.
+ * platform/image-decoders/zlib/inftrees.h: Removed.
+ * platform/image-decoders/zlib/mozzconf.h: Removed.
+ * platform/image-decoders/zlib/trees.c: Removed.
+ * platform/image-decoders/zlib/trees.h: Removed.
+ * platform/image-decoders/zlib/uncompr.c: Removed.
+ * platform/image-decoders/zlib/zconf.h: Removed.
+ * platform/image-decoders/zlib/zlib.h: Removed.
+ * platform/image-decoders/zlib/zutil.c: Removed.
+ * platform/image-decoders/zlib/zutil.h: Removed.
+
+2010-01-22 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34025
+ Enable client-based Geolocation abstraction for Mac, Windows AppleWebKit targets.
+
+ * Configurations/FeatureDefines.xcconfig:
+ * DerivedSources.make:
+
+2010-01-22 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Race condition in video setup can force videos into software mode
+ https://bugs.webkit.org/show_bug.cgi?id=34034
+
+ We used to call setUpVideoRendering() unconditionally from
+ acceleratedRenderingStateChanged(); this could happen before the movie had any
+ data, and thus force the movie into software rendering mode.
+
+ Fix by returning early from setUpVideoRendering() if isReadyForRendering() returns false,
+ which also allows us to remove some other checks for being ready to render.
+
+ Timing dependent, hard to make a test for.
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::setContentsToMedia): Optimize to do an early return
+ if passing in the same layer that is already being used.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::setUpVideoRendering): Return without doing anything
+ if not ready to render.
+ (WebCore::MediaPlayerPrivate::updateStates): No need to call isReadyForRendering()
+ any more, since setUpVideoRendering() does that.
+ (WebCore::MediaPlayerPrivate::setVisible): No need to check the ready state; this
+ is equivalent to the check inside of setUpVideoRendering().
+
+2010-01-22 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ REGRESSION (r53110): Find My iPhone message dialog is offset from original position once it gets focus
+ https://bugs.webkit.org/show_bug.cgi?id=33821
+
+ Fix an issue with the geometry of fixed position, composited layers inside other
+ composited layers. If we called convertToLayerCoords() on a fixed layer with an ancestor
+ layer which is not the root, then we assumed that the fixed layer had a positioning root.
+ However, this is not always the case, since the fixed layer may have a compositing ancestor
+ which is not a fixed container.
+
+ Test: compositing/geometry/fixed-in-composited.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::isFixedPositionedContainer): Utility function to test whether a layer acts
+ as a fixed position container.
+
+ (WebCore::RenderLayer::convertToLayerCoords): When called on a fixed position layer
+ for an ancestor layer that is not the root, compute the correct offsets by looking for
+ the fixed position container, and computing offsets relative to that. If the ancestorLayer
+ is the fixed position container, fall through to the existing code that is shared
+ with absolutely positioned layers.
+
+2010-01-22 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ webkitConvertPointFromNodeToPage doesn't take into account most recent transform style
+ https://bugs.webkit.org/show_bug.cgi?id=34023
+
+ Be sure to call updateLayoutIgnorePendingStylesheets() before doing point mapping,
+ to apply any style changes since the last layout.
+
+ Test: fast/dom/Window/webkitConvertPointUpdateLayout.html
+
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::webkitConvertPointFromNodeToPage): Call updateLayoutIgnorePendingStylesheets().
+ (WebCore::DOMWindow::webkitConvertPointFromPageToNode): Ditto.
+
+2010-01-22 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Use stale cache data when going back and forward but not using WebCore’s page cache
+ https://bugs.webkit.org/show_bug.cgi?id=33993
+ <rdar://problem/7383392>
+
+ No tests since this is a performance change.
+
+ * loader/CachePolicy.h:
+ (WebCore::): Add CachePolicyAllowStale.
+ * loader/DocLoader.cpp:
+ (WebCore::DocLoader::checkForReload): Never reload in the case of
+ CachePolicyAllowStale.
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::subresourceCachePolicy): Return CachePolicyAllowStale
+ if the main resource is being loaded to allow stale data.
+ (WebCore::FrameLoader::addExtraFieldsToRequest): Use ReturnCacheDataElseLoad
+ on back/forward loads - needed when going back of forward to a page with frames.
+
+2010-01-22 Kelly Norton <knorton@google.com>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: JavaScript Error in DOMAgent.js:375 (_attributesUpdated)
+ https://bugs.webkit.org/show_bug.cgi?id=33915
+
+ Errors were caused by the fact that Element::attributes calls Element::setAttribute to
+ synchronized the styleAttr. The fix is to simply check the synchronizing style attribute
+ flag.
+
+ * dom/Element.cpp:
+ (WebCore::Element::setAttribute): Checked for case where styleAttr is being synchronized.
+
+2010-01-22 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Update r53711 for GraphicsLayer method rename.
+
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+ (WebCore::MediaPlayerPrivate::createLayerForMovie): Rename from change setContentsToVideo.
+
+2010-01-22 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Add BlobConstructor to DOMWindow.
+ https://bugs.webkit.org/show_bug.cgi?id=33982
+
+ * page/DOMWindow.idl:
+
+2010-01-22 Brian Weinstein <bweinstein@apple.com>
+
+ Rubber-stamped by Adam Roben.
+
+ Commit files that were supposed to be part of r53696, but weren't
+ landed.
+
+ * English.lproj/localizedStrings.js:
+ * manual-tests/debugger-caught-uncaught-exceptions.html: Added.
+
+2010-01-22 Peter Kasting <pkasting@google.com>
+
+ Reviewed by David Hyatt.
+
+ When scrolling by page, hold back 1/8th of the visible size instead of
+ 40 px.
+ https://bugs.webkit.org/show_bug.cgi?id=32595
+
+ * editing/EditorCommand.cpp:
+ (WebCore::verticalScrollDistance):
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::updateScrollbars):
+ (WebCore::ScrollView::wheelEvent):
+ * platform/Scrollbar.h:
+ * platform/wx/ScrollViewWx.cpp:
+ (WebCore::ScrollView::ScrollViewPrivate::OnScrollWinEvents):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateScrollInfoAfterLayout):
+
+2010-01-22 Peter Kasting <pkasting@google.com>
+
+ Not reviewed, backout.
+
+ Back out r52673, which caused several regressions.
+ https://bugs.webkit.org/show_bug.cgi?id=32533
+
+ * platform/PopupMenuClient.h:
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupContainer::hidePopup):
+ (WebCore::PopupListBox::handleKeyEvent):
+ (WebCore::PopupListBox::abandon):
+ (WebCore::PopupListBox::acceptIndex):
+ (WebCore::PopupListBox::selectIndex):
+ (WebCore::PopupListBox::clearSelection):
+ (WebCore::PopupListBox::hidePopup):
+ * platform/gtk/PopupMenuGtk.cpp:
+ (WebCore::PopupMenu::menuUnmapped):
+ * platform/mac/PopupMenuMac.mm:
+ (WebCore::PopupMenu::show):
+ * platform/qt/QtAbstractWebPopup.cpp:
+ (WebCore::QtAbstractWebPopup::popupDidHide):
+ * platform/qt/QtAbstractWebPopup.h:
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::hide):
+ * platform/wx/PopupMenuWx.cpp:
+ (WebCore::PopupMenu::OnMenuItemSelected):
+ * rendering/RenderMenuList.cpp:
+ (WebCore::RenderMenuList::popupDidHide):
+ * rendering/RenderMenuList.h:
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::popupDidHide):
+ * rendering/RenderTextControlSingleLine.h:
+
+2010-01-22 Dan Bernstein <mitz@apple.com>
+
+ Rubber-stamped by Darin Adler.
+
+ Revert r53693 because it broke scrolling of pages with fixed elements on
+ Mac OS X.
+
+ * page/FrameView.cpp:
+ * page/FrameView.h:
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::scrollContents):
+ * platform/ScrollView.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::styleWillChange):
+ (WebCore::RenderObject::destroy):
+
+2010-01-22 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34008
+ Assertion failure in KURL::setProtocol when running DOM Fuzzer
+
+ Test: fast/dom/Window/invalid-protocol.html
+
+ * bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::setProtocol): Raise an exception
+ if KURL::setProtocol fails.
+
+ * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setProtocol): Move argument
+ tweaking logic into KURL. This way, the ':' trick applies to both JSLocation and
+ HTMLAnchorElement, matching IE (but not Firefox). IE behavior is more permissive, and even
+ more logical in my opinion.
+
+ * loader/FrameLoader.cpp: (WebCore::FrameLoader::iconURL): Assert that setting protocol
+ succeeded.
+
+ * platform/KURL.cpp: (WebCore::KURL::setProtocol): Remove everything past ':', if present.
+ Return false if the protocol to set is not valid.
+ (WebCore::isValidProtocol): Made this work correctly for empty strings.
+
+ * platform/KURL.h: isValidProtocol() is now static in KURL.cpp, it's only used in setProtocol().
+
+ * platform/KURLGoogle.cpp:
+ (WebCore::KURL::setProtocol): Always return true. This should hopefully prevent Chromium build
+ breakage, alhough tests will likely fail.
+ (WebCore::isValidProtocol): Removed, as this isn't used at the moment.
+
+ * websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::httpURLForAuthenticationAndCookies):
+ Assert that setting protocol succeeded.
+
+2010-01-22 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Adam Roben.
+
+ <rdar://problem/7373568>
+ https://bugs.webkit.org/show_bug.cgi?id=34007
+ Implement hardware acceleration of video compositing on Windows
+
+ Internally we still have QuickTime render to a bitmap, but frames are then composited
+ with the page using an accelerated renderer.
+
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Initialize m_newFrameAvailable.
+ (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate): Call tearDownVideoRendering.
+ (WebCore::MediaPlayerPrivate::cancelLoad): Call tearDownVideoRendering.
+ (WebCore::MediaPlayerPrivate::updateStates): Call setUpVideoRendering once the movie
+ is ready to draw.
+ (WebCore::MediaPlayerPrivate::isReadyForRendering): New, utility function returns true
+ only when movie is ready to render.
+ (WebCore::MediaPlayerPrivate::setSize): Remember the size as we need it when rendering
+ in accelerated mode.
+ (WebCore::MediaPlayerPrivate::setVisible): Call setUpVideoRendering when made visible.
+ (WebCore::MediaPlayerPrivate::paint): Do nothing when rendering to a layer. Move frame
+ rate drawing code to paintCompleted.
+ (WebCore::MediaPlayerPrivate::paintCompleted): New, clear m_newFrameAvailable and, when
+ built with DRAW_FRAME_RATE, draw framerate.
+ (WebCore::MediaPlayerPrivate::movieNewImageAvailable): Set m_newFrameAvailable, trigger
+ repaint differently when drawing to a layer.
+ (WebCore::MediaPlayerPrivate::currentRenderingMode): New, return the current rendering mode.
+ (WebCore::MediaPlayerPrivate::preferredRenderingMode): New, return preferred rendering mode
+ (render to a layer whenever possible).
+ (WebCore::MediaPlayerPrivate::setUpVideoRendering): New, tear down current rendering mode
+ and set up new mode when necessary.
+ (WebCore::MediaPlayerPrivate::tearDownVideoRendering): New, noop unless rendering to a layer.
+ (WebCore::MediaPlayerPrivate::hasSetUpVideoRendering): New.
+ (WebCore::MediaPlayerPrivate::paintContents): New, callback from compositing layer when it
+ is time to draw the current frame.
+ (WebCore::MediaPlayerPrivate::createLayerForMovie): New, allocate a layer for the movie.
+ (WebCore::MediaPlayerPrivate::destroyLayerForMovie): New, delete movie layer.
+ (WebCore::MediaPlayerPrivate::supportsAcceleratedRendering): New, return true unless the
+ movie is not ready to render.
+ (WebCore::MediaPlayerPrivate::acceleratedRenderingStateChanged): New, deal with change in
+ accelerated rendering state.
+ (WebCore::MediaPlayerPrivate::notifySyncRequired): New, callback from compositing layer
+ when it wants to schedule a redraw.
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
+ (WebCore::MediaPlayerPrivate::notifyAnimationStarted):
+ (WebCore::MediaPlayerPrivate::showDebugBorders):
+ (WebCore::MediaPlayerPrivate::showRepaintCounter):
+
+ * platform/graphics/win/QTMovieWin.cpp:
+ (QTMovieWin::getCurrentFrameInfo):
+ New, return information about the offscreen render buffer.
+ (QTMovieWin::initializeQuickTime):
+ * platform/graphics/win/QTMovieWin.h:
+
+2010-01-21 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ The Chromium WebKit API needs to expose storage event related data
+ https://bugs.webkit.org/show_bug.cgi?id=33985
+
+ This change is not visible to layoutTests/web pages.
+
+ * storage/StorageArea.h:
+ * storage/StorageAreaImpl.cpp:
+ (WebCore::StorageAreaImpl::setItem): return the old value
+ (WebCore::StorageAreaImpl::removeItem): return the old value
+ (WebCore::StorageAreaImpl::clear): return whether there was anything to clear
+ * storage/StorageAreaImpl.h:
+
+2010-01-22 Adele Peterson <adele@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ An element that doesn't validate and an invalid element shouldn't share style
+ https://bugs.webkit.org/show_bug.cgi?id=34010
+
+ Test: fast/css/pseudo-invalid-novalidate-001.html
+
+ * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement):
+ Separate the check for willValidate from the check for isValidFormControlElement.
+ * html/HTMLFormControlElement.h: The validity method doesn't need to be virtual.
+
+2010-01-22 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Crash in fast/dom/Window/window-properties if Geolocation enabled
+ https://bugs.webkit.org/show_bug.cgi?id=34013
+
+ Add null check to fix Geolocation crash in fast/dom/Window/window-properties.
+
+ * page/Geolocation.cpp:
+ (WebCore::createGeoposition):
+
+2010-01-22 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Object.getOwnPropertyDescriptor(window) returns descriptors for properties in the prototype chain
+ https://bugs.webkit.org/show_bug.cgi?id=33948
+
+ Even though prototype properties are proxied by JSDOMWindow::getOwnPropertySlot(),
+ that proxying should not be performed by JSDOMWindow::getOwnPropertyDescriptor().
+
+ This makes getOwnPropertyDescriptor() consistent with getOwnPropertyNames().
+
+ Test: fast/dom/Window/window-property-descriptors.html
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
+
+2010-01-22 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Save the QWebPageClient instead of the ownerWidget in QtAbstractWebPopup
+
+ The QWebPageClient is required for the QtFallbackWebPopup. QtFallbackWebPopup will
+ need it to create a QGraphicsProxyWidget (in a future commit) for the
+ QGraphicsWebView's web popup.
+
+ * platform/qt/PopupMenuQt.cpp:
+ (WebCore::PopupMenu::show):
+ * platform/qt/QtAbstractWebPopup.cpp:
+ (WebCore::QtAbstractWebPopup::QtAbstractWebPopup):
+ (WebCore::QtAbstractWebPopup::popupDidHide):
+ (WebCore::QtAbstractWebPopup::valueChanged):
+ (WebCore::QtAbstractWebPopup::itemType):
+ * platform/qt/QtAbstractWebPopup.h:
+ (WebCore::QtAbstractWebPopup::itemText):
+ (WebCore::QtAbstractWebPopup::itemToolTip):
+ (WebCore::QtAbstractWebPopup::itemIsEnabled):
+ (WebCore::QtAbstractWebPopup::itemCount):
+ (WebCore::QtAbstractWebPopup::pageClient):
+ (WebCore::QtAbstractWebPopup::font):
+
+2010-01-22 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Unreviewed Qt "build" fix.
+
+ * WebCore.pro: Fix warning about missing header file that isn't present anymore.
+
+2010-01-22 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Update copy of the source whenever playbin2's source property
+ changes.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mediaPlayerPrivateSourceChangedCallback):
+ (WebCore::MediaPlayerPrivate::updateStates):
+ (WebCore::MediaPlayerPrivate::createGSTPlayBin):
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+ Connect to the notify::source signal and update the source
+ element pointer from there. This makes sure that we never
+ store a pointer to an old source element.
+
+2010-01-22 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Caught exceptions still pause the debugger.
+ <https://bugs.webkit.org/show_bug.cgi?id=28622>.
+
+ Turn the pauseOnExceptions variable from a bool to an int, because we now have
+ 3 states, in an enum: DontPauseOnExceptions, PauseOnAllExceptions, and
+ PauseOnUncaughtExceptions. The status button for pausing on exceptions is now
+ a tri-state button, which cycles from Don't pause (no background) to Pause on All
+ (blue background) to Pause on Uncaught (purple background).
+
+ Also added the ability for a status button to have more than 2 states, and added
+ style rules for a CSS three state button.
+
+ Added a manual test, manual-tests/debugger-caught-uncaught-exceptions.html, that
+ generates caught and uncaught exceptions.
+
+ * English.lproj/localizedStrings.js: Added updated Action / Click to Action text.
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::pauseOnExceptions): Changed from a bool to an int.
+ (WebCore::InspectorBackend::setPauseOnExceptions): Ditto.
+ * inspector/InspectorBackend.h: Ditto.
+ * inspector/InspectorBackend.idl: Ditto.
+ * inspector/JavaScriptDebugServer.cpp:
+ (WebCore::JavaScriptDebugServer::JavaScriptDebugServer): Changed from bool to PauseOnExceptionsState.
+ (WebCore::JavaScriptDebugServer::setPauseOnExceptions): Ditto.
+ (WebCore::JavaScriptDebugServer::exception): Updated logic to see if we are breaking
+ on uncaught exceptions, and check if we have a handler.
+ * inspector/JavaScriptDebugServer.h:
+ (WebCore::JavaScriptDebugServer::): Changed from bool to PauseOnExceptionsState.
+ (WebCore::JavaScriptDebugServer::pauseOnExceptions): Ditto.
+ * inspector/front-end/InspectorBackendStub.js:
+ (.WebInspector.InspectorBackendStub.prototype.pauseOnExceptionsState): Changed from returning false to returning 0 (stub function).
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ (WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsButton): Updated to new text/new cycling of variables.
+ (WebInspector.ScriptsPanel.prototype._togglePauseOnExceptions): Updated to new text/new cycling of variables.
+ * inspector/front-end/StatusBarButton.js:
+ (WebInspector.StatusBarButton): Added the option for a different number of states.
+ (WebInspector.StatusBarButton.prototype.set toggled): Added rules to toggle on/off with multiple states.
+ * inspector/front-end/inspector.css: Added rules for toggled-1 and toggled-2.
+ * manual-tests/debugger-caught-uncaught-exceptions.html: Added.
+
+2010-01-22 Ben Murdoch <benm@google.com>
+
+ Reviewed by Eric Seidel.
+
+ [Android] Android platform specific PlatformTouchEvent and PlatformTouchPoint implementations are not upstream.
+ https://bugs.webkit.org/show_bug.cgi?id=33719
+
+ Add the Android specific files and update the Android makefile.
+
+ No new tests as this is all Android-specific code.
+
+ * Android.mk: Add Touch event related files to the makefile.
+ * platform/PlatformTouchEvent.h: Add Android constructor.
+ * platform/PlatformTouchPoint.h: Ditto.
+ * platform/android/PlatformTouchEventAndroid.cpp: Added.
+ (WebCore::PlatformTouchEvent::PlatformTouchEvent): Android implementation.
+ * platform/android/PlatformTouchPointAndroid.cpp: Added.
+ (WebCore::PlatformTouchPoint::PlatformTouchPoint): Android implementation.
+
+2010-01-22 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Do not render the full frame when there is some elements with fixed positioning
+ https://bugs.webkit.org/show_bug.cgi?id=33150
+
+ The RenderObjects with fixed position register to the view
+ to be taken into account while scrolling.
+ The scrolling code update specifically those elements after blitting the pixels.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::registerFixedPositionedObject):
+ (WebCore::FrameView::unregisterFixedPositionedObject):
+ (WebCore::FrameView::scrollContentsFastPath):
+ * page/FrameView.h:
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::scrollContents):
+ (WebCore::ScrollView::scrollContentsFastPath):
+ * platform/ScrollView.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::styleWillChange):
+ (WebCore::RenderObject::destroy):
+
+2010-01-22 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Adding ScriptWrappable into WebCore.
+ This allows to associate custom information when Node
+ gets wrapped into JavaScript wrapper.
+
+ [v8, dom] Add a pointer field to C++ Node class
+ https://bugs.webkit.org/show_bug.cgi?id=32430
+
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/ScriptWrappable.h: Added.
+ (WebCore::ScriptWrappable::ScriptWrappable):
+ * bindings/v8/ScriptWrappable.h: Added.
+ (WebCore::ScriptWrappable::ScriptWrappable):
+ (WebCore::ScriptWrappable::wrapper):
+ (WebCore::ScriptWrappable::setWrapper):
+ (WebCore::ScriptWrappable::clearWrapper):
+ * dom/Node.h:
+
+2010-01-22 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Add stub implementation of dispatchOnInjectedScript method so that
+ Chromium source can compile against it and the main fix for the bug
+ 28622 can be landed without breaking Chromium build.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28622
+
+ * inspector/InspectorBackend.h:
+ (WebCore::InspectorBackend::dispatchOnInjectedScript):
+
+2010-01-22 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Dmitry Titov.
+
+ ENABLE(DATABASE) guard is missing in ScriptExecutionContext::~ScriptExecutionContext
+ https://bugs.webkit.org/show_bug.cgi?id=33990
+
+ Add missing ENABLE(DATABASE) guard.
+
+ * dom/ScriptExecutionContext.cpp:
+ (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
+
+2010-01-22 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] GObject DOM bindings
+ https://bugs.webkit.org/show_bug.cgi?id=33590
+
+ * bindings/scripts/generate-bindings.pl:
+
+2010-01-22 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] GObject DOM bindings
+ https://bugs.webkit.org/show_bug.cgi?id=33590
+
+ Rename FEATURE_DEFINES_JAVASCRIPT to FEATURE_DEFINES and remove
+ the hardcoded LANGUAGE_JAVASCRIPT=1, in preparation for its use by
+ the GObject DOM bindings.
+
+ * GNUmakefile.am:
+
+2010-01-22 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7568696> Zoom applied to embedded SVG incorrectly
+ https://bugs.webkit.org/show_bug.cgi?id=33988
+
+ Test: svg/custom/text-zoom.xhtml
+
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::SVGSVGElement): Initialize m_scale.
+ (WebCore::SVGSVGElement::currentScale): If this is the document element,
+ return the frame’s zoom factor. Otherwise, return m_scale.
+ (WebCore::SVGSVGElement::setCurrentScale): If this is the document element,
+ set the frame’s zoom factor. Otherwise, set m_scale and mark for layout.
+ * svg/SVGSVGElement.h: Added m_scale member.
+
+2010-01-21 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [chromium] Add allowPlugins callback to allow per-site enabling of plugins
+ https://bugs.webkit.org/show_bug.cgi?id=33974
+
+ Add a callback into the FrameLoaderClient to let the embedder enable or
+ disable plugins on a per-site basis.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::requestObject):
+ * loader/FrameLoaderClient.h:
+ (WebCore::FrameLoaderClient::allowPlugins):
+
+2010-01-21 Tony Chang <tony@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25501
+ Remove empty font tags when applying a style to a content editable
+ region.
+
+ Test: editing/execCommand/change-font.html
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::isEmptyFontTag):
+
+2010-01-21 Joe Mason <jmason@rim.com>
+
+ Reviewed by Darin Adler.
+
+ Promote pow argument to double to resolve ambiguous overload (compile fix for RVCT 4.0)
+ https://bugs.webkit.org/show_bug.cgi?id=33952
+
+ * platform/graphics/filters/FEComponentTransfer.cpp:
+ (WebCore::gamma):
+
+2010-01-21 Andrei Popescu <andreip@google.com>
+
+ Reviewed by David Levin.
+
+ [Android] bindings/v8/ScriptController.cpp needs to include
+ PlatformBridge.h instead of ChromiumBridge.h so that it can
+ be used on both Chromium and Android.
+ https://bugs.webkit.org/show_bug.cgi?id=33673
+
+ Add "static NPObject* pluginScriptableObject(Widget*);" method
+ to PlatformBridge.h
+ Include PlatformBridge.h from ScriptController.cpp.
+
+ No new tests, just platform code.
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::createScriptInstanceForWidget):
+ * platform/android/PlatformBridge.h:
+
+2010-01-21 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ history.back() for same-document history traversals isn't synchronous as the specification states.
+ <rdar://problem/7535011> and https://bugs.webkit.org/show_bug.cgi?id=33538
+
+ In resolving https://bugs.webkit.org/show_bug.cgi?id=25570, all history.back()/forward()/go() navigations
+ were made asynchronous. That doesn't agree with the HTML5 spec and might have been overreaching for fixing
+ that particular bug. In working with the new history state APIs I noticed some things that should've been
+ possible were not possible because of this change.
+
+ The change in loading behavior is well covered via modifications to previous tests.
+
+ * loader/RedirectScheduler.cpp:
+ (WebCore::RedirectScheduler::scheduleHistoryNavigation): Determine beforehand if the traversal is
+ a same-document navigation. If it is, perform the load directly instead of scheduling it.
+
+2010-01-21 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Don't allow Phonon's invisible video widget to keep the app running.
+ https://bugs.webkit.org/show_bug.cgi?id=33842
+
+ The change made in r38223 should not be limited to Qt < 4.5 only.
+
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+
+2010-01-21 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ HTMLInputElement::valueAsDate setter support for type=datetime.
+ https://bugs.webkit.org/show_bug.cgi?id=33939
+
+ Introduce ISODateTime::setMillisecondsSinceEpochForDateTime() and add
+ DateTime type support to ISODateTime::toString().
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::setValueAsDate):
+ * html/ISODateTime.cpp:
+ (WebCore::ISODateTime::setMillisecondsSinceEpochForDate):
+ Set Invalid to m_type.
+ (WebCore::ISODateTime::setMillisecondsSinceEpochForDateTime):
+ (WebCore::ISODateTime::setMillisecondsSinceEpochForMonth):
+ Set Invalid to m_type.
+ (WebCore::ISODateTime::setMillisecondsSinceMidnight):
+ Set Invalid to m_type.
+ (WebCore::ISODateTime::toString):
+ Support DateTime type. This always produces UTC representation.
+ * html/ISODateTime.h:
+
+2010-01-21 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fixed <rdar://problem/7562574> ASSERT in WebCore::removeWrapper() at the
+ end of run-webkit-tests
+
+ This was an ASSERT-only bug, introduced by isolated worlds, which
+ created the novelty of a wrapper that might outlive its wrapper cache.
+
+ When a wrapper outlived its wrapper cache, both the wrapper's destructor
+ and the wrapper cache's destructor would claim to have uncached the wrapper,
+ causing an ASSERT to fire.
+
+ The solution is to distinguish between operations that logically add and
+ remove cache entries, and operations that delete whole caches. We track
+ when a cache entry is logically added, and when it's logically removed,
+ independent of whether the actual cache still exists.
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::willCacheWrapper):
+ (WebCore::didUncacheWrapper): New names for these functions to help
+ explain what they track.
+
+ (WebCore::DOMWrapperWorld::~DOMWrapperWorld): Don't claim to uncache
+ all the wrappers in the world; we're deleting the cache, not managing its
+ entries.
+
+ (WebCore::cacheDOMObjectWrapper):
+ (WebCore::forgetDOMObject):
+ (WebCore::forgetDOMNode):
+ (WebCore::cacheDOMNodeWrapper):
+ (WebCore::forgetAllDOMNodesForDocument):
+ (WebCore::forgetWorldOfDOMNodesForDocument):
+ (WebCore::takeWrappers):
+ (WebCore::updateDOMNodeDocument): Updated for renames.
+
+2010-01-21 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Sam Weinig.
+
+ SVG JS bindings "context" pointer needs to move onto binding impls
+ https://bugs.webkit.org/show_bug.cgi?id=27243
+
+ Rewrite SVG DOM JSC bindings to use a global DOMObject <-> SVGElement context map, similar to V8's approach.
+ This allows us to remove DOMObjectWithSVGContext and make all SVG JS objects use DOMObjectWithGlobalPointer.
+ We're fitting again in JS_CELL_SIZE, and there's no need to special case SVG anymore.
+
+ Not adding a new test, as we have yet to identify how to test that we're passing around correct global objects.
+ For now this is just a code cleanup which lets me continue making progress in that area of the code.
+
+ * GNUmakefile.am: Add new DOMObjectWithSVGContext.h to build.
+ * WebCore.gypi: Ditto.
+ * WebCore.vcproj/WebCore.vcproj: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * bindings/js/DOMObjectWithSVGContext.h: Removed.
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::setDOMException): Add comment, that passing 0 context is intentional.
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::createDOMObjectWrapper): Add to JSSVGContextCache, when creating wrappers.
+ (WebCore::getDOMObjectWrapper): Add assertion guarding the JSSVGContextCache is in-sync with the passed context.
+ * bindings/js/JSSVGContextCache.h: Added. Maps DOMObjects to SVGElements - just like V8 approachs to this problem.
+ (WebCore::JSSVGContextCache::wrapperMap):
+ (WebCore::JSSVGContextCache::addWrapper):
+ (WebCore::JSSVGContextCache::forgetWrapper):
+ (WebCore::JSSVGContextCache::propagateSVGDOMChange):
+ (WebCore::JSSVGContextCache::svgContextForDOMObject):
+ * bindings/js/JSSVGLengthCustom.cpp: Retrieve context from cache, instead of taking it from the JS* class.
+ (WebCore::JSSVGLength::value):
+ (WebCore::JSSVGLength::convertToSpecifiedUnits):
+ * bindings/js/JSSVGMatrixCustom.cpp Ditto.:
+ (WebCore::JSSVGMatrix::multiply):
+ (WebCore::JSSVGMatrix::inverse):
+ (WebCore::JSSVGMatrix::rotateFromVector):
+ * bindings/js/JSSVGPODListCustom.h: Ditto.
+ (WebCore::JSSVGPODListCustom::finishGetter):
+ (WebCore::JSSVGPODListCustom::finishSetter):
+ (WebCore::JSSVGPODListCustom::finishSetterReadOnlyResult):
+ (WebCore::JSSVGPODListCustom::clear):
+ (WebCore::JSSVGPODListCustom::initialize):
+ * bindings/js/JSSVGPODTypeWrapper.h: Ditto.
+ (WebCore::JSSVGDynamicPODTypeWrapper::commitChange):
+ (WebCore::JSSVGStaticPODTypeWrapper::commitChange):
+ (WebCore::JSSVGStaticPODTypeWrapperWithPODTypeParent::commitChange):
+ (WebCore::JSSVGStaticPODTypeWrapperWithParent::commitChange):
+ (WebCore::JSSVGPODTypeWrapperCreatorForList::create):
+ (WebCore::JSSVGPODTypeWrapperCreatorForList::commitChange):
+ * bindings/js/JSSVGPathSegCustom.cpp: Ditto.
+ (WebCore::toJS):
+ * bindings/js/JSSVGPathSegListCustom.cpp: Ditto.
+ (WebCore::JSSVGPathSegList::clear):
+ (WebCore::JSSVGPathSegList::initialize):
+ (WebCore::JSSVGPathSegList::getItem):
+ (WebCore::JSSVGPathSegList::insertItemBefore):
+ (WebCore::JSSVGPathSegList::replaceItem):
+ (WebCore::JSSVGPathSegList::removeItem):
+ (WebCore::JSSVGPathSegList::appendItem):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * svg/SVGAngle.h: Remove unneeded associatedAttributeName() method.
+ * svg/SVGPreserveAspectRatio.h: Ditto.
+ * svg/SVGTransform.h: Ditto.
+
+2010-01-21 Kevin Ollivier <kevino@theolliviers.com>
+
+ Build fix, add missing header.
+
+ * dom/ScriptExecutionContext.cpp:
+
+2010-01-21 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ -webkit-mask-box-image draws a box while loading
+ https://bugs.webkit.org/show_bug.cgi?id=33979
+ <rdar://problem/7378662>
+
+ Don't render masked elements until the mask images are fully loaded.
+
+ Test: http/tests/misc/slow-loading-mask.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::paintMaskImages): Check that all mask images (both the single mask-box-image,
+ and the possibly multiple mask-image) are fully loaded before allowing the masked content to render.
+ If they are not fully loaded, use a fully transparent transparency layer.
+
+ * rendering/style/FillLayer.h:
+ * rendering/style/FillLayer.cpp:
+ (WebCore::FillLayer::imagesAreLoaded): New utility function that returns true if the image
+ in every FillLayer is loaded.
+
+2010-01-21 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ REGRESSION (r52795): New message created in response to mailto: URL has random character in message body
+ rdar://problem/7565902
+
+ This regression affects the Mac OS X Mail application.
+ I was not able to find a simple way to create a regression test.
+
+ * platform/cf/SharedBufferCF.cpp:
+ (WebCore::SharedBuffer::SharedBuffer): Initialize m_size to 0 as in the other constructors.
+
+2010-01-21 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Script tags are copied and pasted, making cross-domain attacks possible.
+ https://bugs.webkit.org/show_bug.cgi?id=33970
+
+ Tests: editing/pasteboard/paste-noscript-svg.html
+ editing/pasteboard/paste-visible-script.html
+
+ We remove the content and the attributes of every script tag before
+ pasting into the destination.
+
+ * dom/Element.cpp:
+ (WebCore::Element::setAttributeMap): Now we are removing xlink:href
+ if it contains javascript protocol.
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::parseToken): We strip all the script tag attributes
+ we are parsing to create a fragment to paste.
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::HTMLTokenizer):
+ (WebCore::HTMLTokenizer::scriptHandler): Removes the script text after it was parsed.
+ * html/HTMLTokenizer.h:
+
+2010-01-21 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ <use> with % lengths does not update on window resize
+ https://bugs.webkit.org/show_bug.cgi?id=14639
+
+ appendChild broken for symbol-use
+ https://bugs.webkit.org/show_bug.cgi?id=24802
+
+ Test: svg/custom/relative-sized-shadow-tree-content-with-symbol.xhtml
+ svg/custom/svg/custom/relative-sized-use-on-symbol.xhtml
+
+ Fix reaction on window size changes for relative sized elements within <symbol> elements.
+ Don't evaluate SVGUseElement width/height attributes in order to propagate them to the shadow tree,
+ instead just propagate the attribute values itself so "100%" remains "100%" instead of being evaluated
+ to an absolute pixel value in the parent <svg> user-space.
+
+ Needs another fix in SVGStyledElement::childrenChanged(), which is a regression from my last <use>
+ patch, that hasn't been detected, as the use-dynamic-append.svg testcase was broken.
+
+ The combination of all the last <use> patches finally fixes the peepo.co.uk website, which was broken by several bugs for years.
+
+ * svg/SVGStyledElement.cpp:
+ (WebCore::SVGStyledElement::childrenChanged): Need to mark shadow trees needing recalcs, even when parsing.
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::svgAttributeChanged): Don't reclone for width/height attribute changes, just propagate them down the render tree
+ (WebCore::updateContainerSize): Added helper function, updating the width/height attributes in the shadow tree.
+ (WebCore::SVGUseElement::updateContainerSizes):
+ (WebCore::SVGUseElement::buildShadowAndInstanceTree): Update container width/height after shadow tree creation, instead of doing it inbetween.
+ (WebCore::SVGUseElement::buildShadowTree): Don't alter width/height attributes here anymore.
+ (WebCore::SVGUseElement::expandUseElementsInShadowTree): Ditto.
+ (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Ditto.
+ * svg/SVGUseElement.h:
+
+2010-01-21 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33972
+ Assertion failure in FrameLoader::checkLoadComplete()
+
+ I couldn't make a test for this, after trying rather hard. I'm not too worried, because such
+ a test has to depend on details of current implementation so intimately that it would become
+ ineffective very quickly anyway.
+
+ * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopAllLoaders): Stop the check timer, we
+ don't need it after aborting load.
+
+2010-01-21 Csaba Osztrogonác <ossy@webkit.org>
+
+ Reviewed by Dave Hyatt.
+
+ Buildfix for r53646.
+
+ * bindings/js/SerializedScriptValue.cpp: path of JSLock.h fixed.
+
+2010-01-21 Csaba Osztrogonác <ossy@webkit.org>
+
+ Unreviewed buildfix after r53644.
+
+ * platform/Scrollbar.cpp:
+ (WebCore::Scrollbar::scroll): missing HAVE(ACCESSIBILITY) guard added.
+
+2010-01-21 Darin Fisher <darin@chromium.org>
+
+ Reviewed by David Levin.
+
+ Unnecessary call to HistoryItem::targetItem in HistoryController::pushState
+ https://bugs.webkit.org/show_bug.cgi?id=33969
+
+ * loader/HistoryController.cpp:
+ (WebCore::HistoryController::pushState): Remove unnecessary code.
+
+2010-01-21 Dmitry Titov <dimich@chromium.org>
+
+ Not reviewed, Chromium build fix. Add AccessibilityScrollbar.h and .cpp to WebCore.gypi
+
+ * WebCore.gypi:
+
+2010-01-21 Albert J. Wong <ajwong@chromium.org>
+
+ [chromium] Unreviewed build fix.
+
+ Fix possible use of initialized variable warning in release mode.
+
+ * bindings/v8/SerializedScriptValue.cpp:
+ (WebCore::ZigZag::Deserializer::doDeserialize):
+
+2010-01-21 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Unreviewed buildfix after r53644.
+
+ * WebCore.pro: accessibility/AccessibilityScrollbar.cpp and accessibility/AccessibilityScrollbar.h added.
+
+2010-01-21 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Make sure to do a JSLock before deserialization of script values, since they can heap allocate.
+
+ * bindings/js/SerializedScriptValue.cpp:
+ (WebCore::SerializedScriptValueData::deserialize):
+
+2010-01-21 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=33923 REGRESSION
+ (Safari 4): AXValueChanged no longer sent for text area scrollbars
+ -and corresponding-
+ <rdar://problem/6942686>
+
+ New class AccessibilityScrollbar inherits directly from
+ AccessibilityObject.
+ * accessibility/AccessibilityScrollbar.cpp: Added.
+ (WebCore::AccessibilityScrollbar::AccessibilityScrollbar):
+ (WebCore::AccessibilityScrollbar::create):
+ (WebCore::AccessibilityScrollbar::valueForRange):
+ * accessibility/AccessibilityScrollbar.h: Added.
+ (WebCore::AccessibilityScrollbar::setScrollbar):
+ (WebCore::AccessibilityScrollbar::roleValue):
+ (WebCore::AccessibilityScrollbar::accessibilityIsIgnored):
+ (WebCore::AccessibilityScrollbar::size):
+ (WebCore::AccessibilityScrollbar::elementRect):
+ (WebCore::AccessibilityScrollbar::parentObject):
+
+ AXObjectCache::getOrCreate() now has a case for ScrollBarRole,
+ which will create a new AccessibilityScrollbar. I also added a new
+ version of postNotification() that does not require a renderer. The
+ old postNotification() calls the new one.
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::getOrCreate):
+ (WebCore::AXObjectCache::postNotification):
+ * accessibility/AXObjectCache.h:
+
+ When AX is enabled, getOrCreate an AccessibilityScrollbar and send
+ a notification.
+ * platform/Scrollbar.cpp:
+ (WebCore::Scrollbar::scroll):
+
+ Fix project files.
+ * GNUmakefile.am:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+
+2010-01-21 Eric Uhrhane <ericu@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Add changes missing from r53595, without which Chromium has no database.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33966
+
+ No new tests - fixes database layout tests in Chromium.
+
+ * bindings/v8/RuntimeEnabledFeatures.cpp:
+ * bindings/v8/RuntimeEnabledFeatures.h:
+
+2010-01-21 Jakob Petsovits <jpetsovits@rim.com>
+
+ Reviewed by Adam Treat.
+
+ Don't call vgGetError()/eglGetError() repeatedly
+ https://bugs.webkit.org/show_bug.cgi?id=33959
+
+ For vgGetError(), I missed the part of the spec where
+ it says that calling that function clears the error
+ and subsequent calls will return VG_NO_ERROR again.
+
+ For eglGetError(), the specification doesn't mention
+ that kind of behavior, and interpretations seem to
+ differ between EGL implementations (even within
+ Khronos: the OpenVG reference implementation doesn't
+ reset the error code - and even mentions the difference
+ to vgGetError() in a comment - whereas the online
+ OpenGL ES API document explicitly specifies clearing
+ the error code).
+
+ It thus makes sense not to call either of the two
+ error functions more than once for checking a single
+ EGL/OpenVG call. This patch adapts assertions to
+ accommodate for this behavior, and also needs to
+ change surface creation methods as they previously
+ relied on multiple calls of eglGetError().
+
+ * platform/graphics/openvg/EGLDisplayOpenVG.cpp:
+ (WebCore::EGLDisplayOpenVG::sharedPlatformSurface):
+ (WebCore::EGLDisplayOpenVG::createPbufferSurface):
+ * platform/graphics/openvg/EGLDisplayOpenVG.h:
+ * platform/graphics/openvg/EGLUtils.h:
+ * platform/graphics/openvg/SurfaceOpenVG.cpp:
+ (WebCore::SurfaceOpenVG::SurfaceOpenVG):
+ * platform/graphics/openvg/SurfaceOpenVG.h:
+ * platform/graphics/openvg/VGUtils.h:
+
+2010-01-20 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Hit testing on composited plugins is broken
+ https://bugs.webkit.org/show_bug.cgi?id=33927
+ <rdar://problem/7559069>
+
+ RenderWidget::paint()'s strategy of moving widgets at paint time, using tx and ty, was flawed
+ because tx,ty are not always root-relative, especially when painting into compositing layers.
+ This would move widgets to the wrong location, which caused hit testing issues.
+
+ Widgets are usually positioned by layout. The one time this was not true was scrolling fixed-position
+ elements, so we now reposition widgets after scrolling too.
+
+ There was a related problem, which was that widgets expect the graphics context to be set up for
+ root-relative painting. To fix this, adjust the CTM and the paintRect when the widget's frameRect
+ is in a different coordinate system to the painting offset.
+
+ Test: plugins/mouse-events-fixedpos.html
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::scrollPositionChanged): Update widget positions, to handle widgets in fixed position
+ elements, but only if we're not already inside of layout.
+
+ * platform/graphics/GraphicsContext.h:
+ (WebCore::GraphicsContext::translate): Add a translate() convenience method that takes a FloatSize.
+
+ * platform/graphics/IntSize.h:
+ (WebCore::IntSize::isZero): Add a convenience method for testing for a zero size.
+
+ * platform/mac/WidgetMac.mm:
+ (WebCore::Widget::paint): Adjust a comment.
+
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::paint): Detect when the widget's frame is in a different coordinate system
+ to painting, and adjust the CTM and paintRect in that case.
+
+2010-01-21 Andrei Popescu <andreip@google.com>
+
+ Reviewed by David Levin.
+
+ [Android] bindings/v8/NPV8Object.cpp does not compile on Android
+ https://bugs.webkit.org/show_bug.cgi?id=33608
+
+ Use the standard WebKit header in bridge/npruntime.h.
+ Include PlatformBridge.h instead of ChroimiumBridge.h.
+ Add popupsAllowed() method to PlatformBridge.h on Android.
+ Add ARRAYSIZE_UNSAFE to PlatformBridge.h on Android.
+
+ No new tests, fixing the build.
+
+ * bindings/v8/NPV8Object.cpp:
+ (_NPN_Evaluate):
+ * bindings/v8/NPV8Object.h:
+ * platform/android/PlatformBridge.h:
+
+2010-01-21 Andrei Popescu <andreip@google.com>
+
+ Reviewed by David Levin.
+
+ Add PlatformBridge.h header and a typedef to give ChromiumBridge a new name: PlatformBridge.
+ https://bugs.webkit.org/show_bug.cgi?id=33917
+
+ No new tests needed, this is just to allow other methods to call ChromiumBridge
+ using the new 'PlatformBridge' name.
+
+ * platform/chromium/PlatformBridge.h: Added.
+
+2010-01-21 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Unreviewed buildfix after r53625.
+
+ Cleanup MediaPlayer and MediaPlayerPrivateInterface to remove dead methods
+ https://bugs.webkit.org/show_bug.cgi?id=30106
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::paintMediaSliderTrack):
+
+2010-01-21 Andrei Popescu <andreip@google.com>
+
+ Reviewed by David Levin.
+
+ [Android] bindings/v8/V8DOMWrapper.h[cpp] are missing guards for XPATH and XSLT features
+ https://bugs.webkit.org/show_bug.cgi?id=33944
+
+ Inside V8DOMWrapper.h[cpp], the code for XPATH and XSLT features is not guarded
+ by the appropriate #if ENABLE(feature) macros. Add the missing guards.
+ V8DOMWrapper.cpp includes ChromiumBridge.h for no reason. Remove the include.
+
+ No new tests needed, functionality not changed.
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ * bindings/v8/V8DOMWrapper.h:
+
+2010-01-21 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Intermittent crash when media element is adopted by another document
+ https://bugs.webkit.org/show_bug.cgi?id=33919
+ rdar://problem/7557527
+
+ Test: media/adopt-node-crash.html
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::willMoveToNewOwnerDocument): Unregister for
+ document callbacks.
+ (WebCore::HTMLMediaElement::didMoveToNewOwnerDocument): Register for
+ document callbacks.
+ * html/HTMLMediaElement.h:
+
+2010-01-21 Adam Roben <aroben@apple.com>
+
+ More Windows build fixing
+
+ * WebCore.vcproj/WebCore.vcproj: Copy bridge/jsc in the post-build
+ event of all configurations, not just Debug.
+
+2010-01-21 Thiago Macieira <thiago.macieira@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix incorrect dependency to QtXmlPatterns in generated include/QtWebKit/QtWebKit header
+
+ The generated file includes QtXmlPatterns/QtXmlPatterns, which is neither used/required by
+ the public QtWebKit API nor will it be available if Qt is configured with -no-xmlpatterns.
+
+ * WebCore.pro: Trick syncqt to believe that xmlpatterns is not a dependency, so that it's not
+ included in the generated file. It'll still be used and linked to with this trick.
+
+2010-01-21 Steve Block <steveblock@google.com>
+
+ Unreviewed build fix.
+
+ Copy BridgeJSC.h to generated headers on Windows
+
+ No new tests, build fix only.
+
+ * WebCore.vcproj/WebCore.vcproj:
+
+2010-01-21 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Cleanup MediaPlayer and MediaPlayerPrivateInterface to remove dead methods
+ https://bugs.webkit.org/show_bug.cgi?id=30106
+
+ No new tests, only dead code was removed.
+
+ * platform/graphics/MediaPlayer.cpp:
+ * platform/graphics/MediaPlayer.h:
+ * platform/graphics/MediaPlayerPrivate.h:
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::currentTime):
+ (WebCore::MediaPlayerPrivate::doSeek):
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
+ * platform/graphics/wince/MediaPlayerPrivateWince.h:
+
+2010-01-21 Iain Campbell <iain.campbell@accenture.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Simplify the qmake code for freezing QtWebKit on Symbian.
+
+ * WebCore.pro:
+
+2010-01-21 Steve Block <steveblock@google.com>
+
+ Unreviewed speculative build fix for Windows.
+
+ Adds missing include path for JSCBridge.h on Windows, added in http://trac.webkit.org/changeset/53620
+
+ No new tests, build fix only.
+
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+
+2010-01-21 Steve Block <steveblock@google.com>
+
+ Unreviewed build fix.
+
+ Adds missing include path for JSCBridge.h, added in http://trac.webkit.org/changeset/53620
+
+ No new tests, build fix only.
+
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+
+2010-01-21 Steve Block <steveblock@google.com>
+
+ Reviewed by David Levin.
+
+ Move bridge interfaces Field, Class, Instance and Array from Bridge to BridgeJSC
+ https://bugs.webkit.org/show_bug.cgi?id=33589
+
+ These interfaces use JSC-specific types, so are moved out of Bridge.h to allow the file to
+ be used with both JSC and V8.
+
+ No new tests, refactoring only.
+
+ * Android.jscbindings.mk: Modified. Removed Bridge.cpp and added BridgeJSC.cpp
+ * GNUmakefile.am: Modified. Removed Bridge.cpp and added BridgeJSC.[cpp|h]
+ * WebCore.pro: Modified. Removed Bridge.cpp and added BridgeJSC.[cpp|h]
+ * WebCore.xcodeproj/project.pbxproj: Modified. Removed Bridge.cpp and added BridgeJSC.[cpp|h]
+ * WebCoreSources.bkl: Modified. Removed Bridge.cpp and added BridgeJSC.cpp
+ * bridge/Bridge.cpp: Removed.
+ * bridge/Bridge.h: Modfied. Moved Field, Class, Instance and Array interfaces to BridgeJSC.h
+ * bridge/jsc: Added.
+ * bridge/jsc/BridgeJSC.cpp: Copied from WebCore/bridge/Bridge.cpp.
+ * bridge/jsc/BridgeJSC.h: Copied from WebCore/bridge/Bridge.h.
+
+2010-01-21 Steve Block <steveblock@google.com>
+
+ Reviewed by David Levin.
+
+ Fixes style in WebCore/bridge/jni/JNIBridge
+ https://bugs.webkit.org/show_bug.cgi?id=33914
+
+ No new tests, style fixes only.
+
+ * bridge/jni/JNIBridge.cpp:
+ * bridge/jni/JNIBridge.h:
+
+2010-01-13 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Oliver Hunt.
+
+ [GTK] handle media redirections
+ https://bugs.webkit.org/show_bug.cgi?id=33539
+
+ Media redirections support.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mediaPlayerPrivateMessageCallback):
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::mediaLocationChanged):
+ (WebCore::MediaPlayerPrivate::loadNextLocation):
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+ (WebCore::MediaPlayerPrivate::pipelineReset):
+
+2010-01-21 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Antti Koivisto.
+
+ [Qt] Implement GraphicsLayer for accelerated layer compositing
+ https://bugs.webkit.org/show_bug.cgi?id=33514
+
+ No new tests: tests in LayoutTests/compositing are now relevant for
+ QtWebkit!
+
+ * WebCore.pro: added accelerated-compositing related files
+ * platform/graphics/GraphicsLayer.h: define Qt-specific implementation of GraphicsLayer
+ * platform/graphics/qt/GraphicsLayerQt.cpp: Added.
+ (WebCore::GraphicsLayerQtImpl::): Implementation of GraphicsLayer with
+ a QGraphicsItem
+ (WebCore::GraphicsLayerQtImpl::ContentData::ContentData): save
+ pixmap/color info for directly composited content
+ (WebCore::GraphicsLayerQtImpl::State::State): save info for syncing
+ (WebCore::GraphicsLayerQtImpl::GraphicsLayerQtImpl): ctor
+ (WebCore::GraphicsLayerQtImpl::~GraphicsLayerQtImpl): dtor
+ (WebCore::GraphicsLayerQtImpl::setBaseTransform): set Qt
+ transformation in the way WebCore wants it
+ (WebCore::GraphicsLayerQtImpl::opaqueArea): calculate opaque area
+ based on info we have
+ (WebCore::GraphicsLayerQtImpl::boundingRect): reimp QGraphicsItem
+ (WebCore::GraphicsLayerQtImpl::paint): reimp QGraphicsItem
+ (WebCore::GraphicsLayerQtImpl::drawContents): draw HTML/Pixmap/Color
+ (WebCore::GraphicsLayerQtImpl::notifyChange): let WebCore know
+ something has changed
+ (WebCore::GraphicsLayerQtImpl::flushChanges): Make the changes appear
+ on screen by setting them to QGraphicsItems
+ (WebCore::GraphicsLayerQtImpl::notifyAnimationStarted): let WebCore
+ know the QAnimation started
+ (WebCore::GraphicsLayerQt::GraphicsLayerQt): ctor
+ (WebCore::GraphicsLayerQt::~GraphicsLayerQt): dtor
+ (WebCore::GraphicsLayer::create): hook for WebCore to know we're
+ implementing compositing
+ (WebCore::GraphicsLayer::compositingCoordinatesOrientation): hook for
+ WebCore to know we use a top-down system
+ (WebCore::GraphicsLayerQt::setNeedsDisplay): update the display
+ (WebCore::GraphicsLayerQt::setNeedsDisplayInRect): udpate part of the
+ display
+ (WebCore::GraphicsLayerQt::setName): reimp
+ (WebCore::GraphicsLayerQt::setParent): reimp
+ (WebCore::GraphicsLayerQt::setChildren): reimp
+ (WebCore::GraphicsLayerQt::addChild): reimp
+ (WebCore::GraphicsLayerQt::addChildAtIndex): reimp
+ (WebCore::GraphicsLayerQt::addChildAbove): reimp
+ (WebCore::GraphicsLayerQt::addChildBelow): reimp
+ (WebCore::GraphicsLayerQt::replaceChild): reimp
+ (WebCore::GraphicsLayerQt::removeFromParent): reimp
+ (WebCore::GraphicsLayerQt::setMaskLayer): reimp
+ (WebCore::GraphicsLayerQt::setPosition): reimp
+ (WebCore::GraphicsLayerQt::setAnchorPoint): reimp
+ (WebCore::GraphicsLayerQt::setSize): reimp
+ (WebCore::GraphicsLayerQt::setTransform): reimp
+ (WebCore::GraphicsLayerQt::setChildrenTransform): reimp
+ (WebCore::GraphicsLayerQt::setPreserves3D): reimp
+ (WebCore::GraphicsLayerQt::setMasksToBounds): reimp
+ (WebCore::GraphicsLayerQt::setDrawsContent): reimp
+ (WebCore::GraphicsLayerQt::setBackgroundColor): reimp
+ (WebCore::GraphicsLayerQt::clearBackgroundColor): reimp
+ (WebCore::GraphicsLayerQt::setContentsOpaque): reimp
+ (WebCore::GraphicsLayerQt::setBackfaceVisibility): reimp
+ (WebCore::GraphicsLayerQt::setOpacity): reimp
+ (WebCore::GraphicsLayerQt::setContentsRect): reimp
+ (WebCore::GraphicsLayerQt::setContentsToImage): reimp
+ (WebCore::GraphicsLayerQt::setContentsBackgroundColor): reimp
+ (WebCore::GraphicsLayerQt::setGeometryOrientation): reimp
+ (WebCore::GraphicsLayerQt::setContentsOrientation): reimp
+ (WebCore::GraphicsLayerQt::distributeOpacity): reimp
+ (WebCore::GraphicsLayerQt::accumulatedOpacity): reimp
+ (WebCore::GraphicsLayerQt::syncCompositingState): reimp
+ (WebCore::GraphicsLayerQt::nativeLayer): reimp (QGraphicsItem*)
+ (WebCore::GraphicsLayerQt::platformLayer): reimp (QGraphicsItem*)
+ (WebCore::solveEpsilon): copy from AnimationBase.cpp
+ (WebCore::solveCubicBezierFunction): copy from AniamtionBase.cpp
+ (WebCore::applyTimingFunction): use WebCore's timing and not Qt's
+ (WebCore::webkitAnimationToQtAnimationValue): safely figure out
+ animation values
+ (WebCore::AnimationQtBase::AnimationQtBase): base class for Qt-based
+ Webcore-initiated animations
+ (WebCore::AnimationQtBase::updateState): notify when an animation
+ starts
+ (WebCore::AnimationQtBase::duration): reimp QAbstractAnimation
+ (WebCore::AnimationQt:::AnimationQtBase):
+ (WebCore::AnimationQt::updateCurrentTime): realize keyframes from
+ progress
+ (WebCore::TransformAnimationQt::TransformAnimationQt): ctor
+ (WebCore::TransformAnimationQt::~TransformAnimationQt): dtor
+ (WebCore::TransformAnimationQt::applyFrame): set the actual QTransform
+ based on WebCore TransformOperations
+ (WebCore::TransformAnimationQt::updateState): change cache mode
+ (WebCore::OpacityAnimationQt::OpacityAnimationQt):
+ (WebCore::OpacityAnimationQt::applyFrame): change item's opacity
+ (WebCore::OpacityAnimationQt::updateState):
+ (WebCore::GraphicsLayerQt::addAnimation): convert WebCore Animation to
+ Qt Animation
+ (WebCore::GraphicsLayerQt::removeAnimationsForProperty):
+ (WebCore::GraphicsLayerQt::removeAnimationsForKeyframes):
+ (WebCore::GraphicsLayerQt::pauseAnimation):
+ (WebCore::GraphicsLayerQt::suspendAnimations):
+ (WebCore::GraphicsLayerQt::resumeAnimations):
+ * platform/graphics/qt/GraphicsLayerQt.h: Added.
+ * platform/qt/QWebPageClient.h: virtual functions for QGraphicsWebView
+ compositing
+ (QWebPageClient::setRootGraphicsLayer): let QGraphicsWebView know that
+ compositing has started/ended
+ (QWebPageClient::markForSync): let QGraphicsWebView know the
+ compositing layers need to sync, either soon or with the next update
+
+2010-01-21 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Adding QPixmap/QImage support for the Qt hybrid layer
+ Allows accesing QPixmap and QImage based arguments from Qt signals,
+ slots and properties
+ This is done by an intermediate object that can be turned into
+ web-based objects by calling either toHTMLImageElement() or
+ toDataURL()
+ https://bugs.webkit.org/show_bug.cgi?id=32461
+
+ Tests are in WebKit/qt/tests/hybridPixmap
+
+ * WebCore.pro:
+ * bridge/qt/qt_pixmapruntime.cpp: Added.
+ (JSC::Bindings::QtPixmapWidthField::name): "width"
+ (JSC::Bindings::QtPixmapWidthField::valueFromInstance): width of
+ pixmap
+ (JSC::Bindings::QtPixmapWidthField::setValueToInstance): nothing
+ (JSC::Bindings::QtPixmapHeightField::name): "height"
+ (JSC::Bindings::QtPixmapHeightField::valueFromInstance): height of
+ pixmap
+ (JSC::Bindings::QtPixmapHeightField::setValueToInstance): nothing
+ (JSC::Bindings::QtPixmapRuntimeMethod::numParameters): 0
+ (JSC::Bindings::QtPixmapCreateElementMethod::name): toHTMLImageElement
+ (JSC::Bindings::QtPixmapCreateElementMethod::invoke): creates an HTML
+ element from the QPixmap
+ (JSC::Bindings::QtPixmapToDataUrlMethod::name): "toDataURL"
+ (JSC::Bindings::QtPixmapToDataUrlMethod::invoke): encodes the image to
+ a base64 data url
+ (JSC::Bindings::QtPixmapToStringMethod::name): "toString"
+ (JSC::Bindings::QtPixmapToStringMethod::invoke): [Qt Native Pixmap
+ w,h]
+
+ (JSC::Bindings::QtPixmapRuntimeObjectImp::createStructure):
+ runtime-object broilerplate
+ (JSC::Bindings::QtPixmapRuntimeObjectImp::classInfo): ditto
+ (JSC::Bindings::QtPixmapRuntimeObjectImp::QtPixmapRuntimeObjectImp):
+ ditto
+ (JSC::Bindings::): ditto
+ (JSC::Bindings::QtPixmapClass::QtPixmapClass): class for the
+ intermediate pixmap-holder
+ (JSC::Bindings::QtPixmapInstance::getClass): ditto
+ (JSC::Bindings::QtPixmapInstance::invokeMethod): ditto
+ (JSC::Bindings::QtPixmapClass::methodsNamed): toHTMLImageElement,
+ toDataURL
+ (JSC::Bindings::QtPixmapClass::fieldNamed): width, height
+ (JSC::Bindings::QtPixmapInstance::getPropertyNames):
+ toHTMLImageElement, toDataURL, width, height
+ (JSC::Bindings::QtPixmapInstance::defaultValue): nothing
+ (JSC::Bindings::QtPixmapInstance::valueOf): toString
+ (JSC::Bindings::data): holds a QVariant of type QImage/QPixmap
+ (JSC::Bindings::QtPixmapInstance::width): width of the image/pixmap
+ (JSC::Bindings::QtPixmapInstance::height): height of the image/pixmap
+ (JSC::Bindings::QtPixmapInstance::toPixmap): converts to a QPixmap
+ (JSC::Bindings::QtPixmapInstance::toImage): converts to a QImage
+ (JSC::Bindings::QtPixmapInstance::variantFromObject): makes sure this
+ is the right type of object, and creates a QVariant
+ (JSC::Bindings::QtPixmapInstance::createRuntimeObject): creates a new
+ intermediate pixmap holder from a QVariant
+ (JSC::Bindings::QtPixmapInstance::canHandle): returns true if a
+ QPixmap/QImage is required
+ * bridge/qt/qt_pixmapruntime.h: Added.
+ * bridge/qt/qt_runtime.cpp: hooks for the bridge
+ (JSC::Bindings::convertValueToQVariant): handle QPixmap/QImage if the
+ object is the intermediate pixmap holder or an HTMLImageElement
+ (JSC::Bindings::convertQVariantToValue): creates the intermediate
+ object from a QVariant of type QImage/QPixmap
+
+2010-01-21 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Custom select popups.
+ https://bugs.webkit.org/show_bug.cgi?id=33418
+
+ Optimization of the WebCore support to combobox popup delegate.
+
+ * platform/qt/PopupMenuQt.cpp:
+ (WebCore::PopupMenu::show):
+ * platform/qt/QtAbstractWebPopup.cpp:
+ (WebCore::QtAbstractWebPopup::QtAbstractWebPopup):
+ (WebCore::QtAbstractWebPopup::itemType):
+ * platform/qt/QtAbstractWebPopup.h:
+ (WebCore::QtAbstractWebPopup::):
+ (WebCore::QtAbstractWebPopup::itemText):
+ (WebCore::QtAbstractWebPopup::itemToolTip):
+ (WebCore::QtAbstractWebPopup::itemIsEnabled):
+ (WebCore::QtAbstractWebPopup::itemCount):
+ (WebCore::QtAbstractWebPopup::view):
+ (WebCore::QtAbstractWebPopup::geometry):
+ (WebCore::QtAbstractWebPopup::currentIndex):
+ (WebCore::QtAbstractWebPopup::font):
+
+2010-01-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Stylesheet href property shows redirected URL unlike other browsers
+ https://bugs.webkit.org/show_bug.cgi?id=33683
+
+ Teach StyleSheet the difference between original and final URLs in
+ redirect chains. Unfortunately, StyleSheet needs to know both of these
+ URLs. The original URL is needed for the href property and the final
+ URL is needed as the baseURL.
+
+ This change required touching a lot of lines of code because we need to
+ plumb this information to the StyleSheet object. I audited all
+ existing clients of href() and setHref() to see whether they wanted the
+ original or final URLs. I then updated the clients (except the JS
+ bindings themselves) to use the correct accessor.
+
+ Test: http/tests/security/stylesheet-href-redirect.html
+
+ * css/CSSImportRule.cpp:
+ (WebCore::CSSImportRule::setCSSStyleSheet):
+ (WebCore::CSSImportRule::insertedIntoParent):
+ * css/CSSImportRule.h:
+ * css/CSSStyleSheet.cpp:
+ (WebCore::CSSStyleSheet::CSSStyleSheet):
+ * css/CSSStyleSheet.h:
+ (WebCore::CSSStyleSheet::create):
+ (WebCore::CSSStyleSheet::createInline): Added a new constructor to deal
+ with "inline" style sheets that don't have a distinct original and
+ final URL.
+ * css/StyleBase.cpp:
+ (WebCore::StyleBase::baseURL): This code wants to use the final URL,
+ not the original URL. Updated it to grab the baseURL directly.
+ * css/StyleSheet.cpp:
+ (WebCore::StyleSheet::StyleSheet):
+ * css/StyleSheet.h:
+ (WebCore::StyleSheet::href):
+ (WebCore::StyleSheet::setBaseURL): This function really just updates
+ the base URL of the style sheet, so I made it more explicit.
+ (WebCore::StyleSheet::putativeBaseURL): We need an accessor for the
+ base URL, but baseURL is already taken.
+ * dom/Document.cpp:
+ (WebCore::Document::updateBaseURL):
+ (WebCore::Document::pageUserSheet):
+ (WebCore::Document::pageGroupUserSheets):
+ (WebCore::Document::elementSheet):
+ (WebCore::Document::mappedElementSheet):
+ * dom/ProcessingInstruction.cpp:
+ (WebCore::ProcessingInstruction::checkStyleSheet):
+ (WebCore::ProcessingInstruction::setCSSStyleSheet):
+ (WebCore::ProcessingInstruction::setXSLStyleSheet):
+ * dom/ProcessingInstruction.h:
+ * dom/StyleElement.cpp:
+ (WebCore::StyleElement::createSheet):
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::setCSSStyleSheet):
+ * html/HTMLLinkElement.h:
+ * loader/CachedCSSStyleSheet.cpp:
+ (WebCore::CachedCSSStyleSheet::didAddClient):
+ (WebCore::CachedCSSStyleSheet::checkNotify): This code now passes both
+ the original and final URL into setCSSStyleSheet so that the style
+ sheet can have both.
+ * loader/CachedResourceClient.h:
+ (WebCore::CachedResourceClient::setCSSStyleSheet):
+ (WebCore::CachedResourceClient::setXSLStyleSheet):
+ * loader/CachedXSLStyleSheet.cpp:
+ (WebCore::CachedXSLStyleSheet::didAddClient):
+ (WebCore::CachedXSLStyleSheet::checkNotify): I don't have any direct
+ evidence that we need to change the XSLStyleSheet behavior, which is
+ why I wasn't able to add a test for the behavior. However, the objects
+ are parallel enough that it seemed like the right thing to do.
+ * xml/XSLImportRule.cpp:
+ (WebCore::XSLImportRule::setXSLStyleSheet):
+ (WebCore::XSLImportRule::loadSheet):
+ * xml/XSLImportRule.h:
+ * xml/XSLStyleSheet.h:
+ (WebCore::XSLStyleSheet::create):
+ (WebCore::XSLStyleSheet::createEmbedded):
+ * xml/XSLStyleSheetLibxslt.cpp:
+ (WebCore::XSLStyleSheet::XSLStyleSheet):
+ (WebCore::XSLStyleSheet::parseString):
+ (WebCore::XSLStyleSheet::loadChildSheets):
+ * xml/XSLStyleSheetQt.cpp:
+ (WebCore::XSLStyleSheet::XSLStyleSheet):
+ * xml/XSLTProcessorLibxslt.cpp:
+ (WebCore::xsltStylesheetPointer):
+ * xml/XSLTProcessorQt.cpp:
+ (WebCore::XSLTProcessor::transformToString):
+
+2010-01-20 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Use xmlStrdup instead of strdup for consistency in Libxml2.
+ https://bugs.webkit.org/show_bug.cgi?id=33935
+
+ Remove the direct use of strdup.
+
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::PendingCallbacks::appendErrorCallback):
+ (WebCore::PendingCallbacks::):
+ (WebCore::XMLTokenizer::error):
+
+2010-01-20 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Insufficient repaint issues with html embedded in foreignObject
+ https://bugs.webkit.org/show_bug.cgi?id=16318
+
+ Final part of fix -- now we render the selection rect of list
+ markers in a transformed context.
+
+ * rendering/RenderListMarker.cpp:
+ (WebCore::RenderListMarker::localSelectionRect):
+ (WebCore::RenderListMarker::paint):
+ * rendering/RenderListMarker.h:
+
+2010-01-20 Daniel Bates <dbates@webkit.org>
+
+ No review, rolling out 53591.
+ http://trac.webkit.org/changeset/53591
+ https://bugs.webkit.org/show_bug.cgi?id=29564
+
+ Rolling out the change committed in change set 53591
+ <http://trac.webkit.org/changeset/53591> because it caused
+ a regression of test /fast/replaced/table-percent-height.html
+ on the Qt bot.
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::adjustButtonStyle):
+
+2010-01-20 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by David Levin.
+
+ Disable the "seatbelt" coordinate validation functions in the
+ Skia graphics layer. We believe all the underlying bugs have
+ been fixed, but just in case we're being overly optimistic, this
+ leaves in the code for an easy revert.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33908
+ Exercised by many layout tests.
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+
+2010-01-20 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ HTMLInputElement::valueAsDate setter support for type=date.
+ https://bugs.webkit.org/show_bug.cgi?id=33911
+
+ Introduce ISODateTime::setMillisecondsSinceEpochForDate() and add Date
+ type support to ISODateTime::toString().
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::setValueAsDate):
+ * html/ISODateTime.cpp:
+ (WebCore::ISODateTime::setMillisecondsSinceEpochForDate):
+ (WebCore::ISODateTime::toString):
+ * html/ISODateTime.h:
+
+2010-01-20 Ben Murdoch <benm@google.com>
+
+ Reviewed by Simon Hausmann.
+
+ Touch Events are not sent to iframes
+ https://bugs.webkit.org/show_bug.cgi?id=33894
+
+ Fix the touch event handler so it does not bail out early if the main frame document does not have any touch listeners registered, as there may be embedded iframes that have registered for touch events.
+
+ Test: fast/events/touch/touch-inside-iframe.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleTouchEvent): Instead of looking at the document of the main frame to see if touch event listeners are registered, look at the document of the target element to account for iframes.
+
+2010-01-20 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Remove an assertion that is not valid in some detached iframes cases.
+ https://bugs.webkit.org/show_bug.cgi?id=33827
+
+ Test: http/tests/appcache/detached-iframe.html
+
+ * loader/appcache/DOMApplicationCache.cpp:
+ (WebCore::DOMApplicationCache::DOMApplicationCache):
+
+2010-01-20 Eric Uhrhane <ericu@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Refactoring and plumbing to get the HTML5 SQL Database API accessible to
+ web workers. No new functionality is exposed yet; this just gets the
+ infrastructure in place. It touches a lot of files in small ways; here
+ are the main changes:
+
+ 1) Database members and methods move from Document up to
+ ScriptExecutionContext. Each of Document and WorkerContext must
+ implement a few virtual methods where the Database code requires
+ differentiation.
+ 2) Worker thread shutdown got changed a bunch to handle Database cleanup
+ and thread synchronization issues. Database cleanup tasks need to post
+ some cleanup tasks to the JavaScript thread. However, since database
+ cleanup may happen due to the destruction of the WorkerThread, I added a
+ handshake [involving WorkerThreadShutdownStartTask,
+ WorkerThreadShutdownFinishTask, and a DatabaseTaskSynchronizer] between
+ the Database thread and WorkerThread that cleans up all the Database
+ stuff before the WorkerThread's runLoop can exit.
+ 3) The runtime enabler for the Database moved to a static variable
+ accessible through Database::isAvailable, following the model used by
+ WebSocket.
+ 4) Worker threads don't run their JavaScript on the Main thread, so
+ Database code that differentiated between the Main thread and the
+ Database thread now need to deal with a third possibility.
+ 5) Most of the other changes have to do with having a
+ ScriptExecutionContext pointer instead of a Document pointer when
+ dealing with a Database. In many cases it's just a string replacement,
+ but in some it required the creation of a new virtual function [e.g.
+ databaseExceededQuota, isDatabaseReadOnly]
+
+ https://bugs.webkit.org/show_bug.cgi?id=22725
+
+ No new tests; in a future patch I'll add JSC and V8 bindings and new
+ layout tests to exercise them.
+
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8DOMWindow::OpenDatabaseEnabled):
+ * dom/Document.cpp:
+ (WebCore::Document::Document):
+ (WebCore::Document::~Document):
+ (WebCore::Document::isDatabaseReadOnly):
+ (WebCore::Document::databaseExceededQuota):
+ (WebCore::Document::isContextThread):
+ * dom/Document.h:
+ * dom/ScriptExecutionContext.cpp:
+ (WebCore::ScriptExecutionContext::ScriptExecutionContext):
+ (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
+ (WebCore::ScriptExecutionContext::databaseThread):
+ (WebCore::ScriptExecutionContext::addOpenDatabase):
+ (WebCore::ScriptExecutionContext::removeOpenDatabase):
+ (WebCore::ScriptExecutionContext::stopDatabases):
+ * dom/ScriptExecutionContext.h:
+ (WebCore::ScriptExecutionContext::setHasOpenDatabases):
+ (WebCore::ScriptExecutionContext::hasOpenDatabases):
+ (WebCore::ScriptExecutionContext::Task::isCleanupTask):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::stopLoading):
+ * storage/Database.cpp:
+ (WebCore::Database::setIsAvailable):
+ (WebCore::Database::isAvailable):
+ (WebCore::Database::openDatabase):
+ (WebCore::Database::Database):
+ (WebCore::DerefContextTask::create):
+ (WebCore::DerefContextTask::performTask):
+ (WebCore::DerefContextTask::isCleanupTask):
+ (WebCore::Database::~Database):
+ (WebCore::Database::openAndVerifyVersion):
+ (WebCore::Database::markAsDeletedAndClose):
+ (WebCore::ContextRemoveOpenDatabaseTask::create):
+ (WebCore::ContextRemoveOpenDatabaseTask::performTask):
+ (WebCore::ContextRemoveOpenDatabaseTask::isCleanupTask):
+ (WebCore::ContextRemoveOpenDatabaseTask::ContextRemoveOpenDatabaseTask):
+ (WebCore::Database::close):
+ (WebCore::Database::performOpenAndVerify):
+ (WebCore::Database::scheduleTransaction):
+ (WebCore::Database::scheduleTransactionStep):
+ (WebCore::DeliverPendingCallbackTask::create):
+ (WebCore::DeliverPendingCallbackTask::performTask):
+ (WebCore::DeliverPendingCallbackTask::DeliverPendingCallbackTask):
+ (WebCore::Database::scheduleTransactionCallback):
+ (WebCore::Database::transactionClient):
+ (WebCore::Database::transactionCoordinator):
+ (WebCore::Database::tableNames):
+ (WebCore::Database::securityOrigin):
+ * storage/Database.h:
+ (WebCore::Database::scriptExecutionContext):
+ * storage/DatabaseTask.h:
+ * storage/DatabaseThread.cpp:
+ (WebCore::DatabaseThread::DatabaseThread):
+ (WebCore::DatabaseThread::~DatabaseThread):
+ (WebCore::DatabaseThread::requestTermination):
+ (WebCore::DatabaseThread::databaseThread):
+ (WebCore::DatabaseThread::unscheduleDatabaseTasks):
+ * storage/DatabaseThread.h:
+ * storage/DatabaseTracker.cpp:
+ (WebCore::DatabaseTracker::canEstablishDatabase):
+ (WebCore::DatabaseTracker::getMaxSizeForDatabase):
+ * storage/DatabaseTracker.h:
+ * storage/SQLTransaction.cpp:
+ (WebCore::SQLTransaction::executeSQL):
+ * storage/SQLTransactionClient.cpp:
+ (WebCore::SQLTransactionClient::didCommitTransaction):
+ (WebCore::SQLTransactionClient::didExecuteStatement):
+ (WebCore::SQLTransactionClient::didExceedQuota):
+ * storage/chromium/DatabaseTrackerChromium.cpp:
+ (WebCore::DatabaseTracker::canEstablishDatabase):
+ (WebCore::DatabaseTracker::addOpenDatabase):
+ (WebCore::TrackerRemoveOpenDatabaseTask::create):
+ (WebCore::TrackerRemoveOpenDatabaseTask::performTask):
+ (WebCore::TrackerRemoveOpenDatabaseTask::TrackerRemoveOpenDatabaseTask):
+ (WebCore::DatabaseTracker::removeOpenDatabase):
+ (WebCore::DatabaseTracker::getMaxSizeForDatabase):
+ * storage/chromium/SQLTransactionClientChromium.cpp:
+ (WebCore::NotifyDatabaseChangedTask::create):
+ (WebCore::NotifyDatabaseChangedTask::performTask):
+ (WebCore::NotifyDatabaseChangedTask::NotifyDatabaseChangedTask):
+ (WebCore::SQLTransactionClient::didCommitTransaction):
+ (WebCore::SQLTransactionClient::didExecuteStatement):
+ (WebCore::SQLTransactionClient::didExceedQuota):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::openDatabase):
+ (WebCore::WorkerContext::isContextThread):
+ * workers/WorkerContext.h:
+ (WebCore::WorkerContext::clearScript):
+ (WebCore::WorkerContext::thread):
+ (WebCore::WorkerContext::isDatabaseReadOnly):
+ (WebCore::WorkerContext::databaseExceededQuota):
+ * workers/WorkerRunLoop.cpp:
+ (WebCore::WorkerRunLoop::runInMode):
+ (WebCore::WorkerRunLoop::Task::performTask):
+ * workers/WorkerThread.cpp:
+ (WebCore::WorkerThread::workerThread):
+ (WebCore::WorkerThreadShutdownFinishTask::create):
+ (WebCore::WorkerThreadShutdownFinishTask::performTask):
+ (WebCore::WorkerThreadShutdownFinishTask::isCleanupTask):
+ (WebCore::WorkerThreadShutdownStartTask::create):
+ (WebCore::WorkerThreadShutdownStartTask::performTask):
+ (WebCore::WorkerThreadShutdownStartTask::isCleanupTask):
+ (WebCore::WorkerThread::stop):
+
+2010-01-20 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ WebSocket: Request-URI should not be empty when no tralling slash in host
+ https://bugs.webkit.org/show_bug.cgi?id=33689
+
+ Test: websocket/tests/url-no-trailing-slash.html
+
+ * websockets/WebSocketHandshake.cpp:
+ (WebCore::resourceName):
+
+2010-01-20 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29564
+
+ [Qt] Fixes an issue where the height of <button>- and
+ <input type="button">- elements are fixed to the height of the
+ button label font plus padding. That is, the CSS height property
+ is being ignored.
+
+ Instead, we should honor the user-specified height, if appropriate
+ for the platform and context. Notice, the Mac ports do not honor the
+ height for <input type="button"> elements unless a border and/or
+ background is also specified.
+
+ Test: fast/css/button-height.html
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::RenderThemeQt):
+ (WebCore::RenderThemeQt::adjustButtonStyle):
+
+2010-01-20 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Assertion failure calling history.pushState within popstate event handler.
+ https://bugs.webkit.org/show_bug.cgi?id=33830
+
+ Test: fast/loader/stateobjects/pushstate-within-popstate-handler-assert.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::navigateWithinDocument): Remove the ASSERT and invalid part of the comment.
+
+2010-01-20 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Oliver Hunt.
+
+ Crash on dispatching SVG mouse events
+ https://bugs.webkit.org/show_bug.cgi?id=33841
+
+ Return early SVGUseElement::instanceForShadowTreeElement if m_targetElementInstance is zero.
+ This only happens if the SVGUseElement has just been removed from the document and EventHandler
+ tries to dispatch a mouseout event to the corresponding SVGElementInstance. This is not testable
+ using DRT unfortunately, so we have to add another manual testcase for that.
+
+ Tests: manual-tests/use-crash-on-mouse-hover.svg
+
+ * manual-tests/svg-crash-hovering-use.svg: Added.
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::instanceForShadowTreeElement): Add ASSERT(!inDocument()) when returning 0 here if m_targetElementInstance is 0.
+
+2010-01-20 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Timeline reset button doesn't clean timeline if the panel is scrolled down.
+ The overview pane also stay dirty after reset.
+ https://bugs.webkit.org/show_bug.cgi?id=33829
+
+ * inspector/front-end/TimelineGrid.js:
+ (WebInspector.TimelineGrid.prototype.updateDividers):
+ * inspector/front-end/TimelineOverviewPane.js:
+ (WebInspector.TimelineOverviewPane.prototype.reset):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype.reset):
+ (WebInspector.TimelinePanel.prototype._refreshRecords):
+
+2010-01-20 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33930
+ Crash in JSDOMWindowBase::crossDomainAccessErrorMessage when accessing a detached sandboxed frame
+
+ Test: http/tests/security/detached-sandboxed-frame-access.html
+
+ * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage):
+ Changed the way we discover the url to match what the actual check does. Both old and new
+ code correctly fetch the URL of the current window displayed in frame, but going via
+ DOMWindowShell avoids crashing on null DOMWindow::m_frame pointer.
+
+2010-01-20 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [V8] Support SerializedScriptValue.
+ https://bugs.webkit.org/show_bug.cgi?id=32920
+ http://crbug.com/30620
+
+ Initial implementation of SerializedScriptValue which is used to
+ to create a serialized representation of JavaScript objects. This
+ representation is needed for structured clones and worker messages.
+
+ * WebCore.gypi: Added SerializedScriptValue.cpp.
+ * bindings/scripts/CodeGeneratorV8.pm: Removed conversion to string before using SerializedScriptValue.
+ * bindings/v8/SerializedScriptValue.cpp: Added.
+ (WebCore::):
+ (WebCore::ZigZag::encode):
+ (WebCore::ZigZag::decode):
+ (WebCore::Writer::Writer):
+ (WebCore::Writer::writeUndefined):
+ (WebCore::Writer::writeNull):
+ (WebCore::Writer::writeTrue):
+ (WebCore::Writer::writeFalse):
+ (WebCore::Writer::writeString):
+ (WebCore::Writer::writeInt32):
+ (WebCore::Writer::writeNumber):
+ (WebCore::Writer::endComposite):
+ (WebCore::Writer::data):
+ (WebCore::Writer::doWriteUint32):
+ (WebCore::Writer::append):
+ (WebCore::Writer::ensureSpace):
+ (WebCore::Writer::fillHole):
+ (WebCore::Writer::charAt):
+ (WebCore::Serializer::Serializer):
+ (WebCore::Serializer::serialize):
+ (WebCore::Serializer::StateBase::~StateBase):
+ (WebCore::Serializer::StateBase::nextState):
+ (WebCore::Serializer::StateBase::setNextState):
+ (WebCore::Serializer::StateBase::composite):
+ (WebCore::Serializer::StateBase::StateBase):
+ (WebCore::Serializer::State::composite):
+ (WebCore::Serializer::State::tag):
+ (WebCore::Serializer::State::State):
+ (WebCore::Serializer::StackCleaner::StackCleaner):
+ (WebCore::Serializer::StackCleaner::~StackCleaner):
+ (WebCore::Serializer::ArrayState::ArrayState):
+ (WebCore::Serializer::ArrayState::done):
+ (WebCore::Serializer::ArrayState::advance):
+ (WebCore::Serializer::ObjectState::ObjectState):
+ (WebCore::Serializer::ObjectState::done):
+ (WebCore::Serializer::ObjectState::advance):
+ (WebCore::Serializer::ObjectState::nextProperty):
+ (WebCore::Serializer::doSerialize):
+ (WebCore::Serializer::push):
+ (WebCore::Serializer::top):
+ (WebCore::Serializer::pop):
+ (WebCore::Serializer::checkComposite):
+ (WebCore::Reader::Reader):
+ (WebCore::Reader::isEof):
+ (WebCore::Reader::read):
+ (WebCore::Reader::readTag):
+ (WebCore::Reader::readString):
+ (WebCore::Reader::readInt32):
+ (WebCore::Reader::readNumber):
+ (WebCore::Reader::doReadUint32):
+ (WebCore::Deserializer::Deserializer):
+ (WebCore::Deserializer::deserialize):
+ (WebCore::Deserializer::doDeserialize):
+ (WebCore::Deserializer::push):
+ (WebCore::Deserializer::pop):
+ (WebCore::Deserializer::stackDepth):
+ (WebCore::Deserializer::element):
+ (WebCore::SerializedScriptValue::SerializedScriptValue):
+ (WebCore::SerializedScriptValue::deserialize):
+ * bindings/v8/SerializedScriptValue.h:
+ (WebCore::SerializedScriptValue::create):
+ (WebCore::SerializedScriptValue::createFromWire):
+ (WebCore::SerializedScriptValue::release):
+ (WebCore::SerializedScriptValue::toWireString):
+
+ Updated uses of SerializedScriptValue:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8DOMWindow::postMessageCallback):
+ * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
+ (WebCore::V8DedicatedWorkerContext::postMessageCallback):
+ * bindings/v8/custom/V8HistoryCustom.cpp:
+ (WebCore::V8History::pushStateCallback):
+ (WebCore::V8History::replaceStateCallback):
+ * bindings/v8/custom/V8MessageEventCustom.cpp:
+ (WebCore::V8MessageEvent::initMessageEventCallback):
+ * bindings/v8/custom/V8MessagePortCustom.cpp:
+ (WebCore::V8MessagePort::postMessageCallback):
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ (WebCore::V8Worker::postMessageCallback):
+
+2010-01-20 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix crash in geolocation when observers change during iteration.
+
+ * page/GeolocationController.cpp:
+ (WebCore::GeolocationController::positionChanged): Copy observers to vector while iterating.
+ (WebCore::GeolocationController::errorOccurred): Copy observers to vector while iterating.
+
+2010-01-19 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Insufficient repaint issues with html embedded in foreignObject
+ https://bugs.webkit.org/show_bug.cgi?id=16318
+
+ Partial fix for selection repaint in foreignObject, basically we
+ just need to make sure foreignObject correctly applies the svg
+ transform to the selection rect.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::paintSelection):
+ * rendering/RenderForeignObject.cpp:
+ (WebCore::RenderForeignObject::mapLocalToContainer):
+ * rendering/RenderForeignObject.h:
+
+2010-01-20 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by NOBODY.
+
+ <rdar://problem/7557695> REGRESSION(r53445-r53449): Many new memory leaks (33867)
+
+ Revert r53447, since this caused leaks.
+
+ * WebCore.base.exp:
+ * platform/text/StringImpl.cpp:
+ (WebCore::StringImpl::operator new):
+ (WebCore::StringImpl::operator delete):
+ (WebCore::StringImpl::StringImpl):
+ (WebCore::StringImpl::~StringImpl):
+ (WebCore::StringImpl::create):
+ (WebCore::StringImpl::createWithTerminatingNullCharacter):
+ (WebCore::StringImpl::crossThreadString):
+ (WebCore::StringImpl::sharedBuffer):
+ * platform/text/StringImpl.h:
+ (WebCore::StringImpl::hasTerminatingNullCharacter):
+ (WebCore::StringImpl::inTable):
+ (WebCore::StringImpl::setInTable):
+ (WebCore::StringImpl::):
+ * storage/OriginUsageRecord.cpp:
+ (WebCore::OriginUsageRecord::addDatabase):
+ (WebCore::OriginUsageRecord::markDatabase):
+
+2010-01-20 Jian Li <jianli@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Implement File and Blob interfaces as defined in File API spec.
+ https://bugs.webkit.org/show_bug.cgi?id=32912
+
+ * Android.derived.jscbindings.mk:
+ * Android.derived.v8bindings.mk:
+ * Android.mk:
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pri:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * bindings/js/JSXMLHttpRequestCustom.cpp:
+ (WebCore::JSXMLHttpRequest::send):
+ * bindings/objc/DOMHTML.h:
+ * bindings/objc/PublicDOMInterfaces.h:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bindings/scripts/CodeGeneratorObjC.pm:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8Binding.h:
+ (WebCore::toInt64):
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::V8XMLHttpRequest::sendCallback):
+ * html/File.cpp:
+ (WebCore::File::File):
+ * html/File.h:
+ (WebCore::File::create):
+ (WebCore::File::name):
+ (WebCore::File::fileName):
+ (WebCore::File::fileSize):
+ * html/File.idl:
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::send):
+ * xml/XMLHttpRequest.h:
+
+2010-01-20 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ WAI-ARIA popup buttons spoken as simply 'button'
+ https://bugs.webkit.org/show_bug.cgi?id=33922
+
+ Test: platform/mac/accessibility/aria-popup.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::actionElement):
+ (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
+ * html/HTMLAttributeNames.in:
+
+2010-01-19 David Levin <levin@chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ CrossThreadCopier needs to support ThreadSafeShared better.
+ https://bugs.webkit.org/show_bug.cgi?id=33698
+
+ Now the copier is able to handle types that derive from ThreadSafeShared.
+
+ No change functionality so no new tests.
+
+ * loader/WorkerThreadableLoader.cpp:
+ (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel): Remove unnecessary cast.
+ (WebCore::WorkerThreadableLoader::MainThreadBridge::clearClientWrapper): Ditto.
+ * loader/WorkerThreadableLoader.h:
+ Change to use the derived class instead of the ThreadSafeShared version.
+ * platform/CrossThreadCopier.cpp:
+ Add the new template parameter throughout the classes and adjust the class that
+ handles ThreadSafeShared to allow for derived types.
+ * platform/CrossThreadCopier.h:
+ Add another template parameter to be able to detect classes that derive
+ from ThreadSafeShared.
+ * websockets/WorkerThreadableWebSocketChannel.cpp:
+ Removed unnecessary casts and changed a type to use the derived class instead of
+ the ThreadSafeShared version.
+ (WebCore::WorkerThreadableWebSocketChannel::Peer::Peer):
+ (WebCore::workerContextDidSend):
+ (WebCore::workerContextDidGetBufferedAmount):
+ (WebCore::workerContextDidConnect):
+ (WebCore::workerContextDidReceiveMessage):
+ (WebCore::workerContextDidClose):
+ (WebCore::WorkerThreadableWebSocketChannel::Bridge::setWebSocketChannel):
+ (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel):
+ (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
+ (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
+ (WebCore::WorkerThreadableWebSocketChannel::Bridge::clearClientWrapper):
+ (WebCore::WorkerThreadableWebSocketChannel::Bridge::setMethodNotCompleted):
+ (WebCore::WorkerThreadableWebSocketChannel::Bridge::waitForMethodCompletion):
+ * websockets/WorkerThreadableWebSocketChannel.h:
+ (WebCore::WorkerThreadableWebSocketChannel::Peer::create): Changed a type to use the
+ derived class instead of the ThreadSafeShared version.
+
+2010-01-20 Jon Honeycutt <jhoneycutt@apple.com>
+
+ <rdar://problem/7086565> Crash in WebCore::PlugInView::dispatchNPEvent
+
+ Reviewed by Sam Weinig.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::handleEvent):
+ Ref the PluginView to protect it from deletion while calling into the
+ plug-in.
+
+2010-01-20 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: accSelect() is not implemented
+
+ https://bugs.webkit.org/show_bug.cgi?id=33918
+ <rdar://problem/7436861>
+
+ Reviewed by Darin Adler.
+
+ Test: platform/win/accessibility/selection-and-focus.html
+
+ * accessibility/AccessibilityMenuListOption.cpp:
+ (WebCore::AccessibilityMenuListOption::setSelected):
+ Return early if the object is not selectable.
+
+2010-01-20 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Fix chromium build, introduced a copy&paste error.
+
+ * bindings/v8/ScriptEventListener.cpp:
+ (WebCore::createAttributeEventListener):
+
+2010-01-20 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6579204> Exception thrown when opening a <select> pop-up that
+ uses a web font
+ https://bugs.webkit.org/show_bug.cgi?id=23911
+
+ * platform/mac/PopupMenuMac.mm:
+ (WebCore::PopupMenu::populate): Use the (bold) system font if an NSFont cannot
+ be obtained.
+
+2010-01-19 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ svg/custom/use-instanceRoot-event-bubbling.xhtml is flakey
+ https://bugs.webkit.org/show_bug.cgi?id=33835
+
+ mouseEvent fires mutiple times in svg/custom/use-instanceRoot-as-event-target.xhtml
+ https://bugs.webkit.org/show_bug.cgi?id=32519
+
+ Test: svg/custom/use-instanceRoot-event-listener-liveness.xhtml
+
+ Stabilize <use> scripting support - use tests are reliable now (tested using --repeach-each 50 --random -p)
+
+ Do not reclone trees anymore because of event listener changes, instead keep correspondingElement & shadowTreeElement
+ synchronized for each SVGElementInstance - any mutations on any event listeners are live, and take immediate effect,
+ w/o having to rely on a reclone - this was the root of several race conditions making the <use> tests flakey.
+
+ Fix SVGUseElement::instanceRoot() to force shadow tree creation, even if it was not attached so far - we can't wait
+ for finishedParsing() to be called which would recalculate the document style and attach the shadow tree as result.
+ This is now matching Operas behaviour.
+
+ Optimize createAttributeEventListener() to not create event listeners if the supplied Attribute isNull() - otherwhise
+ DOM calls like removeAttribute("onclick") cause a temporary JSEventListener to be created, added to the event listener
+ cache and removed afterwards.
+
+ * bindings/js/ScriptEventListener.cpp:
+ (WebCore::createAttributeEventListener): Return early if the supplied attribute is null as discussed with Geoffrey.
+ * bindings/v8/ScriptEventListener.cpp:
+ (WebCore::createAttributeEventListener): Ditto.
+ * dom/Node.cpp: Synchronize event listeners with all element instances, instead of marking the use elements to reclone.
+ (WebCore::instancesForSVGElement):
+ (WebCore::tryAddEventListener):
+ (WebCore::Node::addEventListener): When adding a listener, get a list of element instances and add it their as well.
+ (WebCore::tryRemoveEventListener):
+ (WebCore::Node::removeEventListener): Ditto for removals, but with special logic for listeners created from markup (see comments)
+ * svg/SVGElementInstance.cpp: Cleaned up, removing unncessary checks of correspondingElement() - there is an ASSERT in the ctor.
+ (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
+ (WebCore::SVGElementInstance::scriptExecutionContext):
+ (WebCore::SVGElementInstance::addEventListener):
+ (WebCore::SVGElementInstance::removeEventListener):
+ (WebCore::SVGElementInstance::removeAllEventListeners):
+ (WebCore::SVGElementInstance::eventTargetData):
+ (WebCore::SVGElementInstance::ensureEventTargetData):
+ * svg/SVGUseElement.cpp: Call document()->updateLayoutIgnorePendingStylesheets() to force shadow tree creation, just like CSSStyleDecl works.
+ (WebCore::SVGUseElement::instanceRoot):
+
+2010-01-20 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Move local utility class DocumentWeakReference entirely from Document.h into Document.cpp
+ since it is only used there. It is a followup for http://trac.webkit.org/changeset/53345.
+
+ No new tests since no change in functionality.
+
+ * dom/Document.cpp: Move definitions of the methods into declaration of the class, remove 'inline'.
+ * dom/Document.h: Replace DocumentWeakReference declaration with a forward declaration.
+
+2010-01-20 Oliver Hunt <oliver@apple.com>
+
+ No review, rolling out r53561.
+ http://trac.webkit.org/changeset/53561
+ https://bugs.webkit.org/show_bug.cgi?id=16318
+
+ broke selection repaint for transformed text in html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::paintSelection):
+ * rendering/RenderForeignObject.cpp:
+ * rendering/RenderForeignObject.h:
+
+2010-01-19 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Insufficient repaint issues with html embedded in foreignObject
+ https://bugs.webkit.org/show_bug.cgi?id=16318
+
+ Partial fix for selection repaint in foreignObject, basically we
+ just need to make sure foreignObject correctly applies the svg
+ transform to the selection rect.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::paintSelection):
+ * rendering/RenderForeignObject.cpp:
+ (WebCore::RenderForeignObject::mapLocalToContainer):
+ * rendering/RenderForeignObject.h:
+
+2010-01-20 Kevin Ollivier <kevino@theolliviers.com>
+
+ Build fix for !ENABLE(SVG).
+
+ * rendering/TrailingFloatsRootInlineBox.h:
+ (WebCore::TrailingFloatsRootInlineBox::TrailingFloatsRootInlineBox):
+
+2010-01-20 David Levin <levin@chromium.org>
+
+ No review, rolling out r53552.
+ http://trac.webkit.org/changeset/53552
+ https://bugs.webkit.org/show_bug.cgi?id=32554
+
+ Caused lots of fast/profile test failures.
+
+ * bindings/js/JSInjectedScriptHostCustom.cpp:
+ (WebCore::JSInjectedScriptHost::databaseForId):
+ (WebCore::JSInjectedScriptHost::inspectedWindow):
+ (WebCore::JSInjectedScriptHost::wrapCallback):
+ (WebCore::JSInjectedScriptHost::currentCallFrame):
+ (WebCore::JSInjectedScriptHost::nodeForId):
+ (WebCore::JSInjectedScriptHost::wrapObject):
+ (WebCore::JSInjectedScriptHost::unwrapObject):
+ (WebCore::JSInjectedScriptHost::pushNodePathToFrontend):
+ (WebCore::JSInjectedScriptHost::selectDatabase):
+ (WebCore::JSInjectedScriptHost::selectDOMStorage):
+ * bindings/js/ScriptCallStack.h:
+ (WebCore::ScriptCallStack::state):
+ * bindings/js/ScriptController.cpp:
+ * bindings/js/ScriptController.h:
+ * bindings/js/ScriptObject.h:
+ * bindings/js/ScriptValue.cpp:
+ (WebCore::ScriptValue::quarantineValue):
+ * bindings/js/ScriptValue.h:
+ * bindings/v8/ScriptObject.h:
+ * bindings/v8/ScriptValue.h:
+ (WebCore::ScriptValue::quarantineValue):
+ * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
+ (WebCore::V8InjectedScriptHost::inspectedWindowCallback):
+ (WebCore::V8InjectedScriptHost::wrapCallbackCallback):
+ (WebCore::V8InjectedScriptHost::wrapObjectCallback):
+ (WebCore::V8InjectedScriptHost::unwrapObjectCallback):
+ * inspector/ConsoleMessage.cpp:
+ (WebCore::ConsoleMessage::ConsoleMessage):
+ (WebCore::ConsoleMessage::addToConsole):
+ (WebCore::ConsoleMessage::isEqual):
+ * inspector/ConsoleMessage.h:
+ * inspector/InjectedScriptHost.cpp:
+ (WebCore::InjectedScriptHost::wrapObject):
+ (WebCore::InjectedScriptHost::unwrapObject):
+ * inspector/InjectedScriptHost.h:
+ * inspector/InjectedScriptHost.idl:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::dispatchOnInjectedScript):
+ (WebCore::InspectorBackend::releaseWrapperObjectGroup):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::InspectorController):
+ (WebCore::InspectorController::clearConsoleMessages):
+ (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
+ (WebCore::InspectorController::windowScriptObjectAvailable):
+ (WebCore::InspectorController::scriptObjectReady):
+ (WebCore::InspectorController::setFrontendProxyObject):
+ (WebCore::InspectorController::close):
+ (WebCore::InspectorController::resetScriptObjects):
+ (WebCore::InspectorController::didPause):
+ (WebCore::InspectorController::wrapObject):
+ (WebCore::InspectorController::unwrapObject):
+ (WebCore::InspectorController::releaseWrapperObjectGroup):
+ (WebCore::InspectorController::resetInjectedScript):
+ (WebCore::InspectorController::deleteCookie):
+ * inspector/InspectorController.h:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addConsoleMessage):
+ (WebCore::InspectorFrontend::pausedScript):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/AuditsPanel.js:
+ (WebInspector.AuditsPanel.prototype._reloadResources):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.requestClearMessages):
+ (WebInspector.ConsoleView.prototype.completions):
+ (WebInspector.ConsoleView.prototype.doEvalInWindow):
+ (WebInspector.ConsoleView.prototype._formatnode):
+ (WebInspector.ConsoleView.prototype._formatarray):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMNode):
+ (WebInspector.CSSStyleDeclaration):
+ (WebInspector.CSSStyleDeclaration.parseRule):
+ * inspector/front-end/Database.js:
+ (WebInspector.Database.prototype.executeSql):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
+ (WebInspector.ElementsPanel.prototype.setDocument):
+ (WebInspector.ElementsPanel.prototype.searchCanceled):
+ (WebInspector.ElementsPanel.prototype.performSearch):
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype.createTooltipForImageNode):
+ * inspector/front-end/EventListenersSidebarPane.js:
+ ():
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.dispatch):
+ (InjectedScript.toggleStyleEnabled):
+ (InjectedScript._serializeRule):
+ (InjectedScript._serializeStyle):
+ (InjectedScript.getProperties):
+ (InjectedScript.setPropertyValue):
+ (InjectedScript._evaluateAndWrap):
+ (InjectedScript.getCallFrames):
+ (InjectedScript._inspectObject):
+ (InjectedScript._ensureCommandLineAPIInstalled):
+ (InjectedScript._resolveObject):
+ (InjectedScript._window):
+ (InjectedScript._objectForId):
+ (InjectedScript.createProxyObject):
+ (InjectedScript.executeSql):
+ (InjectedScript.executeSql.errorCallback):
+ (InjectedScript.executeSql.queryTransaction):
+ (Object.type):
+ (String.prototype.escapeCharacters):
+ * inspector/front-end/InjectedScriptAccess.js:
+ (InjectedScriptAccess._installHandler.InjectedScriptAccess.methodName):
+ (InjectedScriptAccess._installHandler):
+ * inspector/front-end/MetricsSidebarPane.js:
+ (WebInspector.MetricsSidebarPane):
+ (WebInspector.MetricsSidebarPane.prototype.update.inlineStyleCallback):
+ (WebInspector.MetricsSidebarPane.prototype.update):
+ (WebInspector.MetricsSidebarPane.prototype.editingCommitted):
+ * inspector/front-end/ObjectPropertiesSection.js:
+ (WebInspector.ObjectPropertiesSection.prototype.update):
+ (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
+ (WebInspector.ObjectPropertyTreeElement.prototype.applyExpression):
+ * inspector/front-end/ObjectProxy.js:
+ (WebInspector.ObjectProxy):
+ (WebInspector.ObjectProxy.getPropertiesAsync):
+ * inspector/front-end/PropertiesSidebarPane.js:
+ (WebInspector.PropertiesSidebarPane.prototype.update.callback):
+ (WebInspector.PropertiesSidebarPane.prototype.update):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame):
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylesSidebarPane.prototype.update):
+ (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
+ (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted):
+ (WebInspector.StylePropertyTreeElement.prototype):
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSection.prototype.update):
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+ (WebInspector.pausedScript):
+ (WebInspector.addConsoleMessage):
+ (WebInspector.log.logMessage):
+ (WebInspector.log):
+
+2010-01-20 Steve Block <steveblock@google.com>
+
+ Reviewed by David Levin.
+
+ Renames jni_runtime.[cpp|h] to JNIBridge.[cpp|h]
+ https://bugs.webkit.org/show_bug.cgi?id=33899
+
+ No new tests, refactoring only.
+
+ * Android.jscbindings.mk: Modified. Removes jni_runtime.cpp and adds JNIBridge.cpp
+ * GNUmakefile.am: Modified. Removes jni_runtime.h and adds JNIBridge.h
+ * WebCore.xcodeproj/project.pbxproj: Modified. Removes jni_runtime.[cpp|h] and adds JNIBridge.[cpp|h]
+ * bridge/jni/JNIBridge.cpp: Copied from WebCore/bridge/jni/jni_runtime.cpp.
+ * bridge/jni/JNIBridge.h: Copied from WebCore/bridge/jni/jni_runtime.h.
+ * bridge/jni/jni_jsobject.mm: Modified. Updated to include JNIBridge.h
+ * bridge/jni/jni_runtime.cpp: Removed.
+ * bridge/jni/jni_runtime.h: Removed.
+ * bridge/jni/jsc/JNIUtilityPrivate.cpp: Modified. Updated to include JNIBridge.h
+ * bridge/jni/jsc/JavaClassJSC.cpp: Modified. Removed superfluous include
+ * bridge/jni/jsc/JavaClassJSC.h: Modified. Updated to include JNIBridge.h
+ * bridge/jni/jsc/JavaInstanceJSC.cpp: Modified. Updated to include JNIBridge.h
+
+2010-01-20 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33913
+ Crash under Media::matchMedium in detached frame
+
+ Also took the opportunity to fix JS bindings for the Media object.
+
+ Test: fast/media/lifetime.html
+
+ * css/Media.h:
+ (WebCore::Media::create): Take and store a Frame pointer, like other similar objects do.
+ (WebCore::Media::disconnectFrame): Zero out the frame pointer (this is called from
+ DOMWindow::clear()).
+
+ * css/Media.cpp:
+ (WebCore::Media::Media): Updated to storing Frame pointer.
+ (WebCore::Media::type): Ditto.
+ (WebCore::Media::matchMedium): Removed null check for document element - every document has
+ one. Also, every Frame has a document, so we only need to check for m_frame being zero.
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::markChildren):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::clear):
+ (WebCore::DOMWindow::media):
+ * page/DOMWindow.h:
+ (WebCore::DOMWindow::optionalMedia):
+ Make sure there's only one Media object per window, and keep its wrapper alive.
+
+2010-01-20 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler and Adam Roben.
+
+ Feature defines are difficult to maintain on Windows builds
+ https://bugs.webkit.org/show_bug.cgi?id=33883
+
+ FeatureDefines.vsprops are now maintained in a way similar to
+ Configurations/FeatureDefines.xcconfig, with the added advantage
+ of having a single FeatureDefines file across all projects.
+
+ * Configurations/FeatureDefines.xcconfig: Add comments about keeping feature definitions in sync.
+ * WebCore.vcproj/MigrateIDLAndScripts: Remove reference to file that no longer exists.
+ * WebCore.vcproj/QTMovieWin.vcproj: Add FeatureDefines.vsprops inherited property sheet.
+ * WebCore.vcproj/WebCore.vcproj: Add FeatureDefines.vsprops inherited property sheet.
+ * WebCore.vcproj/WebCoreCommon.vsprops: Remove ENABLE_ preprocessor definitions.
+ * WebCore.vcproj/WebCoreGenerated.vcproj: Added Cairo configuration for selecting proper features.
+ * WebCore.vcproj/WebCoreMediaQT.vsprops: Remove ENABLE_VIDEO. This is picked up from FeatureDefines.vsprops.
+ * WebCore.vcproj/build-generated-files.sh: Pick up features from FeatureDefines.vsprops or FeatureDefinesCairo.vsprops.
+
+2010-01-20 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Inject inspector script directly into the inspected context. All the
+ communication between the script and the frontend is serialized into
+ JSON strings. It allows to get rid of object quarantines in Web Inspector.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32554
+
+ Test: inspector/console-log-before-inspector-open.html
+
+ * bindings/js/JSInjectedScriptHostCustom.cpp:
+ (WebCore::JSInjectedScriptHost::databaseForId):
+ (WebCore::JSInjectedScriptHost::currentCallFrame):
+ (WebCore::JSInjectedScriptHost::nodeForId):
+ (WebCore::JSInjectedScriptHost::pushNodePathToFrontend):
+ (WebCore::JSInjectedScriptHost::selectDatabase):
+ (WebCore::JSInjectedScriptHost::selectDOMStorage):
+ * bindings/js/ScriptCallStack.h:
+ (WebCore::ScriptCallStack::state):
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::mainWorldScriptState):
+ * bindings/js/ScriptController.h:
+ * bindings/js/ScriptObject.h:
+ (WebCore::ScriptObject::scriptState):
+ * bindings/js/ScriptValue.cpp:
+ * bindings/js/ScriptValue.h:
+ * bindings/v8/ScriptObject.h:
+ (WebCore::ScriptObject::scriptState):
+ * bindings/v8/ScriptValue.h:
+ * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
+ * inspector/ConsoleMessage.cpp:
+ (WebCore::ConsoleMessage::ConsoleMessage):
+ (WebCore::ConsoleMessage::addToConsole):
+ (WebCore::ConsoleMessage::isEqual):
+ * inspector/ConsoleMessage.h:
+ * inspector/InjectedScriptHost.cpp:
+ (WebCore::InjectedScriptHost::releaseWrapperObjectGroup):
+ * inspector/InjectedScriptHost.h:
+ * inspector/InjectedScriptHost.idl:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::setInjectedScriptSource):
+ (WebCore::InspectorBackend::dispatchOnInjectedScript):
+ (WebCore::InspectorBackend::releaseWrapperObjectGroup):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::InspectorController):
+ (WebCore::InspectorController::clearConsoleMessages):
+ (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
+ (WebCore::InspectorController::windowScriptObjectAvailable):
+ (WebCore::InspectorController::scriptObjectReady):
+ (WebCore::InspectorController::setFrontendProxyObject):
+ (WebCore::InspectorController::close):
+ (WebCore::InspectorController::resetScriptObjects):
+ (WebCore::InspectorController::didPause):
+ (WebCore::InspectorController::injectedScriptForNodeId):
+ * inspector/InspectorController.h:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addConsoleMessage):
+ (WebCore::InspectorFrontend::pausedScript):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/AuditsPanel.js:
+ (WebInspector.AuditsPanel.prototype._reloadResources):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.requestClearMessages):
+ (WebInspector.ConsoleView.prototype.doEvalInWindow):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMNode):
+ (WebInspector.CSSStyleDeclaration):
+ (WebInspector.CSSStyleDeclaration.parseRule):
+ * inspector/front-end/Database.js:
+ (WebInspector.Database.prototype.executeSql):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged.InjectedScriptAccess.get addInspectedNode):
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
+ (WebInspector.ElementsPanel.prototype.setDocument):
+ (WebInspector.ElementsPanel.prototype.searchCanceled):
+ (WebInspector.ElementsPanel.prototype.performSearch):
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype.createTooltipForImageNode):
+ * inspector/front-end/EventListenersSidebarPane.js:
+ ():
+ * inspector/front-end/InjectedScript.js:
+ (injectedScriptConstructor):
+ (injectedScriptConstructor.):
+ * inspector/front-end/InjectedScriptAccess.js:
+ (InjectedScriptAccess):
+ (InjectedScriptAccess.getDefault):
+ (get InjectedScriptAccess):
+ (InjectedScriptAccess._installHandler.InjectedScriptAccess.prototype.methodName):
+ (InjectedScriptAccess._installHandler):
+ * inspector/front-end/MetricsSidebarPane.js:
+ (WebInspector.MetricsSidebarPane):
+ (WebInspector.MetricsSidebarPane.prototype.update.inlineStyleCallback):
+ * inspector/front-end/ObjectPropertiesSection.js:
+ * inspector/front-end/ObjectProxy.js:
+ (WebInspector.ObjectProxy):
+ * inspector/front-end/PropertiesSidebarPane.js:
+ (WebInspector.PropertiesSidebarPane.prototype.update.callback):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
+ * inspector/front-end/ScriptsPanel.js:
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertyTreeElement.prototype):
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSection.prototype.update):
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+ (WebInspector.pausedScript):
+ (WebInspector.addConsoleMessage):
+ (WebInspector.log.logMessage):
+ (WebInspector.log):
+
+2010-01-20 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ HTMLInputElement::valueAsDate setter support for type=time.
+ https://bugs.webkit.org/show_bug.cgi?id=33825
+
+ Introduce ISODateTime::setMillisecondsSinceMidnight() and add a
+ SecondFormat parameter to ISODateTime::toString(). The main code
+ logic for type=time is implemented in
+ setMillisecondsSinceMidnightInternal() and toStringForTime()
+ because the logic is going to be used for other types.
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::setValueAsDate):
+ * html/ISODateTime.cpp:
+ (WebCore::positiveFmod):
+ (WebCore::ISODateTime::setMillisecondsSinceMidnightInternal):
+ (WebCore::ISODateTime::setMillisecondsSinceMidnight):
+ (WebCore::ISODateTime::toStringForTime):
+ (WebCore::ISODateTime::toString):
+ * html/ISODateTime.h:
+ (WebCore::ISODateTime::):
+
+2010-01-20 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Unreviewed buildfix for r53547.
+
+ * WebCore.pri:
+
+2010-01-20 Ben Murdoch <benm@google.com>
+
+ Reviewed by Simon Hausmann.
+
+ The touchcancel event is not supported.
+ https://bugs.webkit.org/show_bug.cgi?id=33598
+
+ This change adds support for the touchcancel event in WebCore and adds a test.
+
+ Test: fast/events/touch/send-oncancel-event.html
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::processingUserGestureEvent): Considers touchcancel with the other touch events when working out if the event is a user gesture.
+ * dom/Document.cpp:
+ (WebCore::Document::addListenerTypeIfNeeded): Adds a check to consider ontouchcancel a touch event listener.
+ * dom/Document.h: Add the touchcancel attribute event listener.
+ * dom/Document.idl: ditto.
+ * dom/Element.h: ditto.
+ * dom/Element.idl: ditto.
+ * dom/EventNames.h: Adds touchcancel as an event name.
+ * html/HTMLAttributeNames.in:Adds touchcancel as an HTML attribute name.
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::parseMappedAttribute): Parses the ontouchcancel attribute.
+ * page/DOMWindow.h: Adds the touchcancel attribute event listener.
+ * page/DOMWindow.idl: ditto.
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleTouchEvent): Add code to detect and dispatch touchcancel events.
+ * platform/PlatformTouchEvent.h:
+ (WebCore::): Add TouchCancel as a touch event type.
+ * platform/PlatformTouchPoint.h:
+ (WebCore::PlatformTouchPoint::): Add TouchCanceled as a touch point state.
+
+2010-01-20 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Make extraCompilers for generated sources depend on their scripts
+
+ * DerivedSources.pro:
+ * WebCore.pri:
+
+2010-01-20 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [Chromium][V8] Fix null pointer dereference in V8Proxy::retrieve().
+ https://bugs.webkit.org/show_bug.cgi?id=33886
+
+ This is equivalent to r53433, and fix a crash by
+ LayoutTests/http/tests/appcache/destroyed-iframe.html.
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::retrieve): Check if context is null.
+
+2010-01-20 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Optimize resize event handling for hidden views
+ https://bugs.webkit.org/show_bug.cgi?id=33803
+
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype.resize):
+ (WebInspector.AbstractTimelinePanel.prototype.updateMainViewWidth):
+ * inspector/front-end/AuditsPanel.js:
+ * inspector/front-end/Panel.js:
+ (WebInspector.Panel.prototype.updateSidebarWidth):
+ (WebInspector.Panel.prototype.resize):
+ * inspector/front-end/PanelEnablerView.js:
+ (WebInspector.PanelEnablerView):
+ (WebInspector.PanelEnablerView.prototype.show):
+ (WebInspector.PanelEnablerView.prototype.resize):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype.show):
+ (WebInspector.ProfilesPanel.prototype.addProfileHeader):
+ (WebInspector.ProfilesPanel.prototype.showProfile):
+ (WebInspector.ProfilesPanel.prototype.showView):
+ (WebInspector.ProfilesPanel.prototype.closeVisibleView):
+ (WebInspector.ProfilesPanel.prototype._updateInterface):
+ (WebInspector.ProfilesPanel.prototype.updateMainViewWidth):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype.show):
+ (WebInspector.ResourcesPanel.prototype.get visibleView):
+ (WebInspector.ResourcesPanel.prototype.updateMainViewWidth):
+ * inspector/front-end/Settings.js:
+ * inspector/front-end/StoragePanel.js:
+ (WebInspector.StoragePanel.prototype.updateMainViewWidth):
+ * inspector/front-end/WelcomeView.js:
+ (WebInspector.WelcomeView):
+ (WebInspector.WelcomeView.prototype.show):
+ (WebInspector.WelcomeView.prototype.resize):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.js:
+ (WebInspector.windowResize):
+
+2010-01-20 Steve Block <steveblock@google.com>
+
+ Reviewed by David Levin.
+
+ Fixes style in WebCore/bridge/Bridge
+ https://bugs.webkit.org/show_bug.cgi?id=33839
+
+ No new tests, style fixes only.
+
+ * bridge/Bridge.cpp: Modified.
+ * bridge/Bridge.h: Modified.
+ * bridge/c/c_instance.cpp: Modified.
+ (JSC::Bindings::CInstance::invokeMethod): Modified. Use renamed m_rootObject member
+ (JSC::Bindings::CInstance::invokeDefaultMethod): Modified. Use renamed m_rootObject member
+ (JSC::Bindings::CInstance::invokeConstruct): Modified. Use renamed m_rootObject member
+ * bridge/jni/jni_runtime.cpp: Modified.
+ (JavaArray::JavaArray): Modified. Use renamed m_rootObject member
+ (JavaArray::rootObject): Modified. Use renamed m_rootObject member
+ * bridge/objc/objc_instance.mm: Modified.
+ (ObjcInstance::invokeMethod): Modified. Use renamed m_rootObject member
+ (ObjcInstance::invokeDefaultMethod): Modified. Use renamed m_rootObject member
+ (ObjcInstance::getValueOfUndefinedField): Modified. Use renamed m_rootObject member
+ * bridge/objc/objc_runtime.mm: Modified.
+ (JSC::Bindings::ObjcArray::valueAt): Modified. Use renamed m_rootObject member
+ * bridge/qt/qt_runtime.cpp: Modified.
+ (JSC::Bindings::::rootObject): Modified. Use renamed m_rootObject member
+
+2010-01-20 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33885
+
+ Fixes style errors exposed by the style bot in the patch
+ for bug #33770. Moreover, fixes all style errors reported
+ by check-webkit-style.
+
+ No functionality was changed. So, no new tests.
+
+ * bindings/js/JSWebGLRenderingContextCustom.cpp:
+ (WebCore::dataFunctionf):
+ (WebCore::dataFunctioni):
+ (WebCore::dataFunctionMatrix):
+
+2010-01-19 Steve Block <steveblock@google.com>
+
+ Reviewed by David Levin.
+
+ Fixes style in WebCore/bridge/JNIUtility
+ https://bugs.webkit.org/show_bug.cgi?id=33870
+
+ No new tests, style fixes only.
+
+ * bridge/jni/JNIUtility.cpp:
+ * bridge/jni/JNIUtility.h:
+
+2010-01-20 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ On Linux link QtWebKit with -no-undefined to catch build breakages due to missing
+ files in the .pro file, resulting in unresolved symbols.
+
+ * WebCore.pro:
+
+2010-01-20 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Make it possible to link with -no-undefined.
+
+ * WebCore.pro: Add missing explicit dependency to libXrender due to the
+ use of XRenderFindVisualFormat in the X11 plugin code.
+
+2010-01-20 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Add missing files to the build.
+
+ * WebCore.pro:
+
+2010-01-20 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] computePageRectsForFrame seems to be unnecessary
+ https://bugs.webkit.org/show_bug.cgi?id=33881
+
+ * WebCore.gypi: Removed FrameChromium.h
+ * page/chromium/FrameChromium.cpp: Removed computePageRectsForFrame.
+ * page/chromium/FrameChromium.h: Removed.
+
+2010-01-20 Roland Steiner <rolandsteiner@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ Bug 33266 - WebCore::InlineFlowBox::determineSpacingForFlowBoxes ReadAV@NULL (43c64e8abbda6766e5f5edbd254c2d57)
+ (https://bugs.webkit.org/show_bug.cgi?id=33266)
+
+ Ruby did not handle malformed cases correctly when the ruby base was in
+ block flow. Changed the code to handle all possible cases.
+ Also, added some simplification methods to RenderBlock.
+
+ Tests: fast/ruby/ruby-illegal-1.html
+ fast/ruby/ruby-illegal-2.html
+ fast/ruby/ruby-illegal-3.html
+ fast/ruby/ruby-illegal-4.html
+ fast/ruby/ruby-illegal-5.html
+ fast/ruby/ruby-illegal-6.html
+ fast/ruby/ruby-illegal-7.html
+ fast/ruby/ruby-illegal-combined.html
+ fast/ruby/rubyDOM-insert-rt-block-1.html
+ fast/ruby/rubyDOM-insert-rt-block-2.html
+ fast/ruby/rubyDOM-insert-rt-block-3.html
+ fast/ruby/rubyDOM-remove-rt-block-1.html
+ fast/ruby/rubyDOM-remove-rt-block-2.html
+ fast/ruby/rubyDOM-remove-rt-block-3.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::moveAllChildrenTo): useful for anonymous block manipulation
+ (WebCore::RenderBlock::removeChild): making use of moveAllChildrenTo
+ * rendering/RenderBlock.h:
+ * rendering/RenderRubyBase.cpp:
+ (WebCore::RenderRubyBase::hasOnlyWrappedInlineChildren):
+ (WebCore::RenderRubyBase::moveChildren):
+ (WebCore::RenderRubyBase::moveInlineChildren):
+ (WebCore::RenderRubyBase::moveBlockChildren):
+ (WebCore::RenderRubyBase::mergeBlockChildren):
+ * rendering/RenderRubyBase.h:
+ * rendering/RenderRubyRun.cpp:
+ (WebCore::RenderRubyRun::addChild):
+ (WebCore::RenderRubyRun::removeChild):
+
+2010-01-19 Dan Bernstein <mitz@apple.com>
+
+ Build fix after r53514
+
+ * WebCore.base.exp: Removed threadGlobalData(), which was inlined in r53514.
+
+2010-01-19 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Avoid calling NSEqualRects() on the garbage rect obtained
+ by calling -frame on a null view.
+
+ * platform/mac/WidgetMac.mm:
+ (WebCore::Widget::setFrameRect):
+
+2010-01-19 Maciej Stachowiak <mjs@apple.com>
+
+ Unreviewed build fix.
+
+ Remove currentWorld from the exports file again, since it is now inline.
+
+ * WebCore.base.exp:
+
+2010-01-19 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Part of <http://webkit.org/b/28622>.
+ Caught exceptions still pause the debugger.
+
+ Update JavaScriptDebugServer::exception to take a hasHandler parameter,
+ so later we can differentiate between a caught and an uncaught exception.
+
+ This just adds a new parameter, no behavior is changed.
+
+ No change in functionality, so no tests.
+
+ * inspector/JavaScriptDebugServer.cpp:
+ (WebCore::JavaScriptDebugServer::exception):
+ * inspector/JavaScriptDebugServer.h:
+
+2010-01-18 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Adam Barth.
+
+ Inline functions that are hot in DOM manipulation
+ https://bugs.webkit.org/show_bug.cgi?id=33820
+
+ (3% speedup on Dromaeo DOM Core tests)
+
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::currentWorld): Inlined.
+ (WebCore::jsString): Inlined String& overload and split off slow case.
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::jsStringSlowCase): Slow case for the above.
+ * dom/Document.h:
+ (WebCore::Document::isHTMLDocument): Use a bit and an inline method
+ instead of a virtual method, since this is so hot and size of Document
+ is not a prime concern.
+ (WebCore::Document::create): Adapt for above.
+ (WebCore::Document::createXHTML): ditto
+ * dom/Document.cpp:
+ (WebCore::Document::Document): ditto
+ * html/HTMLDocument.cpp:
+ (WebCore::HTMLDocument::HTMLDocument): ditto
+ * html/HTMLDocument.h: ditto
+ * loader/PlaceholderDocument.h:
+ (WebCore::PlaceholderDocument::PlaceholderDocument): ditto
+ * svg/SVGDocument.cpp:
+ (WebCore::SVGDocument::SVGDocument): ditto
+ * dom/Element.h:
+ (WebCore::Element::attributes): Inlined.
+ (WebCore::Element::updateId): Inlined.
+ * dom/Element.cpp: (Remove inlined methods.)
+ * dom/NamedAttrMap.h:
+ (WebCore::NamedNodeMap::getAttributeItem): Inlined and split off slow case.
+ * dom/NamedAttrMap.cpp:
+ (WebCore::NamedNodeMap::getAttributeItemSlowCase): Slow case for the above.
+ * inspector/InspectorController.cpp:
+ * inspector/InspectorController.h:
+ (WebCore::InspectorController::didInsertDOMNode): Inlined so the fast case
+ early exit doesn't incur a function call.
+ (WebCore::InspectorController::didRemoveDOMNode): ditto
+ (WebCore::InspectorController::didModifyDOMAttr): ditto
+ * platform/ThreadGlobalData.h:
+ (WebCore::threadGlobalData): Inlined.
+ * platform/ThreadGlobalData.cpp: (Removed inline methods).
+ * platform/Timer.h:
+ (WebCore::TimerBase::isActive): Inlined.
+ * platform/Timer.cpp: (Removed inline methods).
+ * WebCore.xcodeproj/project.pbxproj: Install new heares.
+ * WebCore.base.exp: Add appropriate exports.
+
+2010-01-19 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Chromium build fix.
+
+ * accessibility/chromium/AccessibilityObjectChromium.cpp:
+ (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
+ Call correct function.
+
+2010-01-17 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: The child <option> elements of a non-multiple <select> are not
+ exposed
+
+ https://bugs.webkit.org/show_bug.cgi?id=33773
+ <rdar://problem/7550556>
+
+ Reviewed by Alice Liu.
+
+ This exposes the child <option> elements in a format similar to
+ Firefox's: the <select> element has one child, a hidden list object,
+ and this list has as its children the <option> elements.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ Add new files to project.
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::getOrCreate):
+ If the element is a RenderMenuList, create an AccessibilityMenuList.
+ (WebCore::AXObjectCache::getOrCreate):
+ Add new types to create by role value.
+
+ * accessibility/AccessibilityMenuList.cpp: Added.
+ (WebCore::AccessibilityMenuList::AccessibilityMenuList):
+ Call the base class constructor. Assert that the RenderObject passed
+ is a RenderMenuList.
+ (WebCore::AccessibilityMenuList::press):
+ Show or hide the popup menu.
+ (WebCore::AccessibilityMenuList::addChildren):
+ Create an AccessibilityMenuListPopup. If the platform ignores its
+ accessibility, remove it from the object cache and return early.
+ Otherwise, set its parent object to this object, add it to our list of
+ children, and tell it to add its children.
+ (WebCore::AccessibilityMenuList::childrenChanged):
+ Tell our child hidden list that its children changed.
+ (WebCore::AccessibilityMenuList::isCollapsed):
+ Return whether the popup menu is visible.
+
+ * accessibility/AccessibilityMenuList.h: Added.
+ (WebCore::AccessibilityMenuList::create):
+ Adopt and return a new RenderMenuList.
+ (WebCore::AccessibilityMenuList::isMenuList):
+ (WebCore::AccessibilityMenuList::roleValue):
+ (WebCore::AccessibilityMenuList::accessibilityIsIgnored):
+ (WebCore::AccessibilityMenuList::canSetFocusAttribute):
+
+ * accessibility/AccessibilityMenuListOption.cpp: Added.
+ (WebCore::AccessibilityMenuListOption::AccessibilityMenuListOption):
+ Initialize the pointer to our parent popup menu.
+ (WebCore::AccessibilityMenuListOption::setElement):
+ Assert that the element is an <option> element.
+ (WebCore::AccessibilityMenuListOption::actionElement):
+ Return our element.
+ (WebCore::AccessibilityMenuListOption::parentObject):
+ Return our parent popup menu.
+ (WebCore::AccessibilityMenuListOption::isEnabled):
+ Return true if the element itself is enabled.
+ (WebCore::AccessibilityMenuListOption::isVisible):
+ Return true if the popup is visible, or return true if the popup is
+ collapsed but the element is selected.
+ (WebCore::AccessibilityMenuListOption::isOffScreen):
+ Return true if the object is invisible.
+ (WebCore::AccessibilityMenuListOption::isSelected):
+ (WebCore::AccessibilityMenuListOption::setSelected):
+ (WebCore::AccessibilityMenuListOption::nameForMSAA):
+ Return the <option> element's text.
+ (WebCore::AccessibilityMenuListOption::canSetSelectedAttribute):
+ Return true if enabled.
+ (WebCore::AccessibilityMenuListOption::elementRect):
+ Return the AccessibilityMenuList's rect.
+
+ * accessibility/AccessibilityMenuListOption.h: Added.
+ (WebCore::AccessibilityMenuListOption::create):
+ Adopt and return a new AccessibilityMenuListOption.
+ (WebCore::AccessibilityMenuListOption::setParent):
+ (WebCore::AccessibilityMenuListOption::isMenuListOption):
+ (WebCore::AccessibilityMenuListOption::roleValue):
+ (WebCore::AccessibilityMenuListOption::canHaveChildren):
+ (WebCore::AccessibilityMenuListOption::size):
+
+ * accessibility/AccessibilityMenuListPopup.cpp: Added.
+ (WebCore::AccessibilityMenuListPopup::AccessibilityMenuListPopup):
+ Initialize the pointer to our parent list.
+ (WebCore::AccessibilityMenuListPopup::isVisible):
+ Return false; we're never considered visible.
+ (WebCore::AccessibilityMenuListPopup::isOffScreen):
+ Return true if the popup is collapsed.
+ (WebCore::AccessibilityMenuListPopup::parentObject):
+ Return our parent AccessibilityMenuList.
+ (WebCore::AccessibilityMenuListPopup::isEnabled):
+ Return true if our parent is enabled.
+ (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
+ If the element is an <option> element, create a list item for it, and
+ set the object's element to this element.
+ (WebCore::AccessibilityMenuListPopup::press):
+ Call our parent's press() function to show or hide the popup menu.
+ (WebCore::AccessibilityMenuListPopup::addChildren):
+ Walk the select element's children, and create list items for them. Add
+ them to our list of children.
+ (WebCore::AccessibilityMenuListPopup::childrenChanged):
+ If any of our children have been detached from the document, remove
+ them from the AXObjectCache and from our child list.
+ (WebCore::AccessibilityMenuListPopup::setMenuList):
+
+ * accessibility/AccessibilityMenuListPopup.h: Added.
+ (WebCore::AccessibilityMenuListPopup::create):
+ Adopt and return an AccessibilityMenuListPopup.
+ (WebCore::AccessibilityMenuListPopup::isMenuListPopup):
+ (WebCore::AccessibilityMenuListPopup::elementRect):
+ (WebCore::AccessibilityMenuListPopup::size):
+ (WebCore::AccessibilityMenuListPopup::roleValue):
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::actionVerb):
+ Add the menuListAction and menuListPopupAction verbs.
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::):
+ Add new roles.
+ (WebCore::AccessibilityObject::isMenuList):
+ Stubbed.
+ (WebCore::AccessibilityObject::isMenuListHiddenList):
+ Stubbed.
+ (WebCore::AccessibilityObject::isMenuListOption):
+ Stubbed.
+ (WebCore::AccessibilityObject::isVisible):
+ Stubbed.
+
+ * accessibility/chromium/AccessibilityObjectChromium.cpp:
+ (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
+ Ignore the new object type.
+
+ * accessibility/gtk/AccessibilityObjectAtk.cpp:
+ (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
+ Ditto.
+
+ * accessibility/mac/AccessibilityObjectMac.mm:
+ (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
+ Ditto.
+
+ * accessibility/qt/AccessibilityObjectQt.cpp:
+ (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
+ Ditto.
+
+ * accessibility/win/AccessibilityObjectWin.cpp:
+ (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
+ Allow the new object types.
+
+ * accessibility/wx/AccessibilityObjectWx.cpp:
+ (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
+ Ignore the new object type.
+
+ * accessibility/win/AccessibilityObjectWin.cpp:
+ (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
+ If the object is an AccessibilityMenuListHiddenList or
+ AccessibilityMenuListOption, include it.
+
+ * html/HTMLOptionElement.cpp:
+ (WebCore::HTMLOptionElement::disabled):
+ Call ownElementDisabled().
+
+ * html/HTMLOptionElement.h:
+ (WebCore::HTMLOptionElement::ownElementDisabled):
+ Return the base class implementation of disabled, which returns
+ whether this <option> itself is disabled.
+
+ * platform/LocalizedStrings.h:
+ Declare new localized string functions.
+
+ * platform/gtk/LocalizedStringsGtk.cpp:
+ (WebCore::AXMenuListPopupActionVerb):
+ Stubbed.
+ (WebCore::AXMenuListActionVerb):
+ Stubbed.
+
+ * platform/haiku/LocalizedStringsHaiku.cpp:
+ (WebCore::AXMenuListPopupActionVerb):
+ Stubbed.
+ (WebCore::AXMenuListActionVerb):
+ Stubbed.
+
+ * platform/mac/LocalizedStringsMac.mm:
+ (WebCore::AXMenuListPopupActionVerb):
+ Call the view factory's method.
+ (WebCore::AXMenuListActionVerb):
+ Ditto.
+
+ * platform/qt/Localizations.cpp:
+ (WebCore::AXMenuListPopupActionVerb):
+ Stubbed.
+ (WebCore::AXMenuListActionVerb):
+ Stubbed.
+
+ * platform/wx/LocalizedStringsWx.cpp:
+ (WebCore::AXMenuListPopupActionVerb):
+ Stubbed.
+ (WebCore::AXMenuListActionVerb):
+ Stubbed.
+
+2010-01-19 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Support reflections on WebGL
+ https://bugs.webkit.org/show_bug.cgi?id=33754
+
+ Support reflections of WebGL content, by ensuring that when the Canvas3DLayer containing the
+ WebGL content gets displayed, we correctly copy its content to the clone layers.
+
+ Test: compositing/webgl/webgl-reflection.html
+
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::GraphicsLayer::didDisplay): Give the didDisplay() client method a parameter
+ which is the layer that displayed.
+ * platform/graphics/mac/Canvas3DLayer.mm:
+ (-[Canvas3DLayer display]): Override -[CALayer display], and call the client didDisplay().
+ * platform/graphics/mac/GraphicsLayerCA.h: didDisplay() takes a PlatformLayer parameter.
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::~GraphicsLayerCA): We need to clear the layer owner on the content
+ layer, since we're setting it for WebGL layers now.
+
+ (WebCore::GraphicsLayerCA::didDisplay): Handle didDisplay() calls for the content layer,
+ as well as the main layer now, getting the correct layer to copy contents from, and using
+ the correct clone map.
+
+ (WebCore::GraphicsLayerCA::setContentsToGraphicsContext3D): Set the layer owner for WebGL
+ layers, because we need the didDisplay() callback.
+
+ * platform/graphics/mac/WebLayer.mm:
+ (-[WebLayer display]): didDisplay() takes a layer argument.
+ * platform/graphics/mac/WebTiledLayer.mm:
+ (-[WebTiledLayer display]): ditto.
+
+2010-01-19 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/7555330> <http://webkit.org/b/33770> dataFunctionMatrix leaks the array allocated by toArray
+
+ Rework toArray to extract elements in to a vector rather than handing out raw pointers. This prevents
+ callers from forgetting to free the memory, and gives them the option of using stack buffers for
+ sufficiently small allocations.
+
+ * bindings/js/JSWebGLRenderingContextCustom.cpp:
+ (WebCore::JSWebGLRenderingContext::texSubImage2D):
+ (WebCore::toVector):
+ (WebCore::dataFunctionf):
+ (WebCore::dataFunctioni):
+ (WebCore::dataFunctionMatrix):
+
+2010-01-19 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Another crazy counters bug
+ https://bugs.webkit.org/show_bug.cgi?id=11031
+
+ This patch actually provides for counter updating when the style
+ of a renderer changes.
+
+ Tests: fast/css/counters/counter-increment-002.html
+ fast/css/counters/counter-reset-000.html
+ fast/css/counters/counter-reset-002.html
+
+ * rendering/RenderCounter.cpp:
+ (WebCore::RenderCounter::rendererStyleChanged):
+ This function is added to update the counter hierarchy in
+ response to changes to the style of a renderer.
+ * rendering/RenderCounter.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::styleDidChange):
+ For changes that may include the counter directives added a
+ call to RenderCounter::rendererStyleChanged.
+
+2010-01-19 Gustavo Noronha Silva <gns@gnome.org>
+
+ Unreviewed. Build fixes for make distcheck - missing files.
+
+ * GNUmakefile.am:
+
+2010-01-19 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33850
+ Attr.childNodes does not get updated after DOM mutations
+
+ Test: fast/dom/Attr/child-nodes-cache.html
+
+ * dom/Node.cpp: (WebCore::Node::notifyLocalNodeListsAttributeChanged): If the node is an
+ attribute, then changing it shouldn't take the shortcut that only resets a subset of caches.
+
+2010-01-19 John Sullivan <sullivan@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=33854
+ Would like a variant of WebHTMLRepresentation's searchForLabelsBeforeElement that returns
+ more info about where the result was found
+
+ Reviewed by Darin Adler.
+
+ No new tests. This just adds a couple of out parameters for the benefit of WebKit clients.
+
+ * WebCore.base.exp:
+ Updated mangled signature for export.
+
+ * page/Frame.cpp:
+ (WebCore::Frame::searchForLabelsAboveCell):
+ Now fills in an out parameter with the number of characters from the start of the cell.
+ (WebCore::Frame::searchForLabelsBeforeElement):
+ Now fills in an out parameter with the distance as a number of characters, and another
+ with a bool for whether the result was in a table cell above the current cell (otherwise
+ it was found in the text before this element and after the previous element or start of form).
+
+ * page/Frame.h:
+ Updated signatures.
+
+ * page/mac/FrameMac.mm:
+ (WebCore::Frame::searchForNSLabelsAboveCell):
+ Same as above. This is a parallel copy of the function using Mac-specific data structures.
+ (WebCore::Frame::searchForLabelsBeforeElement):
+ Ditto
+
+2010-01-19 Jakob Petsovits <jpetsovits@rim.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ [OpenVG] Add (EGL) surface/context management
+ https://bugs.webkit.org/show_bug.cgi?id=33403
+
+ The foundations for a new OpenVG port.
+
+ OpenVG is not tied to EGL per se, EGL just happens to be
+ the only usable backend for OpenVG state and painting
+ at the time of writing.
+
+ The purpose of the SurfaceOpenVG class is to provide
+ an EGL-independent interface for OpenVG-specific code.
+ The EGLDisplayOpenVG class takes care of keeping track
+ of EGL displays, surfaces and contexts. It also makes
+ sure that all created contexts are interoperable, and
+ that different surfaces use a single context if possible.
+
+ * platform/graphics/openvg/EGLDisplayOpenVG.cpp: Added.
+ (WebCore::displayManagers):
+ (WebCore::EGLDisplayOpenVG::currentSurface):
+ (WebCore::EGLDisplayOpenVG::registerPlatformSurface):
+ (WebCore::EGLDisplayOpenVG::unregisterPlatformSurface):
+ (WebCore::EGLDisplayOpenVG::setCurrentDisplay):
+ (WebCore::EGLDisplayOpenVG::current):
+ (WebCore::EGLDisplayOpenVG::forDisplay):
+ (WebCore::EGLDisplayOpenVG::EGLDisplayOpenVG):
+ (WebCore::EGLDisplayOpenVG::~EGLDisplayOpenVG):
+ (WebCore::EGLDisplayOpenVG::setDefaultPbufferConfig):
+ (WebCore::EGLDisplayOpenVG::defaultPbufferConfig):
+ (WebCore::EGLDisplayOpenVG::setDefaultWindowConfig):
+ (WebCore::EGLDisplayOpenVG::defaultWindowConfig):
+ (WebCore::EGLDisplayOpenVG::sharedPlatformSurface):
+ (WebCore::EGLDisplayOpenVG::createPbufferSurface):
+ (WebCore::EGLDisplayOpenVG::surfaceForWindow):
+ (WebCore::EGLDisplayOpenVG::surfacesCompatible):
+ (WebCore::EGLDisplayOpenVG::destroySurface):
+ (WebCore::EGLDisplayOpenVG::contextForSurface):
+ * platform/graphics/openvg/EGLDisplayOpenVG.h: Added.
+ (WebCore::EGLDisplayOpenVG::display):
+ * platform/graphics/openvg/EGLUtils.h: Added.
+ (toEGLErrorConstant):
+ * platform/graphics/openvg/SurfaceOpenVG.cpp: Added.
+ (WebCore::SurfaceOpenVG::currentSurface):
+ (WebCore::SurfaceOpenVG::SurfaceOpenVG):
+ (WebCore::SurfaceOpenVG::~SurfaceOpenVG):
+ (WebCore::SurfaceOpenVG::isValid):
+ (WebCore::SurfaceOpenVG::width):
+ (WebCore::SurfaceOpenVG::height):
+ (WebCore::SurfaceOpenVG::sharedSurface):
+ (WebCore::SurfaceOpenVG::makeCurrent):
+ (WebCore::SurfaceOpenVG::makeCompatibleCurrent):
+ (WebCore::SurfaceOpenVG::flush):
+ * platform/graphics/openvg/SurfaceOpenVG.h: Added.
+ (WebCore::SurfaceOpenVG::eglDisplay):
+ (WebCore::SurfaceOpenVG::eglSurface):
+ (WebCore::SurfaceOpenVG::eglContext):
+ * platform/graphics/openvg/VGUtils.h: Added.
+ (toVGErrorConstant):
+
+2010-01-19 Steve Block <steveblock@google.com>
+
+ Reviewed by David Levin.
+
+ Renames jni_utility and jni_utility_private to JNIUtility and JNIUtilityPrivate
+ https://bugs.webkit.org/show_bug.cgi?id=33843
+
+ No new tests, refactoring only.
+
+ * Android.jscbindings.mk:
+ * Android.v8bindings.mk:
+ * GNUmakefile.am:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bridge/jni/JNIUtility.cpp: Copied from WebCore/bridge/jni/jni_utility.cpp.
+ * bridge/jni/JNIUtility.h: Copied from WebCore/bridge/jni/jni_utility.h.
+ * bridge/jni/jni_jsobject.mm:
+ * bridge/jni/jni_objc.mm:
+ * bridge/jni/jni_runtime.cpp:
+ * bridge/jni/jni_runtime.h:
+ * bridge/jni/jni_utility.cpp: Removed.
+ * bridge/jni/jni_utility.h: Removed.
+ * bridge/jni/jsc/JNIUtilityPrivate.cpp: Copied from WebCore/bridge/jni/jsc/jni_utility_private.cpp.
+ (JSC::Bindings::convertValueToJValue):
+ * bridge/jni/jsc/JNIUtilityPrivate.h: Copied from WebCore/bridge/jni/jsc/jni_utility_private.h.
+ * bridge/jni/jsc/JavaClassJSC.cpp:
+ * bridge/jni/jsc/JavaInstanceJSC.cpp:
+ * bridge/jni/jsc/JavaStringJSC.h:
+ * bridge/jni/jsc/jni_utility_private.cpp: Removed.
+ * bridge/jni/jsc/jni_utility_private.h: Removed.
+ * platform/android/GeolocationServiceBridge.cpp:
+ * platform/android/GeolocationServiceBridge.h:
+ * platform/android/TemporaryLinkStubs.cpp:
+
+2010-01-19 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Occasional crash when interacting with page with reflected WebGL
+ https://bugs.webkit.org/show_bug.cgi?id=33863
+
+ If updateCompositingLayers() was called with an updateRoot that was a reflection layer,
+ then we would determine that the layer does not require compositing, and tear down its
+ backing (without clearing replicaLayer() on the source layer's GraphicsLayer).
+
+ Fix by changing requiresCompositingLayer() on a reflection layer to always give the
+ same answer for a reflection and its original.
+
+ Also add various belt-and-brances code and null checks to ensure that if we ever end up
+ with a non-composited reflection layer, we won't crash.
+
+ No new tests, because the crash depends on timing issues that are hard to reproduce in a test.
+
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::GraphicsLayer::replicaLayer): Make this public so we can use it in an assertion.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::updateBacking): Clear the source layer's replica layer
+ pointer if tearing down backing store of a reflection.
+
+ (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Null-check reflection->backing().
+ (WebCore::RenderLayerCompositor::updateLayerTreeGeometry): Null-check reflection->backing().
+ (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry): reflection->backing().
+ (WebCore::RenderLayerCompositor::requiresCompositingLayer): If being called for a reflection layer,
+ use the source layer to answer the question.
+
+2010-01-19 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Some composited reflections incorrectly positioned
+ https://bugs.webkit.org/show_bug.cgi?id=33856
+
+ When setting the position of the replicated layer inside the reflection, we need to take
+ into account the bounds of the original layer, and the replica layer to get the
+ reflection in the right place.
+
+ Tests: compositing/reflections/nested-reflection-transformed2.html
+ compositing/reflections/reflection-positioning2.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
+
+2010-01-19 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ REGRESSION: Infinite recursion in Position::getInlineBoxAndOffset()
+ https://bugs.webkit.org/show_bug.cgi?id=33864
+ <rdar://problem/7552959>
+
+ Regression has been introduced by changeset 53085.
+ The original fix had to be limited to editable content.
+
+ Test: editing/selection/selection-applet.html
+
+ * dom/Position.cpp:
+ (WebCore::Position::getInlineBoxAndOffset):
+
+2010-01-19 Kristian Amlie <kristian.amlie@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Fix qmake warning with qmake in Qt for Symbian
+ https://bugs.webkit.org/show_bug.cgi?id=33786
+
+ * WebCore.pro: Use QMAKE_LFLAGS instead of MMP_RULES.
+
+2010-01-19 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33851
+
+ Fixes an issue in the Apple Mac port where ScrollView::platformVisibleContentRect
+ returns the rectangle of the document within the content view of
+ the scroll view (i.e. the rectangle not including scrollbars) when
+ the parameter includeScrollbars == true
+
+ Currently, this behavior contradicts both the comment in ScrollView.h
+ for method visibleContentRect as well as the behavior in
+ ScrollView::visibleContentRect() for a platform-independent scroll view.
+
+ Instead, it should return the rectangle whose dimensions include
+ the scrollbars.
+
+ Also, removes some extra whitespace at the end of the lines.
+
+ No tests included because we cannot test this using either DRT
+ or a manual test.
+
+ * platform/mac/ScrollViewMac.mm:
+ (WebCore::ScrollView::platformVisibleContentRect): If includeScrollbars == true
+ then return the rectangle whose dimensions are that of
+ the frame (i.e. -[NSScrollView frame]).
+
+2010-01-19 Steve Block <steveblock@google.com>
+
+ Reviewed by David Levin.
+
+ Fixes style in WebCore/bridge/jni/jsc/JavaClassJSC
+ https://bugs.webkit.org/show_bug.cgi?id=33819
+
+ No new tests, style fixes only.
+
+ * bridge/jni/jsc/JavaClassJSC.cpp: Modified.
+ * bridge/jni/jsc/JavaClassJSC.h: Modified.
+
+2010-01-19 Jaime Yap <jaimeyap@google.com>
+
+ Reviewed by Pavel Feldman.
+
+ Refactors the TimelineRecordFactory and InspectorTimelineAgent to support reporting data
+ when closing a record. Also includes grabbing the start and end line number for parse HTML
+ records as a reference use case for the above refactor
+
+ Tests updated:
+ inspector/timeline-parse-html-expected.txt
+ inspector/timeline-layout-expected.txt
+ inspector/timeline-recalculate-styles-expected.txt
+
+ https://bugs.webkit.org/show_bug.cgi?id=33853
+
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::write):
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::willDispatchEvent):
+ (WebCore::InspectorTimelineAgent::willLayout):
+ (WebCore::InspectorTimelineAgent::willRecalculateStyle):
+ (WebCore::InspectorTimelineAgent::willPaint):
+ (WebCore::InspectorTimelineAgent::willWriteHTML):
+ (WebCore::InspectorTimelineAgent::didWriteHTML):
+ (WebCore::InspectorTimelineAgent::didInstallTimer):
+ (WebCore::InspectorTimelineAgent::didRemoveTimer):
+ (WebCore::InspectorTimelineAgent::willFireTimer):
+ (WebCore::InspectorTimelineAgent::willChangeXHRReadyState):
+ (WebCore::InspectorTimelineAgent::willLoadXHR):
+ (WebCore::InspectorTimelineAgent::willEvaluateScript):
+ (WebCore::InspectorTimelineAgent::willSendResourceRequest):
+ (WebCore::InspectorTimelineAgent::didReceiveResourceResponse):
+ (WebCore::InspectorTimelineAgent::didFinishLoadingResource):
+ (WebCore::InspectorTimelineAgent::didMarkTimeline):
+ (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
+ (WebCore::InspectorTimelineAgent::pushCurrentRecord):
+ * inspector/InspectorTimelineAgent.h:
+ (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createEventDispatchData):
+ (WebCore::TimelineRecordFactory::createGenericTimerData):
+ (WebCore::TimelineRecordFactory::createTimerInstallData):
+ (WebCore::TimelineRecordFactory::createXHRReadyStateChangeData):
+ (WebCore::TimelineRecordFactory::createXHRLoadData):
+ (WebCore::TimelineRecordFactory::createEvaluateScriptData):
+ (WebCore::TimelineRecordFactory::createMarkTimelineData):
+ (WebCore::TimelineRecordFactory::createResourceSendRequestData):
+ (WebCore::TimelineRecordFactory::createResourceReceiveResponseData):
+ (WebCore::TimelineRecordFactory::createResourceFinishData):
+ (WebCore::TimelineRecordFactory::createPaintData):
+ (WebCore::TimelineRecordFactory::createParseHTMLData):
+ * inspector/TimelineRecordFactory.h:
+
+2010-01-19 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30883
+ [Gtk] Implement AtkText for HTML elements which contain text
+
+ Moves the text assembling functionality from getPangoLayoutForAtk to
+ textForObject, which webkit_accessible_text_get_text now falls back on
+ when it comes up empty.
+
+ Adds a check in textForObject so that we don't double-add newlines
+ when we have a BR.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (textForObject):
+ (getPangoLayoutForAtk):
+ (webkit_accessible_text_get_text):
+
+2010-01-19 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Adam Roben.
+
+ error events don't fire if no <source> elements passed to media engine
+ https://bugs.webkit.org/show_bug.cgi?id=33855
+
+ Test: media/video-source-error-no-candidate.html
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::selectMediaResource): Only bail early if
+ there is no 'src' attribute and no <source> child elements at all.
+
+2010-01-19 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33822
+
+ REGRESSION(r53273): Fixes redefinition of XFORM error when building
+ WebKit using Qt Windows with the MinGW compiler.
+
+ Note, MinGW has a slightly different declaration of the struct XFORM
+ from that in the Microsoft SDK. So, we need to substitute an alternative
+ typedef for XFORM when compiling with MinGW.
+
+ No functionality was changed. So, no new tests.
+
+ * platform/graphics/transforms/TransformationMatrix.h:
+
+2010-01-19 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix for crash on large TransparencyWin allocation. The fix is
+ to leave m_layerValid false when the allocPixels of
+ OwnedBuffers::m_referenceBitmap fails. Then TransparencyWin won't
+ attempt to use it.
+
+ Will be covered by a new unit test in Chromium's test_shell_tests (when
+ this is rolled into Chromium).
+
+ https://bugs.webkit.org/show_bug.cgi?id=33844
+
+ * platform/graphics/chromium/TransparencyWin.cpp:
+ (WebCore::TransparencyWin::initializeNewContext):
+ Early return when m_referenceBitmap or its pixels is NULL, leaving
+ m_layerValid false.
+
+2010-01-19 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Adam Roben.
+
+ video.networkState remains NETWORK_LOADING indefinitely when no <source> element was able to be loaded
+ https://bugs.webkit.org/show_bug.cgi?id=33744
+
+ Test: media/video-source-none-supported.html
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::loadNextSourceChild): Call waitForSourceChange if
+ there are no valid source elements.
+ (WebCore::HTMLMediaElement::waitForSourceChange): New, set networkState to NETWORK_NO_SOURCE.
+ (WebCore::HTMLMediaElement::setNetworkState): Call waitForSourceChange if the movie
+ hasn't reached HAVE_METADATA and there are no more <source> elements to try.
+ * html/HTMLMediaElement.h: Declare waitForSourceChange.
+
+2010-01-19 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Adam Treat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33408
+
+ Implements an optimization to ignore fixed background images
+ (i.e. background-attachment: fixed) when a page does not contain
+ any fixed position elements so as to allow fast repaints (via bit
+ blit) when scrolling a page.
+
+ Currently, if a page has elements that specify either a fixed
+ background or a fixed position then we perform a slow repaint
+ (i.e disable blitting) so as to avoid rendering artifacts.
+ However, on low-powered/mobile devices slow repaints can cause
+ noticeable delays when scrolling a page with a fixed background
+ image. By sacrificing support for fixed background images when
+ there are no fixed elements on the page and with come care, we
+ don't need to force slow repaints and can avoid rendering artifacts.
+ Hence, on such devices we can improve the responsiveness of
+ scrolling a page with a fixed background image.
+
+ Note, this optimization is only enabled if the WebKit is built
+ with FAST_MOBILE_SCROLLING enabled.
+
+ Tests: fast/fast-mobile-scrolling/fixed-position-element.html
+ fast/fast-mobile-scrolling/no-fixed-position-elements.html
+
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
+ Disable fixed background attachment if we can blit on scroll.
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::styleWillChange):
+
+2010-01-19 Dave Hyatt <hyatt@apple.com>
+
+ Build bustage fix. Land modified WebCore.base.exp file that includes export of currentWorld().
+
+ * WebCore.base.exp:
+
+2010-01-19 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Crash in Page::backForwardList when using History object from a detached window
+ <rdar://problem/7556252> and https://bugs.webkit.org/show_bug.cgi?id=33828
+
+ Test: fast/loader/stateobjects/state-api-on-detached-frame-crash.html
+
+ * page/History.cpp:
+ (WebCore::History::stateObjectAdded): Do an early return when detached. The spec
+ doesn't really cover expected behavior and we already do something similar in
+ other places, such as in History::length().
+
+2010-01-19 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by NOBODY (build fix).
+
+ Revert r53467. Browser crashes on opening inspector if there
+ are messages in console.
+
+ * bindings/js/JSInjectedScriptHostCustom.cpp:
+ (WebCore::JSInjectedScriptHost::databaseForId):
+ (WebCore::JSInjectedScriptHost::inspectedWindow):
+ (WebCore::JSInjectedScriptHost::wrapCallback):
+ (WebCore::JSInjectedScriptHost::currentCallFrame):
+ (WebCore::JSInjectedScriptHost::nodeForId):
+ (WebCore::JSInjectedScriptHost::wrapObject):
+ (WebCore::JSInjectedScriptHost::unwrapObject):
+ (WebCore::JSInjectedScriptHost::pushNodePathToFrontend):
+ (WebCore::JSInjectedScriptHost::selectDatabase):
+ (WebCore::JSInjectedScriptHost::selectDOMStorage):
+ * bindings/js/ScriptController.cpp:
+ * bindings/js/ScriptController.h:
+ * bindings/js/ScriptObject.h:
+ * bindings/js/ScriptValue.cpp:
+ (WebCore::ScriptValue::quarantineValue):
+ * bindings/js/ScriptValue.h:
+ * bindings/v8/ScriptObject.h:
+ * bindings/v8/ScriptValue.h:
+ (WebCore::ScriptValue::quarantineValue):
+ * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
+ (WebCore::V8InjectedScriptHost::inspectedWindowCallback):
+ (WebCore::V8InjectedScriptHost::wrapCallbackCallback):
+ (WebCore::V8InjectedScriptHost::wrapObjectCallback):
+ (WebCore::V8InjectedScriptHost::unwrapObjectCallback):
+ * inspector/ConsoleMessage.cpp:
+ (WebCore::ConsoleMessage::ConsoleMessage):
+ (WebCore::ConsoleMessage::addToConsole):
+ (WebCore::ConsoleMessage::isEqual):
+ * inspector/ConsoleMessage.h:
+ * inspector/InjectedScriptHost.cpp:
+ (WebCore::InjectedScriptHost::wrapObject):
+ (WebCore::InjectedScriptHost::unwrapObject):
+ * inspector/InjectedScriptHost.h:
+ * inspector/InjectedScriptHost.idl:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::dispatchOnInjectedScript):
+ (WebCore::InspectorBackend::releaseWrapperObjectGroup):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::InspectorController):
+ (WebCore::InspectorController::clearConsoleMessages):
+ (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
+ (WebCore::InspectorController::windowScriptObjectAvailable):
+ (WebCore::InspectorController::scriptObjectReady):
+ (WebCore::InspectorController::setFrontendProxyObject):
+ (WebCore::InspectorController::close):
+ (WebCore::InspectorController::resetScriptObjects):
+ (WebCore::InspectorController::didPause):
+ (WebCore::InspectorController::wrapObject):
+ (WebCore::InspectorController::unwrapObject):
+ (WebCore::InspectorController::releaseWrapperObjectGroup):
+ (WebCore::InspectorController::resetInjectedScript):
+ * inspector/InspectorController.h:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addConsoleMessage):
+ (WebCore::InspectorFrontend::pausedScript):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/AuditsPanel.js:
+ (WebInspector.AuditsPanel.prototype._reloadResources):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.requestClearMessages):
+ (WebInspector.ConsoleView.prototype.completions):
+ (WebInspector.ConsoleView.prototype.doEvalInWindow):
+ (WebInspector.ConsoleView.prototype._formatnode):
+ (WebInspector.ConsoleView.prototype._formatarray):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMNode):
+ (WebInspector.CSSStyleDeclaration):
+ (WebInspector.CSSStyleDeclaration.parseRule):
+ * inspector/front-end/Database.js:
+ (WebInspector.Database.prototype.executeSql):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
+ (WebInspector.ElementsPanel.prototype.setDocument):
+ (WebInspector.ElementsPanel.prototype.searchCanceled):
+ (WebInspector.ElementsPanel.prototype.performSearch):
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype.createTooltipForImageNode):
+ * inspector/front-end/EventListenersSidebarPane.js:
+ ():
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.dispatch):
+ (InjectedScript.toggleStyleEnabled):
+ (InjectedScript._serializeRule):
+ (InjectedScript._serializeStyle):
+ (InjectedScript.getProperties):
+ (InjectedScript.setPropertyValue):
+ (InjectedScript._evaluateAndWrap):
+ (InjectedScript.getCallFrames):
+ (InjectedScript._inspectObject):
+ (InjectedScript._ensureCommandLineAPIInstalled):
+ (InjectedScript._resolveObject):
+ (InjectedScript._window):
+ (InjectedScript._objectForId):
+ (InjectedScript.createProxyObject):
+ (InjectedScript.executeSql):
+ (InjectedScript.executeSql.errorCallback):
+ (InjectedScript.executeSql.queryTransaction):
+ (Object.type):
+ (String.prototype.escapeCharacters):
+ * inspector/front-end/InjectedScriptAccess.js:
+ (InjectedScriptAccess._installHandler.InjectedScriptAccess.methodName):
+ (InjectedScriptAccess._installHandler):
+ * inspector/front-end/MetricsSidebarPane.js:
+ (WebInspector.MetricsSidebarPane):
+ (WebInspector.MetricsSidebarPane.prototype.update.inlineStyleCallback):
+ (WebInspector.MetricsSidebarPane.prototype.update):
+ (WebInspector.MetricsSidebarPane.prototype.editingCommitted):
+ * inspector/front-end/ObjectPropertiesSection.js:
+ (WebInspector.ObjectPropertiesSection.prototype.update):
+ (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
+ (WebInspector.ObjectPropertyTreeElement.prototype.applyExpression):
+ * inspector/front-end/ObjectProxy.js:
+ (WebInspector.ObjectProxy):
+ (WebInspector.ObjectProxy.getPropertiesAsync):
+ * inspector/front-end/PropertiesSidebarPane.js:
+ (WebInspector.PropertiesSidebarPane.prototype.update.callback):
+ (WebInspector.PropertiesSidebarPane.prototype.update):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame):
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylesSidebarPane.prototype.update):
+ (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
+ (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted):
+ (WebInspector.StylePropertyTreeElement.prototype):
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSection.prototype.update):
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+ (WebInspector.pausedScript):
+ (WebInspector.addConsoleMessage):
+ (WebInspector.log.logMessage):
+ (WebInspector.log):
+
+2010-01-19 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Inject inspector script directly into the inspected context. All the
+ communication between the script and the frontend is serialized into
+ JSON strings. It allows to get rid of object quarantines in Web Inspector.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32554
+
+ * bindings/js/JSInjectedScriptHostCustom.cpp:
+ (WebCore::JSInjectedScriptHost::databaseForId):
+ (WebCore::JSInjectedScriptHost::currentCallFrame):
+ (WebCore::JSInjectedScriptHost::nodeForId):
+ (WebCore::JSInjectedScriptHost::pushNodePathToFrontend):
+ (WebCore::JSInjectedScriptHost::selectDatabase):
+ (WebCore::JSInjectedScriptHost::selectDOMStorage):
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::mainWorldScriptState):
+ * bindings/js/ScriptController.h:
+ * bindings/js/ScriptObject.h:
+ (WebCore::ScriptObject::scriptState):
+ * bindings/js/ScriptValue.cpp:
+ * bindings/js/ScriptValue.h:
+ * bindings/v8/ScriptObject.h:
+ (WebCore::ScriptObject::scriptState):
+ * bindings/v8/ScriptValue.h:
+ * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
+ * inspector/ConsoleMessage.cpp:
+ (WebCore::ConsoleMessage::ConsoleMessage):
+ (WebCore::ConsoleMessage::addToConsole):
+ (WebCore::ConsoleMessage::isEqual):
+ * inspector/ConsoleMessage.h:
+ * inspector/InjectedScriptHost.cpp:
+ (WebCore::InjectedScriptHost::releaseWrapperObjectGroup):
+ * inspector/InjectedScriptHost.h:
+ * inspector/InjectedScriptHost.idl:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::setInjectedScriptSource):
+ (WebCore::InspectorBackend::dispatchOnInjectedScript):
+ (WebCore::InspectorBackend::releaseWrapperObjectGroup):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::InspectorController):
+ (WebCore::InspectorController::clearConsoleMessages):
+ (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
+ (WebCore::InspectorController::windowScriptObjectAvailable):
+ (WebCore::InspectorController::scriptObjectReady):
+ (WebCore::InspectorController::setFrontendProxyObject):
+ (WebCore::InspectorController::close):
+ (WebCore::InspectorController::resetScriptObjects):
+ (WebCore::InspectorController::didPause):
+ (WebCore::InspectorController::injectedScriptForNodeId):
+ * inspector/InspectorController.h:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addConsoleMessage):
+ (WebCore::InspectorFrontend::pausedScript):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/AuditsPanel.js:
+ (WebInspector.AuditsPanel.prototype._reloadResources):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.requestClearMessages):
+ (WebInspector.ConsoleView.prototype.doEvalInWindow):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMNode):
+ (WebInspector.CSSStyleDeclaration):
+ (WebInspector.CSSStyleDeclaration.parseRule):
+ * inspector/front-end/Database.js:
+ (WebInspector.Database.prototype.executeSql):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged.InjectedScriptAccess.get addInspectedNode):
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
+ (WebInspector.ElementsPanel.prototype.setDocument):
+ (WebInspector.ElementsPanel.prototype.searchCanceled):
+ (WebInspector.ElementsPanel.prototype.performSearch):
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype.createTooltipForImageNode):
+ * inspector/front-end/EventListenersSidebarPane.js:
+ ():
+ * inspector/front-end/InjectedScript.js:
+ (injectedScriptConstructor):
+ (injectedScriptConstructor.):
+ * inspector/front-end/InjectedScriptAccess.js:
+ (InjectedScriptAccess):
+ (InjectedScriptAccess.getDefault):
+ (get InjectedScriptAccess):
+ (InjectedScriptAccess._installHandler.InjectedScriptAccess.prototype.methodName):
+ (InjectedScriptAccess._installHandler):
+ * inspector/front-end/MetricsSidebarPane.js:
+ (WebInspector.MetricsSidebarPane):
+ (WebInspector.MetricsSidebarPane.prototype.update.inlineStyleCallback):
+ * inspector/front-end/ObjectPropertiesSection.js:
+ * inspector/front-end/ObjectProxy.js:
+ (WebInspector.ObjectProxy):
+ * inspector/front-end/PropertiesSidebarPane.js:
+ (WebInspector.PropertiesSidebarPane.prototype.update.callback):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
+ * inspector/front-end/ScriptsPanel.js:
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertyTreeElement.prototype):
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSection.prototype.update):
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+ (WebInspector.pausedScript):
+ (WebInspector.addConsoleMessage):
+ (WebInspector.log.logMessage):
+ (WebInspector.log):
+
+2010-01-19 Steve Block <steveblock@google.com>
+
+ Unreviewed build fix.
+
+ Fixes Windows build due to http://trac.webkit.org/changeset/53464
+ Updates WebCore.vcproj to reflect renaming of runtime.[cpp|h] to Bridge.[cpp|h]
+
+ No new tests, build fix only.
+
+ * WebCore.vcproj/WebCore.vcproj:
+
+2010-01-19 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ Renames WebCore/bridge/runtime.[cpp|h] to WebCore/bridge/Bridge.[cpp|h]
+ https://bugs.webkit.org/show_bug.cgi?id=33801
+
+ runtime.[cpp|h] contains general interface classes for use in the bridge,
+ so Bridge is a more appropriate name than runtime.
+
+ No new tests, renaming only.
+
+ * Android.jscbindings.mk:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * bindings/js/JSPluginElementFunctions.cpp:
+ * bindings/js/ScriptControllerGtk.cpp:
+ * bindings/js/ScriptControllerHaiku.cpp:
+ * bindings/js/ScriptControllerMac.mm:
+ * bindings/js/ScriptControllerQt.cpp:
+ * bindings/js/ScriptControllerWin.cpp:
+ * bindings/js/ScriptControllerWx.cpp:
+ * bindings/js/ScriptInstance.h:
+ * bindings/objc/WebScriptObject.mm:
+ * bridge/Bridge.cpp: Copied from WebCore/bridge/runtime.cpp.
+ * bridge/Bridge.h: Copied from WebCore/bridge/runtime.h.
+ * bridge/c/c_class.h:
+ * bridge/c/c_instance.h:
+ * bridge/c/c_runtime.h:
+ * bridge/jni/jni_instance.h:
+ * bridge/objc/objc_runtime.h:
+ * bridge/qt/qt_class.h:
+ * bridge/qt/qt_instance.h:
+ * bridge/qt/qt_runtime.cpp:
+ * bridge/qt/qt_runtime.h:
+ * bridge/runtime.cpp: Removed.
+ * bridge/runtime.h: Removed.
+ * bridge/runtime_array.h:
+ * bridge/runtime_method.h:
+ * bridge/runtime_object.h:
+ * bridge/runtime_root.cpp:
+ * bridge/testbindings.cpp:
+ * bridge/testbindings.mm:
+ * bridge/testqtbindings.cpp:
+ * page/win/FrameWin.cpp:
+ * platform/graphics/wince/MediaPlayerProxy.cpp:
+ * plugins/PluginView.cpp:
+ * plugins/gtk/PluginViewGtk.cpp:
+ * plugins/mac/PluginViewMac.cpp:
+ * plugins/qt/PluginViewQt.cpp:
+ * plugins/symbian/PluginViewSymbian.cpp:
+ * plugins/win/PluginViewWin.cpp:
+
+2010-01-19 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/
+ https://bugs.webkit.org/show_bug.cgi?id=33826
+
+ Test: fast/workers/worker-gc2.html
+
+ * bindings/js/WorkerScriptController.cpp:
+ (WebCore::WorkerScriptController::~WorkerScriptController): Removed some
+ ASSERTs that have moved to JavaScriptCore.
+
+2010-01-19 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by NOBODY (build fix).
+
+ Reverting r53455, breaks 2 javascriptcore tests.
+
+ * bindings/js/WorkerScriptController.cpp:
+ (WebCore::WorkerScriptController::~WorkerScriptController):
+
+2010-01-18 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/
+ https://bugs.webkit.org/show_bug.cgi?id=33826
+
+ Test: fast/workers/worker-gc2.html
+
+ * bindings/js/WorkerScriptController.cpp:
+ (WebCore::WorkerScriptController::~WorkerScriptController): Removed some
+ ASSERTs that have moved to JavaScriptCore.
+
+2010-01-18 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33089
+
+ Implements all of the alphabetic CSS3 list-style-types as per
+ section 4.4 of the CSS3 Lists module <http://www.w3.org/TR/css3-lists/#alphabetic>.
+
+ Test: fast/lists/w3-css3-list-styles-alphabetic.html
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue): Updated comment to include
+ added list-style-types.
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added new list style types,
+ alphabetized enums, and removed indent to conform to the WebKit Code Style Guidelines.
+ * css/CSSValueKeywords.in:
+ * inspector/front-end/CSSSourceSyntaxHighlighter.js:
+ (WebInspector.CSSSourceSyntaxHighlighter): Added new list style types
+ and alphabetized array valueKeywords.
+ * platform/text/CharacterNames.h: Added constant ethiopicPrefaceColon.
+ * rendering/RenderListMarker.cpp:
+ (WebCore::toAlphabetic):
+ (WebCore::listMarkerSuffix): Added.
+ (WebCore::listMarkerText):
+ (WebCore::RenderListMarker::paint): Modified to call WebCore::listMarkerSuffix.
+ (WebCore::RenderListMarker::calcPrefWidths): Ditto.
+ (WebCore::RenderListMarker::getRelativeMarkerRect): Ditto.
+ * rendering/style/RenderStyle.h:
+ (WebCore::):
+ * rendering/style/RenderStyleConstants.h:
+ (WebCore::):
+
+2010-01-18 Daniel Bates <dbates@webkit.org>
+
+ Unreviewed, fix misspelling of the word maximum in comment.
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::maximum):
+
+2010-01-18 Dan Bernstein <mitz@apple.com>
+
+ Rubber-stamped by Sam Weinig.
+
+ <rdar://problem/7476957> REGRESSION (r49567): Business widget list does not line up: too tall due to line height rounding change
+
+ Reverted r49567.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::computeLogicalBoxHeights):
+ * rendering/RenderBR.cpp:
+ (WebCore::RenderBR::lineHeight):
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::computedLineHeight):
+
+2010-01-18 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ Moves JSC-specific implementation of JavaString to a private implementation class.
+ https://bugs.webkit.org/show_bug.cgi?id=33558
+
+ Also modifies JavaField::name and JavaMethod::name to return const JavaString&, rather than UString::Rep*,
+ which is JSC-specific. This allows this code to be used with both JSC and V8, as required by Android.
+
+ No new tests, refactoring only.
+
+ * WebCore.xcodeproj/project.pbxproj: Modified. Added JavaStringJSC.h
+ * bridge/jni/jni_class.cpp: Modified.
+ (JavaClass::JavaClass): Modified. Updates call sites of JavaField::name and JavaMethod::name.
+ * bridge/jni/jni_runtime.h: Modified.
+ (JSC::Bindings::JavaString::JavaString): Modified. Pass through to implementation.
+ (JSC::Bindings::JavaString::UTF8String): Modified. Pass through to implementation.
+ (JSC::Bindings::JavaString::uchars): Modified. Pass through to implementation.
+ (JSC::Bindings::JavaString::length): Modified. Pass through to implementation.
+ (JSC::Bindings::JavaString::operator UString): Modified. Pass through to implementation.
+ (JSC::Bindings::JavaField::name): Modified. Pass through to implementation.
+ (JSC::Bindings::JavaMethod::name): Modified. Pass through to implementation.
+ * bridge/jni/jsc/JavaStringJSC.h: Added.
+ (JSC::Bindings::JavaStringImpl::~JavaStringImpl):
+ (JSC::Bindings::JavaStringImpl::init):
+ (JSC::Bindings::JavaStringImpl::UTF8String):
+ (JSC::Bindings::JavaStringImpl::uchars):
+ (JSC::Bindings::JavaStringImpl::length):
+ (JSC::Bindings::JavaStringImpl::uString):
+
+2010-01-18 Yuzo Fujishima <yuzo@google.com>
+
+ Reviewed by Darin Adler.
+
+ Skip an error after invalid blocks in a CSS expression.
+ https://bugs.webkit.org/show_bug.cgi?id=33650
+
+ * css/CSSGrammar.y:
+
+2010-01-15 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Darin Adler & Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33731
+ Remove uses of PtrAndFlags from WebCore::StringImpl.
+
+ These break the OS X Leaks tool. Move the management of null-terminated copies
+ out from StringImpl to String, and use a bit stolen from the refCount to hold the
+ 'InTable' flag.
+
+ * platform/sql/SQLiteFileSystem.cpp:
+ (WebCore::SQLiteFileSystem::openDatabase):
+ * platform/sql/SQLiteStatement.cpp:
+ (WebCore::SQLiteStatement::prepare):
+ * platform/sql/SQLiteStatement.h:
+ * platform/text/PlatformString.h:
+ * platform/text/String.cpp:
+ (WebCore::String::copyWithNullTermination):
+ * platform/text/StringImpl.cpp:
+ (WebCore::StringImpl::StringImpl):
+ (WebCore::StringImpl::~StringImpl):
+ (WebCore::StringImpl::create):
+ (WebCore::StringImpl::crossThreadString):
+ (WebCore::StringImpl::sharedBuffer):
+ * platform/text/StringImpl.h:
+ (WebCore::StringImpl::inTable):
+ (WebCore::StringImpl::setInTable):
+
+2010-01-18 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Rewrite SVG <use> support in a modern-fashion
+ https://bugs.webkit.org/show_bug.cgi?id=33776
+
+ Tests: svg/custom/relative-sized-deep-shadow-tree-content.xhtml
+ svg/custom/relative-sized-shadow-tree-content.xhtml
+
+ Fixes: svg/W3C-SVG-1.1/animate-elem-30-t.svg (animated circle sometimes takes wrong path)
+
+ Rewrite <use> support in less intrusive way. Try hard to avoid recloning where possible, and do it lazily.
+ Introduce RenderSVGShadowTreeRootContainer as special renderer for SVGUseElement, that now manages the
+ render tree, instead of SVGUseElement manually hacking around it's own renderer from the DOM side.
+
+ Instead of recloning the whole shadow tree for every attribute change (DOM setAttribute / SVG DOM changes / CSS changes / childrenChanged()...)
+ just notify the RenderSVGShadowTreeRootContainer that it's supposed to reclone the tree upon the next updateFromElement() call.
+
+ updateFromElement() is fired from SVGUseElement::attach() / recalcStyle(), as it's done for HTMLFormControlElement/HTMLMediaElement, thus
+ lazily recloning the shadow tree if necessary.
+
+ Animations for <use> elements was a real performance bottlenck as the tree got recloned on every attribute change. Reclones are _completly_
+ avoided for animations now - the SVGAnim*Element classes already updated the instances of an element manually, though that resulted in a reclone
+ nontheless, and thus killing performance. <use> elements can only be recloned through mutations of the elements that they reference to.
+ For example referencing a <rect> element from a <use> element and scripting the <rect> element (setAttribute, or child tree mutations etc.).
+ We reclone instead of trying to synchronize trees - as it's currenty implemented - because it's very hard to do it right.
+
+ Any DOM / SVG DOM / CSS change on the <use> element don't reclone the tree anymore, this is a huge speed benefit.
+ x/y attribute changes are correctly handled in the render tree now (by an additional local transformation), now percentual values work
+ as expected, and resize on window changes - affecting lots of testcases.
+
+ The <use> implementation is much safer now, not doing any mutations synchronously from svgAttributeChanged etc.
+ Remove hack to force garbage collection on SVGElementInstance destruction - can't reproduce it anymore.
+
+ * Android.mk: Add new files to build.
+ * GNUmakefile.am: Ditto.
+ * WebCore.gypi: Ditto.
+ * WebCore.pro: Ditto.
+ * WebCore.vcproj/WebCore.vcproj: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * rendering/RenderSVGShadowTreeRootContainer.cpp: Added. This is the rendered now created by SVGUseElement.
+ (WebCore::RenderSVGShadowTreeRootContainer::RenderSVGShadowTreeRootContainer):
+ (WebCore::RenderSVGShadowTreeRootContainer::~RenderSVGShadowTreeRootContainer):
+ (WebCore::RenderSVGShadowTreeRootContainer::updateStyle): Used form SVGUseElement to request style recalculations for the shadow tree renderers
+ (WebCore::RenderSVGShadowTreeRootContainer::updateFromElement): Used from SVGUseElement attach/recalcStyle to eventually request shadow tree updates.
+ (WebCore::RenderSVGShadowTreeRootContainer::styleDidChange): Used to propage style updates across shadow tree boundaries.
+ * rendering/RenderSVGShadowTreeRootContainer.h: Added.
+ (WebCore::RenderSVGShadowTreeRootContainer::markShadowTreeForRecreation): Marks the shadow tree for a reclone, next time updateFromElement is used.
+ * rendering/RenderSVGTransformableContainer.cpp:
+ (WebCore::RenderSVGTransformableContainer::calculateLocalTransform): Take containerTranslation() into account, supplied by RenderSVGSDhadowTreeContainer.
+ * rendering/SVGShadowTreeElements.cpp: Added. This is the root element of the SVG shadow tree residing as (hidden) child of SVGUseElement (DOM wise).
+ (WebCore::SVGShadowTreeContainerElement::SVGShadowTreeContainerElement):
+ (WebCore::SVGShadowTreeContainerElement::~SVGShadowTreeContainerElement):
+ (WebCore::SVGShadowTreeContainerElement::containerTranslation): Used from calculateLocalTransform() to take x/y translation into account for shadow tree container elements.
+ (WebCore::SVGShadowTreeRootElement::SVGShadowTreeRootElement):
+ (WebCore::SVGShadowTreeRootElement::~SVGShadowTreeRootElement):
+ (WebCore::SVGShadowTreeRootElement::attachElement): Used by RenderSVGShadowTreeRootContainer, instead of attach(), as we're a shadow tree root node.
+ * rendering/SVGShadowTreeElements.h: Added. This is the root element of each SVG shadow sub-tree (whenever a <use> element is expanded in the shadow tree).
+ (WebCore::SVGShadowTreeContainerElement::isShadowTreeContainerElement): Return true here.
+ (WebCore::SVGShadowTreeContainerElement::setContainerOffset): Used from SVGUseElement to propagate x/y translation values set on <use> elements in the shadow tree.
+ (WebCore::SVGShadowTreeRootElement::isShadowNode): Identify us as shadow node.
+ (WebCore::SVGShadowTreeRootElement::shadowParentNode): Ditto. Return actual shadow parent node (== corresponding use element).
+ * svg/SVGElement.cpp: Shrink size of all SVG*Elements, by removing the m_shadowParent parent. SVGShadowTreeRootElement is the new base class for shadow tree.
+ (WebCore::SVGElement::SVGElement):
+ (WebCore::SVGElement::eventParentNode): Call virtual shadowParentNode() method, instead of accessing m_shadowParent.
+ * svg/SVGElement.h: Remove isShadowNode() / shadowParentNode() / setShadowParentNode().
+ * svg/SVGElementInstance.cpp: Remove the hack, calling garbage collection before destruction. Can't reproduce this anymore, let's see what the bots say.
+ (WebCore::SVGElementInstance::SVGElementInstance): Remove now unnecessary m_needsUpdate flag.
+ (WebCore::SVGElementInstance::invalidateAllInstancesOfElement): Don't invalidate if instance updates are blocked (see SVGStyledElement changes)
+ * svg/SVGElementInstance.h: Remove m_needsUpdate, and forgetWrapper() method.
+ * svg/SVGGElement.h:
+ (WebCore::SVGGElement::isShadowTreeContainerElement): Add new virtual method here returning false by default, SVGShadowTreeContainerElement will override it.
+ * svg/SVGStyledElement.cpp: Remove gElementsWithInstanceUpdatesBlocked HashSet tracking the state of instancesUpdatesBlocked() per SVGStyledElement - make it a member variable.
+ * svg/SVGStyledElement.h: Add inline getter/setters around m_instanceUpdatesBlocked.
+ (WebCore::SVGStyledElement::instanceUpdatesBlocked):
+ (WebCore::SVGStyledElement::setInstanceUpdatesBlocked):
+ * svg/SVGUseElement.cpp: Full rewrite of <use> support, a detailed discussion would blow the ChangeLog - see short version above.
+ (WebCore::SVGUseElement::SVGUseElement):
+ (WebCore::SVGUseElement::instanceRoot):
+ (WebCore::SVGUseElement::insertedIntoDocument):
+ (WebCore::SVGUseElement::removedFromDocument):
+ (WebCore::SVGUseElement::svgAttributeChanged):
+ (WebCore::updateContainerOffset):
+ (WebCore::SVGUseElement::updateContainerOffsets):
+ (WebCore::SVGUseElement::recalcStyle):
+ (WebCore::dumpInstanceTree):
+ (WebCore::SVGUseElement::buildPendingResource):
+ (WebCore::SVGUseElement::buildShadowAndInstanceTree):
+ (WebCore::SVGUseElement::createRenderer):
+ (WebCore::updateFromElementCallback):
+ (WebCore::SVGUseElement::attach):
+ (WebCore::SVGUseElement::detach):
+ (WebCore::SVGUseElement::toClipPath):
+ (WebCore::SVGUseElement::buildInstanceTree):
+ (WebCore::SVGUseElement::handleDeepUseReferencing):
+ (WebCore::SVGUseElement::buildShadowTree):
+ (WebCore::SVGUseElement::expandUseElementsInShadowTree):
+ (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
+ (WebCore::SVGUseElement::instanceForShadowTreeElement):
+ (WebCore::SVGUseElement::invalidateShadowTree):
+ (WebCore::SVGUseElement::transferUseAttributesToReplacedElement):
+ * svg/SVGUseElement.h:
+ (WebCore::SVGUseElement::isPendingResource):
+
+2010-01-18 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ HTMLInputElement::valueAsDate setter support for type=month.
+ https://bugs.webkit.org/show_bug.cgi?id=33021
+
+ Introduce ISODateTime::setMillisecondsSinceEpochForMonth() and
+ toString() for the Month type, and HTMLInputElement::setValueAsDate()
+ calls them.
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::setValueAsDate):
+ * html/ISODateTime.cpp:
+ (WebCore::beforeGregorianStartDate):
+ (WebCore::ISODateTime::addDay): Use beforeGregorianStartDate().
+ (WebCore::ISODateTime::parseMonth): Use beforeGregorianStartDate().
+ (WebCore::ISODateTime::setMillisecondsSinceEpochForDateInternal):
+ (WebCore::ISODateTime::setMillisecondsSinceEpochForMonth):
+ (WebCore::ISODateTime::toString): Implement only for the Month type.
+ * html/ISODateTime.h:
+
+2010-01-18 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Script attributes are copied and pasted, making cross-domain attacks possible (30019)
+ <rdar://problem/6008809>
+ https://bugs.webkit.org/show_bug.cgi?id=30019
+
+ When we create the document fragment from a markup string,
+ either to perform a paste operation or a drag and drop, we
+ want to remove all the event handlers and any attribute that contain
+ a value that leads to code execution.
+ The HTMLParser class is now aware of the needs of stripping these attributes.
+ I've modified the call to createMarkupString for every platform.
+
+ Test: editing/pasteboard/paste-noscript.html
+
+ * WebCore.base.exp:
+ * dom/Element.cpp:
+ (WebCore::isEventHandlerAttribute):
+ (WebCore::Element::setAttributeMap):
+ * dom/Element.h:
+ * dom/MappedAttributeEntry.h:
+ (WebCore::):
+ * editing/markup.cpp:
+ (WebCore::createFragmentFromMarkup):
+ * editing/markup.h:
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::createContextualFragment):
+ * html/HTMLElement.h:
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::HTMLParser):
+ (WebCore::HTMLParser::parseToken):
+ * html/HTMLParser.h:
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::HTMLTokenizer):
+ (WebCore::parseHTMLDocumentFragment):
+ * html/HTMLTokenizer.h:
+ * platform/chromium/DragDataChromium.cpp:
+ (WebCore::DragData::asFragment):
+ * platform/chromium/PasteboardChromium.cpp:
+ (WebCore::Pasteboard::documentFragment):
+ * platform/gtk/PasteboardGtk.cpp:
+ (WebCore::Pasteboard::documentFragment):
+ * platform/mac/PasteboardMac.mm:
+ (WebCore::Pasteboard::documentFragment):
+ * platform/qt/DragDataQt.cpp:
+ (WebCore::DragData::asFragment):
+ * platform/qt/PasteboardQt.cpp:
+ (WebCore::Pasteboard::documentFragment):
+ * platform/win/ClipboardUtilitiesWin.cpp:
+ (WebCore::fragmentFromCF_HTML):
+ (WebCore::fragmentFromHTML):
+
+2010-01-18 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <https://bugs.webkit.org/show_bug.cgi?id=33816>
+ Crashes in Geolocation code due to refcounting, observer balance issues.
+
+ Hold a ref to the GeoNotifier while dispatching a callback. The code was
+ copying a data member to avoid accessing a freed this ptr, but was still
+ using the this ptr.
+
+ Geolocation::removeObserver calls are not always balanced with addObserver.
+ Instead of asserting and continuing, don't try to remove non-existant
+ observers.
+
+ * page/Geolocation.cpp:
+ (WebCore::Geolocation::GeoNotifier::timerFired): Protect notifier.
+ * page/GeolocationController.cpp:
+ (WebCore::GeolocationController::removeObserver): Change ASSERT into an if with early return.
+
+2010-01-18 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33815
+ Crash when using DOMTimer from a detached frame
+
+ Test: fast/dom/Window/timer-null-script-execution-context.html
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::setTimeout):
+ (WebCore::JSDOMWindow::setInterval):
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl:
+ Make setTimer and setInterval raise an exception. It is not specified in HTML5, but both
+ IE and Firefox do raise an exception in this situation, although different ones.
+
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::setTimeout): Raise INVALID_ACCESS_ERR if script execution context is
+ null (meaning that the window is detached).
+ (WebCore::DOMWindow::setInterval): Ditto.
+ (WebCore::DOMWindow::clearTimeout): Silently return early if there is no script execution
+ context.
+ (WebCore::DOMWindow::clearInterval): Ditto.
+ Raise INVALID_ACCESS_ERR if script execution context is null (meaning .
+
+2010-01-18 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ Moves JSC-specific version of JavaClass from bridge/jni/jni_class to bridge/jni/jsc/JavaClassJSC
+ https://bugs.webkit.org/show_bug.cgi?id=33561
+
+ No new tests, refactoring only.
+
+ * Android.jscbindings.mk: Modified. Removed jni_class.cpp and added JavaClassJSC.cpp
+ * GNUmakefile.am: Modified. Removed jni_class.h and added JavaClassJSC.h
+ * WebCore.xcodeproj/project.pbxproj: Modified. Removed jni_class.[cpp|h] and added JavaClassJSC.[cpp|h]
+ * bridge/jni/jni_class.cpp: Removed.
+ * bridge/jni/jni_class.h: Removed.
+ * bridge/jni/jsc/JavaClassJSC.cpp: Copied from WebCore/bridge/jni/jni_class.cpp.
+ * bridge/jni/jsc/JavaClassJSC.h: Copied from WebCore/bridge/jni/jni_class.h.
+ * bridge/jni/jsc/JavaInstanceJSC.cpp: Modified. Includes JavaClassJSC.h
+
+2010-01-18 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ Fix style in WebCore/bridge/jni/jsc/JavaInstanceJSC.[cpp|h]
+ https://bugs.webkit.org/show_bug.cgi?id=33792
+
+ No new tests, style fixes only.
+
+ * bridge/jni/jni_runtime.cpp: Modified.
+ (JavaField::dispatchValueFromInstance): Modified. Updated to use renamed JavaInstance::m_instance
+ (JavaField::dispatchSetValueToInstance): Modified. Updated to use renamed JavaInstance::m_instance
+ (JavaArray::JavaArray): Modified. Updated to use renamed JavaInstance::m_instance
+ * bridge/jni/jni_runtime.h: Modified.
+ (JSC::Bindings::JavaArray::javaArray): Modified. Updated to use renamed JavaInstance::m_instance
+ * bridge/jni/jsc/JavaInstanceJSC.cpp: Modified. Fixed style
+ * bridge/jni/jsc/JavaInstanceJSC.h: Modified. Fixed style
+
+2010-01-18 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30073
+ Moved reshape to HTMLCanvasElement::reset and have it always
+ set the size to the canvas width and height attrs.
+
+ This is not testable with LayoutTests, so I instead added logic
+ to the demo at:
+
+ https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/demos/webkit/SpinningBox.html
+
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::reset):
+ (WebCore::HTMLCanvasElement::paint):
+
+2010-01-18 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33813
+ <rdar://problem/7545104> Crash when using DOMApplicationCache from a destroyed frame
+
+ Test: http/tests/appcache/destroyed-frame.html
+
+ * loader/appcache/DOMApplicationCache.cpp:
+ (WebCore::DOMApplicationCache::scriptExecutionContext): Return null when there is no frame.
+
+2010-01-18 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (r53420): incomplete repaint of bottom of bugs.webkit.org comment field
+ https://bugs.webkit.org/show_bug.cgi?id=33809
+
+ Test: fast/repaint/trailing-floats-root-line-box-overflow.html
+
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::layoutInlineChildren): Copy bottom overflow from the last
+ root box to the trailing floats box, which is becoming the last root box. This is
+ needed because painting code assumes that the last line in a block is the one with the
+ lowest overflow bottom.
+
+2010-01-18 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Unreviewed trivial buildfix. (r53429)
+
+ * WebCore.pri: missing XMLNS_NAMES added.
+
+2010-01-18 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Removed unnecessary use of scriptExecutionContext() when creating a JS event listener.
+ https://bugs.webkit.org/show_bug.cgi?id=33811
+
+ This change simplifies a bunch of code, and also reduces
+ the number of places that use the difficult-to-understand and possibly
+ crashy-null scriptExecutionContext() idiom.
+
+ * bindings/js/JSDOMGlobalObject.cpp:
+ * bindings/js/JSDOMGlobalObject.h:
+ * bindings/js/JSEventListener.h:
+ (WebCore::createJSAttributeEventListener):
+ * bindings/scripts/CodeGeneratorJS.pm:
+
+2010-01-18 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33787
+ Add constants for more XML strings
+
+ No change in functionality, so no tests.
+
+ * WebCore/xml/xmlnsattrs.in: Added a new file for xmlns namespace and attribute -
+ XMLNames.{h,cpp} are auto-generated, and I dodn't see a reasonable way to extend it.
+
+ * platform/text/AtomicString.cpp: (WebCore::AtomicString::init):
+ * platform/text/AtomicString.h:
+ Added atomic strings for "xml" and "xmlns".
+
+ * page/Frame.cpp: (WebCore::Frame::Frame): Call XMLNSNames::init().
+
+ * dom/Attr.cpp: (WebCore::Attr::setPrefix):
+ * dom/Document.cpp:
+ (WebCore::Document::hasPrefixNamespaceMismatch):
+ (WebCore::Document::createAttributeNS):
+ * dom/Node.cpp:
+ (WebCore::Node::checkSetPrefix):
+ (WebCore::Node::isDefaultNamespace):
+ (WebCore::Node::lookupNamespaceURI):
+ (WebCore::Node::lookupNamespacePrefix):
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::XMLTokenizer::XMLTokenizer):
+ (WebCore::handleElementNamespaces):
+ * editing/markup.cpp:
+ (WebCore::shouldAddNamespaceAttr):
+ (WebCore::appendNamespace):
+ * xml/XPathStep.cpp:
+ (WebCore::XPath::nodeMatchesBasicTest):
+ (WebCore::XPath::Step::nodesInAxis):
+ Use the new constants.
+
+ * Android.derived.mk:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.pri:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ Added the new files to projects.
+
+2010-01-18 Anders Carlsson <andersca@apple.com>
+
+ Fix !ENABLE(3D_CANVAS) build.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::is3DCanvas):
+
+2010-01-18 Timothy Hatcher <timothy@apple.com>
+
+ Adjust the scroll position when doing a full page zoom, so the content
+ stays in relatively the same position.
+
+ <rdar://problem/6150099> Zooming should keep the page content in the same place
+
+ Reviewed by Oliver Hunt.
+
+ * page/Frame.cpp:
+ (WebCore::Frame::setZoomFactor): Apply the zoom percent difference to
+ the scroll position, only when doing a full page zoom.
+
+2010-01-18 Adam Roben <aroben@apple.com>
+
+ Add SecurityOrigin::{set,is}DomainRelaxationForbiddenForURLScheme and
+ respect it
+
+ WebCore part of fixing <http://webkit.org/b/33806>
+ <rdar://problem/7552837> Would like API to disallow setting of
+ document.domain for pages with certain URL schemes
+
+ Test: http/tests/security/setDomainRelaxationForbiddenForURLScheme.html
+
+ Reviewed by Sam Weinig.
+
+ * WebCore.base.exp: Export
+ SecurityOrigin::setDomainRelaxationForbiddenForURLScheme.
+
+ * dom/Document.cpp:
+ (WebCore::Document::setDomain): If domain relaxation is forbidden for
+ our security origin's scheme, throw an exception and don't allow
+ the domain to be set.
+
+ * page/SecurityOrigin.cpp:
+ (WebCore::schemesForbiddenFromDomainRelaxation): Added. Returns a
+ global set of schemes.
+ (WebCore::SecurityOrigin::setDomainRelaxationForbiddenForURLScheme):
+ Add or remove the scheme to schemesForbiddenFromDomainRelaxation, as
+ appropriate.
+ (WebCore::SecurityOrigin::isDomainRelaxationForbiddenForURLScheme):
+ Returns true if the scheme is in schemesForbiddenFromDomainRelaxation.
+
+ * page/SecurityOrigin.h: Added
+ {set,is}DomainRelaxationForbiddenForURLScheme.
+
+2010-01-18 Dan Bernstein <mitz@apple.com>
+
+ Address review comments on the last change
+
+ * rendering/TrailingFloatsRootInlineBox.h:
+ (WebCore::TrailingFloatsRootInlineBox::TrailingFloatsRootInlineBox):
+
+2010-01-18 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6892207> REGRESSION (Safari 4): Menus at sciencedirect.com push the main article context down the page
+ <rdar://problem/7546035> Second right floated image misplacment
+ https://bugs.webkit.org/show_bug.cgi?id=33245
+
+ Test: fast/dynamic/float-in-trailing-whitespace-after-last-line-break-2.html
+
+ When the last line of a block contains a line break and there are floats
+ after the line break, it is incorrect to put those floats in the last line’s
+ floats vector (along with floats from before the break). Instead, create
+ an additional line box (a TrailingFloatsRootInlineBox) and put those floats
+ in its floats vector.
+
+ * WebCore.vcproj/WebCore.vcproj: Added TrailingFloatsRootInlineBox.h
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::markLinesDirtyInVerticalRange): Added an optional
+ parameter, which is the highest line to dirty.
+ * rendering/RenderBlock.h:
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::layoutInlineChildren): Create a TrailingFloatsRootInlineBox
+ for the floats occurring after the line break on the last line.
+ (WebCore::RenderBlock::determineStartPosition): Prevent dirtying of lines
+ above the first dirty line.
+ * rendering/TrailingFloatsRootInlineBox.h: Added.
+ (WebCore::TrailingFloatsRootInlineBox::TrailingFloatsRootInlineBox): Call
+ setHasVirtualHeight().
+ (WebCore::TrailingFloatsRootInlineBox::virtualHeight): Return 0.
+
+2010-01-18 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by NOBODY (build fix).
+
+ Eeeep! reverting r53416 & r53417, more to be done to fix windows.
+
+ * WebCore.base.exp:
+ * platform/sql/SQLiteFileSystem.cpp:
+ (WebCore::SQLiteFileSystem::openDatabase):
+ * platform/sql/SQLiteStatement.cpp:
+ (WebCore::SQLiteStatement::prepare):
+ * platform/sql/SQLiteStatement.h:
+ * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
+ (WebCore::SQLiteFileSystem::openDatabase):
+ * platform/text/PlatformString.h:
+ * platform/text/String.cpp:
+ (WebCore::String::charactersWithNullTermination):
+ * platform/text/StringImpl.cpp:
+ (WebCore::StringImpl::operator new):
+ (WebCore::StringImpl::operator delete):
+ (WebCore::StringImpl::StringImpl):
+ (WebCore::StringImpl::~StringImpl):
+ (WebCore::StringImpl::create):
+ (WebCore::StringImpl::createWithTerminatingNullCharacter):
+ (WebCore::StringImpl::crossThreadString):
+ (WebCore::StringImpl::sharedBuffer):
+ * platform/text/StringImpl.h:
+ (WebCore::StringImpl::hasTerminatingNullCharacter):
+ (WebCore::StringImpl::inTable):
+ (WebCore::StringImpl::setInTable):
+ (WebCore::StringImpl::):
+ * platform/win/ClipboardUtilitiesWin.cpp:
+ (WebCore::createGlobalData):
+ * storage/OriginUsageRecord.cpp:
+ (WebCore::OriginUsageRecord::addDatabase):
+ (WebCore::OriginUsageRecord::markDatabase):
+
+2010-01-18 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by NOBODY (windows build fix).
+
+ * platform/win/ClipboardUtilitiesWin.cpp:
+ (WebCore::createGlobalData):
+
+2010-01-15 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33731
+ Remove uses of PtrAndFlags from WebCore::StringImpl.
+
+ These break the OS X Leaks tool. Move the management of null-terminated copies
+ out from StringImpl to String, and use a bit stolen from the refCount to hold the
+ 'InTable' flag.
+
+ * platform/sql/SQLiteFileSystem.cpp:
+ (WebCore::SQLiteFileSystem::openDatabase):
+ * platform/sql/SQLiteStatement.cpp:
+ (WebCore::SQLiteStatement::prepare):
+ * platform/sql/SQLiteStatement.h:
+ * platform/text/PlatformString.h:
+ * platform/text/String.cpp:
+ (WebCore::String::copyWithNullTermination):
+ * platform/text/StringImpl.cpp:
+ (WebCore::StringImpl::StringImpl):
+ (WebCore::StringImpl::~StringImpl):
+ (WebCore::StringImpl::create):
+ (WebCore::StringImpl::crossThreadString):
+ (WebCore::StringImpl::sharedBuffer):
+ * platform/text/StringImpl.h:
+ (WebCore::StringImpl::inTable):
+ (WebCore::StringImpl::setInTable):
+
+2010-01-18 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Made root compositing layer scroll rather than scroll parent.
+ https://bugs.webkit.org/show_bug.cgi?id=32279
+
+ There's some general cleanup here so the frames, bounds and
+ positions of all the associated layers are correct.
+ I also changed API of setScrollFrame to use an IntRect.
+
+ * platform/graphics/win/WKCACFLayerRenderer.cpp:
+ (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer):
+ (WebCore::WKCACFLayerRenderer::setScrollFrame):
+ (WebCore::WKCACFLayerRenderer::setRootChildLayer):
+ (WebCore::WKCACFLayerRenderer::createRenderer):
+ (WebCore::WKCACFLayerRenderer::resize):
+ * platform/graphics/win/WKCACFLayerRenderer.h:
+
+2010-01-18 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: Timeline panel scrolling speed can be 2 times faster.
+ https://bugs.webkit.org/show_bug.cgi?id=33794
+
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype._scheduleRefresh):
+ (WebInspector.TimelinePanel.prototype._refreshRecords):
+ (WebInspector.TimelineCalculator):
+ (WebInspector.TimelineCalculator.prototype.calculateWindow):
+ (WebInspector.TimelineCalculator.prototype.reset):
+ (WebInspector.TimelineCalculator.prototype.updateBoundaries):
+ (WebInspector.TimelineRecordGraphRow.prototype.update):
+
+2010-01-18 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ Moves JSC-specific version of JavaInstance from bridge/jni/jni_instance to bridge/jni/jsc/JavaInstanceJSC
+ https://bugs.webkit.org/show_bug.cgi?id=33672
+
+ No new tests, refactoring only.
+
+ * Android.jscbindings.mk: Modified. Removed jni_instance.cpp and added JavaInstanceJSC.cpp
+ * GNUmakefile.am: Modified. Removed jni_instance.h and added JavaInstanceJSC.h
+ * WebCore.xcodeproj/project.pbxproj: Modified. Removed jni_instance.[cpp|h] and added JavaInstanceJSC.[cpp|h]
+ * bindings/js/ScriptControllerMac.mm: Modified. Includes JavaInstanceJSC.h
+ * bridge/jni/jni_instance.cpp: Removed.
+ * bridge/jni/jni_instance.h: Removed.
+ * bridge/jni/jni_runtime.h: Modified. Includes JavaInstanceJSC.h
+ * bridge/jni/jsc/JavaInstanceJSC.cpp: Copied from WebCore/bridge/jni/jni_instance.cpp.
+ * bridge/jni/jsc/JavaInstanceJSC.h: Copied from WebCore/bridge/jni/jni_instance.h.
+
+2010-01-18 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Adam Barth.
+
+ Simplify image decoders slightly by using OwnPtr instead of raw pointers
+ and eliminating a basically-useless wrapper class in the GIF decoder.
+ https://bugs.webkit.org/show_bug.cgi?id=28751
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::ImageDecoderQt):
+ (WebCore::ImageDecoderQt::~ImageDecoderQt):
+ (WebCore::ImageDecoderQt::setData):
+ (WebCore::ImageDecoderQt::internalReadImage):
+ (WebCore::ImageDecoderQt::failRead):
+ * platform/graphics/qt/ImageDecoderQt.h:
+ * platform/image-decoders/gif/GIFImageDecoder.cpp:
+ (WebCore::GIFImageDecoder::GIFImageDecoder):
+ (WebCore::GIFImageDecoder::~GIFImageDecoder):
+ (WebCore::GIFImageDecoder::setData):
+ (WebCore::GIFImageDecoder::frameCount):
+ (WebCore::GIFImageDecoder::repetitionCount):
+ (WebCore::GIFImageDecoder::decode):
+ (WebCore::GIFImageDecoder::decodingHalted):
+ (WebCore::GIFImageDecoder::initFrameBuffer):
+ (WebCore::GIFImageDecoder::haveDecodedRow):
+ (WebCore::GIFImageDecoder::gifComplete):
+ * platform/image-decoders/gif/GIFImageDecoder.h:
+ * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+ (WebCore::JPEGImageDecoder::JPEGImageDecoder):
+ (WebCore::JPEGImageDecoder::~JPEGImageDecoder):
+ (WebCore::JPEGImageDecoder::setData):
+ (WebCore::JPEGImageDecoder::decode):
+ * platform/image-decoders/jpeg/JPEGImageDecoder.h:
+ * platform/image-decoders/png/PNGImageDecoder.cpp:
+ (WebCore::PNGImageDecoder::PNGImageDecoder):
+ (WebCore::PNGImageDecoder::~PNGImageDecoder):
+ (WebCore::PNGImageDecoder::setData):
+ (WebCore::PNGImageDecoder::decode):
+ (WebCore::PNGImageDecoder::headerAvailable):
+ (WebCore::PNGImageDecoder::rowAvailable):
+ * platform/image-decoders/png/PNGImageDecoder.h:
+
+2010-01-18 Daniel Cheng <dcheng@google.com>
+
+ Reviewed by Adam Roben.
+
+ DataTransfer interface broken on Windows--types member is always
+ undefined, and getData() does not work.
+ https://bugs.webkit.org/show_bug.cgi?id=30527
+
+ * platform/win/ClipboardWin.cpp:
+ (WebCore::addMimeTypesForFormat): pass FORMATETC as a const ref.
+ (WebCore::ClipboardWin::types): fix calls to IEnumFORMATETC.
+ (WebCore::ClipboardWin::hasData): fix calls to IEnumFORMATETC.
+
+2010-01-18 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Don't show Profiles welcome screen on panel switch,
+ if a profile view is shown.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33799
+
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype.show):
+
+2010-01-18 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Force qmake to generate a single makefile for DerivedSources.pro
+
+ * DerivedSources.pro:
+
+2010-01-18 Jonathan Dixon <joth@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for enabling navigator.geolocation at runtime in the V8 bindings.
+ Adds the [EnabledAtRuntime] modifier to the navigator IDL.
+ https://bugs.webkit.org/show_bug.cgi?id=33467
+
+ * WebCore.gypi:
+ * bindings/v8/RuntimeEnabledFeatures.cpp:
+ * bindings/v8/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::setGeolocationEnabled):
+ (WebCore::RuntimeEnabledFeatures::geolocationEnabled):
+ * bindings/v8/custom/V8NavigatorCustom.cpp: Added.
+ (WebCore::V8Navigator::GeolocationEnabled):
+ * page/Navigator.cpp:
+ (WebCore::Navigator::geolocation):
+ * page/Navigator.idl:
+
+2010-01-18 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Improve Resources panel performance for lots of resources
+
+ DOM properties are extracted into const's, comparisons are faster.
+ https://bugs.webkit.org/show_bug.cgi?id=33790
+
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype._updateDividersLabelBarPosition):
+ * inspector/front-end/Resource.js:
+ (WebInspector.Resource.CompareByStartTime):
+ (WebInspector.Resource.CompareByResponseReceivedTime):
+ (WebInspector.Resource.CompareByEndTime):
+ (WebInspector.Resource.CompareByDuration):
+ (WebInspector.Resource.CompareByLatency):
+ (WebInspector.Resource.CompareBySize):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceGraph.prototype.refreshLabelPositions):
+
+2010-01-18 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33726
+
+ Following up on changes made with respect to bug #33498, we should
+ fix the the style errors found by the style bot.
+
+ Moreover, this fixes all the style errors found by check-webkit-style
+ except the use of an underline in the variable name _niflags. We should
+ fix this in a second run through for all the other variables names that
+ contain an underline because there are many.
+
+ No functionality was changed. So, no new tests.
+
+ * rendering/style/SVGRenderStyle.h:
+ (WebCore::SVGRenderStyle::create):
+ (WebCore::SVGRenderStyle::copy):
+ (WebCore::SVGRenderStyle::operator!=):
+ (WebCore::SVGRenderStyle::hasStroke):
+ (WebCore::SVGRenderStyle::hasFill):
+ (WebCore::SVGRenderStyle::InheritedFlags::operator==):
+ (WebCore::SVGRenderStyle::InheritedFlags::operator!=):
+ (WebCore::SVGRenderStyle::NonInheritedFlags::operator==):
+ (WebCore::SVGRenderStyle::NonInheritedFlags::operator!=):
+ (WebCore::SVGRenderStyle::NonInheritedFlags::):
+ (WebCore::SVGRenderStyle::):
+ (WebCore::SVGRenderStyle::setBitDefaults):
+
+2010-01-18 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Adam Barth.
+
+ [Android] DOMWrapperMap::Visitor needs virtual destructor
+ https://bugs.webkit.org/show_bug.cgi?id=33675
+
+ Add protected virtual dtor to DOMWrapperMap::Visitor. See bug for further discussion.
+
+ No new tests needed, functionality not changed.
+
+ * bindings/v8/V8DOMMap.h:
+ (WebCore::DOMWrapperMap::Visitor::~Visitor): Added.
+
+2010-01-18 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Unreviewed Symbian build fix.
+
+ If we don't link with def files, then we have to pass EXPORTUNFROZEN,
+ so that the build system still creates the .dso files in
+ release/armv5/lib and we can actually link against the created QtWebKit
+ dlls.
+
+ Thanks Iain for the help!
+
+ * WebCore.pro:
+
+2010-01-17 Srinidhi Shreedhara <srinidhi.shreedhara@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] [Symbian] SetWindow call in npapi plugin does not happen when the cooridnates are negative
+ https://bugs.webkit.org/show_bug.cgi?id=33573
+
+ * plugins/symbian/PluginViewSymbian.cpp:
+ (WebCore::PluginView::setNPWindowIfNeeded): Remove tests for negative
+ coordinates for early return.
+
+2010-01-17 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ REGRESSION (r52449): SVG mask wrongly clipped when not at origin for recent nightly build
+ https://bugs.webkit.org/show_bug.cgi?id=33782
+
+ Test: svg/custom/transformedMaskFails.svg
+
+ When computing the bounds for elements in a mask, we iterate through
+ all of our children requesting their repaint bounds using
+ repaintRectInLocalCoordinates(), but we were not converting that
+ rect into our own coordinate system, thus leading to an incorrect
+ repaint rect. This patch simply adds the missing localToParent
+ transform.
+
+ * svg/SVGMaskElement.cpp:
+ (WebCore::SVGMaskElement::drawMaskerContent):
+
+2010-01-17 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Avoid slow access to AX objects on attribute access when AX is off
+ https://bugs.webkit.org/show_bug.cgi?id=33779
+
+ ~4% Dromaeo attributes test speedup
+
+ * dom/Element.cpp:
+ (WebCore::Element::updateAfterAttributeChanged): Don't do expensive lookup of
+ AX object cache unless accessibility is on and an AX-related attribute is
+ changed.
+
+2010-01-17 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ [wx] On Win and GTK, we need to manually apply the transforms when falling back
+ to GDI / GDK drawing, but this is not needed on Mac since we always use CG there.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33730
+
+ * platform/wx/RenderThemeWx.cpp:
+ (WebCore::RenderThemeWx::paintButton):
+
+2010-01-17 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] GtkWebKit incompatible with rgba colormaps
+ https://bugs.webkit.org/show_bug.cgi?id=20736
+
+ Fix GTK theme rendering onto drawables with RGBA colormaps. Now
+ each type of colormap has its own collection of GtkWidgets.
+
+ This fix does not introduce any functionality changes, so does not
+ includes new tests.
+
+ * platform/gtk/RenderThemeGtk.cpp:
+ (WebCore::RenderThemeGtk::RenderThemeGtk):
+ (WebCore::RenderThemeGtk::~RenderThemeGtk):
+ (WebCore::RenderThemeGtk::partsForDrawable):
+ (WebCore::adjustMozillaStyle):
+ (WebCore::setMozillaState):
+ (WebCore::paintMozillaGtkWidget):
+ (WebCore::setToggleSize):
+ (WebCore::RenderThemeGtk::setCheckboxSize):
+ (WebCore::RenderThemeGtk::paintCheckbox):
+ (WebCore::RenderThemeGtk::setRadioSize):
+ (WebCore::RenderThemeGtk::paintRadio):
+ (WebCore::RenderThemeGtk::paintButton):
+ (WebCore::RenderThemeGtk::adjustMenuListStyle):
+ (WebCore::RenderThemeGtk::paintMenuList):
+ (WebCore::RenderThemeGtk::adjustTextFieldStyle):
+ (WebCore::RenderThemeGtk::paintTextField):
+ (WebCore::RenderThemeGtk::paintSearchFieldResultsButton):
+ (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration):
+ (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
+ * platform/gtk/RenderThemeGtk.h:
+ * platform/gtk/gtk2drawing.c:
+ (moz_gtk_use_theme_parts):
+ (ensure_window_widget):
+ (setup_widget_prototype):
+ (ensure_button_widget):
+ (ensure_hpaned_widget):
+ (ensure_vpaned_widget):
+ (ensure_toggle_button_widget):
+ (ensure_button_arrow_widget):
+ (ensure_checkbox_widget):
+ (ensure_radiobutton_widget):
+ (ensure_scrollbar_widget):
+ (ensure_spin_widget):
+ (ensure_scale_widget):
+ (ensure_entry_widget):
+ (moz_gtk_get_combo_box_inner_button):
+ (moz_gtk_get_combo_box_button_inner_widgets):
+ (ensure_combo_box_widgets):
+ (moz_gtk_get_combo_box_entry_inner_widgets):
+ (moz_gtk_get_combo_box_entry_arrow):
+ (ensure_combo_box_entry_widgets):
+ (ensure_handlebox_widget):
+ (ensure_toolbar_widget):
+ (ensure_toolbar_separator_widget):
+ (ensure_tooltip_widget):
+ (ensure_tab_widget):
+ (ensure_progress_widget):
+ (ensure_statusbar_widget):
+ (ensure_frame_widget):
+ (ensure_menu_bar_widget):
+ (ensure_menu_bar_item_widget):
+ (ensure_menu_popup_widget):
+ (ensure_menu_item_widget):
+ (ensure_image_menu_item_widget):
+ (ensure_menu_separator_widget):
+ (ensure_check_menu_item_widget):
+ (ensure_tree_view_widget):
+ (ensure_tree_header_cell_widget):
+ (ensure_expander_widget):
+ (ensure_scrolled_window_widget):
+ (moz_gtk_checkbox_get_metrics):
+ (moz_gtk_radio_get_metrics):
+ (moz_gtk_splitter_get_metrics):
+ (moz_gtk_toggle_paint):
+ (moz_gtk_scrollbar_button_paint):
+ (moz_gtk_scrollbar_trough_paint):
+ (moz_gtk_scrollbar_thumb_paint):
+ (moz_gtk_spin_paint):
+ (moz_gtk_spin_updown_paint):
+ (moz_gtk_scale_paint):
+ (moz_gtk_scale_thumb_paint):
+ (moz_gtk_gripper_paint):
+ (moz_gtk_hpaned_paint):
+ (moz_gtk_vpaned_paint):
+ (moz_gtk_caret_paint):
+ (moz_gtk_treeview_paint):
+ (moz_gtk_tree_header_cell_paint):
+ (moz_gtk_tree_header_sort_arrow_paint):
+ (moz_gtk_treeview_expander_paint):
+ (moz_gtk_expander_paint):
+ (moz_gtk_combo_box_paint):
+ (moz_gtk_downarrow_paint):
+ (moz_gtk_combo_box_entry_button_paint):
+ (moz_gtk_container_paint):
+ (moz_gtk_toggle_label_paint):
+ (moz_gtk_toolbar_paint):
+ (moz_gtk_toolbar_separator_paint):
+ (moz_gtk_tooltip_paint):
+ (moz_gtk_resizer_paint):
+ (moz_gtk_frame_paint):
+ (moz_gtk_progressbar_paint):
+ (moz_gtk_progress_chunk_paint):
+ (moz_gtk_get_tab_thickness):
+ (moz_gtk_tab_paint):
+ (moz_gtk_tabpanels_paint):
+ (moz_gtk_tab_scroll_arrow_paint):
+ (moz_gtk_menu_bar_paint):
+ (moz_gtk_menu_popup_paint):
+ (moz_gtk_menu_separator_paint):
+ (moz_gtk_menu_item_paint):
+ (moz_gtk_menu_arrow_paint):
+ (moz_gtk_check_menu_item_paint):
+ (moz_gtk_window_paint):
+ (moz_gtk_get_widget_border):
+ (moz_gtk_get_combo_box_entry_button_size):
+ (moz_gtk_get_tab_scroll_arrow_size):
+ (moz_gtk_get_downarrow_size):
+ (moz_gtk_get_toolbar_separator_width):
+ (moz_gtk_get_expander_size):
+ (moz_gtk_get_treeview_expander_size):
+ (moz_gtk_get_menu_separator_height):
+ (moz_gtk_get_scalethumb_metrics):
+ (moz_gtk_get_scrollbar_metrics):
+ (moz_gtk_images_in_menus):
+ (moz_gtk_widget_paint):
+ (moz_gtk_get_scrollbar_widget):
+ (moz_gtk_shutdown):
+ (moz_gtk_destroy_theme_parts_widgets):
+ * platform/gtk/gtkdrawing.h:
+
+2010-01-16 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Cache JS string values made from DOM strings (Dromaeo speedup)
+ https://bugs.webkit.org/show_bug.cgi?id=33768
+ <rdar://problem/7353576>
+
+ Added a new cache for JSString values that are created from Strings or AtomicStrings
+ in the DOM. It's common for the same string to be retrieved from the DOM repeatedly,
+ and it is wasteful to make a new JS-level string value every time.
+
+ The string cache is per-world, and thus thread-safe and not a
+ vector for accidental information exchange.
+
+ ~30% speedup on Dromaeo Attributes test, also substantially helps other Dromaeo DOM tests.
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::jsStringCache): Helper function to get the string cache for the current world.
+ (WebCore::jsString): Some new overloads including the caching version.
+ (WebCore::stringWrapperDestroyed): Finalizer callback - remove from relevant caches.
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::jsString): Prototype new overloads (and define a few inline).
+ * bindings/js/JSJavaScriptCallFrameCustom.cpp:
+ (WebCore::JSJavaScriptCallFrame::type): Explicitly make a UString.
+ * bindings/js/ScriptFunctionCall.cpp:
+ (WebCore::ScriptFunctionCall::appendArgument): Ditto.
+ * WebCore.base.exp: Add new JSString overloads that WebCore gets to see.
+
+2010-01-16 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVG Markers are getting culled incorrectly
+ https://bugs.webkit.org/show_bug.cgi?id=33767
+
+ Use applyTransformToPaintInfo to transform the paintInfo, otherwise
+ the paint rect is not updated leading to incorrect culling.
+
+ * svg/graphics/SVGResourceMarker.cpp:
+ (WebCore::SVGResourceMarker::draw):
+
+2010-01-15 John Sullivan <sullivan@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=33751 and <rdar://problem/7538330>
+ Zip code field is misidentified as street address because id attribute isn't checked.
+
+ Reviewed by Darin Adler
+
+ No new tests. I believe this code is used only by Safari AutoFill, but in any case
+ it does not affect page rendering or anything else at the WebCore/WebKit level.
+
+ * page/Frame.cpp:
+ (WebCore::matchLabelsAgainstString):
+ New function, split out from matchLabelsAgainstElement.
+ (WebCore::Frame::matchLabelsAgainstElement):
+ Now calls matchLabelsAgainstString for the id attribute if no match is found for the name attribute.
+
+ * page/mac/FrameMac.mm:
+ (WebCore::matchLabelsAgainstString):
+ Same as above. This is a parallel copy of the function using Mac-specific data structures.
+ (WebCore::Frame::matchLabelsAgainstElement):
+ Ditto.
+
+2010-01-16 Timothy Hatcher <timothy@apple.com>
+
+ Use String.trim() instead of a regex in the Web Inspector.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33765
+
+ Reviewed by George Staikos.
+
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.performSearch): Use .trim().
+ * inspector/front-end/ObjectPropertiesSection.js:
+ (WebInspector.ObjectPropertyTreeElement.prototype.applyExpression): Ditto.
+ * inspector/front-end/ProfileView.js:
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._evalSelectionInCallFrame): Ditto.
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertyTreeElement.prototype): Ditto.
+ * inspector/front-end/utilities.js:
+ (String.prototype.trimLeadingWhitespace): Removed.
+ (String.prototype.trimTrailingWhitespace): Removed.
+ (String.prototype.trimWhitespace): Removed.
+
+2010-01-16 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Copying TransformationMatrix consumed a lot of cpu time while scroll with cursor over content
+ https://bugs.webkit.org/show_bug.cgi?id=33766
+
+ Make localToParentTransform return by reference to avid copy overhead.
+ This is a little gnarly in places as it means we need to be able to
+ return temporary values in a few implementations, so we have to add
+ class fields to hold them, heppily the classes that these effect are
+ sufficiently uncommon for this to be okay.
+
+ * rendering/RenderForeignObject.cpp:
+ (WebCore::RenderForeignObject::localToParentTransform):
+ * rendering/RenderForeignObject.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::localTransform):
+ (WebCore::RenderObject::localToParentTransform):
+ * rendering/RenderObject.h:
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::localToParentTransform):
+ (WebCore::RenderPath::nodeAtFloatPoint):
+ * rendering/RenderPath.h:
+ * rendering/RenderSVGImage.h:
+ (WebCore::RenderSVGImage::localToParentTransform):
+ * rendering/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::localToParentTransform):
+ * rendering/RenderSVGRoot.h:
+ * rendering/RenderSVGText.h:
+ (WebCore::RenderSVGText::localToParentTransform):
+ * rendering/RenderSVGTransformableContainer.cpp:
+ (WebCore::RenderSVGTransformableContainer::localToParentTransform):
+ * rendering/RenderSVGTransformableContainer.h:
+ * rendering/RenderSVGViewportContainer.cpp:
+ (WebCore::RenderSVGViewportContainer::localToParentTransform):
+ * rendering/RenderSVGViewportContainer.h:
+
+2010-01-16 Darin Adler <darin@apple.com>
+
+ Reviewed by Oliver Hunt and Alexey Proskuryakov.
+
+ ValidityState can hold a stale pointer to control
+ https://bugs.webkit.org/show_bug.cgi?id=33729
+ rdar://problem/7545114
+
+ Test: fast/forms/ValidityState-removed-control.html
+
+ * html/HTMLFormControlElement.h: Use OwnPtr instead of
+ RefPtr to point to the ValidityState object.
+
+ * html/ValidityState.cpp: Use a constant instead of a
+ macro for the email validation regular expression.
+ (WebCore::ValidityState::validationMessage): Use
+ m_control instead of control function; we don't need
+ a function for this. Also marked const.
+ (WebCore::ValidityState::typeMismatch): Ditto.
+ Fixed some minor style problems.
+ (WebCore::ValidityState::rangeUnderflow): Ditto.
+ (WebCore::ValidityState::rangeOverflow): Ditto.
+ (WebCore::ValidityState::stepMismatch): Ditto.
+ (WebCore::ValidityState::valid): Ditto.
+ (WebCore::ValidityState::isValidEmailAddress):
+ Changed local variable names for clarity. Got rid of
+ an unneeded global variable.
+
+ * html/ValidityState.h: Removed RefCounted as a base
+ class, deriving from Noncopyable instead. Changed
+ creation to use PassOwnPtr instead of PassRefPtr.
+ Eliminated unneeded control function. Added ref and
+ deref functions that forward the reference counting
+ to the control. Moved constructor here and made it
+ inline.
+
+2010-01-15 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33752
+ Assertion failure when getting a href attribute with prefix
+
+ This was due to a temporary change made in 2005 (r9639) - checks in checkSetPrefix were
+ disabled during introduction of QualifiedName, but never re-enabled.
+
+ Tests: fast/dom/bad-href-attribute.html
+ fast/dom/node-prefix-setter-namespace-exception.html
+
+ * dom/Attr.cpp: (WebCore::Attr::setPrefix):
+ * dom/Element.cpp: (WebCore::Element::setPrefix):
+ * dom/Node.cpp: (WebCore::Node::checkSetPrefix):
+ Re-enabled the checks. Also, changed the prefix setter to treat "" as null, matching Firefox
+ (DOM 3 Core spec says this behavior is implementation defined).
+
+2010-01-16 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7536748> and https://bugs.webkit.org/show_bug.cgi?id=33571
+ History traversals to a new document do not get the popstate event
+
+ State objects now live-on in their HistoryItem indefinitely.
+ This means any back/forward navigation might result in a popstate event, not just to
+ pre-existing documents as was previously the case.
+
+ * history/HistoryItem.cpp:
+ (WebCore::HistoryItem::documentDetached): State objects are held beyond Document lifetime.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::begin): If there is a pending state object for this Frame load, pass it
+ on to the Document after the Document is created.
+ (WebCore::FrameLoader::transitionToCommitted): If the current history item has a state object,
+ set it as the FrameLoad's pending state object.
+ * loader/FrameLoader.h:
+
+ * page/Page.cpp:
+ (WebCore::Page::goToItem): Remove a now-invalid ASSERT.
+
+2010-01-15 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein and Adele Peterson.
+
+ Support reflections on composited layers
+ https://bugs.webkit.org/show_bug.cgi?id=31885
+
+ Implement reflections (via -webkit-box-reflect:) on compositing layers.
+
+ We add to the GraphicsLayer the notion of having a replica, and being a replicated layer.
+ The replica layer is not parented in the tree, but referenced by another layer.
+ RenderLayerBacking sets this up when it finds RenderLayers for reflections.
+
+ GraphicsLayerCA implements rendering of replica layers by cloning CA layers,
+ and copying their properties, including animations and contents. Deep reflections
+ are supported by a hash of clone layers on each GraphicsLayerCA, indexed by
+ the path down the tree to each replica instance.
+
+ When GraphicsLayerCA properties are changed, in most cases the clones must also
+ be updated.
+
+ Tests: compositing/masks/direct-image-mask.html
+ compositing/reflections/animation-inside-reflection.html
+ compositing/reflections/compositing-change-inside-reflection.html
+ compositing/reflections/deeply-nested-reflections.html
+ compositing/reflections/masked-reflection-on-composited.html
+ compositing/reflections/nested-reflection-anchor-point.html
+ compositing/reflections/nested-reflection-animated.html
+ compositing/reflections/nested-reflection-mask-change.html
+ compositing/reflections/nested-reflection-on-overflow.html
+ compositing/reflections/nested-reflection-opacity.html
+ compositing/reflections/nested-reflection-size-change.html
+ compositing/reflections/nested-reflection-transformed.html
+ compositing/reflections/nested-reflection-transition.html
+ compositing/reflections/nested-reflection.html
+ compositing/reflections/reflection-opacity.html
+ compositing/reflections/reflection-ordering.html
+ compositing/reflections/reflection-positioning.html
+ compositing/reflections/transform-inside-reflection.html
+
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::GraphicsLayer::isReplicated): Returns true when this layer has a replicated layer.
+ (WebCore::GraphicsLayer::replicatedLayerPosition):
+ (WebCore::GraphicsLayer::setReplicatedLayerPosition): The position of the replica layer must be
+ special-cased; we cannot just copy the position of the original.
+ (WebCore::GraphicsLayer::didDisplay): Method that indicates that the contents of the layer changed,
+ which gives us a chance to update clone layers.
+ (WebCore::GraphicsLayer::replicaLayer): reference to the replica layer.
+ (WebCore::GraphicsLayer::replicatedLayer): reference to the layer that this (replica) layer is replicating.
+ (WebCore::GraphicsLayer::setReplicatedLayer):
+
+ * platform/graphics/GraphicsLayer.cpp:
+ (WebCore::GraphicsLayer::GraphicsLayer):
+ (WebCore::GraphicsLayer::setReplicatedByLayer): Hook up a replica with its replicated layer.
+ (WebCore::GraphicsLayer::dumpProperties):
+
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ (WebCore::GraphicsLayerCA::primaryLayer): Returns a CALayer, since structural layers may not be WebLayers.
+ (WebCore::GraphicsLayerCA::isReplicatedRootClone): Given a cloneID (string representation of the path to a clone
+ down the tree, which is a bitstring of 1 (replica), or 0 (non-replica)), returns true if this ID represents the
+ root of a replica tree.
+ (WebCore::GraphicsLayerCA::primaryLayerClones): Returns a pointer to the hash map of clones of the primary layers.
+
+ (WebCore::GraphicsLayerCA::ReplicaState::ReplicaState): Small struct used to track original/clone branching
+ down the tree during recursion, to build cloneID paths.
+
+ (WebCore::GraphicsLayerCA::hasCloneLayers): returns true if this layer has clone layers.
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::~GraphicsLayerCA): remove the clone layers.
+ (WebCore::GraphicsLayerCA::setChildren): call noteSublayersChanged() since we may have to update replicas too.
+ (WebCore::GraphicsLayerCA::addChild): ditto
+ (WebCore::GraphicsLayerCA::addChildAtIndex): ditto
+ (WebCore::GraphicsLayerCA::addChildBelow): ditto
+ (WebCore::GraphicsLayerCA::addChildAbove): ditto
+ (WebCore::GraphicsLayerCA::replaceChild): ditto
+ (WebCore::GraphicsLayerCA::removeFromParent): ditto
+ (WebCore::GraphicsLayerCA::setMaskLayer): call propagateLayerChangeToReplicas()
+ (WebCore::GraphicsLayerCA::setReplicatedLayer): note replica changed.
+ (WebCore::GraphicsLayerCA::setReplicatedByLayer): ditto
+ (WebCore::GraphicsLayerCA::moveOrCopyAllAnimationsForProperty): Enhanced to allow moving or copying animations.
+ (WebCore::GraphicsLayerCA::moveOrCopyAnimationsForProperty): Ditto.
+ (WebCore::GraphicsLayerCA::setContentsToImage): call noteSublayersChanged()
+ (WebCore::GraphicsLayerCA::setContentsToVideo): call noteSublayersChanged()
+ (WebCore::GraphicsLayerCA::didDisplay): here is our chance to copy updated contents to clone layers.
+ (WebCore::GraphicsLayerCA::recursiveCommitChanges):
+ (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): pre-order commit, for things that need to be
+ committed before we recurse on children.
+ (WebCore::GraphicsLayerCA::commitLayerChangesAfterSublayers): post-order commit, for things that need to be
+ committed after we recurse on children, like clones.
+ (WebCore::GraphicsLayerCA::updateLayerNames): New method to match the other 'update' methods.
+ (WebCore::GraphicsLayerCA::updateSublayerList): Insert replica layers into the hierarchy.
+ (WebCore::GraphicsLayerCA::updateLayerPosition): update clones.
+ (WebCore::GraphicsLayerCA::updateLayerSize): ditto
+ (WebCore::GraphicsLayerCA::updateAnchorPoint): ditto
+ (WebCore::GraphicsLayerCA::updateTransform): ditto
+ (WebCore::GraphicsLayerCA::updateChildrenTransform): ditto
+ (WebCore::GraphicsLayerCA::updateMasksToBounds): ditto
+ (WebCore::GraphicsLayerCA::updateContentsOpaque): ditto
+ (WebCore::GraphicsLayerCA::updateBackfaceVisibility): ditto
+ (WebCore::GraphicsLayerCA::updateStructuralLayer): call ensureStructuralLayer()
+ (WebCore::moveAnimation): utility to move a CAAnimation from one layer to another.
+ (WebCore::GraphicsLayerCA::ensureStructuralLayer): refactored code which creates enclosing CALayers for reflection
+ flattening, or CATransformLayers for preserve-3d.
+ (WebCore::GraphicsLayerCA::structuralLayerPurpose): indicates why we need a structural layer.
+ (WebCore::GraphicsLayerCA::updateLayerDrawsContent): update clones
+ (WebCore::GraphicsLayerCA::updateContentsImage): ditto
+ (WebCore::GraphicsLayerCA::updateContentsRect): ditto
+ (WebCore::GraphicsLayerCA::updateMaskLayer): ditto
+ (WebCore::GraphicsLayerCA::updateReplicatedLayers): This is where we ask for the tree of layers for the replica
+ and its children, and attach them as sublayers.
+ (WebCore::GraphicsLayerCA::ReplicaState::cloneID): Build a bitstring from the array of original/clone values; this
+ string serves to identify clones in the hash map.
+ (WebCore::GraphicsLayerCA::replicatedLayerRoot): Request the tree of clone layers, set its position and transform,
+ and return it.
+ (WebCore::GraphicsLayerCA::setAnimationOnLayer): update clones
+ (WebCore::GraphicsLayerCA::removeAnimationFromLayer): ditto
+ (WebCore::GraphicsLayerCA::pauseAnimationOnLayer): ditto
+ (WebCore::GraphicsLayerCA::setContentsToGraphicsContext3D): udpate sublayers.
+ (WebCore::GraphicsLayerCA::suspendAnimations): update clones.
+ (WebCore::GraphicsLayerCA::resumeAnimations): ditto
+ (WebCore::GraphicsLayerCA::animatedLayerClones): return the hash map for clones of the appropriate layer for the given property.
+ (WebCore::GraphicsLayerCA::ensureCloneLayers): create and return clones for the CALayers for this layer.
+ (WebCore::GraphicsLayerCA::removeCloneLayers): clear out the clone layers.
+ (WebCore::GraphicsLayerCA::positionForCloneRootLayer): the root of a clonal subtree needs its position and transform to be special-cased,
+ since it doesn't just copy those properties from the original.
+ (WebCore::GraphicsLayerCA::propagateLayerChangeToReplicas): push the change flags onto the replica.
+ (WebCore::GraphicsLayerCA::fetchCloneLayers): recurse down sublayers, creating clones of the CALayers along the way, and returning
+ the root of the clone tree.
+ (WebCore::copyAnimation): utility to copy an animation from one layer to another. Animations can be shared between layers.
+ (WebCore::GraphicsLayerCA::cloneLayer): utility to clone a CALayer, copying those properties which GraphicsLayerCA makes use of
+ (WebCore::GraphicsLayerCA::setOpacityInternal): push opacity changes to clones.
+ (WebCore::GraphicsLayerCA::updateOpacityOnLayer): ditto
+ (WebCore::GraphicsLayerCA::noteSublayersChanged): set the ChildrenChanged flag, and proprate changes to the replica, if any.
+
+ * platform/graphics/mac/WebLayer.mm:
+ (-[WebLayer display]): override -display so we know when to update the contents of clone layers
+
+ * platform/graphics/mac/WebTiledLayer.mm:
+ (-[WebTiledLayer display]): ditto.
+
+ * rendering/RenderLayer.h:
+ (WebCore::RenderLayer::isReflection): New method that returns true if the renderer is a replica.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::RenderLayer): initialize m_isReflection
+ (WebCore::RenderLayer::updateReflectionStyle): call setIsReflection
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::createGraphicsLayer): Put a name on the reflection layer.
+ (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Hook up the GraphicsLayers for the reflection.
+ (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Reflection overrides preserve-3d (you have to flatten to reflect).
+ Also hook up updating the reflection layer geometry, and the relica position.
+
+ (WebCore::RenderLayerBacking::paintIntoLayer): We no longer paint the reflection in software.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements): Hook reflection layers into the compositing logic.
+ (WebCore::RenderLayerCompositor::canAccelerateVideoRendering): No longer have to push video into software if it's reflected.
+ (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Update the bounds of the reflection layer.
+ (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry): ditto
+ (WebCore::RenderLayerCompositor::requiresCompositingWhenDescendantsAreCompositing): a compositing descendant forces
+ a reflection ancestor to composite now.
+ (WebCore::RenderLayerBacking::containsPaintedContent): Reflection layers don't paint anything.
+ (WebCore::RenderLayerBacking::isDirectlyCompositedImage): No need to fall out of direct compositing mode
+ for masks or reflections any more.
+ (WebCore::RenderLayerBacking::paintIntoLayer): No need to paint the reflection manually now.
+
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::isReplica):
+ * rendering/RenderReplica.h:
+ (WebCore::RenderReplica::isReplica):
+ New method used to determine if a render is a replica.
+
+2010-01-15 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ CSS2.1 Counters not updated when new elements are inserted in the DOM.
+ https://bugs.webkit.org/show_bug.cgi?id=32884
+
+ Test: fast/css/counters/adding-nodes.html
+
+ * rendering/CounterNode.cpp:
+ (WebCore::CounterNode::insertAfter):
+ Modified to handle the addition of nodes with children. Needed when formerly
+ root nodes become descendants of a new node.
+ * rendering/RenderCounter.cpp:
+ (WebCore::makeCounterNode):
+ Changed to handle the case when root counter nodes lose their root
+ status as a result of a new root counter node creation.
+ (WebCore::destroyCounterNodeWithoutMapRemoval):
+ Refactored more code into destroyCounterNodeChildren and renamed the
+ function according to its new action.
+ (WebCore::RenderCounter::destroyCounterNodes):
+ Simplified to share more code with the new destroyCounterNode.
+ (WebCore::RenderCounter::destroyCounterNode):
+ Added to allow for selective counterNode destruction.
+ (WebCore::RenderCounter::rendererSubtreeAttached):
+ Added to refresh counter values in response to DOM changes.
+ For renderers with no attached counters the execution time of this
+ function cannot be discerned in comparison with the time needed to
+ add a node or change the style of a node.
+ (WebCore::updateCounters):
+ Helper function for rendererSubtreeAttached. Updates the counters
+ attached to a Renderer in response to the renderer or its ancestors
+ being attached to the renderer tree.
+ * rendering/RenderCounter.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::addChild):
+ Changed to update counter values if needed.
+
+2010-01-15 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ Original patch by David Ronis <david.ronis@mcgill.ca>
+
+ Upgrade 1.1.17->1.1.18 fails: GTK_WIDGET_TOPLEVEL' was not declared in this scope
+ https://bugs.webkit.org/show_bug.cgi?id=33486
+
+ Deprecated symbols replaced for gtk+ versions over 2.18.
+
+ * platform/gtk/PlatformScreenGtk.cpp:
+ (WebCore::getVisual):
+ (WebCore::screenRect):
+
+2010-01-15 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Bad DOM performance in large SVG files
+ https://bugs.webkit.org/show_bug.cgi?id=30055
+
+ Improve the performance of the early culling check by avoiding save/restore
+ of graphics state in culled case.
+
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::paint):
+
+2010-01-15 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r53344.
+ http://trac.webkit.org/changeset/53344
+ https://bugs.webkit.org/show_bug.cgi?id=32920
+
+ Broke the Chromium Mac builder.
+
+ * WebCore.gypi:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/SerializedScriptValue.cpp: Removed.
+ * bindings/v8/SerializedScriptValue.h:
+ (WebCore::SerializedScriptValue::create):
+ (WebCore::SerializedScriptValue::release):
+ (WebCore::SerializedScriptValue::toString):
+ (WebCore::SerializedScriptValue::SerializedScriptValue):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8DOMWindow::postMessageCallback):
+ * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
+ (WebCore::V8DedicatedWorkerContext::postMessageCallback):
+ * bindings/v8/custom/V8HistoryCustom.cpp:
+ (WebCore::V8History::pushStateCallback):
+ (WebCore::V8History::replaceStateCallback):
+ * bindings/v8/custom/V8MessageEventCustom.cpp:
+ (WebCore::V8MessageEvent::initMessageEventCallback):
+ * bindings/v8/custom/V8MessagePortCustom.cpp:
+ (WebCore::V8MessagePort::postMessageCallback):
+ * bindings/v8/custom/V8PopStateEventCustom.cpp:
+ (WebCore::V8PopStateEvent::initPopStateEventCallback):
+ (WebCore::V8PopStateEvent::stateAccessorGetter):
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ (WebCore::V8Worker::postMessageCallback):
+
+2010-01-15 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Brady Eidson.
+
+ history.length does not return number of elements in history list
+ https://bugs.webkit.org/show_bug.cgi?id=24472
+
+ Test: fast/history/history-length.html
+
+ * page/Page.cpp:
+ (WebCore::Page::getHistoryLength):
+
+2010-01-15 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Need to ensure that Document::postTask does not provide the Task with a dangling pointer to destroyed Document
+ https://bugs.webkit.org/show_bug.cgi?id=31633
+
+ Don't see a way to add test for it, we don't have a way to reproduce the issue currently.
+
+ * dom/Document.cpp:
+ (WebCore::DocumentWeakReference::DocumentWeakReference):
+ (WebCore::DocumentWeakReference::document):
+ (WebCore::DocumentWeakReference::clear):
+ (WebCore::Document::Document): Create a weak reference to this Document.
+ (WebCore::Document::~Document): Clear the weak pointer, preventing further execution of tasks.
+ (WebCore::PerformTaskContext::PerformTaskContext):
+ (WebCore::performTask): Check if the documentWeakReference is cleared by Document destructor - in this case do not run the task.
+ (WebCore::Document::postTask):
+ * dom/Document.h:
+ (WebCore::DocumentWeakReference::create):
+
+2010-01-15 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by David Levin.
+
+ [V8] Support SerializedScriptValue.
+ https://bugs.webkit.org/show_bug.cgi?id=32920
+ http://crbug.com/30620
+
+ Initial implementation of SerializedScriptValue which is used to
+ to create a serialized representation of JavaScript objects. This
+ representation is needed for structured clones and worker messages.
+
+ * WebCore.gypi: Added SerializedScriptValue.cpp.
+ * bindings/scripts/CodeGeneratorV8.pm: Removed conversion to string before using SerializedScriptValue.
+ * bindings/v8/SerializedScriptValue.cpp: Added.
+ (WebCore::):
+ (WebCore::ZigZag::encode):
+ (WebCore::ZigZag::decode):
+ (WebCore::Writer::Writer):
+ (WebCore::Writer::writeUndefined):
+ (WebCore::Writer::writeNull):
+ (WebCore::Writer::writeTrue):
+ (WebCore::Writer::writeFalse):
+ (WebCore::Writer::writeString):
+ (WebCore::Writer::writeInt32):
+ (WebCore::Writer::writeNumber):
+ (WebCore::Writer::endComposite):
+ (WebCore::Writer::data):
+ (WebCore::Writer::doWriteUint32):
+ (WebCore::Writer::append):
+ (WebCore::Writer::ensureSpace):
+ (WebCore::Writer::fillHole):
+ (WebCore::Writer::charAt):
+ (WebCore::Serializer::Serializer):
+ (WebCore::Serializer::serialize):
+ (WebCore::Serializer::StateBase::~StateBase):
+ (WebCore::Serializer::StateBase::nextState):
+ (WebCore::Serializer::StateBase::setNextState):
+ (WebCore::Serializer::StateBase::composite):
+ (WebCore::Serializer::StateBase::StateBase):
+ (WebCore::Serializer::State::composite):
+ (WebCore::Serializer::State::tag):
+ (WebCore::Serializer::State::State):
+ (WebCore::Serializer::StackCleaner::StackCleaner):
+ (WebCore::Serializer::StackCleaner::~StackCleaner):
+ (WebCore::Serializer::ArrayState::ArrayState):
+ (WebCore::Serializer::ArrayState::done):
+ (WebCore::Serializer::ArrayState::advance):
+ (WebCore::Serializer::ObjectState::ObjectState):
+ (WebCore::Serializer::ObjectState::done):
+ (WebCore::Serializer::ObjectState::advance):
+ (WebCore::Serializer::ObjectState::nextProperty):
+ (WebCore::Serializer::doSerialize):
+ (WebCore::Serializer::push):
+ (WebCore::Serializer::top):
+ (WebCore::Serializer::pop):
+ (WebCore::Serializer::checkComposite):
+ (WebCore::Reader::Reader):
+ (WebCore::Reader::isEof):
+ (WebCore::Reader::read):
+ (WebCore::Reader::readTag):
+ (WebCore::Reader::readString):
+ (WebCore::Reader::readInt32):
+ (WebCore::Reader::readNumber):
+ (WebCore::Reader::doReadUint32):
+ (WebCore::Deserializer::Deserializer):
+ (WebCore::Deserializer::deserialize):
+ (WebCore::Deserializer::doDeserialize):
+ (WebCore::Deserializer::push):
+ (WebCore::Deserializer::pop):
+ (WebCore::Deserializer::stackDepth):
+ (WebCore::Deserializer::element):
+ (WebCore::SerializedScriptValue::SerializedScriptValue):
+ (WebCore::SerializedScriptValue::deserialize):
+ * bindings/v8/SerializedScriptValue.h:
+ (WebCore::SerializedScriptValue::create):
+ (WebCore::SerializedScriptValue::createFromWire):
+ (WebCore::SerializedScriptValue::release):
+ (WebCore::SerializedScriptValue::toWireString):
+
+ Updated uses of SerializedScriptValue:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8DOMWindow::postMessageCallback):
+ * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
+ (WebCore::V8DedicatedWorkerContext::postMessageCallback):
+ * bindings/v8/custom/V8HistoryCustom.cpp:
+ (WebCore::V8History::pushStateCallback):
+ (WebCore::V8History::replaceStateCallback):
+ * bindings/v8/custom/V8MessageEventCustom.cpp:
+ (WebCore::V8MessageEvent::initMessageEventCallback):
+ * bindings/v8/custom/V8MessagePortCustom.cpp:
+ (WebCore::V8MessagePort::postMessageCallback):
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ (WebCore::V8Worker::postMessageCallback):
+
+2010-01-15 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Dirk Schulze.
+
+ Bad DOM performance in large SVG files
+ https://bugs.webkit.org/show_bug.cgi?id=30055
+
+ Add an early return when we go to paint a RenderPath that
+ isn't in the current clip.
+
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::paint):
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::draw):
+
+2010-01-15 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Make Geolocation::suspend/resume public.
+ https://bugs.webkit.org/show_bug.cgi?id=33679
+
+ These were made private in Bug 32499, but are required by Android to be public.
+
+ No new tests, build fix only.
+
+ * page/Geolocation.cpp: Modified
+ (WebCore::Geolocation::suspend): Added back in
+ (WebCore::Geolocation::resume): Added back in
+ * page/Geolocation.h: Modified. Make suspend and resume public
+
+2010-01-15 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Set pointer cursor when over a breakpoint in the BreakpointsSidebarPane
+
+ https://bugs.webkit.org/show_bug.cgi?id=33713
+
+ * inspector/front-end/inspector.css:
+
+2010-01-15 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Generate more of the custom behaviors that the v8 bindings attach to v8 FunctionTemplates.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::getToStringName):
+ (WebCore::constructorToString):
+ (WebCore::getToStringTemplate):
+ * bindings/v8/V8Binding.h:
+ * bindings/v8/V8DOMWindowShell.cpp:
+ (WebCore::V8DOMWindowShell::createNewContext):
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+
+2010-01-15 Dimitri Glazkov <dglazkov@chromium.org>
+
+ No review, rolling out r53331.
+ http://trac.webkit.org/changeset/53331
+ https://bugs.webkit.org/show_bug.cgi?id=30055
+
+ Broke fast/borders/svg-as-border-image-3.html. Don't give up,
+ Oliver! You are really, really close.
+
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::paint):
+
+2010-01-15 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Bad DOM performance in large SVG files
+ https://bugs.webkit.org/show_bug.cgi?id=30055
+
+ Add an early return when we go to paint a RenderPath that
+ isn't in the current clip.
+
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::paint):
+
+2010-01-15 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Antti Koivisto.
+
+ Use OS(MAC_OS_X) instead of PLATFORM(MAC) when determining navigator.platform
+
+ https://bugs.webkit.org/show_bug.cgi?id=33711
+
+ * page/NavigatorBase.cpp:
+
+2010-01-14 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [Gtk] Compiler warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning
+ https://bugs.webkit.org/show_bug.cgi?id=33575
+
+ Patch from Magnus Boman <captain.magnus@gmail.com>
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mimeTypeCache): fix compiler warnings.
+
+2010-01-14 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Add welcome screen to Profiles pane to provide some instructions for novices.
+
+ https://bugs.webkit.org/show_bug.cgi?id=19268
+
+ * English.lproj/localizedStrings.js:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/ProfileView.js:
+ (WebInspector.CPUProfileType.prototype.get welcomeMessage):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfileType.prototype.get welcomeMessage):
+ (WebInspector.ProfilesPanel):
+ (WebInspector.ProfilesPanel.prototype.show):
+ (WebInspector.ProfilesPanel.prototype.registerProfileType):
+ (WebInspector.ProfilesPanel.prototype._addWelcomeMessage.messageButtonClicked):
+ (WebInspector.ProfilesPanel.prototype._addWelcomeMessage):
+ (WebInspector.ProfilesPanel.prototype.showProfile):
+ (WebInspector.ProfilesPanel.prototype.closeVisibleView):
+ (WebInspector.ProfilesPanel.prototype._updateInterface):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/WelcomeView.js: Added.
+ (WebInspector.WelcomeView):
+ (WebInspector.WelcomeView.prototype._windowResized):
+ (WebInspector.WelcomeView.prototype.addMessage):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.html:
+
+2010-01-13 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt/Win] Flash in QGraphicsWebView does not process hover correctly.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33591
+
+ Mouse hover does not work as expected with the flash in some sites.
+ - http://www.bbc.co.uk/ Hover over the map
+ - http://www.barbie.com/ Hover over the menu items (Games, Videos)
+ The problem appears to be that Flash queries NPNVnetscapeWindow on every
+ mouse hover. I do not how flash uses this value but returning 0 when flash
+ is in windowless mode solves the problem (When using QGraphicsWebView we
+ inject wmode opaque, thereby putting the plugin in windowless mode).
+
+ * plugins/win/PluginViewWin.cpp:
+ (windowHandleForPageClient):
+
+2010-01-15 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for Peer class
+ https://bugs.webkit.org/show_bug.cgi?id=33670
+
+ Inherits the following class from Noncopyable because it is
+ instantiated by 'new' and no need to be copyable:
+
+ class name - instantiated at: WebCore/'location'
+ class Peer - websockets/WebSocketChannelClient.h:38
+
+ * websockets/WorkerThreadableWebSocketChannel.h:
+
+2010-01-15 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ [Qt] Allow custom memory allocation control for GraphicsContextPlatformPrivate class
+ https://bugs.webkit.org/show_bug.cgi?id=33669
+
+ Inherits the following class from Noncopyable because it is
+ instantiated by 'new' and no need to be copyable:
+
+ class name - instantiated at: WebCore/'location'
+ class GraphicsContextPlatformPrivate - platform/graphics/qt/GraphicsContextQt.cpp:254
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+
+2010-01-14 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Brady Eidson.
+
+ history.pushState should clear the entire forward history
+ https://bugs.webkit.org/show_bug.cgi?id=33160
+
+ Test: fast/loader/stateobjects/pushstate-clears-forward-history.html
+
+ * history/BackForwardList.cpp:
+ (WebCore::BackForwardList::addItem):
+ (WebCore::BackForwardList::pushStateItem):
+ * history/BackForwardList.h:
+
+2010-01-14 Gavin Barraclough <barraclough@apple.com>
+
+ Rubber stamped by Sam Weinig.
+
+ Make naming & behaviour of UString[Impl] methods more consistent.
+ https://bugs.webkit.org/show_bug.cgi?id=33702
+
+ WebCore change reflecting UString method name change computedHash() -> existingHash().
+
+ * platform/text/AtomicString.cpp:
+ (WebCore::AtomicString::add):
+ (WebCore::AtomicString::find):
+
+2010-01-14 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/6020083> -webkit-gradient slows down scrolling when page has horizontal scrollbar
+ https://bugs.webkit.org/show_bug.cgi?id=19650
+
+ * platform/graphics/GeneratedImage.cpp:
+ (WebCore::GeneratedImage::drawPattern): Added call to adjustParametersForTiledDrawing(),
+ letting the generator substitute the parameters with visually-equivalent values that
+ are more efficient.
+ * platform/graphics/Generator.h:
+ (WebCore::Generator::adjustParametersForTiledDrawing): Added a base class implementation
+ that does nothing.
+ * platform/graphics/Gradient.cpp:
+ (WebCore::Gradient::adjustParametersForTiledDrawing): Added. If the gradient is a horizontal
+ or vertical linear gradient, changes to use a 1-pixel tall (or wide) tile.
+ * platform/graphics/Gradient.h:
+
+2010-01-14 Norbert Leser <norbert.leser@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ Platform Symbian specific:
+ Added time-based optimization (-Otime) and increased optimization level to -O3,
+ conditionally for RVCT compiler (for ARM), for increasing performance
+ (primarily affecting JavaScript execution).
+ Default settings are -Ospace and -O2.
+
+ No new tests needed because no new funtionality is introduced,
+ only potential regression on existing tests needs to be evaluated.
+
+ * WebCore.pro:
+
+2010-01-14 Jungshik Shin <jshin@chromium.org>
+
+ Unreviewed, attempted build fix on chromium.
+
+ Fix a Chromium build failure due to an unused variable in V8 binding.(part 2)
+
+ * bindings/v8/V8Collection.h:
+ (WebCore::getNamedPropertyOfCollection):
+
+2010-01-14 Jungshik Shin <jshin@chromium.org>
+
+ Unreviewed, attempted build fix on chromium.
+
+ Fix a Chromium build failure due to an unused variable in V8 binding.
+
+ * bindings/v8/V8Collection.h:
+ (WebCore::getIndexedPropertyOfCollection):
+
+2010-01-14 Peter Kasting <pkasting@google.com>
+
+ Unreviewed, attempted build fix.
+
+ * platform/image-decoders/gif/GIFImageDecoder.cpp:
+ (WebCore::GIFImageDecoder::haveDecodedRow):
+
+2010-01-14 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Adam Barth.
+
+ Simplify image decoders by making downsampling functions available at
+ all times, allowing much duplicated logic to be collapsed.
+ https://bugs.webkit.org/show_bug.cgi?id=28751
+
+ * platform/graphics/ImageSource.cpp:
+ (WebCore::ImageSource::setData):
+ * platform/image-decoders/ImageDecoder.cpp:
+ (WebCore::ImageDecoder::prepareScaleDataIfNecessary):
+ * platform/image-decoders/ImageDecoder.h:
+ (WebCore::ImageDecoder::ImageDecoder):
+ (WebCore::ImageDecoder::scaledSize):
+ (WebCore::ImageDecoder::setMaxNumPixels):
+ * platform/image-decoders/gif/GIFImageDecoder.cpp:
+ (WebCore::GIFImageDecoder::sizeNowAvailable):
+ (WebCore::GIFImageDecoder::initFrameBuffer):
+ (WebCore::GIFImageDecoder::haveDecodedRow):
+ (WebCore::GIFImageDecoder::frameComplete):
+ * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+ (WebCore::JPEGImageDecoder::setSize):
+ (WebCore::JPEGImageDecoder::outputScanlines):
+ * platform/image-decoders/jpeg/JPEGImageDecoder.h:
+ * platform/image-decoders/png/PNGImageDecoder.cpp:
+ (WebCore::PNGImageDecoder::headerAvailable):
+ (WebCore::PNGImageDecoder::rowAvailable):
+
+2010-01-14 Jian Li <jianli@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [chromium] Remove obsolete CF related files from gyp build.
+ https://bugs.webkit.org/show_bug.cgi?id=33002
+
+ * WebCore.gypi:
+
+2010-01-14 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Adam Barth.
+
+ Decoding images to scaled output buffers resulted in garbage for
+ no-alpha PNGs and CMYK JPEGs.
+ https://bugs.webkit.org/show_bug.cgi?id=33624
+
+ No layout test since I don't have access to a platform that scales the
+ output buffers.
+
+ * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+ (WebCore::convertCMYKToRGBA):
+ * platform/image-decoders/png/PNGImageDecoder.cpp:
+ (WebCore::PNGImageDecoder::rowAvailable):
+
+2010-01-14 Brian Weinstein <bweinstein@apple.com>
+
+ Rubber-stamped by Oliver Hunt.
+
+ Fix an assertion that was causing test crashes. Filed a bug
+ about the weirdness that causes this assertion (inconsistencies
+ between DragOperationMove and DragOperationGeneric).
+
+ * dom/Clipboard.cpp:
+ (WebCore::dragOpFromIEOp):
+ (WebCore::Clipboard::setDestinationOperation):
+
+2010-01-14 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=33498 REGRESSION:
+ svg/css/circle-in-mask-with-shadow.svg failing pixel tests
+ -and corresponding-
+ <rdar://problem/7544176>
+
+ This change makes repaintRectInLocalCoordinates return a rect that
+ is -webkit-svg-shadow-aware.
+
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::repaintRectInLocalCoordinates):
+ * rendering/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::repaintRectInLocalCoordinates):
+ * rendering/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::repaintRectInLocalCoordinates):
+ * rendering/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::repaintRectInLocalCoordinates):
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderBase::prepareToRenderSVGContent):
+ * rendering/style/SVGRenderStyle.cpp:
+ (WebCore::SVGRenderStyle::inflateForShadow):
+ * rendering/style/SVGRenderStyle.h:
+
+2010-01-14 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Drag and Drop source/destination code needs cleanup.
+ <https://bugs.webkit.org/show_bug.cgi?id=33691>.
+
+ Cleaned up some Drag and Drop code that deals with getting
+ source and destination operations, and added some ASSERTS to make
+ sure we don't get in bad states.
+
+ * dom/Clipboard.cpp:
+ (WebCore::Clipboard::sourceOperation): Make this return the operation itself.
+ (WebCore::Clipboard::destinationOperation): Ditto.
+ (WebCore::Clipboard::setSourceOperation): Add an assert to make sure we're valud.
+ (WebCore::Clipboard::setDestinationOperation): Ditto.
+ * dom/Clipboard.h:
+ * page/DragController.cpp:
+ (WebCore::DragController::tryDHTMLDrag):
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleDrag):
+
+2010-01-14 Timothy Hatcher <timothy@apple.com>
+
+ Make the Web Inspector's JavaScript debugger work with isolated worlds.
+ Console evaluation is not performed in the correct world yet, tracked
+ by bug http://webkit.org/b/33692.
+
+ http://webkit.org/b/33690
+
+ Reviewed by Adam Roben.
+
+ * bindings/js/ScriptCachedFrameData.cpp:
+ (WebCore::ScriptCachedFrameData::restore): Attach the debugger to
+ any window shell, not just for the debugger world.
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::clearWindowShell): Detach the debugger, and
+ reattach to all window shells, not just for the debugger world.
+ (WebCore::ScriptController::initScript): Attach the debugger to
+ any window shell, not just for the debugger world.
+ (WebCore::ScriptController::attachDebugger): Changed to loop through
+ all the window shells and call the new overloaded attachDebugger.
+ (WebCore::ScriptController::attachDebugger): Added. An overload that
+ takes a window shell to attach the debugger to. Has most of the
+ logic from the original attachDebugger.
+ * bindings/js/ScriptController.h: Added the new attachDebugger.
+
+2010-01-14 Adam Roben <aroben@apple.com>
+
+ Make Cache::requestResource return 0 if the resource's load fails
+ immediately
+
+ Fixes <rdar://problem/7543406> <http://webkit.org/b/33687>
+ window.onload never fires if page contains a <script src=foo> whose
+ load is cancelled by resource load delegate returning null from
+ willSendRequest
+
+ Test: fast/loader/onload-willSendRequest-null-for-script.html
+
+ Reviewed by Dave Hyatt.
+
+ * loader/Cache.cpp:
+ (WebCore::Cache::requestResource): Moved code to handle immediate load
+ failure out of the "cache is disabled" block so that it will run even
+ when the cache is enabled.
+
+2010-01-14 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by mitz@webkit.org.
+
+ Fix for crash with gradient on table cell. Pass the correct
+ background object down to
+ RenderBoxModelObject::paintFillLayerExtended(). This also allowed a
+ rework of the fix to bug 18445 by passing the correct RenderObject
+ from RenderBox::paintRootBoxDecorations() down to
+ RenderBoxModelObject::paintFillLayerExtended().
+ https://bugs.webkit.org/show_bug.cgi?id=28426
+
+ Covered by new layout test: LayoutTests/fast/gradients/crash-on-tr.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::paintFillLayers):
+ (WebCore::RenderBox::paintFillLayer):
+ * rendering/RenderBox.h:
+ Plumb through the correct background RenderObject.
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+ Use the passed-in background RenderObject (if present) when painting background images. Remove the previous fix for bug 18445.
+ * rendering/RenderBoxModelObject.h:
+ Plumb through the correct background RenderObject.
+ * rendering/RenderTableCell.cpp:
+ Pass in the correct backgroundObject to paintFillLayers().
+
+ (WebCore::RenderTableCell::paintBackgroundsBehindCell):
+
+2010-01-14 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Standardize the rest of the v8 bindings on toNative() wherever possible.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33677
+
+ * bindings/v8/NPV8Object.cpp:
+ (v8ObjectToNPObject): Special case for converting NPObjects, since there aren't genereated bindings for them.
+ * bindings/v8/NPV8Object.h:
+ * bindings/v8/ScriptController.cpp:
+ * bindings/v8/V8Collection.cpp:
+ * bindings/v8/V8Collection.h:
+ (WebCore::toNativeCollection): Special case for converting V8Collections, since there aren't genereated bindings for them.
+ * bindings/v8/V8DOMWindowShell.cpp:
+ * bindings/v8/V8DOMWrapper.cpp:
+ * bindings/v8/V8DOMWrapper.h:
+ * bindings/v8/V8NPObject.cpp:
+ * bindings/v8/V8Proxy.cpp:
+ * bindings/v8/V8SVGPODTypeWrapper.h:
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+
+2010-01-14 Evan Stade <estade@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Chromium Linux: don't stretch checkboxes
+ https://bugs.webkit.org/show_bug.cgi?id=28631
+
+ Make the default size for checkboxes/radio buttons also the maximum
+ size.
+
+ Based on patch by Adam Langley.
+
+ Test: fast/css/non-standard-checkbox-size.html
+
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::center):
+ (WebCore::RenderThemeChromiumSkia::paintCheckbox):
+ (WebCore::RenderThemeChromiumSkia::setCheckboxSize):
+ (WebCore::RenderThemeChromiumSkia::paintRadio):
+
+2010-01-14 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Follow up to <https://bugs.webkit.org/show_bug.cgi?id=33635>.
+
+ Now that dropEffect and effectAllowed are guaranteed to not be
+ null, change null checks into asserts to make sure we are returning
+ a proper DragOperation value.
+
+ * dom/Clipboard.cpp:
+ (WebCore::Clipboard::sourceOperation): Change null check to assert.
+ (WebCore::Clipboard::destinationOperation): Ditto.
+
+2010-01-14 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ [DnD] effectAllowed and dropEffect can be set to bogus values.
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=33635>.
+
+ Test to make aure dropEffect and effectAllowed are being set to valid values
+ when they are being set (list of valid values given by HTML5 specification).
+
+ Also, drive by change to initialize dropEffect to none (as described in spec).
+
+ Test: fast/events/bogus-dropEffect-effectAllowed.html
+
+ * dom/Clipboard.cpp:
+ (WebCore::Clipboard::Clipboard): Initialize m_dropEffect to "none".
+ (WebCore::Clipboard::setDropEffect): Check if dropEffect is being set to a valid value.
+ (WebCore::Clipboard::setEffectAllowed): Check if effectAllowed is being set to a valid value.
+
+2010-01-14 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Infinite recursion in RuntimeObjectImp::getOwnPropertyNames()
+ https://bugs.webkit.org/show_bug.cgi?id=33371
+
+ RuntimeObjectImp should not reimplement getPropertyNames();
+ move the implementation to getOwnPropertyNames().
+
+ * bridge/runtime_object.cpp:
+ (JSC::RuntimeObjectImp::getOwnPropertyNames):
+ * bridge/runtime_object.h:
+
+2010-01-14 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Add ENABLE(XSLT) guard to TransformSourceLibxslt.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=33665
+
+ TransformSource is available only when ENABLE(XSLT) guard is true.
+
+ * dom/TransformSourceLibxslt.cpp:
+
+2010-01-14 Adam Roben <aroben@apple.com>
+
+ Treat all synchronous loads equally in FrameLoader::loadSubframe
+
+ Only loads of the empty URL or about:blank were being treated as
+ synchronous loads. But other loads can be synchronous (e.g., when we
+ receive a null ResourceRequest from requestFromDelegate or when a
+ policy decision of "ignore" is made). We now treat those loads the
+ same way we treated empty URLs and about:blank.
+
+ Fixes <rdar://problem/7533333> <http://webkit.org/b/33533>
+ window.onload never fires if page contains an <iframe> with a bad
+ scheme or whose load is cancelled by returning null from resource load
+ delegate's willSendRequest
+
+ Tests: fast/loader/onload-bad-scheme-for-frame.html
+ fast/loader/onload-policy-ignore-for-frame.html
+ fast/loader/onload-willSendRequest-null-for-frame.html
+
+ Reviewed by Brady Eidson.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadSubframe):
+ - Detect synchronous loads by checking the subframe's loader's
+ state, rather than by checking its URL
+ - Removed unnecessary call to completed(), since checkCompleted()
+ will call completed() if needed (the call to completed() was added
+ first and wasn't removed when the call to checkCompleted() was
+ added in r8316)
+ - Added more comments about the strange thing this function does
+ with the subframe's loader
+
+2010-01-14 Diego Gonzalez <diego.gonzalez@openbossa.org>
+
+ Reviewed by Kenneth Christiansen.
+
+ [Qt] Missing fileSystemPath() method in Qt KURL implementation
+ https://bugs.webkit.org/show_bug.cgi?id=33614
+
+ No new tests.
+
+ * platform/qt/KURLQt.cpp:
+ (WebCore::KURL::fileSystemPath):
+
+2010-01-13 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33652
+ REGRESSION: Frames stop appearing after browsing for a while
+
+ <rdar://problem/7308312> REGRESSION: iBench gets slower after several runs
+
+ I do not know how not creating renderers for frames could make iBench slower, but it did.
+
+ Test: fast/frames/cached-frame-counter.html
+
+ * history/CachedFrame.cpp:
+ (WebCore::CachedFrame::CachedFrame): A frame that's cached is moved away from Page,
+ so decrement frame count here.
+ (WebCore::CachedFrame::open): Increase frame count when a frame is restored.
+
+ * history/CachedFrame.h: Remove unneeded forward declarations.
+
+ * history/CachedPage.h: Ditto.
+
+ * history/CachedPage.cpp: (WebCore::CachedPage::restore): Assert that page frame count is
+ zero prior to restoring a page from b/f cache.
+
+ * page/Page.cpp: (WebCore::Page::checkFrameCountConsistency): A debug-only method to
+ check that frame count stored in Page matches the number of frames in frame tree.
+
+ * page/Page.h:
+ (WebCore::Page::decrementFrameCount): Assert that frame count is positive.
+ (WebCore::Page::frameCount): Call checkFrameCountConsistency().
+
+2010-01-14 Steve Falkenburg <sfalken@apple.com>
+
+ Windows build fixes.
+ Add forward declarations and additional includes of windows.h.
+
+ * platform/Cursor.h: Add forward declaration of HCURSOR. Move destructor implementation into cpp.
+ * platform/graphics/transforms/TransformationMatrix.h: Add forward declaration of XFORM. Remove windows.h include.
+ * platform/graphics/win/TransformationMatrixWin.cpp: Add include of windows.h.
+ * platform/win/CursorWin.cpp: Moved destructor of SharedCursor here.
+ (WebCore::SharedCursor::~SharedCursor): Moved here.
+ * platform/win/EventLoopWin.cpp: Add include of windows.h.
+ * platform/win/SystemInfo.cpp: Add include of windows.h.
+
+2010-01-14 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Switch the custom V8 bindings to use class toNative() functions.
+
+ Refactoring, so no new tests.
+
+ * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
+ * bindings/v8/custom/V8AttrCustom.cpp:
+ * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+ * bindings/v8/custom/V8ClipboardCustom.cpp:
+ * bindings/v8/custom/V8CoordinatesCustom.cpp:
+ * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ * bindings/v8/custom/V8DataGridColumnListCustom.cpp:
+ * bindings/v8/custom/V8DatabaseCustom.cpp:
+ * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ * bindings/v8/custom/V8DocumentLocationCustom.cpp:
+ * bindings/v8/custom/V8ElementCustom.cpp:
+ * bindings/v8/custom/V8EventCustom.cpp:
+ * bindings/v8/custom/V8GeolocationCustom.cpp:
+ * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+ * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
+ * bindings/v8/custom/V8HistoryCustom.cpp:
+ * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
+ * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
+ * bindings/v8/custom/V8LocationCustom.cpp:
+ * bindings/v8/custom/V8MessageEventCustom.cpp:
+ * bindings/v8/custom/V8MessagePortCustom.cpp:
+ * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
+ * bindings/v8/custom/V8NodeCustom.cpp:
+ * bindings/v8/custom/V8NodeIteratorCustom.cpp:
+ * bindings/v8/custom/V8NodeListCustom.cpp:
+ * bindings/v8/custom/V8NotificationCenterCustom.cpp:
+ * bindings/v8/custom/V8PopStateEventCustom.cpp:
+ * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
+ * bindings/v8/custom/V8SQLTransactionCustom.cpp:
+ * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
+ * bindings/v8/custom/V8SVGLengthCustom.cpp:
+ * bindings/v8/custom/V8SVGMatrixCustom.cpp:
+ * bindings/v8/custom/V8StorageCustom.cpp:
+ * bindings/v8/custom/V8StyleSheetListCustom.cpp:
+ * bindings/v8/custom/V8TreeWalkerCustom.cpp:
+ * bindings/v8/custom/V8WebGLArrayCustom.h:
+ * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
+ * bindings/v8/custom/V8WebSocketCustom.cpp:
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
+ * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
+
+2010-01-14 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Enable DOM clipboard and drag-and-drop access
+ https://bugs.webkit.org/show_bug.cgi?id=30623
+
+ Add DataObjectGtk, a container for pasteboard and drag-and-drop data.
+
+ No new tests, because functionality has not changed.
+
+ * GNUmakefile.am:
+ * platform/gtk/DataObjectGtk.cpp: Added.
+ (WebCore::DataObjectGtk::text):
+ (WebCore::DataObjectGtk::markup):
+ (WebCore::DataObjectGtk::setText):
+ (WebCore::DataObjectGtk::setMarkup):
+ (WebCore::DataObjectGtk::files):
+ (WebCore::DataObjectGtk::url):
+ (WebCore::DataObjectGtk::urlLabel):
+ (WebCore::DataObjectGtk::hasURL):
+ (WebCore::DataObjectGtk::clear):
+ (WebCore::DataObjectGtk::forClipboard):
+ * platform/gtk/DataObjectGtk.h: Added.
+ (WebCore::DataObjectGtk::create):
+ (WebCore::DataObjectGtk::uriList):
+ (WebCore::DataObjectGtk::image):
+ (WebCore::DataObjectGtk::setRange):
+ (WebCore::DataObjectGtk::setURIList):
+ (WebCore::DataObjectGtk::setImage):
+ (WebCore::DataObjectGtk::setDragContext):
+ (WebCore::DataObjectGtk::hasText):
+ (WebCore::DataObjectGtk::hasMarkup):
+ (WebCore::DataObjectGtk::hasURIList):
+ (WebCore::DataObjectGtk::hasImage):
+ (WebCore::DataObjectGtk::dragContext):
+
+2010-01-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: Scrolling of Timeline Page was broken by fix for bug 33470.
+ https://bugs.webkit.org/show_bug.cgi?id=33666
+
+ * inspector/front-end/inspector.css:
+
+2010-01-14 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ [Qt] Unreviewed fix of builds with the --no-svg switch.
+
+ * WebCore.pri:
+
+2010-01-14 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ [Qt] Unreviewed build fix on Windows.
+
+ * platform/graphics/transforms/TransformationMatrix.h:
+
+2010-01-14 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Enable scrolling optimization for pages with embedded widgets
+
+ https://bugs.webkit.org/show_bug.cgi?id=33373
+
+ Added a basic manual test for scrolling of embedded QWidgets.
+
+ * manual-tests/qt/qtplugin-scrolling.html: Added.
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::scrollContents):
+ (WebCore::ScrollView::setParent):
+ * platform/ScrollView.h:
+ * platform/qt/ScrollViewQt.cpp:
+ (WebCore::ScrollView::platformInit):
+ (WebCore::ScrollView::platformAddChild):
+ (WebCore::ScrollView::platformRemoveChild):
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::invalidateRect):
+
+2009-12-09 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GStreamer] Check return values of gst_element_set_state()
+ https://bugs.webkit.org/show_bug.cgi?id=30000
+
+ Check for state change failure when going from READY/NULL to
+ PAUSED or PLAYING. Also refactored the common code of play() and
+ pause() to a new private method of the player.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::changePipelineState):
+ (WebCore::MediaPlayerPrivate::play):
+ (WebCore::MediaPlayerPrivate::pause):
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+
+2010-01-14 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r53248.
+ http://trac.webkit.org/changeset/53248
+ https://bugs.webkit.org/show_bug.cgi?id=32641
+
+ Caused 2 tests to crash on various bots:
+ fast/dom/HTMLSelectElement/listbox-select-reset.html and
+ fast/forms/listbox-typeahead-scroll.html
+
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::recalcStyle):
+ (WebCore::SelectElement::setRecalcListItems):
+ (WebCore::SelectElement::recalcListItems):
+ (WebCore::SelectElement::restoreFormControlState):
+ (WebCore::SelectElement::reset):
+ (WebCore::SelectElement::typeAheadFind):
+ * dom/SelectElement.h:
+ * html/HTMLOptionElement.cpp:
+ (WebCore::HTMLOptionElement::selected):
+ (WebCore::HTMLOptionElement::insertedIntoTree):
+ * html/HTMLSelectElement.cpp:
+ (WebCore::HTMLSelectElement::recalcStyle):
+ * html/HTMLSelectElement.h:
+ * wml/WMLSelectElement.cpp:
+ (WebCore::WMLSelectElement::recalcStyle):
+
+2010-01-14 Ben Murdoch <benm@google.com>
+
+ Reviewed by Darin Adler.
+
+ [Android] [Qt] The document.createEvent API does not support touch events.
+ https://bugs.webkit.org/show_bug.cgi?id=33605
+
+ Test: fast/events/touch/create-touch-event.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::createEvent): add creation of a TouchEvent when the "TouchEvent" argument is supplied.
+
+2010-01-14 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Ensures that the 'selected' attribute of an <option> is correct
+ https://bugs.webkit.org/show_bug.cgi?id=32641
+
+ Adds a check in OptionElement::selected() that checks if list items need to be recalculated and does so if needed,
+ so the attribute is up to date more often. Also gets rid of most of the recalcStyle() side effects.
+
+ Our behavior now matches Firefox 3.5 and IE8 after the </select> is parsed.
+
+ Tests: fast/forms/HTMLOptionElement_selected2.html
+ fast/forms/HTMLOptionElement_selected3.html
+
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::setOptionsChangedOnRenderer):
+ (WebCore::SelectElement::setRecalcListItems):
+ (WebCore::SelectElement::recalcListItems):
+ (WebCore::SelectElement::restoreFormControlState):
+ (WebCore::SelectElement::reset):
+ (WebCore::SelectElement::typeAheadFind):
+ * dom/SelectElement.h:
+ * html/HTMLOptionElement.cpp:
+ (WebCore::HTMLOptionElement::selected):
+ (WebCore::HTMLOptionElement::insertedIntoTree):
+ * html/HTMLSelectElement.cpp:
+ (WebCore::HTMLSelectElement::recalcStyle):
+ (WebCore::HTMLSelectElement::recalcListItemsIfNeeded):
+ * html/HTMLSelectElement.h:
+ * wml/WMLSelectElement.cpp:
+ (WebCore::WMLSelectElement::recalcStyle):
+
+2010-01-14 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ [Qt] Allow custom memory allocation control for TransparencyLayer class
+ https://bugs.webkit.org/show_bug.cgi?id=33585
+
+ Inherits the following class from FastAllocBase because it is
+ instantiated by 'new':
+
+ class name - instantiated at: WebCore/'location'
+ class TransparencyLayer - platform/graphics/qt/GraphicsContextQt.cpp:906
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+
+2010-01-14 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ [Qt] Allow custom memory allocation control for FontPlatformDataPrivate class
+ https://bugs.webkit.org/show_bug.cgi?id=33583
+
+ Inherits the following class from Noncopyable because it is
+ instantiated by 'new' and no need to be copyable:
+
+ class name - instantiated at: WebCore/'location'
+ class FontPlatformDataPrivate - platform/graphics/qt/FontPlatformData.h:70
+
+ * platform/graphics/qt/FontPlatformData.h:
+
+2010-01-12 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] un-needed seeks
+ https://bugs.webkit.org/show_bug.cgi?id=33532
+
+ Avoid un-needed seeks. Don't seek at current playback position and
+ don't update the rate if it is already set to target value.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::seek):
+ (WebCore::MediaPlayerPrivate::setRate):
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+
+2010-01-14 Eric Seidel <eric@webkit.org>
+
+ No review. Tiger build fix after http://trac.webkit.org/changeset/53238.
+
+ Need to implement WebGLContextAttributes
+ https://bugs.webkit.org/show_bug.cgi?id=31169
+
+ Fix a build break when ENABLE(3D_CANVAS) is disabled.
+
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::getContext): UNUSED_PARAM(attrs) when 3D_CANVAS is disabled.
+
+2010-01-13 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: use hidden text area for clipboard in order to
+ workaround windows setData bug.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33633
+
+ * inspector/front-end/TextEditor.js:
+ (WebInspector.TextEditor):
+ (WebInspector.TextEditor.prototype._copy):
+ * inspector/front-end/inspector.css:
+
+2010-01-13 Mads Ager <ager@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Slow named property lookup on DOMWindow because of missing fast case
+ https://bugs.webkit.org/show_bug.cgi?id=33584
+
+ Add fast case checks to V8 named property getter on DOMWindow
+ objects. If the property is not in the DOM there is no reason to
+ search the DOM for all occurrences.
+
+ Covered by layout tests.
+
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8DOMWindow::namedPropertyGetter):
+
+2010-01-13 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/7403736> REGRESSION (r49963,r49965): 8% Dromaeo Core DOM test regression
+
+ Adding isolated worlds support to the JSC bindings introduced a regression due to
+ additional map lookups. Add a mechanism to quickly detect that a lookup is for the
+ 'normal' world, and add fast paths to a couple of methods to check the normal world
+ first.
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::Document::getWrapperCache):
+ (WebCore::DOMWrapperWorld::DOMWrapperWorld):
+ (WebCore::forgetDOMObject):
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::DOMWrapperWorld::isNormal):
+ (WebCore::WebCoreJSClientData::WebCoreJSClientData):
+ * bindings/js/ScriptController.cpp:
+ (WebCore::IsolatedWorld::IsolatedWorld):
+ * dom/Document.cpp:
+ (WebCore::Document::Document):
+ (WebCore::Document::createWrapperCache):
+ * dom/Document.h:
+
+2010-01-13 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Oliver Hunt.
+
+ Need to implement WebGLContextAttributes
+ https://bugs.webkit.org/show_bug.cgi?id=31169
+
+ Added the WebGLContextAttributes class and custom JavaScript
+ bindings to accept a native object as the second argument to
+ getContext("experimental-webgl") per the WebGL specification.
+ Added GraphicsContext3D::Attributes struct to isolate DOM and
+ graphics layers. Added getContextAttributes() to
+ WebGLRenderingContext. Added test case ensuring that context
+ attributes can be passed down and returned. Tested in Safari and
+ Chromium. The attributes will be hooked up to the creation of the
+ OpenGL context in bug 33416.
+
+ Test: fast/canvas/webgl/context-attributes.html
+
+ * DerivedSources.make:
+ * WebCore.gypi:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSHTMLCanvasElementCustom.cpp:
+ (WebCore::JSHTMLCanvasElement::getContext):
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/scripts/IDLParser.pm:
+ * bindings/v8/DOMData.cpp:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8DOMWrapper.cpp:
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::V8HTMLCanvasElement::getContextCallback):
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::getContext):
+ * html/HTMLCanvasElement.h:
+ * html/HTMLCanvasElement.idl:
+ * html/canvas/CanvasContextAttributes.cpp: Added.
+ (WebCore::CanvasContextAttributes::CanvasContextAttributes):
+ (WebCore::CanvasContextAttributes::~CanvasContextAttributes):
+ * html/canvas/CanvasContextAttributes.h: Added.
+ * html/canvas/WebGLContextAttributes.cpp: Added.
+ (WebCore::WebGLContextAttributes::create):
+ (WebCore::WebGLContextAttributes::WebGLContextAttributes):
+ (WebCore::WebGLContextAttributes::~WebGLContextAttributes):
+ (WebCore::WebGLContextAttributes::alpha):
+ (WebCore::WebGLContextAttributes::setAlpha):
+ (WebCore::WebGLContextAttributes::depth):
+ (WebCore::WebGLContextAttributes::setDepth):
+ (WebCore::WebGLContextAttributes::stencil):
+ (WebCore::WebGLContextAttributes::setStencil):
+ (WebCore::WebGLContextAttributes::antialias):
+ (WebCore::WebGLContextAttributes::setAntialias):
+ (WebCore::WebGLContextAttributes::premultipliedAlpha):
+ (WebCore::WebGLContextAttributes::setPremultipliedAlpha):
+ (WebCore::WebGLContextAttributes::attributes):
+ * html/canvas/WebGLContextAttributes.h: Added.
+ * html/canvas/WebGLContextAttributes.idl: Added.
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::create):
+ (WebCore::WebGLRenderingContext::getContextAttributes):
+ * html/canvas/WebGLRenderingContext.h:
+ * html/canvas/WebGLRenderingContext.idl:
+ * platform/graphics/GraphicsContext3D.h:
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::create):
+ (WebCore::GraphicsContext3D::GraphicsContext3D):
+ (WebCore::GraphicsContext3D::getContextAttributes):
+
+2010-01-13 Simon Fraser <simon.fraser@apple.com>
+
+ Fix Windows build.
+
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+
+2010-01-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Transition followed by animation fails to run the animation sometimes
+ https://bugs.webkit.org/show_bug.cgi?id=33563
+
+ If a transition was closely followed by an animation, it was possible for the cleanup
+ after the end of the transition to kill the animation.
+
+ Fix this by including the keyframes name (or empty string for transitions) in the labels
+ used to identify CAAnimations on layers.
+
+ No test because this was a subtle timing issue that is hard to reproduce in a layout test.
+
+ * platform/graphics/mac/GraphicsLayerCA.h: Some new methods and signature changes.
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::animationIdentifier): Pass the keyframes name, since this is included in the identifier string now.
+ (WebCore::moveAllAnimationsForProperty): Pass the keyframes name.
+ (WebCore::GraphicsLayerCA::moveAnimationsForProperty): Try to move both transition- and animation-related
+ CAAnimations, using the list of running animations to get the keyframe names for the latter.
+
+ (WebCore::GraphicsLayerCA::ensureStructuralLayer): moveAnimation renamed to moveAnimationsForProperty
+ and takes the keyframes name.
+
+ (WebCore::GraphicsLayerCA::updateLayerAnimations): Pass keyframes name down (or "" for transitions).
+ (WebCore::GraphicsLayerCA::setAnimationOnLayer): Pass keyframes name down.
+ (WebCore::GraphicsLayerCA::removeAnimationFromLayer): Pass keyframes name down.
+ (WebCore::GraphicsLayerCA::pauseAnimationOnLayer): Pass keyframes name down.
+ (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Pass keyframes name down.
+
+2010-01-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix shadow drawing to do the correct computations using the base coordinate space
+ https://bugs.webkit.org/show_bug.cgi?id=33629
+
+ Shadows draw using the CGContext base CTM, so we need to convert the shadow offet
+ and size from user CTM into into base CTM coordinates, via the matix obtained from wkGetUserToBaseCTM().
+
+ Test: compositing/shadows/shadow-drawing.html
+
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::GraphicsContext::setPlatformShadow):
+
+2010-01-13 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Oliver Hunt.
+
+ SVGClipPathElement shouldn't resolve style manually
+ https://bugs.webkit.org/show_bug.cgi?id=33647
+
+ Build renderers for SVGClipPathElement, so we can query the style from the renderer
+ instead of re-resolving style on every clip path resource invalidation.
+
+ * svg/SVGClipPathElement.cpp:
+ (WebCore::SVGClipPathElement::createRenderer):
+ (WebCore::SVGClipPathElement::canvasResource):
+ * svg/SVGClipPathElement.h:
+ (WebCore::SVGClipPathElement::isValid):
+
+2010-01-13 Kelly Norton <knorton@google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector does not update the DOM tree when attributes change.
+ https://bugs.webkit.org/show_bug.cgi?id=20162
+
+ * dom/Element.cpp: Moves callbacks to InspectorController directly into setAttribute
+ and removeAttribute and removes the existing call sites. This makes it possible to
+ see attribute modifications.
+ (WebCore::Element::setAttribute):
+ (WebCore::Element::dispatchAttrRemovalEvent):
+ (WebCore::Element::dispatchAttrAdditionEvent):
+ (WebCore::Element::removeAttribute):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMNode.prototype._setAttributesPayload): Clear existing attributes.
+ (WebInspector.DOMAgent.prototype._didApplyDomChange): Updated call site and fixed style.
+ (WebInspector.DOMAgent.prototype._attributesUpdated): Added.
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype._attributesUpdated): Added.
+ (WebInspector.ElementsPanel.prototype.updateModifiedNodes): Updated call site.
+ * inspector/front-end/ElementsTreeOutline.js: Renamed _updateTitle to updateTitle.
+ (WebInspector.ElementsTreeElement.prototype.onattach): Updated updateTitle call site.
+ (WebInspector.ElementsTreeElement.prototype._textNodeEditingCommitted): Ditto.
+ (WebInspector.ElementsTreeElement.prototype._editingCancelled): Ditto.
+
+2010-01-13 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ CounterNode::nextInPreOrderAfterChildren(stayWithin) does not stay within.
+ https://bugs.webkit.org/show_bug.cgi?id=33625
+
+ No new tests because the fix should affect strictly performance.
+
+ * rendering/CounterNode.cpp:
+ (WebCore::CounterNode::nextInPreOrderAfterChildren):
+
+2010-01-13 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Oliver Hunt.
+
+ Window size changes are not propagated down the render tree
+ https://bugs.webkit.org/show_bug.cgi?id=33643
+
+ Test: svg/custom/relative-sized-content.xhtml
+
+ * rendering/RenderSVGContainer.cpp: Fix incorrect markParents=true usage, leading to unnecessary relayouts.
+ (WebCore::RenderSVGContainer::layout): Use new layoutChildren() method.
+ (WebCore::RenderSVGContainer::paint): Fix indention.
+ * rendering/RenderSVGHiddenContainer.cpp: Fix incorrect markParents=true usage.
+ (WebCore::RenderSVGHiddenContainer::layout): Use new layoutChildren() helper.
+ * rendering/RenderSVGRoot.cpp: Refactor existing code to layout children in SVGRenderSupport::layoutChildren.
+ (WebCore::RenderSVGRoot::layout): Make children relayouting depend on width/height changes, if the outermost svg uses relative viewport sizes.
+ * rendering/SVGRenderSupport.cpp: Add central place handling child layout, skips relayouting non-relative sized children as benefit.
+ (WebCore::SVGRenderBase::layoutChildren): This methods contains the actual changes.
+ * rendering/SVGRenderSupport.h:
+ * svg/SVGGElement.h: Remove dead code.
+ * svg/SVGSVGElement.h: Make hasRelativeValues() public to remove the need for friendship declarations.
+ * svg/SVGStyledElement.h: Change default return value for hasRelativeValues() to false, as it was intended.
+ (WebCore::SVGStyledElement::hasRelativeValues): Make it public, to be usable from SVGRenderSupport.
+ * svg/SVGSymbolElement.h: Remove dead code.
+ * svg/SVGUseElement.cpp: Implement hasRelativeValues() - it was simply missing here.
+ (WebCore::SVGUseElement::hasRelativeValues):
+ * svg/SVGUseElement.h:
+
+2010-01-13 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by David Levin.
+
+ Fix websocket/tests/worker/worker-simple.html crash on Leopard Intel Debug (Tests) builder
+ https://bugs.webkit.org/show_bug.cgi?id=33581
+
+ unref m_workerContext when websocket is disconnected, so that avoid
+ keeping reference to workerContext longer than worker thread runs.
+
+ * websockets/WorkerThreadableWebSocketChannel.cpp:
+ (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
+ (WebCore::WorkerThreadableWebSocketChannel::Bridge::waitForMethodCompletion):
+
+2010-01-12 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: selected, selectable, extended selectable, and multiple
+ selectable states are not reported
+
+ https://bugs.webkit.org/show_bug.cgi?id=33574
+ <rdar://problem/7536826>
+
+ Reviewed by Darin Adler.
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::isMultiSelectable):
+ Use the correct function name - the function name overriden by
+ and used in AccessiblityRenderObject.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (setAtkStateSetFromCoreObject):
+ Update for function rename.
+ (webkit_accessible_selection_select_all_selection):
+ Ditto.
+
+2010-01-13 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Move more of the selection and caret painting code from Frame to SelectionController.
+ https://bugs.webkit.org/show_bug.cgi?id=33619
+
+ Helpful preparation step for a bug fix I am working on.
+
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::SelectionController): Initialize new data members.
+ Note that m_caretVisible starts as true for the drag caret controller to match the
+ old behavior for painting.
+ (WebCore::SelectionController::setSelection): Changed to call selectionLayoutChanged
+ in its new name and location.
+ (WebCore::SelectionController::paintCaret): Added checks that were formerly done
+ at the Frame level. Tweaked formatting and changed to use early return as well.
+ (WebCore::SelectionController::focusedOrActiveStateChanged): Updated for call
+ moved into this class.
+ (WebCore::SelectionController::updateAppearance): Moved the
+ Frame::selectionLayoutChanged function here. Had to rename it because the word
+ "layout" is usedfor other purposes in this function.
+ (WebCore::SelectionController::setCaretVisible): Moved here from Frame.
+ (WebCore::SelectionController::clearCaretRectIfNeeded): Ditto.
+ (WebCore::SelectionController::caretBlinkTimerFired): Ditto.
+
+ * editing/SelectionController.h: Added new functions. Moved conditional function
+ out of class definition for clarity. Removed unneeded == and != operators.
+ Removed unneeded use of bit fields.
+
+ * page/Frame.cpp: Moved functions to SelectionController.
+ (WebCore::Frame::Frame): Removed initialization of moved data members.
+
+ * page/Frame.h: Removed things moved to SelectionController as well as unneeded
+ forward declaration of Timer class template.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout): Updated for new location of function.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::paintCaret): Ditto.
+
+2010-01-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7532544>
+
+ Expose new method on WebKitSystemInterface, WKGetUserToBaseCTM(), which will
+ be used for a shadow drawing fix.
+
+ * WebCore.base.exp:
+ * platform/mac/WebCoreSystemInterface.h:
+ * platform/mac/WebCoreSystemInterface.mm:
+
+2010-01-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix shadow drawing to do the correct computations using the base coordinate space
+ https://bugs.webkit.org/show_bug.cgi?id=33629
+
+ Step 1: do some renames in setPlatformShadow():
+ size -> offset
+ width -> xOffset
+ height -> yOffset
+
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::GraphicsContext::setPlatformShadow):
+
+2010-01-13 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Move getSessionStorageNamespace from WebKitClient to WebViewClient
+ https://bugs.webkit.org/show_bug.cgi?id=33492
+
+ * page/Page.cpp:
+ (WebCore::Page::sessionStorage):
+ * storage/StorageNamespace.cpp:
+ (WebCore::StorageNamespace::sessionStorageNamespace):
+ * storage/StorageNamespace.h:
+ (WebCore::StorageNamespace::~StorageNamespace):
+
+2010-01-13 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Beth Dakin.
+
+ Repaint bug dragging a star shape with a dash stroke
+ https://bugs.webkit.org/show_bug.cgi?id=33406
+
+ Calculation of repaint rects for RenderPath objects was wrong. We must take the
+ union of strokeBoundingBox and objectBoundingBox, since the strokeBoundingBox
+ must not contain the objectBoundingBox. This is mainly visible on dash-arrays for
+ strokes.
+
+ Test: svg/custom/js-repaint-rect-on-path-with-stroke.svg
+
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::strokeBoundingBox):
+
+2010-01-13 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix. Make the XFORM operator work on wx port.
+
+ * platform/graphics/transforms/TransformationMatrix.h:
+ * wscript:
+
+2010-01-13 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Introduce SourceFrame2 with basic breakpoint / execution line
+ rendering capabilities.
+
+ Contains a drive-by naming fix (lineNumberOffset and lineNumberToOffset were
+ too close to each other, but were unrelated).
+
+ https://bugs.webkit.org/show_bug.cgi?id=33618
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/SourceFrame2.js: Added.
+ (WebInspector.SourceFrame2):
+ (WebInspector.SourceFrame2.prototype.set text):
+ (WebInspector.SourceFrame2.prototype.get executionLine):
+ (WebInspector.SourceFrame2.prototype.set executionLine):
+ (WebInspector.SourceFrame2.prototype.revealLine):
+ (WebInspector.SourceFrame2.prototype._toggleBreakpoint):
+ (WebInspector.SourceFrame2.prototype.resize):
+ (WebInspector.BreakpointLineNumberDecorator):
+ (WebInspector.BreakpointLineNumberDecorator.prototype.decorate):
+ (WebInspector.BreakpointLineNumberDecorator.prototype._paintBreakpoint):
+ (WebInspector.BreakpointLineNumberDecorator.prototype._paintProgramCounter):
+ (WebInspector.BreakpointLineNumberDecorator.prototype.mouseDown):
+ (WebInspector.ExecutionLineDecorator):
+ (WebInspector.ExecutionLineDecorator.prototype.decorate):
+ * inspector/front-end/TextEditor.js:
+ (WebInspector.TextEditor):
+ (WebInspector.TextEditor.prototype.get textModel):
+ (WebInspector.TextEditor.prototype.set readOnly):
+ (WebInspector.TextEditor.prototype.set lineNumberDecorator):
+ (WebInspector.TextEditor.prototype.set lineDecorator):
+ (WebInspector.TextEditor.prototype.selectionRange):
+ (WebInspector.TextEditor.prototype._offsetToLine):
+ (WebInspector.TextEditor.prototype._lineToOffset):
+ (WebInspector.TextEditor.prototype.reveal):
+ (WebInspector.TextEditor.prototype._textChanged):
+ (WebInspector.TextEditor.prototype._updateSize):
+ (WebInspector.TextEditor.prototype.updateCanvasSize):
+ (WebInspector.TextEditor.prototype._repaintAll):
+ (WebInspector.TextEditor.prototype._paintLines):
+ (WebInspector.TextEditor.prototype._paintLinesContinuation):
+ (WebInspector.TextEditor.prototype.paintLineNumbers):
+ (WebInspector.TextEditor.prototype._paintCurrentLine):
+ (WebInspector.TextEditor.prototype._mouseDown):
+ (WebInspector.TextEditor.prototype._caretForMouseEvent):
+ (WebInspector.TextEditor.prototype._keyDown):
+ (WebInspector.TextEditor.prototype._handleNavigationKey):
+ (WebInspector.TextEditor.prototype._textInput):
+ (WebInspector.TextEditor.prototype._updateCursor):
+ (WebInspector.TextEditor.prototype._paintSelection):
+ (WebInspector.TextEditor.prototype._initFont):
+
+2010-01-13 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Generate a function in the V8 bindings to convert v8 objects
+ to native WebCore objects.
+
+ * bindings/scripts/CodeGeneratorV8.pm: Generate and use toNative().
+ * bindings/v8/V8Binding.cpp: Remove manually defined conversion helprs.
+ (WebCore::getElementStringAttr):
+ (WebCore::setElementStringAttr):
+ * bindings/v8/V8Binding.h: Remove manually defined conversion helprs.
+ * bindings/v8/V8SVGPODTypeWrapper.h: Still need a manually defined coversion helper for SVGPODTypes.
+ (WebCore::V8SVGPODTypeWrapper::toNative):
+ * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
+ (WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
+ (WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
+ (WebCore::V8WebGLRenderingContext::getUniformCallback):
+
+2010-01-13 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ REGRESSION (r49268): DHTML drag not allowed unless event.dataTransfer.effectAllowed
+ is set (differs from HTML5).
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=33607> and <rdar://7507114>.
+
+ If no effectAllowed is set in the dragStart operation, we should default to
+ uninitialized instead of none, so the user doesn't have to manually set the
+ effectAllowed to enable drag and drop.
+
+ * dom/Clipboard.cpp:
+ (WebCore::Clipboard::Clipboard):
+
+2010-01-13 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32495
+
+ font-size:small with background-color causes text to get clipped. Make sure to only paint within the lineTop/lineBottom of
+ a line for quirky inline flow boxes that didn't contribute to the overall height of the line.
+
+ Added fast/backgrounds/quirks-mode-line-boxes-backgrounds.html
+
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::computeVerticalOverflow):
+ (WebCore::InlineFlowBox::paintBoxDecorations):
+ (WebCore::InlineFlowBox::paintMask):
+
+2010-01-13 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Refactoring DatabaseAuthorizer to use a CaseFoldingHash function
+ for the set of whitelisted sqlite functions, and fixing some
+ indenting issues.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33612
+
+ * storage/DatabaseAuthorizer.cpp:
+ (WebCore::DatabaseAuthorizer::allowFunction):
+ * storage/DatabaseAuthorizer.h:
+
+2010-01-13 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ RenderObject::nextInPreOrderAfterChildren(RenderObject* stayWithin) does not stay within
+ https://bugs.webkit.org/show_bug.cgi?id=33600
+
+ No new tests as this fix affects mainly performance.
+ No test has been found yet that could evidence the bug in the layout
+ of a page, but the fix to bug 32884 exposes this bug on some pages
+ such as http://www.w3.org/Style/CSS/Test/CSS2.1/current/html4/counters-scope-implied-001.htm
+
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::nextInPreOrderAfterChildren):
+
+2010-01-13 Jeremy Orlow <jorlow@chromium.org>
+
+ No reviewer. More or less a build fix. My 53180 broke some
+ stuff on the Chromium port so I'm reverting.
+
+ * page/Page.cpp:
+ (WebCore::Page::sessionStorage):
+ * storage/StorageNamespace.cpp:
+ (WebCore::StorageNamespace::sessionStorageNamespace):
+ * storage/StorageNamespace.h:
+ (WebCore::StorageNamespace::~StorageNamespace):
+
+2010-01-13 Steve Block <steveblock@google.com>
+
+ Update appendClassName in jni_runtime.cpp to use WebCore::StringBuilder, rather than JSC::StringBuilder.
+ https://bugs.webkit.org/show_bug.cgi?id=33586
+
+ Avoiding the JSC version of StringBuilder allows this file to be used with both JSC and V8 on Android.
+
+ No new tests, refactoring only.
+
+ * bridge/jni/jni_runtime.cpp: Modified.
+ (JavaMethod::signature): Modified. Use WebCore::StringBuilder.
+
+2010-01-13 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Some objects in the global scope are not completed
+ https://bugs.webkit.org/show_bug.cgi?id=19119
+
+ Use Object.getOwnPropertyNames instead of for-in to provide completions, since
+ Object.getOwnPropertyNames reports both enumerable and non-enumerable properties.
+
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript._getPropertyNames):
+ (InjectedScript.getCompletions):
+
+2010-01-13 Ben Murdoch <benm@google.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Android] [Qt] The JSC ScriptController does not consider Touch Events user gestures.
+ https://bugs.webkit.org/show_bug.cgi?id=33597
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::processingUserGestureEvent): Add the touch event types (touchstart, touchmove and touchend) to the set of events that are considered user gestures.
+
+2010-01-13 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Rubber-stamped by Tor Arne Vestbø.
+
+ [Qt] REGRESSION(53187) Touchevent related tests fail
+
+ https://bugs.webkit.org/show_bug.cgi?id=33602
+
+ Pass the ENABLE_TOUCH_EVENTS to the IDL generators.
+
+ * WebCore.pri:
+
+2010-01-13 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: Timeline panel scrolling speed can be increased.
+ https://bugs.webkit.org/show_bug.cgi?id=33579
+
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel):
+ (WebInspector.TimelinePanel.prototype._scheduleRefresh):
+ (WebInspector.TimelinePanel.prototype._refresh):
+ (WebInspector.TimelinePanel.prototype._refreshRecords):
+
+2010-01-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Split the build process in two different .pro files.
+ This allows qmake to be run once all source files are available.
+
+ * DerivedSources.pro: Added.
+ * WebCore.pri: Added. Contains common logic between source generation and compilation.
+ * WebCore.pro: Moved source generation to DerivedSources.pro.
+
+2010-01-13 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Scrolling editor to the 20Kth line is not smooth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33587
+
+ * inspector/front-end/TextEditor.js:
+ (WebInspector.TextEditor):
+ (WebInspector.TextEditor.prototype._textChanged):
+ (WebInspector.TextEditor.prototype._highlightChanged):
+ (WebInspector.TextEditor.prototype._paintLinesContinuation):
+ * inspector/front-end/TextEditorHighlighter.js:
+ (WebInspector.TextEditorHighlighter):
+ (WebInspector.TextEditorHighlighter.prototype.highlight):
+ (WebInspector.TextEditorHighlighter.prototype._highlightInChunks):
+ (WebInspector.TextEditorHighlighter.prototype.updateHighlight):
+ (WebInspector.TextEditorHighlighter.prototype._highlightLines):
+ (WebInspector.TextEditorHighlighter.prototype._lex):
+ * inspector/front-end/TextEditorModel.js:
+ (WebInspector.TextEditorModel.prototype._setLine):
+ (WebInspector.TextEditorModel.prototype.setAttribute):
+ (WebInspector.TextEditorModel.prototype.getAttribute):
+ (WebInspector.TextEditorModel.prototype.removeAttribute):
+
+2010-01-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix the build on Windows.
+
+ PluginViewWin.cpp requires the conversion operator from TransformationMatrix to XFORM.
+
+ * WebCore.pro: Build TransformationMatrixWin.cpp.
+ * platform/graphics/transforms/TransformationMatrix.h: Enable the conversion operator to XFORM.
+
+2010-01-13 Miikka Heikkinen <miikka.heikkinen@digia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt/Symbian] Added missing vendor information to qtwebkit.sis
+
+ This information is necessary to Symbian sign the package.
+
+ http://bugreports.qt.nokia.com/browse/QTBUG-7290
+
+ * WebCore.pro:
+
+2010-01-11 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Move getSessionStorageNamespace from WebKitClient to WebViewClient
+ https://bugs.webkit.org/show_bug.cgi?id=33492
+
+ * page/Page.cpp:
+ (WebCore::Page::sessionStorage):
+ * storage/StorageNamespace.cpp:
+ (WebCore::StorageNamespace::sessionStorageNamespace):
+ * storage/StorageNamespace.h:
+ (WebCore::StorageNamespace::~StorageNamespace):
+
+2010-01-12 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Adding a list of whitelisted sqlite functions that users are
+ allowed to use.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33549
+
+ * platform/sql/SQLiteDatabase.cpp:
+ (WebCore::SQLiteDatabase::authorizerFunction):
+ * storage/DatabaseAuthorizer.cpp:
+ (WebCore::DatabaseAuthorizer::DatabaseAuthorizer):
+ (WebCore::DatabaseAuthorizer::addWhitelistedFunctions):
+ (WebCore::DatabaseAuthorizer::allowFunction):
+ * storage/DatabaseAuthorizer.h:
+
+2010-01-12 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt][WebSocket] SocketStreamHandleSoup.cpp is misnamed
+ https://bugs.webkit.org/show_bug.cgi?id=33077
+
+ * WebCore.pro:
+ * platform/network/qt/SocketStreamHandleQt.cpp: Copied from WebCore/platform/network/qt/SocketStreamHandleSoup.cpp.
+ * platform/network/qt/SocketStreamHandleSoup.cpp: Removed.
+
+2010-01-12 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ position:fixed and transform on same element breaks fixed behavior
+ https://bugs.webkit.org/show_bug.cgi?id=31283
+
+ Fix interactions of transforms and fixed positioning, namely that fixed position
+ elements with a transformed ancestor are positioned relative to that ancestor,
+ and an element with both a transform and fixed position respects that positioning.
+
+ Test: transforms/2d/transform-fixed-container.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::mapLocalToContainer):
+ (WebCore::RenderBox::mapAbsoluteToLocalPoint):
+ Transforms should not unconditionally stop the propagation of the 'fixed' flag to ancestors,
+ but only if the transformed element is not itself fixed.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::convertToLayerCoords):
+ Fix this method to behave correctly for fixed position layers whose container is not
+ the root, but some other (probably transformed) ancestor. In that case, we can fall into
+ the "position: absolute" code path.
+
+2010-01-12 Tony Chang <tony@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fix an assert being triggered by how the Chromium port sets the
+ replacing flag for error pages. This was caused by r53143.
+
+ Covered by existing Chromium UI tests.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
+
+2010-01-12 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Geoffrey Garen.
+
+ [ES5] Implement Object.getOwnPropertyNames
+ https://bugs.webkit.org/show_bug.cgi?id=32242
+
+ Add new argument to reimplementations of getPropertyNames()
+ and getOwnPropertyNames(), and update the JS bindings generator.
+
+ Test: fast/js/Object-getOwnPropertyNames.html
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::getPropertyNames):
+ (WebCore::JSDOMWindow::getOwnPropertyNames):
+ * bindings/js/JSDOMWindowShell.cpp:
+ (WebCore::JSDOMWindowShell::getPropertyNames):
+ (WebCore::JSDOMWindowShell::getOwnPropertyNames):
+ * bindings/js/JSDOMWindowShell.h:
+ * bindings/js/JSHistoryCustom.cpp:
+ (WebCore::JSHistory::getOwnPropertyNames):
+ * bindings/js/JSLocationCustom.cpp:
+ (WebCore::JSLocation::getOwnPropertyNames):
+ * bindings/js/JSQuarantinedObjectWrapper.cpp:
+ (WebCore::JSQuarantinedObjectWrapper::getPropertyNames):
+ (WebCore::JSQuarantinedObjectWrapper::getOwnPropertyNames):
+ * bindings/js/JSQuarantinedObjectWrapper.h:
+ * bindings/js/JSStorageCustom.cpp:
+ (WebCore::JSStorage::getOwnPropertyNames):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bridge/runtime_array.cpp:
+ (JSC::RuntimeArray::getOwnPropertyNames):
+ * bridge/runtime_array.h:
+ * bridge/runtime_object.cpp:
+ (JSC::RuntimeObjectImp::getPropertyNames):
+ (JSC::RuntimeObjectImp::getOwnPropertyNames):
+ * bridge/runtime_object.h:
+
+2010-01-12 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Safari shows an unneeded horizontal scrollbar on many websites.
+ Fixes <rdar://6321041> and <http://webkit.org/b/33555>.
+
+ If a div has no children, and its height or width are 0, we can ignore
+ it in our calculation of lowest, rightmost, and leftmost positions. This
+ calculation was causing horizontal scrollbars to be drawn when they weren't needed.
+
+ Test: fast/block/positioning/absolute-positioning-no-scrollbar.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::lowestPosition): Added check for no children and width or height 0.
+ (WebCore::RenderBlock::rightmostPosition): Ditto.
+ (WebCore::RenderBlock::leftmostPosition): Ditto.
+
+2010-01-12 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Optimize WebInspector.TimelineGrid.prototype.updateDividers()
+
+ DOM element property access and modification are slow and should be done as lazily as possible.
+ https://bugs.webkit.org/show_bug.cgi?id=33536
+
+ * inspector/front-end/TimelineGrid.js:
+ (WebInspector.TimelineGrid.prototype.updateDividers):
+ (WebInspector.TimelineGrid.prototype._setDividerAndBarLeft):
+
+2010-01-12 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=33550 REGRESSION: -
+ webkit-svg-shadow with opacity still over-clipped
+
+ We need to call inflateForShadow() on the repaintRect before we
+ clip for opacity or we will over-clip.
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderBase::prepareToRenderSVGContent):
+
+2010-01-12 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Update all-in-one derived sources for Geolocation.
+
+ * DerivedSources.cpp: Add JSCoordinates.cpp, JSGeolocation.cpp, JSGeoposition.cpp, JSPositionError.cpp
+
+2010-01-12 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Remove static const ints from V8CustomBinding.h
+
+ https://bugs.webkit.org/show_bug.cgi?id=33547
+
+ * bindings/scripts/CodeGeneratorV8.pm: Generate and use custom
+ internal field indices from lists of custom internal fields.
+ * bindings/v8/NPV8Object.cpp:
+ * bindings/v8/NPV8Object.h:
+ * bindings/v8/V8Binding.cpp:
+ * bindings/v8/V8DOMWindowShell.cpp:
+ * bindings/v8/V8DOMWindowShell.h:
+ * bindings/v8/V8DOMWrapper.cpp: Remove a bunch of now unnecessary
+ manually calls to setInternalFieldCount().
+ * bindings/v8/V8DOMWrapper.h:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/V8IsolatedContext.cpp:
+ * bindings/v8/V8IsolatedContext.h:
+ * bindings/v8/V8NPObject.cpp:
+ * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
+ * bindings/v8/custom/V8CustomBinding.h: Remove the static const ints.
+ * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+ * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
+ * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
+ * bindings/v8/custom/V8MessageChannelConstructor.cpp:
+ * bindings/v8/custom/V8MessagePortCustom.cpp:
+ * bindings/v8/custom/V8NodeCustom.cpp:
+ * bindings/v8/custom/V8NotificationCenterCustom.cpp:
+ * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
+ * bindings/v8/custom/V8WebSocketCustom.cpp:
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
+
+2010-01-12 Darin Fisher <darin@chromium.org>
+
+ Fixing chromium build bustage.
+
+ * bindings/v8/custom/V8PopStateEventCustom.cpp: Add V8Proxy.h include.
+
+2010-01-12 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add V8 bindings for PopStateEvent.
+ https://bugs.webkit.org/show_bug.cgi?id=33546
+
+ This is covered by existing tests for PopStateEvent.
+
+ * WebCore.gypi:
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertEventToV8Object):
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/custom/V8PopStateEventCustom.cpp: Added.
+ (WebCore::V8PopStateEvent::initPopStateEventCallback):
+ (WebCore::V8PopStateEvent::stateAccessorGetter):
+
+2010-01-12 Kelly Norton <knorton@google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Adds source length to ParseHTMLRecords in the inspector timeline.
+ https://bugs.webkit.org/show_bug.cgi?id=33548
+
+ Test: inspector/timeline-parse-html.html
+
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::write):
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::willWriteHTML):
+ * inspector/InspectorTimelineAgent.h:
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createParseHTMLRecord):
+ * inspector/TimelineRecordFactory.h:
+
+2010-01-12 Jungshik Shin <jshin@chromium.org>
+
+ Reviewed by Darin Adler
+
+ https://bugs.webkit.org/show_bug.cgi?id=31597
+
+ Make ICU's text breakiterator and string search use Chrome's UI
+ language instead of 'en-US' or the OS UI language.
+
+ As long as the webkit layout tests are run in en-US locale, there'd be
+ no visible change.
+
+ * platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp:
+ (UILanguage):
+ (WebCore::currentSearchLocaleID):
+ (WebCore::currentTextBreakLocaleID):
+
+2010-01-12 Beth Dakin <bdakin@apple.com>
+
+ Rubber-stamped by Dave Hyatt.
+
+ This patch changes the name of -webkit-shadow to -webkit-svg-shadow
+ to avoid giving a custom property an overly-general name.
+ <rdar://problem/7534590>
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::):
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseShadow):
+ * css/SVGCSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
+ * css/SVGCSSParser.cpp:
+ (WebCore::CSSParser::parseSVGValue):
+ * css/SVGCSSPropertyNames.in:
+ * css/SVGCSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applySVGProperty):
+
+2010-01-12 Peter Kasting <pkasting@google.com>
+
+ Not reviewed, build fix.
+
+ * WebCore.vcproj/WebCore.vcproj:
+
+2010-01-12 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add a null check in case of an event handler with invalid syntax.
+
+ Should make fast/js/invalid-syntax--for-function.html not crash in
+ Chromium's test shell.
+
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::callListenerFunction): Check the listener object before using it.
+
+2010-01-12 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Remove XBM support from the open-source image decoders.
+ https://bugs.webkit.org/show_bug.cgi?id=27823
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCoreSources.bkl:
+ * platform/image-decoders/ImageDecoder.cpp:
+ (WebCore::ImageDecoder::create):
+ * platform/image-decoders/xbm: Removed.
+ * platform/image-decoders/xbm/XBMImageDecoder.cpp: Removed.
+ * platform/image-decoders/xbm/XBMImageDecoder.h: Removed.
+
+2010-01-12 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33540
+ Make it possible to build in debug mode with assertions disabled
+
+ * dom/Element.cpp: (WebCore::Element::getURLAttribute):
+ * dom/SelectElement.cpp: (WebCore::SelectElementData::checkListItems):
+ * editing/TextIterator.cpp:
+ * loader/Cache.cpp: (WebCore::Cache::removeFromLRUList):
+ * rendering/RenderArena.cpp: (WebCore::RenderArena::free):
+
+2010-01-12 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Darin Adler and Simon Fraser.
+
+ rdar://problem/5684062
+ https://bugs.webkit.org/show_bug.cgi?id=23094
+ Flash of white when switching from poster image to video playback
+
+ https://bugs.webkit.org/show_bug.cgi?id=23140
+ <video> poster should scale like a video frame
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::setReadyState): Only call updatePosterImage from one place
+
+ * html/HTMLVideoElement.cpp:
+ (WebCore::HTMLVideoElement::HTMLVideoElement): m_shouldShowPosterImage -> m_shouldDisplayPoster.
+ (WebCore::HTMLVideoElement::createRenderer): Always create a RenderVideo.
+ (WebCore::HTMLVideoElement::attach): Call updatePosterImage before checking to see if we
+ should display the poster image. renderer() is never a RenderImage, don't need to check.
+ m_shouldShowPosterImage -> m_shouldDisplayPoster.
+ (WebCore::HTMLVideoElement::detach): m_shouldShowPosterImage -> m_shouldDisplayPoster.
+ (WebCore::HTMLVideoElement::parseMappedAttribute): Cache poster attribute when it is set since
+ it is checked frequently. m_shouldShowPosterImage -> m_shouldDisplayPoster.
+ (WebCore::HTMLVideoElement::updatePosterImage): Don't bother looking at the network state,
+ display the poster as long as the attribute is valid and the media engine says it hasn't
+ rendered a video frame. m_shouldShowPosterImage -> m_shouldDisplayPoster.
+ (WebCore::HTMLVideoElement::hasAvailableVideoFrame): New, ask the media engine if a video frame
+ is available to render.
+ * html/HTMLVideoElement.h:
+ (WebCore::HTMLVideoElement::poster):
+ (WebCore::HTMLVideoElement::shouldDisplayPoster):
+
+ * loader/ImageLoader.cpp:
+ (WebCore::ImageLoader::updateRenderer): Call setCachedImage for render video too.
+
+ * manual-tests/video-player.html: Remove bit-rot from manual test so it works again.
+
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::MediaPlayer::hasAvailableVideoFrame): New, ask the media engine if a video frame
+ is available to render.
+
+ * platform/graphics/MediaPlayer.h: Prototype for hasAvailableVideoFrame.
+ * platform/graphics/MediaPlayerPrivate.h: Ditto.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Declare hasAvailableVideoFrame, declare
+ all bool variables to aid packing.
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Initialize m_videoFrameHasDrawn. Cleanup
+ floating point initializers to match coding guidelines.
+ (WebCore::MediaPlayerPrivate::load): Initialize m_videoFrameHasDrawn.
+ (WebCore::MediaPlayerPrivate::hasAvailableVideoFrame): New.
+ (WebCore::MediaPlayerPrivate::repaint): Set m_videoFrameHasDrawn.
+
+ (WebCore::RenderImage::paintReplaced): Split part out into paint method.
+ (WebCore::RenderImage::paint): New.
+ * rendering/RenderImage.h: Declare paint. Make isWidthSpecified and isHeightSpecified protected
+ instead of private so RenderVideo can use them.
+
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::RenderMedia): Inherit from RenderImage, not RenderReplaced
+ (WebCore::RenderMedia::destroy): Ditto.
+ (WebCore::RenderMedia::styleDidChange): Ditto.
+ (WebCore::RenderMedia::layout): Ditto.
+ (WebCore::RenderMedia::lowestPosition): Ditto.
+ (WebCore::RenderMedia::rightmostPosition): Ditto.
+ (WebCore::RenderMedia::leftmostPosition): Ditto.
+ * rendering/RenderMedia.h: Declare isImage and isRenderImage.
+
+ * rendering/RenderVideo.cpp:
+ (WebCore::RenderVideo::intrinsicSizeChanged): New, call RenderVideo::intrinsicSizeChanged
+ when displaying a poster so it is sized correctly.
+ (WebCore::RenderVideo::imageChanged): Override so we can cache the image's intrisic size and
+ use it when we also know the movie's intrinsic size but still need to draw the poster.
+ (WebCore::RenderVideo::videoBox): Use the poster's intrinsic size when drawing the poster,
+ use the movie's intrinsic size when drawing frames.
+ (WebCore::RenderVideo::paintReplaced): Call RenderImage::paint when drawing the poster.
+ (WebCore::RenderVideo::videoElement): New.
+ (WebCore::RenderVideo::updatePlayer):
+ * rendering/RenderVideo.h:
+ (WebCore::RenderVideo::minimumReplacedHeight): Added.
+
+2010-01-12 Tony Chang <tony@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix a crash in Chromium when receiving multipart/x-mixed-replace data.
+ If we stop a multipart load after ResourceLoader::didReceiveResponse
+ but before ResourceLoader::didReceiveData, we have a NULL document
+ loader because it has been moved back to the provisional state. New
+ loads that happen after this will dereference the NULL document
+ loader.
+
+ Work around this by moving the provisional document loader back as
+ the document loader when the request is stopped.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31446
+
+ Test: http/tests/multipart/multipart-wait-before-boundary.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
+
+2010-01-12 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Darin Adler.
+
+ WebKit returns incorrect match count when first string match is on an element with user-select-none style
+ https://bugs.webkit.org/show_bug.cgi?id=33508
+ <rdar://problem/7482143>
+
+ If we use VisiblePosition to calculate the start of the new search range,
+ we skip all the nodes with user-select-none style, producing an incorrect
+ match count.
+
+ No new tests: there are no API's available to Javascript to verify the
+ number of matches found.
+
+ * page/Frame.cpp:
+ (WebCore::Frame::markAllMatchesForText): Changed to use the end of the previous
+ result range as the start of the new search range.
+
+2010-01-12 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Changed ".sidebar" style to allow v-scroll to appear in
+ "Profiles" panel sidebar.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33470
+
+ No new tests -- no code changed.
+
+ * inspector/front-end/inspector.css:
+
+2010-01-12 Adam Roben <aroben@apple.com>
+
+ Windows accelerated compositing build fix after r53110
+
+ * plugins/PluginWidget.h:
+ (WebCore::PluginWidget::platformLayer): Define platformLayer() for
+ non-Mac platforms that have accelerated compositing turned on. It
+ would probably be better to make PluginWidget not be used at all on
+ non-Mac platforms, but this fix is much simpler.
+
+2010-01-12 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Support injection of inspector scripts into the inspected context.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33523
+
+ * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
+ (WebCore::WeakReferenceCallback):
+ (WebCore::createInjectedScriptHostV8Wrapper):
+ (WebCore::createInjectedScript):
+ (WebCore::InjectedScriptHost::injectedScriptFor):
+
+2010-01-12 Ben Murdoch <benm@google.com>
+
+ Reviewed by Darin Adler.
+
+ Form Reset : Press Back Button and Reset , TextareaElemnt is not set to Default Value
+ https://bugs.webkit.org/show_bug.cgi?id=31539
+
+ Added manual test: manual-tests/textarea-reset-default-value.html.
+
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::restoreFormControlState): set the value, rather than default value of a text area when restoring its state. This allows resetting a form with a textarea to work correctly after its state has been restored.
+ * manual-tests/resources/textarea-form-back-on-submit.html: Added.
+ * manual-tests/textarea-reset-default-value.html: Added.
+
+2010-01-12 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] WebCore::Path allocates QPainterPath unnecessarily on the heap
+ https://bugs.webkit.org/show_bug.cgi?id=33466
+
+ WebCore::Path is a pointer to a PlatformPath. In case of Qt that's a
+ QPainterPath, which itself is a pointer to the elements (QVector).
+ That creates unecessary allocations in PathQt.cpp.
+
+ Replaced the "PlatformPath* m_path;" with a PlatformPathPtr, which
+ is a plain QPainterPath.
+
+ * platform/graphics/Path.h:
+ (WebCore::Path::platformPath):
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::drawFilledShadowPath):
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::fillRoundedRect):
+ (WebCore::GraphicsContext::addPath):
+ (WebCore::GraphicsContext::clip):
+ (WebCore::GraphicsContext::clipOut):
+ * platform/graphics/qt/PathQt.cpp:
+ (WebCore::Path::~Path):
+ (WebCore::Path::operator=):
+ (WebCore::Path::contains):
+ (WebCore::Path::strokeContains):
+ (WebCore::Path::translate):
+ (WebCore::Path::boundingRect):
+ (WebCore::Path::strokeBoundingRect):
+ (WebCore::Path::moveTo):
+ (WebCore::Path::addLineTo):
+ (WebCore::Path::addQuadCurveTo):
+ (WebCore::Path::addBezierCurveTo):
+ (WebCore::Path::addArcTo):
+ (WebCore::Path::closeSubpath):
+ (WebCore::Path::addArc):
+ (WebCore::Path::addRect):
+ (WebCore::Path::addEllipse):
+ (WebCore::Path::clear):
+ (WebCore::Path::isEmpty):
+ (WebCore::Path::debugString):
+ (WebCore::Path::apply):
+ (WebCore::Path::transform):
+
+2010-01-12 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Adam Barth.
+
+ [Qt] XSL stylesheets can load documents from a different origin
+
+ https://bugs.webkit.org/show_bug.cgi?id=33423
+
+ * xml/XSLTProcessorQt.cpp:
+ (WebCore::XSLTUriResolver::XSLTUriResolver):
+ (WebCore::XSLTUriResolver::resolve):
+ (WebCore::XSLTProcessor::transformToString):
+
+2010-01-12 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30883
+ [Gtk] Implement AtkText for HTML elements which contain text
+
+ Tweak/correction: Eliminate a needless variable.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (webkit_accessible_text_get_caret_offset):
+
+2010-01-12 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Geoffrey Garen.
+
+ Allow creating injected script for the inspected script state. The InjectedScript is
+ cached on the inspected ExecState global object and will be garbage collected when the
+ object is collected. Each InjectedScript object is assigned unique id.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33469
+
+ * bindings/js/JSDOMGlobalObject.cpp:
+ (WebCore::JSDOMGlobalObject::markChildren):
+ (WebCore::JSDOMGlobalObject::setInjectedScript):
+ (WebCore::JSDOMGlobalObject::injectedScript):
+ * bindings/js/JSDOMGlobalObject.h: InjectedScript is cached on the global object as a
+ field that is not visible from the inspected code. This InjectedScript should be alive as long as
+ the global object is alive and should be accessible from Web Inspector's native code.
+ (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
+ * bindings/js/JSInjectedScriptHostCustom.cpp:
+ (WebCore::createInjectedScript): Creates injected script using the lexical global object of the
+ inspected ScriptState. Reference to the object is stored on the global DOM object.
+ (WebCore::InjectedScriptHost::injectedScriptFor):
+ * inspector/InjectedScriptHost.cpp:
+ (WebCore::InjectedScriptHost::InjectedScriptHost):
+ (WebCore::InjectedScriptHost::injectedScriptForId):
+ (WebCore::InjectedScriptHost::discardInjectedScripts): This method is expected to be called when the
+ the InjectedScript are no longer needed. In particular, this should be called before frame navigation.
+ * inspector/InjectedScriptHost.h:
+ (WebCore::InjectedScriptHost::setInjectedScriptSource): This allows to provide injected script source.
+ The source may be loaded in a platform specific way.
+
+2010-01-11 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix handling of unusual kana sequences in search
+ https://bugs.webkit.org/show_bug.cgi?id=33506
+
+ * editing/TextIterator.cpp:
+ (WebCore::composedVoicedSoundMark): Removed unnnecessary case for a
+ non-kana-letter character. This function only works for kana letters.
+ (WebCore::SearchBuffer::isBadMatch): Fixed voiced sound mark code to
+ properly handle cases where one character has a shorter list of
+ combining voiced sound marks than the other.
+
+2010-01-11 Victor Wang <victorw@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Clear m_acceptedIndexOnAbandon flag when user accepts the selected index.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33499
+
+ TEST: manual-tests/chromium/onchange-reload-popup.html
+ It should be covered by the above test. The current
+ test shell does not support sending keyboard events to popup
+ list so use manual test for it.
+
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::acceptIndex):
+
+2010-01-11 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Eric Seidel.
+
+ [GTK] Debug bots crashing in plugins/iframe-shims.html
+ https://bugs.webkit.org/show_bug.cgi?id=33472
+
+ Call computeOffsetInContainerNode() instead of
+ offsetInContainerNode(), since we are not sure this is always
+ parent-anchored.
+
+ plugins/iframe-shims.html no longer ASSERTS
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (objectAndOffsetUnignored):
+
+2010-01-11 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33455
+ Allows plugins to participate in accelerated compositing
+
+ For plugins using the CoreAnimation rendering mode, host their CALayers in the
+ accelerated compositing layer tree.
+
+ This requires making normal flow RenderLayers for RenderEmbeddedObjects when they represent
+ a plugin using this mode.
+
+ * WebCore.base.exp: Export Node::setNeedsStyleRecalc() for use by WebKit.
+ * WebCore.xcodeproj/project.pbxproj: Re-order files for sorting.
+
+ * rendering/RenderEmbeddedObject.h:
+ * rendering/RenderEmbeddedObject.cpp:
+ (WebCore::RenderEmbeddedObject::requiresLayer): Make a layer if the plugin is using
+ accelerated compositing mode.
+ (WebCore::RenderEmbeddedObject::allowsAcceleratedCompositing): Asks whether the plugin has
+ a layer, via PluginWidget.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::shouldBeNormalFlowOnly):
+ (WebCore::RenderLayer::isSelfPaintingLayer):
+ RenderEmbeddedObjects should be normal flow layers, and self-painting layers.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
+ Parent the plugin's layer in the GraphicsLayer when updating the layer configuration.
+
+ * rendering/RenderLayerCompositor.h:
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::requiresCompositingLayer):
+ (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
+ RenderEmbeddedObjects that allow accelerated compositing trip accelerated compositing mode
+ for the page.
+
+2010-01-11 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Fixed an uninitialized PluginView member (m_mode) which wasn't
+ set when constructed with a null PluginPackage*
+
+ https://bugs.webkit.org/show_bug.cgi?id=33468
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::PluginView):
+
+2010-01-11 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVG radialGradient example radial-gradient-with-outstanding-focalPoint.svg fails
+ https://bugs.webkit.org/show_bug.cgi?id=32201
+
+ This patch moves every focalPoint that lies outside the circle defined by the radial
+ gradients central point and its radius to stay inside this circle, as demanded by the
+ SVG 1.1 specification.
+ We use r * 0.99 as maximum radius for the aforementioned circle, when determining where
+ the focalPoint is lying, to achieve compatibility with Firefox.
+
+ * svg/SVGRadialGradientElement.cpp:
+ (WebCore::SVGRadialGradientElement::buildGradient):
+
+2010-01-11 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33493
+ Log redirect details to Network channel
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
+ Log response code and Location header field value. Also, removed a redundant null check.
+
+2010-01-11 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=33491 REGRESSION:
+ Many SVG -webkit-shadow tests are currently failing (in the pixel
+ tests)
+ -and-
+ <rdar://problem/7501200>
+
+ The real fix here is to call inflateForShadow() on the repaintRect
+ in prepareToRenderSVGContent(). But in order to do that, I had to
+ move inflateForShadow() to a different class since functions in
+ SVGRenderBase cannot call each other. inflateForShadow() now exists
+ in SVGRenderStyle which I think makes some sense because a similar
+ function that returns a box shadow's extent exists on RenderStyle.
+
+ Now call inflateForShadow() through the SVGRenderStyle.
+ * rendering/RenderForeignObject.cpp:
+ (WebCore::RenderForeignObject::computeRectForRepaint):
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::computeRectForRepaint):
+ * rendering/RenderSVGModelObject.cpp:
+ (WebCore::RenderSVGModelObject::computeRectForRepaint):
+ * rendering/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::computeRectForRepaint):
+ * rendering/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::computeRectForRepaint):
+
+ No longer implement inflateForShadow() here.
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderBase::prepareToRenderSVGContent): Call new
+ inflateForShadow() through the SVGRenderStyle
+ * rendering/SVGRenderSupport.h:
+
+ Implementation of inflateForShadow() now lives here.
+ * rendering/style/SVGRenderStyle.cpp:
+ (WebCore::getSVGShadowExtent):
+ (WebCore::SVGRenderStyle::inflateForShadow):
+ * rendering/style/SVGRenderStyle.h:
+
+2010-01-11 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Rewrite relative URLs in the ElementsTreeOutline to make them navigable
+
+ Targets for "src" and "href" attribute values in the Elements outline tree
+ are rewritten to full URLs whenever possible.
+ https://bugs.webkit.org/show_bug.cgi?id=33024
+
+ Test: inspector/elements-panel-rewrite-href.html
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype._rewriteAttrHref):
+ (WebInspector.ElementsTreeElement.prototype._nodeTitleInfo):
+ * inspector/front-end/inspector.js:
+
+2010-01-11 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Attempt to fix windows builds, by removing the no-longer existant JSSVGPointListCustom.cpp from JSBindingsAllInOne.cpp.
+
+ * bindings/js/JSBindingsAllInOne.cpp:
+
+2010-01-11 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Adam Roben & Dirk Schulze.
+
+ svg <text> fails to update when setting x/y
+ https://bugs.webkit.org/show_bug.cgi?id=22384
+
+ Introduce JSSVGPODListCustom, refactoring the existing custom code for SVG POD type lists.
+ (Currently SVGTransformList/SVGPointList was handled correctly, and SVGLengthList/SVGNumberList not)
+
+ Remove the need for custom JSSVG*List.cpp implementations, but instead tweak CodeGeneratorJS.pm,
+ to call into the new JSSVGPODListCustom methods. Fixes dynamic updates of the SVGTextElement
+ 'rotate' & 'x'/'y' SVG DOM properties.
+
+ Tests: svg/custom/text-xy-updates-SVGList.xhtml
+ svg/dynamic-updates/SVGTextElement-svgdom-rotate-prop.html
+
+ * Android.jscbindings.mk: Remove old files from build, add the new header.
+ * GNUmakefile.am: Ditto.
+ * WebCore.gypi: Ditto.
+ * WebCore.pro: Ditto.
+ * WebCore.vcproj/WebCore.vcproj: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * bindings/js/JSSVGPODListCustom.h: Copied from bindings/js/JSSVGTransformListCustom.cpp. Refactored code to be sharable between all JSSVG*List classes.
+ (WebCore::JSSVGPODListCustom::finishGetter):
+ (WebCore::JSSVGPODListCustom::finishSetter):
+ (WebCore::JSSVGPODListCustom::finishSetterReadOnlyResult):
+ (WebCore::JSSVGPODListCustom::clear):
+ (WebCore::JSSVGPODListCustom::initialize):
+ (WebCore::JSSVGPODListCustom::getItem):
+ (WebCore::JSSVGPODListCustom::insertItemBefore):
+ (WebCore::JSSVGPODListCustom::replaceItem):
+ (WebCore::JSSVGPODListCustom::removeItem):
+ (WebCore::JSSVGPODListCustom::appendItem):
+ * bindings/js/JSSVGPointListCustom.cpp: Removed.
+ * bindings/js/JSSVGTransformListCustom.cpp: Removed.
+ * bindings/scripts/CodeGeneratorJS.pm: Forward any SVGList call on POD list types to the new JSSVGPODListCustom.
+ * svg/SVGNumberList.cpp: Make SVGNumberList a SVGPODList, instead of a SVGList, to make dynamic updates work.
+ (WebCore::SVGNumberList::SVGNumberList):
+ * svg/SVGNumberList.h:
+ * svg/SVGPointList.idl: Remove JSCCustom markers everywhere.
+ * svg/SVGTransformList.idl: Ditto.
+
+2010-01-08 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Cannot focus on an empty editable span in a non editable div.
+ https://bugs.webkit.org/show_bug.cgi?id=33411
+ <rdar://problem/5982901>
+
+ We now allow to set the focus inside an empty inline element if it is the only
+ editable element inside non-editable content.
+
+ * dom/Position.cpp:
+ (WebCore::Position::isCandidate): Extended to allow positions in inline elements when
+ at the border between editable and non editable content.
+ (WebCore::Position::getInlineBoxAndOffset): Modified to be able to calculate the caret
+ position inside an empty inline.
+ * editing/DeleteSelectionCommand.cpp:
+ (WebCore::DeleteSelectionCommand::mergeParagraphs): When merging, we don't always find a break
+ element, since now an editable inline is a VisiblePosition if it is at editability boundary.
+ * editing/VisibleSelection.h: Updated comment on the use of Position member variables
+ instead of VisiblePosition.
+ * page/Frame.cpp:
+ (WebCore::Frame::selectionLayoutChanged): Changed to avoid multiple calls to upstream and
+ downstream on the same position.
+
+2010-01-06 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ [V8] IsRefPtrType() in CodeGeneratorV8.pm increases maintenance burden.
+ https://bugs.webkit.org/show_bug.cgi?id=32994
+
+ Refactoring, covered by existings tests.
+
+ * bindings/scripts/CodeGeneratorV8.pm: Reversed testing for ref-counted objects,
+ since there's a much smaller (and more stable) set of non-ref-counted ones.
+
+2010-01-06 Kelly Norton <knorton@google.com>
+
+ Reviewed by Pavel Feldman.
+
+ Fixes the fact that timeline panel results are skewed by the use of DOM mutation events.
+ https://bugs.webkit.org/show_bug.cgi?id=32846
+
+ Instead of using DOM mutation events in InspectorDOMAgent, InspectorController is now called
+ directly when the DOM is mutated.
+
+ * dom/ContainerNode.cpp: Calls InspectorController directly when child nodes are added/removed.
+ (WebCore::dispatchChildInsertionEvents):
+ (WebCore::dispatchChildRemovalEvents):
+ * dom/Element.cpp: Calls InspectorController directly when attributes are added/removed.
+ (WebCore::Element::dispatchAttrRemovalEvent):
+ (WebCore::Element::dispatchAttrAdditionEvent):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::didInsertDOMNode):
+ (WebCore::InspectorController::didRemoveDOMNode):
+ (WebCore::InspectorController::didModifyDOMAttr):
+ * inspector/InspectorController.h:
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::startListening):
+ (WebCore::InspectorDOMAgent::stopListening):
+ (WebCore::InspectorDOMAgent::handleEvent):
+ (WebCore::InspectorDOMAgent::didInsertDOMNode):
+ (WebCore::InspectorDOMAgent::didRemoveDOMNode):
+ (WebCore::InspectorDOMAgent::didModifyDOMAttr):
+ * inspector/InspectorDOMAgent.h:
+
+2010-01-10 Darin Adler <darin@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ REGRESSION: Japanese text search ignores small vs. large and voicing mark differences
+ https://bugs.webkit.org/show_bug.cgi?id=30437
+ rdar://problem/7214058
+
+ Test: fast/text/find-kana.html
+
+ * editing/TextIterator.cpp:
+ (WebCore::isKanaLetter): Added.
+ (WebCore::isSmallKanaLetter): Added.
+ (WebCore::composedVoicedSoundMark): Added.
+ (WebCore::isCombiningVoicedSoundMark): Added.
+ (WebCore::containsKanaLetters): Added.
+ (WebCore::normalizeCharacters): Added.
+ (WebCore::SearchBuffer::SearchBuffer): Initialize the data members
+ m_targetRequiresKanaWorkaround and m_normalizedTarget.
+ (WebCore::SearchBuffer::isBadMatch): Added. Checks for matches that
+ ICU's default collation considers correct, but we consider incorrect.
+ (WebCore::SearchBuffer::search): Added code to call isBadMatch and
+ move to the next match with usearch_next if the result is true.
+
+2010-01-11 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30883
+ [Gtk] Implement AtkText for HTML elements which contain text
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.h
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (objectAndOffsetUnignored):
+ (webkit_accessible_text_get_caret_offset):
+ * editing/gtk/SelectionControllerGtk.cpp:
+ (SelectionController::notifyAccessibilityForSelectionChange)
+
+ Adjust the caret offset and object with focus to reflect the
+ unignored parent of the static text object which contains the
+ caret. This is necessary because the static text objects are
+ no longer being exposed to ATs.
+
+2010-01-11 Kim Grönholm <kim.gronholm@nomovok.com>
+
+ Reviewed by Antti Koivisto.
+
+ Touchevent coordinates are incorrect after page zoom and page scroll
+ https://bugs.webkit.org/show_bug.cgi?id=32899
+
+ Test: fast/events/touch-coords-in-zoom-and-scroll.html
+
+ * dom/Touch.cpp:
+ (WebCore::contentsX):
+ (WebCore::contentsY):
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleTouchEvent):
+
+2010-01-11 Tony Chang <tony@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Have "Paste and Match Style" fire the dom paste event.
+ https://bugs.webkit.org/show_bug.cgi?id=30639
+
+ Test: editing/execCommand/paste-and-match-style-event.html
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::pasteAsPlainText):
+
+2010-01-10 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by NOBODY (Build fix).
+
+ Rollout renderpath culling as it once again breaks pixel tests.
+
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::paint):
+ (WebCore::RenderPath::nodeAtFloatPoint):
+
+2010-01-10 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Allows plugins to participate in accelerated compositing
+ https://bugs.webkit.org/show_bug.cgi?id=33455
+
+ Part 1: rename setContentsToVideo() on GraphicsLayer to setContentsToMedia()
+ to make it more general. Rename associated enums and methods similarly.
+
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::GraphicsLayer::setContentsToMedia):
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ (WebCore::GraphicsLayerCA::):
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::setContentsToMedia):
+ (WebCore::GraphicsLayerCA::commitLayerChanges):
+ (WebCore::GraphicsLayerCA::updateContentsMediaLayer):
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::createQTMovieLayer):
+ (WebCore::MediaPlayerPrivate::acceleratedRenderingStateChanged):
+
+2010-01-10 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Nikolas Zimmerman.
+
+ Bad DOM performance in large SVG files
+ https://bugs.webkit.org/show_bug.cgi?id=30055
+
+ Cull RenderPaths before passing on to the underlying graphics system.
+
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::paint):
+ (WebCore::RenderPath::nodeAtFloatPoint):
+
+2010-01-10 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Add defensive initialization of iframe sandbox flags
+ https://bugs.webkit.org/show_bug.cgi?id=32368
+
+ We now initialize the SecurityOrigin's sandbox state directly duing
+ construction. This lets us properly set the isUnique bit.
+
+ Tests: http/tests/security/sandboxed-iframe-origin-add.html
+ http/tests/security/sandboxed-iframe-origin-remove.html
+
+ * WebCore.base.exp:
+ * dom/Document.cpp:
+ (WebCore::Document::initSecurityContext):
+ * page/SecurityOrigin.cpp:
+ (WebCore::SecurityOrigin::SecurityOrigin):
+ (WebCore::SecurityOrigin::create):
+ (WebCore::SecurityOrigin::setSandboxFlags):
+ * page/SecurityOrigin.h:
+
+2010-01-10 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Inspect Element selects the wrong element.
+ Drive-by fix that focuses dom tree upon settting focuesDOMNode.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33449
+
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.setDocument.selectLastSelectedNode):
+ (WebInspector.ElementsPanel.prototype.setDocument):
+ * inspector/front-end/treeoutline.js:
+ (TreeElement.prototype.select):
+
+2010-01-10 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Introduce support for flexible line height in the text editor.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33431
+
+ * inspector/front-end/TextEditor.js:
+ (WebInspector.TextEditor):
+ (WebInspector.TextEditor.prototype._offsetToLineNumber):
+ (WebInspector.TextEditor.prototype._lineNumberToOffset):
+ (WebInspector.TextEditor.prototype._lineHeight):
+ (WebInspector.TextEditor.prototype.reveal):
+ (WebInspector.TextEditor.prototype._textChanged):
+ (WebInspector.TextEditor.prototype._selectionChanged):
+ (WebInspector.TextEditor.prototype._updateSize):
+ (WebInspector.TextEditor.prototype._paintLines):
+ (WebInspector.TextEditor.prototype._paintLinesContinuation):
+ (WebInspector.TextEditor.prototype._paintLineNumbers):
+ (WebInspector.TextEditor.prototype._paintCurrentLine):
+ (WebInspector.TextEditor.prototype._scroll):
+ (WebInspector.TextEditor.prototype._repaintOnScroll):
+ (WebInspector.TextEditor.prototype._caretForMouseEvent):
+ (WebInspector.TextEditor.prototype._handleNavigationKey):
+ (WebInspector.TextEditor.prototype._updateCursor):
+ (WebInspector.TextEditor.prototype._invalidateHighlight):
+ (WebInspector.TextEditor.prototype._paintSelection):
+ (WebInspector.TextEditor.prototype._initFont):
+ (WebInspector.TextCursor.prototype.setTextLineHeight):
+
+2010-01-10 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Do not repaint line numbers while editing within line.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33427
+
+ * inspector/front-end/TextEditor.js:
+ (WebInspector.TextEditor.prototype._textChanged):
+ (WebInspector.TextEditor.prototype._selectionChanged):
+ (WebInspector.TextEditor.prototype._repaintAll):
+ (WebInspector.TextEditor.prototype._paintLines):
+ (WebInspector.TextEditor.prototype._paintLinesContinuation):
+ (WebInspector.TextEditor.prototype._paintLineNumbers):
+ (WebInspector.TextEditor.prototype._updateCursor):
+ (WebInspector.TextEditor.prototype._copy):
+
+2010-01-10 Adam Barth <abarth@webkit.org>
+
+ Unreviewed whitespace fixes.
+
+ * html/HTMLFrameOwnerElement.cpp:
+ (WebCore::HTMLFrameOwnerElement::setSandboxFlags):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::updateSandboxFlags):
+ * loader/FrameLoader.h:
+
+2010-01-09 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Unify origin sandbox flag with m_noAccess in SecurityOrigin
+ https://bugs.webkit.org/show_bug.cgi?id=32372
+
+ It turns out the SandboxOrigin bit is slightly different than the
+ unique origin concept because the sandbox bit is inherited by iframes.
+ These concepts are separate in the spec, so I think it's ok to keep
+ them separate in the implementation as well.
+
+ No new tests because there is no behavior change.
+
+ * dom/Document.cpp:
+ (WebCore::Document::cookie):
+ (WebCore::Document::setCookie):
+ * loader/CrossOriginAccessControl.cpp:
+ (WebCore::passesAccessControlCheck):
+ * page/SecurityOrigin.cpp:
+ (WebCore::schemesWithUniqueOrigins):
+ (WebCore::SecurityOrigin::SecurityOrigin):
+ (WebCore::SecurityOrigin::canAccess):
+ (WebCore::SecurityOrigin::canRequest):
+ (WebCore::SecurityOrigin::taintsCanvas):
+ (WebCore::SecurityOrigin::setSandboxFlags):
+ (WebCore::SecurityOrigin::toString):
+ (WebCore::SecurityOrigin::registerURLSchemeAsNoAccess):
+ (WebCore::SecurityOrigin::shouldTreatURLSchemeAsNoAccess):
+ * page/SecurityOrigin.h:
+ (WebCore::SecurityOrigin::canAccessDatabase):
+ (WebCore::SecurityOrigin::canAccessStorage):
+ (WebCore::SecurityOrigin::canAccessCookies):
+ (WebCore::SecurityOrigin::isUnique):
+
+2010-01-09 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ ScriptController::isEnabled needs to be renamed
+ https://bugs.webkit.org/show_bug.cgi?id=32063
+
+ Rename ScriptController::isEnabled to
+ ScriptController::canExecuteScripts to reflect what the method actually
+ means. This is a trivial change, but it involved touching a lot of
+ call sites.
+
+ * WebCore.PluginHostProcess.exp:
+ * bindings/ScriptControllerBase.cpp:
+ (WebCore::ScriptController::canExecuteScripts):
+ (WebCore::ScriptController::executeScript):
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::JSEventListener::handleEvent):
+ * bindings/js/JSLazyEventListener.cpp:
+ (WebCore::JSLazyEventListener::parseCode):
+ * bindings/js/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::execute):
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::bindingRootObject):
+ (WebCore::ScriptController::windowScriptNPObject):
+ (WebCore::ScriptController::jsObjectForPluginElement):
+ (WebCore::ScriptController::executeScriptInWorld):
+ * bindings/js/ScriptController.h:
+ * bindings/js/ScriptControllerMac.mm:
+ (WebCore::ScriptController::windowScriptObject):
+ * bindings/js/ScriptEventListener.cpp:
+ (WebCore::createAttributeEventListener):
+ * bindings/js/ScriptState.cpp:
+ (WebCore::scriptStateFromNode):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::windowScriptNPObject):
+ (WebCore::ScriptController::createScriptObjectForPluginElement):
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/ScriptEventListener.cpp:
+ (WebCore::createAttributeEventListener):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::retrieve):
+ * dom/ScriptElement.cpp:
+ (WebCore::ScriptElementData::evaluateScript):
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::XMLTokenizer::startElementNs):
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::controls):
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::parseTag):
+ (WebCore::HTMLTokenizer::processToken):
+ * inspector/InspectorController.cpp:
+ (WebCore::canPassNodeToJavaScript):
+ * inspector/JavaScriptDebugServer.cpp:
+ (WebCore::JavaScriptDebugServer::setJavaScriptPaused):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::isProcessingUserGesture):
+ (WebCore::FrameLoader::open):
+ (WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds):
+ (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
+
+2010-01-09 Evan Martin <evan@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Inspector font for errors is ugly on non-OSX platforms
+ https://bugs.webkit.org/show_bug.cgi?id=33340
+
+ * css/view-source.css: Add a fallback to sans-serif on a CSS
+ selector that previously only listed Lucida Grande.
+
+2010-01-09 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ <rdar://problem/7525778> Font fallback kills SVG kerning
+ https://bugs.webkit.org/show_bug.cgi?id=33400
+
+ Test: platform/mac/fast/text/sticky-typesetting-features.html
+
+ Cache font attributes separately for different typesetting features.
+
+ * platform/graphics/SimpleFontData.h: Replaced single-element caches
+ with maps.
+ * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
+ (WebCore::disableLigatures): Added an ATSUStyle parameter.
+ (WebCore::initializeATSUStyle): Look up the ATSUStyle in the map and
+ initialize if necessary. Return the ATSUStyle.
+ (WebCore::ComplexTextController::collectComplexTextRunsForCharactersATSUI):
+ Use the ATSUStyle returned from initializeATSUStyle().
+ * platform/graphics/mac/SimpleFontDataMac.mm:
+ (WebCore::SimpleFontData::platformInit):
+ (WebCore::SimpleFontData::platformDestroy): Destroy the ATSUStyles in the
+ map.
+ (WebCore::SimpleFontData::getCFStringAttributes): Look up the attributes
+ dictionary in the map and initialize if necessary.
+
+2010-01-08 Adam Barth <abarth@webkit.org>
+
+ Unreviewed. Fix namespace indent for SecurityOrigin.h.
+
+ * page/SecurityOrigin.h:
+ (WebCore::SecurityOrigin::domainWasSetInDOM):
+ (WebCore::SecurityOrigin::protocol):
+ (WebCore::SecurityOrigin::host):
+ (WebCore::SecurityOrigin::domain):
+ (WebCore::SecurityOrigin::port):
+ (WebCore::SecurityOrigin::canLoadLocalResources):
+ (WebCore::SecurityOrigin::setSandboxFlags):
+ (WebCore::SecurityOrigin::isSandboxed):
+ (WebCore::SecurityOrigin::canAccessDatabase):
+ (WebCore::SecurityOrigin::canAccessStorage):
+ (WebCore::SecurityOrigin::):
+
+2010-01-08 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dmitry Titov.
+
+ bindings/v8/DOMData is missing a virtual destructor
+ https://bugs.webkit.org/show_bug.cgi?id=33390
+
+ DOMData is the base class for ChildThreadDOMData and MainThreadDOMData classes
+ but it does not have a virtual destructor. While this isn't currently causing
+ any leaks, since there are no instances of ChildThreadDOMData or
+ MainThreadDOMData that are manipulated via a DOMData pointer, the ARM GCC
+ compiler generates the following compilation error:
+
+ "/WebCore/bindings/v8/DOMData.h:45: error: 'class WebCore::DOMData' has virtual
+ functions and accessible non-virtual destructor"
+
+ We therefore need to add a virtual destructor to DOMData.
+
+ * bindings/v8/DOMData.cpp:
+ (WebCore::DOMData::~DOMData):
+ * bindings/v8/DOMData.h:
+
+2010-01-08 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33417
+
+ Cleans up style errors exposed by the patch for bug #33198.
+
+ No functionality was changed. So, no new tests.
+
+ * platform/graphics/SimpleFontData.h:
+ * plugins/PluginPackage.cpp:
+
+2010-01-08 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ WebGL canvas paints background color twice
+ https://bugs.webkit.org/show_bug.cgi?id=33361
+
+ Clean up some logic around "directly composited" content: some images, video, and WebGL.
+
+ We previously set the GraphicsLayer background color to the CSS background color
+ in some cases where the box has no other decorations. However, the content
+ layer's bounds do not correspond with the background box in many cases,
+ and we could end up both painting the background color, and setting it on the layer.
+
+ Simplify this logic to never use layer background colors, and thus skip allocating
+ backing store only when the element has no visible box decorations.
+
+ Tests: compositing/images/direct-image-background-color.html
+ compositing/reflections/simple-composited-reflections.html
+ compositing/video/video-background-color.html
+ compositing/webgl/webgl-background-color.html
+ compositing/webgl/webgl-blending.html
+
+ * rendering/RenderLayerBacking.h:
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::is3DCanvas): Utility to determine if a RenderObject is a canvas with WebGL
+ (WebCore::RenderLayerBacking::RenderLayerBacking): Remove m_hasDirectlyCompositedContent.
+ (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): canUseDirectCompositing()
+ is renamed to isDirectlyCompositedImage() and only applies to images now.
+ No longer set layer background color.
+ (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Just use hasPaintedContent()
+ as the argument to setDrawsContent().
+ (WebCore::hasBoxDecorationsOrBackground): Renamed.
+ (WebCore::RenderLayerBacking::hasNonCompositingContent):
+ (WebCore::hasBoxDecorationsOrBackgroundImage): Renamed from hasBoxDecorations().
+ (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): Moved test for
+ hasOverflowControls() into hasNonCompositingContent() and removed the FIXME comment.
+ (WebCore::RenderLayerBacking::containsPaintedContent): New method that decides
+ if the layer (and its non-composited children) has any content that must be painted into backing store.
+ (WebCore::RenderLayerBacking::isDirectlyCompositedImage): Renamed from canUseDirectCompositing()
+ and reduced to only apply to images.
+ (WebCore::RenderLayerBacking::rendererContentChanged): 3D canvas no longer falls under the
+ canUseDirectCompositing() scope.
+
+2010-01-08 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Adler.
+
+ Use member initialization syntax instead of assignment for member variables of Document used
+ for determining minimum layout delay.
+ https://bugs.webkit.org/show_bug.cgi?id=33316
+
+ No new tests, style change only.
+
+ * dom/Document.cpp: Modified.
+ (WebCore::Document::Document): Modified. Use initializer list for m_startTime, m_overMinimumLayoutThreshold and m_extraLayoutDelay.
+
+2010-01-08 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Passing array that is too large to set method of WebGLArrays does not throw an exception
+ https://bugs.webkit.org/show_bug.cgi?id=33352
+
+ Added needed range checks to JSC and V8 custom bindings. Expanded
+ preexisting test suite for WebGLArrays and updated its expected
+ results. Tested in WebKit and Chromium.
+
+ Test: fast/canvas/webgl/array-set-out-of-bounds.html
+
+ * bindings/js/JSWebGLArrayHelper.h:
+ (WebCore::setWebGLArrayFromArray):
+ * bindings/v8/custom/V8WebGLArrayCustom.h:
+ (WebCore::setWebGLArrayFromArray):
+
+2010-01-08 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32962
+ HTML tags are wrongfully parsed when setting innerHTML of a SCRIPT element
+
+ Also fixed the same for STYLE elements.
+
+ Tests: fast/dom/css-innerHTML.html
+ fast/dom/script-innerHTML-x.xhtml
+ fast/dom/script-innerHTML.html
+
+ * html/HTMLElement.cpp: (WebCore::HTMLElement::setInnerHTML): Don't parse JS or CSS as HTML,
+ matching Firefox.
+
+2010-01-08 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=32757 Repaint bug
+ with -webkit-shadow on svg shapes
+ -and-
+ <rdar://problem/7389149>
+
+ Inflate the repaintRect for the shadow using its extent.
+ * rendering/RenderForeignObject.cpp:
+ (WebCore::RenderForeignObject::computeRectForRepaint):
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::computeRectForRepaint):
+ * rendering/RenderSVGModelObject.cpp:
+ (WebCore::RenderSVGModelObject::computeRectForRepaint):
+ * rendering/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::repaintRectInLocalCoordinates):
+ (WebCore::RenderSVGRoot::computeRectForRepaint):
+ * rendering/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::computeRectForRepaint):
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::getSVGShadowExtent):
+ (WebCore::SVGRenderBase::inflateForShadow):
+ * rendering/SVGRenderSupport.h:
+
+2010-01-08 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ WebGLArray subclasses do the wrong conversion in indexSetter
+ https://bugs.webkit.org/show_bug.cgi?id=33350
+
+ Test: fast/canvas/webgl/array-setters.html
+
+ * bindings/js/JSWebGLFloatArrayCustom.cpp:
+ (WebCore::JSWebGLFloatArray::indexSetter):
+ * bindings/js/JSWebGLUnsignedIntArrayCustom.cpp:
+ (WebCore::JSWebGLUnsignedIntArray::indexSetter):
+
+2010-01-08 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Delegation client
+ https://bugs.webkit.org/show_bug.cgi?id=32826
+
+ Factory related code removed from QtAbstractWebPopup. Popups are now created
+ by ChromeClientQt.
+ Popup content information struct added to class QtAbstractWebPopup.
+ PopupMenuClient is now hidden from higher layers.
+ QtAbstractWebPopup now receives content information and font as parameters
+ of method populate.
+ QtFallbackWebPopup moved to WebKit/qt/WebCoreSupport.
+
+ * WebCore.pro:
+ * platform/qt/PopupMenuQt.cpp:
+ (WebCore::PopupMenu::PopupMenu):
+ (WebCore::getItems):
+ (WebCore::PopupMenu::show):
+ * platform/qt/QtAbstractWebPopup.cpp:
+ (WebCore::QtAbstractWebPopup::QtAbstractWebPopup):
+ (WebCore::QtAbstractWebPopup::popupDidHide):
+ (WebCore::QtAbstractWebPopup::valueChanged):
+ * platform/qt/QtAbstractWebPopup.h:
+ (WebCore::QtAbstractWebPopup::Item::):
+ * platform/qt/QtFallbackWebPopup.cpp: Removed.
+ * platform/qt/QtFallbackWebPopup.h: Removed.
+
+2010-01-08 Yuzo Fujishima <yuzo@google.com>
+
+ Reviewed by Darin Adler.
+
+ Skip invalid blocks in CSS property declarations.
+ https://bugs.webkit.org/show_bug.cgi?id=31231
+ https://bugs.webkit.org/show_bug.cgi?id=26619
+
+ This patch makes the CSS parser skip property declarations containing invalid blocks.
+
+ Test: fast/css/parsing-error-recovery.html
+
+ * css/CSSGrammar.y:
+
+2010-01-08 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ AX: CSS content not returned correctly in AX
+ https://bugs.webkit.org/show_bug.cgi?id=33308
+
+ Test: platform/mac/accessibility/css-content-attribute.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::textUnderElement):
+
+2010-01-08 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Implement full-screen video for Windows
+ https://bugs.webkit.org/show_bug.cgi?id=31318
+
+ This is mostly support logic for taking video
+ into and out of full-screen. It also contains the
+ QTMovieWin piece which adds support for the actual
+ full-screen window itself. Events from the window
+ are sent to the FullscreenVideosController for handling.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::addData):
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
+ (WebCore::MediaPlayerPrivate::supportsFullscreen):
+ (WebCore::MediaPlayerPrivate::platformMedia):
+ * platform/graphics/win/QTMovieWin.cpp:
+ (QTMovieWinPrivate::QTMovieWinPrivate):
+ (QTMovieWin::initializeQuickTime):
+ (QTMovieWin::_handleMessages):
+ (QTMovieWin::enterFullscreen):
+ (QTMovieWin::exitFullscreen):
+ * platform/graphics/win/QTMovieWin.h:
+
+2010-01-08 Matt Perry <mpcomplete@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fix a regression that removed a call to
+ FrameLoaderClient::didDestroyScriptContextForFrame.
+ https://bugs.webkit.org/show_bug.cgi?id=33347
+
+ * bindings/v8/V8DOMWindowShell.cpp:
+ (WebCore::V8DOMWindowShell::disposeContextHandles):
+
+2010-01-08 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ WebKit plugins are not rendered during printing.
+ https://bugs.webkit.org/show_bug.cgi?id=33022.
+
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::paintWindowedPluginIntoContext): Tell
+ cairo printing surface to flush so that blank regions do
+ not write over the plugin's paint operations.
+ * rendering/RenderLayer.cpp: Build fix.
+ (WebCore::RenderLayer::beginTransparencyLayers): Correct
+ method signature missing for ColorSpace.
+
+2010-01-08 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ REGRESSION(52819?): AXLoadComplete and AXLayoutComplete causes 4 tests fail on Snow Leopard Debug bot
+ https://bugs.webkit.org/show_bug.cgi?id=33300
+
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper accessibilitySetPostedNotificationCallback:withContext:]):
+ (-[AccessibilityObjectWrapper accessibilityPostedNotification:]):
+
+2010-01-08 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Regex-based syntax highlighting is slow.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33330
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/JavaScriptHighlighterScheme.js: Removed.
+ * inspector/front-end/JavaScriptTokenizer.js: Added.
+ (WebInspector.JavaScriptTokenizer):
+ (WebInspector.JavaScriptTokenizer.prototype.set line):
+ (WebInspector.JavaScriptTokenizer.prototype.getCondition):
+ (WebInspector.JavaScriptTokenizer.prototype.setCondition):
+ (WebInspector.JavaScriptTokenizer.prototype._charAt):
+ (WebInspector.JavaScriptTokenizer.prototype.nextToken):
+ * inspector/front-end/JavaScriptTokenizer.re2js: Added.
+ * inspector/front-end/TextEditorHighlighter.js:
+ (WebInspector.TextEditorHighlighter):
+ (WebInspector.TextEditorHighlighter.prototype.highlight):
+ (WebInspector.TextEditorHighlighter.prototype._lex):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+
+2010-01-07 Mike Belshe <mbelshe@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix Spdy casing to match style guide.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33326
+
+ * platform/network/chromium/ResourceResponse.h:
+ (WebCore::ResourceResponse::ResourceResponse):
+ (WebCore::ResourceResponse::wasFetchedViaSPDY):
+ (WebCore::ResourceResponse::setWasFetchedViaSPDY):
+
+2010-01-07 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32987
+
+ Added ENABLE_XHTMLMP flag. Disabled by default.
+
+ * Configurations/FeatureDefines.xcconfig:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.xcodeproj/project.pbxproj:
+ * config.h:
+
+2010-01-07 Stephanie Lewis <slewis@apple.com>
+
+ Rolled out http://trac.webkit.org/changeset/52778 due to rolling
+ out http://trac.webkit.org/changeset/52756
+
+ * dom/Document.cpp:
+ (WebCore::Document::recalcStyle):
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::layout):
+ (WebCore::SelectionController::recomputeCaretRect):
+ (WebCore::SelectionController::invalidateCaretRect):
+ (WebCore::SelectionController::paintCaret):
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::attach):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::attach):
+ * page/Frame.cpp:
+ (WebCore::Frame::revealSelection):
+
+2010-01-07 Stephanie Lewis <slewis@apple.com>
+
+ Rollout http://trac.webkit.org/changeset/52756 due to a large performance regression.
+
+ * dom/Document.cpp:
+ (WebCore::Document::updateLayout):
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::SelectionController):
+ (WebCore::SelectionController::setSelection):
+ * editing/SelectionController.h:
+ * page/Frame.cpp:
+ (WebCore::Frame::setCaretVisible):
+ (WebCore::Frame::selectionLayoutChanged):
+ (WebCore::Frame::caretBlinkTimerFired):
+ (WebCore::Frame::selectionBounds):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::needsLayout):
+
+2010-01-07 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix a crash seen on the buildbots.
+
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::JSDOMWindowBase::JSDOMWindowBase): Don't disable specific
+ function tracking here; it's too late, as some specific functions
+ may already have been tracked in the base class constructor.
+
+2010-01-07 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ SVGTextElement & friends need to implement svgAttributeChanged
+ https://bugs.webkit.org/show_bug.cgi?id=33284
+
+ Implement svgAttributeChanged() for SVGTextElement & SVGTRefElement. As <text> element contain children,
+ childrenChanged() has to be implemented as well for SVGTextElement.
+
+ Simplify SVGTransformable::parseTransformAttribute() code, clearing lists in the beginning
+ and on error case, after parsing - previously the calling site had to take care of that.
+
+ Tests: svg/dynamic-updates/SVGTRefElement-dom-href-attr.html
+ svg/dynamic-updates/SVGTextElement-dom-transform-attr.html
+ svg/dynamic-updates/SVGTextElement-svgdom-transform-prop.html
+
+ * svg/SVGGradientElement.cpp:
+ (WebCore::SVGGradientElement::parseMappedAttribute):
+ * svg/SVGPatternElement.cpp:
+ (WebCore::SVGPatternElement::parseMappedAttribute):
+ * svg/SVGStyledTransformableElement.cpp:
+ (WebCore::SVGStyledTransformableElement::parseMappedAttribute):
+ * svg/SVGTRefElement.cpp:
+ (WebCore::SVGTRefElement::svgAttributeChanged):
+ * svg/SVGTRefElement.h:
+ * svg/SVGTextElement.cpp:
+ (WebCore::SVGTextElement::parseMappedAttribute):
+ (WebCore::SVGTextElement::svgAttributeChanged):
+ (WebCore::SVGTextElement::childrenChanged):
+ * svg/SVGTextElement.h:
+ * svg/SVGTextPositioningElement.cpp:
+ (WebCore::SVGTextPositioningElement::svgAttributeChanged):
+ * svg/SVGTextPositioningElement.h:
+ * svg/SVGTransformable.cpp:
+ (WebCore::SVGTransformable::parseTransformAttribute):
+ * svg/SVGTransformable.h:
+
+2010-01-07 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Padding in popup menu gets lost with styled <select> in Windows.
+ Fixes <rdar://7285538>, and <http://webkit.org/b/33235>.
+
+ [Win] Support padding-right on selects when webkit-appearance is off. Added a test
+ case for narrow selects with -webkit-appearance: none, and padding left and right to
+ show that both types of padding are honored.
+
+ * manual-tests/select-webkit-appearance-off-narrow-select.html: Added.
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::calculatePositionAndSize): Use clientPaddingRight instead of a hardcoded constant.
+ * rendering/RenderMenuList.cpp:
+ (WebCore::RenderMenuList::clientPaddingRight): If webkit-appearance is off, use padding-right instead of
+ the hardcoded constant.
+
+2010-01-07 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33057
+ REGRESSION(r49365): typeof(xhr.responseText) != "string" in Windows
+
+ <rdar://problem/7296920> REGRESSION: WebKit fails to start PeaceKeeper benchmark
+
+ * config.h: Define JS_EXPORTCLASS. I'm not sure why this isn't done in JSC globally for all
+ possible clients, but keeping the current design for now.
+
+2010-01-07 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Jon Honeycutt.
+
+ Account for scale and current context position (as well as page
+ position) in the device context world transform passed to
+ plugins. This is especially important for print surface DPI.
+ http://bugs.webkit.org/show_bug.cgi?id=32909.
+
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::paintWindowedPluginIntoContext): Revise
+ world context handling to include scaling and translation
+ already set for the CTM.
+
+2010-01-07 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Generate V8 bindings header declarations for named and indexed accessors.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
+ * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+ * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
+ * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
+ * bindings/v8/custom/V8NodeListCustom.cpp:
+ * bindings/v8/custom/V8StorageCustom.cpp:
+ * bindings/v8/custom/V8StyleSheetListCustom.cpp:
+ * bindings/v8/custom/V8WebGLByteArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLFloatArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLIntArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLShortArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLUnsignedByteArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLUnsignedIntArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLUnsignedShortArrayCustom.cpp:
+
+2010-01-07 Geoffrey Garen <ggaren@apple.com>
+
+ Better build fix: use 'this->structure()', since 'structure' is a
+ PassRefPtr, and therefore null.
+
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::JSDOMWindowBase::JSDOMWindowBase):
+
+2010-01-07 Geoffrey Garen <ggaren@apple.com>
+
+ Build fix: avoid a name conflict by using the local 'structure' instead
+ of the member 'structure()'.
+
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::JSDOMWindowBase::JSDOMWindowBase):
+
+2010-01-07 Simon Fraser <simon.fraser@apple.com>
+
+ Build fix.
+
+ Add RenderEmbeddedObject.h/cpp to all the build systems.
+
+ * Android.mk:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCoreSources.bkl:
+
+2010-01-07 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Safari memory usage skyrockets using new Google AdWords interface
+ https://bugs.webkit.org/show_bug.cgi?id=33343
+
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::JSDOMWindowBase::JSDOMWindowBase): Disabled specific function
+ tracking for the window object, since there's no way to do direct
+ method calls on the window object; they all go through the window shell.
+
+2010-01-07 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Kevin Decker, Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33338
+ Create a renderer for <object> and <embed>
+
+ Add RenderEmbeddedObject, which derives from RenderPartObject, and is created for <object> and <embed>.
+ Instances of RenderPartObject are now only allocated for iframes.
+
+ Move object/embed-related code from RenderPartObject to RenderEmbeddedObject.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ Add RenderEmbeddedObject.h/cpp
+
+ * html/HTMLEmbedElement.cpp:
+ (WebCore::HTMLEmbedElement::createRenderer): Create a RenderEmbeddedObject.
+ (WebCore::HTMLEmbedElement::updateWidget): Use toRenderEmbeddedObject()
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::createRenderer): Make a RenderEmbeddedObject for the plugin-proxy case.
+ (WebCore::HTMLMediaElement::finishParsingChildren): Use toRenderEmbeddedObject() in the plugin-proxy code.
+
+ * html/HTMLObjectElement.cpp:
+ (WebCore::HTMLObjectElement::createRenderer): Make a RenderEmbeddedObject
+ (WebCore::HTMLObjectElement::updateWidget): Use toRenderEmbeddedObject()
+
+ * page/FrameView.h:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::addWidgetToUpdate):
+ (WebCore::FrameView::removeWidgetToUpdate):
+ (WebCore::FrameView::updateWidgets):
+ Objects in the m_widgetUpdateSet are only ever RenderEmbeddedObjects.
+
+ * rendering/RenderEmbeddedObject.cpp: Added.
+ * rendering/RenderEmbeddedObject.h: Added.
+ Most of the code moved from RenderPartObject.
+
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::isEmbeddedObject): New method.
+
+ * rendering/RenderPart.cpp:
+ (WebCore::RenderPart::RenderPart): Initialize m_hasFallbackContent here, rather than in the derived classes.
+ * rendering/RenderPart.h: Comments.
+
+ * rendering/RenderPartObject.h:
+ * rendering/RenderPartObject.cpp:
+ (WebCore::RenderPartObject::RenderPartObject): Clean up, code moved to base class, and removed object/embed-specific code.
+ (WebCore::RenderPartObject::layout): Removed object/embed-specific code.
+
+2010-01-07 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33338
+ Create a renderer for <object> and <embed>
+
+ First part of this change: renderPartObject->updateWidget() is a no-op for iframe elements,
+ so we don't need to call it here, and can thus remove the attach() override entirely.
+
+ * html/HTMLIFrameElement.cpp:
+ * html/HTMLIFrameElement.h:
+
+2009-01-07 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Migrate to canvas-based text viewer / editor that scales.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33001
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/JavaScriptHighlighterScheme.js: Added.
+ (WebInspector.JavaScriptHighlighterScheme):
+ * inspector/front-end/KeyboardShortcut.js:
+ * inspector/front-end/TextEditor.js: Added.
+ (WebInspector.TextEditor):
+ (WebInspector.TextSelectionModel):
+ (WebInspector.TextCursor):
+ * inspector/front-end/TextEditorHighlighter.js: Added.
+ (WebInspector.TextEditorHighlighter):
+ (WebInspector.TextEditorHighlighter.prototype.highlight):
+ (WebInspector.TextEditorHighlighter.prototype._lex):
+ * inspector/front-end/TextEditorModel.js: Added.
+ (WebInspector.TextRange):
+ (WebInspector.TextRange.prototype.clone):
+ (WebInspector.TextEditorModel):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.html:
+
+2010-01-07 Christian Sejersen <christian.webkit@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ document.title does not replace or remove space characters
+ https://bugs.webkit.org/show_bug.cgi?id=27032
+
+ Test: fast/dom/Document/document-title-get.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::Document):
+ Initialization of m_rawTitle
+ (WebCore::canonicalizedTitle):
+ Moved from DocumentLoader.cpp with minor edits
+ (WebCore::Document::updateTitle):
+ Ensures the title is canonicalized
+ (WebCore::Document::setTitle):
+ Uses m_rawTitle instaed of m_title
+ (WebCore::Document::removeTitle):
+ Uses m_rawTitle instead of m_title
+
+ * dom/Document.h:
+ Added m_rawTitle that stores the passed in title, m_title now stores the
+ canonicalized title
+
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::setTitle):
+ The title passed in is now canonicalized in Document.cpp
+
+2010-01-07 Yuzo Fujishima <yuzo@google.com>
+
+ Reviewed by Darin Adler.
+
+ Allow leading/trailing space for CSS nth-*() and lang().
+ https://bugs.webkit.org/show_bug.cgi?id=17248
+
+ For pseudo-classes :nth-*() and :lang(), space must be allowed after '(' and before ')'.
+ See the bug comments for why we don't allow space at other places.
+
+ * css/CSSGrammar.y:
+
+2010-01-07 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ AX: contentEditable DIVs are not AX accessible
+ https://bugs.webkit.org/show_bug.cgi?id=33325
+
+ Test: accessibility/contenteditable-hidden-div.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
+ (WebCore::AccessibilityRenderObject::canSetValueAttribute):
+
+2010-01-07 Adam Barth <abarth@webkit.org>
+
+ Unreviewed. Resolve merge conflict.
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::setContextDebugId):
+
+2010-01-07 Adam Barth <abarth@webkit.org>
+
+ No review, rolling out r52847.
+ http://trac.webkit.org/changeset/52847
+ https://bugs.webkit.org/show_bug.cgi?id=33232
+
+ Might have caused a perf regression. I'm rolling this out to see if it
+ heals the perf bot.
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::ScriptController):
+ (WebCore::ScriptController::~ScriptController):
+ (WebCore::ScriptController::updateSecurityOrigin):
+ (WebCore::ScriptController::evaluateInIsolatedWorld):
+ (WebCore::ScriptController::haveInterpreter):
+ (WebCore::ScriptController::clearWindowShell):
+ (WebCore::ScriptController::updateDocument):
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/V8DOMWindowShell.cpp:
+ * bindings/v8/V8DOMWindowShell.h:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ (WebCore::V8DOMWrapper::convertDocumentToV8Object):
+ (WebCore::V8DOMWrapper::convertNewNodeToV8Object):
+ * bindings/v8/V8IsolatedContext.cpp:
+ (WebCore::V8IsolatedContext::V8IsolatedContext):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::V8Proxy):
+ (WebCore::V8Proxy::~V8Proxy):
+ (WebCore::V8Proxy::handleOutOfMemory):
+ (WebCore::V8Proxy::evaluateInIsolatedWorld):
+ (WebCore::V8Proxy::setInjectedScriptContextDebugId):
+ (WebCore::V8Proxy::clearForClose):
+ (WebCore::V8Proxy::clearForNavigation):
+ (WebCore::V8Proxy::context):
+ (WebCore::V8Proxy::mainWorldContext):
+ (WebCore::V8Proxy::currentContext):
+ (WebCore::V8Proxy::setContextDebugId):
+ * bindings/v8/V8Proxy.h:
+ (WebCore::V8Proxy::windowShell):
+ * bindings/v8/WorldContextHandle.cpp:
+ (WebCore::WorldContextHandle::adjustedContext):
+
+2010-01-07 Dan Bernstein <mitz@apple.com>
+
+ Build fix
+
+ * WebCore.xcodeproj/project.pbxproj: Made TypesettingFeatures.h private.
+
+2010-01-07 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Added Font::typesettingFeatures() and deployed it
+
+ No change in funcitonality
+
+ * WebCore.xcodeproj/project.pbxproj: Added TypesettingFeatures.h.
+ * platform/graphics/Font.h:
+ (WebCore::Font::typesettingFeatures): Added. Determines the typesetting
+ features from the text redndering mode.
+ * platform/graphics/FontFastPath.cpp:
+ (WebCore::Font::canUseGlyphCache): Use typesettingFeatures().
+ * platform/graphics/SimpleFontData.h:
+ * platform/graphics/TypesettingFeatures.h: Added.
+ * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
+ (WebCore::disableLigatures): Take TypesettingFeatures instead of
+ TextRenderingMode.
+ (WebCore::initializeATSUStyle): Ditto.
+ (WebCore::ComplexTextController::collectComplexTextRunsForCharactersATSUI):
+ Use typesettingFeatures().
+ * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
+ (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
+ Ditto.
+ * platform/graphics/mac/SimpleFontDataMac.mm:
+ (WebCore::SimpleFontData::getCFStringAttributes): Take
+ TypesettingFeatures instead of TextRenderingMode.
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::findNextLineBreak): Use TypesettingFeatures().
+
+2010-01-07 Dimitri Glazkov <dglazkov@chromium.org>
+
+ No review, rolling out r52900.
+ http://trac.webkit.org/changeset/52900
+ https://bugs.webkit.org/show_bug.cgi?id=30055
+
+ Broke over 30 SVG pixel tests.
+
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::paint):
+
+2010-01-07 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Rubber-stamped by Kenneth Rohde Christiansen.
+
+ [Qt] The library version number of the first package release is 4.7.0.
+
+ * WebCore.pro:
+
+2010-01-07 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Allow the application to override online/offline network status
+ https://bugs.webkit.org/show_bug.cgi?id=32684
+
+ Added API to NetworkStateNotifier for forcing network status.
+
+ * platform/network/NetworkStateNotifier.h:
+ * platform/network/qt/NetworkStateNotifierPrivate.h:
+ * platform/network/qt/NetworkStateNotifierQt.cpp:
+ (WebCore::NetworkStateNotifierPrivate::NetworkStateNotifierPrivate):
+ (WebCore::NetworkStateNotifierPrivate::onlineStateChanged):
+ (WebCore::NetworkStateNotifierPrivate::networkAccessPermissionChanged):
+ (WebCore::NetworkStateNotifier::updateState):
+ (WebCore::NetworkStateNotifier::NetworkStateNotifier):
+ (WebCore::NetworkStateNotifier::setNetworkAccessAllowed):
+
+2010-01-07 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Fix linkage against Qt mobility API bearer management module
+
+ Use the documented .pro file syntax to link against the correct
+ library and (more importantly) get the include paths correct.
+
+ * WebCore.pro:
+
+2010-01-07 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33272
+ 'abort' event still fired as a progress event
+
+ rdar://6710625
+ Test media/video-error-abort.html doesn't work
+
+ Test: http/tests/media/video-error-abort.html
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::scheduleEvent): Incorporate code from enqueueEvent.
+ (WebCore::HTMLMediaElement::loadInternal): Fix 'abort' event firing logic missed
+ in https://bugs.webkit.org/show_bug.cgi?id=30513. Change order of initialization
+ to match spec wording.
+ * html/HTMLMediaElement.h: Remove enqueueEvent prototype.
+
+2010-01-07 Kim Grönholm <kim.gronholm@nomovok.com>
+
+ Reviewed by Antti Koivisto.
+
+ Wrong state and TouchLists in TouchEvents
+ https://bugs.webkit.org/show_bug.cgi?id=32878
+
+ Touch events changed to match the API and semantics of iPhone and
+ Android. Each new touch point press dispatches a touchstart event with
+ the pressed touch point(s) in the changedTouches list, and a release
+ dispatches a touchend event with the released touch point(s) in
+ changedTouches. Moved points dispatch a touchmove event, with the moved
+ points in changedTouches. Old behaviour emitted only one touchstart when
+ the first point was pressed and one touchend when the last point was
+ released, and any events in between were touchmoves. New presses or
+ releases could only be detected by comparing the lists touches and
+ changedTouches.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleTouchEvent):
+ * page/EventHandler.h:
+
+2010-01-07 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Remove COM code generation stuff.
+ https://bugs.webkit.org/show_bug.cgi?id=32854
+
+ Remove the followings:
+ - CodeGeenratorCOM.pm, COM code generator,
+ - "#if !defined(LANGUAGE_COM) || !LANGUAGE_COM" in IDL files, and
+ - UUID attributes in IDL files.
+
+ * bindings/scripts/CodeGeneratorCOM.pm: Removed.
+ * css/CSSCharsetRule.idl:
+ * css/CSSFontFaceRule.idl:
+ * css/CSSImportRule.idl:
+ * css/CSSMediaRule.idl:
+ * css/CSSPageRule.idl:
+ * css/CSSPrimitiveValue.idl:
+ * css/CSSRule.idl:
+ * css/CSSRuleList.idl:
+ * css/CSSStyleDeclaration.idl:
+ * css/CSSStyleRule.idl:
+ * css/CSSStyleSheet.idl:
+ * css/CSSUnknownRule.idl:
+ * css/CSSValue.idl:
+ * css/CSSValueList.idl:
+ * css/Counter.idl:
+ * css/MediaList.idl:
+ * css/RGBColor.idl:
+ * css/Rect.idl:
+ * css/StyleSheet.idl:
+ * css/StyleSheetList.idl:
+ * css/WebKitCSSKeyframeRule.idl:
+ * css/WebKitCSSKeyframesRule.idl:
+ * css/WebKitCSSTransformValue.idl:
+ * dom/Attr.idl:
+ * dom/CDATASection.idl:
+ * dom/CharacterData.idl:
+ * dom/Comment.idl:
+ * dom/DOMImplementation.idl:
+ * dom/Document.idl:
+ * dom/DocumentFragment.idl:
+ * dom/DocumentType.idl:
+ * dom/Element.idl:
+ * dom/Entity.idl:
+ * dom/EntityReference.idl:
+ * dom/Event.idl:
+ * dom/EventListener.idl:
+ * dom/EventTarget.idl:
+ * dom/NamedNodeMap.idl:
+ * dom/Node.idl:
+ * dom/NodeList.idl:
+ * dom/Notation.idl:
+ * dom/ProcessingInstruction.idl:
+ * dom/Text.idl:
+ * html/HTMLAnchorElement.idl:
+ * html/HTMLAppletElement.idl:
+ * html/HTMLAreaElement.idl:
+ * html/HTMLBRElement.idl:
+ * html/HTMLBaseElement.idl:
+ * html/HTMLBaseFontElement.idl:
+ * html/HTMLBlockquoteElement.idl:
+ * html/HTMLBodyElement.idl:
+ * html/HTMLButtonElement.idl:
+ * html/HTMLCanvasElement.idl:
+ * html/HTMLCollection.idl:
+ * html/HTMLDListElement.idl:
+ * html/HTMLDirectoryElement.idl:
+ * html/HTMLDivElement.idl:
+ * html/HTMLDocument.idl:
+ * html/HTMLElement.idl:
+ * html/HTMLEmbedElement.idl:
+ * html/HTMLFieldSetElement.idl:
+ * html/HTMLFontElement.idl:
+ * html/HTMLFormElement.idl:
+ * html/HTMLFrameElement.idl:
+ * html/HTMLFrameSetElement.idl:
+ * html/HTMLHRElement.idl:
+ * html/HTMLHeadElement.idl:
+ * html/HTMLHeadingElement.idl:
+ * html/HTMLHtmlElement.idl:
+ * html/HTMLIFrameElement.idl:
+ * html/HTMLImageElement.idl:
+ * html/HTMLInputElement.idl:
+ * html/HTMLIsIndexElement.idl:
+ * html/HTMLLIElement.idl:
+ * html/HTMLLabelElement.idl:
+ * html/HTMLLegendElement.idl:
+ * html/HTMLLinkElement.idl:
+ * html/HTMLMapElement.idl:
+ * html/HTMLMarqueeElement.idl:
+ * html/HTMLMenuElement.idl:
+ * html/HTMLMetaElement.idl:
+ * html/HTMLModElement.idl:
+ * html/HTMLOListElement.idl:
+ * html/HTMLObjectElement.idl:
+ * html/HTMLOptGroupElement.idl:
+ * html/HTMLOptionElement.idl:
+ * html/HTMLOptionsCollection.idl:
+ * html/HTMLParagraphElement.idl:
+ * html/HTMLParamElement.idl:
+ * html/HTMLPreElement.idl:
+ * html/HTMLQuoteElement.idl:
+ * html/HTMLScriptElement.idl:
+ * html/HTMLSelectElement.idl:
+ * html/HTMLStyleElement.idl:
+ * html/HTMLTableCaptionElement.idl:
+ * html/HTMLTableCellElement.idl:
+ * html/HTMLTableColElement.idl:
+ * html/HTMLTableElement.idl:
+ * html/HTMLTableRowElement.idl:
+ * html/HTMLTableSectionElement.idl:
+ * html/HTMLTextAreaElement.idl:
+ * html/HTMLTitleElement.idl:
+ * html/HTMLUListElement.idl:
+
+2010-01-07 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Adler.
+
+ Adds the ability to increase the delay used when scheduling layout.
+ https://bugs.webkit.org/show_bug.cgi?id=32875
+
+ No new tests possible.
+
+ * dom/Document.cpp: Modified.
+ (WebCore::Document::Document): Modified. Initializes extra layout delay to zero.
+ (WebCore::Document::minimumLayoutDelay): Modified. Adds extra layout delay when calculating minimum layout delay.
+ * dom/Document.h: Modified.
+ (WebCore::Document::setExtraLayoutDelay): Added. Sets the extra layout delay.
+
+2010-01-07 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Some IDL files lack "," separators for extended attributes.
+ https://bugs.webkit.org/show_bug.cgi?id=33190
+
+ To find such mistakes, IDLParser.pm rejects whitespace characters in
+ extended attribute names.
+
+ * bindings/scripts/IDLParser.pm:
+ parseExtendedAttributes rejects whitespace in a name.
+ * css/WebKitCSSTransformValue.idl: Add missing ",".
+ * dom/EventTarget.idl: ditto.
+
+2010-01-07 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fix an issue that CodeGeneratorV8.pm doesnt handle HasIndexGetter of
+ WebKitCSSTransformValue.idl correctly.
+ https://bugs.webkit.org/show_bug.cgi?id=33193
+
+ CodeGeneratorV8.pm doesn't handle inheritance very well and it
+ tried to refer v8WebKitCSSTransformValueIndexedPropertyGetter(),
+ which does not exist. Because WebKitCSSTransformValue inherits
+ CSSValueList and CSSValueList already has HadIndexGetter, we don't
+ need to do anything for WebKitCSSTransformValue about HasIndexGetter.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ Reset $hasGetter for WebKitCSSTransformValue.
+
+2010-01-07 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Do not return strings whose handles are in near death state (that means
+ they might be GCed) or just empty.
+ https://bugs.webkit.org/show_bug.cgi?id=31180
+
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::v8ExternalString):
+
+2010-01-06 MORITA Hajime <morrita@gmail.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVG background color on selected text goes wrong when text has
+ gradient stroke.
+ https://bugs.webkit.org/show_bug.cgi?id=33069
+
+ Introduced SVGTextPaintSubphase like as PaintPhase on html painting,
+ and paint background and foreground in separate subphase.
+
+ Test: svg/text/selection-background-color.xhtml
+
+ * rendering/SVGCharacterLayoutInfo.h:
+ (WebCore::SVGTextChunkWalker::SVGTextChunkWalker):
+ Added m_setupBackgroundCallback, m_setupForegroundCallback
+ (WebCore::SVGTextChunkWalker::setupBackground):
+ (WebCore::SVGTextChunkWalker::setupForeground):
+ Added.
+ * rendering/SVGInlineTextBox.cpp:
+ (WebCore::SVGInlineTextBox::paintCharacters):
+ pass SVGTextPaintInfo instead of SVGPaintServer
+ * rendering/SVGInlineTextBox.h:
+ (WebCore::SVGTextPaintSubphase):
+ (WebCore::SVGTextPaintInfo::SVGTextPaintInfo):
+ Added.
+ * rendering/SVGRootInlineBox.cpp:
+ (WebCore::SVGRootInlineBox::walkTextChunks):
+ Invoke setupBackground() and setupForeground()
+ (WebCore::SVGRootInlineBoxPaintWalker::chunkSetupBackgroundCallback):
+ (WebCore::SVGRootInlineBoxPaintWalker::chunkSetupForegroundCallback):
+ (WebCore::SVGRootInlineBoxPaintWalker::activePaintServer):
+ Added.
+ (WebCore::SVGRootInlineBoxPaintWalker::chunkSetupFillCallback):
+ (WebCore::SVGRootInlineBoxPaintWalker::chunkSetupStrokeCallback):
+ (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
+ (WebCore::SVGRootInlineBox::paint):
+
+2010-01-06 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Make windowsKeyCodeForKeyEvent() return correct key code for
+ numeric-pad arrow keys.
+ https://bugs.webkit.org/show_bug.cgi?id=33250
+
+ Test: fast/events/keydown-numpad-keys.html
+
+ * platform/qt/PlatformKeyboardEventQt.cpp:
+ (WebCore::windowsKeyCodeForKeyEvent):
+
+2009-10-18 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Dirk Schulze.
+
+ Improve DOM performance in large SVG files.
+ Check the dirty area before painting a path, which prevents unnecessary
+ clipping and changes to the GraphicsContext.
+ https://bugs.webkit.org/show_bug.cgi?id=30055
+
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::paint):
+
+2010-01-06 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Use a static HashMap for HTMLElement::tagPriority().
+ https://bugs.webkit.org/show_bug.cgi?id=33269
+
+ The prior code compares AtomicStringImpl pointers 18 times at
+ worst. This change avoids it.
+
+ No new tests because this is just a refactoring.
+
+ * html/HTMLElement.cpp:
+ (WebCore::Empty1IntHashTraits): A HashTraits to return 1 as the empty value.
+ (WebCore::initializeTagPriorityMap): Initialization of a static HashMap.
+ (WebCore::HTMLElement::tagPriority): Use the static HashMap created by initializeTagPriorityMap().
+ * html/HTMLElement.h:
+ (WebCore::HTMLElement::HTMLElement): Add an assertion about non-null localName().
+
+2010-01-06 Mike Belshe <mike@belshe.com>
+
+ Add a flag to the ResourceResponse for tracking if a request was
+ fetched via SPDY. This is plumbed through so that we can inform
+ a webpage via JavaScript if it was fecthed via the experimental
+ SPDY protocol.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33186
+
+ * platform/network/chromium/ResourceResponse.h:
+ (WebCore::ResourceResponse::wasFetchedViaSpdy):
+ (WebCore::ResourceResponse::setWasFetchedViaSpdy):
+
+2010-01-06 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Adam Treat.
+
+ [Qt] RenderTheme: Missing support for native sliders
+
+ https://bugs.webkit.org/show_bug.cgi?id=33122
+
+ Implement painting of native slider controls in RenderTheme
+ and unskip a couple of layout tests that are passing after
+ this change.
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::paintSliderTrack):
+ (WebCore::RenderThemeQt::adjustSliderTrackStyle):
+ (WebCore::RenderThemeQt::paintSliderThumb):
+ (WebCore::RenderThemeQt::adjustSliderThumbStyle):
+ (WebCore::RenderThemeQt::supportsFocus):
+ (WebCore::RenderThemeQt::adjustSliderThumbSize):
+ * platform/qt/RenderThemeQt.h:
+
+2010-01-06 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
+
+ Reviewed by Darin Adler.
+
+ Adjust incorrect comments after r40534.
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::markActiveObjectsForContext):
+
+2010-01-06 Fumitoshi Ukai <ukai@chromium.org>
+
+ Unreviewed build fix for chromium.
+ Add "bool V8WorkerContext::WebSocketEnabled()"
+
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::V8WorkerContext::WebSocketEnabled):
+
+2010-01-06 Fumitoshi Ukai <ukai@chromium.org>
+
+ Unreviewed build fix.
+ remove wrong assertion
+
+ * websockets/WorkerThreadableWebSocketChannel.cpp:
+ (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
+
+2010-01-06 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add WebSocket feature in Worker
+ https://bugs.webkit.org/show_bug.cgi?id=32214
+
+ Introduce ThreadableWebSocketChannel interface and add
+ WorkerThreadableWebSocketChannel for Worker.
+ WorkerThreadableWebSocketChannel uses WebSocketChannel in the
+ main thread, which is managed by Peer and communicated via Bridge.
+
+ Test: websocket/tests/workers/worker-simple.html
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSWebSocketConstructor.h:
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::webSocket):
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::convertEventTargetToV8Object):
+ * bindings/v8/custom/V8WebSocketCustom.cpp:
+ (WebCore::V8Custom::v8WebSocketConstructorCallback):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ * platform/CrossThreadCopier.cpp:
+ (WebCore::::copy):
+ * platform/CrossThreadCopier.h:
+ (WebCore::):
+ * websockets/ThreadableWebSocketChannel.cpp: Added.
+ * websockets/ThreadableWebSocketChannel.h: Added.
+ * websockets/ThreadableWebSocketChannelClientWrapper.h: Added.
+ * websockets/WebSocket.cpp:
+ (WebCore::WebSocket::connect):
+ (WebCore::WebSocket::didReceiveMessage):
+ * websockets/WebSocket.h:
+ * websockets/WebSocketChannel.h:
+ (WebCore::WebSocketChannel::refThreadableWebSocketChannel):
+ (WebCore::WebSocketChannel::derefThreadableWebSocketChannel):
+ * websockets/WebSocketChannelClient.h:
+ * websockets/WebSocketHandshake.h:
+ * websockets/WorkerThreadableWebSocketChannel.cpp: Added.
+ * websockets/WorkerThreadableWebSocketChannel.h: Added.
+ * workers/WorkerContext.idl:
+
+2010-01-06 Adam Bergkvist <adam.bergkvist@ericsson.com>
+
+ Reviewed by Darin Adler.
+
+ Modified EventSource event-stream parser to support a single CR as line ending.
+ https://bugs.webkit.org/show_bug.cgi?id=33207
+
+ * page/EventSource.cpp:
+ (WebCore::EventSource::EventSource):
+ (WebCore::EventSource::parseEventStream):
+ * page/EventSource.h:
+
+2010-01-06 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30883
+ [Gtk] Implement AtkText for HTML elements which contain text
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (getInterfaceMaskFromObject):
+ (getPangoLayoutForAtk):
+ (webkit_accessible_text_get_text):
+ * accessibility/gtk/AccessibilityObjectAtk.cpp:
+ (AccessibilityObject::accessibilityPlatformIncludesObject):
+
+2010-01-06 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/7488126> With text-rendering: optimizelegibility, sometimes lines run too long
+ https://bugs.webkit.org/show_bug.cgi?id=32794
+
+ Test: platform/mac/fast/text/line-breaking-with-kerning.html
+
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::findNextLineBreak): When kerning is enabled, include
+ the trailing space when measuring a word, then subtract its width. This
+ accounts for kerning between the last glyph of the word and the following space.
+
+2010-01-06 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Simon Fraser
+
+ Second step of:
+ <rdar://problem/6398111> Integrate hardware layers with out-of-process plug-ins layer hosting mechanism
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.h: Expose the CALayer of the plugin by adding -pluginLayer method.
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView pluginLayer]): Added.
+ * Plugins/WebNetscapePluginView.h: Expose the CALayer of the plugin by adding -pluginLayer method.
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView pluginLayer]): Added.
+
+2010-01-06 Adam Barth <abarth@webkit.org>
+
+ No review, rolling out r52877.
+ http://trac.webkit.org/changeset/52877
+ https://bugs.webkit.org/show_bug.cgi?id=33243
+
+ I screwed up landing this patch and only partially applied the patch I
+ was trying to land.
+
+ * bindings/ScriptControllerBase.cpp:
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::executeScriptInWorld):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::ScriptController):
+ (WebCore::ScriptController::~ScriptController):
+ (WebCore::ScriptController::updateSecurityOrigin):
+ (WebCore::ScriptController::evaluateInIsolatedWorld):
+ (WebCore::ScriptController::haveInterpreter):
+ (WebCore::ScriptController::mainWorldWindowShell):
+ (WebCore::ScriptController::clearWindowShell):
+ (WebCore::ScriptController::clearForClose):
+ (WebCore::ScriptController::destroyWindowShell):
+ (WebCore::ScriptController::updateDocument):
+ * bindings/v8/ScriptController.h:
+ (WebCore::ScriptController::proxy):
+ (WebCore::ScriptController::windowShell):
+ (WebCore::ScriptController::existingWindowShell):
+ (WebCore::ScriptController::evaluateInWorld):
+ * bindings/v8/V8DOMWindowShell.cpp:
+ (WebCore::V8DOMWindowShell::create):
+ (WebCore::V8DOMWindowShell::V8DOMWindowShell):
+ (WebCore::V8DOMWindowShell::initContextIfNeeded):
+
+2010-01-06 Eric Seidel <eric@webkit.org>
+
+ Unreviewed. Rolling back in a change I should not have rolled out.
+
+ The original commit http://trac.webkit.org/changeset/52862
+ was rolled out again in http://trac.webkit.org/changeset/52871
+ but I now believe that rollout to be in error.
+ My sincerest apologies for the churn.
+
+ Fix the bug in previous commit: we shouldn't finish
+ decoding if "sizeOnly" is true.
+ https://bugs.webkit.org/show_bug.cgi?id=33258
+
+ * platform/image-decoders/png/PNGImageDecoder.cpp:
+ (WebCore::PNGImageReader::decode):
+
+2010-01-06 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [v8] Let ScriptController have more than one windowShell
+ https://bugs.webkit.org/show_bug.cgi?id=33243
+
+ This patch lets ScriptController have more than one windowShell. We're
+ currently only using one of them (for the main world), but this patch
+ lets us use other ones for isolated worlds soon.
+
+ * bindings/ScriptControllerBase.cpp:
+ (WebCore::ScriptController::executeScriptInWorld):
+ * bindings/js/ScriptController.cpp:
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::createWorld):
+ (WebCore::ScriptController::initScript):
+ (WebCore::ScriptController::ScriptController):
+ (WebCore::ScriptController::~ScriptController):
+ (WebCore::ScriptController::updateSecurityOrigin):
+ (WebCore::ScriptController::evaluateInIsolatedWorld):
+ (WebCore::ScriptController::evaluateInWorld):
+ (WebCore::ScriptController::mainWorldWindowShell):
+ (WebCore::ScriptController::clearWindowShell):
+ (WebCore::ScriptController::clearForClose):
+ (WebCore::ScriptController::destroyWindowShell):
+ (WebCore::ScriptController::updateDocument):
+ * bindings/v8/ScriptController.h:
+ (WebCore::ScriptController::windowShell):
+ (WebCore::ScriptController::existingWindowShell):
+ (WebCore::ScriptController::globalObject):
+ (WebCore::ScriptController::proxy):
+ * bindings/v8/V8DOMWindowShell.cpp:
+ (WebCore::V8DOMWindowShell::create):
+ (WebCore::V8DOMWindowShell::V8DOMWindowShell):
+ (WebCore::V8DOMWindowShell::initContextIfNeeded):
+ * bindings/v8/V8DOMWindowShell.h:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ (WebCore::V8DOMWrapper::convertNewNodeToV8Object):
+
+2010-01-06 Mark Rowe <mrowe@apple.com>
+
+ Fix the Mac build.
+
+ * WebCore.base.exp: Export symbols WebKit would like to use.
+ * plugins/PluginWidget.h:
+ (WebCore::PluginWidget::PluginWidget): Redeclare a constructor.
+
+2010-01-06 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ First step toward:
+ <rdar://problem/6398111> Integrate hardware layers with out-of-process plug-ins layer hosting mechanism
+
+ Small refactoring moving the PluginWidget class from WebKit to WebCore.
+ * WebCore.xcodeproj/project.pbxproj: Added new source files and a "mac" group; exposes PluginWidget.h as a "Private" role
+ * platform/Widget.h: Added isPluginWidget().
+ (WebCore::Widget::isPluginWidget):
+ * plugins/PluginWidget.h: Added.
+ (WebCore::PluginWidget::isPluginWidget): Added as an interim solution until Mac plug-ins inheirt from PluginView.
+ * plugins/mac/PluginWidgetMac.mm: Added.
+ (WebCore::PluginWidget::invalidateRect): Added. Extracted from the old WebKit/FrameLoaderClientMac version of PluginWidget
+
+2010-01-06 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r52862.
+ http://trac.webkit.org/changeset/52862
+ https://bugs.webkit.org/show_bug.cgi?id=33258
+
+ Caused svg/W3C-SVG-1.1/linking-a-01-b.svg to crash on the
+ Leopard Release builder.
+
+ * platform/image-decoders/png/PNGImageDecoder.cpp:
+ (WebCore::PNGImageReader::decode):
+
+2010-01-06 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Revert the part of my last commit touching Base.xcconfig, was not meant to be commited.
+
+ * Configurations/Base.xcconfig:
+
+2010-01-05 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Generate header declarations for V8 binding security checks
+ and delete V8CustomBinding.cpp
+
+ * Android.v8bindings.mk: Removed V8CustomBinding.cpp.
+ * WebCore.gypi: Removed V8CustomBinding.cpp.
+ * bindings/scripts/CodeGeneratorV8.pm: Generate security check declarations.
+ * bindings/v8/V8DOMWindowShell.cpp:
+ (WebCore::getTargetFrame): Moved from V8CustomBinding.cpp.
+ (WebCore::reportUnsafeJavaScriptAccess):
+ (WebCore::V8DOMWindowShell::createNewContext):
+ (WebCore::V8DOMWindowShell::setLocation): Moved from V8CustomBinding.cpp.
+ * bindings/v8/V8DOMWindowShell.h:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::downcastSVGPathSeg): Moved from V8CustomBinding.cpp.
+ (WebCore::V8DOMWrapper::convertSVGObjectWithContextToV8Object):
+ (WebCore::V8DOMWrapper::getTemplate):
+ * bindings/v8/custom/V8CustomBinding.cpp: Removed.
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8DOMWindow::locationAccessorSetter):
+ (WebCore::V8DOMWindow::namedSecurityCheck):
+ (WebCore::V8DOMWindow::indexedSecurityCheck):
+ * bindings/v8/custom/V8DocumentLocationCustom.cpp:
+ (WebCore::V8Document::locationAccessorSetter):
+ * bindings/v8/custom/V8HistoryCustom.cpp:
+ (WebCore::V8History::indexedSecurityCheck):
+ (WebCore::V8History::namedSecurityCheck):
+ * bindings/v8/custom/V8LocationCustom.cpp:
+ (WebCore::V8Location::indexedSecurityCheck):
+ (WebCore::V8Location::namedSecurityCheck):
+
+2010-01-06 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Marker code is buggy: referencePoint translation is off
+ https://bugs.webkit.org/show_bug.cgi?id=33012
+
+ Rewrite marker code, as it had many issues:
+ - Correct refX/refY handling (covered by new marker-referencePoint.svg test)
+ - Calculate marker bounds on layout time, instead of paint time, to deliver correct repaint rects
+ - Cleanup RenderPath code, which was cluttered by marker stuff (outlay in SVGMarkerLayoutInfo)
+ - Fix SVGResource assuming that there is only one resource per resource type per element. Markers
+ can have three different resources of the same type (three markers, start/mid/end markers)
+
+ Filed bug 33115 (PathElementAddQuadCurveToPoint not handled for <marker>), which was just a TODO in the code before.
+
+ Fixes all svg/custom/marker*.svg tests, that use dynamic updates (propagation failed before).
+ Test: svg/custom/marker-referencePoint.svg
+ svg/custom/marker-opacity.svg
+ svg/custom/marker-strokeWidth-changes.svg
+
+ * Android.mk: Add SVGMarkerData.h / SVGMarkerLayoutInfo.(cpp,h) to build.
+ * GNUmakefile.am: Ditto.
+ * WebCore.gypi: Ditto.
+ * WebCore.pro: Ditto.
+ * WebCore.vcproj/WebCore.vcproj: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * page/FrameView.cpp: Notify RenderSVGRoot children about viewport size changes, just like it's handled for <body> in HTML.
+ (WebCore::FrameView::layout): This is important, as marker bounding boxes may depend on the current viewport size through relative coordinates used in <svg>.
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::markerBoundingBox): Calculates and caches marker boundaries in the layout() phase.
+ (WebCore::RenderPath::repaintRectInLocalCoordinates): Use the cached marker bounding box during paint() time.
+ (WebCore::RenderPath::setPath): Clear marker boundaries upon path changes.
+ (WebCore::RenderPath::paint): Use SVGMarkerLayoutInfo::drawMarkers() instead of the local drawMarkersIfNeeded() function, which is gone now.
+ (WebCore::RenderPath::calculateMarkerBoundsIfNeeded): Utilized by markerBoundingBox() to request SVGResourceMarker objects and calculate their boundaries.
+ * rendering/RenderPath.h: Store SVGMarkerLayoutInfo objects, and rename m_markerBounds to m_cachedLocalMarkerBBox for consistency.
+ (WebCore::RenderPath::path): Inline this accessor.
+ * rendering/RenderSVGContainer.h: Make paint() public (to be used from SVGResourceMarker), all other methods protected (to be used from RenderSVGViewportContainer).
+ * rendering/RenderSVGViewportContainer.cpp: Remove useless paint() override, as the comment in the code indicated.
+ (WebCore::RenderSVGViewportContainer::markerBoundaries): Maps the marker contents repaintRectInLocalCoordinates() into the final coordinate system (see code).
+ (WebCore::RenderSVGViewportContainer::markerContentTransformation): Add marker-specific helper method, allowing to make viewportTransform() private again.
+ * rendering/RenderSVGViewportContainer.h: Marking viewportTransform() private, it's never meant to be used outside this renderer.
+ * rendering/SVGMarkerData.h: Added. Refactored from existing RenderPath code, preserving original copyrights.
+ (WebCore::SVGMarkerData::): Helper struct for SVGMarkerLayoutInfo.
+ (WebCore::SVGMarkerData::origin): Holds the final computed destination of a marker.
+ (WebCore::SVGMarkerData::marker): Holds a pointer to the associated SVGResourceMarker object, which we're aiming to layout.
+ (WebCore::SVGMarkerData::currentAngle): Calculates the current angle for a certain marker type (start/mid/end) based upon the computed inslope/outslope values.
+ (WebCore::SVGMarkerData::updateTypeAndMarker): Helper method.
+ (WebCore::SVGMarkerData::updateOutslope): Ditto.
+ (WebCore::SVGMarkerData::updateMarkerDataForPathElement): Does the actual inslope/outslope calculation.
+ (WebCore::SVGMarkerData::updateInslope): Helper method.
+ * rendering/SVGMarkerLayoutInfo.cpp: Added. New approach to build marker layout info, this time correct during layout() time instead of paint() time.
+ (WebCore::SVGMarkerLayoutInfo::SVGMarkerLayoutInfo):
+ (WebCore::SVGMarkerLayoutInfo::~SVGMarkerLayoutInfo):
+ (WebCore::processStartAndMidMarkers): Static helper method used to visit each path element in order to calculate inslopes/outslopes (-> orientation angles)
+ (WebCore::SVGMarkerLayoutInfo::calculateBoundaries): Build list of MarkerLayout objects, used to query boundaries, and to paint markers during drawMarkers().
+ (WebCore::SVGMarkerLayoutInfo::drawMarkers): Cheap method walking existing MarkerLayout vector, drawing the individual RenderSVGViewportContainer of the markers.
+ (WebCore::SVGMarkerLayoutInfo::addLayoutedMarker): Helper method.
+ * rendering/SVGMarkerLayoutInfo.h: Added.
+ (WebCore::MarkerLayout::MarkerLayout): Helper struct storing a pair of SVGResourceMarker* and a TranformationMatrix.
+ (WebCore::SVGMarkerLayoutInfo::markerData): Public helper methods returning references to private member variables, used from processStartAndMidMarkers.
+ (WebCore::SVGMarkerLayoutInfo::midMarker): Ditto.
+ (WebCore::SVGMarkerLayoutInfo::elementIndex): Ditto.
+ * svg/SVGMarkerElement.cpp: Adopt to name change: setRef() -> setReferencePoint(). setMarker() -> setRenderer()
+ (WebCore::SVGMarkerElement::~SVGMarkerElement): Remove obsolete detach() hack, fixed by SVGUseElement changes.
+ (WebCore::SVGMarkerElement::canvasResource): Add ASSERT(renderer()) to clarify that canvasResource() is only meant to used after renderer creation.
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::~SVGSVGElement): Remove obsolete detach() hack, fixed by SVGUseElement changes.
+ * svg/SVGUseElement.cpp: Rework buildPendingResource() to remove SVGSVGElement/SVGMarkerElement detach() hacks (called manually from destructors), see below.
+ (WebCore::SVGUseElement::buildPendingResource): Always detach() the shadow tree root element, before destructing it - this caused the regression with this patch before.
+ * svg/graphics/SVGResource.cpp: Instead of maintaining a global hashmap between SVGStyledElements and an array of possible SVGResources, use a HashSet of SVGResources
+ and directly scan the already existing list of clients for a certain SVGResource. This wrong approach has been introduced over two years
+ ago, making the assumption that there's only one resource type per element. Though markers can provide three resources of the same type
+ per element (all SVGResourceMarker objects, but in different rules: start/mid/end marker). That information is only available while painting.
+ (WebCore::resourceSet): Add global static HashSet<SVGResource*>.
+ (WebCore::SVGResource::SVGResource): Add us to the resourceSet.
+ (WebCore::SVGResource::~SVGResource): Remove us from resourceSet.
+ (WebCore::SVGResource::removeClient): Traverse all SVGResource clients and remove the passed SVGStyledElement from the client list (invoked by SVGStyledElement destructor).
+ (WebCore::SVGResource::addClient): Remove the offending part of the old approach, making the wrong assumption regarding resource types.
+ * svg/graphics/SVGResourceMarker.cpp:
+ (WebCore::SVGResourceMarker::SVGResourceMarker):
+ (WebCore::SVGResourceMarker::markerTransformation): Create TransformationMatrix in the local marker content (RenderSVGViewportContainer) coordinate system, to position a marker.
+ (WebCore::SVGResourceMarker::draw): Simplify marker drawing a lot: used the passing TransformationMatrix (cached in SVGMarkerLayoutInfo) to draw the marker content renderer.
+ (WebCore::SVGResourceMarker::externalRepresentation): Adopt to refX/refY -> referencePoint changes.
+ * svg/graphics/SVGResourceMarker.h: Store a FloatPoint m_referecePoint instead of two refX/refY float values.
+ (WebCore::SVGResourceMarker::setRenderer): Renamed from setMarker().
+ (WebCore::SVGResourceMarker::setReferencePoint): Renamed from setRef().
+ (WebCore::SVGResourceMarker::referencePoint): New accessor replacing refX() / refY().
+
+2010-01-06 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVG feImage support
+ https://bugs.webkit.org/show_bug.cgi?id=31905
+
+ This implements the SVG Filter effect feImage with support of fragment urls.
+ It also includes a bug fix for feComposite. feComposite didn't cover values
+ bigger than 255 correctly on composite oeprator arithmetic.
+
+ Tests: There are already many feImage tests in trunk. They just needed updated
+ pixel test results.
+ The feComposite bug is covered by svg/W3C-SVG-1.1/filters-composite-02-b.svg
+ and depends on feImage.
+
+ * platform/graphics/filters/FEComposite.cpp:
+ (WebCore::arithmetic):
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::paint):
+ * rendering/RenderSVGImage.h:
+ * svg/SVGFEImageElement.cpp:
+ (WebCore::SVGFEImageElement::requestImageResource):
+ (WebCore::SVGFEImageElement::parseMappedAttribute):
+ (WebCore::SVGFEImageElement::notifyFinished):
+ (WebCore::SVGFEImageElement::build):
+ * svg/SVGFEImageElement.h:
+ * svg/SVGFEImageElement.idl:
+ * svg/SVGPreserveAspectRatio.cpp:
+ (WebCore::SVGPreserveAspectRatio::transformRect):
+ * svg/SVGPreserveAspectRatio.h:
+ * svg/graphics/filters/SVGFEImage.cpp:
+ (WebCore::FEImage::FEImage):
+ (WebCore::FEImage::create):
+ (WebCore::FEImage::apply):
+ * svg/graphics/filters/SVGFEImage.h:
+
+2010-01-06 Yong Li <yoli@rim.com>
+
+ Reviewed by Darin Adler.
+
+ Fix the bug in previous commit: we shouldn't finish
+ decoding if "sizeOnly" is true.
+ https://bugs.webkit.org/show_bug.cgi?id=33258
+
+ * platform/image-decoders/png/PNGImageDecoder.cpp:
+ (WebCore::PNGImageReader::decode):
+
+2010-01-06 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r52855.
+ http://trac.webkit.org/changeset/52855
+ https://bugs.webkit.org/show_bug.cgi?id=33222
+
+ Caused 6 layout tests to fail on Mac
+
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::continueAfterContentPolicy):
+ * loader/ResourceLoader.cpp:
+ * loader/ResourceLoader.h:
+
+2010-01-06 Yong Li <yoli@rim.com>
+
+ Reviewed by Darin Adler.
+
+ Let ReourceLoader deliver segmented data
+ when loading resource from a SharedBuffer object.
+ https://bugs.webkit.org/show_bug.cgi?id=33222
+
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::continueAfterContentPolicy):
+ * loader/ResourceLoader.cpp:
+ (WebCore::ResourceLoader::didReceiveData):
+ * loader/ResourceLoader.h:
+
+2010-01-06 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Unreviewed trivial Qt build fix.
+
+ Prefix the phonon includes with phonon/ to avoid conflicts with the S60
+ audio routing API ( http://wiki.forum.nokia.com/index.php/Audio_Routing_API ).
+
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
+
+2010-01-05 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Moving v8::HandleScope up above declaration of v8::Local to fix a
+ Chromium startup crash.
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::setContextDebugId):
+
+2010-01-05 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [v8] Move V8DOMWindowShell to ScriptController
+ https://bugs.webkit.org/show_bug.cgi?id=33232
+
+ This patch moves V8DOMWindow shell to ScriptController, where the
+ window shells live in JSC land. The next step will be to allow for
+ more than one window shell per script controller.
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::ScriptController):
+ (WebCore::ScriptController::~ScriptController):
+ (WebCore::ScriptController::updateSecurityOrigin):
+ (WebCore::ScriptController::evaluateInIsolatedWorld):
+ (WebCore::ScriptController::haveInterpreter):
+ (WebCore::ScriptController::mainWorldWindowShell):
+ (WebCore::ScriptController::clearWindowShell):
+ (WebCore::ScriptController::clearForClose):
+ (WebCore::ScriptController::destroyWindowShell):
+ (WebCore::ScriptController::updateDocument):
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/V8DOMWindowShell.cpp:
+ (WebCore::V8DOMWindowShell::~V8DOMWindowShell):
+ * bindings/v8/V8DOMWindowShell.h:
+ (WebCore::V8DOMWindowShell::localHandleForContext):
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ (WebCore::V8DOMWrapper::convertDocumentToV8Object):
+ (WebCore::V8DOMWrapper::convertNewNodeToV8Object):
+ * bindings/v8/V8IsolatedContext.cpp:
+ (WebCore::V8IsolatedContext::V8IsolatedContext):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::V8Proxy):
+ (WebCore::V8Proxy::~V8Proxy):
+ (WebCore::V8Proxy::handleOutOfMemory):
+ (WebCore::V8Proxy::evaluateInIsolatedWorld):
+ (WebCore::V8Proxy::setInjectedScriptContextDebugId):
+ (WebCore::V8Proxy::context):
+ (WebCore::V8Proxy::mainWorldContext):
+ (WebCore::V8Proxy::currentContext):
+ (WebCore::V8Proxy::setContextDebugId):
+ * bindings/v8/V8Proxy.h:
+ * bindings/v8/WorldContextHandle.cpp:
+ (WebCore::WorldContextHandle::adjustedContext):
+
+2010-01-05 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Implement HTML5 <header> and <footer> elements.
+ https://bugs.webkit.org/show_bug.cgi?id=32943
+
+ <header> and <footer> should behave the same as <nav>, <section>,
+ <article>, and <aside>. The HTML parser doesn't need to restrict
+ the nesting of header/footer elements.
+
+ Tests: fast/html/footer-element.html
+ fast/html/header-element.html
+
+ * css/html.css: Add header/footer as block elements.
+ * editing/htmlediting.cpp:
+ (WebCore::validBlockTag): Add headerTag and footerTag.
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::tagPriority): Returns 5 for headerTag and footerTag.
+ (WebCore::blockTagList): Add headerTag and footerTag.
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::handleError): Rename isHeaderTag() to isHeadingTag()
+ (WebCore::HTMLParser::getNode): Add headerTag and footerTag.
+ (WebCore::HTMLParser::isHeadingTag): Renamed from isHeaderTag().
+ * html/HTMLParser.h:
+ - Rename isHeaderTag() to isHeadingTag()
+ - Remove non-existing popNestedHeaderTag().
+ * html/HTMLTagNames.in: Add header and footer.
+
+2010-01-05 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ CDATA sections are merged into Text nodes when normalize() is used
+ https://bugs.webkit.org/show_bug.cgi?id=33191
+
+ Test: fast/dom/Node/normalize-with-cdata.html
+
+ * dom/Node.cpp:
+ (WebCore::Node::normalize): Use nodeType instead of isTextNode.
+
+2010-01-05 James Robinson <jamesr@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Typing in Google Wave repaints the whole screen
+ https://bugs.webkit.org/show_bug.cgi?id=32295
+
+ Marks a RenderBlock without block children for layout and painting when it has no line boxes only if it has inline immediate children.
+ The existing logic uses the existence of line boxes as a dirty flag to indicate that line boxes need to be regenerated. This heuristic
+ fails when the RenderBlock does not have any in-flow children at all, causing the RenderBlock to get unnecessarily marked for layout and
+ painting. This is particularly bad for common scrollbar manipulation tricks like putting one positioned div inside another - this
+ structure caused the entire outer div's bounds to get scheduled for a paint whenever there was any mutation of any descendant.
+
+ Test: LayoutTests/fast/repaint/block-no-inline-children.html (only shows up in pixel tests)
+
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::layoutInlineChildren):
+
+2010-01-05 James Robinson <jamesr@chromium.org>
+
+ Reviewed by David Hyatt.
+
+ Cleans up line box clearing when a RenderBlock loses its last child.
+ https://bugs.webkit.org/show_bug.cgi?id=33228
+
+ The 'fullLayout' flag in RenderBlock::layoutInlineChildren() is pretty vague, hopefully this will be easier for the next person to figure out.
+
+
+ No new tests.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::removeChild):
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::layoutInlineChildren):
+
+2010-01-05 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Provide the "documentURL" property for documents and frame owner elements
+
+ This is necessary to determine owner document URLs for nodes (all nodes have
+ the top-level document set as ownerDocument).
+ https://bugs.webkit.org/show_bug.cgi?id=33025
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::buildObjectForNode):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMNode):
+
+2010-01-05 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Adam Barth.
+
+ Public GIF decoder should stop decoding when allocation fails
+ https://bugs.webkit.org/show_bug.cgi?id=33231
+
+ * platform/image-decoders/gif/GIFImageDecoder.cpp:
+ (WebCore::GIFImageDecoder::haveDecodedRow):
+ * platform/image-decoders/gif/GIFImageDecoder.h:
+ * platform/image-decoders/gif/GIFImageReader.cpp:
+ (GIFImageReader::output_row):
+ (GIFImageReader::do_lzw):
+ (GIFImageReader::read):
+ * platform/image-decoders/gif/GIFImageReader.h:
+
+2010-01-05 Yong Li <yoli@rim.com>
+
+ Reviewed by Darin Adler.
+
+ Make PNG image decoder work with segmented SharedBuffer
+ https://bugs.webkit.org/show_bug.cgi?id=33213
+
+ * platform/image-decoders/ImageDecoder.cpp:
+ (WebCore::ImageDecoder::create):
+ * platform/image-decoders/ImageDecoder.h:
+ (WebCore::ImageDecoder::ImageDecoder):
+ (WebCore::ImageDecoder::isAllDataReceived):
+ (WebCore::ImageDecoder::setData):
+ * platform/image-decoders/png/PNGImageDecoder.cpp:
+ (WebCore::PNGImageReader::PNGImageReader):
+ (WebCore::PNGImageReader::close):
+ (WebCore::PNGImageReader::currentBufferSize):
+ (WebCore::PNGImageReader::setComplete):
+ (WebCore::PNGImageReader::decode):
+ (WebCore::PNGImageDecoder::decode):
+ (WebCore::PNGImageDecoder::headerAvailable):
+ (WebCore::PNGImageDecoder::pngComplete):
+
+2010-01-05 Adam Barth <abarth@webkit.org>
+
+ Rubber stamped by Dimitri Glazkov.
+
+ Fix namespace indent for ScriptController.
+
+ * bindings/v8/ScriptController.h:
+ (WebCore::ScriptController::proxy):
+ (WebCore::ScriptController::windowShell):
+ (WebCore::ScriptController::existingWindowShell):
+ (WebCore::ScriptController::xssAuditor):
+ (WebCore::ScriptController::setProcessingTimerCallback):
+ (WebCore::ScriptController::setPaused):
+ (WebCore::ScriptController::isPaused):
+ (WebCore::ScriptController::sourceURL):
+ (WebCore::ScriptController::evaluateInWorld):
+
+2010-01-05 Rachel Petterson <rlp@google.com>
+
+ Reviewed by Simon Fraser.
+
+ Implement most cases of texImage2D and texSubImage2D
+ https://bugs.webkit.org/show_bug.cgi?id=31562
+
+ This fix is with Chris Marrin <cmarrin@apple.com>.
+ Also bug: https://bugs.webkit.org/show_bug.cgi?id=31493
+
+ From Chris:
+ This implements all cases except HTMLVideoElement. It changes
+ the bindings to accept all parameter forms of the call. Then
+ it plumbs the calls through WebGLRenderingContext down to
+ GraphicsContext3D for the actual implementation.
+
+ From Rachel:
+ This implements texImage2D for chromium. It also implements the V8
+ bindings for texSubImage2D and updates the V8 bindings for texImage2D.
+
+ Tests: fast/canvas/webgl/texImage2DImageDataTest.html
+ fast/canvas/webgl/texImageTest.html
+
+ * bindings/js/JSWebGLRenderingContextCustom.cpp:
+ (WebCore::JSWebGLRenderingContext::texImage2D):
+ (WebCore::JSWebGLRenderingContext::texSubImage2D):
+ * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::texImage2D):
+ (WebCore::WebGLRenderingContext::texSubImage2D):
+ * html/canvas/WebGLRenderingContext.h:
+ * html/canvas/WebGLRenderingContext.idl:
+ * platform/graphics/GraphicsContext3D.h:
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::imageToTexture):
+ (WebCore::GraphicsContext3D::texImage2D):
+ (WebCore::GraphicsContext3D::texSubImage2D):
+
+2010-01-04 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Part of <https://bugs.webkit.org/show_bug.cgi?id=32568>.
+ Web Inspector: Context Menus should be used in more places.
+
+ Add context menus to handle the interaction with breakpoints in the Source Frame. Currently
+ we use left click to add/disable/remove breakpoints, and left click to edit (for conditional
+ breakpoints), but this is hard to discover and behaves differently than Xcode.
+
+ Change the behavior to be more like Xcode, left click adds a breakpoint if there isn't one, and
+ removes it if there is one.
+
+ On the context menu, if there is no breakpoint there, we have Add Breakpoint, and Add Conditional
+ Breakpoint. If there is a breakpoint there, we add entries for Edit Breakpoint (edit
+ the condition), Remove Breakpoint, and Enable/Disable Breakpoint (based on the current state).
+
+ * English.lproj/localizedStrings.js: Added localized context menu entries.
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._documentContextMenu.addAndEditBreakpoint):
+ (WebInspector.SourceFrame.prototype._documentContextMenu): Added context menu entries and handlers.
+ (WebInspector.SourceFrame.prototype._documentMouseDown): Changed left click behavior (Add -> Remove).
+
+2010-01-05 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ AX: need a way to get the progress of a webpage load
+ https://bugs.webkit.org/show_bug.cgi?id=33221
+
+ Test: platform/mac/accessibility/estimated-progress.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::estimatedLoadingProgress):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::estimatedLoadingProgress):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+
+2010-01-05 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Drag & drop layout tests fail even when run manually
+ https://bugs.webkit.org/show_bug.cgi?id=33055
+
+ No new tests. Fix 3 layout tests when run manually.
+ fast/events/drag-and-drop.html
+ fast/events/drag-and-drop-dataTransfer-types-nocrash.html
+ fast/events/drag-and-drop-fire-drag-dragover.html
+ Running these tests in DRT will be fixed in 31332.
+
+ * page/qt/DragControllerQt.cpp:
+ (WebCore::DragController::cleanupAfterSystemDrag):
+ Cleanup the drag operation if it failed to complete,
+ Otherwise, new drag operations will not be possible.
+
+2010-01-05 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Xan Lopez.
+
+ Based on idea and original patch by Evan Martin.
+
+ Remove libWebCore intermediate library, to improve link time.
+
+ [GTK] Build time must be reduced
+ https://bugs.webkit.org/show_bug.cgi?id=32921
+
+ * GNUmakefile.am:
+
+2010-01-05 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Move allowSetting{Frame}SrcToJavascriptUrl from V8Custom to BindingSecurity and
+ remove the v8-specific pieces.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33182
+
+ * bindings/BindingSecurity.h:
+ (WebCore::::allowSettingFrameSrcToJavascriptUrl): Moved from V8CustomBinding.cpp.
+ (WebCore::::allowSettingSrcToJavascriptURL): Moved from V8CustomBinding.cpp.
+ * bindings/v8/custom/V8AttrCustom.cpp:
+ (WebCore::V8Attr::valueAccessorSetter):
+ * bindings/v8/custom/V8CustomBinding.cpp:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8ElementCustom.cpp:
+ (WebCore::V8Element::setAttributeCallback):
+ (WebCore::V8Element::setAttributeNodeCallback):
+ (WebCore::V8Element::setAttributeNSCallback):
+ (WebCore::V8Element::setAttributeNodeNSCallback):
+ * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
+ (WebCore::V8HTMLFrameElement::srcAccessorSetter):
+ (WebCore::V8HTMLFrameElement::locationAccessorSetter):
+ * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
+ (WebCore::V8HTMLIFrameElement::srcAccessorSetter):
+
+2010-01-05 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Separate DOMWrapperWorld from V8IsolatedWorld
+ https://bugs.webkit.org/show_bug.cgi?id=33087
+
+ This change separate DOMWrapperWorld and IsolatedWorld from
+ V8IsolatedWorld. I've also renamed V8IsolatedWorld to
+ V8IsolatedContext in preparation for having more than one context in a
+ single isolated world.
+
+ This patch moves us closer to two goals:
+ 1) Matching the structure of the JSC implementation of isolated worlds.
+ 2) Letting scripts running in isolated contexts see into other iframes
+ (which requires having more than one context in an isolated world.)
+
+ * WebCore.gypi:
+ * bindings/v8/DOMWrapperWorld.cpp: Added.
+ (WebCore::DOMWrapperWorld::DOMWrapperWorld):
+ (WebCore::mainThreadNormalWorld):
+ * bindings/v8/DOMWrapperWorld.h: Added.
+ (WebCore::DOMWrapperWorld::create):
+ * bindings/v8/IsolatedWorld.cpp: Added.
+ (WebCore::IsolatedWorld::IsolatedWorld):
+ (WebCore::IsolatedWorld::~IsolatedWorld):
+ * bindings/v8/IsolatedWorld.h: Added.
+ (WebCore::IsolatedWorld::create):
+ (WebCore::IsolatedWorld::count):
+ (WebCore::IsolatedWorld::domDataStore):
+ * bindings/v8/MainThreadDOMData.cpp:
+ (WebCore::MainThreadDOMData::getMainThreadStore):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::currentScriptState):
+ * bindings/v8/ScriptState.cpp:
+ * bindings/v8/ScriptState.h:
+ * bindings/v8/V8DOMWindowShell.cpp:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ * bindings/v8/V8IsolatedContext.cpp: Copied from WebCore/bindings/v8/V8IsolatedWorld.cpp.
+ (WebCore::V8IsolatedContext::contextWeakReferenceCallback):
+ (WebCore::V8IsolatedContext::V8IsolatedContext):
+ (WebCore::V8IsolatedContext::destroy):
+ (WebCore::V8IsolatedContext::~V8IsolatedContext):
+ (WebCore::V8IsolatedContext::scriptState):
+ * bindings/v8/V8IsolatedContext.h: Copied from WebCore/bindings/v8/V8IsolatedWorld.h.
+ (WebCore::V8IsolatedContext::getEntered):
+ (WebCore::V8IsolatedContext::world):
+ * bindings/v8/V8IsolatedWorld.cpp: Removed.
+ * bindings/v8/V8IsolatedWorld.h: Removed.
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluateInIsolatedWorld):
+ (WebCore::V8Proxy::context):
+ * bindings/v8/V8Proxy.h:
+ * bindings/v8/WorldContextHandle.cpp:
+ (WebCore::WorldContextHandle::WorldContextHandle):
+
+2010-01-05 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Move createWindow into generic bindings so it can be shared with JSC
+ https://bugs.webkit.org/show_bug.cgi?id=33201
+
+ This patch moves createWindow from V8-specific code into the generic
+ bindings so that is can be re-used by the JavaScriptCore bindings. I
+ haven't actually moved the JSC bindings over to using this yet.
+
+ Also, I organized the generic bindings a bit more as it's becoming
+ clearer how things are going to shape up. There are still some
+ question marks, but hopefully the answers will become clear as we
+ progress.
+
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gypi:
+ * bindings/generic/BindingDOMWindow.h: Added.
+ (WebCore::::createWindow):
+ * bindings/generic/BindingSecurity.h: Renamed from WebCore/bindings/BindingSecurity.h.
+ (WebCore::BindingSecurity::BindingSecurity):
+ (WebCore::::canAccessWindow):
+ (WebCore::::canAccessFrame):
+ (WebCore::::checkNodeSecurity):
+ * bindings/generic/BindingSecurityBase.cpp: Renamed from WebCore/bindings/BindingSecurityBase.cpp.
+ (WebCore::BindingSecurityBase::getDOMWindow):
+ (WebCore::BindingSecurityBase::getFrame):
+ (WebCore::BindingSecurityBase::canAccess):
+ * bindings/generic/BindingSecurityBase.h: Renamed from WebCore/bindings/BindingSecurityBase.h.
+ * bindings/generic/GenericBinding.h: Renamed from WebCore/bindings/GenericBinding.h.
+ (WebCore::):
+ * bindings/v8/V8Binding.h:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8DOMWindow::showModalDialogCallback):
+ (WebCore::V8DOMWindow::openCallback):
+ * bindings/v8/specialization/V8BindingDOMWindow.h: Added.
+ (WebCore::V8BindingDOMWindow::storeDialogArgs):
+ * bindings/v8/specialization/V8BindingState.cpp: Renamed from WebCore/bindings/v8/V8BindingState.cpp.
+ (WebCore::::Only):
+ (WebCore::::getActiveWindow):
+ (WebCore::::immediatelyReportUnsafeAccessTo):
+ * bindings/v8/specialization/V8BindingState.h: Renamed from WebCore/bindings/v8/V8BindingState.h.
+ (WebCore::):
+
+2010-01-05 Dominic Mazzoni <dmazzoni@google.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32571
+
+ For an object with an aria role of "checkbox" or "radiobutton",
+ Use the "aria-checked" attribute to determine if it's checked.
+
+ Test: accessibility/aria-checkbox-checked.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::isChecked):
+
+2010-01-05 Yong Li <yoli@rim.com>
+
+ Reviewed by Adam Roben.
+
+ Fix build warnings blindly
+ https://bugs.webkit.org/show_bug.cgi?id=33178
+
+ * platform/SharedBuffer.cpp:
+ * platform/SharedBuffer.h:
+ (WebCore::SharedBuffer::append):
+
+2010-01-05 Dan Bernstein <mitz@apple.com>
+
+ Build fix
+
+ * platform/SharedBuffer.cpp:
+
+2010-01-05 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Darin Adler.
+
+ Fix an obvious bug and build errors in previous commit (r52795)
+ https://bugs.webkit.org/show_bug.cgi?id=33178
+
+ * platform/SharedBuffer.h:
+ (WebCore::SharedBuffer::isEmpty):
+ * platform/cf/SharedBufferCF.cpp:
+ (WebCore::SharedBuffer::maybeTransferPlatformData):
+
+2010-01-04 Yong Li <yoli@rim.com>
+
+ Reviewed by Darin Adler.
+
+ Let SharedBuffer use a group of memory segments internally.
+ It will merge the segments into a flat consecutive buffer only when
+ necessary.
+ https://bugs.webkit.org/show_bug.cgi?id=33178
+
+ * platform/SharedBuffer.cpp:
+ (WebCore::allocateSegment):
+ (WebCore::freeSegment):
+ (WebCore::SharedBuffer::SharedBuffer):
+ (WebCore::SharedBuffer::~SharedBuffer):
+ (WebCore::SharedBuffer::adoptVector):
+ (WebCore::SharedBuffer::size):
+ (WebCore::SharedBuffer::data):
+ (WebCore::SharedBuffer::append):
+ (WebCore::SharedBuffer::clear):
+ (WebCore::SharedBuffer::copy):
+ (WebCore::SharedBuffer::buffer):
+ (WebCore::SharedBuffer::getSomeData):
+ * platform/SharedBuffer.h:
+ * platform/cf/SharedBufferCF.cpp:
+ (WebCore::SharedBuffer::maybeTransferPlatformData):
+ * platform/haiku/SharedBufferHaiku.cpp:
+ (WebCore::SharedBuffer::createWithContentsOfFile):
+ * platform/qt/SharedBufferQt.cpp:
+ (WebCore::SharedBuffer::createWithContentsOfFile):
+ * platform/win/SharedBufferWin.cpp:
+ (WebCore::SharedBuffer::createWithContentsOfFile):
+
+2010-01-05 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Unreviewed trivial Symbian build fix
+
+ * plugins/symbian/PluginViewSymbian.cpp: Add missing HostWindow.h inclusion
+
+2010-01-05 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Fix broken export macros in package builds.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33202
+
+ Always define QT_MAKEDLL unless we're doing a static
+ build or we're building inside of Qt. When building
+ inside of Qt the correct define is pulled from qbase.pri.
+
+ * WebCore.pro:
+
+2010-01-04 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Fisher.
+
+ Reorganize, document and rename OS() platform macros.
+ https://bugs.webkit.org/show_bug.cgi?id=33198
+
+ Adapt to name changes. Also fixed a few incorrect OS checks.
+
+ * accessibility/AccessibilityObject.h:
+ * config.h:
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::listBoxDefaultEventHandler):
+ * inspector/InspectorFrontendHost.cpp:
+ (WebCore::InspectorFrontendHost::platform):
+ * loader/CachedFont.cpp:
+ * loader/FTPDirectoryDocument.cpp:
+ * loader/FTPDirectoryParser.cpp:
+ * page/EventHandler.cpp:
+ * page/Frame.cpp:
+ (WebCore::Frame::setUseSecureKeyboardEntry):
+ * page/NavigatorBase.cpp:
+ (WebCore::NavigatorBase::platform):
+ * page/Page.h:
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ * page/Settings.h:
+ * page/chromium/DragControllerChromium.cpp:
+ (WebCore::DragController::isCopyKeyDown):
+ * page/chromium/EventHandlerChromium.cpp:
+ (WebCore::EventHandler::accessKeyModifiers):
+ * page/win/EventHandlerWin.cpp:
+ (WebCore::EventHandler::createDraggingClipboard):
+ * platform/FileSystem.h:
+ * platform/KeyboardCodes.h:
+ * platform/PurgeableBuffer.h:
+ * platform/chromium/ChromiumBridge.h:
+ * platform/chromium/ClipboardChromium.cpp:
+ (WebCore::ClipboardChromium::writeRange):
+ * platform/chromium/ClipboardUtilitiesChromium.cpp:
+ * platform/chromium/ClipboardUtilitiesChromium.h:
+ * platform/chromium/PasteboardChromium.cpp:
+ (WebCore::Pasteboard::writeSelection):
+ (WebCore::Pasteboard::writePlainText):
+ (WebCore::Pasteboard::documentFragment):
+ * platform/chromium/PlatformKeyboardEventChromium.cpp:
+ (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
+ (WebCore::PlatformKeyboardEvent::currentCapsLockState):
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::layout):
+ (WebCore::PopupMenu::show):
+ * platform/graphics/BitmapImage.h:
+ (WebCore::BitmapImage::mayFillWithSolidColor):
+ * platform/graphics/FloatPoint.h:
+ * platform/graphics/FloatRect.h:
+ * platform/graphics/FloatSize.h:
+ * platform/graphics/FontCache.cpp:
+ (WebCore::alternateFamilyName):
+ * platform/graphics/FontCache.h:
+ * platform/graphics/FontFastPath.cpp:
+ (WebCore::Font::glyphDataForCharacter):
+ * platform/graphics/GlyphBuffer.h:
+ (WebCore::GlyphBuffer::advanceAt):
+ (WebCore::GlyphBuffer::add):
+ * platform/graphics/Gradient.h:
+ * platform/graphics/GraphicsContext.cpp:
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/GraphicsContext3D.h:
+ * platform/graphics/ImageSource.h:
+ * platform/graphics/IntRect.h:
+ * platform/graphics/MediaPlayer.cpp:
+ * platform/graphics/Path.h:
+ * platform/graphics/Pattern.h:
+ * platform/graphics/SimpleFontData.h:
+ * platform/graphics/cg/ColorCG.cpp:
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ * platform/graphics/chromium/FontCustomPlatformData.cpp:
+ (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
+ (WebCore::FontCustomPlatformData::fontPlatformData):
+ (WebCore::createFontCustomPlatformData):
+ * platform/graphics/chromium/FontCustomPlatformData.h:
+ * platform/graphics/chromium/FontPlatformData.h:
+ * platform/graphics/opentype/OpenTypeUtilities.cpp:
+ * platform/graphics/opentype/OpenTypeUtilities.h:
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::getWindowsContext):
+ * platform/graphics/qt/ImageQt.cpp:
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::clipToImageBuffer):
+ * platform/graphics/skia/ImageBufferSkia.cpp:
+ (WebCore::ImageBuffer::ImageBuffer):
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::State::State):
+ (PlatformContextSkia::PlatformContextSkia):
+ (PlatformContextSkia::save):
+ (PlatformContextSkia::restore):
+ * platform/graphics/skia/PlatformContextSkia.h:
+ * platform/graphics/win/IconWin.cpp:
+ (WebCore::Icon::createIconForFiles):
+ (WebCore::Icon::paint):
+ * platform/graphics/wx/GraphicsContextWx.cpp:
+ * platform/gtk/FileSystemGtk.cpp:
+ (WebCore::filenameToString):
+ (WebCore::filenameFromString):
+ (WebCore::filenameForDisplay):
+ * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+ * platform/network/curl/ResourceHandleManager.cpp:
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::):
+ * platform/text/String.cpp:
+ (WebCore::String::format):
+ (WebCore::String::number):
+ * platform/text/TextEncoding.cpp:
+ (WebCore::TextEncoding::encode):
+ * platform/text/TextEncodingRegistry.cpp:
+ (WebCore::buildBaseTextCodecMaps):
+ (WebCore::extendTextCodecMaps):
+ * platform/text/TextStream.cpp:
+ * platform/text/TextStream.h:
+ * platform/text/qt/TextCodecQt.cpp:
+ (WebCore::TextCodecQt::decode):
+ * platform/win/PlatformMouseEventWin.cpp:
+ (WebCore::messageToEventType):
+ (WebCore::PlatformMouseEvent::PlatformMouseEvent):
+ * platform/win/PlatformScreenWin.cpp:
+ (WebCore::deviceInfoForWidget):
+ (WebCore::screenIsMonochrome):
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::show):
+ (WebCore::PopupMenu::paint):
+ (WebCore::PopupMenu::registerClass):
+ (WebCore::PopupMenu::PopupMenuWndProc):
+ (WebCore::PopupMenu::wndProc):
+ * platform/win/SystemTimeWin.cpp:
+ (WebCore::userIdleTime):
+ * platform/wx/FileSystemWx.cpp:
+ (WebCore::unloadModule):
+ * plugins/PluginDatabase.cpp:
+ * plugins/PluginPackage.cpp:
+ (WebCore::PluginPackage::compareFileVersion):
+ * plugins/PluginPackage.h:
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::setFrameRect):
+ (WebCore::PluginView::stop):
+ (WebCore::PluginView::PluginView):
+ * plugins/PluginView.h:
+ * plugins/win/PluginDatabaseWin.cpp:
+ (WebCore::addWindowsMediaPlayerPluginDirectory):
+ (WebCore::addMacromediaPluginDirectories):
+ * plugins/win/PluginPackageWin.cpp:
+ (WebCore::PluginPackage::load):
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::registerPluginView):
+ (WebCore::PluginView::wndProc):
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::paintIntoTransformedContext):
+ (WebCore::PluginView::paintWindowedPluginIntoContext):
+ (WebCore::PluginView::paint):
+ (WebCore::PluginView::handleMouseEvent):
+ (WebCore::PluginView::setParent):
+ (WebCore::PluginView::setNPWindowRect):
+ (WebCore::PluginView::platformStart):
+
+2010-01-04 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add ARIA "Live Region" support
+ https://bugs.webkit.org/show_bug.cgi?id=33117
+
+ Tests: platform/mac/accessibility/aria-liveregions-attributes.html
+ platform/mac/accessibility/aria-liveregions-notifications.html
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::contentChanged):
+ * accessibility/AXObjectCache.h:
+ (WebCore::AXObjectCache::):
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::isChildOfARIALiveRegion):
+ (WebCore::AccessibilityObject::supportsARIALiveRegion):
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::contentChanged):
+ (WebCore::AccessibilityObject::ariaLiveRegionStatus):
+ (WebCore::AccessibilityObject::ariaLiveRegionRelevant):
+ (WebCore::AccessibilityObject::ariaLiveRegionAtomic):
+ (WebCore::AccessibilityObject::ariaLiveRegionBusy):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::elementAttributeValue):
+ (WebCore::AccessibilityRenderObject::contentChanged):
+ (WebCore::AccessibilityRenderObject::childrenChanged):
+ (WebCore::AccessibilityRenderObject::ariaLiveRegionStatus):
+ (WebCore::AccessibilityRenderObject::ariaLiveRegionRelevant):
+ (WebCore::AccessibilityRenderObject::ariaLiveRegionAtomic):
+ (WebCore::AccessibilityRenderObject::ariaLiveRegionBusy):
+ * accessibility/AccessibilityRenderObject.h:
+ (WebCore::AccessibilityRenderObject::areChildrenDirty):
+ * accessibility/mac/AXObjectCacheMac.mm:
+ (WebCore::AXObjectCache::postPlatformNotification):
+ * accessibility/mac/AccessibilityObjectWrapper.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+ (-[AccessibilityObjectWrapper accessibilitySetPostedNotificationCallback:]):
+ (-[AccessibilityObjectWrapper accessibilityPostedNotification:]):
+ * dom/Element.cpp:
+ (WebCore::Element::updateAfterAttributeChanged):
+ * html/HTMLAttributeNames.in:
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::setText):
+
+2010-01-04 Chris Evans <cevans@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Adopt a more conservative approach for loading CSS cross-origin. When
+ loading CSS cross-origin, it must be start with valid CSS if the MIME
+ type is broken.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29820
+
+ Test: http/tests/security/cross-origin-css.html
+ Test: http/tests/security/cross-origin-css-in-xml.xml
+
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::setCSSStyleSheet): Enforce stricter load
+ requirements for cross-origin loads.
+ * css/CSSImportRule.cpp:
+ (WebCore::CSSImportRule::setCSSStyleSheet): Enforce stricter load
+ requirements for cross-origin loads.
+ * css/CSSStyleSheet.h:
+ * css/CSSStyleSheet.cpp:
+ * css/CSSParser.cpp:
+ * css/CSSGrammar.y:
+ * css/CSSParser.h:
+ Add ability to tell whether the CSS parse started with a syntactically
+ valid CSS rule.
+ * loader/CachedCSSStyleSheet.h:
+ * loader/CachedCSSStyleSheet.cpp:
+ (WebCore::CachedCSSStyleSheet::sheetText): Add ability to return
+ whether the MIME type was acceptable for CSS.
+ (WebCore::CachedCSSStyleSheet::canUseSheet): If requested, return
+ whether the MIME type was valid or not.
+ * dom/ProcessingInstruction.cpp
+ (WebCore::ProcessingInstruction::setCSSStyleSheet): Make use of strict
+ mode explicit and add comment.
+
+2010-01-04 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/6655695> REGRESSION: VoiceOver is not highlighting some web elements correctly
+ <rdar://problem/7397558> REGRESSION: AXImages inside of AXLink cause AXLink to have wrong bounds
+
+ Test: accessibility/dimensions-include-descendants.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::boundingBoxRect): Use absoluteFocusRingQuads()
+ for non-text renderers. The focus ring encompasses descendants, which is
+ what we want for the accessibility indicator.
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::absoluteFocusRingQuads): Added.
+ * rendering/RenderObject.h:
+
+2010-01-04 Ojan Vafai <ojan@ojanmacpro.sfo.corp.google.com>
+
+ Reviewed by Dan Bernstein.
+
+ Remove unnecessary division by a constant in SimpleFontDataMac.mm.
+ https://bugs.webkit.org/show_bug.cgi?id=33189
+
+ This was added in http://trac.webkit.org/changeset/8104 and seems like
+ it was just there to match the previously private function which we no
+ longer use.
+
+ No new tests. No change in behavior.
+
+ * platform/graphics/mac/SimpleFontDataMac.mm:
+
+2010-01-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Selection-related code needs stricter rules about how it relates to layout
+ https://bugs.webkit.org/show_bug.cgi?id=32882
+
+ Covered by existing tests along with the new assertions.
+
+ * dom/Document.cpp:
+ (WebCore::Document::recalcStyle): Make sure that m_inStyleRecalc is
+ already false by the time post-attach callbacks are done so that
+ layout triggered inside those callbacks can work properly.
+
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::layout): Added code to trigger a
+ layout when it's needed.
+ (WebCore::SelectionController::recomputeCaretRect): Removed unneeded
+ code to do nothing when FrameView is 0. Added an assertion that layout
+ is not needed at the time the function is called.
+ (WebCore::SelectionController::invalidateCaretRect): Added code to
+ trigger a layout when it's needed.
+ (WebCore::SelectionController::paintCaret): Added an assertion that
+ layout is not needed at the time the function is called.
+
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::shouldAutofocus): Added. Helper function that expresses
+ the rule for which form control elements should auto-focus.
+ (WebCore::focusPostAttach): Added. Called post-attach to focus an
+ element if we discover it should be focused during attach.
+ (WebCore::HTMLFormControlElement::attach): Refactored code for
+ which elements need auto-focus into a separate function. Instead
+ of focusing right away, use the focusPostAttach function to focus
+ after attach is done. Also added calls to suspendPostAttachCallbacks
+ and resumePostAttachCallbacks so post-attach callbacks happen late
+ enough. Before, they could run inside the base attach function.
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::attach): Added calls to
+ suspendPostAttachCallbacks and resumePostAttachCallbacks so
+ post-attach callbacks happen late enough
+
+ * page/Frame.cpp:
+ (WebCore::Frame::revealSelection): Added code to trigger a layout
+ when it's needed.
+
+2010-01-04 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33163
+ Use WTF's string hashing functions from StringImpl.
+
+ * ForwardingHeaders/wtf/StringHashFunctions.h: Added.
+ * platform/text/StringHash.h:
+ * platform/text/StringImpl.h:
+ (WebCore::StringImpl::computeHash):
+
+2010-01-04 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Qt build fix. Unreviewed.
+
+ * accessibility/AXObjectCache.h:
+ (WebCore::AXObjectCache::postNotification):
+
+2010-01-04 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: <select> elements should broadcast value change events
+
+ https://bugs.webkit.org/show_bug.cgi?id=33088
+
+ <rdar://problem/7332364>
+
+ Reviewed by Darin Adler.
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::postNotification):
+ If the post type is async, follow the old code path; otherwise, call
+ postPlatformNotification().
+
+ * accessibility/AXObjectCache.h:
+ (WebCore::AXObjectCache::):
+ Added a new accessibility notification, AXMenuListValueChanged. Added
+ a new parameter to postNotification() to specify whether the post should
+ be synchronous or asynchronous.
+
+ * accessibility/win/AXObjectCacheWin.cpp:
+ (WebCore::AXObjectCache::postPlatformNotification):
+ If the WebCore notification is AXMenuListValueChanged, broadcast an
+ EVENT_OBJECT_VALUECHANGE event.
+
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::setSelectedIndex):
+ When the selected index of a RenderMenuList is changed, call
+ RenderMenuList::didSetSelectedIndex().
+
+ * rendering/RenderMenuList.cpp:
+ (WebCore::RenderMenuList::RenderMenuList):
+ Initialize new member
+ (WebCore::RenderMenuList::didSetSelectedIndex):
+ If the selected index has changed, post AXMenuListValueChanged to the
+ object synchronously.
+
+ * rendering/RenderMenuList.h:
+ Declare didSetSelectedIndex(), and add a member to hold the last
+ selected index.
+
+2010-01-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Added missing null check in BarInfo code.
+
+ Test: fast/dom/Window/BarInfo-after-frame-removed.html
+
+ * page/BarInfo.cpp:
+ (WebCore::BarInfo::visible): Added null check. A few other
+ cleanups.
+
+2010-01-04 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Jon Honeycutt.
+
+ Delete an empty and unused JavaScript file.
+
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/InspectorControllerStub.js: Removed.
+
+2010-01-04 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix, add a couple include dirs to the build.
+
+ * wscript:
+
+2010-01-04 Dan Bernstein <mitz@apple.com>
+
+ Windows build fix
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+
+2010-01-04 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Repaint issues in text input under a scale transform
+ https://bugs.webkit.org/show_bug.cgi?id=32086
+
+ When doing a subtree layout we have to look up the container chain to see if there
+ are any properties, such as transforms or reflections, that mean that we are unable
+ to use layoutState.
+
+ Test: fast/repaint/subtree-layoutstate-transform.html
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout): Call canUseLayoutStateForSubtree() to determine
+ whether it's OK to use layoutState.
+
+ * rendering/RenderView.h:
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::canUseLayoutStateForSubtree): New method that reports whether it's
+ OK to use layoutState when doing a subtree layout from the given root.
+
+2010-01-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Reentrancy problem with selection in some edge cases.
+ https://bugs.webkit.org/show_bug.cgi?id=32842
+ rdar://problem/7449974
+
+ Test: fast/forms/selection-layout-reentry-strange-case.html
+
+ Move the selection display update process done in the
+ selectionLayoutChanged function into the layout timer
+ instead of doing it immediately when selection changes occur.
+
+ * dom/Document.cpp:
+ (WebCore::Document::updateLayout): Changed this to use the
+ definition of needsLayout from FrameView rather than rolling
+ its own.
+
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::SelectionController):
+ Initialize m_needsDisplayUpdate to false.
+ (WebCore::SelectionController::setSelection): Call
+ the new setNeedsDisplayUpdate function instead of the old
+ badly named Frame::selectionLayoutChanged function.
+ (WebCore::SelectionController::setNeedsDisplayUpdate):
+ Set m_needsDisplayUpdate. If it is just becoming true, then
+ call FrameView::scheduleRelayout.
+
+ * editing/SelectionController.h: Added setNeedsDisplayUpdate,
+ needsDisplayUpdate, and m_needsDisplayUpdate.
+
+ * page/Frame.cpp:
+ (WebCore::Frame::setCaretVisible): Call setNeedsDisplayUpdate.
+ (WebCore::Frame::selectionLayoutChanged): Call
+ setNeedsDisplayUpdate to set it to false, since this is the
+ function that performs "selection display update". Later I want
+ to rename this function. Also added a global reentrancy check
+ since that's the easiest way I could think of to prevent infinite
+ recursion in the case where recomputeCaretRect ends up triggering
+ a layout. As a side effect, fixed theoretical problems in
+ TEXT_CARET builds by improving the ifdef.
+ (WebCore::Frame::caretBlinkTimerFired): Loosen assertions a
+ bit. Later we might want to decouple caret rect from caret state
+ a bit more and add these assertions back.
+ (WebCore::Frame::selectionBounds): Call Document::updateLayout.
+ This function is for external clients and they do not currently
+ do anything to make sure layout is up to date.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::needsLayout): Add a new clause, since
+ we need a call to layout if needsDisplayUpdate is true.
+
+2010-01-04 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Correct debug assertion (and possible runtime errors) by
+ checking validity of bitmap settings used to create
+ the Windows Cairo contexts.
+ https://bugs.webkit.org/show_bug.cgi?id=33164.
+
+ * platform/graphics/win/GraphicsContextCairoWin.cpp:
+ (WebCore::createCairoContextWithHDC): Check validity of selected
+ OBJ_BITMAP retrieved, and only create 32-bit context when
+ a valid bitmap is provided.
+
+2010-01-04 Dmitry Titov <dimich@chromium.org>
+
+ Not reviewed, revert r52745 and r52746 on behalf of Nikolas Zimmermann, as discussed on IRC.
+ Patch produced by 'git revert' and then reverting back ChangeLog files.
+
+ * Android.mk:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::repaintRectInLocalCoordinates):
+ (WebCore::RenderPath::setPath):
+ (WebCore::RenderPath::path):
+ (WebCore::RenderPath::paint):
+ (WebCore::):
+ (WebCore::DrawMarkersData::DrawMarkersData):
+ (WebCore::drawMarkerWithData):
+ (WebCore::updateMarkerDataForElement):
+ (WebCore::drawStartAndMidMarkers):
+ (WebCore::RenderPath::drawMarkersIfNeeded):
+ * rendering/RenderPath.h:
+ (WebCore::RenderPath::markerBoundingBox):
+ * rendering/RenderSVGContainer.h:
+ * rendering/RenderSVGViewportContainer.cpp:
+ (WebCore::RenderSVGViewportContainer::paint):
+ * rendering/RenderSVGViewportContainer.h:
+ * rendering/SVGMarkerData.h: Removed.
+ * rendering/SVGMarkerLayoutInfo.cpp: Removed.
+ * rendering/SVGMarkerLayoutInfo.h: Removed.
+ * svg/SVGMarkerElement.cpp:
+ (WebCore::SVGMarkerElement::canvasResource):
+ * svg/graphics/SVGResource.cpp:
+ (WebCore::SVGResource::SVGResource):
+ (WebCore::ResourceSet::ResourceSet):
+ (WebCore::clientMap):
+ (WebCore::SVGResource::~SVGResource):
+ (WebCore::SVGResource::removeClient):
+ (WebCore::SVGResource::addClient):
+ * svg/graphics/SVGResourceMarker.cpp:
+ (WebCore::SVGResourceMarker::SVGResourceMarker):
+ (WebCore::SVGResourceMarker::setMarker):
+ (WebCore::SVGResourceMarker::setRef):
+ (WebCore::SVGResourceMarker::draw):
+ (WebCore::SVGResourceMarker::cachedBounds):
+ (WebCore::SVGResourceMarker::externalRepresentation):
+ * svg/graphics/SVGResourceMarker.h:
+ (WebCore::SVGResourceMarker::refX):
+ (WebCore::SVGResourceMarker::refY):
+
+2010-01-04 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Ada Chan and Mark Rowe.
+
+ Updated copyright string
+
+ * Info.plist:
+ * WebCore.vcproj/QTMovieWin.rc:
+
+2010-01-04 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ AX: any DIV with an aria role should not be ignored
+ https://bugs.webkit.org/show_bug.cgi?id=33090
+
+ Test: platform/mac/accessibility/aria-divs-not-ignored.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
+
+2010-01-04 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Generate declarations for V8 runtime enablers.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33156
+
+ * bindings/scripts/CodeGeneratorV8.pm: Generate runtime enabler declarations.
+ * bindings/v8/custom/V8CustomBinding.h: Remove manual declarations of runtime enablers.
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ * bindings/v8/custom/V8WebSocketCustom.cpp: Remove closeCallback(), which isn't actually being used.
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+
+2010-01-04 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Forgot to add SVGMarkerData.h / SVGMarkerLayoutInfo.(cpp,h) to Chromium build.
+
+ * WebCore.gypi:
+
+2010-01-04 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Marker code is buggy: referencePoint translation is off
+ https://bugs.webkit.org/show_bug.cgi?id=33012
+
+ Rewrite marker code, as it had many issues:
+ - Correct refX/refY handling (covered by new marker-referencePoint.svg test)
+ - Calculate marker bounds on layout time, instead of paint time, to deliver correct repaint rects
+ - Cleanup RenderPath code, which was cluttered by marker stuff (outlay in SVGMarkerLayoutInfo)
+ - Fix SVGResource assuming that there is only one resource per resource type per element. Markers
+ can have three different resources of the same type (three markers, start/mid/end markers)
+
+ Filed bug 33115 (PathElementAddQuadCurveToPoint not handled for <marker>), which was just a TODO in the code before.
+
+ Fixes all svg/custom/marker*.svg tests, that use dynamic updates (propagation failed before).
+ Test: svg/custom/marker-referencePoint.svg
+ svg/custom/marker-opacity.svg
+
+ * Android.mk: Add SVGMarkerData.h / SVGMarkerLayoutInfo.(cpp,h) to build.
+ * GNUmakefile.am: Ditto.
+ * WebCore.pro: Ditto.
+ * WebCore.vcproj/WebCore.vcproj: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * page/FrameView.cpp: Notify RenderSVGRoot children about viewport size changes, just like it's handled for <body> in HTML.
+ (WebCore::FrameView::layout): This is important, as marker bounding boxes may depend on the current viewport size through relative coordinates used in <svg>.
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::markerBoundingBox): Calculates and caches marker boundaries in the layout() phase.
+ (WebCore::RenderPath::repaintRectInLocalCoordinates): Use the cached marker bounding box during paint() time.
+ (WebCore::RenderPath::setPath): Clear marker boundaries upon path changes.
+ (WebCore::RenderPath::paint): Use SVGMarkerLayoutInfo::drawMarkers() instead of the local drawMarkersIfNeeded() function, which is gone now.
+ (WebCore::RenderPath::calculateMarkerBoundsIfNeeded): Utilized by markerBoundingBox() to request SVGResourceMarker objects and calculate their boundaries.
+ * rendering/RenderPath.h: Store SVGMarkerLayoutInfo objects, and rename m_markerBounds to m_cachedLocalMarkerBBox for consistency.
+ (WebCore::RenderPath::path): Inline this accessor.
+ * rendering/RenderSVGContainer.h: Make paint() public (to be used from SVGResourceMarker), all other methods protected (to be used from RenderSVGViewportContainer).
+ * rendering/RenderSVGViewportContainer.cpp: Remove useless paint() override, as the comment in the code indicated.
+ (WebCore::RenderSVGViewportContainer::markerBoundaries): Maps the marker contents repaintRectInLocalCoordinates() into the final coordinate system (see code).
+ (WebCore::RenderSVGViewportContainer::markerContentTransformation): Add marker-specific helper method, allowing to make viewportTransform() private again.
+ * rendering/RenderSVGViewportContainer.h: Marking viewportTransform() private, it's never meant to be used outside this renderer.
+ * rendering/SVGMarkerData.h: Added. Refactored from existing RenderPath code, preserving original copyrights.
+ (WebCore::SVGMarkerData::): Helper struct for SVGMarkerLayoutInfo.
+ (WebCore::SVGMarkerData::origin): Holds the final computed destination of a marker.
+ (WebCore::SVGMarkerData::marker): Holds a pointer to the associated SVGResourceMarker object, which we're aiming to layout.
+ (WebCore::SVGMarkerData::currentAngle): Calculates the current angle for a certain marker type (start/mid/end) based upon the computed inslope/outslope values.
+ (WebCore::SVGMarkerData::updateTypeAndMarker): Helper method.
+ (WebCore::SVGMarkerData::updateOutslope): Ditto.
+ (WebCore::SVGMarkerData::updateMarkerDataForPathElement): Does the actual inslope/outslope calculation.
+ (WebCore::SVGMarkerData::updateInslope): Helper method.
+ * rendering/SVGMarkerLayoutInfo.cpp: Added. New approach to build marker layout info, this time correct during layout() time instead of paint() time.
+ (WebCore::SVGMarkerLayoutInfo::SVGMarkerLayoutInfo):
+ (WebCore::SVGMarkerLayoutInfo::~SVGMarkerLayoutInfo):
+ (WebCore::processStartAndMidMarkers): Static helper method used to visit each path element in order to calculate inslopes/outslopes (-> orientation angles)
+ (WebCore::SVGMarkerLayoutInfo::calculateBoundaries): Build list of MarkerLayout objects, used to query boundaries, and to paint markers during drawMarkers().
+ (WebCore::SVGMarkerLayoutInfo::drawMarkers): Cheap method walking existing MarkerLayout vector, drawing the individual RenderSVGViewportContainer of the markers.
+ (WebCore::SVGMarkerLayoutInfo::addLayoutedMarker): Helper method.
+ * rendering/SVGMarkerLayoutInfo.h: Added.
+ (WebCore::MarkerLayout::MarkerLayout): Helper struct storing a pair of SVGResourceMarker* and a TranformationMatrix.
+ (WebCore::SVGMarkerLayoutInfo::markerData): Public helper methods returning references to private member variables, used from processStartAndMidMarkers.
+ (WebCore::SVGMarkerLayoutInfo::midMarker): Ditto.
+ (WebCore::SVGMarkerLayoutInfo::elementIndex): Ditto.
+ * svg/SVGMarkerElement.cpp: Adopt to name change: setRef() -> setReferencePoint(). setMarker() -> setRenderer()
+ (WebCore::SVGMarkerElement::canvasResource): Add ASSERT(renderer()) to clarify that canvasResource() is only meant to used after renderer creation.
+ * svg/graphics/SVGResource.cpp: Instead of maintaining a global hashmap between SVGStyledElements and an array of possible SVGResources, use a HashSet of SVGResources
+ and directly scan the already existing list of clients for a certain SVGResource. This wrong approach has been introduced over two years
+ ago, making the assumption that there's only one resource type per element. Though markers can provide three resources of the same type
+ per element (all SVGResourceMarker objects, but in different rules: start/mid/end marker). That information is only available while painting.
+ (WebCore::resourceSet): Add global static HashSet<SVGResource*>.
+ (WebCore::SVGResource::SVGResource): Add us to the resourceSet.
+ (WebCore::SVGResource::~SVGResource): Remove us from resourceSet.
+ (WebCore::SVGResource::removeClient): Traverse all SVGResource clients and remove the passed SVGStyledElement from the client list (invoked by SVGStyledElement destructor).
+ (WebCore::SVGResource::addClient): Remove the offending part of the old approach, making the wrong assumption regarding resource types.
+ * svg/graphics/SVGResourceMarker.cpp:
+ (WebCore::SVGResourceMarker::SVGResourceMarker):
+ (WebCore::SVGResourceMarker::markerTransformation): Create TransformationMatrix in the local marker content (RenderSVGViewportContainer) coordinate system, to position a marker.
+ (WebCore::SVGResourceMarker::draw): Simplify marker drawing a lot: used the passing TransformationMatrix (cached in SVGMarkerLayoutInfo) to draw the marker content renderer.
+ (WebCore::SVGResourceMarker::externalRepresentation): Adopt to refX/refY -> referencePoint changes.
+ * svg/graphics/SVGResourceMarker.h: Store a FloatPoint m_referecePoint instead of two refX/refY float values.
+ (WebCore::SVGResourceMarker::setRenderer): Renamed from setMarker().
+ (WebCore::SVGResourceMarker::setReferencePoint): Renamed from setRef().
+ (WebCore::SVGResourceMarker::referencePoint): New accessor replacing refX() / refY().
+
+2010-01-04 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Fix standalone package builds.
+
+ * WebCore.pro: Moved logic for detecting standalone builds to WebKit.pri. Set DESTDIR for package builds.
+
+2010-01-04 Yongjun Zhang <yongjun.zhang@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29048
+ [Qt] make RenderStyle.h compile in winscw compiler.
+
+ Change compareEqual to a macro in Winscw compiler to get around "illegal operand"
+ error when compareEqual is defined as template.
+
+ The compiler bug is reported at:
+ https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=10447
+
+ * rendering/style/RenderStyle.h:
+
+2010-01-04 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Simon Hausmann.
+
+ Fix some PLATFORM(*_ENDIAN) uses to CPU()
+ https://bugs.webkit.org/show_bug.cgi?id=33148
+
+ * platform/image-decoders/bmp/BMPImageReader.h:
+ (WebCore::BMPImageReader::readUint16):
+ (WebCore::BMPImageReader::readUint32):
+ (WebCore::BMPImageReader::readCurrentPixel):
+
+2010-01-04 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Adam Barth.
+
+ Reorganize, document and rename CPU() platform macros.
+ https://bugs.webkit.org/show_bug.cgi?id=33145
+
+ * page/NavigatorBase.cpp:
+ * platform/text/AtomicString.cpp:
+ (WebCore::equal):
+ * platform/text/StringHash.h:
+ (WebCore::StringHash::equal):
+
+2009-12-22 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Eric Seidel.
+
+ [GTK] G_OBJECT() cast is not necessary for signals connection and properties access
+ https://bugs.webkit.org/show_bug.cgi?id=32661
+
+ Reverted the SENTINEL / NULL crap :) Hopefully the style-bot won't
+ complain about NULL usage in g_object_{get,set} anymore.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::hasVideo):
+ (WebCore::MediaPlayerPrivate::hasAudio):
+ (WebCore::MediaPlayerPrivate::setVolume):
+ (WebCore::MediaPlayerPrivate::setRate):
+ (WebCore::MediaPlayerPrivate::updateStates):
+ (WebCore::MediaPlayerPrivate::createGSTPlayBin):
+
+2010-01-04 Alex Milowski <alex@milowski.com>
+
+ Reviewed by Eric Seidel.
+
+ Updated license to match recommended header license.
+
+ * mathml/MathMLElement.cpp:
+ * mathml/MathMLElement.h:
+ * mathml/MathMLInlineContainerElement.cpp:
+ * mathml/MathMLInlineContainerElement.h:
+ * mathml/MathMLMathElement.cpp:
+ * mathml/MathMLMathElement.h:
+
+2010-01-04 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVGResources don't invalidate if target object changes attributes
+ https://bugs.webkit.org/show_bug.cgi?id=33091
+
+ It's neccessary to invalidate all resources of an object, if the attributes of this
+ target change. Otherwise the saved resource data (like ImageBuffers) don't match
+ to the new object properties.
+
+ Test: svg/custom/resource-invalidate-on-target-update.svg
+
+ * svg/SVGStyledElement.cpp:
+ (WebCore::SVGStyledElement::svgAttributeChanged):
+ (WebCore::SVGStyledElement::invalidateResources):
+ * svg/SVGStyledElement.h:
+
+2010-01-03 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Index validation code must always copy client data
+ https://bugs.webkit.org/show_bug.cgi?id=32748
+
+ Client data must always be copied during bufferData and
+ bufferSubData calls, because otherwise the data the GL uses to
+ draw may differ from that checked by the index validation code.
+
+ Test: fast/canvas/webgl/index-validation-copies-indices.html
+
+ * html/canvas/WebGLBuffer.cpp:
+ (WebCore::WebGLBuffer::WebGLBuffer):
+ (WebCore::WebGLBuffer::associateBufferData):
+ (WebCore::WebGLBuffer::associateBufferSubData):
+ * html/canvas/WebGLBuffer.h:
+
+2010-01-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [Chromium] Implement CookieJarChromium::cookiesEnabled
+ https://bugs.webkit.org/show_bug.cgi?id=33123
+
+ Call out to ChromiumBridge to find out if cookies are enabled.
+
+ * platform/chromium/ChromiumBridge.h:
+ * platform/network/chromium/CookieJarChromium.cpp:
+ (WebCore::cookiesEnabled):
+
+2010-01-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [Chromium] Remove evaluateInNewContext (it's useless)
+ https://bugs.webkit.org/show_bug.cgi?id=33068
+
+ This function has no clients and makes life complicated. Isolated
+ worlds won out over NewContext and there's not really any going back
+ now.
+
+ No new tests because this is all minus lines.
+
+ * bindings/v8/ScriptController.cpp:
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertWindowToV8Object):
+ * bindings/v8/V8Proxy.cpp:
+ * bindings/v8/V8Proxy.h:
+
+2010-01-03 Sam Weinig <sam@webkit.org>
+
+ Rubber-stamped by Dan Bernstein.
+
+ Remove out of date commented out attributes in IDLs. We have implemented onpopstate.
+
+ * html/HTMLBodyElement.idl:
+ * html/HTMLFrameSetElement.idl:
+ * page/DOMWindow.idl:
+
+2010-01-03 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Mark more filter effect as alphaImage if possible
+ https://bugs.webkit.org/show_bug.cgi?id=33111
+
+ Mark more effects as alphaImage if the previous effect is a
+ alphaImage. This can reduce the calculation on the next effect
+ like feGaussianBlur.
+
+ Test: This changes don't affect any LayoutTests and can't be tested
+ somehow, since the changes are 'invisible'.
+
+ * platform/graphics/filters/FEColorMatrix.cpp:
+ (WebCore::FEColorMatrix::apply):
+ * svg/graphics/filters/SVGFEMorphology.cpp:
+ (WebCore::FEMorphology::apply):
+ * svg/graphics/filters/SVGFEOffset.cpp:
+ (WebCore::FEOffset::apply):
+ * svg/graphics/filters/SVGFETile.cpp:
+ (WebCore::FETile::apply):
+
+2010-01-01 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Scrollbar of overflow:scroll div in compositing layer fails to render
+ https://bugs.webkit.org/show_bug.cgi?id=32439
+
+ When deciding whether a RenderLayer needs backing store, check whether it has
+ overflow controls that need painting.
+
+ Test: compositing/overflow/scrollbar-painting.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::hasOverflowControls):
+ * rendering/RenderLayer.h:
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
+
+2009-12-31 Christian Dywan <christian@twotoasts.de>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] context menu overriding API is very limited
+ https://bugs.webkit.org/show_bug.cgi?id=27546
+
+ Only show font menu items in rich text areas in the GTK+ port.
+
+ * platform/ContextMenu.cpp:
+ (WebCore::ContextMenu::populate):
+
+2009-12-31 Christian Dywan <christian@twotoasts.de>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] context menu overriding API is very limited
+ https://bugs.webkit.org/show_bug.cgi?id=27546
+
+ Don't show spell checking menu items in text areas in the GTK+ port.
+
+ * platform/ContextMenu.cpp:
+ (WebCore::ContextMenu::populate):
+
+2009-12-31 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7503279> REGRESSION (r47440): Incomplete repaint at macworldexpo.com
+ https://bugs.webkit.org/show_bug.cgi?id=33067
+
+ Test: fast/repaint/table-cell-overflow.html
+
+ * rendering/RenderTableCell.h:
+ (WebCore::RenderTableCell::hasVisibleOverflow): Added.
+ * rendering/RenderTableSection.cpp:
+ (WebCore::RenderTableSection::layoutRows): Set m_hasOverflowingCell if
+ any cell has visible overflow, like it was before r47440.
+
+2009-12-31 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Do not include Frame.h under WebCore/html/canvas
+ https://bugs.webkit.org/show_bug.cgi?id=33082
+
+ No new tests, as there is no new functionality.
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+
+2009-12-30 Darin Fisher <darin@chromium.org>
+
+ Reviewed by David Levin.
+
+ [Chromium] Delete ResourceRequest::securityInfo
+ https://bugs.webkit.org/show_bug.cgi?id=26847
+
+ * platform/network/chromium/ResourceRequest.h:
+
+2009-12-30 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Remove unused code from V8DOMWrapper.
+
+ * bindings/v8/V8DOMWrapper.cpp: Removed code that I added but it's no longer used.
+ * bindings/v8/V8DOMWrapper.h: Ditto.
+
+2009-12-30 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Generate configuring undetectable collection.
+ https://bugs.webkit.org/show_bug.cgi?id=33063
+
+ Refactoring, covered by existing tests.
+
+ * bindings/scripts/CodeGeneratorV8.pm: Added GenerateImplementationMasqueradeAsUndefined.
+ * bindings/v8/DerivedSourcesAllInOne.cpp: Touched to keep IB-based builds happy.
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate): Removed hand-configuring.
+
+2009-12-30 Zelidrag Hornung <zelidrag@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Added ability for PopupMenuClient to signal when
+ a) selection changed, and
+ b) weather suggested value should be accepted when popup menu closes
+
+ No new tests since this new functionality (autocomplete suggestions)
+ is intentionally hidden from everything else than renderer.
+
+ * platform/PopupMenuClient.h:
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupContainer::hidePopup):
+ (WebCore::PopupListBox::handleKeyEvent):
+ (WebCore::PopupListBox::abandon):
+ (WebCore::PopupListBox::acceptIndex):
+ (WebCore::PopupListBox::selectIndex):
+ (WebCore::PopupListBox::clearSelection):
+ (WebCore::PopupListBox::hidePopup):
+ * platform/gtk/PopupMenuGtk.cpp:
+ (WebCore::PopupMenu::menuUnmapped):
+ * platform/mac/PopupMenuMac.mm:
+ (WebCore::PopupMenu::show):
+ * platform/qt/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopup::hidePopup):
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::hide):
+ * platform/wx/PopupMenuWx.cpp:
+ (WebCore::PopupMenu::OnMenuItemSelected):
+ * rendering/RenderMenuList.cpp:
+ (WebCore::RenderMenuList::popupDidHide):
+ * rendering/RenderMenuList.h:
+ (WebCore::RenderMenuList::selectionChanged):
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::popupDidHide):
+ * rendering/RenderTextControlSingleLine.h:
+ (WebCore::RenderTextControlSingleLine::selectionChanged):
+
+2009-12-30 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Auto-generate V8 bindings header declarations for
+ property accessor getter/setters, and remove a couple of
+ unnecessarily custom bindings that weren't properly declared
+ custom anyway.
+
+ * Android.v8bindings.mk: Remove V8NavigatorCustom.cpp.
+ * WebCore.gypi: Remove V8NavigatorCustom.cpp.
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8DOMWrapper.cpp:
+ * bindings/v8/custom/V8AttrCustom.cpp:
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+ * bindings/v8/custom/V8ClipboardCustom.cpp:
+ * bindings/v8/custom/V8CoordinatesCustom.cpp:
+ * bindings/v8/custom/V8CustomBinding.cpp:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ * bindings/v8/custom/V8DocumentLocationCustom.cpp:
+ * bindings/v8/custom/V8EventCustom.cpp:
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+ * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ * bindings/v8/custom/V8LocationCustom.cpp:
+ * bindings/v8/custom/V8MessageEventCustom.cpp:
+ * bindings/v8/custom/V8NavigatorCustom.cpp: Removed.
+ * bindings/v8/custom/V8SVGLengthCustom.cpp:
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+
+2009-12-30 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [Chromium] Touch DerivedSourcesAllInOne to avoid clobbering IB-based builds.
+
+ * bindings/v8/DerivedSourcesAllInOne.cpp: Added a line-break.
+
+2009-12-30 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Generate configuring of call-as-function callbacks.
+ https://bugs.webkit.org/show_bug.cgi?id=33061
+
+ Refactoring, covered by existing tests.
+
+ * bindings/scripts/CodeGeneratorV8.pm: Added GenerateHeaderCustomCall and
+ GenerateImplementationCustomCall.
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate): Removed all hand-configuring of call-as-function
+ callbacks.
+ * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
+ (WebCore::V8HTMLAppletElement::callAsFunctionCallback): Added.
+ (WebCore::V8HTMLEmbedElement::callAsFunctionCallback): Added.
+ (WebCore::V8HTMLObjectElement::callAsFunctionCallback): Added.
+ * bindings/v8/custom/V8HTMLPlugInElementCustom.h: Removed.
+
+2009-12-30 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [v8] Move world-specific state out of V8Proxy
+ https://bugs.webkit.org/show_bug.cgi?id=33034
+
+ This is the first step towards unifying the V8 implementation of
+ isolated worlds with the JSC implementation. We need an object to
+ encapulate all the world-specific bindings state. Previoulsy, we used
+ V8Proxy for this purpose (along with a million other things), but
+ there's a one-to-one mapping between V8Proxy objects and Frame objects.
+
+ This patch takes the world-specific state and moves it to a new object,
+ affectionately called V8DOMWindowShell. This object is the moral
+ equivalent of JSDOMWindowShell but with more data members because life
+ is more complicated in V8-land.
+
+ This patch is almost entirely code motion. Future patches will clean
+ up this class as we use it to represent window shells in isolated
+ worlds as well as the main world.
+
+ * WebCore.gypi:
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::updateSecurityOrigin):
+ (WebCore::ScriptController::haveInterpreter):
+ (WebCore::ScriptController::updateDocument):
+ * bindings/v8/V8DOMWindowShell.cpp: Added.
+ (WebCore::handleFatalErrorInV8):
+ (WebCore::reportFatalErrorInV8):
+ (WebCore::reportUnsafeJavaScriptAccess):
+ (WebCore::V8DOMWindowShell::create):
+ (WebCore::V8DOMWindowShell::V8DOMWindowShell):
+ (WebCore::V8DOMWindowShell::isContextInitialized):
+ (WebCore::V8DOMWindowShell::disposeContextHandles):
+ (WebCore::V8DOMWindowShell::destroyGlobal):
+ (WebCore::V8DOMWindowShell::clearForClose):
+ (WebCore::V8DOMWindowShell::clearForNavigation):
+ (WebCore::V8DOMWindowShell::initContextIfNeeded):
+ (WebCore::V8DOMWindowShell::createNewContext):
+ (WebCore::V8DOMWindowShell::installDOMWindow):
+ (WebCore::V8DOMWindowShell::updateDocumentWrapper):
+ (WebCore::V8DOMWindowShell::clearDocumentWrapper):
+ (WebCore::V8DOMWindowShell::updateDocumentWrapperCache):
+ (WebCore::V8DOMWindowShell::clearDocumentWrapperCache):
+ (WebCore::V8DOMWindowShell::setSecurityToken):
+ (WebCore::V8DOMWindowShell::updateDocument):
+ (WebCore::V8DOMWindowShell::updateSecurityOrigin):
+ (WebCore::V8DOMWindowShell::getHiddenObjectPrototype):
+ (WebCore::V8DOMWindowShell::installHiddenObjectPrototype):
+ (WebCore::V8DOMWindowShell::createWrapperFromCacheSlowCase):
+ * bindings/v8/V8DOMWindowShell.h: Added.
+ (WebCore::V8DOMWindowShell::context):
+ (WebCore::V8DOMWindowShell::createWrapperFromCache):
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getConstructorForContext):
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ (WebCore::V8DOMWrapper::convertDocumentToV8Object):
+ (WebCore::V8DOMWrapper::convertNewNodeToV8Object):
+ * bindings/v8/V8IsolatedWorld.cpp:
+ (WebCore::V8IsolatedWorld::V8IsolatedWorld):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::V8Proxy):
+ (WebCore::V8Proxy::~V8Proxy):
+ (WebCore::V8Proxy::handleOutOfMemory):
+ (WebCore::V8Proxy::evaluateInIsolatedWorld):
+ (WebCore::V8Proxy::evaluateInNewContext):
+ (WebCore::V8Proxy::setInjectedScriptContextDebugId):
+ (WebCore::V8Proxy::clearForClose):
+ (WebCore::V8Proxy::clearForNavigation):
+ (WebCore::V8Proxy::mainWorldContext):
+ (WebCore::V8Proxy::setContextDebugId):
+ * bindings/v8/V8Proxy.h:
+ (WebCore::V8Proxy::windowShell):
+ (WebCore::V8Proxy::extensions):
+
+2009-12-30 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ SVGResourceClipper needs to invalidate content
+ https://bugs.webkit.org/show_bug.cgi?id=33054
+
+ Added invalidate() to SVGResourceClipper to reset clipData
+ and drawing area after attribute changes.
+
+ This fixes two LayoutTests.
+
+ * svg/graphics/SVGResourceClipper.cpp:
+ (WebCore::SVGResourceClipper::resetClipData):
+ (WebCore::SVGResourceClipper::invalidate):
+ * svg/graphics/SVGResourceClipper.h:
+
+2009-12-30 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] RenderThemeQt::applyTheme is a misnomer and is suboptimally coded.
+ https://bugs.webkit.org/show_bug.cgi?id=33035
+
+ This patch:
+ - renames RenderThemeQt::applyTheme to initializeCommonQStyleOptions,
+ - extracts the palette initialization code to a separate function in order to
+ provide for readable pointer checking and moves this code up in the function to
+ allow for future changes to the palette brushes needed for bug 30173,
+ - optimizes some of the code in the function for readability, speed and size.
+ - fixes some minor style issues
+
+ No new tests because code behavior is not changed.
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::paintButton):
+ (WebCore::RenderThemeQt::paintTextField):
+ (WebCore::RenderThemeQt::paintMenuList):
+ (WebCore::RenderThemeQt::paintMenuListButton):
+ (WebCore::initPaletteFromPageClientIfExists):
+ (WebCore::RenderThemeQt::initializeCommonQStyleOptions):
+ * platform/qt/RenderThemeQt.h:
+
+2009-12-30 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] It should be possible to disable inspector
+ https://bugs.webkit.org/show_bug.cgi?id=32724
+
+ This makes the r48430 available for other ports as well.
+ No new tests, as there is no new functionality.
+
+ * inspector/InjectedScriptHost.idl: Guard the interface with
+ INSPECTOR guard.
+
+ * inspector/InspectorBackend.idl: Ditto.
+
+ * inspector/InspectorFrontendHost.idl: Ditto.
+
+2009-12-30 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Generate configuring of all indexers.
+ https://bugs.webkit.org/show_bug.cgi?id=33031
+
+ Refactorig, covered by existing tests.
+
+ * bindings/scripts/CodeGeneratorV8.pm: Added generation of indexers for
+ special cases.
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate): Removed custom tempalte configuration of
+ indexers.
+ * bindings/v8/custom/V8CustomBinding.h: Added decls for Applet, Embed, and Object
+ elements (these will be generated, too -- later.)
+ * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
+ (WebCore::npObjectIndexedGetter): Moved common code to a separate method.
+ (WebCore::npObjectIndexedSetter): Ditto.
+ (WebCore::INDEXED_PROPERTY_GETTER): Added custom handlers for Applet, Embed, and Object
+ all calling the common method.
+ (WebCore::INDEXED_PROPERTY_SETTER): Ditto.
+
+2009-12-30 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Generate configuring of all named property getters/setters/enumerators.
+ https://bugs.webkit.org/show_bug.cgi?id=32996
+
+ Refactoring, covered by existing tests.
+
+ * bindings/scripts/CodeGeneratorV8.pm: Added generation of named property handlers
+ for special cases (See bug for more info).
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate): Removed custom template configuration of named
+ property handlers.
+ * bindings/v8/custom/V8CustomBinding.h: Added decls for Applet, Embed, and Object
+ elements (these will be generated, too -- later.)
+ * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
+ (WebCore::npObjectNamedGetter): Moved common code to a separate method.
+ (WebCore::npObjectNamedSetter): Ditto.
+ (WebCore::NAMED_PROPERTY_GETTER): Added custom handlers for Applet, Embed, and Object
+ all calling the common method.
+ (WebCore::NAMED_PROPERTY_SETTER): Ditto.
+
+2009-12-30 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix PluginView::handlePostReadFile().
+ https://bugs.webkit.org/show_bug.cgi?id=33052
+
+ The function should actually rewrite the given file to the buffer.
+
+ This change fixes http/tests/plugins/post-url-file.html, which can be unskipped
+ now along with other passing http/plugins tests.
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::handlePostReadFile):
+
+2009-12-30 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Rubber stamped by Simon Hausmann.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32121
+ [Qt] Revert "Implement ImageDecoderQt::clearFrameBufferCache()" from r52516.
+
+ The implementation appears to either run into an ASSERT
+ or leak memory at runtime as the m_buffer, m_reader may
+ already exist. The bug was reopened and we do have a plan now.
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::setData):
+ (WebCore::ImageDecoderQt::clearFrameBufferCache):
+ * platform/graphics/qt/ImageDecoderQt.h:
+
+2009-12-30 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Add support for Symbian def files
+
+ * WebCore.pro:
+
+2009-12-30 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Unreviewed Qt/Symbian build fix.
+
+ Don't build network state notifier support when building inside of Qt.
+ Otherwise the Qt build depends on an external module that itself depends
+ on Qt again.
+
+ * WebCore.pro:
+
+2009-12-30 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [v8] Use current isolated world's context for ScriptCallStack.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33016
+
+ * bindings/v8/ScriptCallStack.cpp:
+ (WebCore::ScriptCallStack::ScriptCallStack):
+ * bindings/v8/ScriptCallStack.h:
+ (WebCore::ScriptCallStack::state):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::mainWorldScriptState):
+ (WebCore::ScriptController::currentScriptState):
+ (WebCore::ScriptController::clearWindowShell):
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/V8IsolatedWorld.cpp:
+ (WebCore::V8IsolatedWorld::scriptState):
+ * bindings/v8/V8IsolatedWorld.h:
+
+2009-12-30 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Turn off DataGrid support by default.
+
+ No new tests, as there is no new functionality.
+
+ * WebCore.pro:
+
+2009-12-29 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Detailed boundingBoxes in SVG Renderer
+ https://bugs.webkit.org/show_bug.cgi?id=32815
+
+ Add new bounding boxes for strokes, filters, masker and clipper in SVG.
+ These new bounding boxes help to fix repaintRectInLocalCoordinates.
+ We calculate the smallest repaint rect considering the new bounding boxes
+ now, filters get the correct paint area, masker clip the mask image size
+ to the visible area of the target.
+
+ Tests: Many tests need an update. The changes in repaintRectInLocalCoordinates
+ affect the LayoutTests.
+
+ * rendering/RenderForeignObject.h:
+ (WebCore::RenderForeignObject::strokeBoundingBox):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::toSVGRenderBase):
+ * rendering/RenderObject.h:
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::strokeBoundingBox):
+ (WebCore::RenderPath::repaintRectInLocalCoordinates):
+ (WebCore::RenderPath::setPath):
+ * rendering/RenderPath.h:
+ (WebCore::RenderPath::markerBoundingBox):
+ * rendering/RenderSVGBlock.h:
+ (WebCore::RenderSVGBlock::toSVGRenderBase):
+ * rendering/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::strokeBoundingBox):
+ (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
+ * rendering/RenderSVGContainer.h:
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::layout):
+ (WebCore::RenderSVGImage::repaintRectInLocalCoordinates):
+ * rendering/RenderSVGImage.h:
+ (WebCore::RenderSVGImage::toSVGRenderBase):
+ (WebCore::RenderSVGImage::strokeBoundingBox):
+ * rendering/RenderSVGInline.h:
+ (WebCore::RenderSVGInline::objectBoundingBox):
+ (WebCore::RenderSVGInline::repaintRectInLocalCoordinates):
+ * rendering/RenderSVGModelObject.h:
+ (WebCore::RenderSVGModelObject::toSVGRenderBase):
+ * rendering/RenderSVGRoot.h:
+ (WebCore::RenderSVGRoot::strokeBoundingBox):
+ * rendering/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::strokeBoundingBox):
+ (WebCore::RenderSVGText::repaintRectInLocalCoordinates):
+ * rendering/RenderSVGText.h:
+ (WebCore::RenderSVGText::toSVGRenderBase):
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderBase::~SVGRenderBase):
+ (WebCore::SVGRenderBase::prepareToRenderSVGContent):
+ (WebCore::SVGRenderBase::filterBoundingBoxForRenderer):
+ (WebCore::SVGRenderBase::clipperBoundingBoxForRenderer):
+ (WebCore::SVGRenderBase::maskerBoundingBoxForRenderer):
+ * rendering/SVGRenderSupport.h:
+ (WebCore::SVGRenderBase::toSVGRenderBase):
+ (WebCore::SVGRenderBase::strokeBoundingBox):
+ (WebCore::SVGRenderBase::markerBoundingBox):
+ * rendering/SVGRootInlineBox.h:
+ (WebCore::SVGRootInlineBox::toSVGRenderBase):
+ (WebCore::SVGRootInlineBox::objectBoundingBox):
+ (WebCore::SVGRootInlineBox::repaintRectInLocalCoordinates):
+ * svg/SVGFilterElement.cpp:
+ (WebCore::SVGFilterElement::filterBoundingBox):
+ * svg/SVGFilterElement.h:
+ * svg/SVGMaskElement.cpp:
+ (WebCore::SVGMaskElement::maskBoundingBox):
+ (WebCore::SVGMaskElement::drawMaskerContent):
+ * svg/SVGMaskElement.h:
+ * svg/graphics/SVGResourceClipper.cpp:
+ (WebCore::SVGResourceClipper::clipperBoundingBox):
+ * svg/graphics/SVGResourceClipper.h:
+ * svg/graphics/SVGResourceFilter.cpp:
+ (WebCore::SVGResourceFilter::filterBoundingBox):
+ (WebCore::shouldProcessFilter):
+ (WebCore::SVGResourceFilter::prepareFilter):
+ * svg/graphics/SVGResourceFilter.h:
+ * svg/graphics/SVGResourceMasker.cpp:
+ (WebCore::SVGResourceMasker::maskerBoundingBox):
+ (WebCore::SVGResourceMasker::applyMask):
+ * svg/graphics/SVGResourceMasker.h:
+
+2009-12-29 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Adam Barth.
+
+ Add Android hook to NetworkStateNotifier class
+ so that the Java side can notify WebCore when the
+ network state changes.
+ https://bugs.webkit.org/show_bug.cgi?id=32871
+
+ No new tests required, this is platform code.
+
+ * platform/network/NetworkStateNotifier.h:
+ * platform/network/android/NetworkStateNotifierAndroid.cpp: Added.
+ (WebCore::NetworkStateNotifier::networkStateChange):
+
+2009-12-29 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r52630.
+ http://trac.webkit.org/changeset/52630
+
+ Change caused layout tests failures and crashes.
+
+ * Android.mk:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::repaintRectInLocalCoordinates):
+ (WebCore::RenderPath::setPath):
+ (WebCore::RenderPath::path):
+ (WebCore::RenderPath::paint):
+ (WebCore::):
+ (WebCore::DrawMarkersData::DrawMarkersData):
+ (WebCore::drawMarkerWithData):
+ (WebCore::updateMarkerDataForElement):
+ (WebCore::drawStartAndMidMarkers):
+ (WebCore::RenderPath::drawMarkersIfNeeded):
+ * rendering/RenderPath.h:
+ * rendering/RenderSVGContainer.h:
+ * rendering/RenderSVGViewportContainer.cpp:
+ (WebCore::RenderSVGViewportContainer::paint):
+ * rendering/RenderSVGViewportContainer.h:
+ * rendering/SVGMarkerLayoutInfo.cpp: Removed.
+ * rendering/SVGMarkerLayoutInfo.h: Removed.
+ * svg/SVGMarkerElement.cpp:
+ (WebCore::SVGMarkerElement::canvasResource):
+ * svg/graphics/SVGResource.cpp:
+ (WebCore::SVGResource::SVGResource):
+ (WebCore::ResourceSet::ResourceSet):
+ (WebCore::clientMap):
+ (WebCore::SVGResource::~SVGResource):
+ (WebCore::SVGResource::removeClient):
+ (WebCore::SVGResource::addClient):
+ * svg/graphics/SVGResourceMarker.cpp:
+ (WebCore::SVGResourceMarker::SVGResourceMarker):
+ (WebCore::SVGResourceMarker::setMarker):
+ (WebCore::SVGResourceMarker::setRef):
+ (WebCore::SVGResourceMarker::draw):
+ (WebCore::SVGResourceMarker::cachedBounds):
+ (WebCore::SVGResourceMarker::externalRepresentation):
+ * svg/graphics/SVGResourceMarker.h:
+ (WebCore::SVGResourceMarker::refX):
+ (WebCore::SVGResourceMarker::refY):
+
+2009-12-29 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Move the focus ring rect array, width and offset out of GraphicsContext
+ https://bugs.webkit.org/show_bug.cgi?id=33028
+
+ * platform/graphics/GraphicsContext.cpp: Removed initFocusRing(),
+ clearFocusRing(), focusRingBoundingRect(), addFocusRingRect(),
+ focusRingWidth(), focusRingOffset(), and focusRingRects().
+ * platform/graphics/GraphicsContext.h: Ditto. Added the focus ring rect
+ vector, width and offset as parameters to drawFocusRing().
+ * platform/graphics/GraphicsContextPrivate.h:
+ (WebCore::GraphicsContextState::GraphicsContextState): Cleaned up style.
+ (WebCore::GraphicsContextPrivate::GraphicsContextPrivate): Removed
+ m_focusRingRects, m_focusRingWidth and m_focusRingOffset.
+ * platform/graphics/IntRect.cpp:
+ (WebCore::unionRect): Added this helper function.
+ * platform/graphics/IntRect.h:
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::drawFocusRing):
+ * platform/graphics/haiku/GraphicsContextHaiku.cpp:
+ (WebCore::GraphicsContext::drawFocusRing): Ditto.
+ * platform/graphics/mac/GraphicsContextMac.mm:
+ (WebCore::GraphicsContext::drawFocusRing): Ditto.
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::drawFocusRing): Ditto.
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::drawFocusRing): Ditto.
+ * platform/graphics/win/GraphicsContextCGWin.cpp:
+ (WebCore::GraphicsContext::drawFocusRing): Ditto.
+ * platform/graphics/wince/GraphicsContextWince.cpp:
+ (WebCore::GraphicsContext::drawFocusRing): Ditto.
+ * platform/graphics/wx/GraphicsContextWx.cpp:
+ (WebCore::GraphicsContext::drawFocusRing): Ditto.
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::addFocusRingRects): Updated for new prototype.
+ Added empty rect checks that were previously done in
+ GraphicsContext::addFocusRingRect().
+ * rendering/RenderBlock.h:
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::addFocusRingRects): Ditto.
+ * rendering/RenderBox.h:
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::addFocusRingRects): Ditto.
+ (WebCore::RenderInline::paintOutline): Collect focus ring rects into a
+ vector and pass it to drawFocusRing(). Use unionRect() instead of
+ focusRingBoundingRect().
+ * rendering/RenderInline.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::paintOutline): Ditto.
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::addFocusRingRects): Changed to take a
+ Vector<IntRect> to which the rects are added.
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::addFocusRingRects): Updated for new prototype.
+ Added empty rect check that was previously done in
+ GraphicsContext::addFocusRingRect().
+ * rendering/RenderPath.h:
+ * rendering/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::addFocusRingRects): Updated for new prototype.
+ Added empty rect check that was previously done in
+ GraphicsContext::addFocusRingRect().
+ * rendering/RenderSVGContainer.h:
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::addFocusRingRects): Updated for new prototype.
+ Added empty rect check that was previously done in
+ GraphicsContext::addFocusRingRect().
+ * rendering/RenderSVGImage.h:
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::addFocusRingRects): Updated for new prototype.
+ Added empty rect check that was previously done in
+ GraphicsContext::addFocusRingRect().
+ * rendering/RenderTextControl.h:
+
+2009-12-28 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ 1. Changes the order in which some functions are called to match
+ the pre-r52536 order. Namely, when a new Database object is
+ created, DatabaseTracker::addOpenDatabase() is called in the
+ constructor, before doing anything else related to that database
+ (like trying to get a file handle to the database
+ file). Chromium's implementation depends on this ordering.
+ 2. Changes Database::performOpenAndVerify() to close the open
+ handle to the database file immediately if the database version
+ does not match the expected one. The current behavior is to add
+ the Database object to a DatabaseThread collection and let the
+ database thread close the handle when it's destroyed.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33005
+
+ All LayoutTests/storage tests pass in clean WebKit and Chromium
+ clients.
+
+ * storage/Database.cpp:
+ (WebCore::Database::openDatabase): Notify DatabaseTracker and
+ Document that a Database object is about to be destroyed (when a
+ database file cannot be opened, or its version doesn't match the
+ expected one).
+ (WebCore::Database::Database): Notify DatabaseTracker and Document
+ that a new Database object was created.
+ (WebCore::Database::performOpenAndVerify): If a database version
+ does not match the expected one, immediately close the open file
+ handle to the database file.
+
+2009-12-29 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Marker code is buggy: referencePoint translation is off
+ https://bugs.webkit.org/show_bug.cgi?id=33012
+
+ Rewrite marker code, as it was buggy:
+ - Correct refX/refY handling (covered by new marker-referencePoint.svg test)
+ - Calculate marker bounds on layout time, instead of paint time, to deliver correct repaint rects
+ - Cleanup RenderPath code, which was cluttered by marker stuff (outlay in SVGMarkerLayoutInfo)
+ - Fix SVGResource assuming that there is only one resource per resource type per element. Markers
+ can have three different resources of the same type (three markers, start/mid/end markers)
+
+ Fixes all svg/custom/marker*.svg tests, that use dynamic updates (propagation failed before).
+ Test: svg/custom/marker-referencePoint.svg
+
+ * Android.mk:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::repaintRectInLocalCoordinates):
+ (WebCore::RenderPath::setPath):
+ (WebCore::RenderPath::paint):
+ (WebCore::RenderPath::calculateMarkerBoundsIfNeeded):
+ * rendering/RenderPath.h:
+ (WebCore::RenderPath::path):
+ * rendering/RenderSVGContainer.h:
+ * rendering/RenderSVGViewportContainer.cpp:
+ (WebCore::RenderSVGViewportContainer::markerContentTransformation):
+ * rendering/RenderSVGViewportContainer.h:
+ * rendering/SVGMarkerLayoutInfo.cpp: Added.
+ (WebCore::SVGMarkerLayoutInfo::SVGMarkerLayoutInfo):
+ (WebCore::SVGMarkerLayoutInfo::~SVGMarkerLayoutInfo):
+ (WebCore::SVGMarkerLayoutInfo::initialize):
+ (WebCore::updateMarkerDataForElement):
+ (WebCore::recordMarkerData):
+ (WebCore::processStartAndMidMarkers):
+ (WebCore::SVGMarkerLayoutInfo::calculateBoundaries):
+ (WebCore::SVGMarkerLayoutInfo::drawMarkers):
+ * rendering/SVGMarkerLayoutInfo.h: Added.
+ (WebCore::MarkerData::):
+ (WebCore::MarkerData::MarkerData):
+ (WebCore::MarkerLayout::MarkerLayout):
+ * svg/SVGMarkerElement.cpp:
+ (WebCore::SVGMarkerElement::canvasResource):
+ * svg/graphics/SVGResource.cpp:
+ (WebCore::resourceSet):
+ (WebCore::SVGResource::SVGResource):
+ (WebCore::SVGResource::~SVGResource):
+ (WebCore::SVGResource::removeClient):
+ (WebCore::SVGResource::addClient):
+ * svg/graphics/SVGResourceMarker.cpp:
+ (WebCore::SVGResourceMarker::SVGResourceMarker):
+ (WebCore::SVGResourceMarker::markerBoundaries):
+ (WebCore::SVGResourceMarker::markerTransformation):
+ (WebCore::SVGResourceMarker::draw):
+ (WebCore::SVGResourceMarker::externalRepresentation):
+ * svg/graphics/SVGResourceMarker.h:
+ (WebCore::SVGResourceMarker::setRenderer):
+ (WebCore::SVGResourceMarker::setReferencePoint):
+ (WebCore::SVGResourceMarker::referencePoint):
+
+2009-12-29 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Fix UI nits in the Audits panel.
+ https://bugs.webkit.org/show_bug.cgi?id=32932
+
+ * inspector/front-end/AuditLauncherView.js:
+ (WebInspector.AuditLauncherView.prototype._selectAllClicked):
+ (WebInspector.AuditLauncherView.prototype._createCategoryElement):
+ (WebInspector.AuditLauncherView.prototype._createLauncherUI.handleSelectAllClick):
+ (WebInspector.AuditLauncherView.prototype._createLauncherUI):
+ * inspector/front-end/AuditResultView.js:
+ (WebInspector.AuditResultView):
+ (WebInspector.AuditRuleResultPane):
+ * inspector/front-end/audits.css:
+
+2009-12-29 Johnny Ding <jnd@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32863
+ Make NodeList support call-as-function
+
+ Test: fast/dom/NodeList/nodelist-item-call-as-function.html
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ * bindings/v8/custom/V8NodeListCustom.cpp:
+ (WebCore::V8NodeList::callAsFunctionCallback):
+
+2009-12-29 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Typed text in table not correctly redrawn on page with compositing layers
+ https://bugs.webkit.org/show_bug.cgi?id=32874
+
+ Use the same test in RenderTableCell::computeRectForRepaint() that we use elsewhere
+ to decide when to use layoutState, which is to test for layoutStateEnabled()
+ and no repaint container.
+
+ Not possible to make a repaint test that exercises the problem, so no test.
+
+ * rendering/RenderTableCell.cpp:
+ (WebCore::RenderTableCell::computeRectForRepaint):
+
+2009-12-29 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Discard port from cookie domain when matching cookies.
+
+ WebKit cookies do not hold the port information, so we should match only hostnames.
+ https://bugs.webkit.org/show_bug.cgi?id=31787
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.updateResource):
+
+2009-12-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix warnings in MediaPlayerPrivatePhonon.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=33019
+
+ No new tests as there is no new functionality.
+
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
+ (WebCore::MediaPlayerPrivate::totalTimeChanged):
+
+2009-12-29 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Implement HTML5 <aside> element.
+ https://bugs.webkit.org/show_bug.cgi?id=32943
+
+ <aside> should behave the same as <nav>, <section>, and <article>.
+
+ Test: fast/html/aside-element.html
+
+ * css/html.css: Add aside as a block element.
+ * editing/htmlediting.cpp:
+ (WebCore::validBlockTag): Add asideTag.
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::tagPriority): Returns 5 for asideTag.
+ (WebCore::blockTagList): Add asideTag.
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::getNode): Add asideTag.
+ * html/HTMLTagNames.in: Add aside.
+
+2009-12-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
+ https://bugs.webkit.org/show_bug.cgi?id=33003
+
+ No new tests as there is no new functionality.
+
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
+ * page/animation/ImplicitAnimation.cpp:
+ (WebCore::ImplicitAnimation::sendTransitionEvent):
+ * page/animation/KeyframeAnimation.cpp:
+ (WebCore::KeyframeAnimation::sendAnimationEvent):
+ * rendering/RenderSVGContainer.h:
+ (WebCore::toRenderSVGContainer):
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::setTextShadow):
+ * svg/graphics/SVGPaintServerGradient.cpp:
+ (WebCore::SVGPaintServerGradient::setup):
+ * svg/graphics/SVGPaintServerPattern.cpp:
+ (WebCore::SVGPaintServerPattern::setup):
+
+2009-12-28 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Dmitry Titov.
+
+ On Android, ResourceHandle instances make use of a pointer to a
+ ResourceLoaderAndroid pointer. This needs to be stored in order to later cancel
+ the load, if necessary. Since this pointer is an internal implementation
+ details of ResourceHandle on Android, it needs to be stored in the
+ ResourceHandleInternal class. This patch adds this pointer.
+ https://bugs.webkit.org/show_bug.cgi?id=32873
+
+ No new tests needed, this is platform-specific code.
+
+ * platform/network/ResourceHandle.h:
+ * platform/network/ResourceHandleInternal.h:
+ (WebCore::ResourceHandleInternal::ResourceHandleInternal):
+
+2009-12-28 Charles Wei <charles.wei@torchmobile.com.cn>
+
+ Reviewed by Maciej Stachowiak.
+
+ Remove the macro ENABLE(XHTMLMP) for noscriptAreateErrorCheck in HTMLParser,
+ since with XHTMLMP enabled, it's not checking create Errors, and then contents inside
+ <noscript> are always parsed and rendered.
+ https://bugs.webkit.org/show_bug.cgi?id=32706
+
+ Tests: fast/parser/noscript-with-javascript-disabled.html
+ fast/parser/noscript-with-javascript-enabled.html
+
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::getNode):
+
+2009-12-28 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fixed isKeypadEvent behavior for Mac to correctly report keyLocation
+ as DOM_KEY_LOCATION_NUMPAD for numeric pad key events.
+ https://bugs.webkit.org/show_bug.cgi?id=28247
+
+ Test: fast/events/keydown-numpad-keys.html
+
+ * platform/mac/KeyEventMac.mm:
+ (WebCore::isKeypadEvent):
+
+2009-12-28 Mike Moretti <webkit9@mordent.com>
+
+ Reviewed by Darin Adler.
+
+ Fix bug 28245 - problem with inserting a span into a long text block causing a crash because of a null string
+
+ Test: fast/dom/insert-span-into-long-text-bug-28245.html
+
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::findNextLineBreak):
+
+2009-12-28 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Rubber-stamped by Xan Lopez.
+
+ Follow Apple's decision to disable HTML DataGrid by default.
+
+ * GNUmakefile.am:
+
+2009-12-28 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Fix warnings when generating files using gperf. The warnings are
+ currently harmless, but some changes in the build system may make
+ them fatal.
+
+ [GTK] Build time must be reduced
+ https://bugs.webkit.org/show_bug.cgi?id=32921
+
+ * GNUmakefile.am:
+
+2009-12-28 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Fix build break for Qt 4.4
+ https://bugs.webkit.org/show_bug.cgi?id=30327
+
+ No new tests, as there is no new functionality.
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::clipOut): Use intersected() instead of
+ operator &, which was only introduced in Qt version 4.5.
+
+ * platform/qt/ScrollbarThemeQt.cpp:
+ (WebCore::ScrollbarThemeQt::paintScrollCorner): Pass ColorSpace
+ argument to fillColor() introduced in r50760
+
+2009-12-28 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Implement HTML5 <article> element.
+ https://bugs.webkit.org/show_bug.cgi?id=32936
+
+ <article> should behave the same as <nav> and <section>.
+
+ Test: fast/html/article-element.html
+
+ * css/html.css: Add article as a block element.
+ * editing/htmlediting.cpp:
+ (WebCore::validBlockTag): Add articleTag.
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::tagPriority): Returns 5 for articleTag.
+ (WebCore::blockTagList): Add articleTag.
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::getNode): Add articleTag.
+ * html/HTMLTagNames.in: Add article.
+
+2009-12-27 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Support upload progress events in XMLHttpRequest
+ https://bugs.webkit.org/show_bug.cgi?id=32969
+
+ Make QNetworkReplyHandler report the upload progress to the client.
+
+ Already covered by tests:
+ http/tests/xmlhttprequest/upload-onload-event.html
+ http/tests/xmlhttprequest/upload-onloadstart-event.html
+ http/tests/xmlhttprequest/upload-progress-events.html
+ http/tests/xmlhttprequest/upload-onprogress-event.html
+
+ which have been unskipped.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::uploadProgress):
+ (WebCore::QNetworkReplyHandler::start):
+ * platform/network/qt/QNetworkReplyHandler.h:
+
+2009-12-27 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVG: Stop rendering of objects with empty mask and filter content
+ https://bugs.webkit.org/show_bug.cgi?id=32968
+
+ It's not neccessary to continue rendering of an object and its' childs
+ if the mask clips the complete content away.
+ The same for filters, if the filter rendering is discontinued or either
+ width or height are zero.
+ We might also stop rendering if repaintRectInLocalCoordinates is empty.
+ But it needs to be fixed first.
+
+ Test: svg/custom/empty-mask.svg
+
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::paint):
+ * rendering/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::paint):
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::paint):
+ * rendering/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::paint):
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderBase::prepareToRenderSVGContent):
+ * rendering/SVGRenderSupport.h:
+ * rendering/SVGRootInlineBox.cpp:
+ (WebCore::SVGRootInlineBox::paint):
+ * svg/SVGMaskElement.cpp:
+ (WebCore::SVGMaskElement::drawMaskerContent):
+ * svg/SVGMaskElement.h:
+ * svg/graphics/SVGResourceFilter.cpp:
+ (WebCore::SVGResourceFilter::prepareFilter):
+ (WebCore::SVGResourceFilter::applyFilter):
+ * svg/graphics/SVGResourceFilter.h:
+ * svg/graphics/SVGResourceMasker.cpp:
+ (WebCore::SVGResourceMasker::SVGResourceMasker):
+ (WebCore::SVGResourceMasker::applyMask):
+ * svg/graphics/SVGResourceMasker.h:
+
+2009-12-27 Christian Dywan <christian@twotoasts.de>
+
+ Reviewed by Eric Seidel.
+
+ [GTK] Spell Check Suggestions (Do not work)
+ https://bugs.webkit.org/show_bug.cgi?id=30908
+
+ * platform/gtk/ContextMenuItemGtk.cpp:
+ (WebCore::ContextMenuItem::ContextMenuItem):
+ (WebCore::ContextMenuItem::title):
+ (WebCore::ContextMenuItem::setTitle): Implement the 'title' member
+ and set the title from the native menu item.
+
+2009-12-27 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVG Mask result wrong, if two different objects call the same mask id
+ https://bugs.webkit.org/show_bug.cgi?id=32787
+
+ At the moment we create one resource per maskId. Some resources (like mask)
+ create ImageBuffers and depends on the properties of the RenderObject,
+ thus we can't use it for a second object.
+ This patch stores multiple mask resources for one maskId and different
+ RenderObject can use the same maskId.
+ Clipper, Filter and Patterns also need to store multiple resources later.
+
+ Test: svg/custom/mask-on-multiple-objects.svg
+
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::drawMarkersIfNeeded):
+ * rendering/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::selfWillPaint):
+ * rendering/RenderSVGGradientStop.cpp:
+ (WebCore::RenderSVGGradientStop::styleDidChange):
+ * rendering/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::selfWillPaint):
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderBase::prepareToRenderSVGContent):
+ (WebCore::SVGRenderBase::filterBoundingBoxForRenderer):
+ * rendering/SVGRenderTreeAsText.cpp:
+ (WebCore::writeRenderResources):
+ * svg/SVGClipPathElement.cpp:
+ (WebCore::SVGClipPathElement::canvasResource):
+ * svg/SVGClipPathElement.h:
+ * svg/SVGFilterElement.cpp:
+ (WebCore::SVGFilterElement::canvasResource):
+ * svg/SVGFilterElement.h:
+ * svg/SVGGradientElement.cpp:
+ (WebCore::SVGGradientElement::canvasResource):
+ * svg/SVGGradientElement.h:
+ * svg/SVGMarkerElement.cpp:
+ (WebCore::SVGMarkerElement::canvasResource):
+ * svg/SVGMarkerElement.h:
+ * svg/SVGMaskElement.cpp:
+ (WebCore::SVGMaskElement::svgAttributeChanged):
+ (WebCore::SVGMaskElement::childrenChanged):
+ (WebCore::SVGMaskElement::canvasResource):
+ * svg/SVGMaskElement.h:
+ * svg/SVGPatternElement.cpp:
+ (WebCore::SVGPatternElement::canvasResource):
+ * svg/SVGPatternElement.h:
+ * svg/SVGStyledElement.cpp:
+ (WebCore::SVGStyledElement::invalidateResourcesInAncestorChain):
+ * svg/SVGStyledElement.h:
+ (WebCore::SVGStyledElement::canvasResource):
+ * svg/graphics/SVGPaintServer.cpp:
+ (WebCore::getPaintServerById):
+ (WebCore::SVGPaintServer::fillPaintServer):
+ (WebCore::SVGPaintServer::strokePaintServer):
+ * svg/graphics/SVGPaintServer.h:
+ * svg/graphics/SVGResource.cpp:
+ (WebCore::getResourceById):
+ * svg/graphics/SVGResource.h:
+ * svg/graphics/SVGResourceClipper.cpp:
+ (WebCore::getClipperById):
+ * svg/graphics/SVGResourceClipper.h:
+ * svg/graphics/SVGResourceFilter.cpp:
+ (WebCore::getFilterById):
+ * svg/graphics/SVGResourceFilter.h:
+ * svg/graphics/SVGResourceMarker.cpp:
+ (WebCore::getMarkerById):
+ * svg/graphics/SVGResourceMarker.h:
+ * svg/graphics/SVGResourceMasker.cpp:
+ (WebCore::getMaskerById):
+ * svg/graphics/SVGResourceMasker.h:
+
+2009-12-27 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Cleanup RenderPath code, related to markers. Pass around
+ PaintInfo objects instead of GraphicsContext directly, to
+ avoid having to recreate a new PaintInfo object in
+ SVGResourceMarker::draw().
+
+ No layout test changes.
+
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::paint):
+ (WebCore::DrawMarkersData::DrawMarkersData):
+ (WebCore::drawMarkerWithData):
+ (WebCore::drawStartAndMidMarkers):
+ (WebCore::RenderPath::drawMarkersIfNeeded):
+ * rendering/RenderPath.h:
+ * svg/graphics/SVGResourceMarker.cpp:
+ (WebCore::SVGResourceMarker::draw):
+ * svg/graphics/SVGResourceMarker.h:
+
+2009-12-27 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Eric Seidel.
+
+ WinCE buildfix (added missing header)
+
+ * platform/text/wince/TextBreakIteratorWince.cpp:
+
+2009-12-27 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Eric Seidel.
+
+ Buildfix after r50760 and some style fixes.
+
+ * rendering/RenderThemeWince.cpp:
+ (WebCore::RenderThemeWince::paintSearchFieldCancelButton):
+ (WebCore::RenderThemeWince::paintSliderTrack):
+ (WebCore::RenderThemeWince::paintSliderThumb):
+ (WebCore::RenderThemeWince::paintMediaMuteButton):
+ (WebCore::RenderThemeWince::paintMediaPlayButton):
+
+2009-12-27 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Adam Barth.
+
+ WinCE buildfixes (missing headers and unsupported HWND_MESSAGE)
+
+ * platform/wince/MIMETypeRegistryWince.cpp:
+ * platform/wince/SearchPopupMenuWince.cpp:
+ * platform/wince/SharedTimerWince.cpp:
+ (WebCore::initializeOffScreenTimerWindow):
+
+2009-12-26 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r52554.
+ http://trac.webkit.org/changeset/52554
+
+ https://bugs.webkit.org/show_bug.cgi?id=32955
+ The original change was covered under
+ https://bugs.webkit.org/show_bug.cgi?id=32913
+
+ r52554 was itself a rollout of r52536.
+ However it caused two layout tests to fail on Leopard:
+ storage/open-database-while-transaction-in-progress.html
+ svg/W3C-SVG-1.1/filters-conv-01-f.svg (no clue why?)
+
+ So I'm rolling out the rollout in an attempt to get the bots green.
+ r52554 did not explain why it was rolled out, so I do not know
+ what might fail for Chromium after this change. I warned the folks
+ in #chromium that it was coming.
+
+ * storage/Database.cpp:
+ (WebCore::Database::openDatabase):
+ (WebCore::Database::Database):
+ (WebCore::Database::performOpenAndVerify):
+
+2009-12-26 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/7483622> REGRESSION (r47255): Extra Large Amount of Empty Space
+ https://bugs.webkit.org/show_bug.cgi?id=32690
+
+ Test: fast/block/float/clear-to-fit.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::getClearDelta): Only clear floats as needed to
+ fit the child on the line.
+
+2009-12-25 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Implement HTML5 section element.
+ https://bugs.webkit.org/show_bug.cgi?id=32936
+
+ <section> should behave the same as <nav>.
+
+ Test: fast/html/section-element.html
+
+ * css/html.css: Add section as a block element.
+ * editing/htmlediting.cpp:
+ (WebCore::validBlockTag): Add sectionTag.
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::tagPriority): Returns 5 for sectionTag.
+ (WebCore::blockTagList): Add sectionTag.
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::getNode): Add sectionTag.
+ * html/HTMLTagNames.in: Add section.
+
+2009-12-25 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32938
+
+ Cleans up XSSAuditor.
+
+ Currently, we pass various parameters through to XSSAuditor::findInRequest
+ that are used to determine how to decode the HTTP input parameters so that
+ we can perform a match against the script source. Instead, we have defined
+ a structure XSSAuditor::FindTask that can hold all of these parameters.
+
+ No functionality was changed. So, no new tests.
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canEvaluate): Modified to use struct
+ XSSAuditor::FindTask.
+ (WebCore::XSSAuditor::canEvaluateJavaScriptURL): Ditto.
+ (WebCore::XSSAuditor::canCreateInlineEventListener): Ditto.
+ (WebCore::XSSAuditor::canLoadExternalScriptFromSrc): Ditto.
+ (WebCore::XSSAuditor::canLoadObject): Ditto.
+ (WebCore::XSSAuditor::canSetBaseElementURL): Ditto.
+ (WebCore::XSSAuditor::findInRequest): Ditto.
+ * page/XSSAuditor.h:
+ (WebCore::XSSAuditor::FindTask::FindTask): Added.
+
+2009-12-25 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ DOMWindow is missing lots of SVG* constructor objects
+ https://bugs.webkit.org/show_bug.cgi?id=20430
+
+ Expose all implemented SVG 1.1 constructors.
+
+ Test: svg/custom/global-constructors.js
+
+ * bindings/v8/V8Index.cpp: Add missing includes for SVGFontFaceElement & SVGMissingGlyphElement
+ * bindings/v8/V8Index.h: Add misisng SVGFontFaceElement & SVGMissingGlyphElement declarations.
+ * page/DOMWindow.idl: Add a bunch of new SVG object ctors.
+ * svg/SVGAnimatedPathData.idl: Add OmitConstructor flag, as this is a SVG MI class, which is not exposable at the moment.
+ * svg/SVGAnimatedPoints.idl: Ditto.
+
+2009-12-25 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ AuditsPanel for Web Inspector (hidden, no preset audits).
+
+ https://bugs.webkit.org/show_bug.cgi?id=31665
+
+ * English.lproj/localizedStrings.js:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/AuditLauncherView.js: Added.
+ (WebInspector.AuditLauncherView.categorySortFunction):
+ (WebInspector.AuditLauncherView):
+ (WebInspector.AuditLauncherView.prototype.updateResourceTrackingState):
+ (WebInspector.AuditLauncherView.prototype._setAuditRunning):
+ (WebInspector.AuditLauncherView.prototype._launchButtonClicked.profilingFinishedCallback):
+ (WebInspector.AuditLauncherView.prototype._launchButtonClicked):
+ (WebInspector.AuditLauncherView.prototype._selectAllClicked):
+ (WebInspector.AuditLauncherView.prototype._categoryClicked):
+ (WebInspector.AuditLauncherView.prototype._createCategoryElement):
+ (WebInspector.AuditLauncherView.prototype._createLauncherUI):
+ (WebInspector.AuditLauncherView.prototype._updateButton):
+ (WebInspector.AuditLauncherView.prototype.resize):
+ * inspector/front-end/AuditResultView.js: Added.
+ (WebInspector.AuditResultView.entrySortFunction):
+ (WebInspector.AuditResultView):
+ (WebInspector.AuditCategoryResultPane):
+ (WebInspector.AuditRuleResultPane):
+ (WebInspector.AuditRuleResultPane.prototype._decorateRuleResult):
+ (WebInspector.AuditRuleResultChildSection):
+ (WebInspector.AuditRuleResultChildSection.prototype.set title):
+ (WebInspector.AuditRuleResultChildSection.prototype.expand):
+ * inspector/front-end/AuditsPanel.js: Added.
+ (WebInspector.AuditsPanel):
+ (WebInspector.AuditsPanel.prototype.toolbarItemClass.get toolbarItemLabel):
+ (WebInspector.AuditsPanel.prototype.get statusBarItems):
+ (WebInspector.AuditsPanel.prototype.get mainResourceLoadTime):
+ (WebInspector.AuditsPanel.prototype.set mainResourceLoadTime):
+ (WebInspector.AuditsPanel.prototype.get mainResourceDOMContentTime):
+ (WebInspector.AuditsPanel.prototype.set mainResourceDOMContentTime):
+ (WebInspector.AuditsPanel.prototype.get categoriesById):
+ (WebInspector.AuditsPanel.prototype.get visibleView):
+ (WebInspector.AuditsPanel.prototype._constructCategories):
+ (WebInspector.AuditsPanel.prototype._executeAudit.ruleResultReadyCallback):
+ (WebInspector.AuditsPanel.prototype._executeAudit):
+ (WebInspector.AuditsPanel.prototype._auditFinishedCallback):
+ (WebInspector.AuditsPanel.prototype.initiateAudit.initiateAuditCallback):
+ (WebInspector.AuditsPanel.prototype.initiateAudit):
+ (WebInspector.AuditsPanel.prototype._reloadResources):
+ (WebInspector.AuditsPanel.prototype._didMainResourceLoad):
+ (WebInspector.AuditsPanel.prototype.showResults):
+ (WebInspector.AuditsPanel.prototype.showLauncherView):
+ (WebInspector.AuditsPanel.prototype.showView):
+ (WebInspector.AuditsPanel.prototype.show):
+ (WebInspector.AuditsPanel.prototype.attach):
+ (WebInspector.AuditsPanel.prototype.resize):
+ (WebInspector.AuditsPanel.prototype.updateMainViewWidth):
+ (WebInspector.AuditsPanel.prototype._updateLauncherViewControls):
+ (WebInspector.AuditsPanel.prototype._clearButtonClicked):
+ (WebInspector.AuditsPanel.prototype._closeVisibleView):
+ (WebInspector.AuditCategory):
+ (WebInspector.AuditCategory.prototype.get id):
+ (WebInspector.AuditCategory.prototype.get displayName):
+ (WebInspector.AuditCategory.prototype.get ruleCount):
+ (WebInspector.AuditCategory.prototype.addRule):
+ (WebInspector.AuditCategory.prototype.runRules):
+ (WebInspector.AuditRule):
+ (WebInspector.AuditRule.prototype.get id):
+ (WebInspector.AuditRule.prototype.get displayName):
+ (WebInspector.AuditRule.prototype.run):
+ (WebInspector.AuditRule.prototype.doRun):
+ (WebInspector.AuditRule.prototype.getValue):
+ (WebInspector.AuditCategoryResult):
+ (WebInspector.AuditCategoryResult.prototype.addEntry):
+ (WebInspector.AuditRuleResult):
+ (WebInspector.AuditRuleResult.prototype.appendChild):
+ (WebInspector.AuditRuleResult.prototype.set type):
+ (WebInspector.AuditRuleResult.prototype.get type):
+ (WebInspector.AuditsSidebarTreeElement):
+ (WebInspector.AuditsSidebarTreeElement.prototype.onattach):
+ (WebInspector.AuditsSidebarTreeElement.prototype.onselect):
+ (WebInspector.AuditsSidebarTreeElement.prototype.get selectable):
+ (WebInspector.AuditsSidebarTreeElement.prototype.refresh):
+ (WebInspector.AuditResultSidebarTreeElement):
+ (WebInspector.AuditResultSidebarTreeElement.prototype.onselect):
+ (WebInspector.AuditResultSidebarTreeElement.prototype.get selectable):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/audits.css: Added.
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector._createPanels):
+ (WebInspector.updateResource):
+
+2009-12-25 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Implement Edit Inner HTML action.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32924
+
+ * English.lproj/localizedStrings.js:
+ * bindings/js/JSInjectedScriptHostCustom.cpp:
+ (WebCore::JSInjectedScriptHost::pushNodePathToFrontend):
+ * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
+ (WebCore::V8InjectedScriptHost::pushNodePathToFrontendCallback):
+ * inspector/InjectedScriptHost.cpp:
+ (WebCore::InjectedScriptHost::pushNodePathToFrontend):
+ * inspector/InjectedScriptHost.h:
+ * inspector/InjectedScriptHost.idl:
+ * inspector/InspectorDOMAgent.h:
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.show):
+ (WebInspector.ElementsPanel.prototype._updateModifiedNodesSoon):
+ (WebInspector.ElementsPanel.prototype.updateModifiedNodes):
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
+ (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML.commit):
+ (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML.dispose):
+ (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML):
+ ():
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.getNodePropertyValue):
+ (InjectedScript.setOuterHTML):
+ (InjectedScript.performSearch.addNodesToResults):
+ (InjectedScript._inspectObject):
+ (InjectedScript._copy):
+ (InjectedScript.pushNodeToFrontend):
+ * inspector/front-end/InjectedScriptAccess.js:
+ * inspector/front-end/InspectorFrontendHostStub.js:
+ (.WebInspector.InspectorFrontendHostStub.prototype.hiddenPanels):
+ (.WebInspector.InspectorFrontendHostStub.prototype.windowUnloading):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.js:
+ (WebInspector.startEditing.keyDownEventListener):
+ (WebInspector.startEditing):
+
+2009-12-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Console should force long URLs to wrap
+ https://bugs.webkit.org/show_bug.cgi?id=32927
+
+ * inspector/front-end/inspector.css: Added "word-wrap: break-word;" to
+ the #console-messages rule.
+
+2009-12-24 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Unreviewed Chromium test fix by reverting r52536.
+
+ Do not a new Database pointer to any structure until its version has been verified
+ https://bugs.webkit.org/show_bug.cgi?id=32913
+
+ * storage/Database.cpp:
+ (WebCore::Database::openDatabase):
+ (WebCore::Database::Database):
+ (WebCore::Database::performOpenAndVerify):
+
+2009-12-24 Jessie Berlin <jberlin@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for WebKit bug 29968 - Selecting text with text-overflow ellipsis
+ should not show cut off text
+ https://bugs.webkit.org/show_bug.cgi?id=29968
+
+ Also fixes the issue on both Mac OS X and Windows where the highlight
+ would extend only partway into the ellipsis based on the size of the
+ characters being truncated.
+
+ Test: editing/selection/select-text-overflow-ellipsis.html
+
+ * rendering/EllipsisBox.cpp:
+ (WebCore::EllipsisBox::paint):
+ When the ellipsis have been selected, paints them with the color for
+ selected text.
+ (WebCore::EllipsisBox::selectionRect):
+ Returns the selection rect for the ellipsis text.
+ (WebCore::EllipsisBox::paintSelection):
+ Paints the selection highlight around the ellipsis text.
+
+ * rendering/EllipsisBox.h:
+ (WebCore::EllipsisBox::EllipsisBox):
+ Default the selection state of the EllipsisBox to SelectionNone.
+ (WebCore::EllipsisBox::setSelectionState):
+ Allow the selection state to be explicitly set by the InlineTextBox
+ that it is associated with, since the selection state depends on the
+ position of the selection within the truncated text.
+ (WebCore::EllipsisBox::selectionState):
+ Return the cached selection state.
+
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::selectionState):
+ If the text is truncated and the selection extends into the truncation
+ where there are ellipsis, set the selection state on the EllipsisBox.
+ (WebCore::paintTextWithShadows):
+ Allow for an upper bound to be specified on the maximum length of the
+ text to be painted.
+ (WebCore::InlineTextBox::paint):
+ Make sure the text that is drawn gets appropriately truncated. This was
+ not an issue before on Mac OS X because it wasn't necessary to draw the
+ selected text separately (the selected text had the same color as the
+ non-selected text).
+ (WebCore::InlineTextBox::paintSelection):
+ If the text is being truncated, let whatever is being painted in the
+ space after the truncated text paint its own highlight.
+
+ * rendering/InlineTextBox.h:
+ (WebCore::InlineTextBox::truncation):
+ Allow RenderText to access the truncation status.
+
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::selectionRectForRepaint):
+ Make sure that any ellipsis box that falls within the selection also
+ gets repainted.
+
+2009-12-24 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: add Settings.js class that would manage
+ frontend settings.
+
+ This change:
+ - Splits preferences and settings
+ - Pushes settings to the frontend on load
+ - Stores settings on each change
+ - Stores showInheritedStyles as setting.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32832
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::saveFrontendSettings):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::populateScriptObjects):
+ * inspector/InspectorController.h:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::populateFrontendSettings):
+ * inspector/InspectorFrontend.h:
+ * inspector/InspectorFrontendHost.cpp:
+ * inspector/InspectorFrontendHost.h:
+ * inspector/InspectorFrontendHost.idl:
+ * inspector/front-end/EventListenersSidebarPane.js:
+ (WebInspector.EventListenersSidebarPane.prototype._settingsLoaded):
+ (WebInspector.EventListenersSidebarPane.prototype):
+ ():
+ * inspector/front-end/InspectorBackendStub.js:
+ (.WebInspector.InspectorBackendStub):
+ (.WebInspector.InspectorBackendStub.prototype.saveFrontendSettings):
+ (.WebInspector.InspectorBackendStub.prototype.releaseWrapperObjectGroup):
+ * inspector/front-end/InspectorFrontendHostStub.js:
+ (.WebInspector.InspectorFrontendHostStub):
+ (.WebInspector.InspectorFrontendHostStub.prototype.hiddenPanels):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype._createStatusbarButtons):
+ (WebInspector.ResourcesPanel.prototype._settingsLoaded):
+ (WebInspector.ResourcesPanel.prototype._toggleLargerResources):
+ (WebInspector.ResourcesPanel.prototype._setLargerResources):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
+ (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu):
+ * inspector/front-end/Settings.js: Added.
+ (WebInspector.populateFrontendSettings):
+ (WebInspector.Settings):
+ (WebInspector.Settings.prototype._load):
+ (WebInspector.Settings.prototype._installSetting):
+ (WebInspector.Settings.prototype._get):
+ (WebInspector.Settings.prototype._set):
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylesSidebarPane.prototype._settingsLoaded):
+ (WebInspector.StylesSidebarPane.prototype.update):
+ (WebInspector.StylesSidebarPane.prototype._changeSetting):
+ (WebInspector.StylesSidebarPane.prototype._changeColorFormat):
+ (WebInspector.StylePropertiesSection.showInheritedToggleFunction):
+ (WebInspector.StylePropertiesSection):
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSidebarPane):
+ (WebInspector.WatchExpressionsSidebarPane.prototype._settingsLoaded):
+ (WebInspector.WatchExpressionsSidebarPane.prototype.refreshExpressions):
+ (WebInspector.WatchExpressionsSection):
+ (WebInspector.WatchExpressionsSection.prototype.saveExpressions):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+
+2009-12-23 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: [REGRESSION] console's clear command does not work.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32897
+
+ Test: inspector/console-clear.html
+
+ * inspector/InjectedScriptHost.cpp:
+ (WebCore::InjectedScriptHost::clearConsoleMessages):
+ * inspector/InjectedScriptHost.h:
+ * inspector/InjectedScriptHost.idl:
+ * inspector/InspectorBackend.cpp:
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::clearConsoleMessages):
+ (WebCore::InspectorController::didCommitLoad):
+ * inspector/InspectorController.h:
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView):
+ (WebInspector.ConsoleView.prototype.requestClearConsoleMessages):
+ (WebInspector.ConsoleView.prototype.clearConsoleMessages):
+ (WebInspector.ConsoleView.prototype._clearButtonClicked):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.clearConsoleMessages):
+ (InjectedScript._ensureCommandLineAPIInstalled):
+ * inspector/front-end/InjectedScriptAccess.js:
+ * inspector/front-end/inspector.js:
+ (WebInspector.clearConsoleMessages):
+ (WebInspector.reset):
+
+2009-12-23 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Console dumps strings in escaped form.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32488
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleMessage.prototype._formatIndividualValue):
+
+2009-12-23 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32905
+ With Pinyin Simplified IM, a wrong character is deleted from google.com suggestion
+
+ Test: platform/mac/editing/input/selection-change-closes-typing.html
+
+ * editing/Editor.cpp: (WebCore::Editor::confirmComposition): If this function wasn't allowed
+ to change selection, it needs to close the current typing command - otherwise, its idea of
+ selection would be used for future typing.
+
+2009-12-23 Yuta Kitamura <yutak@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ PlatformContextSkia::beginLayerClippedToImage() needs to clip outside of the image.
+
+ This method should limit the current painting window to the bounds of the given
+ image, but it did not. Due to this bug, unnecessary contents were rendered in
+ some (limited) situations.
+
+ [Skia] PlatformContextSkia::beginLayerClippedToImage does not clip outside of the image
+ https://bugs.webkit.org/show_bug.cgi?id=32817
+
+ No new tests, because this is a fix of an existing test which is currently failing in
+ Chromium.
+
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::beginLayerClippedToImage): Add clipRect() call.
+
+2009-12-23 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Rubber-stamped by Eric Seidel.
+
+ Remove all references to "GenerateConstructor", as this is the default behaviour now.
+
+ * css/CSSCharsetRule.idl:
+ * css/CSSFontFaceRule.idl:
+ * css/CSSImportRule.idl:
+ * css/CSSMediaRule.idl:
+ * css/CSSPageRule.idl:
+ * css/CSSPrimitiveValue.idl:
+ * css/CSSRule.idl:
+ * css/CSSRuleList.idl:
+ * css/CSSStyleDeclaration.idl:
+ * css/CSSStyleRule.idl:
+ * css/CSSStyleSheet.idl:
+ * css/CSSValue.idl:
+ * css/CSSValueList.idl:
+ * css/CSSVariablesDeclaration.idl:
+ * css/CSSVariablesRule.idl:
+ * css/Counter.idl:
+ * css/Media.idl:
+ * css/MediaList.idl:
+ * css/RGBColor.idl:
+ * css/Rect.idl:
+ * css/StyleSheet.idl:
+ * css/StyleSheetList.idl:
+ * css/WebKitCSSKeyframeRule.idl:
+ * css/WebKitCSSKeyframesRule.idl:
+ * css/WebKitCSSTransformValue.idl:
+ * dom/Attr.idl:
+ * dom/BeforeLoadEvent.idl:
+ * dom/CDATASection.idl:
+ * dom/CharacterData.idl:
+ * dom/ClientRect.idl:
+ * dom/ClientRectList.idl:
+ * dom/Clipboard.idl:
+ * dom/Comment.idl:
+ * dom/CompositionEvent.idl:
+ * dom/DOMCoreException.idl:
+ * dom/DOMImplementation.idl:
+ * dom/Document.idl:
+ * dom/DocumentFragment.idl:
+ * dom/DocumentType.idl:
+ * dom/Element.idl:
+ * dom/Entity.idl:
+ * dom/EntityReference.idl:
+ * dom/ErrorEvent.idl:
+ * dom/Event.idl:
+ * dom/EventException.idl:
+ * dom/KeyboardEvent.idl:
+ * dom/MessageEvent.idl:
+ * dom/MessagePort.idl:
+ * dom/MouseEvent.idl:
+ * dom/MutationEvent.idl:
+ * dom/NamedNodeMap.idl:
+ * dom/Node.idl:
+ * dom/NodeFilter.idl:
+ * dom/NodeIterator.idl:
+ * dom/NodeList.idl:
+ * dom/Notation.idl:
+ * dom/OverflowEvent.idl:
+ * dom/PageTransitionEvent.idl:
+ * dom/PopStateEvent.idl:
+ * dom/ProcessingInstruction.idl:
+ * dom/ProgressEvent.idl:
+ * dom/Range.idl:
+ * dom/RangeException.idl:
+ * dom/Text.idl:
+ * dom/TextEvent.idl:
+ * dom/Touch.idl:
+ * dom/TouchEvent.idl:
+ * dom/TouchList.idl:
+ * dom/TreeWalker.idl:
+ * dom/UIEvent.idl:
+ * dom/WebKitAnimationEvent.idl:
+ * dom/WebKitTransitionEvent.idl:
+ * dom/WheelEvent.idl:
+ * html/DataGridColumn.idl:
+ * html/DataGridColumnList.idl:
+ * html/File.idl:
+ * html/FileList.idl:
+ * html/HTMLAllCollection.idl:
+ * html/HTMLAnchorElement.idl:
+ * html/HTMLAppletElement.idl:
+ * html/HTMLAreaElement.idl:
+ * html/HTMLAudioElement.idl:
+ * html/HTMLBRElement.idl:
+ * html/HTMLBaseElement.idl:
+ * html/HTMLBaseFontElement.idl:
+ * html/HTMLBlockquoteElement.idl:
+ * html/HTMLBodyElement.idl:
+ * html/HTMLButtonElement.idl:
+ * html/HTMLCanvasElement.idl:
+ * html/HTMLCollection.idl:
+ * html/HTMLDListElement.idl:
+ * html/HTMLDataGridCellElement.idl:
+ * html/HTMLDataGridColElement.idl:
+ * html/HTMLDataGridElement.idl:
+ * html/HTMLDataGridRowElement.idl:
+ * html/HTMLDataListElement.idl:
+ * html/HTMLDirectoryElement.idl:
+ * html/HTMLDivElement.idl:
+ * html/HTMLDocument.idl:
+ * html/HTMLElement.idl:
+ * html/HTMLEmbedElement.idl:
+ * html/HTMLFieldSetElement.idl:
+ * html/HTMLFontElement.idl:
+ * html/HTMLFormElement.idl:
+ * html/HTMLFrameElement.idl:
+ * html/HTMLFrameSetElement.idl:
+ * html/HTMLHRElement.idl:
+ * html/HTMLHeadElement.idl:
+ * html/HTMLHeadingElement.idl:
+ * html/HTMLHtmlElement.idl:
+ * html/HTMLIFrameElement.idl:
+ * html/HTMLImageElement.idl:
+ * html/HTMLInputElement.idl:
+ * html/HTMLIsIndexElement.idl:
+ * html/HTMLLIElement.idl:
+ * html/HTMLLabelElement.idl:
+ * html/HTMLLegendElement.idl:
+ * html/HTMLLinkElement.idl:
+ * html/HTMLMapElement.idl:
+ * html/HTMLMarqueeElement.idl:
+ * html/HTMLMediaElement.idl:
+ * html/HTMLMenuElement.idl:
+ * html/HTMLMetaElement.idl:
+ * html/HTMLModElement.idl:
+ * html/HTMLOListElement.idl:
+ * html/HTMLObjectElement.idl:
+ * html/HTMLOptGroupElement.idl:
+ * html/HTMLOptionElement.idl:
+ * html/HTMLParagraphElement.idl:
+ * html/HTMLParamElement.idl:
+ * html/HTMLPreElement.idl:
+ * html/HTMLQuoteElement.idl:
+ * html/HTMLScriptElement.idl:
+ * html/HTMLSelectElement.idl:
+ * html/HTMLSourceElement.idl:
+ * html/HTMLStyleElement.idl:
+ * html/HTMLTableCaptionElement.idl:
+ * html/HTMLTableCellElement.idl:
+ * html/HTMLTableColElement.idl:
+ * html/HTMLTableElement.idl:
+ * html/HTMLTableRowElement.idl:
+ * html/HTMLTableSectionElement.idl:
+ * html/HTMLTextAreaElement.idl:
+ * html/HTMLTitleElement.idl:
+ * html/HTMLUListElement.idl:
+ * html/HTMLVideoElement.idl:
+ * html/ImageData.idl:
+ * html/MediaError.idl:
+ * html/TextMetrics.idl:
+ * html/canvas/CanvasNumberArray.idl:
+ * html/canvas/CanvasRenderingContext.idl:
+ * html/canvas/CanvasRenderingContext2D.idl:
+ * html/canvas/WebGLRenderingContext.idl:
+ * inspector/InjectedScriptHost.idl:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorFrontendHost.idl:
+ * page/PositionError.idl:
+ * plugins/MimeType.idl:
+ * plugins/MimeTypeArray.idl:
+ * plugins/Plugin.idl:
+ * plugins/PluginArray.idl:
+ * storage/Storage.idl:
+ * storage/StorageEvent.idl:
+ * svg/SVGAngle.idl:
+ * svg/SVGColor.idl:
+ * svg/SVGComponentTransferFunctionElement.idl:
+ * svg/SVGException.idl:
+ * svg/SVGFEBlendElement.idl:
+ * svg/SVGFEColorMatrixElement.idl:
+ * svg/SVGFECompositeElement.idl:
+ * svg/SVGFEDisplacementMapElement.idl:
+ * svg/SVGFEFloodElement.idl:
+ * svg/SVGFEMorphologyElement.idl:
+ * svg/SVGFETurbulenceElement.idl:
+ * svg/SVGGradientElement.idl:
+ * svg/SVGLength.idl:
+ * svg/SVGMarkerElement.idl:
+ * svg/SVGPaint.idl:
+ * svg/SVGPathSeg.idl:
+ * svg/SVGPreserveAspectRatio.idl:
+ * svg/SVGRenderingIntent.idl:
+ * svg/SVGTextContentElement.idl:
+ * svg/SVGTextPathElement.idl:
+ * svg/SVGTransform.idl:
+ * svg/SVGUnitTypes.idl:
+ * svg/SVGZoomAndPan.idl:
+ * workers/AbstractWorker.idl:
+ * workers/WorkerLocation.idl:
+ * xml/DOMParser.idl:
+ * xml/XMLHttpRequestException.idl:
+ * xml/XMLHttpRequestProgressEvent.idl:
+ * xml/XMLHttpRequestUpload.idl:
+ * xml/XMLSerializer.idl:
+ * xml/XPathEvaluator.idl:
+ * xml/XPathException.idl:
+ * xml/XPathExpression.idl:
+ * xml/XPathResult.idl:
+
+2009-12-23 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ A new database should be registered with the Document,
+ DatabaseTracker and DatabaseThread only after it was successfully
+ opened and its version was successfully verified.
+
+ Fixes a regression introduced by
+ http://trac.webkit.org/changeset/52530.
+
+ LayoutTests/storage/open-database-while-transaction-in-progress.html
+ should pass again (or rather, it should pass again when run after
+ open-database-set-empty-version.html).
+
+ https://bugs.webkit.org/show_bug.cgi?id=32913
+
+ * storage/Database.cpp:
+ (WebCore::Database::openDatabase):
+ (WebCore::Database::Database):
+ (WebCore::Database::performOpenAndVerify):
+
+2009-12-23 David Levin <levin@chromium.org>
+
+ REGRESSION (r52494): Assertion failure in Frame::caretBlinkTimerFired() (selection()->isCaret())
+ https://bugs.webkit.org/show_bug.cgi?id=32903
+
+ No review but ok'ed by Darin Adler. Rolling out r52494 due to above regression.
+
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::SelectionController):
+ (WebCore::SelectionController::setSelection):
+ * editing/SelectionController.h:
+ * page/Frame.cpp:
+ (WebCore::Frame::setCaretVisible):
+ (WebCore::Frame::selectionLayoutChanged):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::needsLayout):
+
+2009-12-23 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ Reverse JS GenerateConstructor logic
+ https://bugs.webkit.org/show_bug.cgi?id=32910
+
+ Make 'GenerateConstructor' the default setting for all classes, defined in IDL files. The flag is now obsolete and
+ can be removed from all IDL files in a follow-up patch. Add new 'OmitConstructor' flag, that allows to restore the
+ old default behaviour: do not generate JSFoobarConstructor class.
+
+ No change in functionality, despite the fact that we're generating a lot more constructors now, as they have to
+ be exposed through DOMWindow.idl -- this can be done per affected class in follow-up patches. Especially the SVG
+ classes have to be exposed, most of them are missing JS constructors so far.
+
+ As side effect HTMLOptionsCollection is now correctly exposing its constructor, thus fixing a test in fast/dom/wrapper-classes.html
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * css/CSSUnknownRule.idl:
+ * css/WebKitCSSMatrix.idl:
+ * dom/EventListener.idl:
+ * dom/EventTarget.idl:
+ * dom/MessageChannel.idl:
+ * html/TimeRanges.idl:
+ * html/ValidityState.idl:
+ * html/VoidCallback.idl:
+ * html/canvas/CanvasGradient.idl:
+ * html/canvas/CanvasPattern.idl:
+ * html/canvas/CanvasPixelArray.idl:
+ * html/canvas/WebGLActiveInfo.idl:
+ * html/canvas/WebGLArray.idl:
+ * html/canvas/WebGLArrayBuffer.idl:
+ * html/canvas/WebGLBuffer.idl:
+ * html/canvas/WebGLByteArray.idl:
+ * html/canvas/WebGLFloatArray.idl:
+ * html/canvas/WebGLFramebuffer.idl:
+ * html/canvas/WebGLIntArray.idl:
+ * html/canvas/WebGLProgram.idl:
+ * html/canvas/WebGLRenderbuffer.idl:
+ * html/canvas/WebGLShader.idl:
+ * html/canvas/WebGLShortArray.idl:
+ * html/canvas/WebGLTexture.idl:
+ * html/canvas/WebGLUniformLocation.idl:
+ * html/canvas/WebGLUnsignedByteArray.idl:
+ * html/canvas/WebGLUnsignedIntArray.idl:
+ * html/canvas/WebGLUnsignedShortArray.idl:
+ * inspector/JavaScriptCallFrame.idl:
+ * loader/appcache/DOMApplicationCache.idl:
+ * notifications/Notification.idl:
+ * notifications/NotificationCenter.idl:
+ * page/AbstractView.idl:
+ * page/BarInfo.idl:
+ * page/Console.idl:
+ * page/Coordinates.idl:
+ * page/DOMSelection.idl:
+ * page/DOMWindow.idl:
+ * page/EventSource.idl:
+ * page/Geolocation.idl:
+ * page/Geoposition.idl:
+ * page/History.idl:
+ * page/Location.idl:
+ * page/Navigator.idl:
+ * page/Screen.idl:
+ * page/WebKitPoint.idl:
+ * page/WorkerNavigator.idl:
+ * storage/Database.idl:
+ * storage/SQLError.idl:
+ * storage/SQLResultSet.idl:
+ * storage/SQLResultSetRowList.idl:
+ * storage/SQLTransaction.idl:
+ * websockets/WebSocket.idl:
+ * workers/DedicatedWorkerContext.idl:
+ * workers/SharedWorker.idl:
+ * workers/SharedWorkerContext.idl:
+ * workers/Worker.idl:
+ * workers/WorkerContext.idl:
+ * xml/XMLHttpRequest.idl:
+ * xml/XPathNSResolver.idl:
+ * xml/XSLTProcessor.idl:
+
+2009-12-23 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ "Refused to execute a JavaScript script" error when embedding SWF with
+ a URL that is also a query parameter
+ https://bugs.webkit.org/show_bug.cgi?id=32908
+
+ Don't block direct injections into the object src attribute unless
+ there's an illegal character (like < or ") in the URL. This change
+ lets some very unusual vulnerabilities through the filter but removes a
+ false positive that we've seen several times.
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canLoadObject):
+
+2009-12-23 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Remove pointers to a database that failed to open from the
+ DatabaseTracker and Document.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32885
+
+ * storage/Database.cpp:
+ (WebCore::Database::openDatabase):
+
+2009-12-23 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7487164> First line of text cannot be selected
+ https://bugs.webkit.org/show_bug.cgi?id=32749
+
+ Test: fast/text/remove-zero-length-run.html
+
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::positionLineBox): Changed code that assumed that if a box was being
+ removed, it was the only box in the RenderText. Instead, correctly preserve the list of
+ text boxes.
+ (WebCore::RenderText::checkConsistency): Updated for earlier rename.
+
+2009-12-18 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for newlines turning into missing-gyphs when using SVG fonts
+
+ https://bugs.webkit.org/show_bug.cgi?id=32710
+
+ Font::drawText() has three code paths:
+
+ - drawTextUsingSVGFont()
+ - drawSimpleText()
+ - drawComplexText()
+
+ The latter two both have logic to replace newlines and tabs, as well
+ as a few other control characters that are considered spaces, with
+ spaces, before actually drawing the text. Previously the SVG font
+ path did not have this kind of logic.
+
+ This change introduces two helper functions in Font to do this space
+ replacement, which are then used for the simple path, the SVG path,
+ and the Qt implementation of the complex path.
+
+ Test: svg/custom/svg-fonts-in-html-linebreaks.html
+
+ * platform/graphics/Font.cpp:
+ (WebCore::Font::normalizeSpaces): Helper function
+ * platform/graphics/Font.h:
+ * platform/graphics/FontFastPath.cpp:
+ (WebCore::Font::glyphDataForCharacter): Use helper
+ * platform/graphics/qt/FontQt.cpp:
+ (WebCore::fromRawDataWithoutRef): Rename from "qstring"
+ (WebCore::Font::drawComplexText): Use helper
+ (WebCore::Font::floatWidthForComplexText): Use helper
+ (WebCore::Font::offsetForPositionForComplexText): Use helper
+ (WebCore::Font::selectionRectForComplexText): Use helper
+ * platform/text/CharacterNames.h: Add enum for 0x0020
+ * svg/SVGFont.cpp: Use helper to fix bug
+ (WebCore::SVGTextRunWalker::walk):
+
+2009-12-23 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ HTMLInputElement::valueAsDate getter support.
+ https://bugs.webkit.org/show_bug.cgi?id=32876
+
+ To implement the valueAsDate getter,
+ - Add a method to calculate milliseconds from 1970-01-01 to ISODateTime.
+ - Introduce m_type field to ISODateTime.
+
+ Tests: fast/forms/input-valueasdate-date.html
+ fast/forms/input-valueasdate-datetime.html
+ fast/forms/input-valueasdate-datetimelocal.html
+ fast/forms/input-valueasdate-month.html
+ fast/forms/input-valueasdate-time.html
+ fast/forms/input-valueasdate-week.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::valueAsDate):
+ Implement it with ISODateTime::millisecondsSinceEpoch().
+ (WebCore::HTMLInputElement::formStringToISODateTime):
+ Early exit for a null String. This avoids assertion failures in ISODateTime::parse*().
+ * html/ISODateTime.cpp:
+ (WebCore::ISODateTime::parseMonth): Sets m_type.
+ (WebCore::ISODateTime::parseDate): ditto.
+ (WebCore::ISODateTime::parseWeek): ditto.
+ (WebCore::ISODateTime::parseTime): ditto.
+ (WebCore::ISODateTime::parseDateTimeLocal): ditto.
+ (WebCore::ISODateTime::parseDateTime): ditto.
+ (WebCore::ISODateTime::millisecondsSinceEpochForTime): Added.
+ (WebCore::ISODateTime::millisecondsSinceEpoch): Added.
+ * html/ISODateTime.h:
+ (WebCore::ISODateTime::ISODateTime):
+ (WebCore::ISODateTime::invalidMilliseconds):
+
+2009-12-22 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32799
+
+ Renames enums in RenderStyleConstants::EListStyleType to conform to
+ the WebKit Code Style Guidelines.
+
+ No functionality was changed. So, no new tests.
+
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator EListStyleType):
+ * rendering/RenderListItem.cpp:
+ (WebCore::RenderListItem::styleDidChange):
+ * rendering/RenderListMarker.cpp:
+ (WebCore::listMarkerText):
+ (WebCore::RenderListMarker::paint):
+ (WebCore::RenderListMarker::calcPrefWidths):
+ (WebCore::RenderListMarker::updateMargins):
+ (WebCore::RenderListMarker::getRelativeMarkerRect):
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::initialListStyleType):
+ * rendering/style/RenderStyleConstants.h:
+ (WebCore::):
+
+2009-12-22 James Su <suzhe@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Keyboard shortcut in dropdown not working.
+ https://bugs.webkit.org/show_bug.cgi?id=32008
+
+ Consider PlatformKeyboardEvent::Char type event as character type
+ event on all platforms. It fixes the "type ahead find" feature
+ of the popup listbox on Linux and Mac platforms.
+
+ Merge the case-sensitive type ahead find fix from
+ WebCore/dom/SelectElement.cpp. See
+ https://bugs.webkit.org/show_bug.cgi?id=29103
+
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::isCharacterTypeEvent):
+
+2009-12-22 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] The "Search" input type is not rendered correctly when styled.
+ https://bugs.webkit.org/show_bug.cgi?id=32417
+
+ There are no new tests because only pixel tests may be affected by
+ this change and those changes can only be done on the build bot.
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::paintSearchField):
+ Since currently we paint the Search control as a QLineEdit, I have
+ deferred painting to WebCore, as in the case of the text input so
+ that the painting is consistent.
+
+2009-12-22 Yongjun Zhang <yongjun.zhang@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32121
+ [Qt] implement ImageDecoderQt::clearFrameBufferCache().
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::initializeDecoder):
+ (WebCore::ImageDecoderQt::setData):
+ (WebCore::ImageDecoderQt::clearFrameBufferCache):
+ * platform/graphics/qt/ImageDecoderQt.h:
+
+2009-12-22 Nayan Kumar K <nayankk@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Fix assert failure with WML pages having 'Refresh' task in
+ 'onenterforward' event.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30989
+
+ Writing Layout test is not possible. Please refer to the discussion
+ in bug id #30989. A sample test case is attached in BugZilla.
+
+ * wml/WMLCardElement.cpp:
+ (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded):
+
+2009-12-22 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ ASSERTION FAILED: m_numNodeListCaches
+ https://bugs.webkit.org/show_bug.cgi?id=19526
+ <rdar://problem/7431572>
+
+ Test: fast/dom/NodeList/adoptNode-node-list-cache.html
+
+ * dom/Node.cpp:
+ (WebCore::Node::setDocument): Call removeNodeListCache on the old
+ document and addNodeListCache on the new one if moving a node that
+ has node lists.
+
+2009-12-22 Darin Adler <darin@apple.com>
+
+ First cut at fixing Windows build.
+
+ * WebCorePrefix.cpp: Touch it.
+
+2009-12-22 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Turn off datagrid by default, at least for all platforms Apple ships.
+ The datagrid implementation isn't ready for general web use yet.
+
+ * Configurations/FeatureDefines.xcconfig: Turn off datagrid by default.
+ * WebCore.vcproj/WebCoreCommon.vsprops: Ditto.
+ * WebCore.vcproj/build-generated-files.sh: Ditto.
+ * page/DOMWindow.idl: Sorted things here to touch the file to give
+ the Windows build a slightly better chance of success.
+
+2009-12-22 Darin Adler <darin@apple.com>
+
+ Rubber stamped by Dan Bernstein.
+
+ * page/FrameView.h: Removed incorrect comment.
+
+2009-12-22 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: simplify highlighter definition.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32869
+
+ * inspector/front-end/CSSSourceSyntaxHighlighter.js:
+ (WebInspector.CSSSourceSyntaxHighlighter):
+ * inspector/front-end/JavaScriptSourceSyntaxHighlighter.js:
+ (WebInspector.JavaScriptSourceSyntaxHighlighter.):
+ (WebInspector.JavaScriptSourceSyntaxHighlighter):
+ * inspector/front-end/SourceSyntaxHighlighter.js:
+ (WebInspector.SourceSyntaxHighlighter.prototype.lex):
+ * inspector/front-end/utilities.js:
+ ():
+
+2009-12-21 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Reentrancy problem with selection in some edge cases.
+ https://bugs.webkit.org/show_bug.cgi?id=32842
+ rdar://problem/7449974
+
+ Test: fast/forms/selection-layout-reentry-strange-case.html
+
+ Move the selection display update process done in the
+ selectionLayoutChanged function into the layout timer
+ instead of doing it immediately when selection changes occur.
+
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::SelectionController):
+ Initialize m_needsDisplayUpdate to false.
+ (WebCore::SelectionController::setSelection): Call
+ the new setNeedsDisplayUpdate function instead of the old
+ badly named Frame::selectionLayoutChanged function.
+ (WebCore::SelectionController::setNeedsDisplayUpdate):
+ Set m_needsDisplayUpdate. If it is just becoming true, then
+ call FrameView::scheduleRelayout.
+
+ * editing/SelectionController.h: Added setNeedsDisplayUpdate,
+ needsDisplayUpdate, and m_needsDisplayUpdate.
+
+ * page/Frame.cpp:
+ (WebCore::Frame::setCaretVisible): Call setNeedsDisplayUpdate.
+ (WebCore::Frame::selectionLayoutChanged): Call
+ setNeedsDisplayUpdate to set it to false, since this is the
+ function that performs "selection display update". Later I want
+ to rename this function.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::needsLayout): Add a new clause, since
+ we need a call to layout if needsDisplayUpdate is true.
+
+2009-12-22 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Darin Adler.
+
+ Allocate RemoteFontStream on the heap
+ https://bugs.webkit.org/show_bug.cgi?id=32850
+
+ RemoteFontStream is allocated on the stack, so its memory is freed
+ immediately when FontCustomPlatformData::createFontCustomPlatformData
+ returns.
+
+ SkTypeface::CreateFromStream increments the reference count, but it keeps
+ the pointer to the memory allocated on the stack which is not valid
+ anymore.
+
+ RemoteFontStream is a descendant of SkRefCount and SkRefCount::unref
+ invokes SkDELETE(this) internally once the reference count reaches zero.
+ This means that SkRefCount-ed instances must be allocated on the heap.
+
+ * platform/graphics/chromium/FontCustomPlatformData.cpp:
+ (WebCore::createFontCustomPlatformData):
+
+2009-12-22 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Darin Adler.
+
+ when condition COMPILER(RVCT) is fulfilled, we are trying to free a pointer to array allocated on the stack
+ https://bugs.webkit.org/show_bug.cgi?id=32861
+
+ Don't free the pointer for COMPILER(RVCT).
+
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::XMLTokenizer::error):
+
+2009-12-22 Sam Weinig <sam@webkit.org>
+
+ Rubber-stamped by Dan Bernstein.
+
+ Remove no longer necessary experimental single view #ifdefs from Widget and
+ ScrollView.
+
+ * page/Chrome.h:
+ * page/mac/ChromeMac.mm:
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::wheelEvent):
+ * platform/Widget.cpp:
+ * platform/Widget.h:
+ * platform/mac/ScrollViewMac.mm:
+ * platform/mac/WidgetMac.mm:
+
+2009-12-21 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Do not lose original request for non-main resource redirects.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32678
+
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::appendRedirect):
+ * inspector/front-end/Resource.js:
+ (WebInspector.Resource):
+ * inspector/front-end/inspector.js:
+ (WebInspector.updateResource):
+
+2009-12-21 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Eric Seidel.
+
+ Use ASSERT instead of assert in image-decoders
+ https://bugs.webkit.org/show_bug.cgi?id=32852
+
+ Other decoders use WTF's ASSERT macro.
+ Follow this convention.
+
+ * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+ (WebCore::JPEGImageReader::decode):
+ * platform/image-decoders/png/PNGImageDecoder.cpp:
+ (WebCore::PNGImageDecoder::headerAvailable):
+
+2009-12-21 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Eric Seidel.
+
+ Use vsnprintf instead of vasprintf for RVCT.
+ https://bugs.webkit.org/show_bug.cgi?id=32851
+
+ RVCT does not support vasprint, so use vsnprintf instead.
+
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::XMLTokenizer::error):
+
+2009-12-21 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Invalid url should raise SYNTAX_ERR exception.
+ https://bugs.webkit.org/show_bug.cgi?id=32700
+
+ Check url is valid in WebSocket::connect.
+ Also log the detailed reason of websocket failures to console.
+
+ * websockets/WebSocket.cpp:
+ (WebCore::encodeProtocolString):
+ (WebCore::WebSocket::connect):
+
+2009-12-21 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Make sure that we check for the right thread.
+
+ * platform/mac/WebCoreObjCExtras.mm:
+ (WebCoreObjCScheduleDeallocateOnMainThread):
+
+2009-12-21 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ REGRESSION(4.0.4-ToT): Indent deletes non highlighted text in gmail.
+ <rdar://problem/7489326>
+ https://bugs.webkit.org/show_bug.cgi?id=32843
+
+ The fix for 7442387 did not handle the case where the end of paragraph
+ is not a descendant of the computed outer block.
+ Updated editing/execCommand/indent-with-style2.html to cover this case too.
+
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
+
+2009-12-21 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32831
+ Replace UString::Rep implementation, following introduction of ropes to JSC.
+
+ * ForwardingHeaders/runtime/UStringImpl.h: Added.
+ - add forwarding header.
+
+ * platform/text/StringImpl.cpp:
+ (WebCore::StringImpl::ustring):
+ - order of arguments to UString::Rep constructor for shared strings changed.
+
+2009-12-18 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Adam barth.
+
+ Generate V8 bindings non-constructor callback declarations
+ in CodeGeneratorV8.pm instead of manually declaring them in
+ V8CustomBinding.h.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32638
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8DOMWrapper.cpp:
+ * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+ * bindings/v8/custom/V8ClipboardCustom.cpp:
+ * bindings/v8/custom/V8ConsoleCustom.cpp:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
+ * bindings/v8/custom/V8DOMParserConstructor.cpp:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ * bindings/v8/custom/V8DatabaseCustom.cpp:
+ * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ * bindings/v8/custom/V8GeolocationCustom.cpp:
+ * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
+ * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+ * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
+ * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLPlugInElementCustom.h: Added.
+ * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
+ * bindings/v8/custom/V8HistoryCustom.cpp:
+ * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
+ * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
+ * bindings/v8/custom/V8LocationCustom.cpp:
+ * bindings/v8/custom/V8MessageChannelConstructor.cpp:
+ * bindings/v8/custom/V8MessageEventCustom.cpp:
+ * bindings/v8/custom/V8MessagePortCustom.cpp:
+ * bindings/v8/custom/V8NodeCustom.cpp:
+ * bindings/v8/custom/V8NodeFilterCustom.cpp:
+ * bindings/v8/custom/V8NodeIteratorCustom.cpp:
+ * bindings/v8/custom/V8NotificationCenterCustom.cpp:
+ * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
+ * bindings/v8/custom/V8SQLTransactionCustom.cpp:
+ * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
+ * bindings/v8/custom/V8SVGLengthCustom.cpp:
+ * bindings/v8/custom/V8SVGMatrixCustom.cpp:
+ * bindings/v8/custom/V8SharedWorkerCustom.cpp:
+ * bindings/v8/custom/V8TreeWalkerCustom.cpp:
+ * bindings/v8/custom/V8WebGLArrayBufferCustom.cpp:
+ * bindings/v8/custom/V8WebGLByteArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLFloatArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLIntArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
+ * bindings/v8/custom/V8WebGLShortArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLUnsignedByteArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLUnsignedIntArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLUnsignedShortArrayCustom.cpp:
+ * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp:
+ * bindings/v8/custom/V8WebKitPointConstructor.cpp:
+ * bindings/v8/custom/V8WebSocketCustom.cpp:
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
+ * bindings/v8/custom/V8XMLSerializerConstructor.cpp:
+ * bindings/v8/custom/V8XPathEvaluatorConstructor.cpp:
+ * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
+
+2009-12-21 Nate Chapin <japhet@chromium.org>
+
+ Rubber-stamped by Darin Adler.
+
+ Revert r52446 due to crashiness.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32839
+
+ * loader/DocumentThreadableLoader.cpp:
+ (WebCore::DocumentThreadableLoader::loadRequest):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::FrameLoader):
+ (WebCore::FrameLoader::stopLoading):
+ (WebCore::FrameLoader::loadURL):
+ (WebCore::FrameLoader::loadWithDocumentLoader):
+ (WebCore::FrameLoader::stopAllLoaders):
+ (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
+ (WebCore::FrameLoader::pageHidden):
+ * loader/FrameLoader.h:
+ (WebCore::FrameLoader::suppressOpenerInNewFrame):
+ * loader/Request.cpp:
+ (WebCore::Request::Request):
+ (WebCore::Request::~Request):
+ * loader/Request.h:
+ * loader/SubresourceLoader.cpp:
+ (WebCore::SubresourceLoader::create):
+ * loader/SubresourceLoader.h:
+ * loader/loader.cpp:
+ (WebCore::Loader::load):
+ (WebCore::Loader::cancelRequests):
+ (WebCore::Loader::Host::servePendingRequests):
+ (WebCore::Loader::Host::cancelPendingRequests):
+ (WebCore::Loader::Host::cancelRequests):
+
+2009-12-19 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for V8 Date binding.
+ https://bugs.webkit.org/show_bug.cgi?id=32699
+
+ This implements the same behavior as the recent change of
+ CodeGeneratorJS.pm and JSDOMBinding.cpp.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ Produce toWebCoreDate() or v8DateOrNull() for Date type.
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::toWebCoreDate):
+ Converts a JavaScript object to a double representing Date.
+ (WebCore::v8DateOrNull):
+ Converts a double representing Date to a JavaScript Date object or null.
+ * bindings/v8/V8Binding.h: Declare toWebCoreDate() and v8DateOrNull().
+ * html/HTMLInputElement.idl: Delete V8_BINGIN exclusion for valueAsDate.
+
+2009-12-21 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Renamed m_sel to m_selection. Used do-webcore-rename.
+
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::setSelection):
+ (WebCore::SelectionController::nodeWillBeRemoved):
+ (WebCore::SelectionController::willBeModified):
+ (WebCore::SelectionController::directionOfEnclosingBlock):
+ (WebCore::SelectionController::modifyExtendingRight):
+ (WebCore::SelectionController::modifyExtendingForward):
+ (WebCore::SelectionController::modifyMovingRight):
+ (WebCore::SelectionController::modifyMovingForward):
+ (WebCore::SelectionController::modifyExtendingLeft):
+ (WebCore::SelectionController::modifyExtendingBackward):
+ (WebCore::SelectionController::modifyMovingLeft):
+ (WebCore::SelectionController::modifyMovingBackward):
+ (WebCore::SelectionController::modify):
+ (WebCore::SelectionController::expandUsingGranularity):
+ (WebCore::SelectionController::xPosForVerticalArrowNavigation):
+ (WebCore::SelectionController::setBase):
+ (WebCore::SelectionController::setExtent):
+ (WebCore::SelectionController::layout):
+ (WebCore::SelectionController::caretRenderer):
+ (WebCore::SelectionController::invalidateCaretRect):
+ (WebCore::SelectionController::paintCaret):
+ (WebCore::SelectionController::debugRenderer):
+ (WebCore::SelectionController::contains):
+ (WebCore::SelectionController::selectAll):
+ (WebCore::SelectionController::formatForDebugger):
+ (WebCore::SelectionController::showTreeForThis):
+ * editing/SelectionController.h:
+ * editing/gtk/SelectionControllerGtk.cpp:
+ (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
+ * editing/mac/SelectionControllerMac.mm:
+ (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
+ Let the script do its thing. Made sure no tests broke.
+
+2009-12-21 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Inconsistent use of counterName and identifier in CSS counter code and loss of information about the counter type.
+ https://bugs.webkit.org/show_bug.cgi?id=31814
+
+ No new tests because there are no functional changes in this patch.
+
+ * rendering/CounterNode.cpp:
+ (WebCore::CounterNode::CounterNode):
+ (WebCore::CounterNode::computeCountInParent):
+ (WebCore::showTreeAndMark):
+ * rendering/RenderCounter.cpp:
+ (WebCore::planCounter):
+ (WebCore::findPlaceForCounter):
+ (WebCore::makeCounterNode):
+ (WebCore::RenderCounter::originalText):
+ Changed to use identifier instead of counterName and actsAsReset or hasResetType, as appropriate instead of isReset.
+ * rendering/CounterNode.h:
+ (WebCore::CounterNode::actsAsReset):
+ (WebCore::CounterNode::hasResetType):
+
+2009-12-21 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Darin Adler and Nikolas Zimmermann.
+
+ Speed-up SVG Masking
+ https://bugs.webkit.org/show_bug.cgi?id=32738
+
+ This patch makes SVG Masking faster. The luminance calculaton of the ImageBuffer,
+ that is created by pixel manipulation, got optimized. The ImageBuffer and it's
+ luminance is created once now, not on every call of applyMask.
+ The size of the intermediate ImageBuffer depends on the visible area now and is
+ clipped by the mask rect.
+
+ The patch doesn't change functionality so no new tests needed.
+ The new ImageBuffer handling in Mask causes two updates of test results. The pixel
+ tests and LayoutTests pass, but the checksum doesn't match.
+
+ * svg/SVGMaskElement.cpp:
+ (WebCore::SVGMaskElement::drawMaskerContent):
+ * svg/graphics/SVGResourceMasker.cpp:
+ (WebCore::SVGResourceMasker::applyMask):
+
+2009-12-21 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Fix assertion failure when dragging an SVG image.
+ https://bugs.webkit.org/show_bug.cgi?id=32511
+
+ Test: fast/images/drag-svg-as-image.html
+
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::filenameExtension): Return "svg"
+ * svg/graphics/SVGImage.h:
+
+2009-12-17 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] G_OBJECT() cast is not necessary for signals connection and properties access
+ https://bugs.webkit.org/show_bug.cgi?id=32661
+
+ Removed useless calls to the G_OBJECT() macro and replaced NULL
+ occurences with a SENTINEL macro.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::hasVideo):
+ (WebCore::MediaPlayerPrivate::hasAudio):
+ (WebCore::MediaPlayerPrivate::setVolume):
+ (WebCore::MediaPlayerPrivate::createGSTPlayBin):
+
+2009-12-21 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ If an image load is started during an unload or beforeunload event, run it
+ asynchronously (and allow it to outlive its page) so navigation can continue
+ while the load completes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30457
+
+ Tests: http/tests/navigation/image-load-in-beforeunload-handler.html
+ http/tests/navigation/image-load-in-unload-handler.html
+
+ * loader/DocumentThreadableLoader.cpp:
+ (WebCore::DocumentThreadableLoader::loadRequest):
+ * loader/FrameLoader.cpp: Rename m_unloadEventBeingDispatched to m_isDispatchingUnloadEvent.
+ (WebCore::FrameLoader::FrameLoader):
+ (WebCore::FrameLoader::stopLoading):
+ (WebCore::FrameLoader::loadURL):
+ (WebCore::FrameLoader::loadWithDocumentLoader):
+ (WebCore::FrameLoader::stopAllLoaders):
+ (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Set m_isDispatchingBeforeUnloadEvent.
+ (WebCore::FrameLoader::pageHidden):
+ * loader/FrameLoader.h:
+ (WebCore::FrameLoader::isDispatchingUnloadFamilyEvent): Added.
+ * loader/Request.cpp:
+ (WebCore::Request::Request): Add OutlivePagePolicy to constructor parameters
+ * loader/Request.h:
+ (WebCore::): Add OutlivePagePolicy enum.
+ (WebCore::Request::shouldOutlivePage): Added.
+ (WebCore::Request::frame): Added.
+ * loader/SubresourceLoader.cpp:
+ (WebCore::SubresourceLoader::create): Change one of the security checks to an outlive page check.
+ * loader/SubresourceLoader.h:
+ * loader/loader.cpp:
+ (WebCore::Loader::load): Add OutlivePagePolicy to Request constructor call,
+ ensure requests that should outlive page are done asynchronously.
+ (WebCore::Loader::cancelRequests): Remove ending ASSERT since it will now be hard to predict how
+ many requests might possibly outlive a cancel in every case.
+ (WebCore::Loader::Host::servePendingRequests): Use the correct frame in the case of a request outliving its page.
+ (WebCore::Loader::Host::cancelPendingRequests): Ensure we don't cancel request that should outlive their page.
+ (WebCore::Loader::Host::cancelRequests): Ensure we don't cancel request that should outlive their page.
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ Fix Windows build warnings
+
+ * WebCore.vcproj/WebCore.vcproj: Exclude SVG files from the build that
+ are compiled via SVGAllInOne.cpp.
+
+2009-12-20 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Can’t copy outer html of selected node.
+ Also adds "Copy as HTML" context menu item.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32802
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
+ * inspector/front-end/inspector.js:
+ (WebInspector.documentCanCopy):
+
+2009-12-20 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Web Inspector: extract syntax highlighters into separate files.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32803
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/CSSSourceSyntaxHighlighter.js: Added.
+ (WebInspector.CSSSourceSyntaxHighlighter):
+ * inspector/front-end/JavaScriptSourceSyntaxHighlighter.js: Added.
+ (WebInspector.JavaScriptSourceSyntaxHighlighter):
+ (WebInspector.JavaScriptSourceSyntaxHighlighter.):
+ * inspector/front-end/SourceFrame.js:
+ * inspector/front-end/SourceSyntaxHighlighter.js: Added.
+ (WebInspector.SourceSyntaxHighlighter):
+ (WebInspector.SourceSyntaxHighlighter.prototype.createSpan):
+ (WebInspector.SourceSyntaxHighlighter.prototype.process.processChunk):
+ (WebInspector.SourceSyntaxHighlighter.prototype.process.moveToNextLine):
+ (WebInspector.SourceSyntaxHighlighter.prototype.process):
+ (WebInspector.SourceSyntaxHighlighter.prototype.lex):
+ (WebInspector.SourceSyntaxHighlighter.prototype.appendNonToken):
+ (WebInspector.SourceSyntaxHighlighter.prototype.syntaxHighlightNode):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+
+2009-12-18 Julien Chaffraix <jchaffraix@pleyo.com>
+
+ Reviewed by Darin Adler.
+
+ defersLoading is disabled in current libcURL.
+ https://bugs.webkit.org/show_bug.cgi?id=32707
+
+ Basically this change reverts r49577 that was totally wrong.
+ According to curlver.h, LIBCURL_VERSION_NUM is a
+ "6-digit (24 bits) hexadecimal number".
+
+ The check should be against 0x071200 (7.18) as it was originally the case.
+
+ * platform/network/curl/ResourceHandleManager.cpp:
+ (WebCore::ResourceHandleManager::initializeHandle): Use the right check.
+ * platform/network/curl/ResourceHandleCurl.cpp:
+ (WebCore::ResourceHandle::setDefersLoading): Ditto. Also removed a print
+ to use a LOG_ERROR instead.
+
+2009-12-20 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Add support for JavaScriptCore Date binding.
+ https://bugs.webkit.org/show_bug.cgi?id=32698
+
+ This is needed for HTMLInputElement::valueAsDate and
+ HTMLTimeElement::valueAsDate.
+
+ A Date instance is mapped to a double value in C++.
+ - If null or undefined is set to a JavaScript property, C++ setter
+ function receives NaN.
+ - If a getter C++ function returns NaN or infinity, a JavaScript
+ property returns null.
+
+ Test: fast/forms/input-valueasdate.html
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::jsDateOrNull): Implement the above.
+ (WebCore::valueToDate): ditto.
+ * bindings/js/JSDOMBinding.h: Declare them.
+ * bindings/scripts/CodeGeneratorJS.pm: Produce jsDateOrNull() or
+ valueToDate() for Date type.
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::valueAsDate): Temporal implementation.
+ (WebCore::HTMLInputElement::setValueAsDate): ditto.
+ * html/HTMLInputElement.h:
+ * html/HTMLInputElement.idl: Declare valueAsDate.
+
+2009-12-20 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Introduce the followings:
+ - ::-webkit-inner-spin-button pseudo CSS selector
+ - ::-webkit-outer-spin-button pseudo CSS selector
+ - new appearance type: inner-spin-button
+ - new appearance type: outer-spin-button
+ They're going to be used for <input type=number> UI.
+ https://bugs.webkit.org/show_bug.cgi?id=31821
+
+ Inner-spin-button will be used for Windows, and outer-spin-button
+ will be used for Mac. A spin-button will represent a pair of an
+ increasing button part and a decreasing button part. SpinUpState,
+ which is defined in ThemeTypes.h, will be used to distinguish
+ these two parts.
+
+ The outer-spin-button implementation will use NSStepperCell.
+ NSStepperCell represents the pair of the parts and we can't draw them
+ independently. So a spin-button also represents the pair of the parts.
+
+ This change has no tests. The following changes with tests will cover.
+
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ * css/CSSSelector.cpp:
+ (WebCore::CSSSelector::extractPseudoType):
+ * css/CSSSelector.h:
+ (WebCore::CSSSelector::):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
+ * css/CSSValueKeywords.in:
+ * css/html.css:
+ * platform/ThemeTypes.h:
+ (WebCore::ControlState): Add SpinUpState.
+ (WebCore::ControlPart): Add InnerSpinButtonPart and OuterSpinButtonPart.
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::adjustStyle):
+ (WebCore::RenderTheme::paint):
+ (WebCore::RenderTheme::adjustInnerSpinButtonStyle): Add an empty implementation.
+ (WebCore::RenderTheme::adjustOuterSpinButtonStyle): Add an empty implementation.
+ * rendering/RenderTheme.h:
+ (WebCore::RenderTheme::paintInnerSpinButton): Add an empty implementation.
+ (WebCore::RenderTheme::paintOuterSpinButton): Add an empty implementation.
+ * rendering/style/RenderStyleConstants.h:
+ (WebCore::PseudoId): Add INNER_SPIN_BUTTON and OUTER_SPIN_BUTTON.
+
+2009-12-20 Nayan Kumar K <nayankk@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for compilation errors in WML module, due to the changeset #52314.
+ https://bugs.webkit.org/show_bug.cgi?id=32786
+
+ No new tests, this is compilation error fix.
+
+ * wml/WMLDocument.cpp:
+ * wml/WMLPageState.cpp:
+ * wml/WMLPageState.h:
+
+2009-12-20 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ <rdar://problem/7487689> REGRESSION (r52203): Inspector console uses
+ Monaco on Snow Leopard
+ https://bugs.webkit.org/show_bug.cgi?id=32775
+
+ * inspector/front-end/inspector.css: Use the default monospace family
+ and size.
+
+2009-12-20 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Remove more GTK+ and GLib headers from WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=32795
+
+ Remove most GTK+ and GLib includes from WebCore headers.
+
+ * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
+ * platform/gtk/PasteboardHelper.h:
+ * platform/gtk/RenderThemeGtk.cpp:
+ * platform/gtk/RenderThemeGtk.h:
+ * platform/gtk/ScrollbarGtk.cpp:
+ * platform/gtk/ScrollbarThemeGtk.h:
+ * platform/gtk/gtk2drawing.c:
+ * platform/gtk/gtkdrawing.h:
+
+2009-12-20 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] build fixes after recent changes.
+
+ * bindings/BindingSecurityBase.cpp: Removed V8 header in common code.
+ * platform/wx/ContextMenuWx.cpp: Added missing header.
+ * plugins/mac/PluginViewMac.cpp: Added missing header.
+
+2009-12-20 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ Hopefully fix the assertion we are hitting by not forcing updating
+ the state of scrollbars when setting the adjustments. This was
+ leading to a premature layout.
+
+ fast/dom/open-and-close-by-DOM.html
+ fast/dom/Window/closure-access-after-navigation-window.html
+ fast/harness/use-page-cache.html
+
+ * platform/gtk/ScrollViewGtk.cpp:
+ (WebCore::ScrollView::setGtkAdjustments):
+
+2009-12-20 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Web Inspector: Constrain the number of messages the inspector shows.
+
+ https://bugs.webkit.org/show_bug.cgi?id=20919
+
+ * English.lproj/localizedStrings.js:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::InspectorController):
+ (WebCore::InspectorController::addConsoleMessage):
+ (WebCore::InspectorController::clearConsoleMessages):
+ (WebCore::InspectorController::populateScriptObjects):
+ * inspector/InspectorController.h:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::updateConsoleMessageExpiredCount):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/inspector.js:
+ (WebInspector.updateConsoleMessageExpiredCount):
+
+2009-12-20 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Adam Barth.
+
+ [Android] Android needs implementation of setCookies, cookies and cookiesEnabled functions.
+ https://bugs.webkit.org/show_bug.cgi?id=32559
+
+ Add implementation of the cookie functions.
+ Fix a crash caused by dereferencing a 0 MainResourceLoader pointer
+ in ResourceHandle::start().
+
+ No new tests, this is platform code.
+
+ * platform/android/PlatformBridge.h:
+ * platform/network/android/AuthenticationChallenge.h: Added.
+ * platform/network/android/CookieJarAndroid.cpp: Added.
+ (WebCore::setCookies):
+ (WebCore::cookies):
+ (WebCore::cookiesEnabled):
+ * platform/network/android/ResourceHandleAndroid.cpp:
+ (WebCore::ResourceHandle::start):
+
+2009-12-19 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r52395.
+ http://trac.webkit.org/changeset/52395
+
+ * svg/SVGMaskElement.cpp:
+ (WebCore::SVGMaskElement::drawMaskerContent):
+ * svg/SVGMaskElement.h:
+ * svg/graphics/SVGResourceMasker.cpp:
+ (WebCore::SVGResourceMasker::applyMask):
+ * svg/graphics/SVGResourceMasker.h:
+
+2009-12-19 Adam Barth <abarth@webkit.org>
+
+ No review, rolling out r52399.
+ http://trac.webkit.org/changeset/52399
+
+ * websockets/WebSocket.cpp:
+ (WebCore::WebSocket::connect):
+
+2009-12-19 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Added a missing "not".
+
+ Test: http/tests/security/xss-DENIED-window-open-javascript-url.html
+
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::createWindow):
+
+2009-12-19 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Invalid url should raise SYNTAX_ERR exception.
+ https://bugs.webkit.org/show_bug.cgi?id=32700
+
+ Check url is valid in WebSocket::connect.
+ Also log the detailed reason of websocket failures to console.
+
+ * websockets/WebSocket.cpp:
+ (WebCore::WebSocket::connect):
+
+2009-12-19 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION: Up/down arrow keys do not step numeric CSS property values
+ https://bugs.webkit.org/show_bug.cgi?id=32776
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.documentKeyDown): Call the focused element’s
+ handleKeyEvent method.
+
+2009-12-19 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Speed-up SVG Masking
+ https://bugs.webkit.org/show_bug.cgi?id=32738
+
+ This patch makes SVG Masking faster. At the moment we create a new ImageBuffer
+ and copy the complete pixel array. That is rather inefficient. This patch
+ uses the mask image directly.
+ It also bounds the direct pixel manipultation to the viewable area to minimize
+ the calculation of the mask.
+
+ No change in functionality. So no new test.
+
+ * svg/SVGMaskElement.cpp:
+ (WebCore::SVGMaskElement::drawMaskerContent):
+ * svg/SVGMaskElement.h:
+ * svg/graphics/SVGResourceMasker.cpp:
+ (WebCore::SVGResourceMasker::applyMask):
+ * svg/graphics/SVGResourceMasker.h:
+
+2009-12-19 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Add tests to check filter, mask, clip, opacity and marker ordering
+ https://bugs.webkit.org/show_bug.cgi?id=14010
+
+ The right ordering for applying effects on objects in SVG is filters,
+ clipper/masker and opacity. This patch fixes the order of filter and
+ clipper/masker. Opacity and marker need another test.
+ This change is according to the SVG Specification:
+ http://www.w3.org/TR/SVG11/render.html#Elements
+
+ Test: svg/filters/filter-clip.svg
+
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderBase::prepareToRenderSVGContent):
+
+2009-12-19 Evan Martin <evan@chromium.org>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Revert my attempt at making --disable-geolocation work; it is
+ more complicated than I anticipated. (It passed on the build bots
+ because they build with --enable-geolocation.)
+
+ * GNUmakefile.am:
+
+2009-12-19 MORITA Hajime <morrita@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ WebCore::Range::surroundContents NULL pointer crash.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31684
+
+ Test: fast/dom/Range/31684.html
+
+ * dom/Range.cpp:
+ (WebCore::Range::surroundContents):
+ throw exception when parentOfNewParent->parentNode() is NULL.
+
+2009-12-19 Christian Dywan <christian@twotoasts.de>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Don't use an icon for all spelling guess menu items.
+
+ * platform/gtk/ContextMenuItemGtk.cpp:
+ (WebCore::gtkStockIDFromContextMenuAction):
+
+2009-12-19 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed build fix. Missing \.
+
+ * GNUmakefile.am:
+
+2009-12-19 Evan Martin <evan@chromium.org>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Make --disable-geolocation and --disable-svg work, by conditionally
+ building the relevant files.
+
+ * GNUmakefile.am:
+
+2009-12-18 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Simon Fraser.
+
+ Add a comment about some confusing code that otherwise would look like
+ it might be a bug.
+ https://bugs.webkit.org/show_bug.cgi?id=32534
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateScrollInfoAfterLayout):
+
+2009-12-18 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Messed up the XCode file, trying to fix.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-12-18 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed, fix typos in WebCore.xcodeproj.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-12-18 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ SVGAngle / SVGPreserveAspectRatio should be POD types
+ https://bugs.webkit.org/show_bug.cgi?id=32758
+
+ Convert SVGAngle / SVGPreserveAspectRatio to be non-refcounted types, just
+ like it has been done for SVGMatrix / SVGLength before.
+
+ This patch prepares removing the special DOMObjectWithSVGContext hack.
+ No change in functionality, thus no new tests.
+
+ * WebCore.xcodeproj/project.pbxproj: Add SVGNames.h to the 'Copy Generated Headers' phase, and set SVGAngle/SVGPreserveAspectRatio role to 'Private', so WebKit can access it.
+ * bindings/scripts/CodeGenerator.pm: Recognize SVGAngle / SVGPreserveAspectRatio as new POD-types (similar to SVGLength)
+ * bindings/scripts/CodeGeneratorJS.pm: Ditto.
+ * bindings/scripts/CodeGeneratorV8.pm: Ditto.
+ * bindings/v8/V8Index.h: Ditto.
+ * rendering/RenderSVGImage.cpp: All following changes, modify SVGAngle/SVGPreserveAspectRatio access, as they are non-refcounted now.
+ (WebCore::RenderSVGImage::adjustRectsForAspectRatio):
+ (WebCore::RenderSVGImage::paint):
+ * rendering/RenderSVGImage.h:
+ * svg/SVGAngle.h:
+ * svg/SVGAngle.idl:
+ * svg/SVGAnimatedTemplate.h:
+ (WebCore::):
+ * svg/SVGFEImageElement.cpp:
+ (WebCore::SVGFEImageElement::SVGFEImageElement):
+ (WebCore::SVGFEImageElement::parseMappedAttribute):
+ * svg/SVGFitToViewBox.cpp:
+ (WebCore::SVGFitToViewBox::viewBoxToViewTransform):
+ (WebCore::SVGFitToViewBox::parseMappedAttribute):
+ * svg/SVGFitToViewBox.h:
+ * svg/SVGImageElement.cpp:
+ (WebCore::SVGImageElement::SVGImageElement):
+ (WebCore::SVGImageElement::parseMappedAttribute):
+ * svg/SVGMarkerElement.cpp:
+ (WebCore::SVGMarkerElement::SVGMarkerElement):
+ (WebCore::SVGMarkerElement::parseMappedAttribute):
+ (WebCore::SVGMarkerElement::setOrientToAuto):
+ (WebCore::SVGMarkerElement::setOrientToAngle):
+ (WebCore::SVGMarkerElement::canvasResource):
+ * svg/SVGMarkerElement.h:
+ * svg/SVGPatternElement.cpp:
+ (WebCore::SVGPatternElement::SVGPatternElement):
+ * svg/SVGPreserveAspectRatio.cpp:
+ (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio):
+ (WebCore::SVGPreserveAspectRatio::getCTM):
+ * svg/SVGPreserveAspectRatio.h:
+ (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio):
+ * svg/SVGPreserveAspectRatio.idl:
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::SVGSVGElement):
+ (WebCore::SVGSVGElement::createSVGAngle):
+ (WebCore::SVGSVGElement::inheritViewAttributes):
+ * svg/SVGSVGElement.h:
+ * svg/SVGSymbolElement.cpp:
+ (WebCore::SVGSymbolElement::SVGSymbolElement):
+ * svg/SVGViewElement.cpp:
+ (WebCore::SVGViewElement::SVGViewElement):
+ * svg/SVGViewSpec.cpp:
+ (WebCore::SVGViewSpec::SVGViewSpec):
+ (WebCore::SVGViewSpec::setPreserveAspectRatioString):
+ (WebCore::SVGViewSpec::parseViewSpec):
+
+2009-12-18 Dumitru Daniliuc <dumi@chromium.org>
+
+ Chromium build fix, no review.
+
+ * storage/chromium/DatabaseTrackerChromium.cpp:
+
+2009-12-18 Brent Fulgham <bfulgham@webkit.org>
+
+ Build fix, no review.
+
+ * platform/graphics/win/FontCacheWin.cpp:
+ (WebCore::FontCache::createFontPlatformData): Correct my typo
+ on the CG build.
+
+2009-12-18 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Make DatabaseTrackerChromium::removeOpenDatabase() send and IPC on
+ the main thread when a database is being closed.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32627
+
+ * storage/chromium/DatabaseTrackerChromium.cpp:
+ (WebCore::removeOpenDatabaseOnMainThread):
+ (WebCore::DatabaseTracker::removeOpenDatabase):
+
+2009-12-18 Brent Fulgham <bfulgham@webkit.org>
+
+ Build fix, no review.
+
+ * page/win/FrameCairoWin.cpp: Add missing include.
+ * platform/graphics/win/FontCacheWin.cpp:
+ (WebCore::FontCache::createFontPlatformData): Conditionalize
+ Safari-only call.
+
+2009-12-18 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Move some code related to database closing from the destructor to
+ the close() method. This would allow us to do things such as post
+ tasks to other threads when a database closes, which cannot be
+ done now, because we cannot increment the ref count to a database
+ object when we're in its destructor.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32626
+
+ * storage/Database.cpp:
+ (WebCore::Database::~Database):
+ (WebCore::Database::close):
+
+2009-12-18 Jon Honeycutt <jhoneycutt@apple.com>
+
+ REGRESSION(r52233): MSAA: Accessibility role of lists is wrong
+
+ https://bugs.webkit.org/show_bug.cgi?id=32736
+
+ Reviewed by Adam Roben.
+
+ Test: platform/win/accessibility/list-role.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::roleValueForMSAA):
+ Return roleValue(), rather than m_role, as subclasses may override it.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::roleValueForMSAA):
+ Fallback to roleValue(), rather than m_role, as it may be overriden.
+
+2009-12-17 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: Accessibility role of list items is wrong
+
+ https://bugs.webkit.org/show_bug.cgi?id=32688
+
+ Reviewed by Adam Roben.
+
+ Test: platform/win/accessibility/list-item-role.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::):
+ Add a ListItemRole to the enum.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::msaaRoleForRenderer):
+ Return the role for the RenderObject, or UnknownRole if unknown.
+ (WebCore::AccessibilityRenderObject::roleValueForMSAA):
+ Call msaaRoleForRenderer() to get the role. If it is UnknownRole, fall
+ back to m_role.
+
+2009-12-18 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Crash when accessing webkitTransition property after setting webkitTransitionProperty with invalid value.
+ https://bugs.webkit.org/show_bug.cgi?id=31559
+
+ Fix an array bounds error when accessing the CSS value for a shorthand property that takes
+ a comma-separated list, after the list for one of the component properties has been set to a different length.
+
+ Test: fast/css/shorthand-mismatched-list-crash.html
+
+ * css/CSSMutableStyleDeclaration.cpp:
+ (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue):
+
+2009-12-18 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Remove WebCore.ClientBasedGeolocation.exp from Sources, and remove two IDL files from Resources.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-12-18 Sam Weinig <sam@webkit.org>
+
+ Fix mac Geolocation build.
+
+ * DerivedSources.make:
+ * WebCore.ClientBasedGeolocation.exp: Added.
+ * WebCore.xcodeproj/project.pbxproj:
+ * page/Geolocation.h:
+ * page/GeolocationError.h:
+ (WebCore::GeolocationError::GeolocationError):
+ * page/GeolocationPosition.h:
+
+2009-12-18 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Fixes <http://webkit.org/b/32613>.
+ REGRESSION (r52008): Middle-clicking on a linked image starts a pan scroll,
+ but should follow the link instead.
+
+ The node itself isn't the only possible node that can be a link (that was the
+ original check), any of its ancestors could be links as well, we need to climb
+ up the tree to see. Created a new function (enclosingAnchorNode), that finds a
+ node's enclosing anchor element (if it exists), that we can share between RenderLayer
+ and Node, and also added tests that test pan scrolling behavior in image maps.
+
+ Tests: platform/win/fast/events/panScroll-image-no-scroll.html
+ platform/win/fast/events/panScroll-imageMap-href-no-scroll.html
+ platform/win/fast/events/panScroll-imageMap-noHref-scroll.html
+
+ * dom/Node.cpp:
+ (WebCore::Node::enclosingAnchorNode):
+ (WebCore::Node::defaultEventHandler):
+ * dom/Node.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::hitTest):
+
+2009-12-18 Benjamin Otte <otte@gnome.org>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] RemoveDashboard support. It's useless.
+
+ * GNUmakefile.am:
+
+2009-12-18 Christian Dywan <christian@twotoasts.de>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] context menu overriding API is very limited
+ https://bugs.webkit.org/show_bug.cgi?id=27546
+
+ Omit SearchWeb from the context menu in the GTK+ port.
+
+ * platform/ContextMenu.cpp:
+ (WebCore::ContextMenu::populate):
+
+2009-12-18 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Add export the new symbol in WebCoreSystemInterface.
+
+ * WebCore.base.exp:
+ * platform/mac/WebCoreSystemInterface.h:
+ * platform/mac/WebCoreSystemInterface.mm:
+
+2009-12-18 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Forward declare NSMutableArray when not compiling for Objective-C.
+
+ * platform/mac/WebCoreSystemInterface.h:
+
+2009-12-18 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32720
+ Replace UString addition/append with use of JSC::StringBuilder.
+
+ * ForwardingHeaders/runtime/StringBuilder.h: Added.
+ * bindings/js/ScriptString.h:
+ (WebCore::ScriptString::operator+=):
+ * bridge/jni/jni_runtime.cpp:
+ (appendClassName):
+ (JavaMethod::signature):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::addProfileFinishedMessageToConsole):
+ (WebCore::InspectorController::addStartProfilingMessageToConsole):
+ (WebCore::InspectorController::getCurrentUserInitiatedProfileName):
+
+2009-12-18 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Index validation for drawElements examines too many indices
+ https://bugs.webkit.org/show_bug.cgi?id=32692
+
+ Test: fast/canvas/webgl/bug-32692.html
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::validateIndexArrayPrecise):
+
+2009-12-18 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Update WebKitSystemInterface for <rdar://problem/7237059>.
+
+ * platform/mac/WebCoreSystemInterface.h:
+ * platform/mac/WebCoreSystemInterface.mm:
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ GTK build fix
+
+ * plugins/gtk/PluginViewGtk.cpp: Added #include.
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ Chromium build fix
+
+ * platform/chromium/PopupMenuChromium.cpp: Added #include.
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ Chromium build fix
+
+ * html/HTMLLinkElement.cpp: Added #include.
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ Qt build fix
+
+ * platform/qt/RenderThemeQt.cpp:
+ * plugins/qt/PluginDataQt.cpp:
+ * plugins/qt/PluginViewQt.cpp:
+ Added #includes.
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ V8 build fix
+
+ * bindings/v8/custom/V8DOMWindowCustom.cpp: Added #include.
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ GTK (and others?) build fix
+
+ * platform/text/StringImpl.h: Added #include.
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ Reduce #includes in a few high-use headers
+
+ Removed unnecessary #includes in these headers:
+ - Frame.h
+ - FrameWin.h
+ - Node.h
+ - Page.h
+ - StringImpl.h
+
+ The rest of the patch is all adding #includes to source files that now
+ require them.
+
+ Fixes <http://webkit.org/b/32718>.
+
+ Rubber-stamped by Anders Carlsson.
+
+ * dom/Node.h:
+ * page/Frame.h:
+ * page/Page.h:
+ * page/win/FrameWin.h:
+ * platform/text/StringImpl.h:
+ Removed unnecessary #includes.
+
+ * accessibility/win/AXObjectCacheWin.cpp:
+ * bindings/js/JSDOMWindowBase.cpp:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ * dom/Document.cpp:
+ * dom/InputElement.cpp:
+ * dom/Node.cpp:
+ * dom/SelectElement.cpp:
+ * editing/EditorCommand.cpp:
+ * html/HTMLFormControlElement.cpp:
+ * html/HTMLFormElement.cpp:
+ * html/HTMLMediaElement.cpp:
+ * html/HTMLParser.cpp:
+ * html/HTMLTextAreaElement.cpp:
+ * html/HTMLVideoElement.cpp:
+ * inspector/InspectorController.cpp:
+ * loader/FrameLoader.cpp:
+ * loader/HistoryController.cpp:
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ * page/Console.cpp:
+ * page/EventHandler.cpp:
+ * page/Frame.cpp:
+ * page/FrameView.cpp:
+ * page/Navigator.cpp:
+ * page/PageGroup.cpp:
+ * page/Settings.cpp:
+ * page/mac/EventHandlerMac.mm:
+ * platform/KURL.h:
+ * platform/ScrollbarThemeComposite.cpp:
+ * platform/cf/BinaryPropertyList.cpp:
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ * platform/graphics/win/WKCACFLayerRenderer.cpp:
+ * platform/mac/PopupMenuMac.mm:
+ * platform/mac/WidgetMac.mm:
+ * platform/network/cf/DNSCFNet.cpp:
+ * platform/text/StringImpl.cpp:
+ * platform/win/FileSystemWin.cpp:
+ * platform/win/PlatformScreenWin.cpp:
+ * platform/win/PopupMenuWin.cpp:
+ * platform/win/WidgetWin.cpp:
+ * plugins/PluginView.cpp:
+ * plugins/win/PluginViewWin.cpp:
+ * rendering/InlineTextBox.cpp:
+ * rendering/RenderBox.cpp:
+ * rendering/RenderFileUploadControl.cpp:
+ * rendering/RenderInline.cpp:
+ * rendering/RenderLayerCompositor.cpp:
+ * rendering/RenderObject.cpp:
+ * rendering/RootInlineBox.cpp:
+ * storage/DatabaseTracker.cpp:
+ * storage/DatabaseTracker.h:
+ * storage/SQLTransactionClient.cpp:
+ * svg/graphics/SVGImage.cpp:
+ Added now-needed #includes.
+
+2009-12-18 Shu Chang <Chang.Shu@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Implemented isId as specified by DOM Level 3. See detailed description below.
+ https://bugs.webkit.org/show_bug.cgi?id=5578
+
+ Added isId property and implementation:
+ Tests: dom/xhtml/level3/core/attrisid01-07.xhtml
+ fast/dom/Element/attrisid-extra01.html
+ * dom/Attr.cpp:
+ (WebCore::Attr::isId):
+ * dom/Attr.h:
+ * dom/Attr.idl:
+
+ Replaced instances of HTMLNames::idAttr with Element::idAttributeName()
+ for the reason that id attribute name could be customized to a different
+ string other than "id". A test case is associated to each code change.
+ * dom/Document.cpp:
+ (WebCore::Document::getElementById): Test: fast/dom/Element/id-in-getelement01.html
+ * dom/Element.cpp: Tests: dom/xhtml/level3/core/attrisid01-07.xhtml
+ (WebCore::Element::setAttribute):
+ (WebCore::Element::setAttributeMap):
+ (WebCore::Element::insertedIntoDocument):
+ (WebCore::Element::removedFromDocument):
+ (WebCore::Element::formatForDebugger):
+ (WebCore::Element::rareIDAttributeName):
+ * dom/Element.h: Added function idAttributeName().
+ (WebCore::Element::idAttributeName):
+ * dom/ElementRareData.h: Added member variable to store customized id name in ElementRareData.
+ (WebCore::ElementRareData::ElementRareData):
+ * dom/NamedAttrMap.cpp: Tests: dom/xhtml/level3/core/attrisid01-07.xhtml
+ (WebCore::NamedNodeMap::setNamedItem):
+ (WebCore::NamedNodeMap::removeNamedItem):
+ (WebCore::NamedNodeMap::setAttributes):
+ * dom/Node.cpp: Removed ASSERT as it may not hold any more.
+ (WebCore::Node::querySelector):
+ * dom/SelectorNodeList.cpp: Removed ASSERT as it may not hold any more.
+ (WebCore::createSelectorNodeList):
+ * dom/StyledElement.cpp: Tests: dom/xhtml/level3/core/attrisid01-07.xhtml
+ (WebCore::StyledElement::parseMappedAttribute):
+ * editing/DeleteButtonController.cpp: Test: fast/dom/Element/id-in-deletebutton.html
+ (WebCore::DeleteButtonController::createDeletionUI):
+ * editing/EditorCommand.cpp: Test: fast/dom/Element/id-in-insert-hr.html
+ (WebCore::executeInsertHorizontalRule):
+ * html/HTMLAppletElement.cpp: Test: fast/dom/Element/id-in-applet.html
+ (WebCore::HTMLAppletElement::parseMappedAttribute):
+ (WebCore::HTMLAppletElement::createRenderer):
+ * html/HTMLCollection.cpp:
+ (WebCore::HTMLCollection::checkForNameMatch): Test: fast/forms/select-namedItem.html
+ (WebCore::HTMLCollection::updateNameCache): Test: fast/dom/collection-namedItem-via-item.html
+ * html/HTMLDataGridColElement.cpp:
+ (WebCore::HTMLDataGridColElement::ensureColumn): Test: fast/dom/HTMLDataGridElement/DataGridColumns-dom.html
+ (WebCore::HTMLDataGridColElement::parseMappedAttribute): Test: fast/dom/HTMLDataGridElement/DataGridColumns-dom-attributes.html
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::parseMappedAttribute):
+ * html/HTMLFormCollection.cpp: Test: fast/dom/Element/id-in-formcollection.html
+ (WebCore::HTMLFormCollection::getNamedFormItem):
+ (WebCore::HTMLFormCollection::nextNamedItem):
+ (WebCore::HTMLFormCollection::updateNameCache):
+ * html/HTMLFrameElementBase.cpp: Test: fast/dom/Element/id-in-frame.html
+ (WebCore::HTMLFrameElementBase::parseMappedAttribute):
+ (WebCore::HTMLFrameElementBase::setNameAndOpenURL):
+ * html/HTMLImageElement.cpp: Test: fast/dom/Element/id-in-deletebutton.html
+ (WebCore::HTMLImageElement::parseMappedAttribute):
+ * html/HTMLMapElement.cpp: Test: fast/dom/Element/id-in-map.html
+ (WebCore::HTMLMapElement::parseMappedAttribute):
+ * html/HTMLNameCollection.cpp: Test: fast/dom/Element/id-in-frameset.html
+ (WebCore::HTMLNameCollection::itemAfter):
+ * html/HTMLObjectElement.cpp: Test: fast/dom/HTMLDocument/object-by-name-or-id.html
+ (WebCore::HTMLObjectElement::parseMappedAttribute):
+ * html/HTMLParamElement.cpp: Test: fast/dom/Element/id-in-param.html
+ (WebCore::HTMLParamElement::parseMappedAttribute):
+ * loader/CachedFont.cpp: Test: svg/custom/acid3-test-77.html
+ (WebCore::CachedFont::getSVGFontById):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::createGraphicsLayer): Debug-only code
+ * rendering/SVGRenderTreeAsText.cpp: Test: svg/text/text-gradient-positioning.svg
+ (WebCore::writeRenderResources):
+ * svg/SVGElement.cpp: Test: svg/custom/acid3-test-77.html
+ (WebCore::SVGElement::insertedIntoDocument):
+ * svg/SVGStyledElement.cpp: Test: svg/custom/js-update-image-and-display.svg
+ (WebCore::SVGStyledElement::isKnownAttribute):
+ * wml/WMLElement.cpp:
+ (WebCore::WMLElement::parseMappedAttribute):
+
+2009-12-18 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Clean up the qmake build system to distinguish between trunk builds and package builds
+
+ https://bugs.webkit.org/show_bug.cgi?id=32716
+
+ Introduce standalone_package as config that is set when QTDIR_build is set or when
+ the directory for the generated files is present.
+
+ Renamed uses of QTDIR_build that apply to generic package builds to use standalone_package.
+ Others remain as they are specific to building inside Qt.
+
+ * WebCore.pro:
+
+2009-12-18 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Fix the build on Symbian.
+
+ Use QFont::lastRestortFamily() instead of QFont::lastRestortFont(),
+ which is a missing symbol in Qt 4.6.0 on Symbian.
+
+ Functionally they should be equivalent, according to the source.
+
+ * platform/graphics/qt/FontCacheQt.cpp:
+ (WebCore::FontCache::getLastResortFallbackFont):
+
+2009-12-18 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] segfault during controls initialization if not GTK theme is present.
+ https://bugs.webkit.org/show_bug.cgi?id=32705
+
+ Create empty images for the controls if no GTK theme is set.
+
+ * platform/graphics/gtk/ImageGtk.cpp:
+ (WebCore::getThemeIconFileName):
+ (WebCore::loadImageFromFile):
+
+2009-12-18 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (r38898): Using the up arrow in a textarea gets "stuck"
+ at the beginning.
+ https://bugs.webkit.org/show_bug.cgi?id=31920
+
+ Moving up from a position after the end of the previous lines
+ should use UPSTREAM affinity to render the caret in the previous
+ line.
+
+ Test: editing/selection/wrapped-line-caret-3.html
+
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::positionForPoint):
+
+2009-12-17 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ HTMLInputElement::stepMismatch() uses ambiguous overload of pow()
+ https://bugs.webkit.org/show_bug.cgi?id=32675
+
+ Use the double constant 2.0 instead of static_cast<double>(2).
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::stepMismatch):
+
+2009-12-17 Justin Schuh <jschuh@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ Bug 32357: SVG test case crashes WebKit (invalid font URL)
+ https://bugs.webkit.org/show_bug.cgi?id=32357
+
+ Added check for NULL return value from DocLoader::requestFont()
+
+ * svg/SVGFontFaceUriElement.cpp:
+ (WebCore::SVGFontFaceUriElement::loadFont):
+
+2009-12-17 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ marquee with display:inline causes crash
+ https://bugs.webkit.org/show_bug.cgi?id=32374
+
+ Test: fast/inline/inline-marquee-crash.html
+
+ * html/HTMLMarqueeElement.cpp:
+ (WebCore::HTMLMarqueeElement::start):
+ (WebCore::HTMLMarqueeElement::stop):
+ (WebCore::HTMLMarqueeElement::suspend):
+ (WebCore::HTMLMarqueeElement::resume):
+ (WebCore::HTMLMarqueeElement::renderMarquee):
+ * html/HTMLMarqueeElement.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::styleChanged):
+
+2009-12-17 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for inspector's classes
+ https://bugs.webkit.org/show_bug.cgi?id=32660
+
+ Inherits the following classes from Noncopyable because these are
+ instantiated by 'new' and no need to be copyable:
+
+ class name - instantiated at: WebCore/'location'
+
+ class JavaScriptDebugServer - inspector/JavaScriptDebugServer.cpp:72
+ class ConsoleMessage - inspector/InspectorController.cpp:329
+ class InspectorController - page/Page.cpp:119
+
+ * inspector/ConsoleMessage.h:
+ * inspector/InspectorController.h:
+ * inspector/JavaScriptDebugServer.h:
+
+2009-12-17 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Fixes HTMLInputElement::stepMismatch() to avoid ambiguous overload of pow().
+ https://bugs.webkit.org/show_bug.cgi?id=32675
+
+ Build fix only, no new tests.
+
+ * html/HTMLInputElement.cpp: Modified.
+ (WebCore::HTMLInputElement::stepMismatch): Cast first argument of pow to double to force 'double pow(double, int)'
+
+2009-12-17 Marc-Antoine Ruel <maruel@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix link failure on LTCG builds on Windows for chromium port.
+
+ Reenable SVGAllInOne.cpp. This required some fixups.
+
+ Namely, there was conflicts in constants between HTMLNames and
+ SVGNames, and conflicts between static functions names.
+
+ No new tests as functionality has not changed.
+
+ * WebCore.gyp/WebCore.gyp:
+ * svg/SVGAllInOne.cpp:
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::SVGFontFaceElement::rebuildFontFace):
+ * svg/SVGGlyphElement.cpp:
+ (WebCore::SVGGlyphElement::invalidateGlyphCache):
+ (WebCore::SVGGlyphElement::buildGlyphIdentifier):
+ * svg/SVGHKernElement.cpp:
+ (WebCore::SVGHKernElement::insertedIntoDocument):
+ (WebCore::SVGHKernElement::removedFromDocument):
+ * svg/SVGStyleElement.cpp:
+ (WebCore::SVGStyleElement::type):
+ (WebCore::SVGStyleElement::setType):
+ (WebCore::SVGStyleElement::media):
+ (WebCore::SVGStyleElement::setMedia):
+ (WebCore::SVGStyleElement::title):
+ (WebCore::SVGStyleElement::setTitle):
+ (WebCore::SVGStyleElement::parseMappedAttribute):
+ * svg/SVGStyledElement.cpp:
+ (WebCore::mapAttributeToCSSProperty):
+ (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName):
+ * svg/SVGStyledElement.h:
+
+2009-12-17 Adam Roben <aroben@apple.com>
+
+ Chromium build fix VI
+
+ * svg/animation/SMILTimeContainer.h: Added now-needed #include.
+
+2009-12-17 Adam Roben <aroben@apple.com>
+
+ Chromium build fix V
+
+ * platform/KURLGoogle.cpp: Added now-needed #include.
+
+2009-12-17 Adam Roben <aroben@apple.com>
+
+ Chromium build fix IV
+
+ * loader/CrossOriginPreflightResultCache.h: Added now-needed
+ #includes.
+
+2009-12-17 Adam Roben <aroben@apple.com>
+
+ Chromium build fix III
+
+ * platform/graphics/Font.h: Added now-needed #include.
+
+2009-12-17 Adam Roben <aroben@apple.com>
+
+ Chromium build fix II
+
+ * dom/EventTarget.h: Added now-needed #include.
+
+2009-12-17 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Allow custom memory allocation control for js bindings
+ https://bugs.webkit.org/show_bug.cgi?id=32655
+
+ Inherits the following classes from Noncopyable because these are instantiated
+ by 'new' and no need to be copyable:
+
+ class name - instantiated at: WebCore/'location'
+
+ class ScriptCachedFrameData - history/CachedFrame.cpp:117
+ class WebCoreJSClientData - bindings/js/JSDOMWindowBase.cpp:162
+ class ScheduledAction - bindings/js/ScheduledAction.cpp:58
+
+ * bindings/js/JSDOMBinding.h:
+ * bindings/js/ScheduledAction.h:
+ * bindings/js/ScriptCachedFrameData.h:
+
+2009-12-17 Adam Roben <aroben@apple.com>
+
+ Chromium build fix
+
+ * dom/QualifiedName.h: Added now-needed #include of HashTraits.h
+ (which itself #includes HashFunctions.h).
+
+2009-12-17 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Incorrect Doctype.
+
+ REGRESSION(4.0.4-TOT):Web Inspector: Incorrect Doctype
+ https://bugs.webkit.org/show_bug.cgi?id=32671
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::buildObjectForNode):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMNode):
+
+2009-12-17 Benjamin Otte <otte@gnome.org>
+
+ Reviewed by Adam Roben.
+
+ Don't include all JSC headers everywhere
+ https://bugs.webkit.org/show_bug.cgi?id=32663
+
+ Remove HashMap HashSet and OwnPtr includes from PlatformString.h.
+ Reduces code size of Gtk build by another 5%.
+
+ * platform/text/PlatformString.h:
+
+2009-12-17 Adam Roben <aroben@apple.com>
+
+ Mac/Qt build fixes
+
+ * platform/graphics/mac/Canvas3DLayer.mm:
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ * platform/qt/Localizations.cpp:
+ Added missing #includes.
+
+2009-12-17 Benjamin Otte <otte@gnome.org>
+
+ Reviewed by Adam Roben.
+
+ Don't include all JSC headers everywhere
+ https://bugs.webkit.org/show_bug.cgi?id=32663
+
+ PlatformString.h included almost all of JSC via runtime/Identifier.h.
+ This patch gets rid of this include by forward-declaring the required
+ classes instead.
+ This reduces the build size of the object files on a Gtk debug build
+ by 10%. The resulting libwebkit.so gets 5% smaller.
+
+ No new tests as it's just a build improvement.
+
+ * platform/gtk/LocalizedStringsGtk.cpp:
+ include math.h here (it used to be pulled by JSC)
+ * platform/text/PlatformString.h:
+ * platform/text/String.cpp:
+
+2009-12-17 Evan Martin <evan@chromium.org>
+
+ Reviewed by Xan Lopez.
+
+ Always use all WebCore include paths in GtkWebKit.
+
+ With this patch, I can disable all optional features and still build.
+
+ * GNUmakefile.am:
+
+2009-12-17 Yaar Schnitman <yaar@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Added WebPageSerializer to WebKit API.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31737
+
+ * platform/text/StringBuilder.cpp: Added methods to make StringBuilder even more useful for large scale string concatenation.
+ (WebCore::StringBuilder::clear):
+ (WebCore::StringBuilder::length):
+ * platform/text/StringBuilder.h:
+
+2009-12-10 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Add controls for playing html5 video.
+ https://bugs.webkit.org/show_bug.cgi?id=26304
+
+ Media controls UI, first step. This patch was written by Zan
+ Dobersek. In addition I fixed the compilation errors and
+ re-enabled some of the media tests involving the controls UI.
+
+ * GNUmakefile.am:
+ * css/mediaControlsGtk.css: Added.
+ * platform/graphics/Image.h:
+ * platform/graphics/gtk/ImageGtk.cpp:
+ (WebCore::getThemeIconFileName):
+ (WebCore::loadResourceSharedBuffer):
+ (WebCore::loadImageFromFile):
+ (WebCore::Image::loadPlatformResource):
+ (WebCore::Image::loadPlatformThemeIcon):
+ * platform/gtk/RenderThemeGtk.cpp:
+ (WebCore::getMediaElementFromRenderObject):
+ (WebCore::getIconNameForTextDirection):
+ (WebCore::RenderThemeGtk::initMediaStyling):
+ (WebCore::RenderThemeGtk::RenderThemeGtk):
+ (WebCore::RenderThemeGtk::~RenderThemeGtk):
+ (WebCore::supportsFocus):
+ (WebCore::RenderThemeGtk::baselinePosition):
+ (WebCore::paintMozWidget):
+ (WebCore::setToggleSize):
+ (WebCore::RenderThemeGtk::adjustSliderThumbSize):
+ (WebCore::RenderThemeGtk::gtkContainer):
+ (WebCore::RenderThemeGtk::platformColorsDidChange):
+ (WebCore::RenderThemeGtk::extraMediaControlsStyleSheet):
+ (WebCore::paintMediaButton):
+ (WebCore::RenderThemeGtk::paintMediaFullscreenButton):
+ (WebCore::RenderThemeGtk::paintMediaMuteButton):
+ (WebCore::RenderThemeGtk::paintMediaPlayButton):
+ (WebCore::RenderThemeGtk::paintMediaSeekBackButton):
+ (WebCore::RenderThemeGtk::paintMediaSeekForwardButton):
+ (WebCore::RenderThemeGtk::paintMediaSliderTrack):
+ (WebCore::RenderThemeGtk::paintMediaSliderThumb):
+ * platform/gtk/RenderThemeGtk.h:
+
+2009-12-17 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] support navigator.onLine and ononline/onoffline events.
+ https://bugs.webkit.org/show_bug.cgi?id=32555
+
+ Hooked up Bearer Management to NetworkStateNotifier. This solution is available
+ only if QtMobility's Bearer Management is installed.
+
+ * WebCore.pro:
+ * platform/network/NetworkStateNotifier.h:
+ * platform/network/qt/NetworkStateNotifierPrivate.h: Added.
+ * platform/network/qt/NetworkStateNotifierQt.cpp: Added.
+ (WebCore::NetworkStateNotifierPrivate::NetworkStateNotifierPrivate):
+ (WebCore::NetworkStateNotifierPrivate::onlineStateChanged):
+ (WebCore::NetworkStateNotifierPrivate::~NetworkStateNotifierPrivate):
+ (WebCore::NetworkStateNotifier::updateState):
+ (WebCore::NetworkStateNotifier::NetworkStateNotifier):
+
+2009-12-17 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Switch to 11px as default for source-code in WebKit.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32646
+
+ * inspector/front-end/inspector.css:
+
+2009-12-17 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Symbian build fix: Don't include QtXml/qxmlstream.h but omit the prefix, to
+ make sure we pick up the header file from QtCore. That is where the implementation
+ is compiled.
+
+ * dom/XMLTokenizer.h:
+
+2009-12-17 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] WebKit GTK needs a wrapper for ref counted glib/gobject structs
+ https://bugs.webkit.org/show_bug.cgi?id=21599
+
+ Add GRefPtr support for GTK types to WebCore, as JSC does not link against
+ GTK+. Also convert PopupMenu::m_poup from a raw pointer to a GRefPtr.
+
+ No new tests as functionality has not changed.
+
+ * GNUmakefile.am:
+ * platform/PopupMenu.h:
+ * platform/gtk/GRefPtrGtk.cpp: Added.
+ (WTF::refGPtr):
+ (WTF::derefGPtr):
+ * platform/gtk/GRefPtrGtk.h: Added.
+ * platform/gtk/PopupMenuGtk.cpp:
+ (WebCore::PopupMenu::PopupMenu):
+ (WebCore::PopupMenu::~PopupMenu):
+ (WebCore::PopupMenu::show):
+ (WebCore::PopupMenu::hide):
+ (WebCore::PopupMenu::menuRemoveItem):
+
+2009-12-17 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Advice links to source code in CPU profiler to open in debugger,
+ not in resources tab.
+
+ Also work around the case when resources are disabled, but scripts are present.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32610
+
+ * inspector/front-end/Panel.js:
+ (WebInspector.Panel.prototype.updateMainViewWidth):
+ (WebInspector.Panel.prototype.canShowSourceLineForURL):
+ (WebInspector.Panel.prototype.showSourceLineForURL):
+ * inspector/front-end/ProfileDataGridTree.js:
+ (WebInspector.ProfileDataGridNode.prototype.createCell):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype.canShowSourceLineForURL):
+ (WebInspector.ResourcesPanel.prototype.showSourceLineForURL):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.scriptForURL):
+ (WebInspector.ScriptsPanel.prototype.canShowSourceLineForURL):
+ (WebInspector.ScriptsPanel.prototype.showSourceLineForURL):
+ (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
+ * inspector/front-end/inspector.js:
+ (WebInspector.documentClick.followLink):
+ (WebInspector.documentClick):
+ (WebInspector._choosePanelToShowSourceLineForURL):
+ (WebInspector.canShowSourceLineForURL):
+ (WebInspector.showSourceLineForURL):
+
+2009-12-15 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] display FPS stats for video element
+ https://bugs.webkit.org/show_bug.cgi?id=32560
+
+ Display FPS statistics if WEBKIT_DEBUG environment variable
+ contains the Media log category. This feature requires a very
+ recent (>= 0.10.18) version of gst-plugins-bad.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::createGSTPlayBin):
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+
+2009-11-11 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GStreamer] Should emit {networkState,readyState,volume,time,size,rate,duration}Changed signals
+ https://bugs.webkit.org/show_bug.cgi?id=30377
+
+ Emit volumeChanged and durationChanged upon notification from
+ GStreamer.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mediaPlayerPrivateMessageCallback):
+ (WebCore::mediaPlayerPrivateVolumeCallback):
+ (WebCore::notify_volume_idle_cb):
+ (WebCore::MediaPlayerPrivate::didEnd):
+ (WebCore::MediaPlayerPrivate::durationChanged):
+ (WebCore::MediaPlayerPrivate::createGSTPlayBin):
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+
+2009-12-16 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] segfault during volume notification
+ https://bugs.webkit.org/show_bug.cgi?id=32603
+
+ Emit volumeChanged and durationChanged upon notification from
+ GStreamer. Also don't reset the volume property on playbin, it is
+ not needed as it is 1.0 by default both on playbin and in the
+ MediaPlayer.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mediaPlayerPrivateMessageCallback):
+ (WebCore::mediaPlayerPrivateVolumeChangedCallback):
+ (WebCore::notifyVolumeIdleCallback):
+ (WebCore::doGstInit):
+ (WebCore::MediaPlayerPrivate::isAvailable):
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::volumeChanged):
+ (WebCore::MediaPlayerPrivate::didEnd):
+ (WebCore::MediaPlayerPrivate::durationChanged):
+ (WebCore::mimeTypeCache):
+ (WebCore::MediaPlayerPrivate::createGSTPlayBin):
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+
+2009-12-17 Evan Martin <evan@chromium.org>
+
+ Reviewed by Xan Lopez.
+
+ gtk: always use standard include paths, regardless of settings.
+ WebKit style is to wrap the body of a header in #if ENABLE(FOO),
+ so they're always safe to include whether the features are enabled or
+ not.
+
+ This fixes building with --disable-database and other flags.
+
+ * GNUmakefile.am:
+
+2009-12-17 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed. Build fixes for make distcheck.
+
+ * GNUmakefile.am:
+
+2009-12-17 Philippe Normand <pnormand@igalia.com>
+
+ Rubber-stamped by Gustavo Noronha Silva.
+
+ Trivial WebKit coding style fix.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::paint):
+
+2009-12-15 MORITA Hajime <morrita@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Bug 28306: double-clicking a word inside <b> beside newline select two words
+ https://bugs.webkit.org/show_bug.cgi?id=28306
+
+ SimplifiedBackwardsTextIterator missed trailing whitespaces just
+ before folding line-break, which is used to detect word
+ boundaries. This fix checks strings on RenderText and expand text
+ range on SimplifiedBackwardsTextIterator to include trailing
+ whitespaces if availble.
+
+ Test: editing/selection/doubleclick-beside-cr-span.html
+
+ * editing/TextIterator.cpp:
+ (WebCore::collapsedSpaceLength):
+ (WebCore::maxOffsetIncludingCollapsedSpaces):
+ (WebCore::SimplifiedBackwardsTextIterator::advance):
+
+2009-12-16 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Fix flakiness in WebSocket handshake console message.
+ https://bugs.webkit.org/show_bug.cgi?id=32598
+
+ In chromium, LayoutTests/websocket/tests/handshake-error.html is
+ flaky, because it outputs the following console message several times:
+ CONSOLE MESSAGE: line 0: Unexpected response code:101
+ Update m_mode in WebSocketHandshake correctly: Once it finds
+ error in handshake message, set m_mode to Failed and don't try
+ reading handshake message again. If handshake message is not yet
+ fully received, set m_mode to Incomplete, so next didReceiveData()
+ will try to check handshake message again.
+
+ * websockets/WebSocketChannel.cpp:
+ (WebCore::WebSocketChannel::didReceiveData):
+ * websockets/WebSocketHandshake.cpp:
+ (WebCore::WebSocketHandshake::readServerHandshake):
+
+2009-12-16 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: Accessibility role of text nodes is wrong
+
+ https://bugs.webkit.org/show_bug.cgi?id=32631
+ <rdar://problem/7369084>
+
+ Reviewed by Alice Liu.
+
+ Test: platform/win/accessibility/text-role.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::):
+ Add a new role to the enum.
+ (WebCore::AccessibilityObject::roleValueForMSAA):
+ Declare a function to return the accessibility role for MSAA; the base
+ implementation returns the old role value.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
+ Initialize m_roleForMSAA.
+ (WebCore::AccessibilityRenderObject::roleValueForMSAA):
+ If m_roleForMSAA has been set, return it. If the renderer is a
+ RenderText, set the role to EditableTextRole to match IE and Firefox.
+ Otherwise, set the role for MSAA to the old role value.
+
+ * accessibility/AccessibilityRenderObject.h:
+ Add a member to hold the role for MSAA, and declare an override of
+ roleValueForMSAA().
+
+2009-12-16 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r52206.
+ http://trac.webkit.org/changeset/52206
+ https://bugs.webkit.org/show_bug.cgi?id=31187
+
+ This broke pixel tests on Mac. Presumably the code in
+ ImageCG is wrong here.
+
+ * platform/graphics/BitmapImage.h:
+ * platform/graphics/GeneratedImage.cpp:
+ (WebCore::GeneratedImage::drawPattern):
+ * platform/graphics/GeneratedImage.h:
+ * platform/graphics/Image.cpp:
+ (WebCore::Image::drawTiled):
+ * platform/graphics/Image.h:
+ * platform/graphics/cairo/ImageCairo.cpp:
+ (WebCore::Image::drawPattern):
+ * platform/graphics/cg/ImageCG.cpp:
+ (WebCore::Image::drawPattern):
+ * platform/graphics/haiku/ImageHaiku.cpp:
+ (WebCore::Image::drawPattern):
+ * platform/graphics/qt/ImageQt.cpp:
+ (WebCore::Image::drawPattern):
+ * platform/graphics/skia/ImageSkia.cpp:
+ (WebCore::Image::drawPattern):
+ * platform/graphics/wince/GraphicsContextWince.cpp:
+ (WebCore::GraphicsContext::drawBitmapPattern):
+ * platform/graphics/wince/ImageBufferWince.cpp:
+ (WebCore::):
+ (WebCore::BufferedImage::drawPattern):
+ * platform/graphics/wx/ImageWx.cpp:
+ (WebCore::BitmapImage::drawPattern):
+ (WebCore::Image::drawPattern):
+
+2009-12-16 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32637
+ [V8] Generate most named property getters.
+
+ Covered by existing tests.
+
+ * bindings/scripts/CodeGeneratorV8.pm: Added generation of SetNamedPropertyHandler call.
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate): Removed now-generated SetNamedPropertyHandler callsites.
+
+2009-12-16 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Implement combobox delegate for Qt
+ https://bugs.webkit.org/show_bug.cgi?id=32550
+
+ Abstract popup menu factory.
+
+ A static method from QtAbstractPopupMenu is used to create its instances. If a factory
+ has been suplied to class QtAbstractPopupMenu the factory will be used to create the
+ objects. If not an instance of QtFallbackPopupMenu will be created.
+
+ The objective is to make it easy to replace the combobox popup at WebCore layer providing
+ support to the combobox popup delegation API. Future patches will make it possible to
+ replace the combobox popup at WebKit layer.
+
+ No behavior changes.
+
+ * platform/qt/PopupMenuQt.cpp:
+ (WebCore::PopupMenu::PopupMenu):
+ * platform/qt/QtAbstractWebPopup.cpp:
+ (WebCore::QtAbstractWebPopup::setFactory):
+ (WebCore::QtAbstractWebPopup::create):
+ * platform/qt/QtAbstractWebPopup.h:
+ * platform/qt/QtFallbackWebPopup.cpp:
+
+2009-12-16 Mark Rowe <mrowe@apple.com>
+
+ Build fix. Disable debug variants of WebKit frameworks.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-12-16 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Right clicking in a table cell creates a selection that extends into the next cell.
+ <rdar://problem/5565465>
+ https://bugs.webkit.org/show_bug.cgi?id=32622
+
+ Avoid extending the selection to the next cell if we start from an empty cell.
+
+ Test: editing/selection/empty-cell-right-click.html
+
+ * editing/TypingCommand.cpp:
+ (WebCore::TypingCommand::deleteKeyPressed): Replaced the code that check for empty table cell
+ with a call to the new function.
+ * editing/VisibleSelection.cpp:
+ (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity): Extends the
+ selection only if we are not starting from an empty table cell.
+ * editing/htmlediting.cpp:
+ (WebCore::isEmptyTableCell): Added a function since this check is performed now in two places.
+ * editing/htmlediting.h: Added isEmptyTableCell declaration.
+
+2009-12-16 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ feMerge crahses if feMergeNodes attribute in is empty
+ https://bugs.webkit.org/show_bug.cgi?id=32489
+
+ SVGFEMergeElement only stored pointers to all effects of it's nodes
+ in a list. But it should store the RefPtr otherwise the effects get
+ dereferenced and WebKit crashes.
+ I also made a short clean-up in SVGFilterBuilder. No change in
+ functionality.
+
+ Test: I updated svg/custom/empty-merge.svg to cover this problem.
+
+ * svg/SVGFEMergeElement.cpp:
+ (WebCore::SVGFEMergeElement::build):
+ * svg/graphics/filters/SVGFEMerge.cpp:
+ (WebCore::FEMerge::FEMerge):
+ (WebCore::FEMerge::create):
+ (WebCore::FEMerge::mergeInputs):
+ (WebCore::FEMerge::setMergeInputs):
+ * svg/graphics/filters/SVGFEMerge.h:
+ * svg/graphics/filters/SVGFilterBuilder.cpp:
+ (WebCore::SVGFilterBuilder::add):
+
+2009-12-16 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Part of <http://webkit.org/b/32568>.
+ Web Inspector: Context Menus should be used in more places.
+
+ Add a context menu entry in the console to clear the console. This
+ is only shown when there is no user selection of text, because if
+ there is selection of the text, then we want to give the user the Copy +
+ Spell Check context menu that they are used to.
+
+ * English.lproj/localizedStrings.js: Added "Clear Console".
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
+
+2009-12-16 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Pavel Feldman.
+
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=32621>.
+ Web Inspector: [REGRESSION (52095-52100)] Resources filter disappears when switching
+ from / to resources panel.
+
+ Changed style in sidebar-resizer-vertical, because if the min-height was 100%, we start
+ to cover the scope bar.
+
+ * inspector/front-end/inspector.css:
+
+2009-12-16 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Switch all indexers to be generated.
+ https://bugs.webkit.org/show_bug.cgi?id=32569
+
+ Covered by existing tests.
+
+ * WebCore.gypi: Remove V8FileListCustom.cpp and V8ClientRecListCustom.cpp,
+ as they are now generated.
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate): Remove customization of ClientRectList,
+ FileList, and DataGridColumnList templates.
+ * bindings/v8/custom/V8ClientRectListCustom.cpp: Removed.
+ * bindings/v8/custom/V8CustomBinding.h: Remove custom indexer getter decls.
+ * bindings/v8/custom/V8DataGridColumnListCustom.cpp: Remove indexer getter definition.
+ * bindings/v8/custom/V8FileListCustom.cpp: Removed.
+
+2009-12-16 anton muhin <antonm@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ [dom] make dom/Node.cpp compile if DUMP_NODE_STATISTICS is on
+ https://bugs.webkit.org/show_bug.cgi?id=32617
+
+ * dom/Node.cpp:
+ (WebCore::Node::dumpStatistics):
+
+2009-12-16 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [V8] There is no such thing as HTMLSelectElementCollection.
+ https://bugs.webkit.org/show_bug.cgi?id=32616
+
+ Refactoring, covered by existing tests.
+
+ * WebCore.gypi: Removed V8HTMLSelectElementCollectionCustom.cpp
+ * bindings/v8/V8Collection.h: Removed one-off template.
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate): Renamed all references to HTMLSelectElementCollection
+ to HTMLSelectElement.
+ * bindings/v8/custom/V8CustomBinding.h: Renamed custom indexer decls.
+ * bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp: Removed.
+ * bindings/v8/custom/V8HTMLSelectElementCustom.cpp: Moved code as-is from
+ V8HTMLSelectElementCollectionCustom.cpp
+
+2009-12-16 Dan Winship <danw@gnome.org>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [Gtk] Content-Encoding support
+
+ https://bugs.webkit.org/show_bug.cgi?id=25855
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::startHttp): Don't force "Accept-Encoding: identity" any
+ more
+
+2009-12-16 Benjamin Otte <otte@gnome.org>
+
+ Reviewed by Darin Adler.
+
+ Get rid of the phase argument to Image::drawPattern.
+ https://bugs.webkit.org/show_bug.cgi?id=31187
+
+ The argument can be expressed equally well as part of the
+ patternTransform. All backends but the Qt one did exactly that
+ manually anyway.
+
+ * platform/graphics/BitmapImage.h:
+ * platform/graphics/GeneratedImage.cpp:
+ (WebCore::GeneratedImage::drawPattern):
+ * platform/graphics/GeneratedImage.h:
+ * platform/graphics/Image.cpp:
+ (WebCore::Image::drawTiled):
+ * platform/graphics/Image.h:
+ * platform/graphics/cairo/ImageCairo.cpp:
+ (WebCore::Image::drawPattern):
+ * platform/graphics/cg/ImageCG.cpp:
+ (WebCore::Image::drawPattern):
+ * platform/graphics/haiku/ImageHaiku.cpp:
+ (WebCore::Image::drawPattern):
+ * platform/graphics/qt/ImageQt.cpp:
+ (WebCore::Image::drawPattern):
+ * platform/graphics/skia/ImageSkia.cpp:
+ (WebCore::Image::drawPattern):
+ * platform/graphics/wince/GraphicsContextWince.cpp:
+ (WebCore::GraphicsContext::drawBitmapPattern):
+ * platform/graphics/wince/ImageBufferWince.cpp:
+ (WebCore::):
+ (WebCore::BufferedImage::drawPattern):
+ * platform/graphics/wx/ImageWx.cpp:
+ (WebCore::BitmapImage::drawPattern):
+ (WebCore::Image::drawPattern):
+
+2009-12-16 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Performance problems with index validation code for drawElements
+ https://bugs.webkit.org/show_bug.cgi?id=32466
+
+ Added a cache of the maximum index for each element type to
+ WebGLBuffer, querying it before iterating through the indices in
+ the client-side copy of the buffer's data. Hoisted checks of the
+ size of the element array itself into validateElementArraySize to
+ avoid duplicating code.
+
+ The performance improvement has been measured with manual tests.
+ Existing layout tests cover the index validation functionality
+ and continue to pass as before.
+
+ * html/canvas/WebGLBuffer.cpp:
+ (WebCore::WebGLBuffer::WebGLBuffer):
+ (WebCore::WebGLBuffer::associateBufferData):
+ (WebCore::WebGLBuffer::associateBufferSubData):
+ (WebCore::WebGLBuffer::getCachedMaxIndex):
+ (WebCore::WebGLBuffer::setCachedMaxIndex):
+ (WebCore::WebGLBuffer::clearCachedMaxIndices):
+ * html/canvas/WebGLBuffer.h:
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::validateElementArraySize):
+ (WebCore::WebGLRenderingContext::validateIndexArrayConservative):
+ (WebCore::WebGLRenderingContext::validateIndexArrayPrecise):
+ (WebCore::WebGLRenderingContext::validateRenderingState):
+ (WebCore::WebGLRenderingContext::drawElements):
+ * html/canvas/WebGLRenderingContext.h:
+
+2009-12-16 Zelidrag Hornung <zelidrag@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32261
+ Added ability to separate the autocomplete suggestion previewing from
+ the actual accepting of the suggested value in HTMLInputElement.
+ This element (it's single line text incarnation) can now
+ be put in suggestion mode where renderer might display the suggested
+ value without making it automatically exposed to JavaScript.
+
+ No new tests. This new methods are not exposed yet. It's use will be
+ platform specific. PopupMenu and Chromium specific changes will be
+ separated based on Darin Adler's comments.
+
+ * dom/InputElement.h:
+ (WebCore::InputElementData::suggestedValue):
+ (WebCore::InputElementData::setSuggestedValue):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::suggestedValue):
+ (WebCore::HTMLInputElement::setSuggestedValue):
+ (WebCore::HTMLInputElement::setValue):
+ (WebCore::HTMLInputElement::setValueFromRenderer):
+ * html/HTMLInputElement.h:
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::updateFromElement):
+ * wml/WMLInputElement.cpp:
+ (WebCore::WMLInputElement::suggestedValue):
+ * wml/WMLInputElement.h:
+
+2009-12-16 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Make Elements tree, properties section and resources
+ view monospace.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32609
+
+ * inspector/front-end/ElementsPanel.js:
+ * inspector/front-end/PropertiesSection.js:
+ (WebInspector.PropertiesSection):
+ * inspector/front-end/ResourceView.js:
+ (WebInspector.ResourceView):
+ * inspector/front-end/inspector.css:
+
+2009-12-16 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ sourceGraphic wrong if positive x,y is >0 and objectBB is selected on Filter
+ https://bugs.webkit.org/show_bug.cgi?id=32575
+
+ On SVG Filters, the rest of the source graphic gets clipped to the filter
+ rest. This helps us to minimize the size of intermediate ImageBuffers. If
+ the position moves to the right or to the bottom, we have to adjust the
+ GraphicContext of this intermediate ImageBuffer.
+ This patch fixes the adjustment of the context, according to the clipping.
+
+ Test: svg/filters/filter-source-position.svg
+
+ * svg/graphics/SVGResourceFilter.cpp:
+ (WebCore::SVGResourceFilter::prepareFilter):
+
+2009-12-16 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ CrashTracer: [USER] 1 crash in Safari at com.apple.WebCore: WebCore::endsOfNodeAreVisuallyDistinctPositions + 115
+ <rdar://problem/7467108>
+ https://bugs.webkit.org/show_bug.cgi?id=32590
+
+ If the element is a button there is no need to look at the children to calculate the caret position.
+
+ Test: editing/selection/button-right-click.html
+
+ * dom/Position.cpp:
+ (WebCore::Position::getInlineBoxAndOffset): Avoid calling recursively this method,
+ when starting from a button element.
+
+2009-12-16 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Implement combobox delegate for Qt
+ https://bugs.webkit.org/show_bug.cgi?id=32550
+
+ Refactoring of class QWebPopup.
+
+ Class QWebPopup has been split in QtAbstractWebPopup and QtFallbackWebPopup.
+ Both new classes are now in corresponding files and files QWebPopup.* have been removed.
+
+ Custom combo popup classes will inherit from QtAbstractWebPopup. It is not the public API as it is
+ in WebCore and will not be visible by users of QtWebKit. It will be used in implementation of
+ public QtWebKit combobox popup delegation API.
+
+ Class QtFallbackWebPopup inherits from QtAbstractWebPopup and implements the currently used combobox popup.
+ It needs to be improved to provide standard features that are missing like style or indentation.
+
+ No behavior changes.
+
+ * WebCore.pro:
+ * platform/PopupMenu.h:
+ * platform/qt/PopupMenuQt.cpp:
+ (WebCore::PopupMenu::PopupMenu):
+ * platform/qt/QWebPopup.cpp: Removed.
+ * platform/qt/QWebPopup.h: Removed.
+ * platform/qt/QtAbstractWebPopup.cpp: Added.
+ (WebCore::QtAbstractWebPopup::QtAbstractWebPopup):
+ (WebCore::QtAbstractWebPopup::~QtAbstractWebPopup):
+ (WebCore::QtAbstractWebPopup::client):
+ * platform/qt/QtAbstractWebPopup.h: Added.
+ * platform/qt/QtFallbackWebPopup.cpp: Added.
+ (WebCore::QtFallbackWebPopup::QtFallbackWebPopup):
+ (WebCore::QtFallbackWebPopup::show):
+ (WebCore::QtFallbackWebPopup::populate):
+ (WebCore::QtFallbackWebPopup::showPopup):
+ (WebCore::QtFallbackWebPopup::hidePopup):
+ (WebCore::QtFallbackWebPopup::activeChanged):
+ * platform/qt/QtFallbackWebPopup.h: Added.
+ (WebCore::QtFallbackWebPopup::hide):
+
+2009-12-15 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: beautify HTTP info section.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32583
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/ResourceView.js:
+ (WebInspector.ResourceView):
+ (WebInspector.ResourceView.prototype._refreshURL):
+ (WebInspector.ResourceView.prototype._refreshHTTPInformation):
+ * inspector/front-end/inspector.css:
+
+2009-12-13 Roland Steiner <rolandsteiner@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fix crash when encountering illegal HTML within a continuation inside <ruby>.
+ (https://bugs.webkit.org/show_bug.cgi?id=32316)
+
+ Avoid having the anonymous blocks utilized in the ruby renderers being
+ re-used as continuation blocks.
+ Avoid having ruby runs collected as "leftover blocks".
+
+ Test: fast/ruby/ruby-illegal.html
+
+ * rendering/RenderRuby.h:
+ (WebCore::RenderRubyAsInline::removeLeftoverAnonymousBlock): mustn't be called
+ (WebCore::RenderRubyAsInline::isRuby): made private
+ (WebCore::RenderRubyAsInline::renderName): made private
+ (WebCore::RenderRubyAsInline::createsAnonymousWrapper): return true
+ (WebCore::RenderRubyAsBlock::removeLeftoverAnonymousBlock): mustn't be called
+ (WebCore::RenderRubyAsBlock::isRuby): made private
+ (WebCore::RenderRubyAsBlock::renderName): made private
+ (WebCore::RenderRubyAsBlock::createsAnonymousWrapper): return true
+ * rendering/RenderRubyRun.h:
+ (WebCore::RenderRubyRun::removeLeftoverAnonymousBlock): avoid
+ (WebCore::RenderRubyRun::isRubyRun): made private
+ (WebCore::RenderRubyRun::renderName): made private
+ (WebCore::RenderRubyRun::createsAnonymousWrapper): return true
+
+2009-12-15 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Rename skipCanLoadCheck to skipSecurityCheck in a bunch of places in WebCore/loader.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32529
+
+ * loader/Cache.cpp:
+ (WebCore::Cache::requestUserCSSStyleSheet):
+ * loader/CachedImage.cpp:
+ (WebCore::CachedImage::load):
+ * loader/CachedResource.cpp:
+ (WebCore::CachedResource::load):
+ * loader/CachedResource.h:
+ (WebCore::CachedResource::load):
+ * loader/DocumentThreadableLoader.cpp:
+ (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
+ (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
+ (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
+ (WebCore::DocumentThreadableLoader::preflightSuccess):
+ (WebCore::DocumentThreadableLoader::loadRequest):
+ * loader/DocumentThreadableLoader.h:
+ * loader/FrameLoaderTypes.h:
+ (WebCore::):
+ * loader/Request.cpp:
+ (WebCore::Request::Request):
+ * loader/Request.h:
+ (WebCore::Request::shouldDoSecurityCheck):
+ * loader/SubresourceLoader.cpp:
+ (WebCore::SubresourceLoader::create):
+ * loader/SubresourceLoader.h:
+ * loader/loader.cpp:
+ (WebCore::Loader::load):
+ (WebCore::Loader::Host::servePendingRequests):
+ * loader/loader.h:
+
+2009-12-15 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7470452> Safari/Chromium crashes on complicated @font-face rule
+ https://bugs.webkit.org/show_bug.cgi?id=32257
+
+ Test: fast/css/font-face-unused-source-loaded.html
+
+ The loading of a font resource caused a CSSFontFace that had the resource in one of its
+ sources, but wasn’t using it (due to using an earlier source) to invalidate its
+ CSSSegmentedFontFaces. This caused FontData for the active source (the one that did not just
+ finish loading) to be deleted, but that went unnoticed by Font::operator==(), since the
+ corresponding FontFallbackLists were not in the loading state. The fix is for CSSFontFace to
+ ignore loads from unused sources.
+
+ * css/CSSFontFace.cpp:
+ (WebCore::CSSFontFace::fontLoaded): Bail out if the loaded source is not the active source.
+ (WebCore::CSSFontFace::getFontData): Set m_activeSource to the source that supplied the
+ FontData.
+ * css/CSSFontFace.h:
+ (WebCore::CSSFontFace::CSSFontFace): Initialize m_activeSource.
+
+2009-12-15 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Cannot load flash files from a local file.
+ https://bugs.webkit.org/show_bug.cgi?id=32572
+
+ When loading the main resource and its mime type is application/octet-stream,
+ use the file extenstion to check if it is a supported plugin.
+
+ No new tests were added since any existing swf file can be used as a manual test.
+
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::didReceiveResponse):
+ * loader/MainResourceLoader.h:
+ * plugins/PluginDatabase.h:
+
+2009-12-15 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=18498>.
+ REGRESSION: Tips are not shown for resources anymore.
+
+ As discussed in the bug, Tips are not coming back, and the feature
+ will be moved to the audits panel. This patch is to remove the Tips
+ code and the resources that it needed.
+
+ * WebCore.gypi: Removed tips files.
+ * inspector/front-end/Images/tipBalloon.png: Removed.
+ * inspector/front-end/Images/tipBalloonBottom.png: Removed.
+ * inspector/front-end/Images/tipIcon.png: Removed.
+ * inspector/front-end/Images/tipIconPressed.png: Removed.
+ * inspector/front-end/Resource.js: Removed tips code.
+ (WebInspector.Resource.prototype.set finished):
+ * inspector/front-end/WebKit.qrc: Removed tips files.
+ * inspector/front-end/inspector.css: Removes tips style rules.
+
+2009-12-15 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Display request headers for main resource
+ having redirects.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32577
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::identifierForInitialRequest):
+ (WebCore::InspectorController::willSendRequest):
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::InspectorResource):
+ (WebCore::InspectorResource::appendRedirect):
+ (WebCore::InspectorResource::createCached):
+ (WebCore::InspectorResource::updateRequest):
+ * inspector/InspectorResource.h:
+ (WebCore::InspectorResource::create):
+
+2009-12-15 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=32578>.
+ Web Inspector: No Need for ?="" now that we have context menus.
+
+ Remove the toggleNewAttributeButton function and callers to it, as
+ we don't need this behavior anymore, now that we have context menus.
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype.set hovered):
+ (WebInspector.ElementsTreeElement.prototype.toggleNewAttributeButton):
+ (WebInspector.ElementsTreeElement.prototype._startEditing):
+
+2009-12-15 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [V8] Generate trivial named property getters.
+ https://bugs.webkit.org/show_bug.cgi?id=32562
+
+ Covered by existing tests.
+
+ * bindings/scripts/CodeGeneratorV8.pm: Added GenerateImplementationNamedPropertyGetter.
+ * bindings/v8/V8Collection.h:
+ (WebCore::getNamedPropertyOfCollection): Fixed a booboo by using AtomicString like we're supposed to.
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate): Removed code that's now generated.
+
+2009-12-15 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Part of <http://webkit.org/b/32568>.
+ New Web Inspector: The Context Menu should be used in more places.
+
+ Add support for context menu entries for editing and deleting elements
+ in the datagrid. This gives support to deleting cookies, and editing and
+ deleting session storage and local storage.
+
+ * English.lproj/localizedStrings.js: Added "Edit" and "Add New" entries (delete was already there)
+ * inspector/front-end/DataGrid.js:
+ (WebInspector.DataGrid): Added context menu listener.
+ (WebInspector.DataGrid.prototype._contextMenuInDataTable):
+
+2009-12-15 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Don't allow default framebuffer to be mutated
+ https://bugs.webkit.org/show_bug.cgi?id=32391
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
+ (WebCore::WebGLRenderingContext::framebufferTexture2D):
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::bindFramebuffer):
+
+2009-12-15 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for FontPlatformDataCacheKey class
+ https://bugs.webkit.org/show_bug.cgi?id=32552
+
+ Inherits the following struct from FastAllocBase because it is instantiated by 'new':
+
+ struct name - instantiated at: WebCore/'location'
+ struct FontPlatformDataCacheKey - platform/graphics/FontCache.cpp:118
+
+ * platform/graphics/FontCache.cpp:
+
+2009-12-15 Jian Li <jianli@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Bug 31090 - [Chromium] Add DownloadURL format to Chromium clipboard.
+ https://bugs.webkit.org/show_bug.cgi?id=31090
+
+ The proposal to whatwg can be found here:
+ http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-August/022118.html
+
+ * platform/chromium/ChromiumDataObject.cpp:
+ (WebCore::ChromiumDataObject::clear):
+ (WebCore::ChromiumDataObject::hasData):
+ (WebCore::ChromiumDataObject::ChromiumDataObject):
+ * platform/chromium/ChromiumDataObject.h:
+ * platform/chromium/ClipboardChromium.cpp:
+ (WebCore::):
+ (WebCore::clipboardTypeFromMIMEType):
+ (WebCore::ClipboardChromium::setData):
+
+2009-12-15 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ WAI-ARIA: implement treegrid
+ https://bugs.webkit.org/show_bug.cgi?id=31299
+
+ Test: platform/mac/accessibility/aria-treegrid.html
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::getOrCreate):
+ * accessibility/AccessibilityARIAGrid.h:
+ (WebCore::AccessibilityARIAGrid::supportsSelectedRows):
+ * accessibility/AccessibilityARIAGridRow.cpp:
+ (WebCore::AccessibilityARIAGridRow::isARIATreeGridRow):
+ (WebCore::AccessibilityARIAGridRow::disclosedRows):
+ (WebCore::AccessibilityARIAGridRow::disclosedByRow):
+ * accessibility/AccessibilityARIAGridRow.h:
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::createARIARoleMap):
+ * accessibility/AccessibilityObject.h:
+ (WebCore::):
+ (WebCore::AccessibilityObject::isARIATreeGridRow):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::isMultiSelectable):
+ (WebCore::AccessibilityRenderObject::setIsExpanded):
+ (WebCore::AccessibilityRenderObject::setSelectedRows):
+ (WebCore::AccessibilityRenderObject::ariaSelectedRows):
+ (WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren):
+ (WebCore::AccessibilityRenderObject::selectedChildren):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/AccessibilityTable.h:
+ (WebCore::AccessibilityTable::supportsSelectedRows):
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+ (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
+
+2009-12-15 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for EmptyEditorClient and EmptyInspectorClient
+ https://bugs.webkit.org/show_bug.cgi?id=32557
+
+ Inherits the following classes from Noncopyable because these are instantiated
+ by 'new' and no need to be copyable:
+
+ class name - instantiated at: WebCore/'location'
+ class EmptyEditorClient - svg/graphics/SVGImage.cpp:230
+ class EmptyInspectorClient - svg/graphics/SVGImage.cpp:241
+
+ * loader/EmptyClients.h:
+
+2009-12-15 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore/inspector directory's classes
+ https://bugs.webkit.org/show_bug.cgi?id=32556
+
+ Inherits the following class from Noncopyable because these are instantiated
+ by 'new' and no need to be copyable:
+
+ class name - instantiated at: WebCore/'location'
+ class InspectorFrontend - inspector/InspectorController.cpp:538
+ class InspectorTimelineAgent - inspector/InspectorController.cpp:1097
+
+ * inspector/InspectorFrontend.h:
+ * inspector/InspectorTimelineAgent.h:
+
+2009-12-15 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore/platform/network directory's classes
+ https://bugs.webkit.org/show_bug.cgi?id=32553
+
+ Inherits the following class from Noncopyable because it is instantiated
+ by 'new' and no need to be copyable:
+
+ class/struct name - instantiated at: WebCore/'location'
+
+ struct CrossThreadResourceResponseData - platform/network/ResourceResponseBase.cpp:109
+
+ Inherits the following classes from FastAllocBase because these are
+ instantiated by 'new':
+
+ class ResourceResponseBase - (its child class) platform/network/ResourceResponseBase.cpp:90
+ class ResourceRequestBase - (its child class) loader/DocumentThreadableLoader.cpp:88
+
+ * platform/network/ResourceRequestBase.h:
+ * platform/network/ResourceResponseBase.h:
+
+2009-12-15 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for AnimationControllerPrivate and FillLayerPropertyWrapperGetter
+ https://bugs.webkit.org/show_bug.cgi?id=32549
+
+ Inherits AnimationControllerPrivate and FillLayerPropertyWrapperGetter
+ classes from Noncopyable because these are instantiated by 'new' and no need to be copyable:
+
+ class/struct name - instantiated at: WebCore/'location'
+
+ AnimationControllerPrivate - page/animation/AnimationController.cpp:439
+ FillLayerPropertyWrapperGetter - (its child class) page/animation/AnimationBase.cpp:464
+
+ * page/animation/AnimationBase.cpp:
+ * page/animation/AnimationControllerPrivate.h:
+
+2009-12-15 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Do not lose HTTP redirect information, display it
+ in the Resources Panel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32551
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::populateScriptObjects):
+ (WebCore::InspectorController::didCommitLoad):
+ (WebCore::InspectorController::didLoadResourceFromMemoryCache):
+ (WebCore::InspectorController::identifierForInitialRequest):
+ (WebCore::InspectorController::willSendRequest):
+ (WebCore::InspectorController::didReceiveResponse):
+ (WebCore::InspectorController::didReceiveContentLength):
+ (WebCore::InspectorController::didFinishLoading):
+ (WebCore::InspectorController::didFailLoading):
+ * inspector/InspectorFrontend.cpp:
+ * inspector/InspectorFrontend.h:
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::InspectorResource):
+ (WebCore::InspectorResource::appendRedirect):
+ (WebCore::InspectorResource::updateScriptObject):
+ (WebCore::InspectorResource::releaseScriptObject):
+ (WebCore::InspectorResource::type):
+ * inspector/InspectorResource.h:
+ (WebCore::InspectorResource::):
+ (WebCore::InspectorResource::Changes::setAll):
+ * inspector/front-end/inspector.js:
+ (WebInspector._addResource):
+ (WebInspector.updateResource):
+
+2009-12-15 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Followup for direct signals and slots connections in QNetworkReplyHandler
+ https://bugs.webkit.org/show_bug.cgi?id=32113
+
+ For Qt versions prior to 4.6.1 we will need to use QueuedConnection
+ for the signal and slot connection to avoid running into a bug in.
+
+ Add a comment that we want to remove one signal to forward
+ queued items when moving our minimum requirements.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::start):
+
+2009-12-14 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add manual test for JavaScript prompt corner case
+ https://bugs.webkit.org/show_bug.cgi?id=30914
+
+ The patch is based on the work done by Gupta Manish.
+
+ Verify behavior of the JavaScript prompt function. Currently
+ Qt is not behaving like other WebKit ports and Firefox in
+ regards to accepting the prompt but not entering a text.
+
+ * manual-tests/qt/java-script-prompt.html: Added.
+
+2009-12-15 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Moving list populate methods from PopupMenuQt to QWebPopup.
+
+ In preparation to future implementation of a delegation API for the combobox.
+
+ * platform/PopupMenu.h:
+ * platform/qt/PopupMenuQt.cpp:
+ (WebCore::PopupMenu::show):
+ (WebCore::PopupMenu::hide):
+ * platform/qt/QWebPopup.cpp:
+ (WebCore::QWebPopup::show):
+ (WebCore::QWebPopup::populate):
+ * platform/qt/QWebPopup.h:
+ (WebCore::QWebPopup::hide):
+
+2009-12-15 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Extract WebInspector.Section from WebInspector.PropertiesSection.
+ https://bugs.webkit.org/show_bug.cgi?id=32523
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/PropertiesSection.js:
+ (WebInspector.PropertiesSection):
+ * inspector/front-end/Section.js: Added.
+ (WebInspector.Section):
+ (WebInspector.Section.prototype.get title):
+ (WebInspector.Section.prototype.set title):
+ (WebInspector.Section.prototype.get subtitle):
+ (WebInspector.Section.prototype.set subtitle):
+ (WebInspector.Section.prototype.get expanded):
+ (WebInspector.Section.prototype.set expanded):
+ (WebInspector.Section.prototype.get populated):
+ (WebInspector.Section.prototype.set populated):
+ (WebInspector.Section.prototype.expand):
+ (WebInspector.Section.prototype.collapse):
+ (WebInspector.Section.prototype.toggleExpanded):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+
+2009-12-15 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r52140.
+ http://trac.webkit.org/changeset/52140
+ https://bugs.webkit.org/show_bug.cgi?id=31299
+
+ The commit broke the Leopard bots and unfortunately
+ Chris wasn't around to fix them, so I'm rolling the change
+ out after 3 hours so that the bots can roll green again. :)
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::getOrCreate):
+ * accessibility/AccessibilityARIAGrid.h:
+ * accessibility/AccessibilityARIAGridRow.cpp:
+ * accessibility/AccessibilityARIAGridRow.h:
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::createARIARoleMap):
+ * accessibility/AccessibilityObject.h:
+ (WebCore::):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::isMultiSelect):
+ (WebCore::AccessibilityRenderObject::setIsExpanded):
+ (WebCore::AccessibilityRenderObject::setSelectedRows):
+ (WebCore::AccessibilityRenderObject::ariaTreeSelectedRows):
+ (WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren):
+ (WebCore::AccessibilityRenderObject::selectedChildren):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/AccessibilityTable.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+ (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
+
+2009-12-14 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Remove dead code from FontPlatformDataQt.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=32540
+
+ In r51758 the code that used familyNames was removed
+ and we should remove the creation of the familyNames
+ as well.
+
+ * platform/graphics/qt/FontPlatformDataQt.cpp:
+ (WebCore::FontPlatformData::FontPlatformData):
+
+2009-12-15 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebCore part of <rdar://problem/7173515> Use LOGFONT support in Core
+ Graphics when available
+
+ When using a version of Core Graphics with LOGFONT support, this fixes
+ <rdar://problem/5764844> First-time launch is painfully slow due to font
+ plist creation
+ and <rdar://problem/6576281> 12px synthetic-italics Tahoma text is less
+ readable in Safari than in Firefox/IE due to poorly-spaced letters
+
+ * platform/graphics/win/FontCGWin.cpp:
+ (WebCore::Font::drawGlyphs): No longer call drawGDIGlyphs for stroked
+ text.
+ * platform/graphics/win/FontCacheWin.cpp:
+ (WebCore::createGDIFont): Added a synthesizeItalic parameter. When set
+ to true, if italics are desired but the best match lacks italics,
+ creates and returns a synthetic italics font.
+ (WebCore::FontCache::createFontPlatformData): Ask to synthesize italics
+ if needed.
+ * platform/graphics/win/FontCustomPlatformData.cpp:
+ (WebCore::FontCustomPlatformData::fontPlatformData): Updated an
+ assertion, and changed to create the CGFont from the LOGFONT.
+ (WebCore::createFontCustomPlatformData): Changed cgFont to be a
+ RetainPtr. Do not create a CGFont from the font data if it can be
+ created from the LOGFONT in fontPlatformData().
+ * platform/graphics/win/FontDatabase.cpp:
+ (WebCore::populateFontDatabase): Avoid font database work if fonts are
+ not going to be looked up by name.
+ * platform/graphics/win/FontPlatformDataCGWin.cpp:
+ (WebCore::FontPlatformData::platformDataInit): Create the CGFont from
+ a LOGFONT based on the HFONT.
+
+2009-12-14 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ WAI-ARIA: implement treegrid
+ https://bugs.webkit.org/show_bug.cgi?id=31299
+
+ Test: platform/mac/accessibility/aria-treegrid.html
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::getOrCreate):
+ * accessibility/AccessibilityARIAGrid.h:
+ (WebCore::AccessibilityARIAGrid::supportsSelectedRows):
+ * accessibility/AccessibilityARIAGridRow.cpp:
+ (WebCore::AccessibilityARIAGridRow::isARIATreeGridRow):
+ (WebCore::AccessibilityARIAGridRow::disclosedRows):
+ (WebCore::AccessibilityARIAGridRow::disclosedByRow):
+ * accessibility/AccessibilityARIAGridRow.h:
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::createARIARoleMap):
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::isARIATreeGridRow):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::isMultiSelectable):
+ (WebCore::AccessibilityRenderObject::setIsExpanded):
+ (WebCore::AccessibilityRenderObject::setSelectedRows):
+ (WebCore::AccessibilityRenderObject::ariaSelectedRows):
+ (WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren):
+ (WebCore::AccessibilityRenderObject::selectedChildren):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/AccessibilityTable.h:
+ (WebCore::AccessibilityTable::supportsSelectedRows):
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+ (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
+
+2009-12-14 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7460655> REGRESSION (r47255): Content shifted down at software.opensuse.org
+ https://bugs.webkit.org/show_bug.cgi?id=32382
+
+ Test: fast/block/float/in-margin.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::getClearDelta): Floats that do not intrude into the line (because
+ they are in the margin) do not need to be cleared.
+
+2009-12-14 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Pressing backspace inside a table cell erases all empty rows below it.
+ <rdar://problem/5565461>
+ https://bugs.webkit.org/show_bug.cgi?id=32526
+
+ No deletion is performed when the caret selection is on an empty table cell.
+
+ Test: editing/deleting/delete-empty-table.html
+
+ * editing/TypingCommand.cpp:
+ (WebCore::TypingCommand::deleteKeyPressed): Added check for empty table cells in
+ case of caret selection.
+
+2009-12-14 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Darin Adler.
+
+ [Android] Android needs ResourceHandle implementation
+ https://bugs.webkit.org/show_bug.cgi?id=32515
+
+ Adds implementation of ResourceHandle on Android.
+
+ No new tests needed, this is platform-specific code, so existing
+ tests are sufficient.
+
+ * platform/network/android/ResourceHandleAndroid.cpp: Added.
+ (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
+ (WebCore::ResourceHandle::~ResourceHandle):
+ (WebCore::ResourceHandle::start):
+ (WebCore::ResourceHandle::cancel):
+ (WebCore::ResourceHandle::bufferedData):
+ (WebCore::ResourceHandle::supportsBufferedData):
+ (WebCore::ResourceHandle::setDefersLoading):
+ (WebCore::ResourceHandle::willLoadFromCache):
+ (WebCore::ResourceHandle::loadsBlocked):
+ (WebCore::SyncLoader::SyncLoader):
+ (WebCore::SyncLoader::~SyncLoader):
+ (WebCore::SyncLoader::didReceiveResponse):
+ (WebCore::SyncLoader::didReceiveData):
+ (WebCore::SyncLoader::didFail):
+ (WebCore::ResourceHandle::loadResourceSynchronously):
+ * platform/network/android/ResourceLoaderAndroid.h: Added.
+ (WebCore::ResourceLoaderAndroid::~ResourceLoaderAndroid):
+ (WebCore::ResourceLoaderAndroid::ResourceLoaderAndroid):
+
+2009-12-14 Marco Martin <notmart@gmail.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ In the Scrollbar painting of the Qt theme integration,
+ intersects any previous clip rects with the one needed to paint the scrollbar.
+ This fixes the painting in QGraphicsview, when the parent of the widget that
+ paints the QWebPage has the QGraphicsItem::ItemClipsChildrenToShape set and
+ a piece of the scrollbar should be cipped away
+ https://bugs.webkit.org/show_bug.cgi?id=30366
+
+ No new tests.
+
+ * platform/qt/ScrollbarThemeQt.cpp:
+ (WebCore::ScrollbarThemeQt::paint):
+
+2009-12-14 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [V8] Generate bindings for trivial indexers.
+ https://bugs.webkit.org/show_bug.cgi?id=32455
+
+ Covered by existing tests.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ Added detecting indexers and generating code for them.
+ * bindings/v8/V8Collection.h: Removed code that's now generated.
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate): Ditto.
+
+2009-12-14 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31660
+ REGRESSION (r49394): Image load event fires before the document fragment is attached.
+
+ Test: fast/images/image-load-event-in-fragment.html
+
+ We cannot fire load events immediately after parsing a fragment - an element inserted via
+ innerHTML or equivalent should be reachable via getElementById() by the time its load event
+ fires.
+
+ * dom/Document.cpp: (WebCore::Document::implicitClose): Call dispatchPendingBeforeLoadEvents()
+ and dispatchPendingLoadEvents() individually. I'm not sure why these calls are here, just
+ preserving existing behavior.
+
+ * dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::write):
+ * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::write):
+ Load events for elements that have just been parsed cannot be dispatched yet, we should give
+ the elements a chance to be inserted into a document first. There is no compatibility baggage
+ for beforeload, so it seems OK to dispatch it right away.
+
+ * loader/ImageLoader.cpp:
+ (WebCore::ImageLoader::dispatchPendingBeforeLoadEvents):
+ (WebCore::ImageLoader::dispatchPendingLoadEvents):
+ * loader/ImageLoader.h:
+ Separated dispatchPendingEvents() into individual functions for each event kind.
+
+2009-12-14 Jakob Petsovits <jpetsovits@rim.com>
+
+ Reviewed by Simon Fraser.
+
+ Add FloatQuad::isRectilinear() to check whether it can be represented as FloatRect.
+ https://bugs.webkit.org/show_bug.cgi?id=30442
+
+ This enables optimizations for distinguishing between
+ arbitrary FloatQuads and rectilinear ones.
+
+ * platform/graphics/FloatQuad.cpp:
+ (WebCore::FloatQuad::isRectilinear):
+ * platform/graphics/FloatQuad.h:
+
+2009-12-14 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Add support for keyboard modifiers to TouchEvent
+
+ https://bugs.webkit.org/show_bug.cgi?id=32482
+
+ Similar to other ui events with keyboard state, get the alt, shift,
+ meta and ctrl modifiers straight from the platform event.
+
+ * dom/TouchEvent.cpp:
+ (WebCore::TouchEvent::TouchEvent):
+ (WebCore::TouchEvent::initTouchEvent):
+ * dom/TouchEvent.h:
+ (WebCore::TouchEvent::create):
+ * dom/TouchEvent.idl:
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleTouchEvent):
+ * platform/PlatformTouchEvent.h:
+ (WebCore::PlatformTouchEvent::PlatformTouchEvent):
+ (WebCore::PlatformTouchEvent::shiftKey):
+ (WebCore::PlatformTouchEvent::ctrlKey):
+ (WebCore::PlatformTouchEvent::altKey):
+ (WebCore::PlatformTouchEvent::metaKey):
+ * platform/qt/PlatformTouchEventQt.cpp:
+ (WebCore::PlatformTouchEvent::PlatformTouchEvent):
+
+2009-12-14 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] crash when clicking "Sign out" in GMail
+ https://bugs.webkit.org/show_bug.cgi?id=32300
+
+ When the ResourceLoader cancels the handle we have to make sure not to access
+ the resource handle afterwards again.
+ This complete r29515
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+
+2009-12-14 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Implement InjectedScript.evaluateOnSelf() that evaluates functions in the InjectedScript context.
+ https://bugs.webkit.org/show_bug.cgi?id=32517
+
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.evaluateOnSelf):
+ * inspector/front-end/InjectedScriptAccess.js:
+
+2009-12-14 Nayan Kumar K <nayankk@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for compilation errors in WML enabled builds.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32481
+
+ * wml/WMLInputElement.cpp:
+ (WebCore::WMLInputElement::setValue):
+ (WebCore::WMLInputElement::setValueForUser):
+ * wml/WMLInputElement.h:
+
+2009-12-14 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Darin Adler.
+
+ [Android] Android needs ResourceError, ResourceResponse and
+ ResourceRequest implementation.
+ https://bugs.webkit.org/show_bug.cgi?id=32522
+
+ Add implementation of ResourceError, ResourceResponse and ResourceRequest.
+ No new tests needed, the existing tests should be sufficient.
+
+ * platform/network/android/ResourceError.h: Added.
+ (WebCore::ResourceError::ResourceError):
+ * platform/network/android/ResourceRequest.h: Added.
+ (WebCore::ResourceRequest::ResourceRequest):
+ (WebCore::ResourceRequest::doUpdatePlatformRequest):
+ (WebCore::ResourceRequest::doUpdateResourceRequest):
+ (WebCore::ResourceRequest::setUserGesture):
+ (WebCore::ResourceRequest::getUserGesture):
+ * platform/network/android/ResourceResponse.h: Added.
+ (WebCore::ResourceResponse::ResourceResponse):
+ (WebCore::ResourceResponse::doUpdateResourceResponse):
+
+2009-12-14 Sam Weinig <sam@webkit.org>
+
+ Fix the build.
+
+ * page/Geolocation.cpp:
+ * page/Geolocation.h:
+
+2009-12-13 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=32499
+ Add client based Geolocation provider
+
+ Add first cut of a client based Geolocation provider. This is guarded by
+ ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a
+ GeolocationControllerClient interface that no-one currently implements,
+ but will in a subsequent patch.
+
+ * GNUmakefile.am:
+ * WebCore.base.exp:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * page/Geolocation.cpp:
+ (WebCore::createGeopositionFromGeolocationPosition):
+ (WebCore::createPositionErrorFromGeolocationError):
+ (WebCore::Geolocation::Geolocation):
+ (WebCore::Geolocation::~Geolocation):
+ (WebCore::Geolocation::disconnectFrame):
+ (WebCore::Geolocation::lastPosition):
+ (WebCore::Geolocation::startRequest):
+ (WebCore::Geolocation::fatalErrorOccurred):
+ (WebCore::Geolocation::requestTimedOut):
+ (WebCore::Geolocation::clearWatch):
+ (WebCore::Geolocation::handleError):
+ (WebCore::Geolocation::positionChanged):
+ (WebCore::Geolocation::makeSuccessCallbacks):
+ (WebCore::Geolocation::errorOccurred):
+ (WebCore::Geolocation::geolocationServicePositionChanged):
+ (WebCore::Geolocation::geolocationServiceErrorOccurred):
+ (WebCore::Geolocation::startUpdating):
+ (WebCore::Geolocation::stopUpdating):
+ * page/Geolocation.h:
+ * page/GeolocationController.cpp: Added.
+ (WebCore::GeolocationController::GeolocationController):
+ (WebCore::GeolocationController::~GeolocationController):
+ (WebCore::GeolocationController::addObserver):
+ (WebCore::GeolocationController::removeObserver):
+ (WebCore::GeolocationController::positionChanged):
+ (WebCore::GeolocationController::errorOccurred):
+ (WebCore::GeolocationController::lastPosition):
+ * page/GeolocationController.h: Added.
+ * page/GeolocationControllerClient.h: Added.
+ (WebCore::GeolocationControllerClient::~GeolocationControllerClient):
+ * page/GeolocationError.h: Added.
+ (WebCore::GeolocationError::):
+ (WebCore::GeolocationError::create):
+ (WebCore::GeolocationError::code):
+ (WebCore::GeolocationError::message):
+ * page/GeolocationPosition.h: Added.
+ (WebCore::GeolocationPosition::create):
+ (WebCore::GeolocationPosition::timestamp):
+ (WebCore::GeolocationPosition::latitude):
+ (WebCore::GeolocationPosition::longitude):
+ (WebCore::GeolocationPosition::accuracy):
+ (WebCore::GeolocationPosition::altitude):
+ (WebCore::GeolocationPosition::altitudeAccuracy):
+ (WebCore::GeolocationPosition::heading):
+ (WebCore::GeolocationPosition::speed):
+ (WebCore::GeolocationPosition::canProvideAltitude):
+ (WebCore::GeolocationPosition::canProvideAltitudeAccuracy):
+ (WebCore::GeolocationPosition::canProvideHeading):
+ (WebCore::GeolocationPosition::canProvideSpeed):
+ (WebCore::GeolocationPosition::GeolocationPosition):
+ * page/Geoposition.h:
+ (WebCore::Geoposition::create):
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ * page/Page.h:
+ (WebCore::Page::geolocationController):
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::dataChanged):
+
+2009-12-14 Adam Langley <agl@google.com>
+
+ Reviewed by Darin Adler.
+
+ Test that an image's size is valid before reading it.
+
+ Previously, an image that failed to load (m_failed == true) would
+ trigger an assertion failure when WebKit tried to get its size.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32176
+ http://code.google.com/p/chromium/issues/detail?id=28566
+
+ Test: fast/images/size-failure.html
+
+ * platform/graphics/ImageSource.cpp:
+ (WebCore::ImageSource::createFrameAtIndex):
+
+2009-12-14 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7458272> REGRESSION (r50470) Reproducible ASSERT in
+ RenderWidget::setWidgetGeometry()
+
+ Test: fast/forms/defer-updateFromElement.html
+
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::updateFromElementCallback): Added this post-attach callback
+ that invokes updateFromElement().
+ (WebCore::HTMLFormControlElement::recalcStyle): Instead of calling
+ updateFromElement(), enqueue a post-attach (in this case, post-style
+ recalc) callback to do it. updateFromElement() can cause the selection
+ to change, and in turn trigger synchronous layout, so it must not be
+ called during style recalc.
+
+2009-12-14 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: [regression] inspector deletes nodes when editing css.
+
+ Now all the treeoutlines are focusable, sections and their titles
+ are also focusable. Change contains couple of drive-by fixes such as
+ canceling of the attribute edit nuking attr info and maintaining proper
+ selection while deleting nodes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32460
+
+ * inspector/front-end/CallStackSidebarPane.js:
+ (WebInspector.CallStackSidebarPane.prototype.handleShortcut):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._promptKeyDown):
+ * inspector/front-end/DataGrid.js:
+ (WebInspector.DataGrid.prototype._keyDown):
+ * inspector/front-end/DatabaseQueryView.js:
+ (WebInspector.DatabaseQueryView):
+ (WebInspector.DatabaseQueryView.prototype._promptKeyDown):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
+ (WebInspector.ElementsPanel.prototype.get defaultFocusedElement):
+ (WebInspector.ElementsPanel.prototype.handleShortcut):
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeOutline):
+ (WebInspector.ElementsTreeOutline.prototype._keyDown):
+ (WebInspector.ElementsTreeElement.prototype._textNodeEditingCommitted):
+ (WebInspector.ElementsTreeElement.prototype._editingCancelled):
+ * inspector/front-end/Panel.js:
+ (WebInspector.Panel.prototype.show):
+ (WebInspector.Panel.prototype.get defaultFocusedElement):
+ * inspector/front-end/PropertiesSection.js:
+ (WebInspector.PropertiesSection):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ (WebInspector.ScriptsPanel.prototype.get defaultFocusedElement):
+ (WebInspector.ScriptsPanel.prototype.handleShortcut):
+ * inspector/front-end/SidebarPane.js:
+ (WebInspector.SidebarPane):
+ (WebInspector.SidebarPane.prototype.toggleExpanded):
+ (WebInspector.SidebarPane.prototype._onTitleKeyDown):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._loaded):
+ * inspector/front-end/TextPrompt.js:
+ (WebInspector.TextPrompt):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+ (WebInspector.documentKeyDown):
+ (WebInspector.documentCanCopy):
+ (WebInspector.documentCopy):
+ (WebInspector._searchFieldManualFocus):
+ (WebInspector._searchKeyDown):
+ (WebInspector.startEditing.cleanUpAfterEditing):
+ (WebInspector.startEditing.keyDownEventListener):
+ (WebInspector.startEditing):
+ * inspector/front-end/treeoutline.js:
+ (TreeOutline):
+ (TreeOutline._removeChildAtIndex):
+ (TreeOutline.prototype._treeKeyDown):
+ (TreeElement.prototype.deselect):
+ * inspector/front-end/utilities.js:
+ ():
+
+2009-12-14 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [Chromium] Guard all of JSC's wrapper cache-related members on Document.
+
+ * dom/Document.cpp:
+ (WebCore::Document::createWrapperCache): Widened the guards to the whole method.
+ * dom/Document.h: Added JSC guards to wrapper cache-related members.
+
+2009-12-14 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ AX: there's an infinite loop going on for some webpages - facebook.com
+ https://bugs.webkit.org/show_bug.cgi?id=32501
+
+ The problem is that parentObjectUnignored() cannot be called
+ while in accessibilityIsIgnored, because it leads to
+ recursiveness. Specifically, there were checks to determine
+ if an object was within a ARIA tree. That check should
+ 1) be moved to all platforms, and 2) not call parentObjectUnignored().
+
+ Test: accessibility/hang-in-isignored.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::isAllowedChildOfTree):
+ (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/mac/AccessibilityObjectMac.mm:
+ (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
+
+2009-12-14 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6293979> Adopt shared control drawing for <video> controls on Leopard and Windows
+
+ Use MediaControllerThemeQuickTime on Leopard.
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::mediaControllerTheme):
+
+2009-12-14 Adam Roben <aroben@apple.com>
+
+ Move QuartzCore-related build settings into a vsprops file
+
+ Fixes <http://webkit.org/b/32518>
+
+ Reviewed by Dan Bernstein.
+
+ * WebCore.vcproj/WebCore.vcproj: Let VS reformat the files list, added
+ WebCoreQuartzCore.vsprops to the non-Cairo configurations, moved all
+ other QuartzCore-related build settings from here...
+ * WebCore.vcproj/WebCoreQuartzCore.vsprops: ...to here.
+
+2009-12-14 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Antti Koivisto.
+
+ handling scripts can block UI
+ https://bugs.webkit.org/show_bug.cgi?id=27612
+
+ Break execution of external scrips to smaller chunks.
+ No new tests since no new functionality was introduced.
+
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::HTMLTokenizer):
+ (WebCore::HTMLTokenizer::reset):
+ (WebCore::HTMLTokenizer::notifyFinished):
+ (WebCore::HTMLTokenizer::executeExternalScriptsIfReady):
+ (WebCore::HTMLTokenizer::executeExternalScriptsTimerFired):
+ (WebCore::HTMLTokenizer::continueExecutingExternalScripts):
+ * html/HTMLTokenizer.h:
+
+2009-12-03 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Connect QNetworkReply via direct connections.
+ https://bugs.webkit.org/show_bug.cgi?id=32113
+
+ In the past we have switched from auto connections to queued
+ connections to get some more stability. The problem with the
+ Queued connections is latency. Even when running simple loading
+ tests the time it takes to runs highly varies and by using
+ direct connections these tests produce a stable result.
+
+ We will have to look out for crashes coming from within the
+ QNetworkAccessManager due this patch and address them then.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::start):
+
+2009-12-14 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Rubber-stamped by Simon Hausmann.
+
+ [Qt] QtWebKit should use QImageReader::setQuality(49)
+ https://bugs.webkit.org/show_bug.cgi?id=30740
+
+ Using QImageReader::setQuality(49) will influence the JPEG
+ decoder of Qt to use the JDCT_IFAST routines for decompressing. This
+ is showing a 5% improvement in a reduction that decodes all images
+ used during the page loading test. The libjpeg documentation mentions
+ that the IFAST routine is not as accurate as other routines but in
+ our tests we couldn't see a difference.
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::setData):
+
+2009-12-13 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Changed GC from mark-sweep to mark-allocate.
+
+ * ForwardingHeaders/runtime/WeakGCMap.h: Added.
+ * bindings/js/GCController.cpp:
+ (WebCore::collect):
+ (WebCore::GCController::gcTimerFired):
+ (WebCore::GCController::garbageCollectNow): Updated for rename.
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::removeWrappers):
+ (WebCore::hasCachedDOMObjectWrapperUnchecked):
+ (WebCore::hasCachedDOMObjectWrapper):
+ (WebCore::hasCachedDOMNodeWrapperUnchecked):
+ (WebCore::forgetDOMObject):
+ (WebCore::forgetDOMNode):
+ (WebCore::isObservableThroughDOM):
+ (WebCore::markDOMNodesForDocument):
+ (WebCore::markDOMObjectWrapper):
+ (WebCore::markDOMNodeWrapper):
+ * bindings/js/JSDOMBinding.h: Changed DOM wrapper maps to be WeakGCMaps.
+ Don't ASSERT that an item must be in the WeakGCMap when its destructor
+ runs, since it might have been overwritten in the map first.
+
+ * bindings/js/JSDocumentCustom.cpp:
+ (WebCore::toJS): Changed Document from a DOM object wrapper to a DOM node
+ wrapper, to simplify some code.
+
+ * bindings/js/JSInspectedObjectWrapper.cpp:
+ (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper):
+ (WebCore::JSInspectedObjectWrapper::~JSInspectedObjectWrapper):
+ * bindings/js/JSInspectorCallbackWrapper.cpp: Use a WeakGCMap for these
+ wrappers.
+
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::markChildren): Updated for WeakGCMap and Document using
+ a DOM node wrapper instead of a DOM object wrapper.
+
+ * bindings/js/JSSVGPODTypeWrapper.h:
+ (WebCore::JSSVGDynamicPODTypeWrapperCache::wrapperMap):
+ (WebCore::JSSVGDynamicPODTypeWrapperCache::lookupOrCreateWrapper):
+ (WebCore::JSSVGDynamicPODTypeWrapperCache::forgetWrapper):
+ (WebCore::::~JSSVGDynamicPODTypeWrapper): Shined a small beam of sanity light
+ on this code. Use hashtable-based lookup in JSSVGPODTypeWrapper.h instead
+ of linear lookup through iteration, since that's what hashtables were
+ invented for. Make JSSVGPODTypeWrapper.h responsible for reomving itself
+ from the table, instead of its JS wrapper, to decouple these objects from
+ GC, and because these objects are refCounted, not solely owned by their
+ JS wrappers.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * dom/Document.h: Adopted changes above.
+
+2009-12-13 Geoffrey Garen <ggaren@apple.com>
+
+ Windows build fix: Removed an incorrect #ifdef.
+
+ * bindings/js/GCController.cpp:
+
+2009-12-13 Charles Reis <creis@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Refactor some security code out of V8 bindings
+ https://bugs.webkit.org/show_bug.cgi?id=32326
+
+ No new tests. There should be no functionality changes in this patch,
+ since it is only refactoring code.
+
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gypi:
+ * bindings/BindingSecurity.h: Added.
+ (WebCore::BindingSecurity::BindingSecurity):
+ (WebCore::::canAccessWindow):
+ (WebCore::::canAccessFrame):
+ (WebCore::::checkNodeSecurity):
+ * bindings/BindingSecurityBase.cpp: Added.
+ (WebCore::BindingSecurityBase::getDOMWindow):
+ (WebCore::BindingSecurityBase::getFrame):
+ (WebCore::BindingSecurityBase::canAccessWindow):
+ * bindings/BindingSecurityBase.h: Added.
+ * bindings/GenericBinding.h: Added.
+ (WebCore::):
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::isSafeScript):
+ * bindings/v8/V8Binding.h:
+ * bindings/v8/V8BindingState.cpp: Added.
+ (WebCore::::Only):
+ (WebCore::::getActiveWindow):
+ (WebCore::::immediatelyReportUnsafeAccessTo):
+ * bindings/v8/V8BindingState.h: Added.
+ (WebCore::):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::reportUnsafeAccessTo):
+ (WebCore::reportUnsafeJavaScriptAccess):
+ * bindings/v8/V8Proxy.h:
+ (WebCore::V8Proxy::):
+ * bindings/v8/custom/V8CustomBinding.cpp:
+ (WebCore::allowSettingFrameSrcToJavascriptUrl):
+ (WebCore::INDEXED_ACCESS_CHECK):
+ (WebCore::NAMED_ACCESS_CHECK):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8Custom::WindowSetTimeoutImpl):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::V8Custom::ClearTimeoutImpl):
+ (WebCore::NAMED_ACCESS_CHECK):
+ (WebCore::INDEXED_ACCESS_CHECK):
+ * bindings/v8/custom/V8LocationCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_ACCESS_CHECK):
+ (WebCore::NAMED_ACCESS_CHECK):
+
+2009-11-30 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Implement initializeMaximumHTTPConnectionCountPerHost.
+ https://bugs.webkit.org/show_bug.cgi?id=31849
+
+ Qt allows to have three connections per host on Symbian, for
+ every other platform the limit is set to six connections per
+ host but the default implementation will only schedule four
+ connections per host.
+ In a manual test we seem to get the best loading speed by
+ going with Qt's limit and schedule two more jobs to allow Qt
+ to prepare them.
+
+ * platform/network/ResourceRequestBase.cpp:
+ * platform/network/qt/ResourceRequestQt.cpp:
+ (WebCore::initializeMaximumHTTPConnectionCountPerHost):
+
+2009-12-13 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7341364> Crash at HTMLParser::popOneBlockCommon() after
+ handling misnested residual style tags
+
+ Test: fast/parser/residual-style-close-ref-clone.html
+
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Gave the
+ block stack a strong reference to the cloned residual style element.
+
+2009-12-13 Adele Peterson <adele@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Reverting changes from http://trac.webkit.org/changeset/49585 to fix:
+ <rdar://problem/7382815> REGRESSION (4.0.4-TOT): Home photo slider is too narrow at http://www.ziprealty.com/
+ https://bugs.webkit.org/show_bug.cgi?id=32078
+
+ * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::cssText):
+
+2009-12-08 Jeremy Moskovich <jeremy@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Add code to allow toggling ATSUI/Core Text rendering at runtime in ComplexTextController.
+ https://bugs.webkit.org/show_bug.cgi?id=31802
+
+ The goal here is to allow for a zero runtime hit for ports that decide to select
+ the API at compile time.
+ When both USE(ATSUI) and USE(CORE_TEXT) are true, the API is toggled
+ at runtime. Core Text is used for OS Versions >= 10.6.
+
+ No test since this is already covered by existing pixel tests.
+
+ * platform/graphics/SimpleFontData.h: Change #ifdef to define getNSFont() on Chrome/Mac .
+ * platform/graphics/mac/ComplexTextController.cpp:
+ (WebCore::shouldUseATSUIAPI): Cache decision about which API to use.
+ (WebCore::ComplexTextController::ComplexTextRun::indexAt):
+ (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Stub function to call through
+ to ATSUI/Core text variants.
+ (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): The actual work for object construction
+ is delegate to createTextRunFromFontDataATSUI/createTextRunFromFontDataCoreText.
+ * platform/graphics/mac/ComplexTextController.h:
+ * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
+ (WebCore::ComplexTextController::ComplexTextRun::overrideLayoutOperation): Small style fix.
+ (WebCore::ComplexTextController::ComplexTextRun::createTextRunFromFontDataATSUI):
+ (WebCore::ComplexTextController::collectComplexTextRunsForCharactersATSUI):
+ * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
+ (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
+ (WebCore::ComplexTextController::ComplexTextRun::createTextRunFromFontDataCoreText):
+ (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
+
+2009-12-13 Eric Carlson <eric.carlson@apple.com>
+
+ No review, rolling out r52059 until I can generate new Tiger
+ test results.
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::mediaControllerTheme):
+
+2009-12-12 Sam Weinig <sam@webkit.org>
+
+ Rubber-stamped by Dan Bernstein.
+
+ Fix the EXPERIMENTAL_SINGLE_VIEW_MODE build.
+
+ * Configurations/WebCore.xcconfig:
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::EventHandler):
+ (WebCore::EventHandler::clearDragState):
+ * page/mac/DragControllerMac.mm:
+ (WebCore::DragController::isCopyKeyDown):
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::eventActivatedView):
+ * platform/PlatformKeyboardEvent.h:
+ * platform/PlatformMouseEvent.h:
+ * platform/PlatformWheelEvent.h:
+ (WebCore::PlatformWheelEvent::PlatformWheelEvent):
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::wheelEvent):
+ * platform/mac/KeyEventMac.mm:
+ (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
+ * platform/mac/PlatformMouseEventMac.mm:
+ (WebCore::PlatformMouseEvent::PlatformMouseEvent):
+ * platform/mac/PopupMenuMac.mm:
+ (WebCore::PopupMenu::show):
+ * platform/mac/WidgetMac.mm:
+
+2009-12-12 Sam Weinig <sam@webkit.org>
+
+ Rubber-stamped by Dan Bernstein.
+
+ Fix the !ENABLE(VIDEO) build.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
+
+2009-12-12 Sam Weinig <sam@webkit.org>
+
+ Rubber-stamped by Dan Bernstein.
+
+ Fix the !ENABLE(DATABASE) build.
+
+ * storage/SQLTransactionClient.cpp:
+ * storage/SQLTransactionClient.h:
+ * storage/SQLTransactionCoordinator.cpp:
+ * storage/SQLTransactionCoordinator.h:
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::stopLoading):
+
+2009-12-12 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6293979> Adopt shared control drawing for <video> controls on Leopard and Windows
+
+ Use MediaControllerThemeQuickTime on Leopard.
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::mediaControllerTheme):
+
+2009-12-12 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Oliver Hunt.
+
+ Errors in WebGL[T]Array set() and get() methods
+ https://bugs.webkit.org/show_bug.cgi?id=32456
+
+ Test: fast/canvas/webgl/bug-32456.html
+
+ * bindings/js/JSWebGLFloatArrayCustom.cpp:
+ (WebCore::JSWebGLFloatArray::set):
+ * bindings/js/JSWebGLIntArrayCustom.cpp:
+ (WebCore::JSWebGLIntArray::set):
+ * bindings/js/JSWebGLShortArrayCustom.cpp:
+ (WebCore::JSWebGLShortArray::set):
+ * bindings/js/JSWebGLUnsignedByteArrayCustom.cpp:
+ (WebCore::JSWebGLUnsignedByteArray::set):
+ * bindings/js/JSWebGLUnsignedIntArrayCustom.cpp:
+ (WebCore::JSWebGLUnsignedIntArray::set):
+ * bindings/js/JSWebGLUnsignedShortArrayCustom.cpp:
+ (WebCore::JSWebGLUnsignedShortArray::set):
+ * bindings/v8/custom/V8WebGLArrayCustom.h:
+ (WebCore::setWebGLArray):
+ * html/canvas/WebGLFloatArray.idl:
+ * html/canvas/WebGLUnsignedIntArray.idl:
+
+2009-12-12 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Oliver Hunt.
+
+ Update WebGL tests to released versions
+ https://bugs.webkit.org/show_bug.cgi?id=32457
+
+ * manual-tests/webgl/Earth.html:
+ * manual-tests/webgl/ManyPlanetsDeep.html:
+ * manual-tests/webgl/SpinningBox.html:
+ * manual-tests/webgl/TeapotPerPixel.html:
+ * manual-tests/webgl/TeapotPerVertex.html:
+ * manual-tests/webgl/resources/CanvasMatrix.js:
+ (CanvasMatrix4.prototype.getAsWebGLFloatArray):
+ * manual-tests/webgl/resources/utils3d.js:
+ (initWebGL.gl.console.window.console.log):
+ (initWebGL):
+ (loadShader):
+ (makeBox):
+ (makeSphere):
+ (processLoadObj):
+ (doLoadObj):
+ (doLoadImageTexture):
+
+2009-12-12 Christian Dywan <christian@twotoasts.de>
+
+ Reviewed by Dirk Schulze.
+
+ Remove the include to SVGFEDisplacementMap.h, it's not needed at all.
+
+ * platform/graphics/filters/FEComponentTransfer.h:
+
+2009-12-12 Christian Dywan <christian@twotoasts.de>
+
+ Rubber-stamped by Maciej Stachowiak.
+
+ Only include SVGFEDisplacementMap.h if SVG is enabled.
+
+ * platform/graphics/filters/FEComponentTransfer.h:
+
+2009-12-12 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [Cairo][Qt] Alpha blending in SVG filters is wrong
+ https://bugs.webkit.org/show_bug.cgi?id=32427
+
+ This patch is a follow-up to:
+ http://trac.webkit.org/changeset/51950
+ It fixes the alpha blending for Cairo and Qt on SVG Filters.
+
+ Covered by: * LayoutTests/svg/filters/feGaussianBlur.svg
+ * LayoutTests/svg/filters/feComposite.svg
+ and others.
+
+ * platform/graphics/cairo/ImageBufferCairo.cpp:
+ (WebCore::ImageBuffer::platformTransformColorSpace):
+ * platform/graphics/qt/ImageBufferQt.cpp:
+ (WebCore::ImageBuffer::platformTransformColorSpace):
+
+2009-12-11 Eric Roman <eroman@chromium.org>
+
+ Unreviewed build fix.
+
+ [V8] Add a method on ScriptController to get it compiling after http://trac.webkit.org/changeset/52033.
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::anyPageIsProcessingUserGesture):
+ * bindings/v8/ScriptController.h:
+
+2009-12-11 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [V8] Change bindings to catch up with http://trac.webkit.org/changeset/52033.
+
+ * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL): Added retrieval of calling frame and passing
+ to the submit method.
+
+2009-12-11 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Put -umbrella linker flag into a variable so that it can be overridden.
+
+ * Configurations/WebCore.xcconfig:
+
+2009-12-11 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ body with display:inline causes crash
+ https://bugs.webkit.org/show_bug.cgi?id=32371
+
+ Tests: fast/inline/inline-body-crash.html
+ fast/inline/inline-body-with-scrollbar-crash.html
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::createScrollbar):
+ (WebCore::FrameView::layout):
+
+2009-12-11 Brady Eidson <beidson@apple.com>
+
+ Rubberstamped by Sam Weinig.
+
+ https://webkit.org/b/22851 - Remove defunct FIXME.
+
+ * html/HTMLPlugInElement.cpp:
+ (WebCore::HTMLPlugInElement::HTMLPlugInElement): This flag was removed completely
+ from the HTMLFrameOwnerElement chain of classes.
+
+2009-12-11 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Small refactoring to get rid of some extra unneeded selection-related work
+ in RenderLayer::scrollToOffset and separate caret and range selection
+ logic in FrameView::layout. This may be useful later when changing how
+ the range selection logic works to fix layout reentrancy problems.
+
+ * page/Frame.cpp: Removed invalidateSelection.
+ * page/Frame.h: Ditto.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout): Call SelectionController::setNeedsLayout
+ and Frame::selectionLayoutChanged instead of calling
+ Frame::invalidateSelection, which was just a function that called
+ both of those others.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::scrollToOffset): Call
+ SelectionController::setNeedsLayout instead of calling
+ Frame::invalidateSelection. This call site only needs the caret-related
+ work in that first function, not the other work formerly done by
+ Frame::invalidateSelection. The caret works outside the normal
+ painting and rendering system, and the range selection highlight is
+ more or less inside it and doesn't need special handling when scrolling.
+
+2009-12-11 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7342725> and https://webkit.org/b/32383
+ Selecting article text at sfgate.com results in spurious back/forward entries
+
+ If an iframe had a form and that form is submitted by javascript, IE and Opera don't add back/forward entries.
+
+ In the case where the frame was added dynamically via createElement(), Firefox would like to add a back entry
+ but has a bug that prevents this.
+
+ Therefore by a bizarre coincidence, WebKit is the loner and the only engine affected by sfgate.com's technique.
+
+ This patch changes us to willfully match IE and Opera and fixes sfgate.com in the process.
+
+ Tests: http/tests/navigation/dynamic-iframe-dynamic-form-back-entry.html
+ http/tests/navigation/parsed-iframe-dynamic-form-back-entry.html
+
+ Capture whether the form was submitted by javascript:
+ * loader/FormState.cpp:
+ (WebCore::FormState::FormState):
+ (WebCore::FormState::create):
+ * loader/FormState.h:
+ (WebCore::FormState::formSubmissionTrigger):
+
+ When deciding the value of the lockBackForwardList variable, take formSubmissionTrigger() into account:
+ * loader/RedirectScheduler.cpp:
+ (WebCore::RedirectScheduler::scheduleFormSubmission):
+
+ Rearrange the public HTMLFormElement::submit() method to be called only from DOM or JS bindings,
+ and figure out the rest of the parameters for an internal submit() call including the formSubmissionTrigger:
+ * bindings/js/JSHTMLFormElementCustom.cpp:
+ (WebCore::JSHTMLFormElement::submit):
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::prepareSubmit):
+ (WebCore::HTMLFormElement::submit):
+ * html/HTMLFormElement.h:
+
+2009-12-11 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32445
+ REGRESSION: http://www.mcafee.com/japan/ displays unstyled
+
+ * css/CSSImportRule.cpp:
+ (WebCore::CSSImportRule::setCSSStyleSheet):
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::setCSSStyleSheet):
+ Add a quirk for mcafee.com/japan (http or https, with or without www).
+
+2009-12-11 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Make PlatformWheelEvent.h private instead of project.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-12-11 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Support reflections on composited layers
+ https://bugs.webkit.org/show_bug.cgi?id=31885
+
+ First part of supporting composited reflections on compositing layers.
+
+ Rename the m_transformLayer member variable to m_structuralLayer, since it
+ will get used both for transform layers (for preserve-3d) and to hold a flattening
+ layer related to reflections, both of which have similar requirements, and are
+ mutually exclusive.
+
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ primaryLayer(), hostLayerForSublayers() and layerForSuperlayer() all now return
+ a CALayer, since m_structuralLayer isn't always a WebLayer.
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::commitLayerChanges):
+ updateLayerPreserves3D() renamed to updateStructuralLayer()
+
+ (WebCore::GraphicsLayerCA::updateLayerNames):
+ New "update" method for updating layer names.
+
+ (WebCore::GraphicsLayerCA::updateSublayerList):
+ m_transformLayer -> m_structuralLayer. Also minor refactor to only
+ allocate newSublayers in one place.
+
+ (WebCore::GraphicsLayerCA::updateLayerSize):
+ (WebCore::GraphicsLayerCA::removeAnimationFromLayer):
+ (WebCore::GraphicsLayerCA::hostLayerForSublayers):
+ (WebCore::GraphicsLayerCA::layerForSuperlayer):
+ m_transformLayer -> m_structuralLayer
+
+ (WebCore::GraphicsLayerCA::updateStructuralLayer):
+ Call ensureStructuralLayer() which handles any deltas to the
+ structural layer type.
+
+ (WebCore::GraphicsLayerCA::ensureStructuralLayer):
+ Handle changes to the structural layer requirements
+
+ (WebCore::GraphicsLayerCA::structuralLayerPurpose):
+ Return an enum describing the purpose of the structural layer; for now
+ this only returns NoStructuralLayer or StructuralLayerForPreserves3D, but
+ will in future also have a value related to reflections.
+
+2009-12-11 Simon Fraser <simon.fraser@apple.com>
+
+ Build fix for platforms where ACCELERATED_COMPOSITING is not defined.
+
+ * page/animation/KeyframeAnimation.cpp:
+ (WebCore::KeyframeAnimation::pauseAnimation):
+
+2009-12-11 Adam Roben <aroben@apple.com>
+
+ Windows build fix
+
+ * platform/graphics/win/WKCACFLayerRenderer.cpp: Removed #include of
+ non-existent header.
+
+2009-12-11 Simon Fraser <simon.fraser@apple.com>
+
+ Build fix, no review.
+
+ Build fix for platforms where ACCELERATED_COMPOSITING is not defined.
+
+ * page/animation/KeyframeAnimation.cpp:
+ (WebCore::KeyframeAnimation::startAnimation):
+
+2009-12-11 Simon Fraser <simon.fraser@apple.com>
+
+ Build fix, no review.
+
+ Build fix for platforms where ACCELERATED_COMPOSITING is not defined.
+
+ * page/animation/ImplicitAnimation.cpp:
+ (WebCore::ImplicitAnimation::startAnimation):
+
+2009-12-11 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Negative values for animation-delay are ignored (treated as zero)
+ https://bugs.webkit.org/show_bug.cgi?id=26150
+
+ When we get the m_startTime for an animation or transition, subtract any negative
+ delay so the animation/transition behaves like it started in the past, per spec.
+
+ Tests: animations/negative-delay.html
+ transitions/negative-delay.html
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::AnimationBase::updateStateMachine):
+
+2009-12-11 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Accelerated transitions broken when mixed with paused animations
+ https://bugs.webkit.org/show_bug.cgi?id=32387
+
+ Synchronization of a mixture of accelerated and software animations occurs via
+ a callback from GraphicsLayerCA, which ends up in
+ AnimationControllerPrivate::receivedStartTimeResponse(). The time passed in is
+ the exact time at which the accelerated animations started, so is used as the
+ start time for all animations and transitions which are marked as waiting.
+
+ The bug was that the callback called when re-starting animations that were
+ paused sent back an old time value, but this was used to start normal
+ transitions. Therefore the transition would start with a stale start time, and
+ thus end prematurely.
+
+ The fix is to change the way that GraphicsLayerCA handles paused animations.
+ Rather than setting the beginTime of the animation, it uses a beginTime of 0
+ and a timeOffset that gets passed down. Thus the callbacks always come with
+ beginTime for 'now'.
+
+ Also clarify the role of AnimationBase::endAnimation() by splitting it into
+ pauseAnimation() and endAnimation(), and pass down timeOffsets, rather than
+ beginTimes when starting and pausing.
+
+ Manual test only, because the bug requires a non-trivial combination of
+ animation pausing and transitions which take time, and the bug only shows in
+ pixel results.
+
+ * manual-tests/animation/transitions-and-paused-animations.html
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::AnimationBase::updateStateMachine):
+ * page/animation/AnimationBase.h:
+ (WebCore::AnimationBase::startAnimation):
+ (WebCore::AnimationBase::pauseAnimation):
+ (WebCore::AnimationBase::endAnimation):
+ * page/animation/ImplicitAnimation.cpp:
+ (WebCore::ImplicitAnimation::~ImplicitAnimation):
+ (WebCore::ImplicitAnimation::startAnimation):
+ (WebCore::ImplicitAnimation::endAnimation):
+ (WebCore::ImplicitAnimation::onAnimationEnd):
+ * page/animation/ImplicitAnimation.h:
+ (WebCore::ImplicitAnimation::pauseAnimation):
+ * page/animation/KeyframeAnimation.cpp:
+ (WebCore::KeyframeAnimation::~KeyframeAnimation):
+ (WebCore::KeyframeAnimation::startAnimation):
+ (WebCore::KeyframeAnimation::pauseAnimation):
+ (WebCore::KeyframeAnimation::endAnimation):
+ (WebCore::KeyframeAnimation::onAnimationEnd):
+ * page/animation/KeyframeAnimation.h:
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::GraphicsLayer::addAnimation):
+ (WebCore::GraphicsLayer::pauseAnimation):
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ (WebCore::GraphicsLayerCA::LayerAnimation::LayerAnimation):
+ (WebCore::GraphicsLayerCA::AnimationProcessingAction::AnimationProcessingAction):
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::addAnimation):
+ (WebCore::GraphicsLayerCA::removeAnimationsForKeyframes):
+ (WebCore::GraphicsLayerCA::pauseAnimation):
+ (WebCore::GraphicsLayerCA::updateLayerAnimations):
+ (WebCore::GraphicsLayerCA::setAnimationOnLayer):
+ (WebCore::GraphicsLayerCA::pauseAnimationOnLayer):
+ (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
+ (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::startAnimation):
+ (WebCore::RenderLayerBacking::startTransition):
+ (WebCore::RenderLayerBacking::animationPaused):
+ * rendering/RenderLayerBacking.h:
+
+2009-12-11 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fixes <http://webkit.org/b/32399>.
+ Pan Scrolling Jumps out of frames if the initial location is in a frame that can't be scrolled.
+
+ When we initially figure out the layer that we should begin scrolling, don't try to jump out
+ of frames/iFrames to look at the owner document. We don't want to jump out of frames, so we
+ don't need that logic anymore.
+
+ Added a test to make sure that we don't pan scroll if we start to scroll in an empty
+ iFrame that has a scrollable owner document.
+
+ Test: platform/win/fast/events/panScroll-no-iframe-jump.html
+
+ * dom/Node.cpp:
+ (WebCore::Node::defaultEventHandler):
+
+2009-12-11 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Fixes <http://webkit.org/b/32303>.
+ Middle-mouse button not firing mousedown DOM event when autoscroll happens.
+
+ This fix moves the pan scrolling code into Node.cpp, as part of the default event handler.
+ We get two wins out of this:
+ 1) Mousedown DOM events are now fired before pan scrolling.
+ 2) Calling event.preventDefault() on a middle mouse button will now prevent pan scrolling.
+
+ Added tests to show that middle mousedown DOM events are fired when panscrolling happens, and
+ that when event.preventDefault is called, pan scrolling doesn't happen.
+
+ Tests: platform/win/fast/events/panScroll-event-fired.html
+ platform/win/fast/events/panScroll-preventDefault.html
+
+ * dom/Node.cpp:
+ (WebCore::Node::defaultEventHandler): Moved pan scrolling starting code to here.
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::startPanScrolling): Function to initialize scrolling variables and start timer.
+ (WebCore::EventHandler::handleMousePressEvent): From here.
+ * page/EventHandler.h:
+
+2009-12-11 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Delay load DLLs for accelerated compositing
+ https://bugs.webkit.org/show_bug.cgi?id=31856
+
+ Change calls that use the data export symbols from
+ QuartzCore to use the functions in QuartzCoreInterface.
+ This allows QuartzCore to be delay loaded.
+
+ * platform/graphics/win/GraphicsLayerCACF.cpp:
+ (WebCore::GraphicsLayerCACF::GraphicsLayerCACF):
+ (WebCore::GraphicsLayerCACF::updateLayerPreserves3D):
+ (WebCore::GraphicsLayerCACF::updateContentsImage):
+ * platform/graphics/win/WKCACFLayer.cpp:
+ (WebCore::toCACFLayerType):
+ (WebCore::toCACFContentsGravityType):
+ (WebCore::fromCACFContentsGravityType):
+ (WebCore::toCACFFilterType):
+ (WebCore::fromCACFFilterType):
+ (WebCore::WKCACFLayer::create):
+ (WebCore::WKCACFLayer::WKCACFLayer):
+ (WebCore::WKCACFLayer::setContentsGravity):
+ (WebCore::WKCACFLayer::contentsGravity):
+ (WebCore::WKCACFLayer::setMagnificationFilter):
+ (WebCore::WKCACFLayer::magnificationFilter):
+ (WebCore::WKCACFLayer::setMinificationFilter):
+ (WebCore::WKCACFLayer::minificationFilter):
+ * platform/graphics/win/WKCACFLayer.h:
+ (WebCore::WKCACFLayer::):
+ * platform/graphics/win/WKCACFLayerRenderer.cpp:
+ (WebCore::WKCACFLayerRenderer::acceleratedCompositingAvailable):
+ (WebCore::WKCACFLayerRenderer::createRenderer):
+
+2009-12-11 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Adds an Android-specific implementation of initializeMaximumHTTPConnectionCountPerHost.
+ https://bugs.webkit.org/show_bug.cgi?id=31810
+
+ * platform/network/ResourceRequestBase.cpp: Modified. Disable default implementation
+ of initializeMaximumHTTPConnectionCountPerHost for Android.
+ * platform/network/android: Added.
+ * platform/network/android/ResourceRequestAndroid.cpp: Added.
+ (WebCore::initializeMaximumHTTPConnectionCountPerHost): Android-specific implementation.
+
+2009-12-11 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Add acceptTypes() method to FileChooser.
+ https://bugs.webkit.org/show_bug.cgi?id=32429
+
+ This method returns an 'accept' attribute value of the
+ corresponding INPUT element. A ChromeClient::runOpenPanel()
+ implementation can refer it through a FileChooser instance to
+ support type-restricted file selecting.
+
+ This makes no user-visible changes for now.
+
+ * platform/FileChooser.h:
+ (WebCore::FileChooser::acceptTypes):
+ * rendering/RenderFileUploadControl.cpp:
+ (WebCore::RenderFileUploadControl::acceptTypes):
+ * rendering/RenderFileUploadControl.h:
+
+2009-12-11 Victor Wang <victorw@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Changed PopupMenuChromium to keep the value selected from
+ keyboard when popup is closed.
+
+ The problem is Chromium does not fire the onchange event
+ when the popup is closed if an item is selected via
+ keyboard by typing the first char of the item. This makes
+ chromium popup not having consistent behaviours and also
+ behaves differently from other major browsers.
+ Calling popup->hide() instead of popup->hidePopup() in
+ PopupMenu fixes the issues as it does extra step to check
+ whethere there is a keyboard selection changed when closing
+ the popup.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32403
+
+ TEST: add a manual test as the current layout test shell
+ does not support sending keyboard events to popup list.
+
+ * manual-tests/chromium/select-close-popup-value-change.html: Added.
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupMenu::hide):
+
+2009-12-11 anton muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [v8] refactor WeakReferenceMap.
+ Move common bits of functionality to reduce duplication.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32389
+
+ Should be covered by buildbots.
+
+ * bindings/v8/DOMData.h:
+ (WebCore::DOMData::WrapperMapObjectRemover::visitDOMWrapper):
+ (WebCore::DOMData::handleWeakObject):
+ (WebCore::DOMData::removeObjectsFromWrapperMap):
+ * bindings/v8/DOMDataStore.cpp:
+ (WebCore::DOMDataStore::weakDOMObjectCallback):
+ (WebCore::DOMDataStore::weakActiveDOMObjectCallback):
+ (WebCore::DOMDataStore::weakNodeCallback):
+ (WebCore::DOMDataStore::weakSVGElementInstanceCallback):
+ (WebCore::DOMDataStore::weakSVGObjectWithContextCallback):
+ * bindings/v8/DOMDataStore.h:
+ * bindings/v8/V8DOMMap.cpp:
+ (WebCore::visitDOMNodesInCurrentThread):
+ (WebCore::visitDOMObjectsInCurrentThread):
+ (WebCore::visitActiveDOMObjectsInCurrentThread):
+ (WebCore::visitDOMSVGElementInstancesInCurrentThread):
+ (WebCore::visitSVGObjectsInCurrentThread):
+ * bindings/v8/V8DOMMap.h:
+ (WebCore::WeakReferenceMap::removeIfPresent):
+ (WebCore::WeakReferenceMap::clear):
+ (WebCore::WeakReferenceMap::visit):
+
+2009-12-11 anton muhin <antonm@chromium.org>
+ Reviewed by Adam Barth.
+
+ [v8] in Debug builds create an additional handle scope
+ when doing debug build checks.
+ https://bugs.webkit.org/show_bug.cgi?id=32335
+
+ Should be covered by buildbots.
+
+ * bindings/v8/V8DOMWrapper.h:
+ (WebCore::V8DOMWrapper::convertDOMWrapperToNative):
+ (WebCore::V8DOMWrapper::convertDOMWrapperToNode):
+
+2009-12-11 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Do not use ContextMenuItem as value type in custom
+ context menu implementation.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32411
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSInspectorFrontendHostCustom.cpp:
+ (WebCore::JSInspectorFrontendHost::showContextMenu):
+ * inspector/InspectorFrontendHost.cpp:
+ (WebCore::InspectorFrontendHost::InspectorFrontendHost):
+ (WebCore::InspectorFrontendHost::~InspectorFrontendHost):
+ (WebCore::InspectorFrontendHost::showContextMenu):
+ (WebCore::InspectorFrontendHost::contextMenuCleared):
+ * inspector/InspectorFrontendHost.h:
+ (WebCore::InspectorFrontendHost::MenuProvider::create):
+ (WebCore::InspectorFrontendHost::MenuProvider::~MenuProvider):
+ (WebCore::InspectorFrontendHost::MenuProvider::disconnect):
+ (WebCore::InspectorFrontendHost::MenuProvider::populateContextMenu):
+ (WebCore::InspectorFrontendHost::MenuProvider::contextMenuCleared):
+ (WebCore::InspectorFrontendHost::MenuProvider::MenuProvider):
+ * page/ContextMenuController.cpp:
+ (WebCore::ContextMenuController::ContextMenuController):
+ (WebCore::ContextMenuController::clearContextMenu):
+ (WebCore::ContextMenuController::showContextMenu):
+ (WebCore::ContextMenuController::contextMenuItemSelected):
+ * page/ContextMenuController.h:
+ * page/ContextMenuProvider.h: Added.
+ (WebCore::ContextMenuProvider::~ContextMenuProvider):
+ * page/ContextMenuSelectionHandler.h: Removed.
+
+2009-12-11 Simon Hausmann <hausmann@webkit.org>, Kim Grönholm <kim.gronholm@nomovok.com>
+
+ Reviewed by Antti Koivisto.
+
+ Basic cross-platform implementation of mapping platform touch events
+ to JavaScript touch events.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32114
+
+ Test: fast/events/basic-touch-events.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleTouchEvent):
+ * page/EventHandler.h:
+
+2009-12-11 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's EmptyFrameLoaderClient
+ https://bugs.webkit.org/show_bug.cgi?id=32110
+
+ Inherits the following class from Noncopyable because it is
+ instantiated by 'new' and no need to be copyable:
+
+ class name - instantiated at: WebCore/'location'
+
+ class EmptyFrameLoaderClient - svg/graphics/SVGImage.cpp:229
+
+ * loader/FrameLoaderClient.h:
+
+2009-12-11 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for 3 classes in WebCore's svg and loader directory
+ https://bugs.webkit.org/show_bug.cgi?id=32106
+
+ Inherits the following classes from Noncopyable because these are instantiated
+ by 'new' and no need to be copyable:
+
+ class/struct name - instantiated at: WebCore/'location'
+
+ class EmptyContextMenuClient - instantiated at: svg/graphics/SVGImage.cpp:232
+ class EmptyDragClient - instantiated at: svg/graphics/SVGImage.cpp:237
+ class SVGImageChromeClient - instantiated at: svg/graphics/SVGImage.cpp:243
+
+ * svg/graphics/SVGImage.cpp:
+ * loader/EmptyClients.h:
+
+2009-12-11 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ The values of RuntimeArray are not enumerable
+ https://bugs.webkit.org/show_bug.cgi?id=29005
+
+ The indices of RuntimeArray should be enumerated like for a regular array.
+
+ * bridge/runtime_array.cpp:
+ (JSC::RuntimeArray::getOwnPropertyNames):
+ * bridge/runtime_array.h:
+
+2009-12-11 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] ImageDecoderQt: Fix retrieval of image file extensions
+
+ QImageReader only allows retrieving the format() before actually reading the image.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32428
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::setData):
+ (WebCore::ImageDecoderQt::internalDecodeSize):
+
+2009-12-11 Simon Hausmann <hausmann@webkit.org>, Kim Grönholm <kim.gronholm@nomovok.com>
+
+ Reviewed by Antti Koivisto.
+
+ Added interfaces for touch event support in JavaScript.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32114
+
+ The Touch, TouchEvent and TouchList interfaces come straight from
+ Android's copy of WebKit (eclaire branch).
+
+ The PlatformTouchEvent and PlatformTouchPoint code was written by
+ us.
+
+ No new tests added, we are just adding interfaces
+ with this patch.
+
+ * WebCore.pro:
+ * bindings/js/JSEventCustom.cpp:
+ (WebCore::toJS):
+ * dom/Document.cpp:
+ (WebCore::Document::addListenerTypeIfNeeded):
+ * dom/Document.h:
+ (WebCore::Document::):
+ * dom/Document.idl:
+ * dom/Element.h:
+ * dom/Element.idl:
+ * dom/Event.cpp:
+ (WebCore::Event::isTouchEvent):
+ * dom/Event.h:
+ * dom/EventNames.h:
+ * dom/Touch.cpp: Added.
+ (WebCore::contentsX):
+ (WebCore::contentsY):
+ (WebCore::Touch::Touch):
+ (WebCore::Touch::updateLocation):
+ * dom/Touch.h: Added.
+ (WebCore::Touch::create):
+ (WebCore::Touch::frame):
+ (WebCore::Touch::target):
+ (WebCore::Touch::identifier):
+ (WebCore::Touch::clientX):
+ (WebCore::Touch::clientY):
+ (WebCore::Touch::screenX):
+ (WebCore::Touch::screenY):
+ (WebCore::Touch::pageX):
+ (WebCore::Touch::pageY):
+ * dom/Touch.idl: Added.
+ * dom/TouchEvent.cpp: Added.
+ (WebCore::TouchEvent::TouchEvent):
+ (WebCore::TouchEvent::initTouchEvent):
+ * dom/TouchEvent.h: Added.
+ (WebCore::TouchEvent::create):
+ (WebCore::TouchEvent::touches):
+ (WebCore::TouchEvent::targetTouches):
+ (WebCore::TouchEvent::changedTouches):
+ (WebCore::TouchEvent::TouchEvent):
+ (WebCore::TouchEvent::isTouchEvent):
+ * dom/TouchEvent.idl: Added.
+ * dom/TouchList.cpp: Added.
+ (WebCore::TouchList::item):
+ * dom/TouchList.h: Added.
+ (WebCore::TouchList::create):
+ (WebCore::TouchList::length):
+ (WebCore::TouchList::append):
+ (WebCore::TouchList::TouchList):
+ * dom/TouchList.idl: Added.
+ * html/HTMLAttributeNames.in:
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::parseMappedAttribute):
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl:
+ * platform/PlatformTouchEvent.h: Added.
+ (WebCore::PlatformTouchEvent::PlatformTouchEvent):
+ (WebCore::PlatformTouchEvent::touchPoints):
+ * platform/PlatformTouchPoint.h: Added.
+ (WebCore::PlatformTouchPoint::):
+ (WebCore::PlatformTouchPoint::id):
+ (WebCore::PlatformTouchPoint::state):
+ (WebCore::PlatformTouchPoint::screenPos):
+ (WebCore::PlatformTouchPoint::pos):
+ * platform/qt/PlatformTouchEventQt.cpp: Added.
+ (WebCore::PlatformTouchEvent::PlatformTouchEvent):
+ * platform/qt/PlatformTouchPointQt.cpp: Added.
+ (WebCore::PlatformTouchPoint::PlatformTouchPoint):
+
+2009-12-11 Grace Kloba <klobag@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ [Android] Add detachHistoryItem() to AndroidWebHistoryBridge. And the constructor takes
+ HistoryItem* now. As AndroidWebHistoryBridge holds a dumb pointer of HistoryItem and
+ HistoryItem holds a RefPtr of AndroidWebHistoryBridge, the dumb pointer needs to be cleared
+ when HistoryItem is deleted to avoid potential crash.
+ https://bugs.webkit.org/show_bug.cgi?id=32251
+
+ * history/HistoryItem.cpp:
+ (WebCore::HistoryItem::~HistoryItem):
+ * history/android/AndroidWebHistoryBridge.h:
+ (WebCore::AndroidWebHistoryBridge::AndroidWebHistoryBridge):
+ (WebCore::AndroidWebHistoryBridge::detachHistoryItem):
+
+
+2009-12-11 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Log WebSocket error to Web Inspector console.
+ https://bugs.webkit.org/show_bug.cgi?id=32165
+
+ * websockets/WebSocketChannel.cpp:
+ (WebCore::WebSocketChannel::didOpen):
+ (WebCore::WebSocketChannel::appendToBuffer):
+ * websockets/WebSocketHandshake.cpp:
+ (WebCore::WebSocketHandshake::readServerHandshake):
+ (WebCore::WebSocketHandshake::readHTTPHeaders):
+ (WebCore::WebSocketHandshake::checkResponseHeaders):
+
+2009-12-10 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Mixed content shouldn't trigger for plug-ins without URLs
+ https://bugs.webkit.org/show_bug.cgi?id=32384
+
+ These plug-ins cannot be controlled by active network attackers, so
+ there's no reason to trigger a mixed content warning.
+
+ Test: http/tests/security/mixedContent/empty-url-plugin-in-frame.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::isMixedContent):
+
+2009-12-10 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32140
+ REGRESSION(r50072): Mailman administrative functionality is broken
+
+ Test: http/tests/misc/percent-sign-in-form-field-name.html
+
+ * platform/network/FormDataBuilder.cpp: (WebCore::appendQuotedString): Don't encode percent
+ sign, we never had a good reason to do that.
+
+2009-12-10 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Geoffrey Garen.
+
+ Remove getPropertyAttributes() from JavaScript bindings.
+ https://bugs.webkit.org/show_bug.cgi?id=31933
+
+ The functionality is provided by getOwnPropertyDescriptor().
+
+ * WebCore.order:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ * bindings/js/JSDOMWindowShell.cpp:
+ * bindings/js/JSDOMWindowShell.h:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * page/DOMWindow.idl:
+
+2009-12-10 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Oliver Hunt.
+
+ Changed WebGLRenderingContext to synthesize GL errors rather than
+ raising JavaScript exceptions. Removed internal getError() calls
+ after each graphics call. The GraphicsContext3D maintains the
+ synthetic exceptions because only it has complete information
+ about certain conditions requiring them to be raised.
+
+ Based on idea from Ilmari Heikkinen, added create3DDebugContext()
+ to webgl-test.js and changed the WebGL layout tests expecting
+ error conditions to use it. Updated expected.txt files, which now
+ implicitly test the OpenGL error as it is part of the exception's
+ message.
+
+ Added new targeted test covering aspects of synthetic errors as
+ well as regression tests for bugs uncovered during its development.
+
+ Test: fast/canvas/webgl/error-reporting.html
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::sizeInBytes):
+ (WebCore::WebGLRenderingContext::activeTexture):
+ (WebCore::WebGLRenderingContext::attachShader):
+ (WebCore::WebGLRenderingContext::bindAttribLocation):
+ (WebCore::WebGLRenderingContext::bindBuffer):
+ (WebCore::WebGLRenderingContext::bindFramebuffer):
+ (WebCore::WebGLRenderingContext::bindRenderbuffer):
+ (WebCore::WebGLRenderingContext::bindTexture):
+ (WebCore::WebGLRenderingContext::bufferData):
+ (WebCore::WebGLRenderingContext::bufferSubData):
+ (WebCore::WebGLRenderingContext::compileShader):
+ (WebCore::WebGLRenderingContext::createShader):
+ (WebCore::WebGLRenderingContext::detachShader):
+ (WebCore::WebGLRenderingContext::disableVertexAttribArray):
+ (WebCore::WebGLRenderingContext::drawArrays):
+ (WebCore::WebGLRenderingContext::drawElements):
+ (WebCore::WebGLRenderingContext::enableVertexAttribArray):
+ (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
+ (WebCore::WebGLRenderingContext::framebufferTexture2D):
+ (WebCore::WebGLRenderingContext::getActiveAttrib):
+ (WebCore::WebGLRenderingContext::getActiveUniform):
+ (WebCore::WebGLRenderingContext::getBufferParameter):
+ (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
+ (WebCore::WebGLRenderingContext::getParameter):
+ (WebCore::WebGLRenderingContext::getProgramParameter):
+ (WebCore::WebGLRenderingContext::getProgramInfoLog):
+ (WebCore::WebGLRenderingContext::getRenderbufferParameter):
+ (WebCore::WebGLRenderingContext::getShaderParameter):
+ (WebCore::WebGLRenderingContext::getShaderInfoLog):
+ (WebCore::WebGLRenderingContext::getShaderSource):
+ (WebCore::WebGLRenderingContext::getTexParameter):
+ (WebCore::WebGLRenderingContext::getUniform):
+ (WebCore::WebGLRenderingContext::getUniformLocation):
+ (WebCore::WebGLRenderingContext::getVertexAttrib):
+ (WebCore::WebGLRenderingContext::linkProgram):
+ (WebCore::WebGLRenderingContext::shaderSource):
+ (WebCore::WebGLRenderingContext::texImage2D):
+ (WebCore::WebGLRenderingContext::texSubImage2D):
+ (WebCore::WebGLRenderingContext::uniform1f):
+ (WebCore::WebGLRenderingContext::uniform1fv):
+ (WebCore::WebGLRenderingContext::uniform1i):
+ (WebCore::WebGLRenderingContext::uniform1iv):
+ (WebCore::WebGLRenderingContext::uniform2f):
+ (WebCore::WebGLRenderingContext::uniform2fv):
+ (WebCore::WebGLRenderingContext::uniform2i):
+ (WebCore::WebGLRenderingContext::uniform2iv):
+ (WebCore::WebGLRenderingContext::uniform3f):
+ (WebCore::WebGLRenderingContext::uniform3fv):
+ (WebCore::WebGLRenderingContext::uniform3i):
+ (WebCore::WebGLRenderingContext::uniform3iv):
+ (WebCore::WebGLRenderingContext::uniform4f):
+ (WebCore::WebGLRenderingContext::uniform4fv):
+ (WebCore::WebGLRenderingContext::uniform4i):
+ (WebCore::WebGLRenderingContext::uniform4iv):
+ (WebCore::WebGLRenderingContext::uniformMatrix2fv):
+ (WebCore::WebGLRenderingContext::uniformMatrix3fv):
+ (WebCore::WebGLRenderingContext::uniformMatrix4fv):
+ (WebCore::WebGLRenderingContext::useProgram):
+ (WebCore::WebGLRenderingContext::validateProgram):
+ (WebCore::WebGLRenderingContext::vertexAttribPointer):
+ * html/canvas/WebGLRenderingContext.h:
+ (WebCore::WebGLRenderingContext::cleanupAfterGraphicsCall):
+ * platform/graphics/GraphicsContext3D.h:
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::getActiveAttrib):
+ (WebCore::GraphicsContext3D::getActiveUniform):
+ (WebCore::GraphicsContext3D::getError):
+ (WebCore::GraphicsContext3D::synthesizeGLError):
+
+2009-12-10 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix for assert on Chrome/skia with SVG Filters enabled.
+ https://bugs.webkit.org/show_bug.cgi?id=32394
+
+ Covered by LayoutTests/svg/W3C-SVG-1.1/filters-tile-01-b.svg and others.
+
+ * platform/graphics/skia/ImageBufferSkia.cpp:
+ (WebCore::ImageBuffer::platformTransformColorSpace):
+
+2009-12-10 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(4.0.4-42a12): With 2 highlighted lines of text in gmail/hotmail selecting Bold selects other 2 edit buttons automatically.
+ <rdar://problem/7442065>
+ https://bugs.webkit.org/show_bug.cgi?id=32285
+
+ When examining the styles of the nodes after the first in a range selection, we take into
+ cosideration differences in style of txt nodes only.
+
+ Test: editing/execCommand/queryCommandState-02.html
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::selectionHasStyle):
+
+2009-12-10 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Crash in XMLTokenizer::popCurrentNode if window.close() is called during parsing
+ https://bugs.webkit.org/show_bug.cgi?id=31576
+
+ Add a RefCounted wrapper object around xmlParserCtxtPtr so we can
+ maintain it's lifetime more effectively.
+
+ Test: fast/parser/xhtml-close-while-parsing.xhtml
+
+ * dom/XMLTokenizer.cpp:
+ (WebCore::XMLTokenizer::popCurrentNode):
+ * dom/XMLTokenizer.h:
+ (WebCore::XMLParserContext::context):
+ (WebCore::XMLParserContext::XMLParserContext):
+ (WebCore::XMLTokenizer::context):
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::XMLParserContext::createStringParser):
+ (WebCore::XMLParserContext::createMemoryParser):
+ (WebCore::XMLParserContext::~XMLParserContext):
+ (WebCore::XMLTokenizer::~XMLTokenizer):
+ (WebCore::XMLTokenizer::doWrite):
+ (WebCore::XMLTokenizer::initializeParserContext):
+ (WebCore::XMLTokenizer::doEnd):
+ (WebCore::XMLTokenizer::lineNumber):
+ (WebCore::XMLTokenizer::columnNumber):
+ (WebCore::XMLTokenizer::stopParsing):
+ (WebCore::parseXMLDocumentFragment):
+ (WebCore::parseAttributes):
+
+2009-12-10 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: debugger shortcuts don't work when
+ Search field or Console drawer has focus.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32392
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+ (WebInspector.documentKeyDown):
+ (WebInspector.documentKeyUp):
+ (WebInspector.searchKeyDown):
+
+2009-12-10 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Events created in isolated worlds may fire in main world.
+ https://bugs.webkit.org/show_bug.cgi?id=32386
+
+ Test: http/tests/security/isolatedWorld/events.html
+
+ * WebCore.gypi: Added WorldContextHandle.
+ * bindings/v8/ScriptEventListener.cpp:
+ (WebCore::createAttributeEventListener): Added WorldContextHandle params.
+ * bindings/v8/SharedPersistent.h: Fixed a few style/include issues.
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::V8AbstractEventListener): Added WorldContextHandle params.
+ (WebCore::V8AbstractEventListener::handleEvent): Adjusted context retrieval to use WorldContextHandle.
+ (WebCore::V8AbstractEventListener::invokeEventHandler): Ditto.
+ * bindings/v8/V8AbstractEventListener.h:
+ (WebCore::V8AbstractEventListener::worldContext): Added WorldContextHandle params.
+ * bindings/v8/V8EventListenerList.h:
+ (WebCore::V8EventListenerList::findOrCreateWrapper): Ditto.
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::V8LazyEventListener): Ditto.
+ (WebCore::V8LazyEventListener::prepareListenerObject): Adjusted context retrieval to use WorldContextHandle.
+ * bindings/v8/V8LazyEventListener.h:
+ (WebCore::V8LazyEventListener::create): Added WorldContextHandle params.
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::context): Refactored to use mainWorldContext();
+ (WebCore::V8Proxy::mainWorldContext): Added.
+ (WebCore::toV8Context): Changed to use WorldContextHandle.
+ * bindings/v8/V8Proxy.h: Added mainWorldContext decl.
+ * bindings/v8/V8Utilities.cpp:
+ (WebCore::reportException): Added an extra check to avoid crashes during frame teardown.
+ * bindings/v8/V8WorkerContextEventListener.cpp:
+ (WebCore::V8WorkerContextEventListener::V8WorkerContextEventListener): Added WorldContextHandle params.
+ * bindings/v8/V8WorkerContextEventListener.h:
+ (WebCore::V8WorkerContextEventListener::create): Added WorldContextHandle params.
+ * bindings/v8/WorldContextHandle.cpp: Added.
+ * bindings/v8/WorldContextHandle.h: Added.
+ * bindings/v8/custom/V8CustomEventListener.cpp:
+ (WebCore::V8EventListener::V8EventListener): Added WorldContextHandle params.
+ * bindings/v8/custom/V8CustomEventListener.h:
+ (WebCore::V8EventListener::create): Added WorldContextHandle params.
+
+2009-12-10 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Pass more information about a plug-in to the PluginHalterDelegate
+
+ Reviewed by Adam Roben.
+
+ * loader/EmptyClients.h:
+ Remove this unused class.
+
+ * page/HaltablePlugin.h:
+ Add new functions to return the plug-in's name and whether it is
+ windowed.
+
+ * page/PluginHalter.cpp:
+ (WebCore::PluginHalter::timerFired):
+ Pass new arguments to the client.
+
+ * page/PluginHalterClient.h:
+ Add new parameters.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::pluginName):
+ Return the name from the PluginPackage.
+
+ * plugins/PluginView.h:
+ (WebCore::PluginView::isWindowed):
+
+2009-12-09 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Pavel Feldman.
+
+ Fixes <http://webkit.org/b/31738>.
+ Web Inspector: Console Scope Bar should be on top of console when Console is a Panel.
+
+ When the console is set to be shown as a full panel, move the scope bar to the top
+ where it looks best. When it is only shown as a drawer, move it to the bottom, where
+ it originally was. This takes up less space as a drawer, and makes it more discoverable
+ and usable when it is the full panel.
+
+ * inspector/front-end/ConsolePanel.js:
+ (WebInspector.ConsolePanel.prototype.show): Move filter bar to top.
+ (WebInspector.ConsolePanel.prototype.hide): Move filter bar back to bottom.
+ * inspector/front-end/inspector.css:
+
+2009-12-10 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by Dirk Schulze.
+
+ Fix for alpha blending in SVG Filters on Chromium/skia.
+ https://bugs.webkit.org/show_bug.cgi?id=32378
+
+ Covered by LayoutTests/svg/filters/feGaussianBlur.svg and others.
+
+ * platform/graphics/skia/ImageBufferSkia.cpp:
+ (WebCore::ImageBuffer::platformTransformColorSpace):
+
+2009-12-10 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Add context menu actions for DOM tree.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32348
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/ContextMenu.js:
+ (WebInspector.ContextMenu):
+ (WebInspector.ContextMenu.prototype.show):
+ (WebInspector.ContextMenu.prototype.appendItem):
+ (WebInspector.ContextMenu.prototype.appendSeparator):
+ (WebInspector.ContextMenu.prototype._itemSelected):
+ (WebInspector.contextMenuItemSelected):
+ (WebInspector.contextMenuCleared):
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeOutline.prototype._onmouseout):
+ (WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
+ (WebInspector.ElementsTreeElement.prototype.ondblclick):
+ (WebInspector.ElementsTreeElement.prototype._startEditingFromEvent):
+ (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
+ (WebInspector.ElementsTreeElement.prototype._populateTextContextMenu):
+ (WebInspector.ElementsTreeElement.prototype._startEditing):
+ (WebInspector.ElementsTreeElement.prototype._addNewAttribute):
+ * inspector/front-end/ObjectPropertiesSection.js:
+ (WebInspector.ObjectPropertyTreeElement.prototype.ondblclick):
+ * inspector/front-end/ResourceView.js:
+ (WebInspector.ResourceView.prototype._toggleURLdecoding):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertyTreeElement.prototype):
+ * inspector/front-end/inspector.js:
+ (WebInspector.contextMenuEventFired):
+ * inspector/front-end/treeoutline.js:
+ (TreeElement.treeElementDoubleClicked):
+
+2009-12-09 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Oliver Hunt.
+
+ Filters contain some leaks in untested code
+ https://bugs.webkit.org/show_bug.cgi?id=32325
+
+ Fix obvious leak in SVGFE*Lighting classes. Implement the create() idiom for
+ all classes in svg/graphics, that were missing it. The lighting filters aren't
+ implemented so far, but the associated FilterEffect objects are build, which created
+ these leaks.
+
+ This removes the SVG related failures in the leaks bot.
+
+ * svg/SVGFEDiffuseLightingElement.cpp:
+ (WebCore::SVGFEDiffuseLightingElement::findLights):
+ * svg/SVGFEDiffuseLightingElement.h:
+ * svg/SVGFEDistantLightElement.cpp:
+ (WebCore::SVGFEDistantLightElement::lightSource):
+ * svg/SVGFEDistantLightElement.h:
+ * svg/SVGFELightElement.h:
+ * svg/SVGFEPointLightElement.cpp:
+ (WebCore::SVGFEPointLightElement::lightSource):
+ * svg/SVGFEPointLightElement.h:
+ * svg/SVGFESpecularLightingElement.cpp:
+ (WebCore::SVGFESpecularLightingElement::findLights):
+ * svg/SVGFESpecularLightingElement.h:
+ * svg/SVGFESpotLightElement.cpp:
+ (WebCore::SVGFESpotLightElement::lightSource):
+ * svg/SVGFESpotLightElement.h:
+ * svg/graphics/filters/SVGDistantLightSource.h:
+ (WebCore::DistantLightSource::create):
+ (WebCore::DistantLightSource::DistantLightSource):
+ * svg/graphics/filters/SVGFEDiffuseLighting.cpp:
+ (WebCore::FEDiffuseLighting::FEDiffuseLighting):
+ (WebCore::FEDiffuseLighting::create):
+ (WebCore::FEDiffuseLighting::setLightSource):
+ * svg/graphics/filters/SVGFEDiffuseLighting.h:
+ * svg/graphics/filters/SVGFESpecularLighting.cpp:
+ (WebCore::FESpecularLighting::FESpecularLighting):
+ (WebCore::FESpecularLighting::create):
+ (WebCore::FESpecularLighting::setLightSource):
+ * svg/graphics/filters/SVGFESpecularLighting.h:
+ * svg/graphics/filters/SVGLightSource.h:
+ * svg/graphics/filters/SVGPointLightSource.h:
+ (WebCore::PointLightSource::create):
+ (WebCore::PointLightSource::PointLightSource):
+ * svg/graphics/filters/SVGSpotLightSource.h:
+ (WebCore::SpotLightSource::create):
+ (WebCore::SpotLightSource::SpotLightSource):
+
+2009-12-10 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Oliver Hunt.
+
+ [Chromium] SporeViewer demo doesn't work in Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=32364
+
+ Test: fast/canvas/webgl/bug-32364.html
+
+ * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::vertexAttribAndUniformHelperf):
+ (WebCore::uniformHelperi):
+
+2009-12-09 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=32346 SVG property
+ -webkit-shadow should apply shadow on the result after compositing
+ -and corresponding-
+ <rdar://problem/7389404>
+
+ Set a transparency layer when setting a shadow to apply the shadow
+ to the composite.
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderBase::prepareToRenderSVGContent):
+ (WebCore::SVGRenderBase::finishRenderSVGContent):
+
+2009-12-09 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32332
+ WebSocket events should be dispatched synchronously
+
+ Updated websocket/tests/simple to test for the new behavior.
+
+ When Web Sockets API says that events should be queued for async dispatch, it means something
+ different. We should keep this in mind when dealing with other HTML5-related specs.
+
+ The model for HTML5 is that code running in response to network events (e.g. WebSocket or
+ XMLHttpRequest algorithms) runs in a separate thread of execution, and thus needs to post
+ async events as its only way to communicate with client code. As long as network events are
+ queued themselves (as they are in WebKit), there is no need to queue JS events for async
+ dispatch.
+
+ * websockets/WebSocket.cpp:
+ (WebCore::WebSocket::didConnect):
+ (WebCore::WebSocket::didReceiveMessage):
+ (WebCore::WebSocket::didClose):
+
+2009-12-09 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32355
+ Assertion failure when opening a WebSocket connection
+
+ I couldn't make a reliable test for this. Once the test from bug 32299 is landed, it
+ will provide partial coverage, as I was frequently seeing the assertion failure with it.
+
+ * platform/network/SocketStreamHandleBase.cpp: (WebCore::SocketStreamHandleBase::send):
+ It's not an error if zero is returned from platformSend() - it just means that nothing could
+ be pushed down to the network layer, and all data was queued for later.
+ * platform/network/cf/SocketStreamHandleCFNet.cpp:
+ (WebCore::SocketStreamHandle::readStreamCallback): This will no longer happen with SocketStream,
+ but a client can potentially destroy the handle from any callback, so we need to check that
+ this didn't happen.
+ (WebCore::SocketStreamHandle::writeStreamCallback): Ditto.
+
+2009-12-09 Sam Weinig <sam@webkit.org>
+
+ Roll out 51919 and 51920. They were incorrect and unnecessary right now.
+
+ * platform/mac/WebCoreObjCExtras.mm:
+ (WebCoreObjCScheduleDeallocateOnMainThread):
+ * platform/network/mac/NetworkStateNotifierMac.cpp:
+ (WebCore::NetworkStateNotifier::NetworkStateNotifier):
+
+2009-12-09 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Adds wtf/StdLibExtras.h include for DEFINE_STATIC_LOCAL in V8 ScriptState.
+ https://bugs.webkit.org/show_bug.cgi?id=32330
+
+ Build fix only, no new tests.
+
+ * bindings/v8/ScriptState.cpp: Modified. Adds wtf/StdLibExtras.h include.
+
+2009-12-09 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Adler.
+
+ Adds ENABLE(INSPECTOR) guards around script binding methods that use types
+ defined only when INSPECTOR is enabled.
+ https://bugs.webkit.org/show_bug.cgi?id=32328
+
+ Build fix only, no new tests.
+
+ * bindings/js/ScriptValue.cpp: Modified. Added ENABLE(INSPECTOR) guard to ScriptValue::quarantineValue.
+ * bindings/v8/ScriptObject.cpp: Modified. Added ENABLE(INSPECTOR) guard to some overloads of ScriptGlobalObject::set.
+
+2009-12-09 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ Adds Android Makefiles for building with V8.
+ Also updates existing Android Makefiles with latest additions.
+ https://bugs.webkit.org/show_bug.cgi?id=32278
+
+ Build fix only, no new tests.
+
+ * Android.derived.jscbindings.mk: Modified.
+ * Android.derived.mk: Modified.
+ * Android.derived.v8bindings.mk: Added.
+ * Android.jscbindings.mk: Modified.
+ * Android.mk: Modified.
+ * Android.v8bindings.mk: Added.
+
+2009-12-09 Jonathan Dixon <joth@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Bug 32338 - [Chromium] Fix Chromium builder by including missing GeolocationServiceChromium
+ https://bugs.webkit.org/show_bug.cgi?id=32338
+
+ Fix build break: re-include file dropped out by merge in http://trac.webkit.org/changeset/51681/trunk/WebCore/WebCore.gypi
+
+ * WebCore.gypi: Add missing GeolocationServiceChromium.cpp
+
+2009-12-09 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Brady Eidson.
+
+ Fixed a typo in http://trac.webkit.org/changeset/51644 that broke
+ the QWebPage autotest.
+
+ No new test required.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::navigateToDifferentDocument):
+
+2009-12-09 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by Eric Seidel.
+
+ Exclude JSSVG*.cpp generated files from --minimal and --no-svg builds.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32286
+
+ * WebCore.pro:
+
+2009-12-09 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Eric Carlson.
+
+ Ogg mimetypes are incorrect
+ https://bugs.webkit.org/show_bug.cgi?id=27113
+
+ The ogg extension is handled by audio/ogg instead of
+ application/ogg. See
+ http://wiki.xiph.org/MIME_Types_and_File_Extensions
+
+ * platform/MIMETypeRegistry.cpp:
+ (WebCore::TypeExtensionPair::):
+
+2009-12-09 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Use the current run loop instead of the main runloop for the NetworkStateNotifier.
+
+ * platform/network/mac/NetworkStateNotifierMac.cpp:
+ (WebCore::NetworkStateNotifier::NetworkStateNotifier):
+
+2009-12-09 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Use isMainThread() helper instead of pthread_main_np() != 0.
+
+ * platform/mac/WebCoreObjCExtras.mm:
+ (WebCoreObjCScheduleDeallocateOnMainThread):
+
+2009-12-09 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Add some #ifdefs to allow us to experiment with a single NSView mac WebKit.
+
+ * page/Chrome.h:
+ * page/EventHandler.h:
+ * page/mac/ChromeMac.mm:
+ * page/mac/DragControllerMac.mm:
+ (WebCore::DragController::dragOperation):
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::eventLoopHandleMouseDragged):
+ (WebCore::EventHandler::eventActivatedView):
+ (WebCore::EventHandler::passMousePressEventToSubframe):
+ (WebCore::EventHandler::passMouseMoveEventToSubframe):
+ (WebCore::EventHandler::passMouseReleaseEventToSubframe):
+ (WebCore::EventHandler::passWheelEventToWidget):
+ (WebCore::EventHandler::focusDocumentView):
+ (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
+ (WebCore::EventHandler::createDraggingClipboard):
+ (WebCore::isKeyboardOptionTab):
+ (WebCore::EventHandler::invertSenseOfTabsToLinks):
+ (WebCore::EventHandler::tabsToAllControls):
+ (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
+ (WebCore::EventHandler::accessKeyModifiers):
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::wheelEvent):
+ * platform/Widget.cpp:
+ * platform/Widget.h:
+ * platform/mac/ScrollViewMac.mm:
+ * platform/mac/WidgetMac.mm:
+ (WebCore::Widget::Widget):
+ (WebCore::Widget::~Widget):
+ (WebCore::Widget::show):
+ (WebCore::Widget::hide):
+ (WebCore::Widget::setCursor):
+ (WebCore::Widget::paint):
+ (WebCore::Widget::setFocus):
+ (WebCore::Widget::setIsSelected):
+ (WebCore::Widget::frameRect):
+ (WebCore::Widget::setFrameRect):
+
+2009-12-09 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Chromium build fix.
+
+ No new tests.
+
+ * bindings/v8/DOMData.cpp
+ * bindings/v8/V8DOMWrapper.cpp
+ * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
+ (WebCore::vertexAttribAndUniformHelperf):
+ (WebCore::uniformHelperi):
+ (WebCore::uniformMatrixHelper):
+
+2009-12-09 Søren Gjesse <sgjesse@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [V8] Isolated world reuse failure
+ https://bugs.webkit.org/show_bug.cgi?id=32306
+
+ Fixed bug introduced in r51407: (http://trac.webkit.org/changeset/51407) which caused layout test
+ LayoutTests/http/tests/security/isolatedWorld/world-reuse.html to fail.
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::setInjectedScriptContextDebugId):
+ (WebCore::V8Proxy::contextDebugId):
+
+2009-12-09 Patrick Scott <phanna@email.unc.edu>
+
+ Fix the build with ENABLE_ORIENTATION_EVENTS
+ https://bugs.webkit.org/show_bug.cgi?id=32321
+
+ * page/Frame.cpp:
+ (WebCore::Frame::sendOrientationChangeEvent):
+
+2009-12-09 Avi Drissman <avi@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Chromium tickmarks in scrollbar now UX approved.
+ https://bugs.webkit.org/show_bug.cgi?id=32069
+
+ * platform/chromium/ScrollbarThemeChromiumMac.mm:
+ (WebCore::ScrollbarThemeChromiumMac::paint):
+
+2009-12-09 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Delay load DLLs for accelerated compositing
+ https://bugs.webkit.org/show_bug.cgi?id=31856
+
+ Add logic to turn off accelerated compositing if d3d9 or QuartzCore
+ DLLs are not present.
+
+ This patch also changes the WKCACFLayerRenderer to be a pointer.
+ This allows me to have a create() method which will not create it when
+ accelerated compositing is disabled because of missing DLLs. It
+ avoids having to do so many checks. I also made WebViewWndProc
+ a member function to allow several methods to be made protected, which
+ allows me to avoid doing availability checks there as well.
+
+ * platform/graphics/win/WKCACFLayer.cpp:
+ * platform/graphics/win/WKCACFLayer.h:
+ * platform/graphics/win/WKCACFLayerRenderer.cpp:
+ * platform/graphics/win/WKCACFLayerRenderer.h:
+ * rendering/RenderLayerBacking.cpp:
+
+2009-12-09 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Rename dom/ClassNames to SpaceSplitString and update build files.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32250
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::matchRules):
+ * dom/ClassNames.cpp: Removed.
+ * dom/ClassNames.h: Removed.
+ * dom/ClassNodeList.h:
+ * dom/NamedMappedAttrMap.h:
+ (WebCore::NamedMappedAttrMap::classNames):
+ * dom/SpaceSplitString.cpp: Copied from WebCore/dom/ClassNames.cpp.
+ (WebCore::SpaceSplitStringData::createVector):
+ (WebCore::SpaceSplitStringData::containsAll):
+ * dom/SpaceSplitString.h: Copied from WebCore/dom/ClassNames.h.
+ (WebCore::SpaceSplitStringData::SpaceSplitStringData):
+ (WebCore::SpaceSplitString::SpaceSplitString):
+ (WebCore::SpaceSplitString::set):
+ (WebCore::SpaceSplitString::containsAll):
+ * dom/StyledElement.h:
+ (WebCore::StyledElement::classNames):
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::setRel):
+
+2009-12-09 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Enable SVG filters in Chromium build.
+ https://bugs.webkit.org/show_bug.cgi?id=32323
+
+ Covered by SVG filter layout tests.
+
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gypi:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8DOMWrapper.cpp:
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+
+2009-12-09 Oliver Hunt <oliver@apple.com>
+
+ Build fix
+
+ * bindings/js/JSWebGLRenderingContextCustom.cpp:
+ (WebCore::functionForUniform):
+
+2009-12-08 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ WebSocket allow space (U+0020) in sub protocol name.
+ https://bugs.webkit.org/show_bug.cgi?id=32266
+
+ Test: websocket/tests/sub-protocol-with-space.html
+
+ * websockets/WebSocket.cpp:
+ (WebCore::isValidProtocolString):
+
+2009-12-08 Peterson Trethewey <petersont@google.com>
+
+ Reviewed by Oliver Hunt.
+
+ Implement WebGLUniformLocation and change API to use it.
+ https://bugs.webkit.org/show_bug.cgi?id=31173
+
+ Test: fast/canvas/webgl/uniform-location.html
+
+ * DerivedSources.make:
+ * WebCore.gypi:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSWebGLRenderingContextCustom.cpp:
+ (WebCore::JSWebGLRenderingContext::getProgramParameter):
+ (WebCore::JSWebGLRenderingContext::getUniform):
+ (WebCore::functionForUniform):
+ (WebCore::dataFunctionf):
+ (WebCore::dataFunctioni):
+ (WebCore::dataFunctionMatrix):
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
+ (WebCore::toWebGLUniformLocation):
+ (WebCore::):
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::isFunctionToCallForAttribute):
+ (WebCore::vertexAttribAndUniformHelperf):
+ (WebCore::uniformHelperi):
+ (WebCore::uniformMatrixHelper):
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::getUniform):
+ (WebCore::WebGLRenderingContext::getUniformLocation):
+ (WebCore::WebGLRenderingContext::uniform1f):
+ (WebCore::WebGLRenderingContext::uniform1fv):
+ (WebCore::WebGLRenderingContext::uniform1i):
+ (WebCore::WebGLRenderingContext::uniform1iv):
+ (WebCore::WebGLRenderingContext::uniform2f):
+ (WebCore::WebGLRenderingContext::uniform2fv):
+ (WebCore::WebGLRenderingContext::uniform2i):
+ (WebCore::WebGLRenderingContext::uniform2iv):
+ (WebCore::WebGLRenderingContext::uniform3f):
+ (WebCore::WebGLRenderingContext::uniform3fv):
+ (WebCore::WebGLRenderingContext::uniform3i):
+ (WebCore::WebGLRenderingContext::uniform3iv):
+ (WebCore::WebGLRenderingContext::uniform4f):
+ (WebCore::WebGLRenderingContext::uniform4fv):
+ (WebCore::WebGLRenderingContext::uniform4i):
+ (WebCore::WebGLRenderingContext::uniform4iv):
+ (WebCore::WebGLRenderingContext::uniformMatrix2fv):
+ (WebCore::WebGLRenderingContext::uniformMatrix3fv):
+ (WebCore::WebGLRenderingContext::uniformMatrix4fv):
+ * html/canvas/WebGLRenderingContext.h:
+ * html/canvas/WebGLRenderingContext.idl:
+ * html/canvas/WebGLUniformLocation.cpp: Added.
+ (WebCore::WebGLUniformLocation::create):
+ (WebCore::WebGLUniformLocation::WebGLUniformLocation):
+ * html/canvas/WebGLUniformLocation.h: Added.
+ (WebCore::WebGLUniformLocation::~WebGLUniformLocation):
+ (WebCore::WebGLUniformLocation::program):
+ (WebCore::WebGLUniformLocation::location):
+ * html/canvas/WebGLUniformLocation.idl: Added.
+
+2009-12-08 Adam Langley <agl@google.com>
+
+ Reviewed by Darin Adler.
+
+ Fix assertion failure in WebCore::RenderBlock::startDelayUpdateScrollInfo
+
+ startDelayUpdateScrollInfo calls a function that can end up calling
+ startDelayUpdateScrollInfo again. However, it's static state is
+ inconsistent when this happens leading to an assertion failure (or
+ probably a memory leak if assertions are off).
+
+ Thanks to Robert Swiecki for the test case.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32172
+ http://code.google.com/p/chromium/issues/detail?id=28880
+
+ Test: fast/css/recursive-delay-update-scroll.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
+
+2009-12-08 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebCore source level debugging on Windows not reliable in some cases
+ https://bugs.webkit.org/show_bug.cgi?id=32297
+
+ Customized pdb file name/location for WebCore static library.
+
+ * WebCore.vcproj/WebCoreCommon.vsprops: Add ProgramDataBaseFileName.
+
+2009-12-08 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ [wx] Mac plugins support.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32236
+
+ * platform/FileSystem.h:
+ * platform/cf/BinaryPropertyList.h:
+ * platform/network/curl/ResourceHandleManager.cpp:
+ * platform/wx/FileSystemWx.cpp:
+ (WebCore::fileExists):
+ (WebCore::unloadModule):
+ (WebCore::wxDirTraverserNonRecursive::wxDirTraverserNonRecursive):
+ (WebCore::wxDirTraverserNonRecursive::OnFile):
+ (WebCore::wxDirTraverserNonRecursive::OnDir):
+ (WebCore::listDirectory):
+ * plugins/mac/PluginViewMac.cpp:
+ (WebCore::nativeWindowFor):
+ (WebCore::cgHandleFor):
+ (WebCore::topLevelOffsetFor):
+ (WebCore::PluginView::platformStart):
+ (WebCore::PluginView::setFocus):
+ (WebCore::PluginView::invalidateRect):
+ (WebCore::PluginView::handleKeyboardEvent):
+ (WebCore::PluginView::globalMousePosForPlugin):
+ * plugins/wx/PluginDataWx.cpp: Added.
+ (WebCore::PluginData::initPlugins):
+ (WebCore::PluginData::refresh):
+ * wscript:
+
+2009-12-08 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Navigating to a cached page can result in accessing a destroyed HTMLInputElement.
+ <rdar://problem/6856662> and https://webkit.org/b/32293
+
+ Test: fast/loader/input-element-page-cache-crash.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::parseMappedAttribute): Make sure to unregister for the activation
+ callback after the new m_autocomplete setting has been stored so the unregistration actually
+ takes place.
+
+2009-12-08 Dmitry Titov <dimich@chromium.org>
+
+ Rubber-stamped by David Levin.
+
+ Revert and reopen "Add asserts to RefCounted to make sure ref/deref happens on the right thread."
+ It may have caused massive increase of reported leaks on the bots.
+ https://bugs.webkit.org/show_bug.cgi?id=31639
+
+ * ForwardingHeaders/wtf/ThreadVerifier.h: Removed.
+ * loader/icon/IconRecord.cpp:
+ (WebCore::IconRecord::IconRecord):
+ * platform/SharedBuffer.cpp:
+ (WebCore::SharedBuffer::SharedBuffer):
+ * platform/text/StringImpl.cpp:
+ (WebCore::StringImpl::StringImpl):
+
+2009-12-08 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Chromium: support custom WebCore context menu items in Chromium port.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32277
+
+ * platform/ContextMenu.h:
+ * platform/ContextMenuItem.h:
+ (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
+ * platform/chromium/ContextMenuChromium.cpp:
+ (WebCore::ContextMenu::ContextMenu):
+ (WebCore::ContextMenu::itemCount):
+ (WebCore::ContextMenu::insertItem):
+ (WebCore::ContextMenu::appendItem):
+ (WebCore::ContextMenu::itemWithAction):
+ (WebCore::ContextMenu::itemAtIndex):
+ (WebCore::ContextMenu::platformDescription):
+ * platform/chromium/ContextMenuItemChromium.cpp:
+ (WebCore::ContextMenuItem::ContextMenuItem):
+ (WebCore::ContextMenuItem::releasePlatformDescription):
+ (WebCore::ContextMenuItem::type):
+ (WebCore::ContextMenuItem::action):
+ (WebCore::ContextMenuItem::title):
+ (WebCore::ContextMenuItem::checked):
+ (WebCore::ContextMenuItem::enabled):
+ (WebCore::ContextMenuItem::setType):
+ (WebCore::ContextMenuItem::setAction):
+ (WebCore::ContextMenuItem::setTitle):
+ (WebCore::ContextMenuItem::setChecked):
+ (WebCore::ContextMenuItem::setEnabled):
+
+2009-12-08 Adam Langley <agl@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Chromium Linux: set default scrollbar colours.
+
+ This is so that layout tests have sane defaults for the scrollbar
+ colours, even if the API user doesn't set any.
+
+ This is a fix due to r51827.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32287
+
+ This is very well covered by existing layout tests.
+
+ * rendering/RenderThemeChromiumLinux.cpp:
+
+2009-12-08 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix for <rdar://problem/7397808> Crash occurs at
+ RenderObject::containingBlock() as I type in the Google Search
+ field (during page load)
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::insideVisibleArea): ownerRenderer() needs to be
+ null checked.
+
+2009-12-08 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Add asserts to RefCounted to make sure ref/deref happens on the right thread.
+ https://bugs.webkit.org/show_bug.cgi?id=31639
+
+ * loader/icon/IconRecord.cpp:
+ (WebCore::IconRecord::IconRecord): Disable thread verification for this class because of its cross-thread use in IconDatabase.
+ * platform/SharedBuffer.cpp:
+ (WebCore::SharedBuffer::SharedBuffer): Ditto.
+ * platform/text/StringImpl.cpp:
+ (WebCore::StringImpl::StringImpl): Disable thread verification for this class, add FIXME to enforce proper usage via crossThreadString.
+ * ForwardingHeaders/wtf/ThreadVerifier.h: Added.
+
+2009-12-08 John Gregg <johnnyg@google.com>
+
+ Reviewed by Adam Barth.
+
+ Inform the NotificationCenter when its window goes away in the same
+ manner as other DOMWindow fields, and prevent invalid operations on
+ it after that happens.
+
+ As part of this, change the V8 bindings for notifications to call
+ through the NotificationCenter rather than doing those operations
+ itself.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31886
+
+ Test: fast/notifications/notification-after-close.html
+
+ * bindings/v8/custom/V8NotificationCenterCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * notifications/Notification.cpp:
+ (WebCore::Notification::Notification):
+ * notifications/NotificationCenter.cpp:
+ (WebCore::NotificationCenter::checkPermission):
+ (WebCore::NotificationCenter::requestPermission):
+ * notifications/NotificationCenter.h:
+ (WebCore::NotificationCenter::createHTMLNotification):
+ (WebCore::NotificationCenter::createNotification):
+ (WebCore::NotificationCenter::disconnectFrame):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::clear):
+
+2009-12-08 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Fixed block selection gap repainting in table cells
+
+ Test: fast/repaint/block-selection-gap-in-table-cell.html
+
+ This recently-introduced regression exposed the fact that
+ RenderTableCell did not override offsetFromContainer() to adjust for
+ the fact that table cells’ coordinates are relative to the table
+ section, not the table row. With this fixed, RenderTableCell no longer
+ needs to override mapLocalToContainer() and mapAbsoluteToLocalPoint(),
+ since the base class implementations of those use offsetFromContainer().
+
+ * rendering/RenderTableCell.cpp:
+ (WebCore::RenderTableCell::offsetFromContainer):
+ * rendering/RenderTableCell.h:
+
+2009-12-08 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Sane way to force a rebuild on all win slaves, according to Adam Roben.
+
+ * WebCorePrefix.h:
+
+2009-12-08 Dan Bernstein <mitz@apple.com>
+
+ Build fix
+
+ * loader/loader.cpp:
+ (WebCore::cachedResourceTypeToTargetType):
+
+2009-12-08 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Touch svgtags.in to eventually fix the win debug build.
+
+ * svg/svgtags.in:
+
+2009-12-08 Mike Belshe <mike@belshe.com>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32167
+ Update the ResourceRequest::RequestType. This previously
+ was specific to Chromium. Moved into ResourceRequestBase, enabling
+ more specificity about the type (which is otherwise only known to the
+ loader), and also making this information available to all platforms.
+ Any platform with a network layer which can utilize this information
+ may want to use it for prioritization.
+
+ Note to Chromium glue: TargetIsSubResource renamed to TargetIsSubresource.
+
+ * loader/loader.cpp:
+ (WebCore::Loader::Loader):
+ (WebCore::CachedResourceTypeToTargetType):
+ (WebCore::Loader::Host::servePendingRequests):
+ * platform/network/ResourceRequestBase.h:
+ (WebCore::ResourceRequestBase::):
+ (WebCore::ResourceRequestBase::targetType):
+ (WebCore::ResourceRequestBase::setTargetType):
+ (WebCore::ResourceRequestBase::ResourceRequestBase):
+ * platform/network/chromium/ResourceRequest.h:
+ (WebCore::ResourceRequest::ResourceRequest):
+
+2009-12-08 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ [Android] Adds Makefiles for Android port.
+ https://bugs.webkit.org/show_bug.cgi?id=31325
+
+ Build system change only. No tests possible.
+
+ * Android.derived.jscbindings.mk: Added.
+ * Android.derived.mk: Added.
+ * Android.jscbindings.mk: Added.
+ * Android.mk: Added.
+ * WebCorePrefix.h: Modified. Sets up some flags and adds a header required for building on Android.
+
+2009-12-08 Christian Dywan <christian@twotoasts.de>
+
+ Reviewed by Xan Lopez.
+
+ * platform/network/soup/DNSSoup.cpp:
+ (WebCore::prefetchDNS): Conditionalize prefetching on
+ the libSoup version.
+
+2009-12-08 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Rubber-stamped by Maciej Stachowiak.
+
+ Turn on (SVG) Filters for Win.
+ https://bugs.webkit.org/show_bug.cgi?id=32224
+
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+ * WebCore.vcproj/build-generated-files.sh:
+ * bindings/scripts/CodeGeneratorCOM.pm: Touch file to assure a world rebuild. Hopefully.
+
+2009-12-08 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ CSS Counter Nesting still does not work according to the spec.
+ https://bugs.webkit.org/show_bug.cgi?id=31723
+
+ Test: fast/css/counters/nesting.html
+
+ * rendering/RenderCounter.cpp:
+ (WebCore::findPlaceForCounter):
+ Replaced the faulty counter insertion algorithm with one that works.
+
+2009-12-08 John Sullivan <sullivan@apple.com>
+
+ Add isAutofilled getter to match existing setter.
+
+ Reviewed by Ada Chan.
+
+ * bindings/objc/DOMHTML.mm:
+ (-[DOMHTMLInputElement _isAutofilled]):
+ Implemented new cover function.
+
+ * bindings/objc/DOMPrivate.h:
+ Declared new cover function.
+
+2009-12-08 Dominik Röttsches <dominik.roettsches@access-company.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [Gtk] Create a TextBreakIterator implementation based on GLib (without ICU)
+ https://bugs.webkit.org/show_bug.cgi?id=31469
+
+ Added a TextBreakIterator implementation based on GLib and pango,
+ which allows compiling WebCore without ICU.
+
+ * GNUmakefile.am:
+ * platform/text/gtk/TextBreakIteratorGtk.cpp: Added.
+ (WebCore::):
+ (WebCore::setUpIterator):
+ (WebCore::characterBreakIterator):
+ (WebCore::cursorMovementIterator):
+ (WebCore::wordBreakIterator):
+ (WebCore::lineBreakIterator):
+ (WebCore::sentenceBreakIterator):
+ (WebCore::textBreakFirst):
+ (WebCore::textBreakLast):
+ (WebCore::textBreakNext):
+ (WebCore::textBreakPrevious):
+ (WebCore::textBreakPreceding):
+ (WebCore::textBreakFollowing):
+ (WebCore::textBreakCurrent):
+ (WebCore::isTextBreak):
+
+2009-12-08 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Change the way cookies are retrieved in the WebInspector frontend.
+
+ Moved the cookie filtering from the native code into the frontend so that
+ all cookies can be retrieved regardless of the associated domain
+ (required for certain audits to run.)
+ https://bugs.webkit.org/show_bug.cgi?id=32160
+
+ Test: inspector/cookie-resource-match.html
+
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::getCookies):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::getCookies):
+ * inspector/InspectorController.h:
+ * inspector/front-end/CookieItemsView.js:
+ (WebInspector.CookieItemsView.prototype.update.callback):
+ (WebInspector.CookieItemsView.prototype.update):
+ (WebInspector.CookieItemsView.prototype._cookiesForDomain):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.Cookies.getCookiesAsync):
+ (WebInspector.Cookies.cookieMatchesResourceURL):
+ (WebInspector.Cookies.cookieDomainMatchesResourceDomain):
+ * inspector/front-end/Resource.js:
+ (WebInspector.Resource):
+ (WebInspector.Resource.prototype.get documentURL):
+ (WebInspector.Resource.prototype.set documentURL):
+ * inspector/front-end/inspector.js:
+ (WebInspector.addResource):
+
+2009-12-08 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Touch svgtags.in, in order to force SVGNames.* regeneration. Praying for gtk bot to be fixed :-)
+
+ * svg/svgtags.in:
+
+2009-12-08 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Trying to force a rebuild on the Gtk slave. If that doesn't work, someone must force a rebuild from scratch.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+
+2009-12-06 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: provide custom context menu in the front-end window.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32200
+
+ * English.lproj/localizedStrings.js:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSInspectorFrontendHostCustom.cpp:
+ (WebCore::JSInspectorFrontendHost::showContextMenu):
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::contextMenuItemSelected):
+ (WebCore::InspectorFrontend::contextMenuCleared):
+ * inspector/InspectorFrontend.h:
+ * inspector/InspectorFrontendHost.cpp:
+ (WebCore::InspectorFrontendHost::InspectorFrontendHost):
+ (WebCore::InspectorFrontendHost::~InspectorFrontendHost):
+ (WebCore::InspectorFrontendHost::showContextMenu):
+ (WebCore::InspectorFrontendHost::contextMenuItemSelected):
+ (WebCore::InspectorFrontendHost::contextMenuCleared):
+ * inspector/InspectorFrontendHost.h:
+ (WebCore::InspectorFrontendHost::MenuSelectionHandler::create):
+ (WebCore::InspectorFrontendHost::MenuSelectionHandler::~MenuSelectionHandler):
+ (WebCore::InspectorFrontendHost::MenuSelectionHandler::disconnect):
+ (WebCore::InspectorFrontendHost::MenuSelectionHandler::contextMenuItemSelected):
+ (WebCore::InspectorFrontendHost::MenuSelectionHandler::contextMenuCleared):
+ (WebCore::InspectorFrontendHost::MenuSelectionHandler::MenuSelectionHandler):
+ * inspector/InspectorFrontendHost.idl:
+ * inspector/front-end/ContextMenu.js: Added.
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+ (WebInspector.documentContextMenu):
+ * page/ContextMenuController.cpp:
+ (WebCore::ContextMenuController::ContextMenuController):
+ (WebCore::ContextMenuController::clearContextMenu):
+ (WebCore::ContextMenuController::handleContextMenuEvent):
+ (WebCore::ContextMenuController::showContextMenu):
+ (WebCore::ContextMenuController::createContextMenu):
+ (WebCore::ContextMenuController::contextMenuItemSelected):
+ * page/ContextMenuController.h:
+ * page/ContextMenuSelectionHandler.h: Added.
+ (WebCore::ContextMenuSelectionHandler::ContextMenuSelectionHandler):
+ (WebCore::ContextMenuSelectionHandler::~ContextMenuSelectionHandler):
+ * platform/ContextMenu.cpp:
+ (WebCore::ContextMenu::checkOrEnableIfNeeded):
+ * platform/ContextMenuItem.h:
+
+2009-12-08 Andras Becsi <abecsi@inf.u-szeged.hu>
+
+ Rubber-stamped by Kenneth Rohde Christiansen.
+
+ [Qt] Build fix of duplicated platform/graphics/filters/FEGaussianBlur.cpp in WebCore.pro after enabled svg filters.
+
+ No new tests needed.
+ * WebCore.pro:
+
+2009-12-07 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Add a function to show render tree for debugging
+ https://bugs.webkit.org/show_bug.cgi?id=31288
+
+ No new tests because this just adds a function for debugging.
+
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::showRenderObject):
+ (WebCore::RenderObject::showRenderTreeAndMark):
+ (showRenderTree):
+ * rendering/RenderObject.h:
+
+2009-12-07 Victor Wang <victorw@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Implement NamedPropertyEnumerator and IndexedPropertyEnumerator for
+ V8 NPObject. This should make the object enumerable and fix the
+ enumeration issue in layout test plugins/netscape-enumerate.html.
+
+ Also fix some existing style issues per webkit style guidelines.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32254
+
+ Test: plugins/netscape-enumerate.html
+
+ * bindings/v8/V8NPObject.cpp:
+ (npObjectInvokeImpl):
+ (npObjectInvokeDefaultHandler):
+ (npObjectGetProperty):
+ (npObjectPropertyEnumerator):
+ (npObjectNamedPropertyEnumerator):
+ (npObjectIndexedPropertyEnumerator):
+ (createV8ObjectForNPObject):
+
+2009-12-07 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Fragments now make WebSocket URL parsing fail.
+ https://bugs.webkit.org/show_bug.cgi?id=32144
+
+ * websockets/WebSocket.cpp:
+ (WebCore::WebSocket::connect):
+
+2009-12-07 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix wrong length parsing in WebSocket.
+ https://bugs.webkit.org/show_bug.cgi?id=32203
+
+ * websockets/WebSocketChannel.cpp:
+ (WebCore::WebSocketChannel::didReceiveData):
+
+2009-12-07 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Rubber-stamped by Maciej Stachowiak.
+
+ Turn on (SVG) Filters for Qt.
+ https://bugs.webkit.org/show_bug.cgi?id=32224
+
+ * WebCore.pro:
+
+2009-12-07 Evan Martin <evan@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Chromium: theme scrollbars to match GTK theme.
+ Add functions to RenderThemeChromiumLinux to change the scrollbar
+ color.
+
+ Since the change is to the Chromium WebKit API layer, testing will
+ be in Chromium's test shell.
+ http://bugs.webkit.org/show_bug.cgi?id=32048
+
+ Patch from Markus Gutschke <markus@chromium.org>.
+
+ * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
+ (WebCore::saturateAndBrighten):
+ (WebCore::outlineColor):
+ (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
+ (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
+ * rendering/RenderThemeChromiumLinux.cpp:
+ (WebCore::RenderThemeChromiumLinux::setScrollbarColors):
+ * rendering/RenderThemeChromiumLinux.h:
+ (WebCore::RenderThemeChromiumLinux::thumbInactiveColor):
+ (WebCore::RenderThemeChromiumLinux::thumbActiveColor):
+ (WebCore::RenderThemeChromiumLinux::trackColor):
+
+2009-12-08 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Doesn't respect Content-Disposition for downloads, and provides no way for apps to do that
+ https://bugs.webkit.org/show_bug.cgi?id=32247
+
+ Allow creating a ResourceResponse from a SoupMessage.
+
+ Covered by API test.
+
+ * platform/network/soup/ResourceResponse.h:
+ (WebCore::ResourceResponse::ResourceResponse):
+ * platform/network/soup/ResourceResponseSoup.cpp:
+ (WebCore::ResourceResponse::updateFromSoupMessage):
+
+2009-12-07 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Reverting problematic patch, causing errors.
+
+ Revert r51789 (Avoid zero division during SVGPaintServerPattern::setup()). Crashes on all Windows slaves.
+ Reopen bug https://bugs.webkit.org/show_bug.cgi?id=29912.
+
+ * svg/graphics/SVGPaintServerPattern.cpp:
+ (WebCore::SVGPaintServerPattern::setup):
+
+2009-12-07 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Add support for HTMLInputElement::stepUp() and stepDown() for
+ type=number and type=range.
+ https://bugs.webkit.org/show_bug.cgi?id=27451
+
+ Our implementation of stepUp() and stepDown() rounds the resultant
+ value to conform to the step value.
+ Change the number-string conversion method for RenderSlider to be
+ consistent with type=number.
+
+ Tests: fast/forms/input-step-number.html
+ fast/forms/input-step-range.html
+ fast/forms/input-step-unsupported.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::rangeUnderflow): Unify the code for NUMBER and RANGE.
+ (WebCore::HTMLInputElement::rangeOverflow): Unify the code for NUMBER and RANGE.
+ (WebCore::HTMLInputElement::minimum): Renamed from rangeMinimum(), and support for NUMBER.
+ (WebCore::HTMLInputElement::maximum): Renamed from rangeMaximum(), and support for NUMBER.
+ (WebCore::HTMLInputElement::stepBase):
+ (WebCore::HTMLInputElement::stepMismatch): Use stepBase().
+ (WebCore::HTMLInputElement::applyStepForNumberOrRange):
+ (WebCore::HTMLInputElement::stepUp):
+ (WebCore::HTMLInputElement::stepDown):
+ (WebCore::HTMLInputElement::formStringFromDouble):
+ * html/HTMLInputElement.h:
+ (WebCore::HTMLInputElement::stepUp):
+ (WebCore::HTMLInputElement::stepDown):
+ * html/HTMLInputElement.idl: Add stepUp() and stepDown().
+ * rendering/RenderSlider.cpp:
+ (WebCore::SliderRange::SliderRange): Sync with rangeMinimum()/rangeMaximum() renaming.
+ (WebCore::RenderSlider::updateFromElement): Use formStringFromDouble().
+ (WebCore::RenderSlider::setValueForPosition): Use formStringFromDouble().
+
+2009-12-07 Albert J. Wong <ajwong@chromium.org>
+
+ Not reviewed: Chromium build fix try 2 (dumb error).
+
+ * bindings/v8/ScriptValue.h:
+ (WebCore::ScriptValue::getString):
+
+2009-12-07 Albert J. Wong <ajwong@chromium.org>
+
+ Not reviewed: Chromium build fix.
+
+ Fix Chromium build break caused by an added dependency from
+ ScriptControllerBase to JSDOMWindowShell, and an API change in
+ ScriptValue.
+
+ * bindings/ScriptControllerBase.cpp:
+ (WebCore::ScriptController::executeIfJavaScriptURL):
+ * bindings/v8/ScriptValue.h:
+ (WebCore::ScriptValue::getString):
+
+2009-12-07 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(4.0.4-42a12): Indent does not work for twice modified with background text in gmail.
+ <rdar://problem/7442387>
+ https://bugs.webkit.org/show_bug.cgi?id=32233
+
+ Fixes problem in re-creating the correct hierarchy under the new block.
+ Added extensive testing to cover all the cases.
+
+ Test: editing/execCommand/indent-with-style2.html
+
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
+
+2009-12-07 Dmitry Titov <dimich@chromium.org>
+
+ Rubber-stamped by Darin Adler.
+
+ Remove ENABLE_SHARED_SCRIPT flags
+ https://bugs.webkit.org/show_bug.cgi?id=32245
+ This patch was obtained by "git revert" command and then un-reverting of ChangeLog files.
+
+ * Configurations/FeatureDefines.xcconfig:
+ * GNUmakefile.am:
+ * WebCore.pro:
+
+2009-12-07 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Force JS binding regeneration, eventually fixing the broken tests on the bots.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+
+2009-12-07 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Try to fix mac builds by touching svgtags.in - I only tried from-scratch builds.
+
+ * svg/svgtags.in:
+
+2009-12-07 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32184
+ Handle out-of-memory conditions with JSC Ropes with a JS exception, rather than crashing.
+ Switch from using fastMalloc to tryFastMalloc, pass an ExecState to record the exception on.
+
+ * bindings/ScriptControllerBase.cpp:
+ (WebCore::ScriptController::executeIfJavaScriptURL):
+ * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
+ (WebCore::toHTMLCanvasStyle):
+ (WebCore::JSCanvasRenderingContext2D::setFillColor):
+ (WebCore::JSCanvasRenderingContext2D::setStrokeColor):
+ (WebCore::JSCanvasRenderingContext2D::setShadow):
+ * bindings/js/ScriptCallStack.cpp:
+ (WebCore::ScriptCallStack::ScriptCallStack):
+ (WebCore::ScriptCallStack::initialize):
+ * bindings/js/ScriptValue.cpp:
+ (WebCore::ScriptValue::getString):
+ * bindings/js/ScriptValue.h:
+ * bindings/js/SerializedScriptValue.cpp:
+ (WebCore::SerializingTreeWalker::convertIfTerminal):
+ * bindings/objc/WebScriptObject.mm:
+ (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
+ * page/Console.cpp:
+ (WebCore::Console::addMessage):
+
+2009-12-07 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Holger Hans Peter Freyther.
+
+ Turn on (SVG) Filters support, by default.
+ https://bugs.webkit.org/show_bug.cgi?id=32224
+
+ Only enable filters on mac for now, skipped all affected tests on the other platforms.
+ Will enable them one after another, to minimize breakage.
+
+ * Configurations/FeatureDefines.xcconfig: Enable FILTERS build flag.
+
+2009-12-07 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix a bug that KURL rejects a host name which has an IPv4 address
+ inside an IPv6 form like [::127.0.0.1].
+ https://bugs.webkit.org/show_bug.cgi?id=29913
+
+ * platform/KURL.cpp:
+ (WebCore::characterClassTable): Add IPv6Char to '.'.
+
+2009-12-07 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/7443417> - Closing a window opened with "New windows open with: Same Page" results in crash in ::~HistoryItem
+
+ The HistoryItem copy constructor has one very specific use case - to support the feature of a WebView copying another WebView's
+ BackForwardList. That constructor wasn't initializing its m_document pointer, leading to this crash in the destructor.
+
+ * history/HistoryItem.cpp:
+ (WebCore::HistoryItem::~HistoryItem): Change the setDocument(0) to an ASSERT that the document is already 0. A HistoryItem cannot
+ outlive its Document and Documents will always clear the back-pointer in their ::detach() method.
+ (WebCore::HistoryItem::HistoryItem): Missed the m_document initializer in the copy constructor. Also remove an invalid assertion
+ about the original items m_cachedPage object (which is irrelevant to the copy).
+
+2009-12-07 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Remove partial SharedScript implementation.
+ https://bugs.webkit.org/show_bug.cgi?id=32237
+ The patch was obtained by running "git revert" command and then un-reverting WebCore/ChangeLog.
+
+ * DerivedSources.make:
+ * SharedScript/SharedScriptContext.cpp: Removed.
+ * SharedScript/SharedScriptContext.h: Removed.
+ * SharedScript/SharedScriptContext.idl: Removed.
+ * SharedScript/SharedScriptController.h: Removed.
+ * SharedScript/WebKitSharedScript.cpp: Removed.
+ * SharedScript/WebKitSharedScript.h: Removed.
+ * SharedScript/WebKitSharedScript.idl: Removed.
+ * SharedScript/WebKitSharedScriptRepository.cpp: Removed.
+ * SharedScript/WebKitSharedScriptRepository.h: Removed.
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * dom/Document.cpp:
+ (WebCore::Document::detach):
+ * dom/EventTarget.cpp:
+ * dom/EventTarget.h:
+ * dom/ScriptExecutionContext.h:
+
+2009-12-07 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32226
+ Random crashes in WebSocket tests on Leopard Debug builbot
+
+ * platform/network/SocketStreamHandleBase.cpp: (WebCore::SocketStreamHandleBase::close):
+ Make sure the object still exists when setting m_state.
+
+2009-12-07 Shiki Okasaka <shiki@google.com>
+
+ Reviewed by Dirk Schulze.
+
+ Avoid zero division during SVGPaintServerPattern::setup()
+ https://bugs.webkit.org/show_bug.cgi?id=29912
+
+ Fix zero division bugs in SVGPaintServerPattern::setup() that occurred
+ if the tile of a pattern was bigger than the pattern and the pattern
+ size was < 0.5, and if the attribute overflow was set to visible.
+
+ Test: svg/custom/small-pattern.html
+
+ * svg/graphics/SVGPaintServerPattern.cpp:
+ (WebCore::SVGPaintServerPattern::setup):
+
+2009-12-07 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [v8] WebCore::WebGLArrayBufferInternal::byteLengthAttrGetter NULL pointer
+ https://bugs.webkit.org/show_bug.cgi?id=31889
+
+ Fixed bug in handling of zero-argument constructor call.
+
+ Test: fast/canvas/webgl/bug-31889.html
+
+ * bindings/v8/custom/V8WebGLArrayBufferCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-12-07 Gyuyoung Kim <gyuyoung@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32024
+ [GTK] WebKit does not compile without JAVASCRIPT_DEBUGGER
+
+ Fix build errors when javascript-debugger is disabled on GTK
+
+ * GNUmakefile.am:
+
+2009-12-07 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fixed <rdar://problem/7437820> Weird selection artifacts
+
+ Tests: fast/repaint/block-selection-gap-stale-cache-2.html
+ fast/repaint/block-selection-gap-stale-cache.html
+
+ Instead of caching the block selection gaps’ bounds in the RenderView at setSelection()
+ time, cache them in each RenderLayer at paint time. This prevents the cache from getting
+ stale due to layout changes and overflow scrolling.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::selectionGapRectsForRepaint): Account for overflow scroll.
+ (WebCore::RenderBlock::paintSelection): Update the enclosing layer’s selection gaps bounds.
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::addBlockSelectionGapsBounds): Added. Updates the selection gaps
+ bounds to include the given rect.
+ (WebCore::RenderLayer::clearBlockSelectionGapsBounds): Added. Recursively clears the cached
+ selection gaps bounds.
+ (WebCore::RenderLayer::repaintBlockSelectionGaps): Added. Recursively invalidates the
+ selection gaps bounds.
+ * rendering/RenderLayer.h:
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::setSelection): Clear the layer-level selection gaps bounds instead
+ of the view-level cache.
+ (WebCore::RenderView::clearSelection): Changed to call repaintBlockSelectionGaps().
+ * rendering/RenderView.h:
+
+2009-12-07 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Fixed whitelist comment and removed useless (tags, sdp) mimetypes
+ from it. Also, GStreamer doesn't handle directly SMIL.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mimeTypeCache):
+
+2009-12-07 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25415
+ [GTK][ATK] Please implement support for get_text_at_offset
+
+ Eliminate the segfaults which occur when accessing the text interface now
+ implemented by text controls.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (getPangoLayoutForAtk):
+
+2009-12-07 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Xan Lopez.
+
+ Turn the MediaPlayer supported types blacklist into a whitelist
+
+ [GTK] REGRESSION: webkit thinks it can render PDFs
+ https://bugs.webkit.org/show_bug.cgi?id=32183
+
+ Covered by API test.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mimeTypeCache):
+
+2009-12-07 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25524
+ [Gtk] Expose the title attribute to assistive technologies
+
+ Expose 'alt' attribute from images as accessible name.
+ Expose the 'title' core HTML attribute as accessible description.
+ This is a modified version of the original fix submitted by Mario Sanchez Prada,
+ adjusted so that it doesn't impact other platforms.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (webkit_accessible_get_name):
+ (webkit_accessible_get_description):
+
+2009-12-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix support for generic font families
+
+ By not propagating the resolved font family in FontCacheQt and
+ only concidering the font description we ended up passing the
+ generic font families to Qt directly. Since most systems don't
+ have a mapping for these font families we ended up using the
+ default font in most cases.
+
+ * platform/graphics/qt/FontCacheQt.cpp:
+ * platform/graphics/qt/FontPlatformData.h:
+ * platform/graphics/qt/FontPlatformDataQt.cpp:
+
+2009-12-06 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Object.getOwnPropertyDescriptor() allows cross-frame access
+ https://bugs.webkit.org/show_bug.cgi?id=32119
+
+ Make all implementations of getOwnPropertyDescriptor that have
+ cross domain restrictions simply fail immediately on cross domain
+ access, rather than trying to mimic the behaviour of normal
+ property access.
+
+ Test: http/tests/security/cross-frame-access-getOwnPropertyDescriptor.html
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
+ * bindings/js/JSHistoryCustom.cpp:
+ (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
+ * bindings/js/JSLocationCustom.cpp:
+ (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
+ * bindings/scripts/CodeGeneratorJS.pm:
+
+2009-12-07 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ Moves JSC-specific functions from jni_utility and moves them to new jsc/jni_utility_private files.
+ https://bugs.webkit.org/show_bug.cgi?id=32157
+
+ Build fix only, no new tests.
+
+ * WebCore.xcodeproj/project.pbxproj: Modified. Add jni_utility_private.[cpp|h].
+ * bridge/jni/jni_instance.cpp: Modified. Include jni_utility_private.h for JSC.
+ * bridge/jni/jni_jsobject.mm: Modified. Include jni_utility_private.h for JSC.
+ * bridge/jni/jni_objc.mm: Modified. Include jni_utility_private.h for JSC.
+ * bridge/jni/jni_runtime.cpp: Modified. Include jni_utility_private.h for JSC.
+ * bridge/jni/jni_utility.cpp: Modified. Removed convertValueToJValue and convertArrayInstanceToJavaArray.
+ * bridge/jni/jni_utility.h: Modified. Removed convertValueToJValue and dispatchJNICall.
+ * bridge/jni/jsc: Added.
+ * bridge/jni/jsc/jni_utility_private.cpp: Added.
+ (JSC::Bindings::convertArrayInstanceToJavaArray):
+ (JSC::Bindings::convertValueToJValue):
+ * bridge/jni/jsc/jni_utility_private.h: Added. Header for convertValueToJValue and dispatchJNICall.
+ * platform/android/TemporaryLinkStubs.cpp: Modified. Include jni_utility_private.h for JSC.
+
+2009-12-06 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ texImage2D pixel junk for transparency
+ https://bugs.webkit.org/show_bug.cgi?id=32188
+
+ Use kCGBlendModeCopy when drawing an image to the intermediate context
+ used to create a GL texture.
+
+ No test as we don't currently have any mechanism to retrieve pixel data
+ from the webgl context.
+
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::imageToTexture):
+
+2009-12-03 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Advertize audio/ogg correctly and refactored mime-type cache
+ building.
+
+ [GTK] Recognize oga as audio/ogg
+ https://bugs.webkit.org/show_bug.cgi?id=31990
+
+ Test: media/media-can-play-ogg.html
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mimeTypeCache):
+
+2009-12-05 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32175
+ REGRESSION: websocket/tests/url-parsing.html is crashing on Leopard Bot
+
+ * platform/network/cf/SocketStreamHandleCFNet.cpp:
+ (WebCore::SocketStreamHandle::readStreamCallback): Call platformClose() to unschedule both
+ streams, guaranteeing that there will be no callbacks after SocketStreamHandle is destroyed.
+ (WebCore::SocketStreamHandle::writeStreamCallback): Edited a comment a bit.
+
+2009-12-05 Adam Langley <agl@google.com>
+
+ Reviewed by Adam Barth.
+
+ Check that a CSS format() argument is of a valid type.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31815
+ http://code.google.com/p/chromium/issues/detail?id=28582
+
+ Test: fast/css/url-format-non-string.html
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseFontFaceSrc):
+
+2009-12-04 Adam Langley <agl@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Chromium: make rounded borders heavier.
+
+ Skia draws its rounded corners differently from the other ports.
+ Whereas they have anti-aliased clipping regions, Skia only has 1-bit
+ regions. (Which is technically more correct, but somewhat unhelpful
+ for us.) Instead, with Skia we use a layer and collect all the
+ clipping paths in effect. When the state is popped, we paint
+ transparency outside the clipping paths and merge the layer down.
+
+ This appears to cause rounded borders to look a little thin, which is
+ addressed in this patch.
+
+ This is well covered by existing tests but will require new baselines
+ in the Chromium tree.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31778
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::addInnerRoundedRectClip):
+
+2009-12-04 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7441571> Hardware-backed layers are skipped when printing
+
+ When printing, set the PaintBehaviorFlattenCompositingLayers flag so that compositing layers
+ paint. This also causes 3D transforms to be flattened to 2D.
+
+ Test: printing/compositing-layer-printing.html
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::paintContents):
+
+2009-12-04 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Fix up some issues in my SVGListTraits change from yesterday.
+
+ * svg/SVGListTraits.h:
+ (WebCore::):
+
+2009-12-04 Albert J. Wong <ajwong@chromium.org>
+
+ Not reviewed: chromium build fix.
+
+ Fix Chromium build break caused by moving of isDefaultPortForProtocol() and
+ portAllowed() into KURL.h/KURL.cpp. Cloning code.
+
+ * platform/KURLGoogle.cpp:
+ (WebCore::isDefaultPortForProtocol):
+ (WebCore::portAllowed):
+
+2009-12-04 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Remove suppress highlight when restoring selected node.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32152
+
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.setDocument.selectNode):
+ (WebInspector.ElementsPanel.prototype.setDocument.selectLastSelectedNode):
+ (WebInspector.ElementsPanel.prototype.setDocument):
+
+2009-12-04 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Gradient SVG animation demonstrates tearing at animation extremes
+ https://bugs.webkit.org/show_bug.cgi?id=11929
+
+ The focalPoint of a radial gradient is temporarly substracted by
+ the centralPoint, if the focalPoint is not in the radius of the
+ gradient. This is needed to calculate a new postion of the focalPoint
+ according to the specification. But the new focalPoint needs to be
+ moved by the centralPoint after this calculation, which is not the case
+ at the moment. This patch fixes this issue. It was also introduced a
+ deviation of maximal 0.2% for Cairo to get around the fixed point numbers
+ in Cairo.
+
+ W3C-SVG-1.1/pservers-grad-13-b needed an update. The missing adjustment
+ of the new focalPoint caused wrong results for the last three tests.
+
+ Test: svg/custom/radial-gradient-with-outstanding-focalPoint.svg
+
+ * svg/SVGRadialGradientElement.cpp:
+ (WebCore::SVGRadialGradientElement::buildGradient):
+
+2009-12-04 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Do not use WebCore::String::String(const UChar*, int length) to convert
+ short v8 strings.
+
+ Plus added string traits.
+ https://bugs.webkit.org/show_bug.cgi?id=31415
+
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::):
+ (WebCore::v8StringToWebCoreString):
+
+2009-12-04 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION: AX: buttons now extremely repetitive
+ https://bugs.webkit.org/show_bug.cgi?id=32164
+
+ Test: platform/mac/accessibility/button-shouldnot-have-axvalue.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::isButton):
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
+
+2009-12-04 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ Check whether the right side of a string append is non-empty
+ https://bugs.webkit.org/show_bug.cgi?id=32151
+
+ Especially beneficial for CachedScript::script() method
+ which usually appends an empty string returned by flush()
+ to its m_script member. m_script is often hundreds of kbytes
+ which is duplated without reason.
+
+ * platform/text/String.cpp:
+ (WebCore::String::append):
+
+2009-12-04 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Mail.app crashes when indenting table pasted from Numbers.app.
+ <rdar://problem/7209507>
+ https://bugs.webkit.org/show_bug.cgi?id=32166
+
+ Test: LayoutTests/editing/execCommand/indent-partial-table.html
+
+ * editing/IndentOutdentCommand.cpp:
+ (WebCore::IndentOutdentCommand::indentRegion): Added test to verify that the end of the paragraph
+ after the selection has not been moved.
+
+2009-12-04 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32085
+ WebSocket should block the same ports that are blocked for resource loading
+
+ Test: websocket/tests/url-parsing.html
+
+ * page/SecurityOrigin.cpp:
+ (WebCore::SecurityOrigin::SecurityOrigin):
+ (WebCore::SecurityOrigin::localURLSchemes):
+ * page/SecurityOrigin.h:
+ Move isDefaultPortForProtocol() to KURL, because that's a better place for it (SecurityOrigin
+ is not even in WebCore/platform directory).
+
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::host):
+ (WebCore::HTMLAnchorElement::setHost):
+ (WebCore::HTMLAnchorElement::setPort):
+ Updated for the new location of isDefaultPortForProtocol().
+
+ * platform/KURL.cpp:
+ (WebCore::KURL::protocolIs): In an assertion, compare to "javascript" case-insensitively,
+ since the function doesn't require lower case input.
+ (WebCore::isDefaultPortForProtocol): Moved from SecurityOrigin.
+ (WebCore::portAllowed): Moved from ResourceHandle.
+ * platform/KURL.h:
+
+ * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::create): Updated for the
+ new location of portAllowed().
+
+ * websockets/WebSocket.cpp: (WebCore::WebSocket::connect): Per the spec, raise a SECURITY_ERR
+ if trying to connect to a blocked port.
+
+2009-12-04 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] WebKit crashes when loading certain SVG images
+ https://bugs.webkit.org/show_bug.cgi?id=29443
+
+ Remove FontFallbackListQt and rely on the common FontFallbackList
+ to handle the fonts. FontCache and FontPlatformData have been
+ updated to work with the common FontFallbackList.
+
+ In the previous implementation, FontPlatformDataCacheKey
+ was a clone of FontPlatformData with the hashing
+ capabilities added in order to use it as a key in the cache's
+ hashmap. FontPlatformData has been modified to handle the hashing
+ function directly so the data are not copied twice in memory.
+
+ FontFallbackList::fontDataAt() from FontFallbackListQt was a copy of
+ code from FontCache::getFontData() and FontFallbackList::fontDataAt().
+ The behavior is similar except currFamily->family().length() was
+ not tested and the fallback fonts selector were not used.
+
+ Existing tests cover the change.
+
+ * WebCore.pro:
+ * platform/graphics/qt/FontCacheQt.cpp:
+ (WebCore::FontCache::platformInit):
+ (WebCore::FontCache::getFontDataForCharacters):
+ (WebCore::FontCache::getSimilarFontPlatformData):
+ (WebCore::FontCache::getLastResortFallbackFont):
+ (WebCore::FontCache::getTraitsInFamily):
+ (WebCore::FontCache::createFontPlatformData):
+ * platform/graphics/qt/FontCustomPlatformData.cpp:
+ (WebCore::FontCustomPlatformData::fontPlatformData):
+ * platform/graphics/qt/FontFallbackListQt.cpp:
+ Removed. We now use the implementation from FontFallbackList.cpp
+ * platform/graphics/qt/FontPlatformData.h:
+ Add hashing capabilities to be able to use the data with the FontCache.
+ This was previously done in FontCacheQt.cpp
+ (WebCore::FontPlatformDataPrivate::FontPlatformDataPrivate):
+ (WebCore::FontPlatformData::FontPlatformData):
+ (WebCore::FontPlatformData::isHashTableDeletedValue):
+ (WebCore::FontPlatformData::font):
+ (WebCore::FontPlatformData::size):
+ (WebCore::FontPlatformData::family):
+ (WebCore::FontPlatformData::bold):
+ (WebCore::FontPlatformData::italic):
+ (WebCore::FontPlatformData::smallCaps):
+ (WebCore::FontPlatformData::pixelSize):
+ * platform/graphics/qt/FontPlatformDataQt.cpp:
+ (WebCore::FontPlatformData::FontPlatformData):
+ (WebCore::FontPlatformData::~FontPlatformData):
+ (WebCore::FontPlatformData::operator=):
+ (WebCore::FontPlatformData::operator==):
+ (WebCore::FontPlatformData::hash):
+
+2009-12-04 Adam Treat <atreat@rim.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix wrong assert that was only working through sheer luck.
+ https://bugs.webkit.org/show_bug.cgi?id=32162
+
+ * platform/text/BidiContext.cpp:
+ (WebCore::BidiContext::create):
+
+2009-12-04 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Allow removing 'qrc' as a local security origin scheme
+
+ * page/SecurityOrigin.cpp:
+
+2009-12-04 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Allow custom memory allocation control for WebCore's CollectionCache
+ https://bugs.webkit.org/show_bug.cgi?id=32109
+
+ Inherits the following class from FastAllocBase because it is
+ instantiated by 'new':
+
+ struct name - instantiated at: WebCore/'location'
+
+ struct CollectionCache - dom/Document.cpp:4029
+
+ * html/CollectionCache.h:
+
+2009-12-04 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Adler.
+
+ Fixes a crashing bug in Geolocation when a watch is cleared from some callbacks.
+ https://bugs.webkit.org/show_bug.cgi?id=32111
+
+ In Geolocation::GeoNotifier::timerFired, a JS callback may be invoked if a
+ fatal error was registered on this GeoNotifier or if this request has timed
+ out. If the request is a watch, and is cleared by a call to clearWatch in the
+ callback, the GeoNotifier object will be destroyed. We must therefore cache the
+ m_geolocation member to allow us to call Geolocation::fatalErrorOccurred or
+ Geolocation::requestTimedOut.
+
+ Tests: fast/dom/Geolocation/permission-denied-already-clear-watch.html
+ fast/dom/Geolocation/timeout-clear-watch.html
+
+ * page/Geolocation.cpp: Modified.
+ (WebCore::Geolocation::GeoNotifier::timerFired): Modified. Cache the m_geolocation member before invoking the JS callback.
+
+2009-12-04 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Allow custom memory allocation control for 2 classes of the platform directory in WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=
+
+ Inherits the following class from Noncopyable because it is instantiated
+ by 'new' and no need to be copyable:
+
+ class/struct name - instantiated at: WebCore/'location'
+
+ class SharedTimer - (its child class) workers/WorkerRunLoop.cpp:91
+
+ Inherits the following class from FastAllocBase because it is
+ instantiated by 'new':
+
+ class TransformOperations - rendering/style/RenderStyle.h:1175
+
+ Noncopyable.h's include added to SharedTimer.h.
+
+ * platform/SharedTimer.h:
+ * platform/graphics/transforms/TransformOperations.h:
+
+2009-12-04 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK]Enable DNS prefetching
+ https://bugs.webkit.org/show_bug.cgi?id=23846
+
+ Enable DNS prefetching.
+
+ Based on a patch by José Millán.
+
+ * platform/network/soup/DNSSoup.cpp:
+ (WebCore::prefetchDNS):
+
+2009-12-04 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Allow custom memory allocation control for the svg directory in WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=
+
+ Inherits the following classes from Noncopyable because these are instantiated
+ by 'new' and no need to be copyable:
+
+ class/struct name - instantiated at: WebCore/'location'
+
+ struct ResourceSet - svg/graphics/SVGResource.cpp:148
+ class SVGFontData - css/CSSFontFaceSource.cpp:156
+ class SVGDocumentExtensions - dom/Document.cpp:3962
+ class SVGViewSpec - svg/SVGSVGElement.cpp:191
+
+ * svg/SVGDocumentExtensions.h:
+ * svg/SVGFontData.h:
+ * svg/SVGViewSpec.h:
+ * svg/graphics/SVGResource.cpp:
+
+2009-12-03 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ WAI-ARIA: aria-activedescendant doesn't work as intended
+ https://bugs.webkit.org/show_bug.cgi?id=32100
+
+ Fixes a number of issues regarding the "tree" role and aria-activedescendant.
+ 1. The indexes were being reported incorrectly by treeitems.
+ 2. aria-activedescendant changes were not being sent to the containing item.
+ 3. The tree's selected rows need to consult aria-activedescendant.
+ 4. Since a tree changes what it returns as its children (it returns its rows)
+ the mac-specific array indexing methods need to correctly handle the tree case.
+
+ Tests: platform/mac/accessibility/aria-tree-activedescendant.html
+ platform/mac/accessibility/aria-tree-index-of-items.html
+
+ * accessibility/AXObjectCache.h:
+ (WebCore::AXObjectCache::):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::shouldFocusActiveDescendant):
+ (WebCore::AccessibilityRenderObject::activeDescendant):
+ (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
+ (WebCore::AccessibilityRenderObject::ariaTreeSelectedRows):
+ * accessibility/mac/AXObjectCacheMac.mm:
+ (WebCore::AXObjectCache::postPlatformNotification):
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+ (-[AccessibilityObjectWrapper accessibilityIndexOfChild:]):
+ (-[AccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
+ * accessibility/win/AXObjectCacheWin.cpp:
+ (WebCore::AXObjectCache::postPlatformNotification):
+
+2009-12-03 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Allow custom memory allocation control for the xml directory in WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=
+
+ Inherits the following class from Noncopyable because it is instantiated
+ by 'new' and no need to be copyable:
+
+ class/struct name - instantiated at: WebCore/'location'
+
+ struct XMLHttpRequestStaticData - xml/XMLHttpRequest.cpp:134
+
+ Inherits the following classes from FastAllocBase because these are instantiated by 'new':
+
+ class NodeTest - xml/XPathGrammar.y:258
+ class NodeSet - xml/XPathValue.cpp:52
+ struct EvaluationContext - xml/XPathExpressionNode.cpp:40
+
+ * xml/XMLHttpRequest.cpp:
+ * xml/XPathExpressionNode.h:
+ * xml/XPathNodeSet.h:
+ * xml/XPathStep.h:
+
+2009-12-03 Drew Wilson <atwilson@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ New History changes do not compile for Chromium/V8
+ https://bugs.webkit.org/show_bug.cgi?id=32148
+
+ Existing tests suffice (just trying to get code to compile).
+
+ * WebCore.gypi:
+ Added V8HistoryCustom.cpp and other missing files.
+ * bindings/v8/custom/V8CustomBinding.h:
+ Added custom handlers for History.pushState()/replaceState().
+ * bindings/v8/custom/V8HistoryCustom.cpp: Added.
+ Added custom handlers for History.pushState()/replaceState().
+ * history/BackForwardListChromium.cpp:
+ (WebCore::BackForwardList::pushStateItem):
+ Stubbed out this routine for now - will implement in the future.
+
+2009-12-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ OwnPtr<XBLBindingManager> Document::m_bindingManager;
+ https://bugs.webkit.org/show_bug.cgi?id=32147
+
+ The document actually owns the bindingManager. That's what the code
+ should say.
+
+ * dom/Document.cpp:
+ (WebCore::Document::~Document):
+ * dom/Document.h:
+ (WebCore::Document::bindingManager):
+
+2009-12-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ OwnPtr<Tokenizer> Document::m_tokenizer;
+ https://bugs.webkit.org/show_bug.cgi?id=32145
+
+ The document actually owns the tokenizer. That's what the code should say.
+
+ * dom/Document.cpp:
+ (WebCore::Document::removedLastRef):
+ (WebCore::Document::~Document):
+ (WebCore::Document::cancelParsing):
+ (WebCore::Document::implicitOpen):
+ (WebCore::Document::implicitClose):
+ * dom/Document.h:
+ (WebCore::Document::tokenizer):
+
+2009-12-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ OwnPtr<RenderArena> Document::m_renderArena;
+ https://bugs.webkit.org/show_bug.cgi?id=32146
+
+ The document owns the renderArena. That's what the code should say.
+
+ * dom/Document.cpp:
+ (WebCore::Document::Document): Also, removed a redundant initialization
+ of the tokenizer that I missed in my previous patch.
+ (WebCore::Document::~Document):
+ (WebCore::Document::attach):
+ (WebCore::Document::detach):
+ * dom/Document.h:
+ (WebCore::Document::renderArena):
+
+2009-12-03 Drew Wilson <atwilson@chromium.org>
+
+ Rolling back r51633 because it causes a chromium perf regression.
+
+ * platform/graphics/SimpleFontData.h:
+ * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
+
+2009-12-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ The code should say that Document owns DocLoader
+ https://bugs.webkit.org/show_bug.cgi?id=32143
+
+ It's the truth.
+
+ * dom/Document.cpp:
+ (WebCore::Document::~Document):
+ * dom/Document.h:
+ (WebCore::Document::docLoader):
+
+2009-12-03 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ AX: VO just says "term" on many web sites
+ https://bugs.webkit.org/show_bug.cgi?id=32139
+
+ Test: platform/mac/accessibility/definition-list-term.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::accessibilityDescription):
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper subrole]):
+ (-[AccessibilityObjectWrapper roleDescription]):
+
+2009-12-03 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Implement WAI-ARIA scrollbar role and related property aria-orientation
+ https://bugs.webkit.org/show_bug.cgi?id=32126
+
+ Test: accessibility/aria-scrollbar-role.html
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::createARIARoleMap):
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::isScrollbar):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::valueForRange):
+ (WebCore::AccessibilityRenderObject::orientation):
+ (WebCore::AccessibilityRenderObject::canHaveChildren):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+ * html/HTMLAttributeNames.in:
+
+2009-12-03 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fixed <rdar://problem/7401617> Selection painting issue in hardware-
+ accelerated layers
+ which is another part of https://bugs.webkit.org/show_bug.cgi?id=23628
+ Fix selection painting to do container-relative repaints
+
+ Test: fast/repaint/block-selection-gap-in-composited-layer.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::selectionGapRectsForRepaint): Compute and paint
+ gap rects in the coordinate space of the repaint container.
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect): Added a
+ FIXME.
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::setSelection): Map block selection gap rects from
+ the repaint container’s coordinate space to the view’s coordinate space
+ before adding them to the cached selection bounds.
+ (WebCore::RenderView::clearSelection): Changed to use
+ repaintRectangleInViewAndCompositedLayers() so that the selection rect
+ is invalidated in composited layers as well.
+
+2009-12-03 Jonathan Dixon <joth@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Bug 32066 - Add enable geolocation flag to WebCore::Settings for Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=32066
+
+ Adds geolocationEnabled in Settings for runtime control of geolocaiton features. This defaults to ON
+ as it is intended as a development and testing aid, not a user control. To completely remove geolocation
+ from a given port, the compile time ENABLE_GEOLOCATION should still be used.
+ Adding placeholder GeolocationServiceChromium implementation, as this is required to allows
+ ENABLE_GEOLOCATION to be defined (in turn required for testing), even though this patch does not
+ make that the default just yet.
+
+ * WebCore.gypi:
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings): Add new m_geolocationEnabled flag default value
+ (WebCore::Settings::setGeolocationEnabled): Setter for m_geolocationEnabled flag
+ * page/Settings.h:
+ (WebCore::Settings::geolocationEnabled): Add m_geolocationEnabled flag
+ * platform/chromium/GeolocationServiceChromium.cpp: Added.
+ (WebCore::GeolocationServiceChromium::GeolocationServiceChromium): Place holder GeolocationServiceChromium)
+ (WebCore::createGeolocationService): factory function, only required when ENABLED(GEOLOCATION) is true
+
+2009-12-03 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by John Sullivan.
+
+ SpinTracer: 349 spins in Mail at WebCore::Editor::advanceToNextMisspelling(bool)
+ <rdar://problem/7198592>
+ https://bugs.webkit.org/show_bug.cgi?id=32129
+
+ Fixed the way the next paragraph is calculated.
+ I've added a repro case in Safari and attached it to the Bugzilla bug.
+
+ * editing/Editor.cpp:
+ (WebCore::findFirstMisspellingOrBadGrammarInRange): Changed the way we move to the
+ next paragraph in the loop.
+
+2009-12-03 Oliver Hunt <oliver@apple.com>
+
+ Build fix
+
+ * svg/SVGListTraits.h:
+ (WebCore::):
+
+2009-12-03 Oliver Hunt <oliver@apple.com>
+
+ Build fix
+
+ * svg/SVGListTraits.h:
+ (WebCore::):
+
+2009-12-03 Brady Eidson <beidson@apple.com>
+
+ No wonder editing WebCore.exp repeatedly while I worked on this patch never seemed to stick.
+
+ Long live our auto-generated overlords that I didn't know about...
+
+ * WebCore.base.exp:
+
+2009-12-03 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ REGRESSION (r51627): 3 SVG tests are failing
+ https://bugs.webkit.org/show_bug.cgi?id=32117
+
+ Null checking Items in the SVGList is insufficient as items may
+ be floats, etc so add SVGListTraits::isNull and add appropriate
+ specializations.
+
+ Test: svg/dom/svglist-exception-on-out-bounds-error.html
+
+ * svg/SVGList.h:
+ (WebCore::SVGListTypeOperations::isNull):
+ (WebCore::SVGList::initialize):
+ (WebCore::SVGList::insertItemBefore):
+ (WebCore::SVGList::replaceItem):
+ (WebCore::SVGList::appendItem):
+ * svg/SVGListTraits.h:
+ (WebCore::):
+
+2009-12-03 Brady Eidson <beidson@apple.com>
+
+ No review - release build fix.
+
+ * history/HistoryItem.cpp:
+ (WebCore::HistoryItem::documentDetached):
+
+2009-12-03 Brady Eidson <beidson@apple.com>
+
+ No review - release build fix.
+
+ * loader/HistoryController.cpp:
+ (WebCore::HistoryController::pushState):
+
+2009-12-03 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Multiple Undos removes the last posted comment and/or the ones before it.
+ <rdar://problem/6557066>
+ https://bugs.webkit.org/show_bug.cgi?id=32079
+
+ The fix consists in preventing Undos and Redos to be applied to elements that
+ are no longer editable. We do not attempt to remove the commands from the queue.
+ It is a relatively simple fix that comes with a little extra overhead for the apply
+ and unapply methods where we are now performing the editability check.
+
+ Test: editing/undo/undo-indent-noneditable.html
+
+ * editing/AppendNodeCommand.cpp:
+ (WebCore::AppendNodeCommand::doApply):
+ (WebCore::AppendNodeCommand::doUnapply):
+ * editing/DeleteFromTextNodeCommand.cpp:
+ (WebCore::DeleteFromTextNodeCommand::doApply):
+ (WebCore::DeleteFromTextNodeCommand::doUnapply):
+ * editing/InsertIntoTextNodeCommand.cpp:
+ (WebCore::InsertIntoTextNodeCommand::doApply):
+ (WebCore::InsertIntoTextNodeCommand::doUnapply):
+ * editing/InsertNodeBeforeCommand.cpp:
+ (WebCore::InsertNodeBeforeCommand::doApply):
+ (WebCore::InsertNodeBeforeCommand::doUnapply):
+ * editing/JoinTextNodesCommand.cpp:
+ (WebCore::JoinTextNodesCommand::doApply):
+ (WebCore::JoinTextNodesCommand::doUnapply):
+ * editing/MergeIdenticalElementsCommand.cpp:
+ (WebCore::MergeIdenticalElementsCommand::doApply):
+ (WebCore::MergeIdenticalElementsCommand::doUnapply):
+ * editing/RemoveNodeCommand.cpp:
+ (WebCore::RemoveNodeCommand::doApply):
+ (WebCore::RemoveNodeCommand::doUnapply):
+ * editing/SplitElementCommand.cpp:
+ (WebCore::SplitElementCommand::executeApply):
+ (WebCore::SplitElementCommand::doUnapply):
+ * editing/SplitTextNodeCommand.cpp:
+ (WebCore::SplitTextNodeCommand::doApply):
+ (WebCore::SplitTextNodeCommand::doUnapply):
+ * editing/WrapContentsInDummySpanCommand.cpp:
+ (WebCore::WrapContentsInDummySpanCommand::doUnapply):
+ (WebCore::WrapContentsInDummySpanCommand::doReapply):
+
+2009-12-03 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/7214236> and http://webkit.org/b/32052 - Implement HTML5 state object history API
+
+ Tests: fast/loader/stateobjects/document-destroyed-navigate-back.html
+ fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll.html
+ fast/loader/stateobjects/popstate-after-load-complete-addeventlistener.html
+ fast/loader/stateobjects/popstate-after-load-complete-body-attribute.html
+ fast/loader/stateobjects/popstate-after-load-complete-window-attribute.html
+ fast/loader/stateobjects/pushstate-object-types.html
+ fast/loader/stateobjects/pushstate-then-replacestate.html
+ fast/loader/stateobjects/pushstate-with-fragment-urls-and-hashchange.html
+ fast/loader/stateobjects/replacestate-then-pushstate.html
+ http/tests/loading/state-object-security-exception.html
+
+ Derived sources and project file changes:
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * GNUmakefile.am
+ * WebCore.pro
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+
+ Add the new PopStateEvent:
+ * dom/PopStateEvent.cpp: Added.
+ (WebCore::PopStateEvent::PopStateEvent):
+ (WebCore::PopStateEvent::initPopStateEvent):
+ * dom/PopStateEvent.h: Added.
+ (WebCore::PopStateEvent::create):
+ (WebCore::PopStateEvent::isPopStateEvent):
+ (WebCore::PopStateEvent::state):
+ * dom/PopStateEvent.idl: Added.
+ * bindings/js/JSPopStateEventCustom.cpp: Added.
+ (WebCore::JSPopStateEvent::initPopStateEvent):
+ (WebCore::JSPopStateEvent::state):
+ * bindings/js/JSEventCustom.cpp:
+ (WebCore::toJS):
+ * dom/Event.cpp:
+ (WebCore::Event::isPopStateEvent):
+ * dom/Event.h:
+ * dom/EventNames.h:
+
+ Add the "onpopstate" attribute:
+ * html/HTMLAttributeNames.in:
+ * html/HTMLBodyElement.cpp:
+ (WebCore::HTMLBodyElement::parseMappedAttribute):
+ * html/HTMLBodyElement.idl:
+ * html/HTMLFrameSetElement.cpp:
+ (WebCore::HTMLFrameSetElement::parseMappedAttribute):
+ * html/HTMLFrameSetElement.h:
+ * html/HTMLFrameSetElement.idl:
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl:
+
+ Add pushState and replaceState management to the loader and history machinery:
+ * bindings/js/JSHistoryCustom.cpp:
+ (WebCore::JSHistory::pushState):
+ (WebCore::JSHistory::replaceState):
+ * loader/HistoryController.cpp:
+ (WebCore::HistoryController::updateForSameDocumentNavigation): Augmented from "scrollToAnchor()", combining
+ both the same-document fragment scroll case with the new same-document state object activation case.
+ (WebCore::HistoryController::pushState):
+ (WebCore::HistoryController::replaceState):
+ * loader/HistoryController.h:
+ * history/BackForwardList.cpp:
+ (WebCore::BackForwardList::addItem): Use insertItemAfterCurrent.
+ (WebCore::BackForwardList::insertItemAfterCurrent): Optionally insert the item without clearing the forward
+ list, as pushStateItem might've selectively cleared only certain items, with the bulk of the forward list
+ meant to remain.
+ (WebCore::BackForwardList::pushStateItem): Clear the forward list *only* for the state item's document, then
+ insert the new item.
+ (WebCore::BackForwardList::removeItem):
+ * history/BackForwardList.h:
+ * page/History.cpp:
+ (WebCore::History::urlForState):
+ (WebCore::History::stateObjectAdded):
+ * page/History.h:
+ * page/History.idl:
+
+ Let HistoryItems and Documents associate with each other, as well as letting HistoryItems contain state objects:
+ * history/HistoryItem.cpp:
+ (WebCore::HistoryItem::HistoryItem):
+ (WebCore::HistoryItem::~HistoryItem):
+ (WebCore::HistoryItem::setStateObject):
+ (WebCore::HistoryItem::setDocument):
+ (WebCore::HistoryItem::documentDetached):
+ * history/HistoryItem.h:
+ (WebCore::HistoryItem::stateObject):
+ (WebCore::HistoryItem::document):
+ * dom/Document.cpp:
+ (WebCore::Document::detach): Notify all back/forward history items owned by this Document that it
+ is going away.
+ (WebCore::Document::registerHistoryItem): Manage the list of back/forward history items this document owns.
+ (WebCore::Document::unregisterHistoryItem): Ditto.
+ * dom/Document.h:
+
+ Add the ability for Documents, DocumentLoaders, and FrameLoaderClients to be notified when a Documents
+ URL changes as the result of pushState(), replaceState(), or a popstate navigation:
+ * dom/Document.cpp:
+ (WebCore::Document::implicitClose): If there's a pending state object, dispatch the popstate event.
+ (WebCore::Document::updateURLForPushOrReplaceState):
+ (WebCore::Document::statePopped): If loading is complete, dispatch the popstate event. Otherwise, set
+ the pending state object.
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::replaceRequestURLForSameDocumentNavigation):
+ * loader/DocumentLoader.h:
+ * loader/FrameLoaderClient.h:
+ * loader/EmptyClients.h:
+ (WebCore::EmptyFrameLoaderClient::dispatchDidChangeStateObjectForPageForFrame):
+
+ Change handling of "loading a HistoryItem" to distinguish between new-Document navigations and same-Document
+ navigations, combining the old concept of anchor scrolls with the new concept of state object navigations:
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadInSameDocument):
+ (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
+ (WebCore::FrameLoader::navigateWithinDocument):
+ (WebCore::FrameLoader::navigateToDifferentDocument):
+ (WebCore::FrameLoader::loadItem):
+ * loader/FrameLoader.h:
+ * page/Page.cpp:
+ (WebCore::Page::goToItem): Changed to allow state object activations to pass through without the load stopping.
+
+2009-12-03 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed: chromium build fix.
+ r51621 changed JS bindings only, broke v8's.
+
+ * bindings/v8/ScriptFunctionCall.cpp:
+ (WebCore::ScriptFunctionCall::appendArgument):
+ * bindings/v8/ScriptFunctionCall.h:
+
+2009-12-03 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Attributes and NamedNodeMaps aren't tracked correctly and may be prematurely garbage-collected.
+ https://bugs.webkit.org/show_bug.cgi?id=32094
+
+ Covered by existing test: LayoutTests/fast/dom/Attr/access-after-element-destruction.html
+
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ (WebCore::V8DOMWrapper::convertToV8Object):
+ (WebCore::V8DOMWrapper::convertNamedNodeMapToV8Object):
+ * bindings/v8/V8DOMWrapper.h:
+ * bindings/v8/V8GCController.cpp:
+ (WebCore::ObjectGrouperVisitor::visitDOMWrapper):
+ * bindings/v8/custom/V8CustomBinding.h:
+
+2009-12-03 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Chromium: Add support for settings containing ":"
+
+ https://bugs.webkit.org/show_bug.cgi?id=32118
+
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSection):
+
+2009-12-03 Rafael Antognolli <antognolli@profusion.mobi>, Kenneth Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Fraser.
+
+ repaint events from outside the viewport aren't received
+ https://bugs.webkit.org/show_bug.cgi?id=32081
+
+ When using a tiled backing store for painting, you need to receive
+ event from outside the viewport. Setting the viewport to the size
+ of the contents is not an option if you want to make use of WebCore's
+ infrastructure for drawing scrollbars etc.
+
+ A new property, paintsEntireContents, has been introduced for the
+ above use-case. It is settable, as tiling will be optional for Qt,
+ and for the not yet upstreamed EFL port, there will be two different
+ views, where only one of them are tiled.
+
+ No change in behavior, so no new tests added.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::repaintContentRectangle):
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::ScrollView):
+ (WebCore::ScrollView::setPaintsEntireContents):
+ (WebCore::ScrollView::wheelEvent):
+ * platform/ScrollView.h:
+ (WebCore::ScrollView::paintsEntireContents):
+
+2009-11-23 Jeremy Moskovich <jeremy@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Switch Chrome/Mac to use Core Text APIs rather than ATSUI APIs.
+ https://bugs.webkit.org/show_bug.cgi?id=31802
+
+ No test since this is already covered by existing pixel tests.
+
+ * platform/graphics/SimpleFontData.h: Change #ifdef to define getNSFont() on Chrome/Mac .
+ * platform/graphics/mac/ComplexTextControllerCoreText.cpp: Provide forward declarations
+ of Core Text functions that are public on 10.6 but SPI on 10.5.
+
+2009-12-03 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Simplify the settings support in inspector controller.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32076
+
+ Test: inspector/settings-set-get.html
+
+ * WebCore.Inspector.exp:
+ * bindings/js/JSInspectorFrontendHostCustom.cpp:
+ * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
+ * inspector/InspectorClient.h:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::~InspectorController):
+ (WebCore::InspectorController::setting):
+ (WebCore::InspectorController::setSetting):
+ (WebCore::InspectorController::setWindowVisible):
+ (WebCore::InspectorController::attachWindow):
+ (WebCore::InspectorController::setAttachedWindowHeight):
+ (WebCore::InspectorController::storeLastActivePanel):
+ (WebCore::InspectorController::scriptObjectReady):
+ (WebCore::InspectorController::showWindow):
+ (WebCore::InspectorController::enableResourceTracking):
+ (WebCore::InspectorController::disableResourceTracking):
+ (WebCore::InspectorController::ensureResourceTrackingSettingsLoaded):
+ (WebCore::InspectorController::enableProfiler):
+ (WebCore::InspectorController::disableProfiler):
+ (WebCore::InspectorController::enableDebuggerFromFrontend):
+ (WebCore::InspectorController::disableDebugger):
+ * inspector/InspectorController.h:
+ * inspector/InspectorFrontendHost.cpp:
+ (WebCore::InspectorFrontendHost::setting):
+ (WebCore::InspectorFrontendHost::setSetting):
+ * inspector/InspectorFrontendHost.h:
+ * inspector/InspectorFrontendHost.idl:
+ * loader/EmptyClients.h:
+ (WebCore::EmptyInspectorClient::populateSetting):
+ (WebCore::EmptyInspectorClient::storeSetting):
+
+2009-12-03 Ben Murdoch <benm@google.com>
+
+ Reviewed by Brady Eidson.
+
+ [Android] notifyHistoryItemChanged() should pass a pointer to the HistoryItem that changed.
+ https://bugs.webkit.org/show_bug.cgi?id=31915
+
+ No change in functionality so no new tests required.
+
+ * history/HistoryItem.cpp:
+ (WebCore::defaultNotifyHistoryItemChanged): Update this function to pass the HistoryItem that is being changed.
+ (WebCore::HistoryItem::setAlternateTitle): Update call to notifyHistoryItemChanged to include the new parameter.
+ (WebCore::HistoryItem::setURLString): ditto.
+ (WebCore::HistoryItem::setOriginalURLString): ditto.
+ (WebCore::HistoryItem::setReferrer): ditto.
+ (WebCore::HistoryItem::setTitle): ditto.
+ (WebCore::HistoryItem::setTarget): ditto.
+ (WebCore::HistoryItem::setDocumentState): On Android, add a call to notifyHistoryItemChanged. See bug for a discussion of why this is needed.
+ (WebCore::HistoryItem::clearDocumentState): ditto.
+ (WebCore::HistoryItem::setIsTargetItem): ditto.
+ (WebCore::HistoryItem::addChildItem): ditto.
+ (WebCore::HistoryItem::setFormInfoFromRequest): ditto.
+ * history/HistoryItem.h: Update signature of notifyHistoryItemChanged.
+
+2009-12-03 Ben Murdoch <benm@google.com>
+
+ Reviewed by Brady Eidson.
+
+ [Android] The FrameLoaderClient is unaware of BackForwardList changes.
+ https://bugs.webkit.org/show_bug.cgi?id=31914
+
+ This change adds three new methods on the FrameLoaderClient interface to receive notifications when the BackForwardList changes.
+
+ No new tests required. Functionality on all platforms upstream remains the same. Android is the first platform to make use of these callbacks.
+
+ * history/BackForwardList.cpp:
+ (WebCore::BackForwardList::addItem): Execute the callback.
+ (WebCore::BackForwardList::goBack): ditto.
+ (WebCore::BackForwardList::goForward): ditto.
+ (WebCore::BackForwardList::goToItem): ditto.
+ (WebCore::BackForwardList::setCapacity): dito.
+ * loader/EmptyClients.h:
+ (WebCore::EmptyFrameLoaderClient::dispatchDidAddBackForwardItem): Add an empty implementation for the callback that does nothing.
+ (WebCore::EmptyFrameLoaderClient::dispatchDidRemoveBackForwardItem): ditto.
+ (WebCore::EmptyFrameLoaderClient::dispatchDidChangeBackForwardIndex): ditto.
+ * loader/FrameLoaderClient.h:
+
+2009-12-03 Ben Murdoch <benm@google.com>
+
+ Reviewed by Brady Eidson.
+
+ [Android] Upstream WebCore/history/android: Require some platform specific state attached to HistoryItem.
+ https://bugs.webkit.org/show_bug.cgi?id=31913
+
+ Android stores information such as the zoom scale factor and bridge back to the Java counterpart with HistoryItem.
+
+ No new tests required as this is Android specific code.
+
+ * history/HistoryItem.h: Add Android specific member data to HistoryItem.
+ * history/android: Added.
+ * history/android/AndroidWebHistoryBridge.h: Added.
+ * history/android/HistoryItemAndroid.cpp: Added, provides implementation for Android specific member functions in HistoryItem.
+ (WebCore::HistoryItem::bridge): Added.
+ (WebCore::HistoryItem::setBridge): Added.
+
+2009-12-03 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ NULL ptr in SVGPathSegList::getPathSegAtLength()
+ https://bugs.webkit.org/show_bug.cgi?id=30313
+
+ Add exception checks to SVGPathSegList's implementation to catch (and propagate) exceptions.
+ Add null checks to SVGList's content manipulation functions to prevent
+ null values from entering the list in the first place.
+
+ Test: svg/dom/svgpath-out-of-bounds-getPathSeg.html
+
+ * svg/SVGList.h:
+ (WebCore::SVGList::initialize):
+ (WebCore::SVGList::insertItemBefore):
+ (WebCore::SVGList::replaceItem):
+ (WebCore::SVGList::appendItem):
+ * svg/SVGPathElement.cpp:
+ (WebCore::SVGPathElement::getPathSegAtLength):
+ * svg/SVGPathElement.h:
+ * svg/SVGPathElement.idl:
+ * svg/SVGPathSegList.cpp:
+ (WebCore::SVGPathSegList::getPathSegAtLength):
+ (WebCore::SVGPathSegList::toPathData):
+ (WebCore::SVGPathSegList::createAnimated):
+ * svg/SVGPathSegList.h:
+
+2009-12-02 Yusuke Sato <yusukes@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Sanitize web fonts using the OTS library
+ https://bugs.webkit.org/show_bug.cgi?id=31106
+
+ Add support for OpenType sanitizer (OTS). It parses OpenType files (from @font-face)
+ and attempts to validate and sanitize them. We hope this reduces the attack surface
+ of the system font libraries.
+
+ * WebCore.gyp/WebCore.gyp: Added dependency to (chromium_src_dir)/third_party/ots/ library.
+ * WebCore.gypi: Added new files below.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * platform/graphics/chromium/FontCustomPlatformData.cpp: Validate and transcode a web font.
+ (WebCore::createFontCustomPlatformData):
+ * platform/graphics/mac/FontCustomPlatformData.cpp: Ditto.
+ (WebCore::createFontCustomPlatformData):
+ * platform/graphics/opentype/OpenTypeSanitizer.cpp: Added.
+ (WebCore::OpenTypeSanitizer::sanitize):
+ * platform/graphics/opentype/OpenTypeSanitizer.h: Added.
+ (WebCore::OpenTypeSanitizer::OpenTypeSanitizer):
+
+2009-12-02 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Web Inspector frontend heap allocates ScriptFunctionCall which is unsafe
+ https://bugs.webkit.org/show_bug.cgi?id=32098
+
+ Fix is simply to make the ScriptFunctionCall stack allocated as nature intended.
+ Doing this required adding an appendArgument(char*) to ScriptFunctionCall so
+ that an explicit String cast would not be necessary.
+
+ To prevent something like this happening again in future i've added private
+ operator new implementations to ScriptFunctionCall making this type of mistake
+ produce errors when compiling.
+
+ Test case: Inspector tests now pass with GC on every alloc enabled.
+
+ * bindings/js/ScriptFunctionCall.cpp:
+ (WebCore::ScriptFunctionCall::appendArgument):
+ * bindings/js/ScriptFunctionCall.h:
+ (WebCore::ScriptFunctionCall::operator new):
+ (WebCore::ScriptFunctionCall::operator new[]):
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addConsoleMessage):
+ (WebCore::InspectorFrontend::updateConsoleMessageRepeatCount):
+ (WebCore::InspectorFrontend::addResource):
+ (WebCore::InspectorFrontend::updateResource):
+ (WebCore::InspectorFrontend::removeResource):
+ (WebCore::InspectorFrontend::updateFocusedNode):
+ (WebCore::InspectorFrontend::setAttachedWindow):
+ (WebCore::InspectorFrontend::addRecordToTimeline):
+ (WebCore::InspectorFrontend::parsedScriptSource):
+ (WebCore::InspectorFrontend::failedToParseScriptSource):
+ (WebCore::InspectorFrontend::addProfileHeader):
+ (WebCore::InspectorFrontend::setRecordingProfile):
+ (WebCore::InspectorFrontend::didGetProfileHeaders):
+ (WebCore::InspectorFrontend::didGetProfile):
+ (WebCore::InspectorFrontend::pausedScript):
+ (WebCore::InspectorFrontend::setDocument):
+ (WebCore::InspectorFrontend::setDetachedRoot):
+ (WebCore::InspectorFrontend::setChildNodes):
+ (WebCore::InspectorFrontend::childNodeCountUpdated):
+ (WebCore::InspectorFrontend::childNodeInserted):
+ (WebCore::InspectorFrontend::childNodeRemoved):
+ (WebCore::InspectorFrontend::attributesUpdated):
+ (WebCore::InspectorFrontend::didRemoveNode):
+ (WebCore::InspectorFrontend::didGetChildNodes):
+ (WebCore::InspectorFrontend::didApplyDomChange):
+ (WebCore::InspectorFrontend::didGetEventListenersForNode):
+ (WebCore::InspectorFrontend::didGetCookies):
+ (WebCore::InspectorFrontend::didDispatchOnInjectedScript):
+ (WebCore::InspectorFrontend::addDatabase):
+ (WebCore::InspectorFrontend::selectDatabase):
+ (WebCore::InspectorFrontend::didGetDatabaseTableNames):
+ (WebCore::InspectorFrontend::addDOMStorage):
+ (WebCore::InspectorFrontend::selectDOMStorage):
+ (WebCore::InspectorFrontend::didGetDOMStorageEntries):
+ (WebCore::InspectorFrontend::didSetDOMStorageItem):
+ (WebCore::InspectorFrontend::didRemoveDOMStorageItem):
+ (WebCore::InspectorFrontend::updateDOMStorage):
+ (WebCore::InspectorFrontend::addNodesToSearchResult):
+ (WebCore::InspectorFrontend::evaluateForTestInFrontend):
+ * inspector/InspectorFrontend.h:
+
+2009-12-02 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32072, clean up invalid @-rule error handling so that we
+ pass more CSS test suite stuff. Make the grammar stop enforcing the ordering of @namespace vs.
+ @variables vs. @import. Just let the parser handle that instead. This simplifies the grammar and
+ makes error handling deal with more cases correctly.
+
+ Added fast/css/namespaces/namespaces-invalid-at-rules.xml
+
+ * css/CSSGrammar.y:
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::CSSParser):
+ (WebCore::CSSParser::parseRule):
+ (WebCore::CSSParser::createCharsetRule):
+ (WebCore::CSSParser::createImportRule):
+ (WebCore::CSSParser::createMediaRule):
+ (WebCore::CSSParser::createKeyframesRule):
+ (WebCore::CSSParser::createStyleRule):
+ (WebCore::CSSParser::createFontFaceRule):
+ (WebCore::CSSParser::addNamespace):
+ (WebCore::CSSParser::createVariablesRule):
+ * css/CSSParser.h:
+
+2009-12-02 Yusuke Sato <yusukes@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ Safari/Chromium for Windows fails to load CJK WebFonts
+ https://bugs.webkit.org/show_bug.cgi?id=31804
+
+ * platform/graphics/opentype/OpenTypeUtilities.cpp:
+ (WebCore::renameAndActivateFont): Load a remote font even if the font has 2 or more faces.
+
+2009-12-02 Avi Drissman <avi@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Chromium: Need tickmarks in scrollbar
+ https://bugs.webkit.org/show_bug.cgi?id=32069
+
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gypi:
+ * platform/chromium/ScrollbarThemeChromiumMac.h: Added.
+ * platform/chromium/ScrollbarThemeChromiumMac.mm: Added.
+
+2009-11-13 Timothy Hatcher <timothy@apple.com>
+
+ Expose a function to set the value of an input element on behalf of the user.
+ This function will dispatch the change event so the page is notified when autofill
+ happens. Also dispatch a change event when a select element is changed by autofill.
+
+ <rdar://problem/6760590> Would like a way to detect a login form AutoFill from JavaScript
+
+ Reviewed by Darin Adler.
+
+ * WebCore.xcodeproj/project.pbxproj: Added the DOMHTMLInputElementPrivate.h header.
+ * bindings/objc/DOMHTML.mm:
+ (-[DOMHTMLSelectElement _activateItemAtIndex:]): Call setSelectedIndexByUser instead so
+ a change event is fired. This method is called by Safari autofill.
+ * dom/Document.cpp:
+ (WebCore::Document::setFocusedNode): Use dispatchFormControlChangeEvent instead
+ of dispatching the change event directly to be consistent.
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLInputElement::setValueForUser): Added. Calls setValue with the sendChangeEvent
+ (WebCore::HTMLInputElement::setValue): Added the optional sendChangeEvent argument. Mimics setChecked.
+ * html/HTMLInputElement.h:
+ * html/HTMLInputElement.idl: Added setValueForUser for non-JS languages.
+ * html/InputElement.h: Added setValueForUser.
+
+2009-12-02 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: DOM tree selection disappears upon page refresh.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31142
+
+ Test: inspector/elements-panel-selection-on-refresh.html
+
+ * inspector/InjectedScriptHost.cpp:
+ (WebCore::InjectedScriptHost::pushNodeByPathToFrontend):
+ * inspector/InjectedScriptHost.h:
+ * inspector/InjectedScriptHost.idl:
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::close):
+ (WebCore::InspectorController::releaseDOMAgent):
+ (WebCore::InspectorController::resetScriptObjects):
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::~InspectorDOMAgent):
+ (WebCore::InspectorDOMAgent::reset):
+ (WebCore::InspectorDOMAgent::setDocument):
+ (WebCore::InspectorDOMAgent::pushDocumentToFrontend):
+ (WebCore::InspectorDOMAgent::nodeForPath):
+ (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
+ * inspector/InspectorDOMAgent.h:
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMNode.prototype._renumber):
+ (WebInspector.DOMAgent.prototype._setDocument):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.reset):
+ (WebInspector.ElementsPanel.prototype.setDocument.selectDefaultNode):
+ (WebInspector.ElementsPanel.prototype.setDocument.selectLastSelectedNode):
+ (WebInspector.ElementsPanel.prototype.setDocument):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.pushNodeByPathToFrontend):
+ * inspector/front-end/InjectedScriptAccess.js:
+
+2009-12-01 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32045, make sure escape sequences work with
+ all the @-rules we support. When escape sequences are present, the lexical scanner
+ just returns a generic token name: ATKEYWORD. We have to process the escape sequences
+ and then recheck against the rules we support with the final processed name. If we
+ find a match, we mutate the token value to the appropriate rule name token, e.g.,
+ NAMESPACE_SYM.
+
+ Added fast/css/namespaces/namespaces-escapes.xml
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::lex):
+ (WebCore::CSSParser::recheckAtKeyword):
+ (WebCore::CSSParser::text):
+ * css/CSSParser.h:
+
+2009-12-02 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.:w
+
+ Allow to skip thread checks when accessing DOMDataStore for processes
+ which run V8 in single thread mode.
+ https://bugs.webkit.org/show_bug.cgi?id=31877
+
+ Should be covered by buildbots.
+
+ * bindings/v8/V8DOMMap.cpp:
+ (WebCore::getDOMDataStore):
+ (WebCore::enableFasterDOMStoreAccess):
+ (WebCore::getDOMNodeMap):
+ (WebCore::getDOMObjectMap):
+ (WebCore::getActiveDOMObjectMap):
+ (WebCore::getDOMSVGElementInstanceMap):
+ (WebCore::getDOMSVGObjectWithContextMap):
+ * bindings/v8/V8DOMMap.h:
+
+2009-12-02 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Code clean up: remove ScriptObjectQuarantine.* as a whole.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32060
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * bindings/js/JSBindingsAllInOne.cpp:
+ * bindings/js/ScriptObjectQuarantine.cpp: Removed.
+ * bindings/js/ScriptObjectQuarantine.h: Removed.
+ * bindings/js/ScriptValue.cpp:
+ (WebCore::ScriptValue::quarantineValue):
+ * bindings/js/ScriptValue.h:
+ * bindings/v8/ScriptObjectQuarantine.cpp: Removed.
+ * bindings/v8/ScriptObjectQuarantine.h: Removed.
+ * bindings/v8/ScriptValue.h:
+ (WebCore::ScriptValue::quarantineValue):
+ * inspector/ConsoleMessage.cpp:
+ (WebCore::ConsoleMessage::ConsoleMessage):
+ * inspector/InspectorController.cpp:
+ * inspector/InspectorDatabaseResource.cpp:
+ (WebCore::InspectorDatabaseResource::bind):
+ * inspector/InspectorFrontend.cpp:
+
+2009-12-02 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ WebSocket handshake check query component of URL
+ https://bugs.webkit.org/show_bug.cgi?id=31617
+
+ Tests: websocket/tests/url-with-credential.html
+ websocket/tests/url-with-empty-query.html
+ websocket/tests/url-with-fragment.html
+ websocket/tests/url-with-query-for-no-query.html
+ websocket/tests/url-with-query.html
+
+ * platform/KURLGoogle.cpp:
+ (WebCore::KURL::query): returns a null if query is not specified and returns an empty if query is specified but empty.
+ * websockets/WebSocketHandshake.cpp:
+ (WebCore::resourceName): added. add query component to path if specified.
+ (WebCore::WebSocketHandshake::clientLocation):
+ (WebCore::WebSocketHandshake::clientHandshakeMessage):
+
+2009-12-01 David Levin <levin@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Incorrect code in WebGLRenderingContext.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=32046
+
+ Fix incorrect code that happened to work. != has higher precendence than &.
+ The simplest fix is to remove the "!= 0" which violates WebKit style
+ guidelines anyway.
+
+ Also added periods to few comments in the same function.
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::validateIndexArray):
+
+2009-12-01 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Change [Reflect] to [ConvertNullToNullString, Reflect] for min, max,
+ pattern and step attributes of HTMLInputElement.
+ https://bugs.webkit.org/show_bug.cgi?id=31708
+
+ * html/HTMLInputElement.idl:
+
+2009-12-01 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ WAI-ARIA: implement support for ARIA drag and drop
+ https://bugs.webkit.org/show_bug.cgi?id=32007
+
+ Test: platform/mac/accessibility/aria-drag-drop.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::supportsARIADropping):
+ (WebCore::AccessibilityObject::supportsARIADragging):
+ (WebCore::AccessibilityObject::isARIAGrabbed):
+ (WebCore::AccessibilityObject::setARIAGrabbed):
+ (WebCore::AccessibilityObject::determineARIADropEffects):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::supportsARIADropping):
+ (WebCore::AccessibilityRenderObject::supportsARIADragging):
+ (WebCore::AccessibilityRenderObject::isARIAGrabbed):
+ (WebCore::AccessibilityRenderObject::setARIAGrabbed):
+ (WebCore::AccessibilityRenderObject::determineARIADropEffects):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+ (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
+ (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
+ * html/HTMLAttributeNames.in:
+
+2009-12-01 Adam Barth <abarth@webkit.org>
+
+ https://bugs.webkit.org/show_bug.cgi?id=21288
+
+ Unreviewed port of @sandbox to V8.
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::isEnabled):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::createWindow):
+
+2009-12-01 Patrik Persson <patrik.j.persson@ericsson.com>
+
+ Reviewed by Darin Adler.
+
+ Implement HTML5 sandbox attribute for iframes.
+ http://www.w3.org/TR/html5/text-level-semantics.html#attr-iframe-sandbox
+ https://bugs.webkit.org/show_bug.cgi?id=21288
+
+ Tests: fast/frames/sandboxed-iframe-attribute-parsing.html
+ fast/frames/sandboxed-iframe-forms.html
+ fast/frames/sandboxed-iframe-navigation-allowed.html
+ fast/frames/sandboxed-iframe-navigation-parent.html
+ fast/frames/sandboxed-iframe-navigation-targetlink.html
+ fast/frames/sandboxed-iframe-navigation-windowopen.html
+ fast/frames/sandboxed-iframe-plugins.html
+ fast/frames/sandboxed-iframe-scripting.html
+ fast/frames/sandboxed-iframe-storage.html
+ http/tests/security/sandboxed-iframe-document-cookie.html
+ http/tests/security/sandboxed-iframe-modify-self.html
+ http/tests/security/xss-DENIED-sandboxed-iframe.html
+ http/tests/xmlhttprequest/access-control-sandboxed-iframe-allow.html
+ http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-without-wildcard.html
+ http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied.html
+
+ * bindings/js/JSDOMWindowCustom.cpp: sandboxing navigation
+ (WebCore::createWindow):
+ * bindings/js/ScriptController.cpp: sandboxing scripts
+ (WebCore::ScriptController::isEnabled):
+ * dom/Document.cpp:
+ (WebCore::Document::processHttpEquiv):
+ (WebCore::Document::cookie): raise exception when accessed from sandbox
+ (WebCore::Document::setCookie): raise exception when accessed from sandbox
+ (WebCore::Document::initSecurityContext): updae sandbox status
+ (WebCore::Document::updateSandboxFlags):
+ * dom/Document.h:
+ * dom/Document.idl:
+ * html/HTMLAppletElement.cpp: sandboxing applets
+ (WebCore::HTMLAppletElement::createRenderer):
+ (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
+ (WebCore::HTMLAppletElement::canEmbedJava):
+ * html/HTMLAppletElement.h:
+ * html/HTMLAttributeNames.in:
+ * html/HTMLFrameOwnerElement.cpp: management of sandbox flags as stated in attribute
+ (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
+ (WebCore::HTMLFrameOwnerElement::setSandboxFlags):
+ * html/HTMLFrameOwnerElement.h:
+ (WebCore::HTMLFrameOwnerElement::sandboxFlags):
+ * html/HTMLIFrameElement.cpp: sandbox attribute parsing
+ (WebCore::parseSandboxAttribute):
+ (WebCore::HTMLIFrameElement::parseMappedAttribute):
+ * html/HTMLIFrameElement.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::getCookies):
+ * loader/CrossOriginAccessControl.cpp:
+ (WebCore::passesAccessControlCheck):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::FrameLoader):
+ (WebCore::FrameLoader::init):
+ (WebCore::FrameLoader::submitForm): sandboxing forms
+ (WebCore::FrameLoader::requestObject): sandboxing plugins
+ (WebCore::FrameLoader::shouldAllowNavigation): sandboxing navigation
+ (WebCore::FrameLoader::updateSandboxFlags): propagation of sandbox flags
+ * loader/FrameLoader.h:
+ (WebCore::FrameLoader::ownerElementSandboxFlagsChanged):
+ (WebCore::FrameLoader::isSandboxed):
+ (WebCore::FrameLoader::sandboxFlags):
+ * loader/FrameLoaderTypes.h:
+ (WebCore::):
+ * page/DOMWindow.cpp: disable storage and databases in sandboxed frames
+ (WebCore::DOMWindow::sessionStorage):
+ (WebCore::DOMWindow::localStorage):
+ (WebCore::DOMWindow::openDatabase):
+ * page/SecurityOrigin.cpp: added sandboxing status
+ (WebCore::SecurityOrigin::SecurityOrigin):
+ (WebCore::SecurityOrigin::canAccess):
+ (WebCore::SecurityOrigin::canRequest):
+ (WebCore::SecurityOrigin::toString):
+ * page/SecurityOrigin.h:
+ (WebCore::SecurityOrigin::setSandboxFlags):
+ (WebCore::SecurityOrigin::isSandboxed):
+ (WebCore::SecurityOrigin::canAccessDatabase):
+ (WebCore::SecurityOrigin::canAccessStorage):
+ * websockets/WebSocketChannel.cpp:
+ (WebCore::WebSocketChannel::didReceiveData):
+
+2009-12-01 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by David Kilzer.
+
+ ARIA: support a way to create a static text object
+ https://bugs.webkit.org/show_bug.cgi?id=32030
+
+ Test: accessibility/aria-text-role.html
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::createARIARoleMap):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::stringValue):
+ (WebCore::AccessibilityRenderObject::isDescendantOfBarrenParent):
+ (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
+ (WebCore::AccessibilityRenderObject::text):
+ * accessibility/AccessibilityRenderObject.h:
+
+2009-12-01 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Inspector crashes when collecting on every allocation
+ https://bugs.webkit.org/show_bug.cgi?id=32044
+
+ The crash is caused by the prototype wrapper object getting collected
+ when allocating the object that is going to use it as a prototype.
+ Because the only reference to the prototype wrapper is through the
+ new object's Structure it does not get marked automatically.
+
+ * bindings/js/JSInspectedObjectWrapper.cpp:
+ (WebCore::JSInspectedObjectWrapper::wrap):
+ * bindings/js/JSInspectorCallbackWrapper.cpp:
+ (WebCore::JSInspectorCallbackWrapper::wrap):
+
+2009-12-01 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Simon Fraser.
+
+ Add SVG animation test framework with 'snapshot' functionality
+ https://bugs.webkit.org/show_bug.cgi?id=31897
+
+ Add 'sampleSVGAnimationForElementAtTime' method to the LayoutTestController,
+ for the use within the new SVG animation test framework (LayoutTests/svg/animations/)
+
+ layoutTestController.sampleAnimationAtTime(<svg animation id>, <absolute time>, <svg element id>);
+ to sample a svg animateMotion/animateColor/animate/set element at certain times.
+
+ After the desired SVG animation starts and calling the method above, it's immediately forwarded to
+ the desired sampling time. After JS returns from the 'sampleSVGAnimationForElementAtTime' method
+ a callback is fired used to sample the animation value at the target time. It's modelled similar
+ to the CSS animation/transition testing framework, inspired by
+ LayoutTests/animations/animation-test-helpers.js.
+
+ Though it has been extended to integrate within the fast/js/js-test-* framework, that's used for
+ the SVG dynamic-updates tests, to simplify test creation, by utilizing script-tests/* only.
+
+ Adding a simple testcase testing the DRT methods, it will soon be extended to test animVal/baseVal
+ interaction, while animating.
+
+ Test: svg/animations/animVal-basics.html
+
+ * WebCore.base.exp:
+ * WebCore.xcodeproj/project.pbxproj:
+ * svg/SVGDocumentExtensions.cpp:
+ (WebCore::SVGDocumentExtensions::sampleAnimationAtTime):
+ * svg/SVGDocumentExtensions.h:
+ * svg/animation/SMILTimeContainer.cpp:
+ (WebCore::SMILTimeContainer::SMILTimeContainer):
+ (WebCore::SMILTimeContainer::sampleAnimationAtTime):
+ (WebCore::SMILTimeContainer::updateAnimations):
+ * svg/animation/SMILTimeContainer.h:
+
+2009-12-01 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Add convenience methods to Element and QualifiedName that take
+ char* instead of AtomicString, in preparation for removing the
+ implicit conversion between the two types (30187).
+ https://bugs.webkit.org/show_bug.cgi?id=31749
+
+ * dom/Element.cpp:
+ (WebCore::Element::setCStringAttribute): Equivalent to setAttribute.
+ * dom/Element.h:
+ * dom/QualifiedName.cpp:
+ (WebCore::QualifiedName::init): Shared impl of both constructors
+ (WebCore::QualifiedName::QualifiedName): New c'tor taking char*.
+ * dom/QualifiedName.h:
+ * platform/network/HTTPHeaderMap.cpp:
+ (WebCore::CaseFoldingCStringTranslator): Enables lookup by C string
+ (WebCore::HTTPHeaderMap::get): New variant that takes C string
+ (WebCore::HTTPHeaderMap::contains): New variant that takes C string
+ (WebCore::HTTPHeaderMap::add): New variant that takes C string
+ * platform/network/HTTPHeaderMap.h:
+ (WebCore::HTTPHeaderMap::get):
+ (WebCore::HTTPHeaderMap::add):
+ * platform/network/ResourceRequestBase.cpp:
+ (WebCore::ResourceRequestBase::httpHeaderField): New variant that takes C string
+ * platform/network/ResourceRequestBase.h:
+ (WebCore::ResourceRequestBase::setHTTPHeaderField): Use symbolic names for headers
+ * platform/network/ResourceResponseBase.cpp:
+ (WebCore::ResourceResponseBase::httpHeaderField): New variant that takes C string
+ * platform/network/ResourceResponseBase.h:
+
+2009-12-01 Alexey Proskuryakov <ap@apple.com>
+
+ More Windows build fix.
+
+ * platform/network/cf/CredentialStorageCFNet.cpp:
+ (WebCore::CredentialStorage::getFromPersistentStorage):
+
+2009-12-01 Alexey Proskuryakov <ap@apple.com>
+
+ Windows build fix.
+
+ * platform/network/cf/CredentialStorageCFNet.cpp: Include RetainPtr.h.
+
+2009-12-01 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32036
+ Implement CredentialStorage::getFromPersistentStorage for CFNetwork
+
+ * platform/network/cf/CredentialStorageCFNet.cpp:
+ (WebCore::CredentialStorage::getFromPersistentStorage):
+
+2009-12-01 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Pavel Feldman.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32001
+
+ Added missing localized strings (that I left out of the patch for bug #21554):
+ %d × %d pixels
+ %d × %d pixels (Natural: %d × %d pixels)
+
+ Also, changed formatting of these stings to conform with existing ones (added
+ a space on both sides of the multiply sign).
+
+ * English.lproj/localizedStrings.js: Added stings.
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype.createTooltipForImageNode):
+
+2009-12-01 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Fix for bug 32032, empty namespaces should be allowed in @namespace directives in CSS.
+
+ Added fast/css/namespaces/namespaces-empty.xml
+
+ * css/CSSStyleSheet.cpp:
+ (WebCore::CSSStyleSheet::addNamespace):
+ (WebCore::CSSStyleSheet::determineNamespace):
+
+2009-12-01 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Escape key in the Search Field should be more User Friendly
+ https://bugs.webkit.org/show_bug.cgi?id=32005
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded): add mousedown listener on the search field
+ (WebInspector.searchFieldManualFocus): user clicked to focus on the search field
+ (WebInspector.searchKeyDown): handle escape
+
+2009-12-01 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by David Kilzer.
+
+ @namespace directives need to use "maybe_space" in the "maybe_ns_prefix" portion of the grammar to match
+ the spec. Not doing so prevent comments from being used immmediately after the namespace prefix.
+
+ Added fast/css/namespaces-comments.xml
+
+ * css/CSSGrammar.y:
+
+2009-12-01 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Reloading WebInspector from context menu is closing it instead of reloading.
+ https://bugs.webkit.org/show_bug.cgi?id=32004
+
+ When reloading WebInspector, don't delete its m_page.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::close):
+
+2009-12-01 Steve Block <steveblock@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Adds V8 bindings for Geolocation.
+ https://bugs.webkit.org/show_bug.cgi?id=30206
+
+ Also adds Geolocation files to Chrome build files.
+
+ * WebCore.gyp/WebCore.gyp: Modified. Corrects list of Geolocation IDL files.
+ * WebCore.gypi: Modified. Adds Geolocation files.
+ * bindings/v8/DOMObjectsInclude.h: Modified. Adds Geolocation includes.
+ * bindings/v8/DerivedSourcesAllInOne.cpp: Modified. Adds Geolocation files.
+ * bindings/v8/V8Index.cpp: Modified. Includes Geolocation generated headers.
+ * bindings/v8/V8Index.h: Modified. Adds Geolocation types to DOM_OBJECT_TYPES.
+ * bindings/v8/custom/V8CoordinatesCustom.cpp: Added. Handles optional properties.
+ * bindings/v8/custom/V8CustomBinding.h: Modified. Declares callbacks and getters.
+ * bindings/v8/custom/V8CustomPositionCallback.cpp: Added.
+ (WebCore::V8CustomPositionCallback::V8CustomPositionCallback): Added. Constructor.
+ (WebCore::V8CustomPositionCallback::~V8CustomPositionCallback): Added. Destructor.
+ (WebCore::V8CustomPositionCallback::handleEvent): Added. Invokes callback.
+ * bindings/v8/custom/V8CustomPositionCallback.h: Added.
+ (WebCore::V8CustomPositionCallback::create): Added. Factory method.
+ * bindings/v8/custom/V8CustomPositionErrorCallback.cpp: Added.
+ (WebCore::V8CustomPositionErrorCallback::V8CustomPositionErrorCallback): Added. Constructor.
+ (WebCore::V8CustomPositionErrorCallback::~V8CustomPositionErrorCallback): Added. Destructor.
+ (WebCore::V8CustomPositionErrorCallback::handleEvent): Added. Invokes callback.
+ * bindings/v8/custom/V8CustomPositionErrorCallback.h: Added.
+ (WebCore::V8CustomPositionErrorCallback::create): Added. Factory method.
+ * bindings/v8/custom/V8GeolocationCustom.cpp: Added.
+ (WebCore::throwTypeMismatchException): Added. Throws a type mismatch error.
+ (WebCore::createPositionCallback): Added. Handles type checking for successCallback argument.
+ (WebCore::createPositionErrorCallback): Added. Handles type checking for errorCallback argument.
+ (WebCore::createPositionOptions): Added. Handles type checking for positionOptions argument.
+
+2009-12-01 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Provide a way to get ScriptState for the inspected page.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32020
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::mainWorldScriptState):
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/ScriptState.cpp:
+ (WebCore::scriptStateFromPage):
+
+2009-12-01 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Changed mallocs to fastMallocs and frees to fastFrees in GraphicsContext3D. Also added error returns
+ https://bugs.webkit.org/show_bug.cgi?id=30778
+
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::getProgramInfoLog):
+ (WebCore::GraphicsContext3D::getShaderInfoLog):
+ (WebCore::GraphicsContext3D::getShaderSource):
+ (WebCore::imageToTexture):
+
+2009-12-01 Mads Ager <ager@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [V8] Don't crash in DOMWindow event getter in OOM situations
+ https://bugs.webkit.org/show_bug.cgi?id=32017
+
+ Add missing null handle checks in DOMWindow event property
+ accessors. V8Proxy::context(frame) can return a null handle in
+ OOM situations either if failing to initialize a context or if an
+ OOM is handled gracefully and javascript is disabled.
+
+ No new tests because we don't have a good way to test
+ out-of-memory bugs.
+
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+
+2009-12-01 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Updated HTMLCanvasElement to accept "experimental-webgl" as the context name.
+ https://bugs.webkit.org/show_bug.cgi?id=31672
+
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::getContext):
+
+2009-12-01 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
+
+ Not reviewed: chromium build fix, added missing import.
+
+ * inspector/InspectorFrontendHost.cpp:
+
+2009-12-01 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed: fix windows build via unexcluding generated files from
+ project.
+
+ * WebCore.vcproj/WebCore.vcproj:
+
+2009-12-01 Mark Rowe <mrowe@apple.com>
+
+ Stop copying IDL files in to the WebCore framework wrapper.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-12-01 Mark Rowe <mrowe@apple.com>
+
+ Fix the Tiger build by making the Xcode project compatible with Xcode 2.4.
+
+ This was probably broken by hand-editing the project file as Xcode itself
+ knows how to keep project files to a backwards-compatible subset of its format.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-12-01 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed: windows build fix (bad vcproj in r51528).
+
+ * WebCore.vcproj/WebCore.vcproj:
+
+2009-11-27 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Split InspectorBackend into three parts: backend,
+ injected script host and frontend host.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31888
+
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * bindings/js/JSBindingsAllInOne.cpp:
+ * bindings/js/JSInspectorBackendCustom.cpp: Removed.
+ * bindings/js/JSInspectorFrontendHostCustom.cpp: Added.
+ (WebCore::JSInspectorFrontendHost::search):
+ (WebCore::JSInspectorFrontendHost::setting):
+ (WebCore::JSInspectorFrontendHost::setSetting):
+ * bindings/js/ScriptObject.cpp:
+ (WebCore::ScriptGlobalObject::set):
+ * bindings/js/ScriptObject.h:
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/ScriptObject.cpp:
+ (WebCore::ScriptGlobalObject::set):
+ * bindings/v8/ScriptObject.h:
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8InspectorBackendCustom.cpp: Removed.
+ * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ * inspector/InjectedScriptHost.cpp: Added.
+ (WebCore::InjectedScriptHost::InjectedScriptHost):
+ (WebCore::InjectedScriptHost::~InjectedScriptHost):
+ (WebCore::InjectedScriptHost::copyText):
+ (WebCore::InjectedScriptHost::nodeForId):
+ (WebCore::InjectedScriptHost::wrapObject):
+ (WebCore::InjectedScriptHost::unwrapObject):
+ (WebCore::InjectedScriptHost::pushNodePathToFrontend):
+ (WebCore::InjectedScriptHost::addNodesToSearchResult):
+ (WebCore::InjectedScriptHost::currentCallFrame):
+ (WebCore::InjectedScriptHost::databaseForId):
+ (WebCore::InjectedScriptHost::selectDatabase):
+ (WebCore::InjectedScriptHost::selectDOMStorage):
+ (WebCore::InjectedScriptHost::reportDidDispatchOnInjectedScript):
+ (WebCore::InjectedScriptHost::inspectorDOMAgent):
+ (WebCore::InjectedScriptHost::inspectorFrontend):
+ * inspector/InjectedScriptHost.h: Added.
+ (WebCore::InjectedScriptHost::create):
+ (WebCore::InjectedScriptHost::inspectorController):
+ (WebCore::InjectedScriptHost::disconnectController):
+ * inspector/InjectedScriptHost.idl: Added.
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::InspectorBackend):
+ (WebCore::InspectorBackend::storeLastActivePanel):
+ (WebCore::InspectorBackend::toggleNodeSearch):
+ (WebCore::InspectorBackend::resourceTrackingEnabled):
+ (WebCore::InspectorBackend::debuggerEnabled):
+ (WebCore::InspectorBackend::enableDebugger):
+ (WebCore::InspectorBackend::disableDebugger):
+ (WebCore::InspectorBackend::addBreakpoint):
+ (WebCore::InspectorBackend::updateBreakpoint):
+ (WebCore::InspectorBackend::removeBreakpoint):
+ (WebCore::InspectorBackend::pauseInDebugger):
+ (WebCore::InspectorBackend::resumeDebugger):
+ (WebCore::InspectorBackend::stepOverStatementInDebugger):
+ (WebCore::InspectorBackend::stepIntoStatementInDebugger):
+ (WebCore::InspectorBackend::stepOutOfFunctionInDebugger):
+ (WebCore::InspectorBackend::pauseOnExceptions):
+ (WebCore::InspectorBackend::setPauseOnExceptions):
+ (WebCore::InspectorBackend::profilerEnabled):
+ (WebCore::InspectorBackend::enableProfiler):
+ (WebCore::InspectorBackend::disableProfiler):
+ (WebCore::InspectorBackend::startProfiling):
+ (WebCore::InspectorBackend::stopProfiling):
+ (WebCore::InspectorBackend::getProfileHeaders):
+ (WebCore::InspectorBackend::getProfile):
+ (WebCore::InspectorBackend::currentCallFrame):
+ (WebCore::InspectorBackend::highlightDOMNode):
+ (WebCore::InspectorBackend::hideDOMNodeHighlight):
+ (WebCore::InspectorBackend::getCookies):
+ (WebCore::InspectorBackend::deleteCookie):
+ (WebCore::InspectorBackend::didEvaluateForTestInFrontend):
+ (WebCore::InspectorBackend::nodeForId):
+ * inspector/InspectorBackend.h:
+ (WebCore::InspectorBackend::create):
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::InspectorController):
+ (WebCore::InspectorController::~InspectorController):
+ (WebCore::InspectorController::inspectedPageDestroyed):
+ (WebCore::InspectorController::windowScriptObjectAvailable):
+ * inspector/InspectorController.h:
+ (WebCore::InspectorController::inspectorFrontendHost):
+ (WebCore::InspectorController::injectedScriptHost):
+ * inspector/InspectorFrontendHost.cpp: Added.
+ (WebCore::InspectorFrontendHost::InspectorFrontendHost):
+ (WebCore::InspectorFrontendHost::~InspectorFrontendHost):
+ (WebCore::InspectorFrontendHost::loaded):
+ (WebCore::InspectorFrontendHost::attach):
+ (WebCore::InspectorFrontendHost::detach):
+ (WebCore::InspectorFrontendHost::closeWindow):
+ (WebCore::InspectorFrontendHost::windowUnloading):
+ (WebCore::InspectorFrontendHost::setAttachedWindowHeight):
+ (WebCore::InspectorFrontendHost::moveWindowBy):
+ (WebCore::InspectorFrontendHost::localizedStringsURL):
+ (WebCore::InspectorFrontendHost::hiddenPanels):
+ (WebCore::InspectorFrontendHost::platform):
+ (WebCore::InspectorFrontendHost::port):
+ (WebCore::InspectorFrontendHost::addResourceSourceToFrame):
+ (WebCore::InspectorFrontendHost::addSourceToFrame):
+ * inspector/InspectorFrontendHost.h: Added.
+ (WebCore::InspectorFrontendHost::create):
+ (WebCore::InspectorFrontendHost::inspectorController):
+ (WebCore::InspectorFrontendHost::disconnectController):
+ * inspector/InspectorFrontendHost.idl: Added.
+ * inspector/front-end/Breakpoint.js:
+ (WebInspector.Breakpoint.prototype.set condition):
+ * inspector/front-end/BreakpointsSidebarPane.js:
+ (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint):
+ (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint):
+ (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.clearMessages):
+ * inspector/front-end/CookieItemsView.js:
+ (WebInspector.CookieItemsView.prototype._deleteCookieCallback):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMAgent.prototype.getChildNodesAsync):
+ (WebInspector.DOMAgent.prototype.setAttributeAsync):
+ (WebInspector.DOMAgent.prototype.removeAttributeAsync):
+ (WebInspector.DOMAgent.prototype.setTextNodeValueAsync):
+ (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):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
+ (WebInspector.ElementsPanel.prototype.hide):
+ (WebInspector.ElementsPanel.prototype.reset):
+ (WebInspector.ElementsPanel.prototype.handleCopyEvent):
+ (WebInspector.ElementsPanel.prototype._nodeSearchButtonClicked):
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeOutline.prototype.set focusedDOMNode.restoreHighlightToHoveredNode):
+ (WebInspector.ElementsTreeOutline.prototype.set focusedDOMNode):
+ ():
+ * inspector/front-end/EventListenersSidebarPane.js:
+ (WebInspector.EventListenersSidebarPane.prototype):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript._evaluateAndWrap):
+ (InjectedScript.performSearch.addNodesToResults):
+ (InjectedScript.getCallFrames):
+ (InjectedScript._callFrameForId):
+ (InjectedScript._clearConsoleMessages):
+ (InjectedScript._inspectObject):
+ (InjectedScript._copy):
+ (InjectedScript._ensureCommandLineAPIInstalled):
+ (InjectedScript._window):
+ (InjectedScript._nodeForId):
+ (InjectedScript._objectForId):
+ (InjectedScript.pushNodeToFrontend):
+ (InjectedScript.executeSql):
+ (InjectedScript.executeSql.errorCallback):
+ (InjectedScript.executeSql.queryTransaction):
+ * inspector/front-end/InjectedScriptAccess.js:
+ (InjectedScriptAccess._installHandler.InjectedScriptAccess.methodName):
+ (InjectedScriptAccess._installHandler):
+ * inspector/front-end/InspectorBackendStub.js: Added.
+ (.WebInspector.InspectorBackendStub):
+ (.WebInspector.InspectorBackendStub.prototype.wrapCallback):
+ (.WebInspector.InspectorBackendStub.prototype.platform):
+ (.WebInspector.InspectorBackendStub.prototype.port):
+ (.WebInspector.InspectorBackendStub.prototype.closeWindow):
+ (.WebInspector.InspectorBackendStub.prototype.attach):
+ (.WebInspector.InspectorBackendStub.prototype.detach):
+ (.WebInspector.InspectorBackendStub.prototype.storeLastActivePanel):
+ (.WebInspector.InspectorBackendStub.prototype.clearMessages):
+ (.WebInspector.InspectorBackendStub.prototype.searchingForNode):
+ (.WebInspector.InspectorBackendStub.prototype.search):
+ (.WebInspector.InspectorBackendStub.prototype.toggleNodeSearch):
+ (.WebInspector.InspectorBackendStub.prototype.setAttachedWindowHeight):
+ (.WebInspector.InspectorBackendStub.prototype.moveByUnrestricted):
+ (.WebInspector.InspectorBackendStub.prototype.addResourceSourceToFrame):
+ (.WebInspector.InspectorBackendStub.prototype.addSourceToFrame):
+ (.WebInspector.InspectorBackendStub.prototype.getResourceDocumentNode):
+ (.WebInspector.InspectorBackendStub.prototype.highlightDOMNode):
+ (.WebInspector.InspectorBackendStub.prototype.hideDOMNodeHighlight):
+ (.WebInspector.InspectorBackendStub.prototype.inspectedWindow):
+ (.WebInspector.InspectorBackendStub.prototype.loaded):
+ (.WebInspector.InspectorBackendStub.prototype.localizedStringsURL):
+ (.WebInspector.InspectorBackendStub.prototype.windowUnloading):
+ (.WebInspector.InspectorBackendStub.prototype.hiddenPanels):
+ (.WebInspector.InspectorBackendStub.prototype.debuggerEnabled):
+ (.WebInspector.InspectorBackendStub.prototype.enableResourceTracking):
+ (.WebInspector.InspectorBackendStub.prototype.disableResourceTracking):
+ (.WebInspector.InspectorBackendStub.prototype.resourceTrackingEnabled):
+ (.WebInspector.InspectorBackendStub.prototype.enableDebugger):
+ (.WebInspector.InspectorBackendStub.prototype.disableDebugger):
+ (.WebInspector.InspectorBackendStub.prototype.addBreakpoint):
+ (.WebInspector.InspectorBackendStub.prototype.removeBreakpoint):
+ (.WebInspector.InspectorBackendStub.prototype.updateBreakpoint):
+ (.WebInspector.InspectorBackendStub.prototype.pauseInDebugger):
+ (.WebInspector.InspectorBackendStub.prototype.pauseOnExceptions):
+ (.WebInspector.InspectorBackendStub.prototype.setPauseOnExceptions):
+ (.WebInspector.InspectorBackendStub.prototype.resumeDebugger):
+ (.WebInspector.InspectorBackendStub.prototype.profilerEnabled):
+ (.WebInspector.InspectorBackendStub.prototype.enableProfiler):
+ (.WebInspector.InspectorBackendStub.prototype.disableProfiler):
+ (.WebInspector.InspectorBackendStub.prototype.startProfiling):
+ (.WebInspector.InspectorBackendStub.prototype.stopProfiling):
+ (.WebInspector.InspectorBackendStub.prototype.getProfileHeaders):
+ (.WebInspector.InspectorBackendStub.prototype.getProfile):
+ (.WebInspector.InspectorBackendStub.prototype.takeHeapSnapshot):
+ (.WebInspector.InspectorBackendStub.prototype.databaseTableNames):
+ (.WebInspector.InspectorBackendStub.prototype.stepIntoStatementInDebugger):
+ (.WebInspector.InspectorBackendStub.prototype.stepOutOfFunctionInDebugger):
+ (.WebInspector.InspectorBackendStub.prototype.stepOverStatementInDebugger):
+ (.WebInspector.InspectorBackendStub.prototype.setSetting):
+ (.WebInspector.InspectorBackendStub.prototype.dispatchOnInjectedScript):
+ (.WebInspector.InspectorBackendStub.prototype.releaseWrapperObjectGroup):
+ (.WebInspector.InspectorBackendStub.prototype.setting):
+ * inspector/front-end/InspectorControllerStub.js:
+ * inspector/front-end/InspectorFrontendHostStub.js: Added.
+ (.WebInspector.InspectorFrontendHostStub):
+ (.WebInspector.InspectorFrontendHostStub.prototype.platform):
+ (.WebInspector.InspectorFrontendHostStub.prototype.port):
+ (.WebInspector.InspectorFrontendHostStub.prototype.closeWindow):
+ (.WebInspector.InspectorFrontendHostStub.prototype.attach):
+ (.WebInspector.InspectorFrontendHostStub.prototype.detach):
+ (.WebInspector.InspectorFrontendHostStub.prototype.search):
+ (.WebInspector.InspectorFrontendHostStub.prototype.setAttachedWindowHeight):
+ (.WebInspector.InspectorFrontendHostStub.prototype.moveWindowBy):
+ (.WebInspector.InspectorFrontendHostStub.prototype.addResourceSourceToFrame):
+ (.WebInspector.InspectorFrontendHostStub.prototype.addSourceToFrame):
+ (.WebInspector.InspectorFrontendHostStub.prototype.loaded):
+ (.WebInspector.InspectorFrontendHostStub.prototype.localizedStringsURL):
+ (.WebInspector.InspectorFrontendHostStub.prototype.hiddenPanels):
+ (.WebInspector.InspectorFrontendHostStub.prototype.setSetting):
+ (.WebInspector.InspectorFrontendHostStub.prototype.setting):
+ * inspector/front-end/ProfileView.js:
+ (WebInspector.CPUProfileView):
+ (WebInspector.CPUProfileType.prototype.buttonClicked):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype._updateInterface):
+ (WebInspector.ProfilesPanel.prototype._enableProfiling):
+ (WebInspector.ProfilesPanel.prototype._toggleProfiling):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype.reset):
+ (WebInspector.ResourcesPanel.prototype._toggleLargerResources):
+ (WebInspector.ResourcesPanel.prototype._enableResourceTracking):
+ (WebInspector.ResourcesPanel.prototype._toggleResourceTracking):
+ * inspector/front-end/ScriptView.js:
+ (WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.show):
+ (WebInspector.ScriptsPanel.prototype.addScript):
+ (WebInspector.ScriptsPanel.prototype.attachDebuggerWhenShown):
+ (WebInspector.ScriptsPanel.prototype.reset):
+ (WebInspector.ScriptsPanel.prototype.canShowResource):
+ (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
+ (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu):
+ (WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsButton):
+ (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons):
+ (WebInspector.ScriptsPanel.prototype._enableDebugging):
+ (WebInspector.ScriptsPanel.prototype._toggleDebugging):
+ (WebInspector.ScriptsPanel.prototype._togglePauseOnExceptions):
+ (WebInspector.ScriptsPanel.prototype._togglePause):
+ (WebInspector.ScriptsPanel.prototype._stepOverClicked):
+ (WebInspector.ScriptsPanel.prototype._stepIntoClicked):
+ (WebInspector.ScriptsPanel.prototype._stepOutClicked):
+ * inspector/front-end/SourceView.js:
+ (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded):
+ (WebInspector.SourceView.prototype.performSearch.findSearchMatches):
+ (WebInspector.SourceView.prototype.performSearch):
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylesSidebarPane.prototype._changeColorFormat):
+ * inspector/front-end/TestController.js:
+ (WebInspector.TestController.prototype.notifyDone):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSection.prototype.update):
+ (WebInspector.WatchExpressionsSection.prototype.loadSavedExpressions):
+ (WebInspector.WatchExpressionsSection.prototype.saveExpressions):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector.pendingDispatches.0.get platform):
+ (WebInspector.get port):
+ (WebInspector.set currentPanel):
+ (WebInspector._createPanels):
+ (WebInspector._loadPreferences):
+ (WebInspector.set attached):
+ (WebInspector._updateHoverHighlight):
+ (WebInspector.loaded):
+ (windowLoaded):
+ (WebInspector.windowUnload):
+ (WebInspector.close):
+ (WebInspector.toolbarDrag):
+ (WebInspector.UIString):
+
+2009-11-30 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ css2.1/t1205-c566-list-stl-00-e-ag.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=23264
+ css2.1/t1205-c565-list-pos-00-b.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=23263
+
+ Ignore whitespaces after list markers.
+ Rendering of this was already done for the case where inside=false.
+ This fixes the rendering of inside=true case and calcInlinePrefWidths.
+
+ Test: fast/lists/calc-width-with-space.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::calcInlinePrefWidths):
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::findNextLineBreak):
+
+2009-11-30 Fumitoshi Ukai <ukai@chromium.org>
+
+ Unreviewed Chromium build fix introduced by r51212
+
+ Fix scriptStateFromNode and ScriptStateFromPage to take DOMWrapperWorld
+ as the first argument.
+ Move mainThreadNormalWorld() to ScriptState.{h,cpp}.
+ Add debuggerWorld() and pluginWorld() in ScriptState.h.
+
+ * bindings/v8/ScriptController.cpp:
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/ScriptState.cpp:
+ (WebCore::scriptStateFromNode):
+ (WebCore::scriptStateFromPage):
+ (WebCore::mainThreadNormalWorld):
+ * bindings/v8/ScriptState.h:
+ (WebCore::debuggerWorld):
+ (WebCore::pluginWorld):
+
+2009-11-30 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Can focus but not type into content editable block that contains only non-editable content.
+ <rdar://problem/5982901>
+ https://bugs.webkit.org/show_bug.cgi?id=31750
+
+ The goal is to change the way we choose a visible position
+ after hit detection, by preferring a visually equivalent editable
+ position if available. By doing this, it is possible to add content
+ to an editable block that initially contains only non editable elements.
+
+ Test: editing/selection/mixed-editability-10.html
+
+ * WebCore.base.exp: Changed to match the new signature of downstream
+ and upstream in the Position class.
+ * dom/Position.cpp:
+ (WebCore::Position::atEditingBoundary): Added.
+ (WebCore::Position::upstream): Modified to allow to cross the boundary
+ between editable and non editable content if required.
+ (WebCore::Position::downstream): Modified to allow to cross the boundary
+ between editable and non editable content if required.
+ (WebCore::Position::isCandidate): Modified to qualify as candidates positions
+ that are at the editability boundary.
+ (WebCore::Position::getInlineBoxAndOffset): Modified to retrieve the inline box
+ to be used in calculating the caret rectangle.
+ * dom/Position.h:
+ (WebCore::Position::):
+ * dom/PositionIterator.cpp:
+ (WebCore::PositionIterator::atEditingBoundary): Added.
+ (WebCore::PositionIterator::isCandidate): Modified to qualify as candidates positions
+ that are at the editability boundary.
+ * dom/PositionIterator.h:
+ * editing/htmlediting.cpp:
+ (WebCore::firstEditablePositionAfterPositionInRoot): Modified to accept not only
+ descendants of the editable container, but the container itself.
+ (WebCore::lastEditablePositionBeforePositionInRoot): Modified to accept not only
+ descendants of the editable container, but the container itself.
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::createVisiblePosition): Added logic to prefer an editable position,
+ if available.
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::isAllCollapsibleWhitespace): Added.
+ * rendering/RenderText.h:
+
+2009-11-30 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix, add header needed for wx build.
+
+ * css/CSSFontFaceSrcValue.cpp:
+
+2009-11-30 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by David Kilzer.
+
+ <rdar://problem/7424387> WebCore binary missing symbols when built for x86_64 from a machine that cannot run x86_64 binaries
+
+ The check for whether WTF_USE_PLUGIN_HOST_PROCESS is defined occurs under the native architecture of the build machine.
+ If that is 32-bit then WTF_USE_PLUGIN_HOST_PROCESS will not be defined. We work around this by forcing the check to
+ be performed against the x86_64 architecture.
+
+ * DerivedSources.make:
+
+2009-11-30 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=32000 Crash in
+ Safari caused by extreme column-gap and column-width values
+ -and corresponding-
+ <rdar://problem/7425433>
+
+ Prevent desiredColumnCount from being less than 1 since it is used
+ as a divisor.
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::calcColumnWidth):
+
+2009-11-30 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31659
+ Connection must be closed in case of Web Socket handshake error
+
+ The network connection was closed, but the close event wasn't dispatched.
+
+ Tested by websocket/tests/handshake-error.html, which is un-skipped now.
+
+ * platform/network/cf/SocketStreamHandleCFNet.cpp: (WebCore::SocketStreamHandle::platformClose):
+ Call client didHandle() method. This looks strange in CFNetwork implementation, because
+ it's the client that asked to close the stream, so it shouldn't need the callback. It makes
+ more sense in cross-process implementation, because closing is async there.
+
+2009-11-30 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Bug 31859 - Make world selection for JSC IsolatedWorlds automagical.
+
+ WebCore presently has to explicitly specify the world before entering into JSC,
+ which is a little fragile (particularly since property access via a
+ getter/setter might invoke execution). Instead derive the current world from
+ the lexical global object.
+
+ Remove the last uses of mainThreadCurrentWorld(), so the world is always obtained via
+ currentWorld(). Switch this to obtain the world from the ExecsState's lexical global
+ object instead. Remove the call/construct/evaluate 'InWorld' methods, since these
+ are no longer necessary.
+
+ * WebCore.base.exp:
+ * bindings/js/JSCallbackData.cpp:
+ (WebCore::JSCallbackData::invokeCallback):
+ * bindings/js/JSCallbackData.h:
+ (WebCore::JSCallbackData::JSCallbackData):
+ * bindings/js/JSCustomXPathNSResolver.cpp:
+ (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::currentWorld):
+ (WebCore::mainThreadNormalWorld):
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::WebCoreJSClientData::WebCoreJSClientData):
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::JSDOMWindowBase::updateDocument):
+ * bindings/js/JSDOMWindowBase.h:
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::JSEventListener::handleEvent):
+ (WebCore::JSEventListener::reportError):
+ * bindings/js/JSHTMLDocumentCustom.cpp:
+ (WebCore::JSHTMLDocument::open):
+ * bindings/js/JSNodeFilterCondition.cpp:
+ (WebCore::JSNodeFilterCondition::acceptNode):
+ * bindings/js/JSQuarantinedObjectWrapper.cpp:
+ (WebCore::JSQuarantinedObjectWrapper::construct):
+ (WebCore::JSQuarantinedObjectWrapper::call):
+ * bindings/js/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::executeFunctionInContext):
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluateInWorld):
+ (WebCore::ScriptController::initScript):
+ (WebCore::ScriptController::updateDocument):
+ * bindings/js/ScriptFunctionCall.cpp:
+ (WebCore::ScriptFunctionCall::call):
+ (WebCore::ScriptFunctionCall::construct):
+ * bindings/js/ScriptObjectQuarantine.cpp:
+ (WebCore::getQuarantinedScriptObject):
+ * bindings/js/ScriptState.cpp:
+ (WebCore::scriptStateFromNode):
+ (WebCore::scriptStateFromPage):
+ * bindings/js/ScriptState.h:
+ * bindings/js/WorkerScriptController.cpp:
+ (WebCore::WorkerScriptController::evaluate):
+ * bindings/objc/WebScriptObject.mm:
+ (-[WebScriptObject callWebScriptMethod:withArguments:]):
+ (-[WebScriptObject evaluateWebScript:]):
+ * bridge/NP_jsobject.cpp:
+ (_NPN_InvokeDefault):
+ (_NPN_Invoke):
+ (_NPN_Evaluate):
+ (_NPN_Construct):
+ * bridge/jni/jni_jsobject.mm:
+ (JavaJSObject::call):
+ (JavaJSObject::eval):
+ * dom/NodeFilter.h:
+ (WebCore::NodeFilter::acceptNode):
+ * dom/NodeIterator.h:
+ (WebCore::NodeIterator::nextNode):
+ (WebCore::NodeIterator::previousNode):
+ * dom/TreeWalker.h:
+ (WebCore::TreeWalker::parentNode):
+ (WebCore::TreeWalker::firstChild):
+ (WebCore::TreeWalker::lastChild):
+ (WebCore::TreeWalker::previousSibling):
+ (WebCore::TreeWalker::nextSibling):
+ (WebCore::TreeWalker::previousNode):
+ (WebCore::TreeWalker::nextNode):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::windowScriptObjectAvailable):
+ (WebCore::InspectorController::didEvaluateForTestInFrontend):
+ * inspector/JavaScriptCallFrame.cpp:
+ (WebCore::JavaScriptCallFrame::evaluate):
+
+2009-11-30 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ All HTML5 media element events should be regular events
+ https://bugs.webkit.org/show_bug.cgi?id=30513
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::selectMediaResource):
+ (WebCore::HTMLMediaElement::noneSupported):
+ (WebCore::HTMLMediaElement::mediaEngineError):
+ (WebCore::HTMLMediaElement::setNetworkState):
+ (WebCore::HTMLMediaElement::userCancelledLoad):
+ Call scheduleEvent instead of scheduleProgressEvent.
+ (WebCore::HTMLMediaElement::progressEventTimerFired):
+ Call scheduleEvent instead of scheduleProgressEvent. Call renderer->updateFromElement
+ after scheduling a 'progress' event so the controller will update download
+ progress indicator.
+ * html/HTMLMediaElement.h:
+ Remove scheduleProgressEvent prototype.
+
+2009-11-30 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Wrong console output for Regexp escape sequence
+ https://bugs.webkit.org/show_bug.cgi?id=31538
+
+ Updated inspector/console-format.html
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.createDividerElement): style issues.
+ (WebInspector.ConsoleView.createFilterElement): style issues.
+ (WebInspector.ConsoleView): added _customFormatters table.
+ (WebInspector.ConsoleView.prototype.updateMessageRepeatCount): style isses.
+ (WebInspector.ConsoleView.prototype._incrementErrorWarningCount): style issues.
+ (WebInspector.ConsoleView.prototype._format): simplified delegation to formatter logic.
+ (WebInspector.ConsoleView.prototype._formatobject):
+ (WebInspector.ConsoleView.prototype._formatnode):
+ (WebInspector.ConsoleView.prototype._printArray):
+ (WebInspector.ConsoleMessage.prototype._format): commented and broke down the algorithm into parts.
+ (WebInspector.ConsoleMessage.prototype._formatWithSubstitutionString.append): handle substitution string formatting.
+ (WebInspector.ConsoleMessage.prototype._formatIndividualValue): handling individual value formatting.
+ (WebInspector.ConsoleCommandResult):
+ * inspector/front-end/InjectedScript.js: simplified regex formatting.
+ * inspector/front-end/inspector.js:
+ (WebInspector.linkifyStringAsFragment): converted new RegExp to literal for performance benefits.
+ * inspector/front-end/utilities.js:
+ (Element.prototype.hasStyleClass): update inaccurate comment.
+ (String.prototype.trimURL): converted new RegExp to literal for performance benefits.
+
+2009-11-30 Erik Arvidsson <arv@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Clean up V8 bindings for CSSStyleDeclaration and CSSVariableDeclaration
+ https://bugs.webkit.org/show_bug.cgi?id=31895
+
+ No new tests. This is already covered by:
+ fast/dom/CSSStyleDeclaration/css-computed-style-item.html
+ fast/dom/CSSStyleDeclaration/css-style-item.html
+
+ * bindings/v8/V8Collection.h:
+ (WebCore::collectionStringIndexedPropertyGetter):
+ (WebCore::setCollectionStringIndexedGetter):
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+
+2009-11-30 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Adds include of wtf/StdLibExtras.h for DEFINE_STATIC_LOCAL in V8 ScriptController.
+ https://bugs.webkit.org/show_bug.cgi?id=31932
+
+ Build fix only, no new tests.
+
+ * bindings/v8/ScriptController.cpp: Modified. Adds include of wtf/StdLibExtras.h.
+
+2009-11-30 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Adds PassOwnPtr include to ScriptExecutionContext.h.
+ https://bugs.webkit.org/show_bug.cgi?id=31929
+
+ Build fix only, no new tests.
+
+ * dom/ScriptExecutionContext.h: Modified. Adds PassOwnPtr include.
+
+2009-11-30 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ REGRESSION (r49757): masking-mask-01-b.svg rendered incorrectly
+ [https://bugs.webkit.org/show_bug.cgi?id=31980]
+
+ It turns out, that we did not handle maskUnits="userSpaceOnUse"
+ correctly. We just need to move the context of the maskImage
+ if maskContentUnits="objectBoundingBox". The context gets scaled
+ on this unit combination, so we have to substract the position of
+ the targetRect. On userSpaceOnUse the position just depends on the
+ position of the mask element.
+ I added a test with some senseless and reasonable values for size
+ and postion of the mask and it's contents. I also used every
+ combination of maskUnits and maskContentUnits to be sure, that it
+ is fixed this time.
+
+ Test: svg/custom/mask-with-all-units.svg
+
+ * svg/SVGMaskElement.cpp:
+ (WebCore::SVGMaskElement::drawMaskerContent):
+
+2009-11-30 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Adds ENABLE(INSPECTOR) guards around DOMWindow::inspectorTimelineAgent.
+ https://bugs.webkit.org/show_bug.cgi?id=31928
+
+ Build fix only, no new tests.
+
+ * page/DOMWindow.cpp: Modified. Adds ENABLE(INSPECTOR) guards around DOMWindow::inspectorTimelineAgent.
+
+2009-11-30 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Adds SHARED_WORKERS guards to V8 WorkerContextExecutionProxy.
+ https://bugs.webkit.org/show_bug.cgi?id=31926
+
+ Build fix only, no new tests.
+
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
+ (WebCore::WorkerContextExecutionProxy::convertToV8Object):
+ (WebCore::WorkerContextExecutionProxy::convertEventTargetToV8Object):
+
+2009-11-30 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Chrome::contentsSizeChanged() is called when the content size has not changed
+ https://bugs.webkit.org/show_bug.cgi?id=31978
+
+ Do not trigger contentsSizeChaned() is the new size is the same as the old one.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::setContentsSize):
+
+2009-11-30 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix some compiler warnings seen on QtWebKit/Mac
+ https://bugs.webkit.org/show_bug.cgi?id=31962
+
+ No new tests as there is no functional change.
+
+ * platform/network/ResourceHandle.h: Make destructor virtual as
+ after r50772 ResourceHandle has virtual functions.
+
+ * plugins/mac/PluginPackageMac.cpp:
+ (WebCore::PluginPackage::fetchInfo): Fix typo WTF is a namespace
+ not a label
+
+ * plugins/mac/PluginViewMac.cpp:
+ (WebCore::PluginView::setNPWindowIfNeeded): Add l to the format
+ specifier
+
+2009-11-30 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Add new headers to sources list.
+
+ * GNUmakefile.am:
+
+2009-11-30 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Mac Plugins : Get context menu to work in QGraphicsView
+
+ Flash expects the value in record.where to be the global position for
+ displaying the context menu.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31979
+
+ * plugins/mac/PluginViewMac.cpp:
+ (WebCore::PluginView::handleMouseEvent):
+
+2009-11-30 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Adds PLATFORM(CHROMIUM) guards around memory usage code in V8GCController.
+ https://bugs.webkit.org/show_bug.cgi?id=31925
+
+ This code uses ChromiumBridge and Chromium-specific constant values not
+ appropriate for other platforms such as Android.
+
+ Build fix only, no new tests.
+
+ * bindings/v8/V8GCController.cpp: Modified. Adds PLATFORM(CHROMIUM) around Chromium-specific code.
+
+2009-11-29 Brent Fulgham <bfulgham@webkit.org>
+
+ Build fix.
+
+ Correct draw signature used in ImageCairoWin.cpp.
+
+ * platform/graphics/win/ImageCairoWin.cpp:
+ (WebCore::BitmapImage::getHBITMAPOfSize):
+ (WebCore::BitmapImage::drawFrameMatchingSourceSize):
+
+2009-11-28 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ postMessage should serialize File objects
+ https://bugs.webkit.org/show_bug.cgi?id=31955
+
+ Update SerializedScriptValue to include support for
+ File objects in the serialized object graph.
+
+ * bindings/js/SerializedScriptValue.cpp:
+ (WebCore::SerializedScriptValueData::SerializedScriptValueData):
+ (WebCore::SerializingTreeWalker::convertIfTerminal):
+ (WebCore::DeserializingTreeWalker::convertIfTerminal):
+ * bindings/js/SerializedScriptValue.h:
+ (WebCore::SerializedScriptValueData::):
+ (WebCore::SerializedScriptValueData::asString):
+
+2009-11-29 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Optimize the hierarchy rebuilding of compositing layers
+ https://bugs.webkit.org/show_bug.cgi?id=31879
+
+ When updating the compositing layer hierarchy, instead of removing all
+ child layers and then re-adding them one by one, build a vector of child
+ layers, and set them in one go.
+
+ * platform/graphics/GraphicsLayer.h:
+ * platform/graphics/GraphicsLayer.cpp:
+ (WebCore::GraphicsLayer::setChildren): New method that takes a Vector of child
+ GraphicsLayers.
+
+ * platform/graphics/mac/GraphicsLayerCA.h: Override setChildren().
+ * platform/graphics/win/GraphicsLayerCACF.h: Ditto.
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::setChildren): Implement setChildren() to
+ set the bit that notes that sublayers changed.
+ * platform/graphics/win/GraphicsLayerCACF.cpp:
+ (WebCore::GraphicsLayerCACF::setChildren): Implement setChildren() to
+ udpate sublayers, with a note that this is not efficient.
+
+ * rendering/RenderLayerCompositor.h:
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::updateCompositingLayers):
+ When updating compositing layers, use the faster updateLayerTreeGeometry() if
+ we know that no layer hierarchy changes are needed, and, at the root, use
+ the vector returned from rebuildCompositingLayerTree() to attach the root
+ layer.
+ (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Changed to
+ collect child layers into Vectors of GraphicsLayers, which can be set as
+ layer children in one go.
+ (WebCore::RenderLayerCompositor::updateLayerTreeGeometry): Split out from
+ rebuildCompositingLayerTree() for simplicity, and called when we just need to
+ update layer geometry, without doing any reparenting.
+
+2009-11-29 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31971
+
+ Updated comment to reflect latest XSSAuditor bindings.
+
+ No functionality was changed. So, no new tests.
+
+ * page/XSSAuditor.h:
+
+2009-11-29 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31969
+
+ Removes unnecessary #include files.
+
+ No functionality was changed. So, no new tests.
+
+ * css/CSSComputedStyleDeclaration.cpp: Removed include CachedImage.h, and
+ Pair.h
+ * css/CSSCursorImageValue.cpp: Removed include RenderStyle.h
+ * css/CSSFontFaceSrcValue.cpp: Removed include Node.h
+ * css/CSSFontSelector.cpp: Removed include NodeList.h
+ * css/CSSGradientValue.cpp: Removed include GraphicsContext.h, ImageBuffer.h
+ * css/CSSImageValue.cpp: Removed include RenderStyle.h
+ * css/CSSImportRule.cpp: Removed include MediaList.h
+ * css/CSSMutableStyleDeclaration.cpp: Removed include CSSProperty.h
+ * css/CSSRule.cpp: Removed include CSSStyleSheet.h
+ * css/CSSStyleSelector.cpp: Removed include CSSFontFace.h,
+ CSSFontFaceSource.h, and CSSProperty.h
+ * page/EventSource.h: Removed include EventListener.h
+
+2009-11-29 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31965
+
+ Removed #include KeyframeList.h from CSSStyleSelector.h. Instead,
+ forward declared it.
+
+ As a side effect, we need to #include KeyframeList.h in
+ RenderLayerBacking.cpp.
+
+ No functionality was changed. So, no new tests.
+
+ * css/CSSStyleSelector.cpp:
+ * css/CSSStyleSelector.h: Removed #include KeyframeList.h
+ * rendering/RenderLayerBacking.cpp: Added #include KeyframeList.h
+
+2009-11-29 Shu Chang <Chang.Shu@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ Continue to search for matching node in the case where multiple nodes
+ have the same id.
+ https://bugs.webkit.org/show_bug.cgi?id=31428
+
+ Test: fast/dom/Element/id-in-node-list-index01.html
+
+ * dom/DynamicNodeList.cpp:
+ (WebCore::DynamicNodeList::itemWithName):
+
+2009-11-29 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31966
+
+ Removed #include RenderStyle.h from file KeyframeAnimation.h. Instead,
+ forward declared it.
+
+ No functionality was changed. So, no new tests.
+
+ * page/animation/KeyframeAnimation.cpp:
+ * page/animation/KeyframeAnimation.h:
+
+2009-11-29 Daniel Bates <dbates@webkit.org>
+
+ Unreviewed, fix change log entry date.
+
+ For some reason, bugzilla-tool did not update the date in the change
+ log entry for my last commit (r51468). So, this commit fixes the date
+ of that entry.
+
+2009-11-29 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31964
+
+ Removed #include StringImpl, StyleImage. Instead, forward declared them.
+ Also, we can substitute #include <wtf/PassRefPtr.h> for #include PlatformString.h,
+ since it seems we only really used it to include PassRefPtr.h.
+
+ No functionality was changed. So, no new tests.
+
+ * rendering/style/ContentData.h:
+
+2009-11-29 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Allow custom memory allocation control for classes of the rendering and storage directory in WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=31906
+
+ Inherits the following classes from Noncopyable because these are instantiated
+ by 'new' and no need to be copyable:
+
+ class/struct name - instantiated at: WebCore/'location'
+
+ class SQLTransactionClient - storage/DatabaseThread.cpp:45
+ class SQLTransactionCoordinator - storage/DatabaseThread.cpp:46
+ class OriginUsageRecord - storage/OriginQuotaManager.cpp:66
+ class DatabaseTracker - storage/DatabaseTracker.cpp:62
+ class ScrollbarTheme - (its child class) rendering/RenderScrollbarTheme.cpp:35
+ class RenderSelectionInfoBase - (its child class) rendering/RenderView.cpp:310
+ class RenderOverflow - rendering/RenderBox.cpp:2846
+
+ Inherits the following classes from FastAllocBase because these are instantiated by 'new':
+
+ struct FillLayer - css/CSSStyleSelector.cpp:197
+ struct ShadowData - rendering/style/ShadowData.cpp:35
+ class CounterContent - css/CSSStyleSelector.cpp:4111
+
+ * platform/ScrollbarTheme.h:
+ * rendering/RenderOverflow.h:
+ * rendering/RenderSelectionInfo.h:
+ * rendering/style/CounterContent.h:
+ * rendering/style/FillLayer.h:
+ * rendering/style/ShadowData.h:
+ * storage/DatabaseTracker.h:
+ * storage/OriginUsageRecord.h:
+ * storage/SQLTransactionClient.h:
+ * storage/SQLTransactionCoordinator.h:
+
+2009-11-28 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Sify compose button alerts error
+ https://bugs.webkit.org/show_bug.cgi?id=31394
+
+ Test: http/tests/security/calling-versus-current.html
+
+ We're supposed to use the calling context for security checks. In JSC
+ land, this is the lexicalGlobalObject.
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::canAccessPrivate):
+
+2009-11-27 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Unreviewed Chromium build fix introduced by r51428.
+
+ [Chromium] Ignore line-height CSS property for PushButton
+ https://bugs.webkit.org/show_bug.cgi?id=31712
+
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::adjustButtonStyle):
+
+2009-11-27 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Unreviewed Chromium test fix by reverting r51413.
+
+ [v8] Do not check the thread when accessing DOMDataStore
+ https://bugs.webkit.org/show_bug.cgi?id=31877
+
+ * bindings/v8/V8DOMMap.cpp:
+ (WebCore::getDOMNodeMap):
+ (WebCore::getDOMObjectMap):
+ (WebCore::getActiveDOMObjectMap):
+ (WebCore::getDOMSVGElementInstanceMap):
+ (WebCore::getDOMSVGObjectWithContextMap):
+
+2009-11-27 Daniel Bates <dbates@webkit.org>
+
+ Unreviewed, comment fix.
+
+ Corrected misspelling of the word "implemented".
+
+ * inspector/front-end/InjectedScriptAccess.js:
+
+2009-11-27 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31940
+
+ Makes the error messages more descriptive when we refuse to load an object/embed or
+ refuse to load from the document base URL.
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canLoadObject): Changed console message to be more descriptive.
+ (WebCore::XSSAuditor::canSetBaseElementURL): Ditto.
+
+2009-11-27 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ This is a WebCore part of the fix that allows to view plugin
+ resources loaded by plugins.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31832
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::willSendRequest):
+ (WebCore::InspectorController::didReceiveResponse):
+ (WebCore::InspectorController::didReceiveContentLength):
+ (WebCore::InspectorController::didFinishLoading):
+ (WebCore::InspectorController::didFailLoading):
+ * inspector/InspectorController.h:
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::addLength):
+ * loader/ResourceLoadNotifier.cpp:
+ (WebCore::ResourceLoadNotifier::didFailToLoad):
+ (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
+ (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
+ (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
+ (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
+
+2009-11-27 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Instead of generating negative identifiers for cached resources in
+ InspectorController and extending identifier type from 'unsigned long' to 'long
+ long' reuse progress tracker from the inspected page to generate those
+ identifiers. It guarantees that InspectorResources have unique ids since
+ all of them are generated by that progress tracker.
+
+ Added a couple new overloaded methods to Script* objects that accept
+ long and unsigned long arguments. These types of argumens have already
+ been passed as long long.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31921
+
+ * bindings/js/ScriptFunctionCall.cpp:
+ (WebCore::ScriptFunctionCall::appendArgument):
+ * bindings/js/ScriptFunctionCall.h:
+ * bindings/js/ScriptObject.cpp:
+ (WebCore::ScriptObject::set):
+ * bindings/js/ScriptObject.h:
+ * bindings/v8/ScriptFunctionCall.cpp:
+ (WebCore::ScriptFunctionCall::appendArgument):
+ * bindings/v8/ScriptFunctionCall.h:
+ * bindings/v8/ScriptObject.cpp:
+ (WebCore::ScriptObject::set):
+ * bindings/v8/ScriptObject.h:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::dispatchOnInjectedScript):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::InspectorController):
+ (WebCore::InspectorController::getTrackedResource):
+ (WebCore::InspectorController::didLoadResourceFromMemoryCache): Use inspected page's ProgressTracker to generate unique identifiers for cached resources in InspectorController.
+ * inspector/InspectorController.h:
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::buildObjectForNode):
+ (WebCore::InspectorDOMAgent::buildObjectForEventListener):
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addResource):
+ (WebCore::InspectorFrontend::updateResource):
+ (WebCore::InspectorFrontend::removeResource):
+ (WebCore::InspectorFrontend::updateFocusedNode):
+ * inspector/InspectorFrontend.h:
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::InspectorResource):
+ (WebCore::InspectorResource::createCached):
+ * inspector/InspectorResource.h: Change InspectorResource identifier type from 'long long' to 'unsigned long'.
+ (WebCore::InspectorResource::create):
+ (WebCore::InspectorResource::identifier):
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createResourceSendRequestRecord):
+ (WebCore::TimelineRecordFactory::createResourceReceiveResponseRecord):
+ (WebCore::TimelineRecordFactory::createResourceFinishRecord):
+
+2009-11-26 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ Assertion failure in RenderBlock::positionForPointWithInlineChildren when running fast/inline/relative-positioned-overflow.html
+ https://bugs.webkit.org/show_bug.cgi?id=29966
+
+ When an empty inline element is clicked, the root inline box has
+ no leaf children. Use the renderer of a normal child instead.
+
+ This change resolves Windows port's assertion failure in a layout test.
+ Also, this fixes the behavior when a user drags the mouse from an
+ empty inline element to above texts.
+
+ Test: editing/selection/last-empty-inline.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::positionForPointWithInlineChildren):
+
+2009-11-26 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [Chromium] Ignore line-height CSS property specified to push buttons on
+ Windows and Linux.
+ https://bugs.webkit.org/show_bug.cgi?id=31712
+
+ LayoutTests/fast/forms/control-restrict-line-height.html checks that the
+ following controls should ignore line-height CSS property.
+ - <select>
+ - <input type=button>
+ - <input type=search>
+ This change addresses the <input type=button> issue with Chromium/Windows
+ and Chromium/Linux.
+
+ * rendering/RenderThemeChromiumSkia.cpp: Implement adjustButtonStyle() to ignore line-height.
+ * rendering/RenderThemeChromiumSkia.h: Declare adjustButtonStyle().
+
+2009-11-26 Kinuko Yasuda <kinuko@chromium.com>
+
+ Reviewed by Eric Seidel.
+
+ Remove the special charset meta tag in the clipboard so that
+ copy-and-paste with interchange breaklines/spaces works correctly
+ within WebKit.
+
+ No new tests. Layout tests that involve copy-and-paste with
+ interchange breaklines (like editing/pasteboard/paste-line-endings-00?)
+ should pass on Mac/Chromium with this fix.
+
+ * platform/chromium/ClipboardChromium.cpp:
+ * platform/chromium/PasteboardChromium.cpp:
+ (WebCore::Pasteboard::documentFragment):
+
+2009-11-26 İsmail Dönmez <ismail@namtrac.org>
+
+ Reviewed by Eric Seidel.
+
+ Compile with QT_NO_WHEELEVENT defined.
+
+ * platform/qt/WheelEventQt.cpp:
+ (WebCore::PlatformWheelEvent::applyDelta):
+
+2009-11-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Oliver Hunt.
+
+ Move GOwnPtr* from wtf to wtf/gtk
+ https://bugs.webkit.org/show_bug.cgi?id=31793
+
+ No new tests as there is no functional change.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: Change the
+ path for GOwnPtr.h.
+ * platform/text/TextEncoding.cpp: Ditto.
+ * platform/text/gtk/TextCodecGtk.cpp: Ditto.
+
+2009-11-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Not reviewed. Build fix: revert r51421.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::willSendRequest):
+ (WebCore::InspectorController::didReceiveResponse):
+ (WebCore::InspectorController::didReceiveContentLength):
+ (WebCore::InspectorController::didFinishLoading):
+ (WebCore::InspectorController::didFailLoading):
+ * inspector/InspectorController.h:
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::addLength):
+ * loader/ResourceLoadNotifier.cpp:
+ (WebCore::ResourceLoadNotifier::didFailToLoad):
+ (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
+ (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
+ (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
+ (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
+
+2009-11-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ This is a WebCore part of the fix that allows to view plugin
+ resources loaded by plugins.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31832
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::willSendRequest):
+ (WebCore::InspectorController::didReceiveResponse):
+ (WebCore::InspectorController::didReceiveContentLength):
+ (WebCore::InspectorController::didFinishLoading):
+ (WebCore::InspectorController::didFailLoading):
+ * inspector/InspectorController.h: Remove unused DocumentLoader parameters from inspector methods.
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::addLength): Update loading end time when new data are received.
+ * loader/ResourceLoadNotifier.cpp:
+ (WebCore::ResourceLoadNotifier::didFailToLoad): Notify InspectorController about the failure.
+ (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
+ (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
+ (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
+ (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
+
+2009-11-26 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Pavel Feldman.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21554
+
+ Implements support for hovering over <img> src to display the height and width of that image
+ in a tooltip. Displays both the displayable and natural dimensions of the image.
+
+ Test: inspector/elements-img-tooltip.html
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype.createTooltipForImageNode): Added.
+ (WebInspector.ElementsTreeElement.prototype._updateTitle.callback):
+ (WebInspector.ElementsTreeElement.prototype._updateTitle):
+ (WebInspector.ElementsTreeElement.prototype._nodeTitleInfo):
+ * inspector/front-end/ObjectProxy.js:
+ (WebInspector.ObjectProxy.getPropertiesAsync): Added.
+ * inspector/front-end/inspector.js:
+ (WebInspector.linkifyURLAsNode): Added tooltipText argument.
+ (WebInspector.linkifyURL): Ditto.
+
+2009-11-26 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix after drawPattern API change.
+
+ * platform/graphics/wx/ImageWx.cpp:
+ (WebCore::Image::drawPattern):
+
+2009-11-26 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Use an internal field instead of hidden property to speedup lookup
+ of entered isolated world.
+
+ Plus some inlinings.
+ https://bugs.webkit.org/show_bug.cgi?id=31884
+
+ Covered by layout tests + manual running of some benchmarks as
+ content scripts.
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ * bindings/v8/V8DOMWrapper.h:
+ (WebCore::V8DOMWrapper::setDOMWrapper):
+ * bindings/v8/V8HiddenPropertyName.h:
+ * bindings/v8/V8IsolatedWorld.cpp:
+ (WebCore::V8IsolatedWorld::V8IsolatedWorld):
+ * bindings/v8/V8IsolatedWorld.h:
+ (WebCore::V8IsolatedWorld::getEntered):
+ (WebCore::V8IsolatedWorld::getGlobalObject):
+ * bindings/v8/custom/V8CustomBinding.h:
+
+2009-11-26 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Corrects build break on Windows.
+
+ Rename platform/text/qt/TextBoundaries.cpp to TextBoundariesQt.cpp since
+ platform/text/TextBoundaries.cpp was compiled instead when compiling with nmake.
+
+ * WebCore.pro:
+ * platform/text/qt/TextBoundariesQt.cpp: Renamed from WebCore/platform/text/qt/TextBoundaries.cpp.
+ (WebCore::findNextWordFromIndex):
+ (WebCore::findWordBoundary):
+
+2009-11-26 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Do not check if the thread is main or not when accessing DOMDataStore as currently in Chromium WebKit is used in main thread only.
+ https://bugs.webkit.org/show_bug.cgi?id=31877
+
+ Covered by layout tests and buildbots.
+
+ * bindings/v8/V8DOMMap.cpp:
+ (WebCore::getDOMNodeMap):
+ (WebCore::getDOMObjectMap):
+ (WebCore::getActiveDOMObjectMap):
+ (WebCore::getDOMSVGElementInstanceMap):
+ (WebCore::getDOMSVGObjectWithContextMap):
+
+2009-11-26 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Mac Plugins : Pass mouse position relative to the fake window
+
+ When using off-screen rendering, we need to pass mouse events relative
+ to the fake window instead of the global position.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31794
+
+ * plugins/mac/PluginViewMac.cpp:
+ (WebCore::PluginView::platformStart):
+ (WebCore::PluginView::handleMouseEvent):
+
+2009-11-24 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Use QNetworkReply::rawHeaderPairs
+ https://bugs.webkit.org/show_bug.cgi?id=31826
+
+ The QNetworkReply is internally storing the HTTP headers
+ as a list of pairs. Currently we have to ask the QNetworkReply
+ to put all header names into a QStringList. Afterwards we will
+ iterate over this QStringList and ask the QNetworkReply to
+ give us the value for this header name. The current Qt implementation
+ is doing a linear to find the header value.
+
+ Use a new API to directly access the list of pairs and push
+ this into WebCore. This avoids doing some allocations and doing
+ linear searches from within a loop.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+
+2009-11-21 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add Qt specific information of RenderPart
+ https://bugs.webkit.org/show_bug.cgi?id=31203
+
+ The WebCore::Widget of the RenderPart (RenderWidget) might be
+ backed with a platform widget. Print both the WebCore::Widget
+ and platform widget state. In the above bug we had a problem
+ that the WebCore::Widget was invisible but the QWidget was
+ visible.
+
+ * rendering/RenderTreeAsText.cpp:
+ (WebCore::operator<<): Add special case for RenderPart
+
+2009-11-17 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Call Widget::setSelfVisible from hide/show
+ https://bugs.webkit.org/show_bug.cgi?id=31203
+
+ Call Widget::setSelfVisible from Widget::show and
+ Widget::hide and use isParentVisible to decide
+ if the widget should be shown. This way client
+ code can rely on isVisible.
+
+ Change PluginViewQt::show, PluginViewQt::hide to
+ call the base class as it is doing the right thing
+ now. Add an assert verify that platfomWidget and
+ platformPluginWidget are the same.
+
+ * manual-tests/qt/qtplugin.html: Modify manual test
+ * platform/qt/WidgetQt.cpp:
+ (WebCore::Widget::show):
+ (WebCore::Widget::hide):
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::show):
+ (WebCore::PluginView::hide):
+
+2009-11-24 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Fix compilation of REQUEST_DEBUG debug code
+ https://bugs.webkit.org/show_bug.cgi?id=31850
+
+ In r47907 the single parameter KURL constructor to parse
+ from a WebCore::String was replaced with a two parameter
+ constructor. I think in this debug case parsing the urls
+ again is no problem and I have changed the code to use the
+ two parameter version.
+
+ * loader/loader.cpp:
+ (WebCore::Loader::Host::didFinishLoading):
+
+2009-11-26 Søren Gjesse <sgjesse@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [V8] Avoid using JavaScript objects as context data
+ https://bugs.webkit.org/show_bug.cgi?id=31873
+
+ Change the context "data" from a JavaScript object holding the two properties type and value to
+ a string holding type and value separated by a comma.
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::setInjectedScriptContextDebugId):
+ (WebCore::V8Proxy::setContextDebugId):
+ (WebCore::V8Proxy::contextDebugId):
+
+2009-11-25 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by David Levin.
+
+ [Chromium] Implement canSetValueAttribute in the API, the clean-up part.
+ https://bugs.webkit.org/show_bug.cgi?id=31894
+
+ * accessibility/chromium/AccessibilityObjectWrapper.h: Added RefCounted decl.
+ (WebCore::AccessibilityObjectWrapper::AccessibilityObjectWrapper): Removed mis-refcountingness.
+
+2009-11-25 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Oliver Hunt.
+
+ Off-by-one error in index validation for drawElements and drawArrays
+ https://bugs.webkit.org/show_bug.cgi?id=31891
+
+ Fixed computation of number of elements for bound array objects.
+
+ Test: fast/canvas/webgl/index-validation.html
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::vertexAttribPointer):
+
+2009-11-25 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by David Levin.
+
+ Update SharedScript to use eventNames() instead of EventNames()
+ https://bugs.webkit.org/show_bug.cgi?id=31890
+
+ * SharedScript/WebKitSharedScript.cpp:
+ (WebCore::LoadEventTask::performTask):
+
+2009-11-25 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7409331> Windows: Support closed caption in <video> element
+
+ Enable closed captions in QuickTime/Windows media engine.
+
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+ (WebCore::MediaPlayerPrivate::hasClosedCaptions):
+ (WebCore::MediaPlayerPrivate::setClosedCaptionsVisible):
+ New, all through to m_qtMovie.
+
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
+ Make all but the destructor private since MediaPlayer call through the media
+ engine interface.
+
+ * platform/graphics/win/QTMovieWin.cpp:
+ (QTMovieWin::disableUnsupportedTracks):
+ Use handy new constants for QuickTime track types.
+ (QTMovieWin::hasClosedCaptions):
+ (QTMovieWin::setClosedCaptionsVisible):
+ New, closed caption support.
+ * platform/graphics/win/QTMovieWin.h:
+
+ * rendering/RenderMediaControls.cpp:
+ (WebCore::RenderMediaControls::paintMediaControlsPart):
+ Deal with closed caption buttons.
+
+ * rendering/RenderThemeWin.cpp:
+ (WebCore::RenderThemeWin::shouldRenderMediaControlPart):
+ New, don't ask the media engine if it has closed captions unless the Safari theme will
+ be able to render the button.
+ (WebCore::RenderThemeWin::paintMediaToggleClosedCaptionsButton):
+ New.
+ * rendering/RenderThemeWin.h:
+
+2009-11-25 Drew Wilson <atwilson@chromium.org>
+
+ Reviewed by David Levin.
+
+ MessagePorts always look remotely entangled even when closed.
+ https://bugs.webkit.org/show_bug.cgi?id=31698
+
+ Tests: Existing tests suffice, Chromium soak test passes now.
+
+ * bindings/v8/custom/V8CustomBinding.h:
+ Removed kMessagePortEntangledPortIndex which is no longer used.
+ * bindings/v8/V8GCController.cpp:
+ (WebCore::GCPrologueVisitor::visitDOMWrapper):
+ Simplified GC code to reflect the Chromium MessagePort implementation
+ (locallyEntangledPort() always returns false).
+ (WebCore::GCEpilogueVisitor::visitDOMWrapper):
+ Cleaned up epilogue code to handle the case where the port gets closed
+ in mid-GC (due to the parent context being freed).
+ * dom/MessagePort.cpp:
+ (WebCore::MessagePort::MessagePort):
+ (WebCore::MessagePort::close):
+ Now sets the closed flag.
+ (WebCore::MessagePort::disentanglePorts):
+ Updated to use new isCloned() API instead of relying on isEntangled(), which was incorrect.
+ * dom/MessagePort.h:
+ Added a m_closed flag and updated isEntangled() to check it.
+ (WebCore::MessagePort::isEntangled):
+ Now returns false if the port has been closed.
+ (WebCore::MessagePort::isCloned):
+ Added new API to differentiate between cloned and closed ports (closed ports can still be passed to postMessage).
+
+2009-11-25 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix crash of QtWebKit on any page with Flash when compiled with MinGW.
+
+ Fix inline assembly, don't dereference the function pointer twice.
+
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::hookedBeginPaint):
+ (WebCore::PluginView::hookedEndPaint):
+
+2009-11-22 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Remove the Referer header when redirecting to a non-secure site
+ https://bugs.webkit.org/show_bug.cgi?id=31785
+
+ This makes Qt pass two tests introduced in r50226.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+
+2009-11-25 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ The select elements do not reflect the actual choice the user makes.
+ https://bugs.webkit.org/show_bug.cgi?id=31831
+
+ Handle the drawing of the listboxes in Android code.
+
+ No new features, just fixing an Android problem. Existing layout tests are sufficient.
+
+ * platform/android/RenderThemeAndroid.cpp:
+ (WebCore::theme):
+ (WebCore::RenderThemeAndroid::platformActiveSelectionBackgroundColor):
+ (WebCore::RenderThemeAndroid::platformActiveListBoxSelectionBackgroundColor):
+ (WebCore::RenderThemeAndroid::platformInactiveListBoxSelectionBackgroundColor):
+ (WebCore::RenderThemeAndroid::platformActiveListBoxSelectionForegroundColor):
+ (WebCore::RenderThemeAndroid::platformInactiveListBoxSelectionForegroundColor):
+ (WebCore::RenderThemeAndroid::adjustButtonStyle):
+ (WebCore::RenderThemeAndroid::paintTextArea):
+ (WebCore::RenderThemeAndroid::adjustListboxStyle):
+ * platform/android/RenderThemeAndroid.h:
+
+2009-11-25 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Load InspectorResource mime type from CachedResource for 304 responses
+
+ For network libraries that do not merge cache data into 304 ResourceResponses,
+ the mime type for cached resources is unknown.
+ https://bugs.webkit.org/show_bug.cgi?id=31868
+
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::updateResponse):
+ (WebCore::InspectorResource::updateScriptObject):
+ (WebCore::InspectorResource::type):
+
+2009-11-25 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Android is missing implementation of SSL Key generator functions.
+ https://bugs.webkit.org/show_bug.cgi?id=31825
+
+ This change adds the PlatformBridge class to platform/android.
+ PlarformBridge is used to access the embedding layer for things
+ such as key generator, cookies, plugins, etc.
+
+ No new tests required, this is platform code.
+
+ * platform/android/PlatformBridge.h: Added.
+ * platform/android/SSLKeyGeneratorAndroid.cpp: Added.
+ (WebCore::getSupportedKeySizes):
+ (WebCore::signedPublicKeyAndChallengeString):
+
+2009-11-25 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Eric Seidel.
+
+ [GTK] use gst_init_check() instead of gst_init()
+ https://bugs.webkit.org/show_bug.cgi?id=31864
+
+ Use gst_init_check() instead of gst_init() to prevent eventual
+ unexpected exit of the application.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::do_gst_init):
+ (WebCore::MediaPlayerPrivate::isAvailable):
+
+2009-11-25 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ Some tests are crashing from time to time
+ https://bugs.webkit.org/show_bug.cgi?id=31866
+
+ Make sure we do not notify the client of a finished load, if the
+ load has been cancelled, or the client is gone.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::):
+
+2009-11-24 Ben Murdoch <benm@google.com>
+
+ Reviewed by Eric Seidel.
+
+ [Android] Upstream Android changes to WebCore/bridge/jni
+ https://bugs.webkit.org/show_bug.cgi?id=31824
+
+ No new tests required as no new functionality.
+
+ * bridge/jni/jni_class.cpp:
+ (JavaClass::JavaClass): Add calls to delete allocated references, to avoid potential leaks.
+ * bridge/jni/jni_instance.cpp: Add an Android include path.
+ * bridge/jni/jni_instance.h: Add getter/setter for JObjectWrapper::_instance and make the JavaInstance ctor and member variables protected. Both needed for the Android port, see bug for discussion.
+ (JSC::Bindings::JObjectWrapper::instance): Added.
+ (JSC::Bindings::JObjectWrapper::setInstance): Added.
+ * bridge/jni/jni_runtime.cpp:
+ (JavaMethod::JavaMethod): Delete an allocated reference to avoid a potential leak.
+ * bridge/jni/jni_utility.h:
+ (JSC::Bindings::callJNIMethodV): Delete an allocated reference to avoid a potential leak.
+
+2009-11-24 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Allow custom memory allocation control for classes of the plugins and rendering directory in WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=31827
+
+ Inherits the following classes from Noncopyable because these are instantiated
+ by 'new' and no need to be copyable:
+
+ class/struct name - instantiated at: WebCore/'location'
+
+ class PluginRequest - plugins/PluginView.cpp:521
+ class PluginMainThreadScheduler - plugins/PluginMainThreadScheduler.cpp:34
+ class PluginDatabase - plugins/PluginDatabase.cpp:50
+ struct MimeClassInfo - plugins/PluginInfoStore.cpp:50
+ struct PluginInfo - plugins/PluginInfoStore.cpp:40
+ class RenderArena - dom/Document.cpp:1401
+ class RenderImageScaleData - rendering/RenderImage.cpp:149
+ class TableLayout - (its child class) rendering/RenderTable.cpp:82
+ struct ColumnInfo - rendering/RenderBlock.cpp:3590
+ struct FloatingObject - rendering/RenderBlock.cpp:2300
+ struct MaxMargin - rendering/RenderBlock.cpp:4794
+ class RenderMarquee - rendering/RenderLayer.cpp:3277
+
+ * plugins/PluginData.h:
+ * plugins/PluginDatabase.h:
+ * plugins/PluginMainThreadScheduler.h:
+ * plugins/PluginView.h:
+ * rendering/RenderArena.h:
+ * rendering/RenderBlock.cpp:
+ * rendering/RenderBlock.h:
+ * rendering/RenderImage.cpp:
+ * rendering/RenderMarquee.h:
+ * rendering/TableLayout.h:
+
+2009-11-24 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by David Levin.
+
+ Initial implementation of WebKitSharedScript and SharedScriptContext
+ https://bugs.webkit.org/show_bug.cgi?id=31569
+
+ No new tests since there are no bindings yet (soon to come).
+
+ * DerivedSources.make: Add WebKitSharedScript and SharedScriptContext to a list of idl files.
+ * WebCore.xcodeproj/project.pbxproj:
+ * dom/Document.cpp:
+ (WebCore::Document::detach): Notify WebKitSharedScriptRepository that document is detaching.
+ * dom/EventTarget.cpp: Add new casting methods, since the new types are EventTargets.
+ (WebCore::EventTarget::toWebKitSharedScript):
+ (WebCore::EventTarget::toSharedScriptContext):
+ * dom/EventTarget.h: Ditto
+ * dom/ScriptExecutionContext.h:
+ (WebCore::ScriptExecutionContext::isSharedScriptContext): New virtual method, since there is a new type of context.
+
+ * SharedScript/SharedScriptContext.cpp: Added. Similar to WorkerContext, but w/o threading.
+ (WebCore::SharedScriptContext::SharedScriptContext):
+ (WebCore::SharedScriptContext::~SharedScriptContext):
+ (WebCore::SharedScriptContext::clearScript):
+ (WebCore::SharedScriptContext::virtualURL):
+ (WebCore::SharedScriptContext::virtualCompleteURL):
+ (WebCore::SharedScriptContext::reportException):
+ (WebCore::SharedScriptContext::addMessage):
+ (WebCore::SharedScriptContext::resourceRetrievedByXMLHttpRequest):
+ (WebCore::SharedScriptContext::scriptImported):
+ (WebCore::SharedScriptContext::matches):
+ (WebCore::SharedScriptContext::addToDocumentsList):
+ (WebCore::SharedScriptContext::destructionTimerFired):
+ (WebCore::SharedScriptContext::removeFromDocumentList):
+ (WebCore::SharedScriptContext::load):
+ (WebCore::SharedScriptContext::postTask):
+ (WebCore::SharedScriptContext::eventTargetData):
+ (WebCore::SharedScriptContext::ensureEventTargetData):
+ (WebCore::SharedScriptContext::scriptExecutionContext):
+ * SharedScript/SharedScriptContext.h: Added.
+ (WebCore::SharedScriptContext::create):
+ (WebCore::SharedScriptContext::isSharedScriptContext):
+ (WebCore::SharedScriptContext::userAgent):
+ (WebCore::SharedScriptContext::toSharedScriptContext):
+ (WebCore::SharedScriptContext::self):
+ (WebCore::SharedScriptContext::script):
+ (WebCore::SharedScriptContext::loaded):
+ (WebCore::SharedScriptContext::name):
+ (WebCore::SharedScriptContext::refEventTarget):
+ (WebCore::SharedScriptContext::derefEventTarget):
+ (WebCore::SharedScriptContext::refScriptExecutionContext):
+ (WebCore::SharedScriptContext::derefScriptExecutionContext):
+ * SharedScript/SharedScriptContext.idl: Added.
+
+ * SharedScript/SharedScriptController.h:
+ Added. Empty implementation of a ScriptController, will come later as part of bindings. Needed to compile.
+
+ * SharedScript/WebKitSharedScript.cpp: Added. EventTarget-based DOM object.
+ (WebCore::WebKitSharedScript::WebKitSharedScript):
+ (WebCore::WebKitSharedScript::~WebKitSharedScript):
+ (WebCore::WebKitSharedScript::setContext):
+ (WebCore::LoadEventTask::create): Fires asynchronous 'load' event when underlying SharedScriptContext is initialized.
+ (WebCore::LoadEventTask::performTask):
+ (WebCore::LoadEventTask::LoadEventTask):
+ (WebCore::WebKitSharedScript::scheduleLoadEvent):
+ * SharedScript/WebKitSharedScript.h: Added.
+ (WebCore::WebKitSharedScript::create):
+ (WebCore::WebKitSharedScript::scriptExecutionContext):
+ (WebCore::WebKitSharedScript::toWebKitSharedScript):
+ (WebCore::WebKitSharedScript::context):
+ (WebCore::WebKitSharedScript::refEventTarget):
+ (WebCore::WebKitSharedScript::derefEventTarget):
+ (WebCore::WebKitSharedScript::eventTargetData):
+ (WebCore::WebKitSharedScript::ensureEventTargetData):
+ * SharedScript/WebKitSharedScript.idl: Added.
+
+ * SharedScript/WebKitSharedScriptRepository.cpp: Added. Implements a list of running SharedScriptContexts.
+ (WebCore::ScriptLoader::ScriptLoader): The helper class to load an initial script of SharedScriptContext.
+ (WebCore::ScriptLoader::load):
+ (WebCore::ScriptLoader::notifyFinished):
+ (WebCore::WebKitSharedScriptRepository::instance): Repository has a static global instance.
+ (WebCore::WebKitSharedScriptRepository::connect):
+ (WebCore::WebKitSharedScriptRepository::documentDetached): Called from Document::detach().
+ (WebCore::WebKitSharedScriptRepository::removeSharedScriptContext): Called from ~SharedScriptContext().
+ (WebCore::WebKitSharedScriptRepository::connectToSharedScript):
+ (WebCore::WebKitSharedScriptRepository::getSharedScriptContext):
+ * SharedScript/WebKitSharedScriptRepository.h: Added.
+ (WebCore::WebKitSharedScriptRepository::WebKitSharedScriptRepository):
+
+2009-11-24 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit
+ https://bugs.webkit.org/show_bug.cgi?id=31444
+
+ * Configurations/FeatureDefines.xcconfig:
+ * GNUmakefile.am:
+ * WebCore.pro:
+
+2009-11-24 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Implement accelerated compositing
+ https://bugs.webkit.org/show_bug.cgi?id=27314
+
+ This part of the checkin adds the Windows specific GraphicsLayer support files.
+ It provides the interface between GraphicsLayer and CACF. It also deals with
+ the compositing loop, and provides the plumbing to pass the root layer up to
+ WebView.
+
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::syncCompositingStateRecursive):
+ * platform/graphics/GraphicsLayer.cpp:
+ (WebCore::GraphicsLayer::GraphicsLayer):
+ * platform/graphics/GraphicsLayer.h:
+ * platform/graphics/win/GraphicsLayerCACF.cpp: Added.
+ * platform/graphics/win/GraphicsLayerCACF.h: Added.
+ * platform/graphics/win/WKCACFContextFlusher.cpp: Added.
+ * platform/graphics/win/WKCACFContextFlusher.h: Added.
+ * platform/graphics/win/WKCACFContextFlusherWin.cpp: Added.
+ * platform/graphics/win/WKCACFLayer.cpp: Added.
+ * platform/graphics/win/WKCACFLayer.h: Added.
+ * platform/graphics/win/WKCACFLayerWindow.cpp: Added.
+ * platform/graphics/win/WKCACFLayerWindow.h: Added.
+
+2009-11-24 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Do error checking of parameter to createShader
+ https://bugs.webkit.org/show_bug.cgi?id=31808
+
+ Test: fast/canvas/webgl/invalidPassedParams.html
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::createShader):
+ * html/canvas/WebGLRenderingContext.h:
+ * html/canvas/WebGLRenderingContext.idl:
+
+2009-11-24 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [Chromium] Ignore line-height CSS property specified to a search field on
+ Windows and Linux.
+ https://bugs.webkit.org/show_bug.cgi?id=31820
+
+ LayoutTests/fast/forms/control-restrict-line-height.html checks that the
+ following controls should ignore line-height CSS property.
+ - <select>
+ - <input type=button>
+ - <input type=search>
+ This change addresses the <input type=search> issue with Chromium/Windows
+ and Chromium/Linux.
+
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::adjustSearchFieldStyle): Implement this to ignore line-height.
+ * rendering/RenderThemeChromiumSkia.h: Declare adjustSearchFieldStyle().
+
+2009-11-24 Simon Fraser <simon.fraser@apple.com>
+
+ No review.
+
+ Stylistic fix: indent the member var initialisation.
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::GraphicsLayerCA):
+
+2009-11-24 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Bug 31848 - Remove uses of mainThreadCurrentWorld, and of currentWorld using a globalData.
+
+ These methods get the world from the global data rather than from an execstate.
+ If the current world is always read from an exec state then it can be read
+ from the global object, and world entry can become automagical, rather than
+ being explicitly set by an EnterDOMWrapperWorld.
+
+ * bindings/js/JSCSSRuleCustom.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSCSSValueCustom.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::currentWorld):
+ (WebCore::DOMObjectWrapperMapFor):
+ (WebCore::hasCachedDOMObjectWrapper):
+ (WebCore::getCachedDOMObjectWrapper):
+ (WebCore::cacheDOMObjectWrapper):
+ (WebCore::hasCachedDOMNodeWrapper):
+ (WebCore::getCachedDOMNodeWrapper):
+ (WebCore::cacheDOMNodeWrapper):
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::createDOMObjectWrapper):
+ (WebCore::getDOMObjectWrapper):
+ (WebCore::createDOMNodeWrapper):
+ (WebCore::getDOMNodeWrapper):
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::history):
+ (WebCore::JSDOMWindow::location):
+ * bindings/js/JSDocumentCustom.cpp:
+ (WebCore::JSDocument::location):
+ (WebCore::toJS):
+ * bindings/js/JSElementCustom.cpp:
+ (WebCore::toJSNewlyCreated):
+ * bindings/js/JSEventCustom.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSHTMLCollectionCustom.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSImageDataCustom.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::markChildren):
+ (WebCore::createWrapper):
+ (WebCore::toJS):
+ * bindings/js/JSSVGPathSegCustom.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSStyleSheetCustom.cpp:
+ (WebCore::toJS):
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::dropProtection):
+
+2009-11-24 Alexey Proskuryakov <ap@apple.com>
+
+ Windows build fix.
+
+ * platform/network/cf/SocketStreamHandleCFNet.cpp: Also, don't include the wrong one!
+
+2009-11-24 Alexey Proskuryakov <ap@apple.com>
+
+ Windows build fix.
+
+ * platform/network/cf/SocketStreamHandleCFNet.cpp: Include the proper WKSI header.
+
+2009-11-24 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ SVGUseElement::toClipPath can crash
+ <rdar://problem/7385270>
+
+ Null-test m_shadowTreeRootElement again, because the call to buildPendingResource() may not
+ actually initialize it.
+
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::toClipPath):
+
+2009-11-24 Simon Fraser <simon.fraser@apple.com>
+
+ Windows build fix.
+
+ * page/win/FrameCGWin.cpp:
+ (WebCore::imageFromRect):
+ (WebCore::imageFromSelection):
+
+2009-11-24 Eric Carlson <eric.carlson@apple.com>
+
+ Not reviewed. Revert r51351 until a new WebKitSupportLibrary is available.
+
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
+ * platform/graphics/win/QTMovieWin.cpp:
+ * platform/graphics/win/QTMovieWin.h:
+ * rendering/RenderMediaControls.cpp:
+ * rendering/RenderThemeWin.cpp:
+ * rendering/RenderThemeWin.h:
+
+2009-11-24 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31844
+ SocketStreamHandleCFNet should support CONNECT proxy credentials
+
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/network/CredentialStorage.h:
+ * platform/network/mac/CredentialStorageMac.mm: Added.
+ (WebCore::CredentialStorage::getFromPersistentStorage):
+ * platform/network/cf/CredentialStorageCFNet.cpp: Added.
+ (WebCore::CredentialStorage::getFromPersistentStorage):
+ Add support for fetching credentials from persistent storage (CFNet version is currently
+ a stub).
+
+ * bindings/js/JSWebSocketCustom.cpp: Removed an unneeded include.
+
+ * platform/network/cf/SocketStreamHandle.h:
+ * platform/network/cf/SocketStreamHandleCFNet.cpp:
+ (WebCore::SocketStreamHandle::SocketStreamHandle):
+ (WebCore::SocketStreamHandle::createStreams):
+ (WebCore::getStoredCONNECTProxyCredentials):
+ (WebCore::authenticationSchemeFromAuthenticationMethod):
+ (WebCore::SocketStreamHandle::addCONNECTCredentials):
+ (WebCore::SocketStreamHandle::readStreamCallback):
+ Check if connection attempt was resulted in 407, and try stored credentials if it did.
+
+ * platform/mac/WebCoreSystemInterface.h:
+ * platform/mac/WebCoreSystemInterface.mm:
+ * WebCore.base.exp:
+ Updated WKSI.
+
+2009-11-24 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Find highlight is drawn incorrectly on pages with compositing layers
+ <rdar://problem/7413925>
+
+ Part 2: Add a new bit to the PaintBehavior flags, PaintBehaviorFlattenCompositingLayers,
+ and pass that down when painting into an image.
+
+ When set, it forces painting of compositing layers to go down a software paint path
+ when all layers are painted, irrespective of compositing status, and where
+ 3d transforms are flattened to 2d. When doing this, we also need to use temporary
+ clip rects for layers which are normally composited.
+
+ * page/FrameView.h:
+ (WebCore::FrameView::paintBehavior):
+ * page/mac/FrameMac.mm:
+ (WebCore::Frame::imageFromRect):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::renderableTransform):
+ (WebCore::expandClipRectForDescendantsAndReflection):
+ (WebCore::transparencyClipBox):
+ (WebCore::RenderLayer::beginTransparencyLayers):
+ (WebCore::RenderLayer::paintLayer):
+ * rendering/RenderLayer.h:
+ (WebCore::RenderLayer::paintsWithTransparency):
+ (WebCore::RenderLayer::paintsWithTransform):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::calculateCompositedBounds):
+ * rendering/RenderObject.h:
+
+2009-11-24 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Find highlight is drawn incorrectly on pages with compositing layers
+ <rdar://problem/7413925>
+
+ Part 1: Rename PaintRestriction to PaintBehavior, and make it a bitmask, in
+ preparation for adding a new flag related to painting into an image.
+
+ PaintBehaviorSelectionOnly and PaintBehaviorForceBlackText are now separate flags.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::reset):
+ (WebCore::FrameView::paintContents):
+ (WebCore::FrameView::setPaintBehavior):
+ * page/FrameView.h:
+ * page/mac/FrameMac.mm:
+ (WebCore::Frame::selectionImage):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::paint):
+ (WebCore::RenderLayer::paintLayer):
+ * rendering/RenderLayer.h:
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::paintIntoLayer):
+ (WebCore::RenderLayerBacking::paintContents):
+ * rendering/RenderLayerBacking.h:
+ * rendering/RenderObject.h:
+ * rendering/RenderReplica.cpp:
+ (WebCore::RenderReplica::paint):
+
+2009-11-24 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7409331> Windows: Support closed caption in <video> element
+
+ Enable closed captions in QuickTime/Windows media engine.
+
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+ (WebCore::MediaPlayerPrivate::hasClosedCaptions):
+ (WebCore::MediaPlayerPrivate::setClosedCaptionsVisible):
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
+ * platform/graphics/win/QTMovieWin.cpp:
+ (QTMovieWin::hasClosedCaptions):
+ (QTMovieWin::setClosedCaptionsVisible):
+ * platform/graphics/win/QTMovieWin.h:
+ * rendering/RenderMediaControls.cpp:
+ (WebCore::RenderMediaControls::paintMediaControlsPart):
+ * rendering/RenderThemeWin.cpp:
+ (WebCore::RenderThemeWin::paintMediaToggleClosedCaptionsButton):
+ * rendering/RenderThemeWin.h:
+
+2009-11-24 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [Chromium] Renderer hang when using www.expedia.com
+ https://bugs.webkit.org/show_bug.cgi?id=31822
+
+ Test: http/tests/cache/subresource-failover-to-network.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadResourceSynchronously): Use the originalRequest
+ when inheriting cache policy. This matches SubresourceLoader::create.
+
+2009-11-23 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Oliver Hunt.
+
+ Change get... calls to latest spec
+ https://bugs.webkit.org/show_bug.cgi?id=30091
+
+ Removed old versions of get calls on WebGLRenderingContext and
+ added new ones per spec returning "any". New code simplifies
+ GraphicsContext3D and fixes previously unimplemented routines.
+ Added custom JS and V8 bindings. Added exhaustive test case
+ exercising all new code paths. Updated preexisting test cases for
+ new APIs. Fixed preexisting bugs in WebKit's and Chrome's WebGL
+ implementations.
+
+ Ran WebGL layout tests in WebKit (clean) and Chrome (couple of
+ preexisting known failures) and manual WebGL tests in both
+ browsers.
+
+ Test: fast/canvas/webgl/gl-object-get-calls.html
+
+ * WebCore.gypi:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSWebGLRenderingContextCustom.cpp:
+ (WebCore::toJS):
+ (WebCore::):
+ (WebCore::getObjectParameter):
+ (WebCore::getProgramParameterHelper):
+ (WebCore::JSWebGLRenderingContext::getBufferParameter):
+ (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
+ (WebCore::JSWebGLRenderingContext::getParameter):
+ (WebCore::JSWebGLRenderingContext::getProgramParameter):
+ (WebCore::JSWebGLRenderingContext::getRenderbufferParameter):
+ (WebCore::JSWebGLRenderingContext::getShaderParameter):
+ (WebCore::JSWebGLRenderingContext::getTexParameter):
+ (WebCore::JSWebGLRenderingContext::getUniform):
+ (WebCore::JSWebGLRenderingContext::getVertexAttrib):
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
+ (WebCore::toV8):
+ (WebCore::):
+ (WebCore::getObjectParameter):
+ (WebCore::getProgramParameter):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * html/canvas/CanvasObject.cpp:
+ (WebCore::CanvasObject::CanvasObject):
+ (WebCore::CanvasObject::setObject):
+ (WebCore::CanvasObject::deleteObject):
+ * html/canvas/CanvasObject.h:
+ * html/canvas/WebGLBuffer.cpp:
+ (WebCore::WebGLBuffer::create):
+ (WebCore::WebGLBuffer::WebGLBuffer):
+ * html/canvas/WebGLBuffer.h:
+ * html/canvas/WebGLGetInfo.cpp: Added.
+ (WebCore::WebGLGetInfo::WebGLGetInfo):
+ (WebCore::WebGLGetInfo::~WebGLGetInfo):
+ (WebCore::WebGLGetInfo::getType):
+ (WebCore::WebGLGetInfo::getBool):
+ (WebCore::WebGLGetInfo::getFloat):
+ (WebCore::WebGLGetInfo::getLong):
+ (WebCore::WebGLGetInfo::getString):
+ (WebCore::WebGLGetInfo::getUnsignedLong):
+ (WebCore::WebGLGetInfo::getWebGLBuffer):
+ (WebCore::WebGLGetInfo::getWebGLFloatArray):
+ (WebCore::WebGLGetInfo::getWebGLFramebuffer):
+ (WebCore::WebGLGetInfo::getWebGLIntArray):
+ (WebCore::WebGLGetInfo::getWebGLProgram):
+ (WebCore::WebGLGetInfo::getWebGLRenderbuffer):
+ (WebCore::WebGLGetInfo::getWebGLTexture):
+ (WebCore::WebGLGetInfo::getWebGLUnsignedByteArray):
+ * html/canvas/WebGLGetInfo.h: Added.
+ (WebCore::WebGLGetInfo::):
+ * html/canvas/WebGLRenderbuffer.cpp:
+ (WebCore::WebGLRenderbuffer::create):
+ (WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
+ * html/canvas/WebGLRenderbuffer.h:
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLStateRestorer::WebGLStateRestorer):
+ (WebCore::WebGLStateRestorer::~WebGLStateRestorer):
+ (WebCore::WebGLRenderingContext::WebGLRenderingContext):
+ (WebCore::WebGLRenderingContext::activeTexture):
+ (WebCore::WebGLRenderingContext::bindBuffer):
+ (WebCore::WebGLRenderingContext::bindFramebuffer):
+ (WebCore::WebGLRenderingContext::bindRenderbuffer):
+ (WebCore::WebGLRenderingContext::bindTexture):
+ (WebCore::WebGLRenderingContext::getBufferParameter):
+ (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
+ (WebCore::WebGLRenderingContext::getParameter):
+ (WebCore::WebGLRenderingContext::getProgramParameter):
+ (WebCore::WebGLRenderingContext::getProgramInfoLog):
+ (WebCore::WebGLRenderingContext::getRenderbufferParameter):
+ (WebCore::WebGLRenderingContext::getShaderParameter):
+ (WebCore::WebGLRenderingContext::getShaderInfoLog):
+ (WebCore::WebGLRenderingContext::getShaderSource):
+ (WebCore::WebGLRenderingContext::getString):
+ (WebCore::WebGLRenderingContext::getTexParameter):
+ (WebCore::WebGLRenderingContext::getUniform):
+ (WebCore::WebGLRenderingContext::getVertexAttrib):
+ (WebCore::WebGLRenderingContext::useProgram):
+ (WebCore::WebGLRenderingContext::getBooleanParameter):
+ (WebCore::WebGLRenderingContext::getFloatParameter):
+ (WebCore::WebGLRenderingContext::getIntParameter):
+ (WebCore::WebGLRenderingContext::getLongParameter):
+ (WebCore::WebGLRenderingContext::getUnsignedLongParameter):
+ (WebCore::WebGLRenderingContext::getWebGLFloatArrayParameter):
+ (WebCore::WebGLRenderingContext::getWebGLIntArrayParameter):
+ (WebCore::WebGLRenderingContext::getWebGLUnsignedByteArrayParameter):
+ * html/canvas/WebGLRenderingContext.h:
+ * html/canvas/WebGLRenderingContext.idl:
+ * html/canvas/WebGLTexture.cpp:
+ (WebCore::WebGLTexture::create):
+ (WebCore::WebGLTexture::WebGLTexture):
+ * html/canvas/WebGLTexture.h:
+ * manual-tests/webgl/resources/utils3d.js:
+ (initWebGL):
+ (loadShader):
+ (Framerate.prototype.snapshot):
+ * platform/graphics/GraphicsContext3D.h:
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::bindRenderbuffer):
+ (WebCore::GraphicsContext3D::getBooleanv):
+ (WebCore::GraphicsContext3D::getBufferParameteriv):
+ (WebCore::GraphicsContext3D::getFloatv):
+ (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
+ (WebCore::GraphicsContext3D::getIntegerv):
+ (WebCore::GraphicsContext3D::getProgramiv):
+ (WebCore::GraphicsContext3D::getRenderbufferParameteriv):
+ (WebCore::GraphicsContext3D::getShaderiv):
+ (WebCore::GraphicsContext3D::getTexParameterfv):
+ (WebCore::GraphicsContext3D::getTexParameteriv):
+ (WebCore::GraphicsContext3D::getUniformfv):
+ (WebCore::GraphicsContext3D::getUniformiv):
+ (WebCore::GraphicsContext3D::getVertexAttribfv):
+ (WebCore::GraphicsContext3D::getVertexAttribiv):
+
+2009-11-24 Steve Falkenburg <sfalken@apple.com>
+
+ Windows build fix.
+
+ * WebCore.vcproj/QTMovieWin.vcproj: Add additional search path for QuickTime SDK.
+
+2009-11-24 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [Gtk] GStreamer-CRITICAL's (and other warnings) on <video>
+ https://bugs.webkit.org/show_bug.cgi?id=26354
+
+ Implemented MediaPlayerPrivate::isAvailable by checking the
+ presence of the playbin2 GStreamer element.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::isAvailable):
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+
+2009-11-24 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25415
+ [GTK][ATK] Please implement support for get_text_at_offset
+
+ When building up the pango layout from text boxes, only append a
+ newline char after verifying there are no more boxes on this line.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (getPangoLayoutForAtk):
+
+2009-11-24 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Keyboard Shortcut to Clear Console Messages
+ https://bugs.webkit.org/show_bug.cgi?id=31780
+
+ All Platforms: Ctrl+L = Clear Console Messages
+ Mac Only: Cmd+K = Clear Console Messages
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView): create shortcuts
+ (WebInspector.ConsoleView.prototype._promptKeyDown): handle shortcuts
+ * inspector/front-end/KeyboardShortcut.js:
+ (WebInspector.KeyboardShortcut.makeKey): convenience conversion of "a-z" character to keyCode
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel): style fixes for keyboard shortcuts
+
+2009-11-24 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed: touch inspector controller in order to
+ kick win bot inspector deploy. rs=aroben.
+
+ * inspector/InspectorController.cpp:
+
+2009-11-23 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Implement expandable compartments on timeline panel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31796
+
+ * inspector/front-end/TimelineOverviewPane.js:
+ (WebInspector.TimelineOverviewPane.prototype._setWindowPosition):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel):
+ (WebInspector.TimelinePanel.prototype.addRecordToTimeline):
+ (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
+ (WebInspector.TimelinePanel.prototype._formatRecord):
+ (WebInspector.TimelinePanel.prototype._refreshRecords):
+ (WebInspector.TimelinePanel.prototype._addToRecordsWindow):
+ (WebInspector.TimelineRecordListRow):
+ (WebInspector.TimelineRecordListRow.prototype.update):
+ (WebInspector.TimelineRecordListRow.prototype.dispose):
+ (WebInspector.TimelineRecordGraphRow):
+ (WebInspector.TimelineRecordGraphRow.prototype.update):
+ (WebInspector.TimelineRecordGraphRow.prototype._onClick):
+ (WebInspector.TimelineRecordGraphRow.prototype.dispose):
+ * inspector/front-end/inspector.css:
+
+2009-11-24 Mark Rowe <mrowe@apple.com>
+
+ Fix production builds where the source tree may be read-only.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-11-23 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Include "config.h" to meet Coding Style Guidelines
+ https://bugs.webkit.org/show_bug.cgi?id=31792
+
+ No new tests as there is no new functionality.
+
+ * platform/graphics/win/IntPointWin.cpp:
+ * platform/graphics/win/IntRectWin.cpp:
+ * platform/graphics/win/IntSizeWin.cpp:
+ * platform/network/chromium/ResourceRequest.cpp:
+ * platform/win/PlatformMouseEventWin.cpp:
+
+2009-11-23 Jian Li <jianli@chromium.org>
+
+ Reviewed by NOBODY (Chromium build fix).
+
+ * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * platform/graphics/GraphicsContext3D.h:
+
+2009-11-23 Aaron Golden <agolden@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Prevent ResourceHandleMac's version of ResourceHandle::receivedCredential from stripping
+ identity and certificate information from a WebCore::Credential when receivedCredential
+ needs to modify the credential's persistence.
+
+ Adding a new constructor Credential(const Credential& original, CredentialPersistence)
+ that copies every field from original except for persistence.
+
+ * platform/network/Credential.cpp:
+ (WebCore::Credential::Credential):
+ * platform/network/Credential.h:
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::receivedCredential):
+
+2009-11-23 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Part 2/3 of <rdar://problem/7377477> REGRESSION: Many web pages fail to render after interesting script runs in isolated world
+
+ Some clients of the JavaScriptCore API expect to be able to make callbacks over the JSC API,
+ and for this to automagically cause execution to take place in the world associated with the
+ global object associated with the ExecState (JSContextRef) passed. However this is not how
+ things work - the world must be explicitly set within WebCore.
+
+ Making this work just for API calls to evaluate & call will be a far from perfect solution,
+ since direct (non-API) use of JSC still relies on WebCore setting the current world correctly.
+ A better solution would be to make this all work automagically all throughout WebCore, but this
+ will require more refactoring.
+
+ Add references from the JSDOMWindowShell and the JSDOMGlobalObject to the world that owns them,
+ so that we can get to the world from the lexical global object of an ExecState. In the long-term
+ we should switch over to using this approach for all cases we want to get a world from an exec state.
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::WebCoreJSClientData::beginningExecution):
+ (WebCore::WebCoreJSClientData::completedExecution):
+ * bindings/js/JSDOMBinding.h:
+ * bindings/js/JSDOMGlobalObject.h:
+ (WebCore::JSDOMGlobalObject::world):
+ (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData):
+ * bindings/js/JSDOMWindowBase.h:
+ * bindings/js/JSDOMWindowShell.cpp:
+ (WebCore::JSDOMWindowShell::JSDOMWindowShell):
+ * bindings/js/JSDOMWindowShell.h:
+ (WebCore::JSDOMWindowShell::world):
+ * bindings/js/JSWorkerContextBase.cpp:
+ (WebCore::JSWorkerContextBase::JSWorkerContextBase):
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::initScript):
+
+2009-11-23 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Add range checks to rendering calls in WebGL
+ https://bugs.webkit.org/show_bug.cgi?id=31239
+
+ I am now tracking the size of the data in each CanvasBuffer object
+ and keeping track of the buffer size of each active vertex attrib.
+ In drawArrays and drawElements I make sure no attempt is made to
+ access elements outside the valid buffer ranges. The test at:
+
+ http://cs.helsinki.fi/u/ilmarihe/c3d/functions/drawArraysOutOfBounds.html
+
+ no longer crashes.
+
+ I also added all the WebGL enumerations to GraphicsContext3D to use them in the validation checks
+
+ Tests: fast/canvas/webgl/drawArraysOutOfBounds.html
+ fast/canvas/webgl/drawElementssOutOfBounds.html
+
+ * bindings/js/JSWebGLArrayCustom.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSWebGLRenderingContextCustom.cpp:
+ (WebCore::JSWebGLRenderingContext::bufferData):
+ (WebCore::JSWebGLRenderingContext::bufferSubData):
+ (WebCore::JSWebGLRenderingContext::texSubImage2D):
+ * html/canvas/WebGLArrayBuffer.cpp:
+ (WebCore::WebGLArrayBuffer::create):
+ (WebCore::WebGLArrayBuffer::data):
+ * html/canvas/WebGLArrayBuffer.h:
+ * html/canvas/WebGLBuffer.cpp:
+ (WebCore::WebGLBuffer::WebGLBuffer):
+ (WebCore::WebGLBuffer::associateBufferData):
+ (WebCore::WebGLBuffer::associateBufferSubData):
+ (WebCore::WebGLBuffer::byteLength):
+ * html/canvas/WebGLBuffer.h:
+ (WebCore::WebGLBuffer::elementArrayBuffer):
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::WebGLRenderingContext):
+ (WebCore::WebGLRenderingContext::sizeInBytes):
+ (WebCore::WebGLRenderingContext::bindBuffer):
+ (WebCore::WebGLRenderingContext::bufferData):
+ (WebCore::WebGLRenderingContext::bufferSubData):
+ (WebCore::WebGLRenderingContext::createShader):
+ (WebCore::WebGLRenderingContext::disableVertexAttribArray):
+ (WebCore::WebGLRenderingContext::validateIndexArray):
+ (WebCore::WebGLRenderingContext::validateRenderingState):
+ (WebCore::WebGLRenderingContext::drawArrays):
+ (WebCore::WebGLRenderingContext::drawElements):
+ (WebCore::WebGLRenderingContext::enableVertexAttribArray):
+ (WebCore::WebGLRenderingContext::isFramebuffer):
+ (WebCore::WebGLRenderingContext::isProgram):
+ (WebCore::WebGLRenderingContext::isRenderbuffer):
+ (WebCore::WebGLRenderingContext::isShader):
+ (WebCore::WebGLRenderingContext::isTexture):
+ (WebCore::WebGLRenderingContext::useProgram):
+ (WebCore::WebGLRenderingContext::validateProgram):
+ (WebCore::WebGLRenderingContext::vertexAttribPointer):
+ (WebCore::WebGLRenderingContext::detachAndRemoveAllObjects):
+ * html/canvas/WebGLRenderingContext.h:
+ (WebCore::WebGLRenderingContext::VertexAttribState::VertexAttribState):
+ * html/canvas/WebGLRenderingContext.idl:
+ * html/canvas/WebGLShader.cpp:
+ (WebCore::WebGLShader::create):
+ (WebCore::WebGLShader::WebGLShader):
+ * html/canvas/WebGLShader.h:
+ * platform/graphics/GraphicsContext3D.h:
+ (WebCore::GraphicsContext3D::):
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::createShader):
+
+2009-11-23 Erik Arvidsson <arv@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ JSC bindings for HasIndexGetter generates incorrect code (affects
+ MediaList and CSSStyleDeclaration).
+ This cleans up the edge cases for indexing out of range for style and
+ computed style objects to return an empty string according to the spec.
+ MediaList now returns null when indexed out of range.
+ https://bugs.webkit.org/show_bug.cgi?id=31683
+
+ Tests: fast/dom/CSSStyleDeclaration/css-computed-style-item.html
+ fast/dom/CSSStyleDeclaration/css-style-item.html
+ fast/dom/StyleSheet/css-medialist-item.html
+
+ * bindings/scripts/CodeGeneratorJS.pm: If IndexGetterReturnsString then
+ we do not check the length before calling the item function.
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::item):
+ * css/CSSMutableStyleDeclaration.cpp:
+ (WebCore::CSSMutableStyleDeclaration::item):
+ * css/CSSStyleDeclaration.idl:
+
+2009-11-23 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ DocumentMarkers need to be educated about transforms
+ https://bugs.webkit.org/show_bug.cgi?id=31751
+
+ Find highlight is incorrect with transforms
+ <rdar://problem/6358394>
+
+ Allow callers to specify that Frame::selectionTextRects() takes transforms into account
+ when computing the set of rects that encompass a selection. For transformed elemenets, the
+ selection rect will be the bounding box of the selected content.
+
+ Fix DocumentMarkers to cache rects in absolute coordinates, rather than painting coordinates.
+
+ Test: editing/selection/transformed-selection-rects.html
+
+ * WebCore.base.exp:
+ Frame::selectionTextRects() has a new parameter.
+
+ * dom/Document.cpp:
+ (WebCore::Document::setRenderedRectForMarker):
+ * dom/Document.h:
+ Pass the marker as a const reference.
+
+ * dom/Range.h:
+ * dom/Range.cpp:
+ (WebCore::Range::textQuads):
+ Add a new method, textQuads(), which returns a list of quads, respecting transforms.
+
+ * page/Frame.h:
+ * page/Frame.cpp:
+ (WebCore::Frame::selectionTextRects):
+ Add a new parameter, respectTransforms, and when that is RespectTransforms, use the quad
+ method to get quads for ranges, and then take their bounding boxes.
+
+ * rendering/InlineTextBox.h:
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
+ (WebCore::InlineTextBox::paintTextMatchMarker):
+ (WebCore::InlineTextBox::computeRectForReplacementMarker):
+ (WebCore::InlineTextBox::paintDocumentMarkers):
+ (WebCore::InlineTextBox::textPos):
+ (WebCore::InlineTextBox::offsetForPosition):
+
+ Pass DocumentMarkers as a const references.
+ Convert the argument to setRenderedRectForMarker() into absolute coordinates.
+
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::selectionBounds):
+
+2009-11-23 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ [Cairo] support blurred test-shadow
+ [https://bugs.webkit.org/show_bug.cgi?id=31797]
+
+ Support for blurred text-shadows on Cairo. This patch
+ reuses the code of blurred box-shadows, introduced in
+ bug 26102. For a full textshadow support, a filters enabled
+ build is needed.
+
+ * platform/graphics/cairo/FontCairo.cpp:
+ (WebCore::Font::drawGlyphs):
+
+2009-11-23 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Geoffrey Garen.
+
+ Change incorrect calls to the constructor "EventNames()" to the correct accessor
+ "eventNames()". This saves ~100 AtomicString lookups each time.
+ https://bugs.webkit.org/show_bug.cgi?id=31811
+
+ * dom/EventNames.h: Make constructor private to prevent this from happening again.
+ * history/CachedFrame.cpp:
+ (WebCore::CachedFrameBase::restore): EventNames() --> eventNames()
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::checkValidity): EventNames() --> eventNames()
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::stopLoading): EventNames() --> eventNames()
+ (WebCore::FrameLoader::pageHidden): EventNames() --> eventNames()
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): EventNames() --> eventNames()
+
+2009-11-23 Adam Langley <agl@google.com>
+
+ Reviewed by Dmitry Titov.
+
+ Chromium Linux: Limit the stroke width and mitre limit.
+
+ Limit the stroke width and mitre limit that we'll pass into Skia to
+ avoid overflowing Skia's uint16_t glyph widths.
+
+ http://code.google.com/p/chromium/issues/detail?id=28250
+ https://bugs.webkit.org/show_bug.cgi?id=31747
+
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (scalarBound):
+ (PlatformContextSkia::setupPaintForStroking):
+
+2009-11-23 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31812
+ WebSocket code uses RefPtr::get() where it shouldn't
+
+ No change in funcitonality, just coding style correction.
+
+ * websockets/WebSocket.cpp:
+ (WebCore::WebSocket::~WebSocket):
+ * websockets/WebSocketChannel.cpp:
+ (WebCore::WebSocketChannel::connect):
+ (WebCore::WebSocketChannel::send):
+ (WebCore::WebSocketChannel::bufferedAmount):
+ (WebCore::WebSocketChannel::close):
+ (WebCore::WebSocketChannel::disconnect):
+ (WebCore::WebSocketChannel::didOpen):
+ (WebCore::WebSocketChannel::didClose):
+ (WebCore::WebSocketChannel::didReceiveData):
+ (WebCore::WebSocketChannel::didFail):
+
+2009-11-23 Alexey Proskuryakov <ap@apple.com>
+
+ Build fix.
+
+ * platform/network/cf/SocketStreamHandleCFNet.cpp:
+ (WebCore::SocketStreamHandle::pacExecutionCallbackMainThread): pacExecutionCallbackMainThread
+ is static, so it can't use member variables directly.
+
+2009-11-23 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31748
+ Make WebSocketHandleCFNet respect proxy auto-configuration files via CFProxySupport
+
+ * platform/network/cf/SocketStreamHandle.h: Removed names from some void* arguments, since
+ they didn't carry useful information.
+
+ * platform/network/cf/SocketStreamHandleCFNet.cpp:
+ (WebCore::SocketStreamHandle::SocketStreamHandle): When we need an http-style URL, we actually
+ always need https.
+ (WebCore::SocketStreamHandle::scheduleStreams): Factored out from constructor, since streams
+ only get scheduled after PAC is fetched and executed asynchronously.
+ (WebCore::SocketStreamHandle::copyPACExecutionDescription): Return a description for event
+ source.
+ (WebCore::MainThreadPACCallbackInfo::MainThreadPACCallbackInfo): Forward callback to main thread.
+ (WebCore::SocketStreamHandle::pacExecutionCallback): Ditto.
+ (WebCore::SocketStreamHandle::pacExecutionCallbackMainThread): Ditto. To avoid code duplication,
+ we make the call even on Mac.
+ (WebCore::SocketStreamHandle::executePACFileURL): Make an async call to CFNetworkExecuteProxyAutoConfigurationURL.
+ (WebCore::SocketStreamHandle::removePACRunLoopSource): Once PAC execution is done or aborted,
+ we need to get rid of the event source.
+ (WebCore::SocketStreamHandle::chooseProxy): Use stored m_httpsURL.get.
+ (WebCore::SocketStreamHandle::chooseProxyFromArray): Factored out from chooseProxy - the
+ array may come directly from system configuration, or from PAC.
+ (WebCore::SocketStreamHandle::chooseProxy): Tiger version of this function is now completely
+ separate.
+ (WebCore::SocketStreamHandle::~SocketStreamHandle): Run loop source should be destroyed
+ before we get to the destructor.
+ (WebCore::SocketStreamHandle::platformClose): Destroy the run loop source, if PAC execution
+ is still in progress.
+
+2009-11-23 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Don't leak the CGImage we create when drawing a sub image.
+
+ * platform/graphics/cg/ImageCG.cpp:
+ (WebCore::BitmapImage::draw):
+
+2009-11-23 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Don't crash when OOM in creating isolated world
+ https://bugs.webkit.org/show_bug.cgi?id=31805
+
+ We need to add some more null checks to avoid crashing. No new tests
+ because we don't have a good way to test out-of-memory bugs.
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluateInIsolatedWorld):
+ (WebCore::V8Proxy::evaluateInNewContext):
+ (WebCore::V8Proxy::setInjectedScriptContextDebugId):
+ * bindings/v8/V8Proxy.h:
+
+2009-11-23 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ This is the implementation of the filterRes attribute. It
+ helps the SVG developer to set the quality of a filter by
+ giving the width or height of filter.
+ This patch also sets the filter resolution to lower values
+ if a intermediate ImageBuffer size is bigger than the given
+ maximal size.
+ The maximal size is set to 5000x5000 by default. This is a
+ subjectiv decission. Everthing greater than this values gets
+ sensible slower. Values of 10000x10000 crashed on WebKitGtk.
+ For mobil devices a maximum size of 100x100 or 200x200 seems
+ to be reasonable.
+ The important fact on filter resolution is, that the output
+ size is still the size given by the <filter> element.
+
+ Tests: svg/filters/big-sized-filter-2.svg
+ svg/filters/big-sized-filter.svg
+ svg/filters/filterRes.svg
+
+ * platform/graphics/FloatRect.cpp:
+ (WebCore::FloatRect::scale): Add the abbility to scale a rect by x and y.
+ * platform/graphics/FloatRect.h:
+ (WebCore::FloatRect::scale): Add the abbility to scale a rect by x and y.
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::createPlatformShadow): Use scaledSubRegion for
+ calculation.
+ * platform/graphics/filters/FEBlend.cpp:
+ (WebCore::FEBlend::apply): Use scaledSubRegion for effect intern calculations.
+ * platform/graphics/filters/FEColorMatrix.cpp:
+ (WebCore::FEColorMatrix::apply): Use scaledSubRegion for effect intern calculations.
+ * platform/graphics/filters/FEComponentTransfer.cpp:
+ (WebCore::FEComponentTransfer::apply): Use scaledSubRegion for effect intern
+ calculations.
+ * platform/graphics/filters/FEComposite.cpp:
+ (WebCore::FEComposite::apply): Use scaledSubRegion for effect intern calculations.
+ * platform/graphics/filters/FEGaussianBlur.cpp:
+ (WebCore::FEGaussianBlur::apply): Use scaledSubRegion for effect intern calculations.
+ * platform/graphics/filters/Filter.h: Add the abbility to change the quality
+ of a filter output.
+ (WebCore::Filter::filterResolution):
+ (WebCore::Filter::setFilterResolution):
+ (WebCore::Filter::calculateEffectSubRegion): Calculates the correct subRegion
+ as well as the scaledSubRegion. It also searches for the biggest effect size.
+ We have to change the filter resolution, if one intermediate ImageBuffer size
+ doesn't fit in the maximal image size.
+ * platform/graphics/filters/FilterEffect.cpp:
+ (WebCore::FilterEffect::calculateDrawingIntRect): Use scaledSubRegion to get
+ the right part of a previous effect result.
+ (WebCore::FilterEffect::calculateDrawingRect): Use scaledSubRegion to get
+ the right part of a previous effect result.
+ (WebCore::FilterEffect::getEffectContext): Use scaledSubRegion to create
+ a new intermediate ImageBuffer for the result of the current effect.
+ * platform/graphics/filters/FilterEffect.h:
+ (WebCore::FilterEffect::scaledSubRegion): The scaled subRegion of a the
+ filter effect.
+ (WebCore::FilterEffect::setScaledSubRegion):
+ (WebCore::FilterEffect::effectBoundaries): The original values of the
+ EffectElement for a second subRegion calculation.
+ (WebCore::FilterEffect::setEffectBoundaries):
+ * platform/graphics/filters/ImageBufferFilter.cpp:
+ (WebCore::ImageBufferFilter::ImageBufferFilter): Set the scale factor to one.
+ * platform/graphics/filters/ImageBufferFilter.h:
+ (WebCore::ImageBufferFilter::maxImageSize):
+ (WebCore::ImageBufferFilter::calculateEffectSubRegion):
+ * platform/graphics/filters/SourceAlpha.cpp:
+ (WebCore::SourceAlpha::calculateEffectRect): Use scaledSubRegion for effect
+ intern calculations.
+ * platform/graphics/filters/SourceGraphic.cpp:
+ (WebCore::SourceGraphic::calculateEffectRect): Use scaledSubRegion for effect
+ intern calculations.
+ * svg/SVGFilterElement.cpp:
+ (WebCore::SVGFilterElement::parseMappedAttribute): Parse filterRes attribute.
+ (WebCore::SVGFilterElement::buildFilter): Give SVGResourceFilter the current
+ filterResolution.
+ * svg/SVGFilterPrimitiveStandardAttributes.cpp:
+ (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes): Save
+ values to effectBoundaries of the filter effect
+ * svg/graphics/SVGResourceFilter.cpp:
+ (WebCore::SVGResourceFilter::SVGResourceFilter):
+ (WebCore::shouldProcessFilter): Return signal if a neccessary value is zero.
+ (WebCore::SVGResourceFilter::fitsInMaximumImageSize): Checks if the given size
+ fits into the maximal image size, modifys scale factors if not and return a
+ bool: fits.
+ (WebCore::SVGResourceFilter::prepareFilter): Scale the SourceImage to
+ filterResolution (given by FilterElement or calculated on to big image sizes).
+ Set the scale level to SVGFilter.
+ (WebCore::SVGResourceFilter::applyFilter): Don't apply filters if shouldProcessFilter
+ is wrong.
+ * svg/graphics/SVGResourceFilter.h:
+ (WebCore::SVGResourceFilter::setFilterResolution): FilterResolution of FilterElement.
+ (WebCore::SVGResourceFilter::setHasFilterResolution): Does FilterElement provides
+ a FilterResolution?
+ (WebCore::SVGResourceFilter::scaleX): Current scale factor for horizontal.
+ (WebCore::SVGResourceFilter::scaleY): Current scale factor for vertical.
+ * svg/graphics/filters/SVGFEDisplacementMap.cpp:
+ (WebCore::FEDisplacementMap::apply): Use scaledSubRegion for effect intern calculations.
+ Kernel values are scaled to current filter resolution too.
+ * svg/graphics/filters/SVGFEFlood.cpp:
+ (WebCore::FEFlood::apply): Use scaledSubRegion for effect intern calculations.
+ * svg/graphics/filters/SVGFEMerge.cpp:
+ (WebCore::FEMerge::apply): Use scaledSubRegion for effect intern calculations.
+ Kernel values are scaled to current filter resolution too.
+ * svg/graphics/filters/SVGFEMorphology.cpp:
+ (WebCore::FEMorphology::apply): Use scaledSubRegion for effect intern calculations.
+ Kernel values are scaled to current filter resolution too.
+ * svg/graphics/filters/SVGFEOffset.cpp:
+ (WebCore::FEOffset::apply): Use scaledSubRegion for effect intern calculations.
+ * svg/graphics/filters/SVGFETile.cpp:
+ (WebCore::FETile::apply): Use scaledSubRegion for effect intern calculations.
+ * svg/graphics/filters/SVGFilter.cpp:
+ (WebCore::SVGFilter::calculateEffectSubRegion): Calculate subRegion for LayoutTests,
+ scaledSubRegion according to the current filterResolution and get the maximal image size.
+ * svg/graphics/filters/SVGFilter.h:
+ (WebCore::SVGFilter::effectBoundingBoxMode): Original values of the FilterElement.
+ (WebCore::SVGFilter::filterRegion): Use virtual for clarification.
+ (WebCore::SVGFilter::sourceImageRect): Use virtual for clarification.
+ (WebCore::SVGFilter::maxImageSize): Get the maximal image size.
+
+2009-11-23 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Wrong runtime instance objects of wrapped QObjects may be used if
+ the wrapped object died before the gc removed the instance.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31681
+
+ Before using a cached instance, verify that its wrapped QObject is
+ still alive.
+
+ * bridge/qt/qt_instance.cpp:
+ (JSC::Bindings::QtInstance::getQtInstance):
+ * bridge/qt/qt_instance.h:
+ (JSC::Bindings::QtInstance::hashKey):
+
+2009-11-22 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ ARIA: support aria-flowto
+ https://bugs.webkit.org/show_bug.cgi?id=31762
+
+ Test: platform/mac/accessibility/aria-flowto.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::ariaOwnsElements):
+ (WebCore::AccessibilityObject::supportsARIAFlowTo):
+ (WebCore::AccessibilityObject::ariaFlowToElements):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::linkedUIElements):
+ (WebCore::AccessibilityRenderObject::supportsARIAFlowTo):
+ (WebCore::AccessibilityRenderObject::ariaFlowToElements):
+ * accessibility/AccessibilityRenderObject.h:
+ * html/HTMLAttributeNames.in:
+
+2009-11-22 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Build fix for WML enabled builds.
+ Adopt WebCore API changes.
+
+ * wml/WMLAElement.cpp:
+ (WebCore::WMLAElement::defaultEventHandler):
+ * wml/WMLInputElement.cpp:
+ (WebCore::WMLInputElement::defaultEventHandler):
+
+2009-11-22 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Introduce sidebar background on timeline panel in order
+ to prevent it from flickering on scroll.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31789
+
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel):
+ (WebInspector.TimelinePanel.prototype.setSidebarWidth):
+ (WebInspector.TimelinePanel.prototype._onScroll):
+ (WebInspector.TimelinePanel.prototype._scheduleRefresh):
+ * inspector/front-end/inspector.css:
+
+2009-11-22 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Reimplement TimelinePanel to make it fast:
+ - Extract grid and overview into separate files
+ - Make timeline create only divs for visible rows
+
+ https://bugs.webkit.org/show_bug.cgi?id=31784
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype.createInterface):
+ (WebInspector.AbstractTimelinePanel.prototype.refresh):
+ (WebInspector.AbstractTimelinePanel.prototype.set calculator):
+ * inspector/front-end/TimelineGrid.js: Added.
+ (WebInspector.TimelineGrid):
+ (WebInspector.TimelineGrid.prototype.get itemsGraphsElement):
+ (WebInspector.TimelineGrid.prototype.updateDividers):
+ (WebInspector.TimelineGrid.prototype.addEventDivider):
+ (WebInspector.TimelineGrid.prototype.setScrollAndDividerTop):
+ * inspector/front-end/TimelineOverviewPane.js: Added.
+ (WebInspector.TimelineOverviewPane):
+ (WebInspector.TimelineOverviewPane.prototype._onCheckboxClicked):
+ (WebInspector.TimelineOverviewPane.prototype.update):
+ (WebInspector.TimelineOverviewPane.prototype.setSidebarWidth):
+ (WebInspector.TimelineOverviewPane.prototype.updateMainViewWidth):
+ (WebInspector.TimelineOverviewPane.prototype.reset):
+ (WebInspector.TimelineOverviewPane.prototype._resizeWindow):
+ (WebInspector.TimelineOverviewPane.prototype._windowResizeDragging):
+ (WebInspector.TimelineOverviewPane.prototype._dragWindow):
+ (WebInspector.TimelineOverviewPane.prototype._windowDragging):
+ (WebInspector.TimelineOverviewPane.prototype._resizeWindowLeft):
+ (WebInspector.TimelineOverviewPane.prototype._resizeWindowRight):
+ (WebInspector.TimelineOverviewPane.prototype._setWindowPosition):
+ (WebInspector.TimelineOverviewPane.prototype._endWindowDragging):
+ (WebInspector.TimelineOverviewCalculator):
+ (WebInspector.TimelineOverviewCalculator.prototype.computeBarGraphPercentages):
+ (WebInspector.TimelineOverviewCalculator.prototype.reset):
+ (WebInspector.TimelineOverviewCalculator.prototype.updateBoundaries):
+ (WebInspector.TimelineOverviewCalculator.prototype.get boundarySpan):
+ (WebInspector.TimelineOverviewCalculator.prototype.formatValue):
+ (WebInspector.TimelineCategoryTreeElement):
+ (WebInspector.TimelineCategoryTreeElement.prototype.onattach):
+ (WebInspector.TimelineCategoryGraph):
+ (WebInspector.TimelineCategoryGraph.prototype.get graphElement):
+ (WebInspector.TimelineCategoryGraph.prototype.addChunk):
+ (WebInspector.TimelineCategoryGraph.prototype.clearChunks):
+ (WebInspector.TimelineCategoryGraph.prototype.set dimmed):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel):
+ (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
+ (WebInspector.TimelinePanel.prototype.addRecordToTimeline):
+ (WebInspector.TimelinePanel.prototype._formatRecord):
+ (WebInspector.TimelinePanel.prototype.setSidebarWidth):
+ (WebInspector.TimelinePanel.prototype.updateMainViewWidth):
+ (WebInspector.TimelinePanel.prototype.resize):
+ (WebInspector.TimelinePanel.prototype.reset):
+ (WebInspector.TimelinePanel.prototype.show):
+ (WebInspector.TimelinePanel.prototype._onScroll):
+ (WebInspector.TimelinePanel.prototype._scheduleRefresh):
+ (WebInspector.TimelinePanel.prototype._refresh):
+ (WebInspector.TimelinePanel.prototype._refreshRecords):
+ (WebInspector.TimelinePanel.prototype._adjustScrollPosition):
+ (WebInspector.TimelineCategory):
+ (WebInspector.TimelineCalculator):
+ (WebInspector.TimelineCalculator.prototype.get boundarySpan):
+ (WebInspector.TimelineRecordListRow):
+ (WebInspector.TimelineRecordListRow.prototype.update):
+ (WebInspector.TimelineRecordGraphRow):
+ (WebInspector.TimelineRecordGraphRow.prototype.update):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.html:
+
+2009-11-22 Chris Evans <cevans@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Disable access to file:/// directory listings
+ https://bugs.webkit.org/show_bug.cgi?id=31329
+
+ Deny access to directory listings. This needs doing in WebKit for
+ WebKit clients that do permit top-level navigation to file:///dir.
+ This matches Firefox, plus the existing Safari implementation (which
+ does not support any directory access at all). It will fix the
+ LayoutTest named below for Chromium.
+
+ Test: fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html
+
+ * page/SecurityOrigin.cpp: Deny access to directory listings.
+ (WebCore::SecurityOrigin::SecurityOrigin):
+ (WebCore::SecurityOrigin::canRequest):
+
+2009-11-20 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Support Ctrl+P and Ctrl+N, Readline keyboard shortcuts in the Console
+ https://bugs.webkit.org/show_bug.cgi?id=31400
+
+ Handle the following when on a Mac:
+
+ Ctrl+P = Previous (like Up arrow)
+ Ctrl+N = Next (like Down arrow)
+
+ No longer rerun autocompletion when just pushing a modifier key
+ like Control, Alt, Shift, or Meta.
+
+ Improved arrow key behavior with Multiline code in the Console, with the following behavior:
+
+ Up = Previous Command if on First Line (caret moves to the end of the first line)
+ otherwise default caret movement in text.
+ Down = Next Command if on Last Line (caret naturally moves to the end)
+ otherwise default caret movement in text.
+
+ * inspector/front-end/TextPrompt.js:
+ (WebInspector.TextPrompt.prototype.handleKeyEvent): handle new keyboard shortcuts
+ (WebInspector.TextPrompt.prototype.isCaretOnFirstLine): check if the caret is on the top line
+ (WebInspector.TextPrompt.prototype.isCaretOnLastLine): check if the caret is on the bottom line
+ (WebInspector.TextPrompt.prototype._upKeyPressed):
+ (WebInspector.TextPrompt.prototype._downKeyPressed):
+ (WebInspector.TextPrompt.prototype._moveBackInHistory):
+ (WebInspector.TextPrompt.prototype._moveForwardInHistory):
+
+2009-11-21 Jessie Berlin <jberlin@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Adds a tooltip containing the full url of the resource to each element
+ in the Resources panel so that it is possible to quickly see the query
+ parameters.
+ https://bugs.webkit.org/show_bug.cgi?id=19103
+
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceSidebarTreeElement.prototype.refresh):
+ Set the tooltip to be the resource's url.
+
+2009-11-21 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ CSSKeyframesRule::findRule() and deleteRule() should accept 'from' and 'to' as well as percentages
+ https://bugs.webkit.org/show_bug.cgi?id=31588
+
+ In WebKitCSSKeyframesRule::findRuleIndex(), map 'from' to 0% an 'to' to 100%
+ so that findRule() and deleteRule() work with these keywords.
+
+ * css/WebKitCSSKeyframesRule.cpp:
+ (WebCore::WebKitCSSKeyframesRule::findRuleIndex):
+
+2009-11-21 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31647
+
+ Changed KeyboardEvent::m_keyEvent from a raw pointer to an OwnPtr.
+
+ No functionality was changed. So, no new tests.
+
+ * dom/KeyboardEvent.cpp:
+ (WebCore::KeyboardEvent::~KeyboardEvent):
+ * dom/KeyboardEvent.h: Changed m_keyEvent to OwnPtr.
+ (WebCore::KeyboardEvent::keyEvent):
+
+2009-11-20 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ WAI-ARIA: add support for aria-owns
+ https://bugs.webkit.org/show_bug.cgi?id=31702
+
+ Re-organized how accessibilityAttributeNames are returned so
+ that it's possible for an element to add an attribute based on
+ a dynamic value. In this case, we only want to add AXOwn if the
+ element actually supports aria-owns.
+
+ Test: platform/mac/accessibility/aria-owns.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::supportsARIAOwns):
+ (WebCore::AccessibilityObject::ariaOwnsElements):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::ariaOwnsElements):
+ (WebCore::AccessibilityRenderObject::supportsARIAOwns):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+ * html/HTMLAttributeNames.in:
+
+2009-11-20 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7414396> Leopard & Tiger: Support closed caption in <video> element
+
+ * css/mediaControls.css:
+ Define closed caption toggle button.
+
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::updateControls):
+ Create closed caption toggle button in display order.
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::shouldRenderMediaControlPart):
+ Don't require MediaControllerThemeQuickTime theme for captions toggle button.
+ No need to check if the movie has video, a closed captions track is a video
+ track.
+
+2009-11-20 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Running code in the Console that ends with a
+ single line comment no longer produces a parse error.
+
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript._evaluateOn):
+
+2009-11-20 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ WAI-ARIA: add support for 'math' role
+ https://bugs.webkit.org/show_bug.cgi?id=31706
+
+ * accessibility/AccessibilityObject.cpp:
+ * accessibility/AccessibilityObject.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+
+2009-11-20 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ NPN_ReloadPlugins does not reload the page even if reloadPages is true.
+ https://bugs.webkit.org/show_bug.cgi?id=30460
+
+ Replace call to PluginDatabase::installedPlugins()->refresh() with Page::refreshPlugins().
+ It already refreshes plugins and reloads pages when necessary.
+
+ Tests: plugins/reloadplugins-and-pages.html
+ plugins/reloadplugins-no-pages.html
+
+ * plugins/PluginInfoStore.cpp:
+ (WebCore::refreshPlugins):
+
+2009-11-20 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ <rdar://7409188> WebKit needs to be able to serialize and deserialize objects.
+
+ Expose WebCore object serialization to WebKit.
+
+ * WebCore.base.exp:
+ * bindings/js/SerializedScriptValue.cpp:
+ (WebCore::SerializedScriptValue::~SerializedScriptValue):
+ (WebCore::SerializedScriptValue::create):
+ (WebCore::SerializedScriptValue::deserialize):
+ * bindings/js/SerializedScriptValue.h:
+
+2009-11-20 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Fixes <http://webkit.org/b/31741>.
+ Web Inspector: User Entered Data on the console should show up no matter what filters.
+
+ Always show .console-user-command-result, no matter what the filter say
+ we should do with the other classes.
+
+ * inspector/front-end/inspector.css:
+
+2009-11-20 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Fixes <http://webkit.org/b/31700>.
+ Web Inspector: isMac should be in one central location + Cached.
+
+ We should cache the value of isMac, and make the indexOf call in one
+ single location, because we are calling it from multiple places, and saving
+ the result can save us time, and make the call sites simpler.
+
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype._updateFilter):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._updateFilter):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.handleKeyEvent):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._loaded):
+ * inspector/front-end/inspector.js:
+ (WebInspector.documentKeyDown):
+ (WebInspector.isMac):
+
+2009-11-19 Joseph Pecoraro <joepeck@webkit.org>
+
+ Removed .DS_Store accidentally added in last (r51245).
+
+2009-11-19 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Add Console Only Layout Mode
+ https://bugs.webkit.org/show_bug.cgi?id=30282
+
+ Adds a Console Panel, which allows for a Full size Console. This
+ extends the Drawer to the size of a Panel. This also fixes previous
+ resize issues with the Drawer.
+
+ * inspector/front-end/ConsolePanel.js: added.
+ (WebInspector.ConsolePanel):
+ (WebInspector.ConsolePanel.prototype.toolbarItemClass.get toolbarItemLabel):
+ (WebInspector.ConsolePanel.prototype.show):
+ (WebInspector.ConsolePanel.prototype.hide):
+ * inspector/front-end/Drawer.js:
+ (WebInspector.Drawer):
+ (WebInspector.Drawer.prototype.set visibleView):
+ (WebInspector.Drawer.prototype.get savedHeight): access the saved height of the variable console.
+ (WebInspector.Drawer.prototype.show.animationFinished):
+ (WebInspector.Drawer.prototype.show):
+ (WebInspector.Drawer.prototype.hide.animationFinished):
+ (WebInspector.Drawer.prototype.hide):
+ (WebInspector.Drawer.prototype.resize): resize appropriately if full/non-full
+ (WebInspector.Drawer.prototype.enterPanelMode):
+ (WebInspector.Drawer.prototype.exitPanelMode):
+ (WebInspector.Drawer.prototype.immediatelyExitPanelMode):
+ (WebInspector.Drawer.prototype._cancelAnimationIfNeeded):
+ (WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished):
+ (WebInspector.Drawer.prototype._animateDrawerHeight):
+ (WebInspector.Drawer.prototype._animationDuration):
+ (WebInspector.Drawer.prototype._startStatusBarDragging):
+ (WebInspector.Drawer.prototype._statusBarDragging):
+ (WebInspector.Drawer.prototype._endStatusBarDragging):
+
+ Miscellaneous changes and cleanup.
+
+ * English.lproj/localizedStrings.js: "Console" toolbar title.
+ * inspector/front-end/ConsoleView.js: removed unnecessary element reordering
+ * inspector/front-end/Images/consoleIcon.png: added.
+ * inspector/front-end/inspector.css: added icon.
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector._createPanels): create console panel
+ (WebInspector.windowResize): resize drawer if necessary
+ (WebInspector.documentKeyDown): esc should not toggle the console when in panel mode
+ (WebInspector.animateStyle): start animation interval, returns the interval key
+ (WebInspector.toggleAttach): resize drawer if necessary
+ (WebInspector.showConsolePanel): restore the panel when the inspector restarts
+ (WebInspector.showProfileForURL): style fix
+
+ Restore the panel when the inspector restarts.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::setWindowVisible):
+ (WebCore::InspectorController::specialPanelForJSName):
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::showPanel):
+
+ Build files.
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/WebKit.qrc:
+
+2009-11-20 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Fixes <http://webkit.org/b/31699>.
+ Web Inspector: Should Cache Values of InspectorController.platform() and port().
+
+ Refactor the Inspector to cache the value of InspectorController.platform
+ and InspectorController.port, because those need to call into C++, they are
+ being called more and more as we add platform specific keyboard shortcuts, and
+ they shouldn't change in the lifecycle of the Web Inspector.
+
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype._updateFilter):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._updateFilter):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.handleKeyEvent):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._loaded):
+ * inspector/front-end/inspector.js:
+ (WebInspector.get platform):
+ (WebInspector.get port):
+ (WebInspector.loaded):
+ (WebInspector.documentKeyDown):
+ (WebInspector.toolbarDragStart):
+
+2009-11-20 Dirk Schulze <krit@webkit.org>
+
+ Unreviewed build fix for filters enabled builds.
+
+ * platform/graphics/filters/FEColorMatrix.cpp:
+ (WebCore::FEColorMatrix::apply):
+ * platform/graphics/filters/FEComposite.cpp:
+ (WebCore::FEComposite::apply):
+ * platform/graphics/filters/SourceGraphic.cpp:
+ (WebCore::SourceGraphic::apply):
+ * svg/graphics/SVGResourceFilter.cpp:
+ (WebCore::SVGResourceFilter::applyFilter):
+ * svg/graphics/filters/SVGFEMerge.cpp:
+ (WebCore::FEMerge::apply):
+ * svg/graphics/filters/SVGFEOffset.cpp:
+ (WebCore::FEOffset::apply):
+ * svg/graphics/filters/SVGFETile.cpp:
+ (WebCore::FETile::apply):
+
+2009-11-20 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7389945> QTKit based media engine should not claim to support
+ fullscreen on Leopard
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::supportsFullscreen):
+ Only return true on SnowLeopard for now.
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::shouldRenderMediaControlPart):
+ No need to special case MediaFullscreenButtonPart as the default implementation
+ asks the media engine if it supports fullscreen.
+
+2009-11-18 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ Patch by Yongjun Zhang <yongjun.zhang@nokia.com> and
+ Girish Ramakrishnan <girish@forwardbias.in>
+
+ [Qt] Implement support for rendering plugins on Qt/Mac when a page is used
+ without a QWebView or when inside QGraphicsWebView.
+
+ Currently, the code provides the cgcontext of the PlatformPluginWidget to
+ the plugin. This approach does not work when we are printing, or using
+ QWebFrame::render() to render to a QImage/QPixmap since the plugin ends
+ up drawing on the QWebView (i.e platformPluginWidget's cgcontext) instead
+ of the QPaintDevice's context.
+
+ To solve all cases and keep the code simple, we render the plugin to an
+ offscreen pixmap in all cases. This way, the plugin always renders to the
+ CGContext of the pixmap and we then use QPainter to blit the pixmap into
+ the QPaintDevice. We also create a fake window and set it's WindowRef in
+ NPWindow. Only with this WindowRef does Flash paint correctly to the QPixmap.
+
+ Now, that's the theory. In practice, ATM, mouse events do not work when using
+ the fake window. So, setPlatformPluginWidget() is still called when using QWebView
+ so that there are no regressions after this patch. Once we get mouse events
+ working, setPlatformPluginWidget will be removed.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31183
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::PluginView):
+ * plugins/PluginView.h:
+ * plugins/mac/PluginViewMac.cpp:
+ (WebCore::PluginView::platformStart):
+ (WebCore::PluginView::platformDestroy):
+ (WebCore::PluginView::setNPWindowIfNeeded):
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::paint):
+ (WebCore::PluginView::invalidateRect):
+
+2009-11-19 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Resync Resources Backend and Frontend
+ https://bugs.webkit.org/show_bug.cgi?id=31705
+
+ * inspector/front-end/Resource.js: resync enum values with backend
+ (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType): return false if all else fails, not true in all cases
+
+2009-11-19 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Android port lacks configuration in Platform.h and config.h.
+ https://bugs.webkit.org/show_bug.cgi?id=31671
+
+ Build change only. No new tests possible.
+
+ * config.h: Modified. Added Android-specific configuration.
+
+2009-11-20 Roland Steiner <rolandsteiner@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Change default stylesheet to reset text indentation for ruby elements by default.
+ (https://bugs.webkit.org/show_bug.cgi?id=31247)
+
+ Test: fast/ruby/ruby-text-indent.html
+
+ * css/html.css: reset text-indent on <ruby> and <rt> elements
+
+2009-11-19 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fixes <http://webkit.org/b/22754>.
+ Web Inspector: Keyboard shortcut for Element finder.
+
+ Use Command + Shift + C as a shortcut for Node Search, to
+ match the Firebug shortcut to do the same thing.
+
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.handleKeyEvent):
+
+2009-11-19 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31690
+ Make SocketStreamHandleCFNet work on Windows
+
+ * WebCore.vcproj/WebCore.vcproj: Added LoaderRunLoopCF.
+
+ * platform/network/ResourceHandle.h: Removed loaderRunLoop().
+
+ * platform/network/cf/LoaderRunLoopCF.cpp: Added.
+ (WebCore::emptyPerform):
+ (WebCore::runLoaderThread):
+ (WebCore::loaderRunLoop):
+ * platform/network/cf/LoaderRunLoopCF.h: Added.
+ Moved the run loop that we use for CFNetwork from ResourceHandle to its own file, because
+ it's needed for more than just resource loading.
+
+ * platform/network/cf/ResourceHandleCFNet.cpp: Use loaderRunLoop() from its new location.
+
+ * platform/network/cf/DNSCFNet.cpp: (WebCore::DNSResolveQueue::resolve): Ditto.
+
+ * platform/network/cf/SocketStreamHandle.h: Added static callbacks for forwarding events to
+ main thread.
+ * platform/network/cf/SocketStreamHandleCFNet.cpp:
+ (WebCore::SocketStreamHandle::SocketStreamHandle): Use loaderRunLoop() on Windows instead of
+ inoperable main run loop.
+
+ (WebCore::MainThreadEventCallbackInfo::MainThreadEventCallbackInfo):
+ (WebCore::SocketStreamHandle::readStreamCallback):
+ (WebCore::SocketStreamHandle::writeStreamCallback):
+ (WebCore::SocketStreamHandle::readStreamCallbackMainThread):
+ (WebCore::SocketStreamHandle::writeStreamCallbackMainThread):
+ Forward stream events to main thread on Windows.
+
+2009-11-19 Avi Drissman <avi@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Quick style fix.
+ https://bugs.webkit.org/show_bug.cgi?id=27777
+
+ * platform/graphics/cg/PDFDocumentImage.cpp:
+
+2009-11-19 Beth Dakin <bdakin@apple.com>
+
+ Build fix. No review needed.
+
+ * platform/chromium/ScrollbarThemeChromium.cpp:
+ (WebCore::ScrollbarThemeChromium::paintTickmarks):
+ * rendering/RenderMediaControlsChromium.cpp:
+ (WebCore::paintMediaButton):
+
+2009-11-19 Beth Dakin <bdakin@apple.com>
+
+ Build fix. No review needed.
+
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::paintCheckbox):
+ (WebCore::RenderThemeChromiumSkia::paintRadio):
+ (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
+ (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
+ (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
+
+2009-11-19 Beth Dakin <bdakin@apple.com>
+
+ Build fix. No review needed.
+
+ * platform/graphics/qt/StillImageQt.cpp:
+ (WebCore::StillImage::draw):
+ * platform/graphics/qt/StillImageQt.h:
+
+2009-11-19 Beth Dakin <bdakin@apple.com>
+
+ Build fix. No review needed.
+
+ * rendering/RenderThemeWin.cpp:
+ (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
+ (WebCore::RenderThemeWin::paintSearchFieldResultsDecoration):
+ (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
+
+2009-11-19 Beth Dakin <bdakin@apple.com>
+
+ Build fix. No review needed.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::paintMissingPluginIcon):
+
+2009-11-19 Beth Dakin <bdakin@apple.com>
+
+ Build fix. No review needed.
+
+ * platform/graphics/win/ImageCGWin.cpp:
+ (WebCore::BitmapImage::getHBITMAPOfSize):
+ (WebCore::BitmapImage::drawFrameMatchingSourceSize):
+
+2009-11-19 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=31321 Make -webkit-
+ color-correction work with untagged images
+
+ Image's draw(), drawPattern(), and fillWithSolidColor() functions
+ now take a ColorSpace. A bunch of classes inherit from Image, so
+ draw() and drawPattern() functions there must also take a
+ ColorSpace.
+ * platform/graphics/Image.cpp:
+ (WebCore::Image::fillWithSolidColor):
+ (WebCore::Image::drawTiled):
+ * platform/graphics/Image.h:
+ * platform/graphics/BitmapImage.h:
+ * platform/graphics/GeneratedImage.cpp:
+ (WebCore::GeneratedImage::draw):
+ (WebCore::GeneratedImage::drawPattern):
+ * platform/graphics/GeneratedImage.h:
+ * platform/graphics/cg/PDFDocumentImage.cpp:
+ (WebCore::PDFDocumentImage::draw):
+ * platform/graphics/cg/PDFDocumentImage.h:
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::draw):
+ * svg/graphics/SVGImage.h:
+
+ All of the drawImage() functions and drawTiled() functions of
+ GraphicsContext now take a ColorSpace.
+ * platform/graphics/GraphicsContext.cpp:
+ (WebCore::GraphicsContext::drawImage):
+ (WebCore::GraphicsContext::drawTiledImage):
+ * platform/graphics/GraphicsContext.h:
+
+ This is where the actual work is done.
+ * platform/graphics/cg/ImageCG.cpp:
+ (WebCore::imageWithColorSpace): New static function that returns a
+ copy of the given image in the given ColorSpace *IF* we should use
+ the given ColorSpace. We will ignore the color space if the image
+ is tagged and return 0.
+ (WebCore::BitmapImage::draw): Now takes a ColorSpace and uses it to
+ call imageWithColorSpace().
+ (WebCore::Image::drawPattern): Same.
+
+ Attempt to keep all ports building.
+ * platform/graphics/cairo/ImageCairo.cpp:
+ (WebCore::BitmapImage::draw):
+ (WebCore::Image::drawPattern):
+ * platform/graphics/haiku/ImageHaiku.cpp:
+ (WebCore::BitmapImage::draw):
+ (WebCore::Image::drawPattern):
+ * platform/graphics/qt/ImageQt.cpp:
+ (WebCore::Image::drawPattern):
+ (WebCore::BitmapImage::draw):
+ * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
+ * platform/graphics/skia/ImageSkia.cpp:
+ (WebCore::Image::drawPattern):
+ (WebCore::BitmapImage::draw):
+ (WebCore::BitmapImageSingleFrameSkia::draw):
+ * platform/graphics/wx/ImageWx.cpp:
+ (WebCore::BitmapImage::draw):
+ (WebCore::BitmapImage::drawPattern):
+
+ Callers of GraphicsContext's drawImage() and drawTiled() functions
+ now need to send a ColorSpace.
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::paint):
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::drawImage):
+ (WebCore::CanvasRenderingContext2D::drawImageFromRect):
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::wheelEvent):
+ * platform/graphics/filters/FEColorMatrix.cpp:
+ (WebCore::FEColorMatrix::apply):
+ * platform/graphics/filters/FEComposite.cpp:
+ (WebCore::FEComposite::apply):
+ * platform/graphics/filters/SourceGraphic.cpp:
+ (WebCore::SourceGraphic::apply):
+ * platform/mac/ScrollbarThemeMac.mm:
+ (WebCore::ScrollbarThemeMac::paint):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+ (WebCore::RenderBoxModelObject::paintNinePieceImage):
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::paintReplaced):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::paintResizer):
+ * rendering/RenderListMarker.cpp:
+ (WebCore::RenderListMarker::paint):
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::paint):
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::paint):
+ * svg/graphics/SVGPaintServerPattern.cpp:
+ (WebCore::SVGPaintServerPattern::setup):
+ * svg/graphics/SVGResourceFilter.cpp:
+ (WebCore::SVGResourceFilter::applyFilter):
+ * svg/graphics/filters/SVGFEMerge.cpp:
+ (WebCore::FEMerge::apply):
+ * svg/graphics/filters/SVGFEOffset.cpp:
+ (WebCore::FEOffset::apply):
+ * svg/graphics/filters/SVGFETile.cpp:
+ (WebCore::FETile::apply):
+
+2009-11-19 Avi Drissman <avi@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Properly create a CGImageRef on non-PLATFORM(MAC).
+ https://bugs.webkit.org/show_bug.cgi?id=27777
+
+ * platform/graphics/cg/ImageSourceCG.cpp:
+ (WebCore::sharedBufferGetBytesAtPosition):
+ (WebCore::sharedBufferRelease):
+ (WebCore::ImageSource::setData):
+ * platform/graphics/cg/ImageSourceCG.h:
+ * platform/graphics/cg/PDFDocumentImage.cpp:
+ (WebCore::PDFDocumentImage::dataChanged):
+
+2009-11-19 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ -webkit-user-drag: element Drag images include overflow decorations from incorrect nodes
+ https://bugs.webkit.org/show_bug.cgi?id=31656
+
+ Make sure we're a child of the painting root before drawing overflow features.
+
+ * manual-tests/user-drag-with-decorations.html: Added.
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::paint):
+
+2009-11-19 Dmitry Titov <dimich@chromium.org>
+
+ Not reviewed, attempt to fix Chromium build.
+
+ * rendering/RenderMediaControlsChromium.cpp:
+ (WebCore::RenderMediaControlsChromium::paintMediaControlsPart): Add new enum values for Show/HideClosedCaptionButton to make it compile.
+
+2009-11-19 Rahul Kuchhal <kuchhal@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Do not assert when a high number is used for roman numerals in lists.
+ https://bugs.webkit.org/show_bug.cgi?id=31652
+
+ Test: fast/lists/ol-start-roman.html
+
+ * rendering/RenderListMarker.cpp:
+ (WebCore::toRoman): Increase the char array size.
+
+2009-11-19 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Rubber-stamped by Oliver Hunt.
+
+ Add translatable strings to cover validationMessage, after
+ r51172. Already covered by existing test.
+
+ * platform/gtk/LocalizedStringsGtk.cpp:
+ (WebCore::validationMessageValueMissingText):
+ (WebCore::validationMessageTypeMismatchText):
+ (WebCore::validationMessagePatternMismatchText):
+ (WebCore::validationMessageTooLongText):
+ (WebCore::validationMessageRangeUnderflowText):
+ (WebCore::validationMessageRangeOverflowText):
+ (WebCore::validationMessageStepMismatchText):
+
+2009-11-19 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Remove HAVE(FLOAT_H) guard
+ https://bugs.webkit.org/show_bug.cgi?id=31661
+
+ WebCore has a dependency on float.h, there is
+ no need to guard float.h.
+
+ No new tests as there is no functional change.
+
+ * html/HTMLInputElement.cpp: Remove include directive
+ for float.h as it is included in MathExtras.h already.
+
+2009-11-19 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Pavel Feldman.
+
+ Instrumentation should account for painting in compositing layers
+ https://bugs.webkit.org/show_bug.cgi?id=31674
+
+ Add calls to InspectorTimelineAgent for painting into compositing layers,
+ which is not accounted for in FrameView::paintContents().
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::paintIntoLayer):
+ Avoid fetching the FrameView multiple times.
+
+ (WebCore::inspectorTimelineAgent):
+ (WebCore::RenderLayerBacking::paintContents):
+
+2009-11-19 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7035231>
+ Support closed caption in <video> element
+
+ Test: media/media-captions.html
+
+ * WebCore.base.exp:
+ * accessibility/AccessibilityMediaControls.cpp:
+ (WebCore::AccessibilityMediaControl::controlTypeName):
+ Define ShowClosedCaptionsButton and HideClosedCaptionsButton.
+
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ Add MediaToggleClosedCaptionsButtonPart.
+
+ * css/CSSSelector.cpp:
+ (WebCore::CSSSelector::extractPseudoType):
+ Define and match mediaControlsToggleClosedCaptionsButton.
+
+ * css/CSSSelector.h:
+ (WebCore::CSSSelector::):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
+ Define and match PseudoMediaControlsToggleClosedCaptions.
+
+ * css/CSSValueKeywords.in:
+ Define and use media-toggle-closed-captions-button.
+
+ * css/mediaControls.css:
+ * css/mediaControlsQuickTime.css:
+ Add webkit-media-controls-toggle-closed-captions-button.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::HTMLMediaElement):
+ Initialize m_closedCaptionsVisible.
+ (WebCore::HTMLMediaElement::loadInternal):
+ Set m_closedCaptionsVisible to false.
+ (WebCore::HTMLMediaElement::hasClosedCaptions):
+ (WebCore::HTMLMediaElement::closedCaptionsVisible):
+ (WebCore::HTMLMediaElement::setClosedCaptionsVisible):
+ New, captions internal methods.
+ (WebCore::HTMLMediaElement::setWebkitClosedCaptionsVisible):
+ (WebCore::HTMLMediaElement::webkitClosedCaptionsVisible):
+ (WebCore::HTMLMediaElement::webkitHasClosedCaptions):
+ New, captions DOM API.
+
+ * html/HTMLMediaElement.h:
+ * html/HTMLMediaElement.idl:
+ Declare methods needed for captions API.
+
+ * platform/ThemeTypes.h:
+ Add MediaToggleClosedCaptionsButtonPart.
+
+ * platform/android/LocalizedStringsAndroid.cpp:
+ (WebCore::localizedMediaControlElementString):
+ (WebCore::localizedMediaControlElementHelpText):
+ (WebCore::localizedMediaTimeDescription):
+ Add empty implmentations.
+
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::NullMediaPlayerPrivate::hasClosedCaptions):
+ (WebCore::NullMediaPlayerPrivate::setClosedCaptionsVisible):
+ New, empty implementations of media engine closed caption functions.
+ (WebCore::MediaPlayer::hasClosedCaptions):
+ (WebCore::MediaPlayer::setClosedCaptionsVisible):
+ New, call media engine closed caption functions.
+
+ * platform/graphics/MediaPlayer.h:
+ * platform/graphics/MediaPlayerPrivate.h:
+ (WebCore::MediaPlayerPrivateInterface::hasClosedCaptions):
+ (WebCore::MediaPlayerPrivateInterface::setClosedCaptionsVisible):
+ Declare new media engine methods.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::hasClosedCaptions):
+ (WebCore::MediaPlayerPrivate::setClosedCaptionsVisible):
+ New, QTKit implementation of closed caption methods.
+
+ * platform/gtk/LocalizedStringsGtk.cpp:
+ (WebCore::localizedMediaControlElementString):
+ (WebCore::localizedMediaControlElementHelpText):
+ Add help text for ShowClosedCaptionsButton and HideClosedCaptionsButton.
+
+ * platform/mac/WebCoreSystemInterface.h:
+ * platform/mac/WebCoreSystemInterface.mm:
+ Declare and initialize wkQTMovieHasClosedCaptions and wkQTMovieSetShowClosedCaptions.
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlInputElement::MediaControlInputElement):
+ Deal with MEDIA_CONTROLS_TOGGLE_CLOSED_CAPTIONS_BUTTON.
+ (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
+ (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
+ (WebCore::MediaControlToggleClosedCaptionsButtonElement::updateDisplayType):
+ New, implement the closed caption toggle button,
+
+ * rendering/MediaControlElements.h:
+ Define MediaShowClosedCaptionsButton and MediaHideClosedCaptionsButton,
+ declare MediaControlToggleClosedCaptionsButtonElement.
+
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::styleDidChange):
+ (WebCore::RenderMedia::createToggleClosedCaptionsButton):
+ (WebCore::RenderMedia::createStatusDisplay):
+ (WebCore::RenderMedia::updateControls):
+ (WebCore::RenderMedia::forwardEvent):
+ * rendering/RenderMedia.h:
+ Deal with m_toggleClosedCaptionsButton.
+
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::paint):
+ Deal with MediaToggleClosedCaptionsButtonPart.
+
+ * rendering/RenderTheme.h:
+ * rendering/RenderThemeMac.h:
+ Declare paintMediaToggleClosedCaptionsButton.
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintMediaToggleClosedCaptionsButton):
+ New.
+ (WebCore::RenderThemeMac::shouldRenderMediaControlPart):
+ Don't render captions toggle button unless we are using the new theme, the
+ movie has captions, and the movie is in a <video> element since we currently
+ rely on QTKit to render the captions.
+
+ * rendering/style/RenderStyleConstants.h:
+ Define MEDIA_CONTROLS_TOGGLE_CLOSED_CAPTIONS_BUTTON.
+
+2009-11-19 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix. Add missing header.
+
+ * platform/wx/LocalizedStringsWx.cpp:
+
+2009-11-19 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31634
+ Ignore realm for proxy protection spaces
+
+ Only affects WebSocket proxy authentication, cannot be tested in DRT.
+
+ * platform/network/ProtectionSpace.cpp:
+ (WebCore::operator==):
+ * platform/network/ProtectionSpaceHash.h:
+ (WebCore::ProtectionSpaceHash::hash):
+
+2009-11-19 Olivier Goffart <ogoffart@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Normalize signal and slot signatures.
+
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+
+2009-11-19 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Store cookie domains in the WebInspector object
+
+ The cookie domains have been moved from StoragePanel into WebInspector.
+ Also, the document URLs are now passed inside the WebInspector.addResource()
+ payload rather than pushed directly from InspectorController.
+ https://bugs.webkit.org/show_bug.cgi?id=31627
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::populateScriptObjects):
+ (WebCore::InspectorController::didFinishLoading):
+ * inspector/InspectorFrontend.cpp:
+ * inspector/InspectorFrontend.h:
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::createScriptObject):
+ (WebCore::InspectorResource::updateScriptObject):
+ * inspector/front-end/StoragePanel.js:
+ (WebInspector.StoragePanel.prototype.reset):
+ (WebInspector.StoragePanel.prototype.addCookieDomain):
+ * inspector/front-end/inspector.js:
+ (WebInspector.addResource):
+ (WebInspector.addCookieDomain):
+ (WebInspector.reset):
+
+2009-11-19 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for the other part of platform directory in WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=31585
+
+ Inherits the following classes from FastAllocBase because these are
+ instantiated by 'new':
+
+ class RegularExpression - instantiated at: WebCore/page/Frame.cpp:415
+ class TransformationMatrix - instantiated at: WebCore/rendering/TransformState.cpp:62
+ class Path - instantiated at: WebCore/html/HTMLAreaElement.cpp:73
+ class FontPlatformData - instantiated at: WebCore/platform/graphics/qt/FontCacheQt.cpp:188
+
+ Inherits the following classes from Noncopyable because these are
+ instantiated by 'new' and no need to be copyable:
+
+ class Cursors - instantiated at: WebCore/platform/qt/CursorQt.cpp:146
+ class NetworkStateNotifier - instantiated at: WebCore/platform/network/NetworkStateNotifier.cpp:37
+ struct CrossThreadResourceRequestData - instantiated at: WebCore/platform/network/ResourceRequestBase.cpp:71
+
+ class ImageDecoder - its child class is instantiated at: WebCore/platform/graphics/qt/ImageDecoderQt.cpp:46
+ class MediaPlayerPrivateInterface - its child class is instantiated at: WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:119
+
+ * platform/graphics/MediaPlayerPrivate.h:
+ * platform/graphics/Path.h:
+ * platform/graphics/qt/FontPlatformData.h:
+ * platform/graphics/transforms/TransformationMatrix.h:
+ * platform/image-decoders/ImageDecoder.h:
+ * platform/network/NetworkStateNotifier.h:
+ * platform/network/ResourceRequestBase.h:
+ * platform/qt/CursorQt.cpp:
+ * platform/text/RegularExpression.h:
+
+2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed.
+
+ [Qt] Build fix for QtWebKit after r51172.
+
+ * platform/qt/Localizations.cpp:
+ (WebCore::validationMessageValueMissingText):
+ (WebCore::validationMessageTypeMismatchText):
+ (WebCore::validationMessagePatternMismatchText):
+ (WebCore::validationMessageTooLongText):
+ (WebCore::validationMessageRangeUnderflowText):
+ (WebCore::validationMessageRangeOverflowText):
+ (WebCore::validationMessageStepMismatchText):
+
+2009-11-18 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Fixed <rdar://problem/7398987> Assertion failure in
+ RenderLayer::updateClipRects when a plug-in’s enclosing layer is
+ enclosed by a transformed layer
+
+ Tests: fast/layers/clip-rects-transformed-2.html
+ fast/layers/clip-rects-transformed.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::clippingRoot): Added. Finds the nearest ancestor
+ that is either transformed or composited. During painting and hit
+ testing, when a transformed or composited layer is hit, it becomes the
+ new root layer, which ultimately gets passed to calculateRects().
+ (WebCore::RenderLayer::childrenClipRect): Pass the clipping root as the
+ root layer to calculateRects(), and return the bounding box of the
+ transformed rectangle.
+ (WebCore::RenderLayer::selfClipRect): Ditto.
+ * rendering/RenderLayer.h:
+
+2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Remove support for Qt v4.3 or older versions
+ https://bugs.webkit.org/show_bug.cgi?id=29469
+
+ No new tests as there is no change if compiled with
+ Qt v4.4 or later version.
+
+ * WebCore.pro:
+ * dom/XMLTokenizerQt.cpp:
+ (WebCore::EntityResolver::resolveUndeclaredEntity):
+ (WebCore::XMLTokenizer::XMLTokenizer):
+ (WebCore::XMLTokenizer::~XMLTokenizer):
+ (WebCore::XMLTokenizer::doWrite):
+ (WebCore::XMLTokenizer::startDocument):
+ (WebCore::XMLTokenizer::parseDtd):
+ * platform/graphics/qt/FontQt.cpp:
+ * platform/graphics/qt/FontQt43.cpp: Removed.
+ * platform/graphics/qt/ImageQt.cpp:
+ * platform/network/ResourceHandleInternal.h:
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ * platform/network/qt/QNetworkReplyHandler.h:
+ * platform/network/qt/ResourceHandleQt.cpp:
+ (WebCore::ResourceHandle::start):
+ (WebCore::ResourceHandle::cancel):
+ (WebCore::ResourceHandle::loadResourceSynchronously):
+ (WebCore::ResourceHandle::setDefersLoading):
+ * platform/network/qt/ResourceRequest.h:
+ * platform/network/qt/ResourceRequestQt.cpp:
+ * platform/qt/ClipboardQt.cpp:
+ (WebCore::ClipboardQt::clearData):
+ * platform/qt/CookieJarQt.cpp:
+ (WebCore::cookieJar):
+ (WebCore::setCookies):
+ (WebCore::cookies):
+ (WebCore::cookiesEnabled):
+ * platform/qt/PlatformKeyboardEventQt.cpp:
+ (WebCore::keyIdentifierForQtKeyCode):
+ (WebCore::windowsKeyCodeForKeyEvent):
+ * platform/text/qt/TextBoundaries.cpp:
+ * platform/text/qt/TextBreakIteratorQt.cpp:
+ * plugins/qt/PluginDataQt.cpp:
+ (WebCore::PluginData::initPlugins):
+
+2009-11-18 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
+ Support for validationMessage attribute, as per HTML5 specs.
+
+ Test: fast/forms/validationMessage.html
+
+ * html/HTMLButtonElement.idl: validationMessage attribute
+ * html/HTMLFieldSetElement.idl: validationMessage attribute
+ * html/HTMLFormControlElement.cpp:
+ * html/HTMLFormControlElement.h:
+ * html/HTMLInputElement.idl: validationMessage attribute
+ * html/HTMLSelectElement.idl: validationMessage attribute
+ * html/HTMLTextAreaElement.idl: validationMessage attribute
+ * html/ValidityState.cpp: new method to retrieve pertinent localized text
+ * html/ValidityState.h:
+ * page/mac/WebCoreViewFactory.h:
+ * platform/LocalizedStrings.h:
+ * platform/android/LocalizedStringsAndroid.cpp:
+ * platform/gtk/LocalizedStringsGtk.cpp:
+ * platform/haiku/LocalizedStringsHaiku.cpp:
+ * platform/mac/LocalizedStringsMac.mm:
+ * platform/wx/LocalizedStringsWx.cpp:
+
+2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed.
+
+ Fix a typo. Remove the trailing semicolon
+ from an include directive after r51137.
+
+ No new tests as there is no functional change.
+
+ * platform/qt/QWebPageClient.h:
+
+2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed.
+
+ [Qt] Build fix for QtWebKit after r51159.
+
+ Include float.h for DBL_MANT_DIG. Not sure why this
+ is not a problem for other ports.
+
+ * html/HTMLInputElement.cpp:
+
+2009-11-19 Roland Steiner <rolandsteiner@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Bug 31574 - Crashing bug when removing <ruby> element
+ (https://bugs.webkit.org/show_bug.cgi?id=31574)
+
+ Cause of the bug:
+ 1.) RenderBlock::destroy() of the RenderRubyRun called destroyLeftoverChildren()
+ 2.) that called destroy() of the RenderRubyBase(), which in RenderObject::destroy() calls remove()
+ 3.) remove() is being redirected as parent()->removeChild() in RenderObject.h
+ 4.) this triggers the special handling of child removal in RenderRubyRun that
+ causes it to destroy itself
+ 5.) On returning from all this the renderer crashes when accessing a member
+ or virtual function on this now illegal object.
+
+ I therefore added a flag that tracks if the ruby run is being destroyed.
+ If so, avoid doing the special handling in removeChild that caused this.
+ It's not the most elegant solution, but the easiest to implement without
+ touching unrelated code. Also, it's self-documenting.
+
+ Test: fast/ruby/ruby-remove.html
+
+ * rendering/RenderRubyRun.cpp:
+ (WebCore::RenderRubyRun::RenderRubyRun):
+ (WebCore::RenderRubyRun::destroy):
+ (WebCore::RenderRubyRun::removeChild):
+ * rendering/RenderRubyRun.h:
+
+2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Remove WTF_USE_JAVASCRIPTCORE_BINDINGS as it is no longer used
+ https://bugs.webkit.org/show_bug.cgi?id=31643
+
+ No new tests as there is no functional change.
+
+ * WebCore.pro:
+
+2009-11-18 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Eric Seidel.
+
+ Implement TextBoundaries for WINCE port.
+ https://bugs.webkit.org/show_bug.cgi?id=27371
+
+ * platform/text/wince/TextBoundariesWince.cpp: Added.
+
+2009-11-18 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Eric Seidel.
+
+ Implement TextBreakIterator for WINCE port.
+ https://bugs.webkit.org/show_bug.cgi?id=27371
+
+ * platform/text/wince/TextBreakIteratorWince.cpp: Added.
+
+2009-11-18 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Add support for ValidityState.typeMismatch for the following INPUT types:
+ date datetime datetime-local month time week
+ https://bugs.webkit.org/show_bug.cgi?id=31342
+
+ Tests: fast/forms/ValidityState-typeMismatch-date.html
+ fast/forms/ValidityState-typeMismatch-datetime.html
+ fast/forms/ValidityState-typeMismatch-datetimelocal.html
+ fast/forms/ValidityState-typeMismatch-month.html
+ fast/forms/ValidityState-typeMismatch-time.html
+ fast/forms/ValidityState-typeMismatch-week.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::formStringToISODateTime): Check the type
+ validity of the specified type and string using the ISODateTime class.
+ * html/HTMLInputElement.h:
+ * html/ValidityState.cpp:
+ (WebCore::ValidityState::typeMismatch): Check the type validity
+ for date, datetime, datetime-local, month, time and week with
+ HTMLInputElemtn::formStringToISODateTime()
+
+2009-11-18 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix REGRESSION (r47022): Performance of DocumentFragment.appendChild is 1000x slower sometimes
+ https://bugs.webkit.org/show_bug.cgi?id=31237
+
+ Also speeds up Dromaeo DOM Core tests by 1.31x.
+
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::markChildren): Change marking algorithm to avoid O(N^2) behavior. The subtree
+ mark bit was no longer effective; instead I changed things so only a node that has no ancestors
+ with wrappers would do marking; there should be only one in the typical case (the root of the
+ detached subtree).
+ * dom/Node.cpp:
+ (WebCore::Node::Node): Remove now useless m_inSubtreeMark bit and related functions.
+ * dom/Node.h: ditto
+
+2009-11-18 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Get rid of the redundant strokeType and fillType data members on
+ a GraphicsContext as well as the FillOrStrokeType enum. Use
+ null pointers instead.
+
+ * platform/graphics/GraphicsContext.cpp:
+ (WebCore::GraphicsContext::setStrokeColor): Null out the pattern
+ and gradient.
+ (WebCore::GraphicsContext::setFillColor): Ditto.
+ (WebCore::GraphicsContext::setStrokePattern): Null out the graident.
+ (WebCore::GraphicsContext::setFillPattern): Ditto.
+ (WebCore::GraphicsContext::setStrokeGradient): Null out the pattern.
+ (WebCore::GraphicsContext::setFillGradient): Ditto.
+
+ * platform/graphics/GraphicsContextPrivate.h: Remove all that stuff.
+
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::setPlatformFill): Use null checks on fillPattern and
+ fillGraident instead of a switch statement.
+ (WebCore::setPlatformStroke): Ditto.
+
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::GraphicsContext::applyStrokePattern): Removed unneeded get.
+ (WebCore::GraphicsContext::applyFillPattern): Ditto.
+ (WebCore::calculateDrawingMode): Use fillPattern and strokePattern
+ to see if there is a pattern instead of fillType and strokeType.
+ (WebCore::GraphicsContext::drawPath): Use fillGradient, strokeGradient,
+ fillPattern, and strokePattern instead of fillType and strokeType.
+ (WebCore::GraphicsContext::fillPath): Added FIXME about color space that
+ is used in the pattern and gradient case probably erroneously. Moved
+ gradient code inside an if statement. Streamlined pattern code and
+ use an if statement. No switch any more.
+ (WebCore::GraphicsContext::strokePath): Ditto.
+ (WebCore::GraphicsContext::fillRect): Ditto.
+ (WebCore::GraphicsContext::strokeRect): Ditto.
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::fillPath): Use null checks on fillPattern and
+ fillGraident instead of a switch statement.
+ (WebCore::GraphicsContext::strokePath): Ditto.
+ (WebCore::GraphicsContext::fillRect): Ditto.
+
+ * platform/graphics/wince/GraphicsContextWince.cpp:
+ (WebCore::GraphicsContext::fillPath): Removed unneeded check of fillType.
+ (WebCore::GraphicsContext::fillRect): Ditto.
+
+2009-11-18 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Support for step attribute and ValidityStae.stepMismatch for
+ type=number and range. stepMismatch will be false if the
+ difference between the current value and a multiple of the step
+ value is very small.
+
+ Change the behavior of RenderSlider so that it always has a value
+ rounded to the step attribute value.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31331
+
+ Tests: fast/forms/ValidityState-stepMismatch-number.html
+ fast/forms/ValidityState-stepMismatch-range.html
+ fast/forms/ValidityState-stepMismatch-unsupported.html
+ fast/forms/input-step.html
+
+ * html/HTMLAttributeNames.in: Add "step".
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::stepMismatch):
+ (WebCore::HTMLInputElement::getStepParameters):
+ (WebCore::HTMLInputElement::getAllowedValueStep):
+ * html/HTMLInputElement.h:
+ * html/HTMLInputElement.idl: Add "step".
+ * html/ValidityState.cpp:
+ (WebCore::ValidityState::stepMismatch): Forward to HTMLInputElement::stepMismatch().
+ * html/ValidityState.h:
+ * rendering/RenderSlider.cpp:
+ (WebCore::SliderRange::SliderRange):
+ (WebCore::SliderRange::clampValue):
+
+2009-11-18 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Need to ASSERT(isMainThread()) in ThreadShared methods.
+ https://bugs.webkit.org/show_bug.cgi?id=31637
+
+ Added ASSERT(IsMainThread()) to all following methods:
+ * platform/TreeShared.h:
+ (WebCore::TreeShared::TreeShared):
+ (WebCore::TreeShared::~TreeShared):
+ (WebCore::TreeShared::ref):
+ (WebCore::TreeShared::deref):
+ (WebCore::TreeShared::setParent):
+ (WebCore::TreeShared::parent):
+
+2009-11-18 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Eric Seidel.
+
+ Add plugin visibility manual test
+
+ https://bugs.webkit.org/show_bug.cgi?id=31542
+
+ * manual-tests/plugins/windowed.html:
+ * manual-tests/plugins/windowless.html:
+
+2009-11-18 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector - remember last script displayed in Scripts panel
+ https://bugs.webkit.org/show_bug.cgi?id=27552
+
+ Manual test added
+
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.showScript):
+ (WebInspector.ScriptsPanel.prototype.showResource):
+ (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
+ (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu):
+ (WebInspector.ScriptsPanel.prototype._callFrameSelected):
+ (WebInspector.ScriptsPanel.prototype._goBack):
+ (WebInspector.ScriptsPanel.prototype._goForward):
+ * manual-tests/inspector/remember-last-script.html: Added.
+
+2009-11-18 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Win chromium is slow to draw transparent texts
+ https://bugs.webkit.org/show_bug.cgi?id=31258
+
+ Create bounded transparency layers instead of just clipping.
+
+ No new tests because this is just a performance improvement.
+
+ * platform/graphics/chromium/FontChromiumWin.cpp:
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
+
+2009-11-18 Shu Chang <Chang.Shu@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Add support for displaying deleteButton.
+ https://bugs.webkit.org/show_bug.cgi?id=31560
+
+ Test: LayoutTests/editing/deleting/5408255.html
+
+ * WebCore.qrc:
+ * platform/graphics/qt/ImageQt.cpp:
+ (loadResourcePixmap):
+
+2009-11-18 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix Qt build without JavaScript debugger.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31575
+
+ * page/Console.idl:
+
+2009-11-18 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Dave Hyatt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24971
+ And
+ <rdar://problem/7138265>
+
+ Fixes an issue where setting the height of a table row programmatically
+ (via JavaScript) causes the table to be improperly rendered because the
+ height of each row in the table is not recalculated with respect to the
+ CSS height property.
+
+ In particular, programmatically setting the height of some table row causes
+ the rows of that table to be rendered with a height equal to the minimum
+ height required by the cells in that row, regardless of any specified cell
+ heights. Instead, when RenderTableSection::recalcCells is called, the height
+ of each row should be set to the CSS height property just as we do in
+ RenderTableSection::addChild.
+
+ Test: fast/table/row-height-recalc2.html
+
+ * rendering/RenderTableSection.cpp:
+ (WebCore::setRowHeightToRowStyleHeightIfNotRelative): Added.
+ (WebCore::RenderTableSection::addChild): Moved code that set row height into
+ method WebCore::setRowHeightToRowStyleHeightIfNotRelative.
+ (WebCore::RenderTableSection::recalcCells): Modified to call
+ WebCore::setRowHeightToRowStyleHeightIfNotRelative.
+
+2009-11-18 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for the part of platform directory in WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=31473
+
+ Inherits the following classes from FastAllocBase because these are
+ instantiated by 'new':
+
+ class AnimationList - instantiated at WebCore/rendering/style/StyleRareNonInheritedData.cpp:85
+ class Color - instantiated at WebCore/rendering/RenderTheme.cpp:48
+ struct Length - instantiated at WebCore/platform/Length.cpp:103
+ class PlatformKeyboardEvent - instantiated at WebCore/dom/KeyboardEvent.cpp:63
+ class ContextMenuItem - instantiated at WebCore/platform/ContextMenu.cpp:70
+ class DeprecatedPtrList - instantiated at WebCore/rendering/RenderBlock.cpp:2284
+
+ Inherits the following classes from Noncopyable because these are
+ instantiated by 'new' and no need to be copyable:
+
+ class GraphicsContextPrivate - instantiated at WebCore/platform/graphics/GraphicsContext.cpp:78
+ class FontCache - instantiated at WebCore/platform/graphics/qt/FontCacheQt.cpp:43
+ struct MediaPlayerFactory - instantiated at WebCore/platform/graphics/MediaPlayer.cpp:163
+ class DeprecatedPtrListNode - instantiated at WebCore/platform/DeprecatedPtrListImpl.cpp:53
+
+ * platform/ContextMenuItem.h:
+ * platform/DeprecatedPtrList.h:
+ * platform/DeprecatedPtrListImpl.cpp:
+ * platform/Length.h:
+ * platform/PlatformKeyboardEvent.h:
+ * platform/animation/AnimationList.h:
+ * platform/graphics/Color.h:
+ * platform/graphics/FontCache.h:
+ * platform/graphics/GraphicsContextPrivate.h:
+ * platform/graphics/MediaPlayer.cpp:
+
+2009-11-18 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31186
+
+ Renames RenderTextControl::m_edited and RenderTextControl::m_userEdited to
+ m_wasChangedSinceLastChangeEvent and m_lastChangeWasUserEdit, respectively.
+ These are more descriptive names so as to clear an ambiguity surrounding
+ their usage. Also, renames associated setters and getters so that they
+ coincide with the renamed fields.
+
+ No functionality was changed. So, no tests were included.
+
+ * bindings/objc/DOMHTML.mm:
+ (-[DOMHTMLInputElement _isEdited]):
+ (-[DOMHTMLTextAreaElement _isEdited]):
+ * dom/Document.cpp:
+ (WebCore::Document::setFocusedNode):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::defaultEventHandler):
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::RenderTextControl):
+ (WebCore::RenderTextControl::setInnerTextValue):
+ (WebCore::RenderTextControl::setLastChangeWasUserEdit): Formerly named setUserEdited.
+ (WebCore::RenderTextControl::subtreeHasChanged):
+ * rendering/RenderTextControl.h:
+ (WebCore::RenderTextControl::wasChangedSinceLastChangeEvent): Formerly named isEdited.
+ (WebCore::RenderTextControl::setChangedSinceLastChangeEvent): Formerly named setEdited.
+ (WebCore::RenderTextControl::lastChangeWasUserEdit): Formerly named setUserEdited.
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
+ * wml/WMLInputElement.cpp:
+ (WebCore::WMLInputElement::defaultEventHandler):
+
+2009-11-18 Tony Chang <tony@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Remove V8CanvasPixelArrayCustom.cpp because it is no longer used by V8.
+ https://bugs.webkit.org/show_bug.cgi?id=31499
+
+ No new tests, just a build cleanup.
+
+ * WebCore.gypi:
+ * bindings/v8/custom/V8CanvasPixelArrayCustom.cpp: Removed.
+ * bindings/v8/custom/V8CustomBinding.h:
+
+2009-11-18 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Enable wx plugin support using the Windows implementation as a base.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31636
+
+ * platform/graphics/GraphicsContext.h:
+ (WebCore::GraphicsContext::inTransparencyLayer):
+ * platform/graphics/wx/GraphicsContextWx.cpp:
+ (WebCore::GraphicsContext::getWindowsContext):
+ (WebCore::GraphicsContext::releaseWindowsContext):
+ * platform/wx/FileSystemWx.cpp:
+ (WebCore::unloadModule):
+ (WebCore::listDirectory):
+ * plugins/PluginDatabase.cpp:
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::stop):
+ (WebCore::PluginView::PluginView):
+ * plugins/PluginView.h:
+ * plugins/win/PluginViewWin.cpp:
+ (windowHandleForPageClient):
+ (WebCore::PluginView::handleMouseEvent):
+ (WebCore::PluginView::platformStart):
+ (WebCore::PluginView::snapshot):
+ * wscript:
+
+2009-11-18 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Android] Add shared timer and sound utilities to platform/android
+ https://bugs.webkit.org/show_bug.cgi?id=31584
+
+ No new tests required, this is platform specific code.
+
+ * platform/android/SharedTimerAndroid.cpp: Added.
+ (WebCore::setSharedTimerFiredFunction):
+ (WebCore::setSharedTimerFireTime):
+ (WebCore::stopSharedTimer):
+ * platform/android/SoundAndroid.cpp: Added.
+ (WebCore::systemBeep):
+
+2009-11-18 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Fix profile tree nodes loss after focus / restore actions.
+
+ Focusing on a node is currently implemented via nodes reattaching
+ with some caching involved. It seems that not all code was updated
+ to handle this scenario correctly.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31553
+
+ * inspector/front-end/BottomUpProfileDataGridTree.js:
+ (WebInspector.BottomUpProfileDataGridNode):
+ (WebInspector.BottomUpProfileDataGridNode.prototype._restore):
+ (WebInspector.BottomUpProfileDataGridNode.prototype._sharedPopulate):
+ (WebInspector.BottomUpProfileDataGridNode.prototype._willHaveChildren):
+ * inspector/front-end/DataGrid.js:
+ (WebInspector.DataGrid.prototype.insertChild):
+ (WebInspector.DataGridNode.prototype._detach):
+ (WebInspector.DataGridNode.prototype.savePosition):
+ (WebInspector.DataGridNode.prototype.restorePosition):
+ * inspector/front-end/TopDownProfileDataGridTree.js:
+ (WebInspector.TopDownProfileDataGridTree.prototype.focus):
+ (WebInspector.TopDownProfileDataGridTree.prototype.restore):
+
+2009-11-18 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QWebPageClient.h needs in some cases QCursor, but it does not
+ include it
+ https://bugs.webkit.org/show_bug.cgi?id=31527
+
+ No new tests as this is just a coding style fix that affects the
+ build of some not yet submitted patches (i.e. for bug 30173).
+
+ * platform/qt/QWebPageClient.h:
+
+2009-11-18 Nicolas Roard <nicolas@roard.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ InspectorTimelineAgent.h should be guarded by ENABLE(INSPECTOR)
+ https://bugs.webkit.org/show_bug.cgi?id=31504
+
+ * inspector/InspectorTimelineAgent.h:Added the guard.
+
+2009-11-18 Jens Alfke <snej@chromium.org>
+
+ Build fix to my previous checkin, for Windows Chromium
+
+ * svg/SVGAnimatedProperty.h:
+ (WebCore::PropertySynchronizer::synchronize): Fix implicit-conversion error on AtomicString.
+
+2009-11-18 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Directly Access <head> Instead of Searching for It
+ https://bugs.webkit.org/show_bug.cgi?id=31641
+
+ Changed old access of the head element (document.getElementsByTagName)
+ to just use the document.head accessor.
+
+ * inspector/front-end/FontView.js:
+ (WebInspector.FontView):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.addStyleSelector):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._loaded):
+ * inspector/front-end/inspector.js:
+ (windowLoaded):
+
+2009-11-18 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Fix two Geolocation assertions.
+
+ * page/Chrome.cpp:
+ (WebCore::Chrome::requestGeolocationPermissionForFrame): No need to use PageGroupLoadDeferrer since this
+ is not called from JS.
+ * page/Geolocation.cpp:
+ (WebCore::Geolocation::Watchers::set): The PassRefPtr was getting nulled out, so we need to put it in
+ a RefPtr first.
+
+2009-11-18 Alexey Proskuryakov <ap@apple.com>
+
+ Case sensitive file system build fix.
+
+ * platform/network/Credential.h: It's not WTF, just wtf.
+
+2009-11-18 Aaron Golden <agolden@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Add support for certificates to WebCore::Credential so we can convert between NSURLCredential
+ objects and WebCore::Credential objects without losing certificate information.
+
+ * platform/network/Credential.cpp:
+ (WebCore::Credential::Credential): Adding a constructor that takes an identity argument and a certificate chain argument
+ (WebCore::Credential::isEmpty): Modifying isEmpty to support certificate based credentials (which don't have a username or password)
+ (WebCore::Credential::identity): Accessor for the m_identity property
+ (WebCore::Credential::certificates): Accessor for the m_certificates property
+ (WebCore::Credential::type): Accessor for the m_type property
+ (WebCore::operator==): Modifying == to compare the identity and certificate chains of certificate based credentials.
+ * platform/network/Credential.h: Adding new fields to WebCore::Credential to support certificate based credentials.
+ * platform/network/mac/AuthenticationMac.mm:
+ (WebCore::mac): Modifying the mac() conversion method to correctly convert certificate based WebCore::Credential objects.
+ (WebCore::core): Modifying the core() conversion method to correctly convert certificate based NSURLCredential objects.
+
+2009-11-18 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Reverting r50919 that has introduced a non-thread-safe refcounting in ScriptExecutionContext::postTaskToMainThread.
+ https://bugs.webkit.org/show_bug.cgi?id=31615
+
+ * dom/Document.cpp:
+ (WebCore::ScriptExecutionContextTaskTimer::ScriptExecutionContextTaskTimer):
+ (WebCore::ScriptExecutionContextTaskTimer::fired):
+ (WebCore::PerformTaskContext::PerformTaskContext):
+ (WebCore::performTask):
+ (WebCore::Document::postTask):
+ * dom/ScriptExecutionContext.cpp:
+ * dom/ScriptExecutionContext.h:
+
+2009-11-18 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Eliminate unnecessary String-->AtomicString conversions from generated V8 bindings,
+ by causing the right v8-to-WebCore conversion function to be called for every parameter.
+ This no longer requires any IDL metadata, so I've removed the [HintAtomic] annotations.
+ To enforce correctness, I added a mode that disables implicit
+ String-->AtomicString conversions while compiling the generated bindings.
+ https://bugs.webkit.org/show_bug.cgi?id=31168
+
+ * bindings/scripts/CodeGeneratorV8.pm: Generate usage of V8Parameter class.
+ * bindings/v8/DerivedSourcesAllInOne.cpp: Enable NO_IMPLICIT_ATOMICSTRING.
+ * bindings/v8/V8Binding.h: Add V8Parameter class.
+ * css/WebKitCSSKeyframesRule.h: Make AtomicString conversions explicit.
+ * dom/Document.idl: Remove obsolete [HintAtomic] annotation.
+ * platform/text/AtomicString.h: Added NO_IMPLICIT_ATOMICSTRING option.
+ * svg/SVGAnimatedTemplate.h: Change some return types to String to avoid implicit conversion.
+ * svg/SVGAnimatedProperty.h: Adapt to changed return types in SVGAnimatedTemplate.
+
+2009-11-18 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Move FillOrStrokeType out of public header.
+
+ * platform/graphics/GraphicsContext.h: Updated copyright date to cover
+ some years we published Apple changes, sorted forward declarations,
+ removed FillOrStrokeType enum.
+ * platform/graphics/GraphicsContextPrivate.h: Updated copyright date
+ to cover some years we published Apple changes, sorted includes,
+ moved FillOrStrokeType enum here.
+
+2009-11-18 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Add Settings for WebKitShowDebugBorders and WebKitShowRepaintCounter
+ https://bugs.webkit.org/show_bug.cgi?id=31601
+
+ These are used to debug accelerated compositing layers. I removed
+ the platform specific code from GraphicsLayerCA.mm and added calls
+ to GraphicsLayerClient to get it from the higher levels. The values
+ now get cached in RenderLayerCompositing and are queried from there
+ by RenderLayerBacking (which implements the GraphicsLayerClient interface).
+
+ * WebCore.base.exp:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::updateCompositingLayers):
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setShowDebugBorders):
+ (WebCore::Settings::setShowRepaintCounter):
+ * page/Settings.h:
+ (WebCore::Settings::showDebugBorders):
+ (WebCore::Settings::showRepaintCounter):
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::GraphicsLayer::showDebugBorders):
+ (WebCore::GraphicsLayer::showRepaintCounter):
+ * platform/graphics/GraphicsLayerClient.h:
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::showDebugBorders):
+ (WebCore::RenderLayerBacking::showRepaintCounter):
+ * rendering/RenderLayerBacking.h:
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::RenderLayerCompositor):
+ (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
+ * rendering/RenderLayerCompositor.h:
+ (WebCore::RenderLayerCompositor::showDebugBorders):
+ (WebCore::RenderLayerCompositor::showRepaintCounter):
+
+2009-11-18 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Get rid of metrics and properties sidebars'
+ flickering.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31629
+
+ * inspector/front-end/MetricsSidebarPane.js:
+ * inspector/front-end/PropertiesSidebarPane.js:
+
+2009-11-17 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Pavel Feldman.
+
+ Fixes <http://webkit.org/b/31606>.
+ Web Inspector: Enter/Return key should enter edit mode for Editable Fields.
+
+ This implements Enter starting editing mode in an editable DataGrid. If the
+ DataGrid is editable and the user hits return, startEditing the first child
+ of the selected node. Also refactored some editing functions to take an
+ event target instead of the event itself, because the functions only needed
+ the target. Lastly, added had return in editing mode stop propogation, because
+ when enter was hit to confirm text, it would propagate back to the datagrid
+ and try to start editing again.
+
+ * inspector/front-end/DataGrid.js:
+ (WebInspector.DataGrid.prototype._ondblclick):
+ (WebInspector.DataGrid.prototype._startEditing):
+ (WebInspector.DataGrid.prototype.handleKeyEvent):
+ (WebInspector.DataGrid.prototype.dataGridNodeFromEvent):
+ (WebInspector.DataGrid.prototype._mouseDownInDataTable):
+ (WebInspector.DataGrid.prototype._clickInDataTable):
+ * inspector/front-end/inspector.js:
+ (WebInspector.startEditing.element.handleKeyEvent):
+ (WebInspector.startEditing):
+
+2009-11-18 Ben Murdoch <benm@google.com>
+
+ Reviewed by Darin Adler.
+
+ HTMLAnchorElement is inconsistent with its internal handling of the value returned for the href attribute.
+ https://bugs.webkit.org/show_bug.cgi?id=31593
+
+ Test: fast/dom/HTMLAnchorElement/set-href-attribute-whitespace.html
+
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::href): Add call to deprecatedParseURL.
+
+2009-11-18 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed. Touch InspectorController so that frontend
+ JS files are deployed on Windows.
+
+ * inspector/InspectorController.cpp:
+
+2009-11-18 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: clone timeline records array instead of
+ copying reference on invalidate all.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31596
+
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype.invalidateAllItems):
+
+2009-11-18 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Elements don't drop out of compositing layers when animation ends
+ https://bugs.webkit.org/show_bug.cgi?id=31613
+ <rdar://problem/7402913>
+
+ Avoid setting the mustOverlapCompositedLayers flag on RenderLayers which
+ are compositing anyway for other reasons. Doing so can cause those layers
+ to stay in compositing mode even after animations finish, because needsToBeComposited()
+ continues to return true.
+
+ No new tests because it's not possible to determine which elements are in
+ compositing layers from DRT output.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+
+2009-11-18 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Mac Plugins: Remove null timer
+
+ A null timer was used to send mouse move events. Instead, we now use
+ move events to send nullEvent. This brings down CPU usage by 20-30%.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31624
+
+ * plugins/PluginView.h:
+ * plugins/mac/PluginViewMac.cpp:
+ (WebCore::PluginView::platformStart):
+ (WebCore::PluginView::handleMouseEvent):
+
+2009-11-18 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] WebKit crashes when loading certain SVG images
+
+ Check if the familly exist before creating the PlatformData from it.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29443
+
+ Test: svg/text/text-font-invalid.html
+
+ * platform/graphics/qt/FontFallbackListQt.cpp:
+ (WebCore::FontFallbackList::fontDataAt):
+
+2009-11-17 Nicolas Weber <thakis@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Fix crash in Chromium/Mac where dropdowns weren't dismissed correctly
+ after navigation.
+ https://bugs.webkit.org/show_bug.cgi?id=31609
+
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupContainer::showExternal): Set parent for external
+ dropdowns, so that |PopupListBox::hidePopup()| can successfully notify
+ its parent's client.
+
+2009-11-17 Hayato Ito <hayato@google.com>
+
+ Reviewed by Darin Adler.
+
+ Avoid infinite mutual recursion when deeply nested tags are loaded
+ https://bugs.webkit.org/show_bug.cgi?id=30651
+
+ Test: fast/parser/block-nesting-cap-table.html
+
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::parseToken):
+ (WebCore::tagPriorityOfNode):
+ (WebCore::HTMLParser::limitBlockDepth):
+ (WebCore::HTMLParser::insertNodeAfterLimitBlockDepth):
+ (WebCore::HTMLParser::insertNode):
+ * html/HTMLParser.h:
+
+2009-11-17 Brent Fulgham <bfulgham@webkit.org>
+
+ Rubber-stamped by Alexey Proskuryakov.
+
+ Final clean-ups for minor coding standard violations.
+ https://bugs.webkit.org/show_bug.cgi?id=26102.
+
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+
+2009-11-17 Johnny Ding <jnd@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ In all valid script tags for JavaScript, the event handler in <script...for> should not get executed.
+ https://bugs.webkit.org/show_bug.cgi?id=31567
+
+ * dom/ScriptElement.cpp:
+ (WebCore::ScriptElementData::shouldExecuteAsJavaScript):
+
+2009-11-17 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Make DRT show web inspector for tests in inspector/ folder.
+ - Updated DRT to show/close inspector for all tests under /inspector
+ - Introduced LayoutTestController::setTimelineProfilingEnabled and
+ WebInspector::setTimelineProfilingEnabled beside setJavaScriptProfilingEnabled
+ - Removed reload on each inspector test
+ - Renamed fast/inspector to fast/inspector-support in order not to trigger
+ inspector for those.
+ - Reimplemented timeline tests in order to get rid of reload there.
+ - Moved tests that don't require harness into the fast group.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31472
+
+ * WebCore.Inspector.exp:
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype._formatRecord):
+
+2009-11-17 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Android] Android is missing the implementation of the GeolocationService iface.
+ https://bugs.webkit.org/show_bug.cgi?id=31554
+
+ No new tests required as this is platform specific code.
+
+ * platform/android/GeolocationServiceAndroid.cpp: Added.
+ (WebCore::GeolocationServiceAndroid::create):
+ (WebCore::GeolocationServiceAndroid::GeolocationServiceAndroid):
+ (WebCore::GeolocationServiceAndroid::startUpdating):
+ (WebCore::GeolocationServiceAndroid::stopUpdating):
+ (WebCore::GeolocationServiceAndroid::suspend):
+ (WebCore::GeolocationServiceAndroid::resume):
+ (WebCore::GeolocationServiceAndroid::newPositionAvailable):
+ (WebCore::GeolocationServiceAndroid::newErrorAvailable):
+ (WebCore::GeolocationServiceAndroid::timerFired):
+ (WebCore::GeolocationServiceAndroid::isPositionMovement):
+ (WebCore::GeolocationServiceAndroid::isPositionMoreAccurate):
+ (WebCore::GeolocationServiceAndroid::isPositionMoreTimely):
+ * platform/android/GeolocationServiceAndroid.h: Added.
+ (WebCore::GeolocationServiceAndroid::~GeolocationServiceAndroid):
+ (WebCore::GeolocationServiceAndroid::lastPosition):
+ (WebCore::GeolocationServiceAndroid::lastError):
+ * platform/android/GeolocationServiceBridge.cpp: Added.
+ (WebCore::):
+ (WebCore::GeolocationServiceBridge::GeolocationServiceBridge):
+ (WebCore::GeolocationServiceBridge::~GeolocationServiceBridge):
+ (WebCore::GeolocationServiceBridge::start):
+ (WebCore::GeolocationServiceBridge::stop):
+ (WebCore::GeolocationServiceBridge::setEnableGps):
+ (WebCore::GeolocationServiceBridge::newLocationAvailable):
+ (WebCore::GeolocationServiceBridge::newErrorAvailable):
+ (WebCore::GeolocationServiceBridge::toGeoposition):
+ (WebCore::GeolocationServiceBridge::startJavaImplementation):
+ (WebCore::GeolocationServiceBridge::stopJavaImplementation):
+ * platform/android/GeolocationServiceBridge.h: Added.
+
+2009-11-16 Kent Tamura <tkent@chromium.org>
+
+ Unreviewd build fix.
+
+ - Fix typo in WebCore.vcproj.
+ - Intlude limits.h for INT_MAX.
+ - Enclose with parenthesis to suspress warning.
+
+ * WebCore.vcproj/WebCore.vcproj:
+ * html/ISODateTime.cpp:
+ (WebCore::ISODateTime::addDay):
+
+2009-11-16 Robin Dunn <robin@alldunn.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Make sure wx scrollbar drawing code factors in transforms when switching backends,
+ fix calcs for scrollbar length, and tweak the Mac scrollbar tracking rects.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31570
+
+ * platform/wx/ScrollbarThemeWx.cpp:
+ (WebCore::ScrollbarThemeWx::minimumThumbLength):
+ (WebCore::ScrollbarThemeWx::splitTrack):
+ (WebCore::ScrollbarThemeWx::forwardButtonRect):
+ * platform/wx/ScrollbarThemeWx.h:
+ * platform/wx/wxcode/gtk/scrollbar_render.cpp:
+ (wxRenderer_DrawScrollbar):
+ * platform/wx/wxcode/scrollbar_render.h:
+ (calcThumbStartAndLength):
+ * platform/wx/wxcode/win/scrollbar_render.cpp:
+ (wxRenderer_DrawScrollbar):
+
+2009-11-16 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by David Levin.
+
+ Introduce WebCore::ISODateTime class.
+ https://bugs.webkit.org/show_bug.cgi?id=31340
+
+ This class represents a value of date/time types of the HTML5 INPUT
+ element, and has some parsing methods for ISO 8601.
+
+ This change has no tests because the class is not used yet.
+
+ * GNUmakefile.am: Add ISODateTime.cpp and ISODateTime.h.
+ * WebCore.gypi: ditto.
+ * WebCore.pro: ditto.
+ * WebCore.vcproj/WebCore.vcproj: ditto.
+ * WebCore.xcodeproj/project.pbxproj: ditto.
+ * WebCoreSources.bkl: ditto.
+ * html/ISODateTime.cpp: Added. Implementation of WebCore::ISODateTime class.
+ (WebCore::isLeapYear):
+ (WebCore::maxDayOfMonth):
+ (WebCore::dayOfWeek):
+ (WebCore::ISODateTime::maxWeekNumberInYear):
+ (WebCore::countDigits):
+ (WebCore::toInt):
+ (WebCore::ISODateTime::parseYear): Private helper for parseDate() and parseWeek().
+ (WebCore::ISODateTime::addDay): Private helper for parseTimeZone().
+ (WebCore::ISODateTime::addMinute): ditto.
+ (WebCore::ISODateTime::parseTimeZone): Private helper for parseDateTime().
+ (WebCore::ISODateTime::parseMonth): Parser for <input type=month>.
+ (WebCore::ISODateTime::parseDate): Parser for <input type=date>.
+ (WebCore::ISODateTime::parseWeek): Parser for <input type=week>.
+ (WebCore::ISODateTime::parseTime): Parser for <input type=time>.
+ (WebCore::ISODateTime::parseDateTimeLocal): Parser for <input type=datetime-local>.
+ (WebCore::ISODateTime::parseDateTime): Parser for <input type=datetime>.
+ * html/ISODateTime.h: Added. Declare WebCore::ISODateTime class.
+ (WebCore::ISODateTime::ISODateTime):
+ (WebCore::ISODateTime::millisecond):
+ (WebCore::ISODateTime::second):
+ (WebCore::ISODateTime::minute):
+ (WebCore::ISODateTime::hour):
+ (WebCore::ISODateTime::monthDay):
+ (WebCore::ISODateTime::month):
+ (WebCore::ISODateTime::fullYear):
+ (WebCore::ISODateTime::week):
+
+2009-11-16 Alexey Proskuryakov <ap@apple.com>
+
+ Fix a typo in previous commit.
+
+ * platform/network/cf/SocketStreamHandleCFNet.cpp: #ifdef, not #if.
+
+2009-11-16 Alexey Proskuryakov <ap@apple.com>
+
+ Fix a typo in previous commit.
+
+ * platform/network/cf/SocketStreamHandleCFNet.cpp:
+
+2009-11-16 Alexey Proskuryakov <ap@apple.com>
+
+ Tiger build fix.
+
+ * platform/network/cf/SocketStreamHandleCFNet.cpp: Define CFN_EXPORT, as this macro was named
+ differently in Tiger CFNetwork.
+
+2009-11-16 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [KURLGoogle] setHostAndPort doesn't handle arguments without port correctly.
+
+ Fix a bug in the code that was dormant until http://trac.webkit.org/changeset/50784.
+
+ Covered by existing test: LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host.html
+
+ * platform/KURLGoogle.cpp:
+ (WebCore::KURL::setHostAndPort): Added handling of arguments without port specified.
+
+2009-11-16 Alexey Proskuryakov <ap@apple.com>
+
+ Rubber-stamped by Jon Honeycutt.
+
+ A better Windows build fix
+
+ * platform/network/cf/SocketStreamHandleCFNet.cpp: (WebCore::SocketStreamHandle::createStreams):
+ Use a macro that inserts __declspec(dllimport) when appropriate for CFNetwork imports.
+
+2009-11-16 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Rename protocolIsValid to isValidProtocol.
+ https://bugs.webkit.org/show_bug.cgi?id=31503
+
+ This name change was suggested in https://bugs.webkit.org/show_bug.cgi?id=29972#c19.
+
+ No new tests since no new functionality was introduced.
+
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::setProtocol):
+ * platform/KURL.cpp:
+ (WebCore::isValidProtocol):
+ * platform/KURL.h:
+ * platform/KURLGoogle.cpp:
+ (WebCore::isValidProtocol):
+
+2009-11-16 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ AX: aria-labelledby duplicates some of its WAI-ARIA label
+ https://bugs.webkit.org/show_bug.cgi?id=31565
+
+ Test: accessibility/aria-labelledby-overrides-label.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::hasTextAlternative):
+ (WebCore::AccessibilityRenderObject::exposesTitleUIElement):
+ (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
+ * accessibility/AccessibilityRenderObject.h:
+
+2009-11-16 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Handle the case of a null NPObject* in NPN_SetException in
+ the V8 bindings. This allow out of process plugins calling
+ NPN_SetException to just send null instead of sending an
+ NPObject* that would be an address in a different
+ process's memory space.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31561
+
+ * bindings/v8/NPV8Object.cpp:
+ (_NPN_SetException): Allow null NPObject* and just throw a general error.
+
+2009-11-16 Alexey Proskuryakov <ap@apple.com>
+
+ Windows build fix.
+
+ * platform/network/cf/SocketStreamHandleCFNet.cpp: (WebCore::SocketStreamHandle::createStreams):
+ Disable CONNECT proxies on Windows until WebKitSupportLibrary includes support for those.
+
+2009-11-14 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] ASSERT failure while running DRT
+ https://bugs.webkit.org/show_bug.cgi?id=30978
+
+ Add needed Structure typeInfo flags to QtRuntimeObjectImpl and QtRuntimeMethod.
+ These flags are needed after r49649, where HasDefaultmark was changed to OverrideMarkChildren.
+
+ * bridge/qt/qt_instance.cpp:
+ (JSC::Bindings::QtRuntimeObjectImp::createStructure):
+ * bridge/qt/qt_runtime.h:
+ (JSC::Bindings::QtRuntimeMethod::createStructure):
+
+2009-11-16 Mark Rowe <mrowe@apple.com>
+
+ Attempt to fix the build. Land a file that was missing from r51049.
+
+ * bindings/js/JSWebGLArrayHelper.h: Copied from WebCore/html/canvas/WebGLByteArray.idl.
+ (WebCore::setWebGLArrayFromArray):
+
+2009-11-16 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Oliver Hunt.
+
+ Update API of WebGLArray and friends
+ https://bugs.webkit.org/show_bug.cgi?id=31175
+
+ * bindings/js/JSWebGLArrayCustom.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSWebGLArrayHelper.h: Added.
+ (WebCore::setWebGLArrayFromArray):
+ * bindings/js/JSWebGLByteArrayCustom.cpp:
+ (WebCore::JSWebGLByteArray::set):
+ * bindings/js/JSWebGLFloatArrayCustom.cpp:
+ (WebCore::JSWebGLFloatArray::set):
+ * bindings/js/JSWebGLIntArrayCustom.cpp:
+ (WebCore::JSWebGLIntArray::set):
+ * bindings/js/JSWebGLShortArrayCustom.cpp:
+ (WebCore::JSWebGLShortArray::set):
+ * bindings/js/JSWebGLUnsignedByteArrayCustom.cpp:
+ (WebCore::JSWebGLUnsignedByteArray::set):
+ * bindings/js/JSWebGLUnsignedIntArrayCustom.cpp:
+ (WebCore::JSWebGLUnsignedIntArray::set):
+ * bindings/js/JSWebGLUnsignedShortArrayCustom.cpp:
+ (WebCore::JSWebGLUnsignedShortArray::set):
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertToV8Object):
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8WebGLArrayBufferCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WebGLArrayCustom.h:
+ (WebCore::constructWebGLArray):
+ (WebCore::getWebGLArrayElement):
+ (WebCore::setWebGLArrayFromArray):
+ (WebCore::setWebGLArray):
+ * bindings/v8/custom/V8WebGLByteArrayCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WebGLFloatArrayCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WebGLIntArrayCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WebGLShortArrayCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WebGLUnsignedByteArrayCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WebGLUnsignedIntArrayCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WebGLUnsignedShortArrayCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * html/canvas/WebGLArray.cpp:
+ (WebCore::WebGLArray::WebGLArray):
+ (WebCore::WebGLArray::~WebGLArray):
+ (WebCore::WebGLArray::setImpl):
+ * html/canvas/WebGLArray.h:
+ (WebCore::WebGLArray::isByteArray):
+ (WebCore::WebGLArray::isUnsignedByteArray):
+ (WebCore::WebGLArray::isShortArray):
+ (WebCore::WebGLArray::isUnsignedShortArray):
+ (WebCore::WebGLArray::isIntArray):
+ (WebCore::WebGLArray::isUnsignedIntArray):
+ (WebCore::WebGLArray::isFloatArray):
+ (WebCore::WebGLArray::buffer):
+ (WebCore::WebGLArray::baseAddress):
+ (WebCore::WebGLArray::byteOffset):
+ * html/canvas/WebGLArray.idl:
+ * html/canvas/WebGLArrayBuffer.cpp:
+ (WebCore::WebGLArrayBuffer::create):
+ (WebCore::WebGLArrayBuffer::WebGLArrayBuffer):
+ (WebCore::WebGLArrayBuffer::data):
+ (WebCore::WebGLArrayBuffer::byteLength):
+ (WebCore::WebGLArrayBuffer::~WebGLArrayBuffer):
+ * html/canvas/WebGLArrayBuffer.h:
+ * html/canvas/WebGLByteArray.cpp:
+ (WebCore::WebGLByteArray::create):
+ (WebCore::WebGLByteArray::byteLength):
+ (WebCore::WebGLByteArray::slice):
+ (WebCore::WebGLByteArray::set):
+ * html/canvas/WebGLByteArray.h:
+ (WebCore::WebGLByteArray::isByteArray):
+ (WebCore::WebGLByteArray::data):
+ (WebCore::WebGLByteArray::set):
+ (WebCore::WebGLByteArray::get):
+ (WebCore::WebGLByteArray::item):
+ * html/canvas/WebGLByteArray.idl:
+ * html/canvas/WebGLFloatArray.cpp:
+ (WebCore::WebGLFloatArray::create):
+ (WebCore::WebGLFloatArray::WebGLFloatArray):
+ (WebCore::WebGLFloatArray::length):
+ (WebCore::WebGLFloatArray::byteLength):
+ (WebCore::WebGLFloatArray::slice):
+ (WebCore::WebGLFloatArray::set):
+ * html/canvas/WebGLFloatArray.h:
+ (WebCore::WebGLFloatArray::isFloatArray):
+ (WebCore::WebGLFloatArray::data):
+ (WebCore::WebGLFloatArray::set):
+ (WebCore::WebGLFloatArray::get):
+ (WebCore::WebGLFloatArray::item):
+ * html/canvas/WebGLFloatArray.idl:
+ * html/canvas/WebGLIntArray.cpp:
+ (WebCore::WebGLIntArray::create):
+ (WebCore::WebGLIntArray::WebGLIntArray):
+ (WebCore::WebGLIntArray::length):
+ (WebCore::WebGLIntArray::byteLength):
+ (WebCore::WebGLIntArray::slice):
+ (WebCore::WebGLIntArray::set):
+ * html/canvas/WebGLIntArray.h:
+ (WebCore::WebGLIntArray::isIntArray):
+ (WebCore::WebGLIntArray::data):
+ (WebCore::WebGLIntArray::set):
+ (WebCore::WebGLIntArray::get):
+ (WebCore::WebGLIntArray::item):
+ * html/canvas/WebGLIntArray.idl:
+ * html/canvas/WebGLShortArray.cpp:
+ (WebCore::WebGLShortArray::create):
+ (WebCore::WebGLShortArray::WebGLShortArray):
+ (WebCore::WebGLShortArray::length):
+ (WebCore::WebGLShortArray::byteLength):
+ (WebCore::WebGLShortArray::slice):
+ (WebCore::WebGLShortArray::set):
+ * html/canvas/WebGLShortArray.h:
+ (WebCore::WebGLShortArray::isShortArray):
+ (WebCore::WebGLShortArray::data):
+ (WebCore::WebGLShortArray::set):
+ (WebCore::WebGLShortArray::get):
+ (WebCore::WebGLShortArray::item):
+ * html/canvas/WebGLShortArray.idl:
+ * html/canvas/WebGLUnsignedByteArray.cpp:
+ (WebCore::WebGLUnsignedByteArray::create):
+ (WebCore::WebGLUnsignedByteArray::WebGLUnsignedByteArray):
+ (WebCore::WebGLUnsignedByteArray::length):
+ (WebCore::WebGLUnsignedByteArray::byteLength):
+ (WebCore::WebGLUnsignedByteArray::slice):
+ (WebCore::WebGLUnsignedByteArray::set):
+ * html/canvas/WebGLUnsignedByteArray.h:
+ (WebCore::WebGLUnsignedByteArray::isUnsignedByteArray):
+ (WebCore::WebGLUnsignedByteArray::data):
+ (WebCore::WebGLUnsignedByteArray::set):
+ (WebCore::WebGLUnsignedByteArray::get):
+ (WebCore::WebGLUnsignedByteArray::item):
+ * html/canvas/WebGLUnsignedByteArray.idl:
+ * html/canvas/WebGLUnsignedIntArray.cpp:
+ (WebCore::WebGLUnsignedIntArray::create):
+ (WebCore::WebGLUnsignedIntArray::WebGLUnsignedIntArray):
+ (WebCore::WebGLUnsignedIntArray::length):
+ (WebCore::WebGLUnsignedIntArray::byteLength):
+ (WebCore::WebGLUnsignedIntArray::slice):
+ (WebCore::WebGLUnsignedIntArray::set):
+ * html/canvas/WebGLUnsignedIntArray.h:
+ (WebCore::WebGLUnsignedIntArray::isUnsignedIntArray):
+ (WebCore::WebGLUnsignedIntArray::data):
+ (WebCore::WebGLUnsignedIntArray::set):
+ (WebCore::WebGLUnsignedIntArray::get):
+ (WebCore::WebGLUnsignedIntArray::item):
+ * html/canvas/WebGLUnsignedIntArray.idl:
+ * html/canvas/WebGLUnsignedShortArray.cpp:
+ (WebCore::WebGLUnsignedShortArray::create):
+ (WebCore::WebGLUnsignedShortArray::WebGLUnsignedShortArray):
+ (WebCore::WebGLUnsignedShortArray::length):
+ (WebCore::WebGLUnsignedShortArray::byteLength):
+ (WebCore::WebGLUnsignedShortArray::slice):
+ (WebCore::WebGLUnsignedShortArray::set):
+ * html/canvas/WebGLUnsignedShortArray.h:
+ (WebCore::WebGLUnsignedShortArray::isUnsignedShortArray):
+ (WebCore::WebGLUnsignedShortArray::data):
+ (WebCore::WebGLUnsignedShortArray::set):
+ (WebCore::WebGLUnsignedShortArray::get):
+ (WebCore::WebGLUnsignedShortArray::item):
+ * html/canvas/WebGLUnsignedShortArray.idl:
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::bufferData):
+ (WebCore::GraphicsContext3D::bufferSubData):
+
+2009-11-16 Alexey Proskuryakov <ap@apple.com>
+
+ Windows build fix.
+
+ * platform/network/cf/SocketStreamHandleCFNet.cpp: Declare constants as extern "C".
+
+2009-11-15 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ Enable support for webkit-box-shadow in Cairo builds.
+ https://bugs.webkit.org/show_bug.cgi?id=26102.
+
+ Covered by existing fast/box-shadow tests.
+
+ * platform/graphics/cairo/GraphicsContextCairo.cpp: Add
+ support for fillRect shadows.
+
+2009-11-16 Alexey Proskuryakov <ap@apple.com>
+
+ Windows build fix.
+
+ * platform/network/cf/SocketStreamHandleCFNet.cpp: Don't try to include a file that's not
+ in WebKitSupportLibrary.
+
+2009-11-16 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31494
+ Add unauthenticated proxy support to SocketStreamHandleCFNet
+
+ Cannot be tested in DRT.
+
+ * platform/network/cf/SocketStreamHandleCFNet.cpp:
+ (WebCore::SocketStreamHandle::chooseProxy): Fetch proxy information from OS.
+ (WebCore::SocketStreamHandle::createStreams): Apply it to the newly created streams.
+
+2009-11-14 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Antti Koivisto.
+
+ [Qt] Broken back/forward after using ErrorPageExtension to set error page
+ https://bugs.webkit.org/show_bug.cgi?id=30573
+
+ Make FrameLoader::checkLoadCompleteForThisFrame method
+ to check for any working DocumentLoader instance (through
+ activeDocumentLoader()) instead of only checking for
+ 'm_provisionalDocumentLoader' in order to decide to if
+ it is going to reset of not the back and forward history.
+ after an error page has been loaded.
+
+ Test: LayoutTests/fast/history/back-forward-reset-after-error-handling.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
+
+2009-11-14 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Need to implement ARIA role="directory"
+ https://bugs.webkit.org/show_bug.cgi?id=31516
+
+ Test: platform/mac/accessibility/aria-directory.html
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::getOrCreate):
+ * accessibility/AccessibilityList.cpp:
+ (WebCore::AccessibilityList::isOrderedList):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::createARIARoleMap):
+
+2009-11-15 Dave Tapuska <dtapuska@rim.com>
+
+ Reviewed by George Staikos.
+
+ Compare UChars single unit at a time as opposed to the uint32_t
+ approach as casting to unaligned addresses may cause a bus failure
+ on ARMv5 and below. This change replicates the same defines that
+ exists in AtomicString.cpp
+
+ https://bugs.webkit.org/show_bug.cgi?id=31475
+
+ * platform/text/StringHash.h:
+ (WebCore::StringHash::equal):
+
+2009-11-15 Evan Martin <evan@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Wrap some SVG code in V8DOMWrapper with an ENABLE(SVG) test.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31490
+
+ * bindings/v8/V8DOMWrapper.cpp:
+
+2009-11-15 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Adam Barth.
+
+ [Haiku] Build fix. The FileChooser constructor doesn't need to be redefined.
+
+ * platform/haiku/FileChooserHaiku.cpp:
+
+2009-11-15 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Adam Barth.
+
+ [Haiku] Build fix. ColorSpace name had a wrong CamelCase.
+
+ * platform/graphics/haiku/GraphicsContextHaiku.cpp:
+ (WebCore::GraphicsContext::setPlatformStrokeColor):
+
+2009-11-15 Daniel Bates <dbates@webkit.org>
+
+ No review, rolling out r50999.
+ http://trac.webkit.org/changeset/50999
+
+ Need to fix some issues in the Windows build. Missed some places where
+ RenderTextControl::isEdited is called.
+
+ * bindings/objc/DOMHTML.mm:
+ (-[DOMHTMLInputElement _isEdited]):
+ (-[DOMHTMLTextAreaElement _isEdited]):
+ * dom/Document.cpp:
+ (WebCore::Document::setFocusedNode):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::defaultEventHandler):
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::RenderTextControl):
+ (WebCore::RenderTextControl::setInnerTextValue):
+ (WebCore::RenderTextControl::setUserEdited):
+ (WebCore::RenderTextControl::subtreeHasChanged):
+ * rendering/RenderTextControl.h:
+ (WebCore::RenderTextControl::isEdited):
+ (WebCore::RenderTextControl::setEdited):
+ (WebCore::RenderTextControl::isUserEdited):
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
+ * wml/WMLInputElement.cpp:
+ (WebCore::WMLInputElement::defaultEventHandler):
+
+2009-11-15 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31186
+
+ Renames RenderTextControl::m_edited and RenderTextControl::m_userEdited to
+ m_wasChangedSinceLastChangeEvent and m_lastChangeWasUserEdit, respectively.
+ These are more descriptive names so as to clear an ambiguity surrounding
+ their usage. Also, renames associated setters and getters so that they
+ coincide with the renamed fields.
+
+ No functionality was changed. So, no tests were included.
+
+ * bindings/objc/DOMHTML.mm:
+ (-[DOMHTMLInputElement _isEdited]):
+ (-[DOMHTMLTextAreaElement _isEdited]):
+ * dom/Document.cpp:
+ (WebCore::Document::setFocusedNode):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::defaultEventHandler):
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::RenderTextControl):
+ (WebCore::RenderTextControl::setInnerTextValue):
+ (WebCore::RenderTextControl::setLastChangeWasUserEdit): Formerly named setUserEdited.
+ (WebCore::RenderTextControl::subtreeHasChanged):
+ * rendering/RenderTextControl.h:
+ (WebCore::RenderTextControl::wasChangedSinceLastChangeEvent): Formerly named isEdited.
+ (WebCore::RenderTextControl::setChangedSinceLastChangeEvent): Formerly named setEdited.
+ (WebCore::RenderTextControl::lastChangeWasUserEdit): Formerly named setUserEdited.
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
+ * wml/WMLInputElement.cpp:
+ (WebCore::WMLInputElement::defaultEventHandler):
+
+2009-11-14 Adele Peterson <adele@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for <rdar://problem/6946165> Would like to be able to specify the number of visible lines when using -webkit-line-clamp
+
+ Test: fast/overflow/line-clamp.html
+
+ * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Updated to handle different types of values.
+ * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): ditto.
+ * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): ditto.
+
+ * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutVerticalBox):
+ Use the line count value if available. Otherwise, convert the percentage to the line count, as we did before. Also,
+ if there is anchor as the last child box, still allow adding the ellipsis.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::scrollByRecursively): Call isNone on the LineClampValue to see if the line-clamp property has been set.
+ (WebCore::RenderLayer::scrollRectToVisible): ditto.
+
+ * WebCore.xcodeproj/project.pbxproj: Added LineClampValue.h
+ * rendering/style/LineClampValue.h: Added.
+ (WebCore::LineClampValue::LineClampValue):
+ (WebCore::LineClampValue::value):
+ (WebCore::LineClampValue::isPercentage):
+ (WebCore::LineClampValue::isNone):
+ (WebCore::LineClampValue::operator==):
+ (WebCore::LineClampValue::operator!=):
+ * rendering/style/RenderStyleConstants.h: (WebCore::): Define ELineClampType enum for percentage or line count.
+
+ * rendering/style/RenderStyle.h: Use LineClampValue.
+ (WebCore::InheritedFlags::lineClamp):
+ (WebCore::InheritedFlags::setLineClamp):
+ (WebCore::InheritedFlags::initialLineClamp):
+ * rendering/style/StyleRareNonInheritedData.h:
+
+2009-11-14 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/7287487>
+ Do not use QuickTime version to detect media controller theme
+
+ * WebCore.base.exp: Export wkMediaControllerThemeAvailable
+ * platform/mac/WebCoreSystemInterface.h: Ditto.
+ * platform/mac/WebCoreSystemInterface.mm: Ditto.
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::mediaControllerTheme): Use wkMediaControllerThemeAvailable instead of the
+ QuickTime version to see if it is possible to use MediaControllerThemeQuickTime.
+
+2009-11-14 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ - Recognizes date/datetime/datetime-local/month/time/week types of INPUT element.
+ They have no dedicated UI and no type validation for now.
+ - Clean up setInputType() and formControlType() of HTMLInputElement.
+ https://bugs.webkit.org/show_bug.cgi?id=29004
+
+ Test: fast/forms/input-type-change3.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::valueMissing):
+ (WebCore::HTMLInputElement::patternMismatch):
+ (WebCore::HTMLInputElement::tooLong):
+ (WebCore::createTypeMap):
+ (WebCore::HTMLInputElement::setInputType):
+ (WebCore::createFormControlTypes):
+ (WebCore::HTMLInputElement::formControlType):
+ (WebCore::HTMLInputElement::saveFormControlState):
+ (WebCore::HTMLInputElement::restoreFormControlState):
+ (WebCore::HTMLInputElement::accessKeyAction):
+ (WebCore::HTMLInputElement::rendererIsNeeded):
+ (WebCore::HTMLInputElement::createRenderer):
+ (WebCore::HTMLInputElement::appendFormData):
+ (WebCore::HTMLInputElement::isTextField):
+ (WebCore::HTMLInputElement::valueWithDefault):
+ (WebCore::HTMLInputElement::storesValueSeparateFromAttribute):
+ (WebCore::HTMLInputElement::defaultEventHandler):
+ (WebCore::HTMLInputElement::isRequiredFormControl):
+ (WebCore::HTMLInputElement::dataList):
+ * html/HTMLInputElement.h:
+ (WebCore::HTMLInputElement::):
+
+2009-11-13 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ WAI-ARIA: checkbox does not determine its label from text content
+ https://bugs.webkit.org/show_bug.cgi?id=31456
+
+ Test: accessibility/aria-checkbox-text.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::title):
+
+2009-11-13 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [Chromium] Fix build to catch up with http://trac.webkit.org/changeset/50973.
+ This is just enough changes to unbreak the port.
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::mainThreadNormalWorld):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::initContextIfNeeded):
+ * loader/FrameLoaderClient.h:
+
+2009-11-13 Aaron Boodman <aa@chromium.org>
+
+ Unreviewed fix for Chromium build.
+
+ * loader/FrameLoaderClient.h:
+ (WebCore::FrameLoaderClient::dispatchDidClearWindowObjectInWorld):
+ Provide an empty implementation of this method because I don't know
+ what it is supposed to do on Chromium.
+
+2009-11-13 Aaron Boodman <aa@chromium.org>
+
+ Unreviewed fix for Chromium build.
+
+ * loader/FrameLoader.h: Make dispatchDidClearWindowObjectsInAllWorlds()
+ public, as Chromium's V8Proxy calls it.
+
+2009-11-13 Aaron Boodman <aa@chromium.org>
+
+ Unreviewed fix to Chromium build.
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::getAllWorlds):
+
+2009-11-13 Aaron Boodman <aa@chromium.org>
+
+ Unreviewed fix for Chromium build.
+
+ * platform/text/TextBoundaries.cpp: Use longer path to refer to Unicode.h.
+
+2009-11-13 Adam Barth <abarth@webkit.org>
+
+ Unreviewed partial build fix for Chromium. Should fix failure #4.
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::getAllWorlds):
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::initContextIfNeeded):
+
+2009-11-13 Adam Barth <abarth@webkit.org>
+
+ Unreviewed partial build fix for Chromium.
+
+ * bindings/v8/ScriptController.h:
+ (WebCore::ScriptController::getAllWorlds):
+
+2009-11-13 Eric Seidel <eric@webkit.org>
+
+ No review, build fix only.
+
+ Fix Windows and Chromium builds after http://trac.webkit.org/changeset/50977.
+
+ Unify TextBoundaries implementations by only relying on WTF Unicode abstractions
+ https://bugs.webkit.org/show_bug.cgi?id=31468
+
+ * WebCore.gypi: Rename TextBoundariesICU -> TextBoundaries
+ * WebCore.vcproj/WebCore.vcproj: Rename TextBoundariesICU -> TextBoundaries
+
+2009-11-12 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ LocalStorage quota should include key sizes in its count
+ https://bugs.webkit.org/show_bug.cgi?id=31451
+
+ * storage/StorageMap.cpp:
+ (WebCore::StorageMap::setItem):
+ Count keys in the quota when adding a new item.
+ (WebCore::StorageMap::removeItem):
+ Remove the key's length from the quota if we're removing the item.
+ (WebCore::StorageMap::importItem):
+ Assume that we're adding things for the first time.
+ Count keys in the quota.
+
+2009-11-13 Dominik Röttsches <dominik.roettsches@access-company.com>
+
+ Reviewed by Eric Seidel.
+
+ Unify TextBoundaries implementations by only relying on WTF Unicode abstractions
+ https://bugs.webkit.org/show_bug.cgi?id=31468
+
+ Moving TextBoundariesICU.cpp to TextBoundaries.cpp
+ by removing the direct ICU dependency and replacing it
+ with WTF functions and WebCore's own TextBreakIterator
+ abstractions.
+
+ * GNUmakefile.am:
+ * platform/graphics/gtk/SimpleFontDataGtk.cpp:
+ * platform/text/TextBoundaries.cpp: Added.
+ (WebCore::findNextWordFromIndex):
+ (WebCore::findWordBoundary):
+ * platform/text/TextBoundariesICU.cpp: Removed.
+ * platform/text/TextBreakIterator.h:
+ * platform/text/TextBreakIteratorICU.cpp:
+ (WebCore::textBreakLast):
+ (WebCore::textBreakPrevious):
+
+2009-11-13 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ WebCore::externalRepresentation should update layout before getting render object
+ https://bugs.webkit.org/show_bug.cgi?id=31459
+
+ * rendering/RenderTreeAsText.cpp:
+ (WebCore::externalRepresentation):
+
+2009-11-13 Adam Roben <aroben@apple.com>
+
+ Tell FrameLoaderClient when window objects in isolated worlds are
+ cleared
+
+ Fixes <http://webkit.org/b/31124> Tell the WebFrameLoadDelegate when
+ window objects in isolated worlds are cleared
+
+ Test: http/tests/security/isolatedWorld/didClearWindowObject.html
+
+ Reviewed by Dave Hyatt.
+
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::WebCoreJSClientData::getAllWorlds): Added. Copies all the
+ worlds in m_worldSet to the passed-in Vector.
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::getAllWorlds): Added. Calls through to
+ WebCoreJSClientData.
+ (WebCore::ScriptController::initScript): Changed to call
+ FrameLoader::dispatchDidClearWindowObjectInWorld.
+
+ * bindings/js/ScriptController.h: Added getAllWorlds.
+
+ * loader/EmptyClients.h:
+ (WebCore::EmptyFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
+ Updated for FrameLoaderClient change.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::receivedFirstData):
+ (WebCore::FrameLoader::begin):
+ Changed to call dispatchDidClearWindowObjectsInAllWorlds.
+
+ (WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds):
+ Added. Retrieves all the worlds, then calls through to
+ dispatchDidClearWindowObjectInWorld for each one.
+ (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld): Replaces
+ dispatchWindowObjectAvailable. Calls up to the client, then, if the
+ world is the mainThreadNormalWorld(), tells the Inspector about it,
+ too.
+
+ * loader/FrameLoader.h: Replaced dispatchWindowObjectAvailable with
+ dispatchDidClearWindowObjectInWorld. Added
+ dispatchDidClearWindowObjectsInAllWorlds.
+
+ * loader/FrameLoaderClient.h: Replaced windowObjectCleared with
+ dispatchDidClearWindowObjectForWorld.
+
+2009-11-13 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Fix SVG context assignment for pod types.
+ https://bugs.webkit.org/show_bug.cgi?id=31497
+
+ I broke this in r50958.
+
+ Tested by svg/custom/viewport-update2.svg.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+
+2009-11-13 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Dmitry Titov.
+
+ Bring the platform/android files inline with Android 2.0
+ https://bugs.webkit.org/show_bug.cgi?id=31423
+
+ No new tests required: these are all Android-specific files.
+
+ * platform/android/ClipboardAndroid.cpp:
+ (WebCore::ClipboardAndroid::files):
+ * platform/android/ClipboardAndroid.h:
+ * platform/android/FileChooserAndroid.cpp:
+ (WebCore::FileChooser::basenameForWidth):
+ (WebCore::fileButtonChooseFileLabel):
+ * platform/android/KeyEventAndroid.cpp:
+ (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
+ * platform/android/LocalizedStringsAndroid.cpp:
+ (WebCore::contextMenuItemTagOpenLinkInNewWindow):
+ (WebCore::contextMenuItemTagDownloadLinkToDisk):
+ (WebCore::contextMenuItemTagCopyLinkToClipboard):
+ (WebCore::contextMenuItemTagOpenImageInNewWindow):
+ (WebCore::contextMenuItemTagDownloadImageToDisk):
+ (WebCore::contextMenuItemTagCopyImageToClipboard):
+ (WebCore::contextMenuItemTagOpenFrameInNewWindow):
+ (WebCore::contextMenuItemTagCopy):
+ (WebCore::contextMenuItemTagGoBack):
+ (WebCore::contextMenuItemTagGoForward):
+ (WebCore::contextMenuItemTagStop):
+ (WebCore::contextMenuItemTagReload):
+ (WebCore::contextMenuItemTagCut):
+ (WebCore::contextMenuItemTagPaste):
+ (WebCore::contextMenuItemTagNoGuessesFound):
+ (WebCore::contextMenuItemTagIgnoreSpelling):
+ (WebCore::contextMenuItemTagLearnSpelling):
+ (WebCore::contextMenuItemTagSearchWeb):
+ (WebCore::contextMenuItemTagLookUpInDictionary):
+ (WebCore::contextMenuItemTagOpenLink):
+ (WebCore::contextMenuItemTagIgnoreGrammar):
+ (WebCore::contextMenuItemTagSpellingMenu):
+ (WebCore::contextMenuItemTagShowSpellingPanel):
+ (WebCore::contextMenuItemTagCheckSpelling):
+ (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
+ (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
+ (WebCore::contextMenuItemTagFontMenu):
+ (WebCore::contextMenuItemTagBold):
+ (WebCore::contextMenuItemTagItalic):
+ (WebCore::contextMenuItemTagUnderline):
+ (WebCore::contextMenuItemTagOutline):
+ (WebCore::contextMenuItemTagWritingDirectionMenu):
+ (WebCore::contextMenuItemTagTextDirectionMenu):
+ (WebCore::contextMenuItemTagDefaultDirection):
+ (WebCore::contextMenuItemTagLeftToRight):
+ (WebCore::contextMenuItemTagRightToLeft):
+ (WebCore::mediaElementLoadingStateText):
+ (WebCore::mediaElementLiveBroadcastStateText):
+ (WebCore::searchableIndexIntroduction):
+ (WebCore::resetButtonDefaultLabel):
+ (WebCore::submitButtonDefaultLabel):
+ (WebCore::inputElementAltText):
+ * platform/android/RenderThemeAndroid.cpp:
+ (WebCore::RenderTheme::themeForPage):
+ (WebCore::RenderThemeAndroid::baselinePosition):
+ (WebCore::RenderThemeAndroid::paintButton):
+ (WebCore::adjustMenuListStyleCommon):
+ (WebCore::RenderThemeAndroid::paintCombo):
+ * platform/android/ScreenAndroid.cpp:
+ * platform/android/ScrollViewAndroid.cpp:
+ (WebCore::ScrollView::platformOffscreenContentRectangle):
+ * platform/android/TemporaryLinkStubs.cpp:
+ (JSC::Bindings::dispatchJNICall):
+ * platform/android/WidgetAndroid.cpp:
+ (WebCore::Widget::setFrameRect):
+
+2009-11-13 Norbert Leser <norbert.leser&nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ Added macros for USERINCLUDE paths within symbian blocks
+ to guarantee inclusion of respective header files from local path
+ first (to avoid clashes with same names of header files in system include path).
+
+ * WebCore.pro:
+
+2009-11-13 Hironori Bono <hbono@chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ Implement composition events introduced in DOM Level 3.
+ This change adds a new IDL which defines the composition events, adds a class which
+ implements the composition events, and sends the composition events according to
+ the specification.
+ https://bugs.webkit.org/show_bug.cgi?id=26310
+
+ Test: fast/events/ime-composition-events-001.html
+
+ * DerivedSources.make: Added CompositionEvent so we can compile "CompositionEvent.idl".
+ * GNUmakefile.am: Added "CompositionEvent.{cpp,h,idl}".
+ * WebCore.gypi: ditto.
+ * WebCore.pro: ditto
+ * WebCore.vcproj/WebCore.vcproj: ditto.
+ * WebCore.xcodeproj/project.pbxproj: Added "CompositionEvent.{cpp,h,idl}" and "JSCompositionEvent.{cpp,h}".
+ * WebCoreSources.bkl: Added "JSCompositionEvent.{cpp,h}".
+ * bindings/js/JSEventCustom.cpp:
+ (WebCore::toJS): Call isCompositionEvent() to create the CompositionEvent wrapper.
+ * bindings/v8/DOMObjectsInclude.h: Added "JSCompositionEvent.h".
+ * bindings/v8/DerivedSourcesAllInOne.cpp: Added "JSCompositionEvent.cpp".
+ * bindings/v8/V8DOMWrapper.cpp: Call isCompositionEvent() to identify an event as a CompositionEvent.
+ (WebCore::V8DOMWrapper::convertEventToV8Object):
+ * bindings/v8/V8Index.cpp: Added "V8CompositionEvent.h".
+ * bindings/v8/V8Index.h: Added V8Index::COMPOSITIONEVENT.
+ * dom/CompositionEvent.cpp: Implements the CompositionEvent class.
+ (WebCore::CompositionEvent::CompositionEvent):
+ (WebCore::CompositionEvent::~CompositionEvent):
+ (WebCore::CompositionEvent::initCompositionEvent):
+ (WebCore::CompositionEvent::isCompositionEvent):
+ * dom/CompositionEvent.h: Declares the CompositionEvent class.
+ (WebCore::CompositionEvent::create):
+ (WebCore::CompositionEvent::data):
+ * dom/CompositionEvent.idl: Added the IDL of DOM CompositionEvent.
+ * dom/Event.cpp:
+ (WebCore::Event::isCompositionEvent): Added a method to identify an event is a CompositionEvent.
+ * dom/Event.h:
+ * dom/EventNames.h: Added composition{start,update,end} to eventNames.
+ * editing/Editor.cpp:
+ (WebCore::Editor::confirmComposition): Sent a CompositionEnd event.
+ (WebCore::Editor::setComposition): Sent a Composition{Start,Update,End} event.
+
+2009-11-13 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix a link error in unofficial GCC 4.4 builds on Linux.
+ https://bugs.webkit.org/show_bug.cgi?id=31477
+
+ * bindings/v8/V8Binding.cpp: Add explicit instantiations of v8StringToWebCoreString template.
+
+2009-11-13 Eric Seidel <eric@webkit.org>
+
+ No review, build fix only.
+
+ Fix Debug build after http://trac.webkit.org/changeset/50960.
+
+ The CounterNode class does not support all methods necessary to efficiently update the counter tree as needed per CSS2.1
+ https://bugs.webkit.org/show_bug.cgi?id=31213
+
+ * rendering/CounterNode.cpp:
+ (WebCore::showTreeAndMark):
+ * rendering/RenderCounter.cpp:
+ (WebCore::destroyCounterNodeChildren):
+
+2009-11-13 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Gustavo Noronha.
+
+ [CAIRO] shadow support for Canvas and SVG
+ [https://bugs.webkit.org/show_bug.cgi?id=30960]
+
+ We currently fill a path with solid color instead of filling
+ a clipping path. This causes problems on some composite operators,
+ since Cairo modifies the area outside the path.
+ This fixes the behavior of WebKitGtk on fast/canvas/canvas-composite-alpha.html
+
+ Thanks to Benjamin Otte for tracking the bug down.
+
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::setPlatformFill):
+
+2009-11-12 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Adding Chromium's DatabaseTracker implementation.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31440
+
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gypi:
+ * storage/DatabaseTracker.h:
+ * storage/chromium/DatabaseTrackerChromium.cpp:
+ (WebCore::DatabaseTracker::fullPathForDatabase):
+ (WebCore::DatabaseTracker::getMaxSizeForDatabase):
+ * storage/chromium/QuotaTracker.cpp:
+ (WebCore::QuotaTracker::updateDatabaseSize):
+ * storage/chromium/QuotaTracker.h:
+
+2009-11-13 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ The CounterNode class is missing some basic tree navigation methods common in other WebKit trees such as the rendering tree
+ https://bugs.webkit.org/show_bug.cgi?id=31213
+ Added tree navigation methods that permit full implementation of CSS2.1
+ counter feature without using recursion proportional to the counter
+ tree depth.
+ No new tests because I did not find any bug that is fixed by this
+ commit yet, this just reduces the size of the patch for 11031 and
+ helps respond to some concerns regarding that patch.
+
+ * rendering/CounterNode.cpp:
+ (WebCore::CounterNode::CounterNode):
+
+ (WebCore::CounterNode::nextInPreOrderAfterChildren):
+ (WebCore::CounterNode::nextInPreOrder):
+ Added to support non-recursive tree traversal necessary for
+ efficient full implementation of CSS2.1 counters.
+
+ (WebCore::CounterNode::lastDescendant):
+ (WebCore::CounterNode::previousInPreOrder):
+ Moved this methods such that they occupy a place similar to that of
+ identically named methods on the render tree. This allows for their
+ broader use needed in full implementation of CSS2.1 counters.
+
+ (WebCore::CounterNode::resetRenderer):
+ (WebCore::CounterNode::resetRenderers):
+ (WebCore::CounterNode::recount):
+ (WebCore::CounterNode::insertAfter):
+ (WebCore::CounterNode::removeChild):
+ Changed such that insertion/removal of a counter, triggers not only
+ recalculation of PrefixWidths, but also reassesment of values in
+ counter nodes. This is the basis full implementation of CSS2.1
+ counters. It does not change current behavior by much because of
+ changes needed to the recalculation algorithm, but those are comming
+ in the patch for 11031.
+ (WebCore::showTreeAndMark):
+ * rendering/CounterNode.h:
+ * rendering/RenderCounter.cpp:
+ (WebCore::counter):
+ Only changed argument type to prepare for implementation of Darin
+ Adler's recommendation for the patch to 11031.
+
+ (WebCore::RenderCounter::invalidate):
+ (WebCore::destroyCounterNodeChildren):
+ (WebCore::RenderCounter::destroyCounterNodes):
+ * rendering/RenderCounter.h:
+ * rendering/RenderObjectChildList.cpp:
+ (WebCore::invalidateCountersInContainer):
+ (WebCore::RenderObjectChildList::invalidateCounters):
+ * rendering/RenderObjectChildList.h:
+ Added the ability to restrict invalidation to counters with a given
+ identifier.
+ Also invalidated counters that are on the child container itself
+ which were missed by the previous algorithm, but were a valid case.
+
+2009-11-13 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Protect SVG animated properties from destruction in bindings.
+ https://bugs.webkit.org/show_bug.cgi?id=31474
+
+ See http://crbug.com/26719.
+
+ Tested by LayoutTests/svg/custom/js-update-transform-addition.svg
+ under Valgrind.
+
+ Made sure we keep a reference to SVG properties while setting a
+ context:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8Proxy.h:
+ (WebCore::V8Proxy::withSVGContext):
+
+2009-11-13 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ [CAIRO] shadow support for Canvas and SVG.
+ [https://bugs.webkit.org/show_bug.cgi?id=30960]
+
+ Incorporate Benjamin Otte's recommendations to avoid
+ a buffer overrun, and small performance improvement.
+
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::copyContextProperties): Correctly size output
+ storage for cairo_get_dash to avoid buffer overrun.
+ (WebCore::drawPathShadow): Prefer cairo_fill_extents
+ to slower cairo_stroke_extents when not drawing shadows.
+
+2009-11-13 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Do not register Chromium's HTML5 DB VFS as the default
+ VFS. Otherwise, other sqlite DB users in the same process will
+ stop working.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31462
+
+ * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
+ (WebCore::SQLiteFileSystem::openDatabase):
+ * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
+ (WebCore::SQLiteFileSystem::registerSQLiteVFS):
+ * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
+ (WebCore::SQLiteFileSystem::registerSQLiteVFS):
+
+2009-11-13 Alexey Proskuryakov <ap@apple.com>
+
+ Windows build fix
+
+ * platform/network/cf/SocketStreamHandleCFNet.cpp:
+ (WebCore::SocketStreamHandle::SocketStreamHandle): Explicitly cast "-1" to CFOptionFlags,
+ avoiding a sign mismatch warning.
+
+2009-11-13 Alexey Proskuryakov <ap@apple.com>
+
+ Release build fix.
+
+ * platform/network/cf/SocketStreamHandleCFNet.cpp:
+ (WebCore::SocketStreamHandle::readStreamCallback):
+ (WebCore::SocketStreamHandle::writeStreamCallback):
+ Use ASSERT_UNUSED for unused stream parameter.
+
+2009-11-12 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31441
+ Implement SocketStreamHandleCFNet
+
+ Existing WebSocket tests now pass on Mac. No proxy support yet.
+
+ * platform/network/SocketStreamHandleClient.h:
+ * platform/network/cf/SocketStreamHandle.h:
+ (WebCore::SocketStreamHandle::shouldUseSSL):
+ (WebCore::SocketStreamHandle::refAuthenticationClient):
+ (WebCore::SocketStreamHandle::derefAuthenticationClient):
+ (WebCore::SocketStreamHandle::):
+ * platform/network/cf/SocketStreamHandleCFNet.cpp:
+ (WebCore::SocketStreamHandle::SocketStreamHandle):
+ (WebCore::SocketStreamHandle::chooseProxy):
+ (WebCore::SocketStreamHandle::createStreams):
+ (WebCore::SocketStreamHandle::copyCFStreamDescription):
+ (WebCore::SocketStreamHandle::readStreamCallback):
+ (WebCore::SocketStreamHandle::writeStreamCallback):
+ (WebCore::SocketStreamHandle::~SocketStreamHandle):
+ (WebCore::SocketStreamHandle::platformSend):
+ (WebCore::SocketStreamHandle::platformClose):
+ (WebCore::SocketStreamHandle::receivedCredential):
+ (WebCore::SocketStreamHandle::receivedRequestToContinueWithoutCredential):
+ (WebCore::SocketStreamHandle::receivedCancellation):
+
+2009-11-12 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: preload status bar button glyphs
+ in order to prevent them from flickering (take 2).
+
+ https://bugs.webkit.org/show_bug.cgi?id=31439
+
+ * inspector/front-end/inspector.js:
+ (preloadImages):
+
+2009-11-13 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Chromium: [REGRESSION] Crash while stopping on a breakpoint.
+ Rolling back r50890.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31467
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::canAccessPrivate):
+
+2009-11-13 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Gustavo Noronha.
+
+ [CAIRO] shadow support for Canvas and SVG
+ [https://bugs.webkit.org/show_bug.cgi?id=30960]
+
+ This is the fix of a regression, caused by the shadow patch
+ from the bug above. Reinserted the save and restore calls
+ that were accidently removed by the previous patch.
+
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::setPlatformFill):
+ (WebCore::setPlatformStroke):
+
+2009-11-13 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed. Reverting r50908 since it makes inspector tests
+ time out.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31439
+
+ * inspector/front-end/inspector.js:
+
+2009-11-13 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Enable 'console.profile()' and 'console.profileEnd()'
+ regardless of JAVASCRIPT_DEBUGGER.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31293
+
+ * WebCore.gypi:
+ * bindings/js/JSConsoleCustom.cpp:
+ (WebCore::JSConsole::profile):
+ (WebCore::JSConsole::profileEnd):
+ * bindings/v8/custom/V8ConsoleCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8CustomBinding.h:
+ * page/Console.idl:
+
+2009-11-12 David Levin <levin@chromium.org>
+
+ Reviewed by NOBODY.
+
+ Chromium build fix.
+
+ * bindings/v8/ScriptController.h:
+ (WebCore::ScriptController::evaluateInWorld): Add a dummy
+ method which isn't called in chromium to make things compile.
+
+2009-11-12 Anantanarayanan G Iyengar <ananta@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ The document-open.html test was flaky at times. The test invokes the layout test plugin
+ which in its destroy stream handler opens a new document. This basically tears down the
+ stream and the associated plugin instance, which causes a crash when the plugin stream
+ dereferences an invalid m_client pointer which points to the PluginView instance which
+ is invalid at this time. Fix is to set the m_client pointer to NULL in the stop function
+ and check for the same.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31067
+
+ * plugins/PluginStream.cpp:
+ (WebCore::PluginStream::stop):
+ (WebCore::PluginStream::destroyStream):
+
+2009-11-12 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Renaming some parameters passed to DB-related methods to better
+ indicate their purpose.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31449
+
+ * platform/chromium/ChromiumBridge.h:
+
+2009-11-12 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Transformed reflected elements are clipped inside element with opacity
+ https://bugs.webkit.org/show_bug.cgi?id=30957
+
+ transparencyClipBox() attemped to minimize the size of the transparency layer by mapping
+ each clip rect into painting space before taking the unions. This, however, did not work
+ correctly with combinations of reflections and transforms. Fixed by unioning the
+ clipRect and mapping through transforms along the way.
+
+ Also leave some #ifdeffed code in beginTransparencyLayers() that makes it easy to see
+ where the transparency layers are.
+
+ Test: fast/reflections/opacity-reflection-transform.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::expandClipRectForDescendantsAndReflection):
+ (WebCore::transparencyClipBox):
+ (WebCore::RenderLayer::beginTransparencyLayers):
+
+2009-11-12 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Fisher.
+
+ Improve SecurityOrigin::toString comment
+ https://bugs.webkit.org/show_bug.cgi?id=31041
+
+ * page/SecurityOrigin.h:
+
+2009-11-12 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ externalRepresentation should take Frame as the argument
+ https://bugs.webkit.org/show_bug.cgi?id=31393
+
+ No new tests as this is just a refactoring.
+
+ * WebCore.base.exp:
+ * rendering/RenderTreeAsText.cpp:
+ (WebCore::externalRepresentation):
+ * rendering/RenderTreeAsText.h:
+
+2009-11-12 Ben Murdoch <benm@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Android] The Android specific files in page/Android are out of date.
+ https://bugs.webkit.org/show_bug.cgi?id=31437
+
+ No tests required.
+
+ * page/android/DragControllerAndroid.cpp:
+ (WebCore::DragController::dragOperation): Added.
+ (WebCore::DragController::cleanupAfterSystemDrag):
+ * page/android/EventHandlerAndroid.cpp:
+ (WebCore::EventHandler::accessKeyModifiers): Added.
+ * page/android/InspectorControllerAndroid.cpp: Removed.
+
+2009-11-12 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Simon Fraser.
+
+ [CAIRO] shadow support for Canvas and SVG.
+ [https://bugs.webkit.org/show_bug.cgi?id=30960]
+
+ Implement Canvas/SVG shadow support for Cairo. This patch
+ uses the filter code from SVG Filters. That means that it is
+ necessary to activate filters to see the shadows.
+
+ Test: fast/canvas/canvas-shadow.html
+
+ * GNUmakefile.am:
+ * WebCore.vcproj/WebCore.vcproj: Add new ImageBufferFilter files.
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (GraphicsContext::calculateShadowBufferDimensions): New helper routine.
+ (WebCore::setPlatformFill):
+ (WebCore::setPlatformStroke):
+ (WebCore::copyContextProperties):
+ (WebCore::drawPathShadow):
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::strokePath):
+ (WebCore::GraphicsContext::drawPath):
+ (WebCore::GraphicsContext::setPlatformShadow):
+ (WebCore::GraphicsContext::createPlatformShadow):
+ * platform/graphics/cairo/ImageCairo.cpp:
+ (WebCore::BitmapImage::draw): Add filter effect.
+ * platform/graphics/filters/Filter.h: Correct 'const' signatures.
+ * platform/graphics/filters/ImageBufferFilter.cpp: Added.
+ * platform/graphics/filters/ImageBufferFilter.h: Added.
+ * svg/graphics/filters/SVGFilter.cpp: Correct 'const' signatures.
+ * svg/graphics/filters/SVGFilter.h: Correct 'const' signatures.
+
+2009-11-12 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Add postTaskToMainThread to ScriptExecutionContext.
+ Move the code to post task to the main thread into a new method on ScriptExecutionContext,
+ to use as a helper implementation of the virtual ScriptExecutionContext::postTask(Task) in
+ contexts that live on the main thread.
+ https://bugs.webkit.org/show_bug.cgi?id=31427
+
+ No new tests - simply moving the code.
+
+ * dom/Document.cpp:
+ (WebCore::Document::postTask):
+ * dom/ScriptExecutionContext.cpp:
+ (WebCore::ScriptExecutionContextTaskTimer::ScriptExecutionContextTaskTimer):
+ (WebCore::ScriptExecutionContextTaskTimer::fired):
+ (WebCore::PerformTaskData::PerformTaskData):
+ (WebCore::PerformTaskData::performTask):
+ (WebCore::ScriptExecutionContext::postTaskToMainThread):
+ * dom/ScriptExecutionContext.h:
+
+2009-11-12 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix crash when removing compositing layers when GC is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=31429
+
+ Workaround <rdar://problem/7390716> by special-casing the removal
+ of all sublayers when GC is enabled.
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::safeSetSublayers):
+ (WebCore::GraphicsLayerCA::updateSublayerList):
+ (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
+
+2009-11-12 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ The last of the V8 binding optimizations.
+ - Replace string-valued element accessors with a shared getter/setter function.
+ - Change error handling flow of control to avoid extra branches and function calls.
+ https://bugs.webkit.org/show_bug.cgi?id=31443
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::getElementStringAttr): Body of string-valued Element getter function.
+ (WebCore::setElementStringAttr): Body of string-valued Element setter function.
+ * bindings/v8/V8Binding.h:
+
+2009-11-12 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ Fix for <rdar://problem/7267951>
+ Canvas methods should reject uses of NaN and Infinity.
+
+ Test: fast/canvas/canvas-with-illegal-args.html
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::scale):
+ (WebCore::CanvasRenderingContext2D::rotate):
+ (WebCore::CanvasRenderingContext2D::translate):
+ (WebCore::CanvasRenderingContext2D::transform):
+ (WebCore::CanvasRenderingContext2D::setTransform):
+
+2009-11-12 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: profile timeline panel, fix obvious problems.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31432
+
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype.updateGraphDividersIfNeeded):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype._setWindowPosition):
+ (WebInspector.TimelineCalculator):
+ (WebInspector.TimelineCalculator.prototype.get minimumBoundary):
+ (WebInspector.TimelineCalculator.prototype.get maximumBoundary):
+ (WebInspector.TimelineCalculator.prototype.reset):
+ (WebInspector.TimelineCalculator.prototype.updateBoundaries):
+ (WebInspector.TimelineCalculator.prototype.formatValue):
+ (WebInspector.TimelineGraph):
+ (WebInspector.TimelineGraph.prototype.refresh):
+ * inspector/front-end/utilities.js:
+ (Element.prototype.hasStyleClass):
+
+2009-11-12 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: preload status bar button glyphs
+ in order to prevent them from flickering.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31439
+
+ * inspector/front-end/inspector.js:
+ (preloadImages):
+
+2009-11-12 Adam Roben <aroben@apple.com>
+
+ Replace worldIDs with world objects
+
+ Part of <http://webkit.org/b/31414> Implement new SPI for dealing with
+ user scripts/stylesheets and isolated worlds
+
+ Reviewed by Sam Weinig.
+
+ Covered by existing tests.
+
+ * WebCore.base.exp: Update exported symbols to match what now exists
+ and is needed by WebKit.
+
+ * bindings/js/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::execute): Updated for function rename.
+
+ * bindings/js/ScriptController.cpp: Removed code that dealt with
+ worldIDs.
+ (WebCore::ScriptController::createWorld): Added. Returns a new world
+ suitable for use on the main thread.
+ (WebCore::ScriptController::executeScriptInWorld): Renamed from
+ executeScriptInIsolatedWorld, since this works just fine with a
+ "normal" world.
+
+ * bindings/js/ScriptController.h: Added createWorld, removed functions
+ that took worldIDs, renamed executeScriptInIsolatedWorld to
+ executeScriptInWorld.
+
+ * page/Frame.cpp:
+ (WebCore::Frame::injectUserScripts):
+ (WebCore::Frame::injectUserScriptsForWorld):
+ Updated for changes to UserScriptMap and ScriptController.
+
+ * page/Frame.h: Changed injectUserScriptsForWorld to take a
+ DOMWrapperWorld* instead of a worldID.
+
+ * page/PageGroup.cpp:
+ (WebCore::PageGroup::addUserScriptToWorld):
+ (WebCore::PageGroup::addUserStyleSheetToWorld):
+ (WebCore::PageGroup::removeUserScriptFromWorld):
+ (WebCore::PageGroup::removeUserStyleSheetFromWorld):
+ (WebCore::PageGroup::removeUserScriptsFromWorld):
+ (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
+ * page/PageGroup.h:
+ Changed these functions to take a DOMWrapperWorld* instead of a
+ worldID. Also updated for changes to UserScript and UserStyleSheet.
+
+ * page/UserScript.h:
+ * page/UserStyleSheet.h: Changed not to hold a worldID, since it was
+ never used.
+
+ * page/UserScriptTypes.h:
+ * page/UserStyleSheetTypes.h: Changed UserScriptMap and
+ UserStyleSheetMap to use a RefPtr<DOMWrapperWorld> instead of a
+ worldID as their key type.
+
+
+2009-11-12 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Fixes <http://webkit.org/b/31260>.
+ Web Inspector: Main Resources Other than HTML are mis-detected.
+
+ Even if the resource is a main resource, look at its CachedResource type,
+ because it might be an image, stylesheet, or JavaScript file, and we
+ want to show them all correctly.
+
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::cachedResourceType): Move this method out so it can be called in multiple places.
+ (WebCore::InspectorResource::type):
+ * inspector/InspectorResource.h:
+
+2009-11-12 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Table-driven setup for V8 binding template callback functions. 100k in code savings.
+ https://bugs.webkit.org/show_bug.cgi?id=31420
+
+ * bindings/scripts/CodeGeneratorV8.pm: Change generated ConfigureXXXTemplate fn
+ to call configureTemplate().
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::configureTemplate): New function; does all the standard configuration work.
+ (WebCore::createCallback): De-inlined wrapper for FunctionTemplate creation.
+ * bindings/v8/V8Binding.h:
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::batchConfigureAttributes): Just wrapped the very long fn parameter list.
+ (WebCore::batchConfigureCallbacks): New function, used by configureTemplate.
+ (WebCore::batchConfigureConstants): Just wrapped the very long fn parameter list.
+ * bindings/v8/V8Proxy.h:
+
+2009-11-12 Dumitru Daniliuc <dumi@chromium.org>
+
+ Unreviewed, fix Chromium build after http://trac.webkit.org/changeset/50876.
+
+ * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
+
+2009-11-12 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7388969> Add DOM API for fullscreen video
+
+ DOM API for fullscreen <video>.
+
+ Tests: media/media-fullscreen-inline.html
+ media/media-fullscreen-not-in-document.html
+
+ * dom/EventNames.h:
+ Add webkitbeginfullscreen and webkitendfullscreen.
+
+ * html/HTMLAttributeNames.in:
+ Add onwebkitbeginfullscreen and onwebkitendfullscreen.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::parseMappedAttribute):
+ Deal with onwebkitbeginfullscreen and onwebkitendfullscreen.
+ (WebCore::HTMLMediaElement::enterFullscreen):
+ Schedule webkitbeginfullscreenEvent event, don't set m_isFullscreen unless we
+ actually do enter fullscreen.
+ (WebCore::HTMLMediaElement::exitFullscreen):
+ Schedule webkitendfullscreenEvent event.
+ (WebCore::HTMLMediaElement::webkitEnterFullScreen):
+ (WebCore::HTMLMediaElement::webkitExitFullScreen):
+ (WebCore::HTMLMediaElement::webkitSupportsFullscreen):
+ (WebCore::HTMLMediaElement::webkitDisplayingFullscreen):
+ New, access to fullscreen properties and methods.
+
+ * html/HTMLMediaElement.h:
+ * html/HTMLMediaElement.idl:
+ Declare methods needed for fullscreen API.
+
+ * html/HTMLVideoElement.cpp:
+ (WebCore::HTMLVideoElement::supportsFullscreen):
+ Return false if a movie does not have video.
+
+ * page/DOMWindow.h:
+ Add webkitbeginfullscreen and webkitendfullscreen.
+
+2009-11-12 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Sify compose button alerts error
+ https://bugs.webkit.org/show_bug.cgi?id=31394
+
+ Test: http/tests/security/calling-versus-current.html
+
+ We're supposed to use the calling context for security checks. In JSC
+ land, this is the lexicalGlobalObject.
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::canAccessPrivate):
+
+2009-11-12 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30291
+
+ Fixes an issue where the returned drop effect is incorrect when
+ effectAllowed == "uninitialized".
+
+ According to section 7.9.2 of the HTML 5 spec.
+ <http://dev.w3.org/html5/spec/Overview.html#the-dragevent-and-datatransfer-interfaces>
+ when effectAllowed = "uninitialized" the resulting dropEffect should be the
+ user-specified dropEffect (i.e. "copy", "move", "link") and "none" for any
+ other case.
+
+ No test cases are included because we have an existing test case from
+ bug #24731.
+
+ * dom/Clipboard.cpp:
+ (WebCore::dragOpFromIEOp): Added case for op == "uninitialized".
+
+2009-11-12 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Do not highlight node on refresh.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31419
+
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.reset):
+
+2009-11-12 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Minor timeline fixes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31417
+
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype._getRecordDetails):
+ (WebInspector.TimelineRecordTreeElement.prototype.onattach):
+ (WebInspector.TimelineRecordTreeElement.prototype._updateDetails):
+ (WebInspector.TimelineRecordTreeElement.prototype.refresh):
+
+2009-11-12 Alexey Proskuryakov <ap@apple.com>
+
+ SnowLeopard build fix.
+
+ Renamed initWithClient to initWithAuthenticationClient.
+
+ * platform/network/mac/AuthenticationMac.mm:
+ (-[WebCoreAuthenticationClientAsChallengeSender initWithAuthenticationClient:]):
+ (WebCore::AuthenticationChallenge::setAuthenticationClient):
+
+2009-11-12 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ ARIA: add alert type roles
+ https://bugs.webkit.org/show_bug.cgi?id=31392
+
+ Test: platform/mac/accessibility/aria-alerts.html
+
+ * accessibility/AccessibilityObject.h:
+ * accessibility/AccessibilityRenderObject.cpp:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+
+2009-11-11 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31386
+ Make Mac AuthenticationChallenge usable from cross-platform code
+
+ No change in behavior, so no tests.
+
+ * platform/network/ResourceHandle.cpp:
+ (WebCore::ResourceHandle::clearAuthentication):
+ * platform/network/ResourceHandleInternal.h:
+ (WebCore::ResourceHandleInternal::ResourceHandleInternal):
+ Don't store m_currentCFChallenge, which was only used for a single assertion. Unlike the
+ NSURLConnection case, CF challenge doesn't carry a sender with it, so the copy in web challenge
+ is identical.
+
+ * platform/network/cf/AuthenticationChallenge.h:
+ (WebCore::AuthenticationChallenge::setAuthenticationClient): Added a setter to match the new
+ Mac interface. Previously, one had to create a new AuthenticationChallenge to replace client.
+
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Fixed assertions after removal
+ of m_currentCFChallenge. Also, there is no need to set client now, as it's guaranteed to
+ be already set.
+
+ * platform/network/mac/AuthenticationChallenge.h:
+ (WebCore::AuthenticationChallenge::m_sender): Explained the existence of this member to the
+ best of my understanding.
+ (WebCore::AuthenticationChallenge::m_nsChallenge): Renamed from m_macChallenge to prevent
+ confusion with "mac" and "web" challenges in ResourceHandleInternal.
+
+ * platform/network/mac/AuthenticationMac.mm:
+ (WebCoreAuthenticationClientAsChallengeSender): Added a Obj-C wrapper for AuthenticationClient,
+ making it possible to use the latter with NSURLAuthenticationChallenge.
+ (WebCore::AuthenticationChallenge::AuthenticationChallenge): Updated for m_macChallenge ->
+ m_nsChallenge renaming.
+ (WebCore::AuthenticationChallenge::setAuthenticationClient): Wrap the client in Obj-C and
+ set it as sender (or unset, if client is null).
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCoreResourceHandleAsDelegate) WebCoreResourceHandleAsDelegate no longer doubles as
+ authentication challenge sender.
+ (WebCore::ResourceHandle::~ResourceHandle): A navigation can happen underneath an
+ authentication sheet.
+ (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Form m_currentWebChallenge
+ using the new setAuthenticationClient() method.
+ (WebCore::ResourceHandle::didCancelAuthenticationChallenge): Fixed an incorrect assertion.
+ Since didCancelAuthenticationChallenge is called by connection, the passed challenge is
+ the original Mac one, not the one we created for use with authentication sheet. I don't
+ know when a connection would cancel authentication in practice, so I haven't tested this.
+
+2009-11-12 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: breakpoint sidebar entries should allow click over entire list item
+ https://bugs.webkit.org/show_bug.cgi?id=31411
+
+ No new tests; no new functionality, small usability change.
+
+ * inspector/front-end/BreakpointsSidebarPane.js:
+ (WebInspector.BreakpointsSidebarPane.prototype._appendBreakpointElement):
+ (WebInspector.BreakpointsSidebarPane.prototype._appendBreakpointElement.breakpointClicked):
+
+2009-11-12 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: breakpoints in named evals are not restored after a reload
+ https://bugs.webkit.org/show_bug.cgi?id=31375
+
+ Manual test added
+
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.addScript):
+ * manual-tests/inspector/bp-in-named-eval-after-reload.html: Added.
+
+2009-11-12 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Custom printing shrink factors
+ https://bugs.webkit.org/show_bug.cgi?id=29042
+
+ This reverts commit r49769. The public API for this needs to be reviewed
+ before its inclusion in Qt.
+
+ * page/PrintContext.cpp:
+ (WebCore::PrintContext::begin):
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ * page/Settings.h:
+
+2009-11-12 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Resource errors/warnings not shown in the Resource tree.
+
+ Error/Warning bubbles are not displayed next to the resource in the
+ Resources panel if those occur before the resource is attached to the tree.
+ https://bugs.webkit.org/show_bug.cgi?id=31404
+
+ Test: manual-tests/inspector/styled-error-bubbles-in-scripts.html
+
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype.removeItem):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceSidebarTreeElement.prototype.onattach):
+
+2009-11-12 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31047
+ [GTK] Failing test media/video-played-ranges-1.html
+
+ Follow-up of r50726, don't block the UI thread when calling
+ gst_element_get_state(). Also fixed a compilation warning and some
+ static casts.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::playbackPosition):
+ (WebCore::MediaPlayerPrivate::seek):
+ (WebCore::MediaPlayerPrivate::setRate):
+
+2009-11-12 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31047
+ [GTK] Failing test media/video-played-ranges-1.html
+
+ don't pause pipeline if already paused, same for play()
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::play):
+ (WebCore::MediaPlayerPrivate::pause):
+
+2009-11-12 Kinuko Yasuda <kinuko@google.com>
+
+ Reviewed by David Levin.
+
+ Support Gtk scrollwheel behavior for horizontal scrollbars on Linux
+ Chromium too.
+ https://bugs.webkit.org/show_bug.cgi?id=31292
+
+ No new tests. (Corresponding test for Gtk+ is
+ platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html)
+
+ * page/EventHandler.cpp:
+ * page/chromium/EventHandlerChromium.cpp:
+
+2009-11-12 Yuta Kitamura <yutak@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Prevent text inside a multi-column block from being split into columns.
+
+ If the tentative height of a multi-column block was too small, we need to
+ expand the block height and try to layout again, in order to prevent text
+ from being split into different columns.
+
+ CSS Multicolumn text is split awkwardly
+ https://bugs.webkit.org/show_bug.cgi?id=22249
+
+ Test: fast/multicol/single-line.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::layoutColumns):
+ * rendering/RenderBlock.h:
+ * rendering/RenderLineBoxList.cpp:
+ (WebCore::RenderLineBoxList::paint):
+ * rendering/RenderView.h:
+ (WebCore::RenderView::setTruncatedAt):
+ (WebCore::RenderView::setMinimumColumnHeight):
+ (WebCore::RenderView::minimumColumnHeight):
+
+2009-11-11 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix a bug that RenderFileUploadControl isn't initialized with multiple files.
+ https://bugs.webkit.org/show_bug.cgi?id=31195
+
+ Test: fast/forms/input-file-re-render.html
+
+ * rendering/RenderFileUploadControl.cpp:
+ (WebCore::RenderFileUploadControl::RenderFileUploadControl):
+
+2009-11-09 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fixing Chromium's POSIX VFS implementation, by adding the required
+ "used file descriptors" logic.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31275
+
+ * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
+
+2009-11-11 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ need to implement aria tree roles
+ https://bugs.webkit.org/show_bug.cgi?id=31284
+
+ Tests: platform/mac/accessibility/aria-multiselectable.html
+ platform/mac/accessibility/aria-tree.html
+
+ * accessibility/AccessibilityList.cpp:
+ (WebCore::AccessibilityList::accessibilityIsIgnored):
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::ariaTreeRows):
+ (WebCore::AccessibilityObject::ariaTreeItemContent):
+ (WebCore::AccessibilityObject::ariaTreeItemDisclosedRows):
+ * accessibility/AccessibilityObject.h:
+ (WebCore::):
+ (WebCore::AccessibilityObject::isTree):
+ (WebCore::AccessibilityObject::isTreeItem):
+ (WebCore::AccessibilityObject::setIsExpanded):
+ (WebCore::AccessibilityObject::canSetExpandedAttribute):
+ (WebCore::AccessibilityObject::hierarchicalLevel):
+ (WebCore::AccessibilityObject::setSelectedRows):
+ (WebCore::AccessibilityObject::performDefaultAction):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::hierarchicalLevel):
+ (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
+ (WebCore::AccessibilityRenderObject::isExpanded):
+ (WebCore::AccessibilityRenderObject::setElementAttributeValue):
+ (WebCore::AccessibilityRenderObject::elementAttributeValue):
+ (WebCore::AccessibilityRenderObject::setIsExpanded):
+ (WebCore::AccessibilityRenderObject::isSelected):
+ (WebCore::AccessibilityRenderObject::setSelected):
+ (WebCore::AccessibilityRenderObject::setSelectedRows):
+ (WebCore::createARIARoleMap):
+ (WebCore::AccessibilityRenderObject::canSetExpandedAttribute):
+ (WebCore::AccessibilityRenderObject::ariaTreeSelectedRows):
+ (WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren):
+ (WebCore::AccessibilityRenderObject::selectedChildren):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/mac/AccessibilityObjectMac.mm:
+ (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
+ (RoleEntry::):
+ (-[AccessibilityObjectWrapper subrole]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+ (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
+ (-[AccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
+ (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
+ (-[AccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
+ * html/HTMLAttributeNames.in:
+
+2009-11-11 Brent Fulgham <bfulgham@webkit.org>
+
+ Build fix after @r50760 with ENABLE_FILTERS.
+
+ * platform/graphics/filters/SourceAlpha.cpp:
+ (WebCore::SourceAlpha::apply): Supply ColorSpace to fillRect.
+ * svg/graphics/filters/SVGFEFlood.cpp: Supply ColorSpace argument
+ to fillRect.
+
+2009-11-11 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Fix WebSocket frame parser of frame_type with high-order bit set.
+ https://bugs.webkit.org/show_bug.cgi?id=30668
+
+ If buffer is smaller than frame's length, it should break the loop
+ instead of reading next byte.
+
+ Tests: websocket/tests/frame-length-longer-than-buffer.html
+ websocket/tests/frame-length-skip.html
+
+ * websockets/WebSocketChannel.cpp:
+ (WebCore::WebSocketChannel::didReceiveData):
+
+2009-11-11 Yusuke Sato <yusukes@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [chromium] Remove t2embed.dll functions from FontCustomPlatformData.cpp for Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=31345
+
+ Remove dependency on t2embed.dll so that Chromium for Windows can start even if t2embed.dll cannot be accessed.
+
+ * platform/graphics/chromium/FontCustomPlatformData.cpp:
+ (WebCore::FontCustomPlatformData::~FontCustomPlatformData): Remove TTDeleteEmbeddedFont() call. Always use RemoveFontMemResourceEx().
+ (WebCore::FontCustomPlatformData::fontPlatformData): Remove TTGetNewFontName() call.
+ (WebCore::createFontCustomPlatformData): Remove TTLoadEmbeddedFont() call. Always use AddFontMemResourceEx() via renameAndActivateFont() in opentype/OpenTypeUtility.h. Remove EOTStream class as well.
+
+2009-11-11 Beth Dakin <bdakin@apple.com>
+
+ Build fix. No review needed.
+
+ * platform/graphics/gtk/FontGtk.cpp:
+ (WebCore::Font::drawComplexText):
+
+2009-11-11 Beth Dakin <bdakin@apple.com>
+
+ Build fix. No review needed.
+
+ * platform/graphics/cairo/FontCairo.cpp:
+ (WebCore::Font::drawGlyphs):
+
+2009-11-11 Beth Dakin <bdakin@apple.com>
+
+ Windows build fix. No review needed.
+
+ * platform/graphics/win/FontCGWin.cpp:
+ (WebCore::Font::drawGlyphs):
+
+2009-11-11 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=31382
+ Make -webkit-color-correction work with shadows
+
+ From canvas, just send DeviceColorSpace to setShadow() for now.
+ Will fix soon when I address https://bugs.webkit.org/show_bug.cgi?id=31319
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::setShadow):
+ (WebCore::CanvasRenderingContext2D::applyShadow):
+
+ setShadow() and setPlatformShadow() now take a ColorSpace.
+ * platform/graphics/GraphicsContext.cpp:
+ (WebCore::GraphicsContext::setShadow):
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::createCGColorWithColorSpace): New helper to create a
+ color in a ColorSpace.
+ (WebCore::setCGFillColor): Call new helper.
+ (WebCore::setCGStrokeColor): Call new helper.
+ (WebCore::GraphicsContext::setPlatformShadow): Call new helper.
+ * platform/graphics/haiku/GraphicsContextHaiku.cpp:
+ (WebCore::GraphicsContext::setPlatformShadow):
+
+ Send appropriate ColorSpace to setShadow().
+ * platform/graphics/mac/FontMac.mm:
+ (WebCore::Font::drawGlyphs):
+ * rendering/EllipsisBox.cpp:
+ (WebCore::EllipsisBox::paint):
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::paintTextDecorations):
+ * rendering/InlineTextBox.cpp:
+ (WebCore::paintTextWithShadows):
+ (WebCore::InlineTextBox::paintDecoration):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paintBoxShadow):
+ * rendering/SVGInlineTextBox.cpp:
+ (WebCore::SVGInlineTextBox::paintCharacters):
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderBase::prepareToRenderSVGContent):
+
+ Attempt to keep ports building.
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::setPlatformShadow):
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::setPlatformShadow):
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::setPlatformShadow):
+ * platform/graphics/wince/GraphicsContextWince.cpp:
+ (WebCore::GraphicsContext::setPlatformShadow):
+ * platform/graphics/wx/GraphicsContextWx.cpp:
+ (WebCore::GraphicsContext::setPlatformShadow):
+
+2009-11-11 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Print the file text of a file upload control in DumpRenderTree for ease of tests.
+ https://bugs.webkit.org/show_bug.cgi?id=31195
+
+ * rendering/RenderFileUploadControl.cpp:
+ (WebCore::RenderFileUploadControl::paintObject):
+ (WebCore::RenderFileUploadControl::fileTextValue):
+ * rendering/RenderFileUploadControl.h:
+ (WebCore::RenderFileUploadControl::isFileUploadControl):
+ (WebCore::toRenderFileUploadControl):
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::isFileUploadControl):
+ * rendering/RenderTreeAsText.cpp:
+ (WebCore::operator<<):
+
+2009-11-11 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ DOM Wrappers for some nodes may not be marked.
+ https://bugs.webkit.org/show_bug.cgi?id=31380
+
+ Some markChildren methods are calling getCachedDOMNodeWrapper, which will find
+ the wrapper for the current world only. This means that wrappers may be GC'ed
+ prematurely, and properties lost.
+
+ Move to a model more like markDOMObjectWrapper, mark wrappers for all worlds.
+
+ * bindings/js/JSAttrCustom.cpp:
+ (WebCore::JSAttr::markChildren):
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::markDOMNodeWrapper):
+ * bindings/js/JSDOMBinding.h:
+ * bindings/js/JSNamedNodeMapCustom.cpp:
+ (WebCore::JSNamedNodeMap::markChildren):
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::markChildren):
+ * bindings/js/JSSVGElementInstanceCustom.cpp:
+ (WebCore::JSSVGElementInstance::markChildren):
+ * bindings/js/JSStyleSheetCustom.cpp:
+ (WebCore::JSStyleSheet::markChildren):
+
+2009-11-11 Ben Murdoch <benm@google.com>
+
+ Reviewed by Darin Adler.
+
+ bindings/js/ScriptObject.cpp is missing and ENABLE(INSPECTOR) guard.
+ https://bugs.webkit.org/show_bug.cgi?id=31384
+
+ No functionality change so no tests required.
+
+ * bindings/js/ScriptObject.cpp: Add ENABLE(INSPECTOR) guard around the JSInspectorBackend.h include.
+
+2009-11-11 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ The Big De-Inlining. 450k code size reduction (32-bit x86.)
+ - Various inline functions in V8Binding.h made non-inline.
+ - Some renaming for consistency.
+ - New function createRawTemplate().
+ https://bugs.webkit.org/show_bug.cgi?id=31383
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::v8DOMWrapperToNative):
+ (WebCore::v8ValueToWebCoreString):
+ (WebCore::v8ValueToAtomicWebCoreString):
+ (WebCore::toInt32):
+ (WebCore::toWebCoreString):
+ (WebCore::toWebCoreStringWithNullCheck):
+ (WebCore::toAtomicWebCoreStringWithNullCheck):
+ (WebCore::toWebCoreStringWithNullOrUndefinedCheck):
+ (WebCore::isUndefinedOrNull):
+ (WebCore::v8Boolean):
+ (WebCore::v8UndetectableString):
+ (WebCore::v8StringOrNull):
+ (WebCore::v8StringOrUndefined):
+ (WebCore::v8StringOrFalse):
+ (WebCore::v8StringToWebCoreString):
+ (WebCore::v8ExternalString):
+ (WebCore::createRawTemplate): New function.
+ * bindings/v8/V8Binding.h:
+ (WebCore::v8DOMWrapperTo):
+ (WebCore::v8DOMWrapperToNode):
+ (WebCore::v8StringToWebCoreString):
+ (WebCore::v8StringToAtomicWebCoreString):
+
+2009-11-11 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ More V8 de-inlining (outlining?) Abstracted a chunk of boilerplate code from every
+ event-listener setter into a new subroutine transferHiddenDependency().
+ https://bugs.webkit.org/show_bug.cgi?id=31377
+
+ * bindings/scripts/CodeGeneratorV8.pm: Replace boilerplate with call to transferHiddenDependency().
+ * bindings/v8/V8Utilities.cpp:
+ (WebCore::transferHiddenDependency): New.
+ * bindings/v8/V8Utilities.h: Declaration of transferHiddenDependency.
+
+2009-11-11 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ If we are on Windows, don't try and get the kCGColorSpaceSRGB ColorSpace,
+ because there is a CG bug preventing this from working.
+
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::sRGBColorSpaceRef):
+
+2009-11-11 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Check that if Storage panel exists before calling its methods
+
+ https://bugs.webkit.org/show_bug.cgi?id=31343
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.addDatabase):
+ (WebInspector.addCookieDomain):
+ (WebInspector.addDOMStorage):
+ (WebInspector.updateDOMStorage):
+
+2009-11-11 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ De-inline convertNodeToV8Object(), which expands to a lot of asm code and is inlined 136
+ times in the generated V8 bindings.
+ https://bugs.webkit.org/show_bug.cgi?id=31368
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertNodeToV8Object): Moved body here from .h file
+ * bindings/v8/V8DOMWrapper.h: Removed inline method body.
+
+2009-11-11 Jessie Berlin <jberlin@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Display the correct summary in the web inspector for the shorthands
+ border-color, border-width, border-style, margin, and padding.
+ https://bugs.webkit.org/show_bug.cgi?id=7987
+
+ Test: fast/css/shorthands-four-values.html
+
+ * css/CSSMutableStyleDeclaration.cpp:
+ (WebCore::CSSMutableStyleDeclaration::get4Values):
+ Display the summary information in the same way the shorthand would be
+ specified in a css rule.
+
+2009-11-11 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Make V8 bindings return NULL handles instead of calling v8::Undefined(). This has equivalent
+ meaning to the caller, saves code, and appears to save a few cycles at runtime too.
+ https://bugs.webkit.org/show_bug.cgi?id=31367
+
+ * bindings/scripts/CodeGeneratorV8.pm: Change "v8::Undefined()" to "v8::Handle<v8::Value>()"
+
+2009-11-11 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Optimize V8 getDOMNodeMap(), a hot function in Dromaeo DOM tests, by increasing inlining.
+
+ * bindings/v8/DOMData.cpp:
+ (WebCore::DOMData::getCurrent): Moved getCurrentMainThread to MainThreadDOMData::getCurrent
+ so it can be inlined by its caller.
+ * bindings/v8/DOMData.h:
+ * bindings/v8/MainThreadDOMData.cpp:
+ (WebCore::MainThreadDOMData::getCurrent): Moved here from DOMData.cpp.
+ (WebCore::MainThreadDOMData::getMainThreadStore): Added UNLIKELY macro to improve codegen.
+ (WebCore::MainThreadDOMData::getCurrentMainThreadStore): Combination of getCurrentMainThread
+ and getStore, which inline both calls together.
+ * bindings/v8/MainThreadDOMData.h:
+ (WebCore::MainThreadDOMData::getStore): Broke out nonvirtual getMainThreadStore for inlineability.
+ * bindings/v8/V8DOMMap.cpp:
+ (WebCore::getDOMNodeMap): Call new getCurrentMainThreadStore, which is faster.
+
+2009-11-11 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add methods to KURLGoogle.cpp declared in http://trac.webkit.org/changeset/50784 but not defined when using KURLGoogle.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31357
+
+ * platform/KURLGoogle.cpp:
+ (WebCore::isSchemeFirstChar):
+ (WebCore::isSchemeChar):
+ (WebCore::KURL::hasPort):
+ (WebCore::KURL::removePort):
+ (WebCore::protocolIsValid):
+
+2009-11-11 Brent Fulgham <bfulgham@webkit.org>
+
+ Build fix, no reviewed.
+
+ Correct setPlatformFillColor and setPlatformStrokeColor calls
+ to match new ColorSpace-supporting signatures.
+
+ * platform/graphics/win/GraphicsContextCairoWin.cpp: Add the
+ color space to the set[...]Color calls.
+
+2009-11-10 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31327
+ Clean up SocketStreamHandleClient interface
+
+ No change in behavior.
+
+ * platform/network/SocketStreamHandleClient.h: Removed willOpenStream and willSendData.
+ (WebCore::SocketStreamHandleClient::willOpenStream): Removed. This is currently not used by
+ the only client (WebSocketChannel), and it's not clear what this callback's semantics
+ should be.
+ (WebCore::SocketStreamHandleClient::willSendData): Ditto.
+ (WebCore::SocketStreamHandleClient::receivedCancellation): Removed, because it was misplaced.
+ For ResourceHandle, this method is called when the user cancels authentication sheet,
+ not when something happens with the stream.
+
+ * websockets/WebSocketChannel.h: Some WebSocketChannel methods were virtual without any
+ reason. Also, added didReceiveAuthenticationChallenge/didCancelAuthenticationChallenge.
+
+ * websockets/WebSocketChannel.cpp: Adjusted for the above change. Authentication-related
+ callbacks have no real implementation yet.
+
+2009-11-11 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Allow custom memory allocation control for the part of page directory in WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=31350
+
+ Inherits the following classes from Noncopyable because these are instantiated
+ by 'new' and these are no need to be copyable:
+
+ class DragController - instantiated at: WebCore/page/Page.cpp:107
+ class FocusController - instantiated at: WebCore/page/Page.cpp:109
+ class Settings - instantiated at: WebCore/page/Page.cpp:116
+ class PluginHalter - instantiated at: WebCore/page/Page.cpp:160
+ struct ScheduledEvent - instantiated at: WebCore/page/FrameView.cpp:1275
+ class UserScript - instantiated at: WebCore/page/PageGroup.cpp:208
+ struct EventHandlerDragState - instantiated at: WebCore/page/EventHandler.cpp:182
+ class XSSAuditor - instantiated at: WebCore/bindings/js/ScriptController.cpp:70
+ class UserStyleSheet - instantiated at: WebCore/page/PageGroup.cpp:222
+
+ Inherits PropertyWrapperBase class from Noncopyable because (its child class)
+ PropertyWrapper is instantiated by 'new' in
+ WebCore/page/animation/AnimationBase.cpp:564 it is no need to be copyable.
+
+ * page/DragController.h:
+ * page/EventHandler.h:
+ * page/FocusController.h:
+ * page/FrameView.cpp:
+ * page/PluginHalter.h:
+ * page/Settings.h:
+ * page/UserScript.h:
+ * page/UserStyleSheet.h:
+ * page/XSSAuditor.h:
+ * page/animation/AnimationBase.cpp:
+
+2009-11-11 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31323
+ Fix a few compiler warnings
+
+ No new tests as there is no new functionality.
+
+ * editing/htmlediting.cpp:
+ (WebCore::isRenderedAsNonInlineTableImageOrHR): Use explicit
+ parentheses to silence gcc 4.4 -Wparentheses warnings
+
+2009-11-11 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Set m_hasPendingGeometryChange to true by default, so that
+ at least one call to NPP_SetWindow is executed, which is
+ needed by the DRT plugin testing framework.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::PluginView):
+
+2009-11-11 Csaba Osztrogonác <ossy@webkit.org>
+
+ Rubber-stamped by Kenneth Rohde Christiansen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31348
+ [Qt] Remove unnecessary LUT creator from WebCore.pro
+
+ * WebCore.pro:
+
+2009-11-11 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Introduce a function for querying the input method status
+ in QWebPageClient.
+
+ * platform/qt/QWebPageClient.h:
+
+2009-11-11 Benjamin Otte <otte@gnome.org>
+
+ Reviewed by Jan Alonzo.
+
+ [GTK] Black artifacts in youtube.com/html5
+
+ Paint the video to the given size. It's the job of the callers to keep
+ track of aspect ratio. RenderVideo.cpp does it for the <video>
+ element.
+ https://bugs.webkit.org/show_bug.cgi?id=30925
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::paint):
+
+2009-11-11 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30901
+ [Gtk] Need to de-lint the Atk a11y code
+
+ Cleaned up some missed capitalization style-guideline violations.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+
+2009-11-11 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Make the default style background color valid.
+ Currently the color is transparent but invalid, this causes
+ list boxes in QtWebKit to be drawn with a black background
+ since r49242.
+ https://bugs.webkit.org/show_bug.cgi?id=31295
+
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::initialBackgroundColor):
+ * rendering/style/StyleBackgroundData.cpp:
+ (WebCore::StyleBackgroundData::StyleBackgroundData):
+
+2009-11-10 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Simplify the ownership model for worlds - rather than having a pair of weak references
+ between DOMWrapperWorld and ScriptController/ScriptCachedFrameData, give the latter an
+ ref pointer to the former. This reduces complexity & cost of the caching entries in the
+ back forward cache.
+
+ * WebCore.base.exp:
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::DOMWrapperWorld::forgetDocument):
+ * bindings/js/ScriptCachedFrameData.cpp:
+ (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
+ (WebCore::ScriptCachedFrameData::restore):
+ (WebCore::ScriptCachedFrameData::clear):
+ * bindings/js/ScriptCachedFrameData.h:
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::~ScriptController):
+ (WebCore::ScriptController::clearWindowShell):
+ (WebCore::ScriptController::initScript):
+ (WebCore::ScriptController::updateDocument):
+ * bindings/js/ScriptController.h:
+
+2009-11-10 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ rename counter to makeCounterNode in RenderCounter.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=31289
+
+ No new test because this is just a small refactoring.
+
+ * rendering/RenderCounter.cpp:
+ (WebCore::findPlaceForCounter):
+ (WebCore::makeCounterNode):
+ (WebCore::RenderCounter::originalText):
+
+2009-11-10 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30754
+
+ Patch 2 of 2.
+
+ Removed method EventHandler::dragSourceMovedTo, since it is no longer
+ needed. This method fired a drag event whenever the mouse moved, but
+ section 7.9.4 of the HTML 5 spec. defines the drag-and-drop processing
+ model independent of when the mouse moves. See "Among other changes..."
+ in the change log for patch 1 for more details.
+
+ * WebCore.DragSupport.exp:
+ * page/EventHandler.cpp: Removed method EventHandler::dragSourceMovedTo.
+ (WebCore::EventHandler::handleDrag): Updated comment about reentrancy issue.
+ * page/EventHandler.h:
+
+2009-11-10 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30754
+
+ Patch 1 of 2.
+
+ As per Section 7.9.4 of the HTML 5 spec. <http://dev.w3.org/html5/spec/Overview.html#drag-and-drop-processing-model>,
+ the drag event should always fire before the dragover event.
+
+ In fixing this bug, this patch also makes our drag processing model
+ conform to the HTML 5 spec.
+
+ Among the changes, this patch ensures that the drag event isn't fired outside
+ of the drag-and-drop processing loop, WebCore::EventHandler::updateDragAndDrop.
+ Currently, the drag event is fired whenever the mouse button is down and the OS
+ detects the mouse moved. But, as per the spec, the drag event should
+ fire approx. every 350ms so long as the mouse button is down.
+
+ Test: fast/events/drag-and-drop-fire-drag-dragover.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::clear):
+ (WebCore::EventHandler::canHandleDragAndDropForTarget): Formerly named handleDragAndDropForTarget.
+ Modified to determine when we are in the correct instance of EventHandler to service the drag
+ and drop operation.
+ (WebCore::EventHandler::updateDragAndDrop): Moved code from WebCore::EventHandler::dragSourceMovedTo
+ into this method.
+ (WebCore::EventHandler::cancelDragAndDrop):
+ (WebCore::EventHandler::performDragAndDrop):
+ (WebCore::EventHandler::clearDragState):
+ * page/EventHandler.h: Added field m_shouldOnlyFireDragOverEvent to determine whether
+ we should fire both drag and dragover events or only the dragover event.
+
+2009-11-10 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Fix crash in V8CustomXPathNSResolver (http://crbug.com/26726).
+ https://bugs.webkit.org/show_bug.cgi?id=31301
+
+ Tested by new fast/xpath/xpath-detached-iframe-resolver-crash.html.
+
+ Allowed passing V8Proxy for the calling JS context:
+ * bindings/v8/V8DOMWrapper.h:
+ (WebCore::V8DOMWrapper::getXPathNSResolver):
+ * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
+ (WebCore::V8CustomXPathNSResolver::create):
+ (WebCore::V8CustomXPathNSResolver::V8CustomXPathNSResolver):
+ (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
+ * bindings/v8/custom/V8CustomXPathNSResolver.h:
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-11-10 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Implement URL decomposition IDL attributes for HTMLAnchorElement.
+ https://bugs.webkit.org/show_bug.cgi?id=29972.
+
+ Add methods for setting different parts of the URL in href attribute.
+
+ Tests: fast/dom/HTMLAnchorElement/set-href-attribute-hash.html
+ fast/dom/HTMLAnchorElement/set-href-attribute-host.html
+ fast/dom/HTMLAnchorElement/set-href-attribute-hostname.html
+ fast/dom/HTMLAnchorElement/set-href-attribute-pathname.html
+ fast/dom/HTMLAnchorElement/set-href-attribute-port.html
+ fast/dom/HTMLAnchorElement/set-href-attribute-protocol.html
+ fast/dom/HTMLAnchorElement/set-href-attribute-search.html
+
+ * bindings/js/JSLocationCustom.cpp:
+ (WebCore::JSLocation::setPort):
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::parsePortFromStringPosition):
+ (WebCore::HTMLAnchorElement::setHash):
+ (WebCore::HTMLAnchorElement::setHost):
+ (WebCore::HTMLAnchorElement::setHostname):
+ (WebCore::HTMLAnchorElement::setPathname):
+ (WebCore::HTMLAnchorElement::setPort):
+ (WebCore::HTMLAnchorElement::setProtocol):
+ (WebCore::HTMLAnchorElement::setSearch):
+ * html/HTMLAnchorElement.h:
+ * html/HTMLAnchorElement.idl:
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::iconURL):
+ * platform/KURL.cpp:
+ (WebCore::KURL::removePort):
+ (WebCore::KURL::setPort):
+ (WebCore::KURL::prettyURL):
+ (WebCore::protocolIsValid):
+ * platform/KURL.h:
+ (WebCore::KURL::canSetHostOrPort):
+ (WebCore::KURL::canSetPathname):
+ (WebCore::KURL::hasPort):
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::):
+
+2009-11-10 Nate Chapin <japhet@chromium.org>
+
+ Unreviewed, fix Chromium build after http://trac.webkit.org/changeset/50760.
+
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupContainer::paintBorder):
+ (WebCore::PopupListBox::paint):
+ (WebCore::PopupListBox::paintRow):
+ * platform/graphics/chromium/TransparencyWin.cpp:
+ (WebCore::TransparencyWin::setupLayerForWhiteLayer):
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::fillRoundedRect):
+ (WebCore::GraphicsContext::setPlatformFillColor):
+ (WebCore::GraphicsContext::setPlatformStrokeColor):
+ * rendering/RenderMediaControlsChromium.cpp:
+ (WebCore::paintMediaSlider):
+ (WebCore::paintMediaVolumeSlider):
+ (WebCore::paintMediaTimelineContainer):
+ * rendering/RenderThemeChromiumMac.mm:
+ (WebCore::RenderThemeChromiumMac::paintMenuListButton):
+
+2009-11-10 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Repro crash saving pcmag.com article as a webarchive.
+ <rdar://problem/7381219> and https://webkit.org/b/31322
+
+ Test: http/tests/webarchive/cross-origin-stylesheet-crash.html
+
+ * css/CSSStyleSheet.cpp:
+ (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Walk the stylesheet itself instead
+ of creating a CSSRuleList (and subjecting ourselves to the security origin check)
+
+2009-11-10 Beth Dakin <bdakin@apple.com>
+
+ Attempt 2 to fix Tiger build. No review needed.
+
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::deviceRGBColorSpaceRef):
+ (WebCore::sRGBColorSpaceRef):
+
+2009-11-10 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix. Changes needed after r50760.
+
+ * platform/graphics/wx/GraphicsContextWx.cpp:
+ (WebCore::GraphicsContext::GraphicsContext):
+ * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp:
+ (WebCore::drawTextWithSpacing):
+
+2009-11-10 Alexey Proskuryakov <ap@apple.com>
+
+ Qt build fix.
+
+ * platform/network/ResourceHandle.h: Only inherit from AuthenticationClient on platforms
+ that use ResourceHandle as a delegate (Mac, CFNetwork, Curl).
+
+2009-11-10 Beth Dakin <bdakin@apple.com>
+
+ Tiger build fix. No review needed.
+
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::sRGBColorSpaceRef):
+
+2009-11-10 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31312
+ Decouple authentication panel callbacks from ResourceHandle
+
+ No change in functionality.
+
+ SocketStreamHandle also needs to request credentials, so it's not appropriate to store
+ ResourceHandle as delegate.
+
+ * WebCore.vcproj/WebCore.vcproj:
+ * platform/network/AuthenticationClient.h: Added.
+ Added a new interface for listening to authentication panel notifications.
+
+ * WebCore.xcodeproj/project.pbxproj: Added AuthenticationClient.h. Let Visual Studio do what
+ it wants with the project file.
+
+ (WebCore::AuthenticationClient::ref): Using our usual method of exposing refcounting on an
+ interface class.
+ (WebCore::AuthenticationClient::deref): Ditto.
+
+ * platform/network/ResourceHandle.h:
+ (WebCore::ResourceHandle::refAuthenticationClient): Ditto.
+ (WebCore::ResourceHandle::derefAuthenticationClient): Ditto.
+
+ * platform/network/cf/AuthenticationCF.cpp:
+ (WebCore::AuthenticationChallenge::AuthenticationChallenge):
+ (WebCore::AuthenticationChallenge::platformCompare):
+ * platform/network/cf/AuthenticationChallenge.h:
+ (WebCore::AuthenticationChallenge::authenticationClient):
+ * platform/network/chromium/AuthenticationChallenge.h:
+ (WebCore::AuthenticationChallenge::authenticationClient):
+ * platform/network/curl/AuthenticationChallenge.h:
+ (WebCore::AuthenticationChallenge::authenticationClient):
+ Keeping a reference to AuthenticationClient, not to ResourceHandle.
+
+2009-11-10 Beth Dakin <bdakin@apple.com>
+
+ Second attempted gtk build fix. No review needed.
+
+ * html/canvas/CanvasStyle.cpp:
+ (WebCore::CanvasStyle::applyStrokeColor):
+
+
+2009-11-10 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Fix back/forwards cache with JSC isolated worlds.
+ https://bugs.webkit.org/show_bug.cgi?id=31310
+ <rdar://problem/7328111> Cached back navigation doesn't restore global object in extension isolated world
+
+ Store the global object for all worlds, not just the normal world.
+ Also maintain bidirectional weak references between the ScriptCachedFrameData and the DOMWrapperWorld,
+ so we can forget global objects if a world goes away.
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::DOMWrapperWorld::rememberScriptCachedFrameData):
+ (WebCore::DOMWrapperWorld::forgetScriptCachedFrameData):
+ * bindings/js/ScriptCachedFrameData.cpp:
+ (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
+ (WebCore::ScriptCachedFrameData::forgetWorld):
+ (WebCore::ScriptCachedFrameData::domWindow):
+ (WebCore::ScriptCachedFrameData::restore):
+ (WebCore::ScriptCachedFrameData::clear):
+ * bindings/js/ScriptCachedFrameData.h:
+ * bindings/js/ScriptController.h:
+
+2009-11-10 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Unreviewed buildfix after r50760.
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::GraphicsContext):
+
+2009-11-10 Beth Dakin <bdakin@apple.com>
+
+ Attempted build fix. (No review needed.)
+
+ * GNUmakefile.am: Adding ColorSpace.h
+
+2009-11-10 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by NOBODY - Build Fix.
+
+ Updated function calls to take a ColorSpace argument, passing
+ in DeviceColorSpace for now - this should be fixed. Also added
+ ColorSpace.h to WebCore project.
+
+ * WebCore.vcproj/WebCore.vcproj:
+ * platform/graphics/win/FontCGWin.cpp:
+ (WebCore::Font::drawGlyphs):
+ * platform/graphics/win/GraphicsContextCGWin.cpp:
+ (WebCore::GraphicsContext::GraphicsContext):
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::paint):
+ * platform/win/WebCoreTextRenderer.cpp:
+ (WebCore::doDrawTextAtPoint):
+ * rendering/RenderThemeSafari.cpp:
+ (WebCore::RenderThemeSafari::paintMenuListButton):
+
+2009-11-10 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Optimizations to Element::getAttribute
+ https://bugs.webkit.org/show_bug.cgi?id=30926
+
+ * dom/Element.cpp:
+ (WebCore::Element::getAttribute): User case-insensitive compare instead of lowercasing the name.
+ * dom/NamedAttrMap.cpp:
+ (WebCore::NamedNodeMap::getAttributeItem): Avoid redundant compares, and do fast/likely compares first.
+ * platform/text/PlatformString.h:
+ (WebCore::equalPossiblyIgnoringCase): New inline method, used by both of the above.
+
+2009-11-10 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for <rdar://problem/7059710>
+ -and corresponding-
+ https://bugs.webkit.org/show_bug.cgi?id=31196 Implement -webkit-
+ color-correction for CSS colors
+
+ New exported symbol for GraphicsContext::fillColor() which now
+ accepts a ColorSpace as an optional parameter.
+ * WebCore.base.exp:
+
+ Added a new file, ColorSpace.h, to define the ColorSpace enum.
+ * WebCore.xcodeproj/project.pbxproj:
+
+ Computed Style for -webkit-color-correction
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::):
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+
+ Parse -webkit-color-correction
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+
+ Map CSS identifiers to the appropriate values of the ColorSpace enum
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator ColorSpace):
+
+ New property -webkit-color-correction
+ * css/CSSPropertyNames.in:
+
+ Map -webkit-color-correction into the RenderStyle.
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+
+ Add new value sRGB.
+ * css/CSSValueKeywords.in:
+
+ Comment out the reference to sRGB since it will now be inherited as
+ a value from CSSValueKeywords.
+ * css/SVGCSSValueKeywords.in:
+
+ Definition of the ColorSpace enum.
+ * platform/graphics/ColorSpace.h: Added.
+ (WebCore::):
+
+ These functions all now take a ColorSpace as a parameter.
+ * platform/graphics/GraphicsContext.cpp:
+ (WebCore::GraphicsContext::setStrokeColor):
+ (WebCore::GraphicsContext::setFillColor):
+ (WebCore::GraphicsContext::drawHighlightForText):
+
+ Return the appropriate ColorSpace.
+ (WebCore::GraphicsContext::strokeColorSpace):
+ (WebCore::GraphicsContext::fillColorSpace):
+
+ These functions all call other functions which require a ColorSpace
+ as a parameter.
+ (WebCore::GraphicsContext::setStrokePattern):
+ (WebCore::GraphicsContext::setFillPattern):
+ (WebCore::GraphicsContext::setStrokeGradient):
+ (WebCore::GraphicsContext::setFillGradient):
+
+ All of the GraphicsContext functions that take a Color should now
+ also take a ColorSpace.
+ * platform/graphics/GraphicsContext.h:
+
+ Added new member variables stokeColorSpace and fillColorSpace.
+ * platform/graphics/GraphicsContextPrivate.h:
+ (WebCore::GraphicsContextState::GraphicsContextState):
+
+ Attempt to keep the Cairo port building with all of the massive
+ changes to GraphicsContext.
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::setPlatformFillColor):
+ (WebCore::GraphicsContext::setPlatformStrokeColor):
+ (WebCore::GraphicsContext::fillRoundedRect):
+
+
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::sRGBColorSpaceRef): New static function that returns a
+ CGColorSpaceRef for the sRGB color space.
+ (WebCore::deviceRGBColorSpaceRef): New static function that returns
+ a CGColorSpaceRef for the device RGB color space.
+
+ (WebCore::setCGFillColor): Now takes a ColorSpace parameter and
+ sets the fill color to the specified color in the given ColorSpace.
+ (WebCore::setCGStrokeColor): Same, but for stroke.
+
+ (WebCore::setCGFillColorSpace): New static to set the
+ CGFillColorSpace to the given ColorSpace
+ (WebCore::setCGStrokeColorSpace): Same, but for stroke.
+
+ Send ColorSpaces when appropriate, set ColorSpaces when
+ appropriate, and check ColorSpaces when appropriate.
+ (WebCore::GraphicsContext::GraphicsContext):
+ (WebCore::GraphicsContext::drawRect):
+ (WebCore::GraphicsContext::drawLine):
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::strokePath):
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::fillRoundedRect):
+ (WebCore::GraphicsContext::strokeRect):
+ (WebCore::GraphicsContext::drawLineForText):
+ (WebCore::GraphicsContext::setPlatformStrokeColor):
+ (WebCore::GraphicsContext::setPlatformFillColor):
+
+ Attempt to keep Haiku building.
+ * platform/graphics/haiku/GraphicsContextHaiku.cpp:
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::fillRoundedRect):
+ (WebCore::GraphicsContext::setPlatformStrokeColor):
+ (WebCore::GraphicsContext::setPlatformFillColor):
+
+ Attempt to keep QT building.
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::fillRoundedRect):
+ (WebCore::GraphicsContext::setPlatformStrokeColor):
+ (WebCore::GraphicsContext::setPlatformFillColor):
+
+ Attempt to keep Wince building.
+ * platform/graphics/wince/GraphicsContextWince.cpp:
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::setPlatformFillColor):
+ (WebCore::GraphicsContext::setPlatformStrokeColor):
+ (WebCore::GraphicsContext::clearRect):
+ (WebCore::GraphicsContext::fillRoundedRect):
+ (WebCore::GraphicsContext::setPlatformShadow):
+
+ Attempt to keep WX building.
+ * platform/graphics/wx/GraphicsContextWx.cpp:
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::fillRoundedRect):
+ (WebCore::GraphicsContext::setPlatformStrokeColor):
+ (WebCore::GraphicsContext::setPlatformFillColor):
+
+ Added functions colorSpace() and setColorSpace()
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::colorSpace):
+ (WebCore::InheritedFlags::setColorSpace):
+
+ The ColorSpace is stored here.
+ * rendering/style/StyleRareInheritedData.cpp:
+ (WebCore::StyleRareInheritedData::StyleRareInheritedData):
+ (WebCore::StyleRareInheritedData::operator==):
+ * rendering/style/StyleRareInheritedData.h:
+
+ All of these call sites call GraphicsContext functions which now
+ require ColorSpaces.
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::paintCaret):
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::drawTextInternal):
+ * html/canvas/CanvasStyle.cpp:
+ (WebCore::CanvasStyle::applyStrokeColor):
+ (WebCore::CanvasStyle::applyFillColor):
+ * inspector/InspectorController.cpp:
+ (WebCore::drawOutlinedQuad):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::paintContents):
+ * platform/ScrollbarTheme.h:
+ (WebCore::ScrollbarTheme::paintScrollCorner):
+ * platform/ScrollbarThemeComposite.cpp:
+ (WebCore::ScrollbarThemeComposite::paintScrollCorner):
+ * platform/graphics/Image.cpp:
+ (WebCore::Image::fillWithSolidColor):
+ * platform/graphics/mac/FontMac.mm:
+ (WebCore::Font::drawGlyphs):
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::paint):
+ * rendering/EllipsisBox.cpp:
+ (WebCore::EllipsisBox::paint):
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::paintTextDecorations):
+ * rendering/InlineTextBox.cpp:
+ (WebCore::updateGraphicsContext):
+ (WebCore::paintTextWithShadows):
+ (WebCore::InlineTextBox::paint):
+ (WebCore::InlineTextBox::paintSelection):
+ (WebCore::InlineTextBox::paintCompositionBackground):
+ (WebCore::InlineTextBox::paintDecoration):
+ (WebCore::InlineTextBox::paintTextMatchMarker):
+ (WebCore::InlineTextBox::paintCompositionUnderline):
+ * rendering/InlineTextBox.h:
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::fillHorizontalSelectionGap):
+ (WebCore::RenderBlock::fillVerticalSelectionGap):
+ (WebCore::RenderBlock::fillLeftSelectionGap):
+ (WebCore::RenderBlock::fillRightSelectionGap):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+ (WebCore::RenderBoxModelObject::paintBoxShadow):
+ * rendering/RenderFileUploadControl.cpp:
+ (WebCore::RenderFileUploadControl::paintObject):
+ * rendering/RenderFrameSet.cpp:
+ (WebCore::RenderFrameSet::paintColumnBorder):
+ (WebCore::RenderFrameSet::paintRowBorder):
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::paintReplaced):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::paintScrollCorner):
+ (WebCore::RenderLayer::paintResizer):
+ * rendering/RenderListBox.cpp:
+ (WebCore::RenderListBox::paintItemForeground):
+ (WebCore::RenderListBox::paintItemBackground):
+ * rendering/RenderListMarker.cpp:
+ (WebCore::RenderListMarker::paint):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::drawLineForBoxSide):
+ (WebCore::RenderObject::drawArcForBoxSide):
+ * rendering/RenderReplaced.cpp:
+ (WebCore::RenderReplaced::paint):
+ * rendering/RenderScrollbarTheme.cpp:
+ (WebCore::RenderScrollbarTheme::paintScrollCorner):
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintMenuListButton):
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::paintBoxDecorations):
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::paint):
+ * rendering/SVGInlineTextBox.cpp:
+ (WebCore::SVGInlineTextBox::paintSelection):
+ * svg/graphics/SVGPaintServerGradient.cpp:
+ (WebCore::SVGPaintServerGradient::setup):
+ * svg/graphics/SVGPaintServerSolid.cpp:
+ (WebCore::SVGPaintServerSolid::setup):
+
+2009-11-10 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Speed up syntax highlighter
+ https://bugs.webkit.org/show_bug.cgi?id=31291
+
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._loaded):
+ (WebInspector.SourceSyntaxHighlighter.prototype.process.moveToNextLine): Replace the line content node.
+ (WebInspector.SourceSyntaxHighlighter.prototype.process):
+ (WebInspector.SourceSyntaxHighlighter.prototype.appendNonToken):
+ (WebInspector.SourceSyntaxHighlighter.prototype.syntaxHighlightNode):
+ (WebInspector.CSSSourceSyntaxHighlighter):
+ (WebInspector.JavaScriptSourceSyntaxHighlighter):
+
+2009-11-09 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Remove session storage setting
+ https://bugs.webkit.org/show_bug.cgi?id=31279
+
+ Remove session storage from Settings. It was added temporarily so we could
+ disable it by default at runtime in Chromium. We now disable these things in a
+ different way, so it's time to remove it. Qt also depended on this setting for
+ a short period of time, but after talking to them we agreed that it should be
+ removed.
+
+ This bug is the second half of https://bugs.webkit.org/show_bug.cgi?id=30602
+
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::sessionStorage):
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ * page/Settings.h:
+
+2009-11-10 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Eric Carlson and Darin Adler.
+
+ WebCore part of making full-screen video pause during scrubbing.
+
+ * WebCore.Video.exp: Sorted and added HTMLMediaElement::beginScrubbing()
+ and HTMLMediaElement::endScrubbing().
+
+2009-11-10 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Reapply 50562 reverted by 50588 due to issues with sandboxing (should be fine now).
+ https://bugs.webkit.org/show_bug.cgi?id=31051
+
+ * bindings/v8/V8GCController.cpp:
+ (WebCore::V8GCController::gcEpilogue):
+ (WebCore::V8GCController::checkMemoryUsage):
+ * bindings/v8/V8GCController.h:
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluate):
+ (WebCore::V8Proxy::runScript):
+ (WebCore::V8Proxy::callFunction):
+
+2009-11-10 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for the part of loader directory in WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=31161
+
+ Inherits the following classes from Noncopyable because these are instantiated
+ by 'new' and these are no need to be copyable:
+
+ class Request - WebCore/loader/loader.cpp:100
+ struct ScheduledRedirection - WebCore/loader/RedirectScheduler.cpp:164
+ class ApplicationCacheStorage - WebCore/loader/appcache/ApplicationCacheStorage.cpp:1121
+ class ApplicationCacheHost - WebCore/loader/DocumentLoader.cpp:151
+ class ImageEventSender - WebCore/loader/ImageLoader.cpp:54
+ struct ProgressItem - WebCore/loader/ProgressTracker.cpp:169
+
+ Inherits ThreadableLoaderClient class from Noncopyable because (its child class)
+ MainThreadBridge is instantiated by 'new' in
+ WebCore/loader/WorkerThreadableLoader.cpp:59 it is no need to be copyable.
+
+ ThreadableLoaderClient's inheriting has been changed to public.
+
+ * loader/ImageLoader.cpp:
+ * loader/ProgressTracker.cpp:
+ * loader/RedirectScheduler.cpp:
+ * loader/Request.h:
+ * loader/ThreadableLoaderClient.h:
+ * loader/WorkerThreadableLoader.h:
+ * loader/appcache/ApplicationCacheHost.h:
+ * loader/appcache/ApplicationCacheStorage.h:
+
+2009-11-10 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31047
+ [GTK] Failing test media/video-played-ranges-1.html
+
+ WebKit coding style fixes.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mediaPlayerPrivateMessageCallback):
+ (WebCore::MediaPlayerPrivate::naturalSize):
+ (WebCore::MediaPlayerPrivate::paint):
+ (WebCore::mimeTypeCache):
+
+2009-11-10 Oliver Hunt <oliver@apple.com>
+
+ Remove build failure introduced by earlier build fix.
+
+ * bindings/v8/custom/V8WebGLIntArrayCustom.cpp:
+
+2009-11-10 Oliver Hunt <oliver@apple.com>
+
+ Is this the last build fix? grep tells me yes.
+
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-11-10 Oliver Hunt <oliver@apple.com>
+
+ Hopefully the last one. Why aren't these autogenerated?
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::setIndexedPropertiesToExternalArray):
+ (WebCore::V8DOMWrapper::getTemplate):
+ (WebCore::V8DOMWrapper::convertToV8Object):
+
+2009-11-10 Oliver Hunt <oliver@apple.com>
+
+ Another chrome build fix.
+
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-11-10 Oliver Hunt <oliver@apple.com>
+
+ Yet another chrome buildfix
+
+ * bindings/v8/custom/V8WebGLArrayBufferCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WebGLArrayCustom.h:
+ (WebCore::constructCanvasArray):
+ * bindings/v8/custom/V8WebGLByteArrayCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8WebGLFloatArrayCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8WebGLIntArrayCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::vertexAttribAndUniformHelperf):
+ (WebCore::uniformHelperi):
+ (WebCore::uniformMatrixHelper):
+ * bindings/v8/custom/V8WebGLShortArrayCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8WebGLUnsignedByteArrayCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8WebGLUnsignedIntArrayCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8WebGLUnsignedShortArrayCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+
+2009-11-10 Oliver Hunt <oliver@apple.com>
+
+ Chrome build fix.
+
+ * bindings/v8/V8Index.h:
+
+2009-11-10 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30901
+ [Gtk] Need to de-lint the Atk a11y code
+
+ Removal of various and sundry style-violating nits.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+
+2009-11-10 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31047
+ [GTK] Failing test media/video-played-ranges-1.html
+
+ Fix playback rate setter by remembering the rate was changed. Also
+ correctly handle reverse playback by doing a seek from end to
+ beginning of the media.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::currentTime):
+ (WebCore::MediaPlayerPrivate::seek):
+ (WebCore::MediaPlayerPrivate::hasAudio):
+ (WebCore::MediaPlayerPrivate::setVolume):
+ (WebCore::MediaPlayerPrivate::setRate):
+ (WebCore::MediaPlayerPrivate::updateStates):
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+
+2009-11-10 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Rename 3D Canvas related classes to use WebGL prefix
+ https://bugs.webkit.org/show_bug.cgi?id=29095
+
+ Automatic rename of all WebGL related types from Canvas* to
+ WebGL* per more recent version of the WebGL spec.
+
+ Due to the automatic rename I've removed the 600+ line change list.
+
+2009-11-09 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ SVG feDisplacementMap is not implemented
+ [https://bugs.webkit.org/show_bug.cgi?id=31255]
+
+ This is the implementation of the SVG filter effect
+ feDisplacementMap.
+
+ Test: svg/filters/feDisplacementMap.svg
+
+ * svg/graphics/filters/SVGFEDisplacementMap.cpp:
+ (WebCore::FEDisplacementMap::apply):
+
+2009-11-09 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Add a comment about null strings and hash functions.
+ https://bugs.webkit.org/show_bug.cgi?id=29118
+
+ * platform/text/StringHash.h:
+
+2009-11-09 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Compiler warnings in InspectorResource.h
+ https://bugs.webkit.org/show_bug.cgi?id=29231
+
+ Fix compilation warnings by removing addition operation on an enum type.
+
+ * inspector/InspectorResource.h:
+ (WebCore::InspectorResource::):
+ (WebCore::InspectorResource::Changes::hasChange):
+ (WebCore::InspectorResource::Changes::set):
+ (WebCore::InspectorResource::Changes::setAll):
+
+2009-11-09 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler and Dan Bernstein.
+
+ <rdar://problem/7328395>
+ https://bugs.webkit.org/show_bug.cgi?id=31277
+
+ When an object tag's style changes (for example when child nodes are added/removed),
+ reuse its Frame (if it has one) instead of creating multiple Frames.
+
+ Test: fast/dom/HTMLObjectElement/children-changed.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::requestObject):
+
+2009-11-09 Norbert Leser <norbert.leser@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Moved macro MMP_RULES (LINKEROPTION) into symbian instead of symbian-sbsv2,
+ since adjustment of RW-section base address will be needed for all new symbian
+ tool chains, specifically for arm and gcc compilation targets.
+ Also, change target address to 0xE00000 to be sufficient for all targets.
+
+ * WebCore.pro:
+
+2009-11-09 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Crash when inspecting
+ WebCore\manual-tests\inspector\dom-mutation.html
+
+ https://bugs.webkit.org/show_bug.cgi?id=31259
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::handleEvent):
+
+2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Few classes have virtual functions but non-virtual destructor
+ https://bugs.webkit.org/show_bug.cgi?id=31269
+
+ No new tests as there is no functional change.
+
+ * platform/qt/QWebPageClient.h:
+ (QWebPageClient::~QWebPageClient): Add virtual destructor.
+
+2009-11-09 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Allow setting HTTP headers with empty value in XMLHTTPRequest
+ https://bugs.webkit.org/show_bug.cgi?id=31140
+
+ QtNetwork interprets null string as request to remove the header, not add it.
+ Replace null values with empty values before passing them to QtNetwork.
+
+ Test: http/tests/xmlhttprequest/xmlhttprequest-setrequestheader-no-value.html
+
+ * platform/network/qt/ResourceRequestQt.cpp:
+ (WebCore::ResourceRequest::toNetworkRequest):
+
+2009-11-09 Vadim Zeitlin <vadim@wxwidgets.org>
+
+ Reviewed by Kevin Ollivier.
+
+ [wx] Fix handling of alpha channel when using wxWidgets 2.9: it was
+ simply ignored before resulting in transparent areas being black in PNG
+ images for example.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30823
+
+ * platform/image-decoders/wx/ImageDecoderWx.cpp:
+ (WebCore::RGBA32Buffer::asNewNativeImage):
+
+2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
+ https://bugs.webkit.org/show_bug.cgi?id=31040
+
+ No new tests as there is no functional change.
+
+ * dom/Document.cpp:
+ (WebCore::Document::recalcStyleSelector):
+ * editing/TextIterator.cpp:
+ (WebCore::pushFullyClippedState):
+ * editing/VisibleSelection.cpp:
+ (WebCore::VisibleSelection::appendTrailingWhitespace):
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::process):
+ * loader/RedirectScheduler.cpp:
+ (WebCore::RedirectScheduler::mustLockBackForwardList):
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
+ * platform/graphics/qt/FontCacheQt.cpp:
+ (WebCore::FontPlatformDataCacheKey::computeHash):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::handleRunInChild):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::calcHeight):
+ * rendering/RenderTextControlMultiLine.cpp:
+ (WebCore::RenderTextControlMultiLine::nodeAtPoint):
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::diff):
+ * svg/SVGAnimateElement.cpp:
+ (WebCore::parseNumberValueAndUnit):
+ * svg/SVGAnimationElement.cpp:
+ (WebCore::SVGAnimationElement::startedActiveInterval):
+ * svg/SVGPreserveAspectRatio.cpp:
+ (WebCore::SVGPreserveAspectRatio::getCTM):
+
+2009-11-09 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Win chromium is slow to draw transparent texts
+ https://bugs.webkit.org/show_bug.cgi?id=31258
+
+ Clip graphics context to reduce calculation.
+
+ No new tests because this change only affects performance.
+
+ * platform/graphics/chromium/FontChromiumWin.cpp:
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
+
+2009-11-09 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ showTree(CounterNode*) generates too little info and has too many spaces.
+ https://bugs.webkit.org/show_bug.cgi?id=31212
+
+ No new tests as the change has no functional effect it is just for
+ improved debugging.
+
+ * rendering/CounterNode.cpp:
+ (WebCore::showTreeAndMark):
+ Changed to also show addresses of parent, next and previous
+ siblings.
+
+2009-11-09 Stuart Morgan <stuartmorgan@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Moves Mac implementation of setUseSecureKeyboardEntry to Frame.cpp and
+ enables it PLATFORM(CHROMIUM) in addition to PLATFORM(MAC).
+
+ https://bugs.webkit.org/show_bug.cgi?id=31083
+
+ No new tests; implementation is unchanged.
+
+ * page/Frame.cpp:
+ (WebCore::Frame::setUseSecureKeyboardEntry):
+ * page/mac/FrameMac.mm:
+
+2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Jan Alonzo.
+
+ Make XP_UNIX tests consistent
+ https://bugs.webkit.org/show_bug.cgi?id=31250
+
+ No new tests as there is no functional change.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::setFrameRect): Test if XP_UNIX is defined
+ instead of the value of the macro
+
+ * plugins/gtk/PluginViewGtk.cpp:
+ (WebCore::PluginView::setNPWindowIfNeeded): Test if the XP_UNIX is
+ defined instead of using the PLATFORM macro to be consistent
+ (WebCore::PluginView::getValue): Ditto.
+
+2009-11-09 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Thunk to the main thread from ~Database to deref Database's m_document.
+
+ If the Database was the Document's last referrer, then ~Document occurs on the
+ Database thread, and ASSERT(!m_styleRecalcTimer.isActive()) hits a main thread
+ ASSERT in debug builds.
+
+ * storage/Database.cpp:
+ (WebCore::derefDocument):
+ (WebCore::Database::~Database):
+
+2009-11-09 Mark Mentovai <mark@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ Track "can have scrollbar" state within FrameView independently of the
+ individual scrollbar states in ScrollView.
+
+ rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167
+ REGRESSION (r48064): mint.com loses scrollbars after coming out of
+ edit mode.
+
+ rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517
+ REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
+
+ Test: fast/overflow/scrollbar-restored.html
+
+ * WebCore.base.exp:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::FrameView):
+ (WebCore::FrameView::resetScrollbars):
+ (WebCore::FrameView::setCanHaveScrollbars):
+ (WebCore::FrameView::updateCanHaveScrollbars):
+ (WebCore::FrameView::layout):
+ * page/FrameView.h:
+ * platform/ScrollView.h:
+
+2009-11-09 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: CSS syntax highlighter doesn't recognize negative numbers
+ https://bugs.webkit.org/show_bug.cgi?id=31257
+
+ * inspector/front-end/SourceFrame.js:
+
+2009-11-09 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Debugger shortcuts (F8, F10, F11) have no effect if the Console view is open
+ https://bugs.webkit.org/show_bug.cgi?id=31252
+
+ Route F1-F12 keypresses in the Console view to the current panel if there is one.
+
+ Test: manual-tests/inspector/debugger-shortcuts-with-console-opened.html
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._promptKeyDown):
+ * inspector/front-end/utilities.js:
+ ():
+ * manual-tests/inspector/debugger-shortcuts-with-console-opened.html: Added.
+
+2009-11-09 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Pass credentials provided by XMLHTTPRequest to the network request.
+ https://bugs.webkit.org/show_bug.cgi?id=31208
+
+ After r42483, the credentials are no longer passed to the network request
+ in the URL of the request.
+ Pass the credentials from XMLHTTPRequest to the network request, the same
+ way that other ports do.
+
+ After this patch LayoutTests/http/xmlhttprequest/basic-auth.html passes.
+
+ * platform/network/qt/ResourceHandleQt.cpp:
+ (WebCore::ResourceHandle::start):
+ (WebCore::ResourceHandle::loadResourceSynchronously):
+
+2009-11-09 Zoltan Horvath <zoltan@webkit.org>
+
+ Unreviewed.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31161
+
+ Roll back r50657 because it breaks the MAC builds.
+
+ * loader/ImageLoader.cpp:
+ * loader/ProgressTracker.cpp:
+ * loader/RedirectScheduler.cpp:
+ * loader/Request.h:
+ * loader/ThreadableLoaderClient.h:
+ * loader/WorkerThreadableLoader.h:
+ * loader/appcache/ApplicationCacheHost.h:
+ * loader/appcache/ApplicationCacheStorage.h:
+ * loader/icon/IconDatabaseClient.h:
+
+2009-11-09 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for the part of loader directory in WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=31161
+
+ Inherits the following classes from Noncopyable because these are instantiated
+ by 'new' and these are no need to be copyable:
+
+ class Request - WebCore/loader/loader.cpp:100
+ struct ScheduledRedirection - WebCore/loader/RedirectScheduler.cpp:164
+ class IconDatabaseClient - WebCore/loader/icon/IconDatabase.cpp:89
+ class ApplicationCacheStorage - WebCore/loader/appcache/ApplicationCacheStorage.cpp:1121
+ class ApplicationCacheHost - WebCore/loader/DocumentLoader.cpp:151
+ class ImageEventSender - WebCore/loader/ImageLoader.cpp:54
+ struct ProgressItem - WebCore/loader/ProgressTracker.cpp:169
+
+ Inherits ThreadableLoaderClient class from Noncopyable because (its child class)
+ MainThreadBridge is instantiated by 'new' in
+ WebCore/loader/WorkerThreadableLoader.cpp:59 it is no need to be copyable.
+
+ ThreadableLoaderClient's inheriting has been changed to public.
+
+ * loader/ImageLoader.cpp:
+ * loader/ProgressTracker.cpp:
+ * loader/RedirectScheduler.cpp:
+ * loader/Request.h:
+ * loader/ThreadableLoaderClient.h:
+ * loader/WorkerThreadableLoader.h:
+ * loader/appcache/ApplicationCacheHost.h:
+ * loader/appcache/ApplicationCacheStorage.h:
+ * loader/icon/IconDatabaseClient.h:
+
+2009-11-09 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's DocLoader
+ https://bugs.webkit.org/show_bug.cgi?id=31163
+
+ Inherits DocLoader class from Noncopyable because it is
+ instantiated by 'new' in WebCore/dom/Document.cpp:370 and
+ it is no need to be copyable.
+
+ * loader/DocLoader.h:
+
+2009-11-09 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's Tokenizer
+ https://bugs.webkit.org/show_bug.cgi?id=31162
+
+ Inherits Tokenizer class from Noncopyable because (its child class)
+ ImageTokenizer instantiated by 'new' in WebCore/loader/ImageDocument.cpp:178
+ and it is no need to be copyable.
+
+ * dom/Tokenizer.h:
+
+2009-11-09 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's DeleteButtonController
+ https://bugs.webkit.org/show_bug.cgi?id=31105
+
+ Inherits DeleteButtonController class from Noncopyable because it is
+ instantiated by 'new' in WebCore/editing/Editor.cpp:919 and
+ it is no need to be copyable.
+
+ * editing/DeleteButtonController.h:
+
+2009-11-09 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Jan Alonzo.
+
+ [GTK] Expose Page::tabKeyCyclesThroughElements in the API
+ https://bugs.webkit.org/show_bug.cgi?id=30482
+
+ Expose Page::tabKeyCyclesThroughElements as a property of
+ WebKitWebView.
+
+ No new tests; fast/events/keypress-insert-tab.html is no longer skipped.
+
+ * platform/gtk/KeyEventGtk.cpp: Correct m_text for tab key presses.
+ (WebCore::singleCharacterString):
+
+2009-11-09 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25415
+ [GTK][ATK] Please implement support for get_text_at_offset
+
+ Fix a crasher that occurred with text which included newline
+ chars in the markup.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (convertUniCharToUTF8):
+
+2009-11-05 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] The XML tokenizer reports a parse error twice if it occurs before the document element is found.
+ https://bugs.webkit.org/show_bug.cgi?id=31144
+
+ XMLTokenizer::doEnd() uses an additional logic to report a parse failure in
+ documents that end prematurely but are not considered invalid by QXmlStream.
+ This is to stay compatible with the libxml2 implementation.
+ However, that code path would be also hit in situations when it should not,
+ i.e. the error would have already been caught and handled. As a result, the
+ same error would be reported twice.
+
+ No new tests, because the problem is already covered by
+ fast/parser/xml-declaration-missing-ending-mark.html.
+
+ * dom/XMLTokenizerQt.cpp:
+ (WebCore::XMLTokenizer::doEnd):
+
+2009-11-08 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Inspector should support copy() in the command line
+ https://bugs.webkit.org/show_bug.cgi?id=31238
+
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::copyText): Added.
+ * inspector/InspectorBackend.h: Added copyText
+ * inspector/InspectorBackend.idl: Added copyText
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript._copy): Added.
+ (InjectedScript._ensureCommandLineAPIInstalled):
+
+2009-11-08 Drew Wilson <atwilson@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ V8 WorkerContextExecutionProxy does not handle SharedWorkers
+ https://bugs.webkit.org/show_bug.cgi?id=31226
+
+ Now checks to see what type of context is active and creates the
+ appropriate wrapper (DEDICATEDWORKERCONTEXT vs SHAREDWORKERCONTEXT).
+
+ Added support for converting to SharedWorkers and SharedWorkerContexts.
+
+ Test: Existing layout tests cover this case (start passing in Chrome).
+
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
+ Now generates the right type of DOMWrapper for SharedWorkerContexts.
+ (WebCore::WorkerContextExecutionProxy::convertToV8Object):
+ Added support for SHAREDWORKERCONTEXT.
+ (WebCore::WorkerContextExecutionProxy::convertEventTargetToV8Object):
+ Added support for SharedWorker and SharedWorkerContext.
+
+2009-11-08 Johnny Ding <johnnyding.webkit@gmail.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31224
+ [V8] Return StyleSheet object instead of HTMLStyleElement w/document.styleSheets named property getter.
+
+ Test: fast/dom/StyleSheet/get-stylesheet-byname.html
+
+ * bindings/v8/custom/V8StyleSheetListCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+
+2009-11-08 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: "Search again" on scripts panel switches
+ to the script this search started with.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31243
+
+ * inspector/front-end/Panel.js:
+ (WebInspector.Panel.prototype.jumpToNextSearchResult):
+
+2009-11-08 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Simplify Icon interface.
+ https://bugs.webkit.org/show_bug.cgi?id=31154
+
+ - Remove Icon::createIconForFile(). createIconForFiles() covers
+ createIconForFile()'s role.
+ - Remove FileChooser::chooseIcon()
+ - Change the parameter types of FileChooser constructor and the
+ factory method, String -> const Vector<String>&, in order to
+ support initialization with multiple files.
+ - Remove the icon loading code in IconChromiumWin.cpp, which
+ doesn't work because of the sandbox.
+
+ No tests because it's just a refactoring.
+
+ * platform/FileChooser.cpp:
+ (WebCore::FileChooser::FileChooser):
+ (WebCore::FileChooser::create):
+ (WebCore::FileChooser::chooseFile):
+ (WebCore::FileChooser::chooseFiles):
+ * platform/FileChooser.h:
+ * platform/graphics/Icon.h:
+ * platform/graphics/chromium/IconChromiumLinux.cpp:
+ * platform/graphics/chromium/IconChromiumMac.cpp:
+ * platform/graphics/chromium/IconChromiumWin.cpp:
+ (WebCore::Icon::createIconForFiles):
+ * platform/graphics/gtk/IconGtk.cpp:
+ (WebCore::Icon::createIconForFiles):
+ * platform/graphics/haiku/IconHaiku.cpp:
+ * platform/graphics/mac/IconMac.mm:
+ (WebCore::Icon::createIconForFiles):
+ * platform/graphics/qt/IconQt.cpp:
+ (WebCore::Icon::createIconForFiles):
+ * platform/graphics/win/IconWin.cpp:
+ (WebCore::Icon::createIconForFiles):
+ * platform/graphics/wx/IconWx.cpp:
+ * rendering/RenderFileUploadControl.cpp:
+ (WebCore::RenderFileUploadControl::RenderFileUploadControl):
+
+2009-11-08 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31098
+
+ Allows same-origin plugin-based content to load.
+
+ Test: http/tests/security/xssAuditor/object-src-inject.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canLoadExternalScriptFromSrc): Modified to call XSSAuditor::isSameOriginResource.
+ (WebCore::XSSAuditor::canLoadObject): Ditto.
+ (WebCore::XSSAuditor::canSetBaseElementURL): Ditto.
+ (WebCore::XSSAuditor::isSameOriginResource): Added.
+ * page/XSSAuditor.h:
+
+2009-11-08 David Levin <levin@chromium.org>
+
+ Reviewed by NOBODY (chromium build fix).
+
+ * platform/network/HTTPParsers.cpp:
+ (WebCore::parseDate): Changed this to not
+ use a date parser that needs ExecState passed.
+
+2009-11-08 David Levin <levin@chromium.org>
+
+ Unreviewed build fix for chromium.
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::strokePath):
+ (WebCore::GraphicsContext::strokeRect):
+
+2009-11-08 David Levin <levin@chromium.org>
+
+ Unreviewed build fix for chromium.
+
+ Build fix for https://bugs.webkit.org/show_bug.cgi?id=31219
+ Clean up GraphicsContext's current concept of ColorSpace
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::strokePath):
+ (WebCore::GraphicsContext::strokeRect):
+
+2009-11-08 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: [REGRESSION] committing style edit
+ clears elements panel selection.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31242
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeOutline.prototype.update):
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertyTreeElement.prototype.):
+ (WebInspector.StylePropertyTreeElement.prototype):
+
+2009-11-08 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Holger Freyther.
+
+ ResourceRequest to be class instead of struct
+ https://bugs.webkit.org/show_bug.cgi?id=30670
+
+ Started as a compilation fix for Symbian where the compiler makes a distinction between
+ class and struct in function argument signatures.
+ Changed all forward declarations of ResourceRequest to have class in the forward
+ declaration instead of struct and changed the definition of ResourceRequest to be class
+ and added access qualifiers where missing. Additionally two references of friend
+ struct ResourceRequestBase changed to class instead.
+
+ * history/HistoryItem.h:
+ * inspector/InspectorController.h:
+ * inspector/InspectorResource.h:
+ * loader/DocumentThreadableLoader.h:
+ * loader/FrameLoaderClient.h:
+ * loader/MainResourceLoader.h:
+ * loader/ResourceLoadNotifier.h:
+ * loader/SubresourceLoader.h:
+ * loader/SubresourceLoaderClient.h:
+ * loader/ThreadableLoader.h:
+ * loader/WorkerThreadableLoader.h:
+ * loader/appcache/ApplicationCache.h:
+ * loader/appcache/ApplicationCacheHost.h:
+ * platform/CrossThreadCopier.h:
+ * platform/network/ResourceHandle.h:
+ * platform/network/ResourceHandleClient.h:
+ * platform/network/ResourceRequestBase.h:
+ * platform/network/cf/ResourceRequest.h:
+ * platform/network/cf/ResourceRequestCFNet.h:
+ * platform/network/chromium/ResourceRequest.h:
+ * platform/network/curl/ResourceRequest.h:
+ * platform/network/qt/ResourceRequest.h:
+ * platform/network/soup/ResourceRequest.h:
+ * xml/XMLHttpRequest.h:
+
+2009-11-08 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7363434> Crash inside RenderObject::localToAbsolute
+ below FrameView::layout
+ https://bugs.webkit.org/show_bug.cgi?id=31093
+
+ Test: fast/block/positioning/relative-positioned-inline-container.html
+
+ In <http://trac.webkit.org/changeset/19148>, setStaticY() was changed
+ to mark the object for layout, doing so without marking its ancestors.
+ However, RenderBlock::skipLeadingWhitespace and
+ RenderBlock::skipTrailingWhitespace() call setStaticY() on a relative-
+ positioned inline container, causing it to be marked for layout without
+ ever going back to give it layout, and thus layout could end with a
+ dirty object still in the tree, leading to all sorts of badness.
+
+ The fix is to revert setStaticY() to not marking the object dirty, and
+ instead do it in the call sites that require it, which are in
+ RenderBlock and RenderFlexibleBox.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::adjustPositionedBlock):
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::layoutHorizontalBox):
+ (WebCore::RenderFlexibleBox::layoutVerticalBox):
+ * rendering/RenderLayer.cpp:
+ * rendering/RenderLayer.h:
+ (WebCore::RenderLayer::setStaticY):
+
+2009-11-07 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=20780
+
+ Fixes an issue where the onchange event handler is not fired when the
+ input field is autocompleted.
+
+ We cannot test this using DRT since DRT cannot emulate autocompletion.
+ So, a manual-test is included.
+
+ Tests: manual-tests/autocompletion-fire-onchange.html
+
+ * manual-tests/autocompletion-fire-onchange.html: Added.
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::setInnerTextValue):
+
+2009-11-07 Benjamin Otte <otte@gnome.org>
+
+ Reviewed by Holger Freyther.
+
+ Mark redrawn areas on image surfaces as dirty.
+
+ This is required to conform to the Cairo API, but is currently only
+ used by debugging tools like cairo-trace.
+
+ * platform/graphics/cairo/ImageBufferCairo.cpp:
+ (WebCore::ImageBuffer::platformTransformColorSpace):
+ (WebCore::putImageData):
+
+2009-11-07 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30878
+ [Gtk] atk_text_get_text() fails in entries when the end_offset is -1
+
+ If the end_offset is -1, use the String length as the end_offset.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (webkit_accessible_text_get_text):
+
+2009-11-06 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=31219 Clean up
+ GraphicsContext's current concept of ColorSpace
+
+ ColorSpace is now called ColorType. The variables on the state we
+ appropriately re-named as well. I removed strokeColorSpace() and
+ fillColorSpace() from GraphicsContext since they were never called.
+
+ * platform/graphics/GraphicsContext.cpp:
+ (WebCore::GraphicsContext::setStrokeColor):
+ (WebCore::GraphicsContext::setFillColor):
+ (WebCore::GraphicsContext::setStrokePattern):
+ (WebCore::GraphicsContext::setFillPattern):
+ (WebCore::GraphicsContext::setStrokeGradient):
+ (WebCore::GraphicsContext::setFillGradient):
+ * platform/graphics/GraphicsContext.h:
+ (WebCore::):
+ * platform/graphics/GraphicsContextPrivate.h:
+ (WebCore::GraphicsContextState::GraphicsContextState):
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::strokePath):
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::calculateDrawingMode):
+ (WebCore::GraphicsContext::drawPath):
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::strokePath):
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::strokeRect):
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::strokePath):
+ (WebCore::GraphicsContext::fillRect):
+ * platform/graphics/wince/GraphicsContextWince.cpp:
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::fillRect):
+
+2009-11-06 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Fixes <http://webkit.org/b/31177>.
+ Web Inspector: Bind backspace to delete cookies and DOM Storage.
+
+ Refactor editing code from DOMStorageDataGrid to DataGrid, so other
+ places in the inspector can use editing in DataGrid (added a FIXME for
+ some stuff that needs to be generalized).
+
+ Also added deleting functionality to DataGrid, and implemented it for
+ Cookies and DOM Storage. The reason this patch is so big is because of
+ the refactoring of editing code, which won't be used yet in a cross-datagrid
+ way, but should be able to.
+
+ Additionally, moved the callbacks members from DOMStorageDataGrid to
+ DOMStorageItemsView, which allowed us to delete DOMStorageDataGrid, to
+ make the architecture of DOM Storage look a lot more like the Cookies view.
+
+ Lastly, added a preventDefault call in ElementsTreeOutline to prevent the
+ inspector from beeping at you when you delete an element.
+
+ * WebCore.gypi: Removed DOMStorageDataGrid.
+ * WebCore.vcproj/WebCore.vcproj: Removed DOMStorageDataGrid.
+ * inspector/front-end/CookieItemsView.js:
+ (WebInspector.CookieItemsView.prototype.dataGridForCookies):
+ (WebInspector.CookieItemsView.prototype._deleteButtonClicked):
+ (WebInspector.CookieItemsView.prototype._deleteCookieCallback):
+ * inspector/front-end/DOMStorageDataGrid.js: Removed.
+ * inspector/front-end/DOMStorageItemsView.js:
+ (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageEntries):
+ (WebInspector.DOMStorageItemsView.prototype._deleteButtonClicked):
+ (WebInspector.DOMStorageItemsView.prototype._refreshButtonClicked):
+ (WebInspector.DOMStorageItemsView.prototype._editingCallback):
+ (WebInspector.DOMStorageItemsView.prototype.deleteSelectedRow):
+ (WebInspector.DOMStorageItemsView.prototype._deleteCallback):
+ * inspector/front-end/DataGrid.js:
+ (WebInspector.DataGrid):
+ (WebInspector.DataGrid.prototype._ondblclick): Moved from DOMStorageDataGrid to DataGrid + Refactoring.
+ (WebInspector.DataGrid.prototype._startEditingColumnOfDataGridNode): Ditto.
+ (WebInspector.DataGrid.prototype._startEditing): Ditto.
+ (WebInspector.DataGrid.prototype._editingCommitted.moveToNextIfNeeded): Ditto.
+ (WebInspector.DataGrid.prototype._editingCommitted): Ditto.
+ (WebInspector.DataGrid.prototype._editingCancelled): Ditto.
+ (WebInspector.DataGrid.prototype.handleKeyEvent): Added case for delete/backspace.
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeOutline.prototype.handleKeyEvent): Added preventDefault call.
+ * inspector/front-end/WebKit.qrc: Removed DOMStorageDataGrid.
+ * inspector/front-end/inspector.html: Removed DOMStorageDataGrid.
+
+2009-11-06 Geoffrey Garen <ggaren@apple.com>
+
+ Qt build fix: added an ExecState parameter.
+
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::convertValueToQVariant):
+ (JSC::Bindings::convertQVariantToValue):
+
+2009-11-06 Geoffrey Garen <ggaren@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=31197
+ Implemented a timezone cache not based on Mac OS X's notify_check API.
+
+ Updated for JavaScriptCore internal API change.
+
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::convertValueToQVariant):
+ (JSC::Bindings::convertQVariantToValue): Updated for namespace change.
+
+ * platform/network/HTTPParsers.cpp:
+ (WebCore::parseDate): Pass 0 for ExecState, since we don't have one.
+ (This function probably shouldn't be using a JavaScript date parser
+ to begin with, but oh well.)
+
+2009-11-06 Anantanarayanan G Iyengar <ananta@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ The associated webkit bug is https://bugs.webkit.org/show_bug.cgi?id=31067,
+ which affects Chromium only.
+
+ Changes to V8HTMLDocumentCustom.cpp are as below:-
+ 1. The HTMLDocumentOpen function would cause a crash in Chromium if
+ there was no calling javascript context. We now check for this case
+ and pass in NULL to the HTMLDocument::open function which can handle
+ a NULL document parameter.
+ 2. The other functions like HTMLDocumentWrite, HTMLDocumentWriteln, etc
+ had ASSERTS for a NULL caller frame, which was bogus as it would crash
+ anyway. We now check for this case and return a failure.
+
+ Changes to V8DOMWindowCustom.cpp are as below:-
+ 1. Instead of failing the window.open call made by NPAPI for lack of a
+ calling javascript context, we now use the entered context as the calling
+ context.
+
+ Tests: plugins/document-open.html
+ plugins/window-open.html
+
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-11-06 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Geolocation error code UNKNOWN_ERROR is deprecated.
+ https://bugs.webkit.org/show_bug.cgi?id=31184
+
+ Remove this error code from PositionError, both for use from C++ code and from the JS object.
+
+ Updated fast/dom/Geolocation/error.html to test this.
+
+ * page/PositionError.h: Modified.
+ (WebCore::PositionError::): Remove ErrorCode::UNKNOWN_ERROR.
+ * page/PositionError.idl: Modified. Remove UNKNOWN_ERROR constant.
+ * page/Geolocation.cpp: Modified.
+ (WebCore::Geolocation::startRequest): Replace UNKNOWN_ERROR with POSITION_UNAVAILABLE.
+ * platform/gtk/GeolocationServiceGtk.cpp: Modified.
+ (WebCore::GeolocationServiceGtk::startUpdating): Replace UNKNOWN_ERROR with POSITION_UNAVAILABLE.
+
+2009-11-06 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ feMorphology filter is not implemented
+ [https://bugs.webkit.org/show_bug.cgi?id=5863]
+
+ The Implementation of feMorphology.
+
+ Test: We have allready a test for feMorphology
+ svg/W3C-SVG-1.1/filters-morph-01-f.svg
+
+ * svg/graphics/filters/SVGFEMorphology.cpp:
+ (WebCore::FEMorphology::apply):
+
+2009-11-06 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ V8DOMWindowCustom.cpp is missing WEB_SOCKETS guard on include.
+ https://bugs.webkit.org/show_bug.cgi?id=31209
+
+ Build fix only. No new tests possible.
+
+ * bindings/v8/custom/V8DOMWindowCustom.cpp: Modified. Added WEB_SOCKETS guard on inclue of WebSockets.h.
+
+2009-11-06 Drew Wilson <atwilson@chromium.org>
+
+ Reviewed by David Levin.
+
+ V8 bindings do not support SharedWorkers as event targets
+ https://bugs.webkit.org/show_bug.cgi?id=31199
+
+ No new tests because existing layout tests suffice (they currently
+ crash on Chromium)
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
+ Added clause to create a DOM wrapper for SharedWorkers.
+
+2009-11-06 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Do not unnecessarly synchronzie in weak reference callbacks.
+ https://bugs.webkit.org/show_bug.cgi?id=31191
+
+ * bindings/v8/DOMData.h:
+ (WebCore::DOMData::handleWeakObject):
+
+2009-11-06 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Fix resource content search.
+ https://bugs.webkit.org/show_bug.cgi?id=31202
+
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype.refresh):
+ (WebInspector.AbstractTimelinePanel.prototype.removeItem):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelineGraph.prototype.refresh):
+
+2009-11-05 Yuta Kitamura <yutak@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix ASSERT(currentStyle = renderStyle()).
+ https://bugs.webkit.org/show_bug.cgi?id=31152
+
+ * dom/Element.cpp:
+ (WebCore::Element::pseudoStyleCacheIsInvalid): We should have used "==" instead of "=".
+
+2009-11-05 Alpha Lam <hclam@chromium.org>
+
+ Revert 50562 because it broke Chromium. Not reviewed since this is a build fix and revert.
+
+ * bindings/v8/V8GCController.cpp:
+ (WebCore::V8GCController::gcEpilogue):
+ * bindings/v8/V8GCController.h:
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluate):
+ (WebCore::V8Proxy::runScript):
+ (WebCore::V8Proxy::callFunction):
+
+2009-11-05 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ Cross-domain access to stylesheet text should not be allowed
+ https://bugs.webkit.org/show_bug.cgi?id=20527
+
+ Check whether whether the current document can read the cssRules from
+ the style sheet. Firefox throws a security error here, but we return
+ null instead because that's what we usually do in these cases.
+
+ Test: http/tests/security/cannot-read-cssrules-redirect.html
+ http/tests/security/cannot-read-cssrules.html
+
+ * css/CSSStyleSheet.cpp:
+ (WebCore::CSSStyleSheet::cssRules):
+
+2009-11-05 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ If the Geolocation service fails to start, invoke the error callback asynchronously.
+ https://bugs.webkit.org/show_bug.cgi?id=28276
+
+ All Geolocation callbacks must be invoked asynchronously.
+ See http://www.w3.org/TR/geolocation-API/#geolocation_interface
+
+ No new tests possible with current LayoutTestController.
+
+ * page/Geolocation.cpp:
+ (WebCore::Geolocation::getCurrentPosition): Modified. Asserts that startRequest returned a notifier.
+ (WebCore::Geolocation::watchPosition): Modified. Asserts that startRequest returned a notifier.
+ (WebCore::Geolocation::startRequest): Modified. If the Geolocation service fails to start, set a fatal error on the notifier.
+
+2009-11-05 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Removed the "this is part of the KDE project" comments from
+ all *.h, *.cpp, *.idl, and *.pm files.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31167
+
+ The maintenance and architecture page in the project wiki lists
+ this as a task.
+
+ This change includes no changes or additions to test cases
+ since the change affects only comments.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/scripts/IDLParser.pm:
+ * bindings/scripts/IDLStructure.pm:
+ * css/CSSInheritedValue.cpp:
+ * css/CSSInitialValue.cpp:
+ * css/CSSMediaRule.cpp:
+ * css/CSSNamespace.h:
+ * css/CSSProperty.cpp:
+ * css/CSSProperty.h:
+ * css/CSSRuleList.cpp:
+ * css/CSSRuleList.h:
+ * css/CSSSelector.h:
+ * css/CSSValueList.cpp:
+ * css/FontValue.cpp:
+ * css/MediaFeatureNames.cpp:
+ * css/MediaFeatureNames.h:
+ * css/Pair.h:
+ * css/SVGCSSStyleSelector.cpp:
+ * css/ShadowValue.cpp:
+ * css/StyleSheet.cpp:
+ * css/StyleSheetList.cpp:
+ * css/maketokenizer:
+ * dom/BeforeUnloadEvent.cpp:
+ * dom/BeforeUnloadEvent.h:
+ * dom/CSSMappedAttributeDeclaration.cpp:
+ * dom/EventNames.cpp:
+ * dom/EventTarget.cpp:
+ * dom/MappedAttributeEntry.h:
+ * dom/MouseRelatedEvent.h:
+ * dom/RangeException.h:
+ * dom/StyleElement.h:
+ * dom/Tokenizer.h:
+ * html/HTMLHeadElement.h:
+ * html/HTMLHeadingElement.cpp:
+ * html/HTMLHeadingElement.h:
+ * html/HTMLHtmlElement.h:
+ * html/HTMLImageLoader.h:
+ * html/HTMLMetaElement.h:
+ * html/HTMLModElement.cpp:
+ * html/HTMLModElement.h:
+ * html/HTMLOptionsCollection.cpp:
+ * html/HTMLPlugInElement.cpp:
+ * html/HTMLPreElement.cpp:
+ * html/HTMLPreElement.h:
+ * html/HTMLTableCellElement.cpp:
+ * html/HTMLTableCellElement.h:
+ * html/HTMLTableColElement.cpp:
+ * html/HTMLTableColElement.h:
+ * html/HTMLTablePartElement.cpp:
+ * html/HTMLTablePartElement.h:
+ * html/HTMLTitleElement.h:
+ * page/MouseEventWithHitTestResults.h:
+ * platform/StaticConstructors.h:
+ * platform/text/AtomicStringImpl.h:
+ * platform/text/qt/TextBreakIteratorQt.cpp:
+ * rendering/AutoTableLayout.h:
+ * rendering/CounterNode.cpp:
+ * rendering/EllipsisBox.cpp:
+ * rendering/EllipsisBox.h:
+ * rendering/FixedTableLayout.cpp:
+ * rendering/FixedTableLayout.h:
+ * rendering/HitTestRequest.h:
+ * rendering/HitTestResult.h:
+ * rendering/InlineRunBox.h:
+ * rendering/PointerEventsHitRules.cpp:
+ * rendering/PointerEventsHitRules.h:
+ * rendering/RenderBR.cpp:
+ * rendering/RenderBR.h:
+ * rendering/RenderButton.cpp:
+ * rendering/RenderButton.h:
+ * rendering/RenderFieldset.cpp:
+ * rendering/RenderFrameSet.cpp:
+ * rendering/RenderListItem.cpp:
+ * rendering/RenderTableRow.cpp:
+ * rendering/RenderView.h:
+ * rendering/RootInlineBox.h:
+ * rendering/SVGInlineTextBox.cpp:
+ * rendering/SVGInlineTextBox.h:
+ * rendering/TableLayout.h:
+ * rendering/break_lines.h:
+ * rendering/style/SVGRenderStyle.cpp:
+ * rendering/style/SVGRenderStyle.h:
+ * rendering/style/SVGRenderStyleDefs.cpp:
+ * rendering/style/SVGRenderStyleDefs.h:
+ * svg/GradientAttributes.h:
+ * svg/LinearGradientAttributes.h:
+ * svg/PatternAttributes.h:
+ * svg/RadialGradientAttributes.h:
+ * svg/SVGAElement.cpp:
+ * svg/SVGAngle.idl:
+ * svg/SVGAnimateColorElement.cpp:
+ * svg/SVGAnimateColorElement.h:
+ * svg/SVGAnimateElement.cpp:
+ * svg/SVGAnimateElement.h:
+ * svg/SVGAnimateTransformElement.h:
+ * svg/SVGAnimatedPathData.cpp:
+ * svg/SVGAnimatedPathData.h:
+ * svg/SVGAnimatedPoints.cpp:
+ * svg/SVGAnimatedPoints.h:
+ * svg/SVGAnimationElement.cpp:
+ * svg/SVGCircleElement.cpp:
+ * svg/SVGClipPathElement.cpp:
+ * svg/SVGColor.cpp:
+ * svg/SVGColor.idl:
+ * svg/SVGComponentTransferFunctionElement.cpp:
+ * svg/SVGComponentTransferFunctionElement.h:
+ * svg/SVGCursorElement.cpp:
+ * svg/SVGDefsElement.cpp:
+ * svg/SVGDescElement.cpp:
+ * svg/SVGDescElement.h:
+ * svg/SVGDocument.idl:
+ * svg/SVGElement.idl:
+ * svg/SVGElementInstanceList.cpp:
+ * svg/SVGElementInstanceList.h:
+ * svg/SVGEllipseElement.cpp:
+ * svg/SVGExternalResourcesRequired.cpp:
+ * svg/SVGFEBlendElement.cpp:
+ * svg/SVGFEBlendElement.h:
+ * svg/SVGFEColorMatrixElement.cpp:
+ * svg/SVGFEColorMatrixElement.h:
+ * svg/SVGFEComponentTransferElement.cpp:
+ * svg/SVGFEComponentTransferElement.h:
+ * svg/SVGFECompositeElement.cpp:
+ * svg/SVGFECompositeElement.h:
+ * svg/SVGFEFloodElement.cpp:
+ * svg/SVGFEFloodElement.h:
+ * svg/SVGFEFuncAElement.cpp:
+ * svg/SVGFEFuncAElement.h:
+ * svg/SVGFEFuncBElement.cpp:
+ * svg/SVGFEFuncBElement.h:
+ * svg/SVGFEFuncGElement.cpp:
+ * svg/SVGFEFuncGElement.h:
+ * svg/SVGFEFuncRElement.cpp:
+ * svg/SVGFEFuncRElement.h:
+ * svg/SVGFEGaussianBlurElement.cpp:
+ * svg/SVGFEGaussianBlurElement.h:
+ * svg/SVGFEImageElement.cpp:
+ * svg/SVGFEMergeElement.cpp:
+ * svg/SVGFEMergeElement.h:
+ * svg/SVGFEMergeNodeElement.cpp:
+ * svg/SVGFEOffsetElement.cpp:
+ * svg/SVGFEOffsetElement.h:
+ * svg/SVGFETileElement.cpp:
+ * svg/SVGFETileElement.h:
+ * svg/SVGFETurbulenceElement.cpp:
+ * svg/SVGFETurbulenceElement.h:
+ * svg/SVGFilterElement.cpp:
+ * svg/SVGGElement.cpp:
+ * svg/SVGGradientElement.cpp:
+ * svg/SVGHKernElement.idl:
+ * svg/SVGLangSpace.cpp:
+ * svg/SVGLangSpace.h:
+ * svg/SVGLength.cpp:
+ * svg/SVGLength.h:
+ * svg/SVGLength.idl:
+ * svg/SVGLengthList.cpp:
+ * svg/SVGLengthList.h:
+ * svg/SVGLineElement.cpp:
+ * svg/SVGLinearGradientElement.h:
+ * svg/SVGList.h:
+ * svg/SVGListTraits.h:
+ * svg/SVGLocatable.h:
+ * svg/SVGMaskElement.cpp:
+ * svg/SVGMatrix.idl:
+ * svg/SVGMetadataElement.cpp:
+ * svg/SVGMetadataElement.h:
+ * svg/SVGMetadataElement.idl:
+ * svg/SVGNumber.idl:
+ * svg/SVGNumberList.cpp:
+ * svg/SVGNumberList.h:
+ * svg/SVGPaint.cpp:
+ * svg/SVGPathElement.cpp:
+ * svg/SVGPathSeg.h:
+ * svg/SVGPathSegArc.cpp:
+ * svg/SVGPathSegArc.h:
+ * svg/SVGPathSegClosePath.cpp:
+ * svg/SVGPathSegClosePath.h:
+ * svg/SVGPathSegCurvetoCubic.cpp:
+ * svg/SVGPathSegCurvetoCubic.h:
+ * svg/SVGPathSegCurvetoCubicSmooth.cpp:
+ * svg/SVGPathSegCurvetoCubicSmooth.h:
+ * svg/SVGPathSegCurvetoQuadratic.cpp:
+ * svg/SVGPathSegCurvetoQuadratic.h:
+ * svg/SVGPathSegCurvetoQuadraticSmooth.cpp:
+ * svg/SVGPathSegCurvetoQuadraticSmooth.h:
+ * svg/SVGPathSegLineto.cpp:
+ * svg/SVGPathSegLineto.h:
+ * svg/SVGPathSegLinetoHorizontal.cpp:
+ * svg/SVGPathSegLinetoHorizontal.h:
+ * svg/SVGPathSegLinetoVertical.cpp:
+ * svg/SVGPathSegLinetoVertical.h:
+ * svg/SVGPathSegMoveto.cpp:
+ * svg/SVGPathSegMoveto.h:
+ * svg/SVGPatternElement.cpp:
+ * svg/SVGPoint.idl:
+ * svg/SVGPointList.cpp:
+ * svg/SVGPointList.h:
+ * svg/SVGPolyElement.cpp:
+ * svg/SVGPolygonElement.cpp:
+ * svg/SVGPolygonElement.h:
+ * svg/SVGPolylineElement.cpp:
+ * svg/SVGPolylineElement.h:
+ * svg/SVGPreserveAspectRatio.cpp:
+ * svg/SVGPreserveAspectRatio.h:
+ * svg/SVGRadialGradientElement.h:
+ * svg/SVGRect.idl:
+ * svg/SVGRectElement.cpp:
+ * svg/SVGRenderingIntent.h:
+ * svg/SVGSVGElement.idl:
+ * svg/SVGScriptElement.cpp:
+ * svg/SVGSetElement.cpp:
+ * svg/SVGSetElement.h:
+ * svg/SVGStopElement.cpp:
+ * svg/SVGStringList.cpp:
+ * svg/SVGStringList.h:
+ * svg/SVGStylable.cpp:
+ * svg/SVGStylable.h:
+ * svg/SVGStyleElement.cpp:
+ * svg/SVGStyleElement.h:
+ * svg/SVGStyledElement.h:
+ * svg/SVGStyledLocatableElement.cpp:
+ * svg/SVGStyledLocatableElement.h:
+ * svg/SVGStyledTransformableElement.cpp:
+ * svg/SVGStyledTransformableElement.h:
+ * svg/SVGSwitchElement.cpp:
+ * svg/SVGSymbolElement.cpp:
+ * svg/SVGTRefElement.cpp:
+ * svg/SVGTSpanElement.cpp:
+ * svg/SVGTSpanElement.h:
+ * svg/SVGTests.h:
+ * svg/SVGTextElement.cpp:
+ * svg/SVGTextElement.h:
+ * svg/SVGTextPathElement.cpp:
+ * svg/SVGTextPositioningElement.cpp:
+ * svg/SVGTextPositioningElement.h:
+ * svg/SVGTitleElement.cpp:
+ * svg/SVGTitleElement.h:
+ * svg/SVGTransform.cpp:
+ * svg/SVGTransform.h:
+ * svg/SVGTransform.idl:
+ * svg/SVGTransformList.cpp:
+ * svg/SVGTransformList.h:
+ * svg/SVGTransformable.h:
+ * svg/SVGURIReference.h:
+ * svg/SVGUnitTypes.h:
+ * svg/SVGUseElement.cpp:
+ * svg/SVGViewElement.cpp:
+ * svg/SVGZoomAndPan.cpp:
+ * svg/SVGZoomAndPan.h:
+ * svg/SVGZoomEvent.cpp:
+
+2009-11-05 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ REGRESSION Clean up security origin usage in DOM Storage.
+ https://bugs.webkit.org/show_bug.cgi?id=31188
+
+ Clean up security origin usage in DOM Storage. This fixes a bug in my
+ refactoring here: https://bugs.webkit.org/show_bug.cgi?id=31149
+
+ Instead of having StorageAreaSync's constructor (which is called in the
+ constructor for StorageAreaImpl) calling a method on StoargeAreaImpl to get the
+ database identifier, simply have StorageAreaImpl pass the identifier into
+ StorageAreaSync.
+
+ No test because there's no change in externally observable behavior.
+
+ * storage/StorageAreaImpl.cpp:
+ (WebCore::StorageAreaImpl::StorageAreaImpl):
+ * storage/StorageAreaImpl.h:
+ * storage/StorageAreaSync.cpp:
+ (WebCore::StorageAreaSync::create):
+ (WebCore::StorageAreaSync::StorageAreaSync):
+ * storage/StorageAreaSync.h:
+
+2009-11-05 Scott Violet <sky@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Need notification of scrolling frame
+ https://bugs.webkit.org/show_bug.cgi?id=31145
+
+ Adds FrameLoaderClient::didChangeScrollOffset that is called when
+ the frame scrolls. This will be used to know when history state
+ needs to be updated.
+
+ * loader/FrameLoaderClient.h:
+ (WebCore::FrameLoaderClient::didChangeScrollOffset):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::valueChanged):
+
+2009-11-05 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Update bindings to use new API for external arrays
+ https://bugs.webkit.org/show_bug.cgi?id=31181
+
+ No new tests; covered by existing WebGL tests.
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::setIndexedPropertiesToExternalArray):
+ (WebCore::V8DOMWrapper::getTemplate):
+ (WebCore::V8DOMWrapper::convertToV8Object):
+ * bindings/v8/V8DOMWrapper.h:
+ * bindings/v8/custom/V8CanvasArrayCustom.h:
+ (WebCore::constructCanvasArray):
+
+2009-11-05 Alpha Lam <hclam@chromium.org>
+
+ Not reviewed, Chromium build fix.
+
+ 50561 introduces a custom method for SVGMatrix, we need to implement
+ this in V8.
+
+ * bindings/v8/custom/V8CustomBinding.h:
+ Adding definition for V8SVGMatrixMultiply.
+ * bindings/v8/custom/V8SVGMatrixCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ Implement V8SVGMatrixMultiply according to the same method in JSC.
+
+2009-11-05 Jeremy Orlow <jorlow@chromium.org>
+
+ Revert 50569 since it broke QT. Build fix and just a revert, so no review.
+
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::sessionStorage):
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setSessionStorageEnabled):
+ * page/Settings.h:
+ (WebCore::Settings::sessionStorageEnabled):
+
+2009-11-05 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ REGRESSION: Web Inspector doesn't show CSS rules properly for iframes
+
+ https://bugs.webkit.org/show_bug.cgi?id=30884
+
+ Test: inspector/styles-iframe.html
+
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMNode):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.getStyles):
+ (InjectedScript.getComputedStyle):
+ (InjectedScript.addStyleSelector):
+ * inspector/front-end/TestController.js:
+ (WebInspector.TestController.prototype.notifyDone):
+ (WebInspector.TestController.prototype.runAfterPendingDispatches):
+ (WebInspector.evaluateForTestInFrontend.invokeMethod):
+ (WebInspector.evaluateForTestInFrontend):
+
+2009-11-05 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Geoffrey Garen and Dimitri Glazkov.
+
+ Rehashing of EventListenerMap leads to loss of EvenListenerList.
+ https://bugs.webkit.org/show_bug.cgi?id=31027
+
+ Tested by new fast/events/event-listener-map-rehash-crash.html.
+
+ EventListenerMap modified to store pointers to listener vectors:
+ * dom/EventTarget.cpp:
+ (WebCore::EventTargetData::~EventTargetData):
+ (WebCore::EventTarget::addEventListener):
+ (WebCore::EventTarget::removeEventListener):
+ (WebCore::EventTarget::fireEventListeners):
+ (WebCore::EventTarget::getEventListeners):
+ (WebCore::EventTarget::removeAllEventListeners):
+ * dom/EventTarget.h:
+
+ Usages updated after interface changes:
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::getEventListenersForNode):
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::transferEventListenersToShadowTree):
+
+2009-11-05 Dan Kegel <dank@chromium.org>
+
+ Reviewed by Dmitri Titov.
+
+ Add missing initialization for m_createdByParser.
+ https://bugs.webkit.org/show_bug.cgi?id=31089
+
+ Test: fast/dom/beforeload/pi-before-load.xhtml in Valgrind
+
+ * dom/ProcessingInstruction.cpp:
+ (WebCore::ProcessingInstruction::ProcessingInstruction):
+
+2009-11-04 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ DOM Storage runtime flag changes
+ https://bugs.webkit.org/show_bug.cgi?id=30602
+
+ Part 2/2.
+
+ Revert my changes to Settings and instead implement DOM Storage enabling via
+ the methods agreed upon in https://bugs.webkit.org/show_bug.cgi?id=30240
+
+ This stuff was (intentionally) never exposed to web pages or DRT, so there's no
+ LayoutTest visible changes and thus no tests.
+
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::ACCESSOR_RUNTIME_ENABLER):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::sessionStorage):
+ * page/DOMWindow.idl:
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ * page/Settings.h:
+ * storage/Storage.cpp:
+ (WebCore::Storage::setLocalStorageAvailable):
+ (WebCore::Storage::localStorageAvailable):
+ (WebCore::Storage::setSessionStorageAvailable):
+ (WebCore::Storage::sessionStorageAvailable):
+ * storage/Storage.h:
+
+2009-11-05 Jian Li <jianli@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Bug 31108 - [V8] REGRESSION: Pause on exception is broken
+ https://bugs.webkit.org/show_bug.cgi?id=31108
+
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::invokeEventHandler):
+ * bindings/v8/V8Utilities.cpp:
+ (WebCore::reportException):
+
+2009-11-05 Jian Li <jianli@chromium.org>
+
+ Reviewed by Dmitri Titov.
+
+ We should not bubble up events if we drag something to an iframe that
+ has an invalid source.
+ https://bugs.webkit.org/show_bug.cgi?id=30469
+
+ Test: http/tests/misc/bubble-drag-events.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleDragAndDropForTarget):
+ (WebCore::EventHandler::updateDragAndDrop):
+ (WebCore::EventHandler::cancelDragAndDrop):
+ (WebCore::EventHandler::performDragAndDrop):
+ * page/EventHandler.h:
+ (WebCore::EventHandler::):
+
+2009-11-05 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: speed up Timelines Clear by a factor of thousands.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31160
+
+ * inspector/front-end/utilities.js:
+ (Element.prototype.removeChildren):
+
+2009-11-05 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ If high memory usage is detected, hint to V8 that it might be due
+ to external objects retained by V8 objects.
+ https://bugs.webkit.org/show_bug.cgi?id=31051
+
+ * bindings/v8/V8GCController.cpp:
+ (WebCore::GetMemoryUsageInMB):
+ (WebCore::V8GCController::gcEpilogue):
+ (WebCore::V8GCController::checkMemoryUsage):
+ * bindings/v8/V8GCController.h:
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluate):
+ (WebCore::V8Proxy::runScript):
+ (WebCore::V8Proxy::callFunction):
+
+2009-11-05 Jeff Schiller <codedread@gmail.com>
+
+ Reviewed by Simon Fraser.
+
+ Correct order of matrix multiplication for SVGMatrix.
+ https://bugs.webkit.org/show_bug.cgi?id=16062
+
+ Test: svg/dom/SVGMatrix-interface.xhtml
+
+ * bindings/js/JSSVGMatrixCustom.cpp:
+ (WebCore::JSSVGMatrix::multiply):
+ * svg/SVGMatrix.idl:
+
+2009-11-04 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Make resource-related records in timeline
+ actually take some time.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31139
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel):
+ (WebInspector.TimelinePanel.prototype._formatRecord):
+ (WebInspector.TimelinePanel.prototype._getRecordDetails):
+ (WebInspector.TimelinePanel.prototype.reset):
+
+2009-11-04 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Simplify LocalStorageThread
+ https://bugs.webkit.org/show_bug.cgi?id=30935
+
+ This is a re-submit of 50519. LocalStorageTask should have never been ref
+ counted. I've removed that and switched a PassRefPtr over to a PassOwnPtr.
+
+ On LocalStoragethread: Remove reference counting. Get rid of locking. Make some
+ of the method names a bit more clear. Assert proper thread usage. Join rather
+ than detaching the thread and doing an ad-hoc form of join. Avoid touching
+ variables on the background thread when simple to do so. Also create a generic
+ scheduleTask function rather than one for each task.
+
+ No behavior should have changed.
+
+ * storage/LocalStorageTask.h:
+ * storage/LocalStorageThread.cpp:
+ (WebCore::LocalStorageThread::create):
+ (WebCore::LocalStorageThread::LocalStorageThread):
+ (WebCore::LocalStorageThread::~LocalStorageThread):
+ (WebCore::LocalStorageThread::start):
+ (WebCore::LocalStorageThread::threadEntryPointCallback):
+ (WebCore::LocalStorageThread::threadEntryPoint):
+ (WebCore::LocalStorageThread::scheduleTask):
+ (WebCore::LocalStorageThread::terminate):
+ (WebCore::LocalStorageThread::performTerminate):
+ * storage/LocalStorageThread.h:
+ * storage/StorageSyncManager.cpp:
+ (WebCore::StorageSyncManager::StorageSyncManager):
+ (WebCore::StorageSyncManager::~StorageSyncManager):
+ (WebCore::StorageSyncManager::scheduleImport):
+ (WebCore::StorageSyncManager::scheduleSync):
+ * storage/StorageSyncManager.h:
+
+2009-11-04 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Calling databaseIdentifier on LocalStorage's background thread is not safe.
+ https://bugs.webkit.org/show_bug.cgi?id=31149
+
+ Calling SecurityOrigin::databaseIdentifier on LocalStorage's background thread
+ is not safe. databaseIdentifier does a bunch of string concatenation which
+ ref-counts StringImpls in some cases. This was caught by valgrind thread
+ sanitizer: http://code.google.com/p/chromium/issues/detail?id=25645
+
+ There's no way to test for such racyness, unfortunately.
+
+ * storage/StorageAreaSync.cpp:
+ (WebCore::StorageAreaSync::StorageAreaSync):
+ (WebCore::StorageAreaSync::performImport):
+ * storage/StorageAreaSync.h:
+ * storage/StorageSyncManager.cpp:
+ (WebCore::StorageSyncManager::fullDatabaseFilename):
+ * storage/StorageSyncManager.h:
+
+2009-11-03 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Clean up StorageAreaSync
+ https://bugs.webkit.org/show_bug.cgi?id=31100
+
+ Major fixes: Break the ref count cycle for StorageArea on the main
+ thread, not the background thread since the latter is not safe.
+ Length() needs to block on the import completing.
+
+ Small fixes: setItem needs to handle the copy on write case even if it
+ has an exception. setItem and removeItem should just bail from the
+ the function if the value hasn't changed rather than wrapping the end
+ in an if block. Clear should only send an event if it wasn't already
+ cleared. StorageAreaSync should assert that the final sync was
+ scheduled.
+
+ * storage/StorageAreaImpl.cpp:
+ (WebCore::StorageAreaImpl::length):
+ Forgot to block on the import.
+ (WebCore::StorageAreaImpl::key):
+ (WebCore::StorageAreaImpl::setItem):
+ Handle the copy on write case even when there's an exception.
+ (WebCore::StorageAreaImpl::removeItem):
+ (WebCore::StorageAreaImpl::clear):
+ * storage/StorageAreaSync.cpp:
+ (WebCore::StorageAreaSync::~StorageAreaSync):
+ (WebCore::StorageAreaSync::scheduleFinalSync):
+ (WebCore::StorageAreaSync::performImport):
+ (WebCore::StorageAreaSync::markImported):
+ (WebCore::StorageAreaSync::blockUntilImportComplete):
+ * storage/StorageAreaSync.h:
+
+2009-11-05 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Allow custom memory allocation control for WebCore's CachedResource
+ https://bugs.webkit.org/show_bug.cgi?id=31114
+
+ Inherits CachedResource class from Noncopyable because its (its child
+ class) CachedCSSStyleSheet instantiated by 'new' in WebCore/loader/Cache.cpp:75
+ and it is no need to be copyable.
+
+ * loader/CachedResource.h:
+
+2009-11-04 Mark Mentovai <mark@chromium.org>
+
+ Reviewed by Mark Rowe.
+
+ Separate the difference between HAVE(CGINTERPOLATION_MEDIUM), which
+ is true when building on 10.6 or later, and USE(CGINTERPOLATION_MEDIUM)
+ which is true when targeting 10.6 or later.
+
+ HAVE(CGINTERPOLATION_MEDIUM) indicates that kCGInterpolationMedium
+ is present in the CGInterpolationQuality enum, and must be handled
+ by a switch that has cases for each enumerated value.
+
+ USE(CGINTERPOLATION_MEDIUM) indicates that the product will only run
+ on 10.6 or later, and that CoreGraphics will understand when
+ InterpolationMedium is mapped to kCGInterpolationMedium at runtime.
+
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::GraphicsContext::setImageInterpolationQuality):
+ (WebCore::GraphicsContext::imageInterpolationQuality):
+
+2009-11-04 Dan Kegel <dank@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Fix buffer overrun in WebCore::Page::userStyleSheetLocationChanged()
+ https://bugs.webkit.org/show_bug.cgi?id=31138
+
+ Test: LayoutTests/platform/mac/fast/loader/user-stylesheet-fast-path.html in Valgrind
+
+ * page/Page.cpp:
+ (WebCore::Page::userStyleSheetLocationChanged):
+
+2009-11-04 Timothy Hatcher <timothy@apple.com>
+
+ Update the Web Inspector Timeline panel to better match the mock-up.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31150
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype._getRecordDetails):
+ (WebInspector.TimelinePanel.prototype._dragWindow):
+ (WebInspector.TimelinePanel.prototype._resizeWindowLeft):
+ (WebInspector.TimelinePanel.prototype._resizeWindowRight):
+ (WebInspector.TimelineCategoryTreeElement.prototype.onattach):
+ (WebInspector.TimelineRecordTreeElement.prototype.onattach):
+ (WebInspector.TimelineRecordTreeElement.prototype.refresh):
+ (WebInspector.TimelineCategoryGraph):
+ * inspector/front-end/inspector.css:
+
+2009-11-05 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25439
+ Deleting when in front of a block image removes character from previous paragraph
+
+ Added editing/deleting/25439-{1,2,3}.html
+
+ * editing/DeleteSelectionCommand.cpp:
+ (WebCore::DeleteSelectionCommand::mergeParagraphs): Block images, tables and HRs cannot
+ be made inline with other content. Instead of merging, just move the caret to just before
+ the selection we deleted.
+ * editing/htmlediting.cpp:
+ (WebCore::firstInSpecialElement): Added a FIXME. This function begins iterating up from pos.node(), which
+ doesn't necessarily contain pos (suppose pos was [img, 0]).
+ (WebCore::lastInSpecialElement): Ditto.
+ (WebCore::isRenderedAsNonInlineTableImageOrHR): Moved from visible_units.cpp. Added a check for non-inline images.
+ * editing/htmlediting.h:
+ * editing/visible_units.cpp:
+ (WebCore::startOfParagraph): Use moved/renamed function. Removed FIXME. The problem causing
+ 5027702 is now squarely in first/lastInSpecialElement
+ (WebCore::endOfParagraph): Ditto.
+
+2009-11-04 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Hang in Mail on attempting to change indent level.
+ <rdar://problem/7131805>
+ https://bugs.webkit.org/show_bug.cgi?id=31127
+
+ The hang was caused by an infinite loop inside outdentRegion.
+ The code did not account for the fact that, when a list item
+ contains multiple paragraphs, outdent moves all paragraphs at
+ once, invalidating some of the positions we keep track of in the loop.
+ Some code refactoring has also been done to minimize duplicated code.
+
+ Test: editing/execCommand/outdent-multiparagraph-list.html
+
+ * editing/IndentOutdentCommand.cpp:
+ (WebCore::IndentOutdentCommand::indentRegion): Moved code in common with
+ outdentRegion to doApply.
+ (WebCore::IndentOutdentCommand::outdentRegion): Fixed endless loop.
+ (WebCore::IndentOutdentCommand::doApply): Some code refactoring.
+ * editing/IndentOutdentCommand.h: Added VisiblePosition parameters to
+ indentRegion and outdentRegion.
+
+2009-11-04 Alpha Lam <hclam@chromium.org>
+
+ Reviewed by Eric Carlson.
+
+ Volume slider doesn't have a thumb
+ https://bugs.webkit.org/show_bug.cgi?id=31135
+
+ Fixed an incorrect if statement that prevents volume slider
+ being updated.
+
+ The statement checks if the slider value equals to the current
+ volume value of the media control to avoid updating the volume
+ slider. Updating the volume slider control shouldn't be within
+ this condition because we explicitly set them to be equals
+ during creation of the controls and also when mouse events are
+ received on the volume control.
+
+ No new tests because existing code breaks:
+ LayoutTests/media/video-volume-slider.html
+
+ It should now start passing on Chromium.
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlVolumeSliderElement::update):
+ Update the volume slider regardless of the current volume value
+ of the media control.
+
+2009-11-04 Jenn Braithwaite <jennb@chromium.org>
+
+ Reviewed by David Levin.
+
+ Need to properly disable applicationCache at runtime
+ https://bugs.webkit.org/show_bug.cgi?id=30417
+
+ Adding applicationCacheEnabled bit to V8 RuntimeEnabledFeatures.
+
+ No new exposed functionality, so no new tests.
+
+ * bindings/v8/RuntimeEnabledFeatures.cpp:
+ * bindings/v8/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::setApplicationCacheEnabled):
+ (WebCore::RuntimeEnabledFeatures::applicationCacheEnabled):
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::ACCESSOR_RUNTIME_ENABLER):
+ * page/DOMWindow.idl:
+
+2009-11-04 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31143
+ Assertion failure in CredentialStorage::set() when proxy credentials are being set
+
+ No test, cannot test proxy behavior.
+
+ * platform/network/CredentialStorage.cpp: (WebCore::CredentialStorage::set): Account for the
+ possibility of null url. Release mode changes are likely inconsequential - e.g. we used to
+ add "://" to origin set, which is weird, but safe.
+
+2009-11-04 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Leftover Breakpoints in the Sidebar Pane
+ https://bugs.webkit.org/show_bug.cgi?id=30659
+
+ No new tests.
+
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.addScript):
+
+2009-11-04 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Use a different method to identify the webkit port in
+ InspectorBackent::platform().
+ This corrects the inspector expected behavior with Qt on Windows.
+ https://bugs.webkit.org/show_bug.cgi?id=31116
+
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::platform):
+ (WebCore::InspectorBackend::port):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/front-end/InspectorControllerStub.js:
+ (.WebInspector.InspectorControllerStub.prototype.port):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+ (WebInspector.toolbarDragStart):
+
+2009-11-04 Benjamin Otte <otte@gnome.org>
+
+ Reviewed by Gustavo Noronha.
+
+ Update Cairo requirement to 1.6.
+
+ Also remove all conditional code and workarounds for older versions of
+ Cairo.
+ In particular, gain image quality by removing the use of
+ CAIRO_FILTER_NEAREST when rendering images and use the default
+ bilinear filter instead.
+ https://bugs.webkit.org/show_bug.cgi?id=19266
+
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::clipOut):
+ * platform/graphics/cairo/ImageCairo.cpp:
+ (WebCore::BitmapImage::draw):
+ (WebCore::BitmapImage::drawPattern):
+ * platform/graphics/cairo/PathCairo.cpp:
+ (WebCore::Path::isEmpty):
+ (WebCore::Path::boundingRect):
+ * platform/gtk/RenderThemeGtk.cpp:
+ (WebCore::paintMozWidget):
+
+2009-11-04 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix. Restore removed string conversion after cleanup.
+
+ * platform/graphics/wx/FontPlatformDataWx.cpp:
+ (WebCore::FontPlatformData::computeHash):
+
+2009-11-04 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Need to implement ARIA role="combobox"
+ https://bugs.webkit.org/show_bug.cgi?id=31096
+
+ Test: accessibility/aria-combobox.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::isComboBox):
+ (WebCore::AccessibilityObject::isExpanded):
+ (WebCore::AccessibilityObject::expandObject):
+ (WebCore::AccessibilityObject::increment):
+ (WebCore::AccessibilityObject::decrement):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::expandObject):
+ (WebCore::AccessibilityRenderObject::isExpanded):
+ (WebCore::createARIARoleMap):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+ (-[AccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
+ * html/HTMLAttributeNames.in:
+
+2009-11-04 Kelly Norton <knorton@google.com>
+
+ Reviewed by Pavel Feldman.
+
+ Fixes naming inconsistencies in TimelineRecordFactory.
+ https://bugs.webkit.org/show_bug.cgi?id=31132
+
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::willPaint):
+ (WebCore::InspectorTimelineAgent::willChangeXHRReadyState):
+ (WebCore::InspectorTimelineAgent::willLoadXHR):
+ (WebCore::InspectorTimelineAgent::willEvaluateScript):
+ (WebCore::InspectorTimelineAgent::willSendResourceRequest):
+ (WebCore::InspectorTimelineAgent::didReceiveResourceResponse):
+ (WebCore::InspectorTimelineAgent::didFinishLoadingResource):
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createXHRReadyStateChangeRecord):
+ (WebCore::TimelineRecordFactory::createXHRLoadRecord):
+ (WebCore::TimelineRecordFactory::createEvaluateScriptRecord):
+ (WebCore::TimelineRecordFactory::createMarkTimelineRecord):
+ (WebCore::TimelineRecordFactory::createResourceSendRequestRecord):
+ (WebCore::TimelineRecordFactory::createResourceReceiveResponseRecord):
+ (WebCore::TimelineRecordFactory::createResourceFinishRecord):
+ (WebCore::TimelineRecordFactory::createPaintRecord):
+ * inspector/TimelineRecordFactory.h:
+
+2009-11-04 Eric Z. Ayers <zundel@google.com>
+
+ Reviewed by Pavel Feldman.
+
+ Followon to bug 31080, which protects Timeline
+ instrumentation in the case where InspectorTimelineAgent
+ is enabled or disabled during an event dispatch.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31121
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluate):
+ * dom/Document.cpp:
+ (WebCore::Document::recalcStyle):
+ * dom/Node.cpp:
+ (WebCore::Node::dispatchGenericEvent):
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::write):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::inspectorTimelineAgent):
+ (WebCore::DOMWindow::dispatchEvent):
+ * page/DOMWindow.h:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+ (WebCore::FrameView::paintContents):
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::callReadyStateChangeListener):
+
+2009-11-04 Jeremy Orlow <jorlow@chromium.org>
+
+ Revert 50519 while I work out what went wrong.
+
+ * storage/LocalStorageThread.cpp:
+ (WebCore::LocalStorageThread::create):
+ (WebCore::LocalStorageThread::LocalStorageThread):
+ (WebCore::LocalStorageThread::start):
+ (WebCore::LocalStorageThread::localStorageThreadStart):
+ (WebCore::LocalStorageThread::localStorageThread):
+ (WebCore::LocalStorageThread::scheduleImport):
+ (WebCore::LocalStorageThread::scheduleSync):
+ (WebCore::LocalStorageThread::terminate):
+ (WebCore::LocalStorageThread::performTerminate):
+ * storage/LocalStorageThread.h:
+ * storage/StorageSyncManager.cpp:
+ (WebCore::StorageSyncManager::StorageSyncManager):
+ (WebCore::StorageSyncManager::~StorageSyncManager):
+ (WebCore::StorageSyncManager::scheduleImport):
+ (WebCore::StorageSyncManager::scheduleSync):
+ * storage/StorageSyncManager.h:
+
+2009-11-04 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Add basic support for resource events and marks.
+ Couple of drive-by fixes. Enabling the panel!
+
+ https://bugs.webkit.org/show_bug.cgi?id=31130
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel):
+ (WebInspector.TimelinePanel.prototype._formatRecord):
+ (WebInspector.TimelinePanel.prototype._getRecordDetails):
+ (WebInspector.TimelinePanel.prototype.reset):
+ (WebInspector.TimelineCategoryTreeElement.prototype._onCheckboxClicked):
+ (WebInspector.TimelineRecordTreeElement.prototype.onattach):
+ * inspector/front-end/inspector.js:
+ (WebInspector._createPanels):
+
+2009-11-03 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Simplify LocalStorageThread
+ https://bugs.webkit.org/show_bug.cgi?id=30935
+
+ On LocalStoragethread: Remove reference counting. Get rid of locking. Make some
+ of the method names a bit more clear. Assert proper thread usage. Join rather
+ than detaching the thread and doing an ad-hoc form of join. Avoid touching
+ variables on the background thread when simple to do so. Also create a generic
+ scheduleTask function rather than one for each task.
+
+ No behavior should have changed.
+
+ * storage/LocalStorageThread.cpp:
+ (WebCore::LocalStorageThread::create):
+ (WebCore::LocalStorageThread::LocalStorageThread):
+ (WebCore::LocalStorageThread::~LocalStorageThread):
+ (WebCore::LocalStorageThread::start):
+ (WebCore::LocalStorageThread::threadEntryPointCallback):
+ (WebCore::LocalStorageThread::threadEntryPoint):
+ (WebCore::LocalStorageThread::scheduleTask):
+ (WebCore::LocalStorageThread::terminate):
+ (WebCore::LocalStorageThread::performTerminate):
+ * storage/LocalStorageThread.h:
+ * storage/StorageSyncManager.cpp:
+ (WebCore::StorageSyncManager::StorageSyncManager):
+ (WebCore::StorageSyncManager::~StorageSyncManager):
+ (WebCore::StorageSyncManager::scheduleImport):
+ (WebCore::StorageSyncManager::scheduleSync):
+ * storage/StorageSyncManager.h:
+
+2009-11-04 Vadim Zeitlin <vadim@wxwidgets.org>
+
+ Reviewed by Eric Seidel.
+
+ [wx] Small cleanup: avoid unnecessary wxString::mb_str() calls.
+
+ * platform/graphics/wx/FontPlatformDataWx.cpp:
+ (WebCore::FontPlatformData::computeHash):
+
+2009-11-04 Kelly Norton <knorton@google.com>
+
+ Reviewed by Pavel Feldman.
+
+ Adds lightweight network resources to InspectorTimelineAgent.
+ https://bugs.webkit.org/show_bug.cgi?id=31065
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::willSendRequest):
+ (WebCore::InspectorController::didReceiveResponse):
+ (WebCore::InspectorController::didFinishLoading):
+ (WebCore::InspectorController::didFailLoading):
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::willSendResourceRequest):
+ (WebCore::InspectorTimelineAgent::didReceiveResourceResponse):
+ (WebCore::InspectorTimelineAgent::didFinishLoadingResource):
+ * inspector/InspectorTimelineAgent.h:
+ (WebCore::):
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createResourceSendRequestTimelineRecord):
+ (WebCore::TimelineRecordFactory::createResourceReceiveResponseTimelineRecord):
+ (WebCore::TimelineRecordFactory::createResourceFinishTimelineRecord):
+ * inspector/TimelineRecordFactory.h:
+ * inspector/front-end/TimelineAgent.js:
+
+2009-11-04 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] ASSERT failure when receiving 401 HTTP Authentication response.
+ https://bugs.webkit.org/show_bug.cgi?id=31077
+
+ Allow sending the response body under the same conditions that we
+ allow it to finish without reporting an error.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+
+2009-11-04 Adam Roben <aroben@apple.com>
+
+ Sort WebCore.base.exp
+
+ Rubber-stamped by Dan Bernstein.
+
+ * WebCore.base.exp: Sorted.
+
+2009-11-04 Csaba Osztrogonác <ossy@webkit.org>
+
+ Unreviewed rollout.
+
+ Revert r50496 because it broke all layout tests on QtBuildBot.
+
+ * WebCore.pro:
+ * platform/graphics/qt/FontCacheQt.cpp:
+ (WebCore::fontCache):
+ (WebCore::FontCache::FontCache):
+ (WebCore::FontCache::getTraitsInFamily):
+ (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
+ (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
+ (WebCore::FontPlatformDataCacheKey::):
+ (WebCore::FontPlatformDataCacheKey::operator==):
+ (WebCore::FontPlatformDataCacheKey::hash):
+ (WebCore::FontPlatformDataCacheKey::computeHash):
+ (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize):
+ (WebCore::FontPlatformDataCacheKeyHash::hash):
+ (WebCore::FontPlatformDataCacheKeyHash::equal):
+ (WebCore::FontPlatformDataCacheKeyTraits::emptyValue):
+ (WebCore::FontPlatformDataCacheKeyTraits::constructDeletedValue):
+ (WebCore::FontPlatformDataCacheKeyTraits::isDeletedValue):
+ (WebCore::FontCache::getCachedFontPlatformData):
+ (WebCore::FontCache::getCachedFontData):
+ (WebCore::FontCache::getLastResortFallbackFont):
+ (WebCore::FontCache::releaseFontData):
+ (WebCore::FontCache::purgeInactiveFontData):
+ (WebCore::FontCache::addClient):
+ (WebCore::FontCache::removeClient):
+ (WebCore::FontCache::invalidate):
+ * platform/graphics/qt/FontFallbackListQt.cpp: Added.
+ (WebCore::FontFallbackList::FontFallbackList):
+ (WebCore::FontFallbackList::invalidate):
+ (WebCore::FontFallbackList::releaseFontData):
+ (WebCore::FontFallbackList::determinePitch):
+ (WebCore::FontFallbackList::fontDataAt):
+ (WebCore::FontFallbackList::fontDataForCharacters):
+ (WebCore::FontFallbackList::setPlatformFont):
+ * platform/graphics/qt/FontPlatformData.h:
+ (WebCore::FontPlatformData::pixelSize):
+ * platform/graphics/qt/FontPlatformDataQt.cpp:
+ (WebCore::FontPlatformData::FontPlatformData):
+
+2009-11-04 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31044
+ [Gtk] assertion when webkit_accessible_get_index_in_parent attempts to get parent of the web view
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (atkParentOfWebView):
+ (webkit_accessible_get_index_in_parent):
+ (webkit_accessible_get_parent):
+
+2009-11-04 Dominik Röttsches <dominik.roettsches@access-company.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=15914
+ [GTK] Implement Unicode functionality using GLib
+
+ Initial version of this patch by Jürg Billeter and Naiem Shaik.
+ Patch 2/4 - Moving TextCodecs to GLib
+
+ Added probing for a hard-coded lists of text encodings.
+ The basis of this list is taken from the encodings supported by iconv,
+ then extended by e.g. tis-620, windows-1251, euc-kr, windows-1253 and
+ a number of Chinese ones.
+
+ Probing is necessary with the current design of text codecs
+ as iconv/GLib do not support enumerating available encodings.
+
+ * GNUmakefile.am:
+ * platform/ThreadGlobalData.cpp:
+ (WebCore::ThreadGlobalData::ThreadGlobalData):
+ (WebCore::ThreadGlobalData::~ThreadGlobalData):
+ * platform/text/TextEncoding.cpp:
+ (WebCore::TextEncoding::encode):
+ * platform/text/TextEncodingRegistry.cpp:
+ (WebCore::buildBaseTextCodecMaps):
+ (WebCore::extendTextCodecMaps):
+ * platform/text/gtk/TextCodecGtk.cpp: Added.
+ (WebCore::):
+ (WebCore::newTextCodecGtk):
+ (WebCore::TextCodecGtk::isEncodingAvailable):
+ (WebCore::TextCodecGtk::registerEncodingNames):
+ (WebCore::TextCodecGtk::registerCodecs):
+ (WebCore::TextCodecGtk::registerBaseEncodingNames):
+ (WebCore::TextCodecGtk::registerBaseCodecs):
+ (WebCore::TextCodecGtk::registerExtendedEncodingNames):
+ (WebCore::TextCodecGtk::registerExtendedCodecs):
+ (WebCore::TextCodecGtk::TextCodecGtk):
+ (WebCore::TextCodecGtk::~TextCodecGtk):
+ (WebCore::TextCodecGtk::releaseIConv):
+ (WebCore::TextCodecGtk::createIConvDecoder):
+ (WebCore::TextCodecGtk::createIConvEncoder):
+ (WebCore::TextCodecGtk::decode):
+ (WebCore::TextCodecGtk::encode):
+ * platform/text/gtk/TextCodecGtk.h: Added.
+
+2009-11-04 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Jan Alonzo.
+
+ [GTK] Enable DOM clipboard and drag-and-drop access
+ https://bugs.webkit.org/show_bug.cgi?id=30623
+
+ Unify redudant methods which will always return the same value.
+
+ * platform/gtk/PasteboardGtk.cpp:
+ (WebCore::Pasteboard::writeSelection):
+ * platform/gtk/PasteboardHelper.h:
+
+2009-11-04 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31035
+ [GTK] some accessibility tests hitting assertion in debug builds
+
+ Removes the assertions in webkit_accessible_ref_child; adds sanity checks.
+ Any app or AT can attempt to ref a child at a bogus index.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (webkit_accessible_ref_child):
+
+2009-11-04 Benjamin Otte <otte@gnome.org>
+
+ Reviewed by Jan Alonzo.
+
+ [gtk] Use gst_element_class_set_details_simple()
+
+ Cosmetic change, just code simplification
+
+ * platform/graphics/gtk/VideoSinkGStreamer.cpp:
+ (webkit_video_sink_base_init):
+2009-11-04 Kelly Norton <knorton@google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Adds paint rectangle information to TimelineAgent's didPaint callback.
+ https://bugs.webkit.org/show_bug.cgi?id=31087
+
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::willPaint):
+ * inspector/InspectorTimelineAgent.h:
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createPaintTimelineRecord):
+ * inspector/TimelineRecordFactory.h:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::paintContents):
+
+2009-11-04 Jaime Yap <jaimeyap@google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ This patch adds API to the console object for annotating the
+ inspector timeline. This allows developers to mark logical
+ checkpoints in their apps and have them overlaid in the event
+ record tree.
+
+ tests updated: LayoutTests/fast/dom/Window/window-properties.html
+ https://bugs.webkit.org/show_bug.cgi?id=31082
+
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::markTimeline):
+ * inspector/InspectorController.h:
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::didMarkTimeline):
+ * inspector/InspectorTimelineAgent.h:
+ (WebCore::):
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createMarkTimelineRecord):
+ * inspector/TimelineRecordFactory.h:
+ * inspector/front-end/TimelineAgent.js:
+ * page/Console.cpp:
+ (WebCore::Console::markTimeline):
+ * page/Console.h:
+ * page/Console.idl:
+
+2009-11-03 Simon Hausmann <hausmann@webkit.org>
+
+ Unreviewed build fix for WebInspector with Qt build.
+
+ Simply re-generate the Qt resource file by running
+ WebKitTools/Scripts/generate-qt-inspector-resource
+
+ * inspector/front-end/WebKit.qrc:
+
+2009-11-02 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Handle fonts like the other ports
+
+ Remove FontFallbackListQt and rely on the common FontFallbackList
+ to handle the fonts. FontCache and FontPlatformData have been
+ updated to work with the common FontFallbackList.
+
+ In the previous implementation, FontPlatformDataCacheKey
+ was a clone of FontPlatformData with the hashing
+ capabilities added in order to use it as a key in the cache's
+ hashmap. FontPlatformData has been modified to handle the hashing
+ function directly so the data are not copied twice in memory.
+
+ FontFallbackList::fontDataAt() from FontFallbackListQt was a copy of
+ code from FontCache::getFontData() and FontFallbackList::fontDataAt().
+ The behavior is similar except currFamily->family().length() was
+ not tested and the fallback fonts selector were not used.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29856
+
+ Test: svg/text/text-font-invalid.html
+
+ * WebCore.pro:
+ * platform/graphics/qt/FontCacheQt.cpp:
+ (WebCore::FontCache::platformInit):
+ (WebCore::FontCache::getFontDataForCharacters):
+ (WebCore::FontCache::getSimilarFontPlatformData):
+ (WebCore::FontCache::getLastResortFallbackFont):
+ (WebCore::FontCache::getTraitsInFamily):
+ (WebCore::FontCache::createFontPlatformData):
+ * platform/graphics/qt/FontFallbackListQt.cpp:
+ Removed. We now use the implementation from FontFallbackList.cpp
+ * platform/graphics/qt/FontPlatformData.h:
+ Add hashing capabilities to be able to use the data with the FontCache.
+ This was previously done in FontCacheQt.cpp
+ (WebCore::FontPlatformData::FontPlatformData):
+ Added a boolean to identify deleted value in the hash table.
+ (WebCore::FontPlatformData::isHashTableDeletedValue):
+ (WebCore::FontPlatformData::hash):
+ (WebCore::FontPlatformData::operator==):
+ * platform/graphics/qt/FontPlatformDataQt.cpp:
+ (WebCore::FontPlatformData::FontPlatformData):
+
+2009-11-03 Dan Bernstein <mitz@apple.com>
+
+ Leopard build fix
+
+ * platform/network/mac/AuthenticationMac.mm:
+ (WebCore::mac):
+ (WebCore::core):
+
+2009-11-03 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Fix an assertion failure in core(NSURLProtectionSpace *) by handling NTLM
+ authentication in AuthenticationMac
+
+ * platform/network/mac/AuthenticationMac.mm:
+
+2009-11-03 Eric Z. Ayers <zundel@google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes a problem where the timeline instrumentation crashes if
+ timeline profiling is enabled or disabled in the middle of an
+ event dispatch.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31080
+
+ Test: inspector/timeline-trivial.html
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluateInWorld):
+ (WebCore::ScriptController::processingUserGestureEvent):
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
+ * page/DOMTimer.cpp:
+ (WebCore::DOMTimer::fired):
+
+2009-11-03 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Allow a frame to go back to copy-on-scroll when it ceases being overlapped
+
+ The code was not testing slow-scrolling frames for overlappedness, thinking the answer
+ would not matter. That is not the case if the only reason for the slow-scrolling is
+ being overlapped.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::useSlowRepaintsIfNotOverlapped): Added. Returns whether there is any
+ reason besides being overlapped that the frame would need to fully repaint on scroll.
+ * page/FrameView.h:
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::paint): Use useSlowRepaintsIfNotOverlapped().
+
+2009-11-03 Dmitry Titov <dimich@chromium.org>
+
+ Not reviewed, Qt build fix.
+
+ Need to use right capitalization for include file.
+
+ * page/Navigator.cpp:
+
+2009-11-03 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Migrate from top bar filters to check boxes in Timeline.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31081
+
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype.showCategory):
+ (WebInspector.AbstractTimelinePanel.prototype.hideCategory):
+ (WebInspector.AbstractTimelinePanel.prototype.filter):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel):
+ (WebInspector.TimelineCategoryTreeElement.prototype.onattach):
+ (WebInspector.TimelineCategoryTreeElement.prototype._onCheckboxClick):
+ (WebInspector.TimelineCategoryGraph.prototype.clearChunks):
+ (WebInspector.TimelineCategoryGraph.prototype.set dimmed):
+ * inspector/front-end/inspector.css:
+
+2009-11-03 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: clear overview on Clear action and panel reset.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31078
+
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype._getRecordDetails):
+ (WebInspector.TimelinePanel.prototype.reset):
+
+2009-11-03 Yaar Schnitman <yaar@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Imported action and rules python files that WebCore.gyp depends on.
+ These files used to live in chromium.org and deal mostly with auto-generation
+ of code by wrapping existing webkit perl scripts.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31071
+
+ * WebCore.gyp/WebCore.gyp: Fixed paths in actions and rules.
+ * WebCore.gyp/scripts/action_csspropertynames.py: Added.
+ * WebCore.gyp/scripts/action_cssvaluekeywords.py: Added.
+ * WebCore.gyp/scripts/action_makenames.py: Added.
+ * WebCore.gyp/scripts/action_maketokenizer.py: Added.
+ * WebCore.gyp/scripts/action_useragentstylesheets.py: Added.
+ * WebCore.gyp/scripts/rule_binding.py: Added.
+ * WebCore.gyp/scripts/rule_bison.py: Added.
+ * WebCore.gyp/scripts/rule_gperf.py: Added.
+
+2009-11-03 Bradley Green <brg@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Implement window.navigator.registerProtocolHandler in webkit,
+ https://bugs.webkit.org/b/29651
+
+ Also implemented its sister API window.navigator.registerContentHandler.
+
+ These methods are as described in the HTML5 specification which can be
+ found here,
+ http://dev.w3.org/html5/spec/Overview.html#dom-navigator-registerprotocolhandler
+ http://dev.w3.org/html5/spec/Overview.html#dom-navigator-registercontenthandler
+
+ As specified in the document, the behavior of the browser is determined
+ by the current registered handler. The state of a registered handler
+ can change at any time, with the user clearing a registered handler,
+ registering a different page as handler, or deferring the hander to the
+ OS. If webkit was to track the state of the currently registered
+ handlers, it would need more APIs and complexity to keep in sync with
+ user actions reported to webkit from the UA. For simplicity, the state
+ of protocol handlers should be kept isolated from webkit and webkit only
+ notifies the UA that a page has made the call. The UA is then
+ responsible for correctly handling the registerProtocolHandler call and
+ the redirects which result from registration.
+
+ We do however follow the specification in insuring that the reserved
+ schemes and mimeTypes are not passed to the UA as custom handler
+ registration tests. We also insure that the "%s" token is present as
+ required by the specification.
+
+ Updated test expectations for window.clientInformation and navigator
+ objects.
+
+ Tests: fast/dom/registerContentHandler.html
+ fast/dom/registerProtocolHandler.html
+
+ * page/Chrome.cpp:
+ (WebCore::Chrome::registerProtocolHandler):
+ (WebCore::Chrome::registerContentHandler):
+ * page/Chrome.h:
+ * page/ChromeClient.h:
+ (WebCore::ChromeClient::registerProtocolHandler):
+ (WebCore::ChromeClient::registerContentHandler):
+ * page/Navigator.cpp:
+ (WebCore::verifyCustomHandlerURL):
+ (WebCore::verifyProtocolHandlerScheme):
+ (WebCore::Navigator::registerProtocolHandler):
+ (WebCore::verifyProtocolHandlerMimeType):
+ (WebCore::Navigator::registerContentHandler):
+ * page/Navigator.h:
+ * page/Navigator.idl:
+
+2009-11-03 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31079 - Remove #include "Page.h" from Document.h
+
+ No new tests. (No change in functionality)
+
+ * dom/Document.cpp:
+ (WebCore::Document::inspectorTimelineAgent): Moved from Document.h
+ * dom/Document.h:
+
+ Include "Page.h" directly:
+ * html/HTMLVideoElement.cpp:
+ * loader/RedirectScheduler.cpp:
+ * page/History.cpp:
+ * rendering/MediaControlElements.cpp:
+ * storage/StorageAreaImpl.cpp:
+
+2009-11-03 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: hover over JS "things" in source and see their values
+ https://bugs.webkit.org/show_bug.cgi?id=30913
+
+ * inspector/front-end/SourceFrame.js:
+
+2009-11-03 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: update timeline content boundaries on timer.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31072
+
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype.refresh):
+ (WebInspector.TimelinePanel.prototype._setWindowPosition):
+
+2009-11-03 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson and Beth Dakin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31070
+ Fix <rdar://problem/7194735> Crashes at RenderText::RenderText()
+ Fix <rdar://problem/6937089> Crashes at RenderWidget::destroy()
+
+ Tests: plugins/attach-during-destroy.html
+ plugins/destroy-reentry.html
+
+ These crashes were caused by plug-in code running during detach(),
+ causing re-entry into RenderWidget::destroy() in one case and a call
+ into attach() in the other. The fix is to prevent plug-in code from
+ being called at certain unsafe times (during attach(), detach(), and
+ recalcStyle()) by deferring changes to the widget hierarchy.
+
+ * dom/Document.cpp:
+ (WebCore::Document::recalcStyle): Suspend widget hierarchy updates
+ during style recalculation.
+
+ * dom/Element.cpp:
+ (WebCore::Element::attach): Suspend widget hierarchy updates during
+ attach().
+ (WebCore::Element::detach): Suspend widget hierarchy updates during
+ detach().
+
+ * rendering/RenderWidget.cpp:
+ (WebCore::widgetNewParentMap): Returns a static map of pending changes
+ to the widget hierarchy.
+ (WebCore::RenderWidget::suspendWidgetHierarchyUpdates): Increments the
+ suspend count.
+ (WebCore::RenderWidget::resumeWidgetHierarchyUpdates): Decrements the
+ suspend count. If the count is going to be zero, updates the widget
+ hierarchy by executing the pending changes stored in the map.
+ (WebCore::moveWidgetToParentSoon): Updates the widget hierarchy
+ immediately or makes or updates an entry in the map, depending on
+ whether updates are suspended.
+ (WebCore::RenderWidget::destroy): Removed earlier bandaid fix for
+ <rdar://problem/6937089>.
+ (WebCore::RenderWidget::setWidgetGeometry): Assert that widget updates
+ are not suspended, because this function updates the widget’s
+ bounds, which can result in arbitrary native and JavaScript code
+ execution. I think this assertion is true thanks to some deferred-
+ update mechanisms that have already been deployed in other places
+ in the code.
+ (WebCore::RenderWidget::setWidget): Call moveWidgetToParentSoon instead
+ of changing the widget hierarchy directly.
+ * rendering/RenderWidget.h: Declared suspendWidgetHierarchyUpdates()
+ and resumeWidgetHierarchyUpdates().
+
+2009-11-03 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: only show timeline records that contribute
+ to the current window.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31069
+
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype.refresh):
+ (WebInspector.TimelineGraph):
+ (WebInspector.TimelineGraph.prototype.refresh):
+
+2009-11-03 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Watch expression editor should stay open after Add button was clicked
+ https://bugs.webkit.org/show_bug.cgi?id=31049
+
+ No new tests, was a regression, use existing manual test.
+
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSection.prototype.update):
+ (WebInspector.WatchExpressionsSection.prototype.addExpression):
+
+2009-11-03 Evan Martin <evan@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix an off-by-one in the CSS lexer that causes memory corruption in
+ hard-to-trigger circumstances.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30827
+
+ Test: fast/css/end-of-buffer-crash.html
+
+ * css/maketokenizer: Add comments, fix off-by-one.
+
+2009-11-02 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Crash due to double-destroy related to CSS run-in property
+ https://bugs.webkit.org/show_bug.cgi?id=31034
+ rdar://problem/7328458
+
+ Test: fast/css/run-in-crash.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::destroy): Reorder destruction so the
+ continuation is destroyed after anonymous children. See comment
+ in the code for more details of why this is right.
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::destroy): Ditto.
+
+2009-11-03 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Fix exception in ElementsPanel.js when moving pointer out of crumbs and window
+
+ There might be no new node under mouse if the pointer is moved out of the window
+ in which case we get an exception.
+ https://bugs.webkit.org/show_bug.cgi?id=31061
+
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype._mouseMovedOutOfCrumbs):
+
+2009-11-03 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for the dom directory of WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=31053
+
+ Inherits the following classes from Noncopyable because these are
+ instantiated by 'new' and these are no need to be copyable:
+
+ class EventNames - 'new' call: WebCore/platform/ThreadGlobalData.cpp:73
+ struct PerformTaskContext - 'new' call: WebCore/dom/Document.cpp:4581
+ class EventData - 'new' call: WebCore/dom/MessagePortChannel.cpp:38
+ struct NodeListsNodeData - 'new' call: WebCore/dom/NodeRareData.h:51
+ struct EventTargetData - 'new' call: WebCore/dom/NodeRareData.h:100
+ class NodeRareData - 'new' call: WebCore/dom/Node.cpp:552
+
+ Inherits QualifiedName class from FastAllocBase because it is
+ instantiated by 'new' in WebCore/editing/markup.cpp:319
+
+ * dom/Document.cpp:
+ * dom/EventNames.h:
+ * dom/EventTarget.h:
+ * dom/MessagePortChannel.h:
+ * dom/NodeRareData.h:
+ * dom/QualifiedName.h:
+
+2009-11-03 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Implement timeline summary panel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31064
+
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype._createOverview):
+ (WebInspector.TimelinePanel.prototype.refresh):
+ (WebInspector.TimelineCategoryGraph):
+ (WebInspector.TimelineCategoryGraph.prototype.get graphElement):
+ (WebInspector.TimelineCategoryGraph.prototype.addChunk):
+ (WebInspector.TimelineCategoryGraph.prototype.clearChunks):
+ (WebInspector.TimelineGraph.prototype.refresh):
+ * inspector/front-end/inspector.css:
+
+2009-11-03 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Toggle off 'Search for node' when the Inspector window is closing
+
+ Searching for node should be toggled off when the Inspector window is closed,
+ in a platform-independent manner.
+ https://bugs.webkit.org/show_bug.cgi?id=31059
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::setWindowVisible):
+
+2009-11-03 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Prepare for heap profiles upstreaming:
+ - pass profile type id from InspectorController;
+ - this makes WebInspector.CPUProfile redundant---removed;
+ - support multiple profile types when populating profiles.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31052
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::createProfileHeader):
+ * inspector/front-end/ProfileView.js:
+ (WebInspector.CPUProfileView.profileCallback):
+ (WebInspector.CPUProfileView):
+ (WebInspector.CPUProfileView.prototype._sortData):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype.addProfileHeader):
+ * inspector/front-end/inspector.js:
+ (WebInspector.addProfileHeader):
+
+2009-11-03 Dan Kegel <dank@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ UMR in WebCore::AccessibilityRenderObject::children(); m_childrenDirty uninitialized in constructor
+ https://bugs.webkit.org/show_bug.cgi?id=31063
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
+
+2009-11-03 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Implement Timeline Window, wire it to the bottom timeline.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31056
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype.get items):
+ (WebInspector.AbstractTimelinePanel.prototype.createInterface):
+ (WebInspector.AbstractTimelinePanel.prototype.updateGraphDividersIfNeeded):
+ (WebInspector.AbstractTimelinePanel.prototype._updateDividersLabelBarPosition):
+ (WebInspector.AbstractTimelinePanel.prototype.invalidateAllItems):
+ (WebInspector.AbstractTimelinePanel.prototype.refresh):
+ (WebInspector.AbstractTimelinePanel.prototype.adjustScrollPosition):
+ (WebInspector.AbstractTimelinePanel.prototype.addExtraDivider):
+ (WebInspector.TimelineGrid):
+ (WebInspector.TimelineGrid.prototype.get itemsGraphsElement):
+ (WebInspector.TimelineGrid.prototype.updateDividers):
+ (WebInspector.TimelineGrid.prototype.addExtraDivider):
+ (WebInspector.TimelineGrid.prototype.setScrollAndDividerTop):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel):
+ (WebInspector.ResourcesPanel.prototype.updateGraphDividersIfNeeded):
+ (WebInspector.ResourcesPanel.prototype.get _resources):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel):
+ (WebInspector.TimelinePanel.prototype.get categories):
+ (WebInspector.TimelinePanel.prototype._formatRecord):
+ (WebInspector.TimelinePanel.prototype.reset):
+ (WebInspector.TimelinePanel.prototype._createOverview):
+ (WebInspector.TimelinePanel.prototype.setSidebarWidth):
+ (WebInspector.TimelinePanel.prototype.updateMainViewWidth):
+ (WebInspector.TimelinePanel.prototype.updateGraphDividersIfNeeded):
+ (WebInspector.TimelinePanel.prototype.refresh):
+ (WebInspector.TimelinePanel.prototype._resizeWindow):
+ (WebInspector.TimelinePanel.prototype._windowResizeDragging):
+ (WebInspector.TimelinePanel.prototype._dragWindow):
+ (WebInspector.TimelinePanel.prototype._windowDragging):
+ (WebInspector.TimelinePanel.prototype._resizeWindowLeft):
+ (WebInspector.TimelinePanel.prototype._resizeWindowRight):
+ (WebInspector.TimelinePanel.prototype._setWindowPosition):
+ (WebInspector.TimelinePanel.prototype._endWindowDragging):
+ (WebInspector.TimelineCategoryTreeElement):
+ (WebInspector.TimelineCategoryTreeElement.prototype.onattach):
+ (WebInspector.TimelineCalculator.prototype.computeBarGraphPercentages):
+ (WebInspector.TimelineCalculator.prototype.get minimumBoundary):
+ (WebInspector.TimelineCalculator.prototype.get maximumBoundary):
+ (WebInspector.TimelineCalculator.prototype.reset):
+ (WebInspector.TimelineCalculator.prototype.updateBoundaries):
+ (WebInspector.TimelineCalculator.prototype.formatValue):
+ * inspector/front-end/inspector.css:
+
+2009-11-03 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Make QWebPluginDatabase private API for now.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30775
+
+ * WebCore.pro:
+
+2009-11-03 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Extended the conversion of the WebCore ResourceRequest to the
+ QNetworkRequest with a mandatory originating object argument,
+ which is meant to be the QWebFrame the request belongs to.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29975
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+ (WebCore::QNetworkReplyHandler::start):
+ * platform/network/qt/ResourceRequest.h:
+ * platform/network/qt/ResourceRequestQt.cpp:
+ (WebCore::ResourceRequest::toNetworkRequest):
+
+2009-11-03 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: monitorEvent should be monitorEvents
+ https://bugs.webkit.org/show_bug.cgi?id=31042
+
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript._ensureCommandLineAPIInstalled):
+
+2009-11-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Rubber-stamped by Antti Koivisto.
+
+ [Qt] Build fix for Windows CE
+
+ * plugins/PluginDatabase.cpp:
+
+2009-11-02 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by David Levin.
+
+ fix accessibility webkit-style-check errors
+ https://bugs.webkit.org/show_bug.cgi?id=29672
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::getOrCreate):
+ (WebCore::AXObjectCache::remove):
+ (WebCore::AXObjectCache::platformGenerateAXID):
+ (WebCore::AXObjectCache::removeAXID):
+ * accessibility/AXObjectCache.h:
+ (WebCore::AXObjectCache::enableAccessibility):
+ (WebCore::AXObjectCache::enableEnhancedUserInterfaceAccessibility):
+ (WebCore::AXObjectCache::accessibilityEnabled):
+ (WebCore::AXObjectCache::accessibilityEnhancedUserInterfaceEnabled):
+ (WebCore::AXObjectCache::isIDinUse):
+ (WebCore::AXObjectCache::objectFromAXID):
+ (WebCore::AXObjectCache::):
+ (WebCore::AXObjectCache::handleActiveDescendantChanged):
+ (WebCore::AXObjectCache::handleAriaRoleChanged):
+ (WebCore::AXObjectCache::detachWrapper):
+ (WebCore::AXObjectCache::attachWrapper):
+ (WebCore::AXObjectCache::selectedChildrenChanged):
+ (WebCore::AXObjectCache::postNotification):
+ (WebCore::AXObjectCache::postPlatformNotification):
+ (WebCore::AXObjectCache::handleFocusedUIElementChanged):
+ (WebCore::AXObjectCache::handleScrolledToAnchor):
+ * accessibility/AccessibilityARIAGrid.cpp:
+ (WebCore::AccessibilityARIAGrid::cellForColumnAndRow):
+ * accessibility/AccessibilityAllInOne.cpp:
+ * accessibility/AccessibilityImageMapLink.cpp:
+ * accessibility/AccessibilityList.h:
+ (WebCore::AccessibilityList::isList):
+ * accessibility/AccessibilityListBox.cpp:
+ * accessibility/AccessibilityListBox.h:
+ (WebCore::AccessibilityListBox::isListBox):
+ * accessibility/AccessibilityListBoxOption.cpp:
+ * accessibility/AccessibilityListBoxOption.h:
+ (WebCore::AccessibilityListBoxOption::isListBoxOption):
+ * accessibility/AccessibilityMediaControls.h:
+ (WebCore::AccessibilityMediaControl::~AccessibilityMediaControl):
+ (WebCore::AccessibilityMediaTimeline::~AccessibilityMediaTimeline):
+ (WebCore::AccessibilityMediaTimeline::isMediaTimeline):
+ (WebCore::AccessibilityMediaControlsContainer::~AccessibilityMediaControlsContainer):
+ (WebCore::AccessibilityMediaControlsContainer::roleValue):
+ (WebCore::AccessibilityMediaControlsContainer::accessibilityIsIgnored):
+ (WebCore::AccessibilityMediaTimeDisplay::~AccessibilityMediaTimeDisplay):
+ (WebCore::AccessibilityMediaTimeDisplay::roleValue):
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::parentObjectUnignored):
+ (WebCore::AccessibilityObject::rightLineVisiblePositionRange):
+ (WebCore::replacedNodeNeedsCharacter):
+ (WebCore::AccessibilityObject::stringForVisiblePositionRange):
+ (WebCore::AccessibilityObject::lengthForVisiblePositionRange):
+ (WebCore::AccessibilityObject::actionVerb):
+ * accessibility/AccessibilityObject.h:
+ (WebCore::PlainTextRange::isNull):
+ (WebCore::AccessibilityObject::isAccessibilityRenderObject):
+ (WebCore::AccessibilityObject::isAnchor):
+ (WebCore::AccessibilityObject::isAttachment):
+ (WebCore::AccessibilityObject::isHeading):
+ (WebCore::AccessibilityObject::isLink):
+ (WebCore::AccessibilityObject::isImage):
+ (WebCore::AccessibilityObject::isNativeImage):
+ (WebCore::AccessibilityObject::isImageButton):
+ (WebCore::AccessibilityObject::isPasswordField):
+ (WebCore::AccessibilityObject::isTextControl):
+ (WebCore::AccessibilityObject::isNativeTextControl):
+ (WebCore::AccessibilityObject::isWebArea):
+ (WebCore::AccessibilityObject::isCheckboxOrRadio):
+ (WebCore::AccessibilityObject::isListBox):
+ (WebCore::AccessibilityObject::isFileUploadButton):
+ (WebCore::AccessibilityObject::isProgressIndicator):
+ (WebCore::AccessibilityObject::isSlider):
+ (WebCore::AccessibilityObject::isControl):
+ (WebCore::AccessibilityObject::isList):
+ (WebCore::AccessibilityObject::isDataTable):
+ (WebCore::AccessibilityObject::isTableRow):
+ (WebCore::AccessibilityObject::isTableColumn):
+ (WebCore::AccessibilityObject::isTableCell):
+ (WebCore::AccessibilityObject::isFieldset):
+ (WebCore::AccessibilityObject::isGroup):
+ (WebCore::AccessibilityObject::isChecked):
+ (WebCore::AccessibilityObject::isEnabled):
+ (WebCore::AccessibilityObject::isSelected):
+ (WebCore::AccessibilityObject::isFocused):
+ (WebCore::AccessibilityObject::isHovered):
+ (WebCore::AccessibilityObject::isIndeterminate):
+ (WebCore::AccessibilityObject::isLoaded):
+ (WebCore::AccessibilityObject::isMultiSelect):
+ (WebCore::AccessibilityObject::isOffScreen):
+ (WebCore::AccessibilityObject::isPressed):
+ (WebCore::AccessibilityObject::isReadOnly):
+ (WebCore::AccessibilityObject::isVisited):
+ (WebCore::AccessibilityObject::isRequired):
+ (WebCore::AccessibilityObject::canSetFocusAttribute):
+ (WebCore::AccessibilityObject::canSetTextRangeAttributes):
+ (WebCore::AccessibilityObject::canSetValueAttribute):
+ (WebCore::AccessibilityObject::hasIntValue):
+ (WebCore::AccessibilityObject::accessibilityShouldUseUniqueId):
+ (WebCore::AccessibilityObject::accessibilityIsIgnored):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::parentObjectIfExists):
+ (WebCore::AccessibilityRenderObject::parentObject):
+ (WebCore::AccessibilityRenderObject::isMenuRelated):
+ (WebCore::AccessibilityRenderObject::accessibilityDescription):
+ (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
+ (WebCore::AccessibilityRenderObject::isFocused):
+ (WebCore::AccessibilityRenderObject::visiblePositionRangeForLine):
+ (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
+ (WebCore::AccessibilityRenderObject::doAXRangeForLine):
+ (WebCore::AccessibilityRenderObject::doAXStringForRange):
+ (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
+ (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
+ (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+ (WebCore::AccessibilityRenderObject::isPresentationalChildOfAriaRole):
+ (WebCore::AccessibilityRenderObject::canSetFocusAttribute):
+ (WebCore::AccessibilityRenderObject::canHaveChildren):
+ (WebCore::AccessibilityRenderObject::actionVerb):
+ (WebCore::shouldReturnTagNameAsRoleForMSAA):
+ * accessibility/AccessibilityRenderObject.h:
+ (WebCore::AccessibilityRenderObject::isAccessibilityRenderObject):
+ * accessibility/AccessibilitySlider.cpp:
+ (WebCore::AccessibilitySlider::orientation):
+ * accessibility/AccessibilitySlider.h:
+ (WebCore::AccessibilitySlider::~AccessibilitySlider):
+ (WebCore::AccessibilitySlider::roleValue):
+ (WebCore::AccessibilitySlider::accessibilityIsIgnored):
+ (WebCore::AccessibilitySlider::isSlider):
+ (WebCore::AccessibilitySlider::canSetValueAttribute):
+ (WebCore::AccessibilitySliderThumb::~AccessibilitySliderThumb):
+ (WebCore::AccessibilitySliderThumb::roleValue):
+ (WebCore::AccessibilitySliderThumb::accessibilityIsIgnored):
+ (WebCore::AccessibilitySliderThumb::setParentObject):
+ (WebCore::AccessibilitySliderThumb::parentObject):
+ * accessibility/AccessibilityTable.cpp:
+ (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
+ * accessibility/AccessibilityTableColumn.cpp:
+ * accessibility/AccessibilityTableHeaderContainer.cpp:
+ (WebCore::AccessibilityTableHeaderContainer::addChildren):
+ * accessibility/AccessibilityTableRow.cpp:
+ * accessibility/mac/AccessibilityObjectWrapper.h:
+
+2009-11-02 Darin Fisher <darin@chromium.org>
+
+ Fixing JSC build bustage.
+
+ * bindings/js/ScriptController.cpp: Added missing #include
+
+2009-10-30 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Give the FrameLoaderClient the ability to override Settings::isJavaScriptEnabled.
+ https://bugs.webkit.org/show_bug.cgi?id=30967
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::isEnabled):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::isEnabled):
+ * bindings/v8/V8Proxy.cpp: Move implementation of isEnabled to ScriptController
+ * bindings/v8/V8Proxy.h: Ditto
+ * loader/FrameLoaderClient.h:
+ (WebCore::FrameLoaderClient::allowJavaScript):
+ * platform/chromium/ChromiumBridge.h: Delete uiResourceProtocol function
+
+2009-11-02 Brady Eidson <beidson@apple.com>
+
+ Rubberstamped by Mark Rowe.
+
+ Fix a typo in Mark's last commit.
+
+ * loader/archive/ArchiveFactory.cpp:
+ (WebCore::archiveMIMETypes):
+
+2009-11-02 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Brady Eidson.
+
+ Re-enable support for web archives on Windows. It was mistakenly disabled in r50438.
+
+ * loader/archive/ArchiveFactory.cpp:
+ (WebCore::archiveMIMETypes):
+
+2009-11-02 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ PLATFORM(CF) should be set when building for Qt on Darwin
+ https://bugs.webkit.org/show_bug.cgi?id=23671
+
+ * WebCore.pro: Add SharedBufferCF.cpp and SmartReplaceCF.cpp
+ to the Darwin build.
+ * loader/archive/ArchiveFactory.cpp: Change the support for
+ legacy WebArchive from all CF platforms to Mac and Chromium
+ CF platforms.
+ (WebCore::archiveMIMETypes):
+ * platform/text/AtomicString.h: Remove PLATFORM(QT) &&
+ PLATFORM(DARWIN) test as it is redundant now.
+ * platform/text/PlatformString.h: Ditto.
+ * platform/text/StringImpl.h: Ditto.
+ * platform/text/cf/StringCF.cpp: Ditto.
+ * platform/text/cf/StringImplCF.cpp: Ditto.
+
+2009-11-02 Adam Barth <abarth@webkit.org>
+
+ Reviewed by David Levin.
+
+ [Chromium] Actually declare getPluginMimeTypeFromExtension in a header.
+ https://bugs.webkit.org/show_bug.cgi?id=30985
+
+ Our current code does not conform to our style guide.
+
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gypi:
+ * platform/chromium/MIMETypeRegistryChromium.cpp:
+ * plugins/chromium/PluginDataChromium.cpp:
+ * plugins/chromium/PluginDataChromium.h: Added.
+
+2009-11-02 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for <rdar://problem/7038305> REGRESSION (Safari 4.0.2 - ToT): After navigating back to a known phishy page, the "Ignore warning" button appears highlighted (along with the "Go Back" button)
+
+ This bug is timing dependent, and not always reproducible. I could not think of a way to add a
+ layout test that would demonstrate the problem and fix.
+
+ * platform/mac/ThemeMac.mm:
+ (WebCore::checkbox): Update style.
+ (WebCore::paintCheckbox): ditto.
+ (WebCore::radio): ditto.
+ (WebCore::paintRadio): ditto.
+ (WebCore::setupButtonCell): Added convenience method.
+ (WebCore::button): Use a separate NSButtonCell for defaultButtons and regular buttons.
+ (WebCore::paintButton): Don't check for the key window here. Consider that when deciding if the button should have the default style in RenderTheme.
+ * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isDefault): Only consider a button to be default if the page is active. This fixes
+ a problem I noticed where the button would flicker crazily if the page with the default button was in the background.
+
+2009-11-02 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Minor RenderWidget clean-up in preparation for deferring widget tree
+ mutation when it is not safe.
+
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::RenderWidget): Initialize m_refCount to 1
+ instead of calling ref().
+ (WebCore::RenderWidget::destroy): Call setWidget(0) instead of
+ repeating what it does.
+ (WebCore::RenderWidget::setWidgetGeometry): Now returns a boolean
+ indicating whether the bounds have changed.
+ (WebCore::RenderWidget::setWidget): Replaced all-encompassing if
+ statement with an early return.
+ (WebCore::RenderWidget::updateWidgetPosition): Call setWidgetGeometry().
+ * rendering/RenderWidget.h:
+
+2009-11-02 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Adding Chromium's DatabaseTracker and SQLTransactionClient
+ implementations.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30701
+
+ * storage/chromium: Added.
+ * storage/chromium/DatabaseObserver.h: Added.
+ * storage/chromium/DatabaseTrackerChromium.cpp: Added.
+ * storage/chromium/QuotaTracker.cpp: Added.
+ * storage/chromium/QuotaTracker.h: Added.
+ * storage/chromium/SQLTransactionClientChromium.cpp: Added.
+
+2009-11-02 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Adele Peterson and Dan Bernstein.
+
+ Safari crashes when calling execCommand on formatted html in special case
+ <rdar://problem/7318656>
+ https://bugs.webkit.org/show_bug.cgi?id=31023
+
+ Test: editing/execCommand/align-in-span.html
+
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::containingBlock): Modified comment on containingBlock returning NULL.
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::setSelectionState): Added check for NULL return from containingBlock,
+ since it is possible when dealing with orphaned trees.
+
+2009-11-02 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Exception checks were being too aggressive
+ https://bugs.webkit.org/show_bug.cgi?id=31005
+
+ Several calls in CanvasRenderingContext3D are allowed to
+ have a null value passed, which indicated that the
+ object is being unbound. Handle this case and the corresponding
+ null handling in GraphicsContext3DMac.
+
+ * html/canvas/CanvasRenderingContext3D.cpp:
+ (WebCore::CanvasRenderingContext3D::bindBuffer):
+ (WebCore::CanvasRenderingContext3D::bindFramebuffer):
+ (WebCore::CanvasRenderingContext3D::bindRenderbuffer):
+ (WebCore::CanvasRenderingContext3D::bindTexture):
+ (WebCore::CanvasRenderingContext3D::framebufferRenderbuffer):
+ (WebCore::CanvasRenderingContext3D::framebufferTexture2D):
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::framebufferRenderbuffer):
+ (WebCore::GraphicsContext3D::framebufferTexture2D):
+
+2009-11-02 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Each JS execution in console adds extra item into "scripts" combo
+ https://bugs.webkit.org/show_bug.cgi?id=30212
+
+ Added manual test
+
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
+ * manual-tests/inspector/hidden-evals.html: Added.
+
+2009-11-02 Kelly Norton <knorton@google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Adds a missed case for InspectorTimeline, DOMWindow dispatch of DOM events.
+ https://bugs.webkit.org/show_bug.cgi?id=31030
+
+ * dom/Node.cpp:
+ (WebCore::eventHasListeners): Checks DOMWindow for listeners.
+ (WebCore::Node::dispatchGenericEvent):
+
+2009-11-02 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by David Levin.
+
+ Remove threadsafe refcounting from tasks used with WTF::MessageQueue.
+ https://bugs.webkit.org/show_bug.cgi?id=30612
+
+ No new tests since no new functionality. Storage, MessagePorts and Workers tests cover this.
+
+ There are a lot of files but most changes are simply replace RefPtr and PassRefPtr with
+ OwnPtr and PassOwnPtr when dealing with Tasks.
+
+ ScriptExecutionContext::Task, DatabaseTask and WorkerRunLoop::Task are no longer
+ threadsafe refcounted, but simply Noncopyable.
+
+ * dom/Document.cpp:
+ (WebCore::ScriptExecutionContextTaskTimer::ScriptExecutionContextTaskTimer):
+ (WebCore::PerformTaskContext::PerformTaskContext):
+ (WebCore::Document::postTask):
+ * dom/Document.h:
+ * dom/ScriptExecutionContext.cpp:
+ (WebCore::ProcessMessagesSoonTask::create):
+ * dom/ScriptExecutionContext.h:
+ * dom/default/PlatformMessagePortChannel.cpp:
+ (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
+ * dom/default/PlatformMessagePortChannel.h:
+ (WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
+ (WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty):
+ * loader/FrameLoader.cpp:
+ (WebCore::HashChangeEventTask::create):
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::CallCacheListenerTask::create):
+ * storage/Database.cpp:
+ (WebCore::Database::openAndVerifyVersion):
+ (WebCore::Database::markAsDeletedAndClose):
+ (WebCore::Database::scheduleTransaction):
+ (WebCore::Database::scheduleTransactionStep):
+ (WebCore::Database::tableNames):
+ * storage/DatabaseTask.h:
+ (WebCore::DatabaseOpenTask::create):
+ (WebCore::DatabaseCloseTask::create):
+ (WebCore::DatabaseTransactionTask::create):
+ (WebCore::DatabaseTableNamesTask::create):
+ * storage/DatabaseThread.cpp:
+ (WebCore::DatabaseThread::databaseThread):
+ (WebCore::DatabaseThread::scheduleTask):
+ (WebCore::DatabaseThread::scheduleImmediateTask):
+ (WebCore::SameDatabasePredicate::operator()):
+ * storage/DatabaseThread.h:
+ * storage/LocalStorageTask.h:
+ (WebCore::LocalStorageTask::createImport):
+ (WebCore::LocalStorageTask::createSync):
+ (WebCore::LocalStorageTask::createTerminate):
+ * storage/LocalStorageThread.cpp:
+ (WebCore::LocalStorageThread::localStorageThread):
+ * storage/LocalStorageThread.h:
+ * websockets/WebSocket.cpp:
+ (WebCore::ProcessWebSocketEventTask::create):
+ * workers/DefaultSharedWorkerRepository.cpp:
+ (WebCore::SharedWorkerProxy::postTaskToLoader):
+ (WebCore::SharedWorkerProxy::postTaskForModeToWorkerContext):
+ (WebCore::SharedWorkerConnectTask::create):
+ * workers/GenericWorkerTask.h:
+ (WebCore::GenericWorkerTask1::create):
+ (WebCore::GenericWorkerTask2::create):
+ (WebCore::GenericWorkerTask3::create):
+ (WebCore::GenericWorkerTask4::create):
+ (WebCore::GenericWorkerTask5::create):
+ (WebCore::GenericWorkerTask6::create):
+ (WebCore::GenericWorkerTask7::create):
+ (WebCore::GenericWorkerTask8::create):
+ (WebCore::createCallbackTask):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::postTask):
+ * workers/WorkerContext.h:
+ * workers/WorkerLoaderProxy.h:
+ * workers/WorkerMessagingProxy.cpp:
+ (WebCore::MessageWorkerContextTask::create):
+ (WebCore::MessageWorkerTask::create):
+ (WebCore::WorkerExceptionTask::create):
+ (WebCore::WorkerContextDestroyedTask::create):
+ (WebCore::WorkerTerminateTask::create):
+ (WebCore::WorkerThreadActivityReportTask::create):
+ (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerContext):
+ (WebCore::WorkerMessagingProxy::postTaskToLoader):
+ (WebCore::WorkerMessagingProxy::workerThreadCreated):
+ * workers/WorkerMessagingProxy.h:
+ * workers/WorkerRunLoop.cpp:
+ (WebCore::ModePredicate::operator()):
+ (WebCore::WorkerRunLoop::runInMode):
+ (WebCore::WorkerRunLoop::postTask):
+ (WebCore::WorkerRunLoop::postTaskForMode):
+ (WebCore::WorkerRunLoop::Task::create):
+ (WebCore::WorkerRunLoop::Task::performTask):
+ (WebCore::WorkerRunLoop::Task::Task):
+ * workers/WorkerRunLoop.h:
+ (WebCore::WorkerRunLoop::Task::~Task):
+ (WebCore::WorkerRunLoop::Task::mode):
+
+2009-11-02 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ [GTK] Failing media/video-played-reset.html
+ https://bugs.webkit.org/show_bug.cgi?id=30589
+
+ new m_seekTime attribute to keep track of the seek position
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::currentTime):
+ (WebCore::MediaPlayerPrivate::seek):
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+
+2009-11-02 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ [GTK] Remove Referer when redirecting to non-secure site
+ https://bugs.webkit.org/show_bug.cgi?id=31021
+
+ Remove referer from HTTP headers when redirecting to a non-secure
+ site.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::restartedCallback):
+
+2009-11-02 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=18539
+ multipart/form-data not being parsed correctly on server due to '+' in boundary string
+
+ No test - the characters that the boundary is made of are not deterministic.
+
+ * platform/network/FormDataBuilder.cpp: (WebCore::FormDataBuilder::generateUniqueBoundaryString):
+ Don't ever put a '+' in boundary string, either. Removed a FIXME to bring '/' back once
+ GMail is fixed - I don't think we'll ever want to allow non-alphanumeric characters, as
+ they cause problems on many web sites.
+
+2009-10-30 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30969
+ A no-prefix XPath node test should not match no-namespace elements in HTML document
+
+ Test: fast/xpath/null-namespace-in-html.html
+
+ * xml/XPathStep.cpp: (WebCore::XPath::nodeMatchesBasicTest): Special case non-HTML elements
+ in HTML documents (as these are the ones that can have null namespace).
+
+2009-11-02 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: [REGRESSION] No timeline marks on resources panel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31013
+
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype.updateGraphDividersIfNeeded):
+
+2009-11-02 David Levin <levin@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ Possible crash in RenderSlider::layout.
+ https://bugs.webkit.org/show_bug.cgi?id=31016
+
+ Fix out of place line of code.
+
+ Test: scrollbars/overflow-scrollbar-combinations.html
+ This crash only seems to repro when WebKit draws the play controls,
+ so the crash repros in chromium running this test but not WebKit
+ nightlies which use QuickTime to draw the controls.
+
+ * rendering/RenderSlider.cpp:
+ (WebCore::RenderSlider::layout):
+
+2009-11-02 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Fix Qt build on Windows.
+ https://bugs.webkit.org/show_bug.cgi?id=30905
+
+ * WebCore.pro:
+ * platform/graphics/BitmapImage.h:
+ * platform/graphics/qt/ImageQt.cpp:
+ (WebCore::BitmapImage::BitmapImage):
+ (WebCore::BitmapImage::create):
+
+2009-11-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
+
+ Reviewed by Adam Barth.
+
+ QWebView crash fix.
+
+ The QWebView should not crash if the stop() method is called from
+ a function triggered by the loadProgress signal.
+
+ A null pointer protection was added in the ProgressTracker::incrementProgress.
+
+ New autotest was created.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29425
+
+ * loader/ProgressTracker.cpp:
+ (WebCore::ProgressTracker::incrementProgress):
+
+2009-11-02 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Fix a leftover from profiles panel generalization.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31010
+
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype.get searchableViews):
+
+2009-11-02 Kai Koehne <kai.koehne@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ Remove implementation of ImageDecocerQt::clearFrameBufferCache.
+ The implementation was buggy, and will visually break repeating
+ animations anyway.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31009
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::clearFrameBufferCache):
+
+2009-11-02 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30964
+ [Gtk] Implemment AtkDocument
+
+ Provides access to the reported content language.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (webkit_accessible_document_get_locale):
+
+2009-11-02 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Rewrite CSSSourceSyntaxHighlighter so it shares more code
+ https://bugs.webkit.org/show_bug.cgi?id=30907
+
+ Test: inspector/css-syntax-highlight.html
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype.syntaxHighlightCSS):
+ (WebInspector.SourceSyntaxHighlighter):
+ (WebInspector.SourceSyntaxHighlighter.prototype.process.processChunk):
+ (WebInspector.SourceSyntaxHighlighter.prototype.process.moveToNextLine):
+ (WebInspector.SourceSyntaxHighlighter.prototype.process):
+ (WebInspector.SourceSyntaxHighlighter.prototype.lex):
+ (WebInspector.SourceSyntaxHighlighter.prototype.appendNonToken):
+ (WebInspector.SourceSyntaxHighlighter.prototype.syntaxHighlightNode):
+ (WebInspector.CSSSourceSyntaxHighlighter):
+ * inspector/front-end/inspectorSyntaxHighlight.css:
+
+2009-11-02 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Support ARIA "tab" roles
+ https://bugs.webkit.org/show_bug.cgi?id=30842
+
+ Implement support for ARIA "tab", "tabpanel" and "tablist".
+ As a consequence, we also needed to implement aria-selected
+ and aria-controls.
+
+ Tests: accessibility/aria-controls-with-tabs.html
+ accessibility/aria-tab-roles.html
+
+ * accessibility/AXObjectCache.cpp:
+ * accessibility/AccessibilityObject.h:
+ * accessibility/AccessibilityRenderObject.cpp:
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ * html/HTMLAttributeNames.in:
+
+2009-10-27 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ This is the WebKit-side change needed to fix canvas.getImageData() for
+ Chromium. The unpremultiply code in Skia assumes that unpremultiplied
+ values should be rounded, while CG does not. In addition, the fixed
+ point inversion used by Skia introduces slight inaccuracies that make
+ us fail this test. This change brings Chromium in line with
+ the CG path.
+ https://bugs.webkit.org/show_bug.cgi?id=30825
+
+ Covered by LayoutTests/fast/canvas/canvas-getImageData.html
+
+ * platform/graphics/skia/ImageBufferSkia.cpp:
+ (WebCore::getImageData):
+
+2009-11-01 Kelly Norton <knorton@google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Adds window event dispatches to InspectorTimelineAgent.
+ https://bugs.webkit.org/show_bug.cgi?id=31002
+
+ * English.lproj/localizedStrings.js:
+ * dom/Node.cpp: Updated call site to willDispatchEvent and didDispatchEvent.
+ (WebCore::Node::dispatchGenericEvent):
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::willDispatchEvent): Renamed.
+ (WebCore::InspectorTimelineAgent::didDispatchEvent): Renamed.
+ * inspector/InspectorTimelineAgent.h:
+ (WebCore::):
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createEventDispatchRecord): Renamed.
+ * inspector/TimelineRecordFactory.h:
+ * inspector/front-end/TimelineAgent.js:
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype._formatRecord):
+ (WebInspector.TimelinePanel.prototype._getRecordDetails):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::dispatchEvent):
+
+2009-11-01 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Convert script tag event into a more generic
+ script eval event in timeline.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30999
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluateInWorld):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluate):
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::scriptExecution):
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::willEvaluateScript):
+ (WebCore::InspectorTimelineAgent::didEvaluateScript):
+ * inspector/InspectorTimelineAgent.h:
+ (WebCore::):
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createEvaluateScriptTimelineRecord):
+ * inspector/TimelineRecordFactory.h:
+ * inspector/front-end/TimelineAgent.js:
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype._formatRecord):
+ (WebInspector.TimelinePanel.prototype._getRecordDetails):
+
+2009-11-01 Brian Weinstein <bweinstein@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ Fix for loop to use an size_t instead of unsigned and some spacing
+ style fixes.
+
+ * dom/Node.cpp:
+ (WebCore::eventHasListeners):
+
+2009-11-01 Kelly Norton <knorton@google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Does not send DOM dispatches to the InspectorTimelineAgent if there
+ are no event listeners.
+ https://bugs.webkit.org/show_bug.cgi?id=30995
+
+ * dom/Node.cpp:
+ (WebCore::eventHasListeners):
+ (WebCore::Node::dispatchGenericEvent):
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::callReadyStateChangeListener):
+
+2009-11-01 Roland Steiner <rolandsteiner@chromium.org>
+
+ No review (build fix).
+
+ Add missing files for Ruby implementation to WebCore.vcproj
+ (Fix build break after 50397)
+ https://bugs.webkit.org/show_bug.cgi?id=31001
+
+ No new tests. (No functional change)
+
+ * WebCore.vcproj/WebCore.vcproj:
+
+2009-11-02 Roland Steiner <rolandsteiner@chromium.org>
+
+ Reviewed by Dave Hyatt.
+
+ Bug 28420 - Implement HTML5 <ruby> rendering
+ (https://bugs.webkit.org/show_bug.cgi?id=28420)
+
+ First rudimentary implementation of HTML5 ruby rendering support.
+
+ Following the HTML 5 spec, the box object model for a <ruby> element allows several runs of ruby
+ bases with their respective ruby texts looks as follows:
+
+ 1 RenderRuby object, corresponding to the whole <ruby> HTML element
+ 1+ RenderRubyRun (anonymous)
+ 0 or 1 RenderRubyText - shuffled to the front in order to re-use existing block layouting
+ 0-n inline object(s)
+ 0 or 1 RenderRubyBase - contains the inline objects that make up the ruby base
+ 1-n inline object(s)
+
+ Note: <rp> elements are defined as having 'display:none' and thus normally are not assigned a renderer.
+
+ New layout tests will be committed in a follow-up patch under fast/ruby.
+
+ Makefiles, etc.
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.xcodeproj/project.pbxproj:
+
+ CSS
+ * css/html.css: Added <ruby> and <rt>
+
+ Existing render files:
+ * rendering/RenderBlock.cpp: make moveChild a member function moveChildTo
+ (WebCore::RenderBlock::moveChildTo):
+ (WebCore::RenderBlock::makeChildrenNonInline):
+ (WebCore::RenderBlock::removeChild):
+ * rendering/RenderBlock.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::createObject): instantiate ruby renderers based on element name
+ * rendering/RenderObject.h: add query methods for ruby renderers
+ (WebCore::RenderObject::isRuby):
+ (WebCore::RenderObject::isRubyBase):
+ (WebCore::RenderObject::isRubyRun):
+ (WebCore::RenderObject::isRubyText):
+
+ New ruby renderers:
+ * rendering/RenderRuby.cpp: Added.
+ (WebCore::lastRubyRun):
+ (WebCore::findRubyRunParent):
+ (WebCore::RenderRubyAsInline::RenderRubyAsInline):
+ (WebCore::RenderRubyAsInline::~RenderRubyAsInline):
+ (WebCore::RenderRubyAsInline::isChildAllowed):
+ (WebCore::RenderRubyAsInline::addChild):
+ (WebCore::RenderRubyAsInline::removeChild):
+ (WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
+ (WebCore::RenderRubyAsBlock::~RenderRubyAsBlock):
+ (WebCore::RenderRubyAsBlock::isChildAllowed):
+ (WebCore::RenderRubyAsBlock::addChild):
+ (WebCore::RenderRubyAsBlock::removeChild):
+ * rendering/RenderRuby.h: Added.
+ (WebCore::RenderRubyAsInline::renderName):
+ (WebCore::RenderRubyAsInline::isRuby):
+ (WebCore::RenderRubyAsBlock::renderName):
+ (WebCore::RenderRubyAsBlock::isRuby):
+ * rendering/RenderRubyBase.cpp: Added.
+ (WebCore::RenderRubyBase::RenderRubyBase):
+ (WebCore::RenderRubyBase::~RenderRubyBase):
+ (WebCore::RenderRubyBase::isChildAllowed):
+ (WebCore::RenderRubyBase::splitToLeft):
+ (WebCore::RenderRubyBase::mergeWithRight):
+ * rendering/RenderRubyBase.h: Added.
+ (WebCore::RenderRubyBase::renderName):
+ (WebCore::RenderRubyBase::isRubyBase):
+ * rendering/RenderRubyRun.cpp: Added.
+ (WebCore::RenderRubyRun::RenderRubyRun):
+ (WebCore::RenderRubyRun::~RenderRubyRun):
+ (WebCore::RenderRubyRun::hasRubyText):
+ (WebCore::RenderRubyRun::hasRubyBase):
+ (WebCore::RenderRubyRun::isEmpty):
+ (WebCore::RenderRubyRun::rubyText):
+ (WebCore::RenderRubyRun::rubyBase):
+ (WebCore::RenderRubyRun::rubyBaseSafe):
+ (WebCore::RenderRubyRun::firstLineBlock):
+ (WebCore::RenderRubyRun::updateFirstLetter):
+ (WebCore::RenderRubyRun::isChildAllowed):
+ (WebCore::RenderRubyRun::addChild):
+ (WebCore::RenderRubyRun::removeChild):
+ (WebCore::RenderRubyRun::createRubyBase):
+ (WebCore::RenderRubyRun::staticCreateRubyRun):
+ * rendering/RenderRubyRun.h: Added.
+ (WebCore::RenderRubyRun::renderName):
+ (WebCore::RenderRubyRun::isRubyRun):
+ * rendering/RenderRubyText.cpp: Added.
+ (WebCore::RenderRubyText::RenderRubyText):
+ (WebCore::RenderRubyText::~RenderRubyText):
+ (WebCore::RenderRubyText::isChildAllowed):
+ * rendering/RenderRubyText.h: Added.
+ (WebCore::RenderRubyText::renderName):
+ (WebCore::RenderRubyText::isRubyText):
+
+2009-11-01 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30992
+ Node.isDefaultNamespace doesn't convert empty strings to null
+
+ Test: fast/dom/Node/default-namespace-empty-argument.html
+
+ * dom/Node.cpp: (WebCore::Node::isDefaultNamespace): Per DOM 3 Core, treat empty input
+ as null.
+
+2009-11-01 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Don't add '/' to the URL path if the it does not include '/' after the protocol component
+ https://bugs.webkit.org/show_bug.cgi?id=30971
+
+ Match IE8 behaviour, that does not add '/' if there is none after the protocol component.
+
+ * platform/KURL.cpp:
+ (WebCore::KURL::parse):
+
+2009-10-31 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix layering violations in GraphicsContext3D
+ https://bugs.webkit.org/show_bug.cgi?id=30986
+
+ Remove uses of HTMLImageElement and HTMLCanvasElement
+
+ * html/canvas/CanvasRenderingContext3D.cpp:
+ (WebCore::CanvasRenderingContext3D::texImage2D):
+ (WebCore::CanvasRenderingContext3D::texSubImage2D):
+ * platform/graphics/GraphicsContext3D.h:
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::texImage2D):
+ (WebCore::GraphicsContext3D::texSubImage2D):
+
+2009-11-01 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30964
+ [Gtk] Implemment AtkDocument
+
+ Provides access to expected document attributes.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (documentAttributeValue):
+ (webkit_accessible_document_get_document_attribute_value):
+ (webkit_accessible_document_get_document_attributes):
+
+2009-11-03 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30964
+ [Gtk] Implemment AtkDocument
+
+ Implements what has been implemented in AT-SPI.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (GetAtkInterfaceTypeFromWAIType):
+ (getInterfaceMaskFromObject):
+ (atk_document_interface_init):
+ (webkit_accessible_document_get_document_attribute_value):
+ (webkit_accessible_document_get_document_attributes):
+ (webkit_accessible_document_get_locale):
+
+2009-11-01 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ Turn on warnings for QtWebKit for gcc
+ https://bugs.webkit.org/show_bug.cgi?id=30958
+
+ No new tests as there is no functional change.
+
+ * platform/image-decoders/qt/RGBA32BufferQt.cpp:
+ (WebCore::RGBA32Buffer::RGBA32Buffer): Reorder
+ initialization list to fix compiler warnings.
+
+
+2009-11-01 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Pavel Feldman.
+
+ [Regression] monitorEvent doesn't work
+
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript._ensureCommandLineAPIInstalled):
+
+2009-11-01 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Pavel Feldman.
+
+ Fix Web Inspector: Bug with Message Bubble in Syntax Highlighter
+ https://bugs.webkit.org/show_bug.cgi?id=30990
+
+ * inspector/front-end/SourceFrame.js:
+
+2009-10-31 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by John Sullivan.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30982
+ createHTMLDocument doesn't escape ampersand and less-than in title
+
+ Test: fast/dom/DOMImplementation/createHTMLDocument-title.html
+
+ * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createHTMLDocument):
+ Set document title after creating the document, avoiding parser intricacies.
+
+2009-11-01 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Double clicking on a breakpoints should not select text
+ https://bugs.webkit.org/show_bug.cgi?id=30950
+
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._documentMouseDown):
+
+2009-11-01 Yuta Kitamura <yutak@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix assertion falure in RenderObjectChildList::updateBeforeAfterContent().
+
+ [Crash (debug)] Combination of list-item and :after causes assertion failure
+ https://bugs.webkit.org/show_bug.cgi?id=30944
+
+ Test: fast/css/list-item-pseudo-nocrash.html
+
+ * rendering/RenderObjectChildList.cpp:
+ (WebCore::RenderObjectChildList::updateBeforeAfterContent):
+
+2009-11-01 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30586
+ [GTK] Failing test media/video-src-empty.html
+
+ Correctly set network/ready state depending on GStreamer errors
+ received on the bus.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mediaPlayerPrivateMessageCallback):
+
+2009-10-31 Oliver Hunt <oliver@apple.com>
+
+ Build fix
+
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::attachShader):
+
+2009-10-31 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Remove obsolete null checks from CanvasRenderingContext3DMac
+ https://bugs.webkit.org/show_bug.cgi?id=30983
+
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::attachShader):
+ (WebCore::GraphicsContext3D::bindAttribLocation):
+ (WebCore::GraphicsContext3D::compileShader):
+ (WebCore::GraphicsContext3D::detachShader):
+ (WebCore::GraphicsContext3D::framebufferRenderbuffer):
+ (WebCore::GraphicsContext3D::framebufferTexture2D):
+ (WebCore::GraphicsContext3D::linkProgram):
+ (WebCore::GraphicsContext3D::shaderSource):
+ (WebCore::GraphicsContext3D::useProgram):
+ (WebCore::GraphicsContext3D::validateProgram):
+ (WebCore::GraphicsContext3D::getProgramInfoLog):
+ (WebCore::GraphicsContext3D::getShaderi):
+ (WebCore::GraphicsContext3D::getShaderiv):
+ (WebCore::GraphicsContext3D::getShaderInfoLog):
+ (WebCore::GraphicsContext3D::getShaderSource):
+ (WebCore::GraphicsContext3D::getUniformLocation):
+
+2009-10-31 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ WebGL allows objects to be used with the wrong context
+ https://bugs.webkit.org/show_bug.cgi?id=30981
+
+ Simply add null checks and a few context guards to ensure we don't
+ deref null or attempt to use an object from a different context.
+
+ Tests: fast/canvas/webgl/incorrect-context-object-behaviour.html
+ fast/canvas/webgl/null-object-behaviour.html
+
+ * html/canvas/CanvasRenderingContext3D.cpp:
+ (WebCore::CanvasRenderingContext3D::attachShader):
+ (WebCore::CanvasRenderingContext3D::bindAttribLocation):
+ (WebCore::CanvasRenderingContext3D::bindBuffer):
+ (WebCore::CanvasRenderingContext3D::bindFramebuffer):
+ (WebCore::CanvasRenderingContext3D::bindRenderbuffer):
+ (WebCore::CanvasRenderingContext3D::bindTexture):
+ (WebCore::CanvasRenderingContext3D::compileShader):
+ (WebCore::CanvasRenderingContext3D::detachShader):
+ (WebCore::CanvasRenderingContext3D::framebufferRenderbuffer):
+ (WebCore::CanvasRenderingContext3D::framebufferTexture2D):
+ (WebCore::CanvasRenderingContext3D::getProgrami):
+ (WebCore::CanvasRenderingContext3D::getProgramiv):
+ (WebCore::CanvasRenderingContext3D::getProgramInfoLog):
+ (WebCore::CanvasRenderingContext3D::getShaderi):
+ (WebCore::CanvasRenderingContext3D::getShaderiv):
+ (WebCore::CanvasRenderingContext3D::getShaderInfoLog):
+ (WebCore::CanvasRenderingContext3D::getShaderSource):
+ (WebCore::CanvasRenderingContext3D::getUniformf):
+ (WebCore::CanvasRenderingContext3D::getUniformfv):
+ (WebCore::CanvasRenderingContext3D::getUniformi):
+ (WebCore::CanvasRenderingContext3D::getUniformiv):
+ (WebCore::CanvasRenderingContext3D::getUniformLocation):
+ (WebCore::CanvasRenderingContext3D::isBuffer):
+ (WebCore::CanvasRenderingContext3D::linkProgram):
+ (WebCore::CanvasRenderingContext3D::shaderSource):
+ * html/canvas/CanvasRenderingContext3D.h:
+ * html/canvas/CanvasRenderingContext3D.idl:
+
+2009-10-30 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's MediaQueryResult
+ https://bugs.webkit.org/show_bug.cgi?id=30857
+
+ Inherits MediaQueryResult class from Noncopyable because it is
+ instantiated by 'new' in WebCore/css/CSSStyleSelector.cpp:5984 and
+ it is no need to be copyable.
+
+ * css/CSSStyleSelector.h:
+
+2009-10-30 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's MediaQueryEvaluator
+ https://bugs.webkit.org/show_bug.cgi?id=30854
+
+ Inherits MediaQueryEvaluator class from Noncopyable because it is
+ instantiated by 'new' in WebCore/css/CSSStyleSelector.cpp:401 and
+ it is no need to be copyable.
+
+ * css/MediaQueryEvaluator.h:
+
+2009-10-30 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's CSSRuleSet
+ https://bugs.webkit.org/show_bug.cgi?id=30852
+
+ Inherits CSSRuleSet class from Noncopyable because it is
+ instantiated by 'new' in WebCore/css/CSSStyleSelector.cpp:455 and
+ it is no need to be copyable.
+
+ * css/CSSStyleSelector.cpp:
+
+2009-10-30 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's CSSRuleData
+ https://bugs.webkit.org/show_bug.cgi?id=30851
+
+ Inherits CSSRuleData class from Noncopyable because it is
+ instantiated by 'new' in WebCore/css/CSSStyleSelector.h:320 and
+ it is no need to be copyable.
+
+ * css/CSSStyleSelector.h:
+
+2009-10-30 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's CSSRuleDataList
+ https://bugs.webkit.org/show_bug.cgi?id=30850
+
+ Inherits CSSRuleDataList class from Noncopyable because it has been
+ instantiated by 'new' in WebCore/css/CSSStyleSelector.cpp:2715 and
+ it is no need to be copyable.
+
+ * css/CSSStyleSelector.h:
+
+2009-10-30 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's CSSNamespace
+ https://bugs.webkit.org/show_bug.cgi?id=30849
+
+ Inherits CSSNamespace struct from Noncopyable because it is
+ instantiated by 'new' in WebCore/css/CSSStyleSheet.cpp:141 and
+ it is no need to be copyable.
+
+ * css/CSSNamespace.h:
+
+2009-10-30 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by David Levin.
+
+ Refactor DatabaseTask in preparation for removing threadsafe refcounting from it.
+ Move the synchronizer object out of the DatabaseTask so there is no need to keep
+ the pointer to Databasetask around after passing it to MessageQueue.
+ Also pass the references to return parameters to the task so it can update them.
+ https://bugs.webkit.org/show_bug.cgi?id=30941
+
+ No new tests, since this is just moving the code around, no change in functionality.
+
+ * storage/Database.cpp:
+ (WebCore::Database::Database):
+ (WebCore::Database::openAndVerifyVersion): Use new DatabaseTaskSynchronizer to wait for task completion.
+ (WebCore::Database::markAsDeletedAndClose): Ditto.
+ (WebCore::Database::tableNames): Ditto.
+ (WebCore::Database::stop): Use the boolean flag rather then 'killed' flag built into MessageQueue.
+ (WebCore::Database::scheduleTransaction): Transaction queue is a Deque now, change the way to fetch the transaction.
+ * storage/Database.h: Change the SQLTransaction queue to be a Deque rather then a MessageQueue.
+ * storage/DatabaseTask.cpp:
+ (WebCore::DatabaseTaskSynchronizer::DatabaseTaskSynchronizer):
+ (WebCore::DatabaseTaskSynchronizer::waitForTaskCompletion):
+ (WebCore::DatabaseTaskSynchronizer::taskCompleted):
+ (WebCore::DatabaseTask::DatabaseTask): Ctor takes DatabaseTaskSynchronizer which can be 0.
+ (WebCore::DatabaseTask::performTask): Signal completion. m_synchronizer should still be around since main thread is waiting on it.
+ (WebCore::DatabaseOpenTask::DatabaseOpenTask): Pass synchronizer and return parameters via constructor.
+ (WebCore::DatabaseCloseTask::DatabaseCloseTask): Ditto.
+ (WebCore::DatabaseTransactionTask::DatabaseTransactionTask): Ditto.
+ (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask): Ditto.
+ * storage/DatabaseTask.h:
+ (WebCore::DatabaseOpenTask::create):
+ (WebCore::DatabaseCloseTask::create):
+ (WebCore::DatabaseTransactionTask::create):
+ (WebCore::DatabaseTableNamesTask::create):
+
+2009-10-30 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION: In Mail, Undo does not restore some characters I have deleted at the end of a line
+ https://bugs.webkit.org/show_bug.cgi?id=30955
+ <rdar://problem/7067033>
+
+ When the command is deleteWordBackward or deleteWordForward
+ we should not add to the open typing command, but
+ create a new one.
+
+ Test: editing/undo/undo-deleteWord.html
+
+ * editing/TypingCommand.cpp:
+ (WebCore::TypingCommand::deleteKeyPressed): Always start a new command if the granularity is
+ not CharacterGranularity.
+ (WebCore::TypingCommand::forwardDeleteKeyPressed): Always start a new command if the granularity is
+ not CharacterGranularity.
+
+2009-10-30 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Make MediaPlayer constructor private
+ https://bugs.webkit.org/show_bug.cgi?id=30965
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::loadResource):
+ (WebCore::HTMLMediaElement::finishParsingChildren): Use MediaPlayer::create.
+
+ * platform/graphics/MediaPlayer.h:
+ (WebCore::MediaPlayer::create): New.
+
+2009-10-29 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: Accessibility of headings is not correct
+
+ https://bugs.webkit.org/show_bug.cgi?id=30937
+
+ Reviewed by Alice Liu.
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::stringRoleForMSAA):
+ (WebCore::AccessibilityObject::descriptionForMSAA):
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::shouldReturnTagNameAsRoleForMSAA):
+ If the element's tag name is one of h1, h2, h3, h4, h5, h6, return
+ true.
+ (WebCore::AccessibilityRenderObject::stringRoleForMSAA):
+ If the element should return its tag name as the role, return the tag
+ name.
+ (WebCore::AccessibilityRenderObject::positionalDescriptionForMSAA):
+ If the object is a heading, return the string "L" followed by the
+ heading level.
+ (WebCore::AccessibilityRenderObject::descriptionForMSAA):
+ If the object has a positional description, return it. Otherwise, get
+ the accessibility description, and prefix it with "Description" so that
+ MSAA clients know that it's not a positional description.
+
+ * accessibility/AccessibilityRenderObject.h:
+
+2009-10-29 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: Accessibility of links is wrong
+
+ https://bugs.webkit.org/show_bug.cgi?id=30928
+
+ Reviewed by Darin Adler.
+
+ * accessibility/AccessibilityImageMapLink.cpp:
+ (WebCore::AccessibilityImageMapLink::stringValueForMSAA):
+ Return the URL.
+ (WebCore::AccessibilityImageMapLink::nameForMSAA):
+ Return the alt text.
+
+ * accessibility/AccessibilityImageMapLink.h:
+ (WebCore::AccessibilityImageMapLink::isLinked):
+ Return true.
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::isLinked):
+ (WebCore::AccessibilityObject::stringValueForMSAA):
+ (WebCore::AccessibilityObject::nameForMSAA):
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::isLinkable):
+ Return true if the element is considered "linkable" with respect to
+ accessibility.
+ (WebCore::AccessibilityRenderObject::stringValueForMSAA):
+ If the element is linkable, check whether it has a parent anchor
+ element. If so, return the anchor element's href.
+ (WebCore::AccessibilityRenderObject::isLinked):
+ Return true if the element is linkable and if it's parent anchor tag's
+ href is non-empty.
+ (WebCore::AccessibilityRenderObject::nameForMSAA):
+ For text nodes, return the text.
+
+ * accessibility/AccessibilityRenderObject.h:
+
+2009-10-30 Evan Stade <estade@chromium.org>
+
+ Reviewed by David Levin.
+
+ Notify the chrome when the focused node has changed.
+ https://bugs.webkit.org/show_bug.cgi?id=30832
+
+ This is similar to AX code that is already in place, except that this also informs the
+ chrome when there stops being a focused node. This is needed for a browser to show the
+ anchor for links that have keyboard focus.
+
+ * dom/Document.cpp:
+ (WebCore::Document::setFocusedNode):
+ * loader/EmptyClients.h:
+ (WebCore::EmptyChromeClient::focusedNodeChanged):
+ * page/Chrome.cpp:
+ (WebCore::Chrome::focusedNodeChanged):
+ * page/Chrome.h:
+ * page/ChromeClient.h:
+
+2009-10-30 Ben Murdoch <benm@google.com>
+
+ Reviewed by David Kilzer.
+
+ openDatabase() with empty version sets db version up incorrectly
+ https://bugs.webkit.org/show_bug.cgi?id=28417
+
+ Test: storage/open-database-set-empty-version.html
+
+ * storage/Database.cpp:
+ (WebCore::Database::performOpenAndVerify): Raise an exception if the current database version does not match the expected version when the current version is the empty string.
+
+2009-10-30 John Gregg <johnnyg@google.com>
+
+ Reviewed by David Levin.
+
+ Need to turn off notifications properly at runtime
+ https://bugs.webkit.org/show_bug.cgi?id=30409
+
+ Moving the notificationsEnabled bit from NotificationCenter
+ to the new V8 RuntimeEnabledFeatures object.
+
+ Just moving a bit around, so no new tests.
+
+ * bindings/v8/RuntimeEnabledFeatures.cpp:
+ * bindings/v8/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::setNotificationsEnabled):
+ (WebCore::RuntimeEnabledFeatures::notificationsEnabled):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::ACCESSOR_RUNTIME_ENABLER):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::ACCESSOR_RUNTIME_ENABLER):
+ * notifications/NotificationCenter.cpp:
+ * notifications/NotificationCenter.h:
+
+2009-10-30 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] More cleanup after r49949: remove ListenerGuard.
+ ListenerGuard is no longer needed since EventListeners do not depend on frame or v8 context.
+ https://bugs.webkit.org/show_bug.cgi?id=30943
+
+ Covered by fast/events/add-event-without-document.html which will now pass in Chromium.
+
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::V8AbstractEventListener):
+ (WebCore::V8AbstractEventListener::handleEvent):
+ * bindings/v8/V8AbstractEventListener.h:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getEventListener):
+ * bindings/v8/V8EventListenerList.h:
+ (WebCore::V8EventListenerList::findOrCreateWrapper):
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::V8LazyEventListener):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::V8Proxy):
+ (WebCore::V8Proxy::disconnectFrame):
+ (WebCore::V8Proxy::clearForNavigation):
+ * bindings/v8/V8Proxy.h:
+ * bindings/v8/V8WorkerContextEventListener.cpp:
+ (WebCore::V8WorkerContextEventListener::V8WorkerContextEventListener):
+ (WebCore::V8WorkerContextEventListener::handleEvent):
+ (WebCore::V8WorkerContextEventListener::reportError):
+ * bindings/v8/V8WorkerContextEventListener.h:
+ (WebCore::V8WorkerContextEventListener::create):
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy):
+ (WebCore::WorkerContextExecutionProxy::dispose):
+ (WebCore::WorkerContextExecutionProxy::findOrCreateEventListener):
+ * bindings/v8/WorkerContextExecutionProxy.h:
+ * bindings/v8/custom/V8CustomEventListener.cpp:
+ (WebCore::V8EventListener::V8EventListener):
+ * bindings/v8/custom/V8CustomEventListener.h:
+ (WebCore::V8EventListener::create):
+
+2009-10-30 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ counterValueForElementById should return space-separated string for multiple counters
+ https://bugs.webkit.org/show_bug.cgi?id=30939
+
+ Test: fast/css/counters/counterValueForElementById.html
+
+ * rendering/RenderTreeAsText.cpp:
+ (WebCore::writeCounterValuesFromChildren):
+ (WebCore::counterValueForElement):
+
+2009-10-30 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
+ Reviewed by Gustavo Noronha.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::paint):
+ Add some comments to explain what is happening here.
+
+2009-10-30 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Fix Web Inspector crash on the errors/warnings counter click
+
+ RenderObject::createVisiblePosition(const Position& position)
+ understands "null Positions", so we can construct such a Position manually.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30499
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::positionForPoint):
+
+2009-10-30 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25534
+ [GTK] Objects of ROLE_TABLE should implement the accessible table interface
+
+ Third part of the implementation of AtkTable.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (nameFromChildren):
+ (webkit_accessible_get_name):
+ New convenience function to construct an object's name using the name(s) of
+ any children it has.
+
+ (atk_table_interface_init):
+ (webkit_accessible_table_get_column_description):
+ (webkit_accessible_table_get_row_description):
+ Implemented.
+
+ (webkit_accessible_table_get_column_header):
+ Stub function added so that webkit_accessible_table_get_column_description
+ could be implemented in the meantime.
+
+2009-10-30 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25534
+ [GTK] Objects of ROLE_TABLE should implement the accessible table interface
+
+ Second part of the implementation of AtkTable.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (cellAtIndex):
+ (webkit_accessible_table_get_column_at_index):
+ (webkit_accessible_table_get_row_at_index):
+ (webkit_accessible_table_get_caption):
+ (atk_table_interface_init):
+
+2009-10-30 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Add TimelinePanel into the panels enum.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30915
+
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::showPanel):
+ * inspector/front-end/inspector.js:
+ (WebInspector.showTimelinePanel):
+
+2009-10-30 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Holger Hans Peter Freyther.
+
+ If the owner widget of the page has a palette set, we
+ should use that one. This was only working when the
+ owner was a QWebView. This patch fixes that.
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::applyTheme):
+
+2009-10-30 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed: Wire CookieJarChromium to the cookies
+ backend. This is a final step of a 3-steps raw cookies
+ access implementation in Chromium.
+
+ * platform/network/chromium/CookieJarChromium.cpp:
+ (WebCore::getRawCookies):
+ (WebCore::deleteCookie):
+
+2009-10-30 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Fix Chromium crash in console.log in "deeply recursive" function
+
+ Check that result of 'frameSourceName' is not null handle
+ before casting it to String.
+
+ Allow V8Proxy::sourceName/sourceLineNumber() to report
+ that they have failed due to JavaScript stack overflow.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30904
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/ScriptCallStack.cpp:
+ (WebCore::ScriptCallStack::create):
+ (WebCore::ScriptCallStack::ScriptCallStack):
+ * bindings/v8/ScriptCallStack.h:
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::sourceLineNumber):
+ (WebCore::V8Proxy::sourceName):
+ * bindings/v8/V8Proxy.h:
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-10-30 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's MediaQuery
+ https://bugs.webkit.org/show_bug.cgi?id=30856
+
+ Inherits MediaQuery class from Noncopyable because it is
+ instantiated by 'new' in WebCore/css/CSSParser.cpp:4905 and
+ it is no need to be copyable.
+
+ * css/CSSStyleSelector.h:
+
+2009-10-30 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's MediaQueryExp
+ https://bugs.webkit.org/show_bug.cgi?id=30855
+
+ Inherits MediaQueryExp class from FastAllocBase because it is
+ instantiated by 'new' in WebCore/css/CSSParser.cpp:4874.
+
+ * css/MediaQueryExp.h:
+
+2009-10-30 Roland Steiner <rolandsteiner@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak.
+
+ Bug 28420 - Implement HTML5 <ruby> rendering
+ (https://bugs.webkit.org/show_bug.cgi?id=28420)
+
+ No new tests (no functional change).
+
+ * Configurations/FeatureDefines.xcconfig:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+ * WebCore.vcproj/build-generated-files.sh:
+
+2009-10-30 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Removed test for an impossible condition (a glyph in a right-to-left run not having
+ the RTL flag 0x800)
+
+ * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
+ (WebCore::ComplexTextController::ComplexTextRun::overrideLayoutOperation):
+
+2009-10-29 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Out-of-memory crash in isolated worlds
+ https://bugs.webkit.org/show_bug.cgi?id=30906
+
+ We need to handle the fact that creating a V8:Context might fail. I
+ don't know how to test this change because creating a context usually
+ only fails when V8 decides it's using too much memory.
+
+ * bindings/v8/V8IsolatedWorld.cpp:
+ (WebCore::V8IsolatedWorld::V8IsolatedWorld):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluateInIsolatedWorld):
+ (WebCore::V8Proxy::evaluateInNewContext):
+
+2009-10-29 Erik Arvidsson <arv@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Make links mouse focusable only on GTK and QT.
+
+ Links are now always mouse focusable on GTK and QT. On other platforms
+ the link needs a tabIndex or it needs to be contentEditable.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26856
+
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::isMouseFocusable):
+
+2009-10-29 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Complete the fix for hit-testing and selection highlighting in ligatures for the ATSUI
+ code path.
+
+ * platform/graphics/mac/ComplexTextController.h: Added m_ltr member to ComplexTextRun.
+ * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
+ (WebCore::ComplexTextController::ComplexTextRun::overrideLayoutOperation): Skip over deleted
+ glyphs, but update indexes and advances correctly.
+ (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Initialize m_ltr.
+
+2009-10-29 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(3.2.3 - 4.0.2): Message composing: when I undo a color change to text in Mail, undo/redo behaves strangely
+ <rdar://problem/7115041>
+ https://bugs.webkit.org/show_bug.cgi?id=30892
+
+ This problem shows in any scenario where it is necessary to split a text
+ node to apply a style. SplitElementCommand and WrapContentsInDummySpanCommand both
+ have member variables initialized in the constructor to keep reference to elements
+ they need to operate upon. These reference are not updated when reapplying the command.
+ For this reason it is necessary to guarantee that unapply doesn not delete the references
+ and that these commands implement doReapply to correctly reuse the existing
+ elements.
+
+ Test: editing/undo/redo-style.html
+
+ * editing/SplitElementCommand.cpp:
+ (WebCore::SplitElementCommand::executeApply): Added.
+ (WebCore::SplitElementCommand::doApply): Modified to call executeApply.
+ (WebCore::SplitElementCommand::doUnapply): Doesn't release m_element1.
+ (WebCore::SplitElementCommand::doReapply): Added.
+ * editing/SplitElementCommand.h: Added doReapply and executeApply.
+ * editing/WrapContentsInDummySpanCommand.cpp:
+ (WebCore::WrapContentsInDummySpanCommand::executeApply): Added.
+ (WebCore::WrapContentsInDummySpanCommand::doApply): Modified to call executeApply.
+ (WebCore::WrapContentsInDummySpanCommand::doUnapply): Doesn't release m_dummySpan.
+ (WebCore::WrapContentsInDummySpanCommand::doReapply): Added.
+ * editing/WrapContentsInDummySpanCommand.h: Added doReapply and executeApply.
+
+2009-10-29 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ DOM Storage's condition variable needs to handle spurious wakeups
+ https://bugs.webkit.org/show_bug.cgi?id=30920
+
+ Add a boolean to keep track of whether it's been terminated. Clean
+ up the locking code a tiny bit to make it easier to read. There's
+ no way to reproduce this reliably in a LayoutTest.
+
+ * storage/LocalStorageThread.cpp:
+ (WebCore::LocalStorageThread::LocalStorageThread):
+ (WebCore::LocalStorageThread::terminate):
+ (WebCore::LocalStorageThread::performTerminate):
+ * storage/LocalStorageThread.h:
+
+2009-10-29 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [Chromium] Include ComplextTextController into Chromium Mac project.
+
+ * WebCore.gyp/WebCore.gyp: Added include rule for ComplextText* files.
+
+2009-10-29 Timothy Hatcher <timothy@apple.com>
+
+ Fix tabbing through element attributes in the Web Insector.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30429
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted): Don't call _updateTitle,
+ it is called for us when removeAttribute succeeds in the back-end.
+ (WebInspector.ElementsTreeElement.prototype._textNodeEditingCommitted): Ditto except for nodeValue.
+ (WebInspector.ElementsTreeElement.prototype._editingCancelled): Don't call _updateTitle, editing code reverts.
+ (WebInspector.ElementsTreeElement.prototype._updateTitle): Return early if we are editing.
+
+2009-10-29 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Problem editing or selecting text containing ligatures
+ https://bugs.webkit.org/show_bug.cgi?id=30025
+
+ Test: platform/mac/fast/text/ligature-subdivision.html
+
+ * platform/graphics/mac/ComplexTextController.cpp:
+ (WebCore::ComplexTextController::ComplexTextController): Initialize
+ m_characterInCurrentGlyph.
+ (WebCore::ComplexTextController::offsetForPosition): If the hit glyph spans multiple
+ characters, compute the hit character based on dividing the glyph’s total advance into
+ a number of equal intervals equal to the number of characters and assigning the hit to the
+ character corresponding to the hit interval.
+ (WebCore::ComplexTextController::advance): If the final offset occurs mid-glyph, advance
+ by a fraction of the glyph’s total advance.
+ * platform/graphics/mac/ComplexTextController.h: Added m_characterInCurrentGlyph.
+
+2009-10-29 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <http://webkit.org/b/30918>.
+ Web Inspector: Datagrid Rows on Windows not properly aligned.
+
+ Use line-height for the table rows to make sure the height
+ of our text and the height of the table rows are consistent.
+
+ * inspector/front-end/inspector.css:
+
+2009-10-29 Adam Barth <abarth@webkit.org>
+
+ No review, rolling out r50296.
+ http://trac.webkit.org/changeset/50296
+
+ * bindings/v8/V8IsolatedWorld.cpp:
+ (WebCore::V8IsolatedWorld::V8IsolatedWorld):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluateInIsolatedWorld):
+ (WebCore::V8Proxy::evaluateInNewContext):
+
+2009-10-29 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Out-of-memory crash in isolated worlds
+ https://bugs.webkit.org/show_bug.cgi?id=30906
+
+ We need to handle the fact that creating a V8:Context might fail. I
+ don't know how to test this change because creating a context usually
+ only fails when V8 decides it's using too much memory.
+
+ * bindings/v8/V8IsolatedWorld.cpp:
+ (WebCore::V8IsolatedWorld::V8IsolatedWorld):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluateInIsolatedWorld):
+ (WebCore::V8Proxy::evaluateInNewContext):
+
+2009-10-29 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ Remove build warning introduced by r50284.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::duration):
+
+2009-10-29 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Remove random crashes by removing retrieval of V8 context during garbage collection.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30919
+
+ Unfortunately, I haven't been able to trigger this crash explicitly, so no test :(.
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::jsWrapperForDOMObject): Added new "assume-it's-there" getter.
+ * bindings/v8/V8DOMWrapper.h: Added getter decl.
+ * bindings/v8/V8GCController.cpp:
+ (WebCore::GCPrologueVisitor::visitDOMWrapper): Changed to use explicit getter.
+
+2009-10-29 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [Chromium] Adjust the project files to sync up with
+ http://trac.webkit.org/changeset/50259
+
+ * WebCore.gypi: Renamed and added files.
+
+2009-10-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Implement DELETE HTTP method for XmlHttpRequest
+ https://bugs.webkit.org/show_bug.cgi?id=30894
+
+ No new tests as this functionality is already tested by the
+ xmlhttprequest LayoutTests. As this patch depends on an unreleased
+ version of the dependent QtNetwork library and the tests will be
+ enabled later once the dependent library is released (and the
+ buildbot is updated).
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
+ (WebCore::QNetworkReplyHandler::start):
+
+2009-10-29 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Part of <http://webkit.org/b/30483>.
+ Web Inspector: Always show the Local and Session Storage Views.
+
+ Even if the length of the DOM Storage entry array is 0, still
+ generate the Datagrid because users can add things storage items
+ through the UI, so we should allow them to even if there isn't
+ anything there currently.
+
+ * English.lproj/localizedStrings.js: Removed "This Storage is Empty".
+ * inspector/front-end/DOMStorageItemsView.js:
+ (WebInspector.DOMStorageItemsView.prototype._showDOMStorageEntries):
+
+2009-10-29 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Add TimelinePanel into the panels enum.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30915
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::specialPanelForJSName):
+ * inspector/InspectorController.h:
+ (WebCore::InspectorController::):
+
+2009-10-29 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Oliver Hunt.
+
+ [GTK] Threading problems with some of the tests
+ https://bugs.webkit.org/show_bug.cgi?id=30814
+
+ Create strings shared among threads with crossThreadString
+ constructor method.
+
+ * storage/Database.cpp:
+ (WebCore::Database::Database):
+
+2009-10-29 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
+ Reviewed by Gustavo Noronha.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30308
+
+ Add support for ARGB videos.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::paint):
+ Create the Cairo image surface for ARGB32 or RGB24
+ depending on the buffer's caps.
+
+ * platform/graphics/gtk/VideoSinkGStreamer.cpp:
+ (webkit_video_sink_timeout_func):
+ (webkit_video_sink_render):
+ Handle ARGB video and convert GStreamer's ARGB to
+ Cairo's for displaying.
+
+2009-10-29 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] expose a method to access memory usage information in ChromiumBridge
+ Declare a static method to be implemented by http://codereview.chromium.org/332010/
+ https://bugs.webkit.org/show_bug.cgi?id=30829
+
+ * platform/chromium/ChromiumBridge.h:
+
+2009-10-29 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25679
+ [Gtk] Improve accessibility of focusable lists
+
+ Implements the AtkSelection interface and enables the corresponding
+ (and expected) object:selection-changed event.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (optionFromList):
+ (optionFromSelection):
+ (atk_selection_interface_init):
+ (webkit_accessible_selection_add_selection):
+ (webkit_accessible_selection_clear_selection):
+ (webkit_accessible_selection_ref_selection):
+ (webkit_accessible_selection_get_selection_count):
+ (webkit_accessible_selection_is_child_selected):
+ (webkit_accessible_selection_remove_selection):
+ (webkit_accessible_selection_select_all_selection):
+ (GetAtkInterfaceTypeFromWAIType):
+ * accessibility/gtk/AXObjectCacheAtk.cpp:
+ (AXObjectCache::postPlatformNotification):
+
+2009-10-29 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Bug 30655 - Only plain text should be copied to clipboard for TextArea.
+ https://bugs.webkit.org/show_bug.cgi?id=30655
+
+ * editing/Editor.cpp:
+ (WebCore::nodeIsInTextFormControl):
+ (WebCore::Editor::cut):
+ (WebCore::Editor::copy):
+
+2009-10-29 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: hide timeline for now - not yet ready.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30912
+
+ * inspector/front-end/inspector.js:
+ (WebInspector._createPanels):
+
+2009-10-29 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed: deploy Web Inspector's images in WebCore.gypi.
+
+ * WebCore.gypi:
+
+2009-10-29 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: get rid of timelineProfilerEnabled method.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30911
+
+ * inspector/InspectorBackend.cpp:
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::setWindowVisible):
+ * inspector/InspectorController.h:
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
+
+2009-10-29 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Create stub methods for raw cookies access in ChromiumBridge.h
+
+ https://bugs.webkit.org/show_bug.cgi?id=30910
+
+ * platform/chromium/ChromiumBridge.h:
+
+2009-10-29 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's RareData
+ https://bugs.webkit.org/show_bug.cgi?id=30858
+
+ Inherits RareData struct from Noncopyable because it is
+ instantiated by 'new' in WebCore/css/CSSSelector.h:259 and
+ it is no need to be copyable.
+
+ * css/CSSSelector.h:
+
+2009-10-29 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's ShorthandScope
+ https://bugs.webkit.org/show_bug.cgi?id=30859
+
+ Inherits ShorthandScope class from FastAllocBase because it is
+ instantiated by 'new' in WebCore/css/CSSParser.cpp:902 and
+ it is no need to be copyable.
+
+ * css/CSSParser.h:
+
+2009-10-29 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's AXObjectCache
+ https://bugs.webkit.org/show_bug.cgi?id=30848
+
+ Inherits AXObjectCache class from FastAllocBase because it is
+ instantiated by 'new' in WebCore/dom/Document.cpp:1537 and
+ it is no need to be copyable.
+
+ * accessibility/AXObjectCache.h:
+
+2009-10-28 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Don't run JavaScript URLs in view source mode
+ https://bugs.webkit.org/show_bug.cgi?id=30881
+
+ Just say no.
+
+ Test: http/tests/security/view-source-no-javascript-url.html
+
+ * bindings/ScriptControllerBase.cpp:
+ (WebCore::ScriptController::executeIfJavaScriptURL):
+
+2009-10-29 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed. Fixes style problems pointed out by Evan Martin.
+
+ * platform/gtk/Language.cpp:
+ (WebCore::defaultLanguage):
+
+2009-10-29 Dan Bernstein <mitz@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ 64-bit Leopard build fix after r50259
+
+ * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
+ Declared ATSUTextInserted in 64-bit.
+ (WebCore::fontHasMirroringInfo): Use %d format and cast to int.
+ (WebCore::disableLigatures): Ditto.
+ (WebCore::initializeATSUStyle): Ditto.
+ (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Ditto.
+
+2009-10-29 Dan Bernstein <mitz@apple.com>
+
+ Tiger build fix after r50259
+
+ * platform/graphics/mac/ComplexTextController.h:
+ * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
+
+2009-10-29 Dan Bernstein <mitz@apple.com>
+
+ Attempted Tiger build fix after r50259
+
+ * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
+
+2009-10-28 Steve Falkenburg <sfalken@apple.com>
+
+ Rubber stamped by Mark Rowe.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30899
+ WebKit fails to build release on 32-bit Windows systems
+
+ * WebCore.vcproj/WebCore.vcproj: Excluded files from project.
+ * bindings/js/JSBindingsAllInOne.cpp: Added.
+
+2009-10-28 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Fixed typos in color names.
+
+ * inspector/front-end/Color.js:
+
+2009-10-28 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Share code between the ATSUI- and Core Text-based Font implementations by doing the
+ following:
+ - Generalize CoreTextController as ComplexTextController, keeping the Core Text-specific
+ parts in ComplexTextControllerCoreText.cpp.
+ - Generalize FontMacCoreText as FontComplexTextMac using ComplexTextController
+ - Implement ATSUI-specific parts of ComplexTextController in ComplexTextControllerATSUI.
+ - Remove FontMacATSUI.
+
+ * WebCore.xcodeproj/project.pbxproj: Removed CoreTextController.{cpp,h}, FontMacATSUI.mm,
+ and FontMacCoreText.cpp, and added ComplexTextController.{cpp,h},
+ ComplexTextControllerATSUI.cpp, ComplexTextControllerCoreText.cpp, and
+ FontComplexTextMac.cpp.
+
+ * platform/graphics/mac/ComplexTextController.cpp: Copied from CoreTextController.cpp and
+ kept the non-Core Text-specific bits.
+ (WebCore::ComplexTextController::ComplexTextController): Updated for renames, including
+ its own.
+ (WebCore::ComplexTextController::offsetForPosition): Updated for renames and for
+ m_complexTextRuns holding references instead of objects.
+ (WebCore::ComplexTextController::collectComplexTextRuns): Updated for renames, including
+ its own.
+ (WebCore::ComplexTextController::advance): Updated for renames.
+ (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Updated for renames and for
+ m_complexTextRuns holding references instead of objects, and changed to use the glyphs()
+ and advances() accessors.
+
+ * platform/graphics/mac/ComplexTextController.h: Copied from CoreTextController.h and
+ renamed CoreTextController to ComplexTextController and CoreTextRun to ComplexTextRun. Made
+ the latter RefCounted, added ATSUI-specific members to it, and made some other members
+ Core Text-specific. Renamed m_coreTextRuns to m_complexTextRuns and made it hold references
+ rather than objects.
+ (WebCore::ComplexTextController::ComplexTextRun::create):
+ (WebCore::ComplexTextController::ComplexTextRun::glyphs):
+ (WebCore::ComplexTextController::ComplexTextRun::advances):
+
+ * platform/graphics/mac/ComplexTextControllerATSUI.cpp: Added. Includes ATSUI-specific
+ parts of the ComplexTextController implementation.
+ (WebCore::ComplexTextController::ComplexTextRun::overrideLayoutOperation): This ATSUI
+ callback populates the ComplexTextRun’s glyphs, advances and indices vectors. It is invoked
+ when the ComplexTextRun constructor calls ATSUGetGlyphBounds().
+ (WebCore::isArabicLamWithAlefLigature): Helper function, copied from FontMacATSUI.mm.
+ (WebCore::shapeArabic): Helper function, adapted from FontMacATSUI.mm.
+ (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Sets up the
+ ATSUTextLayout, substituting the text buffer if necessary for things like shaping Arabic,
+ mirroring glyphs or directionality overrides, then calls ATSUGetGlyphBounds() in order to
+ get the glyphs, advances and indices vectors populated.
+ (WebCore::fontHasMirroringInfo): Helper function, copied from FontMacATSUI.mm.
+ (WebCore::disableLigatures): Ditto.
+ (WebCore::initializeATSUStyle): Ditto, somewhat cleaned up and simplified.
+ (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Constructs
+ ComplexTextRuns, either missing-glyphs ones or ATSUTextLayout-based ones.
+
+ * platform/graphics/mac/ComplexTextControllerCoreText.cpp: Copied from
+ CoreTextController.cpp and kept the Core Text-specific bits.
+ (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Updated for renames,
+ including its own, and moved the code to initialize m_glyphs and m_advances here. Previously
+ this was done in adjustGlyphsAndAdvances().
+ (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Updated for renames,
+ including its own.
+ * platform/graphics/mac/CoreTextController.cpp: Removed.
+ * platform/graphics/mac/CoreTextController.h: Removed.
+ * platform/graphics/mac/FontComplexTextMac.cpp: Renamed FontMacCoreText.cpp to this.
+ (WebCore::Font::selectionRectForComplexText): Changed to use ComplexTextController instead
+ of CoreTextController.
+ (WebCore::Font::drawComplexText): Ditto.
+ (WebCore::Font::floatWidthForComplexText): Ditto.
+ (WebCore::Font::offsetForPositionForComplexText): Ditto.
+ * platform/graphics/mac/FontMacATSUI.mm: Removed.
+ * platform/graphics/mac/FontMacCoreText.cpp: Removed.
+
+2009-10-27 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ WAI-ARIA: add support for 'option' role
+ https://bugs.webkit.org/show_bug.cgi?id=30843
+
+ Test: accessibility/aria-option-role.html
+
+ * accessibility/AccessibilityListBoxOption.h:
+ (WebCore::AccessibilityListBoxOption::canHaveChildren):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::RoleEntry::):
+ (WebCore::AccessibilityRenderObject::canHaveChildren):
+
+2009-10-28 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix GCC compiler warnings in WebCore, and enable -Wall and -Werror for Chromium build.
+ https://bugs.webkit.org/show_bug.cgi?id=30716
+
+ * WebCore.gyp/WebCore.gyp: Enable "chromium_code" flag, just on Mac build for now.
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::createARIARoleMap): Fix struct visibiity warning.
+ * bindings/v8/ScriptCallStack.h: Fix out-of-order member initialization warning.
+ * bindings/v8/V8Collection.h:
+ (WebCore::getV8Object): Function in header should not be 'static' (fixes unused-static warning.)
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertNewNodeToV8Object): Fix signed/unsigned comparison warning.
+ * bindings/v8/V8GCController.cpp:
+ (WebCore::ObjectGrouperVisitor::applyGrouping): Fix unused-variable warning.
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Enable ListButtonPart case to avoid
+ warning about missing cases in 'switch' statement.
+ * editing/EditorCommand.cpp:
+ (WebCore::createCommandMap): Fix struct visibiity warning.
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::State::State): Fix out-of-order member initialization warning.
+ * rendering/RenderMediaControlsChromium.cpp:
+ (WebCore::RenderMediaControlsChromium::shouldRenderMediaControlPart): Add empty 'default' case in
+ 'switch' statement to avoid missing-case warning.
+ (WebCore::RenderMediaControlsChromium::paintMediaControlsPart): Ditto.
+ * xml/XPathFunctions.cpp:
+ (WebCore::XPath::createFunctionMap): Fix struct visibiity warning.
+
+2009-10-29 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION: crashes in WebCore::RedirectScheduler::timerFired(WebCore::Timer<WebCore::RedirectScheduler>*)
+ https://bugs.webkit.org/show_bug.cgi?id=30839
+
+ Added null check for the case when the frame is detached from the page.
+
+ * loader/RedirectScheduler.cpp:
+ (WebCore::RedirectScheduler::timerFired):
+
+2009-10-28 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30817
+ Use parentObjectUnignored instead of parentObject in webkit_accessible_get_parent
+
+ Also removes the hack I had originally added to solve bug 25411, because
+ the fix here is what I should have done in the first place.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (webkit_accessible_get_parent):
+
+2009-10-28 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30805
+ Add MessageQueue::removeIf(Predicate&) to remove certain tasks without pulling them from the queue.
+ Existing Database tests cover this, no change in functionality.
+
+ * storage/DatabaseThread.cpp:
+ (WebCore::SameDatabasePredicate::SameDatabasePredicate): Added predicate that flags the tasks belonging to a specified database.
+ (WebCore::SameDatabasePredicate::operator()):
+ (WebCore::DatabaseThread::unscheduleDatabaseTasks): changed to use the new removeIf method.
+
+2009-10-28 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Glue subsequent timeline records with same category
+ and title together.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30885
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype.addRecordToTimeline):
+ (WebInspector.TimelinePanel.prototype._formatRecord):
+ (WebInspector.TimelineRecordTreeElement.prototype.onattach):
+ (WebInspector.TimelineRecordTreeElement.prototype.refresh):
+
+2009-10-28 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Fails new test fast/js/navigator-language.html
+ https://bugs.webkit.org/show_bug.cgi?id=30440
+
+ Reimplement WebCore::defaultLanguage to account for changes in
+ locale done by setLocale.
+
+ Already existing test: fast/js/navigator-language.html
+
+ * platform/gtk/Language.cpp:
+ (WebCore::defaultLanguage):
+
+2009-10-28 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7303145>
+ Can't exit full screen mode or restart movie after pressing command -R.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::removedFromDocument):
+ (WebCore::HTMLMediaElement::documentWillBecomeInactive):
+ Exit from fullscreen if necessary.
+ * html/HTMLMediaElement.h:
+
+2009-10-28 Alexey Proskuryakov <ap@apple.com>
+
+ Unreviewed - a trivial fix to get Windows bots running.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30841
+ <rdar://problem/7342730> WebKit should not pass Referer header through a redirect to a non-secure site
+
+ * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::setHeaderFields): Don't try to
+ access empty vector's data.
+
+2009-10-28 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25897
+ [Gtk] Extraneous object of ROLE_PANEL in hierarchy for entries
+
+ Remove the extraneous object of ROLE_PANEL.
+
+ * accessibility/gtk/AccessibilityObjectAtk.cpp:
+ (AccessibilityObject::accessibilityPlatformIncludesObject):
+
+2009-10-28 Jonathan Dixon <joth@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Bug 30547: (Chromium) searchbox not rendered properly due to the css property -webkit-border-radius
+ https://bugs.webkit.org/show_bug.cgi?id=30547
+
+ Test: fast/css/text-input-with-webkit-border-radius.html
+
+ * rendering/RenderThemeChromiumWin.cpp:
+ (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
+ Implemented rounded border rendering in Chromium Windows theme renderer.
+
+2009-10-28 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Pull items collections from resources panel and
+ timeline panel into AbstractTimelinePanel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30875
+
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel):
+ (WebInspector.AbstractTimelinePanel.prototype.populateSidebar):
+ (WebInspector.AbstractTimelinePanel.prototype.createItemTreeElement):
+ (WebInspector.AbstractTimelinePanel.prototype.createItemGraph):
+ (WebInspector.AbstractTimelinePanel.prototype._showCategory):
+ (WebInspector.AbstractTimelinePanel.prototype._hideCategory):
+ (WebInspector.AbstractTimelinePanel.prototype.filter):
+ (WebInspector.AbstractTimelinePanel.prototype._createGraph):
+ (WebInspector.AbstractTimelinePanel.prototype.updateMainViewWidth):
+ (WebInspector.AbstractTimelinePanel.prototype.refresh):
+ (WebInspector.AbstractTimelinePanel.prototype.reset):
+ (WebInspector.AbstractTimelinePanel.prototype.get calculator):
+ (WebInspector.AbstractTimelinePanel.prototype.set calculator):
+ (WebInspector.AbstractTimelinePanel.prototype.addItem):
+ (WebInspector.AbstractTimelinePanel.prototype.removeItem):
+ (WebInspector.AbstractTimelinePanel.prototype.refreshItem):
+ (WebInspector.AbstractTimelinePanel.prototype.revealAndSelectItem):
+ (WebInspector.AbstractTimelinePanel.prototype.sortItems):
+ (WebInspector.AbstractTimelinePanel.prototype.adjustScrollPosition):
+ (WebInspector.AbstractTimelineCategory):
+ (WebInspector.AbstractTimelineCategory.prototype.toString):
+ * inspector/front-end/ResourceCategory.js:
+ (WebInspector.ResourceCategory):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel):
+ (WebInspector.ResourcesPanel.prototype.createItemTreeElement):
+ (WebInspector.ResourcesPanel.prototype.createItemGraph):
+ (WebInspector.ResourcesPanel.prototype.isCategoryVisible):
+ (WebInspector.ResourcesPanel.prototype.populateSidebar):
+ (WebInspector.ResourcesPanel.prototype.get searchableViews):
+ (WebInspector.ResourcesPanel.prototype.get searchResultsSortFunction.sortFuction):
+ (WebInspector.ResourcesPanel.prototype.get searchResultsSortFunction):
+ (WebInspector.ResourcesPanel.prototype.searchMatchFound):
+ (WebInspector.ResourcesPanel.prototype.searchCanceled):
+ (WebInspector.ResourcesPanel.prototype.performSearch):
+ (WebInspector.ResourcesPanel.prototype.refresh):
+ (WebInspector.ResourcesPanel.prototype.reset):
+ (WebInspector.ResourcesPanel.prototype.removeResource):
+ (WebInspector.ResourcesPanel.prototype.addMessageToResource):
+ (WebInspector.ResourcesPanel.prototype.clearMessages):
+ (WebInspector.ResourcesPanel.prototype.refreshResource):
+ (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded):
+ (WebInspector.ResourcesPanel.prototype.showResource):
+ (WebInspector.ResourcesPanel.prototype._sortResourcesIfNeeded):
+ (WebInspector.ResourcesPanel.prototype._toggleLargerResources):
+ (WebInspector.ResourcesPanel.prototype._toggleResourceTracking):
+ (WebInspector.ResourcesPanel.prototype.get _resources):
+ (WebInspector.ResourceTimeCalculator.prototype._upperBound):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel):
+ (WebInspector.TimelinePanel.prototype.get categories):
+ (WebInspector.TimelinePanel.prototype.populateSidebar):
+ (WebInspector.TimelinePanel.prototype.addRecordToTimeline):
+ (WebInspector.TimelinePanel.prototype.createItemTreeElement):
+ (WebInspector.TimelinePanel.prototype.createItemGraph):
+ (WebInspector.TimelinePanel.prototype._formatRecord):
+ (WebInspector.TimelineCategory):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.html:
+
+2009-10-28 Kelly Norton <knorton@google.com>
+
+ Reviewed by Pavel Feldman.
+
+ Resets InspectorFrontend in InspectorTimelineAgent instead of removing it so
+ that it remains active on refreshs and page transitions.
+ https://bugs.webkit.org/show_bug.cgi?id=30874
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::setFrontendProxyObject):
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::resetFrontendProxyObject):
+ * inspector/InspectorTimelineAgent.h:
+
+2009-10-27 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Provide a way to get counter values with layoutTestContoller
+ https://bugs.webkit.org/show_bug.cgi?id=30555
+
+ Expose WebCore::counterValueForElement as a WebCore API.
+
+ * WebCore.base.exp:
+ * rendering/RenderTreeAsText.cpp:
+ (WebCore::writeCounterValuesFromChildren):
+ (WebCore::counterValueForElement):
+ * rendering/RenderTreeAsText.h:
+
+2009-10-28 Nate Chapin <japhet@chromium.org>
+
+ Unreviewed, Chromium build fix for r50225.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::defaultObjectContentType):
+
+2009-10-28 Eric Z. Ayers <zundel@google.com>
+
+ Reviewed by Pavel Feldman.
+
+ Adds InspectorTimelineAgent instrumentation for encountering a
+ <SCRIPT> tag when parsing an HTML document.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30861
+
+ * bindings/js/ScriptSourceCode.h:
+ (WebCore::ScriptSourceCode::ScriptSourceCode):
+ (WebCore::ScriptSourceCode::startLine):
+ (WebCore::ScriptSourceCode::url):
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::scriptHandler):
+ (WebCore::HTMLTokenizer::scriptExecution):
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::willLoadXHR):
+ (WebCore::InspectorTimelineAgent::willScriptTag):
+ (WebCore::InspectorTimelineAgent::didScriptTag):
+ * inspector/InspectorTimelineAgent.h:
+ (WebCore::):
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createScriptTagTimelineRecord):
+ * inspector/TimelineRecordFactory.h:
+ * inspector/front-end/TimelineAgent.js:
+
+2009-10-28 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Adler.
+
+ Makes sure that Geolocation watch IDs remain positive on overflow.
+ https://bugs.webkit.org/show_bug.cgi?id=30122
+
+ No new tests possible.
+
+ * page/Geolocation.cpp: Modified.
+ (WebCore::Geolocation::watchPosition): Modified. Reset the watch ID to 1 on overflow.
+
+2009-10-28 George Staikos <george.staikos@torchmobile.com>
+
+ Attempt to fix the Mac debug build after 50225.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::defaultObjectContentType):
+
+2009-10-28 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30841
+ <rdar://problem/7342730> WebKit should not pass Referer header through a redirect to a non-secure site
+
+ Tests: http/tests/ssl/referer-301.html
+ http/tests/ssl/referer-303.html
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
+ Remove Referer header if redirecting from https to another protocol.
+
+ * platform/network/ResourceRequestBase.cpp:
+ (WebCore::ResourceRequestBase::clearHTTPReferrer): Update request counterparts, as it is
+ always done when changing or adding header fields.
+ (WebCore::ResourceRequestBase::clearHTTPOrigin): Ditto.
+
+ * platform/network/ResourceRequestBase.h: clearHTTPReferrer() and clearHTTPOrigin() are
+ no longer inline, since they have non-trivial implementations.
+
+ * platform/network/mac/ResourceRequestMac.mm:
+ (WebCore::ResourceRequest::doUpdatePlatformRequest): Fixed to synchronize header field removals.
+ (WebCore::ResourceRequest::doUpdateResourceRequest): Ditto.
+
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::willSendRequest):
+ * platform/network/cf/ResourceRequestCFNet.cpp:
+ (WebCore::setHeaderFields):
+ (WebCore::ResourceRequest::doUpdatePlatformRequest):
+ (WebCore::ResourceRequest::doUpdateResourceRequest):
+ Match Mac changes.
+
+2009-10-28 Joe Mason <jmason@rim.com>
+
+ Reviewed by Adam Treat.
+
+ Add FrameLoader::defaultObjectContentType, containing common code for
+ implementing FrameLoaderClient::objectContentType. (Currently the gtk
+ and win ports have copied this code, and the qt port uses similar code
+ with a few extra clauses. Moving this to a utility function cuts down
+ on copied code.) This causes no behavioural change.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30868
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::defaultObjectContentType):
+ * loader/FrameLoader.h:
+
+2009-10-28 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] QWebHistory::saveState() is inconsistent with the Qt API
+ https://bugs.webkit.org/show_bug.cgi?id=30710
+
+ Enforce the versioning, by ignoring any version different
+ from 1.
+
+ * history/qt/HistoryItemQt.cpp:
+ (WebCore::HistoryItem::restoreState):
+ (WebCore::HistoryItem::saveState):
+
+2009-10-28 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed: follow up fix to InspectorControllerStub.
+ Define it after inspector.js due to namespace
+
+ https://bugs.webkit.org/show_bug.cgi?id=30866
+
+ * inspector/front-end/inspector.html:
+
+2009-10-28 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Add InspectorController stub in order to
+ support opening in standalone mode.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30866
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/InspectorControllerStub.js: Added.
+ (.WebInspector.InspectorControllerStub):
+ (.WebInspector.InspectorControllerStub.prototype.wrapCallback):
+ (.WebInspector.InspectorControllerStub.prototype.isWindowVisible):
+ (.WebInspector.InspectorControllerStub.prototype.platform):
+ (.WebInspector.InspectorControllerStub.prototype.closeWindow):
+ (.WebInspector.InspectorControllerStub.prototype.attach):
+ (.WebInspector.InspectorControllerStub.prototype.detach):
+ (.WebInspector.InspectorControllerStub.prototype.storeLastActivePanel):
+ (.WebInspector.InspectorControllerStub.prototype.clearMessages):
+ (.WebInspector.InspectorControllerStub.prototype.searchingForNode):
+ (.WebInspector.InspectorControllerStub.prototype.search):
+ (.WebInspector.InspectorControllerStub.prototype.toggleNodeSearch):
+ (.WebInspector.InspectorControllerStub.prototype.setAttachedWindowHeight):
+ (.WebInspector.InspectorControllerStub.prototype.moveByUnrestricted):
+ (.WebInspector.InspectorControllerStub.prototype.addResourceSourceToFrame):
+ (.WebInspector.InspectorControllerStub.prototype.addSourceToFrame):
+ (.WebInspector.InspectorControllerStub.prototype.getResourceDocumentNode):
+ (.WebInspector.InspectorControllerStub.prototype.highlightDOMNode):
+ (.WebInspector.InspectorControllerStub.prototype.hideDOMNodeHighlight):
+ (.WebInspector.InspectorControllerStub.prototype.inspectedWindow):
+ (.WebInspector.InspectorControllerStub.prototype.loaded):
+ (.WebInspector.InspectorControllerStub.prototype.localizedStringsURL):
+ (.WebInspector.InspectorControllerStub.prototype.windowUnloading):
+ (.WebInspector.InspectorControllerStub.prototype.hiddenPanels):
+ (.WebInspector.InspectorControllerStub.prototype.debuggerEnabled):
+ (.WebInspector.InspectorControllerStub.prototype.enableResourceTracking):
+ (.WebInspector.InspectorControllerStub.prototype.disableResourceTracking):
+ (.WebInspector.InspectorControllerStub.prototype.resourceTrackingEnabled):
+ (.WebInspector.InspectorControllerStub.prototype.enableDebugger):
+ (.WebInspector.InspectorControllerStub.prototype.disableDebugger):
+ (.WebInspector.InspectorControllerStub.prototype.addBreakpoint):
+ (.WebInspector.InspectorControllerStub.prototype.removeBreakpoint):
+ (.WebInspector.InspectorControllerStub.prototype.updateBreakpoint):
+ (.WebInspector.InspectorControllerStub.prototype.pauseInDebugger):
+ (.WebInspector.InspectorControllerStub.prototype.pauseOnExceptions):
+ (.WebInspector.InspectorControllerStub.prototype.setPauseOnExceptions):
+ (.WebInspector.InspectorControllerStub.prototype.resumeDebugger):
+ (.WebInspector.InspectorControllerStub.prototype.profilerEnabled):
+ (.WebInspector.InspectorControllerStub.prototype.enableProfiler):
+ (.WebInspector.InspectorControllerStub.prototype.disableProfiler):
+ (.WebInspector.InspectorControllerStub.prototype.startProfiling):
+ (.WebInspector.InspectorControllerStub.prototype.stopProfiling):
+ (.WebInspector.InspectorControllerStub.prototype.getProfileHeaders):
+ (.WebInspector.InspectorControllerStub.prototype.getProfile):
+ (.WebInspector.InspectorControllerStub.prototype.takeHeapSnapshot):
+ (.WebInspector.InspectorControllerStub.prototype.databaseTableNames):
+ (.WebInspector.InspectorControllerStub.prototype.stepIntoStatementInDebugger):
+ (.WebInspector.InspectorControllerStub.prototype.stepOutOfFunctionInDebugger):
+ (.WebInspector.InspectorControllerStub.prototype.stepOverStatementInDebugger):
+ (.WebInspector.InspectorControllerStub.prototype.setSetting):
+ (.WebInspector.InspectorControllerStub.prototype.dispatchOnInjectedScript):
+ (.WebInspector.InspectorControllerStub.prototype.releaseWrapperObjectGroup):
+ (.WebInspector.InspectorControllerStub.prototype.setting):
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector.UIString):
+
+2009-10-28 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25897
+ [Gtk] Extraneous object of ROLE_PANEL in hierarchy for entries
+
+ Expands upon the new funtionality which allows platforms to indicate
+ that a particular object should not be ignored, so that they can
+ specify that an object should be ignored or that it should be left up
+ to the default handling to decide.
+
+ * accessibility/AccessibilityObject.h:
+ * accessibility/chromium/AccessibilityObjectChromium.cpp:
+ * accessibility/gtk/AccessibilityObjectAtk.cpp:
+ * accessibility/mac/AccessibilityObjectMac.mm:
+ * accessibility/qt/AccessibilityObjectQt.cpp:
+ * accessibility/win/AccessibilityObjectWin.cpp:
+ * accessibility/wx/AccessibilityObjectWx.cpp:
+ (AccessibilityObject::accessibilityPlatformIncludesObject):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (AccessibilityRenderObject::accessibilityIsIgnored):
+
+
+2009-10-28 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25534
+ [GTK] Objects of ROLE_TABLE should implement the accessible table interface
+
+ Expose the table summary as the accessible description because there is no summary object.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (webkit_accessible_get_description):
+
+2009-10-28 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Adds ScriptController::intializeThreading(), with both JSC and V8 implementations.
+ https://bugs.webkit.org/show_bug.cgi?id=30678
+
+ This new method is used from common code, rather than calling JSC::initializeThreading() (or the V8 equivalent) directly.
+
+ Build fix, no new tests required.
+
+ * bindings/js/ScriptController.cpp: Modified.
+ (WebCore::ScriptController::initializeThreading): Added.
+ * bindings/js/ScriptController.h: Modified. Adds ScriptController::initializeThreading().
+ * bindings/v8/ScriptController.cpp: Modified.
+ (WebCore::ScriptController::initializeThreading): Added.
+ * bindings/v8/ScriptController.h: Modified. Adds ScriptController::initializeThreading().
+ * loader/icon/IconDatabase.cpp: Modified.
+ (WebCore::iconDatabase): Call ScriptController::initializeThreading(), rather than JSC::initializeThreading().
+ * storage/Database.cpp: Modified.
+ (WebCore::Database::Database): Call ScriptController::initializeThreading(), rather than JSC::initializeThreading().
+
+2009-10-26 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Darin Adler.
+
+ Document a feature of the m_liveDecodedResources list.
+ https://bugs.webkit.org/show_bug.cgi?id=30209
+
+ The code made the assumption that the list is sorted by
+ the m_lastDecodedAccessTime property of the CachedResource.
+ The above is not true when CachedResource::setDecodedSize
+ is called and the item is inserted the first time. In this
+ case the m_lastDecodedAccessTime is still zero and the
+ m_liveDecodedResources list becomes unsorted.
+
+ It is impossible that Cache::pruneLiveResources will
+ stop to process the list too early due this feature and
+ the alternatives of updating m_lastDecodedAccessTime in
+ CachedResource::setDecodedSize or changing the insert
+ to search the right position have a negative impact on
+ performance. The best solution for now is to document
+ this feature.
+
+ * loader/Cache.cpp:
+ (WebCore::Cache::pruneLiveResources):
+ * loader/CachedResource.cpp:
+ (WebCore::CachedResource::setDecodedSize):
+
+2009-10-28 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ [Gtk] Extraneous object of ROLE_PANEL in hierarchy for entries
+ https://bugs.webkit.org/show_bug.cgi?id=25897
+
+ Make text controls always implement the text interface, and the
+ editable text interface when they are not read only. This is what
+ ATK-users expect.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (getInterfaceMaskFromObject):
+
+2009-10-27 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Fraser.
+
+ Change HitTestResult methods to use (3d) transformation aware methods
+ https://bugs.webkit.org/show_bug.cgi?id=27347
+
+ The current HitTestResult methods are not using the (3d)
+ transformation aware routines. This can lead to an assertion
+ SVGRenderBase::mapLocalToContainer method.
+
+ Change HitTestResult::imageRect to use the (3d) transformation
+ aware RenderBox::absoluteContentQuad to avoid running into
+ an assertion with SVG content.
+
+ Remove HitTestResult::boundingBox() as it is only used in
+ two places and conceptually doesn't belong into a HitTest
+ which is operating on points.
+
+ A classic test case is not possible as the methods are not excercised
+ from within HTML/SVG but from the WebKit API Layer. A unittest
+ for Qt/Gtk+/Mac would need to be written but Qt/Gtk+ currently
+ do not support 3d transformations making it impossible to write
+ a reliable test case and the Mac port is currently not doing
+ unit testing.
+
+
+ * rendering/HitTestResult.cpp: Remove boundingBox() method
+ (WebCore::HitTestResult::imageRect): Use transformation aware method
+ * rendering/HitTestResult.h: Remove boundingBox()
+
+2009-10-26 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Custom Cursor doesn't use hotspot.
+ https://bugs.webkit.org/show_bug.cgi?id=30820
+
+ Cursors loaded from a QPixmap didn't specifiy the
+ hotspot. Take the hotspot values from the mac
+ implementation.
+
+ * platform/qt/CursorQt.cpp:
+
+2009-10-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Initial revision of the Timeline grid.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30834
+
+ * English.lproj/localizedStrings.js:
+ * WebCore.gypi:
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype.populateSidebar):
+ (WebInspector.AbstractTimelinePanel.prototype.refresh):
+ (WebInspector.AbstractTimelineCalculator):
+ * inspector/front-end/Images/timelineBarBlue.png: Added.
+ * inspector/front-end/Images/timelineBarGray.png: Added.
+ * inspector/front-end/Images/timelineBarGreen.png: Added.
+ * inspector/front-end/Images/timelineBarOrange.png: Added.
+ * inspector/front-end/Images/timelineBarPurple.png: Added.
+ * inspector/front-end/Images/timelineBarRed.png: Added.
+ * inspector/front-end/Images/timelineBarYellow.png: Added.
+ * inspector/front-end/Images/timelineCheckmarks.png: Added.
+ * inspector/front-end/Images/timelineDots.png: Added.
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceTimeCalculator):
+ (WebInspector.ResourceTransferSizeCalculator):
+ * inspector/front-end/TimelineAgent.js:
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel):
+ (WebInspector.TimelinePanel.prototype.get statusBarItems):
+ (WebInspector.TimelinePanel.prototype.get categories):
+ (WebInspector.TimelinePanel.prototype.populateSidebar):
+ (WebInspector.TimelinePanel.prototype._createStatusbarButtons):
+ (WebInspector.TimelinePanel.prototype.addItemToTimeline):
+ (WebInspector.TimelinePanel.prototype.refresh):
+ (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClick):
+ (WebInspector.TimelinePanel.prototype.reset):
+ (WebInspector.TimelinePanel.prototype._formatRecord):
+ (WebInspector.TimelinePanel.prototype.showCategory):
+ (WebInspector.TimelinePanel.prototype.hideCategory):
+ (WebInspector.TimelineRecordTreeElement):
+ (WebInspector.TimelineRecordTreeElement.prototype.onattach):
+ (WebInspector.TimelineCalculator):
+ (WebInspector.TimelineCalculator.prototype.computeBarGraphPercentages):
+ (WebInspector.TimelineCalculator.prototype.computePercentageFromEventTime):
+ (WebInspector.TimelineCalculator.prototype.computeBarGraphLabels):
+ (WebInspector.TimelineCalculator.prototype.updateBoundaries):
+ (WebInspector.TimelineCalculator.prototype.formatValue):
+ (WebInspector.TimelineGraph):
+ (WebInspector.TimelineGraph.prototype.get graphElement):
+ (WebInspector.TimelineGraph.prototype.refreshLabelPositions):
+ (WebInspector.TimelineGraph.prototype.refresh):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.js:
+ (WebInspector._createPanels):
+
+2009-10-27 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Move runAfterPendingDispatches to TestController for Clarity
+ https://bugs.webkit.org/show_bug.cgi?id=30844
+
+ * inspector/front-end/TestController.js:
+ (WebInspector.TestController.prototype.runAfterPendingDispatches):
+ * inspector/front-end/inspector.js: moved runAfterPendingDispatches
+
+2009-10-27 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add missing forward declaration of FramelessScrollView.
+ https://bugs.webkit.org/show_bug.cgi?id=30824
+
+ * platform/chromium/FramelessScrollViewClient.h:
+
+2009-10-27 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ WAI-ARIA: add support for 'presentation' role
+ https://bugs.webkit.org/show_bug.cgi?id=30806
+
+ Test: accessibility/aria-presentational-role.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
+ (WebCore::RoleEntry::):
+
+2009-10-27 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ ARIA menu/menu item need AXRoleDescription
+ https://bugs.webkit.org/show_bug.cgi?id=30804
+
+ Make sure that role descriptions will default to the system's first, before
+ returning an unknown role.
+
+ Test: platform/mac/accessibility/aria-menu-role-descriptions.html
+
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper roleDescription]):
+
+2009-10-27 Geoffrey Garen <ggaren@apple.com>
+
+ Qt build fix: migrated away from API that no longer exists.
+
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::convertQVariantToValue):
+
+2009-10-27 Geoffrey Garen <ggaren@apple.com>
+
+ Qt build fix: migrated away from API that no longer exists.
+
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::convertValueToQVariant):
+
+2009-10-27 Oliver Hunt <oliver@apple.com>
+
+ Fix wording in comment.
+
+ * bridge/objc/objc_instance.mm:
+ (allocateAutoReleasePool):
+
+2009-10-27 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Crash occurs after launching Newsfire 1.6 for the first time
+ https://bugs.webkit.org/show_bug.cgi?id=30807
+
+ We allocate an autorelease pool but then store it off the stack. In a
+ GC environment this led to it being collected, and thus caused badness
+ to ensue. To work around this we simply avoid using a pool at all in
+ a GC environment as it would be a no-op anyway.
+
+ * bridge/objc/objc_instance.mm:
+ (allocateAutoReleasePool):
+ (ObjcInstance::virtualBegin):
+
+2009-10-27 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Adler.
+
+ When a Geolocation method is called, immediately calls the error calback asynchronously if permissions
+ have already been denied.
+ https://bugs.webkit.org/show_bug.cgi?id=27944.
+
+ Tests: fast/dom/Geolocation/permission-denied-already-error.html
+ fast/dom/Geolocation/permission-denied-already-success.html
+
+ * page/Geolocation.cpp: Modified.
+ (WebCore::Geolocation::GeoNotifier::GeoNotifier): Modified. GeoNotifier takes Geolocation object as constructor argument.
+ (WebCore::Geolocation::GeoNotifier::setFatalError): Added. Sets a fatal error for this notifier, causing it to terminate immediately and call the error callback asynchronously.
+ (WebCore::Geolocation::GeoNotifier::timerFired): Added. Used to call the error callback asynchronously on fatal error.
+ (WebCore::Geolocation::getCurrentPosition): Modified. Calls startRequest.
+ (WebCore::Geolocation::watchPosition): Modified. Calls startRequest.
+ (WebCore::Geolocation::startRequest): Added. Common functionality for starting a one-shot or watch request. Sets a fatal error on the notifier if permissions have already been denied.
+ (WebCore::Geolocation::fatalErrorOccurred): Added. Registers that a notifier has encountered a fatal error and should be destroyed.
+ (WebCore::Geolocation::setIsAllowed): Modified. Uses a standard error message for the error callback when permissions are denied.
+ * page/Geolocation.h: Modified.
+ (WebCore::Geolocation::isDenied): Added. Determines whether permissions have been denied.
+
+2009-10-27 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fixed a bug where I was using the wrong Canvas pointer to do a cross-domain check
+ https://bugs.webkit.org/show_bug.cgi?id=30840
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::drawImage):
+
+2009-10-27 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVGStyledElement::getPresentationAttribute() can return a shared CSSValue (some SVG tests randomly fail on the bot, and in release builds)
+ https://bugs.webkit.org/show_bug.cgi?id=29620
+
+ SVG was modifying CSSValues cached of off CSSMappedAttributeDeclarations.
+ This patch fixes the check to make sure that a new CSSMappedAttributeDeclaration is
+ created before returning a CSSValue that JavaScript can modify.
+
+ Test: svg/dom/getPresentationAttribute-cache-corruption.svg
+
+ * svg/SVGStyledElement.cpp:
+ (WebCore::SVGStyledElement::getPresentationAttribute):
+
+2009-10-27 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Incomplete repaint of text field in relative positioned inline at imdb.com
+ https://bugs.webkit.org/show_bug.cgi?id=30047
+
+ Test: fast/repaint/inline-relative-positioned.html
+
+ Implemented offsetFromContainer(), mapLocalToContainer() and
+ mapAbsoluteToLocalPoint() in RenderInline.
+
+ * rendering/RenderBox.h: Fixed argument names in the declaration of
+ mapLocalToContainer().
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::offsetFromContainer):
+ (WebCore::RenderInline::mapLocalToContainer):
+ (WebCore::RenderInline::mapAbsoluteToLocalPoint):
+ * rendering/RenderInline.h:
+
+2009-10-27 Jeremy Orlow <jorlow@chromium.org>
+
+ Speculative build fix for Chromium.
+
+ * platform/graphics/GraphicsContext3D.h:
+
+2009-10-27 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Make WebGL context failure more robust and make it succeed in more cases
+ https://bugs.webkit.org/show_bug.cgi?id=30349
+
+ Bubble a failure to get a CGLContext up to HTMLContextElement so it can
+ return null from getContext. Also added a more robust pixel format choosing
+ mechanism and can render correctly when a SW renderer is chosen.
+
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::getContext):
+ * html/canvas/CanvasRenderingContext.h:
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ * html/canvas/CanvasRenderingContext3D.cpp:
+ * html/canvas/CanvasRenderingContext3D.h:
+ (WebCore::CanvasRenderingContext3D::graphicsContext3D):
+ (WebCore::CanvasRenderingContext3D::cleanupAfterGraphicsCall):
+ * platform/graphics/GraphicsContext3D.h:
+ * platform/graphics/mac/Canvas3DLayer.mm:
+ (-[Canvas3DLayer copyCGLPixelFormatForDisplayMask:]):
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::setPixelFormat):
+ (WebCore::GraphicsContext3D::create):
+ (WebCore::GraphicsContext3D::GraphicsContext3D):
+ (WebCore::GraphicsContext3D::~GraphicsContext3D):
+ (WebCore::GraphicsContext3D::reshape):
+ (WebCore::ensureContext):
+
+2009-10-27 Geoffrey Garen <ggaren@apple.com>
+
+ Mac build fix: a forwarding header.
+
+ * ForwardingHeaders/wtf/DateInstanceCache.h: Added.
+
+2009-10-27 Ryosuke Niwa <rniwa@webkit.org>
+
+ No Review.
+
+ Making fontWeightIsBold static to fix Snow Leopard build.
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::fontWeightIsBold):
+
+2009-10-27 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ WebKit cannot remove nested bold tags
+ https://bugs.webkit.org/show_bug.cgi?id=30784
+
+ This patch modifies getPropertiesNotInComputedStyle so that it compares font-weight
+ more flexibly. Instead of comparing cssText, it uses fontWeightIsBold which converts
+ all font weights to either bold or unbold state.
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::fontWeightIsBold):
+ (WebCore::getPropertiesNotInComputedStyle): Removes font-weight property
+ if two style have the same value under getFontWeightValue
+
+2009-10-27 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Give an ability to WebKit to free statically allocated pointers
+ before quit.
+ https://bugs.webkit.org/show_bug.cgi?id=27980
+
+ No new tests for this as the change does not affect WebKit
+ functionality, but only memory usage.
+
+ * JavaScriptCore/wtf/StdLibExtras.h:
+ Allowed for the override of DEFINE_STATIC_LOCAL via compiler
+ commandline options or elsewhere in the code. Useful for
+ implementing custom builds that free resources allocated via
+ DEFINE_STATIC_LOCAL.
+
+2009-10-27 Dumitru Daniliuc <dumi@chromium.org>
+
+ Build fix, no review needed.
+
+ Fixing the BUILD. m_estimatedSize in Database.h should be of type
+ 'unsigned long' instead of 'unsigned long long'.
+
+ No tests required.
+
+ * storage/Database.h:
+
+2009-10-27 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Refactoring the Database class to not depend on
+ OriginQuotaManager. Also, adding a SecurityOrigin copy to each
+ Database instance, that is safe to use on the file
+ thread. Finally, adding new simple fields and getters to the
+ Database object for storing/getting the display name and estimated
+ size specified by the user in the openDatabase() call.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30548
+
+ * page/SecurityOrigin.h:
+ * storage/Database.cpp:
+ (WebCore::Database::openDatabase): Storing the display name and
+ the estimated size in the Database object.
+ (WebCore::Database::Database): Storing the display name and the
+ estimated size in the Database object, as well as a SecurityOrigin
+ instance that is safe to use on the DB thread.
+ (WebCore::Database::maximumSize): Delegate the call to
+ DatabaseTracker::getMaxSizeForDatabase().
+ (WebCore::Database::databaseThreadSecurityOrigin): Return the
+ SecurityOrigin instance that's safe to use on the DB thread.
+ (WebCore::Database::threadSafeSecurityOrigin): Return the
+ SecurityOrigin instance that's safe to use on the current thread.
+ (WebCore::Database::displayName): Return the display name
+ specified by the user in the openDatabase() call.
+ (WebCore::Database::estimatedSize): Return the estimated size
+ specified by the user in the openDatabase() call.
+ (WebCore::Database::fileName): Return the name of the file where
+ the current Database is tored.
+ * storage/Database.h:
+ * storage/DatabaseTracker.cpp:
+ (WebCore::DatabaseTracker::getMaxSizeForDatabase): Returns the
+ maximum size for a DB file based on the current size of that file
+ and the space available for that origin.
+ * storage/DatabaseTracker.h:
+ * storage/SQLTransaction.cpp:
+ * storage/SQLTransactionClient.cpp:
+ (WebCore::SQLTransactionClient::didCommitTransaction): Use the
+ correct SecurityOrigin instance.
+
+2009-10-27 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Pretty Print all HTML Collection Types like we do for NodeList
+ https://bugs.webkit.org/show_bug.cgi?id=30709
+
+ Test: inspector/console-format-collections.html
+
+ * inspector/front-end/InjectedScript.js:
+ (Object.type): check for instances of HTMLCollection like we do for NodeList
+ * inspector/front-end/inspector.js: added WebInspector.pendingDispatches counter
+ (WebInspector.dispatch): increment and decrement dispatch counter
+ (WebInspector.runAfterPendingDispatches): run when there are no more dispatches
+
+2009-10-27 Kelly Norton <knorton@google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Adds XMLHttpRequest support to InspectorTimelineAgent.
+ https://bugs.webkit.org/show_bug.cgi?id=30578
+
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::willChangeXHRReadyState):
+ (WebCore::InspectorTimelineAgent::didChangeXHRReadyState):
+ (WebCore::InspectorTimelineAgent::willLoadXHR):
+ (WebCore::InspectorTimelineAgent::didLoadXHR):
+ * inspector/InspectorTimelineAgent.h:
+ (WebCore::):
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createXHRReadyStateChangeTimelineRecord):
+ (WebCore::TimelineRecordFactory::createXHRLoadTimelineRecord):
+ * inspector/TimelineRecordFactory.h:
+ * inspector/front-end/TimelineAgent.js:
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::callReadyStateChangeListener):
+
+2009-10-27 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ REGRESSION (Safari 4.0.3-ToT): After pressing Shift-PageDown, pressing Shift-Up
+ extends the top of the selection upwards (but should shrink the selection instead)
+ <rdar://problem/7269075>
+ https://bugs.webkit.org/show_bug.cgi?id=29981
+
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::modify): Added setting m_lastChangeWasHorizontalExtension.
+
+2009-10-27 Brian Weinstein <bweinstein@apple.com>
+
+ Rubber-stamped by Tim Hatcher.
+
+ Removed an extra console.log from ElementsTreeOutline.
+
+ * inspector/front-end/ElementsTreeOutline.js:
+
+2009-10-27 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Rewrote JavaScriptSourceSyntaxHighlighter to be more accurate
+ https://bugs.webkit.org/show_bug.cgi?id=27147
+
+ Tests: LayoutTests/inspector/javascript-syntax-highlight.html
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.JavaScriptSourceSyntaxHighlighter.process): Added. Processes 100 tokens at a time.
+ (WebInspector.JavaScriptSourceSyntaxHighlighter.lex): Added. Scans for a token.
+ (WebInspector.JavaScriptSourceSyntaxHighlighter.appendNonToken): Added. Appends the non-token characters that lex ignored.
+ (WebInspector.JavaScriptSourceSyntaxHighlighter.syntaxHighlightNode): Added. To syntax highlight node in ElementsTreeOutline.
+
+2009-10-27 Mads Ager <ager@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Missing null check after string conversion in error reporting
+ https://bugs.webkit.org/show_bug.cgi?id=30774
+
+ Add null check after string conversion in error reporting code.
+ ToString conversion can fail for instance when an exception is
+ thrown during conversion.
+
+ Test: fast/dom/error-to-string-stack-overflow.html
+
+ * bindings/v8/V8Utilities.cpp:
+ (WebCore::reportException):
+
+2009-10-27 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Adler.
+
+ Use a pair of maps to store Geolocation watchers.
+ https://bugs.webkit.org/show_bug.cgi?id=29178
+
+ The pair of maps allows us to look up a watcher either by its ID or by its GeoNotifier object.
+ The ability to look up by a watcher by its GeoNotifier object will be required when implementing
+ Geolocation::fatalErrorOccurred. See https://bugs.webkit.org/show_bug.cgi?id=27944
+
+ * page/Geolocation.cpp: Modified.
+ (WebCore::Geolocation::Watchers::set): Added. Adds a watcher with the given ID.
+ (WebCore::Geolocation::Watchers::remove): Added. Removes a watcher by ID.
+ (WebCore::Geolocation::Watchers::remove): Added. Removes a watcher by GeoNotifier object.
+ (WebCore::Geolocation::Watchers::clear): Added. Removes all watchers.
+ (WebCore::Geolocation::Watchers::isEmpty): Added. Determines if there are no watchers.
+ (WebCore::Geolocation::Watchers::getNotifiersVector): Added. Gets a vector of the GeoNotifier objects.
+ (WebCore::Geolocation::watchPosition): Modified. Rename watcher identifier static variable.
+ (WebCore::Geolocation::stopTimersForWatchers): Modified. Use Watchers::getNotifiersVector.
+ (WebCore::Geolocation::handleError): Modified. Use Watchers::getNotifiersVector.
+ (WebCore::Geolocation::makeSuccessCallbacks): Modified. Use Watchers::getNotifiersVector.
+ * page/Geolocation.h: Modified. Adds Geolocation::Watchers class.
+
+2009-10-27 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] DOM Storage runtime flag should default to on
+ https://bugs.webkit.org/show_bug.cgi?id=30828
+
+ The DOM Storage runtime flag was supposed to default to on. I accidentally
+ changed the logic to default to false when I moved the flag.
+
+ * bindings/v8/RuntimeEnabledFeatures.cpp:
+
+2009-10-27 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix crash found in chromium test_shell.
+ https://bugs.webkit.org/show_bug.cgi?id=30808
+
+ When WebSocket is deleted without close, webkit would crash
+ when it handles didClose.
+
+ Check scriptExecutionContext before post task for event.
+ Use WebSocketChannel::disconnect() instead of close() in WebSocket
+ destructor, so that WebSocketChannel should not call deleted WebSocket
+ back in didClose().
+ To make sure WebSocketChannel alive while it is processing WebSocket
+ protocol over SocketStreamHandle, ref() in connect() and deref() in
+ didClose().
+
+ * websockets/WebSocket.cpp:
+ (WebCore::WebSocket::~WebSocket):
+ (WebCore::WebSocket::didConnect):
+ (WebCore::WebSocket::didReceiveMessage):
+ (WebCore::WebSocket::didClose):
+ * websockets/WebSocketChannel.cpp:
+ (WebCore::WebSocketChannel::connect):
+ (WebCore::WebSocketChannel::disconnect):
+ (WebCore::WebSocketChannel::didClose):
+ (WebCore::WebSocketChannel::didReceiveData):
+ * websockets/WebSocketChannel.h:
+
+2009-10-27 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Updated Apple license
+
+ * LICENSE-APPLE:
+
+2009-10-27 Brady Eidson <beidson@apple.com>
+
+ Rubberstamped by Sam Weinig.
+
+ Re-enable the check that disallows pages with unload handlers in the page cache.
+
+ <rdar://problem/7196485> and http://webkit.org/b/29021
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::canCachePageContainingThisFrame):
+ (WebCore::FrameLoader::logCanCacheFrameDecision):
+
+2009-10-27 Timothy Hatcher <timothy@apple.com>
+
+ Remove more empty files that didn't get removed earlier.
+
+ * inspector/DOMDispatchTimelineItem.cpp: Removed.
+ * inspector/DOMDispatchTimelineItem.h: Removed.
+
+2009-10-27 Andras Becsi <becsi.andras@stud.u-szeged.hu>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Fix assertion crashes introduced by changes made in r50110.
+
+ * dom/XMLTokenizerQt.cpp:
+ (WebCore::XMLTokenizer::parseEndElement): only call popCurrentNode() if there are nodes left in the stack.
+
+2009-10-27 Timothy Hatcher <timothy@apple.com>
+
+ Remove empty files that didn't get removed earlier.
+
+ * inspector/TimelineItem.cpp: Removed.
+ * inspector/TimelineItem.h: Removed.
+
+2009-10-27 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25534
+ [GTK] Objects of ROLE_TABLE should implement the accessible table interface
+
+ First part of the implementation of AtkTable.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (getCell):
+ (getCellIndex):
+ (webkit_accessible_table_ref_at):
+ (webkit_accessible_table_get_index_at):
+ (webkit_accessible_table_get_n_columns):
+ (webkit_accessible_table_get_n_rows):
+ (webkit_accessible_table_get_column_extent_at):
+ (webkit_accessible_table_get_row_extent_at):
+ (webkit_accessible_table_get_row_header):
+ (atk_table_interface_init):
+ (AtkInterfacesInitFunctions):
+ (GetAtkInterfaceTypeFromWAIType):
+
+2009-10-27 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Lars Knoll.
+
+ [Qt] Don't lose remainder when computing wheel event deltas
+
+ * platform/qt/WheelEventQt.cpp:
+
+2009-10-27 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Antti Koivisto.
+
+ Fix QtWebKit build for WIN_OS if Netscape plug-in support
+ is turned off and refactor some related code
+ https://bugs.webkit.org/show_bug.cgi?id=30786
+
+ No new tests as there is no new functionality introduced.
+
+ * platform/FileSystem.h: Refactor to make sure that each different
+ type definition is only repeated once.
+
+ * plugins/PluginPackage.cpp:
+ (WebCore::PluginPackage::compareFileVersion): Move it out from the
+ ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH guard and combine it with the
+ function body from PluginPackageWin.
+
+ * plugins/win/PluginPackageWin.cpp: Remove compareFileVersion as
+ it is now in PluginPackage.cpp.
+
+2009-10-26 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27011
+ [Gtk] Implement support for get_index_in_parent
+
+ Implement atk_object_get_index_in_parent.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (webkit_accessible_get_index_in_parent):
+
+2009-10-27 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r50131.
+ http://trac.webkit.org/changeset/50131
+
+ * bridge/objc/objc_instance.h:
+ * bridge/objc/objc_instance.mm:
+ (ObjcInstance::ObjcInstance):
+ (ObjcInstance::virtualEnd):
+
+2009-10-26 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30491
+
+ Fixes an issue where pressing return/enter on the keyboard
+ in <isindex> does not submit it if is not within a <form>.
+
+ According to the HTML 2.0 thru HTML 4.01 spec
+ (http://www.w3.org/MarkUp/html-spec/html-spec_7.html#SEC7.5), the
+ <isindex> element does not need to be within a <form> element in
+ order to submit it. It can submitted on its own. Also, if present,
+ the href property of the <base> element will dictate where to submit
+ the value of the <isindex> element (this is analogous to the action
+ property of the <form> element).
+
+ Tests: http/tests/misc/isindex-with-no-form-base-href.html
+ http/tests/misc/isindex-with-no-form.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::defaultEventHandler): Calls createTemporaryFormForIsIndex()
+ to create a <form> if none is present and we are an <isindex> element.
+ (WebCore::HTMLInputElement::createTemporaryFormForIsIndex): Added.
+ * html/HTMLInputElement.h:
+
+2009-10-26 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Crash occurs after launching Newsfire 1.6 for the first time
+ https://bugs.webkit.org/show_bug.cgi?id=30807
+
+ Use a RetainPtr in ObjcBinding to ensure that we adequately
+ protect the autorelease pool from GC in GC'd applications.
+
+ * bridge/objc/objc_instance.h:
+ * bridge/objc/objc_instance.mm:
+ (ObjcInstance::ObjcInstance):
+ (ObjcInstance::virtualEnd):
+
+2009-10-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed.
+
+ [Qt] Build fix for QtWebKit after r50125.
+
+ * WebCore.pro: Rename TimelineItem to TimelineRecord.
+
+2009-10-26 Matt Mueller <mattm@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Refactor synchronizable property handling to store one shouldSynchronize flag per set of properties rather than one per property.
+
+ Fixes reading uninitialized memory in SynchronizableProperty hash function as well as simplifying the code.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30658
+
+ Covered by running various svg tests under valgrind, ex:
+ LayoutTests/svg/custom/js-late-mask-and-object-creation.svg
+
+ * svg/SynchronizablePropertyController.cpp:
+ (WebCore::SynchronizableProperties::addProperty):
+ (WebCore::SynchronizableProperties::synchronize):
+ (WebCore::SynchronizableProperties::startAnimation):
+ (WebCore::SynchronizableProperties::stopAnimation):
+ (WebCore::SynchronizablePropertyController::registerProperty):
+ (WebCore::SynchronizablePropertyController::setPropertyNeedsSynchronization):
+ (WebCore::SynchronizablePropertyController::synchronizeProperty):
+ (WebCore::SynchronizablePropertyController::synchronizeAllProperties):
+ (WebCore::SynchronizablePropertyController::startAnimation):
+ (WebCore::SynchronizablePropertyController::stopAnimation):
+ * svg/SynchronizablePropertyController.h:
+ (WebCore::SynchronizableProperties::SynchronizableProperties):
+ (WebCore::SynchronizableProperties::setNeedsSynchronization):
+
+2009-10-26 Kelly Norton <knorton@google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Renames TimelineItem to TimelineRecord and updates all call sites.
+ https://bugs.webkit.org/show_bug.cgi?id=30785
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addRecordToTimeline):
+ * inspector/InspectorFrontend.h:
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::willDispatchDOMEvent):
+ (WebCore::InspectorTimelineAgent::didDispatchDOMEvent):
+ (WebCore::InspectorTimelineAgent::willLayout):
+ (WebCore::InspectorTimelineAgent::didLayout):
+ (WebCore::InspectorTimelineAgent::willRecalculateStyle):
+ (WebCore::InspectorTimelineAgent::didRecalculateStyle):
+ (WebCore::InspectorTimelineAgent::willPaint):
+ (WebCore::InspectorTimelineAgent::didPaint):
+ (WebCore::InspectorTimelineAgent::willWriteHTML):
+ (WebCore::InspectorTimelineAgent::didWriteHTML):
+ (WebCore::InspectorTimelineAgent::didInstallTimer):
+ (WebCore::InspectorTimelineAgent::didRemoveTimer):
+ (WebCore::InspectorTimelineAgent::willFireTimer):
+ (WebCore::InspectorTimelineAgent::didFireTimer):
+ (WebCore::InspectorTimelineAgent::reset):
+ (WebCore::InspectorTimelineAgent::addRecordToTimeline):
+ (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
+ (WebCore::InspectorTimelineAgent::pushCurrentRecord):
+ * inspector/InspectorTimelineAgent.h:
+ (WebCore::):
+ (WebCore::InspectorTimelineAgent::RecordEntry::RecordEntry):
+ * inspector/TimelineItemFactory.cpp: Removed.
+ * inspector/TimelineItemFactory.h: Removed.
+ * inspector/TimelineRecordFactory.cpp: Added.
+ (WebCore::TimelineRecordFactory::createGenericRecord):
+ (WebCore::TimelineRecordFactory::createDOMDispatchRecord):
+ (WebCore::TimelineRecordFactory::createGenericTimerRecord):
+ (WebCore::TimelineRecordFactory::createTimerInstallRecord):
+ * inspector/TimelineRecordFactory.h: Added.
+ (WebCore::TimelineRecordFactory::TimelineRecordFactory):
+ * inspector/front-end/TimelineAgent.js:
+ (WebInspector.addRecordToTimeline):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype.addRecordToTimeline):
+ (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
+ (WebInspector.TimelinePanel.prototype.getRecordTypeName):
+ (WebInspector.TimelineRecordTreeElement.prototype.onattach):
+
+2009-10-26 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Antti Koivisto.
+
+ [Qt] Windowless Plugins : Print preview shows only part of flash when view is scrolled
+
+ When printing, QPrinter's preview mode uses a QPicture to capture the output. The
+ QPicture holds a reference to the X Pixmap. As a result, the print preview would
+ update itself when the X Pixmap changes. To prevent the print preview from updating
+ whenever m_drawable is updated (i.e when the view updates), we create a copy.
+
+ We require that a QPixmap::copy() result in a QPixmap backed by a XPixmap
+ regardless of the graphicssystem. This is taken care of by
+ commit d310f7c710ecb331a9689861f0551eabd38e946e in Qt (4.6)
+
+ The beauty of this patch is that the newly created X Pixmap is managed by Qt and
+ it will free the Pixmap whenever the user closes the print preview dialog and
+ handles the case of displaying multiple preview dialogs nicely.
+
+ All credit to Samuel Rødal for suggesting usage of QPixmap::copy().
+
+ https://bugs.webkit.org/show_bug.cgi?id=30714
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::paint):
+
+2009-10-26 Benjamin Otte <otte@gnome.org>
+
+ Reviewed by Gustavo Noronha.
+
+ Don't store properties in the MediaPlayerPrivate class
+
+ Access them via the MediaPlayer class instead.
+ https://bugs.webkit.org/show_bug.cgi?id=30462
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::seek):
+ (WebCore::MediaPlayerPrivate::setVolume):
+ (WebCore::MediaPlayerPrivate::setRate):
+ (WebCore::MediaPlayerPrivate::setVisible):
+ (WebCore::MediaPlayerPrivate::paint):
+ (WebCore::MediaPlayerPrivate::createGSTPlayBin):
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+
+2009-10-26 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <http://webkit.org/b/30801>.
+ Web Inspector: Control + ]/[ on Windows doesn't change Panels.
+
+ In my testing, Windows uses "U+00DB" and "U+00DD" to represent
+ [ and ], so we should honor those as well.
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.documentKeyDown):
+
+2009-10-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Make .rc files compile on Windows without depending on MFC headers
+ https://bugs.webkit.org/show_bug.cgi?id=30750
+
+ * WebCore.vcproj/QTMovieWin.rc: Use winresrc.h because it exists
+ even when MFC is not installed, and is all that's needed here.
+
+2009-10-26 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Build corrections for ENABLE_FILTERS in Windows.
+ https://bugs.webkit.org/show_bug.cgi?id=30797
+
+ Build correction for ENABLE_FILTERS feature. No new tests needed.
+
+ * platform/graphics/filters/FEColorMatrix.cpp: Use MathExtras.h and
+ its piDouble constant.
+ * platform/graphics/filters/FEGaussianBlur.cpp: Use MathExtras.h and
+ its piDouble constant. Remove unnecessary call to floor used in
+ the division of an unsigned, converting to int.
+ * platform/graphics/win/SimpleFontDataCairoWin.cpp: Correct include
+ style for MathExtras.h.
+
+2009-10-26 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7289467> and http://webkit.org/b/30798 - REGRESSION (r48687): www.myuhc.com doesn't load.
+
+ Test: fast/loader/grandparent-completion-starts-redirect.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::completed): Notify all descendants that the load completed, not just direct children.
+
+2009-10-26 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Re-add CSSPropertyWebkitBackgroundSize in one more place
+
+ Fixes transitions/multiple-background-size-transitions.html, transitions/background-transitions.html
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
+
+2009-10-26 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Tidy up the DOM Storage runtime flag stuff
+ https://bugs.webkit.org/show_bug.cgi?id=30794
+
+ Clean up the DOM Storage runtime flag stuff to match the new way of doing
+ things. No behavioral changes.
+
+ * bindings/v8/RuntimeEnabledFeatures.cpp:
+ * bindings/v8/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::setDatabaseEnabled):
+ (WebCore::RuntimeEnabledFeatures::databaseEnabled):
+ (WebCore::RuntimeEnabledFeatures::setLocalStorageEnabled):
+ (WebCore::RuntimeEnabledFeatures::localStorageEnabled):
+ (WebCore::RuntimeEnabledFeatures::setSessionStorageEnabled):
+ (WebCore::RuntimeEnabledFeatures::sessionStorageEnabled):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::ACCESSOR_RUNTIME_ENABLER):
+ * storage/Storage.cpp:
+ * storage/Storage.h:
+
+2009-10-26 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7308952> and http://webkit.org/b/30424 - REGRESSION (r48687): Pages on ucas.com appear blank.
+
+ Test: fast/loader/history-forward-in-head.html
+
+ * loader/RedirectScheduler.cpp:
+ (WebCore::RedirectScheduler::scheduleHistoryNavigation): Restore the moved canGoBackOrForward() check.
+ This restores the side effect of an invalid history navigation canceling previous scheduled redirects
+ and also fixes the bug of scheduling an invalid history navigation canceling parsing of the current document.
+ (WebCore::RedirectScheduler::timerFired): Removed the canGoBackOrForward() check as it is now made before
+ the redirect is scheduled.
+
+2009-10-26 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30049
+ <rdar://problem/7286002> Manipulating DOM from a script while parsing XHTML can cause a crash
+
+ Tests: fast/parser/remove-current-node-parent-x-2.xhtml
+ fast/parser/remove-current-node-parent-x.xhtml
+
+ * dom/XMLTokenizer.h: Store the whole stack of parent nodes - element.parentNode() is
+ unreliable after DOM manipulation.
+
+ * dom/XMLTokenizer.cpp:
+ (WebCore::XMLTokenizer::pushCurrentNode): Push the new node onto stack.
+ (WebCore::XMLTokenizer::popCurrentNode): This is now called instead of setCurrentNode when
+ exiting a node.
+ (WebCore::XMLTokenizer::clearCurrentNodeStack): We're aborting; or just done parsing. This
+ replaces setCurrentNode(0).
+ (WebCore::XMLTokenizer::enterText): Call pushCurrentNode().
+ (WebCore::XMLTokenizer::exitText): Call popCurrentNode(), removing a long-standing FIXME
+ (not sure if it was ever practical though - how can a parent become null while adding text?)
+
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::XMLTokenizer::~XMLTokenizer): Call clearCurrentNodeStack().
+ (WebCore::XMLTokenizer::startElementNs): Call pushCurrentNode().
+ (WebCore::XMLTokenizer::endElementNs): Call popCurrentNode() to safely get to a parent. Also
+ added a check fo script element still being in document - Firefox parses those that aren't,
+ but doesn't execute them.
+
+ * dom/XMLTokenizerQt.cpp:
+ (WebCore::XMLTokenizer::~XMLTokenizer):
+ (WebCore::XMLTokenizer::parseStartElement):
+ (WebCore::XMLTokenizer::parseEndElement):
+ Match libxml2 version changes.
+
+2009-10-26 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ background-size: X treated as background-size: X X, not background-size: X auto
+ https://bugs.webkit.org/show_bug.cgi?id=28440
+
+ Updated fast/backgrounds/size/resources/parsing-background-size-values.js
+ and fast/backgrounds/size/resources/parsing-inherit.js
+
+ Reinstated -webkit-background-size and kept its behavior of filling in
+ the second value with the first one; and changed background-size to have
+ the behavior of filling in the second value with 'auto'.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (computedProperties): Re-added CSSPropertyWebkitBackgroundSize.
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Ditto.
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue): Ditto.
+ (WebCore::CSSParser::parseFillSize): Adapted for the new parsing rule.
+ (WebCore::CSSParser::parseFillProperty): Re-added
+ CSSPropertyWebkitBackgroundSize.
+ (WebCore::cssPropertyID): Removed mapping of -webkit-background-size to
+ background-size.
+ * css/CSSParser.h:
+ * css/CSSPropertyNames.in: Re-added -webkit-background-size.
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty): Re-added
+ CSSPropertyWebkitBackgroundSize.
+
+2009-10-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Use "%lli" to format "long long" on WIN_OS to fix HTML5 WebDB crash
+ https://bugs.webkit.org/show_bug.cgi?id=30777
+
+ No new tests as the crash can be reproduced by existing storage
+ LayoutTests (by hitting an assert in debug mode Webkit on WIN_OS).
+
+ * platform/text/String.cpp:
+ (WebCore::String::number): Qt's QString::vsprintf does not
+ understand the "%I64u" format string. Always use the "%lli"
+ format string for Qt port.
+
+2009-10-26 Tony Chang <tony@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Roll back r50073 because r50041-50043 were reverted. r50073 was
+ a chromium side fix for r50041.
+ https://bugs.webkit.org/show_bug.cgi?id=30789
+
+ * bindings/v8/V8Collection.h:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
+ (WebCore::getNamedItems):
+ (WebCore::getItem):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
+ (WebCore::getNamedItems):
+ (WebCore::getItem):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+
+2009-10-26 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fixed https://bugs.webkit.org/show_bug.cgi?id=30765
+ REGRESSION (r48701): Removing an event listener causes the one added just after it not to fire
+
+ and related bugs.
+
+ If the event listener being removed is prior to the current firing event
+ iterator, we need to decrement the current firing event iterator in
+ addition to the endpoint. (Otherwise, shrinking the event listener vector
+ by one implicity moves the current firing event iterator forward by one.
+ It's like relativity, only without the planets.)
+
+ Also took the opportunity to change some pointers to references, since
+ they can't be null.
+
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::removeEventListener):
+ (WebCore::EventTarget::removeAllEventListeners): Update iterator in addition
+ to end, if need be.
+ (WebCore::EventTarget::fireEventListeners): Updated for interface changes.
+ Added a comment to explain a behavior that was implicit enough to be
+ confusing.
+
+ * dom/EventTarget.h:
+ (WebCore::FiringEventIterator::FiringEventIterator):
+ (WebCore::EventTarget::isFiringEventListeners): Updated for interface changes.
+
+2009-10-26 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <http://webkit.org/b/30792>.
+ Web Inspector: When changing resource scope, resource graph can get in weird state.
+
+ If the user was scrolled down while looking at All resources, and then just
+ selects Fonts, or something that doesn't have many resources, then the graph
+ will stay scrolled down, even when there is no content there.
+
+ When the filter is updated, scroll to the top of the graph view, so this won't
+ happen.
+
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype._updateFilter):
+
+2009-10-26 Sam Weinig <sam@webkit.org>
+
+ Fix mac clean build.
+
+ * html/HTMLOptionsCollection.idl:
+
+2009-10-26 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Extract AbstractTimelinePanel that will be a base
+ class for ResourcesPanel and TimelinePanel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30776
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/AbstractTimelinePanel.js: Added.
+ (WebInspector.AbstractTimelinePanel):
+ (WebInspector.AbstractTimelinePanel.prototype.get categories):
+ (WebInspector.AbstractTimelinePanel.prototype.showCategory):
+ (WebInspector.AbstractTimelinePanel.prototype.hideCategory):
+ (WebInspector.AbstractTimelinePanel.prototype.createTimelinePanels):
+ (WebInspector.AbstractTimelinePanel.prototype._createFilterPanel.createFilterElement):
+ (WebInspector.AbstractTimelinePanel.prototype._createFilterPanel):
+ (WebInspector.AbstractTimelinePanel.prototype.filter):
+ (WebInspector.AbstractTimelinePanel.prototype._updateFilter):
+ (WebInspector.AbstractTimelinePanel.prototype._createGraph):
+ (WebInspector.AbstractTimelinePanel.prototype.updateGraphDividersIfNeeded):
+ (WebInspector.AbstractTimelinePanel.prototype._updateSummaryGraph):
+ (WebInspector.AbstractTimelinePanel.prototype._updateDividersLabelBarPosition):
+ (WebInspector.AbstractTimelinePanel.prototype.get needsRefresh):
+ (WebInspector.AbstractTimelinePanel.prototype.set needsRefresh):
+ (WebInspector.AbstractTimelinePanel.prototype.refreshIfNeeded):
+ (WebInspector.AbstractTimelinePanel.prototype.show):
+ (WebInspector.AbstractTimelinePanel.prototype.resize):
+ (WebInspector.AbstractTimelinePanel.prototype.updateMainViewWidth):
+ (WebInspector.TimelineCalculator):
+ (WebInspector.TimelineCalculator.prototype.computeSummaryValues):
+ (WebInspector.TimelineCalculator.prototype.computeBarGraphPercentages):
+ (WebInspector.TimelineCalculator.prototype.computeBarGraphLabels):
+ (WebInspector.TimelineCalculator.prototype.get boundarySpan):
+ (WebInspector.TimelineCalculator.prototype.updateBoundaries):
+ (WebInspector.TimelineCalculator.prototype.reset):
+ (WebInspector.TimelineCalculator.prototype._value):
+ (WebInspector.TimelineCalculator.prototype.formatValue):
+ * inspector/front-end/ResourceCategory.js:
+ (WebInspector.ResourceCategory):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel):
+ (WebInspector.ResourcesPanel.prototype.toolbarItemClass.get toolbarItemLabel):
+ (WebInspector.ResourcesPanel.prototype.get statusBarItems):
+ (WebInspector.ResourcesPanel.prototype.get categories):
+ (WebInspector.ResourcesPanel.prototype.showCategory):
+ (WebInspector.ResourcesPanel.prototype.hideCategory):
+ (WebInspector.ResourcesPanel.prototype.isCategoryVisible):
+ (WebInspector.ResourcesPanel.prototype.populateSidebar):
+ (WebInspector.ResourcesPanel.prototype.createPanelEnabler):
+ (WebInspector.ResourcesPanel.prototype.createStatusbarButtons):
+ (WebInspector.ResourcesPanel.prototype.set mainResourceLoadTime):
+ (WebInspector.ResourcesPanel.prototype.set mainResourceDOMContentTime):
+ (WebInspector.ResourcesPanel.prototype.show):
+ (WebInspector.ResourcesPanel.prototype.resize):
+ (WebInspector.ResourcesPanel.prototype.reset):
+ (WebInspector.ResourcesPanel.prototype.updateGraphDividersIfNeeded):
+ (WebInspector.ResourcesPanel.prototype.updateMainViewWidth):
+ (WebInspector.ResourceTimeCalculator):
+ (WebInspector.ResourceTransferSizeCalculator):
+ (WebInspector.ResourceTransferSizeCalculator.prototype.computeBarGraphLabels):
+ * inspector/front-end/SummaryBar.js:
+ (WebInspector.SummaryBar.prototype.update):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+
+2009-10-26 Avi Drissman <avi@google.com>
+
+ Reviewed by Darin Adler.
+
+ Use Helvetica in the Inspector as intended.
+ https://bugs.webkit.org/show_bug.cgi?id=30787
+
+ * inspector/front-end/inspector.css:
+
+2009-10-26 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Don't set window.opener to 0 for the current FrameLoader if a noreferrer link was clicked, only suppress opener in a new frame.
+ https://bugs.webkit.org/show_bug.cgi?id=30781
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::urlSelected): Don't suppress opener in the current frame for noreferrer navigations.
+
+2009-10-26 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Data loss occurs when unbolding nested bold tags.
+ https://bugs.webkit.org/show_bug.cgi?id=30083
+
+ Fixes the loop in swapInNodePreservingAttributesAndChildren by saving nextSibling() of child
+ to a temporary valuable. It was originally calling nextSibling() after appending the child
+ to new parent, in which case, nextSibling is always 0.
+
+ Test: editing/style/unbolding-nested-b.html
+
+ * editing/ReplaceNodeWithSpanCommand.cpp:
+ (WebCore::swapInNodePreservingAttributesAndChildren):
+
+2009-10-21 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Storage events should use Document::url() rather than documentURI()
+ https://bugs.webkit.org/show_bug.cgi?id=30535
+
+ Storage events should use Document::url() rather than Document::documentURI()
+ per http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-October/023703.html
+
+ Test: storage/domstorage/documentURI.html
+
+ * storage/StorageEventDispatcher.cpp:
+ (WebCore::StorageEventDispatcher::dispatch):
+
+2009-10-26 Sam Weinig <sam@webkit.org>
+
+ Rubber-stamped by Darin Adler.
+
+ Rollout r50041-50043. The HTML5 spec changed to make HTMLOptionsCollection
+ inherit from HTMLCollection.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSHTMLAllCollectionCustom.cpp:
+ (WebCore::getNamedItems):
+ (WebCore::callHTMLAllCollection):
+ (WebCore::JSHTMLAllCollection::nameGetter):
+ (WebCore::JSHTMLAllCollection::item):
+ (WebCore::JSHTMLAllCollection::namedItem):
+ * bindings/js/JSHTMLCollectionCustom.cpp:
+ (WebCore::getNamedItems):
+ (WebCore::callHTMLCollection):
+ (WebCore::JSHTMLCollection::nameGetter):
+ (WebCore::JSHTMLCollection::item):
+ (WebCore::JSHTMLCollection::namedItem):
+ (WebCore::toJS):
+ * bindings/js/JSHTMLCollectionFunctions.h: Removed.
+ * bindings/js/JSHTMLDocumentCustom.cpp:
+ * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
+ (WebCore::JSHTMLOptionsCollection::length):
+ (WebCore::JSHTMLOptionsCollection::indexSetter):
+ * bindings/objc/DOMHTML.mm:
+ (kitClass):
+ * bindings/objc/DOMUtility.mm:
+ (JSC::createDOMWrapper):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * html/HTMLCollection.idl:
+ * html/HTMLOptionsCollection.idl:
+
+2009-10-26 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Build fix for ENABLE_FILTERS under Windows.
+ https://bugs.webkit.org/show_bug.cgi?id=30762
+
+ Build correction for ENABLE_FILTERS feature. No new tests needed.
+
+ * WebCore.vcproj/WebCore.vcproj: Make the following changes:
+ (1) Create a new 'filters' sub-folder of the platform/graphics
+ folder to properly show the sources held in this directory.
+ (2) Move the files that are currently shown in svn/graphics/filters
+ to platform/graphics/filters (where they actually live on disk).
+ (3) Add the missing SVGFilter, SVGFilterBuilder, and SVGFETile to
+ the project so they are built.
+ (4) Remove SVGFEFloodElement.cpp from the build, since it is already
+ being compiled by SVGAllInOne.cpp. Its presence as a separate
+ entity is causing a linker warning for duplicate symbols.
+ (5) Add ImageBuffer.cpp to the build to support color space
+ calculations for non-CG builds.
+ * WebCore.vcproj/WebCoreCommon.vsprops: Add the platform/graphics/filters
+ path to the search paths in the project.
+
+2009-10-26 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ console.assert should prefix messages with "Assertion failed: "
+ https://bugs.webkit.org/show_bug.cgi?id=19135
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleMessage.prototype.toMessageElement): Append "Assertion failed: " for AssertMessageType.
+ (WebInspector.ConsoleMessage.prototype.toString):
+ * page/Console.cpp:
+ (WebCore::Console::assertCondition): Use AssertMessageType.
+ * page/Console.h:
+ (WebCore::MessageType): Added AssertMessageType.
+
+2009-10-26 Rahul Kuchhal <kuchhal@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Prevent crash when optgroup element is empty by adding a NULL check.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30365
+
+ Test: fast/forms/select-empty-optgroup.html
+
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::appendFormData):
+
+2009-10-21 Steven Knight <sgk@chromium.org>
+
+ Reviewed by David Levin.
+
+ Refactor gyp for separate webcore_bindings{,_sources} targets.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30447
+
+ Handle long link lines by building .idl-generated bindings in a
+ separate webcore_bindings library target. Avoid Visual Studio
+ dependency issues by building additional generated .cpp and .h files
+ in a separate webcore_bindings_sources target.
+
+ Chrome should still build and test successfully.
+
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gypi:
+
+2009-10-26 Mike Belshe <mike@belshe.com>
+
+ Reviewed by Darin Fisher.
+
+ Make the number of connections for chromium controlled by
+ chromium rather than by ResourceRequestBase.
+ https://bugs.webkit.org/show_bug.cgi?id=30661
+
+ * platform/network/ResourceRequestBase.cpp:
+ * platform/network/chromium/ResourceRequest.cpp:
+
+2009-10-26 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed. make distcheck build fixes.
+
+ * GNUmakefile.am:
+
+2009-10-26 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Unbreak Chromium build: that requires adding custom implementations
+ for HTMLOptionsCollection's item and namedItem. Keep v8 binding
+ close to JSC bindings as well.
+ https://bugs.webkit.org/show_bug.cgi?id=30780
+
+ * bindings/v8/V8Collection.h:
+ (WebCore::getNamedItemsFromCollection):
+ (WebCore::getItemFromCollection):
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-10-23 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Adam Barth and Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30723
+ <rdar://problem/6189415> Input names added to multipart/form-data headers need to be escaped.
+
+ Test: http/tests/security/escape-form-data-field-names.html
+
+ * platform/network/FormDataBuilder.cpp:
+ (WebCore::appendQuotedString):
+ (WebCore::FormDataBuilder::beginMultiPartHeader):
+ (WebCore::FormDataBuilder::addFilenameToMultiPartHeader):
+ Percent-escape line breaks and quotation marks.
+
+2009-10-26 Kelly Norton <knorton@google.com>
+
+ Reviewed by Pavel Feldman.
+
+ Adds DOMTimer support to InspectorTimelineAgent.
+ https://bugs.webkit.org/show_bug.cgi?id=30467
+
+ * inspector/InspectorTimelineAgent.cpp: Added timer support and fixed some method names.
+ (WebCore::InspectorTimelineAgent::didDispatchDOMEvent):
+ (WebCore::InspectorTimelineAgent::didLayout):
+ (WebCore::InspectorTimelineAgent::didRecalculateStyle):
+ (WebCore::InspectorTimelineAgent::didPaint):
+ (WebCore::InspectorTimelineAgent::didWriteHTML):
+ (WebCore::InspectorTimelineAgent::didInstallTimer): Added.
+ (WebCore::InspectorTimelineAgent::didRemoveTimer): Added.
+ (WebCore::InspectorTimelineAgent::willFireTimer): Added.
+ (WebCore::InspectorTimelineAgent::didFireTimer): Added.
+ (WebCore::InspectorTimelineAgent::addItemToTimeline): Added.
+ (WebCore::InspectorTimelineAgent::didCompleteCurrentTimelineItem): Renamed.
+ * inspector/InspectorTimelineAgent.h:
+ (WebCore::):
+ * inspector/TimelineItemFactory.cpp: Add methods for timer-related ScriptObjects.
+ (WebCore::TimelineItemFactory::createGenericTimerTimelineItem):
+ (WebCore::TimelineItemFactory::createTimerInstallTimelineItem):
+ * inspector/TimelineItemFactory.h:
+ * page/DOMTimer.cpp: Added instrumentation points.
+ (WebCore::DOMTimer::install):
+ (WebCore::DOMTimer::removeById):
+ (WebCore::DOMTimer::fired):
+
+2009-10-26 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6988966> Hardware layers do not show up in page snapshots
+
+ Add a method that gets called when snapshotting Canvas3DLayers for page snapshots,
+ that allows the layer to return a CGImageRef of its contents.
+
+ * platform/graphics/mac/Canvas3DLayer.h:
+ * platform/graphics/mac/Canvas3DLayer.mm:
+ (-[Canvas3DLayer copyImageSnapshotWithColorSpace:]):
+
+2009-10-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Pass "console" as object group when evaluating selection.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30738
+
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._evalSelectionInCallFrame):
+
+2009-10-26 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Pavel Feldman.
+
+ Fix for Console not showing repeat count when repeatedly logging an Event
+ https://bugs.webkit.org/show_bug.cgi?id=30324
+
+ * inspector/ConsoleMessage.cpp:
+ (WebCore::ConsoleMessage::addToConsole):
+ (WebCore::ConsoleMessage::updateRepeatCountInConsole): Added.
+ * inspector/ConsoleMessage.h:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::addConsoleMessage): Calls updateRepeatCountInConsole if it is a repeating message.
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addConsoleMessage): Renamed WebCore::InspectorFrontend::addMessageToConsole
+ (WebCore::InspectorFrontend::updateConsoleMessageRepeatCount): Added. Called when repeatCount is incremented.
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.addMessage): Removed calls to msg.isEqual.
+ (WebInspector.ConsoleView.prototype.updateMessageRepeatCount): Added.
+ (WebInspector.ConsoleView.prototype._incrementErrorWarningCount): Added. Updates the error/warning count.
+ (WebInspector.ConsoleView.prototype.clearMessages):
+ (WebInspector.ConsoleMessage):
+ (WebInspector.ConsoleMessage.prototype.toMessageElement): Use ConsoleMessage._updateRepeatCount
+ (WebInspector.ConsoleMessage.prototype._updateRepeatCount):
+ * inspector/front-end/inspector.js:
+ (WebInspector.addConsoleMessage): Renamed WebInspector.addMessageToConsole.
+ (WebInspector.updateConsoleMessageRepeatCount): Added.
+
+2009-10-26 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ crash with AX on when an image map contains an anchor tag
+ https://bugs.webkit.org/show_bug.cgi?id=30739
+
+ Tests: accessibility/crashing-a-tag-in-map.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::addChildren):
+
+2009-10-26 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Adds feature ENABLE guards to V8 bindings.
+ https://bugs.webkit.org/show_bug.cgi?id=30697
+
+ This adds guards for the following features to the V8 bindings,
+ to allow builds with V8 to succeed when these features are not enabled.
+ - DATABASE
+ - WORKERS
+ - SHARED_WORKERS
+ - SVG
+ - XPATH
+ - XSLT
+ - INSPECTOR
+
+ This is a build fix only, no new tests required.
+
+ * bindings/v8/DOMObjectsInclude.h: Modified.
+ * bindings/v8/DerivedSourcesAllInOne.cpp: Modified.
+ * bindings/v8/V8Index.cpp: Modified.
+ * bindings/v8/V8Index.h: Modified.
+
+2009-10-26 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25679
+ [Gtk] Improve accessibility of focusable lists
+
+ Fixes the issues with the Atk states exposed for ListBoxOption
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (setAtkStateSetFromCoreObject):
+
+2009-10-26 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27085
+ [Gtk] Incorrect rendering of list
+
+ Adds a way for platforms to indicate that a particular object
+ should not be ignored.
+
+ * accessibility/AccessibilityObject.h:
+ * accessibility/chromium/AccessibilityObjectChromium.cpp:
+ * accessibility/gtk/AccessibilityObjectAtk.cpp:
+ * accessibility/mac/AccessibilityObjectMac.mm:
+ * accessibility/qt/AccessibilityObjectQt.cpp:
+ * accessibility/win/AccessibilityObjectWin.cpp:
+ * accessibility/wx/AccessibilityObjectWx.cpp:
+ (AccessibilityObject::accessibilityPlatformIncludesObject):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (AccessibilityRenderObject::accessibilityIsIgnored):
+
+2009-10-26 Kinuko Yasuda <kinuko@google.com>
+
+ Reviewed by Jan Alonzo.
+
+ Bug 30619: [Linux] Menu key doesn't work
+ https://bugs.webkit.org/show_bug.cgi?id=30619
+
+ Test: manual-tests/keyboard-menukey-event.html
+ No new layout tests: testing this will require changes in the test
+ controller in a platform-specific way.
+
+ * platform/chromium/KeyCodeConversionGtk.cpp:
+ (WebCore::windowsKeyCodeForKeyEvent): changed switch-case code for
+ GDK_Menu to return VKEY_APPS instead of VKEY_MENU.
+ * platform/gtk/KeyEventGtk.cpp:
+ (WebCore::windowsKeyCodeForKeyEvent): changed switch-case code for
+ GDK_Menu to return V_APPS instead of VK_MENU.
+
+2009-10-25 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Reuse already fetched proxy.
+ https://bugs.webkit.org/show_bug.cgi?id=30747
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertNewNodeToV8Object):
+
+2009-10-25 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed build fix.
+
+ Build fix for WIN_OS if Netscape plugin support is turned off
+ https://bugs.webkit.org/show_bug.cgi?id=30753
+
+ * plugins/PluginDatabase.cpp:
+
+2009-10-25 Hironori Bono <hbono@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ A quick fix for Bug 29103.
+ Since String::startsWith() cannot fold non-ASCII characters, this change folds the prefix string
+ and the option string before calling String::startsWith().
+ https://bugs.webkit.org/show_bug.cgi?id=29103
+
+ Tests: fast/forms/listbox-typeahead-cyrillic.html
+ fast/forms/listbox-typeahead-greek.html
+
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::typeAheadFind):
+
+2009-10-25 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Expanding a node in the Console should not show the element in Elements panel
+ https://bugs.webkit.org/show_bug.cgi?id=30749
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype.onmousedown): Check if inside disclosure triangle.
+
+2009-10-25 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=30751
+ HTMLOptionsCollection should not inherit from HTMLCollection
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ Added JSHTMLCollectionFunctions.h
+
+ * bindings/js/JSHTMLAllCollectionCustom.cpp:
+ (WebCore::callHTMLAllCollection):
+ (WebCore::JSHTMLAllCollection::nameGetter):
+ (WebCore::JSHTMLAllCollection::item):
+ (WebCore::JSHTMLAllCollection::namedItem):
+ * bindings/js/JSHTMLCollectionCustom.cpp:
+ (WebCore::callHTMLCollection):
+ (WebCore::JSHTMLCollection::nameGetter):
+ (WebCore::JSHTMLCollection::item):
+ (WebCore::JSHTMLCollection::namedItem):
+ * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
+ (WebCore::callHTMLCollection):
+ (WebCore::JSHTMLOptionsCollection::getCallData):
+ (WebCore::JSHTMLOptionsCollection::canGetItemsForName):
+ (WebCore::JSHTMLOptionsCollection::nameGetter):
+ (WebCore::JSHTMLOptionsCollection::indexSetter):
+ (WebCore::JSHTMLOptionsCollection::item):
+ (WebCore::JSHTMLOptionsCollection::namedItem):
+ Refactor to use generic implementation of HTMLCollection bindings functions
+ from JSHTMLCollectionFunctions.h
+
+ * bindings/js/JSHTMLCollectionFunctions.h: Added.
+ (WebCore::getCollectionNamedItems):
+ (WebCore::getCollectionItems):
+ (WebCore::callHTMLCollectionGeneric):
+ Added generic functions that JSHTMLCollection, JSHTMLAllCollection and
+ JSHTMLOptionsCollection can all use.
+
+ * bindings/js/JSHTMLDocumentCustom.cpp: Add include of JSHTMLAllCollection.h
+ for toJS on document.all.
+
+ * bindings/objc/DOMHTML.mm:
+ * bindings/objc/DOMUtility.mm:
+ (JSC::createDOMWrapper):
+ Remove special cases for HTMLOptionsCollection.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * html/HTMLAllCollection.idl:
+ * html/HTMLCollection.idl:
+ * html/HTMLOptionsCollection.idl:
+
+2009-10-24 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Fixed issue with IME inside console
+ https://bugs.webkit.org/show_bug.cgi?id=30660
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._promptKeyDown):
+ * inspector/front-end/DatabaseQueryView.js:
+ (WebInspector.DatabaseQueryView.prototype._promptKeyDown):
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+ (WebInspector.searchKeyDown): Moved performSearch here from WebInspector.searchKeyUp.
+ (WebInspector.startEditing.element.handleKeyEvent):
+ (WebInspector.startEditing):
+ * inspector/front-end/utilities.js:
+ (isEnterKey): Added. Check if in IME.
+
+2009-10-24 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=30752>.
+ Web Inspector: Multiple Selection on Scope Bars by default Conflicts with other behavior on OSX.
+
+ Have the scope bars select one scope by default, but if the multiple selection key
+ is pressed, allow for multiple selection.
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView):
+ (WebInspector.ConsoleView.prototype._updateFilter):
+ (WebInspector.ConsoleView.prototype.filter):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel):
+ (WebInspector.ResourcesPanel.prototype.filter):
+ (WebInspector.ResourcesPanel.prototype._updateFilter):
+
+2009-10-24 Timothy Hatcher <timothy@apple.com>
+
+ Make the scope bars in the Web Inspector match other scope bars in Mac OS X.
+ Also cleans up the CSS to use classes instead of ID selectors.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28186
+
+ Reviewed by Dan Bernstein.
+
+ * inspector/front-end/ResourcesPanel.js: Add the scope-bar class.
+ * inspector/front-end/inspector.css: Lots of changes to make it look right.
+ * inspector/front-end/inspector.html: Add the scope-bar class.
+
+2009-10-24 Timothy Hatcher <timothy@apple.com>
+
+ Fix selecting Resources in the Web Inspector's Resources panel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30743
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype.isCategoryVisible): Added.
+ (WebInspector.ResourceSidebarTreeElement.prototype.get selectable): Call
+ isCategoryVisible on the ResourcesPanel.
+
+2009-10-24 Timothy Hatcher <timothy@apple.com>
+
+ Fix the Scope Bar in the Web Inspector's Resource panel, so that selecting
+ All will deselect the other filters.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30744
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.createFilterElement): Better syntax.
+ (WebInspector.ResourcesPanel):
+ (WebInspector.ResourcesPanel.prototype.filter): Use a normal for loop,
+ and the child variable instead of target in the loop. Other clean up.
+
+2009-10-24 Timothy Hatcher <timothy@apple.com>
+
+ Make resizing the Web Inspector's Elements panel sidebar work again.
+ Also makes Resources panel use the sidebar code in Panel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30742
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/Panel.js:
+ (WebInspector.Panel): Don't create the sidebar with an argument.
+ (WebInspector.Panel.prototype.show): Call updateSidebarWidth.
+ (WebInspector.Panel.prototype.handleKeyEvent): Call handleSidebarKeyEvent.
+ (WebInspector.Panel.prototype.handleSidebarKeyEvent): Added.
+ (WebInspector.Panel.prototype.createSidebar): Renamed from _createSidebar.
+ (WebInspector.Panel.prototype._sidebarDragging): Call updateSidebarWidth.
+ (WebInspector.Panel.prototype.updateSidebarWidth): Renamed from _updateSidebarWidth.
+ (WebInspector.Panel.prototype.setSidebarWidth): Added. Called by updateSidebarWidth.
+ (WebInspector.Panel.prototype.updateMainViewWidth): Renamed from setMainViewWidth.
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel): Call createSidebar.
+ (WebInspector.ProfilesPanel.prototype.updateMainViewWidth): Renamed from setMainViewWidth.
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype.show): Remove call to _updateSidebarWidth.
+ (WebInspector.ResourcesPanel.prototype.showResource): Call updateSidebarWidth
+ (WebInspector.ResourcesPanel.prototype.closeVisibleResource): Ditto.
+ (WebInspector.ResourcesPanel.prototype.setSidebarWidth): Added.
+ (WebInspector.ResourcesPanel.prototype.updateMainViewWidth): Added.
+ * inspector/front-end/StoragePanel.js:
+ (WebInspector.StoragePanel): Call createSidebar.
+ (WebInspector.StoragePanel.prototype.updateMainViewWidth): Renamed from setMainViewWidth.
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel): Call createSidebar.
+ (WebInspector.TimelinePanel.prototype.updateMainViewWidth): Renamed from setMainViewWidth.
+
+2009-10-24 Timothy Hatcher <timothy@apple.com>
+
+ Call updateSelection() in a few places so hovering in the Web Inspector's
+ Elements panel always has the correct row selection height.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30735
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype.toggleNewAttributeButton): Call updateSelection().
+ (WebInspector.ElementsTreeElement.prototype._insertInLastAttributePosition): Ditto.
+ * inspector/front-end/inspector.css: Prevent text wrapping in the middle of the add attribute text.
+
+2009-10-24 Timothy Hatcher <timothy@apple.com>
+
+ Remove the re-root tree feature from the Web Inspector's
+ Elements panel. This feature wasn't super useful and gets
+ in the way of double-click to edit.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30736
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype.ondblclick):
+
+2009-10-24 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Implements ReturnsNew hint for V8 bindings generation code.
+ https://bugs.webkit.org/show_bug.cgi?id=30745
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8DOMWrapper.h:
+ (WebCore::V8DOMWrapper::convertNewNodeToV8Object):
+
+2009-10-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Missing images at 350.org due to wrong URLs
+ https://bugs.webkit.org/show_bug.cgi?id=30748
+
+ Test: fast/dom/HTMLImageElement/parse-src.html
+
+ * dom/Element.cpp:
+ (WebCore::Element::getURLAttribute): Pass the attribute value through deprecateParseURL().
+ This matches what the Objective-C bindings do, as well as what HTMLImageLoader::sourceURI()
+ and SVGImageLoader::sourceURI() do.
+
+2009-10-24 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed.
+
+ [Qt] Build fix for QtWebKit after r50013.
+
+ * WebCore.pro:
+
+2009-10-24 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [V8] Fix up to accommodate for HTMLAllCollection changes in
+ http://trac.webkit.org/changeset/49998.
+
+ * WebCore.gypi:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+
+2009-10-23 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ <rdar://problem/7294131> Assertion failure in AuthenticationMac at
+ mac(const Credential&) after authenticating to MobileMe Gallery movie
+
+ * platform/network/Credential.cpp:
+ (WebCore::Credential::Credential): Initialize m_persistence.
+ (WebCore::Credential::isEmpty): Made this method const.
+ * platform/network/Credential.h:
+ * platform/network/mac/AuthenticationMac.mm:
+ (WebCore::mac): Return nil if the Credential is empty.
+
+2009-10-23 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=30617>.
+ Web Inspector: Resources Scope Bar Should Allow Combinations.
+
+ Refactor the filtering in ResourcePanel to make it match ConsoleView,
+ and add a divider between All, and the other choices of Resource types.
+
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel):
+ (WebInspector.ResourcesPanel.prototype.filter):
+ (WebInspector.ResourcesPanel.prototype._updateFilter):
+ * inspector/front-end/inspector.css:
+
+2009-10-23 Chris Evans <cevans@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Ignore the Refresh header if we're in view source mode.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27239
+
+ Test: http/tests/security/view-source-no-refresh.html
+
+ * loader/FrameLoader.cpp: ignore Refresh in view-source mode.
+
+2009-10-23 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30734
+ Remove XMLTokenizer::m_currentNodeIsReferenced
+
+ No change in behavior, no tests.
+
+ * dom/XMLTokenizer.cpp:
+ (WebCore::XMLTokenizer::setCurrentNode):
+ * dom/XMLTokenizer.h:
+ Don't store a boolean for the current node being the document - we can always check for that.
+
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::XMLTokenizer::XMLTokenizer):
+ * dom/XMLTokenizerQt.cpp:
+ (WebCore::XMLTokenizer::XMLTokenizer):
+ A fragment passed to XMLTokenizer is never null - in fact, the first thing we do is dereference
+ it unconditionally, and then begin checking it for null, as if it could help.
+
+2009-10-23 Beth Dakin <bdakin@apple.com>
+
+ No review since this is a build fix.
+
+ Build fix for the Mac. (Build is only broken when SVG filters are
+ enabled.)
+
+ Labelled these function static.
+ * platform/graphics/filters/FEComponentTransfer.cpp:
+ (WebCore::identity):
+ (WebCore::table):
+ (WebCore::discrete):
+ (WebCore::linear):
+ (WebCore::gamma):
+ * platform/graphics/filters/FEGaussianBlur.cpp:
+ (WebCore::boxBlur):
+
+2009-10-23 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Implement a Timeline panel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30725
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/Images/timelineIcon.png: Added.
+ * inspector/front-end/TimelineAgent.js:
+ (WebInspector.addItemToTimeline):
+ (WebInspector.timelineProfilerWasStarted):
+ (WebInspector.timelineProfilerWasStopped):
+ * inspector/front-end/TimelinePanel.js: Added.
+ (WebInspector.TimelinePanel):
+ (WebInspector.TimelinePanel.prototype.toolbarItemClass.get toolbarItemLabel):
+ (WebInspector.TimelinePanel.prototype.get statusBarItems):
+ (WebInspector.TimelinePanel.prototype.handleKeyEvent):
+ (WebInspector.TimelinePanel.prototype.timelineWasStarted):
+ (WebInspector.TimelinePanel.prototype.timelineWasStopped):
+ (WebInspector.TimelinePanel.prototype.addItemToTimeline):
+ (WebInspector.TimelinePanel.prototype._innerAddItemToTimeline):
+ (WebInspector.TimelinePanel.prototype._toggleTimelineButton):
+ (WebInspector.TimelinePanel.prototype.setMainViewWidth):
+ (WebInspector.TimelinePanel.prototype.getItemTypeName):
+ (WebInspector.TimelineRecordTreeElement):
+ (WebInspector.TimelineRecordTreeElement.prototype.onattach):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector._createPanels):
+
+2009-10-23 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Clash Between Search's onkeyup and incremental search events
+ https://bugs.webkit.org/show_bug.cgi?id=30731
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.performSearch): prevent incremental search event from clobbering a forced search
+
+2009-10-23 Kelly Norton <knorton@google.com>
+
+ Reviewed by Pavel Feldman.
+
+ Removes the need for C++ Timeline types in InspectorTimelineAgent in favor
+ of ScriptObjects.
+ https://bugs.webkit.org/show_bug.cgi?id=30707
+
+ * GNUmakefile.am:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * inspector/DOMDispatchTimelineItem.cpp: Removed.
+ * inspector/DOMDispatchTimelineItem.h: Removed.
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
+ (WebCore::InspectorTimelineAgent::willDispatchDOMEvent):
+ (WebCore::InspectorTimelineAgent::didDispatchDOMEvent):
+ (WebCore::InspectorTimelineAgent::willLayout):
+ (WebCore::InspectorTimelineAgent::didLayout):
+ (WebCore::InspectorTimelineAgent::willRecalculateStyle):
+ (WebCore::InspectorTimelineAgent::didRecalculateStyle):
+ (WebCore::InspectorTimelineAgent::willPaint):
+ (WebCore::InspectorTimelineAgent::didPaint):
+ (WebCore::InspectorTimelineAgent::willWriteHTML):
+ (WebCore::InspectorTimelineAgent::didWriteHTML):
+ (WebCore::InspectorTimelineAgent::reset):
+ (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
+ (WebCore::InspectorTimelineAgent::pushCurrentTimelineItem):
+ * inspector/InspectorTimelineAgent.h:
+ (WebCore::InspectorTimelineAgent::TimelineItemEntry::TimelineItemEntry):
+ * inspector/TimelineItem.cpp: Removed.
+ * inspector/TimelineItem.h: Removed.
+ * inspector/TimelineItemFactory.cpp: Added.
+ (WebCore::TimelineItemFactory::createGenericTimelineItem):
+ (WebCore::TimelineItemFactory::createDOMDispatchTimelineItem):
+ * inspector/TimelineItemFactory.h: Added.
+ (WebCore::):
+ (WebCore::TimelineItemFactory::TimelineItemFactory):
+
+2009-10-23 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30729
+ Provide private API to request the global context for a specific world.
+ Used to initialize parameters on the global object.
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::globalObject):
+ * bindings/js/ScriptController.h:
+
+2009-10-23 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Fixes style problems in Android-specific files.
+ https://bugs.webkit.org/show_bug.cgi?id=30717
+
+ Style changes only, no new tests possible.
+
+ * page/android/EventHandlerAndroid.cpp: Modified.
+ (WebCore::EventHandler::passMouseDownEventToWidget): Fixes whitespace in method signature.
+ (WebCore::EventHandler::passSubframeEventToSubframe): Fixes whitespace in method signature.
+ (WebCore::EventHandler::passWheelEventToWidget): Fixes whitespace in method signature.
+ (WebCore::EventHandler::passMouseMoveEventToSubframe): Fixes whitespace in method signature.
+ * platform/android/ClipboardAndroid.h: Modified. Fixes header include order and indenting.
+ * platform/android/CursorAndroid.cpp: Modified.
+ (WebCore::grabCursor): Fixes function braces.
+ (WebCore::grabbingCursor): Fixes function braces.
+ * platform/android/FileChooserAndroid.cpp: Modified.
+ (WebCore::FileChooser::basenameForWidth): Fixes braces on while statement, and updates String::copy to String::threadsafeCopy.
+ * platform/android/FileSystemAndroid.cpp: Modified. Fixes header include order.
+ (WebCore::unloadModule): Fixes zero test.
+ (WebCore::writeToFile): Fixes if statement structure.
+ * platform/android/KeyEventAndroid.cpp: Modified.
+ (WebCore::windowsKeyCodeForKeyEvent): Fixes switch statement indenting.
+ (WebCore::keyIdentifierForAndroidKeyCode): Fixes switch statement indenting.
+ * platform/android/ScreenAndroid.cpp: Modified. Fixes header include order and switch statement indenting.
+ * platform/android/TemporaryLinkStubs.cpp: Modified. Fixes header include order.
+
+2009-10-23 Sam Weinig <sam@webkit.org>
+
+ Another shot at a fixed build.
+
+ * DerivedSources.cpp:
+
+2009-10-23 Sam Weinig <sam@webkit.org>
+
+ Another shot at a fixed build.
+
+ * html/HTMLOptionsCollection.idl:
+
+2009-10-23 Brady Eidson <beidson@apple.com>
+
+ 50,000!
+
+ * ChangeLog: Point out revision 50,000.
+
+2009-10-23 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=30695
+ Drop .tags() support from HTMLCollection
+
+ - Make .tags() only work for HTMLAllCollections in JS. .tags() is still
+ available for all HTMLCollection like objects in Objective-C since that
+ is API.
+ - Auto-generate HTMLAllCollection.
+
+ Test: fast/dom/HTMLDocument/document-all.html
+
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSHTMLAllCollection.cpp: Removed.
+ * bindings/js/JSHTMLAllCollection.h: Removed.
+ * bindings/js/JSHTMLAllCollectionCustom.cpp: Added.
+ (WebCore::getNamedItems):
+ (WebCore::callHTMLAllCollection):
+ (WebCore::JSHTMLAllCollection::getCallData):
+ (WebCore::JSHTMLAllCollection::canGetItemsForName):
+ (WebCore::JSHTMLAllCollection::nameGetter):
+ (WebCore::JSHTMLAllCollection::item):
+ (WebCore::JSHTMLAllCollection::namedItem):
+ * bindings/js/JSHTMLCollectionCustom.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSHTMLDocumentCustom.cpp:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * dom/Document.cpp:
+ (WebCore::Document::all):
+ * dom/Document.h:
+ * dom/HTMLAllCollection.idl: Removed.
+ * html/HTMLAllCollection.cpp: Added.
+ (WebCore::HTMLAllCollection::create):
+ (WebCore::HTMLAllCollection::HTMLAllCollection):
+ (WebCore::HTMLAllCollection::~HTMLAllCollection):
+ * html/HTMLAllCollection.h: Added.
+ * html/HTMLAllCollection.idl: Added.
+ * html/HTMLCollection.h:
+ * html/HTMLCollection.idl:
+ * html/HTMLDocument.idl:
+ * page/DOMWindow.idl:
+
+2009-10-23 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: pull basic sidebar implementation into the Panel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30720
+
+ * inspector/front-end/Panel.js:
+ (WebInspector.Panel):
+ (WebInspector.Panel.prototype.jumpToPreviousSearchResult):
+ (WebInspector.Panel.prototype.handleKeyEvent):
+ (WebInspector.Panel.prototype._createSidebar):
+ (WebInspector.Panel.prototype._startSidebarDragging):
+ (WebInspector.Panel.prototype._sidebarDragging):
+ (WebInspector.Panel.prototype._endSidebarDragging):
+ (WebInspector.Panel.prototype._updateSidebarWidth):
+ (WebInspector.Panel.prototype.setCenterViewWidth):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel):
+ (WebInspector.ProfilesPanel.prototype.setCenterViewWidth):
+ * inspector/front-end/StoragePanel.js:
+ (WebInspector.StoragePanel):
+ (WebInspector.StoragePanel.prototype.setCenterViewWidth):
+
+2009-10-23 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Slight optimizations to object returning and exception handling in generated V8 bindings.
+ https://bugs.webkit.org/show_bug.cgi?id=30599
+
+ * bindings/scripts/CodeGeneratorV8.pm: Generate better code
+ * bindings/v8/V8DOMWrapper.h:
+ (WebCore::V8DOMWrapper::convertToV8Object): Added overload that takes a Ref<>
+ * bindings/v8/custom/V8InspectorBackendCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL): Remove unnecessary template param to prevent compile error
+
+2009-10-23 Alpha Lam <hclam@chromium.org>
+
+ Reviewed by Eric Carlson.
+
+ Volume slider always starts at half volume
+ https://bugs.webkit.org/show_bug.cgi?id=28322
+
+ Sets the value attribute of volume slider to the volume attribute
+ of the media element. Also update the value attribute of the
+ input element for the volume slider when the volume attribute
+ of the media element is updated.
+
+ Test: media/video-volume-slider.html
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlVolumeSliderElement::update):
+ Set the value attribute of the input element for the volume slider
+ using the current volume of the media element.
+ * rendering/MediaControlElements.h:
+ Add method definition of update().
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::createVolumeSlider):
+ Creates a volume slider with value attribute equals to the current
+ volume attribute of the media element.
+
+2009-10-23 Evan Martin <evan@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Chrome Linux: fix caret positioning in LTR complex languages
+ The caret is positioned off by one in languages like Thai.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28284
+
+ A group of us spent a while trying various approaches to write a test
+ for this; however, since it is only that the blinking cursor is
+ displayed incorrectly, we concluded it can not be tested.
+
+ (Patch by Hironori Bono.)
+
+ * platform/graphics/chromium/FontLinux.cpp:
+ (WebCore::Font::selectionRectForComplexText):
+
+2009-10-23 Tony Chang <tony@chromium.org>
+
+ Reviewed by David Levin.
+
+ Fix Chromium build after IsoldatedWorld change (r49963).
+ https://bugs.webkit.org/show_bug.cgi?id=30719
+
+ * bindings/ScriptControllerBase.cpp:
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::executeScriptInIsolatedWorld):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::mainThreadNormalWorld):
+ * bindings/v8/ScriptController.h:
+ (WebCore::ScriptController::windowShell):
+ (WebCore::ScriptController::existingWindowShell):
+ * dom/Document.cpp:
+ (WebCore::Document::createWrapperCache):
+ * dom/ScriptExecutionContext.cpp:
+ * dom/ScriptExecutionContext.h:
+ * xml/XMLHttpRequest.cpp:
+ * xml/XMLHttpRequest.h:
+
+2009-10-23 Xiaomei Ji <xji@chromium.org>
+
+ Reviewed by Sam Weinig.
+
+ Fix caretRangeFromPoint()/elementFromPoint() returns wrong result
+ for a zoomed and scrolled page.
+ https://bugs.webkit.org/show_bug.cgi?id=30689.
+
+ The real cause is the wrong calculation of event.clientX/Y when
+ page is zoomed and scolled.
+ After Sam fixed the event.clientX/Y in r49551, the hit test point
+ should be recalculated (revert r49490).
+
+ Test: fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::elementFromPoint): calculate the correct point
+ relative to document when page is zoomed and scrolled.
+ (WebCore::Document::caretRangeFromPoint): calculate the correct point
+ relative to document when page is zoomed and scrolled.
+
+2009-10-22 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Adding a class that allows us to enable/disable features at
+ runtime. Adding a flag to enable database support.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30653
+
+ * WebCore.gypi:
+ * bindings/v8/RuntimeEnabledFeatures.cpp: Added.
+ * bindings/v8/RuntimeEnabledFeatures.h: Added.
+ (WebCore::RuntimeEnabledFeatures::setDatabaseEnabled):
+ (WebCore::RuntimeEnabledFeatures::databaseEnabled):
+ (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::ACCESSOR_RUNTIME_ENABLER):
+ * page/DOMWindow.idl:
+
+2009-10-23 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector injects _inspectorCommandLineAPI into global object when opened
+ https://bugs.webkit.org/show_bug.cgi?id=30675
+
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.getCompletions):
+ (InjectedScript._evaluateOn):
+ (InjectedScript.addInspectedNode):
+ (InjectedScript._ensureCommandLineAPIInstalled): Moved _inspectorCommandLineAPI from window to console.
+
+2009-10-23 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] don't undef NULL in Symbian emulator
+
+ npapi.h way of defining mwerks compiler,__intel__
+ and win32 are all true for Symbian emulator.
+ Changed the definions so that NULL won't be undefined
+ when compiling for Symbian emulator nor target HW.
+
+ * bridge/npapi.h:
+
+2009-10-23 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Correct linking of sqlite3 for Symbian
+ https://bugs.webkit.org/show_bug.cgi?id=30569
+
+ ".lib" will try to include library as static library
+ causing the library to be searched from wrong directory and if found
+ will be statically linked instead of the inteded dynamic linking.
+
+ * WebCore.pro:
+
+2009-10-23 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ REGRESSION: Copy is copying incorrect background-color
+ <rdar://problem/7248529>
+ https://bugs.webkit.org/show_bug.cgi?id=29697
+
+ Test: editing/execCommand/indent-paragraphs.html
+
+ This change removes the BackgroundColor from the list
+ of inheritable CSS properties and changes significantly
+ the way we perform indentation.
+ The new implementation of IndentOutdentCommand uses a new method
+ defined in CompositeEditCommand called moveParagraphWithClones.
+ This is an improved version of the original moveParagraph that
+ is aimed at preserving the original markup of the paragraph being
+ moved.
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::): removed CSSPropertyBackgroundColor from editingStyleProperties.
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::CompositeEditCommand::CompositeEditCommand): Removed trailing blanks.
+ (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): Removed trailing blanks.
+ (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement): Added.
+ (WebCore::CompositeEditCommand::cleanupAfterDeletion): Added.
+ (WebCore::CompositeEditCommand::moveParagraphWithClones): Added.
+ (WebCore::CompositeEditCommand::moveParagraphs): Modified to use cleanupAfterDeletion.
+ (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Removed trailing blanks.
+ (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph): Removed trailing blanks.
+ (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary): Removed trailing blanks.
+ * editing/CompositeEditCommand.h: Added three new methods.
+ * editing/IndentOutdentCommand.cpp:
+ (WebCore::IndentOutdentCommand::tryIndentingAsListItem): Changed to use moveParagraphWithClones.
+ (WebCore::IndentOutdentCommand::indentIntoBlockquote): Changed to use moveParagraphWithClones.
+ (WebCore::IndentOutdentCommand::indentRegion): Removed comment.
+ * editing/IndentOutdentCommand.h: Removed prepareBlockquoteLevelForInsertion method.
+
+2009-10-23 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Adds missing UnusedParam.h includes, required when INSPECTOR is not enabled.
+ https://bugs.webkit.org/show_bug.cgi?id=30677
+
+ Build fix, no new tests required.
+
+ * page/Console.cpp: Modified. Added UnusedParam.h include.
+ * workers/WorkerContext.cpp: Modified. Added UnusedParam.h include.
+
+2009-10-23 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Plugins : Use window's winId() instead of the widget's.
+
+ As per, https://developer.mozilla.org/en/NPN_GetValue
+ NPNVnetscapeWindow on Unix/X11: "Gets the browser toplevel window in which the
+ plug-in is displayed; returns Window".
+
+ The issue was found because NPNVNetscapeWindow winId() ends up creating
+ a native window resulting in flicker.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30706
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::getValue):
+
+2009-10-23 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Windowless Plugins : Don't use m_clipRect when painting.
+
+ Though it works, it is not correct to use m_clipRect for painting
+ in Windowless mode. Instead, the rect paramater that is passed
+ as a part of PluginView::paint() must be used. This change will
+ also result in some speedup since previously we used to paint all
+ the visible parts of a windowless plugin (even if those parts were
+ not dirty).
+
+ Also, fix invalidateRect() to compute the correct width and height.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30711
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::paint):
+ (WebCore::PluginView::invalidateRect):
+
+2009-10-21 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Holger Freyther.
+
+ Plugins : Use test.swf in the plugins manual tests.
+
+ They previously referenced youtube videos which among other things are
+ cumbersome to use without internet connection. The old youtube link is
+ just commented out so that testing with youtube can be done with
+ little effort.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30662
+
+ * manual-tests/plugins/test.swf: Copied from LayoutTests/fast/replaced/resources/test.swf.
+ * manual-tests/plugins/windowed.html:
+ * manual-tests/plugins/windowless.html:
+ * manual-tests/qt/plugin-sibling-frame-include.html:
+
+2009-10-23 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Fix the Windows Release build by moving Accessibility files
+ into all-in-one file and excluding them from the build.
+
+ * WebCore.vcproj/WebCore.vcproj:
+ * accessibility/AccessibilityAllInOne.cpp: Added.
+
+2009-10-16 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig & Geoff Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30696
+ Add support for IsolatedWorlds to JSC bindings.
+
+ An IsolatedWorld is basically a parallel, separate copy of the window shells and DOM wrapper objects for
+ a given document. To support isolation this patch:
+
+ * Adds support to the ScriptController to track multiple window shells, one per world.
+ * Adds support to Document to support multiple separate wrapper-maps, one per world.
+ * Replaces the single global DOM wrapper map (on the WebCoreJSClientData) with separate maps,
+ stored on the (new) IsolatedWorld objects.
+
+ In addition to supporting separate copies of these objects, two other features are supported:
+
+ * It is necessary to track the current world on entry into JSC, so that within callbacks out to WebCore
+ we can determine which world (and as such, set of DOM bindings) we should be operating on.
+ * EventListeners & Callbacks are run in the world they were registered in.
+ This requires the handler to retain a reference to the world.
+
+ No new tests. (Enabled existing isolated world layout tests.)
+
+ * WebCore.base.exp:
+ * bindings/js/JSAbstractWorkerCustom.cpp:
+ (WebCore::JSAbstractWorker::addEventListener):
+ (WebCore::JSAbstractWorker::removeEventListener):
+ * bindings/js/JSCallbackData.cpp:
+ (WebCore::JSCallbackData::invokeCallback):
+ * bindings/js/JSCallbackData.h:
+ (WebCore::JSCallbackData::JSCallbackData):
+ * bindings/js/JSCustomXPathNSResolver.cpp:
+ (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
+ * bindings/js/JSDOMApplicationCacheCustom.cpp:
+ (WebCore::JSDOMApplicationCache::addEventListener):
+ (WebCore::JSDOMApplicationCache::removeEventListener):
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::removeWrappers):
+ (WebCore::DOMObjectWrapperMap::get):
+ (WebCore::DOMObjectWrapperMap::set):
+ (WebCore::DOMObjectWrapperMap::remove):
+ (WebCore::DOMObjectWrapperMap::take):
+ (WebCore::IsolatedWorld::IsolatedWorld):
+ (WebCore::IsolatedWorld::~IsolatedWorld):
+ (WebCore::EnterIsolatedWorld::EnterIsolatedWorld):
+ (WebCore::EnterIsolatedWorld::~EnterIsolatedWorld):
+ (WebCore::JSGlobalDataWorldIterator::JSGlobalDataWorldIterator):
+ (WebCore::JSGlobalDataWorldIterator::operator bool):
+ (WebCore::JSGlobalDataWorldIterator::operator*):
+ (WebCore::JSGlobalDataWorldIterator::operator->):
+ (WebCore::JSGlobalDataWorldIterator::operator++):
+ (WebCore::getCurrentWorld):
+ (WebCore::getNormalWorld):
+ (WebCore::commonNormalWorld):
+ (WebCore::commonCurrentWorld):
+ (WebCore::DOMObjectHashTableMap::mapFor):
+ (WebCore::DOMObjectWrapperMap::mapFor):
+ (WebCore::forgetDOMObject):
+ (WebCore::getCachedDOMNodeWrapper):
+ (WebCore::forgetDOMNode):
+ (WebCore::cacheDOMNodeWrapper):
+ (WebCore::forgetAllDOMNodesForDocument):
+ (WebCore::forgetWorldOfDOMNodesForDocument):
+ (WebCore::isObservableThroughDOM):
+ (WebCore::markDOMNodesForDocument):
+ (WebCore::markActiveObjectsForContext):
+ (WebCore::takeWrappers):
+ (WebCore::updateDOMNodeDocument):
+ (WebCore::markDOMObjectWrapper):
+ (WebCore::allowsAccessFromFrame):
+ (WebCore::printErrorMessageForFrame):
+ (WebCore::JSC_DebuggerCallFrame_evaluateInWorld):
+ (WebCore::JSC_callInWorld):
+ (WebCore::JSC_constructInWorld):
+ (WebCore::JSC_evaluateInWorld):
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::IsolatedWorld::rememberDocument):
+ (WebCore::IsolatedWorld::forgetDocument):
+ (WebCore::IsolatedWorld::rememberScriptController):
+ (WebCore::IsolatedWorld::forgetScriptController):
+ (WebCore::DOMObjectHashTableMap::~DOMObjectHashTableMap):
+ (WebCore::DOMObjectHashTableMap::get):
+ (WebCore::WebCoreJSClientData::WebCoreJSClientData):
+ (WebCore::WebCoreJSClientData::currentWorld):
+ (WebCore::WebCoreJSClientData::normalWorld):
+ (WebCore::WebCoreJSClientData::rememberWorld):
+ (WebCore::WebCoreJSClientData::forgetWorld):
+ (WebCore::debuggerWorld):
+ (WebCore::pluginWorld):
+ * bindings/js/JSDOMGlobalObject.cpp:
+ (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
+ (WebCore::toJSDOMGlobalObject):
+ * bindings/js/JSDOMGlobalObject.h:
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::JSDOMWindowBase::printErrorMessage):
+ (WebCore::JSDOMWindowBase::commonJSGlobalData):
+ (WebCore::toJS):
+ (WebCore::toJSDOMWindow):
+ * bindings/js/JSDOMWindowBase.h:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::createWindow):
+ (WebCore::JSDOMWindow::open):
+ (WebCore::JSDOMWindow::showModalDialog):
+ (WebCore::JSDOMWindow::setTimeout):
+ (WebCore::JSDOMWindow::setInterval):
+ (WebCore::JSDOMWindow::addEventListener):
+ (WebCore::JSDOMWindow::removeEventListener):
+ * bindings/js/JSDOMWindowShell.cpp:
+ (WebCore::toJS):
+ (WebCore::toJSDOMWindowShell):
+ * bindings/js/JSDOMWindowShell.h:
+ * bindings/js/JSDesktopNotificationsCustom.cpp:
+ (WebCore::JSNotification::addEventListener):
+ (WebCore::):
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::JSEventListener::JSEventListener):
+ (WebCore::JSEventListener::handleEvent):
+ (WebCore::JSEventListener::reportError):
+ * bindings/js/JSEventListener.h:
+ (WebCore::JSEventListener::create):
+ * bindings/js/JSEventSourceCustom.cpp:
+ (WebCore::JSEventSource::addEventListener):
+ (WebCore::JSEventSource::removeEventListener):
+ * bindings/js/JSEventTarget.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSHTMLDocumentCustom.cpp:
+ (WebCore::JSHTMLDocument::open):
+ * bindings/js/JSHTMLFrameSetElementCustom.cpp:
+ (WebCore::JSHTMLFrameSetElement::nameGetter):
+ * bindings/js/JSInspectorBackendCustom.cpp:
+ (WebCore::JSInspectorBackend::databaseForId):
+ (WebCore::JSInspectorBackend::inspectedWindow):
+ (WebCore::JSInspectorBackend::nodeForId):
+ * bindings/js/JSLazyEventListener.cpp:
+ (WebCore::JSLazyEventListener::JSLazyEventListener):
+ (WebCore::JSLazyEventListener::parseCode):
+ * bindings/js/JSLazyEventListener.h:
+ (WebCore::JSLazyEventListener::create):
+ * bindings/js/JSMessageChannelCustom.cpp:
+ (WebCore::JSMessageChannel::markChildren):
+ * bindings/js/JSMessagePortCustom.cpp:
+ (WebCore::JSMessagePort::markChildren):
+ (WebCore::JSMessagePort::addEventListener):
+ (WebCore::JSMessagePort::removeEventListener):
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::addEventListener):
+ (WebCore::JSNode::removeEventListener):
+ (WebCore::JSNode::markChildren):
+ * bindings/js/JSNodeFilterCondition.cpp:
+ (WebCore::JSNodeFilterCondition::acceptNode):
+ * bindings/js/JSQuarantinedObjectWrapper.cpp:
+ (WebCore::JSQuarantinedObjectWrapper::construct):
+ (WebCore::JSQuarantinedObjectWrapper::call):
+ * bindings/js/JSSVGElementInstanceCustom.cpp:
+ (WebCore::JSSVGElementInstance::addEventListener):
+ (WebCore::JSSVGElementInstance::removeEventListener):
+ * bindings/js/JSSharedWorkerCustom.cpp:
+ (WebCore::JSSharedWorker::markChildren):
+ * bindings/js/JSWebSocketCustom.cpp:
+ (WebCore::JSWebSocket::addEventListener):
+ (WebCore::JSWebSocket::removeEventListener):
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::addEventListener):
+ (WebCore::JSWorkerContext::removeEventListener):
+ (WebCore::JSWorkerContext::setTimeout):
+ (WebCore::JSWorkerContext::setInterval):
+ * bindings/js/JSXMLHttpRequestConstructor.cpp:
+ (WebCore::constructXMLHttpRequest):
+ * bindings/js/JSXMLHttpRequestCustom.cpp:
+ (WebCore::JSXMLHttpRequest::markChildren):
+ (WebCore::JSXMLHttpRequest::addEventListener):
+ (WebCore::JSXMLHttpRequest::removeEventListener):
+ * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
+ (WebCore::JSXMLHttpRequestUpload::markChildren):
+ (WebCore::JSXMLHttpRequestUpload::addEventListener):
+ (WebCore::JSXMLHttpRequestUpload::removeEventListener):
+ * bindings/js/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::create):
+ (WebCore::ScheduledAction::ScheduledAction):
+ (WebCore::ScheduledAction::executeFunctionInContext):
+ (WebCore::ScheduledAction::execute):
+ * bindings/js/ScheduledAction.h:
+ (WebCore::ScheduledAction::ScheduledAction):
+ * bindings/js/ScriptCachedFrameData.cpp:
+ (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
+ (WebCore::ScriptCachedFrameData::restore):
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::~ScriptController):
+ (WebCore::ScriptController::evaluateInWorld):
+ (WebCore::ScriptController::evaluate):
+ (WebCore::ScriptController::evaluateInIsolatedWorld):
+ (WebCore::ScriptController::clearWindowShell):
+ (WebCore::ScriptController::initScript):
+ (WebCore::ScriptController::processingUserGestureEvent):
+ (WebCore::ScriptController::attachDebugger):
+ (WebCore::ScriptController::updateDocument):
+ (WebCore::ScriptController::bindingRootObject):
+ (WebCore::ScriptController::createRootObject):
+ (WebCore::ScriptController::windowScriptNPObject):
+ (WebCore::ScriptController::jsObjectForPluginElement):
+ * bindings/js/ScriptController.h:
+ (WebCore::ScriptController::windowShell):
+ (WebCore::ScriptController::existingWindowShell):
+ (WebCore::ScriptController::globalObject):
+ (WebCore::ScriptController::forgetWorld):
+ * bindings/js/ScriptControllerMac.mm:
+ (WebCore::ScriptController::windowScriptObject):
+ * bindings/js/ScriptEventListener.cpp:
+ (WebCore::createAttributeEventListener):
+ * bindings/js/ScriptFunctionCall.cpp:
+ (WebCore::ScriptFunctionCall::call):
+ (WebCore::ScriptFunctionCall::construct):
+ * bindings/js/ScriptObjectQuarantine.cpp:
+ (WebCore::getQuarantinedScriptObject):
+ * bindings/js/ScriptState.cpp:
+ (WebCore::scriptStateFromNode):
+ (WebCore::scriptStateFromPage):
+ * bindings/js/ScriptState.h:
+ * bindings/js/WorkerScriptController.cpp:
+ (WebCore::WorkerScriptController::WorkerScriptController):
+ (WebCore::WorkerScriptController::evaluate):
+ * bindings/objc/DOMInternal.mm:
+ (-[WebScriptObject _initializeScriptDOMNodeImp]):
+ * bindings/objc/WebScriptObject.mm:
+ (-[WebScriptObject callWebScriptMethod:withArguments:]):
+ (-[WebScriptObject evaluateWebScript:]):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bridge/NP_jsobject.cpp:
+ (_NPN_InvokeDefault):
+ (_NPN_Invoke):
+ (_NPN_Evaluate):
+ (_NPN_Construct):
+ * bridge/jni/jni_jsobject.mm:
+ (JavaJSObject::call):
+ (JavaJSObject::eval):
+ * dom/Document.cpp:
+ (WebCore::Document::createWrapperCache):
+ * dom/Document.h:
+ (WebCore::Document::wrapperCacheMap):
+ (WebCore::Document::getWrapperCache):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::startUserInitiatedProfiling):
+ (WebCore::InspectorController::stopUserInitiatedProfiling):
+ * inspector/JavaScriptCallFrame.cpp:
+ (WebCore::JavaScriptCallFrame::evaluate):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::dispatchWindowObjectAvailable):
+ * platform/network/mac/AuthenticationMac.mm:
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::XMLHttpRequest):
+ (WebCore::XMLHttpRequest::dropProtection):
+ * xml/XMLHttpRequest.h:
+ (WebCore::XMLHttpRequest::create):
+
+2009-10-22 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: EventListenersSidebarPane TODO No Longer Needed
+ https://bugs.webkit.org/show_bug.cgi?id=30705
+
+ * inspector/front-end/EventListenersSidebarPane.js:
+
+2009-10-22 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30506
+ <rdar://problem/7319845> Resources that the server sent as 304 not modified are not shown
+ in the inspectors resource pane
+
+ I don't know how to make a test for this.
+
+ The issue here was that preloaded resources weren't added to DocLoader document resource set,
+ but Web Inspector asked DocLoader to fetch data from CachedResource. Even when (if) document
+ parser eventually requested the same resource for real and it got added to resource set, it
+ was too late - the Inspector wasn't updated.
+
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::cachedResource):
+ (WebCore::InspectorResource::type):
+ (WebCore::InspectorResource::resourceData):
+ * inspector/InspectorResource.h:
+ Fix the issue by trying to fetch corresponding CachedResource harder - also look in global
+ cache. This seems safe, and easier than updating the Inspector on transitions between
+ resource states (revalidate vs. revalidate done and preload vs. non-preload).
+
+2009-10-22 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for <rdar://problem/6942706> ER: Add a CSS property that allows
+ shadows to work for SVG content
+ -and corresponding-
+ https://bugs.webkit.org/show_bug.cgi?id=30479
+
+ This patch adds a new SVG-specific CSS property called -webkit-
+ shadow that has the same syntax as -webkit-box-shadow
+
+ Add CSSPropertyWebkitShadow to the list of SVG CSS properties, and
+ make valueForShadow a member function rather than a static function
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::):
+ (WebCore::CSSComputedStyleDeclaration::valueForShadow):
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * css/CSSComputedStyleDeclaration.h:
+
+ Call valueForShadow for CSSPropertyWebkitShadow
+ * css/SVGCSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
+
+ Do standard CSS stuff for CSSPropertyWebkitShadow
+ * css/SVGCSSParser.cpp:
+ (WebCore::CSSParser::parseSVGValue):
+ * css/SVGCSSPropertyNames.in:
+ * css/SVGCSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applySVGProperty):
+
+ Set the appropriate shadow on the paint context if we have one.
+ This seems to be all we have to do to have an SVG-shaped shadow.
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderBase::prepareToRenderSVGContent):
+
+ Add shadow to SVGRenderStyle. I added a new macro that I don't like
+ just because that's the way things are done here right now.
+ * rendering/style/SVGRenderStyle.cpp:
+ (WebCore::SVGRenderStyle::SVGRenderStyle):
+ (WebCore::SVGRenderStyle::operator==):
+ * rendering/style/SVGRenderStyle.h:
+ * rendering/style/SVGRenderStyleDefs.cpp:
+ (StyleShadowSVGData::StyleShadowSVGData):
+ (StyleShadowSVGData::operator==):
+ * rendering/style/SVGRenderStyleDefs.h:
+ (WebCore::StyleShadowSVGData::create):
+ (WebCore::StyleShadowSVGData::copy):
+ (WebCore::StyleShadowSVGData::operator!=):
+
+2009-10-22 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25530
+ [Gtk] Implement LABEL_FOR/LABELLED_BY relationship pair for labels
+
+ Implements atk_object_ref_relation_set and LABEL_FOR/LABELLED_BY.
+ Also causes the accessible name for labeled controls to be based on
+ the label as expected, rather than based on the contents.
+
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/AccessibilityRenderObject.cpp:
+ (correspondingLabelForControlElement):
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (setAtkRelationSetFromCoreObject):
+ (webkit_accessible_ref_relation_set):
+ (webkit_accessible_class_init):
+ (webkit_accessible_get_name):
+
+2009-10-22 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: windowFocused and windowBlured Fail to Clear/Mark Inspector as "inactive"
+ https://bugs.webkit.org/show_bug.cgi?id=30663
+
+ Correctly handle focusing/blurring on inner <iframe>'s such as Source Frames.
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.windowFocused): fix for inner iframes
+ (WebInspector.windowBlurred): fix for inner iframes
+ (WebInspector.addMainEventListeners): change useCapture to false
+
+2009-10-22 Jaime Yap <jaimeyap@google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Makes a page reload optional when activating resource monitoring in
+ InspectorController. It leaves the default behavior as performing the reload.
+ Reload is an optional param so callsites do not have to change.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30684
+
+ No new tests added.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::enableResourceTracking):
+ * inspector/InspectorController.h:
+
+2009-10-22 Shu Chang <Chang.Shu@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Fix memory leak in QNetworkReplyHandler::abort().
+ In QNetworkReplyHandler::release(), m_reply should no longer point to its parent
+ after being released.
+ https://bugs.webkit.org/show_bug.cgi?id=30167
+
+ No layout test available as a non-functional fix.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::abort):
+ (WebCore::QNetworkReplyHandler::release):
+
+2009-10-22 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Fix DOMAgent leak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30615
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::~InspectorController):
+ (WebCore::InspectorController::setFrontendProxyObject):
+ (WebCore::InspectorController::close):
+ (WebCore::InspectorController::releaseDOMAgent):
+ * inspector/InspectorController.h:
+ * inspector/InspectorDOMAgent.h:
+ (WebCore::InspectorDOMAgent::create):
+
+2009-10-22 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Rework event listeners to not hold references to frame or V8 context.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30648
+
+ Covered by existing layout tests: fast/events/attribute-listener*
+
+ * bindings/scripts/CodeGeneratorV8.pm: Added passing ScriptExecutionContext*
+ to event listener handling code.
+ * bindings/v8/DateExtension.cpp:
+ (WebCore::DateExtension::setAllowSleep): Changed to use currentContext().
+ * bindings/v8/ScriptEventListener.cpp:
+ (WebCore::createAttributeEventListener): Reworked to match JSC logic.
+ (WebCore::getEventListenerHandlerBody): Added ScriptExecutionContext* param.
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::V8AbstractEventListener): Removed Frame* param
+ and usage.
+ (WebCore::V8AbstractEventListener::handleEvent): Chaged to use ScriptExecutionContext*.
+ (WebCore::V8AbstractEventListener::invokeEventHandler): Ditto.
+ * bindings/v8/V8AbstractEventListener.h:
+ (WebCore::V8AbstractEventListener::getListenerObject): Ditto.
+ (WebCore::V8AbstractEventListener::prepareListenerObject): Ditto.
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertEventListenerToV8Object): Added ScriptExecutionContext* param.
+ (WebCore::V8DOMWrapper::getEventListener): Ditto.
+ * bindings/v8/V8DOMWrapper.h:
+ (WebCore::V8DOMWrapper::convertEventListenerToV8Object): Ditto.
+ * bindings/v8/V8EventListenerList.h:
+ (WebCore::V8EventListenerList::findOrCreateWrapper): Removed ContextType* template param,
+ because it's no longer needed.
+ * bindings/v8/V8IsolatedWorld.h:
+ (WebCore::V8IsolatedWorld::sharedContext): Renamed from shared_context.
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::V8LazyEventListener): Removed Frame* param and usage.
+ (WebCore::V8LazyEventListener::callListenerFunction): Added ScriptExecutionContext* param.
+ (WebCore::V8LazyEventListener::prepareListenerObject): Ditto.
+ * bindings/v8/V8LazyEventListener.h:
+ (WebCore::V8LazyEventListener::create): Reordered params to match JSC impl.
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::V8Proxy): Adjusted formatting to match WebKit style.
+ (WebCore::V8Proxy::evaluateInNewContext): Changed to use m_context directly.
+ (WebCore::V8Proxy::setInjectedScriptContextDebugId): Ditto.
+ (WebCore::V8Proxy::createWrapperFromCacheSlowCase): Ditto.
+ (WebCore::V8Proxy::isContextInitialized): Ditto.
+ (WebCore::V8Proxy::updateDocumentWrapperCache): Ditto.
+ (WebCore::V8Proxy::clearDocumentWrapperCache): Ditto.
+ (WebCore::V8Proxy::disposeContextHandles): Added explicit disposing of m_context.
+ (WebCore::V8Proxy::clearForClose): Changed to use m_context directly.
+ (WebCore::V8Proxy::clearForNavigation): Ditto.
+ (WebCore::V8Proxy::setSecurityToken): Ditto.
+ (WebCore::V8Proxy::updateDocument): Ditto.
+ (WebCore::V8Proxy::initContextIfNeeded): Ditto.
+ (WebCore::V8Proxy::context): Changed to use v8::Local.
+ (WebCore::V8Proxy::mainWorldContext): Changed to use m_context directly.
+ (WebCore::V8Proxy::setContextDebugId): Ditto.
+ (WebCore::toV8Context):
+ * bindings/v8/V8Proxy.h: Removed shared_context decl, changed to use straight
+ v8::Persistent for m_context.
+ * bindings/v8/V8WorkerContextEventListener.cpp:
+ (WebCore::workerProxy): Added.
+ (WebCore::V8WorkerContextEventListener::V8WorkerContextEventListener): Removed
+ WorkerContextExecutionProxy* param.
+ (WebCore::V8WorkerContextEventListener::handleEvent): Started using ScriptExecutionContext*.
+ (WebCore::V8WorkerContextEventListener::reportError): Ditto.
+ (WebCore::V8WorkerContextEventListener::callListenerFunction): Ditto.
+ (WebCore::V8WorkerContextEventListener::getReceiverObject): Ditto.
+ * bindings/v8/V8WorkerContextEventListener.h:
+ (WebCore::V8WorkerContextEventListener::create): Removed
+ WorkerContextExecutionProxy* param.
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::findOrCreateEventListener): Removed ContextType*
+ template param.
+ * bindings/v8/custom/V8CustomEventListener.cpp:
+ (WebCore::V8EventListener::V8EventListener): Removed Frame* param.
+ (WebCore::V8EventListener::getListenerFunction): Started using ScriptExecutionContext*.
+ (WebCore::V8EventListener::callListenerFunction): Ditto.
+ * bindings/v8/custom/V8CustomEventListener.h:
+ (WebCore::V8EventListener::create): Removed Frame* param.
+
+2009-10-14 Gaurav Shah <gauravsh@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Replaces temporary link stub for <keygen> tag handler for the Chromium
+ browser with a call via the Chromium Bridge.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30360
+
+ * platform/SSLKeyGenerator.h:
+ * platform/chromium/ChromiumBridge.h:
+ * platform/chromium/SSLKeyGeneratorChromium.cpp:
+ (WebCore::getSupportedKeySizes):
+ (WebCore::signedPublicKeyAndChallengeString):
+ * platform/chromium/TemporaryLinkStubs.cpp:
+ (WebCore::KURL::fileSystemPath):
+ (WebCore::SharedBuffer::createWithContentsOfFile):
+
+2009-10-22 Avi Drissman <avi@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fixes Chromium Mac pasteboard handling to flow through the same code paths as other platforms.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30591
+
+ * platform/chromium/ChromiumBridge.h:
+ * platform/chromium/PasteboardChromium.cpp:
+ (WebCore::Pasteboard::writeImage):
+
+2009-10-20 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Make accelerated compositing debug indicators work in release builds
+ https://bugs.webkit.org/show_bug.cgi?id=30588
+
+ Allow some debug indicators, that show which page elements go into compositing layers,
+ to work in release builds, when the runtime prefs are set.
+
+ * platform/graphics/GraphicsLayer.cpp:
+ (WebCore::GraphicsLayer::GraphicsLayer):
+ (WebCore::GraphicsLayer::setZPosition):
+ * platform/graphics/GraphicsLayer.h:
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::clearBorderColor):
+ (WebCore::GraphicsLayer::showRepaintCounter):
+ (WebCore::GraphicsLayerCA::GraphicsLayerCA):
+ (WebCore::GraphicsLayerCA::updateMasksToBounds):
+ (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
+ (WebCore::GraphicsLayerCA::setDebugBorder):
+ (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
+ (WebCore::GraphicsLayerCA::setupContentsLayer):
+ * platform/graphics/mac/WebLayer.mm:
+
+2009-10-22 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Pavel Feldman.
+
+ Inspector should support monitorEvents/un monitorEvents() in the command line
+ https://bugs.webkit.org/show_bug.cgi?id=19879
+
+ * inspector/front-end/EventListenersSidebarPane.js:
+ (WebInspector.EventListenersSidebarPane.prototype.update.callback): Ignores event listeners generated by monitorEvent
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript._ensureCommandLineAPIInstalled): Added _inspectorCommandLineAPI._logEvent, _allEventTypes,
+ _normalizeEventTypes, monitorEvent, unmonitorEvent.
+
+2009-10-21 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: windowFocused and windowBlurred Fail to Clear/Mark Inspector as "inactive"
+ https://bugs.webkit.org/show_bug.cgi?id=30663
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.windowFocused):
+ (WebInspector.windowBlurred):
+
+2009-10-22 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Error - requestContentType [undefined] is not an object
+ https://bugs.webkit.org/show_bug.cgi?id=30666
+
+ * inspector/front-end/ResourceView.js:
+ (WebInspector.ResourceView.prototype._refreshFormData):
+
+2009-10-22 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Holger Freyther.
+
+ [Haiku] Correction of the accented letter width (they were 2 characters long).
+ https://bugs.webkit.org/show_bug.cgi?id=30629
+
+ * platform/graphics/haiku/SimpleFontDataHaiku.cpp:
+ (WebCore::SimpleFontData::platformWidthForGlyph):
+
+2009-10-21 Jon Honeycutt <jhoneycutt@apple.com>
+
+ <rdar://problem/7270320> Screenshots of off-screen plug-ins are blank
+ <rdar://problem/7270314> After halting a transparent PluginView on
+ Windows, the transparency is applied twice
+
+ Replace use of Frame::nodeImage() with a function that takes a snapshot
+ of a PluginView.
+
+ Reviewed by Dan Bernstein.
+
+ * plugins/PluginView.h:
+ Made paintWindowedPluginIntoContext() non-const, as it now calls
+ paintIntoTransformedContext(). Declare paintIntoTransformedContext()
+ and snapshot() for Windows platforms.
+
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::paintIntoTransformedContext):
+ Paints into the passed HDC without applying any coordinate translations.
+ Code moved from paintWindowedPluginIntoContext() and paint(). Removed
+ the memset() of windowpos in lieu of assignment.
+ (WebCore::PluginView::paintWindowedPluginIntoContext):
+ Code moved to paintIntoTransformedContext().
+ (WebCore::PluginView::paint):
+ Ditto.
+ (WebCore::PluginView::snapshot):
+ Create a context, and if the plug-in is windowless, translate it so the
+ plug-in will draw at the correct location. Create a bitmap, and select
+ it into the context. Paint the plug-in, and create a BitmapImage from
+ the bitmap.
+ (WebCore::PluginView::halt):
+ Use snapshot().
+
+2009-10-22 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Fix calculation of length in WebSocketChannel.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=30656
+
+ * websockets/WebSocketChannel.cpp:
+ (WebCore::WebSocketChannel::didReceiveData):
+
+2009-10-21 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Adding the ability to enable/disable functions in V8 at runtime.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30650
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+
+2009-10-21 Darin Adler <darin@apple.com>
+
+ Swedish search (and other languages as well) is broken while fixing Japanese search
+ https://bugs.webkit.org/show_bug.cgi?id=30646
+
+ Rolled Japanese tailoring out that was done to fix
+ https://bugs.webkit.org/show_bug.cgi?id=30437 earlier.
+ It was overriding the locale-specific tailoring.
+ We'll land a fix once we figure out how to add the
+ Japanese tailoring without removing anything.
+
+ * editing/TextIterator.cpp: Rolled out r49924.
+
+2009-10-21 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed: chromium build fix - add missing image to gypi.
+
+ * WebCore.gypi:
+
+2009-10-21 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Fixes part of <http://webkit.org/b/30522>.
+ Web Inspector: DOM Exceptions throughout the Inspector should be more human readable.
+
+ Expose the description attribute that is now a member of
+ ExceptionBase as of r49723, so when a user logs an exception, they
+ can see the description in the Web Inspector.
+
+ Test: fast/dom/dom-exception-description.html
+
+ * dom/DOMCoreException.idl:
+ * dom/EventException.idl:
+ * dom/RangeException.idl:
+ * svg/SVGException.idl:
+ * xml/XMLHttpRequestException.idl:
+ * xml/XPathException.idl:
+
+2009-10-21 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=30616>.
+ REGRESSION (r49036): Web Inspector: Summary graph no longer switching to size summary.
+
+ Add a check to make sure a function we need to calculate percentages is
+ defined before we use it.
+
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype._updateGraphDividersIfNeeded):
+
+2009-10-21 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ REGRESSION: Clicking on nodes in the console should take you to the element in the DOM
+ https://bugs.webkit.org/show_bug.cgi?id=27231
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._formatnode): Turns on ElementsTreeOutline.showInElementsPanelEnabled
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeOutline): Added ElementsTreeOutline.showInElementsPanelEnabled
+ (WebInspector.ElementsTreeElement.prototype.onmousedown): Reveals the node in the Elements panel if
+ treeOutline.showInElementsPanelEnabled is true.
+
+2009-10-21 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30637
+ Fix a compiler warning in windows.
+
+ * loader/ResourceLoadNotifier.h:
+
+2009-10-21 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix the crash when a node not in a document receives dispatchEvent.
+ https://bugs.webkit.org/show_bug.cgi?id=30611
+
+ Test: fast/events/dispatch-event-no-document.html
+
+ * dom/EventTarget.cpp: Check for scriptExecutionContext() at the moment of dispatchEvent; do nothing if no context.
+ (WebCore::EventTarget::dispatchEvent):
+
+2009-10-21 Adam Langley <agl@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Chromium Linux: disable subpixel text on layers.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30635
+ http://code.google.com/p/chromium/issues/detail?id=25365
+
+ With the addition of layers for drawing rounded corners in r49641,
+ subpixel text on rounded rectangles broke. This is because the layer
+ only contains a single alpha channel and this is insufficient to
+ compose subpixel text correctly.
+
+ On Windows, a large body of code in TransparencyWin.cpp exists to try
+ to deal with this. Even then, in some cases, it downgrades to
+ anti-aliased text. We need a fix for the grevious effects quickly thus
+ this patch disables subpixel text when rendering into a layer.
+
+ This would be covered by existing tests except that subpixel text is
+ disabled for pixel tests on Chromium Linux.
+
+ * platform/graphics/chromium/FontLinux.cpp:
+ (WebCore::isCanvasMultiLayered):
+ (WebCore::adjustTextRenderMode):
+ (WebCore::Font::drawGlyphs):
+ (WebCore::Font::drawComplexText):
+
+2009-10-21 Kevin Ollivier <kevino@theolliviers.com>
+
+ wxMac 10.4 build fix, make sure we specify the Sqlite3 dependency correctly as otherwise
+ it will use the sqlite3 system library rather than WebCoreSQLite3.
+
+ * wscript:
+
+2009-10-21 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fixed background-clip parsing regressions introduced in r46240.
+
+ Test: fast/css/background-clip-text.html
+
+ * css/CSSParser.cpp:
+ (WebCore::parseBackgroundClip): Added this helper method.
+ (WebCore::CSSParser::parseFillShorthand): Use parseBackgroundClip() to
+ reparse the value. The old code called parseFillProperty() again, which
+ didn’t work, because parseFillProperty() advances the value list.
+ (WebCore::CSSParser::parseFillProperty): Changed to use
+ parseBackgroundClip().
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::operator EFillBox): Added a case for
+ CSSValueWebkitText.
+
+2009-10-21 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Enable creation of custom SidebarTreeElements for different ProfileTypes
+
+ ProfileTypes can now create sidebar tree elements of custom types.
+ https://bugs.webkit.org/show_bug.cgi?id=30520
+
+ * inspector/front-end/ProfileView.js:
+ (WebInspector.CPUProfileType.prototype.setRecordingProfile):
+ (WebInspector.CPUProfileType.prototype.createSidebarTreeElementForProfile):
+ (WebInspector.CPUProfileType.prototype.createView):
+ (WebInspector.CPUProfile.prototype.get head):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfileType.prototype.buttonClicked):
+ (WebInspector.ProfileType.prototype.viewForProfile):
+ (WebInspector.ProfileType.prototype.createView):
+ (WebInspector.ProfileType.prototype.createSidebarTreeElementForProfile):
+ (WebInspector.ProfilesPanel.prototype.addProfileHeader):
+ (WebInspector.ProfilesPanel.prototype.showProfile):
+
+2009-10-20 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Selectors in the Styles pane should trigger a search for that selector when clicked
+ https://bugs.webkit.org/show_bug.cgi?id=17126
+
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.addNodesToSearchResult): only change focusedDOMNode on a manual search
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertiesSection.prototype._clickSelector): trigger a search
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype._startEditing): correctly start editing attribute value instead of name
+
+2009-10-20 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Fix DOM Agent leak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30615
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::~InspectorController):
+
+2009-10-21 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Holger Freyther.
+
+ Plugins: Create manual tests for testing plugins
+
+ Create two test files:
+ 1. windowed.html - Test plugin in windowed mode.
+ 2. windowless.html - Test plugin in windowless mode.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30503
+
+ * manual-tests/plugins/windowed.html: Added.
+ * manual-tests/plugins/windowless.html: Added.
+
+2009-10-21 Satoshi Nakagawa <psychs@limechat.net>
+
+ Reviewed by Darin Adler.
+
+ Fixed Japanese text search problems.
+ Treat small kana letters and kana letters as different characters in search.
+ Do not ignore diacritic marks in search for Japanese texts.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30437
+
+ Test: fast/text/international/japanese-kana-letters.html
+
+ * editing/TextIterator.cpp:
+ (WebCore::createCollator):
+ (WebCore::collator):
+ (WebCore::createSearcher):
+
+2009-10-20 Eric Z. Ayers <zundel@google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Changes TimelineItems to be created with raw timestamps as opposed
+ to a time relative to a start of session. Normalized timestamps cause
+ problems when monitoring a browsing session across multiple page
+ transitions.
+
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
+ (WebCore::InspectorTimelineAgent::willDispatchDOMEvent):
+ (WebCore::InspectorTimelineAgent::willLayout):
+ (WebCore::InspectorTimelineAgent::willRecalculateStyle):
+ (WebCore::InspectorTimelineAgent::willPaint):
+ (WebCore::InspectorTimelineAgent::willWriteHTML):
+ (WebCore::InspectorTimelineAgent::reset):
+ (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
+ * inspector/InspectorTimelineAgent.h:
+
+2009-10-20 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix leak of WebSocketChannel by adopting the newly-created reference.
+
+ * websockets/WebSocketChannel.h:
+ (WebCore::WebSocketChannel::create):
+
+2009-10-20 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ DOM Storage runtime flag changes
+ https://bugs.webkit.org/show_bug.cgi?id=30602
+
+ Part 1/2. Removing sessionStorageEnabled in next patch after the
+ Chromium side of the changes lands.
+
+ Revert my changes to Settings and instead implement DOM Storage enabling via
+ the methods agreed upon in https://bugs.webkit.org/show_bug.cgi?id=30240
+
+ This stuff was (intentionally) never exposed to web pages or DRT, so there's no
+ LayoutTest visible changes and thus no tests.
+
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::ACCESSOR_RUNTIME_ENABLER):
+ * page/DOMWindow.idl:
+ * storage/Storage.cpp:
+ (WebCore::Storage::setLocalStorageAvailable):
+ (WebCore::Storage::localStorageAvailable):
+ (WebCore::Storage::setSessionStorageAvailable):
+ (WebCore::Storage::sessionStorageAvailable):
+ * storage/Storage.h:
+
+2009-10-20 John Gregg <johnnyg@google.com>
+
+ Reviewed by David Levin.
+
+ Need to turn off notifications properly at runtime
+ https://bugs.webkit.org/show_bug.cgi?id=30409
+
+ This code only affects chromium, and is all behind a compile time
+ flag current turned off, so no new tests.
+
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::ACCESSOR_RUNTIME_ENABLER):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::ACCESSOR_RUNTIME_ENABLER):
+ * notifications/NotificationCenter.cpp:
+ (WebCore::NotificationCenter::setIsAvailable):
+ (WebCore::NotificationCenter::isAvailable):
+ * notifications/NotificationCenter.h:
+ * page/DOMWindow.idl:
+ * workers/WorkerContext.idl:
+
+2009-10-20 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fixes RefPtr initialization in the V8 implementation of WebCore::ScriptString to use the ::create() idiom and
+ use adoptRef() properly. I failed to read the RefPtr docs the first time through :(
+
+ No new tests, error was caught by valgrind on the Chromium builders.
+
+ * bindings/v8/ScriptString.h:
+ (WebCore::ScriptString::ScriptString):
+ (WebCore::ScriptString::operator=):
+ * bindings/v8/ScriptStringImpl.h:
+ (WebCore::ScriptStringImpl::create):
+
+2009-10-20 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: populate child nodes before sorting them.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29673
+
+ * inspector/front-end/BottomUpProfileDataGridTree.js:
+ (WebInspector.BottomUpProfileDataGridNode): Swapped with BottomUpProfileDataGridTree to be consistent with TopDownProfileDataGridNode.
+ (WebInspector.BottomUpProfileDataGridNode.prototype._takePropertiesFromProfileDataGridNode):
+ (WebInspector.BottomUpProfileDataGridNode.prototype._keepOnlyChild):
+ (WebInspector.BottomUpProfileDataGridNode.prototype._exclude):
+ (WebInspector.BottomUpProfileDataGridNode.prototype._merge):
+ (WebInspector.BottomUpProfileDataGridNode.prototype._sharedPopulate):
+ (WebInspector.BottomUpProfileDataGridTree.prototype.exclude):
+ * inspector/front-end/ProfileDataGridTree.js:
+ (WebInspector.ProfileDataGridNode.prototype.sort): Added missing parentheses.
+ (WebInspector.ProfileDataGridNode.prototype.get _parent):
+ (WebInspector.ProfileDataGridNode.prototype._populate):
+ * inspector/front-end/TopDownProfileDataGridTree.js:
+ (WebInspector.TopDownProfileDataGridNode.prototype._sharedPopulate):
+
+2009-10-20 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Remove redundant String ref/deref calls in generated V8 bindings.
+ https://bugs.webkit.org/show_bug.cgi?id=30579
+
+ * bindings/v8/V8Binding.h:
+ (WebCore::toString): Fix return type of 'toString' to make it truly a no-op
+ instead of constructing/destructing a String.
+
+2009-10-20 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25411
+ [GTK] ATK accessible ancestry broken
+
+ Work around for the problem of bogus additional objects in the ancestry.
+ We now set the parent when we ref the child, then ask the Atk child if
+ it knows its parent. This solves the bulk of the cases. For those it
+ doesn't, fall back to the existing logic.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (webkit_accessible_get_parent):
+ (webkit_accessible_ref_child):
+
+2009-10-20 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Alice Liu.
+
+ Fixes <http://webkit.org/b/30421>.
+ Web Inpsector: Local Files can show up on Cookies List with Cookies from other Domain.
+
+ When a page like Google generates an about:blank, it shows up as a local file on
+ the list of Cookie domains, but has all of the cookies of Google. When we are adding
+ cookie domains to the inspector, we should only add the domain is the URL of the resource
+ is in the HTTP protocol family or a file URL.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::populateScriptObjects):
+ (WebCore::InspectorController::didFinishLoading):
+
+2009-10-20 Mark Mentovai <mark@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Use a version of libWebKitSystemInterface with global symbols marked
+ private_extern for Chromium Mac.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30590
+
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gyp/mac: Added.
+ * WebCore.gyp/mac/Empty.cpp: Added.
+ * WebCore.gyp/mac/adjust_visibility.sh: Added.
+
+2009-10-20 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Allow custom memory allocation control for WebCore's CSSProperty
+ https://bugs.webkit.org/show_bug.cgi?id=30564
+
+ Inherits CSSProperty class from FastAllocBase because it has been
+ instantiated by 'new' in WebCore/css/CSSParser.cpp:367.
+
+ * css/CSSProperty.h:
+
+2009-10-20 Andrew Scherkus <scherkus@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Hide Chromium's media slider thumb if no source has been loaded.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30529
+
+ Covered by existing layout tests, notably:
+ LayoutTests/media/controls-rendering.html
+ LayoutTests/media/unsupported-tracks.html
+ LayoutTests/media/video-src-none.html
+
+ * rendering/RenderMediaControlsChromium.cpp:
+ (WebCore::hasSource): Returns true if an HTMLMediaElement has a valid source set.
+ (WebCore::paintMediaMuteButton): Refactored to use hasSource().
+ (WebCore::paintMediaPlayButton): Ditto.
+ (WebCore::paintMediaSliderThumb): Add call to hasSource() to determine if we should paint the thumb.
+
+2009-10-20 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Added getter for FrameLoader:m_suppressOpenerInNewFrame.
+ This will allow Chromium to more intelligently detect
+ noreferrer links and therefore open them in a new process.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30581
+
+ * loader/FrameLoader.h:
+ (WebCore::FrameLoader::suppressOpenerInNewFrame): Added.
+
+2009-10-20 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's CSSParserFunction
+ https://bugs.webkit.org/show_bug.cgi?id=30563
+
+ Inherits CSSParserFunction struct from FastAllocBase because it has been
+ instantiated by 'new' in WebCore/css/CSSParser.cpp:4827.
+
+ * css/CSSProperty.h:
+
+2009-10-20 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Watched Expressions Buttons Do Not Match Inspector Styles
+ https://bugs.webkit.org/show_bug.cgi?id=30554
+
+ * inspector/front-end/inspector.css: added style to pane buttons
+
+2009-10-20 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Set debug id for contexts of isolated worlds to distinguish them in debugger.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30559
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluateInIsolatedWorld):
+ (WebCore::V8Proxy::evaluateInNewContext):
+ (WebCore::V8Proxy::setInjectedScriptContextDebugId):
+ * bindings/v8/V8Proxy.h:
+
+2009-10-20 Andras Becsi <becsi.andras@stud.u-szeged.hu>
+
+ Unreviewed buildfix.
+ [Qt] Add FEGaussianBlur.h and FEGaussianBlur.cpp which were refactored in r49778 to WebCore.pro.
+
+ * WebCore.pro:
+
+2009-10-20 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by David Levin.
+
+ Set EnabledAtRuntime for WebSocket in DOMWindow
+ https://bugs.webkit.org/show_bug.cgi?id=29896
+
+ Supported by chromium/v8 only.
+ Add WebSocket::isAvailable()/setIsAvailable(bool) to control v8
+ bindings.
+ Remove Settings::experimentalWebSocketsEnabled() and
+ setExperimentalWebSocketsEnabled(bool).
+
+ * WebCore.base.exp:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::webSocket):
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getConstructor):
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::ACCESSOR_RUNTIME_ENABLER):
+ * page/DOMWindow.idl:
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ * page/Settings.h:
+ * websockets/WebSocket.cpp:
+ (WebCore::WebSocket::setIsAvailable):
+ (WebCore::WebSocket::isAvailable):
+ * websockets/WebSocket.h:
+
+2009-10-19 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ REGRESSION: Dromaeo DOM test is 14% slower
+ https://bugs.webkit.org/show_bug.cgi?id=30273
+
+ Whoops, make prototype bindings actually use the StructureFlags.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+
+2009-10-19 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Better implementation of WebCore::ScriptString for the V8 bindings.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29909
+
+ WebCore::ScriptString is used for XMLHttpRequest's responseText attribute which is
+ shared with JavaScript. Thus, simply using a WebCore::String and copying the value
+ is pretty inefficient, especially since responseText is built up with a sequence of
+ operator+= calls. JSC builds use a JSC::UString to share the buffer when possible,
+ this patch adopts a similar approach for V8.
+
+ No new tests, behavior is unchanged and covered by LayoutTests/http/tests/xmlhttprequest
+
+ * WebCore.gypi:
+ * bindings/v8/ScriptString.h:
+ (WebCore::ScriptString::ScriptString):
+ (WebCore::ScriptString::operator String):
+ (WebCore::ScriptString::isNull):
+ (WebCore::ScriptString::size):
+ (WebCore::ScriptString::operator=):
+ (WebCore::ScriptString::operator+=):
+ (WebCore::ScriptString::v8StringOrNull):
+ * bindings/v8/ScriptStringImpl.cpp: Added.
+ (WebCore::ScriptStringImpl::ScriptStringImpl):
+ (WebCore::ScriptStringImpl::~ScriptStringImpl):
+ (WebCore::ScriptStringImpl::toString):
+ (WebCore::ScriptStringImpl::isNull):
+ (WebCore::ScriptStringImpl::size):
+ (WebCore::ScriptStringImpl::append):
+ * bindings/v8/ScriptStringImpl.h: Added.
+ (WebCore::ScriptStringImpl::ScriptStringImpl):
+ (WebCore::ScriptStringImpl::v8StringHandle):
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+
+2009-10-19 Adam Barth <abarth@webkit.org>
+
+ No review, rolling out r49837.
+ http://trac.webkit.org/changeset/49837
+
+ * page/Settings.cpp:
+ (WebCore::Settings::setStandardFontFamily):
+ (WebCore::Settings::setFixedFontFamily):
+ (WebCore::Settings::setSerifFontFamily):
+ (WebCore::Settings::setSansSerifFontFamily):
+ (WebCore::Settings::setCursiveFontFamily):
+ (WebCore::Settings::setFantasyFontFamily):
+ * page/Settings.h:
+ (WebCore::Settings::standardFontFamily):
+ (WebCore::Settings::fixedFontFamily):
+ (WebCore::Settings::serifFontFamily):
+ (WebCore::Settings::sansSerifFontFamily):
+ (WebCore::Settings::cursiveFontFamily):
+ (WebCore::Settings::fantasyFontFamily):
+ * platform/text/UScriptCode.h: Removed.
+
+2009-10-19 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Eric Seidel.
+
+ Check COMPILER(MSVC) instead of PLATFORM(WIN_OS) to avoid the use of vasprintf.
+ https://bugs.webkit.org/show_bug.cgi?id=30473
+
+ vasprintf is missing in MSVC. Use COMPILER(MSVC) guards instead of
+ PLALTFORM(WIN_OS) guards.
+
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::XMLTokenizer::error):
+
+2009-10-19 Jungshik Shin <jshin@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=20797
+
+ Make generic font family getters/setters accept an additional
+ argument (script code). It has a default value so that if an embedder
+ does not have/want a per-script font family setting, call-sites
+ don't have to be changed.
+ This is to prepare for fixing bug 10874 (font selection is not
+ language-dependent) and bug 18085.
+
+ There should be no change in layout and no new layout test
+ is added.
+
+ * WebCore.base.exp:
+ * page/Settings.cpp:
+ * page/Settings.h:
+ * platform/text/UScriptCode.h: Added. This is for ports that
+ do not use ICU. the part of ICU's common/unicode/uscript.h
+ that defines script code enum was copied. To keep enums compatible
+ with those in ICU, we don't generate the list out of Scripts.txt
+ of the Unicode Data base or CLDR's data.
+
+2009-10-19 Evan Stade <estade@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Clarify usage of SuddenTermination API. No code change.
+
+ * platform/SuddenTermination.h:
+
+2009-10-19 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ REGRESSION: Dromaeo DOM test is 14% slower
+ https://bugs.webkit.org/show_bug.cgi?id=30273
+
+ Make DOM bindings automatically inherit correct structure
+ flags rather than being needlessly conservative. This is
+ done by making the bindings generator use the same model
+ for TypeInfo flags that we now use in JSC.
+
+ This gains us about 1% of this regression back.
+
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::DOMObjectWithGlobalPointer::createStructure):
+ (WebCore::DOMConstructorObject::createStructure):
+ * bindings/js/JSDOMWindowShell.h:
+ (WebCore::JSDOMWindowShell::createStructure):
+ * bindings/js/JSHTMLAllCollection.h:
+ (WebCore::JSHTMLAllCollection::createStructure):
+ * bindings/js/JSQuarantinedObjectWrapper.h:
+ (WebCore::JSQuarantinedObjectWrapper::createStructure):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bridge/objc/objc_runtime.h:
+ (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
+ * bridge/runtime_array.h:
+ (JSC::RuntimeArray::createStructure):
+ * bridge/runtime_method.h:
+ (JSC::RuntimeMethod::createStructure):
+ * bridge/runtime_object.h:
+ (JSC::RuntimeObjectImp::createStructure):
+
+2009-10-19 Robin Qiu <robin.qiu@torchmobile.com.cn>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Fixed a bug on nested SVG <use> elements.
+ https://bugs.webkit.org/show_bug.cgi?id=26117
+ When a <use> element refer to another <use> element which has
+ child/children, the instance tree built for this <use> element
+ is incorrect (more nodes than expected).
+
+ Test: svg/dom/use-on-use-with-child.svg
+
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::buildInstanceTree):
+
+2009-10-19 Oliver Hunt <oliver@apple.com>
+
+ Small changes to fully invalidate and update the JavaScriptCallFrame.
+
+ <rdar://problem/7020755> JSDebugger crashes after reloading from a breakpoint
+ https://bugs.webkit.org/show_bug.cgi?id=27146
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/JavaScriptCallFrame.h:
+ (WebCore::JavaScriptCallFrame::invalidate):
+ (WebCore::JavaScriptCallFrame::update):
+
+2009-10-19 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Dmitri Titov.
+
+ Remove "source" from storage events
+ https://bugs.webkit.org/show_bug.cgi?id=30536
+
+ Remove "source" from storage events per
+ http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-October/023703.html
+
+ This was removed because it makes it introduces synchronous access that can
+ cross the event loop boundry (since a storage event can fire from one process
+ and be handled in another).
+
+ * inspector/InspectorDOMStorageResource.cpp:
+ (WebCore::InspectorDOMStorageResource::handleEvent):
+ * storage/StorageEvent.cpp:
+ (WebCore::StorageEvent::create):
+ (WebCore::StorageEvent::StorageEvent):
+ (WebCore::StorageEvent::initStorageEvent):
+ * storage/StorageEvent.h:
+ (WebCore::StorageEvent::uri):
+ * storage/StorageEvent.idl:
+ * storage/StorageEventDispatcher.cpp:
+ (WebCore::StorageEventDispatcher::dispatch):
+
+2009-10-19 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Remove ResourceLoadNotifier::activeDocumentLoader
+ https://bugs.webkit.org/show_bug.cgi?id=30533
+
+ Removing this method from ResourceLoadNotifier better decouples the
+ notifier from FrameLoader.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
+ (WebCore::FrameLoader::requestFromDelegate):
+ * loader/ResourceLoadNotifier.cpp:
+ (WebCore::ResourceLoadNotifier::didReceiveResponse):
+ * loader/ResourceLoadNotifier.h:
+ * loader/ResourceLoader.cpp:
+ (WebCore::ResourceLoader::willSendRequest):
+
+2009-10-19 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move sendRemainingDelegateMessages to ResourceLoadNotifier
+ https://bugs.webkit.org/show_bug.cgi?id=30531
+
+ This method is about notifying folks and doesn't interact with the rest
+ of FrameLoader.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::willLoadMediaElementURL):
+ (WebCore::FrameLoader::commitProvisionalLoad):
+ (WebCore::FrameLoader::loadResourceSynchronously):
+ (WebCore::FrameLoader::loadedResourceFromMemoryCache):
+ * loader/FrameLoader.h:
+ * loader/ResourceLoadNotifier.cpp:
+ (WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages):
+ * loader/ResourceLoadNotifier.h:
+
+2009-10-19 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Bypass popup blocker using click event
+ https://bugs.webkit.org/show_bug.cgi?id=21501
+
+ Keep track of which events were generated by JavaScript and use that
+ inforation when figuring out if we're processing a user gesture.
+
+ Test: http/tests/security/popup-blocked-from-fake-event.html
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::processingUserGestureEvent):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::processingUserGesture):
+ * dom/Document.cpp:
+ (WebCore::Document::createEvent):
+ * dom/Event.cpp:
+ (WebCore::Event::Event):
+ * dom/Event.h:
+ (WebCore::Event::createdByDOM):
+ (WebCore::Event::setCreatedByDOM):
+
+2009-10-19 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fixing a typo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30543
+
+ * platform/sql/SQLiteDatabase.h:
+
+2009-10-19 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Manual Test for crash caused by JS accessing DOMWindow which is disconnected from the Frame.
+ https://bugs.webkit.org/show_bug.cgi?id=30544
+
+ * manual-tests/crash-on-accessing-domwindow-without-frame.html: Added.
+
+2009-10-19 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Flash at end of opacity/transform transition sometimes
+ https://bugs.webkit.org/show_bug.cgi?id=30501
+
+ When a transition finishes, there window of time between when the animation is
+ removed, and the final style set on the GraphicsLayer. This caused the layer to revert
+ to its old appearance for one or two frames. To avoid this, we set the final
+ transform or opacity at the start of the transition; we know that the animation
+ will override the final value for as long as its running.
+
+ No test because this is a very transient effect that can't be captured
+ in a test.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::createGraphicsLayer):
+ (WebCore::RenderLayerBacking::updateLayerOpacity):
+ (WebCore::RenderLayerBacking::updateLayerTransform):
+ (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
+ (WebCore::RenderLayerBacking::startTransition):
+ * rendering/RenderLayerBacking.h:
+
+2009-10-19 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Add more stop characters into console completions.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30477
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.completions):
+ (WebInspector.ConsoleView.prototype._reportCompletions):
+
+2009-10-19 Marshall Culpepper <mculpepper@appcelerator.com>
+
+ Reviewed by Adam Roben.
+
+ implemented ClipboardWin::files()
+ https://bugs.webkit.org/show_bug.cgi?id=29666
+
+ * platform/win/ClipboardWin.cpp:
+ (WebCore::ClipboardWin::files):
+
+2009-10-19 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Add support for link relations in HTMLAnchorElement and implement rel="noreferrer".
+
+ https://bugs.webkit.org/show_bug.cgi?id=28986
+
+ Tests: http/tests/navigation/no-referrer-reset.html
+ http/tests/navigation/no-referrer-same-window.html
+ http/tests/navigation/no-referrer-subframe.html
+ http/tests/navigation/no-referrer-target-blank.html
+
+ * WebCore.base.exp: Update FrameLoader::loadFrameRequest export symbol
+ * html/HTMLAnchorElement.cpp: Add support for link relations and implement noreferrer
+ (WebCore::HTMLAnchorElement::HTMLAnchorElement):
+ (WebCore::HTMLAnchorElement::defaultEventHandler):
+ (WebCore::HTMLAnchorElement::parseMappedAttribute):
+ (WebCore::HTMLAnchorElement::hasRel):
+ (WebCore::HTMLAnchorElement::setRel):
+ * html/HTMLAnchorElement.h: Add support for link relations and implement noreferrer
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::FrameLoader):
+ (WebCore::FrameLoader::createWindow):
+ (WebCore::FrameLoader::changeLocation):
+ (WebCore::FrameLoader::urlSelected): Add parameter for referrer policy
+ (WebCore::FrameLoader::loadFrameRequest): Add parameter for referrer policy
+ (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Suppress opener if requested by ReferrerPolicy
+ * loader/FrameLoader.h: Update urlSelected and loadFrameRequest prototypes
+ * loader/FrameLoaderTypes.h: Add enum for referrer policy
+ * loader/RedirectScheduler.cpp:
+ (WebCore::RedirectScheduler::timerFired):
+ * page/ContextMenuController.cpp:
+ (WebCore::ContextMenuController::contextMenuItemSelected): Update call to urlSelected()
+ * svg/SVGAElement.cpp:
+ (WebCore::SVGAElement::defaultEventHandler): Update call to urlSelected()
+
+
+2009-10-19 Alpha Lam <hclam@chromium.org>
+
+ Reviewed by Dimitri Glazkov (dglazkov@chromium.org).
+
+ [v8] typeof(HTMLMediaElement) should return undefined if media
+ engine is not available
+ https://bugs.webkit.org/show_bug.cgi?id=30343
+
+ Check for availability of the media engine to disable
+ HTMLMediaElement, HTMLAudioElement, HTMLVideoElement, MediaError
+ in runtime.
+
+ Try runs and review in Chromium:
+ http://codereview.chromium.org/276011
+
+ Test: manual-tests/chromium/media-player-not-available.html
+
+ The above test can work work in Chromium. Testing procedures:
+ 1. Remove all media support libraries in Chromium (e.g. ffmpeg libraries)
+ 2. Open Chromium with above test page
+ 3. Verify the test results according to the test page
+
+ * bindings/v8/custom/V8CustomBinding.h:
+ Declare enabler methods.
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ Report enabled only if media player is available.
+ * manual-tests/chromium/media-player-not-available.html: Added.
+ Manual test, following instruction in this test for procedures.
+ * page/DOMWindow.idl:
+ Mark HTMLMediaElement, HTMLAudioElement, HTMLVideElement, MediaError
+ as enabled at runtime.
+
+2009-10-19 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by David Hyatt.
+
+ Refactor out some of the code in paint() into paintPanScrollIcon()
+ and paintScrollbars() in preparation of some Qt API changes.
+
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::paint):
+ * platform/ScrollView.h:
+
+2009-10-19 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Make the local static panScrollIcon into a Image* instead
+ of a RefPtr<Image>.
+
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::wheelEvent):
+
+2009-10-19 Andrew Scherkus <scherkus@chromium.org>
+
+ Reviewed by David Levin.
+
+ Forcefully set antialiasing for Chromium media controls.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30521
+
+ Before it was nondeterministiacally being enabled based on the previous state of GraphicsContext.
+
+ Covered by existing layout tests.
+
+ * rendering/RenderMediaControlsChromium.cpp:
+ (WebCore::paintMediaSlider): Added setShouldAntialias(true).
+
+2009-10-19 Jens Alfke <jens@mooseyard.com>
+
+ Reviewed by Darin Adler.
+
+ Optimize string upper/lowercasing
+ https://bugs.webkit.org/show_bug.cgi?id=30261
+
+ - Added AtomicString::upper() and lower()
+ - Further optimized StringImpl::lower()
+ - Removed StringImpl::isLower()
+ - Added QualifiedName::localNameUpper(), which is cached, thereby saving
+ thousands of upper() calls and string allocations.
+
+ * dom/Element.cpp:
+ (WebCore::Element::setAttribute): Call AtomicString::lower()
+ * dom/QualifiedName.cpp:
+ (WebCore::QualifiedName::localNameUpper): New method
+ * dom/QualifiedName.h: Added localNameUpper() method
+ * dom/StyledElement.cpp:
+ (WebCore::StyledElement::parseMappedAttribute): Call AtomicString::lower()
+ * html/HTMLDocument.cpp:
+ (WebCore::HTMLDocument::createElement): Call AtomicString::lower()
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::nodeName): Call localNameUpper()
+ * platform/text/AtomicString.cpp:
+ (WebCore::AtomicString::lower): New method
+ (WebCore::AtomicString::upper): New method
+ * platform/text/AtomicString.h: Added lower() and upper()
+ * platform/text/StringImpl.cpp: Removed isLower()
+ (WebCore::StringImpl::lower): Further optimization of initial loop
+ * platform/text/StringImpl.h: Removed isLower()
+
+2009-10-19 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ If a call to a plugin's invokeMethod, invokeDefault or construct
+ returns false, throw an exception into JS.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30239
+
+ Test: plugins/netscape-invoke-failure.html
+
+ * bindings/v8/V8NPObject.cpp: Check return values of invokeMethod, invokeDefault and construct.
+ (npObjectInvokeImpl):
+ * bridge/c/c_instance.cpp:
+ (JSC::Bindings::CInstance::invokeMethod): Check return value
+ (JSC::Bindings::CInstance::invokeDefaultMethod): Check return value
+ (JSC::Bindings::CInstance::invokeConstruct): Check return value
+
+2009-10-16 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fix for chromium/skia canvas arc start/end positions, when the arc is
+ >= 360 degrees.
+ https://bugs.webkit.org/show_bug.cgi?id=30449
+
+ Covered by new test:
+ LayoutTests/fast/canvas/arc360.html
+
+ * platform/graphics/skia/PathSkia.cpp:
+ (WebCore::Path::addArc):
+
+2009-10-19 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Fix uninitialized variable reference in Element::removeAttribute().
+ https://bugs.webkit.org/show_bug.cgi?id=30502
+
+ * dom/Element.cpp:
+ (WebCore::Element::removeAttribute):
+
+2009-10-19 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30463
+ Remove HTML5 media element 'loadend' event
+
+ * dom/EventNames.h:
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::parseMappedAttribute): Remove 'loadend'.
+ (WebCore::HTMLMediaElement::loadInternal): Ditto.
+ (WebCore::HTMLMediaElement::noneSupported): Ditto.
+ (WebCore::HTMLMediaElement::mediaEngineError): Ditto.
+ (WebCore::HTMLMediaElement::setNetworkState): Ditto.
+ (WebCore::HTMLMediaElement::userCancelledLoad): Ditto.
+
+2009-10-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Remove deletion of outgoing FormData object when reply is finished.
+ The buffers will be destroyed a bit later, when the QNetworkReply is deleted.
+ Bug: https://bugs.webkit.org/show_bug.cgi?id=29551
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ * platform/network/qt/QNetworkReplyHandler.h:
+
+2009-10-19 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix hard-to-reproduce crash in HTMLTokenizer by avoiding a rare
+ fastRealloc edge case.
+ https://bugs.webkit.org/show_bug.cgi?id=29313
+
+ No test, the crash shows up occasionally in crash dumps, we weren't able
+ to reproduce it locally.
+
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::enlargeScriptBuffer): Added an early exit to
+ avoid calling fastRealloc with the size of 0.
+
+2009-10-19 Andrew Scherkus <scherkus@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Use fillRect() instead of drawRect() to fix Chromium media controls rendering.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30371
+
+ Chromium Mac layout tests will need to be rebaselined. Existing layout tests for Linux/Win still pass.
+
+ * rendering/RenderMediaControlsChromium.cpp:
+ (WebCore::paintMediaSlider): Use fillRect() instead of drawRect().
+
+2009-10-19 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Crash in DOMWindow::clearTimeout etc when DOMWindow is not connected to a frame.
+ https://bugs.webkit.org/show_bug.cgi?id=29832
+
+ Need to make sure the script caches are reset when frame gets disconnected from still-alive DOMWindow.
+ This will prevent JS from calling DOMWindow methods that can not be completed w/o the frame.
+
+ I am not sure it's possible to test this since the only file that repros the problem need ~10 seconds to cause crash.
+
+ * page/Frame.cpp:
+ (WebCore::Frame::~Frame): Right after frame disconnects from DOMWindow, clear WindowShell.
+
+2009-10-19 Csaba Osztrogonác <ossy@webkit.org>
+
+ Unreviewed build warning fix.
+ [Qt] Apply changes to WebCore.pro introduced in r49778
+
+ * WebCore.pro: Removed svg/graphics/filters/SVGFEGaussianBlur.h from HEADERS
+
+2009-10-19 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Move feGaussianBlur from WebCore/svg to WebCore/platform
+ [https://bugs.webkit.org/show_bug.cgi?id=30495]
+
+ This patch moves SVGFRGaussianBlur from svg/graphics/filters
+ to platform/graphics/filters/FEGaussianBlur. This is needed
+ for shadow support on Qt and Cairo.
+ No change in functionality, therfore no new test case needed.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/graphics/filters/FEGaussianBlur.cpp: Added.
+ * platform/graphics/filters/FEGaussianBlur.h: Added.
+ * svg/SVGFEGaussianBlurElement.h:
+ * svg/graphics/filters/SVGFEGaussianBlur.cpp: Removed.
+ * svg/graphics/filters/SVGFEGaussianBlur.h: Removed.
+
+2009-10-19 Yael Aharon <yael.aharon@nokia.com>
+
+ Unreviewed.
+
+ Added reviewer name to r49574.
+
+2009-10-19 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30489
+ [Gtk] The document frame/html container claims to be parentless
+
+ Work around for the parentless claim made by the accessible associated
+ with the embedded WebView. When we identify this condition, get the
+ widget's parent, and then get the AtkObject from that. Admittedly an ugly
+ hack, but we'll need it for Yelp and other Gtk+/GNOME applications which
+ plan to switch over to WebKit.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (webkit_accessible_get_parent):
+
+2009-10-19 Benjamin Otte <otte@gnome.org>
+
+ Reviewed by Jan Alonzo.
+
+ Handle duration queries properly
+ https://bugs.webkit.org/show_bug.cgi?id=29999
+
+ Previously duration queries failed to handle unknown duration
+ and didn't treat the returned duration as an unsigned.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::duration):
+
+2009-10-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Fix build on Windows.
+
+ * plugins/win/PluginViewWin.cpp:
+ (windowHandleForPageClient):
+
+2009-10-19 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Windowed Plugins: Don't crash when client is 0.
+
+ Client is 0 when we use QWebPage without a QWebView or QGraphicsWebView.
+ In addition, setFrameRect()/updatePluginWidget() is called even if the
+ plugin was not succesfully loaded. updatePluginWidget() updates the
+ window rect which is, in theory, useful to draw something that indicates
+ that we didn't load successfully.
+
+ So, a status check is added to setNPWindowIfNeeded.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30380
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::setNPWindowIfNeeded):
+ (WebCore::PluginView::platformStart):
+
+2009-10-19 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Windowed Plugins: Fix crash when QWebPage is deleted after QWebView.
+
+ Fixes various sources of crashes:
+ 1. The PluginContainer is a child of QWebView. When the view gets deleted,
+ the PluginView is not notified about the deletion of PluginContainer.
+ 2. QWebView destructor does not set client to 0.
+ 3. Sometimes pending paint events are sent after the plugin has died, so add
+ a check in PluginView::setNPWindowIfNeeded.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30354
+
+ * plugins/qt/PluginContainerQt.cpp:
+ (PluginContainerQt::~PluginContainerQt):
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::setNPWindowIfNeeded):
+
+2009-10-19 Jakob Truelsen <antialize@gmail.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29042
+ Allow one to customize the minimal and maximal shrink factors used when printing.
+
+ * page/PrintContext.cpp:
+ (WebCore::PrintContext::begin):
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setPrintingMinimumShrinkFactor):
+ (WebCore::Settings::setPrintingMaximumShrinkFactor):
+ * page/Settings.h:
+ (WebCore::Settings::printingMinimumShrinkFactor):
+ (WebCore::Settings::printingMaximumShrinkFactor):
+
+2009-10-18 Erik Arvidsson <arv@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fixes issue where doubleclicking a word could select following adjacent newlines.
+ https://bugs.webkit.org/show_bug.cgi?id=30234
+
+ Tests: platform/mac/editing/selection/doubleclick-should-not-expand-across-lines.html
+ platform/mac/editing/selection/script-tests/TEMPLATE.html
+ platform/win/editing/selection/doubleclick-should-not-expand-across-lines.html
+ platform/win/editing/selection/script-tests/TEMPLATE.html
+
+ * editing/VisibleSelection.cpp:
+ (WebCore::VisibleSelection::appendTrailingWhitespace):
+
+2009-10-18 Kevin Ollivier <kevino@theolliviers.com>
+
+ CURL build fix, use proper header name.
+
+ * platform/network/curl/ResourceHandleManager.h:
+
+2009-10-18 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Properties on Arrays and NodeLists are not logged correctly.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30485
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._formatarray):
+ (WebInspector.ConsoleView.prototype._printArray):
+
+2009-10-18 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed: touching WebCore so that it
+ initiated inspector frontend deployment on Windows.
+
+ Web Inspector: frontend files are not deployed in Windows
+ incremental build.
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::unbind):
+
+2009-10-18 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Title of dir(["test", "test2"]) should be Array
+
+ https://bugs.webkit.org/show_bug.cgi?id=30486
+
+ Test: inspector/console-tests.html
+
+ * inspector/front-end/InjectedScript.js:
+
+2009-10-18 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ REGRESSION: SVG Mask doesn't work for maskContentUnits="objectBoundingBox"
+ [https://bugs.webkit.org/show_bug.cgi?id=30480]
+
+ Patch for SVGMaskElement landed in r49598 should correct the location of
+ the mask image graphics context. It only corrects the location for userSpaceOnUse
+ mode in maskContentUnits but breaks objectBoundingBoxMode.
+ The maskDestRect shouldn't be moved. It is not responsible for the correct context
+ postioin but for the correct position of the mask image.
+ This patch calculates the context postion independently from the maskDestRect.
+ It also uses lineareRGB color space for masking on CG now. This is the default
+ color space for masking operations.
+ We already have tests for both maskContentUnits modes.
+
+ *svg/W3C-SVG-1.1/masking-intro-01-f.svg
+ *svg/custom/mask-with-default-value.svg
+
+ Some tests needed new pixel tests because of the new color space.
+
+ * svg/SVGMaskElement.cpp:
+ (WebCore::SVGMaskElement::drawMaskerContent):
+
+2009-10-18 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Use v8::Integer::NewFromUnsigned when converting unsigneds into V8's numbers.
+ That is notably faster for small numbers (most common case).
+ https://bugs.webkit.org/show_bug.cgi?id=30493
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+
+2009-10-18 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ [GTK] Add MathML to the build system
+ https://bugs.webkit.org/show_bug.cgi?id=30487
+
+ Add MathML sources if MathML support is enabled.
+
+ * GNUmakefile.am:
+
+2009-10-18 Kevin Ollivier <kevino@theolliviers.com>
+
+ Non-PCH build fix. Added missing header.
+
+ * bridge/runtime_root.h:
+
+2009-10-18 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Compositing layers not correctly updated after partial layout
+ https://bugs.webkit.org/show_bug.cgi?id=30425
+
+ When a partial layout happened, for example as the result of a postion-change-only
+ layout, then some compositing layer positions were not correctly updated. To fix
+ this, updateLayerPositions() now carries along a flag that is set at the rootmost
+ layer being updated, and used to determine when we hit the first compositing layer
+ in this update. RenderLayerBacking::updateAfterLayout() makes use of this information
+ to do a full geometry update on that layer, which is thus the rootmost compositing
+ layer that is being updated.
+
+ Test: compositing/geometry/partial-layout-update.html
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateLayerPositions):
+ (WebCore::RenderLayer::scrollToOffset):
+ * rendering/RenderLayer.h:
+ (WebCore::RenderLayer::):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateAfterLayout):
+ * rendering/RenderLayerBacking.h:
+
+2009-09-13 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Add support for proxies in CURL.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30446
+
+ * platform/network/curl/ResourceHandleManager.cpp:
+ (WebCore::ResourceHandleManager::setProxyInfo):
+ (WebCore::ResourceHandleManager::initializeHandle):
+ * platform/network/curl/ResourceHandleManager.h:
+ (WebCore::ResourceHandleManager::):
+
+2009-10-18 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez
+
+ https://bugs.webkit.org/show_bug.cgi?id=25901
+ Use ATK_ROLE_SECTION for divTag and ATK_ROLE_LABEL for labelTag
+
+ Replaces the use of ATK_ROLE_PANEL with the expected accessible roles.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (webkit_accessible_get_role):
+
+2009-10-17 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by George Staikos.
+
+ Cleanup SVGElement code, preparing for animVal support
+ https://bugs.webkit.org/show_bug.cgi?id=30466
+
+ Add new SynchronizablePropertyController and move the code for SVG property <-> XML attribute synchronization
+ from SVGElement. This is a further preparation for animVal support, where SynchronizablePropertyController will
+ be used to control the start/end state of an animated property.
+
+ We're currently tracking animated properties that need synchronization, generalize this concept and use
+ it to track their creation (bound to certain SVG*Element classes) as well as a flag determing the need
+ of synchronization (no SVG DOM object wrappers, no synchronization needed).
+
+ No change in functionality, thus no tests.
+
+ * GNUmakefile.am: Add 'SynchronizablePropertyController.cpp/h' to build
+ * WebCore.gypi: Ditto.
+ * WebCore.pro: Ditto.
+ * WebCore.vcproj/WebCore.vcproj: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * svg/SVGAllInOne.cpp: Ditto.
+ * svg/SVGAnimatedProperty.h: Add registerProperty() function
+ (WebCore::::SVGAnimatedProperty): Call registerProperty() function
+ (WebCore::::registerProperty): Add new registerProperty() function, announcing new properties to SynchronizablePropertyController.
+ * svg/SVGAnimatedTemplate.h: Use propertyController() method, to access the new functions moved from SVGElement.
+ (WebCore::lookupOrCreateWrapper):
+ * svg/SVGElement.cpp: Adapt to code moving to SynchronizablePropertyController.
+ (WebCore::SVGElement::updateAnimatedSVGAttribute):
+ * svg/SVGElement.h: Move handling SVG property synchronization to SynchronizablePropertyController.
+ (WebCore::SVGElement::propertyController): Expose reference to SynchronizablePropertyController object.
+ * svg/SVGViewSpec.cpp: Reorder initialization order of contextElement, leading to possible crashes.
+ (WebCore::SVGViewSpec::SVGViewSpec):
+ (WebCore::SVGViewSpec::viewTarget):
+ * svg/SVGViewSpec.h: Ditto.
+ (WebCore::SVGViewSpec::contextElement):
+ * svg/SynchronizablePropertyController.cpp: Added.
+ (WebCore::SynchronizablePropertyController::SynchronizablePropertyController):
+ (WebCore::SynchronizablePropertyController::registerProperty):
+ (WebCore::SynchronizablePropertyController::setPropertyNeedsSynchronization):
+ (WebCore::SynchronizablePropertyController::synchronizeProperty):
+ (WebCore::SynchronizablePropertyController::synchronizeAllProperties):
+ (WebCore::SynchronizablePropertyController::startAnimation):
+ (WebCore::SynchronizablePropertyController::stopAnimation):
+ * svg/SynchronizablePropertyController.h: Added.
+ (WebCore::SynchronizableProperty::SynchronizableProperty):
+ (WebCore::SynchronizableProperty::isHashTableDeletedValue):
+ (WebCore::SynchronizableProperty::operator==):
+ (WebCore::SynchronizablePropertyHash::hash):
+ (WebCore::SynchronizablePropertyHash::equal):
+ (WebCore::SynchronizablePropertyHashTraits::constructDeletedValue):
+ (WebCore::SynchronizablePropertyHashTraits::isDeletedValue):
+
+2009-10-17 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25413
+ [GTK] Please expose the level of headings
+
+ Exposes the heading level as an attribute of the AtkObject.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (addAttributeToSet):
+ (webkit_accessible_get_attributes):
+ (webkit_accessible_class_init):
+
+2009-10-17 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Eric Seidel.
+
+ EventHandler::eventLoopHandleMouseDragged needs ENABLE(DRAG_SUPPORT) guards
+ https://bugs.webkit.org/show_bug.cgi?id=30472
+
+ Put ENABLE(DRAG_SUPPORT) guards around EventHandler::eventLoopHandleMouseDragged
+ in EventHandler.cpp. MSVC fails to compile when DRAG_SUPPORT not enabled.
+
+ * page/EventHandler.cpp:
+
+2009-10-17 Alpha Lam <hclam@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [chromium] Video controls not zoomed / transformed correctly
+ https://bugs.webkit.org/show_bug.cgi?id=30461
+
+ Draw the images in the controls scaled.
+
+ No new tests. With this change Chromium will pass the following tests:
+ LayoutTests/media/video-controls-zoomed.html
+ LayoutTests/media/video-controls-transformed.html
+
+ * rendering/RenderMediaControlsChromium.cpp:
+ (WebCore::paintMediaButton):
+ Pass along the target rect directly.
+ (WebCore::RenderMediaControlsChromium::adjustMediaSliderThumbSize):
+ Adjust the thumb slide applied with the scale factor.
+
+2009-10-17 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed.
+
+ [Gtk] Build fix for WebKitGtk after r49723.
+
+ Add bindings/js/JSExceptionBase.* to the build.
+
+ * GNUmakefile.am:
+
+2009-10-17 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed.
+
+ [Qt] Build fix for QtWebKit after r49723.
+
+ Add bindings/js/JSExceptionBase.cpp to the build.
+
+ * WebCore.pro:
+
+2009-10-16 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30456
+ Fixes for new Debug_All Windows build configuration.
+
+ * platform/network/cf/ResourceRequestCFNet.cpp:
+ (WebCore::findCFNetworkModule): Ask for the correct library instead of guessing.
+ * platform/win/ScrollbarThemeSafari.cpp: Use new DEBUG_ALL preprocessor define for library naming.
+ * rendering/RenderMediaControls.cpp: Use new DEBUG_ALL preprocessor define for library naming.
+ * rendering/RenderThemeSafari.cpp: Use new DEBUG_ALL preprocessor define for library naming.
+
+2009-10-16 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Add SPI to determine whether a plug-in has ever been halted.
+
+ Part of <rdar://problem/7312158>.
+
+ Reviewed by Dan Bernstein.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::PluginView):
+ Initialize m_hasBeenHalted.
+
+ * plugins/PluginView.h:
+ (WebCore::PluginView::hasBeenHalted):
+ Return m_hasBeenHalted.
+
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::halt):
+ Set m_hasBeenHalted.
+
+2009-10-16 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ @charset rule after the first byte causes the rest of css to be ignored
+ https://bugs.webkit.org/show_bug.cgi?id=18265
+
+ Apparently we're supposed to tolerate whitespace before the charset
+ rule so folks can write code like this:
+
+ <style>
+ @charset "utf-8"
+ ...
+ </style>
+
+ I'm told this is one of the top compatability problems in China.
+ Tests: fast/css/comment-before-charset-external.html
+ fast/css/comment-before-charset.html
+ fast/css/many-spaces-before-charset.html
+ fast/css/space-before-charset-external.html
+ fast/css/space-before-charset.html
+
+ * css/CSSGrammar.y:
+
+2009-10-16 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fixes part of <http://webkit.org/b/30412>.
+ Web Inspector should get human readable DOM Exceptions.
+
+ Add a description field to ExceptionBase, and call it through
+ reportException which allows the user/developer to get a more detailed
+ and coherent error explanation through the Web Inspector.
+
+ This only applies to exceptions that come from a script on the page when
+ it is run. DOM Exceptions that come from the code run in the console, or DOM
+ exceptions that are caught and logged will come in a future patch.
+
+ Tests: inspector/uncaught-dom1-exception.html
+ inspector/uncaught-dom3-exception.html
+ inspector/uncaught-dom8-exception.html
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::reportException):
+ * bindings/js/JSExceptionBase.cpp: Added.
+ (WebCore::toExceptionBase):
+ * bindings/js/JSExceptionBase.h: Added.
+ * dom/ExceptionBase.cpp:
+ (WebCore::ExceptionBase::ExceptionBase):
+ * dom/ExceptionBase.h:
+ (WebCore::ExceptionBase::description):
+ * dom/ExceptionCode.cpp:
+ (WebCore::):
+ (WebCore::getExceptionCodeDescription):
+ * dom/ExceptionCode.h:
+
+2009-10-16 Geoffrey Garen <ggaren@apple.com>
+
+ Build fix: forgot to check in this #include.
+
+ * bridge/runtime_root.h:
+
+2009-10-16 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Transform layer gets stuck with the wrong transform after an animation ends
+ <rdar://problem/7311662>
+
+ Work around a CoreAnimation bug which causes an animated transform layer to
+ end up with a stale transform.
+
+ Test: compositing/animation/state-at-end-event-transform-layer.html
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::bug7311367Workaround):
+ (WebCore::GraphicsLayerCA::removeAnimationFromLayer):
+
+2009-10-16 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ After running a transition with an end event listener, can't change the transform
+ https://bugs.webkit.org/show_bug.cgi?id=30454
+
+ Fix an issue where, if a document had any listener for webkitTransitionEnd or webkitAnimationEnd,
+ the animations would not get cleaned up correctly, which broke subsequent changes of transform.
+
+ Now, we always clean up the animations right after queuing up the end events.
+
+ Tests: animations/state-at-end-event.html
+ transitions/move-after-transition.html
+
+ * page/animation/ImplicitAnimation.cpp:
+ (WebCore::ImplicitAnimation::onAnimationEnd):
+ * page/animation/KeyframeAnimation.cpp:
+ (WebCore::KeyframeAnimation::onAnimationEnd):
+
+2009-10-15 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Handle the Enter Key in the Elements Tree Hierarchy
+ https://bugs.webkit.org/show_bug.cgi?id=30428
+
+ TextNode => Edit Text Node
+ Has Attributes => Edit First Attribute
+ No Attributes => Start Editing New Attribute
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeOutline.prototype.handleKeyEvent): handle the "Enter" key
+ (WebInspector.ElementsTreeElement.prototype.set hovered): only add new attribute button on nodes with attributes
+ (WebInspector.ElementsTreeElement.prototype._addNewAttribute): prevent moving backwards where there are no attributes
+ (WebInspector.ElementsTreeElement.prototype._startEditingFromEvent): renamed to be clearer
+ (WebInspector.ElementsTreeElement.prototype._startEditing): transition to the appropriate edit state for a tree element
+
+2009-10-16 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix header indent style for FrameLoader and friends
+ https://bugs.webkit.org/show_bug.cgi?id=30430
+
+ * loader/FrameLoader.h:
+ (WebCore::FrameLoader::frame):
+ (WebCore::FrameLoader::policyChecker):
+ (WebCore::FrameLoader::history):
+ (WebCore::FrameLoader::notifier):
+ (WebCore::FrameLoader::isLoadingMainResource):
+ (WebCore::FrameLoader::documentLoader):
+ (WebCore::FrameLoader::policyDocumentLoader):
+ (WebCore::FrameLoader::provisionalDocumentLoader):
+ (WebCore::FrameLoader::state):
+ (WebCore::FrameLoader::client):
+ (WebCore::FrameLoader::url):
+ (WebCore::FrameLoader::isLoadingFromCachedPage):
+ (WebCore::FrameLoader::committingFirstRealLoad):
+ (WebCore::FrameLoader::committedFirstRealDocumentLoad):
+ (WebCore::FrameLoader::creatingInitialEmptyDocument):
+ * loader/HistoryController.h:
+ (WebCore::HistoryController::currentItem):
+ (WebCore::HistoryController::provisionalItem):
+ * loader/PolicyCallback.h:
+ (WebCore::PolicyCallback::request):
+ * loader/PolicyChecker.h:
+ (WebCore::PolicyChecker::loadType):
+ (WebCore::PolicyChecker::setLoadType):
+ (WebCore::PolicyChecker::delegateIsDecidingNavigationPolicy):
+ (WebCore::PolicyChecker::delegateIsHandlingUnimplementablePolicy):
+ * loader/RedirectScheduler.h:
+ * loader/ResourceLoadNotifier.h:
+
+2009-10-16 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Add a Debug_All configuration to build entire stack as debug.
+ Change Debug_Internal to:
+ - stop using _debug suffix for all WebKit/Safari binaries
+ - not use _debug as a DLL naming suffix
+ - use non-debug C runtime lib.
+
+ * WebCore.vcproj/QTMovieWin.vcproj: Add Debug_All configuration.
+ * WebCore.vcproj/WebCore.make: Debug build in makefile should build Debug_All.
+ * WebCore.vcproj/WebCore.sln: Add Debug_All configuration.
+ * WebCore.vcproj/WebCore.submit.sln: Add Debug_All configuration.
+ * WebCore.vcproj/WebCore.vcproj: Add Debug_All configuration.
+ * WebCore.vcproj/WebCoreGenerated.vcproj: Renamed single configuration from "Release" to "all".
+
+2009-10-16 Dimitri Glazkov <dglazkov@chromium.org>
+
+ No review, rolling out r49693, because it broke Chromium build.
+ http://trac.webkit.org/changeset/49693
+
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gypi:
+
+2009-10-16 Andrew Scherkus <scherkus@chromium.org>
+
+ Reviewed by Eric Carlson.
+
+ Updated media resource selection algorithm to reflect latest HTML 5 specification.
+
+ Noticable changes:
+ - Elements with no source should have their network state set to NETWORK_EMPTY as opposed to NETWORK_NO_SOURCE
+ - Empty string ("") is now considered a valid URL resolving to the current page and will be loaded
+
+ Tests: media/video-src-empty.html
+ media/video-src-none.html
+
+ https://bugs.webkit.org/show_bug.cgi?id=30407
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::selectMediaResource): Updated code and comments to match spec.
+
+2009-10-16 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Insecure plug-ins don't trigger mixed content
+ https://bugs.webkit.org/show_bug.cgi?id=30431
+
+ Added the missing check.
+
+ Test: http/tests/security/mixedContent/insecure-plugin-in-iframe.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadPlugin):
+
+2009-10-16 Andrew Scherkus <scherkus@chromium.org>
+
+ Reviewed by Eric Carlson.
+
+ Set autobuffer to true and schedule load in V8 audio element constructor.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30448
+
+ Covered by existing tests.
+
+ * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL): Set autobuffer to true and schedule load.
+
+2009-10-16 Andrew Scherkus <scherkus@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Remove FIXME in RenderMediaControlsChromium as bug was fixed upstream.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30422
+
+ Covered by existing media layout tests.
+
+ * rendering/RenderMediaControlsChromium.cpp:
+ (WebCore::paintMediaSlider): Removed round() and FIXME.
+
+2009-10-16 Andrew Scherkus <scherkus@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix Chromium media controls to render a disabled play button when the element is unintialized.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30410
+
+ Covered by existing layout tests.
+
+ * rendering/RenderMediaControlsChromium.cpp:
+ (WebCore::paintMediaPlayButton): Include check for NETWORK_EMPTY to render disabled play button.
+
+2009-10-16 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Make typeinfo flags default to false
+ https://bugs.webkit.org/show_bug.cgi?id=30372
+
+ Last part -- replace HasDefaultGetPropertyNames with OverridesGetPropertyNames
+ flag.
+
+ * bindings/js/JSDOMWindowShell.h:
+ (WebCore::JSDOMWindowShell::createStructure):
+ * bindings/js/JSHTMLAllCollection.h:
+ (WebCore::JSHTMLAllCollection::createStructure):
+ * bindings/js/JSQuarantinedObjectWrapper.h:
+ (WebCore::JSQuarantinedObjectWrapper::createStructure):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bridge/runtime_array.h:
+ (JSC::RuntimeArray::createStructure):
+ * bridge/runtime_object.h:
+ (JSC::RuntimeObjectImp::createStructure):
+
+2009-10-16 Steven Knight <sgk@chromium.org>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30447
+ Handle long link lines by building .idl-generated bindings in a
+ separate webcore_bindings library target. Avoid Visual Studio
+ dependency issues by building additional generated .cpp and .h files
+ in a separate webcore_bindings_sources target.
+
+ Chrome should still build and test successfully.
+
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gypi:
+
+2009-10-16 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Transform transitions that used to be accelerated are no longer so
+ https://bugs.webkit.org/show_bug.cgi?id=30453
+
+ The change in r49633, to not run accelerated animations/transitions on layers that
+ are not attached, broke accelerated transitions/animations in many cases where they start
+ as soon as the page loads. This change reverts the code that tests for the GraphicsLayer being
+ attached.
+
+ No test, because it's not possible from a test to know whether a transition is accelerated or not.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::startAnimation):
+ (WebCore::RenderLayerBacking::startTransition):
+
+2009-10-16 Kevin Ollivier <kevino@theolliviers.com>
+
+ wxMSW build fix, build the MSW source to get methods that use the MSW version of
+ PlatformModuleVersion.
+
+ * wscript:
+
+2009-10-16 Adam Barth <abarth@webkit.org>
+
+ Unreviewed build fix. Add back MIMETypeRegistryChromium with the right
+ casing.
+
+ * platform/chromium/MIMETypeRegistryChromium.cpp: Added.
+ (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
+ (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
+ (WebCore::MIMETypeRegistry::getMIMETypeForPath):
+ (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
+ (WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType):
+ (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding):
+ (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
+ (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
+ (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
+ (WebCore::MIMETypeRegistry::isJavaAppletMIMEType):
+ (WebCore::MIMETypeRegistry::getMediaMIMETypeForExtension):
+ (WebCore::dummyHashSet):
+ (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes):
+ (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes):
+ (WebCore::MIMETypeRegistry::getSupportedImageMIMETypesForEncoding):
+ (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes):
+ (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
+
+2009-10-16 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ MimeTypeRegistryChromium is mis-casen
+ https://bugs.webkit.org/show_bug.cgi?id=30441
+
+ Change the case of MimeTypeRegistryChromium to match other platforms.
+
+ * WebCore.gypi:
+ * platform/chromium/MIMETypeRegistryChromium.cpp: Copied from WebCore/platform/chromium/MimeTypeRegistryChromium.cpp.
+ * platform/chromium/MimeTypeRegistryChromium.cpp: Removed.
+
+2009-10-16 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Change EmptyPluginHalterClient in SVGImage to be non-static, to
+ match changes made http://trac.webkit.org/changeset/49385.
+ https://bugs.webkit.org/show_bug.cgi?id=30403
+
+ Run the following layout test sequence:
+ LayoutTests/svg/W3C-SVG-1.1/struct-image-01-t.svg
+ LayoutTests/svg/W3C-SVG-1.1/struct-image-03-t.svg
+ LayoutTests/svg/W3C-SVG-1.1/struct-image-04-t.svg
+ LayoutTests/svg/W3C-SVG-1.1/struct-image-05-b.svg
+ LayoutTests/svg/W3C-SVG-1.1/struct-image-06-t.svg
+ LayoutTests/svg/W3C-SVG-1.1/struct-image-07-t.svg
+ LayoutTests/svg/W3C-SVG-1.1/struct-image-08-t.svg
+ LayoutTests/svg/W3C-SVG-1.1/struct-image-09-t.svg
+ LayoutTests/svg/W3C-SVG-1.1/struct-image-10-t.svg
+ LayoutTests/svg/carto.net/scrollbar.svg
+ LayoutTests/svg/carto.net/selectionlist.svg
+
+ selectionlist.svg should not crash.
+
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::dataChanged): Made EmptyPluginHalterClient non-static.
+
+2009-10-16 Victor Wang <victorw@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add beforeload event support to V8DOMWrapper
+
+ https://bugs.webkit.org/show_bug.cgi?id=30413
+
+ LayoutTests/fast/dom/beforeload/frame-before-load.html
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertEventToV8Object):
+
+2009-10-16 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ MimeTypeRegistryChromium is mis-casen
+ https://bugs.webkit.org/show_bug.cgi?id=30441
+
+ Change the case of MimeTypeRegistryChromium to match other platforms.
+
+ * WebCore.gypi:
+ * platform/chromium/MIMETypeRegistryChromium.cpp: Copied from WebCore/platform/chromium/MimeTypeRegistryChromium.cpp.
+ * platform/chromium/MimeTypeRegistryChromium.cpp: Removed.
+
+2009-10-16 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Chrome doesn't set Content-Type for file upload when the file extension
+ is not recognized
+ https://bugs.webkit.org/show_bug.cgi?id=30433
+
+ Apparently, getMIMETypeForPath is supposed to return
+ application/octet-stream when it doesn't have a better MIME type.
+
+ * platform/chromium/MimeTypeRegistryChromium.cpp:
+ (WebCore::MIMETypeRegistry::getMIMETypeForPath):
+
+2009-10-16 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Pull out r49676 as it caused build breakges on Symbian
+
+ * plugins/symbian/PluginViewSymbian.cpp:
+
+2009-10-16 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ Crash fix when loading NPAPI plugins on Qt/Mac
+
+ There's no guarantee that the plist will be valid even if we
+ ask the plugin to create it. Crash obverved with iGetter.
+
+ * plugins/mac/PluginPackageMac.cpp:
+
+2009-10-15 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by David Levin.
+
+ Fix for Chromium/skia's implementation of canvas's isPointInPath().
+ https://bugs.webkit.org/show_bug.cgi?id=30402
+
+ Covered by LayoutTests/fast/canvas/pointInPath.html.
+
+ * platform/graphics/skia/SkiaUtils.cpp:
+ (WebCore::SkPathContainsPoint):
+
+2009-10-15 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Factor ResourceLoadNotifier out of FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=30379
+
+ These methods have virtually no interaction with the rest of
+ FrameLoader.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * dom/Document.cpp:
+ (WebCore::Document::resourceRetrievedByXMLHttpRequest):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::FrameLoader):
+ (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
+ (WebCore::ResourceLoadNotifier::ResourceLoadNotifier):
+ (WebCore::ResourceLoadNotifier::activeDocumentLoader):
+ (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
+ (WebCore::ResourceLoadNotifier::willSendRequest):
+ (WebCore::ResourceLoadNotifier::didReceiveResponse):
+ (WebCore::ResourceLoadNotifier::didReceiveData):
+ (WebCore::ResourceLoadNotifier::didFailToLoad):
+ (WebCore::ResourceLoadNotifier::didLoadResourceByXMLHttpRequest):
+ (WebCore::FrameLoader::sendRemainingDelegateMessages):
+ (WebCore::FrameLoader::requestFromDelegate):
+ (WebCore::ResourceLoadNotifier::didFinishLoad):
+ (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
+ (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
+ (WebCore::ResourceLoadNotifier::dispatchAssignIdentifierToInitialRequest):
+ (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
+ (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
+ (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
+ (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
+ * loader/FrameLoader.h:
+ (WebCore::FrameLoader::notifier):
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::receivedError):
+ * loader/ResourceLoadNotifier.cpp: Added.
+ (WebCore::ResourceLoadNotifier::ResourceLoadNotifier):
+ (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
+ (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
+ (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
+ (WebCore::ResourceLoadNotifier::willSendRequest):
+ (WebCore::ResourceLoadNotifier::didReceiveResponse):
+ (WebCore::ResourceLoadNotifier::didReceiveData):
+ (WebCore::ResourceLoadNotifier::didFinishLoad):
+ (WebCore::ResourceLoadNotifier::didFailToLoad):
+ (WebCore::ResourceLoadNotifier::didLoadResourceByXMLHttpRequest):
+ (WebCore::ResourceLoadNotifier::dispatchAssignIdentifierToInitialRequest):
+ (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
+ (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
+ (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
+ (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
+ (WebCore::ResourceLoadNotifier::activeDocumentLoader):
+ * loader/ResourceLoadNotifier.h: Added.
+ * loader/ResourceLoader.cpp:
+ (WebCore::ResourceLoader::willSendRequest):
+ (WebCore::ResourceLoader::didReceiveResponse):
+ (WebCore::ResourceLoader::didReceiveData):
+ (WebCore::ResourceLoader::didFinishLoadingOnePart):
+ (WebCore::ResourceLoader::didFail):
+ (WebCore::ResourceLoader::didCancel):
+ (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
+ (WebCore::ResourceLoader::didCancelAuthenticationChallenge):
+
+2009-10-15 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Bug 30427 - Remove unneeded methods in ChromiumDataObject
+ (https://bugs.webkit.org/show_bug.cgi?id=30427)
+
+ Remove no longer needed methods from ChromiumDataObject.
+
+ No new tests (no functional change)
+
+ * platform/chromium/ChromiumDataObject.h:
+
+2009-10-16 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Need a way to inform the application when a Netscape plugin is created or deleted
+ https://bugs.webkit.org/show_bug.cgi?id=30179
+
+ Inform the application when a plugin is created or destroyed, but only if the
+ application registered for these notifications.
+
+ * plugins/symbian/PluginViewSymbian.cpp:
+ (WebCore::PluginView::platformStart):
+ (WebCore::PluginView::platformDestroy):
+
+2009-10-16 Shu Chang <Chang.Shu@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ Default language translation should be determined by locale settings,
+ e.g., "en-US".
+ https://bugs.webkit.org/show_bug.cgi?id=29653
+
+ Test: fast/js/navigator-language.html
+
+ * platform/qt/Localizations.cpp:
+ (WebCore::defaultLanguage):
+
+2009-10-16 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ Crash fix when loading NPAPI plugins on Qt/Mac
+
+ There's no guarantee that the plist will be valid even if we
+ ask the plugin to create it. Crash obverved with iGetter.
+
+ * plugins/mac/PluginPackageMac.cpp:
+
+2009-10-15 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by David Levin.
+
+ Fix for Chromium/skia's implementation of canvas's isPointInPath().
+ https://bugs.webkit.org/show_bug.cgi?id=30402
+
+ Covered by LayoutTests/fast/canvas/pointInPath.html.
+
+ * platform/graphics/skia/SkiaUtils.cpp:
+ (WebCore::SkPathContainsPoint):
+
+2009-10-15 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Factor ResourceLoadNotifier out of FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=30379
+
+ These methods have virtually no interaction with the rest of
+ FrameLoader.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * dom/Document.cpp:
+ (WebCore::Document::resourceRetrievedByXMLHttpRequest):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::FrameLoader):
+ (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
+ (WebCore::ResourceLoadNotifier::ResourceLoadNotifier):
+ (WebCore::ResourceLoadNotifier::activeDocumentLoader):
+ (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
+ (WebCore::ResourceLoadNotifier::willSendRequest):
+ (WebCore::ResourceLoadNotifier::didReceiveResponse):
+ (WebCore::ResourceLoadNotifier::didReceiveData):
+ (WebCore::ResourceLoadNotifier::didFailToLoad):
+ (WebCore::ResourceLoadNotifier::didLoadResourceByXMLHttpRequest):
+ (WebCore::FrameLoader::sendRemainingDelegateMessages):
+ (WebCore::FrameLoader::requestFromDelegate):
+ (WebCore::ResourceLoadNotifier::didFinishLoad):
+ (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
+ (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
+ (WebCore::ResourceLoadNotifier::dispatchAssignIdentifierToInitialRequest):
+ (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
+ (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
+ (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
+ (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
+ * loader/FrameLoader.h:
+ (WebCore::FrameLoader::notifier):
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::receivedError):
+ * loader/ResourceLoadNotifier.cpp: Added.
+ (WebCore::ResourceLoadNotifier::ResourceLoadNotifier):
+ (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
+ (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
+ (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
+ (WebCore::ResourceLoadNotifier::willSendRequest):
+ (WebCore::ResourceLoadNotifier::didReceiveResponse):
+ (WebCore::ResourceLoadNotifier::didReceiveData):
+ (WebCore::ResourceLoadNotifier::didFinishLoad):
+ (WebCore::ResourceLoadNotifier::didFailToLoad):
+ (WebCore::ResourceLoadNotifier::didLoadResourceByXMLHttpRequest):
+ (WebCore::ResourceLoadNotifier::dispatchAssignIdentifierToInitialRequest):
+ (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
+ (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
+ (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
+ (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
+ (WebCore::ResourceLoadNotifier::activeDocumentLoader):
+ * loader/ResourceLoadNotifier.h: Added.
+ * loader/ResourceLoader.cpp:
+ (WebCore::ResourceLoader::willSendRequest):
+ (WebCore::ResourceLoader::didReceiveResponse):
+ (WebCore::ResourceLoader::didReceiveData):
+ (WebCore::ResourceLoader::didFinishLoadingOnePart):
+ (WebCore::ResourceLoader::didFail):
+ (WebCore::ResourceLoader::didCancel):
+ (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
+ (WebCore::ResourceLoader::didCancelAuthenticationChallenge):
+
+2009-10-15 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Bug 30427 - Remove unneeded methods in ChromiumDataObject
+ (https://bugs.webkit.org/show_bug.cgi?id=30427)
+
+ Remove no longer needed methods from ChromiumDataObject.
+
+ No new tests (no functional change)
+
+ * platform/chromium/ChromiumDataObject.h:
+
+2009-10-15 Daniel Bates <dbates@webkit.org>
+
+ No review, rolling out r49644.
+ http://trac.webkit.org/changeset/49644
+
+ We need to think about this change some more. See bug #30418
+ for more details.
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canEvaluate):
+ (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
+ (WebCore::XSSAuditor::canCreateInlineEventListener):
+ (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
+ (WebCore::XSSAuditor::canLoadObject):
+ (WebCore::XSSAuditor::canSetBaseElementURL):
+ (WebCore::XSSAuditor::findInRequest):
+ * page/XSSAuditor.h:
+
+2009-10-14 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Add SPI to determine whether a node is a halted plug-in.
+
+ Part of <rdar://problem/7273354> Halted plug-ins should restart on
+ mouseover
+
+ https://bugs.webkit.org/show_bug.cgi?id=30151
+
+ Reviewed by Darin Adler.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::PluginView):
+ Initialize m_isHalted.
+
+ * plugins/PluginView.h:
+ (WebCore::PluginView::isHalted):
+ Return m_isHalted.
+
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::halt):
+ Set m_isHalted to true.
+ (WebCore::PluginView::restart):
+ clear m_isHalted.
+
+2009-10-15 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ [Qt] Build fix for QtWebKit after r49649.
+
+ Change JSC::HasNonDefaultMark to OverridesMarkChildren in createStructure function.
+
+ * bridge/qt/qt_runtime.h:
+ (JSC::Bindings::QtRuntimeMethod::createStructure):
+
+2009-10-15 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed - build fix.
+
+ Web Inspector: add file missing in r49648
+
+ * inspector/front-end/TestController.js: Added.
+ (WebInspector.TestController):
+ (WebInspector.TestController.prototype.waitUntilDone):
+ (WebInspector.TestController.prototype.notifyDone):
+ (WebInspector.evaluateForTestInFrontend):
+
+2009-10-15 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Make typeinfo flags default to false
+ https://bugs.webkit.org/show_bug.cgi?id=30372
+
+ Part 2 -- Reverse the TypeInfo HasDefaultMark flag to OverridesMarkChildren, etc
+
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::DOMObjectWithGlobalPointer::createStructure):
+ (WebCore::DOMConstructorObject::createStructure):
+ * bindings/js/JSDOMWindowShell.h:
+ (WebCore::JSDOMWindowShell::createStructure):
+ * bindings/js/JSHTMLAllCollection.h:
+ (WebCore::JSHTMLAllCollection::createStructure):
+ * bindings/js/JSQuarantinedObjectWrapper.h:
+ (WebCore::JSQuarantinedObjectWrapper::createStructure):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bridge/qt/qt_runtime.h:
+ (JSC::Bindings::QtRuntimeMethod::createStructure):
+ * bridge/runtime_method.h:
+ (JSC::RuntimeMethod::createStructure):
+
+2009-10-15 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: introduce test controller with waitUntilDone
+ on frontend side.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30400
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/TestController.js: Added.
+ (WebInspector.TestController):
+ (WebInspector.TestController.prototype.waitUntilDone):
+ (WebInspector.TestController.prototype.notifyDone):
+ (WebInspector.evaluateForTestInFrontend):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+
+2009-10-15 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27895
+
+ Fixes an issue in which injecting an inline event handler whose value ends in a single-line
+ JavaScript comment can bypass the XSSAuditor. Similarly fixes this issue with respect to
+ the HTML Base element, HTML Object element, inline and external script tags, and
+ JavaScript multi-line variants of all of these attacks.
+
+ Tests: http/tests/security/xssAuditor/base-href-comment.html
+ http/tests/security/xssAuditor/iframe-javascript-url-comment.html
+ http/tests/security/xssAuditor/img-onerror-HTML-comment.html
+ http/tests/security/xssAuditor/img-onerror-comment.html
+ http/tests/security/xssAuditor/object-tag-comment.html
+ http/tests/security/xssAuditor/script-tag-comment-HTML-entity.html
+ http/tests/security/xssAuditor/script-tag-comment.html
+ http/tests/security/xssAuditor/script-tag-with-source-comment.html
+
+ * page/XSSAuditor.cpp: Added constant minAttackLength.
+ (WebCore::XSSAuditor::canEvaluate):
+ (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
+ (WebCore::XSSAuditor::canCreateInlineEventListener):
+ (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
+ (WebCore::XSSAuditor::canLoadObject):
+ (WebCore::XSSAuditor::canSetBaseElementURL):
+ (WebCore::XSSAuditor::findInRequest): Added parameter context. Only looks at up
+ to minAttackLength of script code plus context (if any).
+ * page/XSSAuditor.h:
+
+2009-10-08 Adam Langley <agl@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Currently, Skia clip paths are 1-bit. This patch makes our path
+ clipping anti-aliased for non-canvas drawing.
+
+ http://code.google.com/p/chromium/issues/detail?id=5927
+ https://bugs.webkit.org/show_bug.cgi?id=28820
+ http://www.imperialviolet.org/2009/09/02/anti-aliased-clipping.html
+
+ Already covered by layout tests. New baselines will be needed in the
+ Chromium tree.
+
+ (Reland. First landed in r49329, reverted in r49330 due to Windows
+ build break)
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::clip):
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::canvasClip):
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::GraphicsContext::canvasClip):
+ * platform/graphics/haiku/GraphicsContextHaiku.cpp:
+ (WebCore::GraphicsContext::canvasClip):
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::canvasClip):
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::addInnerRoundedRectClip):
+ (WebCore::GraphicsContext::clip):
+ (WebCore::GraphicsContext::canvasClip):
+ (WebCore::GraphicsContext::clipPath):
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::clipPathAntiAliased):
+ (PlatformContextSkia::restore):
+ (PlatformContextSkia::applyAntiAliasedClipPaths):
+ * platform/graphics/skia/PlatformContextSkia.h:
+ * platform/graphics/win/GraphicsContextWin.cpp:
+ (WebCore::GraphicsContext::canvasClip):
+ * platform/graphics/wince/GraphicsContextWince.cpp:
+ (WebCore::GraphicsContext::canvasClip):
+ * platform/graphics/wx/GraphicsContextWx.cpp:
+ (WebCore::GraphicsContext::canvasClip):
+
+2009-10-15 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7295738> No way to mute/unmute a movie in full screen video mode
+
+ * WebCore.Video.exp: Export muted and setMute.
+
+2009-10-15 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Transitions fail to run sometimes
+ https://bugs.webkit.org/show_bug.cgi?id=26770
+
+ Fix an issue where we could attempt to start accelerated animations or transitions on
+ GraphicsLayer that were not rooted (because of visibility:hidden), which would leave
+ the AnimationController's m_waitingForResponse flag in a state that killed subsequent
+ software transitions.
+
+ * page/animation/AnimationController.cpp:
+ (WebCore::AnimationControllerPrivate::AnimationControllerPrivate):
+ (WebCore::AnimationControllerPrivate::endAnimationUpdate):
+ (WebCore::AnimationControllerPrivate::receivedStartTimeResponse):
+ (WebCore::AnimationControllerPrivate::addToStartTimeResponseWaitList):
+ (WebCore::AnimationControllerPrivate::startTimeResponse):
+ * page/animation/AnimationControllerPrivate.h:
+ Make some methods non-inline for ease of debugging (these are not hot methods).
+ Rename m_waitingForAResponse to m_waitingForResponse.
+
+ * platform/graphics/GraphicsLayer.h:
+ * platform/graphics/GraphicsLayer.cpp:
+ (WebCore::GraphicsLayer::hasAncestor):
+ New method to report whether the receiver has the given layer as an ancestor. Used for checking
+ whether a layer is rooted.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::startAnimation):
+ (WebCore::RenderLayerBacking::startTransition):
+ Don't try to start accelerated animations or transitions on non-rooted GraphicsLayers.
+
+2009-10-15 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Refactor ProfilesPanel to support multiple profile types
+
+ Data describing different profile types are now stored in distinct objects.
+ https://bugs.webkit.org/show_bug.cgi?id=30332
+
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/ProfileView.js:
+ (WebInspector.CPUProfileView.profileCallback):
+ (WebInspector.CPUProfileView):
+ (WebInspector.CPUProfileView.prototype._sortData):
+ (WebInspector.CPUProfileType):
+ (WebInspector.CPUProfileType.prototype.get buttonTooltip):
+ (WebInspector.CPUProfileType.prototype.get buttonStyle):
+ (WebInspector.CPUProfileType.prototype.buttonClicked):
+ (WebInspector.CPUProfileType.prototype.setRecordingProfile):
+ (WebInspector.CPUProfile):
+ (WebInspector.CPUProfile.prototype.get title):
+ (WebInspector.CPUProfile.prototype.get uid):
+ (WebInspector.CPUProfile.prototype.get head):
+ (WebInspector.CPUProfile.prototype.createView):
+ (WebInspector.CPUProfile.prototype.viewForProfile):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfileType):
+ (WebInspector.ProfileType.prototype.get buttonTooltip):
+ (WebInspector.ProfileType.prototype.get buttonStyle):
+ (WebInspector.ProfileType.prototype.get buttonCaption):
+ (WebInspector.ProfileType.prototype.get id):
+ (WebInspector.ProfileType.prototype.get name):
+ (WebInspector.ProfileType.prototype.buttonClicked):
+ (WebInspector.ProfilesPanel):
+ (WebInspector.ProfilesPanel.prototype.get statusBarItems.clickHandler):
+ (WebInspector.ProfilesPanel.prototype.get statusBarItems):
+ (WebInspector.ProfilesPanel.prototype.reset):
+ (WebInspector.ProfilesPanel.prototype.registerProfileType):
+ (WebInspector.ProfilesPanel.prototype._makeKey):
+ (WebInspector.ProfilesPanel.prototype.addProfileHeader):
+ (WebInspector.ProfilesPanel.prototype.showProfile):
+ (WebInspector.ProfilesPanel.prototype.getProfileType):
+ (WebInspector.ProfilesPanel.prototype.showProfileForURL):
+ (WebInspector.ProfilesPanel.prototype.updateProfileTypeButtons):
+ (WebInspector.ProfilesPanel.prototype.displayTitleForProfileLink):
+ (WebInspector.ProfilesPanel.prototype.get searchableViews):
+ (WebInspector.ProfilesPanel.prototype._updateInterface):
+ * inspector/front-end/inspector.js:
+ (WebInspector._createPanels):
+ (WebInspector.documentClick.followLink):
+ (WebInspector.documentClick):
+ (WebInspector.addProfileHeader):
+ (WebInspector.setRecordingProfile):
+ (WebInspector.linkifyStringAsFragment):
+ (WebInspector.showProfileForURL):
+
+2009-10-15 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Enable inspector layout tests.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30014
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::evaluateForTestInFrontend):
+
+2009-10-15 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GStreamer] READY state doesn't mean "enough data"
+ https://bugs.webkit.org/show_bug.cgi?id=30003
+
+ STATE_READY means MediaPlayer::HaveNothing
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::updateStates):
+
+2009-10-15 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30002
+
+ implement cancelLoad
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::cancelLoad):
+
+2009-10-15 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
+ Reviewed by Gustavo Noronha.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30353
+
+ Fix race condition, leading to a deadlock
+
+ * platform/graphics/gtk/VideoSinkGStreamer.cpp:
+ (webkit_video_sink_timeout_func):
+ (webkit_video_sink_render):
+ (unlock_buffer_mutex):
+ (webkit_video_sink_unlock):
+ (webkit_video_sink_unlock_stop):
+ (webkit_video_sink_stop):
+ (webkit_video_sink_start):
+ (webkit_video_sink_class_init):
+ Fix race condition in unlock/render that would lead to deadlocks.
+
+2009-10-15 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
+ Reviewed by Gustavo Noronha.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30374
+
+ Check if caps are valid before parsing them
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::duration):
+ Check if caps are valid before parsing them in ::naturalSize().
+ This prevents assertions if the natural size should be calculated
+ before the video caps are negotiated.
+
+2009-10-15 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30006
+ [GStreamer] Unnecessary checks for Messages types in callbacks
+
+ refactored gst message callbacks into a single one
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mediaPlayerPrivateMessageCallback):
+ (WebCore::do_gst_init):
+ (WebCore::MediaPlayerPrivate::duration):
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+
+2009-10-15 Shu Chang <Chang.Shu@nokia.com>
+
+ Reviewed by Adele Peterson.
+
+ Anchor elements should be mouse focusable regardless isLink flag.
+ https://bugs.webkit.org/show_bug.cgi?id=26856
+
+ * html/HTMLAnchorElement.cpp:
+ * html/HTMLAnchorElement.h:
+
+2009-10-15 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Sort XCode project file.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-10-15 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Dave Hyatt.
+
+ Return correct shorthand property name for
+ background-repeat-x, background-repeat-y, background-position-x,
+ background-position-y, -webkit-mask-position-x, -webkit-mask-position-y,
+ -webkit-mask-repeat-x, -webkit-mask-repeat-y.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28972
+
+ Test: fast/backgrounds/repeat/background-repeat-shorthand.html
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+
+2009-10-14 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Migrate profiles to the injected script-based schema.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30328
+
+ * bindings/js/JSInspectorBackendCustom.cpp:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::getProfileHeaders):
+ (WebCore::InspectorBackend::getProfile):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::addProfile):
+ (WebCore::InspectorController::getProfileHeaders):
+ (WebCore::InspectorController::getProfile):
+ (WebCore::InspectorController::createProfileHeader):
+ * inspector/InspectorController.h:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addProfileHeader):
+ (WebCore::InspectorFrontend::didGetProfileHeaders):
+ (WebCore::InspectorFrontend::didGetProfile):
+ * inspector/InspectorFrontend.h:
+ * inspector/JavaScriptProfileNode.cpp:
+ (WebCore::ProfileNodeClass):
+ * inspector/front-end/ProfileView.js:
+ (WebInspector.ProfileView.profileCallback):
+ (WebInspector.ProfileView):
+ (WebInspector.ProfileView.prototype._mouseDownInDataGrid):
+ (WebInspector.ProfileView.prototype._assignParentsInProfile):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype.addProfileHeader):
+ * inspector/front-end/inspector.js:
+ (WebInspector.addProfileHeader):
+
+2009-10-14 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Create and update frontend script objects only when
+ web inspector is visible.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30376
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::addConsoleMessage):
+ (WebCore::InspectorController::populateScriptObjects):
+ (WebCore::InspectorController::pruneResources):
+ (WebCore::InspectorController::didCommitLoad):
+ (WebCore::InspectorController::didLoadResourceFromMemoryCache):
+ (WebCore::InspectorController::identifierForInitialRequest):
+ (WebCore::InspectorController::mainResourceFiredDOMContentEvent):
+ (WebCore::InspectorController::mainResourceFiredLoadEvent):
+ (WebCore::InspectorController::willSendRequest):
+ (WebCore::InspectorController::didReceiveResponse):
+ (WebCore::InspectorController::didReceiveContentLength):
+ (WebCore::InspectorController::didFinishLoading):
+ (WebCore::InspectorController::didFailLoading):
+ (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
+ (WebCore::InspectorController::scriptImported):
+ (WebCore::InspectorController::didOpenDatabase):
+ (WebCore::InspectorController::didUseDOMStorage):
+ (WebCore::InspectorController::evaluateForTestInFrontend):
+
+2009-10-15 Joseph Pecoraro <joepeck@webkit.org>
+
+ Fix Windows build.
+
+ * dom/Document.idl:
+
+2009-10-14 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ [HTML5] Add document.head
+ https://bugs.webkit.org/show_bug.cgi?id=30232
+
+ Test is fast/dom/document-head.html
+
+ * dom/Document.idl: added readonly attribute head
+
+2009-10-14 Matt Mueller <mattm@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Check FNonNeg after the unit switch to avoid valgrind uninitialised conditional reference in WebCore::CSSParser::validUnit. See http://crbug.com/20939.
+ https://bugs.webkit.org/show_bug.cgi?id=30347
+ https://bugs.webkit.org/show_bug.cgi?id=22772
+
+ Covered by running LayoutTests/fast/css/invalid-percentage-property.html under valgrind.
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::validUnit):
+
+2009-10-14 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ Move scrolling code from FrameLoader to FrameView
+ https://bugs.webkit.org/show_bug.cgi?id=30370
+
+ This code is about controlling the Frame's view, not about loading
+ stuff into the frame.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::finishedParsing):
+ (WebCore::FrameLoader::scrollToAnchor):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::scrollToFragment):
+ (WebCore::FrameView::scrollToAnchor):
+ * page/FrameView.h:
+
+2009-10-14 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Make typeinfo flags default to false
+ https://bugs.webkit.org/show_bug.cgi?id=30372
+
+ Part 1. Reverse the HasStandardGetOwnPropertySlot flag.
+
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::DOMObjectWithGlobalPointer::createStructure):
+ (WebCore::DOMConstructorObject::createStructure):
+ * bindings/js/JSDOMWindowShell.h:
+ (WebCore::JSDOMWindowShell::createStructure):
+ * bindings/js/JSHTMLAllCollection.h:
+ (WebCore::JSHTMLAllCollection::createStructure):
+ * bindings/js/JSQuarantinedObjectWrapper.h:
+ (WebCore::JSQuarantinedObjectWrapper::createStructure):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bridge/objc/objc_runtime.h:
+ (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
+ * bridge/runtime_array.h:
+ (JSC::RuntimeArray::createStructure):
+ * bridge/runtime_method.h:
+ (JSC::RuntimeMethod::createStructure):
+ * bridge/runtime_object.h:
+ (JSC::RuntimeObjectImp::createStructure):
+
+2009-10-14 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ [XSSAuditor] Add an exception for local files
+ https://bugs.webkit.org/show_bug.cgi?id=30352
+
+ Reduce XSS auditor false positives by always letting pages load scripts
+ from their own host. We don't actually know of any false positives
+ that this prevents, but it seems like a good idea.
+
+ One subtly is that we don't add this exception for scripts that have a
+ query string because (1) URLs with query strings are more apt to
+ confuse servers and (2) it is much less common to load scripts with a
+ query string.
+
+ Tests: http/tests/security/xssAuditor/script-tag-with-source-same-host-with-query.html
+ http/tests/security/xssAuditor/script-tag-with-source-same-host.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
+
+2009-10-14 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by George Staikos.
+
+ Kill virtual contextElement() method spread all over SVG code
+ https://bugs.webkit.org/show_bug.cgi?id=30183
+
+ Remove virtual contextElement() function from all SVG*Element classes, as all animated properties live in the
+ SVG*Element classes now instead of the SVGFitToViewBox / SVGURIReference / SVGExternalResourcesRequired
+ subclasses. This is a first step to working animVal support. More patches will follow that depend on this change.
+
+ Remove "This file is part of the KDE project" from several files, change my old mail adress wildfox -> zimmermann,
+ and remove vim modelines on all files I touched. No change in functionality, thus no new tests.
+
+ * svg/SVGAElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
+ * svg/SVGAltGlyphElement.h: Remove virtual contextElement() method.
+ * svg/SVGAnimatedProperty.h:
+ (WebCore::::synchronize):
+ (WebCore::::startAnimation):
+ (WebCore::::stopAnimation):
+ * svg/SVGAnimationElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
+ * svg/SVGCircleElement.h: Ditto.
+ * svg/SVGClipPathElement.h: Ditto.
+ * svg/SVGCursorElement.h: Ditto.
+ * svg/SVGDefsElement.h: Ditto.
+ * svg/SVGEllipseElement.h: Ditto.
+ * svg/SVGExternalResourcesRequired.h: Remove pure-virtual contextElement() method.
+ * svg/SVGFEImageElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
+ * svg/SVGFELightElement.h: Remove virtual contextElement() method.
+ * svg/SVGFEMergeNodeElement.h: Ditto.
+ * svg/SVGFilterElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
+ * svg/SVGFilterPrimitiveStandardAttributes.h: Remove virtual contextElement() method.
+ * svg/SVGFitToViewBox.cpp:
+ (WebCore::SVGFitToViewBox::parseViewBox): Add Document* parameter - we used to fetch the Document pointer from the context element.
+ (WebCore::SVGFitToViewBox::parseMappedAttribute): Ditto.
+ * svg/SVGFitToViewBox.h: Remove pure-virtual contextElement() method.
+ * svg/SVGFontElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
+ * svg/SVGForeignObjectElement.h: Ditto.
+ * svg/SVGGElement.h: Ditto.
+ * svg/SVGGradientElement.h: Ditto.
+ * svg/SVGImageElement.h: Ditto.
+ * svg/SVGLineElement.h: Ditto.
+ * svg/SVGMPathElement.h: Ditto. Fix license indention.
+ * svg/SVGMarkerElement.cpp:
+ (WebCore::SVGMarkerElement::parseMappedAttribute): Pass document() to SVGFitToViewBox::parseMappedAttribute().
+ * svg/SVGMarkerElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
+ * svg/SVGMaskElement.h: Ditto.
+ * svg/SVGPathElement.h: Ditto.
+ * svg/SVGPatternElement.cpp:
+ (WebCore::SVGPatternElement::parseMappedAttribute): Pass document() to SVGFitToViewBox::parseMappedAttribute().
+ * svg/SVGPatternElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
+ * svg/SVGPolyElement.cpp:
+ (WebCore::SVGPolyElement::updateAnimatedSVGAttribute): synchronizeProperty<...>() has been renamed to PropertySynchronizer<...>::synchronize().
+ * svg/SVGPolyElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
+ * svg/SVGRectElement.h: Ditto.
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::parseMappedAttribute): Pass document() to SVGFitToViewBox::parseMappedAttribute().
+ * svg/SVGSVGElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
+ * svg/SVGScriptElement.h: Ditto.
+ * svg/SVGSwitchElement.h: Ditto.
+ * svg/SVGSymbolElement.cpp:
+ (WebCore::SVGSymbolElement::parseMappedAttribute): Pass document() to SVGFitToViewBox::parseMappedAttribute().
+ * svg/SVGSymbolElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
+ * svg/SVGTRefElement.h: Remove virtual contextElement() method.
+ * svg/SVGTextContentElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
+ * svg/SVGTextPathElement.h: Remove virtual contextElement() method.
+ * svg/SVGUseElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
+ * svg/SVGViewElement.cpp:
+ (WebCore::SVGViewElement::parseMappedAttribute): Pass document() to SVGFitToViewBox::parseMappedAttribute().
+ * svg/SVGViewElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
+ * svg/SVGViewSpec.cpp:
+ (WebCore::SVGViewSpec::setViewBoxString): Pass document() to SVGFitToViewBox::parseMappedAttribute().
+ (WebCore::SVGViewSpec::parseViewSpec): Ditto.
+ * svg/SVGViewSpec.h: Devirtualize contextElement() method, it's the only place where contextElement() remains needed.
+
+2009-10-14 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVG Masking with wrong offset
+ [https://bugs.webkit.org/show_bug.cgi?id=30325]
+
+ SVGMaskElement moves the mask image graphics context to the wrong location.
+ In objectBoundingBoxMode the maskDestRect gets translated. This transformation
+ is not used in the later calculation. Fix by consistenly calculating the translation
+ offsets from the final mask destination rect.
+
+ Test: svg/custom/mask-with-default-value.svg
+
+ * svg/SVGMaskElement.cpp:
+ (WebCore::SVGMaskElement::drawMaskerContent):
+
+2009-10-14 Kevin Decker <kdecker@apple.com>
+
+ Rubberstamped by Jon Honeycutt.
+
+ Export a few more showSubstituteImage() related methods.
+
+ * WebCore.base.exp:
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-10-14 Evan Martin <evan@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Stringify CSS units manually (without printf) to make the formatting
+ locale-insensitive and obey CSS spec with respect to large values.
+
+ https://bugs.webkit.org/show_bug.cgi?id=18994
+
+ * css/CSSPrimitiveValue.cpp:
+ (WebCore::appendCSSDouble):
+ (WebCore::formatWithUnits):
+ (WebCore::CSSPrimitiveValue::cssText):
+
+2009-10-14 Mark Seaborn <mseaborn@google.com>
+
+ Reviewed by Darin Adler.
+
+ Check error return value in Perl build script
+ https://bugs.webkit.org/show_bug.cgi?id=30316
+
+ * css/makevalues.pl: Die if gperf fails.
+
+2009-10-14 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVG wrong filterRegions for userSpaceOnUse and percentage values
+ [https://bugs.webkit.org/show_bug.cgi?id=30330]
+
+ Some clean-up of the SVG filter calculation code. This clean-up
+ also fixes the problem with percentage and userSpaceInUse mode.
+
+ Test: svg/filters/subRegion-in-userSpace.svg
+
+ * platform/graphics/filters/FilterEffect.cpp:
+ (WebCore::FilterEffect::FilterEffect):
+ * platform/graphics/filters/FilterEffect.h:
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderBase::filterBoundingBoxForRenderer):
+ * svg/SVGFilterElement.cpp:
+ (WebCore::SVGFilterElement::buildFilter):
+ (WebCore::SVGFilterElement::canvasResource):
+ * svg/SVGFilterElement.h:
+ * svg/SVGFilterPrimitiveStandardAttributes.cpp:
+ (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes):
+ * svg/graphics/SVGResourceFilter.cpp:
+ (WebCore::SVGResourceFilter::SVGResourceFilter):
+ (WebCore::SVGResourceFilter::~SVGResourceFilter):
+ (WebCore::SVGResourceFilter::addFilterEffect):
+ (WebCore::SVGResourceFilter::prepareFilter):
+ * svg/graphics/SVGResourceFilter.h:
+ (WebCore::SVGResourceFilter::create):
+ * svg/graphics/filters/SVGFilter.cpp:
+ (WebCore::SVGFilter::SVGFilter):
+ (WebCore::SVGFilter::calculateEffectSubRegion):
+ (WebCore::SVGFilter::create):
+ * svg/graphics/filters/SVGFilter.h:
+
+2009-10-14 Chris Marrin <cmarrin@apple.com>
+
+ The last change fixed the problem, removing diagnostic printfs.
+
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::GraphicsContext3D):
+
+2009-10-14 Kevin Ollivier <kevino@theolliviers.com>
+
+ CURL build fix for versions < 7.18.
+
+ * platform/network/curl/ResourceHandleCurl.cpp:
+ (WebCore::ResourceHandle::setDefersLoading):
+ * platform/network/curl/ResourceHandleManager.cpp:
+ (WebCore::ResourceHandleManager::initializeHandle):
+
+2009-10-14 Chris Marrin <cmarrin@apple.com>
+
+ One more round of changes to figure out why the webgl
+ tests are crashing on the build bot. Here I am trying
+ to see if we can create a software renderer. I am also
+ printing the found pixel formats.
+
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::GraphicsContext3D):
+
+2009-10-14 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Enabling NPAPI plugin support on Qt Webkit for S60 platform
+ https://bugs.webkit.org/show_bug.cgi?id=29302
+
+ Also implemented by Mahesh Kulkarni<mahesh.kulkarni@nokia.com>,
+ Rohini Ananth <rohini.ananth@nokia.com> and help from Norbert Lesr
+ <norbert.leser@nokia.com>
+
+ * WebCore.pro:
+ Enabling ENABLE_NETSCAPE_PLUGIN_API for S60 and added S60 specific
+ new plugin files to be compiled under symbian: macro
+
+ * bridge/npapi.h:
+ Added NPEvent and NPRegion definition for Symbian
+
+ * plugins/PluginPackage.h:
+ Added S60 specific plugin interface and plugin loader variables
+ * plugins/PluginPackage.cpp:
+ (WebCore::PluginPackage::unload): Added !PLATFORM(SYMBIAN) macro.
+ Default implementation to be used only for non-symbian platform
+ * plugins/PluginDatabase.cpp:
+ Macro !SYMBIAN checking
+ * plugins/PluginView.h:
+ Add Symbian to platforms that support setNPWindowIfNeeded
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::setFrameRect): Add Symbian to platforms that
+ call setNPWindowRect from setFrameRect
+
+ Added folder 'symbian' which contains implementation files for S60
+ platform-specific NPAPI plugin functionality, under /plugins folder
+ * plugins/symbian
+ * plugins/symbian/npinterface.h:
+ Plugin Interface to be implemented by S60 NPAPI plugins
+ * plugins/symbian/PluginContainerSymbian.h:
+ * plugins/symbian/PluginContainerSymbian.cpp:
+ * plugins/symbian/PluginDatabaseSymbian.cpp:
+ * plugins/symbian/PluginViewSymbian.cpp:
+ * plugins/symbian/PluginPackageSymbian.cpp:
+
+2009-10-14 Chris Marrin <cmarrin@apple.com>
+
+ More changes to figure out why the webgl tests are crashing on the build bot.
+
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::GraphicsContext3D):
+
+2009-10-14 Victor Wang <victorw@chromium.org>
+
+ Reviewed by David Hyatt.
+
+ Round non-integer line height values.
+
+ Change webkit to rounding non-integer line height values
+ instead of truncating them. This fixes a layout test
+ failure on Windows and matches the calculation in IE and Firefox.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24434
+
+ Test: fast/css/line-height-rounding.html
+ fast/forms/textarea-scrollbar-height.htm
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::computeLogicalBoxHeights):
+ * rendering/RenderBR.cpp:
+ (WebCore::RenderBR::lineHeight):
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::computedLineHeight):
+
+2009-10-13 Kelly Norton <knorton@google.com>
+
+ Reviewed by Pavel Feldman.
+
+ Removes the persistent setting for InspectorTimelineAgent and renames timeline related
+ interfaces to be more consistent with the JavaScript profiler.
+
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::startTimelineProfiler):
+ (WebCore::InspectorBackend::stopTimelineProfiler):
+ (WebCore::InspectorBackend::timelineProfilerEnabled):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::setFrontendProxyObject):
+ (WebCore::InspectorController::startTimelineProfiler):
+ (WebCore::InspectorController::stopTimelineProfiler):
+ (WebCore::InspectorController::timelineProfilerEnabled):
+ * inspector/InspectorController.h:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::timelineProfilerWasStarted):
+ (WebCore::InspectorFrontend::timelineProfilerWasStopped):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/TimelineAgent.js:
+ (WebInspector.timelineProfilerWasStarted):
+ (WebInspector.timelineProfilerWasStopped):
+
+2009-10-01 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Adele Peterson.
+
+ Fix crash when loading invalid image data
+ https://bugs.webkit.org/show_bug.cgi?id=29980
+
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::setImageSizeForAltText):
+
+2009-10-09 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix for NULL ptr deref in canvas's toDataURL().
+ https://bugs.webkit.org/show_bug.cgi?id=30254
+
+ Test: fast/canvas/canvas-toDataURL-crash.html
+
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::toDataURL):
+
+2009-10-14 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed, reverting r49558 since it broke profiler tests.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30328
+
+ * bindings/js/JSInspectorBackendCustom.cpp:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::getProfileHeaders):
+ (WebCore::InspectorBackend::getProfile):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::addProfile):
+ (WebCore::InspectorController::getProfileHeaders):
+ (WebCore::InspectorController::getProfile):
+ (WebCore::InspectorController::createProfileHeader):
+ * inspector/InspectorController.h:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addProfileHeader):
+ (WebCore::InspectorFrontend::didGetProfileHeaders):
+ (WebCore::InspectorFrontend::didGetProfile):
+ * inspector/InspectorFrontend.h:
+ * inspector/JavaScriptProfileNode.cpp:
+ (WebCore::ProfileNodeClass):
+ * inspector/front-end/ProfileView.js:
+ (WebInspector.ProfileView.profileCallback):
+ (WebInspector.ProfileView):
+ (WebInspector.ProfileView.prototype._mouseDownInDataGrid):
+ (WebInspector.ProfileView.prototype._assignParentsInProfile):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype.addProfileHeader):
+ * inspector/front-end/inspector.js:
+ (WebInspector.addProfileHeader):
+
+2009-10-13 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ ImageDecoderQt: Minor tweaks to the decoder
+
+ - Only cache the data when we start to use it.
+ - Start with a repetition count of none for normal images.
+ - Do not use canRead as this will trigger parsing of the full image
+ - Cope with a GIF failing to decode the first frame, do not
+ set m_failed to true if decoding the first frame failed
+ - Inform the QImageReader about the format that was detected
+ - Always create a ImageDecoderQt when when we have more
+ than four byte.
+
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoder::create): Always create QImageReader for a significant speed up
+ (WebCore::ImageDecoderQt::ImageDecoderQt): Initialize m_repetitionCount to cAnimationNone
+ (WebCore::ImageDecoderQt::setData): Only call ImageDecoder::setData when everything has been received
+ (WebCore::ImageDecoderQt::isSizeAvailable): Do not check m_failed twice.
+ (WebCore::ImageDecoderQt::filenameExtension): Convert from QByteArray to String
+ (WebCore::ImageDecoderQt::frameBufferAtIndex): Check for m_failed before trying to decode
+ (WebCore::ImageDecoderQt::internalDecodeSize): Fail if the size is QSize()
+ (WebCore::ImageDecoderQt::forceLoadEverything): Handle the case were decoding the first frame fails
+ * platform/graphics/qt/ImageDecoderQt.h: Change the m_format type
+
+2009-10-14 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Migrate profiles to the injected script-based schema.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30328
+
+ * bindings/js/JSInspectorBackendCustom.cpp:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::getProfileHeaders):
+ (WebCore::InspectorBackend::getProfile):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::addProfile):
+ (WebCore::InspectorController::getProfileHeaders):
+ (WebCore::InspectorController::getProfile):
+ (WebCore::InspectorController::createProfileHeader):
+ * inspector/InspectorController.h:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addProfileHeader):
+ (WebCore::InspectorFrontend::didGetProfileHeaders):
+ (WebCore::InspectorFrontend::didGetProfile):
+ * inspector/InspectorFrontend.h:
+ * inspector/JavaScriptProfileNode.cpp:
+ (WebCore::ProfileNodeClass):
+ * inspector/front-end/ProfileView.js:
+ (WebInspector.ProfileView.profileCallback):
+ (WebInspector.ProfileView):
+ (WebInspector.ProfileView.prototype._mouseDownInDataGrid):
+ (WebInspector.ProfileView.prototype._assignParentsInProfile):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype.addProfileHeader):
+ * inspector/front-end/inspector.js:
+ (WebInspector.addProfileHeader):
+
+2009-10-13 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Don't collect call frame properties until they're needed for completion.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30334
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.completions):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.getCompletions): if call frame id is specified and the expression is empty collect frame properties.
+ (InjectedScript.CallFrameProxy.prototype._wrapScopeChain): don't send call frame properties until they're needed.
+ * inspector/front-end/ScriptsPanel.js:
+
+2009-10-13 Yongjun Zhang <yongjun.zhang@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29106
+ [Qt] make CachedResourceHandle.h compile in winscw Symbian compiler.
+
+ Don't inline constructor CachedResourceHandle<T>(R*) to stop winscw
+ compiler aggressively resolve inheritance of class R.
+
+ The winscw compiler bug is reported at:
+ https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812.
+
+ The change should be reverted when the above bug is fixed in winscw compiler.
+
+ * loader/CachedResourceHandle.h:
+ (WebCore::::CachedResourceHandle):
+
+2009-10-13 Dimitri Glazkov <dglazkov@chromium.org>
+
+ No review, rolling out r49554, because it broke Win and Chromium builds.
+ http://trac.webkit.org/changeset/49554
+
+ * css/CSSPrimitiveValue.cpp:
+ (WebCore::CSSPrimitiveValue::cssText):
+
+2009-10-13 Evan Martin <evan@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Stringify CSS units manually (without printf) to make the formatting
+ locale-insensitive and obey CSS spec with respect to large values.
+
+ https://bugs.webkit.org/show_bug.cgi?id=18994
+
+ * css/CSSPrimitiveValue.cpp:
+ (WebCore::appendCSSDouble):
+ (WebCore::formatWithUnits):
+ (WebCore::CSSPrimitiveValue::cssText):
+
+2009-10-13 Evan Martin <evan@chromium.org>
+
+ Reviewed by David Levin.
+
+ Make grippy lines vertical on horizontal scrollbars in Linux Chrome.
+ While we're rebaselining scrollbars, fix an off by one in the vertical
+ scrollbar rendering too.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30319
+
+ Tests: this is covered by every pixel test involving scrollbars.
+
+ * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
+ (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
+
+2009-10-13 Sam Weinig <sam@webkit.org>
+
+ Reviewed by David Hyatt.
+
+ Fix issue where clientX and clientY on MouseEvents were wrong when
+ the page was zoomed and scrolled.
+
+ Test: fast/events/clientXY-in-zoom-and-scroll.html
+
+ * dom/MouseRelatedEvent.cpp:
+ (WebCore::contentsX): Take page zoom into account.
+ (WebCore::contentsY): Ditto.
+
+2009-10-13 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Change the order of arguments on some of the user stylesheet/script functions. Split the removal functions
+ out into separate ones for scripts and stylesheets.
+
+ * WebCore.base.exp:
+ * page/PageGroup.cpp:
+ (WebCore::PageGroup::addUserScriptToWorld):
+ (WebCore::PageGroup::addUserStyleSheetToWorld):
+ (WebCore::PageGroup::removeUserScriptFromWorld):
+ (WebCore::PageGroup::removeUserStyleSheetFromWorld):
+ (WebCore::PageGroup::removeUserScriptsFromWorld):
+ (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
+ * page/PageGroup.h:
+ (WebCore::PageGroup::userScripts):
+ (WebCore::PageGroup::userStyleSheets):
+
+2009-10-13 Evan Martin <evan@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Chrome's "Skia" theme paints select controls backwards in RTL.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30320
+
+ Test: fast/text/international/bidi-menulist.html
+ (The test is about something else, but it includes RTL selects.)
+
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::paintMenuList): flip the arrow position in RTL case.
+
+2009-10-13 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30318
+ ScriptExecutionContext is not anymore needed to create an EventListener - remove old code.
+ It's a followup to r48884. It removed the need to pass the ScritpExecutionContext
+ into EventListener constructor but did not remove the code pulling ScriptExecutionContext.
+
+ Tests:
+ Test adds event listener to a DocumentType Node which is created without a document
+ and then dispatches the event after attaching a node to the tree. Event
+ should fire when node is attached to the tree.
+
+ * fast/events/add-event-without-document-expected.txt: Added.
+ * fast/events/add-event-without-document.html: Added.
+
+ All changes in files below are the same - remove the code that calls
+ EventTarget::scriptExecutionContext and checks it for NULL.
+
+ * bindings/js/JSAbstractWorkerCustom.cpp:
+ (WebCore::JSAbstractWorker::addEventListener):
+ (WebCore::JSAbstractWorker::removeEventListener):
+ * bindings/js/JSDOMApplicationCacheCustom.cpp:
+ (WebCore::JSDOMApplicationCache::addEventListener):
+ (WebCore::JSDOMApplicationCache::removeEventListener):
+ * bindings/js/JSDesktopNotificationsCustom.cpp:
+ (WebCore::JSNotification::addEventListener):
+ (WebCore::):
+ * bindings/js/JSEventSourceCustom.cpp:
+ (WebCore::JSEventSource::addEventListener):
+ (WebCore::JSEventSource::removeEventListener):
+ * bindings/js/JSMessagePortCustom.cpp:
+ (WebCore::JSMessagePort::addEventListener):
+ (WebCore::JSMessagePort::removeEventListener):
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::addEventListener):
+ (WebCore::JSNode::removeEventListener):
+ * bindings/js/JSSVGElementInstanceCustom.cpp:
+ (WebCore::JSSVGElementInstance::addEventListener):
+ (WebCore::JSSVGElementInstance::removeEventListener):
+ * bindings/js/JSXMLHttpRequestCustom.cpp:
+ (WebCore::JSXMLHttpRequest::addEventListener):
+ (WebCore::JSXMLHttpRequest::removeEventListener):
+ * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
+ (WebCore::JSXMLHttpRequestUpload::addEventListener):
+ (WebCore::JSXMLHttpRequestUpload::removeEventListener):
+ * bindings/js/JSWebSocketCustom.cpp:
+ (WebCore::JSWebSocket::addEventListener):
+ (WebCore::JSWebSocket::removeEventListener):
+
+2009-10-13 Drew Wilson <atwilson@atwilson-macpro.local>
+
+ Reviewed by David Levin.
+
+ Enable SHARED_WORKERS for Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=30289
+
+ Cleaned up bitrot in SharedWorker V8 bindings.
+
+ * WebCore.gypi:
+ Removed default implementation of SharedWorkerRepository so Chromium can provide its own.
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ Added V8SharedWorkerContext.cpp.
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ Added case statements for SHAREDWORKER and SHAREDWORKERCONTEXT.
+ * bindings/v8/V8Index.cpp:
+ Now includes V8SharedWorkerContext.h to allow supporting SharedWorkers.
+ * bindings/v8/V8Index.h:
+ Added definition for SHAREDWORKERCONTEXT wrapper.
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ Added includes for SharedWorker.h and SharedWorkerContext.h.
+ * bindings/v8/custom/V8CustomBinding.h:
+ Reorganized Worker field indexes to be clearer, and fixed mismatch in worker field index.
+ Also added field indexes for SharedWorkers.
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::ACCESSOR_RUNTIME_ENABLER):
+ Added runtime enabler for the SharedWorker constructor.
+ * bindings/v8/custom/V8SharedWorkerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ Cleaned up bitrot (various APIs have changed since this file was written).
+ * page/DOMWindow.idl:
+ Added EnabledAtRuntime flag to window.SharedWorker.
+
+2009-10-13 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30345
+ HTTP tests for credential handling fail on Tiger
+
+ We cannot prevent NSURLConnection from doing its credentil handling on Tiger anyway; so
+ let it do its work without intervention. Once again, we pass explicitly passed credentials
+ in URL, fixing regressions from Safari 3.
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::start):
+ (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
+ (WebCore::ResourceHandle::receivedCredential):
+
+2009-10-13 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by Adam Barth.
+
+ Bug 28964 - [Chromium] ChromiumDataObject should have getter/setter interface
+
+ Reworked and added to the getter/setter interface in ChromiumDataObject:
+ - added contains...() methods to just query the state
+ - added containsValid...URL() methods for URL data members
+ - removed takeFileNames() as this was too type-dependent
+ - changed return type of fileNames() to Vector<String>
+ - added interface methods to allow appending to and iteration over file names
+
+ No new tests (no functional behavior changed).
+
+ * platform/chromium/ChromiumDataObject.h:
+ (WebCore::ChromiumDataObject::containsMainURL):
+ (WebCore::ChromiumDataObject::containsValidMainURL):
+ (WebCore::ChromiumDataObject::containsMainURLTitle):
+ (WebCore::ChromiumDataObject::containsTextPlain):
+ (WebCore::ChromiumDataObject::containsTextHTML):
+ (WebCore::ChromiumDataObject::containsHTMLBaseURL):
+ (WebCore::ChromiumDataObject::containsValidHTMLBaseURL):
+ (WebCore::ChromiumDataObject::containsContent):
+ (WebCore::ChromiumDataObject::containsContentFileExtension):
+ (WebCore::ChromiumDataObject::containsContentFileName):
+ (WebCore::ChromiumDataObject::setContentFileName):
+ (WebCore::ChromiumDataObject::containsFileNames):
+ (WebCore::ChromiumDataObject::fileNames):
+ (WebCore::ChromiumDataObject::clearFileNames):
+ (WebCore::ChromiumDataObject::countFileNames):
+ (WebCore::ChromiumDataObject::fileNameAt):
+ (WebCore::ChromiumDataObject::setFileNames):
+ (WebCore::ChromiumDataObject::appendToFileNames):
+ (WebCore::ChromiumDataObject::popFileName):
+
+2009-10-13 Simon Fraser <simon.fraser@apple.com>
+
+ Temporary debugging changes to figure out why the webgl tests are crashing on the build bot.
+
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::GraphicsContext3D):
+
+2009-10-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Visibility:visible inside a compositing layer doesn't make the element visible
+ https://bugs.webkit.org/show_bug.cgi?id=30339
+
+ When deciding if a layer had any renderable content, RenderLayerBacking::paintIntoLayer()
+ only consulted hasVisibleContent(), which does not take into a account child layers which
+ may be visible. We also have to consult hasVisibleDescendant() as well.
+
+ Test: compositing/compositing-visible-descendant.html
+
+ * rendering/RenderLayer.h:
+ (WebCore::RenderLayer::hasVisibleDescendant):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::paintIntoLayer):
+
+2009-10-13 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Refactor ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
+ https://bugs.webkit.org/show_bug.cgi?id=30278
+
+ Move the definition of ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
+ from the make system into common code.
+
+ Enable ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH if NETSCAPE_PLUGIN_API
+ support is not enabled.
+
+ Remove notImplemented() from PluginPackageNone.cpp and
+ PluginDataNone.cpp make them just empty functions.
+
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * plugins/PluginDataNone.cpp:
+ (WebCore::PluginData::initPlugins):
+ (WebCore::PluginData::refresh):
+ * plugins/PluginPackageNone.cpp:
+ (WebCore::PluginPackage::determineQuirks):
+ (WebCore::PluginPackage::fetchInfo):
+ (WebCore::PluginPackage::load):
+
+2009-10-13 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30150
+ <rdar://problem/7283540> REGRESSION: Crash when accessing clipboardData.types
+
+ Test: editing/pasteboard/crash-accessing-clipboardData-types.html
+
+ * platform/mac/ClipboardMac.mm: (WebCore::addHTMLClipboardTypesForCocoaType): The String
+ class doesn't have operator bool, it's operator NSString* that is invoked instead, and it
+ converts null strings to non-null @"".
+
+2009-10-13 Drew Wilson <atwilson@atwilson-macpro.local>
+
+ Reviewed by Dimitri Glazkov.
+
+ window attributes (like localStorage) that are disabled at runtime are still visible
+ https://bugs.webkit.org/show_bug.cgi?id=30240
+
+ Adding codegen/bindings to support runtime disabling of attributes.
+
+ No new tests (only supported by chrome currently)
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ Refactored the guts of GenerateBatchedAttributeData into a separate GenerateSingleBatchedAttribute with a passed-in indentation level to allow generating a single BatchedAttribute struct.
+ Added support for the EnabledAtRuntime extended attribute, which generates a call to the appropriate XXXXEnabled() API before adding the attribute to the instance.
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::batchConfigureAttributes):
+ Refactored attribute setting code into a common inline routine.
+ * bindings/v8/V8Proxy.h:
+ (WebCore::configureAttribute):
+ Inline function which configures a single attribute given a BatchedAttribute struct.
+ * bindings/v8/custom/V8CustomBinding.h:
+ Added (DECLARE_)ACCESSOR_RUNTIME_ENABLER to allow enabling attributes at runtime.
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ Added code to enable window.Audio only if MediaPlayer.isAvailable() == true
+ * page/DOMWindow.idl:
+ Added [EnabledAtRuntime] extended attribute to the Audio attribute.
+
+2009-10-13 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27457
+ Added support for static validation on type=email input elements as per
+ HTML5 specs:
+ http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state
+
+ Test: fast/forms/ValidityState-typeMismatch-email.html
+
+ * html/ValidityState.cpp:
+ (WebCore::ValidityState::typeMismatch): ValidityState.typeMismatch
+ performs validation on type=email input elements now.
+ (WebCore::ValidityState::isValidEmailAddress): simple validation method
+ * html/ValidityState.h:
+
+2009-10-13 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Event listeners installed on a window object returned from window.open() don't work
+ https://bugs.webkit.org/show_bug.cgi?id=28716
+
+ Tests: http/tests/security/window-events-clear-domain.html
+ http/tests/security/window-events-clear-port.html
+ http/tests/security/window-events-pass.html
+
+ * dom/Document.cpp: Split code of Document::clear() in a way to avoid removing all
+ window event handlers when implicitOpen is called. It is called in 2 cases - on
+ committing loaded content (no need to clean handlers) and on document.open() (needs to remove handlers).
+
+ (WebCore::Document::open): in addition to calling implicitOpen it also removes window
+ event handlers, to preserve the behavior of document.open().
+
+ (WebCore::Document::implicitOpen): includes the part of removed Document::clear() that
+ does not remove window event handlers.
+
+ * dom/Document.h: Removed clear().
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::stopLoading): add check to avoid removing window event handlers
+ if we transition from temporary empty document to a loaded one.
+
+ (WebCore::FrameLoader::didOpenURL): Remove closeURL() which was called twice when loading.
+ (WebCore::FrameLoader::finishedLoadingDocument): add closeURL() to compensate for change above.
+
+2009-10-13 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Pavel Feldman.
+
+ Fix a leak in the inspector by calling didRemoveNode with
+ an error code when it fails, instead of returning from the
+ Backend.
+
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::removeNode):
+ * inspector/front-end/ElementsTreeOutline.js:
+
+2009-10-13 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=30337>.
+ Web Inspector: Should be able to delete nodes from the Elements Tree.
+
+ When the delete key is pressed and a element is selected in the tree,
+ the element should be deleted from the Elements Tree and the DOM.
+
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::removeNode):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::didRemoveNode):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype._updateModifiedNodes):
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeOutline.prototype.handleKeyEvent):
+
+2009-10-13 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fix REGRESSION(49479): Mouseover on resources graph doesn't show timings.
+
+ Set pointer-events: none on the new overlay so mouseover events are passed
+ to the resources graph so we can show timings.
+
+ * inspector/front-end/inspector.css:
+
+2009-10-13 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Plugins : Remove all traces of winId. Use ownerWidget() instead.
+
+ This is a bug for two reasons:
+ 1. Everytime we use winId(), we end up creating a native widget. This causes an
+ unnecessary copy of contents from the backing store to the native widget.
+ 2. Neither windowed nor windowless plugins require the winId of the QWebView or
+ QGraphicsView.
+
+ Introduce ownerWidget() which returns a QWidget * without creating a native widget
+ (as opposed to QWidget::find(winId)).
+
+ https://bugs.webkit.org/show_bug.cgi?id=30170
+
+ * platform/qt/PlatformScreenQt.cpp:
+ (WebCore::screenDepthPerComponent):
+ * platform/qt/PopupMenuQt.cpp:
+ (WebCore::PopupMenu::show):
+ * platform/qt/QWebPageClient.h:
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::setSharedXEventFields):
+ (WebCore::PluginView::initXEvent):
+ (WebCore::PluginView::getValue):
+ (WebCore::PluginView::platformStart):
+
+2009-10-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed build system fix. Typo in a filename.
+
+ * GNUmakefile.am:
+
+2009-10-12 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+ Alter profile link format to enable multiple profile types
+ https://bugs.webkit.org/show_bug.cgi?id=30253
+
+ The new profile URL includes the profile type along with the
+ profile title and uid.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::addProfileFinishedMessageToConsole):
+ (WebCore::InspectorController::addStartProfilingMessageToConsole):
+ * inspector/front-end/inspector.js:
+ (WebInspector.documentClick.followLink):
+ (WebInspector.documentClick):
+ (WebInspector.linkifyStringAsFragment):
+
+2009-10-12 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Fix same-named profiles grouping in the Profiles panel.
+
+ The tree node re-parenting while adding a new group node was broken.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30299
+
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype.addProfile):
+
+2009-10-12 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Enforce async interaction between inspector controller and frontend.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30300
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.dispatch.delayDispatch):
+ (WebInspector.dispatch):
+
+2009-10-12 Xiaomei Ji <xji@chromium.org>
+
+ Reviewed by Sam Weinig.
+
+ Fix issue caretRangeFromPoint() returns wrong result for a zoomed and
+ scrolled page.
+ https://bugs.webkit.org/show_bug.cgi?id=30034
+
+ * dom/Document.cpp:
+ (WebCore::Document::elementFromPoint): calculate the correct point
+ relative to document when the page is zoomed and scrolled.
+ (WebCore::Document::caretRangeFromPoint): calculate the correct point
+ relative to document when the page is zoomed and scrolled.
+
+2009-10-12 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Sam Weinig.
+
+ JavaScript bindings of WebSocket addEventListener/removeEventListener
+ https://bugs.webkit.org/show_bug.cgi?id=29841
+
+ Test: fast/websockets/websocket-event-target.html
+
+ * bindings/js/JSWebSocketCustom.cpp:
+ (WebCore::JSWebSocket::addEventListener):
+ (WebCore::JSWebSocket::removeEventListener):
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8WebSocketCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * websockets/WebSocket.idl:
+
+2009-10-12 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=29078
+ <rdar://problem/7288221>
+
+ Add a mechanism to blacklist certain codecs. Initially, just blacklist UTF-7 as HTML5 encourages.
+
+ * platform/text/TextEncodingRegistry.cpp:
+ (WebCore::pruneBlacklistedCodecs):
+ (WebCore::buildBaseTextCodecMaps):
+ (WebCore::extendTextCodecMaps):
+
+2009-10-09 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add support for the beforeload event to frames. Complete support of the beforeload event by making sure
+ its wrapper gets properly constructed (so that the URL field of the event can be accessed). Add support
+ for the Objective-C wrapper class as well.
+
+ Added fast/dom/beforeload/frame-before-load.html
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSEventCustom.cpp:
+ (WebCore::toJS):
+ * bindings/objc/DOMEvents.mm:
+ (kitClass):
+ * dom/BeforeLoadEvent.h:
+ (WebCore::BeforeLoadEvent::isBeforeLoadEvent):
+ * dom/Event.cpp:
+ (WebCore::Event::isBeforeLoadEvent):
+ * dom/Event.h:
+ * html/HTMLFrameElementBase.cpp:
+ (WebCore::HTMLFrameElementBase::parseMappedAttribute):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadWithDocumentLoader):
+
+2009-10-12 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Fix <rdar://problem/7094146> Reproducible crash at
+ RenderObject::localToAbsolute()
+
+ Test: fast/dynamic/position-absolute-to-fixed-crash.html
+
+ The crash was caused by stale positioned objects lists following an
+ object transitioning from being absolutely position to being fixed
+ positioned.
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::styleWillChange): In case of a transition between
+ absolute and fixed position, mark the parent as having a child needing
+ layout, so that this object will get inserted into its new container's
+ positioned objects list.
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::styleWillChange): Changed a condition to cover
+ this transition, so that this object gets removed from its current
+ container's positioned objects list.
+
+2009-10-12 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Add a palette() method that is needed by our RenderTheme.
+
+ * platform/qt/QWebPageClient.h:
+
+2009-10-12 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVG Gradients can't handle percentage values in userSpaceOnUse mode
+ [https://bugs.webkit.org/show_bug.cgi?id=30286]
+
+ Fixed *GradientAttributes to take SVGLength instead of double. This casues
+ the problem, that we can't calculate the correct size of a gradient on
+ userSpaceOnUse mode with percentage values.
+
+ Test: svg/custom/gradient-userSpaceOnUse-with-percentage.svg
+
+ * svg/LinearGradientAttributes.h:
+ (WebCore::LinearGradientAttributes::LinearGradientAttributes):
+ (WebCore::LinearGradientAttributes::x1):
+ (WebCore::LinearGradientAttributes::y1):
+ (WebCore::LinearGradientAttributes::x2):
+ (WebCore::LinearGradientAttributes::y2):
+ (WebCore::LinearGradientAttributes::setX1):
+ (WebCore::LinearGradientAttributes::setY1):
+ (WebCore::LinearGradientAttributes::setX2):
+ (WebCore::LinearGradientAttributes::setY2):
+ * svg/RadialGradientAttributes.h:
+ (WebCore::RadialGradientAttributes::RadialGradientAttributes):
+ (WebCore::RadialGradientAttributes::cx):
+ (WebCore::RadialGradientAttributes::cy):
+ (WebCore::RadialGradientAttributes::r):
+ (WebCore::RadialGradientAttributes::fx):
+ (WebCore::RadialGradientAttributes::fy):
+ (WebCore::RadialGradientAttributes::setCx):
+ (WebCore::RadialGradientAttributes::setCy):
+ (WebCore::RadialGradientAttributes::setR):
+ (WebCore::RadialGradientAttributes::setFx):
+ (WebCore::RadialGradientAttributes::setFy):
+ * svg/SVGLinearGradientElement.cpp:
+ (WebCore::SVGLinearGradientElement::buildGradient):
+ (WebCore::SVGLinearGradientElement::collectGradientProperties):
+ * svg/SVGRadialGradientElement.cpp:
+ (WebCore::SVGRadialGradientElement::buildGradient):
+ (WebCore::SVGRadialGradientElement::collectGradientProperties):
+
+2009-10-12 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <http://webkit.org/b/30315>.
+ Web Inspector: DOM Content and Load lines in Resources are unclear what they mean.
+
+ Add tooltip text to the Load event and DOM Content event lines through
+ a new layer that allows these lines to be on top of the view.
+
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype._updateGraphDividersIfNeeded):
+ (WebInspector.ResourcesPanel.prototype._updateDividersLabelBarPosition):
+ * inspector/front-end/inspector.css:
+
+2009-10-12 Dimitri Glazkov <dglazkov@chromium.org>
+
+ No review, rolling out r49429, because it broke layout tests.
+ http://trac.webkit.org/changeset/49429
+
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::~V8AbstractEventListener):
+
+2009-10-12 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ SVG - crash on feMerge when input not available
+ [https://bugs.webkit.org/show_bug.cgi?id=30297]
+
+ Make a early return in SVGFEMergeElement if the needed
+ filter effect doesn't exist.
+
+ Test: svg/filters/feMerge-wrong-input.svg
+
+ * svg/SVGFEMergeElement.cpp:
+ (WebCore::SVGFEMergeElement::build):
+
+2009-10-12 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Added automatic flush before compositing
+ https://bugs.webkit.org/show_bug.cgi?id=30236
+
+ This causes image to always render correctly. In writing a testcase
+ I needed to implement readPixels. This exposed a bug in reading back
+ values from a CanvasArray subclass, so I fixed that as well. Now when
+ you wrap a CanvasArray in a JSValue it actually wraps the specific
+ subclass. To do this I need to add virtual methods to each CanvasArray
+ subclass to determine the type and a custom toJS method for CanvasArray
+ to create the proper wrapper.
+
+ Test: fast/canvas/webgl/triangle.html
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSCanvasArrayCustom.cpp:
+ (WebCore::toJS):
+ * html/canvas/CanvasArray.h:
+ (WebCore::CanvasArray::isByteArray):
+ (WebCore::CanvasArray::isUnsignedByteArray):
+ (WebCore::CanvasArray::isShortArray):
+ (WebCore::CanvasArray::isUnsignedShortArray):
+ (WebCore::CanvasArray::isIntArray):
+ (WebCore::CanvasArray::isUnsignedIntArray):
+ (WebCore::CanvasArray::isFloatArray):
+ * html/canvas/CanvasArray.idl:
+ * html/canvas/CanvasByteArray.h:
+ (WebCore::CanvasByteArray::isByteArray):
+ * html/canvas/CanvasFloatArray.h:
+ (WebCore::CanvasFloatArray::isFloatArray):
+ * html/canvas/CanvasIntArray.h:
+ (WebCore::CanvasIntArray::isIntArray):
+ * html/canvas/CanvasRenderingContext3D.cpp:
+ (WebCore::CanvasRenderingContext3D::readPixels):
+ * html/canvas/CanvasRenderingContext3D.h:
+ * html/canvas/CanvasRenderingContext3D.idl:
+ * html/canvas/CanvasShortArray.h:
+ (WebCore::CanvasShortArray::isShortArray):
+ * html/canvas/CanvasUnsignedByteArray.h:
+ (WebCore::CanvasUnsignedByteArray::isUnsignedByteArray):
+ * html/canvas/CanvasUnsignedIntArray.h:
+ (WebCore::CanvasUnsignedIntArray::isUnsignedIntArray):
+ * html/canvas/CanvasUnsignedShortArray.h:
+ (WebCore::CanvasUnsignedShortArray::isUnsignedShortArray):
+ * platform/graphics/GraphicsContext3D.h:
+ * platform/graphics/mac/Canvas3DLayer.mm:
+ (-[Canvas3DLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]):
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::readPixels):
+
+2009-10-12 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
+ Reviewed by Gustavo Noronha.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30307
+
+ Fix 0 sentinel for g_object_set() function call.
+
+ * platform/graphics/gtk/DataSourceGStreamer.cpp:
+ (webkit_data_src_uri_set_uri):
+ 0 is passed as 32 bit value on x86-64 in vararg functions, but
+ g_object_set() expects a 64 bit 0. This will cause crashes.
+
+2009-10-12 Cameron McCormack <cam@mcc.id.au>
+
+ Reviewed by Eric Seidel.
+
+ Drop in="" from <feFlood>
+ https://bugs.webkit.org/show_bug.cgi?id=29001
+
+ This makes <feFlood in="bogus"> have an effect, too.
+
+ http://www.w3.org/2003/01/REC-SVG11-20030114-errata#feflood-attribute
+
+ Test: svg/dom/feFlood-no-in1.html
+
+ * svg/SVGFEFloodElement.cpp:
+ (WebCore::SVGFEFloodElement::SVGFEFloodElement):
+ (WebCore::SVGFEFloodElement::build):
+ * svg/SVGFEFloodElement.h:
+ * svg/SVGFEFloodElement.idl:
+ * svg/graphics/filters/SVGFEFlood.cpp:
+ (WebCore::FEFlood::FEFlood):
+ (WebCore::FEFlood::create):
+ * svg/graphics/filters/SVGFEFlood.h:
+
+2009-10-12 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
+ Reviewed by Gustavo Noronha.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29998
+
+ Scale video to completely fill the target surface while
+ keeping the aspect ratio. This fixes displaying of the
+ YouTube HTML5 sample website.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ Scale video to completely fill the target surface, keep
+ the aspect ratio and center it.
+
+2009-10-12 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
+ Reviewed by Gustavo Noronha.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29997
+
+ Fixes double memcpy of all rendered video frames.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mediaPlayerPrivateRepaintCallback):
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::duration):
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+ * platform/graphics/gtk/VideoSinkGStreamer.cpp:
+ (webkit_video_sink_timeout_func):
+ (webkit_video_sink_dispose):
+ (unlock_buffer_mutex):
+ (webkit_video_sink_unlock):
+ (marshal_VOID__MINIOBJECT):
+ (webkit_video_sink_class_init):
+ (webkit_video_sink_new):
+ * platform/graphics/gtk/VideoSinkGStreamer.h:
+ Directly pass the buffers up to the MediaPlayerPrivate::paint()
+ method instead of rendering them first to an intermediate cairo
+ surface. This should increase performance and peak memory usage.
+
+2009-10-11 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30242
+
+ Fixes an issue where JavaScript URLs that are URL-encoded twice can
+ bypass the XSSAuditor.
+
+ JavaScript URLs that are completed by method Document::completeURL have added
+ URL-encoded characters such that a direct comparison with the URL-decoded
+ outgoing HTTP parameters is not sufficient. Instead, the URL-decoded outgoing
+ HTTP parameters must be URL-decoded before comparison.
+
+ Tests: http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode.html
+ http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode2.html
+ http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode3.html
+
+ * bindings/ScriptControllerBase.cpp:
+ (WebCore::ScriptController::executeIfJavaScriptURL): Modified to pass XSSAuditor
+ the URL-decoded source code for the JavaScript URL.
+ * page/XSSAuditor.cpp:
+ (WebCore::isIllegalURICharacter): Minor syntactical change to the comment.
+ (WebCore::XSSAuditor::CachingURLCanonicalizer::canonicalizeURL): Added
+ parameter decodeURLEscapeSequencesTwice.
+ (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
+ (WebCore::XSSAuditor::decodeURL): Ditto.
+ (WebCore::XSSAuditor::findInRequest): Ditto.
+ * page/XSSAuditor.h:
+ (WebCore::XSSAuditor::CachingURLCanonicalizer::CachingURLCanonicalizer): Ditto.
+
+2009-10-11 Dominic Cooney <dominicc@google.com>
+
+ Reviewed by Adam Barth.
+
+ Fixes a build break in the V8 bindings caused by revision 49420.
+ https://bugs.webkit.org/show_bug.cgi?id=30294
+
+ Revision 49420 introduces an IDL-defined CanvasActiveInfo
+ type. This causes a build break in the V8 bindings where
+ CanvasGraphicsContext3D naively refers to CanvasActiveInfo as a
+ non-ref type.
+
+ * WebCore.gypi: Include CanvasActiveInfo.idl in build.
+ * bindings/scripts/CodeGeneratorV8.pm: CanvasActiveInfo is a ref
+ ptr type.
+ * bindings/v8/DOMObjectsInclude.h: Include generated
+ CanvasActiveInfo files.
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+
+2009-10-11 Collin Jackson <collinj@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Log mixed content warnings to console
+
+ https://bugs.webkit.org/show_bug.cgi?id=30290
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::checkIfDisplayInsecureContent):
+ (WebCore::FrameLoader::checkIfRunInsecureContent):
+
+2009-10-11 Søren Gjesse <sgjesse@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Add a context scope in JS listener destructor. The destructor code uses the cotext. See http://crbug.com/24200.
+ https://bugs.webkit.org/show_bug.cgi?id=30250
+
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::~V8AbstractEventListener):
+
+2009-10-11 Lyon Chen <lyon.chen@torchmobile.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Correct the position of #endif sentence inside WebCore::Document::finishedParsing().
+
+ https://bugs.webkit.org/show_bug.cgi?id=30244
+
+ This change requires no test case as it fix a compiling error.
+
+ * dom/Document.cpp:
+ (WebCore::Document::finishedParsing):
+
+2009-10-11 Dominic Cooney <dominicc@google.com>
+
+ Reviewed by Adam Barth.
+
+ Sets a 500K stack limit for JavaScript workers in Chromium.
+ https://bugs.webkit.org/show_bug.cgi?id=29797
+
+ Runaway recursion in JavaScript workers crashes the Chromium
+ worker process on OS X. This is because V8's default stack limit
+ is 512K on ia32 or 1M on x64, but the worker process runs workers
+ on a thread with the OS X default stack size--512K. Because there
+ are already some C+frames on the stack when V8 establishes its
+ 512K default stack limit, and V8 doesn't precisely enforce the
+ stack limit, runaway recursion in V8 workers overflows the OS
+ stack and segfaults, killing the worker process. This is described
+ in Chromium bug 21653 <http://crbug.com/21653>.
+
+ This patch sets the V8 stack limit for worker JavaScript in
+ Chromium to a more conservative 500K on all platforms. This allows
+ some "headroom" for the C+stack in use when the limit is set up,
+ and some "legroom" for the V8 helper functions which in practice
+ briefly flout the V8 stack limit.
+
+ Test: LayoutTests/fast/workers/use-machine-stack.html
+
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::initV8IfNeeded):
+ * bindings/v8/WorkerContextExecutionProxy.h:
+
+2009-10-11 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix for wxMac 2.9, use wxGC API for measuring text.
+
+ * platform/wx/wxcode/mac/carbon/fontprops.cpp:
+ (GetTextExtent):
+
+2009-10-10 Cameron McCormack <cam@mcc.id.au>
+
+ Reviewed by Sam Weinig.
+
+ Allow [Reflect] on SVG elements.
+ https://bugs.webkit.org/show_bug.cgi?id=28936
+
+ Update the JS binding generators to reference SVGNames instead of
+ HTMLNames, if [Reflect]ing an attribute on an SVG element. Make
+ SVGElement::id use [Reflect].
+
+ Also make [Reflect] on an attribute with a setter exception work in ObjC
+ bindings.
+
+ Test: svg/dom/id-reflect.html
+
+ * bindings/scripts/CodeGenerator.pm: Add a function to determine the
+ appropriate C+namespace for attribute name constants.
+ * bindings/scripts/CodeGeneratorObjC.pm: Generate ExceptionCode handling
+ code for [Reflect] on an attribute with a setter exception.
+ * bindings/scripts/CodeGeneratorCOM.pm: Generate "SVGNames" instead of
+ "HTMLNames" when appropriate.
+ * bindings/scripts/CodeGeneratorJS.pm: Ditto.
+ * bindings/scripts/CodeGeneratorV8.pm: Ditto.
+ * svg/SVGElement.cpp: Remove getter and setter methods for id.
+ * svg/SVGElement.h: Ditto.
+ * svg/SVGElement.idl: Add [Reflect] to id.
+
+2009-10-10 Oliver Hunt <oliver@apple.com>
+
+ Fix paths in xcode.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-10-10 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Implement getActiveAttrib and getActiveUniform
+ https://bugs.webkit.org/show_bug.cgi?id=30276
+
+ Implements the getActiveAttrib and getActiveUniform APIs.
+ Rather simple patch, adds CanvasActiveInfo definition and implementation
+ and adds forwarding to the GraphicsContext3D.
+
+ Test: fast/canvas/webgl/getActiveTest.html
+
+ * DerivedSources.make:
+ * WebCore.xcodeproj/project.pbxproj:
+ * html/canvas/CanvasActiveInfo.h: Added.
+ (WebCore::CanvasActiveInfo::create):
+ (WebCore::CanvasActiveInfo::name):
+ (WebCore::CanvasActiveInfo::type):
+ (WebCore::CanvasActiveInfo::size):
+ (WebCore::CanvasActiveInfo::CanvasActiveInfo):
+ * html/canvas/CanvasActiveInfo.idl: Added.
+ * html/canvas/CanvasObject.h:
+ (WebCore::CanvasObject::context):
+ Need to make the context public as it is needed to ensure we don't
+ provide a program from one context as an argument to another.
+ * html/canvas/CanvasRenderingContext3D.cpp:
+ (WebCore::CanvasRenderingContext3D::getActiveAttrib):
+ (WebCore::CanvasRenderingContext3D::getActiveUniform):
+ * html/canvas/CanvasRenderingContext3D.h:
+ * html/canvas/CanvasRenderingContext3D.idl:
+ * platform/graphics/GraphicsContext3D.h:
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::getActiveAttrib):
+ (WebCore::GraphicsContext3D::getActiveUniform):
+
+2009-10-10 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Adding new attributes in Element Panel is
+ counterintuitive.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30057
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeOutline.prototype._onmousemove):
+ (WebInspector.ElementsTreeElement.prototype.set hovered):
+ (WebInspector.ElementsTreeElement.prototype.toggleNewAttributeButton):
+
+2009-10-10 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ Build fix if Netscape plugin support is turned off
+ https://bugs.webkit.org/show_bug.cgi?id=30275
+
+ In addition to fixing the build break with guards
+ remove notImplemented() from PluginViewNone.cpp and
+ make them just just be empty functions.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::handleEvent):
+ (WebCore::PluginView::PluginView):
+ * plugins/PluginView.h:
+ * plugins/PluginViewNone.cpp:
+ (WebCore::PluginView::setFocus):
+ (WebCore::PluginView::show):
+ (WebCore::PluginView::hide):
+ (WebCore::PluginView::paint):
+ (WebCore::PluginView::handleKeyboardEvent):
+ (WebCore::PluginView::handleMouseEvent):
+ (WebCore::PluginView::setParent):
+ (WebCore::PluginView::setNPWindowRect):
+ (WebCore::PluginView::handlePostReadFile):
+ (WebCore::PluginView::getValue):
+ (WebCore::PluginView::getValueStatic):
+ (WebCore::PluginView::invalidateRect):
+ (WebCore::PluginView::invalidateRegion):
+ (WebCore::PluginView::forceRedraw):
+ (WebCore::PluginView::platformStart):
+ (WebCore::PluginView::platformDestroy):
+ (WebCore::PluginView::setParentVisible):
+ (WebCore::PluginView::updatePluginWidget):
+
+2009-10-10 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed.
+
+ [Qt] Build fix for QtWebKit after r49415.
+
+ Add HistoryController.cpp to the build.
+
+ * WebCore.pro:
+
+2009-10-09 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [Chromium] KURLGoogle's protocolIs barfs on input containing hyphens
+ https://bugs.webkit.org/show_bug.cgi?id=30262
+
+ This is not testable from WebKit since WebKit never uses the member
+ function form of protocolIs with input that can be controlled from a
+ web page. It always passes string literals lacking hyphens.
+
+ * platform/KURLGoogle.cpp:
+ (WebCore::lowerCaseEqualsASCII): Only assert if toASCIILower would
+ transform the input character.
+
+2009-10-10 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ Move HistoryController to its own file
+ https://bugs.webkit.org/show_bug.cgi?id=30272
+
+ Purely mechanical.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * loader/FrameLoader.cpp:
+ * loader/FrameLoader.h:
+ * loader/HistoryController.cpp: Added.
+ * loader/HistoryController.h: Added.
+
+2009-10-09 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ ApplyStyleCommand removes presentational tags even when not necessary
+ https://bugs.webkit.org/show_bug.cgi?id=28091
+
+ This patch updates implicitlyStyledElementShouldBeRemovedWhenApplyingStyle to return true
+ (triggering removal of tag) only if the style implicitly added by the element is not present in
+ the new style to apply. It also changes surroundNodeRangeWithElement so that it merges the
+ surrounding element when possible. applyTextDecorationStyle is modified so that it does not add
+ style span when the style attribute is empty.
+
+ Test: editing/execCommand/toggle-style-3.html
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::ApplyStyleCommand::shouldRemoveTextDecorationTag): Returns true if specified text
+ decoration is not present in the style to apply
+ (WebCore::ApplyStyleCommand::implicitlyStyledElementShouldBeRemovedWhenApplyingStyle): No longer
+ returns true if the tag is used in new style
+ (WebCore::ApplyStyleCommand::applyTextDecorationStyle): Does not add style-span when redundant
+ (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement): Merges the newly created element
+ with the surrounding identical elements
+ * editing/ApplyStyleCommand.h:
+
+2009-10-09 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Factor HistoryController out of FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=30246
+
+ HistoryController is in charge of managing the current / previous /
+ provisional HistoryItems. The split isn't perfect, but it's a place to
+ start. I'll move HistoryController into its own file in another patch.
+
+ * WebCore.base.exp:
+ * loader/FrameLoader.cpp:
+ (WebCore::HistoryController::HistoryController):
+ (WebCore::HistoryController::~HistoryController):
+ (WebCore::FrameLoader::FrameLoader):
+ (WebCore::FrameLoader::closeURL):
+ (WebCore::FrameLoader::begin):
+ (WebCore::HistoryController::restoreDocumentState):
+ (WebCore::HistoryController::setCurrentItem):
+ (WebCore::HistoryController::setProvisionalItem):
+ (WebCore::FrameLoader::loadURLIntoChildFrame):
+ (WebCore::FrameLoader::canCachePageContainingThisFrame):
+ (WebCore::FrameLoader::logCanCacheFrameDecision):
+ (WebCore::FrameLoader::scrollToAnchor):
+ (WebCore::FrameLoader::commitProvisionalLoad):
+ (WebCore::FrameLoader::transitionToCommitted):
+ (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
+ (WebCore::FrameLoader::didFirstLayout):
+ (WebCore::HistoryController::updateForFrameLoadCompleted):
+ (WebCore::FrameLoader::frameLoadCompleted):
+ (WebCore::FrameLoader::detachFromParent):
+ (WebCore::FrameLoader::receivedMainResourceError):
+ (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
+ (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
+ (WebCore::HistoryController::addHistoryItemForFragmentScroll):
+ (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
+ (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent):
+ (WebCore::HistoryController::createHistoryItem):
+ (WebCore::FrameLoader::checkDidPerformFirstNavigation):
+ (WebCore::HistoryController::addBackForwardItemClippedAtTarget):
+ (WebCore::HistoryController::createHistoryItemTree):
+ (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
+ (WebCore::HistoryController::restoreScrollPositionAndViewState):
+ (WebCore::HistoryController::invalidateCurrentItemCachedPage):
+ (WebCore::HistoryController::saveDocumentState):
+ (WebCore::FrameLoader::loadItem):
+ (WebCore::HistoryController::urlsMatchItem):
+ (WebCore::HistoryController::goToItem):
+ (WebCore::HistoryController::recursiveGoToItem):
+ (WebCore::HistoryController::childFramesMatchItem):
+ (WebCore::HistoryController::updateForStandardLoad):
+ (WebCore::HistoryController::updateForClientRedirect):
+ (WebCore::HistoryController::updateForBackForwardNavigation):
+ (WebCore::HistoryController::updateForReload):
+ (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
+ (WebCore::HistoryController::updateForCommit):
+ (WebCore::HistoryController::updateForAnchorScroll):
+ (WebCore::HistoryController::saveDocumentAndScrollState):
+ (WebCore::HistoryController::setCurrentItemTitle):
+ (WebCore::FrameLoader::didChangeTitle):
+ * loader/FrameLoader.h:
+ (WebCore::HistoryController::current):
+ (WebCore::HistoryController::provisional):
+ (WebCore::FrameLoader::policyChecker):
+ (WebCore::FrameLoader::history):
+ (WebCore::FrameLoader::creatingInitialEmptyDocument):
+ * page/Page.cpp:
+ (WebCore::Page::goToItem):
+
+2009-10-09 Alexey Proskuryakov <ap@apple.com>
+
+ Unreviewed - fixing an obvious typo in my previous check-in.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30260
+ <rdar://problem/6447115> REGRESSION: Logging out from SAP doesn't work
+
+ Fixes existing tests (which I thought I had run the previous time).
+
+ * platform/network/CredentialStorage.cpp: (WebCore::originsWithCredentials): Return the
+ set by reference.
+
+2009-10-09 David Levin <levin@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [v8] Need change to V8WorkerContextEventListener::reportError signature to match the base class.
+ https://bugs.webkit.org/show_bug.cgi?id=30264
+
+ The base class method changed in r48884.
+
+ Test: fast/worker/worker-script-error.html
+
+ * bindings/v8/V8WorkerContextEventListener.cpp:
+ (WebCore::V8WorkerContextEventListener::reportError):
+ * bindings/v8/V8WorkerContextEventListener.h:
+
+2009-10-09 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30260
+ <rdar://problem/6447115> REGRESSION: Logging out from SAP doesn't work
+
+ Tests: http/tests/xmlhttprequest/logout.html
+ http/tests/xmlhttprequest/re-login-async.html
+ http/tests/xmlhttprequest/re-login.html
+
+ Fix several issues with existing credential handling code.
+
+ * platform/network/CredentialStorage.cpp:
+ (WebCore::pathToDefaultProtectionSpaceMap): Changed the data structure to a simpler one.
+ (WebCore::originsWithCredentials): The reason for two-stage lookup above was that we didn't
+ want to iterate paths for origins that never had credentials associated with them. Changed
+ to use a separate HashSet for this.
+ (WebCore::pathToDefaultProtectionSpaceMap): The concept of default per-path credentials didn't
+ match the spec very well. UAs are supposed to deduce protection space from an URL, and then
+ use whichever credentials are known for this protection space. So, OriginToDefaultBasicCredentialMap
+ is now PathToDefaultProtectionSpaceMap.
+ (WebCore::protectionSpaceMapKeyFromURL): Factored out a helper that extracts a directory
+ URL from a given URL. These directory URLs are what we use as keys in PathToDefaultProtectionSpaceMap.
+ (WebCore::CredentialStorage::set): Updated for above changes.
+ (WebCore::findDefaultProtectionSpaceForURL): Factored out code iterating path length to find
+ a prefix in OriginToDefaultBasicCredentialMap.
+ (WebCore::CredentialStorage::set): Another version of set() can update credentials for a
+ URL default protection space. It does nothing if the given URL doesn't correspond to a known
+ protection space.
+ (WebCore::CredentialStorage::get): Renamed from getDefaultAuthenticationCredential.
+
+ * platform/network/CredentialStorage.h: Made the distinction between methods that use a known
+ protection space and those that deduce one from URL more clear.
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::start): Update credentials before starting the request for real.
+ This makes the following pattern work:
+ var req = new XMLHttpRequest("GET", "logout.html", "logout", "logout"); // wrong credentials
+ req.send("");
+ req.abort();
+ Abort() is used here to avoid having UA present an auth dialog after getting a 401 response.
+ Note that one cannot log in using the same method, because there isn't a known protection
+ space for the URL yet in that case, so the added code has no effect.
+ (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Use a correct persistence for
+ calling receivedCredential(). This fixes logging in using an async XHR (withut abort(), of
+ course), and matches sync case.
+ (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]):
+ Renamed getDefaultAuthenticationCredential() to get().
+
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::ResourceHandle::start):
+ (WebCore::WebCoreSynchronousLoader::load):
+ Same changes as in Mac code.
+
+2009-10-09 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Undoing a indent removes text instead of it's formatting.
+ <rdar://problem/7169206>
+ https://bugs.webkit.org/show_bug.cgi?id=28722
+ Restored the behavior prior to http://trac.webkit.org/changeset/46143. This change implemented the
+ indent command making simple DOM operation, without using moveParagraph which cause undo to be broken.
+
+ Added editing/undo/undo-indent.html test.
+
+ * editing/IndentOutdentCommand.cpp:
+ (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion): Restored.
+ (WebCore::IndentOutdentCommand::tryIndentingAsListItem): Merged changes.
+ (WebCore::IndentOutdentCommand::indentIntoBlockquote): Restored.
+ (WebCore::IndentOutdentCommand::indentRegion): Restored and added call to updateLayout to
+ ensure TextIterator could correctly calculate the position starting from the index.
+ * editing/IndentOutdentCommand.h: Restored.
+
+2009-10-09 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Optimization: Many StringImpl transformations are no-ops and should just return 'this'
+ https://bugs.webkit.org/show_bug.cgi?id=30186
+
+ Optimized StringImpl methods lower(), stripWhiteSpace() and simplifyWhiteSpace() to
+ detect no-ops and return this instead of creating a new instance.
+ Empirical testing shows that the majority of calls to these methods are no-ops, making
+ this worthwhile even if (in the case of lower()) the non-no-op case is slightly slowed.
+ Upper() is very rarely a no-op, so it wasn't worthwhile to optimize it.
+
+ * platform/text/StringImpl.cpp:
+ (WebCore::StringImpl::lower):
+ (WebCore::StringImpl::upper): Just add a comment explaining why this wasn't optimized
+ (WebCore::StringImpl::stripWhiteSpace):
+ (WebCore::StringImpl::simplifyWhiteSpace):
+
+2009-10-09 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ SVG Filter feGaussianBlur implementation is missing
+ [https://bugs.webkit.org/show_bug.cgi?id=28141]
+
+ This is the implementation of GaussianBlur filter for SVG.
+
+ There is already a test for feGaussianBlur
+ Test: svg/W3C-SVG-1.1/filters-gauss-01-b-w3c.svg
+
+ Test: svg/filters/feGaussianBlur.svg
+
+ * platform/graphics/filters/FilterEffect.cpp:
+ (WebCore::FilterEffect::FilterEffect):
+ * platform/graphics/filters/FilterEffect.h:
+ (WebCore::FilterEffect::isAlphaImage):
+ (WebCore::FilterEffect::setIsAlphaImage):
+ * platform/graphics/filters/SourceAlpha.cpp:
+ (WebCore::SourceAlpha::apply):
+ * svg/graphics/filters/SVGFEGaussianBlur.cpp:
+ (WebCore::boxBlur):
+ (WebCore::FEGaussianBlur::apply):
+
+2009-10-09 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] QoS support in the video sink
+ https://bugs.webkit.org/show_bug.cgi?id=29959
+
+ Removed the async buffer queue from the sink. Synchronize the
+ render method of the sink using a g_timeout_add() combined with a
+ gcond triggered when the buffer has been rendered.
+ Also fixed the video sink reference handling in the player, now
+ that the idle is not there anymore to mess up things.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::createGSTPlayBin):
+ * platform/graphics/gtk/VideoSinkGStreamer.cpp:
+ (webkit_video_sink_init):
+ (webkit_video_sink_timeout_func):
+ (webkit_video_sink_render):
+ (webkit_video_sink_dispose):
+ (unlock_buffer_mutex):
+ (webkit_video_sink_unlock):
+ (webkit_video_sink_stop):
+ (webkit_video_sink_class_init):
+
+2009-10-09 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ feMorphology filter is not implemented
+ [https://bugs.webkit.org/show_bug.cgi?id=5863]
+
+ Adds SVGFEMorphologyElement, for the SVG filter. It also fixes a bug
+ with the attribute "operator". It was only accessible via "_operator"
+ on JavaScript.
+
+ Test: svg/dom/operatorAttribute.xhtml
+
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.SVG.Filters.exp:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/objc/DOM.mm:
+ (WebCore::createElementClassMap):
+ * bindings/objc/DOMSVG.h:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bindings/scripts/CodeGeneratorObjC.pm:
+ * page/DOMWindow.idl:
+ * svg/SVGAllInOne.cpp:
+ * svg/SVGFECompositeElement.idl:
+ * svg/SVGFEMorphologyElement.cpp: Added.
+ (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
+ (WebCore::SVGFEMorphologyElement::~SVGFEMorphologyElement):
+ (WebCore::SVGFEMorphologyElement::setRadius):
+ (WebCore::SVGFEMorphologyElement::parseMappedAttribute):
+ (WebCore::SVGFEMorphologyElement::build):
+ * svg/SVGFEMorphologyElement.h: Added.
+ * svg/SVGFEMorphologyElement.idl: Added.
+ * svg/graphics/filters/SVGFEMorphology.cpp:
+ (WebCore::operator<<):
+ * svg/graphics/filters/SVGFEMorphology.h:
+ (WebCore::):
+ * svg/svgtags.in:
+
+2009-10-09 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix Chromium breakage.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30104
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.addCookieDomain): check that Storage panel is present before calling its methods.
+
+2009-10-09 Joe Ligman <joseph.ligman@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Added pure virtual methods setInputMethodEnabled and setInputMethodHint to QWebPageClient
+
+ https://bugs.webkit.org/show_bug.cgi?id=30023
+
+ * platform/qt/QWebPageClient.h:
+
+2009-10-08 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Implement beforeload for images. ImageLoadEventSender has been refactored into a more generic
+ ImageEventSender that can be used by both load and beforeload events. If the document has any
+ beforeload listeners, then the installation of images onto the renderer becomes asynchronous
+ and will be held up until the beforeload event can fire at a later date.
+
+ Both beforeload and load events now fire at the end of the tokenizer write() methods, so that
+ in the typical parsing case we don't have to put off the beforeload/load events until after
+ a layout or paint might already have happened. This lets beforeload/load not cause extra
+ layouts and repaints.
+
+ * dom/ContainerNode.cpp:
+ (WebCore::ContainerNode::dispatchBeforeLoadEvent):
+ * dom/Document.cpp:
+ (WebCore::Document::implicitClose):
+ (WebCore::Document::addListenerTypeIfNeeded):
+ * dom/Document.h:
+ (WebCore::Document::):
+ * dom/XMLTokenizer.cpp:
+ (WebCore::XMLTokenizer::write):
+ * html/HTMLImageElement.cpp:
+ (WebCore::HTMLImageElement::attach):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::attach):
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::write):
+ * loader/ImageLoader.cpp:
+ (WebCore::ImageBeforeLoadEventSender::ImageBeforeLoadEventSender):
+ (WebCore::ImageLoadEventSender::ImageLoadEventSender):
+ (WebCore::beforeLoadEventSender):
+ (WebCore::ImageLoader::ImageLoader):
+ (WebCore::ImageLoader::~ImageLoader):
+ (WebCore::ImageLoader::setImage):
+ (WebCore::ImageLoader::setLoadingImage):
+ (WebCore::ImageLoader::updateFromElement):
+ (WebCore::ImageLoader::notifyFinished):
+ (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
+ (WebCore::ImageLoader::dispatchPendingEvents):
+ (WebCore::ImageEventSender::ImageEventSender):
+ (WebCore::ImageEventSender::dispatchEventSoon):
+ (WebCore::ImageEventSender::cancelEvent):
+ (WebCore::ImageEventSender::dispatchPendingEvents):
+ (WebCore::ImageEventSender::timerFired):
+ * loader/ImageLoader.h:
+ (WebCore::ImageLoader::haveFiredBeforeLoadEvent):
+ * wml/WMLImageElement.cpp:
+ (WebCore::WMLImageElement::attach):
+
+2009-10-09 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Web Inspector: Wrap Database into ScriptObject in v8 bindings.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30174
+
+ No tests due to no Script* test infrastructure.
+
+ * bindings/v8/ScriptObjectQuarantine.cpp:
+ (WebCore::getQuarantinedScriptObject):
+
+2009-10-09 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Windowless Plugins : Fix crash when using QWebPage without QWebView.
+
+ 'client' is 0 when we have no view.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30251
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::paint):
+
+2009-10-09 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Plugins : Add missing setCurrentPlugin(0)
+
+ https://bugs.webkit.org/show_bug.cgi?id=30248
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::dispatchNPEvent):
+
+2009-10-09 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] beforeload event does not fire on script elements in XML
+ https://bugs.webkit.org/show_bug.cgi?id=30235
+
+ r49194 was lacking a change to XMLTokenizerQt.cpp, equivalent to the one
+ made in XMLTokenizerLibxml2.cpp.
+
+ * dom/XMLTokenizerQt.cpp:
+ (WebCore::XMLTokenizer::parseEndElement):
+
+2009-10-09 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's CSSParserValueList
+ https://bugs.webkit.org/show_bug.cgi?id=30249
+
+ Inherits CSSParserValueList class from FastAllocBase because it has
+ been instantiated by 'new' in WebCore/css/CSSGrammar.y:1271.
+
+ * css/CSSParserValues.h:
+
+2009-10-09 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Windowless Plugins : Create Pixmap only when size changes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30214
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::updatePluginWidget):
+
+2009-10-08 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Remove the WebKitPluginHalterEnabledPreferenceKey in favor of checking
+ for the existence of a PluginHalterDelegate.
+
+ This fixes a leak of WebPluginHalterClients:
+ https://bugs.webkit.org/show_bug.cgi?id=30119.
+
+ Reviewed by Dan Bernstein.
+
+ * WebCore.base.exp:
+ Removed the export of WebCore::Settings::setPluginHalterEnabled().
+
+ * loader/EmptyClients.h:
+ (WebCore::EmptyPluginHalterClient::enabled):
+
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ Remove initialization of m_pluginHalterClient, which was removed. If a
+ non-null PluginHalterClient was passed, create the PluginHalter, and
+ set its allowed run time.
+
+ * page/Page.h:
+ Removed pluginHalterEnabledStateChanged() and m_pluginHalterClient.
+
+ * page/PluginHalter.cpp:
+ (WebCore::PluginHalter::didStartPlugin):
+ Check whether the PluginHalterClient is enabled.
+ (WebCore::PluginHalter::didStopPlugin):
+ Ditto.
+
+ * page/PluginHalter.h:
+ Made m_client an OwnPtr.
+
+ * page/PluginHalterClient.h:
+ Added a function to return the enabled state.
+
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ Remove initialization of removed member.
+
+ * page/Settings.h:
+ Removed settings for the enabled state of the PluginHalter; we now use
+ the existence of a WebPluginHalterDelegate to determine whether the
+ PluginHalter is enabled.
+
+2009-10-08 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move executeScript from FrameLoader to ScriptController
+ https://bugs.webkit.org/show_bug.cgi?id=30200
+
+ These methods have virtually no interaction with FrameLoader. They
+ really seem like they ought to belong to ScriptController.
+
+ * WebCore.base.exp:
+ * bindings/js/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::execute):
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::ScriptController):
+ (WebCore::ScriptController::executeScript):
+ (WebCore::ScriptController::executeIfJavaScriptURL):
+ (WebCore::ScriptController::evaluate):
+ * bindings/js/ScriptController.h:
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::ScriptController):
+ (WebCore::ScriptController::executeScript):
+ (WebCore::ScriptController::executeIfJavaScriptURL):
+ * bindings/v8/ScriptController.h:
+ * dom/XMLTokenizer.cpp:
+ (WebCore::XMLTokenizer::notifyFinished):
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::XMLTokenizer::endElementNs):
+ * dom/XMLTokenizerQt.cpp:
+ (WebCore::XMLTokenizer::parseEndElement):
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::scriptExecution):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::changeLocation):
+ (WebCore::FrameLoader::urlSelected):
+ (WebCore::FrameLoader::requestFrame):
+ (WebCore::FrameLoader::submitForm):
+ (WebCore::FrameLoader::replaceDocument):
+ * loader/FrameLoader.h:
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::performRequest):
+
+2009-10-08 Geoffrey Garen <ggaren@apple.com>
+
+ Windows build fix: added missing #include.
+
+ * ForwardingHeaders/runtime/StructureChain.h: Copied from WebCore/ForwardingHeaders/runtime/PropertyNameArray.h.
+
+2009-10-08 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=30237>.
+ DOM Content and Load lines aren't shown if a page is loaded when the inspector is up.
+
+ Make sure to call update script object if we have an InspectorFrontend to
+ call it on when we get one of the new events.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::mainResourceFiredDOMContentEvent):
+ (WebCore::InspectorController::mainResourceFiredLoadEvent):
+
+2009-10-08 Geoffrey Garen <ggaren@apple.com>
+
+ Build fix: updated for removal of Structure::markAggregate().
+
+ * bindings/js/JSDOMGlobalObject.cpp:
+ (WebCore::JSDOMGlobalObject::markChildren):
+
+2009-10-08 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Make AtomicString create its StringImpl via create(), not the constructor,
+ so it gets allocated in a single heap block, saving memory and CPU cycles.
+ This eliminates two StringImpl constructors, making the remaining ones
+ unambiguous, so the "AdoptBuffer" parameter is no longer needed.
+ Added const attribute to UChar* in StringImpl constructor, eliminating the
+ need for several const_casts in calls to it.
+ StringImpl also unfriends AtomicString (OMG drama!!!)
+ https://bugs.webkit.org/show_bug.cgi?id=30141
+
+ * platform/text/AtomicString.cpp:
+ (WebCore::CStringTranslator::translate): Call StringImpl::create().
+ (WebCore::UCharBufferTranslator::translate): Ditto.
+ (WebCore::HashAndCharactersTranslator::translate): Ditto.
+ * platform/text/StringImpl.cpp:
+ (WebCore::StringImpl::StringImpl): Remove unnecessary AdoptBuffer param.
+ (WebCore::StringImpl::adopt): Ditto.
+ (WebCore::StringImpl::createUninitialized): Ditto.
+ (WebCore::StringImpl::create): Ditto.
+ (WebCore::StringImpl::crossThreadString): Ditto.
+ * platform/text/StringImpl.h:
+ (WebCore::StringImpl::setHash): Used by AtomicString when creating StringImpls.
+
+2009-10-08 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove the shouldLoadMediaElementURL frame loader client function.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::willLoadMediaElementURL):
+
+2009-10-08 John Gregg <johnnyg@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ SVGURIReference Build problem for V8. An additional stale reference to SVGURIReference bindings
+ which wasn't exposed until a clean build.
+ https://bugs.webkit.org/show_bug.cgi?id=30217
+
+ No new tests, just a build fix.
+
+ * bindings/v8/V8Index.cpp:
+
+2009-10-08 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Sort XCode project file.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-10-08 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+
+ Reviewed by Timothy Hatcher.
+
+ unselectable resources in resource panel
+ https://bugs.webkit.org/show_bug.cgi?id=30079
+
+ manual test added
+
+ Also changed the way DnD for resources in the Resources panel is
+ handled.
+
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceSidebarTreeElement.prototype.onattach):
+ (WebInspector.ResourceSidebarTreeElement.prototype.ondragstart):
+ * manual-tests/inspector/duplicate-resource-urls.html: Added.
+
+2009-10-08 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <http://webkit.org/b/30233>
+ Local Storage and Cookies show Blank Titles on Local Files.
+
+ If a local storage or cookies sidebar item has no domain, set the
+ title to "Local Files", because that is what it represents.
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/StoragePanel.js:
+ (WebInspector.DOMStorageSidebarTreeElement.prototype.get mainTitle):
+ (WebInspector.CookieSidebarTreeElement.prototype.get mainTitle):
+ (WebInspector.CookieSidebarTreeElement.prototype.set mainTitle):
+
+2009-10-08 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix failing media layout tests. Don't make beforeload block loads of objects that aren't in the
+ document, since video/audio (and images eventually too) can load when not in the document yet.
+
+ * dom/ContainerNode.cpp:
+ (WebCore::ContainerNode::dispatchBeforeLoadEvent):
+
+2009-10-08 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ Move SVGFitToViewBox ANIMATED_* macros in classes that inherit from it
+ https://bugs.webkit.org/show_bug.cgi?id=30230
+
+ This patch also devirtualizes viewBoxToViewTransform(), is it's superflous.
+ viewBoxToViewTransform() is now a simple static heper function in SVGFitToViewBox.
+ As a result, the SVGSVGElement::viewBoxToViewTransform() function now resuses the same logic.
+
+ As side-effect this patch fixes svg/custom/linking-a-03-b-transform.svg, the return
+ statement in SVGSVGElement::viewBoxToViewTransform() was clearly wrong.
+
+ * svg/SVGFitToViewBox.cpp:
+ (WebCore::SVGFitToViewBox::SVGFitToViewBox):
+ (WebCore::SVGFitToViewBox::viewBoxToViewTransform):
+ * svg/SVGFitToViewBox.h:
+ * svg/SVGMarkerElement.cpp:
+ (WebCore::SVGMarkerElement::SVGMarkerElement):
+ (WebCore::SVGMarkerElement::viewBoxToViewTransform):
+ * svg/SVGMarkerElement.h:
+ * svg/SVGPatternElement.cpp:
+ (WebCore::SVGPatternElement::SVGPatternElement):
+ (WebCore::SVGPatternElement::buildPattern):
+ * svg/SVGPatternElement.h:
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::SVGSVGElement):
+ (WebCore::SVGSVGElement::viewBoxToViewTransform):
+ * svg/SVGSVGElement.h:
+ * svg/SVGSymbolElement.cpp:
+ (WebCore::SVGSymbolElement::SVGSymbolElement):
+ * svg/SVGSymbolElement.h:
+ * svg/SVGViewElement.cpp:
+ (WebCore::SVGViewElement::SVGViewElement):
+ * svg/SVGViewElement.h:
+ * svg/SVGViewSpec.cpp:
+ (WebCore::SVGViewSpec::SVGViewSpec):
+ * svg/SVGViewSpec.h:
+
+2009-10-08 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Correct a typo that fixes the resizing of columns in Cookie view when you
+ resize the Inspector window.
+
+ * inspector/front-end/CookieItemsView.js:
+ (WebInspector.CookieItemsView.prototype.resize):
+
+2009-10-08 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=29811>
+ Text in Inspector's Styles gear menu is invisible.
+
+ Adds a style rule for the option text and hr's in the gear menu,
+ to prevent them from being transparent.
+
+ * inspector/front-end/inspector.css:
+
+2009-10-08 John Gregg <johnnyg@google.com>
+
+ Reviewed by David Levin.
+
+ Fix build problem with SVGURIReference in V8.
+ https://bugs.webkit.org/show_bug.cgi?id=30217
+
+ No new tests, just a build fix.
+
+ * WebCore.gypi:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+
+2009-10-07 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Make beforeload work on <video>/<audio> elements.
+
+ Added fast/dom/beforeload/video-before-load.html
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::parseMappedAttribute):
+ (WebCore::HTMLMediaElement::selectMediaResource):
+ (WebCore::HTMLMediaElement::selectNextSourceChild):
+
+2009-10-08 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ Move SVGExternalResourcesRequired ANIMATED_* macros in classes that inherit from it
+ https://bugs.webkit.org/show_bug.cgi?id=30218
+
+ The long term goal is to kill the need for the virtual contextElement() function in SVG code.
+ No change in functionality, thus no new tests.
+
+ * svg/SVGAElement.cpp:
+ (WebCore::SVGAElement::SVGAElement):
+ * svg/SVGAElement.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/SVGCursorElement.cpp:
+ (WebCore::SVGCursorElement::SVGCursorElement):
+ * svg/SVGCursorElement.h:
+ * svg/SVGDefsElement.cpp:
+ (WebCore::SVGDefsElement::SVGDefsElement):
+ * svg/SVGDefsElement.h:
+ * svg/SVGEllipseElement.cpp:
+ (WebCore::SVGEllipseElement::SVGEllipseElement):
+ * svg/SVGEllipseElement.h:
+ * svg/SVGExternalResourcesRequired.cpp:
+ (WebCore::SVGExternalResourcesRequired::SVGExternalResourcesRequired):
+ * svg/SVGExternalResourcesRequired.h:
+ * svg/SVGFEImageElement.cpp:
+ (WebCore::SVGFEImageElement::SVGFEImageElement):
+ * svg/SVGFEImageElement.h:
+ * svg/SVGFilterElement.cpp:
+ (WebCore::SVGFilterElement::SVGFilterElement):
+ * svg/SVGFilterElement.h:
+ * svg/SVGFontElement.cpp:
+ (WebCore::SVGFontElement::SVGFontElement):
+ * svg/SVGFontElement.h:
+ * svg/SVGForeignObjectElement.cpp:
+ (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
+ * svg/SVGForeignObjectElement.h:
+ * svg/SVGGElement.cpp:
+ (WebCore::SVGGElement::SVGGElement):
+ * svg/SVGGElement.h:
+ * svg/SVGGradientElement.cpp:
+ (WebCore::SVGGradientElement::SVGGradientElement):
+ * svg/SVGGradientElement.h:
+ * svg/SVGImageElement.cpp:
+ (WebCore::SVGImageElement::SVGImageElement):
+ * svg/SVGImageElement.h:
+ * svg/SVGLineElement.cpp:
+ (WebCore::SVGLineElement::SVGLineElement):
+ * svg/SVGLineElement.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/SVGPathElement.cpp:
+ (WebCore::SVGPathElement::SVGPathElement):
+ * svg/SVGPathElement.h:
+ * svg/SVGPatternElement.cpp:
+ (WebCore::SVGPatternElement::SVGPatternElement):
+ * svg/SVGPatternElement.h:
+ * svg/SVGPolyElement.cpp:
+ (WebCore::SVGPolyElement::SVGPolyElement):
+ * svg/SVGPolyElement.h:
+ * svg/SVGRectElement.cpp:
+ (WebCore::SVGRectElement::SVGRectElement):
+ * svg/SVGRectElement.h:
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::SVGSVGElement):
+ * svg/SVGSVGElement.h:
+ * svg/SVGScriptElement.cpp:
+ (WebCore::SVGScriptElement::SVGScriptElement):
+ * svg/SVGScriptElement.h:
+ * svg/SVGSwitchElement.cpp:
+ (WebCore::SVGSwitchElement::SVGSwitchElement):
+ * svg/SVGSwitchElement.h:
+ * svg/SVGSymbolElement.cpp:
+ (WebCore::SVGSymbolElement::SVGSymbolElement):
+ * svg/SVGSymbolElement.h:
+ * svg/SVGTextContentElement.cpp:
+ (WebCore::SVGTextContentElement::SVGTextContentElement):
+ * svg/SVGTextContentElement.h:
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::SVGUseElement):
+ * svg/SVGUseElement.h:
+ * svg/SVGViewElement.cpp:
+ (WebCore::SVGViewElement::SVGViewElement):
+ * svg/SVGViewElement.h:
+
+2009-10-08 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ SVG feComposite: operator over mixes up inputs
+ [https://bugs.webkit.org/show_bug.cgi?id=30205]
+
+ SVG feComposite operator over mixed up the inputs.
+ The pixel-test svg/filters/feComposite.svg can already test this.
+ No new test result is needed as long as filters are disabled.
+
+ * platform/graphics/filters/FEComposite.cpp:
+ (WebCore::FEComposite::apply):
+
+2009-10-08 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by George Staikos.
+
+ Move SVGURIReference ANIMATED_* macros in classes that inherit from it
+ https://bugs.webkit.org/show_bug.cgi?id=30184
+
+ The long term goal is to kill the need for the virtual contextElement() function in SVG code.
+ No change in functionality, thus no new tests.
+
+ * svg/SVGAElement.cpp:
+ (WebCore::SVGAElement::SVGAElement):
+ * svg/SVGAElement.h:
+ * svg/SVGAltGlyphElement.cpp:
+ (WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
+ * svg/SVGAltGlyphElement.h:
+ * svg/SVGCursorElement.cpp:
+ (WebCore::SVGCursorElement::SVGCursorElement):
+ * svg/SVGCursorElement.h:
+ * svg/SVGFEImageElement.cpp:
+ (WebCore::SVGFEImageElement::SVGFEImageElement):
+ * svg/SVGFEImageElement.h:
+ * svg/SVGFilterElement.cpp:
+ (WebCore::SVGFilterElement::SVGFilterElement):
+ * svg/SVGFilterElement.h:
+ * svg/SVGForeignObjectElement.cpp:
+ (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
+ * svg/SVGForeignObjectElement.h:
+ * svg/SVGGradientElement.cpp:
+ (WebCore::SVGGradientElement::SVGGradientElement):
+ * svg/SVGGradientElement.h:
+ * svg/SVGImageElement.cpp:
+ (WebCore::SVGImageElement::SVGImageElement):
+ * svg/SVGImageElement.h:
+ * svg/SVGMPathElement.cpp:
+ (WebCore::SVGMPathElement::SVGMPathElement):
+ (WebCore::SVGMPathElement::pathElement):
+ * svg/SVGMPathElement.h:
+ * svg/SVGMaskElement.cpp:
+ (WebCore::SVGMaskElement::SVGMaskElement):
+ * svg/SVGMaskElement.h:
+ * svg/SVGPatternElement.cpp:
+ (WebCore::SVGPatternElement::SVGPatternElement):
+ * svg/SVGPatternElement.h:
+ * svg/SVGScriptElement.cpp:
+ (WebCore::SVGScriptElement::SVGScriptElement):
+ * svg/SVGScriptElement.h:
+ * svg/SVGTRefElement.cpp:
+ (WebCore::SVGTRefElement::SVGTRefElement):
+ * svg/SVGTRefElement.h:
+ * svg/SVGTextPathElement.cpp:
+ (WebCore::SVGTextPathElement::SVGTextPathElement):
+ * svg/SVGTextPathElement.h:
+ * svg/SVGURIReference.cpp:
+ (WebCore::SVGURIReference::SVGURIReference):
+ * svg/SVGURIReference.h:
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::SVGUseElement):
+ * svg/SVGUseElement.h:
+
+2009-10-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Re-add the QApplication::syncX() line for plugin windows removed
+ by r49169. Also changed the location of the sync just after the
+ creation instead of just before sending it to the plugin.
+ https://bugs.webkit.org/show_bug.cgi?id=25053
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::platformStart):
+
+2009-10-08 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: NodeLists Don't Display Well in the Console
+ https://bugs.webkit.org/show_bug.cgi?id=28061
+
+ * inspector/front-end/InjectedScript.js:
+ (Object.type):
+
+2009-10-08 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Windowless plugins: Remove unnecessary XSync for opaque mode.
+
+ The reason for the XSync was that the plugin would not know about the
+ Drawable. It turns out that the real reason behind this is that even
+ though XCreatePixmap returns a handle, this id is unknown to the server
+ until we flush the connection.
+
+ So, move the XSync to right after we create the Pixmap.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30207
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::paint):
+
+2009-10-07 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30188
+
+ Fixes an issue where performing a non DHTML drag-and-drop operation
+ does not work as expected. For instance, dragging some selected text
+ to an external application, such as TextEdit.
+
+ This issue was a regression that arose from patching bug #30107.
+
+ This change is covered by the manual test:
+ drag-out-of-background-window.html
+
+ * page/DragController.cpp:
+ (WebCore::DragController::startDrag): When performing a non-DHTML drag
+ operation then default to drag operations DragOperationGeneric and
+ DragOperationCopy according to similar functionality removed when fixing
+ bug #30107, see:
+ http://trac.webkit.org/browser/trunk/WebKit/mac/WebView/WebHTMLView.mm?rev=48526#L3430
+
+2009-10-07 Xan Lopez <xlopez@igalia.com>
+
+ Fix more breakage in the GTKbuild.
+
+ * GNUmakefile.am:
+
+2009-10-07 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move PolicyChecker to it's own file
+ https://bugs.webkit.org/show_bug.cgi?id=30193
+
+ This is just moving code around and re-naming things.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * loader/FrameLoader.cpp:
+ * loader/FrameLoader.h:
+ * loader/PolicyCallback.cpp: Added.
+ (WebCore::PolicyCallback::PolicyCallback):
+ (WebCore::PolicyCallback::~PolicyCallback):
+ (WebCore::PolicyCallback::clear):
+ (WebCore::PolicyCallback::set):
+ (WebCore::PolicyCallback::call):
+ (WebCore::PolicyCallback::clearRequest):
+ (WebCore::PolicyCallback::cancel):
+ * loader/PolicyCallback.h: Added.
+ (WebCore::PolicyCallback::request):
+ * loader/PolicyCheck.cpp: Removed.
+ * loader/PolicyCheck.h: Removed.
+
+2009-10-07 Joel Stanley <joel@jms.id.au>
+
+ Reviewed by Mark Rowe.
+
+ Include <limits> for std::numeric_limits. Required by gcc-4.4
+ https://bugs.webkit.org/show_bug.cgi?id=30197
+
+ * html/canvas/CanvasByteArray.h:
+ * html/canvas/CanvasIntArray.h:
+ * html/canvas/CanvasShortArray.h:
+ * html/canvas/CanvasUnsignedByteArray.h:
+ * html/canvas/CanvasUnsignedIntArray.h:
+ * html/canvas/CanvasUnsignedShortArray.h:
+
+2009-10-07 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Factor PolicyChecker out of FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=30155
+
+ This patch separates PolicyChecker from FrameLoader. Loader policy is
+ in change of managing the FrameLoaderClient callbacks. Ideally, it
+ shouldn't know anything about FrameLoader, but I couldn't quite remove
+ all knowledge (although we might be able to do more later). In a
+ future patch, I'll move PolicyChecker into a separate file.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::FrameLoader):
+ (WebCore::FrameLoader::loadURL):
+ (WebCore::FrameLoader::load):
+ (WebCore::FrameLoader::loadWithDocumentLoader):
+ (WebCore::PolicyChecker::handleUnimplementablePolicy):
+ (WebCore::PolicyChecker::cannotShowMIMEType):
+ (WebCore::PolicyChecker::PolicyChecker):
+ (WebCore::PolicyChecker::checkNavigationPolicy):
+ (WebCore::PolicyChecker::checkContentPolicy):
+ (WebCore::FrameLoader::shouldReloadToHandleUnreachableURL):
+ (WebCore::FrameLoader::stopAllLoaders):
+ (WebCore::PolicyChecker::cancelCheck):
+ (WebCore::PolicyChecker::stopCheck):
+ (WebCore::PolicyChecker::continueAfterContentPolicy):
+ (WebCore::PolicyChecker::continueLoadAfterWillSubmitForm):
+ (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
+ (WebCore::FrameLoader::loadPostRequest):
+ (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
+ (WebCore::PolicyChecker::checkNewWindowPolicy):
+ (WebCore::PolicyChecker::continueAfterNewWindowPolicy):
+ (WebCore::PolicyChecker::continueAfterNavigationPolicy):
+ (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
+ * loader/FrameLoader.h:
+ (WebCore::PolicyChecker::loadType):
+ (WebCore::PolicyChecker::setLoadType):
+ (WebCore::PolicyChecker::delegateIsDecidingNavigationPolicy):
+ (WebCore::PolicyChecker::delegateIsHandlingUnimplementablePolicy):
+ (WebCore::FrameLoader::policy):
+ * loader/FrameLoaderClient.h:
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::didCancel):
+ (WebCore::MainResourceLoader::willSendRequest):
+ (WebCore::MainResourceLoader::continueAfterContentPolicy):
+ (WebCore::MainResourceLoader::didReceiveResponse):
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::dataChanged):
+
+2009-10-07 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fixed <rdar://problem/5751979> Database code takes JSLock on secondary
+ thread, permanently slowing down JavaScript
+
+ Changed callback objects to use a standard helper object. The helper
+ object ASSERTs that it is deleted on the main thread, so no lock is
+ required when unprotecting its members. It also centralizes some previously
+ duplicated code.
+
+ Callback objects that might be deleted on a secondary thread use
+ callOnMainThread to delete their helper objects on the main thread.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSCallbackData.cpp: Copied from bindings/js/JSCustomSQLTransactionCallback.cpp.
+ (WebCore::JSCallbackData::deleteData):
+ (WebCore::JSCallbackData::invokeCallback):
+ * bindings/js/JSCallbackData.h: Copied from bindings/js/JSCustomSQLTransactionCallback.cpp.
+ (WebCore::JSCallbackData::JSCallbackData):
+ (WebCore::JSCallbackData::~JSCallbackData):
+ (WebCore::JSCallbackData::callback):
+ * bindings/js/JSCustomPositionCallback.cpp:
+ (WebCore::JSCustomPositionCallback::JSCustomPositionCallback):
+ (WebCore::JSCustomPositionCallback::handleEvent):
+ * bindings/js/JSCustomPositionCallback.h:
+ * bindings/js/JSCustomPositionErrorCallback.cpp:
+ (WebCore::JSCustomPositionErrorCallback::JSCustomPositionErrorCallback):
+ (WebCore::JSCustomPositionErrorCallback::handleEvent):
+ * bindings/js/JSCustomPositionErrorCallback.h:
+ * bindings/js/JSCustomSQLStatementCallback.cpp:
+ (WebCore::JSCustomSQLStatementCallback::JSCustomSQLStatementCallback):
+ (WebCore::JSCustomSQLStatementCallback::~JSCustomSQLStatementCallback):
+ (WebCore::JSCustomSQLStatementCallback::handleEvent):
+ * bindings/js/JSCustomSQLStatementCallback.h:
+ * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
+ (WebCore::JSCustomSQLStatementErrorCallback::JSCustomSQLStatementErrorCallback):
+ (WebCore::JSCustomSQLStatementErrorCallback::~JSCustomSQLStatementErrorCallback):
+ (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
+ * bindings/js/JSCustomSQLStatementErrorCallback.h:
+ * bindings/js/JSCustomSQLTransactionCallback.cpp:
+ (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback):
+ (WebCore::JSCustomSQLTransactionCallback::~JSCustomSQLTransactionCallback):
+ (WebCore::JSCustomSQLTransactionCallback::handleEvent):
+ * bindings/js/JSCustomSQLTransactionCallback.h:
+ * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
+ (WebCore::JSCustomSQLTransactionErrorCallback::JSCustomSQLTransactionErrorCallback):
+ (WebCore::JSCustomSQLTransactionErrorCallback::~JSCustomSQLTransactionErrorCallback):
+ (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
+ * bindings/js/JSCustomSQLTransactionErrorCallback.h:
+ * bindings/js/JSCustomVoidCallback.cpp:
+ (WebCore::JSCustomVoidCallback::JSCustomVoidCallback):
+ (WebCore::JSCustomVoidCallback::~JSCustomVoidCallback):
+ (WebCore::JSCustomVoidCallback::handleEvent):
+ * bindings/js/JSCustomVoidCallback.h:
+ * storage/Database.cpp:
+ (WebCore::Database::Database):
+
+2009-10-07 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Dave Levin.
+
+ Fix StringImpl::m_buffer
+ https://bugs.webkit.org/show_bug.cgi?id=30189
+
+ Fix my previous StringImpl patch to avoid using an indefinite-length array member,
+ since MSVC doesn't like it. Instead, go back to offsetting by sizeof(StringImpl).
+
+ * platform/text/StringImpl.cpp:
+ (WebCore::StringImpl::StringImpl):
+ (WebCore::StringImpl::createUninitialized):
+ * platform/text/StringImpl.h:
+ (WebCore::StringImpl::bufferIsInternal):
+
+2009-10-07 Aaron Boodman <aa@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Update isolated worlds under v8 to support world reuse.
+ https://bugs.webkit.org/show_bug.cgi?id=30145
+
+ * bindings/v8/ScriptController.cpp:
+ Replace evaluateInNewIsolatedWorld() withe evaluateInIsolatedWorld(id).
+ (WebCore::ScriptController::evaluateInIsolatedWorld):
+ * bindings/v8/ScriptController.h: Ditto.
+ * bindings/v8/V8Proxy.cpp: Ditto.
+ (WebCore::V8Proxy::~V8Proxy): Dittio.
+ (WebCore::V8Proxy::evaluateInIsolatedWorld): Ditto.
+ * bindings/v8/V8Proxy.h: Ditto.
+ * bindings/v8/V8IsolatedWorld.cpp:
+ Add support for controlling lifetime of a world, rather than relying on GC.
+ (WebCore::V8IsolatedWorld::contextWeakReferenceCallback): Ditto.
+ (WebCore::V8IsolatedWorld::V8IsolatedWorld): Ditto.
+ (WebCore::V8IsolatedWorld::destroy): Ditto.
+ * bindings/v8/V8IsolatedWorld.h: Ditto.
+
+2009-10-07 Jeremy Orlow <jorlow@chromium.org>
+
+ Build fix for http://trac.webkit.org/changeset/49272 on Windows
+
+ * platform/text/StringImpl.h:
+
+2009-10-07 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Optimization of StringImpl:
+ - Remove unnecessary m_bufferIsInternal member (saves 4 bytes). Instead, check whether
+ m_data points to just past the end of the object's members.
+ - copy() and createWithTerminatingNullCharacter() create the string in a single malloc
+ block instead of 2 (saves ~20 bytes and considerable CPU cycles, increases locality).
+ - Move m_length next to m_hash to save 4 bytes of padding in 64-bit builds.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29500
+
+ * platform/text/StringImpl.cpp:
+ (WebCore::StringImpl::StringImpl): Re-ordered members.
+ (WebCore::StringImpl::~StringImpl): Change to is-buffer-internal check.
+ (WebCore::StringImpl::createUninitialized): Use new m_buffer member instead of sizeof()
+ to ensure chars are copied to correct location.
+ (WebCore::StringImpl::createWithTerminatingNullCharacter): Make sure copy is created
+ in a single malloc block.
+ (WebCore::StringImpl::threadsafeCopy): Make sure copy is created in a single malloc block.
+ (WebCore::StringImpl::crossThreadString): Make sure copy is created in a single malloc block.
+ (WebCore::StringImpl::sharedBuffer): Change to is-buffer-internal check.
+ * platform/text/StringImpl.h:
+ (WebCore::StringImpl::startsWith): Just fixed a confusing param name.
+ (WebCore::StringImpl::bufferIsInternal): Changed member var into accessor method.
+ (WebCore::StringImpl::m_data): Repositioned for optimal member packing in 64-bit.
+ (WebCore::StringImpl::m_buffer): Added to provide an explicit location for where internal buffer goes.
+
+2009-10-07 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30102
+ And
+ <rdar://problem/5015957>
+
+ Manual test to confirm that the not-allowed cursor is shown for an
+ invalid drag-and-drop operation.
+
+ We cannot test this using DRT because of a discrepancy between the Windows
+ API-based drop effect and the WebKit drop effect. See bug #24731 for more
+ details.
+
+ * manual-tests/drag-cursor-notallowed.html: Added.
+
+2009-10-07 Mark Rowe <mrowe@apple.com>
+
+ Fix the build.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-10-07 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <http://webkit.org/b/30104>.
+ Inspector should show cookies of sub-resources on the page.
+
+ This function implements showing cookies for all sub-resources of a page.
+ When the page is loaded, it populates the Storage Panel with a list of all
+ domains that were loaded as part of the full page load (iframes, ads, etc).
+ When the user selects one of the domains, the inspector calls back into the
+ controller, and the controller combines all of the cookies from that domain
+ into a list, and sends that list is sent back to the controller to render.
+
+ A domain now needs to be passed into CookieItemsView, and CookieSidebarTreeElement.
+
+ As a result of a previous patch, we now have detailed cookie information for
+ both Windows on CFNetwork and Mac. Additionally, this patch provides deleteCookie
+ support on Windows.
+
+ * bindings/js/ScriptObject.cpp:
+ (WebCore::ScriptObject::set):
+ * bindings/js/ScriptObject.h:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::getCookies):
+ (WebCore::InspectorBackend::deleteCookie):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::populateScriptObjects):
+ (WebCore::InspectorController::didFinishLoading):
+ (WebCore::InspectorController::getCookies):
+ (WebCore::InspectorController::buildArrayForCookies):
+ (WebCore::InspectorController::buildObjectForCookie):
+ (WebCore::InspectorController::deleteCookie):
+ * inspector/InspectorController.h:
+ * inspector/InspectorDOMAgent.cpp:
+ * inspector/InspectorDOMAgent.h:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addCookieDomainForDocument):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/CookieItemsView.js:
+ (WebInspector.CookieItemsView):
+ (WebInspector.CookieItemsView.prototype.update):
+ (WebInspector.CookieItemsView.prototype._deleteButtonClicked):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.Cookies.getCookiesAsync):
+ * inspector/front-end/StoragePanel.js:
+ (WebInspector.StoragePanel):
+ (WebInspector.StoragePanel.prototype.reset):
+ (WebInspector.StoragePanel.prototype.addCookieDomain):
+ (WebInspector.StoragePanel.prototype.showCookies):
+ (WebInspector.CookieSidebarTreeElement):
+ (WebInspector.CookieSidebarTreeElement.prototype.onselect):
+ * inspector/front-end/inspector.js:
+ (WebInspector.addCookieDomain):
+ * platform/Cookie.h:
+ (WebCore::CookieHash::hash):
+ (WebCore::CookieHash::equal):
+ (WTF::):
+ * platform/network/win/CookieJarCFNetWin.cpp:
+ (WebCore::deleteCookie):
+
+2009-10-07 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Add ScriptObject::set(const char*, unsigned).
+
+ https://bugs.webkit.org/show_bug.cgi?id=30104
+
+ * bindings/v8/ScriptObject.cpp:
+ (WebCore::ScriptObject::set):
+ * bindings/v8/ScriptObject.h:
+
+2009-10-07 Brent Fulgham <bfulgham@webkit.org>
+
+ Unreviewed build fix for Windows (Cairo).
+
+ Provide implementation of new BitmapImage::create that was
+ added in @r49060.
+
+ * platform/graphics/win/ImageCairoWin.cpp:
+
+2009-10-07 Andrew Scherkus <scherkus@chromium.org>
+
+ Reviewed by Eric Carlson.
+
+ Refactor RenderThemeChromiumMac and RenderThemeChromiumSkia to render media controls using GraphicsContext.
+
+ Design was based on existing RenderMediaControls.cpp used by RenderThemeSafari/Win.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29987
+
+ Covered by existing layout tests as no new functionality was introduced.
+
+ * WebCore.gypi: Added RenderMediaControlsChromium.cpp/h.
+ * css/mediaControlsChromium.css: Tweaked media slider position and border style.
+ * rendering/MediaControlElements.cpp:
+ (WebCore::toParentMediaElement): Taken from RenderMediaControls.
+ (WebCore::MediaControlElement::rendererIsNeeded): Don't call shouldRenderMediaControlPart() if element has no appearance.
+ (WebCore::MediaControlInputElement::rendererIsNeeded): Ditto.
+ * rendering/RenderMediaControls.cpp: Moved parentMediaElement() to MediaControlElements.
+ * rendering/RenderMediaControlsChromium.cpp: Added.
+ (WebCore::platformResource): Helper to load and cache media control image resources.
+ (WebCore::mediaSliderThumbImage): Implementation refactored from RenderThemeChromiumMac/Skia.
+ (WebCore::mediaVolumeSliderThumbImage): Ditto.
+ (WebCore::paintMediaButton): Ditto.
+ (WebCore::paintMediaMuteButton): Ditto.
+ (WebCore::paintMediaPlayButton): Ditto.
+ (WebCore::paintMediaSlider): Ditto.
+ (WebCore::paintMediaSliderThumb): Ditto.
+ (WebCore::paintMediaVolumeSlider): Ditto.
+ (WebCore::paintMediaVolumeSliderThumb): Ditto.
+ (WebCore::paintMediaTimelineContainer): Ditto.
+ (WebCore::RenderMediaControlsChromium::shouldRenderMediaControlPart): Ditto.
+ (WebCore::RenderMediaControlsChromium::paintMediaControlsPart): Same
+ (WebCore::RenderMediaControlsChromium::adjustMediaSliderThumbSize):
+ * rendering/RenderMediaControlsChromium.h: Added.
+ * rendering/RenderThemeChromiumMac.h:
+ * rendering/RenderThemeChromiumMac.mm:
+ (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize): Implementation delegated to RenderMediaControlsChromium.
+ (WebCore::RenderThemeChromiumMac::shouldRenderMediaControlPart): Ditto.
+ (WebCore::RenderThemeChromiumMac::paintMediaPlayButton): Ditto.
+ (WebCore::RenderThemeChromiumMac::paintMediaMuteButton): Ditto.
+ (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack): Ditto.
+ (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderTrack): Ditto.
+ (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb): Ditto.
+ (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderThumb): Ditto.
+ (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground): Ditto.
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::paintMediaControlsBackground): Implementation delegated to RenderMediaControlsChromium.
+ (WebCore::RenderThemeChromiumSkia::paintMediaSliderTrack): Ditto.
+ (WebCore::RenderThemeChromiumSkia::paintMediaVolumeSliderTrack): Ditto.
+ (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize): Ditto.
+ (WebCore::RenderThemeChromiumSkia::paintMediaSliderThumb): Ditto.
+ (WebCore::RenderThemeChromiumSkia::paintMediaVolumeSliderThumb): Ditto.
+ (WebCore::RenderThemeChromiumSkia::paintMediaPlayButton): Ditto.
+ (WebCore::RenderThemeChromiumSkia::paintMediaMuteButton): Ditto.
+ (WebCore::RenderThemeChromiumSkia::shouldRenderMediaControlPart): Ditto.
+
+2009-10-07 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Make plugins work with beforeload.
+
+ Added fast/dom/beforeload/flash-before-load.html
+
+ * html/HTMLObjectElement.cpp:
+ (WebCore::HTMLObjectElement::parseMappedAttribute):
+ * rendering/RenderPartObject.cpp:
+ (WebCore::RenderPartObject::updateWidget):
+
+2009-10-07 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Protect JS listener object from GC while clearing a property on it.
+ See http://crbug.com/23780.
+ https://bugs.webkit.org/show_bug.cgi?id=30137
+
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::~V8AbstractEventListener):
+
+2009-10-07 Zoltan Horvath <zoltan@webkit.org>
+
+ Rubber-stamped by Eric Seidel.
+
+ Allow custom memory allocation control for WebCore's CachedResourceClient class
+ https://bugs.webkit.org/show_bug.cgi?id=30165
+
+ Inherits CachedResourceClient class from FastAllocBase because (its
+ child class) CSSFontFaceSource has been instantiated by 'new' in WebCore/css/CSSFontFaceSource.h:46.
+
+ * loader/CachedResourceClient.h:
+
+2009-10-07 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for WebCore's IdentifierRep
+ https://bugs.webkit.org/show_bug.cgi?id=30159
+
+ Inherits IdentifierRep class from FastAllocBase because it has been
+ instantiated by 'new' in WebCore/bridge/IdentifierRep.cpp:61.
+
+ * bridge/IdentifierRep.h:
+
+2009-10-07 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fetch pointers to C+DOM window immediately from holder
+ object (do not search prototype chain for proper JS wrapper).
+ https://bugs.webkit.org/show_bug.cgi?id=29031
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::createNewContext):
+ (WebCore::V8Proxy::installDOMWindow):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::NAMED_ACCESS_CHECK):
+ (WebCore::INDEXED_ACCESS_CHECK):
+2009-10-07 Adam Roben <aroben@apple.com>
+
+ Fix typo in PluginView::load that was causing cross-origin loads to
+ be allowed
+
+ This typo was introduced in the build fix in r49213.
+
+ Fixes <http://webkit.org/b/30168> REGRESSION (r49213):
+ http/tests/plugins/local-geturl-from-remote.html is failing on Windows
+
+ Reviewed by Sam Weinig.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::load): Removed a comma operator that was making
+ a condition always evaluate to true.
+
+2009-10-07 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Do not create valid QColor's for invalid WebCore::Color's.
+
+ * platform/graphics/qt/ColorQt.cpp:
+ (WebCore::Color::operator QColor):
+
+2009-10-07 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Symbian SBSv2 .data segment adress fix
+ https://bugs.webkit.org/show_bug.cgi?id=30157
+
+ RO-section in qtwebkit.dll exceeds allocated space in SBSv2. Move RW-section
+ base address to start from 0x800000 instead of the toolchain default 0x400000
+
+ * WebCore.pro:
+
+2009-10-07 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Migrate database inspection to the injected script-based schema.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29788
+
+ * bindings/js/JSInspectorBackendCustom.cpp:
+ (WebCore::JSInspectorBackend::databaseForId):
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8InspectorBackendCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::dispatchOnInjectedScript):
+ (WebCore::InspectorBackend::databaseForId):
+ (WebCore::InspectorBackend::selectDatabase):
+ (WebCore::InspectorBackend::getDatabaseTableNames):
+ (WebCore::InspectorBackend::reportDidDispatchOnInjectedScript):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::populateScriptObjects):
+ (WebCore::InspectorController::resetScriptObjects):
+ (WebCore::InspectorController::selectDatabase):
+ (WebCore::InspectorController::databaseForId):
+ (WebCore::InspectorController::didOpenDatabase):
+ (WebCore::InspectorController::didUseDOMStorage):
+ (WebCore::InspectorController::selectDOMStorage):
+ (WebCore::InspectorController::getDOMStorageResourceForId):
+ * inspector/InspectorController.h:
+ * inspector/InspectorDatabaseResource.cpp:
+ (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
+ (WebCore::InspectorDatabaseResource::bind):
+ * inspector/InspectorDatabaseResource.h:
+ (WebCore::InspectorDatabaseResource::database):
+ (WebCore::InspectorDatabaseResource::id):
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addDatabase):
+ (WebCore::InspectorFrontend::selectDatabase):
+ (WebCore::InspectorFrontend::didGetDatabaseTableNames):
+ (WebCore::InspectorFrontend::addDOMStorage):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/Database.js:
+ (WebInspector.Database):
+ (WebInspector.Database.prototype.get id):
+ (WebInspector.Database.prototype.set name):
+ (WebInspector.Database.prototype.set version):
+ (WebInspector.Database.prototype.set domain):
+ (WebInspector.Database.prototype.getTableNames):
+ (WebInspector.Database.prototype.executeSql):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.dispatch):
+ (InjectedScript.executeSql):
+ (InjectedScript.executeSql.errorCallback):
+ (InjectedScript.executeSql.queryTransaction):
+ * inspector/front-end/InjectedScriptAccess.js:
+ (InjectedScriptAccess._installHandler.InjectedScriptAccess.methodName):
+ (InjectedScriptAccess._installHandler):
+ * inspector/front-end/StoragePanel.js:
+ (WebInspector.StoragePanel.prototype.selectDatabase):
+ (WebInspector.StoragePanel.prototype.dataGridForResult):
+ * inspector/front-end/inspector.js:
+ (WebInspector.addDatabase):
+
+2009-10-07 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Windowless Plugins: Disable content propagation for QGraphicsView items
+
+ We cannot support content propagation for items in QGraphicsView because
+ the contents of the backing store might be transformed. So turn it off
+ if we are not painting on QWidget.
+
+ Note that this check will not work for a QWebView in a
+ QGraphicsProxyWidget, but I guess it's fine. Alternative is to do an
+ even uglier cast: static_cast painter's paintDevice() to QWidget and
+ check if it is the viewport() of QGraphicsView.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30149
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::paint):
+
+2009-10-07 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Fix the Qt build by adding the missing files to the build.
+
+ * WebCore.pro:
+
+2009-10-07 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ Fix incorrect convertion of double into int while assigning it to
+ a float.
+
+ * platform/graphics/gtk/SimpleFontDataGtk.cpp:
+ (WebCore::SimpleFontData::platformInit):
+ * platform/graphics/gtk/SimpleFontDataPango.cpp:
+ (WebCore::SimpleFontData::platformInit):
+
+2009-10-07 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ Fix rounding error issues in height calculation in 64 bits.
+
+ Already covered by existing tests.
+
+ * platform/graphics/gtk/SimpleFontDataGtk.cpp:
+ (WebCore::SimpleFontData::platformInit):
+ * platform/graphics/gtk/SimpleFontDataPango.cpp:
+ (WebCore::SimpleFontData::platformInit):
+
+2009-10-07 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Dual lines in css2.1 layout tests do not match:
+ https://bugs.webkit.org/show_bug.cgi?id=23262
+
+ Now we can put a counter node as the next sibling of a reset node.
+ Re-layout the counter content when the count is updated.
+
+ Tests: fast/css/counters/t1204-increment-00-c-o.html
+ fast/css/counters/t1204-increment-01-c-o.html
+
+ * rendering/CounterNode.cpp:
+ (WebCore::CounterNode::recount):
+ * rendering/RenderCounter.cpp:
+ (WebCore::findPlaceForCounter):
+
+2009-10-06 Xan Lopez <xlopez@igalia.com>
+
+ Try to fix the GTKbuild.
+
+ * GNUmakefile.am:
+
+2009-10-06 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Removed unused member variable from FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=30146
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::FrameLoader):
+ * loader/FrameLoader.h:
+
+2009-10-06 David Levin <levin@chromium.org>
+
+ Reviewed by NOBODY (build fix).
+
+ A few small/trivial tweaks to the last build fix.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+
+2009-10-06 David Levin <levin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Need to adjust MessagePort, etc. code for the post clone work done.
+ https://bugs.webkit.org/show_bug.cgi?id=30147
+
+ No change in functionality so no new tests.
+
+ * WebCore.gypi:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/SerializedScriptValue.h: Added.
+ A very simple implementation of SerializedScriptValue
+ that only works for strings.
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8MessageEventCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8MessagePortCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-10-06 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Brady Eidson.
+
+ Fix for <rdar://problem/7271202>
+ Dispatch resource load delegate functions for the media element.
+ Since we don't get the required callbacks from the media engine,
+ just fake the parameters to the delegate functions as best as possible.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::loadResource):
+ (WebCore::HTMLMediaElement::isSafeToLoadURL):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::willLoadMediaElementURL):
+ * loader/FrameLoader.h:
+
+2009-10-06 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by NOBODY (Build fix).
+
+ More build fixes.
+
+ * bindings/js/SerializedScriptValue.cpp:
+ (WebCore::DeserializingTreeWalker::getProperty):
+ (WebCore::TeardownTreeWalker::getProperty):
+ * bindings/js/SerializedScriptValue.h:
+ (WebCore::SerializedScriptValue::SerializedScriptValue):
+
+2009-10-06 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by NOBODY (Build fix).
+
+ Build and formatting fix.
+
+ * ForwardingHeaders/runtime/ExceptionHelpers.h: Added.
+ * bindings/js/SerializedScriptValue.cpp:
+ * bindings/js/SerializedScriptValue.h:
+ (WebCore::SerializedScriptValueData::operator bool):
+ (WebCore::SerializedScriptValueData::release):
+ (WebCore::SerializedScriptValue::release):
+ (WebCore::SerializedScriptValue::toString):
+ (WebCore::SerializedScriptValue::~SerializedScriptValue):
+ (WebCore::SerializedScriptValue::SerializedScriptValue):
+
+2009-10-05 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ It should be possible to post (clone) built-in JS objects to Workers
+ https://bugs.webkit.org/show_bug.cgi?id=22878
+
+ Implement object cloning semantics for postMessage. Currently only
+ a partial implementation of the spec -- cloning of File, FileList,
+ ImageData, and RegExp were left out as they would have significantly
+ increased patch size.
+
+ Cloning requires multiple tree walks so we use a templated tree
+ walk function, allowing us to share a single implementation for
+ serialization, deserialization, and eventual destruction of the
+ serialized object tree.
+
+ Test: fast/dom/Window/window-postmessage-clone.html
+
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::postMessage):
+ * bindings/js/JSMessageEventCustom.cpp:
+ (WebCore::JSMessageEvent::initMessageEvent):
+ * bindings/js/JSMessagePortCustom.h:
+ (WebCore::handlePostMessage):
+ * bindings/js/SerializedScriptValue.cpp: Added.
+ (WebCore::SerializedObject::set):
+ (WebCore::SerializedObject::names):
+ (WebCore::SerializedObject::values):
+ (WebCore::SerializedObject::create):
+ (WebCore::SerializedObject::clear):
+ (WebCore::SerializedObject::SerializedObject):
+ (WebCore::SerializedArray::setIndex):
+ (WebCore::SerializedArray::canDoFastRead):
+ (WebCore::SerializedArray::getIndex):
+ (WebCore::SerializedArray::getSparseIndex):
+ (WebCore::SerializedArray::length):
+ (WebCore::SerializedArray::create):
+ (WebCore::SerializedArray::clear):
+ (WebCore::SerializedArray::SerializedArray):
+ (WebCore::SerializedScriptValueData::SerializedScriptValueData):
+ (WebCore::SharedSerializedData::asArray):
+ (WebCore::SharedSerializedData::asObject):
+ (WebCore::):
+ (WebCore::walk):
+ (WebCore::BaseWalker::BaseWalker):
+ (WebCore::BaseWalker::shouldTerminate):
+ (WebCore::BaseWalker::ticksUntilNextCheck):
+ (WebCore::BaseWalker::didTimeOut):
+ (WebCore::BaseWalker::throwStackOverflow):
+ (WebCore::BaseWalker::throwInterruptedException):
+ (WebCore::SerializingTreeWalker::SerializingTreeWalker):
+ (WebCore::SerializingTreeWalker::null):
+ (WebCore::SerializingTreeWalker::isArray):
+ (WebCore::SerializingTreeWalker::isObject):
+ (WebCore::SerializingTreeWalker::asInputArray):
+ (WebCore::SerializingTreeWalker::asInputObject):
+ (WebCore::SerializingTreeWalker::createOutputArray):
+ (WebCore::SerializingTreeWalker::createOutputObject):
+ (WebCore::SerializingTreeWalker::length):
+ (WebCore::SerializingTreeWalker::canDoFastRead):
+ (WebCore::SerializingTreeWalker::getIndex):
+ (WebCore::SerializingTreeWalker::getSparseIndex):
+ (WebCore::SerializingTreeWalker::getProperty):
+ (WebCore::SerializingTreeWalker::convertIfTerminal):
+ (WebCore::SerializingTreeWalker::getPropertyNames):
+ (WebCore::SerializingTreeWalker::putIndex):
+ (WebCore::SerializingTreeWalker::putProperty):
+ (WebCore::SerializingTreeWalker::startArray):
+ (WebCore::SerializingTreeWalker::endArray):
+ (WebCore::SerializingTreeWalker::startObject):
+ (WebCore::SerializingTreeWalker::endObject):
+ (WebCore::SerializedScriptValueData::serialize):
+ (WebCore::DeserializingTreeWalker::DeserializingTreeWalker):
+ (WebCore::DeserializingTreeWalker::null):
+ (WebCore::DeserializingTreeWalker::isArray):
+ (WebCore::DeserializingTreeWalker::isObject):
+ (WebCore::DeserializingTreeWalker::asInputArray):
+ (WebCore::DeserializingTreeWalker::asInputObject):
+ (WebCore::DeserializingTreeWalker::createOutputArray):
+ (WebCore::DeserializingTreeWalker::createOutputObject):
+ (WebCore::DeserializingTreeWalker::length):
+ (WebCore::DeserializingTreeWalker::canDoFastRead):
+ (WebCore::DeserializingTreeWalker::getIndex):
+ (WebCore::DeserializingTreeWalker::getSparseIndex):
+ (WebCore::DeserializingTreeWalker::getProperty):
+ (WebCore::DeserializingTreeWalker::convertIfTerminal):
+ (WebCore::DeserializingTreeWalker::getPropertyNames):
+ (WebCore::DeserializingTreeWalker::putIndex):
+ (WebCore::DeserializingTreeWalker::putProperty):
+ (WebCore::DeserializingTreeWalker::startArray):
+ (WebCore::DeserializingTreeWalker::endArray):
+ (WebCore::DeserializingTreeWalker::startObject):
+ (WebCore::DeserializingTreeWalker::endObject):
+ (WebCore::SerializedScriptValueData::deserialize):
+ (WebCore::TeardownTreeWalker::shouldTerminate):
+ (WebCore::TeardownTreeWalker::ticksUntilNextCheck):
+ (WebCore::TeardownTreeWalker::didTimeOut):
+ (WebCore::TeardownTreeWalker::throwStackOverflow):
+ (WebCore::TeardownTreeWalker::throwInterruptedException):
+ (WebCore::TeardownTreeWalker::null):
+ (WebCore::TeardownTreeWalker::isArray):
+ (WebCore::TeardownTreeWalker::isObject):
+ (WebCore::TeardownTreeWalker::asInputArray):
+ (WebCore::TeardownTreeWalker::asInputObject):
+ (WebCore::TeardownTreeWalker::createOutputArray):
+ (WebCore::TeardownTreeWalker::createOutputObject):
+ (WebCore::TeardownTreeWalker::length):
+ (WebCore::TeardownTreeWalker::canDoFastRead):
+ (WebCore::TeardownTreeWalker::getIndex):
+ (WebCore::TeardownTreeWalker::getSparseIndex):
+ (WebCore::TeardownTreeWalker::getProperty):
+ (WebCore::TeardownTreeWalker::convertIfTerminal):
+ (WebCore::TeardownTreeWalker::getPropertyNames):
+ (WebCore::TeardownTreeWalker::putIndex):
+ (WebCore::TeardownTreeWalker::putProperty):
+ (WebCore::TeardownTreeWalker::startArray):
+ (WebCore::TeardownTreeWalker::endArray):
+ (WebCore::TeardownTreeWalker::startObject):
+ (WebCore::TeardownTreeWalker::endObject):
+ (WebCore::SerializedScriptValueData::tearDownSerializedData):
+ * bindings/js/SerializedScriptValue.h: Added.
+ (WebCore::SharedSerializedData::~SharedSerializedData):
+ (WebCore::SerializedScriptValueData::):
+ (WebCore::SerializedScriptValueData::type):
+ (WebCore::SerializedScriptValueData::~SerializedScriptValueData):
+ (WebCore::SerializedScriptValueData::SerializedScriptValueData):
+ (WebCore::SerializedScriptValueData::asImmediate):
+ (WebCore::SerializedScriptValueData::asDouble):
+ (WebCore::SerializedScriptValueData::asString):
+ (WebCore::SerializedScriptValueData::asObject):
+ (WebCore::SerializedScriptValueData::asArray):
+ (WebCore::SerializedScriptValueData::operator bool ):
+ (WebCore::SerializedScriptValueData::release):
+ (WebCore::SerializedScriptValue::create):
+ (WebCore::SerializedScriptValue::release):
+ (WebCore::SerializedScriptValue::toString):
+ (WebCore::SerializedScriptValue::deserialize):
+ (WebCore::SerializedScriptValue::~SerializedScriptValue):
+ (WebCore::SerializedScriptValue::SerializedScriptValue):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bindings/scripts/CodeGeneratorObjC.pm:
+ * dom/MessageEvent.cpp:
+ (WebCore::MessageEvent::MessageEvent):
+ (WebCore::MessageEvent::initMessageEvent):
+ * dom/MessageEvent.h:
+ (WebCore::MessageEvent::create):
+ (WebCore::MessageEvent::data):
+ * dom/MessageEvent.idl:
+ * dom/MessagePort.cpp:
+ (WebCore::MessagePort::postMessage):
+ * dom/MessagePort.h:
+ * dom/MessagePortChannel.cpp:
+ (WebCore::MessagePortChannel::EventData::create):
+ (WebCore::MessagePortChannel::EventData::EventData):
+ * dom/MessagePortChannel.h:
+ (WebCore::MessagePortChannel::EventData::message):
+ * page/DOMWindow.cpp:
+ (WebCore::PostMessageTimer::PostMessageTimer):
+ (WebCore::DOMWindow::postMessage):
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl:
+ * page/EventSource.cpp:
+ (WebCore::EventSource::createMessageEvent):
+ * websockets/WebSocket.cpp:
+ (WebCore::WebSocket::didReceiveMessage):
+ * workers/DedicatedWorkerContext.cpp:
+ (WebCore::DedicatedWorkerContext::postMessage):
+ * workers/DedicatedWorkerContext.h:
+ * workers/DedicatedWorkerContext.idl:
+ * workers/Worker.cpp:
+ (WebCore::Worker::postMessage):
+ * workers/Worker.h:
+ * workers/Worker.idl:
+ * workers/WorkerContextProxy.h:
+ * workers/WorkerMessagingProxy.cpp:
+ (WebCore::MessageWorkerContextTask::create):
+ (WebCore::MessageWorkerContextTask::MessageWorkerContextTask):
+ (WebCore::MessageWorkerTask::create):
+ (WebCore::MessageWorkerTask::MessageWorkerTask):
+ (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
+ (WebCore::WorkerMessagingProxy::postMessageToWorkerContext):
+ * workers/WorkerMessagingProxy.h:
+ * workers/WorkerObjectProxy.h:
+
+2009-10-06 Adam Barth <abarth@webkit.org>
+
+ Unreviewed build fix for Windows.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::load):
+
+2009-10-06 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move FrameLoader::canLoad to SecurityOrigin
+ https://bugs.webkit.org/show_bug.cgi?id=30111
+
+ * WebCore.base.exp:
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::isSafeToLoadURL):
+ * loader/Cache.cpp:
+ (WebCore::Cache::requestResource):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadSubframe):
+ (WebCore::FrameLoader::loadPlugin):
+ (WebCore::FrameLoader::loadFrameRequest):
+ (WebCore::FrameLoader::loadResourceSynchronously):
+ (WebCore::FrameLoader::createJavaAppletWidget):
+ * loader/FrameLoader.h:
+ * loader/SubresourceLoader.cpp:
+ (WebCore::SubresourceLoader::create):
+ * page/SecurityOrigin.cpp:
+ (WebCore::SecurityOrigin::canLoad):
+ (WebCore::SecurityOrigin::shouldHideReferrer):
+ * page/SecurityOrigin.h:
+
+2009-10-06 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move setLocalLoadPolicy and friends to SecurityOrigin
+ https://bugs.webkit.org/show_bug.cgi?id=30110
+
+ These have more to do with security policies than with loading frames.
+
+ * WebCore.base.exp:
+ * dom/Document.cpp:
+ (WebCore::Document::initSecurityContext):
+ * loader/Cache.cpp:
+ (WebCore::Cache::requestResource):
+ * loader/FrameLoader.cpp:
+ * loader/FrameLoader.h:
+ * loader/SubresourceLoader.cpp:
+ (WebCore::SubresourceLoader::create):
+ * page/SecurityOrigin.cpp:
+ (WebCore::SecurityOrigin::setLocalLoadPolicy):
+ (WebCore::SecurityOrigin::restrictAccessToLocal):
+ (WebCore::SecurityOrigin::allowSubstituteDataAccessToLocal):
+ * page/SecurityOrigin.h:
+ (WebCore::SecurityOrigin::):
+
+2009-10-06 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ Preparation for <http://webkit.org/b/30104>.
+ Inspector should show cookies of sub-resources on the page.
+
+ Implement getRawCookies for CFNetwork for Windows, so we can see more
+ than just a key/value pair for Cookies when we are on Windows.
+
+ * platform/network/win/CookieJarCFNetWin.cpp:
+ (WebCore::getRawCookies):
+
+2009-10-06 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30132, make beforeload work with <link> elements and
+ XML processing instructions.
+
+ Fix up ProcessingInstruction's setData call so that it actually updates a stylesheet when the
+ data gets changed.
+
+ Move dispatchBeforeLoadedEvent to ContainerNode so all Elements (and ProcessingInstruction) can
+ access it.
+
+ Added fast/dom/beforeload/link-before-load.html
+
+ * dom/ContainerNode.cpp:
+ (WebCore::ContainerNode::dispatchBeforeLoadEvent):
+ * dom/ContainerNode.h:
+ * dom/ProcessingInstruction.cpp:
+ (WebCore::ProcessingInstruction::checkStyleSheet):
+ (WebCore::ProcessingInstruction::setData):
+ * dom/ScriptElement.cpp:
+ (WebCore::ScriptElementData::requestScript):
+ * dom/ScriptElement.h:
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::XMLTokenizer::endElementNs):
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::parseMappedAttribute):
+ (WebCore::HTMLLinkElement::process):
+ * html/HTMLScriptElement.cpp:
+ (WebCore::HTMLScriptElement::forAttributeValue):
+ * html/HTMLScriptElement.h:
+ * svg/SVGScriptElement.cpp:
+ * svg/SVGScriptElement.h:
+
+2009-10-06 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ accessibility/media-element.html crashes (and has incorrect result)
+ https://bugs.webkit.org/show_bug.cgi?id=30108
+
+ Fix up the accessibilty label for the newly added fullscreen button,
+ and update the test result accordingly.
+
+ * accessibility/AccessibilityMediaControls.cpp:
+ (WebCore::AccessibilityMediaControl::controlTypeName):
+
+2009-10-06 Kelly Norton <knorton@google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=30028>
+ Multiple calls to SetFrontendProxyObject can leave an InspectorTimelineAgent with an invalid
+ InspectorFrontend.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::setFrontendProxyObject): Adds a check for an existing timeline agent.
+
+2009-10-06 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Dave Kilzer.
+
+ Move textRects to the right category in DOM.mm. Include DOMPrivate.h to ensure that the interfaces match.
+
+ * bindings/objc/DOM.mm:
+ (-[DOMNode textRects]):
+
+2009-10-06 Benjamin C Meyer <bmeyer@rim.com>
+
+ Reviewed by Ariya Hidayat.
+
+ Match the behavior of other WebKit browser and have the first url of the drag data be the url passed in declareAndWriteDragImage and set the text of the drag data to be the title argument.
+
+ Manual test: Drag the readability js link from http://lab.arc90.com/experiments/readability/
+
+ * platform/qt/ClipboardQt.cpp:
+ (WebCore::ClipboardQt::declareAndWriteDragImage):
+
+2009-10-06 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Implement min/max attributes, ValidityState.rangeUnderflow and
+ ValidityState.rangeOverflow for <input type=number> and <input type=range>
+ https://bugs.webkit.org/show_bug.cgi?id=29069
+
+ HTMLInputElement::max and min are not defined for COM because they
+ conflict with the standard min() and max() macros.
+
+ Tests: fast/forms/ValidityState-rangeOverflow-number.html
+ fast/forms/ValidityState-rangeOverflow-range.html
+ fast/forms/ValidityState-rangeUnderflow-number.html
+ fast/forms/ValidityState-rangeUnderflow-range.html
+ fast/forms/input-minmax.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::rangeUnderflow):
+ (WebCore::HTMLInputElement::rangeOverflow):
+ (WebCore::HTMLInputElement::rangeMinimum):
+ (WebCore::HTMLInputElement::rangeMaximum):
+ * html/HTMLInputElement.h:
+ * html/HTMLInputElement.idl:
+ * html/ValidityState.cpp:
+ (WebCore::ValidityState::rangeUnderflow):
+ (WebCore::ValidityState::rangeOverflow):
+ * html/ValidityState.h:
+ * rendering/RenderSlider.cpp:
+ (WebCore::SliderRange::SliderRange):
+ (WebCore::SliderRange::valueFromElement):
+
+2009-10-06 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move m_openedByDOM to Page
+ https://bugs.webkit.org/show_bug.cgi?id=30109
+
+ We only need one instance of m_openedByDOM per page, we should move it
+ to a page-scoped object. Notice that it's only ever touched for the
+ main frame.
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::createWindow):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::createWindow):
+ * loader/FrameLoader.cpp:
+ * loader/FrameLoader.h:
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::close):
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ (WebCore::Page::openedByDOM):
+ (WebCore::Page::setOpenedByDOM):
+ * page/Page.h:
+
+2009-10-06 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Some functions in GraphicsContext do not work
+ as expected if the associated painter has no clipping.
+ https://bugs.webkit.org/show_bug.cgi?id=29691
+
+ No new tests are associated with this because DumpRenderTree
+ always sets clipping on the painter, thus it would never hit
+ the test case, but fast/box-shadow/basic-shadows.html is a
+ good example of what happens if the clipping is not set by
+ the user of QtWebKit.
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::clipOut):
+ (WebCore::GraphicsContext::clipOutEllipseInRect):
+ Fixed to handle the case that there is no clipping
+ before the call.
+
+2009-10-06 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30131, make beforeload fire on script elements.
+
+ Added tests in fast/dom/beforeload/.
+
+ * dom/ScriptElement.cpp:
+ (WebCore::ScriptElementData::requestScript):
+ * dom/ScriptElement.h:
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::XMLTokenizer::endElementNs):
+ * html/HTMLAttributeNames.in:
+ * html/HTMLScriptElement.cpp:
+ (WebCore::HTMLScriptElement::parseMappedAttribute):
+ (WebCore::HTMLScriptElement::dispatchBeforeLoadEvent):
+ * html/HTMLScriptElement.h:
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::scriptHandler):
+ * svg/SVGScriptElement.cpp:
+ (WebCore::SVGScriptElement::dispatchBeforeLoadEvent):
+ * svg/SVGScriptElement.h:
+
+2009-10-06 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25526
+ [Gtk] Additional support is needed for caret browsing
+
+ Enable caret movement commands also when caret browsing setting is
+ enabled.
+
+ * editing/EditorCommand.cpp:
+ (WebCore::caretBrowsingEnabled):
+ (WebCore::enabledVisibleSelectionOrCaretBrowsing):
+ (WebCore::enabledInEditableTextOrCaretBrowsing):
+ (WebCore::CommandEntry::):
+ * manual-tests/gtk/caret-browsing.html: Added.
+
+2009-10-06 Anton Muhin <antonm@chromium>
+
+ Reviewed by Dimitri Glazkov.
+
+ Non standard, but popular exetension allows automagically
+ turn a function into a namespace resolver. Support that in
+ Chromium as well.
+
+ Adjust CodeGeneratorV8 to treat XPathNSResolver in a special way.
+ https://bugs.webkit.org/show_bug.cgi?id=30128
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8DOMWrapper.h:
+ (WebCore::V8DOMWrapper::getXPathNSResolver):
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-10-06 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: close inspector client view on
+ InspectorController::close API call.
+
+ In order to run batch web inspector layout tests (and not affect
+ subsequent tests) we should close inspector client's view upon
+ InspectorController::close API call.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30009
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::inspectedPageDestroyed):
+ (WebCore::InspectorController::close):
+
+2009-10-06 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Fix the Qt/Windows build by stubbing out the still image
+ support for halted plugins for the Qt build.
+
+ Bugzilla entry https://bugs.webkit.org/show_bug.cgi?id=30130
+ tracks removing this by implementing Frame::nodeImage().
+
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::halt):
+
+2009-10-05 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Change QImageReader usage in ImageDecoderQt
+ https://bugs.webkit.org/show_bug.cgi?id=27538
+
+ Replace the ReadContext with another appoach to
+ reading the image. Attempt to only read meta information
+ like the image size and number of frames (for animations)
+ first and then when the page is getting drawn decode
+ the image with the QImageReader.
+
+ This is a huge benefit on pages with many images and saves
+ ~2GB of memory on the szeged image test page.
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::ImageDecoderQt):
+ (WebCore::ImageDecoderQt::setData):
+ (WebCore::ImageDecoderQt::isSizeAvailable):
+ (WebCore::ImageDecoderQt::frameCount):
+ (WebCore::ImageDecoderQt::repetitionCount):
+ (WebCore::ImageDecoderQt::filenameExtension):
+ (WebCore::ImageDecoderQt::frameBufferAtIndex):
+ (WebCore::ImageDecoderQt::clearFrameBufferCache):
+ (WebCore::ImageDecoderQt::internalDecodeSize):
+ (WebCore::ImageDecoderQt::internalReadImage):
+ (WebCore::ImageDecoderQt::internalHandleCurrentImage):
+ (WebCore::ImageDecoderQt::forceLoadEverything):
+ (WebCore::ImageDecoderQt::failRead):
+ * platform/graphics/qt/ImageDecoderQt.h:
+
+2009-10-05 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Make use of RGBA32Buffer in ImageDecoderQt
+ https://bugs.webkit.org/show_bug.cgi?id=27538
+
+ Use the RGBA32Buffer instead of the internal ImageData
+ to be able to use support of the base class, optionally
+ support WebCore decoders for Qt and most importantly
+ separate metadata and image data for better cache control.
+
+ Remove ImageSourceQt as everything is now shared with
+ the normal ImageSource.
+
+ Change the ownership of the NativeImagePtr/QPixmap in
+ ImageQt.cpp to delete the m_frame to be subject to cache
+ control.
+
+ * WebCore.pro:
+ * platform/graphics/ImageSource.cpp:
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::ReadContext::ReadContext):
+ (WebCore::ImageDecoderQt::ReadContext::read):
+ (WebCore::ImageDecoderQt::ReadContext::readImageLines):
+ (WebCore::ImageDecoderQt::ImageDecoderQt):
+ (WebCore::ImageDecoderQt::setData):
+ (WebCore::ImageDecoderQt::frameCount):
+ (WebCore::ImageDecoderQt::frameBufferAtIndex):
+ (WebCore::ImageDecoderQt::clearFrameBufferCache):
+ * platform/graphics/qt/ImageDecoderQt.h:
+ * platform/graphics/qt/ImageSourceQt.cpp: Removed.
+ * platform/image-decoders/ImageDecoder.h:
+ (WebCore::RGBA32Buffer::decodedImage):
+ (WebCore::RGBA32Buffer::getAddr):
+ * platform/image-decoders/qt/RGBA32BufferQt.cpp: Added.
+ (WebCore::RGBA32Buffer::RGBA32Buffer):
+ (WebCore::RGBA32Buffer::setDecodedImage):
+ (WebCore::RGBA32Buffer::clear):
+ (WebCore::RGBA32Buffer::zeroFill):
+ (WebCore::RGBA32Buffer::copyBitmapData):
+ (WebCore::RGBA32Buffer::setSize):
+ (WebCore::RGBA32Buffer::asNewNativeImage):
+ (WebCore::RGBA32Buffer::hasAlpha):
+ (WebCore::RGBA32Buffer::setHasAlpha):
+ (WebCore::RGBA32Buffer::setStatus):
+ (WebCore::RGBA32Buffer::operator=):
+ (WebCore::RGBA32Buffer::width):
+ (WebCore::RGBA32Buffer::height):
+
+2009-10-05 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] ImageDecoderQt avoid QString creation.
+ https://bugs.webkit.org/show_bug.cgi?id=27538
+
+ Avoid going from CString to QString to String
+ and go directly from CString to String. Also
+ avoid going to lower case to avoid an extra
+ memory allocation.
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoder::create):
+ (WebCore::ImageDecoderQt::ImageDecoderQt):
+ * platform/graphics/qt/ImageDecoderQt.h:
+
+2009-10-05 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Cleanup the ImageDecoder of Qt.
+ https://bugs.webkit.org/show_bug.cgi?id=27538
+
+ Remove the various enums for partial load. The fact is
+ that this image decoder will decode everything that is
+ in the file at once. Make it look like it behaves to
+ ease fixing this core problem.
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::ImageData::ImageData):
+ (WebCore::ImageDecoderQt::ReadContext::ReadContext):
+ (WebCore::ImageDecoderQt::ReadContext::read):
+ (WebCore::ImageDecoderQt::ReadContext::readImageLines):
+ (WebCore::ImageDecoderQt::hasFirstImageHeader):
+ (WebCore::ImageDecoderQt::setData):
+ * platform/graphics/qt/ImageDecoderQt.h:
+
+2009-10-04 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Reimplement instead of overload frameCount in ImageDecoderQt.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=27538
+
+ Reimplement frameCount instead of overloading it.
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::frameCount):
+ * platform/graphics/qt/ImageDecoderQt.h:
+
+2009-10-04 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] QImageReader does not support progressive reading
+ https://bugs.webkit.org/show_bug.cgi?id=27538
+
+ Change the ImageDecoderQt::setData to store the encoded
+ data in ImageDecoder.
+
+ Only call ReadContext when the whole Resource has been
+ loaded to avoid needless calls to reset and the
+ ReadContext as progressive loading is not supported.
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::setData):
+ * platform/graphics/qt/ImageDecoderQt.h:
+
+2009-10-04 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Remove dead code from ImageDecoderQt
+ https://bugs.webkit.org/show_bug.cgi?id=27538
+
+ Remove unused variables and debugging code. The debug
+ code has never been used and does not provide anything
+ useful.
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::ReadContext::read):
+ (WebCore::ImageDecoderQt::ReadContext::readImageLines):
+ (WebCore::ImageDecoderQt::setData):
+ (WebCore::ImageDecoderQt::isSizeAvailable):
+ (WebCore::ImageDecoderQt::frameCount):
+ (WebCore::ImageDecoderQt::repetitionCount):
+ (WebCore::ImageDecoderQt::filenameExtension):
+ (WebCore::ImageDecoderQt::imageAtIndex):
+
+2009-10-06 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] segfault when calling gst_video_format_parse_caps in the video sink
+ https://bugs.webkit.org/show_bug.cgi?id=30120
+
+ Fix use of gst_video_format_parse_caps()
+
+ * platform/graphics/gtk/VideoSinkGStreamer.cpp:
+ (webkit_video_sink_idle_func):
+
+2009-10-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Update mediaControls CSS
+
+ * css/mediaControlsQt.css:
+
+2009-10-06 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Get rid of Preferences.ignoreWhitespace.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30092
+
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMAgent):
+ (WebInspector.DOMAgent.prototype._childNodeCountUpdated):
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeOutline.prototype.update):
+ (WebInspector.ElementsTreeElement):
+ (WebInspector.ElementsTreeElement.prototype.onpopulate):
+ (WebInspector.ElementsTreeElement.prototype._updateChildren.updateChildrenOfNode):
+ (WebInspector.ElementsTreeElement.prototype._updateChildren):
+ * inspector/front-end/TextPrompt.js:
+ (WebInspector.TextPrompt.prototype.isCaretAtEndOfPrompt):
+ * inspector/front-end/inspector.js:
+ * inspector/front-end/utilities.js:
+ (Node.prototype.rangeOfWord):
+ (traverseNextNode):
+ (traversePreviousNode):
+ (onlyTextChild):
+
+2009-10-06 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Do not call nodeTitleInfo twice +
+ followup fixes for r49101.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30087
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement):
+
+2009-10-06 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Windowless plugins: Enable painting on printer.
+
+ The print preview dialog crashed because the depth of the drawable
+ changed owing to a bug in Qt - if you draw onto a 32-bit pixmap,
+ and set a 24-bit pixmap as source, it will convert the source to
+ 32-bit.
+
+ 1210fa5b2d65895ad2be1f9ca7cae586e3b29dc1 is the bug fix in Qt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=20081
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::paint):
+
+2009-10-06 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Windowless plugins: Make painting and events work when page is zoomed.
+
+ The element gets resized when zoomed. So, we have to make sure that we resize
+ the drawable and do a setwindow call. Multiple calls to setwindow do not
+ crash plugin in windowless mode (unlike in windowed mode).
+
+ For mouse events we have to convert the pos to post-zoom position.
+
+ https://bugs.webkit.org/show_bug.cgi?id=20081
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::setXButtonEventSpecificFields):
+ (WebCore::setXMotionEventSpecificFields):
+ (WebCore::setXCrossingEventSpecificFields):
+ (WebCore::PluginView::handleMouseEvent):
+ (WebCore::PluginView::setNPWindowIfNeeded):
+
+2009-10-06 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Windowless plugins: Add PluginQuirkRequiresDefaultScreenDepth quirk for Flash.
+
+ Flash does not use the visual provided by us to draw into the drawable.
+ It instead uses the system default visual (as returned by XDefaultVisual).
+ This means that if the screen default visual is 24-bit, Flash won't be
+ able to draw on 32-bit drawable created by us. This is a bug in Flash
+ and for the moment, the above quirk is only set for Flash.
+
+ Our strategy to create the drawable:
+ 1. Create a 32-bit drawable if the default screen depth is 32 or the
+ quirk is not set (i.e not flash)
+ 2. If we didn't create a 32-bit drawable (maybe the Display has no such
+ visual), we create a drawable with default screen depth.
+
+ As a result of the above changes, content propagation behavior changes as:
+ 1. Content propagation is possible only if the drawable we create and
+ Qt's backing store are of the same depth.
+ 2. If we created a 32-bit drawable, there is no need for content
+ propagation (Qt will take care of it).
+
+ https://bugs.webkit.org/show_bug.cgi?id=20081
+
+ * plugins/PluginPackage.cpp:
+ (WebCore::PluginPackage::determineQuirks):
+ * plugins/PluginQuirkSet.h:
+ (WebCore::):
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::PluginView):
+ * plugins/PluginView.h:
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::paint):
+ (WebCore::getVisualAndColormap):
+ (WebCore::PluginView::platformStart):
+ (WebCore::PluginView::platformDestroy):
+
+2009-10-06 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Qt build fix.
+ https://bugs.webkit.org/show_bug.cgi?id=29362.
+
+ In Qt 4.5, a new function QPainter::fillRect(QRect, QColor) is
+ introduced to avoid the expensive construction of QBrush.
+ By casting WebCore::Color to QColor, we can compile on Qt 4.4
+ and use optimization for solid color fill in Qt 4.5.
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::drawRect):
+ (WebCore::GraphicsContext::drawLine):
+ (WebCore::drawBorderlessRectShadow):
+
+2009-10-05 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Eric Carlson.
+
+ Allow the platform media player to know the <video> poster URL.
+ Add MediaPlayerPrivate::prepareToPlay() to support media engines
+ that do not buffer video data automatically. This method allows
+ such media engines to start the buffering just before starting
+ playback.
+ https://bugs.webkit.org/show_bug.cgi?id=29133
+
+ All platforms that currently implement <video> return false
+ in MediaPlayerPrivate::canLoadPoster() and do nothing in
+ MediaPlayerPrivate::prepareToPlay() their behavior is
+ unchanged. The current set of media test should then be
+ sufficient to guarantee that this patch does not break anything.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::loadResource):
+ After the MediaPlayer is created, inform it what the poster URL is.
+ (WebCore::HTMLMediaElement::updatePlayState):
+ Add another case where prepareToPlay is called for the platforms
+ that do not buffer video content automatically.
+ (WebCore::HTMLMediaElement::couldPlayIfEnoughData)
+ Same as potentiallyPlaying, except that we don't check for
+ the readyState being at least HAVE_FUTURE_DATA.
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::NullMediaPlayerPrivate::canLoadPoster):
+ Empty implementation for the NullMediaPlayerPrivate.
+ (WebCore::NullMediaPlayerPrivate::setPoster):
+ Empty implementation for the NullMediaPlayerPrivate.
+ (WebCore::MediaPlayer::canLoadPoster):
+ Proxy to the m_private.
+ (WebCore::MediaPlayer::setPoster):
+ Proxy to m_private.
+ * platform/graphics/MediaPlayer.h:
+ * platform/graphics/MediaPlayerPrivate.h:
+ (WebCore::MediaPlayerPrivateInterface::canLoadPoster):
+ (WebCore::MediaPlayerPrivateInterface::setPoster):
+ Add new methods that allow the platform player to receive the poster URL.
+ (WebCore::MediaPlayerPrivateInterface::prepareToPlay):
+ Notifies the media engine that playback should start. The media engine
+ should start preparing (e.g. by initializing the player and starting to buffer)
+ and call back when the state is changed to HAVE_FUTURE_DATA.
+
+2009-10-06 David Levin <levin@chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ StringImpl needs a method to get an instance for another thread which doesn't copy the underlying buffer.
+ https://bugs.webkit.org/show_bug.cgi?id=30095
+
+ All String::copy methods were changed to call either threadsafeCopy or crossThreadString. The method
+ call was made threadsafeCopy unless I could show that threadsafety wasn't needed.
+
+ No visible change in functionality so no new tests.
+
+ * dom/MessagePortChannel.cpp:
+ (WebCore::MessagePortChannel::EventData::EventData):
+ * loader/WorkerThreadableLoader.cpp:
+ (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
+ * loader/icon/IconDatabase.cpp:
+ (WebCore::IconDatabase::open):
+ (WebCore::IconDatabase::iconForPageURL):
+ (WebCore::IconDatabase::iconURLForPageURL):
+ (WebCore::IconDatabase::retainIconForPageURL):
+ (WebCore::IconDatabase::releaseIconForPageURL):
+ (WebCore::IconDatabase::setIconDataForIconURL):
+ (WebCore::IconDatabase::setIconURLForPageURL):
+ (WebCore::IconDatabase::databasePath):
+ (WebCore::IconDatabase::defaultDatabaseFilename):
+ * page/SecurityOrigin.cpp:
+ (WebCore::SecurityOrigin::SecurityOrigin): Since this is used by SecurityOrigin::threadsafeCopy,
+ it makes threadsafe calls.
+ (WebCore::SecurityOrigin::threadsafeCopy): The only place that called this
+ needed a threadsafe method.
+ * page/SecurityOrigin.h:
+ * platform/CrossThreadCopier.cpp:
+ (WebCore::::copy):
+ * platform/KURL.cpp:
+ (WebCore::KURL::copy):
+ * platform/network/HTTPHeaderMap.cpp:
+ (WebCore::HTTPHeaderMap::copyData):
+ * platform/network/ResourceErrorBase.cpp:
+ (WebCore::ResourceErrorBase::copy):
+ * platform/network/ResourceRequestBase.cpp:
+ (WebCore::ResourceRequestBase::copyData):
+ * platform/network/ResourceResponseBase.cpp:
+ (WebCore::ResourceResponseBase::copyData):
+ * platform/sql/SQLValue.cpp:
+ (WebCore::SQLValue::SQLValue):
+ (WebCore::SQLValue::string):
+ * platform/sql/SQLValue.h:
+ (WebCore::SQLValue::SQLValue):
+ All constructors now initialize the m_number which is a double. Failure to
+ do so can result in unexpected crashes when it is copied in the copy constructor.
+ See http://blogs.msdn.com/oldnewthing/archive/2008/07/02/8679191.aspx, I was that colleague.
+ * platform/text/PlatformString.h:
+ * platform/text/String.cpp:
+ (WebCore::String::threadsafeCopy):
+ (WebCore::String::crossThreadString):
+ * platform/text/StringImpl.cpp:
+ Removed StringImpl::substringCopy which was no longer being used anywhere.
+ (WebCore::StringImpl::threadsafeCopy): Changed the name to indicate that
+ it is threadsafe.
+ (WebCore::StringImpl::crossThreadString): The way to get strings for
+ another thread which is not threadsafe. This shares the underlying buffer
+ with both strings and gives them a way to do threadsafe refcounting for it.
+ * platform/text/StringImpl.h:
+ * storage/ChangeVersionWrapper.cpp:
+ (WebCore::ChangeVersionWrapper::ChangeVersionWrapper):
+ * storage/Database.cpp:
+ (WebCore::updateGuidVersionMap):
+ (WebCore::Database::Database):
+ (WebCore::Database::getVersionFromDatabase):
+ (WebCore::Database::setVersionInDatabase):
+ (WebCore::Database::version):
+ (WebCore::Database::setExpectedVersion):
+ (WebCore::Database::securityOriginCopy):
+ (WebCore::Database::stringIdentifier):
+ * storage/DatabaseTracker.cpp:
+ (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
+ * storage/OriginQuotaManager.cpp:
+ (WebCore::OriginQuotaManager::addDatabase):
+ * storage/SQLError.h:
+ (WebCore::SQLError::message):
+ (WebCore::SQLError::SQLError):
+ * storage/SQLStatement.cpp:
+ (WebCore::SQLStatement::SQLStatement):
+ * storage/StorageAreaSync.cpp:
+ (WebCore::StorageAreaSync::syncTimerFired):
+ * storage/StorageMap.cpp:
+ (WebCore::StorageMap::importItem):
+ * storage/StorageNamespaceImpl.cpp:
+ (WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
+ * storage/StorageSyncManager.cpp:
+ (WebCore::StorageSyncManager::StorageSyncManager):
+ * workers/DefaultSharedWorkerRepository.cpp:
+ (WebCore::SharedWorkerProxy::url): Do the copy of the url in a way that is threadsafe.
+ (WebCore::SharedWorkerProxy::name):
+ (WebCore::SharedWorkerProxy::SharedWorkerProxy):
+ (WebCore::DefaultSharedWorkerRepository::getProxy): Do the copy of the url in a way that is threadsafe.
+ * workers/SharedWorkerThread.cpp:
+ (WebCore::SharedWorkerThread::SharedWorkerThread):
+ * workers/WorkerMessagingProxy.cpp:
+ (WebCore::MessageWorkerContextTask::MessageWorkerContextTask):
+ (WebCore::MessageWorkerTask::MessageWorkerTask):
+ (WebCore::WorkerExceptionTask::WorkerExceptionTask):
+ * workers/WorkerRunLoop.cpp:
+ (WebCore::WorkerRunLoop::Task::Task):
+ (WebCore::WorkerRunLoop::postTaskForMode):
+ * workers/WorkerThread.cpp:
+ (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
+
+2009-10-06 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Windowless plugins: Use X Pixmap instead of QPixmap.
+
+ This has the following advantages:
+ 1. Allows more sharing of code between gtk and Qt ports in the future
+ 2. QPixmap creates 24-bit by default. We have to later 'upgrade' it to 32-bit.
+ 3. QPixmap may sometime change depth behind our back! This will require us to
+ update the plugin about the new visual and colormap.
+ 4. We cannot ensure that QPixmap is backed by a X Drawable. For example, with
+ -graphicssystem raster, QPixmap uses the raster (image) backend.
+
+ https://bugs.webkit.org/show_bug.cgi?id=20081
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::PluginView):
+ * plugins/PluginView.h:
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::paint):
+ (WebCore::PluginView::platformDestroy):
+
+2009-10-06 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Add support for windowless NPAPI plugins
+
+ https://bugs.webkit.org/show_bug.cgi?id=20081
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::setFrameRect):
+ (WebCore::PluginView::handleEvent):
+ (WebCore::PluginView::PluginView):
+ * plugins/PluginView.h:
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::paint):
+ (WebCore::PluginView::dispatchNPEvent):
+ (WebCore::setSharedXEventFields):
+ (WebCore::PluginView::initXEvent):
+ (WebCore::setXKeyEventSpecificFields):
+ (WebCore::PluginView::handleKeyboardEvent):
+ (WebCore::inputEventState):
+ (WebCore::setXButtonEventSpecificFields):
+ (WebCore::setXMotionEventSpecificFields):
+ (WebCore::setXCrossingEventSpecificFields):
+ (WebCore::PluginView::handleMouseEvent):
+ (WebCore::PluginView::handleFocusInEvent):
+ (WebCore::PluginView::handleFocusOutEvent):
+ (WebCore::PluginView::setNPWindowRect):
+ (WebCore::PluginView::setNPWindowIfNeeded):
+ (WebCore::PluginView::getValueStatic):
+ (WebCore::PluginView::invalidateRect):
+ (WebCore::PluginView::invalidateRegion):
+ (WebCore::PluginView::forceRedraw):
+ (WebCore::getPluginDisplay):
+ (WebCore::PluginView::platformStart):
+
+2009-10-05 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVG Filters do not support source images besides "sourceGraphic"
+ [https://bugs.webkit.org/show_bug.cgi?id=6022]
+
+ Add support for SourceAlpha to SVG filters.
+
+ Test: svg/filters/sourceAlpha.svg
+
+ * platform/graphics/filters/SourceAlpha.cpp:
+ (WebCore::SourceAlpha::calculateEffectRect):
+ (WebCore::SourceAlpha::apply):
+ * platform/graphics/filters/SourceAlpha.h:
+
+2009-10-05 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fix reliablity bot crash in DateExtension.
+ https://bugs.webkit.org/show_bug.cgi?id=30033
+
+ There were a few problems using the weak persistent pointers because no one else had a
+ handle to them. The new approach stores them as a hidden value on the Date constructor.
+
+ * bindings/v8/DateExtension.cpp:
+ (WebCore::DateExtension::setAllowSleep):
+ (WebCore::DateExtension::GetNativeFunction):
+ (WebCore::DateExtension::Setup):
+ (WebCore::DateExtension::OnSleepDetected):
+ * bindings/v8/DateExtension.h:
+ * bindings/v8/V8HiddenPropertyName.cpp:
+ (WebCore::V8HiddenPropertyName::sleepFunction):
+ * bindings/v8/V8HiddenPropertyName.h:
+
+2009-10-05 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Crash when trying to load a null stylesheet for a site specific hack.
+ https://bugs.webkit.org/show_bug.cgi?id=30105
+
+ Created a testcase and tested in browser. DRT doesn't test
+ site specific hacks.
+
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::setCSSStyleSheet):
+
+2009-10-05 James Robinson <jamesr@google.com>
+
+ Reviewed by Darin Adler.
+
+ Fix forward declaration (struct vs class mismatch)
+
+ https://bugs.webkit.org/show_bug.cgi?id=30094
+
+ * loader/RedirectScheduler.h:
+
+2009-10-05 Julie Parent <jparent@chromium.org>
+
+ Unreviewed, last Chromium build fix corresponding to revision 49113.
+ Add include for BeforeLoadEvent to DOMObjectsInclude.h.
+
+ * bindings/v8/DOMObjectsInclude.h:
+
+2009-10-05 Simon Fraser <simon.fraser@apple.com>
+
+ Fix Windows build.
+
+ * html/HTMLMediaElement.cpp:
+
+2009-10-05 Simon Fraser <simon.fraser@apple.com>
+
+ Fix the build: MediaControllerThemeQT was renamed to MediaControllerThemeQuickTime.
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::shouldRenderMediaControlPart):
+
+2009-10-05 Pierre d'Herbemont <pdherbemont@webkit.org>
+
+ Reviewed by Simon Fraser
+
+ Support fullscreen in MediaPlayer (Mac)
+ https://bugs.webkit.org/show_bug.cgi?id=26742
+
+ Add a fullscreen button to the <video> controller if the media engine,
+ and the theme have support for fullscreen, and can show appropriate controls.
+ Clicking the button calls through the ChromeClient to the WebVideoFullscreenController
+ in WebKit to do a nice animation to fullscreen, with a custom controller.
+
+ * DerivedSources.make:
+ * WebCore.Video.exp: Added.
+ New export file for when VIDEO is enabled.
+
+ * WebCore.base.exp: Export WebCore::HTMLNames::videoTag
+ * WebCore.xcodeproj/project.pbxproj: New files
+
+ * html/HTMLMediaElement.h:
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::HTMLMediaElement):
+ (WebCore::HTMLMediaElement::willRemove):
+ (WebCore::HTMLMediaElement::screenRect):
+ (WebCore::HTMLMediaElement::enterFullscreen):
+ (WebCore::HTMLMediaElement::exitFullscreen):
+ (WebCore::HTMLMediaElement::platformMedia):
+ Add fullscreen logic. platformMedia returns a pointer to platform-specific playback data
+ used for fullscreen.
+
+ * html/HTMLVideoElement.h:
+ * html/HTMLVideoElement.cpp:
+ (WebCore::HTMLVideoElement::supportsFullscreen): Check with both the player and the ChromeClient
+ to see if it's possile to enter fullscreen for this element.
+
+ * page/ChromeClient.h:
+ (WebCore::ChromeClient::supportsFullscreenForNode):
+ (WebCore::ChromeClient::enterFullscreenForNode):
+ (WebCore::ChromeClient::exitFullscreenForNode):
+ New methods
+
+ * platform/graphics/MediaPlayer.h:
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::NullMediaPlayerPrivate::platformMedia):
+ (WebCore::MediaPlayer::platformMedia):
+ * platform/graphics/MediaPlayerPrivate.h:
+ (WebCore::MediaPlayerPrivateInterface::platformMedia):
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::platformMedia):
+ (WebCore::MediaPlayerPrivate::supportsFullscreen):
+ New methods to return platform-specific playback data for fullscreen.
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
+ Hook up the fullscreen button.
+ * rendering/RenderThemeMac.h:
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::shouldRenderMediaControlPart):
+ Allow the RenderThemeMac to make a decision about the availability of fullscreen based
+ on the QuickTime version, since this affects what controls are availabl.e
+
+2009-10-05 Kevin Decker <kdecker@apple.com>
+
+ Export a few more methods from Settings.h
+
+ Rubberstamped by Jon Honeycutt.
+
+ * WebCore.base.exp:
+
+2009-10-05 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ 1-char fix for obviously reverse condition.
+ https://bugs.webkit.org/show_bug.cgi?id=30100
+ No test since the only difference is a timing of GC.
+
+ * bindings/js/ScriptCachedFrameData.cpp:
+ (WebCore::ScriptCachedFrameData::clear): Revert condition. Almost a typo.
+
+2009-09-30 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Update platform-specific #ifdefs in GraphicsContext3D.h for the
+ Chromium port.
+ https://bugs.webkit.org/show_bug.cgi?id=29936
+
+ * platform/graphics/GraphicsContext3D.h:
+ Changed #if PLATFORM(SKIA) to #if PLATFORM(CHROMIUM).
+
+2009-10-05 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (r47440): Inserting text in the middle of content in a scrolled textfield results in painting bugs
+ <rdar://problem/7269108>
+ https://bugs.webkit.org/show_bug.cgi?id=29982
+
+ Test: fast/repaint/line-in-scrolled-clipped-block.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::layoutBlock): Use the unclipped overflow rect
+ (including layout overflow) for the repaint rect calculation.
+
+2009-10-05 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ Chromium wants to turn off SharedWorkers at runtime
+ https://bugs.webkit.org/show_bug.cgi?id=29757
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::sharedWorker):
+ Now returns jsUndefined if isAvailable() returns false, to allow SharedWorkers to be disabled at runtime.
+ * workers/DefaultSharedWorkerRepository.cpp:
+ (WebCore::SharedWorkerRepository::isAvailable):
+ Made SharedWorkers available by default.
+ * workers/SharedWorkerRepository.h:
+ Added definition for SharedWorkerRepository::isAvailable().
+
+2009-10-05 Hironori Bono <hbono@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ A super quick fix for Bug 28710.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28710
+
+ This change just resets the style sent to addStyleMarkup() to avoid an assertion error
+ and creates an empty style when computedStyleAtPosition is 0 to avoid a crash.
+ (This change is nothing but a better-than-crash change.)
+
+ Tests: editing/selection/select-crash-001.html
+ editing/selection/select-crash-002.html
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::editingStyleAtPosition): Resets the style sent to addStyleMarkup() if it is not valid.
+ * editing/markup.cpp:
+ (WebCore::createMarkup): Creates an empty style if computedStyleAtPosition is 0.
+
+2009-10-05 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Silence duplicate errors logged for missing getComputedStyle
+ implementations. Improves the error message as well.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::logUnimplementedPropertyID):
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+
+2009-10-05 Julie Parent <jparent@chromium.org>
+
+ Unreviewed, Chromium build fix #3. Add V8BeforeLoadEvent.[cc|h] to derived sources.
+
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8Index.cpp:
+
+2009-10-05 Mark Rowe <mrowe@apple.com>
+
+ Try and fix the GTK build.
+
+ * GNUmakefile.am:
+
+2009-10-05 Julie Parent <jparent@chromium.org>
+
+ Unreviewed, Chromium build fix #2. Add new BEFORELOADEVENT to V8ClassIndex.
+
+ * bindings/v8/V8Index.h:
+
+2009-10-05 Julie Parent <jparent@chromium.org>
+
+ Unreviewed, Chromium build fix. Missing "," after entry for BeforeLoadEvent.idl.
+
+ * WebCore.gypi:
+
+2009-10-05 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add a beforeload event that will be fired before subresources load. (It isn't fired yet.) The event
+ has one field, the URL that is going to be requested. Setting preventDefault will stop the load
+ from occurring.
+
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * dom/BeforeLoadEvent.h: Added.
+ (WebCore::BeforeLoadEvent::create):
+ (WebCore::BeforeLoadEvent::initBeforeLoadEvent):
+ (WebCore::BeforeLoadEvent::url):
+ (WebCore::BeforeLoadEvent::BeforeLoadEvent):
+ * dom/BeforeLoadEvent.idl: Added.
+ * dom/EventNames.h:
+ * page/DOMWindow.idl:
+
+2009-10-05 Priit Laes <plaes@plaes.org>
+
+ Reviewed by Gustavo Noronha.
+
+ Add Gentoo-specific paths for searching browser plugins.
+ https://bugs.webkit.org/show_bug.cgi?id=30088
+
+ * plugins/PluginDatabase.cpp:
+ (WebCore::PluginDatabase::defaultPluginDirectories):
+
+2009-10-02 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Add functionality to pause/throttle CSS transitions/animations in a WebView
+ https://bugs.webkit.org/show_bug.cgi?id=29942
+
+ Exporting call from AnimationController
+
+ * WebCore.base.exp:
+
+2009-10-05 Kevin Decker <kdecker@apple.com>
+
+ Rubberstamped by Anders Carlsson.
+
+ * WebCore.base.exp: Update export of HaltablePlugin/PluginHalterClient.
+ * WebCore.xcodeproj/project.pbxproj: Likewise.
+
+2009-10-05 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r49104.
+ http://trac.webkit.org/changeset/49104
+
+ * html/HTMLInputElement.cpp:
+ * html/HTMLInputElement.h:
+ * html/HTMLInputElement.idl:
+ * html/ValidityState.cpp:
+ * html/ValidityState.h:
+ (WebCore::ValidityState::rangeUnderflow):
+ (WebCore::ValidityState::rangeOverflow):
+ * rendering/RenderSlider.cpp:
+ (WebCore::SliderRange::SliderRange):
+ (WebCore::SliderRange::valueFromElement):
+
+2009-10-05 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Update style immediately when validation-related values are updated.
+ https://bugs.webkit.org/show_bug.cgi?id=28868
+
+ In order to apply :valid, :invalid, :optional or :required lively,
+ - call setNeedsStyleRecalc() when properties which can change
+ willValidate state are updated, and
+ (Parent form element, name, disabled, readonly)
+ - call updateValidity() when properties which can change validity
+ state are updated. (value, pattern, required)
+
+ Tests: fast/forms/input-live-pseudo-selectors.html
+ fast/forms/textarea-live-pseudo-selectors.html
+
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::HTMLFormControlElement):
+ (WebCore::HTMLFormControlElement::parseMappedAttribute):
+ (WebCore::HTMLFormControlElement::required):
+ (WebCore::HTMLFormControlElement::updateValidity):
+ * html/HTMLFormControlElement.h:
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::setInputType):
+ (WebCore::HTMLInputElement::parseMappedAttribute):
+ (WebCore::HTMLInputElement::setValue):
+ (WebCore::HTMLInputElement::setValueFromRenderer):
+ (WebCore::HTMLInputElement::setFileListFromRenderer):
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::setValue):
+ * rendering/RenderTextControlMultiLine.cpp:
+ (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
+
+2009-10-05 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Implement min/max attributes, ValidityState.rangeUnderflow and
+ ValidityState.rangeOverflow for <input type=number> and <input type=range>
+ https://bugs.webkit.org/show_bug.cgi?id=29069
+
+ Tests: fast/forms/ValidityState-rangeOverflow-number.html
+ fast/forms/ValidityState-rangeOverflow-range.html
+ fast/forms/ValidityState-rangeUnderflow-number.html
+ fast/forms/ValidityState-rangeUnderflow-range.html
+ fast/forms/input-minmax.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::rangeUnderflow):
+ (WebCore::HTMLInputElement::rangeOverflow):
+ (WebCore::HTMLInputElement::rangeMinimum):
+ (WebCore::HTMLInputElement::rangeMaximum):
+ * html/HTMLInputElement.h:
+ * html/HTMLInputElement.idl:
+ * html/ValidityState.cpp:
+ (WebCore::ValidityState::rangeUnderflow):
+ (WebCore::ValidityState::rangeOverflow):
+ * html/ValidityState.h:
+ * rendering/RenderSlider.cpp:
+ (WebCore::SliderRange::SliderRange):
+ (WebCore::SliderRange::valueFromElement):
+
+2009-10-05 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Introduces
+ - new CSS pseudo selector: "-webkit-input-list-button"
+ - new CSS apperance type: "list-button"
+ - new ControlPart value: "ListButtonPart"
+ for the UI of the list attribute of the input element, and adds
+ implementation to draw ListButtonPart on Mac.
+ The code is guarded by ENABLE(DATALIST).
+
+ https://bugs.webkit.org/show_bug.cgi?id=27794
+
+ Test: platform/mac/fast/forms/input-list-button-size.html
+
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ * css/CSSSelector.cpp:
+ (WebCore::CSSSelector::extractPseudoType):
+ * css/CSSSelector.h:
+ (WebCore::CSSSelector::):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
+ * css/CSSValueKeywords.in:
+ * css/html.css:
+ * html/HTMLInputElement.cpp:
+ * platform/ThemeTypes.h:
+ (WebCore::):
+ * platform/mac/ThemeMac.mm:
+ (WebCore::listButtonSizes):
+ (WebCore::button):
+ (WebCore::paintButton):
+ (WebCore::ThemeMac::controlSize):
+ (WebCore::ThemeMac::minimumControlSize):
+ (WebCore::ThemeMac::controlBorder):
+ (WebCore::ThemeMac::paint):
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::adjustStyle):
+ (WebCore::RenderTheme::paint):
+ (WebCore::RenderTheme::paintBorderOnly):
+ (WebCore::RenderTheme::paintDecorations):
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::adjustRepaintRect):
+ * rendering/style/RenderStyleConstants.h:
+ (WebCore::):
+
+2009-10-05 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=30065>
+ nodeTitleInfo should be placed in ElementsTreeOutline.
+
+ Move nodeTitleInfo into ElementsTreeOutline.js from utilities.js.
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement):
+ (WebInspector.ElementsTreeElement.prototype._updateTitle):
+ (WebInspector.ElementsTreeElement.prototype._nodeTitleInfo):
+ * inspector/front-end/utilities.js:
+
+2009-10-02 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Inform the application when a new request is created
+ https://bugs.webkit.org/show_bug.cgi?id=29975
+
+ Emit a signal each time a request is created, with the request and the frame
+ that created it.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+ (WebCore::QNetworkReplyHandler::start):
+
+2009-10-05 Ben Murdoch <benm@google.com>
+
+ Reviewed by Darin Adler.
+
+ Add an ASSERT in updateGuidVersionMap.
+ https://bugs.webkit.org/show_bug.cgi?id=30077
+
+ * storage/Database.cpp:
+ (WebCore::updateGuidVersionMap): ASSERT that the guidMutex() is locked.
+
+2009-10-05 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Allow V8 to throw an exception in _NPN_SetException without worrying about context
+ if we don't have enough information to find the correct context.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30026
+
+ Part of the fix for Chromium's failure of LayouTests/plugins/netscape-throw-exception.html.
+
+ * bindings/v8/NPV8Object.cpp:
+ (_NPN_SetException): Don't suppress the exception if we can't find the relevant context.
+
+2009-10-05 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Place "Close" button in docked mode on the same side as the window "Close" button in detached mode.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29961
+
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+
+2009-10-05 J-P Nurmi <jpnurmi@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Added pure virtual QWebPageClient::pluginParent()
+
+ https://bugs.webkit.org/show_bug.cgi?id=29710
+
+ * platform/qt/QWebPageClient.h:
+
+2009-10-05 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] windowsKeyCodeForKeyEvent() returns a wrong value for the F10 key.
+ https://bugs.webkit.org/show_bug.cgi?id=30042
+
+ * platform/qt/PlatformKeyboardEventQt.cpp:
+ (WebCore::windowsKeyCodeForKeyEvent):
+
+2009-10-05 Fumitoshi Ukai <ukai@chromium.org>
+
+ Unreviewed build fix for ENABLE(WEB_SOCKETS) and v8.
+
+ V8ObjectEventListener.h has been removed at r48978
+
+ * bindings/v8/custom/V8WebSocketCustom.cpp:
+
+2009-10-04 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector console stops working while JS in IFRAME is paused.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29958
+
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript._evaluateOn):
+ (InjectedScript.addInspectedNode):
+ (InjectedScript._ensureCommandLineAPIInstalled):
+
+2009-10-04 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Introduce inspected object groups for console
+ and watch evaluation results so that they could be released
+ explicitly.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29891
+
+ * bindings/js/JSInspectorBackendCustom.cpp:
+ (WebCore::JSInspectorBackend::wrapObject):
+ * bindings/v8/custom/V8InspectorBackendCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::wrapObject):
+ (WebCore::InspectorBackend::releaseWrapperObjectGroup):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::clearConsoleMessages):
+ (WebCore::InspectorController::resetScriptObjects):
+ (WebCore::InspectorController::wrapObject):
+ (WebCore::InspectorController::unwrapObject):
+ (WebCore::InspectorController::releaseWrapperObjectGroup):
+ * inspector/InspectorController.h:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addMessageToConsole):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
+ (WebInspector.ConsoleView.prototype.doEvalInWindow):
+ (WebInspector.ConsoleView.prototype._enterKeyPressed):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.evaluate):
+ (InjectedScript._evaluateAndWrap):
+ (InjectedScript.evaluateInCallFrame):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
+ (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame):
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSidebarPane):
+ (WebInspector.WatchExpressionsSection.prototype.update):
+
+2009-10-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Eric Carlson.
+
+ Move mediaControls extras for the Qt port into WebCore/css like other ports
+
+ https://bugs.webkit.org/show_bug.cgi?id=30013
+
+ * WebCore.pro:
+ * WebCore.qrc:
+ * css/mediaControlsQt.css: Renamed from WebCore/css/qt/mediaControls-extras.css.
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::extraMediaControlsStyleSheet):
+
+2009-10-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Eric Carlson.
+
+ Rename WebCore/css/mediaControlsQT.css and MediaControllerThemeQT
+
+ https://bugs.webkit.org/show_bug.cgi?id=30013
+
+ The QT suffix has been expanded to QuickTime, to not cause confusion
+ and name-crashes with similar files in the Qt port.
+
+ * DerivedSources.make:
+ * WebCore.xcodeproj/project.pbxproj:
+ * css/mediaControlsQuickTime.css: Renamed from WebCore/css/mediaControlsQT.css.
+ * rendering/RenderThemeMac.mm:
+ (WebCore::):
+ (WebCore::mediaControllerTheme):
+ (WebCore::RenderThemeMac::adjustSliderThumbSize):
+ (WebCore::getUnzoomedRectAndAdjustCurrentContext):
+ (WebCore::RenderThemeMac::extraMediaControlsStyleSheet):
+
+2009-10-04 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=30064>
+ Syntax Highlighting CSS shouldn't be duplicated.
+
+ Refactor syntax highlighting CSS into a new file, add it to the
+ projects, and have SourceFrame.js and inspector.html include the
+ new CSS file.
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._loaded):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspectorSyntaxHighlight.css: Added.
+ * inspector/front-end/WebKit.qrc:
+
+2009-10-04 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=30062>
+ Inspector should syntax highlight JS/CSS in elements view.
+
+ Add syntax highlighting of CSS and JavaScript tags to the elements panel.
+ Copied CSS rules from SourceFrame.js to inspector.css, and have the text nodes
+ in utilities.js call the CSS or JS Syntax highlighters if their parent is a script
+ or style tag.
+
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/utilities.js:
+
+2009-10-04 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Eric Seidel
+
+ Enable Web Sockets in chromium build.
+ https://bugs.webkit.org/show_bug.cgi?id=29917
+
+ * WebCore.gyp/WebCore.gyp:
+
+2009-10-04 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustova Noronha.
+
+ [GTK] performs a POST when refreshing a view that was obtained with a GET
+ https://bugs.webkit.org/show_bug.cgi?id=29761
+
+ Update the HTTP method in the request stored by willSendRequest
+ after a redirect, since it could have changed.
+
+ Test: http/tests/navigation/postredirect-reload.html
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::restartedCallback):
+
+2009-10-04 Xan Lopez <xlopez@igalia.com>
+
+ Revert previous patch, as the newly added test breaks other tests.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::restartedCallback):
+
+2009-10-04 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustova Noronha.
+
+ [GTK] performs a POST when refreshing a view that was obtained with a GET
+ https://bugs.webkit.org/show_bug.cgi?id=29761
+
+ Update the HTTP method in the request stored by willSendRequest
+ after a redirect, since it could have changed.
+
+ Test: http/tests/navigation/postredirect-reload.html
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::restartedCallback):
+
+2009-10-04 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Fixed Function leak in V8LazyEventListener.
+ (Should fix the remaning leak in
+ https://bugs.webkit.org/show_bug.cgi?id=29093).
+ V8LazyEventListeners used to create FunctionTemplates for each
+ wrapped listener which in turn created Functions that were cached
+ forever in V8 Context. Now there is at most one such Function per
+ Context.
+ https://bugs.webkit.org/show_bug.cgi?id=30060
+
+ Added new hidden property name to store toString result:
+ * bindings/v8/V8HiddenPropertyName.cpp:
+ * bindings/v8/V8HiddenPropertyName.h:
+
+ Switched to static FunctionTemplate:
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListenerToString):
+ (WebCore::V8LazyEventListener::prepareListenerObject):
+
+2009-10-03 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ CSS Source View Should be Syntax Highlighted
+ https://bugs.webkit.org/show_bug.cgi?id=14359
+
+ Support for WebKit's CSS Variables @variables and var()
+
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.CSSSourceSyntaxHighligher):
+
+2009-10-03 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector should remember preferences for docked/undocked etc
+ https://bugs.webkit.org/show_bug.cgi?id=29089
+
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype._toggleLargerResources): toggle the preference
+ * inspector/front-end/inspector.js:
+ (WebInspector._loadPreferences): factored out loading preferences
+ (WebInspector.loaded):
+
+2009-10-03 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ CSS Source View Should be Syntax Highlighted
+ https://bugs.webkit.org/show_bug.cgi?id=14359
+
+ Trigger the Syntax Highlighter for CSS files.
+
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype.syntaxHighlightJavascript):
+ (WebInspector.SourceFrame.prototype.syntaxHighlightCSS):
+ * inspector/front-end/SourceView.js:
+ (WebInspector.SourceView.prototype._contentLoaded):
+
+ Factored out the Syntax Highlighting procedure into a "Class"
+ Added CSSSourceSyntaxHighlighter and JavaScriptSourceSyntaxHighlighter
+
+ (WebInspector.SourceSyntaxHighligher):
+ (WebInspector.SourceSyntaxHighligher.prototype.createSpan):
+ (WebInspector.SourceSyntaxHighligher.prototype.process.processChunk):
+ (WebInspector.SourceSyntaxHighligher.prototype.process):
+ (WebInspector.CSSSourceSyntaxHighligher): the CSS Highlighter
+ (WebInspector.JavaScriptSourceSyntaxHighligher): the JS Highlighter
+
+2009-10-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ Factor back-forward list methods out of FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=30037
+
+ This change moves these back-forward related methods from FrameLoader
+ to Page. It's possible we should move these methods into some kind of
+ "page controller" object, but we can figure that out in a future patch.
+
+ * loader/FrameLoader.cpp:
+ * loader/FrameLoader.h:
+ * loader/RedirectScheduler.cpp:
+ (WebCore::RedirectScheduler::timerFired):
+ * page/ContextMenuController.cpp:
+ (WebCore::ContextMenuController::contextMenuItemSelected):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::close):
+ * page/History.cpp:
+ (WebCore::History::length):
+ * page/Page.cpp:
+ (WebCore::Page::canGoBackOrForward):
+ (WebCore::Page::goBackOrForward):
+ (WebCore::Page::getHistoryLength):
+ * page/Page.h:
+ * platform/ContextMenu.cpp:
+ (WebCore::ContextMenu::populate):
+ (WebCore::ContextMenu::checkOrEnableIfNeeded):
+
+2009-10-02 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: prepare InspectorController for being used from layout tests.
+ This change adds evaluateForTestInFrontend method with the callback that
+ allows evaluating arbitrary code in the frontend context.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30008
+
+ * WebCore.Inspector.exp:
+ * WebCore.order:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::didEvaluateForTestInFrontend):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::populateScriptObjects):
+ (WebCore::InspectorController::evaluateForTestInFrontend):
+ (WebCore::InspectorController::didEvaluateForTestInFrontend):
+ * inspector/InspectorController.h:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::evaluateForTestInFrontend):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/inspector.js:
+ (WebInspector.evaluateForTestInFrontend):
+
+2009-10-02 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Node search mode is not getting reset on element selection.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30016
+
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
+
+2009-10-02 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=30036>
+ Should be able to resize Cookie Columns.
+
+ * inspector/front-end/CookieItemsView.js:
+ (WebInspector.CookieItemsView.prototype.update.callback):
+ (WebInspector.CookieItemsView.prototype.update):
+ (WebInspector.CookieItemsView.prototype.resize):
+
+2009-09-25 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Make WebCore::PluginView participate in plug-in halting.
+
+ Reviewed by Sam Weinig.
+
+ * platform/graphics/BitmapImage.h:
+ Declare a create() function that takes an HBITMAP.
+
+ * platform/graphics/win/ImageCGWin.cpp:
+ (WebCore::BitmapImage::create):
+ Use GetObject() to fill out a DIBSECTION structure for the given
+ HBITMAP. Call CGBitmapContextCreate() to create a CG context from the
+ bits of the bitmap. Create a CG image from the context, and pass this
+ when creating a new BitmapImage.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::start):
+ If we successfully started, tell our parent frame's Page.
+ (WebCore::PluginView::stop):
+ Tell our parent frame's Page that we stopped.
+ (WebCore::PluginView::node):
+
+ * plugins/PluginView.h:
+ Inherit from HaltablePlugin.
+ (WebCore::PluginView::setPlatformPluginWidget):
+ On platforms where the platform plug-in widget is the WebCore::Widget's
+ platform widget, have setPlatformPluginWidget() call
+ setPlatformWidget().
+
+ * plugins/PluginViewNone.cpp:
+ (WebCore::PluginView::halt):
+ Stubbed.
+ (WebCore::PluginView::restart):
+ Stubbed.
+
+ * plugins/gtk/PluginViewGtk.cpp:
+ (WebCore::PluginView::halt):
+ Stubbed.
+ (WebCore::PluginView::restart):
+ Stubbed.
+
+ * plugins/mac/PluginViewMac.cpp:
+ (WebCore::PluginView::halt):
+ Stubbed.
+ (WebCore::PluginView::restart):
+ Stubbed.
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::halt):
+ Stubbed.
+ (WebCore::PluginView::restart):
+ Stubbed.
+
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::platformDestroy):
+ After destroying the window, set the platform plug-in widget to 0 to
+ ensure that Widget isn't holding a stale handle.
+ (WebCore::PluginView::halt):
+ Have our element's RenderWidget display a screenshot of the plug-in,
+ then stop the plug-in and destroy it.
+ (WebCore::PluginView::restart):
+ Clear the RenderWidget's substitute image, then start the plug-in.
+
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::showSubstituteImage):
+ Set m_substituteImage to the passed image, and repaint.
+ (WebCore::RenderWidget::paint):
+ If we have a substitute image, paint that instead of allowing the
+ widget to paint itself.
+
+ * rendering/RenderWidget.h:
+ Declare showSubstituteImage(). Added a member to store the substitute
+ image.
+
+2009-10-02 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Move PolicyCheck out of FrameLoader.{h,cpp}
+ https://bugs.webkit.org/show_bug.cgi?id=30035
+
+ Purely code motion (and adding a destructor).
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * loader/FrameLoader.cpp:
+ * loader/FrameLoader.h:
+ * loader/PolicyCheck.cpp:
+ * loader/PolicyCheck.h:
+
+2009-10-02 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Add NPNVToolkit value quirk in plugins for nspluginwrapper.
+ Plugin error message was:
+ ERROR: failed to initialize brower-side RPC events listener
+ https://bugs.webkit.org/show_bug.cgi?id=25053
+
+ (WebCore::staticPluginQuirkRequiresGtkToolKit_NPN_GetValue):
+ (WebCore::PluginPackage::load):
+
+2009-10-02 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] X sync our XEmbed container window creation before sending the
+ xid to plugins.
+ https://bugs.webkit.org/show_bug.cgi?id=25053
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::setNPWindowIfNeeded):
+
+2009-10-02 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Setting zero size on a container of a video element doesn't hide the controller
+ https://bugs.webkit.org/show_bug.cgi?id=30031
+
+ Fix a logic error in enclosingCompositingLayer() when mixing normal flow and
+ positioned layers. This resulted in enclosingCompositingLayer() giving back a different
+ answer to the logic used to actually parent compositing layers, so layer positions
+ and layer hierarchy would be out of agreement.
+
+ Test: compositing/geometry/clipped-video-controller.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::compositingContainer):
+ (WebCore::RenderLayer::enclosingCompositingLayer):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::setCompositingParent):
+
+2009-10-02 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ - Move the following methods of HTMLInputElement and HTMLTextAreaElement
+ to HTMLTextFormControlElement.
+ setSelectionStart()
+ setSelectionEnd()
+ select()
+ setSelectionRange()
+ selectionStart()
+ selectionEnd()
+ selection()
+
+ - Introduce cachedSelectionStart() and cachedSelectionEnd().
+
+ - Unify HTMLInputElement::isTextFieldWithRenderer() and
+ HTMLTextAreaElement::rendererAfterUpdateLayout() into textRendererAfterUpdateLayout().
+
+ - Unify a part of parseMappedAttribute() of HTMLInputElement and HTMLTextAreaElement.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29782
+
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLTextFormControlElement::textRendererAfterUpdateLayout):
+ (WebCore::HTMLTextFormControlElement::setSelectionStart):
+ (WebCore::HTMLTextFormControlElement::setSelectionEnd):
+ (WebCore::HTMLTextFormControlElement::select):
+ (WebCore::HTMLTextFormControlElement::setSelectionRange):
+ (WebCore::HTMLTextFormControlElement::selectionStart):
+ (WebCore::HTMLTextFormControlElement::selectionEnd):
+ (WebCore::HTMLTextFormControlElement::selection):
+ (WebCore::HTMLTextFormControlElement::parseMappedAttribute):
+ * html/HTMLFormControlElement.h:
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::parseMappedAttribute):
+ * html/HTMLInputElement.h:
+ (WebCore::HTMLInputElement::select):
+ (WebCore::HTMLInputElement::cachedSelectionStart):
+ (WebCore::HTMLInputElement::cachedSelectionEnd):
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::parseMappedAttribute):
+ * html/HTMLTextAreaElement.h:
+ (WebCore::HTMLTextAreaElement::cachedSelectionStart):
+ (WebCore::HTMLTextAreaElement::cachedSelectionEnd):
+
+2009-10-02 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Disconnect event listeners on navigation.
+ Fixes http://crbug.com/23597.
+ https://bugs.webkit.org/show_bug.cgi?id=30027
+
+ Added V8ListenerGuard that is shared by listeners and proxy. On
+ navigation proxy sets a flag in the guard turning off listeners.
+
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::V8AbstractEventListener):
+ * bindings/v8/V8AbstractEventListener.h:
+ (WebCore::V8ListenerGuard::create):
+ (WebCore::V8ListenerGuard::isDisconnected):
+ (WebCore::V8ListenerGuard::disconnectListeners):
+ (WebCore::V8ListenerGuard::V8ListenerGuard):
+ (WebCore::V8AbstractEventListener::disconnected):
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getEventListener):
+ * bindings/v8/V8EventListenerList.h:
+ (WebCore::V8EventListenerList::findOrCreateWrapper):
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::V8LazyEventListener):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::V8Proxy):
+ (WebCore::V8Proxy::disconnectFrame):
+ (WebCore::V8Proxy::disconnectEventListeners):
+ (WebCore::V8Proxy::clearForNavigation):
+ * bindings/v8/V8Proxy.h:
+ (WebCore::V8Proxy::listenerGuard):
+ * bindings/v8/V8WorkerContextEventListener.cpp:
+ (WebCore::V8WorkerContextEventListener::V8WorkerContextEventListener):
+ * bindings/v8/V8WorkerContextEventListener.h:
+ (WebCore::V8WorkerContextEventListener::create):
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy):
+ (WebCore::WorkerContextExecutionProxy::dispose):
+ (WebCore::WorkerContextExecutionProxy::findOrCreateEventListener):
+ * bindings/v8/WorkerContextExecutionProxy.h:
+ * bindings/v8/custom/V8CustomEventListener.cpp:
+ (WebCore::V8EventListener::V8EventListener):
+ * bindings/v8/custom/V8CustomEventListener.h:
+ (WebCore::V8EventListener::create):
+
+2009-10-02 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [chromium] Fix WebGL build after CustomGetter constructor changes
+ https://bugs.webkit.org/show_bug.cgi?id=30020
+
+ * page/DOMWindow.idl:
+ Changed CustomGetter to JSCCustomGetter for CanvasArray constructors.
+
+2009-10-02 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: text in a "Request Payload" section disappears on selection
+ https://bugs.webkit.org/show_bug.cgi?id=29967
+
+ No new tests.
+
+ * inspector/front-end/ResourceView.js:
+ (WebInspector.ResourceView.prototype._refreshRequestPayload):
+
+2009-10-02 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Recursion guard for V8Proxy::callFunction.
+ Fixes http://crbug.com/23278.
+ https://bugs.webkit.org/show_bug.cgi?id=29974
+
+ Test: fast/xmlhttprequest/xmlhttprequest-recursive-sync-event.html
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::callFunction):
+
+2009-10-02 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Fix test breakages by adding null checks, and putting inspector code in
+ ENABLE(INSPECTOR).
+
+ * dom/Document.cpp:
+ (WebCore::Document::finishedParsing):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::dispatchLoadEvent):
+
+2009-10-02 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Clean up the QNetworkReplyHandler to only apply HTTP headers
+ for protocols in the HTTP family.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::finish):
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+
+2009-10-02 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Move error check into sendResponseIfNeeded() as suggested
+ by Eric Seidel. Also, remove some dead code.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::finish):
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+
+2009-10-02 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Assertion failure in CompositeEditCommand::moveParagraphs() and crash in Node::nodeIndex() when pasting.
+ <rdar://problem/7148712>
+ https://bugs.webkit.org/show_bug.cgi?id=28992
+
+ Test: editing/selection/replace-selection-crash.html
+
+ * editing/ReplaceSelectionCommand.cpp:
+ (WebCore::ReplaceSelectionCommand::mergeEndIfNeeded): Handle properly the case of
+ the destination position matching the end of the paragraph to move.
+
+2009-10-02 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Implement per-storage-area quotas for LocalStorage
+ https://bugs.webkit.org/show_bug.cgi?id=29991
+
+ I put 90% of the code in StorageMap since the decision to allow an update is
+ closely tied to quota tracking. The quota is set via a page's Settings class.
+ Like with the local storage path and whether it's enabled, it's assumed that
+ all pages in the same group will have the same settings. The setting defaults
+ to 5mb which is what the spec suggests, but it can easily be changed to
+ anything else--including StorageMap::noQuota. Any values in LocalStorage are
+ grandfathered in regarudless of quota, so importItem only tracks (and will
+ never block) imports.
+
+ I believe this change is a good transition to more complex quota management.
+ For example, if we wanted to track quotas in the SQLite DB, then we'd just add
+ a function to the StorageMap that sets the quota. This would be fine since all
+ use of LocalStorage is blocked on the import completing, so you'd never hit a
+ quota error in the mean time. Also, if embedders wanted to ask the user
+ whether to expand the quota whenever it's hit (before deciding whether or not
+ to raise an exception), a callback via the chrome client should be fairly easy.
+ That said, I think it's best to add these features in steps rather than one
+ huge patch. (Both of these are on my TODO list, btw.)
+
+ Included is a layout test that verifies the behavior. It assumes the default
+ quota is 5mb (since that's what Settings defaults to).
+
+ Test: storage/domstorage/localstorage/quota.html
+
+ * page/PageGroup.cpp:
+ (WebCore::PageGroup::localStorage):
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setLocalStorageQuota):
+ * page/Settings.h:
+ (WebCore::Settings::localStorageQuota):
+ * storage/StorageAreaImpl.cpp:
+ (WebCore::StorageAreaImpl::create):
+ (WebCore::StorageAreaImpl::StorageAreaImpl):
+ (WebCore::StorageAreaImpl::setItem):
+ (WebCore::StorageAreaImpl::clear):
+ * storage/StorageAreaImpl.h:
+ * storage/StorageMap.cpp:
+ (WebCore::StorageMap::create):
+ (WebCore::StorageMap::StorageMap):
+ (WebCore::StorageMap::copy):
+ (WebCore::StorageMap::setItem):
+ (WebCore::StorageMap::removeItem):
+ (WebCore::StorageMap::importItem):
+ * storage/StorageMap.h:
+ (WebCore::StorageMap::quota):
+ * storage/StorageNamespace.cpp:
+ (WebCore::StorageNamespace::localStorageNamespace):
+ * storage/StorageNamespace.h:
+ * storage/StorageNamespaceImpl.cpp:
+ (WebCore::StorageNamespaceImpl::localStorageNamespace):
+ (WebCore::StorageNamespaceImpl::sessionStorageNamespace):
+ (WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
+ (WebCore::StorageNamespaceImpl::copy):
+ (WebCore::StorageNamespaceImpl::storageArea):
+ * storage/StorageNamespaceImpl.h:
+
+2009-10-02 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Database Inspector crashes Safari when table has more than 21 columns
+ https://bugs.webkit.org/show_bug.cgi?id=29924
+
+ * inspector/front-end/StoragePanel.js:
+ (WebInspector.StoragePanel.prototype.dataGridForResult): adjust the minimum column width percentage to be flexible for many columns.
+
+2009-10-02 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <http://webkit.org/b/14370>.
+ Inspector's timeline should record when certain DOM events fired.
+
+ This patch adds calls into the Web Inspector when the main frame
+ fires an load event, and when the document fires its DOMContent
+ event. Once these values are passed in, they are sent to the Web Inspector
+ as a timing change, and these are denoted by vertical lines in the resources
+ panel (blue for DOM Content, red for load event).
+
+ * English.lproj/localizedStrings.js: Added tooltip text.
+ * dom/Document.cpp:
+ (WebCore::Document::finishedParsing): Added an Inspector callback for DOM Content.
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::mainResourceFiredDOMContentEvent): Tell the main resource it got the event.
+ (WebCore::InspectorController::mainResourceFiredLoadEvent): Ditto.
+ * inspector/InspectorController.h:
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::InspectorResource): Added new variables.
+ (WebCore::InspectorResource::updateScriptObject): Send new variables to inspector.js.
+ (WebCore::InspectorResource::markDOMContentEventTime): Send a TimingChange event.
+ (WebCore::InspectorResource::markLoadEventTime): Ditto.
+ * inspector/InspectorResource.h:
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype.get mainResourceLoadTime):
+ (WebInspector.ResourcesPanel.prototype.set mainResourceLoadTime):
+ (WebInspector.ResourcesPanel.prototype.get mainResourceDOMContentTime):
+ (WebInspector.ResourcesPanel.prototype.set mainResourceDOMContentTime):
+ (WebInspector.ResourcesPanel.prototype.reset):
+ (WebInspector.ResourcesPanel.prototype._updateGraphDividersIfNeeded): Draw dividers for event timings.
+ (WebInspector.ResourceTimeCalculator.prototype.computePercentageFromEventTime):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.js:
+ (WebInspector.updateResource):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::dispatchLoadEvent): Add an Inspector callback for the Load event.
+
+2009-10-02 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Add support for blacklist patterns to user stylesheets and scripts in addition to whitelist patterns.
+
+ * WebCore.base.exp:
+ * dom/Document.cpp:
+ (WebCore::Document::pageGroupUserSheets):
+ * page/Frame.cpp:
+ (WebCore::Frame::injectUserScriptsForWorld):
+ * page/PageGroup.cpp:
+ (WebCore::PageGroup::addUserScript):
+ (WebCore::PageGroup::addUserStyleSheet):
+ (WebCore::PageGroup::removeUserContentWithURLForWorld):
+ (WebCore::PageGroup::removeUserContentForWorld):
+ * page/PageGroup.h:
+ * page/UserContentURLPattern.cpp:
+ (WebCore::UserContentURLPattern::matchesPatterns):
+ * page/UserContentURLPattern.h:
+ * page/UserScript.h:
+ (WebCore::UserScript::UserScript):
+ (WebCore::UserScript::whitelist):
+ (WebCore::UserScript::blacklist):
+ * page/UserStyleSheet.h:
+ (WebCore::UserStyleSheet::UserStyleSheet):
+ (WebCore::UserStyleSheet::whitelist):
+ (WebCore::UserStyleSheet::blacklist):
+
+2009-10-02 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Build fix when SVG is not enabled
+ https://bugs.webkit.org/show_bug.cgi?id=30011
+
+ Move TextRenderingMode related functions out from
+ the ENABLE(SVG) guard.
+
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator TextRenderingMode):
+
+2009-10-02 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Oliver Hunt.
+
+ WebGL crashes with recent CanvasArray change
+ https://bugs.webkit.org/show_bug.cgi?id=30018
+
+ Test: fast/canvas/webgl/array-unit-tests.html
+
+ * html/canvas/CanvasArray.cpp:
+ (WebCore::CanvasArray::CanvasArray):
+ Fix bug where PassRefPtr was tested after transferring value to RefPtr.
+
+2009-10-02 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ <https://bugs.webkit.org/show_bug.cgi?id=29989>
+ Safari version number shouldn't be exposed in WebKit code
+
+ For a WebKit version of 532.3.4:
+ Product version is: 5.32.3.4 (was 4.0.3.0)
+ File version is: 5.32.3.4 (was 4.532.3.4)
+
+ * WebCore.vcproj/QTMovieWin.rc:
+
+2009-10-02 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Enable two point radial gradients in Chromium/Skia.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30017
+
+ Covered by the following tests:
+
+ LayoutTests/svg/W3C-SVG-1.1/pservers-grad-13-b.svg
+ LayoutTests/fast/backgrounds/svg-as-background-3.html
+ LayoutTests/fast/gradients/generated-gradients.html
+ LayoutTests/fast/gradients/simple-gradients.html
+
+ * platform/graphics/skia/GradientSkia.cpp:
+ (WebCore::Gradient::platformGradient):
+
+2009-10-02 Norbert Leser <norbert.leser@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Conditionally guard cursor code (cursor and updateCursor functions) with !QT_NO_CURSOR.
+ Otherwise, it is inconsistent with class declaration of QCursor.
+
+ No new tests.
+
+ * platform/qt/QWebPageClient.h:
+
+2009-10-02 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] missing support for anamorphic PAR video size
+ https://bugs.webkit.org/show_bug.cgi?id=29717
+
+ cleanup of caps handling in the video sink
+
+ * platform/graphics/gtk/VideoSinkGStreamer.cpp:
+ (webkit_video_sink_set_caps):
+
+2009-10-02 Prasanth Ullattil <prasanth.ullattil@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Fix compiler warnings about unused function arguments.
+
+ * bridge/qt/qt_class.h:
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::QtRuntimeMetaMethod::call):
+ (JSC::Bindings::QtRuntimeConnectionMethod::call):
+ * dom/XMLTokenizerQt.cpp:
+ (WebCore::XMLTokenizer::initializeParserContext):
+ * platform/graphics/qt/FontCacheQt.cpp:
+ (WebCore::FontCache::getTraitsInFamily):
+ (WebCore::FontCache::getCachedFontPlatformData):
+ * platform/graphics/qt/FontFallbackListQt.cpp:
+ (WebCore::FontFallbackList::setPlatformFont):
+ * platform/graphics/qt/FontQt.cpp:
+ (WebCore::Font::offsetForPositionForComplexText):
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::drawLineForText):
+ (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
+ (WebCore::GraphicsContext::setPlatformShadow):
+ (WebCore::GraphicsContext::setURLForRect):
+ * platform/graphics/qt/IconQt.cpp:
+ (WebCore::Icon::createIconForFiles):
+ * platform/graphics/qt/ImageBufferQt.cpp:
+ (WebCore::ImageBuffer::ImageBuffer):
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::frameBufferAtIndex):
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
+ (WebCore::MediaPlayerPrivate::supportsType):
+ (WebCore::MediaPlayerPrivate::setEndTime):
+ * platform/graphics/qt/SimpleFontDataQt.cpp:
+ (WebCore::SimpleFontData::containsCharacters):
+ * platform/graphics/qt/StillImageQt.h:
+ (WebCore::StillImage::destroyDecodedData):
+ * platform/network/qt/DnsPrefetchHelper.h:
+ (WebCore::DnsPrefetchHelper::lookedUp):
+ * platform/qt/ContextMenuQt.cpp:
+ (WebCore::ContextMenu::setPlatformDescription):
+ * platform/qt/DragDataQt.cpp:
+ (WebCore::DragData::asURL):
+ * platform/qt/PopupMenuQt.cpp:
+ (WebCore::PopupMenu::populate):
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::supportsFocusRing):
+ (WebCore::RenderThemeQt::systemFont):
+ (WebCore::RenderThemeQt::adjustButtonStyle):
+ (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
+ (WebCore::RenderThemeQt::paintMediaSeekBackButton):
+ (WebCore::RenderThemeQt::paintMediaSeekForwardButton):
+ * platform/qt/ScrollViewQt.cpp:
+ (WebCore::ScrollView::platformAddChild):
+ * platform/qt/SearchPopupMenuQt.cpp:
+ (WebCore::SearchPopupMenu::saveRecentSearches):
+ (WebCore::SearchPopupMenu::loadRecentSearches):
+ * platform/qt/TemporaryLinkStubs.cpp:
+ (WebCore::signedPublicKeyAndChallengeString):
+ * platform/qt/WidgetQt.cpp:
+ (WebCore::Widget::paint):
+ * xml/XSLStyleSheetQt.cpp:
+ (WebCore::XSLStyleSheet::loadChildSheet):
+ (WebCore::XSLStyleSheet::setParentStyleSheet):
+ * xml/XSLTProcessorQt.cpp:
+ (WebCore::XSLTMessageHandler::handleMessage):
+ (WebCore::XSLTProcessor::transformToString):
+
+2009-10-02 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] missing support for anamorphic PAR video size
+ https://bugs.webkit.org/show_bug.cgi?id=29717
+
+ Scale the cairo surface of the video sink depending on the
+ pixel-aspect-ratio of the video buffer to paint. Also
+ destruct/re-create the surface when setSize() is called with a new
+ size.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::naturalSize):
+ (WebCore::MediaPlayerPrivate::setSize):
+ (WebCore::MediaPlayerPrivate::paint):
+ * platform/graphics/gtk/VideoSinkGStreamer.cpp:
+ (webkit_video_sink_idle_func):
+
+2009-10-02 Ben Murdoch <benm@google.com>
+
+ Reviewed by David Kilzer.
+
+ Stale database version persists through browser refresh (changeVersion doesn't work)
+ https://bugs.webkit.org/show_bug.cgi?id=27836
+
+ Tests: storage/change-version-handle-reuse.html
+ storage/change-version.html
+
+ * bindings/v8/custom/V8DatabaseCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL): Implement the V8 binding for database.changeVersion().
+ (WebCore::createTransaction): Fix a bug that was checking the wrong argument index to save the success callback.
+ * storage/Database.cpp:
+ (WebCore::updateGuidVersionMap): Safely update the Guid/version hash map.
+ (WebCore::Database::~Database): Remove code that removes the database from the guid->database and guid->version maps.
+ (WebCore::Database::setVersionInDatabase): Add a comment to explain some behaviour.
+ (WebCore::Database::close): Move the code that updates the maps from the destructor to here.
+ (WebCore::Database::performOpenAndVerify): Call updateGuidVersionMap instead of setting the hash map directly.
+ (WebCore::Database::setExpectedVersion): Update the in memory guid->version map when we want to update the database version.
+
+2009-10-02 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Partial WINSCW build fix.
+
+ Add parentheses around the function pointer declaration, similar to the
+ second hunk in r48825.
+
+ * loader/CachedResourceHandle.h:
+
+2009-10-02 Adam Barth <abarth@webkit.org>
+
+ Unreviewed attempted build fix by Xcode magic.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-10-02 Adam Barth <abarth@webkit.org>
+
+ Unreviewed build fix. Actually add the new files.
+
+ * loader/RedirectScheduler.cpp: Added.
+ (WebCore::ScheduledRedirection::):
+ (WebCore::ScheduledRedirection::ScheduledRedirection):
+ (WebCore::RedirectScheduler::RedirectScheduler):
+ (WebCore::RedirectScheduler::~RedirectScheduler):
+ (WebCore::RedirectScheduler::redirectScheduledDuringLoad):
+ (WebCore::RedirectScheduler::clear):
+ (WebCore::RedirectScheduler::scheduleRedirect):
+ (WebCore::RedirectScheduler::mustLockBackForwardList):
+ (WebCore::RedirectScheduler::scheduleLocationChange):
+ (WebCore::RedirectScheduler::scheduleFormSubmission):
+ (WebCore::RedirectScheduler::scheduleRefresh):
+ (WebCore::RedirectScheduler::locationChangePending):
+ (WebCore::RedirectScheduler::scheduleHistoryNavigation):
+ (WebCore::RedirectScheduler::timerFired):
+ (WebCore::RedirectScheduler::schedule):
+ (WebCore::RedirectScheduler::startTimer):
+ (WebCore::RedirectScheduler::cancel):
+ * loader/RedirectScheduler.h: Added.
+
+2009-10-01 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Move RedirectScheduler to its own file
+ https://bugs.webkit.org/show_bug.cgi?id=29952
+
+ This change is purely code motion.
+
+ No behavior change.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * loader/FrameLoader.cpp:
+ * loader/FrameLoader.h:
+ * loader/RedirectScheduler.cpp: Added.
+ (WebCore::ScheduledRedirection::):
+ (WebCore::ScheduledRedirection::ScheduledRedirection):
+ (WebCore::RedirectScheduler::RedirectScheduler):
+ (WebCore::RedirectScheduler::~RedirectScheduler):
+ (WebCore::RedirectScheduler::redirectScheduledDuringLoad):
+ (WebCore::RedirectScheduler::clear):
+ (WebCore::RedirectScheduler::scheduleRedirect):
+ (WebCore::RedirectScheduler::mustLockBackForwardList):
+ (WebCore::RedirectScheduler::scheduleLocationChange):
+ (WebCore::RedirectScheduler::scheduleFormSubmission):
+ (WebCore::RedirectScheduler::scheduleRefresh):
+ (WebCore::RedirectScheduler::locationChangePending):
+ (WebCore::RedirectScheduler::scheduleHistoryNavigation):
+ (WebCore::RedirectScheduler::timerFired):
+ (WebCore::RedirectScheduler::schedule):
+ (WebCore::RedirectScheduler::startTimer):
+ (WebCore::RedirectScheduler::cancel):
+ * loader/RedirectScheduler.h: Added.
+
+2009-10-02 Dave MacLachlan <dmaclach@gmail.com>
+
+ Reviewed by David Levin.
+
+ Clean up warnings in WebCore/bindings/v8/npruntime.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=29971
+
+ Gets rid of warnings on gcc about using anonymous namespaces
+ warning: 'StringKeyHashTraits' has a base
+ 'WTF::GenericHashTraits<<unnamed>::StringKey>'
+ whose type uses the anonymous namespace
+ and
+ warning: 'WTF::PairHashTraits<StringKeyHashTraits,
+ WTF::HashTraits<PrivateIdentifier*> >' has a base
+ 'WTF::GenericHashTraits<std::pair<<unnamed>::StringKey,
+ PrivateIdentifier*> >' whose type uses the anonymous namespace
+
+ No tests required.
+
+ * bindings/v8/npruntime.cpp:
+
+2009-10-01 Mark Rowe <mrowe@apple.com>
+
+ Fix the Tiger build. Don't unconditionally enable 3D canvas as it is not supported on Tiger.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-10-01 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Turn on ENABLE_3D_CANVAS in TOT
+ https://bugs.webkit.org/show_bug.cgi?id=29906
+
+ Fixed a bug found when running tests with flag on
+
+ * Configurations/FeatureDefines.xcconfig:
+ * WebCore.base.exp:
+ * bindings/js/JSCanvasArrayBufferConstructor.h:
+ (WebCore::construct):
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::getContext):
+ * html/canvas/CanvasArray.cpp:
+ (WebCore::CanvasArray::CanvasArray):
+ * html/canvas/CanvasByteArray.cpp:
+ (WebCore::CanvasByteArray::create):
+ * html/canvas/CanvasFloatArray.cpp:
+ (WebCore::CanvasFloatArray::create):
+ * html/canvas/CanvasIntArray.cpp:
+ (WebCore::CanvasIntArray::create):
+ * html/canvas/CanvasShortArray.cpp:
+ (WebCore::CanvasShortArray::create):
+ * html/canvas/CanvasUnsignedByteArray.cpp:
+ (WebCore::CanvasUnsignedByteArray::create):
+ * html/canvas/CanvasUnsignedIntArray.cpp:
+ (WebCore::CanvasUnsignedIntArray::create):
+ * html/canvas/CanvasUnsignedShortArray.cpp:
+ (WebCore::CanvasUnsignedShortArray::create):
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setWebGLEnabled):
+ * page/Settings.h:
+ (WebCore::Settings::webGLEnabled):
+
+2009-10-01 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for <rdar://problem/7264725> Re-add a vendor prefix to box-
+ shadow (29927)
+ -and corresponding-
+ https://bugs.webkit.org/show_bug.cgi?id=29927
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::):
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ (WebCore::ShadowParseContext::ShadowParseContext):
+ (WebCore::ShadowParseContext::commitValue):
+ (WebCore::ShadowParseContext::commitLength):
+ (WebCore::ShadowParseContext::commitColor):
+ (WebCore::cssPropertyID):
+ * css/CSSPropertyNames.in:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ * page/animation/AnimationBase.cpp:
+ (WebCore::ensurePropertyMap):
+
+2009-10-01 Beth Dakin <bdakin@apple.com>
+
+ Rubber-stamped by Sam Weinig.
+
+ At bad merge at some point in the development of my patch must have
+ put TextRenderMode.h in a weird spot in the xcodeproj. Moving it
+ back where it belongs!
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-09-30 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Remove FrameLoader::schedule* APIs
+ https://bugs.webkit.org/show_bug.cgi?id=29950
+
+ Change clients of FrameLoader::schedule* to call redirectScheduler
+ directly.
+
+ No behavior change.
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::setLocation):
+ (WebCore::createWindow):
+ (WebCore::JSDOMWindow::open):
+ * bindings/js/JSDocumentCustom.cpp:
+ (WebCore::JSDocument::setLocation):
+ * bindings/js/JSLocationCustom.cpp:
+ (WebCore::navigateIfAllowed):
+ (WebCore::JSLocation::reload):
+ * bindings/v8/V8Utilities.cpp:
+ (WebCore::navigateIfAllowed):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::createWindow):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8LocationCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * dom/Document.cpp:
+ (WebCore::Document::implicitClose):
+ (WebCore::Document::processHttpEquiv):
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::write):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::requestFrame):
+ (WebCore::FrameLoader::submitForm):
+ (WebCore::FrameLoader::receivedFirstData):
+ * loader/FrameLoader.h:
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::ApplicationCacheGroup::selectCache):
+ * page/History.cpp:
+ (WebCore::History::back):
+ (WebCore::History::forward):
+ (WebCore::History::go):
+
+2009-10-01 Beth Dakin <bdakin@apple.com>
+
+ Just removing a comment I accidentally committed earlier.
+
+ * platform/graphics/mac/SimpleFontDataMac.mm:
+ (WebCore::SimpleFontData::getCFStringAttributes):
+
+2009-09-30 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Clean up use of const and mutable in StorageMap
+ https://bugs.webkit.org/show_bug.cgi?id=29933
+
+ What's the point of having every single member variable be mutable and nearly
+ every method be const? Let's clean it up.
+
+ * storage/StorageMap.cpp:
+ (WebCore::StorageMap::setIteratorToIndex):
+ (WebCore::StorageMap::key):
+ (WebCore::StorageMap::importItem):
+ * storage/StorageMap.h:
+
+2009-10-01 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Fix for <rdar://problem/6934421> Support CSS for Text Kerning and
+ ligature
+ -and corresponding-
+ https://bugs.webkit.org/show_bug.cgi?id=6136
+
+ This patch makes the SVG CSS property text-rendering work with any
+ HTML, much like it does in Firefox. It accepts four possible input
+ values: auto, optimizeSpeed, optimizeLegibility, and
+ geometricPrecision. Right now, in this implementation, here is what
+ those values correspond to:
+
+ auto = optimizeSpeed = what we normally when the value's not set
+ optimizeLegibility = geometricPrecision = ligatures kerning
+
+ Add new file TextRenderingMode.h to the project files.
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+
+ CSS support for the new CSSPropertyTextRendering
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::):
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator TextRenderingMode):
+ * css/CSSPropertyNames.in:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ * css/CSSValueKeywords.in:
+
+ All the old SVG CSS support for this property can go away. When
+ it's used in SVG, it will just fall into the normal HTML case.
+ * css/SVGCSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
+ * css/SVGCSSParser.cpp:
+ (WebCore::CSSParser::parseSVGValue):
+ * css/SVGCSSPropertyNames.in:
+ * css/SVGCSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applySVGProperty):
+ * css/SVGCSSValueKeywords.in:
+
+ FontDescription stores the m_textRendering bit.
+ * platform/graphics/FontDescription.h:
+ (WebCore::FontDescription::FontDescription):
+ (WebCore::FontDescription::textRenderingMode):
+ (WebCore::FontDescription::setTextRenderingMode):
+ (WebCore::FontDescription::operator==):
+
+ We want to fall into the complex text rendering code path if
+ kerning and ligatures have been enabled with this property.
+ * platform/graphics/FontFastPath.cpp:
+ (WebCore::Font::canUseGlyphCache):
+
+ Now takes a TextRenderingMode as a parameter.
+ * platform/graphics/SimpleFontData.h:
+
+ New header for the enum.
+ * platform/graphics/TextRenderingMode.h: Added.
+ (WebCore::):
+
+ getCFStringAttributes() now takes a TextRenderingMode as an
+ attribute.
+ * platform/graphics/mac/CoreTextController.cpp:
+ (WebCore::CoreTextController::collectCoreTextRunsForCharacters):
+
+ Enable kerning and ligatures whenever the TextRenderingMode is
+ OptimizeLegibility or GeometricPrecision
+ * platform/graphics/mac/FontMacATSUI.mm:
+ (WebCore::disableLigatures):
+ (WebCore::initializeATSUStyle):
+ (WebCore::ATSULayoutParameters::initialize):
+ * platform/graphics/mac/SimpleFontDataMac.mm:
+ (WebCore::SimpleFontData::getCFStringAttributes):
+
+ More SVG CSS stuff that isn't needed anymore since SVG will use the
+ new HTML CSS implementation.
+ * rendering/style/SVGRenderStyle.h:
+ (WebCore::SVGRenderStyle::InheritedFlags::operator==):
+ (WebCore::SVGRenderStyle::setBitDefaults):
+ * rendering/style/SVGRenderStyleDefs.h:
+
+2009-10-01 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Use isClosure property of scope proxy to decide whether the
+ scope is a closure.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29965
+
+ * inspector/front-end/ScopeChainSidebarPane.js:
+ (WebInspector.ScopeChainSidebarPane.prototype.update):
+
+2009-10-01 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Odd color transitions on anchors with transition-property: all
+ https://bugs.webkit.org/show_bug.cgi?id=29911
+
+ When transitioning maybe-invalid colors, if the source and destination
+ color are both invalid, then don't animate.
+
+ This fixes an issue where a child element of an element running a color
+ transition, with -webkit-transition-property:all, would show a color change.
+ This happened because the "maybe invalid color" logic copied the color style
+ into -webkit-text-fill-color for both endpoints, causing -webkit-text-fill-color
+ to animate while the transition ran, and to then to disappear when the transition
+ finished.
+
+ Test: transitions/color-transition-all.html
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::PropertyWrapperMaybeInvalidColor::equals):
+ (WebCore::PropertyWrapperMaybeInvalidColor::blend):
+
+2009-10-01 Victor Wang <victorw@chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ Allow dragging a node who has child nodes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28632
+
+ Test: fast/events/drag-parent-node.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::shouldDragAutoNode):
+
+2009-10-01 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] media player: better mute support
+ https://bugs.webkit.org/show_bug.cgi?id=29960
+
+ Handle volume and mute state with the two corresponding properties
+ of playbin2.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::setMuted):
+ (WebCore::MediaPlayerPrivate::setVolume):
+
+2009-10-01 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] video sink pad template colorspace is wrong
+ https://bugs.webkit.org/show_bug.cgi?id=29953
+
+ Set sink pad template colorspace depending on byte order.
+
+ * platform/graphics/gtk/VideoSinkGStreamer.cpp:
+ (webkit_video_sink_idle_func):
+
+2009-10-01 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Refactored V8 event listeners:
+ (This change should fix http://crbug.com/21079 and
+ https://bugs.webkit.org/show_bug.cgi?id=29093.)
+ o All listeners use weak handles to JS objects to avoid creating
+ cycles and leaking memory.
+ o "Object" variants of listeners removed.
+ o All event accessor callbacks are generated.
+ o Custom event accessors removed.
+ o All wrappers have hidden dependencies on their listeners to
+ prevent listeners from being collected.
+ o All variats of getEventListener function grouped in V8DOMWrapper.
+ o Pointers to C+EventListener wrappers are stored in JS objects
+ instead of event listener lists.
+ https://bugs.webkit.org/show_bug.cgi?id=29825
+
+ * WebCore.gypi: Removed "Object" listeners.
+ * bindings/scripts/CodeGeneratorV8.pm: Now handles event accessors.
+ * bindings/v8/DOMObjectsInclude.h:
+
+ V8AbstractEventListener manages weak JS handle:
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::weakEventListenerCallback):
+ (WebCore::V8AbstractEventListener::V8AbstractEventListener):
+ (WebCore::V8AbstractEventListener::~V8AbstractEventListener):
+ (WebCore::V8AbstractEventListener::handleEvent):
+ (WebCore::V8AbstractEventListener::disposeListenerObject):
+ (WebCore::V8AbstractEventListener::setListenerObject):
+ * bindings/v8/V8AbstractEventListener.h:
+ (WebCore::V8AbstractEventListener::cast):
+ (WebCore::V8AbstractEventListener::isLazy):
+ (WebCore::V8AbstractEventListener::getListenerObject):
+ (WebCore::V8AbstractEventListener::getExistingListenerObject):
+ (WebCore::V8AbstractEventListener::hasExistingListenerObject):
+ (WebCore::V8AbstractEventListener::disconnectFrame):
+ (WebCore::V8AbstractEventListener::disconnected):
+ (WebCore::V8AbstractEventListener::prepareListenerObject):
+ (WebCore::V8AbstractEventListener::lineNumber):
+ (WebCore::V8AbstractEventListener::virtualisAttribute):
+
+ Grouped getEventListener functions:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ (WebCore::V8DOMWrapper::getEventListener):
+ * bindings/v8/V8DOMWrapper.h:
+
+ Removed most event listener objects bookkeeping:
+ * bindings/v8/V8EventListenerList.cpp:
+ * bindings/v8/V8EventListenerList.h:
+ (WebCore::V8EventListenerList::findWrapper):
+ (WebCore::V8EventListenerList::clearWrapper):
+ (WebCore::V8EventListenerList::doFindWrapper):
+ (WebCore::V8EventListenerList::getHiddenProperty):
+ (WebCore::V8EventListenerList::findOrCreateWrapper):
+
+ Added hidden properties for storing EventListener wrappers:
+ * bindings/v8/V8HiddenPropertyName.cpp:
+ (WebCore::V8HiddenPropertyName::listener):
+ (WebCore::V8HiddenPropertyName::attributeListener):
+ * bindings/v8/V8HiddenPropertyName.h:
+
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::V8LazyEventListener):
+ (WebCore::V8LazyEventListener::callListenerFunction):
+ (WebCore::V8LazyEventListener::prepareListenerObject):
+ * bindings/v8/V8LazyEventListener.h:
+ (WebCore::V8LazyEventListener::isLazy):
+ * bindings/v8/V8ObjectEventListener.cpp: Removed.
+ * bindings/v8/V8ObjectEventListener.h: Removed.
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::disconnectFrame):
+ (WebCore::V8Proxy::disconnectEventListeners):
+ * bindings/v8/V8Proxy.h:
+ * bindings/v8/V8WorkerContextEventListener.cpp:
+ (WebCore::V8WorkerContextEventListener::reportError):
+ (WebCore::V8WorkerContextEventListener::getReceiverObject):
+ * bindings/v8/V8WorkerContextEventListener.h:
+ * bindings/v8/V8WorkerContextObjectEventListener.cpp: Removed.
+ * bindings/v8/V8WorkerContextObjectEventListener.h: Removed.
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::dispose):
+ (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
+ (WebCore::WorkerContextExecutionProxy::findOrCreateEventListener):
+ * bindings/v8/WorkerContextExecutionProxy.h:
+ * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8CustomEventListener.cpp:
+ (WebCore::V8EventListener::V8EventListener):
+ (WebCore::V8EventListener::getListenerFunction):
+ (WebCore::V8EventListener::callListenerFunction):
+ * bindings/v8/custom/V8CustomEventListener.h:
+ * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
+ * bindings/v8/custom/V8MessagePortCustom.cpp:
+ (WebCore::getEventListener):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8NodeCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8NotificationCenterCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WebSocketCustom.cpp:
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
+
+2009-10-01 Alexis Menard <alexis.menard@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Rename QWebGraphicsItem to QGraphicsWebView
+
+ * WebCore.pro:
+
+2009-10-01 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Read-only transactions do not change file sizes and therefore
+ should not trigger quota updates.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29945
+
+ * storage/SQLTransaction.cpp:
+ (WebCore::SQLTransaction::openTransactionAndPreflight):
+ (WebCore::SQLTransaction::runStatements):
+
+2009-09-30 Timothy Hatcher <timothy@apple.com>
+
+ Fix list box scrolling by correctly overriding the scroll()
+ function on RenderBox.
+
+ <rdar://problem/7255440> REGRESSION (r48683): Mousewheel scrolling
+ of listboxes is broken (29756)
+
+ Reviewed by Dan Bernstein.
+
+ * rendering/RenderListBox.cpp:
+ (WebCore::RenderListBox::scroll):
+ * rendering/RenderListBox.h:
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::scroll):
+ * rendering/RenderTextControlSingleLine.h:
+
+2009-10-01 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Make a copy of listeners array before dispatching an event in
+ WebInspector.Object.prototype.dispatchEventToListeners. Otherwise if current
+ listener removes itself from the array next listener will be skipped.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29920
+
+ * inspector/front-end/Object.js:
+ (WebInspector.Object.prototype.dispatchEventToListeners): make a copy of listeners array before dispatching an event
+
+2009-10-01 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] GtkIMContext filtering interferes with DOM key events
+ https://bugs.webkit.org/show_bug.cgi?id=28733
+
+ Ensure that keyboard events filtered by the GtkIMContext still create
+ the proper DOM events.
+
+ No tests added. Instead previously skipped tests have been enabled.
+
+ * platform/gtk/KeyEventGtk.cpp:
+ (WebCore::keyIdentifierForGdkKeyCode):
+ (WebCore::singleCharacterString):
+
+2009-10-01 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] data: uri support in media player
+ https://bugs.webkit.org/show_bug.cgi?id=29842
+
+ New GStreamer element to handle data: uris. For now only base64
+ encoded data is supported. Decoded data is handed over to
+ giostreamsrc.
+
+ * GNUmakefile.am:
+ * platform/graphics/gtk/DataSourceGStreamer.cpp: Added.
+ (_do_init):
+ (webkit_data_src_base_init):
+ (webkit_data_src_class_init):
+ (webkit_data_src_reset):
+ (webkit_data_src_init):
+ (webkit_data_src_finalize):
+ (webkit_data_src_uri_get_type):
+ (webkit_data_src_uri_get_protocols):
+ (webkit_data_src_uri_get_uri):
+ (webkit_data_src_uri_set_uri):
+ (webkit_data_src_uri_handler_init):
+ * platform/graphics/gtk/DataSourceGStreamer.h: Added.
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::do_gst_init):
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::mimeTypeCache):
+
+2009-09-30 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29944
+
+ Reduces false positives in the XSSAuditor by explicitly allowing requests
+ that do not contain illegal URI characters.
+
+ As a side effect of this change, the tests property-inject.html,
+ property-escape-noquotes.html, and property-escape-noquotes-tab-slash-chars.html
+ fail because these attacks do not contain any illegal URI characters and
+ thus are now allowed by the XSSAuditor, where previously they weren't. A future
+ change may reinstate this functionality.
+
+ Tests: http/tests/security/xssAuditor/script-tag-safe2.html
+ http/tests/security/xssAuditor/script-tag-safe3.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::isIllegalURICharacter): Added method.
+ (WebCore::XSSAuditor::canEvaluate):
+ (WebCore::XSSAuditor::canCreateInlineEventListener):
+ (WebCore::XSSAuditor::findInRequest): Added parameter
+ allowRequestIfNoIllegalURICharacters.
+ * page/XSSAuditor.h:
+
+2009-09-30 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ reproducible freeze and crash on closing form popup at bosch-home.nl
+ https://bugs.webkit.org/show_bug.cgi?id=28948
+
+ showModalDialog calls getDirect on what is actually a window shell,
+ so ends up not getting a value (since no value can ever be placed
+ directly on the shell), which leads to incorrect behaviour.
+
+ We use a manual test rather than automatic as it was not
+ possible to get a modal run loop to work inside DRT.
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::showModalDialog):
+ * manual-tests/showModalDialog-returnValue.html: manual testcase.
+
+2009-09-30 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Adds ValidityState.tooLong support for <input> and <textarea>.
+
+ Introduces tooLong() in HTMLFormControlElement and it always returns false.
+ HTMLInputElement and HTMLTextAreaElement overrides it and checks the text
+ length and maxLength. tooLong() should work only for `dirty' values.
+ So, introduces m_isDirty flag for HTMLTextAreaElement, and
+ !m_data.value().isNull() works as a dirty flag for HTMLInputElement.
+
+ Renames parameter names of setMaxLength().
+
+ https://bugs.webkit.org/show_bug.cgi?id=27454
+
+ Tests: fast/forms/ValidityState-tooLong-input.html
+ fast/forms/ValidityState-tooLong-textarea.html
+
+ * html/HTMLFormControlElement.h:
+ (WebCore::HTMLFormControlElement::tooLong):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::tooLong):
+ (WebCore::HTMLInputElement::setMaxLength):
+ * html/HTMLInputElement.h:
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
+ (WebCore::HTMLTextAreaElement::reset):
+ (WebCore::HTMLTextAreaElement::updateValue):
+ (WebCore::HTMLTextAreaElement::setMaxLength):
+ (WebCore::HTMLTextAreaElement::tooLong):
+ * html/HTMLTextAreaElement.h:
+ * html/ValidityState.h:
+ (WebCore::ValidityState::tooLong):
+
+2009-09-30 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Factor RedirectScheduler out of FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=29948
+
+ This change introduces a new sub-object of Frame, redirectScheduler.
+ The redirectScheduler is responsible for scheduling redirects.
+
+ This change leaves the code for the redirectScheduler in
+ FrameLoader.cpp. A future change will move the class into its own
+ file.
+
+ No behavior change (hopefully!).
+
+ * loader/FrameLoader.cpp:
+ (WebCore::RedirectScheduler::RedirectScheduler):
+ (WebCore::RedirectScheduler::~RedirectScheduler):
+ (WebCore::RedirectScheduler::redirectScheduledDuringLoad):
+ (WebCore::RedirectScheduler::clear):
+ (WebCore::FrameLoader::FrameLoader):
+ (WebCore::FrameLoader::setDefersLoading):
+ (WebCore::FrameLoader::stopLoading):
+ (WebCore::FrameLoader::didOpenURL):
+ (WebCore::FrameLoader::didExplicitOpen):
+ (WebCore::FrameLoader::cancelAndClear):
+ (WebCore::FrameLoader::clear):
+ (WebCore::FrameLoader::checkCompleted):
+ (WebCore::FrameLoader::isScheduledLocationChangePending):
+ (WebCore::FrameLoader::scheduleHTTPRedirection):
+ (WebCore::RedirectScheduler::scheduleRedirect):
+ (WebCore::RedirectScheduler::mustLockBackForwardList):
+ (WebCore::FrameLoader::scheduleLocationChange):
+ (WebCore::RedirectScheduler::scheduleLocationChange):
+ (WebCore::FrameLoader::scheduleFormSubmission):
+ (WebCore::RedirectScheduler::scheduleFormSubmission):
+ (WebCore::FrameLoader::scheduleRefresh):
+ (WebCore::RedirectScheduler::scheduleRefresh):
+ (WebCore::RedirectScheduler::locationChangePending):
+ (WebCore::FrameLoader::scheduleHistoryNavigation):
+ (WebCore::RedirectScheduler::scheduleHistoryNavigation):
+ (WebCore::RedirectScheduler::timerFired):
+ (WebCore::FrameLoader::provisionalLoadStarted):
+ (WebCore::RedirectScheduler::schedule):
+ (WebCore::RedirectScheduler::startTimer):
+ (WebCore::RedirectScheduler::cancel):
+ (WebCore::FrameLoader::completed):
+ (WebCore::FrameLoader::open):
+ * loader/FrameLoader.h:
+ (WebCore::FrameLoader::committedFirstRealDocumentLoad):
+ * page/Frame.cpp:
+ (WebCore::Frame::Frame):
+ (WebCore::Frame::redirectScheduler):
+ * page/Frame.h:
+
+2009-09-30 Maciej Stachowiak <mjs@apple.com>
+
+ Build fix, not reviewed.
+
+ More Windows build fixes for https://bugs.webkit.org/show_bug.cgi?id=29943
+
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::willSendRequest):
+
+2009-09-30 Maciej Stachowiak <mjs@apple.com>
+
+ Build fix, not reviewed.
+
+ Fix windows build for fix for https://bugs.webkit.org/show_bug.cgi?id=29943
+
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::willSendRequest):
+
+2009-09-30 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [V8] HTMLAudioElement, HTMLImageElement, and HTMLOptionElement are constructable, but they shouldn't be.
+ Only Audio, Image, and Option should be constructable.
+ https://bugs.webkit.org/show_bug.cgi?id=29940
+
+ Test: fast/dom/dom-constructor.html
+
+ * WebCore.gypi: Added new files to project.
+ * bindings/scripts/CodeGeneratorV8.pm: Modified to generate custom constructors.
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate): Removed handling of HTMLImageElement, HTMLOptionElement
+ and HTMLAudioElement construction.
+ * bindings/v8/V8HTMLAudioElementConstructor.h: Added.
+ * bindings/v8/V8HTMLImageElementConstructor.h: Added.
+ * bindings/v8/V8HTMLOptionElementConstructor.h: Added.
+ * bindings/v8/V8Index.cpp: Added new headers.
+ * bindings/v8/V8Index.h: Added Audio, Image and Option decls.
+ * bindings/v8/custom/V8CustomBinding.h: Ditto.
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::ACCESSOR_GETTER): Added custom constructors.
+ * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
+ (WebCore::V8HTMLImageElementConstructor::GetTemplate): Added custom template creator.
+ * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
+ (WebCore::V8HTMLOptionElementConstructor::GetTemplate): Ditto.
+ * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
+ (WebCore::V8HTMLImageElementConstructor::GetTemplate): Ditto.
+
+2009-09-30 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ 307 redirects should pass along http body and Content-Type header
+ https://bugs.webkit.org/show_bug.cgi?id=29943
+
+ Follow-up fix for:
+ <rdar://problem/3802660> SAP: 307 (Temporary Redirect) responses should use POST, not GET
+
+ Test: http/tests/loading/resources/redirect-methods-result.php
+
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::willSendRequest): Pass along http body and Content-Type header.
+ * platform/network/mac/ResourceHandleMac.mm:
+ (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): ditto
+
+2009-09-30 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Fixed https://bugs.webkit.org/show_bug.cgi?id=29941
+ REGRESSION (r48882-r48888): Many memory leaks on SnowLeopard leaks bot
+
+ Forgot to implement a destructor for JSDOMWindowBaseData, so it was
+ leaking its RefPtr data member.
+
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::JSDOMWindowBase::destroyJSDOMWindowBaseData):
+ * bindings/js/JSDOMWindowBase.h:
+ (WebCore::JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData::JSDOMWindowBaseData):
+
+2009-09-30 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Make sure the removal of user stylesheets results in all of the WebViews being updated to
+ reflect the changes.
+
+ * page/PageGroup.cpp:
+ (WebCore::PageGroup::removeUserContentWithURLForWorld):
+ (WebCore::PageGroup::removeUserContentForWorld):
+
+2009-09-30 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ REGRESSION(r47440): drop down menus at americanexpress.com disappear on mouse out
+ https://bugs.webkit.org/show_bug.cgi?id=29209
+
+ Test: fast/inline/relative-positioned-overflow.html
+
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::computeVerticalOverflow): Add self-painting
+ inlines to overflow to ensure that they are included in hit-testing.
+
+2009-09-30 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ transforms/3d tests are not run in Release builds
+ https://bugs.webkit.org/show_bug.cgi?id=29827
+
+ Make sure we export the WebCoreHas3DRendering symbol in Release builds,
+ because this symbols is used by run-webkit-tests (via 'nm') to detect whether
+ WebCore was built with ENABLE_3D_RENDERING turned on.
+
+ * DerivedSources.make:
+ * WebCore.3DRendering.exp: Added.
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-09-30 Jeremy Orlow <jorlow@chromium.org>
+
+ Build fix for QT. Didn't know WebCore.pro existed.
+
+ * WebCore.pro:
+
+2009-09-30 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Add a method for removal of user scripts and stylesheets by URL from a specific world.
+
+ * page/PageGroup.cpp:
+ (WebCore::PageGroup::removeUserContentURLForWorld):
+ * page/PageGroup.h:
+
+2009-09-30 Chris Hawk <hawk@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix for conditionals in the WebCore gyp file, which contained two separate
+ 'conditions' values for the webcore target. The first entry was ignored,
+ resulting in some missine defines.
+ https://bugs.webkit.org/show_bug.cgi?id=29907
+
+ * WebCore.gyp/WebCore.gyp:
+
+2009-09-21 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ DOM Storage needs to be more careful about where "ThreadSafe" objects are destroyed.
+ https://bugs.webkit.org/show_bug.cgi?id=29265
+
+ DOM Storage needs to be more careful about where "ThreadSafe" objects are
+ destroyed. With the current code, there actually isn't a race condition, but
+ it sure would be easy for someone to introduce one. A bunch of
+ ThreadSafeShared objects have RefPtrs to objects that are NOT ThreadSafeShared
+ objects. If it were possible any of these objects' destructors to be fired off
+ the main thread, then the you'd have a race condition. The code should be more
+ clear and self-documenting about how things related to each other.
+
+ Since the lifetime of a LocalStorageTask is bounded by the LocalStorageThread
+ which is bounded by the StorageSyncManager, StorageAreaImpl, and
+ StorageAreaSync, there's no reason for LocalStorageTask to store anything other
+ than pointers. By breaking this dependency, we can eliminate the risk.
+
+ Note that we _could_ have LocalStorageThread's task queue just store
+ LocalStorageTask*'s rather than RefPtr<LocalStorageTask>s but then we'd need to
+ manually take care of deleting. It'd probably also be possible to change
+ LocalStorageThread around so that it needn't hold onto a reference of itself
+ and have a more deterministic shutdown, but my initial attempts to do so
+ failed, and I decided it wasn't worth changing. The queue is killed before
+ hand, so the thread is 100% impotent before the main thread continues anyway.
+
+ The constructors and destructors of StorageSyncManager, StorageAreaImpl, and
+ StorageAreaSync now have ASSERTs to verify they're running on the main thread.
+ I'm fairly positive that it'd be impossible to hit these asserts and the fact
+ that these classes are no longer ThreadSafeShared should make it clear how
+ they're meant to be used, but I think it's worth it to be extra sure. Of
+ course, ideally, we'd have such an assert every time a ref is incremented or
+ decremented.
+
+ Behavior should be unchanged and this is just an internal code cleanup, so no
+ new tests.
+
+ * storage/LocalStorageTask.cpp:
+ (WebCore::LocalStorageTask::LocalStorageTask):
+ (WebCore::LocalStorageTask::performTask):
+ * storage/LocalStorageTask.h:
+ (WebCore::LocalStorageTask::createImport):
+ (WebCore::LocalStorageTask::createSync):
+ (WebCore::LocalStorageTask::createTerminate):
+ * storage/LocalStorageThread.cpp:
+ (WebCore::LocalStorageThread::scheduleImport):
+ (WebCore::LocalStorageThread::scheduleSync):
+ * storage/LocalStorageThread.h:
+ * storage/StorageArea.h:
+ * storage/StorageAreaImpl.cpp:
+ (WebCore::StorageAreaImpl::~StorageAreaImpl):
+ (WebCore::StorageAreaImpl::StorageAreaImpl):
+ * storage/StorageAreaSync.cpp:
+ (WebCore::StorageAreaSync::StorageAreaSync):
+ (WebCore::StorageAreaSync::~StorageAreaSync):
+ * storage/StorageSyncManager.cpp:
+ (WebCore::StorageSyncManager::StorageSyncManager):
+ (WebCore::StorageSyncManager::~StorageSyncManager):
+ (WebCore::StorageSyncManager::scheduleImport):
+ (WebCore::StorageSyncManager::scheduleSync):
+ * storage/StorageSyncManager.h:
+
+2009-09-28 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Chromium needs to be able to override the way storage events are delivered
+ https://bugs.webkit.org/show_bug.cgi?id=29655
+
+ Chromium needs to be able to override the way storage events are delivered.
+ This replaced https://bugs.webkit.org/show_bug.cgi?id=29257 because it'll be
+ faster (no vtables and extra allocation) and somewhat cleaner (no dependency
+ injection). This is necessary because Chromium needs to transport events across
+ a process barrier and then dispatch them without use of a Frame*.
+
+ Behavior should not change with this, so no updates to tests.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * storage/StorageAreaImpl.cpp:
+ (WebCore::StorageAreaImpl::setItem):
+ (WebCore::StorageAreaImpl::removeItem):
+ (WebCore::StorageAreaImpl::clear):
+ * storage/StorageAreaImpl.h:
+ * storage/StorageEventDispatcher.cpp: Copied from WebCore/storage/StorageAreaImpl.cpp.
+ (WebCore::StorageEventDispatcher::dispatch):
+ * storage/StorageEventDispatcher.h: Added. (Well, technically in the other half of this patch.)
+
+2009-09-30 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Need to check NULL frame in EventHandler::updateDragAndDrop.
+ https://bugs.webkit.org/show_bug.cgi?id=29929
+
+ Test: http/tests/misc/drag-over-iframe-invalid-source-crash.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::updateDragAndDrop):
+
+2009-09-29 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ ASSERTION FAILED: !repaintContainer || repaintContainer == this
+ https://bugs.webkit.org/show_bug.cgi?id=29755
+
+ Generalize the fix for this bug to account for cases where there may be multiple
+ containing blocks between the repaint container, and the container of the element
+ being repainted.
+
+ Test: compositing/repaint/opacity-between-absolute2.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::mapLocalToContainer):
+ Call offsetFromAncestorContainer() to get the correct offset.
+
+ (WebCore::RenderBox::computeRectForRepaint): Ditto
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::computeRectForRepaint): Ditto.
+
+ * rendering/RenderObject.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::offsetFromAncestorContainer):
+ New method that computes an offset from some object in the ancestor container() chain.
+
+2009-09-30 Andras Becsi <becsi.andras@stud.u-szeged.hu>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix TextCodecQt::decode method after r48752 to return a non-null string if the length of the input is 0.
+ This fixes https://bugs.webkit.org/show_bug.cgi?id=29736.
+
+ * platform/text/qt/TextCodecQt.cpp:
+ (WebCore::TextCodecQt::decode):
+
+2009-09-29 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Fix a couple of bugs with patterns. Move the setting of the document URL to before the style
+ selector gets constructed so that pattern match testing gets the correct URL.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::begin):
+ * page/UserContentURLPattern.cpp:
+ (WebCore::UserContentURLPattern::parse):
+
+2009-09-29 Alexey Proskuryakov <ap@apple.com>
+
+ Rubber-stamped by Brady Eidson.
+
+ Assertion failure in http/tests/xmlhttprequest/failed-auth.html.
+
+ I couldn't find out why this only started to happen now, but it was incorrect to check
+ persistence of a credential returned by CredentialStorage::get() without checking that it
+ was non-null. When there is no credential for the protection space in storage, get()
+ returns a new object, and Credentil constructor doesn't initialize m_persistence.
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Moved the
+ assertion after credential null check.
+ (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Added the same persistence
+ assertion, matching sync code (and CF one, as well).
+
+2009-09-29 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Darin Adler.
+
+ Add an ASSERT for UTF8Encoding().isValid()
+ https://bugs.webkit.org/show_bug.cgi?id=29908
+
+ * platform/text/TextEncoding.cpp:
+ (WebCore::UTF8Encoding):
+
+2009-09-29 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29892
+ Add support for whitelist patterns to control conditional injection of user scripts and
+ user stylesheets.
+
+ No new tests. Not testable until WebKit portion is added in followup patch.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * dom/Document.cpp:
+ (WebCore::Document::pageGroupUserSheets):
+ * page/Frame.cpp:
+ (WebCore::Frame::injectUserScriptsForWorld):
+ * page/UserContentURLPattern.cpp: Added.
+ (WebCore::UserContentURLPattern::matchesPatterns):
+ (WebCore::UserContentURLPattern::parse):
+ (WebCore::UserContentURLPattern::matches):
+ (WebCore::UserContentURLPattern::matchesHost):
+ (WebCore::MatchTester::MatchTester):
+ (WebCore::MatchTester::testStringFinished):
+ (WebCore::MatchTester::patternStringFinished):
+ (WebCore::MatchTester::eatWildcard):
+ (WebCore::MatchTester::eatSameChars):
+ (WebCore::MatchTester::test):
+ (WebCore::UserContentURLPattern::matchesPath):
+ * page/UserContentURLPattern.h: Added.
+ (WebCore::UserContentURLPattern::UserContentURLPattern):
+ (WebCore::UserContentURLPattern::scheme):
+ (WebCore::UserContentURLPattern::host):
+ (WebCore::UserContentURLPattern::path):
+ (WebCore::UserContentURLPattern::matchSubdomains):
+
+2009-09-29 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Reproducible crash pressing return inside quoted content
+ at WebCore::BreakBlockquoteCommand::doApply.
+ <rdar://problem/7085453>
+ In some case, like the one provided in the test case, m_downStreamEnd
+ refers to a node that gets deleted when executing the DeleteSelectionCommand.
+ We shouldn't use m_downStreamEnd to recalculate the new m_endPosition when
+ pruning is needed, because it may be point to a node that has been deleted, but
+ rather rely on removeNode in CompositeEditCommand to update m_endPosition correctly.
+
+ Test: editing/selection/blockquote-crash.html
+
+ * editing/BreakBlockquoteCommand.cpp:
+ (WebCore::BreakBlockquoteCommand::doApply): Added check for invalid position
+ to avoid dereferencing a null node pointer.
+ * editing/DeleteSelectionCommand.cpp:
+ (WebCore::DeleteSelectionCommand::mergeParagraphs): Don't reset m_endPosition
+ using the value in m_downStreamEnd when it is necessary to prune the start block.
+
+2009-09-29 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ Basic authentication credentials are not sent automatically to top resources
+ https://bugs.webkit.org/show_bug.cgi?id=29901
+
+ No new tests - I don't want to pollute root directory of http tests to check for this rather
+ minor issue.
+
+ * platform/network/CredentialStorage.cpp:
+ (WebCore::CredentialStorage::set): Changed to always preserve leading slash.
+ (WebCore::CredentialStorage::getDefaultAuthenticationCredential): Made breaking out of the
+ loop more explicit.
+
+2009-09-29 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ Web Inspector REGRESSION(r47820-r47822): Profiles aren't
+ added to the inspector unless the inspector is already open
+ when the profile completes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29897
+
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype._populateProfiles):
+
+2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Rubberstamped by David Hyatt.
+
+ Fix to logic of earlier commit 48902.
+
+ When merging two if's before committing, I forgot to invert the
+ bool check.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::ignoreHttpError):
+
+2009-09-29 Stephen White <senorblanco@chromium.org>
+
+ Unreviewed, build fix.
+
+ Fixing Chromium build, following r48884.
+
+ [https://bugs.webkit.org/show_bug.cgi?id=29894]
+
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::handleEvent):
+ * bindings/v8/V8AbstractEventListener.h:
+ * bindings/v8/V8WorkerContextEventListener.cpp:
+ (WebCore::V8WorkerContextEventListener::handleEvent):
+ * bindings/v8/V8WorkerContextEventListener.h:
+
+2009-09-29 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Follows HTML5's maxLength change in September 2009.
+ - Change HTMLTextAreaElement.maxLength type to signed.
+ - HTMLTextAreaElement.maxLength returns -1 if maxlength= attribute is missing.
+ - HTMLTextAreaElement.maxLength and HTMLInputElement.maxLength
+ throw INDEX_SIZE_ERR for setting negative values.
+ https://bugs.webkit.org/show_bug.cgi?id=29796
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::setMaxLength):
+ * html/HTMLInputElement.h:
+ * html/HTMLInputElement.idl:
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
+ (WebCore::HTMLTextAreaElement::maxLength):
+ (WebCore::HTMLTextAreaElement::setMaxLength):
+ * html/HTMLTextAreaElement.h:
+ * html/HTMLTextAreaElement.idl:
+
+2009-09-29 Dimitri Glazkov <dglazkov@chromium.org>
+
+ No review, rolling out r48894, because review discussion was not complete.
+ http://trac.webkit.org/changeset/48894
+
+ * platform/sql/SQLiteTransaction.cpp:
+ (WebCore::SQLiteTransaction::begin):
+
+2009-09-29 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVG Filter feComposite implementation is missing
+ [https://bugs.webkit.org/show_bug.cgi?id=28362]
+
+ feComposite implementation for SVG.
+
+ Test: svg/filters/feComposite.svg
+
+ * platform/graphics/filters/FEComposite.cpp:
+ (WebCore::arithmetic):
+ (WebCore::FEComposite::apply):
+
+2009-09-29 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Starting all read-only transactions with an explicit BEGIN
+ DEFERRED command instead of BEGIN, since some ports (chromium)
+ might compile their own SQLite library and set BEGIN to BEGIN
+ IMMEDIATE by default; which would result in a deadlock in case of
+ two concurrent read-only transactions on the same DB, and would
+ unnecessarily delay other potential transactions to the same DB.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29729
+
+ * platform/sql/SQLiteTransaction.cpp:
+ (WebCore::SQLiteTransaction::begin):
+
+2009-09-29 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add support for run-time flag for 3D canvas
+ https://bugs.webkit.org/show_bug.cgi?id=29826
+
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::getContext): Check page settings for
+ experimental WebGL flag before returning 3D graphics context.
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings): Initialize new flag to false.
+ (WebCore::Settings::setExperimentalWebGLEnabled):
+ * page/Settings.h: Set new flag.
+ (WebCore::Settings::experimentalWebGLEnabled): Return new flag.
+
+2009-09-29 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Chromium needs to be able to override the way storage events are delivered - part 1
+ https://bugs.webkit.org/show_bug.cgi?id=29889
+
+ Chromium needs to be able to override the way storage events are delivered.
+ This replaced https://bugs.webkit.org/show_bug.cgi?id=29257 because it'll be
+ faster (no vtables and extra allocation) and somewhat cleaner (no dependency
+ injection). This is necessary because Chromium needs to transport events across
+ a process barrier and then dispatch them without use of a Frame*.
+
+ This patch should be a no-op for all ports other than Chromium.
+
+ * WebCore.gypi:
+ * storage/StorageEventDispatcher.h: Added.
+
+2009-09-29 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by NOBODY (missed file).
+
+ Adding file missed in previous commit.
+
+ * manual-tests/gtk/resources/long_cell.cur: Copied from WebCore/dom/PositionCreationFunctions.h.
+
+2009-09-29 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [V8] Correct an issue with XMLHttpRequest attribute event listeners never being cleared.
+ https://bugs.webkit.org/show_bug.cgi?id=29888
+
+ Test: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html
+
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::getEventListener): Added isAttribute parameter.
+ (WebCore::ACCESSOR_SETTER): Made all event listener setters create attribute listeners.
+ (WebCore::CALLBACK_FUNC_DECL): Made addEventListener create object listener.
+
+2009-09-22 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Fix corruption for non-square images.
+
+ [GTK] REGRESSION: BitmapImage::getGdkPixbuf fails for non-square images
+ https://bugs.webkit.org/show_bug.cgi?id=29654
+
+ Added an additional manual-test for this issue to the existing Gtk
+ cursor image test.
+
+ * manual-tests/gtk/cursor-image.html:
+ * manual-tests/gtk/resources/long_cell.cur: Added.
+ * platform/graphics/gtk/ImageGtk.cpp:
+ (WebCore::BitmapImage::getGdkPixbuf):
+
+2009-09-29 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Build fix - pass a proper ScriptExecutipnContext to getEventListenerHandlerBody()
+
+ * bindings/js/ScriptEventListener.cpp:
+ (WebCore::getEventListenerHandlerBody):
+ * bindings/js/ScriptEventListener.h:
+ * bindings/v8/ScriptEventListener.cpp:
+ (WebCore::getEventListenerHandlerBody):
+ * bindings/v8/ScriptEventListener.h:
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::buildObjectForEventListener):
+
+2009-09-29 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Ensure that we don't scroll lock to an anchor node after a
+ user-initiated scroll, even if that scroll doesn't propagate
+ all the way up to FrameView.
+
+ Test: fast/events/node-event-anchor-lock.html
+
+ * page/EventHandler.cpp: Call setFrameWasScrolledByUser() when a scroll is handled by a node rather than a frame.
+ (WebCore::EventHandler::scrollOverflow):
+ (WebCore::EventHandler::handleWheelEvent):
+ (WebCore::EventHandler::sendScrollEvent): Use setFrameWasScrolledByUser();
+ (WebCore::EventHandler::setFrameWasScrolledByUser): Split out of sendScrollEvent();
+ (WebCore::EventHandler::passMousePressEventToScrollbar):
+ * page/EventHandler.h: Declare setFrameWasScrolledByUser().
+
+2009-09-28 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler and Sam Weinig.
+
+ Onclick not fired for an element copied with cloneContents() or cloneNode()
+ https://bugs.webkit.org/show_bug.cgi?id=25130
+
+ The change here is that JS event listeners don't keep a reference to a global object from
+ where they were created, and instead take it as a parameter when parsing source code. Also,
+ the listener creation won't fail just because it happens for an element in a frameless
+ document.
+ Thus, moving nodes between documents no longer results in having incorrect registered
+ lazy event listeners on them.
+
+ Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
+ fast/events/attribute-listener-cloned-from-frameless-doc-context.html
+ fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
+ fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
+ fast/events/attribute-listener-extracted-from-frameless-doc-context.html
+
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
+ (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
+ getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
+ (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
+ (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
+ (WebCore::JSEventListener::reportError): Ditto.
+
+ * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
+ to JSDOMGlobalObject.
+
+ * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
+ creation was split between this function and ScriptEventListener; moved it here, as JS
+ global object can be different now.
+
+ * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
+ which can not be determined at parsing time.
+
+ * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
+ for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
+ expect that errors are logged at document parsing time, and because I don't know what other
+ side effects moving it vould have.
+
+ * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
+ because JSC needs a global context here.
+
+ * bindings/js/JSAbstractWorkerCustom.cpp:
+ (WebCore::JSAbstractWorker::addEventListener):
+ (WebCore::JSAbstractWorker::removeEventListener):
+ * bindings/js/JSDOMApplicationCacheCustom.cpp:
+ (WebCore::JSDOMApplicationCache::addEventListener):
+ (WebCore::JSDOMApplicationCache::removeEventListener):
+ * bindings/js/JSDOMGlobalObject.cpp:
+ (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::addEventListener):
+ (WebCore::JSDOMWindow::removeEventListener):
+ * bindings/js/JSEventSourceCustom.cpp:
+ (WebCore::JSEventSource::addEventListener):
+ (WebCore::JSEventSource::removeEventListener):
+ * bindings/js/JSMessagePortCustom.cpp:
+ (WebCore::JSMessagePort::addEventListener):
+ (WebCore::JSMessagePort::removeEventListener):
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::addEventListener):
+ (WebCore::JSNode::removeEventListener):
+ * bindings/js/JSSVGElementInstanceCustom.cpp:
+ (WebCore::JSSVGElementInstance::addEventListener):
+ (WebCore::JSSVGElementInstance::removeEventListener):
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::addEventListener):
+ (WebCore::JSWorkerContext::removeEventListener):
+ * bindings/js/JSXMLHttpRequestCustom.cpp:
+ (WebCore::JSXMLHttpRequest::addEventListener):
+ (WebCore::JSXMLHttpRequest::removeEventListener):
+ * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
+ (WebCore::JSXMLHttpRequestUpload::addEventListener):
+ (WebCore::JSXMLHttpRequestUpload::removeEventListener):
+ * bindings/objc/ObjCEventListener.h:
+ * bindings/objc/ObjCEventListener.mm:
+ (WebCore::ObjCEventListener::handleEvent):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::fireEventListeners):
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::handleEvent):
+ * inspector/InspectorDOMAgent.h:
+ * inspector/InspectorDOMStorageResource.cpp:
+ (WebCore::InspectorDOMStorageResource::handleEvent):
+ * inspector/InspectorDOMStorageResource.h:
+ * loader/ImageDocument.cpp:
+ (WebCore::ImageEventListener::handleEvent):
+ * svg/animation/SVGSMILElement.cpp:
+ (WebCore::ConditionEventListener::handleEvent):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::reportException):
+ Don't pass global object to JSEventListener::create(), which no longer needs it.
+ Note that some of these functions still have an early return for null global object, which
+ can probably be removed in a later patch.
+ Pass ScriptExecutionContext to EventListener methods that now need it.
+
+ * bindings/scripts/CodeGeneratorCOM.pm: Don't force EventTarget implementation on Node -
+ it doesn't work yet (it didn't quite work before this patch, too, because it assumed that
+ any object implementing EventTarget COM interface originated from WebCore).
+
+ * dom/EventListener.idl: Just like in ObjC, EventListener should be a pure interface in
+ COM bindings.
+
+2009-09-28 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Removed virtual destructor from JSGlobalObjectData to eliminate pointer
+ fix-ups when accessing JSGlobalObject::d.
+
+ Replaced with an explicit destructor function pointer.
+
+ * bindings/js/JSDOMGlobalObject.cpp:
+ (WebCore::JSDOMGlobalObject::destroyJSDOMGlobalObjectData):
+ * bindings/js/JSDOMGlobalObject.h:
+ (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
+
+2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Don't rely on QNetworkReply::NetworkError codes, but
+ on HTTP error codes instead.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::ignoreHttpError):
+ (WebCore::QNetworkReplyHandler::finish):
+
+2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Use const references when using Qt's foreach.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+
+2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Fix handling of QNetworkReply errors.
+
+ In the QNetworkReplyHandler::finish() a response was sent even when
+ the reply contained an error. This resulted in a sendResponseIfNeeded()
+ calling didReceiveResponse on the client, leading to the destruction
+ of the m_resourceHandle, discontinuing further processing in finish(),
+ and thus not calling didFail on the client.
+
+ Instead it continued as everything went fine, and
+ FrameLoaderClientQt::dispatchDecidePolicyForMIMEType() changed the
+ policy to PolicyDownload due to not being able to show the non existing
+ MIMEType. As the download also obviously fails, it ended up with a
+ policy change error.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::finish):
+
+2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ The code for showing error pages when the response was
+ a 401/403/404, was not actually doing so. This patch
+ fixes that.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::finish):
+
+2009-09-28 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ <rdar://problem/7259965> REGRESSION: http/tests/xmlhttprequest/cross-origin-authorization.html
+ is failing/crashing intermittently
+ https://bugs.webkit.org/show_bug.cgi?id=29322
+
+ This was caused by CStringBuffer::encodeBase64() returning a buffer that wasn't zero terminated.
+ The code had other issues as well, so I removed it altogether:
+ - it claimed to avoid some buffer copies, but it didn't;
+ - and I don't think that base64 encoding should be part of CString interface.
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::encodeBasicAuthorization): Encode username and password using Base64.h directly.
+ (WebCore::ResourceHandle::start): Use encodeBasicAuthorization().
+ (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]): Ditto.
+ (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): Extended logging
+ to synchronous case.
+ (-[WebCoreSynchronousLoader connectionShouldUseCredentialStorage:]): Ditto.
+ (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Ditto.
+ (-[WebCoreSynchronousLoader connection:didReceiveResponse:]): Ditto.
+ (-[WebCoreSynchronousLoader connection:didReceiveData:]): Ditto.
+ (-[WebCoreSynchronousLoader connectionDidFinishLoading:]): Ditto.
+ (-[WebCoreSynchronousLoader connection:didFailWithError:]): Ditto.
+
+ * platform/network/cf/ResourceHandleCFNet.cpp: Matched Mac changes.
+
+ * platform/text/CString.cpp:
+ * platform/text/CString.h:
+ (WebCore::CStringBuffer::create):
+ (WebCore::CStringBuffer::CStringBuffer):
+ Removed code that was added for Base64 in r48363.
+
+2009-09-29 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Fix typo in Localizations.cpp
+
+ https://bugs.webkit.org/show_bug.cgi?id=29872
+
+ * platform/qt/Localizations.cpp:
+ (WebCore::localizedMediaControlElementHelpText):
+
+2009-09-29 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Make the XSLT conditional in DOMWindow.idl's xsltProcessor
+ attribute conditional in the generated files, similar to
+ r44116.
+
+ * page/DOMWindow.idl:
+
+2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann and Tor Arne Vestbø.
+
+ Use the ResourceError as it is supposed to and handle
+ not HTTP errors from QNetworkReply.
+
+ Thanks to Adam Roben for his input.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::finish):
+
+2009-09-29 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Encapsulate JS listeners specifics into ScriptEventListener.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29816
+
+ * bindings/js/ScriptEventListener.cpp:
+ (WebCore::getEventListenerHandlerBody):
+ * bindings/js/ScriptEventListener.h:
+ * bindings/v8/ScriptEventListener.cpp:
+ (WebCore::getEventListenerHandlerBody):
+ * bindings/v8/ScriptEventListener.h:
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::buildObjectForEventListener):
+
+2009-09-29 Xan Lopez <xlopez@igalia.com>
+
+ Unreviewed attempt to fix the build.
+
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+
+2009-09-28 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Add experimentalWebSocketsEnabled in Settings.
+ https://bugs.webkit.org/show_bug.cgi?id=28941
+
+ * WebCore.base.exp:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::webSocket):
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getConstructor):
+ * bindings/v8/custom/V8WebSocketCustom.cpp:
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setExperimentalWebSocketsEnabled):
+ * page/Settings.h:
+ (WebCore::Settings::experimentalWebSocketsEnabled):
+
+2009-09-11 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add platform code to support WebSocket for chromium.
+ https://bugs.webkit.org/show_bug.cgi?id=29171
+
+ To build within chromium tree, it requires a patch in bug 29174.
+ Real implementation will be landed in chromium tree.
+
+ * WebCore.gypi:
+ * platform/network/chromium/SocketStreamError.h: Added.
+ (WebCore::SocketStreamError::SocketStreamError):
+ * platform/network/chromium/SocketStreamHandle.h: Added.
+ (WebCore::SocketStreamHandle::create):
+
+2009-09-28 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/7157288> Crash in RenderStyle::computedLineHeight()
+ when Times New Roman is not installed
+
+ * platform/graphics/win/FontCacheWin.cpp:
+ (WebCore::FontCache::getLastResortFallbackFont): If Times New Roman is
+ not available, use the Windows default GUI font.
+
+2009-09-28 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ Do not add platform-specific methods to cross-platform header
+ FileSystem.h per Darin's feedback for 29109.
+ https://bugs.webkit.org/show_bug.cgi?id=29830
+
+ * platform/FileSystem.h:
+ * platform/chromium/DragDataChromium.cpp:
+ (WebCore::DragData::asURL):
+ * platform/chromium/FileSystemChromium.cpp:
+
+2009-09-28 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Register Chromium's VFSs with a proper sqlite3_io_methods
+ finder. This should only affect the POSIX implementation. The
+ Windows change is included for consistency and in case sqlite
+ starts using something similar in its Windows VFS in the future.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29743
+
+ * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
+ (WebCore::SQLiteFileSystem::registerSQLiteVFS):
+ * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
+ (WebCore::SQLiteFileSystem::registerSQLiteVFS):
+
+2009-09-28 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Change the V8 bindings' handling of window.toString(),
+ so we return [object DOMWindow] (like JSC), not [object global].
+
+ https://bugs.webkit.org/show_bug.cgi?id=29742
+
+ This will fix a couple of Chromium port test failures and enable us to
+ use the default expectations for a bunch more.
+
+ * bindings/v8/custom/V8DOMWindowCustom.cpp: Use the DOMWindow wrapper instead
+ of the global object wrapper when it's available in the DOMWindow toString callback.
+
+2009-09-28 Nate Chapin <japhet@chromium.org>
+
+ Rubber stamped by David Levin.
+
+ Chromium build fix, add back in #include of V8Proxy.h in V8WebKitPointConstructor.cpp.
+
+ * bindings/v8/custom/V8WebKitPointConstructor.cpp: Re-include V8Proxy.h.
+
+2009-09-28 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ NotNullPassRefPtr: smart pointer optimized for passing references that are not null
+ https://bugs.webkit.org/show_bug.cgi?id=29822
+
+ Added NotNullPassRefPtr, and deployed it in all places that initialize
+ JavaScript objects.
+
+ * bindings/js/DOMObjectWithSVGContext.h:
+ (WebCore::DOMObjectWithSVGContext::DOMObjectWithSVGContext):
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::cacheDOMStructure):
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::DOMObject::DOMObject):
+ (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
+ (WebCore::DOMConstructorObject::DOMConstructorObject):
+ (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
+ * bindings/js/JSDOMGlobalObject.cpp:
+ (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
+ * bindings/js/JSDOMGlobalObject.h:
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::JSDOMWindowBase::JSDOMWindowBase):
+ * bindings/js/JSDOMWindowBase.h:
+ * bindings/js/JSHTMLAllCollection.h:
+ (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
+ * bindings/js/JSInspectedObjectWrapper.cpp:
+ (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper):
+ * bindings/js/JSInspectedObjectWrapper.h:
+ * bindings/js/JSInspectorCallbackWrapper.cpp:
+ (WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper):
+ * bindings/js/JSInspectorCallbackWrapper.h:
+ * bindings/js/JSQuarantinedObjectWrapper.cpp:
+ (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper):
+ * bindings/js/JSQuarantinedObjectWrapper.h:
+ * bindings/js/JSWorkerContextBase.cpp:
+ (WebCore::JSWorkerContextBase::JSWorkerContextBase):
+ * bindings/js/JSWorkerContextBase.h:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bridge/runtime_object.cpp:
+ (JSC::RuntimeObjectImp::RuntimeObjectImp):
+ * bridge/runtime_object.h:
+
+2009-09-28 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Allow V8 to handle x/y parameters in a WebKitPoint constructor.
+ https://bugs.webkit.org/show_bug.cgi?id=29823
+
+ Fixes V8's handling of LayoutTests/fast/dom/Window/webkitConvertPoint.html
+
+ * bindings/v8/custom/V8WebKitPointConstructor.cpp: Allow for x/y parameters in constructor.
+
+2009-09-28 Mark Rowe <mrowe@apple.com>
+
+ Fix the build by doing something approximating reasonableness in the Xcode project.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-09-28 Simon Hausmann <hausmann@webkit.org>
+
+ Prospective Tiger build fix.
+
+ * WebCore.xcodeproj/project.pbxproj: Try to use unique IDs for the new files.
+
+2009-09-28 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Add explicit frontend event for commit load.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29814
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::didCommitLoad):
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::didCommitLoad):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMAgent.prototype._setDocument):
+ * inspector/front-end/inspector.js:
+ (WebInspector.addResource):
+ (WebInspector.didCommitLoad):
+
+2009-09-28 Yaar Schnitman <yaar@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Chromium port - recognize we are being built independently
+ of chromium and look for dependencies under webkit/chromium rather
+ than chromium/src.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29722
+
+ * WebCore.gyp/WebCore.gyp: See above. Also removed a few files from
+ the sources list, since they are not supposed to be built here.
+
+2009-09-28 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Implement XSLT support with QtXmlPatterns.
+ https://bugs.webkit.org/show_bug.cgi?id=28303
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCoreSources.bkl:
+ * dom/Document.cpp:
+ (WebCore::Document::Document):
+ (WebCore::Document::~Document):
+ (WebCore::Document::setTransformSource):
+ * dom/Document.h:
+ (WebCore::Document::transformSource):
+ * dom/TransformSource.h: Added.
+ (WebCore::TransformSource::platformSource):
+ * dom/TransformSourceLibxslt.cpp: Added.
+ (WebCore::TransformSource::TransformSource): Wraps a libxml2 document.
+ (WebCore::TransformSource::~TransformSource):
+ * dom/TransformSourceQt.cpp: Added.
+ (WebCore::TransformSource::TransformSource): Wraps a plain string.
+ (WebCore::TransformSource::~TransformSource):
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::XMLTokenizer::doEnd):
+ * dom/XMLTokenizerQt.cpp:
+ (WebCore::XMLTokenizer::doEnd):
+ (WebCore::XMLTokenizer::parseProcessingInstruction):
+ * xml/XSLStyleSheet.h:
+ (WebCore::XSLStyleSheet::sheetString):
+ * xml/XSLStyleSheetLibxslt.cpp:
+ (WebCore::XSLStyleSheet::document):
+ * xml/XSLStyleSheetQt.cpp: Added.
+ * xml/XSLTProcessor.h:
+ * xml/XSLTProcessorLibxslt.cpp:
+ (WebCore::xmlDocPtrFromNode):
+ * xml/XSLTProcessorQt.cpp: Added.
+ (WebCore::XSLTMessageHandler::XSLTMessageHandler): A subclass of QAbstractMessageHandler.
+ (WebCore::XSLTMessageHandler::handleMessage): Forwards all processor messages to the Console.
+ (WebCore::XSLTProcessor::transformToString): Uses QXmlQuery.
+
+2009-09-28 Andrew Scherkus <scherkus@chromium.org>
+
+ Reviewed by Eric Carlson.
+
+ Delegate implementation of rendererIsNeeded() for media control elements to RenderTheme.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28689
+
+ Covered by LayoutTests/media/video-no-audio.html
+
+ * rendering/MediaControlElements.cpp: Removed subclass implementations of rendererIsNeeded().
+ (WebCore::MediaControlElement::rendererIsNeeded): Include calling shouldRenderMediaControlPart().
+ (WebCore::MediaControlInputElement::rendererIsNeeded): Include calling shouldRenderMediaControlPart().
+ * rendering/MediaControlElements.h:
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::shouldRenderMediaControlPart): New method. Contains logic moved from subclass implementations of rendererIsNeeded().
+ * rendering/RenderTheme.h:
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::shouldRenderMediaControlPart): Override to always render mute button.
+ * rendering/RenderThemeChromiumSkia.h:
+
+2009-09-28 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] DragData::asURL should return file URL.
+ https://bugs.webkit.org/show_bug.cgi?id=29109
+
+ Tested by LayoutTests/fast/events/drag-to-navigate.html.
+
+ * platform/FileSystem.h:
+ * platform/chromium/ChromiumBridge.h:
+ * platform/chromium/DragDataChromium.cpp:
+ (WebCore::DragData::asURL):
+ * platform/chromium/FileSystemChromium.cpp:
+ (WebCore::getAbsolutePath):
+ (WebCore::isDirectory):
+ (WebCore::filePathToURL):
+
+2009-09-28 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by David Levin.
+
+ [V8] Add a special case to handle index arguments, because we need to be
+ able to see if they're < 0.
+ https://bugs.webkit.org/show_bug.cgi?id=29810
+
+ Test: LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative.html
+
+ * bindings/scripts/CodeGeneratorV8.pm: Added special case (matching CodeGeneratorJS.pm)
+ for index arguments.
+
+2009-09-28 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Extend the MediaWiki/KHTMLFixes.css workaround to cover older MediaWiki versions
+ https://bugs.webkit.org/show_bug.cgi?id=29792
+
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::setCSSStyleSheet): If site specific hacks are
+ enabled, check if the linked style sheet is one of two versions of the
+ MediaWiki KHTMLFixes.css. If so, remove the offending rule.
+
+2009-09-28 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Fix an error in type logic in CodeGeneratorV8.pm, where
+ unsigned ints are accidentally used as signed.
+ https://bugs.webkit.org/show_bug.cgi?id=29810
+
+ Test: LayoutTests/fast/forms/textarea-maxlength.html
+
+ * bindings/scripts/CodeGeneratorV8.pm: Made sure "unsigned long" in IDL is
+ properly generates on "unsigned" return value.
+
+2009-09-28 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ Rename XSLStyleSheet.cpp to XSLStyleSheetLibxslt.cpp.
+ https://bugs.webkit.org/show_bug.cgi?id=28303
+
+ In preparation for adding XSLT support with QtXmlPatterns to the Qt
+ port, rename XSLStyleSheet.cpp to XSLStyleSheetLibxslt.cpp as we will
+ have our own implementation which most likely will not share any code
+ with the current one.
+
+ Additionally, fix some coding style issues.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * xml/XSLStyleSheet.cpp: Renamed to XSLStyleSheetLibxslt.cpp.
+ * xml/XSLStyleSheetLibxslt.cpp: Added.
+
+2009-09-28 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Prospective build fix for r48812.
+
+ Forgot to remove the inline reset() implementation when reverting the indentation
+ changes in the file.
+
+ * xml/XSLTProcessor.h:
+
+2009-09-28 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by nobody (trivial follow up fix), Joseph Pecoraro LGTM-ed.
+
+ Web Inspector: Follow up to r48809.
+ InspectorController.wrapObject should only be called on the inspectable page side.
+
+ https://bugs.webkit.org/show_bug.cgi?id=17429
+
+ * inspector/front-end/EventListenersSidebarPane.js:
+ (WebInspector.EventListenersSidebarPane.prototype.update.callback):
+ (WebInspector.EventListenersSidebarPane.prototype.update):
+ (WebInspector.EventListenersSection):
+ (WebInspector.EventListenersSection.prototype.update):
+ (WebInspector.EventListenerBar):
+ (WebInspector.EventListenerBar.prototype.update):
+
+2009-09-28 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ Move the libxslt specific part of XSLTProcessor to a separate file.
+ https://bugs.webkit.org/show_bug.cgi?id=28303
+
+ In preparation for adding XSLT support with QtXmlPatterns to the Qt
+ port, move the libxslt part of the XSLTProcessor implementation into
+ another file and leave the part that can be reused and shared.
+
+ Additionally, fix some coding style issues.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * xml/XSLTProcessor.cpp:
+ (WebCore::XSLTProcessor::createDocumentFromSource): Remove trailing whitespaces.
+ (WebCore::createFragmentFromSource): Remove trailing whitespaces.
+ (WebCore::XSLTProcessor::transformToFragment): Remove trailing whitespaces.
+ (WebCore::XSLTProcessor::reset): Moved out of the class definition.
+ * xml/XSLTProcessorLibxslt.cpp: Added.
+ (WebCore::XSLTProcessor::genericErrorFunc): Moved.
+ (WebCore::XSLTProcessor::parseErrorFunc): Moved.
+ (WebCore::docLoaderFunc): Moved.
+ (WebCore::setXSLTLoadCallBack): Moved.
+ (WebCore::writeToVector): Moved.
+ (WebCore::saveResultToString): Moved.
+ (WebCore::xsltParamArrayFromParameterMap): Moved.
+ (WebCore::freeXsltParamArray): Moved.
+ (WebCore::xsltStylesheetPointer): Moved.
+ (WebCore::xmlDocPtrFromNode): Moved.
+ (WebCore::resultMIMEType): Moved.
+ (WebCore::XSLTProcessor::transformToString): Moved.
+
+2009-09-28 Charles Wei <charles.wei@torchmobile.com.cn>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Fix the crash of SVG that crashes when use a non-exist symbol
+ https://bugs.webkit.org/show_bug.cgi?id=27693
+
+ Test: svg/custom/use-non-existing-symbol-crash.svg
+
+ * svg/SVGUseElement.cpp:
+ (WebCore::shadowTreeContainsChangedNodes):
+
+2009-09-28 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector Should Show Event Listeners/Handlers Registered on each Node
+ https://bugs.webkit.org/show_bug.cgi?id=17429
+
+ Extracted a method from dispatchEvent to get the event ancestor chain
+
+ * dom/Node.cpp:
+ (WebCore::Node::eventAncestors): the extracted method
+ (WebCore::Node::dispatchGenericEvent): use eventAncestors
+ * dom/Node.h:
+
+ Asynchronous Flow For the Inspector, Backend -> DOM Agent -> Frontend
+ The DOMAgent's getEventListenersForNode handles the logic of finding
+ all the relevant listeners in the event flow.
+
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::getEventListenersForNode):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::getEventListenersForNode):
+ (WebCore::InspectorDOMAgent::buildObjectForEventListener):
+ (WebCore::InspectorDOMAgent::buildObjectForNode): added localName
+ * inspector/InspectorDOMAgent.h:
+ (WebCore::EventListenerInfo::EventListenerInfo):
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::didGetEventListenersForNode):
+ * inspector/InspectorFrontend.h:
+ (WebCore::InspectorFrontend::scriptState):
+ * inspector/front-end/DOMAgent.js: added localName to WebInspector.DOMNode from payload
+ (WebInspector.EventListeners.getEventListenersForNodeAsync.mycallback):
+ (WebInspector.EventListeners.getEventListenersForNodeAsync):
+
+ New Sidebar Pane in the Element's Panel
+ Includes Gear Menu for filtering the Event Listeners on the
+ "Selected Node Only" or "All Nodes"
+
+ * inspector/front-end/ElementsPanel.js: Handles refreshing the Pane when necessary
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
+ (WebInspector.ElementsPanel):
+ (WebInspector.ElementsPanel.prototype.updateEventListeners):
+ * inspector/front-end/EventListenersSidebarPane.js: Added.
+ (WebInspector.EventListenersSidebarPane): The 1st level in the Pane
+ (WebInspector.EventListenersSidebarPane.prototype.update.callback):
+ (WebInspector.EventListenersSidebarPane.prototype.update):
+ (WebInspector.EventListenersSection): The 2nd level in the Pane
+ (WebInspector.EventListenersSection.prototype.update): filters on Preference
+ (WebInspector.EventListenersSection.prototype.addListener):
+ (WebInspector.EventListenerBar): The 3rd level in the Pane
+ (WebInspector.EventListenerBar.prototype._getNodeDisplayName):
+ (WebInspector.EventListenerBar.prototype._getFunctionDisplayName):
+ (WebInspector.EventListenersSidebarPane.prototype._changeSetting): For the Gear Menu
+
+ Consolidated "appropriateSelectorForNode"
+
+ * inspector/front-end/StylesSidebarPane.js:
+ * inspector/front-end/utilities.js:
+
+ Miscellaneous Updates
+
+ * English.lproj/localizedStrings.js: "Event Listeners", "No Event Listeners", "Selected Node Only", "All Nodes"
+ * WebCore.gypi: included the new inspector files
+ * WebCore.vcproj/WebCore.vcproj: included source files that were missing
+ * inspector/front-end/Images/grayConnectorPoint.png: Added. Thanks to Timothy Hatcher.
+ * inspector/front-end/Images/whiteConnectorPoint.png: Added. Thanks to Timothy Hatcher.
+ * inspector/front-end/inspector.js: Preferences for the Gear Menu Event Listeners filter
+ * inspector/front-end/inspector.css: reused as much as possible
+ * inspector/front-end/inspector.html: include the new script
+ * inspector/front-end/WebKit.qrc: included the new inspector files
+
+2009-09-27 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=29760
+ Implement CSSOM Range.getClientRects/getBoundingClientRect
+
+ Tests: fast/dom/Range/getBoundingClientRect-getClientRects-relative-to-viewport.html
+ fast/dom/Range/getBoundingClientRect.html
+ fast/dom/Range/getClientRects.html
+
+ * dom/Range.cpp:
+ (WebCore::Range::getClientRects):
+ (WebCore::Range::getBoundingClientRect):
+ (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoom):
+ (WebCore::Range::getBorderAndTextQuads):
+ * dom/Range.h:
+ * dom/Range.idl:
+ Implement Range.getClientRects/getBoundingClientRect.
+
+ * dom/Element.cpp:
+ * rendering/RenderObject.h:
+ (WebCore::adjustForAbsoluteZoom):
+ (WebCore::adjustIntRectForAbsoluteZoom):
+ (WebCore::adjustFloatPointForAbsoluteZoom):
+ (WebCore::adjustFloatQuadForAbsoluteZoom):
+ Move point/quad adjustment methods from Element.cpp to RenderObject.h
+ so that Range.cpp can use them as well.
+
+2009-09-27 Simon Hausmann <hausmann@webkit.org>
+
+ Unreviewed fix for WebInspector with Qt build.
+
+ Simply re-generate the Qt resource file by running
+ WebKitTools/Scripts/generate-qt-inspector-resource
+
+ * inspector/front-end/WebKit.qrc:
+
+2009-09-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by nobody (trivial ChangeLog fix).
+
+ Restore WebCore/ChangeLog truncated in r48778.
+
+2009-09-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: DOM store is being unbound twice, leading to assertion failure.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29770
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::didOpenDatabase):
+ (WebCore::InspectorController::didUseDOMStorage):
+ * inspector/InspectorDOMStorageResource.cpp:
+ (WebCore::InspectorDOMStorageResource::unbind):
+
+2009-09-26 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Do not track DOM changes while inspector window is closed.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29769
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
+ (WebCore::InspectorController::populateScriptObjects):
+ (WebCore::InspectorController::resetScriptObjects):
+ (WebCore::InspectorController::didCommitLoad):
+ * inspector/InspectorController.h:
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::setDocument):
+ * inspector/InspectorDOMAgent.h:
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::dispatchWindowObjectAvailable):
+ * page/android/InspectorControllerAndroid.cpp:
+ (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
+
+2009-09-26 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: [REGRESSION] Double Clicking Resources Fails to Open in New Window
+
+ https://bugs.webkit.org/show_bug.cgi?id=29762
+
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.setStyleText):
+ (InjectedScript.openInInspectedWindow):
+ * inspector/front-end/InjectedScriptAccess.js:
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
+
+2009-09-26 David Kilzer <ddkilzer@apple.com>
+
+ Part 2 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
+
+ Reviewed by Darin Adler.
+
+ Fix ENABLE_ORIENTATION_EVENTS for non-Mac platforms.
+
+ * DerivedSources.make: Moved Platform.h check for
+ ENABLE_ORIENTATION_EVENTS into Mac-only section and added
+ default of ENABLE_ORIENTATION_EVENTS = 0 to non-Mac section.
+ Added ifndef test to make it possible to override both
+ ENABLE_DASHBOARD_SUPPORT and ENABLE_ORIENTATION_EVENTS external
+ to the makefile. Moved addition of ENABLE_ORIENTATION_EVENTS to
+ ADDITIONAL_IDL_DEFINES to common section.
+ * GNUmakefile.am: Added support for ENABLE_ORIENTATION_EVENTS if
+ it is ever used.
+ * WebCore.pro: Ditto.
+
+2009-09-26 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by David Kilzer.
+
+ Move placeholder-related code to HTMLTextFormControlElement from
+ HTMLInputElement, WMLInputElement, InputElement, and
+ HTMLTextAreaElement.
+ https://bugs.webkit.org/show_bug.cgi?id=28703
+
+ * dom/InputElement.cpp:
+ (WebCore::InputElement::dispatchFocusEvent):
+ (WebCore::InputElement::dispatchBlurEvent):
+ (WebCore::InputElement::setValueFromRenderer):
+ * dom/InputElement.h:
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):
+ (WebCore::HTMLTextFormControlElement::~HTMLTextFormControlElement):
+ (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
+ (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
+ (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
+ (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
+ * html/HTMLFormControlElement.h:
+ (WebCore::HTMLTextFormControlElement::handleFocusEvent):
+ (WebCore::HTMLTextFormControlElement::handleBlurEvent):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::HTMLInputElement):
+ (WebCore::HTMLInputElement::handleFocusEvent):
+ (WebCore::HTMLInputElement::handleBlurEvent):
+ (WebCore::HTMLInputElement::parseMappedAttribute):
+ (WebCore::HTMLInputElement::createRenderer):
+ (WebCore::HTMLInputElement::setValue):
+ (WebCore::HTMLInputElement::setValueFromRenderer):
+ * html/HTMLInputElement.h:
+ (WebCore::HTMLInputElement::supportsPlaceholder):
+ (WebCore::HTMLInputElement::isEmptyValue):
+ * html/HTMLIsIndexElement.cpp:
+ (WebCore::HTMLIsIndexElement::parseMappedAttribute):
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
+ (WebCore::HTMLTextAreaElement::createRenderer):
+ * html/HTMLTextAreaElement.h:
+ (WebCore::HTMLTextAreaElement::supportsPlaceholder):
+ (WebCore::HTMLTextAreaElement::isEmptyValue):
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::RenderTextControl):
+ * rendering/RenderTextControl.h:
+ * rendering/RenderTextControlMultiLine.cpp:
+ (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
+ * rendering/RenderTextControlMultiLine.h:
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
+ (WebCore::RenderTextControlSingleLine::updateFromElement):
+ * rendering/RenderTextControlSingleLine.h:
+ * wml/WMLInputElement.cpp:
+ (WebCore::WMLInputElement::setValue):
+ (WebCore::WMLInputElement::createRenderer):
+ * wml/WMLInputElement.h:
+
+2009-09-26 Shu Chang <Chang.Shu@nokia.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Optimize the code so only the text from start to end is scanned.
+ https://bugs.webkit.org/show_bug.cgi?id=29092
+
+ On a platform with webkit+Qt+Symbian, the parsing time for a 600K text
+ file improved from 400ms to 40ms (10x faster).
+
+ * dom/Text.cpp:
+ (WebCore::Text::createWithLengthLimit):
+
+2009-09-26 Xiaomei Ji <xji@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ This Patch fixes [chromium] the drop-down is always left-aligned even
+ for RTL element.
+ https://bugs.webkit.org/show_bug.cgi?id=29612
+
+ For auto-complete, the items in drop-down should be right-aligned if
+ the directionality of <input> field is RTL.
+ For <select><option>, the items in drop-down should be right-aligned
+ if the directionality of <select> is RTL.
+
+ No automatic test is possible. Manual tests are added.
+
+ * manual-tests/autofill_alignment.html: Added.
+ * manual-tests/select_alignment.html: Added.
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::paintRow): Adjust the starting x-axis of text to
+ be paint if it should be right-aligned.
+
+2009-09-25 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ REGRESSION (r48775) FontList.plist written by TOT WebKit causes Safari 4
+ to crash on launch
+ https://bugs.webkit.org/show_bug.cgi?id=29759
+
+ * platform/graphics/win/FontDatabase.cpp:
+ (WebCore::writeFontDatabaseToPlist): Reverted to saving the CG font DB
+ property list at the root of FontList.plist, but with an additional
+ key for the last value of the Fonts registry key.
+ (WebCore::populateFontDatabase): Pass the FontList.plist in its entirety
+ to populatFontDatabaseFromPlist.
+
+2009-09-25 Kevin Ollivier <kevino@theolliviers.com>
+
+ Build fix. Adding missing header files.
+
+ * bindings/js/JSNamedNodeMapCustom.cpp:
+
+2009-09-25 David Kilzer <ddkilzer@apple.com>
+
+ Part 1 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
+
+ Reviewed by Darin Adler.
+
+ * DerivedSources.make: Move tests for ENABLE_CONTEXT_MENUS,
+ ENABLE_DRAG_SUPPORT and ENABLE_INSPECTOR into Mac-only section.
+
+2009-09-25 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Load blocks during unload should not affect targeted loads
+ https://bugs.webkit.org/show_bug.cgi?id=29747
+
+ Move the check of the unload state after checking for targeted links.
+
+ Test: fast/loader/unload-hyperlink-targeted.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadURL):
+
+2009-09-25 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Add initial V8 bindings for WebGL
+ https://bugs.webkit.org/show_bug.cgi?id=29664
+
+ * WebCore.gypi:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/custom/V8CanvasArrayBufferCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8CanvasArrayCustom.h: Added.
+ (WebCore::constructCanvasArray):
+ * bindings/v8/custom/V8CanvasByteArrayCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasFloatArrayCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasIntArrayCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasRenderingContext3DCustom.cpp: Added.
+ (WebCore::jsArrayToFloatArray):
+ (WebCore::jsArrayToIntArray):
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::):
+ (WebCore::vertexAttribAndUniformHelperf):
+ (WebCore::uniformHelperi):
+ (WebCore::uniformMatrixHelper):
+ * bindings/v8/custom/V8CanvasShortArrayCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasUnsignedByteArrayCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasUnsignedIntArrayCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasUnsignedShortArrayCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * platform/graphics/GraphicsContext3D.h:
+
+2009-09-25 Jeremy Orlow <jorlow@chromium.org>
+
+ This is breaking Chromium try bots, so I'm counting this as a build fix.
+
+ Add more svn:ignore exceptions. On different platforms, these files are
+ generated with different case for WebCore.
+
+ * WebCore.gyp: Changed property svn:ignore.
+
+2009-09-25 Alexey Proskuryakov <ap@apple.com>
+
+ Reverting r48767, as it broke Windows build in a non-trivial way.
+
+ * bindings/js/JSAbstractWorkerCustom.cpp:
+ (WebCore::JSAbstractWorker::addEventListener):
+ (WebCore::JSAbstractWorker::removeEventListener):
+ * bindings/js/JSDOMApplicationCacheCustom.cpp:
+ (WebCore::JSDOMApplicationCache::addEventListener):
+ (WebCore::JSDOMApplicationCache::removeEventListener):
+ * bindings/js/JSDOMGlobalObject.cpp:
+ (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::addEventListener):
+ (WebCore::JSDOMWindow::removeEventListener):
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::JSEventListener::JSEventListener):
+ (WebCore::JSEventListener::jsFunction):
+ (WebCore::JSEventListener::markJSFunction):
+ (WebCore::JSEventListener::handleEvent):
+ (WebCore::JSEventListener::reportError):
+ * bindings/js/JSEventListener.h:
+ (WebCore::JSEventListener::create):
+ * bindings/js/JSEventSourceCustom.cpp:
+ (WebCore::JSEventSource::addEventListener):
+ (WebCore::JSEventSource::removeEventListener):
+ * bindings/js/JSLazyEventListener.cpp:
+ (WebCore::JSLazyEventListener::JSLazyEventListener):
+ (WebCore::JSLazyEventListener::jsFunction):
+ (WebCore::JSLazyEventListener::parseCode):
+ * bindings/js/JSLazyEventListener.h:
+ (WebCore::JSLazyEventListener::create):
+ * bindings/js/JSMessagePortCustom.cpp:
+ (WebCore::JSMessagePort::addEventListener):
+ (WebCore::JSMessagePort::removeEventListener):
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::addEventListener):
+ (WebCore::JSNode::removeEventListener):
+ * bindings/js/JSSVGElementInstanceCustom.cpp:
+ (WebCore::JSSVGElementInstance::addEventListener):
+ (WebCore::JSSVGElementInstance::removeEventListener):
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::addEventListener):
+ (WebCore::JSWorkerContext::removeEventListener):
+ * bindings/js/JSXMLHttpRequestCustom.cpp:
+ (WebCore::JSXMLHttpRequest::addEventListener):
+ (WebCore::JSXMLHttpRequest::removeEventListener):
+ * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
+ (WebCore::JSXMLHttpRequestUpload::addEventListener):
+ (WebCore::JSXMLHttpRequestUpload::removeEventListener):
+ * bindings/js/ScriptEventListener.cpp:
+ (WebCore::createAttributeEventListener):
+ * bindings/objc/ObjCEventListener.h:
+ * bindings/objc/ObjCEventListener.mm:
+ (WebCore::ObjCEventListener::handleEvent):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * dom/EventListener.h:
+ (WebCore::EventListener::reportError):
+ (WebCore::EventListener::jsFunction):
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::fireEventListeners):
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::handleEvent):
+ * inspector/InspectorDOMAgent.h:
+ * inspector/InspectorDOMStorageResource.cpp:
+ (WebCore::InspectorDOMStorageResource::handleEvent):
+ * inspector/InspectorDOMStorageResource.h:
+ * loader/ImageDocument.cpp:
+ (WebCore::ImageEventListener::handleEvent):
+ * svg/animation/SVGSMILElement.cpp:
+ (WebCore::ConditionEventListener::handleEvent):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::reportException):
+
+2009-09-24 Tony Chang <tony@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add a gyp variable to allow building a debug webcore without debug
+ symbols. This allows for faster compile, link, and gdb times.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29721
+
+ No new tests, build config change.
+
+ * WebCore.gyp/WebCore.gyp:
+
+2009-09-25 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Declare RegisteredEventListener as a class instead of a struct.
+ This fixes a warning in the Chromium build.
+
+ * dom/RegisteredEventListener.h:
+
+2009-09-25 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ WebCore part of
+ <rdar://problem/7211635> 2 byte characters are displayed as garbaged
+ <rdar://problem/7212626> garbled/gibberish text (off-by-one)
+
+ When the Windows Fonts directory contains more than one font file for a
+ given font name, which of the fonts gets assigned to the name in the
+ Core Graphics font database was determined arbitrarily and did not
+ always match the font GDI used for the same font name. The mismatch
+ caused character-to-glyph mapping to use one font and glyph rendering to
+ use another.
+
+ The fix is to update the Core Graphics font database from the registry
+ entries (that reflect the name-to-font mapping that GDI uses) after
+ populating it with the result of scanning the Fonts directory. As a
+ consequence, the directory needs to be scanned at startup every time the
+ registry key changes, so the last value of the registry key is kept
+ in the property list on disk so that it could be compared to the current
+ value on startup.
+
+ * platform/graphics/win/FontDatabase.cpp:
+ (WebCore::populateFontDatabaseFromPlist): Now takes a property list as
+ a parameter and avoids round-tripping through XML by calling
+ wkAddFontsFromPlist() instead of wkAddFontsFromPlistRepresentation().
+ (WebCore::fontFilenamesFromRegistryKey):
+ (WebCore::cgFontDBKey):
+ (WebCore::writeFontDatabaseToPlist): Now takes the CG font DB property
+ list and a property list with the font filenames from the registry and
+ writes a dictionary with those property lists as values.
+ (WebCore::fontFilenamesFromRegistry): Added. Returns an array with the
+ values in the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
+ registry key.
+ (WebCore::populateFontDatabase): Changed to read the contents of the
+ Fonts registry key and compare it with the last-saved value from the
+ property list, and to call wkAddFontsFromRegistry() after populating the
+ CG font DB from the file system. Uses wkCreateFontsPlist() instead of
+ wkCreateFontsPlistRepresentation() to avoid round-tripping through XML.
+
+2009-09-25 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Inlined some object creation code, including lexicalGlobalObject access
+ https://bugs.webkit.org/show_bug.cgi?id=29750
+
+ * bindings/js/JSInspectorBackendCustom.cpp:
+ (WebCore::JSInspectorBackend::currentCallFrame):
+ * inspector/JavaScriptDebugServer.cpp:
+ (WebCore::JavaScriptDebugServer::hasBreakpoint): Updated for JavaScriptCore
+ API changes.
+
+2009-09-25 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24399
+ Make @import work in user stylesheets. The first bug was that the URL wasn't being set on the
+ user sheets themselves, so relative @import URLs couldn't resolve properly. The second bug
+ was that the loads would be denied. This is fixed by using the requestUserCSSStyleSheet method
+ instead of the normal request method. In order to know when to do this, CSSStyleSheets now have
+ a propagated boolean, m_isUserStyleSheet, that lets them know if they are user stylesheets or not.
+
+ * css/CSSImportRule.cpp:
+ (WebCore::CSSImportRule::insertedIntoParent):
+ * css/CSSStyleSheet.cpp:
+ (WebCore::CSSStyleSheet::CSSStyleSheet):
+ * css/CSSStyleSheet.h:
+ (WebCore::CSSStyleSheet::setIsUserStyleSheet):
+ (WebCore::CSSStyleSheet::isUserStyleSheet):
+ * dom/Document.cpp:
+ (WebCore::Document::pageUserSheet):
+ (WebCore::Document::pageGroupUserSheets):
+
+2009-09-25 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ ASSERTION FAILED: !repaintContainer || repaintContainer == this
+ https://bugs.webkit.org/show_bug.cgi?id=29755
+
+ It's possible for RenderObject::container() to return an object that is higher
+ in the hierarchy than the repaintContainer that is being used to repaint an
+ object. For example, this can happen when running an accelerated opacity
+ transition on an element with a position:absolute parent, and a position:absolute child.
+
+ In this case we need to detect when RenderObject::container() will skip over
+ repaintContainer, and in that case adjust the coords to shift into repaintContainer's space.
+
+ Test: compositing/repaint/opacity-between-absolute.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::mapLocalToContainer):
+ (WebCore::RenderBox::computeRectForRepaint):
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::computeRectForRepaint):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::container):
+ * rendering/RenderObject.h:
+
+2009-09-25 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Crash with hardware accelerated rotation of a PDF image in a data URL
+ <rdar://problem/7250378>
+
+ PDF images don't return a color space from CGImageGetColorSpace(),
+ so we need to null-check the return value before use.
+
+ Test: compositing/color-matching/pdf-image-match.html
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::setContentsToImage):
+
+2009-09-25 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ Null-deref when first access to an Attr node is after its Element is destroyed
+ https://bugs.webkit.org/show_bug.cgi?id=29748
+
+ Test: fast/dom/Attr/access-after-element-destruction.html
+
+ * bindings/js/JSAttrCustom.cpp:
+ (WebCore::JSAttr::markChildren): Added. Keeps the ownerElement alive as
+ long as the Attr is alive.
+
+ * bindings/js/JSNamedNodeMapCustom.cpp:
+ (WebCore::JSNamedNodeMap::markChildren): Added. Keeps the Element alive as
+ long as the NamedNodeMap is alive.
+
+ * dom/Attr.idl: Added CustomMarkFunction attribute.
+
+ * dom/NamedAttrMap.cpp:
+ (WebCore::NamedNodeMap::getAttributeItem): Tweaked formatting.
+ (WebCore::NamedNodeMap::detachFromElement): Call clearAttributes so we don't
+ have attributes hanging around that might need an Attr node created; that way
+ we won't crash with a null-dereference trying to deal with one of them. This
+ can't happen when working with JavaScript since the Element will be kept
+ alive due to the change above.
+ (WebCore::NamedNodeMap::addAttribute): Fix function name in comment.
+ (WebCore::NamedNodeMap::removeAttribute): Removed unneeded "1" and added
+ missing braces.
+
+ * dom/NamedAttrMap.h: Made the element function public so it can be used by
+ the JavaScript binding to keep the Element alive.
+
+ * dom/NamedNodeMap.idl: Added CustomMarkFunction attribute.
+
+2009-09-24 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler and Sam Weinig.
+
+ Onclick not fired for an element copied with cloneContents() or cloneNode()
+ https://bugs.webkit.org/show_bug.cgi?id=25130
+
+ The change here is that JS event listeners don't keep a reference to a global object from
+ where they were created, and instead take it as a parameter when parsing source code. Also,
+ the listener creation won't fail just because it happens for an element in a frameless
+ document.
+ Thus, moving nodes between documents no longer results in having incorrect registered
+ lazy event listeners on them.
+
+ Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
+ fast/events/attribute-listener-cloned-from-frameless-doc-context.html
+ fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
+ fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
+ fast/events/attribute-listener-extracted-from-frameless-doc-context.html
+
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
+ (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
+ getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
+ (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
+ (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
+ (WebCore::JSEventListener::reportError): Ditto.
+
+ * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
+ to JSDOMGlobalObject.
+
+ * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
+ creation was split between this function and ScriptEventListener; moved it here, as JS
+ global object can be different now.
+
+ * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
+ which can not be determined at parsing time.
+
+ * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
+ for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
+ expect that errors are logged at document parsing time, and because I don't know what other
+ side effects moving it vould have.
+
+ * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
+ because JSC needs a global context here.
+
+ * bindings/js/JSAbstractWorkerCustom.cpp:
+ (WebCore::JSAbstractWorker::addEventListener):
+ (WebCore::JSAbstractWorker::removeEventListener):
+ * bindings/js/JSDOMApplicationCacheCustom.cpp:
+ (WebCore::JSDOMApplicationCache::addEventListener):
+ (WebCore::JSDOMApplicationCache::removeEventListener):
+ * bindings/js/JSDOMGlobalObject.cpp:
+ (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::addEventListener):
+ (WebCore::JSDOMWindow::removeEventListener):
+ * bindings/js/JSEventSourceCustom.cpp:
+ (WebCore::JSEventSource::addEventListener):
+ (WebCore::JSEventSource::removeEventListener):
+ * bindings/js/JSMessagePortCustom.cpp:
+ (WebCore::JSMessagePort::addEventListener):
+ (WebCore::JSMessagePort::removeEventListener):
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::addEventListener):
+ (WebCore::JSNode::removeEventListener):
+ * bindings/js/JSSVGElementInstanceCustom.cpp:
+ (WebCore::JSSVGElementInstance::addEventListener):
+ (WebCore::JSSVGElementInstance::removeEventListener):
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::addEventListener):
+ (WebCore::JSWorkerContext::removeEventListener):
+ * bindings/js/JSXMLHttpRequestCustom.cpp:
+ (WebCore::JSXMLHttpRequest::addEventListener):
+ (WebCore::JSXMLHttpRequest::removeEventListener):
+ * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
+ (WebCore::JSXMLHttpRequestUpload::addEventListener):
+ (WebCore::JSXMLHttpRequestUpload::removeEventListener):
+ * bindings/objc/ObjCEventListener.h:
+ * bindings/objc/ObjCEventListener.mm:
+ (WebCore::ObjCEventListener::handleEvent):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::fireEventListeners):
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::handleEvent):
+ * inspector/InspectorDOMAgent.h:
+ * inspector/InspectorDOMStorageResource.cpp:
+ (WebCore::InspectorDOMStorageResource::handleEvent):
+ * inspector/InspectorDOMStorageResource.h:
+ * loader/ImageDocument.cpp:
+ (WebCore::ImageEventListener::handleEvent):
+ * svg/animation/SVGSMILElement.cpp:
+ (WebCore::ConditionEventListener::handleEvent):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::reportException):
+ Don't pass global object to JSEventListener::create(), which no longer needs it.
+ Note that some of these functions still have an early return for null global object, which
+ can probably be removed in a later patch.
+ Pass ScriptExecutionContext to EventListener methods that now need it.
+
+2009-09-25 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Darin Adler, Dan Bernstein, Adele Peterson, and others.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=29740
+ <rdar://problem/7168738> Gmail: After changing a foreground text color, pressing return doesn't apply background to new line
+
+ Change the way style is preserved when inserting a new paragraph.
+ The original code handled insertion at the beginning and at the end of a paragraph as special
+ cases. The newly created paragraph contained a set of nodes generated starting from the
+ computed style of the insertion node. This approach has two problems:
+ 1. if the insertion node has a non opaque background color and one of the parent element did have
+ a solid background color the new paragraph did not have the element with the solid color in the tree.
+ 2. in some circumstances it generated more markup than the original paragraph had (a span with bold, italic,
+ background color and some font attribute was being reproduced as span bold italic font as separate tags.
+ The new approach is to recreate in the new paragraph the same hierarchy of nodes found in the
+ paragraph where the insertion point is.
+
+ Test: editing/inserting/insert-bg-font.html
+
+ * editing/InsertParagraphSeparatorCommand.cpp:
+ (WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock): retrieves the list of all the ancestors
+ between the insert node and the outer block.
+ (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock): uses the list of ancestors to recreate
+ in the new paragraph the same element hierarchy present in the starting paragraph.
+ (WebCore::InsertParagraphSeparatorCommand::doApply): changed the code to handle the general case of insertion
+ in the middle of the paragraph to use the new methods. Changed the handling of the insertion at the beginning and
+ at the end of the paragraph to use the new methods instead of applying the calculated style.
+ * editing/InsertParagraphSeparatorCommand.h: added methods getAncestorsInsideBlock and cloneHierarchyUnderNewBlock.
+
+2009-09-25 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Content-type parameters not taken into account when building form-data
+ https://bugs.webkit.org/show_bug.cgi?id=28970
+
+ existing manual test case extended with new tests
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/ResourceView.js:
+ (WebInspector.ResourceView.prototype._refreshFormData):
+ (WebInspector.ResourceView.prototype._refreshParms):
+ * manual-tests/inspector/display-form-data.html:
+
+2009-09-25 Yuan Song <song.yuan@ericsson.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=14566
+
+ Raise SECURITY_ERR exception if an attempt is made to change document.domain to an invalid value.
+
+ Test: fast/js/invalid-domain-change-throws-exception.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::setDomain):
+ * dom/Document.h:
+ * dom/Document.idl:
+
+2009-09-25 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Teach ScheduledAction::execute about isolated worlds
+ https://bugs.webkit.org/show_bug.cgi?id=27703
+
+ When setTimeout is called with a string argument in an isolated
+ world, we now compile the string in the isolated world.
+
+ Last time we tried this change, we got a lot of crashes. This
+ time we're using a fresh local handle as our context to avoid
+ trouble if the peristent handle gets disposed before we leave
+ the context.
+
+ Test: fast/dom/timer-clear-interval-in-handler-and-generate-error.html
+
+ * bindings/v8/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::execute):
+
+2009-09-25 Paul Godavari <paul@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Fix a regression in Mac Chromium popup menus, where the user's
+ selection was ignored and the popup became unresponsive.
+ https://bugs.webkit.org/show_bug.cgi?id=29726
+
+ The fix is to notify the popup's client that the popup was hidden,
+ even if the popup has no parent.
+
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::hidePopup):
+
+2009-09-25 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ Enable Pasteboard::writePlainText for Chromium and fix code style nits.
+ https://bugs.webkit.org/show_bug.cgi?id=29734
+
+ * platform/chromium/PasteboardChromium.cpp:
+ (WebCore::Pasteboard::writePlainText):
+ * platform/gtk/PasteboardGtk.cpp:
+ (WebCore::Pasteboard::writePlainText):
+ (WebCore::Pasteboard::writeURL):
+ * platform/mac/PasteboardMac.mm:
+ (WebCore::Pasteboard::writeSelection):
+ (WebCore::Pasteboard::writePlainText):
+ (WebCore::Pasteboard::writeURL):
+ * platform/qt/PasteboardQt.cpp:
+ (WebCore::Pasteboard::writePlainText):
+
+2009-09-25 Yongjun Zhang <yongjun.zhang@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28876
+ [Qt] reduce peak memory consumption of text decoding.
+
+ Chop large input buffer into small buffers to reduce peak memory
+ during decoding.
+
+ * platform/text/qt/TextCodecQt.cpp:
+ (WebCore::TextCodecQt::decode):
+
+2009-09-24 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Add a mechanism for automatically halting plug-ins.
+
+ Reviewed by Oliver Hunt and Alice Liu.
+
+ * GNUmakefile.am:
+
+ * WebCore.base.exp:
+ Update export of Page constructor.
+
+ * WebCore.gypi:
+
+ * WebCore.pro:
+
+ * WebCore.vcproj/WebCore.vcproj:
+ Add PluginHalter.{h,cpp}, PluginHalterClient.h, and
+ HaltablePlugin.h.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ Add files to Mac project.
+
+ * loader/EmptyClients.h:
+ Added an empty PluginHalterClient.
+ (WebCore::EmptyPluginHalterClient::shouldHaltPlugin):
+ Return false.
+
+ * page/PluginHalter.cpp: Added.
+ (WebCore::PluginHalter::PluginHalter):
+ (WebCore::PluginHalter::didStartPlugin):
+ Add the object to the plug-in set. If this is the only item in the set,
+ set m_oldestStartTime to this object's time, and start the timer.
+ (WebCore::PluginHalter::didStopPlugin):
+ Remove the plug-in from the set.
+ (WebCore::PluginHalter::timerFired):
+ Find the cut-off time as the current time minus the allowed run time;
+ plug-ins older than this may be halted. Iterate over the plug-ins. Find
+ the object with the oldest start time that is too young to be halted;
+ we'll use its start time to set the timer's next fire time. For all
+ plug-ins that are candidates to be halted, call the
+ PluginHalterClient's shouldHaltPlugin(). If this function returns true,
+ call the plug-in's halt() function. Remove these objects from the set
+ of tracked plug-ins. Call startTimerIfNecessary() to restart the timer.
+ (WebCore::PluginHalter::startTimerIfNecessary):
+ If the timer is set to fire, or the set of tracked plug-ins is empty,
+ return early. Set the timer to fire after the oldest plug-in has run
+ for the allowed run time.
+
+ * page/PluginHalter.h: Added.
+ (WebCore::PluginHalter::setPluginAllowedRunTime):
+
+ * page/PluginHalterClient.h: Added.
+ (WebCore::PluginHalterClient::~PluginHalterClient):
+
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ Initialize m_pluginHalterClient. Call pluginHalterEnabledStateChanged()
+ to create the PluginHalter if necessary.
+ (WebCore::Page::pluginHalterEnabledStateChanged):
+ If plug-in halting is enabled, create the PluginHalter. If it is
+ disabled, clear it.
+ (WebCore::Page::pluginAllowedRunTimeChanged):
+ If there is a plug-in halter, call its setPluginAllowedRunTime().
+ (WebCore::Page::didStartPlugin):
+ If there is a plug-in halter, call its didStartPlugin().
+ (WebCore::Page::didStopPlugin):
+ If there is a plug-in halter, call its didStopPlugin().
+
+ * page/Page.h:
+ Add a parameter to the Page constructor for the PluginHalterClient.
+ Added declarations for didStartPlugin() and didStopPlugin(), which are
+ called when HaltablePlugins are added to or removed from the page. Adds
+ pluginAllowedRunTimeChanged() and pluginHalterEnabledStateChanged() to
+ notify the Page when these settings are changed. Added members to hold
+ the PluginHalter and the PluginHalterClient.
+
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setPluginHalterEnabled):
+ If the enabled state has changed, call the Page's
+ pluginHalterEnabledStateChanged().
+ (WebCore::Settings::setPluginAllowedRunTime):
+ Call the Page's pluginAllowedRunTimeChanged().
+
+ * page/Settings.h:
+ (WebCore::Settings::pluginHalterEnabled):
+ (WebCore::Settings::pluginAllowedRunTime):
+
+ * page/HaltablePlugin.h: Added. Defines an interface for plug-ins that
+ can be automatically halted.
+ (WebCore::HaltablePlugin::~HaltablePlugin):
+
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::dataChanged):
+ Pass a dummy PluginHalterClient.
+
+2009-09-24 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ REGRESSION: webkit-transform scale no longer works properly in nightly build
+ https://bugs.webkit.org/show_bug.cgi?id=29730
+
+ When the initial or final state of a scale animation does not specify a transform,
+ use a default scale of 1, rather than zero.
+
+ Test: compositing/transitions/scale-transition-no-start.html
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::getTransformFunctionValue):
+
+2009-09-24 John Gregg <johnnyg@google.com>
+
+ Reviewed by Eric Seidel.
+
+ isEnabled switch for notifications (experimental) in Page Settings
+ https://bugs.webkit.org/show_bug.cgi?id=28930
+
+ Adds a run-time flag in Settings object that controls whether
+ to expose desktop notifications.
+
+ No new test, but test code also modified to set this preference.
+
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::webkitNotifications): check preference before returning notifications object
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setExperimentalNotificationsEnabled):
+ * page/Settings.h:
+ (WebCore::Settings::experimentalNotificationsEnabled):
+
+2009-09-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix <rdar://problem/7162000> Crash while trying to
+ calculate the horizontal position of image
+
+ Test: fast/inline-block/relative-positioned-rtl-crash.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::calcAbsoluteHorizontalReplaced): Corrected an
+ isInline() test to isRenderInline(). This is similar to r41259.
+
+2009-09-24 Jessie Berlin <jberlin@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Fix expanding profile call stacks being broken after sorting.
+ https://bugs.webkit.org/show_bug.cgi?id=26423
+
+ * inspector/front-end/ProfileDataGridTree.js:
+ (WebInspector.ProfileDataGridNode.prototype.sort):
+ Set shouldRefreshChildren to true on collapsed nodes with children so that expanding it
+ causes the children to be placed in the right positions.
+
+2009-09-24 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Stephanie Lewis.
+
+ Fixed sudden termination console spew due to too many calls to
+ enableSuddenTermination.
+
+ <rdar://problem/7063125> 10A410: Safari logging enableSuddenTermination errors
+
+ * page/DOMWindow.cpp:
+ (WebCore::removeUnloadEventListener):
+ (WebCore::removeAllUnloadEventListeners):
+ (WebCore::removeBeforeUnloadEventListener):
+ (WebCore::removeAllBeforeUnloadEventListeners): Only
+ enableSuddenTermination if the set of listeners is empty *and* this
+ window was in the set. Otherwise, a no-op will cause us to enableSuddenTermination.
+
+2009-09-24 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ WebKit returns "" instead of null when getting
+ inexistent, forbidden or invalidly named headers.
+ https://bugs.webkit.org/show_bug.cgi?id=29140
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::getResponseHeader):
+ Changed to return null as it should according to the spec.
+
+2009-09-24 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add GYP generated files to svn:ignore
+ https://bugs.webkit.org/show_bug.cgi?id=29724
+
+ Adding the following files to the svn:ignore list (all in the
+ WebCore/WebCore.gyp directory)
+
+ WebCore.xcodeproj
+ WebCore.sln
+ WebCore.vcproj
+ WebCore_Debug.rules
+ WebCore_Release.rules
+ WebCore_Release - no tcmalloc.rules
+ WebCore_Purify.rules
+ WebCore.mk
+ WebCore_Debug_rules.mk
+ WebCore_Release_rules.mk
+ WebCore_Release - no tcmalloc_rules.mk
+ WebCore_Purify_rules.mk
+ WebCore.scons
+ WebCore_main.scons
+
+ * WebCore.gyp: Changed property svn:ignore.
+
+2009-09-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed. Mac build fix.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
+ remove unused parameter from function signature;
+
+2009-09-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Oliver Hunt.
+
+ Implement correct horizontal scrollbar behavior for GTKalso on
+ styled scrollbars.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29348
+ [Gtk] Scrollwheel on horizontal scrollbars should slide horizontally
+
+ Test: platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleWheelEvent): on GTK+, when using the
+ wheel with the pointer on the horizontal scrollbar, scroll
+ horizontally;
+ * platform/PlatformWheelEvent.h:
+ * platform/gtk/WheelEventGtk.cpp:
+ (WebCore::PlatformWheelEvent::swapOrientation): allow adding a
+ vertical scroll to the horizontal one;
+
+2009-09-24 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ StorageNamespace::storageArea() should take in a PassRefPtr<StorageOrigin>
+ https://bugs.webkit.org/show_bug.cgi?id=29290
+
+ Modified StorageNamespace::storageArea() to take in a PassRefPtr<StorageOrigin>
+ per http://webkit.org/coding/RefPtr.html
+
+ No behavior change, so no tests.
+
+ * storage/StorageNamespace.h:
+ * storage/StorageNamespaceImpl.cpp:
+ (WebCore::StorageNamespaceImpl::storageArea):
+ * storage/StorageNamespaceImpl.h:
+
+2009-09-24 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Added back enable/disableSuddenTermination() functionality I accidentally
+ removed in my last patch.
+
+ * page/DOMWindow.cpp:
+ (WebCore::addUnloadEventListener):
+ (WebCore::removeUnloadEventListener):
+ (WebCore::removeAllUnloadEventListeners):
+ (WebCore::addBeforeUnloadEventListener):
+ (WebCore::removeBeforeUnloadEventListener):
+ (WebCore::removeAllBeforeUnloadEventListeners):
+ (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
+ (WebCore::DOMWindow::~DOMWindow):
+ (WebCore::DOMWindow::addEventListener):
+ (WebCore::DOMWindow::removeEventListener):
+ (WebCore::DOMWindow::removeAllEventListeners):
+
+2009-09-24 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Steve Falkenburg and Mark Rowe.
+
+ Don't pass -F to GCC on non-mac platforms since it is an darwin only.
+
+ * DerivedSources.make:
+
+2009-09-24 Sam Weinig <sam@webkit.org>
+
+ Fix windows build.
+
+ * dom/Element.idl:
+
+2009-09-23 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Revert the relevant parts of r47925, and implement an alternate
+ fix (localize the coordinate check to GraphicsContext::clipPath()).
+ This fixes http://crbug.com/21174.
+
+ Covered by LayoutTests/svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html.
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::clipPath):
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::currentPathInLocalCoordinates):
+
+2009-09-24 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Merge changes from Mozilla's FTP directory parser.
+ <rdar://problem/7227620> and https://bugs.webkit.org/show_bug.cgi?id=29294
+
+ FTP layout tests not possible at this time.
+ https://bugs.webkit.org/show_bug.cgi?id=29719 tracks making them possible.
+
+ * loader/FTPDirectoryParser.cpp:
+ (WebCore::ParsingFailed):
+ (WebCore::parseOneFTPLine):
+
+2009-09-24 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] re-enable some media tests
+ https://bugs.webkit.org/show_bug.cgi?id=29716
+
+ make canPlayType() return "probably" if mime-type is known
+ and codecs string is not empty. If codecs is empty return
+ "maybe".
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::supportsType):
+
+2009-09-24 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=29703
+ Add a function to element to check whether it matches a CSS selector
+
+ Implement Element.webkitMatchesSelector.
+
+ * css/CSSSelectorList.cpp:
+ (WebCore::forEachTagSelector):
+ (WebCore::forEachSelector):
+ (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
+ (WebCore::CSSSelectorList::selectorsNeedNamespaceResolution):
+ * css/CSSSelectorList.h:
+ Moved code to iterate the CSSSelectorList and determine if any
+ selectors need namespace resolution from a static function in
+ Node.cpp to CSSSelectorList so that it can be used by webkitMatchesSelector
+ as well as querySelector/querySelectorAll.
+
+ * dom/Element.cpp:
+ (WebCore::Element::webkitMatchesSelector):
+ * dom/Element.h:
+ * dom/Element.idl:
+ Implement the new function. Handles exceptional cases identically to
+ querySelector/querySelectorAll.
+
+ * dom/Node.cpp:
+ (WebCore::Node::querySelector):
+ (WebCore::Node::querySelectorAll):
+ Moved selectorsNeedNamespaceResolution to CSSSelectorList from here.
+
+2009-09-24 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Fixed bindings build after http://trac.webkit.org/changeset/48701
+ https://bugs.webkit.org/show_bug.cgi?id=29713
+
+ Got rid of isWindowEvent in function signatures:
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::invokeEventHandler):
+ (WebCore::V8AbstractEventListener::handleEvent):
+ (WebCore::V8AbstractEventListener::getReceiverObject):
+ * bindings/v8/V8AbstractEventListener.h:
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::callListenerFunction):
+ * bindings/v8/V8LazyEventListener.h:
+ * bindings/v8/V8WorkerContextEventListener.cpp:
+ (WebCore::V8WorkerContextEventListener::handleEvent):
+ (WebCore::V8WorkerContextEventListener::callListenerFunction):
+ (WebCore::V8WorkerContextEventListener::getReceiverObject):
+ * bindings/v8/V8WorkerContextEventListener.h:
+ * bindings/v8/custom/V8CustomEventListener.cpp:
+ (WebCore::V8EventListener::callListenerFunction):
+ * bindings/v8/custom/V8CustomEventListener.h:
+
+ Switched to EventTarget methods of adding/removing listeners:
+ * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
+ (WebCore::toEventID):
+ (WebCore::ACCESSOR_SETTER):
+
+ * dom/EventTarget.h: Some functions were incorrectly marked
+ as JSC-specific.
+
+2009-09-24 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Color-code watch expression errors with red.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29707
+
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSection.prototype.update):
+ (WebInspector.WatchExpressionTreeElement.prototype.update):
+ * inspector/front-end/inspector.css:
+
+2009-09-24 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Fix formatting for messages derived from resource warnings,
+ couple of drive-by formatting fixes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29705
+
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addMessageToConsole):
+ * inspector/front-end/ConsoleView.js:
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript._evaluateAndWrap):
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSection.prototype.update):
+
+2009-09-22 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Implement InspectorController::copyNode(id).
+
+ https://bugs.webkit.org/show_bug.cgi?id=28357
+
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::copyNode):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.handleCopyEvent):
+
+2009-09-24 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by NOBODY(rollout)
+
+ Roll out r48712 as it is incorrect.
+
+ Overriding getPropertyNames is incorrect.
+
+ * bridge/runtime_array.cpp:
+ * bridge/runtime_array.h:
+
+2009-09-24 Xan Lopez <xlopez@igalia.com>
+
+ Revert r48697, since it broke key handling notification to GTK+.
+
+ * platform/gtk/KeyEventGtk.cpp:
+ (WebCore::keyIdentifierForGdkKeyCode):
+ (WebCore::singleCharacterString):
+
+2009-09-24 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] GStreamer MediaPlayer is unable to correctly querry duration
+ https://bugs.webkit.org/show_bug.cgi?id=24639
+
+ check duration returned by gst_element_query_duration() only
+ when using GStreamer < 0.10.23.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::duration):
+
+2009-09-24 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ The indices of RuntimeArray should be enumerated like for a regular array.
+ https://bugs.webkit.org/show_bug.cgi?id=29005
+
+ * bridge/runtime_array.cpp:
+ (JSC::RuntimeArray::getPropertyNames):
+ * bridge/runtime_array.h:
+
+2009-09-23 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Introduce Pasteboard::writePlaintext(const String&) so that copying
+ of the inspected elements HTML will be possible in WebInspector.
+ https://bugs.webkit.org/show_bug.cgi?id=29634
+
+ * platform/Pasteboard.h:
+ * platform/android/TemporaryLinkStubs.cpp:
+ (Pasteboard::writePlainText):
+ * platform/chromium/ChromiumBridge.h:
+ * platform/chromium/PasteboardChromium.cpp:
+ (WebCore::Pasteboard::writePlainText):
+ * platform/gtk/PasteboardGtk.cpp:
+ (WebCore::Pasteboard::writePlainText):
+ * platform/haiku/PasteboardHaiku.cpp:
+ (WebCore::Pasteboard::writePlainText):
+ * platform/mac/PasteboardMac.mm:
+ (WebCore::Pasteboard::writePlainText):
+ * platform/qt/PasteboardQt.cpp:
+ (WebCore::Pasteboard::writePlainText):
+ * platform/win/PasteboardWin.cpp:
+ (WebCore::Pasteboard::writeSelection):
+ (WebCore::Pasteboard::writePlainText):
+ * platform/wince/PasteboardWince.cpp:
+ (WebCore::Pasteboard::writePlainText):
+ * platform/wx/PasteboardWx.cpp:
+ (WebCore::Pasteboard::writeSelection):
+ (WebCore::Pasteboard::writePlainText):
+ (WebCore::Pasteboard::writeURL):
+
+2009-09-24 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Fix QApp::translate() calls to provide the correct class name without
+ a trailing comma.
+
+ * platform/qt/Localizations.cpp:
+ (WebCore::localizedMediaTimeDescription):
+
+2009-09-24 Geoffrey Garen <ggaren@apple.com>
+
+ More build fix: Removed JSSharedWorkerContextCustom.cpp from project
+ files, since it no longer exists in the repository.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+
+2009-09-24 Geoffrey Garen <ggaren@apple.com>
+
+ Windows build fix: Declare set/unsetPendingActivity public, so
+ SharedWorkerScriptLoader can call them.
+
+ * dom/ActiveDOMObject.h:
+
+2009-09-24 Geoffrey Garen <ggaren@apple.com>
+
+ Fixed a bit of the Windows build.
+
+ * workers/SharedWorker.idl: Declare a custom mark function. (I accidentally
+ removed this in my last patch.)
+ * WebCore.xcodeproj/project.pbxproj: Added JSSharedWorkerCustom.cpp back
+ to the build. (I accidentally removed this in my last patch.)
+
+2009-09-23 Geoffrey Garen <ggaren@apple.com>
+
+ 32-bit build fix: restore previous cast that I thought was unnecessary.
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::didSendData):
+ (WebCore::XMLHttpRequest::didReceiveData):
+
+2009-09-23 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Bring a little sanity to this crazy EventTarget world of ours
+ https://bugs.webkit.org/show_bug.cgi?id=29701
+
+ Lots of EventTarget refactoring to achieve a single shared implementation
+ that fixes some of the performance and correctness bugs of the many individual
+ implementations, and makes reasoning about EventTargets and EventListeners
+ much easier.
+
+ The basic design is this:
+ - EventTarget manages a set of EventListeners.
+ - onXXX EventListener attributes forward to standard EventTarget APIs.
+ - Since the onXXX code is repetitive, it is usually done with macros
+ of the form DEFINE_ATTRIBUTE_EVENT_LISTENER(attributeName).
+ - EventTarget provides a shared implementation of dispatchEvent,
+ which subclasses with special event dispatch rules, like Node, override.
+ - To support Node, which lazily instantiates its EventTarget data,
+ EventTarget has no data members, and instead makes a virtual call
+ to get its data from wherever its subclass chose to store it.
+
+ Code that used to call dispatchEvent, passing an ExceptionCode paratmeter,
+ even though no exception could be thrown, has been changed not to do so,
+ to improve clarity and performance.
+
+ Code that used to call a special dispatchXXXEvent function, which just
+ turned around and called dispatchEvent, has been changed to call
+ dispatchEvent, to improve clarity and performance.
+
+ * WebCore.base.exp:
+ * WebCore.xcodeproj/project.pbxproj: Another day in the life of a WebKit
+ engineer.
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::isObservableThroughDOM): Updated for Node API change. Added
+ "is not in the document but is firing event listeners" as a condition
+ that makes a Node observable in the DOM, so that event listeners firing
+ on removed nodes are not destroyed midstream. (This was a long-standing
+ bug that was somewhat hidden by the old implementation's habit of
+ copying the RegisteredEventListener vector before firing events, which
+ would keep almost all the relevant objects from being destroyed.)
+
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::JSEventListener::handleEvent): Removed the isWindowEvent flag
+ because it was one of the most elaborately planned no-ops in the history
+ of software crime, and one of the reasons clients thought they needed more
+ than one dispatchEvent function even though they didn't.
+ * bindings/js/JSEventListener.h:
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::markChildren):
+ (WebCore::JSMessagePort::markChildren):
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::markChildren):
+ * bindings/js/JSAbstractWorkerCustom.cpp:
+ * bindings/js/JSDOMApplicationCacheCustom.cpp:
+ * bindings/js/JSDedicatedWorkerContextCustom.cpp:
+ * bindings/js/JSEventSourceCustom.cpp:
+ * bindings/js/JSMessagePortCustom.cpp:
+ * bindings/js/JSSharedWorkerContextCustom.cpp: Removed.
+ * bindings/js/JSWebSocketCustom.cpp:
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::markChildren):
+ * bindings/js/JSWorkerCustom.cpp:
+ * bindings/js/JSXMLHttpRequestCustom.cpp:
+ (WebCore::JSXMLHttpRequest::markChildren):
+ * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
+ (WebCore::JSXMLHttpRequestUpload::markChildren): EventListener marking is
+ now autogenerated. Classes that still have custom mark functions for other
+ reasons now call a shared EventTarget API to mark their EventListeners.
+
+ * bindings/objc/ObjCEventListener.h:
+ * bindings/objc/ObjCEventListener.mm:
+ (WebCore::ObjCEventListener::handleEvent): Bye bye isWindowEvent.
+
+ * bindings/scripts/CodeGeneratorJS.pm: Autogeneration support for
+ marking and invalidating event listeners.
+
+ * dom/CharacterData.cpp:
+ (WebCore::CharacterData::dispatchModifiedEvent):
+ * dom/ContainerNode.cpp:
+ (WebCore::ContainerNode::insertBefore):
+ (WebCore::ContainerNode::replaceChild):
+ (WebCore::willRemoveChild):
+ (WebCore::ContainerNode::appendChild):
+ (WebCore::dispatchChildInsertionEvents):
+ (WebCore::dispatchChildRemovalEvents):
+ * dom/Document.cpp:
+ (WebCore::Document::removeAllEventListeners):
+ (WebCore::Document::implicitClose):
+ (WebCore::Document::setFocusedNode):
+ (WebCore::Document::dispatchWindowEvent):
+ (WebCore::Document::dispatchWindowLoadEvent):
+ (WebCore::Document::finishedParsing):
+ * dom/Document.h: Use dispatchEvent directly.
+
+ * dom/Element.h: Moved a few event listener attributes down from Node,
+ since they don't apply to all Nodes, only Elements.
+
+ * dom/EventListener.h: Removed isWindowEvent parameter.
+
+ * dom/EventNames.h: Added the "display" event name, so it works correctly
+ with attribute macros, and for performance.
+
+ * dom/EventTarget.cpp:
+ (WebCore::forbidEventDispatch):
+ (WebCore::allowEventDispatch):
+ (WebCore::eventDispatchForbidden): Made this code (embarrasingly) thread
+ safe, since it's now called on multiple threads. (Currently, we only forbid
+ event dispatch on the main thread. If we ever want to forbid event dispatch
+ on secondary threads, we can improve it then.)
+
+ (WebCore::EventTarget::addEventListener):
+ (WebCore::EventTarget::removeEventListener):
+ (WebCore::EventTarget::setAttributeEventListener):
+ (WebCore::EventTarget::getAttributeEventListener):
+ (WebCore::EventTarget::clearAttributeEventListener):
+ (WebCore::EventTarget::dispatchEvent):
+ (WebCore::EventTarget::fireEventListeners):
+ (WebCore::EventTarget::getEventListeners):
+ (WebCore::EventTarget::removeAllEventListeners):
+ * dom/EventTarget.h:
+ (WebCore::FiringEventEndIterator::FiringEventEndIterator):
+ (WebCore::EventTarget::ref):
+ (WebCore::EventTarget::deref):
+ (WebCore::EventTarget::markEventListeners):
+ (WebCore::EventTarget::invalidateEventListeners):
+ (WebCore::EventTarget::isFiringEventListeners):
+ (WebCore::EventTarget::hasEventListeners): The ONE TRUE IMPLEMENTATION of
+ EventTarget APIs, crafted from an amalgam of all the different versions
+ we used to have. The most significant change here is that we no longer
+ make a copy of an EventListener vector before firing the events in the
+ vector -- instead, we use a reference to the original vector, along with
+ a notification mechanism for the unlikely case when an EventListener is
+ removed from the vector. This substantially reduces malloc, copying, and
+ refcount overhead, and complexity.
+
+ * dom/InputElement.cpp:
+ (WebCore::InputElement::setValueFromRenderer):
+ * dom/MessageEvent.h:
+ (WebCore::MessageEvent::create): Use dispatchEvent directly.
+
+ * dom/MessagePort.cpp:
+ (WebCore::MessagePort::dispatchMessages):
+ (WebCore::MessagePort::eventTargetData):
+ (WebCore::MessagePort::ensureEventTargetData):
+ * dom/MessagePort.h:
+ (WebCore::MessagePort::setOnmessage):
+ (WebCore::MessagePort::onmessage):
+ * dom/MessagePort.idl: Removed custom EventTarget implementation.
+
+ * dom/MutationEvent.h:
+ (WebCore::MutationEvent::create): Added some default values so callers
+ can construct MutationEvents more easily, without calling a custom dispatch
+ function.
+
+ * dom/Node.cpp:
+ (WebCore::Node::addEventListener):
+ (WebCore::Node::removeEventListener):
+ (WebCore::Node::eventTargetData):
+ (WebCore::Node::ensureEventTargetData):
+ (WebCore::Node::handleLocalEvents):
+ (WebCore::Node::dispatchEvent):
+ (WebCore::Node::dispatchGenericEvent):
+ (WebCore::Node::dispatchSubtreeModifiedEvent):
+ (WebCore::Node::dispatchUIEvent):
+ (WebCore::Node::dispatchKeyEvent):
+ (WebCore::Node::dispatchMouseEvent):
+ (WebCore::Node::dispatchWheelEvent):
+ (WebCore::Node::dispatchFocusEvent):
+ (WebCore::Node::dispatchBlurEvent):
+ * dom/Node.h:
+ (WebCore::Node::preDispatchEventHandler):
+ (WebCore::Node::postDispatchEventHandler):
+ * dom/Node.idl:
+ * dom/NodeRareData.h:
+ (WebCore::NodeRareData::eventTargetData):
+ (WebCore::NodeRareData::ensureEventTargetData): Use the shared EventTarget
+ interface, and call dispatchEvent directly instead of custom dispatchXXXEvent
+ functions that just forwarded to dispatchEvent.
+
+ * dom/RegisteredEventListener.cpp:
+ * dom/RegisteredEventListener.h:
+ (WebCore::RegisteredEventListener::RegisteredEventListener):
+ (WebCore::operator==): This is just a simple struct now, since we no longer
+ do a complicated copy / refCount / isRemoved dance just to honor the rule
+ that an EventListener can be removed during event dispatch.
+
+ * history/CachedFrame.cpp:
+ (WebCore::CachedFrameBase::restore): Removed another custom dispatchEvent.
+
+ * html/HTMLBodyElement.cpp:
+ * html/HTMLBodyElement.h: Use the shared EventTarget API.
+
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
+ (WebCore::HTMLFormControlElement::checkValidity):
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::handleLocalEvents):
+ (WebCore::HTMLFormElement::prepareSubmit):
+ (WebCore::HTMLFormElement::reset):
+ * html/HTMLFormElement.h: Use the standard dispatchEvent API.
+
+ * html/HTMLFrameSetElement.cpp:
+ * html/HTMLFrameSetElement.h: Use the shared EventTarget API.
+
+ * html/HTMLImageLoader.cpp:
+ (WebCore::HTMLImageLoader::dispatchLoadEvent):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::onSearch):
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::loadInternal):
+ * html/HTMLScriptElement.cpp:
+ (WebCore::HTMLScriptElement::dispatchLoadEvent):
+ (WebCore::HTMLScriptElement::dispatchErrorEvent):
+ * html/HTMLSourceElement.cpp:
+ (WebCore::HTMLSourceElement::errorEventTimerFired):
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::notifyFinished): Use the standard dispatchEvent API.
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::handleEvent):
+ * inspector/InspectorDOMAgent.h:
+ * inspector/InspectorDOMStorageResource.cpp:
+ (WebCore::InspectorDOMStorageResource::handleEvent):
+ * inspector/InspectorDOMStorageResource.h:
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::stopLoading):
+ (WebCore::FrameLoader::canCachePageContainingThisFrame):
+ (WebCore::FrameLoader::logCanCacheFrameDecision):
+ (WebCore::HashChangeEventTask::performTask):
+ (WebCore::FrameLoader::pageHidden): No more isWindowEvent.
+
+ * loader/ImageDocument.cpp:
+ (WebCore::ImageEventListener::handleEvent):
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::CallCacheListenerTask::performTask):
+ * loader/appcache/ApplicationCacheHost.cpp:
+ (WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
+ * loader/appcache/ApplicationCacheHost.h:
+ * loader/appcache/DOMApplicationCache.cpp:
+ (WebCore::DOMApplicationCache::eventTargetData):
+ (WebCore::DOMApplicationCache::ensureEventTargetData):
+ * loader/appcache/DOMApplicationCache.h:
+ * loader/appcache/DOMApplicationCache.idl: Switched to the standard
+ EventTarget API. As a part of this, I switched this class from using a
+ custom internal event name enumeration to using the standard EventNames.
+
+ * notifications/Notification.cpp:
+ (WebCore::Notification::eventTargetData):
+ (WebCore::Notification::ensureEventTargetData):
+ * notifications/Notification.h:
+ (WebCore::Notification::scriptExecutionContext):
+ * notifications/Notification.idl: Switched to the standard EventTarget API.
+
+ * page/DOMWindow.cpp:
+ (WebCore::PostMessageTimer::event):
+ (WebCore::windowsWithUnloadEventListeners):
+ (WebCore::windowsWithBeforeUnloadEventListeners):
+ (WebCore::allowsBeforeUnloadListeners):
+ (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
+ (WebCore::DOMWindow::pendingUnloadEventListeners):
+ (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Changed the "pending"
+ unload / beforeunload listener tracker just to track which windows had
+ such listeners, instead of actually keeping a copy of the listeners. Now,
+ this code can use the standard EventTarget API.
+
+ (WebCore::DOMWindow::~DOMWindow):
+ (WebCore::DOMWindow::postMessageTimerFired):
+ (WebCore::DOMWindow::addEventListener):
+ (WebCore::DOMWindow::removeEventListener):
+ (WebCore::DOMWindow::dispatchLoadEvent):
+ (WebCore::DOMWindow::dispatchEvent):
+ (WebCore::DOMWindow::removeAllEventListeners):
+ (WebCore::DOMWindow::captureEvents):
+ (WebCore::DOMWindow::releaseEvents):
+ (WebCore::DOMWindow::eventTargetData):
+ (WebCore::DOMWindow::ensureEventTargetData):
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl: Use the standard EventTarget APIs.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::canMouseDownStartSelect):
+ (WebCore::EventHandler::canMouseDragExtendSelect):
+ (WebCore::EventHandler::sendResizeEvent):
+ (WebCore::EventHandler::sendScrollEvent): Use dispatchEvent directly.
+
+ * page/EventSource.cpp:
+ (WebCore::EventSource::endRequest):
+ (WebCore::EventSource::didReceiveResponse):
+ (WebCore::EventSource::parseEventStreamLine):
+ (WebCore::EventSource::stop):
+ (WebCore::EventSource::createMessageEvent):
+ (WebCore::EventSource::eventTargetData):
+ (WebCore::EventSource::ensureEventTargetData):
+ * page/EventSource.h:
+ * page/EventSource.idl: Use the standard EventTarget APIs.
+
+ * page/FocusController.cpp:
+ (WebCore::dispatchEventsOnWindowAndFocusedNode):
+ (WebCore::FocusController::setFocusedFrame):
+ * page/Frame.cpp:
+ (WebCore::Frame::shouldClose):
+ * page/Frame.h:
+ * page/Page.cpp:
+ (WebCore::networkStateChanged):
+ * page/animation/AnimationController.cpp:
+ (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
+ * rendering/RenderListBox.cpp:
+ (WebCore::RenderListBox::valueChanged):
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::selectionChanged):
+ * rendering/RenderTextControlMultiLine.cpp:
+ (WebCore::RenderTextControlMultiLine::subtreeHasChanged): Use dispatchEvent.
+
+ * svg/SVGElement.cpp:
+ (WebCore::hasLoadListener): Rewritten for new EventTarget API.
+
+ * svg/SVGElementInstance.cpp:
+ (WebCore::dummyEventTargetData):
+ (WebCore::SVGElementInstance::addEventListener):
+ (WebCore::SVGElementInstance::removeEventListener):
+ (WebCore::SVGElementInstance::removeAllEventListeners):
+ (WebCore::SVGElementInstance::dispatchEvent):
+ (WebCore::SVGElementInstance::eventTargetData):
+ (WebCore::SVGElementInstance::ensureEventTargetData): Use the EventTarget API.
+
+ * svg/SVGElementInstance.h:
+ * svg/SVGImageLoader.cpp:
+ (WebCore::SVGImageLoader::dispatchLoadEvent):
+ * svg/SVGScriptElement.cpp:
+ (WebCore::SVGScriptElement::dispatchErrorEvent): Use dispatchEvent directly.
+
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::transferEventListenersToShadowTree): Updated for
+ new EventTarget API.
+
+ * svg/animation/SVGSMILElement.cpp:
+ (WebCore::ConditionEventListener::handleEvent): No more isWindowEvent.
+
+ * websockets/WebSocket.cpp:
+ (WebCore::ProcessWebSocketEventTask::create):
+ (WebCore::ProcessWebSocketEventTask::performTask):
+ (WebCore::ProcessWebSocketEventTask::ProcessWebSocketEventTask):
+ (WebCore::WebSocket::didConnect):
+ (WebCore::WebSocket::didReceiveMessage):
+ (WebCore::WebSocket::didClose):
+ (WebCore::WebSocket::eventTargetData):
+ (WebCore::WebSocket::ensureEventTargetData):
+ * websockets/WebSocket.h:
+ * websockets/WebSocket.idl:
+ * workers/AbstractWorker.cpp:
+ (WebCore::AbstractWorker::eventTargetData):
+ (WebCore::AbstractWorker::ensureEventTargetData):
+ * workers/AbstractWorker.h:
+ * workers/AbstractWorker.idl:
+ * workers/DedicatedWorkerContext.cpp:
+ * workers/DedicatedWorkerContext.h:
+ * workers/DedicatedWorkerContext.idl:
+ * workers/DefaultSharedWorkerRepository.cpp:
+ (WebCore::SharedWorkerConnectTask::performTask):
+ (WebCore::SharedWorkerScriptLoader::load):
+ (WebCore::SharedWorkerScriptLoader::notifyFinished):
+ * workers/SharedWorker.idl:
+ * workers/SharedWorkerContext.cpp:
+ (WebCore::createConnectEvent):
+ * workers/SharedWorkerContext.h:
+ * workers/SharedWorkerContext.idl:
+ * workers/Worker.cpp:
+ (WebCore::Worker::notifyFinished):
+ * workers/Worker.h:
+ * workers/Worker.idl:
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::eventTargetData):
+ (WebCore::WorkerContext::ensureEventTargetData):
+ * workers/WorkerContext.h:
+ * workers/WorkerContext.idl:
+ * workers/WorkerMessagingProxy.cpp:
+ (WebCore::MessageWorkerContextTask::performTask):
+ (WebCore::MessageWorkerTask::performTask):
+ (WebCore::WorkerExceptionTask::performTask):
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::callReadyStateChangeListener):
+ (WebCore::XMLHttpRequest::createRequest):
+ (WebCore::XMLHttpRequest::abort):
+ (WebCore::XMLHttpRequest::networkError):
+ (WebCore::XMLHttpRequest::abortError):
+ (WebCore::XMLHttpRequest::didSendData):
+ (WebCore::XMLHttpRequest::didReceiveData):
+ (WebCore::XMLHttpRequest::eventTargetData):
+ (WebCore::XMLHttpRequest::ensureEventTargetData):
+ * xml/XMLHttpRequest.h:
+ * xml/XMLHttpRequest.idl:
+ * xml/XMLHttpRequestProgressEvent.h:
+ (WebCore::XMLHttpRequestProgressEvent::create):
+ * xml/XMLHttpRequestUpload.cpp:
+ (WebCore::XMLHttpRequestUpload::eventTargetData):
+ (WebCore::XMLHttpRequestUpload::ensureEventTargetData):
+ * xml/XMLHttpRequestUpload.h:
+ * xml/XMLHttpRequestUpload.idl: Use new EventTarget API.
+
+2009-09-23 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ - Support for maxLength of <textarea>
+ - Move numGraphemeClusters() and numCharactersInGraphemeClusters() from InputElement to String.
+ https://bugs.webkit.org/show_bug.cgi?id=29292
+
+ Test: fast/forms/textarea-maxlength.html
+
+ * dom/InputElement.cpp:
+ (WebCore::InputElement::sanitizeUserInputValue):
+ (WebCore::InputElement::handleBeforeTextInsertedEvent):
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::defaultEventHandler):
+ (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
+ (WebCore::HTMLTextAreaElement::sanitizeUserInputValue):
+ (WebCore::HTMLTextAreaElement::maxLength):
+ (WebCore::HTMLTextAreaElement::setMaxLength):
+ * html/HTMLTextAreaElement.h:
+ * html/HTMLTextAreaElement.idl:
+ * platform/text/PlatformString.h:
+ * platform/text/String.cpp:
+ (WebCore::String::numGraphemeClusters):
+ (WebCore::String::numCharactersInGraphemeClusters):
+
+2009-09-23 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] REGRESSION: BitmapImage::getGdkPixbuf fails for non-square images
+ https://bugs.webkit.org/show_bug.cgi?id=29654
+
+ Give GDK_Backspace key events the proper text properties.
+
+ Instead of adding new tests, this change removes existing tests
+ from Gtk's skipped list.
+
+ * platform/gtk/KeyEventGtk.cpp:
+ (WebCore::keyIdentifierForGdkKeyCode):
+ (WebCore::singleCharacterString):
+
+2009-09-23 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=26989
+ Should allow navigation of top-level openers
+ <rdar://problem/7034025>
+
+ Allow navigation of cross-origin window.opener if it is top-level frame.
+
+ Test: http/tests/security/frameNavigation/cross-origin-opener.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::shouldAllowNavigation):
+
+2009-09-23 Marshall Culpepper <mculpepper@appcelerator.com>
+
+ Reviewed by Eric Seidel.
+
+ Added $(WebKitLibrariesDir)/include/cairo so cairo.h is found by
+ default when the necessary dependencies are extracted into the
+ WebKitLibrariesDir.
+ https://bugs.webkit.org/show_bug.cgi?id=29661
+
+ * WebCore.vcproj/WebCoreCairo.vsprops:
+
+2009-09-23 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Crash when website does a history.back() followed by an alert()
+ https://bugs.webkit.org/show_bug.cgi?id=29686
+ rdar://problem/6984996
+
+ When loading is deferred, we need to defer timer-based loads
+ too, not just networking-driven loads. Otherwise we can get
+ syncronouse navigation while running a script, which leads to
+ crashes and other badness.
+
+ This patch includes a manual test; an automated test may be
+ possible some time in the future.
+
+ * dom/Document.cpp:
+ (WebCore::Document::processHttpEquiv): Use scheduleLocationChange
+ instead of scheduleHTTPRedirection to implement the navigation
+ needed for x-frame-options.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::FrameLoader): Updated for data members with
+ new names and new data members.
+ (WebCore::FrameLoader::setDefersLoading): When turning deferral
+ off, call startRedirectionTimer and startCheckCompleteTimer, since
+ either of them might have been fired and ignored while defersLoading
+ was true.
+ (WebCore::FrameLoader::clear): Updated for replacement of the
+ m_checkCompletedTimer and m_checkLoadCompleteTimer timers.
+ (WebCore::FrameLoader::allAncestorsAreComplete): Added.
+ (WebCore::FrameLoader::checkCompleted): Added code to set
+ m_shouldCallCheckCompleted to false. Changed code that calls
+ startRedirectionTimer to call it unconditionally, since that
+ function now knows when to do work and doesn't expect callers
+ to handle that any more.
+ (WebCore::FrameLoader::checkTimerFired): Added. Replaces the old
+ timer fired callbacks. Calls checkCompleted and checkLoadComplete
+ as appropriate, but not when defersLoading is true.
+ (WebCore::FrameLoader::startCheckCompleteTimer): Added. Replaces
+ the two different calls to start timers before. Only starts the
+ timers if they are needed.
+ (WebCore::FrameLoader::scheduleCheckCompleted): Changed to call
+ startCheckCompleteTimer after setting boolean.
+ (WebCore::FrameLoader::scheduleCheckLoadComplete): Ditto.
+ (WebCore::FrameLoader::scheduleHistoryNavigation): Removed
+ canGoBackOrForward check. The logic works more naturally when
+ we don't do anything until the timer fires.
+ (WebCore::FrameLoader::redirectionTimerFired): Do nothing if
+ defersLoading is true. Also moved canGoBackOrForward check here.
+ (WebCore::FrameLoader::scheduleRedirection): Changed code that
+ calls startRedirectionTimer to do so unconditionally. That
+ function now handles the rules about when to start the timer
+ rather than expecting the caller to do so.
+ (WebCore::FrameLoader::startRedirectionTimer): Added code to
+ handle the case where there is no redirection scheduled,
+ where the timer is already active, or where this is a classic
+ redirection and there is an ancestor that has not yet completed
+ loading.
+ (WebCore::FrameLoader::completed): Call startRedirectionTimer
+ here directly instead of calling a cover named parentCompleted.
+ Hooray! One less function in the giant FrameLoader class!
+ (WebCore::FrameLoader::checkLoadComplete): Added code to set
+ m_shouldCallCheckLoadComplete to false.
+
+ * loader/FrameLoader.h: Replaced the two functions
+ checkCompletedTimerFired and checkLoadCompleteTimerFired with
+ one function, checkTimerFired. Removed the parentCompleted
+ function. Added the startCheckCompleteTimer and
+ allAncestorsAreComplete functions. Replaced the
+ m_checkCompletedTimer and m_checkLoadCompleteTimer data
+ members with m_checkTimer, m_shouldCallCheckCompleted, and
+ m_shouldCallCheckLoadComplete.
+
+ * manual-tests/go-back-after-alert.html: Added.
+ * manual-tests/resources/alert-and-go-back.html: Added.
+
+2009-09-23 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/29660> Move "Generate 64-bit Export File" build phase script into DerivedSources.make
+
+ Reviewed by Mark Rowe.
+
+ The "Generate 64-bit Export File" build phase script generated
+ the WebCore.LP64.exp export file used to link 64-bit WebCore.
+ Instead of having a separate build phase script, move its
+ generation into DerivedSources.make where WebCore.exp is
+ generated.
+
+ * DerivedSources.make: Added a rule to make WebCore.LP64.exp.
+ Added code to append WebCore.PluginHostProcess.exp to
+ $(WEBCORE_EXPORT_DEPENDENCIES) when WTF_USE_PLUGIN_HOST_PROCESS
+ is set to 1.
+ * WebCore.PluginHostProcess.exp: Renamed from WebCore/WebCore.LP64.exp.
+ * WebCore.xcodeproj/project.pbxproj: Removed the "Generate
+ 64-bit Export File" build phase script. Renamed WebCore.LP64.exp
+ to WebCore.PluginHostProcess.exp.
+
+2009-09-23 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29694
+ [Chromium] Eliminate dependency on gfx::Rect from ImageSkia.
+
+ * platform/graphics/skia/ImageSkia.cpp:
+ (WebCore::drawResampledBitmap):
+
+2009-09-22 Timothy Hatcher <timothy@apple.com>
+
+ Prevent scrolling multiple elements during latched wheel events.
+
+ Reviewed by Anders Carlsson.
+
+ * page/EventHandler.cpp:
+ (WebCore::scrollAndAcceptEvent):
+ (WebCore::EventHandler::clear):
+ (WebCore::EventHandler::handleWheelEvent):
+ * page/EventHandler.h:
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::scroll):
+ * rendering/RenderBox.h:
+
+2009-09-23 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29523
+
+ Fixes an issue where a JavaScript URL that was URL-encoded twice can bypass the
+ XSSAuditor.
+
+ The method FrameLoader::executeIfJavaScriptURL decodes the URL escape
+ sequences in a JavaScript URL before it is eventually passed to the XSSAuditor.
+ Because the XSSAuditor also decodes the URL escape sequences as part of its
+ canonicalization, the double decoding of a JavaScript URL would
+ not match the canonicalization of the input parameters.
+
+ Tests: http/tests/security/xssAuditor/iframe-javascript-url-url-encoded.html
+ http/tests/security/xssAuditor/javascript-link-url-encoded.html
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate): Moved call to
+ XSSAuditor::canEvaluateJavaScriptURL into FrameLoader::executeIfJavaScriptURL.
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate): Ditto.
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::executeIfJavaScriptURL): Modified to call
+ XSSAuditor::canEvaluateJavaScriptURL on the JavaScript URL before it is
+ decoded.
+
+2009-09-22 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by John Sullivan.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29657
+ Columns don't break properly in positioned elements with a fixed height. Make sure that
+ a block is still considered to have columns even when the column count is 1 if the column
+ width is non-auto.
+
+ Added fast/multicol/positioned-with-constrained-height.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::setDesiredColumnCountAndWidth):
+
+2009-09-23 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Rubber-stamped by Simon Hausmann.
+
+ Add a null check for the Document*. In the mirror benchmarking
+ application a crash from a call from JavaScript was observed.
+
+ I was not able to come up with a test case for this issue.
+
+ * platform/qt/CookieJarQt.cpp:
+ (WebCore::cookieJar):
+
+2009-09-23 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Fix the Qt/Windows build, after the introduction of
+ the page client.
+
+ * plugins/win/PluginViewWin.cpp:
+ (windowHandleForPageClient):
+ (WebCore::PluginView::getValue):
+ (WebCore::PluginView::forceRedraw):
+ (WebCore::PluginView::platformStart):
+
+2009-09-23 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] media tests failing after their rework
+ https://bugs.webkit.org/show_bug.cgi?id=29532
+
+ Correctly advertise the mime types used by the common formats used
+ in the tests.
+
+ Tests that regressed, and will pass again:
+
+ media/video-canvas-source.html
+ media/video-controls.html
+ media/video-currentTime-set2.html
+ media/video-dom-autoplay.html
+ media/video-dom-src.html
+ media/video-error-abort.html
+ media/video-load-networkState.html
+ media/video-load-readyState.html
+ media/video-muted.html
+ media/video-no-autoplay.html
+ media/video-pause-empty-events.html
+ media/video-play-empty-events.html
+ media/video-seekable.html
+ media/video-seeking.html
+ media/video-size.html
+ media/video-source-type-params.html
+ media/video-source-type.html
+ media/video-source.html
+ media/video-src-change.html
+ media/video-src-invalid-remove.html
+ media/video-src-remove.html
+ media/video-src-set.html
+ media/video-src-source.html
+ media/video-src.html
+ media/video-timeupdate-during-playback.html
+ media/video-volume.html
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mimeTypeCache):
+
+2009-09-22 Charles Wei <charles.wei@torchmobile.com.cn>
+
+ Reviewed by Eric Seidel.
+
+ Fix the crash problem with absolte positioned children in foreignobject
+ htts://bugs.webkit.org/show_bug.cgi?id=26342
+
+ Test: svg/custom/foreignobject-crash-with-absolute-positioned-children.svg
+
+ * rendering/RenderForeignObject.h:
+ (WebCore::RenderForeignObject::isSVGForeignObject):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::containingBlock):
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::isSVGForeignObject):
+
+2009-09-22 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ SharedWorkers "name" attribute is now optional.
+ https://bugs.webkit.org/show_bug.cgi?id=28897
+
+ Test: fast/workers/shared-worker-name.html
+
+ * bindings/js/JSSharedWorkerConstructor.cpp:
+ (WebCore::constructSharedWorker):
+ Default 'name' attribute to empty string if it is not provided.
+ * bindings/v8/custom/V8SharedWorkerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ Default 'name' attribute to empty string if it is not provided.
+ * workers/DefaultSharedWorkerRepository.cpp:
+ (WebCore::SharedWorkerProxy::matches):
+ Now matches URLs if names are empty strings.
+ (WebCore::DefaultSharedWorkerRepository::getProxy):
+ Pass URL in to SharedWorkerProxy::matches().
+
+2009-09-22 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, another build fix.
+
+ [Chromium] Add another missing include.
+ https://bugs.webkit.org/show_bug.cgi?id=29536
+
+ * inspector/InspectorController.cpp: Added DOMWindow.h include.
+
+2009-09-22 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [Chromium] Add missing include.
+ https://bugs.webkit.org/show_bug.cgi?id=29536
+
+ * inspector/InspectorDOMStorageResource.cpp: Added DOMWindow.h include.
+
+2009-09-22 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Tighten up the ScheduledRedirection machinery to prepare for a bug fix
+ https://bugs.webkit.org/show_bug.cgi?id=29663
+
+ * loader/FrameLoader.cpp:
+ (WebCore::ScheduledRedirection::ScheduledRedirection): Added a boolean,
+ initialized to false, to keep track if the redirection has been
+ communicated to the client.
+ (WebCore::FrameLoader::stopLoading): Tweaked a comment.
+ (WebCore::FrameLoader::cancelRedirection): Removed code to clear
+ m_scheduledRedirection.clear since stopRedirectionTimer does that now.
+ (WebCore::FrameLoader::allChildrenAreComplete): Added.
+ (WebCore::FrameLoader::checkCompleted): Use allChildrenAreComplete
+ function for clarity.
+ (WebCore::FrameLoader::checkCallImplicitClose): Ditto.
+ (WebCore::FrameLoader::scheduleRedirection): Changed to take a PassOwnPtr.
+ (WebCore::FrameLoader::startRedirectionTimer): Added code to set the
+ toldClient flag and not call clientRedirected a second time if it is set.
+ (WebCore::FrameLoader::stopRedirectionTimer): Changed so this can be safely
+ called multiple times and it will call clientRedirectCancelledOrFinished
+ only once.
+
+ * loader/FrameLoader.h: Changed scheduleRedirection to be a PassOwnPtr.
+ Added allChildrenAreComplete function.
+
+2009-09-22 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Migrate Databases tab to InjectedScript /
+ serialized interaction.
+
+ DOMStorage interaction is now serialized into JSON messages
+ and doesn't require quarantined objects.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28873
+
+ * dom/EventListener.h:
+ (WebCore::EventListener::):
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::selectDOMStorage):
+ (WebCore::InspectorBackend::getDOMStorageEntries):
+ (WebCore::InspectorBackend::setDOMStorageItem):
+ (WebCore::InspectorBackend::removeDOMStorageItem):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::didCommitLoad):
+ (WebCore::InspectorController::selectDOMStorage):
+ (WebCore::InspectorController::getDOMStorageEntries):
+ (WebCore::InspectorController::setDOMStorageItem):
+ (WebCore::InspectorController::removeDOMStorageItem):
+ (WebCore::InspectorController::getDOMStorageResourceForId):
+ * inspector/InspectorController.h:
+ * inspector/InspectorDOMStorageResource.cpp:
+ (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource):
+ (WebCore::InspectorDOMStorageResource::bind):
+ (WebCore::InspectorDOMStorageResource::unbind):
+ (WebCore::InspectorDOMStorageResource::startReportingChangesToFrontend):
+ (WebCore::InspectorDOMStorageResource::handleEvent):
+ (WebCore::InspectorDOMStorageResource::operator==):
+ * inspector/InspectorDOMStorageResource.h:
+ (WebCore::InspectorDOMStorageResource::cast):
+ (WebCore::InspectorDOMStorageResource::id):
+ (WebCore::InspectorDOMStorageResource::domStorage):
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::selectDOMStorage):
+ (WebCore::InspectorFrontend::didGetDOMStorageEntries):
+ (WebCore::InspectorFrontend::didSetDOMStorageItem):
+ (WebCore::InspectorFrontend::didRemoveDOMStorageItem):
+ (WebCore::InspectorFrontend::updateDOMStorage):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/DOMStorage.js:
+ (WebInspector.DOMStorage):
+ (WebInspector.DOMStorage.prototype.get id):
+ (WebInspector.DOMStorage.prototype.get domStorage):
+ (WebInspector.DOMStorage.prototype.get isLocalStorage):
+ (WebInspector.DOMStorage.prototype.getEntriesAsync):
+ (WebInspector.DOMStorage.prototype.setItemAsync):
+ (WebInspector.DOMStorage.prototype.removeItemAsync):
+ * inspector/front-end/DOMStorageDataGrid.js:
+ (WebInspector.DOMStorageDataGrid):
+ (WebInspector.DOMStorageDataGrid.prototype._startEditingColumnOfDataGridNode):
+ (WebInspector.DOMStorageDataGrid.prototype._startEditing):
+ (WebInspector.DOMStorageDataGrid.prototype._editingCommitted):
+ (WebInspector.DOMStorageDataGrid.prototype._editingCancelled):
+ (WebInspector.DOMStorageDataGrid.prototype.deleteSelectedRow):
+ * inspector/front-end/DOMStorageItemsView.js:
+ (WebInspector.DOMStorageItemsView.prototype.update):
+ (WebInspector.DOMStorageItemsView.prototype._showDOMStorageEntries):
+ (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageEntries):
+ * inspector/front-end/StoragePanel.js:
+ (WebInspector.StoragePanel.prototype.show):
+ (WebInspector.StoragePanel.prototype.reset):
+ (WebInspector.StoragePanel.prototype.selectDOMStorage):
+ (WebInspector.StoragePanel.prototype.updateDOMStorage):
+ (WebInspector.StoragePanel.prototype._domStorageForId):
+ * inspector/front-end/inspector.js:
+ (WebInspector.addDOMStorage):
+ (WebInspector.updateDOMStorage):
+
+2009-09-22 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Fix for XMLHttpRequest.abort() should destroy the response text.
+ https://bugs.webkit.org/show_bug.cgi?id=29658
+ <rdar://problem/5301430>
+
+ Clearing the response text after calling XMLHttpRequest.abort() is necessary
+ per spec and matches Firefox. It is also a potential memory win.
+
+ Test: http/tests/xmlhttprequest/abort-should-destroy-responseText.html
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::abort): Clear the response text making sure to
+ keep the actual ResourceReponse around so that the response status and response
+ status text are kept around.
+
+2009-09-22 Dimitri Glazkov <dglazkov@chromium.org>
+
+ No review, rolling out r48639.
+ http://trac.webkit.org/changeset/48639
+
+ * bindings/v8/V8GCController.cpp:
+ (WebCore::ObjectGrouperVisitor::visitDOMWrapper):
+
+2009-09-22 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Changing the transaction coordinator to (re-)allow multiple read
+ transactions on the same database to run concurrently (without
+ risking a deadlock this time).
+
+ https://bugs.webkit.org/show_bug.cgi?id=29115
+
+ Tests: storage/read-and-write-transactions-dont-run-together.html
+ storage/read-transactions-running-concurrently.html
+
+ * storage/SQLTransaction.h:
+ (WebCore::SQLTransaction::isReadOnly): Returns the type of the
+ transaction.
+ * storage/SQLTransactionCoordinator.cpp:
+ (WebCore::SQLTransactionCoordinator::acquireLock): Changed to
+ allow multiple read transactions on the same DB to run
+ concurrently.
+ (WebCore::SQLTransactionCoordinator::releaseLock): Changed to
+ allow multiple read transactions on the same DB to run
+ concurrently.
+ (WebCore::SQLTransactionCoordinator::shutdown): Renamed the map.
+ * storage/SQLTransactionCoordinator.h:
+
+2009-09-22 Peter Kasting <pkasting@google.com>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29652
+ Support true system colors for CSS system colors in Chromium/Win.
+
+ * rendering/RenderThemeChromiumWin.cpp:
+ (WebCore::cssValueIdToSysColorIndex):
+ (WebCore::RenderThemeChromiumWin::systemColor):
+ * rendering/RenderThemeChromiumWin.h:
+
+2009-09-22 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Fix for <rdar://problem/6925121> SAP: Wrong width calculation in
+ table with fixed layout
+ -and corresponding-
+ https://bugs.webkit.org/show_bug.cgi?id=29501
+
+ New Tests:
+ * fast/table/fixed-table-with-percent-inside-percent-table.html: Added.
+ * fast/table/fixed-table-with-percent-width-inside-auto-table.html: Added.
+ * fast/table/fixed-table-with-percent-width-inside-div.html: Added.
+ * fast/table/fixed-table-with-percent-width-inside-extra-large-div.html: Added.
+ * fast/table/fixed-table-with-percent-width-inside-fixed-width-table.html: Added.
+ * fast/table/fixed-table-with-small-percent-width.html: Added.
+
+ This new quirk is very similar to an existing one that was
+ implemented in revision 4316.
+ * rendering/FixedTableLayout.cpp:
+ (WebCore::FixedTableLayout::calcPrefWidths):
+
+2009-09-22 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ List HTTP status code with response headers in resources tab of Web Inspector.
+ http://webkit.org/b/19945
+
+ This patch adds a new top level list in the resources tab, HTTP Information, that
+ for now, contains the Request Method (GET, POST, etc.) and the Status Code (200, 404, etc.).
+ Additionally, it adds a colored dot next to the requested URL to show the status
+ (green for success, orange for redirect, red for error).
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/ImageView.js:
+ (WebInspector.ImageView):
+ * inspector/front-end/Images/errorRedDot.png: Added.
+ * inspector/front-end/Images/successGreenDot.png: Added.
+ * inspector/front-end/Images/warningOrangeDot.png: Added.
+ * inspector/front-end/Resource.js:
+ (WebInspector.Resource.StatusTextForCode):
+ * inspector/front-end/ResourceView.js:
+ (WebInspector.ResourceView):
+ (WebInspector.ResourceView.prototype._refreshURL):
+ (WebInspector.ResourceView.prototype._refreshHTTPInformation):
+ * inspector/front-end/inspector.css:
+
+2009-09-22 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Back list isn't properly updated for fragment changes after a redirect.
+ <rdar://problem/6142803> and https://bugs.webkit.org/show_bug.cgi?id=20355
+
+ Test: fast/loader/fragment-after-redirect-gets-back-entry.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadURL): Properly reset the policy FrameLoadType before
+ consulting the policy delegate for fragment scrolling.
+
+2009-09-22 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Drop down selects get stuck in the non-visible state and cannot be opened.
+ https://bugs.webkit.org/show_bug.cgi?id=29645
+
+ All paths that lead to hiding the popup menu must call popupDidHide on
+ the PopupMenuClient. This change makes it so by moving all of the
+ hiding logic to PopupListBox::hidePopup.
+
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupContainer::hidePopup):
+ (WebCore::PopupListBox::hidePopup):
+ * platform/chromium/PopupMenuChromium.h:
+
+2009-09-22 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector.log() function not protected if console not yet created
+ https://bugs.webkit.org/show_bug.cgi?id=29336
+
+ No new tests. Only affects Web Inspector developers adding logging
+ to their code during development.
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.log.isLogAvailable):
+ (WebInspector.log.flushQueue):
+ (WebInspector.log.flushQueueIfAvailable):
+ (WebInspector.log.logMessage):
+ (WebInspector.log):
+
+2009-09-22 Yaar Schnitman <yaar@chromium.org>
+
+ Reviewed by David Levin.
+
+ Ported chromium.org's webcore.gyp for the webkit chromium port.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29617
+
+ * WebCore.gyp/WebCore.gyp: Added.
+
+2009-09-22 Christian Plesner Hansen <christian.plesner.hansen@gmail.com>
+
+ Reviewed by Adam Barth.
+
+ [v8] Don't keep clean wrappers artificially alive
+ We currently keep all DOM node wrappers alive, even when there are
+ no more references to them from JS, in case they have properties
+ that we need to keep around if new JS references are created.
+ This changes the policy to only keep wrappers artificially alive
+ if they have changed since they were created. Empty wrappers are
+ discarded and recreated as needed.
+ https://bugs.webkit.org/show_bug.cgi?id=29330
+
+ * bindings/v8/V8GCController.cpp:
+ (WebCore::ObjectGrouperVisitor::visitDOMWrapper):
+
+2009-09-22 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: console.count and console.timeEnd
+ crash when inspector is opened.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29632
+
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addMessageToConsole):
+
+2009-09-22 Adam Barth <abarth@webkit.org>
+
+ Unreviewed.
+
+ Fix bogus build fix I did last night.
+
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8Custom::WindowSetTimeoutImpl):
+
+2009-09-22 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ NPAPI/Mac: Don't paint plugins if we don't have a CGContextRef
+
+ * plugins/mac/PluginViewMac.cpp:
+
+2009-09-22 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reivewed by Simon Hausmann.
+
+ Fix the Qt/Mac build after r48604 (Implement new QWebPageClient class)
+
+ There's no QWidget::x11Info() on Mac, and setPlatformPluginWidget()
+ takes a QWidget*, not a QWebPageClient*
+
+ * plugins/mac/PluginViewMac.cpp:
+ (WebCore::PluginView::platformStart):
+
+2009-09-21 Adam Barth <abarth@webkit.org>
+
+ Attempted fix for the V8 build.
+
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8Custom::WindowSetTimeoutImpl):
+
+2009-09-21 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ Don't re-enter JavaScript after performing access checks
+ https://bugs.webkit.org/show_bug.cgi?id=29531
+
+ Moved the access check slightly later in this functions to avoid
+ re-entering the JavaScript interpreter (typically via toString)
+ after performing the access check.
+
+ I can't really think of a meaningful test for this change. It's more
+ security hygiene.
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::setLocation):
+ (WebCore::JSDOMWindow::open):
+ (WebCore::JSDOMWindow::showModalDialog):
+ * bindings/js/JSLocationCustom.cpp:
+ (WebCore::JSLocation::setHref):
+ (WebCore::JSLocation::replace):
+ (WebCore::JSLocation::assign):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8Custom::WindowSetTimeoutImpl):
+ (WebCore::if):
+ (CALLBACK_FUNC_DECL):
+ (V8Custom::WindowSetLocation):
+ (V8Custom::ClearTimeoutImpl):
+ * bindings/v8/custom/V8LocationCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-09-21 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Make all write transaction start with a BEGIN IMMEDIATE command
+ instead of BEGIN.
+
+ We cannot test this change in a layout test, because in order to
+ test it we need to spawn two database threads and execute
+ transaction steps on these two threads in a very specific order,
+ which seems impossible to do when they share the same main thread
+ (as they would in a layout test). The SQLite docs and the case
+ described in the bug though should be enough proof that we do have
+ a problem here and that this patch will fix it.
+
+ Relevant SQLite documentation:
+ http://www.sqlite.org/lang_transaction.html
+ http://www.sqlite.org/lockingv3.html#locking
+
+ https://bugs.webkit.org/show_bug.cgi?id=29218
+
+ * platform/sql/SQLiteTransaction.cpp:
+ (WebCore::SQLiteTransaction::SQLiteTransaction): Added a readOnly
+ parameter.
+ (WebCore::SQLiteTransaction::begin): Changed to BEGIN IMMEDIATE
+ for write transactions.
+ * platform/sql/SQLiteTransaction.h:
+ * storage/SQLTransaction.cpp:
+ (WebCore::SQLTransaction::openTransactionAndPreflight): Passing
+ the read-only flag to the SQLiteTransaction instance.
+
+2009-09-21 Brady Eidson <beidson@apple.com>
+
+ Rubberstamped by Mark Rowe.
+
+ * DerivedSources.make: Fix the Xcode build on SnowLeopard.
+
+2009-09-15 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Prevent sleeps in unload handlers.
+ https://bugs.webkit.org/show_bug.cgi?id=29193
+
+ Test: fast/dom/Window/slow_unload_handler.html
+
+ * WebCore.gypi:
+ * bindings/v8/DateExtension.cpp: Added.
+ (WebCore::DateExtension::DateExtension):
+ (WebCore::DateExtension::get):
+ (WebCore::DateExtension::setAllowSleep):
+ (WebCore::DateExtension::GetNativeFunction):
+ (WebCore::DateExtension::weakCallback):
+ (WebCore::DateExtension::GiveEnableSleepDetectionFunction):
+ (WebCore::DateExtension::OnSleepDetected):
+ * bindings/v8/DateExtension.h: Added.
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::invokeEventHandler):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::createNewContext):
+ (WebCore::V8Proxy::registerExtensionWithV8):
+ (WebCore::V8Proxy::registeredExtensionWithV8):
+ * bindings/v8/V8Proxy.h:
+
+2009-09-21 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ [V8] Run-time exception in onmessage handler is not forwarded to the
+ worker object.
+ https://bugs.webkit.org/show_bug.cgi?id=28980
+
+ The previous fix was partially reverted due to a reliability build break
+ in chromium. The break happens when an exception is thrown without
+ setting a message. We need to check for this scenario and handle it.
+
+ Tested by worker-close.html.
+
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::invokeEventHandler):
+ * bindings/v8/V8Utilities.cpp:
+ (WebCore::reportException):
+
+2009-09-21 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Simon Fraser & Sam Weinig.
+
+ Add ENABLE(ORIENTATION_EVENTS)
+ https://bugs.webkit.org/show_bug.cgi?id=29508
+
+ See documentation here:
+ http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW16
+
+ * DerivedSources.make: Use new WebCore.OrientationEvents.exp file if ENABLE_ORIENTATION_EVENTS.
+ Add ENABLE_ORIENTATION_EVENTS to the new ADDITIONAL_IDL_DEFINES variable that is passed to the IDL
+ code generator. This is because ENABLE_ORIENTATION_EVENTS is not in FEATURE_DEFINES.
+ * WebCore.OrientationEvents.exp: Added.
+ * WebCore.xcodeproj/project.pbxproj: Add WebCore.OrientationEvents.exp.
+ * dom/EventNames.h: Add onorientationchange.
+ * html/HTMLAttributeNames.in: Ditto.
+ * html/HTMLBodyElement.cpp: Handle onorientationchange properly.
+ (WebCore::HTMLBodyElement::parseMappedAttribute):
+ (WebCore::HTMLBodyElement::onorientationchange):
+ (WebCore::HTMLBodyElement::setOnorientationchange):
+ * html/HTMLBodyElement.h: Ditto.
+ * html/HTMLBodyElement.idl: Ditto.
+ * html/HTMLFrameSetElement.cpp: Ditto.
+ (WebCore::HTMLFrameSetElement::parseMappedAttribute):
+ (WebCore::HTMLFrameSetElement::onorientationchange):
+ (WebCore::HTMLFrameSetElement::setOnorientationchange):
+ * html/HTMLFrameSetElement.h: Ditto.
+ * html/HTMLFrameSetElement.idl: Ditto.
+ * page/DOMWindow.cpp: Ditto.
+ (WebCore::DOMWindow::orientation): Calls up the to the Frame for the orientation value.
+ (WebCore::DOMWindow::onorientationchange):
+ (WebCore::DOMWindow::setOnorientationchange):
+ * page/DOMWindow.h: Handle onorientationchange properly.
+ * page/DOMWindow.idl: Ditto.
+ * page/Frame.cpp: Ditto.
+ (WebCore::Frame::Frame):
+ (WebCore::Frame::sendOrientationChangeEvent):
+ * page/Frame.h: Ditto.
+ (WebCore::Frame::orientation):
+
+2009-09-18 Anders Carlsson <andersca@apple.com>
+
+ Try fixing the build again.
+
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::wndProc):
+
+2009-09-21 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: completions are always evaluated against
+ window (discarding call frames).
+
+ https://bugs.webkit.org/show_bug.cgi?id=29616
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.completions):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.getCompletions):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.selectedCallFrameId):
+
+2009-09-21 Brent Fulgham <bfulgham@webkit.org>
+
+ Unreviewed build fix for Windows (Cairo) target.
+
+ Add stubs for SocketStream classes added in @r47788, which
+ broke the WinCairo build.
+
+ No new tests. (Build failure).
+
+ * WebCore.vcproj/WebCore.vcproj: Add references to new files
+ to Cairo build, exclude from standard Apple build.
+ * platform/network/curl/SocketStreamError.h: Added.
+ * platform/network/curl/SocketStreamHandle.h: Added.
+ * platform/network/curl/SocketStreamHandleCurl.cpp: Added.
+
+2009-09-21 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Expose InspectorResource fields.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29537
+
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::sourceString):
+ (WebCore::InspectorResource::resourceData):
+ * inspector/InspectorResource.h:
+ (WebCore::InspectorResource::requestHeaderFields):
+ (WebCore::InspectorResource::responseHeaderFields):
+ (WebCore::InspectorResource::responseStatusCode):
+ (WebCore::InspectorResource::requestMethod):
+ (WebCore::InspectorResource::requestFormData):
+
+2009-09-21 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: JS error drilling down childless node.
+ No need to dispatch double click twice - it is already handled
+ in TreeElement.treeElementDoubleClicked.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22144
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeOutline):
+
+2009-09-21 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Implement new QWebPageClient class and let our classes
+ QWebViewPrivate and QWebGraphicsItemPrivate inherit from it.
+
+ For Qt, platformPageClient() will now return a class derived from
+ the QWebPageClient, so the patch adapts our Qt hooks to go though
+ this class and not depend on the QWebView.
+
+ * WebCore.pro:
+ * platform/Widget.h:
+ * platform/qt/PlatformScreenQt.cpp:
+ (WebCore::screenDepth):
+ (WebCore::screenDepthPerComponent):
+ (WebCore::screenIsMonochrome):
+ (WebCore::screenRect):
+ (WebCore::screenAvailableRect):
+ * platform/qt/PopupMenuQt.cpp:
+ (WebCore::PopupMenu::show):
+ * platform/qt/QWebPageClient.h: Added.
+ * platform/qt/WidgetQt.cpp:
+ (WebCore::Widget::setCursor):
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::handleKeyboardEvent):
+ (WebCore::PluginView::getValue):
+ (WebCore::PluginView::platformStart):
+
+2009-09-21 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Evaluating on call frame always returns "undefined".
+
+ https://bugs.webkit.org/show_bug.cgi?id=29613
+
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.evaluate):
+ (InjectedScript._evaluateAndWrap):
+ (InjectedScript._evaluateOn):
+ (InjectedScript.evaluateInCallFrame):
+
+2009-09-21 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Exception formatting is broken in console.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29608
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleCommandResult):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.evaluate):
+ (InjectedScript.createProxyObject):
+
+2009-09-21 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Console object formatting is broken.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29607
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleMessage.prototype._format):
+ * inspector/front-end/ObjectProxy.js:
+ (WebInspector.ObjectProxy.wrapPrimitiveValue):
+
+2009-09-21 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Crash When Logging an Element Before Opening Inspector
+
+ https://bugs.webkit.org/show_bug.cgi?id=29514
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::populateScriptObjects):
+
+2009-09-21 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Incorrect clipping with accelerated compositing content, and position:fixed
+ https://bugs.webkit.org/show_bug.cgi?id=29347
+
+ Fix the compositing clipping logic to behave correctly when position:fixed
+ elements clip, by using the new backgroundClipRect() method to determine
+ when we need to clip, and to compute the clipping layer position.
+
+ Test: compositing/overflow/fixed-position-ancestor-clip.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::clippedByAncestor):
+
+2009-09-21 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add back in a special case for window.top in the V8 bindings.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29605
+
+ Fixes LayoutTests/fast/dom/Window/window-property-shadowing.html in the Chromium port.
+
+ * bindings/scripts/CodeGeneratorV8.pm: Ensure window.top is not marked as read only, as this breaks the shadowing disabling.
+
+2009-09-21 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ HTMLMediaElement: media file should not reload when page comes out of page cache
+ https://bugs.webkit.org/show_bug.cgi?id=29604
+
+ Test: media/restore-from-page-cache.html
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::userCancelledLoad): Do nothing unless the element
+ is still loading. Only fire an 'emptied' event if the readyState is HAVE_NOTHING,
+ otherwise set the network state to NETWORK_IDLE.
+
+2009-09-21 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Geoffrey "Sean/Shawn/Shaun" Garen.
+
+ Clarify two FIXMEs.
+
+ * bindings/js/JSHTMLCollectionCustom.cpp:
+ (WebCore::getNamedItems):
+ * bindings/js/JSHTMLFormElementCustom.cpp:
+ (WebCore::JSHTMLFormElement::nameGetter):
+
+2009-09-21 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Drop down selects fail to close when a value is selected
+ https://bugs.webkit.org/show_bug.cgi?id=29582
+
+ Implement PopupListBox::hidePopup, which was previously
+ declared but unimplemented. Removes the declaration of
+ showPopup since that method is not implemented.
+
+ PopupListBox::hidePopup takes care of hiding the popup,
+ by invoking hidePopup on its parent PopupContainer, and
+ then informs the PopupMenuClient that popupDidHide.
+ This mimics the old behavior prior to r48370.
+
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::handleKeyEvent):
+ (WebCore::PopupListBox::abandon):
+ (WebCore::PopupListBox::acceptIndex):
+ (WebCore::PopupListBox::hidePopup):
+
+2009-09-21 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
+
+ Rubber-stamped by Simon Hausmann.
+
+ [Qt] Windows build fix.
+ https://bugs.webkit.org/show_bug.cgi?id=29535
+
+ * platform/network/qt/DnsPrefetchHelper.cpp: Missing #include "config.h" added.
+
+2009-09-21 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed make dist build fix. Missing files.
+
+ * GNUmakefile.am:
+
+2009-09-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Crash when clicking link in unload handler
+ https://bugs.webkit.org/show_bug.cgi?id=29525
+
+ Test that the first navigation always wins when the page tries to start
+ a new navigation in an unload handler.
+
+ Tests: fast/loader/unload-form-about-blank.html
+ fast/loader/unload-form-post-about-blank.html
+ fast/loader/unload-form-post.html
+ fast/loader/unload-form.html
+ fast/loader/unload-hyperlink.html
+ fast/loader/unload-javascript-url.html
+ fast/loader/unload-reload.html
+ fast/loader/unload-window-location.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadURL):
+ (WebCore::FrameLoader::loadWithDocumentLoader):
+
+2009-09-18 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Sometimes crashes when a page is destroyed/loads another URL while playing video
+ https://bugs.webkit.org/show_bug.cgi?id=29496
+
+ Protect the video sink object, and destroy it in an idle callback
+ to hopefully avoid a race condition that leads to a crash.
+
+ This is already tested by media/video-seekable.html
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::idleUnref):
+ (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::createGSTPlayBin):
+
+2009-09-19 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed build fix for GTKand a blind one for Qt after r48566.
+
+ * GNUmakefile.am:
+ * WebCore.pro:
+
+2009-09-19 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=29519
+ Remove JSNameNodeCollection and just use StaticNodeList
+
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * bindings/js/JSHTMLCollectionCustom.cpp:
+ (WebCore::getNamedItems):
+ * bindings/js/JSHTMLFormElementCustom.cpp:
+ (WebCore::JSHTMLFormElement::nameGetter):
+ * bindings/js/JSNamedNodesCollection.cpp: Removed.
+ * bindings/js/JSNamedNodesCollection.h: Removed.
+
+2009-09-19 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29511
+
+ Fixes an issue where script code that contains non-ASCII characters may bypass the
+ XSSAuditor.
+
+ Before performing a comparison between the script source code and input parameters, we
+ remove all non-ASCII characters, including non-printable ASCII characters from the
+ script source code and input parameters.
+
+ Tests: http/tests/security/xssAuditor/img-onerror-non-ASCII-char.html
+ http/tests/security/xssAuditor/img-onerror-non-ASCII-char-default-encoding.html
+ http/tests/security/xssAuditor/img-onerror-non-ASCII-char2-default-encoding.html
+ http/tests/security/xssAuditor/img-onerror-non-ASCII-char2.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::isNonCanonicalCharacter): Modified to remove all non-ASCII characters,
+ including non-printable ASCII characters.
+
+2009-09-19 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Incorrect animation with scale(0) transform (singular matrix)
+ https://bugs.webkit.org/show_bug.cgi?id=29465
+
+ Make accelerated scale() and translate() animations go through the component animation
+ path (rather than just matrix animation) to avoid problems with singular scale matrices,
+ and be slightly more efficient.
+
+ Test: compositing/transitions/singular-scale-transition.html
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::getTransformFunctionValue):
+ (WebCore::getValueFunctionNameForTransformOperation):
+
+2009-09-19 Alex Milowski <alex@milowski.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Adds CSS styling and basic DOM element support for MathML
+
+ * DerivedSources.make:
+ Added user stylesheet and tag factory generation
+
+ * WebCore.xcodeproj/project.pbxproj:
+ Added new DOM element code
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseAttr):
+ Added check for document since stylesheet can be added before there is a document
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::styleForElement):
+ Added check to add MathML user agent stylesheet
+
+ * css/mathml.css: Added.
+ MathML user agent stylesheet
+
+ * dom/Document.cpp:
+ (WebCore::Document::createElement):
+ Added support for creation of MathML DOM objects
+
+ * dom/Node.h:
+ (WebCore::Node::isMathMLElement):
+ Added check method for whether the node is a MathML node
+
+ * mathml: Added.
+ * mathml/MathMLElement.cpp: Added.
+ (WebCore::MathMLElement::MathMLElement):
+ (WebCore::MathMLElement::create):
+ (WebCore::MathMLElement::createRenderer):
+ * mathml/MathMLElement.h: Added.
+ (WebCore::MathMLElement::isMathMLElement):
+ MathML DOM base class
+
+
+ * mathml/MathMLInlineContainerElement.cpp: Added.
+ (WebCore::MathMLInlineContainerElement::MathMLInlineContainerElement):
+ (WebCore::MathMLInlineContainerElement::create):
+ (WebCore::MathMLInlineContainerElement::createRenderer):
+ * mathml/MathMLInlineContainerElement.h: Added.
+ Base class for non-text containers
+
+ * mathml/MathMLMathElement.cpp: Added.
+ (WebCore::MathMLMathElement::MathMLMathElement):
+ (WebCore::MathMLMathElement::create):
+ * mathml/MathMLMathElement.h: Added.
+ Root Math element
+
+ * mathml/mathtags.in: Added.
+ Element list mappings
+
+ * page/Frame.cpp:
+ (WebCore::Frame::Frame):
+ Added MathML name initialization
+2009-09-19 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ Canvas drawn with data URL image raises SECURITY_ERR when toDataUrl() called.
+ https://bugs.webkit.org/show_bug.cgi?id=29305
+
+ We need to special-case data URLs when tainting a canvas because we
+ treat data URLs has having no security origin, unlike other
+ browsers. The reason we do this is to help sites avoid XSS via data
+ URLs, but that consideration doesn't apply to canvas taint.
+
+ Also, we were previously incorrectly taking document.domain state
+ into account when tainting canvas.
+
+ Tests: http/tests/security/canvas-remote-read-data-url-image.html
+ http/tests/security/canvas-remote-read-data-url-svg-image.html
+ http/tests/security/canvas-remote-read-remote-image-document-domain.html
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::checkOrigin):
+ (WebCore::CanvasRenderingContext2D::createPattern):
+ * page/SecurityOrigin.cpp:
+ (WebCore::SecurityOrigin::taintsCanvas):
+ * page/SecurityOrigin.h:
+
+2009-09-18 Simon Fraser <simon.fraser@apple.com>
+
+ Fix stylistic issue raised in code review for previous commit.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::hasNonZeroTransformOrigin):
+
+2009-09-18 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Element is misplaced during opacity transition with certain configuration of transform-origin and clipping
+ https://bugs.webkit.org/show_bug.cgi?id=29495
+
+ If an element has zero size, but has a transform origin with absolute values,
+ then the transform origin would not be applied because it is implemented via
+ anchorPoint, which is expressed as a fraction of the layer size.
+
+ Work around this by artificially inflating the size of the backing store when we need to.
+
+ Test: compositing/geometry/transfrom-origin-on-zero-size-layer.html
+
+ * rendering/RenderLayerBacking.h:
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::RenderLayerBacking):
+ Init m_artificiallyInflatedBounds to false.
+
+ (WebCore::hasNonZeroTransformOrigin):
+ Utility function that describes whether the transform-origin contains non-percentage
+ x or y offsets.
+
+ (WebCore::RenderLayerBacking::updateCompositedBounds):
+ New wrapper method around setCompositedBounds() that applies the size inflation
+ when necessary, setting the m_artificiallyInflatedBounds as appropriate.
+
+ (WebCore::RenderLayerBacking::updateAfterLayout): Call updateCompositedBounds().
+ (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Ditto
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Ditto
+ (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry): Ditto
+
+2009-09-18 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29512
+ Don't recalculate style when restoring from the page cache
+
+ FrameLoaderClient::forceLayout() also forces style recalc. Instead call FrameView::forceLayout()
+ directly to update the scrollbars while keeping the existing style.
+
+ Makes back/forward really fast on complex pages (in cases where page cache works).
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::commitProvisionalLoad):
+
+2009-09-18 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Implement ES5 Object.defineProperty function
+ https://bugs.webkit.org/show_bug.cgi?id=29503
+
+ Override defineOwnProperty on JSDOMWindowShell to forward appropriately,
+ and then override defineOwnProperty on JSDOMWindow to disallow cross origin
+ defineOwnProperty usage. We also override defineOwnProperty on QuarantinedObjectWrapper
+ to ensure correct wrapping semantics of quarantined objects.
+
+ One major caveat in this patch is that it currently disallows the use
+ of Object.defineProperty on DOMObjects other than the window due to
+ the significant work involved in correctly propagating attributes and
+ ensuring correct semantics on dom objects.
+
+ Tests: fast/js/Object-defineProperty.html
+ http/tests/security/xss-DENIED-defineProperty.html
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::DOMObject::defineOwnProperty):
+ * bindings/js/JSDOMBinding.h:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::defineGetter):
+ (WebCore::JSDOMWindow::defineSetter):
+ (WebCore::JSDOMWindow::defineOwnProperty):
+ * bindings/js/JSDOMWindowShell.cpp:
+ (WebCore::JSDOMWindowShell::defineOwnProperty):
+ (WebCore::JSDOMWindowShell::defineGetter):
+ (WebCore::JSDOMWindowShell::defineSetter):
+ * bindings/js/JSDOMWindowShell.h:
+ * bindings/js/JSLocationCustom.cpp:
+ (WebCore::JSLocation::defineGetter):
+ (WebCore::JSLocationPrototype::defineGetter):
+ * bindings/js/JSQuarantinedObjectWrapper.cpp:
+ (WebCore::JSQuarantinedObjectWrapper::getOwnPropertyDescriptor):
+ (WebCore::JSQuarantinedObjectWrapper::defineOwnProperty):
+ * bindings/js/JSQuarantinedObjectWrapper.h:
+ * bindings/scripts/CodeGeneratorJS.pm:
+
+2009-09-18 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29510
+ Active DOM objects should be suspended while a modal dialog is displayed
+
+ * manual-tests/js-timers-beneath-modal-dialog.html: Added a test for JS timers.
+
+ * page/PageGroupLoadDeferrer.cpp:
+ (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
+ (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
+ Match other platforms, and make Mac also suspend active DOM objects. Since a page that
+ currently displays a modal dialog cannot go into page cache, there is no danger of suspending
+ an object twice.
+
+2009-09-18 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Buildfix caused by http://trac.webkit.org/changeset/48513
+ https://bugs.webkit.org/show_bug.cgi?id=29351
+
+ * bridge/qt/qt_instance.h: createRuntimeObject method renamed to newRuntimeObject.
+ * bridge/runtime.h: Visibility of newRuntimeObject method modified to protected.
+
+2009-09-18 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Fix parameter substitutions in console.log().
+
+ https://bugs.webkit.org/show_bug.cgi?id=29366
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleMessage.prototype._format):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.getPrototypes):
+ (InjectedScript.CallFrameProxy.prototype._wrapScopeChain):
+ * inspector/front-end/utilities.js:
+ ():
+
+2009-09-18 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Geoffrey Garen and Brady Eidson.
+
+ Temporarily remove an assertion that was getting hit when going
+ back to a page in the page cache while a banner in Safari was visible.
+ We should re-enable this once that is fixed. See <rdar://problem/7218118>
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::scheduleRelayout):
+
+2009-09-18 Anders Carlsson <andersca@apple.com>
+
+ Try fixing the build again.
+
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::wndProc):
+
+2009-09-18 Anders Carlsson <andersca@apple.com>
+
+ Fix windows build.
+
+ * platform/win/PopupMenuWin.cpp:
+
+2009-09-18 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Gavin 'BearClaw' Barraclough.
+
+ Convert another callback type object to store the global object
+ instead of the frame.
+
+ * bindings/js/JSCustomXPathNSResolver.cpp:
+ (WebCore::JSCustomXPathNSResolver::create):
+ (WebCore::JSCustomXPathNSResolver::JSCustomXPathNSResolver):
+ (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
+ * bindings/js/JSCustomXPathNSResolver.h:
+
+2009-09-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29332
+ <rdar://problem/7231652>
+ REGRESSION (r48446): While a <select> popup menu is open, the
+ rest of the WebView doesn't respond to mouse move events.
+
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::translatePoint):
+ New helper function that translates a point between HWND coordinates.
+
+ (WebCore::PopupMenu::show):
+ Protect the PopupMenu if someone removes the <select> in response to a mouse
+ event. Handle WM_HOST_WINDOW_MOUSEMOVE events.
+
+ (WebCore::PopupMenu::wndProc):
+ in the WM_MOUSEMOVE handler, if the mouse is not over the popup, post a
+ WM_HOST_WINDOW_MOUSEMOVE event so that the host window (the WebView) gets the
+ mouse move event.
+
+2009-09-18 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Compositing layers are incorrectly positioned after scrolling with position:fixed
+ https://bugs.webkit.org/show_bug.cgi?id=29262
+
+ When scrolling a page with compositing layers inside a position:fixed element,
+ we need to update the compositing layer positions when the scroll position changes.
+
+ Test: compositing/geometry/fixed-position.html
+
+ * WebCore.base.exp:
+ Export FrameView::scrollPositionChanged()
+
+ * page/FrameView.h:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::scrollPositionChanged):
+ New method that sends the scroll event, and updates compositing layers positions if necessary.
+
+2009-09-18 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Transformed elements inside position:fixed container are clipped incorrectly
+ https://bugs.webkit.org/show_bug.cgi?id=29346
+
+ Fix clipping and hit testing on transformed elements inside a position:fixed element.
+ Previously, the code used the overflowClipRect of the parent clip rects, but
+ this is not correct for fixed postion elements. Instead, share code that is
+ already present in calculateRects() to get the correct rect.
+
+ Test: fast/overflow/position-fixed-transform-clipping.html
+
+ * rendering/RenderLayer.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::paintLayer):
+ (WebCore::RenderLayer::hitTestLayer):
+ Call the new backgroundClipRect() to get the correct clipRect.
+
+ (WebCore::RenderLayer::backgroundClipRect):
+ New method, factored out of calculateRects(), that computes the clip rect,
+ doing the right thing for fixed position elements.
+
+ (WebCore::RenderLayer::calculateRects):
+ Call the new backgroundClipRect() method.
+
+2009-09-18 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix <rdar://problem/7050773> REGRESSION (r40098) Crash at
+ WebCore::RenderBlock::layoutBlock()
+ https://bugs.webkit.org/show_bug.cgi?id=29498
+
+ Test: accessibility/nested-layout-crash.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::updateBackingStore): Changed to
+ call Document::updateLayoutIgnorePendingStylesheets() instead of
+ calling RenderObject::layoutIfNeeded(). The latter requires that
+ there be no pending style recalc, which allows methods that call
+ Document::updateLayout() to be called during layout without risking
+ re-entry into layout.
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper accessibilityActionNames]): Null-check
+ m_object after calling updateBackingStore(), since style recalc may
+ destroy the renderer, which destroys the accessibility object and
+ detaches it from the wrapper.
+ (-[AccessibilityObjectWrapper accessibilityAttributeNames]): Ditto.
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): Ditto.
+ (-[AccessibilityObjectWrapper accessibilityFocusedUIElement]): Ditto.
+ (-[AccessibilityObjectWrapper accessibilityHitTest:]): Ditto.
+ (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
+ Ditto.
+ (-[AccessibilityObjectWrapper accessibilityIsIgnored]): Ditto.
+ (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
+ Ditto.
+ (-[AccessibilityObjectWrapper accessibilityPerformPressAction]): Ditto.
+ (-[AccessibilityObjectWrapper accessibilityPerformIncrementAction]):
+ Ditto.
+ (-[AccessibilityObjectWrapper accessibilityPerformDecrementAction]):
+ Ditto.
+ (-[AccessibilityObjectWrapper accessibilityPerformAction:]): Ditto.
+ (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
+ Ditto.
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
+ Ditto.
+ (-[AccessibilityObjectWrapper accessibilityIndexOfChild:]): Ditto.
+ (-[AccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
+ Ditto.
+ (-[AccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
+ Ditto.
+
+2009-09-18 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Simon Hausmann.
+
+ Update Qt build system for Web Socket.
+ https://bugs.webkit.org/show_bug.cgi?id=29270
+
+ * WebCore.pro:
+ * platform/network/qt/SocketStreamError.h: Added.
+ * platform/network/qt/SocketStreamHandle.h: Added.
+ * platform/network/qt/SocketStreamHandleSoup.cpp: Added.
+
+2009-09-18 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ NULL check HTMLMediaElement::m_playedTimeRanges.
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=29494
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::addPlayedRange): New. Create m_playedTimeRanges if
+ necessary, add range specified.
+ (WebCore::HTMLMediaElement::seek): Use addPlayedRange.
+ (WebCore::HTMLMediaElement::played): Use addPlayedRange. Change time comparison
+ to be more readable.
+ (WebCore::HTMLMediaElement::updatePlayState): Ditto.
+ * html/HTMLMediaElement.h:
+
+2009-09-18 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adele Peterson.
+
+ Follow up fix for https://bugs.webkit.org/show_bug.cgi?id=29276
+ REGRESSION(r48334): WebKit crashes on file select by drag
+
+ Don't use Document.elementFromPoint since it returns null if the point
+ is outside the viewport. Instead, just hit test ourselves.
+
+ Test: fast/events/drag-file-crash.html
+
+ * page/DragController.cpp:
+ (WebCore::elementUnderMouse):
+ (WebCore::DragController::tryDocumentDrag):
+ (WebCore::DragController::concludeEditDrag):
+
+2009-09-18 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Each wrapped Objective-C object should use a single RuntimeObjectImp
+ https://bugs.webkit.org/show_bug.cgi?id=29351
+ rdar://problem/7142294
+
+ * WebCore.base.exp: Added a newly-needed exported symbol.
+
+ * bindings/objc/DOMInternal.h: Eliminated unused
+ createWrapperCacheWithIntegerKeys; it has not been needed since the
+ RGBColor wrappers were reworked.
+ * bindings/objc/DOMInternal.mm: Ditto.
+
+ * bridge/objc/objc_instance.h: Made the create function non-inline.
+ * bridge/objc/objc_instance.mm:
+ (createInstanceWrapperCache): Added. Creates an appropriate map table.
+ (ObjcInstance::create): Moved here from header. Uses NSMapGet and
+ NSMapInsert to cache the instance in a map table.
+ (ObjcInstance::~ObjcInstance): Added a call to NSMapRemove to remove
+ the instance from the map table.
+
+ * bridge/qt/qt_instance.cpp:
+ (JSC::Bindings::QtInstance::~QtInstance): Remove unneeded code to remove
+ the instance from cachedObjects, which no longer exists.
+ (JSC::Bindings::QtInstance::newRuntimeObject): Renamed to overload new
+ bottleneck. Caching is now handled by the base class.
+
+ * bridge/runtime.cpp:
+ (JSC::Bindings::Instance::Instance): Initialize m_runtimeObject to 0.
+ (JSC::Bindings::Instance::~Instance): Assert m_runtimeObject is 0.
+ (JSC::Bindings::Instance::createRuntimeObject): Use m_runtimeObject
+ if it's already set. Set m_runtimeObject and call addRuntimeObject
+ if it's not.
+ (JSC::Bindings::Instance::newRuntimeObject): Added. Virtual function,
+ used only by createRuntimeObject.
+ (JSC::Bindings::Instance::willDestroyRuntimeObject): Added.
+ Calls removeRuntimeObject and then clears m_runtimeObject.
+ (JSC::Bindings::Instance::willInvalidateRuntimeObject): Added.
+ Clears m_runtimeObject.
+
+ * bridge/runtime.h: Made createRuntimeObject non-virtual. Added
+ willDestroyRuntimeObject, willInvalidateRuntimeObject,
+ newRuntimeObject, and m_runtimeObject.
+
+ * bridge/runtime_object.cpp:
+ (JSC::RuntimeObjectImp::RuntimeObjectImp): Removed addRuntimeObject
+ call, now handled by caller.
+ (JSC::RuntimeObjectImp::~RuntimeObjectImp): Replaced removeRuntimeObject
+ call with willDestroyRuntimeObject call; the latter nows calls
+ removeRuntimeObject.
+ (JSC::RuntimeObjectImp::invalidate): Added willInvalidateRuntimeObject
+ call.
+
+ * bridge/runtime_object.h: Made invalidate non-virtual.
+
+2009-09-18 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Make PlatformWindow return something else than PlatformWidget
+ https://bugs.webkit.org/show_bug.cgi?id=29085
+
+ Make platformWindow return a PlatformPageClient
+ (for now typedef'ed to PlatformWidget)
+
+ Also, change the name of platformWindow to platformPageClient()
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (getPangoLayoutForAtk):
+ * accessibility/win/AXObjectCacheWin.cpp:
+ (WebCore::AXObjectCache::postPlatformNotification):
+ (WebCore::AXObjectCache::handleFocusedUIElementChanged):
+ * loader/EmptyClients.h:
+ (WebCore::EmptyChromeClient::platformPageClient):
+ * page/Chrome.cpp:
+ (WebCore::Chrome::platformPageClient):
+ * page/Chrome.h:
+ * page/ChromeClient.h:
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::wheelEvent):
+ (WebCore::EventHandler::currentPlatformMouseEvent):
+ (WebCore::EventHandler::sendContextMenuEvent):
+ (WebCore::EventHandler::eventMayStartDrag):
+ * platform/HostWindow.h:
+ * platform/Widget.h:
+ * platform/gtk/PlatformScreenGtk.cpp:
+ (WebCore::getVisual):
+ (WebCore::screenRect):
+ (WebCore::screenAvailableRect):
+ * platform/gtk/PopupMenuGtk.cpp:
+ (WebCore::PopupMenu::show):
+ * platform/gtk/ScrollViewGtk.cpp:
+ (WebCore::ScrollView::platformAddChild):
+ (WebCore::ScrollView::platformRemoveChild):
+ (WebCore::ScrollView::visibleContentRect):
+ * platform/gtk/WidgetGtk.cpp:
+ (WebCore::Widget::setFocus):
+ (WebCore::Widget::setCursor):
+ * platform/qt/PlatformScreenQt.cpp:
+ (WebCore::screenDepth):
+ (WebCore::screenDepthPerComponent):
+ (WebCore::screenIsMonochrome):
+ (WebCore::screenRect):
+ (WebCore::screenAvailableRect):
+ * platform/qt/PopupMenuQt.cpp:
+ (WebCore::PopupMenu::show):
+ * platform/qt/WidgetQt.cpp:
+ (WebCore::Widget::setCursor):
+ * platform/win/PlatformScreenWin.cpp:
+ (WebCore::monitorInfoForWidget):
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::show):
+ (WebCore::PopupMenu::calculatePositionAndSize):
+ (WebCore::PopupMenu::wndProc):
+ * platform/wx/RenderThemeWx.cpp:
+ (WebCore::nativeWindowForRenderObject):
+ * platform/wx/ScrollbarThemeWx.cpp:
+ (WebCore::ScrollbarThemeWx::paint):
+ * plugins/gtk/PluginViewGtk.cpp:
+ (WebCore::PluginView::getValue):
+ (WebCore::PluginView::forceRedraw):
+ (WebCore::PluginView::platformStart):
+ * plugins/mac/PluginViewMac.cpp:
+ (WebCore::PluginView::platformStart):
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::handleKeyboardEvent):
+ (WebCore::PluginView::getValue):
+ (WebCore::PluginView::platformStart):
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::getValue):
+ (WebCore::PluginView::forceRedraw):
+ (WebCore::PluginView::platformStart):
+
+2009-09-18 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Web inspector UI adjustments specific to the Qt platform:
+ - Hide the close button
+ - Hide the dock button
+ - Disable the draggable toolbar
+
+ https://bugs.webkit.org/show_bug.cgi?id=29384
+
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.js:
+ (WebInspector.toolbarDragStart):
+
+2009-09-18 Joerg Bornemann <joerg.bornemann@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ QtWebKit Windows CE compile fixes
+
+ Exclude certain pure-WINCE specific code paths from the Qt build.
+
+ * platform/graphics/BitmapImage.h:
+ * platform/graphics/FontCache.h:
+ * platform/graphics/MediaPlayer.cpp:
+ * platform/text/TextEncodingRegistry.cpp:
+ (WebCore::buildBaseTextCodecMaps):
+ (WebCore::extendTextCodecMaps):
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::stop): Guard this code block with NETSCAPE_PLUGIN_API as
+ the corresponding PluginViewWndProc has the same guard in the header file.
+
+2009-09-18 Steve Block <steveblock@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Geolocation does not correctly handle Infinity for PositionOptions properties.
+ https://bugs.webkit.org/show_bug.cgi?id=29099
+
+ * bindings/js/JSGeolocationCustom.cpp: Modified.
+ (WebCore::createPositionOptions): Modified. If timeout or maximumAge is positive infinity, applies these values as a special case.
+ * page/PositionOptions.h: Modified.
+ (WebCore::PositionOptions::hasMaximumAge): Added. Determines whether the object has a maximum age.
+ (WebCore::PositionOptions::maximumAge): Modified. Asserts that the object has a maximum age.
+ (WebCore::PositionOptions::clearMaximumAge): Added. Clears the maximum age.
+ (WebCore::PositionOptions::setMaximumAge): Modified. Registers that the maximum age has been set.
+ (WebCore::PositionOptions::PositionOptions): Modified. Registers that the maximum age has been set.
+
+2009-09-17 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adele Peterson.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=29276
+ REGRESSION(r48334): WebKit crashes on file select by drag
+
+ Document.elementFromPoint now takes point in client space, not page space.
+
+ * page/DragController.cpp:
+ (WebCore::DragController::tryDocumentDrag):
+ (WebCore::DragController::concludeEditDrag):
+
+2009-09-17 Albert J. Wong <ajwong@chromium.org>
+
+ Reviewed by David Levin.
+
+ Reimplement default media UI for Mac Chromium to match the style
+ of the Windows and Linux versions. Also breaks the dependency
+ on the internal wk* functions that were previously used to
+ render the media controller widgets.
+ https://bugs.webkit.org/show_bug.cgi?id=29161
+
+ No media layout tests are currently enabled in Mac Chromium, so
+ nothing needs rebaselineing, etc.
+
+ This is a recommit of r48438 with a compile fix and merges of
+ recent changes to the file.
+
+ * css/mediaControlsChromium.css:
+ * rendering/RenderThemeChromiumMac.h:
+ * rendering/RenderThemeChromiumMac.mm:
+ (WebCore::mediaElementParent):
+ (WebCore::RenderThemeChromiumMac::extraMediaControlsStyleSheet):
+ (WebCore::mediaSliderThumbImage):
+ (WebCore::mediaVolumeSliderThumbImage):
+ (WebCore::RenderThemeChromiumMac::paintSliderTrack):
+ (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize):
+ (WebCore::RenderThemeChromiumMac::paintMediaButtonInternal):
+ (WebCore::RenderThemeChromiumMac::paintMediaPlayButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaMuteButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
+ (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderTrack):
+ (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb):
+ (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderThumb):
+ (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground):
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize):
+
+2009-09-17 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ The Console scope bar should have a divider between All and the other possible
+ values (Errors, Warnings, Logs). It will look something like:
+
+ All | Errors Warnings Logs.
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.createDividerElement):
+ (WebInspector.ConsoleView):
+ * inspector/front-end/inspector.css:
+
+2009-09-17 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Remove additional references to JSVoidCallback which no longer exists.
+
+ * DerivedSources.cpp:
+ * WebCore.vcproj/WebCore.vcproj:
+
+2009-09-17 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Brady Eidson.
+
+ Remove commented out onhashchange attribute now that it is implemented.
+
+ * page/DOMWindow.idl:
+
+2009-09-17 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/7007541>
+ CrashTracer: 4800crashes in Safari at com.apple.WebKit • WTF::HashTableIterator...
+
+ Make RuntimeObjectImp more robust against m_instance being a null (which can happen if an OOP plug-in
+ crashes while we're calling into it).
+
+ * bridge/runtime_object.cpp:
+ (JSC::RuntimeObjectImp::RuntimeObjectImp):
+ (JSC::RuntimeObjectImp::~RuntimeObjectImp):
+ (JSC::RuntimeObjectImp::invalidate):
+ (JSC::RuntimeObjectImp::fallbackObjectGetter):
+ (JSC::RuntimeObjectImp::fieldGetter):
+ (JSC::RuntimeObjectImp::methodGetter):
+ (JSC::RuntimeObjectImp::getOwnPropertySlot):
+ (JSC::RuntimeObjectImp::getOwnPropertyDescriptor):
+ (JSC::RuntimeObjectImp::put):
+ (JSC::RuntimeObjectImp::defaultValue):
+ (JSC::RuntimeObjectImp::getCallData):
+ (JSC::RuntimeObjectImp::getConstructData):
+ (JSC::RuntimeObjectImp::getPropertyNames):
+ * bridge/runtime_object.h:
+ (JSC::RuntimeObjectImp::getInternalInstance):
+
+2009-09-17 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Wrap primitive values (as objects) in InspectorController::wrap.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28983
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::wrapObject): objects of any type will be wrapped into proxies,
+ only object proxies will have objectId.
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.completions): there is InjectedScript.getCompletionsi
+ that accepts an expression and returns possible completions. This way we don't need to wrap
+ and unwrap the completions result into a proxy object.
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.getCompletions):
+ (InjectedScript.evaluate):
+ (InjectedScript._evaluateOn):
+ (InjectedScript.createProxyObject):
+ * inspector/front-end/InjectedScriptAccess.js:
+
+2009-09-17 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Wrap PageTransitionEvents properly for V8's use.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29340
+
+ Fixes Chromium's failures for LayoutTests/fast/events/pageshow-pagehide.html.
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertEventToV8Object): Wrap PageTransitionEvents properly.
+
+2009-09-17 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Hardware-accelerated opacity transition on inline asserts
+ https://bugs.webkit.org/show_bug.cgi?id=29342
+
+ Remove an erroneous toRenderBox() that could be called on a RenderInline; we can just
+ pass an empty size, because the box size is only required for transform animations.
+
+ Test: compositing/transitions/opacity-on-inline.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::startTransition):
+
+2009-09-17 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [V8] OwnHandle might get a weak callback after destruction
+ https://bugs.webkit.org/show_bug.cgi?id=29172
+
+ Be sure to clear out weak reference so we don't get a weak callback
+ after we've destructed ourselves. Also, removed some tricky methods
+ that had no clients.
+
+ * bindings/v8/OwnHandle.h:
+ (WebCore::OwnHandle::clear):
+
+2009-09-17 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [V8] Partial roll out of http://trac.webkit.org/changeset/48455 to
+ fix crashes that started happening in V8Proxy::getEnteredContext().
+
+ * bindings/v8/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::execute):
+
+2009-09-17 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ AX: labels of checkboxes should, when hit-tested, return the checkbox
+ https://bugs.webkit.org/show_bug.cgi?id=29335
+
+ When an accessibility hit test is done and it hits the label of a control element,
+ the control element should be returned instead of nothing, since the label
+ itself is usually ignored.
+
+ Test: accessibility/label-for-control-hittest.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::correspondingControlForLabelElement):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
+ (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
+ (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement):
+ * accessibility/AccessibilityRenderObject.h:
+
+2009-09-17 Avi Drissman <avi@chromium.org>
+
+ Reviewed by Dimitri Glazkov, build fix.
+
+ Change to make RenderThemeChromiumMac compile inside of non PLATFORM(MAC).
+ https://bugs.webkit.org/show_bug.cgi?id=29243
+
+ Covered by existing tests.
+
+ * rendering/RenderThemeChromiumMac.mm:
+ (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
+
+2009-09-17 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [V8] Accessing properties/methods of an object, created with document.implementation.createDocumentType
+ creates nodes that have no document (ScriptExecutionContext), which in turn produces NULL-ref crashes.
+ https://bugs.webkit.org/show_bug.cgi?id=26402
+
+ Test: fast/dom/DOMImplementation/detached-doctype.html
+ fast/dom/doctype-event-listener-crash.html
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getEventListener): Added an extra NULL-check.
+
+2009-09-17 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ FontDescription.h includes RenderStyleConstants.h, which violates layering
+ https://bugs.webkit.org/show_bug.cgi?id=29327
+
+ * GNUmakefile.am: Added FontSmoothingMode.h.
+ * WebCore.gypi: Added FontSmoothingMode.h.
+ * WebCore.vcproj/WebCore.vcproj: Added FontSmoothingMode.h.
+ * WebCore.xcodeproj/project.pbxproj: Added FontSmoothingMode.h and made
+ it a private header.
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Get the
+ font smoothing mode via the font description.
+ * css/CSSPrimitiveValueMappings.h: Include FontSmoothingMode.h
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Updated for the rename
+ of FontSmoothing to FontSmoothingMode.
+ (WebCore::CSSPrimitiveValue::operator FontSmoothingMode): Ditto.
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty): Get the font smoothing mode
+ via the font description.
+ * platform/graphics/FontDescription.h: Do not include
+ RenderStyleConstants.h.
+ (WebCore::FontDescription::fontSmoothing): Updated for the rename of
+ FontSmoothing to FontSmoothingMode.
+ (WebCore::FontDescription::setFontSmoothing): Ditto.
+ * platform/graphics/FontSmoothingMode.h: Added.
+ (WebCore::FontSmoothingMode): Moved the FontSmoothing enum from
+ RenderStyleConstants here and renamed it to this.
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::fontSmoothing): Removed this getter, since
+ this can be accessed via the font description.
+ * rendering/style/RenderStyleConstants.h: Moved the FontSmoothing enum
+ from here to FontSmoothingMode.h.
+
+2009-09-17 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx 2.9 build fix.
+
+ * platform/wx/wxcode/gtk/scrollbar_render.cpp:
+ (wxGetGdkWindowForDC):
+
+2009-09-16 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Elements appear behind <video> when they should be in front sometimes
+ https://bugs.webkit.org/show_bug.cgi?id=29314
+
+ r45598 added logic that tests for overlap with <video> to determine when to throw
+ a layer into compositing mode. That logic was incorrect in some cases, and this patch
+ fixes it. When testing overlap, the layer needs to be composited iff some previous layer
+ is composited (which adds a rect to the overlay map), and there is overlap.
+
+ Test: compositing/geometry/video-opacity-overlay.html
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::CompositingState::CompositingState):
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+
+2009-09-17 Avi Drissman <avi@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Update the Chromium Mac theming files (RenderTheme and Theme) to be
+ up-to-date.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29243
+ http://crbug.com/19604
+
+ Covered by existing tests.
+
+ * WebCore.gypi:
+ * platform/chromium/ThemeChromiumMac.h: Added.
+ (WebCore::ThemeChromiumMac::ThemeChromiumMac):
+ (WebCore::ThemeChromiumMac::~ThemeChromiumMac):
+ (WebCore::ThemeChromiumMac::controlRequiresPreWhiteSpace):
+ * platform/chromium/ThemeChromiumMac.mm: Added.
+ (WebCore::):
+ (WebCore::platformTheme):
+ (WebCore::controlSizeForFont):
+ (WebCore::sizeFromFont):
+ (WebCore::setControlSize):
+ (WebCore::updateStates):
+ (WebCore::inflateRect):
+ (WebCore::checkboxSizes):
+ (WebCore::checkboxMargins):
+ (WebCore::checkboxSize):
+ (WebCore::checkbox):
+ (WebCore::paintCheckbox):
+ (WebCore::radioSizes):
+ (WebCore::radioMargins):
+ (WebCore::radioSize):
+ (WebCore::radio):
+ (WebCore::paintRadio):
+ (WebCore::buttonSizes):
+ (WebCore::buttonMargins):
+ (WebCore::button):
+ (WebCore::paintButton):
+ (WebCore::ThemeChromiumMac::baselinePositionAdjustment):
+ (WebCore::ThemeChromiumMac::controlFont):
+ (WebCore::ThemeChromiumMac::controlSize):
+ (WebCore::ThemeChromiumMac::minimumControlSize):
+ (WebCore::ThemeChromiumMac::controlBorder):
+ (WebCore::ThemeChromiumMac::controlPadding):
+ (WebCore::ThemeChromiumMac::inflateControlPaintRect):
+ (WebCore::ThemeChromiumMac::paint):
+ * platform/graphics/FloatPoint.h:
+ * platform/graphics/FloatRect.h:
+ * platform/graphics/FloatSize.h:
+ * platform/graphics/IntRect.h:
+ * rendering/RenderThemeChromiumMac.h:
+ (WebCore::RenderThemeChromiumMac::supportsControlTints):
+ (WebCore::RenderThemeChromiumMac::scrollbarControlSizeForPart):
+ (WebCore::RenderThemeChromiumMac::supportsSelectionForegroundColors):
+ * rendering/RenderThemeChromiumMac.mm:
+ (-[WebCoreRenderThemeNotificationObserver systemColorsDidChange:]):
+ (-[RTCMFlippedView isFlipped]):
+ (-[RTCMFlippedView currentEditor]):
+ (WebCore::):
+ (WebCore::FlippedView):
+ (WebCore::RenderTheme::themeForPage):
+ (WebCore::RenderThemeChromiumMac::platformActiveListBoxSelectionForegroundColor):
+ (WebCore::RenderThemeChromiumMac::platformInactiveListBoxSelectionForegroundColor):
+ (WebCore::RenderThemeChromiumMac::platformInactiveListBoxSelectionBackgroundColor):
+ (WebCore::RenderThemeChromiumMac::systemFont):
+ (WebCore::convertNSColorToColor):
+ (WebCore::menuBackgroundColor):
+ (WebCore::RenderThemeChromiumMac::systemColor):
+ (WebCore::RenderThemeChromiumMac::isControlStyled):
+ (WebCore::RenderThemeChromiumMac::adjustRepaintRect):
+ (WebCore::RenderThemeChromiumMac::inflateRect):
+ (WebCore::RenderThemeChromiumMac::convertToPaintingRect):
+ (WebCore::RenderThemeChromiumMac::setFontFromControlSize):
+ (WebCore::RenderThemeChromiumMac::paintTextField):
+ (WebCore::RenderThemeChromiumMac::paintCapsLockIndicator):
+ (WebCore::RenderThemeChromiumMac::paintTextArea):
+ (WebCore::RenderThemeChromiumMac::paintMenuList):
+ (WebCore::TopGradientInterpolate):
+ (WebCore::BottomGradientInterpolate):
+ (WebCore::MainGradientInterpolate):
+ (WebCore::TrackGradientInterpolate):
+ (WebCore::RenderThemeChromiumMac::paintMenuListButtonGradients):
+ (WebCore::RenderThemeChromiumMac::paintMenuListButton):
+ (WebCore::RenderThemeChromiumMac::popupInternalPaddingLeft):
+ (WebCore::RenderThemeChromiumMac::popupInternalPaddingRight):
+ (WebCore::RenderThemeChromiumMac::popupInternalPaddingTop):
+ (WebCore::RenderThemeChromiumMac::popupInternalPaddingBottom):
+ (WebCore::RenderThemeChromiumMac::adjustMenuListButtonStyle):
+ (WebCore::RenderThemeChromiumMac::adjustSliderTrackStyle):
+ (WebCore::RenderThemeChromiumMac::adjustSliderThumbStyle):
+ (WebCore::RenderThemeChromiumMac::paintSliderThumb):
+ (WebCore::RenderThemeChromiumMac::paintSearchField):
+ (WebCore::RenderThemeChromiumMac::setSearchCellState):
+ (WebCore::RenderThemeChromiumMac::adjustSearchFieldStyle):
+ (WebCore::RenderThemeChromiumMac::paintSearchFieldCancelButton):
+ (WebCore::RenderThemeChromiumMac::adjustSearchFieldCancelButtonStyle):
+ (WebCore::RenderThemeChromiumMac::adjustSearchFieldDecorationStyle):
+ (WebCore::RenderThemeChromiumMac::paintSearchFieldDecoration):
+ (WebCore::RenderThemeChromiumMac::adjustSearchFieldResultsDecorationStyle):
+ (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsDecoration):
+ (WebCore::RenderThemeChromiumMac::adjustSearchFieldResultsButtonStyle):
+ (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsButton):
+ (WebCore::mediaControllerTheme):
+ (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize):
+ (WebCore::getMediaUIPartStateFlags):
+ (WebCore::getUnzoomedRectAndAdjustCurrentContext):
+ (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaMuteButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaPlayButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaSeekBackButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaSeekForwardButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
+ (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb):
+ (WebCore::RenderThemeChromiumMac::paintMediaRewindButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaReturnToRealtimeButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground):
+ (WebCore::RenderThemeChromiumMac::paintMediaCurrentTime):
+ (WebCore::RenderThemeChromiumMac::paintMediaTimeRemaining):
+ (WebCore::RenderThemeChromiumMac::extraMediaControlsStyleSheet):
+
+2009-09-16 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29306
+
+ Fixes an issue where an attack that contains accented characters can
+ bypass the XSSAuditor.
+
+ XSSAuditor::decodeURL used the wrong length for the input string.
+ When the input string was decoded, the decoded result was truncated.
+ Hence, XSSAuditor was comparing the source code of the script to the
+ truncated input parameters.
+
+ Test: http/tests/security/xssAuditor/img-onerror-accented-char.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::decodeURL):
+
+2009-09-16 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Explore allowing pages with unload handlers into the Page Cache
+ https://bugs.webkit.org/show_bug.cgi?id=29021
+
+ No new tests. (All previous tests continue to pass)
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::stopLoading): If the document is in the page cache, don't fire the unload event.
+
+2009-09-16 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Teach ScheduledAction::execute about isolated worlds
+ https://bugs.webkit.org/show_bug.cgi?id=27703
+
+ We now save a handle to the original context. We use that handle to
+ call the timeout in the right context / world.
+
+ Tests: http/tests/security/isolatedWorld/window-setTimeout-function.html
+ http/tests/security/isolatedWorld/window-setTimeout-string.html
+
+ * bindings/v8/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::ScheduledAction):
+ (WebCore::ScheduledAction::execute):
+ * bindings/v8/ScheduledAction.h:
+ (WebCore::ScheduledAction::ScheduledAction):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8Custom::WindowSetTimeoutImpl):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::SetTimeoutOrInterval):
+
+2009-09-16 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Teach ScheduledAction::execute about isolated worlds
+ https://bugs.webkit.org/show_bug.cgi?id=27703
+
+ We now save a handle to the original context. We use that handle to
+ call the timeout in the right context / world.
+
+ Tests: http/tests/security/isolatedWorld/window-setTimeout-function.html
+ http/tests/security/isolatedWorld/window-setTimeout-string.html
+
+ * bindings/v8/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::ScheduledAction):
+ (WebCore::ScheduledAction::execute):
+ * bindings/v8/ScheduledAction.h:
+ (WebCore::ScheduledAction::ScheduledAction):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8Custom::WindowSetTimeoutImpl):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::SetTimeoutOrInterval):
+
+2009-09-16 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Add some groups to the xcode project to make the bindings/js/ group
+ a little nicer.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-09-16 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=29320
+ JS callback objects should store the global object
+
+ This just changes the callback objects to store the global object instead
+ of the frame. A follow up patch will change them to store the 'current'
+ global object instead of the lexical or dynamic.
+
+ * DerivedSources.make: Remove unused VoidCallback.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * bindings/js/JSCustomPositionCallback.cpp:
+ (WebCore::JSCustomPositionCallback::JSCustomPositionCallback):
+ (WebCore::JSCustomPositionCallback::handleEvent):
+ * bindings/js/JSCustomPositionCallback.h:
+ (WebCore::JSCustomPositionCallback::create):
+ * bindings/js/JSCustomPositionErrorCallback.cpp:
+ (WebCore::JSCustomPositionErrorCallback::JSCustomPositionErrorCallback):
+ (WebCore::JSCustomPositionErrorCallback::handleEvent):
+ * bindings/js/JSCustomPositionErrorCallback.h:
+ (WebCore::JSCustomPositionErrorCallback::create):
+ * bindings/js/JSCustomSQLStatementCallback.cpp:
+ (WebCore::JSCustomSQLStatementCallback::JSCustomSQLStatementCallback):
+ (WebCore::JSCustomSQLStatementCallback::handleEvent):
+ * bindings/js/JSCustomSQLStatementCallback.h:
+ (WebCore::JSCustomSQLStatementCallback::create):
+ * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
+ (WebCore::JSCustomSQLStatementErrorCallback::JSCustomSQLStatementErrorCallback):
+ (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
+ * bindings/js/JSCustomSQLStatementErrorCallback.h:
+ (WebCore::JSCustomSQLStatementErrorCallback::create):
+ * bindings/js/JSCustomSQLTransactionCallback.cpp:
+ (WebCore::JSCustomSQLTransactionCallback::Data::Data):
+ (WebCore::JSCustomSQLTransactionCallback::Data::globalObject):
+ (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback):
+ (WebCore::JSCustomSQLTransactionCallback::handleEvent):
+ * bindings/js/JSCustomSQLTransactionCallback.h:
+ (WebCore::JSCustomSQLTransactionCallback::create):
+ * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
+ (WebCore::JSCustomSQLTransactionErrorCallback::JSCustomSQLTransactionErrorCallback):
+ (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
+ * bindings/js/JSCustomSQLTransactionErrorCallback.h:
+ (WebCore::JSCustomSQLTransactionErrorCallback::create):
+ * bindings/js/JSCustomVoidCallback.cpp:
+ (WebCore::JSCustomVoidCallback::JSCustomVoidCallback):
+ (WebCore::JSCustomVoidCallback::handleEvent):
+ * bindings/js/JSCustomVoidCallback.h:
+ (WebCore::JSCustomVoidCallback::create):
+ * bindings/js/JSDatabaseCustom.cpp:
+ (WebCore::JSDatabase::changeVersion):
+ (WebCore::createTransaction):
+ (WebCore::JSDatabase::transaction):
+ (WebCore::JSDatabase::readTransaction):
+ * bindings/js/JSGeolocationCustom.cpp:
+ (WebCore::createPositionCallback):
+ (WebCore::createPositionErrorCallback):
+ (WebCore::JSGeolocation::getCurrentPosition):
+ (WebCore::JSGeolocation::watchPosition):
+ * bindings/js/JSSQLTransactionCustom.cpp:
+ (WebCore::JSSQLTransaction::executeSql):
+
+2009-09-15 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ <input maxlength=> should restrict only values specified by users.
+ https://bugs.webkit.org/show_bug.cgi?id=21271
+
+ * dom/InputElement.cpp:
+ (WebCore::InputElement::setValueFromRenderer):
+ (WebCore::InputElement::sanitizeValue):
+ (WebCore::InputElement::sanitizeUserInputValue): Rename from constrainValue().
+ (WebCore::InputElement::handleBeforeTextInsertedEvent):
+ (WebCore::InputElement::updateValueIfNeeded):
+ * dom/InputElement.h:
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::setInputType):
+ (WebCore::HTMLInputElement::value):
+ (WebCore::HTMLInputElement::setValue):
+ (WebCore::HTMLInputElement::sanitizeValue):
+ * html/HTMLInputElement.h:
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
+ * wml/WMLInputElement.cpp:
+ (WebCore::WMLInputElement::constrainValue):
+ * wml/WMLInputElement.h:
+ (WebCore::WMLInputElement::sanitizeValue):
+
+2009-09-16 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Reorganizing helper functions in htmlediting.h to group them by type of object they return/operate upon.
+ https://bugs.webkit.org/show_bug.cgi?id=29319
+
+ * editing/IndentOutdentCommand.cpp:
+ Removed implementation of isAtUnsplittableElement.
+
+ * editing/IndentOutdentCommand.h:
+ Removed member function isAtUnsplittableElement, because it was not class specific and belonged logically among the helper functions.
+
+ * editing/htmlediting.cpp:
+ (WebCore::isAtUnsplittableElement): added. The code was taken from IndentOutdentCommand.
+
+ * editing/htmlediting.h:
+ Reordered functions to group them by type of object returned or operate upon.
+ Added comments.
+ Added isAtUnsplittableElement declaration.
+
+2009-09-16 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig and Anders Carlsson.
+
+ Removed some vestigial and potentially crashy code that makes consolidating
+ event listeners hard.
+
+ * dom/Node.cpp:
+ (WebCore::Node::addEventListener): No need to limit when event listeners
+ can be added. Other EventTargets don't do this.
+
+ Also, check for null when accessing document(). Technically, the JS bindings
+ do this check for us, but let's not rely on that.
+
+2009-09-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam Roben.
+
+ <rdar://problem/7155710>
+ HTML selects on windows cause containing window to become inactive when opened
+
+ Redo the way we handle events when a popup menu is shown, based on
+ http://blogs.msdn.com/oldnewthing/archive/2004/08/20/217684.aspx
+
+ Since a non-active window can't capture the mouse, we use the owning window
+ (the WebView) as the capture window. We then run a recursive message pump that
+ forwards all mouse and keyboard events to the popup menu.
+
+ * platform/PopupMenu.h:
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::PopupMenu):
+ (WebCore::PopupMenu::show):
+ (WebCore::PopupMenu::hide):
+ (WebCore::PopupMenu::wndProc):
+
+2009-09-16 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Ada Chan.
+
+ Speculative fix for
+ <rdar://problem/6937089> Crashes at RenderWidget::destroy()
+
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::destroy): Avoid calling renderArena() if node()
+ is null. Add two assertions that can help determine how this crash
+ happens (in particular, whether node() becomes null during destroy() or
+ it is null before destroy() is called).
+
+2009-09-16 Beth Dakin <bdakin@apple.com>
+
+ Speculative build fix.
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+
+2009-09-16 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for <rdar://problem/7083741> Implement a CSS extension to
+ adjust sub-pixel anti-aliasing for text
+ -and corresponding-
+ https://bugs.webkit.org/show_bug.cgi?id=29291
+
+ Added tests:
+ * fast/css/font-smoothing.html: Added.
+ * fast/css/parsing-webkit-font-smoothing.html: Added.
+
+ This patch adds a new CSS property called -webkit-font-smoothing
+ that accepts the following as valid input: auto | none |
+ antialiased | subpixel-antialiased
+
+ Return appropriate computed style for -webkit-font-smoothing
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::):
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+
+ Add a case for CSSPropertyWebkitFontSmoothing, and accept valid
+ input.
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+
+ Add mappings for FontSmoothing to the right CSS values.
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator FontSmoothing):
+
+ Add -webkit-font-smoothing
+ * css/CSSPropertyNames.in:
+
+ Set fontSmoothing on the FontDescription.
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+
+ Add antialiased and subpixel-antialiased as possible new CSS
+ values.
+ * css/CSSValueKeywords.in:
+ Store the font smoothing CSS value in the FontDescription.
+ * platform/graphics/FontDescription.h:
+ (WebCore::FontDescription::FontDescription):
+ (WebCore::FontDescription::fontSmoothing):
+ (WebCore::FontDescription::setFontSmoothing):
+ (WebCore::FontDescription::operator==):
+
+ Call setShouldAntialias() and setShouldUseSmoothing() appropriately
+ based on the CSS fontSmoothing() value.
+ * platform/graphics/mac/FontMac.mm:
+ (WebCore::Font::drawGlyphs):
+ * platform/graphics/win/FontCGWin.cpp:
+ (WebCore::Font::drawGlyphs):
+
+ New function fontSmoothing()
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::fontSmoothing):
+
+ New enum FontSmoothing.
+ * rendering/style/RenderStyleConstants.h:
+ (WebCore::):
+
+2009-09-16 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Remove style property if empty string is entered.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29163
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeOutline.prototype._onmouseout): fixed null pointer exception
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.applyStyleText): if styletext to apply is empty it will return an array to confirm the property removal
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertyTreeElement.prototype.):
+ (WebInspector.StylePropertyTreeElement.prototype):
+
+2009-09-16 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Always reset m_implicitShorthand to false after parsing
+ background-repeat style property otherwise properties
+ following after it may be erroneously marked as implicit.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28972
+ https://bugs.webkit.org/show_bug.cgi?id=28973
+
+ Test: fast/backgrounds/repeat/margin-shorthand.html
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+
+2009-09-16 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Incorrect behavior of XMLHttpRequest::getAllResponseHeaders and
+ XMLHttpRequest::getResponseHeader in the
+ HEADERS_RECEIVED readyState.
+ https://bugs.webkit.org/show_bug.cgi?id=29121
+
+ Tests: http/tests/xmlhttprequest/getAllResponseHeaders.html
+ http/tests/xmlhttprequest/getResponseHeader.html
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::getAllResponseHeaders):
+ (WebCore::XMLHttpRequest::getResponseHeader):
+ Changed the minimum valid state from LOADING to HEADERS_RECEIVED.
+
+2009-09-16 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Fix style violation in V8AbstractEventListener.
+ https://bugs.webkit.org/show_bug.cgi?id=29303
+
+ * bindings/v8/V8AbstractEventListener.h:
+ (WebCore::V8AbstractEventListener::operator==):
+
+2009-09-16 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Add Watch Expression support to inspector
+ https://bugs.webkit.org/show_bug.cgi?id=27514
+
+ Manual test added.
+
+ * English.lproj/localizedStrings.js:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.completions):
+ (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
+ (WebInspector.ConsoleView.prototype._enterKeyPressed):
+ * inspector/front-end/ObjectPropertiesSection.js:
+ (WebInspector.ObjectPropertiesSection.prototype.update.callback):
+ (WebInspector.ObjectPropertiesSection.prototype.update):
+ (WebInspector.ObjectPropertiesSection.prototype.updateProperties):
+ (WebInspector.ObjectPropertiesSection.CompareProperties):
+ (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate.callback):
+ (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
+ (WebInspector.ObjectPropertyTreeElement.prototype.update):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ (WebInspector.ScriptsPanel.prototype.reset):
+ (WebInspector.ScriptsPanel.prototype._callFrameSelected):
+ * inspector/front-end/WatchExpressionsSidebarPane.js: Added.
+ (WebInspector.WatchExpressionsSidebarPane):
+ (WebInspector.WatchExpressionsSidebarPane.prototype.refreshExpressions):
+ (WebInspector.WatchExpressionsSection):
+ (WebInspector.WatchExpressionsSection.prototype.update):
+ (WebInspector.WatchExpressionsSection.prototype.addExpression):
+ (WebInspector.WatchExpressionsSection.prototype.updateExpression):
+ (WebInspector.WatchExpressionsSection.prototype.findAddedTreeElement):
+ (WebInspector.WatchExpressionsSection.prototype.loadSavedExpressions):
+ (WebInspector.WatchExpressionsSection.prototype.saveExpressions):
+ (WebInspector.WatchExpressionsSection.CompareProperties):
+ (WebInspector.WatchExpressionTreeElement):
+ (WebInspector.WatchExpressionTreeElement.prototype.update):
+ (WebInspector.WatchExpressionTreeElement.prototype._deleteButtonClicked):
+ (WebInspector.WatchExpressionTreeElement.prototype.startEditing):
+ (WebInspector.WatchExpressionTreeElement.prototype.editingCancelled):
+ (WebInspector.WatchExpressionTreeElement.prototype.applyExpression):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.html:
+ * manual-tests/inspector/debugger-watch-expressions.html: Added.
+
+2009-09-16 Greg Bolsinga <bolsinga@apple.com>
+
+ Add ENABLE(INSPECTOR)
+ https://bugs.webkit.org/show_bug.cgi?id=29260
+
+ Reviewed by David Kilzer.
+
+ No new tests. (No change in default behavior.)
+
+ * DerivedSources.make: Use new WebCore.Inspector.exp file if ENABLE_DRAG_SUPPORT.
+ * WebCore.base.exp: Move Inspector only exports to WebCore.Inspector.exp.
+ * WebCore.xcodeproj/project.pbxproj: Add WebCore.Inspector.exp.
+ * bindings/js/JSDOMWindowBase.cpp: Use ENABLE(INSPECTOR) where applicable.
+ (WebCore::JSDOMWindowBase::supportsProfiling):
+ * bindings/js/JSInspectedObjectWrapper.cpp: Wrap entire file in ENABLE(INSPECTOR).
+ * bindings/js/JSInspectorBackendCustom.cpp: Ditto.
+ * bindings/js/JSInspectorCallbackWrapper.cpp: Ditto.
+ * bindings/js/ScriptObject.cpp: Use ENABLE(INSPECTOR) where applicable.
+ * bindings/js/ScriptObject.h: Ditto.
+ * bindings/js/ScriptObjectQuarantine.cpp: Wrap entire file in ENABLE(INSPECTOR).
+ * dom/Document.cpp: Use ENABLE(INSPECTOR) where applicable.
+ (WebCore::Document::recalcStyle):
+ (WebCore::Document::addMessage):
+ (WebCore::Document::resourceRetrievedByXMLHttpRequest):
+ (WebCore::Document::scriptImported):
+ * dom/Document.h: Ditto.
+ * dom/Node.cpp: Ditto.
+ (WebCore::Node::dispatchGenericEvent):
+ * dom/ScriptExecutionContext.h: Ditto.
+ (WebCore::):
+ * html/HTMLDocument.cpp: Ditto.
+ (WebCore::HTMLDocument::createTokenizer):
+ * html/HTMLTokenizer.cpp: Ditto.
+ (WebCore::HTMLTokenizer::write):
+ * inspector/ConsoleMessage.cpp: Ditto.
+ (WebCore::ConsoleMessage::ConsoleMessage):
+ (WebCore::ConsoleMessage::isEqual):
+ * inspector/ConsoleMessage.h: Ditto.
+ * inspector/DOMDispatchTimelineItem.cpp: Wrap entire file in ENABLE(INSPECTOR).
+ * inspector/InspectorBackend.cpp: Ditto.
+ * inspector/InspectorController.cpp: Ditto.
+ * inspector/InspectorDOMAgent.cpp: Ditto.
+ * inspector/InspectorDOMStorageResource.cpp: Ditto.
+ * inspector/InspectorDatabaseResource.cpp: Ditto.
+ * inspector/InspectorFrontend.cpp: Ditto.
+ * inspector/InspectorResource.cpp: Ditto.
+ * inspector/InspectorTimelineAgent.cpp: Ditto.
+ * inspector/TimelineItem.cpp: Ditto.
+ * loader/FrameLoader.cpp: Use ENABLE(INSPECTOR) where applicable.
+ (WebCore::FrameLoader::detachFromParent):
+ (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
+ (WebCore::FrameLoader::loadedResourceFromMemoryCache):
+ (WebCore::FrameLoader::dispatchWindowObjectAvailable):
+ (WebCore::FrameLoader::dispatchDidCommitLoad):
+ (WebCore::FrameLoader::dispatchAssignIdentifierToInitialRequest):
+ (WebCore::FrameLoader::dispatchWillSendRequest):
+ (WebCore::FrameLoader::dispatchDidReceiveResponse):
+ (WebCore::FrameLoader::dispatchDidReceiveContentLength):
+ (WebCore::FrameLoader::dispatchDidFinishLoading):
+ * page/Chrome.cpp: Ditto.
+ (WebCore::Chrome::mouseDidMoveOverElement):
+ * page/Console.cpp: Ditto.
+ (WebCore::Console::addMessage):
+ (WebCore::Console::count):
+ (WebCore::Console::profile):
+ (WebCore::Console::profileEnd):
+ (WebCore::Console::time):
+ (WebCore::Console::timeEnd):
+ (WebCore::Console::group):
+ (WebCore::Console::groupEnd):
+ * page/ContextMenuController.cpp: Ditto.
+ (WebCore::ContextMenuController::handleContextMenuEvent):
+ (WebCore::ContextMenuController::contextMenuItemSelected):
+ * page/DOMWindow.cpp: Ditto.
+ (WebCore::DOMWindow::sessionStorage):
+ (WebCore::DOMWindow::localStorage):
+ * page/EventHandler.cpp: Ditto.
+ (WebCore::EventHandler::handleMousePressEvent):
+ * page/FrameView.cpp: Ditto.
+ (WebCore::FrameView::layout):
+ (WebCore::FrameView::paintContents):
+ * page/FrameView.h: Ditto.
+ * page/Page.cpp: Ditto.
+ (WebCore::Page::Page):
+ (WebCore::Page::~Page):
+ * page/Page.h: Ditto.
+ * platform/ContextMenu.cpp: Ditto.
+ (WebCore::ContextMenu::checkOrEnableIfNeeded):
+ * platform/ContextMenuItem.h: Ditto.
+ (WebCore::):
+ * storage/Database.cpp: Ditto.
+ (WebCore::Database::openDatabase):
+ * workers/WorkerContext.cpp: Ditto.
+ (WebCore::WorkerContext::importScripts):
+ * xml/XMLHttpRequest.cpp: Ditto.
+ (WebCore::XMLHttpRequest::didFinishLoading):
+
+2009-09-16 Greg Bolsinga <bolsinga@apple.com>
+
+ Add ENABLE(CONTEXT_MENUS)
+ https://bugs.webkit.org/show_bug.cgi?id=29225
+
+ Reviewed by David Kilzer.
+
+ No new tests. (No change in default behavior.)
+
+ * DerivedSources.make: Use new WebCore.ContextMenus.exp file if ENABLE_CONTEXT_MENUS.
+ * WebCore.base.exp: Move ContextMenu only exports to WebCore.ContextMenus.exp.
+ * WebCore.xcodeproj/project.pbxproj: Add WebCore.ContextMenus.exp.
+ * dom/Node.cpp: Use ENABLE(CONTEXT_MENUS) where applicable.
+ (WebCore::Node::defaultEventHandler):
+ * loader/EmptyClients.h: Ditto.
+ * page/ContextMenuController.cpp: Wrap entire file in ENABLE(CONTEXT_MENUS).
+ * page/EventHandler.cpp: Use ENABLE(CONTEXT_MENUS) where applicable.
+ * page/EventHandler.h: Ditto.
+ * page/Page.cpp: Ditto.
+ (WebCore::Page::Page):
+ * page/Page.h: Ditto.
+ * page/mac/EventHandlerMac.mm: Ditto.
+ * page/mac/WebCoreViewFactory.h: Ditto.
+ * platform/ContextMenu.cpp: Wrap entire file in ENABLE(CONTEXT_MENUS).
+ * platform/LocalizedStrings.h: Use ENABLE(CONTEXT_MENUS) where applicable.
+ * platform/mac/ContextMenuItemMac.mm: Wrap entire file in ENABLE(CONTEXT_MENUS).
+ * platform/mac/ContextMenuMac.mm: Ditto.
+ * platform/mac/LocalizedStringsMac.mm: Use ENABLE(CONTEXT_MENUS) where applicable.
+ * svg/graphics/SVGImage.cpp: Ditto.
+ (WebCore::SVGImage::dataChanged):
+
+2009-09-16 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Clean up invalidation for repainting. Hoist the dirty rect intersection test in ScrollViewMac up
+ into ScrollView so that all platforms do it.
+
+ Patch deferred repaints in FrameView::repaintContentRectangle to only add the visible portion of
+ the rectangle for repainting.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::repaintContentRectangle):
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::repaintContentRectangle):
+ * platform/mac/ScrollViewMac.mm:
+ (WebCore::ScrollView::platformRepaintContentRectangle):
+
+2009-09-16 Greg Bolsinga <bolsinga@apple.com>
+
+ Add ENABLE(DRAG_SUPPORT)
+ https://bugs.webkit.org/show_bug.cgi?id=29233
+
+ Reviewed by David Kilzer.
+
+ No new tests. (No change in default behavior.)
+
+ * DerivedSources.make: Use new WebCore.DragSupport.exp file if ENABLE_DRAG_SUPPORT.
+ * WebCore.base.exp: Move Drag Support only exports to WebCore.DragSupport.exp.
+ * WebCore.xcodeproj/project.pbxproj: Add WebCore.DragSupport.exp.
+ * dom/Clipboard.h: Use ENABLE(DRAG_SUPPORT) where applicable.
+ * loader/EmptyClients.h: Ditto.
+ * page/DragController.cpp: Wrap entire file in ENABLE(DRAG_SUPPORT).
+ * page/EventHandler.cpp: Use ENABLE(DRAG_SUPPORT) where applicable.
+ (WebCore::EventHandler::EventHandler):
+ (WebCore::EventHandler::clear):
+ (WebCore::EventHandler::handleMousePressEvent):
+ (WebCore::EventHandler::handleMouseReleaseEvent):
+ (WebCore::EventHandler::handleMouseMoveEvent):
+ * page/EventHandler.h: Ditto.
+ * page/Page.cpp: Ditto.
+ (WebCore::Page::Page):
+ * page/Page.h: Ditto.
+ * page/mac/DragControllerMac.mm: Wrap entire file in ENABLE(DRAG_SUPPORT).
+ * page/mac/EventHandlerMac.mm: Use ENABLE(DRAG_SUPPORT) where applicable.
+ (WebCore::EventHandler::passSubframeEventToSubframe):
+ * platform/DragData.cpp: Wrap entire file in ENABLE(DRAG_SUPPORT).
+ * platform/DragImage.cpp: Wrap entire file in ENABLE(DRAG_SUPPORT).
+ * platform/mac/ClipboardMac.h: Use ENABLE(DRAG_SUPPORT) where applicable.
+ * platform/mac/ClipboardMac.mm: Ditto.
+ * platform/mac/DragDataMac.mm: Wrap entire file in ENABLE(DRAG_SUPPORT).
+ * platform/mac/DragImageMac.mm: Wrap entire file in ENABLE(DRAG_SUPPORT).
+ * rendering/RenderLayer.cpp: Use ENABLE(DRAG_SUPPORT) where applicable.
+ (WebCore::RenderLayer::autoscroll):
+ * rendering/RenderObject.cpp: Ditto.
+ * rendering/RenderObject.h: Ditto.
+ * svg/graphics/SVGImage.cpp: Ditto.
+ (WebCore::SVGImage::dataChanged):
+
+2009-09-16 Kevin Ollivier <kevino@theolliviers.com>
+
+ wxMSW build fix after adding support for high resolution times in Win.
+
+ * page/Settings.cpp:
+ * page/Settings.h:
+
+2009-09-16 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Added operator==() to event listeners. This fixes V8 bindings
+ build broken in http://trac.webkit.org/changeset/48402.
+ https://bugs.webkit.org/show_bug.cgi?id=29298
+
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::V8AbstractEventListener): Now
+ uses JSEventListenerType.
+ * bindings/v8/V8AbstractEventListener.h:
+ (WebCore::V8AbstractEventListener::operator==): Only compares
+ pointers since we create at most one wrapper for a JS object.
+
+2009-09-16 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Crash when visiting http://flipper.googlelabs.com/
+ https://bugs.webkit.org/show_bug.cgi?id=29293
+
+ Check type for being null or empty before looking it up in the
+ hash of supported types.
+
+ Tested by http/tests/loading/redirect-with-no-location-crash.html
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::supportsType):
+
+2009-09-15 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Removed the notion of "disconnected nodes with event listeners" because
+ it was vestigial. The reference cycle it tried to solve was solved another
+ way in https://bugs.webkit.org/show_bug.cgi?id=21260.
+
+ * dom/Document.cpp:
+ (WebCore::Document::removeAllEventListeners):
+ * dom/Document.h:
+ * dom/Node.cpp:
+ (WebCore::Node::~Node):
+ (WebCore::Node::insertedIntoDocument):
+ (WebCore::Node::removedFromDocument):
+ (WebCore::Node::willMoveToNewOwnerDocument):
+ (WebCore::Node::didMoveToNewOwnerDocument):
+ (WebCore::Node::addEventListener):
+ (WebCore::Node::removeEventListener):
+ (WebCore::Node::clearAttributeEventListener):
+
+2009-09-15 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ WAI-ARIA: add support for ranges, including the progressbar, slider, and spinbutton roles
+ https://bugs.webkit.org/show_bug.cgi?id=28841
+
+ Allow certain ARIA roles to change value with AXIncrement and AXDecrement.
+ Consolidate increment/decrement/changeValue methods.
+
+ Test: accessibility/aria-slider-value-change.html
+
+ * accessibility/AccessibilityObject.cpp:
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::increment):
+ (WebCore::AccessibilityRenderObject::decrement):
+ (WebCore::AccessibilityRenderObject::changeValueByPercent):
+ (WebCore::AccessibilityRenderObject::setValue):
+ (WebCore::AccessibilityRenderObject::canSetFocusAttribute):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/AccessibilitySlider.cpp:
+ * accessibility/AccessibilitySlider.h:
+ * dom/Element.cpp:
+ (WebCore::Element::updateAfterAttributeChanged):
+
+2009-09-15 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Removed the jsEventListeners set from JSDOMGlobalObject, to simplify
+ creation and destruction of JSDOMGlobalObject and event listeners.
+
+ Added an abstract operator==() to EventListener, to replace the
+ jsEventListeners set's role in determining if two event listeners are
+ equal from the DOM's perspective.
+
+ Added a type field to EventListener, and casting operations, to support
+ operator==() and other abstract operations.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSAbstractWorkerCustom.cpp:
+ (WebCore::JSAbstractWorker::addEventListener):
+ (WebCore::JSAbstractWorker::removeEventListener):
+ * bindings/js/JSDOMApplicationCacheCustom.cpp:
+ (WebCore::JSDOMApplicationCache::addEventListener):
+ (WebCore::JSDOMApplicationCache::removeEventListener):
+ * bindings/js/JSDOMGlobalObject.cpp:
+ * bindings/js/JSDOMGlobalObject.h:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::addEventListener):
+ (WebCore::JSDOMWindow::removeEventListener):
+ * bindings/js/JSDesktopNotificationsCustom.cpp:
+ (WebCore::JSNotification::addEventListener):
+ (WebCore::):
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::JSEventListener::JSEventListener):
+ (WebCore::JSEventListener::~JSEventListener):
+ (WebCore::JSEventListener::markJSFunction):
+ (WebCore::JSEventListener::handleEvent):
+ (WebCore::JSEventListener::reportError):
+ (WebCore::JSEventListener::operator==):
+ * bindings/js/JSEventListener.h:
+ (WebCore::JSEventListener::cast):
+ * bindings/js/JSEventSourceCustom.cpp:
+ (WebCore::JSEventSource::addEventListener):
+ (WebCore::JSEventSource::removeEventListener):
+ * bindings/js/JSMessagePortCustom.cpp:
+ (WebCore::JSMessagePort::addEventListener):
+ (WebCore::JSMessagePort::removeEventListener):
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::addEventListener):
+ (WebCore::JSNode::removeEventListener):
+ * bindings/js/JSSVGElementInstanceCustom.cpp:
+ (WebCore::JSSVGElementInstance::addEventListener):
+ (WebCore::JSSVGElementInstance::removeEventListener):
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::addEventListener):
+ (WebCore::JSWorkerContext::removeEventListener):
+ * bindings/js/JSXMLHttpRequestCustom.cpp:
+ (WebCore::JSXMLHttpRequest::addEventListener):
+ (WebCore::JSXMLHttpRequest::removeEventListener):
+ * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
+ (WebCore::JSXMLHttpRequestUpload::addEventListener):
+ (WebCore::JSXMLHttpRequestUpload::removeEventListener):
+ * bindings/objc/ObjCEventListener.h:
+ (WebCore::ObjCEventListener::cast):
+ * bindings/objc/ObjCEventListener.mm:
+ (WebCore::ObjCEventListener::ObjCEventListener):
+ (WebCore::ObjCEventListener::operator==):
+ * dom/EventListener.h:
+ (WebCore::EventListener::):
+ (WebCore::EventListener::type):
+ (WebCore::EventListener::EventListener):
+ * dom/MessagePort.cpp:
+ (WebCore::MessagePort::addEventListener):
+ (WebCore::MessagePort::removeEventListener):
+ * dom/Node.cpp:
+ (WebCore::Node::removeEventListener):
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::InspectorDOMAgent):
+ (WebCore::InspectorDOMAgent::mainFrameDocument):
+ (WebCore::InspectorDOMAgent::operator==):
+ * inspector/InspectorDOMAgent.h:
+ (WebCore::InspectorDOMAgent::cast):
+ * loader/ImageDocument.cpp:
+ (WebCore::ImageEventListener::cast):
+ (WebCore::ImageEventListener::ImageEventListener):
+ (WebCore::ImageEventListener::operator==):
+ * loader/appcache/DOMApplicationCache.cpp:
+ (WebCore::DOMApplicationCache::addEventListener):
+ (WebCore::DOMApplicationCache::removeEventListener):
+ * notifications/Notification.cpp:
+ (WebCore::Notification::removeEventListener):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::removeEventListener):
+ * page/EventSource.cpp:
+ (WebCore::EventSource::addEventListener):
+ (WebCore::EventSource::removeEventListener):
+ * svg/animation/SVGSMILElement.cpp:
+ (WebCore::ConditionEventListener::cast):
+ (WebCore::ConditionEventListener::ConditionEventListener):
+ (WebCore::ConditionEventListener::operator==):
+ (WebCore::ConditionEventListener::handleEvent):
+ * workers/AbstractWorker.cpp:
+ (WebCore::AbstractWorker::addEventListener):
+ (WebCore::AbstractWorker::removeEventListener):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::addEventListener):
+ (WebCore::WorkerContext::removeEventListener):
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::addEventListener):
+ (WebCore::XMLHttpRequest::removeEventListener):
+ * xml/XMLHttpRequestUpload.cpp:
+ (WebCore::XMLHttpRequestUpload::addEventListener):
+ (WebCore::XMLHttpRequestUpload::removeEventListener):
+
+2009-09-15 Alex Milowski <alex@milowski.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Added ENABLE_MATHML to feature defines
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-09-14 Andrew Richards <randrew@gmail.com>
+
+ Reviewed by Sam Weinig.
+
+ Document.elementFromPoint() and Document.caretRangeFromPoint() erroneously returning null at points visible only after scrolling.
+ https://bugs.webkit.org/show_bug.cgi?id=29245
+
+ Use visibleContentRect() instead of boundsRect() when checking hit point bounds on viewport.
+
+ * dom/Document.cpp:
+ (WebCore::Document::elementFromPoint):
+ (WebCore::Document::caretRangeFromPoint):
+
+2009-09-15 Jungshik Shin <jshin@chromium.org>
+
+ Reviewed by Eric Seidel
+
+ http://bugs.webkit.org/show_bug.cgi?id=26660
+
+ Chromium Windows: When rotated, the baseline for a span of complex
+ script is completely misaligned with that of the adjacent
+ simple script text. It's fixed by not applying the baseline offset for
+ the Skia code path.
+
+ Test: transforms/2d/hindi-rotated.html
+
+ * platform/graphics/chromium/UniscribeHelper.cpp:
+ (WebCore::UniscribeHelper::draw):
+
+2009-09-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Pass the PopupMenu pointer to CreateWindowEx and then get it from the LPCREATESTRUCT in
+ the WM_CREATE handler. This way we don't have to first create an zero size window and then size it.
+
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::show):
+ (WebCore::PopupMenu::PopupMenuWndProc):
+
+2009-09-15 Drew Wilson <atwilson@google.com>
+
+ Reviewed by Darin Adler.
+
+ MessageEvent should not be cancelable by default
+ https://bugs.webkit.org/show_bug.cgi?id=27846
+
+ * dom/MessageEvent.cpp:
+ (WebCore::MessageEvent::MessageEvent):
+ Changed constructor to set cancelable=false by default, per the HTML5 spec.
+
+2009-09-15 Charles Wei <charles.wei@torchmobile.com.cn>
+
+ Reviewed by George Staikos.
+
+ Fix SVG path parsing error if a command starts with dot '.'
+ https://bugs.webkit.org/show_bug.cgi?id=29123
+
+ * svg/SVGParserUtilities.cpp:
+ (WebCore::SVGPathParser::parseSVG):
+
+2009-09-15 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Implement conditional breakpoints in the Web Inspector frontend.
+ https://bugs.webkit.org/show_bug.cgi?id=28908
+
+ * English.lproj/localizedStrings.js:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/Breakpoint.js:
+ (WebInspector.Breakpoint.prototype.set condition):
+ * inspector/front-end/Popup.js: Added.
+ (WebInspector.Popup):
+ (WebInspector.Popup.prototype.show):
+ (WebInspector.Popup.prototype.hide):
+ (WebInspector.Popup.prototype.get visible):
+ (WebInspector.Popup.prototype.set element):
+ (WebInspector.Popup.prototype.get element):
+ (WebInspector.Popup.prototype.positionElement):
+ (WebInspector.Popup.prototype.set anchor):
+ (WebInspector.Popup.prototype.get anchor):
+ (WebInspector.Popup.prototype.set autoHide):
+ (WebInspector.Popup.prototype._checkNotVisible):
+ (WebInspector.Popup.prototype._keyEventHandler):
+ (WebInspector.Popup.prototype._mouseDownEventHandler):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype.revealLine):
+ (WebInspector.SourceFrame.prototype._loaded):
+ (WebInspector.SourceFrame.prototype._documentContextMenu):
+ (WebInspector.SourceFrame.prototype._documentMouseDown):
+ (WebInspector.SourceFrame.prototype._editBreakpointCondition.committed):
+ (WebInspector.SourceFrame.prototype._editBreakpointCondition.dismissed):
+ (WebInspector.SourceFrame.prototype._editBreakpointCondition):
+ (WebInspector.SourceFrame.prototype._showBreakpointConditionPopup):
+ (WebInspector.SourceFrame.prototype._createPopupElement):
+ (WebInspector.SourceFrame.prototype._addBreakpointToSource):
+ (WebInspector.SourceFrame.prototype._removeBreakpointFromSource):
+ (WebInspector.SourceFrame.prototype._drawBreakpointImagesIfNeeded.drawBreakpoint):
+ (WebInspector.SourceFrame.prototype._drawBreakpointImagesIfNeeded):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector.set currentFocusElement):
+ (WebInspector.set currentPanel):
+ (WebInspector.loaded):
+ (WebInspector.contextMenu):
+ (WebInspector.elementDragStart):
+ (WebInspector.updateResource):
+ (WebInspector.drawLoadingPieChart):
+ (WebInspector.linkifyURLAsNode):
+ (WebInspector.startEditing.getContent):
+ (WebInspector.startEditing.editingCancelled):
+ (WebInspector.startEditing.editingCommitted):
+ * inspector/front-end/utilities.js:
+ (Element.prototype.positionAt):
+ (Element.prototype.offsetRelativeToWindow):
+
+2009-09-14 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Page cache should support pages with unload handlers as an experiment.
+ <rdar://problem/7196485> and https://bugs.webkit.org/show_bug.cgi?id=29021
+
+ For the experiment, only allow pages with unload handlers into the Page Cache on
+ Mac and Windows.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::canCachePageContainingThisFrame):
+ (WebCore::FrameLoader::logCanCacheFrameDecision):
+
+2009-09-14 Simon Fraser <simon.fraser@apple.com>
+
+ Fix the change in r48376 to do a null-check to fix a crashing test.
+
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::menuListDefaultEventHandler):
+
+2009-09-14 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7047282> Safari crashes at WebCore::RenderMenuList::adjustInnerStyle() 436
+
+ Avoid a crash when a mouse event handler on a <select> changes the select from a popup
+ to a list (by setting the 'size' property) inside the event handler.
+
+ Test: fast/forms/select-change-popup-to-listbox-in-event-handler.html
+
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::menuListDefaultEventHandler):
+
+2009-09-14 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ More PopupMenu cleanup.
+
+ * platform/PopupMenu.h:
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::show):
+ Call registerClass.
+
+ (WebCore::PopupMenu::registerClass):
+ Make this a private static member function so it can refer to PopupMenuWndProc.
+
+ (WebCore::PopupMenu::PopupMenuWndProc):
+ Try to get the PopupMenu and call its wndProc member function.
+
+ (WebCore::PopupMenu::wndProc):
+ Make this a member function.
+
+2009-09-14 Brady Eidson <beidson@apple.com>
+
+ Not reviewed, maybe should've been:
+
+ Cleaning up more Windows-specific fallout from the fix for:
+ <rdar://problem/7174050> and https://bugs.webkit.org/show_bug.cgi?id=29160
+
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::WebCoreSynchronousLoader::load): Don't allow empty CFStrings as the stored credentials,
+ as related checks all look at nullity when they really mean to be looking for emptiness.
+
+2009-09-14 Anders Carlsson <andersca@apple.com>
+
+ Speculative Qt build fix.
+
+ * platform/qt/QWebPopup.cpp:
+ (WebCore::QWebPopup::hidePopup):
+
+2009-09-14 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Fix RenderThemeChromiumWin::determineClassicState so that classic_state
+ matches the state values (and you get a single classic_state value
+ for a given {part,state} value. This change will be tested by a
+ chromium patch that will land after this.
+
+ This will be tested by code landing downstream on Chromium.org; the
+ code does not execute on webkit.org.
+
+ * rendering/RenderThemeChromiumWin.cpp:
+ (WebCore::RenderThemeChromiumWin::determineClassicState):
+ (WebCore::RenderThemeChromiumWin::getThemeData):
+
+2009-09-14 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29138
+ Simplify popup menu handling.
+
+ * platform/PopupMenuClient.h:
+ Rename hidePopup to popupDidHide.
+
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::handleKeyEvent):
+ (WebCore::PopupListBox::abandon):
+ (WebCore::PopupListBox::acceptIndex):
+ Call popupDidHide instead of hidePopup.
+
+ * platform/gtk/PopupMenuGtk.cpp:
+ (WebCore::PopupMenu::menuUnmapped):
+ Ditto.
+
+ * platform/mac/PopupMenuMac.mm:
+ (WebCore::PopupMenu::show):
+ Ditto.
+
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::hide):
+ Call popupDidHide.
+
+ (WebCore::PopupWndProc):
+ Call PopupMenu::hide.
+
+ * platform/wx/PopupMenuWx.cpp:
+ (WebCore::PopupMenu::OnMenuItemSelected):
+ Call popupDidHide.
+
+ * rendering/RenderMenuList.cpp:
+ (WebCore::RenderMenuList::hidePopup):
+ (WebCore::RenderMenuList::popupDidHide):
+ * rendering/RenderMenuList.h:
+ Set the "popup is visible" flag in popupDidHide.
+
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::hidePopup):
+ (WebCore::RenderTextControlSingleLine::popupDidHide):
+ * rendering/RenderTextControlSingleLine.h:
+ Ditto.
+
+2009-09-14 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by David Hyatt.
+
+ - Fix <rdar://problem/7182275>.
+
+ Make sure that the newly created scrollbar's style is up to date.
+
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::~PopupMenu):
+ Call setParent so that the scrollbar's parts are torn down correctly.
+
+ (WebCore::PopupMenu::show):
+ Call styleChanged.
+
+2009-09-11 Jon Honeycutt <jhoneycutt@apple.com>
+
+ <rdar://problem/7197644> WebKit should broadcast an MSAA event when
+ jumping to a named anchor
+
+ https://bugs.webkit.org/show_bug.cgi?id=28899
+
+ Reviewed by Adam Roben.
+
+ * accessibility/AXObjectCache.h:
+ (WebCore::AXObjectCache::):
+ Added declaration for handleScrolledToAnchor(). Added a new entry to
+ the enum of accessibility notifications.
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::firstAccessibleObjectFromNode):
+ Code moved from AccessibilityRenderObject::internalLinkElement() and
+ refactored slightly; walks the tree until it finds a Node (with a
+ renderer) whose accessibility is not ignored.
+
+ * accessibility/AccessibilityObject.h:
+ Added a declaration for firstAccessibleObjectFromNode().
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::internalLinkElement):
+ Code moved to AccessibilityObject::firstAccessibleObjectFromNode().
+
+ * accessibility/chromium/AXObjectCacheChromium.cpp:
+ (WebCore::AXObjectCache::handleScrolledToAnchor):
+ Stubbed.
+
+ * accessibility/gtk/AXObjectCacheAtk.cpp:
+ (WebCore::AXObjectCache::handleScrolledToAnchor):
+ Stubbed.
+
+ * accessibility/mac/AXObjectCacheMac.mm:
+ (WebCore::AXObjectCache::postPlatformNotification):
+ Add a default case that returns early for notifications that Mac
+ doesn't handle.
+ (WebCore::AXObjectCache::handleScrolledToAnchor):
+ Stubbed.
+
+ * accessibility/win/AXObjectCacheWin.cpp:
+ (WebCore::AXObjectCache::handleScrolledToAnchor):
+ Post an AXScrolledToAnchor notification for the first accessible from
+ the anchor Node.
+ (WebCore::AXObjectCache::postPlatformNotification):
+ If the notification is AXFocusedUIElementChanged, fire an
+ EVENT_OBJECT_FOCUS. If the notification is AXScrolledToAnchor, fire
+ EVENT_SYSTEM_SCROLLINGSTART, matching Firefox.
+ (WebCore::AXObjectCache::handleFocusedUIElementChanged):
+ Code moved to postPlatformNotification().
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::scrollToAnchor):
+ Call AXObjectCache::handleScrolledToAnchor().
+
+2009-09-14 Anthony Ricaud <rik@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Cookies are not inspectable after reloading a page
+ https://bugs.webkit.org/show_bug.cgi?id=29222
+
+ Create the cookieTreeElement on initialization instead of when the view is shown.
+ Reset the selected element of the sidebar on reset.
+
+ * inspector/front-end/StoragePanel.js:
+ (WebInspector.StoragePanel):
+ (WebInspector.StoragePanel.prototype.show):
+ (WebInspector.StoragePanel.prototype.reset):
+
+
+2009-09-14 Brady Eidson <beidson@apple.com>
+
+ Windows build fix.
+
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
+ (WebCore::ResourceHandle::receivedCredential):
+ (WebCore::WebCoreSynchronousLoader::didReceiveChallenge):
+ (WebCore::WebCoreSynchronousLoader::load):
+
+2009-09-14 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Safari 4 cannot be used to update firmware on Linksys routers.
+ <rdar://problem/7174050> and https://bugs.webkit.org/show_bug.cgi?id=29160
+
+ In http://trac.webkit.org/changeset/42483, we disabled CFNetwork's session credential storage and
+ implemented our own in WebCore.
+
+ One feature we lost is that CFNetwork would automatically send previously authenticated credentials
+ with new connections when the paths match, as allowed by RFC 2617 for HTTP Basic and Digest Authentication.
+
+ Even though it's optional for User Agents to do this, (some?) Linksys routers rely on this behavior for
+ HTTP Basic Authentication. So now WebCore's CredentialStorage will track URL paths for Basic credentials.
+
+ We're not making this enhancement for Digest at this time, since we don't know of anything that broke
+ due to the change in Digest behavior.
+
+ Test: http/tests/loading/basic-credentials-sent-automatically.html
+ http/tests/loading/basic-auth-resend-wrong-credentials.html
+
+ * WebCore.base.exp:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+
+ * platform/network/Credential.cpp:
+ (WebCore::Credential::isEmpty):
+ * platform/network/Credential.h:
+
+ Add a slightly more full featured CredentialStore that will track URL paths a credential belongs to:
+ * platform/network/CredentialStorage.cpp: Added.
+ (WebCore::protectionSpaceToCredentialMap):
+ (WebCore::originToDefaultCredentialMap):
+ (WebCore::originStringFromURL):
+ (WebCore::CredentialStorage::set):
+ (WebCore::CredentialStorage::get):
+ (WebCore::CredentialStorage::getDefaultAuthenticationCredential):
+ * platform/network/CredentialStorage.h: Added.
+
+ Allow ProtectionSpace to be a hash key:
+ * platform/network/ProtectionSpace.cpp:
+ (WebCore::ProtectionSpace::ProtectionSpace):
+ * platform/network/ProtectionSpace.h:
+ (WebCore::ProtectionSpace::ProtectionSpace):
+ (WebCore::ProtectionSpace::isHashTableDeletedValue):
+ * platform/network/ProtectionSpaceHash.h: Added.
+ (WebCore::ProtectionSpaceHash::hash):
+ (WebCore::ProtectionSpaceHash::equal):
+
+ Allow ResourceHandles to remember the initial credential they used:
+ * platform/network/ResourceHandleInternal.h:
+
+ Allow mutable ResourceRequests to update their platform object if HTTP header fields change:
+ * platform/network/ResourceRequestBase.cpp:
+ (WebCore::ResourceRequestBase::addHTTPHeaderField):
+
+ Remove WebCoreCredentialStorage:
+ * platform/network/cf/AuthenticationCF.cpp:
+ * platform/network/cf/AuthenticationCF.h:
+ * platform/network/mac/AuthenticationMac.h:
+ * platform/network/mac/AuthenticationMac.mm:
+
+ Change ResourceHandleCFNet to try to use stored credentials on new connections, if appropriate:
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::ResourceHandle::start):
+ (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Only try the ProtectionSpace key'ed
+ Credential if it does not match the initially used Credential.
+ (WebCore::ResourceHandle::receivedCredential):
+ (WebCore::WebCoreSynchronousLoader::didReceiveChallenge): Only try the ProtectionSpace key'ed
+ Credential if it does not match the initially used Credential.
+ (WebCore::WebCoreSynchronousLoader::load):
+
+ Change ResourceHandleMac to try to use stored credentials on new connections, if appropriate:
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::start):
+ (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Only try the ProtectionSpace key'ed
+ Credential if it does not match the initially used Credential.
+ (WebCore::ResourceHandle::receivedCredential):
+ (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Only try the
+ ProtectionSpace key'ed Credential if it does not match the initially used Credential.
+ (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]):
+
+ Add base64-ability to CString:
+ * platform/text/CString.cpp:
+ (WebCore::CStringBuffer::base64Encode):
+ (WebCore::CString::base64Encode):
+ * platform/text/CString.h:
+ (WebCore::CStringBuffer::create):
+ (WebCore::CStringBuffer::CStringBuffer):
+
+2009-09-12 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix <rdar://problem/6954546> Crashes in WebCore::RenderPart::setWidget below FrameLoader::loadPlugin.
+
+ The calls to FrameLoader::requestObject within RenderPartObject::updateWidget can result in a plug-in
+ being initialized. This can run cause arbitrary JavaScript to run and may result in the RenderPartObject
+ being detached from the render tree and destroyed, causing a crash like <rdar://problem/6954546>.
+
+ No test is possible until <rdar://problem/7090444> is fixed.
+
+ * rendering/RenderPartObject.cpp:
+ (WebCore::RenderPartObject::updateWidget): Ensure that we stay alive for the duration of plug-in initialization.
+
+2009-09-12 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add RenderWidgetProtector to simplify protecting a RenderWidget from destruction for the
+ duration of a function. Deploy it within RenderWidget.
+
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::setWidgetGeometry):
+ (WebCore::RenderWidget::updateWidgetPosition): Use a RefPtr rather than explicitly
+ ref'ing and deref'ing the node.
+ * rendering/RenderWidget.h:
+ * rendering/RenderWidgetProtector.h:
+ (WebCore::RenderWidgetProtector::RenderWidgetProtector):
+ (WebCore::RenderWidgetProtector::~RenderWidgetProtector):
+
+2009-09-14 Cameron McCormack <cam@mcc.id.au>
+
+ Reviewed by Eric Seidel.
+
+ CodeGenerator.pm needs some cleaning up
+ https://bugs.webkit.org/show_bug.cgi?id=29238
+
+ * bindings/scripts/CodeGenerator.pm:
+ (FindParentsRecursively): Removed; its functionality is now handled in
+ AddMethodsConstantsAndAttributesFromParentClasses.
+ (ForAllParents): New function that visits an interface's ancestors and
+ invokes a callback for each one.
+ (AddMethodsConstantsAndAttributesFromParentClasses): Simplified by using
+ ForAllParents.
+ (GetMethodsAndAttributesFromParentClasses): Ditto.
+ (IDLFileForInterface): Factored out previous calls to ScanDirectory into
+ this new function, which returns the filename containing a given IDL
+ interface definition.
+ (ParseInterface): Simplified by using IDLFileForInterface.
+ (ScanDirectory): Removed in lieu of IDLFileForInterface.
+ * bindings/scripts/CodeGeneratorV8.pm: Drop call to
+ FindParentsRecursively and get the list of parents from the
+ AddMethodsConstantsAndAttributesFromParentClasses call instead.
+
+2009-09-14 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Assert hit when dropping a file in QtLauncher
+ https://bugs.webkit.org/show_bug.cgi?id=29242
+
+ Qt's implementation of DropData::asURL does not return a URL encoded string
+ as expected.
+
+ * platform/qt/DragDataQt.cpp:
+ (WebCore::DragData::asURL):
+
+2009-09-13 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix, file was missed during TLS.cpp removal.
+
+ * page/wx/FrameWx.cpp: Added.
+ (WebCore::Frame::dragImageForSelection):
+
+2009-09-13 Anthony Ricaud <rik@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ Web Inspector: Add "New Style Rule" to the localizedStrings
+ https://bugs.webkit.org/show_bug.cgi?id=29237
+
+ * English.lproj/localizedStrings.js:
+
+2009-09-13 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ [wx] Implement filesystem functions.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29196
+
+ * platform/wx/FileSystemWx.cpp:
+ (WebCore::fileExists):
+ (WebCore::deleteFile):
+ (WebCore::deleteEmptyDirectory):
+ (WebCore::getFileSize):
+ (WebCore::getFileModificationTime):
+ (WebCore::makeAllDirectories):
+ (WebCore::pathByAppendingComponent):
+ (WebCore::homeDirectoryPath):
+ (WebCore::directoryName):
+
+2009-09-12 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fixes for wx 2.9.
+
+ * platform/wx/ScrollbarThemeWx.cpp:
+ * platform/wx/wxcode/gtk/scrollbar_render.cpp:
+ (wxGetGdkWindowForDC):
+
+2009-09-12 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ [ES5] Implement Object.keys
+ https://bugs.webkit.org/show_bug.cgi?id=29170
+
+ Switch from getPropertyNames to getOwnPropertyNames, and provide custom
+ getPropertyNames to DOMWindow, DOMWindowShell and QuarantinedObjectWrapper
+ in order to ensure correct semantics are maintained.
+
+ Test: fast/js/Object-keys.html
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::getOwnPropertyNames):
+ * bindings/js/JSDOMWindowShell.cpp:
+ (WebCore::JSDOMWindowShell::getOwnPropertyNames):
+ * bindings/js/JSDOMWindowShell.h:
+ * bindings/js/JSHistoryCustom.cpp:
+ (WebCore::JSHistory::getOwnPropertyNames):
+ * bindings/js/JSLocationCustom.cpp:
+ (WebCore::JSLocation::getOwnPropertyNames):
+ * bindings/js/JSQuarantinedObjectWrapper.cpp:
+ (WebCore::JSQuarantinedObjectWrapper::getPropertyNames):
+ (WebCore::JSQuarantinedObjectWrapper::getOwnPropertyNames):
+ * bindings/js/JSQuarantinedObjectWrapper.h:
+ * bindings/js/JSStorageCustom.cpp:
+ (WebCore::JSStorage::getOwnPropertyNames):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bridge/runtime_object.cpp:
+ (JSC::RuntimeObjectImp::getPropertyNames):
+ (JSC::RuntimeObjectImp::getOwnPropertyNames):
+ * bridge/runtime_object.h:
+
+2009-09-12 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=29219
+ Document.elementFromPoint() should take page scroll into consideration
+
+ Test: fast/dom/elementFromPoint-relative-to-viewport.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::elementFromPoint):
+ (WebCore::Document::caretRangeFromPoint):
+
+2009-09-12 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=29217
+ Document.caretRangeFromPoint should take the scroll offset into account before hit testing
+
+ In accordance with the CSSOM View Module spec, Document.caretRangeFromPoint should interpret
+ the point passed to it as relative to the viewport, not the document.
+
+ Test: fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::caretRangeFromPoint):
+
+2009-09-11 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Added some manual tests to show WebGL in action
+ https://bugs.webkit.org/show_bug.cgi?id=29215
+
+ * manual-tests/webgl: Added.
+ * manual-tests/webgl/Earth.html: Added.
+ * manual-tests/webgl/ManyPlanetsDeep.html: Added.
+ * manual-tests/webgl/SpinningBox.html: Added.
+ * manual-tests/webgl/TeapotPerPixel.html: Added.
+ * manual-tests/webgl/TeapotPerVertex.html: Added.
+ * manual-tests/webgl/resources: Added.
+ * manual-tests/webgl/resources/CanvasMatrix.js: Added.
+ * manual-tests/webgl/resources/earthmap1k.jpg: Added.
+ * manual-tests/webgl/resources/mars500x250.png: Added.
+ * manual-tests/webgl/resources/teapot.obj: Added.
+ * manual-tests/webgl/resources/utils3d.js: Added.
+
+2009-09-10 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ aria definition role spelled wrong "defintion"
+ https://bugs.webkit.org/show_bug.cgi?id=28840
+
+ Test: accessibility/aria-slider-value-change.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::RoleEntry::):
+
+2009-09-11 Erik Arvidsson <arv@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fixes an assert in Node::isFocusable which was causing crashes in certain cases.
+ https://bugs.webkit.org/show_bug.cgi?id=29210
+
+ * dom/Node.cpp:
+ (WebCore::Node::isFocusable):
+
+2009-09-11 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Added variants to uniform* and vertexAttrib* calls which take sequence<> in place of CanvasArray
+ https://bugs.webkit.org/show_bug.cgi?id=29139
+
+ I also added a data() call to each of the CanvasArray subclasses to give back a types pointer
+ to the baseAddress().
+
+ * Configurations/FeatureDefines.xcconfig:
+ * bindings/js/JSCanvasRenderingContext3DCustom.cpp:
+ (WebCore::toArray):
+ (WebCore::):
+ (WebCore::dataFunctionf):
+ (WebCore::dataFunctioni):
+ (WebCore::dataFunctionMatrix):
+ (WebCore::JSCanvasRenderingContext3D::uniform1fv):
+ (WebCore::JSCanvasRenderingContext3D::uniform1iv):
+ (WebCore::JSCanvasRenderingContext3D::uniform2fv):
+ (WebCore::JSCanvasRenderingContext3D::uniform2iv):
+ (WebCore::JSCanvasRenderingContext3D::uniform3fv):
+ (WebCore::JSCanvasRenderingContext3D::uniform3iv):
+ (WebCore::JSCanvasRenderingContext3D::uniform4fv):
+ (WebCore::JSCanvasRenderingContext3D::uniform4iv):
+ (WebCore::JSCanvasRenderingContext3D::uniformMatrix2fv):
+ (WebCore::JSCanvasRenderingContext3D::uniformMatrix3fv):
+ (WebCore::JSCanvasRenderingContext3D::uniformMatrix4fv):
+ (WebCore::JSCanvasRenderingContext3D::vertexAttrib1fv):
+ (WebCore::JSCanvasRenderingContext3D::vertexAttrib2fv):
+ (WebCore::JSCanvasRenderingContext3D::vertexAttrib3fv):
+ (WebCore::JSCanvasRenderingContext3D::vertexAttrib4fv):
+ * html/canvas/CanvasByteArray.h:
+ (WebCore::CanvasByteArray::data):
+ * html/canvas/CanvasFloatArray.h:
+ (WebCore::CanvasFloatArray::data):
+ * html/canvas/CanvasIntArray.h:
+ (WebCore::CanvasIntArray::data):
+ * html/canvas/CanvasRenderingContext3D.cpp:
+ (WebCore::CanvasRenderingContext3D::uniform1fv):
+ (WebCore::CanvasRenderingContext3D::uniform1iv):
+ (WebCore::CanvasRenderingContext3D::uniform2fv):
+ (WebCore::CanvasRenderingContext3D::uniform2iv):
+ (WebCore::CanvasRenderingContext3D::uniform3fv):
+ (WebCore::CanvasRenderingContext3D::uniform3iv):
+ (WebCore::CanvasRenderingContext3D::uniform4fv):
+ (WebCore::CanvasRenderingContext3D::uniform4iv):
+ (WebCore::CanvasRenderingContext3D::uniformMatrix2fv):
+ (WebCore::CanvasRenderingContext3D::uniformMatrix3fv):
+ (WebCore::CanvasRenderingContext3D::uniformMatrix4fv):
+ (WebCore::CanvasRenderingContext3D::vertexAttrib1fv):
+ (WebCore::CanvasRenderingContext3D::vertexAttrib2fv):
+ (WebCore::CanvasRenderingContext3D::vertexAttrib3fv):
+ (WebCore::CanvasRenderingContext3D::vertexAttrib4fv):
+ * html/canvas/CanvasRenderingContext3D.h:
+ * html/canvas/CanvasRenderingContext3D.idl:
+ * html/canvas/CanvasShortArray.h:
+ (WebCore::CanvasShortArray::data):
+ * html/canvas/CanvasUnsignedByteArray.h:
+ (WebCore::CanvasUnsignedByteArray::data):
+ * html/canvas/CanvasUnsignedIntArray.h:
+ (WebCore::CanvasUnsignedIntArray::data):
+ * html/canvas/CanvasUnsignedShortArray.h:
+ (WebCore::CanvasUnsignedShortArray::data):
+ * platform/graphics/GraphicsContext3D.h:
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::uniform1fv):
+ (WebCore::GraphicsContext3D::uniform2fv):
+ (WebCore::GraphicsContext3D::uniform3fv):
+ (WebCore::GraphicsContext3D::uniform4fv):
+ (WebCore::GraphicsContext3D::uniform1iv):
+ (WebCore::GraphicsContext3D::uniform2iv):
+ (WebCore::GraphicsContext3D::uniform3iv):
+ (WebCore::GraphicsContext3D::uniform4iv):
+ (WebCore::GraphicsContext3D::uniformMatrix2fv):
+ (WebCore::GraphicsContext3D::uniformMatrix3fv):
+ (WebCore::GraphicsContext3D::uniformMatrix4fv):
+ (WebCore::GraphicsContext3D::vertexAttrib1fv):
+ (WebCore::GraphicsContext3D::vertexAttrib2fv):
+ (WebCore::GraphicsContext3D::vertexAttrib3fv):
+ (WebCore::GraphicsContext3D::vertexAttrib4fv):
+
+2009-09-11 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Add ENABLE(WEB_SOCKETS) guards.
+ https://bugs.webkit.org/show_bug.cgi?id=29174
+
+ * bindings/v8/custom/V8WebSocketCustom.cpp:
+
+2009-09-11 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r48229.
+ http://trac.webkit.org/changeset/48229
+
+ * WebCore.base.exp:
+ * dom/Clipboard.cpp:
+ (WebCore::Clipboard::Clipboard):
+ (WebCore::Clipboard::sourceOperation):
+ * page/DragController.cpp:
+ (WebCore::DragController::DragController):
+ (WebCore::DragController::dragExited):
+ (WebCore::DragController::performDrag):
+ (WebCore::DragController::dragEnteredOrUpdated):
+ (WebCore::DragController::tryDHTMLDrag):
+ (WebCore::DragController::startDrag):
+ * page/DragController.h:
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::updateDragAndDrop):
+ (WebCore::EventHandler::dragSourceMovedTo):
+ (WebCore::EventHandler::handleDrag):
+ * page/EventHandler.h:
+
+2009-09-11 Michelangelo De Simone <micdesim@gmail.com>
+
+ Fix the build.
+
+ * html/ValidityState.cpp:
+ (WebCore::ValidityState::typeMismatch):
+
+2009-09-11 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by Antti Koivisto.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27456
+ Added support for static validation of url in
+ ValidityState, for url state inputs.
+ From HTML5 specs:
+ http://www.whatwg.org/specs/web-apps/current-work/#url-state
+
+ Test: fast/forms/ValidityState-typeMismatch-url.html
+
+ * html/ValidityState.cpp:
+ (WebCore::ValidityState::typeMismatch):
+
+2009-09-11 Evan Stade <estade@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Revert r47992: Expose functions to change the focus ring color for
+ Linux Chromium.
+
+ As Darin Fisher has pointed out, there is a better way to do this.
+
+ * rendering/RenderThemeChromiumLinux.cpp:
+ (WebCore::RenderThemeChromiumLinux::RenderThemeChromiumLinux):
+ * rendering/RenderThemeChromiumLinux.h:
+
+2009-09-11 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29207
+ Add checks for using WebCore JS context on secondary threads
+
+ * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::commonJSGlobalData):
+ Set the new debug-only mainThreadOnly flag.
+
+2009-09-11 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ The inspector should have scope bars.
+ https://bugs.webkit.org/show_bug.cgi?id=14353
+
+ Add scope bars to the console, so the user can choose which category
+ of messages they want to see (All, Errors, Warnings, Logs), and they
+ can choose from one or more of {Errors, Warnings, Logs}.
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.createFilterElement):
+ (WebInspector.ConsoleView):
+ (WebInspector.ConsoleView.prototype._updateFilter):
+ (WebInspector.ConsoleView.prototype.filter):
+ (WebInspector.ConsoleView.prototype.attach):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.html:
+
+2009-09-11 Yusuke Sato <yusukes@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Complex text doesn't show up with text stroking
+ https://bugs.webkit.org/show_bug.cgi?id=28707
+
+ Added extra NULL checks for HDC. This is the second fix for issue 28707,
+ and the fix is similar to http://trac.webkit.org/changeset/45482.
+
+ * platform/graphics/chromium/FontChromiumWin.cpp:
+ (WebCore::Font::drawComplexText):
+ * platform/graphics/chromium/UniscribeHelper.cpp:
+ (WebCore::UniscribeHelper::draw):
+
+2009-09-11 Cameron McCormack <cam@mcc.id.au>
+
+ Reviewed by Eric Seidel.
+
+ Make ElementTimeControl methods return void and not throw.
+ https://bugs.webkit.org/show_bug.cgi?id=28831
+
+ SVG 1.1 erratum:
+ http://www.w3.org/2003/01/REC-SVG11-20030114-errata#elementtimecontrol-interface
+
+ Test: svg/dom/smil-methods.svg
+
+ * svg/ElementTimeControl.h: Change return type from bool to void and remove exception argument.
+ * svg/ElementTimeControl.idl: Change return type from bool to void and remove raises claus.
+ * svg/SVGAnimationElement.cpp:
+ (WebCore::SVGAnimationElement::beginElement): Change return type from bool to void and remove exception argument.
+ (WebCore::SVGAnimationElement::beginElementAt): Ditto.
+ (WebCore::SVGAnimationElement::endElement): Ditto.
+ (WebCore::SVGAnimationElement::endElementAt): Ditto.
+ * svg/SVGAnimationElement.h: Ditto.
+
+2009-09-11 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Added support for texImage2D which takes CanvasArray
+ https://bugs.webkit.org/show_bug.cgi?id=29191
+
+ * bindings/js/JSCanvasRenderingContext3DCustom.cpp:
+ (WebCore::JSCanvasRenderingContext3D::texImage2D):
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::texImage2D):
+
+2009-09-11 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Allow WebKit clients to opt out of high resolution timers on Windows.
+ https://bugs.webkit.org/show_bug.cgi?id=29192
+
+ * page/Settings.cpp:
+ (WebCore::Settings::setShouldUseHighResolutionTimers): Added.
+ * page/Settings.h: Added getter/setter for shouldUseHighResolutionTimers.
+ (WebCore::Settings::shouldUseHighResolutionTimers): Added.
+ * platform/win/SharedTimerWin.cpp:
+ (WebCore::setSharedTimerFireTime): Don't run high resolution timer code if it is disabled.
+
+2009-09-11 Christian Plesner Hansen <christian.plesner.hansen@gmail.com>
+
+ Reviewed by Adam Barth.
+
+ [v8] Share persistent context handles between events
+ Change events to use a single ref-counted shared persistent handle
+ to the context in which to run, rather than create a new
+ persistent handle for each new event which puts pressure on the
+ gc.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29077
+
+ * bindings/v8/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::execute):
+ * bindings/v8/SharedPersistent.h: Added.
+ (WebCore::SharedPersistent::set):
+ (WebCore::SharedPersistent::get):
+ (WebCore::SharedPersistent::disposeHandle):
+ (WebCore::SharedPersistent::create):
+ (WebCore::SharedPersistent::SharedPersistent):
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::V8AbstractEventListener):
+ (WebCore::V8AbstractEventListener::handleEvent):
+ * bindings/v8/V8AbstractEventListener.h:
+ * bindings/v8/V8IsolatedWorld.cpp:
+ (WebCore::V8IsolatedWorld::V8IsolatedWorld):
+ (WebCore::V8IsolatedWorld::~V8IsolatedWorld):
+ * bindings/v8/V8IsolatedWorld.h:
+ (WebCore::V8IsolatedWorld::context):
+ (WebCore::V8IsolatedWorld::shared_context):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluateInNewContext):
+ (WebCore::V8Proxy::createWrapperFromCacheSlowCase):
+ (WebCore::V8Proxy::isContextInitialized):
+ (WebCore::V8Proxy::updateDocumentWrapperCache):
+ (WebCore::V8Proxy::clearDocumentWrapperCache):
+ (WebCore::V8Proxy::disposeContextHandles):
+ (WebCore::V8Proxy::clearForClose):
+ (WebCore::V8Proxy::clearForNavigation):
+ (WebCore::V8Proxy::setSecurityToken):
+ (WebCore::V8Proxy::updateDocument):
+ (WebCore::V8Proxy::initContextIfNeeded):
+ (WebCore::V8Proxy::shared_context):
+ (WebCore::V8Proxy::mainWorldContext):
+ (WebCore::V8Proxy::setContextDebugId):
+ * bindings/v8/V8Proxy.h:
+ (WebCore::V8Proxy::V8Proxy):
+ (WebCore::V8Proxy::context):
+ (WebCore::V8Proxy::shared_context):
+
+2009-09-11 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by David Levin.
+
+ Create a real handle (one which would save an object from GC).
+ https://bugs.webkit.org/show_bug.cgi?id=29150
+
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::v8ExternalString):
+
+2009-09-11 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by David Levin.
+
+ Inline WebCore::v8String as it only invokes WebCore::v8ExternalString.
+ https://bugs.webkit.org/show_bug.cgi?id=29152
+
+ * bindings/v8/V8Binding.cpp:
+ * bindings/v8/V8Binding.h:
+ (WebCore::v8String):
+
+2009-09-11 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Changed URLs from qtsoftware.com to qt.nokia.com, as part of a general
+ renaming.
+
+ * ChangeLog-2009-06-16:
+
+2009-09-11 Thiago Macieira <thiago.macieira@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Use LIBS_PRIVATE on Qt/Mac.
+
+ On the Mac, it means "-framework ApplicationServices -framework Carbon
+ -framework AppKit" are no longer part of the default LIBS in Qt
+ applications. This required a lot of fixes where we used Mac-specific
+ code in Qt.
+
+ * WebCore.pro:
+
+2009-09-11 Cameron McCormack <cam@mcc.id.au>
+
+ Reviewed by Eric Seidel.
+
+ Remove duplicated WK_{u,l}cfirst subs from CodeGeneratorV8.pm
+ https://bugs.webkit.org/show_bug.cgi?id=29165
+
+ * bindings/scripts/CodeGeneratorV8.pm: Remove WK_ucfirst and
+ WK_lcfirst, and call the ones in CodeGenerator.pm instead.
+
+2009-09-11 Yongjun Zhang <yongjun.zhang@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29132
+ Symbian winscw compiler fails compiling WebCore/text/RegularExpression.cpp.
+
+ Add RegularExpression class qualifier before Private.
+
+ * platform/text/RegularExpression.cpp:
+
+2009-09-11 Yongjun Zhang <yongjun.zhang@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29131
+ Use a different variadic macro format for Symbian compiler.
+
+ Use arg... instead of ellipsis in variadic macro.
+
+ * platform/StaticConstructors.h:
+
+2009-09-11 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28806
+
+ [Qt] Make the WebInspector available as a QWidget.
+
+ * WebCore.pro:
+
+2009-09-11 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Unreviewed fix for the Web Inspector with the Qt build.
+
+ Re-generate the Qt resource file by running
+ WebKitTools/Scripts/generate-qt-inspector-resource
+
+ * inspector/front-end/WebKit.qrc:
+
+2009-09-11 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Fix the Qt build, remove stray semicolon from function definition.
+
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
+ (WebCore::MediaPlayerPrivate::buffered):
+
+2009-09-10 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ Detect mixed content
+ https://bugs.webkit.org/show_bug.cgi?id=29003
+
+ Detect some basic kinds of mixed content (HTTP content loaded into an
+ HTTPS context). This new detection logic isn't perfect, but it's a
+ place to start.
+
+ Tests: http/tests/security/mixedContent/about-blank-iframe-in-main-frame.html
+ http/tests/security/mixedContent/data-url-iframe-in-main-frame.html
+ http/tests/security/mixedContent/data-url-script-in-iframe.html
+ http/tests/security/mixedContent/insecure-css-in-iframe.html
+ http/tests/security/mixedContent/insecure-css-in-main-frame.html
+ http/tests/security/mixedContent/insecure-iframe-in-iframe.html
+ http/tests/security/mixedContent/insecure-iframe-in-main-frame.html
+ http/tests/security/mixedContent/insecure-image-in-iframe.html
+ http/tests/security/mixedContent/insecure-image-in-main-frame.html
+ http/tests/security/mixedContent/insecure-script-in-iframe.html
+ http/tests/security/mixedContent/redirect-http-to-https-iframe-in-main-frame.html
+ http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe.html
+ http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame.html
+ http/tests/security/mixedContent/redirect-https-to-http-script-in-iframe.html
+
+ * loader/DocLoader.cpp:
+ (WebCore::DocLoader::canRequest):
+ (WebCore::DocLoader::requestResource):
+ (WebCore::DocLoader::checkCacheObjectStatus):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::isMixedContent):
+ (WebCore::FrameLoader::checkIfDisplayInsecureContent):
+ (WebCore::FrameLoader::checkIfRunInsecureContent):
+ * loader/FrameLoader.h:
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::willSendRequest):
+
+2009-09-10 Mark Rowe <mrowe@apple.com>
+
+ Fix the Windows build.
+
+ Restore platform/mock to the header search path after it was removed in r48270.
+
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+
+2009-09-08 Timothy Hatcher <timothy@apple.com>
+
+ Web Inspector: Move the option to create a new style rule under the Styles' gear menu.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29039
+
+ Reviewed by Sam Weinig.
+
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylesSidebarPane): Add "New Style Rule" option to the gear menu.
+ (WebInspector.StylesSidebarPane.prototype._update): Check instanceof BlankStylePropertiesSection instead.
+ (WebInspector.StylesSidebarPane.prototype._changeSetting): Added. Keeps the color format setting selected
+ while calling the correct action.
+ (WebInspector.StylesSidebarPane.prototype._createNewRule): Creates a new section and edits the selector.
+ (WebInspector.StylesSidebarPane.prototype.addBlankSection): Insert the section in a cleaner way.
+ (WebInspector.StylesSidebarPane.prototype.removeSection): Added. Removes the passed in section.
+ (WebInspector.StylesSidebarPane.prototype.appropriateSelectorForNode): Return an empty string if there is no node.
+ (WebInspector.StylePropertiesSection.prototype.expand): Removed the check for _blank.
+ (WebInspector.StylePropertiesSection.prototype.startEditingSelector): No need for the context, the original selector
+ is remembered by the editing code.
+ (WebInspector.StylePropertiesSection.prototype.editingSelectorCancelled): Do nothing. The original text is already
+ restored by the editing code.
+ (WebInspector.BlankStylePropertiesSection): Call the StylePropertiesSection constructor with appropriate data.
+ Remove event listener code.
+ (WebInspector.BlankStylePropertiesSection.prototype.expand): Added. Does nothing to prevent expanding.
+ (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted.callback): Correctly construct the
+ WebInspector.CSSStyleDeclaration. Call editingSelectorCancelled instead of editingCancelled.
+ (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted): Renamed from editingCommitted to
+ override the base class.
+ (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCancelled): Remove the section.
+ (WebInspector.BlankStylePropertiesSection.prototype.makeNormal): Removed event listener code. Removed the delete lines
+ since they were doing nothing (deleting nonexistent properties that exist only on the prototype.) Change prototypes at
+ the end to correctly swtich to a real StylePropertiesSection.
+ * inspector/front-end/inspector.js:
+ (WebInspector.startEditing.editingCancelled): Ceck for null/undefined callbacks.
+ (WebInspector.startEditing.editingCommitted): Ditto.
+
+2009-09-10 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Fix comparison between signed and unsigned integer warnings
+ https://bugs.webkit.org/show_bug.cgi?id=29162
+
+ No functional change.
+
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::findMethodIndex):
+ * platform/MIMETypeRegistry.cpp:
+ (WebCore::initializeSupportedImageMIMETypes):
+ (WebCore::initializeSupportedImageMIMETypesForEncoding):
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::drawFocusRing):
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::duration):
+ (WebCore::ImageDecoderQt::imageAtIndex):
+ * plugins/qt/PluginPackageQt.cpp:
+ (WebCore::PluginPackage::fetchInfo):
+
+2009-09-10 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Build fix for GTKafter r48267.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::buffered):
+
+2009-09-08 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Remove unneeded define for ActiveX.
+ https://bugs.webkit.org/show_bug.cgi?id=29054
+
+ * rendering/RenderPartObject.cpp:
+ (WebCore::createClassIdToTypeMap):
+ (WebCore::serviceTypeForClassId):
+ (WebCore::RenderPartObject::updateWidget):
+
+2009-09-10 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Sam Weinig.
+
+ Don't copy IDL files in to the built framework.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-09-10 Xiaomei Ji <xji@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Implment Range.expand().
+ https://bugs.webkit.org/show_bug.cgi?id=27632
+
+ Test: fast/dom/Range/range-expand.html
+
+ * dom/Range.cpp:
+ (WebCore::Range::expand):
+ * dom/Range.h:
+ * dom/Range.idl:
+
+2009-09-10 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ WebSocket API implementation.
+ https://bugs.webkit.org/show_bug.cgi?id=28038
+
+ Add build systems for GNUmakefile.am, WebCore.xcodeproj and
+ WebCore.vcproj.
+ Add websockets directory and WebSocket.idl in qt build system.
+ Tests will be landed once the code is completed and functional.
+
+ * DerivedSources.cpp:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::webSocket):
+ * bindings/js/JSEventTarget.cpp:
+ (WebCore::toJS):
+ (WebCore::toEventTarget):
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::toWebSocket):
+ * dom/EventTarget.h:
+ * page/DOMWindow.idl:
+ * websockets/WebSocket.cpp:
+ (WebCore::ProcessWebSocketEventTask::create):
+ (WebCore::ProcessWebSocketEventTask::performTask):
+ (WebCore::ProcessWebSocketEventTask::ProcessWebSocketEventTask):
+ (WebCore::isValidProtocolString):
+ (WebCore::WebSocket::connect):
+ (WebCore::WebSocket::send):
+ (WebCore::WebSocket::close):
+ (WebCore::WebSocket::bufferedAmount):
+ (WebCore::WebSocket::addEventListener):
+ (WebCore::WebSocket::removeEventListener):
+ (WebCore::WebSocket::dispatchEvent):
+ (WebCore::WebSocket::didConnect):
+ (WebCore::WebSocket::didReceiveMessage):
+ (WebCore::WebSocket::didClose):
+ (WebCore::WebSocket::dispatchOpenEvent):
+ (WebCore::WebSocket::dispatchMessageEvent):
+ (WebCore::WebSocket::dispatchCloseEvent):
+ * websockets/WebSocket.h:
+ (WebCore::WebSocket::create):
+ (WebCore::WebSocket::):
+ (WebCore::WebSocket::setOnopen):
+ (WebCore::WebSocket::onopen):
+ (WebCore::WebSocket::setOnmessage):
+ (WebCore::WebSocket::onmessage):
+ (WebCore::WebSocket::setOnclose):
+ (WebCore::WebSocket::onclose):
+ (WebCore::WebSocket::toWebSocket):
+ (WebCore::WebSocket::eventListeners):
+ (WebCore::WebSocket::refEventTarget):
+ (WebCore::WebSocket::derefEventTarget):
+ * websockets/WebSocketChannel.cpp: Added.
+ * websockets/WebSocketChannel.h: Added.
+ * websockets/WebSocketChannelClient.h: Added.
+ * websockets/WebSocketHandshake.cpp: Added.
+ * websockets/WebSocketHandshake.h: Added.
+
+2009-09-10 Albert J. Wong <ajwong@chromium.org>
+
+ No review, windows build fix only.
+
+ Spurious semicolon causing parse error in chromium build on windows.
+
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+ (WebCore::MediaPlayerPrivate::buffered):
+
+2009-09-10 Albert J. Wong <ajwong@chromium.org>
+
+ No review, build fix only.
+
+ Adding in a missed include from the last patch that is breaking the
+ chromium build.
+
+ * rendering/RenderThemeChromiumMac.mm: include TimeRanges.h
+
+2009-09-10 Alpha Lam <hclam@chromium.org>
+
+ Reviewed by Eric Carlson.
+
+ HTMLMediaElement buffered attribute should report a list of time ranges
+ https://bugs.webkit.org/show_bug.cgi?id=29041
+
+ Changed MediaPlayerPrivateInterface and MediaPlayer's definition to
+ report a list of buffered time ranges as WebCore::TimeRanges. This
+ change also got rid of the maxTimeBuffered() method.
+
+ No new tests since this is a API change.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::percentLoaded):
+ Use MediaPlaier::buffered() instead of maxTimeBuffered().
+ (WebCore::HTMLMediaElement::buffered):
+ ditto.
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::NullMediaPlayerPrivate::buffered):
+ Use MediaPlayerPrivateInterface::buffered() instead of maxTimeBuffered().
+ (WebCore::MediaPlayer::buffered):
+ ditto.
+ * platform/graphics/MediaPlayer.h:
+ Removed maxTimeBuffered() and defines PassRefPtr<TimeRanges> buffered().
+ * platform/graphics/MediaPlayerPrivate.h:
+ ditto.
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ Implements PassRefPtr<TimeRanges> buffered();
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+ Removed maxTimeBuffered() and defines PassRefPtr<TimeRanges> buffered().
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ Removed maxTimeBuffered() and defines PassRefPtr<TimeRanges> buffered().
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::buffered):
+ Implementation of buffered().
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
+ Implements PassRefPtr<TimeRanegs> buffered().
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
+ Removed maxTimeBuffered() and defines PassRefPtr<TimeRanges> buffered().
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+ Implements PassRefPtr<TimeRanges> buffered().
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
+ Removed maxTimeBuffered() and defines PassRefPtr<TimeRanges> buffered().
+ * platform/graphics/wince/MediaPlayerPrivateWince.h:
+ ditto.
+ * rendering/RenderThemeChromiumMac.mm:
+ (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
+ Use buffered() instead of maxTimeBuffered().
+ * rendering/RenderThemeChromiumSkia.cpp:
+ ditto.
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintMediaSliderTrack):
+ ditto.
+
+2009-09-10 Cameron McCormack <cam@mcc.id.au>
+
+ Reviewed by Eric Seidel.
+
+ Make bindings generators more aware of IDL dependencies
+ https://bugs.webkit.org/show_bug.cgi?id=29114
+
+ Make the JS and ObjC bindings generators able to output dependency
+ rules for DerivedSources.make to consume. These rules make a given
+ generated binding class file header, JSWhatever.h, depend on Whatever's
+ ancestor interfaces.
+
+ * DerivedSources.make: Pass --write-dependencies to generate-bindings.pl
+ when generating JS and ObjC bindings. Include dependency fies that are
+ generated due to that.
+ * bindings/scripts/CodeGenerator.pm: Make
+ AddMethodsConstantsAndAttributesFromParentClasses accumulate a list of
+ the ancestor interfaces that were visited.
+ * bindings/scripts/CodeGeneratorJS.pm: Optionally write out a dependency
+ file.
+ * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
+ * bindings/scripts/generate-bindings.pl: Add a --write-dependencies
+ option.
+
+2009-09-10 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez and Dan Winship.
+
+ Give all requests to libsoup, to let it queue, and schedule them
+ itself, instead of throttling the number of requests in WebCore.
+
+ * platform/network/ResourceRequestBase.cpp:
+ * platform/network/soup/ResourceRequestSoup.cpp:
+ (WebCore::initializeMaximumHTTPConnectionCountPerHost):
+
+2009-09-10 Jian Li <jianli@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [V8] Make XMLHttpRequest.send handle File object.
+ https://bugs.webkit.org/show_bug.cgi?id=28924
+
+ Test: http/tests/local/send-dragged-file.html
+
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-09-10 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Use fastNew and fastDelete instead of operator new and delete for CSSSelector class.
+ https://bugs.webkit.org/show_bug.cgi?id=25930
+
+ Change using of operator new to fastNew and operator delete to
+ fastDeleteSkippingDestructor for CSSSelector class to avoid mismatched function call.
+
+ This change fixes valgrind's 'mismatched free' notification.
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::~CSSParser):
+ (WebCore::CSSParser::createFloatingSelector):
+ * css/CSSSelectorList.cpp:
+ (WebCore::CSSSelectorList::adoptSelectorVector):
+
+2009-09-10 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Adler.
+
+ Geolocation does not correctly handle reentrant calls from callbacks.
+ https://bugs.webkit.org/show_bug.cgi?id=29040
+
+ Tests: fast/dom/Geolocation/reentrant-error.html
+ fast/dom/Geolocation/reentrant-success.html
+
+ * page/Geolocation.cpp: Modified.
+ (WebCore::Geolocation::handleError): Modified. Call sendError directly, clearing notifier lists before making callback.
+ (WebCore::Geolocation::makeSuccessCallbacks): Modified. Call sendPosition directly, clearing notifier lists before making callback.
+ * page/Geolocation.h: Modified. Deleted sendErrorToXX and sendPositionToXXX methods.
+
+2009-09-10 Erik Arvidsson <arv@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fixes issue where focused elements did not get blur and focus events when the window was blurred and focused.
+ https://bugs.webkit.org/show_bug.cgi?id=27105
+
+ Test: fast/events/blur-focus-window-should-blur-focus-element.html
+
+ * page/FocusController.cpp:
+ (WebCore::dispatchEventsOnWindowAndFocusedNode):
+ (WebCore::FocusController::setFocused):
+ (WebCore::FocusController::setActive):
+
+2009-09-10 Adam Roben <aroben@apple.com>
+
+ Make the play/pause button in <video> controls indicate the button's
+ action, not the movie state
+
+ This matches the Mac behavior, iTunes, and many other media players.
+
+ No test possible.
+
+ Fixes <http://webkit.org/b/29126> Play/pause button in <video>
+ controls shows the wrong image
+
+ Reviewed by Eric Carlson.
+
+ * rendering/RenderMediaControls.cpp:
+ (WebCore::RenderMediaControls::paintMediaControlsPart): Reversed when
+ we show the play vs. pause artwork, so that the button reflects what
+ will happen when you click it, rather than the current state of the
+ movie.
+
+2009-09-09 Steve Block <steveblock@google.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Geolocation Coordinates::toString() prints bogus values for unspecified properties.
+ https://bugs.webkit.org/show_bug.cgi?id=29080
+
+ Test: fast/dom/Geolocation/position-string.html
+
+ * GNUmakefile.am: Modified. Removes Geoposition.cpp and Coordinates.cpp.
+ * WebCore.gypi: Modified. Removes Geoposition.cpp and Coordinates.cpp.
+ * WebCore.pro: Modified. Removes Geoposition.cpp and Coordinates.cpp.
+ * WebCore.vcproj/WebCore.vcproj: Modified. Removes Geoposition.cpp and Coordinates.cpp.
+ * WebCore.xcodeproj/project.pbxproj: Modified. Removes Geoposition.cpp and Coordinates.cpp.
+ * WebCoreSources.bkl: Modified. Removes Geoposition.cpp and Coordinates.cpp.
+ * page/Coordinates.cpp: Removed.
+ * page/Coordinates.h: Modified. Removes toString method.
+ * page/Coordinates.idl: Modified. Removes toString method.
+ * page/Geoposition.cpp: Removed.
+ * page/Geoposition.h: Modified. Removes toString method.
+ * page/Geoposition.idl: Modified. Removes toString method.
+
+2009-09-09 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ Correctly applies the Geolocation timeout property.
+ https://bugs.webkit.org/show_bug.cgi?id=27256
+
+ If a timeout is specified, the timer is started as soon as the location acquistion process starts.
+ If a position fix is not obtained within the timeout interval, the position request is cancelled
+ and the error callback (if specified) is invoked. If a position fix is obtained within the timeout
+ interval, the timer is stopped. Permissions are then requested from the user if required. See
+ http://www.w3.org/TR/geolocation-API/#position-options.
+
+ Note that this logic means that the time required to obtain permissions from the user is not
+ included in the timeout interval.
+
+ Tests: fast/dom/Geolocation/timeout.html
+ fast/dom/Geolocation/timeout-zero.html
+
+ * page/Geolocation.cpp: Modified.
+ (WebCore::Geolocation::GeoNotifier::GeoNotifier): Modified. Takes Geolocation object as parameter.
+ (WebCore::Geolocation::GeoNotifier::hasZeroTimeout): Added. Determines whether this request has a zero timeout.
+ (WebCore::Geolocation::GeoNotifier::startTimerIfNeeded): Renamed from startTimer. Starts the timer if a timeout was specified.
+ (WebCore::Geolocation::GeoNotifier::timerFired): Modified. Calls the error callback if specified, and reports the timeout to the Geolocation object.
+ (WebCore::Geolocation::getCurrentPosition): Modified. Calls maybeStartTimer when starting the location acquisition process.
+ (WebCore::Geolocation::watchPosition): Modified. Calls maybeStartTimer when starting the location acquisition process.
+ (WebCore::Geolocation::requestTimedOut): Added. Cancels a request when it times out.
+ (WebCore::Geolocation::setIsAllowed): Modified. No longer starts timers.
+ (WebCore::Geolocation::sendPosition): Modified. No longer stops timers.
+ (WebCore::Geolocation::stopTimer): Added. Stops the timers for a vector of notifiers.
+ (WebCore::Geolocation::stopTimersForOneShots): Added. Stops the timers for all one-shots.
+ (WebCore::Geolocation::stopTimersForWatchers): Added. Stops the timers for all watchers.
+ (WebCore::Geolocation::stopTimers): Added. Stops the timers for all requests.
+ (WebCore::Geolocation::geolocationServicePositionChanged): Modfified. Stops the timers for all requests.
+ * page/Geolocation.h: Modified.
+ (WebCore::Geolocation::GeoNotifier::create): Modified. Takes Geolocation object as parameter.
+
+2009-09-09 Chris Fleizach <cfleizach@apple.com>
+
+ AX notifications should be an ENUM type instead of strings
+ https://bugs.webkit.org/show_bug.cgi?id=28963
+
+ Build fix for Qt.
+
+ * accessibility/AXObjectCache.h:
+ (WebCore::AXObjectCache::postNotification):
+ (WebCore::AXObjectCache::postPlatformNotification):
+
+2009-09-08 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ AX notifications should be an ENUM type instead of strings
+ https://bugs.webkit.org/show_bug.cgi?id=28963
+
+ Moves AX notifications over to an ENUM type instead of
+ using the actual string values that are used on OS X.
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::postNotification):
+ (WebCore::AXObjectCache::selectedChildrenChanged):
+ * accessibility/AXObjectCache.h:
+ (WebCore::AXObjectCache::):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
+ * accessibility/chromium/AXObjectCacheChromium.cpp:
+ (WebCore::AXObjectCache::postPlatformNotification):
+ * accessibility/gtk/AXObjectCacheAtk.cpp:
+ (WebCore::AXObjectCache::postPlatformNotification):
+ * accessibility/mac/AXObjectCacheMac.mm:
+ (WebCore::AXObjectCache::postPlatformNotification):
+ * accessibility/win/AXObjectCacheWin.cpp:
+ (WebCore::AXObjectCache::postPlatformNotification):
+ * dom/Document.cpp:
+ (WebCore::Document::implicitClose):
+ * dom/Element.cpp:
+ (WebCore::Element::updateAfterAttributeChanged):
+ * editing/Editor.cpp:
+ (WebCore::Editor::respondToChangedContents):
+ * editing/mac/SelectionControllerMac.mm:
+ (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::setChecked):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::setInnerTextValue):
+
+2009-09-08 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Missing checkout for getSVGDocument()
+ https://bugs.webkit.org/show_bug.cgi?id=29064
+
+ The V8 code generator didn't understand SVGCheckSecurityDocument.
+
+ Tests: http/tests/security/xss-DENIED-getSVGDocument-iframe.html
+ http/tests/security/xss-DENIED-getSVGDocument-object.html
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+
+2009-09-09 Cameron McCormack <cam@mcc.id.au>
+
+ Reviewed by Eric Seidel.
+
+ Make SVGStyleElement inherit from SVGLangSpace
+ https://bugs.webkit.org/show_bug.cgi?id=29058
+
+ Required by SVG 1.1 Second Edition:
+ http://dev.w3.org/SVG/profiles/1.1F2/publish/styling.html#InterfaceSVGStyleElement
+
+ Test: svg/dom/SVGStyleElement/style-langspace.html
+
+ * svg/SVGStyleElement.cpp: Drop methods xmlspace and setXmlspace.
+ (WebCore::SVGStyleElement::SVGStyleElement): Add SVGLangSpace()
+ initializer.
+ (WebCore::SVGStyleElement::parseMappedAttribute): Call
+ parseMappedAttribute on SVGLangSpace.
+ * svg/SVGStyleElement.h: Drop xmlspace and setXmlspace declarations.
+ * svg/SVGStyleElement.idl: Drop xmlspace attribute and add SVGLangSpace
+ as a superinterface.
+
+2009-09-09 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by David Levin.
+
+ Remove unnecessary includes and forward declarations in V8Proxy.h
+
+ https://bugs.webkit.org/show_bug.cgi?id=29111
+
+ * bindings/v8/V8Proxy.h:
+
+2009-07-30 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Add more position constructors
+ positionBeforeNode, positionAfterNode
+ firstPositionInNode, lastPositionInNode
+ https://bugs.webkit.org/show_bug.cgi?id=25494
+
+ I also added a lastOffsetInNode and deployed it to a couple places.
+
+ There are no callers to these new constructors yet, but those
+ will be coming in future patches.
+
+ * dom/Position.cpp:
+ (WebCore::Position::computeOffsetInContainerNode):
+ * dom/Position.h:
+ (WebCore::positionBeforeNode):
+ (WebCore::positionAfterNode):
+ (WebCore::lastOffsetInNode):
+ (WebCore::firstPositionInNode):
+ (WebCore::lastPositionInNode):
+ * editing/ApplyStyleCommand.cpp:
+ * editing/TextIterator.cpp:
+ (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
+ * editing/htmlediting.cpp:
+ (WebCore::lastOffsetForEditing):
+
+2009-04-30 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Rename positionBeforeNode to positionInParentBeforeNode
+ and positionAfterNode to positionInParentAfterNode
+ in preparation for adding a positionBeforeNode
+ which returns a neighbor-anchored position.
+ https://bugs.webkit.org/show_bug.cgi?id=25494
+
+ No functional changes, thus no tests.
+
+ * dom/PositionConstructors.h:
+ (WebCore::positionInParentBeforeNode):
+ (WebCore::positionInParentAfterNode):
+ * dom/PositionIterator.cpp:
+ (WebCore::PositionIterator::operator Position):
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::ApplyStyleCommand::applyInlineStyle):
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::CompositeEditCommand::positionOutsideTabSpan):
+ (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
+ (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
+ * editing/CreateLinkCommand.cpp:
+ (WebCore::CreateLinkCommand::doApply):
+ * editing/DeleteButtonController.cpp:
+ (WebCore::DeleteButtonController::deleteTarget):
+ * editing/DeleteSelectionCommand.cpp:
+ (WebCore::DeleteSelectionCommand::initializeStartEnd):
+ (WebCore::updatePositionForNodeRemoval):
+ * editing/InsertLineBreakCommand.cpp:
+ (WebCore::InsertLineBreakCommand::doApply):
+ * editing/InsertListCommand.cpp:
+ (WebCore::InsertListCommand::doApply):
+ * editing/InsertParagraphSeparatorCommand.cpp:
+ (WebCore::InsertParagraphSeparatorCommand::doApply):
+ * editing/InsertTextCommand.cpp:
+ (WebCore::InsertTextCommand::input):
+ * editing/ReplaceSelectionCommand.cpp:
+ (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent):
+ (WebCore::ReplaceSelectionCommand::doApply):
+ * editing/VisibleSelection.cpp:
+ (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
+ * editing/htmlediting.cpp:
+ (WebCore::firstEditablePositionAfterPositionInRoot):
+ (WebCore::lastEditablePositionBeforePositionInRoot):
+ (WebCore::rangeCompliantEquivalent):
+ (WebCore::positionBeforeContainingSpecialElement):
+ (WebCore::positionAfterContainingSpecialElement):
+ (WebCore::positionBeforeTabSpan):
+
+2009-04-30 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Re-organize position creation functions in preparation for adding more
+ https://bugs.webkit.org/show_bug.cgi?id=25494
+
+ Make position functions inline to avoid ref-churn.
+ Remove startPosition/endPosition as they were only used in one place.
+
+ No functional changes, thus no tests.
+
+ * dom/Position.cpp:
+ * dom/Position.h:
+ (WebCore::positionBeforeNode):
+ (WebCore::positionAfterNode):
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::moveTo):
+ * editing/TypingCommand.cpp:
+ * editing/htmlediting.cpp:
+ * editing/htmlediting.h:
+ (WebCore::firstDeepEditingPositionForNode):
+ (WebCore::lastDeepEditingPositionForNode):
+ * rendering/RenderObject.cpp:
+
+2009-09-09 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ [wx] Add wxSize conversions for IntSize.
+ https://bugs.webkit.org/show_bug.cgi?id=29104
+
+ * platform/graphics/IntSize.h:
+ * platform/graphics/wx/IntSizeWx.cpp: Added.
+ (WebCore::IntSize::IntSize):
+ (WebCore::IntSize::operator wxSize):
+
+2009-09-09 Yaar Schnitman <yaar@chromium.org>
+
+ Reviewed by David Levin.
+
+ Chromium uses its own config.h file that was forked from webkit's config.h.
+ By merging in Chromium's defines, Chromium would again be able to use webkit's
+ config.h.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28882
+
+ * config.h: Added chromium-specific defines.
+
+2009-09-09 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Initialize DataTransfer's effectAllowed and dropEffect properties correctly
+ according to HTML5 spec (sec. 7.9.2-7.9.3).
+ https://bugs.webkit.org/show_bug.cgi?id=26700
+ - At the start of a drag operation, the value of effectAllowed should be
+ the string "uninitialized".
+ - At end of dragstart handler, if effectAllowed hasn't been set yet, it
+ should be set to "copy".
+ - on dragenter and dragover event, dropEffect should be initialized to a
+ default value based on the value of effectAllowed.
+ - at end of dragenter and dragover the dropEffect should be set to "none"
+ if the value set by the handler doesn't match the effectAllowed.
+ - on dragleave event, dropEffect should be "none".
+ - on drop event, dropEffect should be the previously negotiated value.
+
+ Test: fast/events/drag-dropeffect.html
+
+ * WebCore.base.exp:
+ Added a parameter to EventHandler::dragSourceMovedTo.
+ * dom/Clipboard.cpp:
+ (WebCore::Clipboard::Clipboard):
+ Initialize m_effectAllowed to "uninitialized".
+ (WebCore::Clipboard::sourceOperation):
+ Treat "uninitialized" as meaning no value has been set.
+ * page/DragController.cpp:
+ (WebCore::DragController::DragController):
+ Initialize new member m_destinationDragOperation.
+ (WebCore::DragController::dragExited):
+ Set m_destinationDragOperation to none on dragExit.
+ (WebCore::DragController::performDrag):
+ Set m_destinationDragOperation to current dropEffect.
+ (WebCore::DragController::dragEnteredOrUpdated):
+ Make sure to clear the operation if drag source doesn't allow it.
+ (WebCore::DragController::tryDHTMLDrag):
+ Set a default value for the dst drag op before sending dragEnter/Over.
+ (WebCore::DragController::startDrag):
+ Clear m_destinationDragOperation at start of drag.
+ * page/DragController.h:
+ (WebCore::DragController::destinationDragOperation):
+ Added new member m_destinationDragOperation, and its public getter.
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::updateDragAndDrop):
+ dropEffect should be 'none' during dropleave handler, per spec.
+ (WebCore::EventHandler::dragSourceMovedTo):
+ Added DragOperation parameter, so the handler sees the current dropEffect.
+ (WebCore::EventHandler::handleDrag):
+ Assume DragOperationEvery for non-DHTML drags.
+ * page/EventHandler.h:
+ Added DragOperation parameter to dragSourceMovedTo().
+
+2009-09-09 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ 1. Adding support/bindings for read-only transactions.
+ 2. Disallowing the SQLITE_*_VIEW and REINDEX operations in the
+ private browsing mode.
+ 3. Adding an authorizer test.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28918
+
+ Test: storage/test-authorizer.html
+
+ * bindings/js/JSDatabaseCustom.cpp:
+ (WebCore::createTransaction): Parses all arguments and executes a
+ transaction.
+ (WebCore::JSDatabase::transaction): Refactored to use
+ createTransaction().
+ (WebCore::JSDatabase::readTransaction): Added to execute read-only
+ transactions using createTransaction().
+ * bindings/v8/custom/V8CustomBinding.h: Added the binding for
+ Database::readTransaction().
+ * bindings/v8/custom/V8DatabaseCustom.cpp:
+ (WebCore::createTransaction): Parses all arguments and executes a
+ transaction.
+ (WebCore::transaction): Refactored to use createTransaction().
+ (WebCore::readTransaction): Added to execute read-only
+ transactions using createTransaction().
+ * storage/Database.cpp:
+ (WebCore::Database::transaction): Added support for read-only
+ transactions.
+ * storage/Database.h: Added support for read-only transactions.
+ * storage/Database.idl: Added support for read-only transactions.
+ * storage/DatabaseAuthorizer.cpp:
+ (WebCore::DatabaseAuthorizer::createTempTable): Make it obvious
+ that the statement will be denied in private browsing mode and
+ read-only transactions.
+ (WebCore::DatabaseAuthorizer::dropTempTable): Same.
+ (WebCore::DatabaseAuthorizer::createTempIndex): Same.
+ (WebCore::DatabaseAuthorizer::dropTempIndex): Same.
+ (WebCore::DatabaseAuthorizer::createTempTrigger): Same.
+ (WebCore::DatabaseAuthorizer::dropTempTrigger): Same.
+ (WebCore::DatabaseAuthorizer::createView): Deny in private
+ browsing mode and read-only transactions.
+ (WebCore::DatabaseAuthorizer::createTempView): Same.
+ (WebCore::DatabaseAuthorizer::dropView): Same.
+ (WebCore::DatabaseAuthorizer::dropTempView): Same.
+ (WebCore::DatabaseAuthorizer::allowReindex): Same.
+ * storage/DatabaseAuthorizer.h:
+ * storage/SQLTransaction.cpp: Added support for read-only
+ transactions.
+ (WebCore::SQLTransaction::create):
+ (WebCore::SQLTransaction::SQLTransaction):
+ (WebCore::SQLTransaction::executeSQL):
+ (WebCore::SQLTransaction::acquireLock):
+ * storage/SQLTransaction.h:
+ * storage/SQLTransactionCoordinator.cpp:
+ (WebCore::SQLTransactionCoordinator::acquireLock): Added a new
+ parameter in preparation for a change that will allow multiple
+ read-only transactions on the same DB to run concurrently.
+ * storage/SQLTransactionCoordinator.h:
+
+2009-09-09 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection. This is similar
+ to user script injection but allows for user stylesheets to be added. The stylesheets are applied immediately
+ to all Frames in the PageGroup.
+
+ Added userscripts/simple-stylesheet.html test case.
+
+ * WebCore.base.exp:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::CSSStyleSelector):
+ * css/CSSStyleSelector.h:
+ * dom/Document.cpp:
+ (WebCore::Document::Document):
+ (WebCore::Document::attach):
+ (WebCore::Document::pageGroupUserSheets):
+ (WebCore::Document::clearPageGroupUserSheets):
+ (WebCore::Document::recalcStyleSelector):
+ * dom/Document.h:
+ * loader/PlaceholderDocument.cpp:
+ (WebCore::PlaceholderDocument::attach):
+ * page/PageGroup.cpp:
+ (WebCore::PageGroup::addUserStyleSheet):
+ (WebCore::PageGroup::removeUserContentForWorld):
+ (WebCore::PageGroup::removeAllUserContent):
+ * page/PageGroup.h:
+ (WebCore::PageGroup::userStyleSheets):
+ * page/UserStyleSheet.h: Added.
+ (WebCore::UserStyleSheet::UserStyleSheet):
+ (WebCore::UserStyleSheet::source):
+ (WebCore::UserStyleSheet::url):
+ (WebCore::UserStyleSheet::patterns):
+ (WebCore::UserStyleSheet::worldID):
+ * page/UserStyleSheetTypes.h: Added.
+
+2009-09-09 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] CSS Style -webkit-box-shadow is not rendered correctly on
+ Qt platform
+ https://bugs.webkit.org/show_bug.cgi?id=23291
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::drawRect):
+ (WebCore::GraphicsContext::strokeArc):
+ (WebCore::GraphicsContext::drawConvexPolygon):
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::strokePath):
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::fillRoundedRect):
+ Added the ability to draw shadows for all these curves.
+
+2009-09-09 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Add the qwebgraphicsitem.cpp to the build system.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28862
+
+ * WebCore.pro:
+
+2009-09-09 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ [wx port] Move functions in TemporaryLinkStubs.cpp out to files where
+ they belong.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29088
+
+ * editing/wx/EditorWx.cpp:
+ (WebCore::Editor::showColorPanel):
+ (WebCore::Editor::showFontPanel):
+ (WebCore::Editor::showStylesPanel):
+ * platform/graphics/wx/GraphicsContextWx.cpp:
+ (WebCore::GraphicsContext::setPlatformShadow):
+ (WebCore::GraphicsContext::clearPlatformShadow):
+ (WebCore::GraphicsContext::beginTransparencyLayer):
+ (WebCore::GraphicsContext::endTransparencyLayer):
+ (WebCore::GraphicsContext::clearRect):
+ (WebCore::GraphicsContext::strokeRect):
+ (WebCore::GraphicsContext::setLineCap):
+ (WebCore::GraphicsContext::setLineJoin):
+ (WebCore::GraphicsContext::setMiterLimit):
+ (WebCore::GraphicsContext::setAlpha):
+ (WebCore::GraphicsContext::addInnerRoundedRectClip):
+ * platform/graphics/wx/IconWx.cpp: Added.
+ (WebCore::Icon::~Icon):
+ (WebCore::Icon::createIconForFile):
+ (WebCore::Icon::createIconForFiles):
+ (WebCore::Icon::paint):
+ * platform/graphics/wx/ImageWx.cpp:
+ (WebCore::Image::loadPlatformResource):
+ (WebCore::Image::drawPattern):
+ * platform/wx/CursorWx.cpp:
+ (WebCore::moveCursor):
+ * platform/wx/FileChooserWx.cpp: Added.
+ (WebCore::FileChooser::basenameForWidth):
+ * platform/wx/KURLWx.cpp: Added.
+ (WebCore::KURL::fileSystemPath):
+ * platform/wx/SSLKeyGeneratorWx.cpp: Added.
+ (WebCore::getSupportedKeySizes):
+ (WebCore::signedPublicKeyAndChallengeString):
+ * platform/wx/SearchPopupMenuWx.cpp: Added.
+ (WebCore::SearchPopupMenu::SearchPopupMenu):
+ (WebCore::SearchPopupMenu::saveRecentSearches):
+ (WebCore::SearchPopupMenu::loadRecentSearches):
+ (WebCore::SearchPopupMenu::enabled):
+ * platform/wx/SharedBufferWx.cpp: Added.
+ (WebCore::SharedBuffer::createWithContentsOfFile):
+ * platform/wx/SystemTimeWx.cpp: Added.
+ (WebCore::userIdleTime):
+ * platform/wx/TemporaryLinkStubs.cpp: Removed.
+ * platform/wx/TextBreakIteratorInternalICUWx.cpp: Added.
+ (WebCore::currentSearchLocaleID):
+ (WebCore::currentTextBreakLocaleID):
+ * platform/wx/WidgetWx.cpp:
+ (WebCore::Widget::setIsSelected):
+
+2009-09-09 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ Geolocation incorrectly calls error callback in case of exception in success callback.
+ https://bugs.webkit.org/show_bug.cgi?id=27255
+
+ Test: fast/dom/Geolocation/callback-exception.html
+
+ * bindings/js/JSCustomPositionCallback.cpp: Modified.
+ (WebCore::JSCustomPositionCallback::handleEvent): Modified. Removed raisedException out param.
+ * bindings/js/JSCustomPositionCallback.h: Modified. Removed raisedException out param from handleEvent method and made handleEvent private.
+ * bindings/js/JSCustomPositionErrorCallback.h: Modified. Made handleEvent private.
+ * page/Geolocation.cpp: Modified.
+ (WebCore::Geolocation::sendPosition): Modified. No longer call error callback in case of exception in success callback.
+ * page/PositionCallback.h: Modified. Removed raisedException out param from handleEvent method.
+
+2009-09-09 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Adler.
+
+ When Geolocation permission is denied, stops watches as well as one-shots.
+ https://bugs.webkit.org/show_bug.cgi?id=28305.
+
+ Tests: fast/dom/Geolocation/watch.html
+ fast/dom/Geolocation/permission-denied-stops-watches.html
+
+ * page/Geolocation.cpp: Modified.
+ (WebCore::Geolocation::setIsAllowed): Modified. Marks the permission error as fatal.
+ (WebCore::Geolocation::handleError): Modified. If the error is fatal, stops watchers as well as one-shots.
+ * page/PositionError.h: Modified.
+ (WebCore::PositionError::setIsFatal): Added. Marks an error as fatal.
+ (WebCore::PositionError::isFatal): Added. Determines whether an error is fatal.
+
+2009-09-09 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Bug 28964 - [Chromium] ChromiumDataObject should have getter/setter interface
+
+ Added getter/setter methods and trivial inline implementations for each.
+ (Note that they are not yet actually used.)
+ Once the Chromium code is changed to use them instead of directly accessing the
+ member variables, the member variables should be made private and cleaned up.
+
+ No new tests (no functional behavior changed).
+
+ * platform/chromium/ChromiumDataObject.h:
+ (WebCore::ChromiumDataObject::mainURL):
+ (WebCore::ChromiumDataObject::setMainURL):
+ (WebCore::ChromiumDataObject::mainURLTitle):
+ (WebCore::ChromiumDataObject::setMainURLTitle):
+ (WebCore::ChromiumDataObject::textPlain):
+ (WebCore::ChromiumDataObject::setTextPlain):
+ (WebCore::ChromiumDataObject::textHTML):
+ (WebCore::ChromiumDataObject::setTextHTML):
+ (WebCore::ChromiumDataObject::htmlBaseURL):
+ (WebCore::ChromiumDataObject::setHTMLBaseURL):
+ (WebCore::ChromiumDataObject::content):
+ (WebCore::ChromiumDataObject::releaseContent):
+ (WebCore::ChromiumDataObject::setContent):
+ (WebCore::ChromiumDataObject::contentFileExtension):
+ (WebCore::ChromiumDataObject::setContentFileExtension):
+ (WebCore::ChromiumDataObject::contentFileName):
+ (WebCore::ChromiumDataObject::setContentFileName):
+ (WebCore::ChromiumDataObject::fileNames):
+ (WebCore::ChromiumDataObject::setFileNames):
+ (WebCore::ChromiumDataObject::takeFileNames):
+
+2009-09-08 Pat Bradley <vincent.bradley@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] locale date displays incorrect date format in symbian.
+ https://bugs.webkit.org/show_bug.cgi?id=29032
+
+ strftime() in Symbian does not support #
+ Layout tests cannot be run on Symbian yet, so they are not updated.
+
+ * runtime/DatePrototype.cpp:
+ (JSC::formatLocaleDate):
+
+2009-09-09 Rohini Ananth <rohini.ananth@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ NPAPI Plugin NPP_AsFile not working on Qt Webkit
+ https://bugs.webkit.org/show_bug.cgi?id=29068
+
+ * platform/qt/FileSystemQt.cpp:
+ (WebCore::openTemporaryFile)
+ Autoremove property of QTemporaryFile has been set to false. Hence closeFile() just closes and does not delete the file.
+ This solves the deletion of created temp file in PluginStream::destroyStream() before passing to plugin in NPP_AsFile.
+
+2009-09-08 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by NOBODY (Build fix).
+
+ Remove a few incorrect changes I left in.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+
+2009-09-08 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Support numeric index getters in bindings
+ https://bugs.webkit.org/show_bug.cgi?id=29067
+
+ Add HasNumericIndexGetter to indicate a non-custom getter that
+ returns a number. The numeric index getter also uses PropertySlot's
+ setValue rather than setCustomIndex to avoid an additional indirect
+ call.
+
+ * bindings/js/JSCanvasByteArrayCustom.cpp:
+ * bindings/js/JSCanvasFloatArrayCustom.cpp:
+ * bindings/js/JSCanvasIntArrayCustom.cpp:
+ * bindings/js/JSCanvasShortArrayCustom.cpp:
+ * bindings/js/JSCanvasUnsignedByteArrayCustom.cpp:
+ * bindings/js/JSCanvasUnsignedIntArrayCustom.cpp:
+ * bindings/js/JSCanvasUnsignedShortArrayCustom.cpp:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * html/canvas/CanvasByteArray.h:
+ (WebCore::CanvasByteArray::item):
+ * html/canvas/CanvasByteArray.idl:
+ * html/canvas/CanvasFloatArray.h:
+ (WebCore::CanvasFloatArray::get):
+ (WebCore::CanvasFloatArray::item):
+ * html/canvas/CanvasFloatArray.idl:
+ * html/canvas/CanvasIntArray.h:
+ (WebCore::CanvasIntArray::get):
+ (WebCore::CanvasIntArray::item):
+ * html/canvas/CanvasIntArray.idl:
+ * html/canvas/CanvasPixelArray.idl:
+ * html/canvas/CanvasShortArray.h:
+ (WebCore::CanvasShortArray::get):
+ (WebCore::CanvasShortArray::item):
+ * html/canvas/CanvasShortArray.idl:
+ * html/canvas/CanvasUnsignedByteArray.h:
+ (WebCore::CanvasUnsignedByteArray::get):
+ (WebCore::CanvasUnsignedByteArray::item):
+ * html/canvas/CanvasUnsignedByteArray.idl:
+ * html/canvas/CanvasUnsignedIntArray.h:
+ (WebCore::CanvasUnsignedIntArray::get):
+ (WebCore::CanvasUnsignedIntArray::item):
+ * html/canvas/CanvasUnsignedIntArray.idl:
+ * html/canvas/CanvasUnsignedShortArray.h:
+ (WebCore::CanvasUnsignedShortArray::item):
+ * html/canvas/CanvasUnsignedShortArray.idl:
+
+2009-09-08 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix for 2.8.
+
+ * platform/wx/wxcode/mac/carbon/scrollbar_render.cpp:
+ (wxRenderer_DrawScrollbar):
+
+2009-09-08 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ In Mac Chromium, clicking below the last line of an editable area (textarea or
+ contenteditable) should put the caret at the end of the last line, as in Mac Safari.
+
+ Tests: LayoutTests/editing/selection/click-in-margins-inside-editable-div.html
+ LayoutTests/editing/selection/click-in-padding-with-multiple-line-boxes.html
+
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings): Change #if PLATFORM_MAC to be Mac-Chrome-inclusive.
+
+2009-09-08 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Make sure not to do an early return when a data URL stylesheet successfully loads. We need to still
+ clear the old cached sheet out of all existing Frames. Fixes the data URL stylesheet layout test failure.
+
+ * page/Page.cpp:
+ (WebCore::Page::userStyleSheetLocationChanged):
+
+2009-09-08 Sam Weinig <sam@webkit.org>
+
+ Fix windows build.
+
+ * dom/Document.idl:
+
+2009-09-08 Kevin Ollivier <kevino@theolliviers.com>
+
+ More robust wx build fix for 2.9.
+
+ * platform/wx/wxcode/mac/carbon/scrollbar_render.cpp:
+ (wxRenderer_DrawScrollbar):
+
+2009-09-08 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=27046
+ Implement CSSOM DocumentView.caretRangeFromPoint
+
+ Tests: fast/dom/Document/CaretRangeFromPoint/basic.html
+ fast/dom/Document/CaretRangeFromPoint/replace-element.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::caretRangeFromPoint):
+ * dom/Document.h:
+ * dom/Document.idl:
+
+2009-09-08 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix, generate derived sources earlier in order to make sure
+ they're found by the build system when generating the list of sources to build.
+
+ * wscript:
+
+2009-09-08 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ <iterator> include in V8Proxy.h is spurious and causing ObjC compile issues for Chromium.
+
+ Test: Chromium mac canary build is fixed.
+
+ * bindings/v8/V8Proxy.h: Remove <iterator> include.
+
+2009-09-08 Xan Lopez <xlopez@igalia.com>
+
+ Unreviewed attempt to fix the GTKbuild.
+
+ * GNUmakefile.am:
+
+2009-09-04 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28987, make the Document cache the page's user stylesheet in
+ parsed form. Allows the sheet to survive across destruction/re-creation of the CSSStyleSelector.
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::CSSStyleSelector):
+ * css/CSSStyleSelector.h:
+ * dom/Document.cpp:
+ (WebCore::Document::attach):
+ (WebCore::Document::pageUserSheet):
+ (WebCore::Document::clearPageUserSheet):
+ (WebCore::Document::recalcStyleSelector):
+ * dom/Document.h:
+ * loader/PlaceholderDocument.cpp:
+ (WebCore::PlaceholderDocument::attach):
+ * page/Page.cpp:
+ (WebCore::Page::userStyleSheetLocationChanged):
+ * page/Settings.cpp:
+ (WebCore::Settings::setUserStyleSheetLocation):
+
+2009-09-08 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Unreviewed buildfix.
+
+ Fix Qt build after 48167, by adding the new cpp/h files
+ added to WebCore.gypi to WebCore.pro as well.
+
+ * WebCore.pro:
+
+2009-09-08 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ should not pass URI fragments to libsoup
+ https://bugs.webkit.org/show_bug.cgi?id=28687
+
+ Strip the fragment from the URI before passing it to soup, since
+ it forwards it to servers in some cases (like when using a proxy)
+ which confuses them and makes them return 403/404.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::startHttp):
+ (WebCore::):
+
+2009-09-08 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Add QGraphicsScene events support to the Qt platform events.
+
+ * platform/PlatformMouseEvent.h:
+ * platform/PlatformWheelEvent.h:
+ * platform/qt/PlatformMouseEventQt.cpp:
+ (WebCore::PlatformMouseEvent::PlatformMouseEvent):
+ * platform/qt/WheelEventQt.cpp:
+ (WebCore::PlatformWheelEvent::applyDelta):
+ (WebCore::PlatformWheelEvent::PlatformWheelEvent):
+
+2009-09-08 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Eric Seidel.
+
+ [Chromium] Cleanup: remove a few deprecated methods.
+ https://bugs.webkit.org/show_bug.cgi?id=28960
+
+ No new tests, just syntactic sugar.
+
+ * platform/network/chromium/ResourceRequest.h:
+ * platform/network/chromium/ResourceResponse.h:
+
+2009-09-08 Yongjun Zhang <yongjun.zhang@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28981
+
+ [Qt] make npapi.h compile in winscw compiler.
+
+ Add XP_SYMBIAN macro to identify Symbian OS; this macro should be used for Symbian
+ specific changes in npapi.h.
+ Undefine XP_WIN when building for Symbian to avoid including Windows specific code.
+
+ * bridge/npapi.h:
+
+2009-09-08 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Web Inspector assertion failure related to marking
+ https://bugs.webkit.org/show_bug.cgi?id=28997
+
+ When wrapping the callback the JSInspectorCallbackWrapper creator was using
+ inheritorID for the prototype structure which is unsafe for anything other
+ than a pure JS object. Instead we now create a new structure, which while
+ inefficient is not problematic as this code is not hit frequently.
+
+ * bindings/js/JSInspectorCallbackWrapper.cpp:
+ (WebCore::JSInspectorCallbackWrapper::wrap):
+
+2009-09-08 Kelly Norton <knorton@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add missing extension to the file entry in WebCore.vcproj.
+
+ * WebCore.vcproj/WebCore.vcproj: Added "cpp".
+
+2009-09-08 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ dataTransfer.types() should not return Files if file list is empty in the clipboard.
+ https://bugs.webkit.org/show_bug.cgi?id=28891
+
+ We change the behavior to handle the empty file list in order to match the spec.
+
+ Tested by clipboard-file-access.html.
+
+ * platform/mac/ClipboardMac.mm:
+ (WebCore::addHTMLClipboardTypesForCocoaType):
+ (WebCore::ClipboardMac::types):
+
+2009-09-08 Steve VanDeBogart <vandebo@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Handle middle click in Chromium like QT
+ https://bugs.webkit.org/show_bug.cgi?id=28696
+
+ Tested by middle-click-onpaste.html.
+
+ * platform/Pasteboard.h:
+ * platform/chromium/ChromiumBridge.h:
+ * platform/chromium/ClipboardChromium.cpp:
+ (WebCore::ClipboardChromium::getData):
+ * platform/chromium/PasteboardChromium.cpp:
+ (WebCore::Pasteboard::Pasteboard):
+ (WebCore::Pasteboard::isSelectionMode):
+ (WebCore::Pasteboard::setSelectionMode):
+ (WebCore::Pasteboard::canSmartReplace):
+ (WebCore::Pasteboard::plainText):
+ (WebCore::Pasteboard::documentFragment):
+ * platform/chromium/PasteboardPrivate.h:
+ (WebCore::PasteboardPrivate::):
+
+2009-09-08 Kelly Norton <knorton@google.com>
+
+ Reviewed by Eric Seidel.
+
+ WebInspector: Adds a timeline agent to InspectorController that collects
+ high-level timing data about event dispatch, layout, painting and HTML
+ parsing and makes it available to Inspector.
+ https://bugs.webkit.org/show_bug.cgi?id=25503
+
+ * WebCore.gypi:
+ * WebCore.xcodeproj/project.pbxproj:
+ * dom/Document.cpp:
+ (WebCore::Document::recalcStyle):
+ * dom/Document.h:
+ (WebCore::Document::inspectorTimelineAgent):
+ * dom/Node.cpp:
+ (WebCore::Node::dispatchGenericEvent):
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::write):
+ * inspector/DOMDispatchTimelineItem.cpp: Added.
+ (WebCore::DOMDispatchTimelineItem::DOMDispatchTimelineItem):
+ (WebCore::DOMDispatchTimelineItem::convertToScriptObject):
+ * inspector/DOMDispatchTimelineItem.h: Added.
+ (WebCore::DOMDispatchTimelineItem::~DOMDispatchTimelineItem):
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::enableTimeline):
+ (WebCore::InspectorBackend::disableTimeline):
+ (WebCore::InspectorBackend::timelineEnabled):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::setFrontendProxyObject):
+ (WebCore::InspectorController::close):
+ (WebCore::InspectorController::resetScriptObjects):
+ (WebCore::InspectorController::enableTimeline):
+ (WebCore::InspectorController::disableTimeline):
+ (WebCore::InspectorController::timelineEnabled):
+ * inspector/InspectorController.h:
+ (WebCore::InspectorController::timelineAgent):
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::timelineWasEnabled):
+ (WebCore::InspectorFrontend::timelineWasDisabled):
+ (WebCore::InspectorFrontend::addItemToTimeline):
+ * inspector/InspectorFrontend.h:
+ * inspector/InspectorTimelineAgent.cpp: Added.
+ (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
+ (WebCore::InspectorTimelineAgent::~InspectorTimelineAgent):
+ (WebCore::InspectorTimelineAgent::willDispatchDOMEvent):
+ (WebCore::InspectorTimelineAgent::didDispatchDOMEvent):
+ (WebCore::InspectorTimelineAgent::willLayout):
+ (WebCore::InspectorTimelineAgent::didLayout):
+ (WebCore::InspectorTimelineAgent::willRecalculateStyle):
+ (WebCore::InspectorTimelineAgent::didRecalculateStyle):
+ (WebCore::InspectorTimelineAgent::willPaint):
+ (WebCore::InspectorTimelineAgent::didPaint):
+ (WebCore::InspectorTimelineAgent::willWriteHTML):
+ (WebCore::InspectorTimelineAgent::didWriteHTML):
+ (WebCore::InspectorTimelineAgent::reset):
+ (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
+ (WebCore::InspectorTimelineAgent::currentTimeInMilliseconds):
+ (WebCore::InspectorTimelineAgent::sessionTimeInMilliseconds):
+ * inspector/InspectorTimelineAgent.h: Added.
+ * inspector/TimelineItem.cpp: Added.
+ (WebCore::TimelineItem::TimelineItem):
+ (WebCore::TimelineItem::addToTimeline):
+ (WebCore::TimelineItem::convertToScriptObject):
+ (WebCore::TimelineItem::convertChildrenToScriptArray):
+ (WebCore::TimelineItem::addChildItem):
+ * inspector/TimelineItem.h: Added.
+ (WebCore::):
+ (WebCore::TimelineItem::~TimelineItem):
+ (WebCore::TimelineItem::previous):
+ (WebCore::TimelineItem::releasePrevious):
+ (WebCore::TimelineItem::setEndTime):
+ (WebCore::TimelineItem::type):
+ * inspector/front-end/TimelineAgent.js: Added.
+ (WebInspector.TimelineAgent):
+ (WebInspector.addItemToTimeline):
+ (WebInspector.timelineWasEnabled):
+ (WebInspector.timelineWasDisabled):
+ * inspector/front-end/inspector.html:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+ (WebCore::FrameView::paintContents):
+ * page/FrameView.h:
+ (WebCore::FrameView::inspectorTimelineAgent):
+ * page/Page.cpp:
+ (WebCore::Page::inspectorTimelineAgent):
+ * page/Page.h:
+
+2009-09-08 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix unused variable warnings
+ https://bugs.webkit.org/show_bug.cgi?id=29018
+
+ No functional change, no tests.
+
+ * history/qt/HistoryItemQt.cpp:
+ (WebCore::HistoryItem::restoreState):
+ * platform/graphics/qt/ImageBufferQt.cpp:
+ (WebCore::putImageData):
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::paintMenuList):
+
+2009-09-08 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Use the declaration order in initializer lists
+ https://bugs.webkit.org/show_bug.cgi?id=29017
+
+ No functional change, no new tests.
+
+ * platform/graphics/qt/FontCacheQt.cpp:
+ (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
+
+2009-09-08 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Implement ValidityState::typeMismatch() for <input type=number>.
+ https://bugs.webkit.org/show_bug.cgi?id=28934
+
+ Test: fast/forms/ValidityState-typeMismatch-number.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::formStringToDouble):
+ * html/HTMLInputElement.h:
+ * html/ValidityState.cpp:
+ (WebCore::ValidityState::typeMismatch):
+ * html/ValidityState.h:
+
+2009-09-08 Andras Becsi <becsi.andras@stud.u-szeged.hu>
+
+ Reviewed by Gustavo Noronha.
+
+ [Gtk] Another attempt of a buildfix.
+
+ * GNUmakefile.am: Modified. Remove some extra IDL files added in r48153.
+
+2009-09-08 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Make cursor set cleaner in QtWebKit Api: eliminate SetCursorEvent hack.
+ https://bugs.webkit.org/show_bug.cgi?id=28865
+
+ Save the QCursor as a property in WidgetQt::setCursor
+ and actually change the cursor in QWebView::event() by making use
+ of the QEvent::DynamicPropertyChange event type.
+ When unsetCursor() is called on the QWidget we can fallback to
+ the cursor set by WebCore.
+
+ Patch by Kenneth Rohde Christiansen <kenneth@webkit.org> and
+ Antonio Gomes <antonio.gomes@openbossa.org> on 2009-09-07
+
+ * platform/qt/WidgetQt.cpp:
+ (WebCore::Widget::setCursor):
+
+2009-09-08 Andras Becsi <becsi.andras@stud.u-szeged.hu>
+
+ Reviewed by Gustavo Noronha.
+
+ [Gtk] Buildfix for build error introduced in r48150.
+
+ * GNUmakefile.am: Modified. Added missing IDL files.
+
+2009-09-08 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Buildfix. Build error caused by r48150.
+
+ * WebCore.pro: missing IDL files added
+
+2009-09-07 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Update Canvas 3D implementation to match spec
+ https://bugs.webkit.org/show_bug.cgi?id=29010
+
+ This adds several new CanvasXXXArray classes each of which has a custom constructor
+ and custom getters and setters. Also changed CanvasRenderingContext3D and GraphicsContext3D
+ to match the new and changed API.
+
+ * DerivedSources.make:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSCanvasArrayBufferConstructor.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasArrayBufferConstructor.h: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasArrayCustom.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasByteArrayConstructor.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasByteArrayConstructor.h: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasByteArrayCustom.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasFloatArrayConstructor.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasFloatArrayConstructor.h: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasFloatArrayCustom.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasIntArrayConstructor.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasIntArrayConstructor.h: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasIntArrayCustom.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasRenderingContext3DCustom.cpp:
+ (WebCore::JSCanvasRenderingContext3D::bufferData):
+ (WebCore::JSCanvasRenderingContext3D::bufferSubData):
+ (WebCore::JSCanvasRenderingContext3D::texImage2D):
+ (WebCore::JSCanvasRenderingContext3D::texSubImage2D):
+ * bindings/js/JSCanvasShortArrayConstructor.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasShortArrayConstructor.h: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasShortArrayCustom.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasUnsignedByteArrayConstructor.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasUnsignedByteArrayConstructor.h: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasUnsignedByteArrayCustom.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasUnsignedIntArrayConstructor.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasUnsignedIntArrayConstructor.h: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasUnsignedIntArrayCustom.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasUnsignedShortArrayConstructor.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasUnsignedShortArrayConstructor.h: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSCanvasUnsignedShortArrayCustom.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::canvasArrayBuffer):
+ (WebCore::JSDOMWindow::canvasByteArray):
+ (WebCore::JSDOMWindow::canvasUnsignedByteArray):
+ (WebCore::JSDOMWindow::canvasIntArray):
+ (WebCore::JSDOMWindow::canvasUnsignedIntArray):
+ (WebCore::JSDOMWindow::canvasShortArray):
+ (WebCore::JSDOMWindow::canvasUnsignedShortArray):
+ (WebCore::JSDOMWindow::canvasFloatArray):
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::getContext):
+ (WebCore::HTMLCanvasElement::paint):
+ * html/canvas/CanvasArray.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * html/canvas/CanvasArray.h: Added with properties svn:eol-style and svn:mime-type.
+ * html/canvas/CanvasArray.idl: Added.
+ * html/canvas/CanvasArrayBuffer.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * html/canvas/CanvasArrayBuffer.h: Added with properties svn:eol-style and svn:mime-type.
+ * html/canvas/CanvasArrayBuffer.idl: Added.
+ * html/canvas/CanvasByteArray.cpp:
+ * html/canvas/CanvasByteArray.h:
+ * html/canvas/CanvasByteArray.idl:
+ * html/canvas/CanvasFloatArray.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * html/canvas/CanvasFloatArray.h: Added with properties svn:eol-style and svn:mime-type.
+ * html/canvas/CanvasFloatArray.idl: Added.
+ * html/canvas/CanvasIntArray.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * html/canvas/CanvasIntArray.h: Added with properties svn:eol-style and svn:mime-type.
+ * html/canvas/CanvasIntArray.idl: Added.
+ * html/canvas/CanvasRenderingContext3D.cpp:
+ (WebCore::CanvasRenderingContext3D::CanvasRenderingContext3D):
+ (WebCore::CanvasRenderingContext3D::markContextChanged):
+ (WebCore::CanvasRenderingContext3D::beginPaint):
+ (WebCore::CanvasRenderingContext3D::endPaint):
+ (WebCore::CanvasRenderingContext3D::reshape):
+ (WebCore::CanvasRenderingContext3D::sizeInBytes):
+ (WebCore::CanvasRenderingContext3D::bindTexture):
+ (WebCore::CanvasRenderingContext3D::bufferData):
+ (WebCore::CanvasRenderingContext3D::bufferSubData):
+ (WebCore::CanvasRenderingContext3D::checkFramebufferStatus):
+ (WebCore::CanvasRenderingContext3D::clear):
+ (WebCore::CanvasRenderingContext3D::createBuffer):
+ (WebCore::CanvasRenderingContext3D::createFramebuffer):
+ (WebCore::CanvasRenderingContext3D::createTexture):
+ (WebCore::CanvasRenderingContext3D::createProgram):
+ (WebCore::CanvasRenderingContext3D::createRenderbuffer):
+ (WebCore::CanvasRenderingContext3D::createShader):
+ (WebCore::CanvasRenderingContext3D::deleteBuffer):
+ (WebCore::CanvasRenderingContext3D::deleteFramebuffer):
+ (WebCore::CanvasRenderingContext3D::deleteProgram):
+ (WebCore::CanvasRenderingContext3D::deleteRenderbuffer):
+ (WebCore::CanvasRenderingContext3D::deleteShader):
+ (WebCore::CanvasRenderingContext3D::deleteTexture):
+ (WebCore::CanvasRenderingContext3D::drawArrays):
+ (WebCore::CanvasRenderingContext3D::drawElements):
+ (WebCore::CanvasRenderingContext3D::getBoolean):
+ (WebCore::CanvasRenderingContext3D::getBooleanv):
+ (WebCore::CanvasRenderingContext3D::getBufferParameteri):
+ (WebCore::CanvasRenderingContext3D::getBufferParameteriv):
+ (WebCore::CanvasRenderingContext3D::getFloat):
+ (WebCore::CanvasRenderingContext3D::getFloatv):
+ (WebCore::CanvasRenderingContext3D::getFramebufferAttachmentParameteri):
+ (WebCore::CanvasRenderingContext3D::getFramebufferAttachmentParameteriv):
+ (WebCore::CanvasRenderingContext3D::getInteger):
+ (WebCore::CanvasRenderingContext3D::getIntegerv):
+ (WebCore::CanvasRenderingContext3D::getProgrami):
+ (WebCore::CanvasRenderingContext3D::getProgramiv):
+ (WebCore::CanvasRenderingContext3D::getProgramInfoLog):
+ (WebCore::CanvasRenderingContext3D::getRenderbufferParameteri):
+ (WebCore::CanvasRenderingContext3D::getRenderbufferParameteriv):
+ (WebCore::CanvasRenderingContext3D::getShaderi):
+ (WebCore::CanvasRenderingContext3D::getShaderiv):
+ (WebCore::CanvasRenderingContext3D::getShaderInfoLog):
+ (WebCore::CanvasRenderingContext3D::getShaderSource):
+ (WebCore::CanvasRenderingContext3D::getTexParameterf):
+ (WebCore::CanvasRenderingContext3D::getTexParameterfv):
+ (WebCore::CanvasRenderingContext3D::getTexParameteri):
+ (WebCore::CanvasRenderingContext3D::getTexParameteriv):
+ (WebCore::CanvasRenderingContext3D::getUniformf):
+ (WebCore::CanvasRenderingContext3D::getUniformfv):
+ (WebCore::CanvasRenderingContext3D::getUniformi):
+ (WebCore::CanvasRenderingContext3D::getUniformiv):
+ (WebCore::CanvasRenderingContext3D::getUniformLocation):
+ (WebCore::CanvasRenderingContext3D::getVertexAttribf):
+ (WebCore::CanvasRenderingContext3D::getVertexAttribfv):
+ (WebCore::CanvasRenderingContext3D::getVertexAttribi):
+ (WebCore::CanvasRenderingContext3D::getVertexAttribiv):
+ (WebCore::CanvasRenderingContext3D::getVertexAttribOffset):
+ (WebCore::CanvasRenderingContext3D::texImage2D):
+ (WebCore::CanvasRenderingContext3D::texParameterf):
+ (WebCore::CanvasRenderingContext3D::texParameteri):
+ (WebCore::CanvasRenderingContext3D::texSubImage2D):
+ (WebCore::CanvasRenderingContext3D::uniform1f):
+ (WebCore::CanvasRenderingContext3D::uniform1fv):
+ (WebCore::CanvasRenderingContext3D::uniform1i):
+ (WebCore::CanvasRenderingContext3D::uniform1iv):
+ (WebCore::CanvasRenderingContext3D::uniform2f):
+ (WebCore::CanvasRenderingContext3D::uniform2fv):
+ (WebCore::CanvasRenderingContext3D::uniform2i):
+ (WebCore::CanvasRenderingContext3D::uniform2iv):
+ (WebCore::CanvasRenderingContext3D::uniform3f):
+ (WebCore::CanvasRenderingContext3D::uniform3fv):
+ (WebCore::CanvasRenderingContext3D::uniform3i):
+ (WebCore::CanvasRenderingContext3D::uniform3iv):
+ (WebCore::CanvasRenderingContext3D::uniform4f):
+ (WebCore::CanvasRenderingContext3D::uniform4fv):
+ (WebCore::CanvasRenderingContext3D::uniform4i):
+ (WebCore::CanvasRenderingContext3D::uniform4iv):
+ (WebCore::CanvasRenderingContext3D::uniformMatrix2fv):
+ (WebCore::CanvasRenderingContext3D::uniformMatrix3fv):
+ (WebCore::CanvasRenderingContext3D::uniformMatrix4fv):
+ (WebCore::CanvasRenderingContext3D::useProgram):
+ (WebCore::CanvasRenderingContext3D::validateProgram):
+ (WebCore::CanvasRenderingContext3D::vertexAttrib1f):
+ (WebCore::CanvasRenderingContext3D::vertexAttrib1fv):
+ (WebCore::CanvasRenderingContext3D::vertexAttrib2f):
+ (WebCore::CanvasRenderingContext3D::vertexAttrib2fv):
+ (WebCore::CanvasRenderingContext3D::vertexAttrib3f):
+ (WebCore::CanvasRenderingContext3D::vertexAttrib3fv):
+ (WebCore::CanvasRenderingContext3D::vertexAttrib4f):
+ (WebCore::CanvasRenderingContext3D::vertexAttrib4fv):
+ (WebCore::CanvasRenderingContext3D::vertexAttribPointer):
+ (WebCore::CanvasRenderingContext3D::viewport):
+ * html/canvas/CanvasRenderingContext3D.h:
+ * html/canvas/CanvasRenderingContext3D.idl:
+ * html/canvas/CanvasShortArray.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * html/canvas/CanvasShortArray.h: Added with properties svn:eol-style and svn:mime-type.
+ * html/canvas/CanvasShortArray.idl: Added.
+ * html/canvas/CanvasTexture.cpp:
+ (WebCore::CanvasTexture::CanvasTexture):
+ * html/canvas/CanvasTexture.h:
+ (WebCore::CanvasTexture::isCubeMapRWrapModeInitialized):
+ (WebCore::CanvasTexture::setCubeMapRWrapModeInitialized):
+ * html/canvas/CanvasUnsignedByteArray.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * html/canvas/CanvasUnsignedByteArray.h: Added with properties svn:eol-style and svn:mime-type.
+ * html/canvas/CanvasUnsignedByteArray.idl: Added.
+ * html/canvas/CanvasUnsignedIntArray.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * html/canvas/CanvasUnsignedIntArray.h: Added with properties svn:eol-style and svn:mime-type.
+ * html/canvas/CanvasUnsignedIntArray.idl: Added.
+ * html/canvas/CanvasUnsignedShortArray.cpp: Added with properties svn:eol-style and svn:mime-type.
+ * html/canvas/CanvasUnsignedShortArray.h: Added with properties svn:eol-style and svn:mime-type.
+ * html/canvas/CanvasUnsignedShortArray.idl: Added.
+ * page/DOMWindow.idl:
+ * platform/graphics/GraphicsContext3D.h:
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::beginPaint):
+ (WebCore::GraphicsContext3D::endPaint):
+ (WebCore::GraphicsContext3D::bindTexture):
+ (WebCore::GraphicsContext3D::bufferData):
+ (WebCore::GraphicsContext3D::bufferSubData):
+ (WebCore::GraphicsContext3D::checkFramebufferStatus):
+ (WebCore::GraphicsContext3D::drawArrays):
+ (WebCore::GraphicsContext3D::drawElements):
+ (WebCore::GraphicsContext3D::texParameterf):
+ (WebCore::GraphicsContext3D::texParameteri):
+ (WebCore::GraphicsContext3D::uniform1f):
+ (WebCore::GraphicsContext3D::uniform1fv):
+ (WebCore::GraphicsContext3D::uniform2f):
+ (WebCore::GraphicsContext3D::uniform2fv):
+ (WebCore::GraphicsContext3D::uniform3f):
+ (WebCore::GraphicsContext3D::uniform3fv):
+ (WebCore::GraphicsContext3D::uniform4f):
+ (WebCore::GraphicsContext3D::uniform4fv):
+ (WebCore::GraphicsContext3D::uniform1i):
+ (WebCore::GraphicsContext3D::uniform1iv):
+ (WebCore::GraphicsContext3D::uniform2i):
+ (WebCore::GraphicsContext3D::uniform2iv):
+ (WebCore::GraphicsContext3D::uniform3i):
+ (WebCore::GraphicsContext3D::uniform3iv):
+ (WebCore::GraphicsContext3D::uniform4i):
+ (WebCore::GraphicsContext3D::uniform4iv):
+ (WebCore::GraphicsContext3D::uniformMatrix2fv):
+ (WebCore::GraphicsContext3D::uniformMatrix3fv):
+ (WebCore::GraphicsContext3D::uniformMatrix4fv):
+ (WebCore::GraphicsContext3D::vertexAttrib1f):
+ (WebCore::GraphicsContext3D::vertexAttrib1fv):
+ (WebCore::GraphicsContext3D::vertexAttrib2f):
+ (WebCore::GraphicsContext3D::vertexAttrib2fv):
+ (WebCore::GraphicsContext3D::vertexAttrib3f):
+ (WebCore::GraphicsContext3D::vertexAttrib3fv):
+ (WebCore::GraphicsContext3D::vertexAttrib4f):
+ (WebCore::GraphicsContext3D::vertexAttrib4fv):
+ (WebCore::GraphicsContext3D::vertexAttribPointer):
+ (WebCore::GraphicsContext3D::getBoolean):
+ (WebCore::GraphicsContext3D::getBooleanv):
+ (WebCore::GraphicsContext3D::getFloat):
+ (WebCore::GraphicsContext3D::getFloatv):
+ (WebCore::GraphicsContext3D::getInteger):
+ (WebCore::GraphicsContext3D::getIntegerv):
+ (WebCore::GraphicsContext3D::getBufferParameteri):
+ (WebCore::GraphicsContext3D::getBufferParameteriv):
+ (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteri):
+ (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
+ (WebCore::GraphicsContext3D::getProgrami):
+ (WebCore::GraphicsContext3D::getProgramiv):
+ (WebCore::GraphicsContext3D::getRenderbufferParameteri):
+ (WebCore::GraphicsContext3D::getRenderbufferParameteriv):
+ (WebCore::GraphicsContext3D::getShaderi):
+ (WebCore::GraphicsContext3D::getShaderiv):
+ (WebCore::GraphicsContext3D::getTexParameterf):
+ (WebCore::GraphicsContext3D::getTexParameterfv):
+ (WebCore::GraphicsContext3D::getTexParameteri):
+ (WebCore::GraphicsContext3D::getTexParameteriv):
+ (WebCore::GraphicsContext3D::getUniformf):
+ (WebCore::GraphicsContext3D::getUniformfv):
+ (WebCore::GraphicsContext3D::getUniformi):
+ (WebCore::GraphicsContext3D::getUniformiv):
+ (WebCore::GraphicsContext3D::getVertexAttribf):
+ (WebCore::GraphicsContext3D::getVertexAttribfv):
+ (WebCore::GraphicsContext3D::getVertexAttribi):
+ (WebCore::GraphicsContext3D::getVertexAttribiv):
+ (WebCore::GraphicsContext3D::getVertexAttribOffset):
+ (WebCore::GraphicsContext3D::texImage2D):
+ (WebCore::GraphicsContext3D::texSubImage2D):
+ (WebCore::GraphicsContext3D::sizeInBytes):
+
+2009-09-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Make m_windowVisible more consistent with the actual visibility of the inspector.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::setWindowVisible):
+
+2009-09-07 Adam Barth <abarth@webkit.org>
+
+ Unreviewed speculative build fix for Snow Leopard.
+
+ * platform/GeolocationService.cpp:
+ (WebCore::createGeolocationServiceNull):
+
+2009-09-07 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ Adds a mock Geolocation service. This will be used to provide predictable behavior of the
+ Geolocation API for use in LayoutTests. Later changes will integrate the the mock
+ Geolocation service with DumpRenderTree.
+ https://bugs.webkit.org/show_bug.cgi?id=28264
+
+ The mock Geolocation service returns a fixed position or error. This position or error can be
+ set through static methods on the GeolocationService class. The position or error is shared
+ between all instances of the mock Geolocation service.
+
+ Implementation details.
+ The GeolocationService object maintains a pointer to a factory function which it uses to create
+ Geolocation service instances. Each platform implementing Geolocation sets this pointer
+ to the factory function for their platform's implementation. When the mock Geolocation service
+ is activated, the factory function pointer is reset to the factory function for the mock service.
+
+ Test: fast/dom/Geolocation/error.html
+
+ * WebCore.base.exp: Modified. Exports GeolocationServiceMock methods.
+ * GNUMakefile.am: Modified. Added GeolocationServiceMock files.
+ * WebCore.gypi: Modified. Added GeolocationServiceMock files.
+ * WebCore.pro: Modified. Added GeolocationServiceMock files.
+ * WebCore.vcproj/WebCore.vcproj: Modified. Added GeolocationServiceMock files.
+ * WebCore.vcproj/WebCoreCommon.vsprops: Modified. Added mock directory to includes.
+ * WebCore.xcodeproj/project.pbxproj: Modified. Added GeolocationServiceMock files and exports some headers.
+ * WebCoreSources.bkl: Modified. Added GeolocationServiceMock files.
+ * page/ChromeClient.h: Modified. Fixed comment.
+ * page/Geolocation.cpp: Modified.
+ (WebCore::Geolocation::setIsAllowed): Modified. Fixed error string.
+ * platform/GeolocationService.cpp: Modified.
+ (WebCore::createGeolocationServiceNull): Added. Returns null in place of a Geolocation service. Used to avoid link errors on platforms where Geolocation is not implemented.
+ (WebCore::GeolocationService::create): Added. Uses the factory function pointer to create a Geolocation service implementation.
+ (WebCore::GeolocationService::useMock): Added. Configures the GeolocationServie to use the mock implementation.
+ * platform/GeolocationService.h: Modified.
+ * platform/mock: Added.
+ * platform/mock/GeolocationServiceMock.cpp: Added.
+ (WebCore::GeolocationServiceMock::create): Added. Creates a GeolocationServiceMock object.
+ (WebCore::GeolocationServiceMock::GeolocationServiceMock): Added. Constructor.
+ (WebCore::GeolocationServiceMock::~GeolocationServiceMock): Added. Destructor.
+ (WebCore::GeolocationServiceMock::setPosition): Added. Sets the position that will be returned by the object.
+ (WebCore::GeolocationServiceMock::setError): Added. Sets the error that will be returned by the object.
+ (WebCore::GeolocationServiceMock::startUpdating): Added. GeolocationService implementation. Starts the service.
+ (WebCore::GeolocationServiceMock::stopUpdating): Added. GeolocationService implementation. Stops the service.
+ (WebCore::GeolocationServiceMock::timerFired): Added. Used to provide an asynchronous callback when the service is started.
+ (WebCore::GeolocationServiceMock::makeGeolocationCallbackFromAllInstances): Added. Used to call back when the position or error is updated.
+ (WebCore::GeolocationServiceMock::makeGeolocationCallback): Added. Used to call back when the service starts.
+ (WebCore::GeolocationServiceMock::initStatics): Added. Initializes statics members with constructors.
+ (WebCore::GeolocationServiceMock::cleanUpStatics): Added. Cleans up static members with constructors.
+ * platform/mock/GeolocationServiceMock.h: Added.
+ (WebCore::GeolocationServiceMock::lastPosition): Added. Returns the fixed position.
+ (WebCore::GeolocationServiceMock::lastError): Added. Returns the fixed error.
+ * platform/gtk/GeolocationServiceGtk.cpp: Modified.
+ (WebCore::GeolocationServiceGtk::create): Added. Creates an instance of GeolocationServiceGtk.
+ * platform/gtk/GeolocationServiceGtk.h: Modified.
+ * platform/mac/GeolocationServiceMac.h: Modified.
+ * platform/mac/GeolocationServiceMac.mm: Modified.
+ (WebCore::GeolocationServiceMac::create): Added. Creates an instance of GeolocationServiceMac.
+
+2009-09-07 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28985
+
+ We need to be slightly more careful about how we pick up a script
+ execution context. In particular, we were getting the wrong document
+ for frames that had been navigated somewhere else.
+
+ In the long term, we should think about a better algorithm for
+ computing the script context.
+
+ Fixes LayoutTests/http/tests/xmlhttprequest/detaching-frame-2.html
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::retrieveFrame):
+
+2009-09-07 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix for 2.8 compilation.
+
+ * platform/wx/wxcode/mac/carbon/scrollbar_render.cpp:
+ (wxRenderer_DrawScrollbar):
+
+2009-09-07 Drew Wilson <atwilson@google.com>
+
+ Unreviewed build fix.
+
+ Reverting r48121 to fix Windows build errors.
+
+ * DerivedSources.cpp:
+ * GNUmakefile.am:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ * bindings/js/JSEventTarget.cpp:
+ (WebCore::toJS):
+ (WebCore::toEventTarget):
+ * dom/EventTarget.cpp:
+ * dom/EventTarget.h:
+ * page/DOMWindow.idl:
+ * websockets/WebSocket.cpp:
+ (WebCore::WebSocket::connect):
+ (WebCore::WebSocket::send):
+ (WebCore::WebSocket::close):
+ (WebCore::WebSocket::bufferedAmount):
+ (WebCore::WebSocket::addEventListener):
+ (WebCore::WebSocket::removeEventListener):
+ (WebCore::WebSocket::dispatchEvent):
+ (WebCore::WebSocket::didConnect):
+ (WebCore::WebSocket::didReceiveMessage):
+ (WebCore::WebSocket::didClose):
+ (WebCore::WebSocket::dispatchOpenEvent):
+ (WebCore::WebSocket::dispatchMessageEvent):
+ (WebCore::WebSocket::dispatchCloseEvent):
+ * websockets/WebSocket.h:
+ (WebCore::WebSocket::create):
+ (WebCore::WebSocket::):
+ (WebCore::WebSocket::setOnopen):
+ (WebCore::WebSocket::onopen):
+ (WebCore::WebSocket::setOnmessage):
+ (WebCore::WebSocket::onmessage):
+ (WebCore::WebSocket::setOnclose):
+ (WebCore::WebSocket::onclose):
+ (WebCore::WebSocket::toWebSocket):
+ (WebCore::WebSocket::refEventTarget):
+ (WebCore::WebSocket::derefEventTarget):
+ * websockets/WebSocketChannel.cpp: Removed.
+ * websockets/WebSocketChannel.h: Removed.
+ * websockets/WebSocketChannelClient.h: Removed.
+ * websockets/WebSocketHandshake.cpp: Removed.
+ * websockets/WebSocketHandshake.h: Removed.
+
+2009-09-07 Drew Wilson <atwilson@google.com>
+
+ Unreviewed speculative build fix.
+
+ Reverted previous build fix as it didn't fix the problem.
+
+ * bindings/js/JSEventTarget.cpp:
+ (WebCore::toEventTarget):
+
+2009-09-07 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed, build fix.
+
+ [Qt] Fix build after SHARED_WORKERS are enabled by default (r48131)
+
+ * WebCore.pro:
+
+2009-09-07 Drew Wilson <atwilson@google.com>
+
+ Unreviewed build fix.
+
+ Temporarily removed depenency between JSEventTarget.cpp and WebSocket.h in an attempt to fix a windows build break.
+
+ * bindings/js/JSEventTarget.cpp:
+ (WebCore::toEventTarget):
+
+2009-09-07 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ Enable SHARED_WORKERS by default.
+ https://bugs.webkit.org/show_bug.cgi?id=28959
+
+ Tests (enabled in a separate patch):
+ fast/workers/shared-worker-constructor.html
+ fast/workers/shared-worker-context-gc.html
+ fast/workers/shared-worker-event-listener.html
+ fast/workers/shared-worker-exception.html
+ fast/workers/shared-worker-frame-lifecycle.html
+ fast/workers/shared-worker-gc.html
+ fast/workers/shared-worker-lifecycle.html
+ fast/workers/shared-worker-load-error.html
+ fast/workers/shared-worker-location.html
+ fast/workers/shared-worker-navigator.html
+ fast/workers/shared-worker-replace-global-constructor.html
+ fast/workers/shared-worker-replace-self.html
+ fast/workers/shared-worker-shared.html
+ fast/workers/shared-worker-simple.html
+ http/tests/workers/shared-worker-importScripts.html
+ http/tests/workers/shared-worker-redirect.html
+ http/tests/xmlhttprequest/workers/shared-worker-close.html
+ http/tests/xmlhttprequest/workers/shared-worker-methods-async.html
+ http/tests/xmlhttprequest/workers/shared-worker-methods.html
+ http/tests/xmlhttprequest/workers/shared-worker-xhr-file-not-found.html
+
+ * config.h: Removed some whitespace/touched the file to force a full rebuild on the build-bots.
+ * Configurations/FeatureDefines.xcconfig:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+ * WebCore.vcproj/build-generated-files.sh:
+ * dom/DOMWindow.idl: Removed unnecessary whitespace to force a rebuild on the build-bots to pickup the flag change.
+ * workers/DefaultSharedWorkerRepository.cpp:
+ (WebCore::SharedWorkerScriptLoader::load):
+ Clean up bitrot in SharedWorker code - DenyCrossOriginRedirect is now DenyCrossOriginRequests.
+ * workers/SharedWorkerContext.cpp:
+ (WebCore::SharedWorkerContext::dispatchConnect):
+ Clean up bitrot - updated SharedWorker code to reflect new MessageEvent API.
+
+2009-09-07 Xan Lopez <xlopez@igalia.com>
+
+ Unreviewed build fix.
+
+ Add new file to sources list.
+
+ * GNUmakefile.am:
+
+2009-09-07 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fixes for wx SVN trunk.
+
+ * config.h:
+ * platform/wx/RenderThemeWx.cpp:
+ (WebCore::RenderThemeWx::paintButton):
+ * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp:
+ (WebCore::drawTextWithSpacing):
+ * platform/wx/wxcode/mac/carbon/scrollbar_render.cpp:
+ (wxRenderer_DrawScrollbar):
+
+2009-09-07 Chris Hills <chaz@chaz6.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Use direct includes for Phonon, not the pretty ones
+
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
+
+2009-09-07 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ WebSocket API implementation.
+ https://bugs.webkit.org/show_bug.cgi?id=28038
+
+ Add build systems only for GNUmakefile.am and WebCore.xcodeproj now.
+ Other build systems will be updated once the code is functional.
+ Tests will be landed once the code is completed and functional.
+
+ * DerivedSources.cpp:
+ * GNUmakefile.am:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::webSocket):
+ * bindings/js/JSEventTarget.cpp:
+ (WebCore::toJS):
+ (WebCore::toEventTarget):
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::toWebSocket):
+ * dom/EventTarget.h:
+ * page/DOMWindow.idl:
+ * websockets/WebSocket.cpp:
+ (WebCore::ProcessWebSocketEventTask::create):
+ (WebCore::ProcessWebSocketEventTask::performTask):
+ (WebCore::ProcessWebSocketEventTask::ProcessWebSocketEventTask):
+ (WebCore::isValidProtocolString):
+ (WebCore::WebSocket::connect):
+ (WebCore::WebSocket::send):
+ (WebCore::WebSocket::close):
+ (WebCore::WebSocket::bufferedAmount):
+ (WebCore::WebSocket::addEventListener):
+ (WebCore::WebSocket::removeEventListener):
+ (WebCore::WebSocket::dispatchEvent):
+ (WebCore::WebSocket::didConnect):
+ (WebCore::WebSocket::didReceiveMessage):
+ (WebCore::WebSocket::didClose):
+ (WebCore::WebSocket::dispatchOpenEvent):
+ (WebCore::WebSocket::dispatchMessageEvent):
+ (WebCore::WebSocket::dispatchCloseEvent):
+ * websockets/WebSocket.h:
+ (WebCore::WebSocket::create):
+ (WebCore::WebSocket::):
+ (WebCore::WebSocket::setOnopen):
+ (WebCore::WebSocket::onopen):
+ (WebCore::WebSocket::setOnmessage):
+ (WebCore::WebSocket::onmessage):
+ (WebCore::WebSocket::setOnclose):
+ (WebCore::WebSocket::onclose):
+ (WebCore::WebSocket::toWebSocket):
+ (WebCore::WebSocket::eventListeners):
+ (WebCore::WebSocket::refEventTarget):
+ (WebCore::WebSocket::derefEventTarget):
+ * websockets/WebSocketChannel.cpp: Added.
+ * websockets/WebSocketChannel.h: Added.
+ * websockets/WebSocketChannelClient.h: Added.
+ * websockets/WebSocketHandshake.cpp: Added.
+ * websockets/WebSocketHandshake.h: Added.
+
+2009-09-07 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26854
+ [GTK] Needs API to allow more control over outgoing requests
+
+ Add infrastructure required to provide the new
+ WebKitNetworkResponse object in our API.
+
+ * GNUmakefile.am: Add new files to the build.
+ * platform/network/soup/ResourceRequestSoup.cpp:
+ (WebCore::ResourceRequest::updateFromSoupMessage):
+ * platform/network/soup/ResourceResponse.h:
+ * platform/network/soup/ResourceResponseSoup.cpp: Added.
+ (WebCore::ResourceResponse::toSoupMessage):
+
+2009-09-07 Mads Ager <ager@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Cleanup document/frame null-checking in V8DOMWindowCustom.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=29009
+
+ Be consistent in document and frame null checks.
+
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8Custom::WindowSetTimeoutImpl):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::V8Custom::ClearTimeoutImpl):
+
+2009-09-07 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [Soup] Limit the number of connections
+ https://bugs.webkit.org/show_bug.cgi?id=18431
+
+ Increase the maximum number of per host and total connections to
+ similar values than those used by the other modern browsers. Seems
+ to significantly improve page loading time in many cases.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::ensureSessionIsInitialized):
+
+2009-09-07 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Various minor chromium appcache modifications.
+ https://bugs.webkit.org/show_bug.cgi?id=28960
+
+ No new tests.
+
+ * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
+ Fix a null pointer exception.
+ (WebCore::ACCESSOR_GETTER):
+ * platform/network/chromium/ResourceRequest.h:
+ Switch from appCache 'context' to 'host' terminology.
+ Note: leaving the old deprecated accessors in place until the matching
+ change in chrome is landed to use the new accessors.
+ (WebCore::ResourceRequest::ResourceRequest):
+ (WebCore::ResourceRequest::appCacheHostID):
+ (WebCore::ResourceRequest::setAppCacheHostID):
+ (WebCore::ResourceRequest::appCacheContextID):
+ (WebCore::ResourceRequest::setAppCacheContextID):
+ * platform/network/chromium/ResourceResponse.h:
+ Add an appCacheManifestURL getter/setter.
+ Drop the 'get' prefix from the appCacheID getter.
+ Note: leaving the old deprecated 'get' prefixed accessor in place until the matching
+ change in chrome is landed to use the new accessor.
+ (WebCore::ResourceResponse::appCacheID):
+ (WebCore::ResourceResponse::appCacheManifestURL):
+ (WebCore::ResourceResponse::setAppCacheManifestURL):
+ (WebCore::ResourceResponse::getAppCacheID):
+
+2009-09-07 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28359
+ Cleanup: Undo some accidental changes around DOMApplicationCache.
+ - Restore support for constructing a DOMApplicationCache object with a null frame ptr.
+ - Return a non-null object for window.applicationCache when the feature is disabled.
+ - Simplify the swapCache method.
+
+ Test: http/tests/appcache/disabled.html
+
+ * loader/appcache/DOMApplicationCache.cpp:
+ (WebCore::DOMApplicationCache::DOMApplicationCache):
+ (WebCore::DOMApplicationCache::swapCache):
+ (WebCore::DOMApplicationCache::scriptExecutionContext):
+ * loader/appcache/DOMApplicationCache.h:
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::applicationCache):
+
+2009-09-06 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ hostname and host are mixed up when manipulating anchor elements.
+ https://bugs.webkit.org/show_bug.cgi?id=28954
+
+ handle the case of port 0.
+
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::host):
+
+2009-09-06 Erik Arvidsson <arv@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Make hidden elements not focusable.
+
+ Clean up supportsFocus and isFocusable.
+ supportsFocus now strictly means that the node can be focused by default.
+ This is true for links, form controls and content editable elements for example.
+ isFocusable means that the user can actually focus it.
+ All (2) calls to supportsFocus have been updated to take this into account.
+
+ Make a elements without href work correctly as well.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27099
+
+ Tests: fast/events/click-focus-anchor.html
+ fast/events/tab-focus-anchor.html
+ fast/events/tab-focus-hidden.html
+
+ * dom/Element.cpp:
+ (WebCore::Element::focus):
+ * dom/Node.cpp:
+ (WebCore::Node::supportsFocus):
+ (WebCore::Node::isFocusable):
+ * dom/Node.h:
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::supportsFocus):
+ (WebCore::HTMLAnchorElement::isMouseFocusable):
+ (WebCore::HTMLAnchorElement::isKeyboardFocusable):
+ * html/HTMLAnchorElement.h:
+ * html/HTMLAreaElement.cpp:
+ (WebCore::HTMLAreaElement::supportsFocus):
+ * html/HTMLAreaElement.h:
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::supportsFocus):
+ * html/HTMLElement.h:
+ * html/HTMLFieldSetElement.cpp:
+ (WebCore::HTMLFieldSetElement::supportsFocus):
+ * html/HTMLFieldSetElement.h:
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::supportsFocus):
+ (WebCore::HTMLFormControlElement::isFocusable):
+ * html/HTMLFrameElementBase.cpp:
+ (WebCore::HTMLFrameElementBase::supportsFocus):
+ * html/HTMLFrameElementBase.h:
+ * html/HTMLLegendElement.cpp:
+ (WebCore::HTMLLegendElement::supportsFocus):
+ * html/HTMLLegendElement.h:
+ * html/HTMLOptGroupElement.cpp:
+ (WebCore::HTMLOptGroupElement::supportsFocus):
+ (WebCore::HTMLOptGroupElement::isFocusable):
+ * html/HTMLOptGroupElement.h:
+ * html/HTMLOptionElement.cpp:
+ (WebCore::HTMLOptionElement::supportsFocus):
+ (WebCore::HTMLOptionElement::isFocusable):
+ * html/HTMLOptionElement.h:
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::dispatchMouseEvent):
+ * page/FocusController.cpp:
+ (WebCore::FocusController::advanceFocus):
+ * svg/SVGAElement.cpp:
+ (WebCore::SVGAElement::supportsFocus):
+ (WebCore::SVGAElement::isFocusable):
+ * wml/WMLAElement.cpp:
+ (WebCore::WMLAElement::supportsFocus):
+ * wml/WMLAElement.h:
+ * wml/WMLFormControlElement.cpp:
+ (WebCore::WMLFormControlElement::supportsFocus):
+ (WebCore::WMLFormControlElement::isFocusable):
+ * wml/WMLFormControlElement.h:
+
+2009-09-06 Joel Stanley <joel@jms.id.au>
+
+ Reviewed by Dimitri Glazkov.
+
+ Expose functions to set the caret blink interval for Linux Chromium.
+ Default value is set to that of RenderTheme::caretBlankInterval().
+ Uses caretBlinkIntervalInternal to avoid overriding
+ RenderThemeChromiumSkia::caretBlankInterval to preserve the disabling
+ of blinking caret required for layout tests.
+ https://bugs.webkit.org/show_bug.cgi?id=28931
+
+ * rendering/RenderThemeChromiumLinux.cpp:
+ (WebCore::RenderThemeChromiumLinux::RenderThemeChromiumLinux):
+ (WebCore::RenderThemeChromiumLinux::setCaretBlinkInterval):
+ (WebCore::RenderThemeChromiumLinux::caretBlinkIntervalInternal):
+ * rendering/RenderThemeChromiumLinux.h:
+
+2009-09-06 Ada Chan <adachan@apple.com>
+
+ Remove an extra </File> in WebCore.vcproj.
+
+ * WebCore.vcproj/WebCore.vcproj:
+
+2009-09-06 Timothy Hatcher <timothy@apple.com>
+
+ Adds a persistent setting for color format in the Web Inspector.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28889
+
+ Reviewed by Dan Bernstein.
+
+ * English.lproj/localizedStrings.js: New strings.
+ * inspector/front-end/Color.js: Minor style fixes.
+ (WebInspector.Color.prototype.toString): Added. Replaces the individual
+ "toFoo" functions. Takes a optional arguments for the color format to return.
+ * inspector/front-end/Images/paneSettingsButtons.png: Added.
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylesSidebarPane.prototype._changeColorFormat): Update the sections to show
+ the new color format.
+ (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processColor.changeColorDisplay):
+ Use the new toString function on Color.
+ (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processColor): Use the persistent setting
+ to format colors by default. Add a tooltip for the color swatch.
+ * inspector/front-end/inspector.css: New styles for the settings menu.
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded): Initilize the colorFormat preference.
+
+2009-09-06 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Remove Qt v4.6 check from the prefetchDNS implementation
+ https://bugs.webkit.org/show_bug.cgi?id=28993
+
+ * platform/network/qt/DnsPrefetchHelper.cpp:
+ * platform/network/qt/DnsPrefetchHelper.h:
+
+2009-09-06 Cameron McCormack <cam@mcc.id.au>
+
+ Reviewed by Eric Seidel.
+
+ Drop <definition-src> support
+ https://bugs.webkit.org/show_bug.cgi?id=28991
+
+ http://dev.w3.org/SVG/profiles/1.1F2/publish/changes.html#FontsChapter
+
+ * DerivedSources.cpp: Remove references to definition-src.
+ * DerivedSources.make: Ditto.
+ * GNUmakefile.am: Ditto.
+ * WebCore.gypi: Ditto.
+ * WebCore.pro: Ditto.
+ * WebCore.vcproj/WebCore.vcproj: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * bindings/objc/DOM.mm:
+ (WebCore::createElementClassMap): Ditto.
+ * bindings/objc/DOMSVG.h: Ditto.
+ * bindings/v8/DerivedSourcesAllInOne.cpp: Ditto.
+ * bindings/v8/V8DOMWrapper.cpp: Ditto.
+ * bindings/v8/V8Index.cpp: Ditto.
+ * bindings/v8/V8Index.h: Ditto.
+ * svg/SVGAllInOne.cpp: Ditto.
+ * svg/SVGDefinitionSrcElement.cpp: Removed.
+ * svg/SVGDefinitionSrcElement.h: Removed.
+ * svg/SVGDefinitionSrcElement.idl: Removed.
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::SVGFontFaceElement::rebuildFontFace): Don't search for
+ definition-src child.
+ * svg/svgtags.in: Remove definition-src.
+
+2009-09-05 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [Chromium] Roll out http://trac.webkit.org/changeset/48094, because the
+ logic of retrieving default caret blink interval was incorrect (non-existent)
+ and caused layout test flakiness.
+
+ * rendering/RenderThemeChromiumLinux.cpp:
+ * rendering/RenderThemeChromiumLinux.h:
+
+2009-09-05 Jian Li <jianli@chromium.org>
+
+ Reviewed by NOBODY (Chromium reliability build break).
+
+ Back up partial change in r48072 in order to fix chromium reliability build break.
+
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::invokeEventHandler):
+
+2009-09-05 Nicolas Weber <thakis@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28975
+ Fix file upload on chrome/mac. Images that have "Hide Extension" set,
+ such as screenshots by default, can now be uploaded to sites such as
+ imgur.com.
+
+ * platform/FileSystem.h:
+ Add pathGetDisplayFileName().
+ * platform/chromium/FileChooserChromium.cpp:
+ (WebCore::FileChooser::basenameForWidth):
+ Call pathGetDisplayFileName() instead of pathGetFileName().
+ * platform/chromium/FileSystemChromiumLinux.cpp:
+ (WebCore::pathGetDisplayFileName):
+ Implement pathGetDisplayFileName() by delegating to pathGetFileName().
+ * platform/chromium/FileSystemChromiumMac.mm:
+ (WebCore::pathGetFileName):
+ Now returns a real filename instead of a presentational one, which
+ fixes the problem addressed by this change.
+ (WebCore::pathGetDisplayFileName):
+ New function that returns a presentational filename; does what
+ pathGetDisplayFileName() did prior to this patch.
+ * platform/chromium/FileSystemChromiumWin.cpp:
+ (WebCore::pathGetDisplayFileName):
+ Implement pathGetDisplayFileName() by delegating to pathGetFileName().
+
+2009-09-05 Joel Stanley <joel@jms.id.au>
+
+ Reviewed by David Levin.
+
+ Expose functions to set the caret blink interval for Linux Chromium.
+ https://bugs.webkit.org/show_bug.cgi?id=28931
+
+ * rendering/RenderThemeChromiumLinux.cpp:
+ (WebCore::RenderThemeChromiumLinux::setCaretBlinkInterval):
+ (WebCore::RenderThemeChromiumLinux::caretBlinkInterval):
+ * rendering/RenderThemeChromiumLinux.h:
+
+2009-09-04 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by David Levin.
+
+ Prevent UI freeze in case when too many timers are in the timer queue.
+ https://bugs.webkit.org/show_bug.cgi?id=23865
+
+ The fix measures the elapsed time while executing timers. If we have too many
+ timers and it takes significant time to fire, quit the loop and reschedule.
+ This lets the run loop process user input (close the window for example).
+
+ * platform/ThreadTimers.h:
+ * platform/ThreadTimers.cpp:
+ (WebCore::ThreadTimers::sharedTimerFiredInternal):
+ (WebCore::ThreadTimers::fireTimersInNestedEventLoop):
+ Removed functions and members used before to grab a list of all expired timers.
+ Now we fetch one by one, measuring time and quitting the loop if it takes too long.
+ * platform/Timer.cpp:
+ (WebCore::TimerBase::isActive):
+ (WebCore::TimerBase::setNextFireTime):
+ Since timers are now fired one by one, there is no need to keep track of updated timers.
+ * manual-tests/input-starved-by-timers.html: Manual test that attempts to freeze browser by
+ creating of enough timers. It then keeps UI frozen and after 10 seconds starts to drain the timers
+ so the browser un-freezes. This is instead of a regular layout test because we don't have a way
+ to inject an input events via regular run loop in DRT - instead they are directly dispatched by
+ eventSender, which does not reproduce the UI freeze that happens with real input.
+
+2009-09-04 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ <rdar://problem/7201063>
+
+ Detach any custom scrollbars before detaching the document.
+
+ * page/Frame.cpp:
+ (WebCore::Frame::setView):
+
+2009-09-04 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed, build fix.
+
+ Remove remaining references to UserStyleSheetLoader after r48075.
+
+ * WebCore.gypi:
+ * WebCore.xcodeproj/project.pbxproj:
+ * page/qt/FrameQt.cpp:
+ * page/wince/FrameWince.cpp:
+
+2009-09-04 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28988
+ Minor fix: "novalidate" attribute renamed in "noValidate", according to
+ HTML5 specs:
+ http://www.whatwg.org/specs/web-apps/current-work/#dom-fs-novalidate
+
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::noValidate):
+ (WebCore::HTMLFormElement::setNoValidate):
+ * html/HTMLFormElement.h:
+ * html/HTMLFormElement.idl:
+
+2009-09-04 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by David Levin.
+
+ Remove unused line of code from WorkerContext
+ https://bugs.webkit.org/show_bug.cgi?id=28990
+
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::importScripts):
+
+2009-09-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix assertion seen when running buildbot.
+
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::DOMObjectWithGlobalPointer::createStructure): Create the structure without
+ the HasDefaultMark bit since this has a custom mark function.
+
+2009-09-04 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28984, remove the remote stylesheet loader on Mac/Qt.
+ Make sure the other code path (now used by everybody) can handle data URLs.
+
+ As per the post on webkit-dev, the ability to work remotely isn't working properly anyway (it doesn't
+ hold up the pending sheet count, so you'd just FOUC on every Web page), and it's extremely unlikely
+ that anybody is relying on this support.
+
+ Tor Arne agreed it was ok to disable (he enabled it on the Qt side), and only Mac/Qt were using this
+ code.
+
+ * WebCore.pro:
+ * WebCore.xcodeproj/project.pbxproj:
+ * dom/Document.cpp:
+ (WebCore::Document::userStyleSheet):
+ * dom/Document.h:
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::begin):
+ * loader/UserStyleSheetLoader.cpp: Removed.
+ * loader/UserStyleSheetLoader.h: Removed.
+ * page/Frame.cpp:
+ (WebCore::Frame::reapplyStyles):
+ * page/Frame.h:
+ * page/Page.cpp:
+ (WebCore::Page::userStyleSheetLocationChanged):
+ (WebCore::Page::userStyleSheet):
+ * page/mac/FrameMac.mm:
+ * page/qt/FrameQt.cpp:
+
+2009-09-04 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Add "sampling profiler" preference, simplify data display when it's set.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28969
+
+ * inspector/front-end/ProfileDataGridTree.js:
+ (WebInspector.ProfileDataGridNode.prototype.get data.formatMilliseconds):
+ (WebInspector.ProfileDataGridNode.prototype.get data):
+ * inspector/front-end/ProfileView.js:
+ (WebInspector.ProfileView):
+ * inspector/front-end/inspector.js:
+
+2009-09-04 Jian Li <jianli@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Run-time exception in onmessage handler is not forwarded to the worker object.
+ https://bugs.webkit.org/show_bug.cgi?id=28980
+
+ Tested by worker-close.html.
+
+ * bindings/v8/ScriptFunctionCall.cpp:
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::invokeEventHandler):
+ * bindings/v8/V8Utilities.cpp:
+ (WebCore::getScriptExecutionContext):
+ (WebCore::reportException):
+ * bindings/v8/V8Utilities.h:
+ (WebCore::getScriptExecutionContext):
+ * bindings/v8/custom/V8MessageChannelConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8SharedWorkerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-09-04 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Remove unused m_sheet variable and setCSSStyleSheet methods.
+
+ * dom/Document.cpp:
+ * dom/Document.h:
+
+2009-09-04 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by David Hyatt and Adele Peterson.
+
+ (Based on a patch from Adele).
+
+ Fix <rdar://problem/7185875>.
+
+ * page/Frame.cpp:
+ (WebCore::Frame::setView):
+ Detach any custom scroll bars from the old view.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::detachCustomScrollbars):
+ Simplify the check (and make it work when body is null) by just checking that the scroll bar owner is
+ not a RenderPart object.
+
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::destroy):
+ ASSERT that frame() is not null here and also add a null check so that release builds won't crash.
+
+2009-09-04 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Make m_userStyleSheetLoader in Frame an OwnPtr.
+
+ * page/Frame.cpp:
+ (WebCore::Frame::Frame):
+ (WebCore::Frame::~Frame):
+ * page/Frame.h:
+ * page/mac/FrameMac.mm:
+ (WebCore::Frame::setUserStyleSheetLocation):
+ (WebCore::Frame::setUserStyleSheet):
+
+2009-09-04 Timothy Hatcher <timothy@apple.com>
+
+ Show color swatches in the Web Inspector before the color text so clicking them will not
+ shift the swatch. Also makes multiple swatches in the single property toggle the color format.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28978
+
+ Reviewed by Darin Adler.
+
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertyTreeElement.prototype.updateTitle): Some refactoring to consolidate
+ the processing we do on the property value. This eliminated the old nickname code, since the new
+ WebInspector.Color class handles this. We could also simplify the color regex since more
+ is handled by the Color class. Also no longer uses innerHTML for the linkify code.
+ (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processValue): Helper function to
+ process a value given a regex and processor functions.
+ (WebInspector.StylePropertyTreeElement.prototype.updateTitle.linkifyURL): Make an anchor for the
+ URL with "url()" syntax surrounding it.
+ (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processColor): Makes a color, if
+ there was an exception just return a text node.
+ (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processColor.changeColorDisplay.changeTo):
+ Moved from later in the file.
+ (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processColor.changeColorDisplay): Ditto.
+ * inspector/front-end/inspector.css:
+
+2009-09-04 Mark Mentovai <mark@chromium.org>
+
+ Reviewed by Dave Hyatt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28614
+
+ Account for scrollbar state changes that occur during layout.
+
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::updateScrollbars):
+
+ Perform a layout prior to checking whether the scrollbar modes are
+ off, on, or automatic. The modes may change during layout.
+
+ * WebCore.base.exp:
+ * WebCore.order:
+ * page/Frame.cpp:
+ (WebCore::Frame::createView):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::FrameView):
+ (WebCore::FrameView::resetScrollbars):
+ (WebCore::FrameView::layout):
+ * page/FrameView.h:
+ * platform/ScrollView.h:
+
+ Eliminate duplicated (and incorrect) scrollbar mode tracking between
+ FrameView and ScrollView.
+
+2009-09-04 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ hostname and host are mixed up when manipulating anchor elements.
+ https://bugs.webkit.org/show_bug.cgi?id=28954
+
+ Swapped the implementation of host and hostname, and made sure not to return
+ the port number if it is default for the given protocol.
+ FireFox also avoids returning the protocol number if it is default.
+
+ Test: fast/dom/Element/hostname-host.html
+
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::host):
+ (WebCore::HTMLAnchorElement::hostname):
+ * page/SecurityOrigin.cpp:
+ (WebCore::SecurityOrigin::isDefaultPortForProtocol):
+ * page/SecurityOrigin.h:
+
+2009-09-04 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler and Steve Falkenburg.
+
+ Fix <rdar://problem/7192902>.
+
+ Add the necessary plumbing for having QTMovieWin use WebCore timers.
+
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+ (WebCore::TaskTimer::initialize):
+ Create the timer and call QTMovieWin::setTaskTimerFuncs.
+
+ (WebCore::TaskTimer::setTaskTimerDelay):
+ Start the timer.
+
+ (WebCore::TaskTimer::stopTaskTimer):
+ Stop the timer.
+
+ (WebCore::TaskTimer::fired):
+ Call QTMovieWin::taskTimerFired().
+
+ (WebCore::MediaPlayerPrivate::load):
+ Initialize the Task timer.
+
+ * platform/graphics/win/QTMovieWin.cpp:
+ (updateTaskTimer):
+ Call the global stopTaskTimer function and setTaskTimerDelay.
+
+ (QTMovieWin::taskTimerFired):
+ Make this a member function.
+
+ (QTMovieWin::setTaskTimerFuncs):
+ Set the global function pointers.
+
+ (QTMovieWin::initializeQuickTime):
+ (DllMain):
+ No need to use the QT shared timer.
+ * platform/graphics/win/QTMovieWin.h:
+
+2009-09-04 Tony Chang <tony@chromium.org>
+
+ Reviewed by David Levin.
+
+ Fix Chromium Win compile. Missing return statement in
+ WebCore::RenderThemeChromiumSkia::paintSliderThumb.
+ https://bugs.webkit.org/show_bug.cgi?id=28974
+
+ No new tests, build fix.
+
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::paintSliderThumb):
+
+2009-09-04 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [Chromium] Rolling out http://trac.webkit.org/changeset/48035, because it broke
+ the build.
+ https://bugs.webkit.org/show_bug.cgi?id=28696
+
+2009-09-04 Anders Carlsson <andersca@apple.com>
+
+ Fix vcproj file.
+
+ * WebCore.vcproj/WebCore.vcproj:
+
+2009-09-03 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28890, make simple user script injection work.
+
+ This patch adds new API for adding and removing user scripts from page groups. User scripts
+ are bundled together in isolated worlds (you can have multiple scripts together in the same
+ world).
+
+ Added userscripts/ directory for holding new tests (along with a simple test of script injection).
+
+ * WebCore.base.exp:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluateInIsolatedWorld):
+ * bindings/js/ScriptController.h:
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::evaluateInIsolatedWorld):
+ * bindings/v8/ScriptController.h:
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::finishedParsing):
+ (WebCore::FrameLoader::dispatchDocumentElementAvailable):
+ * page/Frame.cpp:
+ (WebCore::Frame::injectUserScripts):
+ (WebCore::Frame::injectUserScriptsForWorld):
+ * page/Frame.h:
+ * page/PageGroup.cpp:
+ (WebCore::PageGroup::~PageGroup):
+ (WebCore::PageGroup::addUserScript):
+ (WebCore::PageGroup::removeUserContentForWorld):
+ (WebCore::PageGroup::removeAllUserContent):
+ * page/PageGroup.h:
+ (WebCore::PageGroup::userScripts):
+ * page/UserScript.h: Added.
+ (WebCore::UserScript::UserScript):
+ (WebCore::UserScript::source):
+ (WebCore::UserScript::url):
+ (WebCore::UserScript::patterns):
+ (WebCore::UserScript::worldID):
+ (WebCore::UserScript::injectionTime):
+ * page/UserScriptTypes.h: Added.
+ (WebCore::):
+
+2009-09-04 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26402
+ Crashes when using a detached DocumentType node
+
+ Test: fast/dom/DOMImplementation/detached-doctype.html
+
+ DocumentType nodes are the only one that can have null document(), and they can never have
+ children, so they are a degenerate case for NodeLists.
+
+ * dom/Node.cpp:
+ (WebCore::Node::childNodes): Don't try register node list with document if there's no
+ document. Since there are no changes possible for a DocumentType's node list, this is not
+ necessary.
+ (WebCore::Node::registerDynamicNodeList): Ditto.
+ (WebCore::Node::unregisterDynamicNodeList): Ditto. I couldn't find a scenario where this
+ was invoked for a DocumentType node, but I also couldn't prove that it can't be (the
+ de-registration code path that I saw taken was via Node destructor, and that already has
+ a null check for document).
+
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::addEventListener): Bail out if there is no document (just as we already do
+ if there is no window).
+ (WebCore::JSNode::removeEventListener): Ditto.
+
+2009-09-04 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] loadFinished never emitted
+ https://bugs.webkit.org/show_bug.cgi?id=28935
+
+ Do not report errors right away from
+ ResourceHandle::start. Instead return true and schedule an error
+ to be reported in the handle later. Otherwise WebCore gets
+ confused and thinks the resource never finished loading, making it
+ not emit the finished status.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::startHttp):
+ (WebCore::):
+
+2009-09-04 Ben Murdoch <benm@google.com>
+
+ Reviewed by Eric Seidel.
+
+ [V8] DOM Storage bindings: Event Handler should create StorageEvents
+ https://bugs.webkit.org/show_bug.cgi?id=28942
+
+ Tests:
+ Causes the following tests that were failing with V8 to pass:
+ * storage/domstorage/localstorage/onstorage-attribute-setwindow.html
+ * storage/domstorage/localstorage/complex-keys.html
+ * storage/domstorage/localstorage/onstorage-attribute-markup.html
+ * storage/domstorage/localstorage/simple-events.html
+ * storage/domstorage/localstorage/onstorage-attribute-set-attribute.html
+ * storage/domstorage/localstorage/index-get-and-set.html
+ * storage/domstorage/sessionstorage/onstorage-attribute-setwindow.html
+ * storage/domstorage/sessionstorage/onstorage-attribute-markup.html
+ * storage/domstorage/sessionstorage/simple-events.html
+ * storage/domstorage/sessionstorage/onstorage-attribute-set-attribute.html
+ * storage/domstorage/sessionstorage/index-get-and-set.html
+
+ Code changes:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertEventToV8Object): Create StorageEvents.
+ * bindings/v8/custom/V8StorageCustom.cpp:
+ (WebCore::storageGetter): Check if we are retrieving the length property and return the number of items in the object rather than a property named length when invoking the getItem() member of local/sessionStorage.
+
+2009-09-03 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28911
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::dispatchOnInjectedScript):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.doEvalInWindow):
+ (WebInspector.ConsoleView.prototype._formatarray):
+ (WebInspector.ConsoleView.prototype._formatnode):
+ * inspector/front-end/DOMAgent.js:
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
+ (WebInspector.ElementsPanel.prototype.searchCanceled):
+ (WebInspector.ElementsPanel.prototype.performSearch):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.dispatch):
+ * inspector/front-end/InjectedScriptAccess.js: Added.
+ (InjectedScriptAccess._installHandler.InjectedScriptAccess.methodName):
+ (InjectedScriptAccess._installHandler):
+ * inspector/front-end/MetricsSidebarPane.js:
+ (WebInspector.MetricsSidebarPane.prototype.update):
+ (WebInspector.MetricsSidebarPane.prototype.editingCommitted):
+ * inspector/front-end/ObjectPropertiesSection.js:
+ (WebInspector.ObjectPropertiesSection.prototype.update):
+ (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
+ (WebInspector.ObjectPropertyTreeElement.prototype.applyExpression):
+ * inspector/front-end/PropertiesSidebarPane.js:
+ (WebInspector.PropertiesSidebarPane.prototype.update):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame):
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylesSidebarPane.prototype.update):
+ (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
+ (WebInspector.BlankStylePropertiesSection.prototype.editingCommitted):
+ (WebInspector.StylePropertyTreeElement.prototype):
+ * inspector/front-end/inspector.html:
+
+2009-09-04 Tony Chang <tony@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Implement <input type="range"> for Chromium Linux by painting
+ the slider and the thumb using skia.
+ https://bugs.webkit.org/show_bug.cgi?id=28928
+
+ Covered by existing tests (we're currently hitting an assert for them).
+
+ * rendering/RenderThemeChromiumLinux.cpp:
+ (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
+ * rendering/RenderThemeChromiumLinux.h:
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::drawVertLine):
+ (WebCore::drawHorizLine):
+ (WebCore::drawBox):
+ (WebCore::RenderThemeChromiumSkia::paintSliderTrack):
+ (WebCore::RenderThemeChromiumSkia::paintSliderThumb):
+ * rendering/RenderThemeChromiumSkia.h:
+
+2009-09-04 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ - Implement <input type=color> as a text field.
+ - ValidityState::typeMismatch supports for type=color.
+ https://bugs.webkit.org/show_bug.cgi?id=28966
+
+ Tests: fast/forms/ValidityState-patternMismatch-unsupported.html
+ fast/forms/ValidityState-typeMismatch-color.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::valueMissing):
+ (WebCore::HTMLInputElement::patternMismatch):
+ (WebCore::HTMLInputElement::setInputType):
+ (WebCore::HTMLInputElement::formControlType):
+ (WebCore::HTMLInputElement::saveFormControlState):
+ (WebCore::HTMLInputElement::restoreFormControlState):
+ (WebCore::HTMLInputElement::accessKeyAction):
+ (WebCore::HTMLInputElement::rendererIsNeeded):
+ (WebCore::HTMLInputElement::createRenderer):
+ (WebCore::HTMLInputElement::appendFormData):
+ (WebCore::HTMLInputElement::valueWithDefault):
+ (WebCore::HTMLInputElement::storesValueSeparateFromAttribute):
+ (WebCore::HTMLInputElement::defaultEventHandler):
+ (WebCore::HTMLInputElement::isRequiredFormControl):
+ (WebCore::HTMLInputElement::dataList):
+ * html/HTMLInputElement.h:
+ (WebCore::HTMLInputElement::):
+ (WebCore::HTMLInputElement::isTextField):
+ * html/ValidityState.cpp:
+ (WebCore::ValidityState::typeMismatch):
+ (WebCore::ValidityState::isValidColorString):
+ * html/ValidityState.h:
+
+2009-09-04 Mads Ager <ager@chromium.org>
+
+ Reviewed by David Levin.
+
+ [V8] Crash when updating document cache
+ https://bugs.webkit.org/show_bug.cgi?id=28965
+
+ Initialization of a V8 JavaScript context can fail. When that
+ happens, do not attempt to update the document wrapper cache.
+
+ This code path is exercised by http/tests/security/javascriptURL/javascriptURL-in-new-iframe.html.
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::updateDocument):
+
+2009-09-04 Yaar Schnitman <yaar@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Two bugs:
+
+ https://bugs.webkit.org/show_bug.cgi?id=25489
+ CSS property background-position is now serialized in shorthand string as
+ background-position-x background-position-y, as the specification requires
+ (See http://www.w3.org/TR/2008/WD-css3-background-20080910/#the-background-position).
+
+
+ https://bugs.webkit.org/show_bug.cgi?id=26541
+ CSS background-color is now be serialized before other background properties,
+ as CSS specification requires (See http://dev.w3.org/csswg/cssom/#css-value).
+
+ An existing layout test that accepted wrong order and skipped position test
+ had to be modified.
+
+ * css/CSSMutableStyleDeclaration.cpp:
+ (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
+
+2009-09-03 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add support for HTMLTextAreaElement.textLength
+ https://bugs.webkit.org/show_bug.cgi?id=28929
+
+ Test: fast/forms/textarea-textlength.html
+
+ * html/HTMLTextAreaElement.h:
+ (WebCore::HTMLTextAreaElement::textLength):
+ * html/HTMLTextAreaElement.idl:
+
+2009-09-03 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7180197>, https://bugs.webkit.org/show_bug.cgi?id=28822
+ REGRESSION(r31231): Creating document with current document's DOCTYPE causes crashes
+
+ Test: fast/dom/DOMImplementation/createDocument-with-used-doctype.html
+
+ * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): Even though we
+ cannot raise an exception immediately out of fear of breaking Acid3, we shouldn't use a
+ DocumentType node in two documents.
+
+2009-09-03 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Page Cache should support pages with Frames.
+ https://bugs.webkit.org/show_bug.cgi?id=13631
+
+ Tests: fast/events/pageshow-pagehide-on-back-cached-with-frames.html
+ fast/loader/frames-with-unload-handlers-in-page-cache.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::canCachePageContainingThisFrame):
+ (WebCore::FrameLoader::logCanCacheFrameDecision):
+
+2009-09-03 Steve VanDeBogart <vandebo@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Handle middle click in Chromium like QT
+ https://bugs.webkit.org/show_bug.cgi?id=28696
+
+ Tested by middle-click-onpaste.html.
+
+ * platform/Pasteboard.h:
+ * platform/chromium/ChromiumBridge.h:
+ * platform/chromium/ClipboardChromium.cpp:
+ (WebCore::ClipboardChromium::getData):
+ * platform/chromium/PasteboardChromium.cpp:
+ (WebCore::Pasteboard::Pasteboard):
+ (WebCore::Pasteboard::isSelectionMode):
+ (WebCore::Pasteboard::setSelectionMode):
+ (WebCore::Pasteboard::canSmartReplace):
+ (WebCore::Pasteboard::plainText):
+ (WebCore::Pasteboard::documentFragment):
+ * platform/chromium/PasteboardPrivate.h:
+ (WebCore::PasteboardPrivate::):
+
+2009-09-03 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ More partial work towards "Page Cache should support pages with Frames"
+ https://bugs.webkit.org/show_bug.cgi?id=13631
+
+ Fix a bug where subframes weren't asked if they were cacheable.
+
+ No new tests, especially since page caching for frames isn't turned on yet.
+ A layout test will come in my next patch, which enables frames in the page cache.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::canCachePageContainingThisFrame):
+
+2009-09-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by eric@webkit.org.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24696
+
+ Added mixed content methods to FrameLoaderClient.
+
+ * loader/EmptyClients.h:
+ (WebCore::EmptyFrameLoaderClient::didDisplayInsecureContent):
+ (WebCore::EmptyFrameLoaderClient::didRunInsecureContent):
+ * loader/FrameLoaderClient.h:
+
+2009-09-03 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ [wx] Frames support
+ https://bugs.webkit.org/show_bug.cgi?id=19041
+
+ * page/wx/EventHandlerWx.cpp:
+ (WebCore::EventHandler::passMousePressEventToSubframe):
+ (WebCore::EventHandler::passMouseMoveEventToSubframe):
+ (WebCore::EventHandler::passMouseReleaseEventToSubframe):
+ (WebCore::EventHandler::passWheelEventToWidget):
+ (WebCore::EventHandler::tabsToAllControls):
+ (WebCore::EventHandler::passSubframeEventToSubframe):
+ (WebCore::EventHandler::passMouseDownEventToWidget):
+ * platform/wx/RenderThemeWx.cpp:
+ (WebCore::nativeWindowForRenderObject):
+ (WebCore::RenderThemeWx::paintButton):
+ (WebCore::RenderThemeWx::paintTextField):
+ (WebCore::RenderThemeWx::paintMenuList):
+ (WebCore::RenderThemeWx::paintMenuListButton):
+ * platform/wx/ScrollbarThemeWx.cpp: Added.
+ (WebCore::ScrollbarTheme::nativeTheme):
+ (WebCore::ScrollbarThemeWx::~ScrollbarThemeWx):
+ (WebCore::ScrollbarThemeWx::scrollbarThickness):
+ (WebCore::ScrollbarThemeWx::hasThumb):
+ (WebCore::ScrollbarThemeWx::buttonSize):
+ (WebCore::ScrollbarThemeWx::backButtonRect):
+ (WebCore::ScrollbarThemeWx::forwardButtonRect):
+ (WebCore::ScrollbarThemeWx::trackRect):
+ (WebCore::ScrollbarThemeWx::paintScrollCorner):
+ (WebCore::ScrollbarThemeWx::paint):
+ * platform/wx/ScrollbarThemeWx.h: Added.
+ (WebCore::ScrollbarThemeWx::hasButtons):
+ * platform/wx/TemporaryLinkStubs.cpp:
+ * platform/wx/wxcode/gtk/scrollbar_render.cpp: Added.
+ (wxStyleForPart):
+ (GetButtonWidget):
+ (wxGetGdkWindowForDC):
+ (wxRenderer_DrawScrollbar):
+ * platform/wx/wxcode/mac/carbon/scrollbar_render.cpp: Added.
+ (wxScrollbarPartToHIPressedState):
+ (wxRenderer_DrawScrollbar):
+ * platform/wx/wxcode/scrollbar_render.h: Added.
+ (calcThumbStartAndLength):
+ * platform/wx/wxcode/win/non-kerned-drawing.cpp:
+ (WebCore::drawTextWithSpacing):
+ * platform/wx/wxcode/win/scrollbar_render.cpp: Added.
+ (GraphicsHDC::GraphicsHDC):
+ (GraphicsHDC::~GraphicsHDC):
+ (GraphicsHDC::operator HDC):
+ (getTSStateForPart):
+ (wxRenderer_DrawScrollbar):
+ * webcore-wx.bkl:
+
+2009-09-03 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Page content is not displayed in case of HTTP status error
+ https://bugs.webkit.org/show_bug.cgi?id=28949
+
+ If the server sent content, show it to the user instead of an error,
+ even if the HTTP status code is not success.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
+ (WebCore::QNetworkReplyHandler::finish):
+ (WebCore::QNetworkReplyHandler::forwardData):
+ (WebCore::QNetworkReplyHandler::resetState):
+ * platform/network/qt/QNetworkReplyHandler.h:
+
+2009-09-03 Drew Wilson <atwilson@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Need to update v8 bindings to support passing multiple ports to postMessage()
+ https://bugs.webkit.org/show_bug.cgi?id=28839
+
+ Added support for passing MessagePortArray to v8 bindings.
+
+ New tests that now pass with V8:
+ fast/events/message-port-multi.html
+ fast/workers/worker-context-multi-port.html
+ fast/workers/worker-multi-port.html
+
+ * WebCore.gypi:
+ Added V8MessageEventCustom.cpp and V8MessagePortCustom.h
+ * bindings/v8/custom/V8CustomBinding.h:
+ Added custom postMessage() handlers for various classes.
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::DOMWindowPostMessage):
+ Added custom handler that supports MessagePortArray.
+ * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
+ (WebCore::DedicatedWorkerContextPostMessage):
+ Added custom handler that supports MessagePortArray.
+ * bindings/v8/custom/V8MessageEventCustom.cpp: Added.
+ (WebCore::MessageEventPorts):
+ Added getter for ports attribute.
+ (WebCore::MessageEventInitMessageEvent):
+ Added custom handler that supports MessagePortArray.
+ * bindings/v8/custom/V8MessagePortCustom.cpp:
+ (WebCore::MessagePortPostMessage):
+ Added custom handler that supports MessagePortArray.
+ (WebCore::getMessagePortArray):
+ Added helper function that supports converting from a sequence-like object to a MessagePortArray.
+ * bindings/v8/custom/V8MessagePortCustom.h: Added.
+ Added declaration for getMessagePortArray().
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ (WebCore::WorkerPostMessage):
+ Added custom handler that supports MessagePortArray.
+
+2009-09-03 Drew Wilson <atwilson@google.com>
+
+ Reviewed by Sam Weinig.
+
+ Need to update JS bindings and IDL files to support multiple message ports in postMessage()
+ https://bugs.webkit.org/show_bug.cgi?id=28460
+
+ Added new toJSSequence() API which validates that a JSValue meets the WebIDL criteria for a sequence.
+
+ Tests: fast/events/message-port-multi.html
+ fast/workers/worker-context-multi-port.html
+ fast/workers/worker-multi-port.html
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ Added JSMessagePortCustom.h and JSMessageEventCustom.cpp.
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::toJSSequence):
+ Added toJSSequence() API to do validation on sequence-like objects per WebIDL.
+ * bindings/js/JSDOMBinding.h:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::postMessage):
+ Added custom handler for postMessage() that handles being passed MessagePortArrays.
+ * bindings/js/JSDedicatedWorkerContextCustom.cpp:
+ (WebCore::JSDedicatedWorkerContext::postMessage):
+ Added custom handler for postMessage() that handles being passed MessagePortArrays.
+ * bindings/js/JSMessageEventCustom.cpp: Added.
+ (WebCore::JSMessageEvent::ports):
+ Added custom ports() getter that converts from MessagePortArray to JSArray.
+ (WebCore::JSMessageEvent::initMessageEvent):
+ Added support for passing a MessagePortArray.
+ * bindings/js/JSMessagePortCustom.cpp:
+ (WebCore::JSMessagePort::postMessage):
+ Added custom handler for postMessage() that handles being passed MessagePortArray.
+ (WebCore::fillMessagePortArray):
+ New helper routine that validates/converts from a JS sequence o a WebCore::MessagePortArray.
+ * bindings/js/JSMessagePortCustom.h: Added.
+ * bindings/js/JSWorkerCustom.cpp:
+ (WebCore::JSWorker::postMessage):
+ Added custom handler for postMessage() that handles being passed MessagePortArray.
+ * dom/MessageEvent.cpp:
+ * dom/MessageEvent.h:
+ (WebCore::MessageEvent::ports):
+ Changed ports() to return a MessagePortArray* since this value can be null.
+ * dom/MessageEvent.idl:
+ Updated IDL to match HTML5 spec (now accepts MessagePortArrays instead of a solitary MessagePort).
+ * dom/MessagePort.cpp:
+ * dom/MessagePort.h:
+ * dom/MessagePort.idl:
+ Updated IDL to match HTML5 spec (postMessage() now accepts MessagePortArrays instead of a solitary MessagePort).
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl:
+ Updated IDL to match HTML5 spec (postMessage() now accepts MessagePortArrays instead of a solitary MessagePort).
+ * workers/DedicatedWorkerContext.cpp:
+ * workers/DedicatedWorkerContext.h:
+ * workers/DedicatedWorkerContext.idl:
+ Updated IDL to match HTML5 spec (postMessage() now accepts MessagePortArrays instead of a solitary MessagePort).
+ * workers/Worker.cpp:
+ * workers/Worker.h:
+ * workers/Worker.idl:
+ Updated IDL to match HTML5 spec (postMessage() now accepts MessagePortArrays instead of a solitary MessagePort).
+
+2009-09-03 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Do not query non-function call frames for function name.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28799
+
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.CallFrameProxy):
+ (InjectedScript.CallFrameProxy.prototype._wrapScopeChain):
+
+2009-09-03 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Crash after typing "clear" and pressing return in inspector console.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28684
+
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript._clearConsoleMessages):
+ (InjectedScript._inspectObject):
+ (InjectedScript._ensureCommandLineAPIInstalled):
+
+2009-09-03 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Squeezed out some performance from string conversion.
+ https://bugs.webkit.org/show_bug.cgi?id=28945
+
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::WebCoreStringResource::WebCoreStringResource):
+ (WebCore::WebCoreStringResource::~WebCoreStringResource):
+ (WebCore::WebCoreStringResource::data):
+ (WebCore::WebCoreStringResource::length):
+ (WebCore::WebCoreStringResource::atomicString):
+ (WebCore::WebCoreStringResource::string):
+ Avoid calling virtual length method. Be more explicit with
+ external memory computation. Avoid function calls in data and
+ length.
+ (WebCore::):
+ (WebCore::v8StringToWebCoreString):
+ (WebCore::v8StringToAtomicWebCoreString):
+ (WebCore::v8NonStringValueToWebCoreString):
+ (WebCore::v8NonStringValueToAtomicWebCoreString):
+ Avoid extra calls of WebCoreStringResource::toString. When
+ AtomicString is computed pass it immediately when constructing
+ WebCoreStringResource. Use inline buffer for small strings.
+ * bindings/v8/V8Binding.h:
+ (WebCore::v8ValueToWebCoreString):
+ (WebCore::v8ValueToAtomicWebCoreString):
+ (WebCore::toString):
+ Inline dispatch of string vs. non-string values.
+
+2009-09-03 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Inlined common case of V8IsolatedWorld::getEntered to speed
+ up V8Proxy lookup.
+ https://bugs.webkit.org/show_bug.cgi?id=28946
+
+ * bindings/v8/V8IsolatedWorld.cpp:
+ (WebCore::V8IsolatedWorld::getEnteredImpl):
+ * bindings/v8/V8IsolatedWorld.h:
+ (WebCore::V8IsolatedWorld::getEntered):
+
+2009-09-03 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix a regression bug that maxLength doesn't work for IME input.
+ https://bugs.webkit.org/show_bug.cgi?id=25253
+
+ Tests: fast/forms/input-maxlength-ime-completed.html
+ fast/forms/input-maxlength-ime-preedit.html
+
+ * dom/InputElement.cpp:
+ (WebCore::InputElement::handleBeforeTextInsertedEvent):
+ * dom/InputElement.h:
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::defaultEventHandler):
+ * wml/WMLInputElement.cpp:
+ (WebCore::WMLInputElement::defaultEventHandler):
+
+2009-09-03 Cameron McCormack <cam@mcc.id.au>
+
+ Reviewed by Eric Seidel.
+
+ Make SVGStyleElement title/media/type setters do something
+ https://bugs.webkit.org/show_bug.cgi?id=28828
+
+ Test: svg/dom/style-reflect.html
+
+ * svg/SVGStyleElement.cpp:
+ (WebCore::SVGStyleElement::setXmlspace): Actually change the attribute.
+ (WebCore::SVGStyleElement::setType): Ditto.
+ (WebCore::SVGStyleElement::setMedia): Ditto.
+ (WebCore::SVGStyleElement::setTitle): Ditto.
+
+2009-09-03 Ben Murdoch <benm@google.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=28872
+
+ Fixes a bug where handleEvent() in the V8 Custom SQL Statement Error binding would not return the correct result to WebCore after invoking the callback.
+
+ Test: storage/statement-error-callback.html
+
+ * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
+ (WebCore::V8CustomSQLStatementErrorCallback::handleEvent): Return true from handleEvent() if the callback raised an exception or the callback itself returned true.
+
+2009-09-03 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Haiku] Adding three font-specific files to WebCore:
+ FontCustomPlatformData.cpp, FontCustomPlatformData.h,
+ and FontPlatformData.h
+ https://bugs.webkit.org/show_bug.cgi?id=28131
+
+ * platform/graphics/haiku/FontCustomPlatformData.cpp: Added.
+ (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
+ (WebCore::FontCustomPlatformData::fontPlatformData):
+ (WebCore::createFontCustomPlatformData):
+ * platform/graphics/haiku/FontCustomPlatformData.h: Added.
+ (WebCore::FontCustomPlatformData::FontCustomPlatformData):
+ * platform/graphics/haiku/FontPlatformData.h: Added.
+ (WebCore::FontPlatformData::FontPlatformData):
+ (WebCore::FontPlatformData::font):
+ (WebCore::FontPlatformData::size):
+ (WebCore::FontPlatformData::bold):
+ (WebCore::FontPlatformData::oblique):
+ (WebCore::FontPlatformData::hashTableDeletedFontValue):
+
+2009-09-02 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ More partial work towards "Page Cache should support pages with Frames"
+ https://bugs.webkit.org/show_bug.cgi?id=13631
+
+ No new tests. (No change in behavior, current tests pass).
+
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::stopLoading): Adopt the new enum form for FrameLoader::stopLoading().
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::stopLoading): Take an enum to decide whether to dispatch no unload events,
+ only unload, or unload and pagehide.
+ (WebCore::FrameLoader::closeURL):
+ (WebCore::FrameLoader::scheduleRedirection):
+ (WebCore::FrameLoader::cachePageForHistoryItem): Call pageHidden().
+ (WebCore::FrameLoader::pageHidden): Add to dispatch the pagehide event to all frames in the case
+ where a page is added to the PageCache.
+ * loader/FrameLoader.h:
+
+ * loader/FrameLoaderTypes.h: Add an UnloadEventPolicy enum.
+
+2009-09-02 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ More partial work towards "Page Cache should support pages with Frames"
+ https://bugs.webkit.org/show_bug.cgi?id=13631
+
+ - More CachedFrame destruction work.
+ - Including related Frame and FrameLoader changes and cleanup.
+
+ No new tests. (No change in behavior, current tests pass).
+
+ * history/CachedFrame.cpp:
+ (WebCore::CachedFrameBase::restore): Rebuild up the whole FrameTree when restoring.
+ (WebCore::CachedFrame::CachedFrame): Tear down the entire FrameTree when caching.
+ (WebCore::CachedFrame::destroy): For child frames that are being destroyed while in
+ the PageCache, do lightweight cleanup to:
+ A - Prevent referring to a stale Page object.
+ B - Prevent World Leaks of WebKit objects.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::stopAllLoaders): stopAllLoaders() should never be called on Frames that are
+ in the PageCache. ASSERT that fact.
+ (WebCore::FrameLoader::open): Remove a bogus release-build workaround, as the comment right above it
+ explains it is not effective, and it'd be better to see the crash locally instead of downstream.
+ (WebCore::FrameLoader::closeAndRemoveChild): Make sure the owner element has a page pointer before
+ referencing it.
+ (WebCore::FrameLoader::detachFromParent): Use the new detachViewsAndDocumentLoader() call
+ (WebCore::FrameLoader::detachViewsAndDocumentLoader): Does lightweight cleanup of client (WebKit) objects.
+ * loader/FrameLoader.h:
+
+ * page/Frame.cpp:
+ (WebCore::Frame::detachFromPage): Simply clear the Page pointer without doing any other work.
+ (WebCore::Frame::pageDestroyed): Use the new detachFromPage().
+ * page/Frame.h:
+
+2009-09-02 Jungshik Shin <jshin@chromium.org>
+
+ Reviewed by Dimitri Glazkov
+
+ [Chromium] Add 'icu::' qualifier in preparation for ICU upgrade to 4.2
+ in Chromium. This is to fix a new file added in r28742 since the
+ last patch for this issue.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28410
+
+ No change in the test result.
+
+ * platform/graphics/chromium/FontLinux.cpp:
+ (WebCore::TextRunWalker::getNormalizedTextRun):
+
+2009-09-02 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [Chromium] Correct a typo to fix bustage, caused by r47991.
+ https://bugs.webkit.org/show_bug.cgi?id=27933
+
+ * platform/graphics/skia/ImageBufferSkia.cpp: Changed "Unpremultipled" to "Unmultiplied".
+
+2009-09-02 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [Chromium] Add a missing include to fix bustage, caused by r47991.
+ https://bugs.webkit.org/show_bug.cgi?id=27933
+
+ * platform/graphics/skia/ImageBufferSkia.cpp: Added SkColorPriv include.
+
+2009-09-02 Jian Li <jianli@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Implement file support for DragData.
+ https://bugs.webkit.org/show_bug.cgi?id=28896
+
+ * platform/chromium/DragDataChromium.cpp:
+ (WebCore::DragData::containsURL):
+ (WebCore::DragData::asURL):
+ (WebCore::DragData::containsCompatibleContent):
+
+2009-09-02 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Protect libcurl shared data with Mutex objects via curl_set_share_opt.
+ https://bugs.webkit.org/show_bug.cgi?id=28920
+
+ * platform/network/curl/ResourceHandleManager.cpp:
+ (WebCore::sharedResourceMutex):
+ (WebCore::curl_lock_callback):
+ (WebCore::curl_unlock_callback):
+ (WebCore::ResourceHandleManager::ResourceHandleManager):
+
+2009-09-02 Evan Stade <estade@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Expose functions to change the focus ring color for Linux Chromium
+
+ https://bugs.webkit.org/show_bug.cgi?id=28887
+
+ * rendering/RenderThemeChromiumLinux.cpp:
+ (WebCore::RenderThemeChromiumLinux::RenderThemeChromiumLinux):
+ (WebCore::RenderThemeChromiumLinux::setFocusRingColor):
+ (WebCore::RenderThemeChromiumLinux::platformFocusRingColor):
+ * rendering/RenderThemeChromiumLinux.h:
+
+2009-09-02 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ SVG Filter premultiplied color support for getImageDate/putImageData
+ [https://bugs.webkit.org/show_bug.cgi?id=27933]
+
+ Patch to get premultiplied color support for Skia on getImageDate/putImageData.
+
+ * platform/graphics/skia/ImageBufferSkia.cpp:
+ (WebCore::getImageData):
+ (WebCore::putImageData):
+
+2009-09-02 Brady Eidson <beidson@apple.com>
+
+ Forget to rename openInFrameloader() to open(), which was requested in Darin's review of my last patch.
+
+ * history/CachedFrame.cpp:
+ (WebCore::CachedFrameBase::restore):
+ (WebCore::CachedFrame::open):
+ * history/CachedFrame.h:
+ * history/CachedPage.cpp:
+ (WebCore::CachedPage::restore):
+
+2009-09-02 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ In http://trac.webkit.org/changeset/47943 I added new header dependencies to FrameLoader.h.
+ Removing them is a little trouble, but worth it going forward.
+ The pattern of creating a "CachedFrameBase" as the interface CachedFrame provides to FrameLoader
+ was suggested by Darin Adler.
+
+ No new tests. (No change in behavior)
+
+ Make CachedFrame inherit privately from CachedFrameBase, which becomes the interface FrameLoader uses:
+ * history/CachedFrame.cpp:
+ (WebCore::CachedFrameBase::CachedFrameBase):
+ (WebCore::CachedFrameBase::~CachedFrameBase):
+ (WebCore::CachedFrameBase::restore):
+ (WebCore::CachedFrame::CachedFrame):
+ (WebCore::CachedFrame::openInFrameLoader):
+ * history/CachedFrame.h:
+ (WebCore::CachedFrameBase::document):
+ (WebCore::CachedFrameBase::view):
+ (WebCore::CachedFrameBase::domWindow):
+ (WebCore::CachedFrame::create):
+ (WebCore::CachedFrame::documentLoader):
+ (WebCore::CachedFrame::mousePressNode):
+
+ Call the new ::openInFrameLoader() method on the CachedFrame, as CachedFrameBase is now the only
+ thing capable of interacting with FrameLoader::open(CachedFrameBase):
+ * history/CachedPage.cpp:
+ (WebCore::CachedPage::restore):
+ * history/CachedPage.h:
+ (WebCore::CachedPage::documentLoader):
+
+ Make ::open(CachedFrame) public, and change it to ::open(CachedFrameBase):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::open):
+ * loader/FrameLoader.h:
+
+2009-09-02 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Cannot pres Enter to escape from bulleted list when <ul> is a child of <li>.
+ https://bugs.webkit.org/show_bug.cgi?id=24866
+
+ This patch modifies breakOutOfEmptyListItem to break out of a properly nested list
+ (a list to break out of is inside another list item).
+
+ When the empty list item appears at the end of another list item, WebKit breaks out of
+ the outer list item, and adds new item below the outer list item.
+ Otherwise, WebKit breaks out of the the inner list item and inserts new paragraph.
+
+ Test: editing/execCommand/break-out-of-empty-list-item.html
+
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
+
+2009-09-02 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ More partial work towards "Page Cache should support pages with Frames"
+ https://bugs.webkit.org/show_bug.cgi?id=13631
+
+ This patch is primarily about the "CachedFrame tree" and making slightly different decisions
+ based on whether a CachedFrame is the main frame or a subframe.
+
+ - Store whether a CachedFrame represents the main frame or a subframe.
+ - "Chop off the frame tree" for the main frame when creating its CachedFrame, as main frames
+ are reused and need to start new page loads with an empty frame tree.
+ - Reattach the frame tree to the main frame when restoring it.
+ - open() the cached subframes in their respective loaders when restoring.
+ - Properly clear() and destroy() cached subframes.
+ - When committing to a new page load, and after caching the previous page, only clear the
+ FrameView for the main frame.
+
+ Note that all of above will eventually be necessary as I continue to land this work in pieces,
+ but doesn't actually change any behavior right now because we still refuse to even *try* to
+ cache pages with frames.
+
+ No new tests. No change in behavior, and current tests continue to pass.
+
+ * history/CachedFrame.cpp:
+ (WebCore::CachedFrame::CachedFrame):
+ (WebCore::CachedFrame::restore):
+ (WebCore::CachedFrame::clear):
+ (WebCore::CachedFrame::destroy):
+ * history/CachedFrame.h:
+ (WebCore::CachedFrame::isMainFrame):
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::clear):
+ (WebCore::FrameLoader::open):
+ * loader/FrameLoader.h:
+
+2009-09-02 Brady Eidson <beidson@apple.com>
+
+ No review, build fix.
+
+ http://trac.webkit.org/changeset/47976 broke the build.
+ Let's try compiling before we land things, shall we?
+
+ * platform/graphics/SimpleFontData.cpp:
+ (WebCore::SimpleFontData::SimpleFontData): Order the initialization list correctly.
+
+2009-09-02 Kevin Ollivier <kevino@theolliviers.com>
+
+ waf build fixes for Windows/MSVC.
+
+ * wscript:
+
+2009-09-02 Ben Murdoch <benm@google.com>
+
+ Unreviewed build fix for Chromium.
+
+ Missed #including V8Proxy.h in WebCore/bindings/v8/V8Binding.cpp.
+
+ * bindings/v8/V8Binding.cpp: add V8Proxy.h as an include
+
+2009-09-02 Kevin Ollivier <kevino@theolliviers.com>
+
+ waf build fix, don't define symbols we now grab from other sources.
+
+ * platform/wx/TemporaryLinkStubs.cpp:
+
+2009-09-02 Kevin Ollivier <kevino@theolliviers.com>
+
+ Build fixes for PluginViewNone.cpp and a wx build fix for PluginView.cpp.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::stop):
+ * plugins/PluginViewNone.cpp:
+ (WebCore::PluginView::platformDestroy):
+
+2009-09-02 Charles Wei <charles.wei@torchmobile.com.cn>
+
+ Reviewed by Eric Seidel.
+
+ Fix the build failure of WebKit for Linux/Qt when WML is enabled
+
+ No test cases needed since this just fixes the build problem.
+
+ * wml/WMLElement.cpp:
+ (WebCore::WMLElement::create):
+ * wml/WMLTableElement.cpp:
+ (WebCore::WMLTableElement::joinSuperflousColumns):
+ (WebCore::WMLTableElement::padWithEmptyColumns):
+
+2009-09-02 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Adam Barth.
+
+ WINCE PORT: use shared buffer for custom font data
+ https://bugs.webkit.org/show_bug.cgi?id=27734
+
+ Refactored by Joe Mason <joe.mason@torchmobile.com>
+
+ * loader/CachedFont.cpp:
+ add WINCE to platforms using cached custom data
+ * platform/graphics/opentype/OpenTypeUtilities.cpp:
+ (WebCore::renameFont): implement for WinCE
+ * platform/graphics/opentype/OpenTypeUtilities.h:
+ build fixes
+ * platform/graphics/wince/FontCustomPlatformData.cpp:
+ (WebCore::setCustomFontCache): add accessor
+ (WebCore::createFontCustomPlatformData): change param to SharedBuffer
+ * platform/graphics/wince/FontCustomPlatformData.h:
+ update function signatures
+
+2009-09-02 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Adam Barth.
+
+ WINCE PORT: font-related build fixes and minor bugfixes
+ https://bugs.webkit.org/show_bug.cgi?id=27734
+
+ * platform/graphics/FontCache.h: declare functions added in https://bugs.webkit.org/show_bug.cgi?id=27509
+ * platform/graphics/GlyphPageTreeNode.cpp:
+ (WebCore::GlyphPageTreeNode::initializePage): fix ambiguous overload error in min/max on Windows
+ * platform/graphics/SimpleFontData.cpp:
+ (WebCore::SimpleFontData::SimpleFontData): initialize member vars
+ * platform/graphics/SimpleFontData.h: disable unused members on Wince to save space
+
+2009-09-02 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Another pass at releasing the storage mutex.
+ https://bugs.webkit.org/show_bug.cgi?id=28904
+
+ Another pass at releasing the storage mutex (when applicable) when we finish
+ executing JavaScript. http://dev.w3.org/html5/spec/Overview.html#storage-mutex
+ describes the required behavior.
+
+ As it turns out, https://bugs.webkit.org/show_bug.cgi?id=28789 didn't solve
+ the problem correctly. First of all, I missed that events and timeouts go
+ through a different call path. Second of all, I didn't consider recursion
+ correctly. Third of all, my check to see if LocalStorage is alive actually
+ instantiates it if it isn't yet. Fourth, I forgot DOM_STORAGE guards around
+ it. So I'm reverting that change completely and doing it more cleanly.
+ Unfortunately, the solution isn't as portable (and thus I've left out the JSC
+ implementation for now).
+
+ NOTE: This change now tracks recursion on function callbacks in V8. I ran this
+ by Mads Ager and Mike Belshe and they seemed to think adding the checks were
+ fine. Most callbacks are asynchronous and thus wouldn't be nested. The few
+ scenareos where you can have nested callbacks probably should have always been
+ protected by a recursion guard.
+
+ Unfortunately, this can't be tested without a hook added to the layout test
+ controllers since the lock is (by design) not supposed to be observable by
+ JavaScript. https://bugs.webkit.org/show_bug.cgi?id=28906
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate): revert
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate): revert
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::runScript):
+ Add releaseStorageMutex call. A small amount of clean up.
+ (WebCore::V8Proxy::callFunction):
+ Add releaseStorageMutex call. A small amount of clean up.
+ (WebCore::V8Proxy::releaseStorageMutex):
+ Check to see if localStorage has been instantiated. If so, tell it to
+ unlock all storage areas.
+ * bindings/v8/V8Proxy.h:
+ * page/PageGroup.h:
+ (WebCore::PageGroup::hasLocalStorage): Make hasLocalStorage public.
+
+2009-09-02 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Adam Barth.
+
+ WINCE PORT: Implement ImageBuffer for WINCE
+ Implement Image interface with a light class BufferedImage
+ for rendering ImageBuffer
+ https://bugs.webkit.org/show_bug.cgi?id=28167
+
+ * platform/graphics/wince/ImageBufferData.h: Added.
+ * platform/graphics/wince/ImageBufferWince.cpp: Added.
+
+2009-08-31 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ Join the various PluginView destructors into one shared implementation
+
+ https://bugs.webkit.org/show_bug.cgi?id=27706
+
+ The Qt port used to delete the platform plugin widget as the last step.
+ Now this is done before cleaning up the script objects and unloading the
+ plugin package, similar to how the Win port does it.
+
+ * plugins/PluginView.cpp:
+ * plugins/PluginViewNone.cpp:
+ * plugins/gtk/PluginViewGtk.cpp:
+ * plugins/mac/PluginViewMac.cpp:
+ * plugins/qt/PluginViewQt.cpp:
+ * plugins/win/PluginViewWin.cpp:
+
+2009-08-31 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ Share PluginView::init() between ports
+
+ https://bugs.webkit.org/show_bug.cgi?id=27706
+
+ The port-spesific bits are moved to platformStart(), which now returns
+ a bool based on the success of the platformStart.
+
+ m_hasPendingGeometryChange is now initialized in the initializer list
+ instead of in PluginViewQt's init()
+
+ PluginViewMac (currently used only by the Qt port) used to manually call
+ stop() in the case where an unsupported drawing or event model was detected.
+ This was wrong, as the m_status and m_isStarted fields should be used to
+ guard against doing operations on a plugin in this intermediate state.
+
+ * plugins/PluginView.cpp:
+ * plugins/PluginView.h:
+ * plugins/PluginViewNone.cpp:
+ * plugins/gtk/PluginViewGtk.cpp:
+ * plugins/mac/PluginViewMac.cpp:
+ * plugins/qt/PluginViewQt.cpp:
+ * plugins/win/PluginViewWin.cpp:
+
+2009-09-02 Ben Murdoch <benm@google.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=28737
+
+ Update JavaScript bindings in JSC and V8 for SQLTransaction to throw exceptions in the right places.
+
+ * bindings/js/JSSQLTransactionCustom.cpp:
+ (WebCore::JSSQLTransaction::executeSql): Throw an exception if no parameters are passed to executeSql().
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::v8ValueToWebCoreString): Catch an exception if thrown from toString().
+ * bindings/v8/custom/V8SQLTransactionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL): Allow "arrayish objects" to be passed to executeSql.
+
+2009-09-01 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Migrate Databases tab to InjectedScript /
+ serialized interaction.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28873
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::handleEvent):
+ * inspector/front-end/Database.js:
+ (WebInspector.Database.prototype.isDB):
+ (WebInspector.Database.prototype.runWithTableNames.sortingCallback):
+ (WebInspector.Database.prototype.runWithTableNames):
+ (WebInspector.Database.prototype.executeSql):
+ (WebInspector.Database.prototype.executeSql.errorCallback):
+ (WebInspector.Database.prototype.executeSql.queryTransaction):
+ * inspector/front-end/DatabaseQueryView.js:
+ (WebInspector.DatabaseQueryView.prototype._enterKeyPressed):
+ (WebInspector.DatabaseQueryView.prototype._queryFinished):
+ * inspector/front-end/DatabaseTableView.js:
+ (WebInspector.DatabaseTableView):
+ * inspector/front-end/StoragePanel.js:
+ (WebInspector.StoragePanel.prototype.selectDatabase):
+ (WebInspector.StoragePanel.prototype.updateDatabaseTables.withTableNames):
+ (WebInspector.StoragePanel.prototype.updateDatabaseTables):
+ (WebInspector.DatabaseSidebarTreeElement.prototype.onpopulate.withTableNames):
+ (WebInspector.DatabaseSidebarTreeElement.prototype.onpopulate):
+
+2009-09-02 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed (trivial followup fix).
+
+ Web Inspector: Trivial follow up fix to r47944.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28800
+
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::nodeForId):
+
+2009-09-01 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Fixed a bug in handling of isReadOnly, where textareas were casted to HTMLInputElements.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::isReadOnly):
+
+2009-09-01 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+
+ Reviewed by Timothy Hatcher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28047
+ add utility method to enable logging messages for inspector development
+
+ manual test case added (see below)
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleMessage.prototype.toMessageElement):
+ (WebInspector.ConsoleMessage.prototype.toString):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.js:
+ (WebInspector.log):
+ * manual-tests/inspector/webinspector-log.html: Added.
+ * page/Console.cpp:
+ (WebCore::printMessageSourceAndLevelPrefix):
+ * page/Console.h:
+ (WebCore::):
+
+2009-09-01 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21990
+ When a rare EUC-JP character is present, explicitly (and correctly) labelled EUC-JP document
+ is mistreated as Shift_JIS
+
+ <rdar://problem/5828506> Safari should not try auto-detecting if charset information exists
+
+ WebKit used to unconditionally auto-detect document encoding if it was one of Japanese ones.
+ This didn't really match any browser, and did cause problems on some sites.
+
+ Our detector is very quick to label an EUC-JP page as Shift_JIS if it notices a byte that
+ cannot be part of EUC-JP source. However, such bytes do appear in Web pages sometimes,
+ especially in comments. Also, some valid EUC-JP sequences are not known to it.
+
+ Some pages that are fixed by this change:
+
+ <rdar://problem/5934750> Encoding in incorrect at http://cocodeparis.blog45.fc2.com/. This
+ page has incorrect encoding in title, so no browser displays it 100% fine. We now match
+ Firefox and IE.
+
+ <rdar://problem/6007713> The web page http://www.sf.us.emb-japan.go.jp/top.htm is garbled
+ in Safari. There is a stray byte in comments that was makes charset detector think it can't
+ be EUC-JP.
+
+ <rdar://problem/6965711> A Japanese web page www.nippontv.studiolegend.tv is garbled in
+ Safari. Many comments on this page are encoded as Shift_JIS - IE magically displays that
+ fine in View Source mode (it doesn't seem to have an ability to switch between EUC-JP and
+ Shift_JIS in normal HTML view though).
+
+ Test: fast/encoding/japanese-encoding-mix.html
+
+ * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::decode): Only invoke auto-
+ detection if there is no solid charset information yet.
+
+2009-09-01 Jian Li <jianli@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] FileList cannot be accessed via index in Chromium.
+ https://bugs.webkit.org/show_bug.cgi?id=28883
+
+ Tested by clipboard-file-access.html.
+
+ * WebCore.gypi:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8FileListCustom.cpp: Added.
+
+2009-08-31 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Remove the workaround added in r47316.
+
+ Reviewed by Sam Weinig.
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::AXObjectCache):
+
+ * accessibility/AXObjectCache.h:
+ Remove the Document argument to the AXObjectCache constructor and the
+ m_document member variable, and replace the no-parameter
+ handleFocusedUIElementChanged() with the two-parameter GTK function.
+ (WebCore::AXObjectCache::handleFocusedUIElementChanged):
+
+ * accessibility/chromium/AXObjectCacheChromium.cpp:
+ (WebCore::AXObjectCache::handleFocusedUIElementChanged):
+
+ * accessibility/gtk/AXObjectCacheAtk.cpp:
+ (WebCore::AXObjectCache::handleFocusedUIElementChanged):
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (fallbackObject):
+ Don't pass a null Document when constructing the AXObjectCache.
+
+ * accessibility/mac/AXObjectCacheMac.mm:
+ (WebCore::AXObjectCache::handleFocusedUIElementChanged):
+
+ * accessibility/win/AXObjectCacheWin.cpp:
+ (WebCore::AXObjectCache::handleFocusedUIElementChanged):
+ Get the document from the RenderObject; m_document was removed.
+
+ * dom/Document.cpp:
+ (WebCore::Document::axObjectCache):
+ Don't pass the Document when constructing the AXObjectCache.
+ (WebCore::Document::setFocusedNode):
+ Pass the old and new focused RenderObjects when calling
+ handleFocusedUIElementChanged().
+
+2009-09-01 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Check that InspectorDOMAgent and InspectorFrontend are not null
+ before accessing them in InspectorBackend. They may be null if
+ InspectorController is closed before an asynchronous operation is
+ started.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28800
+
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::getCookies):
+ (WebCore::InspectorBackend::getChildNodes):
+ (WebCore::InspectorBackend::setAttribute):
+ (WebCore::InspectorBackend::removeAttribute):
+ (WebCore::InspectorBackend::setTextNodeValue):
+ (WebCore::InspectorBackend::highlight):
+ (WebCore::InspectorBackend::nodeForId):
+ (WebCore::InspectorBackend::pushNodePathToFrontend):
+ (WebCore::InspectorBackend::addNodesToSearchResult):
+ (WebCore::InspectorBackend::selectDatabase):
+ (WebCore::InspectorBackend::selectDOMStorage):
+ (WebCore::InspectorBackend::inspectorDOMAgent):
+ (WebCore::InspectorBackend::inspectorFrontend):
+ * inspector/InspectorBackend.h:
+
+2009-09-01 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Page Cache should support pages with frames
+ https://bugs.webkit.org/show_bug.cgi?id=13631
+
+ Things learned in the full task that this patch addresses:
+ - The notions of clearing a CachedFrame and destroying a CachedFrame were two concepts that
+ needed to be managed separately.
+ - Once we start restoring pages with multiple CachedFrames, we'll have to be calling
+ FrameLoader::open(CachedFrame&) multiple times with different CachedFrames, and this process
+ will be guided by the CachedFrames themselves.
+
+ No new tests. (No change in behavior, current layout tests pass)
+
+ * history/CachedFrame.cpp:
+ (WebCore::CachedFrame::CachedFrame):
+ (WebCore::CachedFrame::~CachedFrame):
+ (WebCore::CachedFrame::clear): Only clear pointers out.
+ (WebCore::CachedFrame::destroy): Perform the destructive cleanup work here - Things that shouldn't
+ occur simply by navigating back to a page with a CachedFrame.
+ * history/CachedFrame.h:
+
+ * history/CachedPage.cpp:
+ (WebCore::CachedPage::~CachedPage):
+ (WebCore::CachedPage::restore): Call clear() after restoring.
+ (WebCore::CachedPage::clear):
+ (WebCore::CachedPage::destroy):
+ * history/CachedPage.h:
+
+ * history/PageCache.cpp:
+ (WebCore::PageCache::releaseAutoreleasedPagesNow): destroy() CachedPages that are being pruned,
+ instead of clearing them.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::commitProvisionalLoad): Let the CachedPage clear() itself after restoring.
+ (WebCore::FrameLoader::open): Don't ::open() the CachedFrame, as the CachedPage does that now.
+ * loader/FrameLoader.h: Add the friending so CachedPage and CachedFrame can better guide the process.
+ Even though CachedFrame::restore() isn't used for now, it will be soon.
+
+2009-09-01 Andrei Popescu <andreip@google.com>
+
+ Reviewed by David Levin.
+
+ Add a "lowMemoryNotification" method to the V8 ScriptController class.
+ This is needed in order to allow the host application (Android Web browser in this case)
+ to call the v8::V8::LowMemoryNotification() method added to V8 in
+ http://code.google.com/p/v8/source/detail?spec=svn2777&r=2725
+
+ https://bugs.webkit.org/show_bug.cgi?id=28776
+
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::lowMemoryNotification):
+ * bindings/v8/ScriptController.h:
+
+2009-09-01 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ V8 Bindings for WebSocket API.
+ https://bugs.webkit.org/show_bug.cgi?id=28844
+
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ (WebCore::V8DOMWrapper::convertToV8Object):
+ (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
+ * bindings/v8/V8DOMWrapper.h:
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8WebSocketCustom.cpp: Added.
+
+2009-09-01 Peter Kasting <pkasting@google.com>
+
+ Unreviewed (build fix).
+
+ Missed a "." -> "->" conversion.
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::ReadContext::ReadContext):
+
+2009-09-01 Peter Kasting <pkasting@google.com>
+
+ Unreviewed (build fix).
+
+ Try to fix Qt build, take 2. The Qt code had what looks like a
+ broken virtual function override.
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::ReadContext::ReadContext):
+ (WebCore::ImageDecoderQt::setData):
+ * platform/graphics/qt/ImageDecoderQt.h:
+
+2009-09-01 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ Uninitialized variable in XSSAuditor
+ https://bugs.webkit.org/show_bug.cgi?id=28874
+
+ One ought to initialize variables before use even when it doesn't
+ matter. No behavior change.
+
+ * page/XSSAuditor.h:
+ (WebCore::XSSAuditor::CachingURLCanonicalizer::CachingURLCanonicalizer):
+
+2009-09-01 Peter Kasting <pkasting@google.com>
+
+ Unreviewed (build fix).
+
+ Try to fix Qt build.
+
+ * platform/graphics/ImageSource.cpp:
+
+2009-08-28 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27965
+ Eliminate most of ImageSourceQt.cpp in favor of ImageSource.cpp.
+
+ * WebCore.pro:
+ * platform/graphics/ImageSource.cpp:
+ (WebCore::ImageSource::frameHasAlphaAtIndex):
+ * platform/graphics/qt/ImageSourceQt.cpp:
+ (WebCore::ImageSource::createFrameAtIndex):
+ (WebCore::ImageSource::frameHasAlphaAtIndex):
+ (WebCore::ImageSource::frameIsCompleteAtIndex):
+
+2009-09-01 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Make InjectedScript self-contained (move necessary
+ methods from utilities.js into InjectedScript).
+
+ https://bugs.webkit.org/show_bug.cgi?id=28871
+
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.generateStylesheet):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript._ensureCommandLineAPIInstalled.inspectObject):
+ (InjectedScript._ensureCommandLineAPIInstalled):
+ (InjectedScript.pushNodeToFrontend):
+ (InjectedScript.createProxyObject):
+ (Object.type):
+ (Object.hasProperties):
+ (Object.className):
+ (String.prototype.escapeCharacters):
+ * inspector/front-end/utilities.js:
+
+2009-09-01 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: console log message repeat count double.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28856
+
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript._evaluateOn):
+
+2009-09-01 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ [Gtk] Fix DATALIST build
+ https://bugs.webkit.org/show_bug.cgi?id=28826
+
+ Add ENABLE_DATALIST to FEATURE_DEFINES.
+
+ * GNUmakefile.am:
+
+2009-09-01 Cameron McCormack <cam@mcc.id.au>
+
+ Reviewed by Eric Seidel.
+
+ SVGSVGElement suspend methods argument/return types incorrect
+ https://bugs.webkit.org/show_bug.cgi?id=28860
+
+ Also fix the style of the argument names.
+
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::suspendRedraw):
+ (WebCore::SVGSVGElement::unsuspendRedraw):
+ * svg/SVGSVGElement.h:
+
+2009-09-01 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Fix bug 28808: [Skia] Fix flaky layout test svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html [DEBUG]
+ (https://bugs.webkit.org/show_bug.cgi?id=28808)
+
+ The bug fix adds an explicit check for the validity of the path when it is
+ transformed into local coordinates.
+ This was the most suitable place I could find that didn't cause an inordinate
+ amount of refactoring. Also, it seems pertinent and may also catch other cases
+ that are not limited to clipping paths.
+
+ TEST: existing svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp: make isPathSkiaSafe accessible
+ (WebCore::):
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::currentPathInLocalCoordinates): check Skia safety of path
+
+2009-09-01 Yusuke Sato <yusukes@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [Chromium] Combining Diacritical Marks (U+0300..) are not handled correctly.
+ https://bugs.webkit.org/show_bug.cgi?id=28742
+
+ Normalize (NFC) a TextRun when the run contains combining diacritical marks
+ so that Skia can pick a correct glyph without relying on GSUB table in a font.
+ This change is for Chromium Linux.
+
+ * platform/graphics/chromium/FontLinux.cpp:
+ (WebCore::TextRunWalker::getTextRun): Added.
+ (WebCore::TextRunWalker::getNormalizedTextRun): Added.
+
+ This function is called when the run contains U+0300..U+036F and converts characters in
+ the run to the combined form (NFC) using ICU.
+
+2009-09-01 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Inlined fast paths of V8DOMWrapper::convertNodeToV8Object and
+ V8Proxy::createWrapperFromCache.
+ https://bugs.webkit.org/show_bug.cgi?id=28848
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertDocumentToV8Object): Special
+ function for document wrapping.
+ (WebCore::V8DOMWrapper::convertNewNodeToV8Object): Slow case of
+ wrapping a new node.
+ * bindings/v8/V8DOMWrapper.h:
+ (WebCore::V8DOMWrapper::convertNodeToV8Object): Extracted fast
+ path from V8DOMWrapper.cpp.
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::createWrapperFromCacheSlowCase):
+ * bindings/v8/V8Proxy.h:
+ (WebCore::V8Proxy::createWrapperFromCache): Extracted fast path
+ from V8Proxy.cpp.
+
+2009-09-01 Eric Seidel <eric@webkit.org>
+
+ No review, windows build fix only. Clearly I should have read the patch closer. :(
+
+ Allow excluding certain plugins from loading
+ https://bugs.webkit.org/show_bug.cgi?id=28677
+
+ * plugins/PluginDatabase.cpp:
+ (WebCore::PluginDatabase::refresh):
+
+2009-09-01 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Implement conditional breakpoints in the Web Inspector backend
+ and add frontend JavaScript stubs.
+ https://bugs.webkit.org/show_bug.cgi?id=28846
+
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::profiles):
+ (WebCore::InspectorBackend::addBreakpoint):
+ (WebCore::InspectorBackend::updateBreakpoint):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/JavaScriptDebugServer.cpp:
+ (WebCore::JavaScriptDebugServer::BreakpointInfo::condition):
+ (WebCore::JavaScriptDebugServer::BreakpointInfo::setCondition):
+ (WebCore::JavaScriptDebugServer::addBreakpoint):
+ (WebCore::JavaScriptDebugServer::breakpointInfo):
+ (WebCore::JavaScriptDebugServer::updateBreakpoint):
+ (WebCore::JavaScriptDebugServer::updateBreakpointInfo):
+ (WebCore::JavaScriptDebugServer::removeBreakpoint):
+ (WebCore::JavaScriptDebugServer::hasBreakpoint):
+ (WebCore::JavaScriptDebugServer::clearBreakpoints):
+ * inspector/JavaScriptDebugServer.h:
+ (WebCore::JavaScriptDebugServer::BreakpointInfo::BreakpointInfo):
+ * inspector/front-end/Breakpoint.js:
+ (WebInspector.Breakpoint):
+ (WebInspector.Breakpoint.prototype.get id):
+ (WebInspector.Breakpoint.prototype.get condition):
+ (WebInspector.Breakpoint.prototype.set condition):
+ * inspector/front-end/BreakpointsSidebarPane.js:
+ (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint):
+ (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.addScript):
+
+2009-09-01 Marius Renn <damarvy@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Added delegate to PluginDatabase to disable loading certain plugins.
+ This is useful when you want to load from the standard plugin
+ directory, but want to exclude certain plugins. Plugins may be
+ excluded early on by name, so that no plugin code is executed (which
+ may have caused a crash).
+
+ * plugins/PluginDatabase.cpp:
+ (WebCore::PluginDatabase::PluginDatabase):
+ (WebCore::PluginDatabase::refresh):
+ * plugins/PluginDatabase.h:
+ (WebCore::PluginDatabase::setClient):
+ * plugins/PluginDatabaseClient.h: Added.
+ (WebCore::PluginDatabaseClient::~PluginDatabaseClient):
+
+2009-08-31 Brady Eidson <beidson@apple.com>
+
+ Rubberstamped by Sam Weinig
+
+ * WebCore.base.exp: Removed an unneeded symbol export.
+
+2009-08-31 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28466
+ When downloading a file, two GET requests are sent to the HTTP server
+
+ Can't think of a way to test this.
+
+ * loader/ResourceLoader.cpp:
+ (WebCore::ResourceLoader::releaseResources): only nullify the
+ handle's client when it is the ResourceLoader, to support the case
+ in which a download API uses a different client
+
+2009-08-31 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Text Fields and Text Areas are reported as read-only by inspect32.exe.
+ https://bugs.webkit.org/show_bug.cgi?id=28854
+
+ Added another case in AcccessibiltyRenderObject::isReadOnly to test if text fields
+ and texts areas are read-only.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::isReadOnly):
+ (WebCore::AccessibilityRenderObject::canSetValueAttribute):
+
+2009-08-31 Drew Wilson <atwilson@google.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ fast/workers/worker-lifecycle.html crashes intermittently on snowleopard
+ https://bugs.webkit.org/show_bug.cgi?id=28795
+
+ Changed WorkerContext::close() to no longer stop the worker thread.
+ It is now the parent's responsibility to shut down the worker thread when it is notified that the context is closed.
+
+ * workers/AbstractWorker.cpp:
+ Updated dispatchScriptErrorEvent to pass-through the "handled" value from dispatchEvent(), to allow event handlers added with addEventListener() to mark events as handled.
+ * workers/DefaultSharedWorkerRepository.cpp:
+ (WebCore::SharedWorkerProxy::workerContextClosed):
+ Now shuts down the worker thread when notified that the context is closed.
+ (WebCore::SharedWorkerProxy::close):
+ Now handles being invoked when the context is already in the process of shutting down.
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::close):
+ No longer calls WorkerThread::stop() to avoid race conditions with shutting down the thread while the parent is still interacting with it.
+ * workers/WorkerContext.h:
+ (WebCore::WorkerContext::isClosing):
+ isClosing() is now public so WorkerRunLoop can call it to determine whether to process tasks.
+ * workers/WorkerMessagingProxy.cpp:
+ (WebCore::WorkerExceptionTask::performTask):
+ Error events should still be delivered even if the worker thread is closing.
+ Also fixed problem where error events were not dispatched if error handlers were added via addEventListener().
+ (WebCore::WorkerTerminateTask::create):
+ New task that invokes terminateWorkerContext() on the parent thread when the context is closed.
+ (WebCore::WorkerTerminateTask::WorkerTerminateTask):
+ (WebCore::WorkerTerminateTask::performTask):
+ (WebCore::WorkerMessagingProxy::workerContextClosed):
+ Now fires off a WorkerTerminateTask to shut down the thread when the context is closed.
+ * workers/WorkerMessagingProxy.h:
+ WorkerMessagingProxy now overrides workerContextClosed().
+ * workers/WorkerRunLoop.cpp:
+ (WebCore::WorkerRunLoop::runInMode):
+ Now drops tasks on the floor if the WorkerContext is closing.
+
+2009-08-31 Ojan Vafai <ojan@chromium.org>
+
+ Not reviewed (build fix)
+
+ Build fix for Chromium to match r49707.
+
+ * bindings/v8/ScriptCallFrame.cpp:
+ (WebCore::ScriptCallFrame::ScriptCallFrame):
+ * bindings/v8/ScriptSourceCode.h:
+ (WebCore::ScriptSourceCode::ScriptSourceCode):
+ * platform/KURLGoogle.cpp:
+ (WebCore::KURL::KURL):
+ (WebCore::blankURL):
+
+2009-08-31 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28858
+ Element.baseURI parses xml:base attribute incorrectly
+
+ Test: fast/dom/base-attribute-parsing.xhtml
+
+ * dom/Element.cpp: (WebCore::Element::baseURI): Avoid assertion failure (no change in
+ release mode).
+
+2009-08-31 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reverting http://trac.webkit.org/changeset/47904, because it caused
+ layout test failure.
+
+ Test: fast/dom/Window/new-window-opener.html
+
+2009-08-31 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28852
+ Rename KURL single argument constructor to avoid confusion
+
+ * platform/KURL.h: The constructor that used to be single argument should now be invoked
+ as KURL(ParsedURLString, myString).
+
+ * WebCore.base.exp:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::createWindow):
+ * bindings/js/ScriptCallFrame.cpp:
+ (WebCore::ScriptCallFrame::ScriptCallFrame):
+ * bindings/v8/NPV8Object.cpp:
+ (_NPN_EvaluateHelper):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::createWindow):
+ * css/CSSCursorImageValue.cpp:
+ (WebCore::isSVGCursorIdentifier):
+ * css/CSSImageValue.cpp:
+ (WebCore::CSSImageValue::cachedImage):
+ * css/CSSImportRule.cpp:
+ (WebCore::CSSImportRule::insertedIntoParent):
+ * css/StyleBase.cpp:
+ (WebCore::StyleBase::baseURL):
+ * dom/Document.cpp:
+ (WebCore::Document::initSecurityContext):
+ * dom/Element.cpp:
+ (WebCore::Element::baseURI):
+ * editing/markup.cpp:
+ (WebCore::completeURLs):
+ * history/HistoryItem.cpp:
+ (WebCore::HistoryItem::url):
+ (WebCore::HistoryItem::originalURL):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::didLoadResourceFromMemoryCache):
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::createCached):
+ * loader/Cache.cpp:
+ (WebCore::Cache::revalidateResource):
+ * loader/DocLoader.cpp:
+ (WebCore::DocLoader::requestResource):
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::getSubresources):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::init):
+ (WebCore::FrameLoader::iconURL):
+ (WebCore::FrameLoader::scheduleLocationChange):
+ (WebCore::FrameLoader::redirectionTimerFired):
+ (WebCore::FrameLoader::loadURLIntoChildFrame):
+ (WebCore::FrameLoader::startRedirectionTimer):
+ * loader/appcache/ApplicationCache.cpp:
+ (WebCore::ApplicationCache::resourceForURL):
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::ApplicationCacheGroup::startLoadingEntry):
+ (WebCore::ApplicationCacheGroup::addEntry):
+ * loader/appcache/ApplicationCacheStorage.cpp:
+ (WebCore::ApplicationCacheStorage::cacheGroupForURL):
+ (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
+ (WebCore::ApplicationCacheStorage::loadCache):
+ (WebCore::ApplicationCacheStorage::manifestURLs):
+ * loader/archive/cf/LegacyWebArchive.cpp:
+ (WebCore::LegacyWebArchive::createResource):
+ (WebCore::LegacyWebArchive::create):
+ * loader/loader.cpp:
+ (WebCore::Loader::load):
+ * notifications/NotificationCenter.h:
+ (WebCore::NotificationCenter::createHTMLNotification):
+ * platform/KURL.cpp:
+ (WebCore::KURL::KURL):
+ (WebCore::blankURL):
+ * platform/KURLHash.h:
+ * platform/chromium/ClipboardChromium.cpp:
+ (WebCore::ClipboardChromium::setData):
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::createQTMovie):
+ * platform/network/cf/ResourceErrorCF.cpp:
+ (WebCore::ResourceError::operator CFErrorRef):
+ * platform/network/cf/ResourceRequest.h:
+ (WebCore::ResourceRequest::ResourceRequest):
+ * platform/network/chromium/ResourceRequest.h:
+ (WebCore::ResourceRequest::ResourceRequest):
+ * platform/network/curl/ResourceHandleManager.cpp:
+ (WebCore::handleLocalReceiveResponse):
+ (WebCore::headerCallback):
+ * platform/network/curl/ResourceRequest.h:
+ (WebCore::ResourceRequest::ResourceRequest):
+ * platform/network/mac/ResourceErrorMac.mm:
+ (WebCore::ResourceError::operator NSError*):
+ * platform/network/mac/ResourceRequest.h:
+ (WebCore::ResourceRequest::ResourceRequest):
+ * platform/network/qt/ResourceRequest.h:
+ (WebCore::ResourceRequest::ResourceRequest):
+ * platform/network/soup/ResourceRequest.h:
+ (WebCore::ResourceRequest::ResourceRequest):
+ * platform/win/ClipboardWin.cpp:
+ (WebCore::filesystemPathFromUrlOrTitle):
+ (WebCore::ClipboardWin::setData):
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::dataChanged):
+ * xml/XSLImportRule.cpp:
+ (WebCore::XSLImportRule::loadSheet):
+ * xml/XSLTProcessor.cpp:
+ (WebCore::docLoaderFunc):
+ Adapt to the change everywhere the single argument constructor was used. I did a very
+ cursory check of whether these locations were using this constructor properly, and didn't
+ notice any obvious mistakes. The new explicit name will hopefully suggest checking this
+ better when refactoring any such code.
+
+2009-08-31 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=28635 [CSS3
+ Backgrounds and Borders] Add support for 2-keyword values for
+ background-repeat
+
+ This patch allows background-repeat to take two values by making
+ background-repeat just like background-position internally. There
+ is a little extra legwork for background-repeat because the spec
+ indicates that its computed value should be equivalent to how it
+ was specified. I keep track of the specified thing by setting the
+ implicit flag whenever background-repeat is defined with only one
+ value (since internally, we now store this as 2 values.)
+
+ Here we can't access the implicit flag, so for backwards-
+ compatibility's sake, we always return one value when that makes
+ sense.
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::fillRepeatToCSSValue):
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+
+ Here we check for the implicit flag and return one value when it is
+ set.
+ * css/CSSMutableStyleDeclaration.cpp:
+ (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
+ (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue):
+ (WebCore::CSSMutableStyleDeclaration::cssText):
+
+ Add support for CSSPropertyBackgroundRepeatX and
+ CSSPropertyBackgroundRepeatY
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ (WebCore::CSSParser::parseFillShorthand):
+ (WebCore::CSSParser::parseFillRepeat):
+ (WebCore::CSSParser::parseFillProperty):
+ * css/CSSParser.h:
+
+ Get rid of mappings to RepeatXFill and RepeatYFill since we don't
+ need those parts of the EFillRepeat enum anymore.
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator EFillRepeat):
+
+ Add CSSPropertyBackgroundRepeatX and CSSPropertyBackgroundRepeatY
+ * css/CSSPropertyLonghand.cpp:
+ (WebCore::initShorthandMap):
+
+ Add background-repeat-x and -y.
+ * css/CSSPropertyNames.in:
+
+ Break repeat into x and y.
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ (WebCore::CSSStyleSelector::mapFillRepeatX):
+ (WebCore::CSSStyleSelector::mapFillRepeatY):
+ * css/CSSStyleSelector.h:
+
+ There is no more RepeatXFill. Instead, look for
+ fillLayer->repeatX() == RepeatFill
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
+
+ Break m_repeat into m_repeatX and m_repeatY
+ * rendering/style/FillLayer.cpp:
+ (WebCore::FillLayer::FillLayer):
+ (WebCore::FillLayer::operator=):
+ (WebCore::FillLayer::operator==):
+ (WebCore::FillLayer::fillUnsetProperties):
+ (WebCore::FillLayer::cullEmptyLayers):
+ * rendering/style/FillLayer.h:
+ (WebCore::FillLayer::repeatX):
+ (WebCore::FillLayer::repeatY):
+ (WebCore::FillLayer::isRepeatXSet):
+ (WebCore::FillLayer::isRepeatYSet):
+ (WebCore::FillLayer::setRepeatX):
+ (WebCore::FillLayer::setRepeatY):
+ (WebCore::FillLayer::clearRepeatX):
+ (WebCore::FillLayer::clearRepeatY):
+ (WebCore::FillLayer::initialFillRepeatX):
+ (WebCore::FillLayer::initialFillRepeatY):
+
+ Again, break backgroundRepeat into backgroundRepeatX and
+ backgroundRepeatY
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::backgroundRepeatX):
+ (WebCore::InheritedFlags::backgroundRepeatY):
+ (WebCore::InheritedFlags::maskRepeatX):
+ (WebCore::InheritedFlags::maskRepeatY):
+
+ We don't need RepeatXFill or RepeatYFill. Now that we store two
+ values, they are represented by Repeat-NoRepeat and NoRepeat-
+ Repeat, respectively.
+ * rendering/style/RenderStyleConstants.h:
+ (WebCore::):
+
+2009-08-31 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Compositing layer size needs to take into account software reflections on children.
+ https://bugs.webkit.org/show_bug.cgi?id=28837
+
+ When computing the bounds of a composited layer, take software-rendered
+ reflections into account.
+
+ Test: compositing/reflections/reflection-in-composited.html
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::calculateCompositedBounds):
+
+2009-08-31 Mark Mentovai <mark@chromium.org>
+
+ Reviewed by Dave Hyatt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28614
+
+ Perform a layout prior to checking whether the scrollbar modes are
+ off, on, or automatic. The modes may change during layout.
+
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::updateScrollbars):
+
+2009-08-31 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector Request Headers Should Show Data Sent With Request
+ https://bugs.webkit.org/show_bug.cgi?id=22920
+
+ Manual test added - see below.
+
+ * English.lproj/localizedStrings.js:
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::updateRequest):
+ (WebCore::InspectorResource::createScriptObject):
+ (WebCore::InspectorResource::updateScriptObject):
+ * inspector/InspectorResource.h:
+ * inspector/front-end/Resource.js:
+ (WebInspector.Resource):
+ * inspector/front-end/ResourceView.js:
+ (WebInspector.ResourceView):
+ (WebInspector.ResourceView.prototype._refreshURL):
+ (WebInspector.ResourceView.prototype._refreshQueryString):
+ (WebInspector.ResourceView.prototype._refreshFormData):
+ (WebInspector.ResourceView.prototype._refreshRequestPayload):
+ (WebInspector.ResourceView.prototype._refreshParms):
+ (WebInspector.ResourceView.prototype._toggleURLdecoding):
+ (WebInspector.ResourceView.prototype._getHeaderValue):
+ (WebInspector.ResourceView.prototype._refreshRequestHeaders):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.js:
+ (WebInspector.addResource):
+ (WebInspector.updateResource):
+ * manual-tests/inspector/display-form-data.html: Added.
+
+2009-08-31 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: pass call frames into the frontend as a part of
+ pausedScript event.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28847
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::didPause):
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::pausedScript):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.debuggerPaused):
+ * inspector/front-end/inspector.js:
+ (WebInspector.pausedScript):
+
+2009-08-31 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Un-blacklist Silverlight on Mac
+
+ Does not seem to crash anymore, probably due to how we now handle
+ drawing and event model handshake better.
+
+ * plugins/mac/PluginPackageMac.cpp:
+ (WebCore::PluginPackage::isPluginBlacklisted):
+
+2009-08-31 Cameron McCormack <cam@mcc.id.au>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28827
+ SVGSVGElement.unsuspendRedraw() shouldn't throw
+
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::unsuspendRedraw):
+ * svg/SVGSVGElement.h:
+ * svg/SVGSVGElement.idl:
+
+2009-08-31 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ - Change the reutrn type of HTMLInputElement::list so that it
+ conforms to the standard.
+ - Add HTMLInputElement::dataList()
+ https://bugs.webkit.org/show_bug.cgi?id=28769
+
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::list):
+ (WebCore::HTMLInputElement::dataList):
+ (WebCore::HTMLInputElement::selectedOption):
+ * html/HTMLInputElement.h:
+ * html/HTMLInputElement.idl:
+
+2009-08-31 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Eric Seidel.
+
+ Remove ASSERT(frame) in ResourceHandle::start (ResourceHandleCurl.cpp)
+ https://bugs.webkit.org/show_bug.cgi?id=28802
+
+ Remove ASSERT because the frame could be null if the
+ ResourceHandle is not associated with any frame, e.g. if we are
+ downloading a file.
+ If the frame is not null but the page is null this must be an
+ attempted load from an onUnload handler, so let's just block it.
+
+ * platform/network/curl/ResourceHandleCurl.cpp:
+ (WebCore::ResourceHandle::start):
+
+2009-08-31 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Build fix for platforms which don't enable DOM_STORAGE.
+ https://bugs.webkit.org/show_bug.cgi?id=28834
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate):
+
+2009-08-29 Adele Peterson <adele@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=28829
+ Crash in AccessibilityRenderObject::activeDescendant when trying to set aria-activedescendant to something without a renderer
+
+ Test: accessibility/aria-activedescendant-crash.html
+
+ * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::activeDescendant): Nil check.
+
+2009-08-28 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ Gtk Build broken for OSX Quartz
+ https://bugs.webkit.org/show_bug.cgi?id=28727
+
+ Check for XP_UNIX instead of GTK or X11 to ease building of the Gtk
+ port in Mac and Unix/Linux.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::PluginView):
+ * plugins/PluginView.h:
+ * plugins/gtk/PluginViewGtk.cpp:
+ (WebCore::PluginView::setNPWindowIfNeeded):
+ (WebCore::PluginView::getValueStatic):
+ (WebCore::PluginView::getValue):
+ (WebCore::PluginView::init):
+
+2009-08-28 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix positioning error when a compositing, absolutely-positioned element has an ancestor with opacity.
+ https://bugs.webkit.org/show_bug.cgi?id=28754
+
+ For absolutely-positioned layers, convertToLayerCoords() jumps to the positioned
+ ancestor, since the layer x and y are relative to that ancestor. However, this could
+ skip over the ancestorLayer, thus giving the wrong result.
+
+ Fix by duplicating the enclosingPositionedAncestor() logic in convertToLayerCoords(),
+ and checking for ancestorLayer along the way. If found, compute offset of both to
+ the enclosingPositionedAncestor() and subtract.
+
+ This also fixes a positioning bug with abs. positioned elements in reflections,
+ so there is a new reflection test with a pixel result.
+
+ Tests: compositing/geometry/abs-position-inside-opacity.html
+ fast/reflections/abs-position-in-reflection.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::isPositionedContainer):
+ (WebCore::RenderLayer::enclosingPositionedAncestor):
+ (WebCore::RenderLayer::enclosingTransformedAncestor):
+ (WebCore::RenderLayer::convertToLayerCoords):
+
+2009-08-28 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Mark Rowe
+
+ Wrap WebkitCSSTransformValues in the correct class of DOM wrapper.
+ https://bugs.webkit.org/show_bug.cgi?id=27727
+
+ When fetching the DOM wrapper for a WebkitCSSTransformValue (which is a kind of
+ CSSValueList), we need to ask the value list whether it's a WebkitCSSTransformValue,
+ because there is not a unique enum value for WebkitCSSTransformValue.
+
+ * bindings/objc/DOMCSS.mm:
+ (kitClass):
+
+2009-08-28 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Jan Michael Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28308
+ Fix some warnings introduced by r47381.
+
+ * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+ (WebCore::convertCMYKToRGBA):
+ (WebCore::convertRGBToRGBA):
+
+2009-08-28 Ada Chan <adachan@apple.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21442
+ Make sure filesystemPathFromUrlOrTitle() returns a string with length
+ <= MAX_PATH - 1.
+
+ * platform/win/ClipboardWin.cpp:
+ (WebCore::filesystemPathFromUrlOrTitle):
+
+2009-08-28 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Adding Chromium's VFS for Linux and Mac.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28750
+
+ * WebCore.gypi:
+ * platform/chromium/ChromiumBridge.h:
+ * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
+ (WebCore::SQLiteFileSystem::openDatabase):
+ (WebCore::SQLiteFileSystem::deleteDatabaseFile):
+ * platform/sql/chromium/SQLiteFileSystemChromiumLinux.cpp: Removed.
+ * platform/sql/chromium/SQLiteFileSystemChromiumMac.cpp: Removed.
+ * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp: Added.
+ * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
+
+2009-08-28 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Made bindings use Node::setOnEvent functions for Node descendants
+ instead of Node::setAttributeEventListener.
+
+ Node::setAttributeEventListener is an internal function and
+ doesn't do the forwarding to DOM window that is required for some
+ HTML elements.
+ https://bugs.webkit.org/show_bug.cgi?id=28709
+
+ Tests added in http://trac.webkit.org/changeset/47326 now pass with V8.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ Now generates EventListener accessors for Node descendants instead
+ of using custom callbacks.
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getEventListener): Moved from V8NodeCustom.cpp.
+ * bindings/v8/V8DOMWrapper.h:
+ (WebCore::V8DOMWrapper::convertEventListenerToV8Object): Fixed a bug in
+ signature.
+ * bindings/v8/V8Utilities.cpp:
+ (WebCore::createHiddenDependency):
+ (WebCore::removeHiddenDependency):
+ Changed signature to accept Handle instead of Local.
+ * bindings/v8/V8Utilities.h:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8NodeCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ Removed custom callbacks for EventListener accessors.
+
+2009-08-28 Ben Murdoch <benm@google.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=28803
+
+ Implements V8CustomVoidCallback reporting any exceptions that were thrown from the callback function.
+
+ * bindings/v8/custom/V8CustomVoidCallback.cpp:
+ (WebCore::invokeCallback): Checks if the callback raised an exception and reports it to WebCore if so.
+
+2009-08-28 Peter Kasting <pkasting@google.com>
+
+ Not reviewed (build fix).
+
+ * platform/graphics/qt/ImageDecoderQt.cpp: Accidentally added some spaces.
+ (WebCore::ImageDecoder::create):
+ (WebCore::ImageDecoderQt::ImageDecoderQt):
+ * platform/graphics/qt/ImageDecoderQt.h: Make constructor public so factory function can access it (this seemed better than making ImageDecoder a friend).
+
+2009-08-28 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27965
+ Move ImageDecoder creation function to a factory function on
+ ImageDecoder. This is arguably where it makes the most sense anyway,
+ and it will (soon) allow ImageSourceQt.cpp to have one less dedicated
+ function.
+
+ * platform/graphics/ImageSource.cpp:
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoder::create):
+ * platform/graphics/qt/ImageDecoderQt.h:
+ * platform/graphics/qt/ImageSourceQt.cpp:
+ (WebCore::ImageSource::setData):
+ * platform/image-decoders/ImageDecoder.cpp:
+ * platform/image-decoders/ImageDecoder.h:
+
+2009-08-28 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28785
+ Combine duplicated code from ImageDecoder*.cpp into the main
+ ImageDecoder.cpp.
+
+ * platform/image-decoders/ImageDecoder.cpp:
+ (WebCore::RGBA32Buffer::RGBA32Buffer):
+ (WebCore::RGBA32Buffer::clear):
+ (WebCore::RGBA32Buffer::zeroFill):
+ (WebCore::RGBA32Buffer::copyBitmapData):
+ (WebCore::RGBA32Buffer::setSize):
+ (WebCore::RGBA32Buffer::hasAlpha):
+ (WebCore::RGBA32Buffer::setHasAlpha):
+ (WebCore::RGBA32Buffer::setStatus):
+ (WebCore::RGBA32Buffer::operator=):
+ (WebCore::RGBA32Buffer::width):
+ (WebCore::RGBA32Buffer::height):
+ * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
+ * platform/image-decoders/haiku/ImageDecoderHaiku.cpp:
+ * platform/image-decoders/wx/ImageDecoderWx.cpp:
+
+2009-08-28 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Holger Freyther.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25889
+ [GTK] scrollbar policy for main frame is not implementable
+
+ Override setScrollbarModes to correctly forward scrollbar modes
+ policy changes to client code, via a new platform-specific method,
+ scrollbarsPolicyDidChange.
+
+ * page/ChromeClient.h:
+ (WebCore::ChromeClient::scrollbarsPolicyDidChange):
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::createScrollbar):
+ * platform/ScrollView.h:
+ * platform/gtk/ScrollViewGtk.cpp:
+ (WebCore::ScrollView::setScrollbarModes):
+
+2009-08-28 Cédric Luthi <cedric.luthi@gmail.com>
+
+ Reviewed by Tor Arne Vestbø
+
+ [Qt/Mac] Un-blacklist the QuickTime plugin
+
+ https://bugs.webkit.org/show_bug.cgi?id=28768
+
+ Now that the drawing model is properly negotiated, there is no need the
+ blacklist the QuickTime plugin anymore.
+
+ This revealed a bug in PluginView::performRequest: it should not initiate a
+ request if the plugin has been stopped, which is what happens when a plugin
+ only supports the QuickDraw drawing model.
+
+ * plugins/PluginView.cpp:
+ * plugins/mac/PluginPackageMac.cpp:
+
+2009-08-28 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Set DOM agent document to 0 in InspectorController::close to
+ make DOM agent remove DOM listeners from the inspected document.
+
+ Replace windowVisible checks with m_frontend checks to as inspector
+ window lives in a different process in Chromium while frontend proxy
+ is in the inspected page process.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28800
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::inspect):
+ (WebCore::InspectorController::addConsoleMessage):
+ (WebCore::InspectorController::close):
+ (WebCore::InspectorController::pruneResources):
+ (WebCore::InspectorController::didCommitLoad):
+ (WebCore::InspectorController::didLoadResourceFromMemoryCache):
+ (WebCore::InspectorController::identifierForInitialRequest):
+ (WebCore::InspectorController::willSendRequest):
+ (WebCore::InspectorController::didReceiveResponse):
+ (WebCore::InspectorController::didReceiveContentLength):
+ (WebCore::InspectorController::didFinishLoading):
+ (WebCore::InspectorController::didFailLoading):
+ (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
+ (WebCore::InspectorController::scriptImported):
+ (WebCore::InspectorController::didOpenDatabase):
+ (WebCore::InspectorController::didUseDOMStorage):
+ (WebCore::InspectorController::addProfile):
+ * inspector/InspectorController.h:
+
+2009-08-28 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Remove dependency of SummaryBar on WebInspector.resourceCategories.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28801
+
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel):
+ (WebInspector.ResourcesPanel.prototype.toolbarItemClass.get categories):
+ * inspector/front-end/SummaryBar.js:
+ (WebInspector.SummaryBar):
+ (WebInspector.SummaryBar.prototype.update):
+
+2009-08-28 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed (patching in l18n change that was missing due to
+ the git binary diff format).
+
+ https://bugs.webkit.org/show_bug.cgi?id=28429
+
+ * English.lproj/localizedStrings.js:
+
+2009-08-28 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Make XSSAuditor go fast
+ https://bugs.webkit.org/show_bug.cgi?id=28667
+
+ Make the XSSAuditor go faster by implementing two optimizations:
+
+ 1) We avoid canonicalizing scripts that are larger than the page's URL.
+ This saves a bunch of time for large inline scripts.
+
+ 2) We memoize canonicalizing the page's URL because it's silly to
+ canonicalize repeated for each inline event listener.
+
+ These optimizations have a measurable affect on the intl1 page cycler.
+
+ No behavior change.
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::MemoizingURLCanonicalizer::canonicalizeURL):
+ (WebCore::XSSAuditor::canEvaluate):
+ (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
+ (WebCore::XSSAuditor::canCreateInlineEventListener):
+ (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
+ (WebCore::XSSAuditor::canLoadObject):
+ (WebCore::XSSAuditor::canSetBaseElementURL):
+ (WebCore::XSSAuditor::decodeURL):
+ (WebCore::XSSAuditor::findInRequest):
+ * page/XSSAuditor.h:
+
+2009-08-27 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ Removed ASSERT_NOT_REACHED, because indeed this ASSERT is reached in
+ fast/canvas/change-context.html. And it's alright to reach it.
+
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL): Removed assertion.
+
+2009-08-27 Jeremy Orlow <jorlow@chromium.org>
+
+ Not reviewed. Build fix for http://trac.webkit.org/changeset/47840
+
+ Peter's change forgot one m_decoder->
+
+ * platform/graphics/ImageSource.cpp:
+ (WebCore::ImageSource::frameSizeAtIndex):
+
+2009-08-27 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [V8] Add NULL-check, since the context ain't changeable no more, and
+ thus getContext could return 0.
+
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL): Added NULL-check.
+
+2009-08-27 Noel Gordon <noel.gordon@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ dataTransfer.types() should include type "Files" when files are present in the clipboard.
+ https://bugs.webkit.org/show_bug.cgi?id=28780
+
+ Add dataTransfer type "Files" to the chromium port. Add eseidel's
+ patch for same for the mac port.
+
+ * platform/chromium/ClipboardChromium.cpp:
+
+2009-08-27 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Removed GL_ from all constants, and gl prefix from all calls
+ https://bugs.webkit.org/show_bug.cgi?id=28773
+
+ This was done for the external API in CanvasRenderingContext3D and
+ the internal API in GraphicsContext3D.
+
+ * html/canvas/CanvasRenderingContext3D.cpp:
+ * html/canvas/CanvasRenderingContext3D.h:
+ * bindings/js/JSCanvasRenderingContext3DCustom.cpp:
+ * html/canvas/CanvasRenderingContext3D.idl:
+ * platform/graphics/GraphicsContext3D.h:
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+
+2009-08-27 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Qt and Gtk build fixes. Not reviewed.
+
+ Add CanvasRenderingContext3D.idl to the build scripts.
+
+ * GNUmakefile.am:
+ * WebCore.pro:
+
+2009-08-27 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Release the storage mutex whenever leaving JavaScript execution.
+ https://bugs.webkit.org/show_bug.cgi?id=28789
+
+ http://dev.w3.org/html5/spec/Overview.html#storage-mutex describes the
+ required behavior. After we leave JavaScript, we must be sure the storage
+ mutex has been released. At the end of evaluate(), if localStorage has been
+ instantiated, tell it to release any locks that may be applicable.
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate):
+
+2009-08-27 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28753
+ <rdar://problem/7173448> Excessive number of threads (and a crash)
+
+ Coalesce DNS prefetch requests to reduce strain on CFHost. Currently, the algorithm is as follows:
+ - when resolver is idle, the first few requests are sent immediately (they may or may not
+ hit the wire);
+ - if there are a few requests in flight already, coalesce all requests for one second;
+ - to avoid pathological cases with lots of links to different sites on a page, only ask
+ CFHost about a handful of names (dropping the rest).
+
+ Coalescing reduces the number of requests dramatically, as prefetchDNS is called for each
+ link, and these tend to have identical host name.
+
+ * platform/network/cf/DNSCFNet.cpp:
+ (WebCore::DNSResolveQueue::DNSResolveQueue):
+ (WebCore::DNSResolveQueue::shared):
+ (WebCore::DNSResolveQueue::add):
+ (WebCore::DNSResolveQueue::decrementRequestCount):
+ (WebCore::DNSResolveQueue::fired):
+ (WebCore::clientCallback):
+ (WebCore::DNSResolveQueue::resolve):
+ (WebCore::prefetchDNS):
+
+2009-08-27 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Final patch for Canvas 3D support
+ https://bugs.webkit.org/show_bug.cgi?id=28018
+
+ This hooks everything up and provides a working implementation of
+ Canvas 3D. I plumb the creation of the 3D canvas down to GraphicsLayer,
+ passing the opaque context and texture pointers so a Canvas3DLayer can be
+ created (more on that later). It also plumbs changes to the 3D canvas so
+ that Canvas3DLayer can recomposite the results.
+
+ A 3D Canvas element needs a RenderLayer and compositing layer to render.
+ This is because it renders to an off-screen texture in the GPU and then
+ hands it to a Canvas3DLayer, which is a subclass of CAOpenGLLayer, to
+ render that texture as a 3D quad. This keeps everything in GPU memory to
+ maximize performance. When a CanvasRenderingContext3D is created it
+ forces a style recalc which creates the RenderLayer and compositing
+ layer if needed.
+
+ I repurposed an existing flag which was put in place for animation to accomplish
+ this. This flag is passed to setNeedsStyleRecalc(), and I renamed it from
+ AnimationStyleChange to SyntheticStyleChange. It essentially says that you need
+ to do a complete style recalc, even though the style itself has not really
+ changed.
+
+ This patch also fixes a couple of bugs discovered when testing with 3d-canvas
+ turned on. I also added a constructor DOMWindow.idl for CanvasRenderingContext3D.
+ This is needed when making a JS wrapper for the object so the prototype
+ property can be set.
+
+ Test: fast/canvas/change-context.html
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSCanvasRenderingContext3DCustom.cpp:
+ (WebCore::JSCanvasRenderingContext3D::glDrawElements):
+ * bindings/js/JSCanvasRenderingContextCustom.cpp:
+ (WebCore::toJS):
+ * dom/Element.cpp:
+ (WebCore::Element::recalcStyle):
+ * dom/Node.cpp:
+ (WebCore::Node::setNeedsStyleRecalc):
+ * dom/Node.h:
+ (WebCore::):
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::getContext):
+ (WebCore::HTMLCanvasElement::is3D):
+ * html/HTMLCanvasElement.h:
+ * html/canvas/CanvasBuffer.cpp:
+ (WebCore::CanvasBuffer::create):
+ (WebCore::CanvasBuffer::CanvasBuffer):
+ (WebCore::CanvasBuffer::_deleteObject):
+ * html/canvas/CanvasBuffer.h:
+ * html/canvas/CanvasFramebuffer.cpp:
+ (WebCore::CanvasFramebuffer::create):
+ (WebCore::CanvasFramebuffer::CanvasFramebuffer):
+ (WebCore::CanvasFramebuffer::_deleteObject):
+ * html/canvas/CanvasFramebuffer.h:
+ * html/canvas/CanvasObject.cpp:
+ (WebCore::CanvasObject::CanvasObject):
+ (WebCore::CanvasObject::~CanvasObject):
+ (WebCore::CanvasObject::deleteObject):
+ * html/canvas/CanvasObject.h:
+ (WebCore::CanvasObject::context):
+ * html/canvas/CanvasProgram.cpp:
+ (WebCore::CanvasProgram::create):
+ (WebCore::CanvasProgram::CanvasProgram):
+ (WebCore::CanvasProgram::_deleteObject):
+ * html/canvas/CanvasProgram.h:
+ * html/canvas/CanvasRenderbuffer.cpp:
+ (WebCore::CanvasRenderbuffer::create):
+ (WebCore::CanvasRenderbuffer::CanvasRenderbuffer):
+ (WebCore::CanvasRenderbuffer::_deleteObject):
+ * html/canvas/CanvasRenderbuffer.h:
+ * html/canvas/CanvasRenderingContext3D.cpp:
+ (WebCore::CanvasRenderingContext3D::createBuffer):
+ (WebCore::CanvasRenderingContext3D::createFramebuffer):
+ (WebCore::CanvasRenderingContext3D::createTexture):
+ (WebCore::CanvasRenderingContext3D::createProgram):
+ (WebCore::CanvasRenderingContext3D::createRenderbuffer):
+ (WebCore::CanvasRenderingContext3D::createShader):
+ * html/canvas/CanvasRenderingContext3D.h:
+ (WebCore::CanvasRenderingContext3D::graphicsContext3D):
+ * html/canvas/CanvasShader.cpp:
+ (WebCore::CanvasShader::create):
+ (WebCore::CanvasShader::CanvasShader):
+ (WebCore::CanvasShader::_deleteObject):
+ * html/canvas/CanvasShader.h:
+ * html/canvas/CanvasTexture.cpp:
+ (WebCore::CanvasTexture::create):
+ (WebCore::CanvasTexture::CanvasTexture):
+ (WebCore::CanvasTexture::_deleteObject):
+ * html/canvas/CanvasTexture.h:
+ * page/DOMWindow.idl:
+ * page/animation/AnimationBase.cpp:
+ (WebCore::AnimationBase::setNeedsStyleRecalc):
+ * page/animation/AnimationController.cpp:
+ (WebCore::AnimationControllerPrivate::updateAnimationTimer):
+ (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
+ (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
+ (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
+ (WebCore::AnimationController::cancelAnimations):
+ * platform/graphics/GraphicsContext3D.h:
+ (WebCore::GraphicsContext3D::platformGraphicsContext3D):
+ (WebCore::GraphicsContext3D::platformTexture):
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::GraphicsLayer::setContentsToGraphicsContext3D):
+ (WebCore::GraphicsLayer::setGraphicsContext3DNeedsDisplay):
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::~GraphicsContext3D):
+ (WebCore::GraphicsContext3D::reshape):
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ (WebCore::GraphicsLayerCA::):
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::GraphicsLayerCA):
+ (WebCore::GraphicsLayerCA::commitLayerChanges):
+ (WebCore::GraphicsLayerCA::updateContentsGraphicsContext3D):
+ (WebCore::GraphicsLayerCA::setContentsToGraphicsContext3D):
+ (WebCore::GraphicsLayerCA::setGraphicsContext3DNeedsDisplay):
+ * rendering/RenderHTMLCanvas.cpp:
+ (WebCore::RenderHTMLCanvas::requiresLayer):
+ * rendering/RenderHTMLCanvas.h:
+ (WebCore::RenderHTMLCanvas::isCanvas):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
+ (WebCore::RenderLayerBacking::canUseDirectCompositing):
+ (WebCore::RenderLayerBacking::rendererContentChanged):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::requiresCompositingLayer):
+ (WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
+ * rendering/RenderLayerCompositor.h:
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::isCanvas):
+
+2009-08-27 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28751
+ Clean up ImageDecoder*.cpp a bit.
+
+ * platform/image-decoders/ImageDecoder.cpp: Put functions in the same
+ order as in the header file. Also, since there's already an anonymous
+ namespace in this file, use it to enclose the local helper functions.
+ (WebCore::):
+ (WebCore::ImageDecoder::upperBoundScaledX):
+ (WebCore::ImageDecoder::lowerBoundScaledX):
+ (WebCore::ImageDecoder::scaledY):
+ * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
+ (WebCore::RGBA32Buffer::width): Style fix.
+ (WebCore::RGBA32Buffer::height): Style fix.
+ * platform/image-decoders/haiku/ImageDecoderHaiku.cpp:
+ (WebCore::RGBA32Buffer::copyBitmapData): Ensure m_size is set correctly.
+ (WebCore::RGBA32Buffer::asNewNativeImage): Remove unneeded temp.
+ (WebCore::RGBA32Buffer::operator=): Simplify.
+ * platform/image-decoders/wx/ImageDecoderWx.cpp:
+ (WebCore::RGBA32Buffer::asNewNativeImage): Try and collect spaced-out temps under loop comment to show they're all related. Use size_t for iterating over elements of a Vector.
+ (WebCore::RGBA32Buffer::width): Style fix.
+ (WebCore::RGBA32Buffer::height): Style fix.
+
+2009-08-27 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28751
+ Clean up ImageSource.* in preparation for more fixes on bug 27965.
+
+ * platform/graphics/ImageSource.cpp: Put functions in the same order as in header file.
+ (WebCore::ImageSource::isSizeAvailable): Shorten.
+ (WebCore::ImageSource::size): Shorten.
+ (WebCore::ImageSource::frameSizeAtIndex): Shorten.
+ (WebCore::ImageSource::repetitionCount): Shorten.
+ (WebCore::ImageSource::frameIsCompleteAtIndex):
+ * platform/graphics/ImageSource.h: Shorten #ifdef section a bit by sharing common typedefs.
+
+2009-08-27 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28785
+ Add ImageDecoder.cpp to various build files so platforms will be able to
+ use it. Move an ENABLE to not cover the whole file, in preparation for
+ adding a bunch of code. Simplify #ifdefs in ImageDecoder.h to be "Skia
+ vs. everyone else", which also gives new platforms a reasonable default
+ behavior.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCoreSources.bkl:
+ * platform/image-decoders/ImageDecoder.cpp:
+ (WebCore::):
+ * platform/image-decoders/ImageDecoder.h:
+ (WebCore::RGBA32Buffer::getAddr):
+
+2009-08-27 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Dave Kilzer.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28784
+
+ Add an exported method to flush pending repaints.
+
+ * WebCore.base.exp:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layoutIfNeededRecursive):
+ (WebCore::FrameView::flushDeferredRepaints):
+ * page/FrameView.h:
+
+2009-08-27 Noel Gordon <noel.gordon@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [V8] Expose files from the pasteboard in drop events.
+ https://bugs.webkit.org/show_bug.cgi?id=28782
+
+ Update chromium port to expose dataTransfer.files() as per
+ HTML5 drag drop (Aug 2009 edition).
+
+ * platform/chromium/ClipboardChromium.cpp:
+
+2009-08-27 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Dmitry Glazkov.
+
+ ScriptState now keeps explicit Handle of devtools front-end
+ utility context instead of trying to retrieve it from inspected
+ Frame.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28772
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::ScriptController):
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/ScriptObjectQuarantine.cpp:
+ (WebCore::getQuarantinedScriptObject):
+ * bindings/v8/ScriptScope.cpp:
+ (WebCore::ScriptScope::ScriptScope):
+ * bindings/v8/ScriptState.cpp:
+ (WebCore::ScriptState::ScriptState):
+ (WebCore::ScriptState::~ScriptState):
+ (WebCore::scriptStateFromPage):
+ * bindings/v8/ScriptState.h:
+ (WebCore::ScriptState::context):
+ * bindings/v8/ScriptValue.h:
+ (WebCore::ScriptValue::~ScriptValue):
+ * inspector/InspectorController.h:
+ (WebCore::InspectorController::frontendScriptState):
+
+2009-08-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Console won't close.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28778
+
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype._updateModifiedNodes):
+ * inspector/front-end/utilities.js:
+ (Node.prototype.isAncestor):
+
+2009-08-27 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Fix a typo in files() causing image drags to have junk file arrays.
+ https://bugs.webkit.org/show_bug.cgi?id=28755
+
+ Test: editing/pasteboard/files-during-page-drags.html
+
+ * platform/mac/ClipboardMac.mm:
+ (WebCore::ClipboardMac::files):
+
+2009-08-27 Jeremy Orlow <jorlow@chromium.org>
+
+ Not reviewed. Build fix for Chromium.
+
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+
+2009-08-27 Alexey Proskuryakov <ap@apple.com>
+
+ Windows build fix.
+
+ * DerivedSources.cpp: Added JSPageTransitionEvent.cpp to DerivedSources.cpp.
+
+2009-08-26 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28758
+ <rdar://problem/6440869> Implement pageshow and pagehide events for b/f cache (28758)
+
+ Tests: fast/events/pageshow-pagehide-on-back-cached.html
+ fast/events/pageshow-pagehide-on-back-uncached.html
+ fast/events/pageshow-pagehide.html
+
+ * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): Dispatch pagehide event
+ (this function is called both when a document goes away, and when it goes to b/f cache).
+
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Dispatch pagehide right before unload.
+ (WebCore::DOMWindow::dispatchPageTransitionEvent): Do what it takes to add a new event handler
+ that can be installed on Window object.
+ (WebCore::DOMWindow::onpagehide): Ditto.
+ (WebCore::DOMWindow::setOnpagehide): Ditto.
+ (WebCore::DOMWindow::onpageshow): Ditto.
+ (WebCore::DOMWindow::setOnpageshow): Ditto.
+
+ * history/CachedFrame.cpp: (WebCore::CachedFrame::restore): Dispatch pageshow for a page
+ that isn't being restored from cache.
+
+ * dom/PageTransitionEvent.cpp: Added.
+ (WebCore::PageTransitionEvent::PageTransitionEvent):
+ (WebCore::PageTransitionEvent::~PageTransitionEvent):
+ (WebCore::PageTransitionEvent::initPageTransitionEvent):
+ * dom/PageTransitionEvent.h: Added.
+ (WebCore::PageTransitionEvent::create):
+ (WebCore::PageTransitionEvent::isPageTransitionEvent):
+ (WebCore::PageTransitionEvent::persisted):
+ * dom/PageTransitionEvent.idl: Added.
+ Add event class implementation.
+
+ * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): Support
+ inline listener definition (note that adding listeners to document.body programmatically
+ is not supported, matching Firefox).
+
+ * dom/Document.cpp:
+ (WebCore::Document::implicitClose): Dispatch pageshow event right before load event.
+ (WebCore::Document::dispatchPageTransitionEvent): Do what it takes to add a new event for
+ Docuemnt.
+ (WebCore::Document::createEvent): Ditto.
+
+ * dom/Document.h: Added dispatchPageTransitionEvent.
+
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * bindings/js/JSEventCustom.cpp: (WebCore::toJS):
+ * dom/Event.cpp: (WebCore::Event::isPageTransitionEvent):
+ * dom/Event.h:
+ * dom/EventNames.h:
+ * html/HTMLAttributeNames.in:
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl:
+ Do what it takes to add a new event type.
+
+2009-08-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by NOBODY (build fix).
+
+ Adding missing file from previous commit.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28740
+
+ * inspector/front-end/SummaryBar.js: Added.
+ (WebInspector.SummaryBar):
+ (WebInspector.SummaryBar.prototype.get calculator):
+ (WebInspector.SummaryBar.prototype.set calculator):
+ (WebInspector.SummaryBar.prototype.reset):
+ (WebInspector.SummaryBar.prototype.update):
+ (WebInspector.SummaryBar.prototype._drawSwatch.drawSwatchSquare):
+ (WebInspector.SummaryBar.prototype._drawSwatch):
+ (WebInspector.SummaryBar.prototype._drawSummaryGraph.var):
+ (WebInspector.SummaryBar.prototype._drawSummaryGraph):
+ (WebInspector.SummaryBar.prototype._drawSummaryGraph.drawPill):
+ (WebInspector.SummaryBar.prototype._fadeOutRect):
+ (WebInspector.SummaryBar.prototype._makeLegendElement):
+
+2009-08-27 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Factor out Factor out summary bar from Resources panel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28740
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype.reset):
+ (WebInspector.ResourcesPanel.prototype._updateSummaryGraph):
+ (WebInspector.ResourcesPanel.prototype._updateDividersLabelBarPosition):
+ (WebInspector.ResourcesPanel.prototype._changeSortingFunction):
+ * inspector/front-end/SummaryBar.js: Added.
+ (WebInspector.SummaryBar):
+ (WebInspector.SummaryBar.prototype.get calculator):
+ (WebInspector.SummaryBar.prototype.set calculator):
+ (WebInspector.SummaryBar.prototype.reset):
+ (WebInspector.SummaryBar.prototype.update):
+ (WebInspector.SummaryBar.prototype._drawSwatch.drawSwatchSquare):
+ (WebInspector.SummaryBar.prototype._drawSwatch):
+ (WebInspector.SummaryBar.prototype._drawSummaryGraph.var):
+ (WebInspector.SummaryBar.prototype._drawSummaryGraph):
+ (WebInspector.SummaryBar.prototype._drawSummaryGraph.drawPill):
+ (WebInspector.SummaryBar.prototype._fadeOutRect):
+ (WebInspector.SummaryBar.prototype._makeLegendElement):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.html:
+
+2009-08-26 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Start adding heap profiler to Inspector (hidden behind a flag.)
+
+ https://bugs.webkit.org/show_bug.cgi?id=28429
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel):
+ (WebInspector.ProfilesPanel.prototype.get statusBarItems):
+ (WebInspector.ProfilesPanel.prototype.reset):
+ (WebInspector.ProfilesPanel.prototype.addProfile):
+ (WebInspector.ProfilesPanel.prototype._updateInterface):
+ (WebInspector.ProfilesPanel.prototype._snapshotClicked):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.js: added Preferences.heapProfilerPresent flag.
+
+2009-08-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Metrics sidebar editing is broken.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28434
+
+ * inspector/front-end/MetricsSidebarPane.js:
+ (WebInspector.MetricsSidebarPane.prototype.update):
+
+2009-08-27 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28767
+
+ Make KURLGoogle.cpp's decodeURLEscapeSequences decode %00 to match
+ KURL.cpp. This makes the XSSAuditor tests pass when using KURLGoogle.
+
+ * platform/KURLGoogle.cpp:
+ (WebCore::decodeURLEscapeSequences):
+
+2009-08-27 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Build fix, missing functions after r47763.
+
+ * platform/qt/Localizations.cpp:
+ (WebCore::localizedMediaControlElementString):
+ (WebCore::localizedMediaControlElementHelpText):
+ (WebCore::localizedMediaTimeDescription):
+
+2009-08-26 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Removing trailing whitespaces from all storage classes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28075
+
+ * storage/ChangeVersionWrapper.cpp:
+ * storage/Database.cpp:
+ * storage/Database.h:
+ * storage/DatabaseDetails.h:
+ * storage/DatabaseThread.cpp:
+ * storage/DatabaseTracker.cpp:
+ * storage/DatabaseTracker.h:
+ * storage/LocalStorageTask.cpp:
+ * storage/LocalStorageTask.h:
+ * storage/LocalStorageThread.cpp:
+ * storage/LocalStorageThread.h:
+ * storage/OriginQuotaManager.cpp:
+ * storage/OriginUsageRecord.cpp:
+ * storage/OriginUsageRecord.h:
+ * storage/SQLError.h:
+ * storage/SQLResultSetRowList.h:
+ * storage/SQLStatement.cpp:
+ * storage/SQLStatement.h:
+ * storage/SQLStatementCallback.h:
+ * storage/SQLStatementErrorCallback.h:
+ * storage/SQLTransaction.cpp:
+ * storage/SQLTransaction.h:
+ * storage/SQLTransactionCallback.h:
+ * storage/SQLTransactionErrorCallback.h:
+ * storage/Storage.cpp:
+ * storage/Storage.h:
+ * storage/StorageArea.h:
+ * storage/StorageAreaImpl.cpp:
+ * storage/StorageAreaImpl.h:
+ * storage/StorageAreaSync.cpp:
+ * storage/StorageAreaSync.h:
+ * storage/StorageEvent.cpp:
+ * storage/StorageEvent.h:
+ * storage/StorageMap.cpp:
+ * storage/StorageMap.h:
+ * storage/StorageNamespaceImpl.cpp:
+ * storage/StorageSyncManager.cpp:
+ * storage/StorageSyncManager.h:
+
+2009-08-26 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28763, flickering when opacity changes.
+
+ Make opacity changes from < 1 to 1 and from 1 to < 1 cause a relayout to happen. We need
+ to do this in order for overflow information to be properly recomputed.
+
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::diff):
+
+2009-08-26 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ HTMLMediaElement sometimes loses events
+ https://bugs.webkit.org/show_bug.cgi?id=28762
+ <rdar://problem/7172437>
+
+ A media element triggers the resource selection algorithm if 
+ play() is called when the networkState attribute is NETWORK_EMPTY, but
+ it also immediately queues 'play' and either 'waiting' or 'playing' events.
+ One of the steps in preparing to load is to flush pending events, so those 
+ events were lost if the load timer fired quickly enough. Fixed by deleting
+ pending events before scheduling the load timer.
+
+ Test: media/audio-play-event.html
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::scheduleLoad):
+ Do nothing if the load timer is already scheduled. Call prepareForLoad so queue of
+ pending events is flushed immediately.
+ (WebCore::HTMLMediaElement::scheduleNextSourceChild):
+ New, start the load timer without flushing pending events.
+ (WebCore::HTMLMediaElement::load):
+ Call prepareForLoad();
+ (WebCore::HTMLMediaElement::prepareForLoad):
+ New, load setup code moved from loadInternal.
+ (WebCore::HTMLMediaElement::loadInternal):
+ Moved some setup code to prepareForLoad so it can be invoked immediately before
+ arming the load timer.
+ (WebCore::HTMLMediaElement::setNetworkState):
+ Call scheduleNextSourceChild instead of scheduleLoad as the later now clears
+ pending events.
+ * html/HTMLMediaElement.h:
+ Declare scheduleNextSourceChild.
+
+2009-08-26 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28751
+ Switch ICO decoder from a Vector of raw pointers to a Vector of
+ OwnPtrs now that that is possible. Makes code slightly simpler.
+
+ * platform/image-decoders/ico/ICOImageDecoder.cpp:
+ (WebCore::ICOImageDecoder::decodeAtIndex):
+ (WebCore::ICOImageDecoder::processDirectory):
+ * platform/image-decoders/ico/ICOImageDecoder.h:
+
+2009-08-26 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28718, image inside relpositioned inline doesn't paint.
+ Make sure vertical overflow is still computed across self-painting layers, even though it isn't
+ propagated to parents.
+
+ Added fast/repaint/rel-positioned-inline-with-overflow.html
+
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::computeVerticalOverflow):
+
+2009-08-26 David Levin <levin@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ ResourceRequestBase::*[Aa]llowHTTPCookies shouldn't mention http.
+ https://bugs.webkit.org/show_bug.cgi?id=28735
+
+ Renaming the method to imply its wider implications of affecting cookies
+ over any protocol that supports them.
+
+ No change in functionality so no new tests.
+
+ * WebCore.order:
+ * loader/DocumentThreadableLoader.cpp:
+ (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
+ (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
+ (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
+ * platform/network/ResourceRequestBase.cpp:
+ (WebCore::ResourceRequestBase::adopt):
+ (WebCore::ResourceRequestBase::copyData):
+ (WebCore::ResourceRequestBase::allowCookies):
+ (WebCore::ResourceRequestBase::setAllowCookies):
+ (WebCore::equalIgnoringHeaderFields):
+ * platform/network/ResourceRequestBase.h:
+ (WebCore::ResourceRequestBase::ResourceRequestBase):
+ * platform/network/cf/ResourceRequestCFNet.cpp:
+ (WebCore::ResourceRequest::doUpdatePlatformRequest):
+ (WebCore::ResourceRequest::doUpdateResourceRequest):
+ * platform/network/mac/ResourceRequestMac.mm:
+ (WebCore::ResourceRequest::doUpdateResourceRequest):
+ (WebCore::ResourceRequest::doUpdatePlatformRequest):
+ * platform/network/soup/ResourceRequestSoup.cpp:
+ (WebCore::ResourceRequest::updateFromSoupMessage):
+
+2009-08-26 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Made RenderInline::clippedOverflowRectForRepaint() actually include
+ overflow.
+
+ Test: fast/repaint/inline-overflow.html
+
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::linesVisibleOverflowBoundingBox): Added. Returns
+ the bounding box of all lines’ visible overflow boxes (under the
+ assumption that the first and last lines determine the top and
+ bottom, respectively).
+ (WebCore::RenderInline::clippedOverflowRectForRepaint): Changed to use
+ linesVisibleOverflowBoundingBox() instead of linesBoundingBox().
+ * rendering/RenderInline.h:
+
+2009-08-26 John Gregg <johnnyg@google.com>
+
+ Reviewed by David Levin.
+
+ minor style correction and include fix for notifications
+ https://bugs.webkit.org/show_bug.cgi?id=28745
+
+ No change in behavior, so no tests.
+
+ * bindings/js/JSDesktopNotificationsCustom.cpp: add include of Error.h
+ * notifications/Notification.cpp: change enum style to InterCaps
+ (WebCore::Notification::Notification):
+ * notifications/NotificationPresenter.h:
+ (WebCore::NotificationPresenter::):
+
+2009-08-25 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ postMessage() spec now supports sending arrays of ports
+ https://bugs.webkit.org/show_bug.cgi?id=26902
+
+ Added support for sending multiple ports at once via postMessage(). JS bindings will be updated in an upcoming patch.
+
+ No new tests, since the new functionality is not exposed via new JS bindings yet, so the old tests suffice.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ Mark MessagePort.h and MessagePortChannel.h as private since they are used by WebKit now.
+ * dom/MessageEvent.cpp:
+ Updated APIs to support passing MessagePortArrays.
+ (WebCore::MessageEvent::MessageEvent):
+ (WebCore::MessageEvent::initMessageEvent):
+ (WebCore::MessageEvent::messagePort):
+ * dom/MessageEvent.h:
+ (WebCore::MessageEvent::create):
+ Now accepts a MessagePortArray parameter instead of a single MessagePort.
+ (WebCore::MessageEvent::ports):
+ * dom/MessagePort.cpp:
+ (WebCore::MessagePort::postMessage):
+ (WebCore::MessagePort::dispatchMessages):
+ (WebCore::MessagePort::disentanglePorts):
+ Added new static function to extract a MessagePortChannelArray from a MessagePortArray.
+ (WebCore::MessagePort::entanglePorts):
+ Added new static function to generate a MessagePortArray (entangled ports) from a MessagePortChannelArray.
+ * dom/MessagePort.h:
+ * dom/MessagePortChannel.cpp:
+ EventData now contains a MessagePortChannelArray field instead of a single MessagePortChannel.
+ (WebCore::MessagePortChannel::EventData::create):
+ (WebCore::MessagePortChannel::EventData::EventData):
+ * dom/MessagePortChannel.h:
+ (WebCore::MessagePortChannel::EventData::channels):
+ * page/DOMWindow.cpp:
+ (WebCore::PostMessageTimer::PostMessageTimer):
+ (WebCore::PostMessageTimer::event):
+ (WebCore::DOMWindow::postMessage):
+ Now accepts a MessagePortArray parameter instead of a single MessagePort.
+ * page/DOMWindow.h:
+ * workers/DedicatedWorkerContext.cpp:
+ (WebCore::DedicatedWorkerContext::postMessage):
+ Now accepts a MessagePortArray parameter instead of a single MessagePort.
+ (WebCore::DedicatedWorkerContext::dispatchMessage):
+ * workers/DedicatedWorkerContext.h:
+ * workers/Worker.cpp:
+ (WebCore::Worker::postMessage):
+ Now accepts a MessagePortArray parameter instead of a single MessagePort.
+ (WebCore::Worker::dispatchMessage):
+ * workers/Worker.h:
+ * workers/WorkerContextProxy.h:
+ * workers/WorkerMessagingProxy.cpp:
+ Updated WorkerObjectProxy and WorkerContextProxy API implementations to support sending multiple MessagePorts.
+ (WebCore::MessageWorkerContextTask::create):
+ (WebCore::MessageWorkerContextTask::MessageWorkerContextTask):
+ (WebCore::MessageWorkerContextTask::performTask):
+ (WebCore::MessageWorkerTask::create):
+ (WebCore::MessageWorkerTask::MessageWorkerTask):
+ (WebCore::MessageWorkerTask::performTask):
+ (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
+ (WebCore::WorkerMessagingProxy::postMessageToWorkerContext):
+ * workers/WorkerMessagingProxy.h:
+ * workers/WorkerObjectProxy.h:
+ Updated WorkerObjectProxy and WorkerContextProxy APIs to support sending multiple MessagePorts.
+
+2009-08-26 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ SocketStreamHandle interface for WebSocket API
+ https://bugs.webkit.org/show_bug.cgi?id=28037
+
+ Add build systems only for GNUmakefile.am and WebCore.xcodeproj.now.
+ Other build systems will be updated once the code is functional.
+ Tests will be landed once this code is complete and functional.
+
+ * GNUmakefile.am:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/network/SocketStreamErrorBase.cpp: Added.
+ * platform/network/SocketStreamErrorBase.h: Added.
+ * platform/network/SocketStreamHandleBase.cpp: Added.
+ * platform/network/SocketStreamHandleBase.h: Added.
+ * platform/network/SocketStreamHandleClient.h: Added.
+ * platform/network/cf/SocketStreamError.h: Added.
+ * platform/network/cf/SocketStreamHandle.h: Added.
+ * platform/network/cf/SocketStreamHandleCFNet.cpp: Added.
+ * platform/network/soup/SocketStreamError.h: Added.
+ * platform/network/soup/SocketStreamHandle.h: Added.
+ * platform/network/soup/SocketStreamHandleSoup.cpp: Added.
+
+2009-08-26 Mads Ager <ager@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] setTimeout does not convert non-string argument to string
+ https://bugs.webkit.org/show_bug.cgi?id=28739
+
+ Convert non-string argument to setTimeout to string in the V8
+ bindings.
+
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8Custom::WindowSetTimeoutImpl):
+
+2009-08-25 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ [ES5] Implement getOwnPropertyDescriptor
+ https://bugs.webkit.org/show_bug.cgi?id=28724
+
+ Implement the WebCore side of getOwnPropertyDescriptor. This
+ requires a custom implementation of getOwnPropertyDescriptor
+ for every class with a custom implementation of getOwnPropertySlot.
+
+ The bindings generator has been updated to generate appropriate
+ versions of getOwnPropertyDescriptor for the general case where
+ a custom getOwnPropertyDescriptor is not needed. ES5 is vague
+ about how getOwnPropertyDescriptor should work in the context of
+ "host" functions with polymorphic [[GetOwnProperty]], so it seems
+ okay that occasionally we "guess" what attributes -- eg. determining
+ whether a property is writable.
+
+ Test: fast/js/getOwnPropertyDescriptor.html
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
+ * bindings/js/JSDOMWindowShell.cpp:
+ (WebCore::JSDOMWindowShell::getOwnPropertyDescriptor):
+ * bindings/js/JSDOMWindowShell.h:
+ * bindings/js/JSHTMLAppletElementCustom.cpp:
+ (WebCore::JSHTMLAppletElement::getOwnPropertyDescriptorDelegate):
+ * bindings/js/JSHTMLEmbedElementCustom.cpp:
+ (WebCore::JSHTMLEmbedElement::getOwnPropertyDescriptorDelegate):
+ * bindings/js/JSHTMLObjectElementCustom.cpp:
+ (WebCore::JSHTMLObjectElement::getOwnPropertyDescriptorDelegate):
+ * bindings/js/JSHistoryCustom.cpp:
+ (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
+ * bindings/js/JSLocationCustom.cpp:
+ (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
+ * bindings/js/JSNamedNodesCollection.cpp:
+ (WebCore::JSNamedNodesCollection::getOwnPropertyDescriptor):
+ * bindings/js/JSNamedNodesCollection.h:
+ * bindings/js/JSPluginElementFunctions.cpp:
+ (WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
+ * bindings/js/JSPluginElementFunctions.h:
+ * bindings/js/JSQuarantinedObjectWrapper.cpp:
+ (WebCore::JSQuarantinedObjectWrapper::getOwnPropertyDescriptor):
+ * bindings/js/JSQuarantinedObjectWrapper.h:
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::getOwnPropertyDescriptorDelegate):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bridge/objc/objc_runtime.h:
+ * bridge/objc/objc_runtime.mm:
+ (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertyDescriptor):
+ * bridge/runtime.h:
+ (JSC::Bindings::Instance::getOwnPropertyDescriptor):
+ * bridge/runtime_array.cpp:
+ (JSC::RuntimeArray::getOwnPropertyDescriptor):
+ * bridge/runtime_array.h:
+ * bridge/runtime_method.cpp:
+ (JSC::RuntimeMethod::getOwnPropertyDescriptor):
+ * bridge/runtime_method.h:
+ * bridge/runtime_object.cpp:
+ (JSC::RuntimeObjectImp::getOwnPropertyDescriptor):
+ * bridge/runtime_object.h:
+
+2009-08-26 Vincent Untz <vuntz@gnome.org>
+
+ Reviewed by Xan Lopez.
+
+ GObject checks for NULL (and not 0) in g_object_get, so use that
+ as we were already doing elsewhere to make the compiler happy.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::hasAudio):
+
+2009-08-26 Alpha Lam <hclam@chromium.org>
+
+ Reviewed by David Levin.
+
+ RenderThemeMac.mm has incorrect casting for media control element.
+ https://bugs.webkit.org/show_bug.cgi?id=28730
+
+ MediaControlMuteButtonElement was incorrectly casted to
+ MediaControlPlayButtonElement. This is corrected in this patch.
+
+ No new tests because this is code cleanup and is already covered by existing
+ media layout tests.
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintMediaMuteButton):
+
+2009-08-26 Robert Sesek <rsesek@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [Chromium] Multi-value select boxes cannot do non-contiguous selection on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=28670
+
+ Change the condition regarding the key modifier check for non-contiguous
+ selection on a multi-value list from just PLATFORM(MAC) to
+ PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN)).
+
+ No new tests. This patch only changes the condition on which a certain mouse
+ event modifier key is used.
+
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::listBoxDefaultEventHandler):
+
+2009-08-25 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ r47744 causes media/video-controls-with-mutation-event-handler.html to crash
+ https://bugs.webkit.org/show_bug.cgi?id=28732
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement):
+ Don't call setAttribute from the construtor, any registered mutation event
+ listener will cause a crash.
+
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::createVolumeSlider):
+ Set the maxAttr here instead of in the constructor.
+
+2009-08-25 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Brady Eidson.
+
+ Timers from cached pages fire instantly rather than the after the specified timeout delay
+ https://bugs.webkit.org/show_bug.cgi?id=28683
+
+ Test: fast/dom/Window/timer-resume-on-navigation-back.html
+
+ * history/CachedPage.cpp:
+ (WebCore::CachedPage::restore): Remove duplicated Frame::restore() call, since
+ it should be done only once in FrameLoader::open(cachedFrame)
+ * page/DOMTimer.cpp: Added a debug-only flag and ASSERT to catch out-of-order suspense/restore.
+ (WebCore::DOMTimer::DOMTimer): Ditto.
+ (WebCore::DOMTimer::suspend): Ditto.
+ (WebCore::DOMTimer::resume): Ditto.
+ * page/DOMTimer.h: Ditto.
+
+2009-08-25 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Setting the volume of a media element has no effect if called too early
+ https://bugs.webkit.org/show_bug.cgi?id=28731
+
+ * manual-tests/audio-volume.html:
+ Added.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::setVolume):
+ (WebCore::MediaPlayerPrivate::setRate):
+ Don't bail if metadata hasn't been loaded, it is fine to set rate and/or
+ volume as soon as the movie has been created.
+
+2009-08-25 David Levin <levin@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ DocumentThreadableLoader::getShouldUseCredentialStorage should allow for synchronous callbacks from SubresourceLoader::create.
+ https://bugs.webkit.org/show_bug.cgi?id=28728
+
+ Test: This code path is exercised while running xhr layout tests in chromium.
+
+ * loader/DocumentThreadableLoader.cpp:
+ (WebCore::DocumentThreadableLoader::getShouldUseCredentialStorage): When called
+ back synchronously, the loader is 0, so the assert is changed to allow for that.
+ (WebCore::DocumentThreadableLoader::loadRequest): Synchronous callbacks may be
+ done before SubresourceLoader::create finishes, so ensure that any previous loader
+ -- from a preflight request -- is cleared before calling SubresourceLoader::create.
+
+2009-08-25 Mark Rowe <mrowe@apple.com>
+
+ Stop installing IDL files in to the framework.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-08-25 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Support for HTMLInputElement::list and HTMLInputElement::selectedOption.
+ https://bugs.webkit.org/show_bug.cgi?id=27756
+
+ Tests: fast/forms/input-list.html
+ fast/forms/input-selectedoption.html
+
+ * html/HTMLAttributeNames.in:
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::parseMappedAttribute):
+ (WebCore::HTMLInputElement::list):
+ (WebCore::HTMLInputElement::selectedOption):
+ * html/HTMLInputElement.h:
+ * html/HTMLInputElement.idl:
+
+2009-08-25 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <video> and <audio> controller should be accessible (edit)
+ https://bugs.webkit.org/show_bug.cgi?id=28081
+
+ Test: accessibility/media-element.html
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ Add AccessibilityMediaControls.cpp/.h
+
+ * accessibility/AXObjectCache.cpp:
+ * accessibility/AXObjectCache.h:
+ (WebCore::AXObjectCache::getOrCreate):
+ Create AccessibilityMediaControl. Update Copyright
+
+ * accessibility/AccessibilityMediaControls.cpp:
+ * accessibility/AccessibilityMediaControls.h:
+ Added.
+
+ * accessibility/AccessibilityObject.cpp:
+ * accessibility/AccessibilityObject.h:
+ Add isMediaTimeline. Update Copyright.
+
+ * accessibility/AccessibilitySlider.h:
+ Make constructor protected instead of private so AccessibilityMediaTimeline can
+ call it.
+
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
+ Add NSAccessibilityValueDescriptionAttribute to range attributes.
+ (-[AccessibilityObjectWrapper subrole]):
+ Return NSAccessibilityTimelineSubrole for AccessibilityMediaTimeline.
+
+ * dom/Node.h:
+ add isMediaControlElement.
+
+ * page/mac/WebCoreViewFactory.h:
+ * platform/LocalizedStrings.h:
+ * platform/mac/LocalizedStringsMac.mm:
+ (WebCore::localizedMediaControlElementString):
+ (WebCore::localizedMediaControlElementHelpText):
+ (WebCore::localizedMediaTimeDescription):
+ New, return localized media controller strings.
+
+ * platform/gtk/LocalizedStringsGtk.cpp:
+ (WebCore::mediaElementLoadingStateText):
+ (WebCore::mediaElementLiveBroadcastStateText):
+ Move inside of "#if ENABLE(VIDEO)"
+ (WebCore::localizedMediaControlElementString):
+ (WebCore::localizedMediaControlElementHelpText):
+ (WebCore::localizedMediaTimeDescription):
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlElement::MediaControlElement):
+ Initialize m_displayType.
+ (WebCore::MediaControlElement::MediaControlElement):
+ (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement):
+ Fix style.
+ (WebCore::MediaControlInputElement::MediaControlInputElement):
+ Set m_displayType based on pseudo style ID.
+ (WebCore::MediaControlInputElement::MediaControlInputElement):
+ rename local "o" to "object".
+ (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement):
+ (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement):
+ (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement):
+ (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement):
+ (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement):
+ (WebCore::MediaControlTimelineElement::MediaControlTimelineElement):
+ (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement):
+ (WebCore::MediaControlTimelineElement::MediaControlTimelineElement):
+ (WebCore::MediaControlTimelineElement::MediaControlTimelineElement):
+ (WebCore::MediaControlTimelineElement::MediaControlTimelineElement):
+ Update for MediaControlInputElement constructor change.
+ (WebCore::MediaControlTimeDisplayElement::formatTime):
+ New, moved here from RenderMedia so AccessibilityMediaTimeDisplay can use it.
+ (WebCore::MediaControlTimeDisplayElement::setCurrentValue):
+ New, set text to current time.
+ * rendering/MediaControlElements.h:
+
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::updateControls):
+ Create controls in tab order.
+ (WebCore::RenderMedia::formatTime):
+ Moved to MediaControlTimeDisplayElement::formatTime.
+ (WebCore::RenderMedia::updateTimeDisplay):
+ Call MediaControlTimeDisplayElement::setCurrentValue.
+ * rendering/RenderMedia.h:
+
+2009-08-25 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ [V8] Fix Canvas layout test failures in Chromium build.
+ https://bugs.webkit.org/show_bug.cgi?id=28720
+
+ The previous fix r47757 does not handle the V8 object conversion correctly.
+
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-08-25 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ [V8] Fix compiling errors in Chromium build caused by Canvas3D changes from r47752.
+ https://bugs.webkit.org/show_bug.cgi?id=28717
+
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-08-25 Alpha Lam <hclam@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] Implement media volume slider for chromium
+ https://bugs.webkit.org/show_bug.cgi?id=28715
+
+ Provided the implementation of the volume slider and its container for
+ chromium port. With this change there will be a usable volume control
+ slider for chromium theme.
+
+ No new tests since this is covered by existing media layout tests.
+
+ * css/mediaControlsChromium.css: CSS style for the volume slider.
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::mediaSliderThumbImage): Returns the image for slider thumb.
+ (WebCore::mediaVolumeSliderThumbImage): Returns the image for volume slider thumb.
+ (WebCore::RenderThemeChromiumSkia::paintMediaVolumeSliderTrack): Paints the track with one vertical white line.
+ (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize): Adjusts thumb sizes according to the images.
+ (WebCore::RenderThemeChromiumSkia::paintMediaSliderThumb): Paints slider thumb image.
+ (WebCore::RenderThemeChromiumSkia::paintMediaVolumeSliderThumb): Paints volume slider thumb image.
+
+2009-08-25 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Missed checking in 2 Canvas3D files
+ https://bugs.webkit.org/show_bug.cgi?id=28018
+
+ * bindings/js/JSCanvasRenderingContextCustom.cpp: Implements toJS to do proper subclass binding
+ * bindings/js/JSCanvasRenderingContext3DCustom.cpp: Argument marshaling for 3D calls
+
+2009-08-25 Mads Ager <ager@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Exception from JavaScript propagates to main script
+ https://bugs.webkit.org/show_bug.cgi?id=26433
+
+ Make sure that exceptions thrown both at compile time and at
+ runtime in javascript URLs are isolated from the main script.
+
+ Test: fast/dom/javascript-url-exception-isolation.html
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluate):
+
+2009-08-25 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Added all new Canvas3D files to the build
+ https://bugs.webkit.org/show_bug.cgi?id=28018
+
+ This also hooks up CanvasRenderingContext as the common base class for
+ CanvasRenderingContext2D and CanvasRenderingContext3D. And it adds a bit
+ of logic throughout to support the new CanvasRenderingContext3D object.
+ But nothing is hooked up yet.
+
+ * DerivedSources.make:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore/GNUmakefile.am:
+ * WebCore/WebCore.gypi:
+ * WebCore/WebCoreSources.bkl:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
+ (WebCore::JSCanvasRenderingContext2D::strokeStyle):
+ (WebCore::JSCanvasRenderingContext2D::setStrokeStyle):
+ (WebCore::JSCanvasRenderingContext2D::fillStyle):
+ (WebCore::JSCanvasRenderingContext2D::setFillStyle):
+ (WebCore::JSCanvasRenderingContext2D::setFillColor):
+ (WebCore::JSCanvasRenderingContext2D::setStrokeColor):
+ (WebCore::JSCanvasRenderingContext2D::strokeRect):
+ (WebCore::JSCanvasRenderingContext2D::drawImage):
+ (WebCore::JSCanvasRenderingContext2D::drawImageFromRect):
+ (WebCore::JSCanvasRenderingContext2D::setShadow):
+ (WebCore::JSCanvasRenderingContext2D::createPattern):
+ (WebCore::JSCanvasRenderingContext2D::putImageData):
+ (WebCore::JSCanvasRenderingContext2D::fillText):
+ (WebCore::JSCanvasRenderingContext2D::strokeText):
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::isObservableThroughDOM):
+ * bindings/js/JSDocumentCustom.cpp:
+ * bindings/js/JSHTMLCanvasElementCustom.cpp:
+ (WebCore::JSHTMLCanvasElement::markChildren):
+ * dom/Document.cpp:
+ (WebCore::Document::getCSSCanvasContext):
+ * dom/Document.h:
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::getContext):
+ (WebCore::HTMLCanvasElement::willDraw):
+ (WebCore::HTMLCanvasElement::reset):
+ (WebCore::HTMLCanvasElement::paint):
+ (WebCore::HTMLCanvasElement::is3D):
+ (WebCore::HTMLCanvasElement::context3D):
+ (WebCore::HTMLCanvasElement::texture3D):
+ * html/HTMLCanvasElement.h:
+ (WebCore::HTMLCanvasElement::renderingContext):
+ * html/canvas/CanvasObject.cpp:
+ (WebCore::CanvasObject::~CanvasObject):
+ * html/canvas/CanvasRenderingContext.idl:
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
+ (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D):
+ * html/canvas/CanvasRenderingContext2D.h:
+ (WebCore::CanvasRenderingContext2D::is2d):
+ * html/canvas/CanvasRenderingContext2D.idl:
+ * html/canvas/CanvasRenderingContext3D.cpp:
+ * html/canvas/CanvasRenderingContext3D.idl:
+
+2009-08-25 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ REGRESSION (r47630): fast/repaint/background-generated.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=28704
+
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::calculateFillTileSize): Handle SizeNone.
+ * rendering/style/FillLayer.cpp:
+ (WebCore::FillLayer::FillLayer): Initialize the size type to SizeNone.
+ * rendering/style/FillLayer.h:
+ (WebCore::FillSize::FillSize): Changed assignment to initialization and
+ removed redundant assignment to size.
+
+2009-08-25 Yusuke Sato <yusukes@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Complex text doesn't show up with text stroking
+ https://bugs.webkit.org/show_bug.cgi?id=28707
+
+ Skip the NULL check of m_hdc if Windows GDI is not in use.
+
+ * platform/graphics/chromium/FontChromiumWin.cpp:
+ (WebCore::Font::drawComplexText):
+
+2009-08-25 Alpha Lam <hclam@chromium.org>
+
+ Reviewed by David Levin.
+
+ Media controls panel does not have a volume control slider
+ https://bugs.webkit.org/show_bug.cgi?id=28241
+
+ Introduced "-webkit-media-controls-volume-slider",
+ "-webkit-media-controls-volume-slider-container" and the supporting
+ implementation. Also added appearances of "media-volume-slider" and
+ "media-volume-slider-container".
+
+ The implementation of the controls are in WebCore::MediaControlElements.
+ Logic to trigger the display of the volume controls are in WebCore::RenderMedia.
+
+ No new tests since this change doesn't have theme implementation and the
+ volume slider is disabled by default.
+
+ * accessibility/AccessibilitySlider.cpp:
+ (WebCore::AccessibilitySlider::orientation): Marks that volume slider is vertical.
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added corresponding CSS values.
+ * css/CSSSelector.cpp:
+ (WebCore::CSSSelector::extractPseudoType): ditto.
+ * css/CSSSelector.h:
+ (WebCore::CSSSelector::): ditto.
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): ditto.
+ * css/CSSValueKeywords.in: ditto.
+ * css/mediaControls.css: Makes the volume slider disabled by default.
+ * platform/ThemeTypes.h: Defines theme parts for volume slider and its container.
+ (WebCore::):
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement):
+ (WebCore::MediaControlVolumeSliderContainerElement::styleForElement):
+ Adjust the CSS values for "display", "postion", "left" and "top" according to member variables.
+ (WebCore::MediaControlVolumeSliderContainerElement::setVisible): Affects the "display" CSS value.
+ (WebCore::MediaControlVolumeSliderContainerElement::setPosition): Affects the "left" and "top" CSS values.
+ (WebCore::MediaControlVolumeSliderContainerElement::hitTest): Hit testing this element.
+ (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement):
+ (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): Modifies the volume using the slider value, allows dragging.
+ * rendering/MediaControlElements.h:
+ (WebCore::): Added definition for MediaControlVolumeSliderElement and MediaControlVolumeSliderContainerElement.
+ (WebCore::MediaControlVolumeSliderContainerElement::isVisible): Inline getter.
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::styleDidChange): Updates styles for volume container and volume slider.
+ (WebCore::RenderMedia::createVolumeSliderContainer): Creates volume slider container and attach to panel.
+ (WebCore::RenderMedia::createVolumeSlider): Creates volume slider and attach to volume slider container.
+ (WebCore::RenderMedia::updateControls): Updates volume container and volume slider.
+ (WebCore::RenderMedia::updateVolumeSliderContainer): Sets the visibility and position of volume slider container and its child.
+ (WebCore::RenderMedia::forwardEvent):
+ Hit testing the volume slider container and volume slider to toggle the visibility and forward events to slider.
+ * rendering/RenderMedia.h:
+ Added definition for RenderMedia::updateVolumeSliderContainer().
+ * rendering/RenderMediaControls.cpp:
+ (WebCore::RenderMediaControls::paintMediaControlsPart): Not implemented.
+ * rendering/RenderSlider.cpp:
+ (WebCore::RenderSlider::createThumbStyle): Makes volume slider vertical.
+ (WebCore::RenderSlider::thumbRect): ditto.
+ (WebCore::RenderSlider::mouseEventIsInThumb): ditto.
+ (WebCore::RenderSlider::setValueForPosition): ditto.
+ (WebCore::RenderSlider::positionForOffset): ditto.
+ (WebCore::RenderSlider::currentPosition): ditto.
+ (WebCore::RenderSlider::trackSize): ditto.
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::adjustStyle): Adjust style for volume slider thumb.
+ (WebCore::RenderTheme::paint): Paints volume control parts using theme.
+ * rendering/RenderTheme.h:
+ (WebCore::RenderTheme::paintMediaVolumeSliderContainer): Naive implementation to be overridden.
+ (WebCore::RenderTheme::paintMediaVolumeSliderTrack): ditto.
+ (WebCore::RenderTheme::paintMediaVolumeSliderThumb): ditto.
+ * rendering/style/RenderStyleConstants.h:
+ (WebCore::): Constants for volume control parts.
+
+2009-08-25 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt/Mac] Use CONFIG+=build_all only when building libraries
+
+ If no configuration is specified when building WebKit we pass the
+ debug_and_release option to QMake which results in Makefiles for
+ both configurations being generated.
+
+ Previously we built both of these configurations by default, for
+ all targets (both the QtWebKit framework/dyldlib and the various
+ executables such as QtLauncher and tests). This makes sense for
+ the libraries, which get the _debug suffix and can be loaded on
+ demand by setting the DYLD_IMAGE_SUFFIX, but for executables we
+ ended up building the same executable twice.
+
+ We now only build one instance of each executable, and since this
+ is a developer build we build the debug-version. Passing either
+ --debug or --release to build-webkit will override this, and
+ even in the default case the release version can still be built
+ by running 'make release' in the the build directory of each
+ target.
+
+ * WebCore.pro:
+
+2009-08-25 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28690
+ Build failure in webkitgtk+-1.1.3
+
+ Do not use deprecated function to unref a pixbuf.
+
+ * platform/gtk/CursorGtk.cpp:
+ (WebCore::Cursor::Cursor):
+
+2009-08-24 Hironori Bono <hbono@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fix Bug 27827 "[Chromium] Functions Keys don't work in google spreadsheet".
+ <https://bugs.webkit.org/show_bug.cgi?id=27827>.
+
+ Because of the lack of mappings from GDK key-codes to WebKit key-codes,
+ Chromium cannot send valid key-codes to JavaScript when a user types
+ function keys. This change just copies the mappings from 'KeyEventGtk.cpp'.
+
+ To write layout tests for this issue, added mappings from function-key
+ names to platform-specific key-codes to EventSendingController objects
+ so that eventSender.keyDown() can send function-key events without using
+ platform-specific key codes. (Unfortunately, this eventSender.keyDown() change
+ is only for Mac. So this change adds this new test to Skipped tests for other
+ platforms to prevent this change from crashing the build trees.)
+
+ Test: fast/events/keydown-function-keys.html
+
+ * platform/chromium/KeyCodeConversionGtk.cpp: Add mappings from GDK key-codes
+ to WebKit key-code for function keys.
+ (WebCore::windowsKeyCodeForKeyEvent):
+
+2009-08-24 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28698
+ Avoid unnecessary transformations for the window resizer rect.
+
+ * platform/Scrollbar.cpp:
+ (WebCore::Scrollbar::setFrameRect):
+
+2009-08-24 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/7161900> REGRESSION: 100 MB membuster leak on windows due to 47391
+ (DNS prefetching support)
+
+ * platform/network/cf/DNSCFNet.cpp: (WebCore::prefetchDNS): Use a run loop from secondary
+ thread on Windows, because there isn't one on main one.
+
+2009-08-24 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28374
+ Cross-scheme requests should not be blocked by appcache rules
+
+ Test: http/tests/appcache/different-scheme.html
+
+ * loader/appcache/ApplicationCacheHost.cpp:
+ (WebCore::ApplicationCacheHost::shouldLoadResourceFromApplicationCache):
+ Resources with different schemes can never be loaded from appcache.
+
+2009-08-24 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler and Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28688
+ REGRESSION(r24994): Cannot create a frame with a javascript URL
+
+ Test: http/tests/security/javascriptURL/javascriptURL-in-new-iframe.html
+
+ * bindings/js/JSAttrCustom.cpp: (WebCore::JSAttr::setValue):
+ * bindings/js/JSElementCustom.cpp: (WebCore::allowSettingSrcToJavascriptURL):
+ * bindings/js/JSHTMLFrameElementCustom.cpp: (WebCore::allowSettingJavascriptURL):
+ * bindings/js/JSHTMLIFrameElementCustom.cpp: (WebCore::JSHTMLIFrameElement::setSrc):
+ Omit the checks if there is no document in frame yet.
+
+2009-08-24 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix crash in fast/css/rem-dynamic-scaling.html due to a freed
+ RenderStyle being accessed.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28681
+
+ * dom/Element.cpp:
+ (WebCore::Element::recalcStyle): Make currentStyle a RefPtr.
+
+2009-08-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/5743105> Long freezing during loading and selecting text
+ of a large table
+ https://bugs.webkit.org/show_bug.cgi?id=14918
+
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::setSelection): Added calls to
+ beginDeferredRepaints() and endDeferredRepaints() around the
+ invalidation of the selection, in order to better coalesce multiple
+ invalid rectangles.
+
+2009-08-24 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Simplify findTreeElement code, get rid of potential infinite loop.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28680
+
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.updateBreadcrumb):
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeOutline.prototype.findTreeElement):
+ * inspector/front-end/treeoutline.js:
+ (TreeOutline.prototype.getCachedTreeElement):
+ (TreeOutline.prototype.findTreeElement):
+ * inspector/front-end/utilities.js:
+ (isAncestorNode):
+ ():
+
+2009-08-24 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Do expand local scope when hitting the break
+
+ https://bugs.webkit.org/show_bug.cgi?id=28678
+
+ * inspector/front-end/ScopeChainSidebarPane.js:
+ (WebInspector.ScopeChainSidebarPane.prototype.update):
+
+2009-08-24 Ada Chan <adachan@apple.com>
+
+ Reviewed by Steve Falkenburg.
+
+ Make sure we use the current FrameView's frame rect when
+ going back to a cached page.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28659
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::open):
+
+2009-08-24 Cameron McCormack <cam@mcc.id.au>
+
+ Reviewed by Darin Adler.
+
+ Modifying <text rotate=""> doesn't clear the corresponding SVGAnimatedNumberList
+ https://bugs.webkit.org/show_bug.cgi?id=28673
+
+ Test: svg/dom/text-rotate-live.html
+
+ * svg/SVGNumberList.cpp:
+ (WebCore::SVGNumberList::parse): Clear the list before adding the parsed
+ numbers.
+
+2009-08-24 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by NOBODY (build fix)
+
+ Turn off ENABLE_3D_CANVAS in the xconfig files.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-08-24 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Only expand local scope when hitting the break
+
+ https://bugs.webkit.org/show_bug.cgi?id=28678
+
+ * inspector/front-end/ScopeChainSidebarPane.js:
+ (WebInspector.ScopeChainSidebarPane.prototype.update):
+
+2009-08-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ background-size fails to parse if a single length/percentage/auto is followed by a comma
+ https://bugs.webkit.org/show_bug.cgi?id=28674
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseFillSize): Added an allowComma parameter,
+ which is set to false when this method consumes a comma. Moved
+ handling of 'contain' and 'cover' from parseFillProperty into this
+ method.
+ (WebCore::CSSParser::parseFillProperty): Set allowComma to true before
+ processing the next value, and pass allowComma to parseFillSize.
+ * css/CSSParser.h:
+
+2009-08-17 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] Support for cursors that are images
+ https://bugs.webkit.org/show_bug.cgi?id=28346
+
+ Added support for cursors which are images for CursorGtk. Added
+ a manual test for this.
+
+ * manual-tests/gtk/cursor-image.html: Added.
+ * manual-tests/gtk/resources/redcursor.cur: Added.
+ * platform/gtk/CursorGtk.cpp:
+ (WebCore::Cursor::Cursor):
+
+2009-08-24 Zan Dobersek <zandobersek@gmail.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] Integrate GStreamer video with the graphics backend
+ https://bugs.webkit.org/show_bug.cgi?id=16356
+
+ Improves GStreamer backend implementation of MediaPlayerPrivate class.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mediaPlayerPrivateErrorCallback): Send proper MediaPlayer
+ error for different GStreamer errors to MediaPlayerPrivate.
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Move static
+ initialization boolean to a better place.
+ (WebCore::MediaPlayerPrivate::play):
+ (WebCore::MediaPlayerPrivate::pause):
+ (WebCore::MediaPlayerPrivate::duration): Return if error occured, do not
+ consider the source as stream if duration query failed.
+ (WebCore::MediaPlayerPrivate::currentTime): Return if error occured, use
+ an early return.
+ (WebCore::MediaPlayerPrivate::seek): Return if error occured.
+ (WebCore::MediaPlayerPrivate::setEndTime): Remove implementation since this
+ function doesn't seem to be used anywhere in WebCore.
+ (WebCore::MediaPlayerPrivate::paused):
+ (WebCore::MediaPlayerPrivate::seeking):
+ (WebCore::MediaPlayerPrivate::setRate): Seek to current time when rate is set.
+ (WebCore::MediaPlayerPrivate::maxTimeBuffered): Return if error occured.
+ (WebCore::MediaPlayerPrivate::maxTimeSeekable): Ditto.
+ (WebCore::MediaPlayerPrivate::maxTimeLoaded): Ditto.
+ (WebCore::MediaPlayerPrivate::bytesLoaded):
+ (WebCore::MediaPlayerPrivate::totalBytesKnown):
+ (WebCore::MediaPlayerPrivate::totalBytes): Ditto.
+ (WebCore::MediaPlayerPrivate::updateStates): Return if error occured, update
+ after seek ended with a successful change
+ (WebCore::MediaPlayerPrivate::didEnd): Do not pause the playbin when end is reached.
+ (WebCore::MediaPlayerPrivate::loadingFailed): Update network state with the given error.
+ (WebCore::mimeTypeCache): Gather supported mime types from GStreamer.
+ (WebCore::MediaPlayerPrivate::getSupportedTypes):
+ (WebCore::MediaPlayerPrivate::supportsType):
+ (WebCore::MediaPlayerPrivate::hasSingleSecurityOrigin):
+ (WebCore::MediaPlayerPrivate::supportsFullscreen): First step towards fullscreen
+ support.
+ (WebCore::MediaPlayerPrivate::createGSTPlayBin): Use playbin2 instead of playbin,
+ do not set playbin's audio sink.
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+ * platform/graphics/gtk/VideoSinkGStreamer.cpp:
+ (webkit_video_sink_idle_func): Use C+casts, decrease reference count of async
+ queue at the end of the idle function.
+ (webkit_video_sink_render): Increase reference count of async queue.
+ (webkit_video_sink_stop): Remove any idle functions with the sink as data.
+
+2009-08-23 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Remaining new files for Canvas3D
+ https://bugs.webkit.org/show_bug.cgi?id=28018
+
+ * bindings/js/JSHTMLCanvasElementCustom.cpp: Added Canvas3D method behind an ifdef
+ * html/canvas/CanvasByteArray.cpp: Added. Efficient array of bytes for passing to GL functions
+ * html/canvas/CanvasByteArray.h: Added.
+ * html/canvas/CanvasByteArray.idl: Added.
+ * html/canvas/CanvasNumberArray.cpp: Added. Efficient array of 32 bit floats for passing to GL functions
+ * html/canvas/CanvasNumberArray.h: Added.
+ * html/canvas/CanvasNumberArray.idl: Added.
+
+2009-08-24 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Migrate call frames interaction to the InjectedScript-based schema.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28408
+
+ * inspector/front-end/CallStackSidebarPane.js:
+ (WebInspector.CallStackSidebarPane.prototype.update):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.doEvalInWindow):
+ (WebInspector.ConsoleTextMessage):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMAgent.prototype.get domWindow):
+ (InspectorController.openInInspectedWindow):
+ (InspectorController.getCallFrames):
+ (InspectorController.evaluateInCallFrame):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.reset):
+ (WebInspector.ElementsPanel.prototype.generateStylesheet):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.evaluate):
+ (InjectedScript._evaluateOn):
+ (InjectedScript.openInInspectedWindow):
+ (InjectedScript.getCallFrames):
+ (InjectedScript.evaluateInCallFrame):
+ (InjectedScript._callFrameForId):
+ (InjectedScript._objectForId):
+ (InjectedScript.CallFrameProxy):
+ (InjectedScript.CallFrameProxy.prototype._wrapScopeChain):
+ * inspector/front-end/ObjectPropertiesSection.js:
+ (WebInspector.ObjectPropertiesSection.prototype._update):
+ * inspector/front-end/ObjectProxy.js:
+ (WebInspector.ObjectPropertyProxy):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
+ * inspector/front-end/ScopeChainSidebarPane.js:
+ (WebInspector.ScopeChainSidebarPane):
+ (WebInspector.ScopeChainSidebarPane.prototype.update):
+ (WebInspector.ScopeVariableTreeElement.prototype.onattach):
+ (WebInspector.ScopeVariableTreeElement.prototype.onexpand):
+ (WebInspector.ScopeVariableTreeElement.prototype.oncollapse):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame):
+ (WebInspector.ScriptsPanel.prototype.variablesInSelectedCallFrame):
+ (WebInspector.ScriptsPanel.prototype.debuggerPaused.callback):
+ (WebInspector.ScriptsPanel.prototype.debuggerPaused):
+
+2009-08-24 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Add support for the placeholder attribute and DOM property of the textarea element.
+ https://bugs.webkit.org/show_bug.cgi?id=21248
+
+ A DOM node for an INPUT element doesn't have a flag for placeholder
+ visibility anymore. This patch also fixes a bug that a renderer
+ doesn't reflect a corresponding DOM value change.
+
+ Tests: fast/forms/textarea-placeholder-dom-property.html
+ fast/forms/textarea-placeholder-pseudo-style.html
+ fast/forms/textarea-placeholder-set-attribute.html
+ fast/forms/textarea-placeholder-set-value.html
+
+ * css/html.css: Add the default style for placeholder of textarea.
+ * dom/InputElement.cpp: Cleanup for m_placeholderShouldBeVisible removal
+ (WebCore::InputElement::dispatchFocusEvent):
+ (WebCore::InputElement::dispatchBlurEvent):
+ (WebCore::InputElement::placeholderShouldBeVisible):
+ (WebCore::InputElement::updatePlaceholderVisibility):
+ (WebCore::InputElement::setValueFromRenderer):
+ (WebCore::InputElementData::InputElementData):
+ * dom/InputElement.h:
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::dispatchFocusEvent):
+ (WebCore::HTMLInputElement::dispatchBlurEvent):
+ (WebCore::HTMLInputElement::setValue):
+ (WebCore::HTMLInputElement::placeholderShouldBeVisible):
+ * html/HTMLInputElement.h:
+ (WebCore::HTMLInputElement::updatePlaceholderVisibility):
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::parseMappedAttribute):
+ (WebCore::HTMLTextAreaElement::setValue):
+ (WebCore::HTMLTextAreaElement::placeholderShouldBeVisible):
+ (WebCore::HTMLTextAreaElement::updatePlaceholderVisibility):
+ (WebCore::HTMLTextAreaElement::dispatchFocusEvent):
+ (WebCore::HTMLTextAreaElement::dispatchBlurEvent):
+ * html/HTMLTextAreaElement.h:
+ * html/HTMLTextAreaElement.idl:
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::RenderTextControl):
+ (WebCore::RenderTextControl::styleDidChange):
+ (WebCore::RenderTextControl::setInnerTextStyle):
+ (WebCore::RenderTextControl::updatePlaceholderVisibility):
+ * rendering/RenderTextControl.h:
+ * rendering/RenderTextControlMultiLine.cpp:
+ (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
+ (WebCore::RenderTextControlMultiLine::nodeAtPoint):
+ (WebCore::RenderTextControlMultiLine::updateFromElement):
+ (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
+ (WebCore::RenderTextControlMultiLine::textBaseStyle):
+ * rendering/RenderTextControlMultiLine.h:
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
+ (WebCore::RenderTextControlSingleLine::textBaseStyle):
+ (WebCore::RenderTextControlSingleLine::updateFromElement):
+ (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
+ * rendering/RenderTextControlSingleLine.h:
+ * wml/WMLInputElement.cpp:
+ (WebCore::WMLInputElement::dispatchFocusEvent):
+ (WebCore::WMLInputElement::dispatchBlurEvent):
+ (WebCore::WMLInputElement::setValue):
+ (WebCore::WMLInputElement::placeholderShouldBeVisible):
+
+2009-08-23 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Code clean-up and build fix for filters enabled builds. Moved SVGNames.h
+ into #if ENABLE(SVG) for Document.cpp and added SVGNames.h to the other
+ files. They are needed there after r47688.
+
+ * dom/Document.cpp:
+ * svg/SVGComponentTransferFunctionElement.h:
+ * svg/SVGFELightElement.h:
+ * svg/SVGFEMergeNodeElement.h:
+ * svg/SVGFilterPrimitiveStandardAttributes.h:
+
+2009-08-23 Gustavo Noronha Silva <gns@gnome.org>
+
+ Unreviewed, build fix for make distcheck on GTK+.
+
+ * GNUmakefile.am: Added files needed for the build.
+ * bindings/js/JSDOMWindowCustom.cpp: Protect SharedWorker include
+ with #if clause.
+ * bindings/js/JSEventTarget.cpp: Dito.
+ * dom/Document.cpp: Dito.
+ * loader/FrameLoader.cpp: Dito.
+
+2009-08-23 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: Throws an Error on "null"
+ https://bugs.webkit.org/show_bug.cgi?id=28665
+
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.evaluate):
+
+2009-08-23 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: REGRESSION Formatting Function in Console is Abbreviated Too Often
+
+ https://bugs.webkit.org/show_bug.cgi?id=28666
+
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.getProperties):
+ (InjectedScript.createProxyObject):
+
+2009-08-22 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] BitmapImage::getGdkPixbuf does not handle alpha channels properly
+ https://bugs.webkit.org/show_bug.cgi?id=28345
+
+ When doing the conversion between cairo_surface_t* and GdkPixbuf*
+ account for the differences in the respective formats' in-memory
+ image format.
+
+ * platform/graphics/gtk/ImageGtk.cpp:
+ (WebCore::getCairoSurfacePixel):
+ (WebCore::getGdkPixbufPixel):
+ (WebCore::BitmapImage::getGdkPixbuf):
+
+2009-08-22 Darin Adler <darin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Make DOM classes start with a reference count of 1, like all other RefCounted
+
+ Next step: Element, HTMLElement, HTMLAnchorElement, HTMLAppletElement,
+ HTMLAreaElement, HTMLEmbedElement, HTMLFrameElement, HTMLIFrameElement,
+ HTMLObjectElement, HTMLPlugInElement, HTMLPlugInImageElement.
+
+ * DerivedSources.make: Fix error seen every time we build by escaping the $
+ in the build rule, since you have to use $$ for that in make.
+
+ * WebCore.base.exp: Updated.
+
+ * bindings/objc/DOM.mm:
+ Added now-needed include of SVGNames.h.
+
+ * dom/Document.cpp: Added now-needed include of SVGNames.h.
+ (WebCore::Document::createElement): Use create instead of new.
+
+ * dom/Element.cpp:
+ (WebCore::Element::Element): Added ConstructionType argument so the caller
+ can determine whether this starts with a reference count of either 0 or 1.
+ Later we will remove this again once they are all 1.
+ (WebCore::Element::create): Added.
+
+ * dom/Element.h: Added create and made constructor protected.
+
+ * dom/StyledElement.cpp:
+ (WebCore::StyledElement::StyledElement): Added ConstructionType argument.
+ * dom/StyledElement.h: Made many functions protected or private, including
+ the constructor.
+
+ * dom/make_names.pl: Use create to create the base elements HTMLElement,
+ SVGElement, and WMLElement.
+
+ * editing/CreateLinkCommand.cpp:
+ (WebCore::CreateLinkCommand::doApply): Use create instead of new.
+ * editing/UnlinkCommand.cpp:
+ (WebCore::UnlinkCommand::doApply): Ditto.
+
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::create): Added.
+ * html/HTMLAnchorElement.h: Made constructor protected and added create.
+ Also made m_rootEditableElementForSelectionOnMouseDown a RefPtr.
+
+ * html/HTMLAppletElement.cpp:
+ (WebCore::HTMLAppletElement::create): Added.
+ * html/HTMLAppletElement.h: Made constructor private and added create.
+
+ * html/HTMLAreaElement.cpp:
+ (WebCore::HTMLAreaElement::create): Added.
+ * html/HTMLAreaElement.h: Made constructor private and added create.
+
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::create): Added.
+ * html/HTMLElement.h: Made constructor protected and added create.
+ Made other functions protected and private. Also added inline
+ definition of constructor.
+
+ * html/HTMLEmbedElement.cpp:
+ (WebCore::HTMLEmbedElement::create): Added.
+ * html/HTMLEmbedElement.h: Made constructor private and added create.
+ Made other functions private.
+
+ * html/HTMLFrameElement.cpp:
+ (WebCore::HTMLFrameElement::create): Added.
+ (WebCore::HTMLFrameElement::parseMappedAttribute):
+ * html/HTMLFrameElement.h: Made constructor private and added create.
+ Made other functions private.
+
+ * html/HTMLFrameElementBase.h: Made functions protected and private.
+
+ * html/HTMLFrameOwnerElement.cpp:
+ (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement): Pass
+ CreateElement so reference count starts at 1.
+
+ * html/HTMLFrameOwnerElement.h: Made functions protected and private.
+
+ * html/HTMLIFrameElement.cpp:
+ (WebCore::HTMLIFrameElement::create): Added.
+ * html/HTMLIFrameElement.h: Made constructor private and added create.
+ Made other functions private.
+
+ * html/HTMLObjectElement.cpp:
+ (WebCore::HTMLObjectElement::create): Added.
+ (WebCore::HTMLObjectElement::containsJavaApplet): Changed while loop
+ into a for loop and tweaked formatting.
+
+ * html/HTMLObjectElement.h: Made constructor private and added create.
+ Made other functions private.
+
+ * html/HTMLPlugInElement.h: Made constructor protected.
+ Made other functions protected and private.
+
+ * html/HTMLPlugInImageElement.h: Made constructor and another function
+ protected.
+
+ * html/HTMLTagNames.in: Removed createWithNew from all classes that
+ now have create functions. Moved conditional noscript to a separate
+ paragraph.
+
+ * html/HTMLViewSourceDocument.cpp:
+ (WebCore::HTMLViewSourceDocument::addSpanWithClassName): Use create.
+ (WebCore::HTMLViewSourceDocument::addLink): Ditto.
+ * page/DragController.cpp:
+ (WebCore::documentFragmentFromDragData): Ditto.
+
+ * svg/SVGElement.cpp:
+ (WebCore::SVGElement::SVGElement): Pass CreateElementZeroRefCount
+ so reference count still starts at 0. Will change this class later.
+ (WebCore::SVGElement::create): Added.
+ * svg/SVGElement.h: Added create, made constructor protected, and
+ made other functions protected and private. Removed unneeded
+ SVGNames.h include.
+
+ * svg/SVGExternalResourcesRequired.h: Added now-needed SVGNames.h
+ include.
+
+ * svg/SVGStopElement.h: Added now-needed SVGNames.h include.
+ Made functions private.
+
+ * wml/WMLElement.cpp:
+ (WebCore::WMLElement::WMLElement): Pass CreateElementZeroRefCount
+ so reference count still starts at 0. Will change this class later.
+ (WebCore::WMLElement::create): Added.
+ * wml/WMLElement.h: Added create and made constructor protected.
+
+ * wml/WMLTagNames.in: Removed createWithNew from WMLElement.
+
+2009-08-22 Adele Peterson <adele@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Fix for <rdar://problem/7161656> Crash in RenderObject::destroy when using custom scrollbars
+
+ Custom scrollbars normally get detached when a document gets detached. In this case, a crash was happening when the document had gone into the page cache
+ and then was getting destroyed without proper scrollbar teardown. This change makes custom scrollbars get detached when the document enters the cache.
+
+ I couldn't figure out a way to reliably cause this to happen in DRT, since the reproducible case relies on the cache being purged at a particular time.
+
+ * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): Detach custom scrollbars when the CachedFrame is created.
+ They'll get reattached when the document comes out of the page cache.
+ * page/FrameView.cpp: (WebCore::FrameView::~FrameView): Added some asserts to catch this problem earlier in debug builds.
+
+2009-08-22 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Make sure self-collapsing blocks that clear floats are still able to collapse their bottom margins with
+ the bottom of their parent blocks. The old code prevented all collapsing, but all CSS2.1 states is that:
+ "An element that has had clearance applied to it never collapses its top margin with its parent block's bottom margin."
+
+ The implication is that the bottom margin can still collapse, and the block-inside-inline form of
+ fast/block/margin-collapse/025.html (added as fast/block/margin-collapse/block-inside-inline/025.html) depends
+ on it to get comparable results.
+
+ Added block-inside-inline tests (a whole slew of them) in fast/block/margin-collapse/block-inside-inline/
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::MarginInfo::MarginInfo):
+ (WebCore::RenderBlock::collapseMargins):
+ (WebCore::RenderBlock::clearFloatsIfNeeded):
+ (WebCore::RenderBlock::handleBottomOfBlock):
+ * rendering/RenderBlock.h:
+ (WebCore::RenderBlock::MarginInfo::clearMargin):
+ (WebCore::RenderBlock::MarginInfo::canCollapseBottomWithChildren):
+
+2009-08-22 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Need to implement ARIA role="listitem" and role="list"
+ https://bugs.webkit.org/show_bug.cgi?id=28606
+
+ Test: platform/mac-snowleopard/accessibility/aria-list-and-listitem.html
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::getOrCreate):
+ * accessibility/AccessibilityList.cpp:
+ (WebCore::AccessibilityList::isUnorderedList):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::RoleEntry::):
+
+2009-08-21 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Clean up fill image geometry calculation
+ https://bugs.webkit.org/show_bug.cgi?id=28652
+
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::calculateFillTileSize): Renamed
+ calculateBackgroundSize() to this. Replaced separate scaledWidth and
+ scaledHeight parameters with a single scaledSize parameter. Renamed
+ parameters and local variables.
+ (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Changed
+ to use CSS3 Backgrounds and Borders terminology in comments and
+ local variable names. Renamed, clarified and consolidated some local
+ variables.
+ * rendering/RenderBoxModelObject.h: Made calculateFillTileSize() private.
+
+2009-08-22 Chris Marrin <cmarrin@apple.com>
+
+ Unreviewed, build fix.
+
+ Backing out http://trac.webkit.org/changeset/47669
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ * html/canvas/CanvasRenderingContext2D.h:
+
+2009-08-22 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ Backing out http://trac.webkit.org/changeset/47671 in preparation of
+ rolling out http://trac.webkit.org/changeset/47669.
+
+2009-08-22 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Anders Carlsson.
+
+ Build fix, add CanvasRenderingContext to build systems.
+ https://bugs.webkit.org/show_bug.cgi?id=28018
+
+ * DerivedSources.make: Added CanvasRenderinContext.
+ * GNUmakefile.am: Ditto.
+ * WebCore.gypi: Ditto.
+ * WebCore.pro: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * WebCoreSources.bkl: Ditto.
+
+2009-08-21 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ New files implementing GL buffer wrappers, and support to make them platform independent
+ https://bugs.webkit.org/show_bug.cgi?id=28018
+
+ * html/canvas/CanvasBuffer.cpp: Added. Wrapper around GL Buffer object
+ * html/canvas/CanvasBuffer.h: Added.
+ * html/canvas/CanvasBuffer.idl: Added.
+ * html/canvas/CanvasFramebuffer.cpp: Added. Wrapper around GL Framebuffer object
+ * html/canvas/CanvasFramebuffer.h: Added.
+ * html/canvas/CanvasFramebuffer.idl: Added.
+ * html/canvas/CanvasObject.h: Expose m_context
+ * html/canvas/CanvasProgram.cpp: Added. Wrapper around GL Program object
+ * html/canvas/CanvasProgram.h: Added.
+ * html/canvas/CanvasProgram.idl: Added.
+ * html/canvas/CanvasRenderbuffer.cpp: Added. Wrapper around GL Renderbuffer object
+ * html/canvas/CanvasRenderbuffer.h: Added.
+ * html/canvas/CanvasRenderbuffer.idl: Added.
+ * html/canvas/CanvasRenderingContext3D.cpp: Move m_objects hash table from GraphicsContext3D to here
+ * html/canvas/CanvasRenderingContext3D.h:
+ * html/canvas/CanvasShader.cpp: Added. Wrapper around GL Shader object
+ * html/canvas/CanvasShader.h: Added.
+ * html/canvas/CanvasShader.idl: Added.
+ * html/canvas/CanvasTexture.cpp: Added. Wrapper around GL Texture object
+ * html/canvas/CanvasTexture.h: Added.
+ * html/canvas/CanvasTexture.idl: Added.
+ * platform/graphics/GraphicsContext3D.cpp: Removed.
+ * platform/graphics/GraphicsContext3D.h: Move m_objects hash table from here to CanvasRenderingContext3D
+ * platform/graphics/mac/GraphicsContext3DMac.cpp: Implement platform dependent code for GL object creation/destruction
+
+2009-08-21 Darin Adler <darin@apple.com>
+
+ * WebCore.vcproj/build-generated-files.sh:
+ * make-generated-sources.sh:
+ Removed obsolete code to set up CREATE_HASH_TABLE.
+
+2009-08-21 Adele Peterson <adele@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ <rdar://problem/7162322> Custom style sheet ignored if UAC is enabled
+
+ * platform/win/SharedBufferWin.cpp: (WebCore::SharedBuffer::createWithContentsOfFile):
+ No need to open the file with write access. Only read access is needed.
+
+2009-08-21 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7161454> Leaks seen during http/tests/xmlhttprequest/cross-origin-no-authorization.html
+
+ Also fixes leaks seen on appcache tests.
+
+ * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::cancel): Work around
+ something that's likely a CFNetwork issue. Note that on Windows, there is no matching API
+ to call, and we do not think that the leak occurs there anyway.
+
+2009-08-21 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28650
+ Remove cross-thread code from CrossOriginPreflightResultCache.
+ Removed mutexes, atomic initializer and string copy.
+
+ No new tests, the worker tests cover this.
+
+ * loader/CrossOriginPreflightResultCache.cpp:
+ (WebCore::addToAccessControlAllowList):
+ (WebCore::CrossOriginPreflightResultCache::shared):
+ (WebCore::CrossOriginPreflightResultCache::appendEntry):
+ (WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
+ (WebCore::CrossOriginPreflightResultCache::empty):
+ * loader/CrossOriginPreflightResultCache.h:
+
+2009-08-21 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by Jan Alonzo.
+
+ Buildfix after http://trac.webkit.org/changeset/47655.
+
+ * html/HTMLFormControlElement.h:
+
+2009-08-19 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: Improve Cookie DataGrid to Show Hidden Data
+ https://bugs.webkit.org/show_bug.cgi?id=28269
+
+ Removed Custom Bindings
+
+ * bindings/js/JSInspectorBackendCustom.cpp:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8InspectorBackendCustom.cpp:
+ * inspector/InspectorBackend.cpp:
+
+ Made Non-Custom Bindings in the Backend
+
+ (WebCore::InspectorBackend::getCookies):
+ (WebCore::InspectorBackend::deleteCookie):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::deleteCookie):
+ * inspector/InspectorController.h:
+
+ Build the Cookie ScriptObjects, handles using document.cookie in
+ case the platform hasn't implemented raw cookie access.
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::getCookies):
+ (WebCore::InspectorDOMAgent::buildObjectForCookie):
+ (WebCore::InspectorDOMAgent::buildArrayForCookies):
+ * inspector/InspectorDOMAgent.h:
+
+ Complete the Asynchronous Calls
+
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::didGetCookies):
+ * inspector/InspectorFrontend.h:
+
+ Asynchronous Functions to get Cookie Data
+
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.Cookies.getCookiesAsync):
+ (WebInspector.Cookies.buildCookiesFromString): fallback behavior
+
+ Refactor to use the Asynchronous Functions
+
+ * inspector/front-end/CookieItemsView.js:
+ (WebInspector.CookieItemsView):
+ (WebInspector.CookieItemsView.prototype.get statusBarItems):
+ (WebInspector.CookieItemsView.prototype.update.callback):
+ (WebInspector.CookieItemsView.prototype.update):
+ (WebInspector.CookieItemsView.prototype.simpleDataGridForCookies):
+ (WebInspector.CookieItemsView.prototype._deleteButtonClicked):
+
+ Cleaned/Commented Related Code
+
+ (InspectorController.searchCanceled):
+ * inspector/front-end/InjectedScript.js:
+ * platform/Cookie.h:
+ * English.lproj/localizedStrings.js: the new strings that were supposed to have gone in last time
+
+2009-08-21 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by Adele Peterson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28145
+ Add support for novalidate/formnovalidate attribute, from HTML5 specs:
+ http://www.whatwg.org/specs/web-apps/current-work/#attr-fs-novalidate
+
+ Tests: fast/forms/formnovalidate-attribute.html
+ fast/forms/novalidate-attribute.html
+
+ * html/HTMLAttributeNames.in: added novalidate, formnovalidate
+ * html/HTMLButtonElement.idl: formnovalidate attribute exposed
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::formNoValidate): attribute getter
+ (WebCore::HTMLFormControlElement::setFormNoValidate): attribute setter
+ * html/HTMLFormControlElement.h:
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::novalidate): attribute getter
+ (WebCore::HTMLFormElement::setNovalidate): attribute setter
+ * html/HTMLFormElement.h:
+ * html/HTMLFormElement.idl: novalidate attribute exposed
+ * html/HTMLInputElement.idl: formNoValidate attribute exposed
+
+2009-08-21 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Rendering changes to complete
+ [CSS3 Backgrounds and Borders] Add support for the "contain" value for
+ background-size
+ https://bugs.webkit.org/show_bug.cgi?id=27573
+ and
+ [CSS3 Backgrounds and Borders] Add support for the "cover" value for
+ background-size
+ https://bugs.webkit.org/show_bug.cgi?id=27574
+
+ Test: fast/backgrounds/size/contain-and-cover.html
+
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::calculateBackgroundSize):
+ * rendering/RenderObject.cpp:
+ (WebCore::mustRepaintFillLayers):
+
+2009-08-21 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by Adele Peterson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27452
+ Add support for checkValidity() method and invalid event, from HTML5
+ specs:
+ http://www.whatwg.org/specs/web-apps/current-work/#dom-form-checkvalidity
+
+ Tests: fast/events/invalid-001.html
+ fast/events/invalid-002.html
+ fast/events/invalid-003.html
+ fast/events/invalid-004.html
+ fast/events/invalid-005.html
+ fast/forms/checkValidity-001.html
+ fast/forms/checkValidity-002.html
+ fast/forms/checkValidity-003.html
+ fast/forms/checkValidity-004.html
+
+ * dom/Document.idl: oninvalid event handler
+ * dom/Element.idl: ditto
+ * dom/EventNames.h: added invalid event
+ * dom/Node.cpp:
+ (WebCore::Node::oninvalid): ditto
+ (WebCore::Node::setOninvalid): ditto
+ * dom/Node.h: ditto
+ * html/HTMLAttributeNames.in: oninvalid attribute
+ * html/HTMLButtonElement.idl: added checkValidity() method
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::parseMappedAttribute): parses oninvalid
+ * html/HTMLFieldSetElement.idl: added checkValidity() method
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::checkValidity): checkValidity()
+ implementation
+ * html/HTMLFormControlElement.h:
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::checkValidity): checkValidity() implementation
+ for form elements
+ * html/HTMLFormElement.h: checkValidity() definition
+ * html/HTMLFormElement.idl: added checkValidity() method
+ * html/HTMLInputElement.idl: added checkValidity() method
+ * html/HTMLSelectElement.idl: added checkValidity() method
+ * html/HTMLTextAreaElement.idl: added checkValidity() method
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::oninvalid): oninvalid event handler
+ (WebCore::DOMWindow::setOninvalid): ditto
+ * page/DOMWindow.h: ditto
+ * page/DOMWindow.idl: ditto
+
+2009-08-21 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ The CSS part of https://bugs.webkit.org/show_bug.cgi?id=27571 [CSS3
+ Backgrounds and Borders] Add support for the "round" value for
+ background-repeat
+ -and-
+ https://bugs.webkit.org/show_bug.cgi?id=27570 [CSS3 Backgrounds and
+ Borders] Add support for the "space" value for background-repeat
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseFillProperty):
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator EFillRepeat):
+ * css/CSSValueKeywords.in:
+ * rendering/style/FillLayer.h:
+ * rendering/style/RenderStyleConstants.h:
+ (WebCore::):
+
+2009-08-21 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ New files for Canvas 3D feature
+ https://bugs.webkit.org/show_bug.cgi?id=28018
+
+ This is all the new files for implementing Canvas 3D. None of them are hooked up and
+ are not even included in the build yet. This incorporates the reviews from Simon
+ and Ollie for these files.
+
+ * bindings/js/JSCanvasNumberArrayCustom.cpp: Added. Custom JS binding to do implicit conversion from JS Array
+ * html/CanvasObject.cpp: Added. Base class for all GL object containers
+ * html/CanvasObject.h: Added.
+ * html/CanvasRenderingContext.cpp: Added. Base class for CanvasRenderingContext2D and CanvasRenderingContext3D
+ * html/CanvasRenderingContext.h: Added.
+ * html/CanvasRenderingContext.idl: Added.
+ * html/CanvasRenderingContext3D.cpp: Added. 3D context returned from Canvas.getContext()
+ * html/CanvasRenderingContext3D.h: Added.
+ * html/CanvasRenderingContext3D.idl: Added.
+ * platform/graphics/GraphicsContext3D.cpp: Added. Platform interface between CanvasRenderingContext3D and 3D graphics engine
+ * platform/graphics/GraphicsContext3D.h: Added.
+ * platform/graphics/mac/Canvas3DLayer.h: Added. CALayer subclass to composite 3D canvas
+ * platform/graphics/mac/Canvas3DLayer.mm: Added.
+ * platform/graphics/mac/GraphicsContext3DMac.cpp: Added. Mac specific interface (OpenGL based)
+
+2009-08-21 Ryosuke Niwa <rniwa@webkit.org>
+
+ No Review.
+
+ Another Windows build fix.
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::diffTextDecorations):
+
+2009-08-21 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28625, focus rings don't respect the non-strict mode
+ line box shrinking quirk. Make sure outlines don't extend outside the lineTop and lineBottom
+ of the root line box.
+
+ Covered by existing tests.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::addFocusRingRects):
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::addFocusRingRects):
+ (WebCore::RenderInline::paintOutline):
+
+2009-08-21 Ryosuke Niwa <rniwa@webkit.org>
+
+ No Review.
+
+ Windows build fix.
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::setTextDecorationProperty): Made it static
+ (WebCore::diffTextDecorations): Made it static
+
+2009-08-21 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ execCommand("Underline") uses CSS even when styleWithCSS has been turned off
+ https://bugs.webkit.org/show_bug.cgi?id=23892
+
+ This patch adds support for u and s in StyleChange and addInlineStyleIfNeeded so that
+ WebKit does not use CSS to decorate texts when styleWithCSS is set to false.
+
+ * css/CSSValueList.cpp:
+ (WebCore::CSSValueList::copy): Added.
+ * css/CSSValueList.h: Added copy.
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::StyleChange::applyUnderline):
+ (WebCore::StyleChange::applyLineThrough):
+ (WebCore::StyleChange::StyleChange): Added a boolean trimTextDecorations argument.
+ (WebCore::StyleChange::init): Ditto.
+ (WebCore::StyleChange::extractTextStyles): Handles text decorations.
+ (WebCore::getPropertiesNotInComputedStyle): Handles text decorations properly.
+ (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Adds u and s if needed.
+
+2009-08-21 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: Rename "Databases" Panel as "Storage"
+ https://bugs.webkit.org/show_bug.cgi?id=28620
+
+ Updated enum from "DatabasesPanel" to "StoragePanel" and wherever it was used.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::specialPanelForJSName): string to display StoragePanel can be either "databases" or "storage"
+ * inspector/InspectorController.h:
+ (WebCore::InspectorController::):
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::showPanel):
+
+ Updated All Direct Access from WebInspector.panels.databases to WebInspector.panels.storage,
+ any DatabasesPanel constructors and appropriate function names.
+
+ * inspector/front-end/DOMStorageDataGrid.js:
+ (WebInspector.DOMStorageDataGrid.prototype._startEditingColumnOfDataGridNode):
+ (WebInspector.DOMStorageDataGrid.prototype._startEditing):
+ (WebInspector.DOMStorageDataGrid.prototype._editingCommitted):
+ (WebInspector.DOMStorageDataGrid.prototype._editingCancelled):
+ (WebInspector.DOMStorageDataGrid.prototype.deleteSelectedRow):
+ * inspector/front-end/DOMStorageItemsView.js:
+ (WebInspector.DOMStorageItemsView.prototype.update):
+ * inspector/front-end/DatabaseQueryView.js:
+ (WebInspector.DatabaseQueryView.prototype._queryFinished):
+ * inspector/front-end/DatabaseTableView.js:
+ (WebInspector.DatabaseTableView.prototype._queryFinished):
+ * inspector/front-end/inspector.js:
+ (WebInspector._createPanels): updated string that comes from hiddenPanels to be "databases" or "storage"
+ (WebInspector.showStoragePanel):
+ (WebInspector.selectDatabase):
+ (WebInspector.selectDOMStorage):
+ (WebInspector.addDatabase):
+ (WebInspector.addDOMStorage):
+
+ Renamed some files and Updated Accordingly.
+
+ * inspector/front-end/StoragePanel.js: Renamed from WebCore/inspector/front-end/DatabasesPanel.js.
+ * inspector/front-end/Images/storageIcon.png: Renamed from WebCore/inspector/front-end/Images/databasesIcon.png.
+ * inspector/front-end/WebKit.qrc: use new file names
+ * inspector/front-end/inspector.css: use new images name and class names
+ * inspector/front-end/inspector.html: use new file name
+ * WebCore.gypi: use new file names
+
+ Miscellaneous Updates.
+
+ * English.lproj/localizedStrings.js: Updated Tooltip from "Databases" to "Storage"
+
+2009-08-21 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Oliver Hunt.
+
+ [Haiku] Adding three font-specific files to WebCore:
+ FontCacheHaiku.cpp, FontHaiku.cpp, and SimpleFontDataHaiku.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=28131
+
+ * platform/graphics/haiku/FontCacheHaiku.cpp: Added.
+ (WebCore::FontCache::platformInit):
+ (WebCore::FontCache::getFontDataForCharacters):
+ (WebCore::FontCache::getSimilarFontPlatformData):
+ (WebCore::FontCache::getLastResortFallbackFont):
+ (WebCore::FontCache::createFontPlatformData):
+ (WebCore::FontCache::getTraitsInFamily):
+ * platform/graphics/haiku/FontHaiku.cpp: Added.
+ (charUnicodeToUTF8HACK):
+ (WebCore::Font::canReturnFallbackFontsForComplexText):
+ (WebCore::Font::drawGlyphs):
+ (WebCore::Font::drawComplexText):
+ (WebCore::Font::floatWidthForComplexText):
+ (WebCore::Font::selectionRectForComplexText):
+ (WebCore::Font::offsetForPositionForComplexText):
+ * platform/graphics/haiku/SimpleFontDataHaiku.cpp: Added.
+ (WebCore::SimpleFontData::platformInit):
+ (WebCore::SimpleFontData::platformCharWidthInit):
+ (WebCore::SimpleFontData::platformDestroy):
+ (WebCore::SimpleFontData::smallCapsFontData):
+ (WebCore::SimpleFontData::containsCharacters):
+ (WebCore::SimpleFontData::determinePitch):
+ (WebCore::SimpleFontData::platformWidthForGlyph):
+
+2009-08-21 Philippe Beauchamp <philippe.beauchamp@gmail.com>
+
+ Reviewed by Adam Roben.
+
+ Middle click panning icon is offset by 3 pixels
+ https://bugs.webkit.org/show_bug.cgi?id=28611
+
+ * platform/ScrollView.cpp:
+ panIconSizeLength initialized to 20 instead of 16 to match icon dimension (2 pixels offset)
+ * platform/win/CursorWin.cpp:
+ (WebCore::middlePanningCursor):
+ Hotspot initialized to (8,8) instead of (7,7) (one pixel offset)
+
+2009-08-21 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Remove inspector resources for Symbian
+ https://bugs.webkit.org/show_bug.cgi?id=28610
+
+ Based on an idea from Simon Hausmann.
+
+ * WebCore.pro:
+
+2009-08-21 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Inspector: Remove Unused Variable
+ https://bugs.webkit.org/show_bug.cgi?id=28616
+
+ * inspector/front-end/Resource.js:
+ (WebInspector.Resource.prototype._checkWarning):
+
+2009-08-21 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: Console Array Formatter Shows Extra Properties
+ https://bugs.webkit.org/show_bug.cgi?id=28615
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._formatarray): do not ignore hasOwnProperties
+
+2009-08-21 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ The CSS part of https://bugs.webkit.org/show_bug.cgi?id=27574 [CSS3
+ Backgrounds and Borders] Add support for the "contain" value for
+ background-size
+ -and-
+ https://bugs.webkit.org/show_bug.cgi?id=27573 [CSS3 Backgrounds and
+ Borders] Add support for the "cover" value for background-size
+
+ Return contain or cover when appropriate, and otherwise do what we
+ used to do.
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+
+ Accept contain and cover as valid values for background-size.
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseFillProperty):
+
+ Handle setting the size and the sizeLength if appropriate.
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::mapFillSize):
+
+ Added new keywords contain and cover.
+ * css/CSSValueKeywords.in:
+
+ Use just sizeLength instead of size to match old behavior.
+ * page/animation/AnimationBase.cpp:
+ (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::calculateBackgroundSize):
+ * rendering/RenderObject.cpp:
+ (WebCore::mustRepaintFillLayers):
+
+ The variable m_sizeType is an EBackgroundSize, and m_sizeLength is
+ a LengthSize (the equivalent of what m_size used to be). I got rid
+ of m_sizeSet and made isSizeSet() dynamic. I also defined a new
+ struct, FillSize that can be used to set or get m_size and
+ m_sizeLength both at once.
+ * rendering/style/FillLayer.cpp:
+ (WebCore::FillLayer::FillLayer):
+ (WebCore::FillLayer::operator=):
+ (WebCore::FillLayer::operator==):
+ (WebCore::FillLayer::fillUnsetProperties):
+ * rendering/style/FillLayer.h:
+ (WebCore::FillSize::FillSize):
+ (WebCore::FillSize::operator==):
+ (WebCore::FillSize::operator!=):
+ (WebCore::FillLayer::sizeLength):
+ (WebCore::FillLayer::size):
+ (WebCore::FillLayer::isSizeSet):
+ (WebCore::FillLayer::setSizeType):
+ (WebCore::FillLayer::setSizeLength):
+ (WebCore::FillLayer::setSize):
+ (WebCore::FillLayer::clearSize):
+ (WebCore::FillLayer::initialFillSizeType):
+ (WebCore::FillLayer::initialFillSizeLength):
+ (WebCore::FillLayer::initialFillSize):
+
+ This is all boiler-plate stuff to adjust to the new size() vs.
+ sizeType() vs. sizeLength() distinction.
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::backgroundSizeType):
+ (WebCore::InheritedFlags::backgroundSizeLength):
+ (WebCore::InheritedFlags::maskSize):
+ (WebCore::InheritedFlags::setBackgroundSize):
+ (WebCore::InheritedFlags::setBackgroundSizeLength):
+ (WebCore::InheritedFlags::setMaskSize):
+
+ Definition for EBackgroundSizeType.
+ * rendering/style/RenderStyleConstants.h:
+ (WebCore::):
+
+2009-08-21 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Not reviewed, build fix after r47580.
+
+ [Qt] Adjust the files.
+
+ * inspector/front-end/WebKit.qrc:
+
+2009-08-20 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Enable various "grouping" ARIA roles
+ https://bugs.webkit.org/show_bug.cgi?id=28486
+
+ Test: platform/mac/accessibility/aria-grouping-roles.html
+
+ * accessibility/AccessibilityObject.h:
+ * accessibility/AccessibilityRenderObject.cpp:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ * page/mac/WebCoreViewFactory.h:
+ * platform/LocalizedStrings.h:
+ * platform/mac/LocalizedStringsMac.mm:
+
+2009-08-20 David Levin <levin@chromium.org>
+
+ Unreviewed trivial comment fix.
+
+ Update a bug link in a comment due to bugzilla amnesia.
+
+ * loader/CachedResource.cpp:
+ (WebCore::CachedResource::setResourceToRevalidate):
+
+2009-08-20 Albert J. Wong <ajwong@chromium.org>
+
+ Reviewed by David Levin.
+
+ HTML5 media elements do not fire waiting events correctly
+ https://bugs.webkit.org/show_bug.cgi?id=28335
+
+ Fire the waiting event before seeking, and fix a case where firing of
+ the seeked event is missed when the ready state is changed during
+ a seek.
+
+ Added video-waiting-seeking.html into manual tests because not
+ all platforms allow seeking into non-buffered ranges.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::setReadyState): add support for
+ waiting event when seeking.
+ (WebCore::HTMLMediaElement::finishSeek): send seeked event
+ whenever seeking finishes.
+ (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): dispatch to
+ new function.
+ * html/HTMLMediaElement.h:
+ * manual-tests/video-waiting-seeking.html: Added.
+
+2009-08-20 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Fix more cases of
+ <rdar://problem/7154521> Lots of "<Error>: doClip: empty path." spew in
+ the console with certain content
+
+ If the border box is empty, simply avoid painting instead of trying to
+ clip to the empty path.
+
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+ * rendering/RenderReplaced.cpp:
+ (WebCore::RenderReplaced::paint):
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::paint):
+
+2009-08-20 Jeremy Orlow <jorlow@chromium.org>
+
+ Build fix. Forgot a svn add for a patch I landed. :-(
+
+ * storage/SQLTransactionClient.cpp: Added.
+ (WebCore::SQLTransactionClient::didCommitTransaction):
+ (WebCore::SQLTransactionClient::didExecuteStatement):
+ (WebCore::SQLTransactionClient::didExceedQuota):
+ * storage/SQLTransactionClient.h: Added.
+
+2009-08-20 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Added a client to SQLTransaction. In addition to being a place to
+ get notifications about certain events in a transaction, it is
+ also an abstraction layer that allows us to plug in different
+ implementations for each port for how transactions interract with
+ the main DB. For example, WebCore's default implementation will
+ make direct calls to DatabaseTracker's methods. At the same time,
+ Chromium's implementation will send IPCs to the browser process
+ whenever a transaction needs something from the main DB.
+
+ All storage tests pass.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27967
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * storage/Database.cpp:
+ (WebCore::Database::transactionClient):
+ * storage/Database.h:
+ * storage/DatabaseThread.cpp:
+ (WebCore::DatabaseThread::DatabaseThread):
+ * storage/DatabaseThread.h:
+ (WebCore::DatabaseThread::transactionClient):
+ * storage/SQLTransaction.cpp:
+ (WebCore::SQLTransaction::runCurrentStatement):
+ (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
+ (WebCore::SQLTransaction::postflightAndCommit):
+ * storage/SQLTransactionClient.cpp: Added.
+ * storage/SQLTransactionClient.h: Added.
+
+2009-08-20 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Steve Falkenburg.
+
+ Fix of <https://bugs.webkit.org/show_bug.cgi?id=24793>
+ Auto scroll speed is faster than in IE, Firefox.
+
+ Changed pan scrolling speed to match Firefox's algorithm.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::adjustedScrollDelta):
+ (WebCore::RenderLayer::panScrollFromPoint):
+
+2009-08-20 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix for assert in Chromium page cycler: drawRect() was re-using
+ an SkPaint, but not resetting it before calling
+ PlatformGraphicsSkia::setupPaintForFilling() a second time. This
+ CL fixes drawRect(), and re-enables the assert.
+ http://bugs.webkit.org/show_bug.cgi?id=28172
+ http://crbug.com/19797
+
+ Covered by Chromium page cycler tests.
+
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::drawRect):
+ (PlatformContextSkia::setupPaintCommon):
+
+2009-08-20 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7159016> Popup menus don't disappear when you click outside the window.
+
+ Revert r47535 which introduced this.
+
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::show):
+ (WebCore::PopupWndProc):
+
+2009-08-20 David Levin <levin@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Crashes on sites with lots of images
+ https://bugs.webkit.org/show_bug.cgi?id=28473
+
+ The problem is that m_resourceToRevalidate::m_isBeingRevalidated is false while
+ CachedResource is still referring to it, so it may get deleted before
+ Cache::revalidationSucceeded calls CachedResource::clearResourceToRevalidate.
+
+ * loader/Cache.cpp:
+ (WebCore::Cache::revalidateResource): Added assert to verify the resource
+ being revalidated is physically in the cache.
+ (WebCore::Cache::revalidationSucceeded): Changed to do one call to switch from the revalidating
+ resource to the revalidated resource. This allows for proper lifetime management of the
+ revalidated resource. Added assert to verify that the revalidatingResource is in the cache.
+ (WebCore::Cache::pruneDeadResources): Don't remove items from the cache that are in the
+ process of being validated (or else they can get added twice: Once through the normal mechanism
+ and then again during revalidateResource).
+
+ * loader/CachedResource.cpp:
+ (WebCore::CachedResource::CachedResource):
+ (WebCore::CachedResource::isSafeToMakePurgeable):
+ Changed m_isBeingRevalidated to m_proxyResource to allow finding out
+ who the validating resource (or proxy) is.
+
+ (WebCore::CachedResource::~CachedResource): Removed code to handle m_resourceToRevalidate
+ being non-zero because this shouldn't be possible due to checks in canDelete. Added asserts
+ as well.
+ (WebCore::CachedResource::setResourceToRevalidate): Adjusted for the change to m_proxyResource
+ and added a comment about the assert.
+ (WebCore::CachedResource::clearResourceToRevalidate):
+ Only clean up the resourceToRevalidate if it hasn't gotten a new proxy resource.
+ * loader/CachedResource.h:
+ (WebCore::CachedResource::setInCache): Don't clear m_proxyResource because the resource
+ is still being referred to by it and the code it robust to this being switched to a new proxy
+ resource without it being cleared first.
+ (WebCore::CachedResource::canDelete): Changed m_isBeingRevalidated to m_proxyResource.
+
+2009-08-20 Xiaomei Ji <xji@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix "Chromium RTL autocomplete popup is not layout correctly".
+ https://bugs.webkit.org/show_bug.cgi?id=27889
+
+ The complete fix of the issue consists 2 parts: the patch in webkit
+ and the patch in Chromium's own code.
+
+ This webkit patch only affects Chromium autofill. It
+ 1. introduces a new flag in WebCore::PopupContainerSettings to
+ distinguish whether the width of the drop-down should be restricted
+ or not.
+ For autofill, the width of the drop-down is restricted to
+ be the same as that of the input field (the new flag is set in
+ Chromium's own code). But width is not restricted for <select> (same as before).
+ 2. introduce a new flag in WebCore::PopContainerSettings to
+ indicate what heuristics to use when displaying text in drop-down menu.
+ For autofill, use drop-down item's directionality to display drop-down items.
+ Previously, drop-down item is displayed in the its first strong
+ directional character's directionality.
+ (drop-down item's directionality is set in Chromium's own code.
+ It is set the same as the directionality of the element.
+ For autofill, it is the same directionality as that of the input field.)
+ For <select>, still use the text's first strong directional character's
+ directionality to display the text.
+
+
+ Since the patch only affects the chromium client, not webcore part or
+ other clients. No automatic tests is possible.
+
+ * manual-tests/autofill-popup-width-and-item-direction.html: Added.
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::):
+ (WebCore::PopupListBox::paintRow): If list box width is restricted and
+ an item is longer to fit in a list box, truncate it and draw part of the text and append ellipses.
+ (WebCore::PopupListBox::layout): Restrict width of list box if applicable.
+ * platform/chromium/PopupMenuChromium.h:
+ (WebCore::PopupItem::PopupItem): style change.
+ (WebCore::PopupContainerSettings::): Add 2 new flags in PopupContainerSetting to
+ distinguish whether to restrict width of list box and
+ in what directionality to display the text in drop-down.
+
+2009-08-20 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Fix of <https://bugs.webkit.org/show_bug.cgi?id=28504>.
+ Pan Scrolling can scroll while showing the middlePanScroll icon.
+
+ Fixed an off by one error between RenderLayer::panScrollFromPoint and EventHandler::updatePanScrollState.
+ In RenderLayer::panScrollFromPoint, we were setting the icon to be an arrow if the difference between the start
+ of the pan scroll and the current mouseposition is > 15. However, in EventHandler::updatePanScrollState, we would
+ set our amount to scroll to 0 only if the difference in mouse position is < 15. I made this check a <= 15, to fix
+ the off by one error.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::panScrollFromPoint):
+
+2009-08-20 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Pull the code in layoutBlockChildren for handling a normal flow block child into a helper method,
+ layoutBlockChild.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::layoutBlockChildren):
+ (WebCore::RenderBlock::layoutBlockChild):
+ * rendering/RenderBlock.h:
+
+2009-08-20 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Made subframeForHitTargetNode a public static method, so WebView can call it
+ during hit testing.
+
+ * page/EventHandler.cpp:
+ (WebCore::subframeForHitTestResult):
+ (WebCore::EventHandler::subframeForTargetNode):
+ * page/EventHandler.h:
+
+2009-08-20 Brent Fulgham <bfulgham@webkit.org>
+
+ Rubberstamped by Kevin Ollivier.
+
+ Check for null bundle before attempting to use it.
+
+ * platform/network/curl/ResourceHandleManager.cpp:
+ (WebCore::certificatePath): Add null check on return of
+ CFBundleGetBundleWithIdentifier.
+
+2009-08-20 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28497, images and inline replaced elements don't propagate overflow properly on a line.
+
+ Added fast/repaint/inline-block-overflow.html and updated another test.
+
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::placeBoxesHorizontally):
+ (WebCore::InlineFlowBox::computeVerticalOverflow):
+ Make sure to still propagate the border box of the replaced element as layout overflow when overflow clip is set on the
+ replaced element. Make sure to use the InlineBox x/y positions instead of the RenderBox x/y, since the position of the
+ RenderBox has not been updated to the new values yet.
+
+ * rendering/RenderLineBoxList.cpp:
+ (WebCore::RenderLineBoxList::paint):
+ Don't use the root line box's overflow. Use the actual line box overflow values instead. In the case of an inline
+ with a layer, our overflow didn't propagate to the root line, so we always need to use our values.
+
+ * rendering/RenderPartObject.cpp:
+ (WebCore::RenderPartObject::layout):
+ * rendering/RenderReplaced.cpp:
+ (WebCore::RenderReplaced::layout):
+ Make sure to clear shadow overflow when doing layout of replaced elements, so that we don't leave a stale overflow
+ value around if a box-shadow goes away.
+
+2009-08-20 Dmitry Titov <dimich@chromium.org>
+
+ Another attempt to fix Chromium build.
+
+ * WebCore.gypi: now use the correct name of the image file.
+
+2009-08-20 Dan Bernstein <mitz@apple.com>
+
+ Make the Windows build even fixeder
+
+ * platform/graphics/win/GraphicsContextCGWin.cpp:
+ (WebCore::GraphicsContextPlatformPrivate::flush):
+
+2009-08-20 Dmitry Titov <dimich@chromium.org>
+
+ Not reviewed, Chromium build fix.
+
+ * WebCore.gypi: add new Webinspector image files (localStorage.png and sessionStorage.png)
+
+2009-08-20 Dan Bernstein <mitz@apple.com>
+
+ Windows build fix after the last change
+
+ * platform/graphics/win/GraphicsContextCGWin.cpp:
+ (WebCore::GraphicsContext::GraphicsContext):
+ (WebCore::GraphicsContext::releaseWindowsContext):
+ (WebCore::GraphicsContext::drawWindowsBitmap):
+
+2009-08-20 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ Replace many manually-released CFTypeRefs with RetainPtrs
+ https://bugs.webkit.org/show_bug.cgi?id=28498
+
+ * platform/graphics/cg/ColorCG.cpp:
+ (WebCore::createCGColor):
+ * platform/graphics/cg/GradientCG.cpp:
+ (WebCore::Gradient::platformGradient):
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::GraphicsContext::platformContext):
+ (WebCore::GraphicsContext::applyStrokePattern):
+ (WebCore::GraphicsContext::applyFillPattern):
+ (WebCore::GraphicsContext::setPlatformShadow):
+ (WebCore::GraphicsContext::setURLForRect):
+ * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
+ (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
+ (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
+ * platform/graphics/cg/ImageBufferCG.cpp:
+ (WebCore::ImageBuffer::ImageBuffer):
+ * platform/graphics/cg/ImageCG.cpp:
+ (WebCore::BitmapImage::checkForSolidColor):
+ (WebCore::Image::drawPattern):
+ * platform/graphics/cg/ImageSourceCG.cpp:
+ (WebCore::ImageSource::setData):
+ (WebCore::ImageSource::isSizeAvailable):
+ (WebCore::ImageSource::frameSizeAtIndex):
+ (WebCore::ImageSource::repetitionCount):
+ (WebCore::ImageSource::createFrameAtIndex):
+ (WebCore::ImageSource::frameDurationAtIndex):
+ * platform/graphics/cg/PDFDocumentImage.cpp:
+ (WebCore::PDFDocumentImage::dataChanged):
+ * platform/graphics/cg/PathCG.cpp:
+ (WebCore::createScratchContext):
+ (WebCore::Path::contains):
+ * platform/graphics/mac/FontCustomPlatformData.cpp:
+ (WebCore::createFontCustomPlatformData):
+ * platform/graphics/mac/GraphicsContextMac.mm:
+ (WebCore::GraphicsContext::drawFocusRing):
+ * platform/graphics/mac/ImageMac.mm:
+ (WebCore::BitmapImage::getTIFFRepresentation):
+ * platform/mac/ClipboardMac.mm:
+ (WebCore::cocoaTypeFromMIMEType):
+ (WebCore::MIMETypeFromCocoaType):
+ * platform/mac/WebCoreNSStringExtras.mm:
+ (stringEncodingForResource):
+ * platform/network/mac/FormDataStreamMac.mm:
+ (WebCore::advanceCurrentStream):
+ (WebCore::setHTTPBody):
+ * platform/text/mac/TextCodecMac.cpp:
+ (WebCore::TextCodecMac::encode):
+
+2009-08-20 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Output actual values of counters in showTree
+ https://bugs.webkit.org/show_bug.cgi?id=28481
+
+ No new tests because this patch just improves debugging outputs.
+
+ * rendering/CounterNode.cpp:
+ (WebCore::showTreeAndMark):
+
+2009-08-20 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by NOBODY (build fix).
+
+ Add file missed in last check-in.
+
+ * html/HTMLAttributeNames.in:
+
+2009-08-19 Timothy Hatcher <timothy@apple.com>
+
+ Adds new icons to the Web Inspector for Local Storage,
+ Session Storage and Cookies.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28470
+
+ Reviewed by Eric Seidel.
+
+ * inspector/front-end/DatabasesPanel.js:
+ (WebInspector.DatabasesPanel.prototype.addDOMStorage):
+ (WebInspector.DOMStorageSidebarTreeElement):
+ * inspector/front-end/Images/cookie.png:
+ * inspector/front-end/Images/domStorage.png: Removed.
+ * inspector/front-end/Images/localStorage.png: Added.
+ * inspector/front-end/Images/sessionStorage.png: Added.
+ * inspector/front-end/inspector.css:
+
+2009-08-20 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ HTML5 media elements must fire 'loadend' progress event
+ https://bugs.webkit.org/show_bug.cgi?id=28419
+
+ * dom/EventNames.h:
+ Define loadend.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::parseMappedAttribute):
+ Deal with onloadend.
+ (WebCore::HTMLMediaElement::loadInternal):
+ Post 'loadend' immediately after 'abort'.
+ (WebCore::HTMLMediaElement::noneSupported):
+ Post 'loadend' immediately after 'error'.
+ (WebCore::HTMLMediaElement::mediaEngineError):
+ Ditto.
+ (WebCore::HTMLMediaElement::setNetworkState):
+ Post 'loadend' immediately after 'load'.
+ (WebCore::HTMLMediaElement::userCancelledLoad):
+ Post 'loadend' immediately after 'abort'.
+
+2009-08-20 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ REGESSION(r45316), Crash: WebKit crashes in Google Sites when indenting a table
+ https://bugs.webkit.org/show_bug.cgi?id=28474
+
+ This patch fixes a crash when indenting at right after a table.
+ The bug was caused by Node* blockNode = enclosingBlock(endOfCurrentParagraph.deepEquivalent().node());
+ where node() is equal to blockNode. Because blockNode is the enclosing block node, this patch changes it to
+ enclosingBlock(endOfCurrentParagraph.deepEquivalent().node()->parentNode());
+
+ Test: editing/execCommand/indent-right-after-table.html
+
+ * editing/IndentOutdentCommand.cpp:
+ (WebCore::IndentOutdentCommand::indentRegion): Fixed so that blockNode != endOfCurrentParagraph.deepEquivalent().node()
+
+2009-08-20 Andrew Scherkus <scherkus@chromium.org>
+
+ Reviewed by David Levin.
+
+ Render disabled mute button during an error or if no audio is present.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28475
+
+ Covered by existing layout tests:
+ media/video-controls-visible-audio-only.html
+ media/video-no-audio.html
+
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::paintMediaMuteButton):
+
+2009-08-20 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7154605> Loading page with 1px wide <select> makes the
+ toolbar go blank
+ and
+ <rdar://problem/7154521> Lots of "<Error>: doClip: empty path." spew in
+ the console with certain content
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintMenuListButtonGradients): Return early
+ if the rectangle is empty. Use RenderStyle::getBorderRadiiForRect() to
+ adjust the radii in case the sides of the rectangle are smaller than sum
+ of the radii, so that the gradient background matches the border (which
+ already uses getBorderRadiiForRect()). Check if bottomGradient is empty
+ to avoid clipping to an empty path.
+ (WebCore::RenderThemeMac::paintMenuListButton): Moved a
+ GraphicContext::save() down to avoid a save/restore imbalance in the
+ early return case.
+
+ * rendering/RenderThemeSafari.cpp: Made the same changes.
+ (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
+ (WebCore::RenderThemeSafari::paintMenuListButton):
+
+2009-08-20 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Gustavo Noronha.
+
+ [Gtk][REGRESSION] XHR test failures after r45558
+ https://bugs.webkit.org/show_bug.cgi?id=27143
+
+ Disable sniffing if it's explicitly requested. Updated patch
+ originally by Gustavo Noronha.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::statusWillBeHandledBySoup):
+ (WebCore::gotHeadersCallback):
+ (WebCore::contentSniffedCallback):
+ (WebCore::gotChunkCallback):
+ (WebCore::startHttp):
+
+2009-08-20 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Swap the pixels since QImage expect ARGB while ImageData
+ stores them as RGBA.
+
+ This fixes the fast/canvas/canvas-copyPixels.html test.
+
+ * platform/graphics/qt/ImageBufferQt.cpp:
+ (WebCore::putImageData):
+
+2009-08-20 Christian Plesner Hansen <christian.plesner.hansen@gmail.com>
+
+ Reviewed by David Levin.
+
+ [v8] Use atomic string caching for createElement
+ Extend atomic string caching to createElement. Fix a bug in idl
+ parser that caused incorrect parsing if a function argument
+ attribute list contained a comma.
+ https://bugs.webkit.org/show_bug.cgi?id=28449
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/scripts/IDLParser.pm:
+ * bindings/v8/V8Binding.h:
+ (WebCore::v8ValueToAtomicWebCoreStringWithNullCheck):
+ * dom/Document.idl:
+
+2009-08-20 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Not reviewed, build fix after r47515.
+
+ [Qt] There is no Phonon::MediaObject::hasAudio() function.
+
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
+ (WebCore::MediaPlayerPrivate::hasAudio): Assume true.
+
+2009-08-20 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28483
+ The V8 ScriptController's cleanupScriptObjectsForPlugin should take a
+ Widget* instead of void* to avoid the need for manual casting to Widget*
+ at the callsite.
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::cleanupScriptObjectsForPlugin):
+ * bindings/v8/ScriptController.h:
+
+2009-08-19 David Levin <levin@chromium.org>
+
+ Unreviewed speculative build fix for qt.
+
+ * page/OriginAccessEntry.cpp:
+
+2009-08-19 Aaron Boodman <aa@chromium.org>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24853: Provide a way for WebKit clients to
+ specify a more granular policy for cross-origin XHR access.
+
+ Tests: http/tests/xmlhttprequest/origin-whitelisting-all.html
+ http/tests/xmlhttprequest/origin-whitelisting-exact-match.html
+ http/tests/xmlhttprequest/origin-whitelisting-https.html
+ http/tests/xmlhttprequest/origin-whitelisting-ip-addresses-with-subdomains.html
+ http/tests/xmlhttprequest/origin-whitelisting-ip-addresses.html
+ http/tests/xmlhttprequest/origin-whitelisting-subdomains.html
+
+ * WebCore.base.exp: Export methods to manipulate origin access whitelists to enable
+ testing via layout tests.
+
+ * WebCore.xcodeproj/project.pbxproj: Add OriginAccessEntry.*
+ * GNUmakefile.am: Ditto.
+ * WebCore.gypi: Ditto.
+ * WebCore.pro: Ditto.
+ * WebCore.vcproj/WebCore.vcproj: Ditto.
+ * WebCoreSources.blk: Ditto.
+
+ * page/SecurityOrigin.h: Implement origin access whitelists.
+ (WebCore::originAccessMap): Static getter for access whitelists.
+ (WebCore::SecurityOrigin::canRequest): Modify request checking logic to check whitelists.
+ (WebCore::SecurityOrigin::whiteListAccessFromOrigin): Add an entry to a whitelist.
+ (WebCore::SecurityOrigin::resetOriginAccessWhiteLists): Clear all the whitelists.
+
+ * page/OriginAccessEntry.h: Added. An entry in an origin access whitelist.
+ * page/OriginAccessEntry.cpp: Ditto.
+
+2009-08-19 Kevin Ollivier <kevino@theolliviers.com>
+
+ Non-precomp headers build fix.
+
+ * platform/image-decoders/ImageDecoder.cpp:
+
+2009-08-19 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Disable a bad SKIA assert
+ https://bugs.webkit.org/show_bug.cgi?id=28482
+
+ In http://trac.webkit.org/changeset/47386/ an assert was "fixed" in SKIA code.
+ When this was pulled into Chromium, it started breaking the page cycler.
+ Disable it again until we can figure out what's going on.
+
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::setupPaintCommon):
+
+2009-08-19 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ queryCommandState('underline') returns false if the selected text is also bold and italic
+ https://bugs.webkit.org/show_bug.cgi?id=11022
+
+ This patch modifies stateStrikethrough and stateUnderline to use the value -webkit-text-decorations-in-effect
+ instead of text-decoration. Because text-decoration only retrieves explicit styling at the node on which
+ the query was sent, we need to use -webkit-text-decorations-in-effect to include decorations added by ancestors
+ and also u, s, and strike tags.
+
+ Test: editing/style/text-decoration-state.html
+
+ * editing/EditorCommand.cpp:
+ (WebCore::stateStrikethrough): Use -webkit-test-decorations-in-effect instead of text-decoration.
+ (WebCore::stateUnderline): Ditto.
+
+2009-08-19 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - Fix <rdar://problem/7155710>
+ HTML selects on windows cause containing window to become inactive when opened.
+
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::show):
+ Pass SWP_NOACTIVATE to SetWindowPos, remove AW_ACTIVATE from AnimateWindow and pass
+ SW_SHOWNOACTIVATE to ShowWindow.
+
+ (WebCore::PopupWndProc):
+ Prevent mouse activation from activating the window.
+
+2009-08-19 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Images flash as you hover them on http://www.atebits.com/scribbles/
+ <rdar://problem/7143958>
+
+ Tag images with the device colorspace with the colorspace of the main display, rather than
+ GenericRGB, so that composited images color-match those rendered via Core Graphics.
+
+ Covered by LayoutTests/compositing/color-matching/image-color-matching.html
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::setContentsToImage):
+
+2009-08-19 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by David Hyatt and Dan Bernstein.
+
+ - Fix <rdar://problem/7152589> Stylable scrollbar corners aren't working.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::FrameView):
+ Initialize m_scrollCorner.
+
+ (WebCore::FrameView::~FrameView):
+ Assert that m_scrollCorner is null.
+
+ (WebCore::FrameView::detachCustomScrollbars):
+ Destroy m_scrollCorner.
+
+ (WebCore::FrameView::invalidateScrollCorner):
+ Invalidate the scroll corner.
+
+ (WebCore::FrameView::updateScrollCorner):
+ Create/destroy the scroll corner.
+
+ (WebCore::FrameView::paintScrollCorner):
+ Paint the scroll corner.
+
+ * page/FrameView.h:
+ (WebCore::FrameView::isFrameViewScrollCorner):
+ Return whether a RenderScrollbarPart is the frame view scroll corner.
+
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::updateScrollbars):
+ Go ahead and update the scroll corner.
+
+ (WebCore::ScrollView::setScrollbarsSuppressed):
+ Pass the scroll corner rect to invalidateRect.
+
+ (WebCore::ScrollView::scrollCornerRect):
+ Return the scroll corner rect.
+
+ * platform/ScrollView.h:
+ * rendering/RenderScrollbarPart.cpp:
+ (WebCore::RenderScrollbarPart::imageChanged):
+ If this scrollbar part is the frame view scroll corner, invalidate it.
+
+2009-08-19 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ SVG feComponentTransfer needs to be implemented
+ [https://bugs.webkit.org/show_bug.cgi?id=27768]
+
+ Implementation of SVG Filter feComponentTransfer.
+
+ There is already a test case
+ Test: svg/W3C-SVG-1.1/filters-comptran-01-b.svg
+
+ * platform/graphics/filters/FEComponentTransfer.cpp:
+ (WebCore::identity):
+ (WebCore::table):
+ (WebCore::discrete):
+ (WebCore::linear):
+ (WebCore::gamma):
+ (WebCore::FEComponentTransfer::apply):
+
+2009-08-19 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ <rdar://problem/7141522> Incorrect layout of product table at henry.com
+
+ Test: fast/block/basic/quirk-percent-height-table-cell.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::calcPercentageHeight): Tweak the quirk that allows
+ percentage-height children of auto-height blocks to look for an ancestor
+ with non-auto height and compute their height based on it. The change is
+ that if that ancestor is a table cell, it is ignored and the percent
+ height computes to zero (just like in strict mode). This matches Firefox
+ and IE.
+
+2009-08-19 Jungshik Shin <jshin@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Add 'icu::' qualifier when refering to ICU C+names to the other
+ file with this issue missed in the previous check-in.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28410
+
+ No change in the test result.
+
+ * platform/graphics/chromium/FontUtilsChromiumWin.cpp:
+ (WebCore::):
+
+2009-08-19 Peter Kasting <pkasting@google.com>
+
+ Unreviewed (build fix for Skia).
+
+ https://bugs.webkit.org/show_bug.cgi?id=28268
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::drawLine):
+
+2009-08-19 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [CAIRO] Remove setFont indirection
+ https://bugs.webkit.org/show_bug.cgi?id=28453
+
+ Remove the indirection and just set the font in Font::drawGlyphs.
+
+ * platform/graphics/SimpleFontData.h:
+ * platform/graphics/cairo/FontCairo.cpp:
+ (WebCore::Font::drawGlyphs):
+ * platform/graphics/gtk/FontPlatformData.h:
+ (WebCore::FontPlatformData::scaledFont):
+ * platform/graphics/gtk/FontPlatformDataGtk.cpp:
+ (WebCore::FontPlatformData::~FontPlatformData):
+ * platform/graphics/gtk/FontPlatformDataPango.cpp:
+ * platform/graphics/gtk/SimpleFontDataGtk.cpp:
+ * platform/graphics/gtk/SimpleFontDataPango.cpp:
+ * platform/graphics/win/FontPlatformData.h:
+ * platform/graphics/win/FontPlatformDataCairoWin.cpp:
+ * platform/graphics/win/SimpleFontDataCairoWin.cpp:
+
+2009-08-19 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: When adding style selector, generate default name based
+ on id / class / type.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28468
+
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylesSidebarPane.prototype.appropriateSelectorForNode):
+
+2009-08-19 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Rename combinedOverflow to visibleOverflow, since that's what it actually represents.
+
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::nodeAtPoint):
+ (WebCore::InlineFlowBox::paint):
+ * rendering/InlineFlowBox.h:
+ (WebCore::InlineFlowBox::topvisibleOverflow):
+ (WebCore::InlineFlowBox::bottomvisibleOverflow):
+ (WebCore::InlineFlowBox::leftvisibleOverflow):
+ (WebCore::InlineFlowBox::rightvisibleOverflow):
+ (WebCore::InlineFlowBox::visibleOverflowRect):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::layoutBlock):
+ (WebCore::RenderBlock::paint):
+ (WebCore::RenderBlock::floatRect):
+ (WebCore::RenderBlock::nodeAtPoint):
+ * rendering/RenderBlock.h:
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::layoutInlineChildren):
+ (WebCore::RenderBlock::matchedEndLine):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::clippedOverflowRectForRepaint):
+ * rendering/RenderBox.h:
+ (WebCore::RenderBox::visibleOverflowRect):
+ (WebCore::RenderBox::topvisibleOverflow):
+ (WebCore::RenderBox::bottomvisibleOverflow):
+ (WebCore::RenderBox::leftvisibleOverflow):
+ (WebCore::RenderBox::rightvisibleOverflow):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::localBoundingBox):
+ * rendering/RenderLineBoxList.cpp:
+ (WebCore::RenderLineBoxList::paint):
+ (WebCore::RenderLineBoxList::hitTest):
+ * rendering/RenderOverflow.h:
+ (WebCore::RenderOverflow::visibleOverflowRect):
+ * rendering/RenderReplaced.cpp:
+ (WebCore::RenderReplaced::shouldPaint):
+ (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::layout):
+ (WebCore::RenderTable::paint):
+ * rendering/RenderTableCell.cpp:
+ (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
+
+2009-08-19 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Sound button appears in controller with movies that have no audio
+ https://bugs.webkit.org/show_bug.cgi?id=28464
+
+ Test: media/video-no-audio.html
+
+ * html/HTMLMediaElement.cpp:
+ * html/HTMLMediaElement.h:
+ (WebCore::HTMLMediaElement::hasAudio):
+ Added hasAudio.
+
+ * platform/graphics/MediaPlayer.h:
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::NullMediaPlayerPrivate::hasAudio):
+ (WebCore::MediaPlayer::hasVideo):
+ Make const.
+ (WebCore::MediaPlayer::hasAudio):
+ Added hasAudio.
+
+ * platform/graphics/MediaPlayerPrivate.h:
+ Add hasAudio.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::hasAudio):
+ Ditto.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::hasAudio):
+ Ditto.
+
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
+ (WebCore::MediaPlayerPrivate::hasAudio):
+ Ditto.
+
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+ (WebCore::MediaPlayerPrivate::hasAudio):
+ Ditto.
+
+ * platform/graphics/win/QTMovieWin.h:
+ * platform/graphics/win/QTMovieWin.cpp:
+ (QTMovieWin::hasAudio):
+ Ditto.
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlMuteButtonElement::disabled):
+ New, return true if media element doesn't have audio.
+ (WebCore::MediaControlMuteButtonElement::rendererIsNeeded):
+ Renderer is not needed if element has no audio.
+ * rendering/MediaControlElements.h:
+ (WebCore::MediaControlInputElement::disabled):
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::getMediaUIPartStateFlags):
+ Return MediaUIPartDisabledFlag if node is disabled.
+
+
+2009-08-19 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27357
+ Removed the two unnecessary overridden willValidate() methods introduced
+ in r47444.
+
+ * html/HTMLKeygenElement.h:
+ * html/HTMLObjectElement.h:
+
+2009-08-19 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Allow dumping dangling nodes to the console.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28458
+
+ * bindings/js/JSInspectorBackendCustom.cpp:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8InspectorBackendCustom.cpp:
+ * inspector/InspectorBackend.cpp:
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::clearConsoleMessages):
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::releaseDanglingNodes):
+ (WebCore::InspectorDOMAgent::startListening):
+ (WebCore::InspectorDOMAgent::stopListening):
+ (WebCore::InspectorDOMAgent::handleEvent):
+ (WebCore::InspectorDOMAgent::bind):
+ (WebCore::InspectorDOMAgent::unbind):
+ (WebCore::InspectorDOMAgent::pushDocumentToFrontend):
+ (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
+ (WebCore::InspectorDOMAgent::discardBindings):
+ (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
+ (WebCore::InspectorDOMAgent::buildObjectForNode):
+ (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
+ * inspector/InspectorDOMAgent.h:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::setDetachedRoot):
+ (WebCore::InspectorFrontend::childNodeCountUpdated):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._formatnode):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMAgent.prototype._setDetachedRoot):
+ (WebInspector.DOMAgent.prototype._childNodeCountUpdated):
+ (WebInspector.setDetachedRoot):
+ (WebInspector.childNodeCountUpdated):
+ (InspectorController.pushNodeToFrontend):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.pushNodeToFrontend):
+ (InjectedScript.createProxyObject):
+
+2009-08-19 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27464
+ Implement application cache online whitelist wildcard flag
+
+ Test: http/tests/appcache/whitelist-wildcard.html
+
+ A "*" in NETWORK section means that network loading needn't be blocked.
+
+ * loader/appcache/ApplicationCache.cpp:
+ (WebCore::ApplicationCache::isURLInOnlineWhitelist):
+ * loader/appcache/ApplicationCache.h:
+ (WebCore::ApplicationCache::setAllowsAllNetworkRequests):
+ (WebCore::ApplicationCache::allowsAllNetworkRequests):
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
+ * loader/appcache/ApplicationCacheStorage.cpp:
+ (WebCore::ApplicationCacheStorage::openDatabase):
+ (WebCore::ApplicationCacheStorage::store):
+ (WebCore::ApplicationCacheStorage::loadCache):
+ * loader/appcache/ManifestParser.cpp:
+ (WebCore::parseManifest):
+ * loader/appcache/ManifestParser.h:
+
+2009-08-19 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ <rdar://problem/7042555> Loading certain pages on Tiger will start a spurious download
+
+ Get rid of method swizzling entirely. This created problems when lower level
+ Foundation code would call into our own swizzled method.
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
+ * platform/network/mac/WebCoreURLResponse.h:
+ * platform/network/mac/WebCoreURLResponse.mm:
+ (-[NSURLResponse adjustMIMETypeIfNecessary]):
+
+2009-08-19 Adam Roben <aroben@apple.com>
+
+ Fix linker warnings on Windows
+
+ Reviewed by Anders Carlsson.
+
+ Fixes <http://webkit.org/b/28462> WebCore causes linker warnings on
+ Windows about multiply-defined JSHTMLDataListElement symbols
+
+ * WebCore.vcproj/WebCore.vcproj: Exclude JSHTMLDataListElement.cpp
+ from the build (just like we do for the other generated bindings
+ files) so that we don't get warnings about multiply-defined symbols in
+ JSHTMLDataListElement.cpp and DerivedSources.cpp. Also removed
+ duplicate versions of JSSVGElementWrapperFactory.cpp, and let VS
+ reorder a few files.
+
+2009-08-19 Jungshik Shin <jshin@chromium.org>
+
+ Reviewed by Eric Seidel
+
+ Add 'icu::' qualifier when refering to ICU C+names.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28410
+
+ No change in the test result.
+
+ * platform/graphics/chromium/FontCacheChromiumWin.cpp:
+ (WebCore::fontContainsCharacter):
+
+2009-08-19 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Cleanup from my patch thet rewrote overflow. Remove unused member variables from RenderTableSection and
+ move the addition of overflow from children into a separate pass after the height of the section has been
+ set. This prevents the RenderOverflow struct from being aggressively allocated for all table sections.
+ (Not a a correctness issue, just a memory issue.)
+
+ * rendering/RenderTableSection.cpp:
+ (WebCore::RenderTableSection::RenderTableSection):
+ (WebCore::RenderTableSection::layoutRows):
+ * rendering/RenderTableSection.h:
+
+2009-08-19 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Xan Lopez.
+
+ [Gtk] Remove bogus dependency rules for built sources that derive
+ from HTMLTagNames.in, HTMLAttributeNames.in and xmlattrs.in. The
+ header files should be generated regardless of whether the source
+ file changed or not. We should only rely on the *.in files being
+ changed.
+
+ * GNUmakefile.am:
+
+2009-08-18 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ convert FormatBlock candidate tag list from if chain to hash lookup
+ https://bugs.webkit.org/show_bug.cgi?id=28448
+
+ No behavior change, just cleanup.
+
+ * editing/htmlediting.cpp:
+ (WebCore::validBlockTag):
+ * editing/htmlediting.h:
+
+2009-08-19 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by Eric Seidel.
+
+ Update GraphicsContextSkia's version of drawLine to make use of the shared
+ adjustLineToPixelBoundaries function and elimination overlapping code.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28268
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::drawLine):
+
+2009-08-18 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by Eric Seidel.
+
+ Style fixes based on cpp_style.py and WebKit Style guide for
+ GraphicsContextSkia.cpp
+
+ https://bugs.webkit.org/show_bug.cgi?id=28268
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::addInnerRoundedRectClip):
+ (WebCore::GraphicsContext::drawFocusRing):
+ (WebCore::GraphicsContext::roundToDevicePixels):
+ (WebCore::GraphicsContext::setLineDash):
+ (WebCore::GraphicsContext::setPlatformShadow):
+
+2009-08-18 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28446
+ Custom request headers shouldn't be sent with cross-origin preflight request
+
+ Tests: http/tests/xmlhttprequest/access-control-preflight-headers-async.html
+ http/tests/xmlhttprequest/access-control-preflight-headers-sync.html
+
+ * loader/DocumentThreadableLoader.cpp:
+ (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
+ Don't copy headers to OPTIONS request. The spec is vague about this, but the intention was
+ that they shouldn't be sent, and Firefox doesn't send them.
+
+2009-08-18 John Gregg <johnnyg@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ V8 Bindings for Desktop Notifications feature.
+ https://bugs.webkit.org/show_bug.cgi?id=28271
+
+ * WebCore.gypi:
+ added notification files to build (all still behind a flag that's not on)
+ * bindings/scripts/CodeGeneratorV8.pm:
+ added special case in DOMWindow/AppCache style for named event handlers
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/V8Proxy.h:
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::convertToV8Object):
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8NotificationCenterCustom.cpp: Added.
+ * notifications/Notification.h:
+ made event handler routines public (as they are in DOMWindow, eg) for
+ binding access.
+ * notifications/NotificationCenter.idl:
+ needed to make methods V8Custom to support different behaviors in
+ worker/page context in chromium.
+ * workers/WorkerThread.h:
+ (WebCore::WorkerThread::getNotificationPresenter):
+ (WebCore::WorkerThread::setNotificationPresenter):
+ needed to make these methods public as well so chromium can inject
+ the notification presenter into the worker thread.
+
+2009-08-13 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - Implement HTML5 nav element
+ https://bugs.webkit.org/show_bug.cgi?id=27937
+
+ <nav> should behave essentially the same as <div> for parsing
+ etc. This is implemented by the changes below.
+
+ Tests: fast/html/nav-element.html
+
+ * css/html.css:
+ * editing/htmlediting.cpp:
+ (WebCore::validBlockTag):
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::tagPriority):
+ (WebCore::blockTagList):
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::getNode):
+ * html/HTMLTagNames.in:
+
+2009-08-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adele Peterson, David Hyatt and Dan Bernstein.
+
+ - Fix <rdar://problem/7152727>
+
+ If a page has custom scroll bars, they will not update correctly when the window is activated/deactivated.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::hasCustomScrollbars):
+ Check if the frame view or any of its subviews have custom scroll bars.
+
+ (WebCore::FrameView::updateControlTints):
+ Go ahead and update control tints if the frame view has custom scroll bars.
+
+ * page/FrameView.h:
+
+2009-08-18 Mark Rowe <mrowe@apple.com>
+
+ Roll out r47477 as it introduced assertion failures and crashes on the build bots.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * storage/Database.cpp:
+ * storage/Database.h:
+ * storage/DatabaseThread.cpp:
+ (WebCore::DatabaseThread::DatabaseThread):
+ * storage/DatabaseThread.h:
+ * storage/SQLTransaction.cpp:
+ (WebCore::SQLTransaction::runCurrentStatement):
+ (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
+ (WebCore::SQLTransaction::postflightAndCommit):
+ * storage/SQLTransactionClient.cpp: Removed.
+ * storage/SQLTransactionClient.h: Removed.
+
+2009-08-18 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Haiku] Adding the SharedTimer file for WebCore.
+ https://bugs.webkit.org/show_bug.cgi?id=28126
+
+ * platform/haiku/SharedTimerHaiku.cpp: Added.
+ (WebCore::):
+ (WebCore::SharedTimerHaiku::SharedTimerHaiku):
+ (WebCore::SharedTimerHaiku::~SharedTimerHaiku):
+ (WebCore::SharedTimerHaiku::instance):
+ (WebCore::SharedTimerHaiku::start):
+ (WebCore::SharedTimerHaiku::stop):
+ (WebCore::SharedTimerHaiku::Filter):
+ (WebCore::setSharedTimerFiredFunction):
+ (WebCore::setSharedTimerFireTime):
+ (WebCore::stopSharedTimer):
+
+2009-08-18 Mark Rowe <mrowe@apple.com>
+
+ Release build fix.
+
+ * xml/XMLHttpRequest.cpp: Sprinkle some #ifndef NDEBUG around.
+ (WebCore::XMLHttpRequest::XMLHttpRequest):
+ (WebCore::XMLHttpRequest::~XMLHttpRequest):
+
+2009-08-18 Aaron Boodman <aa@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28412: Leak of WebCore::XMLHttpRequest object during layout tests.
+
+ No new tests: Already covered by existing tests.
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::XMLHttpRequest): Add instrumentation for this kind of leak.
+ (WebCore::XMLHttpRequest::~XMLHttpRequest): Ditto.
+ (WebCore::XMLHttpRequest::createRequest): Only setPendingActivity() if we actually started a request. Also,
+ restore a call to nonCacheRequestInFlight() that got lost in a recent refactor.
+
+2009-08-18 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Added a client to SQLTransaction. In addition to being a place to
+ get notifications about certain events in a transaction, it is
+ also an abstraction layer that allows us to plug in different
+ implementations for each port for how transactions interract with
+ the main DB. For example, WebCore's default implementation will
+ make direct calls to DatabaseTracker's methods. At the same time,
+ Chromium's implementation will send IPCs to the browser process
+ whenever a transaction needs something from the main DB.
+
+ All storage tests pass.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27967
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * storage/Database.cpp:
+ (WebCore::Database::transactionClient):
+ * storage/Database.h:
+ * storage/DatabaseThread.cpp:
+ (WebCore::DatabaseThread::DatabaseThread):
+ * storage/DatabaseThread.h:
+ (WebCore::DatabaseThread::transactionClient):
+ * storage/SQLTransaction.cpp:
+ (WebCore::SQLTransaction::runCurrentStatement):
+ (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
+ (WebCore::SQLTransaction::postflightAndCommit):
+ * storage/SQLTransactionClient.cpp: Added.
+ * storage/SQLTransactionClient.h: Added.
+
+2009-08-18 Julie Parent <jparent@chromium.org>
+
+ Not reviewed, build fix for Chromium.
+
+ Final change for v8 corresponding to http://trac.webkit.org/changeset/47469.
+
+ * bindings/v8/custom/V8HTMLFrameElementCustom.cpp: Added missing using statment
+
+2009-08-18 Julie Parent <jparent@chromium.org>
+
+ Not reviewed, build fix for Chromium.
+
+ More corresponding changes to V8 from http://trac.webkit.org/changeset/47469.
+
+ * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
+ (WebCore::ACCESSOR_SETTER): Use srcAttr instead of the src function.
+
+2009-08-18 Julie Parent <jparent@chromium.org>
+
+ Not reviewed, build fix for Chromium.
+
+ Make corresponding changes to V8 from http://trac.webkit.org/changeset/47469.
+
+ * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
+ (WebCore::ACCESSOR_SETTER): Use srcAttr instead of the src function.
+
+2009-08-18 Dan Bernstein <mitz@apple.com>
+
+ Build fix.
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::getIdentifierValue):
+
+2009-08-18 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ More work on making DOM classes start with reference count of 1
+ https://bugs.webkit.org/show_bug.cgi?id=28068
+
+ Some related clean-up and preparation steps so the subsequent
+ patches will be as small as possible.
+
+ * WebCore.base.exp: Sorted this file.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::accessibilityDescription):
+ Use nameAttr instead of the name function.
+
+ * bindings/js/JSHTMLFrameElementCustom.cpp:
+ (WebCore::JSHTMLFrameElement::setSrc):
+ Use srcAttr instead of the src function.
+
+ * bindings/js/JSHTMLIFrameElementCustom.cpp:
+ (WebCore::JSHTMLIFrameElement::setSrc):
+ Use srcAttr instead of the src function.
+
+ * bindings/objc/DOM.mm: Sorted includes.
+ * dom/Document.cpp: Ditto.
+
+ * dom/StyledElement.cpp: Made invalidateStyleAttribute inline.
+ * dom/StyledElement.h: Ditto.
+
+ * dom/make_names.pl: Changed default of createWithNew to 0.
+ Eventually all elements will be created with create instead of new.
+
+ * html/HTMLTagNames.in:
+ * svg/svgtags.in:
+ * wml/WMLTagNames.in:
+ Added createWithNew for every tag. We'll remove it as we convert
+ element classes to use create.
+
+ * html/HTMLAppletElement.h: Removed unneeded forward declarations.
+ * html/HTMLFrameElement.h: Ditto.
+
+ * html/HTMLEmbedElement.cpp: Removed many attribute get and
+ set functions.
+ * html/HTMLEmbedElement.h: Ditto.
+ * html/HTMLIFrameElement.cpp: Ditto.
+ * html/HTMLIFrameElement.h: Ditto.
+ * html/HTMLObjectElement.cpp: Ditto.
+ * html/HTMLObjectElement.h: Ditto.
+ * html/HTMLPlugInElement.cpp: Ditto.
+ * html/HTMLPlugInElement.h: Ditto.
+
+ * html/HTMLFrameElementBase.cpp: Removed many attribute get and
+ set functions.
+ (WebCore::HTMLFrameElementBase::location): Changed to use
+ srcAttr instead of src.
+ * html/HTMLFrameElementBase.h: Removed many attribute get and set
+ functions.
+
+ * loader/MediaDocument.cpp:
+ (WebCore::MediaDocument::replaceMediaElementTimerFired):
+ Use srcAttr and typeAttr instead of setSrc and setType.
+ * loader/PluginDocument.cpp:
+ (WebCore::PluginTokenizer::createDocumentStructure): Ditto.
+
+ * rendering/RenderPartObject.cpp:
+ (WebCore::RenderPartObject::updateWidget): Use nameAttr instead
+ of name -- this avoids an extra AtomicString round trip and a little
+ ref count churn too.
+
+2009-08-18 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ SharedWorkers need to support loading.
+ https://bugs.webkit.org/show_bug.cgi?id=28342
+
+ Added loader support to shared workers, and refactored worker tests to also test SharedWorkers
+
+ * workers/DefaultSharedWorkerRepository.cpp:
+ (WebCore::SharedWorkerProxy::postTaskToLoader):
+ Forwards load requests to an arbitrary document from the list of worker's documents.
+ (WebCore::SharedWorkerProxy::postTaskForModeToWorkerContext):
+ Posts responses back to the shared worker thread.
+
+2009-08-18 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ StyleChange::init needs clean up before fixing the bug 23892
+ https://bugs.webkit.org/show_bug.cgi?id=27749
+
+ This patch simplifies StyleChange::init by removing the iteration on CSS properties,
+ and adding functions reconcileTextDecorationProperties and extractTextStyle to handle the style.
+
+ Because there is a bug in how text decorations are processes in getPropertiesNotInComputedStyle,
+ this patch simplifies the treatment in order to preserve the original behavior of WebKit.
+ However, the current implementation is not best (adds redundant text-decorations) and we should fix it later.
+
+ No test is added since there is no change in behavior.
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::StyleChange::init): Uses getPropertiesNotInComputedStyle instead of iterating through the properties
+ (WebCore::StyleChange::reconcileTextDecorationProperties): Removes -webkit-text-decorations-in-effects and redundant "none"
+ (WebCore::getIdentifierValue): Obtains the identifier of a CSSPrimitiveValue
+ (WebCore::StyleChange::extractTextStyles): Converts properties in style to m_apply* and removes the property
+ (WebCore::getPropertiesNotInComputedStyle): Fixed a bug with how text decorations are treated
+
+2009-08-18 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fixing a DB file naming bug in Chromium. The origin should come
+ before the DB name in the file name.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28331
+
+ * storage/DatabaseTracker.cpp:
+ (WebCore::DatabaseTracker::fullPathForDatabase):
+
+2009-08-18 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Haiku] Adding four image-specific files to WebCore:
+ IconHaiku.cpp, ImageBufferData.h, ImageBufferHaiku.cpp, ImageHaiku.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=28130
+
+ * platform/graphics/Icon.h:
+ * platform/graphics/haiku/IconHaiku.cpp: Added.
+ (WebCore::Icon::~Icon):
+ (WebCore::Icon::createIconForFile):
+ (WebCore::Icon::createIconForFiles):
+ (WebCore::Icon::paint):
+ * platform/graphics/haiku/ImageBufferData.h: Added.
+ * platform/graphics/haiku/ImageBufferHaiku.cpp: Added.
+ (WebCore::ImageBufferData::ImageBufferData):
+ (WebCore::ImageBuffer::ImageBuffer):
+ (WebCore::ImageBuffer::~ImageBuffer):
+ (WebCore::ImageBuffer::context):
+ (WebCore::ImageBuffer::getUnmultipliedImageData):
+ (WebCore::ImageBuffer::getPremultipliedImageData):
+ (WebCore::ImageBuffer::putUnmultipliedImageData):
+ (WebCore::ImageBuffer::putPremultipliedImageData):
+ (WebCore::ImageBuffer::toDataURL):
+ (WebCore::ImageBuffer::image):
+ (WebCore::ImageBuffer::platformTransformColorSpace):
+ * platform/graphics/haiku/ImageHaiku.cpp: Added.
+ (WebCore::FrameData::clear):
+ (WebCore::Image::loadPlatformResource):
+ (WebCore::BitmapImage::initPlatformData):
+ (WebCore::BitmapImage::invalidatePlatformData):
+ (WebCore::BitmapImage::draw):
+ (WebCore::Image::drawPattern):
+ (WebCore::BitmapImage::checkForSolidColor):
+ (WebCore::BitmapImage::getBBitmap):
+
+2009-08-18 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=27575 [CSS3
+ Backgrounds and Borders] Drop the prefix from background-size
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::):
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ (WebCore::CSSParser::parseFillProperty):
+ (WebCore::cssPropertyID):
+ * css/CSSPropertyNames.in:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ * page/animation/AnimationBase.cpp:
+ (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
+ (WebCore::ensurePropertyMap):
+
+2009-08-18 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ SharedWorkers need to forward exceptions to parent documents
+ https://bugs.webkit.org/show_bug.cgi?id=28320
+
+ Changed SharedWorkerProxy to have individual mutexes (so workers can interact with their parent documents without contention).
+
+ Updated SharedWorkerProxy to forward exceptions/console messages to all parent documents.
+
+ * bindings/js/JSSharedWorkerConstructor.cpp:
+ Cleaned up bitrot - added missing include.
+ * workers/DefaultSharedWorkerRepository.cpp:
+ (WebCore::postExceptionTask):
+ Callback used to deliver exceptions to a document.
+ (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
+ Forwards exceptions to all parent documents for presentation to the user.
+ (WebCore::postConsoleMessageTask):
+ (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
+ Forwards console messages to all parent documents for presentation to the user.
+ (WebCore::SharedWorkerProxy::addToWorkerDocuments):
+ Grabs the mutex before accessing workerDocuments.
+ (WebCore::SharedWorkerProxy::documentDetached):
+ Grabs the mutex before accessing workerDocuments.
+
+2009-08-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ <rdar://problem/7135588> HTMLMediaElement should ask WebPolicyLoadDelegate before loading resource
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::isSafeToLoadURL):
+ Call FrameLoaderClient::shouldLoadMediaElementURL.
+
+ * loader/FrameLoaderClient.h:
+ (WebCore::FrameLoaderClient::shouldLoadMediaElementURL):
+ Return true by default.
+
+2009-08-18 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ openDatabase() should not execute any SQL statement on the
+ database it's trying to open, unless there are no other open
+ handles to the same database. Otherwise, we might run into a
+ deadlock.
+
+ Test: storage/open-database-while-transaction-in-progress.html
+
+ https://bugs.webkit.org/show_bug.cgi?id=28207
+
+ * storage/Database.cpp:
+ (WebCore::Database::performOpenAndVerify):
+
+2009-08-18 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ SVG Filter feBlend implementation missing
+ [https://bugs.webkit.org/show_bug.cgi?id=28133]
+
+ Implementation of SVG Filter feBlend.
+
+ FilterEffect.cp needed changes to optimize the rendering. With the old code
+ we drew a subEffect on the current FilterEffect by drawImage, got the PixelArray,
+ cleared the drawing area, drew the next FilterEffect with drawImage and picked this
+ PixelArray again. This was unefficient and slow. Now we calculate the requested area
+ of the subEffect and ask the FilterEffect's ImageBuffer for the PixelArray directly,
+ without any drawing operations on GraphicsContext.
+
+ There is already a test case
+ Test: svg/W3C-SVG-1.1/filters-blend-01-b.svg
+
+ * html/canvas/CanvasPixelArray.h:
+ (WebCore::CanvasPixelArray::set):
+ (WebCore::CanvasPixelArray::get):
+ * platform/graphics/filters/FEBlend.cpp:
+ (WebCore::unknown):
+ (WebCore::normal):
+ (WebCore::multiply):
+ (WebCore::screen):
+ (WebCore::darken):
+ (WebCore::lighten):
+ (WebCore::FEBlend::apply):
+ * platform/graphics/filters/FEBlend.h:
+ * platform/graphics/filters/FilterEffect.cpp:
+ (WebCore::FilterEffect::calculateDrawingIntRect):
+ * platform/graphics/filters/FilterEffect.h:
+
+2009-08-18 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Fix array formatter followup: node formatter.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28427
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._format):
+
+2009-08-18 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Metrics sidebar broken
+
+ https://bugs.webkit.org/show_bug.cgi?id=28434
+
+ * inspector/front-end/MetricsSidebarPane.js:
+
+2009-08-18 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28432
+ String::createCFString() returns a non-retained empty string
+
+ No known change in functionality, so no test.
+
+ * platform/text/cf/StringCF.cpp: (WebCore::String::createCFString): Retain the CFSTR result.
+
+2009-08-18 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix of <https://bugs.webkit.org/show_bug.cgi?id=28326> DRT on Windows doesn't support
+ LayoutTestController::setQuota or print a callback on UIDelegate::exceededDatabaseQuota.
+
+ Removed an early return that can cause deleteOrigin or deleteAllDatabases to fail when
+ it doesn't have to.
+
+ * storage/DatabaseTracker.cpp:
+ (WebCore::DatabaseTracker::deleteOrigin):
+
+2009-08-18 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by Adele Peterson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27357
+ Support for :valid and :invalid CSS selectors, from HTML5 specs.
+ http://www.whatwg.org/specs/web-apps/current-work/#selector-valid
+
+ Tests: fast/css/pseudo-invalid-001.html
+ fast/css/pseudo-invalid-002.html
+ fast/css/pseudo-valid-001.html
+ fast/css/pseudo-valid-002.html
+ fast/css/pseudo-valid-003.html
+ fast/css/pseudo-valid-004.html
+ fast/css/pseudo-valid-005.html
+ fast/css/pseudo-valid-006.html
+ fast/css/pseudo-valid-007.html
+
+ * css/CSSSelector.cpp:
+ (WebCore::CSSSelector::extractPseudoType): extracts new pseudo-classes
+ * css/CSSSelector.h:
+ (WebCore::CSSSelector::):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::canShareStyleWithElement): Make sure we don't share style between
+form controls that have different validity states.
+ (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): applies
+ style associated to new pseudo-classes
+ * dom/Element.h:
+ (WebCore::Element::willValidate): pushed up in hierarchy
+ (WebCore::Element::isValidFormControlElement): checks for valid form
+ control elements (wraps ValidityState::valid())
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::willValidate): minor clean up
+ (WebCore::HTMLFormControlElement::isValidFormControlElement): ditto
+ * html/HTMLFormControlElement.h:
+ * html/HTMLKeygenElement.h:
+ (WebCore::HTMLKeygenElement::willValidate): added
+ * html/HTMLObjectElement.h:
+ (WebCore::HTMLObjectElement::willValidate): added
+ * html/HTMLObjectElement.idl:
+
+2009-08-18 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Fix array formatter.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28427
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._formatarray):
+
+2009-08-17 Joe Mason <joe.mason@torchmobile.com>
+
+ Reviewed by George Staikos
+
+ Replace repeated string of PLATFORM(FOO) with a single define
+ https://bugs.webkit.org/show_bug.cgi?id=27734
+
+ * loader/CachedFont.cpp:
+ (WebCore::CachedFont::~CachedFont):
+ (WebCore::CachedFont::ensureCustomFontData):
+ (WebCore::CachedFont::platformDataFromCustomData):
+ (WebCore::CachedFont::allClientsRemoved):
+
+2009-08-16 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=20329, shadows and reflections incorrectly
+ considered part of scrollable overflow.
+
+ This patch takes the engine's concept of overflow and splits it into two types:
+ layout overflow and visual overflow.
+
+ Layout overflow is about other boxes that spill out of an enclosing box, For example,
+ in the inline flow case a tall image could spill out of a line box. Examples of
+ visual overflow are shadows, text stroke (and eventually outline and
+ border-image).
+
+ Three objects tracked overflow before this patch: RenderBlock had
+ m_overflowLeft/Top/Width/Height variables. RootInlineBox had an Overflow*
+ that also had four overflow values. Finally RenderReplaced elements tracked shadow/reflection
+ overflow using a map that cached four values.
+
+ This patch takes all of these different overflow models and unifies them into a single
+ new class called RenderOverflow. This class is now a member variable in RenderBox and
+ InlineFlowBoxes. It is only allocated if overflow actually exists. Instead of tracking
+ four values, it tracks eight: left/top/right/bottom for layout overflow and
+ left/top/right/bottom for visual overflow.
+
+ Overflow computation is now done after layout is finished rather than during layout
+ (when child objects can be churning and moving around). A number of layout tests progressed
+ by deferring overflow computation to a separate pass.
+
+ All inline flow boxes now track overflow (and not just the root line box). This allows
+ repainting of line boxes to actually be tight and bail early if the overflow rect of a box
+ doesn't intersect. The old code always visited all object on a line if the root line box
+ intersected at all.
+
+ Line box overflow no longer propagates across self-painting layers. This fixes a number of
+ issues with incorrect scrollbars appearing when relative positioned inlines were used in a page.
+
+ Layer bounds have been modified to exclude visual overflow. The width/height members only really
+ have one reason for continued existence, and that is that they happen to be used in repaint()
+ when an overflow clip object's height isn't accurate. In this case, the bounds should exclude
+ visual overflow anyway, so this change tightens that repaint up.
+
+ Root lines have renamed m_selectionTop/Bottom to m_lineTop/Bottom and positionForPoint methods have
+ been changed to use these instead of relying on overflow (which was totally wrong).
+
+ Significant changes have been made to the "almost strict mode" line box quirk where objects with no
+ text children have no effect on the height of a line. Instead of making the height() of the objects
+ variable and dependent on overflow, the objects now have their full height and get placed on
+ the baseline properly. They simply don't contribute to overflow above lineTop/Bottom.
+
+ Reflections are no longer considered overflow of any kind. Because reflections have their own layers,
+ it is not necessary to treat them as visual or layout overflow in the RenderObject tree. The end result
+ of not incorporating them into RenderOverflow is that they have no effect on scrolling. transparencyClipBox
+ has been extended to support fully reflecting the entire clip box when a reflection exists. This fixes
+ numerous repaint bugs in transparent objects with reflections when the transparent objects had self-painting
+ sublayers.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * dom/ContainerNode.cpp:
+ (WebCore::ContainerNode::getUpperLeftCorner):
+ * editing/visible_units.cpp:
+ (WebCore::previousLinePosition):
+ (WebCore::nextLinePosition):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::adjustViewSize):
+ (WebCore::FrameView::adjustPageHeight):
+ * rendering/InlineBox.cpp:
+ (WebCore::InlineBox::height):
+ * rendering/InlineBox.h:
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::adjustPosition):
+ (WebCore::InlineFlowBox::placeBoxesHorizontally):
+ (WebCore::InlineFlowBox::placeBoxesVertically):
+ (WebCore::InlineFlowBox::computeVerticalOverflow):
+ (WebCore::InlineFlowBox::nodeAtPoint):
+ (WebCore::InlineFlowBox::paint):
+ * rendering/InlineFlowBox.h:
+ (WebCore::InlineFlowBox::InlineFlowBox):
+ (WebCore::InlineFlowBox::topCombinedOverflow):
+ (WebCore::InlineFlowBox::bottomCombinedOverflow):
+ (WebCore::InlineFlowBox::leftCombinedOverflow):
+ (WebCore::InlineFlowBox::rightCombinedOverflow):
+ (WebCore::InlineFlowBox::combinedOverflowRect):
+ (WebCore::InlineFlowBox::topLayoutOverflow):
+ (WebCore::InlineFlowBox::bottomLayoutOverflow):
+ (WebCore::InlineFlowBox::leftLayoutOverflow):
+ (WebCore::InlineFlowBox::rightLayoutOverflow):
+ (WebCore::InlineFlowBox::layoutOverflowRect):
+ (WebCore::InlineFlowBox::topVisualOverflow):
+ (WebCore::InlineFlowBox::bottomVisualOverflow):
+ (WebCore::InlineFlowBox::leftVisualOverflow):
+ (WebCore::InlineFlowBox::rightVisualOverflow):
+ (WebCore::InlineFlowBox::visualOverflowRect):
+ (WebCore::InlineFlowBox::setHorizontalOverflowPositions):
+ (WebCore::InlineFlowBox::setVerticalOverflowPositions):
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::paint):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::RenderBlock):
+ (WebCore::RenderBlock::layout):
+ (WebCore::RenderBlock::layoutBlock):
+ (WebCore::RenderBlock::addOverflowFromBlockChildren):
+ (WebCore::RenderBlock::handleBottomOfBlock):
+ (WebCore::RenderBlock::layoutBlockChildren):
+ (WebCore::RenderBlock::paint):
+ (WebCore::RenderBlock::fillInlineSelectionGaps):
+ (WebCore::RenderBlock::floatRect):
+ (WebCore::RenderBlock::lowestPosition):
+ (WebCore::RenderBlock::rightmostPosition):
+ (WebCore::RenderBlock::leftmostPosition):
+ (WebCore::RenderBlock::addOverhangingFloats):
+ (WebCore::RenderBlock::nodeAtPoint):
+ (WebCore::RenderBlock::positionForPointWithInlineChildren):
+ (WebCore::RenderBlock::layoutColumns):
+ (WebCore::getHeightForLineCount):
+ * rendering/RenderBlock.h:
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::computeHorizontalPositionsForLine):
+ (WebCore::RenderBlock::computeVerticalPositionsForLine):
+ (WebCore::RenderBlock::layoutInlineChildren):
+ (WebCore::RenderBlock::matchedEndLine):
+ (WebCore::RenderBlock::addOverflowFromInlineChildren):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::destroy):
+ (WebCore::RenderBox::clippedOverflowRectForRepaint):
+ (WebCore::RenderBox::localCaretRect):
+ (WebCore::RenderBox::addShadowAndReflectionOverflow):
+ (WebCore::RenderBox::addOverflowFromChild):
+ (WebCore::RenderBox::addLayoutOverflow):
+ (WebCore::RenderBox::addVisualOverflow):
+ (WebCore::RenderBox::clearLayoutOverflow):
+ * rendering/RenderBox.h:
+ (WebCore::RenderBox::combinedOverflowRect):
+ (WebCore::RenderBox::topCombinedOverflow):
+ (WebCore::RenderBox::bottomCombinedOverflow):
+ (WebCore::RenderBox::leftCombinedOverflow):
+ (WebCore::RenderBox::rightCombinedOverflow):
+ (WebCore::RenderBox::layoutOverflowRect):
+ (WebCore::RenderBox::topLayoutOverflow):
+ (WebCore::RenderBox::bottomLayoutOverflow):
+ (WebCore::RenderBox::leftLayoutOverflow):
+ (WebCore::RenderBox::rightLayoutOverflow):
+ (WebCore::RenderBox::visualOverflowRect):
+ (WebCore::RenderBox::topVisualOverflow):
+ (WebCore::RenderBox::bottomVisualOverflow):
+ (WebCore::RenderBox::leftVisualOverflow):
+ (WebCore::RenderBox::rightVisualOverflow):
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::layoutBlock):
+ (WebCore::RenderFlexibleBox::layoutHorizontalBox):
+ (WebCore::RenderFlexibleBox::layoutVerticalBox):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateLayerPosition):
+ (WebCore::RenderLayer::localBoundingBox):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::updateRootLayerPosition):
+ (WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
+ * rendering/RenderLineBoxList.cpp:
+ (WebCore::RenderLineBoxList::paint):
+ (WebCore::RenderLineBoxList::hitTest):
+ * rendering/RenderListItem.cpp:
+ (WebCore::RenderListItem::positionListMarker):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::RenderObject):
+ * rendering/RenderObject.h:
+ * rendering/RenderOverflow.h: Added.
+ (WebCore::RenderOverflow::RenderOverflow):
+ (WebCore::RenderOverflow::topLayoutOverflow):
+ (WebCore::RenderOverflow::bottomLayoutOverflow):
+ (WebCore::RenderOverflow::leftLayoutOverflow):
+ (WebCore::RenderOverflow::rightLayoutOverflow):
+ (WebCore::RenderOverflow::topVisualOverflow):
+ (WebCore::RenderOverflow::bottomVisualOverflow):
+ (WebCore::RenderOverflow::leftVisualOverflow):
+ (WebCore::RenderOverflow::rightVisualOverflow):
+ (WebCore::RenderOverflow::setTopLayoutOverflow):
+ (WebCore::RenderOverflow::setBottomLayoutOverflow):
+ (WebCore::RenderOverflow::setLeftLayoutOverflow):
+ (WebCore::RenderOverflow::setRightLayoutOverflow):
+ (WebCore::RenderOverflow::setTopVisualOverflow):
+ (WebCore::RenderOverflow::setBottomVisualOverflow):
+ (WebCore::RenderOverflow::setLeftVisualOverflow):
+ (WebCore::RenderOverflow::setRightVisualOverflow):
+ (WebCore::RenderOverflow::layoutOverflowRect):
+ (WebCore::RenderOverflow::visualOverflowRect):
+ (WebCore::RenderOverflow::combinedOverflowRect):
+ (WebCore::RenderOverflow::move):
+ (WebCore::RenderOverflow::addLayoutOverflow):
+ (WebCore::RenderOverflow::addVisualOverflow):
+ (WebCore::RenderOverflow::resetLayoutOverflow):
+ * rendering/RenderPartObject.cpp:
+ (WebCore::RenderPartObject::layout):
+ * rendering/RenderReplaced.cpp:
+ (WebCore::RenderReplaced::~RenderReplaced):
+ (WebCore::RenderReplaced::layout):
+ (WebCore::RenderReplaced::shouldPaint):
+ (WebCore::RenderReplaced::positionForPoint):
+ (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
+ * rendering/RenderReplaced.h:
+ * rendering/RenderScrollbarPart.cpp:
+ (WebCore::RenderScrollbarPart::layout):
+ (WebCore::RenderScrollbarPart::paintIntoRect):
+ * rendering/RenderSlider.cpp:
+ (WebCore::RenderSlider::layout):
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::layout):
+ (WebCore::RenderTable::paint):
+ * rendering/RenderTableCell.cpp:
+ (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
+ * rendering/RenderTableSection.cpp:
+ (WebCore::RenderTableSection::layoutRows):
+ * rendering/RenderTableSection.h:
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::positionForPoint):
+ (WebCore::RenderText::localCaretRect):
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::layout):
+ * rendering/RootInlineBox.cpp:
+ (WebCore::RootInlineBox::addHighlightOverflow):
+ (WebCore::RootInlineBox::adjustPosition):
+ (WebCore::RootInlineBox::verticallyAlignBoxes):
+ (WebCore::RootInlineBox::selectionTop):
+ * rendering/RootInlineBox.h:
+ (WebCore::RootInlineBox::RootInlineBox):
+ (WebCore::RootInlineBox::nextRootBox):
+ (WebCore::RootInlineBox::prevRootBox):
+ (WebCore::RootInlineBox::lineTop):
+ (WebCore::RootInlineBox::lineBottom):
+ (WebCore::RootInlineBox::selectionBottom):
+ (WebCore::RootInlineBox::selectionHeight):
+ (WebCore::RootInlineBox::floats):
+ (WebCore::RootInlineBox::floatsPtr):
+ (WebCore::RootInlineBox::setLineTopBottomPositions):
+ * rendering/SVGRootInlineBox.cpp:
+ (WebCore::SVGRootInlineBox::layoutInlineBoxes):
+
+2009-08-18 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28431
+ <rdar://problem/7137610> Application Cache doesn't work with HTTP authentication
+
+ Test: http/tests/appcache/auth.html
+
+ * loader/appcache/ApplicationCacheGroup.h:
+ (WebCore::ApplicationCacheGroup::shouldUseCredentialStorage): If appcache is enabled,
+ always allow it to use stored credentials (we can't ask WebKit client, and maybe we
+ shouldn't ask it, because it's not a document that's loading these resources).
+
+2009-08-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by John Sullivan and David Hyatt.
+
+ Fix <rdar://problem/7147996>
+
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::setHasHorizontalScrollbar):
+ (WebCore::ScrollView::setHasVerticalScrollbar):
+ Update the style of the scroll bars.
+
+ * rendering/RenderScrollbar.cpp:
+ (WebCore::RenderScrollbar::RenderScrollbar):
+ Calculate the size of the scrollbar and set it as the frame size.
+
+2009-08-18 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ HTMLMediaElement should fire 'progress' event before 'load'
+ https://bugs.webkit.org/show_bug.cgi?id=28314
+
+ Test: media/progress-event-at-least-one.html
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::setNetworkState):
+ Schedule 'progress' event before 'load'.
+
+2009-08-18 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28415
+ Set svn:eol-style CRLF on all .sln and .vcproj files that don't already
+ have it.
+
+ * WebCore.vcproj/QTMovieWin.vcproj:
+ * WebCore.vcproj/WebCoreGenerated.vcproj:
+
+2009-08-18 Drew Wilson <atwilson@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Need to extend DumpRenderTree to expose number of worker threads
+ https://bugs.webkit.org/show_bug.cgi?id=28292
+
+ Expose WorkerThread::workerThreadCount() for DumpRenderTree so we can write worker lifecycle tests.
+
+ Tests: fast/workers/shared-worker-lifecycle.html-disabled
+ fast/workers/worker-lifecycle.html
+
+ * WebCore.base.exp:
+ Exported WorkerThread::workerThreadCount().
+ * WebCore.xcodeproj/project.pbxproj:
+ * workers/WorkerThread.cpp:
+ Added tracking of the number of worker threads.
+ (WebCore::threadCountMutex):
+ (WebCore::WorkerThread::workerThreadCount):
+ (WebCore::WorkerThread::WorkerThread):
+ (WebCore::WorkerThread::~WorkerThread):
+ * workers/WorkerThread.h:
+
+2009-08-18 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Unreviewed, build fix.
+
+ [Qt] Add new files I forgot to add in r47424.
+
+2009-08-18 Markus Goetz <Markus.Goetz@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Implement prefetchDNS() function.
+
+ * WebCore.pro:
+ * platform/qt/TemporaryLinkStubs.cpp:
+
+2009-08-18 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Support for parsing <datalist> element and generating HTMLDataListElement nodes.
+ https://bugs.webkit.org/show_bug.cgi?id=26915
+
+ Tests: fast/forms/datalist-nonoption-child.html
+ fast/forms/datalist.html
+
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+ * WebCore.vcproj/build-generated-files.sh:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * css/html.css:
+ * html/CollectionType.h:
+ (WebCore::):
+ * html/HTMLCollection.cpp:
+ (WebCore::HTMLCollection::itemAfter):
+ * html/HTMLDataListElement.cpp: Added.
+ (WebCore::HTMLDataListElement::HTMLDataListElement):
+ (WebCore::HTMLDataListElement::~HTMLDataListElement):
+ (WebCore::HTMLDataListElement::checkDTD):
+ (WebCore::HTMLDataListElement::options):
+ * html/HTMLDataListElement.h: Added.
+ * html/HTMLDataListElement.idl: Added.
+ * html/HTMLElement.cpp:
+ (WebCore::inlineTagList):
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::isAffectedByResidualStyle):
+ * html/HTMLTagNames.in:
+
+2009-08-17 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ -webkit-box-orient:horizontal doesn't work on <button> tag
+ https://bugs.webkit.org/show_bug.cgi?id=34445
+
+ Make a flexible button's anonymous child flexible and pass the
+ parent's box-orient to the anonymous child.
+
+ Also, added a renderName for anonymous flexible boxes.
+
+ Test: fast/flexbox/box-orient-button.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::createAnonymousBlock):
+ * rendering/RenderBlock.h:
+ * rendering/RenderButton.cpp:
+ (WebCore::RenderButton::addChild):
+ (WebCore::RenderButton::setupInnerStyle):
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::renderName):
+
+2009-08-17 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Render -webkit-mask via compositing layers when possible
+ https://bugs.webkit.org/show_bug.cgi?id=28414
+
+ Implement accelerated compositing of -webkit-mask, when combined
+ with already-composited content.
+
+ RenderLayerBacking now creates an additional GraphicsLayer for the mask contents,
+ and sets this as the mask on another GraphicsLayer via the setMaskLayer() method.
+ GraphicsLayerCA then applies the mask using -[CALayer setMask:].
+
+ The enum values for GraphicsLayerPaintingPhase were renamed to avoid the
+ confusion with "mask", and a new value, GraphicsLayerPaintMask, was added which
+ indicates that just the mask is painting.
+
+ When painting the composited mask, we need to paint with the normal compositing
+ mode rather than CompositeDestinationIn, so InlineFlowBox and RenderBox now consult
+ layer()->hasCompositedMask() to pick the mode. If the mask is composited, they no longer
+ need to make transparency layers.
+
+ We no longer have to throw video rendering into software because of masks.
+
+ When a masked element has composited descendants, that element needs to
+ become composited so that the mask can be applied via compositing.
+
+ Tests: compositing/masks/masked-ancestor.html
+ compositing/masks/simple-composited-mask.html
+
+ * platform/graphics/GraphicsLayer.cpp:
+ (WebCore::GraphicsLayer::GraphicsLayer):
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::GraphicsLayer::maskLayer):
+ (WebCore::GraphicsLayer::setMaskLayer):
+ (WebCore::GraphicsLayer::paintingPhase):
+ (WebCore::GraphicsLayer::setPaintingPhase):
+ * platform/graphics/GraphicsLayerClient.h:
+ (WebCore::):
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ (WebCore::GraphicsLayerCA::):
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::setMaskLayer):
+ (WebCore::GraphicsLayerCA::recursiveCommitChanges):
+ (WebCore::GraphicsLayerCA::commitLayerChanges):
+ (WebCore::GraphicsLayerCA::updateMaskLayer):
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::paintMask):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::paintMaskImages):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::hasCompositedMask):
+ * rendering/RenderLayer.h:
+ (WebCore::RenderLayer::hasCompositedMask):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::~RenderLayerBacking):
+ (WebCore::RenderLayerBacking::destroyGraphicsLayer):
+ (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
+ (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
+ (WebCore::RenderLayerBacking::updateForegroundLayer):
+ (WebCore::RenderLayerBacking::updateMaskLayer):
+ (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer):
+ (WebCore::RenderLayerBacking::setContentsNeedDisplay):
+ (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
+ (WebCore::RenderLayerBacking::paintIntoLayer):
+ (WebCore::RenderLayerBacking::paintContents):
+ * rendering/RenderLayerBacking.h:
+ (WebCore::RenderLayerBacking::hasMaskLayer):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+ (WebCore::RenderLayerCompositor::canAccelerateVideoRendering):
+ (WebCore::RenderLayerCompositor::requiresCompositingWhenDescendantsAreCompositing):
+ * rendering/RenderLayerCompositor.h:
+
+2009-08-17 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Layer content misplaced with compositing, z-index and overflow
+ https://bugs.webkit.org/show_bug.cgi?id=28361
+
+ The foreground GraphicsLayer (used to render element foreground when the element has
+ negative z-order children) was misplaced when there is a clipping layer (which clips
+ children). The foreground layer is parented under the clipping layer so that the foreground
+ depth-sorts with the layer's children, so its geometry needs to be computed relative to
+ that clipping layer.
+
+ Also clarified some FIXME comments, and corrected a debug-only layer name.
+
+ Test: compositing/geometry/clipping-foreground.html
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::updateSublayerList):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
+ (WebCore::RenderLayerBacking::updateForegroundLayer):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
+
+2009-08-17 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix leaks of SVGElementInstance seen during regression tests.
+
+ r47313 made TreeShared types start with a ref-count of 1, but SVGElementInstance was mistakenly
+ not updated to have a create method that adopted the initial reference. This lead to the instances
+ of SVGElementInstance allocated by SVGUseElement being leaked.
+
+ * svg/SVGElementInstance.h:
+ (WebCore::SVGElementInstance::create):
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::buildPendingResource):
+ (WebCore::SVGUseElement::buildInstanceTree):
+ (WebCore::SVGUseElement::handleDeepUseReferencing):
+
+2009-08-17 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Some cleanup towards https://bugs.webkit.org/show_bug.cgi?id=13631
+ Page Cache should support pages with frames.
+
+ - Re-factor all remaining page cache code out of DocumentLoader, as CachedPage/CacheFrame loads
+ are solely the responsibility of FrameLoader.
+ - Enhance some page cache related Logging to help development.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::didCommitLoad):
+ (WebCore::InspectorController::identifierForInitialRequest):
+
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::DocumentLoader):
+ * loader/DocumentLoader.h:
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::FrameLoader):
+ (WebCore::FrameLoader::commitProvisionalLoad):
+ (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
+ (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
+ * loader/FrameLoader.h:
+ (WebCore::FrameLoader::isLoadingFromCachedPage):
+
+2009-08-17 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Moved implementation of isAfterContent to RenderObject
+ (as inline method to avoid potential performance regressions).
+
+ BUG 28376 - [Cleanup] isAfterContent() implemented twice, should be member of RenderObject
+ (https://bugs.webkit.org/show_bug.cgi?id=28376)
+
+ * rendering/RenderBox.cpp:
+ * rendering/RenderBox.h:
+ * rendering/RenderInline.cpp:
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::isAfterContent):
+
+2009-08-17 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Assertion failure in WebCore::RenderHTMLCanvas::layout
+ https://bugs.webkit.org/show_bug.cgi?id=12052
+
+ Don't handle run-in if the element is not a block element.
+
+ Test: fast/runin/nonblock-runin.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::handleRunInChild):
+
+2009-08-17 Benjamin C Meyer <benjamin.meyer@torchmobile.com>
+
+ Reviewed by Darin Adler.
+
+ Fix createImageData to raise the NOT_SUPPORTED_ERR exception when
+ either of the arguments are not finite.
+
+ According to
+ http://www.whatwg.org/specs/web-apps/current-work/#pixel-manipulation:
+ "If any of the arguments to createImageData() or getImageData() are
+ infinite or NaN, or if the createImageData() method is invoked with
+ only one argument but that argument is null, the method must instead
+ raise a NOT_SUPPORTED_ERR exception."
+
+ Test: http://philip.html5.org/tests/canvas/suite/tests/2d.imageData.create.nonfinite.html
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::createImageData):
+ * html/canvas/CanvasRenderingContext2D.h:
+ * html/canvas/CanvasRenderingContext2D.idl:
+
+2009-08-17 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Add a way to release the storage lock
+ https://bugs.webkit.org/show_bug.cgi?id=28411
+
+ Two scripts within the same origin that are accessing LocalStorage must not do
+ it simultaneously, according to the spec. There are some cases, however, where
+ a script might want to override this behavior. navigator.getStorageUpdates()
+ was added for this reason:
+ http://dev.w3.org/html5/spec/Overview.html#manually-releasing-the-storage-mutex
+
+ Add this function to navigator and hook it up to DOM Storage.
+
+ * page/Navigator.cpp:
+ (WebCore::Navigator::getStorageUpdates):
+ * page/Navigator.h:
+ * page/Navigator.idl:
+ * storage/StorageNamespace.h:
+ * storage/StorageNamespaceImpl.cpp:
+ (WebCore::StorageNamespaceImpl::unlock):
+ * storage/StorageNamespaceImpl.h:
+
+2009-08-17 Mark Rowe <mrowe@apple.com>
+
+ Build fix.
+
+ CFNetwork isn't present in the framework search path on Mac OS X so we can't directly include its headers.
+ We include CoreServices.h, the umbrella framework that contains CFNetwork, from the prefix header which
+ results in the CFNetwork headers being included on Mac OS X. CoreServices.h doesn't include CFNetwork.h on
+ Windows though so we explicitly include this header from the prefix header when on Windows.
+
+ * WebCorePrefix.h:
+ * platform/network/cf/DNSCFNet.cpp: Remove #include that is no longer needed.
+
+2009-08-17 Alexey Proskuryakov <ap@apple.com>
+
+ Trying a better build fix (the previous one broke Leopard bots, although it did build for me).
+
+ * platform/network/cf/DNSCFNet.cpp: Include CFNetwork/CFNetwork.h instead.
+
+2009-08-17 Alexey Proskuryakov <ap@apple.com>
+
+ Trying to fix Windows build.
+
+ * platform/network/cf/DNSCFNet.cpp: Include CFNetwork/CFHost.h.
+
+2009-08-17 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Steve Falkenburg.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27323
+ Only add Cygwin to the path when it isn't already there. This avoids
+ causing problems for people who purposefully have non-Cygwin versions of
+ executables like svn in front of the Cygwin ones in their paths.
+
+ * WebCore.vcproj/QTMovieWin.vcproj:
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+ * WebCore.vcproj/WebCoreGenerated.vcproj:
+
+2009-08-17 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28401
+ Add support for DNS prefetching with CFNetwork
+
+ This is just an optimization, no behavior change, so no tests.
+
+ * platform/network/cf/DNSCFNet.cpp:
+ (WebCore::clientCallback):
+ (WebCore::prefetchDNS):
+ Use async CFHostStartInfoResolution() for implementation.
+
+2009-08-17 Aaron Boodman <aa@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28313: Combine ThreadableLoaderOptions::crossOriginRequestPolicy and
+ ThreadableLoaderOptions::crossOriginRedirectPolicy since they are always set the same way.
+
+ Also, tightened up behavior of XMLHttpRequest with cross-origin redirects and access control. We have not implemented
+ redirects access control, so we should never redirect across origins. But in two edge cases, we were:
+
+ * Asynchronous XHR: Script on origin A requests resource from origin B. Server redirects (without sending access control
+ authorization headers) to a resource on origin A.
+ * Synchronous XHR: Script on origin A requests resource from origin B. Server redirects (without sending access control
+ authorization headers) to another resource on origin B (this time sending access control authorization headers).
+
+ Test: http/tests/xmlhttprequest/access-control-and-redirects.html
+
+ * loader/DocumentThreadableLoader.cpp:
+ (WebCore::DocumentThreadableLoader::willSendRequest): Refactor redirect checking code into shared location.
+ (WebCore::DocumentThreadableLoader::loadRequest): Ditto.
+ (WebCore::DocumentThreadableLoader::isAllowedRedirect): Ditto.
+ * loader/DocumentThreadableLoader.h:
+ * loader/ThreadableLoader.h:
+ (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Remove ThreadableLoaderOptions::crossOriginRedirectPolicy.
+ * page/EventSource.cpp:
+ (WebCore::EventSource::connect): Ditto.
+ * workers/Worker.cpp: Ditto.
+ (WebCore::Worker::Worker): Ditto.
+ * workers/WorkerContext.cpp: Ditto.
+ (WebCore::WorkerContext::importScripts): Ditto.
+ * workers/WorkerScriptLoader.cpp:
+ (WebCore::WorkerScriptLoader::loadSynchronously): Ditto.
+ (WebCore::WorkerScriptLoader::loadAsynchronously): Ditto.
+ * workers/WorkerScriptLoader.h:
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::createRequest): Ditto.
+
+2009-08-17 Adam Langley <agl@google.com>
+
+ Reviewed by Dan Bernstein (relanding of r47157).
+
+ Fix a typo in platform/graphics/skia/PlatformContextSkia.cpp
+
+ https://bugs.webkit.org/show_bug.cgi?id=28172
+
+ This was originally fixed in r47157, however it triggered a bug in
+ Skia which caused Chromium Linux to fail layout tests in debug mode.
+ It was reverted in r47189 while we sorted it out.
+
+ The Skia bug was fixed in Skia's r321 [1] and rolled into Chromium in
+ Chromium's r23523. This is a reland of the original patch.
+
+ No new tests because it's a just typo fix.
+
+ [1] http://code.google.com/p/skia/source/detail?r=321
+
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::setupPaintCommon):
+
+2009-08-17 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ Protect ResourceHandle for g_file_query_info_async call, using the
+ same technique we already use for HTTP requests that take the soup
+ path.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
+ (WebCore::ResourceHandle::~ResourceHandle):
+ (WebCore::finishedCallback):
+ (WebCore::):
+
+2009-08-17 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (r47255): MediaWiki's (including Wikipedia) navigation pane
+ appears below the main content
+ https://bugs.webkit.org/show_bug.cgi?id=28350
+
+ A particular version of the MediaWiki software detects WebKit through
+ user agent sniffing and imports a style sheet called KHTMLFixes.css,
+ which contains a single rule that was meant to work around some KHTML
+ bug, but currently has the sole effect of causing the float containing
+ the main article content to extend all the way to the left and thus push
+ down the left navigation pane.
+
+ * css/CSSImportRule.cpp:
+ (WebCore::CSSImportRule::setCSSStyleSheet): If site specific hacks are
+ enabled, check if the imported style sheet is the MediaWiki
+ KHTMLFixes.css. If so, remove the offending rule.
+
+2009-08-17 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Kevin Ollivier.
+
+ Correct crash when processing local cancelled requests.
+
+ No new tests. Existing fast/images/favicon-as-image.html
+ displays the problem.
+
+ * platform/network/curl/ResourceHandleManager.cpp:
+ (WebCore::writeCallback): Add check for m_cancelled after
+ performing local-file processing.
+ (WebCore::ResourceHandleManager::downloadTimerCallback): Add
+ check for m_cancelled after performing local-file processing.
+
+2009-08-17 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed. Reverts 47371, since it breaks GTK+.
+
+ * platform/graphics/ImageSource.cpp:
+ (WebCore::ImageSource::setData):
+ * platform/image-decoders/ImageDecoder.cpp: Removed.
+ * platform/image-decoders/ImageDecoder.h:
+ (WebCore::ImageDecoder::ImageDecoder):
+ * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+ (WebCore::convertCMYKToRGBA):
+ (WebCore::convertRGBToRGBA):
+ (WebCore::JPEGImageDecoder::outputScanlines):
+ * platform/image-decoders/jpeg/JPEGImageDecoder.h:
+ * platform/image-decoders/png/PNGImageDecoder.cpp:
+ (WebCore::PNGImageDecoder::headerAvailable):
+ (WebCore::PNGImageDecoder::rowAvailable):
+
+2009-08-17 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ Allow image decoders to down-sample the image directly
+ to scaled output buffer. This can be enabled/disabled by
+ macro ENABLE(IMAGE_DECODER_DOWN_SAMPLING).
+ Only JPEG and PNG decoders are modified to support it now.
+ https://bugs.webkit.org/show_bug.cgi?id=28308
+
+ * platform/graphics/ImageSource.cpp:
+ (WebCore::ImageSource::setData):
+ * platform/image-decoders/ImageDecoder.cpp: Added.
+ * platform/image-decoders/ImageDecoder.h:
+ (WebCore::ImageDecoder::ImageDecoder):
+ (WebCore::ImageDecoder::setMaxNumPixels):
+ * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+ (WebCore::convertCMYKToRGBA):
+ (WebCore::convertRGBToRGBA):
+ (WebCore::JPEGImageDecoder::outputScanlines):
+ * platform/image-decoders/jpeg/JPEGImageDecoder.h:
+ (WebCore::JPEGImageDecoder::setSize):
+ * platform/image-decoders/png/PNGImageDecoder.cpp:
+ (WebCore::PNGImageDecoder::headerAvailable):
+ (WebCore::PNGImageDecoder::rowAvailable):
+
+2009-08-17 Simon Fraser <simon.fraser@apple.com>
+
+ Build fix: fix float literals to avoid casting warnings.
+
+ * rendering/MediaControlElements.cpp:
+
+2009-08-17 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Use OwnPtrs for GraphicsLayers
+ https://bugs.webkit.org/show_bug.cgi?id=28399
+
+ Convert RenderLayerBacking and RenderLayerCompositor to use OwnPtrs
+ for their references to GraphicsLayers.
+
+ * platform/graphics/GraphicsLayer.h:
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayer::create):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::RenderLayerBacking):
+ (WebCore::RenderLayerBacking::createGraphicsLayer):
+ (WebCore::RenderLayerBacking::destroyGraphicsLayer):
+ (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
+ (WebCore::RenderLayerBacking::updateInternalHierarchy):
+ (WebCore::RenderLayerBacking::updateClippingLayers):
+ (WebCore::RenderLayerBacking::updateForegroundLayer):
+ (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
+ * rendering/RenderLayerBacking.h:
+ (WebCore::RenderLayerBacking::graphicsLayer):
+ (WebCore::RenderLayerBacking::clippingLayer):
+ (WebCore::RenderLayerBacking::ancestorClippingLayer):
+ (WebCore::RenderLayerBacking::foregroundLayer):
+ (WebCore::RenderLayerBacking::parentForSublayers):
+ (WebCore::RenderLayerBacking::childForSuperlayers):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::~RenderLayerCompositor):
+ (WebCore::RenderLayerCompositor::rootPlatformLayer):
+ (WebCore::RenderLayerCompositor::didMoveOnscreen):
+ (WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
+ (WebCore::RenderLayerCompositor::destroyRootPlatformLayer):
+ * rendering/RenderLayerCompositor.h:
+
+2009-08-17 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Reset InjectedScript styles cache on document change.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28390
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::close):
+ (WebCore::InspectorController::populateScriptObjects):
+ (WebCore::InspectorController::didCommitLoad):
+ (WebCore::InspectorController::resetInjectedScript):
+ * inspector/InspectorController.h:
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::setDocument):
+ * inspector/InspectorDOMAgent.h:
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript._reset):
+
+2009-08-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ * rendering/MediaControlElements.cpp: Removed unneeded include of CString.h,
+ resorted includes, renamed "doc" to "document" and fixed formatting.
+
+2009-08-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Removed functions now unneeded due to use of Reflect to create
+ language bindings.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap):
+ Get at usemap attribute directly.
+
+ * editing/DeleteButtonController.cpp:
+ (WebCore::DeleteButtonController::createDeletionUI):
+ Get at id attribute directly.
+ * editing/EditorCommand.cpp:
+ (WebCore::executeInsertHorizontalRule): Ditto.
+
+ * html/HTMLDocument.cpp:
+ (WebCore::HTMLDocument::dir): Get at dir attribute of body directly.
+ (WebCore::HTMLDocument::setDir): Ditto.
+
+ * html/HTMLElement.cpp: Deleted unused functions.
+ * html/HTMLElement.h: Ditto.
+
+ * html/HTMLImageElement.cpp: Deleted unused functions.
+ (WebCore::HTMLImageElement::alt): Changed to return const AtomicString&.
+ (WebCore::HTMLImageElement::addSubresourceAttributeURLs): Changed to
+ get at usemap attribute directly, but added a FIXME because although
+ it is what the old code did, it looks to not be entirely correct.
+
+ * html/HTMLImageElement.h: Deleted unused functions.
+
+ * rendering/HitTestResult.cpp:
+ (WebCore::HitTestResult::altDisplayString): Get at alt attribute directly.
+
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::imageMap): Get at usemap attribute directly.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::createGraphicsLayer): Get at id attribute
+ directly.
+ (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): Removed
+ explicit HTMLNames namespace qualification.
+
+2009-08-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ * dom/Document.cpp:
+ (WebCore::Document::setFocusedNode): Removed unneeded calls
+ to RefPtr::get.
+
+2009-08-17 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Discard DOM Node bindings on any document change.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28389
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::setDocument):
+
+2009-08-13 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: Improve Cookie DataGrid to Show Hidden Data
+ https://bugs.webkit.org/show_bug.cgi?id=28269
+
+ * English.lproj/localizedStrings.js: DataGrid Headers "Name", "Value", "Size", ...
+ * WebCore.gypi: added missing files
+
+ Implemented Bindings for InspectorController.deleteCookie(name)
+
+ * inspector/InspectorBackend.idl:
+ * bindings/js/JSInspectorBackendCustom.cpp:
+ (WebCore::JSInspectorBackend::cookies):
+ (WebCore::JSInspectorBackend::deleteCookie):
+
+ v8 Bindings Stubs
+
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8InspectorBackendCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+ Removed WebInspector.Cookie
+
+ * inspector/front-end/Cookie.js: Removed.
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/WebKit.qrc:
+
+ Improved DataGrid and Kept Fallback Behavior for Platforms that don't
+ yet provide access to raw cookies.
+
+ * inspector/front-end/CookieItemsView.js:
+ (WebInspector.CookieItemsView):
+ (WebInspector.CookieItemsView.prototype.get statusBarItems):
+ (WebInspector.CookieItemsView.prototype.update):
+ (WebInspector.CookieItemsView.prototype.buildCookies):
+ (WebInspector.CookieItemsView.prototype.dataGridForCookies):
+ (WebInspector.CookieItemsView.prototype.fallbackUpdate.callback):
+ (WebInspector.CookieItemsView.prototype.fallbackUpdate):
+ (WebInspector.CookieItemsView.prototype.fallbackBuildCookiesFromString):
+ (WebInspector.CookieItemsView.prototype.fallbackDataGridForCookies):
+ (WebInspector.CookieItemsView.prototype._deleteButtonClicked):
+
+ Interaction with the page through Injected Script (for fallback behavior)
+
+ * inspector/front-end/DOMAgent.js:
+ (InspectorController.getCookies):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.setStyleProperty): style fix
+ (InjectedScript.getCookies):
+
+ Allow alignment of text inside DataGrids.
+
+ * inspector/front-end/DataGrid.js:
+ (WebInspector.DataGrid):
+ (WebInspector.DataGridNode.prototype.createCell):
+ * inspector/front-end/DatabasesPanel.js:
+ (WebInspector.DatabasesPanel.prototype.dataGridForDOMStorage):
+ * inspector/front-end/inspector.css:
+
+ Added deleteCookie(., ., String name)
+ Modified getRawCookies to return a bool to know if its implemented
+
+ * platform/CookieJar.h:
+
+
+ Implemented deleteCookie for Macs
+
+ * platform/mac/CookieJar.mm:
+ (WebCore::getRawCookies):
+ (WebCore::deleteCookie):
+
+ Stub Implementations for Other Platforms
+
+ * platform/haiku/CookieJarHaiku.cpp:
+ (WebCore::getRawCookies):
+ (WebCore::deleteCookie):
+ * platform/network/chromium/CookieJarChromium.cpp:
+ (WebCore::getRawCookies):
+ (WebCore::deleteCookie):
+ * platform/network/curl/CookieJarCurl.cpp:
+ (WebCore::getRawCookies):
+ (WebCore::deleteCookie):
+ * platform/network/soup/CookieJarSoup.cpp:
+ (WebCore::getRawCookies):
+ (WebCore::deleteCookie):
+ * platform/network/win/CookieJarCFNetWin.cpp:
+ (WebCore::getRawCookies):
+ (WebCore::deleteCookie):
+ * platform/network/win/CookieJarWin.cpp:
+ (WebCore::getRawCookies):
+ (WebCore::deleteCookie):
+ * platform/qt/CookieJarQt.cpp:
+ (WebCore::getRawCookies):
+ (WebCore::deleteCookie):
+
+2009-08-17 Adam Treat <adam.treat@torchmobile.com>
+
+ Blind build fix for Leopard.
+
+ * platform/graphics/GraphicsContext.cpp:
+ (WebCore::GraphicsContext::adjustLineToPixelBoundaries):
+
+2009-08-13 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ Style fixes based on cpp_style.py and WebKit Style guide for
+ GraphicsContextCG.cpp
+
+ https://bugs.webkit.org/show_bug.cgi?id=28268
+
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::GraphicsContext::drawLine):
+ (WebCore::GraphicsContext::drawEllipse):
+ (WebCore::GraphicsContext::strokeArc):
+ (WebCore::GraphicsContext::drawConvexPolygon):
+ (WebCore::GraphicsContext::applyStrokePattern):
+ (WebCore::GraphicsContext::drawPath):
+ (WebCore::GraphicsContext::clipOut):
+ (WebCore::GraphicsContext::clipOutEllipseInRect):
+ (WebCore::GraphicsContext::addInnerRoundedRectClip):
+ (WebCore::GraphicsContext::clipToImageBuffer):
+ (WebCore::GraphicsContext::setPlatformShadow):
+ (WebCore::GraphicsContext::setLineCap):
+ (WebCore::GraphicsContext::setLineJoin):
+ (WebCore::GraphicsContext::roundToDevicePixels):
+ (WebCore::GraphicsContext::drawLineForText):
+ (WebCore::GraphicsContext::setURLForRect):
+ (WebCore::GraphicsContext::setImageInterpolationQuality):
+ (WebCore::GraphicsContext::imageInterpolationQuality):
+ (WebCore::GraphicsContext::setPlatformTextDrawingMode):
+ (WebCore::GraphicsContext::setCompositeOperation):
+
+2009-08-13 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ Style fixes based on cpp_style.py and WebKit Style guide for
+ GraphicsContext.cpp/h, GraphicsContextCairo.cpp and GraphicsContextQt.cpp.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28268
+
+ * platform/graphics/GraphicsContext.cpp:
+ (WebCore::GraphicsContext::save):
+ (WebCore::GraphicsContext::restore):
+ (GraphicsContext::drawText):
+ (GraphicsContext::initFocusRing):
+ (GraphicsContext::focusRingBoundingRect):
+ (GraphicsContext::drawImage):
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::drawLine):
+ (WebCore::GraphicsContext::strokeArc):
+ (WebCore::GraphicsContext::setLineCap):
+ (WebCore::GraphicsContext::setLineJoin):
+ (WebCore::toCairoOperator):
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+
+2009-08-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Change HTMLAreaElement to use OwnArrayPtr
+ https://bugs.webkit.org/show_bug.cgi?id=28386
+
+ * html/HTMLAreaElement.cpp:
+ (WebCore::HTMLAreaElement::HTMLAreaElement): Removed unneeded initializer.
+ (WebCore::HTMLAreaElement::~HTMLAreaElement): Removed unneeded delete call.
+ (WebCore::HTMLAreaElement::parseMappedAttribute): Use the set function
+ instead of deletion followed by assignment.
+ * html/HTMLAreaElement.h: Use OwnArrayPtr.
+
+2009-08-17 Darin Adler <darin@apple.com>
+
+ Fix Windows build.
+
+ * dom/make_names.pl: Add back cast to (void*) needed on Windows.
+
+2009-08-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Move noResize from HTMLFrameElementBase to HTMLFrameElement
+ https://bugs.webkit.org/show_bug.cgi?id=28384
+
+ * html/HTMLFrameElement.cpp:
+ (WebCore::HTMLFrameElement::HTMLFrameElement): Initialize m_noResize.
+ (WebCore::HTMLFrameElement::parseMappedAttribute): Set m_noResize to true
+ here if noresizeAttr is changed. This code was moved here from
+ HTMLFrameElementBase, but I added some FIXME comments.
+ (WebCore::HTMLFrameElement::setNoResize): Set the attribute based on
+ boolean argument. Moved here from HTMLFrameElementBase.
+
+ * html/HTMLFrameElement.h: Moved noResize, setNoResize, and m_noResize
+ here from HTMLFrameElementBase.
+
+ * html/HTMLFrameElementBase.cpp:
+ (WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Removed m_noResize.
+ (WebCore::HTMLFrameElementBase::parseMappedAttribute): Removed code to parse
+ noresizeAttr.
+
+ * html/HTMLFrameElementBase.h: Removed noResize, setNoResize, and m_noResize.
+
+2009-08-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Tweak HTMLFrameElementBase so that m_URL can be private
+ https://bugs.webkit.org/show_bug.cgi?id=28385
+
+ * html/HTMLFrameElement.cpp:
+ (WebCore::HTMLFrameElement::rendererIsNeeded): Removed m_URL argument.
+ * html/HTMLFrameElementBase.cpp:
+ (WebCore::HTMLFrameElementBase::isURLAllowed): Use m_URL instead of
+ taking an argument.
+ (WebCore::HTMLFrameElementBase::openURL): Removed m_URL argument.
+ * html/HTMLFrameElementBase.h: Removed argument from isURLAllowed function.
+ * html/HTMLIFrameElement.cpp:
+ (WebCore::HTMLIFrameElement::rendererIsNeeded): Removed m_URL argument.
+
+2009-08-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ HTMLViewSourceDocument should use smart pointers
+ https://bugs.webkit.org/show_bug.cgi?id=28378
+
+ * html/HTMLViewSourceDocument.cpp:
+ (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument): Don't initialize
+ pointers any more since RefPtr starts 0 by default.
+ (WebCore::HTMLViewSourceDocument::createContainingTable): Use more specific
+ types for local variables.
+ (WebCore::HTMLViewSourceDocument::addSpanWithClassName): Return a PassRefPtr,
+ and use a RefPtr of a more specific type for a local variable.
+ (WebCore::HTMLViewSourceDocument::addLine): Use more specific types for local
+ variables, and use RefPtr as well.
+ (WebCore::HTMLViewSourceDocument::addLink): Return a PassRefPtr, and use a
+ RefPtr of a more specific type for a local variable.
+
+ * html/HTMLViewSourceDocument.h: Change return types to PassRefPtr and
+ data member types to RefPtr.
+
+2009-08-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ DOM attribute getter/setter functions should use const AtomicString& type
+ https://bugs.webkit.org/show_bug.cgi?id=25425
+
+ Convert 4 more classes. These are classes I am going to make other changes
+ to soon, so it's good to have this use of Reflect in the IDL out of the way.
+
+ * html/HTMLEmbedElement.idl: Use Reflect for many attributes.
+ * html/HTMLFrameElement.idl: Ditto.
+ * html/HTMLIFrameElement.idl: Ditto.
+ * html/HTMLObjectElement.idl: Ditto.
+
+2009-08-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Script to create element factory needs changes to accommodate calling create
+ https://bugs.webkit.org/show_bug.cgi?id=28379
+
+ * dom/make_names.pl: Tweak formatting. Remove lots of unneeded quotes
+ around names used inside {}. Added new createWithNew property for tags
+ that makes the factory use a create function instead of calling new.
+ Renamed functions with initialize in their name to have default in their
+ name, since they return an array full of default values and don't themselves
+ initialize anything.
+
+2009-08-16 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ StyledElement should use ASCIICType instead of having its own toHex function
+ https://bugs.webkit.org/show_bug.cgi?id=28377
+
+ * dom/StyledElement.cpp:
+ (WebCore::StyledElement::addCSSColor): Use isASCIIHexDigit and toASCIIHexValue.
+
+2009-08-16 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ execCommand("InsertHorizontalRule") inserts a broken <hr> element
+ https://bugs.webkit.org/show_bug.cgi?id=28375
+
+ * editing/EditorCommand.cpp:
+ (WebCore::executeInsertHorizontalRule): Create an HTMLHRElement
+ instead of just an HTMLElement.
+
+2009-08-16 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] <option> element & 'onpick' events - history navigation is broken
+ https://bugs.webkit.org/show_bug.cgi?id=28371
+
+ After selecting an option element with an 'onpick' event associated with a 'go' task,
+ the navigation is executed. When going back in history, the same 'onpick' event is fired
+ again. Fix that problem, add wml/option-element-onpick-recursion.html covering the bug.
+
+ Test: wml/option-element-onpick-recursion.html
+
+ * wml/WMLOptionElement.cpp:
+ (WebCore::WMLOptionElement::handleIntrinsicEventIfNeeded):
+ * wml/WMLSelectElement.cpp:
+ (WebCore::WMLSelectElement::WMLSelectElement):
+ (WebCore::WMLSelectElement::selectInitialOptions):
+ * wml/WMLSelectElement.h:
+ (WebCore::WMLSelectElement::initialized):
+
+2009-08-16 Anthony Ricaud <rik@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector Resource filtering: keyboard Navigation always uses ALL resources
+ https://bugs.webkit.org/show_bug.cgi?id=28231
+
+ Determine if a resource is selectable on user action.
+
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceSidebarTreeElement.prototype.get selectable):
+
+2009-08-16 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/28355> Replace MAX()/MIN() macros with type-safe std::max()/min() templates
+
+ Reviewed by Dan Bernstein.
+
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (AXAttributeStringSetSpelling): Changed MIN() to min().
+ * platform/graphics/mac/FontMacATSUI.mm:
+ (WebCore::Font::selectionRectForComplexText): Changed MAX() to
+ max() and MIN() to min().
+ (WebCore::Font::floatWidthForComplexText): Ditto.
+ * platform/graphics/mac/SimpleFontDataMac.mm: Added using
+ std::max statement.
+ (WebCore::SimpleFontData::platformInit): Changed MAX() to max().
+ * platform/text/mac/TextCodecMac.cpp:
+ (WebCore::TextCodecMac::decode): Changed MIN() to min().
+
+2009-08-16 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] Cleanup WMLIntrinsicEventHandling code
+ https://bugs.webkit.org/show_bug.cgi?id=28358
+
+ Remove superflous "Event* evt" parameter from executeTask() methods. It's a leftover from the initial WML merge.
+
+ * wml/WMLAnchorElement.cpp:
+ (WebCore::WMLAnchorElement::defaultEventHandler):
+ * wml/WMLDoElement.cpp:
+ (WebCore::WMLDoElement::defaultEventHandler):
+ * wml/WMLGoElement.cpp:
+ (WebCore::WMLGoElement::executeTask):
+ * wml/WMLGoElement.h:
+ * wml/WMLIntrinsicEventHandler.cpp:
+ (WebCore::WMLIntrinsicEventHandler::triggerIntrinsicEvent):
+ * wml/WMLPrevElement.cpp:
+ (WebCore::WMLPrevElement::executeTask):
+ * wml/WMLPrevElement.h:
+ * wml/WMLRefreshElement.cpp:
+ (WebCore::WMLRefreshElement::executeTask):
+ * wml/WMLRefreshElement.h:
+ * wml/WMLTaskElement.h:
+
+2009-08-16 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: A handful of DOMAgent-related fixes and cleanups.
+
+ - renamed elementId to nodeId in operations on nodes.
+ - added load listeners to frame owners in InspectorDOMAgent.
+ - removed InspectorController::inspectedWindowScriptObjectCleared event.
+ - preserved isViaInspector flag for 'via inspector' marker to survive styles update.
+ - removed contentDocument-related logic from ElementsPanel since it is handled in
+ the InspectorDOMAgent.
+ - removed DOM listeners unregistration and corresponding events from InspectorController.
+ - made this.styles 'private' in ElementsPanel.
+ - added TODO for the handleCopy processing.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28356
+
+ * WebCore.order:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::getChildNodes):
+ (WebCore::InspectorBackend::setTextNodeValue):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ * inspector/InspectorController.h:
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::startListening):
+ (WebCore::InspectorDOMAgent::stopListening):
+ (WebCore::InspectorDOMAgent::handleEvent):
+ (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
+ (WebCore::InspectorDOMAgent::getChildNodes):
+ (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
+ (WebCore::InspectorDOMAgent::setTextNodeValue):
+ (WebCore::InspectorDOMAgent::buildObjectForNode):
+ (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
+ (WebCore::InspectorDOMAgent::innerParentNode):
+ * inspector/InspectorDOMAgent.h:
+ * inspector/InspectorFrontend.cpp:
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMDocument.prototype.addEventListener):
+ (WebInspector.DOMDocument.prototype.removeEventListener):
+ (WebInspector.DOMDocument.prototype._fireDomEvent):
+ (WebInspector.DOMAgent.prototype.getChildNodesAsync.mycallback):
+ (WebInspector.DOMAgent.prototype.getChildNodesAsync):
+ (WebInspector.DOMAgent.prototype._setChildNodes):
+ (WebInspector.CSSStyleDeclaration.parseRule):
+ (WebInspector.childNodeInserted):
+ (WebInspector.childNodeRemoved):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel):
+ (WebInspector.ElementsPanel.prototype.reset):
+ (WebInspector.ElementsPanel.prototype.addStyleChange):
+ (WebInspector.ElementsPanel.prototype.removeStyleChange):
+ (WebInspector.ElementsPanel.prototype._updateModifiedNodes):
+ (WebInspector.ElementsPanel.prototype.updateBreadcrumb):
+ (WebInspector.ElementsPanel.prototype.handleCopyEvent):
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeOutline.prototype.set rootDOMNode):
+ (WebInspector.ElementsTreeOutline.prototype.findTreeElement):
+ (WebInspector.ElementsTreeElement):
+ (WebInspector.ElementsTreeElement.prototype._updateChildren.updateChildrenOfNode):
+ (WebInspector.ElementsTreeElement.prototype._updateChildren):
+ (WebInspector.ElementsTreeElement.prototype.onexpand):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.addStyleSelector):
+ (InjectedScript._serializeRule):
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertiesSection):
+ * inspector/front-end/inspector.js:
+ (WebInspector.set hoveredDOMNode):
+ * inspector/front-end/treeoutline.js:
+ (TreeOutline.prototype.findTreeElement):
+ * inspector/front-end/utilities.js:
+ (Node.prototype.enclosingNodeOrSelfWithNodeNameInArray):
+ (Node.prototype.enclosingNodeOrSelfWithClass):
+ (isAncestorNode):
+ (firstCommonNodeAncestor):
+ (traverseNextNode):
+ (traversePreviousNode):
+ ():
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::dispatchWindowObjectAvailable):
+ * page/android/InspectorControllerAndroid.cpp:
+
+2009-08-15 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt
+
+ Optimize updateFillImages() to not add/remove clients every time
+ https://bugs.webkit.org/show_bug.cgi?id=28334
+
+ Optimize the case where old and new just have a single layer pointing to the same (or no)
+ image.
+
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::updateFillImages):
+
+2009-08-15 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Implement animations of multiple text-shadows and -webkit-box-shadows.
+ https://bugs.webkit.org/show_bug.cgi?id=28266
+
+ Test: transitions/multiple-shadow-transitions.html
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::PropertyWrapperShadow::equals):
+ (WebCore::PropertyWrapperShadow::blend):
+
+2009-08-15 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Make transitions work for position and size of multiple backgrounds and masks.
+ https://bugs.webkit.org/show_bug.cgi?id=28266
+
+ Make background-position, background-size, -webkit-mask-position and -webkit-mask-size
+ properties animatable with multiple backgrounds, rather than just animating the first one.
+
+ Tests: transitions/multiple-background-size-transitions.html
+ transitions/multiple-background-transitions.html
+ transitions/multiple-mask-transitions.html
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::FillLayerPropertyWrapperBase::FillLayerPropertyWrapperBase):
+ (WebCore::FillLayerPropertyWrapperBase::~FillLayerPropertyWrapperBase):
+ (WebCore::FillLayerPropertyWrapperGetter::FillLayerPropertyWrapperGetter):
+ (WebCore::FillLayerPropertyWrapperGetter::equals):
+ (WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper):
+ (WebCore::FillLayerPropertyWrapper::blend):
+ (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
+ (WebCore::FillLayersPropertyWrapper::equals):
+ (WebCore::FillLayersPropertyWrapper::blend):
+ (WebCore::ensurePropertyMap):
+ * rendering/style/FillLayer.h:
+ (WebCore::FillLayer::setXPosition):
+ (WebCore::FillLayer::setYPosition):
+ (WebCore::FillLayer::setSize):
+
+2009-08-15 George Staikos <george.staikos@torchmobile.com>
+
+ Reviewed by Jan Alonzo.
+
+ Don't crash in fieldset code when WML is enabled.
+ https://bugs.webkit.org/show_bug.cgi?id=28012
+
+ Test: fast/wml/html-fieldset-crash.html
+
+ * rendering/RenderFieldset.cpp:
+ (WebCore::RenderFieldset::findLegend): ++brackets
+
+2009-08-15 Sam Weinig <sam@webkit.org>
+
+ Try and enable EventSource on Windows.
+
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+ * WebCore.vcproj/build-generated-files.sh:
+
+2009-08-15 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Setting attribute event listeners to the body does not set them on the window
+ https://bugs.webkit.org/show_bug.cgi?id=28343
+
+ Tests: fast/dom/Window/HTMLBodyElement-window-eventListener-attributes.html
+ fast/dom/Window/HTMLFrameSetElement-window-eventListener-attributes.html
+
+ * html/HTMLBodyElement.cpp:
+ (WebCore::HTMLBodyElement::setOnblur): Use setWindowAttributeEventListener instead of setAttributeEventListener.
+ (WebCore::HTMLBodyElement::setOnerror): Ditto.
+ (WebCore::HTMLBodyElement::setOnfocus): Ditto.
+ (WebCore::HTMLBodyElement::setOnload): Ditto.
+ (WebCore::HTMLBodyElement::setOnbeforeunload): Ditto.
+ (WebCore::HTMLBodyElement::setOnmessage): Ditto.
+ (WebCore::HTMLBodyElement::setOnoffline): Ditto.
+ (WebCore::HTMLBodyElement::setOnonline): Ditto.
+ (WebCore::HTMLBodyElement::setOnresize): Ditto.
+ (WebCore::HTMLBodyElement::setOnstorage): Ditto.
+ (WebCore::HTMLBodyElement::setOnunload): Ditto.
+ * html/HTMLFrameSetElement.cpp:
+ (WebCore::HTMLFrameSetElement::setOnblur): Ditto.
+ (WebCore::HTMLFrameSetElement::setOnerror): Ditto.
+ (WebCore::HTMLFrameSetElement::setOnfocus): Ditto.
+ (WebCore::HTMLFrameSetElement::setOnload): Ditto.
+ (WebCore::HTMLFrameSetElement::setOnbeforeunload): Ditto.
+ (WebCore::HTMLFrameSetElement::setOnmessage): Ditto.
+ (WebCore::HTMLFrameSetElement::setOnoffline): Ditto.
+ (WebCore::HTMLFrameSetElement::setOnonline): Ditto.
+ (WebCore::HTMLFrameSetElement::setOnresize): Ditto.
+ (WebCore::HTMLFrameSetElement::setOnstorage): Ditto.
+ (WebCore::HTMLFrameSetElement::setOnunload): Ditto.
+
+2009-08-15 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Fix up some IDL comments.
+
+ * html/HTMLBodyElement.idl:
+ * html/HTMLFrameSetElement.idl:
+
+2009-08-15 Adam Bergkvist <adam.bergkvist@ericsson.com>
+
+ Reviewed by Sam Weinig.
+
+ Added implementation of the EventSource object that enables
+ server-sent events from HTML5.
+ http://dev.w3.org/html5/eventsource/
+ https://bugs.webkit.org/show_bug.cgi?id=14997
+
+ Tests: fast/eventsource/eventsource-attribute-listeners.html
+ fast/eventsource/eventsource-constructor.html
+ http/tests/eventsource/eventsource-bad-mime-type.html
+ http/tests/eventsource/eventsource-parse-event-stream.html
+ http/tests/eventsource/eventsource-reconnect.html
+ http/tests/eventsource/eventsource-status-code-states.html
+ http/tests/eventsource/workers/eventsource-simple.html
+
+ * Configurations/FeatureDefines.xcconfig:
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::eventSource):
+ * bindings/js/JSEventSourceConstructor.cpp: Added.
+ (WebCore::):
+ (WebCore::JSEventSourceConstructor::JSEventSourceConstructor):
+ (WebCore::constructEventSource):
+ (WebCore::JSEventSourceConstructor::getConstructData):
+ * bindings/js/JSEventSourceConstructor.h: Added.
+ (WebCore::JSEventSourceConstructor::classInfo):
+ * bindings/js/JSEventSourceCustom.cpp: Added.
+ (WebCore::JSEventSource::markChildren):
+ (WebCore::JSEventSource::addEventListener):
+ (WebCore::JSEventSource::removeEventListener):
+ * bindings/js/JSEventTarget.cpp:
+ (WebCore::toJS):
+ (WebCore::toEventTarget):
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::eventSource):
+ * dom/EventNames.h:
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::toEventSource):
+ * dom/EventTarget.h:
+ * page/DOMWindow.idl:
+ * page/EventSource.cpp: Added.
+ (WebCore::EventSource::EventSource):
+ (WebCore::EventSource::~EventSource):
+ (WebCore::EventSource::connect):
+ (WebCore::EventSource::endRequest):
+ (WebCore::EventSource::scheduleReconnect):
+ (WebCore::EventSource::reconnectTimerFired):
+ (WebCore::EventSource::url):
+ (WebCore::EventSource::readyState):
+ (WebCore::EventSource::close):
+ (WebCore::EventSource::scriptExecutionContext):
+ (WebCore::EventSource::addEventListener):
+ (WebCore::EventSource::removeEventListener):
+ (WebCore::EventSource::dispatchEvent):
+ (WebCore::EventSource::didReceiveResponse):
+ (WebCore::EventSource::didReceiveData):
+ (WebCore::EventSource::didFinishLoading):
+ (WebCore::EventSource::didFail):
+ (WebCore::EventSource::didFailRedirectCheck):
+ (WebCore::EventSource::parseEventStream):
+ (WebCore::EventSource::parseEventStreamLine):
+ (WebCore::EventSource::dispatchGenericEvent):
+ (WebCore::EventSource::dispatchMessageEvent):
+ (WebCore::EventSource::stop):
+ * page/EventSource.h: Added.
+ (WebCore::EventSource::create):
+ (WebCore::EventSource::):
+ (WebCore::EventSource::setOnopen):
+ (WebCore::EventSource::onopen):
+ (WebCore::EventSource::setOnmessage):
+ (WebCore::EventSource::onmessage):
+ (WebCore::EventSource::setOnerror):
+ (WebCore::EventSource::onerror):
+ (WebCore::EventSource::toEventSource):
+ (WebCore::EventSource::eventListeners):
+ (WebCore::EventSource::refEventTarget):
+ (WebCore::EventSource::derefEventTarget):
+ * page/EventSource.idl: Added.
+ * workers/WorkerContext.idl:
+
+2009-08-15 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Minor DOMAgent bugfixes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28177
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::nodeForId):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMAgent):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
+
+2009-08-15 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Evaluating objects while on a breakpoint dumps string
+ representation instead of live object.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28280
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.completions.this._evalInInspectedWindow):
+ (WebInspector.ConsoleView.prototype.completions):
+ (WebInspector.ConsoleView.prototype._reportCompletions):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame.delayedEvaluation):
+ (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame):
+ (WebInspector.ScriptsPanel.prototype.variablesInSelectedCallFrame):
+
+2009-08-15 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Haiku] Adding two new files to WebCore/platform/haiku:
+ LocalizedStringsHaiku.cpp and LoggingHaiku.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=28129
+
+ * platform/haiku/LocalizedStringsHaiku.cpp: Added.
+ (WebCore::submitButtonDefaultLabel):
+ (WebCore::inputElementAltText):
+ (WebCore::resetButtonDefaultLabel):
+ (WebCore::defaultLanguage):
+ (WebCore::searchableIndexIntroduction):
+ (WebCore::fileButtonChooseFileLabel):
+ (WebCore::fileButtonNoFileSelectedLabel):
+ (WebCore::contextMenuItemTagOpenLinkInNewWindow):
+ (WebCore::contextMenuItemTagDownloadLinkToDisk):
+ (WebCore::contextMenuItemTagCopyLinkToClipboard):
+ (WebCore::contextMenuItemTagOpenImageInNewWindow):
+ (WebCore::contextMenuItemTagDownloadImageToDisk):
+ (WebCore::contextMenuItemTagCopyImageToClipboard):
+ (WebCore::contextMenuItemTagOpenFrameInNewWindow):
+ (WebCore::contextMenuItemTagCopy):
+ (WebCore::contextMenuItemTagGoBack):
+ (WebCore::contextMenuItemTagGoForward):
+ (WebCore::contextMenuItemTagStop):
+ (WebCore::contextMenuItemTagReload):
+ (WebCore::contextMenuItemTagCut):
+ (WebCore::contextMenuItemTagPaste):
+ (WebCore::contextMenuItemTagNoGuessesFound):
+ (WebCore::contextMenuItemTagIgnoreSpelling):
+ (WebCore::contextMenuItemTagLearnSpelling):
+ (WebCore::contextMenuItemTagSearchWeb):
+ (WebCore::contextMenuItemTagLookUpInDictionary):
+ (WebCore::contextMenuItemTagOpenLink):
+ (WebCore::contextMenuItemTagIgnoreGrammar):
+ (WebCore::contextMenuItemTagSpellingMenu):
+ (WebCore::contextMenuItemTagShowSpellingPanel):
+ (WebCore::contextMenuItemTagCheckSpelling):
+ (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
+ (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
+ (WebCore::contextMenuItemTagFontMenu):
+ (WebCore::contextMenuItemTagBold):
+ (WebCore::contextMenuItemTagItalic):
+ (WebCore::contextMenuItemTagUnderline):
+ (WebCore::contextMenuItemTagOutline):
+ (WebCore::contextMenuItemTagWritingDirectionMenu):
+ (WebCore::contextMenuItemTagDefaultDirection):
+ (WebCore::contextMenuItemTagLeftToRight):
+ (WebCore::contextMenuItemTagRightToLeft):
+ (WebCore::contextMenuItemTagInspectElement):
+ (WebCore::searchMenuNoRecentSearchesText):
+ (WebCore::searchMenuRecentSearchesText):
+ (WebCore::searchMenuClearRecentSearchesText):
+ (WebCore::unknownFileSizeText):
+ (WebCore::AXWebAreaText):
+ (WebCore::AXLinkText):
+ (WebCore::AXListMarkerText):
+ (WebCore::AXImageMapText):
+ (WebCore::AXHeadingText):
+ (WebCore::imageTitle):
+ (WebCore::contextMenuItemTagTextDirectionMenu):
+ (WebCore::AXButtonActionVerb):
+ (WebCore::AXTextFieldActionVerb):
+ (WebCore::AXRadioButtonActionVerb):
+ (WebCore::AXCheckedCheckBoxActionVerb):
+ (WebCore::AXUncheckedCheckBoxActionVerb):
+ (WebCore::AXLinkActionVerb):
+ (WebCore::AXDefinitionListTermText):
+ (WebCore::AXDefinitionListDefinitionText):
+ * platform/haiku/LoggingHaiku.cpp: Added.
+ (WebCore::InitializeLoggingChannelsIfNecessary):
+
+2009-08-15 Darin Adler <darin@apple.com>
+
+ Fix GTK build.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (fallbackObject): Pass 0 for document. Should be OK at least for now.
+
+2009-08-15 Darin Adler <darin@apple.com>
+
+ Fix Qt build.
+
+ * dom/XMLTokenizerQt.cpp: Use create functions instead of calling new
+ directly to make CDATASection and Comment nodes.
+
+2009-08-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Make DOM classes start with a reference count of 1, like all other RefCounted
+ https://bugs.webkit.org/show_bug.cgi?id=28068
+
+ First half, everything except for element classes.
+
+ * GNUmakefile.am: Removed DocPtr.h.
+ * WebCore.gypi: Ditto.
+ * WebCore.vcproj/WebCore.vcproj: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+
+ * dom/Attr.cpp:
+ (WebCore::Attr::Attr): Added a call to createTextChild here so callers don't
+ have to call it explicitly.
+ (WebCore::Attr::create): Added.
+ (WebCore::Attr::setValue): Changed to take AtomicString.
+ (WebCore::Attr::cloneNode): Use create.
+
+ * dom/Attr.h: Added a create function. Made the constructor private,
+ and a lot of other functions private as well.
+
+ * dom/Attribute.cpp:
+ (WebCore::Attribute::createAttrIfNeeded): Use Attr::create.
+
+ * dom/CDATASection.cpp:
+ (WebCore::CDATASection::create): Added.
+ (WebCore::CDATASection::cloneNode): Use create.
+ (WebCore::CDATASection::virtualCreate): Ditto.
+
+ * dom/CDATASection.h: Added a create function. Made everything private.
+ Removed unneeded destructor declaration.
+
+ * dom/CharacterData.cpp:
+ (WebCore::CharacterData::CharacterData): Replaced the multiple constructors
+ with a single one that takes ConstructionType.
+
+ * dom/CharacterData.h: Made more functions be protected and private.
+ Made m_data be private.
+
+ * dom/Comment.cpp:
+ (WebCore::Comment::Comment): Got rid of an extra constructor.
+ (WebCore::Comment::create): Added.
+ (WebCore::Comment::cloneNode): Call create.
+
+ * dom/Comment.h: Added a create function. Made everything private.
+
+ * dom/ContainerNode.cpp:
+ (WebCore::dispatchChildInsertionEvents): Use RefPtr instead of DocPtr.
+ (WebCore::dispatchChildRemovalEvents): Ditto.
+
+ * dom/ContainerNode.h: Made the constructor protected and passed
+ ConstructionType instead of an isElement boolean.
+
+ * dom/DocPtr.h: Removed.
+
+ * dom/Document.cpp:
+ (WebCore::Document::Document): Simplified the code that sets m_document
+ since it's no longer a smart pointer.
+ (WebCore::Document::removedLastRef): Use explicit calls to selfOnlyRef
+ and selfOnlyDeref instead of a DocPtr in here.
+ (WebCore::Document::~Document): Simplified the code that sets m_document
+ since it's no longer a smart pointer.
+ (WebCore::Document::createDocumentFragment): Call create.
+ (WebCore::Document::createTextNode): Ditto.
+ (WebCore::Document::createComment): Ditto.
+ (WebCore::Document::createCDATASection): Ditto.
+ (WebCore::Document::createProcessingInstruction): Ditto.
+ (WebCore::Document::createEntityReference): Ditto.
+ (WebCore::Document::createEditingTextNode): Ditto.
+ (WebCore::Document::importNode): Call Attr::create.
+ (WebCore::Document::createAttributeNS): Ditto.
+
+ * dom/Document.h: Call adoptRef. Made a lot of functions private and
+ protected and sorted them so public functions come first.
+
+ * dom/DocumentFragment.cpp:
+ (WebCore::DocumentFragment::create): Added.
+ (WebCore::DocumentFragment::cloneNode): Call create.
+ * dom/DocumentFragment.h: Added create.
+
+ * dom/DocumentType.cpp:
+ (WebCore::DocumentType::DocumentType): Pass type to Node constructor.
+ (WebCore::DocumentType::cloneNode): Use create.
+ * dom/DocumentType.h:
+ (WebCore::DocumentType::create): Call adoptRef.
+
+ * dom/EditingText.cpp:
+ (WebCore::EditingText::create): Added.
+ * dom/EditingText.h: Added a create function. Made everything private.
+
+ * dom/Element.cpp:
+ (WebCore::Element::Element): Pass CreateElementZeroRefCount to preserve
+ the zero reference count behavior for classes derived from Element.
+
+ * dom/EntityReference.cpp:
+ (WebCore::EntityReference::create): Added.
+ (WebCore::EntityReference::cloneNode): Call create.
+ * dom/EntityReference.h: Added create. Made everything private.
+
+ * dom/Node.cpp:
+ (WebCore::Node::initialRefCount): Added. Inline helper function for
+ the constructor.
+ (WebCore::Node::isContainer): Ditto.
+ (WebCore::Node::isElement): Ditto.
+ (WebCore::Node::isText): Ditto.
+ (WebCore::Node::Node): Changed to take a construction type argument.
+ Since m_document is now a normal pointer, added a call to selfOnlyRef.
+ (WebCore::Node::~Node): Ditto, but selfOnlyDeref.
+ (WebCore::Node::setDocument): Added selfOnlyRef/Deref calls.
+ (WebCore::Node::appendTextContent): Use the data function instead of
+ calling nodeValue functions, which do the same thing in a roundabout way.
+
+ * dom/Node.h: Made the constructor protected and replaced the multiple
+ arguments iwth a single ConstructionType argument. Sorted the public
+ things first.
+
+ * dom/Notation.h: Made most things private.
+ * dom/Notation.cpp: Removed extra constructor.
+
+ * dom/ProcessingInstruction.cpp:
+ (WebCore::ProcessingInstruction::create): Added.
+ (WebCore::ProcessingInstruction::cloneNode): Call create.
+ * dom/ProcessingInstruction.h: Added create function. Made many other
+ members private.
+
+ * dom/Range.cpp:
+ (WebCore::Range::processContents): Use DocumentFragment::create.
+
+ * dom/Text.cpp:
+ (WebCore::Text::Text): Updated for base class change.
+ (WebCore::Text::create): Added.
+ (WebCore::Text::splitText): Changed to not require access to m_data.
+ (WebCore::Text::cloneNode): Call create.
+ (WebCore::Text::createRenderer): Call dataImpl.
+ (WebCore::Text::attach): Call data.
+ (WebCore::Text::recalcStyle): Call dataImpl.
+ (WebCore::Text::virtualCreate): Call create.
+ (WebCore::Text::createWithLengthLimit): Call create.
+ (WebCore::Text::formatForDebugger): Call data.
+
+ * dom/Text.h: Added a create function. Made many other members private.
+ Renamed createNew to virtualCreate.
+
+ * dom/XMLTokenizer.cpp:
+ (WebCore::XMLTokenizer::enterText): Call Text::create.
+
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::XMLTokenizer::cdataBlock): Call CDATASection::create.
+ (WebCore::XMLTokenizer::comment): Call Comment::create.
+
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::CompositeEditCommand::deleteInsignificantText):
+ Call data instead of string.
+
+ * editing/CreateLinkCommand.cpp:
+ (WebCore::CreateLinkCommand::doApply): Call Text::create.
+
+ * editing/EditorCommand.cpp:
+ (WebCore::executeInsertNode): Call DocumentFragment::create.
+
+ * editing/SplitTextNodeCommand.cpp:
+ (WebCore::SplitTextNodeCommand::doApply): Call Text::create.
+
+ * editing/markup.cpp:
+ (WebCore::appendStartMarkup): Call data instead of nodeValue.
+
+ * html/HTMLDocument.h:
+ (WebCore::HTMLDocument::create): Call adoptRef.
+
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::createContextualFragment): Call DocumentFragment::create.
+ (WebCore::replaceChildrenWithFragment): Call data instead of string.
+ (WebCore::replaceChildrenWithText): Call Text::create.
+ (WebCore::HTMLElement::setInnerText): Call DocumentFragment::create and
+ Text::create.
+ (WebCore::HTMLElement::setOuterText): Call Text::create.
+
+ * html/HTMLKeygenElement.cpp:
+ (WebCore::HTMLKeygenElement::HTMLKeygenElement): Call Text::create.
+
+ * html/HTMLOptionElement.cpp:
+ (WebCore::HTMLOptionElement::setText): Call Text::create.
+
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::textCreateErrorCheck): Call Text::create.
+ (WebCore::HTMLParser::commentCreateErrorCheck): Call Comment::create.
+ (WebCore::HTMLParser::handleIsindex): Call Text::create.
+
+ * html/HTMLViewSourceDocument.cpp:
+ (WebCore::HTMLViewSourceDocument::addText): Call Text::create.
+
+ * html/HTMLViewSourceDocument.h:
+ (WebCore::HTMLViewSourceDocument::create): Call adoptRef.
+
+ * loader/FTPDirectoryDocument.cpp:
+ (WebCore::FTPDirectoryTokenizer::appendEntry): Call Text::create.
+ (WebCore::FTPDirectoryTokenizer::createTDForFilename): Call Text::create.
+
+ * loader/FTPDirectoryDocument.h:
+ (WebCore::FTPDirectoryDocument::create): Call adoptRef.
+ * loader/ImageDocument.h:
+ (WebCore::ImageDocument::create): Ditto.
+ * loader/MediaDocument.h:
+ (WebCore::MediaDocument::create): Ditto.
+ * loader/PlaceholderDocument.h:
+ (WebCore::PlaceholderDocument::create): Ditto.
+ * loader/PluginDocument.h:
+ (WebCore::PluginDocument::create): Ditto.
+ * loader/TextDocument.h:
+ (WebCore::TextDocument::create): Ditto.
+
+ * loader/loader.cpp:
+ (WebCore::Loader::Host::didFinishLoading): Use RefPtr instead of DocPtr.
+ (WebCore::Loader::Host::didFail): Ditto.
+
+ * platform/TreeShared.h:
+ (WebCore::TreeShared::TreeShared): Added an initialRefCount argument,
+ defaulting to 1. Node still sometimes initializes it to 0 instead for now.
+
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::originalText): Use dataImpl instead of string.
+
+ * rendering/RenderTextFragment.cpp:
+ (WebCore::RenderTextFragment::originalText): Use dataImpl instead of string.
+ (WebCore::RenderTextFragment::previousCharacter): Ditto.
+
+ * svg/SVGDocument.h:
+ (WebCore::SVGDocument::create): Use adoptRef.
+
+ * svg/SVGElementInstance.cpp:
+ (WebCore::SVGElementInstance::SVGElementInstance): Updated to take a
+ PassRefPtr.
+
+ * svg/SVGElementInstance.h: Made everything private.
+
+ * wml/WMLDocument.h:
+ (WebCore::WMLDocument::create): Called adoptRef.
+
+ * xml/XPathNamespace.cpp:
+ (WebCore::XPathNamespace::XPathNamespace): Take AtomicString arguments.
+ * xml/XPathNamespace.h: Made everything private.
+
+ * xml/XSLTProcessor.cpp:
+ (WebCore::createFragmentFromSource): Use DocumentFragment::create and
+ Text::create.
+
+2009-08-13 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Part of <rdar://problem/6218721> No MSAA focus events fired for Webkit
+ nightly (20866)
+
+ https://bugs.webkit.org/show_bug.cgi?id=20866
+
+ Reviewed by Oliver Hunt.
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::AXObjectCache):
+ Changed to take a pointer to its owner document. This is used by
+ AXObjectCache::handleFocusedUIElementChanged().
+ (WebCore::AXObjectCache::focusedUIElementForPage):
+ Code moved from AccessibilityRenderObject::focusedUIElement(). Modified
+ to be a static function and to take a pointer to a Page.
+ (WebCore::AXObjectCache::platformGenerateAXID):
+ Moved the code to generate the next AXID from getAXID() to here. Added
+ a #if to make this non-WIN only, because Windows has its own
+ implementation.
+ (WebCore::AXObjectCache::getAXID):
+ Ensure that we generate a positive AXID, ranging from 1 to LONG_MAX.
+
+ * accessibility/AXObjectCache.h:
+ Add a declaration for Document and Page. Removed the declaration of
+ AccessibilityObject, because we include the header. Reordered the
+ declaration of Node alphabetically. Moved the typedef for AXID to
+ AccessibilityObject. Removed some trailing whitespace. Added a member
+ variable to hold a pointer to the owner Document.
+ (WebCore::AXObjectCache::AXObjectCache):
+ Changed to take a pointer to its owner Document.
+ (WebCore::AXObjectCache::focusedUIElementForPage):
+ Added; code moved from AccessiblityRenderObject::focusedUIElement().
+ Returns the focused element with respect to accessibility.
+ (WebCore::AXObjectCache::platformGenerateAXID):
+ Declare a function to generate an AXID.
+ (WebCore::AXObjectCache::objectFromAXID):
+ Return the AccessibilityObject with the given AXID.
+
+ * accessibility/AccessibilityObject.h:
+ Moved the typedef for AXID from AXObjectCache to here. Made the m_id
+ member use the typedef.
+ (WebCore::AccessibilityObject::axObjectID):
+ Changed the return type to use the typedef.
+ (WebCore::AccessibilityObject::setAXObjectID):
+ Changed the argument type to use the typedef.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ Removed some unneeded #includes.
+ (WebCore::AccessibilityRenderObject::focusedUIElement):
+ Moved the code to AXObjectCache::focusedUIElementForPage(), which we now
+ call.
+
+ * accessibility/win/AXObjectCacheWin.cpp:
+ (WebCore::AXObjectCache::platformGenerateAXID):
+ Ensure that we generate an AXID that is in the range 1 to LONG_MAX.
+ (WebCore::AXObjectCache::handleFocusedUIElementChanged):
+ If the Document has no Page, return. If the Page has not focused
+ element (respecting accessibility), return. Assert that the
+ accessibility of the focused element is not ignored, and that the
+ object's AXID will be negative and fit into a LONG when negated.
+ Broadcast a focus event for the object.
+
+ * dom/Document.cpp:
+ (WebCore::Document::axObjectCache):
+ Pass this when creating the AXObjectCache.
+ (WebCore::Document::setFocusedNode):
+ Call AXObjectCache::handleFocusedUIElementChanged() on Windows.
+
+2009-08-14 Jiahua Huang <jhuangjiahua@gmail.com>
+
+ Reviewed by Jan Alonzo.
+
+ [gtk] Pasteboard/GtkClipboard can't handle the "text/html" target.
+ https://bugs.webkit.org/show_bug.cgi?id=27028
+
+ Remove the improper set of enum WebKitWebViewTargetInfo
+ by grabbing the target infos via m_helper.
+
+ * manual-tests/gtk/copy-htmltext.html: Added.
+ * platform/Pasteboard.h:
+ * platform/gtk/PasteboardGtk.cpp:
+ (WebCore::clipboard_get_contents_cb):
+ * platform/gtk/PasteboardHelper.h:
+
+2009-08-14 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Fix an assertion when bringing up the Inspector.
+ https://bugs.webkit.org/show_bug.cgi?id=28318
+
+ The fix for bug 28295 assumed that image clients count the number of times
+ addClient/removeClient is called. That was true for CachedResource clients,
+ but not StyleGeneratedImage clients, which pass the call onto CSSImageGeneratorValue.
+
+ Fix by making CSSImageGeneratorValue count the number of times a client is
+ added/removed.
+
+ * css/CSSCanvasValue.cpp:
+ (WebCore::CSSCanvasValue::canvasChanged):
+ (WebCore::CSSCanvasValue::canvasResized):
+ * css/CSSImageGeneratorValue.cpp:
+ (WebCore::CSSImageGeneratorValue::addClient):
+ (WebCore::CSSImageGeneratorValue::removeClient):
+ (WebCore::CSSImageGeneratorValue::getImage):
+ * css/CSSImageGeneratorValue.h:
+
+2009-08-14 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Kevin Ollivier.
+
+ Correct libcurl crash when downloading local files.
+ https://bugs.webkit.org/show_bug.cgi?id=28312
+
+ No new tests. Test is covered by fast/encoding/char-encoding-mac.html.
+
+ * platform/network/curl/ResourceHandleManager.cpp:
+ (WebCore::handleLocalReceiveResponse): New static function that
+ performs the local setting of valid URL and firing didReceiveResponse.
+ This code was moved from writeCallback.
+ (WebCore::writeCallback): Move local file handling to static function
+ (above) and use the function instead.
+ (WebCore::readCallback): Add check
+ for responseFired, and handle as a local file if it was not.
+
+2009-08-14 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Oliver Hunt.
+
+ [Haiku] Fix RenderThemeHaiku build.
+ https://bugs.webkit.org/show_bug.cgi?id=28307
+
+ * platform/haiku/RenderThemeHaiku.cpp: Included RenderThemeHaiku.h
+ instead of RenderTheme.h.
+ (WebCore::RenderThemeHaiku::paintCheckbox): Removed the wrong 'virtual'
+ before the function.
+ (WebCore::RenderThemeHaiku::paintRadio): Removed the wrong 'virtual'
+ before the function.
+ * platform/haiku/RenderThemeHaiku.h: Corrected wrong function definitions.
+
+2009-08-14 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Oliver Hunt.
+
+ [Haiku] Adding SharedBufferHaiku to WebCore.
+ https://bugs.webkit.org/show_bug.cgi?id=28309
+
+ * platform/haiku/SharedBufferHaiku.cpp: Added.
+ (WebCore::SharedBuffer::createWithContentsOfFile):
+ * platform/haiku/TemporaryLinkStubs.cpp: Removed unnecessary headers
+ and functions.
+ (WebCore::signedPublicKeyAndChallengeString):
+ (WebCore::getSupportedKeySizes):
+
+2009-08-14 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Ensure we're getting the right v8 context in the V8 DOMWindowEvent custom getter.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28311
+
+ This should fix Chromium failing LayoutTests/fast/events/set-event-in-another-frame.html.
+
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+
+2009-08-14 Aaron Boodman <aa@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ BUG 28134: Move the remaining parts of Access Control from XMLHttpRequest to ThreadableDocumentLoader.
+ https://bugs.webkit.org/show_bug.cgi?id=28134
+
+ No new tests added since Access Control was already well tested and this is a pure refactor.
+
+ * loader/DocumentThreadableLoader.cpp: Move a lot of the access control code from XHR in, preserving its
+ basic strategy. Also, modify the synchronous path to not be a special case, but reuse more of the async
+ path.
+
+ (WebCore::DocumentThreadableLoader::loadResourceSynchronously): Go through the async path and pass additional flags.
+ (WebCore::DocumentThreadableLoader::create): Group enum params into an options struct.
+ (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Ditto.
+ (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest): Brought mostly from XHR.
+ (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight): Ditto.
+ (WebCore::DocumentThreadableLoader::willSendRequest): Handle preflight case.
+ (WebCore::DocumentThreadableLoader::didReceiveResponse): Ditto.
+ (WebCore::DocumentThreadableLoader::didFinishLoading): Ditto.
+ (WebCore::DocumentThreadableLoader::getShouldUseCredentialStorage): Ditto.
+ (WebCore::DocumentThreadableLoader::preflightSuccess): Preflight handling.
+ (WebCore::DocumentThreadableLoader::preflightFailure): Ditto.
+ (WebCore::DocumentThreadableLoader::loadRequest): Common request function that handles async/sync.
+ * loader/DocumentThreadableLoader.h: Group enum params into an options struct.
+ * loader/ThreadableLoader.cpp: Ditto.
+ (WebCore::ThreadableLoader::create): Ditto.
+ (WebCore::ThreadableLoader::loadResourceSynchronously): Ditto.
+ * loader/ThreadableLoader.h: Ditto.
+ (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Ditto.
+ * loader/WorkerThreadableLoader.cpp: Ditto.
+ (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):Ditto.
+ (WebCore::WorkerThreadableLoader::loadResourceSynchronously): Ditto.
+ (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Ditto.
+ (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader): Ditto.
+ * loader/WorkerThreadableLoader.h: Ditto.
+ (WebCore::WorkerThreadableLoader::create): Ditto.
+ * platform/CrossThreadCopier.h: Allow ThreadableLoaderOptions to be copied across threads.
+ (WebCore::):
+ * workers/WorkerScriptLoader.cpp: More enum->struct grouping.
+ (WebCore::WorkerScriptLoader::loadSynchronously): More enum->struct grouping.
+ (WebCore::WorkerScriptLoader::loadAsynchronously): More enum->struct grouping.
+ * xml/XMLHttpRequest.cpp: Remove all the access control code and some supporting state.
+ (WebCore::XMLHttpRequest::XMLHttpRequest): Ditto.
+ (WebCore::XMLHttpRequest::createRequest): Ditto.
+ (WebCore::XMLHttpRequest::didFinishLoading): Ditto.
+ (WebCore::XMLHttpRequest::didReceiveResponse): Ditto.
+ (WebCore::XMLHttpRequest::didReceiveData): Ditto.
+ * xml/XMLHttpRequest.h: Ditto.
+
+2009-08-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Rename the confusing isObject(<class>) to inherits(<class>).
+ It still works on non-objects, returning false.
+
+ * bindings/js/JSEventTarget.cpp:
+ (WebCore::toEventTarget):
+ * bindings/js/JSGeolocationCustom.cpp:
+ (WebCore::createPositionCallback):
+ (WebCore::createPositionErrorCallback):
+ * bindings/js/JSNodeFilterCustom.cpp:
+ (WebCore::toNodeFilter):
+ * bindings/js/JSXMLHttpRequestCustom.cpp:
+ (WebCore::JSXMLHttpRequest::send):
+ * bindings/js/JSXSLTProcessorCustom.cpp:
+ (WebCore::JSXSLTProcessor::importStylesheet):
+ (WebCore::JSXSLTProcessor::transformToFragment):
+ (WebCore::JSXSLTProcessor::transformToDocument):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bridge/objc/objc_runtime.mm:
+ (JSC::Bindings::callObjCFallbackObject):
+ * bridge/runtime_method.cpp:
+ (JSC::callRuntimeMethod):
+ Updated to new name, inherits, from old name, isObject.
+
+2009-08-14 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Allow Qt API to list and to remove URL schemes that were registered as
+ local URL schemes.
+ [Qt] Allow applications to register their own local URL scheme.
+ https://bugs.webkit.org/show_bug.cgi?id=28240
+
+ * page/SecurityOrigin.cpp:
+ (WebCore::SecurityOrigin::removeURLSchemeRegisteredAsLocal):
+ (WebCore::SecurityOrigin::localURLSchemes):
+ * page/SecurityOrigin.h:
+
+2009-08-14 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Wrap console objects late (in the frontend) so that injected
+ script was already in place.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28297
+
+ * inspector/ConsoleMessage.cpp:
+ (WebCore::ConsoleMessage::ConsoleMessage):
+ * inspector/ConsoleMessage.h:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::addMessageToConsole):
+ (WebCore::InspectorController::startGroup):
+ (WebCore::InspectorController::setFrontendProxyObject):
+ * inspector/InspectorController.h:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::InspectorFrontend):
+ (WebCore::InspectorFrontend::addMessageToConsole):
+ * inspector/InspectorFrontend.h:
+
+2009-08-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix logic in RenderObject::updateFillImages() that led to incorrect client
+ counts if an image was used twice in the background-image property.
+ https://bugs.webkit.org/show_bug.cgi?id=28295
+
+ Test: fast/backgrounds/multiple-backgrounds-assert.html
+
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::updateFillImages):
+ Simplify the logic to call addClient()/removeClient() for every background
+ image, but go through the new layers first to avoid removing all the
+ clients of an image.
+
+2009-08-13 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Devirtualise marking
+ https://bugs.webkit.org/show_bug.cgi?id=28294
+
+ Make sure we override the JSObject createStructure method on those
+ objects that have custom marking routines.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+
+2009-08-13 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Follow-up to earlier work to remove dependencies on JavaScriptCore.
+
+ * ForwardingHeaders/parser/Parser.h: Removed.
+ * inspector/JavaScriptDebugServer.cpp: Removed now-unneeded includes
+ of Parser.h.
+
+2009-08-13 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ 'box-orient: block-axis' behaves like 'box-orient: horizontal', causes
+ an assertion failure in debug builds
+ https://bugs.webkit.org/show_bug.cgi?id=28279
+
+ Test: fast/flexbox/block-axis.html
+
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::operator EBoxOrient): Map block-axis to
+ vertical.
+
+2009-08-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix crash when removing reflection on an absolutely-positioned image.
+ https://bugs.webkit.org/show_bug.cgi?id=28289
+
+ Make sure we clean up the reflection layer when removing the reflection,
+ so that the RenderLayer tree does not contain pointers to deleted layers.
+
+ Test: fast/reflections/reflected-img-crash.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::~RenderLayer):
+ (WebCore::RenderLayer::styleChanged):
+ (WebCore::RenderLayer::removeReflection):
+ * rendering/RenderLayer.h:
+
+2009-08-13 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ misalignment because of float:left of <div> tag
+ https://bugs.webkit.org/show_bug.cgi?id=15869
+
+ One section of http://edgar.sec.gov site draws to the right of the rest
+ of the content
+ <rdar://problem/7135951>
+
+ Tests: fast/block/float/avoidance-percent-width-compat.html
+ fast/block/float/avoidance-percent-width-strict.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::getClearDelta): Changed to apply the same float
+ avoidance logic in strict mode and in compatibility mode, which
+ matches Firefox and IE. Changed to compute and use the computed
+ width of the child, instead of ignoring non-fixed widths.
+
+2009-08-13 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Adler.
+
+ Geolocation PositionOptions does not use correct default values.
+ https://bugs.webkit.org/show_bug.cgi?id=27254
+
+ Sets the correct default values for the properties of the PositionOptions object
+ passed to Geolocation methods. See http://www.w3.org/TR/geolocation-API/.
+
+ Also adds checking to throw an exception if arguments of the incorrect type are
+ passed to Geolocation methods. Adds a layout test to test this. This test should
+ pass on all platforms where Geolocation is implemented.
+
+ Test: fast/dom/Geolocation/argument-types.html
+
+ * bindings/js/JSGeolocationCustom.cpp:
+ (WebCore::createPositionCallback): Added. Creates the callback.
+ (WebCore::createPositionErrorCallback): Added. Creates the calback.
+ (WebCore::createPositionOptions): Added. Creates the PositionOptions object, setting defaults where required.
+ (WebCore::JSGeolocation::getCurrentPosition): Modified. Now uses above helper functions.
+ (WebCore::JSGeolocation::watchPosition): Modified. Now uses above helper functions.
+ * page/Geolocation.cpp:
+ (WebCore::Geolocation::GeoNotifier::GeoNotifier): Modified. Asserts that PositionOptions object is present.
+ (WebCore::Geolocation::GeoNotifier::startTimer): Modified. Only starts timer if timeout has been set.
+ * page/PositionOptions.h:
+ (WebCore::PositionOptions::create): Modified. Creates object with default values.
+ (WebCore::PositionOptions::timeout): Modified. Uses correct type.
+ (WebCore::PositionOptions::hasTimeout): Added. Determines whether a timeout has been set.
+ (WebCore::PositionOptions::setTimeout): Modified. Uses correct type.
+ (WebCore::PositionOptions::maximumAge): Modified. Uses correct type.
+ (WebCore::PositionOptions::setMaximumAge): Modified. Uses correct type.
+ (WebCore::PositionOptions::PositionOptions): Modified. Creates object with default values.
+
+2009-08-13 David Levin <levin@chromium.org>
+
+ Unreviewed chromium build fix.
+
+ [Chromium] Let CodeGeneratorV8.pm know that RGBColor is ref-counted.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+
+2009-08-13 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ Merge error in SharedWorker code
+ https://bugs.webkit.org/show_bug.cgi?id=28277
+
+ Fixed merge error that prevents WebKit from compiling with SHARED_WORKERS enabled.
+ No new tests needed.
+
+ * workers/DefaultSharedWorkerRepository.cpp:
+ Removed duplicated functions.
+
+2009-08-13 Kyle Prete <kylep@chromium.org>
+
+ Reviewed by Dave Levin.
+
+ Chromium: Show a "Playback Disabled" button on media error.
+ https://bugs.webkit.org/show_bug.cgi?id=28196
+ Use a disabled play button when the media file cannot be played.
+
+ No new tests needed. Covered by LayoutTests/media/video-empty-source.html
+
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::paintMediaPlayButton):
+
+2009-08-13 Mark Rowe <mrowe@apple.com>
+
+ Try and fix the Qt build.
+
+ * bridge/qt/qt_runtime.cpp:
+
+2009-08-13 Zan Dobersek <zandobersek@gmail.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] Drag and drop support
+ https://bugs.webkit.org/show_bug.cgi?id=23642
+
+ Utilizes functions that are being called upon drag and drop actions.
+ Uses different GTK clipboards that hold different types
+ of drag data - images, HTML markup, text, URL, URL label.
+ Also clears each clipboard before setting new data to it.
+
+ No new tests - despite some implementations, no new functionality
+ is added until implementations of the GTK drag and drop protocol
+ in WebKit part.
+
+ * platform/gtk/ClipboardGtk.cpp:
+ (WebCore::ClipboardGtk::ClipboardGtk):
+ (WebCore::ClipboardGtk::~ClipboardGtk):
+ (WebCore::getCachedImage):
+ (WebCore::ClipboardGtk::declareAndWriteDragImage):
+ (WebCore::ClipboardGtk::writeURL):
+ (WebCore::ClipboardGtk::writeRange):
+ * platform/gtk/ClipboardGtk.h: ClipboardGdk -> ClipboardGtk
+
+2009-08-13 Darin Adler <darin@apple.com>
+
+ Reviewed by David Levin.
+
+ JavaScriptCore tweaks to get ready for the parser arena
+ https://bugs.webkit.org/show_bug.cgi?id=28243
+
+ * ForwardingHeaders/runtime/CollectorHeapIterator.h: Removed.
+
+ * WebCore.xcodeproj/project.pbxproj: Exposed a couple header
+ files as Private that are now needed to compile Mac WebKit.
+
+ * bindings/js/JSAudioConstructor.cpp:
+ * bindings/js/JSDOMBinding.cpp:
+ * bindings/js/JSDOMBinding.h:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ * bindings/js/JSHTMLInputElementCustom.cpp:
+ * bindings/js/JSHistoryCustom.cpp:
+ * bindings/js/JSImageConstructor.cpp:
+ * bindings/js/JSLazyEventListener.cpp:
+ * bindings/js/JSLocationCustom.cpp:
+ * bindings/js/JSMessageChannelConstructor.cpp:
+ * bindings/js/JSOptionConstructor.cpp:
+ * bindings/js/JSWebSocketConstructor.cpp:
+ * bindings/js/JSWebSocketCustom.cpp:
+ * bindings/js/JSWorkerConstructor.cpp:
+ * bindings/js/JSXMLHttpRequestConstructor.cpp:
+ * bridge/jni/jni_jsobject.mm:
+ Updated includes.
+
+ * inspector/JavaScriptDebugServer.cpp:
+ (WebCore::JavaScriptDebugServer::sourceParsed):
+ Change to not assert if this is called with no listeners.
+ I don't think this was guaranteed before, and we now use
+ this code path when recompiling. Slightly less efficient,
+ but this is a one-time cost when turning on the debugger.
+ (WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
+ Change to call Debugger::recompileAllJSFunctions.
+
+2009-08-13 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ <rdar://problem/7138591> and https://bugs.webkit.org/show_bug.cgi?id=28260
+ onhashchange property cannot be set from javascript.
+
+ Test: fast/loader/onhashchange-attribute-listeners.html
+
+ * html/HTMLBodyElement.cpp:
+ (WebCore::HTMLBodyElement::onhashchange):
+ (WebCore::HTMLBodyElement::setOnhashchange):
+ * html/HTMLBodyElement.h:
+ * html/HTMLBodyElement.idl:
+
+ * html/HTMLFrameSetElement.cpp:
+ (WebCore::HTMLFrameSetElement::onhashchange):
+ (WebCore::HTMLFrameSetElement::setOnhashchange):
+ * html/HTMLFrameSetElement.h:
+ * html/HTMLFrameSetElement.idl:
+
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::onhashchange):
+ (WebCore::DOMWindow::setOnhashchange):
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl:
+
+2009-08-13 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Fix leaks of RGBColor instances from below SVGColor::rgbColor.
+
+ * svg/SVGColor.cpp:
+ (WebCore::SVGColor::rgbColor): Return a PassRefPtr to ensure that the newly-allocated
+ RGBColor is cleaned up by the caller.
+ * svg/SVGColor.h:
+
+2009-08-13 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Migrate to DOMAgent (serialized access to DOM).
+
+ https://bugs.webkit.org/show_bug.cgi?id=28177
+
+ * bindings/js/JSInspectorBackendCustom.cpp:
+ (WebCore::JSInspectorBackend::highlightDOMNode):
+ (WebCore::JSInspectorBackend::nodeForId):
+ (WebCore::JSInspectorBackend::idForNode):
+ (WebCore::JSInspectorBackend::wrapObject):
+ (WebCore::JSInspectorBackend::unwrapObject):
+ (WebCore::JSInspectorBackend::pushNodePathToFrontend):
+ (WebCore::JSInspectorBackend::selectDatabase):
+ (WebCore::JSInspectorBackend::selectDOMStorage):
+ * bindings/js/ScriptObjectQuarantine.cpp:
+ (WebCore::getQuarantinedScriptObject):
+ * bindings/js/ScriptObjectQuarantine.h:
+ * bindings/js/ScriptValue.cpp:
+ (WebCore::ScriptValue::isObject):
+ * bindings/js/ScriptValue.h:
+ * bindings/v8/ScriptObjectQuarantine.cpp:
+ (WebCore::getQuarantinedScriptObject):
+ * bindings/v8/ScriptObjectQuarantine.h:
+ * bindings/v8/ScriptValue.h:
+ (WebCore::ScriptValue::isObject):
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8InspectorBackendCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * inspector/ConsoleMessage.cpp:
+ (WebCore::ConsoleMessage::ConsoleMessage):
+ * inspector/ConsoleMessage.h:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::clearMessages):
+ (WebCore::InspectorBackend::loaded):
+ (WebCore::InspectorBackend::highlight):
+ (WebCore::InspectorBackend::nodeForId):
+ (WebCore::InspectorBackend::idForNode):
+ (WebCore::InspectorBackend::wrapObject):
+ (WebCore::InspectorBackend::unwrapObject):
+ (WebCore::InspectorBackend::pushNodePathToFrontend):
+ (WebCore::InspectorBackend::addNodesToSearchResult):
+ (WebCore::InspectorBackend::selectDatabase):
+ (WebCore::InspectorBackend::selectDOMStorage):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::InspectorController):
+ (WebCore::InspectorController::focusNode):
+ (WebCore::InspectorController::addMessageToConsole):
+ (WebCore::InspectorController::clearConsoleMessages):
+ (WebCore::InspectorController::startGroup):
+ (WebCore::InspectorController::scriptObjectReady):
+ (WebCore::InspectorController::setFrontendProxyObject):
+ (WebCore::InspectorController::close):
+ (WebCore::InspectorController::didCommitLoad):
+ (WebCore::InspectorController::wrapObject):
+ (WebCore::InspectorController::unwrapObject):
+ * inspector/InspectorController.h:
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::setDocument):
+ (WebCore::InspectorDOMAgent::handleEvent):
+ (WebCore::InspectorDOMAgent::pushDocumentToFrontend):
+ (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
+ (WebCore::InspectorDOMAgent::nodeForId):
+ (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
+ (WebCore::InspectorDOMAgent::buildObjectForNode):
+ (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
+ (WebCore::InspectorDOMAgent::innerParentElement):
+ * inspector/InspectorDOMAgent.h:
+ * inspector/InspectorDOMStorageResource.cpp:
+ (WebCore::InspectorDOMStorageResource::bind):
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::clearConsoleMessages):
+ (WebCore::InspectorFrontend::updateFocusedNode):
+ (WebCore::InspectorFrontend::setDocument):
+ (WebCore::InspectorFrontend::selectDatabase):
+ (WebCore::InspectorFrontend::selectDOMStorage):
+ (WebCore::InspectorFrontend::addNodesToSearchResult):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.clearMessages):
+ (WebInspector.ConsoleView.prototype.completions):
+ (WebInspector.ConsoleView.prototype._reportCompletions):
+ (WebInspector.ConsoleView.prototype._messagesClicked):
+ (WebInspector.ConsoleView.prototype.doEvalInWindow.evalCallback):
+ (WebInspector.ConsoleView.prototype.doEvalInWindow):
+ (WebInspector.ConsoleView.prototype._format):
+ (WebInspector.ConsoleView.prototype._formatfunction):
+ (WebInspector.ConsoleView.prototype._formatdate):
+ (WebInspector.ConsoleView.prototype._formatregexp):
+ (WebInspector.ConsoleView.prototype._formatnode):
+ (WebInspector.ConsoleView.prototype._formatobject):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMNode):
+ (WebInspector.DOMNode.prototype._renumber):
+ (WebInspector.DOMDocument):
+ (WebInspector.DOMAgent):
+ (WebInspector.DOMAgent.prototype.getChildNodesAsync):
+ (WebInspector.DOMAgent.prototype.setAttributeAsync):
+ (WebInspector.DOMAgent.prototype.removeAttributeAsync):
+ (WebInspector.DOMAgent.prototype.setTextNodeValueAsync):
+ (WebInspector.DOMAgent.prototype.nodeForId):
+ (WebInspector.DOMAgent.prototype._setDocument):
+ (WebInspector.DOMAgent.prototype._setChildNodes):
+ (WebInspector.DOMAgent.prototype._bindNodes):
+ (WebInspector.DOMAgent.prototype._childNodeInserted):
+ (WebInspector.CSSStyleDeclaration):
+ (WebInspector.CSSStyleDeclaration.parseRule):
+ (WebInspector.setDocument):
+ (InspectorController.getStyles):
+ (InspectorController.getComputedStyle):
+ (InspectorController.getInlineStyle):
+ (InspectorController.applyStyleText):
+ (InspectorController.setStyleText):
+ (InspectorController.toggleStyleEnabled):
+ (InspectorController.applyStyleRuleText):
+ (InspectorController.addStyleSelector):
+ (InspectorController.setStyleProperty):
+ (InspectorController.getPrototypes):
+ (InspectorController.getProperties):
+ (InspectorController.setPropertyValue):
+ (InspectorController.evaluate):
+ (InspectorController.addInspectedNode):
+ (InspectorController.performSearch):
+ (InspectorController.searchCanceled):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
+ (WebInspector.ElementsPanel.prototype.searchCanceled):
+ (WebInspector.ElementsPanel.prototype.performSearch):
+ (WebInspector.ElementsPanel.prototype._updateMatchesCount):
+ (WebInspector.ElementsPanel.prototype._updateMatchesCountSoon):
+ (WebInspector.ElementsPanel.prototype.addNodesToSearchResult):
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeOutline.prototype.set focusedDOMNode.restoreHighlightToHoveredNode):
+ (WebInspector.ElementsTreeOutline.prototype.set focusedDOMNode):
+ (WebInspector.ElementsTreeElement.prototype.updateChildren):
+ (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.applyStyleRuleText):
+ (InjectedScript.addStyleSelector):
+ (InjectedScript._doesSelectorAffectNode):
+ (InjectedScript._serializeRule):
+ (InjectedScript._serializeStyle):
+ (InjectedScript.getProperties):
+ (InjectedScript.evaluate):
+ (InjectedScript.addInspectedNode):
+ (InjectedScript.performSearch.addNodesToResults):
+ (InjectedScript.performSearch.matchExactItems):
+ (InjectedScript.performSearch.matchExactId.addNodesToResults.call):
+ (InjectedScript.performSearch.matchExactId):
+ (InjectedScript.performSearch):
+ (InjectedScript.performSearch.matchExactTagNames):
+ (InjectedScript.performSearch.matchExactAttributeNames):
+ (InjectedScript.performSearch.matchPartialTagNames):
+ (InjectedScript.performSearch.matchStartOfTagNames):
+ (InjectedScript.performSearch.matchPartialTagNamesAndAttributeValues):
+ (InjectedScript.performSearch.matchPartialAttributeValues):
+ (InjectedScript.performSearch.matchStyleSelector):
+ (InjectedScript.performSearch.matchPlainText):
+ (InjectedScript.performSearch.matchXPathQuery):
+ (InjectedScript.performSearch.finishedSearching):
+ (InjectedScript.performSearch.processChunk):
+ (InjectedScript.searchCanceled):
+ (InjectedScript._ensureCommandLineAPIInstalled.inspectObject):
+ (InjectedScript._ensureCommandLineAPIInstalled):
+ (InjectedScript._resolveObject):
+ (InjectedScript._nodeForId):
+ (InjectedScript._objectForId):
+ (InjectedScript._createProxyObject):
+ * inspector/front-end/ObjectPropertiesSection.js:
+ (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
+ (WebInspector.ObjectPropertyTreeElement.prototype.update):
+ * inspector/front-end/ObjectProxy.js:
+ (WebInspector.ObjectProxy):
+ (WebInspector.ObjectPropertyProxy):
+ * inspector/front-end/PropertiesSidebarPane.js:
+ (WebInspector.PropertiesSidebarPane.prototype.update.callback):
+ (WebInspector.PropertiesSidebarPane.prototype.update):
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylesSidebarPane.prototype.update.callback):
+ (WebInspector.StylesSidebarPane.prototype.update):
+ (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
+ (WebInspector.StylePropertiesSection.prototype.editingSelectorCancelled):
+ (WebInspector.BlankStylePropertiesSection.prototype.editingCommitted.callback):
+ (WebInspector.BlankStylePropertiesSection.prototype.editingCommitted):
+ (WebInspector.StylePropertyTreeElement.prototype):
+ * inspector/front-end/inspector.js:
+ (WebInspector._updateHoverHighlight):
+ (WebInspector.loaded):
+ (WebInspector.clearConsoleMessages):
+ (WebInspector.selectDatabase):
+ (WebInspector.selectDOMStorage):
+ (WebInspector.updateFocusedNode):
+ (WebInspector.addNodesToSearchResult):
+ * inspector/front-end/utilities.js:
+ (Object.proxyType):
+ * storage/Storage.h:
+ (WebCore::Storage::frame):
+
+2009-08-13 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Fix leaks of RGBColor instances from below CSSPrimitiveValue::getRGBColorValue.
+
+ * css/CSSPrimitiveValue.cpp:
+ (WebCore::CSSPrimitiveValue::getRGBColorValue): Return a PassRefPtr to ensure that the
+ newly-allocated RGBColor is cleaned up by the caller.
+ * css/CSSPrimitiveValue.h:
+
+2009-08-13 Eric Seidel <eric@webkit.org>
+
+ Reviewed by David Hyatt.
+
+ wrong font size when css font-family includes monospace
+ https://bugs.webkit.org/show_bug.cgi?id=19161
+
+ Firefox only uses fixed-width default size for exactly "font-family: monospace;".
+ WebKit has historically used fixed-width default size any time a
+ font-family includes monospace in the fallback list.
+
+ This patch corrects WebKit's behavior to match Firefox.
+ I also had to fix a bug in WebKit's font-family fallback behavior where
+ child elements would inherit parts of their parents fallback lists.
+
+ This patch is mostly just replacing all cases where we used to check for:
+ fontDescription.genericFontFamily() == MonospaceFamily
+ with:
+ fontDescription.useFixedDefaultSize()
+
+ Tests: fast/css/getComputedStyle/computed-style-font-family-monospace.html
+ fast/css/getComputedStyle/font-family-fallback-reset.html
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ Deploy useFixedDefaultSize(). Also fix the bug where child
+ FontDescriptions would carry part of the parent font-family fallback list.
+ (WebCore::CSSStyleSelector::checkForGenericFamilyChange):
+ It's no longer alright to just check genericFontFamily(),
+ we have to check to make sure the changed style has a matching useFixedDefaultSize().
+ * platform/graphics/FontDescription.h:
+ (WebCore::FontDescription::useFixedDefaultSize):
+ Only use the fixed default size if we have one font family and it is "monospace".
+ "-webkit-monospace" is the internal representation of the CSS identifier "monospace".
+
+2009-08-13 Christian Plesner Hansen <christian.plesner.hansen@gmail.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [v8] Fix atomic string externalization crash.
+ Atomic string externalization assumes that all non-empty strings
+ can be externalized which is untrue on 64-bit. This change fixed
+ that.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28215
+
+ This bug causes loads of test crashes, no need to add new tests
+ specifically for this.
+
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::v8StringToAtomicWebCoreString):
+
+2009-08-13 George Staikos <george.staikos@torchmobile.com>
+
+ Rubberstamped by Darin Adler.
+
+ Use ASSERT_UNUSED instead of UNUSED_PARAM
+
+ * wml/WMLAnchorElement.cpp:
+ (WebCore::WMLAnchorElement::deregisterTask):
+ * wml/WMLDoElement.cpp:
+ (WebCore::WMLDoElement::deregisterTask):
+
+2009-08-13 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Adler.
+
+ Fixes a couple of bugs in SecurityOrigin::createFromDatabaseIdentifier.
+ https://bugs.webkit.org/show_bug.cgi?id=28262
+
+ No new tests possible.
+
+ * page/SecurityOrigin.cpp:
+ (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
+
+2009-08-13 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [CAIRO] getImageData fails on a given rect bigger than the image rect
+
+ The destination image and the source image was mixed up on creating the
+ imageData.
+
+ This is just a clean up and doesn't affect the current behavior. It's not
+ possible to test this failure in a LayoutTest. Only canvas uses getImageData
+ at the moment and returns before calling getImageData, if the image rect does
+ not contain the requested rect.
+
+ * platform/graphics/cairo/ImageBufferCairo.cpp:
+ (WebCore::getImageData):
+
+2009-08-13 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Haiku] Adding RenderTheme to WebCore.
+ https://bugs.webkit.org/show_bug.cgi?id=28258
+
+ * platform/haiku/RenderThemeHaiku.cpp: Added.
+ (WebCore::RenderThemeHaiku::create):
+ (WebCore::RenderTheme::themeForPage):
+ (WebCore::RenderThemeHaiku::RenderThemeHaiku):
+ (WebCore::RenderThemeHaiku::~RenderThemeHaiku):
+ (WebCore::supportsFocus):
+ (WebCore::RenderThemeHaiku::supportsFocusRing):
+ (WebCore::RenderThemeHaiku::platformActiveSelectionBackgroundColor):
+ (WebCore::RenderThemeHaiku::platformInactiveSelectionBackgroundColor):
+ (WebCore::RenderThemeHaiku::platformActiveSelectionForegroundColor):
+ (WebCore::RenderThemeHaiku::platformInactiveSelectionForegroundColor):
+ (WebCore::RenderThemeHaiku::platformTextSearchHighlightColor):
+ (WebCore::RenderThemeHaiku::systemFont):
+ (WebCore::RenderThemeHaiku::paintCheckbox):
+ (WebCore::RenderThemeHaiku::setCheckboxSize):
+ (WebCore::RenderThemeHaiku::paintRadio):
+ (WebCore::RenderThemeHaiku::setRadioSize):
+ (WebCore::RenderThemeHaiku::adjustMenuListStyle):
+ (WebCore::RenderThemeHaiku::paintMenuList):
+ * platform/haiku/RenderThemeHaiku.h: Added.
+ (WebCore::RenderThemeHaiku::supportsHover):
+
+2009-08-13 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Haiku] Remove the "m_point" code from ContextMenuHaiku.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=28256
+
+ * platform/haiku/ContextMenuHaiku.cpp:
+ (WebCore::ContextMenuReceiver::ContextMenuReceiver):
+ (WebCore::ContextMenu::ContextMenu):
+ (WebCore::ContextMenu::appendItem):
+ (WebCore::ContextMenu::insertItem):
+
+2009-08-13 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Inspector: Show Hidden Cookie Data
+ https://bugs.webkit.org/show_bug.cgi?id=28185
+
+ Added new file Cookie.h to the WebCore XCode
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+ InspectorController.cookies() binding
+
+ * bindings/js/JSInspectorBackendCustom.cpp:
+ (WebCore::JSInspectorBackend::cookies):
+ * inspector/InspectorBackend.idl:
+
+ Struct for static Cookie information
+ (name, value, path, domain, expires, httpOnly, secure, session)
+
+ * platform/Cookie.h: Added.
+ (WebCore::Cookie::Cookie):
+
+ Getter for the a list of raw Cookies
+ getRawCookies(., ., out Vector<Cookie>)
+
+ * platform/CookieJar.h:
+
+ Implementation of getRawCookies for the mac platform.
+
+ * platform/mac/CookieJar.mm:
+ (WebCore::getRawCookies):
+
+ Stub other CookieJar implementations to satisfy the interface.
+
+ * platform/haiku/CookieJarHaiku.cpp:
+ (WebCore::getRawCookies):
+ * platform/network/chromium/CookieJarChromium.cpp:
+ (WebCore::getRawCookies):
+ * platform/network/curl/CookieJarCurl.cpp:
+ (WebCore::getRawCookies):
+ * platform/network/soup/CookieJarSoup.cpp:
+ (WebCore::getRawCookies):
+ * platform/network/win/CookieJarCFNetWin.cpp:
+ (WebCore::getRawCookies):
+ * platform/network/win/CookieJarWin.cpp:
+ (WebCore::getRawCookies):
+ * platform/qt/CookieJarQt.cpp:
+ (WebCore::getRawCookies):
+
+2009-08-13 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Add a new gesture in Web Inspector to remove breakpoints
+ https://bugs.webkit.org/show_bug.cgi?id=19131
+
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._documentMouseDown):
+
+2009-08-13 Norbert Leser <norbert.leser@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Symbian target components (library and executable files)
+ require Unique Identifiers (i.e., UID3).
+ These identifiers are defined in the respective project
+ file, conditionally for "symbian" platform.
+
+ * WebCore.pro:
+
+2009-08-13 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ wrong calculation of overflow size for flexbox and table
+ https://bugs.webkit.org/show_bug.cgi?id=28064
+
+ RenderFlexibleBox and RenderTable were using the width of overflow
+ to update height of overflow, so height became wrong value and
+ width was not updated. As the corresponding code of RenderBlock
+ was sane, I factored it out and used from RenderFlexibleBox and
+ RenderTable.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::updateOverflowWithShadowAndReflection): created from code of layoutBlock
+ (WebCore::RenderBlock::layoutBlock):
+ * rendering/RenderBlock.h:
+ * rendering/RenderFlexibleBox.cpp: use updateOverflowWithShadowAndReflection
+ (WebCore::RenderFlexibleBox::layoutBlock):
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::layout): use updateOverflowWithShadowAndReflection
+
+2009-08-13 Mark Rowe <mrowe@apple.com>
+
+ Revert r47185, the fix for <https://bugs.webkit.org/show_bug.cgi?id=28185>, as it broke the
+ Windows build in a non-obvious manner.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSInspectorBackendCustom.cpp:
+ * inspector/InspectorBackend.idl:
+ * platform/Cookie.h: Removed.
+ * platform/CookieJar.h:
+ * platform/haiku/CookieJarHaiku.cpp:
+ (WebCore::setCookies):
+ (WebCore::cookies):
+ * platform/mac/CookieJar.mm:
+ * platform/network/chromium/CookieJarChromium.cpp:
+ * platform/network/curl/CookieJarCurl.cpp:
+ * platform/network/soup/CookieJarSoup.cpp:
+ * platform/network/win/CookieJarCFNetWin.cpp:
+ * platform/network/win/CookieJarWin.cpp:
+ * platform/qt/CookieJarQt.cpp:
+
+2009-08-13 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Not reviewed: build fix (for r47192), adding new file from
+ https://bugs.webkit.org/show_bug.cgi?id=28174
+
+ * inspector/front-end/StatusBarButton.js: Added.
+
+2009-08-13 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Introduced StatusBarButton class that encapsulates glyphs support.
+ Views updated accordingly.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28174
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/CookieItemsView.js:
+ (WebInspector.CookieItemsView):
+ (WebInspector.CookieItemsView.prototype.get statusBarItems): Updated to retrieve DOM element from StatusBarButton instance (here and in similar getters below.)
+ (WebInspector.CookieItemsView.prototype.hide):
+ (WebInspector.CookieItemsView.prototype.update):
+ * inspector/front-end/DOMStorageItemsView.js:
+ (WebInspector.DOMStorageItemsView):
+ (WebInspector.DOMStorageItemsView.prototype.get statusBarItems):
+ (WebInspector.DOMStorageItemsView.prototype.hide):
+ (WebInspector.DOMStorageItemsView.prototype.update):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel):
+ (WebInspector.ElementsPanel.prototype.get statusBarItems):
+ (WebInspector.ElementsPanel.prototype.hide):
+ (WebInspector.ElementsPanel.prototype._nodeSearchButtonClicked):
+ * inspector/front-end/Panel.js:
+ * inspector/front-end/ProfileView.js:
+ (WebInspector.ProfileView):
+ (WebInspector.ProfileView.prototype.get statusBarItems):
+ (WebInspector.ProfileView.prototype._updatePercentButton):
+ (WebInspector.ProfileView.prototype._focusClicked):
+ (WebInspector.ProfileView.prototype._excludeClicked):
+ (WebInspector.ProfileView.prototype._resetClicked):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel):
+ (WebInspector.ProfilesPanel.prototype.get statusBarItems):
+ (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
+ (WebInspector.ProfilesPanel.prototype._updateInterface):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype.get statusBarItems):
+ (WebInspector.ResourcesPanel.prototype.reset):
+ (WebInspector.ResourcesPanel.prototype._toggleLargerResources):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ (WebInspector.ScriptsPanel.prototype.get statusBarItems):
+ (WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsButton):
+ (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons):
+ * inspector/front-end/StatusBarButton.js: Added.
+ (WebInspector.StatusBarButton):
+ (WebInspector.StatusBarButton.prototype._clicked):
+ (WebInspector.StatusBarButton.prototype.get disabled):
+ (WebInspector.StatusBarButton.prototype.set disabled):
+ (WebInspector.StatusBarButton.prototype.get title):
+ (WebInspector.StatusBarButton.prototype.set title):
+ (WebInspector.StatusBarButton.prototype.get toggled):
+ (WebInspector.StatusBarButton.prototype.set toggled):
+ (WebInspector.StatusBarButton.prototype.get visible):
+ (WebInspector.StatusBarButton.prototype.set visible):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.css: For uniformity, class names are always used to identify status bar buttons. Also, fixed "Reload" button style to use glyphs.
+ * inspector/front-end/inspector.html:
+
+2009-08-12 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Add shadow support in GraphicsContext::fillRect().
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::fillRect): Paint shadow if necessary.
+ (WebCore::GraphicsContext::setPlatformShadow): Inverse y offset.
+
+2009-08-13 David Levin <levin@chromium.org>
+
+ Unreviewed build fix for Chromium Linux.
+
+ Rollback r47157 as this broke debug tests of Chromium Linux.
+
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::setupPaintCommon):
+
+2009-08-13 David Levin <levin@chromium.org>
+
+ Unreviewed build fix for chromium.
+
+ The chromium build broke due to r47185 which added
+ a cookies array to inspector/InspectorBackend.idl.
+
+ * bindings/v8/custom/V8CustomBinding.h: Added the declaration for the cookies callback.
+ * bindings/v8/custom/V8InspectorBackendCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL(InspectorBackendCookies)): Stubbed out an implementation
+ for the cookies callback.
+
+2009-08-12 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: Show Hidden Cookie Data
+ https://bugs.webkit.org/show_bug.cgi?id=28185
+
+ Added new file Cookie.h to the WebCore XCode
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+ InspectorController.cookies() binding
+
+ * bindings/js/JSInspectorBackendCustom.cpp:
+ (WebCore::JSInspectorBackend::cookies):
+ * inspector/InspectorBackend.idl:
+
+ Struct for static Cookie information
+ (name, value, path, domain, expires, httpOnly, secure, session)
+
+ * platform/Cookie.h: Added.
+ (WebCore::Cookie::Cookie):
+
+ Getter for the a list of raw Cookies
+ getRawCookies(., ., out Vector<Cookie>)
+
+ * platform/CookieJar.h:
+
+ Implementation of getRawCookies for the mac platform.
+
+ * platform/mac/CookieJar.mm:
+ (WebCore::getRawCookies):
+
+ Stub other CookieJar implementations to satisfy the interface.
+
+ * platform/haiku/CookieJarHaiku.cpp:
+ (WebCore::getRawCookies):
+ * platform/network/chromium/CookieJarChromium.cpp:
+ (WebCore::getRawCookies):
+ * platform/network/curl/CookieJarCurl.cpp:
+ (WebCore::getRawCookies):
+ * platform/network/soup/CookieJarSoup.cpp:
+ (WebCore::getRawCookies):
+ * platform/network/win/CookieJarCFNetWin.cpp:
+ (WebCore::getRawCookies):
+ * platform/network/win/CookieJarWin.cpp:
+ (WebCore::getRawCookies):
+ * platform/qt/CookieJarQt.cpp:
+ (WebCore::getRawCookies):
+
+2009-08-08 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: Cookies in Storage Panel
+ https://bugs.webkit.org/show_bug.cgi?id=27202
+
+ Data Structure for a Cookie. Just Key/Value for Now:
+
+ * inspector/front-end/Cookie.js: Added.
+ (WebInspector.Cookie):
+ (WebInspector.Cookie.prototype.get key):
+ (WebInspector.Cookie.prototype.set key):
+ (WebInspector.Cookie.prototype.get value):
+ (WebInspector.Cookie.prototype.set value):
+
+ A Storage View for Cookies. Allows for Refresh/Delete:
+
+ * inspector/front-end/CookieItemsView.js: Added.
+ (WebInspector.CookieItemsView):
+ (WebInspector.CookieItemsView.prototype.get statusBarItems): refresh and delete buttons
+ (WebInspector.CookieItemsView.prototype.show):
+ (WebInspector.CookieItemsView.prototype.hide):
+ (WebInspector.CookieItemsView.prototype.update):
+ (WebInspector.CookieItemsView.prototype.buildCookies): parses the inspected window's document.cookie string
+ (WebInspector.CookieItemsView.prototype.dataGridForCookies): creates a datagrid for cookies
+ (WebInspector.CookieItemsView.prototype._deleteButtonClicked): attempt at deleting the cookie (not flawless)
+ (WebInspector.CookieItemsView.prototype._refreshButtonClicked): rebuild the datagrid
+
+ Include a SidebarSection Section in the Databases Panel:
+
+ * inspector/front-end/DatabasesPanel.js:
+ (WebInspector.DatabasesPanel):
+ (WebInspector.DatabasesPanel.prototype.show): calls populateInterface
+ (WebInspector.DatabasesPanel.prototype.populateInterface): adds cookies if they don't exist
+ (WebInspector.DatabasesPanel.prototype.reset): remove cookie specific parts
+ (WebInspector.DatabasesPanel.prototype.addCookies): add cookies sidebar tree element
+ (WebInspector.DatabasesPanel.prototype.showCookies): sets the visible view to a CookiesItemView
+ (WebInspector.CookieSidebarTreeElement):
+ (WebInspector.CookieSidebarTreeElement.prototype.onselect):
+ (WebInspector.CookieSidebarTreeElement.prototype.get mainTitle): just "Cookies" at the moment
+ (WebInspector.CookieSidebarTreeElement.prototype.set mainTitle):
+ (WebInspector.CookieSidebarTreeElement.prototype.get subtitle): no subtitle yet
+ (WebInspector.CookieSidebarTreeElement.prototype.set subtitle):
+
+ New "Cookies" Image for the Sidebar:
+
+ * inspector/front-end/Images/cookie.png: Added.
+ * inspector/front-end/inspector.css:
+
+ Include the Added Files where appropriate:
+
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+
+2009-08-12 George Wright <george.wright@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ Add SQLTransactionCoordinator.[h,cpp] to WebCore.pro.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28246
+
+ * WebCore.pro:
+
+2009-08-12 George Staikos <george.staikos@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ Mark unused variables to avoid compile failures in -Werror.
+
+ * wml/WMLAnchorElement.cpp:
+ (WebCore::WMLAnchorElement::deregisterTask):
+ * wml/WMLDoElement.cpp:
+ (WebCore::WMLDoElement::deregisterTask):
+
+2009-08-12 Charles Wei <charles.wei@torchmobile.com.cn>
+
+ Reviewed by Niko Zimmermann.
+
+ This is to add WCSS marquee support , which is defined by OMA and is an extension for CSS2,
+ It extends CSS display with "display:-wap-marquee;-wap-marquee-dir:xxx;-wap-marquee-speed:xxx;-wap-marquee-style:xxx"
+ Minor fixes by Eric Seidel and George Staikos.
+ https://bugs.webkit.org/show_bug.cgi?id=23727
+
+ No new tests, the tests have already been landed at LayoutTests/fast/wcss/
+
+ * WebCore.pro:
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ * css/CSSValueKeywords.in:
+ * css/WCSSPropertyNames.in: Added.
+ * css/WCSSValueKeywords.in: Added.
+ * rendering/RenderMarquee.cpp:
+ (WebCore::RenderMarquee::start):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::createObject):
+ * rendering/style/RenderStyleConstants.h:
+ (WebCore::):
+
+2009-08-12 George Wright <george.wright@torchmobile.com>
+
+ Reviewed by David Hyatt.
+
+ Update the canvas renderer's intrinsic size with the zoomed
+ lengths and ensure the intrinsic size is correct when setting
+ an initial style.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26908
+
+ Test: fast/canvas/canvas-zoom.html
+
+ * rendering/RenderHTMLCanvas.cpp:
+ (WebCore::RenderHTMLCanvas::canvasSizeChanged):
+ * rendering/RenderReplaced.cpp:
+ (WebCore::RenderReplaced::styleDidChange):
+
+2009-08-12 Alpha Lam <hclam@chromium.org>
+
+ Reviewed by Simon Fraser.
+
+ Fix regression for dragging the media controller thumb.
+ https://bugs.webkit.org/show_bug.cgi?id=28211
+
+ Modified the conditions for rejecting events on the media controller
+ to only rejecting mouse events not from the left button.
+
+ Test: media/controls-drag-timebar.html
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlTimelineElement::defaultEventHandler):
+
+2009-08-12 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fixing a deadlock caused by two transactions that run on two
+ different database handles for the same DB. Adding a per-DB thread
+ transaction coordinator that allows the DB thread to run only one
+ transaction per DB file at any given time.
+
+ Adding a regression test for this bug.
+
+ Test: storage/multiple-transactions-on-different-handles.html
+
+ https://bugs.webkit.org/show_bug.cgi?id=27966
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * storage/Database.cpp:
+ (WebCore::Database::transactionCoordinator):
+ * storage/Database.h:
+ * storage/DatabaseThread.cpp:
+ (WebCore::DatabaseThread::DatabaseThread):
+ * storage/DatabaseThread.h:
+ (WebCore::DatabaseThread::transactionCoordinator):
+ * storage/SQLTransaction.cpp:
+ (WebCore::SQLTransaction::SQLTransaction):
+ (WebCore::SQLTransaction::debugStepName):
+ (WebCore::SQLTransaction::performNextStep):
+ (WebCore::SQLTransaction::aquireLock):
+ (WebCore::SQLTransaction::lockAquired):
+ (WebCore::SQLTransaction::cleanupAfterSuccessCallback):
+ (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
+ * storage/SQLTransaction.h:
+ * storage/SQLTransactionCoordinator.cpp: Added.
+ * storage/SQLTransactionCoordinator.h: Added.
+
+2009-08-12 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Custom properties on DOM objects are lost after GC (as demonstrated by the gc-9.html test)
+ https://bugs.webkit.org/show_bug.cgi?id=28194
+
+ * GNUmakefile.am: Added the two new source files.
+ * WebCore.gypi: Ditto.
+ * WebCore.pro: Ditto.
+ * WebCore.vcproj/WebCore.vcproj: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * WebCoreSources.bkl: Ditto.
+
+ * bindings/js/JSCSSRuleListCustom.cpp: Added.
+ (WebCore::JSCSSRuleList::markChildren): Call markDOMObjectWrapper
+ on rules in the list.
+
+ * bindings/js/JSCSSStyleDeclarationCustom.cpp:
+ (WebCore::JSCSSStyleDeclaration::markChildren): Added. Call
+ markDOMObjectWrapper on the CSSValue objects that are owned by the
+ declaration as values of the properties.
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::isObservableThroughDOM): Added code to handle some
+ cases where nodes are observable because they own objects that
+ in turn have custom properties.
+
+ * bindings/js/JSDOMBinding.h: Fix a typo in the header.
+
+ * bindings/js/JSDocumentCustom.cpp:
+ (WebCore::JSDocument::markChildren): Added call to markDOMObjectWrapper
+ for implementation and styleSheets.
+
+ * bindings/js/JSElementCustom.cpp:
+ (WebCore::JSElement::markChildren): Added. Calls markDOMObjectWrapper
+ for attributes and style.
+
+ * bindings/js/JSHTMLCanvasElementCustom.cpp: Added.
+ (WebCore::JSHTMLCanvasElement::markChildren): Call markDOMObjectWrapper
+ on the rendering context.
+
+ * bindings/js/JSStyleSheetCustom.cpp:
+ (WebCore::JSStyleSheet::markChildren): Call markDOMObjectWrapper on
+ items in the stylesheet.
+
+ * bindings/js/JSStyleSheetListCustom.cpp:
+ (WebCore::JSStyleSheetList::markChildren): Added. Calls
+ markDOMObjectWrapper on stylesheets in the list.
+
+ * css/CSSRuleList.idl: Added CustomMarkFunction.
+ * css/CSSStyleDeclaration.idl: Ditto.
+ * css/StyleSheetList.idl: Ditto.
+ * dom/Element.idl: Ditto.
+ * html/HTMLCanvasElement.idl: Ditto.
+
+ * dom/Element.h: Made everything private that could be.
+ Added access to the attributeMap that does returns
+ the existing map without doing any of the lazy-updating work. This
+ is needed to get at the existing attributes during garbage collection
+ without having side effects.
+
+ * html/HTMLCanvasElement.h: Cleaned up the header a bit, making
+ members private. Added renderingContext2D function for use in
+ JSHTMLCanvasElement::markChildren.
+
+2009-08-12 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Fixes two bugs about Pan Scrolling - Scrolling with middle mouse button doesn't
+ work in Expanded view on reader.google.com, and Can enter auto scroll from a non-scrollable area.
+ https://bugs.webkit.org/show_bug.cgi?id=28023
+ https://bugs.webkit.org/show_bug.cgi?id=24794
+
+ Added a new method to RenderBox seeing if the Box can be scrolled and actually has something to
+ scroll, and use that for pan scrolling.
+
+ Test: platform/win/fast/events/panScroll-nested-divs.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleMouseDraggedEvent):
+ (WebCore::EventHandler::updateAutoscrollRenderer):
+ (WebCore::EventHandler::handleMousePressEvent):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::canBeScrolledAndHasScrollableArea):
+ * rendering/RenderBox.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::scrollByRecursively):
+
+2009-08-12 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Fix of <rdar://6728361> Mouse wheel scrolling on a page with expanded drop down
+ list detaches drop down.
+
+ Added a function for Windows PopupMenu's to return their class name.
+
+ * platform/PopupMenu.h:
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::popupClassName):
+
+2009-08-12 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ WINCE PORT: Color and Gradient
+ https://bugs.webkit.org/show_bug.cgi?id=27511
+
+ * platform/graphics/wince/ColorWince.cpp: Added.
+ * platform/graphics/wince/GradientWince.cpp: Added.
+
+2009-08-12 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Eric Seidel.
+
+ fix a typo in platform/graphics/skia/PlatformContextSkia.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=28172
+
+ No new tests because it's a just typo fix.
+
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::setupPaintCommon):
+
+2009-08-12 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27458
+ Support for the :default CSS pseudoclass, as per HTML5 spec.
+ http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#selector-default
+
+ Tests: fast/css/pseudo-default-001.html
+ fast/css/pseudo-default-002.html
+ fast/css/pseudo-default-003.html
+ fast/css/pseudo-default-004.html
+
+ * css/CSSSelector.cpp:
+ (WebCore::CSSSelector::extractPseudoType): pseudoDefault
+ * css/CSSSelector.h:
+ (WebCore::CSSSelector::):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::canShareStyleWithElement): sharing stuff is
+ aware that only one default button can be present in a form
+ (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): applies
+ the :default CSS pseudoclass
+ * dom/Element.h:
+ (WebCore::Element::isDefaultButtonForForm): new method to determine
+ whether a FormControl is a default button for a given form
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::isDefaultButtonForForm): ditto
+ * html/HTMLFormControlElement.h:
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::defaultButton): extracts the default button
+ from the form
+ * html/HTMLFormElement.h:
+
+2009-08-12 David Levin <levin@chromium.org>
+
+ No review, rolling out r47106.
+ https://bugs.webkit.org/show_bug.cgi?id=28215
+
+ This patch relied on a new version of v8 which is not available
+ in chromium yet.
+
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::v8StringToAtomicWebCoreString):
+
+2009-08-12 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Bug 26993 : Geolocation::requestPermission()
+ https://bugs.webkit.org/show_bug.cgi?id=26993
+
+ Second patch to allow the Geolocation permission request to chrome to be asynchronous
+ or synchronous. Fixes a bug where callbacks were called twice when permissions
+ are granted synchronously.
+
+ No new tests required.
+
+ * page/Geolocation.cpp:
+ (WebCore::Geolocation::setIsAllowed): Modified. Calls makeSuccessCallbacks() rather than geolocationServicePositionChanged().
+ (WebCore::Geolocation::geolocationServicePositionChanged): Modified. Updated logic to avoid repeated callbacks when permissions are granted synchronously.
+ (WebCore::Geolocation::makeSuccessCallbacks): Added. Calls success callbacks.
+ * page/Geolocation.h: Modified. Adds makeSuccessCallbacks().
+
+2009-08-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6952336>
+ CrashTracer: [USER] 3 crashes in Safari at com.apple.WebCore • WebCore::SecurityOrigin::canAccess const 27
+
+ Make sure to set the security origin before calling dispatchWindowObjectAvailable.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::begin):
+
+2009-08-12 Xiaomei Ji <xji@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix [Chromium] drop down menu letter selection, skip selections
+ https://bugs.webkit.org/show_bug.cgi?id=28205
+
+ Not auto-testable since it is chromim platform specific code, and it involves sending a keyboard
+ event to the popup, which is not possible (eventSender sends the key
+ events through webview, we want to go through the webwidget).
+
+ * manual-tests/keyboard_select_elements_with_same_beginning.html: Added.
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::isCharacterTypeEvent): style change.
+ (WebCore::PopupListBox::handleKeyEvent): typeAheadFind should be called only when the event is
+ a character type event to avoid calling twice for English.
+ (WebCore::PopupListBox::typeAheadFind): remove unnecessary checking of isCharacterTypeEvent() since the whole function is only called under that condition.
+
+2009-08-12 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Haiku] Adding GraphicsContext to WebCore/platform/graphics/haiku.
+ https://bugs.webkit.org/show_bug.cgi?id=28130
+
+ * platform/graphics/haiku/GraphicsContextHaiku.cpp: Added.
+ (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
+ (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
+ (WebCore::GraphicsContext::GraphicsContext):
+ (WebCore::GraphicsContext::~GraphicsContext):
+ (WebCore::GraphicsContext::platformContext):
+ (WebCore::GraphicsContext::savePlatformState):
+ (WebCore::GraphicsContext::restorePlatformState):
+ (WebCore::GraphicsContext::drawRect):
+ (WebCore::GraphicsContext::drawLine):
+ (WebCore::GraphicsContext::drawEllipse):
+ (WebCore::GraphicsContext::strokeArc):
+ (WebCore::GraphicsContext::strokePath):
+ (WebCore::GraphicsContext::drawConvexPolygon):
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::fillRoundedRect):
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::beginPath):
+ (WebCore::GraphicsContext::addPath):
+ (WebCore::GraphicsContext::clip):
+ (WebCore::GraphicsContext::drawFocusRing):
+ (WebCore::GraphicsContext::drawLineForText):
+ (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
+ (WebCore::GraphicsContext::roundToDevicePixels):
+ (WebCore::GraphicsContext::beginTransparencyLayer):
+ (WebCore::GraphicsContext::endTransparencyLayer):
+ (WebCore::GraphicsContext::clearRect):
+ (WebCore::GraphicsContext::strokeRect):
+ (WebCore::GraphicsContext::setLineCap):
+ (WebCore::GraphicsContext::setLineJoin):
+ (WebCore::GraphicsContext::setMiterLimit):
+ (WebCore::GraphicsContext::setAlpha):
+ (WebCore::GraphicsContext::setCompositeOperation):
+ (WebCore::GraphicsContext::clipOut):
+ (WebCore::GraphicsContext::clipToImageBuffer):
+ (WebCore::GraphicsContext::getCTM):
+ (WebCore::GraphicsContext::translate):
+ (WebCore::GraphicsContext::origin):
+ (WebCore::GraphicsContext::rotate):
+ (WebCore::GraphicsContext::scale):
+ (WebCore::GraphicsContext::clipOutEllipseInRect):
+ (WebCore::GraphicsContext::addInnerRoundedRectClip):
+ (WebCore::GraphicsContext::concatCTM):
+ (WebCore::GraphicsContext::setPlatformShouldAntialias):
+ (WebCore::GraphicsContext::setImageInterpolationQuality):
+ (WebCore::GraphicsContext::setURLForRect):
+ (WebCore::GraphicsContext::setPlatformFont):
+ (WebCore::GraphicsContext::setPlatformStrokeColor):
+ (WebCore::GraphicsContext::getHaikuStrokeStyle):
+ (WebCore::GraphicsContext::setPlatformStrokeStyle):
+ (WebCore::GraphicsContext::setPlatformStrokeThickness):
+ (WebCore::GraphicsContext::setPlatformFillColor):
+ (WebCore::GraphicsContext::clearPlatformShadow):
+ (WebCore::GraphicsContext::setPlatformShadow):
+
+2009-08-12 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Haiku] Modifying WebCore/platform/graphics files to allow Haiku port.
+ https://bugs.webkit.org/show_bug.cgi?id=28128
+
+ * platform/graphics/BitmapImage.h: Adding getBBitmap() function.
+ * platform/graphics/Color.h: rgb_color is the Color struct in Haiku.
+ * platform/graphics/FloatPoint.h: BPoint is the Point class in Haiku.
+ * platform/graphics/FloatRect.h: BRect is the Rect class in Haiku.
+ * platform/graphics/GraphicsContext.cpp:
+ * platform/graphics/GraphicsContext.h: BView is the PlatformGraphicsContext
+ class for Haiku. Adding getHaikuStrokeStyle() function.
+ * platform/graphics/Icon.h: Adding an empty Icon() constructor because
+ this class isn't implemented for the moment.
+ * platform/graphics/ImageSource.h: BBitmap is the native bitmap class
+ for Haiku.
+ * platform/graphics/IntPoint.h: BPoint is the Point class in Haiku.
+ * platform/graphics/IntRect.h: BRect is the Rect class in Haiku.
+ * platform/graphics/IntSize.h: BSize is the Size class in Haiku.
+ * platform/graphics/Path.h: BRegion is the Path class in Haiku.
+ * platform/graphics/Pattern.h: Adding the GraphicsDef.h header and the
+ native pattern type.
+ * platform/graphics/SimpleFontData.h: Adding Haiku's Font.h header.
+
+2009-08-12 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Haiku] Adding modification to the WebCore/platform/ files to allow
+ the Haiku port.
+ https://bugs.webkit.org/show_bug.cgi?id=28128
+
+ * platform/ContextMenuItem.h: BMenu is the PlatformMenuItemDescription
+ class of Haiku.
+ * platform/Cursor.h: BCursor is the Cursor class of Haiku.
+ * platform/DragData.h: Use a BMessage as DragDataRef.
+ * platform/DragImage.h: Use a BBitmap as DragImageRef.
+ * platform/PlatformKeyboardEvent.h: Use BMessage as event vehicle.
+ * platform/PlatformMenuDescription.h: BMenu is the
+ PlatformMenuDescription class of Haiku.
+ * platform/PlatformMouseEvent.h: Use BMessage as event vehicle.
+ * platform/PlatformWheelEvent.h: Use BMessage as event vehicle.
+ * platform/PopupMenu.h: Adding a m_menu attribute for Haiku.
+ * platform/Widget.h: BView is the PlatformWidget class of Haiku.
+
+2009-08-12 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Haiku] Tiny modifications on WebCore files to allow Haiku port.
+ https://bugs.webkit.org/show_bug.cgi?id=28128
+
+ * bindings/js/ScriptControllerHaiku.cpp: Style cleanup.
+ * loader/CachedFont.cpp: Haiku behaves like Qt, Gtk, or Chromium,
+ so many PLATFORM(HAIKU) were added to these functions.
+ (WebCore::CachedFont::~CachedFont):
+ (WebCore::CachedFont::ensureCustomFontData):
+ (WebCore::CachedFont::platformDataFromCustomData):
+ (WebCore::CachedFont::allClientsRemoved):
+ * page/EventHandler.cpp: Like the mac and Qt port, Haiku doesn't need the
+ invertSenseOfTabsToLinks() function.
+ * page/haiku/DragControllerHaiku.cpp: Style cleanup.
+ * platform/image-decoders/ImageDecoder.h: For image decoding Haiku
+ behaves like Cairo or Wx, (not like Skia).
+ (WebCore::RGBA32Buffer::getAddr):
+ * platform/text/PlatformString.h: Adding the String(BString&) and BString()
+ methods specific to Haiku.
+ * platform/text/UnicodeRange.h: Haiku needs to include stdint.h.
+ * platform/text/haiku/TextBreakIteratorInternalICUHaiku.cpp:
+ (WebCore::currentSearchLocaleID): Missing function.
+
+2009-08-12 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Haiku] Adding the ScrollbarTheme files.
+ https://bugs.webkit.org/show_bug.cgi?id=28125
+
+ * platform/haiku/ScrollbarThemeHaiku.cpp: Added.
+ (buttonWidth):
+ (WebCore::ScrollbarTheme::nativeTheme):
+ (WebCore::ScrollbarThemeHaiku::ScrollbarThemeHaiku):
+ (WebCore::ScrollbarThemeHaiku::~ScrollbarThemeHaiku):
+ (WebCore::ScrollbarThemeHaiku::scrollbarThickness):
+ (WebCore::ScrollbarThemeHaiku::hasButtons):
+ (WebCore::ScrollbarThemeHaiku::hasThumb):
+ (WebCore::ScrollbarThemeHaiku::backButtonRect):
+ (WebCore::ScrollbarThemeHaiku::forwardButtonRect):
+ (WebCore::ScrollbarThemeHaiku::trackRect):
+ (WebCore::ScrollbarThemeHaiku::paintScrollbarBackground):
+ (WebCore::ScrollbarThemeHaiku::paintButton):
+ (WebCore::ScrollbarThemeHaiku::paintThumb):
+ * platform/haiku/ScrollbarThemeHaiku.h: Added.
+
+2009-08-12 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Haiku] Adding eight simple files to WebCore/platform/graphics/haiku.
+ https://bugs.webkit.org/show_bug.cgi?id=28122
+
+ * platform/graphics/haiku/ColorHaiku.cpp: Added.
+ (WebCore::Color::Color):
+ (WebCore::Color::operator rgb_color):
+ (WebCore::focusRingColor):
+ * platform/graphics/haiku/FloatPointHaiku.cpp: Added.
+ (WebCore::FloatPoint::FloatPoint):
+ (WebCore::FloatPoint::operator BPoint):
+ * platform/graphics/haiku/FloatRectHaiku.cpp: Added.
+ (WebCore::FloatRect::FloatRect):
+ (WebCore::FloatRect::operator BRect):
+ * platform/graphics/haiku/GradientHaiku.cpp: Added.
+ (WebCore::Gradient::platformDestroy):
+ (WebCore::Gradient::platformGradient):
+ (WebCore::Gradient::fill):
+ * platform/graphics/haiku/IntPointHaiku.cpp: Added.
+ (WebCore::IntPoint::IntPoint):
+ (WebCore::IntPoint::operator BPoint):
+ * platform/graphics/haiku/IntRectHaiku.cpp: Added.
+ (WebCore::IntRect::IntRect):
+ (WebCore::IntRect::operator BRect):
+ * platform/graphics/haiku/IntSizeHaiku.cpp: Added.
+ (WebCore::IntSize::IntSize):
+ (WebCore::IntSize::operator BSize):
+ * platform/graphics/haiku/PathHaiku.cpp: Added.
+ (WebCore::Path::Path):
+ (WebCore::Path::~Path):
+ (WebCore::Path::operator=):
+ (WebCore::Path::hasCurrentPoint):
+ (WebCore::Path::contains):
+ (WebCore::Path::translate):
+ (WebCore::Path::boundingRect):
+ (WebCore::Path::moveTo):
+ (WebCore::Path::addLineTo):
+ (WebCore::Path::addQuadCurveTo):
+ (WebCore::Path::addBezierCurveTo):
+ (WebCore::Path::addArcTo):
+ (WebCore::Path::closeSubpath):
+ (WebCore::Path::addArc):
+ (WebCore::Path::addRect):
+ (WebCore::Path::addEllipse):
+ (WebCore::Path::clear):
+ (WebCore::Path::isEmpty):
+ (WebCore::Path::debugString):
+ (WebCore::Path::apply):
+ (WebCore::Path::transform):
+ (WebCore::Path::strokeBoundingRect):
+
+2009-08-12 Lyon Chen <lyon.chen@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ WINCE PORT: Implement Keygen for WINCE
+ https://bugs.webkit.org/show_bug.cgi?id=27543
+
+ * platform/wince/KeygenWince.cpp: Added.
+
+2009-08-12 Brent Fulgham <bfulgham@webkit.org>
+
+ Rubber-stamped by Kevin Ollivier.
+
+ Handle crash in wx due to null value passed to strlen in
+ the CString constructor.
+
+ * platform/network/curl/ResourceHandleManager.cpp:
+ (WebCore::certificatePath): Check for null return from getenv
+ and use default CString constructor instead.
+
+2009-08-12 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Eric Seidel.
+
+ WINCE PORT: simple stubs to make it build for WINCE
+ https://bugs.webkit.org/show_bug.cgi?id=27543
+
+ * platform/wince/DragDataWince.cpp: Added.
+ * platform/wince/DragImageWince.cpp: Added.
+ * platform/wince/EditorWince.cpp: Added.
+ * platform/wince/KURLWince.cpp: Added.
+
+2009-08-12 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ WINCEPORT: FileSystem and FileChooser
+ https://bugs.webkit.org/show_bug.cgi?id=27543
+
+ * platform/wince/FileChooserWince.cpp: Added.
+ * platform/wince/FileSystemWince.cpp: Added.
+
+2009-08-12 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Eric Seidel.
+
+ WINCE PORT: implement Cursor for WINCE. There's no real cursor on most
+ WinMob devices. We pass the cursor info to application, which so that
+ can determine what to do.
+ https://bugs.webkit.org/show_bug.cgi?id=27543
+
+ * platform/wince/CursorWince.cpp: Added.
+
+2009-08-12 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ WINCE PORT: MIMETypeRegistry
+ https://bugs.webkit.org/show_bug.cgi?id=27543
+
+ * platform/wince/MIMETypeRegistryWince.cpp: Added.
+
+2009-08-12 Joe Mason <joe.mason@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ WINCE PORT: Pasteboard and SearchPopupMenu
+ https://bugs.webkit.org/show_bug.cgi?id=27543
+
+ * platform/wince/PasteboardWince.cpp: Added.
+ * platform/wince/SearchPopupMenuWince.cpp: Added.
+
+2009-08-12 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ WINCE PORT: Add SharedTimerWince.cpp and SystemTimeWince.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=27543
+
+ * platform/wince/SharedTimerWince.cpp: Added.
+ * platform/wince/SystemTimeWince.cpp: Added.
+
+2009-08-12 Mark Mentovai <mark@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28204
+ Allow C+exceptions to be disabled in WebCore's V8 Mac build.
+
+ * WebCorePrefix.h:
+ Only undefine |try| and |catch| when building Objective-C[++],
+ leaving the C+library definitions intact for C++.
+
+2009-08-12 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add a Custom Setter for DOMWindowEvent in the V8 bindings.
+ https://bugs.webkit.org/show_bug.cgi?id=27719
+
+ Tests: fast/events/set-event-in-another-frame.html
+ fast/events/set-event-to-null.html
+
+ * bindings/scripts/CodeGeneratorV8.pm: Clean up custom getter/setter code,
+ as it currently doesn't support a custom getter
+ and a v8-specific custom setter simultaneously.
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * page/DOMWindow.idl:
+
+2009-08-12 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Adam Treat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27965
+ Merge wx/ImageSourceWx.cpp into ImageSource.cpp. No changes to
+ ImageSource.cpp were needed, so this just deletes ImageSourceWx.cpp.
+
+ * WebCore.gypi:
+ * WebCoreSources.bkl:
+ * platform/graphics/wx/ImageSourceWx.cpp: Removed.
+ * webcore-wx.bkl:
+
+2009-08-12 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Dave Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27933
+ Build fix after r47099.
+
+ * platform/graphics/skia/ImageBufferSkia.cpp:
+ (WebCore::getImageData):
+ (WebCore::putImageData):
+
+2009-08-08 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ WINCE PORT: Implement Path for WINCE. Most code can be
+ reused for other ports that don't have native path support
+ https://bugs.webkit.org/show_bug.cgi?id=28188
+
+ Written also by George Staikos (including quadCurve() and bezier())
+
+ * platform/graphics/wince/PathWince.cpp: Added.
+ * platform/graphics/wince/PlatformPathWince.cpp: Added.
+ * platform/graphics/wince/PlatformPathWince.h: Added.
+ * platform/graphics/wince/WinceGraphicsExtras.h: Added.
+
+2009-08-12 Joseph Pecoraro <joepeck02@gmail.com>
+
+ "Double-click to add" new style button does not always show up [quick fix]
+ https://bugs.webkit.org/show_bug.cgi?id=28187
+
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertyTreeElement.prototype.updateTitle):
+
+2009-08-12 Crystal Zhang <crystal.zhang@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ WINCE PORT: MediaPlayerProxy and MediaPlayerPrivate
+ https://bugs.webkit.org/show_bug.cgi?id=28178
+
+ * platform/graphics/wince/MediaPlayerPrivateWince.h: Added.
+ * platform/graphics/wince/MediaPlayerProxy.cpp: Added.
+ * platform/graphics/wince/MediaPlayerProxy.h: Added.
+
+2009-08-12 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ HTML 5 database and LocalStorage is not persistent on the Symbian port of QtWebKit
+ https://bugs.webkit.org/show_bug.cgi?id=28175
+
+ Call QDir::toNativeSeparators() before the path is passed to the OS.
+
+ Based on work by David Leong.
+
+ * platform/qt/FileSystemQt.cpp:
+ (WebCore::pathByAppendingComponent):
+
+2009-08-12 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Minor build-fix for SVG Filter. Use getUnmultipliedImageData instead
+ of getImageData. This changed since r47099.
+
+ * platform/graphics/filters/FEColorMatrix.cpp:
+ (WebCore::FEColorMatrix::apply):
+
+2009-08-12 Viet-Trung Luu <viettrungluu@gmail.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Explicitly set control tints for Chromium/Mac, since the controls'
+ NSCell(s) lack an NSView and hence their tint isn't updated
+ automatically when the application is activated/deactivated.
+ https://bugs.webkit.org/show_bug.cgi?id=28108
+ http://crbug.com/18199
+
+ * rendering/RenderThemeChromiumMac.mm:
+ (WebCore::updateNSCellControlTint):
+ (WebCore::RenderThemeChromiumMac::paintCheckbox):
+ (WebCore::RenderThemeChromiumMac::paintRadio):
+ (WebCore::RenderThemeChromiumMac::paintButton):
+ (WebCore::RenderThemeChromiumMac::paintMenuList):
+ (WebCore::RenderThemeChromiumMac::paintSliderThumb):
+ (WebCore::RenderThemeChromiumMac::paintSearchField):
+ (WebCore::RenderThemeChromiumMac::paintSearchFieldCancelButton):
+ (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsDecoration):
+ (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsButton):
+
+2009-08-12 Christian Plesner Hansen <christian.plesner.hansen@gmail.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Fix atomic string externalization crash.
+ Atomic string externalization assumes that all non-empty strings
+ can be externalized which is untrue on 64-bit. This change fixed
+ that.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28215
+
+ This bug causes loads of test crashes, no need to add new tests
+ specifically for this.
+
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::v8StringToAtomicWebCoreString):
+
+2009-08-12 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Fix box-shadow painting in r47103. The edge should not be blurry.
+ Also optimize by not having to save and restore painter state.
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::drawRect):
+ (WebCore::GraphicsContext::fillRect):
+
+2009-08-12 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Reviewed by Adam Treat.
+
+ [Qt] Fix coding style in GraphicsContextQt.cpp
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::toQtCompositionMode):
+ (WebCore::toQtLineCap):
+ (WebCore::toQtLineJoin):
+ (WebCore::GraphicsContextPlatformPrivate::p):
+ (WebCore::GraphicsContext::drawLine):
+ (WebCore::GraphicsContext::strokeArc):
+ (WebCore::GraphicsContext::drawConvexPolygon):
+ (WebCore::GraphicsContext::pen):
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::strokePath):
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::clipPath):
+ (WebCore::GraphicsContext::drawFocusRing):
+ (WebCore::GraphicsContext::beginTransparencyLayer):
+ (WebCore::GraphicsContext::endTransparencyLayer):
+ (WebCore::GraphicsContext::clearRect):
+ (WebCore::GraphicsContext::setLineCap):
+ (WebCore::GraphicsContext::setLineJoin):
+ (WebCore::GraphicsContext::setMiterLimit):
+ (WebCore::GraphicsContext::setAlpha):
+ (WebCore::GraphicsContext::clipOut):
+ (WebCore::GraphicsContext::clipOutEllipseInRect):
+ (WebCore::GraphicsContext::addInnerRoundedRectClip):
+ (WebCore::GraphicsContext::setPlatformStrokeColor):
+ (WebCore::GraphicsContext::setPlatformStrokeStyle):
+ (WebCore::GraphicsContext::setPlatformStrokeThickness):
+
+2009-08-12 Szabo Carol <carol.szabo@nokia.com>
+
+ Reviewed by Simon Hausmann and Ariya Hidayat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=23291
+
+ [Qt] Partial support for -webkit-box-shadow. Blur is not support and
+ the shadow still does not go well with border radius.
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::drawRect):
+ (WebCore::GraphicsContext::fillRect):
+
+2009-08-12 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ Use AM_V_GEN in a few more places, for less noisy builds.
+
+ * GNUmakefile.am:
+
+2009-08-12 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ SVG Filter premultiplied color support for getImageDate/putImageData
+ [https://bugs.webkit.org/show_bug.cgi?id=27933]
+
+ Some SVG Filters need premultiplied ImageData for the calculation. Therefore getImageData
+ and putImageData of ImageBuffer need support for premultiplied colors.
+
+ * html/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::getImageData):
+ (WebCore::CanvasRenderingContext2D::putImageData):
+ * platform/graphics/ImageBuffer.h:
+ (WebCore::):
+ * platform/graphics/cairo/ImageBufferCairo.cpp:
+ (WebCore::getImageData):
+ (WebCore::ImageBuffer::getUnmultipliedImageData):
+ (WebCore::ImageBuffer::getPremultipliedImageData):
+ (WebCore::putImageData):
+ (WebCore::ImageBuffer::putUnmultipliedImageData):
+ (WebCore::ImageBuffer::putPremultipliedImageData):
+ * platform/graphics/cg/ImageBufferCG.cpp:
+ (WebCore::getImageData):
+ (WebCore::ImageBuffer::getUnmultipliedImageData):
+ (WebCore::ImageBuffer::getPremultipliedImageData):
+ (WebCore::putImageData):
+ (WebCore::ImageBuffer::putUnmultipliedImageData):
+ (WebCore::ImageBuffer::putPremultipliedImageData):
+ * platform/graphics/qt/ImageBufferQt.cpp:
+ (WebCore::getImageData):
+ (WebCore::ImageBuffer::getUnmultipliedImageData):
+ (WebCore::ImageBuffer::getPremultipliedImageData):
+ (WebCore::putImageData):
+ (WebCore::ImageBuffer::putUnmultipliedImageData):
+ (WebCore::ImageBuffer::putPremultipliedImageData):
+ * platform/graphics/skia/ImageBufferSkia.cpp:
+ (WebCore::getImageData):
+ (WebCore::ImageBuffer::getUnmultipliedImageData):
+ (WebCore::ImageBuffer::getPremultipliedImageData):
+ (WebCore::putImageData):
+ (WebCore::ImageBuffer::putUnmultipliedImageData):
+ (WebCore::ImageBuffer::putPremultipliedImageData):
+ * platform/graphics/wx/ImageBufferWx.cpp:
+ (WebCore::ImageBuffer::getUnmultipliedImageData):
+ (WebCore::ImageBuffer::getPremultipliedImageData):
+ (WebCore::ImageBuffer::putUnmultipliedImageData):
+ (WebCore::ImageBuffer::putPremultipliedImageData):
+ * svg/graphics/SVGResourceMasker.cpp:
+ (WebCore::SVGResourceMasker::applyMask):
+
+2009-08-12 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Changed Number.bytesToString to support low-resolution output.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28146
+
+ * inspector/front-end/utilities.js:
+ (Number.bytesToString):
+
+2009-08-12 Prasanth Ullattil <prasanth.ullattil@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Add support for hooking BeginPaint/EndPaint on 64Bit Windows
+
+ Webkit uses the runtime patching trick explained by "Feng Yuan" for
+ hooking these paint functions. It currently supports only 32bit assembly
+ code. This patch adds support for 64Bit version. Since inline-assemblies
+ are not supported for 64Bit, we have use a seperate .asm file.
+
+ * WebCore.pro:
+ * plugins/win/PaintHooks.asm: Added.
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::hookedBeginPaint):
+ (WebCore::PluginView::hookedEndPaint):
+ (WebCore::hook):
+
+2009-08-11 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Make it harder to misuse try* allocation routines
+ https://bugs.webkit.org/show_bug.cgi?id=27469
+
+ Add forwarding header for PossiblyNull type, and add missing null check
+ to ImageBuffer creation.
+
+ * ForwardingHeaders/wtf/PossiblyNull.h: Added.
+ * platform/graphics/cg/ImageBufferCG.cpp:
+ (WebCore::ImageBuffer::ImageBuffer):
+
+2009-08-11 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Restrict use of FuncDeclNode & FuncExprNode to the parser.
+ https://bugs.webkit.org/show_bug.cgi?id=28209
+
+ * inspector/JavaScriptDebugServer.cpp:
+ (WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
+ Function signature change.
+
+2009-08-11 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Adam Treat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27965
+ Merge skia/ImageSourceSkia.cpp into ImageSource.cpp.
+
+ * WebCore.gypi: Remove deleted file, plus a file that was deleted a while back.
+ * platform/graphics/ImageSource.cpp:
+ (WebCore::ImageSource::setData): Use slightly shorter syntax.
+ (WebCore::ImageSource::filenameExtension): Use shorter syntax.
+ (WebCore::ImageSource::createFrameAtIndex): Remove redundant call, clarify comments, reject all empty images.
+ (WebCore::ImageSource::frameHasAlphaAtIndex): Clarify comments, use shorter syntax.
+ * platform/graphics/skia/ImageSourceSkia.cpp: Removed.
+
+2009-08-11 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ SharedWorkers do not exit when the last parent document exits
+ https://bugs.webkit.org/show_bug.cgi?id=28170
+
+ Prevents Documents from being suspended/placed in the page cache if they are associated with shared workers.
+
+ Added vector cache instead of nested hash tables for SharedWorker repository.
+
+ Added SharedWorkerRepository::documentDetached API.
+
+ * dom/Document.cpp:
+ (WebCore::Document::detach):
+ Notifies SharedWorkerRepository when the document is closing.
+ * loader/FrameLoader.cpp:
+ Updated FrameLoader to not cache the Document if it is associated with a SharedWorker (since we can't suspend workers yet, we need to shut them down).
+ (WebCore::FrameLoader::canCachePageContainingThisFrame):
+ (WebCore::FrameLoader::logCanCacheFrameDecision):
+ * workers/DefaultSharedWorkerRepository.cpp:
+ (WebCore::SharedWorkerProxy::create):
+ (WebCore::SharedWorkerProxy::isClosing):
+ Renamed from closing().
+ (WebCore::SharedWorkerProxy::matches):
+ Added manual equality function to replace old hash lookup.
+ (WebCore::SharedWorkerProxy::isDocumentInWorkerDocuments):
+ Checks to see if a document is in the worker's list of documents. Used to determine if page is suspendable.
+ (WebCore::SharedWorkerProxy::SharedWorkerProxy):
+ (WebCore::SharedWorkerProxy::addToWorkerDocuments):
+ Added tracking of the worker's list of documents for lifecycle purposes.
+ (WebCore::SharedWorkerProxy::documentDetached):
+ Shuts down the proxy when the last associated document is detached.
+ (WebCore::SharedWorkerProxy::close):
+ Marks the proxy as closed so it is no longer shared with new instances.
+ (WebCore::SharedWorkerProxy::workerContextDestroyed):
+ Removes the proxy from the repository/frees the proxy when the associated SharedWorkerContext is destroyed.
+ (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
+ closing()->isClosing()
+ (WebCore::SharedWorkerRepository::documentDetached):
+ (WebCore::SharedWorkerRepository::hasSharedWorkers):
+ Used by FrameLoader to determine if a page has shared workers and so cannot be suspended/cached.
+ (WebCore::DefaultSharedWorkerRepository::hasSharedWorkers):
+ (WebCore::DefaultSharedWorkerRepository::removeProxy):
+ Invoked by workerContextDestroyed() to remove a SharedWorkerProxy from the repository.
+ (WebCore::DefaultSharedWorkerRepository::documentDetached):
+ (WebCore::DefaultSharedWorkerRepository::connectToWorker):
+ (WebCore::DefaultSharedWorkerRepository::getProxy):
+ * workers/DefaultSharedWorkerRepository.h:
+ * workers/SharedWorkerRepository.h:
+
+2009-08-11 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 28200 - ListMarker should be included as part of the text value to parse
+ https://bugs.webkit.org/show_bug.cgi?id=28200
+
+ When returning text through the marker range attributes, the list marker text should
+ also be included. It isn't included by default because a TextIterator is used which
+ only looks at Nodes for text. A list marker does not have a corresponding node,
+ so its text is not returned through accessibility. That is, until now.
+
+ Test: platform/mac/accessibility/string-range-contains-listmarker.html
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::listMarkerTextForRange):
+ (WebCore::AccessibilityObject::stringForVisiblePositionRange):
+ * accessibility/AccessibilityObject.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):
+ (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
+ * rendering/RenderListItem.h:
+
+ Make markerText() public so that accessibility code can access it.
+
+2009-08-11 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Adam Treat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27965
+ Move cairo/ImageSourceCairo.cpp to ImageSource.cpp in preparation for
+ merging most of the other ImageSource*.cpp files with it.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * platform/graphics/ImageSource.cpp: Copied from WebCore/platform/graphics/cairo/ImageSourceCairo.cpp.
+ * platform/graphics/cairo/ImageSourceCairo.cpp: Removed.
+
+2009-08-10 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Cairo-based Windows port does not handle the https protocol.
+ https://bugs.webkit.org/show_bug.cgi?id=28171.
+
+ No new tests needed. Existing https tests show this failure
+ for WinCairo builds.
+
+ * WebCore.vcproj/WebCoreCURL.vsprops: Add a few preprocessor
+ definitions for SSL support in cURL.
+ * platform/network/curl/ResourceHandleManager.h: Add new
+ certificate path member variable.
+ * platform/network/curl/ResourceHandleManager.cpp:
+ (WebCore::certificateBundlePath): New method to retrieve the
+ proper certificate resource bundle path.
+ (WebCore::ResourceHandleManager::initializeHandle): Check for
+ the resource bundle and use if available to activate SSL
+ support.
+
+2009-08-11 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Haiku] Use Clipboard::create() instead of the constructor of Clipboard.
+ https://bugs.webkit.org/show_bug.cgi?id=28127
+
+ * editing/haiku/EditorHaiku.cpp:
+ (WebCore::Editor::newGeneralClipboard):
+ * page/haiku/EventHandlerHaiku.cpp:
+ (WebCore::EventHandler::passWheelEventToWidget):
+ (WebCore::EventHandler::createDraggingClipboard):
+ * platform/haiku/ClipboardHaiku.cpp: Style cleanup. There were many whitespace end of lines.
+ (WebCore::ClipboardHaiku::ClipboardHaiku):
+ (WebCore::ClipboardHaiku::clearAllData):
+ (WebCore::ClipboardHaiku::getData):
+ (WebCore::ClipboardHaiku::setData):
+ (WebCore::ClipboardHaiku::types):
+ (WebCore::ClipboardHaiku::dragLocation):
+ (WebCore::ClipboardHaiku::dragImage):
+ (WebCore::ClipboardHaiku::setDragImage):
+ (WebCore::ClipboardHaiku::dragImageElement):
+ (WebCore::ClipboardHaiku::createDragImage):
+ (WebCore::ClipboardHaiku::declareAndWriteDragImage):
+ (WebCore::ClipboardHaiku::writeURL):
+ (WebCore::ClipboardHaiku::writeRange):
+ (WebCore::ClipboardHaiku::hasData):
+ * platform/haiku/DragDataHaiku.cpp:
+ (WebCore::DragData::createClipboard):
+
+2009-08-11 Drew Wilson <atwilson@google.com>
+
+ Reviewed by NOBODY (build break).
+
+ Speculative GTK build fix
+
+ * GNUmakefile.am:
+ Added missing .idl file, and added notifications directory to IDL_PATH.
+
+2009-08-11 Drew Wilson <atwilson@google.com>
+
+ Reviewed by NOBODY (build break).
+
+ Speculative Windows build fix
+
+ * WebCore.vcproj/WebCore.vcproj:
+ Added missing build steps for non-debug targets.
+
+2009-08-11 Drew Wilson <atwilson@google.com>
+
+ Reviewed by NOBODY (build break)
+
+ Speculative build fix for Qt build.
+
+ * WebCore.pro: Added /notifications to include path
+
+2009-08-11 John Gregg <johnnyg@google.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Desktop Notifications API
+ https://bugs.webkit.org/show_bug.cgi?id=25463
+
+ Adds an implementation of desktop notifications, behind the compile-time
+ flag ENABLE(NOTIFICATIONS). This code simply relays calls on the JavaScript
+ API through a NotificationProvider interface, which must provide the services
+ to actually notify the user and manage the desktop. This provider is injected
+ into WebKit through the ChromeClient for normal page contexts and through the
+ WorkerThread for worker contexts.
+
+ A permissions API is defined on a per-origin basis, which allows a web page
+ to check if its origin is allowed to show desktop notifications, and to request
+ permission for its origin.
+
+ * Configurations/FeatureDefines.xcconfig:
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ * bindings/js/JSDesktopNotificationsCustom.cpp: Added.
+ (WebCore::JSNotificationCenter::requestPermission):
+ (WebCore::JSNotification::addEventListener):
+ (WebCore::JSNotification::removeEventListener):
+ * bindings/js/JSEventTarget.cpp:
+ (WebCore::toJS):
+ (WebCore::toEventTarget):
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::toNotification):
+ * dom/EventTarget.h:
+ * loader/EmptyClients.h:
+ (WebCore::EmptyChromeClient::notificationPresenter):
+ * notifications: Added.
+ * notifications/Notification.cpp: Added.
+ (WebCore::Notification::Notification):
+ (WebCore::Notification::~Notification):
+ (WebCore::Notification::show):
+ (WebCore::Notification::cancel):
+ (WebCore::Notification::ondisplay):
+ (WebCore::Notification::setOndisplay):
+ (WebCore::Notification::onerror):
+ (WebCore::Notification::setOnerror):
+ (WebCore::Notification::onclose):
+ (WebCore::Notification::setOnclose):
+ (WebCore::Notification::getAttributeEventListener):
+ (WebCore::Notification::setAttributeEventListener):
+ (WebCore::Notification::clearAttributeEventListener):
+ (WebCore::Notification::dispatchDisplayEvent):
+ (WebCore::Notification::dispatchErrorEvent):
+ (WebCore::Notification::dispatchCloseEvent):
+ (WebCore::Notification::addEventListener):
+ (WebCore::Notification::removeEventListener):
+ (WebCore::Notification::handleEvent):
+ (WebCore::Notification::dispatchEvent):
+ * notifications/Notification.h: Added.
+ (WebCore::Notification::create):
+ (WebCore::Notification::isHTML):
+ (WebCore::Notification::url):
+ (WebCore::Notification::contents):
+ (WebCore::Notification::scriptExecutionContext):
+ (WebCore::Notification::toNotification):
+ (WebCore::Notification::refEventTarget):
+ (WebCore::Notification::derefEventTarget):
+ * notifications/Notification.idl: Added.
+ * notifications/NotificationCenter.cpp: Added.
+ (WebCore::NotificationCenter::NotificationCenter):
+ (WebCore::NotificationCenter::checkPermission):
+ (WebCore::NotificationCenter::requestPermission):
+ * notifications/NotificationCenter.h: Added.
+ (WebCore::NotificationCenter::create):
+ (WebCore::NotificationCenter::createHTMLNotification):
+ (WebCore::NotificationCenter::createNotification):
+ (WebCore::NotificationCenter::context):
+ (WebCore::NotificationCenter::presenter):
+ * notifications/NotificationCenter.idl: Added.
+ * notifications/NotificationContents.h: Added.
+ (WebCore::NotificationContents::NotificationContents):
+ (WebCore::NotificationContents::icon):
+ (WebCore::NotificationContents::title):
+ (WebCore::NotificationContents::body):
+ * notifications/NotificationPresenter.h: Added.
+ (WebCore::NotificationPresenter::):
+ (WebCore::NotificationPresenter::~NotificationPresenter):
+ * page/Chrome.cpp:
+ (WebCore::Chrome::notificationPresenter):
+ * page/Chrome.h:
+ * page/ChromeClient.h:
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::clear):
+ (WebCore::DOMWindow::webkitNotifications):
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl:
+ * page/Page.h:
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::~WorkerContext):
+ (WebCore::WorkerContext::webkitNotifications):
+ * workers/WorkerContext.h:
+ * workers/WorkerContext.idl:
+ * workers/WorkerThread.h:
+ (WebCore::WorkerThread::getNotificationPresenter):
+ (WebCore::WorkerThread::setNotificationPresenter):
+
+2009-08-11 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: Console Drawer is Toggling instead of Staying Open
+ https://bugs.webkit.org/show_bug.cgi?id=28115
+
+ * inspector/front-end/Drawer.js:
+ (WebInspector.Drawer.prototype.showView): ensures the drawer will be open and showing the provided view
+ * inspector/front-end/inspector.js:
+ (WebInspector.showConsole): usees the new showView to guarantee the Drawer will be open
+ (WebInspector.showChanges): uses the new showView guarantee the Drawer will be open
+
+2009-08-11 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] WMLPageState is not allowed to store the active card, it needs to be done per document
+ https://bugs.webkit.org/show_bug.cgi?id=28180
+
+ Don't store the active WMLCardElement in WMLPageState, but in WMLDocument.
+ Otherwhise this may lead to crashes related to intrinsic event exeuction.
+
+ Unfortunately select elements aren't testable by the layout tests, so adding
+ a new manual test reproducing the crash.
+
+ * manual-tests/wml/select-onpick-event-crash.wml: Added.
+ * wml/WMLCardElement.cpp:
+ (WebCore::WMLCardElement::determineActiveCard):
+ * wml/WMLDoElement.cpp:
+ (WebCore::WMLDoElement::defaultEventHandler):
+ * wml/WMLDocument.cpp:
+ (WebCore::WMLDocument::finishedParsing):
+ * wml/WMLDocument.h:
+ (WebCore::WMLDocument::activeCard):
+ * wml/WMLGoElement.cpp:
+ (WebCore::WMLGoElement::executeTask):
+ * wml/WMLPageState.cpp:
+ (WebCore::WMLPageState::WMLPageState):
+ * wml/WMLPageState.h:
+ * wml/WMLPrevElement.cpp:
+ (WebCore::WMLPrevElement::executeTask):
+ * wml/WMLRefreshElement.cpp:
+ (WebCore::WMLRefreshElement::executeTask):
+
+2009-08-07 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28073
+ Treat icons with no bit count and no color count as 256-color for
+ purposes of quality ranking. Also fix a couple cases of a style
+ violation.
+
+ Test: fast/images/icon-0colors.html
+
+ * platform/image-decoders/ico/ICOImageDecoder.cpp:
+ (WebCore::ICOImageDecoder::processDirectory):
+ (WebCore::ICOImageDecoder::readDirectoryEntry):
+
+2009-08-11 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ Need to refactor WorkerObjectProxy.
+ https://bugs.webkit.org/show_bug.cgi?id=28136
+
+ Added WorkerReportingProxy for reporting worker state (exceptions, console messages, thread exited) to the parent.
+
+ Existing tests are sufficient, as this is only a refactoring.
+
+ * GNUmakefile.am:
+ Added WorkerReportingProxy.h to build.
+ * WebCore.gypi:
+ Added WorkerReportingProxy.h to build.
+ * WebCore.vcproj/WebCore.vcproj:
+ Added WorkerReportingProxy.h to build.
+ * WebCore.xcodeproj/project.pbxproj:
+ Added WorkerReportingProxy.h to build.
+ * workers/DedicatedWorkerContext.cpp:
+ * workers/DedicatedWorkerContext.h:
+ Removed addMessage/forwardException() APIs - now handled by WorkerReportingProxy.
+ * workers/DedicatedWorkerThread.cpp:
+ (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
+ Changed constructor to pass WorkerReportingProxy to base class.
+ * workers/DefaultSharedWorkerRepository.cpp:
+ Updated SharedWorkerProxy to implement WorkerReportingProxy interface.
+ (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
+ (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
+ (WebCore::SharedWorkerProxy::workerContextClosed):
+ (WebCore::SharedWorkerProxy::workerContextDestroyed):
+ (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
+ Now passes in WorkerReportingProxy when creating SharedWorkerThread.
+ * workers/SharedWorkerContext.cpp:
+ * workers/SharedWorkerContext.h:
+ Removed addMessage/forwardException() APIs - now handled by WorkerReportingProxy.
+ * workers/SharedWorkerThread.cpp:
+ (WebCore::SharedWorkerThread::create):
+ (WebCore::SharedWorkerThread::SharedWorkerThread):
+ Passes WorkerReportingProxy to base class constructor.
+ * workers/SharedWorkerThread.h:
+ Constructor now takes a WorkerReportingProxy.
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::~WorkerContext):
+ Moved code that calls workerContextDestroyed() into base class so shared workers share this functionality.
+ (WebCore::WorkerContext::close):
+ Now notifies WorkerReportingProxy when the thread is closing.
+ (WebCore::WorkerContext::reportException):
+ Reports exceptions via WorkerReportingProxy.
+ (WebCore::WorkerContext::addMessage):
+ Reports console messages via WorkerReportingProxy.
+ * workers/WorkerContext.h:
+ * workers/WorkerObjectProxy.h:
+ (WebCore::WorkerObjectProxy::workerContextClosed):
+ Default empty implementation for dedicated workers.
+ * workers/WorkerReportingProxy.h: Added.
+ Base interface that contains APIs moved from WorkerObjectProxy.
+ (WebCore::WorkerReportingProxy::~WorkerReportingProxy):
+ * workers/WorkerThread.cpp:
+ (WebCore::WorkerThread::WorkerThread):
+ Updated constructor to accept a WorkerReportingProxy.
+ * workers/WorkerThread.h:
+ (WebCore::WorkerThread::workerReportingProxy):
+
+2009-08-11 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by NOBODY (build fix).
+
+ Fix the Qt build after r47022.
+
+ Use the new markChildren() pattern for marking aggregate/child objects.
+
+ * bridge/qt/qt_instance.cpp:
+ (JSC::Bindings::QtRuntimeObjectImp::markChildren):
+ (JSC::Bindings::QtInstance::markAggregate):
+ * bridge/qt/qt_instance.h:
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
+ * bridge/qt/qt_runtime.h:
+
+2009-08-11 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ Fix the build on the Qt build bot by making the generated JS bindings
+ files depend on the code generator itself.
+
+ * WebCore.pro:
+
+2009-08-07 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Sam Weinig
+
+ Stack overflow crash in JavaScript garbage collector mark pass
+ https://bugs.webkit.org/show_bug.cgi?id=12216
+
+ Make WebCore use the new iterative marking logic.
+
+ Tests: fast/js/nested-object-gc.html
+
+ * bindings/js/JSAbstractWorkerCustom.cpp:
+ (WebCore::JSAbstractWorker::markChildren):
+ * bindings/js/JSDOMApplicationCacheCustom.cpp:
+ (WebCore::JSDOMApplicationCache::markChildren):
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::markDOMNodesForDocument):
+ (WebCore::markActiveObjectsForContext):
+ (WebCore::markDOMObjectWrapper):
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::DOMObjectWithGlobalPointer::markChildren):
+ * bindings/js/JSDOMGlobalObject.cpp:
+ (WebCore::JSDOMGlobalObject::markChildren):
+ * bindings/js/JSDOMGlobalObject.h:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::markChildren):
+ * bindings/js/JSDOMWindowShell.cpp:
+ (WebCore::JSDOMWindowShell::markChildren):
+ * bindings/js/JSDOMWindowShell.h:
+ * bindings/js/JSDedicatedWorkerContextCustom.cpp:
+ (WebCore::JSDedicatedWorkerContext::markChildren):
+ * bindings/js/JSDocumentCustom.cpp:
+ (WebCore::JSDocument::markChildren):
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::JSEventListener::markJSFunction):
+ * bindings/js/JSEventListener.h:
+ * bindings/js/JSMessageChannelCustom.cpp:
+ (WebCore::JSMessageChannel::markChildren):
+ * bindings/js/JSMessagePortCustom.cpp:
+ (WebCore::JSMessagePort::markChildren):
+ * bindings/js/JSNavigatorCustom.cpp:
+ (WebCore::JSNavigator::markChildren):
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::markChildren):
+ * bindings/js/JSNodeFilterCondition.cpp:
+ (WebCore::JSNodeFilterCondition::markAggregate):
+ * bindings/js/JSNodeFilterCondition.h:
+ * bindings/js/JSNodeFilterCustom.cpp:
+ (WebCore::JSNodeFilter::markChildren):
+ * bindings/js/JSNodeIteratorCustom.cpp:
+ (WebCore::JSNodeIterator::markChildren):
+ * bindings/js/JSQuarantinedObjectWrapper.cpp:
+ (WebCore::JSQuarantinedObjectWrapper::markChildren):
+ * bindings/js/JSQuarantinedObjectWrapper.h:
+ * bindings/js/JSSVGElementInstanceCustom.cpp:
+ (WebCore::JSSVGElementInstance::markChildren):
+ * bindings/js/JSSharedWorkerCustom.cpp:
+ (WebCore::JSSharedWorker::markChildren):
+ * bindings/js/JSStyleSheetCustom.cpp:
+ (WebCore::JSStyleSheet::markChildren):
+ * bindings/js/JSTreeWalkerCustom.cpp:
+ (WebCore::JSTreeWalker::markChildren):
+ * bindings/js/JSWebSocketCustom.cpp:
+ (WebCore::JSWebSocket::markChildren):
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::markChildren):
+ * bindings/js/JSWorkerCustom.cpp:
+ (WebCore::JSWorker::markChildren):
+ * bindings/js/JSXMLHttpRequestCustom.cpp:
+ (WebCore::JSXMLHttpRequest::markChildren):
+ * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
+ (WebCore::JSXMLHttpRequestUpload::markChildren):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * dom/EventListener.h:
+ (WebCore::EventListener::markJSFunction):
+ (WebCore::markIfNotNull):
+ * dom/NodeFilter.h:
+ (WebCore::NodeFilter::markAggregate):
+ * dom/NodeFilterCondition.h:
+ (WebCore::NodeFilterCondition::markAggregate):
+ * dom/RegisteredEventListener.h:
+ (WebCore::markEventListeners):
+ * page/DOMWindow.h:
+ * workers/WorkerContext.h:
+
+2009-08-10 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Renamed all V8 NPN_ functions to _NPN_ to match JSC and make them "private".
+ https://bugs.webkit.org/show_bug.cgi?id=28089
+
+ Rename all the NPN_foo functions to _NPN_foo so that they can't directly be
+ called by mistake. This roughly matches the way JSC does it, which is an
+ additional advantage.
+
+ * bindings/v8/NPV8Object.cpp:
+ (npCreateV8ScriptObject):
+ (_NPN_Invoke):
+ (_NPN_InvokeDefault):
+ (_NPN_Evaluate):
+ (_NPN_EvaluateHelper):
+ (_NPN_GetProperty):
+ (_NPN_SetProperty):
+ (_NPN_RemoveProperty):
+ (_NPN_HasProperty):
+ (_NPN_HasMethod):
+ (_NPN_SetException):
+ (_NPN_Enumerate):
+ (_NPN_Construct):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::clearScriptObjects):
+ (WebCore::ScriptController::createScriptInstanceForWidget):
+ (WebCore::ScriptController::cleanupScriptObjectsForPlugin):
+ * bindings/v8/V8NPObject.cpp:
+ (npObjectInvokeImpl):
+ (npObjectGetProperty):
+ (npObjectIndexedPropertyGetter):
+ (npObjectGetIndexedProperty):
+ (npObjectSetProperty):
+ (npObjectIndexedPropertySetter):
+ (npObjectSetIndexedProperty):
+ (weakNPObjectCallback):
+ (createV8ObjectForNPObject):
+ (forgetV8ObjectForNPObject):
+ * bindings/v8/V8NPUtils.cpp:
+ (getStringIdentifier):
+ * bindings/v8/npruntime.cpp:
+ * bindings/v8/npruntime_impl.h:
+
+2009-08-10 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Brady Eidson.
+
+ Change ___Storage.key() to match current spec behavior.
+ https://bugs.webkit.org/show_bug.cgi?id=28112
+
+ The current WebStorage spec says that ___Storage.key() should return null when
+ the index is out of bounds, rather than an exception. A bunch of logic can be
+ simplified after this change.
+
+ * bindings/js/JSStorageCustom.cpp:
+ (WebCore::JSStorage::getPropertyNames):
+ * bindings/v8/custom/V8StorageCustom.cpp:
+ (WebCore::V8Custom::v8StorageNamedPropertyEnumerator):
+ * storage/Storage.cpp:
+ (WebCore::Storage::key):
+ * storage/Storage.h:
+ * storage/Storage.idl:
+ * storage/StorageArea.h:
+ * storage/StorageAreaImpl.cpp:
+ (WebCore::StorageAreaImpl::key):
+ * storage/StorageAreaImpl.h:
+ * storage/StorageMap.cpp:
+ (WebCore::StorageMap::key):
+ * storage/StorageMap.h:
+
+2009-08-07 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28087
+
+ Mods for a chrome specific impl of ApplicationCacheHost.
+
+ * The public section of the interface is the same, but we use
+ PLATFORM(CHROMIUM) to identify which parts of the private
+ section are shared. The chrome specific internals are encapsulated
+ in a seperate ApplicationCacheHostInternal class. WebCore common
+ code only contains a forward reference to this class.
+
+ * Cleanup a couple of stale comments.
+
+ * Have window.applicationCache return null to script when the
+ feature is disabled in the preferences.
+
+ No new tests.
+
+ * loader/appcache/ApplicationCacheHost.cpp:
+ * loader/appcache/ApplicationCacheHost.h:
+ (WebCore::ApplicationCacheHost::documentLoader):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::applicationCache):
+
+2009-08-10 Crystal Zhang <crystal.zhang@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ Implement GraphicsContext::fillRoundRect() for WINCE port
+ https://bugs.webkit.org/show_bug.cgi?id=27842
+
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/wince/GraphicsContextWince.cpp:
+ (WebCore::rectCenterPoint):
+ (WebCore::GraphicsContext::fillRoundedRect):
+ (WebCore::GraphicsContext::drawRoundCorner):
+
+2009-08-10 Anthony Ricaud <rik@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector Resources / Graphs should support filtering
+ https://bugs.webkit.org/show_bug.cgi?id=20629
+
+ Introduces a filter bar for resources.
+
+ Thanks to Matt Lilek for the CSS scope bar.
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.createFilterElement):
+ (WebInspector.ResourcesPanel):
+ (WebInspector.ResourcesPanel.prototype.toolbarItemClass.categoryOrder.filter):
+ (WebInspector.ResourcesPanel.prototype._updateFilter):
+ (WebInspector.ResourcesPanel.prototype._updateSummaryGraph):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+
+2009-08-10 Brent Fulgham <bfulgham@webkit.org>
+
+ Unreviewed build correction after http://trac.webkit.org/changeset/46978
+
+ * platform/network/curl/ResourceHandleManager.cpp:
+ (WebCore::ResourceHandleManager::initializeHandle): Correct
+ deprecated removeRef to new removeFragmentIdentifier.
+
+2009-08-07 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Justin Garcia.
+
+ Background color formatting lost on enter
+ https://bugs.webkit.org/show_bug.cgi?id=20348
+
+ This patch makes background color be preserved during editing.
+ In particular, editingStyleAtPosition would include the background color when obtaining styles.
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::): Added CSSPropertyBackgroundColor to editingStyleProperties
+
+2009-08-10 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Stop sending QEvent::CursorChange to Qt for mouse move.
+
+ Verify if the cursor didn't change in WidgetQt::setCursor,
+ just like the mac port does.
+
+ Thanks to Adriano Rezendo for spotting and debugging the
+ issue.
+
+ * platform/qt/WidgetQt.cpp:
+ (WebCore::Widget::setCursor):
+
+2009-08-10 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28165
+ Application cache maximum size cannot be set before the database is opened
+
+ * loader/appcache/ApplicationCacheStorage.cpp:
+ (WebCore::ApplicationCacheStorage::vacuumDatabaseFile): Open appcache database if it isn't
+ open yet.
+
+2009-08-10 Vitaly Repeshko <vitalyr@quad.spb.corp.google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Fix memory leak in node event listeners. See http://crbug.com/17400.
+ https://bugs.webkit.org/show_bug.cgi?id=28156
+
+ * bindings/scripts/CodeGeneratorV8.pm: Custom event handler accessors now apply to all Node descendants.
+ * bindings/v8/V8AbstractEventListener.h:
+ (WebCore::V8AbstractEventListener::isObjectListener): Added virtual method to detect listeners that have weak references to JS objects.
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ * bindings/v8/V8ObjectEventListener.cpp:
+ * bindings/v8/V8ObjectEventListener.h:
+ (WebCore::V8ObjectEventListener::isObjectListener):
+ * bindings/v8/V8Utilities.cpp:
+ (WebCore::removeHiddenDependency):
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8ElementCustom.cpp:
+ * bindings/v8/custom/V8NodeCustom.cpp: Moved custom accessors from V8ElementCustom.cpp.
+ (WebCore::toEventType):
+ (WebCore::getEventListener):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::getEventListener): Made static.
+
+2009-08-10 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Cleanup DOM Storage namespace shutdown code usage of security origin.
+ https://bugs.webkit.org/show_bug.cgi?id=28094
+
+ If a storage namespace is not explicitly closed, be sure to do so on
+ destruction of the object. In addition, the close call should wait
+ on the background thread finishing its syncing. (Not doing so is actually
+ a regression from the original LocalStorage code.)
+
+ There's no point to passing in the SecurityOrigin when copying a storage
+ area since what was passed in is exactly what is stored within each
+ storage area. In addition, the non-copy constructor should take in a
+ PassRefPtr rather than a pointer since that pointer was only passed into
+ the constuctor for RefPtr's anyway.
+
+ * storage/StorageAreaImpl.cpp:
+ (WebCore::StorageAreaImpl::StorageAreaImpl):
+ (WebCore::StorageAreaImpl::copy):
+ * storage/StorageAreaImpl.h:
+ * storage/StorageNamespaceImpl.cpp:
+ (WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
+ (WebCore::StorageNamespaceImpl::~StorageNamespaceImpl):
+ (WebCore::StorageNamespaceImpl::copy):
+ (WebCore::StorageNamespaceImpl::close):
+ * storage/StorageNamespaceImpl.h:
+
+2009-08-10 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Not reviewed, build fix.
+
+ Rename ref() to fragmentIdentifier() in the wml/ subdirectory.
+
+ * wml/WMLCardElement.cpp:
+ (WebCore::WMLCardElement::determineActiveCard):
+ * wml/WMLGoElement.cpp:
+ (WebCore::WMLGoElement::executeTask):
+ * wml/WMLPageState.cpp:
+ (WebCore::WMLPageState::canAccessDeck):
+
+2009-08-10 Steve Falkenburg <sfalken@apple.com>
+
+ Windows build fix.
+
+ Exclude JSMedia.cpp from build since it is included in DerivedSources.cpp.
+ Fixes linker warnings.
+
+ Corrected spelling of JSInspectorBackend.cpp.
+
+ Other changes related to actually using a Visual Studio to open/save the vcproj file.
+
+ * WebCore.vcproj/WebCore.vcproj:
+
+2009-08-10 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Remove a dead #define.
+
+ * bindings/js/JSDOMBinding.cpp:
+
+2009-08-10 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [Chromium] Update KURLGoogle for ref* method renames in
+ http://trac.webkit.org/changeset/46978.
+ https://bugs.webkit.org/show_bug.cgi?id=28084
+
+ * bindings/v8/custom/V8LocationCustom.cpp:
+ (WebCore::ACCESSOR_SETTER): Renamed ref and setRef to fragmentIdentifier and
+ setFragmentIdentifier, respectively.
+ * platform/KURLGoogle.cpp: Ditto, plus all other ref* method names.
+
+2009-08-10 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ [Gtk] Unreviewed. Fix the nit as suggested by Darin in bug #28144
+ for r46989.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::finishedCallback):
+
+2009-08-10 John Kjellberg <john.kjellberg@power.alstom.com>
+
+ Reviewed by Darin Adler.
+
+ Memory leak in error handling code for SOUP interface
+ https://bugs.webkit.org/show_bug.cgi?id=28144
+
+ Freed memory leaked in error handling code for soup requests.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::finishedCallback):
+ (WebCore::):
+
+2009-08-10 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Provide graceful handling of the situation when an embedder invokes
+ visited link update methods before a Page constructor has been called.
+ https://bugs.webkit.org/show_bug.cgi?id=28149
+
+ * page/Page.cpp:
+ (WebCore::Page::allVisitedStateChanged): Added a null-check for allPages.
+ (WebCore::Page::visitedStateChanged): Ditto.
+
+2009-08-10 Xan Lopez <xlopez@igalia.com>
+
+ Fix GTKbuild.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::):
+
+2009-08-10 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Remove the redundant, Windows CE-only GlyphBuffer::advnaceData()
+
+ * platform/graphics/GlyphBuffer.h: Removed advanceData().
+ * platform/graphics/wince/GraphicsContextWince.cpp:
+ (WebCore::GraphicsContext::drawText): Changed to use advances(from)
+ instead of advanceData() from.
+
+2009-08-10 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Remove workaround for older libsoup versions.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::fillResponseFromMessage):
+
+2009-08-10 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Let startHttp validate the URI instead of doing it, with potential
+ crashes, in ::start.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::startHttp):
+
+2009-08-10 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ When empty <input> is focused, getSelection() exposes shadow tree nodes
+ https://bugs.webkit.org/show_bug.cgi?id=15903
+
+ Test: fast/forms/shadow-tree-exposure.html
+
+ * page/DOMSelection.cpp:
+ (WebCore::selectionShadowAncestor): Added.
+ (WebCore::DOMSelection::anchorNode): Return the parent of the shadow
+ ancestor if the selection is in a shadow tree. Matches Firefox.
+ (WebCore::DOMSelection::anchorOffset): Return the index of the shadow
+ ancestor if the selection is in a shadow tree. Matches Firefox.
+ (WebCore::DOMSelection::focusNode): Ditto.
+ (WebCore::DOMSelection::focusOffset): Ditto.
+ (WebCore::DOMSelection::baseNode): More of the same, but since this
+ is a WebKit-invented property, it does not match Firefox.
+ (WebCore::DOMSelection::baseOffset): Ditto.
+ (WebCore::DOMSelection::extentNode): Ditto.
+ (WebCore::DOMSelection::extentOffset): Ditto.
+ (WebCore::DOMSelection::isCollapsed): Return true even when the
+ selection is a range, if the selection is in the shadow tree.
+ Matches Firefox. Also changed behavior when called and the frame
+ is gone to return true instead of false which makes more sense.
+ (WebCore::DOMSelection::empty): Use clear() just like the other
+ selection-clearing function in this file does.
+ (WebCore::DOMSelection::getRangeAt): Return a range that starts
+ and ends before the shadow ancestor. Matches Firefox.
+
+2009-08-10 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Make all status bar button images glyph-based.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28124
+
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel):
+ * inspector/front-end/Images/clearConsoleButtonGlyph.png: Added.
+ * inspector/front-end/Images/clearConsoleButtons.png: Removed.
+ * inspector/front-end/Images/consoleButtonGlyph.png: Added.
+ * inspector/front-end/Images/consoleButtons.png: Removed.
+ * inspector/front-end/Images/dockButtonGlyph.png: Added.
+ * inspector/front-end/Images/dockButtons.png: Removed.
+ * inspector/front-end/Images/enableButtons.png: Removed.
+ * inspector/front-end/Images/enableOutlineButtonGlyph.png: Added.
+ * inspector/front-end/Images/enableSolidButtonGlyph.png: Added.
+ * inspector/front-end/Images/excludeButtonGlyph.png: Added.
+ * inspector/front-end/Images/excludeButtons.png: Removed.
+ * inspector/front-end/Images/focusButtonGlyph.png: Added.
+ * inspector/front-end/Images/focusButtons.png: Removed.
+ * inspector/front-end/Images/largerResourcesButtonGlyph.png: Added.
+ * inspector/front-end/Images/largerResourcesButtons.png: Removed.
+ * inspector/front-end/Images/nodeSearchButtonGlyph.png: Added.
+ * inspector/front-end/Images/nodeSearchButtons.png: Removed.
+ * inspector/front-end/Images/pauseOnExceptionButtonGlyph.png: Added.
+ * inspector/front-end/Images/pauseOnExceptionButtons.png: Removed.
+ * inspector/front-end/Images/percentButtonGlyph.png: Added.
+ * inspector/front-end/Images/percentButtons.png: Removed.
+ * inspector/front-end/Images/recordButtonGlyph.png: Added.
+ * inspector/front-end/Images/recordButtons.png: Removed.
+ * inspector/front-end/Images/recordToggledButtonGlyph.png: Added.
+ * inspector/front-end/Images/reloadButtonGlyph.png: Added.
+ * inspector/front-end/Images/reloadButtons.png: Removed.
+ * inspector/front-end/Images/undockButtonGlyph.png: Added.
+ * inspector/front-end/Panel.js:
+ (WebInspector.Panel.prototype.createStatusBarButton):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.html:
+
+2009-08-07 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ KURL ref() methods should be fragmentIdentifier() methods
+ https://bugs.webkit.org/show_bug.cgi?id=28084
+
+ In addition to the renames, also took the chance to replace all use of:
+ setRef(String());
+ with:
+ removeFragmentIdentifier();
+
+ * platform/KURL.cpp:
+ (WebCore::KURL::fragmentIdentifier):
+ (WebCore::KURL::hasFragmentIdentifier):
+ (WebCore::KURL::setFragmentIdentifier):
+ (WebCore::KURL::removeFragmentIdentifier):
+ (WebCore::KURL::prettyURL):
+ (WebCore::equalIgnoringFragmentIdentifier):
+ * platform/KURL.h:
+
+ * bindings/js/JSLocationCustom.cpp:
+ (WebCore::JSLocation::setHash): Rework with new names, and to use the new equalIgnoringNullity() method.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::internalLinkElement):
+ * css/CSSCursorImageValue.cpp:
+ (WebCore::isSVGCursorIdentifier):
+ * history/HistoryItem.cpp:
+ (WebCore::HistoryItem::isCurrentDocument):
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::hash):
+ * html/HTMLFrameElementBase.cpp:
+ (WebCore::HTMLFrameElementBase::isURLAllowed):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::begin):
+ (WebCore::FrameLoader::gotoAnchor):
+ (WebCore::FrameLoader::scheduleLocationChange):
+ (WebCore::FrameLoader::scrollToAnchor):
+ (WebCore::FrameLoader::shouldReload):
+ (WebCore::FrameLoader::urlsMatchItem):
+ * loader/appcache/ApplicationCache.cpp:
+ (WebCore::ApplicationCache::resourceForURL):
+ (WebCore::ApplicationCache::resourceForRequest):
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::ApplicationCacheGroup::cacheForMainRequest):
+ (WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest):
+ (WebCore::ApplicationCacheGroup::selectCache):
+ (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
+ (WebCore::ApplicationCacheGroup::didReceiveResponse):
+ (WebCore::ApplicationCacheGroup::didFail):
+ (WebCore::ApplicationCacheGroup::addEntry):
+ * loader/appcache/ApplicationCacheResource.h:
+ (WebCore::ApplicationCacheResource::create):
+ * loader/appcache/ApplicationCacheStorage.cpp:
+ (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
+ (WebCore::ApplicationCacheStorage::cacheGroupForURL):
+ (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
+ * loader/appcache/ManifestParser.cpp:
+ (WebCore::parseManifest):
+ * page/Location.cpp:
+ (WebCore::Location::hash):
+ * page/Page.cpp:
+ (WebCore::Page::goToItem):
+ * rendering/RenderPartObject.cpp:
+ (WebCore::isURLAllowed):
+ * workers/WorkerLocation.cpp:
+ (WebCore::WorkerLocation::hash):
+
+2009-08-10 Andy Shaw <andy.shaw@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Fix endless loop when the application is quit by a secondary thread during a sync xml http request.
+
+ Replace the m_finished state variable and the call to QCoreApplication::processEvents() with
+ a dedicated QEventLoop, that can be terminated from within WebCoreSynchronousLoader as well
+ as from Qt through its knowledge of globally registered eventloops.
+
+ There is no unit test for this bug as it would require exporting additional symbols and
+ introduce the synchronous loader as global variable just for the test.
+
+ * platform/network/qt/ResourceHandleQt.cpp:
+ (WebCore::WebCoreSynchronousLoader::didFinishLoading):
+ (WebCore::WebCoreSynchronousLoader::didFail):
+ (WebCore::WebCoreSynchronousLoader::waitForCompletion):
+
+2009-08-10 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Make properties inspection serialized.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28078
+
+ * inspector/front-end/DOMAgent.js:
+ (InspectorController.getPrototypes):
+ (InspectorController.getProperties):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.getPrototypes):
+ (InjectedScript.getProperties):
+ (InjectedScript.setPropertyValue):
+ * inspector/front-end/ObjectPropertiesSection.js:
+ (WebInspector.ObjectRef):
+ (WebInspector.ObjectPropertyRef):
+ (WebInspector.ObjectPropertiesSection.prototype.onpopulate):
+ (WebInspector.ObjectPropertiesSection.prototype.update.callback):
+ (WebInspector.ObjectPropertiesSection.prototype.update):
+ (WebInspector.ObjectPropertiesSection.prototype._update):
+ (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate.callback):
+ (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
+ (WebInspector.ObjectPropertyTreeElement.prototype.onattach):
+ (WebInspector.ObjectPropertyTreeElement.prototype.update):
+ * inspector/front-end/PropertiesSidebarPane.js:
+ (WebInspector.PropertiesSidebarPane.prototype.update.callback):
+ (WebInspector.PropertiesSidebarPane.prototype.update):
+
+2009-08-09 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] wml.css lacks <pre> support
+ https://bugs.webkit.org/show_bug.cgi?id=28135
+
+ Add <pre> support for WML.
+ Extended fast/wml/text-emphasis.wml to cover <pre> support.
+
+ * css/wml.css: <pre> section copied from html.css
+
+2009-08-09 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix non-WML enabled builds. Remove ENABLE(WML) guards around the switch cases 'FrameLoadTypeBackWMLDeckNotAccessible'.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::isBackForwardLoadType):
+ (WebCore::FrameLoader::restoreDocumentState):
+ (WebCore::FrameLoader::transitionToCommitted):
+ (WebCore::FrameLoader::loadItem):
+
+2009-08-09 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] Deck access control is completly broken
+ https://bugs.webkit.org/show_bug.cgi?id=27721
+
+ Rewrite WML deck access control, actually works now standalone and within LayoutTests.
+ Added several new layout tests covering local & remote access support.
+
+ In order to detect WML task execution failures from within the WML layout tests a new
+ method Console::lastWMLErrorMessage() has been added, returning the last recorded WML
+ error message. Change WML log messages to dump to InspectorClient, just like it's done
+ for HTML - we used to behave like JSMessageSource, which is wrong.
+
+ Tests: http/tests/wml/access-target-domain-deny.html
+ http/tests/wml/access-target-path-deny.html
+ http/tests/wml/access-target.html
+ wml/access-target-deny.html
+ wml/access-target.html
+
+ * inspector/ConsoleMessage.h:
+ (WebCore::ConsoleMessage::source): Added public method to fetch the message source type.
+ (WebCore::ConsoleMessage::message): Added public method to access the error message.
+ * inspector/InspectorController.h:
+ (WebCore::InspectorController::consoleMessages): Added for Console::lastWMLErrorMessage(), to be able to crawl through the list of dumped messages.
+ * loader/FrameLoader.cpp: Recognize 'FrameLoadTypeBackWMLDeckNotAccessible', all guarded by ENABLE(WML).
+ (WebCore::isBackForwardLoadType):
+ (WebCore::FrameLoader::restoreDocumentState):
+ (WebCore::FrameLoader::transitionToCommitted):
+ (WebCore::FrameLoader::loadItem):
+ * loader/FrameLoaderTypes.h:
+ (WebCore::): Add new load type 'FrameLoadTypeBackWMLDeckNotAccessible', behaving like FrameLoadTypeBack plus WML specific information.
+ * page/Console.cpp:
+ (WebCore::Console::addMessage): Don't dump WML messages using ChromeClient (as it's done for JSMessageSource), but go through InspectorController.
+ (WebCore::Console::lastWMLErrorMessage): Crawl InspectorController::consoleMssages() to look up the last WML error message, if present.
+ * page/Console.h:
+ * page/Console.idl: Add "[DontEnum] DOMString lastWMLErrorMessage()".
+ * wml/WMLAccessElement.cpp: Store path/domain as member variables and pass them to WMLPageState once in insertedIntoDocument().
+ (WebCore::WMLAccessElement::parseMappedAttribute):
+ (WebCore::WMLAccessElement::insertedIntoDocument):
+ * wml/WMLAccessElement.h:
+ * wml/WMLCardElement.cpp: Handle 'FrameLoadTypeBackWMLDeckNotAccessible' as deck-entry method. Report WML error in current deck.
+ (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded):
+ * wml/WMLDocument.cpp: Enable deck-access control in finishedParsing. Take care of method name changes in WMLPageState.
+ (WebCore::WMLDocument::finishedParsing):
+ (WebCore::WMLDocument::initialize):
+ * wml/WMLErrorHandling.cpp: Never report 'WMLErrorDeckNotAccessible' messages through the tokenizer, that would alter the page into error state.
+ (WebCore::reportWMLError):
+ * wml/WMLPageState.cpp: Completly rewrote access path/domain parsing & deck-access control, strictly following the WML spec. All covered by tests.
+ (WebCore::WMLPageState::WMLPageState):
+ (WebCore::normalizedHostName):
+ (WebCore::hostFromURL):
+ (WebCore::urlForHistoryItem):
+ (WebCore::tryAccessHistoryURLs):
+ (WebCore::WMLPageState::processAccessControlData):
+ (WebCore::WMLPageState::resetAccessControlData):
+ (WebCore::WMLPageState::canAccessDeck):
+ (WebCore::WMLPageState::hostIsAllowedToAccess):
+ (WebCore::WMLPageState::pathIsAllowedToAccess):
+ * wml/WMLPageState.h:
+
+2009-08-09 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ FrameLoadType / WebFrameLoadType enums are out of sync
+ https://bugs.webkit.org/show_bug.cgi?id=28132
+
+ Modify FrameLoadType enum to match the order of WebFrameLoadType in WebFramePrivate.h / IWebFramePrivate.idl.
+ The mac/win public API exposes the old 'FrameLoadTypeReloadAllowingStaleData' value, which resides between
+ 'FrameLoadTypeReload' and 'FrameLoadTypeSame'. Work around this problem, by assigning 'FrameLoadTypeSame = FrameLoadTypeReload 2'.
+
+ Add a note to the FrameLoadType enum to keep it in sync with WebFramePrivate.h & IWebFramePrivate.idl.
+
+ * loader/FrameLoaderTypes.h:
+ (WebCore::):
+
+2009-08-09 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] manual-tests/wml/onevent-prev.wml crashes
+ https://bugs.webkit.org/show_bug.cgi?id=27722
+
+ Fix intrinsic event execution, leading to crashes.
+ First finish parsing the document, then execute the events. Not the other way round.
+ -> exposes bugs all over the WML layout tests, which relied on that quirk.
+
+ Fixes manual-tests/wml/onevent-prev.wml.
+
+ * wml/WMLDocument.cpp:
+ (WebCore::WMLDocument::WMLDocument):
+ (WebCore::WMLDocument::finishedParsing):
+ (WebCore::WMLDocument::initialize):
+ * wml/WMLDocument.h:
+
+2009-08-08 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [Chromium] Update WebCore.gyp to add ImageBuffer.cpp,
+ introduced by http://trac.webkit.org/changeset/46956.
+ https://bugs.webkit.org/show_bug.cgi?id=27844
+
+ * WebCore.gypi: Added ImageBuffer.cpp.
+
+2009-08-08 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Rubber-stamped by Jan Michael Alonzo.
+
+ Add [DontEnum] to WML specific initializeWMLPageState/resetWMLPageState methods, to assure
+ fast/dom/Window/window-properties.html doesn't show any differences when WML is enabled.
+
+ * dom/Document.idl:
+
+2009-08-08 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ SVG Filter need feColorMatrix implementation
+ [https://bugs.webkit.org/show_bug.cgi?id=27711]
+
+ Adds the filter effect feColorMatrix to SVG filters.
+
+ There is already a test in the w3c directory.
+ Test: svg/W3C-SVG-1.1/filters-color-01-b.svg
+
+ * platform/graphics/filters/FEColorMatrix.cpp:
+ (WebCore::matrix):
+ (WebCore::saturate):
+ (WebCore::huerotate):
+ (WebCore::luminance):
+ (WebCore::FEColorMatrix::apply):
+
+2009-08-08 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ Build fix for Tiger.
+ https://bugs.webkit.org/show_bug.cgi?id=27844
+
+ * platform/graphics/cg/ImageBufferCG.cpp:
+ (WebCore::ImageBuffer::ImageBuffer):
+
+2009-08-08 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ This is an initial implementation for linearRGB and sRGB support for all
+ platforms. Some platforms like Cg support different color spaces
+ natively, others like Qt, Cairo and Skia do not. This patch uses the
+ native implementation of platforms if possible and offers a common version
+ if not.
+
+ Different color spaces are used in SVG Filters. Nearly every Filter test
+ case is a test for this patch and will be enabled, once Filters are enabled.
+ https://bugs.webkit.org/show_bug.cgi?id=27844
+
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::drawTextInternal):
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::createImageBuffer):
+ * platform/graphics/GeneratedImage.cpp:
+ (WebCore::GeneratedImage::drawPattern):
+ * platform/graphics/ImageBuffer.cpp: Added.
+ (WebCore::ImageBuffer::transformColorSpace):
+ * platform/graphics/ImageBuffer.h:
+ (WebCore::):
+ (WebCore::ImageBuffer::create):
+ * platform/graphics/cairo/ImageBufferCairo.cpp:
+ (WebCore::ImageBuffer::ImageBuffer):
+ (WebCore::ImageBuffer::platformTransformColorSpace):
+ * platform/graphics/cairo/ImageCairo.cpp:
+ (WebCore::Image::drawPattern):
+ * platform/graphics/cg/ImageBufferCG.cpp:
+ (WebCore::ImageBuffer::ImageBuffer):
+ * platform/graphics/chromium/TransparencyWin.cpp:
+ (WebCore::TransparencyWin::OwnedBuffers::OwnedBuffers):
+ * platform/graphics/filters/FilterEffect.cpp:
+ (WebCore::FilterEffect::getEffectContext):
+ * platform/graphics/qt/ImageBufferQt.cpp:
+ (WebCore::ImageBuffer::ImageBuffer):
+ (WebCore::ImageBuffer::platformTransformColorSpace):
+ * platform/graphics/qt/PathQt.cpp:
+ (WebCore::Path::strokeContains):
+ (WebCore::Path::strokeBoundingRect):
+ * platform/graphics/skia/ImageBufferSkia.cpp:
+ (WebCore::ImageBuffer::ImageBuffer):
+ (WebCore::ImageBuffer::platformTransformColorSpace):
+ * platform/graphics/skia/SkiaUtils.cpp:
+ (WebCore::scratchContext):
+ * platform/graphics/wx/ImageBufferWx.cpp:
+ (WebCore::ImageBuffer::ImageBuffer):
+ * platform/mac/ScrollbarThemeMac.mm:
+ (WebCore::ScrollbarThemeMac::paint):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+ * svg/SVGMaskElement.cpp:
+ (WebCore::SVGMaskElement::drawMaskerContent):
+ * svg/SVGPatternElement.cpp:
+ (WebCore::SVGPatternElement::buildPattern):
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::nativeImageForCurrentFrame):
+ * svg/graphics/SVGPaintServerGradient.cpp:
+ (WebCore::createMaskAndSwapContextForTextGradient):
+ * svg/graphics/SVGPaintServerPattern.cpp:
+ (WebCore::SVGPaintServerPattern::setup):
+ * svg/graphics/SVGResourceFilter.cpp:
+ (WebCore::SVGResourceFilter::prepareFilter):
+ (WebCore::SVGResourceFilter::applyFilter):
+ * svg/graphics/SVGResourceMasker.cpp:
+ (WebCore::SVGResourceMasker::applyMask):
+ * svg/graphics/filters/SVGFETile.cpp:
+ (WebCore::FETile::apply):
+
+2009-08-08 Xan Lopez <xlopez@igalia.com>
+
+ Roll out r46928, since it wasn't done in accordance with the
+ agreed naming.
+
+ * bindings/gdom/GdomDOMObject.cpp: Removed.
+
+2009-08-08 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Xan Lopez.
+
+ [Gtk] Enable accessibility in Gtk DRT
+ https://bugs.webkit.org/show_bug.cgi?id=25989
+
+ Add SPI to get the focused accessible element to be used by DRT.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (webkit_accessible_get_focused_element):
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.h:
+
+2009-08-07 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Gtk build fix - add html/canvas to the binding generator's include path
+
+ * GNUmakefile.am:
+
+2009-08-07 Oliver Hunt <oliver@apple.com>
+
+ Another attempt to fix windows.
+
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+
+2009-08-07 Oliver Hunt <oliver@apple.com>
+
+ Windows build fix
+
+ * WebCore.vcproj/WebCore.vcproj:
+
+2009-08-07 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Gtk build fix - add html/canvas to the include path.
+
+ * GNUmakefile.am:
+
+2009-08-07 Adam Treat <adam.treat@torchmobile.com>
+
+ Prospective build fix for Qt following r46937.
+
+ * WebCore.pro:
+
+2009-08-07 Yong Li <yong.li@torchmobile.com>
+
+ WINCE PORT: store only width for GlyphBufferAdvance, to save space on low-memory devices
+ https://bugs.webkit.org/show_bug.cgi?id=27734
+
+ * platform/graphics/GlyphBuffer.h:
+ (WebCore::GlyphBuffer::advanceAt):
+ (WebCore::GlyphBuffer::advanceData):
+ (WebCore::GlyphBuffer::add):
+
+2009-08-07 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Eric Seidel.
+
+ WINCE PORT: pass unrecognized glyphs to GDI to handle
+ https://bugs.webkit.org/show_bug.cgi?id=27734
+
+ * platform/graphics/FontFastPath.cpp:
+ (WebCore::Font::glyphDataForCharacter):
+
+2009-08-07 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Move Canvas related file to a subdirectories
+ https://bugs.webkit.org/show_bug.cgi?id=28026
+
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * html/CanvasGradient.cpp: Removed.
+ * html/CanvasGradient.h: Removed.
+ * html/CanvasGradient.idl: Removed.
+ * html/CanvasPattern.cpp: Removed.
+ * html/CanvasPattern.h: Removed.
+ * html/CanvasPattern.idl: Removed.
+ * html/CanvasPixelArray.cpp: Removed.
+ * html/CanvasPixelArray.h: Removed.
+ * html/CanvasPixelArray.idl: Removed.
+ * html/CanvasRenderingContext2D.cpp: Removed.
+ * html/CanvasRenderingContext2D.h: Removed.
+ * html/CanvasRenderingContext2D.idl: Removed.
+ * html/CanvasStyle.cpp: Removed.
+ * html/CanvasStyle.h: Removed.
+ * html/canvas: Added.
+ * html/canvas/CanvasGradient.cpp: Copied from WebCore/html/CanvasGradient.cpp.
+ * html/canvas/CanvasGradient.h: Copied from WebCore/html/CanvasGradient.h.
+ * html/canvas/CanvasGradient.idl: Copied from WebCore/html/CanvasGradient.idl.
+ * html/canvas/CanvasPattern.cpp: Copied from WebCore/html/CanvasPattern.cpp.
+ * html/canvas/CanvasPattern.h: Copied from WebCore/html/CanvasPattern.h.
+ * html/canvas/CanvasPattern.idl: Copied from WebCore/html/CanvasPattern.idl.
+ * html/canvas/CanvasPixelArray.cpp: Copied from WebCore/html/CanvasPixelArray.cpp.
+ * html/canvas/CanvasPixelArray.h: Copied from WebCore/html/CanvasPixelArray.h.
+ * html/canvas/CanvasPixelArray.idl: Copied from WebCore/html/CanvasPixelArray.idl.
+ * html/canvas/CanvasRenderingContext2D.cpp: Copied from WebCore/html/CanvasRenderingContext2D.cpp.
+ * html/canvas/CanvasRenderingContext2D.h: Copied from WebCore/html/CanvasRenderingContext2D.h.
+ * html/canvas/CanvasRenderingContext2D.idl: Copied from WebCore/html/CanvasRenderingContext2D.idl.
+ * html/canvas/CanvasStyle.cpp: Copied from WebCore/html/CanvasStyle.cpp.
+ * html/canvas/CanvasStyle.h: Copied from WebCore/html/CanvasStyle.h.
+
+2009-08-07 Szabo Carol <carol.szabo@nokia.com>
+
+ Reviewed by David Hyatt.
+
+ QtWebkit ignores letter-spacing and word-spacing styles.
+ QtWebkit handles custom letter-spacing and word-spacing in the native QFont
+ class, but the values for these options are not not passed on from
+ the platform independent part of the Font class.
+ Fixed QtWebkit behavior by applying the options to QFont when it is
+ returned via Font::font()
+
+ http://bugs.webkit.org/show_bug.cgi?id=27988
+
+ LayoutTests:
+ fast/css/word-space-extra.html
+ css2.1/t1604-c542-letter-sp-00-b-a.html
+ css2.1/t1604-c541-word-sp-01-b-a.html
+ css1/text_properties/word_spacing.html
+
+ * platform/graphics/qt/FontQt.cpp:
+ (WebCore::Font::font):
+
+2009-08-07 Nicolas Weber <thakis@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Use correct highlight color for listboxes and completion popups.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28090
+
+ * rendering/RenderThemeChromiumMac.h:
+ * rendering/RenderThemeChromiumMac.mm:
+ Rename activeListBoxSelectionBackgroundColor to
+ platformActiveListBoxSelectionBackgroundColor, so that it actually
+ overrides a virtual method.
+
+2009-08-07 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Added a fourth bunch of Haiku-specific files for WebCore.
+ https://bugs.webkit.org/show_bug.cgi?id=26988
+
+ * platform/haiku/PasteboardHaiku.cpp: Added.
+ (WebCore::Pasteboard::Pasteboard):
+ (WebCore::Pasteboard::generalPasteboard):
+ (WebCore::Pasteboard::writeSelection):
+ (WebCore::Pasteboard::canSmartReplace):
+ (WebCore::Pasteboard::plainText):
+ (WebCore::Pasteboard::documentFragment):
+ (WebCore::Pasteboard::writeURL):
+ (WebCore::Pasteboard::writeImage):
+ (WebCore::Pasteboard::clear):
+ * platform/haiku/PlatformKeyboardEventHaiku.cpp: Added.
+ (WebCore::keyIdentifierForHaikuKeyCode):
+ (WebCore::windowsKeyCodeForKeyEvent):
+ (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
+ (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
+ (WebCore::PlatformKeyboardEvent::currentCapsLockState):
+ * platform/haiku/PlatformMouseEventHaiku.cpp: Added.
+ (WebCore::PlatformMouseEvent::PlatformMouseEvent):
+ * platform/haiku/PlatformWheelEventHaiku.cpp: Added.
+ (WebCore::PlatformWheelEvent::PlatformWheelEvent):
+
+2009-08-07 Nicolas Weber <thakis@chromium.org>
+
+ Teach WebKit how to decode jpegs in cmyk and ycck color spaces.
+ Heavily inspired by Firefox's take on this issue.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27909
+
+ Reviewed by Eric Seidel.
+
+ * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+ (WebCore::JPEGImageReader::decode):
+ Tell jpeglib to convert ycck to cmyk and keep cmyk.
+ (WebCore::convertCMYKToRGBA):
+ Added function to convert cmyk to rgb.
+ (WebCore::convertRGBToRGBA):
+ Extracted existing conversion logic into its own function.
+ (WebCore::JPEGImageDecoder::outputScanlines):
+ Call convertCMYKToRGBA for cmyk images, convertRGBToRGBA for rgb
+ images.
+
+2009-08-07 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ SharedWorkers should be shared
+ https://bugs.webkit.org/show_bug.cgi?id=28058
+
+ Added tracking of shared workers to the SharedWorkerRepository.
+
+ * workers/DefaultSharedWorkerRepository.cpp:
+ (WebCore::SharedWorkerProxy::create):
+ Changed SharedWorkerProxy to derive from ThreadSafeShared, as it needs to outlive the repository (if closed while some documents are still loading).
+ (WebCore::SharedWorkerProxy::thread):
+ (WebCore::SharedWorkerProxy::closing):
+ Added flag used to determine whether the worker has closed itself while loading.
+ (WebCore::SharedWorkerProxy::url):
+ (WebCore::SharedWorkerProxy::name):
+ Proxy now tracks worker URL and name to allow validity checks per section 4.8.3 of the WebWorkers spec.
+ (WebCore::SharedWorkerProxy::SharedWorkerProxy):
+ (WebCore::SharedWorkerProxy::addToDocumentSet):
+ Added API to track the document set for a worker to allow worker shutdown. Currently does nothing.
+ (WebCore::SharedWorkerScriptLoader::SharedWorkerScriptLoader):
+ Renamed SharedWorkerLoader to be SharedWorkerScriptLoader for clarity.
+ (WebCore::SharedWorkerScriptLoader::load):
+ (WebCore::SharedWorkerScriptLoader::notifyFinished):
+ (WebCore::DefaultSharedWorkerRepository::instance):
+ (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
+ Now handles "worker already loaded" case.
+ (WebCore::SharedWorkerRepository::connect):
+ Delegates to DefaultSharedWorkerRepository::connectToWorker
+ (WebCore::DefaultSharedWorkerRepository::connectToWorker):
+ Added code to track the SharedWorkerProxy in a map, and to handle the "worker already loaded" case.
+ (WebCore::DefaultSharedWorkerRepository::getProxy):
+ Atomic get-or-create operation on the internal tracking HashMap.
+ * workers/DefaultSharedWorkerRepository.h:
+ * workers/SharedWorker.cpp:
+ (WebCore::SharedWorker::SharedWorker):
+ * workers/SharedWorkerRepository.h:
+ Removed instance() API and made constructor private to prevent instantiation.
+ (WebCore::SharedWorkerRepository::SharedWorkerRepository):
+
+2009-08-07 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Added four Haiku-specific files for WebCore:
+ PopupMenuHaiku.cpp, ScreenHaiku.cpp,
+ SearchPopupMenuHaiku.cpp and SoundHaiku.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=28080
+
+ * platform/haiku/PopupMenuHaiku.cpp: Added.
+ (WebCore::PopupMenu::PopupMenu):
+ (WebCore::PopupMenu::~PopupMenu):
+ (WebCore::PopupMenu::show):
+ (WebCore::PopupMenu::hide):
+ (WebCore::PopupMenu::updateFromElement):
+ (WebCore::PopupMenu::itemWritingDirectionIsNatural):
+ * platform/haiku/ScreenHaiku.cpp: Added.
+ (WebCore::screenRect):
+ (WebCore::screenAvailableRect):
+ (WebCore::screenDepth):
+ (WebCore::screenDepthPerComponent):
+ (WebCore::screenIsMonochrome):
+ * platform/haiku/SearchPopupMenuHaiku.cpp: Added.
+ (WebCore::SearchPopupMenu::SearchPopupMenu):
+ (WebCore::SearchPopupMenu::saveRecentSearches):
+ (WebCore::SearchPopupMenu::loadRecentSearches):
+ (WebCore::SearchPopupMenu::enabled):
+ * platform/haiku/SoundHaiku.cpp: Added.
+ (WebCore::systemBeep):
+
+2009-08-07 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Added two Haiku-specific files to WebCore:
+ TemporaryLinkStubs.cpp and WidgetHaiku.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=28080
+
+ * platform/haiku/TemporaryLinkStubs.cpp: Added.
+ (loadResourceIntoArray):
+ (WebCore::historyContains):
+ (WebCore::supportedKeySizes):
+ (WebCore::signedPublicKeyAndChallengeString):
+ (WebCore::userIdleTime):
+ (WebCore::callOnMainThread):
+ (WebCore::SharedBuffer::createWithContentsOfFile):
+ (WebCore::KURL::fileSystemPath):
+ (WebCore::getSupportedKeySizes):
+ * platform/haiku/WidgetHaiku.cpp: Added.
+ (WebCore::Widget::Widget):
+ (WebCore::Widget::~Widget):
+ (WebCore::Widget::frameRect):
+ (WebCore::Widget::setFrameRect):
+ (WebCore::Widget::setFocus):
+ (WebCore::Widget::setCursor):
+ (WebCore::Widget::show):
+ (WebCore::Widget::hide):
+ (WebCore::Widget::paint):
+ (WebCore::Widget::setIsSelected):
+
+2009-08-07 Jian Li <jianli@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Fix the problem that isAttribute is set to false for onerror and
+ onmessage in worker custom code.
+ https://bugs.webkit.org/show_bug.cgi?id=28083
+
+ * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
+ (WebCore::getEventListener):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ (WebCore::getEventListener):
+ (WebCore::ACCESSOR_SETTER):
+
+2009-08-07 Vitaly Repeshko <vitalyr@quad.spb.corp.google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ V8 bindings: speed up lookupDOMWrapper by using new V8 API function.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28071
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ * bindings/v8/V8DOMWrapper.h:
+ (WebCore::V8DOMWrapper::lookupDOMWrapper):
+
+2009-08-07 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Justin Garcia.
+
+ selectionHasStyle doesn't handle text-specific properties properly
+ https://bugs.webkit.org/show_bug.cgi?id=27858
+
+ This patch modifies selectionHasStyle so that it returns TrueTriState when text styles
+ (text-decoration, font-style, font-weight, & color) are present in all text nodes,
+ regardless of whether the style is also present in their ancestor nodes or not.
+ e.g. New behavior concludes that <b><i>hello</i><i>world</i></b> has italic style.
+
+ WebKit now applies the text styles (bold, italic, etc) if the specified style was not present on
+ at least one text node, rather than at the beginning of selection except on Mac.
+ On Mac, WebKit applies the text style if the style was not present at the beginning of style.
+
+ Test: editing/execCommand/toggle-compound-styles.html
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::getPropertiesNotInComputedStyle): bug fix, must use copy instead of makeMutable for a mutable style.
+ * editing/Editor.cpp:
+ (WebCore::):
+ (WebCore::triStateOfStyleInComputedStyle): Added a boolean type to ignore text-specific styles
+ (WebCore::Editor::selectionHasStyle): Ignores text-specific styles for all but text nodes
+ * editing/EditorCommand.cpp:
+ (WebCore::executeToggleStyle): Uses selectionHasStyle instead of selectionStartHasStyle
+
+2009-08-07 Jian Li <jianli@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Do not register V8 error message listener in WorkerContextExecutionProxy.
+ https://bugs.webkit.org/show_bug.cgi?id=28082
+
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::initV8IfNeeded):
+
+2009-08-07 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Eric Seidel.
+
+ Cairo-based Windows port does not handle cookies properly
+ https://bugs.webkit.org/show_bug.cgi?id=27414
+
+ curl handles cookies by itself, so using WinINet functions
+ to get and set cookies is wrong.
+
+ Replace CookieJarWin.cpp with CookieJarCurl.cpp so that
+ cookies can be implemented later once curl provides an API to
+ get and set cookies.
+
+ * WebCore.vcproj/WebCore.vcproj:
+
+2009-08-07 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28074
+
+ V8 bindings for the window.applicationCache attribute.
+
+ * WebCore.gypi:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp: Added.
+
+2009-08-07 Alpha Lam <hclam@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Right click on timeline of media controls panel cause seek
+ https://bugs.webkit.org/show_bug.cgi?id=27920
+
+ Add a test simulate the behavior of seeking by right clicking
+ on the time bar of media controls while playing.
+
+ * media/controls-right-click-on-timebar-expected.txt: Added.
+ * media/controls-right-click-on-timebar.html: Added.
+
+2009-08-07 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Justin Garcia.
+
+ deprecatedCopyInheritableProperties must be replaced by two different functions
+ https://bugs.webkit.org/show_bug.cgi?id=28057
+
+ This patch deletes deprecatedInheritableProperties and modifies call callees to call either editingStyleAtPosition
+ or prepareEditingStyleToApplyAt. The concept of editing style is introduced in this patch,
+ which consists of all CSS properties need to be preserved under editing operations.
+
+ No test is added since this patch does not change any behavior.
+
+ * css/CSSComputedStyleDeclaration.cpp: Removed deprecatedCopyInheritableProperties
+ * css/CSSComputedStyleDeclaration.h: Removed deprecatedCopyInheritableProperties
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::):
+ (WebCore::editingStyleAtPosition): Obtains the editing-specific computed style at the position
+ (WebCore::prepareEditingStyleToApplyAt): Removes redundant editing styles at the specified position
+ (WebCore::removeStylesAddedByNode): Removes the style derived from the specified node
+ * editing/ApplyStyleCommand.h:
+ (WebCore::):
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::CompositeEditCommand::moveParagraphs): Uses editingStyleAtPosition
+ (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Uses editingStyleAtPosition
+ * editing/DeleteSelectionCommand.cpp:
+ (WebCore::removeEnclosingAnchorStyle): Uses removeStyleOfNode
+ (WebCore::DeleteSelectionCommand::saveTypingStyleState): Uses editingStyleAtPosition
+ (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Uses prepareEditingStyleToApplyAt
+ * editing/EditCommand.cpp:
+ * editing/EditCommand.h:
+ * editing/InsertParagraphSeparatorCommand.cpp:
+ (WebCore::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Uses editingStyleAtPosition
+ (WebCore::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Uses prepareEditingStyleToApplyAt
+ * editing/RemoveFormatCommand.cpp:
+ (WebCore::RemoveFormatCommand::doApply): Uses editingStyleAtPosition
+ * editing/ReplaceSelectionCommand.cpp:
+ (WebCore::handleStyleSpansBeforeInsertion): Uses editingStyleAtPosition
+ (WebCore::ReplaceSelectionCommand::handleStyleSpans): Uses editingStyleAtPosition and prepareEditingStyleToApplyAt
+ (WebCore::ReplaceSelectionCommand::doApply): Uses prepareEditingStyleToApplyAt
+ * editing/markup.cpp:
+ (WebCore::removeEnclosingMailBlockquoteStyle): Uses removeStyleOfNode
+ (WebCore::removeDefaultStyles): Uses prepareEditingStyleToApplyAt
+ (WebCore::createMarkup): Uses editingStyleAtPosition
+
+2009-08-07 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 27250: Geolocation callback function IDL files are superfluous
+ https://bugs.webkit.org/show_bug.cgi?id=27250
+
+ The objects for the Geolocation success and error callbacks are created 'manually' in
+ WebCore/bindings/js/JSGeolocationCustom.cpp. Furthermore, the callback interfaces are
+ marked 'NoInterfaceObject' in the W3C spec, so the prototype should not
+ appear on the window object. Hence IDL files for these callbacks are not required.
+
+ See http://www.w3.org/TR/geolocation-API/#geolocation_interface and
+ http://www.w3.org/TR/WebIDL/#NoInterfaceObject.
+
+ No new tests required.
+
+ * DerivedSources.make: Modified. Removed reference to IDL files.
+ * WebCore.gypi: Modified. Removed reference to IDL files.
+ * WebCore.xcodeproj/project.pbxproj: Modified. Removed reference to IDL files.
+ * page/PositionCallback.idl: Removed.
+ * page/PositionErrorCallback.idl: Removed.
+
+2009-08-07 Adam Treat <adam.treat@torchmobile.com>
+
+ Reviewed by David Levin.
+
+ Build fix for Qt when ENABLE_VIDEO = 0. This was necessitated by r46890 which
+ put the idl files back into play regardless of compile time defines.
+
+ * html/TimeRanges.idl:
+
+2009-08-07 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ Coding style patches for RenderThemeQt.cpp based on results from cpp_style.py.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28050
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::baselinePosition):
+ (WebCore::inflateButtonRect):
+ (WebCore::RenderThemeQt::supportsFocus):
+ (WebCore::RenderThemeQt::applyTheme):
+
+2009-08-07 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by Eric Seidel.
+
+ Prevent RenderThemeQt AdjustStyle based calls for TextField, MenuList and MenuListButton
+ from discarding style colour.
+
+ Add tests and remove tests from platform/qt/Skipped that now pass.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28050
+
+ Tests: fast/forms/menulist-style-color.html
+ fast/forms/text-style-color.html
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::adjustTextFieldStyle):
+ (WebCore::RenderThemeQt::adjustMenuListStyle):
+ (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
+
+2009-08-07 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22495
+ [V8] Re-land http://trac.webkit.org/changeset/46821, now that
+ http://trac.webkit.org/changeset/46874 re-landed
+
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+
+2009-08-07 Adam Treat <adam.treat@torchmobile.com>
+
+ Reviewed by Darin Adler and George Staikos.
+
+ Add rectToRect convenience function which returns the TransformationMatrix
+ which maps the 'from' rectangle to the 'to' rectangle.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28067
+
+ No tests as this would require binding the method to js and since it is static
+ that doesn't seem possible. Please check the math.
+
+ * platform/graphics/transforms/TransformationMatrix.cpp:
+ (WebCore::TransformationMatrix::rectToRect):
+ * platform/graphics/transforms/TransformationMatrix.h:
+
+2009-08-07 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Implement the HTML5 hashchange event.
+ https://bugs.webkit.org/show_bug.cgi?id=21605
+
+ Test: fast/loader/hashchange-event.html
+
+ * dom/EventNames.h: Add "hashchange"
+ * html/HTMLAttributeNames.in: Add "onhashchange"
+
+ * loader/FrameLoader.cpp:
+ (WebCore::HashChangeEventTask::create):
+ (WebCore::HashChangeEventTask::performTask):
+ (WebCore::HashChangeEventTask::HashChangeEventTask):
+ (WebCore::FrameLoader::scrollToAnchor): When an anchor navigation is completed and the
+ new fragment identifier is different from the old one, queue a hash change event
+ on the Document.
+
+ Add a window event listener for the hashchange event if onhashchange is encountered:
+ * html/HTMLBodyElement.cpp:
+ (WebCore::HTMLBodyElement::parseMappedAttribute):
+ * html/HTMLFrameSetElement.cpp:
+ (WebCore::HTMLFrameSetElement::parseMappedAttribute):
+
+ Add a new string utility method that gives "null and empty are equivalent" behavior:
+ * platform/text/PlatformString.h:
+ (WebCore::equalIgnoringNullity):
+ * platform/text/StringImpl.cpp:
+ (WebCore::equalIgnoringNullity):
+ * platform/text/StringImpl.h:
+
+2009-08-07 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Add the initial implementation of the ability to resize the columns in
+ a DataGrid in the Web Inspector. Enables that functionality in both the
+ Profile View and in the Local Storage View.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26182
+
+ In this version, resizing a column can change the width of at most two
+ columns (the columns to the left and right of the resizer being dragged).
+
+ Possible changes in future patches:
+
+ 1) Be able to specify the minimum size of a column and the maximum size
+ of a column. If the minimum size is equal to the maximum size, the
+ column can't be resized.
+ 2) Make the behavior more in line with the following description:
+
+ Everything before the column that is resized stays fixed size. The
+ resized column changes sizes. The other columns except the last stay
+ the same size. And the last column adjusts to fit with a minimum size.
+ If the last column is already the minimum, the next to last column
+ shrinks, etc.
+
+ 3) Make it possible to scale the column sizes appropriately when the
+ Web Inspector window gets resized.
+
+ * inspector/front-end/DOMStorageItemsView.js:
+ (WebInspector.DOMStorageItemsView.prototype.update):
+ Once the DataGrid is added to the DOM, update the widths of the
+ DataGrid in order to put the resizers in place.
+ (WebInspector.DOMStorageItemsView.prototype.resize):
+ Update the widths of the DataGrid in order to correctly adjust the
+ positions of the resizers.
+
+ * inspector/front-end/DataGrid.js:
+ (WebInspector.DataGrid):
+ Store column groups whose widths can later be changed when the columns
+ are resized by the user.
+ Also, keep track of whether the widths of the columns have been
+ initialized.
+ (WebInspector.DataGrid.prototype.updateWidths):
+ Create the resizers for the columns.
+ (WebInspector.DataGrid.prototype._clickInDataTable):
+ Didn't actually change anything in this method, just added a comma to
+ the end of the function.
+ (WebInspector.DataGrid.prototype._startResizerDragging):
+ Store the resizer that is currently dragging.
+ (WebInspector.DataGrid.prototype._resizerDragging):
+ Constrain the area that the resizer can be dragged to the column to
+ it's left and right, with some padding added to make sure that the
+ neighboring columns don't disappear.
+ (WebInspector.DataGrid.prototype._endResizerDragging):
+
+ * inspector/front-end/DatabasesPanel.js:
+ (WebInspector.DatabasesPanel.prototype.resize):
+ Resize the view.
+ (WebInspector.DatabasesPanel.prototype._updateSidebarWidth):
+ ditto.
+
+ * inspector/front-end/ProfileView.js:
+ (WebInspector.ProfileView.prototype.show):
+ Now that the DataGrid is actually attached to the DOM, update the
+ widths of the DataGrid in order to put the resizers in place.
+ (WebInspector.ProfileView.prototype.resize):
+ Update the widths of the DataGrid in order to correctly adjust the
+ positions of the resizers.
+
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype.resize):
+ Resize the view.
+ (WebInspector.ProfilesPanel.prototype._updateSidebarWidth):
+ ditto.
+
+ * inspector/front-end/inspector.css:
+ Add in a style rule for a resizer in the Data Grid.
+
+2009-08-07 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Back out r46847 and fix the Qt build system to always generate
+ all the JS binding files from IDL files. The generated files
+ have #if feature guards, so the #ifs are not needed in the
+ files using them.
+
+ * WebCore.pro:
+ * bindings/js/JSEventTarget.cpp:
+ * bindings/js/JSWorkerContextBase.cpp:
+ * bindings/js/WorkerScriptController.cpp:
+
+2009-08-07 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Adele Peterson.
+
+ Cannot scroll for box-reflect:right
+ https://bugs.webkit.org/show_bug.cgi?id=27979
+
+ Update m_overflowLeft an m_overflowWidth for reflection just like
+ m_overflowTop and m_overflowHeight.
+
+ Test: fast/reflections/reflection-overflow-scroll.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::layoutBlock):
+
+2009-08-06 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ box-shadow's spread is ignored with <table>
+ https://bugs.webkit.org/show_bug.cgi?id=28017
+
+ Use RenderStyle::getBoxShadowExtent just like RenderBlock.
+
+ Test: fast/box-shadow/box-shadow-overflow-scroll.html
+
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::layout):
+
+2009-08-06 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: NodeLists Don't Display Well in the Console
+ https://bugs.webkit.org/show_bug.cgi?id=28061
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._format): Specific check if the object is a NodeList, display as an "array"
+
+2009-08-06 Yusuke Sato <yusukes@chromium.org>
+
+ Reviewed by David Levin.
+
+ Chromium Linux: add support for @font-face
+ https://bugs.webkit.org/show_bug.cgi?id=28015
+
+ * loader/CachedFont.cpp:
+ (WebCore::CachedFont::~CachedFont):
+ (WebCore::CachedFont::ensureCustomFontData):
+ (WebCore::CachedFont::platformDataFromCustomData):
+ (WebCore::CachedFont::allClientsRemoved):
+
+ Modified #ifdefs so that chromium linux can load remote fonts.
+
+ * platform/graphics/chromium/FontCustomPlatformData.cpp:
+ (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
+ (WebCore::FontCustomPlatformData::fontPlatformData):
+ (WebCore::createFontCustomPlatformData):
+
+ Create SkTypeface for a web font by calling SkTypeface::CreateFromStream function.
+
+ (WebCore::RemoteFontStream::RemoteFontStream):
+ (WebCore::RemoteFontStream::~RemoteFontStream):
+ (WebCore::RemoteFontStream::rewind):
+ (WebCore::RemoteFontStream::read):
+
+ New class that implements SkStream interface and wraps wtf's SharedBuffer.
+
+ * platform/graphics/chromium/FontCustomPlatformData.h:
+ (WebCore::FontCustomPlatformData::FontCustomPlatformData):
+
+ Added member variables for Linux.
+
+2009-08-06 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Eric Seidel.
+
+ Fix JPEGImageDecoder.cpp compile error on WinCE
+ https://bugs.webkit.org/show_bug.cgi?id=28051
+
+ * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+
+2009-08-06 Kevin Ollivier <kevino@theolliviers.com>
+
+ Reviewed by Eric Seidel.
+
+ Adding WebCore support for the waf build system for wx.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27619
+
+ * wscript: Added.
+
+2009-08-06 Adam Barth <abarth@webkit.org>
+
+ Unreviewed revert.
+
+ http://bugs.webkit.org/show_bug.cgi?id=27879
+
+ Revert 46877 because it broke GTK.
+
+ * platform/graphics/wince/GraphicsContextWince.cpp:
+
+2009-08-06 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Bug 27956 - AX: roleValue should be cached for performance
+ https://bugs.webkit.org/show_bug.cgi?id=27956
+
+ Caches the role value of an accessibility object instead of calculating it everytime.
+ The changes gained a 5% speedup using VoiceOver to navigate a webpage.
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::handleAriaRoleChanged):
+
+ Use generic role setter instead of specific ARIA role setter.
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::AccessibilityObject):
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::headingLevel):
+
+ Make headingLevel into instance method so that it can *safely* be called in the constructor.
+
+ (WebCore::AccessibilityObject::setRoleValue):
+ (WebCore::AccessibilityObject::roleValue):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
+ (WebCore::AccessibilityRenderObject::headingLevel):
+ (WebCore::AccessibilityRenderObject::intValue):
+ (WebCore::AccessibilityRenderObject::updateAccessibilityRole):
+ (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (AXAttributeStringSetHeadingLevel):
+
+2009-08-06 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
+
+ Reviewed by Adam Barth.
+
+ Change Noncopyable inheriting to public
+ http://bugs.webkit.org/show_bug.cgi?id=27879
+
+ Since Noncopyable is inherited from FastAllocBase, Noncopyable's
+ inheriting has been changed to public.
+
+ * platform/graphics/wince/GraphicsContextWince.cpp:
+
+2009-08-06 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Sam Weinig.
+
+ Add explicit dependencies for our build verification scripts to ensure that they always run after linking has completed.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-08-05 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Implement the matchMedium method on the Media interface described in the CSSOM View Module.
+ https://bugs.webkit.org/show_bug.cgi?id=22495
+
+ Add a new Media interface, obtainable via the AbstractView, that can
+ evaluate queries via its matchesMedium() method.
+
+ Test: fast/media/matchmedium-query-api.html
+
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ Add Media.* files to the build.
+
+ * css/Media.cpp: Added.
+ (WebCore::Media::Media):
+ (WebCore::Media::type):
+ (WebCore::Media::matchMedium):
+ * css/Media.h: Added.
+ (WebCore::Media::create):
+ (WebCore::Media::document):
+ * css/Media.idl: Added.
+ Media::matchMedium() uses a MediaQueryEvaluator() to test the query.
+
+ * page/AbstractView.idl:
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::media):
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl:
+ Add a readonly attribute for Media.
+
+2009-08-06 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27455
+ Support for a custom validation message in ValidityState and related
+ form controls.
+ http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#dom-cva-setcustomvalidity
+
+ Tests: fast/forms/ValidityState-customError-001.html
+ fast/forms/ValidityState-customError-002.html
+ fast/forms/ValidityState-customError-003.html
+ fast/forms/ValidityState-customError-004.html
+
+ * html/HTMLButtonElement.idl: setCustomValidity DOM method
+ * html/HTMLFieldSetElement.idl: ditto
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::setCustomValidity): ditto
+ * html/HTMLFormControlElement.h:
+ (WebCore::HTMLFormControlElement::valueMissing): moved down
+ * html/HTMLInputElement.idl: ditto
+ * html/HTMLSelectElement.idl: ditto
+ * html/HTMLTextAreaElement.idl:
+ * html/ValidityState.h:
+ (WebCore::ValidityState::setCustomErrorMessage): method to set custom
+ validation message
+ (WebCore::ValidityState::customError): validation flag
+
+2009-08-06 Mark Rowe <mrowe@apple.com>
+
+ Bring a little order to our otherwise out of control lives.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-08-06 Mark Rowe <mrowe@apple.com>
+
+ Stop copying .idl files in to the framework resources directory.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-08-06 Mark Rowe <mrowe@apple.com>
+
+ Fix the build some more.
+
+ Add JSWebSocket.cpp and JSWebSocket.h to the Xcode project, and move the WebSocket-related
+ files and groups in to the appropriate locations.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-08-06 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Add WebSocket.idl
+ https://bugs.webkit.org/show_bug.cgi?id=27209
+
+ Add WebSocket.idl in WebCore/websockets/.
+ Add build systems only for GNUmakefile.am and WebCore.xcodeproj now.
+ Other build systems will be updated once the code is functional.
+
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSWebSocketConstructor.cpp: Added.
+ * bindings/js/JSWebSocketConstructor.h: Added.
+ * bindings/js/JSWebSocketCustom.cpp: Added.
+ * websockets/WebSocket.cpp: Added.
+ * websockets/WebSocket.h: Added.
+ * websockets/WebSocket.idl: Added.
+
+2009-08-06 Jian Li <jianli@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Style cleaning for WorkerContextExecutionProxy.
+ https://bugs.webkit.org/show_bug.cgi?id=27997
+
+ Cleanup WorkerContextExecutioonProxy related files to follow
+ WebKit coding styles after all V8 binding codes are upstreamed.
+ 1) Lower-case the first letter of remaining functins in class
+ WorkerContextExecutionProxy. Update the V8 code generator
+ and all other references accordingly.
+ 2) Integrate getConstructor from WorkerContextExecutionProxy
+ to V8DOMWrapper.
+ 3) Other misc changes, like removing trailing whitespaces and
+ sorting the include files.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::execute):
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getConstructorForContext):
+ (WebCore::V8DOMWrapper::convertToV8Object):
+ * bindings/v8/V8DOMWrapper.h:
+ * bindings/v8/V8WorkerContextEventListener.cpp:
+ (WebCore::V8WorkerContextEventListener::~V8WorkerContextEventListener):
+ (WebCore::V8WorkerContextEventListener::handleEvent):
+ (WebCore::V8WorkerContextEventListener::reportError):
+ (WebCore::V8WorkerContextEventListener::getReceiverObject):
+ * bindings/v8/V8WorkerContextObjectEventListener.cpp:
+ (WebCore::weakObjectEventListenerCallback):
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::handleConsoleMessage):
+ (WebCore::WorkerContextExecutionProxy::dispose):
+ (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
+ (WebCore::WorkerContextExecutionProxy::convertToV8Object):
+ (WebCore::WorkerContextExecutionProxy::convertEventToV8Object):
+ (WebCore::WorkerContextExecutionProxy::convertEventTargetToV8Object):
+ (WebCore::WorkerContextExecutionProxy::convertWorkerContextToV8Object):
+ (WebCore::WorkerContextExecutionProxy::toV8):
+ (WebCore::WorkerContextExecutionProxy::forgetV8EventObject):
+ (WebCore::WorkerContextExecutionProxy::removeEventListener):
+ * bindings/v8/WorkerContextExecutionProxy.h:
+ (WebCore::WorkerContextExecutionProxy::context):
+ (WebCore::WorkerContextExecutionProxy::convertToV8Object):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-08-06 Darin Adler <darin@apple.com>
+
+ Fix Mac Leopard debug build.
+
+ * platform/text/StringImpl.cpp:
+ (WebCore::equalIgnoringCase): Removed meaningless assertion; an unsigned
+ is always >= 0 and checking causes a warning in the newer versions of gcc.
+
+2009-08-06 Adam Barth <abarth@webkit.org>
+
+ Unreview rollout.
+
+ Revert 46840 because it broke the reliability tests.
+
+ * bindings/v8/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::ScheduledAction):
+ (WebCore::ScheduledAction::execute):
+ * bindings/v8/ScheduledAction.h:
+ (WebCore::ScheduledAction::ScheduledAction):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8Custom::WindowSetTimeoutImpl):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::SetTimeoutOrInterval):
+
+2009-08-06 Adam Barth <abarth@webkit.org>
+
+ Unreviewed rollout.
+
+ Revert 46840 in preparation to revert 46838, which broke the reliability tests.
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::updateDocumentWrapperCache):
+ (WebCore::V8Proxy::initContextIfNeeded):
+ (WebCore::V8Proxy::mainWorldContext):
+ * bindings/v8/V8Proxy.h:
+ (WebCore::V8Proxy::context):
+
+2009-08-06 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: move style-related utilities into InjectedScript.
+
+ http://bugs.webkit.org/show_bug.cgi?id=27939
+
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.CSSStyleDeclaration):
+ (WebInspector.CSSStyleDeclaration.prototype.isPropertyImplicit):
+ (WebInspector.CSSStyleDeclaration.prototype.styleTextWithShorthands):
+ (WebInspector.CSSStyleDeclaration.prototype.getLonghandProperties):
+ (WebInspector.CSSStyleDeclaration.prototype.getShorthandPriority):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.applyStyleText):
+ (InjectedScript.toggleStyleEnabled):
+ (InjectedScript._serializeStyle):
+ (InjectedScript._getUniqueStyleProperties):
+ (InjectedScript._getLonghandProperties):
+ (InjectedScript._getShorthandPriority):
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylesSidebarPane.prototype._update):
+ (WebInspector.StylePropertiesSection.prototype.isPropertyOverloaded):
+ (WebInspector.StylePropertiesSection.prototype.onpopulate):
+ (WebInspector.StylePropertyTreeElement.prototype.get priority):
+ (WebInspector.StylePropertyTreeElement.prototype.get value):
+ (WebInspector.StylePropertyTreeElement.prototype):
+ * inspector/front-end/utilities.js:
+
+2009-08-06 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Unreviewed build fix, add #ifdef guards around
+ inclusions of shared worker specific files.
+
+ * bindings/js/JSEventTarget.cpp:
+ * bindings/js/JSWorkerContextBase.cpp:
+ * bindings/js/WorkerScriptController.cpp:
+
+2009-08-06 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ cssgrammar.cpp fails to compile with RVCT compiler
+ https://bugs.webkit.org/show_bug.cgi?id=27952
+
+ * css/CSSGrammar.y: Do not convert to String to get rid of the stray
+ memory allocation
+
+ * platform/text/StringImpl.cpp:
+ (WebCore::equalIgnoringCase):
+ * platform/text/StringImpl.h:
+ (WebCore::equalIgnoringCase): Add charactersEqualIgnoringCase
+ function that works with a character pointer and length
+
+2009-08-06 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ Created first working implementation of SharedWorkers (execution only, no sharing).
+ https://bugs.webkit.org/show_bug.cgi?id=27927
+
+ Added initial implementations of SharedWorkerThread and SharedWorkerContext.
+ No v8 bindings yet.
+
+ * DerivedSources.cpp:
+ Added shared worker files.
+ * DerivedSources.make:
+ Added shared worker files.
+ * GNUmakefile.am:
+ Added shared worker files.
+ * WebCore.gypi:
+ Added shared worker files.
+ * WebCore.pro:
+ Added shared worker files.
+ * WebCore.vcproj/WebCore.vcproj:
+ Added shared worker files.
+ * WebCore.xcodeproj/project.pbxproj:
+ Added shared worker files.
+ * bindings/js/JSEventTarget.cpp:
+ (WebCore::toJS):
+ Added code to convert from EventTarget to correct JS class.
+ (WebCore::toEventTarget):
+ Added code to cast from JS object to appropriate EventTarget impl class.
+ * bindings/js/JSSharedWorkerConstructor.cpp:
+ (WebCore::JSSharedWorkerConstructor::JSSharedWorkerConstructor):
+ (WebCore::constructSharedWorker):
+ Tweaked the constructor code to pass in the lexical global object like normal workers.
+ * bindings/js/JSSharedWorkerContextCustom.cpp: Added.
+ (WebCore::JSSharedWorkerContext::mark):
+ Custom marking of the onconnect handler.
+ * bindings/js/JSWorkerContextBase.cpp:
+ (WebCore::toJSSharedWorkerContext):
+ (WebCore::toJSWorkerContext):
+ Added proper conversion to the correct WorkerContext derived class.
+ * bindings/js/JSWorkerContextBase.h:
+ * bindings/js/WorkerScriptController.cpp:
+ (WebCore::WorkerScriptController::initScript):
+ Updated WorkerScriptController to create the correct type of binding object (JSSharedWorkerContext vs JSDedicatedWorkerContext)
+ * bindings/scripts/CodeGeneratorV8.pm:
+ Added support for SharedWorkerContext.
+ * bindings/v8/DOMObjectsInclude.h:
+ Added shared worker bindings files.
+ * dom/EventNames.h:
+ Added connect event.
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::toSharedWorkerContext):
+ Added API for casting to new derived class (SharedWorkerContext).
+ * dom/EventTarget.h:
+ * workers/AbstractWorker.cpp:
+ (WebCore::AbstractWorker::resolveURL):
+ Moved code that resolves/validates URLs to base class so it can be shared between dedicated/shared workers.
+ * workers/AbstractWorker.h:
+ * workers/DedicatedWorkerContext.cpp:
+ (WebCore::DedicatedWorkerContext::logException):
+ Refactored exception handling code - moved onerror handling to base class.
+ * workers/DedicatedWorkerContext.h:
+ (WebCore::DedicatedWorkerContext::isDedicatedWorkerContext):
+ * workers/SharedWorker.cpp:
+ (WebCore::SharedWorker::SharedWorker):
+ Changed constructor to fire up worker thread.
+ * workers/SharedWorker.h:
+ * workers/SharedWorkerContext.cpp: Added.
+ (WebCore::SharedWorkerContext::SharedWorkerContext):
+ (WebCore::SharedWorkerContext::~SharedWorkerContext):
+ (WebCore::SharedWorkerContext::logException):
+ (WebCore::SharedWorkerContext::addMessage):
+ Placeholder methods until we add support for sending exceptions/messages to console.
+ (WebCore::SharedWorkerContext::dispatchConnect):
+ (WebCore::SharedWorkerContext::thread):
+ * workers/SharedWorkerContext.h: Added.
+ (WebCore::SharedWorkerContext::create):
+ (WebCore::SharedWorkerContext::isSharedWorkerContext):
+ (WebCore::SharedWorkerContext::toSharedWorkerContext):
+ (WebCore::SharedWorkerContext::setOnconnect):
+ (WebCore::SharedWorkerContext::onconnect):
+ (WebCore::SharedWorkerContext::name):
+ * workers/SharedWorkerContext.idl: Added.
+ * workers/SharedWorkerRepository.h: Added.
+ (WebCore::SharedWorkerRepository::~SharedWorkerRepository):
+ * workers/DefaultSharedWorkerRepository.cpp: Added.
+ Implementation of core singleton class that will be used to implement sharing.
+ (WebCore::SharedWorkerProxy::setThread):
+ Proxy object used to handle resource loading for a given shared worker.
+ (WebCore::SharedWorkerProxy::postTaskToLoader):
+ (WebCore::SharedWorkerProxy::postTaskForModeToWorkerContext):
+ Placeholder routines until we implement loading.
+ (WebCore::SharedWorkerConnectTask::create):
+ Creates a task to fire off a connect event on the worker thread.
+ (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
+ (WebCore::SharedWorkerConnectTask::performTask):
+ (WebCore::SharedWorkerLoader::SharedWorkerLoader):
+ Added helper object to load the initial script for the worker.
+ (WebCore::SharedWorkerLoader::load):
+ (WebCore::SharedWorkerLoader::notifyFinished):
+ (WebCore::SharedWorkerRepository::instance):
+ (WebCore::DefaultSharedWorkerRepository::instance):
+ (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
+ Fires off the worker thread once the script is loaded.
+ (WebCore::SharedWorkerRepository::connect):
+ (WebCore::DefaultSharedWorkerRepository::DefaultSharedWorkerRepository):
+ (WebCore::DefaultSharedWorkerRepository::~DefaultSharedWorkerRepository):
+ * workers/DefaultSharedWorkerRepository.h: Added.
+ * workers/SharedWorkerThread.cpp: Added.
+ (WebCore::SharedWorkerThread::create):
+ (WebCore::SharedWorkerThread::SharedWorkerThread):
+ (WebCore::SharedWorkerThread::~SharedWorkerThread):
+ (WebCore::SharedWorkerThread::createWorkerContext):
+ * workers/SharedWorkerThread.h: Added.
+ * workers/Worker.cpp:
+ (WebCore::Worker::Worker):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::reportException):
+ * workers/WorkerContext.h:
+ (WebCore::WorkerContext::isSharedWorkerContext):
+ (WebCore::WorkerContext::isDedicatedWorkerContext):
+ Added APIs to determine the type of a given context.
+
+2009-08-06 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Added ENABLE_3D_CANVAS flag to build, default to off
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-08-06 Andras Becsi <becsi.andras@stud.u-szeged.hu>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] windowsKeyCodeForKeyEvent fix
+
+ Fix windowsKeyCodeForKeyEvent to determine wheter the event comes from the keypad.
+
+ * platform/qt/PlatformKeyboardEventQt.cpp:
+ (WebCore::windowsKeyCodeForKeyEvent):
+ (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
+
+2009-08-06 George Staikos <george.staikos@torchmobile.com>
+
+ Rubber-stamped by Ariya Hidayat.
+
+ Remove the dead wince/ directory that should never have gone in.
+
+ * svg/graphics/wince: Removed.
+ * svg/graphics/wince/SVGResourceFilterWince.cpp: Removed.
+
+2009-08-06 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Extract style editing into a separate file that is
+ going to be loaded in page context.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27939
+
+ * inspector/front-end/InjectedScript.js: Added.
+ (InjectedScript.applyStyleText):
+ (InjectedScript.setStyleText):
+ (InjectedScript.toggleStyleEnabled):
+ (InjectedScript.setStyleRule):
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.callback):
+ (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
+ (WebInspector.StylePropertyTreeElement.prototype.):
+ (WebInspector.StylePropertyTreeElement.prototype):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+
+2009-08-06 Adam Barth <abarth@webkit.org>
+
+ Reviewed by David Levin.
+
+ [V8] Remove bug-bait V8Proxy::context()
+ https://bugs.webkit.org/show_bug.cgi?id=27826
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::updateDocumentWrapperCache):
+ (WebCore::V8Proxy::initContextIfNeeded):
+ (WebCore::V8Proxy::mainWorldContext):
+ * bindings/v8/V8Proxy.h:
+
+2009-08-06 Adam Barth <abarth@webkit.org>
+
+ Unreviewed attempt to fix the Chromium Linux build. This function is
+ not used.
+
+ * bindings/v8/OwnHandle.h:
+
+2009-08-06 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [V8] Teach ScheduledAction::execute about isolated worlds
+ https://bugs.webkit.org/show_bug.cgi?id=27703
+
+ We now save a weak handle to the original context. We use that handle
+ to call the timeout in the right context / world.
+
+ Tests: http/tests/security/isolatedWorld/window-setTimeout-function.html
+ http/tests/security/isolatedWorld/window-setTimeout-string.html
+
+ * bindings/v8/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::ScheduledAction):
+ (WebCore::ScheduledAction::execute):
+ * bindings/v8/ScheduledAction.h:
+ (WebCore::ScheduledAction::ScheduledAction):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8Custom::WindowSetTimeoutImpl):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::SetTimeoutOrInterval):
+
+2009-08-05 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [V8] Revert http://trac.webkit.org/changeset/46821, which was
+ landed to supplement http://trac.webkit.org/changeset/46816, but
+ now that the latter is reverted, the former needs the same.
+
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+
+2009-08-05 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Color is only reported in rgb() format; should toggle between rgb() and hex
+ https://bugs.webkit.org/show_bug.cgi?id=13516
+
+ New Class to Parse and Change Between Color Representations:
+
+ * inspector/front-end/Color.js: Added.
+ (WebInspector.Color):
+
+ Representations of Colors in Raw Form. (May be Lazy Loaded):
+
+ (WebInspector.Color.prototype.get shorthex):
+ (WebInspector.Color.prototype.get hex):
+ (WebInspector.Color.prototype.set hex):
+ (WebInspector.Color.prototype.get rgb):
+ (WebInspector.Color.prototype.set rgb):
+ (WebInspector.Color.prototype.get hsl):
+ (WebInspector.Color.prototype.set hsl):
+ (WebInspector.Color.prototype.get nickname):
+ (WebInspector.Color.prototype.set nickname):
+ (WebInspector.Color.prototype.get rgba):
+ (WebInspector.Color.prototype.set rgba):
+ (WebInspector.Color.prototype.get hsla):
+ (WebInspector.Color.prototype.set hsla):
+
+ Helpers and Standard String Representations:
+
+ (WebInspector.Color.prototype.hasShortHex):
+ (WebInspector.Color.prototype.toRgb):
+ (WebInspector.Color.prototype.toHsl):
+ (WebInspector.Color.prototype.toShortHex):
+ (WebInspector.Color.prototype.toHex):
+ (WebInspector.Color.prototype.toRgba):
+ (WebInspector.Color.prototype.toHsla):
+ (WebInspector.Color.prototype.toNickname):
+
+ Conversion Functions to Determine Other Representations:
+ My Sources for all algorithms and sample data:
+ Wikipedia: http://en.wikipedia.org/wiki/HSV_color_space
+ CSS Specification: http://www.w3.org/TR/css3-color/#hsla-color
+
+ (WebInspector.Color.prototype.rgbToHex):
+ (WebInspector.Color.prototype.hexToRgb):
+ (WebInspector.Color.prototype.rgbToHsl):
+ (WebInspector.Color.prototype.hslToRgb.hueToRgb):
+ (WebInspector.Color.prototype.hslToRgb):
+ (WebInspector.Color.prototype.rgbaToHsla):
+ (WebInspector.Color.prototype.hslaToRgba):
+
+ Called from the constructor, attempts to parse and will throw an error
+ if it cannot parse. If simple then the "hex" value is guarenteed.
+ If advanced then both the "rgba" and "hsla" are guarenteed. If it is
+ a nickname in any way (e.g. "transparent", "black") then this is
+ guarenteed to be set as well.
+
+ (WebInspector.Color.prototype.parse):
+
+ Clicking on the swatch will rotate through Color Representations.
+ Simple: rgb -> hsl -> nickname? -> shorthex? -> hex -> (loop around)
+ Advanced: rgba -> hsla -> nickname? -> (loop around)
+
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertyTreeElement.prototype.updateTitle.value.):
+ (WebInspector.StylePropertyTreeElement.prototype.updateTitle):
+
+ Load Color.js:
+
+ * inspector/front-end/inspector.html:
+
+2009-08-05 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Support setting event listeners for message ports in the worker process.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28004
+
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::retrieve):
+ (WebCore::WorkerContextExecutionProxy::EventTargetToV8Object):
+ * bindings/v8/WorkerContextExecutionProxy.h:
+ * bindings/v8/custom/V8MessagePortCustom.cpp:
+ (WebCore::getEventListener):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-08-05 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ http://bugs.webkit.org/show_bug.cgi?id=28022
+
+ Minor fix for media code on chromium/skia.
+
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::paintMediaSliderTrack):
+
+2009-08-05 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Client side image maps did not handle zoom correctly.
+ Client side image maps did not handle border and padding correctly.
+
+ Test: fast/images/image-map-zoom.html
+
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::nodeAtPoint): Compute the values to pass in to the map
+ element using the content box and the effective zoom.
+
+2009-08-05 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28027
+ <rdar://7064428> Files with accents in names are submitted incorrectly due to use of
+ precomposed Unicode
+
+ * platform/network/mac/FormDataStreamMac.mm: (WebCore::setHTTPBody): Use getFileSize() from
+ FileSystem.h instead of custom code for getting file size. This adds path normalization
+ necessary with some file systems on Mac. This also loses a S_IFMT check, which didn't seem
+ important anyway.
+
+2009-08-05 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [V8] Include Media into V8 bindings.
+
+ * bindings/v8/DOMObjectsInclude.h: Added Media include.
+ * bindings/v8/DerivedSourcesAllInOne.cpp: Added V8Media include.
+ * bindings/v8/V8Index.cpp: Added decl for V8Media.
+ * bindings/v8/V8Index.h: Added V8Media include.
+
+2009-08-04 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Fix Windows layout test crashes.
+
+ PluginView::removeFromUnstartedListIfNecessary() would try to remove
+ any unstarted PluginView from the Page's set of unstarted plug-ins,
+ regardless of why the PluginView wasn't started. If we tried to start a
+ plug-in, but it failed to start, we would hit an assertion in
+ Page::removeUnstartedPlugin() that asserts that we would only modify the
+ unstarted plug-ins set if we were not currently starting plug-ins.
+
+ Fix this by having PluginView track whether it's waiting to be started,
+ and to check this before trying to remove itself from the Page's
+ unstarted plug-ins set.
+
+ Reviewed by Darin Adler.
+
+ * page/Page.cpp:
+ (WebCore::Page::removeUnstartedPlugin):
+ Assert that the passed PluginView is in the unstarted set.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::start):
+ Set that we are not waiting to be started.
+ (WebCore::PluginView::startOrAddtoUnstartedList):
+ Set that we are waiting to be started.
+ (WebCore::PluginView::removeFromUnstartedListIfNecessary):
+ Check not whether we are started, but whether we are waiting to be
+ started.
+ (WebCore::PluginView::PluginView):
+
+ * plugins/PluginView.h:
+
+2009-08-05 Jeremy Orlow <jorlow@chromium.org>
+
+ Fix DOM Storage memory leak
+ https://bugs.webkit.org/show_bug.cgi?id=28029
+
+ Forgot to use adoptRef in one place. This caused the = operator to
+ increment the ref count when it shouldn't have, so StorageAreaImpl's were
+ never freed.
+
+ * storage/StorageNamespaceImpl.cpp:
+ (WebCore::StorageNamespaceImpl::storageArea):
+
+2009-08-05 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [Chromium] Let CodeGeneratorV8.pm know that Media is ref-counted.
+
+ * bindings/scripts/CodeGeneratorV8.pm: Added Media check to IsRefPtrType.
+
+2009-08-05 Darin Adler <darin@apple.com>
+
+ Reviewed by David Levin.
+
+ Use checked casts for render tree
+ https://bugs.webkit.org/show_bug.cgi?id=23522
+
+ Last patch. Makes all the casts of RenderObject use checked
+ casts instead of using static_cast directly.
+
+ * accessibility/AccessibilityListBox.cpp:
+ (WebCore::AccessibilityListBox::visibleChildren):
+ (WebCore::AccessibilityListBox::doAccessibilityHitTest):
+ * accessibility/AccessibilityListBoxOption.cpp:
+ (WebCore::AccessibilityListBoxOption::elementRect):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::textUnderElement):
+ (WebCore::AccessibilityRenderObject::stringValue):
+ (WebCore::AccessibilityRenderObject::titleUIElement):
+ (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
+ * accessibility/AccessibilitySlider.cpp:
+ (WebCore::AccessibilitySliderThumb::elementRect):
+ * dom/InputElement.cpp:
+ (WebCore::InputElement::updatePlaceholderVisibility):
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::scrollToSelection):
+ (WebCore::SelectElement::recalcStyle):
+ (WebCore::SelectElement::setRecalcListItems):
+ (WebCore::SelectElement::menuListDefaultEventHandler):
+ (WebCore::SelectElement::listBoxDefaultEventHandler):
+ * editing/BreakBlockquoteCommand.cpp:
+ (WebCore::BreakBlockquoteCommand::doApply):
+ * html/HTMLAppletElement.cpp:
+ (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::reset):
+ * html/HTMLEmbedElement.cpp:
+ (WebCore::HTMLEmbedElement::updateWidget):
+ * html/HTMLFrameElementBase.cpp:
+ (WebCore::HTMLFrameElementBase::attach):
+ * html/HTMLFrameSetElement.cpp:
+ (WebCore::HTMLFrameSetElement::defaultEventHandler):
+ * html/HTMLIFrameElement.cpp:
+ (WebCore::HTMLIFrameElement::attach):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::defaultEventHandler):
+ (WebCore::HTMLInputElement::addSearchResult):
+ (WebCore::HTMLInputElement::onSearch):
+ * html/HTMLLIElement.cpp:
+ (WebCore::HTMLLIElement::parseMappedAttribute):
+ (WebCore::HTMLLIElement::attach):
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::setReadyState):
+ (WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
+ (WebCore::HTMLMediaElement::mediaPlayerSizeChanged):
+ (WebCore::HTMLMediaElement::mediaPlayerRenderingCanBeAccelerated):
+ (WebCore::HTMLMediaElement::mediaPlayerGraphicsLayer):
+ (WebCore::HTMLMediaElement::defaultEventHandler):
+ (WebCore::HTMLMediaElement::finishParsingChildren):
+ * html/HTMLOListElement.cpp:
+ (WebCore::HTMLOListElement::parseMappedAttribute):
+ * html/HTMLObjectElement.cpp:
+ (WebCore::HTMLObjectElement::updateWidget):
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::defaultEventHandler):
+ * page/DragController.cpp:
+ (WebCore::DragController::concludeEditDrag):
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::selectCursor):
+ (WebCore::EventHandler::capsLockStateMayHaveChanged):
+ * page/Frame.cpp:
+ (WebCore::Frame::ownerRenderer):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::detachCustomScrollbars):
+ * page/wince/FrameWince.cpp:
+ (WebCore::computePageRectsForFrame):
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::placeBoxesHorizontally):
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlTimelineElement::defaultEventHandler):
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::findNextLineBreak):
+ * rendering/RenderCounter.cpp:
+ (WebCore::planCounter):
+ * rendering/RenderFrameSet.cpp:
+ (WebCore::RenderFrameSet::computeEdgeInfo):
+ (WebCore::RenderFrameSet::setIsResizing):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::contentsBox):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::updateBacking):
+ (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
+ * rendering/RenderListItem.cpp:
+ (WebCore::previousListItem):
+ (WebCore::RenderListItem::explicitValueChanged):
+ * rendering/RenderObject.cpp:
+ (WebCore::updateListMarkerNumbers):
+ * rendering/RenderObjectChildList.cpp:
+ (WebCore::updateListMarkerNumbers):
+ (WebCore::invalidateCountersInContainer):
+ * rendering/RenderScrollbarTheme.cpp:
+ (WebCore::RenderScrollbarTheme::minimumThumbLength):
+ (WebCore::RenderScrollbarTheme::backButtonRect):
+ (WebCore::RenderScrollbarTheme::forwardButtonRect):
+ (WebCore::RenderScrollbarTheme::trackRect):
+ (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
+ (WebCore::RenderScrollbarTheme::paintScrollbarBackground):
+ (WebCore::RenderScrollbarTheme::paintTrackBackground):
+ (WebCore::RenderScrollbarTheme::paintTrackPiece):
+ (WebCore::RenderScrollbarTheme::paintButton):
+ (WebCore::RenderScrollbarTheme::paintThumb):
+ * rendering/RenderSlider.cpp:
+ (WebCore::SliderThumbElement::defaultEventHandler):
+ * rendering/RenderThemeChromiumMac.mm:
+ (WebCore::RenderThemeChromiumMac::paintSliderThumb):
+ (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
+ * rendering/RenderThemeChromiumWin.cpp:
+ (WebCore::RenderThemeChromiumWin::determineSliderThumbState):
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintSliderThumb):
+ * rendering/RenderThemeSafari.cpp:
+ (WebCore::RenderThemeSafari::paintSliderThumb):
+ * rendering/RenderThemeWin.cpp:
+ (WebCore::RenderThemeWin::determineSliderThumbState):
+ * rendering/SVGCharacterLayoutInfo.cpp:
+ (WebCore::SVGCharacterLayoutInfo::addLayoutInformation):
+ * rendering/SVGRootInlineBox.cpp:
+ (WebCore::findSVGRootObject):
+ * rendering/TextControlInnerElements.cpp:
+ (WebCore::RenderTextControlInnerBlock::nodeAtPoint):
+ (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
+ * svg/SVGImageElement.cpp:
+ (WebCore::SVGImageElement::attach):
+ * svg/SVGMarkerElement.cpp:
+ (WebCore::SVGMarkerElement::canvasResource):
+ * svg/SVGTextContentElement.cpp:
+ (WebCore::rootInlineBoxForTextContentElement):
+ * wml/WMLInputElement.cpp:
+ (WebCore::WMLInputElement::defaultEventHandler):
+ Use checked casts.
+
+ * rendering/RenderApplet.h:
+ * rendering/RenderCounter.h:
+ * rendering/RenderFieldset.h:
+ * rendering/RenderFileUploadControl.h:
+ * rendering/RenderFrame.h:
+ * rendering/RenderFrameSet.h:
+ * rendering/RenderHTMLCanvas.h:
+ * rendering/RenderListBox.h:
+ * rendering/RenderListItem.h:
+ * rendering/RenderListMarker.h:
+ * rendering/RenderMedia.h:
+ * rendering/RenderMenuList.h:
+ * rendering/RenderPart.h:
+ * rendering/RenderPartObject.h:
+ * rendering/RenderPath.h:
+ * rendering/RenderSVGContainer.h:
+ * rendering/RenderSVGRoot.h:
+ * rendering/RenderSVGTextPath.h:
+ * rendering/RenderSVGViewportContainer.h:
+ * rendering/RenderScrollbar.h:
+ * rendering/RenderSlider.h:
+ * rendering/RenderTextControlMultiLine.h:
+ * rendering/RenderTextControlSingleLine.h:
+ * rendering/RenderVideo.h:
+ Added a checked cast. Also made most members protected or private.
+
+ * rendering/RenderBlock.h:
+ * rendering/RenderInline.h:
+ * rendering/RenderReplaced.h:
+ * rendering/RenderSVGBlock.h:
+ * rendering/RenderSVGImage.h:
+ * rendering/RenderSVGInlineText.h:
+ * rendering/RenderSVGText.h:
+ * rendering/RenderTextControl.h:
+ Made most members protected or private.
+
+ * rendering/RenderInline.cpp:
+ * rendering/RenderSVGContainer.cpp:
+ * rendering/RenderSVGHiddenContainer.cpp:
+ * rendering/RenderSVGImage.cpp:
+ * rendering/RenderSVGRoot.cpp:
+ Removed unneeded destructor.
+
+ * rendering/RenderSVGHiddenContainer.h:
+ Removed unneeded virtual function overrides that did the same as
+ the default and base class.
+
+ * rendering/RenderSVGViewportContainer.cpp:
+ (WebCore::RenderSVGViewportContainer::paint): Updated to use m_viewport
+ directly instead of using a function call.
+ (WebCore::RenderSVGViewportContainer::applyViewportClip): Ditto.
+ (WebCore::RenderSVGViewportContainer::viewportTransform): Ditto.
+ (WebCore::RenderSVGViewportContainer::localToParentTransform): Ditto.
+ (WebCore::RenderSVGViewportContainer::pointIsInsideViewportClip): Ditto.
+
+ * rendering/RenderScrollbar.cpp:
+ (WebCore::pseudoForScrollbarPart): Changed switch statement to use cases for
+ all values instead of using a default case.
+
+ * rendering/RenderTreeAsText.cpp:
+ (WebCore::operator<<): Removed dependency on casting to types that don't
+ have any public members we need to get at. Instead, use function names to
+ identify the type rather than doing so much overloading. Changed to use
+ checked casts.
+ (WebCore::write): Ditto.
+
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::renderSubtreeToImage): Changed to use a checked cast and also
+ added a comment about the fact that the code does not do sufficient type
+ checking before doing the cast.
+
+ * rendering/SVGRenderTreeAsText.cpp:
+ (WebCore::writeRenderSVGTextBox): Renamed this from operator<<.
+ (WebCore::writeSVGInlineTextBoxes): Renamed this from writeSVGInlineText.
+ (WebCore::writeSVGText): Renamed this from write.
+ (WebCore::writeSVGInlineText): Ditto.
+ (WebCore::writeSVGImage): Ditto.
+ * rendering/SVGRenderTreeAsText.h: Updated for name changes. Removed
+ unneeded default arguments.
+
+2009-08-05 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27851
+ Fix a pair of compiler warnings on the GTK Linux buildbot.
+
+ * platform/image-decoders/bmp/BMPImageDecoder.cpp:
+ (WebCore::BMPImageDecoder::processFileHeader): Don't use multi-character constants, they're not portable.
+ * platform/image-decoders/ico/ICOImageDecoder.cpp:
+ (WebCore::ICOImageDecoder::setSize): Simpler code that also doesn't compare signed with unsigned.
+
+2009-08-05 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26460
+ Return multiple icon entries from the ICO decoder as separate frames,
+ sorted by decreasing quality (much like the CG ICO decoder does).
+
+ As a result of this change, we can eliminate the Skia-specific setData()
+ hack that the Chromium port used to select the desired icon size -- now
+ callers can just enumerate the frames and ask for the data from the one
+ they like.
+
+ Under the hood, the ICO decoder now keeps vectors for a number of things
+ (including directory entries and image decoders) where it used to have
+ single members. However, callers (that I have seen) will only request
+ one frame from the icon, so practically there aren't going to be lots of
+ instantiated image decoders.
+
+ * platform/graphics/ImageSource.h: Move |m_decoder| back to private now that Skia no longer needs to access it.
+ * platform/graphics/cairo/ImageSourceCairo.cpp:
+ (WebCore::createDecoder): Remove size argument from ICO decoder instantiation.
+ * platform/graphics/skia/ImageSourceSkia.cpp:
+ (WebCore::createDecoder): Remove size argument from ICO decoder instantiation.
+ (WebCore::ImageSource::setData): Remove function to ask for a particular icon size.
+ * platform/graphics/skia/ImageSourceSkia.h: Removed.
+ * platform/graphics/wx/ImageSourceWx.cpp:
+ (WebCore::createDecoder): Remove size argument from ICO decoder instantiation.
+ * platform/image-decoders/ico/ICOImageDecoder.cpp:
+ (WebCore::ICOImageDecoder::ICOImageDecoder):
+ (WebCore::ICOImageDecoder::~ICOImageDecoder): Delete all instantiated per-frame decoders.
+ (WebCore::ICOImageDecoder::setData): Send data to all instantiated per-frame decoders.
+ (WebCore::ICOImageDecoder::isSizeAvailable): Use size from icon directory instead of PNG decoder (if applicable) so we can report it without decoding the PNG frames.
+ (WebCore::ICOImageDecoder::size): Report frame-specific size if BMP decoder is calling. Otherwise, use size from icon directory instead of PNG decoder (if applicable).
+ (WebCore::ICOImageDecoder::frameSizeAtIndex): Implement.
+ (WebCore::ICOImageDecoder::setSize): Sanity check value if BMP decoder is calling.
+ (WebCore::ICOImageDecoder::frameCount): Implement.
+ (WebCore::ICOImageDecoder::frameBufferAtIndex): Sanity check size for PNG frames.
+ (WebCore::ICOImageDecoder::compareEntries): Add utility function for sorting entries.
+ (WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex): Factor out utility function for passing correct data blob to a PNG decoder.
+ (WebCore::ICOImageDecoder::decodeWithCheckForDataEnded): Split decode() into two pieces.
+ (WebCore::ICOImageDecoder::decodeDirectory): The first part of the old decode().
+ (WebCore::ICOImageDecoder::decodeAtIndex): The second part of the old decode(), split off so we avoid decoding an entry until it's requested.
+ (WebCore::ICOImageDecoder::processDirectory): Add resizing of internal data structures based on directory contents.
+ (WebCore::ICOImageDecoder::processDirectoryEntries): Sort entries by quality.
+ (WebCore::ICOImageDecoder::imageTypeAtIndex): Return type to caller instead of setting a member.
+ * platform/image-decoders/ico/ICOImageDecoder.h:
+
+2009-08-05 Szabo Carol <carol.szabo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27942
+
+ Test: fast/forms/select-reset-multiple-selections-4-single-selection.html
+
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::reset):
+ Added HTML 4.01 compliant handling of broken webpages that
+ specify more than one selected option for single selection SELECT
+ element, in a manner that emulates Firefox and is similar to IE 7
+
+
+2009-08-05 Andras Becsi <becsi.andras@stud.u-szeged.hu>
+
+ Reviewed by Simon Hausmann.
+
+ WebCore.pro bugfix
+
+ Fix the gperf lines to properly include the string.h header at compilation with gperf version 3.0.3 and newer.
+
+ * WebCore.pro:
+
+2009-08-05 Chris Fleizach <cfleizach@apple.com>
+
+ Fix Tiger build breakage.
+
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+
+2009-08-04 Simon Hausmann <hausmann@webkit.org>
+
+ Prospective build fix for Qt build bot: Fix dependency of HTMLNames.cpp
+ to both source files, HTMLTagNames.in and HTMLAttributeNames.in
+
+ * WebCore.pro:
+
+2009-08-04 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Keypress should exit from pan scrolling mode.
+ https://bugs.webkit.org/show_bug.cgi?id=28005
+
+ Change the logic from only exiting pan scrolling on escape to exiting on any key press,
+ making it easier for users to back out of an accidental pan scroll.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::keyEvent):
+
+2009-08-04 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Simon Fraser.
+
+ REGRESSION (r45064): Drop caret remains in text control after the mouse exits
+ https://bugs.webkit.org/show_bug.cgi?id=26787
+
+ Add back missing dragController()->clear() call.
+
+ * manual-tests/drag-caret.html: Added.
+ * page/DragController.cpp:
+ (WebCore::DragController::tryDocumentDrag):
+
+2009-08-04 Chris Fleizach <cfleizach@apple.com>
+
+ Bug 27994 - WAI-ARIA: aria-valuetext needs to be implemented
+ https://bugs.webkit.org/show_bug.cgi?id=27994
+
+ Forgot to commit attribute names.
+
+ * html/HTMLAttributeNames.in:
+
+2009-08-04 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 27994 - WAI-ARIA: aria-valuetext needs to be implemented
+ https://bugs.webkit.org/show_bug.cgi?id=27994
+
+ Test: platform/mac/accessibility/aria-valuetext.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::valueDescription):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::valueDescription):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+ * html/HTMLAttributeNames.in:
+
+2009-08-04 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27821
+
+ No new features, no new tests. Existing layout tests pass.
+
+ * WebCore.base.exp:
+
+ Export AppliationCacheGroup::storeCopyOfCache
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+ Restore DOMApplicationCache.h and ApplicationCacheHost.h to 'project' headers
+ instead of 'private' headers since they're no longer in the DocumentLoader.h
+ include graph.
+
+ * html/HTMLHtmlElement.cpp:
+ (WebCore::HTMLHtmlElement::insertedIntoDocument):
+
+ Reinstate the test for manifest.isNull instead of .isEmtpty().
+ Added a FIXME to revisit once the spec gets clarified.
+
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::DocumentLoader):
+ (WebCore::DocumentLoader::mainReceivedError):
+ (WebCore::DocumentLoader::detachFromFrame):
+ * loader/DocumentLoader.h:
+ (WebCore::DocumentLoader::applicationCacheHost):
+
+ ApplicationCacheHost is held in an OwnPtr<> by DocumentLoader. This was done
+ for compile time friendliness, it results in a smaller include graph for files
+ dependent on DocumentLoader.h.
+
+ * loader/FrameLoader.cpp:
+ * loader/MainResourceLoader.cpp:
+ * loader/ResourceLoader.cpp:
+
+ Cleanup ussage of ENABLE(xxx) around includes, generally remove those guards.
+ This was done for readability at the include site. The included files contain appropriate guards,
+ so they're not needed at the include site.
+
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::ApplicationCacheGroup::selectCache):
+ (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
+ (WebCore::ApplicationCacheGroup::failedLoadingMainResource):
+ (WebCore::ApplicationCacheGroup::update):
+ (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
+ (WebCore::ApplicationCacheGroup::manifestNotFound):
+ (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
+ (WebCore::ApplicationCacheGroup::startLoadingEntry):
+ (WebCore::CallCacheListenerTask::create):
+ (WebCore::CallCacheListenerTask::performTask):
+ (WebCore::CallCacheListenerTask::CallCacheListenerTask):
+ (WebCore::ApplicationCacheGroup::postListenerTask):
+ * loader/appcache/ApplicationCacheGroup.h:
+
+ Use ApplicationCachHost defined constants, no longer depends on DOMApplicationCache.
+
+ * loader/appcache/ApplicationCacheHost.cpp:
+ (WebCore::ApplicationCacheHost::ApplicationCacheHost):
+ (WebCore::ApplicationCacheHost::setDOMApplicationCache):
+ (WebCore::ApplicationCacheHost::notifyEventListener):
+ (WebCore::ApplicationCacheHost::status):
+ * loader/appcache/ApplicationCacheHost.h:
+ (WebCore::ApplicationCacheHost::):
+ * loader/appcache/ApplicationCacheStorage.cpp:
+ (WebCore::ApplicationCacheStorage::storeCopyOfCache):
+ * loader/appcache/ApplicationCacheStorage.h:
+
+ Merge recently added transferApplicationCache and pre-existing storeCopyOfCache methods.
+
+ * loader/appcache/DOMApplicationCache.cpp:
+ (WebCore::DOMApplicationCache::status):
+ (WebCore::DOMApplicationCache::addEventListener):
+ (WebCore::DOMApplicationCache::removeEventListener):
+ (WebCore::DOMApplicationCache::callListener):
+ (WebCore::DOMApplicationCache::toEventType):
+ (WebCore::DOMApplicationCache::toEventID):
+ * loader/appcache/DOMApplicationCache.h:
+ (WebCore::DOMApplicationCache::setAttributeEventListener):
+ (WebCore::DOMApplicationCache::getAttributeEventListener):
+ (WebCore::DOMApplicationCache::clearAttributeEventListener):
+ (WebCore::DOMApplicationCache::callEventListener):
+ (WebCore::DOMApplicationCache::setOnchecking):
+ (WebCore::DOMApplicationCache::onchecking):
+ (WebCore::DOMApplicationCache::setOnerror):
+ (WebCore::DOMApplicationCache::onerror):
+ (WebCore::DOMApplicationCache::setOnnoupdate):
+ (WebCore::DOMApplicationCache::onnoupdate):
+ (WebCore::DOMApplicationCache::setOndownloading):
+ (WebCore::DOMApplicationCache::ondownloading):
+ (WebCore::DOMApplicationCache::setOnprogress):
+ (WebCore::DOMApplicationCache::onprogress):
+ (WebCore::DOMApplicationCache::setOnupdateready):
+ (WebCore::DOMApplicationCache::onupdateready):
+ (WebCore::DOMApplicationCache::setOncached):
+ (WebCore::DOMApplicationCache::oncached):
+ (WebCore::DOMApplicationCache::setOnobsolete):
+ (WebCore::DOMApplicationCache::onobsolete):
+
+ Use ApplicationCachHost defined constants for Status and EventIDs.
+
+2009-08-04 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Revert r46421 and r46769, which appear to have totally hosed the v8 bindings.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27719
+
+ * bindings/v8/V8AbstractEventListener.cpp: Revert r46421.
+ (WebCore::V8AbstractEventListener::invokeEventHandler):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp: Revert r46769.
+ (WebCore::ACCESSOR_GETTER):
+
+2009-08-04 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 27993 - AXSliders are missing required attributes and actions
+ https://bugs.webkit.org/show_bug.cgi?id=27993
+
+ Expose appropriate actions and attributes for sliders.
+
+ Test: platform/mac/accessibility/slider-supports-actions.html
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::orientation):
+ * accessibility/AccessibilityObject.h:
+ (WebCore::):
+ * accessibility/AccessibilitySlider.cpp:
+ (WebCore::AccessibilitySlider::orientation):
+ * accessibility/AccessibilitySlider.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper accessibilityActionNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+
+2009-08-04 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ [V8] Fix an assert in WebCoreStringResource that causes worker script
+ evaluation failed.
+ https://bugs.webkit.org/show_bug.cgi?id=27996
+
+ The fix is to check for the same thread, instead of the main thread.
+ This is because Chromium's workers use v8 in a single thread that is
+ not the main thread.
+
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::WebCoreStringResource::WebCoreStringResource):
+ (WebCore::WebCoreStringResource::~WebCoreStringResource):
+ (WebCore::WebCoreStringResource::atomicString):
+
+2009-08-04 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Add support for transitions/animations of text-indent.
+
+ Test: transitions/text-indent-transition.html
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::ensurePropertyMap):
+
+2009-08-04 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Add support for transitions of min- and max-width, and min- and max-height.
+ https://bugs.webkit.org/show_bug.cgi?id=27990
+
+ Test: transitions/min-max-width-height-transitions.html
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::ensurePropertyMap):
+
+2009-08-04 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 27964 - WAI-ARIA: radio button does not determine its label from text content
+ https://bugs.webkit.org/show_bug.cgi?id=27964
+
+ ARIA radio buttons also need to use the text inside of them, like buttons and other roles.
+ Also fixed an issue where an extra space was being appended to some ARIA labels.
+
+ Test: platform/mac/accessibility/aria-radiobutton-text.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::ariaAccessibilityName):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::ariaAccessibilityName):
+ (WebCore::AccessibilityRenderObject::ariaLabeledByAttribute):
+ (WebCore::AccessibilityRenderObject::title):
+ (WebCore::AccessibilityRenderObject::ariaDescribedByAttribute):
+ * accessibility/AccessibilityRenderObject.h:
+
+2009-08-04 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Missed a place that expects window.event to be hidden when it shouldn't be.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27719
+
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::ACCESSOR_GETTER): window.event is no longer hidden.
+
+2009-08-03 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Bug 27958 - WAI-ARIA: Implement 'aria-required' attribute.
+ https://bugs.webkit.org/show_bug.cgi?id=27958
+
+ Test: platform/mac/accessibility/aria-required.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::isRequired):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::isRequired):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+ * html/HTMLAttributeNames.in:
+
+2009-08-04 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ Add QWebPluginDatabase API to the Qt API.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27651
+
+ * WebCore.pro:
+
+2009-08-04 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Reviewed by Adam Treat.
+
+ [Qt] PlusDarker is not supported. Fall back to CompositionMode_Darken
+ (as it is the closest match) instead of CompositionMode_SourceOver.
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::toQtCompositionMode):
+
+2009-08-04 Christian Plesner Hansen <christian.plesner.hansen@gmail.com>
+
+ Reviewed by Adam Barth.
+
+ [v8] Fix crash when converting empty v8 string to atomic webkit string.
+ https://bugs.webkit.org/show_bug.cgi?id=27975
+
+ collection-null-like-arguments.html tests for this.
+
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::v8StringToAtomicWebCoreString):
+
+2009-08-04 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ selectionHasStyle needs clean up to fix Bug 27858
+ https://bugs.webkit.org/show_bug.cgi?id=27865
+
+ This patch cleans up selectionStartHasStyle and selectionHasStyle.
+ No test is added because the patch does not change any behavior.
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::getPropertiesNotInComputedStyle): Used in triStateOfStyleInComputedStyle but will be used here as well
+ * editing/ApplyStyleCommand.h: Added the prototype of getPropertiesNotInComputedStyle
+ * editing/Editor.cpp:
+ (WebCore::triStateOfStyleInComputedStyle): Determines if the specified style is present in the specified computed style.
+ (WebCore::Editor::selectionStartHasStyle): Uses triStateOfStyleInComputedStyle
+ (WebCore::Editor::selectionHasStyle): Uses triStateOfStyleInComputedStyle instead of updateState
+
+2009-08-03 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by David Levin.
+
+ Fix MessagePort construction in worker process. Also make the other object constructions match this.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27906
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertToV8Object):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::setDOMException):
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::ToV8Object):
+
+2009-08-03 Christian Plesner Hansen <christian.plesner.hansen@gmail.com>
+
+ Reviewed by David Levin.
+
+ [V8] Cache atomic strings in externalized v8 strings
+ https://bugs.webkit.org/show_bug.cgi?id=27762
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::WebCoreStringResource::WebCoreStringResource):
+ (WebCore::WebCoreStringResource::~WebCoreStringResource):
+ (WebCore::WebCoreStringResource::data):
+ (WebCore::WebCoreStringResource::length):
+ (WebCore::WebCoreStringResource::webcoreString):
+ (WebCore::WebCoreStringResource::atomicString):
+ (WebCore::WebCoreStringResource::toStringResource):
+ (WebCore::v8StringToWebCoreString):
+ (WebCore::v8StringToAtomicWebCoreString):
+ (WebCore::v8ValueToWebCoreString):
+ (WebCore::v8ValueToAtomicWebCoreString):
+ * bindings/v8/V8Binding.h:
+ (WebCore::):
+ * dom/Document.idl:
+
+2009-08-03 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: DOM Storage Live Updating Should Not Affect Tabbing
+ https://bugs.webkit.org/show_bug.cgi?id=27957
+
+ * inspector/front-end/DOMStorageDataGrid.js:
+ (WebInspector.DOMStorageDataGrid.prototype._startEditingColumnOfDataGridNode): disable storage event listener
+ (WebInspector.DOMStorageDataGrid.prototype._startEditing): disable storage event listener
+ (WebInspector.DOMStorageDataGrid.prototype._editingCancelled): enable storage event listener
+ * inspector/front-end/DatabasesPanel.js:
+ (WebInspector.DatabasesPanel.prototype._unregisterStorageEventListener): quick return if no listener
+
+2009-08-03 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Consolidate common gcc flags to WebKit.pri
+ https://bugs.webkit.org/show_bug.cgi?id=27934
+
+ * WebCore.pro:
+
+2009-08-03 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Chromium code sometimes isn't sandboxed and needs to access the FS.
+ https://bugs.webkit.org/show_bug.cgi?id=27954
+
+ These changes are the WebKit side of http://codereview.chromium.org/159778 which
+ aims to make LocalStorage persistent.
+
+ This change runs all FileSystem routines through the ChromiumBridge so that
+ WebKitClients can handle them if they choose to. For now, the only such client
+ will be the one running in the browser process.
+
+ It also adds a method called sandboxEnabled to the Chromium bridge so that the
+ SQLite file system code can shift its behavior depending on whether we're
+ inside a sandbox or not.
+
+ * platform/chromium/ChromiumBridge.h:
+ * platform/chromium/FileSystemChromium.cpp:
+ (WebCore::deleteFile):
+ (WebCore::deleteEmptyDirectory):
+ (WebCore::getFileModificationTime):
+ (WebCore::directoryName):
+ (WebCore::pathByAppendingComponent):
+ (WebCore::makeAllDirectories):
+ (WebCore::fileExists):
+ * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
+ (WebCore::SQLiteFileSystem::openDatabase):
+ * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
+ (WebCore::SQLiteFileSystem::registerSQLiteVFS):
+
+2009-08-03 Alpha Lam <hclam@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] Implement media slider for chromium
+ https://bugs.webkit.org/show_bug.cgi?id=27859
+
+ Implemented the media slider for chromium port. The implementation
+ is using Skia for drawing the thumb and buffered region instead of
+ using any native system controls so different platforms would have
+ the same look and feel.
+
+ No new tests because this is covered by existing tests.
+
+ * css/mediaControlsChromium.css:
+ * rendering/RenderThemeChromiumSkia.cpp:
+ * rendering/RenderThemeChromiumSkia.h:
+ * rendering/RenderThemeChromiumWin.cpp:
+
+2009-07-27 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26460
+ Plumbing and cleanup in advance of returning multiple frames from the
+ ICOImageDecoder:
+ * Make ImageDecoder::frameCount() return a size_t like
+ ImageSource::frameCount() and BitmapImage::frameCount() already do.
+ * Add ImageDecoder::frameSizeAtIndex() alongside size(), to report the
+ size of a particular frame. Hook all the
+ ImageSource::frameSizeAtIndex() implementations to this. No
+ ImageDecoder implements this yet; that will come in my next change.
+
+ * platform/graphics/cairo/ImageSourceCairo.cpp:
+ (WebCore::ImageSource::frameSizeAtIndex): Hook to ImageDecoder function.
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::frameCount): returns size_t.
+ * platform/graphics/qt/ImageDecoderQt.h: frameCount() returns size_t.
+ * platform/graphics/qt/ImageSourceQt.cpp:
+ (WebCore::ImageSource::frameSizeAtIndex): Hook to ImageDecoder function.
+ * platform/graphics/skia/ImageSourceSkia.cpp:
+ (WebCore::ImageSource::frameSizeAtIndex): Hook to ImageDecoder function.
+ * platform/graphics/win/ImageCGWin.cpp:
+ (WebCore::BitmapImage::drawFrameMatchingSourceSize): frameCount() returns size_t.
+ * platform/graphics/win/ImageCairoWin.cpp:
+ (WebCore::BitmapImage::drawFrameMatchingSourceSize): frameCount() returns size_t.
+ * platform/graphics/wx/ImageSourceWx.cpp:
+ (WebCore::ImageSource::frameSizeAtIndex): Hook to ImageDecoder function.
+ * platform/image-decoders/ImageDecoder.h:
+ (WebCore::ImageDecoder::size): Clarify comment.
+ (WebCore::ImageDecoder::frameSizeAtIndex): Add.
+ (WebCore::ImageDecoder::frameCount): returns size_t.
+ (WebCore::ImageDecoder::frameBufferAtIndex): Remove unneeded param name.
+ * platform/image-decoders/gif/GIFImageDecoder.cpp:
+ (WebCore::GIFImageDecoder::frameCount): returns size_t.
+ (WebCore::GIFImageDecoder::frameBufferAtIndex): frameCount() returns size_t.
+ * platform/image-decoders/gif/GIFImageDecoder.h: frameCount() returns size_t.
+
+2009-08-03 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix a bug that could cause an ASSERT to fail incorrectly, leading
+ to a renderer crash in Chromium.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27947
+
+ All tests in storage/ pass.
+
+ * platform/sql/SQLiteTransaction.cpp:
+ (WebCore::SQLiteTransaction::~SQLiteTransaction):
+ (WebCore::SQLiteTransaction::begin):
+
+2009-08-03 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Based on work by Yael Aharon.
+
+ Implement keyboard event forwarding for windowless plugins
+ for the Qt port.
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::dispatchNPEvent):
+ (WebCore::setSharedXEventFields):
+ (WebCore::setXKeyEventSpecificFields):
+ (WebCore::PluginView::handleKeyboardEvent):
+ (WebCore::PluginView::handleMouseEvent):
+
+2009-08-03 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: Make Bottom "Drawer" More Extensible To Support Other Views
+ https://bugs.webkit.org/show_bug.cgi?id=27928
+
+ * English.lproj/localizedStrings.js:
+
+ "Show changes view", "Hide changes view", "Clear changes log", "%d style change", "%d style changes"
+
+ * inspector/front-end/ChangesView.js: Added.
+ (WebInspector.ChangesView):
+ (WebInspector.ChangesView.prototype._clearButtonClicked):
+ (WebInspector.ChangesView.prototype._toggleChangesButtonClicked):
+ (WebInspector.ChangesView.prototype.attach):
+ (WebInspector.ChangesView.prototype.show):
+ (WebInspector.ChangesView.prototype.hide):
+
+ To be a new view to show Changes made via the inspector. DOM, CSS, or otherwise.
+
+ * inspector/front-end/Console.js: Removed.
+
+ Sliding View aspect moved to Drawer.js. The "console" itself has moved to ConsoleView.js
+
+ * inspector/front-end/ConsoleView.js: Added.
+
+ Little has changed from its move from Console.js other then support for working with the Drawer.
+
+ * inspector/front-end/Drawer.js: Added.
+ (WebInspector.Drawer):
+ (WebInspector.Drawer.prototype.get visibleView):
+ (WebInspector.Drawer.prototype.set visibleView):
+ (WebInspector.Drawer.prototype.show.animationFinished):
+ (WebInspector.Drawer.prototype.show):
+ (WebInspector.Drawer.prototype.hide.animationFinished):
+ (WebInspector.Drawer.prototype.hide):
+ (WebInspector.Drawer.prototype._safelyRemoveChildren):
+ (WebInspector.Drawer.prototype._startStatusBarDragging):
+ (WebInspector.Drawer.prototype._statusBarDragging):
+ (WebInspector.Drawer.prototype._endStatusBarDragging):
+
+ Allow for multiple views inside the Sliding Drawer.
+
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel):
+ (WebInspector.ElementsPanel.prototype.renameSelector):
+ (WebInspector.ElementsPanel.prototype.addStyleChange):
+ (WebInspector.ElementsPanel.prototype.removeStyleChange):
+ (WebInspector.ElementsPanel.prototype.generateStylesheet):
+
+ Starting work on the "Changes" Panel. The ability to generate a Stylesheet from Styles added via the Inspector.
+
+ * inspector/front-end/Images/styleIcon.png: Added.
+
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertiesSection.prototype.isInspectorStylesheet):
+ (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
+ (WebInspector.BlankStylePropertiesSection.prototype.makeNormal):
+ (WebInspector.StylePropertyTreeElement.prototype):
+
+ Interface with ElementsPanel for generating a Stylesheet of Changes.
+
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.css: Refactored to allow for multiple views in the drawer.
+ * inspector/front-end/inspector.html: Refactored to allow for multiple views in the drawer.
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.get styleChanges):
+ (WebInspector.set styleChanges):
+ (WebInspector._updateChangesCount):
+ (WebInspector.loaded):
+ (WebInspector.documentKeyDown):
+ (WebInspector.showConsole):
+ (WebInspector.showChanges):
+
+ Support for the drawer and "styles changed icon" similar to the "errors and warnings" icons.
+
+2009-08-03 Dean McNamee <deanm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Correct an assert on a PassRefPtr in the v8 svg bindings.
+ https://bugs.webkit.org/show_bug.cgi?id=27951
+
+ * bindings/v8/V8SVGPODTypeWrapper.h:
+ (WebCore::V8SVGDynamicPODTypeWrapper::V8SVGDynamicPODTypeWrapper):
+
+2009-08-03 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Sam Weinig.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=27748
+ crash w/ stack overflow when same CSS file loaded repeatedly
+
+ Fix crash caused by a stack overflow when repeatedly loading very large
+ CSS files. CSSRuleData in CSSStyleSelector.h destroyed itself
+ recursively rather than iteratively.
+
+ Test: fast/css/large-list-of-rules-crash.html
+
+ * css/CSSStyleSelector.h:
+ (WebCore::CSSRuleData::~CSSRuleData):
+ (WebCore::CSSRuleDataList::~CSSRuleDataList):
+
+2009-08-03 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Make the DRT APIs to pause transitions and animations work for accelerated animations
+ <https://bugs.webkit.org/show_bug.cgi?id=27627>
+ <rdar://problem/6442932>
+
+ Fix the 'pauseAnimationAtTimeOnElementWithId' and 'pauseTransitionAtTimeOnElementWithId' APIs
+ available to LayoutTests to work with accelerated animations and transitions. Done by sending
+ the pause time down to the GraphicsLayer, and using it to stop time on the layer.
+
+ I also added an assertion to check that the animation has actually started when we
+ try to pause it, to check that the pause time we compute is valid. This revealed a number
+ of tests that tried to pause before animations started, required some amount of test fixing.
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::AnimationBase::freezeAtTime):
+ * page/animation/AnimationBase.h:
+ * page/animation/CompositeAnimation.cpp:
+ (WebCore::CompositeAnimation::pauseAnimationAtTime):
+ (WebCore::CompositeAnimation::pauseTransitionAtTime):
+ * platform/graphics/GraphicsLayer.cpp:
+ (WebCore::GraphicsLayer::suspendAnimations):
+ * platform/graphics/GraphicsLayer.h:
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::suspendAnimations):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::suspendAnimations):
+ * rendering/RenderLayerBacking.h:
+
+2009-08-03 Tony Chang <tony@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix Chromium build by removing PluginView.h from Page.cpp.
+ Chromium doesn't use PluginView and the pointer is never
+ dereferenced so the header doesn't need to be included.
+ https://bugs.webkit.org/show_bug.cgi?id=27946
+
+ No new tests because this is a build fix.
+
+ * page/Page.cpp:
+
+2009-08-03 Eric Carlson <eric.carlson@apple.com>
+
+ One more build fix after https://bugs.webkit.org/show_bug.cgi?id=46720.
+
+ Unreviewed.
+
+ * WebCoreSources.bkl:
+
+2009-08-03 Eric Carlson <eric.carlson@apple.com>
+
+ Build fix after https://bugs.webkit.org/show_bug.cgi?id=46720.
+
+ Unreviewed.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+
+2009-08-03 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 27943: Need to implement ARIA role="radiogroup"
+ https://bugs.webkit.org/show_bug.cgi?id=27943
+
+ Test: platform/mac/accessibility/aria-radiogroup.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::isRadioGroup):
+ (WebCore::AccessibilityObject::selectedRadioButton):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::selectedRadioButton):
+ (WebCore::RoleEntry::):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper roleDescription]):
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+
+2009-08-03 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ HTMLInputElement is not controllable by assistive technologies
+ https://bugs.webkit.org/show_bug.cgi?id=27941
+
+ Test: accessibility/input-slider.html
+
+ * WebCore.xcodeproj/project.pbxproj:
+ Add AccessibilitySlider.cpp/.h
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::getOrCreate):
+ Create AccessibilitySlider and AccessibilitySliderThumb.
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::increment):
+ (WebCore::AccessibilityObject::decrement):
+ Add default, do nothing, base class methods.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::canSetFocusAttribute):
+ Correct typo.
+
+ * accessibility/AccessibilitySlider.cpp: Added.
+ (WebCore::AccessibilitySlider::AccessibilitySlider):
+ (WebCore::AccessibilitySlider::create):
+ (WebCore::AccessibilitySlider::children):
+ (WebCore::AccessibilitySlider::addChildren):
+ (WebCore::AccessibilitySlider::getAttribute):
+ (WebCore::AccessibilitySlider::valueForRange):
+ (WebCore::AccessibilitySlider::maxValueForRange):
+ (WebCore::AccessibilitySlider::minValueForRange):
+ (WebCore::AccessibilitySlider::changeValue):
+ (WebCore::AccessibilitySlider::setValue):
+ (WebCore::AccessibilitySlider::increment):
+ (WebCore::AccessibilitySlider::decrement):
+ (WebCore::AccessibilitySlider::element):
+ (WebCore::AccessibilitySliderThumb::AccessibilitySliderThumb):
+ (WebCore::AccessibilitySliderThumb::create):
+ (WebCore::AccessibilitySliderThumb::elementRect):
+ (WebCore::AccessibilitySliderThumb::size):
+ * accessibility/AccessibilitySlider.h: Added.
+ (WebCore::AccessibilitySlider::~AccessibilitySlider):
+ (WebCore::AccessibilitySlider::roleValue):
+ (WebCore::AccessibilitySlider::accessibilityIsIgnored):
+ (WebCore::AccessibilitySlider::isSlider):
+ (WebCore::AccessibilitySlider::canSetValueAttribute):
+ (WebCore::AccessibilitySliderThumb::~AccessibilitySliderThumb):
+ (WebCore::AccessibilitySliderThumb::roleValue):
+ (WebCore::AccessibilitySliderThumb::accessibilityIsIgnored):
+ (WebCore::AccessibilitySliderThumb::setParentObject):
+ (WebCore::AccessibilitySliderThumb::parentObject):
+
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (RoleEntry::):
+ SliderThumbRole -> NSAccessibilityValueIndicatorRole
+ (-[AccessibilityObjectWrapper roleDescription]):
+ Return role description for NSAccessibilitySliderRole and NSAccessibilityValueIndicatorRole.
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+ Minor coding style correction.
+ (-[AccessibilityObjectWrapper accessibilityPerformPressAction]):
+ If attachement view handles press action, don't also call object wrapper.
+ (-[AccessibilityObjectWrapper accessibilityPerformIncrementAction]):
+ New, call object's increment() method.
+ (-[AccessibilityObjectWrapper accessibilityPerformDecrementAction]):
+ New, call object's decrement() method.
+ (-[AccessibilityObjectWrapper accessibilityPerformAction:]):
+ Respond to NSAccessibilityIncrementAction and NSAccessibilityDecrementAction.
+
+ * rendering/RenderSlider.cpp:
+ (WebCore::RenderSlider::thumbRect):
+ Factor logic out of layout so AccessibilitySliderThumb can get thumb location/size.
+ (WebCore::RenderSlider::layout):
+ Move code to thumbRect().
+ * rendering/RenderSlider.h:
+
+2009-08-03 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ Build fix if Netscape plugin support is turned off
+ https://bugs.webkit.org/show_bug.cgi?id=27940
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::stop): Do not call NPN_MemFree if NPAPI is
+ disabled
+ * plugins/PluginViewNone.cpp:
+ (WebCore::PluginView::platformStart): Empty stub.
+
+2009-07-31 Joe Mason <joe.mason@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ WINCE port: LOAD_WITH_ALTERED_SEARCH_PATH param of LoadLibraryEx not supported on WINCE
+ https://bugs.webkit.org/show_bug.cgi?id=27917
+
+ * plugins/win/PluginPackageWin.cpp:
+ (WebCore::PluginPackage::load): use LoadLibrary instead of LoadLibraryEx
+
+2009-08-02 Adam Barth <abarth@webkit.org>
+ Reviewed by Darin Adler.
+
+ SVGElementInstance::scriptExecutionContext should call document() instead of scriptExecutionContext()
+
+ https://bugs.webkit.org/show_bug.cgi?id=27932
+
+ There's no reason to pay for a virtual function call in this case. We
+ can just call document() directly because we know that element is a
+ Node*.
+
+ * svg/SVGElementInstance.cpp:
+ (WebCore::SVGElementInstance::scriptExecutionContext):
+
+2009-08-02 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ JSNodeCustom should call document() instead of scriptExecutionContext()
+ https://bugs.webkit.org/show_bug.cgi?id=27931
+
+ We want to call document() because it's in inline function, instead of
+ scriptExecutionContext() because it's a virtual function. If we have a
+ Node*, then we know that the virtual function will always return the
+ document anyway.
+
+ There are more instance of this bug, but I'd like to start with a small
+ patch and work up.
+
+ * bindings/js/JSDOMGlobalObject.cpp:
+ (WebCore::toJSDOMGlobalObject):
+ * bindings/js/JSDOMGlobalObject.h:
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::addEventListener):
+ (WebCore::JSNode::removeEventListener):
+
+2009-08-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Anders Carlsson.
+
+ Share implementation of PluginView::userAgent() and userAgentStatic()
+
+ https://bugs.webkit.org/show_bug.cgi?id=27706
+
+ Differences to the original implementation are as follows:
+
+ - The Win port used to return 0 for userAgentStatic, but now
+ returns the quirk mode MozillaUserAgent as the other ports.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::userAgent):
+ (WebCore::PluginView::userAgentStatic):
+ * plugins/PluginViewNone.cpp:
+ * plugins/gtk/PluginViewGtk.cpp:
+ * plugins/mac/PluginViewMac.cpp:
+ * plugins/qt/PluginViewQt.cpp:
+ * plugins/win/PluginViewWin.cpp:
+
+2009-07-27 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Anders Carlsson.
+
+ Unregister plugin from PluginMainThreadScheduler if NPP_New fails
+
+ https://bugs.webkit.org/show_bug.cgi?id=27706
+
+ Since the plugin has not been started yet (m_isStarted is not set),
+ calling stop() will not have any affect, so we manually unregister
+ in start() before returning.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::start):
+
+2009-07-27 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Anders Carlsson.
+
+ Join the various versions of PluginView::stop() into one shared implementation
+
+ https://bugs.webkit.org/show_bug.cgi?id=27706
+
+ The platform-dependent bits are now ifdef'ed in the shared implementation,
+ using the XP_ defines (XP_WIN, XP_MACOSX, XP_UNIX) from npapi.h
+
+ Differences to the original implementation are as follows:
+
+ - The Qt port unregistered the plugin before calling NP_SetWindow
+ with a 0 window handle. Now it's done after (similar to Win)
+
+ - The GTK and Qt ports unregistered the plugin before clearing
+ the m_npWindow.ws_info struct. Now it's done after.
+
+ - The Win port constructed the DropAllLocks after unsubclassing
+ the window. Now it's done before.
+
+ - The Mac, Qt, and GTK ports did not pass a NPSavedData struct
+ to NP_Destroy (like the Win port). Now all ports do.
+
+ - The Win port did not call PluginView::setCurrentPluginView()
+ before calling to NP-functions. Now it does.
+
+ * plugins/PluginView.cpp:
+ * plugins/PluginViewNone.cpp:
+ * plugins/gtk/PluginViewGtk.cpp:
+ * plugins/mac/PluginViewMac.cpp:
+ * plugins/qt/PluginViewQt.cpp:
+ * plugins/win/PluginViewWin.cpp:
+
+2009-07-30 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: let me *edit* css styles in the web inspector.
+ https://bugs.webkit.org/show_bug.cgi?id=27124
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel): added property stylesheet pointing to 1 stylesheet added to the page if needed
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylesSidebarPane.prototype.update): handle blank sections
+ (WebInspector.StylesSidebarPane.prototype.addBlankSection): blank section in the correct position
+ (WebInspector.StylesSidebarPane.prototype.appropriateSelectorForNode): helper to get a nice selector for the selectd node
+ (WebInspector.StylePropertiesSection):
+ (WebInspector.StylePropertiesSection.prototype.expand):
+ (WebInspector.StylePropertiesSection.prototype.isPropertyInherited):
+ (WebInspector.StylePropertiesSection.prototype.isPropertyOverloaded):
+ (WebInspector.StylePropertiesSection.prototype.addNewBlankProperty):
+ (WebInspector.StylePropertiesSection.prototype._dblclickEmptySpace): easily create new properties
+ (WebInspector.StylePropertiesSection.prototype._dblclickSelector):
+ (WebInspector.StylePropertiesSection.prototype.startEditingSelector): allow for editing selectors
+ (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
+ (WebInspector.StylePropertiesSection.prototype.editingSelectorCancelled):
+ (WebInspector.StylePropertiesSection.prototype._doesSelectorAffectSelectedNode): helper to check if a selector applies to the selected node
+ (WebInspector.BlankStylePropertiesSection.prototype._dblclick):
+ (WebInspector.BlankStylePropertiesSection.prototype.startEditing):
+ (WebInspector.BlankStylePropertiesSection.prototype.editingCancelled):
+ (WebInspector.BlankStylePropertiesSection.prototype.editingCommitted):
+ (WebInspector.BlankStylePropertiesSection.prototype.makeNormal): morph into a StylePropertiesSection
+ (WebInspector.StylePropertyTreeElement.prototype):
+ (WebInspector.StylePropertyTreeElement.prototype.):
+ * inspector/front-end/inspector.css:
+
+2009-07-31 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [v8] check if proxy is present before invoking a handler
+ https://bugs.webkit.org/show_bug.cgi?id=27883
+
+ Do not invoke handler function if proxy is null pointer (that would lead to access violation
+ anyway)
+
+ * bindings/v8/custom/V8CustomEventListener.cpp:
+ (WebCore::V8EventListener::callListenerFunction):
+
+2009-08-01 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Reimplement Elements Panel so that its
+ interaction with DOM is serialized.
+
+ This is a first cut wuth read support for DOM elements
+ tree as well as some limited editing. No properties, no
+ styles, no search capabilities are implemented yet.
+ Set Preferences.useDOMAgent to true in order to try it
+ out, otherwise disabled by default.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27771
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::getChildNodes):
+ (WebCore::InspectorBackend::setAttribute):
+ (WebCore::InspectorBackend::removeAttribute):
+ (WebCore::InspectorBackend::setTextNodeValue):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::windowScriptObjectAvailable):
+ (WebCore::InspectorController::setFrontendProxyObject):
+ (WebCore::InspectorController::close):
+ (WebCore::InspectorController::populateScriptObjects):
+ (WebCore::InspectorController::didCommitLoad):
+ * inspector/InspectorController.h:
+ (WebCore::InspectorController::domAgent):
+ * inspector/InspectorDOMAgent.cpp: Added.
+ * inspector/InspectorDOMAgent.h: Added.
+ * inspector/InspectorFrontend.cpp:
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/Callback.js: Added.
+ * inspector/front-end/DOMAgent.js: Added.
+ * inspector/front-end/ElementsPanel.js:
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+
+2009-08-01 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Adele Peterson.
+
+ isContentEditable function in htmlediting.* must be removed
+ https://bugs.webkit.org/show_bug.cgi?id=27870
+
+ This patch removes isContentEditable function in htmlediting.cpp and
+ replaces all usage by calling Node::isContentEditable or its derivatives.
+
+ * editing/AppendNodeCommand.cpp: ditto
+ (WebCore::AppendNodeCommand::AppendNodeCommand): ditto
+ * editing/IndentOutdentCommand.cpp: ditto
+ (WebCore::IndentOutdentCommand::outdentParagraph): ditto
+ * editing/InsertNodeBeforeCommand.cpp: ditto
+ (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand): ditto
+ * editing/htmlediting.cpp: ditto
+ (WebCore::enclosingNodeWithTag): ditto
+ (WebCore::enclosingNodeOfType): ditto
+ (WebCore::canMergeLists): ditto
+ * editing/htmlediting.h: Updated prototype
+
+2009-08-01 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fix a message port handle always getting marked as reachable once it gets entangled.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27824
+
+ No tests since this only arises with the Chromium multi-process message port implementation
+ which isn't in this repostiory.
+
+ * bindings/v8/V8GCController.cpp:
+ (WebCore::GCEpilogueVisitor::visitDOMWrapper):
+
+2009-07-31 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Adam Barth.
+
+ Fix Geolocation permission problem
+ https://bugs.webkit.org/show_bug.cgi?id=26993
+
+ * page/Geolocation.cpp:
+ (WebCore::Geolocation::requestPermission):
+
+2009-07-31 Norbert Leser <norbert.leser@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ Added project properties as needed by symbian platform
+
+ * WebCore.pro:
+
+2009-07-31 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Holger Freyther.
+
+ Fix compiler warning.
+
+ Initialize member variables in the correct order.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::PluginView):
+
+2009-07-31 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Windows build fix!
+
+ Unreviewed.
+
+ * page/win/PageWin.cpp:
+
+2009-07-31 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Mac build fix.
+
+ Unreviewed.
+
+ * page/Page.cpp:
+ Move setCanStartPlugins() from here...
+ * page/win/PageWin.cpp:
+ (WebCore::Page::setCanStartPlugins):
+ ... to here.
+
+2009-07-29 Jon Honeycutt <jhoneycutt@apple.com>
+
+ <rdar://problem/5698113> Safari shouldn't auto-activate plug-ins in
+ background tabs (make Win consistent with Mac)
+
+ https://bugs.webkit.org/show_bug.cgi?id=27855
+
+ Reviewed by Anders Carlsson.
+
+ * loader/FrameLoaderClient.h:
+ (WebCore::FrameLoaderClient::dispatchDidFailToStartPlugin):
+ Declare a new function to dispatch failures to start plug-ins.
+
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ Initialize new member variable.
+ (WebCore::Page::addUnstartedPlugin):
+ Add the PluginView to the set of unstarted plug-ins.
+ (WebCore::Page::removeUnstartedPlugin):
+ Remove the PluginView from the set of unstarted plug-ins.
+ (WebCore::Page::setCanStartPlugins):
+ If we can now start plug-ins, iterate the set of unstarted plug-ins,
+ starting them. If a plug-in fails to start, dispatch a failed-to-start-
+ plug-in error. Clear the list of unstarted plug-ins.
+
+ * page/Page.h:
+ Added m_canStartPlugins to track whether we can currently start
+ plug-ins. Added m_unstartedPlugins to keep track of plug-ins in the
+ page that are waiting to be started.
+ (WebCore::Page::canStartPlugins):
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::start):
+ m_mimeType is now a WebCore::String, so we call .utf8(). If NPP_New()
+ fails, set m_status to reflect this; this used to be set by init(), but
+ start() will not be called by init() if we are delaying start().
+ If NPP_New() succeeds, set m_status to reflect this, and call
+ platformStart().
+ (WebCore::PluginView::startOrAddToUnstartedList):
+ If we cannot start plug-ins, add this view to the Page's list of
+ unstarted plug-ins and return true. Otherwise, call start() and return
+ the result.
+ (WebCore::PluginView::removeFromUnstartedListIfNecessary):
+ If we've been started or we don't have a Page, return early. Remove
+ ourselves from the Page's list of unstarted plug-ins.
+ (WebCore::PluginView::bindingInstance):
+ If we haven't been started yet, return 0. This matches the Mac
+ behavior.
+ (WebCore::PluginView::setParameters):
+ If we find the "plug-ins page" parameter, record it; it may be used if
+ we fail to start the plug-in.
+ (WebCore::PluginView::PluginView):
+ Initialize new members m_haveUpdatedPluginWidget. Initialize m_mimeType
+ with mimeType directly; m_mimeType is now a WebCore::String.
+
+ * plugins/PluginView.h:
+ Made start() public, so Page can call it when we start unstarted
+ plug-ins. Changed m_mimeType from CString to String and added
+ m_pluginsPage; these are needed by dispatchDidFailToStartPlugin().
+ (WebCore::PluginView::pluginsPage):
+ Added for dispatchDidFailToStartPlugin().
+ (WebCore::PluginView::mimeType):
+ Ditto.
+ (WebCore::PluginView::url):
+ Ditto.
+
+ * plugins/gtk/PluginViewGtk.cpp:
+ (WebCore::PluginView::platformStart):
+ Stubbed.
+
+ * plugins/mac/PluginViewMac.cpp:
+ (WebCore::PluginView::platformStart):
+ Stubbed.
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::platformStart):
+ Stubbed.
+
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::updatePluginWidget):
+ Use m_haveUpdatedPluginWidget to ensure that we will call MoveWindow()
+ and SetWindowRgn() to position the plug-in and set its clip rect if an
+ earlier call to updatePluginWidget() was made before
+ setPlatformPluginWidget() was called to set the plug-in's HWND.
+ (WebCore::PluginView::~PluginView):
+ Call removeFromUnstartedListIfNecessary() to remove the plug-in from
+ the unstarted list if the plug-in is destroyed before it is started.
+ (WebCore::PluginView::init):
+ Call startOrAddtoUnstartedList to start the plug-in or, if plug-ins
+ cannot be started, to add it to the list of plug-ins waiting to be
+ started. Set m_status to indicate success; this is also set by start(),
+ but that may be delayed, and we don't want the loader to dispatch a
+ failed-to-start-plug-in error when we return from init().
+ (WebCore::PluginView::platformStart):
+ Added; code moved from init(). This is now called by start() to perform
+ any platform-specific tasks that need to take place after the plug-in
+ has started. Added a call to updatePluginWidget() to ensure we position
+ the plug-in and set its clip rect after the plug-in has started.
+ Removed the setting of m_status; start() does this before calling this
+ function (and we assert this at the head of the function).
+
+2009-07-30 Darin Adler <darin@apple.com>
+
+ Reviewed by David Levin.
+
+ Use checked casts for render tree
+ https://bugs.webkit.org/show_bug.cgi?id=23522
+
+ Next step: Add casts for all the RenderTable classes and use them everywhere.
+
+ Also added a few uses in places that were still using static_cast.
+ Also made some virtual member functions private.
+ Also changed RenderTable::m_tableLayout to use OwnPtr.
+
+ * accessibility/AccessibilityTable.cpp:
+ (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
+ (WebCore::AccessibilityTable::addChildren):
+ (WebCore::AccessibilityTable::cellForColumnAndRow):
+ * accessibility/AccessibilityTableCell.cpp:
+ (WebCore::AccessibilityTableCell::parentTable):
+ (WebCore::AccessibilityTableCell::rowIndexRange):
+ (WebCore::AccessibilityTableCell::columnIndexRange):
+ (WebCore::AccessibilityTableCell::titleUIElement):
+ * accessibility/AccessibilityTableColumn.cpp:
+ (WebCore::AccessibilityTableColumn::headerObject):
+ * accessibility/AccessibilityTableRow.cpp:
+ (WebCore::AccessibilityTableRow::parentTable):
+ * editing/DeleteSelectionCommand.cpp:
+ (WebCore::DeleteSelectionCommand::removeNode):
+ * editing/TextIterator.cpp:
+ (WebCore::shouldEmitTabBeforeNode):
+ (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
+ * html/HTMLTableCellElement.cpp:
+ (WebCore::HTMLTableCellElement::parseMappedAttribute):
+ * html/HTMLTableColElement.cpp:
+ (WebCore::HTMLTableColElement::parseMappedAttribute):
+ * page/Frame.cpp:
+ (WebCore::Frame::searchForLabelsAboveCell):
+ * page/mac/FrameMac.mm:
+ (WebCore::Frame::searchForNSLabelsAboveCell):
+ * rendering/AutoTableLayout.cpp:
+ (WebCore::AutoTableLayout::recalcColumn):
+ (WebCore::AutoTableLayout::fullRecalc):
+ (WebCore::shouldScaleColumns):
+ * rendering/FixedTableLayout.cpp:
+ (WebCore::FixedTableLayout::calcWidthArray):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::calcPrefWidths):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::calcPercentageHeight):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::addChild):
+ (WebCore::RenderObject::containingBlock):
+ * rendering/RenderTableCell.cpp:
+ (WebCore::RenderTableCell::collapsedBottomBorder):
+ * rendering/RenderTableCol.cpp:
+ (WebCore::RenderTableCol::table):
+ * rendering/RenderTableRow.cpp:
+ (WebCore::RenderTableRow::addChild):
+ (WebCore::RenderTableRow::layout):
+ (WebCore::RenderTableRow::paint):
+ * rendering/RenderTableSection.cpp:
+ (WebCore::RenderTableSection::addChild):
+ (WebCore::RenderTableSection::layoutRows):
+ (WebCore::RenderTableSection::lowestPosition):
+ (WebCore::RenderTableSection::rightmostPosition):
+ (WebCore::RenderTableSection::leftmostPosition):
+ (WebCore::RenderTableSection::paintObject):
+ (WebCore::RenderTableSection::recalcCells):
+ * rendering/RenderTreeAsText.cpp:
+ (WebCore::operator<<):
+ (WebCore::writeTextRun):
+ Use checked casts.
+
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::styleDidChange): Updated to use OwnPtr.
+ (WebCore::RenderTable::addChild): Use checked cast.
+ (WebCore::RenderTable::layout): Ditto.
+ (WebCore::RenderTable::setCellWidths): Ditto.
+ (WebCore::RenderTable::paintObject): Ditto.
+ (WebCore::RenderTable::splitColumn): Ditto.
+ (WebCore::RenderTable::appendColumn): Ditto.
+ (WebCore::RenderTable::colElement): Ditto.
+ (WebCore::RenderTable::recalcSections): Ditto.
+ (WebCore::RenderTable::outerBorderBottom): Ditto.
+ (WebCore::RenderTable::outerBorderLeft): Ditto.
+ (WebCore::RenderTable::outerBorderRight): Ditto.
+ (WebCore::RenderTable::sectionAbove): Ditto.
+ (WebCore::RenderTable::sectionBelow): Ditto.
+
+ * rendering/RenderTable.h: Added checked cast. Made virtual
+ functions private. Changed m_tableLayout to be a OwnPtr.
+
+ * rendering/RenderTableCell.h: Added checked cast.
+ * rendering/RenderTableCol.h: Ditto. Made virtual functions private.
+ * rendering/RenderTableRow.h: Ditto.
+ * rendering/RenderTableSection.h: Ditto.
+
+2009-07-31 Brady Eidson <beidson@apple.com>
+
+ Reviewed by John Sullivan.
+
+ <rdar://problem/6973106> and https://bugs.webkit.org/show_bug.cgi?id=27896
+ Favicons are still loaded when automatic image loading is disabled.
+
+ People who want to avoid loading images generally want to avoid loading all images.
+
+ Test: http/tests/misc/favicon-loads-with-images-disabled.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::startIconLoader): After committing the URL mapping, don't actually
+ perform the load if images shouldn't be loading.
+
+2009-07-31 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Accelerated animations stutter on pages with lots of animations and 3d transforms
+ https://bugs.webkit.org/show_bug.cgi?id=27884
+
+ This patch changes the strategy for synchronizing painting view the view,
+ and compositing layer updates. Previously the strategy was to disable screen
+ updates between the time we updated the layer tree, and painted the view. That
+ left screen updates disabled for too long (hundreds of milliseconds) in some
+ cases, causing animation stutter.
+
+ The new strategy is to batch up changes to the CA layer tree, and commit them
+ all at once just before painting happens (referred to as a "sync" in the code).
+ GraphicsLayerCA now keeps a bitmask of changed properties, and then migrates
+ the values stored in GraphicsLayer into the CA layer tree at commit time.
+
+ Compositing layers are then synced in FrameView::paintContents(). However, not
+ all style/layout changes will result in painting; to deal with style changes that
+ touch only compositing properties, we set up a runloop observer that takes care
+ of comitting layer changes when no painting happens.
+
+ * WebCore.base.exp: Export FrameView::syncCompositingStateRecursive()
+
+ * loader/EmptyClients.h: scheduleViewUpdate() renamed to syncCompositingStateRecursive()
+ * page/ChromeClient.h: scheduleViewUpdate() renamed to syncCompositingStateRecursive()
+
+ * page/FrameView.h:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::syncCompositingStateRecursive): syncCompositingState() on the
+ view and all subviews. Like layoutIfNeededRecursive(). If layout is pending, does not
+ sync and returns false, since we only want to sync when layout is done.
+
+ (WebCore::FrameView::paintContents): syncCompositingState() before painting.
+
+ * page/animation/KeyframeAnimation.cpp:
+ (WebCore::KeyframeAnimation::endAnimation):
+ Call animationPaused() to notify the graphics layers about animation pausing.
+
+ * platform/graphics/FloatPoint3D.h:
+ (WebCore::operator==):
+ (WebCore::operator!=):
+ Add missing comparison operators.
+
+ * platform/graphics/GraphicsLayer.cpp:
+ (WebCore::GraphicsLayer::setOpacity):
+ (WebCore::GraphicsLayer::setBackgroundColor): Simple setters no longer care about animation info.
+
+ (WebCore::GraphicsLayer::paintGraphicsLayerContents): Null-check client.
+
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::AnimationValue:):
+ (WebCore::TransformAnimationValue:):
+ (WebCore::KeyframeValueList:):
+ (WebCore::KeyframeValueList::insert):
+ Cleaned up versions of FloatValue and TransformValue, used to store information
+ about keyframes values.
+
+ (WebCore::GraphicsLayer::contentsRect):
+ (WebCore::GraphicsLayer::setContentsRect):
+ ContentsRect is now a simple setter.
+
+ (WebCore::GraphicsLayer::addAnimation):
+ (WebCore::GraphicsLayer::removeAnimationsForProperty):
+ (WebCore::GraphicsLayer::removeAnimationsForKeyframes):
+ (WebCore::GraphicsLayer::pauseAnimation):
+ Simplified animation api.
+
+ (WebCore::GraphicsLayer::setGeometryOrientation):
+ (WebCore::GraphicsLayer::geometryOrientation):
+ setGeometryOrientation is now just a normal member variable.
+
+ (WebCore::GraphicsLayer::contentsOrientation): add a getter.
+ (WebCore::GraphicsLayer::syncCompositingState): Entry into the layer sync code.
+
+ * platform/graphics/GraphicsLayerClient.h: scheduleViewUpdate() renamed to syncCompositingStateRecursive)
+
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ Lots of cleanup and refactoring. Main points:
+ - Layer changes are all batched, and only committed to the CA layer on syncCompositingState().
+ - Bitmask is used to store which properties have changed. More efficient than before.
+ - Simpler animation interface; simple setters are no longer confounded with animations.
+ - Refactored code that creates CA animations, and stores which animations are running.
+
+ * platform/graphics/transforms/TransformOperations.h:
+ (WebCore::TransformOperations::size):
+ (WebCore::TransformOperations::at): Useful accessors for size and indexed access.
+
+ * rendering/RenderLayerBacking.h:
+ * rendering/RenderLayerBacking.cpp:
+ Renamed 'contentsLayer' to 'foregroundLayer' to avoid confusion with GraphicsLayer's
+ contentsLayer.
+ Adapt to GraphicsLayer's simpler animation API.
+ Pass animation pausing through to the graphics layers.
+ contentsBox() is no longer a callback via GraphicsLayerClient.
+
+ * rendering/RenderLayerCompositor.h:
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::setCompositingLayersNeedRebuild):
+ (WebCore::RenderLayerCompositor::scheduleSync):
+ (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
+ scheduleViewUpdate() is no longer required. Instead, we plumb through "compositingLayerSync"
+ notifications, which travel up to WebKit and set up a runloop observer.
+
+2009-07-30 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by David Levin.
+
+ Guard needs //'s between #endif and ENABLE(DATAGRID)
+ https://bugs.webkit.org/show_bug.cgi?id=27862
+
+ Compiling this file causes a build break without this change.
+
+ * bindings/v8/custom/V8DataGridColumnListCustom.cpp:
+
+2009-07-31 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Geolocation clean up when no longer updating
+ https://bugs.webkit.org/show_bug.cgi?id=27888
+
+ When Geolocation::disconnectFrame() is called, need to call
+ Document::setUsingGeolocation(false) to mirror the true call
+ when it is set up.
+
+ When handling an error, and there are no more listeners, call
+ GeolocationService::stopUpdating().
+
+ * page/Geolocation.cpp:
+ (WebCore::Geolocation::disconnectFrame):
+ (WebCore::Geolocation::handleError):
+
+2009-07-31 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by George Staikos.
+
+ Consolidate GeoLocation code to send positions and errors
+ https://bugs.webkit.org/show_bug.cgi?id=27863
+
+ Create helper methods that will send positions and errors to either
+ one shots or watchers.
+
+ * page/Geolocation.cpp:
+ (WebCore::Geolocation::sendError):
+ (WebCore::Geolocation::sendErrorToOneShots):
+ (WebCore::Geolocation::sendErrorToWatchers):
+ (WebCore::Geolocation::sendPosition):
+ (WebCore::Geolocation::sendPositionToOneShots):
+ (WebCore::Geolocation::sendPositionToWatchers):
+ * page/Geolocation.h:
+
+2009-07-31 Xan Lopez <xlopez@igalia.com>
+
+ Roll out previous change as it might be causing some weirdness in
+ the bots.
+
+ * platform/image-decoders/bmp/BMPImageDecoder.cpp:
+ (WebCore::BMPImageDecoder::processFileHeader):
+
+2009-07-31 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Mark Rowe.
+
+ Fix compiler warning.
+ https://bugs.webkit.org/show_bug.cgi?id=27851
+
+ GCC does not like multi-character character constants, so use the
+ explicit numerical value of 'BM' in the enum.
+
+ * platform/image-decoders/bmp/BMPImageDecoder.cpp:
+ (WebCore::BMPImageDecoder::processFileHeader):
+
+2009-07-30 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Mark Rowe, but Dan Bernstein also reviewed and asked thoughtful questions.
+
+ <rdar://problem/7106968> and https://bugs.webkit.org/show_bug.cgi?id=27868
+ http://www.ruthhuntcandy.com/ goes into infinite refresh in WebKit, works in others.
+
+ Test: http/tests/misc/meta-refresh-stray-single-quote.html
+
+ * platform/network/HTTPParsers.cpp:
+ (WebCore::parseHTTPRefresh): Allow for a stray quote character at the start of the URL string.
+
+2009-07-30 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Adele Peterson and Jon Honeycutt.
+
+ Fix <https://bugs.webkit.org/show_bug.cgi?id=27828> for Mac.
+ Bug 27828: Title attribute is not respected on option elements
+
+ No tests added as it is not clear how to test a tool tip from DumpRenderTree.
+
+ * platform/PopupMenuClient.h: Add a method for retrieving the tool tip of an item.
+ * platform/mac/PopupMenuMac.mm:
+ (WebCore::PopupMenu::populate): Set the tool tip of the menu item to that of the represented item.
+ * rendering/RenderMenuList.cpp:
+ (WebCore::RenderMenuList::itemToolTip): Expose the title attribute of the element as the tool tip.
+ * rendering/RenderMenuList.h:
+ * rendering/RenderTextControlSingleLine.h:
+ (WebCore::RenderTextControlSingleLine::itemToolTip): Return an empty string, indicating no tool tip, for
+ the popup menu in RenderTextControlSingleLine.
+
+2009-07-30 Xiaomei Ji <xji@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ Remove ChromeClientChromium::setToolTip().
+ https://bugs.webkit.org/show_bug.cgi?id=27861
+
+ This patch is just to remove a temporarily introduced overloaded empty
+ virtual function. No test is needed.
+
+ * page/chromium/ChromeClientChromium.h:
+
+2009-07-30 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27821
+
+ ApplicationCacheHost refactoring.
+
+ 1) Better encapsulate the interfaces between webcore common code
+ and the appcache system within a new class ApplicationCacheHost.
+
+ 2) Use that interface throughout the loader system, replacing inline appcache logic.
+
+ 3) Implement the interface in terms of webcore's appcache system.
+
+ 4) Add the new files to various makefiles.
+
+ 5) Implement protocolHostAndPortAreEqual() in KURLGoogle.cpp
+
+ No new features, no new tests. The existing layout tests all pass.
+
+ * GNUmakefile.am:
+ * WebCore.base.exp:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * html/HTMLHtmlElement.cpp:
+ (WebCore::HTMLHtmlElement::insertedIntoDocument):
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::DocumentLoader):
+ (WebCore::DocumentLoader::~DocumentLoader):
+ (WebCore::DocumentLoader::mainReceivedError):
+ (WebCore::DocumentLoader::detachFromFrame):
+ (WebCore::DocumentLoader::setPrimaryLoadComplete):
+ * loader/DocumentLoader.h:
+ (WebCore::DocumentLoader::applicationCacheHost):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::canCachePageContainingThisFrame):
+ (WebCore::FrameLoader::logCanCacheFrameDecision):
+ (WebCore::FrameLoader::loadResourceSynchronously):
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::didReceiveResponse):
+ (WebCore::MainResourceLoader::didReceiveData):
+ (WebCore::MainResourceLoader::didFinishLoading):
+ (WebCore::MainResourceLoader::didFail):
+ (WebCore::MainResourceLoader::load):
+ * loader/MainResourceLoader.h:
+ * loader/ResourceLoader.cpp:
+ (WebCore::ResourceLoader::load):
+ (WebCore::ResourceLoader::willSendRequest):
+ (WebCore::ResourceLoader::didReceiveResponse):
+ (WebCore::ResourceLoader::didFail):
+ * loader/ResourceLoader.h:
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::ApplicationCacheGroup::selectCache):
+ (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
+ (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
+ (WebCore::ApplicationCacheGroup::failedLoadingMainResource):
+ (WebCore::ApplicationCacheGroup::disassociateDocumentLoader):
+ (WebCore::ApplicationCacheGroup::update):
+ (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
+ (WebCore::ApplicationCacheGroup::manifestNotFound):
+ (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
+ (WebCore::ApplicationCacheGroup::startLoadingEntry):
+ (WebCore::ApplicationCacheGroup::associateDocumentLoaderWithCache):
+ (WebCore::CallCacheListenerTask::create):
+ (WebCore::CallCacheListenerTask::performTask):
+ (WebCore::CallCacheListenerTask::CallCacheListenerTask):
+ (WebCore::ApplicationCacheGroup::postListenerTask):
+ * loader/appcache/ApplicationCacheGroup.h:
+ * loader/appcache/ApplicationCacheHost.cpp: Added.
+ * loader/appcache/ApplicationCacheHost.h: Added.
+ * loader/appcache/ApplicationCacheStorage.cpp:
+ (WebCore::ApplicationCacheStorage::transferApplicationCache):
+ * loader/appcache/ApplicationCacheStorage.h:
+ * loader/appcache/DOMApplicationCache.cpp:
+ (WebCore::DOMApplicationCache::DOMApplicationCache):
+ (WebCore::DOMApplicationCache::disconnectFrame):
+ (WebCore::DOMApplicationCache::applicationCacheHost):
+ (WebCore::DOMApplicationCache::status):
+ (WebCore::DOMApplicationCache::update):
+ (WebCore::DOMApplicationCache::swapCache):
+ (WebCore::DOMApplicationCache::addEventListener):
+ (WebCore::DOMApplicationCache::removeEventListener):
+ (WebCore::DOMApplicationCache::dispatchEvent):
+ (WebCore::DOMApplicationCache::callListener):
+ (WebCore::DOMApplicationCache::toEventName):
+ (WebCore::DOMApplicationCache::toEventType):
+ * loader/appcache/DOMApplicationCache.h:
+ (WebCore::DOMApplicationCache::):
+ (WebCore::DOMApplicationCache::setAttributeEventListener):
+ (WebCore::DOMApplicationCache::getAttributeEventListener):
+ (WebCore::DOMApplicationCache::clearAttributeEventListener):
+ (WebCore::DOMApplicationCache::callEventListener):
+ (WebCore::DOMApplicationCache::setOnchecking):
+ (WebCore::DOMApplicationCache::onchecking):
+ (WebCore::DOMApplicationCache::setOnerror):
+ (WebCore::DOMApplicationCache::onerror):
+ (WebCore::DOMApplicationCache::setOnnoupdate):
+ (WebCore::DOMApplicationCache::onnoupdate):
+ (WebCore::DOMApplicationCache::setOndownloading):
+ (WebCore::DOMApplicationCache::ondownloading):
+ (WebCore::DOMApplicationCache::setOnprogress):
+ (WebCore::DOMApplicationCache::onprogress):
+ (WebCore::DOMApplicationCache::setOnupdateready):
+ (WebCore::DOMApplicationCache::onupdateready):
+ (WebCore::DOMApplicationCache::setOncached):
+ (WebCore::DOMApplicationCache::oncached):
+ (WebCore::DOMApplicationCache::setOnobsolete):
+ (WebCore::DOMApplicationCache::onobsolete):
+ (WebCore::DOMApplicationCache::~DOMApplicationCache):
+ * platform/KURLGoogle.cpp:
+ (WebCore::protocolHostAndPortAreEqual):
+
+2009-07-30 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 27854 - crash at WebCore::AXObjectCache::notificationPostTimerFired
+ https://bugs.webkit.org/show_bug.cgi?id=27854
+
+ AccessibilityObjects need to be retained while waiting to fire their notifications, otherwise
+ they can disappear and then lead to crashes.
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::notificationPostTimerFired):
+ (WebCore::AXObjectCache::postNotification):
+ * accessibility/AXObjectCache.h:
+
+2009-07-30 Simon Fraser <simon.fraser@apple.com>
+
+ Minor change to earlier commit suggested by Darin Adler.
+ Use the variable rather than dereferencing 'it' again.
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
+
+2009-07-30 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Animation with a timing function property in a keyframe eats CPU
+ https://bugs.webkit.org/show_bug.cgi?id=27856
+ <rdar://problem/7104476> Animation demo uses lots of CPU
+
+ Don't include animation-timing-function in the list of properties to
+ animate in a keyframe animation, because this property is not animated;
+ instead, it describes the timing function to apply to this keyframe.
+
+ This prevents the animation code from thinking that there's a property
+ that it has to software-animate, and thus firing the animation timer frequently.
+
+ Not testable because there is no visible impact.
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::keyframeStylesForAnimation): Don't add
+ CSSPropertyWebkitAnimationTimingFunction to the list of properties to animate.
+
+ * page/animation/KeyframeAnimation.cpp
+ (WebCore::KeyframeAnimation::getKeyframeAnimationInterval): Add a comment
+
+2009-07-30 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ Apply colour style to buttons that use Theme settings in Qt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27814
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::adjustButtonStyle):
+
+2009-05-11 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Make WebCore compile with the new JS number representation.
+
+ * ForwardingHeaders/runtime/JSAPIValueWrapper.h: Added.
+ * ForwardingHeaders/runtime/JSNumberCell.h: Removed.
+ * bindings/js/ScriptEventListener.cpp:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bridge/c/c_instance.cpp:
+
+2009-07-30 Dean McNamee <deanm@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Don't try to hash member function pointers, instead use a precomputed value based on the field.
+ https://bugs.webkit.org/show_bug.cgi?id=27843
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8SVGPODTypeWrapper.h:
+ (WebCore::PODTypeWrapperCacheInfo::PODTypeWrapperCacheInfo):
+ (WebCore::PODTypeWrapperCacheInfo::operator==):
+ (WebCore::PODTypeWrapperCacheInfoHash::hash):
+ (WebCore::V8SVGDynamicPODTypeWrapperCache::lookupOrCreateWrapper):
+
+2009-07-30 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Simon Fraser.
+
+ Fix compiler warning.
+
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::menuListDefaultEventHandler):
+
+2009-07-29 Matt Perry <mpcomplete@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add a way to register V8 extensions for Isolated Worlds only.
+ https://bugs.webkit.org/show_bug.cgi?id=27785
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::evaluateInNewWorld):
+ (WebCore::ScriptController::evaluateInNewContext):
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/V8IsolatedWorld.cpp:
+ (WebCore::V8IsolatedWorld::evaluate):
+ * bindings/v8/V8IsolatedWorld.h:
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluateInNewWorld):
+ (WebCore::V8Proxy::evaluateInNewContext):
+ (WebCore::V8Proxy::createNewContext):
+ (WebCore::V8Proxy::initContextIfNeeded):
+ (WebCore::V8Proxy::registerExtensionWithV8):
+ (WebCore::V8Proxy::registerExtension):
+ * bindings/v8/V8Proxy.h:
+
+2009-07-30 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ Add previously defined out support to PopupMenuQt for marking entries as
+ disabled and for selecting the desired item.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27772
+
+ * platform/qt/PopupMenuQt.cpp:
+ (WebCore::PopupMenu::populate):
+
+2009-07-30 Darin Adler <darin@apple.com>
+
+ Reviewed by David Levin.
+
+ Use checked casts for render tree
+ https://bugs.webkit.org/show_bug.cgi?id=23522
+
+ Next step: Add new toRenderWidget cast and use it everywhere.
+
+ Use checked casts in all the places that were using static_cast
+ but there is a checked cast available.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::stringValue):
+ (WebCore::AccessibilityRenderObject::widget):
+ (WebCore::AccessibilityRenderObject::widgetForAttachmentView):
+ (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (getPangoLayoutForAtk):
+ * dom/Document.cpp:
+ (WebCore::widgetForNode):
+ (WebCore::Document::setFocusedNode):
+ * html/HTMLEmbedElement.cpp:
+ (WebCore::findWidgetRenderer):
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::defaultEventHandler):
+ * html/HTMLObjectElement.cpp:
+ (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
+ * html/HTMLPlugInElement.cpp:
+ (WebCore::HTMLPlugInElement::defaultEventHandler):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadSubframe):
+ * loader/PluginDocument.cpp:
+ (WebCore::PluginTokenizer::writeRawData):
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::hitTestResultAtPoint):
+ (WebCore::subframeForTargetNode):
+ (WebCore::EventHandler::handleWheelEvent):
+ * page/Frame.cpp:
+ (WebCore::isFrameElement):
+ * page/PrintContext.cpp:
+ (WebCore::PrintContext::computePageRects):
+ * page/android/EventHandlerAndroid.cpp:
+ (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
+ * page/chromium/EventHandlerChromium.cpp:
+ (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
+ * page/chromium/FrameChromium.cpp:
+ (WebCore::computePageRectsForFrame):
+ * page/gtk/EventHandlerGtk.cpp:
+ (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
+ * page/haiku/EventHandlerHaiku.cpp:
+ (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
+ (WebCore::EventHandler::passSubframeEventToSubframe):
+ * page/win/FrameWin.cpp:
+ (WebCore::computePageRectsForFrame):
+ * page/wx/EventHandlerWx.cpp:
+ (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
+ * platform/chromium/ClipboardChromium.cpp:
+ (WebCore::getCachedImage):
+ * platform/chromium/PasteboardChromium.cpp:
+ (WebCore::Pasteboard::writeImage):
+ * platform/gtk/PasteboardGtk.cpp:
+ (WebCore::Pasteboard::writeImage):
+ * platform/mac/PasteboardMac.mm:
+ (WebCore::Pasteboard::writeImage):
+ * platform/qt/ClipboardQt.cpp:
+ (WebCore::getCachedImage):
+ * platform/qt/PasteboardQt.cpp:
+ (WebCore::Pasteboard::writeImage):
+ * platform/win/ClipboardWin.cpp:
+ (WebCore::getCachedImage):
+ * platform/win/PasteboardWin.cpp:
+ (WebCore::Pasteboard::writeImage):
+ * rendering/InlineBox.h:
+ (WebCore::InlineBox::boxModelObject):
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::splitInlines):
+ (WebCore::RenderInline::addChildToContinuation):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateImageContents):
+ * rendering/TextControlInnerElements.cpp:
+ (WebCore::RenderTextControlInnerBlock::positionForPoint):
+ Use checked cast instead of static_cast.
+
+ * rendering/RenderWidget.h: Added toRenderWidget.
+
+2009-07-30 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ WINCE PORT: some files modified to build for WINCE
+ https://bugs.webkit.org/show_bug.cgi?id=27816
+
+ * accessibility/AccessibilityObject.h:
+ * page/win/EventHandlerWin.cpp:
+ (WebCore::EventHandler::createDraggingClipboard):
+ * platform/win/PlatformMouseEventWin.cpp:
+ (WebCore::messageToEventType):
+ (WebCore::PlatformMouseEvent::PlatformMouseEvent):
+ * platform/win/PlatformScreenWin.cpp:
+ (WebCore::deviceInfoForWidget):
+ (WebCore::screenIsMonochrome):
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::show):
+ (WebCore::PopupMenu::paint):
+ (WebCore::registerPopup):
+ (WebCore::PopupWndProc):
+
+2009-07-30 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ WINCE PORT: modified graphics files
+ https://bugs.webkit.org/show_bug.cgi?id=27779
+
+ * platform/graphics/BitmapImage.h:
+ (WebCore::BitmapImage::mayFillWithSolidColor):
+ * platform/graphics/Gradient.h:
+ * platform/graphics/GraphicsContext.cpp:
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/ImageSource.h:
+ * platform/graphics/MediaPlayer.cpp:
+ * platform/graphics/Path.h:
+ * platform/graphics/Pattern.h:
+ * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
+ (WebCore::Matrix3DTransformOperation::blend):
+ * platform/graphics/transforms/MatrixTransformOperation.cpp:
+ (WebCore::MatrixTransformOperation::blend):
+ * platform/graphics/transforms/TransformationMatrix.h:
+ (WebCore::TransformationMatrix::operator*):
+ * platform/graphics/win/IconWin.cpp:
+ (WebCore::Icon::createIconForFile):
+ (WebCore::Icon::createIconForFiles):
+ (WebCore::Icon::paint):
+
+2009-07-30 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Improve efficiency by rewriting code doing three hash table
+ lookups, which can be replaced by just one as pointed out
+ by Darin Adler.
+
+ Though being slightly less clear, this should be considerable
+ faster.
+
+ * plugins/PluginDatabase.cpp:
+ (WebCore::PluginDatabase::remove):
+
+2009-07-30 Antonio Gomes <antonio.gomes@openbossa.org>
+
+ Reviewed by Gustavo Noronha.
+
+ [Gtk] Code cleanup in MediaPlayerPrivateGStreamer.cpp|h and VideoSinkGStreamer.cpp|h (Part 2)
+ https://bugs.webkit.org/show_bug.cgi?id=27651
+
+ Removed unneeded includes (gdk.h and gtk.h) and added glib.h and cairo.h instead.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+
+2009-07-30 Antonio Gomes <antonio.gomes@openbossa.org>
+
+ Reviewed by Gustavo Noronha.
+
+ [Gtk] Code cleanup in MediaPlayerPrivateGStreamer.cpp|h and VideoSinkGStreamer.cpp|h (Part 1)
+ https://bugs.webkit.org/show_bug.cgi?id=27651
+
+ Fixed many code style issues pointed by WebKitTools/Scripts/modules/cpplint.py
+ No functionality change at all.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+ * platform/graphics/gtk/VideoSinkGStreamer.cpp:
+ * platform/graphics/gtk/VideoSinkGStreamer.h:
+
+2009-07-30 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ Allow to explicitly choose a preferred plugin for a mimetype.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27651
+
+ When the preferred plugin is set for a specific MIME type, it will be
+ always picked up, regardless of its version, quirks etc.
+
+ Client applications may want to use that API to resolve mimetype
+ ambiguity in a custom way, rather than in the default way that is
+ currently used in WebKit.
+
+ * plugins/PluginDatabase.cpp:
+ (WebCore::PluginDatabase::pluginForMIMEType):
+ (WebCore::PluginDatabase::MIMETypeForExtension):
+ (WebCore::PluginDatabase::setPreferredPluginForMIMEType): Added.
+ (WebCore::PluginDatabase::remove):
+ (WebCore::PluginDatabase::clear):
+ * plugins/PluginDatabase.h:
+
+2009-07-30 Jakub Wieczorek <faw217@gmail.com>
+
+ [Qt] Fix build with Qt 4.4 after r46535.
+
+ * platform/network/qt/ResourceHandleQt.cpp:
+
+2009-07-30 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Video elements fires another "load" event when attached to DOM
+ https://bugs.webkit.org/show_bug.cgi?id=27623
+
+ Test: media/media-load-event.html
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::insertedIntoDocument):
+ Only schedule load when element's network state is NETWORK_EMPTY.
+
+2009-07-30 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by David Levin.
+
+ Cache v8 strings when converting from WebCore::String to v8 string.
+ https://bugs.webkit.org/show_bug.cgi?id=27655
+
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::v8String): now just immediately calls v8ExternalString
+ (WebCore::enableStringImplCache): enables caching of conversions from WebCore::StringImpl to
+ v8::String
+ (WebCore::makeExternalString): utilty function to create external v8::String out of
+ WebCore::String
+ (WebCore::getStringCache): static function to access string cache
+ (WebCore::cachedStringCallback): callback for weak handles of v8::Strings stored in the
+ cache
+ (WebCore::v8ExternalString): if caching enabled, checks if there is already v8::String for
+ the given WebCore::StringImpl. If present, returns it, otherwise creates a new v8 external
+ string.
+ * bindings/v8/V8Binding.h:
+
+2009-07-30 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25535
+ [GTK] object:state-changed:checked events missing for radio buttons and checkboxes
+
+ Implement state-changed:checked for radio buttons and checkboxes.
+
+ * accessibility/gtk/AXObjectCacheAtk.cpp:
+ (WebCore::AXObjectCache::postPlatformNotification):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::setChecked):
+
+2009-07-30 Xan Lopez <xlopez@igalia.com>
+
+ Forgot the 'break'.
+
+ * platform/ContextMenu.cpp:
+ (WebCore::ContextMenu::checkOrEnableIfNeeded):
+
+2009-07-30 Xan Lopez <xlopez@igalia.com>
+
+ Try to fix Mac build.
+
+ * platform/ContextMenu.cpp:
+ (WebCore::ContextMenu::checkOrEnableIfNeeded):
+
+2009-07-29 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Adam Barth.
+
+ Add missing enumeration value to switch.
+
+ * platform/ContextMenu.cpp:
+ (WebCore::ContextMenu::checkOrEnableIfNeeded):
+
+2009-07-29 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Workers need to throw an exception when presented with invalid URLs.
+ https://bugs.webkit.org/show_bug.cgi?id=27770
+
+ Tests covered by worker-constructor.html and worker-redirect.html.
+
+ * bindings/js/JSWorkerConstructor.cpp:
+ (WebCore::constructWorker):
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * workers/Worker.cpp:
+ (WebCore::Worker::Worker):
+ * workers/Worker.h:
+ (WebCore::Worker::create):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::importScripts):
+ * workers/WorkerScriptLoader.cpp:
+ (WebCore::WorkerScriptLoader::loadSynchronously):
+ (WebCore::WorkerScriptLoader::loadAsynchronously):
+ (WebCore::WorkerScriptLoader::createResourceRequest):
+ * workers/WorkerScriptLoader.h:
+
+2009-07-29 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ (REGRESSION: r46039) Should restore previous connections-per-host limit for non-http(s) hosts
+ https://bugs.webkit.org/show_bug.cgi?id=27822 and <rdar://problem/7091659>
+
+ * loader/loader.cpp:
+ (WebCore::Loader::Host::servePendingRequests): For non-http(s) hosts, restore the previous behavior of
+ only limiting connections while parsing and still trying to figure out stylesheet urls.
+
+2009-07-29 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ WINCE PORT: Add WebCore/page/wince/FrameWince.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=27729
+
+ * page/wince/FrameWince.cpp: Added.
+
+2009-07-29 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Justin Garcia.
+
+ REGRESSION(r46370-46426): /editing/style/remove-underline-from-stylesheet.html fails
+ https://bugs.webkit.org/show_bug.cgi?id=27809
+
+ The patch primarily rebaselines the tests but also fixes the bug in currentlyHasStyle.
+ To determine that a particular text decoration is present, currentlyHasStyle should refer to
+ -webkit-text-decorations-in-effect to take care of styles set by u, s, strike tags and ancestors' CSS.
+ We also need to update layout to accommodate the changes made within ApplyStyleCommand.
+
+ * editing/ApplyStyleCommand.cpp: ditto
+ (WebCore::StyleChange::currentlyHasStyle): ditto
+
+2009-07-29 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ WINCE PORT: changes to platform/text files
+ https://bugs.webkit.org/show_bug.cgi?id=27715
+
+ * platform/text/String.cpp:
+ (WebCore::String::format):
+ * platform/text/TextEncoding.cpp:
+ (WebCore::TextEncoding::encode):
+ * platform/text/TextEncodingRegistry.cpp:
+ (WebCore::buildBaseTextCodecMaps):
+ (WebCore::extendTextCodecMaps):
+
+2009-07-29 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Adam Roben.
+
+ FIX: HDC leaks in PopupMenuWin.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=27817
+
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::~PopupMenu):
+ (WebCore::PopupMenu::paint):
+
+2009-07-29 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Illegal values for <ol start> cause list numbering start at 0 (should start at 1)
+ https://bugs.webkit.org/show_bug.cgi?id=27810
+
+ Test: fast/lists/ol-start-parsing.html
+
+ * html/HTMLOListElement.cpp:
+ (WebCore::HTMLOListElement::parseMappedAttribute): Check the result of toInt
+ and use the value 1 if it failed to parse. Before we were getting toInt's default
+ behavior, which is to return 0.
+
+2009-07-29 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Added foundation work to allow a testing infrastructure for the Web
+ Inspector.
+
+ * inspector/InspectorClient.h:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::scriptObjectReady): Tell the testing
+ harness that the window object is ready.
+ * loader/EmptyClients.h: Empty class support for SVG.
+ (WebCore::EmptyInspectorClient::inspectorWindowObjectCleared):
+
+2009-07-29 Chris Fleizach <cfleizach@apple.com>
+
+ Build fix for windows after landing
+ Bug 27807 - AX: move re-usable code into more common areas for other platforms
+
+ Apparently bzero doesn't exist on windows.
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
+
+2009-07-29 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Justin Garcia.
+
+ Bug 27807 - AX: move re-usable code into more common areas for other platforms
+ https://bugs.webkit.org/show_bug.cgi?id=27807
+
+ Moves some accessibility code that was in the Mac file to a more common place so
+ it can be used by other platforms.
+ This includes:
+ Making TextMarkerData from a VisiblePosition.
+ Making a VisiblePosition from TextMarkerData.
+ Finding the anchor accessibility object for an arbitrary Node.
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::visiblePositionForTextMarkerData):
+ (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
+ * accessibility/AXObjectCache.h:
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::anchorElementForNode):
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::visiblePositionForIndex):
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (textMarkerForVisiblePosition):
+ (visiblePositionForTextMarker):
+ (AXAttributedStringAppendText):
+
+2009-07-29 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Inset box shadows are incorrectly accounted for in visual overflow
+ computations
+ https://bugs.webkit.org/show_bug.cgi?id=27811
+
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::placeBoxesHorizontally): Use
+ getBoxShadowHorizontalExtent().
+ (WebCore::InlineFlowBox::placeBoxesVertically): Use
+ getBoxShadowVerticalExtent(). Removed duplicate code to get the
+ text-shadow overflow.
+ (WebCore::InlineFlowBox::paint): Use getBoxShadowHorizontalExtent().
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::overflowHeight): Use
+ getBoxShadowVerticalExtent().
+ (WebCore::RenderBlock::overflowWidth): Use
+ getBoxShadowHorizontalExtent().
+ (WebCore::RenderBlock::overflowLeft): Ditto.
+ (WebCore::RenderBlock::overflowTop): Use getBoxShadowVerticalExtent().
+ (WebCore::RenderBlock::overflowRect): Use getBoxShadowExtent().
+ (WebCore::RenderBlock::layoutBlock): Ditto.
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::layoutBlock): Ditto.
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::calculateRects): Exclude inset shadows.
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Use
+ getBoxShadowHorizontalExtent() and getBoxShadowVerticalExtent().
+ (WebCore::RenderObject::adjustRectForOutlineAndShadow): Exclude inset
+ shadows.
+ * rendering/RenderReplaced.cpp:
+ (WebCore::RenderReplaced::adjustOverflowForBoxShadowAndReflect): Ditto.
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::setTextShadow): Also assert that text-shadows are
+ not inset.
+ (WebCore::RenderStyle::getBoxShadowExtent): Added. Excludes inset
+ shadows.
+ (WebCore::RenderStyle::getBoxShadowHorizontalExtent): Ditto.
+ (WebCore::RenderStyle::getBoxShadowVerticalExtent): Ditto.
+ * rendering/style/RenderStyle.h:
+
+2009-07-29 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix crash when an element with display: table-row is composited (e.g. via a 3d-transform)
+ https://bugs.webkit.org/show_bug.cgi?id=27796
+
+ Avoid repainting when a layer becomes composited if the renderer is not parented
+ yet, because it makes no sense to do so.
+
+ If the table row is a repaint container, default to the RenderBox implementation
+ of clippedOverflowRectForRepaint(), because we cannot hand off the repaint rect
+ computation to something that is above the repaint container.
+
+ Test: fast/table/table-row-compositing-repaint-crash.html
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::repaintOnCompositingChange):
+ * rendering/RenderTableRow.cpp:
+ (WebCore::RenderTableRow::clippedOverflowRectForRepaint):
+
+2009-07-29 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27791
+ 307 redirects of POSTs should use POST, not GET
+
+ Test: http/tests/loading/redirect-methods.html
+
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::willSendRequest):
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
+
+2009-07-29 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Adding -webkit-animation-play-state back in
+ https://bugs.webkit.org/show_bug.cgi?id=26867
+
+ We've decided to keep -webkit-animation-play-state. So this
+ just adds back in the code from https://bugs.webkit.org/show_bug.cgi?id=22907.
+
+ Test: animations/play-state.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::):
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ (WebCore::CSSParser::parseAnimationPlayState):
+ (WebCore::CSSParser::parseAnimationProperty):
+ * css/CSSParser.h:
+ * css/CSSPropertyNames.in:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ (WebCore::CSSStyleSelector::mapAnimationPlayState):
+ * css/CSSStyleSelector.h:
+ * platform/animation/Animation.h:
+ * rendering/style/RenderStyleConstants.h:
+ (WebCore::):
+
+2009-07-29 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ Expose the default plugin directories and the current directory set of
+ the plugin database as public API.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27651
+
+ * plugins/PluginDatabase.h:
+ (WebCore::PluginDatabase::pluginDirectories):
+
+2009-07-29 Alpha Lam <hclam@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] Font size for current time display in media controls panel
+ is affected by body font size.
+ https://bugs.webkit.org/show_bug.cgi?id=27799
+
+ Fixing the problem of rendering by explicitly setting the font size
+ for the time displays.
+
+ No new tests since this is covered by existing media tests.
+
+ * css/mediaControlsChromium.css:
+
+2009-07-29 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by David Levin.
+
+ Update WebCore/page/ContextMenuController.cpp to conform to WebKit
+ Style Guidelines as identified by cpp_style.py.
+ https://bugs.webkit.org/show_bug.cgi?id=27613
+
+ * page/ContextMenuController.cpp:
+ (WebCore::openNewWindow):
+ (WebCore::ContextMenuController::contextMenuItemSelected):
+
+2009-07-29 Dean McNamee <deanm@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Removed unused wrapCPointer/extractCPointer from the v8 bindings.
+ https://bugs.webkit.org/show_bug.cgi?id=27805
+
+ * bindings/v8/V8DOMWrapper.h:
+
+2009-07-29 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ Expose the PluginDatabase::pluginForMIMEType() function as public API.
+ https://bugs.webkit.org/show_bug.cgi?id=27651
+
+ It can be used to determine the appropriate plugin for a mime type,
+ without guessing the mimetype from the extension.
+
+ * plugins/PluginDatabase.h:
+
+2009-07-29 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Adam Treat.
+
+ Allow to enable/disable particular plugin packages.
+ https://bugs.webkit.org/show_bug.cgi?id=27651
+
+ Disabled plugins will not be picked up when looking for a plugin
+ supporting the requested mimetypes.
+
+ Client applications may want to use that API to disable specific
+ plugins.
+
+ * plugins/PluginDatabase.cpp:
+ (WebCore::PluginDatabase::pluginForMIMEType):
+ (WebCore::PluginDatabase::MIMETypeForExtension):
+ * plugins/PluginPackage.cpp:
+ (WebCore::PluginPackage::PluginPackage):
+ (WebCore::PluginPackage::setEnabled):
+ * plugins/PluginPackage.h:
+ (WebCore::PluginPackage::isEnabled):
+
+2009-07-29 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ [WML] Running WML tests in random order multiple times exposes subtle bugs
+ https://bugs.webkit.org/show_bug.cgi?id=27801
+
+ Remove superflous assertions regarding the parent node. Under certain circumstances
+ these can even fire (related to garbage collection while destructing). Fixes random order
+ WML tests (run-webkit-tests fast/wml wml http/tests/wml fast/wml ... --random)
+
+ The wml/enter-first-card-with-events.html test relied on a bug in our implementation of
+ WMLPageState::reset() - the history stack should still contain the current card afterwards.
+ Fix that bug by preserving the first item in BackForwardList::clearWMLPageHistory().
+
+ * history/BackForwardList.cpp: Preserve first item in history stack, as demanded by the spec.
+ (WebCore::BackForwardList::clearWMLPageHistory):
+ * wml/WMLDoElement.cpp:
+ (WebCore::WMLDoElement::insertedIntoDocument):
+ (WebCore::WMLDoElement::removedFromDocument):
+ * wml/WMLNoopElement.cpp:
+ (WebCore::WMLNoopElement::insertedIntoDocument):
+ * wml/WMLOnEventElement.cpp:
+ (WebCore::eventHandlingParent):
+ * wml/WMLPostfieldElement.cpp:
+ (WebCore::WMLPostfieldElement::insertedIntoDocument):
+ (WebCore::WMLPostfieldElement::removedFromDocument):
+ * wml/WMLSetvarElement.cpp:
+ (WebCore::WMLSetvarElement::insertedIntoDocument):
+ (WebCore::WMLSetvarElement::removedFromDocument):
+ * wml/WMLTaskElement.cpp:
+ (WebCore::WMLTaskElement::insertedIntoDocument):
+ (WebCore::WMLTaskElement::removedFromDocument):
+ * wml/WMLTimerElement.cpp:
+ (WebCore::WMLTimerElement::insertedIntoDocument):
+ (WebCore::WMLTimerElement::removedFromDocument):
+
+2009-07-29 Yongjun Zhang <yongjun.zhang@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26848
+ [Qt] ResourceHandle::willLoadFromCache needs to be implemented QtWebKit.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadItem):
+ * platform/network/ResourceHandle.h:
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::ResourceHandle::willLoadFromCache):
+ * platform/network/curl/ResourceHandleCurl.cpp:
+ (WebCore::ResourceHandle::willLoadFromCache):
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::willLoadFromCache):
+ * platform/network/qt/ResourceHandleQt.cpp:
+ (WebCore::ResourceHandle::willLoadFromCache):
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::):
+
+2009-07-29 Alpha Lam <hclam@chromium.org>
+
+ Reviewed by David Levin.
+
+ Media control panel for <video> in MediaDocument is mis-placed
+ https://bugs.webkit.org/show_bug.cgi?id=27798
+
+ Fixing a rendering problem: When <video> is displayed in MediaDocument,
+ the media control panel overlaps with the video by 16 pixels.
+
+ No new tests as this is covered by existing media tests.
+
+ * css/mediaControlsChromium.css:
+
+2009-07-29 Adam Barth <abarth@webkit.org>
+
+ Unreviewed build fix for Chromium. Those last two patches weren't
+ independent despite the clean merge.
+
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::V8AbstractEventListener):
+
+2009-07-29 Avi Drissman <avi@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ ImageSourceCG makes bad data refs (race condition causes blank images)
+ https://bugs.webkit.org/show_bug.cgi?id=27777
+
+ Make ImageSourceCG guarantee that the lifetime of the SharedBuffer that
+ backs the CFDataRef will be long enough.
+
+ No new tests, as this fixes a bug with a race condition that is
+ difficult to trigger.
+
+ * platform/graphics/cg/ImageSourceCG.cpp:
+ (WebCore::ImageSource::setData):
+
+2009-07-29 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: Console should show completions for the command line APIs
+ https://bugs.webkit.org/show_bug.cgi?id=27696
+
+ * inspector/front-end/Console.js:
+ (WebInspector.Console.prototype._reportCompletions): Adds properties from _inspectorCommandLineAPI to
+ completions when available.
+ * inspector/front-end/utilities.js:
+ (Object.properties): Added.
+ (Object.sortedProperties):
+
+2009-07-29 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Refactor the first step of layout in RenderFlexibleBox.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=27704
+
+ No new tests as this change is just a refactoring.
+
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::gatherFlexChildrenInfo):
+ (WebCore::RenderFlexibleBox::layoutHorizontalBox):
+ (WebCore::RenderFlexibleBox::layoutVerticalBox):
+
+2009-07-29 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Fix a bug that HTMLOptionElement::value() returns an incorrect
+ value in a case that the element has a label attribute and no
+ value attribute.
+ https://bugs.webkit.org/show_bug.cgi?id=27760
+
+ Test: fast/forms/option-value-and-label.html
+
+ * dom/OptionElement.cpp:
+ (WebCore::OptionElement::collectOptionLabelOrText):
+ (WebCore::OptionElement::collectOptionInnerText):
+ (WebCore::OptionElement::normalizeText):
+ (WebCore::OptionElement::collectOptionTextRespectingGroupLabel):
+ (WebCore::OptionElement::collectOptionValue):
+ * dom/OptionElement.h:
+ * html/HTMLOptionElement.cpp:
+ (WebCore::HTMLOptionElement::text):
+ * wml/WMLOptionElement.cpp:
+ (WebCore::WMLOptionElement::text):
+
+2009-07-29 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Fix isolated world wrappers for event handlers
+ https://bugs.webkit.org/show_bug.cgi?id=27533
+
+ Instead of getting the context from the frame, we cache the context
+ when the listener is created so that we get the context for the right
+ world.
+
+ Test: http/tests/security/isolatedWorld/click-event.html
+
+ * WebCore.gypi:
+ * bindings/v8/OwnHandle.h: Added.
+ (WebCore::OwnHandle::OwnHandle):
+ (WebCore::OwnHandle::~OwnHandle):
+ (WebCore::OwnHandle::get):
+ (WebCore::OwnHandle::set):
+ (WebCore::OwnHandle::release):
+ (WebCore::OwnHandle::adopt):
+ (WebCore::OwnHandle::swap):
+ (WebCore::OwnHandle::clear):
+ (WebCore::OwnHandle::makeWeak):
+ (WebCore::OwnHandle::weakCallback):
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::V8AbstractEventListener):
+ (WebCore::V8AbstractEventListener::handleEvent):
+ * bindings/v8/V8AbstractEventListener.h:
+ * bindings/v8/V8DOMWrapper.h:
+
+2009-07-29 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Teach V8Proxy::context about isolated worlds
+ https://bugs.webkit.org/show_bug.cgi?id=27701
+
+ Change V8Proxy::context(Frame*) to understand isolated worlds. Audit
+ all callers of this method to make sure they want isolated worlds. In
+ cases where we really want the main world, I've changed the call to
+ V8Proxy::mainWorldContext(Frame*).
+
+ The main visible change is to the document.open method when called with
+ more than two arguments. This design seems more likely to lead to
+ future correct code.
+
+ Test: http/tests/security/isolatedWorld/document-open.html
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::processingUserGesture):
+ (WebCore::ScriptController::evaluate):
+ (WebCore::ScriptController::bindToWindowObject):
+ (WebCore::ScriptController::collectGarbage):
+ (WebCore::createScriptObject):
+ (WebCore::ScriptController::createScriptObjectForPluginElement):
+ * bindings/v8/ScriptObjectQuarantine.cpp:
+ (WebCore::getQuarantinedScriptObject):
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::handleEvent):
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getConstructor):
+ (WebCore::V8DOMWrapper::setHiddenWindowReference):
+ (WebCore::V8DOMWrapper::convertNodeToV8Object):
+ (WebCore::V8DOMWrapper::convertWindowToV8Object):
+ * bindings/v8/V8Helpers.cpp:
+ (WebCore::toV8Context):
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::getListenerFunction):
+ (WebCore::V8LazyEventListener::getWrappedListenerFunction):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::context):
+ (WebCore::V8Proxy::mainWorldContext):
+ (WebCore::V8Proxy::bindJsObjectToWindow):
+ * bindings/v8/V8Proxy.h:
+
+2009-07-29 Balazs Kelemen <kelemen.balazs.3@stud.u-szeged.hu>
+
+ Reviewed by Simon Hausmann.
+
+ Fix the Qt build, add missing file.
+
+ * WebCore.pro:
+
+2009-07-28 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Speculative fix for <rdar://problem/7005077> WER: Crash in
+ WebCore::PluginStream::destroyStream+279 (1310510882)
+
+ Reviewed by Oliver Hunt.
+
+ * plugins/PluginStream.cpp:
+ (WebCore::PluginStream::destroyStream):
+ Move the "protector" RefPtr out of the block that dispatches
+ notifications and into the function level; if NPN_DestroyStream were
+ called from NPP_NewStream as the comment warns, we would be deleted at
+ the end of the block.
+
+2009-07-28 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Inspector: Tab Through the DOM Storage DataGrid when Editing
+
+ https://bugs.webkit.org/show_bug.cgi?id=27746
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/front-end/DOMStorageDataGrid.js:
+ (WebInspector.DOMStorageDataGrid.prototype._startEditingColumnOfDataGridNode): refactored to directly edit and select a column
+ (WebInspector.DOMStorageDataGrid.prototype._startEditing):
+ (WebInspector.DOMStorageDataGrid.prototype._editingCommitted.moveToNextIfNeeded): handles moveDirection on a commit
+ (WebInspector.DOMStorageDataGrid.prototype._editingCommitted): uses moveToNext to traverse appropriately
+
+2009-07-28 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Inspector: Create New DOM Storage Items via DataGrid
+
+ https://bugs.webkit.org/show_bug.cgi?id=27322
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/front-end/DOMStorageDataGrid.js:
+ (WebInspector.DOMStorageDataGrid.prototype._startEditing): click anyway means creationNode
+ (WebInspector.DOMStorageDataGrid.prototype._editingCommitted): fix unintended globals
+ (WebInspector.DOMStorageDataGrid.prototype.deleteSelectedRow): creationNode is special case
+ * inspector/front-end/DataGrid.js:
+ (WebInspector.DataGrid.prototype.addCreationNode): maintain a quick ref to the single creationNode
+ (WebInspector.CreationDataGridNode): new type of node
+ (WebInspector.CreationDataGridNode.prototype.makeNormal): convert to a normal node
+ * inspector/front-end/DatabasesPanel.js:
+ (WebInspector.DatabasesPanel.prototype.dataGridForDOMStorage): add a creationNode to the GridData
+
+2009-07-28 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Inspector: Automatically Refresh DOM Storage Grids on "storage" event
+
+ https://bugs.webkit.org/show_bug.cgi?id=27400
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/front-end/DatabasesPanel.js:
+ (WebInspector.DatabasesPanel.prototype.show): trigger adding the listener
+ (WebInspector.DatabasesPanel.prototype.reset): trigger removing the listener
+ (WebInspector.DatabasesPanel.prototype._registerStorageEventListener): register the listener on the inspected window
+ (WebInspector.DatabasesPanel.prototype._unregisterStorageEventListener): unregister the listener on the inspected window
+ (WebInspector.DatabasesPanel.prototype._storageEvent): handle the storage event
+
+2009-07-28 Keishi Hattori <casey.hattori@gmail.com>
+
+ Inspector should support inspect() in the command line.
+
+ https://bugs.webkit.org/show_bug.cgi?id=19874
+ rdar://problem/6070225
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/front-end/Console.js:
+ (WebInspector.Console.prototype._ensureCommandLineAPIInstalled.inspectObject):
+ (WebInspector.Console.prototype._ensureCommandLineAPIInstalled):
+ * inspector/front-end/DatabasesPanel.js:
+ (WebInspector.DatabasesPanel.prototype.revealAndSelectDomStorage): Added.
+ (WebInspector.DatabasesPanel.prototype.revealAndSelectDatabase): Added.
+ (WebInspector.DatabasesPanel.prototype.showDatabase):
+
+2009-07-28 Keishi Hattori <casey.hattori@gmail.com>
+
+ The rest of: Web Inspector: Add inspected node using public console API.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27758
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/front-end/Console.js:
+ (WebInspector.Console.prototype._ensureCommandLineAPIInstalled): Removed _inspectorCommandLineAPI._addInspectedNode.
+ (WebInspector.Console.prototype.addInspectedNode): Added.
+
+2009-07-28 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Accept autocomplete on 'End' key pressed.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27447.
+
+ * inspector/front-end/TextPrompt.js:
+ (WebInspector.TextPrompt.prototype.handleKeyEvent):
+
+2009-07-28 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by David Levin.
+
+ [Qt] Build fix after r46502
+ https://bugs.webkit.org/show_bug.cgi?id=27789
+
+ * WebCore.pro: Remove StorageArea.cpp
+
+2009-07-28 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Follow-on fix to r35582. Replace main thread assertions with WebCoreObjCScheduleDeallocateOnMainThread
+ in -dealloc overrides in DOMObject subclasses.
+
+ * bindings/scripts/CodeGeneratorObjC.pm:
+
+2009-07-28 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ [WML] WML*Element classes mostly implement insertedIntoDocument(), not removedFromDocument()
+ https://bugs.webkit.org/show_bug.cgi?id=27786
+
+ WML*Element classes mostly implement insertedIntoDocument(), not removedFromDocument().
+ The only case where this is relevant in WML is error handling. The parsed WML
+ tree fragment is inserted in an XHTML compound error document. This requires
+ removedFromDocument() to be correctly implemented otherwhise we run into
+ trouble (visible when using run-webkit-tests fast/wml --random).
+
+ * wml/WMLAnchorElement.cpp:
+ (WebCore::WMLAnchorElement::registerTask):
+ (WebCore::WMLAnchorElement::deregisterTask):
+ * wml/WMLAnchorElement.h:
+ * wml/WMLDoElement.cpp:
+ (WebCore::WMLDoElement::removedFromDocument):
+ (WebCore::WMLDoElement::registerTask):
+ (WebCore::WMLDoElement::deregisterTask):
+ * wml/WMLDoElement.h:
+ * wml/WMLEventHandlingElement.cpp:
+ (WebCore::WMLEventHandlingElement::registerDoElement):
+ (WebCore::WMLEventHandlingElement::deregisterDoElement):
+ * wml/WMLEventHandlingElement.h:
+ * wml/WMLFieldSetElement.cpp:
+ (WebCore::WMLFieldSetElement::removedFromDocument):
+ * wml/WMLGoElement.cpp:
+ (WebCore::WMLGoElement::registerPostfieldElement):
+ (WebCore::WMLGoElement::deregisterPostfieldElement):
+ * wml/WMLGoElement.h:
+ * wml/WMLIntrinsicEventHandler.cpp:
+ (WebCore::WMLIntrinsicEventHandler::deregisterIntrinsicEvent):
+ * wml/WMLIntrinsicEventHandler.h:
+ * wml/WMLOnEventElement.cpp:
+ (WebCore::eventHandlingParent):
+ (WebCore::WMLOnEventElement::registerTask):
+ (WebCore::WMLOnEventElement::deregisterTask):
+ * wml/WMLOnEventElement.h:
+ * wml/WMLPostfieldElement.cpp:
+ (WebCore::WMLPostfieldElement::removedFromDocument):
+ * wml/WMLPostfieldElement.h:
+ * wml/WMLSetvarElement.cpp:
+ (WebCore::WMLSetvarElement::removedFromDocument):
+ * wml/WMLSetvarElement.h:
+ * wml/WMLTaskElement.cpp:
+ (WebCore::WMLTaskElement::removedFromDocument):
+ (WebCore::WMLTaskElement::registerVariableSetter):
+ (WebCore::WMLTaskElement::deregisterVariableSetter):
+ (WebCore::WMLTaskElement::storeVariableState):
+ * wml/WMLTaskElement.h:
+ * wml/WMLTimerElement.cpp:
+ (WebCore::WMLTimerElement::removedFromDocument):
+ * wml/WMLTimerElement.h:
+
+2009-07-28 David Levin <levin@chromium.org>
+
+ Suggested by Drew Wilson.
+
+ Speculative gtk build fix, follow up to:
+ https://bugs.webkit.org/show_bug.cgi?id=27697
+
+ * GNUmakefile.am:
+
+2009-07-28 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ [CSS3 Backgrounds and Borders] Drop the prefix from the border-radius
+ properties
+ https://bugs.webkit.org/show_bug.cgi?id=27578
+
+ [CSS3 Backgrounds and Borders] Handle the / and 4 values in
+ border-radius
+ https://bugs.webkit.org/show_bug.cgi?id=27584
+
+ Test: fast/borders/border-radius-parsing.html
+
+ Dropped the -webkit- prefix from the individual corner border-radius
+ properties. Added border-radius with the / and 4-value syntax, and
+ maintained -webkit-border-radius with legacy 2-value syntax.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (computedProperties): Removed Webkit prefix.
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Ditto.
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue): Removed Webkit prefix from the
+ single-corner properties. Call out to parseBorderRadius() to parse
+ border-radius and -webkit-border-radius.
+ (WebCore::completeBorderRadii): Added this helper function that
+ completes the values for all four corners when fewer than four are
+ specified.
+ (WebCore::CSSParser::parseBorderRadius): Added.
+ (WebCore::cssPropertyID): Map -webkit-border-*-*-radius to the
+ unprefixed property.
+ * css/CSSParser.h:
+ * css/CSSPropertyLonghand.cpp:
+ (WebCore::initShorthandMap): Removed the Webkit prefix. Added an entry
+ for border-radius. Kept the entry for -webkit-border-radius.
+ * css/CSSPropertyNames.in: Removed the -webkit- prefix from the
+ single-corenr properties. Added border-radius. Kept
+ -webkit-border-radius because of its conflicting syntax.
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty): Removed the Webkit prefix.
+ * page/animation/AnimationBase.cpp:
+ (WebCore::ensurePropertyMap): Ditto.
+
+2009-07-28 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ Refactored dedicated-worker-specific code from WorkerThread into DedicatedWorkerThread class.
+
+ WorkerThread needs to be refactored to separate out dedicated-worker functionality.
+ https://bugs.webkit.org/show_bug.cgi?id=27697
+
+ This is just a refactoring, so existing tests suffice.
+
+ * GNUmakefile.am:
+ Added DedicatedWorkerThread.h/.cpp
+ * WebCore.gypi:
+ Added DedicatedWorkerThread.h/.cpp
+ * WebCore.pro:
+ Added DedicatedWorkerThread.h/.cpp
+ * WebCore.vcproj/WebCore.vcproj:
+ Added DedicatedWorkerThread.h/.cpp
+ * WebCore.xcodeproj/project.pbxproj:
+ Added DedicatedWorkerThread.h/.cpp
+ * bindings/js/WorkerScriptController.cpp:
+ (WebCore::WorkerScriptController::evaluate):
+ Removed code to track pending activity - this is handled by DedicatedWorkerContext::importScripts() now.
+ * bindings/v8/WorkerScriptController.cpp:
+ (WebCore::WorkerScriptController::evaluate):
+ Removed code to track pending activity - this is handled by DedicatedWorkerContext::importScripts() now.
+ * workers/DedicatedWorkerContext.cpp:
+ (WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
+ (WebCore::DedicatedWorkerContext::addMessage):
+ Forwards console messages to parent document.
+ (WebCore::DedicatedWorkerContext::importScripts):
+ Now sends the updated pending activity status after importing scripts.
+ (WebCore::DedicatedWorkerContext::thread):
+ Helper routine that casts WorkerThread to DedicatedWorkerThread.
+ * workers/DedicatedWorkerContext.h:
+ (WebCore::DedicatedWorkerContext::create):
+ * workers/DedicatedWorkerThread.cpp: Added.
+ (WebCore::DedicatedWorkerThread::create):
+ (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
+ (WebCore::DedicatedWorkerThread::~DedicatedWorkerThread):
+ (WebCore::DedicatedWorkerThread::createWorkerContext):
+ Implementation of the base class factory method to create the appropriate worker context.
+ (WebCore::DedicatedWorkerThread::runEventLoop):
+ Reports pending activity before running the event loop.
+ * workers/DedicatedWorkerThread.h: Added.
+ (WebCore::DedicatedWorkerThread::workerObjectProxy):
+ Moved from base class.
+ * workers/WorkerContext.cpp:
+ * workers/WorkerContext.h:
+ * workers/WorkerMessagingProxy.cpp:
+ (WebCore::WorkerMessagingProxy::startWorkerContext):
+ Now creates DedicatedWorkerThread.
+ (WebCore::WorkerMessagingProxy::workerThreadCreated):
+ Now is passed a DedicatedWorkerThread.
+ * workers/WorkerMessagingProxy.h:
+ * workers/WorkerThread.cpp:
+ (WebCore::WorkerThread::WorkerThread):
+ Moved workerObjectProxy param into derived class constructor.
+ (WebCore::WorkerThread::workerThread):
+ (WebCore::WorkerThread::runEventLoop):
+ Moved the event loop execution into a virtual function so DedicatedWorkerThread could report pending activity first.
+ * workers/WorkerThread.h:
+ (WebCore::WorkerThread::workerContext):
+
+2009-07-28 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Fix V8NPUtils' handling of UTF8 identifiers.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27782
+
+ * bindings/v8/V8NPUtils.cpp:
+ (getStringIdentifier): Treat the input string as UTF8 instead of ASCII,
+ since NPN_GetStringIdentifier() is expecting UTF8.
+
+2009-07-28 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Misc cleanup in DOM Storage.
+ https://bugs.webkit.org/show_bug.cgi?id=27517
+
+ The StorageAreaImpl changes are all for Chromium. Because the DOM Storage implementation
+ runs in a different process from where the Frame object lives, Chromium passes in NULL
+ for the sourceFrame. This affects events and handling privateBrowsing. Chromium's
+ incognito mode does not use the private browsing setting, so that's not a concern. As for
+ events, I've decided to simply disable them for now.
+
+ The StorageNamespaceImpl changes get rid of a stale comment (path is .copy'ed for thread-
+ safety) and to add an assert that .copy is only ever called on a SessionStorage namespace.
+
+ Also cleaned up tailing whitespace in several parts of StorageAreaImpl.cpp
+
+ * storage/StorageArea.cpp: Removed. (It was empty anyway.)
+ * storage/StorageAreaImpl.cpp:
+ (WebCore::privateBrowsingEnabled): Factored out the check.
+ (WebCore::StorageAreaImpl::setItem): Make frame optional.
+ (WebCore::StorageAreaImpl::removeItem): ditto
+ (WebCore::StorageAreaImpl::clear): ditto
+ (WebCore::StorageAreaImpl::dispatchStorageEvent): Disable in Chromium for now.
+ * storage/StorageNamespaceImpl.cpp:
+ (WebCore::StorageNamespaceImpl::StorageNamespaceImpl): Remove stale comment.
+ (WebCore::StorageNamespaceImpl::copy): Add assert that it's SessionStorage.
+
+2009-07-28 Alpha Lam <hclam@google.com>
+
+ Reviewed by David Levin.
+
+ [chromium] Default UI controls for <video> has rendering problems
+ https://bugs.webkit.org/show_bug.cgi?id=27669
+
+ Fixes the bug that <video> in MediaDocument is 1 pixel tall if
+ it is playing an audio file by changing the style to be 32px
+ tall.
+
+ Also fixes a problem of default styled audio tag that hides the
+ all the time digits by expanding the width to 300px.
+
+ Changed the size and position of the current time and remaining
+ display to give enough space for the hour digit to be shown.
+
+ There are no new tests provided because this is already covered
+ by existing tests.
+
+ * css/mediaControlsChromium.css:
+
+2009-07-28 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Fix style in PluginPackage and PluginDatabase.
+ Part of https://bugs.webkit.org/show_bug.cgi?id=27651
+
+ * plugins/PluginDatabase.cpp:
+ (WebCore::PluginDatabase::refresh):
+ (WebCore::PluginDatabase::findPlugin):
+ * plugins/PluginDatabase.h:
+ * plugins/PluginPackage.cpp:
+ (WebCore::PluginPackage::~PluginPackage):
+ (WebCore::PluginPackage::freeLibrarySoon):
+ (WebCore::PluginPackage::freeLibraryTimerFired):
+ (WebCore::PluginPackage::unloadWithoutShutdown):
+ (WebCore::PluginPackage::initializeBrowserFuncs):
+ * plugins/PluginPackage.h:
+
+2009-07-28 Anantanarayanan Iyengar <ananta@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27769
+ The V8 bindings function V8Proxy::createNewContext can be
+ called during frame shutdown where the activeDocumentLoader
+ function in FrameLoader can return NULL. Added a check for the
+ same.
+
+ No new tests added as this is an edge case where the V8
+ bindings code is reentered via NPAPI during shutdown. It is
+ difficult to write a consistently reproducible test for this.
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::createNewContext):
+
+2009-07-28 Ivan Posva <iposva@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Associate the CanvasPixelData backing store with the
+ indexed properties of the wrapper object.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27773
+
+ No new tests: Relying on existing Canvas tests.
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ (WebCore::V8DOMWrapper::convertToV8Object):
+
+2009-07-28 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Nuke all references to JSWorkerContextBase.lut.h, it was removed
+ back in April.
+
+ * GNUmakefile.am:
+
+2009-07-28 Robert Agoston <Agoston.Robert@stud.u-szeged.hu>
+
+ Reviewed by Simon Hausmann.
+
+ Fixed references to script generate-webkitversion.pl, and
+ removed duplicated generate-webkitversion.pl
+
+ https://bugs.webkit.org/show_bug.cgi?id=27158
+
+ * WebCore.pro:
+ * platform/generate-webkitversion.pl: Removed.
+
+2009-07-28 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Dmitry Glazkov.
+
+ Web Inspector: encapsulate ScriptState into the ScriptObject, get rid of
+ InspectorJSONObject.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27766
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * bindings/js/ScriptArray.cpp:
+ (WebCore::ScriptArray::ScriptArray):
+ (WebCore::ScriptArray::set):
+ (WebCore::ScriptArray::length):
+ (WebCore::ScriptArray::createNew):
+ * bindings/js/ScriptArray.h:
+ * bindings/js/ScriptFunctionCall.cpp:
+ (WebCore::ScriptFunctionCall::construct):
+ * bindings/js/ScriptObject.cpp:
+ (WebCore::ScriptObject::ScriptObject):
+ (WebCore::ScriptObject::set):
+ (WebCore::ScriptObject::createNew):
+ (WebCore::ScriptGlobalObject::get):
+ * bindings/js/ScriptObject.h:
+ * bindings/js/ScriptObjectQuarantine.cpp:
+ (WebCore::getQuarantinedScriptObject):
+ * bindings/v8/ScriptArray.cpp:
+ (WebCore::ScriptArray::ScriptArray):
+ (WebCore::ScriptArray::set):
+ (WebCore::ScriptArray::length):
+ (WebCore::ScriptArray::createNew):
+ * bindings/v8/ScriptArray.h:
+ * bindings/v8/ScriptFunctionCall.cpp:
+ (WebCore::ScriptFunctionCall::construct):
+ * bindings/v8/ScriptObject.cpp:
+ (WebCore::ScriptObject::ScriptObject):
+ (WebCore::ScriptObject::set):
+ (WebCore::ScriptObject::createNew):
+ (WebCore::ScriptGlobalObject::get):
+ * bindings/v8/ScriptObject.h:
+ (WebCore::ScriptObject::ScriptObject):
+ * bindings/v8/ScriptObjectQuarantine.cpp:
+ (WebCore::getQuarantinedScriptObject):
+ * inspector/ConsoleMessage.cpp:
+ (WebCore::ConsoleMessage::addToConsole):
+ * inspector/InspectorDOMStorageResource.cpp:
+ (WebCore::InspectorDOMStorageResource::bind):
+ * inspector/InspectorDatabaseResource.cpp:
+ (WebCore::InspectorDatabaseResource::bind):
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::newScriptArray):
+ (WebCore::InspectorFrontend::newScriptObject):
+ (WebCore::InspectorFrontend::addMessageToConsole):
+ (WebCore::InspectorFrontend::addResource):
+ (WebCore::InspectorFrontend::updateResource):
+ (WebCore::InspectorFrontend::addDatabase):
+ (WebCore::InspectorFrontend::addDOMStorage):
+ * inspector/InspectorFrontend.h:
+ * inspector/InspectorJSONObject.cpp: Removed.
+ * inspector/InspectorJSONObject.h: Removed.
+ * inspector/InspectorResource.cpp:
+ (WebCore::populateHeadersObject):
+ (WebCore::InspectorResource::createScriptObject):
+ (WebCore::InspectorResource::updateScriptObject):
+
+2009-07-28 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] Variable substitution recursion seems to have bugs
+ https://bugs.webkit.org/show_bug.cgi?id=27726
+
+ Allow <setvar> elements to depend on the value specified by preceeding <setvar> elements.
+ Required by the specification - assure it only works in linear order. A setvar element may
+ not depend on the variable state of a following setvar element, only the previous ones.
+
+ Extend wml/variable-reference-valid.html layout test to cover these cases.
+
+ * wml/WMLTaskElement.cpp:
+ (WebCore::WMLTaskElement::storeVariableState):
+
+2009-07-28 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] Page title doesn't update after variable substitution, if it contained variables
+ https://bugs.webkit.org/show_bug.cgi?id=27725
+
+ Fix bug in containsVariableReference() function, we we're decreasing the nameEndPosition
+ too much, leading to a bug with 1-char variable names, which were not detected properly.
+
+ Extend wml/variable-reference-valid.html layout test to cover 1-char variable names.
+ Also fixes manual-tests/wml/task-refresh-in-anchor.wml, which happened to use 1-char variable names.
+
+ * wml/WMLVariables.cpp:
+ (WebCore::containsVariableReference):
+
+2009-07-28 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by Simon Hausmann.
+
+ Add WebKit version API to Qt.
+
+ Get the current version of WebKit from WebKit/mac/Configurations/Version.xcconfig
+ at compile time and make it available to webkit ports through WebKitVersion.h.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27158
+
+ * WebCore.pro: Call generate-webkitversion.pl
+
+2009-07-28 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed make dist build fix.
+
+ * GNUmakefile.am:
+
+2009-07-28 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ Replace hardcoded separator text with proper separator.
+ Also adjusts include order as per style guidelines.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27763
+
+ * platform/qt/PopupMenuQt.cpp:
+ (WebCore::PopupMenu::populate):
+
+2009-07-28 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Steve Falkenburg.
+
+ Add output directory for VS pre-build steps to enable out-of-tree builds
+
+ https://bugs.webkit.org/show_bug.cgi?id=27700
+
+ The tmp.obj file is now placed in the intermediate build directory.
+
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+
+2009-07-28 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Add inspected node using public console API.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27758
+
+ * inspector/front-end/Console.js:
+ (WebInspector.Console.prototype.addInspectedNode):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
+ (WebInspector.ElementsPanel):
+
+2009-07-28 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] <do> elements with a <noop> task shouldn't be exposed to the user
+ https://bugs.webkit.org/show_bug.cgi?id=27724
+
+ Fix WMLNoopElement to disable it's parent WMLDoElement, as required by the spec.
+ Moved manual-tests/wml/task-noop-in-do.wml to LayoutTests/fast/wml/task-noop-in-do.wml.
+
+ * manual-tests/wml/task-noop-in-do.wml: Removed.
+ * wml/WMLNoopElement.cpp:
+ (WebCore::WMLNoopElement::insertedIntoDocument):
+
+2009-07-28 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Disable some compiler warnings for the win build
+ https://bugs.webkit.org/show_bug.cgi?id=27709
+
+ * WebCore.pro: Move the msvc options to WebKit.pri
+
+2009-07-28 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Tor Arne Vestbø
+
+ Make equality checks for logging channel names ignore casing.
+
+ * platform/Logging.cpp:
+ (WebCore::getChannelFromName):
+
+2009-07-28 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Xan Lopez.
+
+ [Gtk] Refactor ResourceHandleSoup - make start* functions static
+ https://bugs.webkit.org/show_bug.cgi?id=27687
+
+ * platform/network/ResourceHandle.h:
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::startData):
+ (WebCore::startHttp):
+ (WebCore::):
+
+2009-07-28 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25415
+ [GTK][ATK] Please implement support for get_text_at_offset
+
+ Do not cache the pango layout in the object, since the layout of
+ the page can change between calls.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+
+2009-07-23 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Simplify management of Nodes in weak handles callbacks.
+ https://bugs.webkit.org/show_bug.cgi?id=27628
+
+ * bindings/v8/V8DOMMap.cpp:
+ (WebCore::weakNodeCallback):
+
+2009-07-28 Brian Weinstein <bweinstein@apple.com>
+
+ Rubber-stamped by David Levin.
+
+ Fix error handling of GetIconInfo (returns a bool).
+
+ * platform/win/DragImageWin.cpp:
+ (WebCore::createDragImageIconForCachedImage):
+
+2009-07-27 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Fix of <rdar://5015949> Drag Icon is not produced for over sized images.
+
+ Implemented the createDragImageIconForCachedImage function by using the Windows
+ SHFILEINFO structure.
+
+ * platform/win/DragImageWin.cpp:
+ (WebCore::createDragImageIconForCachedImage):
+
+2009-07-25 Adam Barth <abarth@webkit.org>
+
+ Reviewed by David Levin.
+
+ [V8] Split up V8DOMMap.cpp by class
+ https://bugs.webkit.org/show_bug.cgi?id=27685
+
+ No behavior change. Just copy-and-paste.
+
+ * WebCore.gypi:
+ * bindings/v8/ChildThreadDOMData.cpp: Added.
+ (WebCore::ChildThreadDOMData::ChildThreadDOMData):
+ (WebCore::ChildThreadDOMData::getStore):
+ * bindings/v8/ChildThreadDOMData.h: Added.
+ * bindings/v8/DOMData.cpp: Added.
+ (WebCore::DOMData::DOMData):
+ (WebCore::DOMData::getCurrent):
+ (WebCore::DOMData::getCurrentMainThread):
+ (WebCore::DOMData::handleWeakObject):
+ (WebCore::DOMData::ensureDeref):
+ (WebCore::DOMData::derefObject):
+ (WebCore::DOMData::derefDelayedObjects):
+ (WebCore::DOMData::derefDelayedObjectsInCurrentThread):
+ (WebCore::DOMData::removeObjectsFromWrapperMap):
+ * bindings/v8/DOMData.h: Added.
+ (WebCore::):
+ * bindings/v8/DOMDataStore.cpp: Added.
+ (WebCore::DOMDataStore::DOMDataStore):
+ (WebCore::DOMDataStore::~DOMDataStore):
+ (WebCore::DOMDataStore::allStores):
+ (WebCore::DOMDataStore::allStoresMutex):
+ (WebCore::DOMDataStore::getDOMWrapperMap):
+ (WebCore::forget):
+ (WebCore::DOMDataStore::weakDOMObjectCallback):
+ (WebCore::DOMDataStore::weakActiveDOMObjectCallback):
+ (WebCore::DOMDataStore::weakNodeCallback):
+ (WebCore::DOMDataStore::weakSVGElementInstanceCallback):
+ (WebCore::DOMDataStore::weakSVGObjectWithContextCallback):
+ * bindings/v8/DOMDataStore.h: Added.
+ (WebCore::DOMDataStore::):
+ (WebCore::DOMDataStore::InternalDOMWrapperMap::InternalDOMWrapperMap):
+ (WebCore::DOMDataStore::InternalDOMWrapperMap::forgetOnly):
+ (WebCore::DOMDataStore::domData):
+ (WebCore::DOMDataStore::domNodeMap):
+ (WebCore::DOMDataStore::domObjectMap):
+ (WebCore::DOMDataStore::activeDomObjectMap):
+ (WebCore::DOMDataStore::domSvgElementInstanceMap):
+ (WebCore::DOMDataStore::domSvgObjectWithContextMap):
+ * bindings/v8/MainThreadDOMData.cpp: Added.
+ (WebCore::MainThreadDOMData::MainThreadDOMData):
+ (WebCore::MainThreadDOMData::getStore):
+ * bindings/v8/MainThreadDOMData.h: Added.
+ * bindings/v8/ScopedDOMDataStore.cpp: Added.
+ (WebCore::ScopedDOMDataStore::ScopedDOMDataStore):
+ (WebCore::ScopedDOMDataStore::~ScopedDOMDataStore):
+ * bindings/v8/ScopedDOMDataStore.h: Added.
+ * bindings/v8/StaticDOMDataStore.cpp: Added.
+ (WebCore::StaticDOMDataStore::StaticDOMDataStore):
+ * bindings/v8/StaticDOMDataStore.h: Added.
+ * bindings/v8/V8DOMMap.cpp:
+
+2009-07-27 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7091036> REGRESSION: Microsoft Messenger crashes during file send/receive due to use of WebKit on non-main thread
+
+ Add a method for detecting if we're being used within Microsoft Messenger.
+
+ * WebCore.base.exp: Export applicationIsMicrosoftMessenger and sort existing entries.
+ * platform/mac/RuntimeApplicationChecks.h:
+ * platform/mac/RuntimeApplicationChecks.mm:
+ (WebCore::applicationIsMicrosoftMessenger):
+
+2009-07-27 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ [V8] Implement EventListener::reportError for V8 event listeners in worker context.
+ https://bugs.webkit.org/show_bug.cgi?id=27731
+
+ * bindings/v8/V8WorkerContextEventListener.cpp:
+ (WebCore::V8WorkerContextEventListener::reportError):
+ * bindings/v8/V8WorkerContextEventListener.h:
+
+2009-07-27 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by Eric Seidel and David Levin.
+
+ Re-apply chromium/skia border fix (originally landed in r46157,
+ reverted in r46363), since it was not the cause of the reliability
+ failures in Chromium.
+
+ http://bugs.webkit.org/show_bug.cgi?id=27388
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::drawLine):
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::setupPaintForStroking):
+
+2009-07-27 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Justin Garcia.
+
+ createMarkup does not handle CSS properly
+ https://bugs.webkit.org/show_bug.cgi?id=27660
+
+ This patch isolates code that creates markup for styles in addStyleMarkup
+ It also makes all presentational elements (u, s, strike, i, em, b, strong) special ancestor in createMarkup
+ so that we can assume no text decoration style is passed to addStyleMarkup.
+
+ * editing/markup.cpp:
+ (WebCore::propertyMissingOrEqualToNone): Changed the first argument from CSSMutableStyleDecleration to CSSStyleDeclaration
+ (WebCore::isElementPresentational): Used to be elementHasTextDecorationProperty, now supports presentational tags
+ (WebCore::addStyleMarkup): Adds markup for style span and div
+ (WebCore::createMarkup): Uses isElementPresentational and addStyleMarkup
+
+2009-07-27 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ fix more obvious global object lookups
+ https://bugs.webkit.org/show_bug.cgi?id=27745
+
+ No new tests for these changes. I believe in many cases
+ testing to be impossible. Lack of testing justification next to
+ each change below. The remaining pieces of bug 27634 will all
+ need tests.
+
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::JSDOMWindowBase::updateDocument): not testable.
+ * bindings/js/JSDataGridColumnListCustom.cpp:
+ (WebCore::JSDataGridColumnList::nameGetter): no testing for this incomplete feature.
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::JSEventListener::handleEvent): would require outer frame to trigger an event in the inner frame
+ * bindings/js/JSEventTarget.cpp:
+ (WebCore::toJS): covered by other tests, always correct to pass the globalObject through.
+ * bindings/js/JSHTMLElementCustom.cpp:
+ (WebCore::JSHTMLElement::pushEventHandlerScope): unclear when this could be triggered.
+ * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
+ (WebCore::JSHTMLOptionsCollection::remove): toJS seems superfluous here to begin with.
+ * bindings/js/JSLazyEventListener.cpp:
+ (WebCore::JSLazyEventListener::parseCode): would require outer frame to trigger inner frame event.
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::jsObjectForPluginElement): only used for NPAPI binding, unclear how to test.
+ * bindings/js/ScriptEventListener.cpp:
+ (WebCore::createAttributeEventListener): unclear how to test.
+ * bindings/js/ScriptObject.cpp:
+ (WebCore::ScriptGlobalObject::set): unclear how to test/inspector only.
+ * bindings/js/ScriptObjectQuarantine.cpp:
+ (WebCore::getQuarantinedScriptObject): unclear how to test.
+ * bindings/objc/DOMInternal.mm:
+ (-[WebScriptObject _initializeScriptDOMNodeImp]): unclear how to test.
+
+2009-07-27 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] 'title' attribute handling not correct for <a> / <anchor> elements
+ https://bugs.webkit.org/show_bug.cgi?id=27720
+
+ Unify title() implementation in WMLElement instead of several copies of the same logic.
+ We forgot WMLAnchorElement/WMLAElement, that lead to bugs. Fixes hovering links in the
+ WML manual-test suite.
+
+ * wml/WMLCardElement.cpp:
+ * wml/WMLCardElement.h:
+ * wml/WMLElement.cpp:
+ (WebCore::WMLElement::title):
+ * wml/WMLElement.h:
+ * wml/WMLOptGroupElement.cpp:
+ * wml/WMLOptGroupElement.h:
+ * wml/WMLSelectElement.cpp:
+ * wml/WMLSelectElement.h:
+
+2009-07-27 Adam Treat <adam.treat@torchmobile.com>
+
+ Speculative build fix for Windows and WinCE.
+
+ * plugins/win/PluginPackageWin.cpp:
+ (WebCore::PluginPackage::load):
+
+2009-07-27 Ojan Vafai <ojan@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27474
+ Fixes crashes due to renderer getting destroyed in updateLayout.
+ We need to call updateLayout before we call into the renderer.
+ Removed the updateLayout call from RenderTextControl and moved it
+ into the calling sites.
+
+ Also changes updateLayout to updateLayoutIgnorePendingStylesheets so
+ this works with pending stylesheets. Unfortunately, this seems to be
+ untestable. Loading an external stylesheet and then having an inline
+ script hit this code did not result in an pending stylesheets.
+
+ The are other cases of this bug in the rendering code. I'll file a
+ followup bug to audit the calls to updateLayout.
+
+ Test: fast/dom/text-control-crash-on-select.html
+
+ * dom/Document.h:
+ (WebCore::Document::inStyleRecalc): Added so the ASSERTs in updateFocusAppearance
+ and setSelectionRange could deal with cases of reentrancy into updateLayout
+ calls. This happens in a couple layout tests.
+ * dom/InputElement.cpp:
+ (WebCore::InputElement::updateSelectionRange):
+ * html/HTMLInputElement.cpp:
+ (WebCore::isTextFieldWithRendererAfterUpdateLayout):
+ (WebCore::HTMLInputElement::setSelectionStart):
+ (WebCore::HTMLInputElement::setSelectionEnd):
+ (WebCore::HTMLInputElement::select):
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::rendererAfterUpdateLayout):
+ (WebCore::HTMLTextAreaElement::setSelectionStart):
+ (WebCore::HTMLTextAreaElement::setSelectionEnd):
+ (WebCore::HTMLTextAreaElement::select):
+ (WebCore::HTMLTextAreaElement::setSelectionRange):
+ (WebCore::HTMLTextAreaElement::updateFocusAppearance):
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::setSelectionRange):
+
+2009-07-27 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Dave Levin.
+
+ [V8] Remove parameterless frame/window retrieval methods from V8Proxy.
+ https://bugs.webkit.org/show_bug.cgi?id=27737
+
+ Refactoring, no new behavior, covered by existing tests.
+
+ * bindings/v8/ScriptCallStack.cpp:
+ (WebCore::ScriptCallStack::ScriptCallStack):
+ * bindings/v8/V8NPUtils.cpp:
+ (convertV8ObjectToNPVariant): Ditto.
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::retrieve): Ditto.
+ (WebCore::V8Proxy::canAccessPrivate): Ditto.
+ * bindings/v8/V8Proxy.h: Removed parameterless retrieveWindow/retrieveProxy decls.
+ * bindings/v8/custom/V8DatabaseCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL): Changed to use V8Proxy::retrieveFrameForCurrentContext().
+ * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL): Ditto.
+ * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL): Ditto.
+ * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL): Ditto.
+ * bindings/v8/custom/V8MessageChannelConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL): Ditto.
+ * bindings/v8/custom/V8SQLTransactionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL): Ditto.
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL): Ditto.
+ * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL): Ditto.
+
+2009-07-27 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] 'onpick' intrinsic event handling missing
+ https://bugs.webkit.org/show_bug.cgi?id=27723
+
+ Trigger 'onpick' intrinsic events from WMLOptionElement::setSelectedState().
+ All was in place, just forgot to enable the relevant code.
+
+ Fixes manual-tests/wml/select-onpick-event.wml
+ Test: wml/option-element-onpick.html
+
+ * wml/WMLOptionElement.cpp:
+ (WebCore::WMLOptionElement::setSelectedState):
+
+2009-07-27 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27735
+ Give a helpful name to JSLock constructor argument
+
+ * bindings/js/GCController.cpp:
+ (WebCore::collect):
+ (WebCore::GCController::gcTimerFired):
+ (WebCore::GCController::garbageCollectNow):
+ * bindings/js/JSCustomPositionCallback.cpp:
+ (WebCore::JSCustomPositionCallback::handleEvent):
+ * bindings/js/JSCustomPositionErrorCallback.cpp:
+ (WebCore::JSCustomPositionErrorCallback::handleEvent):
+ * bindings/js/JSCustomSQLStatementCallback.cpp:
+ (WebCore::JSCustomSQLStatementCallback::handleEvent):
+ * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
+ (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
+ * bindings/js/JSCustomSQLTransactionCallback.cpp:
+ (WebCore::JSCustomSQLTransactionCallback::handleEvent):
+ * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
+ (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
+ * bindings/js/JSCustomVoidCallback.cpp:
+ (WebCore::JSCustomVoidCallback::handleEvent):
+ * bindings/js/JSCustomXPathNSResolver.cpp:
+ (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
+ * bindings/js/JSEventCustom.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::JSEventListener::handleEvent):
+ * bindings/js/JSInspectorBackendCustom.cpp:
+ (WebCore::JSInspectorBackend::currentCallFrame):
+ (WebCore::JSInspectorBackend::profiles):
+ * bindings/js/JSNodeFilterCondition.cpp:
+ (WebCore::JSNodeFilterCondition::acceptNode):
+ * bindings/js/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::executeFunctionInContext):
+ * bindings/js/ScriptArray.cpp:
+ (WebCore::ScriptArray::set):
+ (WebCore::ScriptArray::createNew):
+ * bindings/js/ScriptCachedFrameData.cpp:
+ (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
+ (WebCore::ScriptCachedFrameData::restore):
+ (WebCore::ScriptCachedFrameData::clear):
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate):
+ (WebCore::ScriptController::clearWindowShell):
+ (WebCore::ScriptController::initScript):
+ (WebCore::ScriptController::updateDocument):
+ (WebCore::ScriptController::bindingRootObject):
+ (WebCore::ScriptController::windowScriptNPObject):
+ (WebCore::ScriptController::jsObjectForPluginElement):
+ (WebCore::ScriptController::clearScriptObjects):
+ * bindings/js/ScriptControllerMac.mm:
+ (WebCore::ScriptController::windowScriptObject):
+ * bindings/js/ScriptEventListener.cpp:
+ (WebCore::createAttributeEventListener):
+ * bindings/js/ScriptFunctionCall.cpp:
+ (WebCore::ScriptFunctionCall::appendArgument):
+ (WebCore::ScriptFunctionCall::call):
+ (WebCore::ScriptFunctionCall::construct):
+ * bindings/js/ScriptObject.cpp:
+ (WebCore::ScriptObject::set):
+ (WebCore::ScriptObject::createNew):
+ (WebCore::ScriptGlobalObject::set):
+ (WebCore::ScriptGlobalObject::get):
+ (WebCore::ScriptGlobalObject::remove):
+ * bindings/js/ScriptObjectQuarantine.cpp:
+ (WebCore::quarantineValue):
+ (WebCore::getQuarantinedScriptObject):
+ * bindings/js/ScriptValue.cpp:
+ (WebCore::ScriptValue::getString):
+ * bindings/js/WorkerScriptController.cpp:
+ (WebCore::WorkerScriptController::initScript):
+ (WebCore::WorkerScriptController::evaluate):
+ * bindings/objc/WebScriptObject.mm:
+ (-[WebScriptObject callWebScriptMethod:withArguments:]):
+ (-[WebScriptObject evaluateWebScript:]):
+ (-[WebScriptObject setValue:forKey:]):
+ (-[WebScriptObject valueForKey:]):
+ (-[WebScriptObject removeWebScriptKey:]):
+ (-[WebScriptObject stringRepresentation]):
+ (-[WebScriptObject webScriptValueAtIndex:]):
+ (-[WebScriptObject setWebScriptValueAtIndex:value:]):
+ (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
+ * bridge/NP_jsobject.cpp:
+ (_NPN_InvokeDefault):
+ (_NPN_Invoke):
+ (_NPN_Evaluate):
+ (_NPN_GetProperty):
+ (_NPN_SetProperty):
+ (_NPN_RemoveProperty):
+ (_NPN_HasProperty):
+ (_NPN_HasMethod):
+ (_NPN_Enumerate):
+ (_NPN_Construct):
+ * bridge/c/c_class.cpp:
+ (JSC::Bindings::CClass::~CClass):
+ (JSC::Bindings::CClass::methodsNamed):
+ (JSC::Bindings::CClass::fieldNamed):
+ * bridge/c/c_instance.cpp:
+ (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
+ (JSC::Bindings::CInstance::invokeMethod):
+ (JSC::Bindings::CInstance::invokeDefaultMethod):
+ (JSC::Bindings::CInstance::invokeConstruct):
+ (JSC::Bindings::CInstance::getPropertyNames):
+ * bridge/c/c_runtime.cpp:
+ (JSC::Bindings::CField::valueFromInstance):
+ (JSC::Bindings::CField::setValueToInstance):
+ * bridge/c/c_utility.cpp:
+ (JSC::Bindings::convertValueToNPVariant):
+ (JSC::Bindings::convertNPVariantToValue):
+ * bridge/jni/jni_class.cpp:
+ (JavaClass::JavaClass):
+ (JavaClass::~JavaClass):
+ * bridge/jni/jni_instance.cpp:
+ (JavaInstance::stringValue):
+ * bridge/jni/jni_jsobject.mm:
+ (JavaJSObject::call):
+ (JavaJSObject::eval):
+ (JavaJSObject::getMember):
+ (JavaJSObject::setMember):
+ (JavaJSObject::removeMember):
+ (JavaJSObject::getSlot):
+ (JavaJSObject::setSlot):
+ (JavaJSObject::toString):
+ (JavaJSObject::convertValueToJObject):
+ (JavaJSObject::convertJObjectToValue):
+ * bridge/jni/jni_objc.mm:
+ (JSC::Bindings::dispatchJNICall):
+ * bridge/jni/jni_runtime.cpp:
+ (JavaMethod::signature):
+ * bridge/jni/jni_runtime.h:
+ (JSC::Bindings::JavaString::JavaString):
+ (JSC::Bindings::JavaString::_commonInit):
+ (JSC::Bindings::JavaString::~JavaString):
+ (JSC::Bindings::JavaString::UTF8String):
+ * bridge/jni/jni_utility.cpp:
+ (JSC::Bindings::convertValueToJValue):
+ * bridge/objc/objc_instance.mm:
+ (ObjcInstance::moveGlobalExceptionToExecState):
+ (ObjcInstance::invokeMethod):
+ (ObjcInstance::invokeDefaultMethod):
+ (ObjcInstance::setValueOfUndefinedField):
+ (ObjcInstance::getValueOfUndefinedField):
+ * bridge/objc/objc_runtime.mm:
+ (JSC::Bindings::ObjcField::valueFromInstance):
+ (JSC::Bindings::ObjcField::setValueToInstance):
+ * bridge/objc/objc_utility.mm:
+ (JSC::Bindings::convertValueToObjcValue):
+ (JSC::Bindings::convertNSStringToString):
+ (JSC::Bindings::convertObjcValueToValue):
+ * bridge/qt/qt_instance.cpp:
+ (JSC::Bindings::QtRuntimeObjectImp::removeFromCache):
+ (JSC::Bindings::QtInstance::~QtInstance):
+ (JSC::Bindings::QtInstance::getQtInstance):
+ (JSC::Bindings::QtInstance::createRuntimeObject):
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::convertValueToQVariant):
+ (JSC::Bindings::convertQVariantToValue):
+ (JSC::Bindings::QtRuntimeMetaMethod::call):
+ (JSC::Bindings::QtRuntimeConnectionMethod::call):
+ (JSC::Bindings::QtConnectionObject::execute):
+ * bridge/runtime.cpp:
+ (JSC::Bindings::Instance::createRuntimeObject):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::addScriptProfile):
+ * inspector/JavaScriptCallFrame.cpp:
+ (WebCore::JavaScriptCallFrame::evaluate):
+ * inspector/JavaScriptDebugServer.cpp:
+ (WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
+ * inspector/JavaScriptProfileNode.cpp:
+ (WebCore::getTotalTime):
+ (WebCore::getSelfTime):
+ (WebCore::getTotalPercent):
+ (WebCore::getSelfPercent):
+ (WebCore::getNumberOfCalls):
+ (WebCore::getChildren):
+ (WebCore::getParent):
+ (WebCore::getHead):
+ (WebCore::getVisible):
+ (WebCore::getCallUID):
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::start):
+ (WebCore::getString):
+ (WebCore::PluginView::performRequest):
+ (WebCore::PluginView::bindingInstance):
+ * plugins/gtk/PluginViewGtk.cpp:
+ (WebCore::PluginView::dispatchNPEvent):
+ (WebCore::PluginView::handleKeyboardEvent):
+ (WebCore::PluginView::handleMouseEvent):
+ (WebCore::PluginView::setNPWindowIfNeeded):
+ (WebCore::PluginView::stop):
+ (WebCore::PluginView::init):
+ * plugins/mac/PluginViewMac.cpp:
+ (WebCore::PluginView::stop):
+ (WebCore::PluginView::setNPWindowIfNeeded):
+ (WebCore::PluginView::dispatchNPEvent):
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::setNPWindowIfNeeded):
+ (WebCore::PluginView::stop):
+ (WebCore::PluginView::init):
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::dispatchNPEvent):
+ (WebCore::PluginView::handleKeyboardEvent):
+ (WebCore::PluginView::handleMouseEvent):
+ (WebCore::PluginView::setNPWindowRect):
+ (WebCore::PluginView::stop):
+
+2009-07-27 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ WINCE PORT: Make plugin work for WINCE
+ https://bugs.webkit.org/show_bug.cgi?id=27713
+
+ * plugins/win/PluginDatabaseWin.cpp:
+ (SHGetValue):
+ (PathRemoveFileSpec):
+ (WebCore::addWindowsMediaPlayerPluginDirectory):
+ (WebCore::addMacromediaPluginDirectories):
+ * plugins/win/PluginPackageWin.cpp:
+ (WebCore::PluginPackage::load):
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::registerPluginView):
+ (WebCore::PluginView::wndProc):
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::paintWindowedPluginIntoContext):
+ (WebCore::PluginView::paint):
+ (WebCore::PluginView::handleMouseEvent):
+ (WebCore::PluginView::setParent):
+ (WebCore::PluginView::setNPWindowRect):
+ (WebCore::PluginView::stop):
+ (WebCore::PluginView::init):
+
+2009-07-27 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Inspector: Tab Through Element Attributes and CSS Properties When Editing
+
+ https://bugs.webkit.org/show_bug.cgi?id=27673
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement):
+ (WebInspector.ElementsTreeElement.prototype._startEditing): refactored parameter
+ (WebInspector.ElementsTreeElement.prototype._addNewAttribute): refactored to remove excess
+ (WebInspector.ElementsTreeElement.prototype._triggerEditAttribute): provide an attribute name and this will start editing it
+ (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted.moveToNextAttributeIfNeeded): move between attributes
+ (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertiesSection.prototype.onpopulate):
+ (WebInspector.StylePropertiesSection.prototype.findTreeElementWithName): search through treeElements for a style property name
+ (WebInspector.StylePropertiesSection.prototype.addNewBlankProperty): initialize a blank property for adding new properties
+ (WebInspector.StylePropertyTreeElement.prototype.updateTitle): add references to the name and value elements
+ (WebInspector.StylePropertyTreeElement.prototype.):
+ (WebInspector.StylePropertyTreeElement.prototype):
+ * inspector/front-end/inspector.js:
+ (WebInspector.startEditing.editingCommitted): include the move direction as a parameter to the commit callback
+ (WebInspector.startEditing.element.handleKeyEvent): handle the tab key to specify the move direction
+ (WebInspector.startEditing):
+
+2009-07-27 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ Add mapping FontWeight to QFont::Weight values as requested via FIXME.
+ https://bugs.webkit.org/show_bug.cgi?id=27663
+
+ * platform/graphics/qt/FontCacheQt.cpp:
+ (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
+ * platform/graphics/qt/FontPlatformData.h:
+ (WebCore::FontPlatformData::toQFontWeight):
+ * platform/graphics/qt/FontPlatformDataQt.cpp:
+ (WebCore::FontPlatformData::FontPlatformData):
+
+2009-07-27 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Adam Treat.
+
+ When clearing the plugin database, clear also the timestamp map.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27651
+
+ Currently, if we clear the database, it will still think that it is up
+ to date with the plugin directories so refreshing the database again
+ after changing the search paths may not work.
+
+ * plugins/PluginDatabase.cpp:
+ (WebCore::PluginDatabase::clear):
+
+2009-07-27 Albert J. Wong <ajwong@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add in trivial implementation of FontPlatformData::description() for
+ linux to fix build bustage in chromium.
+
+ Fix chromium linux build by adding missing function implementation.
+ https://bugs.webkit.org/show_bug.cgi?id=27732
+
+ Tested with a build of chromium on linux.
+
+ * platform/graphics/chromium/FontPlatformDataLinux.cpp:
+ (WebCore::FontPlatformData::description):
+ * platform/graphics/chromium/FontPlatformDataLinux.h:
+
+2009-07-27 Brent Fulgham <bfulgham@webkit.org>
+
+ Build correct, no review.
+
+ Final correction for WinCairo builds.
+ CoreServices only exists in Apple builds, but
+ some of its internal includes (e.g., <windows.h>) are needed
+ for other Windows targets.
+
+ * WebCorePrefix.h: When building for WinCairo, make sure
+ to include <windows.h>, <stdio.h>, and <ConditionalMacros.h>
+
+2009-07-27 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25552
+ Added new "pattern" attribute to HTMLInputElement and validation code
+ (validity.patternMismatch) as per HTML5 specs.
+ http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#attr-input-pattern
+
+ Tests: fast/forms/ValidityState-002.html
+ fast/forms/ValidityState-patternMismatch-001.html
+ fast/forms/ValidityState-patternMismatch-002.html
+ fast/forms/ValidityState-patternMismatch-003.html
+ fast/forms/ValidityState-patternMismatch-004.html
+ fast/forms/ValidityState-patternMismatch-005.html
+ fast/forms/ValidityState-patternMismatch-006.html
+ fast/forms/ValidityState-patternMismatch-007.html
+ fast/forms/pattern-attribute-001.html
+ fast/forms/pattern-attribute-002.html
+ fast/forms/pattern-attribute-003.html
+
+ * html/HTMLAttributeNames.in: pattern attribute
+ * html/HTMLFormControlElement.h:
+ (WebCore::HTMLFormControlElement::patternMismatch): method definition
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::patternMismatch): validation method
+ * html/HTMLInputElement.h:
+ * html/HTMLInputElement.idl:
+ * html/ValidityState.h:
+ (WebCore::ValidityState::patternMismatch): validation flag
+
+2009-07-27 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] Manual WML tests aren't properly working
+ https://bugs.webkit.org/show_bug.cgi?id=27718
+
+ Fix file paths in the manual WML layout tests, remove unneeded tests (already covered by DRT tests).
+ Add missing resources directory and test image. Reformat all testcases to a common style.
+ Add new StartTests.wml file, which should be used as starting point to crawl through the manual tests.
+
+ Filing bugs soon for all tests exposing bugs (7 in total).
+
+ * manual-tests/wml/StartTests.wml: Added.
+ * manual-tests/wml/a-br-element.wml:
+ * manual-tests/wml/a-element.wml:
+ * manual-tests/wml/a-img-element.wml:
+ * manual-tests/wml/access-target.wml:
+ * manual-tests/wml/anchor-br-element.wml:
+ * manual-tests/wml/anchor-element.wml:
+ * manual-tests/wml/anchor-img-element.wml:
+ * manual-tests/wml/card-newcontext-attr.wml:
+ * manual-tests/wml/card-onenterbackward.wml:
+ * manual-tests/wml/card-onenterforward.wml:
+ * manual-tests/wml/card-ontimer.wml:
+ * manual-tests/wml/card-title-attr.wml: Removed.
+ * manual-tests/wml/deck-access-control.wml:
+ * manual-tests/wml/go-element.wml: Removed.
+ * manual-tests/wml/input-emptyok.wml: Removed.
+ * manual-tests/wml/input-format.wml:
+ * manual-tests/wml/onevent-go.wml:
+ * manual-tests/wml/onevent-noop.wml:
+ * manual-tests/wml/onevent-prev.wml:
+ * manual-tests/wml/onevent-refresh.wml:
+ * manual-tests/wml/onevent-shadow.wml:
+ * manual-tests/wml/postfield-get.wml: Removed.
+ * manual-tests/wml/postfield-post.wml: Removed.
+ * manual-tests/wml/resources: Added.
+ * manual-tests/wml/resources/smiley.png: Added.
+ * manual-tests/wml/select-element.wml:
+ * manual-tests/wml/select-onpick-event.wml:
+ * manual-tests/wml/setvar-element.wml:
+ * manual-tests/wml/targetdeck.wml:
+ * manual-tests/wml/task-go-in-anchor.wml:
+ * manual-tests/wml/task-noop-in-do.wml:
+ * manual-tests/wml/task-noop-in-onevent.wml: Removed.
+ * manual-tests/wml/task-prev-in-anchor.wml:
+ * manual-tests/wml/task-refresh-in-anchor.wml:
+ * manual-tests/wml/template-go.wml:
+ * manual-tests/wml/template-onevent.wml: Removed.
+ * manual-tests/wml/template-ontimer.wml:
+ * manual-tests/wml/timer.wml:
+ * manual-tests/wml/variable-substitution.wml:
+
+2009-07-27 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix a regression introduced in r42671, which caused the js event
+ object to be hidden (some websites depend on being able to access it).
+
+ https://bugs.webkit.org/show_bug.cgi?id=27719
+
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::invokeEventHandler): Make the event object visible to javascript, instead of hidden.
+
+2009-07-27 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Removing a no-op block of code in DatabaseTracker.cpp that
+ should've been removed in the patch for bug 26054.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27666
+
+ All tests in WebCore/storage pass.
+
+ * storage/DatabaseTracker.cpp:
+ (WebCore::DatabaseTracker::fullPathForDatabase): Removed a no-op
+ block of code that was moved to SQLiteFileSystem.cpp and should
+ have been removed from DatabaseTracker.cpp
+
+2009-07-27 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ Fix error handling in dedicated worker and worker context.
+ https://bugs.webkit.org/show_bug.cgi?id=27525
+
+ The following problems have been fixed:
+ 1) The uncaught runtime script error is not reported using the
+ WorkerGlobalScope object's onerror attribute.
+ 2) If the error is still not handled afterwards (onerror attribute
+ is not defined as a function or it returns true), the error should
+ be reported back to the associated Worker object by firing an
+ ErrorEvent.
+ 3) If the error is still not handled by the associated Worker
+ object, the error should be reported to the user.
+
+ Test: fast/workers/worker-script-error.html
+
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::JSEventListener::reportError):
+ * bindings/js/JSEventListener.h:
+ * dom/EventListener.h:
+ (WebCore::EventListener::reportError): adds a function to call
+ EventListener as a function with 3 arguments to report an error.
+ * workers/AbstractWorker.cpp:
+ (WebCore::AbstractWorker::dispatchScriptErrorEvent):
+ * workers/AbstractWorker.h:
+ * workers/DedicatedWorkerContext.cpp:
+ (WebCore::DedicatedWorkerContext::reportException):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::reportException):
+ * workers/WorkerContext.h:
+ * workers/WorkerMessagingProxy.cpp:
+ (WebCore::WorkerExceptionTask::performTask):
+ * workers/WorkerMessagingProxy.h:
+
+2009-07-27 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] History handling / page cache / loading is buggy and depends on several hacks
+ https://bugs.webkit.org/show_bug.cgi?id=27707
+
+ Redesign WML history/loading handling. In detail:
+
+ - Remove FrameLoader::setForceReloadWmlDeck(). WML used to force a special loading behaviour
+ by calling this method from WMLGoElement & friends - instead teach FrameLoader to detect
+ WML content itself.
+
+ WML content is usually a standalone WML document (isWMLDocument()=true) or as special case
+ an XHTML document which embeds a WML document (that's the way the WML layout tests work).
+ Force WML loading behaviour even for XHTML document which embed WML documents. This only
+ applies to our layout tests, not for any real world site. Though it gives us a perfect
+ way to test the WML loading code even when we're not operating on a standalone WML document.
+
+ Whenever a WMLCardElement is inserted into the document it will check wheter it's inserted
+ in a standalone WML document or wheter the main frame document is different. If it differs
+ the main frame documents' "containsWMLContent" property is set to true.
+
+ -> Make FrameLoader::shouldReload() use the new frameContainsWMLContent() method, which
+ checks if the associated frame document is a WML document or wheter it contains WML content.
+
+ - Change FrameLoader::loadItem() to use the new frameContainsWMLContent() method for 'shouldScroll'
+ detection. WML documents (or those containing WML content) always want new loads even for in-page
+ navigation. No "scroll to anchor" mechanism should apply.
+
+ - Modify FrameLoader::canCachePageContainingThisFrame() to check for !frameContainsWMLContent().
+ WML pages should never be cached, potential security problem due the use of variables (per spec).
+
+ Add two new WML tests which were broken before, testing onenterforward/onenterbackward event handling
+ and history navigation (<prev/> task).
+
+ Tests: wml/enter-card-with-events.html
+ wml/enter-first-card-with-events.html
+
+ * dom/Document.cpp: Initialize new 'm_containsWMLContent' property.
+ (WebCore::Document::Document):
+ * dom/Document.h: Add new helper methods and 'm_containsWMLContent" variable (explained above).
+ (WebCore::Document::setContainsWMLContent):
+ (WebCore::Document::containsWMLContent):
+ * history/BackForwardList.cpp:
+ (WebCore::BackForwardList::clearWMLPageHistory): Renamed from clearWmlPageHistory() & slight cleanup.
+ * history/BackForwardList.h:
+ * loader/FrameLoader.cpp: Rework WML loading behaviour (explained above).
+ (WebCore::FrameLoader::FrameLoader):
+ (WebCore::frameContainsWMLContent):
+ (WebCore::FrameLoader::canCachePageContainingThisFrame):
+ (WebCore::FrameLoader::shouldReload):
+ (WebCore::FrameLoader::loadItem):
+ * loader/FrameLoader.h:
+ * wml/WMLCardElement.cpp:
+ (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded): No need anymore to manually track history length.
+ (WebCore::WMLCardElement::insertedIntoDocument): Handle setting containsWMLContent on the main frame document.
+ * wml/WMLGoElement.cpp:
+ (WebCore::WMLGoElement::executeTask): Remove call to FrameLoader::setForceReloadWmlDeck()
+ * wml/WMLPageState.cpp: Remove 'm_historyLength' - no need anymore to track history length on our own.
+ (WebCore::WMLPageState::WMLPageState):
+ (WebCore::WMLPageState::dump):
+ (WebCore::WMLPageState::reset):
+ * wml/WMLPageState.h:
+
+2009-07-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Adam Roben.
+
+ Fix Chromium build breakage introduced in 46388.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27705
+
+ * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
+ (WebCore::FontPlatformData::description):
+ * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
+
+2009-07-27 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Add some more debug logging to PluginViewMac.
+
+ * plugins/mac/PluginViewMac.cpp:
+
+2009-07-27 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Jan Michael Alonzo.
+
+ Remove dead code from the GTK NPAPI implementation.
+
+ * plugins/gtk/PluginViewGtk.cpp:
+
+2009-07-27 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Buildfix on Windows.
+ https://bugs.webkit.org/show_bug.cgi?id=27702
+
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::hookedEndPaint):
+ Constraint of (*endPaint) operand modified from "g" to "m" (memory) in inline
+ assembly, because with "g" constraint, wrong assembly code generated.
+
+2009-07-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebCore bindings: Implement ScriptArray bindings.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27691
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/ScriptArray.cpp: Added.
+ (WebCore::ScriptArray::ScriptArray):
+ (WebCore::handleException):
+ (WebCore::ScriptArray::set):
+ (WebCore::length):
+ (WebCore::ScriptArray::createNew):
+ * bindings/js/ScriptArray.h: Added.
+ (WebCore::ScriptArray::ScriptArray):
+ (WebCore::ScriptArray::jsArray):
+ * bindings/v8/ScriptArray.cpp: Added.
+ (WebCore::ScriptArray::ScriptArray):
+ (WebCore::ScriptArray::set):
+ (WebCore::ScriptArray::length):
+ (WebCore::ScriptArray::createNew):
+ * bindings/v8/ScriptArray.h: Added.
+ (WebCore::ScriptArray::ScriptArray):
+ (WebCore::ScriptArray::~ScriptArray):
+
+2009-07-27 Brent Fulgham <bfulgham@webkit.org>
+
+ Build correct, no review.
+
+ Change in r46407 broke Apple Windows build.
+ Switch to WinCairo-only test, to avoid any
+ other platform break.
+
+ * WebCorePrefix.h:
+
+2009-07-26 Brent Fulgham <bfulgham@webkit.org>
+
+ Build correct, no review.
+
+ Change in r46407 broke Apple Windows build.
+
+ * WebCorePrefix.h: Use WTF_PLATFORM_CG to decide if
+ CoreServices.h should be included.
+
+2009-07-26 Brent Fulgham <bfulgham@webkit.org>
+
+ Build correction, no review.
+
+ Change in r46195 broke WinCairo build.
+
+ * WebCorePrefix.h: CoreServices should be ignored
+ for non-Apple build.
+
+2009-07-26 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Implement the breakpoints sidebar pane.
+ This change adds simple UI support into the existing
+ BreakpointSidebarPane.
+
+ https://bugs.webkit.org/show_bug.cgi?id=11175
+
+ * inspector/front-end/Breakpoint.js:
+ (WebInspector.Breakpoint.prototype.set enabled):
+ (WebInspector.Breakpoint.prototype.get label):
+ (WebInspector.Breakpoint.prototype.get id):
+ * inspector/front-end/BreakpointsSidebarPane.js:
+ (WebInspector.BreakpointsSidebarPane):
+ (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint):
+ (WebInspector.BreakpointsSidebarPane.prototype._appendBreakpointElement):
+ (WebInspector.BreakpointsSidebarPane.prototype._appendBreakpointElement.labelClicked):
+ (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint):
+ (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ (WebInspector.ScriptsPanel.prototype.scriptOrResourceForID):
+ * inspector/front-end/inspector.css:
+
+2009-07-16 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ Canvas: rotation of 'no-repeat' pattern still has small error
+ https://bugs.webkit.org/show_bug.cgi?id=26749
+
+ Use 1<<22 as steps of no-repeat pattern to make the error less
+ than 0.5. The previous value may cause 1 pixel errors.
+
+ Add another test to show this bug clearly.
+ Also add png expected image which was missing in the previous patch.
+
+ Test: fast/canvas/image-pattern-rotate.html
+
+ * platform/graphics/cg/PatternCG.cpp:
+ (WebCore::Pattern::createPlatformPattern):
+
+2009-07-25 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Darin Adler.
+
+ Windows build break due to warning C4819
+ https://bugs.webkit.org/show_bug.cgi?id=27416
+
+ Disable C4819 warning to fix build.
+
+ * WebCore.vcproj/QTMovieWin.vcproj:
+ * WebCore.vcproj/WebCore.vcproj:
+
+2009-07-25 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Kevin McCullough.
+
+ Inspector: Keyboard Shortcuts to Switch Panels
+ https://bugs.webkit.org/show_bug.cgi?id=27286
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded): save a list of the order of the panels
+ (WebInspector.documentKeyDown): handle the keyboard shortcuts to traverse the panels
+
+2009-07-25 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by George Staikos.
+
+ [Qt] Fix build break after r46369
+ https://bugs.webkit.org/show_bug.cgi?id=27680
+
+ * WebCore.pro:
+
+2009-07-25 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] Variable substitution is buggy
+ https://bugs.webkit.org/show_bug.cgi?id=27677
+
+ Substitute variables upon attach() time instead of insertedIntoDocument(). Otherwhise variable substitution
+ won't work during inter-deck jumps (same URL, different fragment). Covered by new test fast/wml/newcontext-same-deck.html.
+
+ * dom/Text.cpp:
+ (WebCore::Text::attach):
+ * dom/Text.h:
+
+2009-07-25 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] WMLDoElement doesn't update its RenderButton object upon attach()
+ https://bugs.webkit.org/show_bug.cgi?id=27676
+
+ WMLDoElement needs to implement attach() and call updateFromElement() on its associated RenderButton.
+ Mimics HTMLButtonElement/HTMLFormControlElement behaviour and fixes several painting/styling issues covered by existing tests in fast/wml.
+
+ * wml/WMLDoElement.cpp:
+ (WebCore::WMLDoElement::attach):
+ * wml/WMLDoElement.h:
+
+2009-07-25 Pavel Feldman <pfeldman@chromium.org>
+
+ Fix Windows build breakage introduced in 46390.
+
+ * WebCore.vcproj/WebCore.vcproj:
+
+2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Oliver Hunt.
+
+ Inspector: Properties Should be Sorted more Naturally
+ https://bugs.webkit.org/show_bug.cgi?id=27329
+
+ * inspector/front-end/ObjectPropertiesSection.js:
+ (WebInspector.ObjectPropertiesSection.prototype.update): use the displaySort when showing properties
+ (WebInspector.ObjectPropertiesSection.prototype._displaySort): alphaNumerical sort
+ (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate): use the displaySort when showing properties
+ * inspector/front-end/utilities.js:
+ (Object.sortedProperties): allow for an optional sorting function in Object.sortedProperties
+
+2009-07-24 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Split InspectorController into InspectorController
+ and InspectorBackend. Everything frontend needs from InspectorController
+ will slowly migrate into the InspectorBackend.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27541
+
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * bindings/js/JSInspectorBackendCustom.cpp: Added.
+ (WebCore::JSInspectorBackend::highlightDOMNode):
+ (WebCore::JSInspectorBackend::search):
+ (WebCore::JSInspectorBackend::databaseTableNames):
+ (WebCore::JSInspectorBackend::inspectedWindow):
+ (WebCore::JSInspectorBackend::setting):
+ (WebCore::JSInspectorBackend::setSetting):
+ (WebCore::JSInspectorBackend::wrapCallback):
+ (WebCore::JSInspectorBackend::currentCallFrame):
+ (WebCore::JSInspectorBackend::profiles):
+ * bindings/v8/custom/V8InspectorBackendCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/js/JSInspectorControllerCustom.cpp: Removed.
+ * bindings/js/ScriptObject.cpp:
+ (WebCore::ScriptGlobalObject::set):
+ * bindings/js/ScriptObject.h:
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/ScriptObject.cpp:
+ (WebCore::ScriptGlobalObject::set):
+ * bindings/v8/ScriptObject.h:
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8InspectorControllerCustom.cpp: Removed.
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::InspectorController):
+ (WebCore::InspectorController::windowScriptObjectAvailable):
+ * inspector/InspectorController.h:
+ (WebCore::InspectorController::inspectorBackend):
+ * inspector/InspectorBackend.cpp: Added.
+ * inspector/InspectorBackend.h: Added.
+ (WebCore::InspectorBackend::create):
+ (WebCore::InspectorBackend::inspectorController):
+ * inspector/InspectorBackend.idl: Added.
+ * inspector/InspectorController.idl: Removed.
+ * inspector/front-end/Resource.js:
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ * page/Page.h:
+
+2009-07-25 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ Update WebCore/page/Frame.cpp/h to conform to WebKit
+ Style Guidelines as identified by cpplint.py.
+ https://bugs.webkit.org/show_bug.cgi?id=27654
+
+ * page/Frame.cpp:
+ (WebCore::Frame::Frame):
+ (WebCore::Frame::~Frame):
+ (WebCore::Frame::setDocument):
+ (WebCore::Frame::firstRectForRange):
+ (WebCore::createRegExpForLabels):
+ (WebCore::Frame::searchForLabelsBeforeElement):
+ (WebCore::Frame::matchLabelsAgainstElement):
+ (WebCore::Frame::selectionLayoutChanged):
+ (WebCore::Frame::setZoomFactor):
+ (WebCore::Frame::reapplyStyles):
+ (WebCore::Frame::isContentEditable):
+ (WebCore::Frame::computeAndSetTypingStyle):
+ (WebCore::Frame::selectionStartStylePropertyValue):
+ (WebCore::Frame::selectionComputedStyle):
+ (WebCore::Frame::applyEditingStyleToBodyElement):
+ (WebCore::Frame::removeEditingStyleFromBodyElement):
+ (WebCore::Frame::applyEditingStyleToElement):
+ (WebCore::Frame::selectionBounds):
+ (WebCore::Frame::currentForm):
+ (WebCore::Frame::revealSelection):
+ (WebCore::Frame::styleForSelectionStart):
+ (WebCore::Frame::setSelectionFromNone):
+ (WebCore::Frame::findString):
+ (WebCore::Frame::markAllMatchesForText):
+ (WebCore::Frame::setMarkedTextMatchesAreHighlighted):
+ (WebCore::Frame::clearFormerDOMWindow):
+ (WebCore::Frame::unfocusWindow):
+ (WebCore::Frame::respondToChangedSelection):
+ (WebCore::Frame::documentAtPoint):
+ * page/Frame.h:
+ (WebCore::Frame::create):
+ (WebCore::Frame::displayStringModifiedByEncoding):
+ (WebCore::Frame::pageZoomFactor):
+ (WebCore::Frame::textZoomFactor):
+
+2009-07-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add functions to print the glyph page trees for debugging
+ https://bugs.webkit.org/show_bug.cgi?id=27671
+
+ * platform/graphics/FontData.h: Defined a description() method.
+
+ * platform/graphics/GlyphPageTreeNode.cpp:
+ (WebCore::GlyphPageTreeNode::showSubtree): Added. Prints the node and
+ its descendants.
+ (showGlyphPageTrees): Added. Prints all glyph page trees.
+ (showGlyphPageTree): Added. Prints the glyph page tree for a given page.
+ * platform/graphics/GlyphPageTreeNode.h:
+
+ * platform/graphics/SegmentedFontData.cpp:
+ (WebCore::SegmentedFontData::description): Added.
+
+ * platform/graphics/SegmentedFontData.h:
+ * platform/graphics/SimpleFontData.cpp:
+ (WebCore::SimpleFontData::description): Added. Uses the platform data
+ as the description for non-svg, non-custom fonts.
+ * platform/graphics/SimpleFontData.h:
+
+ * platform/graphics/gtk/FontPlatformData.h:
+ * platform/graphics/gtk/FontPlatformDataGtk.cpp:
+ (WebCore::FontPlatformData::description): Added. Returns a null string.
+ * platform/graphics/gtk/FontPlatformDataPango.cpp:
+ (WebCore::FontPlatformData::description): Added. Returns a null string.
+
+ * platform/graphics/mac/FontPlatformData.h:
+ * platform/graphics/mac/FontPlatformDataMac.mm:
+ (WebCore::FontPlatformData::description): Added. Returns the
+ description of the CGFont, the size and the synthetic style flags,
+ if set.
+
+ * platform/graphics/qt/FontPlatformData.h:
+ * platform/graphics/qt/FontPlatformDataQt.cpp:
+ (WebCore::FontPlatformData::description): Added. Returns a null string.
+
+ * platform/graphics/win/FontPlatformData.h:
+ * platform/graphics/win/FontPlatformDataWin.cpp:
+ (WebCore::FontPlatformData::description): Added. Returns a null string.
+
+ * platform/graphics/wince/FontPlatformData.cpp:
+ (WebCore::FontPlatformData::description): Added. Returns a null string.
+ * platform/graphics/wince/FontPlatformData.h:
+
+ * platform/graphics/wx/FontPlatformData.h:
+ * platform/graphics/wx/FontPlatformDataWx.cpp:
+ (WebCore::FontPlatformData::description): Added. Returns a null string.
+
+2009-07-24 Mads Ager <ager@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ SVG and XPath memory leaks in V8 bindings
+ https://bugs.webkit.org/show_bug.cgi?id=27488
+
+ Add proper 'create' methods to SVGPodTypeWrappers and
+ XPathNSResolvers in the V8 bindings to avoid memory leaks.
+
+ Introduce convertToV8Object methods that accept PassRefPtrs and
+ clean up the use of get() and release() on RefPtrs.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8DOMWrapper.h:
+ (WebCore::V8DOMWrapper::convertNodeToV8Object):
+ (WebCore::V8DOMWrapper::convertEventToV8Object):
+ (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
+ (WebCore::V8DOMWrapper::convertEventListenerToV8Object):
+ * bindings/v8/V8SVGPODTypeWrapper.h:
+ (WebCore::V8SVGPODTypeWrapperCreatorForList::create):
+ (WebCore::V8SVGPODTypeWrapperCreatorForList::V8SVGPODTypeWrapperCreatorForList):
+ (WebCore::V8SVGStaticPODTypeWrapper::create):
+ (WebCore::V8SVGStaticPODTypeWrapper::V8SVGStaticPODTypeWrapper):
+ (WebCore::V8SVGStaticPODTypeWrapperWithPODTypeParent::create):
+ (WebCore::V8SVGStaticPODTypeWrapperWithPODTypeParent::V8SVGStaticPODTypeWrapperWithPODTypeParent):
+ (WebCore::V8SVGStaticPODTypeWrapperWithParent::create):
+ (WebCore::V8SVGStaticPODTypeWrapperWithParent::V8SVGStaticPODTypeWrapperWithParent):
+ (WebCore::V8SVGDynamicPODTypeWrapper::create):
+ (WebCore::V8SVGDynamicPODTypeWrapper::V8SVGDynamicPODTypeWrapper):
+ (WebCore::V8SVGDynamicPODTypeWrapperCache::lookupOrCreateWrapper):
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8ClientRectListCustom.cpp:
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
+ (WebCore::V8CustomXPathNSResolver::create):
+ * bindings/v8/custom/V8CustomXPathNSResolver.h:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8ElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
+ (WebCore::getNamedItems):
+ (WebCore::getItem):
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::ACCESSOR_GETTER):
+ * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8InspectorControllerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8NodeIteratorCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8NodeListCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8SVGMatrixCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8TreeWalkerCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-07-24 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Fix of <rdar://6310538> Middle-click panning should be springloaded while dragging
+ https://bugs.webkit.org/show_bug.cgi?id=21794
+
+ Create two new booleans to determine whether we have done a springloaded pan scroll, and update
+ the name of setPanScrollCursor to updatePanScrollState to more accurately describe what the function
+ does.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::EventHandler): Initialized two new booleans.
+ (WebCore::EventHandler::autoscrollTimerFired):
+ (WebCore::EventHandler::updatePanScrollState): Renamed from setPanScrollCursor.
+ (WebCore::EventHandler::stopAutoscrollTimer): Clear the pan scrolling in progress flag.
+ (WebCore::EventHandler::handleMouseReleaseEvent): Clear the pan scrolling button pressed flag.
+ * page/EventHandler.h:
+
+2009-07-24 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27657
+ Add more wince port files to WebCore
+
+ Written by Yong Li <yong.li@torchmobile.com> and Lyon Chen <lyon.chen@torchmobile.com>
+
+ * loader/icon/wince/IconDatabaseWince.cpp: Added.
+ * rendering/RenderThemeWince.cpp: Added.
+ * rendering/RenderThemeWince.h: Added.
+ * storage/wince/DatabaseThreadWince.cpp: Added.
+ * storage/wince/DatabaseThreadWince.h: Added.
+ * storage/wince/LocalStorageThreadWince.cpp: Added.
+ * storage/wince/LocalStorageThreadWince.h: Added.
+ * svg/graphics/wince/SVGResourceFilterWince.cpp: Added.
+
+2009-07-24 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Justin Garcia.
+
+ execCommand('underline') can modify DOM outside of the contentEditable area
+ https://bugs.webkit.org/show_bug.cgi?id=24333
+
+ highestAncestorWithTextDecoration stops at the closest unsplittable element so that if text-decoration is applied
+ outside of it, we don't accidently modify the style attribute.
+
+ Tests: editing/style/textdecoration-outside-of-rooteditable.html
+ editing/style/textdecoration-outside-of-unsplittable-element.html
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::StyleChange::init):
+ (WebCore::highestAncestorWithTextDecoration):
+
+2009-07-24 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27639
+
+ Fixes false positives when evaluating certain strings that only contain
+ non-canonical characters.
+
+ Test: http/tests/security/xssAuditor/script-tag-safe.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::isNonCanonicalCharacter):
+ (WebCore::XSSAuditor::findInRequest):
+
+2009-07-24 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ Changed WorkerContext destructor to not access possibly-freed WorkerThread.
+
+ Failed assertion in WorkerContext::~WorkerContext().
+ https://bugs.webkit.org/show_bug.cgi?id=27665
+
+ * workers/DedicatedWorkerContext.cpp:
+ (WebCore::DedicatedWorkerContext::~DedicatedWorkerContext):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::~WorkerContext):
+ Removed assertion that relies on WorkerThread still being alive (moved to DedicatedWorkerContext destructor).
+
+2009-07-24 Drew Wilson <atwilson@google.com>
+
+ Reviewed by Adam Barth.
+
+ Updated code generator to properly generate bindings for WorkerContext exposed functions.
+
+ Storing a reference to WorkerContext.postMessage() and calling it later yields a TypeError
+ https://bugs.webkit.org/show_bug.cgi?id=27419
+
+ Test: fast/workers/worker-call.html
+
+ * bindings/js/JSWorkerContextBase.cpp:
+ (WebCore::toJSDedicatedWorkerContext):
+ (WebCore::toJSWorkerContext):
+ Functions that convert from JSValue to the appropriate WorkerContext/DedicatedWorkerContext object.
+ * bindings/js/JSWorkerContextBase.h:
+ Added toJS*WorkerContext APIs.
+ * bindings/scripts/CodeGeneratorJS.pm:
+ Added code to appropriately check the passed-in this object when invoking functions at global scope.
+
+2009-07-24 Drew Wilson <atwilson@google.com>
+
+ Reviewed by Adam Barth.
+
+ Refactor WorkerContext to move DedicatedWorker-specific APIs into DedicatedWorkerContext
+ https://bugs.webkit.org/show_bug.cgi?id=27420
+
+ No new tests as the existing tests already provide sufficient coverage (this is just a refactoring with no new functionality).
+
+ * DerivedSources.cpp:
+ Added JSDerivedWorkerContext.cpp
+ * DerivedSources.make:
+ Added DerivedWorkerContext files
+ * GNUmakefile.am:
+ Added DerivedWorkerContext files
+ * WebCore.gypi:
+ Added DerivedWorkerContext files
+ * WebCore.pro:
+ Added DerivedWorkerContext files
+ * WebCore.vcproj/WebCore.vcproj:
+ Added DerivedWorkerContext files
+ * WebCore.xcodeproj/project.pbxproj:
+ Added DerivedWorkerContext files
+ * bindings/js/JSDedicatedWorkerContextCustom.cpp: Added.
+ (WebCore::JSDedicatedWorkerContext::mark):
+ Custom mark function for onmessage event handler.
+ * bindings/js/JSEventTarget.cpp:
+ (WebCore::toJS):
+ Supports conversion to JSDedicatedWorkerContext.
+ (WebCore::toEventTarget):
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::mark):
+ Moved onmessage mark handling into DedicatedWorkerContext.
+ * bindings/js/WorkerScriptController.cpp:
+ Added appropriate casts to DedicatedWorkerContext for postMessage().
+ (WebCore::WorkerScriptController::initScript):
+ Manually sets up the prototype chain for the worker context.
+ * bindings/scripts/CodeGeneratorJS.pm:
+ Changed special case code for WorkerContext to be triggered by new IsWorkerContext attribute.
+ * bindings/scripts/CodeGeneratorV8.pm:
+ Changed hard-coded tests for WorkerContext to support DedicatedWorkerContext.
+ * bindings/v8/DOMObjectsInclude.h:
+ Added DedicatedWorkerContext.h
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ Added V8DedicatedWorkerContext.cpp
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ Added code to reserve extra fields for V8DedicatedWorkerContext.
+ * bindings/v8/V8Index.cpp:
+ Now includes V8DedicatedWorkerContext.h in addition to V8WorkerContext.h
+ * bindings/v8/V8Index.h:
+ Added DedicatedWorkerContext as a non-node wrapper type.
+ Removed WORKERCONTEXT as a valid template type.
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
+ Creates DedicatedWorkerContext instead of WorkerContext.
+ (WebCore::WorkerContextExecutionProxy::EventTargetToV8Object):
+ Returns DedicatedWorkerContext instead of WorkerContext.
+ (WebCore::WorkerContextExecutionProxy::retrieve):
+ Refactored to deal with DedicatedWorkerContext.
+ * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp: Added.
+ Moved onmessage code from V8WorkerContextCustom.cpp
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ Moved onmessage code to V8DedicatedWorkerContextCustom.cpp
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::toDedicatedWorkerContext):
+ * dom/EventTarget.h:
+ * workers/DedicatedWorkerContext.cpp: Added.
+ Moved DedicatedWorker-only APIs from WorkerContext.
+ (WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
+ (WebCore::DedicatedWorkerContext::~DedicatedWorkerContext):
+ (WebCore::DedicatedWorkerContext::reportException):
+ (WebCore::DedicatedWorkerContext::postMessage):
+ (WebCore::DedicatedWorkerContext::dispatchMessage):
+ * workers/DedicatedWorkerContext.h: Added.
+ Moved DedicatedWorker-only APIs from WorkerContext.
+ (WebCore::DedicatedWorkerContext::create):
+ (WebCore::DedicatedWorkerContext::toDedicatedWorkerContext):
+ (WebCore::DedicatedWorkerContext::setOnmessage):
+ (WebCore::DedicatedWorkerContext::onmessage):
+ * workers/DedicatedWorkerContext.idl: Added.
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::~WorkerContext):
+ Moved code that notifies parent that worker is closing down into DedicatedWorkerContext.
+ * workers/WorkerContext.h:
+ (WebCore::WorkerContext::isClosing):
+ Exposed closing flag as an API so derived classes can access it.
+ * workers/WorkerContext.idl:
+ * workers/WorkerMessagingProxy.cpp:
+ (WebCore::MessageWorkerContextTask::performTask):
+ Calls into DedicatedWorkerContext to handle message.
+ * workers/WorkerThread.cpp:
+ (WebCore::WorkerThread::workerThread):
+ Creates a DedicatedWorkerContext when the thread starts up.
+
+2009-07-24 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Move more callers to using 3 argument toJS
+ https://bugs.webkit.org/show_bug.cgi?id=27661
+
+ No functional changes, thus no tests.
+ These are all the places where we can't yet pass the
+ correct globalObject because we don't have or don't know the right one.
+
+ * bindings/js/JSCustomPositionCallback.cpp:
+ (WebCore::JSCustomPositionCallback::handleEvent):
+ * bindings/js/JSCustomPositionErrorCallback.cpp:
+ (WebCore::JSCustomPositionErrorCallback::handleEvent):
+ * bindings/js/JSCustomSQLStatementCallback.cpp:
+ (WebCore::JSCustomSQLStatementCallback::handleEvent):
+ * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
+ (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
+ * bindings/js/JSCustomSQLTransactionCallback.cpp:
+ (WebCore::JSCustomSQLTransactionCallback::handleEvent):
+ * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
+ (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
+ * bindings/js/JSNodeFilterCondition.cpp:
+ (WebCore::JSNodeFilterCondition::acceptNode):
+
+2009-07-24 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Fix the last of the x-frame constructor calls to have the right prototype chains
+ https://bugs.webkit.org/show_bug.cgi?id=27645
+
+ Fix the last few constructors to use their stored globalObject pointer when
+ constructing objects instead of the lexicalGlobalObject().
+
+ * bindings/js/JSAudioConstructor.cpp:
+ (WebCore::constructAudio):
+ * bindings/js/JSImageConstructor.cpp:
+ (WebCore::constructImage):
+ * bindings/js/JSMessageChannelConstructor.cpp:
+ (WebCore::JSMessageChannelConstructor::construct):
+ * bindings/js/JSOptionConstructor.cpp:
+ (WebCore::constructHTMLOptionElement):
+ * bindings/js/JSWebKitPointConstructor.cpp:
+ (WebCore::constructWebKitPoint):
+ * bindings/js/JSWorkerConstructor.cpp:
+ (WebCore::constructWorker):
+
+2009-07-24 Jian Li <jianli@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Cleanup exception handling in worker evaluation code.
+ https://bugs.webkit.org/show_bug.cgi?id=27282
+
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::evaluate):
+ * bindings/v8/WorkerContextExecutionProxy.h:
+ (WebCore::WorkerContextExecutionState::WorkerContextExecutionState):
+ * bindings/v8/WorkerScriptController.cpp:
+ (WebCore::WorkerScriptController::evaluate):
+ (WebCore::WorkerScriptController::setException):
+
+2009-07-24 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by David Levin.
+
+ Reverting r46157, since it may be causing problems with Chromium
+ reliability (see http://crbug.com/17569).
+
+ https://bugs.webkit.org/show_bug.cgi?id=27388
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::drawLine):
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::setupPaintForStroking):
+
+2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ REGRESSION: inspector seems broken in ToT WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=27646
+
+ * inspector/front-end/Console.js:
+ (WebInspector.Console.prototype._ensureCommandLineAPIInstalled):
+
+2009-07-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Add the shadow style member to the ShadowData constructor and ==
+ operator
+
+ * rendering/style/ShadowData.cpp:
+ (WebCore::ShadowData::ShadowData):
+ (WebCore::ShadowData::operator==):
+
+2009-07-24 Jian Li <jianli@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [V8] More V8 bindings changes to use ErrorEvent.
+ https://bugs.webkit.org/show_bug.cgi?id=27630
+
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertEventToV8Object):
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+
+2009-07-24 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Dave Hyatt.
+
+ Clean up dependencies on Apple support libraries for non-Apple build.
+ http://bugs.webkit.org/show_bug.cgi?id=27532.
+
+ * platform/graphics/win/SimpleFontDataWin.cpp: Conditionalize references
+ to ApplicationServices.h and WebKitSystemInterface.h
+
+2009-07-24 Dan Bernstein <mitz@apple.com>
+
+ Another attempted build fix
+
+ * bindings/js/JSAbstractWorkerCustom.cpp:
+
+2009-07-24 Dan Bernstein <mitz@apple.com>
+
+ Attempted build fix
+
+ * bindings/js/JSAbstractWorkerCustom.cpp:
+ (WebCore::toJS):
+
+2009-07-24 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Build fix for 64 bit Linux.
+
+ int64_t is long on Linux 64 bit and not long long, thus
+ getFileSize with a int64_t out value fails to build.
+
+ Use a temporary to work around the problem.
+
+ * loader/appcache/ApplicationCacheStorage.cpp:
+ (WebCore::ApplicationCacheStorage::spaceNeeded):
+
+2009-07-24 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Update all CREATE_DOM_*_WRAPPER callers to pass globalObject
+ https://bugs.webkit.org/show_bug.cgi?id=27644
+
+ This is another attempt at making the change for bug 27634 smaller.
+ I included the changes to make_names.pl as well as any file which
+ used CREATE_DOM_*_WRAPPER macros.
+
+ The changes to the construct* functions are what fix the cases in
+ fast/dom/constructed-objects-prototypes.html
+
+ The changes to passing globalObject through CREATE_* are what fix
+ fast/dom/prototype-inheritance-2.html
+
+ * bindings/js/JSCDATASectionCustom.cpp:
+ (WebCore::toJSNewlyCreated): pass globalObject.
+ * bindings/js/JSCSSRuleCustom.cpp:
+ (WebCore::toJS): pass globalObject.
+ * bindings/js/JSCSSValueCustom.cpp:
+ (WebCore::toJS): pass globalObject.
+ * bindings/js/JSDOMBinding.h: updated macros to pass globalObject.
+ * bindings/js/JSDocumentCustom.cpp:
+ (WebCore::toJS): pass globalObject.
+ * bindings/js/JSElementCustom.cpp:
+ (WebCore::JSElement::setAttributeNode): use globalObject() for wrapping return value.
+ (WebCore::JSElement::setAttributeNodeNS): use globalObject() for wrapping return value.
+ (WebCore::toJSNewlyCreated): pass globalObject.
+ * bindings/js/JSEventCustom.cpp:
+ (WebCore::JSEvent::clipboardData): pass globalObject.
+ (WebCore::toJS): pass globalObject.
+ * bindings/js/JSHTMLCollectionCustom.cpp:
+ (WebCore::getNamedItems): use globalObject() for wrapping returned collection items.
+ (WebCore::callHTMLCollection): use globalObject() for wrapping returned collection items.
+ (WebCore::JSHTMLCollection::item): use globalObject() for wrapping returned collection items.
+ (WebCore::toJS): pass globalObject.
+ * bindings/js/JSImageDataCustom.cpp:
+ (WebCore::toJS): pass globalObject.
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::createWrapper): pass globalObject.
+ * bindings/js/JSSVGPathSegCustom.cpp:
+ (WebCore::toJS): pass globalObject.
+ * bindings/js/JSStyleSheetCustom.cpp:
+ (WebCore::toJS): pass globalObject.
+ * bindings/js/JSTextCustom.cpp:
+ (WebCore::toJSNewlyCreated): pass globalObject.
+ * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
+ (WebCore::constructWebKitCSSMatrix): use constructors globalObject when constructing
+ * bindings/js/JSXMLHttpRequestConstructor.cpp:
+ (WebCore::constructXMLHttpRequest): use constructors globalObject when constructing
+ * bindings/js/JSXSLTProcessorConstructor.cpp:
+ (WebCore::constructXSLTProcessor): use constructors globalObject when constructing
+ * dom/make_names.pl:
+ Pass globalObject through CREATE_* macros and various support functions.
+
+2009-07-24 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Update CodeGeneratorJS.pm to support passing JSDOMGlobalObject* to toJS calls
+ https://bugs.webkit.org/show_bug.cgi?id=27643
+
+ This is an attempt to make this change as small as possible.
+ I started by including all changes to CodeGeneratorJS.pm from bug 27634,
+ and then made the minimal amount of other changes needed to support that change.
+
+ Most toJS implementations ignore their passed JSDOMGlobalObject.
+ There are stub 2-argument toJS, toJSNewlyCreated implementations to help compiling.
+ All places where it is not clear what we should pass as the global object
+ (or where the global object is simply not available, like for some SVG bindings)
+ we pass deprecatedGlobalObjectForPrototype instead.
+
+ * bindings/js/JSCDATASectionCustom.cpp:
+ (WebCore::toJSNewlyCreated): add ignored JSDOMGlobalObject*
+ * bindings/js/JSCSSRuleCustom.cpp:
+ (WebCore::toJS): add ignored JSDOMGlobalObject*
+ * bindings/js/JSCSSValueCustom.cpp:
+ (WebCore::toJS): add ignored JSDOMGlobalObject*
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::setDOMException): pass the wrong globalObject for now
+ * bindings/js/JSDOMBinding.h:
+ Pass the wrong global object to the CREATE_ macros for now.
+ In the next change we'll come back and pass the correct one.
+ That will require changes to make_names.pl.
+ (WebCore::DOMObjectWithGlobalPointer::scriptExecutionContext):
+ (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
+ (WebCore::DOMObjectWithGlobalPointer::~DOMObjectWithGlobalPointer):
+ (WebCore::createDOMObjectWrapper):
+ (WebCore::getDOMObjectWrapper):
+ (WebCore::createDOMNodeWrapper):
+ (WebCore::getDOMNodeWrapper):
+ (WebCore::toJS): added to convert 2 arg calls to 3 arg calls to limit the scope of this change.
+ (WebCore::toJSNewlyCreated):
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::toJS): DOMWindow always uses its own prototype chain.
+ * bindings/js/JSDOMWindowBase.h:
+ * bindings/js/JSDocumentCustom.cpp:
+ (WebCore::toJS): add ignored JSDOMGlobalObject*
+ * bindings/js/JSElementCustom.cpp:
+ (WebCore::toJSNewlyCreated): add ignored JSDOMGlobalObject*
+ * bindings/js/JSEventCustom.cpp:
+ (WebCore::toJS): add ignored JSDOMGlobalObject*
+ * bindings/js/JSEventTarget.cpp:
+ (WebCore::toJS): add ignored JSDOMGlobalObject*
+ * bindings/js/JSEventTarget.h:
+ * bindings/js/JSHTMLCollectionCustom.cpp:
+ (WebCore::toJS): add ignored JSDOMGlobalObject*
+ * bindings/js/JSImageDataCustom.cpp:
+ (WebCore::toJS): add ignored JSDOMGlobalObject*
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::createWrapper): pass globalObject to toJS(Document*) to avoid recursion
+ (WebCore::toJSNewlyCreated): add ignored JSDOMGlobalObject*
+ (WebCore::toJS): add ignored JSDOMGlobalObject*
+ * bindings/js/JSSVGElementInstanceCustom.cpp:
+ (WebCore::toJS): pass globalObject along
+ * bindings/js/JSSVGMatrixCustom.cpp:
+ (WebCore::JSSVGMatrix::inverse): pass wrong globalObject for now.
+ (WebCore::JSSVGMatrix::rotateFromVector): pass wrong globalObject for now.
+ * bindings/js/JSSVGPathSegCustom.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSSVGPathSegListCustom.cpp:
+ All of these methods need a globalObject, but most SVG binding don't have
+ space for one, so we just pass the lexicalGlobalObject for now.
+ (WebCore::JSSVGPathSegList::initialize):
+ (WebCore::JSSVGPathSegList::getItem):
+ (WebCore::JSSVGPathSegList::insertItemBefore):
+ (WebCore::JSSVGPathSegList::replaceItem):
+ (WebCore::JSSVGPathSegList::removeItem):
+ (WebCore::JSSVGPathSegList::appendItem):
+ * bindings/js/JSSVGPointListCustom.cpp:
+ (WebCore::finishGetter): pass wrong globalObject for now.
+ (WebCore::finishSetter):
+ (WebCore::finishSetterReadOnlyResult):
+ * bindings/js/JSSVGTransformListCustom.cpp:
+ (WebCore::finishGetter): pass wrong globalObject for now.
+ (WebCore::finishSetter):
+ (WebCore::finishSetterReadOnlyResult):
+ * bindings/js/JSStyleSheetCustom.cpp:
+ (WebCore::toJS): add ignored JSDOMGlobalObject*
+ * bindings/js/JSTextCustom.cpp:
+ (WebCore::toJSNewlyCreated): add ignored JSDOMGlobalObject*
+ * bindings/js/JSWorkerContextBase.cpp:
+ (WebCore::toJS): WorkerContext always uses its own prototype chain since it's a GlobalObject subclass.
+ * bindings/js/JSWorkerContextBase.h:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ All generated toJS calls now pass a globalObject.
+ All generated toJS implementations now expect a globalObject.
+ Simplified all the slot casts by using a "castedThis" local.
+ SVG bindings which don't have a globalObject() accessor pass the deprecated lexicalGlobalObject instead.
+ Simplified printing of constructor objects using a $constructorClassName variable.
+ All generated constructor functions follow the construct$className form to match the custom constructors.
+
+2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ typing "document.__proto__" in inspector throws exception
+ https://bugs.webkit.org/show_bug.cgi?id=27169
+
+ * inspector/front-end/utilities.js:
+ (Object.type):
+
+2009-07-24 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Anders Carlsson.
+
+ ApplicationCache should have size limit
+ https://bugs.webkit.org/show_bug.cgi?id=22700
+
+ https://lists.webkit.org/pipermail/webkit-dev/2009-May/007560.html
+
+ This change implements a mechanism for limiting the maximum size of
+ the application cache file. When this size is reached, a ChromeClient
+ callback is invoked asynchronously and the saving of the last (failed)
+ cache is retried automatically.
+
+ This change also extends the ApplicationCacheStorage API by allowing
+ a client to query or modify the application cache without having to
+ load any resources into memory.
+
+ Test: http/tests/appcache/max-size.html
+
+ * WebCore.base.exp:
+ Exports the symbols required by the DumpRenderTree test application.
+ * loader/EmptyClients.h:
+ Adds empty implementation of the new ChromeClient methods.
+ * loader/appcache/ApplicationCache.cpp:
+ * loader/appcache/ApplicationCache.h:
+ Adds the ability to calculate the approximate size of an ApplicationCache object.
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ * loader/appcache/ApplicationCacheGroup.h:
+ Invokes the ChromeClient callback when the storage layer runs out of space.
+ After the callback is invoked, we re-attempt to store the newest cache,
+ in case the ChromeClient has freed some space.
+ * loader/appcache/ApplicationCacheResource.cpp:
+ * loader/appcache/ApplicationCacheResource.h:
+ Adds the ability to calculate the approximate size of an ApplicationCacheResource object.
+ * loader/appcache/ApplicationCacheStorage.cpp:
+ * loader/appcache/ApplicationCacheStorage.h:
+ Enforces a maximum size for the application cache file.
+ * page/ChromeClient.h:
+ Adds a new callback, invoked when the ApplicationCacheStorage reports that it has
+ reached the maximum size for its database file.
+ * platform/sql/SQLiteDatabase.cpp:
+ * platform/sql/SQLiteDatabase.h:
+ Adds a new method that allows querying for the amount of unused space inside the
+ application cache database file.
+
+2009-07-24 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25415
+ [GTK][ATK] Please implement support for get_text_at_offset
+
+ Use TextEncoding facilities to convert between UTF16 and UTF8
+ instead of rolling our own solution.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (convertUniCharToUTF8):
+
+2009-07-24 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25415
+ [GTK][ATK] Please implement support for get_text_at_offset
+
+ Fix confusion in g_substr between length in bytes and length in
+ characters. Was causing crashes in some situations when dealing
+ with non-ASCII text encoded as UTF8.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (g_substr):
+
+2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: Impossible to add an attribute to a node without attributes
+ https://bugs.webkit.org/show_bug.cgi?id=21108
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement):
+ (WebInspector.ElementsTreeElement.prototype.set hovered):
+ (WebInspector.ElementsTreeElement.prototype.toggleNewButton):
+ (WebInspector.ElementsTreeElement.prototype.ondblclick):
+ (WebInspector.ElementsTreeElement.prototype._startEditing):
+ (WebInspector.ElementsTreeElement.prototype._addNewAttribute):
+ (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
+ * inspector/front-end/inspector.css:
+
+2009-07-24 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Adds support for Firebug's magic $0 variable to access inspected node
+ https://bugs.webkit.org/show_bug.cgi?id=17907
+
+ * inspector/front-end/Console.js:
+ (WebInspector.Console.prototype._ensureCommandLineAPIInstalled): Added _inspectorCommandLineAPI.{
+ _inspectedNodes, _addInspectedNode, $0, $1, $n}
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged): Stores the inspected node history
+ in _inspectorCommandLineAPI._inspectedNodes
+ (WebInspector.ElementsPanel):
+
+2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Dragging a resource in the sidebar should drag it's URL
+ https://bugs.webkit.org/show_bug.cgi?id=14410
+
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceSidebarTreeElement.prototype.onattach):
+
+2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Double click on a resource in the sidebar should open that resource in Safari
+ https://bugs.webkit.org/show_bug.cgi?id=14409
+
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick): open a resource url
+
+2009-07-24 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Xan Lopez.
+
+ Bump pango version requirement to 1.12 and remove unnecessary #ifdefs.
+
+ * platform/graphics/gtk/FontGtk.cpp:
+ (WebCore::getDefaultPangoLayout):
+ * platform/graphics/gtk/FontPlatformDataPango.cpp:
+ (WebCore::FontPlatformData::FontPlatformData):
+ * platform/gtk/Language.cpp:
+
+2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: Missing UIString and other localizedString.js fixes
+ https://bugs.webkit.org/show_bug.cgi?id=27288
+
+ * English.lproj/localizedStrings.js:
+
+2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Inspector: Should Syntax Highlight JSON
+ https://bugs.webkit.org/show_bug.cgi?id=27503
+
+ * inspector/front-end/SourceView.js:
+ (WebInspector.SourceView.prototype._contentLoaded):
+
+2009-07-24 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by Eric Seidel.
+
+ Update WebCore/page/DOMTimer.cpp/h to conform to WebKit
+ Style Guidelines as identified by cpplint.py.
+ https://bugs.webkit.org/show_bug.cgi?id=27624
+
+ * page/DragController.cpp:
+ (WebCore::DragController::~DragController):
+ (WebCore::documentFragmentFromDragData):
+ (WebCore::DragController::dragEnded):
+ (WebCore::DragController::dragEntered):
+ (WebCore::DragController::dragExited):
+ (WebCore::DragController::dragUpdated):
+ (WebCore::DragController::performDrag):
+ (WebCore::asFileInput):
+ (WebCore::DragController::tryDocumentDrag):
+ (WebCore::DragController::delegateDragSourceAction):
+ (WebCore::DragController::concludeEditDrag):
+ (WebCore::DragController::canProcessDrag):
+ (WebCore::DragController::tryDHTMLDrag):
+ (WebCore::DragController::mayStartDragAtEventLocation):
+ (WebCore::getCachedImage):
+ (WebCore::getImage):
+ (WebCore::prepareClipboardForImageDrag):
+ (WebCore::dragLocForDHTMLDrag):
+ (WebCore::DragController::startDrag):
+ (WebCore::DragController::doImageDrag):
+ (WebCore::DragController::doSystemDrag):
+ (WebCore::DragController::placeDragCaret):
+
+2009-07-24 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by Eric Seidel.
+
+ Update WebCore/page/Chrome.cpp to conform to WebKit
+ Style Guidelines as identified by cpplint.py.
+ https://bugs.webkit.org/show_bug.cgi?id=27608
+
+ * page/Chrome.cpp:
+ (WebCore::Chrome::runBeforeUnloadConfirmPanel):
+ (WebCore::Chrome::runJavaScriptAlert):
+ (WebCore::Chrome::runJavaScriptConfirm):
+ (WebCore::Chrome::runJavaScriptPrompt):
+ (WebCore::Chrome::shouldInterruptJavaScript):
+ (WebCore::Chrome::setToolTip):
+ (WebCore::Chrome::requestGeolocationPermissionForFrame):
+ (WebCore::ChromeClient::generateReplacementFile):
+ (WebCore::ChromeClient::paintCustomScrollbar):
+
+2009-07-24 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by Eric Seidel.
+
+ Update WebCore/page/Coordinates.cpp to conform to WebKit
+ Style Guidelines as identified by cpplint.py.
+ https://bugs.webkit.org/show_bug.cgi?id=27614
+
+ * page/Coordinates.cpp:
+ (WebCore::Coordinates::toString):
+
+2009-07-24 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by Eric Seidel.
+
+ Update WebCore/page/DOMSelection.cpp/h to conform to WebKit
+ Style Guidelines as identified by cpplint.py.
+ https://bugs.webkit.org/show_bug.cgi?id=27614
+
+ * page/DOMSelection.cpp:
+ (WebCore::DOMSelection::setBaseAndExtent):
+ (WebCore::DOMSelection::modify):
+ (WebCore::DOMSelection::addRange):
+ (WebCore::DOMSelection::deleteFromDocument):
+ * page/DOMSelection.h:
+
+2009-07-24 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by Eric Seidel.
+
+ Update WebCore/page/DOMTimer.cpp/h to conform to WebKit
+ Style Guidelines as identified by cpplint.py.
+ https://bugs.webkit.org/show_bug.cgi?id=27618
+
+ * page/DOMTimer.cpp:
+ (WebCore::DOMTimer::DOMTimer):
+ (WebCore::DOMTimer::~DOMTimer):
+ (WebCore::DOMTimer::fired):
+ (WebCore::DOMTimer::suspend):
+ (WebCore::DOMTimer::resume):
+ (WebCore::DOMTimer::canSuspend):
+ * page/DOMTimer.h:
+ (WebCore::DOMTimer::minTimerInterval):
+ (WebCore::DOMTimer::setMinTimerInterval):
+
+2009-07-24 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Classes call DOMObject::mark() explicitly, should call DOMObjectWithGlobal::mark() instead
+ https://bugs.webkit.org/show_bug.cgi?id=27641
+
+ Nothing uses globalObject() yet, but this was causing crashes
+ in the patch for bug 27634. This is covered by fast/dom/gc-6.html.
+
+ I decided to change these to Base:: instead of DOMObjectWithGlobal::
+ for future-proofing. All autogenerated classes use a typedef Base
+ to avoid bugs like these. Sadly C+does not have a built-in super:: we could use.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSAbstractWorkerCustom.cpp:
+ (WebCore::JSAbstractWorker::mark):
+ * bindings/js/JSDOMApplicationCacheCustom.cpp:
+ (WebCore::JSDOMApplicationCache::mark):
+ * bindings/js/JSMessageChannelCustom.cpp:
+ (WebCore::JSMessageChannel::mark):
+ * bindings/js/JSMessagePortCustom.cpp:
+ (WebCore::JSMessagePort::mark):
+ * bindings/js/JSNamedNodesCollection.cpp:
+ (WebCore::JSNamedNodesCollection::getOwnPropertySlot):
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::mark):
+ * bindings/js/JSNodeFilterCustom.cpp:
+ (WebCore::JSNodeFilter::mark):
+ * bindings/js/JSNodeIteratorCustom.cpp:
+ (WebCore::JSNodeIterator::mark):
+ * bindings/js/JSSVGElementInstanceCustom.cpp:
+ (WebCore::JSSVGElementInstance::mark):
+ * bindings/js/JSTreeWalkerCustom.cpp:
+ (WebCore::JSTreeWalker::mark):
+
+2009-07-22 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Make most DOMObjects hold onto a JSDOMGlobalObject*
+ https://bugs.webkit.org/show_bug.cgi?id=27588
+
+ This change is almost entirely plumbing. Only one functional
+ change as part of this all (window.document.constructor has the correct prototype)
+ Changes are detailed below.
+
+ inner.document.constructor is fixed because all properties on the window
+ object are created with the correct globalObject (instead of the lexical one).
+ Since all objects now carry a globalObject pointer, when document creates
+ HTMLDocumentConstructor it now has the right globalObject to use.
+
+ Tests:
+ fast/dom/prototype-inheritance.html
+ fast/dom/prototype-inheritance-2.html
+
+ * bindings/js/DOMObjectWithSVGContext.h:
+ (WebCore::DOMObjectWithSVGContext::DOMObjectWithSVGContext):
+ Update the comment and add an ignored globalObject argument.
+ * bindings/js/JSDOMBinding.h:
+ Pass a globalObject to all DOMObjects during creation. Currently it's the wrong global object.
+ Once toJS is passed a globalObject it will be the right one.
+ (WebCore::createDOMObjectWrapper):
+ (WebCore::createDOMNodeWrapper):
+ * bindings/js/JSDOMGlobalObject.h:
+ (WebCore::JSDOMGlobalObject::globalObject): Makes binding generation easier.
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::history): JSHistory is now passed a globalObject, but since it has no custom constructor it doesn't use it.
+ (WebCore::JSDOMWindow::location): JSLocation is now passed a globalObject, but since it has no custom constructor it doesn't use it.
+ * bindings/js/JSDocumentCustom.cpp:
+ (WebCore::JSDocument::location): JSLocation is now passed a globalObject, but since it has no custom constructor it doesn't use it.
+ * bindings/js/JSHTMLAllCollection.h:
+ (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
+ * bindings/js/JSHTMLCollectionCustom.cpp: Re-factoring needed to pass globalObject to JSNamedNodesCollection constructor.
+ (WebCore::getNamedItems):
+ (WebCore::callHTMLCollection):
+ (WebCore::JSHTMLCollection::canGetItemsForName):
+ (WebCore::JSHTMLCollection::nameGetter):
+ (WebCore::JSHTMLCollection::item):
+ (WebCore::JSHTMLCollection::namedItem):
+ * bindings/js/JSHTMLFormElementCustom.cpp:
+ (WebCore::JSHTMLFormElement::nameGetter):
+ * bindings/js/JSNamedNodesCollection.cpp:
+ Now passed globalObject. This is tested by inner.document.forms.testForm.
+ The passed globalObject is still wrong until toJS is fixed.
+ (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
+ * bindings/js/JSNamedNodesCollection.h:
+ * bindings/js/JSSharedWorkerConstructor.cpp:
+ Add DOMConstructorObject missed by http://trac.webkit.org/changeset/45938
+ This class is not compiled by default, so not testable.
+ (WebCore::JSSharedWorkerConstructor::JSSharedWorkerConstructor):
+ * bindings/js/JSSharedWorkerConstructor.h:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ Make all bindings objects carry a globalObject pointer using DOMObjectWithGlobalPointer.
+ SVG bindings which need a context() pointer do not have enough space for globalObject() too.
+ WorkerContext does not need a globalObject (it is one), so special case it.
+ Make all .constructor calls use the stored globalObject(). This is what fixes window.document.constructor.
+ Make all constructors inherit from DOMConstructorObject for consistency. Since the auto-bound constructors
+ override createStructure anyway, there is no functional change here. Just completing work started in r45938.
+
+2009-07-23 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ WebCore has a few places that don't gracefully handle a null request returned from willSendRequest.
+ https://bugs.webkit.org/show_bug.cgi?id=27595
+
+ Test: http/tests/misc/will-send-request-returns-null-on-redirect.html
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::removeResource): Null-check the request URL.
+
+ * platform/network/cf/ResourceHandleCFNet.cpp: Ditto, and return null instead of creating an empty one.
+ (WebCore::willSendRequest):
+
+2009-07-23 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 27633 - AXLoadComplete can be fired off to frequently
+ https://bugs.webkit.org/show_bug.cgi?id=27633
+
+ An integration issue left out some curly braces.
+
+ * dom/Document.cpp:
+ (WebCore::Document::implicitClose):
+
+2009-07-23 Darin Adler <darin@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ URL appears in back/forward button menu instead of title for items with custom representation
+ https://bugs.webkit.org/show_bug.cgi?id=27586
+ rdar://problem/5060337
+
+ * WebCore.base.exp: Exported DocumentLoader::setTitle for use by Mac WebKit.
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::didChangeTitle): Tightened code to check if the document
+ loader is the correct one; previously this would never happen because we'd
+ commit the load before any title changes could be registered, but now we can
+ encounter a case where we get a title during a provisional load.
+
+2009-07-23 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ [CSS3 Backgrounds and Borders] Add support for inset box shadows
+ https://bugs.webkit.org/show_bug.cgi?id=27582
+
+ Test: fast/box-shadow/inset.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::valueForShadow): Set the ShadowValue’s shadow style to 'inset'
+ as needed.
+
+ * css/CSSParser.cpp:
+ (WebCore::ShadowParseContext::ShadowParseContext): Added style and allowStyle
+ members. Initialize the allowStyle member.
+ (WebCore::ShadowParseContext::commitValue): Pass the style value to the
+ ShadowValue constructor. Reset allowStyle.
+ (WebCore::ShadowParseContext::commitLength): Update allowStyle.
+ (WebCore::ShadowParseContext::commitColor): Ditto.
+ (WebCore::ShadowParseContext::commitStyle): Added. Sets the style member and
+ updates the state.
+ (WebCore::CSSParser::parseShadow): Parse the 'inset' keyword.
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty): Get the style value from the
+ shadow value and pass it to the ShadowData constructor.
+
+ * css/ShadowValue.cpp:
+ (WebCore::ShadowValue::ShadowValue): Added style.
+ (WebCore::ShadowValue::cssText): Added style.
+
+ * css/ShadowValue.h:
+ (WebCore::ShadowValue::create): Added style.
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::blendFunc): Added a blend function for shadow styles. When blending
+ between normal and inset shadows, all intermediate values map to normal.
+ (WebCore::PropertyWrapperShadow::blend): Added normal style to the default
+ shadow.
+
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::paintBoxShadow): Added a shadow style parameter,
+ which is passed through to RenderBoxModelObject::paintBoxShadow().
+
+ (WebCore::InlineFlowBox::paintBoxDecorations): Paint inset shadows on top of
+ the background.
+
+ * rendering/InlineFlowBox.h:
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::paintBoxDecorations): Paint inset shadows on top of the
+ background.
+
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paintBoxShadow): Added a shadow style
+ parameter, and code to paint inset shadows.
+
+ * rendering/RenderBoxModelObject.h:
+
+ * rendering/RenderFieldset.cpp:
+ (WebCore::RenderFieldset::paintBoxDecorations): Paint inset shadows on top of
+ the background.
+
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::paintBoxDecorations): Ditto.
+
+ * rendering/RenderTableCell.cpp:
+ (WebCore::RenderTableCell::paintBoxDecorations): Ditto.
+
+ * rendering/style/ShadowData.h:
+ Added a ShadowStyle enum.
+ (WebCore::ShadowData::ShadowData): Add and initialize a style member.
+
+2009-07-23 Simon Fraser <simon.fraser@apple.com>
+
+ Fix the build with UNUSED_PARAM(frame) for when ENABLE(3D_RENDERING) is not defined.
+
+ * css/MediaQueryEvaluator.cpp:
+ (WebCore::transform_3dMediaFeatureEval):
+
+2009-07-23 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ 3d-transforms media query needs to look check that accelerated compositing is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=27621
+
+ When evaluating a media query with '-webkit-transform-3d', we need to check the
+ runtime switch that toggles accererated compositing, and therefore 3D.
+
+ No test because we can't disable the pref dynamically in DRT.
+
+ * css/MediaQueryEvaluator.cpp:
+ (WebCore::transform_3dMediaFeatureEval):
+
+2009-07-22 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ execCommand('underline') can't remove <U> underlines
+ https://bugs.webkit.org/show_bug.cgi?id=20215
+
+ This patch adds support for u, s, and strike to implicitlyStyledElementShouldBeRemovedWhenApplyingStyle so that
+ WebKit can remove those presentational tags when necessary.
+ It also modifies StyleChange::init not to add "text-decoration: none". Not only is this style meaningless
+ (does not override inherited styles) but it was also causing WebKit to generate extra spans with this style.
+
+ * css/CSSValueList.cpp:
+ (WebCore::CSSValueList::hasValue): True if the property contains the specified value
+ * css/CSSValueList.h: Updated prototype
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::StyleChange::init): No longer adds "text-decoration: none"
+ (WebCore::ApplyStyleCommand::implicitlyStyledElementShouldBeRemovedWhenApplyingStyle): Supports text-decoration-related elements
+
+2009-07-23 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27554
+ Expose the value of text-overflow in getComputedStyle.
+
+ Test: fast/css/getComputedStyle/getComputedStyle-text-overflow.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::):
+ Add text-overflow to the list of computedProperties.
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ Return the value of the text-overflow property.
+
+2009-07-23 Yongjun Zhang <yongjun.zhang@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27510
+
+ [S60 QtWebKit] Don't put some intermediate generated files into the final mmp project
+ file for linking. This is a temporary workaround for qmake bug in Symbian port, should
+ be reverted after qmake is fixed.
+
+ * WebCore.pro:
+
+2009-07-23 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ [V8] Fix an assert in running workers in Chrome.
+ https://bugs.webkit.org/show_bug.cgi?id=27620
+
+ The fix is to change V8DOMMap::removeAllDOMObjectsInCurrentThreadHelper
+ to do not call removeObjectsFromWrapperMap for certain types of DOM
+ objects that exist only in main thread.
+
+ * bindings/v8/V8DOMMap.cpp:
+ (WebCore::removeAllDOMObjectsInCurrentThreadHelper):
+
+2009-07-23 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27572
+ Implement support for background-attachment:local.
+
+ Added new test fast/overflow/overflow-with-local-attachment.html.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseFillProperty):
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator EFillAttachment):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::mapFillAttachment):
+ * css/CSSValueKeywords.in:
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+ (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
+ * rendering/style/FillLayer.h:
+ (WebCore::FillLayer::attachment):
+ (WebCore::FillLayer::setAttachment):
+ (WebCore::FillLayer::hasFixedImage):
+ (WebCore::FillLayer::initialFillAttachment):
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::backgroundAttachment):
+ (WebCore::InheritedFlags::maskAttachment):
+ * rendering/style/RenderStyleConstants.h:
+ (WebCore::):
+
+2009-07-23 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ copyInheritableProperties and removeComputedInheritablePropertiesFrom should be deprecated
+ https://bugs.webkit.org/show_bug.cgi?id=27325
+
+ This patch deprecates copyInheritableProperties because it has been used for two different purposes:
+ 1. Calculating the typing style.
+ 2. Moving HTML subtrees and seeking to remove redundant styles.
+ These tasks should be broken out into two separate functions. New code should not use this function.
+
+ It deletes removeComputedInheritablePropertiesFrom because it hasn't been used anywhere.
+
+ There is no test since the patch does not change any behavior.
+
+ * css/CSSComputedStyleDeclaration.cpp: removeComputedInheritablePropertiesFrom has been removed
+ (WebCore::CSSComputedStyleDeclaration::deprecatedCopyInheritableProperties): has been renamed from copyInheritableProperties
+ * css/CSSComputedStyleDeclaration.h: ditto
+ * editing/DeleteSelectionCommand.cpp: ditto
+ (WebCore::removeEnclosingAnchorStyle): ditto
+ (WebCore::DeleteSelectionCommand::saveTypingStyleState): ditto
+ * editing/EditCommand.cpp: ditto
+ (WebCore::EditCommand::styleAtPosition): ditto
+ * editing/RemoveFormatCommand.cpp: ditto
+ (WebCore::RemoveFormatCommand::doApply): ditto
+ * editing/ReplaceSelectionCommand.cpp: ditto
+ (WebCore::handleStyleSpansBeforeInsertion): ditto
+ (WebCore::ReplaceSelectionCommand::handleStyleSpans): ditto
+ * editing/markup.cpp: ditto
+ (WebCore::removeEnclosingMailBlockquoteStyle): ditto
+ (WebCore::removeDefaultStyles): ditto
+ (WebCore::createMarkup): ditto
+
+2009-07-22 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Audio element at default width shouldn't have time field.
+ https://bugs.webkit.org/show_bug.cgi?id=27589
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlTimeDisplayElement::setVisible): Make sure we don't
+ forget to remember the visibility if there is no renderer.
+
+2009-07-23 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=27598 Clean up the
+ AccessibilityObject class
+
+ Mostly this is just moving empty stubs into the header rather than
+ muddying the cpp file with them. A few functions were made pure
+ virtual.
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::isARIAControl):
+ (WebCore::AccessibilityObject::clickPoint):
+ (WebCore::AccessibilityObject::documentFrameView):
+ (WebCore::AccessibilityObject::actionVerb):
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::intValue):
+ (WebCore::AccessibilityObject::layoutCount):
+ (WebCore::AccessibilityObject::doAccessibilityHitTest):
+ (WebCore::AccessibilityObject::focusedUIElement):
+ (WebCore::AccessibilityObject::firstChild):
+ (WebCore::AccessibilityObject::lastChild):
+ (WebCore::AccessibilityObject::previousSibling):
+ (WebCore::AccessibilityObject::nextSibling):
+ (WebCore::AccessibilityObject::parentObjectIfExists):
+ (WebCore::AccessibilityObject::observableObject):
+ (WebCore::AccessibilityObject::linkedUIElements):
+ (WebCore::AccessibilityObject::titleUIElement):
+ (WebCore::AccessibilityObject::ariaRoleAttribute):
+ (WebCore::AccessibilityObject::isPresentationalChildOfAriaRole):
+ (WebCore::AccessibilityObject::ariaRoleHasPresentationalChildren):
+ (WebCore::AccessibilityObject::roleValue):
+ (WebCore::AccessibilityObject::ariaAccessiblityName):
+ (WebCore::AccessibilityObject::ariaLabeledByAttribute):
+ (WebCore::AccessibilityObject::ariaDescribedByAttribute):
+ (WebCore::AccessibilityObject::accessibilityDescription):
+ (WebCore::AccessibilityObject::ariaSelectedTextDOMRange):
+ (WebCore::AccessibilityObject::axObjectCache):
+ (WebCore::AccessibilityObject::axObjectID):
+ (WebCore::AccessibilityObject::setAXObjectID):
+ (WebCore::AccessibilityObject::anchorElement):
+ (WebCore::AccessibilityObject::actionElement):
+ (WebCore::AccessibilityObject::boundingBoxRect):
+ (WebCore::AccessibilityObject::selectedTextRange):
+ (WebCore::AccessibilityObject::selectionStart):
+ (WebCore::AccessibilityObject::selectionEnd):
+ (WebCore::AccessibilityObject::url):
+ (WebCore::AccessibilityObject::selection):
+ (WebCore::AccessibilityObject::stringValue):
+ (WebCore::AccessibilityObject::title):
+ (WebCore::AccessibilityObject::helpText):
+ (WebCore::AccessibilityObject::textUnderElement):
+ (WebCore::AccessibilityObject::text):
+ (WebCore::AccessibilityObject::textLength):
+ (WebCore::AccessibilityObject::selectedText):
+ (WebCore::AccessibilityObject::accessKey):
+ (WebCore::AccessibilityObject::widget):
+ (WebCore::AccessibilityObject::widgetForAttachmentView):
+ (WebCore::AccessibilityObject::setFocused):
+ (WebCore::AccessibilityObject::setSelectedText):
+ (WebCore::AccessibilityObject::setSelectedTextRange):
+ (WebCore::AccessibilityObject::setValue):
+ (WebCore::AccessibilityObject::setSelected):
+ (WebCore::AccessibilityObject::makeRangeVisible):
+ (WebCore::AccessibilityObject::childrenChanged):
+ (WebCore::AccessibilityObject::addChildren):
+ (WebCore::AccessibilityObject::hasChildren):
+ (WebCore::AccessibilityObject::selectedChildren):
+ (WebCore::AccessibilityObject::visibleChildren):
+ (WebCore::AccessibilityObject::visiblePositionRange):
+ (WebCore::AccessibilityObject::visiblePositionRangeForLine):
+ (WebCore::AccessibilityObject::boundsForVisiblePositionRange):
+ (WebCore::AccessibilityObject::setSelectedVisiblePositionRange):
+ (WebCore::AccessibilityObject::visiblePositionForPoint):
+ (WebCore::AccessibilityObject::nextVisiblePosition):
+ (WebCore::AccessibilityObject::previousVisiblePosition):
+ (WebCore::AccessibilityObject::visiblePositionForIndex):
+ (WebCore::AccessibilityObject::indexForVisiblePosition):
+ (WebCore::AccessibilityObject::index):
+ (WebCore::AccessibilityObject::doAXRangeForLine):
+ (WebCore::AccessibilityObject::doAXRangeForIndex):
+ (WebCore::AccessibilityObject::doAXStringForRange):
+ (WebCore::AccessibilityObject::doAXBoundsForRange):
+ (WebCore::AccessibilityObject::updateBackingStore):
+
+2009-07-23 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Fix of <rdar://4877658> Dragging from the area between the horizontal/vertical scrollbars when status bar is showing starts a selection and autoscroll.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleMousePressEvent):
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::wheelEvent):
+ * platform/ScrollView.h:
+
+2009-07-23 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27581
+ Drop the prefix from the box-shadow property.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::):
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ (WebCore::ShadowParseContext::commitLength):
+ (WebCore::cssPropertyID):
+ * css/CSSPropertyNames.in:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ * page/animation/AnimationBase.cpp:
+ (WebCore::ensurePropertyMap):
+
+2009-07-22 Viet-Trung Luu <viettrungluu@gmail.com>
+
+ Reviewed by David Hyatt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27289
+ When a mouse click occurs on a scrollbar without a preceding mouse move
+ onto it, the release isn't handled correctly (since
+ EventHandler::m_lastScrollbarUnderMouse isn't set on mouse down, but
+ only on mouse move). (Side comment: That scrollbar-handling code
+ in EventHandler is ugly. It should be fixed properly.)
+
+ Tests: scrollbars/scrollbar-miss-mousemove.html
+ scrollbars/scrollbar-miss-mousemove-disabled.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleMousePressEvent):
+ (WebCore::EventHandler::handleMouseMoveEvent):
+ (WebCore::EventHandler::updateLastScrollbarUnderMouse):
+ * page/EventHandler.h:
+
+2009-07-23 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by David Levin.
+
+ Update WebCore/page/BarInfo.cpp to conform to WebKit
+ Style Guidelines as identified by cpplint.py.
+ https://bugs.webkit.org/show_bug.cgi?id=27606
+
+ * page/BarInfo.cpp:
+ (WebCore::BarInfo::visible):
+
+2009-07-23 Mike Fenton <mike.fenton@torchmobile.com>
+
+ Reviewed by David Levin.
+
+ Update WebCore/page/Console.cpp to conform to WebKit
+ Style Guidelines as identified by cpplint.py.
+ https://bugs.webkit.org/show_bug.cgi?id=27606
+
+ * page/Console.cpp:
+ (WebCore::printMessageSourceAndLevelPrefix):
+ (WebCore::Console::profile):
+ (WebCore::Console::time):
+
+2009-07-23 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ Fix crashes with the QObject bindings after garbage collection.
+
+ There is one QtInstance per wrapped QObject, and that QtInstance keeps
+ references to cached JSObjects for slots. When those objects get
+ deleted due to GC, then they becoming dangling pointers.
+
+ When a cached member dies, it is now removed from the QtInstance's
+ cache.
+
+ As we cannot track the lifetime of the children, we have to remove
+ them from QtInstance alltogether. They are not cached and were
+ only used for mark(), but we _want_ them to be subject to gc.
+
+ * bridge/qt/qt_instance.cpp:
+ (JSC::Bindings::QtInstance::~QtInstance): Minor coding style cleanup,
+ use qDeleteAll().
+ (JSC::Bindings::QtInstance::removeCachedMethod): New function, to
+ clean m_methods and m_defaultMethod.
+ (JSC::Bindings::QtInstance::mark): Avoid marking already marked objects.
+ (JSC::Bindings::QtField::valueFromInstance): Don't save children for
+ marking.
+ * bridge/qt/qt_instance.h: Declare removeCachedMethod.
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::QtRuntimeMethod::~QtRuntimeMethod): Call removeCachedMethod
+ with this on the instance.
+
+2009-07-23 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Mark Rowe.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27599
+ 'const unsigned' in return value
+
+ Remove const modifier from unsigned return value, as it does not
+ make sense.
+
+ * dom/ErrorEvent.h:
+
+2009-07-22 Jens Alfke <snej@chromium.org>
+
+ Reviewed by David Levin.
+
+ Bug 22784: Improve keyboard navigation of Select elements.
+ Home/End and PageUp/PageDn buttons do not do anything in drop down lists,
+ on non-Mac platforms.
+ https://bugs.webkit.org/show_bug.cgi?id=22784
+ http://code.google.com/p/chromium/issues/detail?id=4576
+
+ New test: LayoutTests/fast/forms/select-popup-pagekeys.html
+
+ * dom/SelectElement.cpp:
+ (WebCore::nextValidIndex):
+ New utility fn for traversing items of a select's list.
+ (WebCore::SelectElement::menuListDefaultEventHandler):
+ Added code to handle Home/End and PageUp/PageDn when ARROW_KEYS_POP_MENU is false.
+
+2009-07-23 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Mark Rowe.
+
+ Fix a couple of compiler warnings.
+
+ * platform/graphics/cairo/ImageBufferCairo.cpp:
+ (copySurface):
+ * platform/graphics/gtk/SimpleFontDataGtk.cpp:
+ (WebCore::SimpleFontData::containsCharacters):
+
+2009-07-22 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Rubber-stamped by David Levin.
+
+ Enable HTML5 Datagrid defines for the Qt build.
+
+ * WebCore.pro:
+
+2009-07-22 Adam Barth <abarth@webkit.org>
+
+ Reviewed by David Levin.
+
+ [V8] Make Node wrappers go fast
+ https://bugs.webkit.org/show_bug.cgi?id=27597
+
+ Profiles indicate we're spending a lot of time asking whether we're on
+ the main thread when looking up DOM wrappers for Nodes, but there isn't
+ much point in doing that work because Nodes only exist on the main
+ thread. I've also added an assert to keep us honest in this regard.
+
+ * bindings/v8/V8DOMMap.cpp:
+ (WebCore::):
+ (WebCore::getDOMNodeMap):
+ (WebCore::DOMData::getCurrent):
+ (WebCore::DOMData::getCurrentMainThread):
+
+2009-07-22 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Remove unneeded virtual destructor from ScriptSourceProvider
+ https://bugs.webkit.org/show_bug.cgi?id=27563
+
+ * bindings/js/ScriptSourceProvider.h:
+
+2009-07-22 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ execCommand('underline' / 'strikeThrough') doesn't work properly with multiple styles in text-decoration
+ https://bugs.webkit.org/show_bug.cgi?id=27476
+
+ executeStrikethrough and executeUnderline were toggling between "line-through" / "underline" and "none".
+ This patch adds executeToggleStyleInList that toggles a style in CSSValueList instead of toggling the entire value.
+ It modifies CSSComputedStyleDeclaration to return CSSValueList instead of CSSPrimitiveValue for text decorations,
+ and adds removeAll member function to CSSValueList.
+
+ Tests: editing/execCommand/toggle-text-decorations.html
+ fast/css/getComputedStyle/getComputedStyle-text-decoration.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::renderTextDecorationFlagsToCSSValue): Creates a CSSValueList
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Returns a CSSValueList instead of CSSValue
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue): Text decorations are space separated instead of comma separated
+ * css/CSSValueList.cpp:
+ (WebCore::CSSValueList::removeAll): Removes all values that match the specified value
+ * css/CSSValueList.h:
+ * editing/EditorCommand.cpp:
+ (WebCore::applyCommandToFrame): Apply style to a frame using specified command
+ (WebCore::executeApplyStyle): Uses applyCommandToFrame
+ (WebCore::executeToggleStyleInList): Uses applyCommandToFrame
+ (WebCore::executeToggleStyle): Toggles a style in CSSValueList
+ (WebCore::executeStrikethrough): Uses executeToggleStyleInList
+ (WebCore::executeUnderline): Uses executeToggleStyleInList
+
+2009-07-22 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27174
+ And
+ https://bugs.webkit.org/show_bug.cgi?id=26938
+
+ Code cleanup. Implements support for detecting attacks transformed by
+ PHP Magic Quotes/PHP addslashes().
+
+ Tests: http/tests/security/xssAuditor/script-tag-addslashes-backslash.html
+ http/tests/security/xssAuditor/script-tag-addslashes-double-quote.html
+ http/tests/security/xssAuditor/script-tag-addslashes-null-char.html
+ http/tests/security/xssAuditor/script-tag-addslashes-single-quote.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::isInvalidCharacter):
+ (WebCore::XSSAuditor::canEvaluate):
+ (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
+ (WebCore::XSSAuditor::canLoadObject):
+ (WebCore::XSSAuditor::normalize): Decodes HTML entities, removes backslashes,
+ and removes control characters that could otherwise cause a discrepancy between
+ the source code of a script and the outgoing HTTP parameters.
+ (WebCore::XSSAuditor::decodeURL):
+ (WebCore::XSSAuditor::decodeHTMLEntities):
+ (WebCore::XSSAuditor::findInRequest):
+ * page/XSSAuditor.h:
+
+2009-07-22 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Null deref in JSObject::mark due to null xhr wrapper
+ https://bugs.webkit.org/show_bug.cgi?id=27565
+
+ Make event target binding for appcache and xhr behave in the same way as
+ it does for all other events.
+
+ No test as I couldn't make a testcase which was remotely reliable.
+
+ * bindings/js/JSEventTarget.cpp:
+ (WebCore::toJS):
+
+2009-07-22 Mads Ager <ager@chromium.org>
+
+ Reviewed by David Levin.
+
+ Inform V8 of the amount of WebCore string memory it is keeping alive.
+ https://bugs.webkit.org/show_bug.cgi?id=27537
+
+ V8 uses external strings that are backed by WebCore strings. Since
+ the external strings themselves are small, V8 has no way of
+ knowing how much memory it is actually holding on to. With this
+ change, we inform V8 of the amount of WebCore string data it is
+ holding on to with external strings.
+
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::WebCoreStringResource::WebCoreStringResource):
+ (WebCore::WebCoreStringResource::~WebCoreStringResource):
+
+2009-07-22 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27562
+ Add the finalized versions of background-clip and background-origin. Remove background-clip from
+ the background shorthand and have it be auto-set based off background-origin's value.
+
+ Three new tests added in fast/backgrounds/size
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::):
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * css/CSSMutableStyleDeclaration.cpp:
+ (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ (WebCore::CSSParser::parseFillShorthand):
+ (WebCore::CSSParser::parseFillProperty):
+ * css/CSSPropertyLonghand.cpp:
+ (WebCore::initShorthandMap):
+ * css/CSSPropertyNames.in:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ * css/CSSValueKeywords.in:
+
+2009-07-22 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Hook up V8 bindings for DataGrid elements.
+ https://bugs.webkit.org/show_bug.cgi?id=27383
+ http://code.google.com/p/chromium/issues/detail?id=16730
+
+ Tests: Enhanced LayoutTests/fast/dom/HTMLDataGridElement/*
+ to handle exceptions, check appropriate JS prototypes, and
+ test column-list's item() method as well as array-indexing.
+
+ * WebCore.gypi: Added new source files.
+ * bindings/scripts/CodeGeneratorV8.pm: Made GenerateBatchedAttributeData put #if's around conditional attributes.
+ * bindings/v8/DOMObjectsInclude.h: #include DataGrid headers.
+ * bindings/v8/V8DOMWrapper.cpp: Add bindings from HTML tags to datagrid templates.
+ (WebCore::V8DOMWrapper::getTemplate): Customize datagrid template.
+ * bindings/v8/V8DataGridDataSource.cpp: Added. (Based on JSDataGridDataSource)
+ (WebCore::V8DataGridDataSource::V8DataGridDataSource):
+ (WebCore::V8DataGridDataSource::~V8DataGridDataSource):
+ * bindings/v8/V8DataGridDataSource.h: Added. (Based on JSDataGridDataSource)
+ (WebCore::V8DataGridDataSource::create):
+ (WebCore::V8DataGridDataSource::isJSDataGridDataSource):
+ (WebCore::V8DataGridDataSource::jsDataSource):
+ (WebCore::asV8DataGridDataSource):
+ * bindings/v8/V8GCController.h: Added new handle type "DATASOURCE".
+ * bindings/v8/V8Index.h: Conditionalize datagrid stuff.
+ * bindings/v8/custom/V8CustomBinding.h: Declare more accessors. Conditionalize.
+ * bindings/v8/custom/V8DataGridColumnListCustom.cpp: Added.
+ * bindings/v8/custom/V8HTMLDataGridElementCustom.cpp: Fill in dataSource accessors.
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+
+2009-07-22 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ pushDownTextDecorationStyleAroundNode needs clean up
+ https://bugs.webkit.org/show_bug.cgi?id=27556
+
+ Cleaned up. pushDownTextDecorationStyleAroundNode traverses tree vertically from highestAncestor to targetNode
+ While traversing, it will apply the specified style to all nodes but targetNode.
+ i.e. the style is applies to all ancestor nodes and their siblings of targetNode.
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::ApplyStyleCommand::pushDownTextDecorationStyleAroundNode): Cleaned up and added comments
+ * editing/ApplyStyleCommand.h: Updated prototype
+
+2009-07-22 Peter Kasting <pkasting@google.com>
+
+ Reviewed by David Kilzer.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27323
+ Handle any type of line endings in WebCore/css/*CSSPropertyNames.in.
+
+ * DerivedSources.make:
+ * css/makeprop.pl:
+ * css/makevalues.pl:
+
+2009-07-22 Paul Godavari <paul@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Chromium has a build break after removal of JSRGBColor bindings
+ https://bugs.webkit.org/show_bug.cgi?id=27548
+
+ Fix a build break in Chromium V8 after the JSRGBColor bindings change:
+ https://bugs.webkit.org/show_bug.cgi?id=27242
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+
+2009-07-22 Adam Langley <agl@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Chromium Linux: add static functions to FontPlatformData which allow
+ for setting the global font rendering preferences.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27513
+ http://code.google.com/p/chromium/issues/detail?id=12179
+
+ This should not affect any layout tests.
+
+ * platform/graphics/chromium/FontPlatformDataLinux.cpp:
+ (WebCore::FontPlatformData::setHinting):
+ (WebCore::FontPlatformData::setAntiAlias):
+ (WebCore::FontPlatformData::setSubpixelGlyphs):
+ (WebCore::FontPlatformData::setupPaint):
+ * platform/graphics/chromium/FontPlatformDataLinux.h:
+
+2009-07-22 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Move Inspector panels creation into a function to make possible introducing
+ custom panels.
+
+ * inspector/front-end/inspector.js:
+ (WebInspector._createPanels):
+ (WebInspector.loaded):
+
+2009-07-22 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Print console command message upon evaluate
+ selection request; Handle errors in evaluation request
+ properly.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27535
+
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._evalSelectionInCallFrame):
+
+2009-07-22 Xan Lopez <xlopez@igalia.com>
+
+ Attempt to fix the GTKbuild.
+
+ * GNUmakefile.am:
+
+2009-07-21 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Fix the Qt build.
+
+ * WebCore.pro: Add RGBColor.cpp to the build, remove JSRGBColor.
+
+2009-07-21 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27494
+
+ Fixes an issue that can cause a crash or unexpected behavior when calling
+ WebCore::ScriptSourceCode::source on a cached script.
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/CachedScriptSourceProvider.h: Modified to inherit from
+ WebCore::ScriptSourceCode.
+ (WebCore::CachedScriptSourceProvider::source):
+ (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
+ * bindings/js/ScriptSourceCode.h:
+ (WebCore::ScriptSourceCode::ScriptSourceCode): Separated out source provider and
+ rewrote to use WebCore::ScriptSourceProvider.
+ (WebCore::ScriptSourceCode::source):
+ * bindings/js/ScriptSourceProvider.h: Added.
+ (WebCore::ScriptSourceProvider::ScriptSourceProvider):
+ (WebCore::ScriptSourceProvider::~ScriptSourceProvider):
+ * bindings/js/StringSourceProvider.h: Modified to inherit from
+ WebCore::ScriptSourceCode.
+ (WebCore::StringSourceProvider::StringSourceProvider):
+
+2009-07-21 Sam Weinig <sam@webkit.org>
+
+ Another attempt to fix the Windows build.
+
+ * WebCore.vcproj/WebCore.vcproj:
+
+2009-07-21 Sam Weinig <sam@webkit.org>
+
+ Attempt to fix the Windows build.
+
+ * DerivedSources.cpp:
+
+2009-07-21 Sam Weinig <sam@webkit.org>
+
+ Attempt to fix the GTK build.
+
+ * GNUmakefile.am:
+
+2009-07-21 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Autogenerate Objective-C binding implementation for RGBColor.
+
+ No functionality change.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/objc/DOMRGBColor.mm: Removed.
+ * bindings/scripts/CodeGeneratorObjC.pm: Add logic to convert from
+ WebCore::Color to NSColor*.
+ * css/RGBColor.idl:
+
+2009-07-21 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=27242
+ JSC bindings should use an auto-bound RGBColor class instead of hand-rolled JSRGBColor
+
+ Move the JSC and Objective-C bindings onto using the RGBColor object instead
+ of just an unsigned int. The JSC bindings are now completely autogenerated for
+ this class. (Also removes the last lut from WebCore).
+
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * bindings/js/JSRGBColor.cpp: Removed.
+ * bindings/js/JSRGBColor.h: Removed.
+ * bindings/objc/DOM.mm:
+ (-[DOMRGBColor _color]):
+ * bindings/objc/DOMRGBColor.mm:
+ (-[DOMRGBColor dealloc]):
+ (-[DOMRGBColor finalize]):
+ (-[DOMRGBColor red]):
+ (-[DOMRGBColor green]):
+ (-[DOMRGBColor blue]):
+ (-[DOMRGBColor alpha]):
+ (-[DOMRGBColor color]):
+ * bindings/scripts/CodeGenerator.pm:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bindings/scripts/CodeGeneratorObjC.pm:
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseColor):
+ * css/CSSPrimitiveValue.cpp:
+ (WebCore::CSSPrimitiveValue::getRGBColorValue):
+ * css/CSSPrimitiveValue.h:
+ (WebCore::CSSPrimitiveValue::getRGBA32Value):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
+ * css/RGBColor.cpp:
+ (WebCore::RGBColor::alpha):
+ * css/RGBColor.h:
+ (WebCore::RGBColor::color):
+ (WebCore::RGBColor::RGBColor):
+ * css/RGBColor.idl:
+ * page/DOMWindow.idl:
+ * svg/SVGColor.cpp:
+ (WebCore::SVGColor::rgbColor):
+ * svg/SVGColor.h:
+
+2009-07-21 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ Implement AbstractWorker::dispatchScriptErrorEvent by generating an ErrorEvent.
+ https://bugs.webkit.org/show_bug.cgi?id=27515
+
+ * workers/AbstractWorker.cpp:
+ (WebCore::AbstractWorker::dispatchScriptErrorEvent):
+
+2009-07-21 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Move m_context out of generator into a superclass
+ https://bugs.webkit.org/show_bug.cgi?id=27521
+
+ Mostly this is removing code from CodeGeneratorJS
+ and instead using a DOMObjectWithSVGContext superclass in JSDOMBinding.h.
+
+ DOMObjectWithSVGContext.h is its own file so that WebKit doesn't need to
+ know about SVGElement.h (WebKit includes JSDOMBinding.h for some reason).
+
+ I also removed context pointer from SVGZoomEvent since it was never used.
+
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/DOMObjectWithSVGContext.h: Added.
+ (WebCore::DOMObjectWithSVGContext::context):
+ (WebCore::DOMObjectWithSVGContext::DOMObjectWithSVGContext):
+ * bindings/js/JSDOMBinding.h:
+ * bindings/js/JSEventCustom.cpp:
+ (WebCore::toJS):
+ * bindings/scripts/CodeGeneratorJS.pm:
+
+2009-07-21 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ REGRESSION (r46142): editing/execCommand/19087.html & editing/execCommand/19653-1.html fail in Windows build
+ https://bugs.webkit.org/show_bug.cgi?id=27480
+
+ Because m_anchorType : 2 is treated as a signed integer by cl.exe, anchorType() wasn't returning the correct value.
+ We made m_anchorType unsigned so that anchorType() returns the correct value.
+
+ * dom/Position.h:
+ (WebCore::Position::anchorType): statically cast to AnchorType
+
+2009-07-21 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ [V8] Add V8 bindings for onerror in WorkerContext.
+ https://bugs.webkit.org/show_bug.cgi?id=27518
+
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+
+2009-07-21 Jian Li <jianli@chromium.org>
+
+ Fix the incorrect patch being landed for bug 27516 that has already been reviewed.
+ https://bugs.webkit.org/show_bug.cgi?id=27516
+
+ * workers/WorkerContext.h:
+ (WebCore::WorkerContext::setOnerror):
+ (WebCore::WorkerContext::onerror):
+ * workers/WorkerContext.idl:
+
+2009-07-21 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add onerror to WorkerContext.
+ https://bugs.webkit.org/show_bug.cgi?id=27516
+
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::mark):
+ * workers/WorkerContext.h:
+ (WebCore::WorkerContext::setOnerror):
+ (WebCore::WorkerContext::onerror):
+ * workers/WorkerContext.idl:
+
+2009-07-21 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27509
+ Add font-related files for the WinCE port.
+
+ Written by Yong Li <yong.li@torchmobile.com>
+
+ * platform/graphics/wince/FontCacheWince.cpp: Added.
+ * platform/graphics/wince/FontCustomPlatformData.cpp: Added.
+ * platform/graphics/wince/FontCustomPlatformData.h: Added.
+ * platform/graphics/wince/FontPlatformData.cpp: Added.
+ * platform/graphics/wince/FontPlatformData.h: Added.
+ * platform/graphics/wince/FontWince.cpp: Added.
+ * platform/graphics/wince/GlyphPageTreeNodeWince.cpp: Added.
+ * platform/graphics/wince/SimpleFontDataWince.cpp: Added.
+
+2009-07-21 Kevin Ollivier <kevino@theolliviers.com>
+
+ Fix the Windows build, and update the comment on top now that wx uses WebCorePrefix.h too.
+
+ * WebCorePrefix.h:
+
+2009-07-21 Kevin Ollivier <kevino@theolliviers.com>
+
+ WebCorePrefix.h build fixes for non-Mac and wx / CURL builds.
+
+ * WebCorePrefix.h:
+
+2009-07-21 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ All DOMConstructorObjects should hold a pointer to the JSDOMGlobalObject
+ https://bugs.webkit.org/show_bug.cgi?id=27478
+
+ This is just moving code.
+ I've added two new classes: DOMObjectWithGlobalPointer and DOMConstructorWithDocument.
+
+ DOMObjectWithGlobalPointer is a new baseclass for DOMConstructorObject.
+ (It's a baseclass because eventually all DOMObjects will have a global pointer, but
+ I'll be moving them onto DOMObjectWithGlobalPointer in stages.)
+
+ DOMConstructorWithDocument is a new baseclass for the 3 constructor objects
+ which require a backpointer to the Document to function. I made this a subclass of
+ DOMConstructorObject to make clear that most constructors can hold no-such assumptions
+ about having a back-pointer to the Document (since many constructors can be used from Workers).
+
+ * bindings/js/JSAudioConstructor.cpp:
+ (WebCore::JSAudioConstructor::JSAudioConstructor):
+ * bindings/js/JSAudioConstructor.h:
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::DOMObjectWithGlobalPointer::globalObject):
+ (WebCore::DOMObjectWithGlobalPointer::scriptExecutionContext):
+ (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
+ (WebCore::DOMObjectWithGlobalPointer::mark):
+ (WebCore::DOMConstructorObject::DOMConstructorObject):
+ (WebCore::DOMConstructorWithDocument::document):
+ (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
+ * bindings/js/JSImageConstructor.cpp:
+ (WebCore::JSImageConstructor::JSImageConstructor):
+ * bindings/js/JSImageConstructor.h:
+ * bindings/js/JSMessageChannelConstructor.cpp:
+ (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
+ * bindings/js/JSMessageChannelConstructor.h:
+ * bindings/js/JSOptionConstructor.cpp:
+ (WebCore::JSOptionConstructor::JSOptionConstructor):
+ * bindings/js/JSOptionConstructor.h:
+ * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
+ (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor):
+ * bindings/js/JSWebKitPointConstructor.cpp:
+ (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor):
+ * bindings/js/JSWorkerConstructor.cpp:
+ (WebCore::JSWorkerConstructor::JSWorkerConstructor):
+ * bindings/js/JSXMLHttpRequestConstructor.cpp:
+ (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
+ * bindings/js/JSXMLHttpRequestConstructor.h:
+ * bindings/js/JSXSLTProcessorConstructor.cpp:
+ (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
+
+2009-07-21 James Hawkins <jhawkins@google.com>
+
+ Reviewed by David Hyatt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27453
+ Initialize isInt when creating a CSSParserValue for a function.
+
+ No change in behavior, so no tests.
+
+ * css/CSSFunctionValue.cpp:
+ (WebCore::CSSFunctionValue::parserValue):
+
+2009-07-20 Jens Alfke <snej@google.com>
+
+ Reviewed by David Levin.
+
+ Bug 27448: [Chromium] On Mac, arrow keys should cause Select to pop up its menu.
+ Mac build of Chromium doesn't follow Mac HI guidelines to pop up the menu when
+ an arrow key is pressed.
+ https://bugs.webkit.org/show_bug.cgi?id=27448
+
+ No new tests; affects only control response to user input.
+
+ * dom/SelectElement.cpp:
+ Changed definition of ARROW_KEYS_POP_MENU to make it true in Mac Chromium,
+ so it will behave compatibly with Mac HI guidelines on pop-up menus.
+ It's not possible to have PLATFORM(MAC) be true in the Mac build of Chromium.
+
+2009-07-21 Paul Godavari <paul@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [Chromium] popup menus can crash when the selected index is -1
+ https://bugs.webkit.org/show_bug.cgi?id=27275
+
+ Crash reports from users indicate a crash can occur when PopupListBox::isSelectableItem
+ is passed an index of less than 0 (which is possible under certain circumstances). This
+ change prevents such a value from causing a crash by enforcing valid index values passed
+ by all callers of isSelectableItem. isSelectableItem is now a private method of
+ PopupListBox, as there are no external callers.
+
+ Also cleaned up a small amount of code for style and grammar errors.
+
+ No automatic test is provided since we cannot send events to the child window used by
+ the popup menu.
+
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::acceptIndex):
+ (WebCore::PopupListBox::selectIndex):
+ (WebCore::PopupListBox::isSelectableItem):
+ (WebCore::PopupListBox::selectPreviousRow):
+
+2009-07-21 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix. Don't include winsock2.h on wx, it conflicts with wx's inclusion of winsock.
+
+ * platform/network/curl/ResourceHandleManager.h:
+
+2009-07-21 Adam Roben <aroben@apple.com>
+
+ Roll out r46153, r46154, and r46155
+
+ These changes were causing build failures and assertion failures on
+ Windows.
+
+ * ForwardingHeaders/wtf/PossiblyNull.h: Removed.
+ * platform/graphics/cg/ImageBufferCG.cpp:
+
+2009-07-21 Jian Li <jianli@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Implement ErrorEvent API.
+ https://bugs.webkit.org/show_bug.cgi?id=27387
+
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * bindings/js/JSEventCustom.cpp:
+ (WebCore::toJS):
+ * dom/ErrorEvent.cpp: Added.
+ * dom/ErrorEvent.h: Added.
+ * dom/ErrorEvent.idl: Added.
+ * dom/Event.cpp:
+ (WebCore::Event::isErrorEvent):
+ * dom/Event.h:
+
+2009-07-21 Priit Laes <plaes@plaes.org>
+
+ Reviewed by Gustavo Noronha.
+
+ [Gtk] Searching in thepiratebay.org doesn't work with more than 1 word
+ https://bugs.webkit.org/show_bug.cgi?id=24602
+
+ Remove workaround required for <=libsoup-2.26.1
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::restartedCallback):
+
+2009-07-21 Adam Barth <abarth@webkit.org>
+
+ Reviewed by David Levin.
+
+ V8IsolatedWorld keeps a handle to a disposed context
+ https://bugs.webkit.org/show_bug.cgi?id=27397
+
+ Make a copy of the context handle before making it weak. We don't want
+ to make the original handle weak because we want it to survive for the
+ length of the V8IsolatedWorld::evaluate method.
+
+ * bindings/v8/V8IsolatedWorld.cpp:
+ (WebCore::V8IsolatedWorld::V8IsolatedWorld):
+
+2009-07-21 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Add ability to evaluate selection while on break point.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27502
+
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._loaded):
+ (WebInspector.SourceFrame.prototype._documentKeyDown):
+
+2009-07-21 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Special case ConsolePanel opening since
+ it is a 'fast view'.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27493
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::setWindowVisible):
+
+2009-07-20 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix Qt code to follow the WebKit Coding Style.
+
+ * platform/graphics/qt/FontQt.cpp:
+ (WebCore::qstring):
+ (WebCore::fixSpacing):
+ * platform/graphics/qt/FontQt43.cpp:
+ (WebCore::generateComponents):
+ (WebCore::Font::offsetForPositionForComplexText):
+ (WebCore::cursorToX):
+ * platform/graphics/qt/GradientQt.cpp:
+ (WebCore::Gradient::platformGradient):
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::toQtFillRule):
+ (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
+ (WebCore::GraphicsContext::~GraphicsContext):
+ (WebCore::GraphicsContext::getCTM):
+ (WebCore::GraphicsContext::concatCTM):
+ (WebCore::GraphicsContext::getWindowsContext):
+ * platform/graphics/qt/IconQt.cpp:
+ (WebCore::Icon::paint):
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::ReadContext::read):
+ (WebCore::ImageDecoderQt::ReadContext::readImageLines):
+ (WebCore::ImageDecoderQt::setData):
+ * platform/graphics/qt/ImageQt.cpp:
+ (WebCore::Image::drawPattern):
+ (WebCore::BitmapImage::draw):
+ * platform/graphics/qt/ImageSourceQt.cpp:
+ (WebCore::ImageSource::frameDurationAtIndex):
+ (WebCore::ImageSource::frameHasAlphaAtIndex):
+ (WebCore::ImageSource::frameIsCompleteAtIndex):
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::create):
+ (WebCore::MediaPlayerPrivate::bytesLoaded):
+ (WebCore::MediaPlayerPrivate::updateStates):
+ * platform/graphics/qt/PathQt.cpp:
+ (WebCore::Path::addArcTo):
+ (WebCore::Path::isEmpty):
+ * platform/graphics/qt/TransformationMatrixQt.cpp:
+ (WebCore::TransformationMatrix::operator QTransform):
+ * platform/qt/ClipboardQt.cpp:
+ (WebCore::ClipboardQt::ClipboardQt):
+ (WebCore::ClipboardQt::clearData):
+ (WebCore::ClipboardQt::clearAllData):
+ (WebCore::ClipboardQt::getData):
+ (WebCore::ClipboardQt::setData):
+ (WebCore::ClipboardQt::setDragImage):
+ (WebCore::getCachedImage):
+ (WebCore::ClipboardQt::declareAndWriteDragImage):
+ (WebCore::ClipboardQt::writeURL):
+ (WebCore::ClipboardQt::writeRange):
+ (WebCore::ClipboardQt::hasData):
+ * platform/qt/ClipboardQt.h:
+ * platform/qt/ContextMenuItemQt.cpp:
+ (WebCore::ContextMenuItem::action):
+ (WebCore::ContextMenuItem::title):
+ * platform/qt/CursorQt.cpp:
+ (WebCore::westPanningCursor):
+ (WebCore::notAllowedCursor):
+ * platform/qt/DragDataQt.cpp:
+ (WebCore::DragData::containsFiles):
+ (WebCore::DragData::asFilenames):
+ (WebCore::DragData::asPlainText):
+ (WebCore::DragData::asFragment):
+ * platform/qt/DragImageQt.cpp:
+ (WebCore::createDragImageIconForCachedImage):
+ * platform/qt/FileSystemQt.cpp:
+ (WebCore::getFileSize):
+ (WebCore::unloadModule):
+ * platform/qt/Localizations.cpp:
+ (WebCore::contextMenuItemTagShowSpellingPanel):
+ * platform/qt/MIMETypeRegistryQt.cpp:
+ (WebCore::):
+ * platform/qt/PasteboardQt.cpp:
+ (WebCore::Pasteboard::Pasteboard):
+ (WebCore::Pasteboard::writeSelection):
+ (WebCore::Pasteboard::plainText):
+ * platform/qt/PlatformKeyboardEventQt.cpp:
+ (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
+ * platform/qt/PlatformMouseEventQt.cpp:
+ (WebCore::PlatformMouseEvent::PlatformMouseEvent):
+ * platform/qt/PopupMenuQt.cpp:
+ (WebCore::PopupMenu::populate):
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::fallbackStyle):
+ (WebCore::inflateButtonRect):
+ (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
+ (WebCore::RenderThemeQt::paintButton):
+ (WebCore::RenderThemeQt::paintMenuList):
+ (WebCore::RenderThemeQt::applyTheme):
+ (WebCore::WorldMatrixTransformer::WorldMatrixTransformer):
+ (WebCore::RenderThemeQt::paintMediaBackground):
+ (WebCore::RenderThemeQt::paintMediaFullscreenButton):
+ * platform/qt/RenderThemeQt.h:
+ * platform/qt/ScreenQt.cpp:
+ (WebCore::screenRect):
+ (WebCore::usableScreenRect):
+ * platform/qt/ScrollbarQt.cpp:
+ (WebCore::Scrollbar::contextMenu):
+ * platform/qt/ScrollbarThemeQt.cpp:
+ (WebCore::scPart):
+ (WebCore::scrollbarPart):
+ * platform/qt/ScrollbarThemeQt.h:
+ * platform/qt/SharedBufferQt.cpp:
+ (WebCore::SharedBuffer::createWithContentsOfFile):
+ * platform/qt/TemporaryLinkStubs.cpp:
+ (PluginDatabase::defaultPluginDirectories):
+ (PluginDatabase::getPluginPathsInDirectories):
+ (PluginDatabase::isPreferredPluginDirectory):
+ (WebCore::getSupportedKeySizes):
+ (WebCore::signedPublicKeyAndChallengeString):
+ (WebCore::userIdleTime):
+ (WebCore::prefetchDNS):
+ * platform/text/qt/StringQt.cpp:
+ (WebCore::String::String):
+ * platform/text/qt/TextBoundaries.cpp:
+ * platform/text/qt/TextBreakIteratorQt.cpp:
+ (WebCore::TextBreakIterator::following):
+ (WebCore::TextBreakIterator::preceding):
+ (WebCore::WordBreakIteratorQt::first):
+ (WebCore::WordBreakIteratorQt::next):
+ (WebCore::WordBreakIteratorQt::previous):
+ (WebCore::CharBreakIteratorQt::first):
+ (WebCore::CharBreakIteratorQt::next):
+ (WebCore::CharBreakIteratorQt::previous):
+ (WebCore::characterBreakIterator):
+ * plugins/qt/PluginPackageQt.cpp:
+ (WebCore::PluginPackage::fetchInfo):
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::userAgentStatic):
+ (WebCore::PluginView::handlePostReadFile):
+ (WebCore::PluginView::init):
+
+2009-07-21 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by David Levin.
+
+ Added a first bunch of Haiku-specific files for WebCore.
+ https://bugs.webkit.org/show_bug.cgi?id=26988
+
+ * platform/haiku/ClipboardHaiku.cpp: Added.
+ (WebCore::ClipboardHaiku::ClipboardHaiku):
+ (WebCore::ClipboardHaiku::clearData):
+ (WebCore::ClipboardHaiku::clearAllData):
+ (WebCore::ClipboardHaiku::getData):
+ (WebCore::ClipboardHaiku::setData):
+ (WebCore::ClipboardHaiku::types):
+ (WebCore::ClipboardHaiku::files):
+ (WebCore::ClipboardHaiku::dragLocation):
+ (WebCore::ClipboardHaiku::dragImage):
+ (WebCore::ClipboardHaiku::setDragImage):
+ (WebCore::ClipboardHaiku::dragImageElement):
+ (WebCore::ClipboardHaiku::setDragImageElement):
+ (WebCore::ClipboardHaiku::createDragImage):
+ (WebCore::ClipboardHaiku::declareAndWriteDragImage):
+ (WebCore::ClipboardHaiku::writeURL):
+ (WebCore::ClipboardHaiku::writeRange):
+ (WebCore::ClipboardHaiku::hasData):
+ * platform/haiku/ClipboardHaiku.h: Added.
+ (WebCore::ClipboardHaiku::create):
+ (WebCore::ClipboardHaiku::~ClipboardHaiku):
+ * platform/haiku/CookieJarHaiku.cpp: Added.
+ (WebCore::setCookies):
+ (WebCore::cookies):
+ (WebCore::cookiesEnabled):
+ * platform/haiku/CursorHaiku.cpp: Added.
+ (WebCore::Cursor::Cursor):
+ (WebCore::Cursor::~Cursor):
+ (WebCore::Cursor::operator=):
+ (WebCore::pointerCursor):
+ (WebCore::moveCursor):
+ (WebCore::crossCursor):
+ (WebCore::handCursor):
+ (WebCore::iBeamCursor):
+ (WebCore::waitCursor):
+ (WebCore::helpCursor):
+ (WebCore::eastResizeCursor):
+ (WebCore::northResizeCursor):
+ (WebCore::northEastResizeCursor):
+ (WebCore::northWestResizeCursor):
+ (WebCore::southResizeCursor):
+ (WebCore::southEastResizeCursor):
+ (WebCore::southWestResizeCursor):
+ (WebCore::westResizeCursor):
+ (WebCore::northSouthResizeCursor):
+ (WebCore::eastWestResizeCursor):
+ (WebCore::northEastSouthWestResizeCursor):
+ (WebCore::northWestSouthEastResizeCursor):
+ (WebCore::columnResizeCursor):
+ (WebCore::rowResizeCursor):
+ (WebCore::verticalTextCursor):
+ (WebCore::cellCursor):
+ (WebCore::contextMenuCursor):
+ (WebCore::noDropCursor):
+ (WebCore::copyCursor):
+ (WebCore::progressCursor):
+ (WebCore::aliasCursor):
+ (WebCore::noneCursor):
+ (WebCore::notAllowedCursor):
+ (WebCore::zoomInCursor):
+ (WebCore::zoomOutCursor):
+ (WebCore::grabCursor):
+ (WebCore::grabbingCursor):
+
+2009-07-21 Albert Astals Cid <aacid@kde.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Change #error line not to have a ' (single quote)
+
+ * DerivedSources.cpp:
+
+2009-07-21 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by David Levin.
+
+ Add ENABLE_RUBY to list of build options
+ https://bugs.webkit.org/show_bug.cgi?id=27324
+
+ Added flag ENABLE_RUBY:
+
+ * Configurations/FeatureDefines.xcconfig:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+ * WebCore.vcproj/build-generated-files.sh:
+
+2009-07-21 James Hawkins <jhawkins@google.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27467
+ Return an empty path in PlatformContextSkia::currentPathInLocalCoordinates
+ if matrix.invert() fails. This prevents the use of an uninitialized
+ value in inverseMatrix.
+
+ No new tests added. Run
+ LayoutTests/svg/dynamic-updates/SVGMarkerElement-dom-markerHeight-attr.html
+ under valgrind and notice there are no errors.
+
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::currentPathInLocalCoordinates):
+
+2009-07-21 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27388
+
+ Fix dotted and dashed borders on Chromium/skia. This follows
+ the logic in the Cg path, so results are much closer to Safari now
+ (some tests won't be exactly the same due to font layout differences).
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::drawLine):
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::setupPaintForStroking):
+
+2009-07-20 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Make it harder to misuse try* allocation routines
+ https://bugs.webkit.org/show_bug.cgi?id=27469
+
+ Add forwarding header for PossiblyNull type, and add missing null check
+ to ImageBuffer creation.
+
+ * ForwardingHeaders/wtf/PossiblyNull.h: Added.
+ * platform/graphics/cg/ImageBufferCG.cpp:
+ (WebCore::ImageBuffer::ImageBuffer):
+
+2009-07-20 Adam Langley <agl@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Guard access to installedMediaEngines()[0].
+
+ https://bugs.webkit.org/show_bug.cgi?id=27479
+ http://code.google.com/p/chromium/issues/detail?id=16541
+
+ Else where in the file, installedMediaEngines is always checked for
+ being empty because access. This patch adds a case which missed that
+ check.
+
+ This triggered a crash in Chromium:
+ http://www.yakeze.com/chat/example-chromium-crash/
+
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::MediaPlayer::load):
+
+2009-07-20 Adam Langley <agl@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Allow search entries to render with a CSS border if the RenderTheme
+ doesn't paint them.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27466
+ http://code.google.com/p/chromium/issues/detail?id=16958
+
+ <input type="search"> is very much like a text entry except that,
+ currently, if the RenderTheme doesn't deal with it, nothing is
+ rendered. With this patch, the default CSS border is rendered if the
+ RenderTheme requests it.
+
+ This will affect many layout tests, but only for Chromium Linux and
+ those results are not currently in the WebKit tree.
+
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::paintBorderOnly):
+
+2009-07-17 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Switch to faster methods to access internal fields.
+ https://bugs.webkit.org/show_bug.cgi?id=27372
+
+ Minor refactoring.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertToSVGPODTypeImpl):
+ (WebCore::V8DOMWrapper::setDOMWrapper):
+ * bindings/v8/V8DOMWrapper.h:
+ (WebCore::V8DOMWrapper::convertDOMWrapperToNative):
+ (WebCore::V8DOMWrapper::convertDOMWrapperToNode):
+ (WebCore::V8DOMWrapper::convertToNativeObject):
+ (WebCore::V8DOMWrapper::convertToNativeEvent):
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8ClipboardCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8ElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
+ (WebCore::removeElement):
+ * bindings/v8/custom/V8InspectorControllerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8NodeCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-07-20 Adam Langley <agl@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Chromium Linux: cache Harfbuzz faces.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27473
+
+ Previously, we recreated the Harfbuzz face for each script-run. With
+ this patch, we keep the Harfbuzz face in the FontPlatformData (created
+ as needed) and so they will persist for the duration of the
+ FontPlatformData.
+
+ Shouldn't affect any layout tests. Results in a significant win on the
+ intl2 page cycler time.
+
+ * platform/graphics/chromium/FontLinux.cpp:
+ (WebCore::TextRunWalker::~TextRunWalker):
+ (WebCore::TextRunWalker::setupFontForScriptRun):
+ * platform/graphics/chromium/FontPlatformDataLinux.cpp:
+ (WebCore::FontPlatformData::RefCountedHarfbuzzFace::~RefCountedHarfbuzzFace):
+ (WebCore::FontPlatformData::FontPlatformData):
+ (WebCore::FontPlatformData::harfbuzzFace):
+ * platform/graphics/chromium/FontPlatformDataLinux.h:
+ (WebCore::FontPlatformData::RefCountedHarfbuzzFace::create):
+ (WebCore::FontPlatformData::RefCountedHarfbuzzFace::face):
+ (WebCore::FontPlatformData::RefCountedHarfbuzzFace::RefCountedHarfbuzzFace):
+ * platform/graphics/chromium/HarfbuzzSkia.h: Added.
+
+2009-07-20 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Simon Fraser.
+
+ REGRESSION (r46142): Need to remove showTreeThisForThis
+ https://bugs.webkit.org/show_bug.cgi?id=27475
+
+ Removes showTreeThisForThis
+
+ * editing/IndentOutdentCommand.cpp:
+ (WebCore::IndentOutdentCommand::appendParagraphIntoNode):
+
+2009-07-19 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Refactoring of indentRegion to fix bugs 26816 and 25317
+ https://bugs.webkit.org/show_bug.cgi?id=26816
+ https://bugs.webkit.org/show_bug.cgi?id=25317
+ https://bugs.webkit.org/show_bug.cgi?id=23995 (partially)
+
+ This patch implements appendParagraphIntoNode, a simpler specialized version of moveParagraph
+ and replaces all calls inside indentRegion. The following is the new behavior of indentRegion.
+
+ 1. We try to indent as many wrapping nodes as possible.
+ e.g. when indenting "hello" in <div>hello</div>, we try to indent div as well.
+ 2. We do not delete any wrapping elements
+ With moveParagraph, we used to remove all wrapping nodes, and replaced with a blockquote.
+ This was causing https://bugs.webkit.org/show_bug.cgi?id=23995 for indentation.
+ With appendParagraphIntoNode, we can preserve all wrapping nodes.
+ 3. We only split the tree until the closest block node instead of until the root editable node.
+ This behavioral change fixes the bug 25317.
+ 4. When multiple paragraphs are indented, we indent the highest common ancestor within the selection.
+ e.g. when a list is a child node of a div, and the entire div is intended,
+ we enclose the div by a single blockquote.
+
+ Note that new behavior is more consistent with that of Internet Explorer and Firefox.
+ To demonstrate this, the following tests are added.
+
+ Tests: editing/execCommand/indent-div-inside-list.html
+ editing/execCommand/indent-nested-blockquotes.html
+ editing/execCommand/indent-nested-div.html
+ editing/execCommand/indent-second-paragraph-in-blockquote.html
+
+ * editing/IndentOutdentCommand.cpp: prepareBlockquoteLevelForInsertion is removed
+ (WebCore::IndentOutdentCommand::tryIndentingAsListItem): uses appendParagraphIntoNode now
+ (WebCore::IndentOutdentCommand::indentIntoBlockquote): uses appendParagraphIntoNode now
+ (WebCore::IndentOutdentCommand::appendParagraphIntoNode): removes a paragraph and appends it to a new node
+ (WebCore::IndentOutdentCommand::removeUnnecessaryLineBreakAt): removes a break element at the specified position
+ (WebCore::IndentOutdentCommand::indentRegion): exhibits the described behavior
+ * editing/IndentOutdentCommand.h: updated prototype
+
+2009-07-20 Dan Bernstein <mitz@apple.com>
+
+ Try to fix release builds after r46136
+
+ * dom/Element.cpp:
+
+2009-07-17 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Media Controls: We are specifying the text height, where it is unneeded and the slider is 2px off.
+ https://bugs.webkit.org/show_bug.cgi?id=27380
+
+ Adjust the margin of the slider and remove useless height specification to fix alignement of the media controls.
+
+ * css/mediaControlsQT.css:
+
+2009-07-20 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Mark Rowe.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27468
+ Back out r46060, which caused problems for some Apple developers.
+
+ * WebCore.vcproj/QTMovieWin.vcproj:
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+ * WebCore.vcproj/WebCoreGenerated.vcproj:
+
+2009-07-20 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ When loading a custom view into a frame, the old document is still
+ around
+ <rdar://problem/5145841>
+
+ Safari fires onload before PDF is loaded into the browser
+ <rdar://problem/6618869>
+
+ Test: fast/loader/non-html-load-event.html
+
+ * GNUmakefile.am: Added PlaceholderDocument.{cpp,h}
+ * WebCore.gypi: Ditto.
+ * WebCore.pro: Ditto.
+ * WebCore.vcproj/WebCore.vcproj: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * WebCoreSources.bkl: Ditto.
+ * dom/Document.h:
+ (WebCore::Document::setStyleSelector): Added this protected accessor for
+ PlaceholderDocument to use.
+ * dom/Element.cpp:
+ (WebCore::Element::clientWidth): Check whether the document has a
+ renderer.
+ (WebCore::Element::clientHeight): Ditto.
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::begin): Create a PlaceholderDocument for frames
+ that do not use an HTML view. Do not nullify the content size in
+ that case.
+ (WebCore::FrameLoader::transitionToCommitted): For frames that do not
+ use an HTML view, call receivedFirstData(), which sets up the
+ frame with a new PlaceHolderDocument.
+ * loader/PlaceholderDocument.cpp: Added.
+ (WebCore::PlaceholderDocument::attach): Sets up the style selector but
+ does not create a RenderView.
+ * loader/PlaceholderDocument.h: Added.
+ (WebCore::PlaceholderDocument::create):
+ (WebCore::PlaceholderDocument::PlaceholderDocument):
+
+2009-07-20 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Handle opacity and opacity animations on transform layers in Leopard
+ https://bugs.webkit.org/show_bug.cgi?id=27398
+
+ This makes two changes, and only for Leopard.
+
+ First, whenever opacity is changed on a layer I propagate the
+ change into the content layer and all the children if the layer
+ on which opacity is set is a transform layer (preserve3D is true).
+ The opacity set is the accumulated opacity from this layer
+ and all its direct ancestor transform layers. Second, I turn off all
+ hardware opacity animation.
+
+ * platform/graphics/GraphicsLayer.cpp:
+ (WebCore::GraphicsLayer::accumulatedOpacity):
+ (WebCore::GraphicsLayer::distributeOpacity):
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::GraphicsLayer::setOpacityInternal):
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::setPreserves3D):
+ (WebCore::GraphicsLayerCA::setOpacity):
+ (WebCore::GraphicsLayerCA::animateFloat):
+ (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
+ (WebCore::GraphicsLayerCA::setOpacityInternal):
+ (WebCore::GraphicsLayerCA::updateOpacityOnLayer):
+
+2009-07-20 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27349
+ Add GraphicsContext implementation for the WinCE port.
+
+ Written by Yong Li <yong.li@torchmobile.com>, George Staikos <george.staikos@torchmobile.com> and Lyon Chen <lyon.chen@torchmobile.com>
+ with trivial style fixes by Adam Treat <adam.treat@torchmobile.com>
+
+ * platform/graphics/wince/GraphicsContextWince.cpp: Added.
+
+2009-07-20 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Adding the Win SQLite VFS implementation for Chromium, and stubs
+ for the Mac and Linux VFSs.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26940
+
+ * WebCore.gypi:
+ * platform/chromium/ChromiumBridge.h:
+ * platform/sql/chromium/SQLiteFileSystemChromium.cpp: Added.
+ * platform/sql/chromium/SQLiteFileSystemChromiumLinux.cpp: Added.
+ * platform/sql/chromium/SQLiteFileSystemChromiumMac.cpp: Added.
+ * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: Added.
+
+2009-07-20 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27097
+ [Gtk] Segfault when examining an object of ROLE_TABLE via at-spi
+
+ Check that an object is a RenderObject before trying to access its
+ renderer and related node.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (webkit_accessible_get_role):
+
+2009-07-20 Balazs Kelemen <kelemen.balazs.3@stud.u-szeged.hu>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] font cache reworking
+ https://bugs.webkit.org/show_bug.cgi?id=27265
+
+ Reimplemented Qt's FontCache in a way that follows the shared one.
+ Now we can release its elements when those became inactive.
+ FontFallbackList had been changed to be able to hold WebCore fonts in its list and to be able to release a FontData what is in the cache.
+
+ No change in behavior, so no tests.
+
+ * platform/graphics/qt/FontCacheQt.cpp:
+ (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
+ (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
+ (WebCore::FontPlatformDataCacheKey::): Key type for the cache of FontPlatformData objects.
+ It can be constructed from a FontPlatformData or from a FontDescription. The keys have to be consistent
+ with FontPlatformData::FontPlatformData(const FontDescription&) - if we create the same
+ FontPlatformData from two FontDescription then we have to create the same key from them, and vica versa.
+ (WebCore::FontPlatformDataCacheKey::operator==):
+ (WebCore::FontPlatformDataCacheKey::hash):
+ (WebCore::FontPlatformDataCacheKey::computeHash):
+ (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize):
+ (WebCore::FontPlatformDataCacheKeyHash::hash):
+ (WebCore::FontPlatformDataCacheKeyHash::equal):
+ (WebCore::FontPlatformDataCacheKeyTraits::emptyValue):
+ (WebCore::FontPlatformDataCacheKeyTraits::constructDeletedValue):
+ (WebCore::FontPlatformDataCacheKeyTraits::isDeletedValue):
+ (WebCore::FontCache::getCachedFontPlatformData): Get a FontDescription and returns a FontPlatformData.
+ (WebCore::FontCache::getCachedFontData): Get a FontPlatformData and returns a SimpleFontData.
+ (WebCore::FontCache::releaseFontData): Get a SimpleFontData and releases it from the cache. Also releases the appropriate FontPlatformData.
+ (WebCore::FontCache::purgeInactiveFontData): Frees inactive elements.
+ (WebCore::FontCache::invalidate): Frees all inactive elements (call purgeInactiveFontData with default argument)
+ * platform/graphics/qt/FontFallbackListQt.cpp:
+ (WebCore::FontFallbackList::releaseFontData):
+ (WebCore::FontFallbackList::fontDataAt):
+ * platform/graphics/qt/FontPlatformData.h:
+ (WebCore::FontPlatformData::family): Getter. It is needed for FontPlatformDataCacheKey.
+ (WebCore::FontPlatformData::bold): Ditto.
+ (WebCore::FontPlatformData::italic): Ditto.
+ (WebCore::FontPlatformData::smallCaps): Ditto.
+ (WebCore::FontPlatformData::pixelSize): Ditto.
+ * platform/graphics/qt/FontPlatformDataQt.cpp:
+ (WebCore::FontPlatformData::FontPlatformData): Set m_bold.
+
+2009-07-20 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Holger Freyther.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26716
+ [Gtk] Each XMLHttpRequest leaks memory.
+
+ Free the SoupURI we create to check the URI. Fix suggested by John
+ Kjellberg.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::):
+
+2009-07-20 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] On Symbian link against system sqlite3
+ https://bugs.webkit.org/show_bug.cgi?id=27368
+
+ Add an option to force linking against system sqlite3
+ by adding system-sqlite to the CONFIG variable.
+
+ The Symbian specific part of this patch is contributed by
+ Norbert Leser.
+
+ * WebCore.pro:
+
+2009-07-20 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Change the glib version check to check for the first unstable
+ release with g_mapped_file_unref. Otherwise this would be useless
+ until 2.22 is released, a few months from now.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::ResourceHandle::startHttp):
+
+2009-07-20 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by and done with Tor Arne Vestbø.
+
+ Fix fast/css/pseudo-required-optional-*.html in the Qt build
+ after r46062.
+
+ These tests triggered a bug in RenderThemeQt where we did not fall back
+ to the unstyled painting of text areas and input fields when they have
+ a styled background.
+
+ Our re-implementation of isControlStyled incorrectly only checked the
+ border for determining whether to style or not. The base-implementation
+ performs the same check, but also includes the background. Removing
+ our implementation fixes the appearance.
+
+ * platform/qt/RenderThemeQt.cpp: Removed isControlStyled reimplementation.
+ * platform/qt/RenderThemeQt.h: Ditto.
+
+2009-07-20 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Rubber-stamped by Tor Arne Vestbø.
+
+ Add missing (sorted) header files to the HEADERS variable in the qmake
+ .pro file for improved completion in IDEs.
+
+ * WebCore.pro:
+
+2009-07-19 Adam Barth <abarth@webkit.org>
+
+ Reviewed by David Levin.
+
+ [V8] Factor V8ConsoleMessage out of V8Proxy
+ https://bugs.webkit.org/show_bug.cgi?id=27421
+
+ No behavior change.
+
+ * WebCore.gypi:
+ * bindings/v8/V8ConsoleMessage.cpp: Added.
+ (WebCore::V8ConsoleMessage::V8ConsoleMessage):
+ (WebCore::V8ConsoleMessage::dispatchNow):
+ (WebCore::V8ConsoleMessage::dispatchLater):
+ (WebCore::V8ConsoleMessage::processDelayed):
+ (WebCore::V8ConsoleMessage::handler):
+ * bindings/v8/V8ConsoleMessage.h: Added.
+ (WebCore::V8ConsoleMessage::Scope::Scope):
+ (WebCore::V8ConsoleMessage::Scope::~Scope):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::logInfo):
+ (WebCore::reportUnsafeAccessTo):
+ (WebCore::V8Proxy::runScript):
+ (WebCore::V8Proxy::callFunction):
+ (WebCore::V8Proxy::newInstance):
+ (WebCore::V8Proxy::initContextIfNeeded):
+ (WebCore::V8Proxy::processConsoleMessages):
+
+2009-07-19 Rob Buis <rwlbuis@gmail.com>
+
+ Reviewed by Adam Barth.
+
+ Remove unused member variable.
+
+ * svg/SVGPolyElement.h:
+
+2009-07-19 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ HTMLAudioElement: constructor should set "autobuffer" attribute
+ https://bugs.webkit.org/show_bug.cgi?id=27422
+
+ Test: media/audio-constructor-autobuffer.html
+
+ * bindings/js/JSAudioConstructor.cpp:
+ (WebCore::constructAudio):
+ Set 'autobuffer' attribute.
+
+2009-07-19 Thierry Bastian <thierry.bastian@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Fix the Qt build with mingw.
+
+ * WebCore.pro: Don't use MSVC commandline options to disable warnings
+ with mingw.
+
+2009-07-19 Adam Barth <abarth@webkit.org>
+
+ Reviewed by David Levin.
+
+ [V8] Phase 2: Remove event listener methods from V8Proxy
+ https://bugs.webkit.org/show_bug.cgi?id=27415
+
+ No behavior change.
+
+ * bindings/v8/V8ObjectEventListener.cpp:
+ (WebCore::weakObjectEventListenerCallback):
+ (WebCore::V8ObjectEventListener::~V8ObjectEventListener):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::disconnectEventListeners):
+ * bindings/v8/V8Proxy.h:
+ (WebCore::V8Proxy::eventListeners):
+ (WebCore::V8Proxy::objectListeners):
+ * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
+ (WebCore::getEventListener):
+ * bindings/v8/custom/V8CustomEventListener.cpp:
+ (WebCore::V8EventListener::~V8EventListener):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8ElementCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8MessagePortCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8NodeCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ (WebCore::getEventListener):
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::getEventListener):
+ * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-07-18 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Gustavo Noronha.
+
+ [Gtk] soup/ResourceHandleSoup.cpp:533: error: 'g_mapped_file_free' was not declared in this scope
+ https://bugs.webkit.org/show_bug.cgi?id=27230
+
+ Use g_mapped_file_unref for GLIB version 2.22 onwards.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::ResourceHandle::startHttp):
+
+2009-07-18 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Add spread radius support to -webkit-box-shadow
+ https://bugs.webkit.org/show_bug.cgi?id=27417
+ rdar://problem/7072267
+
+ Test: fast/box-shadow/spread.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::valueForShadow): Added a property ID parameter and used it to
+ include the spread length for box-shadow but not for text-shadow.
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ Pass the property ID to valueForShadow().
+
+ * css/CSSParser.cpp:
+ (WebCore::ShadowParseContext::ShadowParseContext): Added property,
+ spread, and allowSpread members. Added a property ID parameter to
+ the constructor. Initialize the property and allowSpread members.
+ (WebCore::ShadowParseContext::allowLength): Added allowSpread.
+ (WebCore::ShadowParseContext::commitValue): Pass the spread value to
+ the ShadowValue constructor. Reset allowSpread.
+ (WebCore::ShadowParseContext::commitLength): Allow spread after blur
+ for the box-shadow property.
+ (WebCore::ShadowParseContext::commitColor): Reset allowSpread.
+ (WebCore::CSSParser::parseShadow): Pass the property ID to
+ ShadowParseContext().
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty): Get the spread value from
+ the shadow value and pass it to the ShadowData constructor.
+
+ * css/ShadowValue.cpp:
+ (WebCore::ShadowValue::ShadowValue): Added spread.
+ (WebCore::ShadowValue::cssText): Added spread.
+
+ * css/ShadowValue.h:
+ (WebCore::ShadowValue::create): Added spread.
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::blendFunc): Blend the spread value.
+ (WebCore::PropertyWrapperShadow::blend): Added 0 spread to the default
+ shadow.
+
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::placeBoxesHorizontally): Account for spread in
+ the visual overflow calculations.
+ (WebCore::InlineFlowBox::placeBoxesVertically): Ditto.
+ (WebCore::InlineFlowBox::paint): Ditto.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::overflowHeight): Ditto.
+ (WebCore::RenderBlock::overflowWidth): Ditto.
+ (WebCore::RenderBlock::overflowLeft): Ditto.
+ (WebCore::RenderBlock::overflowTop): Ditto.
+ (WebCore::RenderBlock::overflowRect): Ditto.
+ (WebCore::RenderBlock::layoutBlock): Ditto.
+
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paintBoxShadow): Inflate the shadow-
+ casting rect by the shadow spread value. Adjust border radii if
+ necessary.
+
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::layoutBlock): Account for spread in the
+ visual overflow calculations.
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::calculateRects): Ditto.
+
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Account for spread.
+ (WebCore::RenderObject::adjustRectForOutlineAndShadow): Ditto.
+
+ * rendering/RenderReplaced.cpp:
+ (WebCore::RenderReplaced::adjustOverflowForBoxShadowAndReflect): Ditto.
+
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::setTextShadow): Assert that text shadows do not
+ have spread.
+
+ * rendering/style/ShadowData.cpp:
+ (WebCore::ShadowData::ShadowData): Added spread.
+ (WebCore::ShadowData::operator==): Compare spread.
+ * rendering/style/ShadowData.h:
+ (WebCore::ShadowData::ShadowData): Added spread.
+
+2009-07-18 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Jan Alonzo.
+
+ Minor FrameLoader.cpp cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=27406
+
+ No behavior change.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::executeIfJavaScriptURL):
+
+2009-07-18 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Fisher.
+
+ [V8] Move event listener methods from V8Proxy to V8EventListenerList
+ https://bugs.webkit.org/show_bug.cgi?id=27408
+
+ Move some event listener code out of V8Proxy and into the event
+ listener list.
+
+ I'd like to remove these methods from V8Proxy entirely and just expose
+ getters for the lists themselves, but I'll do that in a follow up
+ patch.
+
+ * bindings/v8/V8EventListenerList.cpp:
+ (WebCore::V8EventListenerList::findWrapper):
+ * bindings/v8/V8EventListenerList.h:
+ (WebCore::V8EventListenerList::findOrCreateWrapper):
+ * bindings/v8/V8ObjectEventListener.cpp:
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::findV8EventListener):
+ (WebCore::V8Proxy::findOrCreateV8EventListener):
+ (WebCore::V8Proxy::removeV8EventListener):
+ (WebCore::V8Proxy::findObjectEventListener):
+ (WebCore::V8Proxy::findOrCreateObjectEventListener):
+ (WebCore::V8Proxy::removeObjectEventListener):
+ * bindings/v8/V8Proxy.h:
+
+2009-07-18 Jeremy Orlow <jorlow@chromium.org>
+
+ Rubber stamped by Adam Barth.
+
+ Revert https://bugs.webkit.org/show_bug.cgi?id=27383
+ https://bugs.webkit.org/show_bug.cgi?id=27407
+
+ Revert Jens' patch. I believe he forgot to include a file.
+
+ * WebCore.gypi:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ * bindings/v8/V8DataGridDataSource.cpp: Removed.
+ * bindings/v8/V8DataGridDataSource.h: Removed.
+ * bindings/v8/V8GCController.h:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8HTMLDataGridElementCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+
+2009-07-17 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27405
+
+ Fixes an issue when decoding HTML entities with an unknown named entity that
+ caused null-characters to be inserted into the decoded result.
+
+ Test: http/tests/security/xssAuditor/link-onclick-ampersand.html
+ http/tests/security/xssAuditor/javascript-link-ampersand.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::decodeHTMLEntities): Added check to conditional so that
+ non-zero entity values are not inserted during decoding process.
+
+2009-07-17 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ <http://webkit.org/b/18363> [GTK] Combo boxes cannot be opened pressing space
+
+ Reviewed by Holger Freyther.
+
+ Add Gtk to platforms that want to open the menulist using the
+ spacebar.
+
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::menuListDefaultEventHandler):
+
+2009-07-17 Mario Sanchez Prada <msanchez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25523
+ [GTK] The text displayed by push buttons is not exposed to assistive technologies
+
+ Add new public method text() to RenderButton and use it from
+ AccessibilityRenderObject::stringValue().
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::stringValue):
+ * rendering/RenderButton.cpp:
+ (WebCore::RenderButton::text):
+ * rendering/RenderButton.h:
+
+2009-07-17 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Restore proxy retrieval
+ https://bugs.webkit.org/show_bug.cgi?id=27369
+
+ No new tests are needed.
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+
+2009-07-17 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by George Staikos.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27351
+ Added platform "Symbian" to WEBCORE_NAVIGATOR_PLATFORM
+ Use uname to find the correct platform for Linux.
+
+ * page/NavigatorBase.cpp:
+ (WebCore::NavigatorBase::platform):
+
+2009-07-17 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Hook up V8 bindings for DataGrid elements.
+ https://bugs.webkit.org/show_bug.cgi?id=27383
+ http://code.google.com/p/chromium/issues/detail?id=16730
+
+ Tests: Enhanced LayoutTests/fast/dom/HTMLDataGridElement/*
+ to handle exceptions, check appropriate JS prototypes, and
+ test column-list's item() method as well as array-indexing.
+
+ * WebCore.gypi: Added new source files.
+ * bindings/scripts/CodeGeneratorV8.pm: Made GenerateBatchedAttributeData put #if's around conditional attributes.
+ * bindings/v8/DOMObjectsInclude.h: #include DataGrid headers.
+ * bindings/v8/V8DOMWrapper.cpp: Add bindings from HTML tags to datagrid templates.
+ (WebCore::V8DOMWrapper::getTemplate): Customize datagrid template.
+ * bindings/v8/V8DataGridDataSource.cpp: Added. (Based on JSDataGridDataSource)
+ (WebCore::V8DataGridDataSource::V8DataGridDataSource):
+ (WebCore::V8DataGridDataSource::~V8DataGridDataSource):
+ * bindings/v8/V8DataGridDataSource.h: Added. (Based on JSDataGridDataSource)
+ (WebCore::V8DataGridDataSource::create):
+ (WebCore::V8DataGridDataSource::isJSDataGridDataSource):
+ (WebCore::V8DataGridDataSource::jsDataSource):
+ (WebCore::asV8DataGridDataSource):
+ * bindings/v8/V8GCController.h: Added new handle type "DATASOURCE".
+ * bindings/v8/V8Index.h: Conditionalize datagrid stuff.
+ * bindings/v8/custom/V8CustomBinding.h: Declare more accessors. Conditionalize.
+ * bindings/v8/custom/V8HTMLDataGridElementCustom.cpp: Fill in dataSource accessors.
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+
+2009-07-17 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ StorageArea should only contain methods we intend to proxy.
+ https://bugs.webkit.org/show_bug.cgi?id=27181
+
+ Right now, StorageAreaSync takes in a StorageArea* and calls methods
+ like importItem. Really, StorageAreaSync should be operating directly
+ on StorageAreaImpl* and those methods should be removed from StorageArea
+ since StorageAreaSync should never be attached to anything other than a
+ StorageAreaImpl.
+
+ This was pointed out in the review for
+ https://bugs.webkit.org/show_bug.cgi?id=27072
+
+ Also clean up StorageNamespaceImpl to operate directly on
+ StorageAreaImpl. Also, get rid of the factory for StorageArea
+ since nothing should ever create a StorageArea directly.
+
+ * GNUmakefile.am:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * storage/StorageArea.cpp: Removed.
+ * storage/StorageArea.h:
+ (WebCore::StorageArea::~StorageArea):
+ * storage/StorageAreaImpl.cpp:
+ (WebCore::StorageAreaImpl::copy):
+ * storage/StorageAreaImpl.h:
+ * storage/StorageAreaSync.cpp:
+ (WebCore::StorageAreaSync::create):
+ (WebCore::StorageAreaSync::StorageAreaSync):
+ * storage/StorageAreaSync.h:
+ * storage/StorageNamespaceImpl.cpp:
+ (WebCore::StorageNamespaceImpl::copy):
+ (WebCore::StorageNamespaceImpl::storageArea):
+ * storage/StorageNamespaceImpl.h:
+
+2009-07-17 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add v8 implementation for DOM Storage ScriptObjectQuarantine.
+ https://bugs.webkit.org/show_bug.cgi?id=27327
+
+ Wrap the storage object with a generic object as is done elsewhere in
+ the file (but continue to hit a NOTIMPLEMENTED if DOM_STORAGE is not
+ enabled.
+
+ * bindings/v8/ScriptObjectQuarantine.cpp:
+ (WebCore::getQuarantinedScriptObject):
+
+2009-07-17 Mads Ager <ager@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27394
+ Fix access to global object wrappers after navigation of their
+ frame in the V8 bindings. This fixes selenium test failures.
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::updateDocument):
+
+2009-07-17 Mark Rowe <mrowe@apple.com>
+
+ Fix the 32-bit build by removing implicit float <-> double conversions.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::constrainedAttachedWindowHeight):
+
+2009-07-17 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Fix of <rdar://problem/5712795> Win: Cannot change the height of the docked Web Inspector (14272)
+ https://bugs.webkit.org/show_bug.cgi?id=14272
+
+ Moved preference setting for attached inspector height and inspector height calculation from
+ WebInspectorClient.mm into InspectorController.cpp, to make this code cross-platform and enable
+ Windows resizing of attached inspector.
+
+ * inspector/InspectorController.cpp:
+ * inspector/InspectorController.h:
+
+2009-07-17 Dan Bernstein <mitz@apple.com>
+
+ Another attempt at fixing the build after r46063
+
+ * WebCore.xcodeproj/project.pbxproj: Made ExceptionCode.h a private
+ header, because it is now included from htmlediting.h, which is
+ a private header.
+
+2009-07-17 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27396
+ Moving cursor in Thai text sometimes jumps over two characters
+
+ Test: editing/text-iterator/thai-cursor-movement.html
+
+ * platform/text/TextBreakIteratorICU.cpp: (WebCore::cursorMovementIterator): Added a special
+ case for five Thai characters, matching ICU/CLDR changes.
+
+2009-07-14 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Some constructor objects exposed on Window have the wrong prototype chain
+ https://bugs.webkit.org/show_bug.cgi?id=27276
+
+ Several Constructor classes were already being passed a global object
+ during construction, but they were ignoring it for prototype lookup.
+ I've fixed those to use the passed global object instead.
+
+ Most of these Constructor classes should just be auto-generated, but I
+ refrained from changing them over to auto-gen in this patch.
+
+ Fixed CodeGeneratorJS to pass a global object to getDOMConstructor when
+ available, otherwise default to deprecatedGlobalObjectForPrototype(exec)
+ to match existing behavior.
+
+ Test: fast/dom/prototype-inheritance.html
+
+ * bindings/js/JSAudioConstructor.cpp:
+ (WebCore::JSAudioConstructor::JSAudioConstructor): use the existing globalObject pointer for prototype lookup
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::deprecatedGlobalObjectForPrototype): Make it easy to detect where the wrong global object is being used.
+ (WebCore::deprecatedGetDOMStructure):
+ * bindings/js/JSDOMGlobalObject.h: remove error-prone getDOMConstructor, require passing JSDOMGlobalObject*
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::webKitPoint): pass "this" for the global object.
+ (WebCore::JSDOMWindow::webKitCSSMatrix): pass "this" for the global object.
+ (WebCore::JSDOMWindow::xsltProcessor): pass "this" for the global object.
+ (WebCore::JSDOMWindow::worker): pass "this" for the global object.
+ * bindings/js/JSImageConstructor.cpp:
+ (WebCore::JSImageConstructor::JSImageConstructor): use the existing globalObject pointer for prototype lookup
+ * bindings/js/JSMessageChannelConstructor.cpp:
+ (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor): use the existing globalObject pointer for prototype lookup
+ * bindings/js/JSOptionConstructor.cpp:
+ (WebCore::JSOptionConstructor::JSOptionConstructor): use the existing globalObject pointer for prototype lookup
+ * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
+ (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor): add new globalObject parameter and use it
+ * bindings/js/JSWebKitCSSMatrixConstructor.h:
+ * bindings/js/JSWebKitPointConstructor.cpp:
+ (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor): add new globalObject parameter and use it
+ * bindings/js/JSWebKitPointConstructor.h:
+ * bindings/js/JSWorkerConstructor.cpp:
+ (WebCore::JSWorkerConstructor::JSWorkerConstructor): add new globalObject parameter and use it
+ * bindings/js/JSWorkerConstructor.h:
+ * bindings/js/JSXMLHttpRequestConstructor.cpp:
+ (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor): use the existing globalObject pointer for prototype lookup
+ -- XMLHttpRequest constructor was also missing a length. Added one.
+ * bindings/js/JSXSLTProcessorConstructor.cpp:
+ (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
+ * bindings/js/JSXSLTProcessorConstructor.h:
+ * bindings/scripts/CodeGeneratorJS.pm:
+
+2009-07-17 Dan Bernstein <mitz@apple.com>
+
+ Build fix
+
+ * editing/htmlediting.cpp:
+ (WebCore::visiblePositionBeforeNode):
+ (WebCore::visiblePositionAfterNode):
+
+2009-07-17 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Gtk build fix for symbol lookup error.
+
+ Move AbstractWorker from SHARED_WORKERS to WORKERS as Worker derives from it now
+ Changed in http://trac.webkit.org/changeset/46048
+
+ * GNUmakefile.am:
+
+2009-07-17 Ryosuke Niwa <ryosuke.niwa@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ htmlediting.cpp needs more utility functions to fix the bug 26816
+ https://bugs.webkit.org/show_bug.cgi?id=27038
+
+ In order to fix the bug 26816, we need several utility functions be added to htmlediting.cpp
+
+ No tests because functions haven't been used anywhere yet.
+
+ * dom/Range.cpp:
+ (WebCore::Range::create):
+ (WebCore::Range::comparePoint): added const qualifier
+ (WebCore::Range::compareNode): added const qualifier
+ * dom/Range.h:
+ * editing/htmlediting.cpp:
+ (WebCore::unsplittableElementForPosition): find the enclosing unsplittable element (editing root & table cell)
+ (WebCore::positionBeforeNode): added ASSERT(node)
+ (WebCore::positionAfterNode): added ASSERT(node)
+ (WebCore::visiblePositionBeforeNode):
+ (WebCore::visiblePositionAfterNode):
+ (WebCore::createRange): create a range object from two visible positions
+ (WebCore::extendRangeToWrappingNodes): extend range to include nodes that starts and ends at the boundaries
+ (WebCore::canMergeLists): typo
+ (WebCore::indexForVisiblePosition): added const qualifier
+ (WebCore::isVisiblyAdjacent): typo
+ (WebCore::isNodeVisiblyContainedWithin): determine if a node is inside a range or within the visible boundaries of the range
+ * editing/htmlediting.h:
+
+2009-07-17 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25551
+ Added support for the "required" attribute, the valueMissing flag
+ to the ValidityState object and :required/:optional CSS pseudoclasses.
+ Part of HTML5 sec. Forms specs.
+ http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#attr-input-required
+
+ Tests: fast/css/pseudo-required-optional-001.html
+ fast/css/pseudo-required-optional-002.html
+ fast/css/pseudo-required-optional-003.html
+ fast/css/pseudo-required-optional-004.html
+ fast/css/pseudo-required-optional-005.html
+ fast/css/pseudo-required-optional-006.html
+ fast/forms/ValidityState-valueMissing-001.html
+ fast/forms/ValidityState-valueMissing-002.html
+ fast/forms/ValidityState-valueMissing-003.html
+ fast/forms/ValidityState-valueMissing-004.html
+ fast/forms/ValidityState-valueMissing-005.html
+ fast/forms/ValidityState-valueMissing-006.html
+ fast/forms/ValidityState-valueMissing-007.html
+ fast/forms/ValidityState-valueMissing-008.html
+ fast/forms/ValidityState-valueMissing-009.html
+ fast/forms/required-attribute-001.html
+ fast/forms/required-attribute-002.html
+
+ * css/CSSSelector.cpp:
+ (WebCore::CSSSelector::extractPseudoType): pseudoRequired/pseudoOptional
+ * css/CSSSelector.h:
+ (WebCore::CSSSelector::): ditto
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): ditto
+ * dom/Element.h:
+ (WebCore::Element::isOptionalFormControl): check for optional controls
+ (WebCore::Element::isRequiredFormControl): check for required controls
+ * html/HTMLAttributeNames.in: required attribute
+ * html/HTMLButtonElement.h:
+ (WebCore::HTMLButtonElement::isOptionalFormControl): ditto
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::required): requiredAttr getter
+ (WebCore::HTMLFormControlElement::setRequired): requiredAttr setter
+ * html/HTMLFormControlElement.h:
+ (WebCore::HTMLFormControlElement::valueMissing): method definition
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::valueMissing): validation code
+ (WebCore::HTMLInputElement::isRequiredFormControl): ditto
+ * html/HTMLInputElement.h:
+ (WebCore::HTMLInputElement::isOptionalFormControl): ditto
+ * html/HTMLInputElement.idl: required DOM attribute
+ * html/HTMLSelectElement.h:
+ (WebCore::HTMLSelectElement::isOptionalFormControl): ditto
+ * html/HTMLTextAreaElement.h:
+ (WebCore::HTMLTextAreaElement::valueMissing): validation code
+ (WebCore::HTMLTextAreaElement::isOptionalFormControl): ditto
+ (WebCore::HTMLTextAreaElement::isRequiredFormControl): ditto
+ * html/HTMLTextAreaElement.idl: required DOM attribute
+ * html/ValidityState.cpp:
+ * html/ValidityState.h:
+ (WebCore::ValidityState::valueMissing): validation flag
+
+2009-07-17 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=27390 CSS custom
+ cursor hotspots should work in quirks mode
+ - and corresponding <rdar://problem/6554340>
+
+ Enable hotspots in quirks mode.
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+
+ Update this manual test to reflect the fact that hotspots are now
+ expected to work in quirks mode.
+ * manual-tests/css3-cursor-fallback-quirks.html:
+
+2009-07-17 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Steve Falkenburg.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27323
+ Only add Cygwin to the path when it isn't already there. This avoids
+ causing problems for people who purposefully have non-Cygwin versions of
+ executables like svn in front of the Cygwin ones in their paths.
+
+ * WebCore.vcproj/QTMovieWin.vcproj:
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+ * WebCore.vcproj/WebCoreGenerated.vcproj:
+
+2009-07-17 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27384
+ Random crashes in appcache/update-cache.html test
+
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::ApplicationCacheGroup::didReceiveResponse): Reorder code to avoid using a handle
+ after canceling it.
+
+2009-07-17 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ Need to refactor Worker to derive from AbstractWorker
+ https://bugs.webkit.org/show_bug.cgi?id=26948
+
+ Changed Worker to derive from AbstractWorker, which involved moving
+ AbstractWorker files from being wrapped by ENABLE_SHARED_WORKERS to
+ ENABLE_WORKERS.
+
+ Removed obsolete functionality from the JS/V8 bindings that is now
+ inherited from AbstractWorker.
+
+ * WebCore.pro:
+ Moved AbstractWorker files out of SHARED_WORKERS section and into WORKERS.
+ * bindings/js/JSAbstractWorkerCustom.cpp:
+ Changed to be wrapped by ENABLE(WORKERS), not ENABLE(SHARED_WORKERS).
+ * bindings/js/JSWorkerCustom.cpp:
+ Removed obsolete event listener code (now in base class)
+ (WebCore::JSWorker::mark):
+ No longer need to explicitly mark event listeners (handled by base class).
+ * bindings/v8/V8Index.h:
+ Moved AbstractWorker lines out of SHARED_WORKERS section and into WORKERS.
+ * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
+ Changed to be wrapped by ENABLE(WORKERS), not ENABLE(SHARED_WORKERS).
+ * bindings/v8/custom/V8CustomBinding.h:
+ Moved AbstractWorker lines out of SHARED_WORKERS section and into WORKERS.
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ Removed obsolete event listener code that now lives in the base class.
+ (WebCore::V8WorkerConstructor): Cleaned up legacy style nits.
+ * workers/AbstractWorker.cpp:
+ Changed to be wrapped by ENABLE(WORKERS), not ENABLE(SHARED_WORKERS).
+ * workers/AbstractWorker.h:
+ Changed to be wrapped by ENABLE(WORKERS), not ENABLE(SHARED_WORKERS).
+ * workers/Worker.cpp:
+ Removed event listener code (now in base class).
+ (WebCore::Worker::Worker): Now derives from AbstractWorker.
+ (WebCore::Worker::notifyFinished): Calls dispatchLoadErrorEvent on base class.
+ * workers/Worker.h:
+ Removed APIs that now live in the base class.
+ * workers/Worker.idl:
+ Now derives from AbstractWorker.
+ Removed APIs that live in the base class, and added a GenerateToJS flag.
+
+2009-07-17 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27379
+ Absolutely-positioned elements with a scrollbar wrap prematurely. Make sure to include
+ the vertical scrollbar width for overflow:scroll elements.
+
+ Added fast/css/positioned-overflow-scroll.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::calcPrefWidths):
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::calcPrefWidths):
+
+2009-07-17 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Need a DOM_STORAGE guard in DerivedSroucesAllInOne.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=27375
+
+ In https://bugs.webkit.org/show_bug.cgi?id=27360 I added Storage.cpp
+ and StorageEvent.cpp. Unfortunately, until later this afternoon,
+ DOM_STORAGE is not turned on by default in Chromium, and so these two
+ files are never generated. This breaks the compile.
+
+ There are no other instances of guards in the file, which puzzles me...
+ but I think adding guards is the right way to go about this.
+
+ * bindings/v8/DerivedSourcesAllInOne.cpp: Added the guard.
+
+2009-07-17 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26496
+
+ Let WebCore always enforce the connection-per-host limit itself.
+
+ * loader/loader.cpp:
+ (WebCore::Loader::Host::servePendingRequests):
+
+2009-07-17 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Some transitions don't work correctly on Leopard
+ https://bugs.webkit.org/show_bug.cgi?id=27356
+
+ We only have code to do component animation using valueFunction.
+ So on Leopard we always need to do matrix animation in hardware.
+ This fix ensures that.
+
+ This is currently not testable because it appears only in the
+ hardware animation and we can't yet do pixel tests while
+ hardware animating.
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::animateTransform):
+
+2009-07-17 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK+] Crash in screenAvailable due a null Widget*
+
+ JSDOMWindow::open called screenAvailableRect(0). The other
+ Screen methods can be called with a null widget as well, fix the
+ crashing test by checking for null.
+
+ In screenRect and screenAvailableRect it is not tried to use
+ a default screen as the existing implementation didn't try either
+ in case of not having a toplevel widget.
+
+ LayoutTests/fast/frames/crash-removed-iframe.html caused a crash.
+
+ * platform/gtk/PlatformScreenGtk.cpp:
+ (WebCore::getVisual): New method to get a visual or return zero.
+ (WebCore::screenDepth): Use getVisual.
+ (WebCore::screenDepthPerComponent): Use getVisual.
+ (WebCore::screenIsMonochrome): Use screenDepth which will do the null checking
+ (WebCore::screenRect): Check for !widget.
+ (WebCore::screenAvailableRect): Check for !widget.
+
+2009-07-17 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix the include path for the Symbian port
+ https://bugs.webkit.org/show_bug.cgi?id=27358
+
+ * WebCore.pro:
+
+2009-07-17 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
+
+ Reviewed by Simon Hausmann.
+
+ Make it possible to set the plugin directories from the DRT.
+ Part of https://bugs.webkit.org/show_bug.cgi?id=27215
+
+ * plugins/PluginDatabase.cpp:
+ (WebCore::PluginDatabase::installedPlugins): Now optionally takes
+ a populate argument, so we can avoid loading system plugins from the
+ DRT and thus avoid their strerr errors that can make tests fail.
+ (WebCore::PluginDatabase::clear): Make it possible to clear the
+ database. Called from setPluginDirectories.
+ * plugins/PluginDatabase.h:
+ (WebCore::PluginDatabase::setPluginDirectories): Make public
+
+2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ PluginViewMac: Stop the plugin when loading fails
+
+ Also, prevent event propagation when in the stopped state
+
+ * plugins/mac/PluginViewMac.cpp:
+
+2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ PluginViewMac: Allow query and set of drawing and event models
+
+ We now support querying and setting of the drawing and event model,
+ but we still only support the CoreGraphics drawing model, and the
+ Carbon event model.
+
+ If unsupported drawing or event models are detected we show the
+ missing-plugin icon.
+
+ * plugins/PluginView.cpp:
+ * plugins/PluginView.h:
+ * plugins/mac/PluginViewMac.cpp:
+
+2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Initialize two PluginView members using memset
+
+ m_npWindow is used on all platforms, not just for XP_UNIX,
+ so always initialize it. m_npCgContext on the other hand
+ is only used for XP_MACOSX.
+
+ * plugins/PluginView.cpp:
+
+2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Add more debug logging in PluginView
+
+ * plugins/PluginView.cpp: Add debug for setValue
+ * plugins/gtk/PluginViewGtk.cpp: Add debug for getValue
+ * plugins/mac/PluginViewMac.cpp: Add debug for getValue and more
+ * plugins/qt/PluginViewQt.cpp: Add debug for getValue
+ * plugins/win/PluginViewWin.cpp: Add debug for getValue
+
+2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ Use same license in PluginDebug.cpp as in the original PluginDebug.h
+
+ * plugins/PluginDebug.cpp: Use license from PluginDebug.h
+
+2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Add more debugging functionality for the WebCore NPAPI layer
+
+ * GNUmakefile.am: Add PluginDebug.cpp
+ * WebCore.gypi: Add PluginDebug.cpp
+ * WebCore.pro: Add PluginDebug.cpp
+ * WebCore.vcproj/WebCore.vcproj: Add PluginDebug.cpp
+ * WebCoreSources.bkl: Add PluginDebug.cpp
+ * plugins/PluginDebug.h: Move errorStrings to PluginDebug.cpp
+ * plugins/PluginDebug.cpp: New file
+
+2009-07-17 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by David Levin.
+
+ Fix Chromium build with DOM_STORAGE enabled.
+ https://bugs.webkit.org/show_bug.cgi?id=27360
+
+ 2 minor changes as noted below:
+
+ * bindings/v8/DerivedSourcesAllInOne.cpp: Add the generated .cpp files.
+ * storage/StorageAreaImpl.cpp: #include "DOMWindow.h"
+
+2009-07-16 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add --web-sockets flag and ENABLE_WEB_SOCKETS define.
+ https://bugs.webkit.org/show_bug.cgi?id=27206
+
+ Add ENABLE_WEB_SOCKETS
+
+ * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS
+ * GNUmakefile.am: add ENABLE_WEB_SOCKETS
+ * WebCore.vcproj/WebCoreCommon.vsprops: add ENABLE_WEB_SOCKETS
+ * WebCore.vcproj/build-generated-files.sh: add ENABLE_WEB_SOCKETS
+
+2009-07-16 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Oliver Hunt.
+
+ Added a third bunch of Haiku-specific files for WebCore.
+ https://bugs.webkit.org/show_bug.cgi?id=26952
+
+ Adding five files, EventLoopHaiku.cpp, FileChooserHaiku.cpp,
+ FileSystemHaiku.cpp, KeyboardCodes.h and MIMETypeRegistryHaiku.cpp
+
+ * platform/haiku/EventLoopHaiku.cpp: Added.
+ (WebCore::EventLoop::cycle):
+ * platform/haiku/FileChooserHaiku.cpp: Added.
+ (WebCore::FileChooser::FileChooser):
+ (WebCore::FileChooser::basenameForWidth):
+ * platform/haiku/FileSystemHaiku.cpp: Added.
+ (WebCore::fileSystemRepresentation):
+ (WebCore::homeDirectoryPath):
+ (WebCore::openTemporaryFile):
+ (WebCore::closeFile):
+ (WebCore::writeToFile):
+ (WebCore::unloadModule):
+ (WebCore::listDirectory):
+ * platform/haiku/KeyboardCodes.h: Added.
+ * platform/haiku/MIMETypeRegistryHaiku.cpp: Added.
+ (WebCore::):
+ (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
+
+2009-07-16 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Oliver Hunt.
+
+ Added a second bunch of Haiku-specific files for WebCore.
+ https://bugs.webkit.org/show_bug.cgi?id=26952
+
+ Adding four files, ContextMenuHaiku.cpp, ContextMenuItemHaiku.cpp,
+ DragDataHaiku.cpp and DragImageHaiku.cpp
+
+ * platform/haiku/ContextMenuHaiku.cpp: Added.
+ (WebCore::ContextMenuReceiver::ContextMenuReceiver):
+ (WebCore::ContextMenuReceiver::HandleMessage):
+ (WebCore::ContextMenuReceiver::Result):
+ (WebCore::ContextMenu::ContextMenu):
+ (WebCore::ContextMenu::~ContextMenu):
+ (WebCore::ContextMenu::appendItem):
+ (WebCore::ContextMenu::itemCount):
+ (WebCore::ContextMenu::insertItem):
+ (WebCore::ContextMenu::platformDescription):
+ (WebCore::ContextMenu::setPlatformDescription):
+ * platform/haiku/ContextMenuItemHaiku.cpp: Added.
+ (ContextMenuItem::ContextMenuItem):
+ (ContextMenuItem::~ContextMenuItem):
+ (ContextMenuItem::releasePlatformDescription):
+ (ContextMenuItem::type):
+ (ContextMenuItem::setType):
+ (ContextMenuItem::action):
+ (ContextMenuItem::setAction):
+ (ContextMenuItem::title):
+ (ContextMenuItem::setTitle):
+ (ContextMenuItem::platformSubMenu):
+ (ContextMenuItem::setSubMenu):
+ (ContextMenuItem::setChecked):
+ (ContextMenuItem::setEnabled):
+ (ContextMenuItem::enabled):
+ * platform/haiku/DragDataHaiku.cpp: Added.
+ (WebCore::DragData::canSmartReplace):
+ (WebCore::DragData::containsColor):
+ (WebCore::DragData::containsFiles):
+ (WebCore::DragData::asFilenames):
+ (WebCore::DragData::containsPlainText):
+ (WebCore::DragData::asPlainText):
+ (WebCore::DragData::asColor):
+ (WebCore::DragData::createClipboard):
+ (WebCore::DragData::containsCompatibleContent):
+ (WebCore::DragData::containsURL):
+ (WebCore::DragData::asURL):
+ (WebCore::DragData::asFragment):
+ * platform/haiku/DragImageHaiku.cpp: Added.
+ (WebCore::dragImageSize):
+ (WebCore::deleteDragImage):
+ (WebCore::scaleDragImage):
+ (WebCore::dissolveDragImageToFraction):
+ (WebCore::createDragImageFromImage):
+ (WebCore::createDragImageIconForCachedImage):
+
+2009-07-16 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by Darin Fisher and Brett Wilson.
+
+ Refactor Skia implementation of gradients and patterns.
+
+ http://bugs.webkit.org/show_bug.cgi?id=26618
+
+ The following layout tests were breaking on Chromium/Linux:
+
+ LayoutTests/svg/custom/js-late-gradient-creation.svg (bad baseline PNG)
+ LayoutTests/svg/custom/js-late-gradient-and-object.creation.svg
+ LayoutTests/svg/custom/js-late-pattern-creation.svg (bad baseline PNG)
+ LayoutTests/svg/custom/js-late-pattern-and-object-creation.svg
+
+ I could've fixed these the easy way, by copying the same 5
+ lines of code we use everywhere we need patterns or gradients, but
+ I decided to fix it the hard way: by refactoring the code so that
+ PlatformContextSkia::setupPaintForFilling() and
+ PlatformContextSkia::setupPaintForStroking() do the right thing,
+ and also handle gradients and patterns.
+
+ This required pushing the gradients and patterns set in
+ (generic) GraphicsContext::setFillPattern() and friends down into
+ PlatformContextSkia. For this, I followed the setPlatformXXX()
+ pattern used elsewhere in GraphicsContext, and stubbed them out on
+ the other platforms with #if !PLATFORM(SKIA). This also required
+ pushing changes to the gradientSpaceTransform from the Gradient into
+ GradientSkia.
+
+ Since it's a Skia context, I decided to cache the values as
+ SkShaders. There were existing m_pattern and m_gradient SkShaders,
+ but they were unused, and whose use was ambiguous, so I
+ replaced them with one SkShader each for filling and stroking.
+
+ * platform/graphics/Gradient.cpp:
+ (WebCore::Gradient::setGradientSpaceTransform):
+ (WebCore::Gradient::setPlatformGradientSpaceTransform):
+ * platform/graphics/Gradient.h:
+ * platform/graphics/GraphicsContext.cpp:
+ (WebCore::GraphicsContext::setStrokePattern):
+ (WebCore::GraphicsContext::setFillPattern):
+ (WebCore::GraphicsContext::setStrokeGradient):
+ (WebCore::GraphicsContext::setFillGradient):
+ (WebCore::GraphicsContext::setPlatformFillGradient):
+ (WebCore::GraphicsContext::setPlatformFillPattern):
+ (WebCore::GraphicsContext::setPlatformStrokeGradient):
+ (WebCore::GraphicsContext::setPlatformStrokePattern):
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/skia/GradientSkia.cpp:
+ (WebCore::Gradient::setPlatformGradientSpaceTransform):
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::setPlatformFillGradient):
+ (WebCore::GraphicsContext::setPlatformFillPattern):
+ (WebCore::GraphicsContext::setPlatformStrokeGradient):
+ (WebCore::GraphicsContext::setPlatformStrokePattern):
+ (WebCore::GraphicsContext::strokePath):
+ (WebCore::GraphicsContext::strokeRect):
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::State::State):
+ (PlatformContextSkia::State::~State):
+ (PlatformContextSkia::drawRect):
+ (PlatformContextSkia::setupPaintCommon):
+ (PlatformContextSkia::setupPaintForFilling):
+ (PlatformContextSkia::setupPaintForStroking):
+ (PlatformContextSkia::setFillColor):
+ (PlatformContextSkia::setStrokeColor):
+ (PlatformContextSkia::setStrokeShader):
+ (PlatformContextSkia::setFillShader):
+ * platform/graphics/skia/PlatformContextSkia.h:
+ * platform/graphics/skia/SkiaFontWin.cpp:
+ (WebCore::skiaDrawText):
+ (WebCore::paintSkiaText):
+ * svg/graphics/SVGPaintServer.cpp:
+ (WebCore::SVGPaintServer::teardown):
+
+2009-07-16 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Oliver Hunt.
+
+ Added Haiku-specific files for WebCore/platform/image-decoders/.
+ https://bugs.webkit.org/show_bug.cgi?id=26949
+
+ Adding a new file, ImageDecoderHaiku.cpp.
+
+ * platform/image-decoders/haiku/ImageDecoderHaiku.cpp: Added.
+ (WebCore::RGBA32Buffer::RGBA32Buffer):
+ (WebCore::RGBA32Buffer::clear):
+ (WebCore::RGBA32Buffer::zeroFill):
+ (WebCore::RGBA32Buffer::copyBitmapData):
+ (WebCore::RGBA32Buffer::setSize):
+ (WebCore::RGBA32Buffer::asNewNativeImage):
+ (WebCore::RGBA32Buffer::hasAlpha):
+ (WebCore::RGBA32Buffer::setHasAlpha):
+ (WebCore::RGBA32Buffer::setStatus):
+ (WebCore::RGBA32Buffer::operator=):
+ (WebCore::RGBA32Buffer::width):
+ (WebCore::RGBA32Buffer::height):
+
+2009-07-16 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Added Haiku-specific files for WebCore/page/.
+ https://bugs.webkit.org/show_bug.cgi?id=26949
+
+ Adding three new files, DragControllerHaiku.cpp, EventHandlerHaiku.cpp
+ and FrameHaiku.cpp
+
+ * page/haiku/DragControllerHaiku.cpp: Added.
+ (WebCore::DragController::isCopyKeyDown):
+ (WebCore::DragController::dragOperation):
+ (WebCore::DragController::maxDragImageSize):
+ (WebCore::DragController::cleanupAfterSystemDrag):
+ * page/haiku/EventHandlerHaiku.cpp: Added.
+ (WebCore::isKeyboardOptionTab):
+ (WebCore::EventHandler::invertSenseOfTabsToLinks):
+ (WebCore::EventHandler::tabsToAllControls):
+ (WebCore::EventHandler::focusDocumentView):
+ (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
+ (WebCore::EventHandler::passMouseDownEventToWidget):
+ (WebCore::EventHandler::eventActivatedView):
+ (WebCore::EventHandler::passSubframeEventToSubframe):
+ (WebCore::EventHandler::passWheelEventToWidget):
+ (WebCore::EventHandler::createDraggingClipboard):
+ (WebCore::EventHandler::passMousePressEventToSubframe):
+ (WebCore::EventHandler::passMouseMoveEventToSubframe):
+ (WebCore::EventHandler::passMouseReleaseEventToSubframe):
+ (WebCore::EventHandler::accessKeyModifiers):
+ * page/haiku/FrameHaiku.cpp: Added.
+ (WebCore::Frame::dragImageForSelection):
+
+2009-07-16 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Added Haiku-specific files for WebCore/editing/.
+ https://bugs.webkit.org/show_bug.cgi?id=26949
+
+ Adding one new file, EditorHaiku.cpp
+
+ * editing/haiku/EditorHaiku.cpp: Added.
+ (WebCore::Editor::newGeneralClipboard):
+
+2009-07-16 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Added Haiku-specific files for WebCore/bindings/js/.
+ https://bugs.webkit.org/show_bug.cgi?id=26949
+
+ Adding a new file, ScriptControllerHaiku.cpp
+
+ * bindings/js/ScriptControllerHaiku.cpp: Added.
+ (WebCore::ScriptController::createScriptInstanceForWidget):
+
+2009-07-16 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Added Haiku-specific files for WebCore/platform/text/.
+ https://bugs.webkit.org/show_bug.cgi?id=26949
+
+ Adding two new files, StringHaiku.cpp
+ and TextBreakIteratorInternalICUHaiku.cpp
+
+ * platform/text/haiku/StringHaiku.cpp: Added.
+ (WebCore::String::String):
+ (WebCore::String::operator BString):
+ * platform/text/haiku/TextBreakIteratorInternalICUHaiku.cpp: Added.
+ (WebCore::currentTextBreakLocaleID):
+
+2009-07-16 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Sends the basename of a selected file for non-multipart form submission.
+ <https://bugs.webkit.org/show_bug.cgi?id=26505>
+
+ Test: fast/forms/get-file-upload.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::appendFormData):
+
+2009-07-16 Adam Barth <abarth@webkit.org>
+
+ Reviewed by David Levin.
+
+ [V8] Centralize hidden property names
+ https://bugs.webkit.org/show_bug.cgi?id=27359
+
+ No behavior change. Just moving these names to a central location.
+ I'll move the rest of our hidden property names as I sweep though the
+ bindings.
+
+ * WebCore.gypi:
+ * bindings/v8/V8HiddenPropertyName.cpp: Added.
+ (WebCore::V8HiddenPropertyName::objectPrototype):
+ (WebCore::V8HiddenPropertyName::isolatedWorld):
+ * bindings/v8/V8HiddenPropertyName.h: Added.
+ * bindings/v8/V8IsolatedWorld.cpp:
+ (WebCore::V8IsolatedWorld::V8IsolatedWorld):
+ (WebCore::V8IsolatedWorld::getEntered):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::getHiddenObjectPrototype):
+ (WebCore::V8Proxy::installHiddenObjectPrototype):
+
+2009-07-16 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ REGRESSION (r41238) Repainted portion of a scaled image does not line up with full image
+ https://bugs.webkit.org/show_bug.cgi?id=26747
+ rdar://problem/7009243
+
+ Test: fast/repaint/background-misaligned.html
+
+ * platform/graphics/Image.cpp:
+ (WebCore::Image::drawTiled): Moved a variable definition closer to where
+ it is used.
+ * platform/graphics/cg/ImageCG.cpp:
+ (WebCore::BitmapImage::draw): In the subimage code path, compute a
+ pixel-aligned source rect, because the subiamge is always pixel-aligned
+ in source space, and adjust the destination rect to preserve the
+ source -> destination mapping. Clip to the (original) destination rect
+ to prevent bleeding out.
+
+2009-07-16 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add a sessionStorageEnabled setting to the settings class.
+ https://bugs.webkit.org/show_bug.cgi?id=27318
+
+ Allow LocalStorage to be enabled without enabling SessionStorage at
+ runtime. There is a settings class setting for localStorage, but not
+ for sessionStorage. We want to be able to test one of these features
+ without necessarily enabling the other.
+
+ SessionStorage defaults to true so as to not change behavior and
+ because there really aren't any security concerns around SessionStorage
+ (unlike LocalsStorage). The flag is needed in Chromium only because
+ we want to enable the compile time flag in the default build, but don't
+ want it on by default until it's been thoroughly tested.
+
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::sessionStorage): Check the new flag
+ (WebCore::DOMWindow::localStorage): A bit of cleanup
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings): Default the flag to true
+ (WebCore::Settings::setSessionStorageEnabled): Add the new flag
+ * page/Settings.h:
+ (WebCore::Settings::sessionStorageEnabled): Get the new flag
+
+2009-07-16 Adam Barth <abarth@webkit.org>
+
+ Unreviewed.
+
+ Revert 45987. Tests did not pass on Windows.
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::appendFormData):
+
+2009-07-16 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ Added SHARED_WORKER flag to Windows build files, as well as associated .ccp/.h files.
+ Added missing V8 bindings to the AllInOne file
+
+ https://bugs.webkit.org/show_bug.cgi?id=27321
+
+ * WebCore.vcproj/WebCore.vcproj:
+ Added missing files to build.
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ Added missing V8 bindings (V8AbstractWorker.cpp and V8SharedWorker.cpp)
+ * DerivedSources.cpp
+ Added missing JS bindings (JSAbstractWorker.cpp and JSSharedWorker.cpp)
+
+2009-07-16 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add a getter in MessagePortChannel for the PlatformMessagePortChannel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27337
+
+ * dom/MessagePortChannel.h:
+ (WebCore::MessagePortChannel::channel):
+
+2009-07-16 Xiaomei Ji <xji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix tooltip does not get its directionality from its element's directionality.
+ https://bugs.webkit.org/show_bug.cgi?id=24187
+
+ Per mitz's suggestion in comment #6, while getting the plain-text
+ title, we also get the directionality of the title. How to handle
+ the directionality is up to clients. Clients could ignore it,
+ or use attribute or unicode control characters to display the title
+ as what they want.
+
+ WARNING: NO TEST CASES ADDED OR CHANGED
+
+ * WebCore.base.exp: Replace 2 names due to signature change.
+ * loader/EmptyClients.h:
+ (WebCore::EmptyChromeClient::setToolTip): Add direction as 2nd parameter.
+ * page/Chrome.cpp:
+ (WebCore::Chrome::setToolTip): Calculate tooltip direction as well and pass it to client to take care when display tooltip.
+ * page/ChromeClient.h: Add direction as 2nd parameter to pure virtual function setToolTip().
+ * page/chromium/ChromeClientChromium.h:
+ (WebCore::ChromeClientChromium::setToolTip): Add setToolTip()
+ temprarily to make chromium compile after pick up this webkit patch.
+ * rendering/HitTestResult.cpp:
+ (WebCore::HitTestResult::spellingToolTip): Besides getting the
+ spelling tooltip, get its directionality as well.
+ (WebCore::HitTestResult::title): Besides getting the title,
+ get its directionality as well.
+ * rendering/HitTestResult.h: Add 2 more methods.
+
+2009-07-16 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ [CAIRO] pattern of a canvas-element changes after modifications on canvas-element
+ https://bugs.webkit.org/show_bug.cgi?id=20578
+
+ Copy pixel image in ImageBuffer::image() just like CG and Skia glue.
+
+ Test: fast/canvas/canvas-pattern-modify.html
+
+ * platform/graphics/cairo/ImageBufferCairo.cpp:
+ (copySurface):
+ (WebCore::ImageBuffer::image):
+
+2009-07-16 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27353
+ Images mispositioned because of bug in percentage-based relative positioning.
+
+ Added fast/css/nested-floating-relative-position-percentages.html
+
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::relativePositionOffsetX):
+
+2009-07-16 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Sends the basename of a selected file for non-multipart form submission.
+ <https://bugs.webkit.org/show_bug.cgi?id=26505>
+
+ Test: fast/forms/get-file-upload.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::appendFormData):
+
+2009-07-16 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Video size sometimes jumps just after the video starts loading
+ https://bugs.webkit.org/show_bug.cgi?id=27352
+
+ Ensure that the media player is at or after the 'HaveMetadata' state so that
+ the instrinsic size is known before we create the layer for video. This avoids
+ a flash caused by computing the video rect using the default intrinsic size, and then
+ re-computing it when that size changes.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::isReadyForRendering):
+ (WebCore::MediaPlayerPrivate::updateStates):
+ (WebCore::MediaPlayerPrivate::supportsAcceleratedRendering):
+
+2009-07-16 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Antti Koivisto.
+ Patch by Brady Eidson and Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26496
+ <rdar://problem/7065391> Microsoft Outlook Web Access fails because XHR stream connection blocks script loading/revalidation
+
+ After refreshing a page and when all CachedResources on that page are in validation mode, they got an exemption
+ from the connection-per-host limit. Removing that exemption makes the test case load smoothly after reloads.
+
+ * loader/loader.cpp:
+ (WebCore::Loader::Host::servePendingRequests): Remove the resourceIsCacheValidator exemption to the connection-per-host limit.
+
+2009-07-16 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] V8IsolatedWorld::evaluate needs to call didCreateIsolatedScriptContext
+ https://bugs.webkit.org/show_bug.cgi?id=27335
+
+ evaluateInNewContext makes this delegate call. evaluateInNewWorld
+ needs to make the same call. This does not appear to be testable with
+ our current technology.
+
+ * bindings/v8/V8IsolatedWorld.cpp:
+ (WebCore::V8IsolatedWorld::evaluate):
+
+2009-07-15 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ Fix a typo: application/atom=xml -> application/atom+xml.
+
+ * dom/ProcessingInstruction.cpp:
+ (WebCore::ProcessingInstruction::checkStyleSheet):
+
+2009-07-16 Dean McNamee <deanm@chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27292
+ Improve handling of <canvas> path operations on an empty path.
+ Implement Skia's Path::hasCurrentPoint().
+
+ * html/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::lineTo):
+ (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
+ (WebCore::CanvasRenderingContext2D::bezierCurveTo):
+ * platform/graphics/skia/PathSkia.cpp:
+ (WebCore::Path::hasCurrentPoint):
+
+2009-07-15 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Setting white-space and word-wrap via CSS in textarea doesn't override the wrap attribute
+ https://bugs.webkit.org/show_bug.cgi?id=26254
+
+ Make it so that setting white-space and word-wrap via CSS
+ overrides the wrap attribute.
+
+ This involves having the shadow div in the textarea inherit
+ the CSS from its parent instead of hard-coding it in
+ RenderTextControlMultiline.
+
+ Committer note: Earlier I reverted this change because I did it incorrectly
+ by leaving out css/html.css. In the patch, the filename was the old name
+ css/html4.css and that led to my error.
+
+ * css/html.css:
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::parseMappedAttribute):
+ * rendering/RenderTextControlMultiLine.cpp:
+ (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
+
+2009-07-15 James Hawkins <jhawkins@google.com>
+
+ Reviewed by Adam Barth.
+
+ [V8] Remove a local variable that is shadowing a function parameter.
+ https://bugs.webkit.org/show_bug.cgi?id=27309
+
+ No test required as this modification does not change the current behavior.
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+
+2009-07-15 Adam Langley <agl@google.com>
+
+ No review: reverting previous change.
+
+ Revert r45959:
+
+ 2009-07-15 Dumitru Daniliuc <dumi@chromium.org>
+ Reviewed by Dimitri Glazkov.
+
+ Adding the Win SQLite VFS implementation for Chromium.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26940
+
+
+ The Chromium side of this patch was landed in 20839, but broke the build. It
+ was reverted in r20840. Thus, I'm reverting this side of the patch too.
+
+ * WebCore.gypi:
+ * platform/chromium/ChromiumBridge.h:
+ * platform/sql/chromium/SQLiteFileSystemChromium.cpp: Removed.
+ * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: Removed.
+
+2009-07-15 David Levin <levin@chromium.org>
+
+ Layout test fix, reverting previous change.
+
+ Reverting r45962 as it caused several layout test failures.
+
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::parseMappedAttribute):
+ * rendering/RenderTextControlMultiLine.cpp:
+ (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
+
+2009-06-08 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Setting white-space and word-wrap via CSS in textarea doesn't override the wrap attribute
+ https://bugs.webkit.org/show_bug.cgi?id=26254
+
+ Make it so that setting white-space and word-wrap via CSS
+ overrides the wrap attribute.
+
+ This involves having the shadow div in the textarea inherit
+ the CSS from its parent instead of hard-coding it in
+ RenderTextControlMultiline.
+
+ * css/html4.css:
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::parseMappedAttribute):
+ * rendering/RenderTextControlMultiLine.cpp:
+ (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
+
+2009-07-15 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Adding the Win SQLite VFS implementation for Chromium.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26940
+
+ * platform/chromium/ChromiumBridge.h:
+ * platform/sql/chromium: Added.
+ * platform/sql/chromium/SQLiteFileSystemChromium.cpp: Added.
+ * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: Added.
+
+2009-07-15 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ Bug 25151 - workers that fail to load scripts not firing error event.
+ https://bugs.webkit.org/show_bug.cgi?id=25151
+
+ This fixes the problem that an error event is not fired when the worker
+ script fails to load. Some reasons this may occur are an invalid URL for
+ the worker script or a cross-origin redirect.
+
+ We also moves the code to complete the URL and check its origin from
+ Worker constructor to WorkerScriptLoader loading functions in order to
+ move the exception throwing logic out of the scope of Worker constructor.
+ Due to this change, we also remove the output ExceptionCode parameter
+ in the worker constructor. Corresponding JS/V8 binding codes have been
+ updated to reflect this change.
+
+ * bindings/js/JSWorkerConstructor.cpp:
+ (WebCore::constructWorker):
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * workers/Worker.cpp:
+ (WebCore::Worker::Worker):
+ (WebCore::Worker::notifyFinished):
+ * workers/Worker.h:
+ (WebCore::Worker::create):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::importScripts):
+ * workers/WorkerScriptLoader.cpp:
+ (WebCore::toCrossOriginRedirectPolicy):
+ (WebCore::WorkerScriptLoader::loadSynchronously):
+ (WebCore::WorkerScriptLoader::loadAsynchronously):
+ (WebCore::notifyLoadErrorTask):
+ (WebCore::WorkerScriptLoader::createResourceRequest):
+ (WebCore::WorkerScriptLoader::didFail):
+ (WebCore::WorkerScriptLoader::didFailRedirectCheck):
+ (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation):
+ (WebCore::WorkerScriptLoader::notifyError):
+ * workers/WorkerScriptLoader.h:
+ (WebCore::):
+ (WebCore::WorkerScriptLoader::url):
+
+2009-07-15 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ text-shadow is not drawn for text with transparent colour
+ https://bugs.webkit.org/show_bug.cgi?id=21374
+
+ Test: fast/text/shadow-translucent-fill.html
+
+ * rendering/InlineTextBox.cpp:
+ (WebCore::paintTextWithShadows): If the text fill color is not opaque,
+ paint all shadows separately from the text, by casting them from
+ clipped-out opaque text.
+
+2009-07-15 Adam Treat <adam.treat@torchmobile.com>
+
+ Fix the Qt build.
+
+ * html/HTMLAreaElement.cpp:
+
+2009-07-15 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Cleanup DOM Storage dependencies.
+ https://bugs.webkit.org/show_bug.cgi?id=27180
+
+ DOM Storage had several unnecessary (and probably unintended)
+ dependencies. This patch replaces many includes of header files with
+ forward declaration of classes, making some destructors explicit, and
+ taking some factories out of the header files.
+
+ This will allow things like StorageAreaSync to take a StorageAreaImpl*
+ (as it should) rather than a StorageArea* which previously weren't
+ possible because the dependencies were such a tangled mess.
+
+ * storage/LocalStorageTask.cpp:
+ (WebCore::LocalStorageTask::~LocalStorageTask):
+ * storage/LocalStorageTask.h:
+ * storage/Storage.cpp:
+ (WebCore::Storage::~Storage):
+ * storage/Storage.h:
+ * storage/StorageArea.cpp:
+ * storage/StorageArea.h:
+ * storage/StorageAreaImpl.cpp:
+ * storage/StorageAreaImpl.h:
+ * storage/StorageAreaSync.cpp:
+ (WebCore::StorageAreaSync::~StorageAreaSync):
+ * storage/StorageAreaSync.h:
+ * storage/StorageEvent.cpp:
+ (WebCore::StorageEvent::create):
+ (WebCore::StorageEvent::StorageEvent):
+ * storage/StorageEvent.h:
+ * storage/StorageNamespace.h:
+ * storage/StorageNamespaceImpl.cpp:
+ * storage/StorageNamespaceImpl.h:
+ * storage/StorageSyncManager.cpp:
+ (WebCore::StorageSyncManager::~StorageSyncManager):
+ * storage/StorageSyncManager.h:
+
+2009-07-15 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Incorrect animation when trying to duplicate effect of transform-origin
+ https://bugs.webkit.org/show_bug.cgi?id=27310
+
+ The bug is that matrix animation is being used when animating
+ a list of transform functions that match in the from and to states.
+ This sometimes works. But because of the way CA does matrix animation
+ function lists like the one shown in the testcase animate incorrectly.
+
+ This fixes the bug by always doing component animation
+ as long as the function lists match. This allows CA
+ to animate the components and then recompose the result
+ into the correct matrix.
+
+ Test: animations/transform-origin-vs-functions.html
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::animateTransform):
+
+2009-07-15 Albert J. Wong <ajwong@chromium.org>
+
+ Reviewed by David Levin.
+
+ Upstream the V8NPObject and NPV8Object build changes for WebCore.gypi.
+
+ Add upstreamed V8 bindings files into WebCore.gypi so they can be seen
+ downstream
+ https://bugs.webkit.org/show_bug.cgi?id=27274
+
+ Changes the build file for chromium. Test built the chromium tree
+ to verify.
+
+ * WebCore.gypi:
+
+2009-07-15 Mark Rowe <mrowe@apple.com>
+
+ I like it when the code compiles.
+
+ * WebCore.base.exp:
+
+2009-07-15 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Renamed parseURL to deprecatedParseURL.
+
+ * bindings/js/JSAttrCustom.cpp:
+ (WebCore::JSAttr::setValue): Renamed.
+ * bindings/js/JSElementCustom.cpp:
+ (WebCore::allowSettingSrcToJavascriptURL): Renamed.
+ * bindings/js/JSHTMLFrameElementCustom.cpp:
+ (WebCore::allowSettingJavascriptURL): Renamed.
+ * bindings/js/JSHTMLIFrameElementCustom.cpp:
+ (WebCore::JSHTMLIFrameElement::setSrc): Renamed.
+ * bindings/objc/DOM.mm:
+ (-[DOMElement _getURLAttribute:]): Renamed.
+ * bindings/objc/DOMHTML.mm:
+ (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]): Renamed.
+ * bindings/v8/custom/V8CustomBinding.cpp:
+ (WebCore::allowSettingFrameSrcToJavascriptUrl): Renamed.
+ * css/CSSHelper.cpp:
+ (WebCore::deprecatedParseURL): Renamed.
+ * css/CSSHelper.h: Renamed and updated comment.
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::defaultEventHandler): Renamed.
+ (WebCore::HTMLAnchorElement::parseMappedAttribute): Renamed.
+ * html/HTMLBaseElement.cpp:
+ (WebCore::HTMLBaseElement::parseMappedAttribute): Renamed.
+ * html/HTMLBodyElement.cpp:
+ (WebCore::HTMLBodyElement::parseMappedAttribute): Renamed.
+ * html/HTMLEmbedElement.cpp:
+ (WebCore::HTMLEmbedElement::parseMappedAttribute): Renamed.
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::parseMappedAttribute): Renamed.
+ * html/HTMLFrameElementBase.cpp:
+ (WebCore::HTMLFrameElementBase::parseMappedAttribute): Renamed.
+ * html/HTMLImageElement.cpp:
+ (WebCore::HTMLImageElement::parseMappedAttribute): Renamed.
+ * html/HTMLImageLoader.cpp:
+ (WebCore::HTMLImageLoader::sourceURI): Renamed.
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::parseMappedAttribute): Renamed.
+ * html/HTMLObjectElement.cpp:
+ (WebCore::HTMLObjectElement::parseMappedAttribute): Renamed.
+ * html/HTMLTableElement.cpp:
+ (WebCore::HTMLTableElement::parseMappedAttribute): Renamed.
+ * html/HTMLTablePartElement.cpp:
+ (WebCore::HTMLTablePartElement::parseMappedAttribute): Renamed.
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::parseTag): Renamed.
+ * html/PreloadScanner.cpp:
+ (WebCore::PreloadScanner::processAttribute): Renamed.
+ (WebCore::PreloadScanner::emitCSSRule): Renamed.
+ * platform/chromium/ClipboardChromium.cpp:
+ (WebCore::ClipboardChromium::declareAndWriteDragImage): Renamed.
+ * platform/chromium/PasteboardChromium.cpp:
+ (WebCore::Pasteboard::writeImage): Renamed.
+ * platform/qt/ClipboardQt.cpp:
+ (WebCore::ClipboardQt::declareAndWriteDragImage): Renamed.
+ * platform/win/ClipboardWin.cpp:
+ (WebCore::ClipboardWin::declareAndWriteDragImage): Renamed.
+ * rendering/HitTestResult.cpp:
+ (WebCore::HitTestResult::absoluteImageURL): Renamed.
+ (WebCore::HitTestResult::absoluteMediaURL): Renamed.
+ (WebCore::HitTestResult::absoluteLinkURL): Renamed.
+ * svg/SVGAElement.cpp:
+ (WebCore::SVGAElement::defaultEventHandler): Renamed.
+ * svg/SVGImageLoader.cpp:
+ (WebCore::SVGImageLoader::sourceURI): Renamed.
+ * wml/WMLAElement.cpp:
+ (WebCore::WMLAElement::defaultEventHandler): Renamed.
+ * wml/WMLImageLoader.cpp:
+ (WebCore::WMLImageLoader::sourceURI): Renamed.
+
+2009-07-15 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ CSSHelper.h's parseURL is a function that no one should ever call
+ Part 1: Eliminate callers in the CSS parser.
+ https://bugs.webkit.org/show_bug.cgi?id=26599
+
+ Test: fast/css/uri-token-parsing.html
+
+ * css/CSSHelper.h: Added a comment explaining why nobody should ever call this
+ function. A FIXME suggests a next step, which would be to rename it deprecatedParseURL.
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue): Removed unneeded call to parseURL;
+ CSSParser::text already takes care of parsing the URI token syntax, and the
+ parseURL function does no good.
+ (WebCore::CSSParser::parseContent): Ditto.
+ (WebCore::CSSParser::parseFillImage): Ditto.
+ (WebCore::CSSParser::parseFontFaceSrc): Ditto.
+ (WebCore::CSSParser::parseBorderImage): Ditto.
+ (WebCore::isCSSWhitespace): Added. Helper function that makes the text function
+ easier to read.
+ (WebCore::CSSParser::text): Tweak logic so that leading and trailing whitespace
+ are both trimmed before removing the quote marks. Changed to use the
+ isCSSWhitespace, isASCIIHexDigit, and toASCIIHexValue functions for clarity.
+
+ * css/CSSParser.h: Removed stray "public:" in this header.
+
+ * platform/text/StringImpl.cpp:
+ (WebCore::StringImpl::substring): Optimized the case where the substring covers
+ the entire string, so we just share the StringImpl instead of making a new one.
+ This case came up in earlier versions of the CSS parser changes above.
+ (WebCore::StringImpl::substringCopy): Streamlined the logic here and made it
+ not call substring any more. Before, this was relying on the substring function
+ always making a copy of any non-empty substring.
+
+2009-07-15 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan.
+
+ After double-clicking a word, using Shift-arrow to select behaves unpredictably
+ https://bugs.webkit.org/show_bug.cgi?id=27177
+ rdar://problem/7034324
+
+ Test: editing/selection/extend-selection-after-double-click.html
+
+ The bug was due to the m_lastChangeWasHorizontalExtension flag, which was not
+ being cleared in many cases where it should have been.
+
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::setSelection): Set m_lastChangeWasHorizontalExtension
+ to false. This catches all sorts of cases that don't flow through the modify function.
+ Before, the flag would reflect the last call to the modify function, which was not
+ necessarily the last selection change.
+ (WebCore::SelectionController::willBeModified): Rearrange function for clarity.
+ Remove code that sets m_lastChangeWasHorizontalExtension; that is now handled elsewhere.
+ (WebCore::SelectionController::modify): Call setLastChangeWasHorizontalExtension after
+ setSelection when setting up a trial selection controller, since setSelection now
+ clears that flag. Also changed both trial selection controller cases to set the flag,
+ although it's not strictly necessary in both cases. Added code to set
+ m_lastChangeWasHorizontalExtension when extending the selection, which used to be
+ handled in willBeModified. Now we need to do it after the selection change.
+
+2009-07-15 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Need to update DOM Storage files in GYPI file.
+ https://bugs.webkit.org/show_bug.cgi?id=27317
+
+ Need to update DOM Storage files in the GYPI file. They're pretty out
+ of date and we're on the path towards enabling them for everyone!
+
+ * WebCore.gypi:
+
+2009-07-15 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26794
+ Make Yacc-generated parsers to use fastMalloc/fastFree.
+
+ Define YYMALLOC and YYFREE to fastMalloc and fastFree
+ respectively.
+
+ * css/CSSGrammar.y:
+ * xml/XPathGrammar.y:
+
+2009-07-15 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27193
+ Don't run in to anonymous blocks. No other browsers do this, and our implementation of run-in
+ is effectively broken as a result.
+
+ No new tests. Changed fast/runin/001.html and fast/runin/generated.html to match new behavior.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::handleRunInChild):
+
+2009-07-15 Yuzo Fujishima <yuzo@google.com>
+
+ Reviewed by Darin Adler.
+
+ Test: fast/js/instanceof-operator.html
+
+ Fix for: Bug 25205 - XMLHttpRequest instance is not an instanceof XMLHttpRequest
+ https://bugs.webkit.org/show_bug.cgi?id=25205
+
+ In addition to for XMLHttpRequest, this also fixes for:
+ - Audio
+ - Image
+ - MessageChannel
+ - Option
+ - WebKitCSSMatrix
+ - WebKitPoint
+ - Worker
+ - XSLTProcessor
+
+ * bindings/js/JSAudioConstructor.cpp:
+ (WebCore::JSAudioConstructor::JSAudioConstructor):
+ * bindings/js/JSAudioConstructor.h:
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::DOMConstructorObject::createStructure):
+ (WebCore::DOMConstructorObject::DOMConstructorObject):
+ * bindings/js/JSImageConstructor.cpp:
+ (WebCore::JSImageConstructor::JSImageConstructor):
+ * bindings/js/JSImageConstructor.h:
+ * bindings/js/JSMessageChannelConstructor.cpp:
+ (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
+ * bindings/js/JSMessageChannelConstructor.h:
+ * bindings/js/JSOptionConstructor.cpp:
+ (WebCore::JSOptionConstructor::JSOptionConstructor):
+ * bindings/js/JSOptionConstructor.h:
+ * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
+ (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor):
+ * bindings/js/JSWebKitCSSMatrixConstructor.h:
+ * bindings/js/JSWebKitPointConstructor.cpp:
+ (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor):
+ * bindings/js/JSWebKitPointConstructor.h:
+ * bindings/js/JSWorkerConstructor.cpp:
+ (WebCore::JSWorkerConstructor::JSWorkerConstructor):
+ * bindings/js/JSWorkerConstructor.h:
+ * bindings/js/JSXMLHttpRequestConstructor.cpp:
+ (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
+ * bindings/js/JSXMLHttpRequestConstructor.h:
+ * bindings/js/JSXSLTProcessorConstructor.cpp:
+ (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
+ * bindings/js/JSXSLTProcessorConstructor.h:
+
+2009-07-15 Kai Br�ning <kai@granus.net>
+
+ Reviewed by Dave Hyatt.
+
+ CSS21 attribute selectors not dynamic for xml.
+ https://bugs.webkit.org/show_bug.cgi?id=25072
+
+ Moved the relevant test in StyledElement::attributeChanged()
+ to a new function Element::recalcStyleIfNeededAfterAttributeChanged()
+ so it can be called from both StyledElement::attributeChanged()
+ and Element::attributeChanged().
+ Refactored Element::attributeChanged() into
+ Element::updateAfterAttributeChanged() and
+ Element::recalcStyleIfNeededAfterAttributeChanged(), which are called
+ separately from StyledElement::attributeChanged().
+
+ Test: fast/css/attribute-selector-dynamic.xml
+
+ * dom/Element.cpp:
+ (WebCore::Element::attributeChanged):
+ (WebCore::Element::updateAfterAttributeChanged):
+ (WebCore::Element::recalcStyleIfNeededAfterAttributeChanged):
+ * dom/Element.h:
+ * dom/StyledElement.cpp:
+ (WebCore::StyledElement::attributeChanged):
+
+2009-07-15 Alpha Lam <hclam@chromium.org>
+
+ Reviewed by David Levin.
+
+ [V8] Layout test failures for drawImage in Canvas
+ https://bugs.webkit.org/show_bug.cgi?id=27311
+
+ Fixing several canvas layout tests failures due to a
+ missing return statement in CanvasRenderingContext2DDrawImage() which
+ was accidentally removed in r45929.
+
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+
+2009-07-15 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26969
+
+ If the httpMethod() of the request passed to SubresourceLoader::create is not
+ supported by the client we must expect to call didFail() while m_loader is still null.
+
+ * loader/DocumentThreadableLoader.cpp:
+ (DocumentThreadableLoader::didFail):Changed.
+
+2009-07-15 Mark Rowe <mrowe@apple.com>
+
+ Fix the Mac build.
+
+ * WebCore.base.exp:
+ * css/MediaQueryEvaluator.cpp:
+ * rendering/SVGRenderTreeAsText.cpp:
+ * rendering/style/SVGRenderStyle.cpp:
+ * svg/graphics/SVGPaintServer.cpp:
+
+2009-07-07 Alpha Lam <hclam@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] drawImage method of HTMLCanvasElement to accept HTMLVideoElement as argument
+ https://bugs.webkit.org/show_bug.cgi?id=27170
+
+ Changed CanvasRenderingContext2DDrawImage() to accept HTMLVideoElement
+ as a parameter of drawImage() for HTMLCanvasElement.
+
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+
+2009-07-15 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Fix isolated world constructors
+ https://bugs.webkit.org/show_bug.cgi?id=27287
+
+ Don't enter V8Proxy::m_context before creating DOM constructors.
+ Instead, use getWrapperContext to get the right context.
+
+ After this patch, all my tests pass. I'll enable the feature
+ downstream and land the tests.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getConstructor):
+ (WebCore::V8DOMWrapper::lookupDOMWrapper):
+ * bindings/v8/V8DOMWrapper.h:
+ * bindings/v8/V8IsolatedWorld.cpp:
+ (WebCore::V8IsolatedWorld::evaluate):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::createWrapperFromCache):
+ (WebCore::V8Proxy::isContextInitialized):
+ (WebCore::V8Proxy::disposeContextHandles):
+ (WebCore::V8Proxy::installDOMWindow):
+ (WebCore::V8Proxy::initContextIfNeeded):
+ (WebCore::V8Proxy::getHiddenObjectPrototype):
+ (WebCore::V8Proxy::installHiddenObjectPrototype):
+ * bindings/v8/V8Proxy.h:
+
+2009-07-15 Antonio Gomes <antonio.gomes@openbossa.org>
+
+ Reviewed by Darin Adler.
+
+ useless null-check statement in visible_units.cpp@logicalStartOfLine
+ https://bugs.webkit.org/show_bug.cgi?id=27154
+
+ Simple fix.
+
+ * editing/visible_units.cpp:
+ (WebCore::logicalStartOfLine): Doubled honorEditableBoundaryAtOrAfter() call removed.
+
+2009-07-15 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27304
+ WebKit should provide usage and eligibility information about the page cache.
+
+ * WebCore.base.exp:
+
+ * history/CachedFrame.cpp:
+ (WebCore::CachedFrame::childFrameCount):
+ * history/CachedFrame.h:
+
+ * history/PageCache.cpp:
+ (WebCore::PageCache::frameCount):
+ (WebCore::PageCache::autoreleasedPageCount):
+ * history/PageCache.h:
+ (WebCore::PageCache::pageCount):
+
+2009-07-15 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by David Levin.
+
+ Chromium's canvas forgets its context after fillText again
+ https://bugs.webkit.org/show_bug.cgi?id=27293
+
+ No new tests because the test for this was already added in
+ https://bugs.webkit.org/show_bug.cgi?id=26436
+
+ * platform/graphics/chromium/TransparencyWin.cpp:
+ (WebCore::TransparencyWin::compositeTextComposite):
+
+2009-07-14 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27283
+
+ Implement the new 'rem' unit from CSS3.
+
+ Added some rem-* tests in fast/css.
+
+ * css/CSSGrammar.y:
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::validUnit):
+ (WebCore::unitFromString):
+ (WebCore::CSSParser::parseValue):
+ (WebCore::CSSParser::lex):
+ * css/CSSParserValues.cpp:
+ (WebCore::CSSParserValue::createCSSValue):
+ * css/CSSPrimitiveValue.cpp:
+ (WebCore::CSSPrimitiveValue::computeLengthInt):
+ (WebCore::CSSPrimitiveValue::computeLengthIntForLength):
+ (WebCore::CSSPrimitiveValue::computeLengthShort):
+ (WebCore::CSSPrimitiveValue::computeLengthFloat):
+ (WebCore::CSSPrimitiveValue::computeLengthDouble):
+ (WebCore::CSSPrimitiveValue::cssText):
+ (WebCore::CSSPrimitiveValue::parserValue):
+ * css/CSSPrimitiveValue.h:
+ (WebCore::CSSPrimitiveValue::):
+ (WebCore::CSSPrimitiveValue::isUnitTypeLength):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::initForStyleResolve):
+ (WebCore::convertToLength):
+ (WebCore::CSSStyleSelector::applyProperty):
+ (WebCore::CSSStyleSelector::mapFillSize):
+ (WebCore::CSSStyleSelector::mapFillXPosition):
+ (WebCore::CSSStyleSelector::mapFillYPosition):
+ (WebCore::CSSStyleSelector::createTransformOperations):
+ * css/CSSStyleSelector.h:
+ * css/MediaQueryEvaluator.cpp:
+ (WebCore::device_heightMediaFeatureEval):
+ (WebCore::device_widthMediaFeatureEval):
+ (WebCore::heightMediaFeatureEval):
+ (WebCore::widthMediaFeatureEval):
+ * css/WebKitCSSMatrix.cpp:
+ (WebCore::WebKitCSSMatrix::setMatrixValue):
+ * css/tokenizer.flex:
+ * dom/Document.cpp:
+ (WebCore::Document::Document):
+ * dom/Document.h:
+ (WebCore::Document::usesRemUnits):
+ (WebCore::Document::setUsesRemUnits):
+ * dom/Element.cpp:
+ (WebCore::Element::recalcStyle):
+ * rendering/SVGRenderTreeAsText.cpp:
+ (WebCore::writeStyle):
+ * rendering/style/SVGRenderStyle.cpp:
+ (WebCore::SVGRenderStyle::cssPrimitiveToLength):
+ * svg/graphics/SVGPaintServer.cpp:
+ (WebCore::applyStrokeStyleToContext):
+ (WebCore::dashArrayFromRenderingStyle):
+ * svg/graphics/SVGPaintServer.h:
+
+2009-07-15 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ Remove extraneous qualifier, accidentally added in http://trac.webkit.org/changeset/45884.
+
+ * bindings/v8/V8DOMWrapper.h: Removed extraneous qualifier.
+
+2009-07-15 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [V8] Update bindings for ValiditeState patch.
+ https://bugs.webkit.org/show_bug.cgi?id=19562
+
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+
+2009-07-15 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Cleanup - Remove obsolete code from the make system
+ https://bugs.webkit.org/show_bug.cgi?id=27299
+
+ * WebCore.pro:
+
+2009-07-15 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ Fix the build without media elements.
+
+ * rendering/HitTestResult.cpp:
+ (WebCore::HitTestResult::absoluteMediaURL): Add #if ENABLE(VIDEO)
+ markers around the body of the method.
+
+2009-07-14 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Move storeLastActivePanel out of the
+ ifdef ENABLE_JAVASCRIPT_DEBUGGER section in IDL;
+ Add default panel for the first opening of the
+ WebInspector.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27263
+
+ * inspector/InspectorController.cpp:
+ (InspectorController::setWindowVisible):
+ * inspector/InspectorController.idl:
+
+2009-07-14 Darin Adler <darin@apple.com>
+
+ Try to fix Windows build.
+
+ * bindings/scripts/CodeGeneratorCOM.pm: Add Reflect and ReflectURL support.
+
+2009-07-14 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ HTMLMediaElement::supportsFullscreen() should return false
+ https://bugs.webkit.org/show_bug.cgi?id=27284
+
+ (Reverting a part of 45875)
+
+ HTMLVideoElement::supportsFullscreen() will properly do the
+ job, and check if the backend supports fullscreen.
+
+ HTMLVideoElement is the only subclass to support fullscreen
+ (conditionnaly). HTMLAudioElement fullscreen is not supported
+ and is a different kind of fullscreen, if it comes to be wanted.
+
+ No test can be done currently given that none of the media
+ backends support fullscreen.
+
+ * html/HTMLMediaElement.cpp:
+ * html/HTMLMediaElement.h:
+ (WebCore::HTMLMediaElement::supportsFullscreen):
+
+2009-07-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Next step in making DOM attribute getter/setters consistently use AtomicString
+ https://bugs.webkit.org/show_bug.cgi?id=25425
+
+ This covers eight DOM classes, and for each one of the classes:
+
+ - Changes the IDL to use the Reflect syntax for all simple cases.
+ - Removes unused functions in the classes, mainly newly unused ones that were
+ used for reflection before.
+ - Removes unneeded explicitly defined destructors.
+ - Explicitly declares destructors as virtual.
+ - Removes unneeded includes.
+ - Makes members protected or private rather than public where possible.
+ - Renames "doc" to "document".
+ - Tweaks formatting to match our latest style in a few places.
+ - Improves some FIXME comments.
+
+ Over time we'll want to do this for all HTML DOM classes.
+
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::HTMLAnchorElement):
+ * html/HTMLAnchorElement.h:
+ (WebCore::HTMLAnchorElement::endTagRequirement):
+ (WebCore::HTMLAnchorElement::tagPriority):
+ * html/HTMLAnchorElement.idl:
+ * html/HTMLAppletElement.cpp:
+ * html/HTMLAppletElement.h:
+ * html/HTMLAppletElement.idl:
+ * html/HTMLAreaElement.cpp:
+ (WebCore::HTMLAreaElement::parseMappedAttribute):
+ * html/HTMLAreaElement.h:
+ (WebCore::HTMLAreaElement::endTagRequirement):
+ (WebCore::HTMLAreaElement::tagPriority):
+ * html/HTMLAreaElement.idl:
+ * html/HTMLBRElement.cpp:
+ (WebCore::HTMLBRElement::parseMappedAttribute):
+ * html/HTMLBRElement.h:
+ * html/HTMLBRElement.idl:
+ * html/HTMLBaseElement.cpp:
+ (WebCore::HTMLBaseElement::HTMLBaseElement):
+ (WebCore::HTMLBaseElement::removedFromDocument):
+ (WebCore::HTMLBaseElement::process):
+ * html/HTMLBaseElement.h:
+ * html/HTMLBaseElement.idl:
+ * html/HTMLBaseFontElement.cpp:
+ (WebCore::HTMLBaseFontElement::HTMLBaseFontElement):
+ * html/HTMLBaseFontElement.h:
+ (WebCore::HTMLBaseFontElement::endTagRequirement):
+ (WebCore::HTMLBaseFontElement::tagPriority):
+ * html/HTMLBaseFontElement.idl:
+ * html/HTMLBlockquoteElement.cpp:
+ (WebCore::HTMLBlockquoteElement::HTMLBlockquoteElement):
+ * html/HTMLBlockquoteElement.h:
+ (WebCore::HTMLBlockquoteElement::tagPriority):
+ * html/HTMLBlockquoteElement.idl:
+ * html/HTMLBodyElement.cpp:
+ (WebCore::HTMLBodyElement::HTMLBodyElement):
+ (WebCore::HTMLBodyElement::addSubresourceAttributeURLs):
+ * html/HTMLBodyElement.h:
+ (WebCore::HTMLBodyElement::endTagRequirement):
+ (WebCore::HTMLBodyElement::tagPriority):
+ * html/HTMLBodyElement.idl:
+ Made changes as described above.
+
+ * loader/FrameLoader.cpp: Removed unneeded include of HTMLAnchorElement.h.
+
+2009-07-14 Steve Falkenburg <sfalken@apple.com>
+
+ Reorganize JavaScriptCore headers into:
+ API: include/JavaScriptCore/
+ Private: include/private/JavaScriptCore/
+
+ Reviewed by Darin Adler.
+
+ * WebCore.vcproj/QTMovieWin.vcproj:
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+ * WebCore.vcproj/build-generated-files.sh:
+
+2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ Change all Noncopyable inheriting visibility to public.
+ https://bugs.webkit.org/show_bug.cgi?id=27225
+
+ Change all Noncopyable inheriting visibility to public because
+ it is needed to the custom allocation framework (bug #20422).
+
+ * bindings/js/GCController.h:
+ * bindings/js/WorkerScriptController.h:
+ * bindings/v8/V8DOMMap.cpp:
+ (WebCore::):
+ * bridge/runtime.h:
+ * css/CSSSelector.h:
+ * css/CSSSelectorList.h:
+ * css/CSSStyleSelector.h:
+ * dom/ClassNames.h:
+ * dom/MessagePortChannel.h:
+ * dom/XMLTokenizerLibxml2.cpp:
+ * dom/XMLTokenizerScope.h:
+ * editing/ReplaceSelectionCommand.cpp:
+ * editing/SelectionController.h:
+ * editing/TextIterator.cpp:
+ * history/PageCache.h:
+ * html/CanvasRenderingContext2D.h:
+ * html/HTMLParser.h:
+ * html/HTMLParserQuirks.h:
+ * html/PreloadScanner.h:
+ * loader/Cache.h:
+ * loader/CrossOriginPreflightResultCache.h:
+ * loader/FrameLoader.h:
+ * loader/ProgressTracker.h:
+ * loader/ThreadableLoader.h:
+ * loader/appcache/ApplicationCacheGroup.h:
+ * loader/archive/ArchiveResourceCollection.h:
+ * loader/icon/IconDatabase.h:
+ * loader/icon/IconLoader.h:
+ * loader/icon/PageURLRecord.h:
+ * loader/loader.h:
+ * page/ContextMenuController.h:
+ * page/EventHandler.h:
+ * page/FrameTree.h:
+ * page/Page.h:
+ * page/PageGroup.h:
+ * page/PageGroupLoadDeferrer.h:
+ * page/mac/EventHandlerMac.mm:
+ * platform/AutodrainedPool.h:
+ * platform/ContextMenu.h:
+ * platform/EventLoop.h:
+ * platform/HostWindow.h:
+ * platform/Pasteboard.h:
+ * platform/PurgeableBuffer.h:
+ * platform/RunLoopTimer.h:
+ * platform/ThreadGlobalData.h:
+ * platform/ThreadTimers.h:
+ * platform/Timer.h:
+ * platform/TreeShared.h:
+ * platform/graphics/FontData.h:
+ * platform/graphics/GlyphWidthMap.h:
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/ImageBuffer.h:
+ * platform/graphics/ImageSource.h:
+ * platform/graphics/MediaPlayer.h:
+ * platform/graphics/skia/GraphicsContextPlatformPrivate.h:
+ * platform/graphics/skia/PlatformContextSkia.h:
+ * platform/graphics/win/QTMovieWin.cpp:
+ * platform/mac/LocalCurrentGraphicsContext.h:
+ * platform/network/FormDataBuilder.h:
+ * platform/network/ResourceHandleInternal.h:
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ * platform/text/StringBuffer.h:
+ * platform/text/TextCodec.h:
+ * platform/win/WindowMessageBroadcaster.h:
+ * rendering/CounterNode.h:
+ * rendering/LayoutState.h:
+ * rendering/RenderFrameSet.h:
+ * rendering/RenderView.h:
+ * rendering/TransformState.h:
+ * svg/SVGAnimatedProperty.h:
+ * svg/SynchronizableTypeWrapper.h:
+ * workers/WorkerMessagingProxy.h:
+ * workers/WorkerRunLoop.cpp:
+ * xml/XPathExpressionNode.h:
+ * xml/XPathParser.h:
+ * xml/XPathPredicate.h:
+ * xml/XPathStep.h:
+
+2009-07-14 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fails to save document state when navigating away from a page with a
+ reference fragment.
+ https://bugs.webkit.org/show_bug.cgi?id=27281
+
+ Test: fast/history/saves-state-after-fragment-nav.html
+
+ * history/HistoryItem.cpp:
+ (WebCore::HistoryItem::isCurrentDocument): Use equalIgnoringRef
+ to compare URLs.
+
+2009-07-14 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Sam Weinig.
+
+ Inspector: Remove Unintended Global Variables
+ https://bugs.webkit.org/show_bug.cgi?id=27203
+
+ * inspector/front-end/Console.js:
+ (WebInspector.Console.prototype._ensureCommandLineAPIInstalled):
+ * inspector/front-end/DatabasesPanel.js:
+ (WebInspector.DatabasesPanel.prototype.dataGridForDOMStorage):
+ * inspector/front-end/ObjectPropertiesSection.js:
+ (WebInspector.ObjectPropertyTreeElement.prototype.update):
+ * inspector/front-end/inspector.js:
+ (WebInspector.animateStyle):
+
+2009-07-14 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by Adele Peterson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=19562
+ Added build stuff and stub for the ValidityState class, part of HTML5
+ section Forms:
+ http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#validitystate
+
+ Test: fast/forms/ValidityState-001.html
+
+ * DerivedSources.cpp: Inclusion of ValidityState files
+ * DerivedSources.make: ditto
+ * GNUmakefile.am: ditto
+ * WebCore.gypi: ditto
+ * WebCore.pro: ditto
+ * WebCore.vcproj/WebCore.vcproj: ditto
+ * WebCore.xcodeproj/project.pbxproj: ditto
+ * WebCoreSources.bkl: ditto
+ * html/HTMLButtonElement.idl: validity attribute
+ * html/HTMLFieldSetElement.idl: ditto
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::validity): ValidityState getter
+ * html/HTMLFormControlElement.h: ditto
+ * html/HTMLInputElement.idl: validity attribute
+ * html/HTMLSelectElement.idl: ditto
+ * html/HTMLTextAreaElement.idl: ditto
+ * html/ValidityState.cpp: Added.
+ (WebCore::ValidityState::ValidityState):
+ (WebCore::ValidityState::valid): validation flag
+ * html/ValidityState.h: Added.
+ (WebCore::ValidityState::create): validation flag
+ (WebCore::ValidityState::control): ditto
+ (WebCore::ValidityState::valueMissing): ditto
+ (WebCore::ValidityState::typeMismatch): ditto
+ (WebCore::ValidityState::patternMismatch): ditto
+ (WebCore::ValidityState::tooLong): ditto
+ (WebCore::ValidityState::rangeUnderflow): ditto
+ (WebCore::ValidityState::rangeOverflow): ditto
+ (WebCore::ValidityState::stepMismatch): ditto
+ (WebCore::ValidityState::customError): ditto
+ * html/ValidityState.idl: Added.
+
+2009-07-14 Ryosuke Niwa <rniwa@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Outdenting a line inside a blockquote tag does nothing
+ https://bugs.webkit.org/show_bug.cgi?id=25316
+
+ The bug was caused by the code checking whether the blockquote is created by WebKit or not.
+ We simply remove this code to be consistent with Firefox and Internet Explorer.
+ Also, enclosingBlockFlow == enclosingNode in outdentParagraph isn't a sufficient condition to insert
+ the placeholder before the enclosingNode because there could be contents before the current paragraph.
+ Instead, we should split the enclosingNode (which is a blockquote) at the starting position of outdentation.
+ It turned out that this solves the bug 25315 also: https://bugs.webkit.org/show_bug.cgi?id=25315
+
+ Test: editing/execCommand/outdent-regular-blockquote.html
+
+ * editing/IndentOutdentCommand.cpp:
+ (WebCore::isIndentBlockquote): no longer checks whether a blockquote is created by WebKit or not.
+ (WebCore::IndentOutdentCommand::outdentParagraph): takes care of the case enclosingBlockFlow == enclosingNode
+
+2009-07-14 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Fix isolated world wrappers for Node prototypes
+ https://bugs.webkit.org/show_bug.cgi?id=27277
+
+ This change does two things:
+
+ 1) We bypass the wrapper cache in the isolated world. This is because
+ the wrapper template cache has prototypes that lead to the main
+ world. We can add a template cache for the isolated world if
+ performance warrants.
+
+ 2) We introduce a smarter way to grab the wrapper context for a frame
+ that is aware that proxy <-> context do not stand in one-to-one
+ correspondence. This generalizes our solution for the node wrapper
+ case to prototypes.
+
+ The net result is that Node wrappers get the right prototypes. As
+ before, tests to follow.
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::setHiddenWindowReference):
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ (WebCore::V8DOMWrapper::convertNodeToV8Object):
+ (WebCore::V8DOMWrapper::convertWindowToV8Object):
+ (WebCore::V8DOMWrapper::getWrapperContext):
+ * bindings/v8/V8DOMWrapper.h:
+
+2009-07-14 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Fix isolated world wrappers for Nodes
+ https://bugs.webkit.org/show_bug.cgi?id=27271
+
+ Previously, we keepy a pointer to the DOMMap on V8Proxy, but this
+ caused us to miss the branch in V8DOMMap.cpp for isolated worlds.
+
+ I have tests, but I can't land them until I get this feature under
+ control.
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::convertNodeToV8Object):
+ * bindings/v8/V8Proxy.h:
+ (WebCore::V8Proxy::V8Proxy):
+
+2009-07-14 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Fix isolated world crash on getting window.location
+ https://bugs.webkit.org/show_bug.cgi?id=27268
+
+ I have a test for this locally, but it requires a compile-time hack to
+ run. Once I get the feature's stability under control, we can turn the
+ feature on and add the tests.
+
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::setHiddenWindowReference):
+ * bindings/v8/V8IsolatedWorld.h:
+ (WebCore::V8IsolatedWorld::context):
+
+2009-07-14 Brent Fulgham <bfulgham@webkit.org>
+
+ Correct failing tests after r45875. The original patch did not
+ test the m_player member for null, causing crashes. This will
+ happen fairly frequently in real use. Was this original patch
+ ever tested?
+ https://bugs.webkit.org/show_bug.cgi?id=27246
+
+ Test via existing media tests.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::supportsFullscreen): Check for null pointer.
+ (WebCore::HTMLMediaElement::supportsSave): Check for null pointer.
+
+2009-07-14 Avi Drissman <avi@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Explicitly mark the HTML generated for the Mac as being UTF-8 encoded.
+ The Windows clipboard format is explicitly documented as being UTF-8,
+ and all Linux apps assume UTF-8. On the Mac, though, unless otherwise
+ indicated, Windows-1252 is assumed, which is wrong.
+
+ Bug: https://bugs.webkit.org/show_bug.cgi?id=27262
+
+ No new tests.
+
+ * platform/chromium/ClipboardChromium.cpp:
+ (WebCore::ClipboardChromium::writeRange):
+ * platform/chromium/PasteboardChromium.cpp:
+ (WebCore::Pasteboard::writeSelection):
+
+2009-07-14 Albert J. Wong <ajwong@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Upstream V8NPObject.h and V8NPObject.cpp.
+ https://bugs.webkit.org/show_bug.cgi?id=27103
+
+ This just upstreams the files from the chromium code base. Only
+ minor changes to formatting and similar were done, so no testing
+ is required because nothing really changed. Code verified to compile.
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::bindToWindowObject):
+ (WebCore::ScriptController::createScriptInstanceForWidget):
+ * bindings/v8/V8NPObject.cpp: Added.
+ (npObjectInvokeImpl):
+ (npObjectMethodHandler):
+ (npObjectInvokeDefaultHandler):
+ (weakTemplateCallback):
+ (npObjectGetProperty):
+ (npObjectNamedPropertyGetter):
+ (npObjectIndexedPropertyGetter):
+ (npObjectGetNamedProperty):
+ (npObjectGetIndexedProperty):
+ (npObjectSetProperty):
+ (npObjectNamedPropertySetter):
+ (npObjectIndexedPropertySetter):
+ (npObjectSetNamedProperty):
+ (npObjectSetIndexedProperty):
+ (weakNPObjectCallback):
+ (createV8ObjectForNPObject):
+ (forgetV8ObjectForNPObject):
+ * bindings/v8/V8NPObject.h: Added.
+ * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+
+
+2009-07-14 Albert J. Wong <ajwong@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Add HTMLMediaElement::supportSave() and a
+ HitTestResult::absoluteMediaURL() functions
+ https://bugs.webkit.org/show_bug.cgi?id=27246
+
+ Added an implementation of supportsSave() into HTMLMediaElement
+ that delegates to MediaPlayerPrivateImpl so that the media engine
+ is able to signal whether or not a media source supports saving.
+
+ Also added a function to HitTestResult that allows for retrieval
+ of the currentSrc associated with the "hit" media element.
+
+ These functions are just pipeing with no visible UI change so there
+ are no related layout test changes.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::supportsFullscreen):
+ (WebCore::HTMLMediaElement::supportsSave):
+ * html/HTMLMediaElement.h:
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::MediaPlayer::supportsSave):
+ * platform/graphics/MediaPlayer.h:
+ * platform/graphics/MediaPlayerPrivate.h:
+ (WebCore::MediaPlayerPrivateInterface::supportsFullscreen):
+ (WebCore::MediaPlayerPrivateInterface::supportsSave):
+ * rendering/HitTestResult.cpp:
+ (WebCore::HitTestResult::altDisplayString):
+ (WebCore::HitTestResult::absoluteMediaURL):
+ * rendering/HitTestResult.h:
+
+2009-07-14 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Implement Reflect and ReflectURL attribute support.
+ https://bugs.webkit.org/show_bug.cgi?id=27273
+
+ * bindings/scripts/CodeGeneratorV8.pm: Added support for Reflect and ReflectURL attributes.
+
+2009-07-14 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27266
+ Add hasCurrentPoint() to WebCore::Path.
+ This fixes Skia-based Chromium regression caused by the fix for
+ https://bugs.webkit.org/show_bug.cgi?id=27187.
+ For Skia, the new method always returns 'true', pending actual implementation.
+ This means Chromium still will differ from Gecko behavior, but at least its Canvas
+ will not be completely broken.
+
+ Existing Canvas Layout Tests should pass in Chromium after this change.
+
+ * html/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::lineTo): insteand of Path::isEmpty() test for hasCurrentPoint().
+ (WebCore::CanvasRenderingContext2D::quadraticCurveTo): ditto.
+ (WebCore::CanvasRenderingContext2D::bezierCurveTo): ditto.
+
+ * platform/graphics/Path.h:
+ * platform/graphics/cairo/PathCairo.cpp:
+ (WebCore::Path::hasCurrentPoint):
+ * platform/graphics/cg/PathCG.cpp:
+ (WebCore::Path::isEmpty):
+ (WebCore::Path::hasCurrentPoint):
+ * platform/graphics/qt/PathQt.cpp:
+ (WebCore::Path::hasCurrentPoint):
+ * platform/graphics/skia/PathSkia.cpp:
+ (WebCore::Path::hasCurrentPoint):
+ * platform/graphics/wx/PathWx.cpp:
+ (WebCore::Path::hasCurrentPoint):
+ All these files add a Path::hasCurrentPoint() for various platforms.
+
+2009-07-14 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Sam Weinig.
+
+ Upstream RGBColor from src.chromium.org.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27133
+
+ * WebCore.gypi: Add RGBColor
+ * css/RGBColor.cpp: Added.
+ (WebCore::RGBColor::create):
+ (WebCore::RGBColor::red):
+ (WebCore::RGBColor::green):
+ (WebCore::RGBColor::blue):
+ * css/RGBColor.h: Added.
+ (WebCore::RGBColor::RGBColor):
+
+2009-07-10 Matt Perry <mpcomplete@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [V8] Rename the didCreate/DestroyScriptContext calls to make it
+ clear that that those refer to the frame's contxt. Add another
+ similar call for when creating contexts via evaluateInNewContext.
+ https://bugs.webkit.org/show_bug.cgi?id=27104
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluateInNewContext):
+ (WebCore::V8Proxy::disposeContextHandles):
+ (WebCore::V8Proxy::initContextIfNeeded):
+ * loader/EmptyClients.h:
+ (WebCore::EmptyFrameLoaderClient::didCreateScriptContextForFrame):
+ (WebCore::EmptyFrameLoaderClient::didDestroyScriptContextForFrame):
+ (WebCore::EmptyFrameLoaderClient::didCreateIsolatedScriptContext):
+ * loader/FrameLoaderClient.h:
+
+2009-07-14 Brent Fulgham <bfulgham@webkit.org>
+
+ Revert http://trac.webkit.org/changeset/45864 after
+ breaking of Windows build.
+
+ * storage/LocalStorageTask.cpp:
+ * storage/LocalStorageTask.h:
+ * storage/Storage.cpp:
+ * storage/Storage.h:
+ * storage/StorageArea.cpp:
+ * storage/StorageArea.h:
+ * storage/StorageAreaImpl.cpp:
+ * storage/StorageAreaImpl.h:
+ * storage/StorageAreaSync.cpp:
+ * storage/StorageAreaSync.h:
+ * storage/StorageEvent.cpp:
+ * storage/StorageEvent.h:
+ (WebCore::StorageEvent::create):
+ (WebCore::StorageEvent::StorageEvent):
+ * storage/StorageNamespace.h:
+ * storage/StorageNamespaceImpl.cpp:
+ * storage/StorageNamespaceImpl.h:
+ * storage/StorageSyncManager.cpp:
+ * storage/StorageSyncManager.h:
+
+2009-07-11 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Cleanup DOM Storage dependencies.
+ https://bugs.webkit.org/show_bug.cgi?id=27180
+
+ DOM Storage had several unnecessary (and probably unintended)
+ dependencies. This patch replaces many includes of header files with
+ forward declaration of classes, making some destructors explicit, and
+ taking some factories out of the header files.
+
+ This will allow things like StorageAreaSync to take a StorageAreaImpl*
+ (as it should) rather than a StorageArea* which previously weren't
+ possible because the dependencies were such a tangled mess.
+
+ * storage/LocalStorageTask.cpp:
+ (WebCore::LocalStorageTask::~LocalStorageTask):
+ * storage/LocalStorageTask.h:
+ * storage/Storage.cpp:
+ (WebCore::Storage::~Storage):
+ * storage/Storage.h:
+ * storage/StorageArea.cpp:
+ * storage/StorageArea.h:
+ * storage/StorageAreaImpl.cpp:
+ * storage/StorageAreaImpl.h:
+ * storage/StorageAreaSync.cpp:
+ (WebCore::StorageAreaSync::~StorageAreaSync):
+ * storage/StorageAreaSync.h:
+ * storage/StorageEvent.cpp:
+ (WebCore::StorageEvent::create):
+ (WebCore::StorageEvent::StorageEvent):
+ * storage/StorageEvent.h:
+ * storage/StorageNamespace.h:
+ * storage/StorageNamespaceImpl.cpp:
+ * storage/StorageNamespaceImpl.h:
+ * storage/StorageSyncManager.cpp:
+ (WebCore::StorageSyncManager::~StorageSyncManager):
+ * storage/StorageSyncManager.h:
+
+
+2009-07-14 Adam Treat <adam.treat@torchmobile.com>
+
+ Reviewed by David Hyatt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26983
+
+ Check to make sure the view is attached to a frame() in the visibleContentsResized()
+ method as it can be triggered before the view is attached by Frame::createView(...)
+ setting various values such as setScrollBarModes(...) for example. An ASSERT is
+ triggered when a view is layout before being attached to a frame().
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::visibleContentsResized):
+ * page/FrameView.h:
+
+2009-07-14 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: show last opened panel when invoking inspector.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27263
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::InspectorController):
+ (WebCore::InspectorController::setWindowVisible):
+ (WebCore::InspectorController::storeLastActivePanel):
+ (WebCore::InspectorController::specialPanelForJSName):
+ * inspector/InspectorController.h:
+ (WebCore::InspectorController::Setting::Setting):
+ * inspector/InspectorController.idl:
+ * inspector/front-end/inspector.js:
+ (WebInspector.set currentPanel):
+ (WebInspector.loaded):
+
+2009-07-14 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Speed up access to NodeList length.
+ https://bugs.webkit.org/show_bug.cgi?id=27264
+
+ That's a minimal alternation of the code.
+
+ * bindings/v8/custom/V8NodeListCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER): 1) use AtomicString for comparison, 2) use
+ v8::Integer::New instead of v8::Number::New.
+
+2009-07-14 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Do not do unnecessary conversions from v8::Handle<v8::Value> to
+ v8::Handle<v8::Object> and accompanying changes.
+ https://bugs.webkit.org/show_bug.cgi?id=26953
+
+ Three things:
+
+ 1) do not cast from v8::Value to v8::Object if unnecessary---casts are cheap,
+ but are not free (they check for emptiness of handle);
+ 2) inline conversion from wrapper to node;
+ 3) simplify case to an ASSERT.
+
+ This is just a refactoring, so no new tests are needed.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluateInNewContext):
+ (WebCore::V8Proxy::convertToSVGPODTypeImpl):
+ * bindings/v8/V8Proxy.h:
+ (WebCore::V8Proxy::convertDOMWrapperToNative):
+ (WebCore::V8Proxy::convertToNativeObject):
+ (WebCore::V8Proxy::convertToNativeEvent):
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+ (WebCore::toCanvasStyle):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8CustomBinding.cpp:
+ (WebCore::V8Custom::GetTargetFrame):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::V8Custom::ClearTimeoutImpl):
+ (WebCore::NAMED_ACCESS_CHECK):
+ (WebCore::INDEXED_ACCESS_CHECK):
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8LocationCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-07-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Straight quotes should match fancy quotes in in-page search
+ https://bugs.webkit.org/show_bug.cgi?id=27217
+
+ Tests: fast/text/find-quotes.html
+
+ * editing/TextIterator.cpp:
+ (WebCore::foldQuoteMark): Added.
+ (WebCore::foldQuoteMarks): Added.
+ (WebCore::SearchBuffer::SearchBuffer): Call foldQuoteMarks on the target string.
+ (WebCore::SearchBuffer::append): Call foldQuoteMarks on characters as they are
+ added to the search buffer.
+
+ * platform/text/CharacterNames.h: Added more quotation mark character names.
+ Sorted character names with the sort tool.
+
+2009-07-13 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: handle debugger shortcuts while on source frame or on
+ script file selector.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27224
+
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._loaded):
+
+2009-07-13 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Use standard HashCountedSet instead of a hand rolled one
+ in HTMLDocument.
+
+ * html/HTMLDocument.cpp:
+ (WebCore::addItemToMap):
+ (WebCore::removeItemFromMap):
+ * html/HTMLDocument.h:
+
+2009-07-13 Erik Arvidsson <arv@chromium.org>
+
+ Reviewed by Darin Adler and Maciej Stachowiak.
+
+ Implement HTML5 draggable
+ https://bugs.webkit.org/show_bug.cgi?id=26262
+
+ This adds support for the HTML5 draggable attribute and its DOM binding. It maps the draggable property
+ to the CSS properties -webkit-user-drag and -webkit-user-select respectively.
+
+ Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#the-draggable-attribute
+
+ Test: fast/html/draggable.html
+
+ * css/html.css:
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::draggable):
+ * html/HTMLAnchorElement.h:
+ * html/HTMLAttributeNames.in:
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::draggable):
+ (WebCore::HTMLElement::setDraggable):
+ * html/HTMLElement.h:
+ * html/HTMLElement.idl:
+ * html/HTMLImageElement.cpp:
+ (WebCore::HTMLImageElement::draggable):
+ * html/HTMLImageElement.h:
+
+2009-07-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Image rendered as layer contents looks different from image rendered via CG.
+ <rdar://problem/7048830>
+
+ Fix a visible color profile difference between between images rendered via Core Graphics
+ and those rendered via a compositing layer, by assigning the GenericRGB profile to
+ untagged images (which come through as having the DeviceRGB profile) when they are set
+ as layer contents.
+
+ Test: compositing/color-matching/image-color-matching.html
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::setContentsToImage):
+
+2009-07-13 Darin Adler <darin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27220
+ Assertion failure in createSearcher() (usearch_open() status is U_USING_DEFAULT_WARNING)
+
+ * editing/TextIterator.cpp:
+ (WebCore::createSearcher): Add U_USING_DEFAULT_WARNING as a possible status code
+ in the assertion. Affects only the assertion.
+
+2009-07-13 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26925
+ <rdar://problem/7027850> URL Fragment Breaks Application Cache Loads
+
+ Test: http/tests/appcache/main-resource-hash.html
+
+ * loader/appcache/ApplicationCache.cpp:
+ (WebCore::ApplicationCache::resourceForURL):
+ (WebCore::ApplicationCache::resourceForRequest):
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::ApplicationCacheGroup::cacheForMainRequest):
+ (WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest):
+ (WebCore::ApplicationCacheGroup::selectCache):
+ (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
+ (WebCore::ApplicationCacheGroup::didReceiveResponse):
+ (WebCore::ApplicationCacheGroup::didFail):
+ (WebCore::ApplicationCacheGroup::addEntry):
+ Remove URL fragment at appcache code borders.
+
+ * loader/appcache/ApplicationCacheResource.h:
+ (WebCore::ApplicationCacheResource::create):
+ * loader/appcache/ApplicationCacheStorage.cpp:
+ (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
+ (WebCore::ApplicationCacheStorage::cacheGroupForURL):
+ (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
+ Assert that there is no URL fragment in URL at key points in appcache code.
+
+2009-07-13 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27166
+ rdar://problem/7015857
+ Find for strings composed entirely of spaces doesn't work
+
+ Test: fast/text/find-spaces.html
+
+ * editing/TextIterator.cpp:
+ (WebCore::findPlainText): Removed unneeded special case.
+ The empty string case already works correctly.
+
+2009-07-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Remove NPPVpluginPrivateModeBool, it was removed from the spec.
+
+ * bridge/npapi.h:
+
+2009-07-13 Feng Qian <feng@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=27237
+
+ Make V8DOMMap.h compiling with gcc option -Werror=non=virtual-dtor.
+
+ * bindings/v8/V8DOMMap.h:
+ (WebCore::WeakReferenceMap::WeakReferenceMap):
+ (WebCore::WeakReferenceMap::~WeakReferenceMap):
+
+2009-07-13 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Remove an accidental add of bidi.(cpp|h) to WebCore.gypi.
+
+ * WebCore.gypi: Removed bidi.cpp and bidi.h
+
+2009-07-13 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Update WebCore.gyp in preparation to hooking it up.
+
+ * WebCore.gypi: Added files that were mid-stream while switching over.
+
+2009-07-13 Dmitry Titov <dimich@chromium.org>
+
+ Not reviewed, another small fix for Chromium build.
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate):
+
+2009-07-13 Dmitry Titov <dimich@chromium.org>
+
+ Not reviewed, fix Chromium build bustage.
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::JavaScriptConsoleMessage::addToPage):
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::handleConsoleMessage):
+
+2009-07-13 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=27234
+ <rdar://problem/7054356>
+
+ Add null page check in HTMLDocument::hasFocus.
+
+ Test: fast/dom/HTMLDocument/hasFocus-frameless-crash.html
+
+ * html/HTMLDocument.cpp:
+ (WebCore::HTMLDocument::hasFocus): Add page null check.
+ (WebCore::HTMLDocument::createTokenizer): Cleanup page null check.
+
+2009-07-13 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Disable continuous spell checking in the inspector
+ https://bugs.webkit.org/show_bug.cgi?id=27131
+
+ * inspector/front-end/inspector.html: Added spellcheck="false" to the
+ main-panels and console-prompt containers.
+
+2009-07-13 Adam Langley <agl@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Chromium Linux: fix assertion when rendering google.com.kh
+
+ https://bugs.webkit.org/show_bug.cgi?id=26924
+
+ Some shapers (i.e. Khmer) will produce cluster logs which report that
+ /no/ code points contributed to certain glyphs. Because of this, we
+ take any code point which contributed to the glyph in question, or any
+ subsequent glyph. If we run off the end, then we take the last code
+ point.
+
+ Added LayoutTests/fast/text/international/khmar-selection.html
+
+ * platform/graphics/chromium/FontLinux.cpp:
+ (WebCore::Font::offsetForPositionForComplexText):
+
+2009-07-13 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ spellcheck="false" is ignored
+ <rdar://problem/7054177>
+
+ * editing/Editor.cpp:
+ (WebCore::markMisspellingsOrBadGrammar): Moved code to check the
+ spellcheck attribute from here...
+ (WebCore::Editor::spellCheckingEnabledInFocusedNode): ...to here.
+ (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Bail out
+ if spell chcking is disabled by the spellcheck attribute.
+ * editing/Editor.h:
+
+2009-07-13 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Add new configuration flag for redistributable Windows build.
+ https://bugs.webkit.org/show_bug.cgi=27087
+
+ * WebCore.vcproj/WebCore.vcproj: Add new WinCairo.vsprops to
+ Debug_Cairo and Release_Cairo builds.
+ * config.h: Check for presence of WIN_CAIRO and select appropriate
+ configuration. Defaults to standard Apple build.
+
+2009-07-13 Peter Kasting <pkasting@google.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=19562
+ Back out previous patch for this bug (too many problems).
+
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * html/HTMLButtonElement.idl:
+ * html/HTMLFieldSetElement.idl:
+ * html/HTMLFormControlElement.cpp:
+ * html/HTMLFormControlElement.h:
+ (WebCore::HTMLFormControlElement::form):
+ * html/HTMLInputElement.idl:
+ * html/HTMLSelectElement.idl:
+ * html/HTMLTextAreaElement.idl:
+ * html/ValidityState.cpp: Removed.
+ * html/ValidityState.h: Removed.
+ * html/ValidityState.idl: Removed.
+
+2009-07-13 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add HTMLAllCollection to WebCore.gypi.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27223
+
+ * WebCore.gypi: Add HTMLAllCollection.
+
+2009-07-13 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [V8] Add a missing check for constructor call in WebKitCSSMatrixConstructor.
+ https://bugs.webkit.org/show_bug.cgi?id=27218
+
+ Test: fast/css/matrix-as-function-crash.html
+
+ * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL): Added a check for constructor call.
+
+2009-07-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed make dist build fix.
+
+ * GNUmakefile.am:
+
+2009-07-13 Cédric Luthi <cedric.luthi@gmail.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Fix NPWindow clip rect in PluginViewMac
+
+ The rect should be in window-coordinates. This bug can be observed
+ with Flash 10 here: http://www.permadi.com/tutorial/cursorTracker/
+
+ * plugins/mac/PluginViewMac.cpp:
+
+2009-07-13 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Fix Qt implementation of WebCore::directoryName to return the absolute
+ directory name instead of the base file name.
+
+ * platform/qt/FileSystemQt.cpp:
+ (WebCore::directoryName):
+
+2009-07-13 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Fix WebCore::Path::isEmpty() for the Qt port to return true
+ if there is no element in the path.
+
+ QPainterPath::isEmpty() returns also true if there is one single
+ MoveTo element inside, which makes sense but doesn't patch Webcore's
+ is-empty definition.
+
+ * platform/graphics/qt/PathQt.cpp:
+ (WebCore::Path::isEmpty): Use elementCount() == 0.
+
+2009-07-13 Albert J. Wong <ajwong@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Upstream fixes to NPV8Object.cpp that make ~30 layout tests pass.
+ https://bugs.webkit.org/show_bug.cgi?id=27127
+
+ There were a number of bugs introduced during the last upstreaming
+ effort that broke around 30 layout tests. This fixes those bugs.
+ It also has compile fixes to match the recent cutting apart of
+ V8Proxy.
+
+ * bindings/v8/NPV8Object.cpp:
+ (freeV8NPObject):
+ (npCreateV8ScriptObject):
+ (NPN_Invoke):
+ (NPN_InvokeDefault):
+ (NPN_EvaluateHelper):
+ (NPN_SetException):
+ (NPN_Construct):
+
+2009-07-13 Mads Ager <ager@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fix memory leak in the V8 binding layer.
+ https://bugs.webkit.org/show_bug.cgi?id=27163
+
+ Reinitializing the context is not necessary when clearing the proxy for navigation
+ and it will lead us to hold on to an empty context for each frame.
+
+ Test for empty context instead of empty global object handle when
+ updating the document for a context.
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::clearForNavigation):
+ (WebCore::V8Proxy::updateDocument):
+
+2009-07-13 John Gregg <johnnyg@google.com>
+
+ Reviewed by David Levin.
+
+ Correct the logic to determine if a V8 callback returns a value.
+ https://bugs.webkit.org/show_bug.cgi?id=27155
+
+ * bindings/v8/custom/V8CustomVoidCallback.cpp:
+ (WebCore::invokeCallback):
+ - Don't crash if result.IsEmpty().
+
+2009-07-13 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
+ https://bugs.webkit.org/show_bug.cgi?id=26932
+
+ Initial IDL definition and bindings for SharedWorkers.
+
+ * Configurations/FeatureDefines.xcconfig:
+ Added new files for SharedWorker support.
+ * DerivedSources.make:
+ Added new files for SharedWorker support.
+ * GNUmakefile.am:
+ Added new files for SharedWorker support.
+ * WebCore.gypi:
+ Added new files for SharedWorker support.
+ * WebCore.pro:
+ Added new files for SharedWorker support.
+ * WebCore.xcodeproj/project.pbxproj:
+ Added new files for SharedWorker support.
+ * bindings/js/JSAbstractWorkerCustom.cpp: Added.
+ (WebCore::JSAbstractWorker::mark):
+ Custom mark handler that marks the event listeners.
+ (WebCore::JSAbstractWorker::addEventListener):
+ (WebCore::JSAbstractWorker::removeEventListener):
+ (WebCore::JSAbstractWorker::toJS):
+ Custom toJS handler which differentiates between various subclasses.
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::sharedWorker):
+ SharedWorker constructor (only enabled when SHARED_WORKERS is
+ enabled).
+ * bindings/js/JSEventTarget.cpp:
+ (WebCore::toJS):
+ (WebCore::toEventTarget):
+ Added support for converting to/from SharedWorkers.
+ * bindings/js/JSSharedWorkerConstructor.cpp: Added.
+ (WebCore::JSSharedWorkerConstructor::JSSharedWorkerConstructor):
+ (WebCore::constructSharedWorker):
+ (WebCore::JSSharedWorkerConstructor::getConstructData):
+ * bindings/js/JSSharedWorkerConstructor.h: Added.
+ (WebCore::JSSharedWorkerConstructor::classInfo):
+ * bindings/js/JSSharedWorkerCustom.cpp: Added.
+ (WebCore::JSSharedWorker::mark):
+ Custom mark function that marks the internal MessagePort.
+ * bindings/v8/DOMObjectsInclude.h:
+ Updated to include new header files.
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/custom/V8AbstractWorkerCustom.cpp: Added.
+ (WebCore::getEventListener):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ V8 handlers for add/removeEventListener().
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8SharedWorkerCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ Custom constructor for SharedWorker.
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::toSharedWorker):
+ * dom/EventTarget.h:
+ * page/DOMWindow.idl:
+ * workers/AbstractWorker.cpp: Added.
+ (WebCore::AbstractWorker::AbstractWorker):
+ Common base class for SharedWorker and (soon) Worker. The functions below were copied from Worker.cpp.
+ This is the first step in refactoring Worker to derive from AbstractWorker to enable code sharing.
+ (WebCore::AbstractWorker::~AbstractWorker):
+ (WebCore::AbstractWorker::addEventListener):
+ (WebCore::AbstractWorker::removeEventListener):
+ (WebCore::AbstractWorker::dispatchEvent):
+ (WebCore::AbstractWorker::dispatchLoadErrorEvent):
+ (WebCore::AbstractWorker::dispatchScriptErrorEvent):
+ * workers/AbstractWorker.h: Added.
+ Definitions of functionality shared by Worker.h and SharedWorker.h. In a future patch, Worker will derive from AbstractWorker.
+ (WebCore::AbstractWorker::scriptExecutionContext):
+ (WebCore::AbstractWorker::setOnerror):
+ (WebCore::AbstractWorker::onerror):
+ (WebCore::AbstractWorker::eventListeners):
+ (WebCore::AbstractWorker::refEventTarget):
+ (WebCore::AbstractWorker::derefEventTarget):
+ * workers/AbstractWorker.idl: Added.
+ * workers/SharedWorker.cpp: Added.
+ (WebCore::SharedWorker::SharedWorker):
+ (WebCore::SharedWorker::~SharedWorker):
+ * workers/SharedWorker.h: Added.
+ (WebCore::SharedWorker::create):
+ (WebCore::SharedWorker::port):
+ (WebCore::SharedWorker::toSharedWorker):
+ * workers/SharedWorker.idl: Added.
+
+2009-07-13 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Cleanup - Remove prf install target
+ https://bugs.webkit.org/show_bug.cgi?id=27191
+
+ qtwebkit.prf has been removed; this cleans up the related
+ install target as well.
+
+ * WebCore.pro: Remove prf install target
+
+2009-07-12 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ Facebook Chat is broken due to XSS auditor
+ https://bugs.webkit.org/show_bug.cgi?id=27179
+
+ Instead of just using the script's URL as to detect an XSS attack, we
+ now use a bit of context before the URL. In particular, we use the
+ bytes from the beginning of the attribute name to the end of the
+ attribute value. In virtually all injection attacks, the attacker
+ would need to supply the attribute name as well as the attribute value.
+ However, in the Facebook false positive, the attribute name is not
+ present in the URL.
+
+ Tests: http/tests/security/xssAuditor/script-tag-src-redirect-safe.html
+ http/tests/security/xssAuditor/script-tag-with-source-double-quote.html
+ http/tests/security/xssAuditor/script-tag-with-source-no-quote.html
+
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::parseTag):
+ * html/HTMLTokenizer.h:
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
+ * page/XSSAuditor.h:
+
+2009-07-12 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Refactor ConsoleMessage to add MessageType attribute.
+ https://bugs.webkit.org/show_bug.cgi?id=20625
+
+ * bindings/js/JSCustomXPathNSResolver.cpp:
+ (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::JSDOMWindowBase::printErrorMessage):
+ * dom/Document.cpp:
+ (WebCore::Document::reportException):
+ (WebCore::Document::addMessage):
+ * dom/Document.h:
+ * dom/ScriptExecutionContext.h:
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::reportErrorToConsole):
+ * inspector/ConsoleMessage.cpp:
+ (WebCore::ConsoleMessage::ConsoleMessage):
+ (WebCore::ConsoleMessage::addToConsole):
+ (WebCore::ConsoleMessage::isEqual):
+ * inspector/ConsoleMessage.h:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::addMessageToConsole):
+ (WebCore::InspectorController::startGroup):
+ (WebCore::InspectorController::endGroup):
+ (WebCore::InspectorController::addProfileFinishedMessageToConsole):
+ (WebCore::InspectorController::addStartProfilingMessageToConsole):
+ (WebCore::InspectorController::count):
+ * inspector/InspectorController.h:
+ * inspector/front-end/Console.js:
+ (WebInspector.Console.prototype.addMessage):
+ (WebInspector.ConsoleMessage): Added type property.
+ (WebInspector.ConsoleMessage.prototype.toMessageElement):
+ (WebInspector.ConsoleMessage.prototype.toString):
+ (WebInspector.ConsoleMessage.prototype.isEqual):
+ (WebInspector.ConsoleCommandResult):
+ (WebInspector.ConsoleGroup.prototype.addMessage):
+ (WebInspector.ConsoleGroup.prototype._titleClicked):
+ * inspector/front-end/Resource.js:
+ (WebInspector.Resource.prototype._addTip):
+ (WebInspector.Resource.prototype._checkWarning):
+ * inspector/front-end/inspector.css: Changed ".console-group-title-level" to ".console-group-title"
+ * inspector/front-end/inspector.js:
+ (WebInspector.addMessageToConsole):
+ * loader/DocLoader.cpp:
+ (WebCore::DocLoader::printAccessDeniedMessage):
+ * loader/EmptyClients.h:
+ (WebCore::EmptyChromeClient::addMessageToConsole):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::reportLocalLoadFailed):
+ (WebCore::FrameLoader::shouldAllowNavigation):
+ * page/ChromeClient.h:
+ * page/Console.cpp:
+ (WebCore::printMessageSourceAndLevelPrefix):
+ (WebCore::Console::addMessage):
+ (WebCore::Console::error):
+ (WebCore::Console::log):
+ (WebCore::Console::dir):
+ (WebCore::Console::trace):
+ (WebCore::Console::assertCondition):
+ (WebCore::Console::timeEnd):
+ (WebCore::Console::warn):
+ * page/Console.h: Added MessageType enum.
+ (WebCore::):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::postMessageTimerFired):
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canEvaluate):
+ (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
+ (WebCore::XSSAuditor::canLoadObject):
+ * svg/SVGDocumentExtensions.cpp:
+ (WebCore::SVGDocumentExtensions::reportWarning):
+ (WebCore::SVGDocumentExtensions::reportError):
+ * wml/WMLErrorHandling.cpp:
+ (WebCore::reportWMLError):
+ * workers/GenericWorkerTask.h: Added GenericWorkerTask8 for the extra argument.
+ (WebCore::GenericWorkerTask8::create):
+ (WebCore::GenericWorkerTask8::GenericWorkerTask8):
+ (WebCore::GenericWorkerTask8::performTask):
+ (WebCore::createCallbackTask):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::addMessage):
+ (WebCore::WorkerContext::importScripts):
+ * workers/WorkerContext.h:
+ * workers/WorkerMessagingProxy.cpp:
+ (WebCore::postConsoleMessageTask):
+ (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
+ * workers/WorkerMessagingProxy.h:
+ * workers/WorkerObjectProxy.h:
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::reportUnsafeUsage):
+ (WebCore::XMLHttpRequest::didFinishLoading):
+ * xml/XSLTProcessor.cpp:
+ (WebCore::XSLTProcessor::parseErrorFunc):
+
+2009-07-12 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Upstream UndetectableHTMLCollection.idl as HTMLAllCollection.idl.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27132
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * dom/HTMLAllCollection.idl: Added.
+
+2009-07-12 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Inspector: Duplicate Computation in Autocompletion
+ https://bugs.webkit.org/show_bug.cgi?id=26778
+
+ * inspector/front-end/TextPrompt.js:
+ (WebInspector.TextPrompt.prototype._completionsReady):
+
+2009-07-12 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27196
+ Rename bidi.cpp to RenderBlockLineLayout.cpp and remove bidi.h
+
+ * GNUmakefile.am: Updated.
+ * WebCore.gypi: Updated.
+ * WebCore.pro: Updated.
+ * WebCore.vcproj/WebCore.vcproj: Updated.
+ * WebCore.xcodeproj/project.pbxproj: Updated.
+ * WebCoreSources.bkl: Updated.
+ * rendering/RenderBlock.h: Removed unnecessary forward declaration and
+ updated comments.
+ * rendering/RenderBlockLineLayout.cpp: Copied from WebCore/rendering/bidi.cpp.
+ Removed unnecessary #include statements.
+ (WebCore::BidiRun::BidiRun): Moved here from bidi.h.
+ (WebCore::RenderBlock::layoutInlineChildren): Removed outdated comment.
+ * rendering/bidi.cpp: Removed.
+ * rendering/bidi.h: Removed.
+
+2009-07-12 Dan Bernstein <mitz@apple.com>
+
+ - Windows build fix
+
+ * platform/graphics/cg/PDFDocumentImage.cpp:
+ (WebCore::PDFDocumentImage::dataChanged):
+
+2009-07-12 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - Image cleanup
+
+ * platform/graphics/BitmapImage.cpp:
+ (WebCore::BitmapImage::destroyDecodedData): Use the data() accessor
+ instead of the m_data member.
+ (WebCore::BitmapImage::dataChanged): Ditto.
+ * platform/graphics/Image.h: Re-ordered #includes and class
+ declarations. Removed the drawPatternCallback() declaration. Made member
+ variables private.
+ * platform/graphics/cg/ImageCG.cpp:
+ (WebCore::drawPatternCallback): Changed this from a member function to a
+ static function.
+ * platform/graphics/cg/PDFDocumentImage.cpp:
+ (WebCore::PDFDocumentImage::dataChanged): Use the data() accessor
+ instead of the m_data member.
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::dataChanged): Ditto.
+
+2009-07-12 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27189
+
+ Fixes insufficient check in XSSAuditor::canSetBaseElementURL that caused
+ XSSAuditor to incorrectly block HTML Base elements whose base path coincided
+ with the URL of the page.
+
+ Test: http/tests/security/xssAuditor/base-href-safe3.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canSetBaseElementURL): Changed conditional to only call
+ XSSAuditor::findInRequest() if the host in the page URL disagrees with the host
+ in the base element URL.
+
+2009-07-12 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Text searching with ICU should take the user's default locale into account
+ https://bugs.webkit.org/show_bug.cgi?id=27184
+ rdar://problem/6812121
+
+ No simple way to test this since it's dependent on user locale.
+ After this, the user's default locale is used only on Mac.
+
+ * editing/TextIterator.cpp:
+ (WebCore::createSearcher): Pass result of the currentSearchLocaleID
+ function as the locale.
+
+ * platform/text/TextBreakIteratorInternalICU.h: Added declaration of
+ currentSearchLocaleID function.
+
+ * platform/text/android/TextBreakIteratorInternalICU.cpp:
+ (WebCore::currentSearchLocaleID): Added. Returns the empty string.
+ * platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp:
+ (WebCore::currentSearchLocaleID): Ditto.
+ * platform/text/gtk/TextBreakIteratorInternalICUGtk.cpp:
+ (WebCore::currentSearchLocaleID): Ditto.
+
+ * platform/text/mac/TextBreakIteratorInternalICUMac.mm:
+ (WebCore::textBreakLocalePreference): Added. Returns the value of
+ the AppleTextBreakLocale preference.
+ (WebCore::topLanguagePreference): Added. Returns the value of the
+ first item in the AppleLanguages preference.
+ (WebCore::canonicalLanguageIdentifier): Added. Cover for the
+ CFLocaleCreateCanonicalLanguageIdentifierFromString function.
+ (WebCore::getLocale): Added. Transfers the locale from a CFStringRef
+ into a buffer.
+ (WebCore::getSearchLocale): Added. Calls topLanguagePreference,
+ canonicalLanguageIdentifier, and getLocale.
+ (WebCore::currentSearchLocaleID): Added. Calls getSearchLocale once.
+ (WebCore::getTextBreakLocale): Changed to call
+ textBreakLocalePreference, topLanguagePreference,
+ canonicalLanguageIdentifier, and getLocale.
+
+ * platform/text/win/TextBreakIteratorInternalICUWin.cpp:
+ (WebCore::currentSearchLocaleID): Added. Returns the empty string.
+ * platform/wx/TemporaryLinkStubs.cpp:
+ (WebCore::currentSearchLocaleID): Ditto.
+
+2009-07-12 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25415
+ [GTK][ATK] Please implement support for get_text_at_offset
+
+ Create a PangoLayout that properly represents the visual
+ appearance of the text in the web page so that the line boundary
+ modes of getText{At,Before,After}Offset work correctly.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (UTF16ToUTF8):
+ (g_substr):
+ (convertUniCharToUTF8):
+ (getPangoLayoutForAtk):
+
+2009-07-11 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Bug 27187 - Match Gecko behaviour for canvas path mutation APIs on an empty path
+ <https://bugs.webkit.org/show_bug.cgi?id=27187>
+
+ Simple API change, check for the empty path and add appropriate point if necessary.
+
+ Test: fast/canvas/canvas-modify-emptyPath.html
+
+ * Info.plist:
+ * WebCore.xcodeproj/project.pbxproj:
+ * html/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::lineTo):
+ (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
+ (WebCore::CanvasRenderingContext2D::bezierCurveTo):
+
+2009-07-11 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Antti Koivisto.
+
+ HTMLMediaElement.canPlayType "maybe" and "probably" reversed
+ https://bugs.webkit.org/show_bug.cgi?id=27186
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::supportsType):
+ Return "probably" if type has codecs parameter.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::supportsType):
+ Ditto.
+
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+ (WebCore::MediaPlayerPrivate::supportsType):
+ Ditto.
+
+2009-07-11 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ A worker-thread inspired follow-up for:
+ https://bugs.webkit.org/show_bug.cgi?id=26496 and <rdar://problem/7046520>
+ REGRESSION: XHR stream connection blocks iFrame loading and resource downloading
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::loadRequestAsynchronously): Don't perform the XHR compensation when the XHR
+ is running on a worker thread. Accessing the global Cache data structures from a non-main thread is
+ not currently supported.
+
+2009-07-11 Simon Fraser <simon.fraser@apple.com>
+
+ Enable support for accelerated compositing and 3d transforms on Leopard.
+ <https://bugs.webkit.org/show_bug.cgi?id=20166>
+ <rdar://problem/6120614>
+
+ Reviewed by Oliver Hunt.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-07-11 Simon Hausmann <hausmann@webkit.org>
+
+ Fix the Qt build after r45724.
+
+ * bridge/qt/qt_instance.cpp:
+ (JSC::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp):
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
+
+2009-07-10 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26921
+
+ Implements support for HTML entities, so XSSAuditor can protect against attacks
+ encoded with HTML entities.
+
+ Tests: http/tests/security/xssAuditor/inline-event-HTML-entities.html
+ http/tests/security/xssAuditor/javascript-link-HTML-entities-control-char.html
+ http/tests/security/xssAuditor/javascript-link-HTML-entities-named.html
+ http/tests/security/xssAuditor/javascript-link-HTML-entities-null-char.html
+ http/tests/security/xssAuditor/javascript-link-HTML-entities.html
+ http/tests/security/xssAuditor/link-onclick-entities.html
+ http/tests/security/xssAuditor/script-tag-entities.html
+ http/tests/security/xssAuditor/script-tag-with-source-entities.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canEvaluate):
+ (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
+ (WebCore::XSSAuditor::decodeURL): Modified to call WebCore::XSSAuditor::decodeHTMLEntities
+ to decode HTML entities.
+ (WebCore::XSSAuditor::decodeHTMLEntities): Added method to decode HTML entities.
+ (WebCore::XSSAuditor::findInRequest):
+ * page/XSSAuditor.h:
+
+2009-07-10 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27007: Build fixes when ICONDATABASE is disabled
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27007>
+
+ Reviewed by Sam Weinig.
+
+ * WebCore.xcodeproj/project.pbxproj: Added IconDatabaseNone.cpp
+ to the project.
+ * loader/icon/IconDatabase.cpp: Added
+ #if ENABLE(ICONDATABASE)/#endif macro guard.
+ * loader/icon/IconDatabase.h: Removed three public methods from
+ #if ENABLE(ICONDATABASE)/#endif macro so that they may be
+ stubbed out in IconDatabaseNone.cpp.
+ * loader/icon/IconDatabaseNone.cpp: Added
+ #if !ENABLE(ICONDATABASE)/#endif macro guard.
+ (WebCore::IconDatabase::importIconURLForPageURL): Added.
+ (WebCore::IconDatabase::importIconDataForIconURL): Added.
+ (WebCore::IconDatabase::shouldStopThreadActivity): Added.
+
+2009-07-10 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27151
+
+ Fixes issue where JavaScript URLs that contain null- and non-null control characters can
+ bypass XSSAuditor.
+
+ Tests: http/tests/security/xssAuditor/javascript-link-control-char.html
+ http/tests/security/xssAuditor/javascript-link-null-char.html
+ http/tests/security/xssAuditor/javascript-link.html
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate): Separated out logic for JavaScript URLs from
+ inline scripts. For JavaScript URLs, calls XSSAuditor::canEvaluateJavaScriptURL.
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate): Made similar changes to evaluate() as in
+ bindings/js/ScriptController.cpp.
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canEvaluateJavaScriptURL): Separated out logic for JavaScript URLs
+ into its own method.
+ * page/XSSAuditor.h:
+
+2009-07-10 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by David Kilzer.
+
+ WebKit needs a style linting tool
+ https://bugs.webkit.org/show_bug.cgi?id=25884
+
+ Fix bunch of style issues by autofix of cpplint.
+ This patch is created to demonstrate the autofix of cpplint.py.
+
+ No new testcases because it's a style fix
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseMediaQuery):
+ (WebCore::CSSParser::validUnit):
+ (WebCore::CSSParser::parseValue):
+ (WebCore::skipCommaInDashboardRegion):
+ (WebCore::CSSParser::parseDashboardRegions):
+ (WebCore::ShadowParseContext::commitValue):
+ (WebCore::ShadowParseContext::commitLength):
+ (WebCore::ShadowParseContext::commitColor):
+ (WebCore::BorderImageParseContext::commitNumber):
+ (WebCore::BorderImageParseContext::commitWidth):
+ (WebCore::BorderImageParseContext::commitRule):
+ (WebCore::BorderImageParseContext::commitBorderImage):
+ (WebCore::CSSParser::lex):
+ (WebCore::CSSParser::text):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ * css/MediaList.cpp:
+ (WebCore::MediaList::deleteMedium):
+ * css/MediaQuery.h:
+ * css/MediaQueryEvaluator.cpp:
+ (WebCore::parseAspectRatio):
+ * css/MediaQueryEvaluator.h:
+ * css/MediaQueryExp.h:
+ (WebCore::MediaQueryExp::operator==):
+ * css/WebKitCSSMatrix.h:
+ * dom/Comment.h:
+ * dom/Document.cpp:
+ (WebCore::Document::setFocusedNode):
+ * dom/Document.h:
+ (WebCore::Document::setHasDashboardRegions):
+ * dom/DocumentFragment.cpp:
+ (WebCore::DocumentFragment::nodeName):
+ * dom/DocumentFragment.h:
+ * dom/DynamicNodeList.h:
+ * dom/EditingText.h:
+ * dom/Element.cpp:
+ (WebCore::Element::dispatchAttrAdditionEvent):
+ * dom/NamedAttrMap.cpp:
+ (WebCore::NamedNodeMap::item):
+ * dom/Node.cpp:
+ (WebCore::Node::nodeValue):
+ (WebCore::Node::nodeIndex):
+ * dom/NodeRareData.h:
+ (WebCore::NodeListsNodeData::create):
+ * dom/Notation.h:
+ * dom/ProcessingInstruction.h:
+ * dom/Range.cpp:
+ (WebCore::Range::processContents):
+ * dom/StyledElement.cpp:
+ (WebCore::toHex):
+ * dom/XMLTokenizerLibxml2.cpp:
+ (WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback):
+ (WebCore::PendingCallbacks::PendingStartElementNSCallback::call):
+ (WebCore::PendingCallbacks::):
+ (WebCore::OffsetBuffer::readOutBytes):
+ (WebCore::handleElementNamespaces):
+ (WebCore::handleElementAttributes):
+ (WebCore::attributesStartElementNsHandler):
+ * dom/XMLTokenizerQt.cpp:
+ (WebCore::attributesStartElementNsHandler):
+ (WebCore::XMLTokenizer::parseStartElement):
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::ApplyStyleCommand::applyInlineStyle):
+ * editing/DeleteSelectionCommand.cpp:
+ (WebCore::DeleteSelectionCommand::removeNode):
+ * editing/Editor.cpp:
+ (WebCore::Editor::pasteAsPlainText):
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::directionOfEnclosingBlock):
+ * editing/SmartReplaceICU.cpp:
+ (WebCore::addAllCodePoints):
+ * history/HistoryItem.cpp:
+ (WebCore::HistoryItem::icon):
+ (WebCore::HistoryItem::adoptVisitCounts):
+ * html/CanvasStyle.cpp:
+ (WebCore::CanvasStyle::applyFillColor):
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::setActive):
+ (WebCore::HTMLAnchorElement::isLiveLink):
+ * html/HTMLAppletElement.h:
+ * html/HTMLAudioElement.h:
+ * html/HTMLBRElement.h:
+ * html/HTMLBaseElement.h:
+ * html/HTMLBaseFontElement.h:
+ * html/HTMLDListElement.h:
+ * html/HTMLDirectoryElement.h:
+ * html/HTMLFieldSetElement.cpp:
+ (WebCore::HTMLFieldSetElement::HTMLFieldSetElement):
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::reset):
+ * html/HTMLHRElement.cpp:
+ (WebCore::HTMLHRElement::parseMappedAttribute):
+ * html/HTMLHeadElement.h:
+ * html/HTMLHtmlElement.h:
+ * html/HTMLImageElement.h:
+ (WebCore::HTMLImageElement::setLoadManually):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::selection):
+ * html/HTMLIsIndexElement.h:
+ * html/HTMLMarqueeElement.cpp:
+ * html/HTMLMediaElement.h:
+ (WebCore::HTMLMediaElement::):
+ * html/HTMLMenuElement.h:
+ * html/HTMLMetaElement.h:
+ * html/HTMLModElement.h:
+ * html/HTMLOListElement.h:
+ * html/HTMLOptionElement.cpp:
+ (WebCore::HTMLOptionElement::childrenChanged):
+ * html/HTMLParamElement.h:
+ * html/HTMLQuoteElement.h:
+ * html/HTMLStyleElement.h:
+ * html/HTMLTableCaptionElement.h:
+ * html/HTMLTableCellElement.h:
+ * html/HTMLTableColElement.h:
+ * html/HTMLTableSectionElement.cpp:
+ (WebCore::HTMLTableSectionElement::deleteRow):
+ * html/HTMLTitleElement.h:
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::parseNonHTMLText):
+ (WebCore::HTMLTokenizer::parseEntity):
+ (WebCore::HTMLTokenizer::parseTag):
+ (WebCore::HTMLTokenizer::write):
+ * html/HTMLUListElement.h:
+ * html/HTMLVideoElement.h:
+ * html/TimeRanges.h:
+ (WebCore::TimeRanges::Range::Range):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::enableResourceTracking):
+ (WebCore::InspectorController::disableResourceTracking):
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::newInspectorJSONObject):
+ * page/Console.cpp:
+ (WebCore::Console::addMessage):
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleMousePressEvent):
+ (WebCore::EventHandler::selectCursor):
+ (WebCore::EventHandler::defaultKeyboardEventHandler):
+ * page/Frame.cpp:
+ (WebCore::Frame::jsDefaultStatusBarText):
+ * page/android/DragControllerAndroid.cpp:
+ (WebCore::DragController::dragOperation):
+ * page/android/EventHandlerAndroid.cpp:
+ (WebCore::EventHandler::tabsToAllControls):
+ (WebCore::EventHandler::eventActivatedView):
+ * page/animation/AnimationController.cpp:
+ (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
+ * page/gtk/DragControllerGtk.cpp:
+ (WebCore::DragController::dragOperation):
+ * page/qt/DragControllerQt.cpp:
+ * page/win/DragControllerWin.cpp:
+ (WebCore::DragController::isCopyKeyDown):
+ * page/win/FrameWin.h:
+ * rendering/RenderSlider.cpp:
+ (WebCore::RenderSlider::mouseEventOffsetToThumb):
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::setVerticalAlignLength):
+ (WebCore::InheritedFlags::setUnicodeBidi):
+ (WebCore::InheritedFlags::setCursor):
+ * rendering/style/RenderStyleConstants.h:
+ (WebCore::):
+ * rendering/style/SVGRenderStyleDefs.h:
+ * rendering/style/StyleInheritedData.h:
+ (WebCore::StyleInheritedData::operator!=):
+ * storage/DatabaseTask.h:
+ * svg/GradientAttributes.h:
+ * svg/LinearGradientAttributes.h:
+ * svg/PatternAttributes.h:
+ * svg/RadialGradientAttributes.h:
+ * svg/SVGAnimatedPathData.h:
+ * svg/SVGAnimatedPoints.h:
+ * svg/SVGAnimationElement.h:
+ * svg/SVGClipPathElement.h:
+ * svg/SVGElementInstance.h:
+ * svg/SVGFEBlendElement.cpp:
+ (WebCore::SVGFEBlendElement::build):
+ * svg/SVGFEBlendElement.h:
+ * svg/SVGFEColorMatrixElement.cpp:
+ (WebCore::SVGFEColorMatrixElement::build):
+ * svg/SVGFEComponentTransferElement.cpp:
+ (WebCore::SVGFEComponentTransferElement::build):
+ * svg/SVGFECompositeElement.cpp:
+ (WebCore::SVGFECompositeElement::build):
+ * svg/SVGFEDiffuseLightingElement.cpp:
+ (WebCore::SVGFEDiffuseLightingElement::build):
+ * svg/SVGFEDisplacementMapElement.cpp:
+ (WebCore::SVGFEDisplacementMapElement::build):
+ * svg/SVGFEDistantLightElement.h:
+ * svg/SVGFEFloodElement.cpp:
+ (WebCore::SVGFEFloodElement::build):
+ * svg/SVGFEFloodElement.h:
+ * svg/SVGFEFuncAElement.h:
+ * svg/SVGFEFuncBElement.h:
+ * svg/SVGFEFuncGElement.h:
+ * svg/SVGFEFuncRElement.h:
+ * svg/SVGFEGaussianBlurElement.cpp:
+ (WebCore::SVGFEGaussianBlurElement::build):
+ * svg/SVGFEImageElement.cpp:
+ (WebCore::SVGFEImageElement::build):
+ * svg/SVGFEMergeElement.cpp:
+ (WebCore::SVGFEMergeElement::build):
+ * svg/SVGFEOffsetElement.cpp:
+ (WebCore::SVGFEOffsetElement::build):
+ * svg/SVGFEPointLightElement.h:
+ * svg/SVGFESpecularLightingElement.cpp:
+ (WebCore::SVGFESpecularLightingElement::build):
+ * svg/SVGFESpotLightElement.h:
+ * svg/SVGFETileElement.cpp:
+ (WebCore::SVGFETileElement::build):
+ * svg/SVGLineElement.cpp:
+ (WebCore::SVGLineElement::parseMappedAttribute):
+ * svg/SVGList.h:
+ * svg/SVGListTraits.h:
+ (WebCore::):
+ * svg/SVGMPathElement.h:
+ * svg/SVGMetadataElement.h:
+ * svg/SVGParserUtilities.cpp:
+ (WebCore::SVGPathParser::parseSVG):
+ (WebCore::SVGPathParser::calculateArc):
+ * svg/SVGPathElement.h:
+ * svg/SVGPathSegClosePath.h:
+ * svg/SVGSVGElement.h:
+ * svg/SVGSetElement.h:
+ * svg/SVGSwitchElement.h:
+ * svg/SVGTextPathElement.cpp:
+ (WebCore::SVGTextPathElement::parseMappedAttribute):
+ * svg/SVGTextPathElement.h:
+ * svg/SVGTitleElement.h:
+ * svg/SVGTransformable.cpp:
+ (WebCore::):
+ * svg/SVGViewSpec.cpp:
+ (WebCore::):
+ * svg/animation/SMILTime.cpp:
+ (WebCore::operator+):
+ (WebCore::operator-):
+ (WebCore::operator*):
+ * svg/animation/SVGSMILElement.h:
+ * svg/graphics/SVGResource.cpp:
+ (WebCore::clientMap):
+ * wml/WMLPostfieldElement.cpp:
+ (WebCore::WMLPostfieldElement::value):
+ * wml/WMLSetvarElement.cpp:
+ (WebCore::WMLSetvarElement::value):
+ * workers/WorkerRunLoop.cpp:
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::dropProtection):
+ * xml/XPathPath.h:
+
+2009-07-10 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7049066>.
+ Update SnowLeopard media controller layout.
+
+ * css/mediaControlsQT.css:
+ Update for new layout.
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::movieLoadType):
+ Added to replace isStreaming.
+ * html/HTMLMediaElement.h:
+ Declare movieLoadType, remove isStreaming.
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlStatusDisplayElement::update):
+ Use movieLoadType instead of isStreaming.
+ (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded):
+ MediaControlElement is the base class, not HTMLInputElement.
+ (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded):
+ Ditto.
+ (WebCore::MediaControlRewindButtonElement::rendererIsNeeded):
+ Don't display rewind button for live streams.
+ (WebCore::MediaControlReturnToRealtimeButtonElement::rendererIsNeeded):
+ MediaControlInputElement is the base class, not HTMLInputElement.
+ * rendering/MediaControlElements.h:
+
+ * rendering/RenderThemeMac.h:
+ * rendering/RenderThemeMac.mm:
+ (WebCore::getMediaUIPartStateFlags):
+ New, return wkDrawMediaUIPart flags.
+ (WebCore::RenderThemeMac::paintMediaFullscreenButton):
+ (WebCore::RenderThemeMac::paintMediaMuteButton):
+ (WebCore::RenderThemeMac::paintMediaPlayButton):
+ (WebCore::RenderThemeMac::paintMediaSeekBackButton):
+ (WebCore::RenderThemeMac::paintMediaSeekForwardButton):
+ (WebCore::RenderThemeMac::paintMediaSliderTrack):
+ (WebCore::RenderThemeMac::paintMediaSliderThumb):
+ (WebCore::RenderThemeMac::paintMediaRewindButton):
+ (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton):
+ (WebCore::RenderThemeMac::paintMediaControlsBackground):
+ (WebCore::RenderThemeMac::paintMediaCurrentTime):
+ (WebCore::RenderThemeMac::paintMediaTimeRemaining):
+ Use getMediaUIPartStateFlags.
+
+2009-07-10 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by Adele Peterson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=19562
+ Added build stuff and stub for the ValidityState class, part of HTML5
+ section Forms:
+ http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#validitystate
+
+ Test: fast/forms/ValidityState-001.html
+
+ * DerivedSources.cpp: Fix aimed to include ValidityState files
+ * DerivedSources.make: ditto
+ * GNUmakefile.am: ditto
+ * WebCore.gypi: ditto
+ * WebCore.pro: ditto
+ * WebCore.vcproj/WebCore.vcproj: ditto
+ * WebCore.xcodeproj/project.pbxproj: ditto
+ * WebCoreSources.bkl: ditto
+ * html/HTMLButtonElement.idl: "validity" attribute
+ * html/HTMLFieldSetElement.idl: ditto
+ * html/HTMLFormControlElement.cpp: object getter
+ (WebCore::HTMLFormControlElement::validity):
+ * html/HTMLFormControlElement.h: ditto
+ * html/HTMLInputElement.idl: "validity" attribute
+ * html/HTMLSelectElement.idl: ditto
+ * html/HTMLTextAreaElement.idl: ditto
+ * html/ValidityState.cpp: Added.
+ (WebCore::ValidityState::ValidityState):
+ (WebCore::ValidityState::valid): validation flag
+ * html/ValidityState.h: Added.
+ (WebCore::ValidityState::create): creation routine
+ (WebCore::ValidityState::control): ValidityState's parent getter
+ (WebCore::ValidityState::valueMissing): validation flag
+ (WebCore::ValidityState::typeMismatch): ditto
+ (WebCore::ValidityState::patternMismatch): ditto
+ (WebCore::ValidityState::tooLong): ditto
+ (WebCore::ValidityState::rangeUnderflow): ditto
+ (WebCore::ValidityState::rangeOverflow): ditto
+ (WebCore::ValidityState::stepMismatch): ditto
+ (WebCore::ValidityState::customError): ditto
+ * html/ValidityState.idl: Added.
+
+2009-07-10 Brady Eidson <beidson@apple.com>
+
+ Style cleanup over my last patch.
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::~XMLHttpRequest):
+
+2009-07-10 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ * inspector/JavaScriptCallFrame.cpp:
+ (WebCore::JavaScriptCallFrame::dynamicGlobalObject):
+ * inspector/JavaScriptCallFrame.h: New helper method, used below.
+
+ * inspector/JavaScriptDebugServer.cpp:
+ (WebCore::JavaScriptDebugServer::detach): In the special case
+ where we detach from a window currently executing JavaScript,
+ manually tear down our representation of the JavaScript
+ call stack, since we won't get any more callbacks from JavaScriptCore
+ to automatically tear it down. It's too bad that WebCore is
+ responsible for this kind of tracking -- in the future, it would
+ be nice if more of the breakpoint handling was inside of JavaScriptCore.
+
+2009-07-10 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Antti Koivisto.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26496 and <rdar://problem/7046520>
+ REGRESSION: XHR stream connection blocks iFrame loading and resource downloading
+
+ With this test we ended up going over the maximum-connections-per-host limit that CFNetwork expected.
+ When that happened, the first request that was over the limit ended up in a bizarre state where it
+ wasn't fully serviced until after the long running XHR was complete.
+
+ Loader and Loader::Host work together to try to not exceed the max-connection limit but non-cache
+ resources - such as XHR - could still end up causing this limit to be exceeded.
+
+ This fix adds a workaround specifically for XHR while we hash out a more thorough solution that will
+ handle this at the resource handle level.
+
+ * loader/loader.cpp:
+ (WebCore::Loader::nonCacheRequestInFlight):
+ (WebCore::Loader::nonCacheRequestComplete):
+ (WebCore::Loader::Host::Host):
+ (WebCore::Loader::Host::nonCacheRequestInFlight):
+ (WebCore::Loader::Host::nonCacheRequestComplete):
+ (WebCore::Loader::Host::servePendingRequests): Take nonCacheRequestsInFlight into account.
+ * loader/loader.h:
+ (WebCore::Loader::Host::processingResource): Take nonCacheRequestsInFlight into account.
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::XMLHttpRequest):
+ (WebCore::XMLHttpRequest::~XMLHttpRequest):
+ (WebCore::XMLHttpRequest::loadRequestAsynchronously): Bump the nonCacheRequestInFlight count.
+ (WebCore::XMLHttpRequest::didFail): Decrement that count if the Loader was notified.
+ (WebCore::XMLHttpRequest::didFinishLoading): Ditto.
+
+2009-07-10 Antti Koivisto <antti@apple.com>
+
+ Try to unbreak non-Mac build.
+
+ * page/ChromeClient.h:
+ (WebCore::ChromeClient::formDidFocus):
+ (WebCore::ChromeClient::formDidBlur):
+
+2009-07-10 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ The rest of the fix for <rdar://problem/7038831> REGRESSION (TOT):
+ In Mail, a crash occurs at WebCore::Widget::afterMouseDown() after
+ clicking To Do's close box
+
+ Make the Widget* in passMouseDownEventToWidget() a RefPtr.
+
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::passMouseDownEventToWidget):
+
+2009-07-10 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ rename getDOMStructure calls w/o JSGlobalObject* to deprecatedGetDOMStructure
+ https://bugs.webkit.org/show_bug.cgi?id=27157
+
+ This is the first step to fixing
+ https://bugs.webkit.org/show_bug.cgi?id=27088
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::deprecatedGetDOMStructure):
+ (WebCore::createDOMObjectWrapper):
+ (WebCore::createDOMNodeWrapper):
+ * bindings/js/JSNamedNodesCollection.cpp:
+ (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
+ * bindings/js/JSRGBColor.cpp:
+ (WebCore::JSRGBColor::JSRGBColor):
+ * bridge/objc/objc_runtime.mm:
+ (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
+ * bridge/runtime_array.cpp:
+ (JSC::RuntimeArray::RuntimeArray):
+ * bridge/runtime_method.cpp:
+ (JSC::RuntimeMethod::RuntimeMethod):
+ * bridge/runtime_object.cpp:
+ (JSC::RuntimeObjectImp::RuntimeObjectImp):
+
+2009-07-10 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Antti Koivisto.
+
+ Add delegate methods about focus and blur and state change
+ https://bugs.webkit.org/show_bug.cgi?id=27153
+
+ Call the appropriate new ChromeClient methods for focus and blur.
+
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::dispatchFocusEvent):
+ (WebCore::HTMLFormControlElement::dispatchBlurEvent):
+ * html/HTMLFormControlElement.h:
+ * loader/EmptyClients.h:
+ (WebCore::EmptyChromeClient::formDidFocus):
+ (WebCore::EmptyChromeClient::formDidBlur):
+ * page/ChromeClient.h:
+
+2009-07-10 Steve Falkenburg <sfalken@apple.com>
+
+ <rdar://problem/7048741> REGRESSION: Error about missing SwMenuX.dll opening pages with Shockwave
+
+ Use altered search path while loading plug-ins. This modifies the DLL search order
+ to look in the directory containing the plug-in even if a call to SetDllDirectory
+ was previously made. Use of SetDllDirectory removes the current directory from the search path,
+ breaking the previous strategy for locating any dependent DLLs of the plug-in.
+
+ Reviewed by Jon Honeycutt.
+
+ * plugins/win/PluginPackageWin.cpp:
+ (WebCore::PluginPackage::load): Use LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH
+
+2009-07-10 Adam Roben <aroben@apple.com>
+
+ Sort all our Xcode projects
+
+ Accomplished using sort-Xcode-project-file.
+
+ Requested by Dave Kilzer.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-07-10 Adam Langley <agl@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Chromium Linux: use disabled images for disabled widgets.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27106
+
+ Previously, checkboxes and radio controls rendered the same even if disabled.
+ The Chromium side of this change is r20224.
+
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::paintCheckbox):
+ (WebCore::RenderThemeChromiumSkia::paintRadio):
+
+2009-07-10 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Fix crash when changing the zoom level in http://iphone.akamai.com/
+ <rdar://problem/7029077>
+
+ RenderLayerBacking's paintIntoLayer() method called updateLayerListsIfNeeded(),
+ which could potentially destroy that compositing layer, causing a crash.
+ Prevent this from happening by not doing a compositing update from paintIntoLayer().
+
+ The existing updateLayerListsIfNeeded() was renamed to updateCompositingAndLayerListsIfNeeded(),
+ and still does the compositing update. The new updateLayerListsIfNeeded() does not touch
+ compositing layers, and is still called from paintIntoLayer().
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::paintLayer):
+ (WebCore::RenderLayer::hitTestLayer):
+ (WebCore::RenderLayer::updateLayerListsIfNeeded):
+ (WebCore::RenderLayer::updateCompositingAndLayerListsIfNeeded):
+ * rendering/RenderLayer.h:
+
+2009-07-10 Drew Wilson <atwilson@google.com>
+
+ Reviewed by Darin Adler.
+
+ Need to remove UsesManualToJSImplementation() in favor of CustomToJS.
+ https://bugs.webkit.org/show_bug.cgi?id=27010
+
+ Added support for CustomToJS IDL attribute to replace the hard-coded class list in UsesManualToJSImplementation().
+
+ This is just a cleanup of existing functionality, so existing LayoutTests adequately cover this patch.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ Removed UsesManualToJSImplementation(), added support for CustomToJS attribute.
+ * css/CSSRule.idl:
+ * css/CSSValue.idl:
+ * css/StyleSheet.idl:
+ * dom/Document.idl:
+ * dom/Event.idl:
+ * dom/Node.idl:
+ * html/ImageData.idl:
+ * svg/SVGElementInstance.idl:
+ * svg/SVGPathSeg.idl:
+ Added CustomToJS attribute to all the above IDL files.
+
+2009-07-10 Dan Bernstein <mitz@apple.com>
+
+ - fix the build by reverting the ill-advised r45711
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::scrollToAnchor):
+
+2009-07-09 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Updated WebCore.base.exp to add some needed functions.
+
+ * WebCore.base.exp:
+
+2009-07-10 Dan Bernstein <mitz@apple.com>
+
+ - address a review comment from Simon Fraser which I forgot to include
+ in the last check-in
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::scrollToAnchor): Pass true to getRect() for
+ maximum transform friendliness!
+
+2009-07-10 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=27137
+ <rdar://problem/7043124> REGRESSION (r44311): Reproducible crash due
+ to infinite recursion into FrameLoader::gotoAnchor() ->
+ FrameView::layout()
+
+ Test: fast/loader/goto-anchor-infinite-layout.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::gotoAnchor): Moved the code to update layout,
+ find the renderer to scroll to, and scroll from here to methods on
+ FrameView, and replaced it with a call to
+ FrameView::maintainScrollPositionAtAnchor().
+ (WebCore::FrameLoader::completed): Call maintainScrollPositionAtAnchor()
+ instead of setLockedToAnchor().
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::FrameView): Removed initialization of
+ m_lockedToAnchor.
+ (WebCore::FrameView::reset): Reset m_maintainScrollPositionAnchor instead
+ of m_lockedToAnchor.
+ (WebCore::FrameView::layout): Removed the code related to scrolling to
+ the anchor from here, because scrolling can trigger events which
+ invalidate the layout, and as such, belongs with the post-layout tasks.
+ (WebCore::FrameView::maintainScrollPositionAtAnchor): Added. When called
+ with a node scrolls the view to the top of that node and maintains it
+ scrolled to the top of the node during subsequent layouts, until
+ this function is called with 0 or other things trigger scrolling.
+ (WebCore::FrameView::scrollRectIntoViewRecursively): Reset
+ m_maintainScrollPositionAnchor.
+ (WebCore::FrameView::setScrollPosition): Ditto.
+ (WebCore::FrameView::scrollToAnchor): Added. Scrolls to the top of
+ m_maintainScrollPositionAnchor, if it is set.
+ (WebCore::FrameView::performPostLayoutTasks): Call scrollToAnchor().
+ (WebCore::FrameView::setWasScrolledByUser): Reset
+ m_maintainScrollPositionAnchor.
+
+ * page/FrameView.h: Removed lockedToAnchor(), setLockedToAnchor(),
+ and m_lockedToAnchor. Added maintainScrollPositionAtAnchor() and
+ m_maintainScrollPositionAnchor.
+
+2009-07-04 Sriram Yadavalli <sriram.yadavalli@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26439
+
+ QtWebKit fails in loading www.nytimes.com in Windows/Linux
+
+ QNetworkReplyHandler is ignoring content associated with 401 error.
+ This causes the XHR response handling to fail.
+
+ Simon: Added also ProxyAuthenticationRequiredError, to handle the same
+ case when going through proxies, as suggested by Prasanth.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::finish):
+
+2009-07-10 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ Enable HTML 5 Messaging to fix message channel Qt DRT failures in
+ fast/events.
+
+ * WebCore.pro:
+
+2009-07-09 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ added InlineBox::isLeaf()
+ firstLeafChild()/lastLeafChild() not virtual and not callable on InlineBox anymore.
+ firstLeafChild()/lastLeafChild() will no longer return a node outside of the given subtree.
+ Removed firstLeafChildAfterBox()/lastLeafChildBeforeBox()
+ Removed potentially quadratic behavior if all nodes before/after a given box are empty InlineFlowBoxes
+
+ Currently, these methods are called on RootInlineBox objects only, so above changes should not have
+ any observable effect (only the removal of the square performance behavior could apply,
+ but the conditions for that are probably of a rather theoretical nature).
+
+ * rendering/InlineBox.cpp:
+ (WebCore::InlineBox::nextLeafChild):
+ (WebCore::InlineBox::prevLeafChild):
+ * rendering/InlineBox.h:
+ (WebCore::InlineBox::isLeaf):
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::firstLeafChild):
+ (WebCore::InlineFlowBox::lastLeafChild):
+ * rendering/InlineFlowBox.h:
+ (WebCore::InlineFlowBox::firstChild):
+ (WebCore::InlineFlowBox::lastChild):
+ (WebCore::InlineFlowBox::isLeaf):
+ * rendering/RootInlineBox.cpp:
+ (WebCore::RootInlineBox::closestLeafChildForXPos):
+
+2009-07-09 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Added InlineBox::baselinePosition() and lineHeight() methods
+ (adapted remaining code accordingly to use those methods)
+
+ No change in functionality.
+
+ * rendering/InlineBox.h:
+ (WebCore::InlineBox::baselinePosition):
+ (WebCore::InlineBox::lineHeight):
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
+ (WebCore::InlineFlowBox::computeLogicalBoxHeights):
+ (WebCore::InlineFlowBox::placeBoxesVertically):
+
+2009-07-09 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Bug 27142 - canPlayType() should return empty string for unsupported content
+ <https://bugs.webkit.org/show_bug.cgi?id=27142>
+
+ Return "" instead of "no" for unsupport media types.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::canPlayType):
+
+2009-07-09 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Implement the part of HTML5 spec that deals with parsing of <rp> and <rt> tags
+ in that their end tags are optional if followed by <rp>/<rt>.
+
+ Also specify a new accessibility role "annotation" for <rp> and <rt>.
+
+ Affected code parts are not enclosed in #IF ENABLE(RUBY), since the parsing
+ is not affected by whether ruby is rendered properly or not (in fact, it may
+ be more profound without ruby layouting, since the contents of <rp> are not hidden).
+
+ Test: fast/ruby/parse-rp.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::roleValue):
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::endTagRequirement):
+ (WebCore::HTMLElement::tagPriority):
+ (WebCore::inlineTagList):
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::rpCreateErrorCheck):
+ (WebCore::HTMLParser::rtCreateErrorCheck):
+ (WebCore::HTMLParser::getNode):
+ * html/HTMLParser.h:
+ * html/HTMLTagNames.in:
+
+2009-07-09 Dmitry Titov <dimich@chromium.org>
+
+ Not reviewed, fix for previous commit.
+
+ The change http://trac.webkit.org/changeset/45695 did not correctly
+ enabled GTL and QT build flags. This caused layout tests failure.
+ This is speculative fix for those failures.
+
+ * GNUmakefile.am: added ENABLE_CHANNEL_MESSAGING flag.
+ * WebCore.pro: ditto.
+ * page/DOMWindow.idl: touched to cause recompile.
+ * workers/WorkerContext.idl: ditto.
+
+2009-07-09 Drew Wilson <atwilson@google.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26903
+
+ Turned on CHANNEL_MESSAGING by default because the MessageChannel API
+ is now implemented for Web Workers and is reasonably stable.
+
+ Tests: fast/events/message-channel-gc-2.html
+ fast/events/message-channel-gc-3.html
+ fast/events/message-channel-gc-4.html
+ fast/events/message-channel-gc.html
+ fast/events/message-channel-listener-circular-ownership.html
+ fast/events/message-port-clone.html
+ fast/events/message-port-constructor-for-deleted-document.html
+ fast/events/message-port-deleted-document.html
+ fast/events/message-port-deleted-frame.html
+ fast/events/message-port-inactive-document.html
+ fast/events/message-port-no-wrapper.html
+ fast/events/message-port.html
+ fast/workers/worker-cloneport.html
+ fast/workers/worker-messageport-gc.html
+ fast/workers/worker-messageport.html
+
+ * Configurations/FeatureDefines.xcconfig: Turned on ENABLE_CHANNEL_MESSAGING.
+ * WebCore/WebCore.vcproj/WebCoreCommon.vsprops: ditto.
+ * WebCore/WebCore.vcproj/build-generated-files.sh: ditto.
+ * WebCore/page/DOMWindow.idl: touch the file to cause re-generation of headers.
+ * WebCore/workers/WorkerContext.idl: ditto.
+
+
+2009-07-09 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Full page zoom breaks remaining and elapsed time display in the <video> controller.
+ https://bugs.webkit.org/show_bug.cgi?id=27123
+
+ We are changing the size of the time remaining and time elapsed field, to
+ automatically hide them, when the controller is too short.
+
+ Because we toggle the size between 0 and the previous value of the
+ controller, we miss any width change that may occur during full page zoom,
+ and we fail to restore a correct width.
+
+ This change fixes that problem by using a cloned style on which we
+ set the width to 0, and restoring the previous style when going back to
+ the normal width.
+
+ We take care about properly using the cloned style or the pseudo style,
+ by overriding styleForElement().
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlElement::styleForElement):
+ (WebCore::MediaControlElement::attach):
+ (WebCore::MediaControlElement::updateStyle):
+ (WebCore::MediaControlInputElement::styleForElement):
+ (WebCore::MediaControlInputElement::attach):
+ (WebCore::MediaControlInputElement::updateStyle):
+ (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement):
+ (WebCore::MediaControlTimeDisplayElement::styleForElement):
+ (WebCore::MediaControlTimeDisplayElement::setVisible):
+ * rendering/MediaControlElements.h:
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::shouldShowTimeDisplayControls): Make sure
+ we take in account the zoom level when deciding if we should hide the
+ ellapsed and remaining time.
+
+2009-07-09 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Darin Adler.
+
+ Fix chromium build bustage due to Widget being a RefCounted class.
+ https://bugs.webkit.org/show_bug.cgi?id=27139
+
+ * platform/chromium/PopupMenuChromium.cpp:
+ * platform/chromium/PopupMenuChromium.h:
+
+2009-07-09 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 27130 - Need to implement ARIA role="toolbar"
+ https://bugs.webkit.org/show_bug.cgi?id=27130
+
+ Test: platform/mac/accessibility/aria-toolbar.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::RoleEntry::):
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper roleDescription]):
+
+2009-07-09 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Upstream WebCore.gypi, the project file for Chromium build.
+ https://bugs.webkit.org/show_bug.cgi?id=27135
+
+ * WebCore.gypi: Added.
+
+2009-07-09 Jon Honeycutt <jhoneycutt@apple.com>
+
+ A more robust fix for <rdar://problem/6930280> Reproducible crash at
+ USA Today photo gallery
+
+ Reviewed by Steve Falkenburg.
+
+ * plugins/win/PluginMessageThrottlerWin.cpp:
+ (WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
+ Protect the PluginView from destruction before calling its window proc.
+
+2009-07-09 Jon Honeycutt <jhoneycutt@apple.com>
+
+ <rdar://problem/6978804> WER #16: Repro Access Violation in
+ WebCore::PluginView::bindingInstance (1310178023)
+
+ Reviewed by Darin Adler.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::bindingInstance):
+ Protect the PluginView from destruction before calling NPN_GetValue. If
+ the renderer for the PluginView was destroyed during the call, and the
+ PluginView's ref count is now 1, return null.
+
+2009-07-09 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Speculative fix for <rdar://problem/6991251> WER #13: Crash in
+ WebKit!WebCore::PluginView::performRequest+203 (1311461169)
+
+ Reviewed by Darin Adler.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::performRequest):
+ Protect the PluginView from destruction before performing a load.
+ Removed some trailing whitespace.
+
+2009-07-09 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Build fix.
+
+ * inspector/JavaScriptDebugServer.cpp:
+ (WebCore::JavaScriptDebugServer::setJavaScriptPaused):
+
+2009-07-09 Beth Dakin and Jon Honeycutt <bdakin@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Make Widget RefCounted to fix or make fixable:
+
+ <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs
+ at WebCore::Widget::afterMouseDown() after clicking To Do's close
+ box
+ <rdar://problem/6978804> WER #16: Repro Access Violation in
+ WebCore::PluginView::bindingInstance (1310178023)
+ -and-
+ <rdar://problem/6991251> WER #13: Crash in WebKit!
+ WebCore::PluginView::performRequest+203 (1311461169)
+
+ * loader/EmptyClients.h:
+ (WebCore::EmptyFrameLoaderClient::createPlugin):
+ Changed to return PassRefPtr
+ (WebCore::EmptyFrameLoaderClient::createJavaAppletWidget):
+ Ditto.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadSubframe):
+ (WebCore::FrameLoader::loadPlugin):
+ Make the widget variable a RefPtr. Use .get() when passing it to
+ RenderPart::setWidget().
+ (WebCore::FrameLoader::createJavaAppletWidget):
+ Make the widget variable a RefPtr.
+
+ * loader/FrameLoader.h:
+ Changed the return type of createJavaAppletWidget().
+
+ * loader/FrameLoaderClient.h:
+ Change the return types of createPlugin() and
+ createJavaAppletWidget().
+
+ * page/Frame.cpp:
+ (WebCore::Frame::createView):
+ No need to call .get() since setWidget() takes a RefPtr.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layoutIfNeededRecursive):
+ children() now returns a HashSet of RefPtrs.
+
+ * page/FrameView.h:
+ Remove inheritance from RefCounted; we pick this up from ScrollView
+ through Widget.
+
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::addChild):
+ addChild() now takes a PassRefPtr and m_children now keeps a
+ HashSet of RefPtrs.
+
+ * platform/ScrollView.h:
+ ScrollView constructor is now protected.
+ (WebCore::ScrollView::children):
+ m_children is now a HashSet of RefPtrs.
+
+ * platform/Scrollbar.h:
+ Remove inheritance from RefCounted; we pick this up from ScrollView
+ through Widget.
+
+ * platform/Widget.h:
+ Inherit from RefCounted. Cleaned up some whitespace. Make m_widget
+ a RefPtr.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::create):
+ Adopt the PluginView when returning it.
+
+ * plugins/PluginView.h:
+ Changed create() to return a PassRefPtr.
+
+ * rendering/RenderApplet.cpp:
+ Receive result in a RefPtr when calling createJavaAppletWidget().
+
+ * rendering/RenderPart.cpp:
+ (WebCore::RenderPart::setWidget):
+ setWidget() now takes a PassRefPtr. Also removed the manual ref of
+ FrameViews. This is handled by having m_widget be a RefPtr. Removed
+ deleteWidget().
+
+ * rendering/RenderPart.h:
+ Removed override of deleteWidget().
+
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::destroy):
+ (WebCore::RenderWidget::setWidget):
+ (WebCore::RenderWidget::paint):
+ (WebCore::RenderWidget::setOverlapTestResult):
+ (WebCore::RenderWidget::updateWidgetPosition):
+ Use .get().
+ (WebCore::RenderWidget::clearWidget):
+ Don't call deleteWidget(). It was removed.
+
+ * rendering/RenderWidget.h:
+ Removed deleteWidget(). Made m_widget a RefPtr.
+ (WebCore::RenderWidget::widget):
+ Use .get().
+
+2009-07-09 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 27129 - AX: possible assertion for a non-native image in accessibility
+ https://bugs.webkit.org/show_bug.cgi?id=27129
+
+ It's possible for an image that is not really an image to assert, because its renderer
+ is turned into a RenderImage.
+
+ Test: accessibility/non-native-image-crash.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
+ (WebCore::RoleEntry::):
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper roleDescription]):
+
+2009-07-09 Simon Fraser <simon.fraser@apple.com>
+
+ Build fix for SnowLeopard.
+
+ Avoid using the contentsTransform methods if not on Leopard, because
+ we don't need to call them.
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::updateContentsTransform):
+ * platform/graphics/mac/WebLayer.mm:
+ (-[WebLayer setNeedsDisplayInRect:]):
+ * platform/graphics/mac/WebTiledLayer.mm:
+ (-[WebTiledLayer setNeedsDisplayInRect:]):
+
+2009-07-09 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt
+
+ Improve the appearance of text in compositing layers when -[CALayer geometryFlipped]
+ is not available.
+ <rdar://problem/6120614>
+
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::GraphicsLayer::setContentsOrientation):
+ (WebCore::GraphicsLayer::contentsOrientation):
+ * platform/graphics/GraphicsLayer.cpp:
+ (WebCore::GraphicsLayer::GraphicsLayer):
+ Add a m_contentsOrientation member and getter/setter to control whether
+ the contents of this layer have a transform applied to them before display.
+
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ New method to return the default contents orientation.
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::flipTransform):
+ Convenience method to return a transform with a Y flip.
+
+ (WebCore::GraphicsLayerCA::GraphicsLayerCA):
+ (WebCore::GraphicsLayerCA::setSize):
+ After the size changes we have to update the contentsTransform.
+
+ (WebCore::GraphicsLayerCA::setGeometryOrientation):
+ (WebCore::GraphicsLayerCA::geometryOrientation):
+ If -setGeometryFlipped: is not available, use a children transform.
+
+ (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
+ Tiled layers have issues with flipped contentsTransform, so just use
+ top-down drawing for them. Call updateContentsTransform() to set the
+ new contents transform after swapping layers.
+
+ (WebCore::GraphicsLayerCA::defaultContentsOrientation):
+ Use bottom-up when -geometryFlipped is not available, otherwise top-down.
+
+ (WebCore::GraphicsLayerCA::updateContentsTransform):
+ Set the layer contents transform based on contentsOrientation().
+
+ (WebCore::GraphicsLayerCA::setContentsLayer):
+ We have to manually flip contents layers if we're not using -geometryFlipped.
+
+ * platform/graphics/mac/WebLayer.h:
+ * platform/graphics/mac/WebLayer.mm:
+ Do early return if layerContents is nil. Flip the CTM if the layer has
+ bottom-up coordinates, so that CG sees a CTM with no flip.
+ Do the CGContextRestoreGState() after drawing the debug indicator.
+
+ (-[WebLayer setNeedsDisplayInRect:]):
+ * platform/graphics/mac/WebTiledLayer.mm:
+ (-[WebTiledLayer setNeedsDisplayInRect:]):
+ Need to map the dirty rect through the contentsTransform.
+
+2009-07-09 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ <rdar://problem/6921671> Visit counter shouldn't be incremented by redirects.
+
+ Can't test this functionality with layout tests.
+
+ * WebCore.base.exp:
+ * history/HistoryItem.cpp:
+ (WebCore::HistoryItem::recordVisitAtTime):
+ (WebCore::HistoryItem::visited):
+ * history/HistoryItem.h:
+ Only increase visit count if explicitly told to. Now, some visits change last access time,
+ but do not increase visit count.
+
+2009-07-09 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7046098> MediaControllerThemeQT requires QuickTime 7.6.3
+
+ Require QuickTime 7.6.3 or higher to enable the new media controller UI.
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::mediaControllerTheme):
+
+2009-07-09 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Beth Dakin.
+
+ Remove incorrect comment.
+
+ * page/MouseEventWithHitTestResults.h:
+
+2009-07-09 Mads Ager <ager@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Update the V8 bindings codegenerator to use the RGBColor::create
+ method to handle refcounts for RGBColor objects correctly.
+
+ * bindings/scripts/CodeGeneratorV8.pm: Use RGBColor::create to create RGBColor objects.
+
+2009-07-09 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Crash in RenderMedia::styleDidChange.
+ <rdar://problem/7044313> CrashTracer: quicklook crashed generating thumbnail for page with
+ media element (RenderMedia::styleDidChange 115)
+
+ Speculative fix for crash in styleDidChange. Null check controller elements before tell
+ them to update style.
+
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::styleDidChange):
+
+2009-07-09 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Move V8DOMWrapper to its own file
+ https://bugs.webkit.org/show_bug.cgi?id=27121
+
+ * bindings/v8/V8DOMWrapper.cpp: Added.
+ (WebCore::GetToStringName):
+ (WebCore::ConstructorToString):
+ (WebCore::V8DOMWrapper::convertSVGElementInstanceToV8Object):
+ (WebCore::V8DOMWrapper::convertSVGObjectWithContextToV8Object):
+ (WebCore::V8DOMWrapper::domObjectHasJSWrapper):
+ (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
+ (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
+ (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
+ (WebCore::V8DOMWrapper::getTemplate):
+ (WebCore::V8DOMWrapper::convertToV8Object):
+ (WebCore::V8DOMWrapper::setHiddenWindowReference):
+ (WebCore::V8DOMWrapper::domWrapperType):
+ (WebCore::V8DOMWrapper::convertToNativeObjectImpl):
+ (WebCore::V8DOMWrapper::convertToSVGPODTypeImpl):
+ (WebCore::V8DOMWrapper::lookupDOMWrapper):
+ (WebCore::V8DOMWrapper::convertDOMWrapperToNodeHelper):
+ (WebCore::V8DOMWrapper::wrapNativeNodeFilter):
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ (WebCore::V8DOMWrapper::setDOMWrapper):
+ (WebCore::V8DOMWrapper::maybeDOMWrapper):
+ (WebCore::V8DOMWrapper::isDOMEventWrapper):
+ (WebCore::V8DOMWrapper::isWrapperOfType):
+ (WebCore::V8DOMWrapper::htmlElementType):
+ (WebCore::V8DOMWrapper::svgElementType):
+ (WebCore::V8DOMWrapper::convertEventToV8Object):
+ (WebCore::):
+ (WebCore::V8DOMWrapper::convertNodeToV8Object):
+ (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
+ (WebCore::V8DOMWrapper::convertEventListenerToV8Object):
+ (WebCore::V8DOMWrapper::convertDOMImplementationToV8Object):
+ (WebCore::V8DOMWrapper::convertStyleSheetToV8Object):
+ (WebCore::V8DOMWrapper::convertCSSValueToV8Object):
+ (WebCore::V8DOMWrapper::convertCSSRuleToV8Object):
+ (WebCore::V8DOMWrapper::convertWindowToV8Object):
+ * bindings/v8/V8DOMWrapper.h: Added.
+ (WebCore::V8DOMWrapper::convertDOMWrapperToNative):
+ (WebCore::V8DOMWrapper::wrapCPointer):
+ (WebCore::V8DOMWrapper::extractCPointer):
+ (WebCore::V8DOMWrapper::convertDOMWrapperToNode):
+ (WebCore::V8DOMWrapper::convertToV8Object):
+ (WebCore::V8DOMWrapper::convertToNativeObject):
+ (WebCore::V8DOMWrapper::convertToNativeEvent):
+ (WebCore::V8DOMWrapper::extractCPointerImpl):
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ * bindings/v8/V8Proxy.cpp:
+ * bindings/v8/V8Proxy.h:
+
+2009-07-09 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Crash in setFocusedFrame.
+ <rdar://7032869> Crashing in setFocusedFrame on blogger.com.
+
+ Speculative fix for crasher in setFocusedFrame. Make sure to ref both frames and fire
+ the events only after the local member has been updated.
+
+ * page/FocusController.cpp:
+ (WebCore::FocusController::setFocusedFrame):
+
+2009-07-09 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Possible crashes when mouse clicks not dispatched because range input destroyed while
+ thumb is being dragged (e.g. scrub to end of movie)
+ <rdar://problem/7037494>
+ https://bugs.webkit.org/show_bug.cgi?id=27101
+
+ Some shadow nodes "capture" all mouse events from mouseDown to mouseUp so they continue to
+ get mouse events even when the mouse is moved outside of the node. This is done by putting
+ EventHandler into a mode where it sends all mouse events to the node regardless of the
+ actual mouse position. The mode is set on mouseDown and cleared on mouseUp but if the
+ node is deleted while in this mode, the mouseUp is never sent and EventHandler continues
+ to try to send events to the deleted node. This sometimes results in a crash, and sometimes
+ in a page that doesn't respond to click events.
+
+ Tests: fast/forms/search-delete-while-cancel-button-clicked.html
+ fast/forms/slider-delete-while-dragging-thumb.html
+ media/audio-delete-while-slider-thumb-clicked.html
+ media/audio-delete-while-step-button-clicked.html
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlSeekButtonElement::detach):
+ New, call setCapturingMouseEventsNode if capturing mouse events.
+ * rendering/MediaControlElements.h:
+ Declare detach().
+
+ * rendering/RenderSlider.cpp:
+ (WebCore::SliderThumbElement::detach):
+ New, call setCapturingMouseEventsNode if capturing mouse events.
+
+ * rendering/TextControlInnerElements.cpp:
+ (WebCore::SearchFieldCancelButtonElement::detach):
+ New, call setCapturingMouseEventsNode if capturing mouse events.
+ * rendering/TextControlInnerElements.h:
+ Declare detach().
+
+2009-07-09 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Enter the Frame's context before creating new objects in setContextDebugId.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27112
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::setContextDebugId):
+
+2009-07-09 Simon Hausmann <hausmann@webkit.org>
+
+ Fix the Qt build.
+
+ * WebCore.pro: Add new storage impl files to the build.
+
+2009-07-08 Adam Barth <abarth@webkit.org>
+
+ Rubber stamped by Eric Seidel.
+
+ [V8] Move DOM wrapper functions in V8Proxy to V8DOMWrapper
+ https://bugs.webkit.org/show_bug.cgi?id=27107
+
+ This patch is just renaming. Code motion will occur next.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::processingUserGesture):
+ (WebCore::createScriptObject):
+ (WebCore::ScriptController::createScriptObjectForPluginElement):
+ * bindings/v8/ScriptObject.cpp:
+ (WebCore::ScriptGlobalObject::set):
+ * bindings/v8/ScriptObjectQuarantine.cpp:
+ (WebCore::getQuarantinedScriptObject):
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::handleEvent):
+ (WebCore::V8AbstractEventListener::getReceiverObject):
+ * bindings/v8/V8Collection.cpp:
+ (WebCore::toOptionsCollectionSetter):
+ * bindings/v8/V8Collection.h:
+ (WebCore::getV8Object):
+ (WebCore::getNamedPropertyOfCollection):
+ (WebCore::nodeCollectionNamedPropertyGetter):
+ (WebCore::getIndexedPropertyOfCollection):
+ (WebCore::nodeCollectionIndexedPropertyGetter):
+ (WebCore::nodeCollectionIndexedPropertyEnumerator):
+ (WebCore::collectionIndexedPropertyEnumerator):
+ (WebCore::collectionStringOrNullIndexedPropertyGetter):
+ * bindings/v8/V8DOMMap.cpp:
+ (WebCore::DOMData::handleWeakObject):
+ (WebCore::DOMData::removeObjectsFromWrapperMap):
+ * bindings/v8/V8GCController.cpp:
+ (WebCore::enumerateDOMObjectMap):
+ (WebCore::DOMObjectVisitor::visitDOMWrapper):
+ (WebCore::GCPrologueVisitor::visitDOMWrapper):
+ (WebCore::GCEpilogueVisitor::visitDOMWrapper):
+ * bindings/v8/V8Helpers.cpp:
+ (WebCore::wrapNPObject):
+ * bindings/v8/V8NodeFilterCondition.cpp:
+ (WebCore::V8NodeFilterCondition::acceptNode):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8DOMWrapper::convertSVGElementInstanceToV8Object):
+ (WebCore::V8DOMWrapper::convertSVGObjectWithContextToV8Object):
+ (WebCore::V8DOMWrapper::domObjectHasJSWrapper):
+ (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
+ (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
+ (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
+ (WebCore::V8Proxy::evaluateInNewContext):
+ (WebCore::V8Proxy::getConstructor):
+ (WebCore::V8DOMWrapper::getTemplate):
+ (WebCore::V8Proxy::retrieveWindow):
+ (WebCore::V8Proxy::updateDocumentWrapperCache):
+ (WebCore::V8Proxy::clearForNavigation):
+ (WebCore::V8Proxy::installDOMWindow):
+ (WebCore::setDOMExceptionHelper):
+ (WebCore::V8DOMWrapper::convertToV8Object):
+ (WebCore::V8DOMWrapper::setHiddenWindowReference):
+ (WebCore::V8DOMWrapper::domWrapperType):
+ (WebCore::V8DOMWrapper::convertToNativeObjectImpl):
+ (WebCore::V8DOMWrapper::convertToSVGPODTypeImpl):
+ (WebCore::V8DOMWrapper::lookupDOMWrapper):
+ (WebCore::V8DOMWrapper::convertDOMWrapperToNodeHelper):
+ (WebCore::V8DOMWrapper::wrapNativeNodeFilter):
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ (WebCore::V8DOMWrapper::setDOMWrapper):
+ (WebCore::V8DOMWrapper::maybeDOMWrapper):
+ (WebCore::V8DOMWrapper::isDOMEventWrapper):
+ (WebCore::V8DOMWrapper::isWrapperOfType):
+ (WebCore::V8DOMWrapper::htmlElementType):
+ (WebCore::V8DOMWrapper::svgElementType):
+ (WebCore::V8DOMWrapper::convertEventToV8Object):
+ (WebCore::V8DOMWrapper::convertNodeToV8Object):
+ (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
+ (WebCore::V8DOMWrapper::convertEventListenerToV8Object):
+ (WebCore::V8DOMWrapper::convertDOMImplementationToV8Object):
+ (WebCore::V8DOMWrapper::convertStyleSheetToV8Object):
+ (WebCore::V8DOMWrapper::convertCSSValueToV8Object):
+ (WebCore::V8DOMWrapper::convertCSSRuleToV8Object):
+ (WebCore::V8DOMWrapper::convertWindowToV8Object):
+ (WebCore::V8Proxy::bindJsObjectToWindow):
+ * bindings/v8/V8Proxy.h:
+ (WebCore::V8DOMWrapper::convertDOMWrapperToNative):
+ (WebCore::V8DOMWrapper::wrapCPointer):
+ (WebCore::V8DOMWrapper::extractCPointer):
+ (WebCore::V8DOMWrapper::convertDOMWrapperToNode):
+ (WebCore::V8DOMWrapper::convertToV8Object):
+ (WebCore::V8DOMWrapper::convertToNativeObject):
+ (WebCore::V8DOMWrapper::convertToNativeEvent):
+ (WebCore::V8DOMWrapper::extractCPointerImpl):
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ (WebCore::V8Proxy::constructDOMObject):
+ (WebCore::toV8):
+ * bindings/v8/V8SVGPODTypeWrapper.h:
+ (WebCore::V8SVGPODTypeUtil::toSVGPODType):
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::retrieve):
+ (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
+ (WebCore::WorkerContextExecutionProxy::GetConstructor):
+ (WebCore::WorkerContextExecutionProxy::ToV8Object):
+ (WebCore::WorkerContextExecutionProxy::EventToV8Object):
+ (WebCore::WorkerContextExecutionProxy::toV8):
+ * bindings/v8/custom/V8AttrCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasPixelArrayCustom.cpp:
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+ (WebCore::toV8):
+ (WebCore::toCanvasStyle):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8ClientRectListCustom.cpp:
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8ClipboardCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8CustomBinding.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::INDEXED_ACCESS_CHECK):
+ (WebCore::NAMED_ACCESS_CHECK):
+ (WebCore::V8Custom::GetTargetFrame):
+ * bindings/v8/custom/V8CustomSQLStatementCallback.cpp:
+ (WebCore::V8CustomSQLStatementCallback::handleEvent):
+ * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
+ (WebCore::V8CustomSQLStatementErrorCallback::handleEvent):
+ * bindings/v8/custom/V8CustomSQLTransactionCallback.cpp:
+ (WebCore::V8CustomSQLTransactionCallback::handleEvent):
+ * bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp:
+ (WebCore::V8CustomSQLTransactionErrorCallback::handleEvent):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8Custom::WindowSetTimeoutImpl):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::V8Custom::ClearTimeoutImpl):
+ (WebCore::NAMED_ACCESS_CHECK):
+ (WebCore::INDEXED_ACCESS_CHECK):
+ * bindings/v8/custom/V8DatabaseCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8DocumentLocationCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8ElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::ACCESSOR_GETTER):
+ * bindings/v8/custom/V8EventCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::ACCESSOR_GETTER):
+ * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
+ (WebCore::getNamedItems):
+ (WebCore::getItem):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::ACCESSOR_GETTER):
+ * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_SETTER):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::removeElement):
+ * bindings/v8/custom/V8InspectorControllerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8LocationCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_ACCESS_CHECK):
+ (WebCore::NAMED_ACCESS_CHECK):
+ * bindings/v8/custom/V8MessageChannelConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8MessagePortCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8NavigatorCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ * bindings/v8/custom/V8NodeCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8NodeIteratorCustom.cpp:
+ (WebCore::toV8):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8NodeListCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8SQLTransactionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8SVGLengthCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8SVGMatrixCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8StorageCustom.cpp:
+ (WebCore::V8Custom::v8StorageNamedPropertyEnumerator):
+ (WebCore::storageGetter):
+ (WebCore::storageSetter):
+ (WebCore::storageDeleter):
+ * bindings/v8/custom/V8StyleSheetListCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8TreeWalkerCustom.cpp:
+ (WebCore::toV8):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::SetTimeoutOrInterval):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-07-08 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Make sure we can click outside the slider thumb and start dragging.
+ https://bugs.webkit.org/show_bug.cgi?id=26229
+
+ Previously we were assuming that if the thumb hasn't been clicked, we
+ wouldn't issue any value change upon dragging.
+
+ We need to handle the two different cases:
+ - Clicked in the thumb, we need to make sure the cursor is always pointing
+ the same slider thumb point.
+ - Clicked outside, the cursor should always be pointing to the center of
+ the thumb.
+
+ For simplicity, we don't remember the original point of the mouse down,
+ but a vector between that point and the thumb.
+
+ * rendering/RenderSlider.cpp:
+ (WebCore::SliderThumbElement::SliderThumbElement):
+ (WebCore::SliderThumbElement::defaultEventHandler):
+ (WebCore::RenderSlider::mouseEventVectorToThumb): Utility function.
+ * rendering/RenderSlider.h:
+
+2009-07-08 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27100
+ <rdar://problem/7042621>
+
+ Don't display "loading" in the <video> controller when
+ there is no src specified.
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlStatusDisplayElement::update): The only
+ way to find out if we have an element is currentSrc(). networkState()
+ will always report LOADING according to the spec.
+
+2009-07-08 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [V8] Move V8GCController functions to their own file
+ https://bugs.webkit.org/show_bug.cgi?id=27102
+
+ * bindings/v8/V8GCController.cpp: Added.
+ * bindings/v8/V8GCController.h: Added.
+ * bindings/v8/V8Proxy.cpp:
+ * bindings/v8/V8Proxy.h:
+
+2009-07-08 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Split StorageArea and StorageNamespace into an interface and implementation.
+ https://bugs.webkit.org/show_bug.cgi?id=27072
+
+ I need to split StorageNamespace and StorageArea into an interface and
+ implementation. In a later patch, I'll implement a proxy interface
+ that'll run inside the Chromium renderer process.
+
+ Additionally, fix the alphabetical ordering of files I recently added
+ in the project files.
+
+ This is a continuation of other refactoring work:
+ https://bugs.webkit.org/show_bug.cgi?id=25376
+
+ * GNUmakefile.am:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * storage/StorageArea.cpp:
+ (WebCore::StorageArea::create):
+ * storage/StorageArea.h:
+ (WebCore::StorageArea::~StorageArea):
+ * storage/StorageAreaImpl.cpp: Copied from WebCore/storage/StorageArea.cpp.
+ (WebCore::StorageAreaImpl::create):
+ (WebCore::StorageAreaImpl::~StorageAreaImpl):
+ (WebCore::StorageAreaImpl::StorageAreaImpl):
+ (WebCore::StorageAreaImpl::copy):
+ (WebCore::StorageAreaImpl::length):
+ (WebCore::StorageAreaImpl::key):
+ (WebCore::StorageAreaImpl::getItem):
+ (WebCore::StorageAreaImpl::setItem):
+ (WebCore::StorageAreaImpl::removeItem):
+ (WebCore::StorageAreaImpl::clear):
+ (WebCore::StorageAreaImpl::contains):
+ (WebCore::StorageAreaImpl::importItem):
+ (WebCore::StorageAreaImpl::securityOrigin):
+ (WebCore::StorageAreaImpl::close):
+ (WebCore::StorageAreaImpl::blockUntilImportComplete):
+ (WebCore::StorageAreaImpl::dispatchStorageEvent):
+ * storage/StorageAreaImpl.h: Copied from WebCore/storage/StorageArea.h.
+ * storage/StorageAreaSync.h:
+ * storage/StorageNamespace.cpp:
+ (WebCore::StorageNamespace::localStorageNamespace):
+ (WebCore::StorageNamespace::sessionStorageNamespace):
+ * storage/StorageNamespace.h:
+ (WebCore::StorageNamespace::~StorageNamespace):
+ * storage/StorageNamespaceImpl.cpp: Copied from WebCore/storage/StorageNamespace.cpp.
+ (WebCore::StorageNamespaceImpl::localStorageNamespace):
+ (WebCore::StorageNamespaceImpl::sessionStorageNamespace):
+ (WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
+ (WebCore::StorageNamespaceImpl::~StorageNamespaceImpl):
+ (WebCore::StorageNamespaceImpl::copy):
+ (WebCore::StorageNamespaceImpl::storageArea):
+ (WebCore::StorageNamespaceImpl::close):
+ * storage/StorageNamespaceImpl.h: Copied from WebCore/storage/StorageNamespace.h.
+
+2009-07-08 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [V8] Move garbage collector related functions from V8Proxy to V8GCController
+ https://bugs.webkit.org/show_bug.cgi?id=26967
+
+ This patch just moves the functions around in V8Proxy. We'll actually
+ move them to a separate file in another patch.
+
+ * bindings/v8/NPV8Object.cpp:
+ (freeV8NPObject):
+ * bindings/v8/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::ScheduledAction):
+ (WebCore::ScheduledAction::~ScheduledAction):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::gcProtectJSWrapper):
+ (WebCore::ScriptController::gcUnprotectJSWrapper):
+ * bindings/v8/ScriptInstance.cpp:
+ (WebCore::V8ScriptInstance::clear):
+ (WebCore::V8ScriptInstance::set):
+ * bindings/v8/ScriptValue.h:
+ (WebCore::ScriptValue::ScriptValue):
+ (WebCore::ScriptValue::operator=):
+ (WebCore::ScriptValue::clear):
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::disposeListenerObject):
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::~V8LazyEventListener):
+ (WebCore::V8LazyEventListener::getListenerFunction):
+ (WebCore::V8LazyEventListener::getWrappedListenerFunction):
+ * bindings/v8/V8NodeFilterCondition.cpp:
+ (WebCore::V8NodeFilterCondition::V8NodeFilterCondition):
+ (WebCore::V8NodeFilterCondition::~V8NodeFilterCondition):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8GCController::registerGlobalHandle):
+ (WebCore::V8GCController::unregisterGlobalHandle):
+ (WebCore::V8GCController::gcProtect):
+ (WebCore::V8GCController::gcUnprotect):
+ (WebCore::V8Proxy::destroyGlobal):
+ (WebCore::V8Proxy::updateDocumentWrapper):
+ (WebCore::V8Proxy::clearDocumentWrapper):
+ (WebCore::V8Proxy::disposeContextHandles):
+ (WebCore::V8Proxy::initContextIfNeeded):
+ * bindings/v8/V8Proxy.h:
+ (WebCore::):
+ (WebCore::GlobalHandleInfo::GlobalHandleInfo):
+ * bindings/v8/custom/V8CustomEventListener.cpp:
+ (WebCore::V8EventListener::V8EventListener):
+
+2009-07-08 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26918
+
+ Prevents injection of HTML Base tag.
+
+ Tests: http/tests/security/xssAuditor/base-href-control-char.html
+ http/tests/security/xssAuditor/base-href-null-char.html
+ http/tests/security/xssAuditor/base-href-safe.html
+ http/tests/security/xssAuditor/base-href-safe2.html
+ http/tests/security/xssAuditor/base-href-scheme-relative.html
+ http/tests/security/xssAuditor/base-href.html
+
+ * html/HTMLBaseElement.cpp:
+ (WebCore::HTMLBaseElement::parseMappedAttribute):
+ (WebCore::HTMLBaseElement::process): Modified to call XSSAuditor::canSetBaseElementURL
+ to determine if it is safe to use base element URL.
+ * html/HTMLBaseElement.h: Added field m_hrefAttrValue to store unparsed base element URL.
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::canSetBaseElementURL):
+ * page/XSSAuditor.h:
+
+2009-07-08 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Upstream V8 npruntime bindings.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27094
+
+ * bindings/v8/npruntime.cpp: Upstreamed from src.chromium.org.
+ (StringKey::operator==):
+ (StringKey::StringKeyHash::hash):
+ (StringKey::StringKeyHash::equal):
+ (StringKeyHashTraits::constructDeletedValue):
+ (StringKeyHashTraits::isDeletedValue):
+ (getStringIdentifierMap):
+ (getIntIdentifierMap):
+ * bindings/v8/npruntime_impl.h: Upstreamed from src.chromium.org.
+ * bindings/v8/npruntime_internal.h: Upstreamed from src.chromium.org.
+ * bindings/v8/npruntime_priv.h: Upstreamed from src.chromium.org.
+
+2009-07-08 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Extending the PlatformFileHandle definition from PLATFORM(WIN) to
+ PLATFORM(WIN_OS)
+
+ https://bugs.webkit.org/show_bug.cgi?id=27013
+
+ * platform/FileSystem.h:
+
+2009-07-08 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27071
+
+ Resolves issue when HTTP parameters contain null- and non-null-control- characters.
+
+ Tests: http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event-null-char.html
+ http/tests/security/xssAuditor/embed-tag-control-char.html
+ http/tests/security/xssAuditor/embed-tag-null-char.html
+ http/tests/security/xssAuditor/embed-tag.html
+ http/tests/security/xssAuditor/link-onclick-control-char.html
+ http/tests/security/xssAuditor/link-onclick-null-char.html
+ http/tests/security/xssAuditor/object-embed-tag-control-char.html
+ http/tests/security/xssAuditor/object-embed-tag-null-char.html
+ http/tests/security/xssAuditor/object-embed-tag.html
+ http/tests/security/xssAuditor/object-tag.html
+ http/tests/security/xssAuditor/script-tag-post-control-char.html
+ http/tests/security/xssAuditor/script-tag-post-null-char.html
+ http/tests/security/xssAuditor/script-tag-with-source-control-char.html
+ http/tests/security/xssAuditor/script-tag-with-source-null-char.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::isNonNullControlCharacter): Called by XSSAuditor::decodeURL.
+ (WebCore::XSSAuditor::canEvaluate):
+ (WebCore::XSSAuditor::canCreateInlineEventListener):
+ (WebCore::XSSAuditor::canLoadObject):
+ (WebCore::XSSAuditor::decodeURL): Added parameters matchNullCharacters,
+ and matchNonNullControlCharacters.
+ (WebCore::XSSAuditor::findInRequest): Added parameters matchNullCharacters,
+ and matchNonNullControlCharacters.
+ * page/XSSAuditor.h:
+
+2009-07-08 Marc-Antoine Ruel <maruel@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add DerivesSourcesAllInOne.cpp to help with release windows compilation.
+ https://bugs.webkit.org/show_bug.cgi?id=27093
+
+ This is specific for v8, no change in behavior.
+
+ * bindings/v8/DerivedSourcesAllInOne.cpp: Added.
+
+2009-07-08 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27086
+
+ Make sure the Media controller doesn't fade in for no reason.
+ This is happening because a update() call to the controller
+ panel may reset the opacity to 1.0, given that it reloads the
+ style.
+
+ We also add a different fade in and fade out time to soften
+ the fade out effect.
+
+ No test case because this depends on how the movie is loaded.
+
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::RenderMedia):
+ (WebCore::RenderMedia::updateControls):
+ (WebCore::RenderMedia::updateControlVisibility): Simplify
+ , and make sure we stop the timer if there is no animation
+ to do.
+ (WebCore::RenderMedia::opacityAnimationTimerFired):
+ * rendering/RenderMedia.h:
+
+2009-07-08 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27081: Wrap RunLoopTimerCF.cpp in PLATFORM(MAC) && HAVE(RUNLOOP_TIMER)
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27081>
+
+ Reviewed by Timothy Hatcher.
+
+ * platform/cf/RunLoopTimerCF.cpp: This code is only used on
+ Mac OS X when HAVE(RUNLOOP_TIMER) is enabled, so wrap the code
+ in that macro as well.
+
+2009-07-08 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add -[WebView _isProcessingUserGesture]
+ https://bugs.webkit.org/show_bug.cgi?id=27084
+
+ Rename FrameLoader::userGestureHint() to FrameLoader::isProcessingUserGesture()
+ for clarity.
+
+ * WebCore.base.exp: Add WebCore::FrameLoader::isProcessingUserGesture()
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::processingUserGesture):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::requestFrame):
+ (WebCore::FrameLoader::isProcessingUserGesture):
+ * loader/FrameLoader.h:
+
+2009-07-08 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed (an earlier version) by Geoff Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27090
+ Remove lockBackForwardList argument from HTMLFormElement::submit()
+
+ No change in behavior, so no tests.
+
+ * bindings/js/JSHTMLFormElementCustom.cpp:
+ (WebCore::JSHTMLFormElement::submit):
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::submit):
+ * html/HTMLFormElement.h:
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::submitForm):
+ (WebCore::FrameLoader::scheduleFormSubmission):
+ * loader/FrameLoader.h:
+ Don't pass lockBackForwardList around when it's known to be false.
+
+2009-07-08 Marc-Antoine Ruel <maruel@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fix V8 idl codegen to use unique constant names
+ <https://bugs.webkit.org/show_bug.cgi?id=27089>
+
+ Embed the interface name in the global constant names so coagulating all
+ the .cc files into one compile unit works with V8 bindings.
+
+ Nothing added; Still compiles and pass tests.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+
+2009-07-08 Brent Fulgham <bfulgham@webkit.org>
+
+ Build fix: Add missing #includes for Windows (cURL) build.
+ The <winsock2.h> and <windows.h> headers were not being
+ included in Windows cURL builds.
+
+ * platform/network/ResourceHandleInternal.h:
+ * platform/network/curl/ResourceHandleManager.h:
+
+2009-07-08 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by David Kilzer.
+
+ WebKit needs a style linting tool
+ https://bugs.webkit.org/show_bug.cgi?id=25884
+
+ Fix bunch of style issues in WebCore/rendering.
+ This patch is created to demonstrate cpplint.py.
+
+ No testcase because it's just a style fixes.
+
+ * rendering/AutoTableLayout.cpp:
+ (WebCore::AutoTableLayout::recalcColumn):
+ (WebCore::AutoTableLayout::layout):
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::placeEllipsisBox):
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::paintTextMatchMarker):
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlTimelineElement::defaultEventHandler):
+ * rendering/MediaControlElements.h:
+ * rendering/RenderArena.cpp:
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::startDelayUpdateScrollInfo):
+ (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
+ (WebCore::RenderBlock::updateScrollInfoAfterLayout):
+ (WebCore::RenderBlock::positionNewFloats):
+ (WebCore::RenderBlock::newLine):
+ (WebCore::RenderBlock::floatBottom):
+ (WebCore::RenderBlock::leftBottom):
+ (WebCore::RenderBlock::rightBottom):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::calcReplacedWidthUsing):
+ * rendering/RenderFieldset.cpp:
+ (WebCore::RenderFieldset::layoutLegend):
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::FlexBoxIterator::FlexBoxIterator):
+ (WebCore::FlexBoxIterator::reset):
+ (WebCore::FlexBoxIterator::first):
+ (WebCore::FlexBoxIterator::next):
+ (WebCore::RenderFlexibleBox::layoutVerticalBox):
+ * rendering/RenderFrameSet.cpp:
+ (WebCore::borderStartEdgeColor):
+ * rendering/RenderFrameSet.h:
+ * rendering/RenderImage.cpp:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateVisibilityStatus):
+ (WebCore::RenderLayer::calculateClipRects):
+ (WebCore::RenderLayer::calculateRects):
+ * rendering/RenderListBox.cpp:
+ (WebCore::RenderListBox::panScroll):
+ * rendering/RenderMarquee.cpp:
+ (WebCore::RenderMarquee::updateMarqueeStyle):
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::updateControls):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::drawLineForBoxSide):
+ (WebCore::RenderObject::localCaretRect):
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::adjustRectsForAspectRatio):
+ * rendering/RenderSlider.h:
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::outerBorderBottom):
+ * rendering/RenderTableCol.h:
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::itemIsSeparator):
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::supportsHover):
+ * rendering/RenderThemeChromiumWin.cpp:
+ (WebCore::RenderThemeChromiumWin::supportsFocusRing):
+ * rendering/SVGCharacterLayoutInfo.cpp:
+ (WebCore::SVGCharacterLayoutInfo::addStackContent):
+ * rendering/SVGCharacterLayoutInfo.h:
+ * rendering/TextControlInnerElements.h:
+ * rendering/bidi.cpp:
+ (WebCore::RenderBlock::computeHorizontalPositionsForLine):
+
+2009-07-07 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Reduce complexity of lifetime management in DynamicNodeList caches
+ <https://bugs.webkit.org/show_bug.cgi?id=27068>
+
+ Switch the Cache object used by DynamicNodeList into a normal
+ refcounted object rather than having a weird flag controlled
+ refcounting system, where positive refcount did not automatically
+ imply the cache object would actually still be live.
+
+ * dom/DynamicNodeList.cpp:
+ (WebCore::DynamicNodeList::DynamicNodeList):
+ (WebCore::DynamicNodeList::~DynamicNodeList):
+ (WebCore::DynamicNodeList::Caches::Caches):
+ (WebCore::DynamicNodeList::Caches::create):
+ * dom/DynamicNodeList.h:
+ * dom/Node.cpp:
+ (WebCore::Node::childNodes):
+ (WebCore::Node::getElementsByTagNameNS):
+ (WebCore::Node::getElementsByName):
+ (WebCore::Node::getElementsByClassName):
+ (WebCore::NodeListsNodeData::invalidateCaches):
+ (WebCore::NodeListsNodeData::isEmpty):
+ * dom/NodeRareData.h:
+ (WebCore::NodeListsNodeData::NodeListsNodeData):
+
+2009-07-07 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ -webkit-perspective should be a Length
+ https://bugs.webkit.org/show_bug.cgi?id=27066
+
+ -webkit-perspective should not take a magic valueless number, but should
+ be a normal Length value which responds to zooming. Treat valueless numbers
+ as pixels for backward compatibility.
+
+ Test: transforms/3d/general/perspective-units.html
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+
+2009-07-07 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27047
+
+ We need to make sure that when we reattach, we also reattach
+ the children in every MediaControlElement. Else we may end up
+ having no remaining or elapsed time.
+
+ We have to handle that, because we are using a special shadow
+ tree in the DOM, and that we are ourselves handling
+ attaching/detaching the renderer.
+
+ The strategy here is to try to implement ::attach(), and try
+ to reuse as much code as we can from the super class, including
+ children attachement.
+
+ Test: media/controls-after-reload.html
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlElement::styleForElement): Code factoring.
+ (WebCore::MediaControlElement::rendererIsNeeded): Code factoring.
+ (WebCore::MediaControlElement::attach): Implement attach
+ and call super class so that children are also attached.
+ (WebCore::MediaControlElement::updateStyle): Use attach()
+ (WebCore::MediaControlInputElement::styleForElement): Code factoring.
+ (WebCore::MediaControlInputElement::rendererIsNeeded): Code factoring.
+ (WebCore::MediaControlInputElement::attach): See above.
+ (WebCore::MediaControlInputElement::updateStyle): Use attach()
+ * rendering/MediaControlElements.h:
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::updateControls): Directly run attach() on
+ the m_panel, which is a root node for our shadow tree.
+
+2009-07-07 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Repaint issue after layer drops out of composited mode.
+ <https://bugs.webkit.org/show_bug.cgi?id=27022>
+
+ RenderLayers cache repaint rects in the form of m_repaintRect and m_outlineBox,
+ and expect these to stay valid from one style change to the next. These rects
+ are relative to the repaint container, so if a layer stops being composited,
+ we need to recompute them.
+
+ Test: compositing/repaint/layer-repaint-rects.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::computeRepaintRects):
+ * rendering/RenderLayer.h:
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::updateBacking):
+
+2009-07-07 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt and Darin Adler.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=26963
+ <rdar://problem/7030998> Reproducible crash at
+ FontCache::getFontData() when a custom font is used in a pseudo-style
+
+ Test: fast/css/pseudo-cache-stale.html
+
+ * dom/Element.cpp:
+ (WebCore::Element::pseudoStyleCacheIsInvalid): Added. Given the old
+ style and the new style, goes over cached pseudo-styles in the old
+ style and re-resolves the same style types off the new style. If any of
+ the new pseudo-styles is different from the currently cached
+ corresponding style, returns true. Otherwise, returns false.
+ (WebCore::Element::recalcStyle): Validate the pseudo-style cache before
+ deciding to keep the existing style.
+ * dom/Element.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::uncachedFirstLineStyle): Added this version that
+ returns an uncached first-line style based off the given style.
+ (WebCore::RenderObject::getUncachedPseudoStyle): Added the 'ownStyle'
+ parameter.
+ * rendering/RenderObject.h:
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::getPseudoStyleCache): Added. Returns the cached
+ pseudo-styles in the passed-in vector.
+ * rendering/style/RenderStyle.h:
+
+2009-07-07 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=27042
+ <rdar://problem/7010981> Incomplete painting of newly created floats
+
+ Tests: fast/repaint/float-in-new-block-with-layout-delta.html
+ fast/repaint/float-new-in-block.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::layoutBlockChildren): If the child has never been
+ laid out before, paint its overhanging floats in addition to itself.
+ * rendering/RenderBlock.h:
+ (WebCore::RenderBlock::FloatWithRect::FloatWithRect): Added and
+ initialized a boolean everHadLayout member.
+ * rendering/bidi.cpp:
+ (WebCore::RenderBlock::layoutInlineChildren): Paint floats that have
+ never been laid out before and did not move from (0, 0).
+
+2009-07-07 Brady Eidson <beidson@apple.com>
+
+ Contributions from both Darin Adler and Brady Eidson.
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7024039> REGRESSION (r42158): Back-forward navigation does not work correctly on nytimes.com
+
+ In r42158 we lost some exclusions to making back/forward items for subframe navigations when a main frame
+ navigation was still in progress.
+
+ This patch makes things even better than it used to be by:
+ - Locking back/forward history at the time the navigation is scheduled, not after the load has committed.
+ - Locking back/forward history if *any* ancestor frame is still loading instead of just the main frame.
+
+ Test: fast/loader/subframe-navigate-during-main-frame-load.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::submitForm): Move out the history locking logic into a standalone function so it can be
+ used from multiple sites.
+ (WebCore::mustLockBackForwardList): Returns true if any ancestor frame is still loading.
+ (WebCore::FrameLoader::scheduleLocationChange): Respect mustLockBackForwardList() in addition to the passed in
+ lockBackForwardList flag.
+ (WebCore::FrameLoader::scheduleFormSubmission): Ditto.
+
+2009-07-07 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Upstream DOMObjectsInclude.h from src.chromium.org.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27035
+
+ * bindings/v8/DOMObjectsInclude.h: Added.
+
+2009-07-07 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by David Levin.
+
+ Relanding r45559, which was rolled back at r45574.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26857
+
+ * bindings/scripts/CodeGeneratorV8.pm: Updated a function name in auto-generated bindings.
+ * bindings/v8/V8Binding.cpp: Moved from src.chromium.org.
+ * bindings/v8/V8Binding.h: Contents moved from src.chromium.org.
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::getListenerFunction):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::handleConsoleMessage):
+ (WebCore::V8Proxy::compileScript):
+ (WebCore::V8Proxy::sourceName):
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::handleConsoleMessage):
+ * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
+ (WebCore::NAMED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
+ (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
+ (WebCore::removeElement):
+ * bindings/v8/custom/V8SQLTransactionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::SetTimeoutOrInterval):
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-07-07 Gregory Hughes <gfhughesVO+webkit@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ AX: Some webpages do not send AXLoadComplete
+ https://bugs.webkit.org/show_bug.cgi?id=26995
+
+ When sending the AXLayoutComplete notification it is possible
+ that the AXObjectCache was cleared, resulting in no valid
+ object to send the notification to. This fix ensures that an
+ AX object is created and cached if one does not already exist.
+
+ Not able to add a test because notifications get sent after the layout test is completed.
+
+ * dom/Document.cpp:
+ (WebCore::Document::implicitClose):
+
+2009-07-06 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27015
+
+ Make sure that the CSS properties letter-spacing, word-spacing,
+ line-height, text-transform, text-indent, text-shadow,
+ text-decoration and color do not affect the media element controls,
+ that display text.
+
+ Controls that display text are only present in when the theme
+ MediaControllerThemeQT is being used.
+
+ Test: media/controls-styling.html
+
+ * css/mediaControlsQT.css:
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlElement::updateStyle): Special case for
+ text-decoration. text-decoration can't be overriden from CSS, because
+ text-decoration is additive for historical reasons.
+
+2009-07-07 Albert Wong <ajwong@chromium.org>
+
+ Not reviewed, Chromium build fix.
+
+ Add in missing header fix syntax issue that crept into last patch.
+ https://bugs.webkit.org/show_bug.cgi?id=27027
+
+ * rendering/RenderThemeChromiumMac.mm:
+ (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton):
+
+2009-07-07 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Make use of geometry information to decide which layers become composited.
+
+ <rdar://problem/7011947>
+ <https://bugs.webkit.org/show_bug.cgi?id=27021>
+
+ In addition to looking at painting order, also, optionally, take layer
+ overlap into account when deciding which RenderLayers need to be composited.
+
+ No testcase because DRT doesn't dump which layers are composited.
+
+ * page/FrameView.h:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::updateCompositingLayers):
+ Removed the unused CompositingUpdate parameter, and just do an early return
+ when there is no view.
+
+ * rendering/RenderLayer.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::rendererContentChanged):
+ (WebCore::RenderLayer::dirtyZOrderLists):
+ (WebCore::RenderLayer::dirtyNormalFlowList):
+ (WebCore::RenderLayer::styleChanged):
+ (WebCore::RenderLayer::mustOverlapCompositedLayers):
+ (WebCore::RenderLayer::setMustOverlapCompositedLayers):
+ Change "overlay" to "overlap" for consistency with the use of "overlap"
+ elsewhere.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateAfterLayout):
+ compositingLayersNeedUpdate() renamed to compositingLayersNeedRebuild().
+
+ (WebCore::RenderLayerBacking::startAnimation):
+ (WebCore::RenderLayerBacking::startTransition):
+ Tell the compositor that we started an accelerated animation or transition.
+
+ * rendering/RenderLayerCompositor.h:
+ (WebCore::RenderLayerCompositor::compositingLayersNeedRebuild):
+ Renamed, since it's explicitly about changes in hierarchy now.
+
+ (WebCore::RenderLayerCompositor::setCompositingConsultsOverlap):
+ (WebCore::RenderLayerCompositor::compositingConsultsOverlap):
+ New getter and setter for whether compositing should take overlap into account.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::RenderLayerCompositor):
+ Add m_compositingConsultsOverlap, re-order some member variables.
+
+ (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingEnabledFlag):
+ Whitespace cleanup and method rename.
+
+ (WebCore::RenderLayerCompositor::setCompositingLayersNeedRebuild):
+ Method and variable renaming.
+
+ (WebCore::RenderLayerCompositor::updateCompositingLayers):
+ Now we have to run through the layer hierarchy every time if looking
+ at overlap, because changes in layout can now alter compositing behavior.
+ We minimize work by tracking whether we actually need to change the layer
+ hierarchy via needLayerRebuild.
+
+ (WebCore::RenderLayerCompositor::updateBacking):
+ 3D transforms turn off overlap mode.
+
+ (WebCore::RenderLayerCompositor::layerWasAdded):
+ (WebCore::RenderLayerCompositor::layerWillBeRemoved):
+ Method rename.
+
+ (WebCore::RenderLayerCompositor::addToOverlapMap):
+ (WebCore::RenderLayerCompositor::overlapsCompositedLayers):
+ Utility methods to add a layer to the overlapMap (computing the absolute
+ bounding box only if we haven't already done so), and testing the map
+ entries.
+
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+ If a layer would composite only because it comes after other compositing
+ layers in the painting order, then consult the overlap map to determine whether
+ it overlaps, and thus actually needs to composite.
+
+ Add layers to the map when they must be composited.
+
+ (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
+ Only do re-parenting work if the updateHierarchy flag is set.
+
+ (WebCore::RenderLayerCompositor::didStartAcceleratedAnimation):
+ When we start an accelerated transition or animation, we stop looking at
+ overlap because we can no longer guarantee correct front-to-back ordering while the
+ accelerated animation is running.
+
+ (WebCore::RenderLayerCompositor::needsToBeComposited):
+ Method renames.
+
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::setMaximalOutlineSize):
+ Add comment indicating that this could be optimized.
+
+2009-07-14 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Speed up creation of V8 wrappers for DOM nodes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26882
+
+ This patch doesn't require new tests as it a set of refactorings
+ to speed up wrapper creation.
+
+ * bindings/v8/V8Proxy.cpp:
+ * bindings/v8/V8Proxy.h:
+
+2009-07-07 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] textarea height property works only if other property are defined
+ https://bugs.webkit.org/show_bug.cgi?id=18984
+
+ Let WebCore handle textarea's metrics instead of readjusting it RenderthemeGtk.
+
+ Test: fast/forms/textarea-metrics.html
+
+ * platform/gtk/RenderThemeGtk.cpp:
+ * platform/gtk/RenderThemeGtk.h:
+
+2009-07-07 Ben Murdoch <benm@google.com>
+
+ Reviewed by Antti Koivisto.
+
+ HTML5 Database becomes locked if a transaction is in progress when the page is refreshed.
+ https://bugs.webkit.org/show_bug.cgi?id=25711
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=25711 where web
+ storage databases could become locked until the browser is shut
+ down if the page is refreshed whilst a transaction is in progress.
+
+ Test: storage/database-lock-after-reload.html
+
+ * storage/Database.cpp:
+ (WebCore::Database::Database):
+ (WebCore::Database::close): add code to inform the database thread we've closed the database.
+ (WebCore::Database::performOpenAndVerify): add code to inform the database thread we've opened a database.
+ * storage/Database.h:
+ (WebCore::Database::opened): return true iff the underlying sqlite database has been opened but not closed.
+ * storage/DatabaseThread.cpp:
+ (WebCore::DatabaseThread::databaseThread): Before the database thread terminates, close any databases that ran transactions in this thread.
+ (WebCore::DatabaseThread::recordDatabaseOpen): Records a database that executed a transaction in this thread.
+ (WebCore::DatabaseThread::recordDatabaseClosed): Removes a database from the set of open databases.
+ * storage/DatabaseThread.h:
+ (WebCore::DatabaseThread::getThreadID): return the thread id for the database thread.
+
+2009-07-07 Jiahua Huang <jhuangjiahua@gmail.com>
+
+ Reviewed by Jan Alonzo.
+
+ [Gtk] Paste of rich text from firefox results garbled markup
+ https://bugs.webkit.org/show_bug.cgi?id=26791
+
+ Fix problem with UTF-16 clipboard pasted.
+
+ * manual-tests/gtk/paste-richtext-from-firefox.html: Added.
+ * platform/gtk/PasteboardGtk.cpp:
+ (WebCore::Pasteboard::documentFragment):
+
+2009-07-07 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Change 'Continue debug' shortcut from F5 to F8 for consistency with Firebug.
+
+ https://bugs.webkit.org/show_bug.cgi?id=23849
+
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+
+2009-07-06 Albert J. Wong <ajwong@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Update RenderThemeChromiumMac for wkDrawMediaUIPart and wkDrawMediaSlider API
+ change.
+
+ Fix compile RenderThemeChromiumMac.mm due to API changes from r45572
+ https://bugs.webkit.org/show_bug.cgi?id=27018
+
+ This is mainly an API change update to fix the chromium compile. It
+ also has a small fix of a typo in RenderThemeMac.mm.
+
+ Compilation against the head of chromium trunk passed. Since this is
+ a compile fix, that should be sufficient.
+
+ * rendering/RenderThemeChromiumMac.mm:
+ (WebCore::):
+ (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaMuteButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaPlayButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaSeekBackButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaSeekForwardButton):
+ (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
+ (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb):
+ * rendering/RenderThemeMac.mm:
+ (WebCore::):
+
+2009-07-06 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27002: Build fix when DASHBOARD_SUPPORT is disabled with -Wunused-parameter
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27002>
+
+ Reviewed by Geoff Garen.
+
+ * html/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::prepareGradientForDashboard):
+ Mark gradient as an unused parameter when DASHBOARD_SUPPORT is
+ disabled.
+
+2009-07-06 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27001: Fix improper use of PassRefPtr<Node> to RefPtr<Node>
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27001>
+
+ Reviewed by Geoff Garen.
+
+ PassRefPtr<> should only be used for arguments to functions that
+ take ownership of the object, or as return values from functions
+ that relinquish ownership of the object.
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::increaseSelectionListLevelOrdered): Changed
+ stack-allocated PassRefPtr<Node> to RefPtr<Node> and call
+ release() on returned object.
+ (WebCore::Editor::increaseSelectionListLevelUnordered): Ditto.
+
+2009-07-06 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7035474> Make new media controller UI default on SnowLeopard
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::mediaControllerTheme):
+ New media controller UI is enabled by default on SnowLeopard.
+
+2009-07-06 Nate Chapin <japhet@chromium.org>
+
+ Unreviewed, build fix.
+
+ Roll out r45559 to fix Chromium canary.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26857
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8Binding.cpp: Removed.
+ * bindings/v8/V8Binding.h:
+ (WebCore::toInt32):
+ (WebCore::toWebCoreString):
+ (WebCore::fromWebCoreString):
+ (WebCore::toWebCoreStringWithNullCheck):
+ (WebCore::isUndefinedOrNull):
+ (WebCore::v8Boolean):
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::getListenerFunction):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::handleConsoleMessage):
+ (WebCore::V8Proxy::compileScript):
+ (WebCore::V8Proxy::sourceName):
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::handleConsoleMessage):
+ * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
+ (WebCore::NAMED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
+ (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
+ (WebCore::removeElement):
+ * bindings/v8/custom/V8SQLTransactionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::SetTimeoutOrInterval):
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-07-06 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7008093> Media controller can’t be used to scrub when movie is
+ narrow — track is too narrow
+
+ Do not show media controller time display elements when the a movie is too narrow.
+
+ * platform/mac/WebCoreSystemInterface.h:
+ * platform/mac/WebCoreSystemInterface.mm:
+ The 'state' parameter to wkDrawMediaUIPart is now an unsigned bitfield.
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement):
+ Give current time and time remaining controls a common base class.
+ (WebCore::MediaControlTimeDisplayElement::setVisible):
+ New method, hide and show the element.
+ * rendering/MediaControlElements.h:
+
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::RenderMedia):
+ Initialize m_previousVisible.
+ (WebCore::RenderMedia::layout):
+ Show/hide the time display elements as the movie width changes.
+ (WebCore::RenderMedia::createCurrentTimeDisplay):
+ (WebCore::RenderMedia::createTimeRemainingDisplay):
+ Base class is now MediaControlTimeDisplayElement, not MediaControlElement.
+ (WebCore::RenderMedia::shouldShowTimeDisplayControls):
+ New, decide if time display elements should be visible or not.
+ * rendering/RenderMedia.h:
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::):
+ (WebCore::RenderThemeMac::paintMediaFullscreenButton):
+ (WebCore::RenderThemeMac::paintMediaMuteButton):
+ (WebCore::RenderThemeMac::paintMediaPlayButton):
+ (WebCore::RenderThemeMac::paintMediaSeekBackButton):
+ (WebCore::RenderThemeMac::paintMediaSeekForwardButton):
+ (WebCore::RenderThemeMac::paintMediaSliderTrack):
+ (WebCore::RenderThemeMac::paintMediaSliderThumb):
+ (WebCore::RenderThemeMac::paintMediaRewindButton):
+ (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton):
+ (WebCore::RenderThemeMac::paintMediaControlsBackground):
+ (WebCore::RenderThemeMac::paintMediaCurrentTime):
+ (WebCore::RenderThemeMac::paintMediaTimeRemaining):
+ The 'state' parameter to wkDrawMediaUIPart is now an unsigned bitfield.
+
+2009-07-06 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27000: Minor clean up to runtime_root.{cpp|h}
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27000>
+
+ Reviewed by Geoff Garen.
+
+ * bridge/runtime_root.cpp: Added blank line between license and
+ the first #include statement.
+ * bridge/runtime_root.h: Added comment to #endif.
+
+2009-07-06 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ generalize the special height treatment for SVG (to be re-used for ruby):
+ renamed InlineBox::m_isSVG to m_hasVirtualHeight
+ renamed InlineBox::isSVG() to hasVirtualHeight()
+ renamed InlineBox::setIsSVG() to setHasVirtualHeight()
+
+ * rendering/InlineBox.cpp:
+ (WebCore::InlineBox::height):
+ * rendering/InlineBox.h:
+ (WebCore::InlineBox::InlineBox):
+ (WebCore::InlineBox::isText):
+ (WebCore::InlineBox::setIsText):
+ (WebCore::InlineBox::isSVGRootInlineBox):
+ (WebCore::InlineBox::hasVirtualHeight):
+ (WebCore::InlineBox::setHasVirtualHeight):
+ (WebCore::InlineBox::virtualHeight):
+ * rendering/RenderSVGInline.cpp:
+ (WebCore::RenderSVGInline::createFlowBox):
+ * rendering/RenderSVGInlineText.cpp:
+ (WebCore::RenderSVGInlineText::createTextBox):
+ * rendering/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::createRootBox):
+ * rendering/SVGInlineFlowBox.h:
+ (WebCore::SVGInlineFlowBox::virtualHeight):
+ * rendering/SVGInlineTextBox.h:
+ (WebCore::SVGInlineTextBox::virtualHeight):
+ * rendering/SVGRootInlineBox.h:
+ (WebCore::SVGRootInlineBox::virtualHeight):
+
+2009-07-06 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(r45285): focus rings are black on windows safari
+ https://bugs.webkit.org/show_bug.cgi?id=26821
+ <rdar://problem/7018252>
+
+ Add a mechanism for setting a custom focus ring color, and relocate the
+ determination of focus ring color to base class RenderTheme.
+
+ No new tests. Already-existing tests run in pixel mode would have caught this regression
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Move the responsibility
+ of determining focus color to base class RenderTheme.
+ * rendering/RenderTheme.cpp:
+ (WebCore::customFocusRingColor): Added static local.
+ (WebCore::RenderTheme::setCustomFocusRingColor): Added
+ (WebCore::RenderTheme::focusRingColor): Use custom color over platform color.
+ * rendering/RenderTheme.h:
+ (WebCore::RenderTheme::platformFocusRingColor): default implementation, black color
+ * rendering/RenderThemeSafari.cpp:
+ (WebCore::RenderTheme::themeForPage): Circumstances that lead to returning the RenderThemeWin
+ are the same under which we want to use the focus ring color from SafariTheme.
+ (WebCore::RenderThemeSafari::platformFocusRingColor): Renamed from focusRingColor
+ * rendering/RenderThemeSafari.h:
+
+ Renaming focusRingColor to platformFocusRingColor in these files:
+ * rendering/RenderThemeChromiumMac.h:
+ * rendering/RenderThemeChromiumMac.mm:
+ (WebCore::RenderThemeChromiumMac::platformFocusRingColor):
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::platformFocusRingColor):
+ * rendering/RenderThemeChromiumSkia.h:
+ * rendering/RenderThemeMac.h:
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::platformFocusRingColor):
+
+ Cleanup leftover from removal of WebCore::Color in r45285 in these files:
+ * WebCore.order:
+ * platform/graphics/Color.h:
+
+2009-07-06 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by David Hyatt.
+
+ Bug 15135: REGRESSION (r19843-r19850): Changing a flexbox's
+ contents makes its container scroll to the top
+ https://bugs.webkit.org/show_bug.cgi?id=15135
+
+ Delay updateing scroll bar of descendants of flexbox until their
+ positions are determined. In this way we can prevent descendants
+ of flexible boxes from changing positions of their scrollbars
+ using tentative positions.
+
+ Test: fast/flexbox/repaint-scrollbar.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::startDelayUpdateScrollInfo):
+ (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
+ (WebCore::RenderBlock::updateScrollInfoAfterLayout):
+ (WebCore::RenderBlock::layoutBlock):
+ (WebCore::RenderBlock::layoutOnlyPositionedObjects):
+ * rendering/RenderBlock.h:
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::layoutHorizontalBox):
+ (WebCore::RenderFlexibleBox::layoutVerticalBox):
+
+2009-07-06 Hironori Bono <hbono@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Make unconfirmed IME text affect textarea's value.
+ This matches input and contentEditable elements as well
+ IE and Firefox.
+
+ This fixes https://bugs.webkit.org/show_bug.cgi?id=25061.
+
+ Input elements would go down this code path because it
+ would always get a null compositionNode from frame->editor().
+ Special casing compositionNodes is wrong because we explicitly
+ want unconfirmed IME input in the textarea's value (assuming we
+ want to match IE and Firefox here).
+
+ This change is originally created by Ojan Vafai <ojan@chromium.org> and
+ I just changed its manual tests with an automated test on his behalf.
+
+ Test: platform/mac/editing/input/text-control-ime-input.html
+
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::text):
+ (WebCore::RenderTextControl::textWithHardLineBreaks):
+
+2009-07-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Add the ability for wheel events to latch to a node.
+
+ * WebCore.base.exp:
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::EventHandler):
+ (WebCore::EventHandler::clear):
+ (WebCore::EventHandler::handleWheelEvent):
+ * page/EventHandler.h:
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::wheelEvent):
+ * platform/mac/WebCoreSystemInterface.h:
+ * platform/mac/WebCoreSystemInterface.mm:
+
+2009-07-06 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix a bunch of layout test crahses in Chromium caused by a bad usage of DEFINE_STATIC_LOCAL.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26997
+
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::v8ValueToWebCoreString): Use a regular static declaration instead of DEFINE_STATIC_LOCAL.
+
+2009-07-06 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: suggest global properties based on async evaluation.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26976
+
+ Before this change, empty string was evaluated to the global object
+ (or scope chain object) synchronously. This is now fixed and global
+ object is evaluated using the same control flow.
+
+ * inspector/front-end/Console.js:
+ (WebInspector.Console.prototype.completions):
+ (WebInspector.Console.prototype._evalInInspectedWindow):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype._variablesInScope):
+
+2009-07-06 Ojan Vafai <ojan@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix crash when indenting in an empty table cell.
+ https://bugs.webkit.org/show_bug.cgi?id=26872
+
+ The crash is that we would call splitTreeToNode where the node
+ and the nodeToSplitTo were the same node.
+
+ Test: editing/execCommand/indent-empty-table-cell.html
+
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::CompositeEditCommand::splitTreeToNode):
+ Added an assert in that node and nodeToSplitTo
+ are different nodes to make this assumption explicit.
+
+ * editing/IndentOutdentCommand.cpp:
+ (WebCore::IndentOutdentCommand::isAtUnsplittableElement):
+ (WebCore::IndentOutdentCommand::indentRegion):
+ * editing/IndentOutdentCommand.h:
+
+2009-07-06 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by David Levin.
+
+ Upstream V8Binding and update some function names.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26857
+
+ * bindings/scripts/CodeGeneratorV8.pm: Update function names in auto-generated files.
+ * bindings/v8/V8Binding.cpp: Upstreamed from src.chromium.org.
+ * bindings/v8/V8Binding.h: Upstreamed from src.chromium.org.
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::getListenerFunction):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::handleConsoleMessage):
+ (WebCore::V8Proxy::compileScript):
+ (WebCore::V8Proxy::sourceName):
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::handleConsoleMessage):
+ * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
+ (WebCore::NAMED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
+ (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
+ (WebCore::removeElement):
+ * bindings/v8/custom/V8SQLTransactionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::SetTimeoutOrInterval):
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-07-06 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Jan Alonzo.
+
+ Use soup's content sniffing
+ https://bugs.webkit.org/show_bug.cgi?id=26982
+
+ Drop our hackish content sniffing code, and use the new libsoup
+ feature to do that job for us.
+
+ Testing this is in a cross-platform way is not obvious or possible
+ while we are using platform-specific code for sniffing.
+
+ * platform/network/ResourceHandleInternal.h:
+ (WebCore::ResourceHandleInternal::ResourceHandleInternal):
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::gotHeadersCallback):
+ (WebCore::contentSniffedCallback):
+ (WebCore::gotChunkCallback):
+ (WebCore::ResourceHandle::startHttp):
+
+2009-07-05 Antonio Gomes <antonio.gomes@openbossa.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (r40499): fast/dom/cssTarget-crash.html fails
+ https://bugs.webkit.org/show_bug.cgi?id=20342
+
+ Re-added code removed by commit r40499.
+ Without this, both Qt and Mac were crashing while running the test.
+
+ Note that this does not entirely fix the bug. It fixes the WebCore
+ crash, but the test no longer seems to work due to loader changes.
+ So this patch does not reenable the test. The test probably has to
+ be rewritten.
+
+ * dom/ContainerNode.cpp:
+ (WebCore::ContainerNode::removedFromDocument): Re-added code to
+ set the CSS target of the document to 0.
+
+2009-07-05 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26943
+
+ When one transition finishes slightly before another the longer
+ one will fire a second time. This is because the second
+ ImplicitAnmation object is culled too early, before its final
+ RenderStyle is in place. This is done by cleanupFinishedAnimations()
+ so I got rid of that method completely and now cleanup each
+ transition or animation at the point where I am setting the final
+ style, or when I detect that the transition or animation has been
+ terminated early (which happens when you remove it from the style).
+
+ Test: transitions/extra-transition.html
+
+ * page/animation/AnimationController.cpp:
+ (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
+ * page/animation/CompositeAnimation.cpp:
+ (WebCore::CompositeAnimation::updateTransitions):
+ (WebCore::CompositeAnimation::updateKeyframeAnimations):
+ (WebCore::CompositeAnimation::animate):
+ * page/animation/CompositeAnimation.h:
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::AnimationBase::getTimeToNextEvent):
+ Avoid a divide by zero if m_animation->duration() is zero, which can happen
+ if the duration is changed to zero while the animation is running.
+
+2009-07-05 Simon Fraser <simon.fraser@apple.com>
+
+ Revert the previous commit because it broke the
+ animations/transition-and-animation-1.html
+ testcase.
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::AnimationBase::getTimeToNextEvent):
+ * page/animation/AnimationController.cpp:
+ (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
+ * page/animation/CompositeAnimation.cpp:
+ (WebCore::CompositeAnimation::updateTransitions):
+ (WebCore::CompositeAnimation::updateKeyframeAnimations):
+ (WebCore::CompositeAnimation::animate):
+ (WebCore::CompositeAnimation::cleanupFinishedAnimations):
+ * page/animation/CompositeAnimation.h:
+
+2009-07-05 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26943
+
+ When one transition finishes slightly before another the longer
+ one will fire a second time. This is because the second
+ ImplicitAnmation object is culled too early, before its final
+ RenderStyle is in place. This is done by cleanupFinishedAnimations()
+ so I got rid of that method completely and now cleanup each
+ transition or animation at the point where I am setting the final
+ style, or when I detect that the transition or animation has been
+ terminated early (which happens when you remove it from the style).
+
+ Test: transitions/extra-transition.html
+
+ * page/animation/AnimationController.cpp:
+ (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
+ * page/animation/CompositeAnimation.cpp:
+ (WebCore::CompositeAnimation::updateTransitions):
+ (WebCore::CompositeAnimation::updateKeyframeAnimations):
+ (WebCore::CompositeAnimation::animate):
+ * page/animation/CompositeAnimation.h:
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::AnimationBase::getTimeToNextEvent):
+ Avoid a divide by zero if m_animation->duration() is zero, which can happen
+ if the duration is changed to zero while the animation is running.
+
+2009-07-05 Lars Knoll <lars.knoll@nokia.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26843
+
+ Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.
+
+ The Metrowerks compiler on the Symbian platform moves the globally
+ defined Hashtables into read-only memory, despite one of the members
+ being mutable. This causes crashes at run-time due to write access to
+ read-only memory.
+
+ Avoid the use of const with this compiler by introducing the
+ JSC_CONST_HASHTABLE macro.
+
+ Based on idea by Norbert Leser.
+
+ * bindings/scripts/CodeGeneratorJS.pm: Use JSC_CONST_HASHTABLE for hash tables
+ define in the bindings.
+
+2009-07-05 Rob Buis <rwlbuis@gmail.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Bug 26897 - Dynamic SVG images do not display correctly
+ https://bugs.webkit.org/show_bug.cgi?id=26897
+
+ Use repaint() to fix a rendering problem with a SVG image embedded in xhtml.
+
+ Test: svg/custom/createImageElement2.xhtml
+
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::imageChanged):
+
+2009-07-05 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26960
+ [Gtk] caret offset not updated when selecting text
+
+ Report the caret offset from the end of the selection so it works
+ correctly for multi-char selections too (ie, anything that is not
+ the zero width caret).
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (webkit_accessible_text_get_caret_offset):
+
+2009-07-05 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Unreviewed link fix for Qt.
+
+ Fix Qt link error by adding two new localized strings
+
+ In r45474 two new strings got added to LocalizedStrings.h add
+ the definition of them to Qt.
+
+ * platform/qt/Localizations.cpp:
+ (WebCore::mediaElementLoadingStateText):
+ (WebCore::mediaElementLiveBroadcastStateText):
+
+2009-07-03 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ REGRESSION (r44670-r44680): Typing is suprisingly slow in password field on reddit.com
+ https://bugs.webkit.org/show_bug.cgi?id=26959
+ rdar://problem/7029882
+
+ The code to handle iteration boundaries was malfunctioning when the boundary was
+ at the edge of a shadow tree. This happens all the time with <input> elements.
+
+ It's not immediately obvious how to make a regression test for this since the
+ symptom was a performance problem, not incorrect behavior. I'll add a test if I
+ figure out a way to make one.
+
+ * editing/TextIterator.cpp:
+ (WebCore::parentCrossingShadowBoundaries): Renamed from parentOrShadowParent.
+ (WebCore::depthCrossingShadowBoundaries): Updated for name change.
+ (WebCore::nextInPreOrderCrossingShadowBoundaries): Added.
+ (WebCore::previousInPostOrderCrossingShadowBoundaries): Added.
+ (WebCore::setUpFullyClippedStack): Updated for name change.
+ (WebCore::TextIterator::TextIterator): Updated for name change. Use
+ nextInPreOrderCrossingShadowBoundaries instead of Range::pastLastNode to fix the bug.
+ (WebCore::TextIterator::advance): Updated for name change.
+ (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
+ Tweaked formatting.
+ (WebCore::SimplifiedBackwardsTextIterator::advance): Ditto. Changed code that
+ initializes m_pastStartNode to use previousInPostOrderCrossingShadowBoundaries.
+ (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode): Tweaked formatting.
+ (WebCore::SimplifiedBackwardsTextIterator::exitNode): Ditto.
+
+2009-07-03 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Background audio stops playing when JS GC runs
+ https://bugs.webkit.org/show_bug.cgi?id=26956
+
+ Ensure we keep the Audio object around while it is playing, so that it
+ doesn't get collected.
+
+ Not testable because there's no way to know whether the audio keeps
+ playing without holding a reference to it.
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::isObservableThroughDOM):
+
+2009-07-02 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26814
+ [Gtk] Caret-moved events are not issued for the correct offset
+ when text is selected forward
+
+ Report the caret offset from the end of the selection, otherwise
+ we'll report the same offset when moving the caret while
+ modififying the selection (eg, with Shift Right).
+
+ * editing/gtk/SelectionControllerGtk.cpp:
+ (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
+
+2009-07-02 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26815
+ [Gtk] text-selection-changed events are not issued for the correct
+ object when the selection spans multiple objects
+
+ Get the focused node from the end of the selection, not the start,
+ so we can detect when we cross object boundaries.
+
+ * editing/gtk/SelectionControllerGtk.cpp:
+ (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
+
+2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26947
+
+ Fix the media controls hit tests. They may lose click events.
+
+ Test cases already covered in the video-controls-zoomed tests.
+
+ Don't trust wkHitTestMediaUIPart for the tests. We are accurate enough.
+
+ * rendering/RenderThemeMac.h: Remove hitTestMediaControlPart.
+ * rendering/RenderThemeMac.mm: Remove hitTestMediaControlPart.
+
+2009-07-02 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by Eric Seidel.
+
+ RenderBlock and RenderInline have confusingly named object creation methods:
+ RenderBlock::createRootBox/createRootInlineBox
+ RenderInline::createFlowBox/createInlineFlowBox
+ where the 2nd method in both cases just calls the first and then appends the created object.
+ I therefore renamed those methods to something IMHO more informative:
+
+ createRootBox() -> createRootInlineBox()
+ createRootInlineBox() -> createAndAppendRootInlineBox();
+ createFlowBox() -> createInlineFlowBox();
+ createInlineFlowBox() -> createAndAppendInlineFlowBox();
+
+ https://bugs.webkit.org/show_bug.cgi?id=26828
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::createRootInlineBox):
+ (WebCore::RenderBlock::createAndAppendRootInlineBox):
+ * rendering/RenderBlock.h:
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::createInlineFlowBox):
+ (WebCore::RenderInline::createAndAppendInlineFlowBox):
+ * rendering/RenderInline.h:
+ * rendering/RenderSVGInline.cpp:
+ (WebCore::RenderSVGInline::createInlineFlowBox):
+ * rendering/RenderSVGInline.h:
+ * rendering/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::createRootInlineBox):
+ * rendering/RenderSVGText.h:
+ * rendering/bidi.cpp:
+ (WebCore::createInlineBoxForRenderer):
+
+2009-07-02 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Fix typo in the resource panel enabler caption.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26753
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel):
+
+2009-07-02 Erik Arvidsson <arv@chromium.org>
+
+ Reviewed by Adam Roben.
+
+ [Win] HTML5 Drag and drop, dragend is not fired when pressing Esc
+ https://bugs.webkit.org/show_bug.cgi?id=26699
+
+ * manual-tests/drag-escape.html: Added.
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::dragSourceEndedAt):
+
+2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26944
+
+ Make sure we support full page zoom in video controls.
+
+ This is tracked by a the video-controls-zoom test case.
+
+ * css/mediaControlsQT.css: Make sure we don't have any inherited margin.
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlElement::updateStyle): Propagate the style to the innertext.
+ * rendering/RenderThemeMac.mm: Adjust the painting rect.
+ (WebCore::getUnzoomedRectAndAdjustCurrentContext):
+ (WebCore::RenderThemeMac::paintMediaSliderTrack):
+ (WebCore::RenderThemeMac::paintMediaCurrentTime):
+ (WebCore::RenderThemeMac::paintMediaTimeRemaining):
+
+2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Fix the Gtk build after r45474. The localized strings should
+ have been added there.
+
+ * platform/gtk/LocalizedStringsGtk.cpp:
+ (WebCore::mediaElementLoadingStateText):
+ (WebCore::mediaElementLiveBroadcastStateText):
+
+2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26939
+
+ Media controller is rendered badly at http://www.mozilla.com/en-US/firefox/video/firefox-3.5.html
+
+ We fix two things:
+ - We use px instead of em, because px is used everywhere else
+ and because 0.09em hit the font size limit.
+ - We use -webkit-box instead of inline-block because in strict mode
+ inline-block has a different behavior.
+
+ Test: media/controls-strict.html
+
+ * css/mediaControlsQT.css:
+
+2009-07-02 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ TextIterator should use hasOverflowClip when checking for overflow instead of looking at the style.
+ https://bugs.webkit.org/show_bug.cgi?id=26942
+
+ * editing/TextIterator.cpp:
+ (WebCore::fullyClipsContents):
+
+2009-07-02 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dave Hyatt.
+
+ Fix for <rdar://problem/5230700>
+ Remove local .xhtml file workaround
+
+ * platform/network/mac/ResourceResponseMac.mm:
+ (WebCore::ResourceResponse::platformLazyInit): Work around is no longer necessary.
+
+2009-07-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Sort, add functions used by WebKit.
+
+ * WebCore.base.exp:
+
+2009-07-02 Brady Eidson <beidson@apple.com>
+
+ Rubberstamped by Sam Weinig.
+
+ More of <rdar://problem/6969425> Safari 4.0 doesn't recognize text/plain files if their extension is unknown.
+
+ * platform/network/mac/WebCoreURLResponse.mm:
+ (webNSURLResponseMIMEType): Give Tiger a chance to query the UTI machinery.
+
+2009-07-02 Adam Langley <agl@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Chromium Linux: fix complex text rendering with line break characters.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26935
+
+ If the CSS white-space property is inhibiting line breaking, we might
+ find end-of-line characters rendered via the complex text path. Fonts
+ don't provide glyphs for these code points so, if we find one, we
+ simulate the space glyph being interposed in this case. Because the
+ input is variable-length per code point, we walk the input in step
+ with the output.
+
+ Covered by:
+ LayoutTests/fast/text/international/bidi-linebreak-002.html
+ LayoutTests/fast/text/international/bidi-linebreak-003.html
+ LayoutTests/fast/text/international/hindi-whitespace.html
+
+ * platform/graphics/chromium/HarfbuzzSkia.cpp:
+ (WebCore::stringToGlyphs):
+
+2009-07-02 Victor Wang <victorw@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26521
+ Expose file size to chromium.
+
+ Implement getFileSize() for Chromium.
+
+ * platform/chromium/ChromiumBridge.h:
+ * platform/chromium/FileSystemChromium.cpp:
+ (WebCore::getFileSize):
+
+2009-07-02 Nate Chapin <japhet@chromium.org>
+
+ Unreviewed, build fix.
+
+ * bindings/v8/V8SVGPODTypeWrapper.h: Lost a space in nested template argument list.
+
+2009-07-02 Simon Fraser <simon.fraser@apple.com>
+
+ Build fix: add missing #include.
+
+ * platform/mac/ThemeMac.mm:
+
+2009-07-02 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ <rdar://problem/7028682> ThemeMac::paintRadio() throws Obj-C exceptions when zoomed
+
+ Add BEGIN_BLOCK_OBJC_EXCEPTIONS/END_BLOCK_OBJC_EXCEPTIONS guards around code
+ that can possibly throw Objective-C exceptions when drawing Mac form controls.
+
+ * platform/mac/ThemeMac.mm:
+ (WebCore::paintCheckbox):
+ (WebCore::paintRadio):
+ (WebCore::paintButton):
+ (WebCore::ThemeMac::inflateControlPaintRect):
+
+2009-07-02 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by David Levin.
+
+ Upstream V8SVGPODTypeWrapper.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26907
+
+ * bindings/scripts/CodeGeneratorV8.pm: Update function being renamed in V8SVGPODTypeWrapper.h.
+ * bindings/v8/V8SVGPODTypeWrapper.h: Upstreamed from src.chromium.org.
+
+2009-07-02 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Adds an abstraction layer between the DB classes and the file
+ system, which allows us to add our own logic for storing, opening,
+ deleting, etc. databases.
+
+ The patch was tested using the tests in WebCore/storage.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26054
+
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/sql/SQLiteDatabase.cpp:
+ (WebCore::SQLiteDatabase::open): Delegating the job of opening DB files to SQLiteFileSystem to allow use of custom VFSs.
+ * platform/sql/SQLiteFileSystem.cpp: Added.
+ * platform/sql/SQLiteFileSystem.h: Added.
+ * platform/win/FileSystemWin.cpp:
+ (WebCore::directoryName): Implemented.
+ * storage/Database.cpp:
+ (WebCore::Database::databaseSize): The code that returns the size of a DB file moved to SQLiteFileSystem.
+ * storage/DatabaseTracker.cpp:
+ (WebCore::DatabaseTracker::DatabaseTracker): Added the ability to register a custom SQLite VFS.
+ (WebCore::DatabaseTracker::trackerDatabasePath): DB file-related operations moved to SQLiteFileSystem.
+ (WebCore::DatabaseTracker::openTrackerDatabase): DB file-related operations moved to SQLiteFileSystem.
+ (WebCore::DatabaseTracker::originPath): DB file-related operations moved to SQLiteFileSystem.
+ (WebCore::DatabaseTracker::fullPathForDatabase): DB file-related operations moved to SQLiteFileSystem.
+ (WebCore::DatabaseTracker::usageForDatabase): DB file-related operations moved to SQLiteFileSystem.
+ (WebCore::DatabaseTracker::deleteOrigin): DB file-related operations moved to SQLiteFileSystem.
+ (WebCore::DatabaseTracker::deleteDatabaseFile): DB file-related operations moved to SQLiteFileSystem.
+ * storage/OriginUsageRecord.cpp:
+ (WebCore::OriginUsageRecord::diskUsage): DB file-related operations moved to SQLiteFileSystem.
+
+2009-07-02 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Always clip replaced elements to border radii.
+ https://bugs.webkit.org/show_bug.cgi?id=26933
+
+ Make sure to always clip replaced elements to border radii, even when overflow is visible.
+ Stop defaulting those elements to overflow:hidden in the UA sheet, since it is now no longer
+ necessary.
+
+ Covered by existing tests (since the UA default changing keeps the behavior exactly the same).
+
+ * css/html.css:
+ * rendering/RenderReplaced.cpp:
+ (WebCore::RenderReplaced::paint):
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::paint):
+
+2009-07-02 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Simon Fraser.
+
+ convertFromScrollbarToContainingView and friends should be in ScrollView
+ https://bugs.webkit.org/show_bug.cgi?id=26929
+
+ This is breaking Chromium's build because PopupMenuChromium inherits
+ from ScrollView, but these functions are pure virtual in it. I could
+ put it directly in PopupMenuChromium, but that seems a bit silly since
+ the functions are fairly generic.
+
+ Passes existing layout tests.
+
+ * page/FrameView.cpp: Remove the 4 functions Hyatt just added
+ (IntRect WebCore::FrameView::convertFromScrollbarToContainingView):
+ (IntRect WebCore::FrameView::convertFromContainingViewToScrollBar):
+ (IntPoint WebCore::FrameView::convertFromScrollbarToContainingView):
+ (IntPoint WebCore::FrameView::convertFromContainingViewToScrollBar):
+ * page/FrameView.h: ditto
+ * platform/ScrollView.cpp: Move the 4 functions from FrameView here
+ (IntRect WebCore::ScrollView::convertFromScrollbarToContainingView):
+ (IntRect WebCore::ScrollView::convertFromContainingViewToScrollBar):
+ (IntPoint WebCore::ScrollView::convertFromScrollbarToContainingView):
+ (IntPoint WebCore::ScrollView::convertFromContainingViewToScrollBar):
+ * platform/ScrollView.h: ditto
+
+2009-07-02 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Fix https://bugs.webkit.org/show_bug.cgi?id=26088 - TransparencyWin
+ doesn't handle errors well at all; revise it to fail silently
+ (drawing nothing), and bulletproof FontChromiumWin to handle the
+ failure accordingly.
+
+ Tests: fast/text/text-large-negative-letter-spacing-with-opacity.html
+ fast/text/text-letter-spacing.html
+
+ * platform/graphics/chromium/FontChromiumWin.cpp:
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter):
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter):
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
+ (WebCore::Font::drawGlyphs):
+ (WebCore::Font::drawComplexText):
+ * platform/graphics/chromium/TransparencyWin.cpp:
+ (WebCore::TransparencyWin::TransparencyWin):
+ (WebCore::TransparencyWin::setupLayerForNoLayer):
+ (WebCore::TransparencyWin::setupLayerForOpaqueCompositeLayer):
+ (WebCore::TransparencyWin::setupLayerForWhiteLayer):
+ (WebCore::TransparencyWin::setupTransformForKeepTransform):
+ (WebCore::TransparencyWin::setupTransformForScaleTransform):
+ (WebCore::TransparencyWin::initializeNewContext):
+ (WebCore::TransparencyWin::compositeOpaqueComposite):
+ (WebCore::TransparencyWin::compositeTextComposite):
+ (WebCore::TransparencyWin::makeLayerOpaque):
+ * platform/graphics/chromium/TransparencyWin.h:
+ (WebCore::TransparencyWin::platformContext):
+
+2009-07-02 Eric Carlson <eric.carlson@apple.com>
+
+ Change #import to #include to fix non-ObjC builds.
+
+ * rendering/MediaControlElements.cpp:
+
+2009-07-02 Anders Carlsson <andersca@apple.com>
+
+ Build fix.
+
+ * platform/network/mac/WebCoreURLResponse.mm:
+ (mimeTypeFromUTITree):
+
+2009-07-02 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Fix for bug 22119, clicks in the scrollbars of transformed content don't work. Add new
+ conversion methods for going across parent/child widget boundaries that can be implemented
+ by the FrameView and ScrollbarClient to be transform-aware.
+
+ Test cases added in platform/mac/fast/forms and platform/mac/fast/overflow.
+
+ * WebCore.base.exp:
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleMouseMoveEvent):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::convertFromScrollbarToContainingView):
+ (WebCore::FrameView::convertFromContainingViewToScrollbar):
+ (WebCore::FrameView::convertFromRenderer):
+ (WebCore::FrameView::convertToRenderer):
+ (WebCore::FrameView::convertToContainingView):
+ (WebCore::FrameView::convertFromContainingView):
+ * page/FrameView.h:
+ * platform/ScrollView.h:
+ * platform/Scrollbar.cpp:
+ (WebCore::Scrollbar::convertToContainingView):
+ (WebCore::Scrollbar::convertFromContainingView):
+ * platform/Scrollbar.h:
+ * platform/ScrollbarClient.h:
+ (WebCore::ScrollbarClient::convertFromScrollbarToContainingView):
+ (WebCore::ScrollbarClient::convertFromContainingViewToScrollbar):
+ * platform/Widget.cpp:
+ (WebCore::Widget::convertFromContainingWindow):
+ (WebCore::Widget::convertToContainingWindow):
+ (WebCore::Widget::convertFromRootToContainingWindow):
+ (WebCore::Widget::convertFromContainingWindowToRoot):
+ (WebCore::Widget::convertToContainingView):
+ (WebCore::Widget::convertFromContainingView):
+ * platform/Widget.h:
+ * platform/graphics/IntPoint.h:
+ (WebCore::IntPoint::move):
+ * platform/mac/WidgetMac.mm:
+ (WebCore::Widget::convertFromRootToContainingWindow):
+ (WebCore::Widget::convertFromContainingWindowToRoot):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::isPointInOverflowControl):
+ * rendering/RenderDataGrid.cpp:
+ (WebCore::RenderDataGrid::convertFromScrollbarToContainingView):
+ (WebCore::RenderDataGrid::convertFromContainingViewToScrollbar):
+ * rendering/RenderDataGrid.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::convertFromScrollbarToContainingView):
+ (WebCore::RenderLayer::convertFromContainingViewToScrollbar):
+ (WebCore::RenderLayer::scrollbarOffset):
+ (WebCore::RenderLayer::hitTestOverflowControls):
+ * rendering/RenderLayer.h:
+ * rendering/RenderListBox.cpp:
+ (WebCore::RenderListBox::isPointInOverflowControl):
+ (WebCore::RenderListBox::convertFromScrollbarToContainingView):
+ (WebCore::RenderListBox::convertFromContainingViewToScrollbar):
+ * rendering/RenderListBox.h:
+
+2009-07-02 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt and Simon Fraser.
+
+ - fix <rdar://problem/6933052> SPOD playing video in a div with a box
+ shadow
+
+ Test: fast/box-shadow/transform-fringing.html
+
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paintBoxShadow): Clip out the
+ box even if it has an opaque background, but in that case, inset the
+ clip path by 1 pixel, to avoid antialiasing artifacts.
+ Do not inset the clip rect by 1 pixel if the CTM is purely a
+ translation.
+ Move the shadow-casting path away in the non-rounded-rect case (it
+ was already being done in the rounded-rect case), to avoid a black
+ fringe when the CTM is not purely a translation.
+
+2009-07-02 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6969425> Safari 4.0 doesn't recognize text/plain files if their extension is unknown.
+
+ Walk the CoreTypes UTI tree for extensions with unknown MIME types, using the first MIME type found.
+
+ For many types of text files (such as source code files) this ends up being text/plain.
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Tweak the logging output.
+
+ * platform/network/mac/WebCoreURLResponse.h:
+ * platform/network/mac/WebCoreURLResponse.mm:
+ (mimeTypeFromUTITree):
+ (webNSURLResponseMIMEType): Use mimeTypeFromUTITree() to find a UTI-based MIME type for this file's extension.
+ (-[NSURLResponse _webcore_reportedMIMEType]): Return the actual MIME type that CFNetwork gave us.
+
+2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/6518119>
+
+ Add a rewind button and hide the timeline for live broadcasts when
+ in MediaUI mode.
+
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add the new pseudo element.
+
+ * css/CSSSelector.cpp:
+ (WebCore::CSSSelector::extractPseudoType): Ditto.
+ * css/CSSSelector.h:
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
+
+ * css/CSSValueKeywords.in: Ditto.
+ * css/mediaControls.css: Ditto.
+ * css/mediaControlsQT.css: Ditto.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::rewind): New.
+ (WebCore::HTMLMediaElement::returnToRealTime): New.
+ (WebCore::HTMLMediaElement::isStreaming): New.
+ * html/HTMLMediaElement.h:
+
+ * page/mac/WebCoreViewFactory.h: Declare mediaElementLoadingStateText and mediaElementLiveBroadcastStateText.
+
+ * platform/LocalizedStrings.h: Add localized media state messages.
+
+ * platform/ThemeTypes.h: Add the new pseudo element.
+
+ * platform/mac/LocalizedStringsMac.mm:
+ (WebCore::mediaElementLoadingStateText): Add localized media state.
+ (WebCore::mediaElementLiveBroadcastStateText): Ditto.
+
+ * platform/mac/WebCoreSystemInterface.h: Change BOOL param wkDrawMediaUIPart to an int to support
+ multiple states.
+ * platform/mac/WebCoreSystemInterface.mm: Ditto.
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlElement::MediaControlElement): Deal with new elements.
+ (WebCore::MediaControlElement::attachToParent): Ditto.
+ (WebCore::MediaControlElement::update): Ditto.
+ (WebCore::MediaControlElement::updateStyle): Ditto.
+ (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement): Ditto.
+ (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded): Ditto.
+ (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement): Ditto.
+ (WebCore::MediaControlStatusDisplayElement::update): Ditto.
+ (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded): Ditto.
+ (WebCore::MediaControlInputElement::MediaControlInputElement): Ditto.
+ (WebCore::MediaControlInputElement::attachToParent): Ditto.
+ (WebCore::MediaControlInputElement::updateStyle): Ditto.
+ (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Ditto.
+ (WebCore::MediaControlRewindButtonElement::defaultEventHandler): Ditto.
+ (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Ditto.
+ (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): Ditto.
+ (WebCore::MediaControlReturnToRealtimeButtonElement::rendererIsNeeded): Ditto.
+ (WebCore::MediaControlTimelineElement::defaultEventHandler): Ditto.
+ (WebCore::MediaControlTimelineElement::update): Ditto.
+ (WebCore::MediaControlFullscreenButtonElement::rendererIsNeeded): Ditto.
+ * rendering/MediaControlElements.h: Ditto.
+
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::styleDidChange): Deal with the new elements.
+ (WebCore::RenderMedia::createPanel): Ditto.
+ (WebCore::RenderMedia::createRewindButton): Ditto.
+ (WebCore::RenderMedia::createReturnToRealtimeButton): Ditto.
+ (WebCore::RenderMedia::createStatusDisplay): Ditto.
+ (WebCore::RenderMedia::createTimelineContainer): Ditto.
+ (WebCore::RenderMedia::createCurrentTimeDisplay): Ditto.
+ (WebCore::RenderMedia::createTimeRemainingDisplay): Ditto.
+ (WebCore::RenderMedia::updateControls): Ditto.
+ (WebCore::RenderMedia::forwardEvent): Ditto.
+ * rendering/RenderMedia.h:
+
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::paint): Deal with the new elements.
+
+ * rendering/RenderTheme.h:
+ (WebCore::RenderTheme::paintMediaRewindButton): Deal with the new elements.
+ (WebCore::RenderTheme::paintMediaReturnToRealtimeButton): Ditto.
+ (WebCore::RenderTheme::paintMediaControlsBackground): Ditto.
+
+ * rendering/RenderThemeMac.h:
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintMediaRewindButton): Deal with the new elements.
+ (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): Ditto.
+ (WebCore::RenderThemeMac::paintMediaControlsBackground): Ditto.
+
+ * rendering/style/RenderStyleConstants.h: Add constants for the new elements.
+
+2009-07-01 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Small refactoring of MessagePortChannel so that PlatformMessagePortChannel
+ may be defined at the WebKit layer.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26905
+
+ * dom/MessageChannel.cpp:
+ (WebCore::MessageChannel::MessageChannel):
+ * dom/MessagePortChannel.cpp:
+ * dom/MessagePortChannel.h:
+ * dom/default/PlatformMessagePortChannel.cpp:
+ (WebCore::MessagePortChannel::createChannel):
+ (WebCore::MessagePortChannel::create):
+ (WebCore::MessagePortChannel::MessagePortChannel):
+ (WebCore::MessagePortChannel::~MessagePortChannel):
+
+2009-07-01 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <video> fails to show on http://camendesign.com/code/video_for_everybody
+ <rdar://problem/7026010>
+ https://bugs.webkit.org/show_bug.cgi?id=26919
+
+ Fix an issue introduced in r44961. In that revision we changed to only update
+ compositing layer geometry when all siblings had been laid out (i.e. we pushed
+ the updates one level down). However, that left out the root layer, so this
+ fix ensures that the root layer geometry gets updated at the end.
+
+ Test: compositing/geometry/root-layer-update.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateAfterLayout):
+
+2009-07-01 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ <rdar://problem/7026010> <video> fails to show on http://camendesign.com/code/video_for_everybody
+
+ First part of fix: when outline width changes, don't to a synchronous
+ layer update right away, but just set the flag to say that compositing
+ layers need updating. The synchronous layer update left the layer geometries
+ out of whack when it happened in the middle of layout (e.g. when inside ::first-letter).
+
+ Test: compositing/geometry/outline-change.html
+
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::setMaximalOutlineSize):
+
+2009-07-01 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26842
+ Build fix when ENABLE_DATABASE is off
+
+ Move Database.h into ENABLE(DATABASE) guard so toggling ENABLE_DATABASE
+ off does not break builds.
+
+ * bindings/js/ScriptObjectQuarantine.cpp:
+
+2009-07-01 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26899
+
+ Modified XSSAuditor::decodeURL to only remove null characters so that
+ it is consistent with the behavior of HTMLTokenizer and prevents
+ injected scripts that contain control characters.
+
+ Tests: http/tests/security/xssAuditor/script-tag-control-char.html
+ http/tests/security/xssAuditor/script-tag-null-char.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::decodeURL): Modified to only remove null characters.
+ * page/XSSAuditor.h: Reverted naming of third argument of method XSSAuditor::decodeURL
+ from allowControlCharacters back to allowNullCharacters.
+ * platform/network/ResourceResponseBase.cpp: Reverted back to rev #45003.
+ (WebCore::isControlCharacter):
+ * platform/network/ResourceResponseBase.h: Reverted back to rev #45003.
+
+2009-07-01 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ - supported keyboard shortcuts compatible with Firebug in Scripts Debugger:
+ F5, Ctrl+/ (win,lin), Command+/ (mac) - continue
+ F10, Ctrl+' (win, lin), Command+' (mac) - step over
+ F11, Ctrl+; (win, lin), Command+; (mac) - step into
+ Shift+F11, Ctrl+Shift+; (win, lin), Command+Shift+; (mac) - step out
+
+ - added call stack navigation shortcuts:
+ Ctrl+. - next call frame
+ Ctrl+, - previouse call frame
+
+ https://bugs.webkit.org/show_bug.cgi?id=23849
+
+ * inspector/front-end/CallStackSidebarPane.js:
+ (WebInspector.CallStackSidebarPane):
+ (WebInspector.CallStackSidebarPane.prototype.handleKeyEvent):
+ (WebInspector.CallStackSidebarPane.prototype._selectNextCallFrameOnStack):
+ (WebInspector.CallStackSidebarPane.prototype._selectPreviousCallFrameOnStack):
+ (WebInspector.CallStackSidebarPane.prototype._selectedPlacardByIndex):
+ (WebInspector.CallStackSidebarPane.prototype._selectedCallFrameIndex):
+ * inspector/front-end/KeyboardShortcut.js: Added.
+ (WebInspector.KeyboardShortcut):
+ (WebInspector.KeyboardShortcut.makeKey):
+ (WebInspector.KeyboardShortcut.makeKeyFromEvent):
+ (WebInspector.KeyboardShortcut.makeKeyFromCodeAndModifiers_):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ (WebInspector.ScriptsPanel.prototype.handleKeyEvent):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+
+2009-07-01 Daniel Erat <derat@google.com>
+
+ Reviewed by David Levin.
+
+ Chromium Linux: Move the scrollbar thumb on middle-click.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26910
+ http://code.google.com/p/chromium/issues/detail?id=11976
+
+ Tested by building Chrome and checking that the scrollbar moves as expected.
+
+ * platform/chromium/ScrollbarThemeChromium.cpp:
+ * platform/chromium/ScrollbarThemeChromium.h:
+ * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
+ * platform/chromium/ScrollbarThemeChromiumLinux.h:
+ * platform/chromium/ScrollbarThemeChromiumWin.cpp:
+ * platform/chromium/ScrollbarThemeChromiumWin.h:
+
+2009-07-01 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add a preference/setting to toggle whether content sniffing is enabled for file URLs.
+
+ * WebCore.base.exp:
+
+ * page/Settings.cpp:
+ (WebCore::Settings::setLocalFileContentSniffingEnabled):
+ * page/Settings.h:
+ (WebCore::Settings::localFileContentSniffingEnabled):
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::start):
+ (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
+
+2009-07-01 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 26909: aria-label needs to be supported
+ https://bugs.webkit.org/show_bug.cgi?id=26909
+
+ Test: accessibility/aria-label.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::accessibilityDescription):
+ * html/HTMLAttributeNames.in:
+
+2009-07-01 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ More datagrid columns work. Make sure columns cache both a style for the column header as well
+ as a style for the column background (behind the cells).
+
+ Hook up to CSSStyleSelector methods for obtaining the pseudo styles for columns (stubbed out and
+ unimplemented).
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::pseudoStyleForDataGridColumn):
+ (WebCore::CSSStyleSelector::pseudoStyleForDataGridColumnHeader):
+ * css/CSSStyleSelector.h:
+ * html/DataGridColumn.h:
+ (WebCore::DataGridColumn::setColumnList):
+ (WebCore::DataGridColumn::columnStyle):
+ (WebCore::DataGridColumn::setColumnStyle):
+ (WebCore::DataGridColumn::headerStyle):
+ (WebCore::DataGridColumn::setHeaderStyle):
+ * rendering/RenderDataGrid.cpp:
+ (WebCore::RenderDataGrid::recalcStyleForColumn):
+ (WebCore::RenderDataGrid::columnStyle):
+ (WebCore::RenderDataGrid::headerStyle):
+ (WebCore::RenderDataGrid::paintColumnHeaders):
+ * rendering/RenderDataGrid.h:
+
+2009-07-01 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/7009870> After <audio> movie finishes playing, Pause button fails to change
+ back to Play button
+
+ Grab onto the current time when QTKit "ended" notification fires and use it as
+ duration from that point on as QuickTime sometimes refuses to play all the way to
+ the time it reports for duration and buffered. HTMLMediaElement assumes that there
+ more to play in this situation and tries to restart playback, endlessly.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ Rename m_duration to m_reportedDuration. Declare m_cachedDuration.
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+ Rename m_duration to m_reportedDuration. Initialize m_cachedDuration.
+ (WebCore::MediaPlayerPrivate::duration):
+ Return m_cachedDuration once it has been set.
+ (WebCore::MediaPlayerPrivate::updateStates):
+ Rename m_duration to m_reportedDuration.
+ (WebCore::MediaPlayerPrivate::didEnd):
+ Set m_cachedDuration to currentTime().
+
+2009-07-01 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Bug 26900: AX: Manual spell check with Command-; does not bring up suggestions
+ https://bugs.webkit.org/show_bug.cgi?id=26900
+
+ Editable web areas should have a clickpoint that uses where the selection is.
+
+ Test: accessibility/editable-webarea-context-menu-point.html
+
+ * accessibility/AccessibilityObject.h:
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::clickPoint):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+
+2009-07-01 David Levin <levin@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Remove unused code in SVGTransformList and SVGTransformDistance
+ <https://bugs.webkit.org/show_bug.cgi?id=26891>
+
+ * svg/SVGTransformDistance.cpp:
+ (WebCore::SVGTransformDistance::SVGTransformDistance):
+ * svg/SVGTransformList.cpp:
+ * svg/SVGTransformList.h:
+
+2009-07-01 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Begin stubbing out functions for layout, painting and style/geometry caching on columns. Not enough
+ is implemented for this to do much of anything yet, but it should help keep patch sizes down. :)
+
+ * html/DataGridColumn.cpp:
+ (WebCore::DataGridColumn::columnChanged):
+ * html/DataGridColumn.h:
+ (WebCore::DataGridColumn::setId):
+ (WebCore::DataGridColumn::setLabel):
+ (WebCore::DataGridColumn::setType):
+ (WebCore::DataGridColumn::setSortable):
+ (WebCore::DataGridColumn::setSortDirection):
+ (WebCore::DataGridColumn::setColumnList):
+ (WebCore::DataGridColumn::style):
+ (WebCore::DataGridColumn::setStyle):
+ (WebCore::DataGridColumn::rect):
+ (WebCore::DataGridColumn::setRect):
+ * html/DataGridColumnList.cpp:
+ (WebCore::DataGridColumnList::DataGridColumnList):
+ (WebCore::DataGridColumnList::setDataGridNeedsLayout):
+ (WebCore::DataGridColumnList::add):
+ (WebCore::DataGridColumnList::remove):
+ (WebCore::DataGridColumnList::move):
+ (WebCore::DataGridColumnList::clear):
+ (WebCore::DataGridColumnList::primaryColumnChanged):
+ * html/DataGridColumnList.h:
+ (WebCore::DataGridColumnList::create):
+ (WebCore::DataGridColumnList::dataGrid):
+ (WebCore::DataGridColumnList::clearDataGrid):
+ * html/HTMLDataGridColElement.cpp:
+ (WebCore::HTMLDataGridColElement::HTMLDataGridColElement):
+ (WebCore::HTMLDataGridColElement::findDataGridAncestor):
+ (WebCore::HTMLDataGridColElement::insertedIntoTree):
+ (WebCore::HTMLDataGridColElement::removedFromTree):
+ * html/HTMLDataGridColElement.h:
+ (WebCore::HTMLDataGridColElement::dataGrid):
+ * html/HTMLDataGridElement.cpp:
+ (WebCore::HTMLDataGridElement::HTMLDataGridElement):
+ (WebCore::HTMLDataGridElement::~HTMLDataGridElement):
+ * rendering/RenderDataGrid.cpp:
+ (WebCore::RenderDataGrid::styleDidChange):
+ (WebCore::RenderDataGrid::recalcStyleForColumns):
+ (WebCore::RenderDataGrid::recalcStyleForColumn):
+ (WebCore::RenderDataGrid::styleForColumn):
+ (WebCore::RenderDataGrid::layout):
+ (WebCore::RenderDataGrid::layoutColumns):
+ (WebCore::RenderDataGrid::paintColumnHeaders):
+ (WebCore::RenderDataGrid::paintColumnHeader):
+ * rendering/RenderDataGrid.h:
+ (WebCore::RenderDataGrid::renderName):
+ (WebCore::RenderDataGrid::canHaveChildren):
+
+2009-07-01 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26807
+
+ Fixes this address by checking whether frame->document()->decoder() is null.
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::findInRequest):
+
+2009-07-01 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ Fixes: https://bugs.webkit.org/show_bug.cgi?id=26885
+
+ Correctly reset history length to '0', not '1'. Old relict from early WML days.
+ Add some new WML testcases covering the use of history length (by onenterforward event handling)
+
+ Tests: wml/onenterforward-event.html
+ wml/onenterforward-inline-event.html
+ wml/ontimer-event.html
+
+ * wml/WMLPageState.cpp:
+ (WebCore::WMLPageState::reset):
+
+2009-07-01 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Make sure setting attributes on dcol elements properly updates the corresponding DataGridColumn object.
+
+ Added new test in fast/dom/HTMLDataGridElement.
+
+ * html/HTMLDataGridColElement.cpp:
+ (WebCore::HTMLDataGridColElement::parseMappedAttribute):
+ * html/HTMLDataGridColElement.h:
+
+2009-07-01 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ <rdar://problem/6998524> REGRESSION (r44474): Form text field has focus ring, looks focused,
+ even though the field is not actually focused for keyboard input
+
+ Add the concept of whether or not the Page is focused by adding a boolean to the focusController. This allows the
+ focused frame and focused node to both be cached and changed programmatically even when the Page itself doesn't
+ actually happen to have focus at that time.
+
+ * WebCore.base.exp:
+ * page/FocusController.cpp:
+ (WebCore::FocusController::FocusController):
+ (WebCore::FocusController::setFocusedFrame):
+ (WebCore::FocusController::setFocused):
+ (WebCore::FocusController::setActive):
+ * page/FocusController.h:
+ (WebCore::FocusController::isFocused):
+
+2009-07-01 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Move some API headers from WebCore.pro to headers.pri so that they
+ get installed when running make install from the build directory.
+
+ * WebCore.pro:
+
+2009-07-01 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Rubber-stamped by Ariya Hidayat.
+
+ Ran WebKitTools/Scripts/generate-qt-inspector-resource to update the
+ qrc file with new png files from the web inspector.
+
+ * inspector/front-end/WebKit.qrc:
+
+2009-06-30 Mark Rowe <mrowe@apple.com>
+
+ Land some code that has a hope of compiling.
+
+ * platform/graphics/cg/ImageSourceCG.cpp:
+ (WebCore::imageSourceOptions):
+
+2009-06-30 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Flip back on block caching. Throwing away block data, while
+ a perceived memory win, is a performance hit in cases where we
+ are repainting large images (i.e. backgrounds) frequently
+ (i.e. a flash video playing on top).
+ <rdar://problem/6933515> REGRESSION(L-SL): Large JPEG images are
+ decoded on drawing, slowing down painting of sites that frequently
+ repaint e.g. because of Flash (pandora.com, Starcraft 2)
+
+ * platform/graphics/cg/ImageSourceCG.cpp:
+ (WebCore::imageSourceOptions):
+
+2009-06-30 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - Rename html4.css to html.css, since we target HTML5 now
+ https://bugs.webkit.org/show_bug.cgi?id=26873
+
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::loadFullDefaultStyle):
+ * css/html.css: Copied from css/html4.css.
+ * css/html4.css: Removed.
+ * css/themeWin.css:
+ * platform/Theme.h:
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
+ * rendering/RenderTheme.h:
+
+2009-06-30 Zan Dobersek <zandobersek@gmail.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] Drag and drop support
+ https://bugs.webkit.org/show_bug.cgi?id=23642
+
+ Define DragImageRef as GdkPixbuf and implement essential
+ functions which manipulate drag images.
+
+ * platform/DragImage.h:
+ * platform/gtk/DragImageGtk.cpp:
+ (WebCore::dragImageSize):
+ (WebCore::deleteDragImage):
+ (WebCore::scaleDragImage):
+ (WebCore::createDragImageFromImage):
+
+2009-06-30 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ StorageNamespace.cpp build issue
+ https://bugs.webkit.org/show_bug.cgi?id=26859
+
+ Moved #endif //ENABLE(DOM_STORAGE) position
+ so that the build doesn't fail.
+ The namespace WebCore was started after the #if ENABLE(DOM_STORAGE)
+ but closed after the #endif.
+
+ * storage/StorageNamespace.cpp:
+
+2009-06-30 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/7020825> HTMLMediaElement should not assume seeking is only possible in
+ buffered time ranges
+
+ * html/HTMLMediaElement.cpp:
+ Don't ASSERT if the network state goes to Idle when when the ready state is
+ HaveEnoughData or higher, it is perfectly legal.
+ (WebCore::HTMLMediaElement::setReadyState):
+ Don't clear m_seeking after posting a 'seeking' event.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::seek):
+ Do nothing when asked to seek to the same time we are already seeking to. Check requested
+ seek time against maxTimeSeekable, not maxTimeLoaded.
+ (WebCore::MediaPlayerPrivate::doSeek):
+ Don't bother stopping a movie that isn't playing. Minor cleanup to make the code more readable.
+ (WebCore::MediaPlayerPrivate::seekTimerFired):
+ Check requested seek time against maxTimeSeekable, not maxTimeLoaded.
+ (WebCore::MediaPlayerPrivate::updateStates):
+ A streaming movie has as much data as it needs once it reaches "playable", so
+ set the ready state to HaveFutureData. A movie with metadata doesn't drop back
+ to "have nothing" when seeking. A streaming movie doesn't use the network when paused.
+ (WebCore::MediaPlayerPrivate::timeChanged):
+ It may not be possible to seek to a specific time in a streamed movie but when seeking
+ in a streaming movie QuickTime sets the time to closest time possible and posts a
+ timechanged notification, so update m_seekTo so we can detect when the seek completes.
+
+2009-06-30 Steve Falkenburg <sfalken@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=26860
+
+ Reviewed by Sam Weinig.
+
+ Blacklist Yahoo Application State plug-in for versions prior to 1.0.0.6.
+ Earlier versions cause corruption crashes.
+
+ * plugins/win/PluginPackageWin.cpp:
+ (WebCore::PluginPackage::isPluginBlacklisted):
+
+2009-06-30 Dean Jackson <dino@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7005207> <video> in canvas broken with ACCEL_COMPOSITING
+
+ Fix drawImage of video in CanvasRenderingContext2D when
+ accelerated compositing is enabled. This is done by
+ adding a new paint method to HTMLVideoElement that
+ is only called from canvas, which will create the software
+ renderer if necessary, but otherwise calls the regular
+ paint method. Meanwhile, add logic to the software video
+ renderer so that it can be created without calling repaint
+ every time it sees a new frame.
+
+ * html/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::drawImage):
+ * html/HTMLVideoElement.cpp:
+ (WebCore::HTMLVideoElement::paintCurrentFrameInContext):
+ * html/HTMLVideoElement.h:
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::MediaPlayer::paintCurrentFrameInContext):
+ * platform/graphics/MediaPlayer.h:
+ * platform/graphics/MediaPlayerPrivate.h:
+ (WebCore::MediaPlayerPrivateInterface::paintCurrentFrameInContext):
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::createQTMovie):
+ (WebCore::MediaPlayerPrivate::createQTVideoRenderer):
+ (WebCore::MediaPlayerPrivate::currentRenderingMode):
+ (WebCore::MediaPlayerPrivate::setUpVideoRendering):
+ (WebCore::MediaPlayerPrivate::tearDownVideoRendering):
+ (WebCore::MediaPlayerPrivate::paintCurrentFrameInContext):
+
+2009-06-30 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26858
+
+ Get <dcol> elements reflected into the datagrid's column list. Make sure columns get added/removed
+ properly. (Attribute changes are still not caught. That is coming in a separate patch.)
+
+ Added fast/dom/HTMLDataGridElement/DataGridColumns-dom.html
+
+ * html/DataGridColumn.h:
+ (WebCore::DataGridColumn::create):
+ (WebCore::DataGridColumn::setColumnList):
+ (WebCore::DataGridColumn::DataGridColumn):
+ * html/DataGridColumnList.cpp:
+ (WebCore::DataGridColumnList::add):
+ (WebCore::DataGridColumnList::remove):
+ (WebCore::DataGridColumnList::clear):
+ * html/DataGridColumnList.h:
+ * html/HTMLDataGridColElement.cpp:
+ (WebCore::HTMLDataGridColElement::HTMLDataGridColElement):
+ (WebCore::HTMLDataGridColElement::findDatagridAncestor):
+ (WebCore::HTMLDataGridColElement::ensureColumn):
+ (WebCore::HTMLDataGridColElement::insertedIntoTree):
+ (WebCore::HTMLDataGridColElement::removedFromTree):
+ (WebCore::HTMLDataGridColElement::sortable):
+ (WebCore::HTMLDataGridColElement::setSortable):
+ * html/HTMLDataGridColElement.h:
+ (WebCore::HTMLDataGridColElement::column):
+ (WebCore::HTMLDataGridColElement::setColumn):
+ (WebCore::HTMLDataGridColElement::datagrid):
+ * html/HTMLDataGridElement.cpp:
+ (WebCore::HTMLDataGridElement::setDataSource):
+ (WebCore::HTMLDataGridElement::dataSource):
+
+2009-06-30 Jeremy Orlow (jorlow@chromium.org)
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26852
+
+ Fix some minor build issues in the v8 bindings.
+
+ * bindings/v8/custom/V8StorageCustom.cpp:
+ (WebCore::V8Custom::v8StorageNamedPropertyEnumerator):
+ (WebCore::storageGetter):
+ (WebCore::storageSetter):
+ (WebCore::storageDeleter):
+ * storage/StorageArea.cpp:
+
+2009-06-30 Adam Langley <agl@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Chromium Linux: use different fonts for each script run.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26853
+
+ Previously, when rendering complex text, we picked a single font which
+ could render all the glyphs needed for the run. However, this meant
+ that sometimes lines were rendered with, for example, [LATIN, THAI,
+ LATIN] and we could end up with a different font for the Latin parts
+ than for lines without Thai in them.
+
+ With this patch, we pick a font for each script run.
+
+ This change is covered by existing layout tests.
+
+ * platform/graphics/chromium/FontLinux.cpp:
+ (WebCore::Font::drawGlyphs):
+ (WebCore::TextRunWalker::TextRunWalker):
+ (WebCore::TextRunWalker::~TextRunWalker):
+ (WebCore::TextRunWalker::nextScriptRun):
+ (WebCore::TextRunWalker::fontPlatformDataForScriptRun):
+ (WebCore::TextRunWalker::setupFontForScriptRun):
+ (WebCore::TextRunWalker::allocHarfbuzzFont):
+ (WebCore::setupForTextPainting):
+ (WebCore::Font::drawComplexText):
+ (WebCore::Font::floatWidthForComplexText):
+ (WebCore::Font::offsetForPositionForComplexText):
+ (WebCore::Font::selectionRectForComplexText):
+ * platform/graphics/chromium/FontPlatformDataLinux.cpp:
+ (WebCore::FontPlatformData::setupPaint):
+
+2009-06-30 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt, Dan Bernstein.
+
+ <rdar://problem/6191676> Redraw issues scrolling overflow:scroll div with compositing
+
+ There are two parts to this fix. First, if a compositing layer has overflow clipping
+ or a mask, then the compositing layer does not need to be sized to encompass all
+ non-composited children.
+
+ Second, when scrolling, we have to back up to the compositing ancestor and have
+ it reposition descendant compositing layers, because overflow doesn't follow
+ the z-order tree.
+
+ Test: compositing/overflow/overflow-scroll.html
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+ Pass the UpdateCompositingLayers flag when updating layers after layout, so that
+ we can reposition compositing layers if we're not about to do a layer rebuild.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateLayerPositions):
+ Only update compositing layers if the flag is set.
+
+ (WebCore::RenderLayer::scrollToOffset):
+ Do compositing layer updates from the compositing ancestor in one fell swoop.
+
+ * rendering/RenderLayer.h:
+ Replace the unused FullUpdate flag with one that allows us to specify whether
+ compositing layers should be updated.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateAfterLayout):
+ * rendering/RenderLayerBacking.h:
+ New param that we can pass to updateCompositingDescendantGeometry to control
+ whether the update goes deep.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::calculateCompositedBounds):
+ We can return earlier if this is not a self-painting layer.
+ If the layer has overflow clip or a mask, then the composited bounds are just the
+ local bounds, excluding descendants.
+
+ (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
+ * rendering/RenderLayerCompositor.h:
+ Renamed from updateCompositingChildrenGeometry, and added a flag that allows
+ us to do a deep update.
+
+2009-06-30 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26764
+ Uncaught NOT_FOUND_ERR: DOMException 8 loading empty text file
+
+ Test: fast/parser/empty-text-resource.html
+
+ * loader/TextDocument.cpp: (WebCore::TextTokenizer::finish): Create document tree if it
+ hasn't been created yet.
+
+2009-06-30 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Renamed scrollbarUnderPoint to scrollbarAtPoint.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::hitTestResultAtPoint):
+ (WebCore::EventHandler::handleMousePressEvent):
+ (WebCore::EventHandler::handleMouseMoveEvent):
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::scrollbarAtPoint):
+ * platform/ScrollView.h:
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::handleMouseDownEvent):
+ (WebCore::PopupListBox::handleMouseMoveEvent):
+
+2009-06-30 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ <rdar://problem/6960286> CrashTracer: [REGRESSION] 1120 crashes in Safari at com.apple.WebCore WebCore::JSLazyEventListener::parseCode const 62
+
+ <select> elements and other elements the produce popups can keep their popups
+ live across a page load. If this occurs and the <select> element has an
+ onchange handler it is possible to get into a state where we try to execute
+ JS on a page that no longer has an execution context.
+
+ * bindings/js/JSLazyEventListener.cpp:
+ (WebCore::JSLazyEventListener::parseCode):
+ Be paranoid and add a null check, but assert as well because we shouldn't
+ actually get to this point.
+ * rendering/RenderMenuList.cpp:
+ (WebCore::RenderMenuList::valueChanged):
+
+2009-06-30 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ <https://bugs.webkit.org/show_bug.cgi?id=25435>
+
+ Added support for sending MessagePorts to/from Workers via postMessage().
+
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::messageChannel):
+ Exposes MessageChannel constructor WorkerContext.
+ * bindings/js/JSWorkerCustom.cpp:
+ * bindings/v8/custom/V8MessageChannelConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ Now correctly handles being instantiated from within a Worker.
+ * platform/CrossThreadCopier.h:
+ (WebCore::GenericWorkerTaskTraits<PassOwnPtr>):
+ Added support for passing PassOwnPtr as argument to GenericWorkerTask
+ * workers/GenericWorkerTask.h:
+ (WebCore::):
+ * workers/Worker.cpp:
+ (WebCore::Worker::postMessage):
+ Now handles disentangling/entangling MessagePorts sent to/from via postMessage.
+ (WebCore::Worker::dispatchMessage):
+ * workers/Worker.h:
+ * workers/Worker.idl:
+ Added an optional MessagePort argument to postMessage()
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::hasPendingActivity):
+ Workers now report pending activity whenever there are remotely entangled ports.
+ (WebCore::WorkerContext::postMessage):
+ Now handles disentangling/entangling MessagePorts sent to/from via postMessage.
+ (WebCore::WorkerContext::dispatchMessage):
+ * workers/WorkerContext.h:
+ * workers/WorkerContext.idl:
+ Added an optional MessagePort argument to postMessage()
+ * workers/WorkerContextProxy.h:
+ * workers/WorkerMessagingProxy.cpp:
+ Updated messaging infrastructure to transport an optional MessagePort/MessagePortChannel.
+ (WebCore::MessageWorkerContextTask::create):
+ (WebCore::MessageWorkerContextTask::MessageWorkerContextTask):
+ (WebCore::MessageWorkerContextTask::performTask):
+ (WebCore::MessageWorkerTask::create):
+ (WebCore::MessageWorkerTask::MessageWorkerTask):
+ (WebCore::MessageWorkerTask::performTask):
+ (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
+ (WebCore::WorkerMessagingProxy::postMessageToWorkerContext):
+ * workers/WorkerMessagingProxy.h:
+ Added additional postMessage() API that accepts a MessagePort
+ * workers/WorkerObjectProxy.h:
+ Added additional postMessage() API that accepts a MessagePort
+
+2009-06-30 Adam Langley <agl@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Chromium: Add complex text support on Linux.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25068
+
+ This patch adds complex text support on Linux using Harfbuzz. It's not
+ the fastest code possible: some caching of font tables will certainly
+ be required. However, it's probably the simplest code that works.
+
+ This will require checking in new baselines in the Chromium tree for
+ those layout tests which now pass.
+
+ * platform/graphics/chromium/FontLinux.cpp:
+ (WebCore::Font::drawGlyphs):
+ (WebCore::truncateFixedPointToInteger):
+ (WebCore::TextRunWalker::TextRunWalker):
+ (WebCore::TextRunWalker::~TextRunWalker):
+ (WebCore::TextRunWalker::reset):
+ (WebCore::TextRunWalker::setXOffsetToZero):
+ (WebCore::TextRunWalker::rtl):
+ (WebCore::TextRunWalker::setBackwardsIteration):
+ (WebCore::TextRunWalker::nextScriptRun):
+ (WebCore::TextRunWalker::glyphs):
+ (WebCore::TextRunWalker::length):
+ (WebCore::TextRunWalker::xPositions):
+ (WebCore::TextRunWalker::advances):
+ (WebCore::TextRunWalker::width):
+ (WebCore::TextRunWalker::logClusters):
+ (WebCore::TextRunWalker::numCodePoints):
+ (WebCore::TextRunWalker::widthOfFullRun):
+ (WebCore::TextRunWalker::allocHarfbuzzFont):
+ (WebCore::TextRunWalker::deleteGlyphArrays):
+ (WebCore::TextRunWalker::createGlyphArrays):
+ (WebCore::TextRunWalker::expandGlyphArrays):
+ (WebCore::TextRunWalker::shapeGlyphs):
+ (WebCore::TextRunWalker::setGlyphXPositions):
+ (WebCore::setupForTextPainting):
+ (WebCore::fontPlatformDataForTextRun):
+ (WebCore::Font::drawComplexText):
+ (WebCore::Font::floatWidthForComplexText):
+ (WebCore::glyphIndexForXPositionInScriptRun):
+ (WebCore::Font::offsetForPositionForComplexText):
+ (WebCore::Font::selectionRectForComplexText):
+ * platform/graphics/chromium/HarfbuzzSkia.cpp: Added.
+ (WebCore::SkiaScalarToHarfbuzzFixed):
+ (WebCore::stringToGlyphs):
+ (WebCore::glyphsToAdvances):
+ (WebCore::canRender):
+ (WebCore::getOutlinePoint):
+ (WebCore::getGlyphMetrics):
+ (WebCore::getFontMetric):
+ (WebCore::harfbuzzSkiaGetTable):
+
+2009-06-30 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7019799> Slow loading MediaDocument can fall back to plug-in unnecessarily
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::updateStates):
+ Always fall back to a plug-in if m_hasUnsupportedTracks is set.
+ (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
+ Set m_hasUnsupportedTracks if we disable a track.
+
+2009-06-30 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix inverted if/else that's causing a layout test in src.chromium.org to fail.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26820
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::GCPrologueVisitor::visitDOMWrapper): if (port2), not if (!port2).
+
+2009-06-30 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ - fix <rdar://problem/6946611> REGRESSION (r30673): Shade10:" D_Snap
+ to Grid" window is clipping
+
+ Added an app-specific quirk to revert the behavior of <link> elements
+ to the way it was before r30673, namely that if the rel attribute
+ is not "stylesheet" but the type attribute contains "text/css", the
+ link behaves as a stylesheet link.
+
+ * WebCore.base.exp: Exported setTreatsAnyTextCSSLinkAsStylesheet().
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::process): Check
+ Settings::treatsAnyTextCSSLinkAsStylesheet() and if true, allow a
+ style sheet link if the type contains "text/css".
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ Initialize m_treatsAnyTextCSSLinkAsStylesheet.
+ (WebCore::Settings::setTreatsAnyTextCSSLinkAsStylesheet): Added.
+ * page/Settings.h:
+ (WebCore::Settings::treatsAnyTextCSSLinkAsStylesheet): Added.
+
+2009-06-30 Adrien Nader <camaradetux@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ Fix typo in GNUMakefile.am: it reads WebCOre instead of WebCore.
+
+ * GNUmakefile.am:
+
+2009-06-30 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Xan Lopez.
+
+ [Gtk] Turn on ENABLE_DATAGRID so we can run the layout tests.
+
+ * GNUmakefile.am:
+
+2009-06-30 Raju Kunnath <raju.kunnath@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ <https://bugs.webkit.org/show_bug.cgi?id=26752>
+
+ [Qt] Windows release build issue with Qt4.5 due to -GL flag on msvc2005 and msvc2008.
+
+ * WebCore.pro: Removed -GL compiler option for win32-msvc2005|win32-msvc2008.
+
+2009-06-30 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ Initialize member variables in the right order. Fixes compiler
+ warning.
+
+ * platform/image-decoders/bmp/BMPImageReader.cpp:
+ (WebCore::BMPImageReader::BMPImageReader):
+
+2009-06-29 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26831
+ Fix compiler warning in WorkerLoaderProxy.h
+
+ Forward declaration of a class within a class is not allowed,
+ since the compiler can't know if the declaration is legal at that
+ point. This gives the following compiler warning:
+
+ ../../WebCore/workers/WorkerLoaderProxy.h:40: warning: declaration
+ "class WebCore::ScriptExecutionContext::Task" does not declare
+ anything
+
+ Include the full ScriptExecutionHeader header instead.
+
+ * workers/WorkerLoaderProxy.h:
+
+2009-06-29 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ Remove unused function.
+
+ * plugins/gtk/PluginPackageGtk.cpp:
+
+2009-06-29 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Change RenderLayer::updateLayerPositions() to use a bitmask instead of two
+ boolean arguments. FullUpdate is unused at present, but will be used soon.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateLayerPositions):
+ (WebCore::RenderLayer::scrollToOffset):
+ * rendering/RenderLayer.h:
+ (WebCore::RenderLayer::):
+
+2009-06-29 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix one more bad merge in V8Proxy.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26819
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::setDOMException): setDOMExceptionHelper() instead of convertToV8Object().
+
+2009-06-29 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Remove more unused scons support.
+
+ * SConstruct: Removed.
+
+2009-06-29 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dave Hyatt.
+
+ Fix some incorrect create functions.
+
+ * html/DataGridColumn.h:
+ (WebCore::DataGridColumn::create):
+ * html/DataGridColumnList.h:
+ (WebCore::DataGridColumnList::create):
+
+2009-06-29 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dave Hyatt.
+
+ Remove initialize method from DataGridDataSource and add
+ DOMDataGridDataSource.
+
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * bindings/js/JSDataGridDataSource.cpp:
+ * bindings/js/JSDataGridDataSource.h:
+ * bindings/js/JSHTMLDataGridElementCustom.cpp:
+ (WebCore::JSHTMLDataGridElement::setDataSource):
+ * html/DOMDataGridDataSource.cpp: Added.
+ (WebCore::DOMDataGridDataSource::DOMDataGridDataSource):
+ (WebCore::DOMDataGridDataSource::~DOMDataGridDataSource):
+ * html/DOMDataGridDataSource.h: Added.
+ (WebCore::DOMDataGridDataSource::create):
+ (WebCore::DOMDataGridDataSource::isDOMDataGridDataSource):
+ (WebCore::asDOMDataGridDataSource):
+ * html/DataGridDataSource.h:
+ (WebCore::DataGridDataSource::isDOMDataGridDataSource):
+ (WebCore::DataGridDataSource::isJSDataGridDataSource):
+ * html/HTMLDataGridElement.cpp:
+ (WebCore::HTMLDataGridElement::HTMLDataGridElement):
+ (WebCore::HTMLDataGridElement::setDataSource):
+ (WebCore::HTMLDataGridElement::dataSource):
+ * html/HTMLDataGridElement.h:
+
+2009-06-29 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix a couple of bad merge items from my previous V8Proxy patch.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26813
+
+ * bindings/v8/V8Collection.h:
+ (WebCore::nodeCollectionNamedPropertyGetter): Fix a bad function name that slipped through.
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::setDOMException): Fix a bad merge that caused a couple of lines of extraneous, breaking code to get in.
+
+2009-06-29 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser <simon.fraser@apple.com>.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26706
+
+ Fixed crash due to dereference of m_toStyle
+
+ * page/animation/ImplicitAnimation.cpp:
+ (WebCore::ImplicitAnimation::isTargetPropertyEqual):
+
+2009-06-29 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7014813> Ask media engine if a movie is streamed or downloaded.
+
+ * WebCore.base.exp:
+ Export _wkQTMovieGetType
+
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::MediaPlayer::hasSingleSecurityOrigin):
+ Move to keep with other non-callback functions.
+ (WebCore::MediaPlayer::movieLoadType):
+ New, returns the movie type.
+ * platform/graphics/MediaPlayer.h:
+ Declare MovieLoadType enum and movieLoadType method.
+
+ * platform/graphics/MediaPlayerPrivate.h:
+ (WebCore::MediaPlayerPrivateInterface::movieLoadType):
+ Default implementation of movieLoadType
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::createQTMovie):
+ Don't base m_isStreaming on protocol, there are other types of streaming movies.
+ (WebCore::MediaPlayerPrivate::maxTimeBuffered):
+ Don't assume all streams are unbuffered.
+ (WebCore::MediaPlayerPrivate::updateStates):
+ Update m_isStreaming once we have metadata.
+ (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
+ Tracks that are disabled to begin with shouldn't be included in m_enabledTrackCount.
+ (WebCore::MediaPlayerPrivate::movieLoadType):
+ New, return movie type.
+
+ * platform/mac/WebCoreSystemInterface.h:
+ * platform/mac/WebCoreSystemInterface.mm:
+ Add wkQTMovieGetType.
+
+2009-06-29 Alice Liu <alice.liu@apple.com>
+
+ Fixed <rdar://problem/6930280> Reproducible crash at USA Today photo gallery
+
+ Reviewed by Anders Carlsson.
+
+ No test added because the crash requires a flash plugin
+
+ * plugins/win/PluginMessageThrottlerWin.cpp:
+ Rely on the hWnd of the plugin to tell us whether the PluginView has
+ been deleted during execution of its wndProc.
+ (WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
+
+2009-06-29 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26811
+ [Chromium] Remove a flag and functions used to enable workers in runtime.
+
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ * bindings/v8/WorkerContextExecutionProxy.h:
+
+2009-06-29 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ <rdar://problem/6976712> Text antialiasing problems when rendering into compositing layers.
+
+ Improve the appearance of text in compositing layers by making use of
+ CA's layer geometry flipping, rather that doing it ourselves with a flip
+ transform. This allows CG to use font autohinting in the layer text.
+
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::GraphicsLayer::setGeometryOrientation):
+ (WebCore::GraphicsLayer::geometryOrientation):
+ New methods to set whether this layer uses flipped geometry.
+
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::setGeometryOrientation):
+ (WebCore::GraphicsLayerCA::geometryOrientation):
+ Subclass in order to call into CA
+
+ (WebCore::GraphicsLayerCA::setContentsLayer):
+ Now that CA is doing the geometry flipping, we no longer need to flip the content
+ layers for image and video manually
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
+ Turn on flipping on the root layer.
+
+2009-06-29 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ Fixes: https://bugs.webkit.org/show_bug.cgi?id=26246
+
+ Implement most WML specific <select> element features.
+ Add 'iname' / 'ivalue' support and support variable references.
+
+ Add two tests covering most select/variable related functionality.
+ Needs more tests when adding full 'iname' / 'ivalue' support (used in conjuction with onpick).
+
+ Tests: http/tests/wml/post-data-to-server.html
+ wml/select-element-variables.html
+
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::optionCount): Refactored from HTMLSelectElement::length() for use within HTML & WML.
+ * dom/SelectElement.h:
+ * html/HTMLSelectElement.cpp:
+ (WebCore::HTMLSelectElement::length): Use new SelectElement::optionCount() function. (no functional changes for HTML).
+ * wml/WMLCardElement.cpp:
+ (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded): Activated commented code taking care of WMLSelectElement initialization.
+ * wml/WMLSelectElement.cpp: Add a bunch of new code handling WML specific feature processing.
+ (WebCore::WMLSelectElement::title):
+ (WebCore::WMLSelectElement::formControlName):
+ (WebCore::WMLSelectElement::defaultEventHandler):
+ (WebCore::WMLSelectElement::selectInitialOptions):
+ (WebCore::WMLSelectElement::calculateDefaultOptionIndices):
+ (WebCore::WMLSelectElement::selectDefaultOptions):
+ (WebCore::WMLSelectElement::initializeVariables):
+ (WebCore::WMLSelectElement::updateVariables):
+ (WebCore::WMLSelectElement::parseIndexValueString):
+ (WebCore::WMLSelectElement::valueStringToOptionIndices):
+ (WebCore::WMLSelectElement::optionIndicesToValueString):
+ (WebCore::WMLSelectElement::optionIndicesToString):
+ (WebCore::WMLSelectElement::name):
+ (WebCore::WMLSelectElement::value):
+ (WebCore::WMLSelectElement::iname):
+ (WebCore::WMLSelectElement::ivalue):
+ * wml/WMLSelectElement.h:
+
+2009-06-29 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Put <datagrid> behind an ifdef.
+
+ * Configurations/FeatureDefines.xcconfig:
+ * bindings/js/JSDataGridColumnListCustom.cpp:
+ * bindings/js/JSDataGridDataSource.cpp:
+ * bindings/js/JSDataGridDataSource.h:
+ * bindings/js/JSHTMLDataGridElementCustom.cpp:
+ * html/DataGridColumn.cpp:
+ * html/DataGridColumn.h:
+ * html/DataGridColumn.idl:
+ * html/DataGridColumnList.cpp:
+ * html/DataGridColumnList.h:
+ * html/DataGridColumnList.idl:
+ * html/DataGridDataSource.h:
+ * html/HTMLDataGridCellElement.cpp:
+ * html/HTMLDataGridCellElement.h:
+ * html/HTMLDataGridCellElement.idl:
+ * html/HTMLDataGridColElement.cpp:
+ * html/HTMLDataGridColElement.h:
+ * html/HTMLDataGridColElement.idl:
+ * html/HTMLDataGridElement.cpp:
+ * html/HTMLDataGridElement.h:
+ * html/HTMLDataGridElement.idl:
+ * html/HTMLDataGridRowElement.cpp:
+ * html/HTMLDataGridRowElement.h:
+ * html/HTMLDataGridRowElement.idl:
+ * html/HTMLTagNames.in:
+ * page/DOMWindow.idl:
+ * rendering/RenderDataGrid.cpp:
+ * rendering/RenderDataGrid.h:
+
+2009-06-29 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Ariya Hidayat and Adam Roben.
+
+ Fix compilation with MINGW. Ported MSVC inline assembly to
+ GNU inline assembly. Also fixed casting errors where gcc
+ refused to cast a pointer-to-function to a pointer-to-object,
+ without an intermediate cast to a non-pointer type.
+
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::hookedBeginPaint):
+ (WebCore::PluginView::hookedEndPaint):
+ (WebCore::hook):
+ (WebCore::setUpOffscreenPaintingHooks):
+
+2009-06-26 John Sullivan <sullivan@apple.com>
+
+ Added Speech submenu to context menu on Mac when there's a non-editable selection
+ (it was already present when there's an editable selection).
+ Also added support for disabling "Stop Speaking" when there is no speaking to stop.
+
+ Reviewed by Tim Hatcher.
+
+ * loader/EmptyClients.h:
+ (WebCore::EmptyContextMenuClient::isSpeaking):
+ implemented this new virtual function to return false
+
+ * page/ContextMenuClient.h:
+ declared this new pure virtual function
+
+ * platform/ContextMenu.cpp:
+ (WebCore::ContextMenu::populate):
+ insert Speech item (after a separator) on Mac when there's selected non-editable text
+ (WebCore::ContextMenu::checkOrEnableIfNeeded):
+ enable Stop Speaking item only if the context menu client returns true for isSpeaking()
+
+2009-06-28 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=26783
+ <rdar://problem/7014543> REGRESSION (r45296): Subfolders not displayed
+ in MobileMe iDisk Web App
+
+ Test: added a case to fast/dom/Element/scrollWidth.html
+
+ Ensure that scroll{Width, Height} is greater or equal to
+ client{Width, Height}.
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::scrollWidth):
+ (WebCore::RenderBox::scrollHeight):
+
+2009-06-27 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26780
+
+ Do not make compositing layers for non-self-painting RenderLayers,
+ since these exist only to push a clip onto the clipping stack. If such
+ a layer gets compositied for some other reason, it should not paint.
+
+ Also ensure that we update composited layer positions correctly
+ inside overflow:scroll layers. We can't assume that the contents
+ are child layers, so we have to go up to the compositing ancestor,
+ and tell it to update all its child layer positions as we do
+ after layout.
+
+ Tests: compositing/layers-inside-overflow-scroll.html
+ compositing/self-painting-layers.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::scrollToOffset):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::paintIntoLayer):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::calculateCompositedBounds):
+ (WebCore::RenderLayerCompositor::needsToBeComposited):
+
+2009-06-28 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
+
+ Reviewed by Eric Seidel.
+
+ PurgeableBuffer #defines leave out functions on gtk MacOSX 10.4 build
+ https://bugs.webkit.org/show_bug.cgi?id=23057
+
+ Define these functions for Gtk as well.
+
+ * platform/PurgeableBuffer.h:
+
+2009-06-28 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Update CodeGeneratorV8.pm to match the new api for V8Proxy.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26765
+
+ * bindings/scripts/CodeGeneratorV8.pm: Match the current version of V8Proxy.
+
+2009-06-28 Nicolas Sylvain <nsylvain@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ If loading a font fails because of the sandbox, we ask the browser process to
+ try to load it by calling ensureFontLoaded. If it still fails after
+ ensureFontLoaded, we hit a ASSERT_NOT_REACHED.
+
+ This case happens once in a while during browser shutdown. The browser will
+ queue a message to the renderer to shutdown, and will then stop answering sync
+ messages from the renderer. If the renderer is still loading a page during this
+ time, it might try to call the browser process to ask to load a font. The
+ browser process will ignore the request, and the font will fail to load, even
+ after the second try.
+
+ This is unfortunate, but there is no real risk here, since the renderer will be
+ going away as soon as it processes another message.
+
+ This can't be layout tested as it depends on the sandbox.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26743
+
+ * platform/graphics/chromium/FontChromiumWin.cpp:
+ * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
+ * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
+ * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
+
+2009-06-28 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=15457
+
+ Test: plugins/netscape-plugin-map-data-to-src.html
+
+ Fix problems with Real or WMP plugins not displaying because "data" was set
+ on the OBJECT tag instead of "src". This is based on what Firefox does, see
+ http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsObjectFrame.cpp#3045
+
+ * rendering/RenderPartObject.cpp:
+ (WebCore::mapDataParamToSrc):
+ (WebCore::RenderPartObject::updateWidget):
+
+2009-06-27 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Jan Alonzo.
+
+ [Qt] Build fix after r45290
+ https://bugs.webkit.org/show_bug.cgi?id=26769
+
+ * WebCore.pro:
+
+2009-06-27 Emilio Pozuelo Monfort <pochu27@gmail.com>
+
+ Reviewed by Jan Alonzo.
+
+ [GTK] Don't use deprecated GTKsymbols.
+ https://bugs.webkit.org/show_bug.cgi?id=26583
+
+ * plugins/gtk/gtk2xtbin.c:
+ (gtk_xtbin_class_init):
+ (gtk_xtbin_new):
+ (gtk_xtbin_destroy):
+
+2009-06-27 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26780
+
+ Fix up previous change. When computeCompositingRequirements() determines
+ that the current layer is composited, it needs to inform its parent
+ by setting compositingState.m_subtreeIsCompositing() to true. That didn't
+ always happen after the previous patch. Clarified the logic here.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::CompositingState::CompositingState):
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+
+2009-06-27 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26780
+
+ First part: fix the RenderLayer::hasCompositingDescendant() flag to be set
+ correctly.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+ Do not unconditionally set compositingState.m_subtreeIsCompositing, because
+ that can clobber the value from an earlier sibling. Add some more comments.
+
+ Remove a final use of Vector iterators.
+
+ (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect):
+ Move the normalFlowList() processing outside the test for isStackingContext().
+
+2009-06-27 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser and Antti Koivisto.
+
+ - make paintFillLayerExtended() non-virtual and remove its clipY and
+ clipH parameters
+
+ These parameters were computed and passed along to
+ paintFillLayerExtended in order to vertically constrain the rect fill to
+ the damage rect, because Qt cannot paint tall rectangles (see
+ <http://websvn.kde.org/?view=rev&revision=42721>). Since the damage rect
+ is passed along in the PaintInfo, the extra parameters are redundant,
+ and the intersection can just take place in paintFillLayerExtended().
+
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::paintFillLayers):
+ (WebCore::InlineFlowBox::paintFillLayer):
+ (WebCore::InlineFlowBox::paintBoxDecorations):
+ (WebCore::InlineFlowBox::paintMask):
+ * rendering/InlineFlowBox.h:
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::paintRootBoxDecorations):
+ (WebCore::RenderBox::paintBoxDecorations):
+ (WebCore::RenderBox::paintMask):
+ (WebCore::RenderBox::paintMaskImages):
+ (WebCore::RenderBox::paintFillLayers):
+ (WebCore::RenderBox::paintFillLayer):
+ * rendering/RenderBox.h:
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+ * rendering/RenderBoxModelObject.h:
+ * rendering/RenderFieldset.cpp:
+ (WebCore::RenderFieldset::paintBoxDecorations):
+ (WebCore::RenderFieldset::paintMask):
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::paintBoxDecorations):
+ (WebCore::RenderTable::paintMask):
+ * rendering/RenderTableCell.cpp:
+ (WebCore::RenderTableCell::paintBackgroundsBehindCell):
+ (WebCore::RenderTableCell::paintMask):
+
+2009-06-27 Ryosuke Niwa <rniwa@google.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26762
+
+ Clean up for IndentOutdentCommand::indentRegion, and solved most of problems related to the bug 21712.
+ https://bugs.webkit.org/show_bug.cgi?id=21712
+
+ Added few utility functions to htmlediting.h/cpp
+
+ isVisibilyAdjacent checks whether the first position is visibly next to the second position.
+ i.e. there is no visible node between the first and second positions
+
+ canMergeLists checks whether two lists can be merged.
+ It checks the type of list, the editing boundary, and adjacency of the lists.
+
+ Tests: editing/execCommand/indent-nested-lists-1.html
+ editing/execCommand/indent-nested-lists-2.html
+ editing/execCommand/indent-nested-lists-3.html
+ editing/execCommand/indent-nested-lists-4.html
+ editing/execCommand/indent-nested-lists-5.html
+ editing/execCommand/indent-nested-lists-6.html
+ editing/execCommand/indent-nested-lists-7.html
+ editing/execCommand/outdent-nested-lists-1.html
+ editing/execCommand/outdent-nested-lists-2.html
+ editing/execCommand/outdent-nested-lists-3.html
+ editing/execCommand/outdent-nested-lists-4.html
+
+ * editing/IndentOutdentCommand.cpp:
+ (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion):
+ (WebCore::IndentOutdentCommand::tryIndentingAsListItem):
+ (WebCore::IndentOutdentCommand::indentIntoBlockquote):
+ (WebCore::IndentOutdentCommand::indentRegion):
+ * editing/IndentOutdentCommand.h:
+ * editing/htmlediting.cpp:
+ (WebCore::enclosingListChild):
+ (WebCore::canMergeLists):
+ (WebCore::isVisibilyAdjacent):
+ * editing/htmlediting.h:
+
+2009-06-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Fix completion when iterating options using Tab.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26722
+
+ * inspector/front-end/TextPrompt.js:
+ (WebInspector.TextPrompt.prototype._completionsReady):
+
+2009-06-27 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Holger Freyther.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25889
+ [GTK] scrollbar policy for main frame is not implementable
+
+ Override visibleContentRect to handle GTK+'s case, in which
+ scrollbars or equivalent decoration are painted by the parent
+ widget.
+
+ * platform/ScrollView.cpp:
+ * platform/gtk/ScrollViewGtk.cpp:
+ (WebCore::ScrollView::visibleContentRect):
+
+2009-06-27 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26708
+
+ Fix addresses false negatives with respect to scheme relative paths, iFrame JavaScript URLs,
+ and UTF-7 encoded payloads.
+
+ Tests: http/tests/security/xssAuditor/http-equiv-utf-7-encoded.html
+ http/tests/security/xssAuditor/iframe-javascript-url.html
+ http/tests/security/xssAuditor/script-tag-utf-7-encoded.html
+ http/tests/security/xssAuditor/script-tag-with-source-relative-scheme.html
+
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::scriptHandler): Moved XSSAuditor check to HTMLTokenizer::parseTag.
+ (WebCore::HTMLTokenizer::parseTag):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadSubframe): Modified to inform XSSAuditor of parent frame so
+ as to compare against iFrame javascript URL.
+ * page/XSSAuditor.cpp: Removed method XSSAuditor::isControlCharacter. Instead, exposed method
+ isControlCharacter in ResourceResponseBase.cpp.
+ (WebCore::XSSAuditor::XSSAuditor):
+ (WebCore::XSSAuditor::decodeURL): Modified to decode string using specified encoder.
+ (WebCore::XSSAuditor::findInRequest): Generalized to arbitrary frame so as to prevent execution
+ of iFrame javascript URL.
+ * page/XSSAuditor.h: Added field m_parentFrame.
+ * platform/network/ResourceResponseBase.cpp:
+ (WebCore::isControlCharacter):
+ * platform/network/ResourceResponseBase.h:
+
+2009-06-27 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Bug 26771: Canvas is incorrectly tainted when drawing from a video element that uses <source> elements
+
+ The drawImage(<video>) logic naively assumes that it just needs
+ to check the src attribute of the video element when in fact it
+ needs to look at the url that is being played instead. Failure
+ to do this means that video provided through source elements
+ taints the canvas.
+
+ Test: media/video-canvas-source.html
+
+ * html/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::checkOrigin):
+ (WebCore::CanvasRenderingContext2D::drawImage):
+ * html/CanvasRenderingContext2D.h:
+
+2009-06-26 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26695
+
+ Added the ability to do scrollbar hit testing in EventHandler, changed the
+ signature of a PlatformWheelEvent constructor, and changed scrollbarUnderMouse
+ to scrollbarUnderPoint, and updated all calls to that function.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::hitTestResultAtPoint):
+ (WebCore::EventHandler::handleMousePressEvent):
+ (WebCore::EventHandler::handleMouseMoveEvent):
+ * page/EventHandler.h:
+ (WebCore::):
+ * platform/PlatformWheelEvent.h:
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::scrollbarUnderPoint):
+ * platform/ScrollView.h:
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::handleMouseDownEvent):
+ (WebCore::PopupListBox::handleMouseMoveEvent):
+ * platform/win/WheelEventWin.cpp:
+ (WebCore::PlatformWheelEvent::PlatformWheelEvent):
+
+
+2009-06-26 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7011924> Opacity transitions should not trigger hardware compositing mode
+
+ Don't go into compositing mode just for opacity transitions, but they will be
+ hardware acclerated if we're already compositing.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::requiresCompositingLayer):
+ (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
+ (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
+ * rendering/RenderLayerCompositor.h:
+
+2009-06-26 Simon Fraser <simon.fraser@apple.com>
+
+ Rubber-stamped by Dave Levin
+
+ Rename ioCompState to compositingState to better match WebCore coding style.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+ (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
+
+2009-06-26 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ - revert unintentional project changes from r45277
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2009-06-26 Mark Rowe <mrowe@apple.com>
+
+ Fix the Windows build.
+
+ * WebCore.vcproj/WebCore.vcproj: Remove ColorSafari.cpp as
+ the file was deleted from SVN.
+
+2009-06-26 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26766
+
+ Change to use array indexing rather than Vector enumerators; the former
+ are preferred style.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::hasNonCompositingContent):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::calculateCompositedBounds):
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+ (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
+ (WebCore::RenderLayerCompositor::updateCompositingChildrenGeometry):
+ (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect):
+ (WebCore::RenderLayerCompositor::layerHas3DContent):
+
+2009-06-26 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ - fix <rdar://problem/6961476> REGRESSION (r42043): scrollWidth reported
+ as 1 px
+
+ Test: fast/dom/Element/scrollWidth.html
+
+ Changed scrollWidth and scrollHeight to use the same logic for
+ visible overflow boxes that is used for clipped overflow boxes. In
+ particular, borders are not included and
+ {leftmost,rightmost,lowest}Position() are used. This logic matches IE8.
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::scrollWidth):
+ (WebCore::RenderBox::scrollHeight):
+
+2009-06-26 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 26725: aria-hidden, aria-disabled, aria-readonly need to be implemented
+ https://bugs.webkit.org/show_bug.cgi?id=26725
+
+ Tests: accessibility/aria-disabled.html
+ accessibility/aria-hidden.html
+ accessibility/aria-readonly.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::ariaIsHidden):
+ (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
+ (WebCore::AccessibilityRenderObject::isEnabled):
+ (WebCore::AccessibilityRenderObject::canSetValueAttribute):
+ * accessibility/AccessibilityRenderObject.h:
+ * html/HTMLAttributeNames.in:
+
+2009-06-26 Brett Wilson <brettw@chromium.org>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26759
+
+ GIFImageDecoder is broken.
+
+ Make the GIFImageDecoder.repetitionCount function const to match the
+ base class. The mismatched definitions were causing the function to not
+ get called.
+
+ * platform/image-decoders/gif/GIFImageDecoder.cpp:
+ (WebCore::GIFImageDecoder::repetitionCount):
+ * platform/image-decoders/gif/GIFImageDecoder.h:
+
+2009-06-26 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser <simon.fraser@apple.com>.
+
+ Additional fix for https://bugs.webkit.org/show_bug.cgi?id=26651
+
+ The flag should always default to true to avoid it getting set
+ to false in a build with accelerated compositing turned off
+ and then disabling accelerated compositing when subsequently
+ running a build with it turned on.
+
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+
+2009-06-26 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Followup for the fix for <rdar://problem/6961578> REGRESSION (r43511): Opening .fdf files from Acrobat Professional fails
+
+ Now that other MIME type correction stuff is in our swizzled method, Tiger needs it too!
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
+ * platform/network/mac/WebCoreURLResponse.h:
+
+2009-06-26 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26732
+
+ For the final step of https://bugs.webkit.org/show_bug.cgi?id=25376,
+ combine LocalStorage and SessionStorage into StorageNamespace. The
+ synching code (for LocalStorage) has already been removed, so these
+ classes are now very similar. All they do is essentially contain a
+ logical grouping of origins that are attached to specific contexts
+ (be it PageGroups for LocalStorage and Page for SessionStorage).
+
+ * GNUmakefile.am:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * page/Chrome.cpp:
+ (WebCore::Chrome::createWindow):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::localStorage):
+ * page/DOMWindow.h:
+ * page/Page.cpp:
+ (WebCore::Page::sessionStorage):
+ (WebCore::Page::setSessionStorage):
+ * page/Page.h:
+ * page/PageGroup.cpp:
+ (WebCore::PageGroup::localStorage):
+ * page/PageGroup.h:
+ * storage/LocalStorage.cpp: Removed.
+ * storage/LocalStorage.h: Removed.
+ * storage/LocalStorageTask.cpp:
+ * storage/LocalStorageThread.cpp:
+ * storage/SessionStorage.cpp: Removed.
+ * storage/SessionStorage.h: Removed.
+ * storage/StorageArea.cpp:
+ (WebCore::StorageArea::create):
+ (WebCore::StorageArea::StorageArea):
+ (WebCore::StorageArea::copy):
+ (WebCore::StorageArea::length):
+ (WebCore::StorageArea::key):
+ (WebCore::StorageArea::getItem):
+ (WebCore::StorageArea::setItem):
+ (WebCore::StorageArea::removeItem):
+ (WebCore::StorageArea::clear):
+ (WebCore::StorageArea::contains):
+ (WebCore::StorageArea::importItem):
+ (WebCore::StorageArea::close):
+ (WebCore::StorageArea::dispatchStorageEvent):
+ * storage/StorageArea.h:
+ (WebCore::):
+ * storage/StorageAreaSync.cpp:
+ (WebCore::StorageAreaSync::scheduleFinalSync):
+ * storage/StorageNamespace.cpp: Copied from WebCore/storage/LocalStorage.cpp.
+ (WebCore::localStorageNamespaceMap):
+ (WebCore::StorageNamespace::localStorageNamespace):
+ (WebCore::StorageNamespace::sessionStorageNamespace):
+ (WebCore::StorageNamespace::StorageNamespace):
+ (WebCore::StorageNamespace::~StorageNamespace):
+ (WebCore::StorageNamespace::copy):
+ (WebCore::StorageNamespace::storageArea):
+ (WebCore::StorageNamespace::close):
+ * storage/StorageNamespace.h: Copied from WebCore/storage/LocalStorage.h.
+
+2009-06-26 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by David Levin.
+
+ Upstream V8Proxy. This involved updating a lot of function and variable names to match WebKit style, hence the large size.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26623
+
+ * bindings/v8/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::ScheduledAction):
+ (WebCore::ScheduledAction::~ScheduledAction):
+ (WebCore::ScheduledAction::execute):
+ * bindings/v8/ScriptCallStack.cpp:
+ (WebCore::ScriptCallStack::ScriptCallStack):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::isSafeScript):
+ (WebCore::ScriptController::gcProtectJSWrapper):
+ (WebCore::ScriptController::gcUnprotectJSWrapper):
+ (WebCore::ScriptController::processingUserGesture):
+ (WebCore::ScriptController::evaluate):
+ (WebCore::ScriptController::setEventHandlerLineNumber):
+ (WebCore::ScriptController::bindToWindowObject):
+ (WebCore::ScriptController::collectGarbage):
+ (WebCore::ScriptController::haveInterpreter):
+ (WebCore::createScriptObject):
+ (WebCore::ScriptController::createScriptObjectForPluginElement):
+ * bindings/v8/ScriptInstance.cpp:
+ (WebCore::V8ScriptInstance::clear):
+ (WebCore::V8ScriptInstance::set):
+ * bindings/v8/ScriptObject.cpp:
+ (WebCore::ScriptGlobalObject::set):
+ * bindings/v8/ScriptObjectQuarantine.cpp:
+ (WebCore::getQuarantinedScriptObject):
+ * bindings/v8/ScriptScope.cpp:
+ (WebCore::ScriptScope::ScriptScope):
+ * bindings/v8/ScriptValue.h:
+ (WebCore::ScriptValue::ScriptValue):
+ (WebCore::ScriptValue::operator=):
+ (WebCore::ScriptValue::clear):
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::invokeEventHandler):
+ (WebCore::V8AbstractEventListener::handleEvent):
+ (WebCore::V8AbstractEventListener::disposeListenerObject):
+ (WebCore::V8AbstractEventListener::getReceiverObject):
+ * bindings/v8/V8Collection.cpp:
+ (WebCore::toOptionsCollectionSetter):
+ * bindings/v8/V8Collection.h:
+ (WebCore::getV8Object):
+ (WebCore::getNamedPropertyOfCollection):
+ (WebCore::nodeCollectionNamedPropertyGetter):
+ (WebCore::getIndexedPropertyOfCollection):
+ (WebCore::nodeCollectionIndexedPropertyGetter):
+ (WebCore::nodeCollectionIndexedPropertyEnumerator):
+ (WebCore::collectionIndexedPropertyEnumerator):
+ (WebCore::collectionStringOrNullIndexedPropertyGetter):
+ * bindings/v8/V8DOMMap.cpp:
+ (WebCore::weakDOMObjectCallback):
+ (WebCore::DOMData::removeObjectsFromWrapperMap):
+ * bindings/v8/V8Helpers.cpp:
+ (WebCore::wrapNPObject):
+ (WebCore::toV8Context):
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::~V8LazyEventListener):
+ (WebCore::V8LazyEventListener::getListenerFunction):
+ (WebCore::V8LazyEventListener::callListenerFunction):
+ (WebCore::V8LazyEventListener::getWrappedListenerFunction):
+ * bindings/v8/V8NodeFilterCondition.cpp:
+ (WebCore::V8NodeFilterCondition::V8NodeFilterCondition):
+ (WebCore::V8NodeFilterCondition::~V8NodeFilterCondition):
+ (WebCore::V8NodeFilterCondition::acceptNode):
+ * bindings/v8/V8ObjectEventListener.cpp:
+ (WebCore::weakObjectEventListenerCallback):
+ (WebCore::V8ObjectEventListener::~V8ObjectEventListener):
+ * bindings/v8/V8Proxy.cpp: Added.
+ * bindings/v8/V8Proxy.h:
+ (WebCore::):
+ (WebCore::GlobalHandleInfo::GlobalHandleInfo):
+ (WebCore::V8Proxy::):
+ (WebCore::V8Proxy::V8Proxy):
+ (WebCore::V8Proxy::frame):
+ (WebCore::V8Proxy::inlineCode):
+ (WebCore::V8Proxy::setInlineCode):
+ (WebCore::V8Proxy::timerCallback):
+ (WebCore::V8Proxy::setTimerCallback):
+ (WebCore::V8Proxy::setEventHandlerLineNumber):
+ (WebCore::V8Proxy::finishedWithEvent):
+ (WebCore::V8Proxy::wrapCPointer):
+ (WebCore::V8Proxy::extractCPointer):
+ (WebCore::V8Proxy::convertDOMWrapperToNative):
+ (WebCore::V8Proxy::convertDOMWrapperToNode):
+ (WebCore::V8Proxy::convertToV8Object):
+ (WebCore::V8Proxy::convertToNativeObject):
+ (WebCore::V8Proxy::convertToNativeEvent):
+ (WebCore::V8Proxy::context):
+ (WebCore::V8Proxy::extractCPointerImpl):
+ (WebCore::V8Proxy::utilityContext):
+ (WebCore::V8Proxy::constructDOMObject):
+ (WebCore::throwError):
+ (WebCore::toV8):
+ * bindings/v8/V8Utilities.h:
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::retrieve):
+ (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
+ (WebCore::WorkerContextExecutionProxy::GetConstructor):
+ (WebCore::WorkerContextExecutionProxy::ToV8Object):
+ (WebCore::WorkerContextExecutionProxy::EventToV8Object):
+ (WebCore::WorkerContextExecutionProxy::toV8):
+ (WebCore::WorkerContextExecutionProxy::forgetV8EventObject):
+ (WebCore::WorkerContextExecutionProxy::evaluate):
+ (WebCore::WorkerContextExecutionProxy::runScript):
+ * bindings/v8/custom/V8AttrCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasPixelArrayCustom.cpp:
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
+ (WebCore::toV8):
+ (WebCore::toCanvasStyle):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8ClientRectListCustom.cpp:
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8ClipboardCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8CustomBinding.cpp:
+ (WebCore::allowSettingFrameSrcToJavascriptUrl):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::INDEXED_ACCESS_CHECK):
+ (WebCore::NAMED_ACCESS_CHECK):
+ (WebCore::V8Custom::GetTargetFrame):
+ * bindings/v8/custom/V8CustomEventListener.cpp:
+ (WebCore::V8EventListener::V8EventListener):
+ (WebCore::V8EventListener::~V8EventListener):
+ (WebCore::V8EventListener::callListenerFunction):
+ * bindings/v8/custom/V8CustomSQLStatementCallback.cpp:
+ (WebCore::V8CustomSQLStatementCallback::handleEvent):
+ * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
+ (WebCore::V8CustomSQLStatementErrorCallback::handleEvent):
+ * bindings/v8/custom/V8CustomSQLTransactionCallback.cpp:
+ (WebCore::V8CustomSQLTransactionCallback::handleEvent):
+ * bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp:
+ (WebCore::V8CustomSQLTransactionErrorCallback::handleEvent):
+ * bindings/v8/custom/V8CustomVoidCallback.cpp:
+ (WebCore::V8CustomVoidCallback::handleEvent):
+ (WebCore::invokeCallback):
+ * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
+ (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
+ * bindings/v8/custom/V8DOMParserConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ (WebCore::V8Custom::WindowSetTimeoutImpl):
+ (WebCore::convertBase64):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::createWindow):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::V8Custom::ClearTimeoutImpl):
+ (WebCore::NAMED_ACCESS_CHECK):
+ (WebCore::INDEXED_ACCESS_CHECK):
+ * bindings/v8/custom/V8DatabaseCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8DocumentLocationCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8ElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::ACCESSOR_GETTER):
+ * bindings/v8/custom/V8EventCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::ACCESSOR_GETTER):
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
+ (WebCore::getNamedItems):
+ (WebCore::getItem):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::ACCESSOR_GETTER):
+ * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_SETTER):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::removeElement):
+ * bindings/v8/custom/V8InspectorControllerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8LocationCustom.cpp:
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_ACCESS_CHECK):
+ (WebCore::NAMED_ACCESS_CHECK):
+ * bindings/v8/custom/V8MessageChannelConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8MessagePortCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8NavigatorCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ * bindings/v8/custom/V8NodeCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8NodeIteratorCustom.cpp:
+ (WebCore::toV8):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8NodeListCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8SQLTransactionCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8SVGLengthCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8SVGMatrixCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8StyleSheetListCustom.cpp:
+ (WebCore::NAMED_PROPERTY_GETTER):
+ * bindings/v8/custom/V8TreeWalkerCustom.cpp:
+ (WebCore::toV8):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WebKitPointConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::SetTimeoutOrInterval):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::getEventListener):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::getEventListener):
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
+ (WebCore::ACCESSOR_GETTER):
+ (WebCore::ACCESSOR_SETTER):
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8XMLSerializerConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8XPathEvaluatorConstructor.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-06-26 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ <rdar://problem/7011047> Profiler shows the record button 'on' even
+ though it's finished
+
+ I consolidated the creation of the user initiated profile name into
+ its own function and then called it from console::profile instead of
+ calling startUserInitiatedProfiling(). This way we don't call
+ toggleRecordButton() which turns on the record button.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::didCommitLoad):
+ (WebCore::InspectorController::getCurrentUserInitiatedProfileName):
+ (WebCore::InspectorController::startUserInitiatedProfiling):
+ (WebCore::InspectorController::stopUserInitiatedProfiling):
+ * inspector/InspectorController.h:
+ * page/Console.cpp:
+ (WebCore::Console::profile):
+ (WebCore::Console::profileEnd):
+
+2009-06-26 Jeremy Moskovich <jeremy@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26691
+
+ Cleanup: Move focusRingColor to RenderTheme.
+
+ Most of this CL involves deleting files and removing dead code.
+
+ focusRingColor() is now defined in RenderTheme rather than in
+ misc. places on each port. The default color is specified as
+ black in renderTheme and ports can override it in their own
+ custom renderThemes.
+
+ Behavior should be identical except for the following cases,
+ this lists platform and what the focus ring color used to be
+ before this cl and the file where it used to be defined:
+
+ Android - red
+ WebCore/platform/android/TemporaryLinkStubs.cpp
+
+ Cairo - aqua focus ring color - 0xFF7DADD9
+ WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
+
+ wx - red
+ WebCore/platform/wx/TemporaryLinkStubs.cpp
+
+ QT - black
+ WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+
+ Manual test: manual-tests/focusringcolor-change-on-theme-change.html
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
+ * manual-tests/focusringcolor-change-on-theme-change.html: Added.
+ * platform/android/TemporaryLinkStubs.cpp:
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ * platform/graphics/chromium/ColorChromium.cpp: Removed.
+ * platform/graphics/chromium/ColorChromiumMac.mm: Removed.
+ * platform/graphics/mac/ColorMac.h:
+ * platform/graphics/mac/ColorMac.mm:
+ (WebCore::oldAquaFocusRingColor):
+ (WebCore::setUsesTestModeFocusRingColor):
+ (WebCore::usesTestModeFocusRingColor):
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::drawFocusRing):
+ * platform/graphics/win/ColorSafari.cpp: Removed.
+ * platform/wx/TemporaryLinkStubs.cpp:
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::focusRingColor):
+ * rendering/RenderTheme.h:
+ * rendering/RenderThemeChromiumMac.h:
+ * rendering/RenderThemeChromiumMac.mm:
+ (WebCore::RenderThemeChromiumMac::focusRingColor):
+ (WebCore::RenderThemeChromiumMac::systemColor):
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::focusRingColor):
+ * rendering/RenderThemeChromiumSkia.h:
+ * rendering/RenderThemeMac.h:
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::focusRingColor):
+ (WebCore::RenderThemeMac::systemColor):
+ * rendering/RenderThemeSafari.cpp:
+ (WebCore::makeRGBAFromCGColor):
+ (WebCore::RenderThemeSafari::focusRingColor):
+ * rendering/RenderThemeSafari.h:
+
+2009-06-26 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26761
+ [Chromium] Enable Dedicated Workers in Chromium.
+
+ * bindings/v8/custom/V8WorkerCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ Remove the check that prevented workers from being created w/o a command-line switch.
+ The flag itself and methods will be removed in a subsequent patch, after
+ corresponding change in Chromium.
+
+2009-06-26 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Fix: https://bugs.webkit.org/show_bug.cgi?id=26723
+ Where the m_mouseDown event was never being set on windows, so the
+ client X and Y coordinates were always being reported as zero in a
+ dragstart handler.
+
+ Test: editing/selection/drag-start-event-client-x-y.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleMousePressEvent):
+ Set the m_mouseDown event when the mouse press is handled.
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::mouseDown):
+ Removed now redundant setting of m_mouseDown.
+
+2009-06-26 Brady Eidson <beidson@apple.com>
+
+ Tiger build fix
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/network/mac/WebCoreURLResponse.mm:
+ (swizzleMIMETypeMethodIfNecessary):
+
+2009-06-26 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26681
+ Problem updating applicationCache when server returns 304
+
+ Improve the fix, make the test pass on Tiger.
+
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::ApplicationCacheGroup::didReceiveResponse): Fix another code path to remove the
+ current item from list.
+
+ * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::start): On Tiger,
+ conditional requests that cannot be cached by network layer cause errors with default cache
+ policy.
+
+2009-06-26 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig
+
+ <rdar://problem/6961578> REGRESSION (r43511): Opening .fdf files from Acrobat Professional fails
+
+ When we disabled content sniffing for file urls we lost knowledge of many file extensions that we
+ didn't intend to lose. Turns out the CoreTypes UTI database doesn't know about every extension Gatekeeper
+ knew about.
+
+ By comparing CoreTypes' database to Gatekeepers, this patch adds a hardcoded list of file extension to MIME
+ type mappings that are missing in CoreType's database.
+
+ Test: platform/mac/fast/loader/file-url-mimetypes.html
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Move the MIME Type swizzling code to
+ WebCoreURLResponse.
+
+ * platform/network/mac/ResourceResponseMac.mm:
+ (WebCore::ResourceResponse::platformLazyInit): _webcore_MIMEType -> MIMEType, as we now have only one place
+ where we do all MIMEType correction.
+
+ * platform/network/mac/WebCoreURLResponse.h: Remove _webcore_MIMEType, as it is now folded into the swizzled
+ implementation of MIMEType.
+ * platform/network/mac/WebCoreURLResponse.mm:
+ (createBinaryExtensionsSet):
+ (createExtensionToMIMETypeMap):
+ (swizzleMIMETypeMethodIfNecessary):
+ (webNSURLResponseMIMEType): If it's a file URL and there's no MIME type, see if the extension exists in the
+ extension -> MIME type map before turning to the default MIME type. Also roll in what was previously
+ implemented in _webcore_MIMEType.
+
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::~SVGImage): Tweak this ASSERT - SVGImages might get destroyed without ever having a client.
+
+2009-06-25 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Show the fullscreen button only if the backend has support for it.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26661
+
+ No test since this is not reachable via the DOM.
+
+ * html/HTMLMediaElement.h:
+ (WebCore::HTMLMediaElement::supportsFullscreen): new
+ * html/HTMLVideoElement.h:
+ (WebCore::HTMLVideoElement::supportsFullscreen): new
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::NullMediaPlayerPrivate::supportsFullscreen): new
+ (WebCore::MediaPlayer::supportsFullscreen): new
+ * platform/graphics/MediaPlayer.h: new
+ * platform/graphics/MediaPlayerPrivate.h: new
+ (WebCore::MediaPlayerPrivateInterface::supportsFullscreen): new
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlFullscreenButtonElement::rendererIsNeeded): new
+ * rendering/MediaControlElements.h:
+
+2009-06-25 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7007776> Controller doesn't automatically update counters when file
+ is playing ( http://www.jazzguitar.be/mp3/Michael%20Lewis%20-%20SSSJ.mp3 )
+
+ Update the time display when the movie time changes.
+
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::updateControls):
+
+2009-06-25 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26659
+
+ Support hidding a control bar element from the Media element controller.
+
+ Update layout tests since the fullscreen button no longer has a renderer.
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaTextDisplayElement::update): call updateStyle() so everything
+ is updated properly.
+ (WebCore::MediaControlInputElement::MediaControlInputElement):
+ (WebCore::MediaControlInputElement::update): call updateStyle()
+ (WebCore::MediaControlInputElement::updateStyle): create the renderer properly
+ or not depending on what rendererIsNeeded() return.
+ * rendering/MediaControlElements.h:
+
+2009-06-26 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/6968137> Profiler title numbers increment even after a
+ reload.
+
+ - Now the numbers are reset when the profiles are.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::didCommitLoad):
+
+2009-06-26 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for <rdar://problem/7000796>
+ REGRESSION(34681): Breaking up quoted text makes new, unquoted text blue after certain steps; repros with some messages
+
+ Test: editing/inserting/break-blockquote-after-delete.html
+
+ Keep track of whether the typing style should be preserved after the TypingCommand is applied. When adding onto an open
+ typing command, keep that flag up to date.
+
+ In this case, an InsertParagraphSeparatorInQuotedContent command, which should not preserve typing style,
+ was following an open Delete command, which does preserve the typing style. So we were applying the original
+ typing style (from before the delete, so blue text) to the cursor in the unquoted area after breaking up the blockquote.
+
+ * editing/TypingCommand.cpp:
+ (WebCore::TypingCommand::TypingCommand):
+ (WebCore::TypingCommand::typingAddedToOpenCommand):
+ (WebCore::TypingCommand::insertTextRunWithoutNewlines):
+ (WebCore::TypingCommand::insertLineBreak):
+ (WebCore::TypingCommand::insertParagraphSeparator):
+ (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
+ (WebCore::TypingCommand::deleteKeyPressed):
+ (WebCore::TypingCommand::forwardDeleteKeyPressed):
+ (WebCore::TypingCommand::deleteSelection):
+ (WebCore::TypingCommand::updatePreservesTypingStyle):
+ * editing/TypingCommand.h: (WebCore::TypingCommand::preservesTypingStyle):
+
+2009-06-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Add support for saving and loading of QWebHistory to and from a QByteArray.
+
+ This includes streaming operators for QWebHistory. for convenience.
+
+ New autotests that test QWebHistory and QWebHistoryItem serialization.
+
+ * WebCore.pro:
+ * history/HistoryItem.h:
+ (WebCore::HistoryItem::dailyVisitCounts):
+ (WebCore::HistoryItem::weeklyVisitCounts):
+ * history/qt/HistoryItemQt.cpp: Added.
+ (WebCore::HistoryItem::restoreState):
+ (WebCore::HistoryItem::saveState):
+
+2009-06-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Add support for QDataStream operators to String and IntPoint.
+
+ * platform/graphics/IntPoint.h:
+ (WebCore::operator<<):
+ (WebCore::operator>>):
+ * platform/text/PlatformString.h:
+ * platform/text/qt/StringQt.cpp:
+ (WebCore::operator<<):
+ (WebCore::operator>>):
+
+2009-06-26 Ben Murdoch <benm@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Add #if ENABLE(DOM_STORAGE) to the V8 custom bindings for local/session storage.
+ https://bugs.webkit.org/show_bug.cgi?id=26757
+
+ * bindings/v8/custom/V8StorageCustom.cpp
+
+2009-06-26 Yongjun Zhang <yongjun.zhang@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ Test: platform/qt/fast/events/event-sender-keydown-frame.html
+
+ Bug 20303: [Qt] Key events are not working in frames.
+
+ Merge scrolling handling code in qt and win port, move it to
+ EventHandler.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::scrollRecursively):
+ * page/EventHandler.h:
+
+2009-06-26 Rob Buis <rwlbuis@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26682
+ Bug 26682: It should be possible to add image to SVG DOM programmatically (using JavaScript)
+
+ Make sure the xlink:href animated property setting syncs the corresponding attribute with the right namespace.
+
+ Test: svg/custom/createImageElement.svg
+
+ * svg/SVGAnimatedProperty.h:
+ (WebCore::synchronizeProperty):
+
+2009-06-26 Takeshi Yoshino <tyoshino@google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Bug 26156: In view-source mode, always render the contents using HTMLViewSourceDocument
+ https://bugs.webkit.org/show_bug.cgi?id=26156
+
+ When in view-source mode, render the contents using HTMLViewSourceDocument
+ regardless it's applicable for any plugin or not.
+
+ Chromium tells WebCore to render the contents of specified URL when
+ view-source: prefix is added to the URL. But currently, DOMImplementation
+ ignores inViewSourceMode() when the MIME type is indicating that the contents
+ are neither texts nor HTML family documents.
+
+ For example, we can check the contents of asf file without launching media
+ player. Rendering contents for view-source:-specified input is not what user
+ expects.
+
+ http://code.google.com/p/chromium/issues/detail?id=10545
+
+ I want to fix this issue by this patch. IMHO, regardless of this Chromium
+ specific issue, I think we should force use of HTMLViewSourceDocument when
+ inViewSourceMode() is specified.
+
+ Test: fast/frames/viewsource-on-image-file.html
+
+ * dom/DOMImplementation.cpp:
+ (WebCore::DOMImplementation::createDocument):
+ * html/HTMLViewSourceDocument.cpp:
+ (WebCore::HTMLViewSourceDocument::createTokenizer):
+ * html/HTMLViewSourceDocument.h:
+
+2009-06-26 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25529
+ [Gtk] Expected states not exposed to assistive technologies
+
+ Add support for VISIBLE, EDITABLE and SENSITIVE states.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (setAtkStateSetFromCoreObject):
+
+2009-06-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ "Pointer to incomplete class type is not allowed" error with RVCT
+ https://bugs.webkit.org/show_bug.cgi?id=26721
+
+ Based on Norbert Leser's work.
+
+ * dom/Document.cpp:
+ (WebCore::Document::setFocusedNode):
+ * dom/Node.cpp:
+ (WebCore::Node::dispatchMouseEvent):
+ * dom/Node.h: Remove the default value for PassRefPtr<Event> args,
+ to eliminate dependency on the Event class definition
+
+2009-06-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ [Qt] Build fix after r45183
+ https://bugs.webkit.org/show_bug.cgi?id=26748
+
+ * WebCore.pro:
+
+2009-06-25 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26681
+ <rdar://problem/7003461> Problem updating applicationCache when server returns 304
+
+ Test: http/tests/appcache/update-cache.html
+
+ * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::didReceiveResponse):
+ We're already done with the resource, don't try to load it again.
+
+2009-06-25 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/6990481>
+
+ Handle perspective computation on non-layer objects.
+
+ Test: transforms/3d/general/perspective-non-layer.html
+
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::getTransformFromContainer):
+
+2009-06-25 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26653
+
+ Use flex box in the mediaControls.css style, to nicely scale if a button gets
+ dynamically added or removed.
+
+ Media tests results are affected by this changes.
+
+ * css/mediaControls.css:
+ * css/mediaControlsQT.css:
+
+2009-06-25 Albert J. Wong <ajwong@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26724
+
+ Move relavent part of setDefaultFontSize from RenderThemeChromiumWin
+ up into RenderThemeChromiumSkia.
+
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::setDefaultFontSize):
+ * rendering/RenderThemeChromiumSkia.h:
+ * rendering/RenderThemeChromiumWin.cpp:
+ (WebCore::RenderThemeChromiumWin::setDefaultFontSize):
+ * rendering/RenderThemeChromiumWin.h:
+
+2009-06-25 Matt Perry <mpcomplete@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26733
+
+ Add V8-only methods to FrameLoaderClient that V8 can use to send
+ out notifications when it creates/destroys a script context.
+
+ * loader/EmptyClients.h:
+ (WebCore::EmptyFrameLoaderClient::didCreateScriptContext):
+ (WebCore::EmptyFrameLoaderClient::didDestroyScriptContext):
+ * loader/FrameLoaderClient.h:
+ (WebCore::FrameLoaderClient::didCreateScriptContext):
+ (WebCore::FrameLoaderClient::didDestroyScriptContext):
+
+2009-06-25 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by David Levin.
+
+ Correct a few typos that snuck in when I was reformatting CodeGeneratorV8.pm
+ to match WebKit style.
+
+ * bindings/scripts/CodeGeneratorV8.pm: Corrected lots of typos.
+
+2009-06-25 Adam Langley <agl@google.com>
+
+ TBRed: fix for Chromium tree.
+
+ Add missing include for r45199.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26736
+
+ r45199 added a reference to throwError without including V8Proxy.h
+
+ * bindings/v8/WorkerScriptController.cpp:
+
+2009-06-25 Adam Langley <agl@google.com>
+
+ TBRed: fix for Chromium tree.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26735
+
+ Fix V8IsolatedWorld to point to the correct include file.
+
+ The deprecated v8_index.h was removed from the Chromium tree in r19291
+ and upstreamed into WebKit with r45193. However V8IsolatedWorld
+ slipped in between the cracks and broke the build.
+
+ * bindings/v8/V8IsolatedWorld.h: update with new header location.
+
+2009-06-25 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser <simon.fraser@apple.com>.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26651
+
+ Preference is named "WebKitAcceleratedCompositingEnabled"
+ and is a boolean value. When false, prevents compositing layers from
+ being created, which prevents hardware animation from running.
+ Also forces video to do software rendering. Added a cache for
+ the flag in RenderLayerCompositing and made it all work
+ on-the-fly when the flag is changed while a page is loaded.
+
+ * WebCore.base.exp:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::updateCompositingLayers):
+ * page/Settings.cpp:
+ (WebCore::setNeedsReapplyStylesInAllFrames):
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setAcceleratedCompositingEnabled):
+ * page/Settings.h:
+ (WebCore::Settings::acceleratedCompositingEnabled):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::hasAcceleratedCompositing):
+ (WebCore::RenderLayer::updateTransform):
+ (WebCore::RenderLayer::currentTransform):
+ * rendering/RenderLayer.h:
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateLayerTransform):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::RenderLayerCompositor):
+ (WebCore::RenderLayerCompositor::enableCompositingMode):
+ (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingEnabledFlag):
+ (WebCore::RenderLayerCompositor::updateCompositingLayers):
+ (WebCore::RenderLayerCompositor::canAccelerateVideoRendering):
+ (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
+ (WebCore::RenderLayerCompositor::needsToBeComposited):
+ (WebCore::RenderLayerCompositor::destroyRootPlatformLayer):
+ * rendering/RenderLayerCompositor.h:
+ (WebCore::RenderLayerCompositor::hasAcceleratedCompositing):
+ * rendering/RenderObject.h:
+ (WebCore::makeMatrixRenderable):
+
+2009-06-25 Jian Li <jianli@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Bug 26701: Implement the missing code for "FIXME: Need to return an
+ exception" in WorkerScriptController::evaluate for v8 bindings.
+ https://bugs.webkit.org/show_bug.cgi?id=26701
+
+ * bindings/v8/WorkerScriptController.cpp:
+ (WebCore::WorkerScriptController::evaluate):
+
+2009-06-25 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Upstream V8Index.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26495
+
+ * bindings/v8/V8Index.cpp: Added.
+ (WebCore::V8ClassIndex::GetFactory): Moved from src.chromium.org.
+ (WebCore::V8ClassIndex::GetCache): Moved from src.chromium.org.
+ * bindings/v8/V8Index.h:
+ (WebCore::V8ClassIndex::): Moved from src.chromium.org.
+ (WebCore::V8ClassIndex::ToInt): Moved from src.chromium.org.
+ (WebCore::V8ClassIndex::FromInt): Moved from src.chromium.org.
+
+2009-06-25 Adam Langley <agl@google.com>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26529
+
+ This is hopefully the last step before our renderers can run
+ cleanly in a chroot.
+
+ WebKit needs to be able to ask for the correct font to use in
+ the case that the current font doesn't include glyphs for
+ certain code points. Currently we make a fontconfig call in our
+ WebKit port to handle this.
+
+ This patch changes this so that the call is sent our via
+ ChromiumBridge.
+
+ http://codereview.chromium.org/132007
+
+ This should not affect any layout tests.
+
+ * platform/chromium/ChromiumBridge.h:
+ * platform/graphics/chromium/FontCacheLinux.cpp:
+ (WebCore::FontCache::getFontDataForCharacters):
+
+2009-06-25 Albert J. Wong <ajwong@chromium.org>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26566
+ Upstream these files from the chromium v8 code. No tests were
+ affected because this is essentially a code move.
+
+ * bindings/v8/NPV8Object.cpp: Added.
+ (allocV8NPObject):
+ (freeV8NPObject):
+ (listFromVariantArgs):
+ (npIdentifierToV8Identifier):
+ (npCreateV8ScriptObject):
+ (NPN_Invoke):
+ (NPN_InvokeDefault):
+ (NPN_Evaluate):
+ (NPN_EvaluateHelper):
+ (NPN_GetProperty):
+ (NPN_SetProperty):
+ (NPN_RemoveProperty):
+ (NPN_HasProperty):
+ (NPN_HasMethod):
+ (NPN_SetException):
+ (NPN_Enumerate):
+ (NPN_Construct):
+ * bindings/v8/NPV8Object.h: Added.
+ (PrivateIdentifier::):
+ * bindings/v8/V8NPUtils.cpp: Added.
+ (convertV8ObjectToNPVariant):
+ (convertNPVariantToV8Object):
+ (getStringIdentifier):
+ * bindings/v8/V8NPUtils.h: Added.
+
+2009-06-25 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26436
+
+ Windows Chromium bug fix: save context of destination canvas in
+ TransparencyWin::compositeTextComposite() before the function
+ modifies the context.
+
+ Test: fast/canvas/translate-text.html
+
+ * platform/graphics/chromium/TransparencyWin.cpp:
+ (WebCore::TransparencyWin::compositeTextComposite):
+
+2009-06-25 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Show the filename and first line for "(program)" in the Profiler/Debugger
+ https://bugs.webkit.org/show_bug.cgi?id=25475
+
+ Add support to associate a sourceURL with an eval()'d string
+ via a @sourceURL comment. Currently the sourceURL is only available
+ in the script debugger, not in the console or profiler, but it's
+ most needed in the script debugger.
+
+ * English.lproj/localizedStrings.js: added new "(program): %s" string
+ * inspector/front-end/Script.js:
+ (WebInspector.Script): if no sourceURL is available for the Script,
+ search for a comment of the form //@ sourceURL=(url) to use
+ as the sourceURL instead.
+ * manual-tests/inspector/named-evals.html: Added.
+
+2009-06-25 John Gregg <johnnyg@google.com>
+
+ Reviewed by Sam Weinig.
+
+ Bug 23721: Changing dropdown's selectedIndex within onchange handler fires another onchange
+ https://bugs.webkit.org/show_bug.cgi?id=23721
+
+ onchange events fire when a SELECT element has
+ focus and the selectedIndex is updated by script in some way--either
+ during another onchange, onkeypress, onfocus, or timer--and then
+ focus is lost.
+
+ Fixed by making a separate method for user-driven selectedIndex
+ changes, leaving scripts to use one which doesn't cause onchange to
+ be queued.
+
+ Test: fast/forms/select-script-onchange.html
+
+ * dom/SelectElement.cpp: check if the pending change is user driven
+ before calling onchange
+ (WebCore::SelectElement::menuListOnChange):
+ (WebCore::SelectElement::setSelectedIndex):
+ * dom/SelectElement.h: store whether the pending change is user driven
+ (WebCore::SelectElementData::userDrivenChange):
+ (WebCore::SelectElementData::setUserDrivenChange):
+ * html/HTMLSelectElement.cpp: split into two methods -- script version
+ [non-user-driven] corresponds to IDL defined property name
+ (WebCore::HTMLSelectElement::setSelectedIndex):
+ (WebCore::HTMLSelectElement::setSelectedIndexByUser):
+ * html/HTMLSelectElement.h:
+ * rendering/RenderMenuList.cpp: use ByUser method when coming through
+ the renderer
+ (WebCore::RenderMenuList::valueChanged):
+
+2009-06-25 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26698
+
+ Combined LocalStorageArea and SessionStorageArea into StorageArea since
+ (after my other refactorings) there are no longer substantial
+ differences between the two.
+
+ * GNUmakefile.am:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * storage/LocalStorage.cpp:
+ (WebCore::LocalStorage::storageArea):
+ * storage/LocalStorage.h:
+ * storage/LocalStorageArea.cpp: Removed.
+ * storage/LocalStorageArea.h: Removed.
+ * storage/SessionStorage.cpp:
+ (WebCore::SessionStorage::copy):
+ (WebCore::SessionStorage::storageArea):
+ * storage/SessionStorage.h:
+ * storage/SessionStorageArea.cpp: Removed.
+ * storage/SessionStorageArea.h: Removed.
+ * storage/StorageArea.cpp:
+ (WebCore::StorageArea::createLocalStorage):
+ (WebCore::StorageArea::StorageArea):
+ (WebCore::StorageArea::createSessionStorage):
+ (WebCore::StorageArea::copy):
+ (WebCore::StorageArea::setItem):
+ (WebCore::StorageArea::removeItem):
+ (WebCore::StorageArea::clear):
+ (WebCore::StorageArea::scheduleFinalSync):
+ (WebCore::StorageArea::blockUntilImportComplete):
+ (WebCore::StorageArea::dispatchStorageEvent):
+ * storage/StorageArea.h:
+ * storage/StorageAreaSync.cpp:
+ (WebCore::StorageAreaSync::StorageAreaSync):
+ (WebCore::StorageAreaSync::scheduleFinalSync):
+ (WebCore::StorageAreaSync::syncTimerFired):
+ (WebCore::StorageAreaSync::performImport):
+ * storage/StorageAreaSync.h:
+ * storage/StorageSyncManager.h:
+
+2009-06-25 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=26671
+ <rdar://problem/7001880> Safari 4.0 crashes in
+ WebCore::DOMTimer::fired()
+
+ Test: fast/dom/style-sheet-candidate-remove-unrendered-document.html
+
+ When a "style sheet candidate" element is removed from a document,
+ call Document::removeStyleSheetCandidateNode() regardless of whether
+ the document is rendered. Otherwise, the document's style sheet
+ candidate set can end up containing stale references.
+
+ * dom/ProcessingInstruction.cpp:
+ (WebCore::ProcessingInstruction::removedFromDocument):
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::removedFromDocument):
+ * html/HTMLStyleElement.cpp:
+ (WebCore::HTMLStyleElement::removedFromDocument):
+
+2009-06-25 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Update CodeGeneratorV8.pm to sync up with the changes downstream.
+
+ * bindings/scripts/CodeGeneratorV8.pm: Added HTMLFrameSetElement check,
+ FileList as a ref-counted type, and DataGridColumn as typeCanFailConversion.
+
+2009-06-25 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ Add FileList.h include to fix Chromium build.
+
+ * platform/chromium/ClipboardChromium.cpp: Added FileList.h include.
+
+2009-06-25 Joseph Pecoraro <joepeck02@gmail.com>
+
+ Reviewed by Jan Alonzo.
+
+ Bug 26489: Web Inspector: Typo in DatabaseQuery Error Message
+ https://bugs.webkit.org/show_bug.cgi?id=26489
+
+ Fixed a Typo in a Web Inspector error message.
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/DatabaseQueryView.js:
+ (WebInspector.DatabaseQueryView.prototype._queryError):
+
+2009-06-25 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Fix the Qt build, add missing StorageAreaSync files to the build.
+
+ * WebCore.pro:
+
+2009-06-25 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by and done with Tor Arne Vestbø.
+
+ Fix shortcut keyboard handling with plugins on the Qt/Mac build.
+
+ When we receive shortcut events like Ctrl+V then the text in the QKeyEvent is
+ empty. If we're asked to disambiguate the event into a Char keyboard event,
+ we try to detect this situation and still set the text, to ensure that the
+ general event handling sends a key press event after this disambiguation.
+
+ * platform/qt/PlatformKeyboardEventQt.cpp:
+ (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
+
+2009-06-25 Eric Seidel <eric@webkit.org>
+
+ Build fix only, no review.
+
+ Add FileList.h and NotImplemented.h includes in an attempt to fix bots.
+
+ * platform/gtk/ClipboardGtk.cpp:
+ * platform/qt/ClipboardQt.cpp:
+ * platform/win/ClipboardWin.cpp:
+ * platform/wx/ClipboardWx.cpp:
+
+2009-05-21 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Expose files in the clipboard in ondrop events
+ https://bugs.webkit.org/show_bug.cgi?id=25916
+
+ Make it possible for applications like gmail to implement
+ drag and drop of attachments onto email messages.
+
+ This patch exposes an event.dataTransfer.files accessor
+ on the drop event. No information is exposed during dragover.
+ This follows the HTML 5 drag and drop security model:
+ http://www.w3.org/TR/html5/editing.html#security-risks-in-the-drag-and-drop-model
+ The test http/tests/security/clipboard/clipboard-file-access.html
+ verifies this behavior.
+
+ Internet Explorer shows historical documentation of supporting
+ getData('File') as a way of exposing files on the pasteboard. The current version of their docs:
+ http://msdn.microsoft.com/en-us/library/ms537658(VS.85).aspx
+ has removed this reference (as far as I can tell IE never implemented it)
+ I have a printed copy of that URL from 2008 on my desk describing getData('File') in IE.
+ IE does not follow the HTML5 clipboard security model and always allows access to the full clipboard, even on dragover.
+
+ I choose not to use IE's getData('File') and instead added .files
+ so that the accessor could have a type, matching WebKit's existing
+ .files accessor on HTMLInputElement.
+
+ Mozilla has equivalent file access:
+ event.dataTransfer.mozGetDataAt("application/x-moz-file", 0);
+ which also does not return a typed value.
+ https://developer.mozilla.org/En/DragDrop/Recommended_Drag_Types#Dragging_Files
+
+ This is only implemented for Mac WebKit. All other platforms (including Apple's Win WebKit)
+ have incomplete Clipboard implementations and will require experts from those platforms
+ to add this functionality. Right now they all have Clipboard*::files() methods which call notImplemented();
+
+ Test: http/tests/security/clipboard/clipboard-file-access.html
+
+ * dom/Clipboard.h:
+ * dom/Clipboard.idl:
+ * platform/chromium/ClipboardChromium.cpp:
+ (WebCore::ClipboardChromium::files):
+ * platform/chromium/ClipboardChromium.h:
+ * platform/gtk/ClipboardGtk.cpp:
+ (WebCore::ClipboardGtk::files):
+ * platform/gtk/ClipboardGtk.h:
+ * platform/mac/ClipboardMac.h:
+ * platform/mac/ClipboardMac.mm:
+ (WebCore::absoluteURLsFromPasteboardFilenames):
+ (WebCore::absoluteURLsFromPasteboard):
+ (WebCore::ClipboardMac::files):
+ * platform/qt/ClipboardQt.cpp:
+ (WebCore::ClipboardQt::files):
+ * platform/qt/ClipboardQt.h:
+ * platform/win/ClipboardWin.cpp:
+ (WebCore::ClipboardWin::files):
+ * platform/win/ClipboardWin.h:
+ * platform/wx/ClipboardWx.cpp:
+ (WebCore::ClipboardWx::files):
+ * platform/wx/ClipboardWx.h:
+
+2009-06-25 Eric Seidel <eric@webkit.org>
+
+ No review, only completing revert of r45144.
+
+ Add back files deleted by r45144.
+
+ * storage/LocalStorageArea.cpp: Added.
+ (WebCore::LocalStorageArea::create):
+ (WebCore::LocalStorageArea::LocalStorageArea):
+ (WebCore::LocalStorageArea::scheduleFinalSync):
+ (WebCore::LocalStorageArea::itemChanged):
+ (WebCore::LocalStorageArea::itemRemoved):
+ (WebCore::LocalStorageArea::areaCleared):
+ (WebCore::LocalStorageArea::blockUntilImportComplete):
+ (WebCore::LocalStorageArea::dispatchStorageEvent):
+ * storage/LocalStorageArea.h: Added.
+ * storage/SessionStorageArea.cpp: Added.
+ (WebCore::SessionStorageArea::copy):
+ (WebCore::SessionStorageArea::SessionStorageArea):
+ (WebCore::SessionStorageArea::itemChanged):
+ (WebCore::SessionStorageArea::itemRemoved):
+ (WebCore::SessionStorageArea::areaCleared):
+ (WebCore::SessionStorageArea::blockUntilImportComplete):
+ (WebCore::SessionStorageArea::dispatchStorageEvent):
+ * storage/SessionStorageArea.h: Added.
+ (WebCore::SessionStorageArea::create):
+
+2009-06-25 Eric Seidel <eric@webkit.org>
+
+ No review, reverting r45144 only.
+
+ Roll out r45144 after 18 test failures appeared on the bots.
+ https://bugs.webkit.org/show_bug.cgi?id=26698
+
+ * GNUmakefile.am:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * storage/LocalStorage.cpp:
+ (WebCore::LocalStorage::storageArea):
+ * storage/LocalStorage.h:
+ * storage/SessionStorage.cpp:
+ (WebCore::SessionStorage::copy):
+ (WebCore::SessionStorage::storageArea):
+ * storage/SessionStorage.h:
+ * storage/StorageArea.cpp:
+ (WebCore::StorageArea::StorageArea):
+ (WebCore::StorageArea::~StorageArea):
+ (WebCore::StorageArea::setItem):
+ (WebCore::StorageArea::removeItem):
+ (WebCore::StorageArea::clear):
+ * storage/StorageArea.h:
+ * storage/StorageAreaSync.cpp:
+ (WebCore::StorageAreaSync::StorageAreaSync):
+ (WebCore::StorageAreaSync::scheduleFinalSync):
+ (WebCore::StorageAreaSync::syncTimerFired):
+ (WebCore::StorageAreaSync::performImport):
+ * storage/StorageAreaSync.h:
+ * storage/StorageSyncManager.h:
+
+2009-06-24 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26698
+
+ Combined LocalStorageArea and SessionStorageArea into StorageArea since
+ (after my other refactorings) there are no longer substantial
+ differences between the two.
+
+ * GNUmakefile.am:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * storage/LocalStorage.cpp:
+ (WebCore::LocalStorage::storageArea):
+ * storage/LocalStorage.h:
+ * storage/LocalStorageArea.cpp: Removed.
+ * storage/LocalStorageArea.h: Removed.
+ * storage/SessionStorage.cpp:
+ (WebCore::SessionStorage::copy):
+ (WebCore::SessionStorage::storageArea):
+ * storage/SessionStorage.h:
+ * storage/SessionStorageArea.cpp: Removed.
+ * storage/SessionStorageArea.h: Removed.
+ * storage/StorageArea.cpp:
+ (WebCore::StorageArea::createLocalStorage):
+ (WebCore::StorageArea::StorageArea):
+ (WebCore::StorageArea::createSessionStorage):
+ (WebCore::StorageArea::copy):
+ (WebCore::StorageArea::setItem):
+ (WebCore::StorageArea::removeItem):
+ (WebCore::StorageArea::clear):
+ (WebCore::StorageArea::scheduleFinalSync):
+ (WebCore::StorageArea::blockUntilImportComplete):
+ (WebCore::StorageArea::dispatchStorageEvent):
+ * storage/StorageArea.h:
+ * storage/StorageAreaSync.cpp:
+ (WebCore::StorageAreaSync::StorageAreaSync):
+ (WebCore::StorageAreaSync::scheduleFinalSync):
+ (WebCore::StorageAreaSync::syncTimerFired):
+ (WebCore::StorageAreaSync::performImport):
+ * storage/StorageAreaSync.h:
+ * storage/StorageSyncManager.h:
+
+2009-06-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ - fix <rdar://problem/7001817> REGRESSION (r41902): Base position track
+ at UCSC Genome Browser doesn't work because image map prevents img
+ from hit-testing
+
+ Test: fast/replaced/image-map-2.html
+
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::nodeAtPoint): Do not reset 'inside' to false if
+ the image map failed the hit test.
+
+2009-06-22 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26366
+
+ Refactor V8DOMMap to support isolated worlds.
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::evaluateInNewWorld):
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/V8DOMMap.cpp:
+ (WebCore::DOMDataStore::InternalDOMWrapperMap::InternalDOMWrapperMap):
+ (WebCore::DOMDataStore::allStores):
+ (WebCore::DOMDataStore::allStoresMutex):
+ (WebCore::DOMDataStore::domData):
+ (WebCore::ScopedDOMDataStore::ScopedDOMDataStore):
+ (WebCore::ScopedDOMDataStore::~ScopedDOMDataStore):
+ (WebCore::StaticDOMDataStore::StaticDOMDataStore):
+ (WebCore::):
+ (WebCore::MainThreadDOMData::MainThreadDOMData):
+ (WebCore::MainThreadDOMData::getStore):
+ (WebCore::ChildThreadDOMData::ChildThreadDOMData):
+ (WebCore::ChildThreadDOMData::getStore):
+ (WebCore::DOMDataStore::DOMDataStore):
+ (WebCore::DOMDataStore::~DOMDataStore):
+ (WebCore::DOMDataStoreHandle::DOMDataStoreHandle):
+ (WebCore::DOMDataStoreHandle::~DOMDataStoreHandle):
+ (WebCore::forget):
+ (WebCore::getDOMNodeMap):
+ (WebCore::getDOMObjectMap):
+ (WebCore::getActiveDOMObjectMap):
+ (WebCore::getDOMSVGElementInstanceMap):
+ (WebCore::getDOMSVGObjectWithContextMap):
+ (WebCore::DOMData::getCurrent):
+ (WebCore::DOMData::handleWeakObject):
+ (WebCore::DOMData::ensureDeref):
+ (WebCore::weakDOMObjectCallback):
+ (WebCore::weakActiveDOMObjectCallback):
+ (WebCore::weakNodeCallback):
+ (WebCore::weakSVGElementInstanceCallback):
+ (WebCore::weakSVGObjectWithContextCallback):
+ (WebCore::DOMData::derefObject):
+ (WebCore::DOMData::derefDelayedObjects):
+ (WebCore::DOMData::derefDelayedObjectsInCurrentThread):
+ (WebCore::DOMData::removeObjectsFromWrapperMap):
+ (WebCore::removeAllDOMObjectsInCurrentThreadHelper):
+ (WebCore::visitDOMNodesInCurrentThread):
+ (WebCore::visitDOMObjectsInCurrentThread):
+ (WebCore::visitActiveDOMObjectsInCurrentThread):
+ (WebCore::visitDOMSVGElementInstancesInCurrentThread):
+ (WebCore::visitSVGObjectsInCurrentThread):
+ * bindings/v8/V8DOMMap.h:
+ (WebCore::DOMDataStoreHandle::getStore):
+ * bindings/v8/V8IsolatedWorld.cpp: Added.
+ (WebCore::getIsolatedWorldKey):
+ (WebCore::contextWeakReferenceCallback):
+ (WebCore::V8IsolatedWorld::evaluate):
+ (WebCore::V8IsolatedWorld::V8IsolatedWorld):
+ (WebCore::V8IsolatedWorld::~V8IsolatedWorld):
+ (WebCore::V8IsolatedWorld::getEntered):
+ * bindings/v8/V8IsolatedWorld.h: Added.
+ (WebCore::V8IsolatedWorld::getDOMDataStore):
+
+2009-06-24 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Bug 26604: Search doesn't work in Web Inspector Profiler
+ https://bugs.webkit.org/show_bug.cgi?id=26604
+
+ Seems like search was damaged in revision 42808.
+
+ * inspector/front-end/ProfileView.js:
+ (WebInspector.ProfileView.prototype.refresh):
+ Here and in other functions: nodes we're searching in are profile data grid
+ nodes, so there is no more need for '_dataGridNode' references.
+ (WebInspector.ProfileView.prototype.searchCanceled):
+ (WebInspector.ProfileView.prototype.performSearch.matchesQuery):
+ Fixed accidental semicolon that caused 'matchesQuery' always return true.
+ (WebInspector.ProfileView.prototype.performSearch):
+ To perform search correctly in the case of bottom up tree, we need to populate
+ the tree, because there's no 1-to-1 correspondence between profile nodes and
+ data grid nodes in this case.
+ (WebInspector.ProfileView.prototype._jumpToSearchResult):
+
+2009-06-24 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6450239&6574516>
+
+ Fix flashing issues caused by compositing layers rendering content before
+ a deferred layout has happened. Because the -viewWillDraw machinery doesn't
+ work for composited layers, we need to use scheduleViewUpdate() to queue
+ up a layout via the run loop observer in WebKit, whenever we know we
+ are going to be painting soon.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::setContentsNeedDisplay):
+ (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
+
+2009-06-24 David Levin <levin@chromium.org>
+
+ Fix all builds.
+
+ * ForwardingHeaders/wtf/FastAllocBase.h: Added.
+
+2009-06-24 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26658
+
+ Split the syncing portions of LocalStorageArea into StorageAreaSync.
+ This name will make more sense in the next patch (in this set) when
+ LocalStorageArea and SessionStorageArea are merged to become simply
+ StorageArea. (Thus the synching portion of StorageArea is in
+ StorageAreaSync.)
+
+ This looks like a big patch, but really all it's doing is splitting
+ code and patching split-related things up.
+
+ * GNUmakefile.am:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * storage/LocalStorageArea.cpp:
+ (WebCore::LocalStorageArea::create):
+ (WebCore::LocalStorageArea::LocalStorageArea):
+ (WebCore::LocalStorageArea::scheduleFinalSync):
+ (WebCore::LocalStorageArea::itemChanged):
+ (WebCore::LocalStorageArea::itemRemoved):
+ (WebCore::LocalStorageArea::areaCleared):
+ (WebCore::LocalStorageArea::blockUntilImportComplete):
+ * storage/LocalStorageArea.h:
+ * storage/LocalStorageTask.cpp:
+ (WebCore::LocalStorageTask::LocalStorageTask):
+ * storage/LocalStorageTask.h:
+ (WebCore::LocalStorageTask::createImport):
+ (WebCore::LocalStorageTask::createSync):
+ * storage/LocalStorageThread.cpp:
+ (WebCore::LocalStorageThread::scheduleImport):
+ (WebCore::LocalStorageThread::scheduleSync):
+ * storage/LocalStorageThread.h:
+ * storage/SessionStorageArea.cpp:
+ (WebCore::SessionStorageArea::blockUntilImportComplete):
+ * storage/SessionStorageArea.h:
+ * storage/StorageArea.h:
+ * storage/StorageAreaSync.cpp: Copied from WebCore/storage/LocalStorageArea.cpp.
+ * storage/StorageAreaSync.h: Copied from WebCore/storage/LocalStorageArea.h.
+ * storage/StorageSyncManager.cpp:
+ (WebCore::StorageSyncManager::scheduleImport):
+ (WebCore::StorageSyncManager::scheduleSync):
+ * storage/StorageSyncManager.h:
+
+2009-06-24 Adam Treat <adam.treat@torchmobile.com>
+
+ Fix Qt build.
+
+ * WebCore.pro:
+
+2009-06-24 David Levin <levin@chromium.org>
+
+ Reviewed by David Hyatt.
+
+ Bug 26696: Member functions in DataGridColumnList should return pointers instead of PassRefPtr.
+ https://bugs.webkit.org/show_bug.cgi?id=26696
+
+ * html/DataGridColumnList.cpp:
+ (WebCore::DataGridColumnList::itemWithName):
+ (WebCore::DataGridColumnList::add):
+ * html/DataGridColumnList.h:
+ (WebCore::DataGridColumnList::item):
+ (WebCore::DataGridColumnList::primaryColumn):
+ (WebCore::DataGridColumnList::sortColumn):
+
+2009-06-24 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dave "Messy" Hyatt.
+
+ Little bit of style cleanup.
+
+ * html/DataGridColumn.cpp:
+ * html/DataGridColumn.h:
+ * html/DataGridColumn.idl:
+ * html/DataGridColumnList.cpp:
+ * html/DataGridColumnList.h:
+ * html/DataGridColumnList.idl:
+ * html/HTMLDataGridCellElement.cpp:
+ * html/HTMLDataGridCellElement.h:
+ * html/HTMLDataGridCellElement.idl:
+ * html/HTMLDataGridColElement.cpp:
+ * html/HTMLDataGridColElement.h:
+ * html/HTMLDataGridColElement.idl:
+ * html/HTMLDataGridElement.h:
+ * html/HTMLDataGridElement.idl:
+ * html/HTMLDataGridRowElement.cpp:
+ * html/HTMLDataGridRowElement.h:
+ * html/HTMLDataGridRowElement.idl:
+
+2009-06-24 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 26668: AX: need a way to retrieve the language for an element
+
+ Provides a way to retrieve the language associated with a specific accessibility element.
+
+ Test: accessibility/language-attribute.html
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::language):
+ * accessibility/AccessibilityObject.h:
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::language):
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+
+2009-06-24 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6893811> Instead of downloading files linked from Google Earth, file contents displayed in browser window as text.
+
+ * platform/network/mac/WebCoreURLResponse.mm:
+ (createBinaryExtensionsSet): Add '.kmz' to the list of known-to-be-binary extensions.
+
+2009-06-24 Nicolas Weber <thakis@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26685
+ Accomodate for backwards-incompatible skia api changes.
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::clearRect):
+ (WebCore::GraphicsContext::setCompositeOperation):
+ * platform/graphics/skia/ImageBufferSkia.cpp:
+ (WebCore::ImageBuffer::ImageBuffer):
+ * platform/graphics/skia/ImageSkia.cpp:
+ (WebCore::paintSkBitmap):
+ (WebCore::Image::drawPattern):
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::State::State):
+ (PlatformContextSkia::setupPaintCommon):
+ (PlatformContextSkia::setXfermodeMode):
+ (PlatformContextSkia::applyClipFromImage):
+ * platform/graphics/skia/PlatformContextSkia.h:
+ * platform/graphics/skia/SkiaUtils.cpp:
+ (WebCore::):
+ (WebCore::WebCoreCompositeToSkiaComposite):
+ * platform/graphics/skia/SkiaUtils.h:
+
+2009-06-24 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Gtk build fix. Add files that were added in r45093 and r45096
+
+ * GNUmakefile.am:
+
+2009-06-24 Brady Eidson <beidson@apple.com>
+
+ Fix 64-bit SnowLeopard build.
+
+ * html/DataGridColumnList.cpp:
+ (WebCore::DataGridColumnList::remove):
+ (WebCore::DataGridColumnList::move):
+
+2009-06-24 Rob Buis <rwlbuis@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26392
+ Bug 26392: In html, modification of xlink:href of an newly inserted svg image does not work.
+ https://bugs.webkit.org/show_bug.cgi?id=26328
+ Bug 26328: changing href attribute of svg images does not work when changing display attribute as well
+
+ React to href updates even when there is no renderer, i.e. display=none.
+
+ Tests: svg/custom/js-update-image-and-display.svg
+ svg/custom/js-update-image-and-display2.svg
+ svg/custom/js-update-image-and-display3.svg
+
+ * svg/SVGImageElement.cpp:
+ (WebCore::SVGImageElement::svgAttributeChanged):
+
+2009-06-24 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26687
+
+ Add basic back-end column support to datagrid.
+
+ Added fast/dom/HTMLDataGridElement/ column tests.
+
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * html/DataGridColumn.cpp: Added.
+ (WebCore::DataGridColumn::setPrimary):
+ * html/DataGridColumn.h: Added.
+ (WebCore::DataGridColumn::create):
+ (WebCore::DataGridColumn::id):
+ (WebCore::DataGridColumn::setId):
+ (WebCore::DataGridColumn::label):
+ (WebCore::DataGridColumn::setLabel):
+ (WebCore::DataGridColumn::type):
+ (WebCore::DataGridColumn::setType):
+ (WebCore::DataGridColumn::sortable):
+ (WebCore::DataGridColumn::setSortable):
+ (WebCore::DataGridColumn::sortDirection):
+ (WebCore::DataGridColumn::setSortDirection):
+ (WebCore::DataGridColumn::primary):
+ (WebCore::DataGridColumn::detachFromColumnList):
+ (WebCore::DataGridColumn::DataGridColumn):
+ * html/DataGridColumn.idl: Added.
+ * html/DataGridColumnList.cpp: Added.
+ (WebCore::DataGridColumnList::~DataGridColumnList):
+ (WebCore::DataGridColumnList::itemWithName):
+ (WebCore::DataGridColumnList::add):
+ (WebCore::DataGridColumnList::remove):
+ (WebCore::DataGridColumnList::move):
+ (WebCore::DataGridColumnList::clear):
+ (WebCore::DataGridColumnList::primaryColumnChanged):
+ * html/DataGridColumnList.h: Added.
+ (WebCore::DataGridColumnList::create):
+ (WebCore::DataGridColumnList::length):
+ (WebCore::DataGridColumnList::item):
+ (WebCore::DataGridColumnList::primaryColumn):
+ (WebCore::DataGridColumnList::sortColumn):
+ * html/DataGridColumnList.idl: Added.
+ * html/HTMLDataGridColElement.cpp:
+ (WebCore::HTMLDataGridColElement::sortable):
+ (WebCore::HTMLDataGridColElement::setSortable):
+ (WebCore::HTMLDataGridColElement::sortDirection):
+ (WebCore::HTMLDataGridColElement::setSortDirection):
+ * html/HTMLDataGridColElement.h:
+ * html/HTMLDataGridColElement.idl:
+ * html/HTMLDataGridElement.cpp:
+ (WebCore::HTMLDataGridElement::HTMLDataGridElement):
+ * html/HTMLDataGridElement.h:
+ (WebCore::HTMLDataGridElement::columns):
+ * html/HTMLDataGridElement.idl:
+ * rendering/RenderDataGrid.cpp:
+ (WebCore::RenderDataGrid::paintObject):
+ (WebCore::RenderDataGrid::paintColumnHeaders):
+ (WebCore::RenderDataGrid::rebuildColumns):
+ * rendering/RenderDataGrid.h:
+ (WebCore::RenderDataGrid::gridElement):
+
+2009-06-24 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Partially fixes: https://bugs.webkit.org/show_bug.cgi?id=24735
+ (<rdar://problem/5015942>)
+ Where on windows it was not possible to set an element as the drag
+ image using setDragImage on the dataTransfer object.
+
+ Does not "fix" the case of dragging a link where the default link image
+ is still used, even when the -webkit-user-drag is set to "element". This
+ is the same behavior as is found on OS X.
+
+ Added a manual test because it is not possible to check that what is
+ contained in the image snapshot is indeed the requested element.
+
+ * dom/Clipboard.h:
+ (WebCore::Clipboard::dragImageElement):
+ Made getting the raw pointer from the RefPtr a const operation.
+ * manual-tests/drag-with-div-or-image-as-data-image.html: Added.
+ * platform/win/ClipboardWin.cpp:
+ (WebCore::ClipboardWin::createDragImage):
+ Get an image of the rendered element and its subtree.
+
+2009-06-24 Darin Fisher <darin@chromium.org>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26683
+ Fix Chromium build bustage: Add custom binding for HTMLDataGridElement.dataSource
+
+ This change just adds a stub implementation for now to help fix the build.
+
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8HTMLDataGridElementCustom.cpp: Added.
+
+2009-06-24 David Kilzer <ddkilzer@apple.com>
+
+ Build fixes for ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+
+ Reviewed by Adam Roben.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::deliverNotification): Removed
+ ExceptionCode parameter from togglePlayState().
+ (WebCore::HTMLMediaElement::initialURL): Don't convert a KURL
+ object to a String when assigning to a KURL variable.
+
+2009-06-24 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ Save memory by not storing attribute values in member variables, if not absolutely needed.
+ Also fixes bugs where we're substituting variables too early (noticeable with the upcoming <select> element).
+
+ * wml/WMLDoElement.cpp:
+ (WebCore::WMLDoElement::parseMappedAttribute):
+ (WebCore::WMLDoElement::label):
+ * wml/WMLDoElement.h:
+ * wml/WMLFieldSetElement.cpp:
+ (WebCore::WMLFieldSetElement::insertedIntoDocument):
+ * wml/WMLFieldSetElement.h:
+ * wml/WMLOptGroupElement.cpp:
+ (WebCore::WMLOptGroupElement::title):
+ (WebCore::WMLOptGroupElement::parseMappedAttribute):
+ (WebCore::WMLOptGroupElement::groupLabelText):
+ * wml/WMLOptGroupElement.h:
+ * wml/WMLPostfieldElement.cpp:
+ (WebCore::WMLPostfieldElement::name):
+ (WebCore::WMLPostfieldElement::value):
+ (WebCore::WMLPostfieldElement::encodeData):
+ * wml/WMLPostfieldElement.h:
+ * wml/WMLSetvarElement.cpp:
+ (WebCore::WMLSetvarElement::parseMappedAttribute):
+ (WebCore::WMLSetvarElement::name):
+ (WebCore::WMLSetvarElement::value):
+ * wml/WMLSetvarElement.h:
+ * wml/WMLTimerElement.cpp:
+ (WebCore::WMLTimerElement::parseMappedAttribute):
+ (WebCore::WMLTimerElement::insertedIntoDocument):
+ (WebCore::WMLTimerElement::timerFired):
+ (WebCore::WMLTimerElement::start):
+ (WebCore::WMLTimerElement::value):
+ * wml/WMLTimerElement.h:
+
+2009-06-24 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by Adam Roben.
+
+ Forgot to initialize m_task member variable. Results in crashes sometimes.
+
+ * wml/WMLAnchorElement.cpp:
+ (WebCore::WMLAnchorElement::WMLAnchorElement):
+
+2009-06-24 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Not reviewed. Forgot to include within last patch.
+
+ * manual-tests/wml/card-title-attr.wml: Added.
+
+2009-06-24 Wajahat Siddiqui <wajahatmeister@gmail.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Fixes: https://bugs.webkit.org/show_bug.cgi?id=26474
+ Adding WML <card> title attribute handling.
+
+ * wml/WMLElement.h: marking parseValueSubstitutingVariableReferences and parseValueForbiddingVariableReferences as const
+ * wml/WMLElement.cpp:
+ * wml/WMLCardElement.h:
+ (WebCore::WMLCardElement::title):
+ * wml/WMLCardElement.cpp:
+ * wml/manual-test/card-title-attr.wml: Manual test
+
+2009-06-24 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Fix the build without ENABLE_VIDEO.
+
+ * html/CanvasRenderingContext2D.cpp: Add #if ENABLE guards.
+ * html/CanvasRenderingContext2D.h: Ditto.
+
+2009-06-24 Siddhartha Chattopadhyay <sidchat@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=26200 which I introduced earlier. I had
+ the smartReplace set TRUE initially, which was wrong since the purpose of this call is
+ to just replace the selection, and place the caret at the end of the selection it replaced.
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::markMisspellingsAfterTypingToPosition):
+ * manual-tests/textarea-caret-position-after-auto-spell-correct.html: Added.
+
+2009-06-24 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Don't use an unsigned int for intervalInMS because we sometimes initialize
+ it with a negative value.
+
+ * platform/wx/SharedTimerWx.cpp:
+ (WebCore::setSharedTimerFireTime):
+
+2009-06-24 Eric Seidel <eric@webkit.org>
+
+ No review, build fix only.
+
+ The previous checkin had an improper merge. This fixes the build.
+
+ * page/DragController.cpp:
+ (WebCore::DragController::tryDocumentDrag):
+
+2009-06-05 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25922
+ JS setting dropEffect = "none" causes tryDHTMLDrag
+ to return DragOperationNone. Which is also the value
+ tryDHTMLDrag previously used to indicate JS did not
+ want to handle the drag.
+
+ Make it possible for the DragController::try* methods
+ to return a bool to indicate if javascript accepted
+ or rejected the drag event, separate from the DragOperation.
+
+ Tests:
+ - fast/events/drag-to-navigate.html
+ - fast/events/prevent-drag-to-navigate.html
+
+ * page/DragController.cpp:
+ (WebCore::DragController::dragEnteredOrUpdated):
+ (WebCore::DragController::tryDocumentDrag):
+ (WebCore::defaultOperationForDrag):
+ (WebCore::DragController::tryDHTMLDrag):
+ * page/DragController.h:
+
+2009-06-23 Oliver Hunt <oliver@apple.com> and Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Sam Weinig and Dave Hyatt.
+
+ <rdar://problem/6164797> Add Canvas API to allow drawing of <video> frames
+ <https://bugs.webkit.org/show_bug.cgi?id=25920>
+
+ Add support for drawing the contents of the video element to the canvas
+ in accordance with the current HTML5 draft.
+
+ Test: media/video-canvas.html
+
+ * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
+ (WebCore::JSCanvasRenderingContext2D::drawImage):
+ Standard custom bindings stuff we need to do for all canvas methods.
+ * html/CanvasRenderingContext2D.cpp:
+ (WebCore::size): Helper function for finding the size of a video element
+ (WebCore::CanvasRenderingContext2D::checkOrigin): moved up in the file.
+ (WebCore::CanvasRenderingContext2D::drawImage): The various overloads of HTML5's drawImage(<video>)
+ * html/CanvasRenderingContext2D.h:
+ * html/HTMLMediaElement.h:
+ (WebCore::HTMLMediaElement::hasSingleSecurityOrigin):
+ hasSingleSecurityOrigin is needed for security, currently all implementations are trivial
+ as we force QT to maintain a single origin.
+ * html/HTMLVideoElement.cpp:
+ (WebCore::HTMLVideoElement::paint):
+ Paint routine on video so we don't have to look at MediaPlayer directly
+ * html/HTMLVideoElement.h:
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::NullMediaPlayerPrivate::hasSingleSecurityOrigin):
+ (WebCore::MediaPlayer::hasSingleSecurityOrigin):
+ Default implementations of hasSingleSecurityOrigin
+ * platform/graphics/MediaPlayer.h:
+ * platform/graphics/MediaPlayerPrivate.h:
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::setUpVideoRendering):
+ A video may need a player now even if it is not visible.
+ (WebCore::MediaPlayerPrivate::hasSingleSecurityOrigin):
+ Always return true due to restrictions we've placed on QT.
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+ (WebCore::MediaPlayerPrivate::paint):
+ Jump through some hoops to allow windows QT to draw to an intermediate buffer.
+ In the long term we'd like to cache the HDC, but this will do for now.
+ (WebCore::MediaPlayerPrivate::hasSingleSecurityOrigin):
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
+ As for Mac we force QT to only allow same origin loads.
+
+2009-06-23 Adam Langley <agl@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Chromium: Fix crash with inherited font-size in <option>
+
+ https://bugs.webkit.org/show_bug.cgi?id=26656
+ http://code.google.com/p/chromium/issues/detail?id=14853
+
+ In r42597 (https://bugs.webkit.org/show_bug.cgi?id=25244), I changed
+ the <select> handing for Chromium to fix a rendering bug. However,
+ although the font-size is correctly ignored, getRowHeight wasn't
+ updated and so was calculating the height of the rows in an
+ inconsistent manner. This can lead to a crash.
+
+ * manual-tests/optgroup-empty-and-nested.html: adding test case for crash
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::getRowHeight):
+
+2009-06-23 Brady Eidson <beidson@apple.com>
+
+ Patch by Antti Koivisto.
+ Reviewed by Brady Eidson.
+
+ <rdar://problem/6988010> Failed resources not reloaded when built against Tiger SDK
+
+ A latent bug that cache revalidation uncovered. When a CachedResource failed to load,
+ it should always be revalidated upon reload.
+
+ * loader/CachedResource.cpp:
+ (WebCore::CachedResource::canUseCacheValidator):
+ (WebCore::CachedResource::mustRevalidate):
+
+2009-06-23 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - fix <rdar://problem/6634228> Crash in [NSScroller mouseDown:] beneath
+ EventHandler::passMouseDownEventToWidget()
+
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::passMouseDownEventToWidget): Surround the
+ -mouseDown: call with calls to Widget::beforeMouseDown() and
+ Widget::afterMouseDown(), which prevent the widget's view hierarchy from
+ being removed from its parent view while the scroller is tracking the
+ mouse.
+
+2009-06-23 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dave Hyatt.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=26516
+ Add initial implementation of DataGridDataSource
+
+ - Initial implementation only supports the initialize callback function.
+
+ Test: fast/dom/HTMLDataGridElement/DataGridDataSource-basic.html
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * bindings/js/JSDataGridDataSource.cpp: Added.
+ (WebCore::JSDataGridDataSource::JSDataGridDataSource):
+ (WebCore::JSDataGridDataSource::~JSDataGridDataSource):
+ (WebCore::JSDataGridDataSource::initialize):
+ * bindings/js/JSDataGridDataSource.h: Added.
+ (WebCore::JSDataGridDataSource::create):
+ (WebCore::JSDataGridDataSource::isJSDataGridDataSource):
+ (WebCore::JSDataGridDataSource::jsDataSource):
+ (WebCore::asJSDataGridDataSource):
+ * bindings/js/JSHTMLDataGridElementCustom.cpp: Added.
+ (WebCore::JSHTMLDataGridElement::listener):
+ (WebCore::JSHTMLDataGridElement::setListener):
+ * html/DataGridDataSource.h: Added.
+ (WebCore::DataGridDataSource::~DataGridDataSource):
+ (WebCore::DataGridDataSource::isJSDataGridDataSource):
+ * html/HTMLDataGridElement.cpp:
+ (WebCore::HTMLDataGridElement::HTMLDataGridElement):
+ (WebCore::HTMLDataGridElement::setDataSource):
+ (WebCore::HTMLDataGridElement::initializationTimerFired):
+ * html/HTMLDataGridElement.h:
+ (WebCore::HTMLDataGridElement::dataSource):
+ * html/HTMLDataGridElement.idl:
+
+2009-06-23 Ryosuke Niwa <rniwa@google.com>
+
+ Reviewed by Justin Garcia.
+
+ Undo the changeset 21212 to fix the regression bug 14062.
+ The changeset 21212 attempted to fix rdar://problem/5002441.
+ The changeset 21212 modified InsertTextCommand::input so as to convert
+ all spaces in text to non-breaking spaces for rdar://problem/5002441.
+ However, the bug was originally caused by rebalanceWhitespaceAt
+ and this workaround introduced a regression bug 14062.
+ Because rebalanceWhitespaceAt appears to behave correctly now,
+ the workaround introduced in 21212 is no longer needed.
+
+ Test: editing/inserting/space-after-removeformat.html
+
+ * editing/InsertTextCommand.cpp:
+ (WebCore::InsertTextCommand::input):
+
+2009-06-23 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=26523 <col>
+ elements width can't be changed with javascript
+
+ This patch both fixes setting the width attribute directly in
+ JavaScript, and setting the width on the style attribute.
+
+ * html/HTMLTableColElement.cpp:
+ (WebCore::HTMLTableColElement::parseMappedAttribute): If we have a
+ new width, call setNeedsLayoutAndPrefWidthsRecalc()
+
+ Call calcPrefWidths() on the table cols.
+ * rendering/AutoTableLayout.cpp:
+ (WebCore::AutoTableLayout::recalcColumn):
+ * rendering/FixedTableLayout.cpp:
+ (WebCore::FixedTableLayout::calcWidthArray):
+
+ Call layoutIfNeeded on the table cols.
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::layout):
+
+ * rendering/RenderTableCol.cpp:
+ (WebCore::RenderTableCol::clippedOverflowRectForRepaint): Use new
+ table() convenience function.
+ (WebCore::RenderTableCol::calcPrefWidths): Just call
+ setPrefWidthsDirty(false) on ourself and our children.
+ (WebCore::RenderTableCol::table):
+ * rendering/RenderTableCol.h:
+
+2009-06-23 Ojan Vafai <ojan@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ Add logic to CSSStyleDeclaration::diff to deal with font-sizes that are
+ keyword values. When diff is called on a CSSStyleDeclaration, we check
+ the keywordSize to see if font-size matches a keyword value.
+
+ This ensures that when we diff a CSSMutableStyleDeclaration returned from
+ copyInheritableProperties on a CSSComputedStyleDeclaration that we
+ correctly identify matching font-sizes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26279
+
+ Test: editing/inserting/font-size-clears-from-typing-style.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
+ * css/CSSComputedStyleDeclaration.h:
+ * css/CSSStyleDeclaration.cpp:
+ (WebCore::CSSStyleDeclaration::cssPropertyMatches):
+ (WebCore::CSSStyleDeclaration::diff):
+ * css/CSSStyleDeclaration.h:
+
+2009-06-23 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6994790> CrashTracer: [USER] 8 crashes in Mail trying to
+ add a blank line to pasted Facebook content (under
+ CompositeEditCommand::positionAvoidingSpecialElementBoundary)
+
+ - Just added null checks and I will create a new bug to prevent the
+ bad behavior.
+
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
+
+2009-06-23 Simon Fraser <simon.fraser@apple.com>
+
+ Build fix.
+
+ Wrap shouldDoSoftwarePaint() in #if USE(ACCELERATED_COMPOSITING) to avoid warning when
+ ACCELERATED_COMPOSITING is not defined.
+
+ * rendering/RenderLayer.cpp:
+
+2009-06-23 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24863
+
+ Fix reflection painting on elements with compositing layers.
+
+ Test: compositing/reflections/reflection-on-composited.html
+
+ * rendering/RenderLayer.h:
+ Add a new PaintLayerPaintingReflection flag which is set while painting inside
+ reflections.
+ (WebCore::RenderLayer::setPaintingInsideReflection):
+ Add a setter so that RenderLayerBacking can call it.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::shouldDoSoftwarePaint):
+ Utility to clarify the logic of when a composited layer should do a software paint.
+
+ (WebCore::RenderLayer::paintLayer):
+ Use shouldDoSoftwarePaint() to determine when to software-paint a reflected layer.
+ Remove transform-related tests from the reflection-painting if test because they appear
+ to be unnecessary.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::paintIntoLayer):
+ Add the code to paint reflections to the composited layer painting method.
+
+ * rendering/RenderReplica.cpp:
+ (WebCore::RenderReplica::paint):
+ Set the PaintLayerPaintingReflection flag.
+
+2009-06-23 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26643
+ Memory cache should respect Cache-Control: no-store
+
+ Make resources with Cache-Control: no-store uncacheable in the memory cache.
+ They get evicted immediately when all clients are gone and are always
+ reloaded from the server.
+
+ Conforms to RFC2616 14.9.2 and seems also match Firefox behavior.
+
+ * loader/CachedResource.cpp:
+ (WebCore::CachedResource::removeClient):
+ (WebCore::CachedResource::canUseCacheValidator):
+ (WebCore::CachedResource::mustRevalidate):
+ * platform/network/ResourceResponseBase.cpp:
+ (WebCore::ResourceResponseBase::ResourceResponseBase):
+ (WebCore::ResourceResponseBase::parseCacheControlDirectives):
+ (WebCore::ResourceResponseBase::cacheControlContainsNoStore):
+ * platform/network/ResourceResponseBase.h:
+
+2009-06-23 Brady Eidson <beidson@apple.com>
+
+ Windows build fix.
+
+ * platform/graphics/win/QTMovieWin.cpp:
+ (QTMovieWin::play):
+ (QTMovieWin::pause):
+ (QTMovieWin::setRate):
+ (QTMovieWin::setCurrentTime):
+
+2009-06-23 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ <rdar://problem/6902203> REGRESSION: 'Return' insertion point incorrect
+ after manually quoting blank line then hitting return
+
+ If the insertion point is both the begining and ending visible position
+ then we need to insert at the end instead of the begining, which is what
+ would normally happen if the insertion point was as the begining.
+
+ * editing/BreakBlockquoteCommand.cpp:
+ (WebCore::BreakBlockquoteCommand::doApply):
+
+2009-06-23 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig, and looked over by Eric Carlson.
+
+ <rdar://problem/6980466> Media elements should provide option for changing pitch correction
+
+ Introduce a new boolean property to HTMLMediaElement called webkitPreservesPitch for script to control this.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::HTMLMediaElement): Currently the platforms that have a flexible pitch preservation
+ property (Quicktime on Mac and Win) have had it on by default, so continue that default for now.
+ (WebCore::HTMLMediaElement::loadResource):
+ (WebCore::HTMLMediaElement::webkitPreservesPitch):
+ (WebCore::HTMLMediaElement::setWebkitPreservesPitch):
+ * html/HTMLMediaElement.h:
+ * html/HTMLMediaElement.idl:
+
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::NullMediaPlayerPrivate::setPreservesPitch):
+ (WebCore::MediaPlayer::MediaPlayer):
+ (WebCore::MediaPlayer::preservesPitch):
+ (WebCore::MediaPlayer::setPreservesPitch):
+ * platform/graphics/MediaPlayer.h:
+ * platform/graphics/MediaPlayerPrivate.h:
+ (WebCore::MediaPlayerPrivateInterface::setPreservesPitch):
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::createQTMovie): Rework to allow recreation of the movie with almost the
+ exact same attributes as before, with pitch preservation being the difference.
+ (WebCore::MediaPlayerPrivate::setPreservesPitch): Recreate the QTMovie if the flag actually changes.
+ (WebCore::MediaPlayerPrivate::updateStates): Restore current time and rate if this is a recreated movie.
+ (WebCore::MediaPlayerPrivate::timeChanged): Clear the time-to-be-restored, as this callback means it
+ has been effectively overwritten.
+
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+ (WebCore::MediaPlayerPrivate::load):
+ (WebCore::MediaPlayerPrivate::setPreservesPitch):
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
+ * platform/graphics/win/QTMovieWin.cpp:
+ (QTMovieWinPrivate::QTMovieWinPrivate):
+ (QTMovieWinPrivate::~QTMovieWinPrivate):
+ (QTMovieWinPrivate::task): Restore current time and rate if this is a re-created movie.
+ (QTMovieWin::play): Clear the time-to-be-restored, as this effectively overwrites it.
+ (QTMovieWin::pause): Ditto.
+ (QTMovieWin::setRate): Ditto.
+ (QTMovieWin::setCurrentTime): Ditto.
+ (QTMovieWin::setPreservesPitch): Recreate the Movie if the flag actually changes.
+ (QTMovieWin::load): Rework to allow recreation of the Movie with similar state as the movie before it,
+ but changing the pitch preservation flag.
+ * platform/graphics/win/QTMovieWin.h:
+
+2009-06-23 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/6998286> Crash after leaving page with <video>
+
+ Don't try to post events after going into the page cache.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::documentWillBecomeInactive): Cancel pending events and stop
+ event timers so we won't try to post events after going into the cache.
+
+2009-06-23 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Brady Eidson.
+
+ Simplify the interaction between LocalStorageArea/SessionStorageArea
+ and StorageArea by creating a "blockUntilImportComplete()" function
+ rather than bouncing back and forth between the child and parent
+ classes in a somewhat unintuitive manner.
+
+ This patch also paves the way for LocalStorageArea and
+ SessionStorageArea being merged into one. It's part of several in a
+ set which are separating syncing (to disk) code from the rest of the
+ implementation so that local storage and session storage's code can be
+ unified.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25376
+
+ * storage/LocalStorageArea.cpp:
+ (WebCore::LocalStorageArea::blockUntilImportComplete):
+ * storage/LocalStorageArea.h:
+ * storage/StorageArea.cpp:
+ (WebCore::StorageArea::length):
+ (WebCore::StorageArea::key):
+ (WebCore::StorageArea::getItem):
+ (WebCore::StorageArea::setItem):
+ (WebCore::StorageArea::removeItem):
+ (WebCore::StorageArea::clear):
+ (WebCore::StorageArea::contains):
+ * storage/StorageArea.h:
+ (WebCore::StorageArea::blockUntilImportComplete):
+
+2009-06-23 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt
+
+ First part of https://bugs.webkit.org/show_bug.cgi?id=26652
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::paint):
+ (WebCore::RenderLayer::paintLayer):
+ * rendering/RenderLayer.h:
+ (WebCore::RenderLayer::):
+ * rendering/RenderReplica.cpp:
+ (WebCore::RenderReplica::paint):
+ Replace the 3 boolean params to RenderLayer::paintLayer() with a bit mask for readability.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::paintIntoLayer):
+ (WebCore::RenderLayerBacking::paintContents):
+ * rendering/RenderLayerBacking.h:
+ Remove the unused 'haveTransparency' param to paintIntoLayer().
+
+2009-06-23 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6997929> Assertion at WebCore::RenderLayer::updateClipRects with hardware acceleration
+
+ The updatingControlTints() painting pass goes through compositing layer boundaries,
+ so we need to ensure we don't cache clip rects computed with the wrong root by
+ setting temporaryClipRects to true.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::paintLayer):
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
+ Remove a printf that I left in by mistake.
+
+2009-06-23 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ WebCore side of <rdar://problem/6946094>.
+
+ * platform/win/ClipboardWin.cpp:
+ (WebCore::ClipboardWin::setExternalDataObject):
+ * platform/win/ClipboardWin.h:
+
+2009-06-23 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26650
+
+ Add setFormContentType and setFormData since it is awkward for Chromium
+ to use setFormInfoFromRequest to set the underlying members. Also, add
+ a clearChildren method that Chromium needs. These methods are used as
+ part of the Chromium code that serializes a HistoryItem for storing in
+ the browser's session history.
+
+ * history/HistoryItem.cpp:
+ * history/HistoryItem.h:
+
+2009-06-23 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6978938> Need HTML 5 event attributes for media elements
+
+ Test: media/event-attributes.html
+
+ * html/HTMLAttributeNames.in: Add media event attribute names.
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::parseMappedAttribute): Handle media event attributes.
+
+2009-06-23 Thiago Macieira <thiago.macieira@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Fix Qt build with Phonon.
+
+ The #include <phonon> header no longer exists. And the <Phonon> or
+ <Phonon/Phonon> headers have never existed (neither for us nor for the
+ Phonon sources). You have to select each and every header that you do
+ want now.
+
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
+
+2009-06-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Remove duplicated code in Qt & GTK logging initialization
+
+ We now share the getChannelFromName() function in Logging.cpp
+
+ * platform/gtk/LoggingGtk.cpp:
+ * platform/qt/LoggingQt.cpp:
+
+2009-06-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Rename the plugin logging channel to plural form 'Plugins'
+
+ This matches both the other logging channel names, as well as the
+ WebKit logging channel used by Safari/Mac for plugins.
+
+ * platform/Logging.cpp:
+ * platform/Logging.h:
+ * platform/gtk/LoggingGtk.cpp:
+ * platform/mac/LoggingMac.mm:
+ * platform/qt/LoggingQt.cpp:
+ * platform/win/LoggingWin.cpp:
+ * plugins/PluginDebug.h:
+ * plugins/gtk/PluginPackageGtk.cpp:
+ * plugins/mac/PluginPackageMac.cpp:
+ * plugins/mac/PluginViewMac.cpp:
+ * plugins/qt/PluginPackageQt.cpp:
+
+2009-06-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Fix NPAPI mouse translation issues on Mac
+
+ The WindowRef we pass to the plugin refers to the the top level window,
+ so the x and y positions have to be relative to this position, but we
+ have to manually compensate for title bar decorations and other parents
+ of the QWebView since contentsToWindow() only traverses to the QWebView.
+
+ Previously we did this compensation when passing on mouse coordinates to
+ the plugin, which caused various issues with translations such as not
+ being able to close the Flash settings dialog, or the hand cursor not
+ appearing over links.
+
+ We now do the compensation as part of the call to NPP_SetWindow, and
+ then pass mouse coordinates in global context without any compensation,
+ similar to how both Safari and Mozilla does it.
+
+ * plugins/mac/PluginViewMac.cpp:
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::globalMousePosForPlugin):
+
+2009-06-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Rubber-stamped by Simon Hausmann.
+
+ [Qt] Resolve absolute path to library install_name manually
+
+ Since our target.path is set to the Qt directory (to be able
+ to do 'make install') the 'absolute_library_soname' option
+ to QMake did not do the right thing.
+
+ We now compute the absolute path manually using DESTDIR.
+
+ * WebCore.pro:
+
+2009-06-22 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/6991146> Scrollbars in hardware layers don't change to the
+ inactive look in background windows
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::paintLayer):
+ Don't short-circuit the "painting" pass that is used to udpate control tints.
+
+2009-06-22 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26567
+ Upstream V8 bindings code generator. With this change, also added interface ancestor
+ traversal to IDL parser, which is necessary for V8 bindings. The traversal is used
+ to determine whether an interface is a Node to facilitate proper casting and storage
+ in V8DOMMap.
+
+ * bindings/scripts/CodeGenerator.pm: Added parent traversal sub, needed
+ by V8 bindings.
+ * bindings/scripts/CodeGeneratorV8.pm: Added.
+ * bindings/scripts/IDLParser.pm: Modified to allow limited parsing for
+ parent traversal cases.
+
+2009-06-22 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Gavin Barraclough.
+
+ Add event handler attribute getter/setters to HTMLFrameSetElement
+ as specified in HTML 5. These match the ones on HTMLBodyElement.
+
+ * dom/Node.h:
+ * html/HTMLFrameSetElement.cpp:
+ (WebCore::HTMLFrameSetElement::parseMappedAttribute):
+ (WebCore::HTMLFrameSetElement::onblur):
+ (WebCore::HTMLFrameSetElement::setOnblur):
+ (WebCore::HTMLFrameSetElement::onerror):
+ (WebCore::HTMLFrameSetElement::setOnerror):
+ (WebCore::HTMLFrameSetElement::onfocus):
+ (WebCore::HTMLFrameSetElement::setOnfocus):
+ (WebCore::HTMLFrameSetElement::onload):
+ (WebCore::HTMLFrameSetElement::setOnload):
+ (WebCore::HTMLFrameSetElement::onbeforeunload):
+ (WebCore::HTMLFrameSetElement::setOnbeforeunload):
+ (WebCore::HTMLFrameSetElement::onmessage):
+ (WebCore::HTMLFrameSetElement::setOnmessage):
+ (WebCore::HTMLFrameSetElement::onoffline):
+ (WebCore::HTMLFrameSetElement::setOnoffline):
+ (WebCore::HTMLFrameSetElement::ononline):
+ (WebCore::HTMLFrameSetElement::setOnonline):
+ (WebCore::HTMLFrameSetElement::onresize):
+ (WebCore::HTMLFrameSetElement::setOnresize):
+ (WebCore::HTMLFrameSetElement::onstorage):
+ (WebCore::HTMLFrameSetElement::setOnstorage):
+ (WebCore::HTMLFrameSetElement::onunload):
+ (WebCore::HTMLFrameSetElement::setOnunload):
+ * html/HTMLFrameSetElement.h:
+ * html/HTMLFrameSetElement.idl:
+
+2009-06-22 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Bug 25425: DOM attribute getter/setter functions should use const AtomicString& type
+ https://bugs.webkit.org/show_bug.cgi?id=25425
+
+ * bindings/scripts/CodeGeneratorJS.pm: Added handling for ReflectURL.
+ * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
+
+ * dom/Element.cpp:
+ (WebCore::Element::getURLAttribute): Added. For use implementing getters
+ for ReflectURL.
+ * dom/Element.h: Added getURLAttribute.
+
+ * html/HTMLImageElement.idl: Use Reflect and ReflectURL.
+
+2009-06-22 Jian Li <jianli@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Bug 26626: Make WorkerContextExecutionProxy::toV8Object handle exception
+ objects.
+ https://bugs.webkit.org/show_bug.cgi?id=26626
+
+ * bindings/v8/WorkerContextExecutionProxy.cpp:
+ (WebCore::WorkerContextExecutionProxy::ToV8Object):
+
+2009-06-22 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add RenderDataGrid to the build. Give it some basic default styling (that more or less matches a listbox). It has a default size
+ of 300x150.
+
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * css/html4.css:
+ * html/HTMLDataGridElement.cpp:
+ (WebCore::HTMLDataGridElement::createRenderer):
+ * html/HTMLDataGridElement.h:
+ * html/HTMLDataGridElement.idl:
+ * rendering/RenderDataGrid.cpp: Added.
+ (WebCore::RenderDataGrid::RenderDataGrid):
+ (WebCore::RenderDataGrid::~RenderDataGrid):
+ (WebCore::RenderDataGrid::calcPrefWidths):
+ (WebCore::RenderDataGrid::paintObject):
+ (WebCore::RenderDataGrid::valueChanged):
+ (WebCore::RenderDataGrid::invalidateScrollbarRect):
+ (WebCore::RenderDataGrid::isActive):
+ * rendering/RenderDataGrid.h: Added.
+ (WebCore::RenderDataGrid::renderName):
+ (WebCore::RenderDataGrid::canHaveChildren):
+ (WebCore::RenderDataGrid::scrollbarCornerPresent):
+
+2009-06-22 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26430
+ <rdar://problem/6944442> Elements jump around when they become composited (WWDC checkers demo)
+ <rdar://problem/6989006> Lots of time spent in RenderLayerCompositor::calculateCompositedBounds()
+ during window resize when using hardware layers
+
+ Fix an ordering dependency which caused the compositing position of a layer
+ to be affected by some later sibling, which affected the compositing ancestor's
+ composited bounds.
+
+ The fix is to only update the compositing positions of layers in some subtree
+ when updateAfterLayout() has been called on all the layers in that subtree,
+ from the ancestor down.
+
+ Also cache the composited bounds of a RenderLayerBacking, now that we can
+ guarantee that those bounds are accurate.
+
+ Test: compositing/sibling-positioning.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateLayerPositions):
+ (WebCore::RenderLayer::hitTestLayer):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::RenderLayerBacking):
+ (WebCore::RenderLayerBacking::updateAfterLayout):
+ (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
+ (WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
+ (WebCore::RenderLayerBacking::paintContents):
+ (WebCore::RenderLayerBacking::compositedBounds):
+ (WebCore::RenderLayerBacking::setCompositedBounds):
+ * rendering/RenderLayerBacking.h:
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::updateBacking):
+ (WebCore::RenderLayerCompositor::updateLayerCompositingState):
+ (WebCore::RenderLayerCompositor::calculateCompositedBounds):
+ (WebCore::RenderLayerCompositor::layerWillBeRemoved):
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+ (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
+ (WebCore::RenderLayerCompositor::updateCompositingChildrenGeometry):
+ * rendering/RenderLayerCompositor.h:
+
+2009-06-22 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ First step in https://bugs.webkit.org/show_bug.cgi?id=25376
+
+ Add StorageSyncManager.cpp/h
+
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+
+ In preparation for combining SessionStorage and LocalStorage into a
+ single StorageManager, move the syncing bits out of LocalStorage and
+ into its own class.
+
+ The next step is to combine LocalStorageArea and SessionStorageArea
+ into one. Then SessionStorage and LocalStorage can be combined.
+
+ Note that combining them will cut down on code paths that must be
+ proxied, eliminate virtual dispatch, and allow Chromium to (eventually)
+ write historical sessionStorage to disk when memory is getting tight.
+
+ Also remove a couple bits of cruft including code for quotas which is
+ unnecessary (since a meta-data db is unnecessary since you can just
+ count bytes as you read the local storage databases into memory).
+
+ * storage/LocalStorage.cpp:
+ (WebCore::LocalStorage::LocalStorage):
+ (WebCore::LocalStorage::storageArea):
+ (WebCore::LocalStorage::close):
+ * storage/LocalStorage.h:
+ * storage/LocalStorageArea.cpp:
+ (WebCore::LocalStorageArea::LocalStorageArea):
+ (WebCore::LocalStorageArea::scheduleFinalSync):
+ (WebCore::LocalStorageArea::syncTimerFired):
+ (WebCore::LocalStorageArea::performImport):
+ * storage/LocalStorageArea.h:
+ (WebCore::LocalStorageArea::create):
+ * storage/LocalStorageTask.cpp:
+ (WebCore::LocalStorageTask::performTask):
+ * storage/LocalStorageTask.h:
+ (WebCore::LocalStorageTask::):
+ (WebCore::LocalStorageTask::createImport):
+ * storage/LocalStorageThread.cpp:
+ * storage/LocalStorageThread.h:
+ * storage/SessionStorage.h:
+ * storage/StorageSyncManager.cpp: Copied from WebCore/storage/LocalStorage.cpp.
+ (WebCore::StorageSyncManager::create):
+ (WebCore::StorageSyncManager::StorageSyncManager):
+ (WebCore::StorageSyncManager::fullDatabaseFilename):
+ (WebCore::StorageSyncManager::close):
+ (WebCore::StorageSyncManager::scheduleImport):
+ (WebCore::StorageSyncManager::scheduleSync):
+ * storage/StorageSyncManager.h: Copied from WebCore/storage/LocalStorage.h.
+ (WebCore::):
+
+2009-06-22 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26622
+ Add ChromiumDataObject::copy()
+
+ * platform/chromium/ChromiumDataObject.cpp:
+ * platform/chromium/ChromiumDataObject.h:
+
+2009-06-22 Timothy Hatcher <timothy@apple.com>
+
+ Add a silhouette image for the enable view of the Resource panel.
+
+ Reviewed by Kevin McCullough.
+
+ * inspector/front-end/Images/resourcesSilhouette.png: Added.
+ * inspector/front-end/inspector.css:
+
+2009-06-22 Kyle Prete <kylep@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26552
+ Add V8 JS bindings for Audio Constructor.
+
+ * bindings/v8/custom/V8CustomBinding.h:
+ Added a callback declaration for audio ctor to macro.
+ * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
+ Added the whole file.
+
+2009-06-22 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26600
+ StringImpl::copy() no longer copies empty string correctly
+
+ * platform/text/StringImpl.cpp:
+ (WebCore::StringImpl::ustring): Changed method calling syntax to look less like calling a
+ static method.
+ (WebCore::StringImpl::copy): Reverted part of r41917 that caused the problem.
+
+2009-06-22 Xiaomei Ji <xji@chromium.org>
+
+ Reviewed by Eric Seidel
+
+ Not auto-testable since it involves sending a keyboard event to
+ the popup, which is not possible (eventSender sends the key
+ events through webview, we want to go through the webwidget).
+
+ This patch is one part of the fix for issue "keyboard selection in
+ Hebrew select element does not work in Windows". The other part of the
+ fix is in chromium's webkit/glue layer.
+ https://bugs.webkit.org/show_bug.cgi?id=25899
+
+ * manual-tests/keyboard_select_non_english.html: Added.
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::isCharacterTypeEvent): Added. Check whether the event is a
+ character type event. "Char" in Windows or "KeyDown" in Mac is character
+ type event.
+ (WebCore::PopupListBox::typeAheadFind): Since m_lastCharTime is used to
+ indicate whether user types multiple characters continuely as a search
+ prefix or not, it should be only assigned when the event is character
+ type event.
+
+2009-06-22 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6115819> Notify of profile start in console
+
+ Put a message in the console that announces that a profile has started,
+ similar to how a console message announces that a profile has finished.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::addProfile): Use renamed function.
+ (WebCore::InspectorController::addProfileFinishedMessageToConsole):
+ Renamed.
+ (WebCore::InspectorController::addStartProfilingMessageToConsole):
+ New function that logs the message about the profile starting.
+ (WebCore::InspectorController::startUserInitiatedProfiling): Ditto
+ * inspector/InspectorController.h:
+ * inspector/front-end/ProfilesPanel.js: Print the "run" of the profile's
+ title if there are multiple profiles, and take into account the fact
+ that titles are displayed twice as much now.
+ (WebInspector.ProfilesPanel.prototype.displayTitleForProfileLink):
+ * page/Console.cpp:
+ (WebCore::Console::profile): Call new function.
+
+2009-06-22 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26615
+
+ Add IDL interface for datagrid cell elements. Add a few more properties to the datagrid itself that
+ correspond to ones you find on <select> elements.
+
+ Add an expanded property to row elements.
+
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * html/HTMLAttributeNames.in:
+ * html/HTMLDataGridCellElement.cpp: Added.
+ (WebCore::HTMLDataGridCellElement::HTMLDataGridCellElement):
+ (WebCore::HTMLDataGridCellElement::label):
+ (WebCore::HTMLDataGridCellElement::setLabel):
+ (WebCore::HTMLDataGridCellElement::focused):
+ (WebCore::HTMLDataGridCellElement::setFocused):
+ (WebCore::HTMLDataGridCellElement::checked):
+ (WebCore::HTMLDataGridCellElement::setChecked):
+ (WebCore::HTMLDataGridCellElement::indeterminate):
+ (WebCore::HTMLDataGridCellElement::setIndeterminate):
+ (WebCore::HTMLDataGridCellElement::progress):
+ (WebCore::HTMLDataGridCellElement::setProgress):
+ * html/HTMLDataGridCellElement.h: Added.
+ (WebCore::HTMLDataGridCellElement::endTagRequirement):
+ (WebCore::HTMLDataGridCellElement::tagPriority):
+ * html/HTMLDataGridCellElement.idl: Added.
+ * html/HTMLDataGridElement.cpp:
+ (WebCore::HTMLDataGridElement::autofocus):
+ (WebCore::HTMLDataGridElement::setAutofocus):
+ (WebCore::HTMLDataGridElement::disabled):
+ (WebCore::HTMLDataGridElement::setDisabled):
+ (WebCore::HTMLDataGridElement::size):
+ (WebCore::HTMLDataGridElement::setSize):
+ * html/HTMLDataGridElement.h:
+ * html/HTMLDataGridElement.idl:
+ * html/HTMLDataGridRowElement.cpp:
+ (WebCore::HTMLDataGridRowElement::checkDTD):
+ (WebCore::HTMLDataGridRowElement::expanded):
+ (WebCore::HTMLDataGridRowElement::setExpanded):
+ * html/HTMLDataGridRowElement.h:
+ * html/HTMLDataGridRowElement.idl:
+ * html/HTMLElementsAllInOne.cpp:
+ * html/HTMLTagNames.in:
+
+2009-06-22 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Add event handler attribute getter/setters to HTMLBodyElement
+ as specified in HTML 5.
+
+ - Removes erroneous inclusion of the onresize and onunload event
+ handler attributes in Element and Document.
+
+ * dom/Document.cpp:
+ (WebCore::Document::getWindowAttributeEventListener):
+ * dom/Document.h:
+ * dom/Document.idl:
+ * dom/Element.idl:
+ * dom/Node.cpp:
+ * dom/Node.h: onblur, onerror, onfocus, and onload all need to be declared
+ virtual, since their behavior for HTMLBodyElement differs from the base
+ implementation.
+ * html/HTMLBodyElement.cpp:
+ (WebCore::HTMLBodyElement::onblur):
+ (WebCore::HTMLBodyElement::setOnblur):
+ (WebCore::HTMLBodyElement::onerror):
+ (WebCore::HTMLBodyElement::setOnerror):
+ (WebCore::HTMLBodyElement::onfocus):
+ (WebCore::HTMLBodyElement::setOnfocus):
+ (WebCore::HTMLBodyElement::onload):
+ (WebCore::HTMLBodyElement::setOnload):
+ (WebCore::HTMLBodyElement::onbeforeunload):
+ (WebCore::HTMLBodyElement::setOnbeforeunload):
+ (WebCore::HTMLBodyElement::onmessage):
+ (WebCore::HTMLBodyElement::setOnmessage):
+ (WebCore::HTMLBodyElement::onoffline):
+ (WebCore::HTMLBodyElement::setOnoffline):
+ (WebCore::HTMLBodyElement::ononline):
+ (WebCore::HTMLBodyElement::setOnonline):
+ (WebCore::HTMLBodyElement::onresize):
+ (WebCore::HTMLBodyElement::setOnresize):
+ (WebCore::HTMLBodyElement::onstorage):
+ (WebCore::HTMLBodyElement::setOnstorage):
+ (WebCore::HTMLBodyElement::onunload):
+ (WebCore::HTMLBodyElement::setOnunload):
+ * html/HTMLBodyElement.h:
+ * html/HTMLBodyElement.idl:
+
+2009-06-22 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26601
+ Remove disabled code for appcache dynamic entries
+
+ This also removes code for DOM 3 Core DOMStringList, which we don't use for anything else yet.
+
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * bindings/js/JSDOMStringListCustom.cpp: Removed.
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DOMStringListCustom.cpp: Removed.
+ * dom/DOMStringList.cpp: Removed.
+ * dom/DOMStringList.h: Removed.
+ * dom/DOMStringList.idl: Removed.
+ * dom/StaticStringList.cpp: Removed.
+ * dom/StaticStringList.h: Removed.
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache):
+ * loader/appcache/ApplicationCache.cpp:
+ (WebCore::ApplicationCache::addResource):
+ * loader/appcache/ApplicationCache.h:
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
+ (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
+ * loader/appcache/ApplicationCacheResource.cpp:
+ (WebCore::ApplicationCacheResource::dumpType):
+ * loader/appcache/ApplicationCacheResource.h:
+ (WebCore::ApplicationCacheResource::):
+ * loader/appcache/ApplicationCacheStorage.cpp:
+ (WebCore::ApplicationCacheStorage::storeUpdatedType):
+ * loader/appcache/DOMApplicationCache.cpp:
+ * loader/appcache/DOMApplicationCache.h:
+ * loader/appcache/DOMApplicationCache.idl:
+ * page/DOMWindow.idl:
+
+2009-06-22 Steve Falkenburg <sfalken@apple.com>
+
+ Windows build fix.
+
+ * DerivedSources.cpp:
+ * html/HTMLElementsAllInOne.cpp:
+
+2009-06-22 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by John Sullivan.
+
+ <rdar://problem/6956606> REGRESSION (S4Beta -> Final): After the password is input,
+ Japanese can't be input.
+
+ WebKit uses a per-frame input context for most editable fields, and application's global
+ context for password fields, manually controlling secure input state and the list of available
+ input sources.
+
+ We were setting TSMDocument property to disable non-Roman input methods after focus changed
+ to a password field, but before selection was updated. This resulted in the property being
+ applied to a wrong TSMDocument in some cases, because TSMGetActiveDocument() uses input
+ context cached by +[NSApplication updateWindows], we change context based on selection,
+ not on focus.
+
+ * page/mac/FrameMac.mm: (WebCore::Frame::setUseSecureKeyboardEntry): Since there is only one
+ context that we use for password fields - the global one - there is no need to get the active
+ one.
+
+2009-06-22 David Levin <levin@chromium.org>
+
+ Reviewed by David Hyatt and Eric Seidel.
+
+ REGRESSION: When the main page (ScrollView) has a custom scrollbar, it crashes on destruction.
+ https://bugs.webkit.org/show_bug.cgi?id=26326
+
+ Test: scrollbars/scrollbar-crash-on-refresh.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::detach):
+ Gives the FrameView a change to do any necessary cleanup on
+ Document::detach() which is where the renderArena gets detroyed.
+ * page/FrameView.cpp:
+ (WebCore::FrameView::detachCustomScrollbars):
+ Gets rid of any custom scrollbars (if the docment supplied them).
+ * page/FrameView.h:
+ * platform/Scrollbar.h:
+ (WebCore::Scrollbar::isCustomScrollbar):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::destroy):
+ Removed the check for document()->frame(). If frame() is 0 in this code,
+ then the call to animation() is also incorrect (since it does document()->frame()->animation()).
+ * rendering/RenderScrollbar.h:
+ (WebCore::RenderScrollbar::isCustomScrollbar):
+
+2009-06-22 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=23606
+ <rdar://problem/6537777> CSS gradient not repainted when image load
+ completes
+
+ Test: fast/repaint/background-generated.html
+
+ * rendering/RenderObject.cpp:
+ (WebCore::mustRepaintFillLayers): Return true if the layer does not
+ specify a size and the image uses the container size.
+
+2009-06-22 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26607
+
+ Add IDL for HTMLDataGridRowElement.
+
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * html/HTMLAttributeNames.in:
+ * html/HTMLDataGridColElement.cpp:
+ (WebCore::HTMLDataGridColElement::primary):
+ (WebCore::HTMLDataGridColElement::setPrimary):
+ * html/HTMLDataGridColElement.h:
+ * html/HTMLDataGridColElement.idl:
+ * html/HTMLDataGridElement.cpp:
+ (WebCore::HTMLDataGridElement::checkDTD):
+ (WebCore::HTMLDataGridElement::multiple):
+ (WebCore::HTMLDataGridElement::setMultiple):
+ * html/HTMLDataGridElement.h:
+ * html/HTMLDataGridElement.idl:
+ * html/HTMLDataGridRowElement.cpp: Added.
+ (WebCore::HTMLDataGridRowElement::HTMLDataGridRowElement):
+ (WebCore::HTMLDataGridRowElement::selected):
+ (WebCore::HTMLDataGridRowElement::setSelected):
+ (WebCore::HTMLDataGridRowElement::focused):
+ (WebCore::HTMLDataGridRowElement::setFocused):
+ * html/HTMLDataGridRowElement.h: Added.
+ (WebCore::HTMLDataGridRowElement::tagPriority):
+ * html/HTMLDataGridRowElement.idl: Added.
+ * html/HTMLTagNames.in:
+
+2009-06-19 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26556
+
+ Fix a crash in case that the QNetworkReply::readReady signal is
+ "stuck" in deferred mode due to JavaScript alert, and in the meantime,
+ QNetworkreply::finished signal is received and processed before
+ QNetworkReply::readReady is processed.
+
+ * manual-tests/qt/unload-alert.html: Added.
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::setLoadMode):
+ (WebCore::QNetworkReplyHandler::finish):
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+ (WebCore::QNetworkReplyHandler::forwardData):
+ (WebCore::QNetworkReplyHandler::start):
+ (WebCore::QNetworkReplyHandler::sendQueuedItems):
+ * platform/network/qt/QNetworkReplyHandler.h:
+ (WebCore::QNetworkReplyHandler::):
+
+2009-06-22 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Fix the Qt build.
+
+ * WebCore.pro:
+
+2009-06-21 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Bug 25425: DOM attribute getter/setter functions should use const AtomicString& type
+ https://bugs.webkit.org/show_bug.cgi?id=25425
+
+ * bindings/scripts/CodeGeneratorJS.pm: Tweaked mechanism for includes to be a bit
+ more consistent and to make SVGElement.h be included in the header rather than in
+ every implementation file that includes the header. Added code to use getAttribute
+ and setAttribute directly when the [Reflect] extended attribute is used.
+
+ * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
+
+ * html/HTMLElement.idl: Used [Reflect] for all the attributes in this class that
+ reflect content attributes. Restricting this to one class for now to keep the
+ patch small and start out slowly.
+
+2009-06-21 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=26596
+ Only expose event handler attributes to elements and documents.
+
+ Test: fast/dom/event-attribute-availability.html
+
+ * dom/Document.idl:
+ * dom/Element.idl:
+ * dom/Node.cpp:
+ * dom/Node.h:
+ * dom/Node.idl:
+
+2009-06-21 Daniel Bates <dbates@intudata.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26580
+
+ Fix to enable XSSAuditor on child windows.
+
+ Test: http/tests/security/xssAuditor/link-opens-new-window.html
+
+ * page/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::XSSAuditor):
+ (WebCore::XSSAuditor::isEnabled):
+ (WebCore::XSSAuditor::canEvaluate):
+ (WebCore::XSSAuditor::canCreateInlineEventListener):
+ (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
+ (WebCore::XSSAuditor::canLoadObject):
+ * page/XSSAuditor.h: Removed method setXSSAuditorEnabled, and field m_isEnabled.
+ Moved implementation of isEnabled to XSSAuditor.cpp and changed implementation
+ to query Settings.
+
+2009-06-21 David Levin <levin@chromium.org>
+
+ Reviewed by NOBODY.
+
+ Speculative windows build fix (idea by Mark Rowe).
+
+ * WebCore.vcproj/WebCore.vcproj:
+
+2009-06-21 David Levin <levin@chromium.org>
+
+ Reviewed by NOBODY (Speculative gtk build fix).
+
+ * GNUmakefile.am:
+
+2009-06-21 David Levin <levin@chromium.org>
+
+ Reviewed by NOBODY.
+
+ Speculative tiger build fix and a windows build fix.
+ More fixes may still be in order.
+
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+ * dom/default/PlatformMessagePortChannel.h:
+ (WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
+
+2009-06-21 David Levin <levin@chromium.org>
+
+ Reviewed by NOBODY (Speculative tiger build fix).
+
+ * dom/default/PlatformMessagePortChannel.h:
+ (WebCore::PlatformMessagePortChannel::MessagePortQueue::~MessagePortQueue):
+
+2009-06-21 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ <https://bugs.webkit.org/show_bug.cgi?id=26448>
+
+ Added optimized GC for MessagePorts when the entangled port is run by the same thread.
+ Fixed bug in isProxyFor() that was not properly throwing an exception when trying to clone the entangled port.
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::markActiveObjectsForContext):
+ Now marks remotely entangled ports as in-use, in addition to those with pending activity.
+ * bindings/js/JSMessagePortCustom.cpp:
+ (WebCore::JSMessagePort::mark):
+ Now checks if the entangled port is local (run by same thread) and if so mark()s it.
+ * dom/MessagePort.cpp:
+ (WebCore::MessagePort::postMessage):
+ (WebCore::MessagePort::disentangle):
+ Removes cloned ports from the ScriptExecutionContext - this allows cloned ports to be GC'd as otherwise they look like remotely entangled ports.
+ (WebCore::MessagePort::start):
+ (WebCore::MessagePort::locallyEntangledPort):
+ Added API for fetching the entangled port if it is run by the same thread
+ * dom/MessagePort.h:
+ * dom/MessagePortProxyWrapper.h:
+ * dom/default/MessagePortProxy.cpp:
+ (WebCore::MessagePortProxyWrapper::locallyEntangledPort):
+ Added API for fetching the entangled port if it is run by the same thread
+ (WebCore::MessagePortProxy::hasPendingActivity):
+ Changed definition of hasPendingActivity() to be stricter - only returns true if there are pending messages.
+ (WebCore::MessagePortProxy::locallyEntangledPort):
+ * dom/default/MessagePortProxy.h:
+
+2009-06-21 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ <https://bugs.webkit.org/show_bug.cgi?id=25043>
+ Removed obsolete MessagePort.startConversation(), active and onclose APIs.
+
+ Refactored MessagePortProxy into MessagePortChannel and a platform-dependent PlatformMessagePortChannel
+ implementation. Modified APIs to simplify cross-process implementations by moving the messaging code
+ entirely into the platform-dependent proxy.
+
+ Created a thread-safe default PlatformMessagePortChannel implementation.
+
+ Changed DOMWindow messaging to create the MessageEvent in the target ScriptExecutionContext to match how
+ cross-thread MessagePorts work.
+
+ * GNUMakefile.am:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ Added MessagePortChannel/PlatformMessagePortChannel files.
+ * bindings/js/JSMessagePortCustom.cpp:
+ (WebCore::JSMessagePort::mark):
+ Changed ports to not mark their entangled pair as reachable, per the spec.
+ * bindings/v8/custom/V8MessagePortCustom.cpp:
+ * dom/MessageChannel.cpp:
+ (WebCore::MessageChannel::MessageChannel):
+ Updated to use PlatformMessagePortChannel::createChannel() to entangle the ports.
+ * dom/MessagePort.cpp:
+ (WebCore::MessagePort::MessagePort):
+ (WebCore::MessagePort::~MessagePort):
+ (WebCore::MessagePort::postMessage):
+ (WebCore::MessagePort::disentangle):
+ (WebCore::MessagePort::messageAvailable):
+ (WebCore::MessagePort::start):
+ (WebCore::MessagePort::close):
+ (WebCore::MessagePort::entangle):
+ (WebCore::MessagePort::contextDestroyed):
+ (WebCore::MessagePort::dispatchMessages):
+ (WebCore::MessagePort::setOnmessage):
+ (WebCore::MessagePort::hasPendingActivity):
+ Changed these APIs to delegate to new PlatformMessagePortChannel APIs.
+ * dom/MessagePort.h:
+ Renamed isQueueOpen() to started().
+ * dom/MessagePort.idl:
+ Removed startConversation and onclose.
+ * dom/MessagePortProxy.h: Removed.
+ * dom/MessagePortChannel.cpp: Added.
+ (WebCore::MessagePortChannel::EventData::create):
+ (WebCore::MessagePortChannel::EventData::EventData):
+ (WebCore::MessagePortChannel::~MessagePortChannel):
+ * dom/MessagePortChannel.h: Added.
+ (WebCore::MessagePortChannel::EventData::message):
+ (WebCore::MessagePortChannel::EventData::channel):
+ Changed EventData to hold a reference to a MessagePortChannel object instead of a MessagePort to enable cross-thread messaging.
+ (WebCore::MessagePortChannel::MessagePortChannel):
+ (WebCore::MessagePortChannel::create):
+ * dom/ScriptExecutionContext.cpp:
+ (WebCore:ScriptExecutionContext::dispatchMessagePortEvents):
+ Renamed isQueueOpen() to started().
+ * dom/default/PlatformMessagePortChannel.cpp: Added.
+ (WebCore::MessagePortChannel::entangleIfOpen):
+ (WebCore::MessagePortChannel::disentangle):
+ (WebCore::MessagePortChannel::postMessageToRemote):
+ (WebCore::MessagePortChannel::tryGetMessageFromRemote):
+ (WebCore::MessagePortChannel::close):
+ (WebCore::MessagePortChannel::isConnectedTo):
+ (WebCore::MessagePortChannel::hasPendingActivity):
+ (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
+ (WebCore::PlatformMessagePortChannel::~PlatformMessagePortChannel):
+ (WebCore::PlatformMessagePortChannel::createChannel):
+ (WebCore::PlatformMessagePortChannel::entangleIfOpen):
+ (WebCore::PlatformMessagePortChannel::disentangle):
+ (WebCore::PlatformMessagePortChannel::setRemotePort):
+ (WebCore::PlatformMessagePortChannel::remotePort):
+ (WebCore::PlatformMessagePortChannel::entangledChannel):
+ (WebCore::PlatformMessagePortChannel::setEntangledChannel):
+ (WebCore::PlatformMessagePortChannel::postMessageToRemote):
+ (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
+ (WebCore::PlatformMessagePortChannel::isConnectedTo):
+ (WebCore::PlatformMessagePortChannel::close):
+ (WebCore::PlatformMessagePortChannel::closeInternal):
+ (WebCore::PlatformMessagePortChannel::hasPendingActivity):
+ * dom/default/PlatformMessagePortChannel.h: Added.
+ (WebCore::PlatformMessagePortChannel::MessagePortQueue::create):
+ (WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
+ (WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty):
+ (WebCore::PlatformMessagePortChannel::MessagePortQueue::isEmpty):
+ (WebCore::PlatformMessagePortChannel::MessagePortQueue::MessagePortQueue):
+ * page/DOMWindow.cpp:
+ (WebCore::PostMessageTimer::PostMessageTimer):
+ Changed DOMWindow messaging to create the MessageEvent in the target ScriptExecutionContext to match how cross-thread MessagePorts work.
+ (WebCore::PostMessageTimer::event):
+ (WebCore::DOMWindow::postMessage):
+ (WebCore::DOMWindow::postMessageTimerFired):
+
+2009-06-21 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=15383
+ <rdar://problem/5682745> resize: vertical does not restrict to vertical
+ resize
+
+ Test: fast/css/resize-single-axis.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::resize): Ignore movement along the non-resizing
+ axis.
+
+2009-06-21 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Eric Seidel
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=26578
+ event.currentTarget for listener registered on window should point to the window object like in Firefox
+
+ Test: fast/events/event-trace.html
+
+ * dom/Node.cpp:
+ (WebCore::Node::dispatchGenericEvent): Make the DOMWindow the currentTarget when events are dispatched
+ to it. We previously used the document because DOMWindow was not yet an EventTarget.
+
+2009-06-21 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=9694
+ resize value not compared
+
+ Test: fast/css/resize-value-compared.html
+
+ * rendering/style/StyleRareInheritedData.cpp:
+ (WebCore::StyleRareInheritedData::operator==): Compare the resize
+ member.
+
+2009-06-19 Alice Liu <alice.liu@apple.com>
+
+ Fix https://bugs.webkit.org/show_bug.cgi?id=26568
+ Repro crash animating GIF if previously used in a closed window's back/forward list
+ Also filed as <rdar://problem/6978362>
+
+ Reviewed by Maciej Stachowiak.
+
+ Can't test this bug with an automated layout test since it requires b/f caching
+ * manual-tests/animated-gif-bfcache-crash.html: Added.
+ * manual-tests/resources/containsAnimatedGif.html: Added.
+
+ Adding checks for hostWindow() since there is no guarantee that the Page is alive
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::scrollRectIntoViewRecursively):
+ (WebCore::ScrollView::contentsToScreen):
+ (WebCore::ScrollView::screenToContents):
+ (WebCore::ScrollView::wheelEvent):
+
+2009-06-20 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=26554
+ Shadowing of top and parent
+
+ * page/DOMWindow.idl:
+
+2009-06-20 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix <https://bugs.webkit.org/show_bug.cgi?id=15106>.
+ Bug 15106: REGRESSION: Can't drag text as element when user-select is set to none
+
+ We allow selections to begin within an element that has -webkit-user-select: none set,
+ unless the element is draggable as dragging should take priority over starting a selection.
+
+ Test: editing/selection/user-drag-element-and-user-select-none.html
+
+ * dom/Node.cpp:
+ (WebCore::Node::canStartSelection):
+
+2009-06-20 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Bug 26528: REGRESSION (r44674): Assertion in TextIterator::pushFullyClippedState while counting matches for "a" on apple.com
+ https://bugs.webkit.org/show_bug.cgi?id=26528
+ rdar://problem/6985329
+
+ * editing/TextIterator.cpp:
+ (WebCore::TextIterator::handleReplacedElement): When entering a text control,
+ start at the top of the shadow tree (by calling shadowTreeRootNode). Also
+ remove assumption that innerTextElement will never be 0 since RenderTextControl
+ doesn't really guarantee this.
+
+2009-06-20 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by NOBODY.
+
+ Speculative Qt build fix - add HTMLDataGridColElement to the build script.
+
+ * WebCore.pro:
+
+2009-06-19 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26561
+
+ Remove a memcpy by retrieving the already existing copy of a string
+ instead of making a new one.
+
+ * bindings/js/ScriptSourceCode.h:
+ (WebCore::ScriptSourceCode::ScriptSourceCode):
+ (WebCore::ScriptSourceCode::source):
+ * bindings/js/StringSourceProvider.h:
+ (WebCore::StringSourceProvider::source):
+
+2009-06-19 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Steve Falkenburg.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26488
+ No Support for Single Finger or Two Finger Panning in Windows 7
+
+ The code in WebCore allows us to interpret a Pan gesture as
+ a mousewheel event, and we are able to reuse the scrolling code.
+ Another constructor was created in WheelEventWin which takes data
+ better suited to the pan guesture than what was currently there.
+
+ Unable to add tests to simulate touch behavior/gestures.
+
+ * platform/PlatformWheelEvent.h:
+ * platform/win/WheelEventWin.cpp:
+
+2009-06-19 Chris Marrin <cmarrin@apple.com>
+
+ Fixed a build error, which only shows up in the i386 compile
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::animateTransform):
+
+2009-06-19 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/6988385> REGRESSION: In full page video player, movie's
+ video track becomes detached from its controller.
+
+ When in the media document, the MediaPlayer should not report that it
+ is capable of hardware acceleration, because it renders via a QTMovieView
+ which is already accelerated.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::supportsAcceleratedRendering):
+
+2009-06-19 Kevin Ollivier <kevino@theolliviers.com>
+
+ Adding XSSAuditor.cpp to the wx build.
+
+ * WebCoreSources.bkl:
+
+2009-06-19 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser <simon.fraser@apple.com>.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26544
+
+ If I am doing a Matrix hardware animation and any matrix is singular, I revert to software.
+ This is not really testable, since we can't see what the hardware animation is doing.
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::animateTransform):
+
+2009-06-19 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ An additional fix for Bug 26532: Native functions do not correctly unlink
+ from optimised callsites when they're collected
+ <https://bugs.webkit.org/show_bug.cgi?id=26532> | <rdar://problem/6625385>
+
+ Use "NativeFunctionWrapper" instead of "PrototypeFunction" in cross-frame
+ accessors, so the type of object you get to wrap a function is the same,
+ regardless of whether the access to the function is cross-frame.
+
+ This is faster and more idiomatic than what we had before. It also would
+ have avoided Bug 26532 because it would have prevented a conflicting
+ PrototypeFunction from being allocated to wrap postMessage, where a
+ NativeFunctionWrapper had been allocated previously.
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::objectToStringFunctionGetter):
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::nonCachingStaticFunctionGetter):
+ * bindings/js/JSHistoryCustom.cpp:
+ (WebCore::nonCachingStaticBackFunctionGetter):
+ (WebCore::nonCachingStaticForwardFunctionGetter):
+ (WebCore::nonCachingStaticGoFunctionGetter):
+ * bindings/js/JSLocationCustom.cpp:
+ (WebCore::nonCachingStaticReplaceFunctionGetter):
+ (WebCore::nonCachingStaticReloadFunctionGetter):
+ (WebCore::nonCachingStaticAssignFunctionGetter):
+
+2009-06-19 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by John Sullivan
+
+ <rdar://problem/6953673> Crash in RenderLayerCompositor::setCompositingParent
+
+ Fix a crash that could occur in complex content due to timing issues
+ when doing a partial layer tree rebuild which is required when painting;
+ setCompositingParent() could be called with a parent which has not been made
+ compositing yet.
+
+2009-06-19 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Build fix. Adding missing HTMLDataGrid* files to the build.
+
+ * GNUmakefile.am:
+
+2009-06-19 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26460 part three
+ Make BMPImageReader a standalone class that is used by ICOImageDecoder
+ and BMPImageDecoder to decode individual BMPs within a file. These
+ decoders now inherit directly from ImageDecoder.
+
+ This also makes these decoders decode on-demand in isSizeAvailable() and
+ frameBufferAtIndex(), like the other decoders, instead of when setData()
+ is called, like before. This should provide a speedup on pages
+ containing BMPs that aren't immediately onscreen.
+
+ * platform/image-decoders/bmp/BMPImageDecoder.cpp:
+ (WebCore::BMPImageDecoder::BMPImageDecoder):
+ (WebCore::BMPImageDecoder::setData):
+ (WebCore::BMPImageDecoder::isSizeAvailable):
+ (WebCore::BMPImageDecoder::frameBufferAtIndex):
+ (WebCore::BMPImageDecoder::decodeWithCheckForDataEnded):
+ (WebCore::BMPImageDecoder::decode):
+ (WebCore::BMPImageDecoder::processFileHeader):
+ * platform/image-decoders/bmp/BMPImageDecoder.h:
+ (WebCore::BMPImageDecoder::readUint32):
+ * platform/image-decoders/bmp/BMPImageReader.cpp:
+ (WebCore::BMPImageReader::BMPImageReader):
+ (WebCore::BMPImageReader::decodeBMP):
+ (WebCore::BMPImageReader::readInfoHeaderSize):
+ (WebCore::BMPImageReader::processInfoHeader):
+ (WebCore::BMPImageReader::readInfoHeader):
+ (WebCore::BMPImageReader::processBitmasks):
+ (WebCore::BMPImageReader::processColorTable):
+ (WebCore::BMPImageReader::processRLEData):
+ (WebCore::BMPImageReader::processNonRLEData):
+ (WebCore::BMPImageReader::setFailed):
+ * platform/image-decoders/bmp/BMPImageReader.h:
+ (WebCore::BMPImageReader::readUint16):
+ (WebCore::BMPImageReader::readUint32):
+ (WebCore::BMPImageReader::setBuffer):
+ (WebCore::BMPImageReader::setData):
+ (WebCore::BMPImageReader::):
+ (WebCore::BMPImageReader::pastEndOfImage):
+ (WebCore::BMPImageReader::readCurrentPixel):
+ (WebCore::BMPImageReader::setRGBA):
+ * platform/image-decoders/ico/ICOImageDecoder.cpp:
+ (WebCore::ICOImageDecoder::ICOImageDecoder):
+ (WebCore::ICOImageDecoder::setData):
+ (WebCore::ICOImageDecoder::isSizeAvailable):
+ (WebCore::ICOImageDecoder::size):
+ (WebCore::ICOImageDecoder::frameBufferAtIndex):
+ (WebCore::ICOImageDecoder::decodeWithCheckForDataEnded):
+ (WebCore::ICOImageDecoder::decode):
+ (WebCore::ICOImageDecoder::processDirectory):
+ (WebCore::ICOImageDecoder::processDirectoryEntries):
+ (WebCore::ICOImageDecoder::readDirectoryEntry):
+ (WebCore::ICOImageDecoder::processImageType):
+ * platform/image-decoders/ico/ICOImageDecoder.h:
+ (WebCore::ICOImageDecoder::readUint16):
+ (WebCore::ICOImageDecoder::readUint32):
+
+2009-06-19 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26555
+
+ Fix the Chromium canary bot. Turns out ScriptSourceCode doesn't have
+ the same API in V8 and JSC.
+
+ * WebCore/bindings/js/ScriptController.cpp:
+ * WebCore/bindings/js/ScriptSourceCode.h:
+ * WebCore/bindings/v8/ScriptController.cpp:
+ * WebCore/page/XSSAuditor.cpp:
+ * WebCore/page/XSSAuditor.h:
+
+2009-06-19 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26547
+
+ Implement the IDL interface for HTMLDataGridColElement.
+
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * html/HTMLAttributeNames.in:
+ * html/HTMLDataGridColElement.cpp: Added.
+ (WebCore::HTMLDataGridColElement::HTMLDataGridColElement):
+ (WebCore::HTMLDataGridColElement::label):
+ (WebCore::HTMLDataGridColElement::setLabel):
+ (WebCore::HTMLDataGridColElement::type):
+ (WebCore::HTMLDataGridColElement::setType):
+ (WebCore::HTMLDataGridColElement::sortable):
+ (WebCore::HTMLDataGridColElement::setSortable):
+ (WebCore::HTMLDataGridColElement::sortDirection):
+ (WebCore::HTMLDataGridColElement::setSortDirection):
+ (WebCore::HTMLDataGridColElement::selected):
+ (WebCore::HTMLDataGridColElement::setSelected):
+ * html/HTMLDataGridColElement.h: Added.
+ (WebCore::HTMLDataGridColElement::endTagRequirement):
+ (WebCore::HTMLDataGridColElement::tagPriority):
+ * html/HTMLDataGridColElement.idl: Added.
+ * html/HTMLDataGridElement.h:
+ * html/HTMLElementsAllInOne.cpp:
+ * html/HTMLTagNames.in:
+ * page/DOMWindow.idl:
+
+2009-06-19 Chris Evans <scarybeasts@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ There is no new test because this cannot be tested deterministically.
+ I've not been able to cause a crash at all in the test framework, but
+ I have verified that this is happening in the wild and that the patch
+ fixes the likely cause in the debugger.
+
+ * loader/TextResourceDecoder.cpp: careful not to iterate off the end
+ of our input buffer looking for the end of the comment.
+
+2009-06-19 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26536
+
+ Fix external-script-URL-location.html and
+ write-external-script-open.html LayoutTests.
+
+ implicitOpen is called from several places. We need to setXSSAuditor
+ each time, so I moved the call inside implicitOpen.
+
+ * dom/Document.cpp:
+ (WebCore::Document::open):
+ (WebCore::Document::implicitOpen):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::begin):
+
+2009-06-19 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by David Levin.
+
+ Use WebCore::multipleFileUploadText() in Chromium to fix a problem
+ that Chromium shows only the first filename even if a user selects
+ multiple files for <input type=file multiple>.
+ <https://bugs.webkit.org/show_bug.cgi?id=26502>
+
+ * platform/chromium/FileChooserChromium.cpp:
+ (WebCore::FileChooser::basenameForWidth):
+
+2009-06-19 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ - fix <rdar://problem/6967596> Safari hung using 100% CPU when I tried
+ to look up a word in Dictionary using command-control-d
+
+ Test: editing/selection/move-by-line-005.html
+
+ The root cause of this bug was searchAheadForBetterMatch() continuing
+ past the first rendered text object after the given object. While we
+ want to skip non-rendered text and empty containers, when we encounter
+ rendered text object, we must return a text box for that object.
+
+ * dom/Position.cpp:
+ (WebCore::searchAheadForBetterMatch):
+
+2009-06-19 Jungshik Shin <jshin@chromium.org>
+
+ Reviewed by David Levin
+
+ https://bugs.webkit.org/show_bug.cgi?id=25657
+
+ Chromium Linux port does not handle non-BMP characters properly.
+ It's fixed with a 'UTF-16 iterator macro' to extract Unicode
+ codepoints out of a UTF-16 input string.
+
+ A manual test is added for non-BMP character rendering,
+ which we can use until a small freely-distributable font
+ covering non-BMP is added to the Webkit source tree.
+
+
+ * platform/graphics/chromium/FontCacheLinux.cpp:
+ (WebCore::FontCache::getFontDataForCharacters):
+ * manual-tests/non-bmp.html: Added.
+
+2009-06-19 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ V8 Bindings: return proper state from the script stack.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26512
+
+ * bindings/v8/ScriptCallStack.cpp:
+ (WebCore::ScriptCallStack::ScriptCallStack):
+ * bindings/v8/ScriptCallStack.h:
+ (WebCore::ScriptCallStack::state):
+
+2009-06-19 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Windows build fix.
+
+ * platform/graphics/cg/PatternCG.cpp:
+ (WebCore::Pattern::createPlatformPattern):
+
+2009-06-19 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Simon Hausmann.
+ Build fix after 44825.
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::isSizeAvailable):
+ * platform/graphics/qt/ImageDecoderQt.h:
+
+2009-06-18 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 26426: Canvas: rotation of 'no-repeat' pattern is weird
+ <https://bugs.webkit.org/show_bug.cgi?id=26426>
+
+ Use 1<<23-1 as steps of no-repeat patterns instead of 100000000.0f.
+ The original number cannot be represented by mantissa of float
+ (23bit) so that it caused some error.
+
+ Test: fast/canvas/image-object-in-canvas.html:
+
+ * platform/graphics/cg/PatternCG.cpp:
+ (WebCore::Pattern::createPlatformPattern):
+
+2009-06-19 Adam Barth <abarth@webkit.org>
+
+ Unreviewed attempt to fix the Chromium build.
+
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::ScriptController):
+ (WebCore::ScriptController::evaluate):
+ * bindings/v8/ScriptController.h:
+ (WebCore::ScriptController::xssAuditor):
+ * bindings/v8/ScriptEventListener.cpp:
+ (WebCore::createAttributeEventListener):
+
+2009-06-18 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26199
+
+ Added an experimental reflective XSS filter. The filter is disabled by
+ default.
+
+ Test: http/tests/security/xssAuditor/script-tag.html
+
+ * GNUmakefile.am:
+ * WebCore.base.exp:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::ScriptController):
+ (WebCore::ScriptController::evaluate):
+ * bindings/js/ScriptController.h:
+ (WebCore::ScriptController::xssAuditor):
+ * bindings/js/ScriptEventListener.cpp:
+ (WebCore::createAttributeEventListener):
+ * dom/Tokenizer.h:
+ (WebCore::Tokenizer::xssAuditor):
+ (WebCore::Tokenizer::setXSSAuditor):
+ (WebCore::Tokenizer::Tokenizer):
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::scriptHandler):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::begin):
+ (WebCore::FrameLoader::requestObject):
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setXSSAuditorEnabled):
+ * page/Settings.h:
+ (WebCore::Settings::xssAuditorEnabled):
+ * page/XSSAuditor.cpp: Added.
+ (WebCore::isControlCharacter):
+ (WebCore::XSSAuditor::XSSAuditor):
+ (WebCore::XSSAuditor::~XSSAuditor):
+ (WebCore::XSSAuditor::canEvaluate):
+ (WebCore::XSSAuditor::canCreateInlineEventListener):
+ (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
+ (WebCore::XSSAuditor::canLoadObject):
+ (WebCore::XSSAuditor::decodeURL):
+ (WebCore::XSSAuditor::findInRequest):
+ * page/XSSAuditor.h: Added.
+ (WebCore::XSSAuditor::isEnabled):
+ (WebCore::XSSAuditor::setXSSAuditorEnabled):
+
+2009-06-18 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ feOffset and objectBoundingBox
+ [https://bugs.webkit.org/show_bug.cgi?id=26441]
+
+ If we use objectBoundingBox for primitiveUnits, the fractions given
+ to dx or dy of feOffset must be multiplied with the referenced objects
+ objectBoundingBox size.
+
+ Test: svg/filters/feOffset.svg
+
+ * svg/graphics/filters/SVGFEOffset.cpp:
+ (WebCore::FEOffset::apply):
+
+2009-06-18 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ feTile implementation missing
+ [https://bugs.webkit.org/show_bug.cgi?id=26419]
+
+ Implementation of feTile, a pattern effect for SVG filters. It was
+ necessary to modify FilterEffect since source inputs need a secial
+ logic and we have to identify if an effect is a source input.
+
+ Tests: svg/batik/filters/feTile.svg
+ svg/filters/feTile.svg
+
+ * platform/graphics/filters/FilterEffect.h:
+ (WebCore::FilterEffect::isSourceInput):
+ * platform/graphics/filters/SourceAlpha.h:
+ (WebCore::SourceAlpha::isSourceInput):
+ * platform/graphics/filters/SourceGraphic.h:
+ (WebCore::SourceGraphic::isSourceInput):
+ * svg/graphics/filters/SVGFETile.cpp:
+ (WebCore::FETile::apply):
+
+2009-06-18 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ feMerge implementation
+ [https://bugs.webkit.org/show_bug.cgi?id=26480]
+
+ Added feMerge to the SVG Filter system.
+
+ Test: svg/filters/feMerge.svg
+
+ * svg/graphics/filters/SVGFEMerge.cpp:
+ (WebCore::FEMerge::uniteChildEffectSubregions):
+ (WebCore::FEMerge::apply):
+ * svg/graphics/filters/SVGFEMerge.h:
+
+2009-06-18 Mark Rowe <mrowe@apple.com>
+
+ Speculative Windows build fix.
+
+ * page/win/FrameCGWin.cpp: Add missing #include.
+
+2009-06-17 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Dave Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26425
+ Final refactorings, picking up a few places where BitmapInfo
+ could be used.
+
+ * page/win/FrameCGWin.cpp:
+ (WebCore::imageFromRect):
+ * platform/win/CursorWin.cpp:
+ (WebCore::Cursor::Cursor):
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::paint):
+
+2009-06-18 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 26522: In DOM mode, VoiceOver reads some mouseover text on web sites strangely
+ https://bugs.webkit.org/show_bug.cgi?id=26522
+
+ Test: accessibility/non-data-table-cell-title-ui-element.html
+
+ * accessibility/AccessibilityTableCell.cpp:
+ (WebCore::AccessibilityTableCell::titleUIElement):
+
+2009-06-18 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix after recent RenderTheme changes.
+
+ * platform/wx/RenderThemeWx.cpp:
+ (WebCore::RenderThemeWx::~RenderThemeWx):
+ (WebCore::RenderTheme::themeForPage):
+
+2009-06-18 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26460 part two
+ Attempt to minimize diff of following functional change by first landing
+ non-functional change to:
+ * Make readUintX() public and static (since they will need to be once
+ BMPImageReader is included in *ImageDecoder via composition rather
+ than inheritance). Add wrappers in each class so callers can be
+ simpler. In the next patch, these wrappers will be beefed up slightly
+ and the callers will get even simpler.
+ * Change direct setting of m_failed to use setFailed(), since in the
+ next patch much of this code won't even have direct access to m_failed
+ * Add a helper function in ICOImageDecoder to determine the image type
+ instead of simply doing it inline
+ * Rewrap lines that used to be <=80 cols and slipped over it during the
+ original landing of these decoders
+ * Other misc. changes, e.g. adding constructor definitions, reordering
+ functions, changing RGBA32Buffer& to RGBA32Buffer*, etc. that have no
+ functional effect but minimize the subsequent diff for readability
+
+
+ * platform/image-decoders/bmp/BMPImageDecoder.cpp:
+ (WebCore::BMPImageDecoder::BMPImageDecoder):
+ (WebCore::BMPImageDecoder::processFileHeader):
+ * platform/image-decoders/bmp/BMPImageDecoder.h:
+ (WebCore::BMPImageDecoder::readUint32):
+ * platform/image-decoders/bmp/BMPImageReader.cpp:
+ (WebCore::BMPImageReader::decodeBMP):
+ (WebCore::BMPImageReader::getInfoHeaderSize):
+ (WebCore::BMPImageReader::processInfoHeader):
+ (WebCore::BMPImageReader::readInfoHeader):
+ (WebCore::BMPImageReader::processBitmasks):
+ (WebCore::BMPImageReader::processColorTable):
+ (WebCore::BMPImageReader::processRLEData):
+ (WebCore::BMPImageReader::processNonRLEData):
+ * platform/image-decoders/bmp/BMPImageReader.h:
+ (WebCore::BMPImageReader::readUint16Helper):
+ (WebCore::BMPImageReader::readUint32Helper):
+ (WebCore::BMPImageReader::):
+ (WebCore::BMPImageReader::readUint16):
+ (WebCore::BMPImageReader::readUint32):
+ (WebCore::BMPImageReader::readCurrentPixel):
+ (WebCore::BMPImageReader::getComponent):
+ (WebCore::BMPImageReader::setI):
+ (WebCore::BMPImageReader::setRGBA):
+ (WebCore::BMPImageReader::fillRGBA):
+ * platform/image-decoders/ico/ICOImageDecoder.cpp:
+ (WebCore::ICOImageDecoder::ICOImageDecoder):
+ (WebCore::ICOImageDecoder::isSizeAvailable):
+ (WebCore::ICOImageDecoder::size):
+ (WebCore::ICOImageDecoder::decodeImage):
+ (WebCore::ICOImageDecoder::processDirectory):
+ (WebCore::ICOImageDecoder::processDirectoryEntries):
+ (WebCore::ICOImageDecoder::isBetterEntry):
+ (WebCore::ICOImageDecoder::processImageType):
+ * platform/image-decoders/ico/ICOImageDecoder.h:
+ (WebCore::ICOImageDecoder::readUint16):
+ (WebCore::ICOImageDecoder::readUint32):
+
+2009-06-18 Peter Kasting <pkasting@google.com>
+
+ Fix build bustage.
+
+ * platform/image-decoders/gif/GIFImageDecoder.h:
+
+2009-06-18 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit
+
+ Convert intptr_t to Strings so that we don't loose bits in the
+ conversion to JS. Previously they were being put into 32bit ints.
+
+ * inspector/InspectorController.cpp: Convert the String back to an
+ intptr_t.
+ (WebCore::InspectorController::addBreakpoint):
+ (WebCore::InspectorController::removeBreakpoint):
+ * inspector/InspectorController.h:
+ * inspector/InspectorController.idl: Use strings in JS to avoid 32bit
+ truncation.
+ * inspector/InspectorFrontend.cpp: Make the intptr_t into a String.
+ (WebCore::InspectorFrontend::parsedScriptSource):
+ * platform/text/PlatformString.h: Implemented the necessary conversion
+ functions to be able to convert to and from an intptr_t.
+ * platform/text/String.cpp: Ditto.
+ (WebCore::String::toIntPtrStrict):
+ (WebCore::String::toIntPtr):
+ (WebCore::charactersToIntPtrStrict):
+ (WebCore::charactersToIntPtr):
+ * platform/text/StringImpl.cpp: Ditto.
+ (WebCore::StringImpl::toIntPtrStrict):
+ (WebCore::StringImpl::toIntPtr):
+ * platform/text/StringImpl.h: Ditto.
+
+2009-06-17 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Final cleanups in this refactoring:
+ (1) Move WindowsBitmap implementation from CG-specific file to
+ the platform-common GraphicsContextWin.cpp, since it is
+ equally useful on both platforms.
+ (2) Revise the TransformationMatrix logic as suggested by
+ Adam Roben in his review comments to Part #2 of this
+ refactoring.
+
+ * platform/graphics/win/GraphicsContextCGWin.cpp:
+ * platform/graphics/win/GraphicsContextWin.cpp:
+ (WebCore::GraphicsContext::WindowsBitmap::WindowsBitmap):
+ (WebCore::GraphicsContext::WindowsBitmap::~WindowsBitmap):
+ (WebCore::GraphicsContext::createWindowsBitmap):
+ (WebCore::GraphicsContext::getWindowsContext):
+ (WebCore::GraphicsContextPlatformPrivate::scale):
+ (WebCore::GraphicsContextPlatformPrivate::rotate):
+ (WebCore::GraphicsContextPlatformPrivate::translate):
+ (WebCore::GraphicsContextPlatformPrivate::concatCTM):
+
+2009-06-18 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26460 part one
+ Make isSizeAvailable non-const, since it's not logically const (it
+ triggers lazy decoding), and simplify all the implementations (without
+ changing behavior; just make less verbose). Remove some other
+ inappropriate consts, which enables the removal of all the mutable
+ declarations in the decoders.
+
+ * platform/image-decoders/ImageDecoder.h:
+ (WebCore::ImageDecoder::isSizeAvailable):
+ (WebCore::ImageDecoder::setSize): Make public to avoid needing a friend declaration in the JPEG decoder, and because the ICO/BMP decoders will soon need this.
+ * platform/image-decoders/gif/GIFImageDecoder.cpp:
+ (WebCore::GIFImageDecoder::isSizeAvailable):
+ (WebCore::GIFImageDecoder::repetitionCount):
+ (WebCore::GIFImageDecoder::decode):
+ * platform/image-decoders/gif/GIFImageDecoder.h:
+ * platform/image-decoders/ico/ICOImageDecoder.cpp:
+ (WebCore::ICOImageDecoder::isSizeAvailable):
+ * platform/image-decoders/ico/ICOImageDecoder.h:
+ * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+ (WebCore::JPEGImageDecoder::isSizeAvailable):
+ (WebCore::JPEGImageDecoder::decode):
+ * platform/image-decoders/jpeg/JPEGImageDecoder.h:
+ * platform/image-decoders/png/PNGImageDecoder.cpp:
+ (WebCore::PNGImageDecoder::isSizeAvailable):
+ (WebCore::PNGImageDecoder::decode):
+ * platform/image-decoders/png/PNGImageDecoder.h:
+ * platform/image-decoders/xbm/XBMImageDecoder.cpp:
+ (WebCore::XBMImageDecoder::isSizeAvailable):
+ (WebCore::XBMImageDecoder::frameBufferAtIndex):
+ (WebCore::XBMImageDecoder::decode):
+ * platform/image-decoders/xbm/XBMImageDecoder.h: Rename decodeXBM() to decode() for consistency with the JPEG/PNG decoders, and in the future the ICO/BMP decoders.
+
+2009-06-17 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move some common functions out of platform files and into
+ the common implementation.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26425.
+ Add a new platform context method (flush) so that the
+ getWindowsContext method can be consolidated into the common
+ GraphicsContextWin.cpp file.
+
+ * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
+ (WebCore::GraphicsContextPlatformPrivate::flush):
+ * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
+ (WebCore::GraphicsContextPlatformPrivate::flush):
+ * platform/graphics/win/GraphicsContextCGWin.cpp: Remove
+ getWindowContext method.
+ * platform/graphics/win/GraphicsContextCairoWin.cpp: Remove
+ getWindowContext method and fillWithClearColor methods.
+ * platform/graphics/win/GraphicsContextWin.cpp:
+ (WebCore::fillWithClearColor): Moved from *CairoWin.cpp
+ (WebCore::GraphicsContext::getWindowsContext): Moved
+ from *CairoWin.cpp
+
+2009-06-18 Ojan Vafai <ojan@chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ Remove code that I accidentally committed in r44811.
+
+ * editing/markup.cpp:
+ (WebCore::createMarkup):
+
+2009-06-18 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6983207> Non-layer content is not re-rendered when transition
+ starts sometimes (with hardware acceleration).
+
+ When deciding which RenderLayers should be composited, when a layer goes into
+ compositing mode we repaint the old location. However, we did that before
+ we'd looked at all the factors that may force a layer to composite, so missed
+ some cases. Fix by doing the repaint once we really know whether it's going
+ to composite.
+
+ Test: compositing/repaint/become-overlay-composited-layer.html
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+
+2009-06-18 Simon Fraser <simon.fraser@apple.com>
+
+ Fix the Leopard build where USE(ACCELERATED_COMPOSITING) is not defined, and
+ the Tiger build where QTMovieLayer does not exist.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::createQTMovieLayer):
+ (WebCore::MediaPlayerPrivate::destroyQTMovieLayer):
+ (WebCore::MediaPlayerPrivate::currentRenderingMode):
+ (WebCore::MediaPlayerPrivate::setUpVideoRendering):
+ (WebCore::MediaPlayerPrivate::tearDownVideoRendering):
+ (WebCore::MediaPlayerPrivate::hasSetUpVideoRendering):
+
+2009-06-18 Simon Fraser <simon.fraser@apple.com>
+
+ Fix the Leopard build where USE(ACCELERATED_COMPOSITING) is not defined.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::currentRenderingMode):
+ (WebCore::MediaPlayerPrivate::setUpVideoRendering):
+ (WebCore::MediaPlayerPrivate::tearDownVideoRendering):
+
+2009-06-17 Erik Arvidsson <arv@chromium.org>
+
+ Reviewed by Adele Peterson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=15189
+ Adds the HTML5 input event support for textarea.
+
+ Also, moves the oninput attribute parse handling to HTMLElement so that
+ it can be set on any HTML element so that bubbling events can be handled
+ using HTML attribute handlers.
+
+ Test: fast/forms/textarea-input-event.html
+
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::parseMappedAttribute):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::parseMappedAttribute):
+ * rendering/RenderTextControlMultiLine.cpp:
+ (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
+
+2009-06-18 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ Share code between filterEffects
+ [https://bugs.webkit.org/show_bug.cgi?id=26479]
+
+ Share more code of filter effects. The imageBuffer creation can move to
+ FilterEffect ant every effect asks for the GraphicsContext. Move the
+ drawingRect calculation to FilterEffect.
+
+ * platform/graphics/filters/FilterEffect.cpp:
+ (WebCore::FilterEffect::calculateDrawingRect):
+ (WebCore::FilterEffect::getEffectContext):
+ * platform/graphics/filters/FilterEffect.h:
+ * platform/graphics/filters/SourceGraphic.cpp:
+ (WebCore::SourceGraphic::apply):
+ * svg/graphics/filters/SVGFEFlood.cpp:
+ (WebCore::FEFlood::apply):
+ * svg/graphics/filters/SVGFEOffset.cpp:
+ (WebCore::FEOffset::apply):
+
+2009-06-18 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26499
+
+ Support hardware-accelerationed rendering of video elements.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks):
+ (WebCore::HTMLMediaElement::mediaPlayerRepaint):
+ Just move these methods to group the render-related methods together.
+
+ (WebCore::HTMLMediaElement::mediaPlayerRenderingCanBeAccelerated):
+ Call out method to ask the RenderLayerCompositor if presentation of this video
+ can be acclerated. It might say no, if, for example, the video has a reflection.
+
+ (WebCore::HTMLMediaElement::mediaPlayerGraphicsLayer):
+ Fetch the GraphicsLayer from the RenderVideo that will host the movie layer.
+
+ * html/HTMLMediaElement.h:
+ Reordered the rendering-related methods, and added two methods related to video
+ acceleration.
+
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::MediaPlayer::acceleratedRenderingStateChanged):
+ Called by the rendering system when it determines that the video must go into, or
+ fall off of the hardware-accelerated path.
+
+ (WebCore::MediaPlayer::supportsAcceleratedRendering):
+ Method to say whether the media engine supports accelerated rendering.
+
+ * platform/graphics/MediaPlayer.h:
+ (WebCore::MediaPlayerClient::mediaPlayerRepaint):
+ (WebCore::MediaPlayerClient::mediaPlayerSizeChanged):
+ Moved.
+
+ (WebCore::MediaPlayerClient::mediaPlayerRenderingCanBeAccelerated):
+ (WebCore::MediaPlayerClient::mediaPlayerGraphicsLayer):
+ New methods to ask the client if the rendering system can support accelerated
+ rendering, and to get a GraphicsLayer to plug the movie layer into.
+
+ * platform/graphics/MediaPlayerPrivate.h:
+ (WebCore::MediaPlayerPrivateInterface::supportsAcceleratedRendering):
+ (WebCore::MediaPlayerPrivateInterface::acceleratedRenderingStateChanged):
+ Forwarding methods from MediaPlayer.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ Some new methods related to using a QTMovieLayer, and to simplify the rendering mode logic.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::createQTMovieLayer):
+ (WebCore::MediaPlayerPrivate::destroyQTMovieLayer):
+ Methods to create and destroy the QTMovieLayer.
+
+ (WebCore::MediaPlayerPrivate::currentRenderingMode):
+ (WebCore::MediaPlayerPrivate::preferredRenderingMode):
+ Methods to clarify the code that decides which of the 3 rendering modes to use.
+
+ (WebCore::MediaPlayerPrivate::setUpVideoRendering):
+ Changed to use the new rendering mode methods.
+
+ (WebCore::MediaPlayerPrivate::tearDownVideoRendering):
+ Destroy the layer if we have one.
+
+ (WebCore::MediaPlayerPrivate::hasSetUpVideoRendering):
+ Small utility method.
+
+ (WebCore::MediaPlayerPrivate::updateStates):
+ Move the call to setUpVideoRendering() to before we send out the state notifications,
+ so that we will have created the rendering objects already.
+
+ (WebCore::MediaPlayerPrivate::supportsAcceleratedRendering):
+ Return true if we have QTMovieLayer.
+
+ (WebCore::MediaPlayerPrivate::acceleratedRenderingStateChanged):
+ We've been told that we went into or out of accelerated mode; maybe reset
+ the renderer, and set the layer if we have to.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::rendererContentChanged):
+ We may need to udpate compositing layers if the video went into accelerated mode.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::canUseDirectCompositing):
+ Add smarts to deal with video, which allows us to avoid extra backing store.
+
+ (WebCore::RenderLayerBacking::contentsBox):
+ Use the videoBox to use the content layer for video layers.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::updateLayerCompositingState):
+ Poke the RenderVideo if the state changed.
+
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+ Handle an edge case when the video element itself is a stacking context
+ because of opacity or transform.
+
+ (WebCore::RenderLayerCompositor::canAccelerateVideoRendering):
+ (WebCore::RenderLayerCompositor::requiresCompositingLayer):
+ (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
+ Allow video to throw us into compositing mode if the media engine supports it.
+
+ * rendering/RenderLayerCompositor.h:
+ New methods related to video.
+
+ * rendering/RenderVideo.h:
+ * rendering/RenderVideo.cpp:
+ (WebCore::RenderVideo::updatePlayer):
+ Call rendererContentChanged() to give the compositor a change to throw the video into
+ compositing mode.
+
+ (WebCore::RenderVideo::supportsAcceleratedRendering):
+ (WebCore::RenderVideo::acceleratedRenderingStateChanged):
+ (WebCore::RenderVideo::videoGraphicsLayer):
+ Methods to allow the MediaPlayer to do rendering-related stuff via the media element.
+
+2009-06-18 Rob Buis <rwlbuis@gmail.com>
+
+ Reviewed by Niko.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26385
+ Root SVG element is not checked on requiredFeatures, requiredExtension like other elements
+
+ Also do the isValid check for outer <svg>.
+
+ Test: svg/custom/outer-svg-unknown-feature.svg
+
+ * svg/SVGDocument.cpp:
+ (WebCore::SVGDocument::childShouldCreateRenderer):
+ * svg/SVGDocument.h:
+
+2009-06-18 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - fix <rdar://problem/6913221> REGRESSION (Safari 3-4): Search field on
+ apple.com cuts entered text
+
+ Test: fast/forms/search-vertical-alignment.html
+
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::layout): Vertically center the
+ the search field's inner block.
+
+2009-06-18 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Fix compilation with Symbian WINSCW compiler, which produced
+ multiple definitions of the CSSPrimitiveValue conversion operators.
+
+ It turns out that they are defined inline but not declared inline.
+
+ Adding the inline keyword to the declaration fixes the build.
+
+ * css/CSSPrimitiveValue.h:
+
+2009-06-18 Markus Goetz <Markus.Goetz@nokia.com>
+
+ Reviewed by Simon Hausman.
+
+ Clarify in docs how to compile with debug information.
+
+ * WebCore.pro:
+
+2009-06-18 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] When writing an URL to the clipboard, save the corresponding title
+ in the mime data as well.
+
+ * platform/qt/ClipboardQt.cpp:
+ (WebCore::ClipboardQt::writeURL):
+
+2009-06-18 Jakub Wieczorek <faw217@gmail.com>
+
+ [Qt] Fix build. Add HTMLDataGridElement.
+
+ * WebCore.pro:
+
+2009-06-18 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Gtk build fix.
+
+ Add HTMLDataGridElement header and IDL to the build script.
+
+ * GNUmakefile.am:
+
+2009-06-18 Chris Evans <scarybeasts@gmail.com>
+
+ Reviewed by Adam Barth.
+
+ Fix 8-digit long hex entities. Fixes bug 26454
+ https://bugs.webkit.org/show_bug.cgi?id=26454
+
+ Test: fast/parser/eightdigithexentity.html
+
+ * html/HTMLTokenizer.cpp: fix off-by-ones.
+
+2009-06-18 David Levin <levin@chromium.org>
+
+ Fix chromium linux build.
+
+ Fixes a mistake that happened during the complicated merge for
+ landing r44775, r44776, r44777.
+
+ * rendering/RenderThemeChromiumLinux.cpp:
+ (WebCore::RenderThemeChromiumLinux::create):
+
+2009-06-17 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26499
+
+ First step to making video rendering be hardware-accelerated:
+ make <video> elements get self-painting RenderLayers, and add
+ an isVideo() virtual method to RenderObject.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::setReadyState):
+ (WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
+ (WebCore::HTMLMediaElement::mediaPlayerSizeChanged):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::shouldBeNormalFlowOnly):
+ (WebCore::RenderLayer::isSelfPaintingLayer):
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::isVideo):
+ * rendering/RenderVideo.h:
+ (WebCore::RenderVideo::requiresLayer):
+ (WebCore::RenderVideo::isVideo):
+
+2009-06-17 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Refactor a few common routines in the various Windows ports
+ and reduce some duplicated code.
+
+ (1) Create TransformationMatrix XFORM casting operator, and
+ switch various XFORM structure uses to utilize it.
+ (2) Push concatCTM call to GraphicsContextWin now that the
+ TransformationMatrix can directly create XFORM (rather
+ than converting to CGAffineTransform/cairo_matrix_t first.)
+
+ * WebCore.vcproj/WebCore.vcproj: Add new BitmapInfo structure.
+ * platform/graphics/transforms/TransformationMatrix.h:
+ * platform/graphics/win/GraphicsContextCGWin.cpp:
+ * platform/graphics/win/GraphicsContextCairoWin.cpp:
+ * platform/graphics/win/GraphicsContextWin.cpp:
+ (WebCore::GraphicsContextPlatformPrivate::scale):
+ (WebCore::GraphicsContextPlatformPrivate::rotate):
+ (WebCore::GraphicsContextPlatformPrivate::translate):
+ (WebCore::GraphicsContextPlatformPrivate::concatCTM):
+ * platform/graphics/win/TransformationMatrixWin.cpp: Added.
+ (WebCore::TransformationMatrix::operator XFORM): New operator
+
+2009-06-17 Brent Fulgham <bfulgham@webkit.org>
+
+ Non-CG Windows build fix after @r44758.
+
+ * rendering/RenderThemeWin.cpp:
+ (WebCore::RenderTheme::themeForPage):
+
+2009-06-17 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Refactor a few common routines in the various Windows ports
+ and reduce some duplicated code.
+ https://bugs.webkit.org/show_bug.cgi?id=26425.
+
+ Refactor use of BITMAPINFO for the new BitmapInfo structure.
+
+ * WebCore.vcproj/WebCore.vcproj:
+ * platform/win/BitmapInfo.cpp: Added.
+ (WebCore::bitmapInfoForSize):
+ (WebCore::BitmapInfo::create):
+ (WebCore::BitmapInfo::createBottomUp):
+ * platform/win/BitmapInfo.h: Added.
+ * platform/graphics/win/GraphicsContextCairoWin.cpp:
+ * platform/graphics/win/GraphicsContextCGWin.cpp:
+ * platform/graphics/win/TransformationMatrixWin.cpp: Added.
+ (WebCore::TransformationMatrix::operator XFORM): New operator
+ * platform/win/DragImageCGWin.cpp:
+ (WebCore::allocImage):
+ * platform/win/DragImageCairoWin.cpp:
+ (WebCore::allocImage):
+ * platform/win/PasteboardWin.cpp:
+ (WebCore::Pasteboard::writeImage):
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::paint):
+
+2009-06-17 Adam Roben <aroben@apple.com>
+
+ Remove unnecessary 6th parameter from SOFT_LINK_OPTIONAL
+
+ Reviewed by Mark Rowe.
+
+ * platform/graphics/win/ColorSafari.cpp: Removed the 6th parameter and
+ an unnecessary parameter name.
+ * platform/win/SoftLinking.h: Removed the unused 6th parameter.
+
+2009-06-17 Adam Roben <aroben@apple.com>
+
+ Make Settings::shouldPaintNativeControls default to true
+
+ This matches the default up in WebKit (that was changed in r43318).
+
+ Fixes Bug 26493: REGRESSION (r44758): First tab always uses Mac-style
+ form controls
+ <https://bugs.webkit.org/show_bug.cgi?id=26493>
+
+ Reviewed by Darin Adler and Dave Hyatt.
+
+ No test possible since DRT always uses Mac-style form controls.
+
+ * page/Settings.cpp: Changed the initial value of
+ gShouldPaintNativeControls to true.
+
+ * rendering/RenderThemeSafari.cpp:
+ (WebCore::RenderTheme::themeForPage): Added a FIXME about the design
+ flaw here involving querying Settings before it's been initialized.
+
+2009-06-17 David Levin <levin@chromium.org>
+
+ Fix chromium windows build.
+
+ A mistake that happened during the complicated merge for
+ landing r44775, r44776, r44777.
+
+ * rendering/RenderThemeChromiumWin.h:
+ (WebCore::RenderThemeChromiumWin::RenderThemeChromiumWin):
+ (WebCore::RenderThemeChromiumWin::~RenderThemeChromiumWin):
+
+2009-06-17 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/6981193> Crash in MediaControlInputElement::attachToParent
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaTextDisplayElement::attachToParent): NULL check element renderer or parent renderer.
+ (WebCore::MediaControlInputElement::attachToParent): Ditto.
+
+2009-06-17 David Hyatt <hyatt@apple.com>
+
+ Fix Windows build. There's no HTMLDataGridElement.cpp file yet.
+
+ * html/HTMLElementsAllInOne.cpp:
+
+2009-06-17 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben and Anders Carlsson.
+
+ Stub out the HTMLDataGridElement.
+
+ * DerivedSources.make:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCoreSources.bkl:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::adjustRenderStyle):
+ * editing/htmlediting.cpp:
+ (WebCore::canHaveChildrenForEditing):
+ * html/HTMLDataGridElement.h: Added.
+ (WebCore::HTMLDataGridElement::HTMLDataGridElement):
+ (WebCore::HTMLDataGridElement::tagPriority):
+ * html/HTMLDataGridElement.idl: Added.
+ * html/HTMLElement.cpp:
+ (WebCore::inlineTagList):
+ * html/HTMLParser.cpp:
+ (WebCore::HTMLParser::isAffectedByResidualStyle):
+ * html/HTMLTagNames.in:
+
+2009-06-17 David Levin <levin@chromium.org>
+
+ Reviewed by NOBODY (chromium build fix).
+
+ Fix typo in previous changes.
+
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::defaultGUIFont):
+
+2009-06-17 Albert J. Wong <ajwong@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26148
+ Remove common code from RenderThemeChromiumWin that is shared with
+ RenderThemeChromiumSkia.
+
+ Also move supportsControlTints to RenderThemeChromiumLinux since it
+ is linux specific.
+
+ There are no tests changed because this just removes functions with
+ duplicate implementations between the base and derived classes.
+
+ * rendering/RenderThemeChromiumLinux.cpp:
+ (WebCore::RenderThemeChromiumLinux::supportsControlTints):
+ * rendering/RenderThemeChromiumLinux.h:
+ * rendering/RenderThemeChromiumSkia.cpp:
+ * rendering/RenderThemeChromiumSkia.h:
+ * rendering/RenderThemeChromiumWin.cpp:
+ (WebCore::):
+ (WebCore::getNonClientMetrics):
+ (WebCore::RenderThemeChromiumWin::RenderThemeChromiumWin):
+ (WebCore::RenderThemeChromiumWin::~RenderThemeChromiumWin):
+ (WebCore::RenderThemeChromiumWin::systemFont):
+ (WebCore::RenderThemeChromiumWin::paintCheckbox):
+ (WebCore::RenderThemeChromiumWin::paintRadio):
+ (WebCore::RenderThemeChromiumWin::paintSliderThumb):
+ (WebCore::RenderThemeChromiumWin::caretBlinkIntervalInternal):
+ * rendering/RenderThemeChromiumWin.h:
+
+2009-06-17 Albert J. Wong <ajwong@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26148
+ Move RenderThemeChromiumSkia into its own file. This is purely a code move.
+
+ * rendering/RenderThemeChromiumLinux.cpp:
+ * rendering/RenderThemeChromiumLinux.h:
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::):
+ (WebCore::setSizeIfAuto):
+ (WebCore::mediaElementParent):
+ (WebCore::RenderThemeChromiumSkia::defaultGUIFont):
+ (WebCore::RenderThemeChromiumSkia::RenderThemeChromiumSkia):
+ (WebCore::RenderThemeChromiumSkia::~RenderThemeChromiumSkia):
+ (WebCore::RenderThemeChromiumSkia::extraDefaultStyleSheet):
+ (WebCore::RenderThemeChromiumSkia::extraQuirksStyleSheet):
+ (WebCore::RenderThemeChromiumSkia::extraMediaControlsStyleSheet):
+ (WebCore::RenderThemeChromiumSkia::supportsHover):
+ (WebCore::RenderThemeChromiumSkia::supportsFocusRing):
+ (WebCore::RenderThemeChromiumSkia::platformActiveSelectionBackgroundColor):
+ (WebCore::RenderThemeChromiumSkia::platformInactiveSelectionBackgroundColor):
+ (WebCore::RenderThemeChromiumSkia::platformActiveSelectionForegroundColor):
+ (WebCore::RenderThemeChromiumSkia::platformInactiveSelectionForegroundColor):
+ (WebCore::RenderThemeChromiumSkia::platformTextSearchHighlightColor):
+ (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
+ (WebCore::RenderThemeChromiumSkia::systemFont):
+ (WebCore::RenderThemeChromiumSkia::minimumMenuListSize):
+ (WebCore::RenderThemeChromiumSkia::paintCheckbox):
+ (WebCore::RenderThemeChromiumSkia::setCheckboxSize):
+ (WebCore::RenderThemeChromiumSkia::paintRadio):
+ (WebCore::RenderThemeChromiumSkia::setRadioSize):
+ (WebCore::brightenColor):
+ (WebCore::paintButtonLike):
+ (WebCore::RenderThemeChromiumSkia::paintButton):
+ (WebCore::RenderThemeChromiumSkia::paintTextField):
+ (WebCore::RenderThemeChromiumSkia::paintTextArea):
+ (WebCore::RenderThemeChromiumSkia::paintSearchField):
+ (WebCore::RenderThemeChromiumSkia::adjustSearchFieldCancelButtonStyle):
+ (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
+ (WebCore::RenderThemeChromiumSkia::adjustSearchFieldDecorationStyle):
+ (WebCore::RenderThemeChromiumSkia::adjustSearchFieldResultsDecorationStyle):
+ (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
+ (WebCore::RenderThemeChromiumSkia::adjustSearchFieldResultsButtonStyle):
+ (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
+ (WebCore::RenderThemeChromiumSkia::paintMediaButtonInternal):
+ (WebCore::RenderThemeChromiumSkia::paintMediaPlayButton):
+ (WebCore::RenderThemeChromiumSkia::paintMediaMuteButton):
+ (WebCore::RenderThemeChromiumSkia::adjustMenuListStyle):
+ (WebCore::RenderThemeChromiumSkia::paintMenuList):
+ (WebCore::RenderThemeChromiumSkia::adjustMenuListButtonStyle):
+ (WebCore::RenderThemeChromiumSkia::paintMenuListButton):
+ (WebCore::RenderThemeChromiumSkia::popupInternalPaddingLeft):
+ (WebCore::RenderThemeChromiumSkia::popupInternalPaddingRight):
+ (WebCore::RenderThemeChromiumSkia::popupInternalPaddingTop):
+ (WebCore::RenderThemeChromiumSkia::popupInternalPaddingBottom):
+ (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingLeft):
+ (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingRight):
+ (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingTop):
+ (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingBottom):
+ (WebCore::RenderThemeChromiumSkia::caretBlinkIntervalInternal):
+ (WebCore::RenderThemeChromiumSkia::menuListInternalPadding):
+ * rendering/RenderThemeChromiumSkia.h:
+ (WebCore::RenderThemeChromiumSkia::supportsControlTints):
+
+2009-06-17 Albert J. Wong <ajwong@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26148
+ Extract RenderThemeChromiumSkia out of RenderThemeChromiumLinux. This
+ is mostly a code shuffle. The non-suffle changes are:
+ 1) Creation of a caretBlinkIntervalInternal.
+ 2) Moving of some inline functions into the implementation files.
+ 3) Changing of defaultGUIFont into a static class constant from a
+ static function. Also the type is changed to String.
+ 4) Changing of defaultFontSize into a static class constant from a
+ static variable in the file scope.
+ 5) The static supportsFocus function was collapsed into
+ supportsFocusRing.
+ 6) Split the extraDefaultStyleSheet into Skia and Linux versions.
+
+ * rendering/RenderThemeChromiumLinux.cpp:
+ (WebCore::RenderThemeChromiumSkia::defaultGUIFont):
+ (WebCore::RenderThemeChromiumSkia::RenderThemeChromiumSkia):
+ (WebCore::RenderThemeChromiumSkia::~RenderThemeChromiumSkia):
+ (WebCore::RenderThemeChromiumSkia::extraDefaultStyleSheet):
+ (WebCore::RenderThemeChromiumSkia::extraQuirksStyleSheet):
+ (WebCore::RenderThemeChromiumSkia::extraMediaControlsStyleSheet):
+ (WebCore::RenderThemeChromiumSkia::supportsHover):
+ (WebCore::RenderThemeChromiumSkia::supportsFocusRing):
+ (WebCore::RenderThemeChromiumSkia::platformActiveSelectionBackgroundColor):
+ (WebCore::RenderThemeChromiumSkia::platformInactiveSelectionBackgroundColor):
+ (WebCore::RenderThemeChromiumSkia::platformActiveSelectionForegroundColor):
+ (WebCore::RenderThemeChromiumSkia::platformInactiveSelectionForegroundColor):
+ (WebCore::RenderThemeChromiumSkia::platformTextSearchHighlightColor):
+ (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
+ (WebCore::RenderThemeChromiumSkia::systemFont):
+ (WebCore::RenderThemeChromiumSkia::minimumMenuListSize):
+ (WebCore::RenderThemeChromiumSkia::paintCheckbox):
+ (WebCore::RenderThemeChromiumSkia::setCheckboxSize):
+ (WebCore::RenderThemeChromiumSkia::paintRadio):
+ (WebCore::RenderThemeChromiumSkia::setRadioSize):
+ (WebCore::RenderThemeChromiumSkia::paintButton):
+ (WebCore::RenderThemeChromiumSkia::paintTextField):
+ (WebCore::RenderThemeChromiumSkia::paintTextArea):
+ (WebCore::RenderThemeChromiumSkia::paintSearchField):
+ (WebCore::RenderThemeChromiumSkia::adjustSearchFieldCancelButtonStyle):
+ (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
+ (WebCore::RenderThemeChromiumSkia::adjustSearchFieldDecorationStyle):
+ (WebCore::RenderThemeChromiumSkia::adjustSearchFieldResultsDecorationStyle):
+ (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
+ (WebCore::RenderThemeChromiumSkia::adjustSearchFieldResultsButtonStyle):
+ (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
+ (WebCore::RenderThemeChromiumSkia::paintMediaButtonInternal):
+ (WebCore::RenderThemeChromiumSkia::paintMediaPlayButton):
+ (WebCore::RenderThemeChromiumSkia::paintMediaMuteButton):
+ (WebCore::RenderThemeChromiumSkia::adjustMenuListStyle):
+ (WebCore::RenderThemeChromiumSkia::paintMenuList):
+ (WebCore::RenderThemeChromiumSkia::adjustMenuListButtonStyle):
+ (WebCore::RenderThemeChromiumSkia::paintMenuListButton):
+ (WebCore::RenderThemeChromiumSkia::popupInternalPaddingLeft):
+ (WebCore::RenderThemeChromiumSkia::popupInternalPaddingRight):
+ (WebCore::RenderThemeChromiumSkia::popupInternalPaddingTop):
+ (WebCore::RenderThemeChromiumSkia::popupInternalPaddingBottom):
+ (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingLeft):
+ (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingRight):
+ (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingTop):
+ (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingBottom):
+ (WebCore::RenderThemeChromiumSkia::caretBlinkIntervalInternal):
+ (WebCore::RenderThemeChromiumLinux::RenderThemeChromiumLinux):
+ (WebCore::RenderThemeChromiumLinux::~RenderThemeChromiumLinux):
+ (WebCore::RenderThemeChromiumLinux::systemColor):
+ (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
+ (WebCore::RenderThemeChromiumSkia::menuListInternalPadding):
+ * rendering/RenderThemeChromiumLinux.h:
+
+2009-06-17 Adam Roben <aroben@apple.com>
+
+ Add a SOFT_LINK_OPTIONAL macro
+
+ This macro is useful when soft-linking functions that are present in
+ only some versions of a particular library (e.g., APIs added in
+ Windows Vista that aren't available on Windows XP).
+
+ Reviewed by Ada Chan.
+
+ * platform/graphics/win/ColorSafari.cpp:
+ (WebCore::focusRingColor):
+ Use the SoftLinking.h macros instead of doing the soft-link ourselves.
+ Also removed an unused call to focusRingColor.isValid().
+
+ * platform/win/SoftLinking.h: Added SOFT_LINK_OPTIONAL.
+
+2009-06-17 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Gustavo Noronha.
+
+ Fixes: https://bugs.webkit.org/show_bug.cgi?id=26470.
+ The use of zero-width or zero-height rectangles in generating
+ gradients caused Windows Cairo to crash, and webkitgtk to
+ produce invalid images.
+
+ We now test for NaN in the phase argument, which is calculated
+ using fmodf and can blow up when the width/height values passed
+ are zero.
+
+ Test: fast/gradients/border-image-gradient-sides-and-corners.html
+
+ * platform/graphics/cairo/ImageCairo.cpp:
+ (WebCore::Image::drawPattern):
+
+2009-06-17 Ojan Vafai <ojan@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ If loading a font fails because of the sandbox, we ask the browser process to
+ try to load it by calling ensureFontLoaded. If it still fails after
+ ensureFontLoaded, we hit a ASSERT_NOT_REACHED.
+
+ This case happens once in a while during browser shutdown. The browser will
+ queue a message to the renderer to shutdown, and will then stop answering sync
+ messages from the renderer. If the renderer is still loading a page during this
+ time, it might try to call the browser process to ask to load a font. The
+ browser process will ignore the request, and the font will fail to load, even
+ after the second try.
+
+ This is unfortunate, but there is no real risk here, since the renderer will be
+ going away as soon as it processes another message.
+
+ This can't be layout tested as it depends on the sandbox.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26484
+
+ * platform/graphics/chromium/FontCacheChromiumWin.cpp:
+ (WebCore::fontContainsCharacter):
+
+2009-06-17 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26482
+ <rdar://problem/6978590> When setting playback rate to 0, the audio element stops
+ playing (doesn't resume later)
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::setRate): Always set the rate, even when "paused".
+
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+ (WebCore::MediaPlayerPrivate::setRate): Ditto.
+
+2009-06-17 Adam Roben <aroben@apple.com>
+
+ Add all the generated JS*.cpp files back to WebCore.vcproj
+
+ They are not compiled by the vcproj directly. Instead they are
+ compiled as part of DerivedSources.cpp. Having them listed in the
+ vcproj makes them be included in Project Find, etc.
+
+ Rubber-stamped in advance by Steve Falkenburg.
+
+ * WebCore.vcproj/WebCore.vcproj:
+
+2009-06-17 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Don't fire redundant 'change' events for a file upload form.
+ https://bugs.webkit.org/show_bug.cgi?id=26471
+
+ * platform/FileChooser.cpp:
+ (WebCore::FileChooser::chooseFiles): Suppress change event if the
+ existing selected files and the incoming selected files are equal.
+ (WebCore::FileChooser::chooseIcon): Returns 0 if there is no selected
+ files.
+
+2009-06-17 Adam Treat <adam.treat@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ https://bugs.webkit.org/show_bug.cgi?id=23155
+ Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
+
+ * platform/KeyboardCodes.h:
+
+2009-06-17 George Staikos <george.staikos@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=23155
+ Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::getWindowsContext):
+ * platform/win/SystemTimeWin.cpp:
+ (WebCore::userIdleTime):
+
+2009-06-17 Adam Roben <aroben@apple.com>
+
+ Speculative Mac build fix
+
+ * page/Page.h: Forward-declare RenderTheme instead of including
+ RenderTheme.h so that we don't need to make RenderTheme.h a private
+ header for WebKit's benefit.
+
+ * editing/SelectionController.cpp:
+ * rendering/InlineTextBox.cpp:
+ * rendering/RenderObject.cpp:
+ Added #includes of RenderTheme.h.
+
+2009-06-17 Adam Roben <aroben@apple.com>
+
+ Speculative Mac build fix
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderTheme::create): Added.
+
+2009-06-17 Adam Roben <aroben@apple.com>
+
+ Speculative Mac build fix
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderTheme::themeForPage): Remove the name of an unused
+ parameter.
+
+2009-06-17 Adam Roben <aroben@apple.com>
+
+ Speculative Mac build fix
+
+ * page/Page.cpp:
+ (WebCore::Page::Page): Change the initializer order to match the
+ declaration order.
+
+2009-06-16 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
+
+ Reviewed by Simon Hausmann.
+
+ Follow up to bug https://bugs.webkit.org/show_bug.cgi?id=26278
+ Patch that make WebCore have a RenderTheme per page
+
+ Make the Qt implementation of RenderTheme create a theme per page,
+ and use the QStyle associated with the view of each page, in order
+ to make the QWidget setStyle() method work as advertised.
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::RenderThemeQt):
+ (WebCore::RenderThemeQt::qStyle):
+ (WebCore::findFrameLineWidth):
+ (WebCore::inflateButtonRect):
+ (WebCore::RenderThemeQt::adjustRepaintRect):
+ (WebCore::RenderThemeQt::isControlStyled):
+ (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
+ (WebCore::RenderThemeQt::setButtonPadding):
+ (WebCore::RenderThemeQt::paintButton):
+ (WebCore::RenderThemeQt::paintTextField):
+ (WebCore::RenderThemeQt::setPopupPadding):
+ * platform/qt/RenderThemeQt.h:
+
+2009-06-16 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
+
+ Reviewed by Dave Hyatt and Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26278
+ Patch that make WebCore have a RenderTheme per page
+
+
+ Create a different RenderTheme per page, so that RenderTheme has
+ access to page specific theming. This is needed for the Qt port, as Qt
+ supports setting the theme (style) per widget.
+
+ This change was suggested and discussed with Dave Hyatt.
+
+ More detailed:
+
+ 1) Create a theme per page or one global one, depending on the needs
+ of the platform.
+ 2) Add an accesser to the theme from RenderObject.
+ 3) Change all uses of the theming to access the theme through
+ RenderObject, using the global default theme as fallback, when the
+ document of RenderObject has no page.
+ When we don't have access to a RenderObject, use the default theme.
+ 4) Modify all RenderTheme platform implementations to work with the
+ above changes, still creating only one global theme.
+
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::boundingBoxRect):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::loadFullDefaultStyle):
+ (WebCore::CSSStyleSelector::styleForElement):
+ (WebCore::CSSStyleSelector::adjustRenderStyle):
+ (WebCore::CSSStyleSelector::applyProperty):
+ * dom/ContainerNode.cpp:
+ (WebCore::ContainerNode::setActive):
+ (WebCore::ContainerNode::setHovered):
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::focusedOrActiveStateChanged):
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::parseMappedAttribute):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::setChecked):
+ (WebCore::HTMLInputElement::setIndeterminate):
+ * page/Frame.cpp:
+ (WebCore::Frame::selectionLayoutChanged):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::updateControlTints):
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ * page/Page.h:
+ (WebCore::Page::theme):
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::paintRow):
+ * platform/gtk/RenderThemeGtk.cpp:
+ (WebCore::RenderThemeGtk::create):
+ (WebCore::RenderTheme::themeForPage):
+ (WebCore::RenderThemeGtk::RenderThemeGtk):
+ (WebCore::RenderThemeGtk::~RenderThemeGtk):
+ (WebCore::RenderThemeGtk::gtkEntry):
+ (WebCore::RenderThemeGtk::gtkTreeView):
+ * platform/gtk/RenderThemeGtk.h:
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::create):
+ (WebCore::RenderTheme::themeForPage):
+ * platform/qt/RenderThemeQt.h:
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::paint):
+ * rendering/RenderMediaControls.cpp:
+ (WebCore::determineState):
+ * platform/wx/RenderThemeWx.cpp:
+ (WebCore::RenderThemeWx::create):
+ (WebCore::RenderTheme::themeForPage):
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::paintTextMatchMarker):
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlInputElement::hitTest):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::theme):
+ * rendering/RenderObject.h:
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::adjustStyle):
+ * rendering/RenderTheme.h:
+ (WebCore::RenderTheme::defaultTheme):
+ * rendering/RenderThemeChromiumLinux.cpp:
+ (WebCore::RenderThemeChromiumLinux::create):
+ (WebCore::RenderTheme::themeForPage):
+ * rendering/RenderThemeChromiumLinux.h:
+ (WebCore::RenderThemeChromiumLinux::~RenderThemeChromiumLinux):
+ * rendering/RenderThemeChromiumMac.h:
+ * rendering/RenderThemeChromiumMac.mm:
+ (WebCore::RenderThemeChromiumMac::create):
+ (WebCore::RenderTheme::themeForPage):
+ * rendering/RenderThemeChromiumWin.cpp:
+ (WebCore::RenderThemeChromiumWin::create):
+ (WebCore::RenderTheme::themeForPage):
+ * rendering/RenderThemeChromiumWin.h:
+ (WebCore::RenderThemeChromiumWin::RenderThemeChromiumWin):
+ (WebCore::RenderThemeChromiumWin::~RenderThemeChromiumWin):
+ * rendering/RenderThemeMac.h:
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderTheme::themeForPage):
+ * rendering/RenderThemeSafari.cpp:
+ (WebCore::RenderThemeSafari::create):
+ (WebCore::RenderTheme::themeForPage):
+ * rendering/RenderThemeSafari.h:
+ * rendering/RenderThemeWin.cpp:
+ (WebCore::RenderThemeWin::create):
+ (WebCore::RenderTheme::themeForPage):
+ * rendering/RenderThemeWin.h:
+
+2009-06-17 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/6974175> ASSERT in JITStubs.cpp at appsaccess.apple.com
+
+ JSDOMWindowCustom was using PropertySlot::putValue, however this interface
+ appears to be fundaementally incorrect - PropertySlots are only used to get
+ values, all puts use PutPropertySlot. However PutPropertySlot cannot be
+ used in the fashion desired here - it only reports the caching type of a
+ write that has been performed.
+
+ (This caused a bug where the put should have triggered a transition, and
+ failed to do so.)
+
+ Removing the faulty case from the optimization leads to a ~0.5% progression
+ on in-browser SunSpider (presumably the very first case was not being hit
+ often, and the simplification here is beneficial).
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::put):
+
+2009-06-17 David Levin <levin@chromium.org>
+
+ Reviewed by NOBODY, layout tests fix.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26326
+ This reverts commit r44751.
+
+ Once that change was checked scrollbars/scrollbar-orientation.html started
+ crashing on Windows.
+
+ * dom/Document.cpp:
+ (WebCore::Document::detach):
+ * page/FrameView.cpp:
+ * page/FrameView.h:
+ * platform/Scrollbar.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::destroy):
+ * rendering/RenderScrollbar.h:
+
+2009-06-16 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ In ImageSource::setData, delete the old m_encoder before replacing it with a new one.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26458
+
+ * platform/graphics/wx/ImageSourceWx.cpp:
+ (WebCore::ImageSource::setData):
+
+2009-06-16 David Levin <levin@chromium.org>
+
+ Reviewed by David Hyatt.
+
+ REGRESSION: When the main page (ScrollView) has a custom scrollbar, it crashes on destruction.
+ https://bugs.webkit.org/show_bug.cgi?id=26326
+
+ Test: scrollbars/scrollbar-crash-on-refresh.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::detach):
+ Gives the FrameView a change to do any necessary cleanup on
+ Document::detach() which is where the renderArena gets detroyed.
+ * page/FrameView.cpp:
+ (WebCore::FrameView::detachCustomScrollbars):
+ Gets rid of any custom scrollbars (if the docment supplied them).
+ * page/FrameView.h:
+ * platform/Scrollbar.h:
+ (WebCore::Scrollbar::isCustomScrollbar):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::destroy):
+ Removed the check for document()->frame(). If frame() is 0 in this code,
+ then the call to animation() is also incorrect (since it does document()->frame()->animation()).
+ * rendering/RenderScrollbar.h:
+ (WebCore::RenderScrollbar::isCustomScrollbar):
+
+2009-06-16 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Fix of <rdar://6967547> Ctrl-C copies null value erasing text in clipboard in Safari.
+ This patch kept the way events were firing as they were before, and Windows events are
+ consistent with Mac.
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::tryDHTMLCopy): Added check for canCopy() before clearing PasteBoard
+ (WebCore::Editor::tryDHTMLCut): Added check for canCut() before clearing PasteBoard
+
+2009-06-16 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ <rdar://problem/6660037> CrashTracer: [USER] 46 crashes in Safari at com.apple.WebCore • WebCore::CachedCSSStyleSheet::addClient 53
+
+ When revalidating a resource, calling addClient() on one client might cause another to get removed.
+
+ - made CachedResource::addClient() non-virtual and added virtual didAddClient()
+ - in CachedResource::switchClientsToRevalidatedResource() add all clients to the client set of the revalidated resource first
+ - check if the client is still in the set before invoking didAddClient() for it
+
+ No test case, I didn't manage to construct one. You need some combination of 304 revalidation, stylesheets that
+ reference each other via @imports and reloading.
+
+ * WebCore.base.exp:
+ * loader/CachedCSSStyleSheet.cpp:
+ (WebCore::CachedCSSStyleSheet::didAddClient):
+ * loader/CachedCSSStyleSheet.h:
+ * loader/CachedFont.cpp:
+ (WebCore::CachedFont::didAddClient):
+ * loader/CachedFont.h:
+ * loader/CachedImage.cpp:
+ (WebCore::CachedImage::didAddClient):
+ * loader/CachedImage.h:
+ * loader/CachedResource.cpp:
+ (WebCore::CachedResource::addClient):
+ (WebCore::CachedResource::addClientToSet):
+ (WebCore::CachedResource::switchClientsToRevalidatedResource):
+ * loader/CachedResource.h:
+ * loader/CachedScript.cpp:
+ (WebCore::CachedScript::didAddClient):
+ * loader/CachedScript.h:
+ * loader/CachedXSLStyleSheet.cpp:
+ (WebCore::CachedXSLStyleSheet::didAddClient):
+ * loader/CachedXSLStyleSheet.h:
+
+2009-06-16 Simon Fraser <simon.fraser@apple.com>
+
+ No Review
+
+ Fix code inside an #ifdef that draws the video framerate.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::paint):
+
+2009-06-16 Jian Li <jianli@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Bug 26456: Hook up V8 bindings for Worker's importScripts functionality.
+ https://bugs.webkit.org/show_bug.cgi?id=26456
+
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8WorkerCustom.cpp: Fixed missing exception code
+ handling in Worker constructor for V8 bindings.
+ (WebCore::CALLBACK_FUNC_DECL):
+
+2009-06-16 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Update of https://bugs.webkit.org/show_bug.cgi?id=26353.
+ Provide an assignment operator to avoid improper reference
+ counts on the Cairo font objects. This brings the Windows
+ Cairo port in line with the GTKport.
+
+ * platform/graphics/win/FontPlatformData.h:
+ * platform/graphics/win/FontPlatformDataCairoWin.cpp:
+ (WebCore::FontPlatformData::FontPlatformData):
+ (WebCore::FontPlatformData::operator=):
+
+2009-06-16 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Fix for <rdar://problem/6890126> Theme code should fetch the MediaControlElementType from
+ the MediaControlInputElement, rather than computing it again
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::percentLoaded): New, utility function for controller implementation.
+ * html/HTMLMediaElement.h:
+
+ * rendering/MediaControlElements.h:
+ (WebCore::MediaControlInputElement::displayType): New, return m_displayType.
+
+ * rendering/RenderMediaControls.cpp:
+ (WebCore::RenderMediaControls::paintMediaControlsPart): Stop using MediaPlayer object, get button
+ state from the button itself and get movie state from HTMLMediaElement.
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintMediaMuteButton): Get state from button instead of MediaPlayer.
+ (WebCore::RenderThemeMac::paintMediaPlayButton): Ditto.
+
+2009-06-16 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ Bug 26450: Rename values of enum RedirectOriginCheck to make them
+ clearer.
+ https://bugs.webkit.org/show_bug.cgi?id=26450
+
+ * loader/DocumentThreadableLoader.cpp:
+ (WebCore::DocumentThreadableLoader::create):
+ (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
+ (WebCore::DocumentThreadableLoader::willSendRequest):
+ * loader/DocumentThreadableLoader.h:
+ * loader/ThreadableLoader.cpp:
+ (WebCore::ThreadableLoader::create):
+ (WebCore::ThreadableLoader::loadResourceSynchronously):
+ * loader/ThreadableLoader.h:
+ * workers/Worker.cpp:
+ (WebCore::Worker::Worker):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::importScripts):
+ * loader/WorkerThreadableLoader.cpp:
+ (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
+ (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
+ (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
+ (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
+ * loader/WorkerThreadableLoader.h:
+ (WebCore::WorkerThreadableLoader::create):
+ * workers/WorkerScriptLoader.cpp:
+ (WebCore::WorkerScriptLoader::loadSynchronously):
+ (WebCore::WorkerScriptLoader::loadAsynchronously):
+ * workers/WorkerScriptLoader.h:
+ (WebCore::WorkerContext::importScripts):
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::loadRequestAsynchronously):
+
+2009-06-16 Tony Chang <tony@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Fix a UMR in WebCore::BitStack by initializing new memory to 0.
+ https://bugs.webkit.org/show_bug.cgi?id=26449
+ No new tests, covered by purify.
+
+ * editing/TextIterator.cpp:
+ (WebCore::BitStack::push):
+
+2009-06-16 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Xan Lopez.
+
+ Test: fast/multicol/columns-shorthand-parsing.html
+
+ Fixes https://bugs.webkit.org/show_bug.cgi?id=26453.
+ Null Cairo contextwill crash Windows Cairo build.
+
+ * platform/graphics/win/GraphicsContextCairoWin.cpp:
+ (WebCore::GraphicsContextPlatformPrivate::syncContext):
+ Add a check for null context before attempting to
+ retrieve the Cairo surface.
+
+2009-06-16 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26447
+ Fix animated GIF breakage in Cairo/wx ports.
+
+ * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
+ (WebCore::RGBA32Buffer::copyBitmapData):
+ (WebCore::RGBA32Buffer::operator=):
+ * platform/image-decoders/wx/ImageDecoderWx.cpp:
+ (WebCore::RGBA32Buffer::copyBitmapData):
+ (WebCore::RGBA32Buffer::operator=):
+
+2009-06-16 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by John Sullivan
+
+ <rdar://problem/6937882>
+
+ Tweak "time remaining" and "time elapsed" fields in the overlay video controller.
+
+ * css/mediaControlsQT.css:
+
+2009-06-16 Jian Li <jianli@chromium.org>
+
+ Reviewed by Adam Barth and David Levin.
+
+ Bug 26146: Change to use ThreadableLoader to load the worker script
+ in order to check URL origin for redirection.
+ https://bugs.webkit.org/show_bug.cgi?id=26146
+
+ Test: http/tests/workers/worker-redirect.html
+
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * workers/Worker.cpp:
+ (WebCore::Worker::Worker):
+ (WebCore::Worker::notifyFinished):
+ * workers/Worker.h:
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::importScripts):
+ * workers/WorkerImportScriptsClient.cpp: Removed.
+ * workers/WorkerImportScriptsClient.h: Removed.
+ * workers/WorkerScriptLoader.cpp: Renamed from workers/WorkerImportScriptsClient.cpp.
+ This to make it more generic so worker script loading could use it.
+ (WebCore::WorkerScriptLoader::loadSynchronously):
+ (WebCore::WorkerScriptLoader::loadAsynchronously):
+ (WebCore::WorkerScriptLoader::didFinishLoading):
+ (WebCore::WorkerScriptLoader::didFail):
+ (WebCore::WorkerScriptLoader::didFailRedirectCheck):
+ (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation):
+ (WebCore::WorkerScriptLoader::notifyFinished):
+ * workers/WorkerScriptLoader.h: Renamed from workers/WorkerImportScriptsClient.h.
+ This to make it more generic so worker script loading could use it.
+ * workers/WorkerScriptLoaderClient.h: Added.
+
+2009-06-16 Brent Fulgham <bfulgham@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Use consistent GUID comparison functions.
+ https://bugs.webkit.org/show_bug.cgi?id=26427
+
+ * platform/win/WCDataObject.cpp:
+ (WebCore::WCDataObject::QueryInterface):
+
+2009-06-16 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Fix compiler warning.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (webkit_accessible_class_init):
+
+2009-08-07 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27424
+
+ * WebKit/gtk/gdom/ConvertToGCharPrivate.h: Added.
+ (copyAsGChar): added to help GObject bindings convert various types to glib's gchar*
+
+2009-06-16 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Remove dummy AtkStreamableContent implementation.
+
+ It's completely empty, we'll add it back (and conditionally
+ instead of unconditionally) when it does something.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (GetAtkInterfaceTypeFromWAIType):
+ (getInterfaceMaskFromObject):
+
+== Rolled over to ChangeLog-2009-06-16 ==
diff --git a/WebCore/Configurations/FeatureDefines.xcconfig b/WebCore/Configurations/FeatureDefines.xcconfig
index cd462d6..24589c7 100644
--- a/WebCore/Configurations/FeatureDefines.xcconfig
+++ b/WebCore/Configurations/FeatureDefines.xcconfig
@@ -26,6 +26,9 @@
// WebCore and WebKit. Also the default values of the ENABLE_FEATURE_NAME macros in build-webkit
// should match the values below, but they do not need to be in the same order.
+// Keep this list of features (not enabled/disabled state) in sync with FeatureDefines.vsprops
+// and FeatureDefinesCairo.vsprops in WebKitLibraries/win/tools/vsprops.
+
// Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature.
ENABLE_3D_CANVAS = $(ENABLE_3D_CANVAS_$(MAC_OS_X_VERSION_MAJOR));
@@ -39,14 +42,16 @@ ENABLE_3D_RENDERING_1060 = ENABLE_3D_RENDERING;
ENABLE_3D_RENDERING_1070 = ENABLE_3D_RENDERING;
ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
+ENABLE_CLIENT_BASED_GEOLOCATION = ENABLE_CLIENT_BASED_GEOLOCATION;
ENABLE_DATABASE = ENABLE_DATABASE;
-ENABLE_DATAGRID = ENABLE_DATAGRID;
+ENABLE_DATAGRID = ;
ENABLE_DATALIST = ENABLE_DATALIST;
ENABLE_DOM_STORAGE = ENABLE_DOM_STORAGE;
ENABLE_EVENTSOURCE = ENABLE_EVENTSOURCE;
ENABLE_FILTERS = ENABLE_FILTERS;
-ENABLE_GEOLOCATION = ;
+ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
ENABLE_ICONDATABASE = ENABLE_ICONDATABASE;
+ENABLE_INDEXED_DATABASE = ;
ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER;
ENABLE_MATHML = ;
ENABLE_NOTIFICATIONS = ;
@@ -63,7 +68,8 @@ ENABLE_VIDEO = ENABLE_VIDEO;
ENABLE_WEB_SOCKETS = ENABLE_WEB_SOCKETS;
ENABLE_WML = ;
ENABLE_WORKERS = ENABLE_WORKERS;
+ENABLE_XHTMLMP = ;
ENABLE_XPATH = ENABLE_XPATH;
ENABLE_XSLT = ENABLE_XSLT;
-FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(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_WML) $(ENABLE_WORKERS) $(ENABLE_XPATH) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(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_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
diff --git a/WebCore/Configurations/Version.xcconfig b/WebCore/Configurations/Version.xcconfig
index b3bf41d..75f9bd4 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 = 532;
-MINOR_VERSION = 6;
+MINOR_VERSION = 9;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/WebCore/Configurations/WebCore.xcconfig b/WebCore/Configurations/WebCore.xcconfig
index 042ed0e..f122e35 100644
--- a/WebCore/Configurations/WebCore.xcconfig
+++ b/WebCore/Configurations/WebCore.xcconfig
@@ -39,7 +39,9 @@ INSTALL_PATH = $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Fram
INSTALLHDRS_COPY_PHASE = YES;
INSTALLHDRS_SCRIPT_PHASE = YES;
PRODUCT_NAME = WebCore;
-OTHER_LDFLAGS = -l$(SQLITE3_LIBRARY) -lobjc -sub_library libobjc -umbrella WebKit;
+UMBRELLA_LDFLAGS = -umbrella WebKit;
+VISIBILITY_LDFLAGS = ;
+OTHER_LDFLAGS = -l$(SQLITE3_LIBRARY) -lobjc -sub_library libobjc $(UMBRELLA_LDFLAGS) $(VISIBILITY_LDFLAGS);
JAVASCRIPTCORE_PRIVATE_HEADERS_DIR = $(JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_$(REAL_PLATFORM_NAME)_$(CONFIGURATION));
JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_macosx_Release = $(JAVASCRIPTCORE_PRIVATE_HEADERS_engineering);
diff --git a/WebCore/DerivedSources.cpp b/WebCore/DerivedSources.cpp
index e96b606..17d8ad9 100644
--- a/WebCore/DerivedSources.cpp
+++ b/WebCore/DerivedSources.cpp
@@ -29,6 +29,7 @@
#include "JSAttr.cpp"
#include "JSBarInfo.cpp"
#include "JSBeforeLoadEvent.cpp"
+#include "JSBlob.cpp"
#include "JSCanvasGradient.cpp"
#include "JSCanvasPattern.cpp"
#include "JSCanvasRenderingContext.cpp"
@@ -44,6 +45,7 @@
#include "JSComment.cpp"
#include "JSCompositionEvent.cpp"
#include "JSConsole.cpp"
+#include "JSCoordinates.cpp"
#include "JSCounter.cpp"
#include "JSCSSCharsetRule.cpp"
#include "JSCSSFontFaceRule.cpp"
@@ -82,6 +84,8 @@
#include "JSEventSource.cpp"
#include "JSFile.cpp"
#include "JSFileList.cpp"
+#include "JSGeolocation.cpp"
+#include "JSGeoposition.cpp"
#include "JSHistory.cpp"
#include "JSHTMLAllCollection.cpp"
#include "JSHTMLAnchorElement.cpp"
@@ -182,6 +186,7 @@
#include "JSPlugin.cpp"
#include "JSPluginArray.cpp"
#include "JSPopStateEvent.cpp"
+#include "JSPositionError.cpp"
#include "JSProcessingInstruction.cpp"
#include "JSProgressEvent.cpp"
#include "JSRange.cpp"
diff --git a/WebCore/DerivedSources.make b/WebCore/DerivedSources.make
index 8191222..6d8a6d5 100644
--- a/WebCore/DerivedSources.make
+++ b/WebCore/DerivedSources.make
@@ -53,6 +53,7 @@ DOM_CLASSES = \
Attr \
BarInfo \
BeforeLoadEvent \
+ Blob \
CDATASection \
CSSCharsetRule \
CSSFontFaceRule \
@@ -75,6 +76,7 @@ DOM_CLASSES = \
WebGLArrayBuffer \
WebGLBuffer \
WebGLByteArray \
+ WebGLContextAttributes \
WebGLFloatArray \
WebGLFramebuffer \
CanvasGradient \
@@ -449,6 +451,7 @@ all : \
SVGNames.cpp \
UserAgentStyleSheets.h \
XLinkNames.cpp \
+ XMLNSNames.cpp \
XMLNames.cpp \
MathMLElementFactory.cpp \
MathMLNames.cpp \
@@ -635,6 +638,9 @@ endif
JSHTMLElementWrapperFactory.cpp : HTMLNames.cpp
+XMLNSNames.cpp : dom/make_names.pl xml/xmlnsattrs.in
+ perl -I $(WebCore)/bindings/scripts $< --attrs $(WebCore)/xml/xmlnsattrs.in
+
XMLNames.cpp : dom/make_names.pl xml/xmlattrs.in
perl -I $(WebCore)/bindings/scripts $< --attrs $(WebCore)/xml/xmlattrs.in
@@ -742,8 +748,8 @@ endif
ifeq ($(findstring ENABLE_MATHML,$(FEATURE_DEFINES)), ENABLE_MATHML)
-MathMLElementFactory.cpp MathMLNames.cpp : dom/make_names.pl mathml/mathtags.in
- perl -I $(WebCore)/bindings/scripts $< --tags $(WebCore)/mathml/mathtags.in --factory --wrapperFactory
+MathMLElementFactory.cpp MathMLNames.cpp : dom/make_names.pl mathml/mathtags.in mathml/mathattrs.in
+ perl -I $(WebCore)/bindings/scripts $< --tags $(WebCore)/mathml/mathtags.in --attrs $(WebCore)/mathml/mathattrs.in --factory --wrapperFactory
else
@@ -850,6 +856,11 @@ ifeq ($(findstring ENABLE_VIDEO,$(FEATURE_DEFINES)), ENABLE_VIDEO)
WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.Video.exp
endif
+
+ifeq ($(findstring ENABLE_CLIENT_BASED_GEOLOCATION,$(FEATURE_DEFINES)), ENABLE_CLIENT_BASED_GEOLOCATION)
+ WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.ClientBasedGeolocation.exp
+endif
+
WebCore.exp : WebCore.base.exp $(WEBCORE_EXPORT_DEPENDENCIES)
cat $^ > $@
diff --git a/WebCore/DerivedSources.pro b/WebCore/DerivedSources.pro
new file mode 100644
index 0000000..c4b94a4
--- /dev/null
+++ b/WebCore/DerivedSources.pro
@@ -0,0 +1,31 @@
+# DerivedSources - qmake build info
+
+TEMPLATE = lib
+TARGET = dummy
+
+CONFIG -= debug_and_release
+
+QMAKE_EXTRA_TARGETS += generated_files
+
+defineTest(addExtraCompiler) {
+ eval($${1}.CONFIG = target_predeps no_link)
+ eval($${1}.variable_out =)
+ eval($${1}.dependency_type = TYPE_C)
+
+ wkScript = $$eval($${1}.wkScript)
+ eval($${1}.depends += $$wkScript)
+
+ export($${1}.CONFIG)
+ export($${1}.variable_out)
+ export($${1}.dependency_type)
+ export($${1}.depends)
+
+ QMAKE_EXTRA_COMPILERS += $$1
+ generated_files.depends += compiler_$${1}_make_all
+ export(QMAKE_EXTRA_COMPILERS)
+ export(generated_files.depends)
+ return(true)
+}
+
+include(WebCore.pri)
+
diff --git a/WebCore/English.lproj/localizedStrings.js b/WebCore/English.lproj/localizedStrings.js
index e18a163..637d4a6 100644
--- a/WebCore/English.lproj/localizedStrings.js
+++ b/WebCore/English.lproj/localizedStrings.js
Binary files differ
diff --git a/WebCore/ForwardingHeaders/runtime/StringBuilder.h b/WebCore/ForwardingHeaders/runtime/StringBuilder.h
new file mode 100644
index 0000000..115db06
--- /dev/null
+++ b/WebCore/ForwardingHeaders/runtime/StringBuilder.h
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_StringBuilder_h
+#define WebCore_FWD_StringBuilder_h
+#include <JavaScriptCore/StringBuilder.h>
+#endif
diff --git a/WebCore/ForwardingHeaders/runtime/UStringImpl.h b/WebCore/ForwardingHeaders/runtime/UStringImpl.h
new file mode 100644
index 0000000..94167a4
--- /dev/null
+++ b/WebCore/ForwardingHeaders/runtime/UStringImpl.h
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_UStringImpl_h
+#define WebCore_FWD_UStringImpl_h
+#include <JavaScriptCore/UStringImpl.h>
+#endif
diff --git a/WebCore/ForwardingHeaders/runtime/WeakGCMap.h b/WebCore/ForwardingHeaders/runtime/WeakGCMap.h
new file mode 100644
index 0000000..89432a8
--- /dev/null
+++ b/WebCore/ForwardingHeaders/runtime/WeakGCMap.h
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_WeakGCMap_h
+#define WebCore_FWD_WeakGCMap_h
+#include <JavaScriptCore/WeakGCMap.h>
+#endif
diff --git a/WebCore/ForwardingHeaders/wtf/StringHashFunctions.h b/WebCore/ForwardingHeaders/wtf/StringHashFunctions.h
new file mode 100644
index 0000000..72c1194
--- /dev/null
+++ b/WebCore/ForwardingHeaders/wtf/StringHashFunctions.h
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_StringHashFunctions_h
+#define WebCore_FWD_StringHashFunctions_h
+#include <JavaScriptCore/StringHashFunctions.h>
+#endif
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index d35697e..10edb0f 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -1,7 +1,7 @@
WebCore := $(srcdir)/WebCore
-FEATURE_DEFINES_JAVASCRIPT := LANGUAGE_JAVASCRIPT=1
+FEATURE_DEFINES :=
SVG_FEATURES :=
HTML_FEATURES :=
@@ -15,6 +15,10 @@ webcore_cppflags += \
-I$(srcdir)/WebCore/bridge \
-I$(srcdir)/WebCore/bridge/c \
-I$(srcdir)/WebCore/bridge/jni/jsc \
+<<<<<<< HEAD
+=======
+ -I$(srcdir)/WebCore/bridge/jsc \
+>>>>>>> webkit.org at r54127
-I$(srcdir)/WebCore/css \
-I$(srcdir)/WebCore/dom \
-I$(srcdir)/WebCore/dom/default \
@@ -27,6 +31,7 @@ webcore_cppflags += \
-I$(srcdir)/WebCore/loader/appcache \
-I$(srcdir)/WebCore/loader/archive \
-I$(srcdir)/WebCore/loader/icon \
+ -I$(srcdir)/WebCore/mathml \
-I$(srcdir)/WebCore/notifications \
-I$(srcdir)/WebCore/page \
-I$(srcdir)/WebCore/page/animation \
@@ -41,13 +46,20 @@ webcore_cppflags += \
-I$(srcdir)/WebCore/platform/image-decoders/ico \
-I$(srcdir)/WebCore/platform/image-decoders/jpeg \
-I$(srcdir)/WebCore/platform/image-decoders/png \
- -I$(srcdir)/WebCore/platform/image-decoders/xbm \
-I$(srcdir)/WebCore/platform/mock \
-I$(srcdir)/WebCore/platform/network \
+ -I$(srcdir)/WebCore/platform/sql \
-I$(srcdir)/WebCore/platform/text \
-I$(srcdir)/WebCore/plugins \
-I$(srcdir)/WebCore/rendering \
-I$(srcdir)/WebCore/rendering/style \
+ -I$(srcdir)/WebCore/storage \
+ -I$(srcdir)/WebCore/svg \
+ -I$(srcdir)/WebCore/svg/animation \
+ -I$(srcdir)/WebCore/svg/graphics \
+ -I$(srcdir)/WebCore/svg/graphics/filters \
+ -I$(srcdir)/WebCore/websockets \
+ -I$(srcdir)/WebCore/wml \
-I$(srcdir)/WebCore/workers \
-I$(srcdir)/WebCore/xml \
-I$(top_builddir)/WebCore/bindings/js \
@@ -79,6 +91,7 @@ webcore_built_sources += \
DerivedSources/JSHTMLElementWrapperFactory.cpp \
DerivedSources/UserAgentStyleSheets.h \
DerivedSources/UserAgentStyleSheetsData.cpp \
+ DerivedSources/XMLNSNames.cpp \
DerivedSources/XMLNames.cpp
IDL_BINDINGS += \
@@ -154,6 +167,7 @@ IDL_BINDINGS += \
WebCore/dom/WebKitAnimationEvent.idl \
WebCore/dom/WebKitTransitionEvent.idl \
WebCore/dom/WheelEvent.idl \
+ WebCore/html/Blob.idl \
WebCore/html/canvas/WebGLArray.idl \
WebCore/html/canvas/WebGLArrayBuffer.idl \
WebCore/html/canvas/WebGLByteArray.idl \
@@ -307,10 +321,18 @@ webcore_sources += \
WebCore/accessibility/AccessibilityListBoxOption.h \
WebCore/accessibility/AccessibilityMediaControls.cpp \
WebCore/accessibility/AccessibilityMediaControls.h \
+ WebCore/accessibility/AccessibilityMenuList.cpp \
+ WebCore/accessibility/AccessibilityMenuList.h \
+ WebCore/accessibility/AccessibilityMenuListPopup.cpp \
+ WebCore/accessibility/AccessibilityMenuListPopup.h \
+ WebCore/accessibility/AccessibilityMenuListOption.cpp \
+ WebCore/accessibility/AccessibilityMenuListOption.h \
WebCore/accessibility/AccessibilityObject.cpp \
WebCore/accessibility/AccessibilityObject.h \
WebCore/accessibility/AccessibilityRenderObject.cpp \
WebCore/accessibility/AccessibilityRenderObject.h \
+ WebCore/accessibility/AccessibilityScrollbar.cpp \
+ WebCore/accessibility/AccessibilityScrollbar.h \
WebCore/accessibility/AccessibilitySlider.cpp \
WebCore/accessibility/AccessibilitySlider.h \
WebCore/accessibility/AccessibilityTable.cpp \
@@ -324,7 +346,6 @@ webcore_sources += \
WebCore/accessibility/AccessibilityTableRow.cpp \
WebCore/accessibility/AccessibilityTableRow.h \
WebCore/bindings/js/CachedScriptSourceProvider.h \
- WebCore/bindings/js/DOMObjectWithSVGContext.h \
WebCore/bindings/js/GCController.cpp \
WebCore/bindings/js/GCController.h \
WebCore/bindings/js/JSAttrCustom.cpp \
@@ -404,10 +425,6 @@ webcore_sources += \
WebCore/bindings/js/JSImageDataCustom.cpp \
WebCore/bindings/js/JSInjectedScriptHostCustom.cpp \
WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp \
- WebCore/bindings/js/JSInspectedObjectWrapper.cpp \
- WebCore/bindings/js/JSInspectedObjectWrapper.h \
- WebCore/bindings/js/JSInspectorCallbackWrapper.cpp \
- WebCore/bindings/js/JSInspectorCallbackWrapper.h \
WebCore/bindings/js/JSJavaScriptCallFrameCustom.cpp \
WebCore/bindings/js/JSLazyEventListener.cpp \
WebCore/bindings/js/JSLazyEventListener.h \
@@ -435,9 +452,6 @@ webcore_sources += \
WebCore/bindings/js/JSPluginElementFunctions.cpp \
WebCore/bindings/js/JSPluginElementFunctions.h \
WebCore/bindings/js/JSPopStateEventCustom.cpp \
- WebCore/bindings/js/JSPopStateEventCustom.h \
- WebCore/bindings/js/JSQuarantinedObjectWrapper.cpp \
- WebCore/bindings/js/JSQuarantinedObjectWrapper.h \
WebCore/bindings/js/JSStorageCustom.h \
WebCore/bindings/js/JSStyleSheetCustom.cpp \
WebCore/bindings/js/JSStyleSheetListCustom.cpp \
@@ -478,6 +492,7 @@ webcore_sources += \
WebCore/bindings/js/ScriptState.cpp \
WebCore/bindings/js/ScriptState.h \
WebCore/bindings/js/ScriptString.h \
+ WebCore/bindings/js/ScriptWrappable.h \
WebCore/bindings/js/ScriptValue.cpp \
WebCore/bindings/js/ScriptValue.h \
WebCore/bindings/js/SerializedScriptValue.cpp \
@@ -945,6 +960,9 @@ webcore_sources += \
WebCore/history/HistoryItem.h \
WebCore/history/PageCache.cpp \
WebCore/history/PageCache.h \
+ WebCore/html/Blob.cpp \
+ WebCore/html/Blob.h \
+ WebCore/html/canvas/CanvasContextAttributes.h \
WebCore/html/canvas/CanvasGradient.cpp \
WebCore/html/canvas/CanvasGradient.h \
WebCore/html/canvas/CanvasPattern.cpp \
@@ -965,6 +983,8 @@ webcore_sources += \
WebCore/html/DataGridColumnList.cpp \
WebCore/html/DataGridColumnList.h \
WebCore/html/DataGridDataSource.h \
+ WebCore/html/DateComponents.cpp \
+ WebCore/html/DateComponents.h \
WebCore/html/DOMDataGridDataSource.cpp \
WebCore/html/DOMDataGridDataSource.h \
WebCore/html/File.cpp \
@@ -1106,8 +1126,6 @@ webcore_sources += \
WebCore/html/HTMLQuoteElement.h \
WebCore/html/HTMLScriptElement.cpp \
WebCore/html/HTMLScriptElement.h \
- WebCore/html/HTMLNoScriptElement.cpp \
- WebCore/html/HTMLNoScriptElement.h \
WebCore/html/HTMLSelectElement.cpp \
WebCore/html/HTMLSelectElement.h \
WebCore/html/HTMLStyleElement.cpp \
@@ -1138,8 +1156,6 @@ webcore_sources += \
WebCore/html/HTMLUListElement.h \
WebCore/html/HTMLViewSourceDocument.cpp \
WebCore/html/HTMLViewSourceDocument.h \
- WebCore/html/ISODateTime.cpp \
- WebCore/html/ISODateTime.h \
WebCore/html/ImageData.cpp \
WebCore/html/ImageData.h \
WebCore/html/MediaError.h \
@@ -1321,7 +1337,7 @@ webcore_sources += \
WebCore/page/ContextMenuClient.h \
WebCore/page/ContextMenuController.cpp \
WebCore/page/ContextMenuController.h \
- WebCore/page/ContextMenuSelectionHandler.h \
+ WebCore/page/ContextMenuProvider.h \
WebCore/page/Coordinates.h \
WebCore/page/DOMSelection.cpp \
WebCore/page/DOMSelection.h \
@@ -1550,6 +1566,7 @@ webcore_sources += \
WebCore/platform/graphics/GraphicsContext.cpp \
WebCore/platform/graphics/GraphicsContext.h \
WebCore/platform/graphics/GraphicsContextPrivate.h \
+ WebCore/platform/graphics/GraphicsLayer.h \
WebCore/platform/graphics/GraphicsTypes.cpp \
WebCore/platform/graphics/GraphicsTypes.h \
WebCore/platform/graphics/Icon.h \
@@ -1583,6 +1600,7 @@ webcore_sources += \
WebCore/platform/graphics/StrokeStyleApplier.h \
WebCore/platform/graphics/TextRenderingMode.h \
WebCore/platform/graphics/TextRun.h \
+ WebCore/platform/graphics/TypesettingFeatures.h \
WebCore/platform/graphics/UnitBezier.h \
WebCore/platform/graphics/WidthIterator.cpp \
WebCore/platform/graphics/WidthIterator.h \
@@ -1705,6 +1723,7 @@ webcore_sources += \
WebCore/plugins/PluginQuirkSet.h \
WebCore/plugins/PluginStream.cpp \
WebCore/plugins/PluginStream.h \
+ WebCore/plugins/PluginWidget.h \
WebCore/plugins/PluginView.cpp \
WebCore/plugins/PluginView.h \
WebCore/plugins/npapi.cpp \
@@ -1751,6 +1770,8 @@ webcore_sources += \
WebCore/rendering/RenderCounter.h \
WebCore/rendering/RenderDataGrid.cpp \
WebCore/rendering/RenderDataGrid.h \
+ WebCore/rendering/RenderEmbeddedObject.cpp \
+ WebCore/rendering/RenderEmbeddedObject.h \
WebCore/rendering/RenderFieldset.cpp \
WebCore/rendering/RenderFieldset.h \
WebCore/rendering/RenderFileUploadControl.cpp \
@@ -1814,8 +1835,6 @@ webcore_sources += \
WebCore/rendering/RenderSelectionInfo.h \
WebCore/rendering/RenderSlider.cpp \
WebCore/rendering/RenderSlider.h \
- WebCore/rendering/RenderSVGModelObject.cpp \
- WebCore/rendering/RenderSVGModelObject.h \
WebCore/rendering/RenderTable.cpp \
WebCore/rendering/RenderTable.h \
WebCore/rendering/RenderTableCell.cpp \
@@ -1854,6 +1873,7 @@ webcore_sources += \
WebCore/rendering/TableLayout.h \
WebCore/rendering/TextControlInnerElements.cpp \
WebCore/rendering/TextControlInnerElements.h \
+ WebCore/rendering/TrailingFloatsRootInlineBox.h \
WebCore/rendering/TransformState.cpp \
WebCore/rendering/TransformState.h \
WebCore/rendering/break_lines.cpp \
@@ -1978,11 +1998,15 @@ webcoregtk_sources += \
WebCore/platform/gtk/ContextMenuItemGtk.cpp \
WebCore/platform/gtk/CursorGtk.cpp \
WebCore/platform/gtk/CursorGtk.h \
+ WebCore/platform/gtk/DataObjectGtk.cpp \
+ WebCore/platform/gtk/DataObjectGtk.h \
WebCore/platform/gtk/DragDataGtk.cpp \
WebCore/platform/gtk/DragImageGtk.cpp \
WebCore/platform/gtk/EventLoopGtk.cpp \
WebCore/platform/gtk/FileChooserGtk.cpp \
WebCore/platform/gtk/FileSystemGtk.cpp \
+ WebCore/platform/gtk/GRefPtrGtk.cpp \
+ WebCore/platform/gtk/GRefPtrGtk.h \
WebCore/platform/gtk/GtkPluginWidget.cpp \
WebCore/platform/gtk/GtkPluginWidget.h \
WebCore/platform/gtk/KURLGtk.cpp \
@@ -2029,8 +2053,6 @@ webcoregtk_sources += \
WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h \
WebCore/platform/image-decoders/png/PNGImageDecoder.cpp \
WebCore/platform/image-decoders/png/PNGImageDecoder.h \
- WebCore/platform/image-decoders/xbm/XBMImageDecoder.cpp \
- WebCore/platform/image-decoders/xbm/XBMImageDecoder.h \
WebCore/platform/network/soup/AuthenticationChallenge.h \
WebCore/platform/network/soup/CookieJarSoup.cpp \
WebCore/platform/network/soup/CookieJarSoup.h \
@@ -2070,7 +2092,7 @@ endif
# Channel mesaging support
# ---
if ENABLE_CHANNEL_MESSAGING
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_CHANNEL_MESSAGING=1
+FEATURE_DEFINES += ENABLE_CHANNEL_MESSAGING=1
webcore_cppflags += \
-DENABLE_CHANNEL_MESSAGING=1
@@ -2106,18 +2128,18 @@ webcoregtk_sources += \
endif # END USE_PANGO
# ----
-# HTML Data Grid - enable always.
+# HTML Data Grid - disable for now.
# ----
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_DATAGRID=1
+FEATURE_DEFINES += ENABLE_DATAGRID=0
webcore_cppflags += \
- -DENABLE_DATAGRID=1
+ -DENABLE_DATAGRID=0
# ----
# JavaScript Debugger/Profiler
# ----
if ENABLE_JAVASCRIPT_DEBUGGER
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_JAVASCRIPT_DEBUGGER=1
+FEATURE_DEFINES += ENABLE_JAVASCRIPT_DEBUGGER=1
webcore_cppflags += \
-DENABLE_JAVASCRIPT_DEBUGGER=1
@@ -2132,7 +2154,7 @@ endif # END ENABLE_JAVASCRIPT_DEBUGGER
# Offline Web Applications
# ----
if ENABLE_OFFLINE_WEB_APPLICATIONS
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_OFFLINE_WEB_APPLICATIONS=1
+FEATURE_DEFINES += ENABLE_OFFLINE_WEB_APPLICATIONS=1
IDL_BINDINGS += \
WebCore/loader/appcache/DOMApplicationCache.idl
@@ -2160,22 +2182,10 @@ webcore_sources += \
endif # END ENABLE_OFFLINE_WEB_APPLICATIONS
# ----
-# Dashboard Support
-# ----
-if ENABLE_DASHBOARD_SUPPORT
-
-webcore_cppflags += \
- -DENABLE_DASHBOARD_SUPPORT=1
-
-WEBCORE_CSS_PROPERTY_NAMES += $(WebCore)/css/DashboardSupportCSSPropertyNames.in
-
-endif # END ENABLE_DASHBOARD_SUPPORT
-
-# ----
# Database Support
# ----
if ENABLE_DATABASE
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_DATABASE=1
+FEATURE_DEFINES += ENABLE_DATABASE=1
IDL_BINDINGS += \
WebCore/storage/Database.idl \
@@ -2185,9 +2195,7 @@ IDL_BINDINGS += \
WebCore/storage/SQLTransaction.idl
webcore_cppflags += \
- -DENABLE_DATABASE=1 \
- -I$(top_srcdir)/WebCore/platform/sql \
- -I$(top_srcdir)/WebCore/storage
+ -DENABLE_DATABASE=1
webcore_sources += \
WebCore/bindings/js/JSCustomSQLStatementCallback.cpp \
@@ -2257,7 +2265,7 @@ endif # END ENABLE_DATABASE
# HTML5 datalist Support
# ----
if ENABLE_DATALIST
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_DATALIST=1
+FEATURE_DEFINES += ENABLE_DATALIST=1
HTML_FEATURES += ENABLE_DATALIST=1
webcore_cppflags += -DENABLE_DATALIST=1
@@ -2272,7 +2280,7 @@ global_cppflags += -DENABLE_EVENTSOURCE=0
endif
if ENABLE_EVENTSOURCE
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_EVENTSOURCE=1
+FEATURE_DEFINES += ENABLE_EVENTSOURCE=1
webcore_cppflags += \
-DENABLE_EVENTSOURCE=1
@@ -2282,15 +2290,14 @@ endif # ENABLE_EVENTSOURCE
# HTML5 client-side session and persistent storage
# ----
if ENABLE_DOM_STORAGE
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_DOM_STORAGE=1
+FEATURE_DEFINES += ENABLE_DOM_STORAGE=1
IDL_BINDINGS += \
WebCore/storage/Storage.idl \
WebCore/storage/StorageEvent.idl
webcore_cppflags += \
- -DENABLE_DOM_STORAGE=1 \
- -I$(top_srcdir)/WebCore/storage
+ -DENABLE_DOM_STORAGE=1
webcore_sources += \
WebCore/bindings/js/JSStorageCustom.cpp \
@@ -2347,7 +2354,7 @@ endif # END ENABLE_ICONDATABASE
# ----
if ENABLE_ORIENTATION_EVENTS
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_ORIENTATION_EVENTS=1
+FEATURE_DEFINES += ENABLE_ORIENTATION_EVENTS=1
webcore_cppflags += -DENABLE_ORIENTATION_EVENTS=1
@@ -2357,7 +2364,7 @@ endif # END ENABLE_ORIENTATION_EVENTS
# Video Support
# ----
if ENABLE_VIDEO
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_VIDEO=1
+FEATURE_DEFINES += ENABLE_VIDEO=1
HTML_FEATURES += ENABLE_VIDEO=1
webcore_cppflags += -DENABLE_VIDEO=1
@@ -2406,10 +2413,23 @@ webcore_libadd += \
endif # END ENABLE_VIDEO
# ----
+# XHTML-MP Support
+# ----
+if ENABLE_XHTMLMP
+FEATURE_DEFINES += ENABLE_XHTMLMP=1
+
+webcore_cppflags += -DENABLE_XHTMLMP=1
+
+webcore_sources += \
+ WebCore/html/HTMLNoScriptElement.cpp \
+ WebCore/html/HTMLNoScriptElement.h
+endif # END ENABLE_XHTMLMP
+
+# ----
# XPath Support
# ----
if ENABLE_XPATH
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_XPATH=1
+FEATURE_DEFINES += ENABLE_XPATH=1
webcore_cppflags += -DENABLE_XPATH=1
@@ -2479,7 +2499,7 @@ endif # END ENABLE_XPATH
# XSLT Support
# ----
if ENABLE_XSLT
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_XSLT=1
+FEATURE_DEFINES += ENABLE_XSLT=1
webcore_cppflags += -DENABLE_XSLT=1
@@ -2503,7 +2523,7 @@ endif # END ENABLE_XSLT
# Web Workers support
# ----
if ENABLE_WORKERS
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_WORKERS=1
+FEATURE_DEFINES += ENABLE_WORKERS=1
webcore_cppflags += \
-DENABLE_WORKERS=1
@@ -2553,7 +2573,7 @@ endif
# SharedWorker support
# ---
if ENABLE_SHARED_WORKERS
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_SHARED_WORKERS=1
+FEATURE_DEFINES += ENABLE_SHARED_WORKERS=1
webcore_cppflags += \
-DENABLE_SHARED_WORKERS=1
@@ -2577,15 +2597,14 @@ endif
# WML Support
# ----
if ENABLE_WML
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_WML=1
+FEATURE_DEFINES += ENABLE_WML=1
webcore_built_sources += \
DerivedSources/WMLElementFactory.cpp \
DerivedSources/WMLNames.cpp
webcore_cppflags += \
- -DENABLE_WML=1 \
- -I$(top_srcdir)/WebCore/wml
+ -DENABLE_WML=1
webcore_sources += \
WebCore/wml/WMLAElement.cpp \
@@ -2637,7 +2656,7 @@ endif # END ENABLE_WML
# ----
if ENABLE_FILTERS
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_FILTERS=1
+FEATURE_DEFINES += ENABLE_FILTERS=1
webcore_cppflags += -DENABLE_FILTERS=1
webcore_sources += \
@@ -2672,7 +2691,7 @@ endif # END ENABLE_FILTERS
# ----
if ENABLE_GEOLOCATION
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_GEOLOCATION=1
+FEATURE_DEFINES += ENABLE_GEOLOCATION=1
webcore_cppflags += \
-DENABLE_GEOLOCATION=1
@@ -2686,10 +2705,9 @@ endif # END ENABLE_GEOLOCATION
# ----
if ENABLE_MATHML
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_MATHML=1
+FEATURE_DEFINES += ENABLE_MATHML=1
webcore_cppflags += \
- -I$(srcdir)/WebCore/mathml \
-DENABLE_MATHML=1
webcore_sources += \
@@ -2726,7 +2744,7 @@ endif # END ENABLE_MATHML
# Notifications support
# ----
if ENABLE_NOTIFICATIONS
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_NOTIFICATIONS=1
+FEATURE_DEFINES += ENABLE_NOTIFICATIONS=1
webcore_cppflags += \
-DENABLE_NOTIFICATIONS=1
@@ -2747,7 +2765,7 @@ endif # END ENABLE_NOTIFICATIONS
# FIXME: allow a more fine-grained inclusion/generation of sources per SVG feature
# ----
if ENABLE_SVG
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG=1
+FEATURE_DEFINES += ENABLE_SVG=1
WEBCORE_CSS_PROPERTY_NAMES += $(WebCore)/css/SVGCSSPropertyNames.in
WEBCORE_CSS_VALUE_KEYWORDS += $(WebCore)/css/SVGCSSValueKeywords.in
@@ -2908,21 +2926,17 @@ IDL_BINDINGS += \
WebCore/svg/SVGZoomEvent.idl
webcore_cppflags += \
- -DENABLE_SVG=1 \
- -I$(top_srcdir)/WebCore/svg \
- -I$(top_srcdir)/WebCore/svg/animation \
- -I$(top_srcdir)/WebCore/svg/graphics \
- -I$(top_srcdir)/WebCore/svg/graphics/filters
+ -DENABLE_SVG=1
webcore_sources += \
+ WebCore/bindings/js/JSSVGContextCache.h \
WebCore/bindings/js/JSSVGElementInstanceCustom.cpp \
WebCore/bindings/js/JSSVGLengthCustom.cpp \
WebCore/bindings/js/JSSVGMatrixCustom.cpp \
+ WebCore/bindings/js/JSSVGPODListCustom.h \
WebCore/bindings/js/JSSVGPODTypeWrapper.h \
WebCore/bindings/js/JSSVGPathSegCustom.cpp \
WebCore/bindings/js/JSSVGPathSegListCustom.cpp \
- WebCore/bindings/js/JSSVGPointListCustom.cpp \
- WebCore/bindings/js/JSSVGTransformListCustom.cpp \
WebCore/css/SVGCSSComputedStyleDeclaration.cpp \
WebCore/css/SVGCSSParser.cpp \
WebCore/css/SVGCSSStyleSelector.cpp \
@@ -2946,8 +2960,12 @@ webcore_sources += \
WebCore/rendering/RenderSVGInline.h \
WebCore/rendering/RenderSVGInlineText.cpp \
WebCore/rendering/RenderSVGInlineText.h \
+ WebCore/rendering/RenderSVGModelObject.cpp \
+ WebCore/rendering/RenderSVGModelObject.h \
WebCore/rendering/RenderSVGRoot.cpp \
WebCore/rendering/RenderSVGRoot.h \
+ WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp \
+ WebCore/rendering/RenderSVGShadowTreeRootContainer.h \
WebCore/rendering/RenderSVGTSpan.cpp \
WebCore/rendering/RenderSVGTSpan.h \
WebCore/rendering/RenderSVGText.cpp \
@@ -2964,12 +2982,17 @@ webcore_sources += \
WebCore/rendering/SVGInlineFlowBox.h \
WebCore/rendering/SVGInlineTextBox.cpp \
WebCore/rendering/SVGInlineTextBox.h \
+ WebCore/rendering/SVGMarkerData.h \
+ WebCore/rendering/SVGMarkerLayoutInfo.cpp \
+ WebCore/rendering/SVGMarkerLayoutInfo.h \
WebCore/rendering/SVGRenderSupport.cpp \
WebCore/rendering/SVGRenderSupport.h \
WebCore/rendering/SVGRenderTreeAsText.cpp \
WebCore/rendering/SVGRenderTreeAsText.h \
WebCore/rendering/SVGRootInlineBox.cpp \
WebCore/rendering/SVGRootInlineBox.h \
+ WebCore/rendering/SVGShadowTreeElements.cpp \
+ WebCore/rendering/SVGShadowTreeElements.h \
WebCore/rendering/style/SVGRenderStyle.cpp \
WebCore/rendering/style/SVGRenderStyle.h \
WebCore/rendering/style/SVGRenderStyleDefs.cpp \
@@ -3000,6 +3023,8 @@ webcore_sources += \
WebCore/svg/SVGAnimatedPoints.cpp \
WebCore/svg/SVGAnimatedPoints.h \
WebCore/svg/SVGAnimatedProperty.h \
+ WebCore/svg/SVGAnimatedPropertySynchronizer.h \
+ WebCore/svg/SVGAnimatedPropertyTraits.h \
WebCore/svg/SVGAnimatedTemplate.h \
WebCore/svg/SVGAnimationElement.cpp \
WebCore/svg/SVGAnimationElement.h \
@@ -3027,6 +3052,7 @@ webcore_sources += \
WebCore/svg/SVGElementInstance.h \
WebCore/svg/SVGElementInstanceList.cpp \
WebCore/svg/SVGElementInstanceList.h \
+ WebCore/svg/SVGElementRareData.h \
WebCore/svg/SVGEllipseElement.cpp \
WebCore/svg/SVGEllipseElement.h \
WebCore/svg/SVGException.h \
@@ -3249,9 +3275,6 @@ webcore_sources += \
WebCore/svg/SVGZoomAndPan.h \
WebCore/svg/SVGZoomEvent.cpp \
WebCore/svg/SVGZoomEvent.h \
- WebCore/svg/SynchronizablePropertyController.cpp \
- WebCore/svg/SynchronizablePropertyController.h \
- WebCore/svg/SynchronizableTypeWrapper.h \
WebCore/svg/animation/SMILTime.cpp \
WebCore/svg/animation/SMILTime.h \
WebCore/svg/animation/SMILTimeContainer.cpp \
@@ -3317,31 +3340,31 @@ webcore_sources += \
# SVG Features
if ENABLE_SVG_USE
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG_USE=1
+FEATURE_DEFINES += ENABLE_SVG_USE=1
SVG_FEATURES += ENABLE_SVG_USE=1
webcore_cppflags += -DENABLE_SVG_USE=1
endif
if ENABLE_SVG_FOREIGN_OBJECT
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG_FOREIGN_OBJECT=1
+FEATURE_DEFINES += ENABLE_SVG_FOREIGN_OBJECT=1
SVG_FEATURES += ENABLE_SVG_FOREIGN_OBJECT=1
webcore_cppflags += -DENABLE_SVG_FOREIGN_OBJECT=1
endif
if ENABLE_SVG_FONTS
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG_FONTS=1
+FEATURE_DEFINES += ENABLE_SVG_FONTS=1
SVG_FEATURES += ENABLE_SVG_FONTS=1
webcore_cppflags += -DENABLE_SVG_FONTS=1
endif
if ENABLE_SVG_AS_IMAGE
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG_AS_IMAGE=1
+FEATURE_DEFINES += ENABLE_SVG_AS_IMAGE=1
SVG_FEATURES += ENABLE_SVG_AS_IMAGE=1
webcore_cppflags += -DENABLE_SVG_AS_IMAGE=1
endif
if ENABLE_SVG_ANIMATION
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG_ANIMATION=1
+FEATURE_DEFINES += ENABLE_SVG_ANIMATION=1
SVG_FEATURES += ENABLE_SVG_ANIMATION=1
webcore_cppflags += -DENABLE_SVG_ANIMATION=1
endif
@@ -3372,14 +3395,13 @@ endif # END ENABLE_SVG
# Web Sockets Support
# ----
if ENABLE_WEB_SOCKETS
-FEATURE_DEFINES_JAVASCRIPT += ENABLE_WEB_SOCKETS=1
+FEATURE_DEFINES += ENABLE_WEB_SOCKETS=1
IDL_BINDINGS += \
WebCore/websockets/WebSocket.idl
webcore_cppflags += \
- -DENABLE_WEB_SOCKETS=1 \
- -I$(srcdir)/WebCore/websockets
+ -DENABLE_WEB_SOCKETS=1
webcore_sources += \
WebCore/bindings/js/JSWebSocketConstructor.cpp \
@@ -3398,6 +3420,15 @@ webcore_sources += \
WebCore/websockets/WebSocketHandshake.cpp \
WebCore/websockets/WebSocketHandshake.h
+if ENABLE_WORKERS
+webcore_sources += \
+ WebCore/websockets/ThreadableWebSocketChannel.cpp \
+ WebCore/websockets/ThreadableWebSocketChannel.h \
+ WebCore/websockets/ThreadableWebSocketChannelClientWrapper.h \
+ WebCore/websockets/WorkerThreadableWebSocketChannel.cpp \
+ WebCore/websockets/WorkerThreadableWebSocketChannel.h
+endif
+
webcoregtk_sources += \
WebCore/platform/network/soup/SocketStreamError.h \
WebCore/platform/network/soup/SocketStreamHandle.h \
@@ -3423,11 +3454,11 @@ DerivedSources/CSSValueKeywords.h : $(WEBCORE_CSS_VALUE_KEYWORDS) $(WebCore)/css
# DOCTYPE strings
DerivedSources/DocTypeStrings.cpp : $(WebCore)/html/DocTypeStrings.gperf
- $(AM_V_GEN)$(GPERF) -CEot -L ANSI-C -k "*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards $(WebCore)/html/DocTypeStrings.gperf > $@
+ $(AM_V_GEN)$(GPERF) -CEot -I -L ANSI-C -k "*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards $(WebCore)/html/DocTypeStrings.gperf > $@
# HTML entity names
DerivedSources/HTMLEntityNames.c : $(WebCore)/html/HTMLEntityNames.gperf
- $(AM_V_GEN)$(GPERF) -a -L ANSI-C -C -G -c -o -t -k '*' -N findEntity -D -s 2 \
+ $(AM_V_GEN)$(GPERF) -a -I -L ANSI-C -C -G -c -o -t -k '*' -N findEntity -D -s 2 \
$(WebCore)/html/HTMLEntityNames.gperf > $@
# color names
@@ -3461,7 +3492,8 @@ USER_AGENT_STYLE_SHEETS = \
$(WebCore)/css/view-source.css \
$(WebCore)/css/svg.css \
$(WebCore)/css/wml.css \
- $(WebCore)/css/mediaControls.css
+ $(WebCore)/css/mediaControls.css \
+ $(WebCore)/css/mediaControlsGtk.css
# new-style JavaScript bindings
SCRIPTS_BINDINGS = \
@@ -3487,6 +3519,9 @@ endif # HTML_FLAGS
DerivedSources/JSHTMLElementWrapperFactory.cpp: DerivedSources/HTMLNames.cpp;
+DerivedSources/XMLNSNames.cpp: $(WebCore)/dom/make_names.pl $(WebCore)/xml/xmlnsattrs.in
+ $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --attrs $(WebCore)/xml/xmlnsattrs.in --outputDir "$(GENSOURCES)"
+
DerivedSources/XMLNames.cpp: $(WebCore)/dom/make_names.pl $(WebCore)/xml/xmlattrs.in
$(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --attrs $(WebCore)/xml/xmlattrs.in --outputDir "$(GENSOURCES)"
@@ -3513,7 +3548,7 @@ DerivedSources/JS%.h: DerivedSources/JS%.cpp;
.SECONDARY:
DerivedSources/JS%.cpp: %.idl $(SCRIPTS_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorJS.pm
- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl $(IDL_PATH:%=--include "%") --outputDir "$(GENSOURCES)" --defines "$(FEATURE_DEFINES_JAVASCRIPT)" --generator JS $<
+ $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl $(IDL_PATH:%=--include "%") --outputDir "$(GENSOURCES)" --defines "LANGUAGE_JAVASCRIPT=1 $(FEATURE_DEFINES)" --generator JS $<
IDL_BINDINGS_JS_PURE := \
WebCore/svg/ElementTimeControl.idl \
@@ -3537,6 +3572,12 @@ webcore_built_nosources += $(patsubst %.idl,DerivedSources/JS%.h,$(notdir $(IDL_
webcore_built_nosources += $(patsubst %.idl,DerivedSources/JS%.cpp,$(notdir $(IDL_BINDINGS_JS)))
+webcore_built_objects = := $(patsubst %.cpp,%.lo,$(webcore_built_nosources))
+
+$(webcore_built_objects): AM_CPPFLAGS+=$(corekit_cppflags)
+
+$(webcore_built_objects): AM_CXXFLAGS+=$(libwebkit_1_0_la_CXXFLAGS)
+
libWebCoreJS_objects := $(patsubst %.idl,DerivedSources/JS%.lo,$(notdir $(IDL_BINDINGS_JS)))
libWebCoreJS_depfiles := $(patsubst %.idl,DerivedSources/$(DEPDIR)/JS%.Plo,$(notdir $(IDL_BINDINGS_JS)))
@@ -3546,9 +3587,9 @@ libWebCoreJS_depfiles += $(patsubst %.lo,$(DEPDIR)/%.Plo,$(libWebCoreJS_objects)
-include $(libWebCoreJS_depfiles)
-$(libWebCoreJS_objects): AM_CPPFLAGS+=$(libWebCore_la_CPPFLAGS)
+$(libWebCoreJS_objects): AM_CPPFLAGS+=$(corekit_cppflags)
-$(libWebCoreJS_objects): AM_CXXFLAGS+=$(libWebCore_la_CXXFLAGS)
+$(libWebCoreJS_objects): AM_CXXFLAGS+=$(libwebkit_1_0_la_CXXFLAGS)
libWebCoreJS.la: $(libWebCoreJS_objects)
$(CXXLINK) $(libWebCoreJS_objects) $(LIBS)
@@ -3576,6 +3617,7 @@ webcore_dist += \
WebCore/css/svg.css \
WebCore/css/wml.css \
WebCore/css/mediaControls.css \
+ WebCore/css/mediaControlsGtk.css \
WebCore/css/CSSGrammar.y \
WebCore/css/CSSValueKeywords.in \
WebCore/css/SVGCSSPropertyNames.in \
@@ -3584,7 +3626,6 @@ webcore_dist += \
WebCore/css/makevalues.pl \
WebCore/css/tokenizer.flex \
WebCore/css/CSSPropertyNames.in \
- WebCore/css/DashboardSupportCSSPropertyNames.in \
WebCore/css/make-css-file-arrays.pl \
WebCore/css/SVGCSSValueKeywords.in \
WebCore/css/makegrammar.pl \
@@ -3599,6 +3640,7 @@ webcore_dist += \
WebCore/html/HTMLEntityNames.gperf \
WebCore/html/HTMLAttributeNames.in \
WebCore/xml/xmlattrs.in \
+ WebCore/xml/xmlnsattrs.in \
WebCore/xml/XPathGrammar.y
# Installing web inspector files
diff --git a/WebCore/Info.plist b/WebCore/Info.plist
index 525a372..9c24f98 100644
--- a/WebCore/Info.plist
+++ b/WebCore/Info.plist
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleGetInfoString</key>
- <string>${BUNDLE_VERSION}, Copyright 2003-2009 Apple Inc.; Copyright 1997 Martin Jones &lt;mjones@kde.org&gt;; Copyright 1998, 1999 Torben Weis &lt;weis@kde.org&gt;; Copyright 1998, 1999, 2002 Waldo Bastian &lt;bastian@kde.org&gt;; Copyright 1998-2000 Lars Knoll &lt;knoll@kde.org&gt;; Copyright 1999, 2001 Antti Koivisto &lt;koivisto@kde.org&gt;; Copyright 1999-2001 Harri Porten &lt;porten@kde.org&gt;; Copyright 2000 Simon Hausmann &lt;hausmann@kde.org&gt;; Copyright 2000, 2001 Dirk Mueller &lt;mueller@kde.org&gt;; Copyright 2000, 2001 Peter Kelly &lt;pmk@post.com&gt;; Copyright 2000 Daniel Molkentin &lt;molkentin@kde.org&gt;; Copyright 2000 Stefan Schimanski &lt;schimmi@kde.org&gt;; Copyright 1998-2000 Netscape Communications Corporation; Copyright 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper; Copyright 2001, 2002 Expat maintainers.</string>
+ <string>${BUNDLE_VERSION}, Copyright 2003-2010 Apple Inc.; Copyright 1997 Martin Jones &lt;mjones@kde.org&gt;; Copyright 1998, 1999 Torben Weis &lt;weis@kde.org&gt;; Copyright 1998, 1999, 2002 Waldo Bastian &lt;bastian@kde.org&gt;; Copyright 1998-2000 Lars Knoll &lt;knoll@kde.org&gt;; Copyright 1999, 2001 Antti Koivisto &lt;koivisto@kde.org&gt;; Copyright 1999-2001 Harri Porten &lt;porten@kde.org&gt;; Copyright 2000 Simon Hausmann &lt;hausmann@kde.org&gt;; Copyright 2000, 2001 Dirk Mueller &lt;mueller@kde.org&gt;; Copyright 2000, 2001 Peter Kelly &lt;pmk@post.com&gt;; Copyright 2000 Daniel Molkentin &lt;molkentin@kde.org&gt;; Copyright 2000 Stefan Schimanski &lt;schimmi@kde.org&gt;; Copyright 1998-2000 Netscape Communications Corporation; Copyright 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper; Copyright 2001, 2002 Expat maintainers.</string>
<key>CFBundleIdentifier</key>
<string>com.apple.${PRODUCT_NAME}</string>
<key>CFBundleInfoDictionaryVersion</key>
diff --git a/WebCore/WebCore.ClientBasedGeolocation.exp b/WebCore/WebCore.ClientBasedGeolocation.exp
new file mode 100644
index 0000000..c624acb
--- /dev/null
+++ b/WebCore/WebCore.ClientBasedGeolocation.exp
@@ -0,0 +1,2 @@
+__ZN7WebCore21GeolocationController13errorOccurredEPNS_16GeolocationErrorE
+__ZN7WebCore21GeolocationController15positionChangedEPNS_19GeolocationPositionE
diff --git a/WebCore/WebCore.PluginHostProcess.exp b/WebCore/WebCore.PluginHostProcess.exp
index cce951f..4b78966 100644
--- a/WebCore/WebCore.PluginHostProcess.exp
+++ b/WebCore/WebCore.PluginHostProcess.exp
@@ -9,7 +9,7 @@ __ZN7WebCore13IdentifierRep3getEi
__ZN7WebCore13IdentifierRep3getEPKc
__ZN7WebCore13IdentifierRep7isValidEPS0_
__ZN7WebCore16ScriptController16createRootObjectEPv
+__ZN7WebCore16ScriptController17canExecuteScriptsEv
__ZN7WebCore16ScriptController24jsObjectForPluginElementEPNS_17HTMLPlugInElementE
-__ZN7WebCore16ScriptController9isEnabledEv
__ZN7WebCore6String26fromUTF8WithLatin1FallbackEPKcm
__ZN7WebCore6String8fromUTF8EPKcm
diff --git a/WebCore/WebCore.base.exp b/WebCore/WebCore.base.exp
index c29629a..5b013e7 100644
--- a/WebCore/WebCore.base.exp
+++ b/WebCore/WebCore.base.exp
@@ -139,6 +139,7 @@ __ZN7WebCore10ScrollView17setScrollbarModesENS_13ScrollbarModeES1_
__ZN7WebCore10ScrollView20setCanHaveScrollbarsEb
__ZN7WebCore10StringImpl11reverseFindEPS0_ib
__ZN7WebCore10StringImpl7replaceEtt
+__ZN7WebCore10StringImpl7ustringEv
__ZN7WebCore10StringImpl8endsWithEPS0_b
__ZN7WebCore10StringImplD1Ev
__ZN7WebCore10StringImplcvP8NSStringEv
@@ -247,6 +248,7 @@ __ZN7WebCore12IconDatabase27checkIntegrityBeforeOpeningEv
__ZN7WebCore12IconDatabase4openERKNS_6StringE
__ZN7WebCore12IconDatabase5closeEv
__ZN7WebCore12IconDatabase9setClientEPNS_18IconDatabaseClientE
+__ZN7WebCore12PluginWidget14invalidateRectERKNS_7IntRectE
__ZN7WebCore12RenderObject16repaintRectangleERKNS_7IntRectEb
__ZN7WebCore12RenderWidget19showSubstituteImageEN3WTF10PassRefPtrINS_5ImageEEE
__ZN7WebCore12SchedulePairC1EP9NSRunLoopPK10__CFString
@@ -299,7 +301,8 @@ __ZN7WebCore14SecurityOrigin18shouldHideReferrerERKNS_4KURLERKNS_6StringE
__ZN7WebCore14SecurityOrigin24registerURLSchemeAsLocalERKNS_6StringE
__ZN7WebCore14SecurityOrigin25whiteListAccessFromOriginERKS0_RKNS_6StringES5_b
__ZN7WebCore14SecurityOrigin27resetOriginAccessWhiteListsEv
-__ZN7WebCore14SecurityOrigin6createERKNS_4KURLE
+__ZN7WebCore14SecurityOrigin40setDomainRelaxationForbiddenForURLSchemeEbRKNS_6StringE
+__ZN7WebCore14SecurityOrigin6createERKNS_4KURLEi
__ZN7WebCore14SecurityOrigin7canLoadERKNS_4KURLERKNS_6StringEPNS_8DocumentE
__ZN7WebCore15ArchiveResource6createEN3WTF10PassRefPtrINS_12SharedBufferEEERKNS_4KURLERKNS_6StringESA_SA_RKNS_16ResourceResponseE
__ZN7WebCore15BackForwardList10removeItemEPNS_11HistoryItemE
@@ -376,6 +379,9 @@ __ZN7WebCore16ScriptController11createWorldEv
__ZN7WebCore16ScriptController13executeScriptERKNS_6StringEb
__ZN7WebCore16ScriptController18windowScriptObjectEv
__ZN7WebCore16ScriptController20executeScriptInWorldEPNS_15DOMWrapperWorldERKNS_6StringEb
+__ZN7WebCore16ThreadGlobalData10staticDataE
+__ZN7WebCore16ThreadGlobalDataC1Ev
+__ZN7WebCore16ThreadGlobalDataD1Ev
__ZN7WebCore16VisibleSelectionC1EPKNS_5RangeENS_9EAffinityE
__ZN7WebCore16VisibleSelectionC1ERKNS_15VisiblePositionES3_
__ZN7WebCore16colorFromNSColorEP7NSColor
@@ -383,7 +389,7 @@ __ZN7WebCore16createFullMarkupEPKNS_4NodeE
__ZN7WebCore16createFullMarkupEPKNS_5RangeE
__ZN7WebCore16enclosingIntRectERK7_NSRect
__ZN7WebCore16isEndOfParagraphERKNS_15VisiblePositionE
-__ZN7WebCore16threadGlobalDataEv
+__ZN7WebCore16jsStringSlowCaseEPN3JSC9ExecStateERNS0_9WeakGCMapIPNS_10StringImplEPNS0_8JSStringEEES5_
__ZN7WebCore17CredentialStorage3getERKNS_15ProtectionSpaceE
__ZN7WebCore17DOMImplementation14isTextMIMETypeERKNS_6StringE
__ZN7WebCore17GlyphPageTreeNode18treeGlyphPageCountEv
@@ -430,7 +436,7 @@ __ZN7WebCore22ScriptExecutionContext26canSuspendActiveDOMObjectsEv
__ZN7WebCore22applicationIsAppleMailEv
__ZN7WebCore22counterValueForElementEPNS_7ElementE
__ZN7WebCore22createFragmentFromTextEPNS_5RangeERKNS_6StringE
-__ZN7WebCore22externalRepresentationEPNS_5FrameE
+__ZN7WebCore22externalRepresentationEPNS_5FrameEj
__ZN7WebCore23ApplicationCacheStorage14setMaximumSizeEx
__ZN7WebCore23ApplicationCacheStorage16storeCopyOfCacheERKNS_6StringEPNS_20ApplicationCacheHostE
__ZN7WebCore23ApplicationCacheStorage17setCacheDirectoryERKNS_6StringE
@@ -439,7 +445,7 @@ __ZN7WebCore23ApplicationCacheStorage5emptyEv
__ZN7WebCore23ReplaceSelectionCommandC1EPNS_8DocumentEN3WTF10PassRefPtrINS_16DocumentFragmentEEEbbbbbNS_10EditActionE
__ZN7WebCore23createFragmentFromNodesEPNS_8DocumentERKN3WTF6VectorIPNS_4NodeELm0EEE
__ZN7WebCore24BinaryPropertyListWriter17writePropertyListEv
-__ZN7WebCore24createFragmentFromMarkupEPNS_8DocumentERKNS_6StringES4_
+__ZN7WebCore24createFragmentFromMarkupEPNS_8DocumentERKNS_6StringES4_NS_27FragmentScriptingPermissionE
__ZN7WebCore24decodeURLEscapeSequencesERKNS_6StringE
__ZN7WebCore24notifyHistoryItemChangedE
__ZN7WebCore24rangeCompliantEquivalentERKNS_8PositionE
@@ -455,6 +461,7 @@ __ZN7WebCore25PluginMainThreadScheduler9schedulerEv
__ZN7WebCore26CSSMutableStyleDeclarationC1Ev
__ZN7WebCore26NetscapePlugInStreamLoader6createEPNS_5FrameEPNS_32NetscapePlugInStreamLoaderClientE
__ZN7WebCore26usesTestModeFocusRingColorEv
+__ZN7WebCore27applicationIsAdobeInstallerEv
__ZN7WebCore29isCharacterSmartReplaceExemptEib
__ZN7WebCore29setUsesTestModeFocusRingColorEb
__ZN7WebCore31CrossOriginPreflightResultCache5emptyEv
@@ -477,6 +484,7 @@ __ZN7WebCore4KURLC1ENS_18ParsedURLStringTagERKNS_6StringE
__ZN7WebCore4KURLC1EP5NSURL
__ZN7WebCore4Node17stopIgnoringLeaksEv
__ZN7WebCore4Node18startIgnoringLeaksEv
+__ZN7WebCore4Node19setNeedsStyleRecalcENS_15StyleChangeTypeE
__ZN7WebCore4Page12setGroupNameERKNS_6StringE
__ZN7WebCore4Page13didStopPluginEPNS_14HaltablePluginE
__ZN7WebCore4Page14didStartPluginEPNS_14HaltablePluginE
@@ -517,7 +525,7 @@ __ZN7WebCore5Frame23visiblePositionForPointERKNS_8IntPointE
__ZN7WebCore5Frame24computeAndSetTypingStyleEPNS_19CSSStyleDeclarationENS_10EditActionE
__ZN7WebCore5Frame24setExcludeFromTextSearchEb
__ZN7WebCore5Frame25matchLabelsAgainstElementEP7NSArrayPNS_7ElementE
-__ZN7WebCore5Frame28searchForLabelsBeforeElementEP7NSArrayPNS_7ElementE
+__ZN7WebCore5Frame28searchForLabelsBeforeElementEP7NSArrayPNS_7ElementEPmPb
__ZN7WebCore5Frame34setMarkedTextMatchesAreHighlightedEb
__ZN7WebCore5Frame4initEv
__ZN7WebCore5Frame6scriptEv
@@ -639,6 +647,7 @@ __ZN7WebCore8Settings22setSansSerifFontFamilyERKNS_12AtomicStringE
__ZN7WebCore8Settings22setShowsURLsInToolTipsEb
__ZN7WebCore8Settings23setDefaultFixedFontSizeEi
__ZN7WebCore8Settings23setEditableLinkBehaviorENS_20EditableLinkBehaviorE
+__ZN7WebCore8Settings23setLoadDeferringEnabledEb
__ZN7WebCore8Settings23setNeedsTigerMailQuirksEb
__ZN7WebCore8Settings23setPluginAllowedRunTimeEj
__ZN7WebCore8Settings23setUsesEncodingDetectorEb
@@ -672,6 +681,7 @@ __ZN7WebCore8Settings40setJavaScriptCanOpenWindowsAutomaticallyEb
__ZN7WebCore8Settings40setTextDirectionSubmenuInclusionBehaviorENS_37TextDirectionSubmenuInclusionBehaviorE
__ZN7WebCore8Settings41setNeedsKeyboardEventDisambiguationQuirksEb
__ZN7WebCore8blankURLEv
+__ZN7WebCore8jsStringEPN3JSC9ExecStateERKNS_6StringE
__ZN7WebCore8makeRGBAEiiii
__ZN7WebCore9DOMWindow30dispatchAllPendingUnloadEventsEv
__ZN7WebCore9DOMWindow36dispatchAllPendingBeforeUnloadEventsEv
@@ -981,8 +991,8 @@ __ZNK7WebCore9FrameTree6parentEb
__ZNK7WebCore9FrameView11needsLayoutEv
__ZNK7WebCore9PageCache10frameCountEv
__ZNK7WebCore9PageCache21autoreleasedPageCountEv
-__ZNK7WebCore9TimerBase8isActiveEv
__ZTVN7WebCore12ChromeClientE
+__ZTVN7WebCore12PluginWidgetE
__ZTVN7WebCore17FileChooserClientE
__ZTVN7WebCore17FrameLoaderClientE
__ZTVN7WebCore25HistoryPropertyListWriterE
@@ -1016,12 +1026,14 @@ _wkGetNSURLResponseCalculatedExpiration
_wkGetNSURLResponseLastModifiedDate
_wkGetNSURLResponseMustRevalidate
_wkGetPreferredExtensionForMIMEType
+_wkGetUserToBaseCTM
_wkGetWheelEventDeltas
_wkHitTestMediaUIPart
_wkInitializeMaximumHTTPConnectionCountPerHost
_wkIsLatchingWheelEvent
_wkMeasureMediaUIPart
_wkMediaControllerThemeAvailable
+_wkNoteOpenPanelFiles
_wkPopupMenu
_wkQTIncludeOnlyModernMediaFileTypes
_wkQTMovieDataRate
@@ -1044,3 +1056,4 @@ _wkSetUpFontCache
_wkSignalCFReadStreamEnd
_wkSignalCFReadStreamError
_wkSignalCFReadStreamHasBytes
+
diff --git a/WebCore/WebCore.gyp/WebCore.gyp b/WebCore/WebCore.gyp/WebCore.gyp
index 374d01b..184990a 100644
--- a/WebCore/WebCore.gyp/WebCore.gyp
+++ b/WebCore/WebCore.gyp/WebCore.gyp
@@ -106,8 +106,11 @@
'../',
'../accessibility',
'../accessibility/chromium',
+ '../bindings',
+ '../bindings/generic',
'../bindings/v8',
'../bindings/v8/custom',
+ '../bindings/v8/specialization',
'../bridge',
'../css',
'../dom',
@@ -388,6 +391,26 @@
],
},
{
+ 'action_name': 'XMLNSNames',
+ 'inputs': [
+ '../dom/make_names.pl',
+ '../xml/xmlnsattrs.in',
+ ],
+ 'outputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.cpp',
+ '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.h',
+ ],
+ 'action': [
+ 'python',
+ 'scripts/action_makenames.py',
+ '<@(_outputs)',
+ '--',
+ '<@(_inputs)',
+ '--',
+ '--extraDefines', '<(feature_defines)'
+ ],
+ },
+ {
'action_name': 'XMLNames',
'inputs': [
'../dom/make_names.pl',
@@ -564,6 +587,7 @@
'<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.cpp',
'<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheetsData.cpp',
'<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.cpp',
+ '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.cpp',
'<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.cpp',
# Additional .cpp files from the webcore_bindings_sources rules.
@@ -646,8 +670,12 @@
# of their enclosing directories and tags at the ends of their
# filenames.
['exclude', '(android|cairo|cf|cg|curl|gtk|haiku|linux|mac|opentype|posix|qt|soup|symbian|win|wx)/'],
- ['exclude', '(?<!Chromium)(SVGAllInOne|Android|Cairo|CF|CG|Curl|Gtk|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|Wx)\\.(cpp|mm?)$'],
+ ['exclude', '(?<!Chromium)(Android|Cairo|CF|CG|Curl|Gtk|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|Wx)\\.(cpp|mm?)$'],
['include', 'platform/graphics/opentype/OpenTypeSanitizer\\.cpp$'],
+ # Exclude everything in svg/ directly but not in subdirectories.
+ # Everything in svg/*.cpp is included in svg/SVGAllInOne.cpp.
+ ['exclude', 'svg/[^/]+\\.cpp$'],
+ ['include', 'svg/SVGAllInOne\\.cpp$'],
# JSC-only.
['exclude', 'inspector/JavaScript[^/]*\\.cpp$'],
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 0115a41..c4f64c7 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -78,11 +78,13 @@
'dom/WebKitAnimationEvent.idl',
'dom/WebKitTransitionEvent.idl',
'dom/WheelEvent.idl',
+ 'html/Blob.idl',
'html/canvas/WebGLActiveInfo.idl',
'html/canvas/WebGLArray.idl',
'html/canvas/WebGLArrayBuffer.idl',
'html/canvas/WebGLBuffer.idl',
'html/canvas/WebGLByteArray.idl',
+ 'html/canvas/WebGLContextAttributes.idl',
'html/canvas/WebGLFloatArray.idl',
'html/canvas/WebGLFramebuffer.idl',
'html/canvas/CanvasGradient.idl',
@@ -194,6 +196,7 @@
'page/Coordinates.idl',
'page/DOMSelection.idl',
'page/DOMWindow.idl',
+ 'page/EventSource.idl',
'page/Geolocation.idl',
'page/Geoposition.idl',
'page/History.idl',
@@ -208,6 +211,10 @@
'plugins/Plugin.idl',
'plugins/PluginArray.idl',
'storage/Database.idl',
+ 'storage/IDBDatabaseError.idl',
+ 'storage/IDBDatabaseException.idl',
+ 'storage/IDBRequest.idl',
+ 'storage/IndexedDatabaseRequest.idl',
'storage/SQLError.idl',
'storage/SQLResultSet.idl',
'storage/SQLResultSetRowList.idl',
@@ -402,10 +409,18 @@
'accessibility/AccessibilityListBoxOption.h',
'accessibility/AccessibilityMediaControls.cpp',
'accessibility/AccessibilityMediaControls.h',
+ 'accessibility/AccessibilityMenuList.cpp',
+ 'accessibility/AccessibilityMenuList.h',
+ 'accessibility/AccessibilityMenuListPopup.cpp',
+ 'accessibility/AccessibilityMenuListPopup.h',
+ 'accessibility/AccessibilityMenuListOption.cpp',
+ 'accessibility/AccessibilityMenuListOption.h',
'accessibility/AccessibilityObject.cpp',
'accessibility/AccessibilityObject.h',
'accessibility/AccessibilityRenderObject.cpp',
'accessibility/AccessibilityRenderObject.h',
+ 'accessibility/AccessibilityScrollbar.cpp',
+ 'accessibility/AccessibilityScrollbar.h',
'accessibility/AccessibilitySlider.cpp',
'accessibility/AccessibilitySlider.h',
'accessibility/AccessibilityTable.cpp',
@@ -434,6 +449,11 @@
'accessibility/win/AccessibilityObjectWin.cpp',
'accessibility/win/AccessibilityObjectWrapperWin.h',
'accessibility/wx/AccessibilityObjectWx.cpp',
+ 'bindings/generic/BindingDOMWindow.h',
+ 'bindings/generic/BindingSecurity.h',
+ 'bindings/generic/BindingSecurityBase.cpp',
+ 'bindings/generic/BindingSecurityBase.h',
+ 'bindings/generic/GenericBinding.h',
'bindings/js/CachedScriptSourceProvider.h',
'bindings/js/DOMObjectWithSVGContext.h',
'bindings/js/GCController.cpp',
@@ -523,10 +543,6 @@
'bindings/js/JSImageConstructor.cpp',
'bindings/js/JSImageConstructor.h',
'bindings/js/JSImageDataCustom.cpp',
- 'bindings/js/JSInspectedObjectWrapper.cpp',
- 'bindings/js/JSInspectedObjectWrapper.h',
- 'bindings/js/JSInspectorCallbackWrapper.cpp',
- 'bindings/js/JSInspectorCallbackWrapper.h',
'bindings/js/JSInjectedScriptHostCustom.cpp',
'bindings/js/JSInspectorFrontendHostCustom.cpp',
'bindings/js/JSJavaScriptCallFrameCustom.cpp',
@@ -557,8 +573,6 @@
'bindings/js/JSPluginCustom.cpp',
'bindings/js/JSPluginElementFunctions.cpp',
'bindings/js/JSPluginElementFunctions.h',
- 'bindings/js/JSQuarantinedObjectWrapper.cpp',
- 'bindings/js/JSQuarantinedObjectWrapper.h',
'bindings/js/JSRGBColor.cpp',
'bindings/js/JSRGBColor.h',
'bindings/js/JSSharedWorkerConstructor.cpp',
@@ -570,14 +584,14 @@
'bindings/js/JSStorageCustom.h',
'bindings/js/JSStyleSheetCustom.cpp',
'bindings/js/JSStyleSheetListCustom.cpp',
+ 'bindings/js/JSSVGContextCache.h',
'bindings/js/JSSVGElementInstanceCustom.cpp',
'bindings/js/JSSVGLengthCustom.cpp',
'bindings/js/JSSVGMatrixCustom.cpp',
'bindings/js/JSSVGPathSegCustom.cpp',
'bindings/js/JSSVGPathSegListCustom.cpp',
+ 'bindings/js/JSSVGPODListCustom.h',
'bindings/js/JSSVGPODTypeWrapper.h',
- 'bindings/js/JSSVGPointListCustom.cpp',
- 'bindings/js/JSSVGTransformListCustom.cpp',
'bindings/js/JSTextCustom.cpp',
'bindings/js/JSTreeWalkerCustom.cpp',
'bindings/js/JSWebKitCSSMatrixConstructor.cpp',
@@ -631,6 +645,7 @@
'bindings/js/ScriptString.h',
'bindings/js/ScriptValue.cpp',
'bindings/js/ScriptValue.h',
+ 'bindings/js/ScriptWrappable.h',
'bindings/js/StringSourceProvider.h',
'bindings/js/WorkerScriptController.cpp',
'bindings/js/WorkerScriptController.h',
@@ -650,12 +665,10 @@
'bindings/v8/custom/V8WebGLUnsignedShortArrayCustom.cpp',
'bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp',
'bindings/v8/custom/V8WebGLRenderingContextCustom.cpp',
- 'bindings/v8/custom/V8ClientRectListCustom.cpp',
'bindings/v8/custom/V8ClipboardCustom.cpp',
'bindings/v8/custom/V8CoordinatesCustom.cpp',
'bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp',
'bindings/v8/custom/V8ConsoleCustom.cpp',
- 'bindings/v8/custom/V8CustomBinding.cpp',
'bindings/v8/custom/V8CustomBinding.h',
'bindings/v8/custom/V8CustomEventListener.cpp',
'bindings/v8/custom/V8CustomEventListener.h',
@@ -680,12 +693,12 @@
'bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp',
'bindings/v8/custom/V8DocumentLocationCustom.cpp',
'bindings/v8/custom/V8DOMApplicationCacheCustom.cpp',
- 'bindings/v8/custom/V8DOMParserConstructor.cpp',
'bindings/v8/custom/V8DOMWindowCustom.cpp',
'bindings/v8/custom/V8DocumentCustom.cpp',
'bindings/v8/custom/V8ElementCustom.cpp',
'bindings/v8/custom/V8EventCustom.cpp',
- 'bindings/v8/custom/V8FileListCustom.cpp',
+ 'bindings/v8/custom/V8EventSourceConstructor.cpp',
+ 'bindings/v8/custom/V8EventSourceCustom.cpp',
'bindings/v8/custom/V8GeolocationCustom.cpp',
'bindings/v8/custom/V8HistoryCustom.cpp',
'bindings/v8/custom/V8HTMLAudioElementConstructor.cpp',
@@ -706,9 +719,10 @@
'bindings/v8/custom/V8HTMLOptionElementConstructor.h',
'bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp',
'bindings/v8/custom/V8HTMLPlugInElementCustom.cpp',
- 'bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp',
'bindings/v8/custom/V8HTMLSelectElementCustom.cpp',
'bindings/v8/custom/V8HTMLSelectElementCustom.h',
+ 'bindings/v8/custom/V8IDBRequestCustom.cpp',
+ 'bindings/v8/custom/V8IndexedDatabaseRequestCustom.cpp',
'bindings/v8/custom/V8InjectedScriptHostCustom.cpp',
'bindings/v8/custom/V8InspectorFrontendHostCustom.cpp',
'bindings/v8/custom/V8LocationCustom.cpp',
@@ -725,6 +739,7 @@
'bindings/v8/custom/V8NodeIteratorCustom.cpp',
'bindings/v8/custom/V8NodeListCustom.cpp',
'bindings/v8/custom/V8NotificationCenterCustom.cpp',
+ 'bindings/v8/custom/V8PopStateEventCustom.cpp',
'bindings/v8/custom/V8StorageCustom.cpp',
'bindings/v8/custom/V8SQLResultSetRowListCustom.cpp',
'bindings/v8/custom/V8SQLTransactionCustom.cpp',
@@ -742,8 +757,6 @@
'bindings/v8/custom/V8XMLHttpRequestConstructor.cpp',
'bindings/v8/custom/V8XMLHttpRequestCustom.cpp',
'bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp',
- 'bindings/v8/custom/V8XMLSerializerConstructor.cpp',
- 'bindings/v8/custom/V8XPathEvaluatorConstructor.cpp',
'bindings/v8/custom/V8XSLTProcessorCustom.cpp',
'bindings/v8/DateExtension.cpp',
'bindings/v8/DateExtension.h',
@@ -752,6 +765,10 @@
'bindings/v8/DOMDataStore.cpp',
'bindings/v8/DOMDataStore.h',
'bindings/v8/DOMObjectsInclude.h',
+ 'bindings/v8/DOMWrapperWorld.cpp',
+ 'bindings/v8/DOMWrapperWorld.h',
+ 'bindings/v8/IsolatedWorld.cpp',
+ 'bindings/v8/IsolatedWorld.h',
'bindings/v8/MainThreadDOMData.cpp',
'bindings/v8/MainThreadDOMData.h',
'bindings/v8/NPV8Object.cpp',
@@ -790,7 +807,12 @@
'bindings/v8/ScriptStringImpl.h',
'bindings/v8/ScriptValue.cpp',
'bindings/v8/ScriptValue.h',
+ 'bindings/v8/ScriptWrappable.h',
+ 'bindings/v8/SerializedScriptValue.cpp',
'bindings/v8/SerializedScriptValue.h',
+ 'bindings/v8/specialization/V8BindingDOMWindow.h',
+ 'bindings/v8/specialization/V8BindingState.cpp',
+ 'bindings/v8/specialization/V8BindingState.h',
'bindings/v8/StaticDOMDataStore.cpp',
'bindings/v8/StaticDOMDataStore.h',
'bindings/v8/V8AbstractEventListener.cpp',
@@ -805,6 +827,8 @@
'bindings/v8/V8DataGridDataSource.h',
'bindings/v8/V8DOMMap.cpp',
'bindings/v8/V8DOMMap.h',
+ 'bindings/v8/V8DOMWindowShell.cpp',
+ 'bindings/v8/V8DOMWindowShell.h',
'bindings/v8/V8DOMWrapper.cpp',
'bindings/v8/V8DOMWrapper.h',
'bindings/v8/V8EventListenerList.cpp',
@@ -817,8 +841,8 @@
'bindings/v8/V8HiddenPropertyName.h',
'bindings/v8/V8Index.cpp',
'bindings/v8/V8Index.h',
- 'bindings/v8/V8IsolatedWorld.cpp',
- 'bindings/v8/V8IsolatedWorld.h',
+ 'bindings/v8/V8IsolatedContext.cpp',
+ 'bindings/v8/V8IsolatedContext.h',
'bindings/v8/V8LazyEventListener.cpp',
'bindings/v8/V8LazyEventListener.h',
'bindings/v8/V8NPObject.cpp',
@@ -1285,6 +1309,8 @@
'history/HistoryItem.h',
'history/PageCache.cpp',
'history/PageCache.h',
+ 'html/Blob.cpp',
+ 'html/Blob.h',
'html/canvas/WebGLArray.cpp',
'html/canvas/WebGLArray.h',
'html/canvas/WebGLArrayBuffer.cpp',
@@ -1293,12 +1319,16 @@
'html/canvas/WebGLBuffer.h',
'html/canvas/WebGLByteArray.cpp',
'html/canvas/WebGLByteArray.h',
+ 'html/canvas/WebGLContextAttributes.cpp',
+ 'html/canvas/WebGLContextAttributes.h',
'html/canvas/WebGLFloatArray.cpp',
'html/canvas/WebGLFloatArray.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/WebGLIntArray.cpp',
@@ -1344,6 +1374,8 @@
'html/DOMDataGridDataSource.h',
'html/DataGridColumnList.cpp',
'html/DataGridColumnList.h',
+ 'html/DateComponents.cpp',
+ 'html/DateComponents.h',
'html/File.cpp',
'html/File.h',
'html/FileList.cpp',
@@ -1520,8 +1552,6 @@
'html/HTMLVideoElement.h',
'html/HTMLViewSourceDocument.cpp',
'html/HTMLViewSourceDocument.h',
- 'html/ISODateTime.cpp',
- 'html/ISODateTime.h',
'html/ImageData.cpp',
'html/ImageData.h',
'html/MediaError.h',
@@ -1722,7 +1752,6 @@
'page/chromium/DragControllerChromium.cpp',
'page/chromium/EventHandlerChromium.cpp',
'page/chromium/FrameChromium.cpp',
- 'page/chromium/FrameChromium.h',
'page/gtk/DragControllerGtk.cpp',
'page/gtk/EventHandlerGtk.cpp',
'page/gtk/FrameGtk.cpp',
@@ -1759,7 +1788,7 @@
'page/ContextMenuClient.h',
'page/ContextMenuController.cpp',
'page/ContextMenuController.h',
- 'page/ContextMenuSelectionHandler.h',
+ 'page/ContextMenuProvider.h',
'page/DOMSelection.cpp',
'page/DOMSelection.h',
'page/DOMTimer.cpp',
@@ -1773,6 +1802,8 @@
'page/EditorClient.h',
'page/EventHandler.cpp',
'page/EventHandler.h',
+ 'page/EventSource.cpp',
+ 'page/EventSource.h',
'page/FocusController.cpp',
'page/FocusController.h',
'page/FocusDirection.h',
@@ -2327,8 +2358,6 @@
'platform/image-decoders/png/PNGImageDecoder.h',
'platform/image-decoders/skia/ImageDecoderSkia.cpp',
'platform/image-decoders/wx/ImageDecoderWx.cpp',
- 'platform/image-decoders/xbm/XBMImageDecoder.cpp',
- 'platform/image-decoders/xbm/XBMImageDecoder.h',
'platform/image-decoders/zlib/crc32.h',
'platform/image-decoders/zlib/deflate.h',
'platform/image-decoders/zlib/inffast.h',
@@ -2403,17 +2432,6 @@
'platform/network/cf/AuthenticationCF.h',
'platform/network/cf/AuthenticationChallenge.h',
'platform/network/cf/DNSCFNet.cpp',
- 'platform/network/cf/FormDataStreamCFNet.cpp',
- 'platform/network/cf/FormDataStreamCFNet.h',
- 'platform/network/cf/ResourceError.h',
- 'platform/network/cf/ResourceErrorCF.cpp',
- 'platform/network/cf/ResourceHandleCFNet.cpp',
- 'platform/network/cf/ResourceRequest.h',
- 'platform/network/cf/ResourceRequestCFNet.cpp',
- 'platform/network/cf/ResourceRequestCFNet.h',
- 'platform/network/cf/ResourceResponse.h',
- 'platform/network/cf/ResourceResponseCFNet.cpp',
- 'platform/network/cf/ResourceResponseCFNet.h',
'platform/network/cf/SocketStreamError.h',
'platform/network/cf/SocketStreamHandle.h',
'platform/network/cf/SocketStreamHandleCFNet.cpp',
@@ -2970,6 +2988,8 @@
'rendering/RenderCounter.h',
'rendering/RenderDataGrid.cpp',
'rendering/RenderDataGrid.h',
+ 'rendering/RenderEmbeddedObject.cpp',
+ 'rendering/RenderEmbeddedObject.h',
'rendering/RenderFieldset.cpp',
'rendering/RenderFieldset.h',
'rendering/RenderFileUploadControl.cpp',
@@ -3052,6 +3072,8 @@
'rendering/RenderSVGModelObject.h',
'rendering/RenderSVGRoot.cpp',
'rendering/RenderSVGRoot.h',
+ 'rendering/RenderSVGShadowTreeRootContainer.cpp',
+ 'rendering/RenderSVGShadowTreeRootContainer.h',
'rendering/RenderSVGTSpan.cpp',
'rendering/RenderSVGTSpan.h',
'rendering/RenderSVGText.cpp',
@@ -3127,12 +3149,17 @@
'rendering/SVGInlineFlowBox.h',
'rendering/SVGInlineTextBox.cpp',
'rendering/SVGInlineTextBox.h',
+ 'rendering/SVGMarkerData.h',
+ 'rendering/SVGMarkerLayoutInfo.cpp',
+ 'rendering/SVGMarkerLayoutInfo.h',
'rendering/SVGRenderSupport.cpp',
'rendering/SVGRenderSupport.h',
'rendering/SVGRenderTreeAsText.cpp',
'rendering/SVGRenderTreeAsText.h',
'rendering/SVGRootInlineBox.cpp',
'rendering/SVGRootInlineBox.h',
+ 'rendering/SVGShadowTreeElements.cpp',
+ 'rendering/SVGShadowTreeElements.h',
'rendering/TableLayout.h',
'rendering/TextControlInnerElements.cpp',
'rendering/TextControlInnerElements.h',
@@ -3159,6 +3186,12 @@
'storage/DatabaseTracker.cpp',
'storage/DatabaseTracker.h',
'storage/DatabaseTrackerClient.h',
+ 'storage/IDBDatabaseError.h',
+ 'storage/IDBDatabaseException.h',
+ 'storage/IDBRequest.cpp',
+ 'storage/IDBRequest.h',
+ 'storage/IndexedDatabaseRequest.cpp',
+ 'storage/IndexedDatabaseRequest.h',
'storage/LocalStorageTask.cpp',
'storage/LocalStorageTask.h',
'storage/LocalStorageThread.cpp',
@@ -3292,6 +3325,8 @@
'svg/SVGAnimatedPoints.cpp',
'svg/SVGAnimatedPoints.h',
'svg/SVGAnimatedProperty.h',
+ 'svg/SVGAnimatedPropertySynchronizer.h',
+ 'svg/SVGAnimatedPropertyTraits.h',
'svg/SVGAnimatedTemplate.h',
'svg/SVGAnimationElement.cpp',
'svg/SVGAnimationElement.h',
@@ -3319,6 +3354,7 @@
'svg/SVGElementInstance.h',
'svg/SVGElementInstanceList.cpp',
'svg/SVGElementInstanceList.h',
+ 'svg/SVGElementRareData.h',
'svg/SVGEllipseElement.cpp',
'svg/SVGEllipseElement.h',
'svg/SVGException.h',
@@ -3541,9 +3577,9 @@
'svg/SVGZoomAndPan.h',
'svg/SVGZoomEvent.cpp',
'svg/SVGZoomEvent.h',
- 'svg/SynchronizablePropertyController.cpp',
- 'svg/SynchronizablePropertyController.h',
- 'svg/SynchronizableTypeWrapper.h',
+ 'websockets/ThreadableWebSocketChannel.cpp',
+ 'websockets/ThreadableWebSocketChannel.h',
+ 'websockets/ThreadableWebSocketChannelClientWrapper.h',
'websockets/WebSocket.cpp',
'websockets/WebSocket.h',
'websockets/WebSocketChannel.cpp',
@@ -3551,6 +3587,8 @@
'websockets/WebSocketChannelClient.h',
'websockets/WebSocketHandshake.cpp',
'websockets/WebSocketHandshake.h',
+ 'websockets/WorkerThreadableWebSocketChannel.cpp',
+ 'websockets/WorkerThreadableWebSocketChannel.h',
'workers/AbstractWorker.cpp',
'workers/AbstractWorker.h',
'workers/DedicatedWorkerContext.cpp',
@@ -3643,6 +3681,9 @@
'inspector/front-end/inspector.html',
'inspector/front-end/AbstractTimelinePanel.js',
+ 'inspector/front-end/AuditLauncherView.js',
+ 'inspector/front-end/AuditResultView.js',
+ 'inspector/front-end/AuditsPanel.js',
'inspector/front-end/BottomUpProfileDataGridTree.js',
'inspector/front-end/Breakpoint.js',
'inspector/front-end/BreakpointsSidebarPane.js',
@@ -3661,6 +3702,7 @@
'inspector/front-end/DOMAgent.js',
'inspector/front-end/DOMStorage.js',
'inspector/front-end/DOMStorageItemsView.js',
+ 'inspector/front-end/DOMSyntaxHighlighter.js',
'inspector/front-end/Drawer.js',
'inspector/front-end/ElementsPanel.js',
'inspector/front-end/ElementsTreeOutline.js',
@@ -3674,6 +3716,7 @@
'inspector/front-end/inspector.js',
'inspector/front-end/KeyboardShortcut.js',
'inspector/front-end/MetricsSidebarPane.js',
+ 'inspector/front-end/NativeTextViewer.js',
'inspector/front-end/Object.js',
'inspector/front-end/ObjectProxy.js',
'inspector/front-end/ObjectPropertiesSection.js',
@@ -3694,15 +3737,24 @@
'inspector/front-end/Script.js',
'inspector/front-end/ScriptsPanel.js',
'inspector/front-end/ScriptView.js',
+ 'inspector/front-end/Section.js',
+ 'inspector/front-end/Settings.js',
'inspector/front-end/SidebarPane.js',
'inspector/front-end/SidebarTreeElement.js',
+ 'inspector/front-end/SourceCSSTokenizer.js',
'inspector/front-end/SourceFrame.js',
+ 'inspector/front-end/SourceHTMLTokenizer.js',
+ 'inspector/front-end/SourceJavaScriptTokenizer.js',
+ 'inspector/front-end/SourceTokenizer.js',
'inspector/front-end/SourceView.js',
'inspector/front-end/StatusBarButton.js',
'inspector/front-end/StoragePanel.js',
'inspector/front-end/StylesSidebarPane.js',
'inspector/front-end/SummaryBar.js',
'inspector/front-end/TestController.js',
+ 'inspector/front-end/TextEditor.js',
+ 'inspector/front-end/TextEditorHighlighter.js',
+ 'inspector/front-end/TextEditorModel.js',
'inspector/front-end/TextPrompt.js',
'inspector/front-end/TimelineAgent.js',
'inspector/front-end/TimelineOverviewPane.js',
@@ -3713,8 +3765,11 @@
'inspector/front-end/utilities.js',
'inspector/front-end/View.js',
'inspector/front-end/WatchExpressionsSidebarPane.js',
+ 'inspector/front-end/WelcomeView.js',
+ 'inspector/front-end/audits.css',
'inspector/front-end/inspector.css',
'inspector/front-end/inspectorSyntaxHighlight.css',
+ 'inspector/front-end/textEditor.css',
],
'webinspector_image_files': [
@@ -3835,10 +3890,6 @@
'inspector/front-end/Images/timelinePillPurple.png',
'inspector/front-end/Images/timelinePillRed.png',
'inspector/front-end/Images/timelinePillYellow.png',
- 'inspector/front-end/Images/tipBalloon.png',
- 'inspector/front-end/Images/tipBalloonBottom.png',
- 'inspector/front-end/Images/tipIcon.png',
- 'inspector/front-end/Images/tipIconPressed.png',
'inspector/front-end/Images/toolbarItemSelected.png',
'inspector/front-end/Images/treeDownTriangleBlack.png',
'inspector/front-end/Images/treeDownTriangleWhite.png',
diff --git a/WebCore/WebCore.pri b/WebCore/WebCore.pri
new file mode 100644
index 0000000..07b1532
--- /dev/null
+++ b/WebCore/WebCore.pri
@@ -0,0 +1,692 @@
+CONFIG(standalone_package) {
+ isEmpty(WC_GENERATED_SOURCES_DIR):WC_GENERATED_SOURCES_DIR = $$PWD/generated
+} else {
+ isEmpty(WC_GENERATED_SOURCES_DIR):WC_GENERATED_SOURCES_DIR = generated
+}
+
+## Define default features macros for optional components
+## (look for defs in config.h and included files!)
+# Try to locate sqlite3 source
+CONFIG(QTDIR_build) {
+ SQLITE3SRCDIR = $$QT_SOURCE_TREE/src/3rdparty/sqlite/
+} else {
+ SQLITE3SRCDIR = $$(SQLITE3SRCDIR)
+ isEmpty(SQLITE3SRCDIR) {
+ SQLITE3SRCDIR = $$[QT_INSTALL_PREFIX]/src/3rdparty/sqlite/
+ }
+}
+
+contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
+ DEFINES+=ENABLE_DATABASE=0 ENABLE_DOM_STORAGE=0 ENABLE_ICONDATABASE=0 ENABLE_WORKERS=0 ENABLE_SHARED_WORKERS=0
+}
+
+# turn off SQLITE support if we do not have sqlite3 available
+!CONFIG(QTDIR_build):win32-*:!exists( $${SQLITE3SRCDIR}/sqlite3.c ): DEFINES += ENABLE_SQLITE=0 ENABLE_DATABASE=0 ENABLE_WORKERS=0 ENABLE_SHARED_WORKERS=0 ENABLE_ICONDATABASE=0 ENABLE_OFFLINE_WEB_APPLICATIONS=0 ENABLE_DOM_STORAGE=0
+
+!contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=.): DEFINES += ENABLE_JAVASCRIPT_DEBUGGER=1
+!contains(DEFINES, ENABLE_DATABASE=.): DEFINES += ENABLE_DATABASE=1
+!contains(DEFINES, ENABLE_EVENTSOURCE=.): DEFINES += ENABLE_EVENTSOURCE=1
+!contains(DEFINES, ENABLE_OFFLINE_WEB_APPLICATIONS=.): DEFINES += ENABLE_OFFLINE_WEB_APPLICATIONS=1
+!contains(DEFINES, ENABLE_DOM_STORAGE=.): DEFINES += ENABLE_DOM_STORAGE=1
+!contains(DEFINES, ENABLE_ICONDATABASE=.): DEFINES += ENABLE_ICONDATABASE=1
+!contains(DEFINES, ENABLE_CHANNEL_MESSAGING=.): DEFINES += ENABLE_CHANNEL_MESSAGING=1
+!contains(DEFINES, ENABLE_ORIENTATION_EVENTS=.): DEFINES += ENABLE_ORIENTATION_EVENTS=0
+
+# turn on SQLITE support if any of the dependent features are turned on
+!contains(DEFINES, ENABLE_SQLITE=.) {
+ contains(DEFINES, ENABLE_DATABASE=1)|contains(DEFINES, ENABLE_ICONDATABASE=1)|contains(DEFINES, ENABLE_DOM_STORAGE=1)|contains(DEFINES, ENABLE_OFFLINE_WEB_APPLICATIONS=1) {
+ DEFINES += ENABLE_SQLITE=1
+ } else {
+ DEFINES += ENABLE_SQLITE=0
+ }
+}
+
+!contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=.): DEFINES += ENABLE_DASHBOARD_SUPPORT=0
+!contains(DEFINES, ENABLE_FILTERS=.): DEFINES += ENABLE_FILTERS=1
+!contains(DEFINES, ENABLE_XPATH=.): DEFINES += ENABLE_XPATH=1
+#!contains(DEFINES, ENABLE_XBL=.): DEFINES += ENABLE_XBL=1
+!contains(DEFINES, ENABLE_WCSS=.): DEFINES += ENABLE_WCSS=0
+!contains(DEFINES, ENABLE_WML=.): DEFINES += ENABLE_WML=0
+!contains(DEFINES, ENABLE_SHARED_WORKERS=.): DEFINES += ENABLE_SHARED_WORKERS=1
+!contains(DEFINES, ENABLE_WORKERS=.): DEFINES += ENABLE_WORKERS=1
+!contains(DEFINES, ENABLE_XHTMLMP=.): DEFINES += ENABLE_XHTMLMP=0
+!contains(DEFINES, ENABLE_DATAGRID=.): DEFINES += ENABLE_DATAGRID=0
+!contains(DEFINES, ENABLE_VIDEO=.): DEFINES += ENABLE_VIDEO=1
+
+# SVG support
+!contains(DEFINES, ENABLE_SVG=0) {
+ !contains(DEFINES, ENABLE_SVG=.): DEFINES += ENABLE_SVG=1
+ !contains(DEFINES, ENABLE_SVG_FONTS=.): DEFINES += ENABLE_SVG_FONTS=1
+ !contains(DEFINES, ENABLE_SVG_FOREIGN_OBJECT=.): DEFINES += ENABLE_SVG_FOREIGN_OBJECT=1
+ !contains(DEFINES, ENABLE_SVG_ANIMATION=.): DEFINES += ENABLE_SVG_ANIMATION=1
+ !contains(DEFINES, ENABLE_SVG_AS_IMAGE=.): DEFINES += ENABLE_SVG_AS_IMAGE=1
+ !contains(DEFINES, ENABLE_SVG_USE=.): DEFINES += ENABLE_SVG_USE=1
+} else {
+ DEFINES += ENABLE_SVG_FONTS=0 ENABLE_SVG_FOREIGN_OBJECT=0 ENABLE_SVG_ANIMATION=0 ENABLE_SVG_AS_IMAGE=0 ENABLE_SVG_USE=0
+}
+
+# HTML5 media support
+!contains(DEFINES, ENABLE_VIDEO=.): DEFINES += ENABLE_VIDEO=1
+
+# HTML5 datalist support
+!contains(DEFINES, ENABLE_DATALIST=.): DEFINES += ENABLE_DATALIST=1
+
+# Nescape plugins support (NPAPI)
+!contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=.) {
+ unix|win32-*:!embedded:!wince*: {
+ DEFINES += ENABLE_NETSCAPE_PLUGIN_API=1
+ } else {
+ DEFINES += ENABLE_NETSCAPE_PLUGIN_API=0
+ }
+}
+
+# Web Socket support.
+!contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=1
+
+# XSLT support with QtXmlPatterns
+!contains(DEFINES, ENABLE_XSLT=.) {
+ contains(QT_CONFIG, xmlpatterns):!lessThan(QT_MINOR_VERSION, 5):DEFINES += ENABLE_XSLT=1
+ else:DEFINES += ENABLE_XSLT=0
+}
+
+!CONFIG(QTDIR_build):!contains(DEFINES, ENABLE_QT_BEARER=.) {
+ symbian: {
+ exists($${EPOCROOT}epoc32/release/winscw/udeb/QtBearer.lib)| \
+ exists($${EPOCROOT}epoc32/release/armv5/lib/QtBearer.lib) {
+ DEFINES += ENABLE_QT_BEARER=1
+ }
+ }
+}
+
+DEFINES += WTF_CHANGES=1
+
+# Enable touch event support with Qt 4.6
+!lessThan(QT_MINOR_VERSION, 6): DEFINES += ENABLE_TOUCH_EVENTS=1
+
+# Used to compute defaults for the build-webkit script
+CONFIG(compute_defaults) {
+ message($$DEFINES)
+ error("Done computing defaults")
+}
+
+contains(DEFINES, ENABLE_WCSS=1) {
+ contains(DEFINES, ENABLE_XHTMLMP=0) {
+ DEFINES -= ENABLE_XHTMLMP=0
+ DEFINES += ENABLE_XHTMLMP=1
+ }
+}
+
+## Forward enabled feature macros to JavaScript enabled features macros
+FEATURE_DEFINES_JAVASCRIPT = LANGUAGE_JAVASCRIPT=1
+contains(DEFINES, ENABLE_CHANNEL_MESSAGING=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_CHANNEL_MESSAGING=1
+contains(DEFINES, ENABLE_ORIENTATION_EVENTS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_ORIENTATION_EVENTS=1
+contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=0): DASHBOARDSUPPORTCSSPROPERTIES -= $$PWD/css/DashboardSupportCSSPropertyNames.in
+contains(DEFINES, ENABLE_DATAGRID=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_DATAGRID=1
+contains(DEFINES, ENABLE_EVENTSOURCE=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_EVENTSOURCE=1
+contains(DEFINES, ENABLE_DATABASE=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_DATABASE=1
+contains(DEFINES, ENABLE_DOM_STORAGE=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_DOM_STORAGE=1
+contains(DEFINES, ENABLE_SHARED_SCRIPT=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SHARED_SCRIPT=1
+contains(DEFINES, ENABLE_WORKERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WORKERS=1
+contains(DEFINES, ENABLE_SHARED_WORKERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SHARED_WORKERS=1
+contains(DEFINES, ENABLE_VIDEO=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_VIDEO=1
+contains(DEFINES, ENABLE_XPATH=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_XPATH=1
+contains(DEFINES, ENABLE_XSLT=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_XSLT=1
+contains(DEFINES, ENABLE_XBL=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_XBL=1
+contains(DEFINES, ENABLE_FILTERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_FILTERS=1
+contains(DEFINES, ENABLE_WCSS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WCSS=1
+contains(DEFINES, ENABLE_WML=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WML=1
+contains(DEFINES, ENABLE_XHTMLMP=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_XHTMLMP=1
+contains(DEFINES, ENABLE_SVG=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG=1
+contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_JAVASCRIPT_DEBUGGER=1
+contains(DEFINES, ENABLE_OFFLINE_WEB_APPLICATIONS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_OFFLINE_WEB_APPLICATIONS=1
+contains(DEFINES, ENABLE_WEB_SOCKETS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WEB_SOCKETS=1
+contains(DEFINES, ENABLE_TOUCH_EVENTS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_TOUCH_EVENTS=1
+
+
+## Derived source generators
+WML_NAMES = $$PWD/wml/WMLTagNames.in
+
+SVG_NAMES = $$PWD/svg/svgtags.in
+
+XLINK_NAMES = $$PWD/svg/xlinkattrs.in
+
+TOKENIZER = $$PWD/css/tokenizer.flex
+
+DOCTYPESTRINGS = $$PWD/html/DocTypeStrings.gperf
+
+CSSBISON = $$PWD/css/CSSGrammar.y
+
+HTML_NAMES = $$PWD/html/HTMLTagNames.in
+
+XML_NAMES = $$PWD/xml/xmlattrs.in
+
+XMLNS_NAMES = $$PWD/xml/xmlnsattrs.in
+
+ENTITIES_GPERF = $$PWD/html/HTMLEntityNames.gperf
+
+COLORDAT_GPERF = $$PWD/platform/ColorData.gperf
+
+WALDOCSSPROPS = $$PWD/css/CSSPropertyNames.in
+
+WALDOCSSVALUES = $$PWD/css/CSSValueKeywords.in
+
+DASHBOARDSUPPORTCSSPROPERTIES = $$PWD/css/DashboardSupportCSSPropertyNames.in
+
+XPATHBISON = $$PWD/xml/XPathGrammar.y
+
+contains(DEFINES, ENABLE_SVG=1) {
+ EXTRACSSPROPERTIES += $$PWD/css/SVGCSSPropertyNames.in
+ EXTRACSSVALUES += $$PWD/css/SVGCSSValueKeywords.in
+}
+
+contains(DEFINES, ENABLE_WCSS=1) {
+ EXTRACSSPROPERTIES += $$PWD/css/WCSSPropertyNames.in
+ EXTRACSSVALUES += $$PWD/css/WCSSValueKeywords.in
+}
+
+STYLESHEETS_EMBED = \
+ $$PWD/css/html.css \
+ $$PWD/css/quirks.css \
+ $$PWD/css/svg.css \
+ $$PWD/css/view-source.css \
+ $$PWD/css/wml.css \
+ $$PWD/css/mediaControls.css \
+ $$PWD/css/mediaControlsQt.css
+
+IDL_BINDINGS += \
+ css/Counter.idl \
+ css/CSSCharsetRule.idl \
+ css/CSSFontFaceRule.idl \
+ css/CSSImportRule.idl \
+ css/CSSMediaRule.idl \
+ css/CSSPageRule.idl \
+ css/CSSPrimitiveValue.idl \
+ css/CSSRule.idl \
+ css/CSSRuleList.idl \
+ css/CSSStyleDeclaration.idl \
+ css/CSSStyleRule.idl \
+ css/CSSStyleSheet.idl \
+ css/CSSValue.idl \
+ css/CSSValueList.idl \
+ css/CSSVariablesDeclaration.idl \
+ css/CSSVariablesRule.idl \
+ css/Media.idl \
+ css/MediaList.idl \
+ css/RGBColor.idl \
+ css/Rect.idl \
+ css/StyleSheet.idl \
+ css/StyleSheetList.idl \
+ css/WebKitCSSKeyframeRule.idl \
+ css/WebKitCSSKeyframesRule.idl \
+ css/WebKitCSSMatrix.idl \
+ css/WebKitCSSTransformValue.idl \
+ dom/Attr.idl \
+ dom/BeforeLoadEvent.idl \
+ dom/CharacterData.idl \
+ dom/ClientRect.idl \
+ dom/ClientRectList.idl \
+ dom/Clipboard.idl \
+ dom/CDATASection.idl \
+ dom/Comment.idl \
+ dom/CompositionEvent.idl \
+ dom/DocumentFragment.idl \
+ dom/Document.idl \
+ dom/DocumentType.idl \
+ dom/DOMCoreException.idl \
+ dom/DOMImplementation.idl \
+ dom/Element.idl \
+ dom/Entity.idl \
+ dom/EntityReference.idl \
+ dom/ErrorEvent.idl \
+ dom/Event.idl \
+ dom/EventException.idl \
+# dom/EventListener.idl \
+# dom/EventTarget.idl \
+ dom/KeyboardEvent.idl \
+ dom/MouseEvent.idl \
+ dom/MessageChannel.idl \
+ dom/MessageEvent.idl \
+ dom/MessagePort.idl \
+ dom/MutationEvent.idl \
+ dom/NamedNodeMap.idl \
+ dom/Node.idl \
+ dom/NodeFilter.idl \
+ dom/NodeIterator.idl \
+ dom/NodeList.idl \
+ dom/Notation.idl \
+ dom/OverflowEvent.idl \
+ dom/PageTransitionEvent.idl \
+ dom/PopStateEvent.idl \
+ dom/ProcessingInstruction.idl \
+ dom/ProgressEvent.idl \
+ dom/RangeException.idl \
+ dom/Range.idl \
+ dom/Text.idl \
+ dom/TextEvent.idl \
+ dom/Touch.idl \
+ dom/TouchEvent.idl \
+ dom/TouchList.idl \
+ dom/TreeWalker.idl \
+ dom/UIEvent.idl \
+ dom/WebKitAnimationEvent.idl \
+ dom/WebKitTransitionEvent.idl \
+ dom/WheelEvent.idl \
+ html/Blob.idl \
+ html/canvas/WebGLArray.idl \
+ html/canvas/WebGLArrayBuffer.idl \
+ html/canvas/WebGLByteArray.idl \
+ html/canvas/WebGLFloatArray.idl \
+ html/canvas/CanvasGradient.idl \
+ html/canvas/WebGLIntArray.idl \
+ html/canvas/CanvasPattern.idl \
+ html/canvas/CanvasRenderingContext.idl \
+ html/canvas/CanvasRenderingContext2D.idl \
+ html/canvas/WebGLRenderingContext.idl \
+ html/canvas/WebGLShortArray.idl \
+ html/canvas/WebGLUnsignedByteArray.idl \
+ html/canvas/WebGLUnsignedIntArray.idl \
+ html/canvas/WebGLUnsignedShortArray.idl \
+ html/DataGridColumn.idl \
+ html/DataGridColumnList.idl \
+ html/File.idl \
+ html/FileList.idl \
+ html/HTMLAllCollection.idl \
+ html/HTMLAudioElement.idl \
+ html/HTMLAnchorElement.idl \
+ html/HTMLAppletElement.idl \
+ html/HTMLAreaElement.idl \
+ html/HTMLBaseElement.idl \
+ html/HTMLBaseFontElement.idl \
+ html/HTMLBlockquoteElement.idl \
+ html/HTMLBodyElement.idl \
+ html/HTMLBRElement.idl \
+ html/HTMLButtonElement.idl \
+ html/HTMLCanvasElement.idl \
+ html/HTMLCollection.idl \
+ html/HTMLDataGridElement.idl \
+ html/HTMLDataGridCellElement.idl \
+ html/HTMLDataGridColElement.idl \
+ html/HTMLDataGridRowElement.idl \
+ html/HTMLDataListElement.idl \
+ html/HTMLDirectoryElement.idl \
+ html/HTMLDivElement.idl \
+ html/HTMLDListElement.idl \
+ html/HTMLDocument.idl \
+ html/HTMLElement.idl \
+ html/HTMLEmbedElement.idl \
+ html/HTMLFieldSetElement.idl \
+ html/HTMLFontElement.idl \
+ html/HTMLFormElement.idl \
+ html/HTMLFrameElement.idl \
+ html/HTMLFrameSetElement.idl \
+ html/HTMLHeadElement.idl \
+ html/HTMLHeadingElement.idl \
+ html/HTMLHRElement.idl \
+ html/HTMLHtmlElement.idl \
+ html/HTMLIFrameElement.idl \
+ html/HTMLImageElement.idl \
+ html/HTMLInputElement.idl \
+ html/HTMLIsIndexElement.idl \
+ html/HTMLLabelElement.idl \
+ html/HTMLLegendElement.idl \
+ html/HTMLLIElement.idl \
+ html/HTMLLinkElement.idl \
+ html/HTMLMapElement.idl \
+ html/HTMLMarqueeElement.idl \
+ html/HTMLMediaElement.idl \
+ html/HTMLMenuElement.idl \
+ html/HTMLMetaElement.idl \
+ html/HTMLModElement.idl \
+ html/HTMLObjectElement.idl \
+ html/HTMLOListElement.idl \
+ html/HTMLOptGroupElement.idl \
+ html/HTMLOptionElement.idl \
+ html/HTMLOptionsCollection.idl \
+ html/HTMLParagraphElement.idl \
+ html/HTMLParamElement.idl \
+ html/HTMLPreElement.idl \
+ html/HTMLQuoteElement.idl \
+ html/HTMLScriptElement.idl \
+ html/HTMLSelectElement.idl \
+ html/HTMLSourceElement.idl \
+ html/HTMLStyleElement.idl \
+ html/HTMLTableCaptionElement.idl \
+ html/HTMLTableCellElement.idl \
+ html/HTMLTableColElement.idl \
+ html/HTMLTableElement.idl \
+ html/HTMLTableRowElement.idl \
+ html/HTMLTableSectionElement.idl \
+ html/HTMLTextAreaElement.idl \
+ html/HTMLTitleElement.idl \
+ html/HTMLUListElement.idl \
+ html/HTMLVideoElement.idl \
+ html/ImageData.idl \
+ html/MediaError.idl \
+ html/TextMetrics.idl \
+ html/TimeRanges.idl \
+ html/ValidityState.idl \
+ html/VoidCallback.idl \
+ inspector/InjectedScriptHost.idl \
+ inspector/InspectorBackend.idl \
+ inspector/InspectorFrontendHost.idl \
+ inspector/JavaScriptCallFrame.idl \
+ loader/appcache/DOMApplicationCache.idl \
+ page/BarInfo.idl \
+ page/Console.idl \
+ page/Coordinates.idl \
+ page/DOMSelection.idl \
+ page/DOMWindow.idl \
+ page/EventSource.idl \
+ page/Geolocation.idl \
+ page/Geoposition.idl \
+ page/History.idl \
+ page/Location.idl \
+ page/Navigator.idl \
+ page/PositionError.idl \
+ page/Screen.idl \
+ page/WebKitPoint.idl \
+ page/WorkerNavigator.idl \
+ plugins/Plugin.idl \
+ plugins/MimeType.idl \
+ plugins/PluginArray.idl \
+ plugins/MimeTypeArray.idl \
+ storage/Database.idl \
+ storage/Storage.idl \
+ storage/StorageEvent.idl \
+ storage/SQLError.idl \
+ storage/SQLResultSet.idl \
+ storage/SQLResultSetRowList.idl \
+ storage/SQLTransaction.idl \
+ svg/SVGZoomEvent.idl \
+ svg/SVGAElement.idl \
+ svg/SVGAltGlyphElement.idl \
+ svg/SVGAngle.idl \
+ svg/SVGAnimateColorElement.idl \
+ svg/SVGAnimatedAngle.idl \
+ svg/SVGAnimatedBoolean.idl \
+ svg/SVGAnimatedEnumeration.idl \
+ svg/SVGAnimatedInteger.idl \
+ svg/SVGAnimatedLength.idl \
+ svg/SVGAnimatedLengthList.idl \
+ svg/SVGAnimatedNumber.idl \
+ svg/SVGAnimatedNumberList.idl \
+ svg/SVGAnimatedPreserveAspectRatio.idl \
+ svg/SVGAnimatedRect.idl \
+ svg/SVGAnimatedString.idl \
+ svg/SVGAnimatedTransformList.idl \
+ svg/SVGAnimateElement.idl \
+ svg/SVGAnimateTransformElement.idl \
+ svg/SVGAnimationElement.idl \
+ svg/SVGCircleElement.idl \
+ svg/SVGClipPathElement.idl \
+ svg/SVGColor.idl \
+ svg/SVGComponentTransferFunctionElement.idl \
+ svg/SVGCursorElement.idl \
+ svg/SVGDefsElement.idl \
+ svg/SVGDescElement.idl \
+ svg/SVGDocument.idl \
+ svg/SVGElement.idl \
+ svg/SVGElementInstance.idl \
+ svg/SVGElementInstanceList.idl \
+ svg/SVGEllipseElement.idl \
+ svg/SVGException.idl \
+ svg/SVGFEBlendElement.idl \
+ svg/SVGFEColorMatrixElement.idl \
+ svg/SVGFEComponentTransferElement.idl \
+ svg/SVGFECompositeElement.idl \
+ svg/SVGFEDiffuseLightingElement.idl \
+ svg/SVGFEDisplacementMapElement.idl \
+ svg/SVGFEDistantLightElement.idl \
+ svg/SVGFEFloodElement.idl \
+ svg/SVGFEFuncAElement.idl \
+ svg/SVGFEFuncBElement.idl \
+ svg/SVGFEFuncGElement.idl \
+ svg/SVGFEFuncRElement.idl \
+ svg/SVGFEGaussianBlurElement.idl \
+ svg/SVGFEImageElement.idl \
+ svg/SVGFEMergeElement.idl \
+ svg/SVGFEMergeNodeElement.idl \
+ svg/SVGFEMorphologyElement.idl \
+ svg/SVGFEOffsetElement.idl \
+ svg/SVGFEPointLightElement.idl \
+ svg/SVGFESpecularLightingElement.idl \
+ svg/SVGFESpotLightElement.idl \
+ svg/SVGFETileElement.idl \
+ svg/SVGFETurbulenceElement.idl \
+ svg/SVGFilterElement.idl \
+ svg/SVGFontElement.idl \
+ svg/SVGFontFaceElement.idl \
+ svg/SVGFontFaceFormatElement.idl \
+ svg/SVGFontFaceNameElement.idl \
+ svg/SVGFontFaceSrcElement.idl \
+ svg/SVGFontFaceUriElement.idl \
+ svg/SVGForeignObjectElement.idl \
+ svg/SVGGElement.idl \
+ svg/SVGGlyphElement.idl \
+ svg/SVGGradientElement.idl \
+ svg/SVGHKernElement.idl \
+ svg/SVGImageElement.idl \
+ svg/SVGLength.idl \
+ svg/SVGLengthList.idl \
+ svg/SVGLinearGradientElement.idl \
+ svg/SVGLineElement.idl \
+ svg/SVGMarkerElement.idl \
+ svg/SVGMaskElement.idl \
+ svg/SVGMatrix.idl \
+ svg/SVGMetadataElement.idl \
+ svg/SVGMissingGlyphElement.idl \
+ svg/SVGNumber.idl \
+ svg/SVGNumberList.idl \
+ svg/SVGPaint.idl \
+ svg/SVGPathElement.idl \
+ svg/SVGPathSegArcAbs.idl \
+ svg/SVGPathSegArcRel.idl \
+ svg/SVGPathSegClosePath.idl \
+ svg/SVGPathSegCurvetoCubicAbs.idl \
+ svg/SVGPathSegCurvetoCubicRel.idl \
+ svg/SVGPathSegCurvetoCubicSmoothAbs.idl \
+ svg/SVGPathSegCurvetoCubicSmoothRel.idl \
+ svg/SVGPathSegCurvetoQuadraticAbs.idl \
+ svg/SVGPathSegCurvetoQuadraticRel.idl \
+ svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl \
+ svg/SVGPathSegCurvetoQuadraticSmoothRel.idl \
+ svg/SVGPathSeg.idl \
+ svg/SVGPathSegLinetoAbs.idl \
+ svg/SVGPathSegLinetoHorizontalAbs.idl \
+ svg/SVGPathSegLinetoHorizontalRel.idl \
+ svg/SVGPathSegLinetoRel.idl \
+ svg/SVGPathSegLinetoVerticalAbs.idl \
+ svg/SVGPathSegLinetoVerticalRel.idl \
+ svg/SVGPathSegList.idl \
+ svg/SVGPathSegMovetoAbs.idl \
+ svg/SVGPathSegMovetoRel.idl \
+ svg/SVGPatternElement.idl \
+ svg/SVGPoint.idl \
+ svg/SVGPointList.idl \
+ svg/SVGPolygonElement.idl \
+ svg/SVGPolylineElement.idl \
+ svg/SVGPreserveAspectRatio.idl \
+ svg/SVGRadialGradientElement.idl \
+ svg/SVGRectElement.idl \
+ svg/SVGRect.idl \
+ svg/SVGRenderingIntent.idl \
+ svg/SVGScriptElement.idl \
+ svg/SVGSetElement.idl \
+ svg/SVGStopElement.idl \
+ svg/SVGStringList.idl \
+ svg/SVGStyleElement.idl \
+ svg/SVGSVGElement.idl \
+ svg/SVGSwitchElement.idl \
+ svg/SVGSymbolElement.idl \
+ svg/SVGTextContentElement.idl \
+ svg/SVGTextElement.idl \
+ svg/SVGTextPathElement.idl \
+ svg/SVGTextPositioningElement.idl \
+ svg/SVGTitleElement.idl \
+ svg/SVGTransform.idl \
+ svg/SVGTransformList.idl \
+ svg/SVGTRefElement.idl \
+ svg/SVGTSpanElement.idl \
+ svg/SVGUnitTypes.idl \
+ svg/SVGUseElement.idl \
+ svg/SVGViewElement.idl \
+ websockets/WebSocket.idl \
+ workers/AbstractWorker.idl \
+ workers/DedicatedWorkerContext.idl \
+ workers/SharedWorker.idl \
+ workers/SharedWorkerContext.idl \
+ workers/Worker.idl \
+ workers/WorkerContext.idl \
+ workers/WorkerLocation.idl \
+ xml/DOMParser.idl \
+ xml/XMLHttpRequest.idl \
+ xml/XMLHttpRequestException.idl \
+ xml/XMLHttpRequestProgressEvent.idl \
+ xml/XMLHttpRequestUpload.idl \
+ xml/XMLSerializer.idl \
+ xml/XPathNSResolver.idl \
+ xml/XPathException.idl \
+ xml/XPathExpression.idl \
+ xml/XPathResult.idl \
+ xml/XPathEvaluator.idl \
+ xml/XSLTProcessor.idl
+
+contains(DEFINES, ENABLE_WML=1) {
+ wmlnames.output = $${WC_GENERATED_SOURCES_DIR}/WMLNames.cpp
+ wmlnames.input = WML_NAMES
+ wmlnames.wkScript = $$PWD/dom/make_names.pl
+ wmlnames.commands = perl -I$$PWD/bindings/scripts $$wmlnames.wkScript --tags $$PWD/wml/WMLTagNames.in --attrs $$PWD/wml/WMLAttributeNames.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$WC_GENERATED_SOURCES_DIR
+ wmlnames.wkExtraSources = $${WC_GENERATED_SOURCES_DIR}/WMLElementFactory.cpp
+ addExtraCompiler(wmlnames)
+}
+
+contains(DEFINES, ENABLE_SVG=1) {
+ # GENERATOR 5-C:
+ svgnames.output = $${WC_GENERATED_SOURCES_DIR}/SVGNames.cpp
+ svgnames.input = SVG_NAMES
+ svgnames.wkScript = $$PWD/dom/make_names.pl
+ svgnames.commands = perl -I$$PWD/bindings/scripts $$svgnames.wkScript --tags $$PWD/svg/svgtags.in --attrs $$PWD/svg/svgattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$WC_GENERATED_SOURCES_DIR
+ svgnames.wkExtraSources = $${WC_GENERATED_SOURCES_DIR}/SVGElementFactory.cpp $${WC_GENERATED_SOURCES_DIR}/JSSVGElementWrapperFactory.cpp
+ addExtraCompiler(svgnames)
+}
+
+# GENERATOR 5-D:
+xlinknames.output = $${WC_GENERATED_SOURCES_DIR}/XLinkNames.cpp
+xlinknames.wkScript = $$PWD/dom/make_names.pl
+xlinknames.commands = perl -I$$PWD/bindings/scripts $$xlinknames.wkScript --attrs $$PWD/svg/xlinkattrs.in --preprocessor \"$${QMAKE_MOC} -E\" --outputDir $$WC_GENERATED_SOURCES_DIR
+xlinknames.input = XLINK_NAMES
+addExtraCompiler(xlinknames)
+
+# GENERATOR 6-A:
+cssprops.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp
+cssprops.input = WALDOCSSPROPS
+cssprops.wkScript = $$PWD/css/makeprop.pl
+cssprops.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES} > $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.in && cd $$WC_GENERATED_SOURCES_DIR && perl $$cssprops.wkScript && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
+cssprops.depends = ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES}
+addExtraCompiler(cssprops)
+
+# GENERATOR 6-B:
+cssvalues.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.c
+cssvalues.input = WALDOCSSVALUES
+cssvalues.wkScript = $$PWD/css/makevalues.pl
+cssvalues.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $$EXTRACSSVALUES > $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.in && cd $$WC_GENERATED_SOURCES_DIR && perl $$cssvalues.wkScript && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
+cssvalues.depends = ${QMAKE_FILE_NAME} $${EXTRACSSVALUES}
+cssvalues.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.h
+addExtraCompiler(cssvalues)
+
+# GENERATOR 1: IDL compiler
+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.depends = $$PWD/bindings/scripts/CodeGenerator.pm \
+ $$PWD/bindings/scripts/CodeGeneratorJS.pm \
+ $$PWD/bindings/scripts/IDLParser.pm \
+ $$PWD/bindings/scripts/IDLStructure.pm \
+ $$PWD/bindings/scripts/InFilesParser.pm
+addExtraCompiler(idl)
+
+# GENERATOR 3: tokenizer (flex)
+tokenizer.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp
+tokenizer.input = TOKENIZER
+tokenizer.wkScript = $$PWD/css/maketokenizer
+tokenizer.commands = flex -t < ${QMAKE_FILE_NAME} | perl $$tokenizer.wkScript > ${QMAKE_FILE_OUT}
+addExtraCompiler(tokenizer)
+
+# GENERATOR 4: CSS grammar
+cssbison.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp
+cssbison.input = CSSBISON
+cssbison.wkScript = $$PWD/css/makegrammar.pl
+cssbison.commands = perl $$cssbison.wkScript ${QMAKE_FILE_NAME} $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}
+cssbison.depends = ${QMAKE_FILE_NAME}
+addExtraCompiler(cssbison)
+
+# GENERATOR 5-A:
+htmlnames.output = $${WC_GENERATED_SOURCES_DIR}/HTMLNames.cpp
+htmlnames.input = HTML_NAMES
+htmlnames.wkScript = $$PWD/dom/make_names.pl
+htmlnames.commands = perl -I$$PWD/bindings/scripts $$htmlnames.wkScript --tags $$PWD/html/HTMLTagNames.in --attrs $$PWD/html/HTMLAttributeNames.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$WC_GENERATED_SOURCES_DIR
+htmlnames.depends = $$PWD/html/HTMLAttributeNames.in
+htmlnames.wkExtraSources = $${WC_GENERATED_SOURCES_DIR}/HTMLElementFactory.cpp $${WC_GENERATED_SOURCES_DIR}/JSHTMLElementWrapperFactory.cpp
+addExtraCompiler(htmlnames)
+
+# GENERATOR 5-B:
+xmlnsnames.output = $${WC_GENERATED_SOURCES_DIR}/XMLNSNames.cpp
+xmlnsnames.input = XMLNS_NAMES
+xmlnsnames.wkScript = $$PWD/dom/make_names.pl
+xmlnsnames.commands = perl -I$$PWD/bindings/scripts $$xmlnsnames.wkScript --attrs $$PWD/xml/xmlnsattrs.in --preprocessor \"$${QMAKE_MOC} -E\" --outputDir $$WC_GENERATED_SOURCES_DIR
+addExtraCompiler(xmlnsnames)
+
+# GENERATOR 5-C:
+xmlnames.output = $${WC_GENERATED_SOURCES_DIR}/XMLNames.cpp
+xmlnames.input = XML_NAMES
+xmlnames.wkScript = $$PWD/dom/make_names.pl
+xmlnames.commands = perl -I$$PWD/bindings/scripts $$xmlnames.wkScript --attrs $$PWD/xml/xmlattrs.in --preprocessor \"$${QMAKE_MOC} -E\" --outputDir $$WC_GENERATED_SOURCES_DIR
+addExtraCompiler(xmlnames)
+
+# GENERATOR 8-A:
+entities.output = $${WC_GENERATED_SOURCES_DIR}/HTMLEntityNames.c
+entities.input = ENTITIES_GPERF
+entities.commands = gperf -a -L ANSI-C -C -G -c -o -t --includes --key-positions="*" -N findEntity -D -s 2 < $$PWD/html/HTMLEntityNames.gperf > $${WC_GENERATED_SOURCES_DIR}/HTMLEntityNames.c
+entities.clean = ${QMAKE_FILE_OUT}
+addExtraCompiler(entities)
+
+# GENERATOR 8-B:
+doctypestrings.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp
+doctypestrings.input = DOCTYPESTRINGS
+doctypestrings.commands = gperf -CEot -L ANSI-C --includes --key-positions="*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards < ${QMAKE_FILE_NAME} >> ${QMAKE_FILE_OUT}
+doctypestrings.clean = ${QMAKE_FILE_OUT}
+addExtraCompiler(doctypestrings)
+
+# GENERATOR 8-C:
+colordata.output = $${WC_GENERATED_SOURCES_DIR}/ColorData.c
+colordata.input = COLORDAT_GPERF
+colordata.commands = gperf -CDEot -L ANSI-C --includes --key-positions="*" -N findColor -D -s 2 < ${QMAKE_FILE_NAME} >> ${QMAKE_FILE_OUT}
+addExtraCompiler(colordata)
+
+# GENERATOR 9:
+stylesheets.wkScript = $$PWD/css/make-css-file-arrays.pl
+stylesheets.output = $${WC_GENERATED_SOURCES_DIR}/UserAgentStyleSheetsData.cpp
+stylesheets.input = stylesheets.wkScript
+stylesheets.commands = perl $$stylesheets.wkScript --preprocessor \"$${QMAKE_MOC} -E\" $${WC_GENERATED_SOURCES_DIR}/UserAgentStyleSheets.h ${QMAKE_FILE_OUT} $$STYLESHEETS_EMBED
+stylesheets.depends = $$STYLESHEETS_EMBED
+stylesheets.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_WC_GENERATED_SOURCES_DIR}/UserAgentStyleSheets.h
+addExtraCompiler(stylesheets, $${WC_GENERATED_SOURCES_DIR}/UserAgentStyleSheets.h)
+
+# GENERATOR 10: XPATH grammar
+xpathbison.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp
+xpathbison.input = XPATHBISON
+xpathbison.commands = bison -d -p xpathyy ${QMAKE_FILE_NAME} -o $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.tab.c && $(MOVE) $${WC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c $${WC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp && $(MOVE) $${WC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.h $${WC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.h
+xpathbison.depends = ${QMAKE_FILE_NAME}
+addExtraCompiler(xpathbison)
+
+# GENERATOR 11: WebKit Version
+# The appropriate Apple-maintained Version.xcconfig file for WebKit version information is in WebKit/mac/Configurations/.
+webkitversion.wkScript = $$PWD/../WebKit/scripts/generate-webkitversion.pl
+webkitversion.output = $${WC_GENERATED_SOURCES_DIR}/WebKitVersion.h
+webkitversion.input = webkitversion.wkScript
+webkitversion.commands = perl $$webkitversion.wkScript --config $$PWD/../WebKit/mac/Configurations/Version.xcconfig --outputDir $${WC_GENERATED_SOURCES_DIR}/
+webkitversion.clean = ${QMAKE_VAR_WC_GENERATED_SOURCES_DIR}/WebKitVersion.h
+webkitversion.wkAddOutputToSources = false
+addExtraCompiler(webkitversion)
+
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 4dc1294..d7a8c79 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -6,18 +6,32 @@ symbian: {
TARGET.EPOCALLOWDLLDATA=1
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 // Min 128kB, Max 32MB
TARGET.CAPABILITY = All -Tcb
+ TARGET.UID3 = 0x200267C2
webkitlibs.sources = QtWebKit.dll
webkitlibs.path = /sys/bin
- DEPLOYMENT += webkitlibs
+ vendorinfo = \
+ "; Localised Vendor name" \
+ "%{\"Nokia, Qt\"}" \
+ " " \
+ "; Unique Vendor name" \
+ ":\"Nokia, Qt\"" \
+ " "
+ webkitlibs.pkg_prerules = vendorinfo
+
+ webkitbackup.sources = ../WebKit/qt/symbian/backup_registration.xml
+ webkitbackup.path = /private/10202D56/import/packages/$$replace(TARGET.UID3, 0x,)
+
+ DEPLOYMENT += webkitlibs webkitbackup
- TARGET.UID3 = 0x200267C2
# Need to guarantee that these come before system includes of /epoc32/include
MMP_RULES += "USERINCLUDE rendering"
MMP_RULES += "USERINCLUDE platform/text"
# RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target.
# Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000.
- MMP_RULES += "LINKEROPTION armcc --rw-base 0xE00000"
+ QMAKE_LFLAGS.ARMCC += --rw-base 0xE00000
+ MMP_RULES += ALWAYS_BUILD_AS_ARM
+ QMAKE_CXXFLAGS.ARMCC += -OTime -O3
}
include($$PWD/../WebKit.pri)
@@ -27,26 +41,35 @@ TARGET = QtWebKit
contains(QT_CONFIG, embedded):CONFIG += embedded
-CONFIG(QTDIR_build) {
- GENERATED_SOURCES_DIR = $$PWD/generated
- include($$QT_SOURCE_TREE/src/qbase.pri)
+isEmpty(OUTPUT_DIR): OUTPUT_DIR = ..
+
+CONFIG(standalone_package) {
+ isEmpty(WC_GENERATED_SOURCES_DIR):WC_GENERATED_SOURCES_DIR = $$PWD/generated
+ isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = $$PWD/../JavaScriptCore/generated
+
+ CONFIG(QTDIR_build):include($$QT_SOURCE_TREE/src/qbase.pri)
+ else: VERSION = 4.7.0
+
PRECOMPILED_HEADER = $$PWD/../WebKit/qt/WebKit_pch.h
DEFINES *= NDEBUG
+
+ symbian: CONFIG += def_files
} else {
- !static: DEFINES += QT_MAKEDLL
+ isEmpty(WC_GENERATED_SOURCES_DIR):WC_GENERATED_SOURCES_DIR = generated
+ isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = ../JavaScriptCore/generated
CONFIG(debug, debug|release) {
- isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}debug
OBJECTS_DIR = obj/debug
} else { # Release
- isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}release
OBJECTS_DIR = obj/release
}
- DESTDIR = $$OUTPUT_DIR/lib
}
-GENERATED_SOURCES_DIR_SLASH = $$GENERATED_SOURCES_DIR${QMAKE_DIR_SEP}
+!CONFIG(QTDIR_build) {
+ DESTDIR = $$OUTPUT_DIR/lib
+ !static: DEFINES += QT_MAKEDLL
+}
unix {
QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui QtNetwork
@@ -54,8 +77,9 @@ unix {
unix:!mac:*-g++*:QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections
unix:!mac:*-g++*:QMAKE_LFLAGS += -Wl,--gc-sections
+linux*-g++*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
-CONFIG(release):!CONFIG(QTDIR_build) {
+CONFIG(release):!CONFIG(standalone_package) {
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions
}
@@ -92,109 +116,49 @@ win32-g++ {
# Assume that symbian OS always comes with sqlite
symbian:!CONFIG(QTDIR_build): CONFIG += system-sqlite
-# Try to locate sqlite3 source
-CONFIG(QTDIR_build) {
- SQLITE3SRCDIR = $$QT_SOURCE_TREE/src/3rdparty/sqlite/
-} else {
- SQLITE3SRCDIR = $$(SQLITE3SRCDIR)
- isEmpty(SQLITE3SRCDIR) {
- SQLITE3SRCDIR = $$[QT_INSTALL_PREFIX]/src/3rdparty/sqlite/
- }
-}
-# Optional components (look for defs in config.h and included files!)
-contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
- DEFINES+=ENABLE_DATABASE=0 ENABLE_DOM_STORAGE=0 ENABLE_ICONDATABASE=0 ENABLE_WORKERS=0 ENABLE_SHARED_WORKERS=0
-}
-
-# turn off SQLITE support if we do not have sqlite3 available
-!CONFIG(QTDIR_build):win32-*:!exists( $${SQLITE3SRCDIR}/sqlite3.c ): DEFINES += ENABLE_SQLITE=0 ENABLE_DATABASE=0 ENABLE_ICONDATABASE=0 ENABLE_OFFLINE_WEB_APPLICATIONS=0 ENABLE_DOM_STORAGE=0
-
-!contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=.): DEFINES += ENABLE_JAVASCRIPT_DEBUGGER=1
-!contains(DEFINES, ENABLE_DATABASE=.): DEFINES += ENABLE_DATABASE=1
-!contains(DEFINES, ENABLE_EVENTSOURCE=.): DEFINES += ENABLE_EVENTSOURCE=1
-!contains(DEFINES, ENABLE_OFFLINE_WEB_APPLICATIONS=.): DEFINES += ENABLE_OFFLINE_WEB_APPLICATIONS=1
-!contains(DEFINES, ENABLE_DOM_STORAGE=.): DEFINES += ENABLE_DOM_STORAGE=1
-!contains(DEFINES, ENABLE_ICONDATABASE=.): DEFINES += ENABLE_ICONDATABASE=1
-!contains(DEFINES, ENABLE_CHANNEL_MESSAGING=.): DEFINES += ENABLE_CHANNEL_MESSAGING=1
-!contains(DEFINES, ENABLE_ORIENTATION_EVENTS=.): DEFINES += ENABLE_ORIENTATION_EVENTS=0
-
-# turn on SQLITE support if any of the dependent features are turned on
-!contains(DEFINES, ENABLE_SQLITE=.) {
- contains(DEFINES, ENABLE_DATABASE=1)|contains(DEFINES, ENABLE_ICONDATABASE=1)|contains(DEFINES, ENABLE_DOM_STORAGE=1)|contains(DEFINES, ENABLE_OFFLINE_WEB_APPLICATIONS=1) {
- DEFINES += ENABLE_SQLITE=1
- } else {
- DEFINES += ENABLE_SQLITE=0
- }
-}
+RESOURCES += \
+ $$PWD/../WebCore/WebCore.qrc
-!contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=.): DEFINES += ENABLE_DASHBOARD_SUPPORT=0
-!contains(DEFINES, ENABLE_FILTERS=.): DEFINES += ENABLE_FILTERS=1
-!contains(DEFINES, ENABLE_XPATH=.): DEFINES += ENABLE_XPATH=1
-#!contains(DEFINES, ENABLE_XBL=.): DEFINES += ENABLE_XBL=1
-!contains(DEFINES, ENABLE_WCSS=.): DEFINES += ENABLE_WCSS=0
-!contains(DEFINES, ENABLE_WML=.): DEFINES += ENABLE_WML=0
-!contains(DEFINES, ENABLE_SHARED_WORKERS=.): DEFINES += ENABLE_SHARED_WORKERS=1
-!contains(DEFINES, ENABLE_WORKERS=.): DEFINES += ENABLE_WORKERS=1
-!contains(DEFINES, ENABLE_XHTMLMP=.): DEFINES += ENABLE_XHTMLMP=0
-!contains(DEFINES, ENABLE_DATAGRID=.): DEFINES += ENABLE_DATAGRID=1
-
-# SVG support
-!contains(DEFINES, ENABLE_SVG=0) {
- !contains(DEFINES, ENABLE_SVG=.): DEFINES += ENABLE_SVG=1
- !contains(DEFINES, ENABLE_SVG_FONTS=.): DEFINES += ENABLE_SVG_FONTS=1
- !contains(DEFINES, ENABLE_SVG_FOREIGN_OBJECT=.): DEFINES += ENABLE_SVG_FOREIGN_OBJECT=1
- !contains(DEFINES, ENABLE_SVG_ANIMATION=.): DEFINES += ENABLE_SVG_ANIMATION=1
- !contains(DEFINES, ENABLE_SVG_AS_IMAGE=.): DEFINES += ENABLE_SVG_AS_IMAGE=1
- !contains(DEFINES, ENABLE_SVG_USE=.): DEFINES += ENABLE_SVG_USE=1
-} else {
- DEFINES += ENABLE_SVG_FONTS=0 ENABLE_SVG_FOREIGN_OBJECT=0 ENABLE_SVG_ANIMATION=0 ENABLE_SVG_AS_IMAGE=0 ENABLE_SVG_USE=0
+!symbian:!maemo5 {
+ RESOURCES += $$PWD/../WebCore/inspector/front-end/WebKit.qrc
}
-# HTML5 media support
-!contains(DEFINES, ENABLE_VIDEO=.) {
- contains(QT_CONFIG, phonon):DEFINES += ENABLE_VIDEO=1
- else:DEFINES += ENABLE_VIDEO=0
+mameo5|symbian|embedded {
+ DEFINES += ENABLE_FAST_MOBILE_SCROLLING=1
}
-# HTML5 datalist support
-!contains(DEFINES, ENABLE_DATALIST=.): DEFINES += ENABLE_DATALIST=1
+include($$PWD/../JavaScriptCore/JavaScriptCore.pri)
-# Nescape plugins support (NPAPI)
-!contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=.) {
- unix|win32-*:!embedded:!wince*: {
- DEFINES += ENABLE_NETSCAPE_PLUGIN_API=1
- } else {
- DEFINES += ENABLE_NETSCAPE_PLUGIN_API=0
+# Disable HTML5 media compilation if phonon is unavailable
+!contains(DEFINES, ENABLE_VIDEO=1) {
+ !contains(QT_CONFIG, phonon) {
+ DEFINES -= ENABLE_VIDEO=1
+ DEFINES += ENABLE_VIDEO=0
}
}
-# Web Socket support.
-!contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=1
+# Extract sources to build from the generator definitions
+defineTest(addExtraCompiler) {
+ isEqual($${1}.wkAddOutputToSources, false): return(true)
-# XSLT support with QtXmlPatterns
-!contains(DEFINES, ENABLE_XSLT=.) {
- contains(QT_CONFIG, xmlpatterns):!lessThan(QT_MINOR_VERSION, 5):DEFINES += ENABLE_XSLT=1
- else:DEFINES += ENABLE_XSLT=0
-}
+ outputRule = $$eval($${1}.output)
+ input = $$eval($${1}.input)
+ input = $$eval($$input)
-DEFINES += WTF_CHANGES=1
-
-# Used to compute defaults for the build-webkit script
-CONFIG(compute_defaults) {
- message($$DEFINES)
- error("Done computing defaults")
-}
-
-RESOURCES += \
- $$PWD/../WebCore/WebCore.qrc
+ for(file,input) {
+ base = $$basename(file)
+ base ~= s/\..+//
+ newfile=$$replace(outputRule,\\$\\{QMAKE_FILE_BASE\\},$$base)
+ SOURCES += $$newfile
+ }
+ SOURCES += $$eval($${1}.wkExtraSources)
+ export(SOURCES)
-!symbian {
- RESOURCES += $$PWD/../WebCore/inspector/front-end/WebKit.qrc
+ return(true)
}
-
-include($$PWD/../JavaScriptCore/JavaScriptCore.pri)
+include(WebCore.pri)
INCLUDEPATH = \
$$PWD \
@@ -202,6 +166,7 @@ INCLUDEPATH = \
$$PWD/bindings/js \
$$PWD/bridge \
$$PWD/bridge/c \
+ $$PWD/bridge/jsc \
$$PWD/css \
$$PWD/dom \
$$PWD/dom/default \
@@ -239,7 +204,7 @@ INCLUDEPATH = \
$$PWD/wml \
$$PWD/workers \
$$PWD/xml \
- $$GENERATED_SOURCES_DIR \
+ $$WC_GENERATED_SOURCES_DIR \
$$INCLUDEPATH
INCLUDEPATH = \
@@ -253,27 +218,6 @@ INCLUDEPATH = \
QT += network
-QMAKE_EXTRA_TARGETS += generated_files
-
-FEATURE_DEFINES_JAVASCRIPT = LANGUAGE_JAVASCRIPT=1
-
-TOKENIZER = $$PWD/css/tokenizer.flex
-
-DOCTYPESTRINGS = $$PWD/html/DocTypeStrings.gperf
-
-CSSBISON = $$PWD/css/CSSGrammar.y
-
-HTML_NAMES = $$PWD/html/HTMLTagNames.in
-
-XML_NAMES = $$PWD/xml/xmlattrs.in
-
-ENTITIES_GPERF = $$PWD/html/HTMLEntityNames.gperf
-
-COLORDAT_GPERF = $$PWD/platform/ColorData.gperf
-
-WALDOCSSPROPS = $$PWD/css/CSSPropertyNames.in
-
-WALDOCSSVALUES = $$PWD/css/CSSValueKeywords.in
DASHBOARDSUPPORTCSSPROPERTIES = $$PWD/css/DashboardSupportCSSPropertyNames.in
@@ -288,383 +232,18 @@ contains(DEFINES, ENABLE_WCSS=1) {
EXTRACSSVALUES += $$PWD/css/WCSSValueKeywords.in
}
-STYLESHEETS_EMBED = \
- $$PWD/css/html.css \
- $$PWD/css/quirks.css \
- $$PWD/css/svg.css \
- $$PWD/css/view-source.css \
- $$PWD/css/wml.css \
- $$PWD/css/mediaControls.css \
- $$PWD/css/mediaControlsQt.css
-
-IDL_BINDINGS += \
- css/Counter.idl \
- css/CSSCharsetRule.idl \
- css/CSSFontFaceRule.idl \
- css/CSSImportRule.idl \
- css/CSSMediaRule.idl \
- css/CSSPageRule.idl \
- css/CSSPrimitiveValue.idl \
- css/CSSRule.idl \
- css/CSSRuleList.idl \
- css/CSSStyleDeclaration.idl \
- css/CSSStyleRule.idl \
- css/CSSStyleSheet.idl \
- css/CSSValue.idl \
- css/CSSValueList.idl \
- css/CSSVariablesDeclaration.idl \
- css/CSSVariablesRule.idl \
- css/Media.idl \
- css/MediaList.idl \
- css/RGBColor.idl \
- css/Rect.idl \
- css/StyleSheet.idl \
- css/StyleSheetList.idl \
- css/WebKitCSSKeyframeRule.idl \
- css/WebKitCSSKeyframesRule.idl \
- css/WebKitCSSMatrix.idl \
- css/WebKitCSSTransformValue.idl \
- dom/Attr.idl \
- dom/BeforeLoadEvent.idl \
- dom/CharacterData.idl \
- dom/ClientRect.idl \
- dom/ClientRectList.idl \
- dom/Clipboard.idl \
- dom/CDATASection.idl \
- dom/Comment.idl \
- dom/CompositionEvent.idl \
- dom/DocumentFragment.idl \
- dom/Document.idl \
- dom/DocumentType.idl \
- dom/DOMCoreException.idl \
- dom/DOMImplementation.idl \
- dom/Element.idl \
- dom/Entity.idl \
- dom/EntityReference.idl \
- dom/ErrorEvent.idl \
- dom/Event.idl \
- dom/EventException.idl \
-# dom/EventListener.idl \
-# dom/EventTarget.idl \
- dom/KeyboardEvent.idl \
- dom/MouseEvent.idl \
- dom/MessageChannel.idl \
- dom/MessageEvent.idl \
- dom/MessagePort.idl \
- dom/MutationEvent.idl \
- dom/NamedNodeMap.idl \
- dom/Node.idl \
- dom/NodeFilter.idl \
- dom/NodeIterator.idl \
- dom/NodeList.idl \
- dom/Notation.idl \
- dom/OverflowEvent.idl \
- dom/PageTransitionEvent.idl \
- dom/PopStateEvent.idl \
- dom/ProcessingInstruction.idl \
- dom/ProgressEvent.idl \
- dom/RangeException.idl \
- dom/Range.idl \
- dom/Text.idl \
- dom/TextEvent.idl \
- dom/TreeWalker.idl \
- dom/UIEvent.idl \
- dom/WebKitAnimationEvent.idl \
- dom/WebKitTransitionEvent.idl \
- dom/WheelEvent.idl \
- html/canvas/WebGLArray.idl \
- html/canvas/WebGLArrayBuffer.idl \
- html/canvas/WebGLByteArray.idl \
- html/canvas/WebGLFloatArray.idl \
- html/canvas/CanvasGradient.idl \
- html/canvas/WebGLIntArray.idl \
- html/canvas/CanvasPattern.idl \
- html/canvas/CanvasRenderingContext.idl \
- html/canvas/CanvasRenderingContext2D.idl \
- html/canvas/WebGLRenderingContext.idl \
- html/canvas/WebGLShortArray.idl \
- html/canvas/WebGLUnsignedByteArray.idl \
- html/canvas/WebGLUnsignedIntArray.idl \
- html/canvas/WebGLUnsignedShortArray.idl \
- html/DataGridColumn.idl \
- html/DataGridColumnList.idl \
- html/File.idl \
- html/FileList.idl \
- html/HTMLAllCollection.idl \
- html/HTMLAudioElement.idl \
- html/HTMLAnchorElement.idl \
- html/HTMLAppletElement.idl \
- html/HTMLAreaElement.idl \
- html/HTMLBaseElement.idl \
- html/HTMLBaseFontElement.idl \
- html/HTMLBlockquoteElement.idl \
- html/HTMLBodyElement.idl \
- html/HTMLBRElement.idl \
- html/HTMLButtonElement.idl \
- html/HTMLCanvasElement.idl \
- html/HTMLCollection.idl \
- html/HTMLDataGridElement.idl \
- html/HTMLDataGridCellElement.idl \
- html/HTMLDataGridColElement.idl \
- html/HTMLDataGridRowElement.idl \
- html/HTMLDataListElement.idl \
- html/HTMLDirectoryElement.idl \
- html/HTMLDivElement.idl \
- html/HTMLDListElement.idl \
- html/HTMLDocument.idl \
- html/HTMLElement.idl \
- html/HTMLEmbedElement.idl \
- html/HTMLFieldSetElement.idl \
- html/HTMLFontElement.idl \
- html/HTMLFormElement.idl \
- html/HTMLFrameElement.idl \
- html/HTMLFrameSetElement.idl \
- html/HTMLHeadElement.idl \
- html/HTMLHeadingElement.idl \
- html/HTMLHRElement.idl \
- html/HTMLHtmlElement.idl \
- html/HTMLIFrameElement.idl \
- html/HTMLImageElement.idl \
- html/HTMLInputElement.idl \
- html/HTMLIsIndexElement.idl \
- html/HTMLLabelElement.idl \
- html/HTMLLegendElement.idl \
- html/HTMLLIElement.idl \
- html/HTMLLinkElement.idl \
- html/HTMLMapElement.idl \
- html/HTMLMarqueeElement.idl \
- html/HTMLMediaElement.idl \
- html/HTMLMenuElement.idl \
- html/HTMLMetaElement.idl \
- html/HTMLModElement.idl \
- html/HTMLObjectElement.idl \
- html/HTMLOListElement.idl \
- html/HTMLOptGroupElement.idl \
- html/HTMLOptionElement.idl \
- html/HTMLOptionsCollection.idl \
- html/HTMLParagraphElement.idl \
- html/HTMLParamElement.idl \
- html/HTMLPreElement.idl \
- html/HTMLQuoteElement.idl \
- html/HTMLScriptElement.idl \
- html/HTMLSelectElement.idl \
- html/HTMLSourceElement.idl \
- html/HTMLStyleElement.idl \
- html/HTMLTableCaptionElement.idl \
- html/HTMLTableCellElement.idl \
- html/HTMLTableColElement.idl \
- html/HTMLTableElement.idl \
- html/HTMLTableRowElement.idl \
- html/HTMLTableSectionElement.idl \
- html/HTMLTextAreaElement.idl \
- html/HTMLTitleElement.idl \
- html/HTMLUListElement.idl \
- html/HTMLVideoElement.idl \
- html/ImageData.idl \
- html/MediaError.idl \
- html/TextMetrics.idl \
- html/TimeRanges.idl \
- html/ValidityState.idl \
- html/VoidCallback.idl \
- inspector/InjectedScriptHost.idl \
- inspector/InspectorBackend.idl \
- inspector/InspectorFrontendHost.idl \
- inspector/JavaScriptCallFrame.idl \
- loader/appcache/DOMApplicationCache.idl \
- page/BarInfo.idl \
- page/Console.idl \
- page/Coordinates.idl \
- page/DOMSelection.idl \
- page/DOMWindow.idl \
- page/EventSource.idl \
- page/Geolocation.idl \
- page/Geoposition.idl \
- page/History.idl \
- page/Location.idl \
- page/Navigator.idl \
- page/PositionError.idl \
- page/Screen.idl \
- page/WebKitPoint.idl \
- page/WorkerNavigator.idl \
- plugins/Plugin.idl \
- plugins/MimeType.idl \
- plugins/PluginArray.idl \
- plugins/MimeTypeArray.idl \
- storage/Database.idl \
- storage/Storage.idl \
- storage/StorageEvent.idl \
- storage/SQLError.idl \
- storage/SQLResultSet.idl \
- storage/SQLResultSetRowList.idl \
- storage/SQLTransaction.idl \
- websockets/WebSocket.idl \
- workers/AbstractWorker.idl \
- workers/DedicatedWorkerContext.idl \
- workers/SharedWorker.idl \
- workers/SharedWorkerContext.idl \
- workers/Worker.idl \
- workers/WorkerContext.idl \
- workers/WorkerLocation.idl \
- xml/DOMParser.idl \
- xml/XMLHttpRequest.idl \
- xml/XMLHttpRequestException.idl \
- xml/XMLHttpRequestProgressEvent.idl \
- xml/XMLHttpRequestUpload.idl \
- xml/XMLSerializer.idl \
- xml/XPathNSResolver.idl \
- xml/XPathException.idl \
- xml/XPathExpression.idl \
- xml/XPathResult.idl \
- xml/XPathEvaluator.idl \
- xml/XSLTProcessor.idl
-
-contains(DEFINES, ENABLE_SVG=1) {
-
- IDL_BINDINGS += \
- svg/SVGZoomEvent.idl \
- svg/SVGAElement.idl \
- svg/SVGAltGlyphElement.idl \
- svg/SVGAngle.idl \
- svg/SVGAnimateColorElement.idl \
- svg/SVGAnimatedAngle.idl \
- svg/SVGAnimatedBoolean.idl \
- svg/SVGAnimatedEnumeration.idl \
- svg/SVGAnimatedInteger.idl \
- svg/SVGAnimatedLength.idl \
- svg/SVGAnimatedLengthList.idl \
- svg/SVGAnimatedNumber.idl \
- svg/SVGAnimatedNumberList.idl \
- svg/SVGAnimatedPreserveAspectRatio.idl \
- svg/SVGAnimatedRect.idl \
- svg/SVGAnimatedString.idl \
- svg/SVGAnimatedTransformList.idl \
- svg/SVGAnimateElement.idl \
- svg/SVGAnimateTransformElement.idl \
- svg/SVGAnimationElement.idl \
- svg/SVGCircleElement.idl \
- svg/SVGClipPathElement.idl \
- svg/SVGColor.idl \
- svg/SVGComponentTransferFunctionElement.idl \
- svg/SVGCursorElement.idl \
- svg/SVGDefsElement.idl \
- svg/SVGDescElement.idl \
- svg/SVGDocument.idl \
- svg/SVGElement.idl \
- svg/SVGElementInstance.idl \
- svg/SVGElementInstanceList.idl \
- svg/SVGEllipseElement.idl \
- svg/SVGException.idl \
- svg/SVGFEBlendElement.idl \
- svg/SVGFEColorMatrixElement.idl \
- svg/SVGFEComponentTransferElement.idl \
- svg/SVGFECompositeElement.idl \
- svg/SVGFEDiffuseLightingElement.idl \
- svg/SVGFEDisplacementMapElement.idl \
- svg/SVGFEDistantLightElement.idl \
- svg/SVGFEFloodElement.idl \
- svg/SVGFEFuncAElement.idl \
- svg/SVGFEFuncBElement.idl \
- svg/SVGFEFuncGElement.idl \
- svg/SVGFEFuncRElement.idl \
- svg/SVGFEGaussianBlurElement.idl \
- svg/SVGFEImageElement.idl \
- svg/SVGFEMergeElement.idl \
- svg/SVGFEMergeNodeElement.idl \
- svg/SVGFEMorphologyElement.idl \
- svg/SVGFEOffsetElement.idl \
- svg/SVGFEPointLightElement.idl \
- svg/SVGFESpecularLightingElement.idl \
- svg/SVGFESpotLightElement.idl \
- svg/SVGFETileElement.idl \
- svg/SVGFETurbulenceElement.idl \
- svg/SVGFilterElement.idl \
- svg/SVGFontElement.idl \
- svg/SVGFontFaceElement.idl \
- svg/SVGFontFaceFormatElement.idl \
- svg/SVGFontFaceNameElement.idl \
- svg/SVGFontFaceSrcElement.idl \
- svg/SVGFontFaceUriElement.idl \
- svg/SVGForeignObjectElement.idl \
- svg/SVGGElement.idl \
- svg/SVGGlyphElement.idl \
- svg/SVGGradientElement.idl \
- svg/SVGHKernElement.idl \
- svg/SVGImageElement.idl \
- svg/SVGLength.idl \
- svg/SVGLengthList.idl \
- svg/SVGLinearGradientElement.idl \
- svg/SVGLineElement.idl \
- svg/SVGMarkerElement.idl \
- svg/SVGMaskElement.idl \
- svg/SVGMatrix.idl \
- svg/SVGMetadataElement.idl \
- svg/SVGMissingGlyphElement.idl \
- svg/SVGNumber.idl \
- svg/SVGNumberList.idl \
- svg/SVGPaint.idl \
- svg/SVGPathElement.idl \
- svg/SVGPathSegArcAbs.idl \
- svg/SVGPathSegArcRel.idl \
- svg/SVGPathSegClosePath.idl \
- svg/SVGPathSegCurvetoCubicAbs.idl \
- svg/SVGPathSegCurvetoCubicRel.idl \
- svg/SVGPathSegCurvetoCubicSmoothAbs.idl \
- svg/SVGPathSegCurvetoCubicSmoothRel.idl \
- svg/SVGPathSegCurvetoQuadraticAbs.idl \
- svg/SVGPathSegCurvetoQuadraticRel.idl \
- svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl \
- svg/SVGPathSegCurvetoQuadraticSmoothRel.idl \
- svg/SVGPathSeg.idl \
- svg/SVGPathSegLinetoAbs.idl \
- svg/SVGPathSegLinetoHorizontalAbs.idl \
- svg/SVGPathSegLinetoHorizontalRel.idl \
- svg/SVGPathSegLinetoRel.idl \
- svg/SVGPathSegLinetoVerticalAbs.idl \
- svg/SVGPathSegLinetoVerticalRel.idl \
- svg/SVGPathSegList.idl \
- svg/SVGPathSegMovetoAbs.idl \
- svg/SVGPathSegMovetoRel.idl \
- svg/SVGPatternElement.idl \
- svg/SVGPoint.idl \
- svg/SVGPointList.idl \
- svg/SVGPolygonElement.idl \
- svg/SVGPolylineElement.idl \
- svg/SVGPreserveAspectRatio.idl \
- svg/SVGRadialGradientElement.idl \
- svg/SVGRectElement.idl \
- svg/SVGRect.idl \
- svg/SVGRenderingIntent.idl \
- svg/SVGScriptElement.idl \
- svg/SVGSetElement.idl \
- svg/SVGStopElement.idl \
- svg/SVGStringList.idl \
- svg/SVGStyleElement.idl \
- svg/SVGSVGElement.idl \
- svg/SVGSwitchElement.idl \
- svg/SVGSymbolElement.idl \
- svg/SVGTextContentElement.idl \
- svg/SVGTextElement.idl \
- svg/SVGTextPathElement.idl \
- svg/SVGTextPositioningElement.idl \
- svg/SVGTitleElement.idl \
- svg/SVGTransform.idl \
- svg/SVGTransformList.idl \
- svg/SVGTRefElement.idl \
- svg/SVGTSpanElement.idl \
- svg/SVGUnitTypes.idl \
- svg/SVGUseElement.idl \
- svg/SVGViewElement.idl
-
-}
-
SOURCES += \
accessibility/AccessibilityImageMapLink.cpp \
accessibility/AccessibilityMediaControls.cpp \
+ accessibility/AccessibilityMenuList.cpp \
+ accessibility/AccessibilityMenuListOption.cpp \
+ accessibility/AccessibilityMenuListPopup.cpp \
accessibility/AccessibilityObject.cpp \
accessibility/AccessibilityList.cpp \
accessibility/AccessibilityListBox.cpp \
accessibility/AccessibilityListBoxOption.cpp \
accessibility/AccessibilityRenderObject.cpp \
+ accessibility/AccessibilityScrollbar.cpp \
accessibility/AccessibilitySlider.cpp \
accessibility/AccessibilityARIAGrid.cpp \
accessibility/AccessibilityARIAGridCell.cpp \
@@ -727,9 +306,7 @@ SOURCES += \
bindings/js/JSImageConstructor.cpp \
bindings/js/JSImageDataCustom.cpp \
bindings/js/JSInjectedScriptHostCustom.cpp \
- bindings/js/JSInspectedObjectWrapper.cpp \
bindings/js/JSInspectorFrontendHostCustom.cpp \
- bindings/js/JSInspectorCallbackWrapper.cpp \
bindings/js/JSLocationCustom.cpp \
bindings/js/JSNamedNodeMapCustom.cpp \
bindings/js/JSNavigatorCustom.cpp \
@@ -739,7 +316,6 @@ SOURCES += \
bindings/js/JSNodeIteratorCustom.cpp \
bindings/js/JSNodeListCustom.cpp \
bindings/js/JSOptionConstructor.cpp \
- bindings/js/JSQuarantinedObjectWrapper.cpp \
bindings/js/JSStyleSheetCustom.cpp \
bindings/js/JSStyleSheetListCustom.cpp \
bindings/js/JSTextCustom.cpp \
@@ -921,6 +497,9 @@ SOURCES += \
dom/TagNodeList.cpp \
dom/Text.cpp \
dom/TextEvent.cpp \
+ dom/Touch.cpp \
+ dom/TouchEvent.cpp \
+ dom/TouchList.cpp \
dom/Traversal.cpp \
dom/TreeWalker.cpp \
dom/UIEvent.cpp \
@@ -984,6 +563,7 @@ SOURCES += \
history/HistoryItem.cpp \
history/qt/HistoryItemQt.cpp \
history/PageCache.cpp \
+ html/Blob.cpp \
html/canvas/CanvasGradient.cpp \
html/canvas/CanvasPattern.cpp \
html/canvas/CanvasPixelArray.cpp \
@@ -993,6 +573,7 @@ SOURCES += \
html/CollectionCache.cpp \
html/DataGridColumn.cpp \
html/DataGridColumnList.cpp \
+ html/DateComponents.cpp \
html/DOMDataGridDataSource.cpp \
html/File.cpp \
html/FileList.cpp \
@@ -1063,7 +644,6 @@ SOURCES += \
html/HTMLPreElement.cpp \
html/HTMLQuoteElement.cpp \
html/HTMLScriptElement.cpp \
- html/HTMLNoScriptElement.cpp \
html/HTMLSelectElement.cpp \
html/HTMLStyleElement.cpp \
html/HTMLTableCaptionElement.cpp \
@@ -1079,7 +659,6 @@ SOURCES += \
html/HTMLTokenizer.cpp \
html/HTMLUListElement.cpp \
html/HTMLViewSourceDocument.cpp \
- html/ISODateTime.cpp \
html/ImageData.cpp \
html/PreloadScanner.cpp \
html/ValidityState.cpp \
@@ -1300,6 +879,7 @@ SOURCES += \
rendering/RenderButton.cpp \
rendering/RenderCounter.cpp \
rendering/RenderDataGrid.cpp \
+ rendering/RenderEmbeddedObject.cpp \
rendering/RenderFieldset.cpp \
rendering/RenderFileUploadControl.cpp \
rendering/RenderFlexibleBox.cpp \
@@ -1387,6 +967,7 @@ HEADERS += \
accessibility/AccessibilityMediaControls.h \
accessibility/AccessibilityObject.h \
accessibility/AccessibilityRenderObject.h \
+ accessibility/AccessibilityScrollbar.h \
accessibility/AccessibilitySlider.h \
accessibility/AccessibilityTableCell.h \
accessibility/AccessibilityTableColumn.h \
@@ -1395,7 +976,6 @@ HEADERS += \
accessibility/AccessibilityTableRow.h \
accessibility/AXObjectCache.h \
bindings/js/CachedScriptSourceProvider.h \
- bindings/js/DOMObjectWithSVGContext.h \
bindings/js/GCController.h \
bindings/js/JSCallbackData.h \
bindings/js/JSAudioConstructor.h \
@@ -1425,15 +1005,12 @@ HEADERS += \
bindings/js/JSHTMLObjectElementCustom.h \
bindings/js/JSHTMLSelectElementCustom.h \
bindings/js/JSImageConstructor.h \
- bindings/js/JSInspectedObjectWrapper.h \
- bindings/js/JSInspectorCallbackWrapper.h \
bindings/js/JSLazyEventListener.h \
bindings/js/JSLocationCustom.h \
bindings/js/JSMessageChannelConstructor.h \
bindings/js/JSNodeFilterCondition.h \
bindings/js/JSOptionConstructor.h \
bindings/js/JSPluginElementFunctions.h \
- bindings/js/JSQuarantinedObjectWrapper.h \
bindings/js/JSSharedWorkerConstructor.h \
bindings/js/JSStorageCustom.h \
bindings/js/JSWebKitCSSMatrixConstructor.h \
@@ -1456,6 +1033,7 @@ HEADERS += \
bindings/js/ScriptSourceProvider.h \
bindings/js/ScriptState.h \
bindings/js/ScriptValue.h \
+ bindings/js/ScriptWrappable.h \
bindings/js/SerializedScriptValue.h \
bindings/js/StringSourceProvider.h \
bindings/js/WorkerScriptController.h \
@@ -1471,6 +1049,7 @@ HEADERS += \
bridge/qt/qt_class.h \
bridge/qt/qt_instance.h \
bridge/qt/qt_runtime.h \
+ bridge/qt/qt_pixmapruntime.h \
bridge/runtime_array.h \
bridge/runtime_method.h \
bridge/runtime_object.h \
@@ -1607,6 +1186,9 @@ HEADERS += \
dom/TagNodeList.h \
dom/TextEvent.h \
dom/Text.h \
+ dom/Touch.h \
+ dom/TouchEvent.h \
+ dom/TouchList.h \
dom/TransformSource.h \
dom/Traversal.h \
dom/TreeWalker.h \
@@ -1666,6 +1248,7 @@ HEADERS += \
history/CachedPage.h \
history/HistoryItem.h \
history/PageCache.h \
+ html/Blob.h \
html/canvas/CanvasGradient.h \
html/canvas/CanvasPattern.h \
html/canvas/CanvasPixelArray.h \
@@ -1675,6 +1258,7 @@ HEADERS += \
html/CollectionCache.h \
html/DataGridColumn.h \
html/DataGridColumnList.h \
+ html/DateComponents.h \
html/DOMDataGridDataSource.h \
html/File.h \
html/FileList.h \
@@ -1764,7 +1348,6 @@ HEADERS += \
html/HTMLUListElement.h \
html/HTMLVideoElement.h \
html/HTMLViewSourceDocument.h \
- html/ISODateTime.h \
html/ImageData.h \
html/PreloadScanner.h \
html/TimeRanges.h \
@@ -1842,7 +1425,7 @@ HEADERS += \
page/Chrome.h \
page/Console.h \
page/ContextMenuController.h \
- page/ContextMenuSelectionHandler.h \
+ page/ContextMenuProvider.h \
page/Coordinates.h \
page/DOMSelection.h \
page/DOMTimer.h \
@@ -1951,9 +1534,11 @@ HEADERS += \
platform/network/ResourceHandle.h \
platform/network/ResourceRequestBase.h \
platform/network/ResourceResponseBase.h \
+ platform/PlatformTouchEvent.h \
+ platform/PlatformTouchPoint.h \
platform/qt/ClipboardQt.h \
platform/qt/QWebPageClient.h \
- platform/qt/QWebPopup.h \
+ platform/qt/QtAbstractWebPopup.h \
platform/qt/RenderThemeQt.h \
platform/qt/ScrollbarThemeQt.h \
platform/Scrollbar.h \
@@ -2020,6 +1605,7 @@ HEADERS += \
rendering/RenderButton.h \
rendering/RenderCounter.h \
rendering/RenderDataGrid.h \
+ rendering/RenderEmbeddedObject.h \
rendering/RenderFieldset.h \
rendering/RenderFileUploadControl.h \
rendering/RenderFlexibleBox.h \
@@ -2062,6 +1648,7 @@ HEADERS += \
rendering/RenderSVGInlineText.h \
rendering/RenderSVGModelObject.h \
rendering/RenderSVGRoot.h \
+ rendering/RenderSVGShadowTreeRootContainer.h \
rendering/RenderSVGText.h \
rendering/RenderSVGTextPath.h \
rendering/RenderSVGTransformableContainer.h \
@@ -2114,9 +1701,12 @@ HEADERS += \
rendering/SVGCharacterLayoutInfo.h \
rendering/SVGInlineFlowBox.h \
rendering/SVGInlineTextBox.h \
+ rendering/SVGMarkerData.h \
+ rendering/SVGMarkerLayoutInfo.h \
rendering/SVGRenderSupport.h \
rendering/SVGRenderTreeAsText.h \
rendering/SVGRootInlineBox.h \
+ rendering/SVGShadowTreeElements.h \
rendering/TextControlInnerElements.h \
rendering/TransformState.h \
svg/animation/SMILTimeContainer.h \
@@ -2155,6 +1745,10 @@ HEADERS += \
svg/SVGAnimateColorElement.h \
svg/SVGAnimatedPathData.h \
svg/SVGAnimatedPoints.h \
+ svg/SVGAnimatedProperty.h \
+ svg/SVGAnimatedPropertySynchronizer.h \
+ svg/SVGAnimatedPropertyTraits.h \
+ svg/SVGAnimatedTemplate.h \
svg/SVGAnimateElement.h \
svg/SVGAnimateMotionElement.h \
svg/SVGAnimateTransformElement.h \
@@ -2171,6 +1765,7 @@ HEADERS += \
svg/SVGElement.h \
svg/SVGElementInstance.h \
svg/SVGElementInstanceList.h \
+ svg/SVGElementRareData.h \
svg/SVGEllipseElement.h \
svg/SVGExternalResourcesRequired.h \
svg/SVGFEBlendElement.h \
@@ -2278,7 +1873,6 @@ HEADERS += \
svg/SVGViewSpec.h \
svg/SVGZoomAndPan.h \
svg/SVGZoomEvent.h \
- svg/SynchronizablePropertyController.h \
wml/WMLAccessElement.h \
wml/WMLAElement.h \
wml/WMLAnchorElement.h \
@@ -2352,6 +1946,7 @@ HEADERS += \
xml/XSLTProcessor.h \
xml/XSLTUnicodeSort.h \
$$PWD/../WebKit/qt/Api/qwebplugindatabase_p.h \
+ $$PWD/../WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h \
$$PWD/../WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h \
$$PWD/platform/network/qt/DnsPrefetchHelper.h
@@ -2360,6 +1955,7 @@ SOURCES += \
bindings/js/ScriptControllerQt.cpp \
bridge/qt/qt_class.cpp \
bridge/qt/qt_instance.cpp \
+ bridge/qt/qt_pixmapruntime.cpp \
bridge/qt/qt_runtime.cpp \
page/qt/DragControllerQt.cpp \
page/qt/EventHandlerQt.cpp \
@@ -2409,8 +2005,10 @@ SOURCES += \
platform/qt/PlatformKeyboardEventQt.cpp \
platform/qt/PlatformMouseEventQt.cpp \
platform/qt/PlatformScreenQt.cpp \
+ platform/qt/PlatformTouchEventQt.cpp \
+ platform/qt/PlatformTouchPointQt.cpp \
platform/qt/PopupMenuQt.cpp \
- platform/qt/QWebPopup.cpp \
+ platform/qt/QtAbstractWebPopup.cpp \
platform/qt/RenderThemeQt.cpp \
platform/qt/ScrollbarQt.cpp \
platform/qt/ScrollbarThemeQt.cpp \
@@ -2427,6 +2025,7 @@ SOURCES += \
platform/qt/WheelEventQt.cpp \
platform/qt/WidgetQt.cpp \
plugins/qt/PluginDataQt.cpp \
+ ../WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp \
../WebKit/qt/WebCoreSupport/ChromeClientQt.cpp \
../WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp \
../WebKit/qt/WebCoreSupport/DragClientQt.cpp \
@@ -2450,7 +2049,8 @@ SOURCES += \
../WebKit/qt/Api/qwebkitversion.cpp
- win32-*|wince*: SOURCES += platform/win/SystemTimeWin.cpp
+ win32-*|wince*: SOURCES += platform/win/SystemTimeWin.cpp \
+ platform/graphics/win/TransformationMatrixWin.cpp
mac {
SOURCES += \
@@ -2499,7 +2099,10 @@ contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
INCLUDEPATH += platform/mac
# Note: XP_MACOSX is defined in npapi.h
} else {
- !embedded: CONFIG += x11
+ !embedded {
+ CONFIG += x11
+ LIBS += -lXrender
+ }
SOURCES += \
plugins/qt/PluginContainerQt.cpp \
plugins/qt/PluginPackageQt.cpp \
@@ -2537,26 +2140,6 @@ contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
plugins/PluginViewNone.cpp
}
-contains(DEFINES, ENABLE_CHANNEL_MESSAGING=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_CHANNEL_MESSAGING=1
-}
-
-contains(DEFINES, ENABLE_ORIENTATION_EVENTS=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_ORIENTATION_EVENTS=1
-}
-
-contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=0) {
- DASHBOARDSUPPORTCSSPROPERTIES -= $$PWD/css/DashboardSupportCSSPropertyNames.in
-}
-
-contains(DEFINES, ENABLE_DATAGRID=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_DATAGRID=1
-}
-
-contains(DEFINES, ENABLE_EVENTSOURCE=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_EVENTSOURCE=1
-}
-
contains(DEFINES, ENABLE_SQLITE=1) {
!system-sqlite:exists( $${SQLITE3SRCDIR}/sqlite3.c ) {
# Build sqlite3 into WebCore from source
@@ -2590,8 +2173,6 @@ contains(DEFINES, ENABLE_SQLITE=1) {
contains(DEFINES, ENABLE_DATABASE=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_DATABASE=1
-
SOURCES += \
storage/ChangeVersionWrapper.cpp \
storage/DatabaseTask.cpp \
@@ -2615,8 +2196,6 @@ contains(DEFINES, ENABLE_DATABASE=1) {
}
contains(DEFINES, ENABLE_DOM_STORAGE=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_DOM_STORAGE=1
-
HEADERS += \
storage/ChangeVersionWrapper.h \
storage/DatabaseAuthorizer.h \
@@ -2671,8 +2250,6 @@ contains(DEFINES, ENABLE_ICONDATABASE=1) {
}
contains(DEFINES, ENABLE_WORKERS=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_WORKERS=1
-
SOURCES += \
bindings/js/JSAbstractWorkerCustom.cpp \
bindings/js/JSDedicatedWorkerContextCustom.cpp \
@@ -2696,8 +2273,6 @@ contains(DEFINES, ENABLE_WORKERS=1) {
}
contains(DEFINES, ENABLE_SHARED_WORKERS=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_SHARED_WORKERS=1
-
SOURCES += \
bindings/js/JSSharedWorkerConstructor.cpp \
bindings/js/JSSharedWorkerCustom.cpp \
@@ -2708,8 +2283,6 @@ contains(DEFINES, ENABLE_SHARED_WORKERS=1) {
}
contains(DEFINES, ENABLE_VIDEO=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_VIDEO=1
-
SOURCES += \
html/HTMLAudioElement.cpp \
html/HTMLMediaElement.cpp \
@@ -2742,10 +2315,6 @@ contains(DEFINES, ENABLE_VIDEO=1) {
}
contains(DEFINES, ENABLE_XPATH=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_XPATH=1
-
- XPATHBISON = $$PWD/xml/XPathGrammar.y
-
SOURCES += \
xml/NativeXPathNSResolver.cpp \
xml/XPathEvaluator.cpp \
@@ -2768,9 +2337,7 @@ contains(DEFINES, ENABLE_XPATH=1) {
unix:!mac:CONFIG += link_pkgconfig
contains(DEFINES, ENABLE_XSLT=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_XSLT=1
-
- QT += xmlpatterns
+ tobe|!tobe: QT += xmlpatterns
SOURCES += \
bindings/js/JSXSLTProcessorConstructor.cpp \
@@ -2781,10 +2348,6 @@ contains(DEFINES, ENABLE_XSLT=1) {
xml/XSLTProcessorQt.cpp
}
-contains(DEFINES, ENABLE_XBL=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_XBL=1
-}
-
contains(DEFINES, ENABLE_FILTERS=1) {
SOURCES += \
platform/graphics/filters/FEBlend.cpp \
@@ -2795,16 +2358,6 @@ contains(DEFINES, ENABLE_FILTERS=1) {
platform/graphics/filters/FilterEffect.cpp \
platform/graphics/filters/SourceAlpha.cpp \
platform/graphics/filters/SourceGraphic.cpp
-
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_FILTERS=1
-}
-
-contains(DEFINES, ENABLE_WCSS=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_WCSS=1
- contains(DEFINES, ENABLE_XHTMLMP=0) {
- DEFINES -= ENABLE_XHTMLMP=0
- DEFINES += ENABLE_XHTMLMP=1
- }
}
contains(DEFINES, ENABLE_WML=1) {
@@ -2845,38 +2398,25 @@ contains(DEFINES, ENABLE_WML=1) {
wml/WMLTemplateElement.cpp \
wml/WMLTimerElement.cpp \
wml/WMLVariables.cpp
-
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_WML=1
-
- WML_NAMES = $$PWD/wml/WMLTagNames.in
-
- wmlnames_a.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}WMLNames.cpp
- wmlnames_a.commands = perl -I$$PWD/bindings/scripts $$PWD/dom/make_names.pl --tags $$PWD/wml/WMLTagNames.in --attrs $$PWD/wml/WMLAttributeNames.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$GENERATED_SOURCES_DIR
- wmlnames_a.input = WML_NAMES
- wmlnames_a.dependency_type = TYPE_C
- wmlnames_a.CONFIG = target_predeps
- wmlnames_a.variable_out = GENERATED_SOURCES
- addExtraCompilerWithHeader(wmlnames_a)
- wmlnames_b.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}WMLElementFactory.cpp
- wmlnames_b.commands = @echo -n ''
- wmlnames_b.input = SVG_NAMES
- wmlnames_b.depends = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}WMLNames.cpp
- wmlnames_b.CONFIG = target_predeps
- wmlnames_b.variable_out = GENERATED_SOURCES
- addExtraCompilerWithHeader(wmlnames_b)
}
contains(DEFINES, ENABLE_XHTMLMP=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_XHTMLMP=1
+ SOURCES += \
+ html/HTMLNoScriptElement.cpp
}
-contains(DEFINES, ENABLE_SVG=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG=1
+contains(DEFINES, ENABLE_QT_BEARER=1) {
+ HEADERS += \
+ platform/network/qt/NetworkStateNotifierPrivate.h
- SVG_NAMES = $$PWD/svg/svgtags.in
+ SOURCES += \
+ platform/network/qt/NetworkStateNotifierQt.cpp
- XLINK_NAMES = $$PWD/svg/xlinkattrs.in
+ CONFIG += mobility
+ MOBILITY += bearer
+}
+contains(DEFINES, ENABLE_SVG=1) {
SOURCES += \
# TODO: this-one-is-not-auto-added! FIXME! tmp/SVGElementFactory.cpp \
bindings/js/JSSVGElementInstanceCustom.cpp \
@@ -2884,8 +2424,6 @@ contains(DEFINES, ENABLE_SVG=1) {
bindings/js/JSSVGMatrixCustom.cpp \
bindings/js/JSSVGPathSegCustom.cpp \
bindings/js/JSSVGPathSegListCustom.cpp \
- bindings/js/JSSVGPointListCustom.cpp \
- bindings/js/JSSVGTransformListCustom.cpp \
css/SVGCSSComputedStyleDeclaration.cpp \
css/SVGCSSParser.cpp \
css/SVGCSSStyleSelector.cpp \
@@ -3023,7 +2561,6 @@ contains(DEFINES, ENABLE_SVG=1) {
svg/SVGViewElement.cpp \
svg/SVGViewSpec.cpp \
svg/SVGZoomAndPan.cpp \
- svg/SynchronizablePropertyController.cpp \
svg/animation/SMILTime.cpp \
svg/animation/SMILTimeContainer.cpp \
svg/animation/SVGSMILElement.cpp \
@@ -3064,6 +2601,7 @@ contains(DEFINES, ENABLE_SVG=1) {
rendering/RenderSVGInlineText.cpp \
rendering/RenderSVGModelObject.cpp \
rendering/RenderSVGRoot.cpp \
+ rendering/RenderSVGShadowTreeRootContainer.cpp \
rendering/RenderSVGText.cpp \
rendering/RenderSVGTextPath.cpp \
rendering/RenderSVGTransformableContainer.cpp \
@@ -3072,72 +2610,13 @@ contains(DEFINES, ENABLE_SVG=1) {
rendering/SVGCharacterLayoutInfo.cpp \
rendering/SVGInlineFlowBox.cpp \
rendering/SVGInlineTextBox.cpp \
+ rendering/SVGMarkerLayoutInfo.cpp \
rendering/SVGRenderSupport.cpp \
- rendering/SVGRootInlineBox.cpp
-
-
- # GENERATOR 5-C:
- svgnames_a.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}SVGNames.cpp
- svgnames_a.commands = perl -I$$PWD/bindings/scripts $$PWD/dom/make_names.pl --tags $$PWD/svg/svgtags.in --attrs $$PWD/svg/svgattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$GENERATED_SOURCES_DIR
- svgnames_a.input = SVG_NAMES
- svgnames_a.dependency_type = TYPE_C
- svgnames_a.CONFIG = target_predeps
- svgnames_a.variable_out = GENERATED_SOURCES
- addExtraCompilerWithHeader(svgnames_a)
- svgnames_b.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}SVGElementFactory.cpp
- svgnames_b.commands = @echo -n ''
- svgnames_b.input = SVG_NAMES
- svgnames_b.depends = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}SVGNames.cpp
- svgnames_b.CONFIG = target_predeps
- svgnames_b.variable_out = GENERATED_SOURCES
- addExtraCompilerWithHeader(svgnames_b)
- svgelementwrapper.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}JSSVGElementWrapperFactory.cpp
- svgelementwrapper.commands = @echo -n ''
- svgelementwrapper.input = SVG_NAMES
- svgelementwrapper.depends = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}SVGNames.cpp
- svgelementwrapper.CONFIG = target_predeps
- svgelementwrapper.variable_out = GENERATED_SOURCES
- addExtraCompiler(svgelementwrapper)
- svgelementwrapper_header.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}JSSVGElementWrapperFactory.h
- svgelementwrapper_header.commands = @echo -n ''
- svgelementwrapper_header.input = SVG_NAMES
- svgelementwrapper_header.depends = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}SVGNames.cpp
- svgelementwrapper_header.CONFIG = target_predeps
- svgelementwrapper_header.variable_out = GENERATED_FILES
- addExtraCompiler(svgelementwrapper_header)
-
- # GENERATOR 5-D:
- xlinknames.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}XLinkNames.cpp
- xlinknames.commands = perl -I$$PWD/bindings/scripts $$PWD/dom/make_names.pl --attrs $$PWD/svg/xlinkattrs.in --preprocessor \"$${QMAKE_MOC} -E\" --outputDir $$GENERATED_SOURCES_DIR
- xlinknames.input = XLINK_NAMES
- xlinknames.dependency_type = TYPE_C
- xlinknames.CONFIG = target_predeps
- xlinknames.variable_out = GENERATED_SOURCES
- addExtraCompilerWithHeader(xlinknames)
-
-}
-# GENERATOR 6-A:
-cssprops.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
-cssprops.input = WALDOCSSPROPS
-cssprops.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $$DASHBOARDSUPPORTCSSPROPERTIES $$EXTRACSSPROPERTIES > $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.in && cd $$GENERATED_SOURCES_DIR && perl $$PWD/css/makeprop.pl && $(DEL_FILE) ${QMAKE_FILE_BASE}.strip ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
-cssprops.CONFIG = target_predeps no_link
-cssprops.variable_out =
-cssprops.depend = ${QMAKE_FILE_NAME} DASHBOARDSUPPORTCSSPROPERTIES EXTRACSSPROPERTIES
-addExtraCompilerWithHeader(cssprops)
-
-# GENERATOR 6-B:
-cssvalues.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.c
-cssvalues.input = WALDOCSSVALUES
-cssvalues.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $$EXTRACSSVALUES > $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.in && cd $$GENERATED_SOURCES_DIR && perl $$PWD/css/makevalues.pl && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.strip ${QMAKE_FILE_BASE}.gperf
-cssvalues.CONFIG = target_predeps no_link
-cssvalues.variable_out =
-cssvalues.depend = ${QMAKE_FILE_NAME} EXTRACSSVALUES
-cssvalues.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}${QMAKE_FILE_BASE}.h
-addExtraCompiler(cssvalues)
+ rendering/SVGRootInlineBox.cpp \
+ rendering/SVGShadowTreeElements.cpp
+}
contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_JAVASCRIPT_DEBUGGER=1
-
SOURCES += \
bindings/js/JSJavaScriptCallFrameCustom.cpp \
inspector/JavaScriptCallFrame.cpp \
@@ -3147,8 +2626,6 @@ contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=1) {
}
contains(DEFINES, ENABLE_OFFLINE_WEB_APPLICATIONS=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_OFFLINE_WEB_APPLICATIONS=1
-
SOURCES += \
loader/appcache/ApplicationCache.cpp \
loader/appcache/ApplicationCacheGroup.cpp \
@@ -3161,154 +2638,29 @@ SOURCES += \
}
contains(DEFINES, ENABLE_WEB_SOCKETS=1) {
- FEATURE_DEFINES_JAVASCRIPT += ENABLE_WEB_SOCKETS=1
+HEADERS += \
+ platform/network/qt/SocketStreamHandlePrivate.h \
SOURCES += \
websockets/WebSocket.cpp \
websockets/WebSocketChannel.cpp \
websockets/WebSocketHandshake.cpp \
+ websockets/ThreadableWebSocketChannel.cpp \
platform/network/SocketStreamErrorBase.cpp \
platform/network/SocketStreamHandleBase.cpp \
- platform/network/qt/SocketStreamHandleSoup.cpp \
+ platform/network/qt/SocketStreamHandleQt.cpp \
bindings/js/JSWebSocketCustom.cpp \
bindings/js/JSWebSocketConstructor.cpp
-}
-
-# GENERATOR 1: IDL compiler
-idl.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}JS${QMAKE_FILE_BASE}.cpp
-idl.variable_out = GENERATED_SOURCES
-idl.input = IDL_BINDINGS
-idl.commands = perl -I$$PWD/bindings/scripts $$PWD/bindings/scripts/generate-bindings.pl --defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" --generator JS --include $$PWD/dom --include $$PWD/html --include $$PWD/xml --include $$PWD/svg --outputDir $$GENERATED_SOURCES_DIR --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME}
-idl.depends = $$PWD/bindings/scripts/generate-bindings.pl \
- $$PWD/bindings/scripts/CodeGenerator.pm \
- $$PWD/bindings/scripts/CodeGeneratorJS.pm \
- $$PWD/bindings/scripts/IDLParser.pm \
- $$PWD/bindings/scripts/IDLStructure.pm \
- $$PWD/bindings/scripts/InFilesParser.pm
-idl.CONFIG += target_predeps
-addExtraCompilerWithHeader(idl)
-
-# GENERATOR 3: tokenizer (flex)
-tokenizer.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
-tokenizer.commands = flex -t < ${QMAKE_FILE_NAME} | perl $$PWD/css/maketokenizer > ${QMAKE_FILE_OUT}
-tokenizer.dependency_type = TYPE_C
-tokenizer.input = TOKENIZER
-tokenizer.CONFIG += target_predeps no_link
-tokenizer.variable_out =
-addExtraCompiler(tokenizer)
-
-# GENERATOR 4: CSS grammar
-cssbison.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
-cssbison.commands = perl $$PWD/css/makegrammar.pl ${QMAKE_FILE_NAME} $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}
-cssbison.depend = ${QMAKE_FILE_NAME}
-cssbison.input = CSSBISON
-cssbison.CONFIG = target_predeps
-cssbison.dependency_type = TYPE_C
-cssbison.variable_out = GENERATED_SOURCES
-addExtraCompilerWithHeader(cssbison)
-
-# GENERATOR 5-A:
-htmlnames.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}HTMLNames.cpp
-htmlnames.commands = perl -I$$PWD/bindings/scripts $$PWD/dom/make_names.pl --tags $$PWD/html/HTMLTagNames.in --attrs $$PWD/html/HTMLAttributeNames.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$GENERATED_SOURCES_DIR
-htmlnames.input = HTML_NAMES
-htmlnames.dependency_type = TYPE_C
-htmlnames.CONFIG = target_predeps
-htmlnames.variable_out = GENERATED_SOURCES
-htmlnames.depends = $$PWD/html/HTMLAttributeNames.in
-addExtraCompilerWithHeader(htmlnames)
-
-htmlelementfactory.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}HTMLElementFactory.cpp
-htmlelementfactory.commands = @echo -n ''
-htmlelementfactory.input = HTML_NAMES
-htmlelementfactory.depends = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}HTMLNames.cpp
-htmlelementfactory.CONFIG = target_predeps
-htmlelementfactory.variable_out = GENERATED_SOURCES
-htmlelementfactory.clean += ${QMAKE_FILE_OUT}
-addExtraCompilerWithHeader(htmlelementfactory)
-
-elementwrapperfactory.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}JSHTMLElementWrapperFactory.cpp
-elementwrapperfactory.commands = @echo -n ''
-elementwrapperfactory.input = HTML_NAMES
-elementwrapperfactory.depends = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}HTMLNames.cpp
-elementwrapperfactory.CONFIG = target_predeps
-elementwrapperfactory.variable_out = GENERATED_SOURCES
-elementwrapperfactory.clean += ${QMAKE_FILE_OUT}
-addExtraCompilerWithHeader(elementwrapperfactory)
-
-# GENERATOR 5-B:
-xmlnames.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}XMLNames.cpp
-xmlnames.commands = perl -I$$PWD/bindings/scripts $$PWD/dom/make_names.pl --attrs $$PWD/xml/xmlattrs.in --preprocessor \"$${QMAKE_MOC} -E\" --outputDir $$GENERATED_SOURCES_DIR
-xmlnames.input = XML_NAMES
-xmlnames.dependency_type = TYPE_C
-xmlnames.CONFIG = target_predeps
-xmlnames.variable_out = GENERATED_SOURCES
-addExtraCompilerWithHeader(xmlnames)
-
-# GENERATOR 8-A:
-entities.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}HTMLEntityNames.c
-entities.commands = gperf -a -L ANSI-C -C -G -c -o -t --includes --key-positions="*" -N findEntity -D -s 2 < $$PWD/html/HTMLEntityNames.gperf > $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}HTMLEntityNames.c
-entities.input = ENTITIES_GPERF
-entities.dependency_type = TYPE_C
-entities.CONFIG = target_predeps no_link
-entities.variable_out =
-entities.clean = ${QMAKE_FILE_OUT}
-addExtraCompiler(entities)
-
-# GENERATOR 8-B:
-doctypestrings.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
-doctypestrings.input = DOCTYPESTRINGS
-doctypestrings.commands = gperf -CEot -L ANSI-C --includes --key-positions="*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards < ${QMAKE_FILE_NAME} >> ${QMAKE_FILE_OUT}
-doctypestrings.dependency_type = TYPE_C
-doctypestrings.CONFIG += target_predeps no_link
-doctypestrings.variable_out =
-doctypestrings.clean = ${QMAKE_FILE_OUT}
-addExtraCompiler(doctypestrings)
-
-# GENERATOR 8-C:
-colordata.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}ColorData.c
-colordata.commands = gperf -CDEot -L ANSI-C --includes --key-positions="*" -N findColor -D -s 2 < ${QMAKE_FILE_NAME} >> ${QMAKE_FILE_OUT}
-colordata.input = COLORDAT_GPERF
-colordata.CONFIG = target_predeps no_link
-colordata.variable_out =
-addExtraCompiler(colordata)
-
-# GENERATOR 9:
-stylesheets.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}UserAgentStyleSheetsData.cpp
-stylesheets.commands = perl $$PWD/css/make-css-file-arrays.pl --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}UserAgentStyleSheets.h ${QMAKE_FILE_OUT} $$STYLESHEETS_EMBED
-STYLESHEETS_EMBED_GENERATOR_SCRIPT = $$PWD/css/make-css-file-arrays.pl
-stylesheets.input = STYLESHEETS_EMBED_GENERATOR_SCRIPT
-stylesheets.depends = $$STYLESHEETS_EMBED
-stylesheets.CONFIG = target_predeps
-stylesheets.variable_out = GENERATED_SOURCES
-stylesheets.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}UserAgentStyleSheets.h
-addExtraCompilerWithHeader(stylesheets, $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}UserAgentStyleSheets.h)
-
-# GENERATOR 10: XPATH grammar
-xpathbison.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
-xpathbison.commands = bison -d -p xpathyy ${QMAKE_FILE_NAME} -o $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.h $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.h
-xpathbison.depend = ${QMAKE_FILE_NAME}
-xpathbison.input = XPATHBISON
-xpathbison.CONFIG = target_predeps
-xpathbison.dependency_type = TYPE_C
-xpathbison.variable_out = GENERATED_SOURCES
-addExtraCompilerWithHeader(xpathbison)
-
-# GENERATOR 11: WebKit Version
-# The appropriate Apple-maintained Version.xcconfig file for WebKit version information is in WebKit/mac/Configurations/.
-webkitversion.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}WebKitVersion.h
-webkitversion.commands = perl $$PWD/../WebKit/scripts/generate-webkitversion.pl --config $$PWD/../WebKit/mac/Configurations/Version.xcconfig --outputDir $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}
-WEBKITVERSION_SCRIPT = $$PWD/../WebKit/scripts/generate-webkitversion.pl
-webkitversion.input = WEBKITVERSION_SCRIPT
-webkitversion.CONFIG = target_predeps
-webkitversion.depend = $$PWD/../WebKit/scripts/generate-webkitversion.pl
-webkitversion.variable_out = GENERATED_SOURCES
-webkitversion.clean = ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}WebKitVersion.h
-addExtraCompiler(webkitversion)
+contains(DEFINES, ENABLE_WORKERS=1) {
+SOURCES += \
+ websockets/WorkerThreadableWebSocketChannel.cpp
+}
+}
include($$PWD/../WebKit/qt/Api/headers.pri)
HEADERS += $$WEBKIT_API_HEADERS
-!CONFIG(QTDIR_build) {
+!CONFIG(standalone_package) {
target.path = $$[QT_INSTALL_LIBS]
headers.files = $$WEBKIT_API_HEADERS
headers.path = $$[QT_INSTALL_HEADERS]/QtWebKit
@@ -3317,6 +2669,7 @@ HEADERS += $$WEBKIT_API_HEADERS
win32-*|wince* {
DLLDESTDIR = $$OUTPUT_DIR/bin
+ TARGET = $$qtLibraryTarget($$TARGET)
dlltarget.commands = $(COPY_FILE) $(DESTDIR)$(TARGET) $$[QT_INSTALL_BINS]
dlltarget.CONFIG = no_path
@@ -3359,7 +2712,7 @@ HEADERS += $$WEBKIT_API_HEADERS
}
}
-CONFIG(QTDIR_build):isEqual(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 4) {
+CONFIG(standalone_package):isEqual(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 4) {
# start with 4.5
# Remove the following 2 lines if you want debug information in WebCore
CONFIG -= separate_debug_info
@@ -3383,3 +2736,26 @@ CONFIG(QTDIR_build):isEqual(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 4
plugins/win/PaintHooks.asm
}
}
+contains(DEFINES, WTF_USE_ACCELERATED_COMPOSITING) {
+HEADERS += \
+ rendering/RenderLayerBacking.h \
+ rendering/RenderLayerCompositor.h \
+ platform/graphics/GraphicsLayer.h \
+ platform/graphics/GraphicsLayerClient.h \
+ platform/graphics/qt/GraphicsLayerQt.h
+SOURCES += \
+ platform/graphics/GraphicsLayer.cpp \
+ platform/graphics/qt/GraphicsLayerQt.cpp \
+ rendering/RenderLayerBacking.cpp \
+ rendering/RenderLayerCompositor.cpp
+}
+
+symbian {
+ shared {
+ contains(CONFIG, def_files) {
+ defFilePath=../WebKit/qt/symbian
+ } else {
+ MMP_RULES += EXPORTUNFROZEN
+ }
+ }
+}
diff --git a/WebCore/WebCore.vcproj/MigrateIDLAndScripts b/WebCore/WebCore.vcproj/MigrateIDLAndScripts
index 912361d..ee5d02d 100644
--- a/WebCore/WebCore.vcproj/MigrateIDLAndScripts
+++ b/WebCore/WebCore.vcproj/MigrateIDLAndScripts
@@ -129,7 +129,6 @@ all : \
$(WEBKIT_OUTPUT)/EventListener.idl \
\
$(WEBKIT_OUTPUT)/CodeGenerator.pm \
- $(WEBKIT_OUTPUT)/CodeGeneratorCOM.pm \
$(WEBKIT_OUTPUT)/IDLParser.pm \
$(WEBKIT_OUTPUT)/IDLStructure.pm \
$(WEBKIT_OUTPUT)/generate-bindings.pl \
diff --git a/WebCore/WebCore.vcproj/QTMovieWin.rc b/WebCore/WebCore.vcproj/QTMovieWin.rc
index cbc8918..459679b 100644
--- a/WebCore/WebCore.vcproj/QTMovieWin.rc
+++ b/WebCore/WebCore.vcproj/QTMovieWin.rc
@@ -34,7 +34,7 @@ BEGIN
VALUE "FileVersion", __VERSION_TEXT__
VALUE "CompanyName", "Apple Inc."
VALUE "InternalName", "WebKit"
- VALUE "LegalCopyright", "Copyright Apple Inc. 2007-2009"
+ VALUE "LegalCopyright", "Copyright Apple Inc. 2007-2010"
VALUE "OriginalFilename", "QTMovieWin.dll"
VALUE "ProductName", "WebKit"
VALUE "ProductVersion", __VERSION_TEXT__
diff --git a/WebCore/WebCore.vcproj/QTMovieWin.vcproj b/WebCore/WebCore.vcproj/QTMovieWin.vcproj
index 901d24d..b2a61cf 100644
--- a/WebCore/WebCore.vcproj/QTMovieWin.vcproj
+++ b/WebCore/WebCore.vcproj/QTMovieWin.vcproj
@@ -18,7 +18,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
CharacterSet="1"
>
<Tool
@@ -39,7 +39,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\QTInternalSDK\CIncludes&quot;;&quot;$(WebKitLibrariesDir)\QuickTime SDK\CIncludes&quot;;&quot;$(ProgramFiles)/QuickTime SDK/cincludes&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\QTInternalSDK\CIncludes&quot;;&quot;$(WebKitLibrariesDir)\QuickTime SDK\CIncludes&quot;;&quot;$(ProgramFiles)/QuickTime SDK/cincludes&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;"
PreprocessorDefinitions="_USRDLL;QTMOVIEWIN_EXPORTS"
DisableSpecificWarnings="4819"
/>
@@ -90,7 +90,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -112,7 +112,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\QTInternalSDK\CIncludes&quot;;&quot;$(WebKitLibrariesDir)\QuickTime SDK\CIncludes&quot;;&quot;$(ProgramFiles)/QuickTime SDK/cincludes&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\QTInternalSDK\CIncludes&quot;;&quot;$(WebKitLibrariesDir)\QuickTime SDK\CIncludes&quot;;&quot;$(ProgramFiles)/QuickTime SDK/cincludes&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;"
PreprocessorDefinitions="_USRDLL;QTMOVIEWIN_EXPORTS"
DisableSpecificWarnings="4819"
/>
@@ -163,7 +163,7 @@
<Configuration
Name="Debug_Internal|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
CharacterSet="1"
>
<Tool
@@ -184,7 +184,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\QTInternalSDK\CIncludes&quot;;&quot;$(WebKitLibrariesDir)\QuickTime SDK\CIncludes&quot;;&quot;$(ProgramFiles)/QuickTime SDK/cincludes&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\QTInternalSDK\CIncludes&quot;;&quot;$(WebKitLibrariesDir)\QuickTime SDK\CIncludes&quot;;&quot;$(ProgramFiles)/QuickTime SDK/cincludes&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;"
PreprocessorDefinitions="_USRDLL;QTMOVIEWIN_EXPORTS"
DisableSpecificWarnings="4819"
/>
@@ -235,7 +235,7 @@
<Configuration
Name="Debug_All|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
CharacterSet="1"
>
<Tool
@@ -256,7 +256,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\QTInternalSDK\CIncludes&quot;;&quot;$(WebKitLibrariesDir)\QuickTime SDK\CIncludes&quot;;&quot;$(ProgramFiles)/QuickTime SDK/cincludes&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\QTInternalSDK\CIncludes&quot;;&quot;$(WebKitLibrariesDir)\QuickTime SDK\CIncludes&quot;;&quot;$(ProgramFiles)/QuickTime SDK/cincludes&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;"
PreprocessorDefinitions="_USRDLL;QTMOVIEWIN_EXPORTS"
DisableSpecificWarnings="4819"
/>
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index db19ea3..aa2a16a 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="Windows-1252"?>
+<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
@@ -18,7 +18,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;.\WebCoreCommon.vsprops;.\WebCoreCG.vsprops;.\WebCoreCFNetwork.vsprops;.\WebCorePthreads.vsprops;.\WebCoreMediaQT.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;.\WebCoreCommon.vsprops;.\WebCoreCG.vsprops;.\WebCoreCFNetwork.vsprops;.\WebCorePthreads.vsprops;.\WebCoreMediaQT.vsprops;.\WebCoreQuartzCore.vsprops"
CharacterSet="1"
>
<Tool
@@ -38,8 +38,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(DXSDK_DIR)\Include"
- PreprocessorDefinitions="QUARTZCORE_DLL"
+ AdditionalIncludeDirectories=""
ForcedIncludeFiles=""
/>
<Tool
@@ -68,13 +67,13 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\inspector\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\appcache\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\icon\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\html\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\notifications\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\transforms\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\opentype\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\text\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\sql\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bindings\js\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\style\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\editing\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\dom\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\xml\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\storage\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\websockets\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\workers\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\parser\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\runtime\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\masm\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\profiler\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wrec\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\inspector\front-end\*&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\English.lproj\localizedStrings.js&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\inspector\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\appcache\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\icon\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\html\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\notifications\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\transforms\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\opentype\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\text\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\sql\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bindings\js\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\jsc\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\style\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\editing\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\dom\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\xml\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\storage\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\websockets\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\workers\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\parser\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\runtime\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\masm\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\profiler\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wrec\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\inspector\front-end\*&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\English.lproj\localizedStrings.js&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;.\WebCoreCommon.vsprops;.\WebCoreCG.vsprops;.\WebCoreCFNetwork.vsprops;.\WebCorePthreads.vsprops;.\WebCoreMediaQT.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;.\WebCoreCommon.vsprops;.\WebCoreCG.vsprops;.\WebCoreCFNetwork.vsprops;.\WebCorePthreads.vsprops;.\WebCoreMediaQT.vsprops;.\WebCoreQuartzCore.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -95,8 +94,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(DXSDK_DIR)\Include"
- PreprocessorDefinitions="QUARTZCORE_DLL"
+ AdditionalIncludeDirectories=""
ForcedIncludeFiles=""
/>
<Tool
@@ -125,13 +123,13 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\inspector\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\appcache\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\icon\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\html\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\notifications\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\transforms\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\opentype\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\text\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\sql\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bindings\js\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\style\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\editing\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\dom\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\xml\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\storage\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\websockets\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\workers\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\parser\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\runtime\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\masm\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\profiler\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wrec\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\inspector\front-end\*&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\English.lproj\localizedStrings.js&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\inspector\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\appcache\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\icon\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\html\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\notifications\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\transforms\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\opentype\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\text\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\sql\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bindings\js\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\jsc\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\style\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\editing\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\dom\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\xml\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\storage\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\websockets\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\workers\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\parser\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\runtime\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\masm\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\profiler\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wrec\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\inspector\front-end\*&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\English.lproj\localizedStrings.js&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Debug_Internal|Win32"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;.\WebCoreCommon.vsprops;.\WebCoreCG.vsprops;.\WebCoreCFNetwork.vsprops;.\WebCorePthreads.vsprops;.\WebCoreMediaQT.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;.\WebCoreCommon.vsprops;.\WebCoreCG.vsprops;.\WebCoreCFNetwork.vsprops;.\WebCorePthreads.vsprops;.\WebCoreMediaQT.vsprops;.\WebCoreQuartzCore.vsprops"
CharacterSet="1"
>
<Tool
@@ -151,8 +149,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(DXSDK_DIR)\Include"
- PreprocessorDefinitions="QUARTZCORE_DLL"
+ AdditionalIncludeDirectories=""
ForcedIncludeFiles=""
/>
<Tool
@@ -181,13 +178,13 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\inspector\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\appcache\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\icon\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\html\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\notifications\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\transforms\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\opentype\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\text\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\sql\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bindings\js\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\style\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\editing\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\dom\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\xml\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\storage\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\websockets\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\workers\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\parser\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\runtime\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\masm\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\profiler\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wrec\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\inspector\front-end\*&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\English.lproj\localizedStrings.js&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\inspector\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\appcache\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\icon\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\html\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\notifications\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\transforms\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\opentype\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\text\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\sql\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bindings\js\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\jsc\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\style\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\editing\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\dom\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\xml\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\storage\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\websockets\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\workers\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\parser\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\runtime\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\masm\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\profiler\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wrec\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\inspector\front-end\*&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\English.lproj\localizedStrings.js&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Debug_Cairo|Win32"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;.\WebCoreCommon.vsprops;.\WebCoreCairo.vsprops;.\WebCoreCURL.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefinesCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;.\WebCoreCommon.vsprops;.\WebCoreCairo.vsprops;.\WebCoreCURL.vsprops"
CharacterSet="1"
>
<Tool
@@ -207,8 +204,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(DXSDK_DIR)\Include"
- PreprocessorDefinitions="QUARTZCORE_DLL"
+ AdditionalIncludeDirectories=""
ForcedIncludeFiles=""
/>
<Tool
@@ -237,13 +233,13 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\inspector\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\appcache\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\icon\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\html\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\notifications\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\transforms\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\opentype\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\text\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\curl\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\sql\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bindings\js\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\style\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\editing\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\dom\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\xml\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\storage\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\websockets\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\workers\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\parser\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\runtime\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\masm\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\profiler\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wrec\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\inspector\front-end\*&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\English.lproj\localizedStrings.js&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\inspector\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\appcache\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\icon\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\html\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\notifications\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\transforms\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\opentype\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\text\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\curl\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\sql\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bindings\js\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\jsc\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\style\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\editing\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\dom\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\xml\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\storage\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\websockets\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\workers\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\parser\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\runtime\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\masm\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\profiler\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wrec\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\inspector\front-end\*&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\English.lproj\localizedStrings.js&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release_Cairo|Win32"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;.\WebCoreCommon.vsprops;.\WebCoreCairo.vsprops;.\WebCoreCURL.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefinesCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;.\WebCoreCommon.vsprops;.\WebCoreCairo.vsprops;.\WebCoreCURL.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -264,8 +260,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(DXSDK_DIR)\Include"
- PreprocessorDefinitions="QUARTZCORE_DLL"
+ AdditionalIncludeDirectories=""
ForcedIncludeFiles=""
/>
<Tool
@@ -294,13 +289,13 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\inspector\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\appcache\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\icon\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\html\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\notifications\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\transforms\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\opentype\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\text\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\curl\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\sql\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bindings\js\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\style\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\editing\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\dom\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\xml\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\storage\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\websockets\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\workers\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\parser\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\runtime\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\masm\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\profiler\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wrec\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\inspector\front-end\*&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\English.lproj\localizedStrings.js&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\inspector\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\appcache\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\icon\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\html\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\notifications\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\transforms\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\opentype\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\text\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\curl\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\sql\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bindings\js\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\jsc\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\style\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\editing\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\dom\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\xml\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\storage\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\websockets\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\workers\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\parser\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\runtime\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\masm\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\profiler\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wrec\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\inspector\front-end\*&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\English.lproj\localizedStrings.js&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Debug_All|Win32"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;.\WebCoreCommon.vsprops;.\WebCoreCG.vsprops;.\WebCoreCFNetwork.vsprops;.\WebCorePthreads.vsprops;.\WebCoreMediaQT.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;.\WebCoreCommon.vsprops;.\WebCoreCG.vsprops;.\WebCoreCFNetwork.vsprops;.\WebCorePthreads.vsprops;.\WebCoreMediaQT.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops;.\WebCoreQuartzCore.vsprops"
CharacterSet="1"
>
<Tool
@@ -320,8 +315,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(DXSDK_DIR)\Include"
- PreprocessorDefinitions="QUARTZCORE_DLL"
+ AdditionalIncludeDirectories=""
ForcedIncludeFiles=""
/>
<Tool
@@ -350,7 +344,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\inspector\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\appcache\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\icon\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\html\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\notifications\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\transforms\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\opentype\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\text\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\sql\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bindings\js\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\style\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\editing\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\dom\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\xml\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\storage\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\websockets\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\workers\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\parser\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\runtime\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\masm\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\profiler\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wrec\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\inspector\front-end\*&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\English.lproj\localizedStrings.js&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\inspector\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\appcache\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\icon\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\html\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\notifications\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\transforms\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\opentype\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\text\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\sql\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bindings\js\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\jsc\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\style\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\editing\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\dom\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\xml\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\storage\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\websockets\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\workers\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\parser\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\runtime\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\masm\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\profiler\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wrec\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\inspector\front-end\*&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\English.lproj\localizedStrings.js&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
@@ -727,6 +721,62 @@
>
</File>
<File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSBlob.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSBlob.h"
+ >
+ </File>
+ <File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSCanvasGradient.cpp"
>
<FileConfiguration
@@ -19411,6 +19461,14 @@
>
</File>
<File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\XMLNSNames.cpp"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\XMLNSNames.h"
+ >
+ </File>
+ <File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\XPathGrammar.cpp"
>
<FileConfiguration
@@ -19935,6 +19993,30 @@
>
</File>
<File
+ RelativePath="..\accessibility\AccessibilityMenuList.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\accessibility\AccessibilityMenuList.h"
+ >
+ </File>
+ <File
+ RelativePath="..\accessibility\AccessibilityMenuListOption.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\accessibility\AccessibilityMenuListOption.h"
+ >
+ </File>
+ <File
+ RelativePath="..\accessibility\AccessibilityMenuListPopup.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\accessibility\AccessibilityMenuListPopup.h"
+ >
+ </File>
+ <File
RelativePath="..\accessibility\AccessibilityObject.cpp"
>
<FileConfiguration
@@ -20047,6 +20129,62 @@
>
</File>
<File
+ RelativePath="..\accessibility\AccessibilityScrollbar.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\accessibility\AccessibilityScrollbar.h"
+ >
+ </File>
+ <File
RelativePath="..\accessibility\AccessibilitySlider.cpp"
>
<FileConfiguration
@@ -20527,7 +20665,7 @@
>
</File>
<File
- RelativePath="..\page\ContextMenuSelectionHandler.h"
+ RelativePath="..\page\ContextMenuProvider.h"
>
</File>
<File
@@ -20671,6 +20809,26 @@
>
</File>
<File
+ RelativePath="..\page\GeolocationController.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\page\GeolocationController.h"
+ >
+ </File>
+ <File
+ RelativePath="..\page\GeolocationControllerClient.h"
+ >
+ </File>
+ <File
+ RelativePath="..\page\GeolocationError.h"
+ >
+ </File>
+ <File
+ RelativePath="..\page\GeolocationPosition.h"
+ >
+ </File>
+ <File
RelativePath="..\page\Geoposition.h"
>
</File>
@@ -26161,82 +26319,6 @@
</FileConfiguration>
</File>
</Filter>
- <Filter
- Name="xbm"
- >
- <File
- RelativePath="..\platform\image-decoders\xbm\XBMImageDecoder.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Internal|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\platform\image-decoders\xbm\XBMImageDecoder.h"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Internal|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- </File>
- </Filter>
</Filter>
<Filter
Name="animation"
@@ -27135,6 +27217,14 @@
>
</File>
<File
+ RelativePath="..\rendering\RenderEmbeddedObject.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\rendering\RenderEmbeddedObject.h"
+ >
+ </File>
+ <File
RelativePath="..\rendering\RenderFieldset.cpp"
>
</File>
@@ -27531,6 +27621,14 @@
>
</File>
<File
+ RelativePath="..\rendering\RenderSVGShadowTreeRootContainer.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\rendering\RenderSVGShadowTreeRootContainer.h"
+ >
+ </File>
+ <File
RelativePath="..\rendering\RenderSVGText.cpp"
>
</File>
@@ -27825,6 +27923,18 @@
>
</File>
<File
+ RelativePath="..\rendering\SVGMarkerData.h"
+ >
+ </File>
+ <File
+ RelativePath="..\rendering\SVGMarkerLayoutInfo.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\rendering\SVGMarkerLayoutInfo.h"
+ >
+ </File>
+ <File
RelativePath="..\rendering\SVGRenderSupport.cpp"
>
</File>
@@ -27849,6 +27959,14 @@
>
</File>
<File
+ RelativePath="..\rendering\SVGShadowTreeElements.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\rendering\SVGShadowTreeElements.h"
+ >
+ </File>
+ <File
RelativePath="..\rendering\TableLayout.h"
>
</File>
@@ -27861,6 +27979,10 @@
>
</File>
<File
+ RelativePath="..\rendering\TrailingFloatsRootInlineBox.h"
+ >
+ </File>
+ <File
RelativePath="..\rendering\TransformState.cpp"
>
</File>
@@ -29679,6 +29801,14 @@
Name="html"
>
<File
+ RelativePath="..\html\Blob.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\Blob.h"
+ >
+ </File>
+ <File
RelativePath="..\html\canvas\CanvasGradient.cpp"
>
</File>
@@ -29767,6 +29897,14 @@
>
</File>
<File
+ RelativePath="..\html\DateComponents.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\DateComponents.h"
+ >
+ </File>
+ <File
RelativePath="..\html\DOMDataGridDataSource.cpp"
>
</File>
@@ -33963,14 +34101,6 @@
>
</File>
<File
- RelativePath="..\html\ISODateTime.cpp"
- >
- </File>
- <File
- RelativePath="..\html\ISODateTime.h"
- >
- </File>
- <File
RelativePath="..\html\MediaError.h"
>
</File>
@@ -37242,62 +37372,6 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSInspectedObjectWrapper.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Internal|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\bindings\js\JSInspectedObjectWrapper.h"
- >
- </File>
- <File
RelativePath="..\bindings\js\JSInjectedScriptHostCustom.cpp"
>
<FileConfiguration
@@ -37402,14 +37476,6 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSInspectorCallbackWrapper.cpp"
- >
- </File>
- <File
- RelativePath="..\bindings\js\JSInspectorCallbackWrapper.h"
- >
- </File>
- <File
RelativePath="..\bindings\js\JSJavaScriptCallFrameCustom.cpp"
>
<FileConfiguration
@@ -38426,62 +38492,6 @@
>
</File>
<File
- RelativePath="..\bindings\js\JSQuarantinedObjectWrapper.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Internal|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\bindings\js\JSQuarantinedObjectWrapper.h"
- >
- </File>
- <File
RelativePath="..\bindings\js\JSSharedWorkerConstructor.cpp"
>
<FileConfiguration
@@ -38850,6 +38860,10 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\bindings\js\JSSVGContextCache.h"
+ >
+ </File>
+ <File
RelativePath="..\bindings\js\JSSVGElementInstanceCustom.cpp"
>
<FileConfiguration
@@ -39110,63 +39124,11 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSSVGPODTypeWrapper.h"
+ RelativePath="..\bindings\js\JSSVGPODListCustom.h"
>
</File>
<File
- RelativePath="..\bindings\js\JSSVGPointListCustom.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Internal|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\bindings\js\JSSVGTransformListCustom.cpp"
+ RelativePath="..\bindings\js\JSSVGPODTypeWrapper.h"
>
</File>
<File
@@ -40514,6 +40476,10 @@
>
</File>
<File
+ RelativePath="..\bindings\js\ScriptWrappable.h"
+ >
+ </File>
+ <File
RelativePath="..\bindings\js\SerializedScriptValue.cpp"
>
<FileConfiguration
@@ -40811,6 +40777,18 @@
>
</File>
<File
+ RelativePath="..\svg\SVGAnimatedProperty.h"
+ >
+ </File>
+ <File
+ RelativePath="..\svg\SVGAnimatedPropertySynchronizer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\svg\SVGAnimatedPropertyTraits.h"
+ >
+ </File>
+ <File
RelativePath="..\svg\SVGAnimatedTemplate.h"
>
</File>
@@ -40879,6 +40857,10 @@
>
</File>
<File
+ RelativePath="..\svg\SVGElementRareData.h"
+ >
+ </File>
+ <File
RelativePath="..\svg\SVGEllipseElement.h"
>
</File>
@@ -41005,6 +40987,54 @@
<File
RelativePath="..\svg\SVGFontFaceElement.cpp"
>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\svg\SVGFontFaceElement.h"
@@ -41037,6 +41067,54 @@
<File
RelativePath="..\svg\SVGGlyphElement.cpp"
>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\svg\SVGGlyphElement.h"
@@ -41053,6 +41131,54 @@
<File
RelativePath="..\svg\SVGHKernElement.cpp"
>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\svg\SVGHKernElement.h"
@@ -41105,6 +41231,54 @@
<File
RelativePath="..\svg\SVGMaskElement.cpp"
>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\svg\SVGMaskElement.h"
@@ -41245,6 +41419,54 @@
<File
RelativePath="..\svg\SVGStyledElement.cpp"
>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\svg\SVGStyledElement.h"
@@ -41261,6 +41483,54 @@
<File
RelativePath="..\svg\SVGStyleElement.cpp"
>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\svg\SVGStyleElement.h"
@@ -41354,10 +41624,6 @@
RelativePath="..\svg\SVGZoomEvent.h"
>
</File>
- <File
- RelativePath="..\svg\SynchronizablePropertyController.h"
- >
- </File>
<Filter
Name="animation"
>
@@ -41805,6 +42071,10 @@
RelativePath="..\ForwardingHeaders\runtime\UString.h"
>
</File>
+ <File
+ RelativePath="..\ForwardingHeaders\runtime\UStringImpl.h"
+ >
+ </File>
</Filter>
<Filter
Name="pcre"
@@ -42163,6 +42433,18 @@
Name="bridge"
>
<File
+ RelativePath="..\bridge\Bridge.h"
+ >
+ </File>
+ <File
+ RelativePath="..\bridge\jsc\BridgeJSC.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\bridge\jsc\BridgeJSC.h"
+ >
+ </File>
+ <File
RelativePath="..\bridge\c\c_class.cpp"
>
</File>
@@ -42235,14 +42517,6 @@
>
</File>
<File
- RelativePath="..\bridge\runtime.cpp"
- >
- </File>
- <File
- RelativePath="..\bridge\runtime.h"
- >
- </File>
- <File
RelativePath="..\bridge\runtime_array.cpp"
>
</File>
@@ -42422,6 +42696,22 @@
>
</File>
<File
+ RelativePath="..\inspector\front-end\AuditLauncherView.js"
+ >
+ </File>
+ <File
+ RelativePath="..\inspector\front-end\AuditResultView.js"
+ >
+ </File>
+ <File
+ RelativePath="..\inspector\front-end\audits.css"
+ >
+ </File>
+ <File
+ RelativePath="..\inspector\front-end\AuditsPanel.js"
+ >
+ </File>
+ <File
RelativePath="..\inspector\front-end\BottomUpProfileDataGridTree.js"
>
</File>
@@ -42490,6 +42780,10 @@
>
</File>
<File
+ RelativePath="..\inspector\front-end\DOMSyntaxHighlighter.js"
+ >
+ </File>
+ <File
RelativePath="..\inspector\front-end\Drawer.js"
>
</File>
@@ -42534,15 +42828,15 @@
>
</File>
<File
- RelativePath="..\inspector\front-end\InspectorControllerStub.js"
+ RelativePath="..\inspector\front-end\inspectorSyntaxHighlight.css"
>
</File>
<File
- RelativePath="..\inspector\front-end\inspectorSyntaxHighlight.css"
+ RelativePath="..\inspector\front-end\MetricsSidebarPane.js"
>
</File>
<File
- RelativePath="..\inspector\front-end\MetricsSidebarPane.js"
+ RelativePath="..\inspector\front-end\NativeTextViewer.js"
>
</File>
<File
@@ -42626,6 +42920,14 @@
>
</File>
<File
+ RelativePath="..\inspector\front-end\Section.js"
+ >
+ </File>
+ <File
+ RelativePath="..\inspector\front-end\Settings.js"
+ >
+ </File>
+ <File
RelativePath="..\inspector\front-end\SidebarPane.js"
>
</File>
@@ -42634,10 +42936,26 @@
>
</File>
<File
+ RelativePath="..\inspector\front-end\SourceCSSTokenizer.js"
+ >
+ </File>
+ <File
RelativePath="..\inspector\front-end\SourceFrame.js"
>
</File>
<File
+ RelativePath="..\inspector\front-end\SourceHTMLTokenizer.js"
+ >
+ </File>
+ <File
+ RelativePath="..\inspector\front-end\SourceJavaScriptTokenizer.js"
+ >
+ </File>
+ <File
+ RelativePath="..\inspector\front-end\SourceTokenizer.js"
+ >
+ </File>
+ <File
RelativePath="..\inspector\front-end\SourceView.js"
>
</File>
@@ -42662,6 +42980,22 @@
>
</File>
<File
+ RelativePath="..\inspector\front-end\TextEditor.js"
+ >
+ </File>
+ <File
+ RelativePath="..\inspector\front-end\TextEditorHighlighter.js"
+ >
+ </File>
+ <File
+ RelativePath="..\inspector\front-end\TextEditorModel.js"
+ >
+ </File>
+ <File
+ RelativePath="..\inspector\front-end\textEditor.css"
+ >
+ </File>
+ <File
RelativePath="..\inspector\front-end\TextPrompt.js"
>
</File>
@@ -42701,6 +43035,10 @@
RelativePath="..\inspector\front-end\WatchExpressionsSidebarPane.js"
>
</File>
+ <File
+ RelativePath="..\inspector\front-end\WelcomeView.js"
+ >
+ </File>
</Filter>
</Filter>
<Filter
@@ -43047,6 +43385,18 @@
Name="websockets"
>
<File
+ RelativePath="..\websockets\ThreadableWebSocketChannel.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\websockets\ThreadableWebSocketChannel.h"
+ >
+ </File>
+ <File
+ RelativePath="..\websockets\ThreadableWebSocketChannelClientWrapper.h"
+ >
+ </File>
+ <File
RelativePath="..\websockets\WebSocket.cpp"
>
</File>
@@ -43074,6 +43424,14 @@
RelativePath="..\websockets\WebSocketHandshake.h"
>
</File>
+ <File
+ RelativePath="..\websockets\WorkerThreadableWebSocketChannel.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\websockets\WorkerThreadableWebSocketChannel.h"
+ >
+ </File>
</Filter>
<File
RelativePath="..\config.h"
diff --git a/WebCore/WebCore.vcproj/WebCoreCommon.vsprops b/WebCore/WebCore.vcproj/WebCoreCommon.vsprops
index 7cf70b0..99fe1b9 100644
--- a/WebCore/WebCore.vcproj/WebCoreCommon.vsprops
+++ b/WebCore/WebCore.vcproj/WebCoreCommon.vsprops
@@ -7,8 +7,8 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\accessibility&quot;;&quot;$(ProjectDir)..\accessibility\win&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\c&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\rendering\style&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\dom\default&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\html\canvas&quot;;&quot;$(ProjectDir)..\inspector&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\appcache&quot;;&quot;$(ProjectDir)..\loader\archive&quot;;&quot;$(ProjectDir)..\loader\archive\cf&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\notifications&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\page\animation&quot;;&quot;$(ProjectDir)..\page\win&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\animation&quot;;&quot;$(ProjectDir)..\platform\mock&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\graphics\filters&quot;;&quot;$(ProjectDir)..\platform\graphics\opentype&quot;;&quot;$(ProjectDir)..\platform\graphics\transforms&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\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\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\icu&quot;;&quot;$(WebKitLibrariesDir)\include\iconv&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(ProjectDir)..\svg\animation&quot;"
- PreprocessorDefinitions="__WIN32__;DISABLE_3D_RENDERING;WEBCORE_CONTEXT_MENUS;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DATALIST;ENABLE_DOM_STORAGE;ENABLE_EVENTSOURCE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ 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\js&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\dom\default&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\html\canvas&quot;;&quot;$(ProjectDir)..\inspector&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\appcache&quot;;&quot;$(ProjectDir)..\loader\archive&quot;;&quot;$(ProjectDir)..\loader\archive\cf&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\notifications&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\page\animation&quot;;&quot;$(ProjectDir)..\page\win&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\animation&quot;;&quot;$(ProjectDir)..\platform\mock&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\graphics\filters&quot;;&quot;$(ProjectDir)..\platform\graphics\opentype&quot;;&quot;$(ProjectDir)..\platform\graphics\transforms&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\svg\animation&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\wml&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(ProjectDir)..\websockets&quot;;&quot;$(ProjectDir)..\workers&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;"
+ PreprocessorDefinitions="__WIN32__;DISABLE_3D_RENDERING;WEBCORE_CONTEXT_MENUS"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebCorePrefix.h"
ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
diff --git a/WebCore/WebCore.vcproj/WebCoreGenerated.vcproj b/WebCore/WebCore.vcproj/WebCoreGenerated.vcproj
index d03e8e5..744fdd0 100644
--- a/WebCore/WebCore.vcproj/WebCoreGenerated.vcproj
+++ b/WebCore/WebCore.vcproj/WebCoreGenerated.vcproj
@@ -22,8 +22,28 @@
>
<Tool
Name="VCNMakeTool"
- BuildCommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;bash build-generated-files.sh &quot;$(WebKitOutputDir)&quot; &quot;$(WebKitLibrariesDir)&quot;&#x0D;&#x0A;bash migrate-idls.sh &quot;$(WebKitOutputDir)/obj/WebKit/DOMInterfaces&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
- ReBuildCommandLine="echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;del /s /q &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;&#x0D;&#x0A;del /s /q &quot;$(WebKitOutputDir)\obj\WebKit\DOMInterfaces&quot;&#x0D;&#x0A;%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;bash build-generated-files.sh &quot;$(WebKitOutputDir)&quot; &quot;$(WebKitLibrariesDir)&quot;&#x0D;&#x0A;bash migrate-idls.sh &quot;$(WebKitOutputDir)/obj/WebKit/DOMInterfaces&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ BuildCommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;bash build-generated-files.sh &quot;$(WebKitOutputDir)&quot; &quot;$(WebKitLibrariesDir)&quot; windows&#x0D;&#x0A;bash migrate-idls.sh &quot;$(WebKitOutputDir)/obj/WebKit/DOMInterfaces&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ ReBuildCommandLine="echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;del /s /q &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;&#x0D;&#x0A;del /s /q &quot;$(WebKitOutputDir)\obj\WebKit\DOMInterfaces&quot;&#x0D;&#x0A;%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;bash build-generated-files.sh &quot;$(WebKitOutputDir)&quot; &quot;$(WebKitLibrariesDir)&quot; windows&#x0D;&#x0A;bash migrate-idls.sh &quot;$(WebKitOutputDir)/obj/WebKit/DOMInterfaces&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CleanCommandLine="del /s /q &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;&#x0D;&#x0A;del /s /q &quot;$(WebKitOutputDir)\obj\WebKit\DOMInterfaces&quot;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ Output=""
+ PreprocessorDefinitions=""
+ IncludeSearchPath=""
+ ForcedIncludes=""
+ AssemblySearchPath=""
+ ForcedUsingAssemblies=""
+ CompileAsManaged=""
+ />
+ </Configuration>
+ <Configuration
+ Name="cairo|Win32"
+ OutputDirectory="$(WebKitOutputDir)\lib"
+ IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
+ ConfigurationType="0"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;bash build-generated-files.sh &quot;$(WebKitOutputDir)&quot; &quot;$(WebKitLibrariesDir)&quot; cairo&#x0D;&#x0A;bash migrate-idls.sh &quot;$(WebKitOutputDir)/obj/WebKit/DOMInterfaces&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ ReBuildCommandLine="echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;del /s /q &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;&#x0D;&#x0A;del /s /q &quot;$(WebKitOutputDir)\obj\WebKit\DOMInterfaces&quot;&#x0D;&#x0A;%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;bash build-generated-files.sh &quot;$(WebKitOutputDir)&quot; &quot;$(WebKitLibrariesDir)&quot; cairo&#x0D;&#x0A;bash migrate-idls.sh &quot;$(WebKitOutputDir)/obj/WebKit/DOMInterfaces&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
CleanCommandLine="del /s /q &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;&#x0D;&#x0A;del /s /q &quot;$(WebKitOutputDir)\obj\WebKit\DOMInterfaces&quot;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
Output=""
PreprocessorDefinitions=""
diff --git a/WebCore/WebCore.vcproj/WebCoreMediaQT.vsprops b/WebCore/WebCore.vcproj/WebCoreMediaQT.vsprops
index 4915270..b4e2019 100644
--- a/WebCore/WebCore.vcproj/WebCoreMediaQT.vsprops
+++ b/WebCore/WebCore.vcproj/WebCoreMediaQT.vsprops
@@ -7,6 +7,5 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="$(WebKitOutputDir)\include\QTMovieWin"
- PreprocessorDefinitions="ENABLE_VIDEO"
/>
</VisualStudioPropertySheet>
diff --git a/WebCore/WebCore.vcproj/WebCoreQuartzCore.vsprops b/WebCore/WebCore.vcproj/WebCoreQuartzCore.vsprops
new file mode 100644
index 0000000..17dfcb2
--- /dev/null
+++ b/WebCore/WebCore.vcproj/WebCoreQuartzCore.vsprops
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebCoreQuartzCore"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(DXSDK_DIR)\Include&quot;"
+ PreprocessorDefinitions="QUARTZCORE_DLL"
+ />
+</VisualStudioPropertySheet>
diff --git a/WebCore/WebCore.vcproj/build-generated-files.sh b/WebCore/WebCore.vcproj/build-generated-files.sh
index f2ec855..3980526 100644
--- a/WebCore/WebCore.vcproj/build-generated-files.sh
+++ b/WebCore/WebCore.vcproj/build-generated-files.sh
@@ -59,5 +59,5 @@ mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources"
cd "${BUILT_PRODUCTS_DIR}/DerivedSources"
export WebCore="${XSRCROOT}"
-export FEATURE_DEFINES="ENABLE_CHANNEL_MESSAGING ENABLE_DATABASE ENABLE_DATAGRID ENABLE_DATALIST ENABLE_DOM_STORAGE ENABLE_EVENTSOURCE ENABLE_FILTERS ENABLE_ICONDATABASE ENABLE_JAVASCRIPT_DEBUGGER ENABLE_OFFLINE_WEB_APPLICATIONS ENABLE_SHARED_WORKERS ENABLE_SVG ENABLE_SVG_ANIMATION ENABLE_SVG_AS_IMAGE ENABLE_SVG_FONTS ENABLE_SVG_FOREIGN_OBJECT ENABLE_SVG_USE ENABLE_VIDEO ENABLE_WEB_SOCKETS ENABLE_WORKERS ENABLE_XPATH ENABLE_XSLT"
+export FEATURE_DEFINES=`$SDKROOT/tools/scripts/feature-defines.sh $SDKROOT $3`
make -f "$WebCore/DerivedSources.make" -j ${NUMCPUS} || exit 1
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 33d3f84..abe9e8c 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -54,6 +54,7 @@
080FAE1B0EEEBDA800AACDE9 /* WMLTemplateElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 080FAE190EEEBDA800AACDE9 /* WMLTemplateElement.h */; };
0818AEE20EDB86BC00647B66 /* WMLEventHandlingElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0818AEE00EDB86BC00647B66 /* WMLEventHandlingElement.cpp */; };
0818AEE30EDB86BC00647B66 /* WMLEventHandlingElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 0818AEE10EDB86BC00647B66 /* WMLEventHandlingElement.h */; };
+ 081AA8DA1111237E002AB06E /* SVGElementRareData.h in Headers */ = {isa = PBXBuildFile; fileRef = 081AA8D91111237E002AB06E /* SVGElementRareData.h */; };
081D81310EE0E74D00D73689 /* WMLTimerElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 081D812F0EE0E74D00D73689 /* WMLTimerElement.cpp */; };
081D81320EE0E74D00D73689 /* WMLTimerElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 081D81300EE0E74D00D73689 /* WMLTimerElement.h */; };
081EBF3A0FD34F4100DA7559 /* SVGFilterBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 081EBF380FD34F4100DA7559 /* SVGFilterBuilder.cpp */; };
@@ -62,6 +63,8 @@
08203AA00ED8C35300B8B61A /* WMLAccessElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08203A9E0ED8C35300B8B61A /* WMLAccessElement.h */; };
082341C50FCF3A9500D75BD6 /* WMLSelectElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 082341C30FCF3A9400D75BD6 /* WMLSelectElement.cpp */; };
082341C60FCF3A9500D75BD6 /* WMLSelectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 082341C40FCF3A9400D75BD6 /* WMLSelectElement.h */; };
+ 082FCAC4110927CE00CC4821 /* JSSVGContextCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 082FCAC3110927CE00CC4821 /* JSSVGContextCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 08385FF610F0186000BFE07B /* SVGMarkerData.h in Headers */ = {isa = PBXBuildFile; fileRef = 08385FF510F0186000BFE07B /* SVGMarkerData.h */; };
0839476C0ECE4BD600027350 /* WMLElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08FB84B00ECE373300DC064E /* WMLElementFactory.cpp */; };
0839476D0ECE4BD600027350 /* WMLElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 08FB84B10ECE373300DC064E /* WMLElementFactory.h */; };
083DAEA60F01A7FB00342754 /* RenderTextControlMultiLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 083DAEA20F01A7FB00342754 /* RenderTextControlMultiLine.cpp */; };
@@ -74,6 +77,8 @@
084CE5CC0F27DADC00E6240E /* WMLOptGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 084CE5C80F27DADC00E6240E /* WMLOptGroupElement.h */; };
084CE5CD0F27DADC00E6240E /* WMLOptionElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 084CE5C90F27DADC00E6240E /* WMLOptionElement.cpp */; };
084CE5CE0F27DADC00E6240E /* WMLOptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 084CE5CA0F27DADC00E6240E /* WMLOptionElement.h */; };
+ 084D2833110A7FCB0038239A /* SVGAnimatedPropertySynchronizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 084D2831110A7FCB0038239A /* SVGAnimatedPropertySynchronizer.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 084D2834110A7FCB0038239A /* SVGAnimatedPropertyTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = 084D2832110A7FCB0038239A /* SVGAnimatedPropertyTraits.h */; settings = {ATTRIBUTES = (Private, ); }; };
084DBAA10ED39D360038C226 /* WMLVariables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 084DBA9D0ED39D350038C226 /* WMLVariables.cpp */; };
084DBAA20ED39D360038C226 /* WMLVariables.h in Headers */ = {isa = PBXBuildFile; fileRef = 084DBA9E0ED39D360038C226 /* WMLVariables.h */; };
08591AA50F085C4E009BACB1 /* InputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08591AA40F085C4E009BACB1 /* InputElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -88,12 +93,12 @@
087281560F26B9B600AFC596 /* OptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 087281520F26B9B600AFC596 /* OptionElement.h */; };
087281570F26B9B600AFC596 /* OptionGroupElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 087281530F26B9B600AFC596 /* OptionGroupElement.cpp */; };
087281580F26B9B600AFC596 /* OptionGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 087281540F26B9B600AFC596 /* OptionGroupElement.h */; };
+ 08735FB810E91232006D6FAD /* SVGMarkerLayoutInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08735FB610E91232006D6FAD /* SVGMarkerLayoutInfo.cpp */; };
+ 08735FB910E91232006D6FAD /* SVGMarkerLayoutInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 08735FB710E91232006D6FAD /* SVGMarkerLayoutInfo.h */; };
08744BAA0EDB7D86004C9E63 /* WMLOnEventElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08744BA90EDB7D86004C9E63 /* WMLOnEventElement.cpp */; };
08744BAE0EDB7D92004C9E63 /* WMLOnEventElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08744BAD0EDB7D92004C9E63 /* WMLOnEventElement.h */; };
0878B1FD10874E3F00A55097 /* SVGAnimatedProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 0878B1F910874E3F00A55097 /* SVGAnimatedProperty.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 0878B1FE10874E3F00A55097 /* SynchronizablePropertyController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0878B1FA10874E3F00A55097 /* SynchronizablePropertyController.cpp */; };
- 0878B1FF10874E3F00A55097 /* SynchronizablePropertyController.h in Headers */ = {isa = PBXBuildFile; fileRef = 0878B1FB10874E3F00A55097 /* SynchronizablePropertyController.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 0878B20010874E3F00A55097 /* SynchronizableTypeWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 0878B1FC10874E3F00A55097 /* SynchronizableTypeWrapper.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 087D97BF10FB8D7700C00874 /* JSSVGPODListCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 087D97BE10FB8D7700C00874 /* JSSVGPODListCustom.h */; };
087FFA0F0EFF3ED3009DBD88 /* WMLInsertedLegendElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 087FFA0D0EFF3ED3009DBD88 /* WMLInsertedLegendElement.cpp */; };
087FFA100EFF3ED3009DBD88 /* WMLInsertedLegendElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 087FFA0E0EFF3ED3009DBD88 /* WMLInsertedLegendElement.h */; };
08807B760ED709AB003F6975 /* WMLGoElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08807B6A0ED709AB003F6975 /* WMLGoElement.cpp */; };
@@ -135,10 +140,15 @@
08C4C5190EF19A4000E4840F /* WMLImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C4C5150EF19A4000E4840F /* WMLImageElement.h */; };
08C4C51A0EF19A4000E4840F /* WMLImageLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08C4C5160EF19A4000E4840F /* WMLImageLoader.cpp */; };
08C4C51B0EF19A4000E4840F /* WMLImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C4C5170EF19A4000E4840F /* WMLImageLoader.h */; };
+ 08C7A2C710DC7462002D368B /* SVGNames.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 656581E909D1508D000E61D7 /* SVGNames.h */; };
08C925190FCC7C4A00480DEC /* FilterEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08C925170FCC7C4A00480DEC /* FilterEffect.cpp */; };
08C9251A0FCC7C4A00480DEC /* FilterEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C925180FCC7C4A00480DEC /* FilterEffect.h */; };
08CD61BC0ED3929C002DDF51 /* WMLTaskElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08CD61B80ED3929C002DDF51 /* WMLTaskElement.cpp */; };
08CD61BD0ED3929C002DDF51 /* WMLTaskElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08CD61B90ED3929C002DDF51 /* WMLTaskElement.h */; };
+ 08DAB9BA1103D9A5003E7ABA /* RenderSVGShadowTreeRootContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08DAB9B81103D9A5003E7ABA /* RenderSVGShadowTreeRootContainer.cpp */; };
+ 08DAB9BB1103D9A5003E7ABA /* RenderSVGShadowTreeRootContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 08DAB9B91103D9A5003E7ABA /* RenderSVGShadowTreeRootContainer.h */; };
+ 08DAB9C21103D9C1003E7ABA /* SVGShadowTreeElements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08DAB9C01103D9C1003E7ABA /* SVGShadowTreeElements.cpp */; };
+ 08DAB9C31103D9C1003E7ABA /* SVGShadowTreeElements.h in Headers */ = {isa = PBXBuildFile; fileRef = 08DAB9C11103D9C1003E7ABA /* SVGShadowTreeElements.h */; };
08E192530EDE0C3A0087B780 /* WMLErrorHandling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08E192510EDE0C390087B780 /* WMLErrorHandling.cpp */; };
08E192540EDE0C3A0087B780 /* WMLErrorHandling.h in Headers */ = {isa = PBXBuildFile; fileRef = 08E192520EDE0C3A0087B780 /* WMLErrorHandling.h */; };
08E4FE460E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08E4FE450E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp */; };
@@ -147,6 +157,8 @@
08E6E0F10EFF42BA00029FBF /* WMLFieldSetElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08E6E0EF0EFF42BA00029FBF /* WMLFieldSetElement.cpp */; };
08E6E0F20EFF42BA00029FBF /* WMLFieldSetElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08E6E0F00EFF42BA00029FBF /* WMLFieldSetElement.h */; };
0A4844990CA44CB200B7BD48 /* SoftLinking.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A4844980CA44CB200B7BD48 /* SoftLinking.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0AFDAC3B10F5448300E1F3D2 /* PluginWidgetMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0AFDAC3A10F5448300E1F3D2 /* PluginWidgetMac.mm */; };
+ 0AFDAC3D10F5448C00E1F3D2 /* PluginWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AFDAC3C10F5448C00E1F3D2 /* PluginWidget.h */; settings = {ATTRIBUTES = (Private, ); }; };
0B8C56D40F28627F000502E1 /* HTTPHeaderMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B8C56D30F28627F000502E1 /* HTTPHeaderMap.cpp */; };
0B9056190F2578BE0095FF6A /* DocumentThreadableLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B9056150F2578BE0095FF6A /* DocumentThreadableLoader.cpp */; };
0B90561A0F2578BF0095FF6A /* DocumentThreadableLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056160F2578BE0095FF6A /* DocumentThreadableLoader.h */; settings = {ATTRIBUTES = (); }; };
@@ -158,7 +170,6 @@
0BE030A20F3112FB003C1A46 /* RenderLineBoxList.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BE030A10F3112FB003C1A46 /* RenderLineBoxList.h */; settings = {ATTRIBUTES = (Private, ); }; };
0C3F1F5A10C8871200D72CE1 /* WebGLUniformLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C3F1F5710C8871200D72CE1 /* WebGLUniformLocation.cpp */; };
0C3F1F5B10C8871200D72CE1 /* WebGLUniformLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C3F1F5810C8871200D72CE1 /* WebGLUniformLocation.h */; };
- 0C3F1F5C10C8871200D72CE1 /* WebGLUniformLocation.idl in Resources */ = {isa = PBXBuildFile; fileRef = 0C3F1F5910C8871200D72CE1 /* WebGLUniformLocation.idl */; };
0C45342710CDBBFA00869157 /* JSWebGLUniformLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C45342510CDBBFA00869157 /* JSWebGLUniformLocation.cpp */; };
0C45342810CDBBFA00869157 /* JSWebGLUniformLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C45342610CDBBFA00869157 /* JSWebGLUniformLocation.h */; };
0F11A54F0F39233100C37884 /* RenderSelectionInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F11A54E0F39233100C37884 /* RenderSelectionInfo.h */; };
@@ -176,6 +187,8 @@
0F580CFE0F12DE9B0051D689 /* RenderLayerCompositor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F580CFA0F12DE9B0051D689 /* RenderLayerCompositor.cpp */; };
0F580CFF0F12DE9B0051D689 /* RenderLayerBacking.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F580CFB0F12DE9B0051D689 /* RenderLayerBacking.h */; };
0F580D000F12DE9B0051D689 /* RenderLayerBacking.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F580CFC0F12DE9B0051D689 /* RenderLayerBacking.cpp */; };
+ 0F5B7A5410F65D7A00376302 /* RenderEmbeddedObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5B7A5210F65D7A00376302 /* RenderEmbeddedObject.cpp */; };
+ 0F5B7A5510F65D7A00376302 /* RenderEmbeddedObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5B7A5310F65D7A00376302 /* RenderEmbeddedObject.h */; };
0F6ECD450F252F3700BDE271 /* CSSPropertyLonghand.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F6ECD430F252F3700BDE271 /* CSSPropertyLonghand.h */; };
0F6ECD460F252F3700BDE271 /* CSSPropertyLonghand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F6ECD440F252F3700BDE271 /* CSSPropertyLonghand.cpp */; };
0FC705210EB1815600B90AD8 /* AtomicStringHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC705200EB1815600B90AD8 /* AtomicStringHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -545,6 +558,7 @@
1CF6BE140E9BB4670025E1CD /* ObjCNodeFilterCondition.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1CF6BE120E9BB4670025E1CD /* ObjCNodeFilterCondition.mm */; };
1CF6BE150E9BB4670025E1CD /* ObjCNodeFilterCondition.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CF6BE130E9BB4670025E1CD /* ObjCNodeFilterCondition.h */; };
1CFAE3230A6D6A3F0032593D /* libobjc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CFAE3220A6D6A3F0032593D /* libobjc.dylib */; };
+ 228C284510D82500009D0D0E /* ScriptWrappable.h in Headers */ = {isa = PBXBuildFile; fileRef = 228C284410D82500009D0D0E /* ScriptWrappable.h */; settings = {ATTRIBUTES = (Private, ); }; };
24F54EAC101FE914000AE741 /* ApplicationCacheHost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 24F54EAA101FE914000AE741 /* ApplicationCacheHost.cpp */; };
24F54EAD101FE914000AE741 /* ApplicationCacheHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 24F54EAB101FE914000AE741 /* ApplicationCacheHost.h */; settings = {ATTRIBUTES = (); }; };
29A812260FBB9C1D00510293 /* AccessibilityRenderObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A812080FBB9C1D00510293 /* AccessibilityRenderObject.cpp */; };
@@ -582,6 +596,13 @@
29A8124B0FBB9CA900510293 /* AXObjectCacheMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29A812470FBB9CA900510293 /* AXObjectCacheMac.mm */; };
2D9066060BE141D400956998 /* LayoutState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9066040BE141D400956998 /* LayoutState.cpp */; };
2D9066070BE141D400956998 /* LayoutState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9066050BE141D400956998 /* LayoutState.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 2E2D99CD10E2BBDA00496337 /* JSBlob.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E2D99CB10E2BBDA00496337 /* JSBlob.cpp */; };
+ 2E2D99CE10E2BBDA00496337 /* JSBlob.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E2D99CC10E2BBDA00496337 /* JSBlob.h */; };
+ 2E2D99E710E2BC1C00496337 /* DOMBlob.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E2D99E510E2BC1C00496337 /* DOMBlob.h */; };
+ 2E2D99E810E2BC1C00496337 /* DOMBlob.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E2D99E610E2BC1C00496337 /* DOMBlob.mm */; };
+ 2E2D99EA10E2BC3800496337 /* DOMBlobInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E2D99E910E2BC3800496337 /* DOMBlobInternal.h */; };
+ 2E2D99EB10E2BD3900496337 /* DOMBlob.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 2E2D99E510E2BC1C00496337 /* DOMBlob.h */; };
+ 2E2D99EC10E2BD3900496337 /* DOMBlobInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 2E2D99E910E2BC3800496337 /* DOMBlobInternal.h */; };
2E4346440F546A8200B0F1BA /* GenericWorkerTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E4346320F546A8200B0F1BA /* GenericWorkerTask.h */; };
2E4346450F546A8200B0F1BA /* Worker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E4346330F546A8200B0F1BA /* Worker.cpp */; };
2E4346460F546A8200B0F1BA /* Worker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E4346340F546A8200B0F1BA /* Worker.h */; };
@@ -600,6 +621,8 @@
2E4346580F546A9900B0F1BA /* CrossThreadCopier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E4346560F546A9900B0F1BA /* CrossThreadCopier.cpp */; };
2E4346590F546A9900B0F1BA /* CrossThreadCopier.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E4346570F546A9900B0F1BA /* CrossThreadCopier.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 */; };
2ECF7ADC10162B3800427DE7 /* JSErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2ECF7ADA10162B3800427DE7 /* JSErrorEvent.cpp */; };
2ECF7ADD10162B3800427DE7 /* JSErrorEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2ECF7ADB10162B3800427DE7 /* JSErrorEvent.h */; };
2ECF7AE110162B5800427DE7 /* ErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2ECF7ADE10162B5800427DE7 /* ErrorEvent.cpp */; };
@@ -682,6 +705,7 @@
37C236111097EE7700EF9F72 /* ComplexTextController.h in Headers */ = {isa = PBXBuildFile; fileRef = 37C2360F1097EE7700EF9F72 /* ComplexTextController.h */; };
37C238211098C84200EF9F72 /* ComplexTextControllerATSUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37C2381F1098C84200EF9F72 /* ComplexTextControllerATSUI.cpp */; };
37C238221098C84200EF9F72 /* ComplexTextControllerCoreText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37C238201098C84200EF9F72 /* ComplexTextControllerCoreText.cpp */; };
+ 37C28A6810F659CC008C7813 /* TypesettingFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 37C28A6710F659CC008C7813 /* TypesettingFeatures.h */; settings = {ATTRIBUTES = (Private, ); }; };
37F818FD0D657606005E1F05 /* WebCoreURLResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 37F818FB0D657606005E1F05 /* WebCoreURLResponse.h */; settings = {ATTRIBUTES = (Private, ); }; };
37F818FE0D657606005E1F05 /* WebCoreURLResponse.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37F818FC0D657606005E1F05 /* WebCoreURLResponse.mm */; };
41002CCD0F66EDEF009E660D /* ScriptFunctionCall.h in Headers */ = {isa = PBXBuildFile; fileRef = 41002CCB0F66EDEF009E660D /* ScriptFunctionCall.h */; };
@@ -953,6 +977,11 @@
510D4A4E103177A20049EA54 /* WebSocketChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510D4A47103177A20049EA54 /* WebSocketChannel.cpp */; };
510D4A4F103177A20049EA54 /* WebSocketChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 510D4A48103177A20049EA54 /* WebSocketChannel.h */; };
510D4A50103177A20049EA54 /* WebSocketChannelClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 510D4A49103177A20049EA54 /* WebSocketChannelClient.h */; };
+ 5112247210CFB8C6008099D7 /* ThreadableWebSocketChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5112247110CFB8C6008099D7 /* ThreadableWebSocketChannel.cpp */; };
+ 5112247410CFB8D8008099D7 /* ThreadableWebSocketChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 5112247310CFB8D8008099D7 /* ThreadableWebSocketChannel.h */; };
+ 5112247610CFB8E8008099D7 /* ThreadableWebSocketChannelClientWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 5112247510CFB8E8008099D7 /* ThreadableWebSocketChannelClientWrapper.h */; };
+ 5112247810CFB8F4008099D7 /* WorkerThreadableWebSocketChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5112247710CFB8F4008099D7 /* WorkerThreadableWebSocketChannel.cpp */; };
+ 5112247A10CFB8FF008099D7 /* WorkerThreadableWebSocketChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 5112247910CFB8FF008099D7 /* WorkerThreadableWebSocketChannel.h */; };
5116D9770CF177BD00C2B84D /* DatabaseDetails.h in Headers */ = {isa = PBXBuildFile; fileRef = 5116D9750CF177BD00C2B84D /* DatabaseDetails.h */; settings = {ATTRIBUTES = (Private, ); }; };
511F23170DC160DA004F0032 /* LocalStorageTask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511F23130DC160DA004F0032 /* LocalStorageTask.cpp */; };
511F23180DC160DA004F0032 /* LocalStorageTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 511F23140DC160DA004F0032 /* LocalStorageTask.h */; };
@@ -1010,14 +1039,12 @@
5160300B0CC4251200C8AC25 /* FileSystemPOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5160300A0CC4251200C8AC25 /* FileSystemPOSIX.cpp */; };
5160306C0CC4362300C8AC25 /* FileSystemCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5160306B0CC4362300C8AC25 /* FileSystemCF.cpp */; };
5160F4980B0AA75F00C1D2AF /* HistoryItemMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5160F4970B0AA75F00C1D2AF /* HistoryItemMac.mm */; };
- 516BB7930CE91E6800512F79 /* JSSVGPointListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 516BB7910CE91E6800512F79 /* JSSVGPointListCustom.cpp */; };
516BB7940CE91E6800512F79 /* JSTreeWalkerCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 516BB7920CE91E6800512F79 /* JSTreeWalkerCustom.cpp */; };
51741D0F0B07259A00ED442C /* BackForwardList.h in Headers */ = {isa = PBXBuildFile; fileRef = 51741D0B0B07259A00ED442C /* BackForwardList.h */; settings = {ATTRIBUTES = (Private, ); }; };
51741D100B07259A00ED442C /* BackForwardList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51741D0C0B07259A00ED442C /* BackForwardList.cpp */; };
51741D110B07259A00ED442C /* HistoryItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 51741D0D0B07259A00ED442C /* HistoryItem.h */; settings = {ATTRIBUTES = (Private, ); }; };
51741D120B07259A00ED442C /* HistoryItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51741D0E0B07259A00ED442C /* HistoryItem.cpp */; };
5174E20A10A1F44F00F95E6F /* PopStateEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 5174E20810A1F44F00F95E6F /* PopStateEvent.h */; };
- 5174E20C10A1F49A00F95E6F /* PopStateEvent.idl in Resources */ = {isa = PBXBuildFile; fileRef = 5174E20B10A1F49A00F95E6F /* PopStateEvent.idl */; };
5189F01810B3781300F3C739 /* JSPopStateEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5189F01710B3781300F3C739 /* JSPopStateEventCustom.cpp */; };
5189F01D10B37BD900F3C739 /* JSPopStateEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5189F01B10B37BD900F3C739 /* JSPopStateEvent.cpp */; };
5189F01E10B37BD900F3C739 /* JSPopStateEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 5189F01C10B37BD900F3C739 /* JSPopStateEvent.h */; };
@@ -1099,8 +1126,11 @@
59B597731108656B007159E8 /* BridgeJSC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59B597721108656B007159E8 /* BridgeJSC.cpp */; };
59B5977511086579007159E8 /* BridgeJSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 59B5977411086579007159E8 /* BridgeJSC.h */; settings = {ATTRIBUTES = (Private, ); }; };
59BC393F11054A1300FD85DB /* JavaStringJSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 59BC393E11054A1300FD85DB /* JavaStringJSC.h */; };
+<<<<<<< HEAD
59BD83BA11199B9000E1B6A9 /* GeolocationPositionCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 59BD83B911199B9000E1B6A9 /* GeolocationPositionCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
59BD83BC11199B9C00E1B6A9 /* GeolocationPositionCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59BD83BB11199B9C00E1B6A9 /* GeolocationPositionCache.cpp */; };
+=======
+>>>>>>> webkit.org at r54127
59C77F2A10545B3B00506104 /* GeolocationServiceMock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59C77F2810545B3B00506104 /* GeolocationServiceMock.cpp */; };
59C77F2B10545B3B00506104 /* GeolocationServiceMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 59C77F2910545B3B00506104 /* GeolocationServiceMock.h */; settings = {ATTRIBUTES = (Private, ); }; };
59E560A71105336600AA1258 /* JavaClassJSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 59E560A61105336600AA1258 /* JavaClassJSC.h */; };
@@ -1152,7 +1182,6 @@
6565815109D13043000E61D7 /* CSSValueKeywords.h in Headers */ = {isa = PBXBuildFile; fileRef = 6565814809D13043000E61D7 /* CSSValueKeywords.h */; };
656581B209D14EE6000E61D7 /* UserAgentStyleSheets.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581AE09D14EE6000E61D7 /* UserAgentStyleSheets.h */; };
656581FE09D1508D000E61D7 /* SVGElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581E709D1508D000E61D7 /* SVGElementFactory.h */; };
- 6565820009D1508D000E61D7 /* SVGNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581E909D1508D000E61D7 /* SVGNames.h */; };
6565820209D1508D000E61D7 /* XLinkNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581EB09D1508D000E61D7 /* XLinkNames.h */; };
656D37320ADBA5DE00A4554D /* LoaderNSURLExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 656D371A0ADBA5DE00A4554D /* LoaderNSURLExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
656D37330ADBA5DE00A4554D /* LoaderNSURLExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 656D371B0ADBA5DE00A4554D /* LoaderNSURLExtras.mm */; };
@@ -1219,6 +1248,12 @@
65FEA86909833ADE00BED4AB /* Page.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65FEA86809833ADE00BED4AB /* Page.cpp */; };
6E47E66010B7944B00B186C8 /* WebGLGetInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E47E65E10B7944B00B186C8 /* WebGLGetInfo.cpp */; };
6E47E66110B7944B00B186C8 /* WebGLGetInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E47E65F10B7944B00B186C8 /* WebGLGetInfo.h */; };
+ 6E4E91AC10F7FB3100A2779C /* CanvasContextAttributes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E4E91A710F7FB3100A2779C /* CanvasContextAttributes.cpp */; };
+ 6E4E91AD10F7FB3100A2779C /* CanvasContextAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E4E91A810F7FB3100A2779C /* CanvasContextAttributes.h */; };
+ 6E4E91AE10F7FB3100A2779C /* WebGLContextAttributes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E4E91A910F7FB3100A2779C /* WebGLContextAttributes.cpp */; };
+ 6E4E91AF10F7FB3100A2779C /* WebGLContextAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E4E91AA10F7FB3100A2779C /* WebGLContextAttributes.h */; };
+ 6EE8A77210F803F3005A4A24 /* JSWebGLContextAttributes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6EE8A77010F803F3005A4A24 /* JSWebGLContextAttributes.cpp */; };
+ 6EE8A77310F803F3005A4A24 /* JSWebGLContextAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE8A77110F803F3005A4A24 /* JSWebGLContextAttributes.h */; };
72626E020EF022FE00A07E20 /* FontFastPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 72626E010EF022FE00A07E20 /* FontFastPath.cpp */; };
754133A8102E00E800075D00 /* InspectorTimelineAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 754133A7102E00E800075D00 /* InspectorTimelineAgent.h */; };
754133AA102E00F400075D00 /* InspectorTimelineAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 754133A9102E00F400075D00 /* InspectorTimelineAgent.cpp */; };
@@ -1235,6 +1270,12 @@
7693BAD3106C2DCA007B0823 /* PluginHalter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7693BACF106C2DCA007B0823 /* PluginHalter.cpp */; };
7693BAD4106C2DCA007B0823 /* PluginHalter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7693BAD0106C2DCA007B0823 /* PluginHalter.h */; };
7693BAD5106C2DCA007B0823 /* PluginHalterClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7693BAD1106C2DCA007B0823 /* PluginHalterClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 76CDD2F21103DA6600680521 /* AccessibilityMenuList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76CDD2EC1103DA6600680521 /* AccessibilityMenuList.cpp */; };
+ 76CDD2F31103DA6600680521 /* AccessibilityMenuList.h in Headers */ = {isa = PBXBuildFile; fileRef = 76CDD2ED1103DA6600680521 /* AccessibilityMenuList.h */; };
+ 76CDD2F41103DA6600680521 /* AccessibilityMenuListPopup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76CDD2EE1103DA6600680521 /* AccessibilityMenuListPopup.cpp */; };
+ 76CDD2F51103DA6600680521 /* AccessibilityMenuListPopup.h in Headers */ = {isa = PBXBuildFile; fileRef = 76CDD2EF1103DA6600680521 /* AccessibilityMenuListPopup.h */; };
+ 76CDD2F61103DA6600680521 /* AccessibilityMenuListOption.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76CDD2F01103DA6600680521 /* AccessibilityMenuListOption.cpp */; };
+ 76CDD2F71103DA6600680521 /* AccessibilityMenuListOption.h in Headers */ = {isa = PBXBuildFile; fileRef = 76CDD2F11103DA6600680521 /* AccessibilityMenuListOption.h */; };
79AC9218109945C80021266E /* JSCompositionEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 79AC9216109945C80021266E /* JSCompositionEvent.cpp */; };
79AC9219109945C80021266E /* JSCompositionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 79AC9217109945C80021266E /* JSCompositionEvent.h */; };
79F2F5A11091939A000D87CB /* CompositionEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 79F2F59E1091939A000D87CB /* CompositionEvent.cpp */; };
@@ -1251,13 +1292,13 @@
7A1E88F5101CC384000C4DF5 /* ScriptArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A1E88F3101CC384000C4DF5 /* ScriptArray.cpp */; };
7A1E88F6101CC384000C4DF5 /* ScriptArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A1E88F4101CC384000C4DF5 /* ScriptArray.h */; settings = {ATTRIBUTES = (Private, ); }; };
7A24587B1021EAF4000A00AA /* InspectorDOMAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A2458791021EAF4000A00AA /* InspectorDOMAgent.cpp */; };
- 7A24587C1021EAF4000A00AA /* InspectorDOMAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A24587A1021EAF4000A00AA /* InspectorDOMAgent.h */; };
+ 7A24587C1021EAF4000A00AA /* InspectorDOMAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A24587A1021EAF4000A00AA /* InspectorDOMAgent.h */; settings = {ATTRIBUTES = (Private, ); }; };
7A674BDB0F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A674BD90F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp */; };
7A674BDC0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A674BDA0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h */; };
7A74ECBA101839A600BF939E /* InspectorBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A74ECB8101839A500BF939E /* InspectorBackend.cpp */; };
7A74ECBB101839A600BF939E /* InspectorBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A74ECB9101839A600BF939E /* InspectorBackend.h */; };
7A74ECBD101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A74ECBC101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp */; };
- 7ADE722610CBBB9B006B3B3A /* ContextMenuSelectionHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ADE722510CBBB9B006B3B3A /* ContextMenuSelectionHandler.h */; };
+ 7ADE722610CBBB9B006B3B3A /* ContextMenuProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ADE722510CBBB9B006B3B3A /* ContextMenuProvider.h */; };
7AED3E050FBB1EAA00D2B03C /* InspectorFrontend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AED3E030FBB1EAA00D2B03C /* InspectorFrontend.cpp */; };
7AED3E060FBB1EAA00D2B03C /* InspectorFrontend.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AED3E040FBB1EAA00D2B03C /* InspectorFrontend.h */; };
84224183107E77F400766A87 /* JSSVGFEMorphologyElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84224181107E77F400766A87 /* JSSVGFEMorphologyElement.cpp */; };
@@ -2259,7 +2300,7 @@
935C476309AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476209AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h */; };
935C476809AC4D4300A6AAB4 /* PlatformKeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476609AC4D4300A6AAB4 /* PlatformKeyboardEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
935C476909AC4D4300A6AAB4 /* PlatformMouseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476709AC4D4300A6AAB4 /* PlatformMouseEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 935C476B09AC4D4F00A6AAB4 /* PlatformWheelEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476A09AC4D4F00A6AAB4 /* PlatformWheelEvent.h */; };
+ 935C476B09AC4D4F00A6AAB4 /* PlatformWheelEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476A09AC4D4F00A6AAB4 /* PlatformWheelEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
935C476D09AC4D6300A6AAB4 /* FoundationExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476C09AC4D6300A6AAB4 /* FoundationExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
935C477009AC4D7300A6AAB4 /* KeyEventMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 935C476E09AC4D7300A6AAB4 /* KeyEventMac.mm */; };
935C477109AC4D7300A6AAB4 /* PlatformMouseEventMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 935C476F09AC4D7300A6AAB4 /* PlatformMouseEventMac.mm */; };
@@ -2320,6 +2361,8 @@
93C441EF0F813A1A00C1A634 /* CollectionCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93C441ED0F813A1A00C1A634 /* CollectionCache.cpp */; };
93C441F00F813A1A00C1A634 /* CollectionCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C441EE0F813A1A00C1A634 /* CollectionCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
93C442000F813AE100C1A634 /* CollectionType.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C441FF0F813AE100C1A634 /* CollectionType.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 93C4F6EA1108F9A50099D0DB /* AccessibilityScrollbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93C4F6E81108F9A50099D0DB /* AccessibilityScrollbar.cpp */; };
+ 93C4F6EB1108F9A50099D0DB /* AccessibilityScrollbar.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C4F6E91108F9A50099D0DB /* AccessibilityScrollbar.h */; };
93C841F809CE855C00DFF5E5 /* DOMImplementationFront.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C841F709CE855C00DFF5E5 /* DOMImplementationFront.h */; };
93C841FF09CE858300DFF5E5 /* DOMImplementationFront.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93C841FE09CE858300DFF5E5 /* DOMImplementationFront.cpp */; };
93CCF0270AF6C52900018E89 /* NavigationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CCF0260AF6C52900018E89 /* NavigationAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -3331,7 +3374,7 @@
B22279730D00BF220071B782 /* SVGAElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22277DD0D00BF1F0071B782 /* SVGAElement.cpp */; };
B22279740D00BF220071B782 /* SVGAElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22277DE0D00BF1F0071B782 /* SVGAElement.h */; };
B22279760D00BF220071B782 /* SVGAngle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22277E00D00BF1F0071B782 /* SVGAngle.cpp */; };
- B22279770D00BF220071B782 /* SVGAngle.h in Headers */ = {isa = PBXBuildFile; fileRef = B22277E10D00BF1F0071B782 /* SVGAngle.h */; };
+ B22279770D00BF220071B782 /* SVGAngle.h in Headers */ = {isa = PBXBuildFile; fileRef = B22277E10D00BF1F0071B782 /* SVGAngle.h */; settings = {ATTRIBUTES = (Private, ); }; };
B22279790D00BF220071B782 /* SVGAnimateColorElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22277E30D00BF1F0071B782 /* SVGAnimateColorElement.cpp */; };
B222797A0D00BF220071B782 /* SVGAnimateColorElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22277E40D00BF1F0071B782 /* SVGAnimateColorElement.h */; };
B22279840D00BF220071B782 /* SVGAnimatedPathData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22277EE0D00BF1F0071B782 /* SVGAnimatedPathData.cpp */; };
@@ -3449,13 +3492,13 @@
B2227A320D00BF220071B782 /* SVGLength.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B222789C0D00BF200071B782 /* SVGLength.cpp */; };
B2227A330D00BF220071B782 /* SVGLength.h in Headers */ = {isa = PBXBuildFile; fileRef = B222789D0D00BF200071B782 /* SVGLength.h */; settings = {ATTRIBUTES = (Private, ); }; };
B2227A350D00BF220071B782 /* SVGLengthList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B222789F0D00BF200071B782 /* SVGLengthList.cpp */; };
- B2227A360D00BF220071B782 /* SVGLengthList.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278A00D00BF200071B782 /* SVGLengthList.h */; };
+ B2227A360D00BF220071B782 /* SVGLengthList.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278A00D00BF200071B782 /* SVGLengthList.h */; settings = {ATTRIBUTES = (Private, ); }; };
B2227A380D00BF220071B782 /* SVGLinearGradientElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22278A20D00BF200071B782 /* SVGLinearGradientElement.cpp */; };
B2227A390D00BF220071B782 /* SVGLinearGradientElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278A30D00BF200071B782 /* SVGLinearGradientElement.h */; };
B2227A3B0D00BF220071B782 /* SVGLineElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22278A50D00BF200071B782 /* SVGLineElement.cpp */; };
B2227A3C0D00BF220071B782 /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278A60D00BF200071B782 /* SVGLineElement.h */; };
- B2227A3E0D00BF220071B782 /* SVGList.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278A80D00BF200071B782 /* SVGList.h */; };
- B2227A3F0D00BF220071B782 /* SVGListTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278A90D00BF200071B782 /* SVGListTraits.h */; };
+ B2227A3E0D00BF220071B782 /* SVGList.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278A80D00BF200071B782 /* SVGList.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ B2227A3F0D00BF220071B782 /* SVGListTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278A90D00BF200071B782 /* SVGListTraits.h */; settings = {ATTRIBUTES = (Private, ); }; };
B2227A400D00BF220071B782 /* SVGLocatable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22278AA0D00BF200071B782 /* SVGLocatable.cpp */; };
B2227A410D00BF220071B782 /* SVGLocatable.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278AB0D00BF200071B782 /* SVGLocatable.h */; };
B2227A430D00BF220071B782 /* SVGMarkerElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22278AD0D00BF200071B782 /* SVGMarkerElement.cpp */; };
@@ -3467,7 +3510,7 @@
B2227A4D0D00BF220071B782 /* SVGMPathElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22278B70D00BF200071B782 /* SVGMPathElement.cpp */; };
B2227A4E0D00BF220071B782 /* SVGMPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278B80D00BF200071B782 /* SVGMPathElement.h */; };
B2227A500D00BF220071B782 /* SVGNumberList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22278BA0D00BF200071B782 /* SVGNumberList.cpp */; };
- B2227A510D00BF220071B782 /* SVGNumberList.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278BB0D00BF200071B782 /* SVGNumberList.h */; };
+ B2227A510D00BF220071B782 /* SVGNumberList.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278BB0D00BF200071B782 /* SVGNumberList.h */; settings = {ATTRIBUTES = (Private, ); }; };
B2227A530D00BF220071B782 /* SVGPaint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22278BD0D00BF200071B782 /* SVGPaint.cpp */; };
B2227A540D00BF220071B782 /* SVGPaint.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278BE0D00BF200071B782 /* SVGPaint.h */; settings = {ATTRIBUTES = (Private, ); }; };
B2227A560D00BF220071B782 /* SVGParserUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22278C00D00BF200071B782 /* SVGParserUtilities.cpp */; };
@@ -3508,7 +3551,7 @@
B2227A930D00BF220071B782 /* SVGPolylineElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22278FD0D00BF210071B782 /* SVGPolylineElement.cpp */; };
B2227A940D00BF220071B782 /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278FE0D00BF210071B782 /* SVGPolylineElement.h */; };
B2227A960D00BF220071B782 /* SVGPreserveAspectRatio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22279000D00BF210071B782 /* SVGPreserveAspectRatio.cpp */; };
- B2227A970D00BF220071B782 /* SVGPreserveAspectRatio.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279010D00BF210071B782 /* SVGPreserveAspectRatio.h */; };
+ B2227A970D00BF220071B782 /* SVGPreserveAspectRatio.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279010D00BF210071B782 /* SVGPreserveAspectRatio.h */; settings = {ATTRIBUTES = (Private, ); }; };
B2227A990D00BF220071B782 /* SVGRadialGradientElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22279030D00BF210071B782 /* SVGRadialGradientElement.cpp */; };
B2227A9A0D00BF220071B782 /* SVGRadialGradientElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279040D00BF210071B782 /* SVGRadialGradientElement.h */; };
B2227A9D0D00BF220071B782 /* SVGRectElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22279070D00BF210071B782 /* SVGRectElement.cpp */; };
@@ -3551,13 +3594,13 @@
B2227AD30D00BF220071B782 /* SVGTitleElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B222793D0D00BF210071B782 /* SVGTitleElement.cpp */; };
B2227AD40D00BF220071B782 /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B222793E0D00BF210071B782 /* SVGTitleElement.h */; };
B2227AD60D00BF220071B782 /* SVGTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22279400D00BF210071B782 /* SVGTransform.cpp */; };
- B2227AD70D00BF220071B782 /* SVGTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279410D00BF210071B782 /* SVGTransform.h */; };
+ B2227AD70D00BF220071B782 /* SVGTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279410D00BF210071B782 /* SVGTransform.h */; settings = {ATTRIBUTES = (Private, ); }; };
B2227AD90D00BF220071B782 /* SVGTransformable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22279430D00BF210071B782 /* SVGTransformable.cpp */; };
B2227ADA0D00BF220071B782 /* SVGTransformable.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279440D00BF210071B782 /* SVGTransformable.h */; };
B2227ADC0D00BF220071B782 /* SVGTransformDistance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22279460D00BF210071B782 /* SVGTransformDistance.cpp */; };
B2227ADD0D00BF220071B782 /* SVGTransformDistance.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279470D00BF210071B782 /* SVGTransformDistance.h */; };
B2227ADE0D00BF220071B782 /* SVGTransformList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22279480D00BF210071B782 /* SVGTransformList.cpp */; };
- B2227ADF0D00BF220071B782 /* SVGTransformList.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279490D00BF210071B782 /* SVGTransformList.h */; };
+ B2227ADF0D00BF220071B782 /* SVGTransformList.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279490D00BF210071B782 /* SVGTransformList.h */; settings = {ATTRIBUTES = (Private, ); }; };
B2227AE10D00BF220071B782 /* SVGTRefElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B222794B0D00BF210071B782 /* SVGTRefElement.cpp */; };
B2227AE20D00BF220071B782 /* SVGTRefElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B222794C0D00BF210071B782 /* SVGTRefElement.h */; };
B2227AE40D00BF220071B782 /* SVGTSpanElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B222794E0D00BF210071B782 /* SVGTSpanElement.cpp */; };
@@ -3820,7 +3863,6 @@
B2CB92640B5BDA02009BAA78 /* DOMSVGElementInstanceList.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2CB92600B5BDA02009BAA78 /* DOMSVGElementInstanceList.mm */; };
B2CCEC470C6CA9F1006A5424 /* RenderSVGViewportContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2CCEC450C6CA9F1006A5424 /* RenderSVGViewportContainer.cpp */; };
B2CCEC480C6CA9F1006A5424 /* RenderSVGViewportContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = B2CCEC460C6CA9F1006A5424 /* RenderSVGViewportContainer.h */; };
- B2D3FC8A0C2212CB00CF3618 /* JSSVGTransformListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2D3FC890C2212CB00CF3618 /* JSSVGTransformListCustom.cpp */; };
B2E27C9F0B0F2B0900F17C7B /* FloatPoint3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2E27C9D0B0F2B0900F17C7B /* FloatPoint3D.cpp */; };
B2E27CA00B0F2B0900F17C7B /* FloatPoint3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E27C9E0B0F2B0900F17C7B /* FloatPoint3D.h */; settings = {ATTRIBUTES = (Private, ); }; };
B2E4EC970D00C22B00432643 /* SVGZoomEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2E4EC940D00C22B00432643 /* SVGZoomEvent.cpp */; };
@@ -4196,10 +4238,17 @@
BC53C60B0DA56CF10021EB5D /* GradientCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC53C60A0DA56CF10021EB5D /* GradientCG.cpp */; };
BC53C6920DA591140021EB5D /* CSSGradientValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC53C6910DA591140021EB5D /* CSSGradientValue.h */; };
BC56CB2110D5AC8000A77C64 /* GeolocationController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC56CB1C10D5AC8000A77C64 /* GeolocationController.cpp */; };
+<<<<<<< HEAD
BC56CB2210D5AC8000A77C64 /* GeolocationController.h in Headers */ = {isa = PBXBuildFile; fileRef = BC56CB1D10D5AC8000A77C64 /* GeolocationController.h */; };
BC56CB2310D5AC8000A77C64 /* GeolocationControllerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BC56CB1E10D5AC8000A77C64 /* GeolocationControllerClient.h */; };
BC56CB2410D5AC8000A77C64 /* GeolocationError.h in Headers */ = {isa = PBXBuildFile; fileRef = BC56CB1F10D5AC8000A77C64 /* GeolocationError.h */; };
BC56CB2510D5AC8000A77C64 /* GeolocationPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = BC56CB2010D5AC8000A77C64 /* GeolocationPosition.h */; };
+=======
+ BC56CB2210D5AC8000A77C64 /* GeolocationController.h in Headers */ = {isa = PBXBuildFile; fileRef = BC56CB1D10D5AC8000A77C64 /* GeolocationController.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ BC56CB2310D5AC8000A77C64 /* GeolocationControllerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BC56CB1E10D5AC8000A77C64 /* GeolocationControllerClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ BC56CB2410D5AC8000A77C64 /* GeolocationError.h in Headers */ = {isa = PBXBuildFile; fileRef = BC56CB1F10D5AC8000A77C64 /* GeolocationError.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ BC56CB2510D5AC8000A77C64 /* GeolocationPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = BC56CB2010D5AC8000A77C64 /* GeolocationPosition.h */; settings = {ATTRIBUTES = (Private, ); }; };
+>>>>>>> webkit.org at r54127
BC5823F50C0A98DF0053F1B5 /* JSHTMLElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC5823F40C0A98DF0053F1B5 /* JSHTMLElementCustom.cpp */; };
BC5825F30C0B89380053F1B5 /* JSCSSStyleDeclarationCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC5825F20C0B89380053F1B5 /* JSCSSStyleDeclarationCustom.cpp */; };
BC588AF00BFA6CF900EE679E /* HTMLParserErrorCodes.h in Headers */ = {isa = PBXBuildFile; fileRef = BC588AEF0BFA6CF900EE679E /* HTMLParserErrorCodes.h */; };
@@ -4577,12 +4626,6 @@
BCFE2F120C1B58380020235F /* JSRect.h in Headers */ = {isa = PBXBuildFile; fileRef = BCFE2F100C1B58370020235F /* JSRect.h */; };
BCFF64910EAD15C200C1D6F7 /* LengthBox.h in Headers */ = {isa = PBXBuildFile; fileRef = BCFF648F0EAD15C200C1D6F7 /* LengthBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCFF64920EAD15C200C1D6F7 /* LengthSize.h in Headers */ = {isa = PBXBuildFile; fileRef = BCFF64900EAD15C200C1D6F7 /* LengthSize.h */; settings = {ATTRIBUTES = (Private, ); }; };
- C091588A0DB4209200E55AF4 /* JSInspectedObjectWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C09158840DB4209200E55AF4 /* JSInspectedObjectWrapper.cpp */; };
- C091588B0DB4209200E55AF4 /* JSInspectedObjectWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = C09158850DB4209200E55AF4 /* JSInspectedObjectWrapper.h */; };
- C091588C0DB4209200E55AF4 /* JSInspectorCallbackWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C09158860DB4209200E55AF4 /* JSInspectorCallbackWrapper.cpp */; };
- C091588D0DB4209200E55AF4 /* JSInspectorCallbackWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = C09158870DB4209200E55AF4 /* JSInspectorCallbackWrapper.h */; };
- C091588E0DB4209200E55AF4 /* JSQuarantinedObjectWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C09158880DB4209200E55AF4 /* JSQuarantinedObjectWrapper.cpp */; };
- C091588F0DB4209200E55AF4 /* JSQuarantinedObjectWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = C09158890DB4209200E55AF4 /* JSQuarantinedObjectWrapper.h */; };
C0DFC8700DB6841A003EAE7C /* JSConsoleCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0DFC86F0DB6841A003EAE7C /* JSConsoleCustom.cpp */; };
C105DA620F3AA68F001DD44F /* TextEncodingDetectorICU.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C105DA610F3AA68F001DD44F /* TextEncodingDetectorICU.cpp */; };
C105DA640F3AA6B8001DD44F /* TextEncodingDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = C105DA630F3AA6B8001DD44F /* TextEncodingDetector.h */; };
@@ -4600,6 +4643,8 @@
C5EBDD84105EDDEC0056816F /* StorageEventDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = C5EBDD81105EDDEC0056816F /* StorageEventDispatcher.h */; };
C6D74AD509AA282E000B0A52 /* ModifySelectionListLevel.h in Headers */ = {isa = PBXBuildFile; fileRef = C6D74AD309AA282E000B0A52 /* ModifySelectionListLevel.h */; };
C6D74AE409AA290A000B0A52 /* ModifySelectionListLevel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6D74AE309AA290A000B0A52 /* ModifySelectionListLevel.cpp */; };
+ CE4C00E410F6F7BA00CA38F5 /* HTMLNoScriptElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE4C00E310F6F7BA00CA38F5 /* HTMLNoScriptElement.cpp */; };
+ CE4C00E610F6F7C100CA38F5 /* HTMLNoScriptElement.h in Headers */ = {isa = PBXBuildFile; fileRef = CE4C00E510F6F7C100CA38F5 /* HTMLNoScriptElement.h */; };
CE54FD381016D9A6008B44C8 /* ScriptSourceProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = CE54FD371016D9A6008B44C8 /* ScriptSourceProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
D01A27AD10C9BFD800026A42 /* SpaceSplitString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D01A27AB10C9BFD800026A42 /* SpaceSplitString.cpp */; };
D01A27AE10C9BFD800026A42 /* SpaceSplitString.h in Headers */ = {isa = PBXBuildFile; fileRef = D01A27AC10C9BFD800026A42 /* SpaceSplitString.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -4657,11 +4702,14 @@
E1284BD61044A01E00EAEB52 /* DOMPageTransitionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = E1284BD41044A01E00EAEB52 /* DOMPageTransitionEvent.h */; };
E12EDB7B0B308A78002704B6 /* EventTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = E12EDB7A0B308A78002704B6 /* EventTarget.h */; settings = {ATTRIBUTES = (Private, ); }; };
E12EDBEA0B308E0B002704B6 /* EventTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12EDBE90B308E0B002704B6 /* EventTarget.cpp */; };
+ E15A36D71104572000B7B639 /* XMLNSNames.h in Headers */ = {isa = PBXBuildFile; fileRef = E15A36D61104572000B7B639 /* XMLNSNames.h */; };
+ E15A36D91104572700B7B639 /* XMLNSNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E15A36D81104572700B7B639 /* XMLNSNames.cpp */; };
E17A4A1B0D97991D00FC10C6 /* DOMSVGAltGlyphElement.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 65AA6BAC0D974A00000541AE /* DOMSVGAltGlyphElement.h */; };
E17A4A1C0D97991D00FC10C6 /* DOMSVGAltGlyphElementInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 65AA6BAE0D974A00000541AE /* DOMSVGAltGlyphElementInternal.h */; };
E182568F0EF2B02D00933242 /* JSWorkerContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E182568D0EF2B02D00933242 /* JSWorkerContext.cpp */; };
E18256900EF2B02D00933242 /* JSWorkerContext.h in Headers */ = {isa = PBXBuildFile; fileRef = E182568E0EF2B02D00933242 /* JSWorkerContext.h */; };
E18258AC0EF3CD7000933242 /* JSWorkerContextCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E18258AB0EF3CD7000933242 /* JSWorkerContextCustom.cpp */; };
+ E1A1470811102B1500EEC0F3 /* ContainerNodeAlgorithms.h in Headers */ = {isa = PBXBuildFile; fileRef = E1A1470711102B1500EEC0F3 /* ContainerNodeAlgorithms.h */; };
E1A302BC0DE8370300C52F2C /* StringBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = E1A302BB0DE8370300C52F2C /* StringBuilder.h */; };
E1A302C10DE8376900C52F2C /* StringBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1A302C00DE8376900C52F2C /* StringBuilder.cpp */; };
E1A5F99B0E7EAA2500AF85EA /* JSMessageChannelCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1A5F99A0E7EAA2500AF85EA /* JSMessageChannelCustom.cpp */; };
@@ -4776,11 +4824,17 @@
F5C041E50FFCA96D00839D4A /* DOMHTMLDataListElementInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C041E00FFCA96D00839D4A /* DOMHTMLDataListElementInternal.h */; };
F5C041E60FFCA96D00839D4A /* JSHTMLDataListElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5C041E10FFCA96D00839D4A /* JSHTMLDataListElement.cpp */; };
F5C041E70FFCA96D00839D4A /* JSHTMLDataListElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C041E20FFCA96D00839D4A /* JSHTMLDataListElement.h */; };
- F5D3A57C106B83B300545297 /* ISODateTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D3A57A106B83B300545297 /* ISODateTime.cpp */; };
- F5D3A57D106B83B300545297 /* ISODateTime.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D3A57B106B83B300545297 /* ISODateTime.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ F5D3A57C106B83B300545297 /* DateComponents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D3A57A106B83B300545297 /* DateComponents.cpp */; };
+ F5D3A57D106B83B300545297 /* DateComponents.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D3A57B106B83B300545297 /* DateComponents.h */; settings = {ATTRIBUTES = (Private, ); }; };
F916C48D0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F916C48B0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp */; };
F916C48E0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = F916C48C0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.h */; };
F9F0ED7A0DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = F9F0ED770DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.h */; };
+ FA654A641108ABB7002615E0 /* mathml.css in Resources */ = {isa = PBXBuildFile; fileRef = FA654A631108ABB7002615E0 /* mathml.css */; };
+ FA654A681108ABE2002615E0 /* mathattrs.in in Resources */ = {isa = PBXBuildFile; fileRef = FA654A671108ABE2002615E0 /* mathattrs.in */; };
+ FA654A6B1108ABED002615E0 /* MathMLTextElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA654A691108ABED002615E0 /* MathMLTextElement.cpp */; };
+ FA654A6C1108ABED002615E0 /* MathMLTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FA654A6A1108ABED002615E0 /* MathMLTextElement.h */; };
+ FA654A6F1108ABFF002615E0 /* RenderMathMLBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA654A6D1108ABFF002615E0 /* RenderMathMLBlock.cpp */; };
+ FA654A701108ABFF002615E0 /* RenderMathMLBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = FA654A6E1108ABFF002615E0 /* RenderMathMLBlock.h */; };
FABE72F41059C1EB00D999DD /* MathMLElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABE72ED1059C1EB00D999DD /* MathMLElement.cpp */; };
FABE72F51059C1EB00D999DD /* MathMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FABE72EE1059C1EB00D999DD /* MathMLElement.h */; };
FABE72F61059C1EB00D999DD /* MathMLInlineContainerElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABE72EF1059C1EB00D999DD /* MathMLInlineContainerElement.cpp */; };
@@ -4832,10 +4886,11 @@
dstPath = Versions/A/PrivateHeaders;
dstSubfolderSpec = 1;
files = (
- 1CCA732210ADD44A00FD440D /* DOMHTMLInputElementPrivate.h in Copy Generated Headers */,
5DF7F5C20F01F92A00526B4B /* CSSPropertyNames.h in Copy Generated Headers */,
8538F0300AD71CDB006A81D1 /* DOMAbstractView.h in Copy Generated Headers */,
1C11CCBC0AA6093700DADB20 /* DOMAttr.h in Copy Generated Headers */,
+ 2E2D99EB10E2BD3900496337 /* DOMBlob.h in Copy Generated Headers */,
+ 2E2D99EC10E2BD3900496337 /* DOMBlobInternal.h in Copy Generated Headers */,
1C11CCC70AA6093700DADB20 /* DOMCDATASection.h in Copy Generated Headers */,
1C11CCC50AA6093700DADB20 /* DOMCharacterData.h in Copy Generated Headers */,
1C11CCB60AA6093700DADB20 /* DOMComment.h in Copy Generated Headers */,
@@ -4906,6 +4961,7 @@
85DF812E0AA778A300486AD7 /* DOMHTMLImageElement.h in Copy Generated Headers */,
85F32B400AA6401A00FF3184 /* DOMHTMLInputElement.h in Copy Generated Headers */,
6596F2B30B8731DF001326BD /* DOMHTMLInputElementInternal.h in Copy Generated Headers */,
+ 1CCA732210ADD44A00FD440D /* DOMHTMLInputElementPrivate.h in Copy Generated Headers */,
8575DF820AA612D600F5DBB5 /* DOMHTMLIsIndexElement.h in Copy Generated Headers */,
85BA4CE70AA686510088052D /* DOMHTMLLabelElement.h in Copy Generated Headers */,
85BA4CE80AA686510088052D /* DOMHTMLLegendElement.h in Copy Generated Headers */,
@@ -5234,6 +5290,7 @@
A8D06B390A265DCD005E7203 /* HTMLNames.h in Copy Generated Headers */,
1403BA0F09EB18F900797C7F /* JSDOMWindow.h in Copy Generated Headers */,
14DC0D3809FED073007B0235 /* JSNode.h in Copy Generated Headers */,
+ 08C7A2C710DC7462002D368B /* SVGNames.h in Copy Generated Headers */,
);
name = "Copy Generated Headers";
runOnlyForDeploymentPostprocessing = 0;
@@ -5277,6 +5334,7 @@
080FAE190EEEBDA800AACDE9 /* WMLTemplateElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLTemplateElement.h; sourceTree = "<group>"; };
0818AEE00EDB86BC00647B66 /* WMLEventHandlingElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLEventHandlingElement.cpp; sourceTree = "<group>"; };
0818AEE10EDB86BC00647B66 /* WMLEventHandlingElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLEventHandlingElement.h; sourceTree = "<group>"; };
+ 081AA8D91111237E002AB06E /* SVGElementRareData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElementRareData.h; sourceTree = "<group>"; };
081D812F0EE0E74D00D73689 /* WMLTimerElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLTimerElement.cpp; sourceTree = "<group>"; };
081D81300EE0E74D00D73689 /* WMLTimerElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLTimerElement.h; sourceTree = "<group>"; };
081EBF380FD34F4100DA7559 /* SVGFilterBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFilterBuilder.cpp; sourceTree = "<group>"; };
@@ -5285,6 +5343,8 @@
08203A9E0ED8C35300B8B61A /* WMLAccessElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLAccessElement.h; sourceTree = "<group>"; };
082341C30FCF3A9400D75BD6 /* WMLSelectElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLSelectElement.cpp; sourceTree = "<group>"; };
082341C40FCF3A9400D75BD6 /* WMLSelectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLSelectElement.h; sourceTree = "<group>"; };
+ 082FCAC3110927CE00CC4821 /* JSSVGContextCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSVGContextCache.h; sourceTree = "<group>"; };
+ 08385FF510F0186000BFE07B /* SVGMarkerData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMarkerData.h; sourceTree = "<group>"; };
083DAEA20F01A7FB00342754 /* RenderTextControlMultiLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTextControlMultiLine.cpp; sourceTree = "<group>"; };
083DAEA30F01A7FB00342754 /* RenderTextControlMultiLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderTextControlMultiLine.h; sourceTree = "<group>"; };
083DAEA40F01A7FB00342754 /* RenderTextControlSingleLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTextControlSingleLine.cpp; sourceTree = "<group>"; };
@@ -5295,6 +5355,8 @@
084CE5C80F27DADC00E6240E /* WMLOptGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLOptGroupElement.h; sourceTree = "<group>"; };
084CE5C90F27DADC00E6240E /* WMLOptionElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLOptionElement.cpp; sourceTree = "<group>"; };
084CE5CA0F27DADC00E6240E /* WMLOptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLOptionElement.h; sourceTree = "<group>"; };
+ 084D2831110A7FCB0038239A /* SVGAnimatedPropertySynchronizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertySynchronizer.h; sourceTree = "<group>"; };
+ 084D2832110A7FCB0038239A /* SVGAnimatedPropertyTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertyTraits.h; sourceTree = "<group>"; };
084DBA9D0ED39D350038C226 /* WMLVariables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLVariables.cpp; sourceTree = "<group>"; };
084DBA9E0ED39D360038C226 /* WMLVariables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLVariables.h; sourceTree = "<group>"; };
08591AA40F085C4E009BACB1 /* InputElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InputElement.h; sourceTree = "<group>"; };
@@ -5309,12 +5371,12 @@
087281520F26B9B600AFC596 /* OptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionElement.h; sourceTree = "<group>"; };
087281530F26B9B600AFC596 /* OptionGroupElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OptionGroupElement.cpp; sourceTree = "<group>"; };
087281540F26B9B600AFC596 /* OptionGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionGroupElement.h; sourceTree = "<group>"; };
+ 08735FB610E91232006D6FAD /* SVGMarkerLayoutInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGMarkerLayoutInfo.cpp; sourceTree = "<group>"; };
+ 08735FB710E91232006D6FAD /* SVGMarkerLayoutInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMarkerLayoutInfo.h; sourceTree = "<group>"; };
08744BA90EDB7D86004C9E63 /* WMLOnEventElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLOnEventElement.cpp; sourceTree = "<group>"; };
08744BAD0EDB7D92004C9E63 /* WMLOnEventElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLOnEventElement.h; sourceTree = "<group>"; };
0878B1F910874E3F00A55097 /* SVGAnimatedProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedProperty.h; sourceTree = "<group>"; };
- 0878B1FA10874E3F00A55097 /* SynchronizablePropertyController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SynchronizablePropertyController.cpp; sourceTree = "<group>"; };
- 0878B1FB10874E3F00A55097 /* SynchronizablePropertyController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SynchronizablePropertyController.h; sourceTree = "<group>"; };
- 0878B1FC10874E3F00A55097 /* SynchronizableTypeWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SynchronizableTypeWrapper.h; sourceTree = "<group>"; };
+ 087D97BE10FB8D7700C00874 /* JSSVGPODListCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSVGPODListCustom.h; sourceTree = "<group>"; };
087FFA0D0EFF3ED3009DBD88 /* WMLInsertedLegendElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLInsertedLegendElement.cpp; sourceTree = "<group>"; };
087FFA0E0EFF3ED3009DBD88 /* WMLInsertedLegendElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLInsertedLegendElement.h; sourceTree = "<group>"; };
08807B6A0ED709AB003F6975 /* WMLGoElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLGoElement.cpp; sourceTree = "<group>"; };
@@ -5348,6 +5410,10 @@
08C925180FCC7C4A00480DEC /* FilterEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FilterEffect.h; path = filters/FilterEffect.h; sourceTree = "<group>"; };
08CD61B80ED3929C002DDF51 /* WMLTaskElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLTaskElement.cpp; sourceTree = "<group>"; };
08CD61B90ED3929C002DDF51 /* WMLTaskElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLTaskElement.h; sourceTree = "<group>"; };
+ 08DAB9B81103D9A5003E7ABA /* RenderSVGShadowTreeRootContainer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGShadowTreeRootContainer.cpp; sourceTree = "<group>"; };
+ 08DAB9B91103D9A5003E7ABA /* RenderSVGShadowTreeRootContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGShadowTreeRootContainer.h; sourceTree = "<group>"; };
+ 08DAB9C01103D9C1003E7ABA /* SVGShadowTreeElements.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGShadowTreeElements.cpp; sourceTree = "<group>"; };
+ 08DAB9C11103D9C1003E7ABA /* SVGShadowTreeElements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGShadowTreeElements.h; sourceTree = "<group>"; };
08E192510EDE0C390087B780 /* WMLErrorHandling.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLErrorHandling.cpp; sourceTree = "<group>"; };
08E192520EDE0C3A0087B780 /* WMLErrorHandling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLErrorHandling.h; sourceTree = "<group>"; };
08E4FE450E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGLengthCustom.cpp; sourceTree = "<group>"; };
@@ -5358,6 +5424,8 @@
08FB84B00ECE373300DC064E /* WMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLElementFactory.cpp; sourceTree = "<group>"; };
08FB84B10ECE373300DC064E /* WMLElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLElementFactory.h; sourceTree = "<group>"; };
0A4844980CA44CB200B7BD48 /* SoftLinking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoftLinking.h; sourceTree = "<group>"; };
+ 0AFDAC3A10F5448300E1F3D2 /* PluginWidgetMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PluginWidgetMac.mm; path = mac/PluginWidgetMac.mm; sourceTree = "<group>"; };
+ 0AFDAC3C10F5448C00E1F3D2 /* PluginWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginWidget.h; sourceTree = "<group>"; };
0B8C56D30F28627F000502E1 /* HTTPHeaderMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTTPHeaderMap.cpp; sourceTree = "<group>"; };
0B9056150F2578BE0095FF6A /* DocumentThreadableLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentThreadableLoader.cpp; sourceTree = "<group>"; };
0B9056160F2578BE0095FF6A /* DocumentThreadableLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentThreadableLoader.h; sourceTree = "<group>"; };
@@ -5387,6 +5455,8 @@
0F580CFA0F12DE9B0051D689 /* RenderLayerCompositor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderLayerCompositor.cpp; sourceTree = "<group>"; };
0F580CFB0F12DE9B0051D689 /* RenderLayerBacking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderLayerBacking.h; sourceTree = "<group>"; };
0F580CFC0F12DE9B0051D689 /* RenderLayerBacking.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderLayerBacking.cpp; sourceTree = "<group>"; };
+ 0F5B7A5210F65D7A00376302 /* RenderEmbeddedObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderEmbeddedObject.cpp; sourceTree = "<group>"; };
+ 0F5B7A5310F65D7A00376302 /* RenderEmbeddedObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderEmbeddedObject.h; sourceTree = "<group>"; };
0F6ECD430F252F3700BDE271 /* CSSPropertyLonghand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSPropertyLonghand.h; sourceTree = "<group>"; };
0F6ECD440F252F3700BDE271 /* CSSPropertyLonghand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSPropertyLonghand.cpp; sourceTree = "<group>"; };
0F9C6F4B1073EF0400DED9BF /* WebCore.3DRendering.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = WebCore.3DRendering.exp; sourceTree = "<group>"; };
@@ -5797,6 +5867,7 @@
1CF6BE120E9BB4670025E1CD /* ObjCNodeFilterCondition.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ObjCNodeFilterCondition.mm; sourceTree = "<group>"; };
1CF6BE130E9BB4670025E1CD /* ObjCNodeFilterCondition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjCNodeFilterCondition.h; sourceTree = "<group>"; };
1CFAE3220A6D6A3F0032593D /* libobjc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libobjc.dylib; path = /usr/lib/libobjc.dylib; sourceTree = "<absolute>"; };
+ 228C284410D82500009D0D0E /* ScriptWrappable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptWrappable.h; sourceTree = "<group>"; };
24F54EAA101FE914000AE741 /* ApplicationCacheHost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ApplicationCacheHost.cpp; sourceTree = "<group>"; };
24F54EAB101FE914000AE741 /* ApplicationCacheHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplicationCacheHost.h; sourceTree = "<group>"; };
29A812080FBB9C1D00510293 /* AccessibilityRenderObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityRenderObject.cpp; sourceTree = "<group>"; };
@@ -5837,6 +5908,11 @@
2D9066050BE141D400956998 /* LayoutState.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LayoutState.h; sourceTree = "<group>"; };
2D90660B0665D937006B6F1A /* ClipboardMac.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = ClipboardMac.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
2D90660C0665D937006B6F1A /* ClipboardMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ClipboardMac.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+ 2E2D99CB10E2BBDA00496337 /* JSBlob.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSBlob.cpp; sourceTree = "<group>"; };
+ 2E2D99CC10E2BBDA00496337 /* JSBlob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSBlob.h; sourceTree = "<group>"; };
+ 2E2D99E510E2BC1C00496337 /* DOMBlob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMBlob.h; sourceTree = "<group>"; };
+ 2E2D99E610E2BC1C00496337 /* DOMBlob.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMBlob.mm; sourceTree = "<group>"; };
+ 2E2D99E910E2BC3800496337 /* DOMBlobInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMBlobInternal.h; sourceTree = "<group>"; };
2E4346320F546A8200B0F1BA /* GenericWorkerTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GenericWorkerTask.h; path = workers/GenericWorkerTask.h; sourceTree = "<group>"; };
2E4346330F546A8200B0F1BA /* Worker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Worker.cpp; path = workers/Worker.cpp; sourceTree = "<group>"; };
2E4346340F546A8200B0F1BA /* Worker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Worker.h; path = workers/Worker.h; sourceTree = "<group>"; };
@@ -5858,6 +5934,9 @@
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>"; };
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>"; };
2ECF7ADA10162B3800427DE7 /* JSErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSErrorEvent.cpp; sourceTree = "<group>"; };
2ECF7ADB10162B3800427DE7 /* JSErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSErrorEvent.h; sourceTree = "<group>"; };
2ECF7ADE10162B5800427DE7 /* ErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ErrorEvent.cpp; sourceTree = "<group>"; };
@@ -5949,8 +6028,10 @@
37C2360F1097EE7700EF9F72 /* ComplexTextController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComplexTextController.h; sourceTree = "<group>"; };
37C2381F1098C84200EF9F72 /* ComplexTextControllerATSUI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComplexTextControllerATSUI.cpp; sourceTree = "<group>"; };
37C238201098C84200EF9F72 /* ComplexTextControllerCoreText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComplexTextControllerCoreText.cpp; sourceTree = "<group>"; };
+ 37C28A6710F659CC008C7813 /* TypesettingFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypesettingFeatures.h; sourceTree = "<group>"; };
37F818FB0D657606005E1F05 /* WebCoreURLResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreURLResponse.h; sourceTree = "<group>"; };
37F818FC0D657606005E1F05 /* WebCoreURLResponse.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreURLResponse.mm; sourceTree = "<group>"; };
+ 37FC96DA1104ED71003E1FAD /* TrailingFloatsRootInlineBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrailingFloatsRootInlineBox.h; sourceTree = "<group>"; };
41002CCB0F66EDEF009E660D /* ScriptFunctionCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptFunctionCall.h; sourceTree = "<group>"; };
41002CCC0F66EDEF009E660D /* ScriptFunctionCall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptFunctionCall.cpp; sourceTree = "<group>"; };
410B7E711045FAB000D8224F /* JSMessageEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMessageEventCustom.cpp; sourceTree = "<group>"; };
@@ -6274,6 +6355,11 @@
510D4A47103177A20049EA54 /* WebSocketChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebSocketChannel.cpp; sourceTree = "<group>"; };
510D4A48103177A20049EA54 /* WebSocketChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSocketChannel.h; sourceTree = "<group>"; };
510D4A49103177A20049EA54 /* WebSocketChannelClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSocketChannelClient.h; sourceTree = "<group>"; };
+ 5112247110CFB8C6008099D7 /* ThreadableWebSocketChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadableWebSocketChannel.cpp; sourceTree = "<group>"; };
+ 5112247310CFB8D8008099D7 /* ThreadableWebSocketChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadableWebSocketChannel.h; sourceTree = "<group>"; };
+ 5112247510CFB8E8008099D7 /* ThreadableWebSocketChannelClientWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadableWebSocketChannelClientWrapper.h; sourceTree = "<group>"; };
+ 5112247710CFB8F4008099D7 /* WorkerThreadableWebSocketChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkerThreadableWebSocketChannel.cpp; sourceTree = "<group>"; };
+ 5112247910CFB8FF008099D7 /* WorkerThreadableWebSocketChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerThreadableWebSocketChannel.h; sourceTree = "<group>"; };
5116D9750CF177BD00C2B84D /* DatabaseDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseDetails.h; sourceTree = "<group>"; };
511F23130DC160DA004F0032 /* LocalStorageTask.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalStorageTask.cpp; sourceTree = "<group>"; };
511F23140DC160DA004F0032 /* LocalStorageTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalStorageTask.h; sourceTree = "<group>"; };
@@ -6333,7 +6419,6 @@
5160300A0CC4251200C8AC25 /* FileSystemPOSIX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystemPOSIX.cpp; sourceTree = "<group>"; };
5160306B0CC4362300C8AC25 /* FileSystemCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystemCF.cpp; sourceTree = "<group>"; };
5160F4970B0AA75F00C1D2AF /* HistoryItemMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = HistoryItemMac.mm; path = mac/HistoryItemMac.mm; sourceTree = "<group>"; };
- 516BB7910CE91E6800512F79 /* JSSVGPointListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGPointListCustom.cpp; sourceTree = "<group>"; };
516BB7920CE91E6800512F79 /* JSTreeWalkerCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTreeWalkerCustom.cpp; sourceTree = "<group>"; };
51741D0B0B07259A00ED442C /* BackForwardList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackForwardList.h; sourceTree = "<group>"; };
51741D0C0B07259A00ED442C /* BackForwardList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BackForwardList.cpp; sourceTree = "<group>"; };
@@ -6434,8 +6519,11 @@
59B597721108656B007159E8 /* BridgeJSC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BridgeJSC.cpp; path = bridge/jsc/BridgeJSC.cpp; sourceTree = "<group>"; };
59B5977411086579007159E8 /* BridgeJSC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BridgeJSC.h; path = bridge/jsc/BridgeJSC.h; sourceTree = "<group>"; };
59BC393E11054A1300FD85DB /* JavaStringJSC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JavaStringJSC.h; path = jsc/JavaStringJSC.h; sourceTree = "<group>"; };
+<<<<<<< HEAD
59BD83B911199B9000E1B6A9 /* GeolocationPositionCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeolocationPositionCache.h; sourceTree = "<group>"; };
59BD83BB11199B9C00E1B6A9 /* GeolocationPositionCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeolocationPositionCache.cpp; sourceTree = "<group>"; };
+=======
+>>>>>>> webkit.org at r54127
59C77F2810545B3B00506104 /* GeolocationServiceMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GeolocationServiceMock.cpp; path = mock/GeolocationServiceMock.cpp; sourceTree = "<group>"; };
59C77F2910545B3B00506104 /* GeolocationServiceMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GeolocationServiceMock.h; path = mock/GeolocationServiceMock.h; sourceTree = "<group>"; };
59E560A61105336600AA1258 /* JavaClassJSC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JavaClassJSC.h; path = jsc/JavaClassJSC.h; sourceTree = "<group>"; };
@@ -6565,6 +6653,13 @@
65FEA86809833ADE00BED4AB /* Page.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Page.cpp; sourceTree = "<group>"; };
6E47E65E10B7944B00B186C8 /* WebGLGetInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLGetInfo.cpp; path = canvas/WebGLGetInfo.cpp; sourceTree = "<group>"; };
6E47E65F10B7944B00B186C8 /* WebGLGetInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLGetInfo.h; path = canvas/WebGLGetInfo.h; sourceTree = "<group>"; };
+ 6E4E91A710F7FB3100A2779C /* CanvasContextAttributes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CanvasContextAttributes.cpp; path = canvas/CanvasContextAttributes.cpp; sourceTree = "<group>"; };
+ 6E4E91A810F7FB3100A2779C /* CanvasContextAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CanvasContextAttributes.h; path = canvas/CanvasContextAttributes.h; sourceTree = "<group>"; };
+ 6E4E91A910F7FB3100A2779C /* WebGLContextAttributes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLContextAttributes.cpp; path = canvas/WebGLContextAttributes.cpp; sourceTree = "<group>"; };
+ 6E4E91AA10F7FB3100A2779C /* WebGLContextAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLContextAttributes.h; path = canvas/WebGLContextAttributes.h; sourceTree = "<group>"; };
+ 6E4E91AB10F7FB3100A2779C /* WebGLContextAttributes.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebGLContextAttributes.idl; path = canvas/WebGLContextAttributes.idl; sourceTree = "<group>"; };
+ 6EE8A77010F803F3005A4A24 /* JSWebGLContextAttributes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLContextAttributes.cpp; sourceTree = "<group>"; };
+ 6EE8A77110F803F3005A4A24 /* JSWebGLContextAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLContextAttributes.h; sourceTree = "<group>"; };
72626E010EF022FE00A07E20 /* FontFastPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontFastPath.cpp; sourceTree = "<group>"; };
754133A7102E00E800075D00 /* InspectorTimelineAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorTimelineAgent.h; sourceTree = "<group>"; };
754133A9102E00F400075D00 /* InspectorTimelineAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorTimelineAgent.cpp; sourceTree = "<group>"; };
@@ -6582,6 +6677,12 @@
7693BACF106C2DCA007B0823 /* PluginHalter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginHalter.cpp; sourceTree = "<group>"; };
7693BAD0106C2DCA007B0823 /* PluginHalter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginHalter.h; sourceTree = "<group>"; };
7693BAD1106C2DCA007B0823 /* PluginHalterClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginHalterClient.h; sourceTree = "<group>"; };
+ 76CDD2EC1103DA6600680521 /* AccessibilityMenuList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityMenuList.cpp; sourceTree = "<group>"; };
+ 76CDD2ED1103DA6600680521 /* AccessibilityMenuList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityMenuList.h; sourceTree = "<group>"; };
+ 76CDD2EE1103DA6600680521 /* AccessibilityMenuListPopup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityMenuListPopup.cpp; sourceTree = "<group>"; };
+ 76CDD2EF1103DA6600680521 /* AccessibilityMenuListPopup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityMenuListPopup.h; sourceTree = "<group>"; };
+ 76CDD2F01103DA6600680521 /* AccessibilityMenuListOption.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityMenuListOption.cpp; sourceTree = "<group>"; };
+ 76CDD2F11103DA6600680521 /* AccessibilityMenuListOption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityMenuListOption.h; sourceTree = "<group>"; };
79AC9216109945C80021266E /* JSCompositionEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCompositionEvent.cpp; sourceTree = "<group>"; };
79AC9217109945C80021266E /* JSCompositionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCompositionEvent.h; sourceTree = "<group>"; };
79F2F59E1091939A000D87CB /* CompositionEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CompositionEvent.cpp; sourceTree = "<group>"; };
@@ -6608,7 +6709,7 @@
7A74ECB8101839A500BF939E /* InspectorBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorBackend.cpp; sourceTree = "<group>"; };
7A74ECB9101839A600BF939E /* InspectorBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorBackend.h; sourceTree = "<group>"; };
7A74ECBC101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInspectorFrontendHostCustom.cpp; sourceTree = "<group>"; };
- 7ADE722510CBBB9B006B3B3A /* ContextMenuSelectionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContextMenuSelectionHandler.h; sourceTree = "<group>"; };
+ 7ADE722510CBBB9B006B3B3A /* ContextMenuProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContextMenuProvider.h; sourceTree = "<group>"; };
7AED3E030FBB1EAA00D2B03C /* InspectorFrontend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorFrontend.cpp; sourceTree = "<group>"; };
7AED3E040FBB1EAA00D2B03C /* InspectorFrontend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorFrontend.h; sourceTree = "<group>"; };
84224181107E77F400766A87 /* JSSVGFEMorphologyElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGFEMorphologyElement.cpp; sourceTree = "<group>"; };
@@ -7626,6 +7727,8 @@
93C441ED0F813A1A00C1A634 /* CollectionCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CollectionCache.cpp; sourceTree = "<group>"; };
93C441EE0F813A1A00C1A634 /* CollectionCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectionCache.h; sourceTree = "<group>"; };
93C441FF0F813AE100C1A634 /* CollectionType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectionType.h; sourceTree = "<group>"; };
+ 93C4F6E81108F9A50099D0DB /* AccessibilityScrollbar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityScrollbar.cpp; sourceTree = "<group>"; };
+ 93C4F6E91108F9A50099D0DB /* AccessibilityScrollbar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityScrollbar.h; sourceTree = "<group>"; };
93C841F709CE855C00DFF5E5 /* DOMImplementationFront.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMImplementationFront.h; sourceTree = "<group>"; };
93C841FE09CE858300DFF5E5 /* DOMImplementationFront.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMImplementationFront.cpp; sourceTree = "<group>"; };
93CA4C9909DF93FA00DF8677 /* html.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = html.css; sourceTree = "<group>"; };
@@ -8991,7 +9094,6 @@
B2CB92600B5BDA02009BAA78 /* DOMSVGElementInstanceList.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMSVGElementInstanceList.mm; sourceTree = "<group>"; };
B2CCEC450C6CA9F1006A5424 /* RenderSVGViewportContainer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGViewportContainer.cpp; sourceTree = "<group>"; };
B2CCEC460C6CA9F1006A5424 /* RenderSVGViewportContainer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderSVGViewportContainer.h; sourceTree = "<group>"; };
- B2D3FC890C2212CB00CF3618 /* JSSVGTransformListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGTransformListCustom.cpp; sourceTree = "<group>"; };
B2E27C9D0B0F2B0900F17C7B /* FloatPoint3D.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FloatPoint3D.cpp; sourceTree = "<group>"; };
B2E27C9E0B0F2B0900F17C7B /* FloatPoint3D.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FloatPoint3D.h; sourceTree = "<group>"; };
B2E4EC940D00C22B00432643 /* SVGZoomEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGZoomEvent.cpp; sourceTree = "<group>"; };
@@ -9378,6 +9480,10 @@
BC56CB1E10D5AC8000A77C64 /* GeolocationControllerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeolocationControllerClient.h; sourceTree = "<group>"; };
BC56CB1F10D5AC8000A77C64 /* GeolocationError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeolocationError.h; sourceTree = "<group>"; };
BC56CB2010D5AC8000A77C64 /* GeolocationPosition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeolocationPosition.h; sourceTree = "<group>"; };
+<<<<<<< HEAD
+=======
+ BC56CCDF10D72BD800A77C64 /* WebCore.ClientBasedGeolocation.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = WebCore.ClientBasedGeolocation.exp; sourceTree = "<group>"; };
+>>>>>>> webkit.org at r54127
BC5823F40C0A98DF0053F1B5 /* JSHTMLElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLElementCustom.cpp; sourceTree = "<group>"; };
BC5825F20C0B89380053F1B5 /* JSCSSStyleDeclarationCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSStyleDeclarationCustom.cpp; sourceTree = "<group>"; };
BC588AEF0BFA6CF900EE679E /* HTMLParserErrorCodes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLParserErrorCodes.h; sourceTree = "<group>"; };
@@ -9788,12 +9894,6 @@
BE91FC8B06133666005E3790 /* Position.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = Position.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
BE91FC8C06133666005E3790 /* Position.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Position.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
BE983D95052A2E0A00892D85 /* WebCoreKeyboardUIMode.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreKeyboardUIMode.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- C09158840DB4209200E55AF4 /* JSInspectedObjectWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInspectedObjectWrapper.cpp; sourceTree = "<group>"; };
- C09158850DB4209200E55AF4 /* JSInspectedObjectWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInspectedObjectWrapper.h; sourceTree = "<group>"; };
- C09158860DB4209200E55AF4 /* JSInspectorCallbackWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInspectorCallbackWrapper.cpp; sourceTree = "<group>"; };
- C09158870DB4209200E55AF4 /* JSInspectorCallbackWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInspectorCallbackWrapper.h; sourceTree = "<group>"; };
- C09158880DB4209200E55AF4 /* JSQuarantinedObjectWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSQuarantinedObjectWrapper.cpp; sourceTree = "<group>"; };
- C09158890DB4209200E55AF4 /* JSQuarantinedObjectWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSQuarantinedObjectWrapper.h; sourceTree = "<group>"; };
C0DFC86F0DB6841A003EAE7C /* JSConsoleCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSConsoleCustom.cpp; sourceTree = "<group>"; };
C105DA610F3AA68F001DD44F /* TextEncodingDetectorICU.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextEncodingDetectorICU.cpp; sourceTree = "<group>"; };
C105DA630F3AA6B8001DD44F /* TextEncodingDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextEncodingDetector.h; sourceTree = "<group>"; };
@@ -9811,6 +9911,8 @@
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>"; };
+ CE4C00E310F6F7BA00CA38F5 /* HTMLNoScriptElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLNoScriptElement.cpp; sourceTree = "<group>"; };
+ CE4C00E510F6F7C100CA38F5 /* HTMLNoScriptElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLNoScriptElement.h; sourceTree = "<group>"; };
CE54FD371016D9A6008B44C8 /* ScriptSourceProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptSourceProvider.h; sourceTree = "<group>"; };
D01A27AB10C9BFD800026A42 /* SpaceSplitString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpaceSplitString.cpp; sourceTree = "<group>"; };
D01A27AC10C9BFD800026A42 /* SpaceSplitString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpaceSplitString.h; sourceTree = "<group>"; };
@@ -9870,9 +9972,12 @@
E1284BD41044A01E00EAEB52 /* DOMPageTransitionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMPageTransitionEvent.h; sourceTree = "<group>"; };
E12EDB7A0B308A78002704B6 /* EventTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventTarget.h; sourceTree = "<group>"; };
E12EDBE90B308E0B002704B6 /* EventTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventTarget.cpp; sourceTree = "<group>"; };
+ E15A36D61104572000B7B639 /* XMLNSNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLNSNames.h; sourceTree = "<group>"; };
+ E15A36D81104572700B7B639 /* XMLNSNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLNSNames.cpp; sourceTree = "<group>"; };
E182568D0EF2B02D00933242 /* JSWorkerContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWorkerContext.cpp; sourceTree = "<group>"; };
E182568E0EF2B02D00933242 /* JSWorkerContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWorkerContext.h; sourceTree = "<group>"; };
E18258AB0EF3CD7000933242 /* JSWorkerContextCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWorkerContextCustom.cpp; sourceTree = "<group>"; };
+ E1A1470711102B1500EEC0F3 /* ContainerNodeAlgorithms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContainerNodeAlgorithms.h; sourceTree = "<group>"; };
E1A302BB0DE8370300C52F2C /* StringBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringBuilder.h; sourceTree = "<group>"; };
E1A302C00DE8376900C52F2C /* StringBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringBuilder.cpp; sourceTree = "<group>"; };
E1A5F99A0E7EAA2500AF85EA /* JSMessageChannelCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMessageChannelCustom.cpp; sourceTree = "<group>"; };
@@ -10029,13 +10134,19 @@
F5C2869302846DCD018635CA /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
F5C2869402846DCD018635CA /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
F5C2869502846DCD018635CA /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
- F5D3A57A106B83B300545297 /* ISODateTime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ISODateTime.cpp; sourceTree = "<group>"; };
- F5D3A57B106B83B300545297 /* ISODateTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISODateTime.h; sourceTree = "<group>"; };
+ F5D3A57A106B83B300545297 /* DateComponents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DateComponents.cpp; sourceTree = "<group>"; };
+ F5D3A57B106B83B300545297 /* DateComponents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateComponents.h; sourceTree = "<group>"; };
F8216299029F4FB501000131 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F916C48B0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSXMLHttpRequestProgressEvent.cpp; sourceTree = "<group>"; };
F916C48C0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSXMLHttpRequestProgressEvent.h; sourceTree = "<group>"; };
F9F0ED770DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = XMLHttpRequestProgressEvent.h; sourceTree = "<group>"; };
F9F0ED780DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = XMLHttpRequestProgressEvent.idl; sourceTree = "<group>"; };
+ FA654A631108ABB7002615E0 /* mathml.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = mathml.css; sourceTree = "<group>"; };
+ FA654A671108ABE2002615E0 /* mathattrs.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mathattrs.in; sourceTree = "<group>"; };
+ FA654A691108ABED002615E0 /* MathMLTextElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLTextElement.cpp; sourceTree = "<group>"; };
+ FA654A6A1108ABED002615E0 /* MathMLTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLTextElement.h; sourceTree = "<group>"; };
+ FA654A6D1108ABFF002615E0 /* RenderMathMLBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMathMLBlock.cpp; sourceTree = "<group>"; };
+ FA654A6E1108ABFF002615E0 /* RenderMathMLBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMathMLBlock.h; sourceTree = "<group>"; };
FABE72ED1059C1EB00D999DD /* MathMLElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLElement.cpp; sourceTree = "<group>"; };
FABE72EE1059C1EB00D999DD /* MathMLElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLElement.h; sourceTree = "<group>"; };
FABE72EF1059C1EB00D999DD /* MathMLInlineContainerElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLInlineContainerElement.cpp; sourceTree = "<group>"; };
@@ -10210,6 +10321,14 @@
tabWidth = 4;
usesTabs = 0;
};
+ 0AFDAC3610F5447400E1F3D2 /* mac */ = {
+ isa = PBXGroup;
+ children = (
+ 0AFDAC3A10F5448300E1F3D2 /* PluginWidgetMac.mm */,
+ );
+ name = mac;
+ sourceTree = "<group>";
+ };
14DFB33F0A7DF7630018F769 /* Derived Sources */ = {
isa = PBXGroup;
children = (
@@ -10261,8 +10380,10 @@
1A569CC50D7E2B82007C3983 /* c */,
1A569CCE0D7E2B82007C3983 /* jni */,
1A569CE20D7E2B82007C3983 /* objc */,
+ 599E758F11055A1F00D904FA /* Bridge.h */,
1A71D5790F33819000F9CE4E /* IdentifierRep.cpp */,
1A71D57A0F33819000F9CE4E /* IdentifierRep.h */,
+ 59B5977111086556007159E8 /* jsc */,
1A569CDA0D7E2B82007C3983 /* NP_jsobject.cpp */,
1A569CDB0D7E2B82007C3983 /* NP_jsobject.h */,
1A569CDC0D7E2B82007C3983 /* npapi.h */,
@@ -10302,6 +10423,7 @@
1A569CCE0D7E2B82007C3983 /* jni */ = {
isa = PBXGroup;
children = (
+<<<<<<< HEAD
5913953C1107584E0083EC55 /* JNIBridge.cpp */,
5913953A110758450083EC55 /* JNIBridge.h */,
59EE12311106082900885116 /* JNIUtility.h */,
@@ -10310,6 +10432,16 @@
1A569CD40D7E2B82007C3983 /* jni_jsobject.h */,
1A569CD30D7E2B82007C3983 /* jni_jsobject.mm */,
1A569CD50D7E2B82007C3983 /* jni_objc.mm */,
+=======
+ 1A569CD40D7E2B82007C3983 /* jni_jsobject.h */,
+ 1A569CD30D7E2B82007C3983 /* jni_jsobject.mm */,
+ 1A569CD50D7E2B82007C3983 /* jni_objc.mm */,
+ 5913953C1107584E0083EC55 /* JNIBridge.cpp */,
+ 5913953A110758450083EC55 /* JNIBridge.h */,
+ 59EE122F1106081F00885116 /* JNIUtility.cpp */,
+ 59EE12311106082900885116 /* JNIUtility.h */,
+ 599D1E2F10C97D4C00E0EF12 /* jsc */,
+>>>>>>> webkit.org at r54127
);
name = jni;
path = bridge/jni;
@@ -10510,8 +10642,8 @@
1C81B9FC0E9733CB00266E07 /* JavaScriptProfileNode.cpp */,
1C81B9FB0E9733CB00266E07 /* JavaScriptProfileNode.h */,
BCC64F5F0DCFB84E0081EF3B /* localizedStrings.js */,
- 7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */,
7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */,
+ 7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */,
);
path = inspector;
sourceTree = "<group>";
@@ -10552,10 +10684,18 @@
29A812240FBB9C1D00510293 /* AccessibilityListBoxOption.h */,
07B0113C1032241900FBDC33 /* AccessibilityMediaControls.cpp */,
07B0113E1032242200FBDC33 /* AccessibilityMediaControls.h */,
+ 76CDD2EC1103DA6600680521 /* AccessibilityMenuList.cpp */,
+ 76CDD2ED1103DA6600680521 /* AccessibilityMenuList.h */,
+ 76CDD2F01103DA6600680521 /* AccessibilityMenuListOption.cpp */,
+ 76CDD2F11103DA6600680521 /* AccessibilityMenuListOption.h */,
+ 76CDD2EE1103DA6600680521 /* AccessibilityMenuListPopup.cpp */,
+ 76CDD2EF1103DA6600680521 /* AccessibilityMenuListPopup.h */,
29A8121E0FBB9C1D00510293 /* AccessibilityObject.cpp */,
29A812180FBB9C1D00510293 /* AccessibilityObject.h */,
29A812080FBB9C1D00510293 /* AccessibilityRenderObject.cpp */,
29A8121B0FBB9C1D00510293 /* AccessibilityRenderObject.h */,
+ 93C4F6E81108F9A50099D0DB /* AccessibilityScrollbar.cpp */,
+ 93C4F6E91108F9A50099D0DB /* AccessibilityScrollbar.h */,
0709FC4B1025DED80059CDBA /* AccessibilitySlider.cpp */,
0709FC4D1025DEE30059CDBA /* AccessibilitySlider.h */,
29A812090FBB9C1D00510293 /* AccessibilityTable.cpp */,
@@ -10683,6 +10823,7 @@
children = (
0F9C6F4B1073EF0400DED9BF /* WebCore.3DRendering.exp */,
F58EF58E02DFDFB7018635CA /* WebCore.base.exp */,
+ BC56CCDF10D72BD800A77C64 /* WebCore.ClientBasedGeolocation.exp */,
FEFD102C105C41470002855E /* WebCore.ContextMenus.exp */,
4491959D0FBE17D700D9F824 /* WebCore.DashboardSupport.exp */,
FEA4133F105D67AE0007236F /* WebCore.DragSupport.exp */,
@@ -10705,6 +10846,27 @@
49484FAE102CF01E00187DD3 /* canvas */ = {
isa = PBXGroup;
children = (
+ 6E4E91A710F7FB3100A2779C /* CanvasContextAttributes.cpp */,
+ 6E4E91A810F7FB3100A2779C /* CanvasContextAttributes.h */,
+ 49484FB3102CF23C00187DD3 /* CanvasGradient.cpp */,
+ 49484FB4102CF23C00187DD3 /* CanvasGradient.h */,
+ 49484FB5102CF23C00187DD3 /* CanvasGradient.idl */,
+ 49C7B9B41042D32F0009D447 /* CanvasObject.cpp */,
+ 49C7B9B51042D32F0009D447 /* CanvasObject.h */,
+ 49484FB6102CF23C00187DD3 /* CanvasPattern.cpp */,
+ 49484FB7102CF23C00187DD3 /* CanvasPattern.h */,
+ 49484FB8102CF23C00187DD3 /* CanvasPattern.idl */,
+ 49484FB9102CF23C00187DD3 /* CanvasPixelArray.cpp */,
+ 49484FBA102CF23C00187DD3 /* CanvasPixelArray.h */,
+ 49484FBB102CF23C00187DD3 /* CanvasPixelArray.idl */,
+ 49C7B9BC1042D32F0009D447 /* CanvasRenderingContext.cpp */,
+ 49C7B9BD1042D32F0009D447 /* CanvasRenderingContext.h */,
+ 49C7B9BE1042D32F0009D447 /* CanvasRenderingContext.idl */,
+ 49484FBC102CF23C00187DD3 /* CanvasRenderingContext2D.cpp */,
+ 49484FBD102CF23C00187DD3 /* CanvasRenderingContext2D.h */,
+ 49484FBE102CF23C00187DD3 /* CanvasRenderingContext2D.idl */,
+ 49484FBF102CF23C00187DD3 /* CanvasStyle.cpp */,
+ 49484FC0102CF23C00187DD3 /* CanvasStyle.h */,
A7D20F6B107F438B00A80392 /* WebGLActiveInfo.h */,
A7D20F3B107F373800A80392 /* WebGLActiveInfo.idl */,
49EECDC710503C2300099FAB /* WebGLArray.cpp */,
@@ -10719,6 +10881,9 @@
49C7B9AB1042D32E0009D447 /* WebGLByteArray.cpp */,
49C7B9AC1042D32E0009D447 /* WebGLByteArray.h */,
49C7B9AD1042D32E0009D447 /* WebGLByteArray.idl */,
+ 6E4E91A910F7FB3100A2779C /* WebGLContextAttributes.cpp */,
+ 6E4E91AA10F7FB3100A2779C /* WebGLContextAttributes.h */,
+ 6E4E91AB10F7FB3100A2779C /* WebGLContextAttributes.idl */,
49EECDCD10503C2300099FAB /* WebGLFloatArray.cpp */,
49EECDCE10503C2300099FAB /* WebGLFloatArray.h */,
49EECDCF10503C2300099FAB /* WebGLFloatArray.idl */,
@@ -10727,32 +10892,15 @@
49C7B9B01042D32E0009D447 /* WebGLFramebuffer.idl */,
6E47E65E10B7944B00B186C8 /* WebGLGetInfo.cpp */,
6E47E65F10B7944B00B186C8 /* WebGLGetInfo.h */,
- 49484FB3102CF23C00187DD3 /* CanvasGradient.cpp */,
- 49484FB4102CF23C00187DD3 /* CanvasGradient.h */,
- 49484FB5102CF23C00187DD3 /* CanvasGradient.idl */,
49EECDD010503C2300099FAB /* WebGLIntArray.cpp */,
49EECDD110503C2300099FAB /* WebGLIntArray.h */,
49EECDD210503C2300099FAB /* WebGLIntArray.idl */,
- 49C7B9B41042D32F0009D447 /* CanvasObject.cpp */,
- 49C7B9B51042D32F0009D447 /* CanvasObject.h */,
- 49484FB6102CF23C00187DD3 /* CanvasPattern.cpp */,
- 49484FB7102CF23C00187DD3 /* CanvasPattern.h */,
- 49484FB8102CF23C00187DD3 /* CanvasPattern.idl */,
- 49484FB9102CF23C00187DD3 /* CanvasPixelArray.cpp */,
- 49484FBA102CF23C00187DD3 /* CanvasPixelArray.h */,
- 49484FBB102CF23C00187DD3 /* CanvasPixelArray.idl */,
49C7B9B61042D32F0009D447 /* WebGLProgram.cpp */,
49C7B9B71042D32F0009D447 /* WebGLProgram.h */,
49C7B9B81042D32F0009D447 /* WebGLProgram.idl */,
49C7B9B91042D32F0009D447 /* WebGLRenderbuffer.cpp */,
49C7B9BA1042D32F0009D447 /* WebGLRenderbuffer.h */,
49C7B9BB1042D32F0009D447 /* WebGLRenderbuffer.idl */,
- 49C7B9BC1042D32F0009D447 /* CanvasRenderingContext.cpp */,
- 49C7B9BD1042D32F0009D447 /* CanvasRenderingContext.h */,
- 49C7B9BE1042D32F0009D447 /* CanvasRenderingContext.idl */,
- 49484FBC102CF23C00187DD3 /* CanvasRenderingContext2D.cpp */,
- 49484FBD102CF23C00187DD3 /* CanvasRenderingContext2D.h */,
- 49484FBE102CF23C00187DD3 /* CanvasRenderingContext2D.idl */,
49C7B9BF1042D32F0009D447 /* WebGLRenderingContext.cpp */,
49C7B9C01042D32F0009D447 /* WebGLRenderingContext.h */,
49C7B9C11042D32F0009D447 /* WebGLRenderingContext.idl */,
@@ -10762,8 +10910,6 @@
49EECDD310503C2300099FAB /* WebGLShortArray.cpp */,
49EECDD410503C2300099FAB /* WebGLShortArray.h */,
49EECDD510503C2300099FAB /* WebGLShortArray.idl */,
- 49484FBF102CF23C00187DD3 /* CanvasStyle.cpp */,
- 49484FC0102CF23C00187DD3 /* CanvasStyle.h */,
49C7B9C51042D32F0009D447 /* WebGLTexture.cpp */,
49C7B9C61042D32F0009D447 /* WebGLTexture.h */,
49C7B9C71042D32F0009D447 /* WebGLTexture.idl */,
@@ -10989,6 +11135,9 @@
518A34BD1026C831001B6896 /* websockets */ = {
isa = PBXGroup;
children = (
+ 5112247110CFB8C6008099D7 /* ThreadableWebSocketChannel.cpp */,
+ 5112247310CFB8D8008099D7 /* ThreadableWebSocketChannel.h */,
+ 5112247510CFB8E8008099D7 /* ThreadableWebSocketChannelClientWrapper.h */,
518A34BE1026C831001B6896 /* WebSocket.cpp */,
518A34BF1026C831001B6896 /* WebSocket.h */,
518A34C01026C831001B6896 /* WebSocket.idl */,
@@ -10997,6 +11146,8 @@
510D4A49103177A20049EA54 /* WebSocketChannelClient.h */,
51ABAE421043AB4A008C5260 /* WebSocketHandshake.cpp */,
51ABAE431043AB4A008C5260 /* WebSocketHandshake.h */,
+ 5112247710CFB8F4008099D7 /* WorkerThreadableWebSocketChannel.cpp */,
+ 5112247910CFB8FF008099D7 /* WorkerThreadableWebSocketChannel.h */,
);
path = websockets;
sourceTree = "<group>";
@@ -11004,6 +11155,7 @@
599D1E2F10C97D4C00E0EF12 /* jsc */ = {
isa = PBXGroup;
children = (
+<<<<<<< HEAD
59E842671109E5AE000305AD /* JNIBridgeJSC.cpp */,
59E842651109E5A2000305AD /* JNIBridgeJSC.h */,
59EE122D1106080F00885116 /* JNIUtilityPrivate.h */,
@@ -11013,6 +11165,17 @@
59E560A61105336600AA1258 /* JavaClassJSC.h */,
59A9E7B11104759400DFB4C1 /* JavaInstanceJSC.h */,
59A9E7AF1104758800DFB4C1 /* JavaInstanceJSC.cpp */,
+=======
+ 59E560A81105336F00AA1258 /* JavaClassJSC.cpp */,
+ 59E560A61105336600AA1258 /* JavaClassJSC.h */,
+ 59A9E7AF1104758800DFB4C1 /* JavaInstanceJSC.cpp */,
+ 59A9E7B11104759400DFB4C1 /* JavaInstanceJSC.h */,
+ 59BC393E11054A1300FD85DB /* JavaStringJSC.h */,
+ 59E842671109E5AE000305AD /* JNIBridgeJSC.cpp */,
+ 59E842651109E5A2000305AD /* JNIBridgeJSC.h */,
+ 59EE122B1106080500885116 /* JNIUtilityPrivate.cpp */,
+ 59EE122D1106080F00885116 /* JNIUtilityPrivate.h */,
+>>>>>>> webkit.org at r54127
);
name = jsc;
sourceTree = "<group>";
@@ -11020,8 +11183,13 @@
59B5977111086556007159E8 /* jsc */ = {
isa = PBXGroup;
children = (
+<<<<<<< HEAD
59B5977411086579007159E8 /* BridgeJSC.h */,
59B597721108656B007159E8 /* BridgeJSC.cpp */,
+=======
+ 59B597721108656B007159E8 /* BridgeJSC.cpp */,
+ 59B5977411086579007159E8 /* BridgeJSC.h */,
+>>>>>>> webkit.org at r54127
);
name = jsc;
sourceTree = "<group>";
@@ -11047,6 +11215,7 @@
5DCF83690D59157800953BC6 /* plugins */ = {
isa = PBXGroup;
children = (
+ 0AFDAC3610F5447400E1F3D2 /* mac */,
A9C6E4E10D745E05006442E9 /* MimeType.cpp */,
A9C6E4E20D745E05006442E9 /* MimeType.h */,
A9C6E65E0D7466F2006442E9 /* MimeType.idl */,
@@ -11066,6 +11235,7 @@
5DCF836C0D59159800953BC6 /* PluginInfoStore.h */,
1ADA140E0E1AE5D900023EE5 /* PluginMainThreadScheduler.cpp */,
1ADA140F0E1AE5D900023EE5 /* PluginMainThreadScheduler.h */,
+ 0AFDAC3C10F5448C00E1F3D2 /* PluginWidget.h */,
);
path = plugins;
sourceTree = "<group>";
@@ -11110,6 +11280,8 @@
656581EB09D1508D000E61D7 /* XLinkNames.h */,
A833C80A0A2CF25600D57664 /* XMLNames.cpp */,
A833C80B0A2CF25600D57664 /* XMLNames.h */,
+ E15A36D81104572700B7B639 /* XMLNSNames.cpp */,
+ E15A36D61104572000B7B639 /* XMLNSNames.h */,
1A7629D30A07425100989F5B /* XPathGrammar.cpp */,
1A7629D40A07425100989F5B /* XPathGrammar.h */,
);
@@ -11277,7 +11449,7 @@
065AD4F20B0C2EDA005A2B1D /* ContextMenuClient.h */,
065AD4F30B0C2EDA005A2B1D /* ContextMenuController.cpp */,
065AD4F40B0C2EDA005A2B1D /* ContextMenuController.h */,
- 7ADE722510CBBB9B006B3B3A /* ContextMenuSelectionHandler.h */,
+ 7ADE722510CBBB9B006B3B3A /* ContextMenuProvider.h */,
FE6FD4850F676E5700092873 /* Coordinates.h */,
FE6FD4860F676E5700092873 /* Coordinates.idl */,
BC5A86810C33676000EEA649 /* DOMSelection.cpp */,
@@ -12062,6 +12234,8 @@
85C56D030AA8BAA700D95755 /* HTML */ = {
isa = PBXGroup;
children = (
+ 2E2D99E510E2BC1C00496337 /* DOMBlob.h */,
+ 2E2D99E610E2BC1C00496337 /* DOMBlob.mm */,
BC00EFFE0E0A185500FD04E3 /* DOMFile.h */,
BC00EFFF0E0A185500FD04E3 /* DOMFile.mm */,
BC00F0010E0A185500FD04E3 /* DOMFileList.h */,
@@ -12126,8 +12300,8 @@
85DF81230AA7787200486AD7 /* DOMHTMLImageElement.h */,
85DF81240AA7787200486AD7 /* DOMHTMLImageElement.mm */,
85F32AE40AA63B8700FF3184 /* DOMHTMLInputElement.h */,
- 1CCA732110ADD43E00FD440D /* DOMHTMLInputElementPrivate.h */,
85F32AE50AA63B8700FF3184 /* DOMHTMLInputElement.mm */,
+ 1CCA732110ADD43E00FD440D /* DOMHTMLInputElementPrivate.h */,
859A9C410AA5E3BD00B694B2 /* DOMHTMLIsIndexElement.h */,
859A9C420AA5E3BD00B694B2 /* DOMHTMLIsIndexElement.mm */,
85BA4CD90AA6861B0088052D /* DOMHTMLLabelElement.h */,
@@ -12203,6 +12377,7 @@
children = (
8538F0180AD718D8006A81D1 /* DOMAbstractViewInternal.h */,
85E7113E0AC5D5340053270F /* DOMAttrInternal.h */,
+ 2E2D99E910E2BC3800496337 /* DOMBlobInternal.h */,
85E7113F0AC5D5340053270F /* DOMCDATASectionInternal.h */,
85E711400AC5D5340053270F /* DOMCharacterDataInternal.h */,
85E711410AC5D5340053270F /* DOMCommentInternal.h */,
@@ -12602,6 +12777,9 @@
isa = PBXGroup;
children = (
49484FAE102CF01E00187DD3 /* canvas */,
+ 2EAFAF0B10E2AF2D007ED3D6 /* Blob.cpp */,
+ 2EAFAF0C10E2AF2D007ED3D6 /* Blob.h */,
+ 2EAFAF0D10E2AF2D007ED3D6 /* Blob.idl */,
93C441ED0F813A1A00C1A634 /* CollectionCache.cpp */,
93C441EE0F813A1A00C1A634 /* CollectionCache.h */,
93C441FF0F813AE100C1A634 /* CollectionType.h */,
@@ -12612,6 +12790,8 @@
BC77CFAB0FF173D30070887B /* DataGridColumnList.h */,
BC77CF980FF172420070887B /* DataGridColumnList.idl */,
BCBCAE360FF19385000762AE /* DataGridDataSource.h */,
+ F5D3A57A106B83B300545297 /* DateComponents.cpp */,
+ F5D3A57B106B83B300545297 /* DateComponents.h */,
BC7DAAEC0FF9615D00CE0138 /* DOMDataGridDataSource.cpp */,
BC7DAAED0FF9615D00CE0138 /* DOMDataGridDataSource.h */,
BCDBB8CC0E08958400C60FF6 /* File.cpp */,
@@ -12622,6 +12802,9 @@
BC1881DC0E08C54300048C13 /* FileList.idl */,
A8136D370973A8E700D74463 /* FormDataList.cpp */,
A8136D360973A8E700D74463 /* FormDataList.h */,
+ BC97E239109144950010D361 /* HTMLAllCollection.cpp */,
+ BC97E238109144950010D361 /* HTMLAllCollection.h */,
+ BC97E23C109146F10010D361 /* HTMLAllCollection.idl */,
A8CFF79A0A156978000A4234 /* HTMLAnchorElement.cpp */,
A8CFF7A10A156978000A4234 /* HTMLAnchorElement.h */,
1A4A2DD30A1B845100C807F8 /* HTMLAnchorElement.idl */,
@@ -12659,9 +12842,6 @@
A8DF3FC9097FA0FB0052981B /* HTMLCollection.cpp */,
A8DF3FC8097FA0FB0052981B /* HTMLCollection.h */,
85DF2F690AA3C74300AD64C5 /* HTMLCollection.idl */,
- BC97E23C109146F10010D361 /* HTMLAllCollection.idl */,
- BC97E238109144950010D361 /* HTMLAllCollection.h */,
- BC97E239109144950010D361 /* HTMLAllCollection.cpp */,
BC77CDB70FEFF1210070887B /* HTMLDataGridCellElement.cpp */,
BC77CDBB0FEFF1420070887B /* HTMLDataGridCellElement.h */,
BC77CDA20FEFEB530070887B /* HTMLDataGridCellElement.idl */,
@@ -12778,6 +12958,8 @@
1AE2AB070A1CE5CF00B42B25 /* HTMLModElement.idl */,
A8DF3FCD097FA0FB0052981B /* HTMLNameCollection.cpp */,
A8DF3FCC097FA0FB0052981B /* HTMLNameCollection.h */,
+ CE4C00E310F6F7BA00CA38F5 /* HTMLNoScriptElement.cpp */,
+ CE4C00E510F6F7C100CA38F5 /* HTMLNoScriptElement.h */,
A871D4510A127CBC00B12A68 /* HTMLObjectElement.cpp */,
A871D4500A127CBC00B12A68 /* HTMLObjectElement.h */,
855542980AA4938800BA89F2 /* HTMLObjectElement.idl */,
@@ -12865,8 +13047,6 @@
E446139A0CD6331000FADA75 /* HTMLVideoElement.idl */,
BCCD74E40A4C8DDF005FDA6D /* HTMLViewSourceDocument.cpp */,
BCCD74DB0A4C8D35005FDA6D /* HTMLViewSourceDocument.h */,
- F5D3A57A106B83B300545297 /* ISODateTime.cpp */,
- F5D3A57B106B83B300545297 /* ISODateTime.h */,
A77979130D6B9D0C003851B9 /* ImageData.cpp */,
A77979140D6B9D0C003851B9 /* ImageData.h */,
A77979150D6B9D0C003851B9 /* ImageData.idl */,
@@ -12893,8 +13073,6 @@
A75E8B7F0E1DE2B0007F2481 /* filters */ = {
isa = PBXGroup;
children = (
- 84801952108BAFB300CB2B1F /* FEGaussianBlur.cpp */,
- 84801953108BAFB300CB2B1F /* FEGaussianBlur.h */,
A75E8B800E1DE2D6007F2481 /* FEBlend.cpp */,
A75E8B810E1DE2D6007F2481 /* FEBlend.h */,
A75E8B820E1DE2D6007F2481 /* FEColorMatrix.cpp */,
@@ -12903,6 +13081,8 @@
A75E8B850E1DE2D6007F2481 /* FEComponentTransfer.h */,
A75E8B860E1DE2D6007F2481 /* FEComposite.cpp */,
A75E8B870E1DE2D6007F2481 /* FEComposite.h */,
+ 84801952108BAFB300CB2B1F /* FEGaussianBlur.cpp */,
+ 84801953108BAFB300CB2B1F /* FEGaussianBlur.h */,
845E72F70FD261EE00A87D79 /* Filter.h */,
08C925170FCC7C4A00480DEC /* FilterEffect.cpp */,
08C925180FCC7C4A00480DEC /* FilterEffect.h */,
@@ -12917,50 +13097,16 @@
A83B79080CCAFF2B000B0825 /* HTML */ = {
isa = PBXGroup;
children = (
- A7D20F60107F406900A80392 /* JSWebGLActiveInfo.cpp */,
- A7D20F61107F406900A80392 /* JSWebGLActiveInfo.h */,
- 49EECF19105072F300099FAB /* JSWebGLArray.cpp */,
- 49EECF1A105072F300099FAB /* JSWebGLArray.h */,
- 49EECEF2105070C400099FAB /* JSWebGLArrayBuffer.cpp */,
- 49EECEF3105070C400099FAB /* JSWebGLArrayBuffer.h */,
- 49C7B9801042D2D30009D447 /* JSWebGLBuffer.cpp */,
- 49C7B9811042D2D30009D447 /* JSWebGLBuffer.h */,
- 49C7B9821042D2D30009D447 /* JSWebGLByteArray.cpp */,
- 49C7B9831042D2D30009D447 /* JSWebGLByteArray.h */,
- 49EECEF4105070C400099FAB /* JSWebGLFloatArray.cpp */,
- 49EECEF5105070C400099FAB /* JSWebGLFloatArray.h */,
- 49C7B9841042D2D30009D447 /* JSWebGLFramebuffer.cpp */,
- 49C7B9851042D2D30009D447 /* JSWebGLFramebuffer.h */,
+ 2E2D99CB10E2BBDA00496337 /* JSBlob.cpp */,
+ 2E2D99CC10E2BBDA00496337 /* JSBlob.h */,
65DF323309D1DE65000BE325 /* JSCanvasGradient.cpp */,
65DF323409D1DE65000BE325 /* JSCanvasGradient.h */,
- 49EECEF6105070C400099FAB /* JSWebGLIntArray.cpp */,
- 49EECEF7105070C400099FAB /* JSWebGLIntArray.h */,
65DF323509D1DE65000BE325 /* JSCanvasPattern.cpp */,
65DF323609D1DE65000BE325 /* JSCanvasPattern.h */,
- 49C7B9881042D2D30009D447 /* JSWebGLProgram.cpp */,
- 49C7B9891042D2D30009D447 /* JSWebGLProgram.h */,
- 49C7B98A1042D2D30009D447 /* JSWebGLRenderbuffer.cpp */,
- 49C7B98B1042D2D30009D447 /* JSWebGLRenderbuffer.h */,
49EED13C1051969400099FAB /* JSCanvasRenderingContext.cpp */,
49EED13D1051969400099FAB /* JSCanvasRenderingContext.h */,
49EED13E1051969400099FAB /* JSCanvasRenderingContext2D.cpp */,
49EED13F1051969400099FAB /* JSCanvasRenderingContext2D.h */,
- 49EED1401051969400099FAB /* JSWebGLRenderingContext.cpp */,
- 49EED1411051969400099FAB /* JSWebGLRenderingContext.h */,
- 49C7B98F1042D2D30009D447 /* JSWebGLShader.cpp */,
- 49C7B9901042D2D30009D447 /* JSWebGLShader.h */,
- 49EECEF8105070C400099FAB /* JSWebGLShortArray.cpp */,
- 49EECEF9105070C400099FAB /* JSWebGLShortArray.h */,
- 49C7B9911042D2D30009D447 /* JSWebGLTexture.cpp */,
- 49C7B9921042D2D30009D447 /* JSWebGLTexture.h */,
- 0C45342510CDBBFA00869157 /* JSWebGLUniformLocation.cpp */,
- 0C45342610CDBBFA00869157 /* JSWebGLUniformLocation.h */,
- 49EECEFA105070C400099FAB /* JSWebGLUnsignedByteArray.cpp */,
- 49EECEFB105070C400099FAB /* JSWebGLUnsignedByteArray.h */,
- 49EECEFC105070C400099FAB /* JSWebGLUnsignedIntArray.cpp */,
- 49EECEFD105070C400099FAB /* JSWebGLUnsignedIntArray.h */,
- 49EECEFE105070C400099FAB /* JSWebGLUnsignedShortArray.cpp */,
- 49EECEFF105070C400099FAB /* JSWebGLUnsignedShortArray.h */,
BC77D1650FF19F550070887B /* JSDataGridColumn.cpp */,
BC77D1660FF19F550070887B /* JSDataGridColumn.h */,
BC77D1670FF19F550070887B /* JSDataGridColumnList.cpp */,
@@ -13119,6 +13265,44 @@
E44614130CD6826900FADA75 /* JSTimeRanges.h */,
15C77092100D3CA8005BA267 /* JSValidityState.cpp */,
15C77091100D3CA8005BA267 /* JSValidityState.h */,
+ A7D20F60107F406900A80392 /* JSWebGLActiveInfo.cpp */,
+ A7D20F61107F406900A80392 /* JSWebGLActiveInfo.h */,
+ 49EECF19105072F300099FAB /* JSWebGLArray.cpp */,
+ 49EECF1A105072F300099FAB /* JSWebGLArray.h */,
+ 49EECEF2105070C400099FAB /* JSWebGLArrayBuffer.cpp */,
+ 49EECEF3105070C400099FAB /* JSWebGLArrayBuffer.h */,
+ 49C7B9801042D2D30009D447 /* JSWebGLBuffer.cpp */,
+ 49C7B9811042D2D30009D447 /* JSWebGLBuffer.h */,
+ 49C7B9821042D2D30009D447 /* JSWebGLByteArray.cpp */,
+ 49C7B9831042D2D30009D447 /* JSWebGLByteArray.h */,
+ 6EE8A77010F803F3005A4A24 /* JSWebGLContextAttributes.cpp */,
+ 6EE8A77110F803F3005A4A24 /* JSWebGLContextAttributes.h */,
+ 49EECEF4105070C400099FAB /* JSWebGLFloatArray.cpp */,
+ 49EECEF5105070C400099FAB /* JSWebGLFloatArray.h */,
+ 49C7B9841042D2D30009D447 /* JSWebGLFramebuffer.cpp */,
+ 49C7B9851042D2D30009D447 /* JSWebGLFramebuffer.h */,
+ 49EECEF6105070C400099FAB /* JSWebGLIntArray.cpp */,
+ 49EECEF7105070C400099FAB /* JSWebGLIntArray.h */,
+ 49C7B9881042D2D30009D447 /* JSWebGLProgram.cpp */,
+ 49C7B9891042D2D30009D447 /* JSWebGLProgram.h */,
+ 49C7B98A1042D2D30009D447 /* JSWebGLRenderbuffer.cpp */,
+ 49C7B98B1042D2D30009D447 /* JSWebGLRenderbuffer.h */,
+ 49EED1401051969400099FAB /* JSWebGLRenderingContext.cpp */,
+ 49EED1411051969400099FAB /* JSWebGLRenderingContext.h */,
+ 49C7B98F1042D2D30009D447 /* JSWebGLShader.cpp */,
+ 49C7B9901042D2D30009D447 /* JSWebGLShader.h */,
+ 49EECEF8105070C400099FAB /* JSWebGLShortArray.cpp */,
+ 49EECEF9105070C400099FAB /* JSWebGLShortArray.h */,
+ 49C7B9911042D2D30009D447 /* JSWebGLTexture.cpp */,
+ 49C7B9921042D2D30009D447 /* JSWebGLTexture.h */,
+ 0C45342510CDBBFA00869157 /* JSWebGLUniformLocation.cpp */,
+ 0C45342610CDBBFA00869157 /* JSWebGLUniformLocation.h */,
+ 49EECEFA105070C400099FAB /* JSWebGLUnsignedByteArray.cpp */,
+ 49EECEFB105070C400099FAB /* JSWebGLUnsignedByteArray.h */,
+ 49EECEFC105070C400099FAB /* JSWebGLUnsignedIntArray.cpp */,
+ 49EECEFD105070C400099FAB /* JSWebGLUnsignedIntArray.h */,
+ 49EECEFE105070C400099FAB /* JSWebGLUnsignedShortArray.cpp */,
+ 49EECEFF105070C400099FAB /* JSWebGLUnsignedShortArray.h */,
);
name = HTML;
sourceTree = "<group>";
@@ -13672,6 +13856,8 @@
B22277F30D00BF1F0071B782 /* SVGAnimatedPoints.idl */,
B22277F40D00BF1F0071B782 /* SVGAnimatedPreserveAspectRatio.idl */,
0878B1F910874E3F00A55097 /* SVGAnimatedProperty.h */,
+ 084D2831110A7FCB0038239A /* SVGAnimatedPropertySynchronizer.h */,
+ 084D2832110A7FCB0038239A /* SVGAnimatedPropertyTraits.h */,
B22277F50D00BF1F0071B782 /* SVGAnimatedRect.idl */,
B22277F60D00BF1F0071B782 /* SVGAnimatedString.idl */,
B22277F70D00BF1F0071B782 /* SVGAnimatedTemplate.h */,
@@ -13723,6 +13909,7 @@
B22278260D00BF1F0071B782 /* SVGElementInstanceList.cpp */,
B22278270D00BF1F0071B782 /* SVGElementInstanceList.h */,
B22278280D00BF1F0071B782 /* SVGElementInstanceList.idl */,
+ 081AA8D91111237E002AB06E /* SVGElementRareData.h */,
B22278290D00BF1F0071B782 /* SVGEllipseElement.cpp */,
B222782A0D00BF1F0071B782 /* SVGEllipseElement.h */,
B222782B0D00BF1F0071B782 /* SVGEllipseElement.idl */,
@@ -14060,9 +14247,6 @@
B2E4EC940D00C22B00432643 /* SVGZoomEvent.cpp */,
B2E4EC950D00C22B00432643 /* SVGZoomEvent.h */,
B2E4EC960D00C22B00432643 /* SVGZoomEvent.idl */,
- 0878B1FA10874E3F00A55097 /* SynchronizablePropertyController.cpp */,
- 0878B1FB10874E3F00A55097 /* SynchronizablePropertyController.h */,
- 0878B1FC10874E3F00A55097 /* SynchronizableTypeWrapper.h */,
B28C6A260D00C44800334AA4 /* xlinkattrs.in */,
);
path = svg;
@@ -14212,10 +14396,10 @@
B2A015910AF6CD53006BCE0E /* graphics */ = {
isa = PBXGroup;
children = (
- F4EAF4AB10C74268009100D3 /* opentype */,
B27535290B053814002CE64F /* cg */,
A75E8B7F0E1DE2B0007F2481 /* filters */,
B27535490B053814002CE64F /* mac */,
+ F4EAF4AB10C74268009100D3 /* opentype */,
49E911B20EF86D27009D0CAF /* transforms */,
A89943270B42338700D7C802 /* BitmapImage.cpp */,
A89943260B42338700D7C802 /* BitmapImage.h */,
@@ -14299,6 +14483,7 @@
B23540F10D00782E002382FA /* StringTruncator.h */,
930FC6891072B9280045293E /* TextRenderingMode.h */,
A824B4640E2EF2EA0081A7B7 /* TextRun.h */,
+ 37C28A6710F659CC008C7813 /* TypesettingFeatures.h */,
E4AFCFA40DAF29A300F5F55C /* UnitBezier.h */,
939B02EC0EA2DBC400C54570 /* WidthIterator.cpp */,
939B02ED0EA2DBC400C54570 /* WidthIterator.h */,
@@ -14444,14 +14629,8 @@
BC60901D0E91B8EC000C68B5 /* JSEventTarget.h */,
3314ACE910892086000F0E56 /* JSExceptionBase.cpp */,
3314ACEA10892086000F0E56 /* JSExceptionBase.h */,
- C09158840DB4209200E55AF4 /* JSInspectedObjectWrapper.cpp */,
- C09158850DB4209200E55AF4 /* JSInspectedObjectWrapper.h */,
- C09158860DB4209200E55AF4 /* JSInspectorCallbackWrapper.cpp */,
- C09158870DB4209200E55AF4 /* JSInspectorCallbackWrapper.h */,
93B70D4F09EB0C7C009D8468 /* JSPluginElementFunctions.cpp */,
93B70D5009EB0C7C009D8468 /* JSPluginElementFunctions.h */,
- C09158880DB4209200E55AF4 /* JSQuarantinedObjectWrapper.cpp */,
- C09158890DB4209200E55AF4 /* JSQuarantinedObjectWrapper.h */,
415B7C550FF598E6006770F7 /* JSSharedWorkerConstructor.cpp */,
415B7C620FF5A767006770F7 /* JSSharedWorkerConstructor.h */,
14CD8D81106B529000A46D23 /* JSSharedWorkerCustom.cpp */,
@@ -14485,6 +14664,7 @@
416F45EF0ED7B311008215B6 /* ScriptString.h */,
934CC0DF0ED39D6F00A658F2 /* ScriptValue.cpp */,
934CC0E00ED39D6F00A658F2 /* ScriptValue.h */,
+ 228C284410D82500009D0D0E /* ScriptWrappable.h */,
A75E497510752ACB00C9B896 /* SerializedScriptValue.cpp */,
A75E497410752ACB00C9B896 /* SerializedScriptValue.h */,
65488D6A0DD5A83D009D83B2 /* StringSourceProvider.h */,
@@ -14545,17 +14725,8 @@
children = (
415B7C540FF598E6006770F7 /* JSAbstractWorkerCustom.cpp */,
BC2ED6BB0C6BD2F000920BFF /* JSAttrCustom.cpp */,
- 492273A21083B3B100EE5C84 /* JSWebGLArrayCustom.cpp */,
- 49EECF7110508D9C00099FAB /* JSWebGLByteArrayCustom.cpp */,
- 49EECF7210508D9C00099FAB /* JSWebGLFloatArrayCustom.cpp */,
- 49EECF7310508D9C00099FAB /* JSWebGLIntArrayCustom.cpp */,
49EED14B1051971900099FAB /* JSCanvasRenderingContext2DCustom.cpp */,
- 49EED14C1051971A00099FAB /* JSWebGLRenderingContextCustom.cpp */,
49EED14D1051971A00099FAB /* JSCanvasRenderingContextCustom.cpp */,
- 49EECF7410508D9C00099FAB /* JSWebGLShortArrayCustom.cpp */,
- 49EECF7510508D9C00099FAB /* JSWebGLUnsignedByteArrayCustom.cpp */,
- 49EECF7610508D9C00099FAB /* JSWebGLUnsignedIntArrayCustom.cpp */,
- 49EECF7710508D9C00099FAB /* JSWebGLUnsignedShortArrayCustom.cpp */,
93BA59B10F2AA5FE008E8E99 /* JSCDATASectionCustom.cpp */,
93BA59B10F2AA5FE008E8E99 /* JSCDATASectionCustom.cpp */,
BCA83E510D7CE205003421A8 /* JSClipboardCustom.cpp */,
@@ -14600,6 +14771,7 @@
E0FEF371B57C53EAC1C1FBEE /* JSEventSourceCustom.cpp */,
FE80D7A60E9C1ED2000D6F75 /* JSGeolocationCustom.cpp */,
BCE7B1920D4E86960075A539 /* JSHistoryCustom.cpp */,
+ BC97E42B10915B060010D361 /* JSHTMLAllCollectionCustom.cpp */,
BC4EDEF30C08F3FB007EDD49 /* JSHTMLAppletElementCustom.cpp */,
9392262C1032107B006E7D5D /* JSHTMLCanvasElementCustom.cpp */,
BCCBAD3A0C18BFF800CE890F /* JSHTMLCollectionCustom.cpp */,
@@ -14640,22 +14812,30 @@
51D0C5150DAA90B7003B3831 /* JSStorageCustom.cpp */,
BC98A27C0C0C9950004BEBF7 /* JSStyleSheetCustom.cpp */,
A84EBD770CB8C89200079609 /* JSStyleSheetListCustom.cpp */,
+ 082FCAC3110927CE00CC4821 /* JSSVGContextCache.h */,
08A48A6D0E86CF6D00E225DD /* JSSVGElementInstanceCustom.cpp */,
08E4FE450E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp */,
B25DFAAE0B2E2929000E6510 /* JSSVGMatrixCustom.cpp */,
B2C96D8C0B3AF2B7005E80EC /* JSSVGPathSegCustom.cpp */,
B297BC6F0B3C14CF0045A590 /* JSSVGPathSegListCustom.cpp */,
- 516BB7910CE91E6800512F79 /* JSSVGPointListCustom.cpp */,
- B2D3FC890C2212CB00CF3618 /* JSSVGTransformListCustom.cpp */,
+ 087D97BE10FB8D7700C00874 /* JSSVGPODListCustom.h */,
1A2C40AA0DEB55AA005AF19E /* JSTextCustom.cpp */,
516BB7920CE91E6800512F79 /* JSTreeWalkerCustom.cpp */,
+ 492273A21083B3B100EE5C84 /* JSWebGLArrayCustom.cpp */,
+ 49EECF7110508D9C00099FAB /* JSWebGLByteArrayCustom.cpp */,
+ 49EECF7210508D9C00099FAB /* JSWebGLFloatArrayCustom.cpp */,
+ 49EECF7310508D9C00099FAB /* JSWebGLIntArrayCustom.cpp */,
+ 49EED14C1051971A00099FAB /* JSWebGLRenderingContextCustom.cpp */,
+ 49EECF7410508D9C00099FAB /* JSWebGLShortArrayCustom.cpp */,
+ 49EECF7510508D9C00099FAB /* JSWebGLUnsignedByteArrayCustom.cpp */,
+ 49EECF7610508D9C00099FAB /* JSWebGLUnsignedIntArrayCustom.cpp */,
+ 49EECF7710508D9C00099FAB /* JSWebGLUnsignedShortArrayCustom.cpp */,
518A34C61026C8C9001B6896 /* JSWebSocketCustom.cpp */,
E18258AB0EF3CD7000933242 /* JSWorkerContextCustom.cpp */,
E1CA5CBB0E8CDCAF00E8EF90 /* JSWorkerCustom.cpp */,
BC348BBD0DB7F531004ABAB9 /* JSXMLHttpRequestCustom.cpp */,
BCDFD4910E3056BD009D10AD /* JSXMLHttpRequestUploadCustom.cpp */,
BCEFE1E40DCA5F3300739219 /* JSXSLTProcessorCustom.cpp */,
- BC97E42B10915B060010D361 /* JSHTMLAllCollectionCustom.cpp */,
);
name = Custom;
sourceTree = "<group>";
@@ -14920,6 +15100,16 @@
children = (
E4EEFFC60D34550C00469A58 /* JSAudioConstructor.cpp */,
E4EEFFC70D34550C00469A58 /* JSAudioConstructor.h */,
+ E0FEF371B77C53EAC1C1FBEE /* JSEventSourceConstructor.cpp */,
+ E0FEF371B67C53EAC1C1FBEE /* JSEventSourceConstructor.h */,
+ BC6C49F10D7DBA0500FFA558 /* JSImageConstructor.cpp */,
+ BC6C49F20D7DBA0500FFA558 /* JSImageConstructor.h */,
+ E10743230E7835830033AF24 /* JSMessageChannelConstructor.cpp */,
+ E10743260E7835A50033AF24 /* JSMessageChannelConstructor.h */,
+ A826E8AD0A1A8F2300CD1BB6 /* JSOptionConstructor.cpp */,
+ A826E8AC0A1A8F2300CD1BB6 /* JSOptionConstructor.h */,
+ 415B7C550FF598E6006770F7 /* JSSharedWorkerConstructor.cpp */,
+ 415B7C620FF5A767006770F7 /* JSSharedWorkerConstructor.h */,
49EECF991050938200099FAB /* JSWebGLArrayBufferConstructor.cpp */,
49EECF9A1050938200099FAB /* JSWebGLArrayBufferConstructor.h */,
49EECF9B1050938200099FAB /* JSWebGLByteArrayConstructor.cpp */,
@@ -14936,16 +15126,6 @@
49EECFA81050938200099FAB /* JSWebGLUnsignedIntArrayConstructor.h */,
49EECFA91050938200099FAB /* JSWebGLUnsignedShortArrayConstructor.cpp */,
49EECFAA1050938200099FAB /* JSWebGLUnsignedShortArrayConstructor.h */,
- E0FEF371B77C53EAC1C1FBEE /* JSEventSourceConstructor.cpp */,
- E0FEF371B67C53EAC1C1FBEE /* JSEventSourceConstructor.h */,
- BC6C49F10D7DBA0500FFA558 /* JSImageConstructor.cpp */,
- BC6C49F20D7DBA0500FFA558 /* JSImageConstructor.h */,
- E10743230E7835830033AF24 /* JSMessageChannelConstructor.cpp */,
- E10743260E7835A50033AF24 /* JSMessageChannelConstructor.h */,
- A826E8AD0A1A8F2300CD1BB6 /* JSOptionConstructor.cpp */,
- A826E8AC0A1A8F2300CD1BB6 /* JSOptionConstructor.h */,
- 415B7C550FF598E6006770F7 /* JSSharedWorkerConstructor.cpp */,
- 415B7C620FF5A767006770F7 /* JSSharedWorkerConstructor.h */,
498391610F1E8EE100C23782 /* JSWebKitCSSMatrixConstructor.cpp */,
498391620F1E8EE100C23782 /* JSWebKitCSSMatrixConstructor.h */,
494BD7970F55C90E00747828 /* JSWebKitPointConstructor.cpp */,
@@ -15328,6 +15508,7 @@
93CA4C9A09DF93FA00DF8677 /* make-css-file-arrays.pl */,
93CA4C9B09DF93FA00DF8677 /* makeprop.pl */,
93CA4C9D09DF93FA00DF8677 /* makevalues.pl */,
+ FA654A631108ABB7002615E0 /* mathml.css */,
0FF5026E102BA9660066F39A /* Media.cpp */,
0FF5026F102BA96A0066F39A /* Media.h */,
0FF50270102BA96A0066F39A /* Media.idl */,
@@ -15441,6 +15622,8 @@
9392F1410AD185F400691BD4 /* RenderCounter.h */,
BC77CEC70FF01CBE0070887B /* RenderDataGrid.cpp */,
BC77CEB20FF017F20070887B /* RenderDataGrid.h */,
+ 0F5B7A5210F65D7A00376302 /* RenderEmbeddedObject.cpp */,
+ 0F5B7A5310F65D7A00376302 /* RenderEmbeddedObject.h */,
A8EA73AF0A1900E300A8EF5F /* RenderFieldset.cpp */,
A8EA73B00A1900E300A8EF5F /* RenderFieldset.h */,
066C772E0AB603FD00238CC4 /* RenderFileUploadControl.cpp */,
@@ -15531,6 +15714,8 @@
A8F5C0B60F9285AC0098E06B /* RenderSVGModelObject.h */,
AA31B5B20C1DFD1000AE7083 /* RenderSVGRoot.cpp */,
AA31B5B30C1DFD1000AE7083 /* RenderSVGRoot.h */,
+ 08DAB9B81103D9A5003E7ABA /* RenderSVGShadowTreeRootContainer.cpp */,
+ 08DAB9B91103D9A5003E7ABA /* RenderSVGShadowTreeRootContainer.h */,
853CA9D20AEEC5E9002372DC /* RenderSVGText.cpp */,
853CA9D30AEEC5E9002372DC /* RenderSVGText.h */,
B26554E80B80D74900A50EC3 /* RenderSVGTextPath.cpp */,
@@ -15585,15 +15770,21 @@
853CA9E30AEEC608002372DC /* SVGInlineFlowBox.h */,
AA0972CA0B6947A800A705E9 /* SVGInlineTextBox.cpp */,
AA0972CB0B6947A800A705E9 /* SVGInlineTextBox.h */,
+ 08385FF510F0186000BFE07B /* SVGMarkerData.h */,
+ 08735FB610E91232006D6FAD /* SVGMarkerLayoutInfo.cpp */,
+ 08735FB710E91232006D6FAD /* SVGMarkerLayoutInfo.h */,
A8F4FB950C169E85002AFED5 /* SVGRenderSupport.cpp */,
A8F4FB930C169E7B002AFED5 /* SVGRenderSupport.h */,
B2EBDC9A0AF77E3400AE4A68 /* SVGRenderTreeAsText.cpp */,
B2EBDC9B0AF77E3400AE4A68 /* SVGRenderTreeAsText.h */,
853CA9E40AEEC608002372DC /* SVGRootInlineBox.cpp */,
853CA9E50AEEC608002372DC /* SVGRootInlineBox.h */,
+ 08DAB9C01103D9C1003E7ABA /* SVGShadowTreeElements.cpp */,
+ 08DAB9C11103D9C1003E7ABA /* SVGShadowTreeElements.h */,
A8CFF04C0A154F09000A4234 /* TableLayout.h */,
AB014DE10E689A4300E10445 /* TextControlInnerElements.cpp */,
AB014DE20E689A4300E10445 /* TextControlInnerElements.h */,
+ 37FC96DA1104ED71003E1FAD /* TrailingFloatsRootInlineBox.h */,
0F500AB00F54DB3100EEF928 /* TransformState.cpp */,
0F500AAE0F54DB1B00EEF928 /* TransformState.h */,
);
@@ -15650,6 +15841,7 @@
79F2F5A01091939A000D87CB /* CompositionEvent.idl */,
A81872140977D3C0005826D9 /* ContainerNode.cpp */,
A81872110977D3C0005826D9 /* ContainerNode.h */,
+ E1A1470711102B1500EEC0F3 /* ContainerNodeAlgorithms.h */,
A8C4A7F809D563270003AC8D /* CSSMappedAttributeDeclaration.cpp */,
A8C4A7F709D563270003AC8D /* CSSMappedAttributeDeclaration.h */,
A8185F3409765765005826D9 /* Document.cpp */,
@@ -15849,13 +16041,18 @@
FABE72EC1059C1EB00D999DD /* mathml */ = {
isa = PBXGroup;
children = (
+ FA654A671108ABE2002615E0 /* mathattrs.in */,
FABE72ED1059C1EB00D999DD /* MathMLElement.cpp */,
FABE72EE1059C1EB00D999DD /* MathMLElement.h */,
FABE72EF1059C1EB00D999DD /* MathMLInlineContainerElement.cpp */,
FABE72F01059C1EB00D999DD /* MathMLInlineContainerElement.h */,
FABE72F11059C1EB00D999DD /* MathMLMathElement.cpp */,
FABE72F21059C1EB00D999DD /* MathMLMathElement.h */,
+ FA654A691108ABED002615E0 /* MathMLTextElement.cpp */,
+ FA654A6A1108ABED002615E0 /* MathMLTextElement.h */,
FABE72F31059C1EB00D999DD /* mathtags.in */,
+ FA654A6D1108ABFF002615E0 /* RenderMathMLBlock.cpp */,
+ FA654A6E1108ABFF002615E0 /* RenderMathMLBlock.h */,
);
path = mathml;
sourceTree = "<group>";
@@ -15875,9 +16072,13 @@
29A812430FBB9C1D00510293 /* AccessibilityListBox.h in Headers */,
29A812420FBB9C1D00510293 /* AccessibilityListBoxOption.h in Headers */,
07B0113F1032242200FBDC33 /* AccessibilityMediaControls.h in Headers */,
+ 76CDD2F31103DA6600680521 /* AccessibilityMenuList.h in Headers */,
+ 76CDD2F71103DA6600680521 /* AccessibilityMenuListOption.h in Headers */,
+ 76CDD2F51103DA6600680521 /* AccessibilityMenuListPopup.h in Headers */,
29A812360FBB9C1D00510293 /* AccessibilityObject.h in Headers */,
29A812490FBB9CA900510293 /* AccessibilityObjectWrapper.h in Headers */,
29A812390FBB9C1D00510293 /* AccessibilityRenderObject.h in Headers */,
+ 93C4F6EB1108F9A50099D0DB /* AccessibilityScrollbar.h in Headers */,
0709FC4E1025DEE30059CDBA /* AccessibilitySlider.h in Headers */,
29A8122B0FBB9C1D00510293 /* AccessibilityTable.h in Headers */,
29A812320FBB9C1D00510293 /* AccessibilityTableCell.h in Headers */,
@@ -15909,6 +16110,7 @@
A8C4A80B09D563270003AC8D /* Attribute.h in Headers */,
934F71440D5A6F5300018D69 /* AuthenticationChallenge.h in Headers */,
934F713A0D5A6F1000018D69 /* AuthenticationChallengeBase.h in Headers */,
+ E124748410AA161D00B79493 /* AuthenticationClient.h in Headers */,
514C764C0CE9234E007EF3CD /* AuthenticationMac.h in Headers */,
51E1ECB30C91C55600DC255B /* AutodrainedPool.h in Headers */,
A8CFF04E0A154F09000A4234 /* AutoTableLayout.h in Headers */,
@@ -15924,11 +16126,14 @@
938192050F87E1EC00D5352A /* BinaryPropertyList.h in Headers */,
BC5EB9200E82040800B25965 /* BindingURI.h in Headers */,
A89943280B42338800D7C802 /* BitmapImage.h in Headers */,
+ 2EAFAF0F10E2AF2D007ED3D6 /* Blob.h in Headers */,
93F199BE08245E59001E9ABC /* BlockExceptions.h in Headers */,
BC5EB5E10E81BE8700B25965 /* BorderData.h in Headers */,
BC5EB5DB0E81B7EA00B25965 /* BorderValue.h in Headers */,
BCEA4855097D93020094C9E4 /* break_lines.h in Headers */,
93309DDB099E64920056E581 /* BreakBlockquoteCommand.h in Headers */,
+ 599E759011055A1F00D904FA /* Bridge.h in Headers */,
+ 59B5977511086579007159E8 /* BridgeJSC.h in Headers */,
1A569CF80D7E2B82007C3983 /* c_class.h in Headers */,
1A569CFA0D7E2B82007C3983 /* c_instance.h in Headers */,
1A569CFC0D7E2B82007C3983 /* c_runtime.h in Headers */,
@@ -15950,30 +16155,14 @@
BCB16C280979C3BD00467741 /* CachedXSLStyleSheet.h in Headers */,
93F1995008245E59001E9ABC /* CachePolicy.h in Headers */,
49C7BA001042D38C0009D447 /* Canvas3DLayer.h in Headers */,
- A7D20F6D107F438B00A80392 /* WebGLActiveInfo.h in Headers */,
- 49EECDE010503C2400099FAB /* WebGLArray.h in Headers */,
- 49EECDE310503C2400099FAB /* WebGLArrayBuffer.h in Headers */,
- 49C7B9C91042D32F0009D447 /* WebGLBuffer.h in Headers */,
- 49C7B9CC1042D32F0009D447 /* WebGLByteArray.h in Headers */,
- 49EECDE610503C2400099FAB /* WebGLFloatArray.h in Headers */,
- 49C7B9CF1042D32F0009D447 /* WebGLFramebuffer.h in Headers */,
+ 6E4E91AD10F7FB3100A2779C /* CanvasContextAttributes.h in Headers */,
49484FC2102CF23C00187DD3 /* CanvasGradient.h in Headers */,
- 49EECDE910503C2400099FAB /* WebGLIntArray.h in Headers */,
49C7B9D51042D32F0009D447 /* CanvasObject.h in Headers */,
49484FC5102CF23C00187DD3 /* CanvasPattern.h in Headers */,
49484FC8102CF23C00187DD3 /* CanvasPixelArray.h in Headers */,
- 49C7B9D71042D32F0009D447 /* WebGLProgram.h in Headers */,
- 49C7B9DA1042D32F0009D447 /* WebGLRenderbuffer.h in Headers */,
49C7B9DD1042D32F0009D447 /* CanvasRenderingContext.h in Headers */,
49484FCB102CF23C00187DD3 /* CanvasRenderingContext2D.h in Headers */,
- 49C7B9E01042D32F0009D447 /* WebGLRenderingContext.h in Headers */,
- 49C7B9E31042D32F0009D447 /* WebGLShader.h in Headers */,
- 49EECDEC10503C2400099FAB /* WebGLShortArray.h in Headers */,
49484FCE102CF23C00187DD3 /* CanvasStyle.h in Headers */,
- 49C7B9E61042D32F0009D447 /* WebGLTexture.h in Headers */,
- 49EECDEF10503C2400099FAB /* WebGLUnsignedByteArray.h in Headers */,
- 49EECDF210503C2400099FAB /* WebGLUnsignedIntArray.h in Headers */,
- 49EECDF510503C2400099FAB /* WebGLUnsignedShortArray.h in Headers */,
6550B69E099DF0270090D781 /* CDATASection.h in Headers */,
514185EE0CD65F0400763C99 /* ChangeVersionWrapper.h in Headers */,
6550B6A0099DF0270090D781 /* CharacterData.h in Headers */,
@@ -15996,7 +16185,9 @@
B27535670B053814002CE64F /* Color.h in Headers */,
B22279630D00BF220071B782 /* ColorDistance.h in Headers */,
EDE3A5000C7A430600956A37 /* ColorMac.h in Headers */,
+ 9382DF5810A8D5C900925652 /* ColorSpace.h in Headers */,
6550B6A2099DF0270090D781 /* Comment.h in Headers */,
+ 37C236111097EE7700EF9F72 /* ComplexTextController.h in Headers */,
316FE1160E6E1DA700BF6088 /* CompositeAnimation.h in Headers */,
93309DDD099E64920056E581 /* CompositeEditCommand.h in Headers */,
79F2F5A21091939A000D87CB /* CompositionEvent.h in Headers */,
@@ -16004,12 +16195,14 @@
BC0B36A50CD3C67C00AC7EB5 /* Console.h in Headers */,
41F0618E0F5F069800A07EAC /* ConsoleMessage.h in Headers */,
A818721C0977D3C0005826D9 /* ContainerNode.h in Headers */,
+ E1A1470811102B1500EEC0F3 /* ContainerNodeAlgorithms.h in Headers */,
BC5EB9810E82072500B25965 /* ContentData.h in Headers */,
41D015CA0F4B5C71004A662F /* ContentType.h in Headers */,
93B6A0E60B0BCA5C00F5027A /* ContextMenu.h in Headers */,
065AD4F50B0C2EDA005A2B1D /* ContextMenuClient.h in Headers */,
065AD4F70B0C2EDA005A2B1D /* ContextMenuController.h in Headers */,
06027CAD0B1CBFC000884B2D /* ContextMenuItem.h in Headers */,
+ 7ADE722610CBBB9B006B3B3A /* ContextMenuProvider.h in Headers */,
D8B6152F1032495100C8554A /* Cookie.h in Headers */,
9352088209BD45E900F2038D /* CookieJar.h in Headers */,
FE6FD4880F676E5700092873 /* Coordinates.h in Headers */,
@@ -16092,6 +16285,7 @@
BC77CFAC0FF173D30070887B /* DataGridColumnList.h in Headers */,
BCBCAE370FF19385000762AE /* DataGridDataSource.h in Headers */,
BC22746F0E83664500E7F975 /* DataRef.h in Headers */,
+ F5D3A57D106B83B300545297 /* DateComponents.h in Headers */,
4162A451101145AE00DFF3ED /* DedicatedWorkerContext.h in Headers */,
41A3D58F101C152D00316D07 /* DedicatedWorkerThread.h in Headers */,
4167EBF6102962BA003D252A /* DefaultSharedWorkerRepository.h in Headers */,
@@ -16117,6 +16311,8 @@
85D389B20A991A7F00282145 /* DOMAttr.h in Headers */,
85E7118D0AC5D5350053270F /* DOMAttrInternal.h in Headers */,
BC946EEF107FDBAC00857193 /* DOMBeforeLoadEvent.h in Headers */,
+ 2E2D99E710E2BC1C00496337 /* DOMBlob.h in Headers */,
+ 2E2D99EA10E2BC3800496337 /* DOMBlobInternal.h in Headers */,
85089CD70A98C42800A275AA /* DOMCDATASection.h in Headers */,
85E7118E0AC5D5350053270F /* DOMCDATASectionInternal.h in Headers */,
85ACA9860A9B520300671E90 /* DOMCharacterData.h in Headers */,
@@ -16880,6 +17076,7 @@
A75E8B8B0E1DE2D6007F2481 /* FEColorMatrix.h in Headers */,
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 */,
BCDBB8AC0E088CA500C60FF6 /* FileList.h in Headers */,
@@ -16932,6 +17129,10 @@
BCE04C8A0DAFF7A0007A0F41 /* Generator.h in Headers */,
2E4346440F546A8200B0F1BA /* GenericWorkerTask.h in Headers */,
FE80D7C60E9C1F25000D6F75 /* Geolocation.h in Headers */,
+ BC56CB2210D5AC8000A77C64 /* GeolocationController.h in Headers */,
+ BC56CB2310D5AC8000A77C64 /* GeolocationControllerClient.h in Headers */,
+ BC56CB2410D5AC8000A77C64 /* GeolocationError.h in Headers */,
+ BC56CB2510D5AC8000A77C64 /* GeolocationPosition.h in Headers */,
FEAB90130EA51B9C006348C3 /* GeolocationService.h in Headers */,
BCE494AB0F4F5E9E0084E319 /* GeolocationServiceMac.h in Headers */,
59C77F2B10545B3B00506104 /* GeolocationServiceMock.h in Headers */,
@@ -16957,6 +17158,7 @@
930908910AF7EDE40081DF01 /* HitTestRequest.h in Headers */,
9307F1D80AF2D59000DBA31A /* HitTestResult.h in Headers */,
BC3BC29C0E91AB0F00835588 /* HostWindow.h in Headers */,
+ BC97E23A109144950010D361 /* HTMLAllCollection.h in Headers */,
A8CFF7AB0A156978000A4234 /* HTMLAnchorElement.h in Headers */,
A871D45D0A127CBC00B12A68 /* HTMLAppletElement.h in Headers */,
A8EA7D2E0A19385500A8EF5F /* HTMLAreaElement.h in Headers */,
@@ -17013,6 +17215,7 @@
A871DC240A15205700B12A68 /* HTMLMetaElement.h in Headers */,
A8CFF7A70A156978000A4234 /* HTMLModElement.h in Headers */,
A8DF3FD4097FA0FC0052981B /* HTMLNameCollection.h in Headers */,
+ CE4C00E610F6F7C100CA38F5 /* HTMLNoScriptElement.h in Headers */,
A871D45A0A127CBC00B12A68 /* HTMLObjectElement.h in Headers */,
A8EA79F10A1916DF00A8EF5F /* HTMLOListElement.h in Headers */,
A81369DE097374F600D74463 /* HTMLOptGroupElement.h in Headers */,
@@ -17047,7 +17250,6 @@
BCCD74DC0A4C8D35005FDA6D /* HTMLViewSourceDocument.h in Headers */,
514C76710CE923A1007EF3CD /* HTTPHeaderMap.h in Headers */,
514C76730CE923A1007EF3CD /* HTTPParsers.h in Headers */,
- F5D3A57D106B83B300545297 /* ISODateTime.h in Headers */,
B275356E0B053814002CE64F /* Icon.h in Headers */,
5126E6BC0A2E3B12005C29FA /* IconDatabase.h in Headers */,
51E1ECBE0C91C90400DC255B /* IconDatabaseClient.h in Headers */,
@@ -17066,6 +17268,7 @@
4B3480940EEF50D400AC1B41 /* ImageSourceCG.h in Headers */,
316FE1180E6E1DA700BF6088 /* ImplicitAnimation.h in Headers */,
DB23C2CC0A508D29002489EB /* IndentOutdentCommand.h in Headers */,
+ 7A0E76FA10BF08ED00A0276E /* InjectedScriptHost.h in Headers */,
A8CFF5E50A155A05000A4234 /* InlineBox.h in Headers */,
A8CFF5E30A155A05000A4234 /* InlineFlowBox.h in Headers */,
A8CFF5E20A155A05000A4234 /* InlineRunBox.h in Headers */,
@@ -17084,60 +17287,49 @@
7A24587C1021EAF4000A00AA /* InspectorDOMAgent.h in Headers */,
41F061740F5F00AC00A07EAC /* InspectorDOMStorageResource.h in Headers */,
7AED3E060FBB1EAA00D2B03C /* InspectorFrontend.h in Headers */,
+ 7A0E770F10C00A8800A0276E /* InspectorFrontendHost.h in Headers */,
41F062010F5F0B6600A07EAC /* InspectorResource.h in Headers */,
754133A8102E00E800075D00 /* InspectorTimelineAgent.h in Headers */,
B27535720B053814002CE64F /* IntPoint.h in Headers */,
B27535740B053814002CE64F /* IntRect.h in Headers */,
B27535750B053814002CE64F /* IntSize.h in Headers */,
B27535760B053814002CE64F /* IntSizeHash.h in Headers */,
+ 59E560A71105336600AA1258 /* JavaClassJSC.h in Headers */,
+ 59A9E7B21104759400DFB4C1 /* JavaInstanceJSC.h in Headers */,
1C81BA0A0E97348300266E07 /* JavaScriptCallFrame.h in Headers */,
1C81BA0C0E97348300266E07 /* JavaScriptDebugListener.h in Headers */,
1C81BA0E0E97348300266E07 /* JavaScriptDebugServer.h in Headers */,
1C81BA010E9733CB00266E07 /* JavaScriptProfile.h in Headers */,
1C81B9FF0E9733CB00266E07 /* JavaScriptProfileNode.h in Headers */,
+<<<<<<< HEAD
+ 1A569D040D7E2B82007C3983 /* jni_jsobject.h in Headers */,
+=======
+ 59BC393F11054A1300FD85DB /* JavaStringJSC.h in Headers */,
1A569D040D7E2B82007C3983 /* jni_jsobject.h in Headers */,
+ 5913953B110758450083EC55 /* JNIBridge.h in Headers */,
+ 59E842661109E5A2000305AD /* JNIBridgeJSC.h in Headers */,
+ 59EE12321106082900885116 /* JNIUtility.h in Headers */,
+ 59EE122E1106080F00885116 /* JNIUtilityPrivate.h in Headers */,
+>>>>>>> webkit.org at r54127
93309DF4099E64920056E581 /* JoinTextNodesCommand.h in Headers */,
418F88050FF957AF0080F045 /* JSAbstractWorker.h in Headers */,
65DF31DB09D1C123000BE325 /* JSAttr.h in Headers */,
E4EEFFC90D34550C00469A58 /* JSAudioConstructor.h in Headers */,
BC124F000C26447A009E2349 /* JSBarInfo.h in Headers */,
BC946348107A936600857193 /* JSBeforeLoadEvent.h in Headers */,
+ 2E2D99CE10E2BBDA00496337 /* JSBlob.h in Headers */,
1449E24C107D4A8400B5793F /* JSCallbackData.h in Headers */,
- A7D20F63107F406900A80392 /* JSWebGLActiveInfo.h in Headers */,
- 49EECF1C105072F300099FAB /* JSWebGLArray.h in Headers */,
- 49EECF01105070C400099FAB /* JSWebGLArrayBuffer.h in Headers */,
- 49EECFAC1050938200099FAB /* JSWebGLArrayBufferConstructor.h in Headers */,
- 49C7B9941042D2D30009D447 /* JSWebGLBuffer.h in Headers */,
- 49C7B9961042D2D30009D447 /* JSWebGLByteArray.h in Headers */,
- 49EECFAE1050938200099FAB /* JSWebGLByteArrayConstructor.h in Headers */,
- 49EECF03105070C400099FAB /* JSWebGLFloatArray.h in Headers */,
- 49EECFB01050938200099FAB /* JSWebGLFloatArrayConstructor.h in Headers */,
- 49C7B9981042D2D30009D447 /* JSWebGLFramebuffer.h in Headers */,
65DF323A09D1DE65000BE325 /* JSCanvasGradient.h in Headers */,
- 49EECF05105070C400099FAB /* JSWebGLIntArray.h in Headers */,
- 49EECFB21050938200099FAB /* JSWebGLIntArrayConstructor.h in Headers */,
65DF323C09D1DE65000BE325 /* JSCanvasPattern.h in Headers */,
- 49C7B99C1042D2D30009D447 /* JSWebGLProgram.h in Headers */,
- 49C7B99E1042D2D30009D447 /* JSWebGLRenderbuffer.h in Headers */,
49EED1431051969400099FAB /* JSCanvasRenderingContext.h in Headers */,
49EED1451051969400099FAB /* JSCanvasRenderingContext2D.h in Headers */,
- 49EED1471051969400099FAB /* JSWebGLRenderingContext.h in Headers */,
- 49C7B9A31042D2D30009D447 /* JSWebGLShader.h in Headers */,
- 49EECF07105070C400099FAB /* JSWebGLShortArray.h in Headers */,
- 49EECFB61050938200099FAB /* JSWebGLShortArrayConstructor.h in Headers */,
- 49C7B9A51042D2D30009D447 /* JSWebGLTexture.h in Headers */,
- 49EECF09105070C400099FAB /* JSWebGLUnsignedByteArray.h in Headers */,
- 49EECFB81050938200099FAB /* JSWebGLUnsignedByteArrayConstructor.h in Headers */,
- 49EECF0B105070C400099FAB /* JSWebGLUnsignedIntArray.h in Headers */,
- 49EECFBA1050938200099FAB /* JSWebGLUnsignedIntArrayConstructor.h in Headers */,
- 49EECF0D105070C400099FAB /* JSWebGLUnsignedShortArray.h in Headers */,
- 49EECFBC1050938200099FAB /* JSWebGLUnsignedShortArrayConstructor.h in Headers */,
93F9B7A10BA6032600854064 /* JSCDATASection.h in Headers */,
65DF31F409D1CC60000BE325 /* JSCharacterData.h in Headers */,
BCC065880F3CE2A700CD2D87 /* JSClientRect.h in Headers */,
BCC0658A0F3CE2A700CD2D87 /* JSClientRectList.h in Headers */,
BCA83E500D7CE1E9003421A8 /* JSClipboard.h in Headers */,
93F9B6E10BA0FB7200854064 /* JSComment.h in Headers */,
+ 79AC9219109945C80021266E /* JSCompositionEvent.h in Headers */,
BC98543E0CD3D98C00069BC1 /* JSConsole.h in Headers */,
FE6FD48E0F676E9300092873 /* JSCoordinates.h in Headers */,
930705DA09E0C9BF00B17FE4 /* JSCounter.h in Headers */,
@@ -17164,7 +17356,6 @@
51EC926A0CE90DD400F90308 /* JSCustomSQLTransactionErrorCallback.h in Headers */,
1A3417C90CECFF250049CBDE /* JSCustomVoidCallback.h in Headers */,
E10B937C0B73C00A003ED890 /* JSCustomXPathNSResolver.h in Headers */,
- 79AC9219109945C80021266E /* JSCompositionEvent.h in Headers */,
1AE82F900CAAFA9D002237AE /* JSDatabase.h in Headers */,
BC77D16A0FF19F560070887B /* JSDataGridColumn.h in Headers */,
BC77D16C0FF19F560070887B /* JSDataGridColumnList.h in Headers */,
@@ -17193,11 +17384,13 @@
E0FEF372B37C53EAC1C1FBEE /* JSEventSource.h in Headers */,
E0FEF372B67C53EAC1C1FBEE /* JSEventSourceConstructor.h in Headers */,
BC60901F0E91B8EC000C68B5 /* JSEventTarget.h in Headers */,
+ 3314ACEC10892086000F0E56 /* JSExceptionBase.h in Headers */,
BC00F0150E0A189500FD04E3 /* JSFile.h in Headers */,
BC00F0170E0A189500FD04E3 /* JSFileList.h in Headers */,
FE80DA640E9C4703000D6F75 /* JSGeolocation.h in Headers */,
FE80DA660E9C4703000D6F75 /* JSGeoposition.h in Headers */,
BC94D14F0C275C68006BC617 /* JSHistory.h in Headers */,
+ BC97E413109154FA0010D361 /* JSHTMLAllCollection.h in Headers */,
1A4A2DF00A1B852A00C807F8 /* JSHTMLAnchorElement.h in Headers */,
1A4A2DF20A1B852A00C807F8 /* JSHTMLAppletElement.h in Headers */,
1AE2AA1F0A1CDAB400B42B25 /* JSHTMLAreaElement.h in Headers */,
@@ -17271,9 +17464,9 @@
E44614170CD6826900FADA75 /* JSHTMLVideoElement.h in Headers */,
BC6C49F40D7DBA0500FFA558 /* JSImageConstructor.h in Headers */,
A77979290D6B9E64003851B9 /* JSImageData.h in Headers */,
- C091588B0DB4209200E55AF4 /* JSInspectedObjectWrapper.h in Headers */,
+ 7A0E76DB10BF059800A0276E /* JSInjectedScriptHost.h in Headers */,
41F060CE0F5EEB2B00A07EAC /* JSInspectorBackend.h in Headers */,
- C091588D0DB4209200E55AF4 /* JSInspectorCallbackWrapper.h in Headers */,
+ 7A0E771F10C00DB100A0276E /* JSInspectorFrontendHost.h in Headers */,
1C5FAED20DCFD90100D58F78 /* JSJavaScriptCallFrame.h in Headers */,
A86629D309DA2B48009633A5 /* JSKeyboardEvent.h in Headers */,
935F45430F7C3B5F00D7C1FB /* JSLazyEventListener.h in Headers */,
@@ -17305,10 +17498,10 @@
A9D247FF0D757E6900FDF959 /* JSPlugin.h in Headers */,
A9D248010D757E6900FDF959 /* JSPluginArray.h in Headers */,
93B70D6C09EB0C7C009D8468 /* JSPluginElementFunctions.h in Headers */,
+ 5189F01E10B37BD900F3C739 /* JSPopStateEvent.h in Headers */,
FE80DA720E9C472F000D6F75 /* JSPositionError.h in Headers */,
65DF320009D1CC60000BE325 /* JSProcessingInstruction.h in Headers */,
E44613EE0CD681BB00FADA75 /* JSProgressEvent.h in Headers */,
- C091588F0DB4209200E55AF4 /* JSQuarantinedObjectWrapper.h in Headers */,
65DF320209D1CC60000BE325 /* JSRange.h in Headers */,
D23CA55D0AB0EAAE005108A5 /* JSRangeException.h in Headers */,
BCFE2F120C1B58380020235F /* JSRect.h in Headers */,
@@ -17347,6 +17540,7 @@
B2FA3D5B0AB75A6F000E5AC4 /* JSSVGClipPathElement.h in Headers */,
B2FA3D5D0AB75A6F000E5AC4 /* JSSVGColor.h in Headers */,
B2FA3D5F0AB75A6F000E5AC4 /* JSSVGComponentTransferFunctionElement.h in Headers */,
+ 082FCAC4110927CE00CC4821 /* JSSVGContextCache.h in Headers */,
B2FA3D610AB75A6F000E5AC4 /* JSSVGCursorElement.h in Headers */,
B2FA3D630AB75A6F000E5AC4 /* JSSVGDefsElement.h in Headers */,
B2FA3D650AB75A6F000E5AC4 /* JSSVGDescElement.h in Headers */,
@@ -17427,6 +17621,7 @@
B2FA3DDD0AB75A6F000E5AC4 /* JSSVGPathSegMovetoAbs.h in Headers */,
B2FA3DDF0AB75A6F000E5AC4 /* JSSVGPathSegMovetoRel.h in Headers */,
B2FA3DE10AB75A6F000E5AC4 /* JSSVGPatternElement.h in Headers */,
+ 087D97BF10FB8D7700C00874 /* JSSVGPODListCustom.h in Headers */,
B21127A60B3186770009BE53 /* JSSVGPODTypeWrapper.h in Headers */,
8542A7950AE5C94100DF58DF /* JSSVGPoint.h in Headers */,
B2FA3DE30AB75A6F000E5AC4 /* JSSVGPointList.h in Headers */,
@@ -17465,6 +17660,33 @@
1A750D5D0A90DEE1000FF215 /* JSTreeWalker.h in Headers */,
A86629CF09DA2B47009633A5 /* JSUIEvent.h in Headers */,
15C77093100D3CA8005BA267 /* JSValidityState.h in Headers */,
+ A7D20F63107F406900A80392 /* JSWebGLActiveInfo.h in Headers */,
+ 49EECF1C105072F300099FAB /* JSWebGLArray.h in Headers */,
+ 49EECF01105070C400099FAB /* JSWebGLArrayBuffer.h in Headers */,
+ 49EECFAC1050938200099FAB /* JSWebGLArrayBufferConstructor.h in Headers */,
+ 49C7B9941042D2D30009D447 /* JSWebGLBuffer.h in Headers */,
+ 49C7B9961042D2D30009D447 /* JSWebGLByteArray.h in Headers */,
+ 49EECFAE1050938200099FAB /* JSWebGLByteArrayConstructor.h in Headers */,
+ 6EE8A77310F803F3005A4A24 /* JSWebGLContextAttributes.h in Headers */,
+ 49EECF03105070C400099FAB /* JSWebGLFloatArray.h in Headers */,
+ 49EECFB01050938200099FAB /* JSWebGLFloatArrayConstructor.h in Headers */,
+ 49C7B9981042D2D30009D447 /* JSWebGLFramebuffer.h in Headers */,
+ 49EECF05105070C400099FAB /* JSWebGLIntArray.h in Headers */,
+ 49EECFB21050938200099FAB /* JSWebGLIntArrayConstructor.h in Headers */,
+ 49C7B99C1042D2D30009D447 /* JSWebGLProgram.h in Headers */,
+ 49C7B99E1042D2D30009D447 /* JSWebGLRenderbuffer.h in Headers */,
+ 49EED1471051969400099FAB /* JSWebGLRenderingContext.h in Headers */,
+ 49C7B9A31042D2D30009D447 /* JSWebGLShader.h in Headers */,
+ 49EECF07105070C400099FAB /* JSWebGLShortArray.h in Headers */,
+ 49EECFB61050938200099FAB /* JSWebGLShortArrayConstructor.h in Headers */,
+ 49C7B9A51042D2D30009D447 /* JSWebGLTexture.h in Headers */,
+ 0C45342810CDBBFA00869157 /* JSWebGLUniformLocation.h in Headers */,
+ 49EECF09105070C400099FAB /* JSWebGLUnsignedByteArray.h in Headers */,
+ 49EECFB81050938200099FAB /* JSWebGLUnsignedByteArrayConstructor.h in Headers */,
+ 49EECF0B105070C400099FAB /* JSWebGLUnsignedIntArray.h in Headers */,
+ 49EECFBA1050938200099FAB /* JSWebGLUnsignedIntArrayConstructor.h in Headers */,
+ 49EECF0D105070C400099FAB /* JSWebGLUnsignedShortArray.h in Headers */,
+ 49EECFBC1050938200099FAB /* JSWebGLUnsignedShortArrayConstructor.h in Headers */,
31C0FF3E0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.h in Headers */,
316FE0720E6CCBEE00BF6088 /* JSWebKitCSSKeyframeRule.h in Headers */,
316FE0740E6CCBEE00BF6088 /* JSWebKitCSSKeyframesRule.h in Headers */,
@@ -17510,6 +17732,7 @@
BCFF64910EAD15C200C1D6F7 /* LengthBox.h in Headers */,
BCFF64920EAD15C200C1D6F7 /* LengthSize.h in Headers */,
B22279650D00BF220071B782 /* LinearGradientAttributes.h in Headers */,
+ AB31C91E10AE1B8E000C7B92 /* LineClampValue.h in Headers */,
A7AD2F880EC89D07008AB002 /* LinkHash.h in Headers */,
BCB16C2D0979C3BD00467741 /* loader.h in Headers */,
656D37320ADBA5DE00A4554D /* LoaderNSURLExtras.h in Headers */,
@@ -17527,6 +17750,7 @@
FABE72F51059C1EB00D999DD /* MathMLElement.h in Headers */,
FABE72F71059C1EB00D999DD /* MathMLInlineContainerElement.h in Headers */,
FABE72F91059C1EB00D999DD /* MathMLMathElement.h in Headers */,
+ FA654A6C1108ABED002615E0 /* MathMLTextElement.h in Headers */,
49D5DC2C0F423A73008F20FD /* Matrix3DTransformOperation.h in Headers */,
49E911C70EF86D47009D0CAF /* MatrixTransformOperation.h in Headers */,
0FF50272102BA96A0066F39A /* Media.h in Headers */,
@@ -17592,6 +17816,7 @@
1A569D190D7E2B82007C3983 /* objc_utility.h in Headers */,
1CF6BDFA0E9BB26A0025E1CD /* ObjCEventListener.h in Headers */,
1CF6BE150E9BB4670025E1CD /* ObjCNodeFilterCondition.h in Headers */,
+ F4EAF4AF10C742B1009100D3 /* OpenTypeSanitizer.h in Headers */,
087281560F26B9B600AFC596 /* OptionElement.h in Headers */,
087281580F26B9B600AFC596 /* OptionGroupElement.h in Headers */,
0014628B103CD1DE000B20DB /* OriginAccessEntry.h in Headers */,
@@ -17633,9 +17858,11 @@
7693BAD5106C2DCA007B0823 /* PluginHalterClient.h in Headers */,
5DCF836D0D59159800953BC6 /* PluginInfoStore.h in Headers */,
1ADA14110E1AE5D900023EE5 /* PluginMainThreadScheduler.h in Headers */,
+ 0AFDAC3D10F5448C00E1F3D2 /* PluginWidget.h in Headers */,
B2B1F7170D00CAA8004AEA64 /* PointerEventsHitRules.h in Headers */,
97059978107D975200A50A7C /* PolicyCallback.h in Headers */,
9705997A107D975200A50A7C /* PolicyChecker.h in Headers */,
+ 5174E20A10A1F44F00F95E6F /* PopStateEvent.h in Headers */,
0668E18B0ADD9624004128E0 /* PopupMenu.h in Headers */,
ABC128770B33AA6D00C693D5 /* PopupMenuClient.h in Headers */,
BC3BE12B0E98092F00835588 /* PopupMenuStyle.h in Headers */,
@@ -17674,6 +17901,7 @@
BCEA4866097D93020094C9E4 /* RenderButton.h in Headers */,
9392F1420AD185F400691BD4 /* RenderCounter.h in Headers */,
BC77CEB30FF017F20070887B /* RenderDataGrid.h in Headers */,
+ 0F5B7A5510F65D7A00376302 /* RenderEmbeddedObject.h in Headers */,
A8EA73C40A1900E300A8EF5F /* RenderFieldset.h in Headers */,
066C77310AB603FD00238CC4 /* RenderFileUploadControl.h in Headers */,
BCEA486E097D93020094C9E4 /* RenderFlexibleBox.h in Headers */,
@@ -17692,6 +17920,7 @@
A8EA7A520A191A5200A8EF5F /* RenderListItem.h in Headers */,
A8EA7A500A191A5200A8EF5F /* RenderListMarker.h in Headers */,
0F56028F0E4B76580065B038 /* RenderMarquee.h in Headers */,
+ FA654A701108ABFF002615E0 /* RenderMathMLBlock.h in Headers */,
E4C279590CF9741900E97B98 /* RenderMedia.h in Headers */,
ABDDFE7A0A5C6E7000A3E11D /* RenderMenuList.h in Headers */,
BCEA4880097D93020094C9E4 /* RenderObject.h in Headers */,
@@ -17702,6 +17931,10 @@
853CA9F10AEEC657002372DC /* RenderPath.h in Headers */,
A871DFE30A15376B00B12A68 /* RenderReplaced.h in Headers */,
BCA846D70DC67A350026C309 /* RenderReplica.h in Headers */,
+ 1479FAEE109AE37500DED655 /* RenderRuby.h in Headers */,
+ 1479FAF0109AE37500DED655 /* RenderRubyBase.h in Headers */,
+ 1479FAF2109AE37500DED655 /* RenderRubyRun.h in Headers */,
+ 1479FAF4109AE37500DED655 /* RenderRubyText.h in Headers */,
BC3BE9940E9C1C7C00835588 /* RenderScrollbar.h in Headers */,
BC3BE9950E9C1C7C00835588 /* RenderScrollbarPart.h in Headers */,
BC3BE9990E9C1E5D00835588 /* RenderScrollbarTheme.h in Headers */,
@@ -17718,6 +17951,7 @@
853CA9DD0AEEC5E9002372DC /* RenderSVGInlineText.h in Headers */,
A8F5C0B80F9285AC0098E06B /* RenderSVGModelObject.h in Headers */,
AA31B5B50C1DFD1000AE7083 /* RenderSVGRoot.h in Headers */,
+ 08DAB9BB1103D9A5003E7ABA /* RenderSVGShadowTreeRootContainer.h in Headers */,
853CA9DF0AEEC5E9002372DC /* RenderSVGText.h in Headers */,
B26554EB0B80D74900A50EC3 /* RenderSVGTextPath.h in Headers */,
A8A909AC0CBCD6B50029B807 /* RenderSVGTransformableContainer.h in Headers */,
@@ -17749,6 +17983,7 @@
514C767A0CE923A1007EF3CD /* ResourceHandleClient.h in Headers */,
514C767B0CE923A1007EF3CD /* ResourceHandleInternal.h in Headers */,
656D373F0ADBA5DE00A4554D /* ResourceLoader.h in Headers */,
+ 973E325710883B7C005BC493 /* ResourceLoadNotifier.h in Headers */,
514C76520CE9234E007EF3CD /* ResourceRequest.h in Headers */,
514C767D0CE923A1007EF3CD /* ResourceRequestBase.h in Headers */,
514C76540CE9234E007EF3CD /* ResourceResponse.h in Headers */,
@@ -17782,6 +18017,7 @@
41C760B10EDE03D300C1655F /* ScriptState.h in Headers */,
416F45F00ED7B311008215B6 /* ScriptString.h in Headers */,
934CC0E20ED39D6F00A658F2 /* ScriptValue.h in Headers */,
+ 228C284510D82500009D0D0E /* ScriptWrappable.h in Headers */,
93F199B808245E59001E9ABC /* Scrollbar.h in Headers */,
BC9BC64E0E7C4889008B9849 /* ScrollbarClient.h in Headers */,
BC8B854B0E7C7F5600AB6984 /* ScrollbarTheme.h in Headers */,
@@ -17897,6 +18133,8 @@
B22279850D00BF220071B782 /* SVGAnimatedPathData.h in Headers */,
B22279880D00BF220071B782 /* SVGAnimatedPoints.h in Headers */,
0878B1FD10874E3F00A55097 /* SVGAnimatedProperty.h in Headers */,
+ 084D2833110A7FCB0038239A /* SVGAnimatedPropertySynchronizer.h in Headers */,
+ 084D2834110A7FCB0038239A /* SVGAnimatedPropertyTraits.h in Headers */,
B222798D0D00BF220071B782 /* SVGAnimatedTemplate.h in Headers */,
B22279900D00BF220071B782 /* SVGAnimateElement.h in Headers */,
B22279930D00BF220071B782 /* SVGAnimateMotionElement.h in Headers */,
@@ -17917,6 +18155,7 @@
656581FE09D1508D000E61D7 /* SVGElementFactory.h in Headers */,
B22279BA0D00BF220071B782 /* SVGElementInstance.h in Headers */,
B22279BD0D00BF220071B782 /* SVGElementInstanceList.h in Headers */,
+ 081AA8DA1111237E002AB06E /* SVGElementRareData.h in Headers */,
B22279C00D00BF220071B782 /* SVGEllipseElement.h in Headers */,
B22279C20D00BF220071B782 /* SVGException.h in Headers */,
B22279C50D00BF220071B782 /* SVGExternalResourcesRequired.h in Headers */,
@@ -17987,12 +18226,13 @@
B2227A3E0D00BF220071B782 /* SVGList.h in Headers */,
B2227A3F0D00BF220071B782 /* SVGListTraits.h in Headers */,
B2227A410D00BF220071B782 /* SVGLocatable.h in Headers */,
+ 08385FF610F0186000BFE07B /* SVGMarkerData.h in Headers */,
B2227A440D00BF220071B782 /* SVGMarkerElement.h in Headers */,
+ 08735FB910E91232006D6FAD /* SVGMarkerLayoutInfo.h in Headers */,
B2227A470D00BF220071B782 /* SVGMaskElement.h in Headers */,
B2227A4B0D00BF220071B782 /* SVGMetadataElement.h in Headers */,
B2A1F2B10CEF0ABF00442F6A /* SVGMissingGlyphElement.h in Headers */,
B2227A4E0D00BF220071B782 /* SVGMPathElement.h in Headers */,
- 6565820009D1508D000E61D7 /* SVGNames.h in Headers */,
B2227A510D00BF220071B782 /* SVGNumberList.h in Headers */,
B2227A540D00BF220071B782 /* SVGPaint.h in Headers */,
B25599A70D00D8BA00BB825C /* SVGPaintServer.h in Headers */,
@@ -18038,6 +18278,7 @@
853CA9E90AEEC608002372DC /* SVGRootInlineBox.h in Headers */,
B2227AA30D00BF220071B782 /* SVGScriptElement.h in Headers */,
B2227AA60D00BF220071B782 /* SVGSetElement.h in Headers */,
+ 08DAB9C31103D9C1003E7ABA /* SVGShadowTreeElements.h in Headers */,
E4AFD0100DAF335500F5F55C /* SVGSMILElement.h in Headers */,
B25599960D00D8BA00BB825C /* SVGSpotLightSource.h in Headers */,
B2227AA90D00BF220071B782 /* SVGStopElement.h in Headers */,
@@ -18069,8 +18310,6 @@
B2227AF30D00BF220071B782 /* SVGViewSpec.h in Headers */,
B2227AF60D00BF220071B782 /* SVGZoomAndPan.h in Headers */,
B2E4EC980D00C22B00432643 /* SVGZoomEvent.h in Headers */,
- 0878B1FF10874E3F00A55097 /* SynchronizablePropertyController.h in Headers */,
- 0878B20010874E3F00A55097 /* SynchronizableTypeWrapper.h in Headers */,
93E62D9B0985F41600E1B5E3 /* SystemTime.h in Headers */,
A8CFF0510A154F09000A4234 /* TableLayout.h in Headers */,
BCE3BEC30D222B1D007E06E4 /* TagNodeList.h in Headers */,
@@ -18104,9 +18343,12 @@
BCE659A90EA927B9007E4533 /* ThemeTypes.h in Headers */,
0B90561B0F2578BF0095FF6A /* ThreadableLoader.h in Headers */,
0B90561C0F2578BF0095FF6A /* ThreadableLoaderClient.h in Headers */,
+ 5112247410CFB8D8008099D7 /* ThreadableWebSocketChannel.h in Headers */,
+ 5112247610CFB8E8008099D7 /* ThreadableWebSocketChannelClientWrapper.h in Headers */,
51DF6D7E0B92A16D00C2DC85 /* ThreadCheck.h in Headers */,
E1FF57A30F01255B00891EBB /* ThreadGlobalData.h in Headers */,
185BCF290F3279CE000EA262 /* ThreadTimers.h in Headers */,
+ 7553CFE8108F473F00EA281E /* TimelineRecordFactory.h in Headers */,
9305B24D098F1B6B00C28855 /* Timer.h in Headers */,
E44613B00CD6331000FADA75 /* TimeRanges.h in Headers */,
49E912AE0EFAC906009D0CAF /* TimingFunction.h in Headers */,
@@ -18120,6 +18362,7 @@
854FE7370A2297BE0058D7AD /* Traversal.h in Headers */,
1419D2C50CEA6F6100FF507A /* TreeShared.h in Headers */,
854FE7390A2297BE0058D7AD /* TreeWalker.h in Headers */,
+ 37C28A6810F659CC008C7813 /* TypesettingFeatures.h in Headers */,
93309E1A099E64920056E581 /* TypingCommand.h in Headers */,
85031B4E0A44EFC700F992E0 /* UIEvent.h in Headers */,
85031B4F0A44EFC700F992E0 /* UIEventWithKeyState.h in Headers */,
@@ -18149,6 +18392,26 @@
93F199B308245E59001E9ABC /* WebCoreViewFactory.h in Headers */,
93F199F108245E59001E9ABC /* WebDashboardRegion.h in Headers */,
BC6DADEF0A195FDF00E5CD14 /* WebFontCache.h in Headers */,
+ A7D20F6D107F438B00A80392 /* WebGLActiveInfo.h in Headers */,
+ 49EECDE010503C2400099FAB /* WebGLArray.h in Headers */,
+ 49EECDE310503C2400099FAB /* WebGLArrayBuffer.h in Headers */,
+ 49C7B9C91042D32F0009D447 /* WebGLBuffer.h in Headers */,
+ 49C7B9CC1042D32F0009D447 /* WebGLByteArray.h in Headers */,
+ 6E4E91AF10F7FB3100A2779C /* WebGLContextAttributes.h in Headers */,
+ 49EECDE610503C2400099FAB /* WebGLFloatArray.h in Headers */,
+ 49C7B9CF1042D32F0009D447 /* WebGLFramebuffer.h in Headers */,
+ 6E47E66110B7944B00B186C8 /* WebGLGetInfo.h in Headers */,
+ 49EECDE910503C2400099FAB /* WebGLIntArray.h in Headers */,
+ 49C7B9D71042D32F0009D447 /* WebGLProgram.h in Headers */,
+ 49C7B9DA1042D32F0009D447 /* WebGLRenderbuffer.h in Headers */,
+ 49C7B9E01042D32F0009D447 /* WebGLRenderingContext.h in Headers */,
+ 49C7B9E31042D32F0009D447 /* WebGLShader.h in Headers */,
+ 49EECDEC10503C2400099FAB /* WebGLShortArray.h in Headers */,
+ 49C7B9E61042D32F0009D447 /* WebGLTexture.h in Headers */,
+ 0C3F1F5B10C8871200D72CE1 /* WebGLUniformLocation.h in Headers */,
+ 49EECDEF10503C2400099FAB /* WebGLUnsignedByteArray.h in Headers */,
+ 49EECDF210503C2400099FAB /* WebGLUnsignedIntArray.h in Headers */,
+ 49EECDF510503C2400099FAB /* WebGLUnsignedShortArray.h in Headers */,
31C0FF220E4CEB6E007D6FE5 /* WebKitAnimationEvent.h in Headers */,
31288E730E3005D6003619AE /* WebKitCSSKeyframeRule.h in Headers */,
31288E750E3005D6003619AE /* WebKitCSSKeyframesRule.h in Headers */,
@@ -18223,6 +18486,7 @@
2EA768040FE7126400AB9C8A /* WorkerScriptLoaderClient.h in Headers */,
2E4346550F546A8200B0F1BA /* WorkerThread.h in Headers */,
0B9056F90F2685F30095FF6A /* WorkerThreadableLoader.h in Headers */,
+ 5112247A10CFB8FF008099D7 /* WorkerThreadableWebSocketChannel.h in Headers */,
93309E24099E64920056E581 /* WrapContentsInDummySpanCommand.h in Headers */,
6565820209D1508D000E61D7 /* XLinkNames.h in Headers */,
BC772C470C4EB2C60083285F /* XMLHttpRequest.h in Headers */,
@@ -18230,6 +18494,7 @@
F9F0ED7A0DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.h in Headers */,
BCDFD48E0E305290009D10AD /* XMLHttpRequestUpload.h in Headers */,
A833C80D0A2CF25600D57664 /* XMLNames.h in Headers */,
+ E15A36D71104572000B7B639 /* XMLNSNames.h in Headers */,
1ACE53EB0A8D18E70022947D /* XMLSerializer.h in Headers */,
93F1992108245E59001E9ABC /* XMLTokenizer.h in Headers */,
5D15E3AC0F9E6AC1009E0E3F /* XMLTokenizerScope.h in Headers */,
@@ -18256,6 +18521,7 @@
93F199ED08245E59001E9ABC /* XSLTProcessor.h in Headers */,
E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */,
+<<<<<<< HEAD
3314ACEC10892086000F0E56 /* JSExceptionBase.h in Headers */,
973E325710883B7C005BC493 /* ResourceLoadNotifier.h in Headers */,
84801955108BAFB300CB2B1F /* FEGaussianBlur.h in Headers */,
@@ -18295,6 +18561,8 @@
59E842661109E5A2000305AD /* JNIBridgeJSC.h in Headers */,
59B5977511086579007159E8 /* BridgeJSC.h in Headers */,
59BD83BA11199B9000E1B6A9 /* GeolocationPositionCache.h in Headers */,
+=======
+>>>>>>> webkit.org at r54127
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -18374,6 +18642,8 @@
85136C9B0AED665900F90A3D /* helpCursor.png in Resources */,
85136C9C0AED665900F90A3D /* linkCursor.png in Resources */,
1CDC14050DD3934C006EACD3 /* localizedStrings.js in Resources */,
+ FA654A681108ABE2002615E0 /* mathattrs.in in Resources */,
+ FA654A641108ABB7002615E0 /* mathml.css in Resources */,
AB4261D80A2F6C9700BDD17D /* missingImage.tiff in Resources */,
85136C9D0AED665900F90A3D /* moveCursor.png in Resources */,
46F9D5DE0B0D60170028EE36 /* noDropCursor.png in Resources */,
@@ -18395,8 +18665,6 @@
85136CA80AED665900F90A3D /* westResizeCursor.png in Resources */,
1AB1AE7A0C051FDE00139F4F /* zoomInCursor.png in Resources */,
1AB1AE7B0C051FDE00139F4F /* zoomOutCursor.png in Resources */,
- 5174E20C10A1F49A00F95E6F /* PopStateEvent.idl in Resources */,
- 0C3F1F5C10C8871200D72CE1 /* WebGLUniformLocation.idl in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -18542,10 +18810,14 @@
29A8123E0FBB9C1D00510293 /* AccessibilityListBox.cpp in Sources */,
29A8123D0FBB9C1D00510293 /* AccessibilityListBoxOption.cpp in Sources */,
07B0113D1032241900FBDC33 /* AccessibilityMediaControls.cpp in Sources */,
+ 76CDD2F21103DA6600680521 /* AccessibilityMenuList.cpp in Sources */,
+ 76CDD2F61103DA6600680521 /* AccessibilityMenuListOption.cpp in Sources */,
+ 76CDD2F41103DA6600680521 /* AccessibilityMenuListPopup.cpp in Sources */,
29A8123C0FBB9C1D00510293 /* AccessibilityObject.cpp in Sources */,
29A812480FBB9CA900510293 /* AccessibilityObjectMac.mm in Sources */,
29A8124A0FBB9CA900510293 /* AccessibilityObjectWrapper.mm in Sources */,
29A812260FBB9C1D00510293 /* AccessibilityRenderObject.cpp in Sources */,
+ 93C4F6EA1108F9A50099D0DB /* AccessibilityScrollbar.cpp in Sources */,
0709FC4C1025DED80059CDBA /* AccessibilitySlider.cpp in Sources */,
29A812270FBB9C1D00510293 /* AccessibilityTable.cpp in Sources */,
29A8122A0FBB9C1D00510293 /* AccessibilityTableCell.cpp in Sources */,
@@ -18586,9 +18858,11 @@
938192030F87E1E600D5352A /* BinaryPropertyList.cpp in Sources */,
BC5EB91F0E82040800B25965 /* BindingURI.cpp in Sources */,
A89943290B42338800D7C802 /* BitmapImage.cpp in Sources */,
+ 2EAFAF0E10E2AF2D007ED3D6 /* Blob.cpp in Sources */,
93F19AE108245E59001E9ABC /* BlockExceptions.mm in Sources */,
BCEA4854097D93020094C9E4 /* break_lines.cpp in Sources */,
93309DDA099E64920056E581 /* BreakBlockquoteCommand.cpp in Sources */,
+ 59B597731108656B007159E8 /* BridgeJSC.cpp in Sources */,
1A569CF70D7E2B82007C3983 /* c_class.cpp in Sources */,
1A569CF90D7E2B82007C3983 /* c_instance.cpp in Sources */,
1A569CFB0D7E2B82007C3983 /* c_runtime.cpp in Sources */,
@@ -18606,29 +18880,14 @@
BCB16C250979C3BD00467741 /* CachedXBLDocument.cpp in Sources */,
BCB16C270979C3BD00467741 /* CachedXSLStyleSheet.cpp in Sources */,
49C7BA011042D38C0009D447 /* Canvas3DLayer.mm in Sources */,
- 49EECDDF10503C2400099FAB /* WebGLArray.cpp in Sources */,
- 49EECDE210503C2400099FAB /* WebGLArrayBuffer.cpp in Sources */,
- 49C7B9C81042D32F0009D447 /* WebGLBuffer.cpp in Sources */,
- 49C7B9CB1042D32F0009D447 /* WebGLByteArray.cpp in Sources */,
- 49EECDE510503C2400099FAB /* WebGLFloatArray.cpp in Sources */,
- 49C7B9CE1042D32F0009D447 /* WebGLFramebuffer.cpp in Sources */,
+ 6E4E91AC10F7FB3100A2779C /* CanvasContextAttributes.cpp in Sources */,
49484FC1102CF23C00187DD3 /* CanvasGradient.cpp in Sources */,
- 49EECDE810503C2400099FAB /* WebGLIntArray.cpp in Sources */,
49C7B9D41042D32F0009D447 /* CanvasObject.cpp in Sources */,
49484FC4102CF23C00187DD3 /* CanvasPattern.cpp in Sources */,
49484FC7102CF23C00187DD3 /* CanvasPixelArray.cpp in Sources */,
- 49C7B9D61042D32F0009D447 /* WebGLProgram.cpp in Sources */,
- 49C7B9D91042D32F0009D447 /* WebGLRenderbuffer.cpp in Sources */,
49C7B9DC1042D32F0009D447 /* CanvasRenderingContext.cpp in Sources */,
49484FCA102CF23C00187DD3 /* CanvasRenderingContext2D.cpp in Sources */,
- 49C7B9DF1042D32F0009D447 /* WebGLRenderingContext.cpp in Sources */,
- 49C7B9E21042D32F0009D447 /* WebGLShader.cpp in Sources */,
- 49EECDEB10503C2400099FAB /* WebGLShortArray.cpp in Sources */,
49484FCD102CF23C00187DD3 /* CanvasStyle.cpp in Sources */,
- 49C7B9E51042D32F0009D447 /* WebGLTexture.cpp in Sources */,
- 49EECDEE10503C2400099FAB /* WebGLUnsignedByteArray.cpp in Sources */,
- 49EECDF110503C2400099FAB /* WebGLUnsignedIntArray.cpp in Sources */,
- 49EECDF410503C2400099FAB /* WebGLUnsignedShortArray.cpp in Sources */,
6550B69D099DF0270090D781 /* CDATASection.cpp in Sources */,
514185EF0CD65F0400763C99 /* ChangeVersionWrapper.cpp in Sources */,
6550B69F099DF0270090D781 /* CharacterData.cpp in Sources */,
@@ -18670,6 +18929,7 @@
D0B0556909C6700100307E43 /* CreateLinkCommand.cpp in Sources */,
514C766D0CE923A1007EF3CD /* Credential.cpp in Sources */,
51A052341058774F00CC9E95 /* CredentialStorage.cpp in Sources */,
+ E1B4CD2510B322E200BFFD7E /* CredentialStorageMac.mm in Sources */,
E1C416170F6563180092D2FB /* CrossOriginAccessControl.cpp in Sources */,
E1C415DE0F655D7C0092D2FB /* CrossOriginPreflightResultCache.cpp in Sources */,
2E4346580F546A9900B0F1BA /* CrossThreadCopier.cpp in Sources */,
@@ -18726,6 +18986,7 @@
1AD51A150CB59CD300953D11 /* DatabaseTracker.cpp in Sources */,
BC77D2390FF298080070887B /* DataGridColumn.cpp in Sources */,
BC77D1FD0FF28D9B0070887B /* DataGridColumnList.cpp in Sources */,
+ F5D3A57C106B83B300545297 /* DateComponents.cpp in Sources */,
4162A450101145AE00DFF3ED /* DedicatedWorkerContext.cpp in Sources */,
41A3D58E101C152D00316D07 /* DedicatedWorkerThread.cpp in Sources */,
4167EBF5102962BA003D252A /* DefaultSharedWorkerRepository.cpp in Sources */,
@@ -18747,6 +19008,7 @@
1A8F6BC20DB55CDC001DB794 /* DOMApplicationCache.cpp in Sources */,
85D389B30A991A7F00282145 /* DOMAttr.mm in Sources */,
BC946EF0107FDBAC00857193 /* DOMBeforeLoadEvent.mm in Sources */,
+ 2E2D99E810E2BC1C00496337 /* DOMBlob.mm in Sources */,
85089CD80A98C42800A275AA /* DOMCDATASection.mm in Sources */,
85ACA9870A9B520300671E90 /* DOMCharacterData.mm in Sources */,
85089CDA0A98C42800A275AA /* DOMComment.mm in Sources */,
@@ -19050,6 +19312,7 @@
A75E8B8A0E1DE2D6007F2481 /* FEColorMatrix.cpp in Sources */,
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 */,
@@ -19102,6 +19365,7 @@
1432E8490C51493F00B1500F /* GCController.cpp in Sources */,
BCE04C940DAFF902007A0F41 /* GeneratedImage.cpp in Sources */,
FE80D7C50E9C1F25000D6F75 /* Geolocation.cpp in Sources */,
+ BC56CB2110D5AC8000A77C64 /* GeolocationController.cpp in Sources */,
FEAB90120EA51B9C006348C3 /* GeolocationService.cpp in Sources */,
BCE494AC0F4F5E9E0084E319 /* GeolocationServiceMac.mm in Sources */,
59C77F2A10545B3B00506104 /* GeolocationServiceMock.cpp in Sources */,
@@ -19123,6 +19387,7 @@
5160F4980B0AA75F00C1D2AF /* HistoryItemMac.mm in Sources */,
9363B62C0F8E8FE000803810 /* HistoryPropertyList.cpp in Sources */,
9307F1D70AF2D59000DBA31A /* HitTestResult.cpp in Sources */,
+ BC97E23B109144950010D361 /* HTMLAllCollection.cpp in Sources */,
A8CFF7A40A156978000A4234 /* HTMLAnchorElement.cpp in Sources */,
A871D45E0A127CBC00B12A68 /* HTMLAppletElement.cpp in Sources */,
A8EA7D2F0A19385500A8EF5F /* HTMLAreaElement.cpp in Sources */,
@@ -19180,6 +19445,7 @@
A8CFF7A90A156978000A4234 /* HTMLModElement.cpp in Sources */,
A8DF3FD5097FA0FC0052981B /* HTMLNameCollection.cpp in Sources */,
A8D06B3A0A265DCD005E7203 /* HTMLNames.cpp in Sources */,
+ CE4C00E410F6F7BA00CA38F5 /* HTMLNoScriptElement.cpp in Sources */,
A871D45B0A127CBC00B12A68 /* HTMLObjectElement.cpp in Sources */,
A8EA79FB0A1916DF00A8EF5F /* HTMLOListElement.cpp in Sources */,
A81369DF097374F600D74463 /* HTMLOptGroupElement.cpp in Sources */,
@@ -19213,7 +19479,6 @@
BCCD74E50A4C8DDF005FDA6D /* HTMLViewSourceDocument.cpp in Sources */,
0B8C56D40F28627F000502E1 /* HTTPHeaderMap.cpp in Sources */,
514C76720CE923A1007EF3CD /* HTTPParsers.cpp in Sources */,
- F5D3A57C106B83B300545297 /* ISODateTime.cpp in Sources */,
5126E6BB0A2E3B12005C29FA /* IconDatabase.cpp in Sources */,
445C8DB710015FC90031531A /* IconDatabaseNone.cpp in Sources */,
1A2D753E0DE47FAB00F0A648 /* IconFetcher.cpp in Sources */,
@@ -19232,6 +19497,7 @@
4B3480930EEF50D400AC1B41 /* ImageSourceCGMac.mm in Sources */,
316FE1170E6E1DA700BF6088 /* ImplicitAnimation.cpp in Sources */,
DB23C2CB0A508D29002489EB /* IndentOutdentCommand.cpp in Sources */,
+ 7A0E76F910BF08ED00A0276E /* InjectedScriptHost.cpp in Sources */,
A8CFF5E60A155A05000A4234 /* InlineBox.cpp in Sources */,
A8CFF5E40A155A05000A4234 /* InlineFlowBox.cpp in Sources */,
BCEA4859097D93020094C9E4 /* InlineTextBox.cpp in Sources */,
@@ -19248,6 +19514,7 @@
7A24587B1021EAF4000A00AA /* InspectorDOMAgent.cpp in Sources */,
41F061750F5F00AC00A07EAC /* InspectorDOMStorageResource.cpp in Sources */,
7AED3E050FBB1EAA00D2B03C /* InspectorFrontend.cpp in Sources */,
+ 7A0E770E10C00A8800A0276E /* InspectorFrontendHost.cpp in Sources */,
41F062020F5F0B6600A07EAC /* InspectorResource.cpp in Sources */,
754133AA102E00F400075D00 /* InspectorTimelineAgent.cpp in Sources */,
B27535600B053814002CE64F /* IntPointCG.cpp in Sources */,
@@ -19257,12 +19524,21 @@
B275357D0B053814002CE64F /* IntRectMac.mm in Sources */,
B27535620B053814002CE64F /* IntSizeCG.cpp in Sources */,
B275357E0B053814002CE64F /* IntSizeMac.mm in Sources */,
+ 59E560A91105336F00AA1258 /* JavaClassJSC.cpp in Sources */,
+ 59A9E7B01104758800DFB4C1 /* JavaInstanceJSC.cpp in Sources */,
1C81BA090E97348300266E07 /* JavaScriptCallFrame.cpp in Sources */,
1C81BA0D0E97348300266E07 /* JavaScriptDebugServer.cpp in Sources */,
1C81BA020E9733CB00266E07 /* JavaScriptProfile.cpp in Sources */,
1C81BA000E9733CB00266E07 /* JavaScriptProfileNode.cpp in Sources */,
1A569D030D7E2B82007C3983 /* jni_jsobject.mm in Sources */,
1A569D050D7E2B82007C3983 /* jni_objc.mm in Sources */,
+<<<<<<< HEAD
+=======
+ 5913953D1107584E0083EC55 /* JNIBridge.cpp in Sources */,
+ 59E842681109E5AE000305AD /* JNIBridgeJSC.cpp in Sources */,
+ 59EE12301106081F00885116 /* JNIUtility.cpp in Sources */,
+ 59EE122C1106080500885116 /* JNIUtilityPrivate.cpp in Sources */,
+>>>>>>> webkit.org at r54127
93309DF3099E64920056E581 /* JoinTextNodesCommand.cpp in Sources */,
418F88040FF957AE0080F045 /* JSAbstractWorker.cpp in Sources */,
415B7C570FF598E6006770F7 /* JSAbstractWorkerCustom.cpp in Sources */,
@@ -19271,47 +19547,14 @@
E4EEFFC80D34550C00469A58 /* JSAudioConstructor.cpp in Sources */,
BC124EFF0C26447A009E2349 /* JSBarInfo.cpp in Sources */,
BC946346107A934B00857193 /* JSBeforeLoadEvent.cpp in Sources */,
+ 2E2D99CD10E2BBDA00496337 /* JSBlob.cpp in Sources */,
1449E287107D4DB400B5793F /* JSCallbackData.cpp in Sources */,
- A7D20F62107F406900A80392 /* JSWebGLActiveInfo.cpp in Sources */,
- 49EECF1B105072F300099FAB /* JSWebGLArray.cpp in Sources */,
- 49EECF00105070C400099FAB /* JSWebGLArrayBuffer.cpp in Sources */,
- 49EECFAB1050938200099FAB /* JSWebGLArrayBufferConstructor.cpp in Sources */,
- 492273A31083B3B100EE5C84 /* JSWebGLArrayCustom.cpp in Sources */,
- 49C7B9931042D2D30009D447 /* JSWebGLBuffer.cpp in Sources */,
- 49C7B9951042D2D30009D447 /* JSWebGLByteArray.cpp in Sources */,
- 49EECFAD1050938200099FAB /* JSWebGLByteArrayConstructor.cpp in Sources */,
- 49EECF7810508D9C00099FAB /* JSWebGLByteArrayCustom.cpp in Sources */,
- 49EECF02105070C400099FAB /* JSWebGLFloatArray.cpp in Sources */,
- 49EECFAF1050938200099FAB /* JSWebGLFloatArrayConstructor.cpp in Sources */,
- 49EECF7910508D9C00099FAB /* JSWebGLFloatArrayCustom.cpp in Sources */,
- 49C7B9971042D2D30009D447 /* JSWebGLFramebuffer.cpp in Sources */,
65DF323909D1DE65000BE325 /* JSCanvasGradient.cpp in Sources */,
- 49EECF04105070C400099FAB /* JSWebGLIntArray.cpp in Sources */,
- 49EECFB11050938200099FAB /* JSWebGLIntArrayConstructor.cpp in Sources */,
- 49EECF7A10508D9C00099FAB /* JSWebGLIntArrayCustom.cpp in Sources */,
65DF323B09D1DE65000BE325 /* JSCanvasPattern.cpp in Sources */,
- 49C7B99B1042D2D30009D447 /* JSWebGLProgram.cpp in Sources */,
- 49C7B99D1042D2D30009D447 /* JSWebGLRenderbuffer.cpp in Sources */,
49EED1421051969400099FAB /* JSCanvasRenderingContext.cpp in Sources */,
49EED1441051969400099FAB /* JSCanvasRenderingContext2D.cpp in Sources */,
49EED14E1051971A00099FAB /* JSCanvasRenderingContext2DCustom.cpp in Sources */,
- 49EED1461051969400099FAB /* JSWebGLRenderingContext.cpp in Sources */,
- 49EED14F1051971A00099FAB /* JSWebGLRenderingContextCustom.cpp in Sources */,
49EED1501051971A00099FAB /* JSCanvasRenderingContextCustom.cpp in Sources */,
- 49C7B9A21042D2D30009D447 /* JSWebGLShader.cpp in Sources */,
- 49EECF06105070C400099FAB /* JSWebGLShortArray.cpp in Sources */,
- 49EECFB51050938200099FAB /* JSWebGLShortArrayConstructor.cpp in Sources */,
- 49EECF7B10508D9C00099FAB /* JSWebGLShortArrayCustom.cpp in Sources */,
- 49C7B9A41042D2D30009D447 /* JSWebGLTexture.cpp in Sources */,
- 49EECF08105070C400099FAB /* JSWebGLUnsignedByteArray.cpp in Sources */,
- 49EECFB71050938200099FAB /* JSWebGLUnsignedByteArrayConstructor.cpp in Sources */,
- 49EECF7C10508D9C00099FAB /* JSWebGLUnsignedByteArrayCustom.cpp in Sources */,
- 49EECF0A105070C400099FAB /* JSWebGLUnsignedIntArray.cpp in Sources */,
- 49EECFB91050938200099FAB /* JSWebGLUnsignedIntArrayConstructor.cpp in Sources */,
- 49EECF7D10508D9C00099FAB /* JSWebGLUnsignedIntArrayCustom.cpp in Sources */,
- 49EECF0C105070C400099FAB /* JSWebGLUnsignedShortArray.cpp in Sources */,
- 49EECFBB1050938200099FAB /* JSWebGLUnsignedShortArrayConstructor.cpp in Sources */,
- 49EECF7E10508D9C00099FAB /* JSWebGLUnsignedShortArrayCustom.cpp in Sources */,
93F9B7A00BA6032600854064 /* JSCDATASection.cpp in Sources */,
93BA59B20F2AA5FE008E8E99 /* JSCDATASectionCustom.cpp in Sources */,
65DF31F309D1CC60000BE325 /* JSCharacterData.cpp in Sources */,
@@ -19392,6 +19635,7 @@
E0FEF372B77C53EAC1C1FBEE /* JSEventSourceConstructor.cpp in Sources */,
E0FEF372B57C53EAC1C1FBEE /* JSEventSourceCustom.cpp in Sources */,
BC6090200E91B8EC000C68B5 /* JSEventTarget.cpp in Sources */,
+ 3314ACEB10892086000F0E56 /* JSExceptionBase.cpp in Sources */,
BC00F0140E0A189500FD04E3 /* JSFile.cpp in Sources */,
BC00F0160E0A189500FD04E3 /* JSFileList.cpp in Sources */,
FE80DA630E9C4703000D6F75 /* JSGeolocation.cpp in Sources */,
@@ -19399,6 +19643,8 @@
FE80DA650E9C4703000D6F75 /* JSGeoposition.cpp in Sources */,
BC94D14E0C275C68006BC617 /* JSHistory.cpp in Sources */,
BCE7B1930D4E86960075A539 /* JSHistoryCustom.cpp in Sources */,
+ BC97E412109154FA0010D361 /* JSHTMLAllCollection.cpp in Sources */,
+ BC97E42C10915B060010D361 /* JSHTMLAllCollectionCustom.cpp in Sources */,
1A4A2DEF0A1B852A00C807F8 /* JSHTMLAnchorElement.cpp in Sources */,
1A4A2DF10A1B852A00C807F8 /* JSHTMLAppletElement.cpp in Sources */,
BC4EDEF40C08F3FB007EDD49 /* JSHTMLAppletElementCustom.cpp in Sources */,
@@ -19487,10 +19733,11 @@
BC6C49F30D7DBA0500FFA558 /* JSImageConstructor.cpp in Sources */,
A77979280D6B9E64003851B9 /* JSImageData.cpp in Sources */,
A7D0318E0E93540300E24ACD /* JSImageDataCustom.cpp in Sources */,
- C091588A0DB4209200E55AF4 /* JSInspectedObjectWrapper.cpp in Sources */,
+ 7A0E76DA10BF059800A0276E /* JSInjectedScriptHost.cpp in Sources */,
+ 7A0E76D510BF050700A0276E /* JSInjectedScriptHostCustom.cpp in Sources */,
41F060CD0F5EEB2B00A07EAC /* JSInspectorBackend.cpp in Sources */,
+ 7A0E771E10C00DB100A0276E /* JSInspectorFrontendHost.cpp in Sources */,
7A74ECBD101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp in Sources */,
- C091588C0DB4209200E55AF4 /* JSInspectorCallbackWrapper.cpp in Sources */,
1C5FAED10DCFD90100D58F78 /* JSJavaScriptCallFrame.cpp in Sources */,
1C5FAEE70DCFDA6800D58F78 /* JSJavaScriptCallFrameCustom.cpp in Sources */,
A86629D409DA2B48009633A5 /* JSKeyboardEvent.cpp in Sources */,
@@ -19536,10 +19783,11 @@
A9C6E64C0D7465E7006442E9 /* JSPluginArrayCustom.cpp in Sources */,
A9C6E64D0D7465E7006442E9 /* JSPluginCustom.cpp in Sources */,
93B70D6B09EB0C7C009D8468 /* JSPluginElementFunctions.cpp in Sources */,
+ 5189F01D10B37BD900F3C739 /* JSPopStateEvent.cpp in Sources */,
+ 5189F01810B3781300F3C739 /* JSPopStateEventCustom.cpp in Sources */,
FE80DA710E9C472F000D6F75 /* JSPositionError.cpp in Sources */,
65DF31FF09D1CC60000BE325 /* JSProcessingInstruction.cpp in Sources */,
E44613ED0CD681BA00FADA75 /* JSProgressEvent.cpp in Sources */,
- C091588E0DB4209200E55AF4 /* JSQuarantinedObjectWrapper.cpp in Sources */,
65DF320109D1CC60000BE325 /* JSRange.cpp in Sources */,
D23CA55F0AB0EAB6005108A5 /* JSRangeException.cpp in Sources */,
BCFE2F110C1B58370020235F /* JSRect.cpp in Sources */,
@@ -19672,7 +19920,6 @@
B2FA3DE00AB75A6F000E5AC4 /* JSSVGPatternElement.cpp in Sources */,
8542A7960AE5C94200DF58DF /* JSSVGPoint.cpp in Sources */,
B2FA3DE20AB75A6F000E5AC4 /* JSSVGPointList.cpp in Sources */,
- 516BB7930CE91E6800512F79 /* JSSVGPointListCustom.cpp in Sources */,
B2FA3DE50AB75A6F000E5AC4 /* JSSVGPolygonElement.cpp in Sources */,
B2FA3DE70AB75A6F000E5AC4 /* JSSVGPolylineElement.cpp in Sources */,
B2FA3DE90AB75A6F000E5AC4 /* JSSVGPreserveAspectRatio.cpp in Sources */,
@@ -19695,7 +19942,6 @@
B2FA3E080AB75A6F000E5AC4 /* JSSVGTitleElement.cpp in Sources */,
B2FA3E0A0AB75A6F000E5AC4 /* JSSVGTransform.cpp in Sources */,
B2FA3E0C0AB75A6F000E5AC4 /* JSSVGTransformList.cpp in Sources */,
- B2D3FC8A0C2212CB00CF3618 /* JSSVGTransformListCustom.cpp in Sources */,
B2FA3E0E0AB75A6F000E5AC4 /* JSSVGTRefElement.cpp in Sources */,
B2FA3E100AB75A6F000E5AC4 /* JSSVGTSpanElement.cpp in Sources */,
B2FA3E120AB75A6F000E5AC4 /* JSSVGUnitTypes.cpp in Sources */,
@@ -19711,6 +19957,42 @@
516BB7940CE91E6800512F79 /* JSTreeWalkerCustom.cpp in Sources */,
A86629D009DA2B48009633A5 /* JSUIEvent.cpp in Sources */,
15C77094100D3CA8005BA267 /* JSValidityState.cpp in Sources */,
+ A7D20F62107F406900A80392 /* JSWebGLActiveInfo.cpp in Sources */,
+ 49EECF1B105072F300099FAB /* JSWebGLArray.cpp in Sources */,
+ 49EECF00105070C400099FAB /* JSWebGLArrayBuffer.cpp in Sources */,
+ 49EECFAB1050938200099FAB /* JSWebGLArrayBufferConstructor.cpp in Sources */,
+ 492273A31083B3B100EE5C84 /* JSWebGLArrayCustom.cpp in Sources */,
+ 49C7B9931042D2D30009D447 /* JSWebGLBuffer.cpp in Sources */,
+ 49C7B9951042D2D30009D447 /* JSWebGLByteArray.cpp in Sources */,
+ 49EECFAD1050938200099FAB /* JSWebGLByteArrayConstructor.cpp in Sources */,
+ 49EECF7810508D9C00099FAB /* JSWebGLByteArrayCustom.cpp in Sources */,
+ 6EE8A77210F803F3005A4A24 /* JSWebGLContextAttributes.cpp in Sources */,
+ 49EECF02105070C400099FAB /* JSWebGLFloatArray.cpp in Sources */,
+ 49EECFAF1050938200099FAB /* JSWebGLFloatArrayConstructor.cpp in Sources */,
+ 49EECF7910508D9C00099FAB /* JSWebGLFloatArrayCustom.cpp in Sources */,
+ 49C7B9971042D2D30009D447 /* JSWebGLFramebuffer.cpp in Sources */,
+ 49EECF04105070C400099FAB /* JSWebGLIntArray.cpp in Sources */,
+ 49EECFB11050938200099FAB /* JSWebGLIntArrayConstructor.cpp in Sources */,
+ 49EECF7A10508D9C00099FAB /* JSWebGLIntArrayCustom.cpp in Sources */,
+ 49C7B99B1042D2D30009D447 /* JSWebGLProgram.cpp in Sources */,
+ 49C7B99D1042D2D30009D447 /* JSWebGLRenderbuffer.cpp in Sources */,
+ 49EED1461051969400099FAB /* JSWebGLRenderingContext.cpp in Sources */,
+ 49EED14F1051971A00099FAB /* JSWebGLRenderingContextCustom.cpp in Sources */,
+ 49C7B9A21042D2D30009D447 /* JSWebGLShader.cpp in Sources */,
+ 49EECF06105070C400099FAB /* JSWebGLShortArray.cpp in Sources */,
+ 49EECFB51050938200099FAB /* JSWebGLShortArrayConstructor.cpp in Sources */,
+ 49EECF7B10508D9C00099FAB /* JSWebGLShortArrayCustom.cpp in Sources */,
+ 49C7B9A41042D2D30009D447 /* JSWebGLTexture.cpp in Sources */,
+ 0C45342710CDBBFA00869157 /* JSWebGLUniformLocation.cpp in Sources */,
+ 49EECF08105070C400099FAB /* JSWebGLUnsignedByteArray.cpp in Sources */,
+ 49EECFB71050938200099FAB /* JSWebGLUnsignedByteArrayConstructor.cpp in Sources */,
+ 49EECF7C10508D9C00099FAB /* JSWebGLUnsignedByteArrayCustom.cpp in Sources */,
+ 49EECF0A105070C400099FAB /* JSWebGLUnsignedIntArray.cpp in Sources */,
+ 49EECFB91050938200099FAB /* JSWebGLUnsignedIntArrayConstructor.cpp in Sources */,
+ 49EECF7D10508D9C00099FAB /* JSWebGLUnsignedIntArrayCustom.cpp in Sources */,
+ 49EECF0C105070C400099FAB /* JSWebGLUnsignedShortArray.cpp in Sources */,
+ 49EECFBB1050938200099FAB /* JSWebGLUnsignedShortArrayConstructor.cpp in Sources */,
+ 49EECF7E10508D9C00099FAB /* JSWebGLUnsignedShortArrayCustom.cpp in Sources */,
31C0FF3D0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.cpp in Sources */,
316FE0710E6CCBEE00BF6088 /* JSWebKitCSSKeyframeRule.cpp in Sources */,
316FE0730E6CCBEE00BF6088 /* JSWebKitCSSKeyframesRule.cpp in Sources */,
@@ -19779,6 +20061,7 @@
FABE72F61059C1EB00D999DD /* MathMLInlineContainerElement.cpp in Sources */,
FABE72F81059C1EB00D999DD /* MathMLMathElement.cpp in Sources */,
FABE72FE1059C21100D999DD /* MathMLNames.cpp in Sources */,
+ FA654A6B1108ABED002615E0 /* MathMLTextElement.cpp in Sources */,
49D5DC2B0F423A73008F20FD /* Matrix3DTransformOperation.cpp in Sources */,
49E911C60EF86D47009D0CAF /* MatrixTransformOperation.cpp in Sources */,
0FF50271102BA96A0066F39A /* Media.cpp in Sources */,
@@ -19832,6 +20115,7 @@
1A569D1A0D7E2B82007C3983 /* objc_utility.mm in Sources */,
1CF6BDFB0E9BB26A0025E1CD /* ObjCEventListener.mm in Sources */,
1CF6BE140E9BB4670025E1CD /* ObjCNodeFilterCondition.mm in Sources */,
+ F4EAF4AE10C742B1009100D3 /* OpenTypeSanitizer.cpp in Sources */,
087281550F26B9B600AFC596 /* OptionElement.cpp in Sources */,
087281570F26B9B600AFC596 /* OptionGroupElement.cpp in Sources */,
0014628A103CD1DE000B20DB /* OriginAccessEntry.cpp in Sources */,
@@ -19865,9 +20149,11 @@
1AC694C70A3B1676003F5049 /* PluginDocument.cpp in Sources */,
7693BAD3106C2DCA007B0823 /* PluginHalter.cpp in Sources */,
1ADA14100E1AE5D900023EE5 /* PluginMainThreadScheduler.cpp in Sources */,
+ 0AFDAC3B10F5448300E1F3D2 /* PluginWidgetMac.mm in Sources */,
B2B1F7160D00CAA8004AEA64 /* PointerEventsHitRules.cpp in Sources */,
97059977107D975200A50A7C /* PolicyCallback.cpp in Sources */,
97059979107D975200A50A7C /* PolicyChecker.cpp in Sources */,
+ 5189F0DE10B46B0E00F3C739 /* PopStateEvent.cpp in Sources */,
0668E1900ADD9640004128E0 /* PopupMenuMac.mm in Sources */,
93F19AF808245E59001E9ABC /* Position.cpp in Sources */,
37919C230B7D188600A56998 /* PositionIterator.cpp in Sources */,
@@ -19896,6 +20182,7 @@
BCEA4865097D93020094C9E4 /* RenderButton.cpp in Sources */,
9392F1440AD185FE00691BD4 /* RenderCounter.cpp in Sources */,
BC77CEC80FF01CBE0070887B /* RenderDataGrid.cpp in Sources */,
+ 0F5B7A5410F65D7A00376302 /* RenderEmbeddedObject.cpp in Sources */,
A8EA73C30A1900E300A8EF5F /* RenderFieldset.cpp in Sources */,
066C77300AB603FD00238CC4 /* RenderFileUploadControl.cpp in Sources */,
BCEA486D097D93020094C9E4 /* RenderFlexibleBox.cpp in Sources */,
@@ -19914,6 +20201,7 @@
A8EA7A4E0A191A5200A8EF5F /* RenderListItem.cpp in Sources */,
A8EA7A510A191A5200A8EF5F /* RenderListMarker.cpp in Sources */,
0F5602900E4B76580065B038 /* RenderMarquee.cpp in Sources */,
+ FA654A6F1108ABFF002615E0 /* RenderMathMLBlock.cpp in Sources */,
E4C279580CF9741900E97B98 /* RenderMedia.cpp in Sources */,
ABDDFE790A5C6E7000A3E11D /* RenderMenuList.cpp in Sources */,
BCEA487F097D93020094C9E4 /* RenderObject.cpp in Sources */,
@@ -19923,6 +20211,10 @@
853CA9F00AEEC657002372DC /* RenderPath.cpp in Sources */,
A871DFE20A15376B00B12A68 /* RenderReplaced.cpp in Sources */,
BCA846D60DC67A350026C309 /* RenderReplica.cpp in Sources */,
+ 1479FAED109AE37500DED655 /* RenderRuby.cpp in Sources */,
+ 1479FAEF109AE37500DED655 /* RenderRubyBase.cpp in Sources */,
+ 1479FAF1109AE37500DED655 /* RenderRubyRun.cpp in Sources */,
+ 1479FAF3109AE37500DED655 /* RenderRubyText.cpp in Sources */,
BC3BE9930E9C1C7C00835588 /* RenderScrollbar.cpp in Sources */,
BC3BE9AB0E9C242000835588 /* RenderScrollbarPart.cpp in Sources */,
BC3BE9A50E9C239600835588 /* RenderScrollbarTheme.cpp in Sources */,
@@ -19937,6 +20229,7 @@
853CA9DC0AEEC5E9002372DC /* RenderSVGInlineText.cpp in Sources */,
A8F5C0B90F9285AC0098E06B /* RenderSVGModelObject.cpp in Sources */,
AA31B5B40C1DFD1000AE7083 /* RenderSVGRoot.cpp in Sources */,
+ 08DAB9BA1103D9A5003E7ABA /* RenderSVGShadowTreeRootContainer.cpp in Sources */,
853CA9DE0AEEC5E9002372DC /* RenderSVGText.cpp in Sources */,
B26554EA0B80D74900A50EC3 /* RenderSVGTextPath.cpp in Sources */,
A8A909AD0CBCD6B50029B807 /* RenderSVGTransformableContainer.cpp in Sources */,
@@ -19968,6 +20261,7 @@
514C76510CE9234E007EF3CD /* ResourceHandleMac.mm in Sources */,
93E227E30AF589AD00D48324 /* ResourceLoader.cpp in Sources */,
51AA3F6F0BD5AA9E00892971 /* ResourceLoaderMac.mm in Sources */,
+ 973E325610883B7C005BC493 /* ResourceLoadNotifier.cpp in Sources */,
514C767C0CE923A1007EF3CD /* ResourceRequestBase.cpp in Sources */,
514C76530CE9234E007EF3CD /* ResourceRequestMac.mm in Sources */,
514C767E0CE923A1007EF3CD /* ResourceResponseBase.cpp in Sources */,
@@ -20040,6 +20334,7 @@
4B3043C90AE0371D00A82647 /* SoundMac.mm in Sources */,
84A81F3D0FC7DFF000955300 /* SourceAlpha.cpp in Sources */,
84A81F410FC7E02700955300 /* SourceGraphic.cpp in Sources */,
+ D01A27AD10C9BFD800026A42 /* SpaceSplitString.cpp in Sources */,
93309E11099E64920056E581 /* SplitElementCommand.cpp in Sources */,
93309E13099E64920056E581 /* SplitTextNodeCommand.cpp in Sources */,
93309E15099E64920056E581 /* SplitTextNodeContainingElementCommand.cpp in Sources */,
@@ -20190,6 +20485,7 @@
B2227A3B0D00BF220071B782 /* SVGLineElement.cpp in Sources */,
B2227A400D00BF220071B782 /* SVGLocatable.cpp in Sources */,
B2227A430D00BF220071B782 /* SVGMarkerElement.cpp in Sources */,
+ 08735FB810E91232006D6FAD /* SVGMarkerLayoutInfo.cpp in Sources */,
B2227A460D00BF220071B782 /* SVGMaskElement.cpp in Sources */,
B2227A4A0D00BF220071B782 /* SVGMetadataElement.cpp in Sources */,
B2A1F2B00CEF0ABF00442F6A /* SVGMissingGlyphElement.cpp in Sources */,
@@ -20236,6 +20532,7 @@
853CA9E80AEEC608002372DC /* SVGRootInlineBox.cpp in Sources */,
B2227AA20D00BF220071B782 /* SVGScriptElement.cpp in Sources */,
B2227AA50D00BF220071B782 /* SVGSetElement.cpp in Sources */,
+ 08DAB9C21103D9C1003E7ABA /* SVGShadowTreeElements.cpp in Sources */,
E4AFD00F0DAF335500F5F55C /* SVGSMILElement.cpp in Sources */,
B2227AA80D00BF220071B782 /* SVGStopElement.cpp in Sources */,
B2227AAB0D00BF220071B782 /* SVGStringList.cpp in Sources */,
@@ -20265,7 +20562,6 @@
B2227AF20D00BF220071B782 /* SVGViewSpec.cpp in Sources */,
B2227AF50D00BF220071B782 /* SVGZoomAndPan.cpp in Sources */,
B2E4EC970D00C22B00432643 /* SVGZoomEvent.cpp in Sources */,
- 0878B1FE10874E3F00A55097 /* SynchronizablePropertyController.cpp in Sources */,
6582A16309999D6D00BEEB6D /* SystemTimeMac.cpp in Sources */,
BCE3BEC20D222B1D007E06E4 /* TagNodeList.cpp in Sources */,
6550B6A5099DF0270090D781 /* Text.cpp in Sources */,
@@ -20290,9 +20586,11 @@
BCE65D320EAD1211007E4533 /* Theme.cpp in Sources */,
BCE659E90EA92FFA007E4533 /* ThemeMac.mm in Sources */,
0B90561E0F257E930095FF6A /* ThreadableLoader.cpp in Sources */,
+ 5112247210CFB8C6008099D7 /* ThreadableWebSocketChannel.cpp in Sources */,
51DF6D800B92A18E00C2DC85 /* ThreadCheck.mm in Sources */,
E1FF57A60F01256B00891EBB /* ThreadGlobalData.cpp in Sources */,
185BCF280F3279CE000EA262 /* ThreadTimers.cpp in Sources */,
+ 7553CFE9108F473F00EA281E /* TimelineRecordFactory.cpp in Sources */,
93309EA4099EB78C0056E581 /* Timer.cpp in Sources */,
E44613AF0CD6331000FADA75 /* TimeRanges.cpp in Sources */,
49E911C30EF86D47009D0CAF /* TransformationMatrix.cpp in Sources */,
@@ -20323,6 +20621,25 @@
93F19A5F08245E59001E9ABC /* WebCoreViewFactory.m in Sources */,
93F19B0808245E59001E9ABC /* WebDashboardRegion.m in Sources */,
BC6DADFA0A19602B00E5CD14 /* WebFontCache.mm in Sources */,
+ 49EECDDF10503C2400099FAB /* WebGLArray.cpp in Sources */,
+ 49EECDE210503C2400099FAB /* WebGLArrayBuffer.cpp in Sources */,
+ 49C7B9C81042D32F0009D447 /* WebGLBuffer.cpp in Sources */,
+ 49C7B9CB1042D32F0009D447 /* WebGLByteArray.cpp in Sources */,
+ 6E4E91AE10F7FB3100A2779C /* WebGLContextAttributes.cpp in Sources */,
+ 49EECDE510503C2400099FAB /* WebGLFloatArray.cpp in Sources */,
+ 49C7B9CE1042D32F0009D447 /* WebGLFramebuffer.cpp in Sources */,
+ 6E47E66010B7944B00B186C8 /* WebGLGetInfo.cpp in Sources */,
+ 49EECDE810503C2400099FAB /* WebGLIntArray.cpp in Sources */,
+ 49C7B9D61042D32F0009D447 /* WebGLProgram.cpp in Sources */,
+ 49C7B9D91042D32F0009D447 /* WebGLRenderbuffer.cpp in Sources */,
+ 49C7B9DF1042D32F0009D447 /* WebGLRenderingContext.cpp in Sources */,
+ 49C7B9E21042D32F0009D447 /* WebGLShader.cpp in Sources */,
+ 49EECDEB10503C2400099FAB /* WebGLShortArray.cpp in Sources */,
+ 49C7B9E51042D32F0009D447 /* WebGLTexture.cpp in Sources */,
+ 0C3F1F5A10C8871200D72CE1 /* WebGLUniformLocation.cpp in Sources */,
+ 49EECDEE10503C2400099FAB /* WebGLUnsignedByteArray.cpp in Sources */,
+ 49EECDF110503C2400099FAB /* WebGLUnsignedIntArray.cpp in Sources */,
+ 49EECDF410503C2400099FAB /* WebGLUnsignedShortArray.cpp in Sources */,
31C0FF210E4CEB6E007D6FE5 /* WebKitAnimationEvent.cpp in Sources */,
31288E720E3005D6003619AE /* WebKitCSSKeyframeRule.cpp in Sources */,
31288E740E3005D6003619AE /* WebKitCSSKeyframesRule.cpp in Sources */,
@@ -20389,11 +20706,13 @@
A7D6B34A0F61104500B79FD1 /* WorkerScriptLoader.cpp in Sources */,
2E4346540F546A8200B0F1BA /* WorkerThread.cpp in Sources */,
0B9056F80F2685F30095FF6A /* WorkerThreadableLoader.cpp in Sources */,
+ 5112247810CFB8F4008099D7 /* WorkerThreadableWebSocketChannel.cpp in Sources */,
93309E23099E64920056E581 /* WrapContentsInDummySpanCommand.cpp in Sources */,
A833C7CC0A2CF07400D57664 /* XLinkNames.cpp in Sources */,
BC772C460C4EB2C60083285F /* XMLHttpRequest.cpp in Sources */,
BCDFD48F0E305290009D10AD /* XMLHttpRequestUpload.cpp in Sources */,
A833C80C0A2CF25600D57664 /* XMLNames.cpp in Sources */,
+ E15A36D91104572700B7B639 /* XMLNSNames.cpp in Sources */,
1ACE53EA0A8D18E70022947D /* XMLSerializer.cpp in Sources */,
93F19ABC08245E59001E9ABC /* XMLTokenizer.cpp in Sources */,
54C50F7B0E801DF3009832A0 /* XMLTokenizerLibxml2.cpp in Sources */,
@@ -20421,6 +20740,7 @@
93F19B0508245E59001E9ABC /* XSLTProcessorLibxslt.cpp in Sources */,
E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */,
+<<<<<<< HEAD
3314ACEB10892086000F0E56 /* JSExceptionBase.cpp in Sources */,
973E325610883B7C005BC493 /* ResourceLoadNotifier.cpp in Sources */,
84801954108BAFB300CB2B1F /* FEGaussianBlur.cpp in Sources */,
@@ -20455,6 +20775,8 @@
59E842681109E5AE000305AD /* JNIBridgeJSC.cpp in Sources */,
59B597731108656B007159E8 /* BridgeJSC.cpp in Sources */,
59BD83BC11199B9C00E1B6A9 /* GeolocationPositionCache.cpp in Sources */,
+=======
+>>>>>>> webkit.org at r54127
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -20501,10 +20823,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 1CDD45E50BA9C84600F90147 /* WebCore.xcconfig */;
buildSettings = {
- BUILD_VARIANTS = (
- normal,
- debug,
- );
+ BUILD_VARIANTS = normal;
};
name = Production;
};
diff --git a/WebCore/WebCorePrefix.cpp b/WebCore/WebCorePrefix.cpp
index e0f19a0..02a5643 100644
--- a/WebCore/WebCorePrefix.cpp
+++ b/WebCore/WebCorePrefix.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/WebCore/WebCoreSources.bkl b/WebCore/WebCoreSources.bkl
index 50e6b94..3833e58 100644
--- a/WebCore/WebCoreSources.bkl
+++ b/WebCore/WebCoreSources.bkl
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
<?xml version="1.0" ?>
<!--
@@ -1105,3 +1106,5 @@ This file contains the list of files needed to build WebCore.
</set>
</makefile>
+=======
+>>>>>>> webkit.org at r54127
diff --git a/WebCore/accessibility/AXObjectCache.cpp b/WebCore/accessibility/AXObjectCache.cpp
index 6ec325a..c347a81 100644
--- a/WebCore/accessibility/AXObjectCache.cpp
+++ b/WebCore/accessibility/AXObjectCache.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -37,7 +37,11 @@
#include "AccessibilityListBox.h"
#include "AccessibilityListBoxOption.h"
#include "AccessibilityMediaControls.h"
+#include "AccessibilityMenuList.h"
+#include "AccessibilityMenuListPopup.h"
+#include "AccessibilityMenuListOption.h"
#include "AccessibilityRenderObject.h"
+#include "AccessibilityScrollbar.h"
#include "AccessibilitySlider.h"
#include "AccessibilityTable.h"
#include "AccessibilityTableCell.h"
@@ -46,6 +50,8 @@
#include "AccessibilityTableRow.h"
#include "FocusController.h"
#include "Frame.h"
+#include "HTMLAreaElement.h"
+#include "HTMLImageElement.h"
#include "HTMLNames.h"
#if ENABLE(VIDEO)
#include "MediaControlElements.h"
@@ -80,6 +86,35 @@ AXObjectCache::~AXObjectCache()
}
}
+AccessibilityObject* AXObjectCache::focusedImageMapUIElement(HTMLAreaElement* areaElement)
+{
+ // Find the corresponding accessibility object for the HTMLAreaElement. This should be
+ // in the list of children for its corresponding image.
+ if (!areaElement)
+ return 0;
+
+ HTMLImageElement* imageElement = areaElement->imageElement();
+ if (!imageElement)
+ return 0;
+
+ AccessibilityObject* axRenderImage = areaElement->document()->axObjectCache()->getOrCreate(imageElement->renderer());
+ if (!axRenderImage)
+ return 0;
+
+ AccessibilityObject::AccessibilityChildrenVector imageChildren = axRenderImage->children();
+ unsigned count = imageChildren.size();
+ for (unsigned k = 0; k < count; ++k) {
+ AccessibilityObject* child = imageChildren[k].get();
+ if (!child->isImageMapLink())
+ continue;
+
+ if (static_cast<AccessibilityImageMapLink*>(child)->areaElement() == areaElement)
+ return child;
+ }
+
+ return 0;
+}
+
AccessibilityObject* AXObjectCache::focusedUIElementForPage(const Page* page)
{
// get the focused node in the page
@@ -88,6 +123,9 @@ AccessibilityObject* AXObjectCache::focusedUIElementForPage(const Page* page)
if (!focusedNode)
focusedNode = focusedDocument;
+ if (focusedNode->hasTagName(areaTag))
+ return focusedImageMapUIElement(static_cast<HTMLAreaElement*>(focusedNode));
+
RenderObject* focusedNodeRenderer = focusedNode->renderer();
if (!focusedNodeRenderer)
return 0;
@@ -141,6 +179,8 @@ AccessibilityObject* AXObjectCache::getOrCreate(RenderObject* renderer)
RefPtr<AccessibilityObject> newObj = 0;
if (renderer->isListBox())
newObj = AccessibilityListBox::create(renderer);
+ else if (renderer->isMenuList())
+ newObj = AccessibilityMenuList::create(renderer);
// If the node is aria role="list" or the aria role is empty and its a ul/ol/dl type (it shouldn't be a list if aria says otherwise).
else if (node && ((nodeIsAriaType(node, "list") || nodeIsAriaType(node, "directory"))
@@ -148,7 +188,7 @@ AccessibilityObject* AXObjectCache::getOrCreate(RenderObject* renderer)
newObj = AccessibilityList::create(renderer);
// aria tables
- else if (nodeIsAriaType(node, "grid"))
+ else if (nodeIsAriaType(node, "grid") || nodeIsAriaType(node, "treegrid"))
newObj = AccessibilityARIAGrid::create(renderer);
else if (nodeIsAriaType(node, "row"))
newObj = AccessibilityARIAGridRow::create(renderer);
@@ -209,6 +249,15 @@ AccessibilityObject* AXObjectCache::getOrCreate(AccessibilityRole role)
case SliderThumbRole:
obj = AccessibilitySliderThumb::create();
break;
+ case MenuListPopupRole:
+ obj = AccessibilityMenuListPopup::create();
+ break;
+ case MenuListOptionRole:
+ obj = AccessibilityMenuListOption::create();
+ break;
+ case ScrollBarRole:
+ obj = AccessibilityScrollbar::create();
+ break;
default:
obj = 0;
}
@@ -288,20 +337,29 @@ AXID AXObjectCache::getAXID(AccessibilityObject* obj)
return objID;
}
-void AXObjectCache::removeAXID(AccessibilityObject* obj)
+void AXObjectCache::removeAXID(AccessibilityObject* object)
{
- if (!obj)
+ if (!object)
return;
- AXID objID = obj->axObjectID();
+ AXID objID = object->axObjectID();
if (!objID)
return;
ASSERT(!HashTraits<AXID>::isDeletedValue(objID));
ASSERT(m_idsInUse.contains(objID));
- obj->setAXObjectID(0);
+ object->setAXObjectID(0);
m_idsInUse.remove(objID);
}
+#if HAVE(ACCESSIBILITY)
+void AXObjectCache::contentChanged(RenderObject* renderer)
+{
+ AccessibilityObject* object = getOrCreate(renderer);
+ if (object)
+ object->contentChanged();
+}
+#endif
+
void AXObjectCache::childrenChanged(RenderObject* renderer)
{
if (!renderer)
@@ -341,7 +399,7 @@ void AXObjectCache::notificationPostTimerFired(Timer<AXObjectCache>*)
}
#if HAVE(ACCESSIBILITY)
-void AXObjectCache::postNotification(RenderObject* renderer, AXNotification notification, bool postToElement)
+void AXObjectCache::postNotification(RenderObject* renderer, AXNotification notification, bool postToElement, PostType postType)
{
// Notifications for text input objects are sent to that object.
// All others are sent to the top WebArea.
@@ -350,28 +408,35 @@ void AXObjectCache::postNotification(RenderObject* renderer, AXNotification noti
// Get an accessibility object that already exists. One should not be created here
// because a render update may be in progress and creating an AX object can re-trigger a layout
- RefPtr<AccessibilityObject> obj = get(renderer);
- while (!obj && renderer) {
+ RefPtr<AccessibilityObject> object = get(renderer);
+ while (!object && renderer) {
renderer = renderer->parent();
- obj = get(renderer);
+ object = get(renderer);
}
if (!renderer)
return;
-
- if (obj && !postToElement)
- obj = obj->observableObject();
- Document* document = renderer->document();
- if (!obj && document)
- obj = get(document->renderer());
-
- if (!obj)
+ postNotification(object.get(), renderer->document(), notification, postToElement, postType);
+}
+
+void AXObjectCache::postNotification(AccessibilityObject* object, Document* document, AXNotification notification, bool postToElement, PostType postType)
+{
+ if (object && !postToElement)
+ object = object->observableObject();
+
+ if (!object && document)
+ object = get(document->renderer());
+
+ if (!object)
return;
- m_notificationsToPost.append(make_pair(obj, notification));
- if (!m_notificationPostTimer.isActive())
- m_notificationPostTimer.startOneShot(0);
+ if (postType == PostAsynchronously) {
+ m_notificationsToPost.append(make_pair(object, notification));
+ if (!m_notificationPostTimer.isActive())
+ m_notificationPostTimer.startOneShot(0);
+ } else
+ postPlatformNotification(object, notification);
}
void AXObjectCache::selectedChildrenChanged(RenderObject* renderer)
diff --git a/WebCore/accessibility/AXObjectCache.h b/WebCore/accessibility/AXObjectCache.h
index adfddcd..dad73f2 100644
--- a/WebCore/accessibility/AXObjectCache.h
+++ b/WebCore/accessibility/AXObjectCache.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2003, 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
@@ -42,6 +42,7 @@ class WebCoreTextMarker;
namespace WebCore {
+class HTMLAreaElement;
class Node;
class Page;
class RenderObject;
@@ -55,6 +56,8 @@ struct TextMarkerData {
EAffinity affinity;
};
+enum PostType { PostSynchronously, PostAsynchronously };
+
class AXObjectCache : public Noncopyable {
public:
AXObjectCache();
@@ -78,6 +81,9 @@ public:
void attachWrapper(AccessibilityObject*);
void childrenChanged(RenderObject*);
void selectedChildrenChanged(RenderObject*);
+ // Called by a node when text or a text equivalent (e.g. alt) attribute is changed.
+ void contentChanged(RenderObject*);
+
void handleActiveDescendantChanged(RenderObject*);
void handleAriaRoleChanged(RenderObject*);
void handleFocusedUIElementChanged(RenderObject* oldFocusedRenderer, RenderObject* newFocusedRenderer);
@@ -108,9 +114,12 @@ public:
AXSelectedTextChanged,
AXValueChanged,
AXScrolledToAnchor,
+ AXLiveRegionChanged,
+ AXMenuListValueChanged,
};
-
- void postNotification(RenderObject*, AXNotification, bool postToElement);
+
+ void postNotification(RenderObject*, AXNotification, bool postToElement, PostType = PostAsynchronously);
+ void postNotification(AccessibilityObject*, Document*, AXNotification, bool postToElement, PostType = PostAsynchronously);
protected:
void postPlatformNotification(AccessibilityObject*, AXNotification);
@@ -127,6 +136,8 @@ private:
Vector<pair<RefPtr<AccessibilityObject>, AXNotification> > m_notificationsToPost;
void notificationPostTimerFired(Timer<AXObjectCache>*);
+ static AccessibilityObject* focusedImageMapUIElement(HTMLAreaElement*);
+
AXID getAXID(AccessibilityObject*);
bool nodeIsAriaType(Node*, String role);
};
@@ -137,10 +148,11 @@ inline void AXObjectCache::handleAriaRoleChanged(RenderObject*) { }
inline void AXObjectCache::detachWrapper(AccessibilityObject*) { }
inline void AXObjectCache::attachWrapper(AccessibilityObject*) { }
inline void AXObjectCache::selectedChildrenChanged(RenderObject*) { }
-inline void AXObjectCache::postNotification(RenderObject*, AXNotification, bool postToElement) { }
+inline void AXObjectCache::postNotification(RenderObject*, AXNotification, bool postToElement, PostType) { }
inline void AXObjectCache::postPlatformNotification(AccessibilityObject*, AXNotification) { }
inline void AXObjectCache::handleFocusedUIElementChanged(RenderObject*, RenderObject*) { }
inline void AXObjectCache::handleScrolledToAnchor(const Node*) { }
+inline void AXObjectCache::contentChanged(RenderObject*) { }
#endif
}
diff --git a/WebCore/accessibility/AccessibilityARIAGrid.h b/WebCore/accessibility/AccessibilityARIAGrid.h
index 32c8ce9..3511f0f 100644
--- a/WebCore/accessibility/AccessibilityARIAGrid.h
+++ b/WebCore/accessibility/AccessibilityARIAGrid.h
@@ -52,6 +52,9 @@ public:
virtual AccessibilityTableCell* cellForColumnAndRow(unsigned column, unsigned row);
private:
+ // ARIA treegrids and grids support selected rows.
+ virtual bool supportsSelectedRows() { return true; }
+
void addChild(AccessibilityObject* object, HashSet<AccessibilityObject*>& appendedRows, unsigned& columnCount);
};
diff --git a/WebCore/accessibility/AccessibilityARIAGridRow.cpp b/WebCore/accessibility/AccessibilityARIAGridRow.cpp
index 6e1f1c8..7d562d9 100644
--- a/WebCore/accessibility/AccessibilityARIAGridRow.cpp
+++ b/WebCore/accessibility/AccessibilityARIAGridRow.cpp
@@ -30,6 +30,7 @@
#include "AccessibilityARIAGridRow.h"
#include "AccessibilityObject.h"
+#include "AccessibilityTable.h"
#include "RenderObject.h"
using namespace std;
@@ -50,6 +51,71 @@ PassRefPtr<AccessibilityARIAGridRow> AccessibilityARIAGridRow::create(RenderObje
return adoptRef(new AccessibilityARIAGridRow(renderer));
}
+bool AccessibilityARIAGridRow::isARIATreeGridRow() const
+{
+ AccessibilityObject* parent = parentTable();
+ if (!parent)
+ return false;
+
+ return parent->ariaRoleAttribute() == TreeGridRole;
+}
+
+void AccessibilityARIAGridRow::disclosedRows(AccessibilityChildrenVector& disclosedRows)
+{
+ // The contiguous disclosed rows will be the rows in the table that
+ // have an aria-level of plus 1 from this row.
+ AccessibilityObject* parent = parentObjectUnignored();
+ if (!parent || !parent->isDataTable())
+ return;
+
+ // Search for rows that match the correct level.
+ // Only take the subsequent rows from this one that are +1 from this row's level.
+ int index = rowIndex();
+ if (index < 0)
+ return;
+
+ unsigned level = hierarchicalLevel();
+ AccessibilityChildrenVector& allRows = static_cast<AccessibilityTable*>(parent)->rows();
+ int rowCount = allRows.size();
+ for (int k = index + 1; k < rowCount; ++k) {
+ AccessibilityObject* row = allRows[k].get();
+ // Stop at the first row that doesn't match the correct level.
+ if (row->hierarchicalLevel() != level + 1)
+ break;
+
+ disclosedRows.append(row);
+ }
+}
+
+AccessibilityObject* AccessibilityARIAGridRow::disclosedByRow() const
+{
+ // The row that discloses this one is the row in the table
+ // that is aria-level subtract 1 from this row.
+ AccessibilityObject* parent = parentObjectUnignored();
+ if (!parent || !parent->isDataTable())
+ return 0;
+
+ // If the level is 1 or less, than nothing discloses this row.
+ unsigned level = hierarchicalLevel();
+ if (level <= 1)
+ return 0;
+
+ // Search for the previous row that matches the correct level.
+ int index = rowIndex();
+ AccessibilityChildrenVector& allRows = static_cast<AccessibilityTable*>(parent)->rows();
+ int rowCount = allRows.size();
+ if (index >= rowCount)
+ return 0;
+
+ for (int k = index - 1; k >= 0; --k) {
+ AccessibilityObject* row = allRows[k].get();
+ if (row->hierarchicalLevel() == level - 1)
+ return row;
+ }
+
+ return 0;
+}
+
AccessibilityObject* AccessibilityARIAGridRow::parentTable() const
{
AccessibilityObject* parent = parentObjectUnignored();
diff --git a/WebCore/accessibility/AccessibilityARIAGridRow.h b/WebCore/accessibility/AccessibilityARIAGridRow.h
index c2ca8b8..f89ea92 100644
--- a/WebCore/accessibility/AccessibilityARIAGridRow.h
+++ b/WebCore/accessibility/AccessibilityARIAGridRow.h
@@ -41,8 +41,14 @@ public:
static PassRefPtr<AccessibilityARIAGridRow> create(RenderObject*);
virtual ~AccessibilityARIAGridRow();
+ void disclosedRows(AccessibilityChildrenVector&);
+ AccessibilityObject* disclosedByRow() const;
+
virtual AccessibilityObject* headerObject();
virtual AccessibilityObject* parentTable() const;
+
+private:
+ virtual bool isARIATreeGridRow() const;
};
} // namespace WebCore
diff --git a/WebCore/accessibility/AccessibilityAllInOne.cpp b/WebCore/accessibility/AccessibilityAllInOne.cpp
index ada50cd..28b1c9b 100755
--- a/WebCore/accessibility/AccessibilityAllInOne.cpp
+++ b/WebCore/accessibility/AccessibilityAllInOne.cpp
@@ -36,6 +36,7 @@
#include <AccessibilityMediaControls.cpp>
#include <AccessibilityObject.cpp>
#include <AccessibilityRenderObject.cpp>
+#include <AccessibilityScrollbar.cpp>
#include <AccessibilitySlider.cpp>
#include <AccessibilityTable.cpp>
#include <AccessibilityTableCell.cpp>
diff --git a/WebCore/accessibility/AccessibilityImageMapLink.h b/WebCore/accessibility/AccessibilityImageMapLink.h
index 3024f37..ca4c62c 100644
--- a/WebCore/accessibility/AccessibilityImageMapLink.h
+++ b/WebCore/accessibility/AccessibilityImageMapLink.h
@@ -44,13 +44,17 @@ public:
virtual ~AccessibilityImageMapLink();
void setHTMLAreaElement(HTMLAreaElement* element) { m_areaElement = element; }
+ HTMLAreaElement* areaElement() const { return m_areaElement; }
+
void setHTMLMapElement(HTMLMapElement* element) { m_mapElement = element; }
+ HTMLMapElement* mapElement() const { return m_mapElement; }
+
void setParent(AccessibilityObject* parent) { m_parent = parent; }
virtual AccessibilityRole roleValue() const;
virtual bool accessibilityIsIgnored() const { return false; }
virtual bool isEnabled() const { return true; }
-
+
virtual AccessibilityObject* parentObject() const;
virtual Element* anchorElement() const;
virtual Element* actionElement() const;
@@ -70,6 +74,8 @@ private:
HTMLAreaElement* m_areaElement;
HTMLMapElement* m_mapElement;
AccessibilityObject* m_parent;
+
+ virtual bool isImageMapLink() const { return true; }
};
} // namespace WebCore
diff --git a/WebCore/accessibility/AccessibilityListBox.cpp b/WebCore/accessibility/AccessibilityListBox.cpp
index 2a60294..2c267c1 100644
--- a/WebCore/accessibility/AccessibilityListBox.cpp
+++ b/WebCore/accessibility/AccessibilityListBox.cpp
@@ -78,7 +78,7 @@ void AccessibilityListBox::addChildren()
unsigned length = listItems.size();
for (unsigned i = 0; i < length; i++) {
// The cast to HTMLElement below is safe because the only other possible listItem type
- // would be a WMLElement, but WML builds don't use accessbility features at all.
+ // would be a WMLElement, but WML builds don't use accessibility features at all.
AccessibilityObject* listOption = listBoxOptionAccessibilityObject(static_cast<HTMLElement*>(listItems[i]));
if (listOption)
m_children.append(listOption);
@@ -170,7 +170,7 @@ AccessibilityObject* AccessibilityListBox::doAccessibilityHitTest(const IntPoint
for (unsigned i = 0; i < length; i++) {
IntRect rect = toRenderListBox(m_renderer)->itemBoundingBoxRect(parentRect.x(), parentRect.y(), i);
// The cast to HTMLElement below is safe because the only other possible listItem type
- // would be a WMLElement, but WML builds don't use accessbility features at all.
+ // would be a WMLElement, but WML builds don't use accessibility features at all.
if (rect.contains(point))
return listBoxOptionAccessibilityObject(static_cast<HTMLElement*>(listItems[i]));
}
diff --git a/WebCore/accessibility/AccessibilityMenuList.cpp b/WebCore/accessibility/AccessibilityMenuList.cpp
new file mode 100644
index 0000000..05cdf97
--- /dev/null
+++ b/WebCore/accessibility/AccessibilityMenuList.cpp
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+#include "AccessibilityMenuList.h"
+
+#include "AXObjectCache.h"
+#include "AccessibilityMenuListPopup.h"
+#include "RenderMenuList.h"
+
+namespace WebCore {
+
+AccessibilityMenuList::AccessibilityMenuList(RenderObject* renderer)
+ : AccessibilityRenderObject(renderer)
+{
+ ASSERT_ARG(renderer, renderer->isMenuList());
+}
+
+bool AccessibilityMenuList::press() const
+{
+ RenderMenuList* menuList = static_cast<RenderMenuList*>(m_renderer);
+ if (menuList->popupIsVisible())
+ menuList->hidePopup();
+ else
+ menuList->showPopup();
+ return true;
+}
+
+void AccessibilityMenuList::addChildren()
+{
+ m_haveChildren = true;
+
+ AXObjectCache* cache = m_renderer->document()->axObjectCache();
+
+ AccessibilityObject* list = cache->getOrCreate(MenuListPopupRole);
+ if (!list)
+ return;
+
+ if (list->accessibilityPlatformIncludesObject() == IgnoreObject) {
+ cache->remove(list->axObjectID());
+ return;
+ }
+
+ static_cast<AccessibilityMenuListPopup*>(list)->setMenuList(this);
+ m_children.append(list);
+
+ list->addChildren();
+}
+
+void AccessibilityMenuList::childrenChanged()
+{
+ if (m_children.isEmpty())
+ return;
+
+ ASSERT(m_children.size() == 1);
+ m_children[0]->childrenChanged();
+}
+
+bool AccessibilityMenuList::isCollapsed() const
+{
+ return !static_cast<RenderMenuList*>(m_renderer)->popupIsVisible();
+}
+
+} // namespace WebCore
diff --git a/WebCore/bindings/js/JSInspectorCallbackWrapper.h b/WebCore/accessibility/AccessibilityMenuList.h
index be28063..d00c8b4 100644
--- a/WebCore/bindings/js/JSInspectorCallbackWrapper.h
+++ b/WebCore/accessibility/AccessibilityMenuList.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * 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
@@ -20,34 +20,40 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef JSInspectorCallbackWrapper_h
-#define JSInspectorCallbackWrapper_h
+#ifndef AccessibilityMenuList_h
+#define AccessibilityMenuList_h
-#include "JSQuarantinedObjectWrapper.h"
+#include "AccessibilityObject.h"
+#include "AccessibilityRenderObject.h"
namespace WebCore {
- class JSInspectorCallbackWrapper : public JSQuarantinedObjectWrapper {
- public:
- static JSC::JSValue wrap(JSC::ExecState* unwrappedExec, JSC::JSValue unwrappedValue);
+class AccessibilityMenuList;
+class AccessibilityMenuListPopup;
+class HTMLOptionElement;
- virtual ~JSInspectorCallbackWrapper();
+class AccessibilityMenuList : public AccessibilityRenderObject {
+public:
+ static PassRefPtr<AccessibilityMenuList> create(RenderObject* renderer) { return adoptRef(new AccessibilityMenuList(renderer)); }
- virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
- static const JSC::ClassInfo s_info;
+ virtual bool isCollapsed() const;
+ virtual bool press() const;
- protected:
- JSInspectorCallbackWrapper(JSC::ExecState* unwrappedExec, JSC::JSObject* unwrappedObject, NonNullPassRefPtr<JSC::Structure>);
+private:
+ AccessibilityMenuList(RenderObject*);
- virtual bool allowsCallAsFunction() const { return true; }
+ virtual bool isMenuList() const { return true; }
+ virtual AccessibilityRole roleValue() const { return PopUpButtonRole; }
+ virtual bool accessibilityIsIgnored() const { return false; }
+ virtual bool canSetFocusAttribute() const { return true; }
- virtual JSC::JSValue prepareIncomingValue(JSC::ExecState* unwrappedExec, JSC::JSValue unwrappedValue) const;
- virtual JSC::JSValue wrapOutgoingValue(JSC::ExecState* unwrappedExec, JSC::JSValue unwrappedValue) const { return wrap(unwrappedExec, unwrappedValue); }
- };
+ virtual void addChildren();
+ virtual void childrenChanged();
+};
} // namespace WebCore
-#endif // JSInspectorCallbackWrapper_h
+#endif // AccessibilityMenuList_h
diff --git a/WebCore/accessibility/AccessibilityMenuListOption.cpp b/WebCore/accessibility/AccessibilityMenuListOption.cpp
new file mode 100644
index 0000000..d7473de
--- /dev/null
+++ b/WebCore/accessibility/AccessibilityMenuListOption.cpp
@@ -0,0 +1,113 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+#include "AccessibilityMenuListOption.h"
+
+#include "AXObjectCache.h"
+#include "AccessibilityMenuListPopup.h"
+#include "HTMLNames.h"
+#include "HTMLOptionElement.h"
+
+namespace WebCore {
+
+using namespace HTMLNames;
+
+AccessibilityMenuListOption::AccessibilityMenuListOption()
+ : m_popup(0)
+{
+}
+
+void AccessibilityMenuListOption::setElement(HTMLElement* element)
+{
+ ASSERT_ARG(element, element->hasTagName(optionTag));
+ m_element = element;
+}
+
+Element* AccessibilityMenuListOption::actionElement() const
+{
+ return m_element.get();
+}
+
+AccessibilityObject* AccessibilityMenuListOption::parentObject() const
+{
+ return m_popup;
+}
+
+bool AccessibilityMenuListOption::isEnabled() const
+{
+ // disabled() returns true if the parent <select> element is disabled,
+ // which we don't want.
+ return !static_cast<HTMLOptionElement*>(m_element.get())->ownElementDisabled();
+}
+
+bool AccessibilityMenuListOption::isVisible() const
+{
+ // In a single-option select with the popup collapsed, only the selected
+ // item is considered visible.
+ return !m_popup->isOffScreen() || isSelected();
+}
+
+bool AccessibilityMenuListOption::isOffScreen() const
+{
+ // Invisible list options are considered to be offscreen.
+ return !isVisible();
+}
+
+bool AccessibilityMenuListOption::isSelected() const
+{
+ return static_cast<HTMLOptionElement*>(m_element.get())->selected();
+}
+
+void AccessibilityMenuListOption::setSelected(bool b)
+{
+ if (!canSetSelectedAttribute())
+ return;
+
+ static_cast<HTMLOptionElement*>(m_element.get())->setSelected(b);
+}
+
+String AccessibilityMenuListOption::nameForMSAA() const
+{
+ return static_cast<HTMLOptionElement*>(m_element.get())->text();
+}
+
+bool AccessibilityMenuListOption::canSetSelectedAttribute() const
+{
+ return isEnabled();
+}
+
+IntRect AccessibilityMenuListOption::elementRect() const
+{
+ AccessibilityObject* parent = parentObject();
+ ASSERT(parent->isMenuListPopup());
+
+ AccessibilityObject* grandparent = parent->parentObject();
+ ASSERT(grandparent->isMenuList());
+
+ return grandparent->elementRect();
+}
+
+} // namespace WebCore
diff --git a/WebCore/accessibility/AccessibilityMenuListOption.h b/WebCore/accessibility/AccessibilityMenuListOption.h
new file mode 100644
index 0000000..7e27888
--- /dev/null
+++ b/WebCore/accessibility/AccessibilityMenuListOption.h
@@ -0,0 +1,69 @@
+/*
+ * 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 AccessibilityMenuListOption_h
+#define AccessibilityMenuListOption_h
+
+#include "AccessibilityObject.h"
+
+namespace WebCore {
+
+class AccessibilityMenuListPopup;
+class HTMLElement;
+
+class AccessibilityMenuListOption : public AccessibilityObject {
+public:
+ static PassRefPtr<AccessibilityMenuListOption> create() { return adoptRef(new AccessibilityMenuListOption); }
+
+ void setElement(HTMLElement*);
+ void setParent(AccessibilityMenuListPopup* popup) { m_popup = popup; }
+
+private:
+ AccessibilityMenuListOption();
+
+ virtual bool isMenuListOption() const { return true; }
+
+ virtual AccessibilityRole roleValue() const { return MenuListOptionRole; }
+ virtual bool canHaveChildren() const { return false; }
+ virtual IntSize size() const { return elementRect().size(); }
+
+ virtual Element* actionElement() const;
+ virtual AccessibilityObject* parentObject() const;
+ virtual bool isEnabled() const;
+ virtual bool isVisible() const;
+ virtual bool isOffScreen() const;
+ virtual bool isSelected() const;
+ virtual String nameForMSAA() const;
+ virtual void setSelected(bool);
+ virtual bool canSetSelectedAttribute() const;
+ virtual IntRect elementRect() const;
+
+ RefPtr<HTMLElement> m_element;
+ AccessibilityMenuListPopup* m_popup;
+};
+
+} // namespace WebCore
+
+#endif // AccessibilityMenuListOption_h
diff --git a/WebCore/accessibility/AccessibilityMenuListPopup.cpp b/WebCore/accessibility/AccessibilityMenuListPopup.cpp
new file mode 100644
index 0000000..48c2fab
--- /dev/null
+++ b/WebCore/accessibility/AccessibilityMenuListPopup.cpp
@@ -0,0 +1,126 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+#include "AccessibilityMenuListPopup.h"
+
+#include "AXObjectCache.h"
+#include "AccessibilityMenuList.h"
+#include "AccessibilityMenuListOption.h"
+#include "HTMLNames.h"
+#include "HTMLSelectElement.h"
+#include "RenderObject.h"
+
+namespace WebCore {
+
+using namespace HTMLNames;
+
+AccessibilityMenuListPopup::AccessibilityMenuListPopup()
+ : m_menuList(0)
+{
+}
+
+bool AccessibilityMenuListPopup::isVisible() const
+{
+ return false;
+}
+
+bool AccessibilityMenuListPopup::isOffScreen() const
+{
+ return m_menuList->isCollapsed();
+}
+
+AccessibilityObject* AccessibilityMenuListPopup::parentObject() const
+{
+ return m_menuList;
+}
+
+bool AccessibilityMenuListPopup::isEnabled() const
+{
+ return m_menuList->isEnabled();
+}
+
+AccessibilityMenuListOption* AccessibilityMenuListPopup::menuListOptionAccessibilityObject(HTMLElement* element) const
+{
+ if (!element || !element->hasTagName(optionTag))
+ return 0;
+
+ AccessibilityObject* object = m_menuList->renderer()->document()->axObjectCache()->getOrCreate(MenuListOptionRole);
+ ASSERT(object->isMenuListOption());
+
+ AccessibilityMenuListOption* option = static_cast<AccessibilityMenuListOption*>(object);
+ option->setElement(element);
+
+ return option;
+}
+
+bool AccessibilityMenuListPopup::press() const
+{
+ m_menuList->press();
+ return true;
+}
+
+void AccessibilityMenuListPopup::addChildren()
+{
+ Node* selectNode = m_menuList->renderer()->node();
+ if (!selectNode)
+ return;
+
+ m_haveChildren = true;
+
+ ASSERT(selectNode->hasTagName(selectTag));
+
+ const Vector<Element*>& listItems = static_cast<HTMLSelectElement*>(selectNode)->listItems();
+ unsigned length = listItems.size();
+ for (unsigned i = 0; i < length; i++) {
+ // The cast to HTMLElement below is safe because the only other possible listItem type
+ // would be a WMLElement, but WML builds don't use accessbility features at all.
+ AccessibilityMenuListOption* option = menuListOptionAccessibilityObject(static_cast<HTMLElement*>(listItems[i]));
+ if (option) {
+ option->setParent(this);
+ m_children.append(option);
+ }
+ }
+}
+
+void AccessibilityMenuListPopup::childrenChanged()
+{
+ for (size_t i = m_children.size(); i > 0 ; --i) {
+ AccessibilityObject* child = m_children[i - 1].get();
+ if (child->actionElement() && !child->actionElement()->attached()) {
+ m_menuList->renderer()->document()->axObjectCache()->remove(child->axObjectID());
+ m_children.remove(i - 1);
+ }
+ }
+}
+
+void AccessibilityMenuListPopup::setMenuList(AccessibilityMenuList* menuList)
+{
+ ASSERT_ARG(menuList, menuList);
+ ASSERT(!m_menuList);
+ m_menuList = menuList;
+}
+
+} // namespace WebCore
diff --git a/WebCore/accessibility/AccessibilityMenuListPopup.h b/WebCore/accessibility/AccessibilityMenuListPopup.h
new file mode 100644
index 0000000..88fbf7c
--- /dev/null
+++ b/WebCore/accessibility/AccessibilityMenuListPopup.h
@@ -0,0 +1,68 @@
+/*
+ * 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 AccessibilityMenuListPopup_h
+#define AccessibilityMenuListPopup_h
+
+#include "AccessibilityObject.h"
+
+namespace WebCore {
+
+class AccessibilityMenuList;
+class AccessibilityMenuListOption;
+class HTMLElement;
+
+class AccessibilityMenuListPopup : public AccessibilityObject {
+public:
+ static PassRefPtr<AccessibilityMenuListPopup> create() { return adoptRef(new AccessibilityMenuListPopup); }
+
+ void setMenuList(AccessibilityMenuList*);
+
+ virtual bool isEnabled() const;
+ virtual bool isOffScreen() const;
+
+private:
+ AccessibilityMenuListPopup();
+
+ virtual bool isMenuListPopup() const { return true; }
+
+ virtual IntRect elementRect() const { return IntRect(); }
+ virtual IntSize size() const { return IntSize(); }
+ virtual AccessibilityRole roleValue() const { return MenuListPopupRole; }
+
+ virtual bool isVisible() const;
+ virtual AccessibilityObject* parentObject() const;
+ virtual bool press() const;
+ virtual void addChildren();
+ virtual void childrenChanged();
+
+ AccessibilityMenuListOption* menuListOptionAccessibilityObject(HTMLElement*) const;
+
+ AccessibilityMenuList* m_menuList;
+};
+
+} // namespace WebCore
+
+#endif // AccessibilityMenuListPopup_h
diff --git a/WebCore/accessibility/AccessibilityObject.cpp b/WebCore/accessibility/AccessibilityObject.cpp
index 585e4cb..7c616ea 100644
--- a/WebCore/accessibility/AccessibilityObject.cpp
+++ b/WebCore/accessibility/AccessibilityObject.cpp
@@ -809,6 +809,8 @@ const String& AccessibilityObject::actionVerb() const
DEFINE_STATIC_LOCAL(const String, checkedCheckBoxAction, (AXCheckedCheckBoxActionVerb()));
DEFINE_STATIC_LOCAL(const String, uncheckedCheckBoxAction, (AXUncheckedCheckBoxActionVerb()));
DEFINE_STATIC_LOCAL(const String, linkAction, (AXLinkActionVerb()));
+ DEFINE_STATIC_LOCAL(const String, menuListAction, (AXMenuListActionVerb()));
+ DEFINE_STATIC_LOCAL(const String, menuListPopupAction, (AXMenuListPopupActionVerb()));
DEFINE_STATIC_LOCAL(const String, noAction, ());
switch (roleValue()) {
@@ -824,6 +826,10 @@ const String& AccessibilityObject::actionVerb() const
case LinkRole:
case WebCoreLinkRole:
return linkAction;
+ case PopUpButtonRole:
+ return menuListAction;
+ case MenuListPopupRole:
+ return menuListPopupAction;
default:
return noAction;
}
@@ -912,6 +918,7 @@ static ARIARoleMap* createARIARoleMap()
{ "toolbar", ToolbarRole },
{ "tooltip", UserInterfaceTooltipRole },
{ "tree", TreeRole },
+ { "treegrid", TreeGridRole },
{ "treeitem", TreeItemRole }
};
ARIARoleMap* roleMap = new ARIARoleMap;
@@ -928,5 +935,25 @@ AccessibilityRole AccessibilityObject::ariaRoleToWebCoreRole(const String& value
static const ARIARoleMap* roleMap = createARIARoleMap();
return roleMap->get(value);
}
+
+bool AccessibilityObject::isInsideARIALiveRegion() const
+{
+ if (supportsARIALiveRegion())
+ return true;
+
+ for (AccessibilityObject* axParent = parentObject(); axParent; axParent = axParent->parentObject()) {
+ if (axParent->supportsARIALiveRegion())
+ return true;
+ }
+
+ return false;
+}
+
+bool AccessibilityObject::supportsARIALiveRegion() const
+{
+ const AtomicString& liveRegion = ariaLiveRegionStatus();
+ return equalIgnoringCase(liveRegion, "polite") || equalIgnoringCase(liveRegion, "assertive");
+}
+
} // namespace WebCore
diff --git a/WebCore/accessibility/AccessibilityObject.h b/WebCore/accessibility/AccessibilityObject.h
index 8e46311..e4b1d99 100644
--- a/WebCore/accessibility/AccessibilityObject.h
+++ b/WebCore/accessibility/AccessibilityObject.h
@@ -40,7 +40,7 @@
#if PLATFORM(MAC)
#include <wtf/RetainPtr.h>
-#elif PLATFORM(WIN) && !PLATFORM(WINCE)
+#elif PLATFORM(WIN) && !OS(WINCE)
#include "AccessibilityObjectWrapperWin.h"
#include "COMPtr.h"
#elif PLATFORM(CHROMIUM)
@@ -165,9 +165,14 @@ enum AccessibilityRole {
TabListRole,
TabPanelRole,
TreeRole,
+ TreeGridRole,
TreeItemRole,
DirectoryRole,
-
+ EditableTextRole,
+ ListItemRole,
+ MenuListPopupRole,
+ MenuListOptionRole,
+
// ARIA Grouping roles
LandmarkApplicationRole,
LandmarkBannerRole,
@@ -279,6 +284,11 @@ public:
virtual bool isTableCell() const { return false; }
virtual bool isFieldset() const { return false; }
virtual bool isGroup() const { return false; }
+ virtual bool isARIATreeGridRow() const { return false; }
+ virtual bool isImageMapLink() const { return false; }
+ virtual bool isMenuList() const { return false; }
+ virtual bool isMenuListPopup() const { return false; }
+ virtual bool isMenuListOption() const { return false; }
bool isTabList() const { return roleValue() == TabListRole; }
bool isTabItem() const { return roleValue() == TabRole; }
bool isRadioGroup() const { return roleValue() == RadioGroupRole; }
@@ -295,7 +305,7 @@ public:
virtual bool isHovered() const { return false; }
virtual bool isIndeterminate() const { return false; }
virtual bool isLoaded() const { return false; }
- virtual bool isMultiSelect() const { return false; }
+ virtual bool isMultiSelectable() const { return false; }
virtual bool isOffScreen() const { return false; }
virtual bool isPressed() const { return false; }
virtual bool isReadOnly() const { return false; }
@@ -303,6 +313,8 @@ public:
virtual bool isRequired() const { return false; }
virtual bool isLinked() const { return false; }
virtual bool isExpanded() const { return false; }
+ virtual bool isVisible() const { return true; }
+ virtual bool isCollapsed() const { return false; }
virtual void setIsExpanded(bool) { }
virtual bool canSetFocusAttribute() const { return false; }
@@ -326,6 +338,7 @@ public:
virtual AccessibilityObject* selectedRadioButton() { return 0; }
virtual AccessibilityObject* selectedTabItem() { return 0; }
virtual int layoutCount() const { return 0; }
+ virtual double estimatedLoadingProgress() const { return 0; }
static bool isARIAControl(AccessibilityRole);
static bool isARIAInput(AccessibilityRole);
virtual bool supportsARIAOwns() const { return false; }
@@ -420,6 +433,7 @@ public:
virtual void decrement() { }
virtual void childrenChanged() { }
+ virtual void contentChanged() { }
virtual const AccessibilityChildrenVector& children() { return m_children; }
virtual void addChildren() { }
virtual bool canHaveChildren() const { return true; }
@@ -487,7 +501,8 @@ public:
virtual String stringRoleForMSAA() const { return String(); }
virtual String nameForMSAA() const { return String(); }
virtual String descriptionForMSAA() const { return String(); }
-
+ virtual AccessibilityRole roleValueForMSAA() const { return roleValue(); }
+
// Used by an ARIA tree to get all its rows.
void ariaTreeRows(AccessibilityChildrenVector&);
// Used by an ARIA tree item to get all of its direct rows that it can disclose.
@@ -495,6 +510,14 @@ public:
// Used by an ARIA tree item to get only its content, and not its child tree items and groups.
void ariaTreeItemContent(AccessibilityChildrenVector&);
+ // ARIA live-region features.
+ bool supportsARIALiveRegion() const;
+ bool isInsideARIALiveRegion() const;
+ virtual const AtomicString& ariaLiveRegionStatus() const { return nullAtom; }
+ virtual const AtomicString& ariaLiveRegionRelevant() const { return nullAtom; }
+ virtual bool ariaLiveRegionAtomic() const { return false; }
+ virtual bool ariaLiveRegionBusy() const { return false; }
+
#if HAVE(ACCESSIBILITY)
#if PLATFORM(GTK)
AccessibilityObjectWrapper* wrapper() const;
@@ -538,7 +561,7 @@ protected:
#if PLATFORM(MAC)
RetainPtr<AccessibilityObjectWrapper> m_wrapper;
-#elif PLATFORM(WIN) && !PLATFORM(WINCE)
+#elif PLATFORM(WIN) && !OS(WINCE)
COMPtr<AccessibilityObjectWrapper> m_wrapper;
#elif PLATFORM(GTK)
AtkObject* m_wrapper;
diff --git a/WebCore/accessibility/AccessibilityRenderObject.cpp b/WebCore/accessibility/AccessibilityRenderObject.cpp
index c57dd92..d738ca8 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -53,6 +53,7 @@
#include "HitTestResult.h"
#include "LocalizedStrings.h"
#include "NodeList.h"
+#include "ProgressTracker.h"
#include "RenderButton.h"
#include "RenderFieldset.h"
#include "RenderFileUploadControl.h"
@@ -64,6 +65,7 @@
#include "RenderMenuList.h"
#include "RenderText.h"
#include "RenderTextControl.h"
+#include "RenderTextFragment.h"
#include "RenderTheme.h"
#include "RenderView.h"
#include "RenderWidget.h"
@@ -85,6 +87,7 @@ AccessibilityRenderObject::AccessibilityRenderObject(RenderObject* renderer)
, m_renderer(renderer)
, m_ariaRole(UnknownRole)
, m_childrenDirty(false)
+ , m_roleForMSAA(UnknownRole)
{
updateAccessibilityRole();
#ifndef NDEBUG
@@ -362,11 +365,21 @@ bool AccessibilityRenderObject::isChecked() const
if (!m_renderer->node() || !m_renderer->node()->isElementNode())
return false;
+ // First test for native checkedness semantics
InputElement* inputElement = toInputElement(static_cast<Element*>(m_renderer->node()));
- if (!inputElement)
+ if (inputElement)
+ return inputElement->isChecked();
+
+ // Else, if this is an ARIA checkbox or radio, respect the aria-checked attribute
+ AccessibilityRole ariaRole = ariaRoleAttribute();
+ if (ariaRole == RadioButtonRole || ariaRole == CheckBoxRole) {
+ if (equalIgnoringCase(getAttribute(aria_checkedAttr), "true"))
+ return true;
return false;
+ }
- return inputElement->isChecked();
+ // Otherwise it's not checked
+ return false;
}
bool AccessibilityRenderObject::isHovered() const
@@ -375,9 +388,16 @@ bool AccessibilityRenderObject::isHovered() const
return m_renderer->node() && m_renderer->node()->hovered();
}
-bool AccessibilityRenderObject::isMultiSelect() const
+bool AccessibilityRenderObject::isMultiSelectable() const
{
ASSERT(m_renderer);
+
+ const AtomicString& ariaMultiSelectable = getAttribute(aria_multiselectableAttr);
+ if (equalIgnoringCase(ariaMultiSelectable, "true"))
+ return true;
+ if (equalIgnoringCase(ariaMultiSelectable, "false"))
+ return false;
+
if (!m_renderer->isListBox())
return false;
return m_renderer->node() && static_cast<HTMLSelectElement*>(m_renderer->node())->multiple();
@@ -597,6 +617,10 @@ Element* AccessibilityRenderObject::actionElement() const
if (m_renderer->isMenuList())
return static_cast<Element*>(m_renderer->node());
+ AccessibilityRole role = roleValue();
+ if (role == ButtonRole || role == PopUpButtonRole)
+ return static_cast<Element*>(m_renderer->node());
+
Element* elt = anchorElement();
if (!elt)
elt = mouseButtonListener();
@@ -783,6 +807,14 @@ String AccessibilityRenderObject::textUnderElement() const
}
}
+ // Sometimes text fragments don't have Node's associated with them (like when
+ // CSS content is used to insert text).
+ if (m_renderer->isText()) {
+ RenderText* renderTextObject = toRenderText(m_renderer);
+ if (renderTextObject->isTextFragment())
+ return String(static_cast<RenderTextFragment*>(m_renderer)->contentString());
+ }
+
// return the null string for anonymous text because it is non-trivial to get
// the actual text and, so far, that is not needed
return String();
@@ -1131,7 +1163,10 @@ IntRect AccessibilityRenderObject::boundingBoxRect() const
obj = obj->node()->renderer();
Vector<FloatQuad> quads;
- obj->absoluteQuads(quads);
+ if (obj->isText())
+ obj->absoluteQuads(quads);
+ else
+ obj->absoluteFocusRingQuads(quads);
const size_t n = quads.size();
if (!n)
return IntRect();
@@ -1399,6 +1434,28 @@ bool AccessibilityRenderObject::isDescendantOfBarrenParent() const
return false;
}
+bool AccessibilityRenderObject::isAllowedChildOfTree() const
+{
+ // Determine if this is in a tree. If so, we apply special behavior to make it work like an AXOutline.
+ AccessibilityObject* axObj = parentObject();
+ bool isInTree = false;
+ while (axObj) {
+ if (axObj->isTree()) {
+ isInTree = true;
+ break;
+ }
+ axObj = axObj->parentObject();
+ }
+
+ // If the object is in a tree, only tree items should be exposed (and the children of tree items).
+ if (isInTree) {
+ AccessibilityRole role = roleValue();
+ if (role != TreeItemRole && role != StaticTextRole)
+ return false;
+ }
+ return true;
+}
+
bool AccessibilityRenderObject::accessibilityIsIgnored() const
{
// Is the platform interested in this object?
@@ -1426,6 +1483,10 @@ bool AccessibilityRenderObject::accessibilityIsIgnored() const
if (roleValue() == IgnoredRole)
return true;
+ // An ARIA tree can only have tree items and static text as children.
+ if (!isAllowedChildOfTree())
+ return true;
+
// ignore popup menu items because AppKit does
for (RenderObject* parent = m_renderer->parent(); parent; parent = parent->parent()) {
if (parent->isMenuList())
@@ -1468,11 +1529,24 @@ bool AccessibilityRenderObject::accessibilityIsIgnored() const
if (isControl())
return false;
+ if (ariaRole != UnknownRole)
+ return false;
+
// don't ignore labels, because they serve as TitleUIElements
Node* node = m_renderer->node();
if (node && node->hasTagName(labelTag))
return false;
+ // Anything that is content editable should not be ignored.
+ // However, one cannot just call node->isContentEditable() since that will ask if its parents
+ // are also editable. Only the top level content editable region should be exposed.
+ if (node && node->isElementNode()) {
+ Element* element = static_cast<Element*>(node);
+ const AtomicString& contentEditable = element->getAttribute(contenteditableAttr);
+ if (equalIgnoringCase(contentEditable, "true"))
+ return false;
+ }
+
if (m_renderer->isBlockFlow() && m_renderer->childrenInline())
return !toRenderBlock(m_renderer)->firstLineBox() && !mouseButtonListener();
@@ -1511,9 +1585,6 @@ bool AccessibilityRenderObject::accessibilityIsIgnored() const
return false;
}
- if (ariaRole != UnknownRole)
- return false;
-
// make a platform-specific decision
if (isAttachment())
return accessibilityIgnoreAttachment();
@@ -1526,6 +1597,21 @@ bool AccessibilityRenderObject::isLoaded() const
return !m_renderer->document()->tokenizer();
}
+double AccessibilityRenderObject::estimatedLoadingProgress() const
+{
+ if (!m_renderer)
+ return 0;
+
+ if (isLoaded())
+ return 1.0;
+
+ Page* page = m_renderer->document()->page();
+ if (!page)
+ return 0;
+
+ return page->progress()->estimatedProgress();
+}
+
int AccessibilityRenderObject::layoutCount() const
{
if (!m_renderer->isRenderView())
@@ -1717,23 +1803,28 @@ void AccessibilityRenderObject::setElementAttributeValue(const QualifiedName& at
element->setAttribute(attributeName, (value) ? "true" : "false");
}
-bool AccessibilityRenderObject::elementAttributeValue(const QualifiedName& attributeName)
+bool AccessibilityRenderObject::elementAttributeValue(const QualifiedName& attributeName) const
{
if (!m_renderer)
return false;
- return equalIgnoringCase(getAttribute(attributeName).string(), "true");
+ return equalIgnoringCase(getAttribute(attributeName), "true");
}
void AccessibilityRenderObject::setIsExpanded(bool isExpanded)
{
- // Combo boxes and tree items can be expanded (in different ways on different platforms).
+ // Combo boxes, tree items and rows can be expanded (in different ways on different platforms).
// That action translates into setting the aria-expanded attribute to true.
AccessibilityRole role = roleValue();
- if (role != ComboBoxRole && role != TreeItemRole)
- return;
-
- setElementAttributeValue(aria_expandedAttr, isExpanded);
+ switch (role) {
+ case ComboBoxRole:
+ case TreeItemRole:
+ case RowRole:
+ setElementAttributeValue(aria_expandedAttr, isExpanded);
+ break;
+ default:
+ break;
+ }
}
bool AccessibilityRenderObject::isRequired() const
@@ -1858,13 +1949,14 @@ void AccessibilityRenderObject::setSelected(bool enabled)
void AccessibilityRenderObject::setSelectedRows(AccessibilityChildrenVector& selectedRows)
{
- // Setting selected rows only works on trees for now.
- if (roleValue() != TreeRole)
+ // Setting selected only makes sense in trees and tables (and tree-tables).
+ AccessibilityRole role = roleValue();
+ if (role != TreeRole && role != TreeGridRole && role != TableRole)
return;
- bool isMultiselectable = elementAttributeValue(aria_multiselectableAttr);
+ bool isMulti = isMultiSelectable();
unsigned count = selectedRows.size();
- if (count > 1 && !isMultiselectable)
+ if (count > 1 && !isMulti)
count = 1;
for (unsigned k = 0; k < count; ++k)
@@ -1934,6 +2026,8 @@ RenderView* AccessibilityRenderObject::topRenderer() const
Document* AccessibilityRenderObject::document() const
{
+ if (!m_renderer)
+ return 0;
return m_renderer->document();
}
@@ -1957,24 +2051,14 @@ AXObjectCache* AccessibilityRenderObject::axObjectCache() const
AccessibilityObject* AccessibilityRenderObject::accessibilityParentForImageMap(HTMLMapElement* map) const
{
// find an image that is using this map
- if (!m_renderer || !map)
+ if (!map)
return 0;
- String mapName = map->getName().string().lower();
- RefPtr<HTMLCollection> coll = m_renderer->document()->images();
- for (Node* curr = coll->firstItem(); curr; curr = coll->nextItem()) {
- RenderObject* obj = curr->renderer();
- if (!obj || !curr->hasTagName(imgTag))
- continue;
-
- // The HTMLImageElement's useMap() value includes the '#' symbol at the beginning,
- // which has to be stripped off
- String useMapName = static_cast<HTMLImageElement*>(curr)->getAttribute(usemapAttr).string().substring(1).lower();
- if (useMapName == mapName)
- return axObjectCache()->getOrCreate(obj);
- }
+ HTMLImageElement* imageElement = map->imageElement();
+ if (!imageElement)
+ return 0;
- return 0;
+ return axObjectCache()->getOrCreate(imageElement->renderer());
}
void AccessibilityRenderObject::getDocumentLinks(AccessibilityChildrenVector& result)
@@ -2538,6 +2622,10 @@ AccessibilityRole AccessibilityRenderObject::determineAriaRoleAttribute() const
return UnknownRole;
AccessibilityRole role = ariaRoleToWebCoreRole(ariaRole);
+
+ if (role == ButtonRole && elementAttributeValue(aria_haspopupAttr))
+ role = PopUpButtonRole;
+
if (role)
return role;
// selects and listboxes both have options as child roles, but they map to different roles within WebCore
@@ -2722,10 +2810,9 @@ bool AccessibilityRenderObject::canSetValueAttribute() const
if (equalIgnoringCase(getAttribute(aria_readonlyAttr).string(), "true"))
return false;
- if (isWebArea() || isTextControl())
- return !isReadOnly();
-
- return isProgressIndicator() || isSlider();
+ // Any node could be contenteditable, so isReadOnly should be relied upon
+ // for this information for all elements.
+ return isProgressIndicator() || isSlider() || !isReadOnly();
}
bool AccessibilityRenderObject::canSetTextRangeAttributes() const
@@ -2733,22 +2820,50 @@ bool AccessibilityRenderObject::canSetTextRangeAttributes() const
return isTextControl();
}
+void AccessibilityRenderObject::contentChanged()
+{
+ // If this element supports ARIA live regions, then notify the AT of changes.
+ for (RenderObject* renderParent = m_renderer->parent(); renderParent; renderParent = renderParent->parent()) {
+ AccessibilityObject* parent = m_renderer->document()->axObjectCache()->get(renderParent);
+ if (!parent)
+ continue;
+
+ // If we find a parent that has ARIA live region on, send the notification and stop processing.
+ // The spec does not talk about nested live regions.
+ if (parent->supportsARIALiveRegion()) {
+ axObjectCache()->postNotification(renderParent, AXObjectCache::AXLiveRegionChanged, true);
+ break;
+ }
+ }
+}
+
void AccessibilityRenderObject::childrenChanged()
{
// this method is meant as a quick way of marking dirty
// a portion of the accessibility tree
- markChildrenDirty();
-
if (!m_renderer)
return;
// Go up the render parent chain, marking children as dirty.
// We can't rely on the accessibilityParent() because it may not exist and we must not create an AX object here either
- for (RenderObject* renderParent = m_renderer->parent(); renderParent; renderParent = renderParent->parent()) {
+ // At the same time, process ARIA live region changes.
+ for (RenderObject* renderParent = m_renderer; renderParent; renderParent = renderParent->parent()) {
AccessibilityObject* parent = m_renderer->document()->axObjectCache()->get(renderParent);
- if (parent && parent->isAccessibilityRenderObject())
- static_cast<AccessibilityRenderObject *>(parent)->markChildrenDirty();
+ if (!parent || !parent->isAccessibilityRenderObject())
+ continue;
+
+ AccessibilityRenderObject* axParent = static_cast<AccessibilityRenderObject*>(parent);
+ // 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.
+ if (!axParent->needsToUpdateChildren()) {
+ axParent->setNeedsToUpdateChildren();
+
+ // If this element supports ARIA live regions, then notify the AT of changes.
+ if (axParent->supportsARIALiveRegion())
+ axObjectCache()->postNotification(renderParent, AXObjectCache::AXLiveRegionChanged, true);
+ }
}
}
@@ -2833,21 +2948,69 @@ void AccessibilityRenderObject::addChildren()
}
}
}
+
+const AtomicString& AccessibilityRenderObject::ariaLiveRegionStatus() const
+{
+ DEFINE_STATIC_LOCAL(const AtomicString, liveRegionStatusAssertive, ("assertive"));
+ DEFINE_STATIC_LOCAL(const AtomicString, liveRegionStatusPolite, ("polite"));
+ DEFINE_STATIC_LOCAL(const AtomicString, liveRegionStatusOff, ("off"));
+
+ const AtomicString& liveRegionStatus = getAttribute(aria_liveAttr);
+ // These roles have implicit live region status.
+ if (liveRegionStatus.isEmpty()) {
+ switch (roleValue()) {
+ case ApplicationAlertDialogRole:
+ case ApplicationAlertRole:
+ return liveRegionStatusAssertive;
+ case ApplicationLogRole:
+ case ApplicationStatusRole:
+ return liveRegionStatusPolite;
+ case ApplicationTimerRole:
+ return liveRegionStatusOff;
+ default:
+ break;
+ }
+ }
+
+ return liveRegionStatus;
+}
+
+const AtomicString& AccessibilityRenderObject::ariaLiveRegionRelevant() const
+{
+ DEFINE_STATIC_LOCAL(const AtomicString, defaultLiveRegionRelevant, ("additions text"));
+ const AtomicString& relevant = getAttribute(aria_relevantAttr);
+
+ // Default aria-relevant = "additions text".
+ if (relevant.isEmpty())
+ return defaultLiveRegionRelevant;
+
+ return relevant;
+}
+
+bool AccessibilityRenderObject::ariaLiveRegionAtomic() const
+{
+ return elementAttributeValue(aria_atomicAttr);
+}
-void AccessibilityRenderObject::ariaTreeSelectedRows(AccessibilityChildrenVector& result)
+bool AccessibilityRenderObject::ariaLiveRegionBusy() const
+{
+ return elementAttributeValue(aria_busyAttr);
+}
+
+void AccessibilityRenderObject::ariaSelectedRows(AccessibilityChildrenVector& result)
{
// Get all the rows.
AccessibilityChildrenVector allRows;
ariaTreeRows(allRows);
// Determine which rows are selected.
- bool isMultiselectable = elementAttributeValue(aria_multiselectableAttr);
+ bool isMulti = isMultiSelectable();
// Prefer active descendant over aria-selected.
AccessibilityObject* activeDesc = activeDescendant();
- if (activeDesc && activeDesc->isTreeItem()) {
+ if (activeDesc && (activeDesc->isTreeItem() || activeDesc->isTableRow())) {
result.append(activeDesc);
- if (!isMultiselectable)
+ if (!isMulti)
return;
}
@@ -2855,7 +3018,7 @@ void AccessibilityRenderObject::ariaTreeSelectedRows(AccessibilityChildrenVector
for (unsigned k = 0; k < count; ++k) {
if (allRows[k]->isSelected()) {
result.append(allRows[k]);
- if (!isMultiselectable)
+ if (!isMulti)
break;
}
}
@@ -2869,7 +3032,7 @@ void AccessibilityRenderObject::ariaListboxSelectedChildren(AccessibilityChildre
if (!element || !element->isElementNode()) // do this check to ensure safety of static_cast above
return;
- bool isMultiselectable = elementAttributeValue(aria_multiselectableAttr);
+ bool isMulti = isMultiSelectable();
while (child) {
// every child should have aria-role option, and if so, check for selected attribute/state
@@ -2883,7 +3046,7 @@ void AccessibilityRenderObject::ariaListboxSelectedChildren(AccessibilityChildre
String selectedAttrString = childElement->getAttribute(aria_selectedAttr).string();
if (equalIgnoringCase(selectedAttrString, "true")) {
result.append(child);
- if (isMultiselectable)
+ if (isMulti)
return;
}
}
@@ -2900,8 +3063,8 @@ void AccessibilityRenderObject::selectedChildren(AccessibilityChildrenVector& re
AccessibilityRole role = roleValue();
if (role == ListBoxRole) // native list boxes would be AccessibilityListBoxes, so only check for aria list boxes
ariaListboxSelectedChildren(result);
- else if (role == TreeRole)
- ariaTreeSelectedRows(result);
+ else if (role == TreeRole || role == TreeGridRole || role == TableRole)
+ ariaSelectedRows(result);
}
void AccessibilityRenderObject::ariaListboxVisibleChildren(AccessibilityChildrenVector& result)
@@ -3074,4 +3237,31 @@ String AccessibilityRenderObject::descriptionForMSAA() const
return String();
}
+static AccessibilityRole msaaRoleForRenderer(const RenderObject* renderer)
+{
+ if (!renderer)
+ return UnknownRole;
+
+ if (renderer->isText())
+ return EditableTextRole;
+
+ if (renderer->isListItem())
+ return ListItemRole;
+
+ return UnknownRole;
+}
+
+AccessibilityRole AccessibilityRenderObject::roleValueForMSAA() const
+{
+ if (m_roleForMSAA != UnknownRole)
+ return m_roleForMSAA;
+
+ m_roleForMSAA = msaaRoleForRenderer(m_renderer);
+
+ if (m_roleForMSAA == UnknownRole)
+ m_roleForMSAA = roleValue();
+
+ return m_roleForMSAA;
+}
+
} // namespace WebCore
diff --git a/WebCore/accessibility/AccessibilityRenderObject.h b/WebCore/accessibility/AccessibilityRenderObject.h
index d537881..6735076 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.h
+++ b/WebCore/accessibility/AccessibilityRenderObject.h
@@ -96,7 +96,7 @@ public:
virtual bool isHovered() const;
virtual bool isIndeterminate() const;
virtual bool isLoaded() const;
- virtual bool isMultiSelect() const;
+ virtual bool isMultiSelectable() const;
virtual bool isOffScreen() const;
virtual bool isPressed() const;
virtual bool isReadOnly() const;
@@ -125,6 +125,7 @@ public:
virtual AccessibilityObject* selectedRadioButton();
virtual AccessibilityObject* selectedTabItem();
virtual int layoutCount() const;
+ virtual double estimatedLoadingProgress() const;
virtual AccessibilityObject* doAccessibilityHitTest(const IntPoint&) const;
virtual AccessibilityObject* focusedUIElement() const;
@@ -207,6 +208,7 @@ public:
virtual void detach();
virtual void childrenChanged();
+ virtual void contentChanged();
virtual void addChildren();
virtual bool canHaveChildren() const;
virtual void selectedChildren(AccessibilityChildrenVector&);
@@ -248,6 +250,7 @@ public:
virtual String stringRoleForMSAA() const;
virtual String nameForMSAA() const;
virtual String descriptionForMSAA() const;
+ virtual AccessibilityRole roleValueForMSAA() const;
protected:
RenderObject* m_renderer;
@@ -264,6 +267,7 @@ private:
void ariaListboxVisibleChildren(AccessibilityChildrenVector&);
bool ariaIsHidden() const;
bool isDescendantOfBarrenParent() const;
+ bool isAllowedChildOfTree() const;
bool hasTextAlternative() const;
String positionalDescriptionForMSAA() const;
@@ -279,15 +283,23 @@ private:
AccessibilityObject* accessibilityImageMapHitTest(HTMLAreaElement*, const IntPoint&) const;
AccessibilityObject* accessibilityParentForImageMap(HTMLMapElement* map) const;
- void ariaTreeSelectedRows(AccessibilityChildrenVector&);
+ void ariaSelectedRows(AccessibilityChildrenVector&);
- bool elementAttributeValue(const QualifiedName&);
+ bool elementAttributeValue(const QualifiedName&) const;
void setElementAttributeValue(const QualifiedName&, bool);
String accessibilityDescriptionForElements(Vector<Element*> &elements) const;
void elementsFromAttribute(Vector<Element*>& elements, const QualifiedName& name) const;
- void markChildrenDirty() const { m_childrenDirty = true; }
+ virtual const AtomicString& ariaLiveRegionStatus() const;
+ virtual const AtomicString& ariaLiveRegionRelevant() const;
+ virtual bool ariaLiveRegionAtomic() const;
+ virtual bool ariaLiveRegionBusy() const;
+
+ void setNeedsToUpdateChildren() const { m_childrenDirty = true; }
+ bool needsToUpdateChildren() const { return m_childrenDirty; }
+
+ mutable AccessibilityRole m_roleForMSAA;
};
} // namespace WebCore
diff --git a/WebCore/accessibility/AccessibilityScrollbar.cpp b/WebCore/accessibility/AccessibilityScrollbar.cpp
new file mode 100644
index 0000000..717d0da
--- /dev/null
+++ b/WebCore/accessibility/AccessibilityScrollbar.cpp
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "AccessibilityScrollbar.h"
+
+#include "Scrollbar.h"
+
+namespace WebCore {
+
+AccessibilityScrollbar::AccessibilityScrollbar()
+ : m_scrollbar(0)
+{
+}
+
+PassRefPtr<AccessibilityScrollbar> AccessibilityScrollbar::create()
+{
+ return adoptRef(new AccessibilityScrollbar);
+}
+
+float AccessibilityScrollbar::valueForRange() const
+{
+ if (!m_scrollbar)
+ return 0;
+ return m_scrollbar->currentPos();
+}
+
+} // namespace WebCore
diff --git a/WebCore/accessibility/AccessibilityScrollbar.h b/WebCore/accessibility/AccessibilityScrollbar.h
new file mode 100644
index 0000000..d75e60c
--- /dev/null
+++ b/WebCore/accessibility/AccessibilityScrollbar.h
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ * 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 AccessibilityScrollbar_h
+#define AccessibilityScrollbar_h
+
+#include "AccessibilityObject.h"
+
+namespace WebCore {
+
+class Scrollbar;
+
+class AccessibilityScrollbar : public AccessibilityObject {
+public:
+ static PassRefPtr<AccessibilityScrollbar> create();
+
+ void setScrollbar(Scrollbar* scrollbar) { m_scrollbar = scrollbar; }
+
+ virtual AccessibilityRole roleValue() const { return ScrollBarRole; }
+
+ virtual float valueForRange() const;
+
+private:
+ AccessibilityScrollbar();
+
+ virtual bool accessibilityIsIgnored() const { return false; }
+
+ // These should never be reached since the AccessibilityScrollbar is not part of
+ // the accessibility tree.
+ virtual IntSize size() const { ASSERT_NOT_REACHED(); return IntSize(); }
+ virtual IntRect elementRect() const { ASSERT_NOT_REACHED(); return IntRect(); }
+ virtual AccessibilityObject* parentObject() const { ASSERT_NOT_REACHED(); return 0; }
+
+ Scrollbar* m_scrollbar;
+};
+
+} // namespace WebCore
+
+#endif // AccessibilityScrollbar_h
diff --git a/WebCore/accessibility/AccessibilityTable.h b/WebCore/accessibility/AccessibilityTable.h
index b6aa3ca..42edf2a 100644
--- a/WebCore/accessibility/AccessibilityTable.h
+++ b/WebCore/accessibility/AccessibilityTable.h
@@ -63,6 +63,7 @@ public:
AccessibilityChildrenVector& columns();
AccessibilityChildrenVector& rows();
+ virtual bool supportsSelectedRows() { return false; }
unsigned columnCount();
unsigned rowCount();
diff --git a/WebCore/accessibility/chromium/AccessibilityObjectChromium.cpp b/WebCore/accessibility/chromium/AccessibilityObjectChromium.cpp
index 7ab7d79..6749f77 100644
--- a/WebCore/accessibility/chromium/AccessibilityObjectChromium.cpp
+++ b/WebCore/accessibility/chromium/AccessibilityObjectChromium.cpp
@@ -36,6 +36,9 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformIncludesObject() const
{
+ if (isMenuListPopup() || isMenuListOption())
+ return IgnoreObject;
+
return DefaultBehavior;
}
diff --git a/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp b/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp
index 7fd59ac..f48770f 100644
--- a/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp
+++ b/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp
@@ -38,6 +38,9 @@ AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformI
if (!parent)
return DefaultBehavior;
+ if (isMenuListPopup() || isMenuListOption())
+ return IgnoreObject;
+
// When a list item is made up entirely of children (e.g. paragraphs)
// the list item gets ignored. We need it.
if (isGroup() && parent->isList())
@@ -47,6 +50,10 @@ AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformI
if (parent->isPasswordField() || parent->isTextControl())
return IgnoreObject;
+ // The object containing the text should implement AtkText itself.
+ if (roleValue() == StaticTextRole)
+ return IgnoreObject;
+
return DefaultBehavior;
}
diff --git a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
index 16ea948..87070cd 100644
--- a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
+++ b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
@@ -493,7 +493,7 @@ static void setAtkStateSetFromCoreObject(AccessibilityObject* coreObject, AtkSta
if (coreObject->isIndeterminate())
atk_state_set_add_state(stateSet, ATK_STATE_INDETERMINATE);
- if (coreObject->isMultiSelect())
+ if (coreObject->isMultiSelectable())
atk_state_set_add_state(stateSet, ATK_STATE_MULTISELECTABLE);
// TODO: ATK_STATE_OPAQUE
@@ -787,7 +787,7 @@ static gboolean webkit_accessible_selection_remove_selection(AtkSelection* selec
static gboolean webkit_accessible_selection_select_all_selection(AtkSelection* selection)
{
AccessibilityObject* coreSelection = core(selection);
- if (!coreSelection || !coreSelection->isMultiSelect())
+ if (!coreSelection || !coreSelection->isMultiSelectable())
return false;
AccessibilityRenderObject::AccessibilityChildrenVector children = coreSelection->children();
@@ -815,35 +815,6 @@ static void atk_selection_interface_init(AtkSelectionIface* iface)
// Text
-static gchar* webkit_accessible_text_get_text(AtkText* text, gint startOffset, gint endOffset)
-{
- AccessibilityObject* coreObject = core(text);
- String ret;
- unsigned start = startOffset;
- if (endOffset == -1)
- endOffset = coreObject->stringValue().length();
- int length = endOffset - startOffset;
-
- if (coreObject->isTextControl())
- ret = coreObject->doAXStringForRange(PlainTextRange(start, length));
- else
- ret = coreObject->textUnderElement().substring(start, length);
-
- return g_strdup(ret.utf8().data());
-}
-
-static GailTextUtil* getGailTextUtilForAtk(AtkText* textObject)
-{
- gpointer data = g_object_get_data(G_OBJECT(textObject), "webkit-accessible-gail-text-util");
- if (data)
- return static_cast<GailTextUtil*>(data);
-
- GailTextUtil* gailTextUtil = gail_text_util_new();
- gail_text_util_text_setup(gailTextUtil, webkit_accessible_text_get_text(textObject, 0, -1));
- g_object_set_data_full(G_OBJECT(textObject), "webkit-accessible-gail-text-util", gailTextUtil, g_object_unref);
- return gailTextUtil;
-}
-
static gchar* utf8Substr(const gchar* string, gint start, gint end)
{
ASSERT(string);
@@ -887,27 +858,11 @@ static gchar* convertUniCharToUTF8(const UChar* characters, gint length, int fro
return g_string_free(ret, FALSE);
}
-static PangoLayout* getPangoLayoutForAtk(AtkText* textObject)
+gchar* textForObject(AccessibilityRenderObject* accObject)
{
- AccessibilityObject* coreObject = core(textObject);
-
- HostWindow* hostWindow = coreObject->document()->view()->hostWindow();
- if (!hostWindow)
- return 0;
- PlatformPageClient webView = hostWindow->platformPageClient();
- if (!webView)
- return 0;
-
GString* str = g_string_new(0);
- AccessibilityRenderObject* accObject = static_cast<AccessibilityRenderObject*>(coreObject);
- if (!accObject)
- return 0;
- RenderText* renderText = toRenderText(accObject->renderer());
- if (!renderText)
- return 0;
-
- // Create a string with the layout as it appears on the screen
+ // For text controls, we can get the text line by line.
if (accObject->isTextControl()) {
unsigned textLength = accObject->textLength();
int lineNumber = 0;
@@ -922,19 +877,95 @@ static PangoLayout* getPangoLayoutForAtk(AtkText* textObject)
range = accObject->doAXRangeForLine(++lineNumber);
}
} else {
- InlineTextBox* box = renderText->firstTextBox();
- while (box) {
- gchar* text = convertUniCharToUTF8(renderText->characters(), renderText->textLength(), box->start(), box->end());
- g_string_append(str, text);
- // Newline chars in the source result in separate text boxes, so check
- // before adding a newline in the layout. See bug 25415 comment #78.
- if (!box->nextOnLineExists())
+ // For RenderBlocks, piece together the text from the RenderText objects they contain.
+ for (RenderObject* obj = accObject->renderer()->firstChild(); obj; obj = obj->nextSibling()) {
+ if (obj->isBR()) {
g_string_append(str, "\n");
- box = box->nextTextBox();
+ continue;
+ }
+
+ RenderText* renderText = toRenderText(obj);
+ // Be sure we have a RenderText object we can work with.
+ if (!renderText || !obj->isText()) {
+ // Handle RenderInlines (and any other similiar RenderObjects).
+ renderText = toRenderText(obj->firstChild());
+ if (!renderText)
+ continue;
+ }
+
+ InlineTextBox* box = renderText->firstTextBox();
+ while (box) {
+ gchar* text = convertUniCharToUTF8(renderText->characters(), renderText->textLength(), box->start(), box->end());
+ g_string_append(str, text);
+ // Newline chars in the source result in separate text boxes, so check
+ // before adding a newline in the layout. See bug 25415 comment #78.
+ // If the next sibling is a BR, we'll add the newline when we examine that child.
+ if (!box->nextOnLineExists() && (!obj->nextSibling() || !obj->nextSibling()->isBR()))
+ g_string_append(str, "\n");
+ box = box->nextTextBox();
+ }
}
}
+ return g_string_free(str, FALSE);
+}
+
+static gchar* webkit_accessible_text_get_text(AtkText* text, gint startOffset, gint endOffset)
+{
+ AccessibilityObject* coreObject = core(text);
+ String ret;
+ unsigned start = startOffset;
+ if (endOffset == -1) {
+ endOffset = coreObject->stringValue().length();
+ if (!endOffset)
+ endOffset = coreObject->textUnderElement().length();
+ }
+ int length = endOffset - startOffset;
+
+ if (coreObject->isTextControl())
+ ret = coreObject->doAXStringForRange(PlainTextRange(start, length));
+ else
+ ret = coreObject->textUnderElement().substring(start, length);
+
+ if (!ret.length()) {
+ // This can happen at least with anonymous RenderBlocks (e.g. body text amongst paragraphs)
+ ret = String(textForObject(static_cast<AccessibilityRenderObject*>(coreObject)));
+ if (!endOffset)
+ endOffset = ret.length();
+ ret = ret.substring(start, endOffset - startOffset);
+ }
+
+ return g_strdup(ret.utf8().data());
+}
- PangoLayout* layout = gtk_widget_create_pango_layout(static_cast<GtkWidget*>(webView), g_string_free(str, FALSE));
+static GailTextUtil* getGailTextUtilForAtk(AtkText* textObject)
+{
+ gpointer data = g_object_get_data(G_OBJECT(textObject), "webkit-accessible-gail-text-util");
+ if (data)
+ return static_cast<GailTextUtil*>(data);
+
+ GailTextUtil* gailTextUtil = gail_text_util_new();
+ gail_text_util_text_setup(gailTextUtil, webkit_accessible_text_get_text(textObject, 0, -1));
+ g_object_set_data_full(G_OBJECT(textObject), "webkit-accessible-gail-text-util", gailTextUtil, g_object_unref);
+ return gailTextUtil;
+}
+
+static PangoLayout* getPangoLayoutForAtk(AtkText* textObject)
+{
+ AccessibilityObject* coreObject = core(textObject);
+
+ HostWindow* hostWindow = coreObject->document()->view()->hostWindow();
+ if (!hostWindow)
+ return 0;
+ PlatformPageClient webView = hostWindow->platformPageClient();
+ if (!webView)
+ return 0;
+
+ AccessibilityRenderObject* accObject = static_cast<AccessibilityRenderObject*>(coreObject);
+ if (!accObject)
+ return 0;
+
+ // Create a string with the layout as it appears on the screen
+ PangoLayout* layout = gtk_widget_create_pango_layout(static_cast<GtkWidget*>(webView), textForObject(accObject));
g_object_set_data_full(G_OBJECT(textObject), "webkit-accessible-pango-layout", layout, g_object_unref);
return layout;
}
@@ -962,8 +993,18 @@ static gunichar webkit_accessible_text_get_character_at_offset(AtkText* text, gi
static gint webkit_accessible_text_get_caret_offset(AtkText* text)
{
+ // coreObject is the unignored object whose offset the caller is requesting.
+ // focusedObject is the object with the caret. It is likely ignored -- unless it's a link.
+ AccessibilityObject* coreObject = core(text);
+ RenderObject* focusedNode = coreObject->selection().end().node()->renderer();
+ AccessibilityObject* focusedObject = coreObject->document()->axObjectCache()->getOrCreate(focusedNode);
+
+ int offset;
+ // Don't ignore links if the offset is being requested for a link.
+ objectAndOffsetUnignored(focusedObject, offset, !coreObject->isLink());
+
// TODO: Verify this for RTL text.
- return core(text)->selection().end().offsetInContainerNode();
+ return offset;
}
static AtkAttributeSet* webkit_accessible_text_get_run_attributes(AtkText* text, gint offset, gint* start_offset, gint* end_offset)
@@ -1610,11 +1651,13 @@ static guint16 getInterfaceMaskFromObject(AccessibilityObject* coreObject)
if (role == StaticTextRole)
interfaceMask |= 1 << WAI_TEXT;
- else if (coreObject->isAccessibilityRenderObject() && coreObject->isTextControl()) {
- interfaceMask |= 1 << WAI_TEXT;
- if (!coreObject->isReadOnly())
- interfaceMask |= 1 << WAI_EDITABLE_TEXT;
- }
+ else if (coreObject->isAccessibilityRenderObject())
+ if (coreObject->isTextControl()) {
+ interfaceMask |= 1 << WAI_TEXT;
+ if (!coreObject->isReadOnly())
+ interfaceMask |= 1 << WAI_EDITABLE_TEXT;
+ } else if (static_cast<AccessibilityRenderObject*>(coreObject)->renderer()->childrenInline())
+ interfaceMask |= 1 << WAI_TEXT;
// Image
if (coreObject->isImage())
@@ -1713,4 +1756,31 @@ AtkObject* webkit_accessible_get_focused_element(WebKitAccessible* accessible)
return focusedObj->wrapper();
}
+AccessibilityObject* objectAndOffsetUnignored(AccessibilityObject* coreObject, int& offset, bool ignoreLinks)
+{
+ Node* endNode = static_cast<AccessibilityRenderObject*>(coreObject)->renderer()->node();
+ int endOffset = coreObject->selection().end().computeOffsetInContainerNode();
+ // Indication that something bogus has transpired.
+ offset = -1;
+
+ AccessibilityObject* realObject = coreObject;
+ if (realObject->accessibilityIsIgnored())
+ realObject = realObject->parentObjectUnignored();
+
+ if (ignoreLinks && realObject->isLink())
+ realObject = realObject->parentObjectUnignored();
+
+ Node* node = static_cast<AccessibilityRenderObject*>(realObject)->renderer()->node();
+ if (node) {
+ RefPtr<Range> range = rangeOfContents(node);
+ if (range->ownerDocument() == node->document()) {
+ ExceptionCode ec = 0;
+ range->setEndBefore(endNode, ec);
+ if (range->boundaryPointsValid())
+ offset = range->text().length() + endOffset;
+ }
+ }
+ return realObject;
+}
+
#endif // HAVE(ACCESSIBILITY)
diff --git a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.h b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.h
index 0b31b82..e8cec08 100644
--- a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.h
+++ b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.h
@@ -60,6 +60,8 @@ void webkit_accessible_detach (WebKitAccessible* accessible);
AtkObject* webkit_accessible_get_focused_element(WebKitAccessible* accessible);
+WebCore::AccessibilityObject* objectAndOffsetUnignored(WebCore::AccessibilityObject* coreObject, int& offset, bool ignoreLinks);
+
G_END_DECLS
#endif // AccessibilityObjectWrapperAtk_h
diff --git a/WebCore/accessibility/mac/AXObjectCacheMac.mm b/WebCore/accessibility/mac/AXObjectCacheMac.mm
index bf1b22c..6f886fe 100644
--- a/WebCore/accessibility/mac/AXObjectCacheMac.mm
+++ b/WebCore/accessibility/mac/AXObjectCacheMac.mm
@@ -35,6 +35,10 @@
#import <wtf/PassRefPtr.h>
+#ifndef NSAccessibilityLiveRegionChangedNotification
+#define NSAccessibilityLiveRegionChangedNotification @"AXLiveRegionChanged"
+#endif
+
// The simple Cocoa calls in this file don't throw exceptions.
namespace WebCore {
@@ -66,9 +70,6 @@ void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotific
else
macNotification = NSAccessibilityFocusedUIElementChangedNotification;
break;
- case AXCheckedStateChanged:
- macNotification = "AXCheckedStateChanged";
- break;
case AXFocusedUIElementChanged:
macNotification = NSAccessibilityFocusedUIElementChangedNotification;
break;
@@ -87,11 +88,19 @@ void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotific
case AXValueChanged:
macNotification = NSAccessibilityValueChangedNotification;
break;
+ case AXLiveRegionChanged:
+ macNotification = NSAccessibilityLiveRegionChangedNotification;
+ break;
+ // Does not exist on Mac.
+ case AXCheckedStateChanged:
default:
return;
}
NSAccessibilityPostNotification(obj->wrapper(), macNotification);
+
+ // Used by DRT to know when notifications are posted.
+ [obj->wrapper() accessibilityPostedNotification:macNotification];
}
void AXObjectCache::handleFocusedUIElementChanged(RenderObject*, RenderObject*)
diff --git a/WebCore/accessibility/mac/AccessibilityObjectMac.mm b/WebCore/accessibility/mac/AccessibilityObjectMac.mm
index 722b03e..1807a9b 100644
--- a/WebCore/accessibility/mac/AccessibilityObjectMac.mm
+++ b/WebCore/accessibility/mac/AccessibilityObjectMac.mm
@@ -43,24 +43,9 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformIncludesObject() const
{
- // Determine if this is in a tree. If so, we apply special behavior to make it work like an AXOutline.
- AccessibilityObject* axObj = parentObject();
- bool isInTree = false;
- while (axObj) {
- if (axObj->isTree()) {
- isInTree = true;
- break;
- }
- axObj = axObj->parentObjectUnignored();
- }
-
- // If the object is in a tree, only tree items should be exposed (and the children of tree items).
- if (isInTree) {
- AccessibilityRole role = roleValue();
- if (role != TreeItemRole && role != StaticTextRole)
- return IgnoreObject;
- }
-
+ if (isMenuListPopup() || isMenuListOption())
+ return IgnoreObject;
+
return DefaultBehavior;
}
diff --git a/WebCore/accessibility/mac/AccessibilityObjectWrapper.h b/WebCore/accessibility/mac/AccessibilityObjectWrapper.h
index 910305b..1f0a9e3 100644
--- a/WebCore/accessibility/mac/AccessibilityObjectWrapper.h
+++ b/WebCore/accessibility/mac/AccessibilityObjectWrapper.h
@@ -52,6 +52,9 @@ class VisiblePosition;
- (void)detach;
- (WebCore::AccessibilityObject*)accessibilityObject;
+// Used to inform an element when a notification is posted for it. Used by DRT.
+- (void)accessibilityPostedNotification:(NSString *)notification;
+
- (NSView*)attachmentView;
@end
diff --git a/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm b/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
index 6099b3d..b53b167 100644
--- a/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
+++ b/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
@@ -32,6 +32,7 @@
#if HAVE(ACCESSIBILITY)
#import "AXObjectCache.h"
+#import "AccessibilityARIAGridRow.h"
#import "AccessibilityListBox.h"
#import "AccessibilityList.h"
#import "AccessibilityRenderObject.h"
@@ -131,6 +132,26 @@ using namespace std;
#define NSAccessibilityDropEffectsAttribute @"AXDropEffects"
#endif
+#ifndef NSAccessibilityARIALiveAttribute
+#define NSAccessibilityARIALiveAttribute @"AXARIALive"
+#endif
+
+#ifndef NSAccessibilityARIAAtomicAttribute
+#define NSAccessibilityARIAAtomicAttribute @"AXARIAAtomic"
+#endif
+
+#ifndef NSAccessibilityARIARelevantAttribute
+#define NSAccessibilityARIARelevantAttribute @"AXARIARelevant"
+#endif
+
+#ifndef NSAccessibilityARIABusyAttribute
+#define NSAccessibilityARIABusyAttribute @"AXARIABusy"
+#endif
+
+#ifndef NSAccessibilityLoadingProgressAttribute
+#define NSAccessibilityLoadingProgressAttribute @"AXLoadingProgress"
+#endif
+
#ifdef BUILDING_ON_TIGER
typedef unsigned NSUInteger;
#define NSAccessibilityValueDescriptionAttribute @"AXValueDescription"
@@ -171,7 +192,7 @@ typedef unsigned NSUInteger;
- (void)detach
{
// Send unregisterUniqueIdForUIElement unconditionally because if it is
- // ever accidently not done (via other bugs in our AX implementation) you
+ // ever accidentally not done (via other bugs in our AX implementation) you
// end up with a crash like <rdar://problem/4273149>. It is safe and not
// expensive to send even if the object is not registered.
[self unregisterUniqueIdForUIElement];
@@ -417,7 +438,7 @@ static void AXAttributeStringSetHeadingLevel(NSMutableAttributedString* attrStri
static void AXAttributeStringSetElement(NSMutableAttributedString* attrString, NSString* attribute, AccessibilityObject* object, NSRange range)
{
if (object && object->isAccessibilityRenderObject()) {
- // make a serialiazable AX object
+ // make a serializable AX object
RenderObject* renderer = static_cast<AccessibilityRenderObject*>(object)->renderer();
if (!renderer)
@@ -599,6 +620,20 @@ static WebCoreTextMarkerRange* textMarkerRangeFromVisiblePositions(VisiblePositi
if (m_object->supportsARIADropping())
[additional addObject:NSAccessibilityDropEffectsAttribute];
+ if (m_object->isDataTable() && static_cast<AccessibilityTable*>(m_object)->supportsSelectedRows())
+ [additional addObject:NSAccessibilitySelectedRowsAttribute];
+
+ if (m_object->supportsARIALiveRegion()) {
+ [additional addObject:NSAccessibilityARIALiveAttribute];
+ [additional addObject:NSAccessibilityARIARelevantAttribute];
+ }
+
+ // If an object is a child of a live region, then add these
+ if (m_object->isInsideARIALiveRegion()) {
+ [additional addObject:NSAccessibilityARIAAtomicAttribute];
+ [additional addObject:NSAccessibilityARIABusyAttribute];
+ }
+
return additional;
}
@@ -686,6 +721,7 @@ static WebCoreTextMarkerRange* textMarkerRangeFromVisiblePositions(VisiblePositi
[tempArray addObject:@"AXLinkUIElements"];
[tempArray addObject:@"AXLoaded"];
[tempArray addObject:@"AXLayoutCount"];
+ [tempArray addObject:NSAccessibilityLoadingProgressAttribute];
[tempArray addObject:NSAccessibilityURLAttribute];
webAreaAttrs = [[NSArray alloc] initWithArray:tempArray];
[tempArray release];
@@ -863,7 +899,6 @@ static WebCoreTextMarkerRange* textMarkerRangeFromVisiblePositions(VisiblePositi
}
if (outlineRowAttrs == nil) {
tempArray = [[NSMutableArray alloc] initWithArray:tableRowAttrs];
- [tempArray addObject:NSAccessibilityIndexAttribute];
[tempArray addObject:NSAccessibilityDisclosingAttribute];
[tempArray addObject:NSAccessibilityDisclosedByRowAttribute];
[tempArray addObject:NSAccessibilityDisclosureLevelAttribute];
@@ -888,12 +923,17 @@ static WebCoreTextMarkerRange* textMarkerRangeFromVisiblePositions(VisiblePositi
else if (m_object->isDataTable())
objectAttributes = tableAttrs;
- else if (m_object->isTableRow())
- objectAttributes = tableRowAttrs;
else if (m_object->isTableColumn())
objectAttributes = tableColAttrs;
else if (m_object->isTableCell())
objectAttributes = tableCellAttrs;
+ else if (m_object->isTableRow()) {
+ // An ARIA table row can be collapsed and expanded, so it needs the extra attributes.
+ if (m_object->isARIATreeGridRow())
+ objectAttributes = outlineRowAttrs;
+ else
+ objectAttributes = tableRowAttrs;
+ }
else if (m_object->isTree())
objectAttributes = outlineAttrs;
@@ -1392,15 +1432,17 @@ static NSString* roleValueToNSString(AccessibilityRole value)
if (m_object->isWebArea()) {
- if ([attributeName isEqualToString: @"AXLinkUIElements"]) {
+ if ([attributeName isEqualToString:@"AXLinkUIElements"]) {
AccessibilityObject::AccessibilityChildrenVector links;
static_cast<AccessibilityRenderObject*>(m_object)->getDocumentLinks(links);
return convertToNSArray(links);
}
- if ([attributeName isEqualToString: @"AXLoaded"])
- return [NSNumber numberWithBool: m_object->isLoaded()];
- if ([attributeName isEqualToString: @"AXLayoutCount"])
- return [NSNumber numberWithInt: m_object->layoutCount()];
+ if ([attributeName isEqualToString:@"AXLoaded"])
+ return [NSNumber numberWithBool:m_object->isLoaded()];
+ if ([attributeName isEqualToString:@"AXLayoutCount"])
+ return [NSNumber numberWithInt:m_object->layoutCount()];
+ if ([attributeName isEqualToString:NSAccessibilityLoadingProgressAttribute])
+ return [NSNumber numberWithDouble:m_object->estimatedLoadingProgress()];
}
if (m_object->isTextControl()) {
@@ -1568,9 +1610,14 @@ static NSString* roleValueToNSString(AccessibilityRole value)
return convertToNSArray(static_cast<AccessibilityTable*>(m_object)->columns());
}
+ if ([attributeName isEqualToString:NSAccessibilitySelectedRowsAttribute]) {
+ AccessibilityObject::AccessibilityChildrenVector selectedChildrenCopy;
+ m_object->selectedChildren(selectedChildrenCopy);
+ return convertToNSArray(selectedChildrenCopy);
+ }
+
// HTML tables don't support these
if ([attributeName isEqualToString:NSAccessibilitySelectedColumnsAttribute] ||
- [attributeName isEqualToString:NSAccessibilitySelectedRowsAttribute] ||
[attributeName isEqualToString:NSAccessibilitySelectedCellsAttribute])
return nil;
@@ -1600,11 +1647,6 @@ static NSString* roleValueToNSString(AccessibilityRole value)
}
}
- if (m_object->isTableRow()) {
- if ([attributeName isEqualToString:NSAccessibilityIndexAttribute])
- return [NSNumber numberWithInt:static_cast<AccessibilityTableRow*>(m_object)->rowIndex()];
- }
-
if (m_object->isTableColumn()) {
if ([attributeName isEqualToString:NSAccessibilityIndexAttribute])
return [NSNumber numberWithInt:static_cast<AccessibilityTableColumn*>(m_object)->columnIndex()];
@@ -1652,8 +1694,8 @@ static NSString* roleValueToNSString(AccessibilityRole value)
return [NSArray array];
}
- if (m_object->isTreeItem()) {
- if ([attributeName isEqualToString:NSAccessibilityIndexAttribute]) {
+ if ([attributeName isEqualToString:NSAccessibilityIndexAttribute]) {
+ if (m_object->isTreeItem()) {
AccessibilityObject* parent = m_object->parentObject();
for (; parent && !parent->isTree(); parent = parent->parentObject())
{ }
@@ -1671,16 +1713,28 @@ static NSString* roleValueToNSString(AccessibilityRole value)
return nil;
}
-
- // The rows that are considered inside this row.
- if ([attributeName isEqualToString:NSAccessibilityDisclosedRowsAttribute]) {
+ if (m_object->isTableRow()) {
+ if ([attributeName isEqualToString:NSAccessibilityIndexAttribute])
+ return [NSNumber numberWithInt:static_cast<AccessibilityTableRow*>(m_object)->rowIndex()];
+ }
+ }
+
+ // The rows that are considered inside this row.
+ if ([attributeName isEqualToString:NSAccessibilityDisclosedRowsAttribute]) {
+ if (m_object->isTreeItem()) {
AccessibilityObject::AccessibilityChildrenVector rowsCopy;
m_object->ariaTreeItemDisclosedRows(rowsCopy);
return convertToNSArray(rowsCopy);
+ } else if (m_object->isARIATreeGridRow()) {
+ AccessibilityObject::AccessibilityChildrenVector rowsCopy;
+ static_cast<AccessibilityARIAGridRow*>(m_object)->disclosedRows(rowsCopy);
+ return convertToNSArray(rowsCopy);
}
-
- // The row that contains this row. It should be the same as the first parent that is a treeitem.
- if ([attributeName isEqualToString:NSAccessibilityDisclosedByRowAttribute]) {
+ }
+
+ // The row that contains this row. It should be the same as the first parent that is a treeitem.
+ if ([attributeName isEqualToString:NSAccessibilityDisclosedByRowAttribute]) {
+ if (m_object->isTreeItem()) {
AccessibilityObject* parent = m_object->parentObject();
while (parent) {
if (parent->isTreeItem())
@@ -1691,12 +1745,18 @@ static NSString* roleValueToNSString(AccessibilityRole value)
parent = parent->parentObject();
}
return nil;
+ } else if (m_object->isARIATreeGridRow()) {
+ AccessibilityObject* row = static_cast<AccessibilityARIAGridRow*>(m_object)->disclosedByRow();
+ if (!row)
+ return nil;
+ return row->wrapper();
}
- if ([attributeName isEqualToString:NSAccessibilityDisclosureLevelAttribute])
- return [NSNumber numberWithInt:m_object->hierarchicalLevel()];
- if ([attributeName isEqualToString:NSAccessibilityDisclosingAttribute])
- return [NSNumber numberWithBool:m_object->isExpanded()];
}
+
+ if ([attributeName isEqualToString:NSAccessibilityDisclosureLevelAttribute])
+ return [NSNumber numberWithInt:m_object->hierarchicalLevel()];
+ if ([attributeName isEqualToString:NSAccessibilityDisclosingAttribute])
+ return [NSNumber numberWithBool:m_object->isExpanded()];
if ((m_object->isListBox() || m_object->isList()) && [attributeName isEqualToString:NSAccessibilityOrientationAttribute])
return NSAccessibilityVerticalOrientationValue;
@@ -1790,6 +1850,16 @@ static NSString* roleValueToNSString(AccessibilityRole value)
return dropEffectsArray;
}
+ // ARIA Live region attributes.
+ if ([attributeName isEqualToString:NSAccessibilityARIALiveAttribute])
+ return m_object->ariaLiveRegionStatus();
+ if ([attributeName isEqualToString:NSAccessibilityARIARelevantAttribute])
+ return m_object->ariaLiveRegionRelevant();
+ if ([attributeName isEqualToString:NSAccessibilityARIAAtomicAttribute])
+ return [NSNumber numberWithBool:m_object->ariaLiveRegionAtomic()];
+ if ([attributeName isEqualToString:NSAccessibilityARIABusyAttribute])
+ return [NSNumber numberWithBool:m_object->ariaLiveRegionBusy()];
+
// this is used only by DumpRenderTree for testing
if ([attributeName isEqualToString:@"AXClickPoint"])
return [NSValue valueWithPoint:m_object->clickPoint()];
@@ -2153,7 +2223,7 @@ static NSString* roleValueToNSString(AccessibilityRole value)
else if ([attributeName isEqualToString:NSAccessibilitySelectedRowsAttribute]) {
AccessibilityObject::AccessibilityChildrenVector selectedRows;
convertToVector(array, selectedRows);
- if (m_object->isTree())
+ if (m_object->isTree() || m_object->isDataTable())
m_object->setSelectedRows(selectedRows);
} else if ([attributeName isEqualToString:NSAccessibilityGrabbedAttribute])
m_object->setARIAGrabbed([number boolValue]);
@@ -2587,6 +2657,24 @@ static RenderObject* rendererForView(NSView* view)
return [super accessibilityArrayAttributeValues:attribute index:index maxCount:maxCount];
}
+// These are used by DRT so that it can know when notifications are sent.
+// Since they are static, only one callback can be installed at a time (that's all DRT should need).
+typedef void (*AXPostedNotificationCallback)(id element, NSString* notification, void* context);
+static AXPostedNotificationCallback AXNotificationCallback = 0;
+static void* AXPostedNotificationContext = 0;
+
+- (void)accessibilitySetPostedNotificationCallback:(AXPostedNotificationCallback)function withContext:(void*)context
+{
+ AXNotificationCallback = function;
+ AXPostedNotificationContext = context;
+}
+
+- (void)accessibilityPostedNotification:(NSString *)notification
+{
+ if (AXNotificationCallback)
+ AXNotificationCallback(self, notification, AXPostedNotificationContext);
+}
+
@end
#endif // HAVE(ACCESSIBILITY)
diff --git a/WebCore/accessibility/qt/AccessibilityObjectQt.cpp b/WebCore/accessibility/qt/AccessibilityObjectQt.cpp
index 07f13d4..5d85f1e 100644
--- a/WebCore/accessibility/qt/AccessibilityObjectQt.cpp
+++ b/WebCore/accessibility/qt/AccessibilityObjectQt.cpp
@@ -31,6 +31,9 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformIncludesObject() const
{
+ if (isMenuListPopup() || isMenuListOption())
+ return IgnoreObject;
+
return DefaultBehavior;
}
diff --git a/WebCore/accessibility/win/AXObjectCacheWin.cpp b/WebCore/accessibility/win/AXObjectCacheWin.cpp
index 863793c..21e61d9 100644
--- a/WebCore/accessibility/win/AXObjectCacheWin.cpp
+++ b/WebCore/accessibility/win/AXObjectCacheWin.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 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
@@ -28,6 +28,7 @@
#include "AXObjectCache.h"
#include "AccessibilityObject.h"
+#include "Chrome.h"
#include "Document.h"
#include "Page.h"
#include "RenderObject.h"
@@ -82,6 +83,11 @@ void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotific
msaaEvent = EVENT_SYSTEM_SCROLLINGSTART;
break;
+ case AXValueChanged:
+ case AXMenuListValueChanged:
+ msaaEvent = EVENT_OBJECT_VALUECHANGE;
+ break;
+
default:
return;
}
diff --git a/WebCore/accessibility/win/AccessibilityObjectWin.cpp b/WebCore/accessibility/win/AccessibilityObjectWin.cpp
index 895fc43..a86988f 100644
--- a/WebCore/accessibility/win/AccessibilityObjectWin.cpp
+++ b/WebCore/accessibility/win/AccessibilityObjectWin.cpp
@@ -37,6 +37,9 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformIncludesObject() const
{
+ if (isMenuListPopup() || isMenuListOption())
+ return IncludeObject;
+
return DefaultBehavior;
}
diff --git a/WebCore/accessibility/wx/AccessibilityObjectWx.cpp b/WebCore/accessibility/wx/AccessibilityObjectWx.cpp
index 07f13d4..5d85f1e 100644
--- a/WebCore/accessibility/wx/AccessibilityObjectWx.cpp
+++ b/WebCore/accessibility/wx/AccessibilityObjectWx.cpp
@@ -31,6 +31,9 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformIncludesObject() const
{
+ if (isMenuListPopup() || isMenuListOption())
+ return IgnoreObject;
+
return DefaultBehavior;
}
diff --git a/WebCore/bindings/ScriptControllerBase.cpp b/WebCore/bindings/ScriptControllerBase.cpp
index 72c9f45..f1217e3 100644
--- a/WebCore/bindings/ScriptControllerBase.cpp
+++ b/WebCore/bindings/ScriptControllerBase.cpp
@@ -22,6 +22,7 @@
#include "ScriptController.h"
#include "Frame.h"
+#include "FrameLoaderClient.h"
#include "Page.h"
#include "ScriptSourceCode.h"
#include "ScriptValue.h"
@@ -30,6 +31,15 @@
namespace WebCore {
+bool ScriptController::canExecuteScripts()
+{
+ if (m_frame->loader()->isSandboxed(SandboxScripts))
+ return false;
+
+ Settings* settings = m_frame->settings();
+ return m_frame->loader()->client()->allowJavaScript(settings && settings->isJavaScriptEnabled());
+}
+
ScriptValue ScriptController::executeScript(const String& script, bool forceUserGesture)
{
return executeScript(ScriptSourceCode(script, forceUserGesture ? KURL() : m_frame->loader()->url()));
@@ -37,7 +47,7 @@ ScriptValue ScriptController::executeScript(const String& script, bool forceUser
ScriptValue ScriptController::executeScript(const ScriptSourceCode& sourceCode)
{
- if (!isEnabled() || isPaused())
+ if (!canExecuteScripts() || isPaused())
return ScriptValue();
bool wasInExecuteScript = m_inExecuteScript;
diff --git a/WebCore/bindings/generic/BindingDOMWindow.h b/WebCore/bindings/generic/BindingDOMWindow.h
new file mode 100644
index 0000000..b968e2c
--- /dev/null
+++ b/WebCore/bindings/generic/BindingDOMWindow.h
@@ -0,0 +1,123 @@
+/*
+ * 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 BindingDOMWindow_h
+#define BindingDOMWindow_h
+
+#include "Frame.h"
+#include "FrameLoadRequest.h"
+#include "GenericBinding.h"
+#include "Page.h"
+
+namespace WebCore {
+
+template <class Binding>
+class BindingDOMWindow {
+public:
+ typedef typename Binding::Value BindingValue;
+
+ static Frame* createWindow(State<Binding>*,
+ Frame* callingFrame,
+ Frame* enteredFrame,
+ Frame* openerFrame,
+ const String& url,
+ const String& frameName,
+ const WindowFeatures& windowFeatures,
+ BindingValue dialogArgs);
+};
+
+// Implementations of templated methods must be in this file.
+
+template <class Binding>
+Frame* BindingDOMWindow<Binding>::createWindow(State<Binding>* state,
+ Frame* callingFrame,
+ Frame* enteredFrame,
+ Frame* openerFrame,
+ const String& url,
+ const String& frameName,
+ const WindowFeatures& windowFeatures,
+ BindingValue dialogArgs)
+{
+ ASSERT(callingFrame);
+ ASSERT(enteredFrame);
+
+ // Sandboxed iframes cannot open new auxiliary browsing contexts.
+ if (callingFrame && callingFrame->loader()->isSandboxed(SandboxNavigation))
+ return 0;
+
+ ResourceRequest request;
+
+ // For whatever reason, Firefox uses the entered frame to determine
+ // the outgoingReferrer. We replicate that behavior here.
+ String referrer = enteredFrame->loader()->outgoingReferrer();
+ request.setHTTPReferrer(referrer);
+ FrameLoader::addHTTPOriginIfNeeded(request, enteredFrame->loader()->outgoingOrigin());
+ FrameLoadRequest frameRequest(request, frameName);
+
+ // FIXME: It's much better for client API if a new window starts with a URL,
+ // here where we know what URL we are going to open. Unfortunately, this
+ // code passes the empty string for the URL, but there's a reason for that.
+ // Before loading we have to set up the opener, openedByDOM,
+ // and dialogArguments values. Also, to decide whether to use the URL
+ // we currently do an allowsAccessFrom call using the window we create,
+ // which can't be done before creating it. We'd have to resolve all those
+ // issues to pass the URL instead of "".
+
+ bool created;
+ // We pass in the opener frame here so it can be used for looking up the
+ // frame name, in case the active frame is different from the opener frame,
+ // and the name references a frame relative to the opener frame, for example
+ // "_self" or "_parent".
+ Frame* newFrame = callingFrame->loader()->createWindow(openerFrame->loader(), frameRequest, windowFeatures, created);
+ if (!newFrame)
+ return 0;
+
+ newFrame->loader()->setOpener(openerFrame);
+ newFrame->page()->setOpenedByDOM();
+
+ Binding::DOMWindow::storeDialogArgs(state, newFrame, dialogArgs);
+
+ if (!protocolIsJavaScript(url) || BindingSecurity<Binding>::canAccessFrame(state, newFrame, true)) {
+ KURL completedUrl =
+ url.isEmpty() ? KURL(ParsedURLString, "") : completeURL(url);
+ bool userGesture = processingUserGesture();
+
+ if (created)
+ newFrame->loader()->changeLocation(completedUrl, referrer, false, false, userGesture);
+ else if (!url.isEmpty())
+ newFrame->redirectScheduler()->scheduleLocationChange(completedUrl.string(), referrer, false, userGesture);
+ }
+
+ return newFrame;
+}
+
+} // namespace WebCore
+
+#endif // BindingDOMWindow_h
diff --git a/WebCore/bindings/generic/BindingSecurity.h b/WebCore/bindings/generic/BindingSecurity.h
new file mode 100644
index 0000000..929b8f4
--- /dev/null
+++ b/WebCore/bindings/generic/BindingSecurity.h
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef BindingSecurity_h
+#define BindingSecurity_h
+
+#include "BindingSecurityBase.h"
+#include "CSSHelper.h"
+#include "Element.h"
+#include "GenericBinding.h"
+#include "HTMLFrameElementBase.h"
+
+namespace WebCore {
+
+class DOMWindow;
+class Frame;
+class Node;
+
+// Security functions shared by various language bindings.
+template <class Binding>
+class BindingSecurity : public BindingSecurityBase {
+public:
+ // Check if the active execution context can access the target frame.
+ static bool canAccessFrame(State<Binding>*, Frame*, bool reportError);
+
+ // Check if it is safe to access the given node from the
+ // current security context.
+ static bool checkNodeSecurity(State<Binding>*, Node* target);
+
+ static bool allowSettingFrameSrcToJavascriptUrl(State<Binding>*, HTMLFrameElementBase*, String value);
+ static bool allowSettingSrcToJavascriptURL(State<Binding>*, Element*, String name, String value);
+
+private:
+ explicit BindingSecurity() {}
+ ~BindingSecurity();
+
+ // Check if the current DOMWindow's security context can access the target
+ // DOMWindow. This function does not report errors, so most callers should
+ // use canAccessFrame instead.
+ static bool canAccessWindow(State<Binding>*, DOMWindow* target);
+};
+
+// Implementations of templated methods must be in this file.
+
+template <class Binding>
+bool BindingSecurity<Binding>::canAccessWindow(State<Binding>* state,
+ DOMWindow* targetWindow)
+{
+ DOMWindow* activeWindow = state->getActiveWindow();
+ return canAccess(activeWindow, targetWindow);
+}
+
+template <class Binding>
+bool BindingSecurity<Binding>::canAccessFrame(State<Binding>* state,
+ Frame* target,
+ bool reportError)
+{
+ // The subject is detached from a frame, deny accesses.
+ if (!target)
+ return false;
+
+ if (!canAccessWindow(state, getDOMWindow(target))) {
+ if (reportError)
+ state->immediatelyReportUnsafeAccessTo(target);
+ return false;
+ }
+ return true;
+}
+
+template <class Binding>
+bool BindingSecurity<Binding>::checkNodeSecurity(State<Binding>* state, Node* node)
+{
+ if (!node)
+ return false;
+
+ Frame* target = getFrame(node);
+
+ if (!target)
+ return false;
+
+ return canAccessFrame(state, target, true);
+}
+
+template <class Binding>
+bool BindingSecurity<Binding>::allowSettingFrameSrcToJavascriptUrl(State<Binding>* state, HTMLFrameElementBase* frame, String value)
+{
+ if (protocolIsJavaScript(deprecatedParseURL(value))) {
+ Node* contentDoc = frame->contentDocument();
+ if (contentDoc && !checkNodeSecurity(state, contentDoc))
+ return false;
+ }
+ return true;
+}
+
+template <class Binding>
+bool BindingSecurity<Binding>::allowSettingSrcToJavascriptURL(State<Binding>* state, Element* element, String name, String value)
+{
+ if ((element->hasTagName(HTMLNames::iframeTag) || element->hasTagName(HTMLNames::frameTag)) && equalIgnoringCase(name, "src"))
+ return allowSettingFrameSrcToJavascriptUrl(state, static_cast<HTMLFrameElementBase*>(element), value);
+ return true;
+}
+
+}
+
+#endif // BindingSecurity_h
diff --git a/WebCore/bindings/generic/BindingSecurityBase.cpp b/WebCore/bindings/generic/BindingSecurityBase.cpp
new file mode 100644
index 0000000..1598781
--- /dev/null
+++ b/WebCore/bindings/generic/BindingSecurityBase.cpp
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "BindingSecurityBase.h"
+
+#include "DOMWindow.h"
+#include "Frame.h"
+#include "SecurityOrigin.h"
+
+namespace WebCore {
+
+DOMWindow* BindingSecurityBase::getDOMWindow(Frame* frame)
+{
+ return frame->domWindow();
+}
+
+Frame* BindingSecurityBase::getFrame(Node* node)
+{
+ return node->document()->frame();
+}
+
+// Same origin policy implementation:
+//
+// Same origin policy prevents JS code from domain A from accessing JS & DOM
+// objects in a different domain B. There are exceptions and several objects
+// are accessible by cross-domain code. For example, the window.frames object
+// is accessible by code from a different domain, but window.document is not.
+//
+// The JS binding code sets security check callbacks on a function template,
+// and accessing instances of the template calls the callback function.
+// The callback function enforces the same origin policy.
+//
+// Callback functions are expensive. Binding code should use a security token
+// string to do fast access checks for the common case where source and target
+// are in the same domain. A security token is a string object that represents
+// the protocol/url/port of a domain.
+//
+// There are special cases where security token matching is not enough.
+// For example, JS can set its domain to a super domain by calling
+// document.setDomain(...). In these cases, the binding code can reset
+// a context's security token to its global object so that the fast access
+// check will always fail.
+
+// Helper to check if the current execution context can access a target frame.
+// First it checks same domain policy using the lexical context.
+//
+// This is equivalent to KJS::Window::allowsAccessFrom(ExecState*).
+bool BindingSecurityBase::canAccess(DOMWindow* activeWindow,
+ DOMWindow* targetWindow)
+{
+ ASSERT(targetWindow);
+
+ String message;
+
+ if (activeWindow == targetWindow)
+ return true;
+
+ if (!activeWindow)
+ return false;
+
+ const SecurityOrigin* activeSecurityOrigin = activeWindow->securityOrigin();
+ const SecurityOrigin* targetSecurityOrigin = targetWindow->securityOrigin();
+
+ // We have seen crashes were the security origin of the target has not been
+ // initialized. Defend against that.
+ if (!targetSecurityOrigin)
+ return false;
+
+ if (activeSecurityOrigin->canAccess(targetSecurityOrigin))
+ return true;
+
+ // Allow access to a "about:blank" page if the dynamic context is a
+ // detached context of the same frame as the blank page.
+ if (targetSecurityOrigin->isEmpty() && activeWindow->frame() == targetWindow->frame())
+ return true;
+
+ return false;
+}
+
+} // namespace WebCore
diff --git a/WebCore/bindings/generic/BindingSecurityBase.h b/WebCore/bindings/generic/BindingSecurityBase.h
new file mode 100644
index 0000000..cfa2e99
--- /dev/null
+++ b/WebCore/bindings/generic/BindingSecurityBase.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef BindingSecurityBase_h
+#define BindingSecurityBase_h
+
+namespace WebCore {
+
+class DOMWindow;
+class Frame;
+class Node;
+
+// Helper functions for BindingSecurity that depend on WebCore classes, and
+// thus should not be implemented in BindingSecurity.h, which contains template
+// method definitions.
+class BindingSecurityBase {
+protected:
+ static DOMWindow* getDOMWindow(Frame*);
+ static Frame* getFrame(Node*);
+ static bool canAccess(DOMWindow* active, DOMWindow* target);
+};
+
+}
+
+#endif // BindingSecurityBase_h
diff --git a/WebCore/bindings/generic/GenericBinding.h b/WebCore/bindings/generic/GenericBinding.h
new file mode 100644
index 0000000..d030b45
--- /dev/null
+++ b/WebCore/bindings/generic/GenericBinding.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef GenericBinding_h
+#define GenericBinding_h
+
+namespace WebCore {
+
+// Used to instantiate binding templates for any methods shared among all
+// language bindings.
+class GenericBinding {};
+
+// Class to represent execution state for each language binding.
+template <class T>
+class State {};
+
+// Common notion of execution state for language bindings.
+template <>
+class State<GenericBinding> {
+ // Any methods shared across bindings can go here.
+};
+
+}
+
+#endif // GenericBinding_h
diff --git a/WebCore/bindings/js/DOMObjectWithSVGContext.h b/WebCore/bindings/js/DOMObjectWithSVGContext.h
deleted file mode 100644
index 3d435cb..0000000
--- a/WebCore/bindings/js/DOMObjectWithSVGContext.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2009 Google, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * 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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (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 DOMObjectWithSVGContext_h
-#define DOMObjectWithSVGContext_h
-
-#if ENABLE(SVG)
-
-#include "JSDOMBinding.h"
-#include "SVGElement.h"
-
-namespace WebCore {
-
- // FIXME: This class (and file) should be removed once all SVG bindings
- // have moved context() onto the various impl() pointers.
- class DOMObjectWithSVGContext : public DOMObject {
- public:
- SVGElement* context() const { return m_context.get(); }
-
- protected:
- DOMObjectWithSVGContext(NonNullPassRefPtr<JSC::Structure> structure, JSDOMGlobalObject*, SVGElement* context)
- : DOMObject(structure)
- , m_context(context)
- {
- // No space to store the JSDOMGlobalObject w/o hitting the CELL_SIZE limit.
- }
-
- protected: // FIXME: Many custom bindings use m_context directly. Making this protected to temporariliy reduce code churn.
- RefPtr<SVGElement> m_context;
- };
-
-} // namespace WebCore
-
-#endif // ENABLE(SVG)
-#endif // DOMObjectWithSVGContext_h
diff --git a/WebCore/bindings/js/GCController.cpp b/WebCore/bindings/js/GCController.cpp
index 59bcfa3..3e5645f 100644
--- a/WebCore/bindings/js/GCController.cpp
+++ b/WebCore/bindings/js/GCController.cpp
@@ -40,17 +40,13 @@ using namespace JSC;
namespace WebCore {
-#if USE(PTHREADS)
-
static void* collect(void*)
{
JSLock lock(SilenceAssertionsOnly);
- JSDOMWindow::commonJSGlobalData()->heap.collect();
+ JSDOMWindow::commonJSGlobalData()->heap.collectAllGarbage();
return 0;
}
-#endif
-
GCController& gcController()
{
DEFINE_STATIC_LOCAL(GCController, staticGCController, ());
@@ -70,14 +66,12 @@ void GCController::garbageCollectSoon()
void GCController::gcTimerFired(Timer<GCController>*)
{
- JSLock lock(SilenceAssertionsOnly);
- JSDOMWindow::commonJSGlobalData()->heap.collect();
+ collect(0);
}
void GCController::garbageCollectNow()
{
- JSLock lock(SilenceAssertionsOnly);
- JSDOMWindow::commonJSGlobalData()->heap.collect();
+ collect(0);
}
void GCController::garbageCollectOnAlternateThreadForDebugging(bool waitUntilDone)
diff --git a/WebCore/bindings/js/JSBindingsAllInOne.cpp b/WebCore/bindings/js/JSBindingsAllInOne.cpp
index cf1049a..e539042 100644
--- a/WebCore/bindings/js/JSBindingsAllInOne.cpp
+++ b/WebCore/bindings/js/JSBindingsAllInOne.cpp
@@ -86,7 +86,6 @@
#include "JSImageConstructor.cpp"
#include "JSImageDataCustom.cpp"
#include "JSInjectedScriptHostCustom.cpp"
-#include "JSInspectedObjectWrapper.cpp"
#include "JSInspectorFrontendHostCustom.cpp"
#include "JSJavaScriptCallFrameCustom.cpp"
#include "JSLazyEventListener.cpp"
@@ -107,7 +106,6 @@
#include "JSPluginArrayCustom.cpp"
#include "JSPluginCustom.cpp"
#include "JSPluginElementFunctions.cpp"
-#include "JSQuarantinedObjectWrapper.cpp"
#include "JSSQLResultSetRowListCustom.cpp"
#include "JSSQLTransactionCustom.cpp"
#include "JSSVGElementInstanceCustom.cpp"
@@ -115,7 +113,6 @@
#include "JSSVGMatrixCustom.cpp"
#include "JSSVGPathSegCustom.cpp"
#include "JSSVGPathSegListCustom.cpp"
-#include "JSSVGPointListCustom.cpp"
#include "JSSharedWorkerConstructor.cpp"
#include "JSSharedWorkerCustom.cpp"
#include "JSStorageCustom.cpp"
diff --git a/WebCore/bindings/js/JSDOMBinding.cpp b/WebCore/bindings/js/JSDOMBinding.cpp
index f12c779..04b6dc9 100644
--- a/WebCore/bindings/js/JSDOMBinding.cpp
+++ b/WebCore/bindings/js/JSDOMBinding.cpp
@@ -49,9 +49,11 @@
#include "ScriptController.h"
#include "Settings.h"
#include "XMLHttpRequestException.h"
+#include <runtime/DateInstance.h>
#include <runtime/Error.h>
#include <runtime/JSFunction.h>
#include <runtime/PrototypeFunction.h>
+#include <wtf/MathExtras.h>
#include <wtf/StdLibExtras.h>
#if ENABLE(SVG)
@@ -78,30 +80,32 @@ using namespace HTMLNames;
typedef Document::JSWrapperCache JSWrapperCache;
typedef Document::JSWrapperCacheMap JSWrapperCacheMap;
-// For debugging, keep a set of wrappers currently registered, and check that
-// all are unregistered before they are destroyed. This has helped us fix at
-// least one bug.
-
-static void addWrapper(DOMObject* wrapper);
-static void removeWrapper(DOMObject* wrapper);
-static void removeWrappers(const JSWrapperCache& wrappers);
-static void removeWrappers(const DOMObjectWrapperMap& wrappers);
-
-#ifdef NDEBUG
-
-static inline void addWrapper(DOMObject*)
+inline JSWrapperCache* Document::getWrapperCache(DOMWrapperWorld* world)
{
+ if (world->isNormal()) {
+ if (JSWrapperCache* wrapperCache = m_normalWorldWrapperCache)
+ return wrapperCache;
+ ASSERT(!m_wrapperCacheMap.contains(world));
+ } else if (JSWrapperCache* wrapperCache = m_wrapperCacheMap.get(world))
+ return wrapperCache;
+ return createWrapperCache(world);
}
-static inline void removeWrapper(DOMObject*)
-{
-}
+// For debugging, keep a set of wrappers currently cached, and check that
+// all are uncached before they are destroyed. This helps us catch bugs like:
+// - wrappers being deleted without being removed from the cache
+// - wrappers being cached twice
+
+static void willCacheWrapper(DOMObject* wrapper);
+static void didUncacheWrapper(DOMObject* wrapper);
+
+#ifdef NDEBUG
-static inline void removeWrappers(const JSWrapperCache&)
+static inline void willCacheWrapper(DOMObject*)
{
}
-static inline void removeWrappers(const DOMObjectWrapperMap&)
+static inline void didUncacheWrapper(DOMObject*)
{
}
@@ -118,13 +122,13 @@ static HashSet<DOMObject*>& wrapperSet()
#endif
}
-static void addWrapper(DOMObject* wrapper)
+static void willCacheWrapper(DOMObject* wrapper)
{
ASSERT(!wrapperSet().contains(wrapper));
wrapperSet().add(wrapper);
}
-static void removeWrapper(DOMObject* wrapper)
+static void didUncacheWrapper(DOMObject* wrapper)
{
if (!wrapper)
return;
@@ -132,20 +136,6 @@ static void removeWrapper(DOMObject* wrapper)
wrapperSet().remove(wrapper);
}
-static void removeWrappers(const JSWrapperCache& wrappers)
-{
- JSWrapperCache::const_iterator wrappersEnd = wrappers.end();
- for (JSWrapperCache::const_iterator it = wrappers.begin(); it != wrappersEnd; ++it)
- removeWrapper(it->second);
-}
-
-static inline void removeWrappers(const DOMObjectWrapperMap& wrappers)
-{
- DOMObjectWrapperMap::const_iterator wrappersEnd = wrappers.end();
- for (DOMObjectWrapperMap::const_iterator it = wrappers.begin(); it != wrappersEnd; ++it)
- removeWrapper(it->second);
-}
-
DOMObject::~DOMObject()
{
ASSERT(!wrapperSet().contains(this));
@@ -153,8 +143,9 @@ DOMObject::~DOMObject()
#endif
-DOMWrapperWorld::DOMWrapperWorld(JSC::JSGlobalData* globalData)
+DOMWrapperWorld::DOMWrapperWorld(JSC::JSGlobalData* globalData, bool isNormal)
: m_globalData(globalData)
+ , m_isNormal(isNormal)
{
}
@@ -164,8 +155,6 @@ DOMWrapperWorld::~DOMWrapperWorld()
ASSERT(clientData);
static_cast<WebCoreJSClientData*>(clientData)->forgetWorld(this);
- removeWrappers(m_wrappers);
-
for (HashSet<Document*>::iterator iter = documentsWithWrappers.begin(); iter != documentsWithWrappers.end(); ++iter)
forgetWorldOfDOMNodesForDocument(*iter, this);
}
@@ -206,11 +195,6 @@ private:
HashSet<DOMWrapperWorld*>::iterator m_end;
};
-DOMWrapperWorld* currentWorld(JSC::ExecState* exec)
-{
- return static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->world();
-}
-
DOMWrapperWorld* normalWorld(JSC::JSGlobalData& globalData)
{
JSGlobalData::ClientData* clientData = globalData.clientData;
@@ -242,10 +226,19 @@ static inline DOMObjectWrapperMap& DOMObjectWrapperMapFor(JSC::ExecState* exec)
return currentWorld(exec)->m_wrappers;
}
+bool hasCachedDOMObjectWrapperUnchecked(JSGlobalData* globalData, void* objectHandle)
+{
+ for (JSGlobalDataWorldIterator worldIter(globalData); worldIter; ++worldIter) {
+ if (worldIter->m_wrappers.uncheckedGet(objectHandle))
+ return true;
+ }
+ return false;
+}
+
bool hasCachedDOMObjectWrapper(JSGlobalData* globalData, void* objectHandle)
{
for (JSGlobalDataWorldIterator worldIter(globalData); worldIter; ++worldIter) {
- if (worldIter->m_wrappers.contains(objectHandle))
+ if (worldIter->m_wrappers.get(objectHandle))
return true;
}
return false;
@@ -258,18 +251,18 @@ DOMObject* getCachedDOMObjectWrapper(JSC::ExecState* exec, void* objectHandle)
void cacheDOMObjectWrapper(JSC::ExecState* exec, void* objectHandle, DOMObject* wrapper)
{
- addWrapper(wrapper);
+ willCacheWrapper(wrapper);
DOMObjectWrapperMapFor(exec).set(objectHandle, wrapper);
}
-bool hasCachedDOMNodeWrapper(Document* document, Node* node)
+bool hasCachedDOMNodeWrapperUnchecked(Document* document, Node* node)
{
if (!document)
- return hasCachedDOMObjectWrapper(JSDOMWindow::commonJSGlobalData(), node);
+ return hasCachedDOMObjectWrapperUnchecked(JSDOMWindow::commonJSGlobalData(), node);
JSWrapperCacheMap& wrapperCacheMap = document->wrapperCacheMap();
for (JSWrapperCacheMap::iterator iter = wrapperCacheMap.begin(); iter != wrapperCacheMap.end(); ++iter) {
- if (iter->second->contains(node))
+ if (iter->second->uncheckedGet(node))
return true;
}
return false;
@@ -285,50 +278,50 @@ JSNode* getCachedDOMNodeWrapper(JSC::ExecState* exec, Document* document, Node*
void forgetDOMObject(DOMObject* wrapper, void* objectHandle)
{
JSC::JSGlobalData* globalData = Heap::heap(wrapper)->globalData();
- for (JSGlobalDataWorldIterator worldIter(globalData); worldIter; ++worldIter) {
- DOMObjectWrapperMap& wrappers = worldIter->m_wrappers;
- DOMObjectWrapperMap::iterator iter = wrappers.find(objectHandle);
- if ((iter != wrappers.end()) && (iter->second == wrapper)) {
- removeWrapper(wrapper);
- wrappers.remove(iter);
- return;
- }
+
+ // Check the normal world first!
+ JSGlobalData::ClientData* clientData = globalData->clientData;
+ ASSERT(clientData);
+ DOMObjectWrapperMap& wrappers = static_cast<WebCoreJSClientData*>(clientData)->normalWorld()->m_wrappers;
+ if (wrappers.uncheckedRemove(objectHandle, wrapper)) {
+ didUncacheWrapper(wrapper);
+ return;
}
- // If the world went away, it should have removed this wrapper from the set.
- ASSERT(!wrapperSet().contains(wrapper));
+ // We can't guarantee that a wrapper is in the cache when it uncaches itself,
+ // since a new wrapper may be cached before the old wrapper's destructor runs.
+ for (JSGlobalDataWorldIterator worldIter(globalData); worldIter; ++worldIter) {
+ if (worldIter->m_wrappers.uncheckedRemove(objectHandle, wrapper))
+ break;
+ }
+ didUncacheWrapper(wrapper);
}
-void forgetDOMNode(DOMObject* wrapper, Node* node, Document* document)
+void forgetDOMNode(JSNode* wrapper, Node* node, Document* document)
{
if (!document) {
forgetDOMObject(wrapper, node);
return;
}
+ // We can't guarantee that a wrapper is in the cache when it uncaches itself,
+ // since a new wrapper may be cached before the old wrapper's destructor runs.
JSWrapperCacheMap& wrapperCacheMap = document->wrapperCacheMap();
for (JSWrapperCacheMap::iterator wrappersIter = wrapperCacheMap.begin(); wrappersIter != wrapperCacheMap.end(); ++wrappersIter) {
- JSWrapperCache* wrappers = wrappersIter->second;
- JSWrapperCache::iterator iter = wrappers->find(node);
- if ((iter != wrappers->end()) && (iter->second == wrapper)) {
- wrappers->remove(iter);
- removeWrapper(wrapper);
- return;
- }
+ if (wrappersIter->second->uncheckedRemove(node, wrapper))
+ break;
}
-
- // If the world went away, it should have removed this wrapper from the set.
- ASSERT(!wrapperSet().contains(wrapper));
+ didUncacheWrapper(wrapper);
}
void cacheDOMNodeWrapper(JSC::ExecState* exec, Document* document, Node* node, JSNode* wrapper)
{
if (!document) {
- addWrapper(wrapper);
+ willCacheWrapper(wrapper);
DOMObjectWrapperMapFor(exec).set(node, wrapper);
return;
}
- addWrapper(wrapper);
+ willCacheWrapper(wrapper);
document->getWrapperCache(currentWorld(exec))->set(node, wrapper);
}
@@ -338,9 +331,7 @@ void forgetAllDOMNodesForDocument(Document* document)
JSWrapperCacheMap& wrapperCacheMap = document->wrapperCacheMap();
JSWrapperCacheMap::const_iterator wrappersMapEnd = wrapperCacheMap.end();
for (JSWrapperCacheMap::const_iterator wrappersMapIter = wrapperCacheMap.begin(); wrappersMapIter != wrappersMapEnd; ++wrappersMapIter) {
- JSWrapperCache* wrappers = wrappersMapIter->second;
- removeWrappers(*wrappers);
- delete wrappers;
+ delete wrappersMapIter->second;
wrappersMapIter->first->forgetDocument(document);
}
}
@@ -349,7 +340,6 @@ void forgetWorldOfDOMNodesForDocument(Document* document, DOMWrapperWorld* world
{
JSWrapperCache* wrappers = document->wrapperCacheMap().take(world);
ASSERT(wrappers); // 'world' should only know about 'document' if 'document' knows about 'world'!
- removeWrappers(*wrappers);
delete wrappers;
}
@@ -379,14 +369,14 @@ static inline bool isObservableThroughDOM(JSNode* jsNode, DOMWrapperWorld* world
// the custom markChildren functions rather than here.
if (node->isElementNode()) {
if (NamedNodeMap* attributes = static_cast<Element*>(node)->attributeMap()) {
- if (DOMObject* wrapper = world->m_wrappers.get(attributes)) {
+ if (DOMObject* wrapper = world->m_wrappers.uncheckedGet(attributes)) {
if (wrapper->hasCustomProperties())
return true;
}
}
if (node->isStyledElement()) {
if (CSSMutableStyleDeclaration* style = static_cast<StyledElement*>(node)->inlineStyleDecl()) {
- if (DOMObject* wrapper = world->m_wrappers.get(style)) {
+ if (DOMObject* wrapper = world->m_wrappers.uncheckedGet(style)) {
if (wrapper->hasCustomProperties())
return true;
}
@@ -394,7 +384,7 @@ static inline bool isObservableThroughDOM(JSNode* jsNode, DOMWrapperWorld* world
}
if (static_cast<Element*>(node)->hasTagName(canvasTag)) {
if (CanvasRenderingContext* context = static_cast<HTMLCanvasElement*>(node)->renderingContext()) {
- if (DOMObject* wrapper = world->m_wrappers.get(context)) {
+ if (DOMObject* wrapper = world->m_wrappers.uncheckedGet(context)) {
if (wrapper->hasCustomProperties())
return true;
}
@@ -432,8 +422,8 @@ void markDOMNodesForDocument(MarkStack& markStack, Document* document)
DOMWrapperWorld* world = wrappersIter->first;
JSWrapperCache* nodeDict = wrappersIter->second;
- JSWrapperCache::iterator nodeEnd = nodeDict->end();
- for (JSWrapperCache::iterator nodeIt = nodeDict->begin(); nodeIt != nodeEnd; ++nodeIt) {
+ JSWrapperCache::iterator nodeEnd = nodeDict->uncheckedEnd();
+ for (JSWrapperCache::iterator nodeIt = nodeDict->uncheckedBegin(); nodeIt != nodeEnd; ++nodeIt) {
JSNode* jsNode = nodeIt->second;
if (isObservableThroughDOM(jsNode, world))
markStack.append(jsNode);
@@ -451,8 +441,7 @@ void markActiveObjectsForContext(MarkStack& markStack, JSGlobalData& globalData,
for (HashMap<ActiveDOMObject*, void*>::const_iterator iter = activeObjects.begin(); iter != activeObjectsEnd; ++iter) {
if (iter->first->hasPendingActivity()) {
// Generally, an active object with pending activity must have a wrapper to mark its listeners.
- // However, some ActiveDOMObjects don't have JS wrappers (timers created by setTimeout is one example).
- // FIXME: perhaps need to make sure even timers have a markable 'wrapper'.
+ // However, some ActiveDOMObjects don't have JS wrappers.
markDOMObjectWrapper(markStack, globalData, iter->second);
}
}
@@ -475,7 +464,7 @@ static inline void takeWrappers(Node* node, Document* document, WrapperSet& wrap
JSWrapperCacheMap& wrapperCacheMap = document->wrapperCacheMap();
for (JSWrapperCacheMap::iterator iter = wrapperCacheMap.begin(); iter != wrapperCacheMap.end(); ++iter) {
if (JSNode* wrapper = iter->second->take(node)) {
- removeWrapper(wrapper);
+ didUncacheWrapper(wrapper);
wrapperSet.append(WrapperAndWorld(wrapper, iter->first));
}
}
@@ -483,7 +472,7 @@ static inline void takeWrappers(Node* node, Document* document, WrapperSet& wrap
for (JSGlobalDataWorldIterator worldIter(JSDOMWindow::commonJSGlobalData()); worldIter; ++worldIter) {
DOMWrapperWorld* world = *worldIter;
if (JSNode* wrapper = static_cast<JSNode*>(world->m_wrappers.take(node))) {
- removeWrapper(wrapper);
+ didUncacheWrapper(wrapper);
wrapperSet.append(WrapperAndWorld(wrapper, world));
}
}
@@ -499,11 +488,11 @@ void updateDOMNodeDocument(Node* node, Document* oldDocument, Document* newDocum
for (unsigned i = 0; i < wrapperSet.size(); ++i) {
JSNode* wrapper = wrapperSet[i].first;
+ willCacheWrapper(wrapper);
if (newDocument)
newDocument->getWrapperCache(wrapperSet[i].second)->set(node, wrapper);
else
wrapperSet[i].second->m_wrappers.set(node, wrapper);
- addWrapper(wrapper);
}
}
@@ -516,7 +505,7 @@ void markDOMObjectWrapper(MarkStack& markStack, JSGlobalData& globalData, void*
return;
for (JSGlobalDataWorldIterator worldIter(&globalData); worldIter; ++worldIter) {
- if (DOMObject* wrapper = worldIter->m_wrappers.get(object))
+ if (DOMObject* wrapper = worldIter->m_wrappers.uncheckedGet(object))
markStack.append(wrapper);
}
}
@@ -526,18 +515,55 @@ void markDOMNodeWrapper(MarkStack& markStack, Document* document, Node* node)
if (document) {
JSWrapperCacheMap& wrapperCacheMap = document->wrapperCacheMap();
for (JSWrapperCacheMap::iterator iter = wrapperCacheMap.begin(); iter != wrapperCacheMap.end(); ++iter) {
- if (JSNode* wrapper = iter->second->get(node))
+ if (JSNode* wrapper = iter->second->uncheckedGet(node))
markStack.append(wrapper);
}
return;
}
for (JSGlobalDataWorldIterator worldIter(JSDOMWindow::commonJSGlobalData()); worldIter; ++worldIter) {
- if (DOMObject* wrapper = worldIter->m_wrappers.get(node))
+ if (DOMObject* wrapper = worldIter->m_wrappers.uncheckedGet(node))
markStack.append(wrapper);
}
}
+static void stringWrapperDestroyed(JSString* str, void* context)
+{
+ StringImpl* cacheKey = static_cast<StringImpl*>(context);
+ JSC::JSGlobalData* globalData = Heap::heap(str)->globalData();
+
+ // Check the normal world first!
+ JSGlobalData::ClientData* clientData = globalData->clientData;
+ ASSERT(clientData);
+ JSStringCache& cache = static_cast<WebCoreJSClientData*>(clientData)->normalWorld()->m_stringCache;
+ if (cache.uncheckedRemove(cacheKey, str)) {
+ cacheKey->deref();
+ return;
+ }
+
+ for (JSGlobalDataWorldIterator worldIter(globalData); worldIter; ++worldIter) {
+ if (worldIter->m_stringCache.uncheckedRemove(cacheKey, str))
+ break;
+ }
+
+ cacheKey->deref();
+}
+
+JSValue jsStringSlowCase(ExecState* exec, JSStringCache& stringCache, StringImpl* stringImpl)
+{
+ // If there is a stale entry, we have to explicitly remove it to avoid
+ // problems down the line.
+ if (JSString* wrapper = stringCache.uncheckedGet(stringImpl))
+ stringCache.uncheckedRemove(stringImpl, wrapper);
+
+ JSString* wrapper = jsStringWithFinalizer(exec, stringImpl->ustring(), stringWrapperDestroyed, stringImpl);
+ stringCache.set(stringImpl, wrapper);
+ // ref explicitly instead of using a RefPtr-keyed hashtable because the wrapper can
+ // outlive the cache, so the stringImpl has to match the wrapper's lifetime.
+ stringImpl->ref();
+ return wrapper;
+}
+
JSValue jsStringOrNull(ExecState* exec, const String& s)
{
if (s.isNull())
@@ -566,6 +592,11 @@ JSValue jsStringOrFalse(ExecState* exec, const String& s)
return jsString(exec, s);
}
+JSValue jsString(ExecState* exec, const KURL& url)
+{
+ return jsString(exec, url.string());
+}
+
JSValue jsStringOrNull(ExecState* exec, const KURL& url)
{
if (url.isNull())
@@ -601,6 +632,22 @@ UString valueToStringWithUndefinedOrNullCheck(ExecState* exec, JSValue value)
return value.toString(exec);
}
+JSValue jsDateOrNull(ExecState* exec, double value)
+{
+ if (!isfinite(value))
+ return jsNull();
+ return new (exec) DateInstance(exec, value);
+}
+
+double valueToDate(ExecState* exec, JSValue value)
+{
+ if (value.isNumber())
+ return value.uncheckedGetNumber();
+ if (!value.inherits(&DateInstance::info))
+ return std::numeric_limits<double>::quiet_NaN();
+ return static_cast<DateInstance*>(value.toObject(exec))->internalNumber();
+}
+
void reportException(ExecState* exec, JSValue exception)
{
UString errorMessage = exception.toString(exec);
@@ -659,7 +706,7 @@ void setDOMException(ExecState* exec, ExceptionCode ec)
break;
#if ENABLE(SVG)
case SVGExceptionType:
- errorObject = toJS(exec, globalObject, SVGException::create(description).get(), 0);
+ errorObject = toJS(exec, globalObject, SVGException::create(description).get(), 0 /* no context on purpose */);
break;
#endif
#if ENABLE(XPATH)
@@ -734,7 +781,7 @@ bool processingUserGesture(ExecState* exec)
KURL completeURL(ExecState* exec, const String& relativeURL)
{
- // For histoical reasons, we need to complete the URL using the dynamic frame.
+ // For historical reasons, we need to complete the URL using the dynamic frame.
Frame* frame = toDynamicFrame(exec);
if (!frame)
return KURL();
diff --git a/WebCore/bindings/js/JSDOMBinding.h b/WebCore/bindings/js/JSDOMBinding.h
index 3982dad..5456c75 100644
--- a/WebCore/bindings/js/JSDOMBinding.h
+++ b/WebCore/bindings/js/JSDOMBinding.h
@@ -23,9 +23,11 @@
#define JSDOMBinding_h
#include "JSDOMGlobalObject.h"
-#include "Document.h" // For DOMConstructorWithDocument
+#include "JSSVGContextCache.h"
+#include "Document.h"
#include <runtime/Completion.h>
#include <runtime/Lookup.h>
+#include <runtime/WeakGCMap.h>
#include <wtf/Noncopyable.h>
namespace JSC {
@@ -69,41 +71,33 @@ namespace WebCore {
// updated to store a globalObject pointer.
class DOMObjectWithGlobalPointer : public DOMObject {
public:
- JSDOMGlobalObject* globalObject() const { return m_globalObject; }
+ JSDOMGlobalObject* globalObject() const { return static_cast<JSDOMGlobalObject*>(getAnonymousValue(GlobalObjectSlot).asCell()); }
ScriptExecutionContext* scriptExecutionContext() const
{
// FIXME: Should never be 0, but can be due to bug 27640.
- return m_globalObject->scriptExecutionContext();
+ return globalObject()->scriptExecutionContext();
}
static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
{
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags));
+ return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
- static const unsigned StructureFlags = JSC::OverridesMarkChildren | DOMObject::StructureFlags;
+ static const unsigned AnonymousSlotCount = 1 + DOMObject::AnonymousSlotCount;
+ static const unsigned GlobalObjectSlot = AnonymousSlotCount - 1;
DOMObjectWithGlobalPointer(NonNullPassRefPtr<JSC::Structure> structure, JSDOMGlobalObject* globalObject)
: DOMObject(structure)
- , m_globalObject(globalObject)
{
// FIXME: This ASSERT is valid, but fires in fast/dom/gc-6.html when trying to create
// new JavaScript objects on detached windows due to DOMWindow::document()
// needing to reach through the frame to get to the Document*. See bug 27640.
// ASSERT(globalObject->scriptExecutionContext());
+ putAnonymousValue(GlobalObjectSlot, globalObject);
}
virtual ~DOMObjectWithGlobalPointer() { }
-
- void markChildren(JSC::MarkStack& markStack)
- {
- DOMObject::markChildren(markStack);
- markStack.append(m_globalObject);
- }
-
- private:
- JSDOMGlobalObject* m_globalObject;
};
// Base class for all constructor objects in the JSC bindings.
@@ -111,7 +105,7 @@ namespace WebCore {
public:
static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
{
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags));
+ return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
@@ -139,11 +133,12 @@ namespace WebCore {
}
};
- typedef HashMap<void*, DOMObject*> DOMObjectWrapperMap;
+ typedef JSC::WeakGCMap<void*, DOMObject*> DOMObjectWrapperMap;
+ typedef JSC::WeakGCMap<StringImpl*, JSC::JSString*> JSStringCache;
class DOMWrapperWorld : public RefCounted<DOMWrapperWorld> {
public:
- DOMWrapperWorld(JSC::JSGlobalData*);
+ DOMWrapperWorld(JSC::JSGlobalData*, bool isNormal);
~DOMWrapperWorld();
void rememberDocument(Document* document) { documentsWithWrappers.add(document); }
@@ -151,10 +146,14 @@ namespace WebCore {
// FIXME: can we make this private?
DOMObjectWrapperMap m_wrappers;
+ JSStringCache m_stringCache;
+
+ bool isNormal() const { return m_isNormal; }
private:
JSC::JSGlobalData* m_globalData;
HashSet<Document*> documentsWithWrappers;
+ bool m_isNormal;
};
// Map from static HashTable instances to per-GlobalData ones.
@@ -181,12 +180,12 @@ namespace WebCore {
HashMap<const JSC::HashTable*, JSC::HashTable> m_map;
};
- class WebCoreJSClientData : public JSC::JSGlobalData::ClientData {
+ class WebCoreJSClientData : public JSC::JSGlobalData::ClientData, public Noncopyable {
friend class JSGlobalDataWorldIterator;
public:
WebCoreJSClientData(JSC::JSGlobalData* globalData)
- : m_normalWorld(globalData)
+ : m_normalWorld(globalData, true)
{
m_worldSet.add(&m_normalWorld);
}
@@ -216,22 +215,24 @@ namespace WebCore {
DOMWrapperWorld m_normalWorld;
};
- bool hasCachedDOMObjectWrapper(JSC::JSGlobalData*, void* objectHandle);
DOMObject* getCachedDOMObjectWrapper(JSC::ExecState*, void* objectHandle);
+ bool hasCachedDOMObjectWrapper(JSC::JSGlobalData*, void* objectHandle);
void cacheDOMObjectWrapper(JSC::ExecState*, void* objectHandle, DOMObject* wrapper);
- void forgetDOMNode(DOMObject* wrapper, Node* node, Document* document);
+ void forgetDOMNode(JSNode* wrapper, Node* node, Document* document);
void forgetDOMObject(DOMObject* wrapper, void* objectHandle);
- bool hasCachedDOMNodeWrapper(Document*, Node*);
JSNode* getCachedDOMNodeWrapper(JSC::ExecState*, Document*, Node*);
void cacheDOMNodeWrapper(JSC::ExecState*, Document*, Node*, JSNode* wrapper);
void forgetAllDOMNodesForDocument(Document*);
void forgetWorldOfDOMNodesForDocument(Document*, DOMWrapperWorld*);
void updateDOMNodeDocument(Node*, Document* oldDocument, Document* newDocument);
+
void markDOMNodesForDocument(JSC::MarkStack&, Document*);
void markActiveObjectsForContext(JSC::MarkStack&, JSC::JSGlobalData&, ScriptExecutionContext*);
void markDOMObjectWrapper(JSC::MarkStack&, JSC::JSGlobalData& globalData, void* object);
void markDOMNodeWrapper(JSC::MarkStack& markStack, Document* document, Node* node);
+ bool hasCachedDOMObjectWrapperUnchecked(JSC::JSGlobalData*, void* objectHandle);
+ bool hasCachedDOMNodeWrapperUnchecked(Document*, Node*);
JSC::Structure* getCachedDOMStructure(JSDOMGlobalObject*, const JSC::ClassInfo*);
JSC::Structure* cacheDOMStructure(JSDOMGlobalObject*, NonNullPassRefPtr<JSC::Structure>, const JSC::ClassInfo*);
@@ -293,19 +294,21 @@ namespace WebCore {
#define CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, className, object, context) createDOMObjectWrapper<JS##className>(exec, globalObject, static_cast<className*>(object), context)
template<class WrapperClass, class DOMClass> inline DOMObject* createDOMObjectWrapper(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMClass* object, SVGElement* context)
{
- ASSERT(object);
- ASSERT(!getCachedDOMObjectWrapper(exec, object));
- WrapperClass* wrapper = new (exec) WrapperClass(getDOMStructure<WrapperClass>(exec, globalObject), globalObject, object, context);
- cacheDOMObjectWrapper(exec, object, wrapper);
+ DOMObject* wrapper = createDOMObjectWrapper<WrapperClass, DOMClass>(exec, globalObject, object);
+ ASSERT(wrapper);
+ if (context)
+ JSSVGContextCache::addWrapper(wrapper, context);
return wrapper;
}
template<class WrapperClass, class DOMClass> inline JSC::JSValue getDOMObjectWrapper(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMClass* object, SVGElement* context)
{
if (!object)
return JSC::jsNull();
- if (DOMObject* wrapper = getCachedDOMObjectWrapper(exec, object))
+ if (DOMObject* wrapper = getCachedDOMObjectWrapper(exec, object)) {
+ ASSERT(JSSVGContextCache::svgContextForDOMObject(wrapper) == context);
return wrapper;
- return createDOMObjectWrapper<WrapperClass>(exec, globalObject, object, context);
+ }
+ return createDOMObjectWrapper<WrapperClass, DOMClass>(exec, globalObject, object, context);
}
#endif
@@ -337,6 +340,14 @@ namespace WebCore {
// Convert a DOM implementation exception code into a JavaScript exception in the execution state.
void setDOMException(JSC::ExecState*, ExceptionCode);
+ JSC::JSValue jsString(JSC::ExecState*, const String&); // empty if the string is null
+ JSC::JSValue jsStringSlowCase(JSC::ExecState*, JSStringCache&, StringImpl*);
+ JSC::JSValue jsString(JSC::ExecState*, const KURL&); // empty if the URL is null
+ inline JSC::JSValue jsString(JSC::ExecState* exec, const AtomicString& s)
+ {
+ return jsString(exec, s.string());
+ }
+
JSC::JSValue jsStringOrNull(JSC::ExecState*, const String&); // null if the string is null
JSC::JSValue jsStringOrNull(JSC::ExecState*, const KURL&); // null if the URL is null
@@ -353,6 +364,11 @@ namespace WebCore {
JSC::UString valueToStringWithNullCheck(JSC::ExecState*, JSC::JSValue); // null if the value is null
JSC::UString valueToStringWithUndefinedOrNullCheck(JSC::ExecState*, JSC::JSValue); // null if the value is null or undefined
+ // Returns a Date instance for the specified value, or null if the value is NaN or infinity.
+ JSC::JSValue jsDateOrNull(JSC::ExecState*, double);
+ // NaN if the value can't be converted to a date.
+ double valueToDate(JSC::ExecState*, JSC::JSValue);
+
// FIXME: These are a stop-gap until all toJS calls can be converted to pass a globalObject
template <typename T>
inline JSC::JSValue toJS(JSC::ExecState* exec, T* ptr)
@@ -395,6 +411,27 @@ namespace WebCore {
bool processingUserGesture(JSC::ExecState*);
KURL completeURL(JSC::ExecState*, const String& relativeURL);
+ inline DOMWrapperWorld* currentWorld(JSC::ExecState* exec)
+ {
+ return static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->world();
+ }
+
+ inline JSC::JSValue jsString(JSC::ExecState* exec, const String& s)
+ {
+ StringImpl* stringImpl = s.impl();
+ if (!stringImpl || !stringImpl->length())
+ return jsEmptyString(exec);
+
+ if (stringImpl->length() == 1 && stringImpl->characters()[0] <= 0xFF)
+ return jsString(exec, stringImpl->ustring());
+
+ JSStringCache& stringCache = currentWorld(exec)->m_stringCache;
+ if (JSC::JSString* wrapper = stringCache.get(stringImpl))
+ return wrapper;
+
+ return jsStringSlowCase(exec, stringCache, stringImpl);
+ }
+
} // namespace WebCore
#endif // JSDOMBinding_h
diff --git a/WebCore/bindings/js/JSDOMGlobalObject.cpp b/WebCore/bindings/js/JSDOMGlobalObject.cpp
index 011a4e4..e0b5b89 100644
--- a/WebCore/bindings/js/JSDOMGlobalObject.cpp
+++ b/WebCore/bindings/js/JSDOMGlobalObject.cpp
@@ -40,6 +40,8 @@ using namespace JSC;
namespace WebCore {
+const ClassInfo JSDOMGlobalObject::s_info = { "DOMGlobalObject", 0, 0, 0 };
+
JSDOMGlobalObject::JSDOMGlobalObject(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject::JSDOMGlobalObjectData* data, JSObject* thisValue)
: JSGlobalObject(structure, data, thisValue)
{
@@ -56,14 +58,9 @@ void JSDOMGlobalObject::markChildren(MarkStack& markStack)
JSDOMConstructorMap::iterator end2 = constructors().end();
for (JSDOMConstructorMap::iterator it2 = constructors().begin(); it2 != end2; ++it2)
markStack.append(it2->second);
-}
-PassRefPtr<JSEventListener> JSDOMGlobalObject::createJSAttributeEventListener(JSValue val)
-{
- if (!val.isObject())
- return 0;
-
- return JSEventListener::create(asObject(val), true, currentWorld(globalExec())).get();
+ if (d()->m_injectedScript)
+ markStack.append(d()->m_injectedScript);
}
void JSDOMGlobalObject::setCurrentEvent(Event* evt)
@@ -76,6 +73,16 @@ Event* JSDOMGlobalObject::currentEvent() const
return d()->evt;
}
+void JSDOMGlobalObject::setInjectedScript(JSObject* injectedScript)
+{
+ d()->m_injectedScript = injectedScript;
+}
+
+JSObject* JSDOMGlobalObject::injectedScript() const
+{
+ return d()->m_injectedScript;
+}
+
void JSDOMGlobalObject::destroyJSDOMGlobalObjectData(void* jsDOMGlobalObjectData)
{
delete static_cast<JSDOMGlobalObjectData*>(jsDOMGlobalObjectData);
diff --git a/WebCore/bindings/js/JSDOMGlobalObject.h b/WebCore/bindings/js/JSDOMGlobalObject.h
index 647730c..8eb55c1 100644
--- a/WebCore/bindings/js/JSDOMGlobalObject.h
+++ b/WebCore/bindings/js/JSDOMGlobalObject.h
@@ -54,26 +54,29 @@ namespace WebCore {
virtual ScriptExecutionContext* scriptExecutionContext() const = 0;
- // Creates a JS EventListener for an "onXXX" event attribute. These
- // listeners cannot be removed through the removeEventListener API.
- PassRefPtr<JSEventListener> createJSAttributeEventListener(JSC::JSValue);
-
// Make binding code generation easier.
JSDOMGlobalObject* globalObject() { return this; }
void setCurrentEvent(Event*);
Event* currentEvent() const;
+ void setInjectedScript(JSObject*);
+ JSObject* injectedScript() const;
+
virtual void markChildren(JSC::MarkStack&);
DOMWrapperWorld* world() { return d()->m_world.get(); }
+ virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
+ static const JSC::ClassInfo s_info;
+
protected:
struct JSDOMGlobalObjectData : public JSC::JSGlobalObject::JSGlobalObjectData {
JSDOMGlobalObjectData(DOMWrapperWorld* world, Destructor destructor = destroyJSDOMGlobalObjectData)
: JSGlobalObjectData(destructor)
, evt(0)
, m_world(world)
+ , m_injectedScript(0)
{
}
@@ -82,6 +85,7 @@ namespace WebCore {
Event* evt;
RefPtr<DOMWrapperWorld> m_world;
+ JSObject* m_injectedScript;
};
private:
diff --git a/WebCore/bindings/js/JSDOMWindowBase.cpp b/WebCore/bindings/js/JSDOMWindowBase.cpp
index e3af13f..4338cdd 100644
--- a/WebCore/bindings/js/JSDOMWindowBase.cpp
+++ b/WebCore/bindings/js/JSDOMWindowBase.cpp
@@ -24,6 +24,7 @@
#include "JSDOMWindowBase.h"
#include "CString.h"
+#include "Chrome.h"
#include "Console.h"
#include "DOMWindow.h"
#include "Frame.h"
@@ -40,7 +41,7 @@ using namespace JSC;
namespace WebCore {
-const ClassInfo JSDOMWindowBase::s_info = { "Window", 0, 0, 0 };
+const ClassInfo JSDOMWindowBase::s_info = { "Window", &JSDOMGlobalObject::s_info, 0, 0 };
JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData(PassRefPtr<DOMWindow> window, JSDOMWindowShell* shell)
: JSDOMGlobalObjectData(shell->world(), destroyJSDOMWindowBaseData)
@@ -75,7 +76,7 @@ ScriptExecutionContext* JSDOMWindowBase::scriptExecutionContext() const
String JSDOMWindowBase::crossDomainAccessErrorMessage(const JSGlobalObject* other) const
{
KURL originURL = asJSDOMWindow(other)->impl()->url();
- KURL targetURL = impl()->frame()->document()->url();
+ KURL targetURL = d()->shell->window()->impl()->url();
if (originURL.isNull() || targetURL.isNull())
return String();
@@ -170,7 +171,7 @@ void JSDOMWindowBase::destroyJSDOMWindowBaseData(void* jsDOMWindowBaseData)
delete static_cast<JSDOMWindowBaseData*>(jsDOMWindowBaseData);
}
-// JSDOMGlobalObject* is ignored, accesing a window in any context will
+// JSDOMGlobalObject* is ignored, accessing a window in any context will
// use that DOMWindow's prototype chain.
JSValue toJS(ExecState* exec, JSDOMGlobalObject*, DOMWindow* domWindow)
{
diff --git a/WebCore/bindings/js/JSDOMWindowBase.h b/WebCore/bindings/js/JSDOMWindowBase.h
index 66af344..2726996 100644
--- a/WebCore/bindings/js/JSDOMWindowBase.h
+++ b/WebCore/bindings/js/JSDOMWindowBase.h
@@ -92,7 +92,7 @@ namespace WebCore {
};
// Returns a JSDOMWindow or jsNull()
- // JSDOMGlobalObject* is ignored, accesing a window in any context will
+ // JSDOMGlobalObject* is ignored, accessing a window in any context will
// use that DOMWindow's prototype chain.
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DOMWindow*);
JSC::JSValue toJS(JSC::ExecState*, DOMWindow*);
diff --git a/WebCore/bindings/js/JSDOMWindowCustom.cpp b/WebCore/bindings/js/JSDOMWindowCustom.cpp
index 66fe926..1da5af2 100644
--- a/WebCore/bindings/js/JSDOMWindowCustom.cpp
+++ b/WebCore/bindings/js/JSDOMWindowCustom.cpp
@@ -22,6 +22,7 @@
#include "AtomicString.h"
#include "Base64.h"
+#include "Chrome.h"
#include "DOMWindow.h"
#include "Document.h"
#include "ExceptionCode.h"
@@ -112,6 +113,7 @@ void JSDOMWindow::markChildren(MarkStack& markStack)
markDOMObjectWrapper(markStack, globalData, impl()->optionalStatusbar());
markDOMObjectWrapper(markStack, globalData, impl()->optionalToolbar());
markDOMObjectWrapper(markStack, globalData, impl()->optionalLocation());
+ markDOMObjectWrapper(markStack, globalData, impl()->optionalMedia());
#if ENABLE(DOM_STORAGE)
markDOMObjectWrapper(markStack, globalData, impl()->optionalSessionStorage());
markDOMObjectWrapper(markStack, globalData, impl()->optionalLocalStorage());
@@ -265,7 +267,7 @@ bool JSDOMWindow::getOwnPropertySlot(ExecState* exec, const Identifier& property
}
}
- // FIXME: Search the whole frame hierachy somewhere around here.
+ // FIXME: Search the whole frame hierarchy somewhere around here.
// We need to test the correct priority order.
// allow window[1] or parent[1] etc. (#56983)
@@ -323,22 +325,6 @@ bool JSDOMWindow::getOwnPropertyDescriptor(ExecState* exec, const Identifier& pr
return true;
}
- // We need this code here because otherwise JSDOMWindowBase will stop the search before we even get to the
- // prototype due to the blanket same origin (allowsAccessFrom) check at the end of getOwnPropertySlot.
- // Also, it's important to get the implementation straight out of the DOMWindow prototype regardless of
- // what prototype is actually set on this object.
- entry = JSDOMWindowPrototype::s_info.propHashTable(exec)->entry(exec, propertyName);
- if (entry) {
- if (entry->attributes() & Function) {
- if (entry->function() == jsDOMWindowPrototypeFunctionShowModalDialog) {
- if (!DOMWindow::canShowModalDialog(impl()->frame())) {
- descriptor.setUndefined();
- return true;
- }
- }
- }
- }
-
entry = JSDOMWindow::s_info.propHashTable(exec)->entry(exec, propertyName);
if (entry) {
PropertySlot slot;
@@ -359,14 +345,6 @@ bool JSDOMWindow::getOwnPropertyDescriptor(ExecState* exec, const Identifier& pr
return true;
}
- // Do prototype lookup early so that functions and attributes in the prototype can have
- // precedence over the index and name getters.
- JSValue proto = prototype();
- if (proto.isObject()) {
- if (asObject(proto)->getPropertyDescriptor(exec, propertyName, descriptor))
- return true;
- }
-
bool ok;
unsigned i = propertyName.toArrayIndex(&ok);
if (ok && i < impl()->frame()->tree()->childCount()) {
@@ -418,20 +396,20 @@ bool JSDOMWindow::deleteProperty(ExecState* exec, const Identifier& propertyName
return Base::deleteProperty(exec, propertyName);
}
-void JSDOMWindow::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void JSDOMWindow::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
// Only allow the window to enumerated by frames in the same origin.
if (!allowsAccessFrom(exec))
return;
- Base::getPropertyNames(exec, propertyNames);
+ Base::getPropertyNames(exec, propertyNames, mode);
}
-void JSDOMWindow::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void JSDOMWindow::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
// Only allow the window to enumerated by frames in the same origin.
if (!allowsAccessFrom(exec))
return;
- Base::getOwnPropertyNames(exec, propertyNames);
+ Base::getOwnPropertyNames(exec, propertyNames, mode);
}
void JSDOMWindow::defineGetter(ExecState* exec, const Identifier& propertyName, JSObject* getterFunction, unsigned attributes)
@@ -928,7 +906,12 @@ JSValue JSDOMWindow::setTimeout(ExecState* exec, const ArgList& args)
if (exec->hadException())
return jsUndefined();
int delay = args.at(1).toInt32(exec);
- return jsNumber(exec, impl()->setTimeout(action, delay));
+
+ ExceptionCode ec = 0;
+ int result = impl()->setTimeout(action, delay, ec);
+ setDOMException(exec, ec);
+
+ return jsNumber(exec, result);
}
JSValue JSDOMWindow::setInterval(ExecState* exec, const ArgList& args)
@@ -937,7 +920,12 @@ JSValue JSDOMWindow::setInterval(ExecState* exec, const ArgList& args)
if (exec->hadException())
return jsUndefined();
int delay = args.at(1).toInt32(exec);
- return jsNumber(exec, impl()->setInterval(action, delay));
+
+ ExceptionCode ec = 0;
+ int result = impl()->setInterval(action, delay, ec);
+ setDOMException(exec, ec);
+
+ return jsNumber(exec, result);
}
JSValue JSDOMWindow::atob(ExecState* exec, const ArgList& args)
diff --git a/WebCore/bindings/js/JSDOMWindowShell.cpp b/WebCore/bindings/js/JSDOMWindowShell.cpp
index 09141ee..1e82a49 100644
--- a/WebCore/bindings/js/JSDOMWindowShell.cpp
+++ b/WebCore/bindings/js/JSDOMWindowShell.cpp
@@ -114,14 +114,14 @@ bool JSDOMWindowShell::deleteProperty(ExecState* exec, const Identifier& propert
return m_window->deleteProperty(exec, propertyName);
}
-void JSDOMWindowShell::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void JSDOMWindowShell::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
- m_window->getPropertyNames(exec, propertyNames);
+ m_window->getPropertyNames(exec, propertyNames, mode);
}
-void JSDOMWindowShell::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void JSDOMWindowShell::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
- m_window->getOwnPropertyNames(exec, propertyNames);
+ m_window->getOwnPropertyNames(exec, propertyNames, mode);
}
void JSDOMWindowShell::defineGetter(ExecState* exec, const Identifier& propertyName, JSObject* getterFunction, unsigned attributes)
diff --git a/WebCore/bindings/js/JSDOMWindowShell.h b/WebCore/bindings/js/JSDOMWindowShell.h
index 27036d4..1b986b8 100644
--- a/WebCore/bindings/js/JSDOMWindowShell.h
+++ b/WebCore/bindings/js/JSDOMWindowShell.h
@@ -60,7 +60,7 @@ namespace WebCore {
static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
{
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags));
+ return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
}
DOMWrapperWorld* world() { return m_world.get(); }
@@ -75,8 +75,8 @@ namespace WebCore {
virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
virtual void putWithAttributes(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, unsigned attributes);
virtual bool deleteProperty(JSC::ExecState*, const JSC::Identifier& propertyName);
- virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&);
- virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&);
+ virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties);
+ virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties);
virtual void defineGetter(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSObject* getterFunction, unsigned attributes);
virtual void defineSetter(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSObject* setterFunction, unsigned attributes);
virtual bool defineOwnProperty(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&, bool shouldThrow);
diff --git a/WebCore/bindings/js/JSDocumentCustom.cpp b/WebCore/bindings/js/JSDocumentCustom.cpp
index 4aa6583..9366399 100644
--- a/WebCore/bindings/js/JSDocumentCustom.cpp
+++ b/WebCore/bindings/js/JSDocumentCustom.cpp
@@ -96,18 +96,18 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, Document* documen
if (!document)
return jsNull();
- DOMObject* wrapper = getCachedDOMObjectWrapper(exec, document);
+ DOMObject* wrapper = getCachedDOMNodeWrapper(exec, document, document);
if (wrapper)
return wrapper;
if (document->isHTMLDocument())
- wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, HTMLDocument, document);
+ wrapper = CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLDocument, document);
#if ENABLE(SVG)
else if (document->isSVGDocument())
- wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, SVGDocument, document);
+ wrapper = CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGDocument, document);
#endif
else
- wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, Document, document);
+ wrapper = CREATE_DOM_NODE_WRAPPER(exec, globalObject, Document, document);
// Make sure the document is kept around by the window object, and works right with the
// back/forward cache.
diff --git a/WebCore/bindings/js/JSEventListener.cpp b/WebCore/bindings/js/JSEventListener.cpp
index 73060f1..d3b5fe1 100644
--- a/WebCore/bindings/js/JSEventListener.cpp
+++ b/WebCore/bindings/js/JSEventListener.cpp
@@ -81,7 +81,7 @@ void JSEventListener::handleEvent(ScriptExecutionContext* scriptExecutionContext
return;
// FIXME: Is this check needed for other contexts?
ScriptController* script = frame->script();
- if (!script->isEnabled() || script->isPaused())
+ if (!script->canExecuteScripts() || script->isPaused())
return;
}
diff --git a/WebCore/bindings/js/JSEventListener.h b/WebCore/bindings/js/JSEventListener.h
index bf3af48..9ba09c6 100644
--- a/WebCore/bindings/js/JSEventListener.h
+++ b/WebCore/bindings/js/JSEventListener.h
@@ -66,6 +66,16 @@ namespace WebCore {
RefPtr<DOMWrapperWorld> m_isolatedWorld;
};
+ // Creates a JS EventListener for an "onXXX" event attribute.
+ inline PassRefPtr<JSEventListener> createJSAttributeEventListener(JSC::ExecState* exec, JSC::JSValue listener)
+ {
+ if (!listener.isObject())
+ return 0;
+
+ return JSEventListener::create(asObject(listener), true, currentWorld(exec));
+ }
+
+
} // namespace WebCore
#endif // JSEventListener_h
diff --git a/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp b/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp
index 751e7de..80634f7 100644
--- a/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp
+++ b/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp
@@ -26,10 +26,12 @@
#include "config.h"
#include "JSHTMLCanvasElement.h"
+#include "CanvasContextAttributes.h"
#include "HTMLCanvasElement.h"
#include "JSCanvasRenderingContext2D.h"
#if ENABLE(3D_CANVAS)
#include "JSWebGLRenderingContext.h"
+#include "WebGLContextAttributes.h"
#endif
#include <wtf/GetPtr.h>
@@ -47,4 +49,36 @@ void JSHTMLCanvasElement::markChildren(MarkStack& markStack)
markDOMObjectWrapper(markStack, globalData, canvas->renderingContext());
}
+JSValue JSHTMLCanvasElement::getContext(ExecState* exec, const ArgList& args)
+{
+ HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(impl());
+ const UString& contextId = args.at(0).toString(exec);
+ RefPtr<CanvasContextAttributes> attrs;
+#if ENABLE(3D_CANVAS)
+ if (contextId == "experimental-webgl" || contextId == "webkit-3d") {
+ attrs = WebGLContextAttributes::create();
+ WebGLContextAttributes* webGLAttrs = static_cast<WebGLContextAttributes*>(attrs.get());
+ if (args.size() > 1 && args.at(1).isObject()) {
+ JSObject* jsAttrs = args.at(1).getObject();
+ Identifier alpha(exec, "alpha");
+ if (jsAttrs->hasProperty(exec, alpha))
+ webGLAttrs->setAlpha(jsAttrs->get(exec, alpha).toBoolean(exec));
+ Identifier depth(exec, "depth");
+ if (jsAttrs->hasProperty(exec, depth))
+ webGLAttrs->setDepth(jsAttrs->get(exec, depth).toBoolean(exec));
+ Identifier stencil(exec, "stencil");
+ if (jsAttrs->hasProperty(exec, stencil))
+ webGLAttrs->setStencil(jsAttrs->get(exec, stencil).toBoolean(exec));
+ Identifier antialias(exec, "antialias");
+ if (jsAttrs->hasProperty(exec, antialias))
+ webGLAttrs->setAntialias(jsAttrs->get(exec, antialias).toBoolean(exec));
+ Identifier premultipliedAlpha(exec, "premultipliedAlpha");
+ if (jsAttrs->hasProperty(exec, premultipliedAlpha))
+ webGLAttrs->setPremultipliedAlpha(jsAttrs->get(exec, premultipliedAlpha).toBoolean(exec));
+ }
+ }
+#endif
+ return toJS(exec, globalObject(), WTF::getPtr(canvas->getContext(contextId, attrs.get())));
+}
+
} // namespace WebCore
diff --git a/WebCore/bindings/js/JSHTMLFormElementCustom.cpp b/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
index de9ec4a..c364c14 100644
--- a/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
+++ b/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
@@ -66,7 +66,7 @@ JSValue JSHTMLFormElement::submit(ExecState* exec, const ArgList&)
Frame* activeFrame = asJSDOMWindow(exec->dynamicGlobalObject())->impl()->frame();
if (!activeFrame)
return jsUndefined();
- static_cast<HTMLFormElement*>(impl())->submit(0, false, !activeFrame->script()->anyPageIsProcessingUserGesture());
+ static_cast<HTMLFormElement*>(impl())->submit(activeFrame);
return jsUndefined();
}
diff --git a/WebCore/bindings/js/JSHistoryCustom.cpp b/WebCore/bindings/js/JSHistoryCustom.cpp
index 3076503..fff747f 100644
--- a/WebCore/bindings/js/JSHistoryCustom.cpp
+++ b/WebCore/bindings/js/JSHistoryCustom.cpp
@@ -154,12 +154,12 @@ bool JSHistory::deleteProperty(ExecState* exec, const Identifier& propertyName)
return Base::deleteProperty(exec, propertyName);
}
-void JSHistory::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void JSHistory::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
// Only allow the history object to enumerated by frames in the same origin.
if (!allowsAccessFromFrame(exec, impl()->frame()))
return;
- Base::getOwnPropertyNames(exec, propertyNames);
+ Base::getOwnPropertyNames(exec, propertyNames, mode);
}
JSValue JSHistory::pushState(ExecState* exec, const ArgList& args)
diff --git a/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp b/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp
index fcc9e5e..d38d8ee 100644
--- a/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp
+++ b/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp
@@ -47,8 +47,6 @@
#include "InspectorController.h"
#include "InspectorResource.h"
#include "JSDOMWindow.h"
-#include "JSInspectedObjectWrapper.h"
-#include "JSInspectorCallbackWrapper.h"
#include "JSNode.h"
#include "JSRange.h"
#include "Node.h"
@@ -59,6 +57,7 @@
#endif
#include "TextIterator.h"
#include "VisiblePosition.h"
+#include <parser/SourceCode.h>
#include <runtime/JSArray.h>
#include <runtime/JSLock.h>
#include <wtf/Vector.h>
@@ -73,6 +72,31 @@ using namespace JSC;
namespace WebCore {
+static ScriptObject createInjectedScript(const String& source, InjectedScriptHost* injectedScriptHost, ScriptState* scriptState, long id)
+{
+ SourceCode sourceCode = makeSource(source);
+ JSLock lock(SilenceAssertionsOnly);
+ JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(scriptState->lexicalGlobalObject());
+ JSValue globalThisValue = scriptState->globalThisValue();
+ Completion comp = JSC::evaluate(scriptState, globalObject->globalScopeChain(), sourceCode, globalThisValue);
+ if (comp.complType() != JSC::Normal && comp.complType() != JSC::ReturnValue)
+ return ScriptObject();
+ JSValue functionValue = comp.value();
+ CallData callData;
+ CallType callType = functionValue.getCallData(callData);
+ if (callType == CallTypeNone)
+ return ScriptObject();
+
+ MarkedArgumentBuffer args;
+ args.append(toJS(scriptState, globalObject, injectedScriptHost));
+ args.append(globalThisValue);
+ args.append(jsNumber(scriptState, id));
+ JSValue result = JSC::call(scriptState, functionValue, callType, callData, globalThisValue, args);
+ if (result.isObject())
+ return ScriptObject(scriptState, result.getObject());
+ return ScriptObject();
+}
+
#if ENABLE(DATABASE)
JSValue JSInjectedScriptHost::databaseForId(ExecState* exec, const ArgList& args)
{
@@ -86,29 +110,10 @@ JSValue JSInjectedScriptHost::databaseForId(ExecState* exec, const ArgList& args
Database* database = impl()->databaseForId(args.at(0).toInt32(exec));
if (!database)
return jsUndefined();
- // Could use currentWorld(exec) ... but which exec! The following mixed use of exec & inspectedWindow->globalExec() scares me!
- JSDOMWindow* inspectedWindow = toJSDOMWindow(ic->inspectedPage()->mainFrame(), debuggerWorld());
- return JSInspectedObjectWrapper::wrap(inspectedWindow->globalExec(), toJS(exec, database));
+ return toJS(exec, database);
}
#endif
-JSValue JSInjectedScriptHost::inspectedWindow(ExecState*, const ArgList&)
-{
- InspectorController* ic = impl()->inspectorController();
- if (!ic)
- return jsUndefined();
- JSDOMWindow* inspectedWindow = toJSDOMWindow(ic->inspectedPage()->mainFrame(), debuggerWorld());
- return JSInspectedObjectWrapper::wrap(inspectedWindow->globalExec(), inspectedWindow);
-}
-
-JSValue JSInjectedScriptHost::wrapCallback(ExecState* exec, const ArgList& args)
-{
- if (args.size() < 1)
- return jsUndefined();
-
- return JSInspectorCallbackWrapper::wrap(exec, args.at(0));
-}
-
#if ENABLE(JAVASCRIPT_DEBUGGER)
JSValue JSInjectedScriptHost::currentCallFrame(ExecState* exec, const ArgList&)
@@ -117,11 +122,14 @@ JSValue JSInjectedScriptHost::currentCallFrame(ExecState* exec, const ArgList&)
if (!callFrame || !callFrame->isValid())
return jsUndefined();
- // FIXME: I am not sure if this is actually needed. Can we just use exec?
- ExecState* globalExec = callFrame->scopeChain()->globalObject->globalExec();
-
JSLock lock(SilenceAssertionsOnly);
- return JSInspectedObjectWrapper::wrap(globalExec, toJS(exec, callFrame));
+ return toJS(exec, callFrame);
+}
+
+JSValue JSInjectedScriptHost::isActivation(ExecState*, const ArgList& args)
+{
+ JSObject* object = args.at(0).getObject();
+ return jsBoolean(object && object->isActivationObject());
}
#endif
@@ -140,41 +148,21 @@ JSValue JSInjectedScriptHost::nodeForId(ExecState* exec, const ArgList& args)
return jsUndefined();
JSLock lock(SilenceAssertionsOnly);
- JSDOMWindow* inspectedWindow = toJSDOMWindow(ic->inspectedPage()->mainFrame(), debuggerWorld());
- return JSInspectedObjectWrapper::wrap(inspectedWindow->globalExec(), toJS(exec, deprecatedGlobalObjectForPrototype(inspectedWindow->globalExec()), node));
-}
-
-JSValue JSInjectedScriptHost::wrapObject(ExecState* exec, const ArgList& args)
-{
- if (args.size() < 2)
- return jsUndefined();
-
- return impl()->wrapObject(ScriptValue(args.at(0)), args.at(1).toString(exec)).jsValue();
-}
-
-JSValue JSInjectedScriptHost::unwrapObject(ExecState* exec, const ArgList& args)
-{
- if (args.size() < 1)
- return jsUndefined();
-
- return impl()->unwrapObject(args.at(0).toString(exec)).jsValue();
+ return toJS(exec, node);
}
JSValue JSInjectedScriptHost::pushNodePathToFrontend(ExecState* exec, const ArgList& args)
{
- if (args.size() < 2)
+ if (args.size() < 3)
return jsUndefined();
- JSQuarantinedObjectWrapper* wrapper = JSQuarantinedObjectWrapper::asWrapper(args.at(0));
- if (!wrapper)
- return jsUndefined();
-
- Node* node = toNode(wrapper->unwrappedObject());
+ Node* node = toNode(args.at(0));
if (!node)
return jsUndefined();
- bool selectInUI = args.at(1).toBoolean(exec);
- return jsNumber(exec, impl()->pushNodePathToFrontend(node, selectInUI));
+ bool withChildren = args.at(1).toBoolean(exec);
+ bool selectInUI = args.at(2).toBoolean(exec);
+ return jsNumber(exec, impl()->pushNodePathToFrontend(node, withChildren, selectInUI));
}
#if ENABLE(DATABASE)
@@ -183,11 +171,7 @@ JSValue JSInjectedScriptHost::selectDatabase(ExecState*, const ArgList& args)
if (args.size() < 1)
return jsUndefined();
- JSQuarantinedObjectWrapper* wrapper = JSQuarantinedObjectWrapper::asWrapper(args.at(0));
- if (!wrapper)
- return jsUndefined();
-
- Database* database = toDatabase(wrapper->unwrappedObject());
+ Database* database = toDatabase(args.at(0));
if (database)
impl()->selectDatabase(database);
return jsUndefined();
@@ -203,17 +187,29 @@ JSValue JSInjectedScriptHost::selectDOMStorage(ExecState*, const ArgList& args)
if (!ic)
return jsUndefined();
- JSQuarantinedObjectWrapper* wrapper = JSQuarantinedObjectWrapper::asWrapper(args.at(0));
- if (!wrapper)
- return jsUndefined();
-
- Storage* storage = toStorage(wrapper->unwrappedObject());
+ Storage* storage = toStorage(args.at(0));
if (storage)
impl()->selectDOMStorage(storage);
return jsUndefined();
}
#endif
+ScriptObject InjectedScriptHost::injectedScriptFor(ScriptState* scriptState)
+{
+ JSLock lock(SilenceAssertionsOnly);
+ JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(scriptState->lexicalGlobalObject());
+ JSObject* injectedScript = globalObject->injectedScript();
+ if (injectedScript)
+ return ScriptObject(scriptState, injectedScript);
+
+ ASSERT(!m_injectedScriptSource.isEmpty());
+ ScriptObject injectedScriptObject = createInjectedScript(m_injectedScriptSource, this, scriptState, m_nextInjectedScriptId);
+ globalObject->setInjectedScript(injectedScriptObject.jsObject());
+ m_idToInjectedScript.set(m_nextInjectedScriptId, injectedScriptObject);
+ m_nextInjectedScriptId++;
+ return injectedScriptObject;
+}
+
} // namespace WebCore
#endif // ENABLE(INSPECTOR)
diff --git a/WebCore/bindings/js/JSInspectedObjectWrapper.cpp b/WebCore/bindings/js/JSInspectedObjectWrapper.cpp
deleted file mode 100644
index 13f59b7..0000000
--- a/WebCore/bindings/js/JSInspectedObjectWrapper.cpp
+++ /dev/null
@@ -1,132 +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 "JSInspectedObjectWrapper.h"
-
-#if ENABLE(INSPECTOR)
-
-#include "JSInspectorCallbackWrapper.h"
-#include <runtime/JSGlobalObject.h>
-#include <wtf/StdLibExtras.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-ASSERT_CLASS_FITS_IN_CELL(JSInspectedObjectWrapper);
-
-typedef HashMap<JSObject*, JSInspectedObjectWrapper*> WrapperMap;
-typedef HashMap<JSGlobalObject*, WrapperMap*> GlobalObjectWrapperMap;
-
-static GlobalObjectWrapperMap& wrappers()
-{
- DEFINE_STATIC_LOCAL(GlobalObjectWrapperMap, map, ());
- return map;
-}
-
-const ClassInfo JSInspectedObjectWrapper::s_info = { "JSInspectedObjectWrapper", &JSQuarantinedObjectWrapper::s_info, 0, 0 };
-
-JSValue JSInspectedObjectWrapper::wrap(ExecState* unwrappedExec, JSValue unwrappedValue)
-{
- if (!unwrappedValue.isObject())
- return unwrappedValue;
-
- JSObject* unwrappedObject = asObject(unwrappedValue);
-
- if (unwrappedObject->inherits(&JSInspectedObjectWrapper::s_info))
- return unwrappedObject;
-
- if (WrapperMap* wrapperMap = wrappers().get(unwrappedExec->lexicalGlobalObject()))
- if (JSInspectedObjectWrapper* wrapper = wrapperMap->get(unwrappedObject))
- return wrapper;
-
- JSValue prototype = unwrappedObject->prototype();
- ASSERT(prototype.isNull() || prototype.isObject());
-
- if (prototype.isNull())
- return new (unwrappedExec) JSInspectedObjectWrapper(unwrappedExec, unwrappedObject, JSQuarantinedObjectWrapper::createStructure(jsNull()));
- ProtectedJSValue wrappedProto = wrap(unwrappedExec, prototype);
- return new (unwrappedExec) JSInspectedObjectWrapper(unwrappedExec, unwrappedObject, JSQuarantinedObjectWrapper::createStructure(asObject(wrappedProto)));
-}
-
-JSInspectedObjectWrapper::JSInspectedObjectWrapper(ExecState* unwrappedExec, JSObject* unwrappedObject, NonNullPassRefPtr<Structure> structure)
- : JSQuarantinedObjectWrapper(unwrappedExec, unwrappedObject, structure)
-{
- WrapperMap* wrapperMap = wrappers().get(unwrappedGlobalObject());
- if (!wrapperMap) {
- wrapperMap = new WrapperMap;
- wrappers().set(unwrappedGlobalObject(), wrapperMap);
- }
-
- ASSERT(!wrapperMap->contains(unwrappedObject));
- wrapperMap->set(unwrappedObject, this);
-}
-
-JSInspectedObjectWrapper::~JSInspectedObjectWrapper()
-{
- ASSERT(wrappers().contains(unwrappedGlobalObject()));
- WrapperMap* wrapperMap = wrappers().get(unwrappedGlobalObject());
-
- ASSERT(wrapperMap->contains(unwrappedObject()));
- wrapperMap->remove(unwrappedObject());
-
- if (wrapperMap->isEmpty()) {
- wrappers().remove(unwrappedGlobalObject());
- delete wrapperMap;
- }
-}
-
-JSValue JSInspectedObjectWrapper::prepareIncomingValue(ExecState*, JSValue value) const
-{
- // The Inspector is only allowed to pass primitive values and wrapped objects to objects from the inspected page.
-
- if (!value.isObject())
- return value;
-
- JSQuarantinedObjectWrapper* wrapper = asWrapper(value);
- ASSERT_WITH_MESSAGE(wrapper, "Objects passed to JSInspectedObjectWrapper must be wrapped");
- if (!wrapper)
- return jsUndefined();
-
- if (wrapper->allowsUnwrappedAccessFrom(unwrappedExecState())) {
- ASSERT_WITH_MESSAGE(wrapper->inherits(&s_info), "A wrapper contains an object from the inspected page but is not a JSInspectedObjectWrapper");
- if (!wrapper->inherits(&s_info))
- return jsUndefined();
-
- // Return the unwrapped object so the inspected page never sees one of its own objects in wrapped form.
- return wrapper->unwrappedObject();
- }
-
- ASSERT_WITH_MESSAGE(wrapper->inherits(&JSInspectorCallbackWrapper::s_info), "A wrapper that was not from the inspected page and is not an Inspector callback was passed to a JSInspectedObjectWrapper");
- if (!wrapper->inherits(&JSInspectorCallbackWrapper::s_info))
- return jsUndefined();
-
- return wrapper;
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INSPECTOR)
diff --git a/WebCore/bindings/js/JSInspectedObjectWrapper.h b/WebCore/bindings/js/JSInspectedObjectWrapper.h
deleted file mode 100644
index ad97035..0000000
--- a/WebCore/bindings/js/JSInspectedObjectWrapper.h
+++ /dev/null
@@ -1,59 +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.
- */
-
-#ifndef JSInspectedObjectWrapper_h
-#define JSInspectedObjectWrapper_h
-
-#include "JSQuarantinedObjectWrapper.h"
-
-namespace WebCore {
-
- class JSInspectedObjectWrapper : public JSQuarantinedObjectWrapper {
- public:
- static JSC::JSValue wrap(JSC::ExecState* unwrappedExec, JSC::JSValue unwrappedValue);
- virtual ~JSInspectedObjectWrapper();
-
- static const JSC::ClassInfo s_info;
-
- private:
- JSInspectedObjectWrapper(JSC::ExecState* unwrappedExec, JSC::JSObject* unwrappedObject, NonNullPassRefPtr<JSC::Structure>);
-
- virtual bool allowsGetProperty() const { return true; }
- virtual bool allowsSetProperty() const { return true; }
- virtual bool allowsDeleteProperty() const { return true; }
- virtual bool allowsConstruct() const { return true; }
- virtual bool allowsHasInstance() const { return true; }
- virtual bool allowsCallAsFunction() const { return true; }
- virtual bool allowsGetPropertyNames() const { return true; }
-
- virtual JSC::JSValue prepareIncomingValue(JSC::ExecState* unwrappedExec, JSC::JSValue unwrappedValue) const;
- virtual JSC::JSValue wrapOutgoingValue(JSC::ExecState* unwrappedExec, JSC::JSValue unwrappedValue) const { return wrap(unwrappedExec, unwrappedValue); }
-
- virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
- };
-
-} // namespace WebCore
-
-#endif // JSInspectedObjectWrapper_h
diff --git a/WebCore/bindings/js/JSInspectorCallbackWrapper.cpp b/WebCore/bindings/js/JSInspectorCallbackWrapper.cpp
deleted file mode 100644
index ff4fbb9..0000000
--- a/WebCore/bindings/js/JSInspectorCallbackWrapper.cpp
+++ /dev/null
@@ -1,112 +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 "JSInspectorCallbackWrapper.h"
-
-#if ENABLE(INSPECTOR)
-
-#include "JSInspectedObjectWrapper.h"
-#include <wtf/StdLibExtras.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-ASSERT_CLASS_FITS_IN_CELL(JSInspectorCallbackWrapper);
-
-typedef HashMap<JSObject*, JSInspectorCallbackWrapper*> WrapperMap;
-
-static WrapperMap& wrappers()
-{
- DEFINE_STATIC_LOCAL(WrapperMap, map, ());
- return map;
-}
-
-const ClassInfo JSInspectorCallbackWrapper::s_info = { "JSInspectorCallbackWrapper", &JSQuarantinedObjectWrapper::s_info, 0, 0 };
-
-static Structure* leakInspectorCallbackWrapperStructure()
-{
- Structure::startIgnoringLeaks();
- Structure* structure = JSInspectorCallbackWrapper::createStructure(jsNull()).releaseRef();
- Structure::stopIgnoringLeaks();
- return structure;
-}
-
-JSValue JSInspectorCallbackWrapper::wrap(ExecState* unwrappedExec, JSValue unwrappedValue)
-{
- if (!unwrappedValue.isObject())
- return unwrappedValue;
-
- JSObject* unwrappedObject = asObject(unwrappedValue);
-
- if (unwrappedObject->inherits(&JSInspectorCallbackWrapper::s_info))
- return unwrappedObject;
-
- if (JSInspectorCallbackWrapper* wrapper = wrappers().get(unwrappedObject))
- return wrapper;
-
- JSValue prototype = unwrappedObject->prototype();
- ASSERT(prototype.isNull() || prototype.isObject());
-
- if (prototype.isNull()) {
- static Structure* structure = leakInspectorCallbackWrapperStructure();
- return new (unwrappedExec) JSInspectorCallbackWrapper(unwrappedExec, unwrappedObject, structure);
- }
- ProtectedJSValue wrappedProto = wrap(unwrappedExec, prototype);
- return new (unwrappedExec) JSInspectorCallbackWrapper(unwrappedExec, unwrappedObject, createStructure(wrappedProto.get()));
-}
-
-JSInspectorCallbackWrapper::JSInspectorCallbackWrapper(ExecState* unwrappedExec, JSObject* unwrappedObject, NonNullPassRefPtr<Structure> structure)
- : JSQuarantinedObjectWrapper(unwrappedExec, unwrappedObject, structure)
-{
- ASSERT(!wrappers().contains(unwrappedObject));
- wrappers().set(unwrappedObject, this);
-}
-
-JSInspectorCallbackWrapper::~JSInspectorCallbackWrapper()
-{
- wrappers().remove(unwrappedObject());
-}
-
-JSValue JSInspectorCallbackWrapper::prepareIncomingValue(ExecState* unwrappedExec, JSValue unwrappedValue) const
-{
- if (JSQuarantinedObjectWrapper* wrapper = asWrapper(unwrappedValue)) {
- // The only time a wrapper should be passed into a JSInspectorCallbackWrapper is when a client-side storage callback
- // is called. (The client-side storage API calls the callback with the `this` object set to the callback itself.)
- ASSERT_WITH_MESSAGE(wrapper == this, "A different wrapper was passed into a JSInspectorCallbackWrapper");
- if (wrapper != this)
- return jsUndefined();
-
- return wrapper->unwrappedObject();
- }
-
- // Any value being passed to the Inspector from the inspected page should be wrapped in a JSInspectedObjectWrapper.
- return JSInspectedObjectWrapper::wrap(unwrappedExec, unwrappedValue);
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INSPECTOR)
diff --git a/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp b/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp
index 1970bf7..7b06bac 100644
--- a/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp
+++ b/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp
@@ -36,18 +36,10 @@
#if ENABLE(INSPECTOR)
#include "ContextMenuItem.h"
-#include "ExceptionCode.h"
-#include "Frame.h"
#include "InspectorController.h"
#include "InspectorFrontendHost.h"
#include "JSEvent.h"
-#include "JSNode.h"
-#include "JSRange.h"
#include "MouseEvent.h"
-#include "Node.h"
-#include "Page.h"
-#include "TextIterator.h"
-#include "VisiblePosition.h"
#include <runtime/JSArray.h>
#include <runtime/JSLock.h>
#include <runtime/JSObject.h>
@@ -57,42 +49,6 @@ using namespace JSC;
namespace WebCore {
-JSValue JSInspectorFrontendHost::search(ExecState* exec, const ArgList& args)
-{
- if (args.size() < 2)
- return jsUndefined();
-
- Node* node = toNode(args.at(0));
- if (!node)
- return jsUndefined();
-
- String target = args.at(1).toString(exec);
- if (exec->hadException())
- return jsUndefined();
-
- MarkedArgumentBuffer result;
- RefPtr<Range> searchRange(rangeOfContents(node));
-
- ExceptionCode ec = 0;
- do {
- RefPtr<Range> resultRange(findPlainText(searchRange.get(), target, true, false));
- if (resultRange->collapsed(ec))
- break;
-
- // A non-collapsed result range can in some funky whitespace cases still not
- // advance the range's start position (4509328). Break to avoid infinite loop.
- VisiblePosition newStart = endVisiblePosition(resultRange.get(), DOWNSTREAM);
- if (newStart == startVisiblePosition(searchRange.get(), DOWNSTREAM))
- break;
-
- result.append(toJS(exec, resultRange.get()));
-
- setStart(searchRange.get(), newStart);
- } while (true);
-
- return constructArray(exec, result);
-}
-
JSValue JSInspectorFrontendHost::showContextMenu(ExecState* execState, const ArgList& args)
{
if (args.size() < 2)
@@ -101,17 +57,17 @@ JSValue JSInspectorFrontendHost::showContextMenu(ExecState* execState, const Arg
Event* event = toEvent(args.at(0));
JSArray* array = asArray(args.at(1));
- Vector<ContextMenuItem> items;
+ Vector<ContextMenuItem*> items;
for (size_t i = 0; i < array->length(); ++i) {
JSObject* item = asObject(array->getIndex(i));
JSValue label = item->get(execState, Identifier(execState, "label"));
JSValue id = item->get(execState, Identifier(execState, "id"));
if (label.isUndefined() || id.isUndefined())
- items.append(ContextMenuItem(SeparatorType, ContextMenuItemTagNoAction, String()));
+ items.append(new ContextMenuItem(SeparatorType, ContextMenuItemTagNoAction, String()));
else {
ContextMenuAction typedId = static_cast<ContextMenuAction>(ContextMenuItemBaseCustomTag + id.toInt32(execState));
- items.append(ContextMenuItem(ActionType, typedId, label.toString(execState)));
+ items.append(new ContextMenuItem(ActionType, typedId, label.toString(execState)));
}
}
diff --git a/WebCore/bindings/js/JSJavaScriptCallFrameCustom.cpp b/WebCore/bindings/js/JSJavaScriptCallFrameCustom.cpp
index 08ecf2b..afbdf5d 100644
--- a/WebCore/bindings/js/JSJavaScriptCallFrameCustom.cpp
+++ b/WebCore/bindings/js/JSJavaScriptCallFrameCustom.cpp
@@ -55,9 +55,9 @@ JSValue JSJavaScriptCallFrame::type(ExecState* exec) const
{
switch (impl()->type()) {
case DebuggerCallFrame::FunctionType:
- return jsString(exec, "function");
+ return jsString(exec, UString("function"));
case DebuggerCallFrame::ProgramType:
- return jsString(exec, "program");
+ return jsString(exec, UString("program"));
}
ASSERT_NOT_REACHED();
diff --git a/WebCore/bindings/js/JSLazyEventListener.cpp b/WebCore/bindings/js/JSLazyEventListener.cpp
index 6d75f4f..b707991 100644
--- a/WebCore/bindings/js/JSLazyEventListener.cpp
+++ b/WebCore/bindings/js/JSLazyEventListener.cpp
@@ -89,7 +89,7 @@ void JSLazyEventListener::parseCode(ScriptExecutionContext* executionContext) co
return;
ScriptController* scriptController = frame->script();
- if (!scriptController->isEnabled())
+ if (!scriptController->canExecuteScripts())
return;
JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(executionContext, m_isolatedWorld.get());
@@ -110,7 +110,7 @@ void JSLazyEventListener::parseCode(ScriptExecutionContext* executionContext) co
return;
// FIXME: Is this check needed for non-Document contexts?
ScriptController* script = frame->script();
- if (!script->isEnabled() || script->isPaused())
+ if (!script->canExecuteScripts() || script->isPaused())
return;
}
diff --git a/WebCore/bindings/js/JSLocationCustom.cpp b/WebCore/bindings/js/JSLocationCustom.cpp
index 6c8e032..8599242 100644
--- a/WebCore/bindings/js/JSLocationCustom.cpp
+++ b/WebCore/bindings/js/JSLocationCustom.cpp
@@ -24,6 +24,7 @@
#include "JSLocationCustom.h"
#include "DOMWindow.h"
+#include "ExceptionCode.h"
#include "Frame.h"
#include "FrameLoader.h"
#include "JSDOMBinding.h"
@@ -168,12 +169,12 @@ bool JSLocation::deleteProperty(ExecState* exec, const Identifier& propertyName)
return Base::deleteProperty(exec, propertyName);
}
-void JSLocation::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void JSLocation::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
// Only allow the location object to enumerated by frames in the same origin.
if (!allowsAccessFromFrame(exec, impl()->frame()))
return;
- Base::getOwnPropertyNames(exec, propertyNames);
+ Base::getOwnPropertyNames(exec, propertyNames, mode);
}
void JSLocation::defineGetter(ExecState* exec, const Identifier& propertyName, JSObject* getterFunction, unsigned attributes)
@@ -214,7 +215,10 @@ void JSLocation::setProtocol(ExecState* exec, JSValue value)
ASSERT(frame);
KURL url = frame->loader()->url();
- url.setProtocol(value.toString(exec));
+ if (!url.setProtocol(value.toString(exec))) {
+ setDOMException(exec, SYNTAX_ERR);
+ return;
+ }
navigateIfAllowed(exec, frame, url, !frame->script()->anyPageIsProcessingUserGesture(), false);
}
diff --git a/WebCore/bindings/js/JSNodeCustom.cpp b/WebCore/bindings/js/JSNodeCustom.cpp
index f375ae5..737430e 100644
--- a/WebCore/bindings/js/JSNodeCustom.cpp
+++ b/WebCore/bindings/js/JSNodeCustom.cpp
@@ -144,7 +144,7 @@ void JSNode::markChildren(MarkStack& markStack)
// mark any other nodes.
if (node->inDocument()) {
if (Document* doc = node->ownerDocument())
- markDOMObjectWrapper(markStack, *Heap::heap(this)->globalData(), doc);
+ markDOMNodeWrapper(markStack, doc, doc);
return;
}
@@ -154,7 +154,7 @@ void JSNode::markChildren(MarkStack& markStack)
Node* outermostNodeWithWrapper = node;
for (Node* current = m_impl.get(); current; current = current->parentNode()) {
root = current;
- if (hasCachedDOMNodeWrapper(current->document(), current))
+ if (hasCachedDOMNodeWrapperUnchecked(current->document(), current))
outermostNodeWithWrapper = current;
}
diff --git a/WebCore/bindings/js/JSPopStateEventCustom.cpp b/WebCore/bindings/js/JSPopStateEventCustom.cpp
index ee86a09..3f5fd7e 100644
--- a/WebCore/bindings/js/JSPopStateEventCustom.cpp
+++ b/WebCore/bindings/js/JSPopStateEventCustom.cpp
@@ -45,13 +45,4 @@ JSValue JSPopStateEvent::initPopStateEvent(ExecState* exec, const ArgList& args)
return jsUndefined();
}
-JSC::JSValue JSPopStateEvent::state(JSC::ExecState* exec) const
-{
- SerializedScriptValue* object = static_cast<PopStateEvent*>(impl())->state();
- if (!object)
- return JSC::jsNull();
-
- return object->deserialize(exec);
-}
-
} // namespace WebCore
diff --git a/WebCore/bindings/js/JSQuarantinedObjectWrapper.cpp b/WebCore/bindings/js/JSQuarantinedObjectWrapper.cpp
deleted file mode 100644
index ea2f72f..0000000
--- a/WebCore/bindings/js/JSQuarantinedObjectWrapper.cpp
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
- * Copyright (C) 2008, 2009 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 "JSQuarantinedObjectWrapper.h"
-
-#include "JSDOMBinding.h"
-
-#include <runtime/JSGlobalObject.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-ASSERT_CLASS_FITS_IN_CELL(JSQuarantinedObjectWrapper);
-
-const ClassInfo JSQuarantinedObjectWrapper::s_info = { "JSQuarantinedObjectWrapper", 0, 0, 0 };
-
-JSQuarantinedObjectWrapper* JSQuarantinedObjectWrapper::asWrapper(JSValue value)
-{
- if (!value.isObject())
- return 0;
-
- JSObject* object = asObject(value);
-
- if (!object->inherits(&JSQuarantinedObjectWrapper::s_info))
- return 0;
-
- return static_cast<JSQuarantinedObjectWrapper*>(object);
-}
-
-JSValue JSQuarantinedObjectWrapper::cachedValueGetter(ExecState*, const Identifier&, const PropertySlot& slot)
-{
- JSValue v = slot.slotBase();
- ASSERT(v);
- return v;
-}
-
-JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper(ExecState* unwrappedExec, JSObject* unwrappedObject, NonNullPassRefPtr<Structure> structure)
- : JSObject(structure)
- , m_unwrappedGlobalObject(unwrappedExec->lexicalGlobalObject())
- , m_unwrappedObject(unwrappedObject)
-{
- ASSERT_ARG(unwrappedExec, unwrappedExec);
- ASSERT_ARG(unwrappedObject, unwrappedObject);
- ASSERT(this->structure());
-}
-
-JSQuarantinedObjectWrapper::~JSQuarantinedObjectWrapper()
-{
-}
-
-bool JSQuarantinedObjectWrapper::allowsUnwrappedAccessFrom(ExecState* exec) const
-{
- return m_unwrappedGlobalObject->profileGroup() == exec->lexicalGlobalObject()->profileGroup();
-}
-
-ExecState* JSQuarantinedObjectWrapper::unwrappedExecState() const
-{
- return m_unwrappedGlobalObject->globalExec();
-}
-
-void JSQuarantinedObjectWrapper::transferExceptionToExecState(ExecState* exec) const
-{
- ASSERT(exec != unwrappedExecState());
-
- if (!unwrappedExecState()->hadException())
- return;
-
- JSValue exception = unwrappedExecState()->exception();
- unwrappedExecState()->clearException();
- exec->setException(wrapOutgoingValue(unwrappedExecState(), exception));
-}
-
-void JSQuarantinedObjectWrapper::markChildren(MarkStack& markStack)
-{
- JSObject::markChildren(markStack);
-
- markStack.append(m_unwrappedObject);
- markStack.append(m_unwrappedGlobalObject);
-}
-
-bool JSQuarantinedObjectWrapper::getOwnPropertySlot(ExecState* exec, const Identifier& identifier, PropertySlot& slot)
-{
- if (!allowsGetProperty()) {
- slot.setUndefined();
- return true;
- }
-
- PropertySlot unwrappedSlot(m_unwrappedObject);
- bool result = m_unwrappedObject->getOwnPropertySlot(unwrappedExecState(), identifier, unwrappedSlot);
- if (result) {
- JSValue unwrappedValue = unwrappedSlot.getValue(unwrappedExecState(), identifier);
- slot.setCustom(wrapOutgoingValue(unwrappedExecState(), unwrappedValue), cachedValueGetter);
- }
-
- transferExceptionToExecState(exec);
-
- return result;
-}
-
-bool JSQuarantinedObjectWrapper::getOwnPropertySlot(ExecState* exec, unsigned identifier, PropertySlot& slot)
-{
- if (!allowsGetProperty()) {
- slot.setUndefined();
- return true;
- }
-
- PropertySlot unwrappedSlot(m_unwrappedObject);
- bool result = m_unwrappedObject->getOwnPropertySlot(unwrappedExecState(), identifier, unwrappedSlot);
- if (result) {
- JSValue unwrappedValue = unwrappedSlot.getValue(unwrappedExecState(), identifier);
- slot.setCustom(wrapOutgoingValue(unwrappedExecState(), unwrappedValue), cachedValueGetter);
- }
-
- transferExceptionToExecState(exec);
-
- return result;
-}
-
-bool JSQuarantinedObjectWrapper::getOwnPropertyDescriptor(ExecState* exec, const Identifier& identifier, PropertyDescriptor& descriptor)
-{
- if (!allowsGetProperty()) {
- descriptor.setUndefined();
- return true;
- }
-
- PropertyDescriptor unwrappedDescriptor;
- bool result = m_unwrappedObject->getOwnPropertyDescriptor(unwrappedExecState(), identifier, unwrappedDescriptor);
-
- if (unwrappedDescriptor.isAccessorDescriptor()) {
- descriptor.setAccessorDescriptor(wrapOutgoingValue(unwrappedExecState(), unwrappedDescriptor.getter()),
- wrapOutgoingValue(unwrappedExecState(), unwrappedDescriptor.setter()),
- unwrappedDescriptor.attributes());
- } else
- descriptor.setDescriptor(wrapOutgoingValue(unwrappedExecState(), unwrappedDescriptor.value()), unwrappedDescriptor.attributes());
- transferExceptionToExecState(exec);
- return result;
-}
-
-void JSQuarantinedObjectWrapper::put(ExecState* exec, const Identifier& identifier, JSValue value, PutPropertySlot& slot)
-{
- if (!allowsSetProperty())
- return;
-
- m_unwrappedObject->put(unwrappedExecState(), identifier, prepareIncomingValue(exec, value), slot);
-
- transferExceptionToExecState(exec);
-}
-
-void JSQuarantinedObjectWrapper::put(ExecState* exec, unsigned identifier, JSValue value)
-{
- if (!allowsSetProperty())
- return;
-
- m_unwrappedObject->put(unwrappedExecState(), identifier, prepareIncomingValue(exec, value));
-
- transferExceptionToExecState(exec);
-}
-
-bool JSQuarantinedObjectWrapper::defineOwnProperty(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor, bool shouldThrow)
-{
- if (!allowsSetProperty())
- return false;
-
- PropertyDescriptor wrappedDescriptor;
- if (descriptor.isDataDescriptor()) {
- wrappedDescriptor.setValue(prepareIncomingValue(exec, descriptor.value()));
- if (wrappedDescriptor.writablePresent())
- wrappedDescriptor.setWritable(descriptor.writable());
- } else if (descriptor.isAccessorDescriptor()) {
- if (descriptor.getter())
- wrappedDescriptor.setGetter(prepareIncomingValue(exec, descriptor.getter()));
- if (descriptor.setter())
- wrappedDescriptor.setSetter(prepareIncomingValue(exec, descriptor.setter()));
- }
- if (wrappedDescriptor.enumerablePresent())
- wrappedDescriptor.setEnumerable(descriptor.enumerable());
- if (wrappedDescriptor.configurablePresent())
- wrappedDescriptor.setConfigurable(descriptor.configurable());
-
- bool result = m_unwrappedObject->defineOwnProperty(unwrappedExecState(), propertyName, wrappedDescriptor, shouldThrow);
-
- transferExceptionToExecState(exec);
- return result;
-}
-
-bool JSQuarantinedObjectWrapper::deleteProperty(ExecState* exec, const Identifier& identifier)
-{
- if (!allowsDeleteProperty())
- return false;
-
- bool result = m_unwrappedObject->deleteProperty(unwrappedExecState(), identifier);
-
- transferExceptionToExecState(exec);
-
- return result;
-}
-
-bool JSQuarantinedObjectWrapper::deleteProperty(ExecState* exec, unsigned identifier)
-{
- if (!allowsDeleteProperty())
- return false;
-
- bool result = m_unwrappedObject->deleteProperty(unwrappedExecState(), identifier);
-
- transferExceptionToExecState(exec);
-
- return result;
-}
-
-JSObject* JSQuarantinedObjectWrapper::construct(ExecState* exec, JSObject* constructor, const ArgList& args)
-{
- JSQuarantinedObjectWrapper* wrapper = static_cast<JSQuarantinedObjectWrapper*>(constructor);
-
- MarkedArgumentBuffer preparedArgs;
- for (size_t i = 0; i < args.size(); ++i)
- preparedArgs.append(wrapper->prepareIncomingValue(exec, args.at(i)));
-
- // FIXME: Would be nice to find a way to reuse the result of m_unwrappedObject->getConstructData
- // from when we called it in JSQuarantinedObjectWrapper::getConstructData.
- ConstructData unwrappedConstructData;
- ConstructType unwrappedConstructType = wrapper->m_unwrappedObject->getConstructData(unwrappedConstructData);
- ASSERT(unwrappedConstructType != ConstructTypeNone);
-
- JSValue unwrappedResult = JSC::construct(wrapper->unwrappedExecState(), wrapper->m_unwrappedObject, unwrappedConstructType, unwrappedConstructData, preparedArgs);
- JSValue resultValue = wrapper->wrapOutgoingValue(wrapper->unwrappedExecState(), unwrappedResult);
- ASSERT(resultValue.isObject());
- JSObject* result = asObject(resultValue);
-
- wrapper->transferExceptionToExecState(exec);
-
- return result;
-}
-
-ConstructType JSQuarantinedObjectWrapper::getConstructData(ConstructData& constructData)
-{
- if (!allowsConstruct())
- return ConstructTypeNone;
- ConstructData unwrappedConstructData;
- if (m_unwrappedObject->getConstructData(unwrappedConstructData) == ConstructTypeNone)
- return ConstructTypeNone;
- constructData.native.function = construct;
- return ConstructTypeHost;
-}
-
-bool JSQuarantinedObjectWrapper::hasInstance(ExecState* exec, JSValue value, JSValue proto)
-{
- if (!allowsHasInstance())
- return false;
-
- bool result = m_unwrappedObject->hasInstance(unwrappedExecState(), prepareIncomingValue(exec, value), prepareIncomingValue(exec, proto));
-
- transferExceptionToExecState(exec);
-
- return result;
-}
-
-JSValue JSQuarantinedObjectWrapper::call(ExecState* exec, JSObject* function, JSValue thisValue, const ArgList& args)
-{
- JSQuarantinedObjectWrapper* wrapper = static_cast<JSQuarantinedObjectWrapper*>(function);
-
- JSValue preparedThisValue = wrapper->prepareIncomingValue(exec, thisValue);
-
- MarkedArgumentBuffer preparedArgs;
- for (size_t i = 0; i < args.size(); ++i)
- preparedArgs.append(wrapper->prepareIncomingValue(exec, args.at(i)));
-
- // FIXME: Would be nice to find a way to reuse the result of m_unwrappedObject->getCallData
- // from when we called it in JSQuarantinedObjectWrapper::getCallData.
- CallData unwrappedCallData;
- CallType unwrappedCallType = wrapper->m_unwrappedObject->getCallData(unwrappedCallData);
- ASSERT(unwrappedCallType != CallTypeNone);
-
- JSValue unwrappedResult = JSC::call(wrapper->unwrappedExecState(), wrapper->m_unwrappedObject, unwrappedCallType, unwrappedCallData, preparedThisValue, preparedArgs);
- JSValue result = wrapper->wrapOutgoingValue(wrapper->unwrappedExecState(), unwrappedResult);
-
- wrapper->transferExceptionToExecState(exec);
-
- return result;
-}
-
-CallType JSQuarantinedObjectWrapper::getCallData(CallData& callData)
-{
- if (!allowsCallAsFunction())
- return CallTypeNone;
- CallData unwrappedCallData;
- if (m_unwrappedObject->getCallData(unwrappedCallData) == CallTypeNone)
- return CallTypeNone;
- callData.native.function = call;
- return CallTypeHost;
-}
-
-void JSQuarantinedObjectWrapper::getPropertyNames(ExecState*, PropertyNameArray& array)
-{
- if (!allowsGetPropertyNames())
- return;
-
- m_unwrappedObject->getPropertyNames(unwrappedExecState(), array);
-}
-
-void JSQuarantinedObjectWrapper::getOwnPropertyNames(ExecState*, PropertyNameArray& array)
-{
- if (!allowsGetPropertyNames())
- return;
-
- m_unwrappedObject->getOwnPropertyNames(unwrappedExecState(), array);
-}
-
-} // namespace WebCore
diff --git a/WebCore/bindings/js/JSQuarantinedObjectWrapper.h b/WebCore/bindings/js/JSQuarantinedObjectWrapper.h
deleted file mode 100644
index 9f62495..0000000
--- a/WebCore/bindings/js/JSQuarantinedObjectWrapper.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (C) 2008, 2009 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 JSQuarantinedObjectWrapper_h
-#define JSQuarantinedObjectWrapper_h
-
-#include <runtime/JSObject.h>
-
-namespace WebCore {
-
- class JSQuarantinedObjectWrapper : public JSC::JSObject {
- public:
- static JSQuarantinedObjectWrapper* asWrapper(JSC::JSValue);
-
- virtual ~JSQuarantinedObjectWrapper();
-
- virtual JSC::JSObject* unwrappedObject() { return m_unwrappedObject; }
-
- JSC::JSGlobalObject* unwrappedGlobalObject() const { return m_unwrappedGlobalObject; };
- JSC::ExecState* unwrappedExecState() const;
-
- bool allowsUnwrappedAccessFrom(JSC::ExecState*) const;
-
- static const JSC::ClassInfo s_info;
-
- static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue proto)
- {
- return JSC::Structure::create(proto, JSC::TypeInfo(JSC::ObjectType, StructureFlags));
- }
-
- protected:
- static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | JSC::OverridesHasInstance | JSC::OverridesMarkChildren | JSC::OverridesGetPropertyNames | JSC::JSObject::StructureFlags;
-
- JSQuarantinedObjectWrapper(JSC::ExecState* unwrappedExec, JSC::JSObject* unwrappedObject, NonNullPassRefPtr<JSC::Structure>);
-
- virtual void markChildren(JSC::MarkStack&);
-
- private:
- virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
- virtual bool getOwnPropertySlot(JSC::ExecState*, unsigned, JSC::PropertySlot&);
- virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
-
- virtual void put(JSC::ExecState*, const JSC::Identifier&, JSC::JSValue, JSC::PutPropertySlot&);
- virtual void put(JSC::ExecState*, unsigned, JSC::JSValue);
- virtual bool defineOwnProperty(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&, bool shouldThrow);
-
- virtual bool deleteProperty(JSC::ExecState*, const JSC::Identifier&);
- virtual bool deleteProperty(JSC::ExecState*, unsigned);
-
- virtual JSC::CallType getCallData(JSC::CallData&);
- virtual JSC::ConstructType getConstructData(JSC::ConstructData&);
-
- virtual bool hasInstance(JSC::ExecState*, JSC::JSValue, JSC::JSValue proto);
-
- virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&);
- virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&);
-
- virtual JSC::UString className() const { return m_unwrappedObject->className(); }
-
- virtual bool allowsGetProperty() const { return false; }
- virtual bool allowsSetProperty() const { return false; }
- virtual bool allowsDeleteProperty() const { return false; }
- virtual bool allowsConstruct() const { return false; }
- virtual bool allowsHasInstance() const { return false; }
- virtual bool allowsCallAsFunction() const { return false; }
- virtual bool allowsGetPropertyNames() const { return false; }
-
- virtual JSC::JSValue prepareIncomingValue(JSC::ExecState* unwrappedExec, JSC::JSValue unwrappedValue) const = 0;
- virtual JSC::JSValue wrapOutgoingValue(JSC::ExecState* unwrappedExec, JSC::JSValue unwrappedValue) const = 0;
-
- static JSC::JSValue cachedValueGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
-
- void transferExceptionToExecState(JSC::ExecState*) const;
-
- static JSC::JSValue JSC_HOST_CALL call(JSC::ExecState*, JSC::JSObject* function, JSC::JSValue thisValue, const JSC::ArgList&);
- static JSC::JSObject* construct(JSC::ExecState*, JSC::JSObject*, const JSC::ArgList&);
-
- JSC::JSGlobalObject* m_unwrappedGlobalObject;
- JSC::JSObject* m_unwrappedObject;
- };
-
-} // namespace WebCore
-
-#endif // JSQuarantinedObjectWrapper_h
diff --git a/WebCore/bindings/js/JSSVGContextCache.h b/WebCore/bindings/js/JSSVGContextCache.h
new file mode 100644
index 0000000..75ed324
--- /dev/null
+++ b/WebCore/bindings/js/JSSVGContextCache.h
@@ -0,0 +1,97 @@
+/*
+ Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef JSSVGContextCache_h
+#define JSSVGContextCache_h
+
+#if ENABLE(SVG)
+#include "SVGElement.h"
+#include <wtf/StdLibExtras.h>
+
+namespace WebCore {
+
+class DOMObject;
+
+class JSSVGContextCache : public Noncopyable {
+public:
+ typedef HashMap<DOMObject*, SVGElement*> WrapperMap;
+
+ static WrapperMap& wrapperMap()
+ {
+ DEFINE_STATIC_LOCAL(WrapperMap, s_wrapperMap, ());
+ return s_wrapperMap;
+ }
+
+ static void addWrapper(DOMObject* wrapper, SVGElement* context)
+ {
+ ASSERT(wrapper);
+ ASSERT(context);
+
+ pair<WrapperMap::iterator, bool> result = wrapperMap().add(wrapper, context);
+ if (result.second) {
+ WrapperMap::iterator& it = result.first;
+ ASSERT_UNUSED(it, it->second == context);
+ }
+ }
+
+ static void forgetWrapper(DOMObject* wrapper)
+ {
+ ASSERT(wrapper);
+
+ WrapperMap& map = wrapperMap();
+ WrapperMap::iterator it = map.find(wrapper);
+ if (it == map.end())
+ return;
+
+ map.remove(it);
+ }
+
+ static void propagateSVGDOMChange(DOMObject* wrapper, const QualifiedName& attributeName)
+ {
+ WrapperMap& map = wrapperMap();
+ WrapperMap::iterator it = map.find(wrapper);
+ if (it == map.end())
+ return;
+
+ SVGElement* context = it->second;
+ ASSERT(context);
+
+ context->svgAttributeChanged(attributeName);
+ }
+
+ static SVGElement* svgContextForDOMObject(DOMObject* wrapper)
+ {
+ ASSERT(wrapper);
+
+ WrapperMap& map = wrapperMap();
+ WrapperMap::iterator it = map.find(wrapper);
+ if (it == map.end())
+ return 0;
+
+ SVGElement* context = it->second;
+ ASSERT(context);
+ return context;
+ }
+
+};
+
+}
+
+#endif
+#endif
diff --git a/WebCore/bindings/js/JSSVGLengthCustom.cpp b/WebCore/bindings/js/JSSVGLengthCustom.cpp
index bad52ae..33bbf30 100644
--- a/WebCore/bindings/js/JSSVGLengthCustom.cpp
+++ b/WebCore/bindings/js/JSSVGLengthCustom.cpp
@@ -28,18 +28,22 @@ namespace WebCore {
JSValue JSSVGLength::value(ExecState* exec) const
{
- SVGLength imp(*impl());
- return jsNumber(exec, imp.value(context()));
+ JSSVGPODTypeWrapper<SVGLength>* imp = impl();
+ SVGElement* context = JSSVGContextCache::svgContextForDOMObject(const_cast<JSSVGLength*>(this));
+
+ SVGLength podImp(*imp);
+ return jsNumber(exec, podImp.value(context));
}
JSValue JSSVGLength::convertToSpecifiedUnits(ExecState* exec, const ArgList& args)
{
- JSSVGPODTypeWrapper<SVGLength>* wrapper = impl();
+ JSSVGPODTypeWrapper<SVGLength>* imp = impl();
+ SVGElement* context = JSSVGContextCache::svgContextForDOMObject(this);
- SVGLength imp(*wrapper);
- imp.convertToSpecifiedUnits(args.at(0).toInt32(exec), context());
+ SVGLength podImp(*imp);
+ podImp.convertToSpecifiedUnits(args.at(0).toInt32(exec), context);
- wrapper->commitChange(imp, context());
+ imp->commitChange(podImp, this);
return jsUndefined();
}
diff --git a/WebCore/bindings/js/JSSVGMatrixCustom.cpp b/WebCore/bindings/js/JSSVGMatrixCustom.cpp
index a9d0e54..d2d3d6f 100644
--- a/WebCore/bindings/js/JSSVGMatrixCustom.cpp
+++ b/WebCore/bindings/js/JSSVGMatrixCustom.cpp
@@ -44,15 +44,16 @@ JSValue JSSVGMatrix::multiply(ExecState* exec, const ArgList& args)
TransformationMatrix m1(*impl());
TransformationMatrix m2(*(matrixObj->impl()));
- JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(m1.multLeft(m2)).get(), m_context.get());
-
- return result;
+ SVGElement* context = JSSVGContextCache::svgContextForDOMObject(this);
+ return toJS(exec, globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(m1.multLeft(m2)).get(), context);
}
JSValue JSSVGMatrix::inverse(ExecState* exec, const ArgList&)
{
TransformationMatrix imp(*impl());
- JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.inverse()).get(), m_context.get());
+
+ SVGElement* context = JSSVGContextCache::svgContextForDOMObject(this);
+ JSValue result = toJS(exec, globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.inverse()).get(), context);
if (!imp.isInvertible())
setDOMException(exec, SVGException::SVG_MATRIX_NOT_INVERTABLE);
@@ -67,7 +68,8 @@ JSValue JSSVGMatrix::rotateFromVector(ExecState* exec, const ArgList& args)
float x = args.at(0).toFloat(exec);
float y = args.at(1).toFloat(exec);
- JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.rotateFromVector(x, y)).get(), m_context.get());
+ SVGElement* context = JSSVGContextCache::svgContextForDOMObject(this);
+ JSValue result = toJS(exec, globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.rotateFromVector(x, y)).get(), context);
if (x == 0.0 || y == 0.0)
setDOMException(exec, SVGException::SVG_INVALID_VALUE_ERR);
diff --git a/WebCore/bindings/js/JSSVGPODListCustom.h b/WebCore/bindings/js/JSSVGPODListCustom.h
new file mode 100644
index 0000000..8a0654c
--- /dev/null
+++ b/WebCore/bindings/js/JSSVGPODListCustom.h
@@ -0,0 +1,199 @@
+/*
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
+ * Copyright (C) 2008 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
+ * 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 JSSVGPODListCustom_h
+#define JSSVGPODListCustom_h
+
+#include "JSSVGContextCache.h"
+#include "JSSVGPODTypeWrapper.h"
+#include "SVGList.h"
+
+namespace WebCore {
+
+namespace JSSVGPODListCustom {
+
+// Helper structure only containing public typedefs, as C++ does not allow templatized typedefs
+template<typename PODType>
+struct JSSVGPODListTraits {
+ typedef SVGPODListItem<PODType> PODListItem;
+ typedef SVGList<RefPtr<PODListItem> > PODList;
+ typedef PODType (*ConversionCallback)(JSC::JSValue);
+};
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue finishGetter(JSC::ExecState* exec, ExceptionCode& ec, JSPODListType* wrapper,
+ PassRefPtr<typename JSSVGPODListTraits<PODType>::PODListItem> item)
+{
+ if (ec) {
+ setDOMException(exec, ec);
+ return JSC::jsUndefined();
+ }
+
+ typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+
+ SVGElement* context = JSSVGContextCache::svgContextForDOMObject(wrapper);
+ return toJS(exec, wrapper->globalObject(),
+ JSSVGPODTypeWrapperCreatorForList<PODType>::create(item.get(), listImp->associatedAttributeName()).get(), context);
+}
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue finishSetter(JSC::ExecState* exec, ExceptionCode& ec, JSPODListType* wrapper,
+ PassRefPtr<typename JSSVGPODListTraits<PODType>::PODListItem> item)
+{
+ if (ec) {
+ setDOMException(exec, ec);
+ return JSC::jsUndefined();
+ }
+
+ typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+
+ const QualifiedName& attributeName = listImp->associatedAttributeName();
+ JSSVGContextCache::propagateSVGDOMChange(wrapper, attributeName);
+
+ SVGElement* context = JSSVGContextCache::svgContextForDOMObject(wrapper);
+ return toJS(exec, wrapper->globalObject(),
+ JSSVGPODTypeWrapperCreatorForList<PODType>::create(item.get(), attributeName).get(), context);
+}
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue finishSetterReadOnlyResult(JSC::ExecState* exec, ExceptionCode& ec, JSPODListType* wrapper,
+ PassRefPtr<typename JSSVGPODListTraits<PODType>::PODListItem> item)
+{
+ if (ec) {
+ setDOMException(exec, ec);
+ return JSC::jsUndefined();
+ }
+
+ typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+ JSSVGContextCache::propagateSVGDOMChange(wrapper, listImp->associatedAttributeName());
+ return toJS(exec, wrapper->globalObject(),
+ JSSVGStaticPODTypeWrapper<PODType>::create(*item).get(), 0 /* no context on purpose */);
+}
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue clear(JSPODListType* wrapper, JSC::ExecState* exec, const JSC::ArgList&,
+ typename JSSVGPODListTraits<PODType>::ConversionCallback)
+{
+ ExceptionCode ec = 0;
+ typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+ listImp->clear(ec);
+
+ if (ec)
+ setDOMException(exec, ec);
+ else
+ JSSVGContextCache::propagateSVGDOMChange(wrapper, listImp->associatedAttributeName());
+
+ return JSC::jsUndefined();
+}
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue initialize(JSPODListType* wrapper, JSC::ExecState* exec, const JSC::ArgList& args,
+ typename JSSVGPODListTraits<PODType>::ConversionCallback conversion)
+{
+ ExceptionCode ec = 0;
+ typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+ return finishSetter<JSPODListType, PODType>(exec, ec, wrapper,
+ listImp->initialize(JSSVGPODListTraits<PODType>::PODListItem::copy(conversion(args.at(0))), ec));
+}
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue getItem(JSPODListType* wrapper, JSC::ExecState* exec, const JSC::ArgList& args,
+ typename JSSVGPODListTraits<PODType>::ConversionCallback)
+{
+ bool indexOk = false;
+ unsigned index = args.at(0).toUInt32(exec, indexOk);
+ if (!indexOk) {
+ setDOMException(exec, TYPE_MISMATCH_ERR);
+ return JSC::jsUndefined();
+ }
+
+ ExceptionCode ec = 0;
+ typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+ return finishGetter<JSPODListType, PODType>(exec, ec, wrapper,
+ listImp->getItem(index, ec));
+}
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue insertItemBefore(JSPODListType* wrapper, JSC::ExecState* exec, const JSC::ArgList& args,
+ typename JSSVGPODListTraits<PODType>::ConversionCallback conversion)
+{
+ bool indexOk = false;
+ unsigned index = args.at(1).toUInt32(exec, indexOk);
+ if (!indexOk) {
+ setDOMException(exec, TYPE_MISMATCH_ERR);
+ return JSC::jsUndefined();
+ }
+
+ ExceptionCode ec = 0;
+ typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+ return finishSetter<JSPODListType, PODType>(exec, ec, wrapper,
+ listImp->insertItemBefore(JSSVGPODListTraits<PODType>::PODListItem::copy(conversion(args.at(0))), index, ec));
+}
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue replaceItem(JSPODListType* wrapper, JSC::ExecState* exec, const JSC::ArgList& args,
+ typename JSSVGPODListTraits<PODType>::ConversionCallback conversion)
+{
+ bool indexOk = false;
+ unsigned index = args.at(1).toUInt32(exec, indexOk);
+ if (!indexOk) {
+ setDOMException(exec, TYPE_MISMATCH_ERR);
+ return JSC::jsUndefined();
+ }
+
+ ExceptionCode ec = 0;
+ typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+ return finishSetter<JSPODListType, PODType>(exec, ec, wrapper,
+ listImp->replaceItem(JSSVGPODListTraits<PODType>::PODListItem::copy(conversion(args.at(0))), index, ec));
+}
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue removeItem(JSPODListType* wrapper, JSC::ExecState* exec, const JSC::ArgList& args,
+ typename JSSVGPODListTraits<PODType>::ConversionCallback)
+{
+ bool indexOk = false;
+ unsigned index = args.at(0).toUInt32(exec, indexOk);
+ if (!indexOk) {
+ setDOMException(exec, TYPE_MISMATCH_ERR);
+ return JSC::jsUndefined();
+ }
+
+ ExceptionCode ec = 0;
+ typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+ return finishSetterReadOnlyResult<JSPODListType, PODType>(exec, ec, wrapper,
+ listImp->removeItem(index, ec));
+}
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue appendItem(JSPODListType* wrapper, JSC::ExecState* exec, const JSC::ArgList& args,
+ typename JSSVGPODListTraits<PODType>::ConversionCallback conversion)
+{
+ ExceptionCode ec = 0;
+ typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+ return finishSetter<JSPODListType, PODType>(exec, ec, wrapper,
+ listImp->appendItem(JSSVGPODListTraits<PODType>::PODListItem::copy(conversion(args.at(0))), ec));
+}
+
+}
+
+}
+
+#endif
diff --git a/WebCore/bindings/js/JSSVGPODTypeWrapper.h b/WebCore/bindings/js/JSSVGPODTypeWrapper.h
index 51e4e9e..7c04f22 100644
--- a/WebCore/bindings/js/JSSVGPODTypeWrapper.h
+++ b/WebCore/bindings/js/JSSVGPODTypeWrapper.h
@@ -28,25 +28,28 @@
#define JSSVGPODTypeWrapper_h
#if ENABLE(SVG)
+#include "JSSVGContextCache.h"
#include "SVGElement.h"
#include <wtf/StdLibExtras.h>
namespace WebCore {
+class DOMObject;
+
template<typename PODType>
class JSSVGPODTypeWrapper : public RefCounted<JSSVGPODTypeWrapper<PODType> > {
public:
virtual ~JSSVGPODTypeWrapper() { }
virtual operator PODType() = 0;
- virtual void commitChange(PODType, SVGElement*) = 0;
+ virtual void commitChange(PODType, DOMObject*) = 0;
};
// This file contains JS wrapper objects for SVG datatypes, that are passed around by value
// in WebCore/svg (aka. 'POD types'). For instance SVGMatrix is mapped to TransformationMatrix, and
// passed around as const reference. SVG DOM demands these objects to be "live", changes to any
// of the writable attributes of SVGMatrix need to be reflected in the object which exposed the
-// SVGMatrix object (ie. 'someElement.transform.matrix.a = 50.0', in that case 'SVGTransform').
+// SVGMatrix object (i.e. 'someElement.transform.matrix.a = 50.0', in that case 'SVGTransform').
// The SVGTransform class stores its "TransformationMatrix m_matrix" object on the stack. If it would
// be stored as pointer we could just build an auto-generated JSSVG* wrapper object around it
// and all changes to that object would automatically affect the TransformationMatrix* object stored
@@ -68,13 +71,13 @@ public:
// GetterMethod and SetterMethod are each 12 bytes. We have to pack to a size
// greater than or equal to that to avoid an alignment warning (C4121). 16 is
// the next-largest size allowed for packing, so we use that.
-#pragma pack(16)
+#pragma pack(push, 16)
#endif
template<typename PODType, typename PODTypeCreator>
class JSSVGDynamicPODTypeWrapper : public JSSVGPODTypeWrapper<PODType> {
public:
typedef PODType (PODTypeCreator::*GetterMethod)() const;
- typedef void (PODTypeCreator::*SetterMethod)(PODType);
+ typedef void (PODTypeCreator::*SetterMethod)(const PODType&);
static PassRefPtr<JSSVGDynamicPODTypeWrapper> create(PassRefPtr<PODTypeCreator> creator, GetterMethod getter, SetterMethod setter)
{
@@ -86,12 +89,10 @@ public:
return (m_creator.get()->*m_getter)();
}
- virtual void commitChange(PODType type, SVGElement* context)
+ virtual void commitChange(PODType type, DOMObject* wrapper)
{
(m_creator.get()->*m_setter)(type);
-
- if (context)
- context->svgAttributeChanged(m_creator->associatedAttributeName());
+ JSSVGContextCache::propagateSVGDOMChange(wrapper, m_creator->associatedAttributeName());
}
private:
@@ -105,15 +106,20 @@ private:
ASSERT(m_setter);
}
+ virtual ~JSSVGDynamicPODTypeWrapper();
+
// Update callbacks
RefPtr<PODTypeCreator> m_creator;
GetterMethod m_getter;
SetterMethod m_setter;
};
+#if COMPILER(MSVC)
+#pragma pack(pop)
+#endif
-// Represents a JS wrapper object for SVG POD types (not for SVGAnimated* clases). Any modification to the SVG POD
+// Represents a JS wrapper object for SVG POD types (not for SVGAnimated* classes). Any modification to the SVG POD
// types don't cause any updates unlike JSSVGDynamicPODTypeWrapper. This class is used for return values (ie. getBBox())
-// and for properties where SVG specification explicitely states, that the contents of the POD type are immutable.
+// and for properties where SVG specification explicitly states, that the contents of the POD type are immutable.
template<typename PODType>
class JSSVGStaticPODTypeWrapper : public JSSVGPODTypeWrapper<PODType> {
@@ -128,7 +134,7 @@ public:
return m_podType;
}
- virtual void commitChange(PODType type, SVGElement*)
+ virtual void commitChange(PODType type, DOMObject*)
{
m_podType = type;
}
@@ -152,10 +158,10 @@ public:
return adoptRef(new JSSVGStaticPODTypeWrapperWithPODTypeParent(type, parent));
}
- virtual void commitChange(PODType type, SVGElement* context)
+ virtual void commitChange(PODType type, DOMObject* wrapper)
{
- JSSVGStaticPODTypeWrapper<PODType>::commitChange(type, context);
- m_parentType->commitChange(ParentTypeArg(type), context);
+ JSSVGStaticPODTypeWrapper<PODType>::commitChange(type, wrapper);
+ m_parentType->commitChange(ParentTypeArg(type), wrapper);
}
private:
@@ -172,7 +178,7 @@ private:
// GetterMethod and SetterMethod are each 12 bytes. We have to pack to a size
// greater than or equal to that to avoid an alignment warning (C4121). 16 is
// the next-largest size allowed for packing, so we use that.
-#pragma pack(16)
+#pragma pack(push, 16)
#endif
template<typename PODType, typename ParentType>
class JSSVGStaticPODTypeWrapperWithParent : public JSSVGPODTypeWrapper<PODType> {
@@ -190,7 +196,7 @@ public:
return (m_parent.get()->*m_getter)();
}
- virtual void commitChange(PODType type, SVGElement*)
+ virtual void commitChange(PODType type, DOMObject*)
{
(m_parent.get()->*m_setter)(type);
}
@@ -223,7 +229,7 @@ public:
typedef SVGPODListItem<PODType> PODListItemPtrType;
typedef PODType (SVGPODListItem<PODType>::*GetterMethod)() const;
- typedef void (SVGPODListItem<PODType>::*SetterMethod)(PODType);
+ typedef void (SVGPODListItem<PODType>::*SetterMethod)(const PODType&);
static PassRefPtr<JSSVGPODTypeWrapperCreatorForList> create(PassRefPtr<PODListItemPtrType> creator, const QualifiedName& attributeName)
{
@@ -235,15 +241,13 @@ public:
return (m_creator.get()->*m_getter)();
}
- virtual void commitChange(PODType type, SVGElement* context)
+ virtual void commitChange(PODType type, DOMObject* wrapper)
{
if (!m_setter)
return;
(m_creator.get()->*m_setter)(type);
-
- if (context)
- context->svgAttributeChanged(m_associatedAttributeName);
+ JSSVGContextCache::propagateSVGDOMChange(wrapper, m_associatedAttributeName);
}
private:
@@ -269,7 +273,7 @@ private:
template<typename PODType, typename PODTypeCreator>
struct PODTypeWrapperCacheInfo {
typedef PODType (PODTypeCreator::*GetterMethod)() const;
- typedef void (PODTypeCreator::*SetterMethod)(PODType);
+ typedef void (PODTypeCreator::*SetterMethod)(const PODType&);
// Empty value
PODTypeWrapperCacheInfo()
@@ -309,6 +313,9 @@ struct PODTypeWrapperCacheInfo {
GetterMethod getter;
SetterMethod setter;
};
+#if COMPILER(MSVC)
+#pragma pack(pop)
+#endif
template<typename PODType, typename PODTypeCreator>
struct PODTypeWrapperCacheInfoHash {
@@ -351,60 +358,53 @@ struct PODTypeWrapperCacheInfoTraits : WTF::GenericHashTraits<PODTypeWrapperCach
}
};
+// Used for dynamic read-write attributes
template<typename PODType, typename PODTypeCreator>
class JSSVGDynamicPODTypeWrapperCache {
public:
typedef PODType (PODTypeCreator::*GetterMethod)() const;
- typedef void (PODTypeCreator::*SetterMethod)(PODType);
+ typedef void (PODTypeCreator::*SetterMethod)(const PODType&);
typedef PODTypeWrapperCacheInfo<PODType, PODTypeCreator> CacheInfo;
typedef PODTypeWrapperCacheInfoHash<PODType, PODTypeCreator> CacheInfoHash;
typedef PODTypeWrapperCacheInfoTraits<PODType, PODTypeCreator> CacheInfoTraits;
typedef JSSVGPODTypeWrapper<PODType> WrapperBase;
- typedef JSSVGDynamicPODTypeWrapper<PODType, PODTypeCreator> DynamicWrapper;
- typedef HashMap<CacheInfo, DynamicWrapper*, CacheInfoHash, CacheInfoTraits> DynamicWrapperHashMap;
- typedef typename DynamicWrapperHashMap::const_iterator DynamicWrapperHashMapIterator;
+ typedef JSSVGDynamicPODTypeWrapper<PODType, PODTypeCreator> Wrapper;
+ typedef HashMap<CacheInfo, Wrapper*, CacheInfoHash, CacheInfoTraits> WrapperMap;
- static DynamicWrapperHashMap& dynamicWrapperHashMap()
+ static WrapperMap& wrapperMap()
{
- DEFINE_STATIC_LOCAL(DynamicWrapperHashMap, s_dynamicWrapperHashMap, ());
- return s_dynamicWrapperHashMap;
+ DEFINE_STATIC_LOCAL(WrapperMap, s_wrapperMap, ());
+ return s_wrapperMap;
}
- // Used for readwrite attributes only
static PassRefPtr<WrapperBase> lookupOrCreateWrapper(PODTypeCreator* creator, GetterMethod getter, SetterMethod setter)
{
- DynamicWrapperHashMap& map(dynamicWrapperHashMap());
CacheInfo info(creator, getter, setter);
+ pair<typename WrapperMap::iterator, bool> result = wrapperMap().add(info, 0);
+ if (!result.second) // pre-existing entry
+ return result.first->second;
- if (map.contains(info))
- return map.get(info);
-
- RefPtr<DynamicWrapper> wrapper = DynamicWrapper::create(creator, getter, setter);
- map.set(info, wrapper.get());
+ RefPtr<Wrapper> wrapper = Wrapper::create(creator, getter, setter);
+ result.first->second = wrapper.get();
return wrapper.release();
}
- static void forgetWrapper(WrapperBase* wrapper)
+ static void forgetWrapper(PODTypeCreator* creator, GetterMethod getter, SetterMethod setter)
{
- DynamicWrapperHashMap& map(dynamicWrapperHashMap());
-
- DynamicWrapperHashMapIterator it = map.begin();
- DynamicWrapperHashMapIterator end = map.end();
-
- for (; it != end; ++it) {
- if (it->second != wrapper)
- continue;
-
- // It's guaranteed that there's just one object we need to take care of.
- map.remove(it->first);
- break;
- }
+ CacheInfo info(creator, getter, setter);
+ wrapperMap().remove(info);
}
};
-};
+template<typename PODType, typename PODTypeCreator>
+JSSVGDynamicPODTypeWrapper<PODType, PODTypeCreator>::~JSSVGDynamicPODTypeWrapper()
+{
+ JSSVGDynamicPODTypeWrapperCache<PODType, PODTypeCreator>::forgetWrapper(m_creator.get(), m_getter, m_setter);
+}
+
+} // namespace WebCore
#endif // ENABLE(SVG)
#endif // JSSVGPODTypeWrapper_h
diff --git a/WebCore/bindings/js/JSSVGPathSegCustom.cpp b/WebCore/bindings/js/JSSVGPathSegCustom.cpp
index d5be3fd..eac2c4b 100644
--- a/WebCore/bindings/js/JSSVGPathSegCustom.cpp
+++ b/WebCore/bindings/js/JSSVGPathSegCustom.cpp
@@ -21,6 +21,8 @@
#if ENABLE(SVG)
#include "JSSVGPathSeg.h"
+
+#include "JSDOMBinding.h"
#include "JSSVGPathSegArcAbs.h"
#include "JSSVGPathSegArcRel.h"
#include "JSSVGPathSegClosePath.h"
@@ -40,9 +42,6 @@
#include "JSSVGPathSegLinetoVerticalRel.h"
#include "JSSVGPathSegMovetoAbs.h"
#include "JSSVGPathSegMovetoRel.h"
-
-#include "JSDOMBinding.h"
-
#include "SVGPathSeg.h"
#include "SVGPathSegArc.h"
#include "SVGPathSegClosePath.h"
@@ -64,8 +63,10 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, SVGPathSeg* objec
if (!object)
return jsNull();
- if (DOMObject* wrapper = getCachedDOMObjectWrapper(exec, object))
+ if (DOMObject* wrapper = getCachedDOMObjectWrapper(exec, object)) {
+ ASSERT(JSSVGContextCache::svgContextForDOMObject(wrapper) == context);
return wrapper;
+ }
switch (object->pathSegType()) {
case SVGPathSeg::PATHSEG_CLOSEPATH:
@@ -115,5 +116,3 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, SVGPathSeg* objec
}
#endif // ENABLE(SVG)
-
-// vim:ts=4:noet
diff --git a/WebCore/bindings/js/JSSVGPathSegListCustom.cpp b/WebCore/bindings/js/JSSVGPathSegListCustom.cpp
index b71f3a6..4831727 100644
--- a/WebCore/bindings/js/JSSVGPathSegListCustom.cpp
+++ b/WebCore/bindings/js/JSSVGPathSegListCustom.cpp
@@ -24,6 +24,7 @@
#include "Document.h"
#include "Frame.h"
+#include "JSSVGContextCache.h"
#include "JSSVGPathSeg.h"
#include "SVGDocumentExtensions.h"
#include "SVGElement.h"
@@ -39,12 +40,12 @@ JSValue JSSVGPathSegList::clear(ExecState* exec, const ArgList&)
{
ExceptionCode ec = 0;
- SVGPathSegList* imp = static_cast<SVGPathSegList*>(impl());
- imp->clear(ec);
+ SVGPathSegList* list = impl();
+ list->clear(ec);
setDOMException(exec, ec);
- m_context->svgAttributeChanged(imp->associatedAttributeName());
+ JSSVGContextCache::propagateSVGDOMChange(this, list->associatedAttributeName());
return jsUndefined();
}
@@ -53,14 +54,15 @@ JSValue JSSVGPathSegList::initialize(ExecState* exec, const ArgList& args)
ExceptionCode ec = 0;
SVGPathSeg* newItem = toSVGPathSeg(args.at(0));
- SVGPathSegList* imp = static_cast<SVGPathSegList*>(impl());
+ SVGPathSegList* list = impl();
- SVGPathSeg* obj = WTF::getPtr(imp->initialize(newItem, ec));
+ SVGPathSeg* obj = WTF::getPtr(list->initialize(newItem, ec));
+ SVGElement* context = JSSVGContextCache::svgContextForDOMObject(this);
- JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), obj, m_context.get());
+ JSValue result = toJS(exec, globalObject(), obj, context);
setDOMException(exec, ec);
- m_context->svgAttributeChanged(imp->associatedAttributeName());
+ JSSVGContextCache::propagateSVGDOMChange(this, list->associatedAttributeName());
return result;
}
@@ -75,10 +77,11 @@ JSValue JSSVGPathSegList::getItem(ExecState* exec, const ArgList& args)
return jsUndefined();
}
- SVGPathSegList* imp = static_cast<SVGPathSegList*>(impl());
- SVGPathSeg* obj = WTF::getPtr(imp->getItem(index, ec));
+ SVGPathSegList* list = impl();
+ SVGPathSeg* obj = WTF::getPtr(list->getItem(index, ec));
+ SVGElement* context = JSSVGContextCache::svgContextForDOMObject(this);
- JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), obj, m_context.get());
+ JSValue result = toJS(exec, globalObject(), obj, context);
setDOMException(exec, ec);
return result;
}
@@ -95,12 +98,13 @@ JSValue JSSVGPathSegList::insertItemBefore(ExecState* exec, const ArgList& args)
return jsUndefined();
}
- SVGPathSegList* imp = static_cast<SVGPathSegList*>(impl());
+ SVGPathSegList* list = impl();
+ SVGElement* context = JSSVGContextCache::svgContextForDOMObject(this);
- JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->insertItemBefore(newItem, index, ec)), m_context.get());
+ JSValue result = toJS(exec, globalObject(), WTF::getPtr(list->insertItemBefore(newItem, index, ec)), context);
setDOMException(exec, ec);
- m_context->svgAttributeChanged(imp->associatedAttributeName());
+ JSSVGContextCache::propagateSVGDOMChange(this, list->associatedAttributeName());
return result;
}
@@ -116,12 +120,13 @@ JSValue JSSVGPathSegList::replaceItem(ExecState* exec, const ArgList& args)
return jsUndefined();
}
- SVGPathSegList* imp = static_cast<SVGPathSegList*>(impl());
+ SVGPathSegList* list = impl();
+ SVGElement* context = JSSVGContextCache::svgContextForDOMObject(this);
- JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->replaceItem(newItem, index, ec)), m_context.get());
+ JSValue result = toJS(exec, globalObject(), WTF::getPtr(list->replaceItem(newItem, index, ec)), context);
setDOMException(exec, ec);
- m_context->svgAttributeChanged(imp->associatedAttributeName());
+ JSSVGContextCache::propagateSVGDOMChange(this, list->associatedAttributeName());
return result;
}
@@ -136,14 +141,15 @@ JSValue JSSVGPathSegList::removeItem(ExecState* exec, const ArgList& args)
return jsUndefined();
}
- SVGPathSegList* imp = static_cast<SVGPathSegList*>(impl());
+ SVGPathSegList* list = impl();
- RefPtr<SVGPathSeg> obj(imp->removeItem(index, ec));
+ RefPtr<SVGPathSeg> obj(list->removeItem(index, ec));
+ SVGElement* context = JSSVGContextCache::svgContextForDOMObject(this);
- JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), obj.get(), m_context.get());
+ JSValue result = toJS(exec, globalObject(), obj.get(), context);
setDOMException(exec, ec);
- m_context->svgAttributeChanged(imp->associatedAttributeName());
+ JSSVGContextCache::propagateSVGDOMChange(this, list->associatedAttributeName());
return result;
}
@@ -152,12 +158,13 @@ JSValue JSSVGPathSegList::appendItem(ExecState* exec, const ArgList& args)
ExceptionCode ec = 0;
SVGPathSeg* newItem = toSVGPathSeg(args.at(0));
- SVGPathSegList* imp = static_cast<SVGPathSegList*>(impl());
+ SVGPathSegList* list = impl();
+ SVGElement* context = JSSVGContextCache::svgContextForDOMObject(this);
- JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->appendItem(newItem, ec)), m_context.get());
+ JSValue result = toJS(exec, globalObject(), WTF::getPtr(list->appendItem(newItem, ec)), context);
setDOMException(exec, ec);
- m_context->svgAttributeChanged(imp->associatedAttributeName());
+ JSSVGContextCache::propagateSVGDOMChange(this, list->associatedAttributeName());
return result;
}
diff --git a/WebCore/bindings/js/JSSVGPointListCustom.cpp b/WebCore/bindings/js/JSSVGPointListCustom.cpp
deleted file mode 100644
index 1969fe2..0000000
--- a/WebCore/bindings/js/JSSVGPointListCustom.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (C) 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2008 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
- * 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 "JSSVGPointList.h"
-
-#include "JSSVGPoint.h"
-#include "SVGPointList.h"
-
-using namespace JSC;
-
-namespace WebCore {
-
-typedef SVGPODListItem<FloatPoint> PODListItem;
-typedef SVGList<RefPtr<PODListItem> > SVGPointListBase;
-
-static JSValue finishGetter(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGPointList* list, PassRefPtr<PODListItem > item)
-{
- if (ec) {
- setDOMException(exec, ec);
- return jsUndefined();
- }
- return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGPODTypeWrapperCreatorForList<FloatPoint>::create(item.get(), list->associatedAttributeName()).get(), context);
-}
-
-static JSValue finishSetter(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGPointList* list, PassRefPtr<PODListItem > item)
-{
- if (ec) {
- setDOMException(exec, ec);
- return jsUndefined();
- }
- const QualifiedName& attributeName = list->associatedAttributeName();
- context->svgAttributeChanged(attributeName);
- return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGPODTypeWrapperCreatorForList<FloatPoint>::create(item.get(), attributeName).get(), context);
-}
-
-static JSValue finishSetterReadOnlyResult(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGPointList* list, PassRefPtr<PODListItem> item)
-{
- if (ec) {
- setDOMException(exec, ec);
- return jsUndefined();
- }
- context->svgAttributeChanged(list->associatedAttributeName());
- return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<FloatPoint>::create(*item).get(), context);
-}
-
-JSValue JSSVGPointList::clear(ExecState* exec, const ArgList&)
-{
- ExceptionCode ec = 0;
- impl()->clear(ec);
- setDOMException(exec, ec);
- m_context->svgAttributeChanged(impl()->associatedAttributeName());
- return jsUndefined();
-}
-
-JSValue JSSVGPointList::initialize(ExecState* exec, const ArgList& args)
-{
- ExceptionCode ec = 0;
- SVGPointListBase* listImp = impl();
- return finishSetter(exec, ec, context(), impl(),
- listImp->initialize(PODListItem::copy(toSVGPoint(args.at(0))), ec));
-}
-
-JSValue JSSVGPointList::getItem(ExecState* exec, const ArgList& args)
-{
- bool indexOk;
- unsigned index = args.at(0).toUInt32(exec, indexOk);
- if (!indexOk) {
- setDOMException(exec, TYPE_MISMATCH_ERR);
- return jsUndefined();
- }
-
- ExceptionCode ec = 0;
- SVGPointListBase* listImp = impl();
- return finishGetter(exec, ec, context(), impl(),
- listImp->getItem(index, ec));
-}
-
-JSValue JSSVGPointList::insertItemBefore(ExecState* exec, const ArgList& args)
-{
- bool indexOk;
- unsigned index = args.at(1).toUInt32(exec, indexOk);
- if (!indexOk) {
- setDOMException(exec, TYPE_MISMATCH_ERR);
- return jsUndefined();
- }
-
- ExceptionCode ec = 0;
- SVGPointListBase* listImp = impl();
- return finishSetter(exec, ec, context(), impl(),
- listImp->insertItemBefore(PODListItem::copy(toSVGPoint(args.at(0))), index, ec));
-}
-
-JSValue JSSVGPointList::replaceItem(ExecState* exec, const ArgList& args)
-{
- bool indexOk;
- unsigned index = args.at(1).toInt32(exec, indexOk);
- if (!indexOk) {
- setDOMException(exec, TYPE_MISMATCH_ERR);
- return jsUndefined();
- }
-
- ExceptionCode ec = 0;
- SVGPointListBase* listImp = impl();
- return finishSetter(exec, ec, context(), impl(),
- listImp->replaceItem(PODListItem::copy(toSVGPoint(args.at(0))), index, ec));
-}
-
-JSValue JSSVGPointList::removeItem(ExecState* exec, const ArgList& args)
-{
- bool indexOk;
- unsigned index = args.at(0).toInt32(exec, indexOk);
- if (!indexOk) {
- setDOMException(exec, TYPE_MISMATCH_ERR);
- return jsUndefined();
- }
-
- ExceptionCode ec = 0;
- SVGPointListBase* listImp = impl();
- return finishSetterReadOnlyResult(exec, ec, context(), impl(),
- listImp->removeItem(index, ec));
-}
-
-JSValue JSSVGPointList::appendItem(ExecState* exec, const ArgList& args)
-{
- ExceptionCode ec = 0;
- SVGPointListBase* listImp = impl();
- return finishSetter(exec, ec, context(), impl(),
- listImp->appendItem(PODListItem::copy(toSVGPoint(args.at(0))), ec));
-}
-
-}
-
-#endif // ENABLE(SVG)
diff --git a/WebCore/bindings/js/JSSVGTransformListCustom.cpp b/WebCore/bindings/js/JSSVGTransformListCustom.cpp
deleted file mode 100644
index 1a9110a..0000000
--- a/WebCore/bindings/js/JSSVGTransformListCustom.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2008 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
- * 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 "JSSVGTransformList.h"
-
-#include "JSSVGTransform.h"
-#include "SVGTransformList.h"
-
-using namespace JSC;
-
-namespace WebCore {
-
-typedef SVGPODListItem<SVGTransform> PODListItem;
-typedef SVGList<RefPtr<PODListItem> > SVGTransformListBase;
-
-static JSValue finishGetter(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGTransformList* list, PassRefPtr<PODListItem> item)
-{
- if (ec) {
- setDOMException(exec, ec);
- return jsUndefined();
- }
- return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGPODTypeWrapperCreatorForList<SVGTransform>::create(item.get(), list->associatedAttributeName()).get(), context);
-}
-
-static JSValue finishSetter(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGTransformList* list, PassRefPtr<PODListItem> item)
-{
- if (ec) {
- setDOMException(exec, ec);
- return jsUndefined();
- }
- const QualifiedName& attributeName = list->associatedAttributeName();
- context->svgAttributeChanged(attributeName);
- return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGPODTypeWrapperCreatorForList<SVGTransform>::create(item.get(), attributeName).get(), context);
-}
-
-static JSValue finishSetterReadOnlyResult(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGTransformList* list, PassRefPtr<PODListItem> item)
-{
- if (ec) {
- setDOMException(exec, ec);
- return jsUndefined();
- }
- context->svgAttributeChanged(list->associatedAttributeName());
- return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<SVGTransform>::create(*item).get(), context);
-}
-
-JSValue JSSVGTransformList::clear(ExecState* exec, const ArgList&)
-{
- ExceptionCode ec = 0;
- impl()->clear(ec);
- setDOMException(exec, ec);
- m_context->svgAttributeChanged(impl()->associatedAttributeName());
- return jsUndefined();
-}
-
-JSValue JSSVGTransformList::initialize(ExecState* exec, const ArgList& args)
-{
- ExceptionCode ec = 0;
- SVGTransformListBase* listImp = impl();
- return finishSetter(exec, ec, context(), impl(),
- listImp->initialize(PODListItem::copy(toSVGTransform(args.at(0))), ec));
-}
-
-JSValue JSSVGTransformList::getItem(ExecState* exec, const ArgList& args)
-{
- bool indexOk;
- unsigned index = args.at(0).toUInt32(exec, indexOk);
- if (!indexOk) {
- setDOMException(exec, TYPE_MISMATCH_ERR);
- return jsUndefined();
- }
-
- ExceptionCode ec = 0;
- SVGTransformListBase* listImp = impl();
- return finishGetter(exec, ec, context(), impl(),
- listImp->getItem(index, ec));
-}
-
-JSValue JSSVGTransformList::insertItemBefore(ExecState* exec, const ArgList& args)
-{
- bool indexOk;
- unsigned index = args.at(1).toUInt32(exec, indexOk);
- if (!indexOk) {
- setDOMException(exec, TYPE_MISMATCH_ERR);
- return jsUndefined();
- }
-
- ExceptionCode ec = 0;
- SVGTransformListBase* listImp = impl();
- return finishSetter(exec, ec, context(), impl(),
- listImp->insertItemBefore(PODListItem::copy(toSVGTransform(args.at(0))), index, ec));
-}
-
-JSValue JSSVGTransformList::replaceItem(ExecState* exec, const ArgList& args)
-{
- bool indexOk;
- unsigned index = args.at(1).toUInt32(exec, indexOk);
- if (!indexOk) {
- setDOMException(exec, TYPE_MISMATCH_ERR);
- return jsUndefined();
- }
-
- ExceptionCode ec = 0;
- SVGTransformListBase* listImp = impl();
- return finishSetter(exec, ec, context(), impl(),
- listImp->replaceItem(PODListItem::copy(toSVGTransform(args.at(0))), index, ec));
-}
-
-JSValue JSSVGTransformList::removeItem(ExecState* exec, const ArgList& args)
-{
- bool indexOk;
- unsigned index = args.at(0).toUInt32(exec, indexOk);
- if (!indexOk) {
- setDOMException(exec, TYPE_MISMATCH_ERR);
- return jsUndefined();
- }
-
- ExceptionCode ec = 0;
- SVGTransformListBase* listImp = impl();
- return finishSetterReadOnlyResult(exec, ec, context(), impl(),
- listImp->removeItem(index, ec));
-}
-
-JSValue JSSVGTransformList::appendItem(ExecState* exec, const ArgList& args)
-{
- ExceptionCode ec = 0;
- SVGTransformListBase* listImp = impl();
- return finishSetter(exec, ec, context(), impl(),
- listImp->appendItem(PODListItem::copy(toSVGTransform(args.at(0))), ec));
-}
-
-}
-
-#endif // ENABLE(SVG)
diff --git a/WebCore/bindings/js/JSStorageCustom.cpp b/WebCore/bindings/js/JSStorageCustom.cpp
index e416d35..3cfe22e 100644
--- a/WebCore/bindings/js/JSStorageCustom.cpp
+++ b/WebCore/bindings/js/JSStorageCustom.cpp
@@ -64,13 +64,13 @@ bool JSStorage::deleteProperty(ExecState* exec, const Identifier& propertyName)
return true;
}
-void JSStorage::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void JSStorage::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
unsigned length = m_impl->length();
for (unsigned i = 0; i < length; ++i)
propertyNames.add(Identifier(exec, m_impl->key(i)));
- Base::getOwnPropertyNames(exec, propertyNames);
+ Base::getOwnPropertyNames(exec, propertyNames, mode);
}
bool JSStorage::putDelegate(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot&)
diff --git a/WebCore/bindings/js/JSWebGLArrayHelper.h b/WebCore/bindings/js/JSWebGLArrayHelper.h
index f538cce..3326d76 100644
--- a/WebCore/bindings/js/JSWebGLArrayHelper.h
+++ b/WebCore/bindings/js/JSWebGLArrayHelper.h
@@ -27,6 +27,8 @@
#ifndef JSWebGLArrayHelper_h
#define JSWebGLArrayHelper_h
+#include "ExceptionCode.h"
+#include "JSDOMBinding.h"
#include <interpreter/CallFrame.h>
#include <runtime/ArgList.h>
#include <runtime/Error.h>
@@ -45,11 +47,15 @@ JSC::JSValue setWebGLArrayFromArray(JSC::ExecState* exec, T* webGLArray, JSC::Ar
if (args.size() == 2)
offset = args.at(1).toInt32(exec);
int length = array->get(exec, JSC::Identifier(exec, "length")).toInt32(exec);
- for (int i = 0; i < length; i++) {
- JSC::JSValue v = array->get(exec, i);
- if (exec->hadException())
- return JSC::jsUndefined();
- webGLArray->set(i + offset, v.toNumber(exec));
+ if (offset + length > webGLArray->length())
+ setDOMException(exec, INDEX_SIZE_ERR);
+ else {
+ for (int i = 0; i < length; i++) {
+ JSC::JSValue v = array->get(exec, i);
+ if (exec->hadException())
+ return JSC::jsUndefined();
+ webGLArray->set(i + offset, v.toNumber(exec));
+ }
}
return JSC::jsUndefined();
diff --git a/WebCore/bindings/js/JSWebGLFloatArrayCustom.cpp b/WebCore/bindings/js/JSWebGLFloatArrayCustom.cpp
index 5f5b24f..f4acbcf 100644
--- a/WebCore/bindings/js/JSWebGLFloatArrayCustom.cpp
+++ b/WebCore/bindings/js/JSWebGLFloatArrayCustom.cpp
@@ -38,7 +38,7 @@ namespace WebCore {
void JSWebGLFloatArray::indexSetter(JSC::ExecState* exec, unsigned index, JSC::JSValue value)
{
- impl()->set(index, static_cast<float>(value.toInt32(exec)));
+ impl()->set(index, static_cast<float>(value.toNumber(exec)));
}
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WebGLFloatArray* object)
@@ -52,9 +52,9 @@ JSC::JSValue JSWebGLFloatArray::set(JSC::ExecState* exec, JSC::ArgList const& ar
return throwError(exec, SyntaxError);
if (args.size() == 2 && args.at(0).isInt32()) {
- // void set(in unsigned long index, in long value);
+ // void set(in unsigned long index, in float value);
unsigned index = args.at(0).toUInt32(exec);
- impl()->set(index, static_cast<signed char>(args.at(1).toInt32(exec)));
+ impl()->set(index, static_cast<float>(args.at(1).toNumber(exec)));
return jsUndefined();
}
diff --git a/WebCore/bindings/js/JSWebGLIntArrayCustom.cpp b/WebCore/bindings/js/JSWebGLIntArrayCustom.cpp
index 9c384d8..de08256 100644
--- a/WebCore/bindings/js/JSWebGLIntArrayCustom.cpp
+++ b/WebCore/bindings/js/JSWebGLIntArrayCustom.cpp
@@ -54,7 +54,7 @@ JSC::JSValue JSWebGLIntArray::set(JSC::ExecState* exec, JSC::ArgList const& args
if (args.size() == 2 && args.at(0).isInt32()) {
// void set(in unsigned long index, in long value);
unsigned index = args.at(0).toUInt32(exec);
- impl()->set(index, static_cast<signed char>(args.at(1).toInt32(exec)));
+ impl()->set(index, static_cast<signed int>(args.at(1).toInt32(exec)));
return jsUndefined();
}
diff --git a/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp b/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
index 3de9606..e336027 100644
--- a/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
+++ b/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
@@ -29,12 +29,14 @@
#include "JSWebGLRenderingContext.h"
-#include "WebGLRenderingContext.h"
#include "ExceptionCode.h"
#include "HTMLCanvasElement.h"
#include "HTMLImageElement.h"
+#include "HTMLVideoElement.h"
#include "JSHTMLCanvasElement.h"
#include "JSHTMLImageElement.h"
+#include "JSHTMLVideoElement.h"
+#include "JSImageData.h"
#include "JSWebGLBuffer.h"
#include "JSWebGLFloatArray.h"
#include "JSWebGLFramebuffer.h"
@@ -48,11 +50,12 @@
#include "JSWebKitCSSMatrix.h"
#include "NotImplemented.h"
#include "WebGLBuffer.h"
-#include "WebGLGetInfo.h"
#include "WebGLFloatArray.h"
#include "WebGLFramebuffer.h"
+#include "WebGLGetInfo.h"
#include "WebGLIntArray.h"
#include "WebGLProgram.h"
+#include "WebGLRenderingContext.h"
#include <runtime/Error.h>
#include <wtf/FastMalloc.h>
#include <wtf/OwnFastMallocPtr.h>
@@ -79,8 +82,7 @@ JSValue JSWebGLRenderingContext::bufferData(JSC::ExecState* exec, JSC::ArgList c
static_cast<WebGLRenderingContext*>(impl())->bufferData(target, array, usage, ec);
}
- if (ec != 0)
- setDOMException(exec, ec);
+ setDOMException(exec, ec);
return jsUndefined();
}
@@ -97,8 +99,7 @@ JSValue JSWebGLRenderingContext::bufferSubData(JSC::ExecState* exec, JSC::ArgLis
static_cast<WebGLRenderingContext*>(impl())->bufferSubData(target, offset, array, ec);
- if (ec != 0)
- setDOMException(exec, ec);
+ setDOMException(exec, ec);
return jsUndefined();
}
@@ -307,27 +308,60 @@ JSValue JSWebGLRenderingContext::getVertexAttrib(ExecState* exec, const ArgList&
return getObjectParameter(this, exec, args, kVertexAttrib);
}
-// void texImage2DHTML(in unsigned long target, in unsigned long level, in HTMLImageElement image);
+// void texImage2D(in GLenum target, in GLint level, in GLenum internalformat, in GLsizei width, in GLsizei height, in GLint border, in GLenum format, in GLenum type, in WebGLArray pixels);
+// void texImage2D(in GLenum target, in GLint level, in ImageData pixels, [Optional] GLboolean flipY, [Optional] in premultiplyAlpha);
+// void texImage2D(in GLenum target, in GLint level, in HTMLImageElement image, [Optional] in GLboolean flipY, [Optional] in premultiplyAlpha);
+// void texImage2D(in GLenum target, in GLint level, in HTMLCanvasElement canvas, [Optional] in GLboolean flipY, [Optional] in premultiplyAlpha);
+// void texImage2D(in GLenum target, in GLint level, in HTMLVideoElement video, [Optional] in GLboolean flipY, [Optional] in premultiplyAlpha);
JSValue JSWebGLRenderingContext::texImage2D(ExecState* exec, const ArgList& args)
{
- if (args.size() < 3)
+ if (args.size() < 3 || args.size() > 9)
return throwError(exec, SyntaxError);
ExceptionCode ec = 0;
+
WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(impl());
unsigned target = args.at(0).toInt32(exec);
if (exec->hadException())
return jsUndefined();
-
+
unsigned level = args.at(1).toInt32(exec);
if (exec->hadException())
return jsUndefined();
+
+ JSObject* o = 0;
+
+ if (args.size() <= 5) {
+ // This is one of the last 4 forms. Param 2 can be ImageData or <img>, <canvas> or <video> element.
+ JSValue value = args.at(2);
- if (args.size() > 5) {
- // This must be the bare array case.
+ if (!value.isObject())
+ return throwError(exec, TypeError);
+
+ o = asObject(value);
+
+ bool flipY = args.at(3).toBoolean(exec);
+ bool premultiplyAlpha = args.at(4).toBoolean(exec);
+
+ if (o->inherits(&JSImageData::s_info)) {
+ ImageData* data = static_cast<ImageData*>(static_cast<JSImageData*>(o)->impl());
+ context->texImage2D(target, level, data, flipY, premultiplyAlpha, ec);
+ } else if (o->inherits(&JSHTMLImageElement::s_info)) {
+ HTMLImageElement* element = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(o)->impl());
+ context->texImage2D(target, level, element, flipY, premultiplyAlpha, ec);
+ } else if (o->inherits(&JSHTMLCanvasElement::s_info)) {
+ HTMLCanvasElement* element = static_cast<HTMLCanvasElement*>(static_cast<JSHTMLCanvasElement*>(o)->impl());
+ context->texImage2D(target, level, element, flipY, premultiplyAlpha, ec);
+ } else if (o->inherits(&JSHTMLVideoElement::s_info)) {
+ HTMLVideoElement* element = static_cast<HTMLVideoElement*>(static_cast<JSHTMLVideoElement*>(o)->impl());
+ context->texImage2D(target, level, element, flipY, premultiplyAlpha, ec);
+ } else
+ ec = TYPE_MISMATCH_ERR;
+ } else {
if (args.size() != 9)
return throwError(exec, SyntaxError);
-
+
+ // This must be the WebGLArray case
unsigned internalformat = args.at(2).toInt32(exec);
if (exec->hadException())
return jsUndefined();
@@ -352,104 +386,143 @@ JSValue JSWebGLRenderingContext::texImage2D(ExecState* exec, const ArgList& args
if (exec->hadException())
return jsUndefined();
- WebGLArray* array = toWebGLArray(args.at(8));
- if (exec->hadException())
- return jsUndefined();
+ JSValue value = args.at(8);
- if (!array)
+ // For this case passing 0 (for a null array) is allowed
+ if (value.isNull())
+ context->texImage2D(target, level, internalformat, width, height, border, format, type, 0, ec);
+ else if (value.isObject()) {
+ o = asObject(value);
+
+ if (o->inherits(&JSWebGLArray::s_info)) {
+ // FIXME: Need to check to make sure WebGLArray is a WebGLByteArray or WebGLShortArray,
+ // depending on the passed type parameter.
+ WebGLArray* obj = static_cast<WebGLArray*>(static_cast<JSWebGLArray*>(o)->impl());
+ context->texImage2D(target, level, internalformat, width, height, border, format, type, obj, ec);
+ } else
+ return throwError(exec, TypeError);
+ } else
return throwError(exec, TypeError);
-
- // FIXME: Need to check to make sure WebGLArray is a WebGLByteArray or WebGLShortArray,
- // depending on the passed type parameter.
-
- context->texImage2D(target, level, internalformat, width, height, border, format, type, array, ec);
- return jsUndefined();
- }
-
- // The image parameter can be a <img> or <canvas> element.
- JSValue value = args.at(2);
- if (!value.isObject())
- return throwError(exec, TypeError);
- JSObject* o = asObject(value);
-
- bool flipY = (args.size() > 3) ? args.at(3).toBoolean(exec) : false;
- bool premultiplyAlpha = (args.size() > 4) ? args.at(3).toBoolean(exec) : false;
-
- if (o->inherits(&JSHTMLImageElement::s_info)) {
- HTMLImageElement* imgElt = static_cast<HTMLImageElement*>(static_cast<JSHTMLElement*>(o)->impl());
- context->texImage2D(target, level, imgElt, flipY, premultiplyAlpha, ec);
- } else if (o->inherits(&JSHTMLCanvasElement::s_info)) {
- HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(static_cast<JSHTMLElement*>(o)->impl());
- context->texImage2D(target, level, canvas, flipY, premultiplyAlpha, ec);
- } else {
- setDOMException(exec, TYPE_MISMATCH_ERR);
}
+ setDOMException(exec, ec);
return jsUndefined();
}
-// void texSubImage2DHTML(in unsigned long target, in unsigned long level, in unsigned long xoff, in unsigned long yoff, in unsigned long width, in unsigned long height, in HTMLImageElement image);
+// void texSubImage2D(in GLenum target, in GLint level, in GLint xoffset, in GLint yoffset, in GLsizei width, in GLsizei height, in GLenum format, in GLenum type, in WebGLArray pixels);
+// void texSubImage2D(in GLenum target, in GLint level, in GLint xoffset, in GLint yoffset, in ImageData pixels, [Optional] GLboolean flipY, [Optional] in premultiplyAlpha);
+// void texSubImage2D(in GLenum target, in GLint level, in GLint xoffset, in GLint yoffset, in HTMLImageElement image, [Optional] GLboolean flipY, [Optional] in premultiplyAlpha);
+// void texSubImage2D(in GLenum target, in GLint level, in GLint xoffset, in GLint yoffset, in HTMLCanvasElement canvas, [Optional] GLboolean flipY, [Optional] in premultiplyAlpha);
+// void texSubImage2D(in GLenum target, in GLint level, in GLint xoffset, in GLint yoffset, in HTMLVideoElement video, [Optional] GLboolean flipY, [Optional] in premultiplyAlpha);
JSValue JSWebGLRenderingContext::texSubImage2D(ExecState* exec, const ArgList& args)
{
- if (args.size() < 7 || args.size() > 9)
+ if (args.size() < 5 || args.size() > 9)
return throwError(exec, SyntaxError);
+ ExceptionCode ec = 0;
+
WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(impl());
unsigned target = args.at(0).toInt32(exec);
+ if (exec->hadException())
+ return jsUndefined();
+
unsigned level = args.at(1).toInt32(exec);
- unsigned xoff = args.at(2).toInt32(exec);
- unsigned yoff = args.at(3).toInt32(exec);
- unsigned width = args.at(4).toInt32(exec);
- unsigned height = args.at(5).toInt32(exec);
+ if (exec->hadException())
+ return jsUndefined();
- // The image parameter can be a <img> or <canvas> element.
- JSValue value = args.at(6);
- if (!value.isObject())
- return throwError(exec, TypeError);
- JSObject* o = asObject(value);
+ unsigned xoff = args.at(2).toInt32(exec);
+ if (exec->hadException())
+ return jsUndefined();
- bool flipY = (args.size() > 3) ? args.at(3).toBoolean(exec) : false;
- bool premultiplyAlpha = (args.size() > 4) ? args.at(3).toBoolean(exec) : false;
+ unsigned yoff = args.at(3).toInt32(exec);
+ if (exec->hadException())
+ return jsUndefined();
- ExceptionCode ec = 0;
- if (o->inherits(&JSHTMLImageElement::s_info)) {
- HTMLImageElement* imgElt = static_cast<HTMLImageElement*>(static_cast<JSHTMLElement*>(o)->impl());
- context->texSubImage2D(target, level, xoff, yoff, width, height, imgElt, flipY, premultiplyAlpha, ec);
- } else if (o->inherits(&JSHTMLCanvasElement::s_info)) {
- HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(static_cast<JSHTMLElement*>(o)->impl());
- context->texSubImage2D(target, level, xoff, yoff, width, height, canvas, flipY, premultiplyAlpha, ec);
- } else
- ec = TYPE_MISMATCH_ERR;
+ JSObject* o = 0;
+
+ if (args.size() <= 7) {
+ // This is one of the last 4 forms. Param 4 can be <img>, <canvas> or <video> element, of the format param.
+ JSValue value = args.at(4);
+
+ if (!value.isObject())
+ return throwError(exec, SyntaxError);
+
+ o = asObject(value);
+
+ bool flipY = args.at(5).toBoolean(exec);
+ bool premultiplyAlpha = args.at(6).toBoolean(exec);
+
+ if (o->inherits(&JSImageData::s_info)) {
+ ImageData* data = static_cast<ImageData*>(static_cast<JSImageData*>(o)->impl());
+ context->texSubImage2D(target, level, xoff, yoff, data, flipY, premultiplyAlpha, ec);
+ } else if (o->inherits(&JSHTMLImageElement::s_info)) {
+ HTMLImageElement* element = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(o)->impl());
+ context->texSubImage2D(target, level, xoff, yoff, element, flipY, premultiplyAlpha, ec);
+ } else if (o->inherits(&JSHTMLCanvasElement::s_info)) {
+ HTMLCanvasElement* element = static_cast<HTMLCanvasElement*>(static_cast<JSHTMLCanvasElement*>(o)->impl());
+ context->texSubImage2D(target, level, xoff, yoff, element, flipY, premultiplyAlpha, ec);
+ } else if (o->inherits(&JSHTMLVideoElement::s_info)) {
+ HTMLVideoElement* element = static_cast<HTMLVideoElement*>(static_cast<JSHTMLVideoElement*>(o)->impl());
+ context->texSubImage2D(target, level, xoff, yoff, element, flipY, premultiplyAlpha, ec);
+ } else
+ ec = TYPE_MISMATCH_ERR;
+ } else {
+ // This must be the WebGLArray form
+ if (args.size() != 9)
+ return throwError(exec, SyntaxError);
+
+ unsigned width = args.at(4).toInt32(exec);
+ if (exec->hadException())
+ return jsUndefined();
+
+ unsigned height = args.at(5).toInt32(exec);
+ if (exec->hadException())
+ return jsUndefined();
+
+ unsigned format = args.at(6).toInt32(exec);
+ if (exec->hadException())
+ return jsUndefined();
+
+ unsigned type = args.at(7).toInt32(exec);
+ if (exec->hadException())
+ return jsUndefined();
+
+ JSValue value = args.at(8);
+ if (!value.isObject())
+ context->texSubImage2D(target, level, xoff, yoff, width, height, format, type, 0, ec);
+ else {
+ o = asObject(value);
+
+ if (o->inherits(&JSWebGLArray::s_info)) {
+ WebGLArray* obj = static_cast<WebGLArray*>(static_cast<JSWebGLArray*>(o)->impl());
+ context->texSubImage2D(target, level, xoff, yoff, width, height, format, type, obj, ec);
+ } else
+ return throwError(exec, TypeError);
+ }
+ }
- if (ec != 0)
- setDOMException(exec, ec);
- return jsUndefined();
+ setDOMException(exec, ec);
+ return jsUndefined();
}
-template<typename T>
-void toArray(JSC::ExecState* exec, JSC::JSValue value, T*& array, int& size)
+template<typename T, size_t inlineCapacity>
+bool toVector(JSC::ExecState* exec, JSC::JSValue value, Vector<T, inlineCapacity>& vector)
{
- array = 0;
-
if (!value.isObject())
- return;
-
+ return false;
+
JSC::JSObject* object = asObject(value);
- int length = object->get(exec, JSC::Identifier(exec, "length")).toInt32(exec);
- void* tempValues;
- if (!tryFastMalloc(length * sizeof(T)).getValue(tempValues))
- return;
-
- T* values = static_cast<T*>(tempValues);
- for (int i = 0; i < length; ++i) {
+ int32_t length = object->get(exec, JSC::Identifier(exec, "length")).toInt32(exec);
+ vector.resize(length);
+
+ for (int32_t i = 0; i < length; ++i) {
JSC::JSValue v = object->get(exec, i);
if (exec->hadException())
- return;
- values[i] = static_cast<T>(v.toNumber(exec));
+ return false;
+ vector[i] = static_cast<T>(v.toNumber(exec));
}
- array = values;
- size = length;
+ return true;
}
enum DataFunctionToCall {
@@ -497,40 +570,69 @@ static JSC::JSValue dataFunctionf(DataFunctionToCall f, JSC::ExecState* exec, co
ExceptionCode ec = 0;
if (webGLArray) {
- switch(f) {
- case f_uniform1v: context->uniform1fv(location, webGLArray.get(), ec); break;
- case f_uniform2v: context->uniform2fv(location, webGLArray.get(), ec); break;
- case f_uniform3v: context->uniform3fv(location, webGLArray.get(), ec); break;
- case f_uniform4v: context->uniform4fv(location, webGLArray.get(), ec); break;
- case f_vertexAttrib1v: context->vertexAttrib1fv(index, webGLArray.get()); break;
- case f_vertexAttrib2v: context->vertexAttrib2fv(index, webGLArray.get()); break;
- case f_vertexAttrib3v: context->vertexAttrib3fv(index, webGLArray.get()); break;
- case f_vertexAttrib4v: context->vertexAttrib4fv(index, webGLArray.get()); break;
+ switch (f) {
+ case f_uniform1v:
+ context->uniform1fv(location, webGLArray.get(), ec);
+ break;
+ case f_uniform2v:
+ context->uniform2fv(location, webGLArray.get(), ec);
+ break;
+ case f_uniform3v:
+ context->uniform3fv(location, webGLArray.get(), ec);
+ break;
+ case f_uniform4v:
+ context->uniform4fv(location, webGLArray.get(), ec);
+ break;
+ case f_vertexAttrib1v:
+ context->vertexAttrib1fv(index, webGLArray.get());
+ break;
+ case f_vertexAttrib2v:
+ context->vertexAttrib2fv(index, webGLArray.get());
+ break;
+ case f_vertexAttrib3v:
+ context->vertexAttrib3fv(index, webGLArray.get());
+ break;
+ case f_vertexAttrib4v:
+ context->vertexAttrib4fv(index, webGLArray.get());
+ break;
}
- if (ec != 0)
- setDOMException(exec, ec);
+
+ setDOMException(exec, ec);
return jsUndefined();
}
-
- float* array;
- int size;
- toArray<float>(exec, args.at(1), array, size);
-
- if (!array)
+
+ Vector<float, 64> array;
+ if (!toVector(exec, args.at(1), array))
return throwError(exec, TypeError);
- switch(f) {
- case f_uniform1v: context->uniform1fv(location, array, size, ec); break;
- case f_uniform2v: context->uniform2fv(location, array, size, ec); break;
- case f_uniform3v: context->uniform3fv(location, array, size, ec); break;
- case f_uniform4v: context->uniform4fv(location, array, size, ec); break;
- case f_vertexAttrib1v: context->vertexAttrib1fv(index, array, size); break;
- case f_vertexAttrib2v: context->vertexAttrib2fv(index, array, size); break;
- case f_vertexAttrib3v: context->vertexAttrib3fv(index, array, size); break;
- case f_vertexAttrib4v: context->vertexAttrib4fv(index, array, size); break;
+ switch (f) {
+ case f_uniform1v:
+ context->uniform1fv(location, array.data(), array.size(), ec);
+ break;
+ case f_uniform2v:
+ context->uniform2fv(location, array.data(), array.size(), ec);
+ break;
+ case f_uniform3v:
+ context->uniform3fv(location, array.data(), array.size(), ec);
+ break;
+ case f_uniform4v:
+ context->uniform4fv(location, array.data(), array.size(), ec);
+ break;
+ case f_vertexAttrib1v:
+ context->vertexAttrib1fv(index, array.data(), array.size());
+ break;
+ case f_vertexAttrib2v:
+ context->vertexAttrib2fv(index, array.data(), array.size());
+ break;
+ case f_vertexAttrib3v:
+ context->vertexAttrib3fv(index, array.data(), array.size());
+ break;
+ case f_vertexAttrib4v:
+ context->vertexAttrib4fv(index, array.data(), array.size());
+ break;
}
- if (ec != 0)
- setDOMException(exec, ec);
+
+ setDOMException(exec, ec);
return jsUndefined();
}
@@ -550,34 +652,50 @@ static JSC::JSValue dataFunctioni(DataFunctionToCall f, JSC::ExecState* exec, co
ExceptionCode ec = 0;
if (webGLArray) {
- switch(f) {
- case f_uniform1v: context->uniform1iv(location, webGLArray.get(), ec); break;
- case f_uniform2v: context->uniform2iv(location, webGLArray.get(), ec); break;
- case f_uniform3v: context->uniform3iv(location, webGLArray.get(), ec); break;
- case f_uniform4v: context->uniform4iv(location, webGLArray.get(), ec); break;
- default: break;
+ switch (f) {
+ case f_uniform1v:
+ context->uniform1iv(location, webGLArray.get(), ec);
+ break;
+ case f_uniform2v:
+ context->uniform2iv(location, webGLArray.get(), ec);
+ break;
+ case f_uniform3v:
+ context->uniform3iv(location, webGLArray.get(), ec);
+ break;
+ case f_uniform4v:
+ context->uniform4iv(location, webGLArray.get(), ec);
+ break;
+ default:
+ break;
}
- if (ec != 0)
- setDOMException(exec, ec);
+
+ setDOMException(exec, ec);
return jsUndefined();
}
-
- int* array;
- int size;
- toArray<int>(exec, args.at(1), array, size);
-
- if (!array)
+
+
+ Vector<int, 64> array;
+ if (!toVector(exec, args.at(1), array))
return throwError(exec, TypeError);
- switch(f) {
- case f_uniform1v: context->uniform1iv(location, array, size, ec); break;
- case f_uniform2v: context->uniform2iv(location, array, size, ec); break;
- case f_uniform3v: context->uniform3iv(location, array, size, ec); break;
- case f_uniform4v: context->uniform4iv(location, array, size, ec); break;
- default: break;
+ switch (f) {
+ case f_uniform1v:
+ context->uniform1iv(location, array.data(), array.size(), ec);
+ break;
+ case f_uniform2v:
+ context->uniform2iv(location, array.data(), array.size(), ec);
+ break;
+ case f_uniform3v:
+ context->uniform3iv(location, array.data(), array.size(), ec);
+ break;
+ case f_uniform4v:
+ context->uniform4iv(location, array.data(), array.size(), ec);
+ break;
+ default:
+ break;
}
- if (ec != 0)
- setDOMException(exec, ec);
+
+ setDOMException(exec, ec);
return jsUndefined();
}
@@ -601,30 +719,39 @@ static JSC::JSValue dataFunctionMatrix(DataFunctionMatrixToCall f, JSC::ExecStat
ExceptionCode ec = 0;
if (webGLArray) {
- switch(f) {
- case f_uniformMatrix2fv: context->uniformMatrix2fv(location, transpose, webGLArray.get(), ec); break;
- case f_uniformMatrix3fv: context->uniformMatrix3fv(location, transpose, webGLArray.get(), ec); break;
- case f_uniformMatrix4fv: context->uniformMatrix4fv(location, transpose, webGLArray.get(), ec); break;
+ switch (f) {
+ case f_uniformMatrix2fv:
+ context->uniformMatrix2fv(location, transpose, webGLArray.get(), ec);
+ break;
+ case f_uniformMatrix3fv:
+ context->uniformMatrix3fv(location, transpose, webGLArray.get(), ec);
+ break;
+ case f_uniformMatrix4fv:
+ context->uniformMatrix4fv(location, transpose, webGLArray.get(), ec);
+ break;
}
- if (ec != 0)
- setDOMException(exec, ec);
+
+ setDOMException(exec, ec);
return jsUndefined();
}
-
- float* array;
- int size;
- toArray<float>(exec, args.at(2), array, size);
-
- if (!array)
+
+ Vector<float, 64> array;
+ if (!toVector(exec, args.at(2), array))
return throwError(exec, TypeError);
- switch(f) {
- case f_uniformMatrix2fv: context->uniformMatrix2fv(location, transpose, array, size, ec); break;
- case f_uniformMatrix3fv: context->uniformMatrix3fv(location, transpose, array, size, ec); break;
- case f_uniformMatrix4fv: context->uniformMatrix4fv(location, transpose, array, size, ec); break;
+ switch (f) {
+ case f_uniformMatrix2fv:
+ context->uniformMatrix2fv(location, transpose, array.data(), array.size(), ec);
+ break;
+ case f_uniformMatrix3fv:
+ context->uniformMatrix3fv(location, transpose, array.data(), array.size(), ec);
+ break;
+ case f_uniformMatrix4fv:
+ context->uniformMatrix4fv(location, transpose, array.data(), array.size(), ec);
+ break;
}
- if (ec != 0)
- setDOMException(exec, ec);
+
+ setDOMException(exec, ec);
return jsUndefined();
}
diff --git a/WebCore/bindings/js/JSWebGLShortArrayCustom.cpp b/WebCore/bindings/js/JSWebGLShortArrayCustom.cpp
index 462b09a..899b0c9 100644
--- a/WebCore/bindings/js/JSWebGLShortArrayCustom.cpp
+++ b/WebCore/bindings/js/JSWebGLShortArrayCustom.cpp
@@ -54,7 +54,7 @@ JSC::JSValue JSWebGLShortArray::set(JSC::ExecState* exec, JSC::ArgList const& ar
if (args.size() == 2 && args.at(0).isInt32()) {
// void set(in unsigned long index, in long value);
unsigned index = args.at(0).toUInt32(exec);
- impl()->set(index, static_cast<signed char>(args.at(1).toInt32(exec)));
+ impl()->set(index, static_cast<signed short>(args.at(1).toInt32(exec)));
return jsUndefined();
}
diff --git a/WebCore/bindings/js/JSWebGLUnsignedByteArrayCustom.cpp b/WebCore/bindings/js/JSWebGLUnsignedByteArrayCustom.cpp
index 35a545d..b576374 100644
--- a/WebCore/bindings/js/JSWebGLUnsignedByteArrayCustom.cpp
+++ b/WebCore/bindings/js/JSWebGLUnsignedByteArrayCustom.cpp
@@ -54,7 +54,7 @@ JSC::JSValue JSWebGLUnsignedByteArray::set(JSC::ExecState* exec, JSC::ArgList co
if (args.size() == 2 && args.at(0).isInt32()) {
// void set(in unsigned long index, in long value);
unsigned index = args.at(0).toUInt32(exec);
- impl()->set(index, static_cast<signed char>(args.at(1).toInt32(exec)));
+ impl()->set(index, static_cast<unsigned char>(args.at(1).toInt32(exec)));
return jsUndefined();
}
diff --git a/WebCore/bindings/js/JSWebGLUnsignedIntArrayCustom.cpp b/WebCore/bindings/js/JSWebGLUnsignedIntArrayCustom.cpp
index ea28111..c8b7454 100644
--- a/WebCore/bindings/js/JSWebGLUnsignedIntArrayCustom.cpp
+++ b/WebCore/bindings/js/JSWebGLUnsignedIntArrayCustom.cpp
@@ -38,7 +38,7 @@ namespace WebCore {
void JSWebGLUnsignedIntArray::indexSetter(JSC::ExecState* exec, unsigned index, JSC::JSValue value)
{
- impl()->set(index, static_cast<unsigned int>(value.toInt32(exec)));
+ impl()->set(index, static_cast<unsigned int>(value.toUInt32(exec)));
}
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WebGLUnsignedIntArray* object)
@@ -54,7 +54,7 @@ JSC::JSValue JSWebGLUnsignedIntArray::set(JSC::ExecState* exec, JSC::ArgList con
if (args.size() == 2 && args.at(0).isInt32()) {
// void set(in unsigned long index, in long value);
unsigned index = args.at(0).toUInt32(exec);
- impl()->set(index, static_cast<signed char>(args.at(1).toInt32(exec)));
+ impl()->set(index, static_cast<unsigned int>(args.at(1).toUInt32(exec)));
return jsUndefined();
}
diff --git a/WebCore/bindings/js/JSWebGLUnsignedShortArrayCustom.cpp b/WebCore/bindings/js/JSWebGLUnsignedShortArrayCustom.cpp
index 898cc06..0c82c3e 100644
--- a/WebCore/bindings/js/JSWebGLUnsignedShortArrayCustom.cpp
+++ b/WebCore/bindings/js/JSWebGLUnsignedShortArrayCustom.cpp
@@ -54,7 +54,7 @@ JSC::JSValue JSWebGLUnsignedShortArray::set(JSC::ExecState* exec, JSC::ArgList c
if (args.size() == 2 && args.at(0).isInt32()) {
// void set(in unsigned long index, in long value);
unsigned index = args.at(0).toUInt32(exec);
- impl()->set(index, static_cast<signed char>(args.at(1).toInt32(exec)));
+ impl()->set(index, static_cast<unsigned short>(args.at(1).toInt32(exec)));
return jsUndefined();
}
diff --git a/WebCore/bindings/js/JSWebSocketConstructor.h b/WebCore/bindings/js/JSWebSocketConstructor.h
index 069647a..633e612 100644
--- a/WebCore/bindings/js/JSWebSocketConstructor.h
+++ b/WebCore/bindings/js/JSWebSocketConstructor.h
@@ -31,6 +31,8 @@
#ifndef JSWebSocketConstructor_h
#define JSWebSocketConstructor_h
+#if ENABLE(WEB_SOCKETS)
+
#include "JSDOMBinding.h"
namespace WebCore {
@@ -45,6 +47,8 @@ class JSWebSocketConstructor : public DOMConstructorObject {
virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
};
-} // namespace WebCore
+} // namespace WebCore
+
+#endif // ENABLE(WEB_SOCKETS)
-#endif // JSWebSocketConstructor_h
+#endif // JSWebSocketConstructor_h
diff --git a/WebCore/bindings/js/JSWorkerContextBase.cpp b/WebCore/bindings/js/JSWorkerContextBase.cpp
index f0c4efa..2491f4d 100644
--- a/WebCore/bindings/js/JSWorkerContextBase.cpp
+++ b/WebCore/bindings/js/JSWorkerContextBase.cpp
@@ -42,7 +42,7 @@ namespace WebCore {
ASSERT_CLASS_FITS_IN_CELL(JSWorkerContextBase);
-const ClassInfo JSWorkerContextBase::s_info = { "WorkerContext", 0, 0, 0 };
+const ClassInfo JSWorkerContextBase::s_info = { "WorkerContext", &JSDOMGlobalObject::s_info, 0, 0 };
JSWorkerContextBase::JSWorkerContextBase(NonNullPassRefPtr<JSC::Structure> structure, PassRefPtr<WorkerContext> impl)
: JSDOMGlobalObject(structure, new JSDOMGlobalObjectData(normalWorld(*impl->script()->globalData())), this)
diff --git a/WebCore/bindings/js/JSWorkerContextCustom.cpp b/WebCore/bindings/js/JSWorkerContextCustom.cpp
index 490d9b1..ab28674 100644
--- a/WebCore/bindings/js/JSWorkerContextCustom.cpp
+++ b/WebCore/bindings/js/JSWorkerContextCustom.cpp
@@ -32,8 +32,10 @@
#include "JSDOMBinding.h"
#include "JSDOMGlobalObject.h"
#include "JSEventListener.h"
+#include "JSEventSourceConstructor.h"
#include "JSMessageChannelConstructor.h"
#include "JSMessagePort.h"
+#include "JSWebSocketConstructor.h"
#include "JSWorkerLocation.h"
#include "JSWorkerNavigator.h"
#include "JSXMLHttpRequestConstructor.h"
@@ -43,10 +45,6 @@
#include "WorkerNavigator.h"
#include <interpreter/Interpreter.h>
-#if ENABLE(EVENTSOURCE)
-#include "JSEventSourceConstructor.h"
-#endif
-
using namespace JSC;
namespace WebCore {
@@ -93,6 +91,13 @@ JSValue JSWorkerContext::xmlHttpRequest(ExecState* exec) const
return getDOMConstructor<JSXMLHttpRequestConstructor>(exec, this);
}
+#if ENABLE(WEB_SOCKETS)
+JSValue JSWorkerContext::webSocket(ExecState* exec) const
+{
+ return getDOMConstructor<JSWebSocketConstructor>(exec, this);
+}
+#endif
+
JSValue JSWorkerContext::importScripts(ExecState* exec, const ArgList& args)
{
if (!args.size())
diff --git a/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp b/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
index 7ee2720..d35d53a 100644
--- a/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
+++ b/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
@@ -29,18 +29,18 @@
#include "config.h"
#include "JSXMLHttpRequest.h"
+#include "Blob.h"
#include "DOMWindow.h"
#include "Document.h"
#include "Event.h"
-#include "File.h"
#include "Frame.h"
#include "FrameLoader.h"
#include "HTMLDocument.h"
+#include "JSBlob.h"
#include "JSDOMWindowCustom.h"
#include "JSDocument.h"
#include "JSEvent.h"
#include "JSEventListener.h"
-#include "JSFile.h"
#include "XMLHttpRequest.h"
#include <runtime/Error.h>
#include <interpreter/Interpreter.h>
@@ -109,8 +109,8 @@ JSValue JSXMLHttpRequest::send(ExecState* exec, const ArgList& args)
impl()->send(ec);
else if (val.inherits(&JSDocument::s_info))
impl()->send(toDocument(val), ec);
- else if (val.inherits(&JSFile::s_info))
- impl()->send(toFile(val), ec);
+ else if (val.inherits(&JSBlob::s_info))
+ impl()->send(toBlob(val), ec);
else
impl()->send(val.toString(exec), ec);
}
diff --git a/WebCore/bindings/js/ScheduledAction.cpp b/WebCore/bindings/js/ScheduledAction.cpp
index 3223e53..be90125 100644
--- a/WebCore/bindings/js/ScheduledAction.cpp
+++ b/WebCore/bindings/js/ScheduledAction.cpp
@@ -117,7 +117,7 @@ void ScheduledAction::execute(Document* document)
return;
RefPtr<Frame> frame = window->impl()->frame();
- if (!frame || !frame->script()->isEnabled())
+ if (!frame || !frame->script()->canExecuteScripts())
return;
frame->script()->setProcessingTimerCallback(true);
diff --git a/WebCore/bindings/js/ScheduledAction.h b/WebCore/bindings/js/ScheduledAction.h
index 4ea727d..dd13ab1 100644
--- a/WebCore/bindings/js/ScheduledAction.h
+++ b/WebCore/bindings/js/ScheduledAction.h
@@ -40,7 +40,7 @@ namespace WebCore {
* time interval, either once or repeatedly. Used for window.setTimeout()
* and window.setInterval()
*/
- class ScheduledAction {
+ class ScheduledAction : public Noncopyable {
public:
static ScheduledAction* create(JSC::ExecState*, const JSC::ArgList&, DOMWrapperWorld* isolatedWorld);
diff --git a/WebCore/bindings/js/ScriptCachedFrameData.cpp b/WebCore/bindings/js/ScriptCachedFrameData.cpp
index f2b64de..16f18d3 100644
--- a/WebCore/bindings/js/ScriptCachedFrameData.cpp
+++ b/WebCore/bindings/js/ScriptCachedFrameData.cpp
@@ -73,8 +73,6 @@ ScriptCachedFrameData::~ScriptCachedFrameData()
void ScriptCachedFrameData::restore(Frame* frame)
{
- Page* page = frame->page();
-
JSLock lock(SilenceAssertionsOnly);
ScriptController* scriptController = frame->script();
@@ -89,8 +87,9 @@ void ScriptCachedFrameData::restore(Frame* frame)
windowShell->setWindow(window);
else {
windowShell->setWindow(frame->domWindow());
- if (world == debuggerWorld()) {
- scriptController->attachDebugger(page->debugger());
+
+ if (Page* page = frame->page()) {
+ scriptController->attachDebugger(windowShell, page->debugger());
windowShell->window()->setProfileGroup(page->group().identifier());
}
}
diff --git a/WebCore/bindings/js/ScriptCachedFrameData.h b/WebCore/bindings/js/ScriptCachedFrameData.h
index 5bcaed7..15c23c5 100644
--- a/WebCore/bindings/js/ScriptCachedFrameData.h
+++ b/WebCore/bindings/js/ScriptCachedFrameData.h
@@ -40,7 +40,7 @@ namespace WebCore {
class DOMWindow;
class DOMWrapperWorld;
- class ScriptCachedFrameData {
+ class ScriptCachedFrameData : public Noncopyable {
typedef HashMap< RefPtr<DOMWrapperWorld>, JSC::ProtectedPtr<JSDOMWindow> > JSDOMWindowSet;
public:
diff --git a/WebCore/bindings/js/ScriptCallStack.h b/WebCore/bindings/js/ScriptCallStack.h
index 1907564..52362ea 100644
--- a/WebCore/bindings/js/ScriptCallStack.h
+++ b/WebCore/bindings/js/ScriptCallStack.h
@@ -49,6 +49,7 @@ namespace WebCore {
~ScriptCallStack();
ScriptState* state() const { return m_exec; }
+ ScriptState* globalState() const { return m_exec->lexicalGlobalObject()->globalExec(); }
// frame retrieval methods
const ScriptCallFrame &at(unsigned);
unsigned size();
diff --git a/WebCore/bindings/js/ScriptController.cpp b/WebCore/bindings/js/ScriptController.cpp
index 8d34f88..083e931 100644
--- a/WebCore/bindings/js/ScriptController.cpp
+++ b/WebCore/bindings/js/ScriptController.cpp
@@ -102,7 +102,7 @@ ScriptValue ScriptController::evaluateInWorld(const ScriptSourceCode& sourceCode
}
// evaluate code. Returns the JS return value or 0
- // if there was none, an error occured or the type couldn't be converted.
+ // if there was none, an error occurred or the type couldn't be converted.
// inlineCode is true for <a href="javascript:doSomething()">
// and false for <script>doSomething()</script>. Check if it has the
@@ -156,7 +156,7 @@ ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode)
class IsolatedWorld : public DOMWrapperWorld {
public:
IsolatedWorld(JSGlobalData* globalData)
- : DOMWrapperWorld(globalData)
+ : DOMWrapperWorld(globalData, false)
{
JSGlobalData::ClientData* clientData = globalData->clientData;
ASSERT(clientData);
@@ -183,19 +183,17 @@ void ScriptController::clearWindowShell()
JSLock lock(SilenceAssertionsOnly);
- // Clear the debugger from the current window before setting the new window.
- DOMWrapperWorld* debugWorld = debuggerWorld();
- attachDebugger(0);
-
for (ShellMap::iterator iter = m_windowShells.begin(); iter != m_windowShells.end(); ++iter) {
- DOMWrapperWorld* world = iter->first.get();
JSDOMWindowShell* windowShell = iter->second;
+
+ // Clear the debugger from the current window before setting the new window.
+ attachDebugger(windowShell, 0);
+
windowShell->window()->willRemoveFromWindowShell();
windowShell->setWindow(m_frame->domWindow());
if (Page* page = m_frame->page()) {
- if (world == debugWorld)
- attachDebugger(page->debugger());
+ attachDebugger(windowShell, page->debugger());
windowShell->window()->setProfileGroup(page->group().identifier());
}
}
@@ -215,8 +213,7 @@ JSDOMWindowShell* ScriptController::initScript(DOMWrapperWorld* world)
windowShell->window()->updateDocument();
if (Page* page = m_frame->page()) {
- if (world == debuggerWorld())
- attachDebugger(page->debugger());
+ attachDebugger(windowShell, page->debugger());
windowShell->window()->setProfileGroup(page->group().identifier());
}
@@ -291,16 +288,14 @@ bool ScriptController::anyPageIsProcessingUserGesture() const
return false;
}
-bool ScriptController::isEnabled()
+void ScriptController::attachDebugger(JSC::Debugger* debugger)
{
- Settings* settings = m_frame->settings();
- return m_frame->loader()->client()->allowJavaScript(settings && settings->isJavaScriptEnabled() && !m_frame->loader()->isSandboxed(SandboxScripts));
+ for (ShellMap::iterator iter = m_windowShells.begin(); iter != m_windowShells.end(); ++iter)
+ attachDebugger(iter->second, debugger);
}
-void ScriptController::attachDebugger(JSC::Debugger* debugger)
+void ScriptController::attachDebugger(JSDOMWindowShell* shell, JSC::Debugger* debugger)
{
- // FIXME: Should be able to debug isolated worlds.
- JSDOMWindowShell* shell = existingWindowShell(debuggerWorld());
if (!shell)
return;
@@ -328,7 +323,7 @@ void ScriptController::updateSecurityOrigin()
Bindings::RootObject* ScriptController::bindingRootObject()
{
- if (!isEnabled())
+ if (!canExecuteScripts())
return 0;
if (!m_bindingRootObject) {
@@ -355,7 +350,7 @@ PassRefPtr<Bindings::RootObject> ScriptController::createRootObject(void* native
NPObject* ScriptController::windowScriptNPObject()
{
if (!m_windowScriptNPObject) {
- if (isEnabled()) {
+ if (canExecuteScripts()) {
// JavaScript is enabled, so there is a JavaScript window object.
// Return an NPObject bound to the window object.
JSC::JSLock lock(SilenceAssertionsOnly);
@@ -388,7 +383,7 @@ NPObject* ScriptController::createScriptObjectForPluginElement(HTMLPlugInElement
JSObject* ScriptController::jsObjectForPluginElement(HTMLPlugInElement* plugin)
{
// Can't create JSObjects when JavaScript is disabled
- if (!isEnabled())
+ if (!canExecuteScripts())
return 0;
// Create a JSObject bound to this element
@@ -455,7 +450,7 @@ ScriptValue ScriptController::executeScriptInWorld(DOMWrapperWorld* world, const
{
ScriptSourceCode sourceCode(script, forceUserGesture ? KURL() : m_frame->loader()->url());
- if (!isEnabled() || isPaused())
+ if (!canExecuteScripts() || isPaused())
return ScriptValue();
bool wasInExecuteScript = m_inExecuteScript;
diff --git a/WebCore/bindings/js/ScriptController.h b/WebCore/bindings/js/ScriptController.h
index 8801622..f3e5adf 100644
--- a/WebCore/bindings/js/ScriptController.h
+++ b/WebCore/bindings/js/ScriptController.h
@@ -110,9 +110,11 @@ public:
bool processingUserGesture() const;
bool anyPageIsProcessingUserGesture() const;
- bool isEnabled();
+ bool canExecuteScripts();
- void attachDebugger(JSC::Debugger*);
+ // Debugger can be 0 to detach any existing Debugger.
+ void attachDebugger(JSC::Debugger*); // Attaches/detaches in all worlds/window shells.
+ void attachDebugger(JSDOMWindowShell*, JSC::Debugger*);
void setPaused(bool b) { m_paused = b; }
bool isPaused() const { return m_paused; }
diff --git a/WebCore/bindings/js/ScriptControllerMac.mm b/WebCore/bindings/js/ScriptControllerMac.mm
index 650cb78..208aae8 100644
--- a/WebCore/bindings/js/ScriptControllerMac.mm
+++ b/WebCore/bindings/js/ScriptControllerMac.mm
@@ -107,7 +107,7 @@ PassScriptInstance ScriptController::createScriptInstanceForWidget(Widget* widge
WebScriptObject* ScriptController::windowScriptObject()
{
- if (!isEnabled())
+ if (!canExecuteScripts())
return 0;
if (!m_windowScriptObject) {
diff --git a/WebCore/bindings/js/ScriptEventListener.cpp b/WebCore/bindings/js/ScriptEventListener.cpp
index 8399c7a..4325dc3 100644
--- a/WebCore/bindings/js/ScriptEventListener.cpp
+++ b/WebCore/bindings/js/ScriptEventListener.cpp
@@ -52,6 +52,9 @@ static const String& eventParameterName(bool isSVGEvent)
PassRefPtr<JSLazyEventListener> createAttributeEventListener(Node* node, Attribute* attr)
{
ASSERT(node);
+ ASSERT(attr);
+ if (attr->isNull())
+ return 0;
int lineNumber = 1;
String sourceURL;
@@ -59,7 +62,7 @@ PassRefPtr<JSLazyEventListener> createAttributeEventListener(Node* node, Attribu
// FIXME: We should be able to provide accurate source information for frameless documents, too (e.g. for importing nodes from XMLHttpRequest.responseXML).
if (Frame* frame = node->document()->frame()) {
ScriptController* scriptController = frame->script();
- if (!scriptController->isEnabled())
+ if (!scriptController->canExecuteScripts())
return 0;
if (!scriptController->xssAuditor()->canCreateInlineEventListener(attr->localName().string(), attr->value())) {
@@ -79,11 +82,15 @@ PassRefPtr<JSLazyEventListener> createAttributeEventListener(Frame* frame, Attri
if (!frame)
return 0;
+ ASSERT(attr);
+ if (attr->isNull())
+ return 0;
+
int lineNumber = 1;
String sourceURL;
ScriptController* scriptController = frame->script();
- if (!scriptController->isEnabled())
+ if (!scriptController->canExecuteScripts())
return 0;
if (!scriptController->xssAuditor()->canCreateInlineEventListener(attr->localName().string(), attr->value())) {
diff --git a/WebCore/bindings/js/ScriptFunctionCall.cpp b/WebCore/bindings/js/ScriptFunctionCall.cpp
index e38acb9..a2284bc 100644
--- a/WebCore/bindings/js/ScriptFunctionCall.cpp
+++ b/WebCore/bindings/js/ScriptFunctionCall.cpp
@@ -79,7 +79,7 @@ void ScriptFunctionCall::appendArgument(const JSC::UString& argument)
void ScriptFunctionCall::appendArgument(const char* argument)
{
JSLock lock(SilenceAssertionsOnly);
- m_arguments.append(jsString(m_exec, argument));
+ m_arguments.append(jsString(m_exec, UString(argument)));
}
void ScriptFunctionCall::appendArgument(JSC::JSValue argument)
diff --git a/WebCore/bindings/js/ScriptObject.h b/WebCore/bindings/js/ScriptObject.h
index fed7339..0c993e1 100644
--- a/WebCore/bindings/js/ScriptObject.h
+++ b/WebCore/bindings/js/ScriptObject.h
@@ -47,6 +47,7 @@ namespace WebCore {
ScriptObject(ScriptState*, JSC::JSObject*);
ScriptObject() {}
JSC::JSObject* jsObject() const { return asObject(jsValue()); }
+ ScriptState* scriptState() const { return m_scriptState; }
bool set(const String& name, const String&);
bool set(const char* name, const ScriptObject&);
diff --git a/WebCore/bindings/js/ScriptState.cpp b/WebCore/bindings/js/ScriptState.cpp
index b9f78ef..b9f334a 100644
--- a/WebCore/bindings/js/ScriptState.cpp
+++ b/WebCore/bindings/js/ScriptState.cpp
@@ -38,6 +38,12 @@
namespace WebCore {
+ScriptState* mainWorldScriptState(Frame* frame)
+{
+ JSDOMWindowShell* shell = frame->script()->windowShell(mainThreadNormalWorld());
+ return shell->window()->globalExec();
+}
+
ScriptState* scriptStateFromNode(DOMWrapperWorld* world, Node* node)
{
if (!node)
@@ -48,7 +54,7 @@ ScriptState* scriptStateFromNode(DOMWrapperWorld* world, Node* node)
Frame* frame = document->frame();
if (!frame)
return 0;
- if (!frame->script()->isEnabled())
+ if (!frame->script()->canExecuteScripts())
return 0;
return frame->script()->globalObject(world)->globalExec();
}
diff --git a/WebCore/bindings/js/ScriptState.h b/WebCore/bindings/js/ScriptState.h
index 6257929..0c7c575 100644
--- a/WebCore/bindings/js/ScriptState.h
+++ b/WebCore/bindings/js/ScriptState.h
@@ -36,6 +36,7 @@
namespace WebCore {
class DOMWrapperWorld;
+ class Frame;
class Node;
class Page;
@@ -45,6 +46,8 @@ namespace WebCore {
// For now, the separation is purely by convention.
typedef JSC::ExecState ScriptState;
+ ScriptState* mainWorldScriptState(Frame*);
+
ScriptState* scriptStateFromNode(DOMWrapperWorld*, Node*);
ScriptState* scriptStateFromPage(DOMWrapperWorld*, Page*);
diff --git a/WebCore/bindings/js/ScriptString.h b/WebCore/bindings/js/ScriptString.h
index 6dab9a0..a33d639 100644
--- a/WebCore/bindings/js/ScriptString.h
+++ b/WebCore/bindings/js/ScriptString.h
@@ -33,6 +33,7 @@
#include "PlatformString.h"
#include <runtime/UString.h>
+#include <runtime/StringBuilder.h>
namespace WebCore {
@@ -57,7 +58,10 @@ public:
ScriptString& operator+=(const String& s)
{
- m_str += s;
+ JSC::StringBuilder buffer;
+ buffer.append(m_str);
+ buffer.append(s);
+ m_str = buffer.release();
return *this;
}
diff --git a/WebCore/bindings/js/ScriptValue.cpp b/WebCore/bindings/js/ScriptValue.cpp
index 5444e0e..ac92e14 100644
--- a/WebCore/bindings/js/ScriptValue.cpp
+++ b/WebCore/bindings/js/ScriptValue.cpp
@@ -32,8 +32,6 @@
#include <JavaScriptCore/APICast.h>
#include <JavaScriptCore/JSValueRef.h>
-#include "JSInspectedObjectWrapper.h"
-
#include <runtime/JSLock.h>
#include <runtime/Protect.h>
#include <runtime/UString.h>
@@ -42,14 +40,6 @@ using namespace JSC;
namespace WebCore {
-#if ENABLE(INSPECTOR)
-ScriptValue ScriptValue::quarantineValue(ScriptState* scriptState, const ScriptValue& value)
-{
- JSLock lock(SilenceAssertionsOnly);
- return ScriptValue(JSInspectedObjectWrapper::wrap(scriptState, value.jsValue()));
-}
-#endif
-
bool ScriptValue::getString(ScriptState* scriptState, String& result) const
{
if (!m_value)
diff --git a/WebCore/bindings/js/ScriptValue.h b/WebCore/bindings/js/ScriptValue.h
index e11fa55..b1eaa21 100644
--- a/WebCore/bindings/js/ScriptValue.h
+++ b/WebCore/bindings/js/ScriptValue.h
@@ -41,8 +41,6 @@ class String;
class ScriptValue {
public:
- static ScriptValue quarantineValue(ScriptState* scriptState, const ScriptValue& value);
-
ScriptValue(JSC::JSValue value = JSC::JSValue()) : m_value(value) {}
virtual ~ScriptValue() {}
diff --git a/WebCore/bindings/v8/custom/V8XMLSerializerConstructor.cpp b/WebCore/bindings/js/ScriptWrappable.h
index dd1c3ad..d70cab7 100644
--- a/WebCore/bindings/v8/custom/V8XMLSerializerConstructor.cpp
+++ b/WebCore/bindings/js/ScriptWrappable.h
@@ -1,10 +1,10 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
+ * Copyright (c) 2010, Google Inc. All rights reserved.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* 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
@@ -28,18 +28,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "config.h"
-#include "XMLSerializer.h"
-
-#include "V8Binding.h"
-#include "V8Proxy.h"
+#ifndef ScriptWrappable_h
+#define ScriptWrappable_h
namespace WebCore {
-CALLBACK_FUNC_DECL(XMLSerializerConstructor)
-{
- INC_STATS("DOM.XMLSerializer.Constructor");
- return V8Proxy::constructDOMObject<V8ClassIndex::XMLSERIALIZER, XMLSerializer>(args);
-}
+class ScriptWrappable {
+public:
+ ScriptWrappable() { }
+};
} // namespace WebCore
+
+#endif // ScriptWrappable_h
diff --git a/WebCore/bindings/js/SerializedScriptValue.cpp b/WebCore/bindings/js/SerializedScriptValue.cpp
index 7c4ad62..fd9cb59 100644
--- a/WebCore/bindings/js/SerializedScriptValue.cpp
+++ b/WebCore/bindings/js/SerializedScriptValue.cpp
@@ -28,12 +28,14 @@
#include "SerializedScriptValue.h"
#include "File.h"
+#include "FileList.h"
#include "JSDOMGlobalObject.h"
#include "JSFile.h"
#include "JSFileList.h"
#include <JavaScriptCore/APICast.h>
#include <runtime/DateInstance.h>
#include <runtime/ExceptionHelpers.h>
+#include <runtime/JSLock.h>
#include <runtime/PropertyNameArray.h>
#include <wtf/HashTraits.h>
#include <wtf/Vector.h>
@@ -141,6 +143,28 @@ private:
unsigned m_length;
};
+class SerializedFileList : public SharedSerializedData {
+public:
+ static PassRefPtr<SerializedFileList> create(const FileList* list)
+ {
+ return adoptRef(new SerializedFileList(list));
+ }
+
+ unsigned length() const { return m_files.size(); }
+ const String& item(unsigned idx) { return m_files[idx]; }
+
+private:
+ SerializedFileList(const FileList* list)
+ {
+ unsigned length = list->length();
+ m_files.reserveCapacity(length);
+ for (unsigned i = 0; i < length; i++)
+ m_files.append(list->item(i)->path().crossThreadString());
+ }
+
+ Vector<String> m_files;
+};
+
SerializedScriptValueData::SerializedScriptValueData(RefPtr<SerializedObject> data)
: m_type(ObjectType)
, m_sharedData(data)
@@ -153,6 +177,12 @@ SerializedScriptValueData::SerializedScriptValueData(RefPtr<SerializedArray> dat
{
}
+SerializedScriptValueData::SerializedScriptValueData(const FileList* fileList)
+ : m_type(FileListType)
+ , m_sharedData(SerializedFileList::create(fileList))
+{
+}
+
SerializedScriptValueData::SerializedScriptValueData(const File* file)
: m_type(FileType)
, m_string(file->path().crossThreadString())
@@ -169,6 +199,11 @@ SerializedObject* SharedSerializedData::asObject()
return static_cast<SerializedObject*>(this);
}
+SerializedFileList* SharedSerializedData::asFileList()
+{
+ return static_cast<SerializedFileList*>(this);
+}
+
static const unsigned maximumFilterRecursion = 40000;
enum WalkerState { StateUnknown, ArrayStartState, ArrayStartVisitMember, ArrayEndVisitMember,
ObjectStartState, ObjectStartVisitMember, ObjectEndVisitMember };
@@ -496,6 +531,8 @@ struct SerializingTreeWalker : public BaseWalker {
JSObject* obj = asObject(value);
if (obj->inherits(&JSFile::s_info))
return SerializedScriptValueData(toFile(obj));
+ if (obj->inherits(&JSFileList::s_info))
+ return SerializedScriptValueData(toFileList(obj));
CallData unusedData;
if (value.getCallData(unusedData) == CallTypeNone)
@@ -575,8 +612,10 @@ struct DeserializingTreeWalker : public BaseWalker {
typedef JSObject* OutputObject;
typedef SerializedObject::PropertyNameList PropertyList;
- DeserializingTreeWalker(ExecState* exec, bool mustCopy)
+ DeserializingTreeWalker(ExecState* exec, JSGlobalObject* globalObject, bool mustCopy)
: BaseWalker(exec)
+ , m_globalObject(globalObject)
+ , m_isDOMGlobalObject(globalObject->inherits(&JSDOMGlobalObject::s_info))
, m_mustCopy(mustCopy)
{
}
@@ -605,14 +644,14 @@ struct DeserializingTreeWalker : public BaseWalker {
JSArray* createOutputArray(unsigned length)
{
- JSArray* array = constructEmptyArray(m_exec);
+ JSArray* array = constructEmptyArray(m_exec, m_globalObject);
array->setLength(length);
return array;
}
JSObject* createOutputObject()
{
- return constructEmptyObject(m_exec);
+ return constructEmptyObject(m_exec, m_globalObject);
}
uint32_t length(RefPtr<SerializedArray> array)
@@ -655,13 +694,27 @@ struct DeserializingTreeWalker : public BaseWalker {
case SerializedScriptValueData::NumberType:
return jsNumber(m_exec, value.asDouble());
case SerializedScriptValueData::DateType:
- return new (m_exec) DateInstance(m_exec, value.asDouble());
+ return new (m_exec) DateInstance(m_exec, m_globalObject->dateStructure(), value.asDouble());
case SerializedScriptValueData::FileType:
- return toJS(m_exec, static_cast<JSDOMGlobalObject*>(m_exec->lexicalGlobalObject()), File::create(value.asString().crossThreadString()));
- default:
+ if (!m_isDOMGlobalObject)
+ return jsNull();
+ return toJS(m_exec, static_cast<JSDOMGlobalObject*>(m_globalObject), File::create(value.asString().crossThreadString()));
+ case SerializedScriptValueData::FileListType: {
+ if (!m_isDOMGlobalObject)
+ return jsNull();
+ RefPtr<FileList> result = FileList::create();
+ SerializedFileList* serializedFileList = value.asFileList();
+ unsigned length = serializedFileList->length();
+ for (unsigned i = 0; i < length; i++)
+ result->append(File::create(serializedFileList->item(i)));
+ return toJS(m_exec, static_cast<JSDOMGlobalObject*>(m_globalObject), result.get());
+ }
+ case SerializedScriptValueData::EmptyType:
ASSERT_NOT_REACHED();
- return JSValue();
+ return jsNull();
}
+ ASSERT_NOT_REACHED();
+ return jsNull();
}
void getPropertyNames(RefPtr<SerializedObject> object, Vector<SerializedObject::PropertyNameList, 16>& properties)
@@ -699,12 +752,15 @@ struct DeserializingTreeWalker : public BaseWalker {
}
private:
+ void* operator new(size_t);
+ JSGlobalObject* m_globalObject;
+ bool m_isDOMGlobalObject;
bool m_mustCopy;
};
-JSValue SerializedScriptValueData::deserialize(ExecState* exec, bool mustCopy) const
+JSValue SerializedScriptValueData::deserialize(ExecState* exec, JSGlobalObject* global, bool mustCopy) const
{
- DeserializingTreeWalker context(exec, mustCopy);
+ DeserializingTreeWalker context(exec, global, mustCopy);
return walk<DeserializingTreeWalker>(context, *this);
}
@@ -808,11 +864,14 @@ struct TeardownTreeWalker {
case SerializedScriptValueData::StringType:
case SerializedScriptValueData::ImmediateType:
case SerializedScriptValueData::NumberType:
+ case SerializedScriptValueData::DateType:
+ case SerializedScriptValueData::EmptyType:
+ case SerializedScriptValueData::FileType:
+ case SerializedScriptValueData::FileListType:
return true;
- default:
- ASSERT_NOT_REACHED();
- return JSValue();
}
+ ASSERT_NOT_REACHED();
+ return true;
}
void getPropertyNames(RefPtr<SerializedObject> object, Vector<SerializedObject::PropertyNameList, 16>& properties)
@@ -860,6 +919,7 @@ SerializedScriptValue::~SerializedScriptValue()
PassRefPtr<SerializedScriptValue> SerializedScriptValue::create(JSContextRef originContext, JSValueRef apiValue, JSValueRef* exception)
{
+ JSLock lock(SilenceAssertionsOnly);
ExecState* exec = toJS(originContext);
JSValue value = toJS(exec, apiValue);
PassRefPtr<SerializedScriptValue> serializedValue = SerializedScriptValue::create(exec, value);
@@ -875,8 +935,9 @@ PassRefPtr<SerializedScriptValue> SerializedScriptValue::create(JSContextRef ori
JSValueRef SerializedScriptValue::deserialize(JSContextRef destinationContext, JSValueRef* exception)
{
+ JSLock lock(SilenceAssertionsOnly);
ExecState* exec = toJS(destinationContext);
- JSValue value = deserialize(exec);
+ JSValue value = deserialize(exec, exec->lexicalGlobalObject());
if (exec->hadException()) {
if (exception)
*exception = toRef(exec, exec->exception());
diff --git a/WebCore/bindings/js/SerializedScriptValue.h b/WebCore/bindings/js/SerializedScriptValue.h
index 57a4a66..347d8f2 100644
--- a/WebCore/bindings/js/SerializedScriptValue.h
+++ b/WebCore/bindings/js/SerializedScriptValue.h
@@ -34,14 +34,17 @@ typedef const struct OpaqueJSValue* JSValueRef;
namespace WebCore {
class File;
- class SerializedObject;
+ class FileList;
class SerializedArray;
+ class SerializedFileList;
+ class SerializedObject;
class SharedSerializedData : public RefCounted<SharedSerializedData> {
public:
virtual ~SharedSerializedData() { }
SerializedArray* asArray();
SerializedObject* asObject();
+ SerializedFileList* asFileList();
};
class SerializedScriptValue;
@@ -56,12 +59,13 @@ namespace WebCore {
ObjectType,
ArrayType,
StringType,
- FileType
+ FileType,
+ FileListType
};
SerializedType type() const { return m_type; }
static SerializedScriptValueData serialize(JSC::ExecState*, JSC::JSValue);
- JSC::JSValue deserialize(JSC::ExecState*, bool mustCopy) const;
+ JSC::JSValue deserialize(JSC::ExecState*, JSC::JSGlobalObject*, bool mustCopy) const;
~SerializedScriptValueData()
{
@@ -81,6 +85,7 @@ namespace WebCore {
}
explicit SerializedScriptValueData(const File*);
+ explicit SerializedScriptValueData(const FileList*);
explicit SerializedScriptValueData(JSC::JSValue value)
: m_type(ImmediateType)
@@ -130,6 +135,13 @@ namespace WebCore {
return m_sharedData->asArray();
}
+ SerializedFileList* asFileList() const
+ {
+ ASSERT(m_type == FileListType);
+ ASSERT(m_sharedData);
+ return m_sharedData->asFileList();
+ }
+
operator bool() const { return m_type != EmptyType; }
SerializedScriptValueData release()
@@ -184,11 +196,11 @@ namespace WebCore {
return m_value.asString();
}
- JSC::JSValue deserialize(JSC::ExecState* exec)
+ JSC::JSValue deserialize(JSC::ExecState* exec, JSC::JSGlobalObject* globalObject)
{
if (!m_value)
return JSC::jsNull();
- return m_value.deserialize(exec, m_mustCopy);
+ return m_value.deserialize(exec, globalObject, m_mustCopy);
}
JSValueRef deserialize(JSContextRef, JSValueRef* exception);
diff --git a/WebCore/bindings/js/WorkerScriptController.cpp b/WebCore/bindings/js/WorkerScriptController.cpp
index 5e27ef7..adcc089 100644
--- a/WebCore/bindings/js/WorkerScriptController.cpp
+++ b/WebCore/bindings/js/WorkerScriptController.cpp
@@ -58,9 +58,6 @@ WorkerScriptController::WorkerScriptController(WorkerContext* workerContext)
WorkerScriptController::~WorkerScriptController()
{
m_workerContextWrapper = 0; // Unprotect the global object.
-
- ASSERT(!m_globalData->heap.protectedObjectCount());
- ASSERT(!m_globalData->heap.isBusy());
m_globalData->heap.destroy();
}
diff --git a/WebCore/bindings/objc/DOMHTML.h b/WebCore/bindings/objc/DOMHTML.h
index c336c04..882e397 100644
--- a/WebCore/bindings/objc/DOMHTML.h
+++ b/WebCore/bindings/objc/DOMHTML.h
@@ -26,6 +26,7 @@
#import <WebCore/DOMCore.h>
+#import <WebCore/DOMBlob.h>
#import <WebCore/DOMFile.h>
#import <WebCore/DOMFileList.h>
#import <WebCore/DOMHTMLAnchorElement.h>
diff --git a/WebCore/bindings/objc/DOMInternal.h b/WebCore/bindings/objc/DOMInternal.h
index 72f63d2..6d2442b 100644
--- a/WebCore/bindings/objc/DOMInternal.h
+++ b/WebCore/bindings/objc/DOMInternal.h
@@ -87,3 +87,13 @@ WebCore::NodeFilter* core(DOMNodeFilter *);
DOMNativeXPathNSResolver *kit(WebCore::XPathNSResolver*);
WebCore::XPathNSResolver* core(DOMNativeXPathNSResolver *);
#endif // ENABLE(XPATH)
+
+inline NSTimeInterval kit(double msSinceEpoch)
+{
+ return msSinceEpoch / 1000.0 - NSTimeIntervalSince1970;
+}
+
+inline double core(NSTimeInterval sec)
+{
+ return sec * 1000.0 + NSTimeIntervalSince1970;
+}
diff --git a/WebCore/bindings/objc/PublicDOMInterfaces.h b/WebCore/bindings/objc/PublicDOMInterfaces.h
index 9221037..ea46436 100644
--- a/WebCore/bindings/objc/PublicDOMInterfaces.h
+++ b/WebCore/bindings/objc/PublicDOMInterfaces.h
@@ -235,7 +235,14 @@
@interface DOMEntityReference : DOMNode WEBKIT_VERSION_1_3
@end
-@interface DOMFile : DOMObject WEBKIT_VERSION_4_0
+@interface DOMBlob : DOMObject WEBKIT_VERSION_4_0
+@property(readonly) unsigned long long size;
+@end
+
+@interface DOMFile : DOMBlob WEBKIT_VERSION_4_0
+@property(readonly, copy) NSString *name;
+
+// FIXME: obsolete properties. To be removed.
@property(readonly, copy) NSString *fileName;
@property(readonly) unsigned long long fileSize;
@end
diff --git a/WebCore/bindings/scripts/CodeGenerator.pm b/WebCore/bindings/scripts/CodeGenerator.pm
index c1cb0a0..dc3c7c0 100644
--- a/WebCore/bindings/scripts/CodeGenerator.pm
+++ b/WebCore/bindings/scripts/CodeGenerator.pm
@@ -43,10 +43,11 @@ my %primitiveTypeHash = ("int" => 1, "short" => 1, "long" => 1, "long long" => 1
"unsigned int" => 1, "unsigned short" => 1,
"unsigned long" => 1, "unsigned long long" => 1,
"float" => 1, "double" => 1,
- "boolean" => 1, "void" => 1);
+ "boolean" => 1, "void" => 1,
+ "Date" => 1);
my %podTypeHash = ("SVGNumber" => 1, "SVGTransform" => 1);
-my %podTypesWithWritablePropertiesHash = ("SVGLength" => 1, "SVGMatrix" => 1, "SVGPoint" => 1, "SVGRect" => 1);
+my %podTypesWithWritablePropertiesHash = ("SVGAngle" => 1, "SVGLength" => 1, "SVGMatrix" => 1, "SVGPoint" => 1, "SVGPreserveAspectRatio" => 1, "SVGRect" => 1);
my %stringTypeHash = ("DOMString" => 1, "AtomicString" => 1);
my %nonPointerTypeHash = ("DOMTimeStamp" => 1, "CompareHow" => 1, "SVGPaintType" => 1);
diff --git a/WebCore/bindings/scripts/CodeGeneratorCOM.pm b/WebCore/bindings/scripts/CodeGeneratorCOM.pm
deleted file mode 100644
index e98379b..0000000
--- a/WebCore/bindings/scripts/CodeGeneratorCOM.pm
+++ /dev/null
@@ -1,1319 +0,0 @@
-#
-# Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
-# Copyright (C) 2006 Anders Carlsson <andersca@mac.com>
-# Copyright (C) 2006, 2007 Samuel Weinig <sam@webkit.org>
-# Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org>
-# Copyright (C) 2006, 2007, 2008 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
-# 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., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-package CodeGeneratorCOM;
-
-use File::stat;
-
-# Global Variables
-my $module = "";
-my $outputDir = "";
-
-my @IDLHeader = ();
-my @IDLContent = ();
-my %IDLIncludes = ();
-my %IDLForwardDeclarations = ();
-my %IDLDontForwardDeclare = ();
-my %IDLImports = ();
-my %IDLDontImport = ();
-
-my @CPPInterfaceHeader = ();
-
-my @CPPHeaderHeader = ();
-my @CPPHeaderContent = ();
-my %CPPHeaderIncludes = ();
-my %CPPHeaderIncludesAngle = ();
-my %CPPHeaderForwardDeclarations = ();
-my %CPPHeaderDontForwardDeclarations = ();
-
-my @CPPImplementationHeader = ();
-my @CPPImplementationContent = ();
-my %CPPImplementationIncludes = ();
-my %CPPImplementationWebCoreIncludes = ();
-my %CPPImplementationIncludesAngle = ();
-my %CPPImplementationDontIncludes = ();
-
-my @additionalInterfaceDefinitions = ();
-
-my $DASHES = "----------------------------------------";
-my $TEMP_PREFIX = "GEN_";
-
-# Hashes
-
-my %includeCorrector = map {($_, 1)} qw{UIEvent KeyboardEvent MouseEvent
- MutationEvent OverflowEvent WheelEvent};
-
-my %conflictMethod = (
- # FIXME: Add C language keywords?
-);
-
-# Default License Templates
-my @licenseTemplate = split(/\r/, << "EOF");
-/*
- * Copyright (C) 2007 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.
- * 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.
- */
-EOF
-
-# Default constructor
-sub new
-{
- my $object = shift;
- my $reference = { };
-
- $codeGenerator = shift;
- $outputDir = shift;
-
- bless($reference, $object);
- return $reference;
-}
-
-sub finish
-{
- my $object = shift;
-}
-
-# Params: 'domClass' struct
-sub GenerateInterface
-{
- my $object = shift;
- my $dataNode = shift;
- my $defines = shift;
-
- my $name = $dataNode->name;
-
- my $pureInterface = $dataNode->extendedAttributes->{"PureInterface"};
-
- # Start actual generation..
- $object->GenerateIDL($dataNode, $pureInterface);
- if ($pureInterface) {
- $object->GenerateInterfaceHeader($dataNode);
- } else {
- $object->GenerateCPPHeader($dataNode);
- $object->GenerateCPPImplementation($dataNode);
- }
-
- # Write changes.
- $object->WriteData($name, $pureInterface);
-}
-
-# Params: 'idlDocument' struct
-sub GenerateModule
-{
- my $object = shift;
- my $dataNode = shift;
-
- $module = $dataNode->module;
-}
-
-sub GetInterfaceName
-{
- my $name = $codeGenerator->StripModule(shift);
-
- die "GetInterfaceName should only be used on interfaces." if ($codeGenerator->IsStringType($name) or $codeGenerator->IsPrimitiveType($name));
-
- # special cases
- return "I" . $TEMP_PREFIX . "DOMAbstractView" if $name eq "DOMWindow";
- return "I" . $TEMP_PREFIX . $name if $name eq "DOMImplementation" or $name eq "DOMTimeStamp";
-
- # Default, assume COM type has the same type name as
- # idl type prefixed with "IDOM".
- return "I" . $TEMP_PREFIX . "DOM" . $name;
-}
-
-sub GetClassName
-{
- my $name = $codeGenerator->StripModule(shift);
-
- # special cases
- return "BSTR" if $codeGenerator->IsStringType($name);
- return "BOOL" if $name eq "boolean";
- return "unsigned" if $name eq "unsigned long";
- return "int" if $name eq "long";
- return $name if $codeGenerator->IsPrimitiveType($name);
- return $TEMP_PREFIX . "DOMAbstractView" if $name eq "DOMWindow";
- return $TEMP_PREFIX . $name if $name eq "DOMImplementation" or $name eq "DOMTimeStamp";
-
- # Default, assume COM type has the same type name as
- # idl type prefixed with "DOM".
- return $TEMP_PREFIX . "DOM" . $name;
-}
-
-sub GetCOMType
-{
- my ($type) = @_;
-
- die "Don't use GetCOMType for string types, use one of In/Out variants instead." if $codeGenerator->IsStringType($type);
-
- return "BOOL" if $type eq "boolean";
- return "UINT" if $type eq "unsigned long";
- return "INT" if $type eq "long";
- return $type if $codeGenerator->IsPrimitiveType($type) or $type eq "DOMTimeStamp";
- # return "unsigned short" if $type eq "CompareHow" or $type eq "SVGPaintType";
-
- return GetInterfaceName($type) . "*";
-}
-
-sub GetCOMTypeIn
-{
- my ($type) = @_;
- return "LPCTSTR" if $codeGenerator->IsStringType($type);
- return GetCOMType($type);
-}
-
-sub GetCOMTypeOut
-{
- my ($type) = @_;
- return "BSTR" if $codeGenerator->IsStringType($type);
- return GetCOMType($type);
-}
-
-sub IDLTypeToImplementationType
-{
- my $type = $codeGenerator->StripModule(shift);
-
- return "bool" if $type eq "boolean";
- return "unsigned" if $type eq "unsigned long";
- return "int" if $type eq "long";
- return $type if $codeGenerator->IsPrimitiveType($type);
-
- return "WebCore::String" if $codeGenerator->IsStringType($type);
- return "WebCore::${type}";
-}
-
-sub StripNamespace
-{
- my ($type) = @_;
-
- $type =~ s/^WebCore:://;
-
- return $type;
-}
-
-sub GetParentInterface
-{
- my ($dataNode) = @_;
- return "I" . $TEMP_PREFIX . "DOMObject" if (@{$dataNode->parents} == 0);
- return GetInterfaceName($codeGenerator->StripModule($dataNode->parents(0)));
-}
-
-sub GetParentClass
-{
- my ($dataNode) = @_;
- return $TEMP_PREFIX . "DOMObject" if (@{$dataNode->parents} == 0);
- return GetClassName($codeGenerator->StripModule($dataNode->parents(0)));
-}
-
-sub AddForwardDeclarationsForTypeInIDL
-{
- my $type = $codeGenerator->StripModule(shift);
-
- return if $codeGenerator->IsNonPointerType($type) or $codeGenerator->IsStringType($type);
-
- my $interface = GetInterfaceName($type);
- $IDLForwardDeclarations{$interface} = 1;
- $IDLImports{$interface} = 1;
-}
-
-sub AddIncludesForTypeInCPPHeader
-{
- my $type = $codeGenerator->StripModule(shift);
- my $useAngleBrackets = shift;
-
- return if $codeGenerator->IsNonPointerType($type);
-
- # Add special Cases HERE
-
- if ($type =~ m/^I/) {
- $type = "WebKit";
- }
-
- if ($useAngleBrackets) {
- $CPPHeaderIncludesAngle{"$type.h"} = 1;
- return;
- }
-
- if ($type eq "GEN_DOMImplementation") {
- $CPPHeaderIncludes{"GEN_DOMDOMImplementation.h"} = 1;
- return;
- }
-
- if ($type eq "IGEN_DOMImplementation") {
- $CPPHeaderIncludes{"IGEN_DOMDOMImplementation.h"} = 1;
- return;
- }
-
- $CPPHeaderIncludes{"$type.h"} = 1;
-}
-
-sub AddForwardDeclarationsForTypeInCPPHeader
-{
- my $type = $codeGenerator->StripModule(shift);
-
- return if $codeGenerator->IsNonPointerType($type) or $codeGenerator->IsStringType($type);
-
- my $interface = GetInterfaceName($type);
- $CPPHeaderForwardDeclarations{$interface} = 1;
-}
-
-sub AddIncludesForTypeInCPPImplementation
-{
- my $type = $codeGenerator->StripModule(shift);
-
- die "Include type not supported!" if $includeCorrector{$type};
-
- return if $codeGenerator->IsNonPointerType($type);
-
- if ($codeGenerator->IsStringType($type)) {
- $CPPImplementationWebCoreIncludes{"AtomicString.h"} = 1;
- $CPPImplementationWebCoreIncludes{"BString.h"} = 1;
- $CPPImplementationWebCoreIncludes{"KURL.h"} = 1;
- return;
- }
-
- # Special casing
- $CPPImplementationWebCoreIncludes{"NameNodeList.h"} = 1 if $type eq "NodeList";
- $CPPImplementationWebCoreIncludes{"CSSMutableStyleDeclaration.h"} = 1 if $type eq "CSSStyleDeclaration";
-
- # Add implementation type
- $CPPImplementationWebCoreIncludes{StripNamespace(IDLTypeToImplementationType($type)) . ".h"} = 1;
-
- my $COMClassName = GetClassName($type);
- $CPPImplementationIncludes{"${COMClassName}.h"} = 1;
-}
-
-sub GetAdditionalInterfaces
-{
- # This function does nothing, but it stays here for future multiple inheritance support.
- my $type = $codeGenerator->StripModule(shift);
- return ();
-}
-
-sub GenerateIDL
-{
- my ($object, $dataNode, $pureInterface) = @_;
-
- my $inInterfaceName = $dataNode->name;
- my $outInterfaceName = GetInterfaceName($inInterfaceName);
- my $uuid = $dataNode->extendedAttributes->{"InterfaceUUID"} || die "All classes require an InterfaceUUID extended attribute.";
-
- my $parentInterfaceName = ($pureInterface) ? "IUnknown" : GetParentInterface($dataNode);
-
- my $numConstants = @{$dataNode->constants};
- my $numAttributes = @{$dataNode->attributes};
- my $numFunctions = @{$dataNode->functions};
-
- # - Add default header template
- @IDLHeader = @licenseTemplate;
- push(@IDLHeader, "\n");
-
- # - INCLUDES -
- push(@IDLHeader, "#ifndef DO_NO_IMPORTS\n");
- push(@IDLHeader, "import \"oaidl.idl\";\n");
- push(@IDLHeader, "import \"ocidl.idl\";\n");
- push(@IDLHeader, "#endif\n\n");
-
- unless ($pureInterface) {
- push(@IDLHeader, "#ifndef DO_NO_IMPORTS\n");
- push(@IDLHeader, "import \"${parentInterfaceName}.idl\";\n");
- push(@IDLHeader, "#endif\n\n");
-
- $IDLDontForwardDeclare{$outInterfaceName} = 1;
- $IDLDontImport{$outInterfaceName} = 1;
- $IDLDontForwardDeclare{$parentInterfaceName} = 1;
- $IDLDontImport{$parentInterfaceName} = 1;
- }
-
- # - Begin
- # -- Attributes
- push(@IDLContent, "[\n");
- push(@IDLContent, " object,\n");
- push(@IDLContent, " oleautomation,\n");
- push(@IDLContent, " uuid(" . $uuid . "),\n");
- push(@IDLContent, " pointer_default(unique)\n");
- push(@IDLContent, "]\n");
-
- # -- Interface
- push(@IDLContent, "interface " . $outInterfaceName . " : " . $parentInterfaceName . "\n");
- push(@IDLContent, "{\n");
-
-
- # - FIXME: Add constants.
-
-
- # - Add attribute getters/setters.
- if ($numAttributes > 0) {
- foreach my $attribute (@{$dataNode->attributes}) {
- my $attributeName = $attribute->signature->name;
- my $attributeIDLType = $attribute->signature->type;
- my $attributeTypeIn = GetCOMTypeIn($attributeIDLType);
- my $attributeTypeOut = GetCOMTypeOut($attributeIDLType);
- my $attributeIsReadonly = ($attribute->type =~ /^readonly/);
-
- AddForwardDeclarationsForTypeInIDL($attributeIDLType);
-
- unless ($attributeIsReadonly) {
- # Setter
- my $setterName = "set" . $codeGenerator->WK_ucfirst($attributeName);
- my $setter = " HRESULT " . $setterName . "([in] " . $attributeTypeIn . ");\n";
- push(@IDLContent, $setter);
- }
-
- # Getter
- my $getter = " HRESULT " . $attributeName . "([out, retval] " . $attributeTypeOut . "*);\n\n";
- push(@IDLContent, $getter);
- }
- }
-
- # - Add functions.
- if ($numFunctions > 0) {
- foreach my $function (@{$dataNode->functions}) {
- my $functionName = $function->signature->name;
- my $returnIDLType = $function->signature->type;
- my $returnType = GetCOMTypeOut($returnIDLType);
- my $noReturn = ($returnType eq "void");
-
- AddForwardDeclarationsForTypeInIDL($returnIDLType);
-
- my @paramArgList = ();
- foreach my $param (@{$function->parameters}) {
- my $paramName = $param->name;
- my $paramIDLType = $param->type;
- my $paramType = GetCOMTypeIn($param->type);
-
- AddForwardDeclarationsForTypeInIDL($paramIDLType);
-
- # Form parameter
- my $parameter = "[in] ${paramType} ${paramName}";
-
- # Add parameter to function signature
- push(@paramArgList, $parameter);
- }
-
- unless ($noReturn) {
- my $resultParameter = "[out, retval] " . $returnType . "* result";
- push(@paramArgList, $resultParameter);
- }
-
- my $functionSig = " HRESULT " . $functionName . "(";
- $functionSig .= join(", ", @paramArgList);
- $functionSig .= ");\n\n";
- push(@IDLContent, $functionSig);
- }
- }
-
- # - End
- push(@IDLContent, "}\n\n");
-}
-
-sub GenerateInterfaceHeader
-{
- my ($object, $dataNode) = @_;
-
- my $IDLType = $dataNode->name;
- my $implementationClass = IDLTypeToImplementationType($IDLType);
- my $implementationClassWithoutNamespace = StripNamespace($implementationClass);
- my $className = GetClassName($IDLType);
- my $interfaceName = GetInterfaceName($IDLType);
-
- # - Add default header template
- @CPPInterfaceHeader = @licenseTemplate;
- push(@CPPInterfaceHeader, "\n");
-
- # - Header guards -
- push(@CPPInterfaceHeader, "#ifndef " . $className . "_h\n");
- push(@CPPInterfaceHeader, "#define " . $className . "_h\n\n");
-
- # - Forward Declarations -
- push(@CPPInterfaceHeader, "interface ${interfaceName};\n\n");
- push(@CPPInterfaceHeader, "namespace WebCore {\n");
- push(@CPPInterfaceHeader, " class ${implementationClassWithoutNamespace};\n");
- push(@CPPInterfaceHeader, "}\n\n");
-
- # - Default Interface Creator -
- push(@CPPInterfaceHeader, "${interfaceName}* to${interfaceName}(${implementationClass}*) { return 0; }\n\n");
-
- push(@CPPInterfaceHeader, "#endif // " . $className . "_h\n");
-}
-
-# -----------------------------------------------------------------------------
-# CPP Helper Functions
-# -----------------------------------------------------------------------------
-
-sub GenerateCPPAttributeSignature
-{
- my ($attribute, $className, $options) = @_;
-
- my $attributeName = $attribute->signature->name;
- my $isReadonly = ($attribute->type =~ /^readonly/);
-
- my $newline = $$options{"NewLines"} ? "\n" : "";
- my $indent = $$options{"Indent"} ? " " x $$options{"Indent"} : "";
- my $semicolon = $$options{"IncludeSemiColon"} ? ";" : "";
- my $virtual = $$options{"AddVirtualKeyword"} ? "virtual " : "";
- my $class = $$options{"UseClassName"} ? "${className}::" : "";
- my $forwarder = $$options{"Forwarder"} ? 1 : 0;
- my $joiner = ($$options{"NewLines"} ? "\n" . $indent . " " : "");
-
- my %attributeSignatures = ();
-
- unless ($isReadonly) {
- my $attributeTypeIn = GetCOMTypeIn($attribute->signature->type);
- my $setterName = "set" . $codeGenerator->WK_ucfirst($attributeName);
- my $setter = $indent . $virtual . "HRESULT STDMETHODCALLTYPE ". $class . $setterName . "(";
- $setter .= $joiner . "/* [in] */ ${attributeTypeIn} ${attributeName})" . $semicolon . $newline;
- if ($forwarder) {
- $setter .= " { return " . $$options{"Forwarder"} . "::" . $setterName . "(${attributeName}); }\n";
- }
- $attributeSignatures{"Setter"} = $setter;
- }
-
- my $attributeTypeOut = GetCOMTypeOut($attribute->signature->type);
- my $getter = $indent . $virtual . "HRESULT STDMETHODCALLTYPE " . $class . $attributeName . "(";
- $getter .= $joiner . "/* [retval][out] */ ${attributeTypeOut}* result)" . $semicolon . $newline;
- if ($forwarder) {
- $getter .= " { return " . $$options{"Forwarder"} . "::" . $attributeName . "(result); }\n";
- }
- $attributeSignatures{"Getter"} = $getter;
-
- return %attributeSignatures;
-}
-
-
-sub GenerateCPPAttribute
-{
- my ($attribute, $className, $implementationClass, $IDLType) = @_;
-
- my $implementationClassWithoutNamespace = StripNamespace($implementationClass);
-
- my $attributeName = $attribute->signature->name;
- my $attributeIDLType = $attribute->signature->type;
- my $hasSetterException = @{$attribute->setterExceptions};
- my $hasGetterException = @{$attribute->getterExceptions};
- my $isReadonly = ($attribute->type =~ /^readonly/);
- my $attributeTypeIsPrimitive = $codeGenerator->IsPrimitiveType($attributeIDLType);
- my $attributeTypeIsString = $codeGenerator->IsStringType($attributeIDLType);
- my $attributeImplementationType = IDLTypeToImplementationType($attributeIDLType);
- my $attributeImplementationTypeWithoutNamespace = StripNamespace($attributeImplementationType);
- my $attributeTypeCOMClassName = GetClassName($attributeIDLType);
-
- $CPPImplementationWebCoreIncludes{"ExceptionCode.h"} = 1 if $hasSetterException or $hasGetterException;
-
- my %signatures = GenerateCPPAttributeSignature($attribute, $className, { "NewLines" => 1,
- "Indent" => 0,
- "IncludeSemiColon" => 0,
- "UseClassName" => 1,
- "AddVirtualKeyword" => 0 });
-
- my %attrbutesToReturn = ();
-
- unless ($isReadonly) {
- my @setterImplementation = ();
- push(@setterImplementation, $signatures{"Setter"});
- push(@setterImplementation, "{\n");
-
- my $setterName = "set" . $codeGenerator->WK_ucfirst($attributeName);
-
- my @setterParams = ();
- if ($attributeTypeIsString) {
- push(@setterParams, $attributeName);
- if ($hasSetterException) {
- push(@setterImplementation, " WebCore::ExceptionCode ec = 0;\n");
- push(@setterParams, "ec");
- }
- } elsif ($attributeTypeIsPrimitive) {
- if ($attribute->signature->extendedAttributes->{"ConvertFromString"}) {
- push(@setterParams, "WebCore::String::number(${attributeName})");
- } elsif ($attributeIDLType eq "boolean") {
- push(@setterParams, "!!${attributeName}");
- } else {
- my $primitiveImplementationType = IDLTypeToImplementationType($attributeIDLType);
- push(@setterParams, "static_cast<${primitiveImplementationType}>(${attributeName})");
- }
-
- if ($hasSetterException) {
- push(@setterImplementation, " WebCore::ExceptionCode ec = 0;\n");
- push(@setterParams, "ec");
- }
- } else {
- $CPPImplementationWebCoreIncludes{"COMPtr.h"} = 1;
-
- push(@setterImplementation, " if (!${attributeName})\n");
- push(@setterImplementation, " return E_POINTER;\n\n");
- push(@setterImplementation, " COMPtr<${attributeTypeCOMClassName}> ptr(Query, ${attributeName});\n");
- push(@setterImplementation, " if (!ptr)\n");
- push(@setterImplementation, " return E_NOINTERFACE;\n");
-
- push(@setterParams, "ptr->impl${attributeImplementationTypeWithoutNamespace}()");
- if ($hasSetterException) {
- push(@setterImplementation, " WebCore::ExceptionCode ec = 0;\n");
- push(@setterParams, "ec");
- }
- }
-
- # FIXME: CHECK EXCEPTION AND DO SOMETHING WITH IT
-
- my $reflect = $attribute->signature->extendedAttributes->{"Reflect"};
- my $reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"};
- if ($reflect || $reflectURL) {
- my $contentAttributeName = (($reflect || $reflectURL) eq "1") ? $attributeName : ($reflect || $reflectURL);
- my $namespace = $codeGenerator->NamespaceForAttributeName($IDLType, $contentAttributeName);
- $CPPImplementationWebCoreIncludes{"${namespace}.h"} = 1;
- push(@setterImplementation, " impl${implementationClassWithoutNamespace}()->setAttribute(WebCore::${namespace}::${contentAttributeName}Attr, " . join(", ", @setterParams) . ");\n");
- } else {
- push(@setterImplementation, " impl${implementationClassWithoutNamespace}()->${setterName}(" . join(", ", @setterParams) . ");\n");
- }
- push(@setterImplementation, " return S_OK;\n");
- push(@setterImplementation, "}\n\n");
-
- $attrbutesToReturn{"Setter"} = join("", @setterImplementation);
- }
-
- my @getterImplementation = ();
- push(@getterImplementation, $signatures{"Getter"});
- push(@getterImplementation, "{\n");
- push(@getterImplementation, " if (!result)\n");
- push(@getterImplementation, " return E_POINTER;\n\n");
-
- my $implementationGetter;
- my $reflect = $attribute->signature->extendedAttributes->{"Reflect"};
- my $reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"};
- if ($reflect || $reflectURL) {
- my $contentAttributeName = (($reflect || $reflectURL) eq "1") ? $attributeName : ($reflect || $reflectURL);
- my $namespace = $codeGenerator->NamespaceForAttributeName($IDLType, $contentAttributeName);
- $implIncludes{"${namespace}.h"} = 1;
- my $getAttributeFunctionName = $reflectURL ? "getURLAttribute" : "getAttribute";
- $implementationGetter = "impl${implementationClassWithoutNamespace}()->${getAttributeFunctionName}(WebCore::${namespace}::${contentAttributeName}Attr)";
- } else {
- $implementationGetter = "impl${implementationClassWithoutNamespace}()->" . $codeGenerator->WK_lcfirst($attributeName) . "(" . ($hasGetterException ? "ec" : ""). ")";
- }
-
- push(@getterImplementation, " WebCore::ExceptionCode ec = 0;\n") if $hasGetterException;
-
- if ($attributeTypeIsString) {
- push(@getterImplementation, " *result = WebCore::BString(${implementationGetter}).release();\n");
- } elsif ($attributeTypeIsPrimitive) {
- if ($attribute->signature->extendedAttributes->{"ConvertFromString"}) {
- push(@getterImplementation, " *result = static_cast<${attributeTypeCOMClassName}>(${implementationGetter}.toInt());\n");
- } else {
- push(@getterImplementation, " *result = static_cast<${attributeTypeCOMClassName}>(${implementationGetter});\n");
- }
- } else {
- $CPPImplementationIncludesAngle{"wtf/GetPtr.h"} = 1;
- my $attributeTypeCOMInterfaceName = GetInterfaceName($attributeIDLType);
- push(@getterImplementation, " *result = 0;\n");
- push(@getterImplementation, " ${attributeImplementationType}* resultImpl = WTF::getPtr(${implementationGetter});\n");
- push(@getterImplementation, " if (!resultImpl)\n");
- push(@getterImplementation, " return E_POINTER;\n\n");
- push(@getterImplementation, " *result = to${attributeTypeCOMInterfaceName}(resultImpl);\n");
- }
-
- # FIXME: CHECK EXCEPTION AND DO SOMETHING WITH IT
-
- push(@getterImplementation, " return S_OK;\n");
- push(@getterImplementation, "}\n\n");
-
- $attrbutesToReturn{"Getter"} = join("", @getterImplementation);
-
- return %attrbutesToReturn;
-}
-
-sub GenerateCPPFunctionSignature
-{
- my ($function, $className, $options) = @_;
-
- my $functionName = $function->signature->name;
- my $returnIDLType = $function->signature->type;
- my $returnType = GetCOMTypeOut($returnIDLType);
- my $noReturn = ($returnType eq "void");
-
- my $newline = $$options{"NewLines"} ? "\n" : "";
- my $indent = $$options{"Indent"} ? " " x $$options{"Indent"} : "";
- my $semicolon = $$options{"IncludeSemiColon"} ? ";" : "";
- my $virtual = $$options{"AddVirtualKeyword"} ? "virtual " : "";
- my $class = $$options{"UseClassName"} ? "${className}::" : "";
- my $forwarder = $$options{"Forwarder"} ? 1 : 0;
- my $joiner = ($$options{"NewLines"} ? "\n" . $indent . " " : " ");
-
- my @paramArgList = ();
- foreach my $param (@{$function->parameters}) {
- my $paramName = $param->name;
- my $paramType = GetCOMTypeIn($param->type);
- my $parameter = "/* [in] */ ${paramType} ${paramName}";
- push(@paramArgList, $parameter);
- }
-
- unless ($noReturn) {
- my $resultParameter .= "/* [out, retval] */ ${returnType}* result";
- push(@paramArgList, $resultParameter);
- }
-
- my $functionSig = $indent . $virtual . "HRESULT STDMETHODCALLTYPE " . $class . $functionName . "(";
- $functionSig .= $joiner . join("," . $joiner, @paramArgList) if @paramArgList > 0;
- $functionSig .= ")" . $semicolon . $newline;
- if ($forwarder) {
- my @paramNameList = ();
- push(@paramNameList, $_->name) foreach (@{$function->parameters});
- push(@paramNameList, "result") unless $noReturn;
- $functionSig .= " { return " . $$options{"Forwarder"} . "::" . $functionName . "(" . join(", ", @paramNameList) . "); }\n";
- }
-
- return $functionSig
-}
-
-sub GenerateCPPFunction
-{
- my ($function, $className, $implementationClass) = @_;
-
- my @functionImplementation = ();
-
- my $signature = GenerateCPPFunctionSignature($function, $className, { "NewLines" => 1,
- "Indent" => 0,
- "IncludeSemiColon" => 0,
- "UseClassName" => 1,
- "AddVirtualKeyword" => 0 });
-
- my $implementationClassWithoutNamespace = StripNamespace($implementationClass);
-
- my $functionName = $function->signature->name;
- my $returnIDLType = $function->signature->type;
- my $noReturn = ($returnIDLType eq "void");
- my $raisesExceptions = @{$function->raisesExceptions};
-
- AddIncludesForTypeInCPPImplementation($returnIDLType);
- $CPPImplementationWebCoreIncludes{"ExceptionCode.h"} = 1 if $raisesExceptions;
-
- my %needsCustom = ();
- my @parameterInitialization = ();
- my @parameterList = ();
- foreach my $param (@{$function->parameters}) {
- my $paramName = $param->name;
- my $paramIDLType = $param->type;
-
- my $paramTypeIsPrimitive = $codeGenerator->IsPrimitiveType($paramIDLType);
- my $paramTypeIsString = $codeGenerator->IsStringType($paramIDLType);
-
- $needsCustom{"NodeToReturn"} = $paramName if $param->extendedAttributes->{"Return"};
-
- AddIncludesForTypeInCPPImplementation($paramIDLType);
-
- # FIXME: We may need to null check the arguments as well
-
- if ($paramTypeIsString) {
- push(@parameterList, $paramName);
- } elsif ($paramTypeIsPrimitive) {
- if ($paramIDLType eq "boolean") {
- push(@parameterList, "!!${paramName}");
- } else {
- my $primitiveImplementationType = IDLTypeToImplementationType($paramIDLType);
- push(@parameterList, "static_cast<${primitiveImplementationType}>(${paramName})");
- }
- } else {
- $CPPImplementationWebCoreIncludes{"COMPtr.h"} = 1;
-
- $needsCustom{"CanReturnEarly"} = 1;
-
- my $paramTypeCOMClassName = GetClassName($paramIDLType);
- my $paramTypeImplementationWithoutNamespace = StripNamespace(IDLTypeToImplementationType($paramIDLType));
- my $ptrName = "ptrFor" . $codeGenerator->WK_ucfirst($paramName);
- my $paramInit = " COMPtr<${paramTypeCOMClassName}> ${ptrName}(Query, ${paramName});\n";
- $paramInit .= " if (!${ptrName})\n";
- $paramInit .= " return E_NOINTERFACE;";
- push(@parameterInitialization, $paramInit);
- push(@parameterList, "${ptrName}->impl${paramTypeImplementationWithoutNamespace}()");
- }
- }
-
- push(@parameterList, "ec") if $raisesExceptions;
-
- my $implementationGetter = "impl${implementationClassWithoutNamespace}()";
-
- my $callSigBegin = " ";
- my $callSigMiddle = "${implementationGetter}->" . $codeGenerator->WK_lcfirst($functionName) . "(" . join(", ", @parameterList) . ")";
- my $callSigEnd = ";\n";
-
- if (defined $needsCustom{"NodeToReturn"}) {
- my $nodeToReturn = $needsCustom{"NodeToReturn"};
- $callSigBegin .= "if (";
- $callSigEnd = ")\n";
- $callSigEnd .= " *result = ${nodeToReturn};";
- } elsif (!$noReturn) {
- my $returnTypeIsString = $codeGenerator->IsStringType($returnIDLType);
- my $returnTypeIsPrimitive = $codeGenerator->IsPrimitiveType($returnIDLType);
-
- if ($returnTypeIsString) {
- $callSigBegin .= "*result = WebCore::BString(";
- $callSigEnd = ").release();\n";
- } elsif ($returnTypeIsPrimitive) {
- my $primitiveCOMType = GetClassName($returnIDLType);
- $callSigBegin .= "*result = static_cast<${primitiveCOMType}>(";
- $callSigEnd = ");";
- } else {
- $CPPImplementationIncludesAngle{"wtf/GetPtr.h"} = 1;
- my $returnImplementationType = IDLTypeToImplementationType($returnIDLType);
- my $returnTypeCOMInterfaceName = GetInterfaceName($returnIDLType);
- $callSigBegin .= "${returnImplementationType}* resultImpl = WTF::getPtr(";
- $callSigEnd = ");\n";
- $callSigEnd .= " if (!resultImpl)\n";
- $callSigEnd .= " return E_POINTER;\n\n";
- $callSigEnd .= " *result = to${returnTypeCOMInterfaceName}(resultImpl);";
- }
- }
-
- push(@functionImplementation, $signature);
- push(@functionImplementation, "{\n");
- unless ($noReturn) {
- push(@functionImplementation, " if (!result)\n");
- push(@functionImplementation, " return E_POINTER;\n\n");
- push(@functionImplementation, " *result = 0;\n\n") if $needsCustom{"CanReturnEarly"};
- }
- push(@functionImplementation, " WebCore::ExceptionCode ec = 0;\n") if $raisesExceptions; # FIXME: CHECK EXCEPTION AND DO SOMETHING WITH IT
- push(@functionImplementation, join("\n", @parameterInitialization) . (@parameterInitialization > 0 ? "\n" : ""));
- push(@functionImplementation, $callSigBegin . $callSigMiddle . $callSigEnd . "\n");
- push(@functionImplementation, " return S_OK;\n");
- push(@functionImplementation, "}\n\n");
-
- return join("", @functionImplementation);
-}
-
-
-# -----------------------------------------------------------------------------
-# CPP Header
-# -----------------------------------------------------------------------------
-
-sub GenerateCPPHeader
-{
- my ($object, $dataNode) = @_;
-
- my $IDLType = $dataNode->name;
- my $implementationClass = IDLTypeToImplementationType($IDLType);
- my $implementationClassWithoutNamespace = StripNamespace($implementationClass);
- my $className = GetClassName($IDLType);
- my $interfaceName = GetInterfaceName($IDLType);
-
- my $parentClassName = GetParentClass($dataNode);
- my @otherInterfacesImplemented = GetAdditionalInterfaces($IDLType);
- foreach my $otherInterface (@otherInterfacesImplemented) {
- push(@additionalInterfaceDefinitions, $codeGenerator->ParseInterface($otherInterface));
- }
-
- # FIXME: strip whitespace from UUID
- my $uuid = $dataNode->extendedAttributes->{"ImplementationUUID"} || die "All classes require an ImplementationUUID extended attribute.";
-
- my $numAttributes = @{$dataNode->attributes};
- my $numFunctions = @{$dataNode->functions};
-
- # - Add default header template
- @CPPHeaderHeader = @licenseTemplate;
- push(@CPPHeaderHeader, "\n");
-
- # - Header guards -
- push(@CPPHeaderHeader, "#ifndef " . $className . "_h\n");
- push(@CPPHeaderHeader, "#define " . $className . "_h\n\n");
-
- AddIncludesForTypeInCPPHeader($interfaceName);
- AddIncludesForTypeInCPPHeader($parentClassName);
- $CPPHeaderDontForwardDeclarations{$className} = 1;
- $CPPHeaderDontForwardDeclarations{$interfaceName} = 1;
- $CPPHeaderDontForwardDeclarations{$parentClassName} = 1;
-
- # -- Forward declare implementation type
- push(@CPPHeaderContent, "namespace WebCore {\n");
- push(@CPPHeaderContent, " class ". StripNamespace($implementationClass) . ";\n");
- push(@CPPHeaderContent, "}\n\n");
-
- # -- Start Class --
- my @parentsClasses = ($parentClassName, $interfaceName);
- push(@parentsClasses, map { GetInterfaceName($_) } @otherInterfacesImplemented);
- push(@CPPHeaderContent, "class __declspec(uuid(\"$uuid\")) ${className} : " . join(", ", map { "public $_" } @parentsClasses) . " {\n");
-
- # Add includes for all additional interfaces to implement
- map { AddIncludesForTypeInCPPHeader(GetInterfaceName($_)) } @otherInterfacesImplemented;
-
- # -- BASICS --
- # FIXME: The constructor and destructor should be protected, but the current design of
- # createInstance requires them to be public. One solution is to friend the constructor
- # of the top-level-class with every one of its child classes, but that requires information
- # this script currently does not have, though possibly could determine.
- push(@CPPHeaderContent, "public:\n");
- push(@CPPHeaderContent, " ${className}(${implementationClass}*);\n");
- push(@CPPHeaderContent, " virtual ~${className}();\n\n");
-
- push(@CPPHeaderContent, "public:\n");
- push(@CPPHeaderContent, " static ${className}* createInstance(${implementationClass}*);\n\n");
-
- push(@CPPHeaderContent, " // IUnknown\n");
- push(@CPPHeaderContent, " virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void** ppvObject);\n");
- push(@CPPHeaderContent, " virtual ULONG STDMETHODCALLTYPE AddRef() { return ${parentClassName}::AddRef(); }\n");
- push(@CPPHeaderContent, " virtual ULONG STDMETHODCALLTYPE Release() { return ${parentClassName}::Release(); }\n\n");
-
-
- # -- Parent Class Forwards --
- if (@{$dataNode->parents}) {
- my %attributeNameSet = map {($_->signature->name, 1)} @{$dataNode->attributes};
- my %functionNameSet = map {($_->signature->name, 1)} @{$dataNode->functions};
-
- my @parentLists = $codeGenerator->GetMethodsAndAttributesFromParentClasses($dataNode);
- push(@CPPHeaderContent, "\n");
- foreach my $parentHash (@parentLists) {
-
- push(@CPPHeaderContent, " // " . GetInterfaceName($parentHash->{'name'}) . $DASHES . "\n");
-
- my @attributeList = @{$parentHash->{'attributes'}};
- push(@CPPHeaderContent, " // Attributes\n");
- foreach my $attribute (@attributeList) {
- # Don't forward an attribute that this class redefines.
- next if $attributeNameSet{$attribute->signature->name};
-
- AddForwardDeclarationsForTypeInCPPHeader($attribute->signature->type);
-
- my %attributes = GenerateCPPAttributeSignature($attribute, $className, { "NewLines" => 0,
- "Indent" => 4,
- "IncludeSemiColon" => 0,
- "AddVirtualKeyword" => 1,
- "UseClassName" => 0,
- "Forwarder" => $parentClassName });
- push(@CPPHeaderContent, values(%attributes));
- }
-
- # Add attribute names to attribute names set in case other ancestors
- # also define them.
- $attributeNameSet{$_->signature->name} = 1 foreach @attributeList;
-
- push(@CPPHeaderContent, "\n");
-
- my @functionList = @{$parentHash->{'functions'}};
- push(@CPPHeaderContent, " // Functions\n");
- foreach my $function (@functionList) {
- # Don't forward a function that this class redefines.
- next if $functionNameSet{$function->signature->name};
-
- AddForwardDeclarationsForTypeInCPPHeader($function->signature->type);
- AddForwardDeclarationsForTypeInCPPHeader($_->type) foreach (@{$function->parameters});
-
- my $functionSig = GenerateCPPFunctionSignature($function, $className, { "NewLines" => 0,
- "Indent" => 4,
- "IncludeSemiColon" => 0,
- "AddVirtualKeyword" => 1,
- "UseClassName" => 0,
- "Forwarder" => $parentClassName });
-
- push(@CPPHeaderContent, $functionSig);
- }
- # Add functions names to functions names set in case other ancestors
- # also define them.
- $functionNameSet{$_->signature->name} = 1 foreach @functionList;
-
- push(@CPPHeaderContent, "\n");
- }
- }
-
- # - Additional interfaces to implement -
- foreach my $interfaceToImplement (@additionalInterfaceDefinitions) {
- my $IDLTypeOfInterfaceToImplement = $interfaceToImplement->name;
- my $nameOfInterfaceToImplement = GetInterfaceName($IDLTypeOfInterfaceToImplement);
- my $numAttributesInInterface = @{$interfaceToImplement->attributes};
- my $numFunctionsInInterface = @{$interfaceToImplement->functions};
-
- push(@CPPHeaderContent, " // ${nameOfInterfaceToImplement} ${DASHES}\n\n");
-
- # - Add attribute getters/setters.
- if ($numAttributesInInterface > 0) {
- push(@CPPHeaderContent, " // Attributes\n\n");
- foreach my $attribute (@{$interfaceToImplement->attributes}) {
- AddForwardDeclarationsForTypeInCPPHeader($attribute->signature->type);
-
- my %attributeSigs = GenerateCPPAttributeSignature($attribute, $className, { "NewLines" => 1,
- "Indent" => 4,
- "IncludeSemiColon" => 1,
- "AddVirtualKeyword" => 1,
- "UseClassName" => 0 });
-
- push(@CPPHeaderContent, values(%attributeSigs));
- push(@CPPHeaderContent, "\n");
- }
- }
-
- # - Add functions.
- if ($numFunctionsInInterface > 0) {
- push(@CPPHeaderContent, " // Functions\n\n");
- foreach my $function (@{$interfaceToImplement->functions}) {
- AddForwardDeclarationsForTypeInCPPHeader($function->signature->type);
- AddForwardDeclarationsForTypeInCPPHeader($_->type) foreach (@{$function->parameters});
-
- my $functionSig = GenerateCPPFunctionSignature($function, $className, { "NewLines" => 1,
- "Indent" => 4,
- "IncludeSemiColon" => 1,
- "AddVirtualKeyword" => 1,
- "UseClassName" => 0 });
-
- push(@CPPHeaderContent, $functionSig);
- push(@CPPHeaderContent, "\n");
- }
- }
- }
-
- if ($numAttributes > 0 || $numFunctions > 0) {
- push(@CPPHeaderContent, " // ${interfaceName} ${DASHES}\n\n");
- }
-
- # - Add constants COMING SOON
-
- # - Add attribute getters/setters.
- if ($numAttributes > 0) {
- push(@CPPHeaderContent, " // Attributes\n\n");
- foreach my $attribute (@{$dataNode->attributes}) {
- AddForwardDeclarationsForTypeInCPPHeader($attribute->signature->type);
-
- my %attributeSigs = GenerateCPPAttributeSignature($attribute, $className, { "NewLines" => 1,
- "Indent" => 4,
- "IncludeSemiColon" => 1,
- "AddVirtualKeyword" => 1,
- "UseClassName" => 0 });
-
- push(@CPPHeaderContent, values(%attributeSigs));
- push(@CPPHeaderContent, "\n");
- }
- }
-
- # - Add functions.
- if ($numFunctions > 0) {
- push(@CPPHeaderContent, " // Functions\n\n");
- foreach my $function (@{$dataNode->functions}) {
- AddForwardDeclarationsForTypeInCPPHeader($function->signature->type);
- AddForwardDeclarationsForTypeInCPPHeader($_->type) foreach (@{$function->parameters});
-
- my $functionSig = GenerateCPPFunctionSignature($function, $className, { "NewLines" => 1,
- "Indent" => 4,
- "IncludeSemiColon" => 1,
- "AddVirtualKeyword" => 1,
- "UseClassName" => 0 });
-
- push(@CPPHeaderContent, $functionSig);
- push(@CPPHeaderContent, "\n");
- }
- }
-
- push(@CPPHeaderContent, " ${implementationClass}* impl${implementationClassWithoutNamespace}() const;\n");
-
- if (@{$dataNode->parents} == 0) {
- AddIncludesForTypeInCPPHeader("wtf/RefPtr", 1);
- push(@CPPHeaderContent, "\n");
- push(@CPPHeaderContent, " ${implementationClass}* impl() const { return m_impl.get(); }\n\n");
- push(@CPPHeaderContent, "private:\n");
- push(@CPPHeaderContent, " RefPtr<${implementationClass}> m_impl;\n");
- }
-
- # -- End Class --
- push(@CPPHeaderContent, "};\n\n");
-
- # -- Default Interface Creator --
- push(@CPPHeaderContent, "${interfaceName}* to${interfaceName}(${implementationClass}*);\n\n");
-
- push(@CPPHeaderContent, "#endif // " . $className . "_h\n");
-}
-
-
-# -----------------------------------------------------------------------------
-# CPP Implementation
-# -----------------------------------------------------------------------------
-
-sub GenerateCPPImplementation
-{
- my ($object, $dataNode) = @_;
-
- my $IDLType = $dataNode->name;
- my $implementationClass = IDLTypeToImplementationType($IDLType);
- my $implementationClassWithoutNamespace = StripNamespace($implementationClass);
- my $className = GetClassName($IDLType);
- my $interfaceName = GetInterfaceName($IDLType);
-
- my $parentClassName = GetParentClass($dataNode);
- my $isBaseClass = (@{$dataNode->parents} == 0);
-
- my $uuid = $dataNode->extendedAttributes->{"ImplementationUUID"} || die "All classes require an ImplementationUUID extended attribute.";
-
- my $numAttributes = @{$dataNode->attributes};
- my $numFunctions = @{$dataNode->functions};
-
- # - Add default header template
- @CPPImplementationHeader = @licenseTemplate;
- push(@CPPImplementationHeader, "\n");
-
- push(@CPPImplementationHeader, "#include \"config.h\"\n");
- push(@CPPImplementationHeader, "#include \"WebKitDLL.h\"\n");
- push(@CPPImplementationHeader, "#include " . ($className eq "GEN_DOMImplementation" ? "\"GEN_DOMDOMImplementation.h\"" : "\"${className}.h\"") . "\n");
- $CPPImplementationDontIncludes{"${className}.h"} = 1;
- $CPPImplementationWebCoreIncludes{"${implementationClassWithoutNamespace}.h"} = 1;
-
- # -- Constructor --
- push(@CPPImplementationContent, "${className}::${className}(${implementationClass}* impl)\n");
- if ($isBaseClass) {
- push(@CPPImplementationContent, " : m_impl(impl)\n");
- push(@CPPImplementationContent, "{\n");
- push(@CPPImplementationContent, " ASSERT_ARG(impl, impl);\n");
- push(@CPPImplementationContent, "}\n\n");
- } else {
- push(@CPPImplementationContent, " : ${parentClassName}(impl)\n");
- push(@CPPImplementationContent, "{\n");
- push(@CPPImplementationContent, "}\n\n");
- }
-
- # -- Destructor --
- push(@CPPImplementationContent, "${className}::~${className}()\n");
- push(@CPPImplementationContent, "{\n");
- if ($isBaseClass) {
- $CPPImplementationIncludes{"DOMCreateInstance.h"} = 1;
- push(@CPPImplementationContent, " removeDOMWrapper(impl());\n");
- }
- push(@CPPImplementationContent, "}\n\n");
-
- push(@CPPImplementationContent, "${implementationClass}* ${className}::impl${implementationClassWithoutNamespace}() const\n");
- push(@CPPImplementationContent, "{\n");
- push(@CPPImplementationContent, " return static_cast<${implementationClass}*>(impl());\n");
- push(@CPPImplementationContent, "}\n\n");
-
- # Base classes must implement the createInstance method externally.
- if (@{$dataNode->parents} != 0) {
- push(@CPPImplementationContent, "${className}* ${className}::createInstance(${implementationClass}* impl)\n");
- push(@CPPImplementationContent, "{\n");
- push(@CPPImplementationContent, " return static_cast<${className}*>(${parentClassName}::createInstance(impl));\n");
- push(@CPPImplementationContent, "}\n");
- }
-
- push(@CPPImplementationContent, "// IUnknown $DASHES\n\n");
-
- # -- QueryInterface --
- push(@CPPImplementationContent, "HRESULT STDMETHODCALLTYPE ${className}::QueryInterface(REFIID riid, void** ppvObject)\n");
- push(@CPPImplementationContent, "{\n");
- push(@CPPImplementationContent, " *ppvObject = 0;\n");
- push(@CPPImplementationContent, " if (IsEqualGUID(riid, IID_${interfaceName}))\n");
- push(@CPPImplementationContent, " *ppvObject = reinterpret_cast<${interfaceName}*>(this);\n");
- push(@CPPImplementationContent, " else if (IsEqualGUID(riid, __uuidof(${className})))\n");
- push(@CPPImplementationContent, " *ppvObject = reinterpret_cast<${className}*>(this);\n");
- push(@CPPImplementationContent, " else\n");
- push(@CPPImplementationContent, " return ${parentClassName}::QueryInterface(riid, ppvObject);\n\n");
- push(@CPPImplementationContent, " AddRef();\n");
- push(@CPPImplementationContent, " return S_OK;\n");
- push(@CPPImplementationContent, "}\n\n");
-
- # - Additional interfaces to implement -
- foreach my $interfaceToImplement (@additionalInterfaceDefinitions) {
- my $IDLTypeOfInterfaceToImplement = $interfaceToImplement->name;
- my $nameOfInterfaceToImplement = GetInterfaceName($IDLTypeOfInterfaceToImplement);
- my $numAttributesInInterface = @{$interfaceToImplement->attributes};
- my $numFunctionsInInterface = @{$interfaceToImplement->functions};
-
- push(@CPPImplementationContent, " // ${nameOfInterfaceToImplement} ${DASHES}\n\n");
-
- if ($numAttributesInInterface > 0) {
- push(@CPPImplementationContent, "// Attributes\n\n");
- foreach my $attribute (@{$interfaceToImplement->attributes}) {
- # FIXME: Do this in one step.
- # FIXME: Implement exception handling.
-
- AddIncludesForTypeInCPPImplementation($attribute->signature->type);
-
- my %attributes = GenerateCPPAttribute($attribute, $className, $implementationClass, $IDLType);
- push(@CPPImplementationContent, values(%attributes));
- }
- }
-
- # - Add functions.
- if ($numFunctionsInInterface > 0) {
- push(@CPPImplementationContent, "// Functions\n\n");
-
- foreach my $function (@{$interfaceToImplement->functions}) {
- my $functionImplementation = GenerateCPPFunction($function, $className, $implementationClass);
- push(@CPPImplementationContent, $functionImplementation);
- }
- }
- }
-
- push(@CPPImplementationContent, "// ${interfaceName} $DASHES\n\n");
-
- # - Add attribute getters/setters.
- if ($numAttributes > 0) {
- push(@CPPImplementationContent, "// Attributes\n\n");
- foreach my $attribute (@{$dataNode->attributes}) {
- # FIXME: do this in one step
- my $hasSetterException = @{$attribute->setterExceptions};
- my $hasGetterException = @{$attribute->getterExceptions};
-
- AddIncludesForTypeInCPPImplementation($attribute->signature->type);
-
- my %attributes = GenerateCPPAttribute($attribute, $className, $implementationClass, $IDLType);
- push(@CPPImplementationContent, values(%attributes));
- }
- }
-
- # - Add functions.
- if ($numFunctions > 0) {
- push(@CPPImplementationContent, "// Functions\n\n");
-
- foreach my $function (@{$dataNode->functions}) {
- my $functionImplementation = GenerateCPPFunction($function, $className, $implementationClass);
- push(@CPPImplementationContent, $functionImplementation);
- }
- }
-
- # - Default implementation for interface creator.
- # FIXME: add extended attribute to add custom implementation if necessary.
- push(@CPPImplementationContent, "${interfaceName}* to${interfaceName}(${implementationClass}* impl)\n");
- push(@CPPImplementationContent, "{\n");
- push(@CPPImplementationContent, " return ${className}::createInstance(impl);\n");
- push(@CPPImplementationContent, "}\n");
-}
-
-sub WriteData
-{
- my ($object, $name, $pureInterface) = @_;
-
- # -- IDL --
- my $IDLFileName = "$outputDir/I" . $TEMP_PREFIX . "DOM" . $name . ".idl";
- unlink($IDLFileName);
-
- # Write to output IDL.
- open(OUTPUTIDL, ">$IDLFileName") or die "Couldn't open file $IDLFileName";
-
- # Add header
- print OUTPUTIDL @IDLHeader;
-
- # Add forward declarations and imorts
- delete $IDLForwardDeclarations{keys(%IDLDontForwardDeclare)};
- delete $IDLImports{keys(%IDLDontImport)};
-
- print OUTPUTIDL map { "cpp_quote(\"interface $_;\")\n" } sort keys(%IDLForwardDeclarations);
- print OUTPUTIDL "\n";
-
- print OUTPUTIDL map { "interface $_;\n" } sort keys(%IDLForwardDeclarations);
- print OUTPUTIDL "\n";
- print OUTPUTIDL "#ifndef DO_NO_IMPORTS\n";
- print OUTPUTIDL map { ($_ eq "IGEN_DOMImplementation") ? "import \"IGEN_DOMDOMImplementation.idl\";\n" : "import \"$_.idl\";\n" } sort keys(%IDLImports);
- print OUTPUTIDL "#endif\n";
- print OUTPUTIDL "\n";
-
- # Add content
- print OUTPUTIDL @IDLContent;
-
- close(OUTPUTIDL);
-
- @IDLHeader = ();
- @IDLContent = ();
-
- if ($pureInterface) {
- my $CPPInterfaceHeaderFileName = "$outputDir/" . $TEMP_PREFIX . "DOM" . $name . ".h";
- unlink($CPPInterfaceHeaderFileName);
-
- open(OUTPUTCPPInterfaceHeader, ">$CPPInterfaceHeaderFileName") or die "Couldn't open file $CPPInterfaceHeaderFileName";
-
- print OUTPUTCPPInterfaceHeader @CPPInterfaceHeader;
-
- close(OUTPUTCPPInterfaceHeader);
-
- @CPPInterfaceHeader = ();
- } else {
- my $CPPHeaderFileName = "$outputDir/" . $TEMP_PREFIX . "DOM" . $name . ".h";
- unlink($CPPHeaderFileName);
-
- # -- CPP Header --
- open(OUTPUTCPPHeader, ">$CPPHeaderFileName") or die "Couldn't open file $CPPHeaderFileName";
-
- # Add header
- print OUTPUTCPPHeader @CPPHeaderHeader;
-
- # Add includes
- print OUTPUTCPPHeader map { ($_ eq "GEN_DOMImplementation.h") ? "#include \"GEN_DOMDOMImplementation.h\"\n" : "#include \"$_\"\n" } sort keys(%CPPHeaderIncludes);
- print OUTPUTCPPHeader map { "#include <$_>\n" } sort keys(%CPPHeaderIncludesAngle);
-
- foreach my $dontDeclare (keys(%CPPHeaderDontForwardDeclarations)) {
- delete $CPPHeaderForwardDeclarations{$dontDeclare} if ($CPPHeaderForwardDeclarations{$dontDeclare});
- }
- print OUTPUTCPPHeader "\n";
- print OUTPUTCPPHeader map { "interface $_;\n" } sort keys(%CPPHeaderForwardDeclarations);
- print OUTPUTCPPHeader "\n";
-
- # Add content
- print OUTPUTCPPHeader @CPPHeaderContent;
-
- close(OUTPUTCPPHeader);
-
- @CPPHeaderHeader = ();
- @CPPHeaderContent = ();
-
-
- # -- CPP Implementation --
- my $CPPImplementationFileName = "$outputDir/" . $TEMP_PREFIX . "DOM" . $name . ".cpp";
- unlink($CPPImplementationFileName);
-
- open(OUTPUTCPPImplementation, ">$CPPImplementationFileName") or die "Couldn't open file $CPPImplementationFileName";
-
- # Add header
- print OUTPUTCPPImplementation @CPPImplementationHeader;
- print OUTPUTCPPImplementation "\n";
-
- # Add includes
- foreach my $dontInclude (keys(%CPPImplementationDontIncludes)) {
- delete $CPPImplementationIncludes{$dontInclude} if ($CPPImplementationIncludes{$dontInclude});
- }
- print OUTPUTCPPImplementation map { ($_ eq "GEN_DOMImplementation.h") ? "#include \"GEN_DOMDOMImplementation.h\"\n" : "#include \"$_\"\n" } sort keys(%CPPImplementationIncludes);
- print OUTPUTCPPImplementation map { "#include <$_>\n" } sort keys(%CPPImplementationIncludesAngle);
- print OUTPUTCPPImplementation "\n";
-
- print OUTPUTCPPImplementation "#pragma warning(push, 0)\n";
- print OUTPUTCPPImplementation map { "#include <WebCore/$_>\n" } sort keys(%CPPImplementationWebCoreIncludes);
- print OUTPUTCPPImplementation "#pragma warning(pop)\n";
-
- # Add content
- print OUTPUTCPPImplementation @CPPImplementationContent;
-
- close(OUTPUTCPPImplementation);
-
- @CPPImplementationHeader = ();
- @CPPImplementationContent = ();
- }
-}
-
-1;
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index 6ccf739..7a55a3d 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -37,6 +37,8 @@ my @implContentHeader = ();
my @implContent = ();
my %implIncludes = ();
my @depsContent = ();
+my $numCachedAttributes = 0;
+my $currentCachedAttribute = 0;
# Default .h template
my $headerTemplate = << "EOF";
@@ -132,15 +134,7 @@ sub GetParentClassName
my $dataNode = shift;
return $dataNode->extendedAttributes->{"LegacyParent"} if $dataNode->extendedAttributes->{"LegacyParent"};
- if (@{$dataNode->parents} eq 0) {
- # FIXME: SVG types requiring a context() pointer do not have enough
- # space to hold a globalObject pointer as well w/o hitting the CELL_SIZE limit.
- # This could be fixed by moving context() into the various impl() classes.
- # Until then, we special case these SVG bindings and allow them to return
- # the wrong prototypes and constructors during x-frame access. See bug 27088.
- return "DOMObjectWithSVGContext" if IsSVGTypeNeedingContextParameter($dataNode->name);
- return "DOMObjectWithGlobalPointer";
- }
+ return "DOMObjectWithGlobalPointer" if (@{$dataNode->parents} eq 0);
return "JS" . $codeGenerator->StripModule($dataNode->parents(0));
}
@@ -169,16 +163,6 @@ sub IndexGetterReturnsStrings
return 0;
}
-sub CreateSVGContextInterfaceName
-{
- my $type = shift;
-
- return $type if $codeGenerator->IsSVGAnimatedType($type);
- return "SVGPathSeg" if $type =~ /^SVGPathSeg/ and $type ne "SVGPathSegList";
-
- return "";
-}
-
sub AddIncludesForType
{
my $type = $codeGenerator->StripModule(shift);
@@ -491,7 +475,6 @@ sub GenerateHeader
my $hasParent = $hasLegacyParent || $hasRealParent;
my $parentClassName = GetParentClassName($dataNode);
my $conditional = $dataNode->extendedAttributes->{"Conditional"};
- my $needsSVGContext = IsSVGTypeNeedingContextParameter($interfaceName);
my $eventTarget = $dataNode->extendedAttributes->{"EventTarget"};
my $needsMarkChildren = $dataNode->extendedAttributes->{"CustomMarkFunction"} || $dataNode->extendedAttributes->{"EventTarget"};
@@ -511,8 +494,7 @@ sub GenerateHeader
if ($hasParent) {
$headerIncludes{"$parentClassName.h"} = 1;
} else {
- $headerIncludes{"DOMObjectWithSVGContext.h"} = $needsSVGContext;
- $headerIncludes{"JSDOMBinding.h"} = !$needsSVGContext;
+ $headerIncludes{"JSDOMBinding.h"} = 1;
$headerIncludes{"<runtime/JSGlobalObject.h>"} = 1;
$headerIncludes{"<runtime/ObjectPrototype.h>"} = 1;
}
@@ -559,14 +541,12 @@ sub GenerateHeader
push(@headerContent, " $className(NonNullPassRefPtr<JSC::Structure>, PassRefPtr<$implType>, JSDOMWindowShell*);\n");
} elsif ($dataNode->extendedAttributes->{"IsWorkerContext"}) {
push(@headerContent, " $className(NonNullPassRefPtr<JSC::Structure>, PassRefPtr<$implType>);\n");
- } elsif (IsSVGTypeNeedingContextParameter($implClassName)) {
- push(@headerContent, " $className(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<$implType>, SVGElement* context);\n");
} else {
push(@headerContent, " $className(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<$implType>);\n");
}
# Destructor
- push(@headerContent, " virtual ~$className();\n") if (!$hasParent or $eventTarget or $interfaceName eq "Document" or $interfaceName eq "DOMWindow");
+ push(@headerContent, " virtual ~$className();\n") if (!$hasParent or $eventTarget or $interfaceName eq "DOMWindow");
# Prototype
push(@headerContent, " static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);\n") unless ($dataNode->extendedAttributes->{"ExtendsDOMGlobalObject"});
@@ -574,7 +554,8 @@ sub GenerateHeader
$implIncludes{"${className}Custom.h"} = 1 if $dataNode->extendedAttributes->{"CustomHeader"} || $dataNode->extendedAttributes->{"CustomPutFunction"} || $dataNode->extendedAttributes->{"DelegatingPutFunction"};
my $hasGetter = $numAttributes > 0
- || $dataNode->extendedAttributes->{"GenerateConstructor"}
+ || !($dataNode->extendedAttributes->{"OmitConstructor"}
+ || $dataNode->extendedAttributes->{"CustomConstructor"})
|| $dataNode->extendedAttributes->{"HasIndexGetter"}
|| $dataNode->extendedAttributes->{"HasCustomIndexGetter"}
|| $dataNode->extendedAttributes->{"HasNumericIndexGetter"}
@@ -625,7 +606,7 @@ sub GenerateHeader
push(@headerContent,
" static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)\n" .
" {\n" .
- " return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags));\n" .
+ " return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);\n" .
" }\n\n");
# markChildren function
@@ -645,7 +626,7 @@ sub GenerateHeader
# Custom getPropertyNames function exists on DOMWindow
if ($interfaceName eq "DOMWindow") {
- push(@headerContent, " virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&);\n");
+ push(@headerContent, " virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties);\n");
$structureFlags{"JSC::OverridesGetPropertyNames"} = 1;
}
@@ -654,7 +635,7 @@ sub GenerateHeader
# Custom getOwnPropertyNames function
if ($dataNode->extendedAttributes->{"CustomGetPropertyNames"} || $dataNode->extendedAttributes->{"HasIndexGetter"} || $dataNode->extendedAttributes->{"HasCustomIndexGetter"} || $dataNode->extendedAttributes->{"HasNumericIndexGetter"}) {
- push(@headerContent, " virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&);\n");
+ push(@headerContent, " virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties);\n");
$structureFlags{"JSC::OverridesGetPropertyNames"} = 1;
}
@@ -677,7 +658,7 @@ sub GenerateHeader
}
# Constructor object getter
- push(@headerContent, " static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);\n") if $dataNode->extendedAttributes->{"GenerateConstructor"};
+ push(@headerContent, " static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);\n") if (!($dataNode->extendedAttributes->{"OmitConstructor"} || $dataNode->extendedAttributes->{"CustomConstructor"}));
my $numCustomFunctions = 0;
my $numCustomAttributes = 0;
@@ -689,9 +670,17 @@ sub GenerateHeader
$numCustomAttributes++ if $attribute->signature->extendedAttributes->{"Custom"} || $attribute->signature->extendedAttributes->{"JSCCustom"};
$numCustomAttributes++ if $attribute->signature->extendedAttributes->{"CustomGetter"} || $attribute->signature->extendedAttributes->{"JSCCustomGetter"};
$numCustomAttributes++ if $attribute->signature->extendedAttributes->{"CustomSetter"} || $attribute->signature->extendedAttributes->{"JSCCustomSetter"};
+ if ($attribute->signature->extendedAttributes->{"CachedAttribute"}) {
+ push(@headerContent, " static const unsigned " . $attribute->signature->name . "Slot = $numCachedAttributes + Base::AnonymousSlotCount;\n");
+ $numCachedAttributes++;
+ }
}
}
+ if ($numCachedAttributes > 0) {
+ push(@headerContent, " using $parentClassName" . "::putAnonymousValue;\n");
+ push(@headerContent, " using $parentClassName" . "::getAnonymousValue;\n");
+ }
if ($numCustomAttributes > 0) {
push(@headerContent, "\n // Custom attributes\n");
@@ -738,6 +727,12 @@ sub GenerateHeader
push(@headerContent, " }\n");
}
+ # anonymous slots
+ if ($numCachedAttributes) {
+ push(@headerContent, "public:\n");
+ push(@headerContent, " static const unsigned AnonymousSlotCount = $numCachedAttributes + Base::AnonymousSlotCount;\n");
+ }
+
# structure flags
push(@headerContent, "protected:\n");
push(@headerContent, " static const unsigned StructureFlags = ");
@@ -781,7 +776,7 @@ sub GenerateHeader
if (!$hasParent || $dataNode->extendedAttributes->{"GenerateToJS"} || $dataNode->extendedAttributes->{"CustomToJS"}) {
if ($podType) {
- push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, JSSVGPODTypeWrapper<$podType>*, SVGElement* context);\n");
+ push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, JSSVGPODTypeWrapper<$podType>*, SVGElement*);\n");
} elsif (IsSVGTypeNeedingContextParameter($implClassName)) {
push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*, SVGElement* context);\n");
} else {
@@ -830,7 +825,7 @@ sub GenerateHeader
push(@headerContent,
" static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)\n" .
" {\n" .
- " return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags));\n" .
+ " return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);\n" .
" }\n");
if ($dataNode->extendedAttributes->{"DelegatingPrototypePutFunction"}) {
push(@headerContent, " virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);\n");
@@ -860,7 +855,7 @@ sub GenerateHeader
}
}
- if ($numAttributes > 0 || $dataNode->extendedAttributes->{"GenerateConstructor"}) {
+ if ($numAttributes > 0 || !($dataNode->extendedAttributes->{"OmitConstructor"} || $dataNode->extendedAttributes->{"CustomConstructor"})) {
push(@headerContent,"// Attributes\n\n");
foreach my $attribute (@{$dataNode->attributes}) {
my $getter = "js" . $interfaceName . $codeGenerator->WK_ucfirst($attribute->signature->name) . ($attribute->signature->type =~ /Constructor$/ ? "Constructor" : "");
@@ -871,7 +866,7 @@ sub GenerateHeader
}
}
- if ($dataNode->extendedAttributes->{"GenerateConstructor"}) {
+ if (!($dataNode->extendedAttributes->{"OmitConstructor"} || $dataNode->extendedAttributes->{"CustomConstructor"})) {
my $getter = "js" . $interfaceName . "Constructor";
push(@headerContent, "JSC::JSValue ${getter}(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);\n");
}
@@ -940,7 +935,7 @@ sub GenerateImplementation
# - Add all attributes in a hashtable definition
my $numAttributes = @{$dataNode->attributes};
- $numAttributes++ if $dataNode->extendedAttributes->{"GenerateConstructor"};
+ $numAttributes++ if (!($dataNode->extendedAttributes->{"OmitConstructor"} || $dataNode->extendedAttributes->{"CustomConstructor"}));
if ($numAttributes > 0) {
my $hashSize = $numAttributes;
@@ -981,7 +976,7 @@ sub GenerateImplementation
}
}
- if ($dataNode->extendedAttributes->{"GenerateConstructor"}) {
+ if (!($dataNode->extendedAttributes->{"OmitConstructor"} || $dataNode->extendedAttributes->{"CustomConstructor"})) {
push(@hashKeys, "constructor");
my $getter = "js" . $interfaceName . "Constructor";
push(@hashValue1, $getter);
@@ -999,7 +994,7 @@ sub GenerateImplementation
my $numFunctions = @{$dataNode->functions};
# - Add all constants
- if ($dataNode->extendedAttributes->{"GenerateConstructor"}) {
+ if (!($dataNode->extendedAttributes->{"OmitConstructor"} || $dataNode->extendedAttributes->{"CustomConstructor"})) {
$hashSize = $numConstants;
$hashName = $className . "ConstructorTable";
@@ -1171,9 +1166,6 @@ sub GenerateImplementation
my $podType = $dataNode->extendedAttributes->{"PODType"};
my $implType = $podType ? "JSSVGPODTypeWrapper<$podType> " : $implClassName;
- my $needsSVGContext = IsSVGTypeNeedingContextParameter($implClassName);
- my $parentNeedsSVGContext = ($needsSVGContext and $parentClassName =~ /SVG/);
-
# Constructor
if ($interfaceName eq "DOMWindow") {
AddIncludesForType("JSDOMWindowShell");
@@ -1184,16 +1176,19 @@ sub GenerateImplementation
push(@implContent, "${className}::$className(NonNullPassRefPtr<Structure> structure, PassRefPtr<$implType> impl)\n");
push(@implContent, " : $parentClassName(structure, impl)\n");
} else {
- my $contextArg = $needsSVGContext ? ", SVGElement* context" : "";
- push(@implContent, "${className}::$className(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<$implType> impl$contextArg)\n");
+ push(@implContent, "${className}::$className(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<$implType> impl)\n");
if ($hasParent) {
- push(@implContent, " : $parentClassName(structure, globalObject, impl" . ($parentNeedsSVGContext ? ", context" : "") . ")\n");
+ push(@implContent, " : $parentClassName(structure, globalObject, impl)\n");
} else {
- push(@implContent, " : $parentClassName(structure, globalObject" . ($needsSVGContext ? ", context" : "") . ")\n");
+ push(@implContent, " : $parentClassName(structure, globalObject)\n");
push(@implContent, " , m_impl(impl)\n");
}
}
push(@implContent, "{\n");
+ if ($numCachedAttributes > 0) {
+ push(@implContent, " for (unsigned i = Base::AnonymousSlotCount; i < AnonymousSlotCount; i++)\n");
+ push(@implContent, " putAnonymousValue(i, JSValue());\n");
+ }
push(@implContent, "}\n\n");
# Destructor
@@ -1210,29 +1205,15 @@ sub GenerateImplementation
if ($interfaceName eq "Node") {
push(@implContent, " forgetDOMNode(this, impl(), impl()->document());\n");
} else {
- if ($podType) {
- my $animatedType = $implClassName;
- $animatedType =~ s/SVG/SVGAnimated/;
-
- # Special case for JSSVGNumber
- if ($codeGenerator->IsSVGAnimatedType($animatedType) and $podType ne "float") {
- push(@implContent, " JSSVGDynamicPODTypeWrapperCache<$podType, $animatedType>::forgetWrapper(m_impl.get());\n");
- }
- }
push(@implContent, " forgetDOMObject(this, impl());\n");
}
+
+ push(@implContent, " JSSVGContextCache::forgetWrapper(this);\n") if IsSVGTypeNeedingContextParameter($implClassName);
}
push(@implContent, "}\n\n");
}
- # Document needs a special destructor because it's a special case for caching. It needs
- # its own special handling rather than relying on the caching that Node normally does.
- if ($interfaceName eq "Document") {
- push(@implContent, "${className}::~$className()\n");
- push(@implContent, "{\n forgetDOMObject(this, static_cast<${implClassName}*>(impl()));\n}\n\n");
- }
-
if ($needsMarkChildren && !$dataNode->extendedAttributes->{"CustomMarkFunction"}) {
push(@implContent, "void ${className}::markChildren(MarkStack& markStack)\n");
push(@implContent, "{\n");
@@ -1253,7 +1234,8 @@ sub GenerateImplementation
}
my $hasGetter = $numAttributes > 0
- || $dataNode->extendedAttributes->{"GenerateConstructor"}
+ || !($dataNode->extendedAttributes->{"OmitConstructor"}
+ || $dataNode->extendedAttributes->{"CustomConstructor"})
|| $dataNode->extendedAttributes->{"HasIndexGetter"}
|| $dataNode->extendedAttributes->{"HasCustomIndexGetter"}
|| $dataNode->extendedAttributes->{"HasNumericIndexGetter"}
@@ -1352,12 +1334,19 @@ sub GenerateImplementation
push(@implContent, " return JS" . $constructorType . "::getConstructor(exec, castedThis);\n");
} elsif (!@{$attribute->getterExceptions}) {
push(@implContent, " UNUSED_PARAM(exec);\n");
+ my $cacheIndex = 0;
+ if ($attribute->signature->extendedAttributes->{"CachedAttribute"}) {
+ $cacheIndex = $currentCachedAttribute;
+ $currentCachedAttribute++;
+ push(@implContent, " if (JSValue cachedValue = castedThis->getAnonymousValue(" . $className . "::" . $attribute->signature->name . "Slot))\n");
+ push(@implContent, " return cachedValue;\n");
+ }
if ($podType) {
push(@implContent, " $podType imp(*castedThis->impl());\n");
if ($podType eq "float") { # Special case for JSSVGNumber
- push(@implContent, " return " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp", "castedThis") . ";\n");
+ push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp", "castedThis") . ";\n");
} else {
- push(@implContent, " return " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp.$implGetterFunctionName()", "castedThis") . ";\n");
+ push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp.$implGetterFunctionName()", "castedThis") . ";\n");
}
} else {
push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(castedThis->impl());\n");
@@ -1376,11 +1365,15 @@ sub GenerateImplementation
my $jsType = NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, $value, "castedThis");
if ($codeGenerator->IsSVGAnimatedType($type)) {
push(@implContent, " RefPtr<$type> obj = $jsType;\n");
- push(@implContent, " return toJS(exec, castedThis->globalObject(), obj.get(), imp);\n");
+ push(@implContent, " JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp);\n");
} else {
- push(@implContent, " return $jsType;\n");
+ push(@implContent, " JSValue result = $jsType;\n");
}
}
+
+ push(@implContent, " castedThis->putAnonymousValue(" . $className . "::" . $attribute->signature->name . "Slot, result);\n") if ($attribute->signature->extendedAttributes->{"CachedAttribute"});
+ push(@implContent, " return result;\n");
+
} else {
push(@implContent, " ExceptionCode ec = 0;\n");
if ($podType) {
@@ -1404,20 +1397,13 @@ sub GenerateImplementation
push(@implContent, "\n");
}
- if ($dataNode->extendedAttributes->{"GenerateConstructor"}) {
+ if (!($dataNode->extendedAttributes->{"OmitConstructor"} || $dataNode->extendedAttributes->{"CustomConstructor"})) {
my $constructorFunctionName = "js" . $interfaceName . "Constructor";
push(@implContent, "JSValue ${constructorFunctionName}(ExecState* exec, const Identifier&, const PropertySlot& slot)\n");
push(@implContent, "{\n");
- if (IsSVGTypeNeedingContextParameter($interfaceName)) {
- # FIXME: SVG bindings with a context pointer have no space to store a globalObject
- # so we use deprecatedGlobalObjectForPrototype instead.
- push(@implContent, " UNUSED_PARAM(slot);\n");
- push(@implContent, " return ${className}::getConstructor(exec, deprecatedGlobalObjectForPrototype(exec));\n");
- } else {
- push(@implContent, " ${className}* domObject = static_cast<$className*>(asObject(slot.slotBase()));\n");
- push(@implContent, " return ${className}::getConstructor(exec, domObject->globalObject());\n");
- }
+ push(@implContent, " ${className}* domObject = static_cast<$className*>(asObject(slot.slotBase()));\n");
+ push(@implContent, " return ${className}::getConstructor(exec, domObject->globalObject());\n");
push(@implContent, "}\n");
}
}
@@ -1491,16 +1477,7 @@ sub GenerateImplementation
$implIncludes{"JSEventListener.h"} = 1;
push(@implContent, " UNUSED_PARAM(exec);\n");
push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(static_cast<$className*>(thisObject)->impl());\n");
- if ($dataNode->extendedAttributes->{"ExtendsDOMGlobalObject"}) {
- push(@implContent, " JSDOMGlobalObject* globalObject = static_cast<$className*>(thisObject);\n");
- } else {
- $implIncludes{"Frame.h"} = 1;
- $implIncludes{"JSDOMGlobalObject.h"} = 1;
- push(@implContent, " JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec);\n");
- push(@implContent, " if (!globalObject)\n");
- push(@implContent, " return;\n");
- }
- push(@implContent, " imp->set$implSetterFunctionName(globalObject->createJSAttributeEventListener(value));\n");
+ push(@implContent, " imp->set$implSetterFunctionName(createJSAttributeEventListener(exec, value));\n");
} elsif ($attribute->signature->type =~ /Constructor$/) {
my $constructorType = $attribute->signature->type;
$constructorType =~ s/Constructor$//;
@@ -1511,16 +1488,17 @@ sub GenerateImplementation
push(@implContent, " // Shadowing a built-in object\n");
push(@implContent, " static_cast<$className*>(thisObject)->putDirect(Identifier(exec, \"$name\"), value);\n");
} else {
+ push(@implContent, " $className* castedThisObj = static_cast<$className*>(thisObject);\n");
+ push(@implContent, " $implType* imp = static_cast<$implType*>(castedThisObj->impl());\n");
if ($podType) {
- push(@implContent, " $podType imp(*static_cast<$className*>(thisObject)->impl());\n");
+ push(@implContent, " $podType podImp(*imp);\n");
if ($podType eq "float") { # Special case for JSSVGNumber
- push(@implContent, " imp = " . JSValueToNative($attribute->signature, "value") . ";\n");
+ push(@implContent, " podImp = " . JSValueToNative($attribute->signature, "value") . ";\n");
} else {
- push(@implContent, " imp.set$implSetterFunctionName(" . JSValueToNative($attribute->signature, "value") . ");\n");
+ push(@implContent, " podImp.set$implSetterFunctionName(" . JSValueToNative($attribute->signature, "value") . ");\n");
}
- push(@implContent, " static_cast<$className*>(thisObject)->impl()->commitChange(imp, static_cast<$className*>(thisObject)->context());\n");
+ push(@implContent, " imp->commitChange(podImp, castedThisObj);\n");
} else {
- push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(static_cast<$className*>(thisObject)->impl());\n");
my $nativeValue = JSValueToNative($attribute->signature, "value");
push(@implContent, " ExceptionCode ec = 0;\n") if @{$attribute->setterExceptions};
my $reflect = $attribute->signature->extendedAttributes->{"Reflect"};
@@ -1536,10 +1514,8 @@ sub GenerateImplementation
push(@implContent, ", ec") if @{$attribute->setterExceptions};
push(@implContent, ");\n");
push(@implContent, " setDOMException(exec, ec);\n") if @{$attribute->setterExceptions};
-
if (IsSVGTypeNeedingContextParameter($implClassName)) {
- push(@implContent, " if (static_cast<$className*>(thisObject)->context())\n");
- push(@implContent, " static_cast<$className*>(thisObject)->context()->svgAttributeChanged(static_cast<$className*>(thisObject)->impl()->associatedAttributeName());\n");
+ push(@implContent, " JSSVGContextCache::propagateSVGDOMChange(castedThisObj, imp->associatedAttributeName());\n");
}
}
}
@@ -1552,17 +1528,17 @@ sub GenerateImplementation
}
if (($dataNode->extendedAttributes->{"HasIndexGetter"} || $dataNode->extendedAttributes->{"HasCustomIndexGetter"} || $dataNode->extendedAttributes->{"HasNumericIndexGetter"}) && !$dataNode->extendedAttributes->{"CustomGetPropertyNames"}) {
- push(@implContent, "void ${className}::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)\n");
+ push(@implContent, "void ${className}::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)\n");
push(@implContent, "{\n");
if ($dataNode->extendedAttributes->{"HasIndexGetter"} || $dataNode->extendedAttributes->{"HasCustomIndexGetter"} || $dataNode->extendedAttributes->{"HasNumericIndexGetter"}) {
push(@implContent, " for (unsigned i = 0; i < static_cast<${implClassName}*>(impl())->length(); ++i)\n");
push(@implContent, " propertyNames.add(Identifier::from(exec, i));\n");
}
- push(@implContent, " Base::getOwnPropertyNames(exec, propertyNames);\n");
+ push(@implContent, " Base::getOwnPropertyNames(exec, propertyNames, mode);\n");
push(@implContent, "}\n\n");
}
- if ($dataNode->extendedAttributes->{"GenerateConstructor"}) {
+ if (!($dataNode->extendedAttributes->{"OmitConstructor"} || $dataNode->extendedAttributes->{"CustomConstructor"})) {
push(@implContent, "JSValue ${className}::getConstructor(ExecState* exec, JSGlobalObject* globalObject)\n{\n");
push(@implContent, " return getDOMConstructor<${className}Constructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));\n");
push(@implContent, "}\n\n");
@@ -1602,15 +1578,31 @@ sub GenerateImplementation
push(@implContent, " return jsUndefined();\n");
}
+ # Special case for JSSVGLengthList / JSSVGTransformList / JSSVGPointList / JSSVGNumberList
+ # Instead of having JSSVG*Custom.cpp implementations for the SVGList interface for all of these
+ # classes, we directly forward the calls to JSSVGPODListCustom, which centralizes the otherwise
+ # duplicated code for the JSSVG*List classes mentioned above.
+ my $svgPODListType;
+ if ($implClassName =~ /SVG.*List/) {
+ $svgPODListType = $implClassName;
+ $svgPODListType =~ s/List$//;
+ $svgPODListType = "" unless $codeGenerator->IsPodType($svgPODListType);
+
+ # Ignore additional (non-SVGList) SVGTransformList methods, that are not handled through JSSVGPODListCustom
+ $svgPODListType = "" if $functionImplementationName =~ /createSVGTransformFromMatrix/;
+ $svgPODListType = "" if $functionImplementationName =~ /consolidate/;
+ }
+
if ($function->signature->extendedAttributes->{"Custom"} || $function->signature->extendedAttributes->{"JSCCustom"}) {
push(@implContent, " return castedThisObj->" . $functionImplementationName . "(exec, args);\n");
+ } elsif ($svgPODListType) {
+ $implIncludes{"JS${svgPODListType}.h"} = 1;
+ $implIncludes{"JSSVGPODListCustom.h"} = 1;
+ push(@implContent, " return JSSVGPODListCustom::$functionImplementationName<$className, " . GetNativeType($svgPODListType)
+ . ">(castedThisObj, exec, args, to" . $svgPODListType . ");\n");
} else {
- if ($podType) {
- push(@implContent, " JSSVGPODTypeWrapper<$podType>* wrapper = castedThisObj->impl();\n");
- push(@implContent, " $podType imp(*wrapper);\n");
- } else {
- push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(castedThisObj->impl());\n");
- }
+ push(@implContent, " $implType* imp = static_cast<$implType*>(castedThisObj->impl());\n");
+ push(@implContent, " $podType podImp(*imp);\n") if $podType;
my $numParameters = @{$function->parameters};
@@ -1630,7 +1622,7 @@ sub GenerateImplementation
}
my $paramIndex = 0;
- my $functionString = "imp" . ($podType ? "." : "->") . $functionImplementationName . "(";
+ my $functionString = ($podType ? "podImp." : "imp->") . $functionImplementationName . "(";
my $hasOptionalArguments = 0;
@@ -1741,11 +1733,10 @@ sub GenerateImplementation
if ($podType) {
push(@implContent, "JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, JSSVGPODTypeWrapper<$podType>* object, SVGElement* context)\n");
} elsif (IsSVGTypeNeedingContextParameter($implClassName)) {
- push(@implContent, "JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, $implType* object, SVGElement* context)\n");
+ push(@implContent, "JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, $implType* object, SVGElement* context)\n");
} else {
push(@implContent, "JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, $implType* object)\n");
}
-
push(@implContent, "{\n");
if ($podType) {
push(@implContent, " return getDOMObjectWrapper<$className, JSSVGPODTypeWrapper<$podType> >(exec, globalObject, object, context);\n");
@@ -1803,11 +1794,7 @@ sub GenerateImplementationFunctionCall()
if ($function->signature->type eq "void") {
push(@implContent, $indent . "$functionString;\n");
push(@implContent, $indent . "setDOMException(exec, ec);\n") if @{$function->raisesExceptions};
-
- if ($podType) {
- push(@implContent, $indent . "wrapper->commitChange(imp, castedThisObj->context());\n");
- }
-
+ push(@implContent, $indent . "imp->commitChange(podImp, castedThisObj);\n") if $podType;
push(@implContent, $indent . "return jsUndefined();\n");
} else {
push(@implContent, "\n" . $indent . "JSC::JSValue result = " . NativeToJSValue($function->signature, 1, $implClassName, "", $functionString, "castedThisObj") . ";\n");
@@ -1816,7 +1803,7 @@ sub GenerateImplementationFunctionCall()
if ($podType and not $function->signature->extendedAttributes->{"Immutable"}) {
# Immutable methods do not commit changes back to the instance, thus producing
# a new instance rather than mutating existing one.
- push(@implContent, $indent . "wrapper->commitChange(imp, castedThisObj->context());\n");
+ push(@implContent, $indent . "imp->commitChange(podImp, castedThisObj);\n");
}
push(@implContent, $indent . "return result;\n");
@@ -1840,10 +1827,12 @@ my %nativeType = (
"CompareHow" => "Range::CompareHow",
"DOMString" => "const UString&",
"NodeFilter" => "RefPtr<NodeFilter>",
+ "SVGAngle" => "SVGAngle",
"SVGLength" => "SVGLength",
"SVGMatrix" => "TransformationMatrix",
"SVGNumber" => "float",
"SVGPaintType" => "SVGPaint::SVGPaintType",
+ "SVGPreserveAspectRatio" => "SVGPreserveAspectRatio",
"SVGPoint" => "FloatPoint",
"SVGRect" => "FloatRect",
"SVGTransform" => "SVGTransform",
@@ -1853,6 +1842,8 @@ my %nativeType = (
"long" => "int",
"unsigned long" => "unsigned",
"unsigned short" => "unsigned short",
+ "long long" => "long long",
+ "unsigned long long" => "unsigned long long",
);
sub GetNativeType
@@ -1876,7 +1867,9 @@ sub JSValueToNative
return "$value.toNumber(exec)" if $type eq "double";
return "$value.toFloat(exec)" if $type eq "float" or $type eq "SVGNumber";
return "$value.toInt32(exec)" if $type eq "unsigned long" or $type eq "long" or $type eq "unsigned short";
+ return "static_cast<$type>($value.toInteger(exec))" if $type eq "long long" or $type eq "unsigned long long";
+ return "valueToDate(exec, $value)" if $type eq "Date";
return "static_cast<Range::CompareHow>($value.toInt32(exec))" if $type eq "CompareHow";
return "static_cast<SVGPaint::SVGPaintType>($value.toInt32(exec))" if $type eq "SVGPaintType";
@@ -1886,7 +1879,7 @@ sub JSValueToNative
return "$value.toString(exec)";
}
- if ($type eq "SerializedScriptValue") {
+ if ($type eq "SerializedScriptValue" or $type eq "any") {
$implIncludes{"SerializedScriptValue.h"} = 1;
return "SerializedScriptValue::create(exec, $value)";
}
@@ -1914,7 +1907,11 @@ sub NativeToJSValue
my $type = $codeGenerator->StripModule($signature->type);
return "jsBoolean($value)" if $type eq "boolean";
-
+
+ # Need to check Date type before IsPrimitiveType().
+ if ($type eq "Date") {
+ return "jsDateOrNull(exec, $value)";
+ }
if ($codeGenerator->IsPrimitiveType($type) or $type eq "SVGPaintType" or $type eq "DOMTimeStamp") {
$implIncludes{"<runtime/JSNumberCell.h>"} = 1;
return "jsNumber(exec, $value)";
@@ -1934,9 +1931,7 @@ sub NativeToJSValue
return "jsString(exec, $value)";
}
- # Some SVG bindings don't have space to store a globalObject pointer, for those, we use the deprecatedGlobalObjectForPrototype hack for now.
- my $globalObject = IsSVGTypeNeedingContextParameter($implClassName) ? "deprecatedGlobalObjectForPrototype(exec)" : "$thisValue->globalObject()";
-
+ my $globalObject = "$thisValue->globalObject()";
if ($codeGenerator->IsPodType($type)) {
$implIncludes{"JS$type.h"} = 1;
@@ -1954,25 +1949,16 @@ sub NativeToJSValue
and $codeGenerator->IsPodTypeWithWriteableProperties($type)
and not defined $signature->extendedAttributes->{"Immutable"}) {
if ($codeGenerator->IsPodType($implClassName)) {
- return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapperWithPODTypeParent<$nativeType, $implClassName>::create($value, $thisValue->impl()).get(), $thisValue->context())";
+ return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapperWithPODTypeParent<$nativeType, $implClassName>::create($value, $thisValue->impl()).get(), JSSVGContextCache::svgContextForDOMObject(castedThis))";
} else {
return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapperWithParent<$nativeType, $implClassName>::create(imp, &${implClassName}::$getter, &${implClassName}::$setter).get(), imp)";
}
}
if ($implClassNameForValueConversion eq "") {
- # SVGZoomEvent has no context() pointer, and is also not an SVGElement.
- # This is not a problem, because SVGZoomEvent has no read/write properties.
- return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapper<$nativeType>::create($value).get(), 0)" if $implClassName eq "SVGZoomEvent";
-
- if (IsSVGTypeNeedingContextParameter($implClassName)) {
- return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapper<$nativeType>::create($value).get(), castedThisObj->context())" if $inFunctionCall;
- return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapper<$nativeType>::create($value).get(), $thisValue->context())";
- } else {
- return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapper<$nativeType>::create($value).get(), imp)";
- }
- } else { # These classes, always have a m_context pointer!
- return "toJS(exec, $globalObject, JSSVGDynamicPODTypeWrapperCache<$nativeType, $implClassNameForValueConversion>::lookupOrCreateWrapper(imp, &${implClassNameForValueConversion}::$getter, &${implClassNameForValueConversion}::$setter).get(), $thisValue->context())";
+ return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapper<$nativeType>::create($value).get(), 0 /* no context on purpose */)";
+ } else {
+ return "toJS(exec, $globalObject, JSSVGDynamicPODTypeWrapperCache<$nativeType, $implClassNameForValueConversion>::lookupOrCreateWrapper(imp, &${implClassNameForValueConversion}::$getter, &${implClassNameForValueConversion}::$setter).get(), JSSVGContextCache::svgContextForDOMObject(castedThis));"
}
}
@@ -1998,9 +1984,9 @@ sub NativeToJSValue
$joinedName = $type;
$joinedName =~ s/Abs|Rel//;
$implIncludes{"$joinedName.h"} = 1;
- } elsif ($type eq "SerializedScriptValue") {
- $implIncludes{"$type.h"} = 1;
- return "$value->deserialize(exec)";
+ } elsif ($type eq "SerializedScriptValue" or $type eq "any") {
+ $implIncludes{"SerializedScriptValue.h"} = 1;
+ return "$value ? $value->deserialize(exec, castedThis->globalObject()) : jsNull()";
} else {
# Default, include header with same name.
$implIncludes{"JS$type.h"} = 1;
@@ -2010,7 +1996,7 @@ sub NativeToJSValue
return $value if $codeGenerator->IsSVGAnimatedType($type);
if (IsSVGTypeNeedingContextParameter($type)) {
- my $contextPtr = IsSVGTypeNeedingContextParameter($implClassName) ? "$thisValue->context()" : "imp";
+ my $contextPtr = IsSVGTypeNeedingContextParameter($implClassName) ? "JSSVGContextCache::svgContextForDOMObject(castedThis)" : "imp";
return "toJS(exec, $globalObject, WTF::getPtr($value), $contextPtr)";
}
@@ -2295,7 +2281,7 @@ public:
static PassRefPtr<Structure> createStructure(JSValue proto)
{
- return Structure::create(proto, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
diff --git a/WebCore/bindings/scripts/CodeGeneratorObjC.pm b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
index 91248c5..698b4f5 100644
--- a/WebCore/bindings/scripts/CodeGeneratorObjC.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
@@ -66,7 +66,7 @@ my %nativeObjCTypeHash = ("URL" => 1, "Color" => 1);
my %baseTypeHash = ("Object" => 1, "Node" => 1, "NodeList" => 1, "NamedNodeMap" => 1, "DOMImplementation" => 1,
"Event" => 1, "CSSRule" => 1, "CSSValue" => 1, "StyleSheet" => 1, "MediaList" => 1,
"Counter" => 1, "Rect" => 1, "RGBColor" => 1, "XPathExpression" => 1, "XPathResult" => 1,
- "NodeIterator" => 1, "TreeWalker" => 1, "AbstractView" => 1,
+ "NodeIterator" => 1, "TreeWalker" => 1, "AbstractView" => 1, "Blob" => 1,
"SVGAngle" => 1, "SVGAnimatedAngle" => 1, "SVGAnimatedBoolean" => 1, "SVGAnimatedEnumeration" => 1,
"SVGAnimatedInteger" => 1, "SVGAnimatedLength" => 1, "SVGAnimatedLengthList" => 1,
"SVGAnimatedNumber" => 1, "SVGAnimatedNumberList" => 1, "SVGAnimatedPoints" => 1,
@@ -316,6 +316,7 @@ sub GetClassName
return "BOOL" if $name eq "boolean";
return "unsigned" if $name eq "unsigned long";
return "int" if $name eq "long";
+ return "NSTimeInterval" if $name eq "Date";
return "DOMAbstractView" if $name eq "DOMWindow";
return $name if $codeGenerator->IsPrimitiveType($name) or $name eq "DOMImplementation" or $name eq "DOMTimeStamp";
@@ -1040,6 +1041,7 @@ sub GenerateImplementation
$implIncludes{$classHeaderName . "Internal.h"} = 1;
# FIXME: These includes are only needed when the class is a subclass of one of these polymorphic classes.
+ $implIncludes{"DOMBlobInternal.h"} = 1;
$implIncludes{"DOMCSSRuleInternal.h"} = 1;
$implIncludes{"DOMCSSValueInternal.h"} = 1;
$implIncludes{"DOMEventInternal.h"} = 1;
@@ -1221,7 +1223,7 @@ sub GenerateImplementation
$getterContentTail .= ")";
} elsif ($attribute->signature->extendedAttributes->{"ConvertFromString"}) {
$getterContentTail .= ".toInt()";
- } elsif ($codeGenerator->IsPodType($idlType)) {
+ } elsif ($codeGenerator->IsPodType($idlType) or $idlType eq "Date") {
$getterContentHead = "kit($getterContentHead";
$getterContentTail .= ")";
} elsif (IsProtocolType($idlType) and $idlType ne "EventTarget") {
@@ -1292,6 +1294,10 @@ sub GenerateImplementation
push(@implContent, " ASSERT($argName);\n\n");
}
+ if ($idlType eq "Date") {
+ $arg = "core(" . $arg . ")";
+ }
+
if ($podType) {
# Special case for DOMSVGNumber
if ($podType eq "float") {
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index 77e9512..305fdfd 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -265,15 +265,18 @@ sub GenerateHeader
push(@headerContent, "#include <v8.h>\n");
push(@headerContent, "#include <wtf/HashMap.h>\n");
push(@headerContent, "#include \"StringHash.h\"\n");
-
- push(@headerContent, "\nnamespace WebCore {\n\n");
- push(@headerContent, "class V8ClassIndex;\n");
+ push(@headerContent, "#include \"V8Index.h\"\n");
+ push(@headerContent, GetHeaderClassInclude($implClassName));
+ push(@headerContent, "\nnamespace WebCore {\n");
push(@headerContent, "\nclass $className {\n");
+
+ my $toNativeReturnType = GetReturnTypeForToNative($interfaceName);
push(@headerContent, <<END);
public:
static bool HasInstance(v8::Handle<v8::Value> value);
static v8::Persistent<v8::FunctionTemplate> GetRawTemplate();
+ static ${toNativeReturnType}* toNative(v8::Handle<v8::Object>);
END
if ($implClassName eq "DOMWindow") {
@@ -282,6 +285,59 @@ END
END
}
+ my @enabledAtRuntime;
+ foreach my $function (@{$dataNode->functions}) {
+ my $name = $function->signature->name;
+ my $attrExt = $function->signature->extendedAttributes;
+
+ # FIXME: We should only be generating callback declarations for functions labeled [Custom] or [V8Custom],
+ # but we can't do that due to some mislabeled functions in the idl's (https://bugs.webkit.org/show_bug.cgi?id=33066).
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Value> ${name}Callback(const v8::Arguments&);
+END
+ if ($attrExt->{"EnabledAtRuntime"}) {
+ push(@enabledAtRuntime, $function);
+ }
+ }
+
+ if ($dataNode->extendedAttributes->{"CustomConstructor"} || $dataNode->extendedAttributes->{"CanBeConstructed"}) {
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Value> constructorCallback(const v8::Arguments& args);
+END
+ }
+
+ foreach my $attribute (@{$dataNode->attributes}) {
+ my $name = $attribute->signature->name;
+ my $attrExt = $attribute->signature->extendedAttributes;
+ if ($attrExt->{"V8CustomGetter"} || $attrExt->{"CustomGetter"}
+ || $attrExt->{"V8Custom"} || $attrExt->{"Custom"}) {
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Value> ${name}AccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info);
+END
+ }
+ if ($attrExt->{"V8CustomSetter"} || $attrExt->{"CustomSetter"}
+ || $attrExt->{"V8Custom"} || $attrExt->{"Custom"}) {
+ push(@headerContent, <<END);
+ static void ${name}AccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
+END
+ }
+ if ($attrExt->{"EnabledAtRuntime"}) {
+ push(@enabledAtRuntime, $attribute);
+ }
+ }
+
+ GenerateHeaderRuntimeEnablerDeclarations(@enabledAtRuntime);
+ GenerateHeaderNamedAndIndexedPropertyAccessors($dataNode);
+ GenerateHeaderCustomCall($dataNode);
+ GenerateHeaderCustomInternalFieldIndices($dataNode);
+
+ if ($dataNode->extendedAttributes->{"CheckDomainSecurity"}) {
+ push(@headerContent, <<END);
+ static bool namedSecurityCheck(v8::Local<v8::Object> host, v8::Local<v8::Value> key, v8::AccessType, v8::Local<v8::Value> data);
+ static bool indexedSecurityCheck(v8::Local<v8::Object> host, uint32_t index, v8::AccessType, v8::Local<v8::Value> data);
+END
+ }
+
push(@headerContent, <<END);
private:
@@ -298,6 +354,172 @@ END
push(@headerContent, "#endif // ${conditionalString}\n\n") if $conditionalString;
}
+sub GetInternalFields
+{
+ my $dataNode = shift;
+ my $name = $dataNode->name;
+
+ # FIXME: I am hideous and hard-coded. Make me beautiful.
+ return ("cacheIndex", "implementationIndex") if ($name eq "Document") || ($name eq "SVGDocument");
+ return ("cacheIndex", "implementationIndex", "markerIndex", "shadowIndex") if $name eq "HTMLDocument";
+ return ("cacheIndex") if IsNodeSubType($dataNode);
+ return ("cacheIndex") if $name eq "EventSource";
+ return ("cacheIndex") if $name eq "XMLHttpRequest";
+ return ("cacheIndex") if $name eq "XMLHttpRequestUpload";
+ return ("cacheIndex") if $name eq "MessagePort";
+ return ("port1Index", "port2Index") if ($name eq "MessageChannel");
+ return ("cacheIndex") if $name eq "AbstractWorker";
+ return ("abstractWorkerCacheIndex", "cacheIndex") if $name eq "Worker";
+ return ("abstractWorkerCacheIndex", "cacheIndex") if $name eq "WorkerContext";
+ return ("abstractWorkerCacheIndex", "workerContextCacheIndex", "cacheIndex") if $name eq "DedicatedWorkerContext";
+ return ("abstractWorkerCacheIndex", "cacheIndex") if $name eq "SharedWorker";
+ return ("abstractWorkerCacheIndex", "workerContextCacheIndex", "cacheIndex") if $name eq "SharedWorkerContext";
+ return ("cacheIndex") if $name eq "Notification";
+ return ("cacheIndex") if $name eq "IDBRequest";
+ return ("cacheIndex") if $name eq "SVGElementInstance";
+ return ("consoleIndex", "historyIndex", "locationbarIndex", "menubarIndex", "navigatorIndex", "personalbarIndex",
+ "screenIndex", "scrollbarsIndex", "selectionIndex", "statusbarIndex", "toolbarIndex", "locationIndex",
+ "domSelectionIndex", "cacheIndex", "enteredIsolatedWorldIndex") if $name eq "DOMWindow";
+ return ("cacheIndex") if $name eq "DOMApplicationCache";
+ return ("cacheIndex") if $name eq "WebSocket";
+ return ("ownerNodeIndex") if ($name eq "StyleSheet") || ($name eq "CSSStyleSheet");
+ return ("ownerNodeIndex") if ($name eq "NamedNodeMap");
+ return ();
+}
+
+sub GetHeaderClassInclude
+{
+ my $className = shift;
+ if ($className =~ /SVGPathSeg/) {
+ $className =~ s/Abs|Rel//;
+ }
+ return "" if (AvoidInclusionOfType($className));
+ return "#include \"SVGAnimatedTemplate.h\"\n" if ($codeGenerator->IsSVGAnimatedType($className));
+ return "#include \"${className}.h\"\n";
+}
+
+sub GenerateHeaderCustomInternalFieldIndices
+{
+ my $dataNode = shift;
+ my @customInternalFields = GetInternalFields($dataNode);
+ my $customFieldCounter = 0;
+ foreach my $customInternalField (@customInternalFields) {
+ push(@headerContent, <<END);
+ static const int ${customInternalField} = v8DefaultWrapperInternalFieldCount + ${customFieldCounter};
+END
+ $customFieldCounter++;
+ }
+ push(@headerContent, <<END);
+ static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + ${customFieldCounter};
+END
+}
+
+sub GenerateHeaderRuntimeEnablerDeclarations
+{
+ my @enabledAtRuntime = @_;
+
+ foreach my $runtime_attr (@enabledAtRuntime) {
+ my $enabledAtRuntimeConditionalString = GenerateConditionalString($runtime_attr->signature);
+ my $enabler = $codeGenerator->WK_ucfirst($runtime_attr->signature->name);
+ if ($enabledAtRuntimeConditionalString) {
+ push(@headerContent, "\n#if ${enabledAtRuntimeConditionalString}\n");
+ }
+ push(@headerContent, <<END);
+ static bool ${enabler}Enabled();
+END
+ if ($enabledAtRuntimeConditionalString) {
+ push(@headerContent, "#endif\n");
+ }
+ }
+}
+
+my %indexerSpecialCases = (
+ "Storage" => 1,
+ "HTMLAppletElement" => 1,
+ "HTMLDocument" => 1,
+ "HTMLEmbedElement" => 1,
+ "HTMLObjectElement" => 1
+);
+
+sub GenerateHeaderNamedAndIndexedPropertyAccessors
+{
+ my $dataNode = shift;
+ my $interfaceName = $dataNode->name;
+ my $hasCustomIndexedGetter = $dataNode->extendedAttributes->{"HasIndexGetter"} || $dataNode->extendedAttributes->{"CustomGetOwnPropertySlot"};
+ my $hasCustomIndexedSetter = $dataNode->extendedAttributes->{"HasCustomIndexSetter"} && !$dataNode->extendedAttributes->{"HasNumericIndexGetter"};
+ my $hasCustomNamedGetter = $dataNode->extendedAttributes->{"HasNameGetter"} || $dataNode->extendedAttributes->{"HasOverridingNameGetter"} || $dataNode->extendedAttributes->{"CustomGetOwnPropertySlot"};
+ my $hasCustomNamedSetter = $dataNode->extendedAttributes->{"DelegatingPutFunction"};
+ my $hasCustomDeleters = $dataNode->extendedAttributes->{"CustomDeleteProperty"};
+ my $hasCustomEnumerator = $dataNode->extendedAttributes->{"CustomGetPropertyNames"};
+ if ($interfaceName eq "HTMLOptionsCollection") {
+ $interfaceName = "HTMLCollection";
+ $hasCustomIndexedGetter = 1;
+ $hasCustomNamedGetter = 1;
+ }
+ if ($interfaceName eq "DOMWindow") {
+ $hasCustomDeleterr = 0;
+ $hasEnumerator = 0;
+ }
+ if ($interfaceName eq "HTMLSelectElement") {
+ $hasCustomNamedGetter = 1;
+ }
+ my $isIndexerSpecialCase = exists $indexerSpecialCases{$interfaceName};
+
+ if ($hasCustomIndexedGetter || $isIndexerSpecialCase) {
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Value> indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info);
+END
+ }
+
+ if ($isIndexerSpecialCase || $hasCustomIndexedSetter) {
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Value> indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
+END
+ }
+ if ($hasCustomDeleters) {
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Boolean> indexedPropertyDeleter(uint32_t index, const v8::AccessorInfo& info);
+END
+ }
+ if ($hasCustomNamedGetter) {
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Value> namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info);
+END
+ }
+ if ($hasCustomNamedSetter) {
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Value> namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
+END
+ }
+ if ($hasCustomDeleters || $interfaceName eq "HTMLDocument") {
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Boolean> namedPropertyDeleter(v8::Local<v8::String> name, const v8::AccessorInfo& info);
+END
+ }
+ if ($hasCustomEnumerator) {
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Array> namedPropertyEnumerator(const v8::AccessorInfo& info);
+END
+ }
+}
+
+sub GenerateHeaderCustomCall
+{
+ my $dataNode = shift;
+
+ if ($dataNode->extendedAttributes->{"CustomCall"}) {
+ push(@headerContent, " static v8::Handle<v8::Value> callAsFunctionCallback(const v8::Arguments&);\n");
+ }
+ if ($dataNode->name eq "Event") {
+ push(@headerContent, " static v8::Handle<v8::Value> dataTransferAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info);\n");
+ push(@headerContent, " static void valueAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info);\n");
+ }
+ if ($dataNode->name eq "Location") {
+ push(@headerContent, " static v8::Handle<v8::Value> assignAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info);\n");
+ push(@headerContent, " static v8::Handle<v8::Value> reloadAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info);\n");
+ push(@headerContent, " static v8::Handle<v8::Value> replaceAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info);\n");
+ }
+}
sub GenerateSetDOMException
{
@@ -323,48 +545,6 @@ sub IsNodeSubType
return 0;
}
-sub GetHiddenDependencyIndex
-{
- my $dataNode = shift;
- my $attribute = shift;
- my $name = $dataNode->name;
- return "V8Custom::kNodeEventListenerCacheIndex" if IsNodeSubType($dataNode);
- return "V8Custom::kSVGElementInstanceEventListenerCacheIndex" if $name eq "SVGElementInstance";
- return "V8Custom::kAbstractWorkerRequestCacheIndex" if $name eq "AbstractWorker";
- return "V8Custom::kWorkerRequestCacheIndex" if $name eq "Worker";
- return "V8Custom::kDedicatedWorkerContextRequestCacheIndex" if $name eq "DedicatedWorkerContext";
- return "V8Custom::kWorkerContextRequestCacheIndex" if $name eq "WorkerContext";
- return "V8Custom::kWorkerContextRequestCacheIndex" if $name eq "SharedWorkerContext";
- return "V8Custom::kMessagePortRequestCacheIndex" if $name eq "MessagePort";
- return "V8Custom::kWebSocketCacheIndex" if $name eq "WebSocket";
- return "V8Custom::kXMLHttpRequestCacheIndex" if $name eq "XMLHttpRequest";
- return "V8Custom::kXMLHttpRequestCacheIndex" if $name eq "XMLHttpRequestUpload";
- return "V8Custom::kDOMApplicationCacheCacheIndex" if $name eq "DOMApplicationCache";
- return "V8Custom::kNotificationRequestCacheIndex" if $name eq "Notification";
- return "V8Custom::kDOMWindowEventListenerCacheIndex" if $name eq "DOMWindow";
- die "Unexpected name " . $name . " when generating " . $attribute;
-}
-
-sub HolderToNative
-{
- my $dataNode = shift;
- my $implClassName = shift;
- my $classIndex = shift;
- my $holder = shift || "holder"; # optional param
-
- if (IsNodeSubType($dataNode)) {
- push(@implContentDecls, <<END);
- $implClassName* imp = v8DOMWrapperToNode<$implClassName>($holder);
-END
-
- } else {
- push(@implContentDecls, <<END);
- $implClassName* imp = v8DOMWrapperTo<$implClassName>(V8ClassIndex::$classIndex, $holder);
-END
-
- }
-}
-
sub GenerateDomainSafeFunctionGetter
{
my $function = shift;
@@ -382,8 +562,6 @@ sub GenerateDomainSafeFunctionGetter
my $newTemplateString = GenerateNewFunctionTemplate($function, $dataNode, $signature);
- $implIncludes{"V8Proxy.h"} = 1;
-
push(@implContentDecls, <<END);
static v8::Handle<v8::Value> ${funcName}AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) {
INC_STATS(\"DOM.$implClassName.$funcName._get\");
@@ -393,15 +571,10 @@ sub GenerateDomainSafeFunctionGetter
if (holder.IsEmpty()) {
// can only reach here by 'object.__proto__.func', and it should passed
// domain security check already
-
return private_template->GetFunction();
}
-END
-
- HolderToNative($dataNode, $implClassName, $classIndex);
-
- push(@implContentDecls, <<END);
- if (!V8Proxy::canAccessFrame(imp->frame(), false)) {
+ ${implClassName}* imp = ${className}::toNative(holder);
+ if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), false)) {
static v8::Persistent<v8::FunctionTemplate> shared_template =
v8::Persistent<v8::FunctionTemplate>::New($newTemplateString);
return shared_template->GetFunction();
@@ -429,17 +602,15 @@ END
if ($classIndex eq "DOMWINDOW") {
push(@implContentDecls, <<END);
- DOMWindow* window = v8DOMWrapperTo<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
// Get the proxy corresponding to the DOMWindow if possible to
// make sure that the constructor function is constructed in the
// context of the DOMWindow and not in the context of the caller.
- return V8DOMWrapper::getConstructor(type, window);
+ return V8DOMWrapper::getConstructor(type, V8DOMWindow::toNative(info.Holder()));
END
} elsif ($classIndex eq "DEDICATEDWORKERCONTEXT" or $classIndex eq "WORKERCONTEXT" or $classIndex eq "SHAREDWORKERCONTEXT") {
$implIncludes{"WorkerContextExecutionProxy.h"} = 1;
push(@implContentDecls, <<END);
- WorkerContext* workerContext = v8DOMWrapperTo<WorkerContext>(V8ClassIndex::WORKERCONTEXT, info.Holder());
- return V8DOMWrapper::getConstructor(type, workerContext);
+ return V8DOMWrapper::getConstructor(type, V8WorkerContext::toNative(info.Holder()));
END
} else {
push(@implContentDecls, " return v8::Handle<v8::Value>();");
@@ -463,7 +634,6 @@ sub GenerateNormalAttrGetter
my $attrExt = $attribute->signature->extendedAttributes;
my $attrName = $attribute->signature->name;
- $implIncludes{"V8Proxy.h"} = 1;
my $attrType = GetTypeFromSignature($attribute->signature);
my $attrIsPodType = IsPodType($attrType);
@@ -505,7 +675,7 @@ END
if ($isPodType) {
push(@implContentDecls, <<END);
- V8SVGPODTypeWrapper<$implClassName>* imp_wrapper = v8DOMWrapperTo<V8SVGPODTypeWrapper<$implClassName> >(V8ClassIndex::$classIndex, info.Holder());
+ V8SVGPODTypeWrapper<$implClassName>* imp_wrapper = V8SVGPODTypeWrapper<$implClassName>::toNative(info.Holder());
$implClassName imp_instance = *imp_wrapper;
END
if ($getterStringUsesImp) {
@@ -526,7 +696,9 @@ END
if (holder.IsEmpty()) return v8::Handle<v8::Value>();
END
}
- HolderToNative($dataNode, $implClassName, $classIndex, "info");
+ push(@implContentDecls, <<END);
+ ${implClassName}* imp = V8${implClassName}::toNative(holder);
+END
} else {
my $reflect = $attribute->signature->extendedAttributes->{"Reflect"};
if ($getterStringUsesImp && $reflect && IsNodeSubType($dataNode) && $codeGenerator->IsStringType($attrType)) {
@@ -539,18 +711,16 @@ END
return;
# Skip the rest of the function!
}
-
push(@implContentDecls, <<END);
- v8::Handle<v8::Object> holder = info.Holder();
+ ${implClassName}* imp = V8${implClassName}::toNative(info.Holder());
END
- HolderToNative($dataNode, $implClassName, $classIndex, "info");
}
# Generate security checks if necessary
if ($attribute->signature->extendedAttributes->{"CheckNodeSecurity"}) {
- push(@implContentDecls, " if (!V8Proxy::checkNodeSecurity(imp->$attrName())) return v8::Handle<v8::Value>();\n\n");
+ push(@implContentDecls, " if (!V8BindingSecurity::checkNodeSecurity(V8BindingState::Only(), imp->$attrName())) return v8::Handle<v8::Value>();\n\n");
} elsif ($attribute->signature->extendedAttributes->{"CheckFrameSecurity"}) {
- push(@implContentDecls, " if (!V8Proxy::checkNodeSecurity(imp->contentDocument())) return v8::Handle<v8::Value>();\n\n");
+ push(@implContentDecls, " if (!V8BindingSecurity::checkNodeSecurity(V8BindingState::Only(), imp->contentDocument())) return v8::Handle<v8::Value>();\n\n");
}
my $useExceptions = 1 if @{$attribute->getterExceptions} and !($isPodType);
@@ -670,8 +840,6 @@ sub GenerateReplaceableAttrSetter
{
my $implClassName = shift;
- $implIncludes{"V8Proxy.h"} = 1;
-
push(@implContentDecls,
" static void ${attrName}AttrSetter(v8::Local<v8::String> name," .
" v8::Local<v8::Value> value, const v8::AccessorInfo& info) {\n");
@@ -695,8 +863,6 @@ sub GenerateNormalAttrSetter
my $attrExt = $attribute->signature->extendedAttributes;
- $implIncludes{"V8Proxy.h"} = 1;
-
push(@implContentDecls,
" static void ${attrName}AttrSetter(v8::Local<v8::String> name," .
" v8::Local<v8::Value> value, const v8::AccessorInfo& info) {\n");
@@ -708,7 +874,7 @@ sub GenerateNormalAttrSetter
if ($isPodType) {
$implClassName = GetNativeType($implClassName);
$implIncludes{"V8SVGPODTypeWrapper.h"} = 1;
- push(@implContentDecls, " V8SVGPODTypeWrapper<$implClassName>* wrapper = v8DOMWrapperTo<V8SVGPODTypeWrapper<$implClassName> >(V8ClassIndex::$classIndex, info.Holder());\n");
+ push(@implContentDecls, " V8SVGPODTypeWrapper<$implClassName>* wrapper = V8SVGPODTypeWrapper<$implClassName>::toNative(info.Holder());\n");
push(@implContentDecls, " $implClassName imp_instance = *wrapper;\n");
push(@implContentDecls, " $implClassName* imp = &imp_instance;\n");
@@ -724,7 +890,9 @@ END
if (holder.IsEmpty()) return;
END
}
- HolderToNative($dataNode, $implClassName, $classIndex, "info");
+ push(@implContentDecls, <<END);
+ ${implClassName}* imp = V8${implClassName}::toNative(holder);
+END
} else {
my $attrType = GetTypeFromSignature($attribute->signature);
my $reflect = $attribute->signature->extendedAttributes->{"Reflect"};
@@ -741,9 +909,8 @@ END
}
push(@implContentDecls, <<END);
- v8::Handle<v8::Object> holder = info.Holder();
+ ${implClassName}* imp = V8${implClassName}::toNative(info.Holder());
END
- HolderToNative($dataNode, $implClassName, $classIndex, "info");
}
my $nativeType = GetNativeTypeFromSignature($attribute->signature, 0);
@@ -790,8 +957,7 @@ END
} elsif ($attribute->signature->type eq "EventListener") {
$implIncludes{"V8AbstractEventListener.h"} = 1;
$implIncludes{"V8CustomBinding.h"} = 1;
- $cacheIndex = GetHiddenDependencyIndex($dataNode, $attrName);
- push(@implContentDecls, " transferHiddenDependency(holder, imp->$attrName(), value, $cacheIndex);\n");
+ push(@implContentDecls, " transferHiddenDependency(info.Holder(), imp->$attrName(), value, V8${interfaceName}::cacheIndex);\n");
push(@implContentDecls, " imp->set$implSetterFunctionName(V8DOMWrapper::getEventListener(imp, value, true, ListenerFindOrCreate)");
} else {
push(@implContentDecls, " imp->set$implSetterFunctionName($result");
@@ -838,12 +1004,7 @@ sub GetFunctionTemplateCallbackName
$function->signature->extendedAttributes->{"V8Custom"}) {
die "Custom and V8Custom should be mutually exclusive!"
}
- my $customFunc = $function->signature->extendedAttributes->{"Custom"} ||
- $function->signature->extendedAttributes->{"V8Custom"};
- if ($customFunc eq 1) {
- $customFunc = $interfaceName . $codeGenerator->WK_ucfirst($name);
- }
- return "V8Custom::v8${customFunc}Callback";
+ return "V8${interfaceName}::${name}Callback";
} else {
return "${interfaceName}Internal::${name}Callback";
}
@@ -882,14 +1043,13 @@ sub GenerateFunctionCallback
if (IsPodType($implClassName)) {
my $nativeClassName = GetNativeType($implClassName);
- push(@implContentDecls, " V8SVGPODTypeWrapper<$nativeClassName>* imp_wrapper = v8DOMWrapperTo<V8SVGPODTypeWrapper<$nativeClassName> >(V8ClassIndex::$classIndex, args.Holder());\n");
+ push(@implContentDecls, " V8SVGPODTypeWrapper<$nativeClassName>* imp_wrapper = V8SVGPODTypeWrapper<$nativeClassName>::toNative(args.Holder());\n");
push(@implContentDecls, " $nativeClassName imp_instance = *imp_wrapper;\n");
push(@implContentDecls, " $nativeClassName* imp = &imp_instance;\n");
} else {
push(@implContentDecls, <<END);
- v8::Handle<v8::Object> holder = args.Holder();
+ ${implClassName}* imp = V8${implClassName}::toNative(args.Holder());
END
- HolderToNative($dataNode, $implClassName, $classIndex);
}
# Check domain security if needed
@@ -898,7 +1058,7 @@ END
&& !$function->signature->extendedAttributes->{"DoNotCheckDomainSecurity"}) {
# We have not find real use cases yet.
push(@implContentDecls,
-" if (!V8Proxy::canAccessFrame(imp->frame(), true)) {\n".
+" if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true)) {\n".
" return v8::Handle<v8::Value>();\n" .
" }\n");
}
@@ -930,7 +1090,7 @@ END
}
if ($function->signature->extendedAttributes->{"SVGCheckSecurityDocument"}) {
push(@implContentDecls,
-" if (!V8Proxy::checkNodeSecurity(imp->getSVGDocument(ec)))\n" .
+" if (!V8BindingSecurity::checkNodeSecurity(V8BindingState::Only(), imp->getSVGDocument(ec)))\n" .
" return v8::Handle<v8::Value>();\n");
}
@@ -1040,7 +1200,7 @@ sub GenerateSingleBatchedAttribute
"";
if ($customAccessor eq 1) {
# use the naming convension, interface + (capitalize) attr name
- $customAccessor = $interfaceName . $codeGenerator->WK_ucfirst($attrName);
+ $customAccessor = $interfaceName . "::" . $attrName;
}
my $getter;
@@ -1065,7 +1225,7 @@ sub GenerateSingleBatchedAttribute
$constructorType =~ s/Constructor$//;
my $constructorIndex = uc($constructorType);
if ($customAccessor) {
- $getter = "V8Custom::v8${customAccessor}AccessorGetter";
+ $getter = "V8${customAccessor}AccessorGetter";
} else {
$data = "V8ClassIndex::${constructorIndex}";
$getter = "${interfaceName}Internal::${interfaceName}ConstructorGetter";
@@ -1081,12 +1241,12 @@ sub GenerateSingleBatchedAttribute
# Custom Setter
if ($attrExt->{"CustomSetter"} || $attrExt->{"V8CustomSetter"} || $attrExt->{"Custom"} || $attrExt->{"V8Custom"}) {
$hasCustomSetter = 1;
- $setter = "V8Custom::v8${customAccessor}AccessorSetter";
+ $setter = "V8${customAccessor}AccessorSetter";
}
# Custom Getter
- if ($attrExt->{"CustomGetter"} || $attrExt->{"Custom"} || $attrExt->{"V8Custom"}) {
- $getter = "V8Custom::v8${customAccessor}AccessorGetter";
+ if ($attrExt->{"CustomGetter"} || $attrExt->{"V8CustomGetter"} || $attrExt->{"Custom"} || $attrExt->{"V8Custom"}) {
+ $getter = "V8${customAccessor}AccessorGetter";
}
}
@@ -1127,6 +1287,172 @@ sub GenerateSingleBatchedAttribute
END
}
+sub GenerateImplementationIndexer
+{
+ my $dataNode = shift;
+ my $indexer = shift;
+ my $interfaceName = $dataNode->name;
+
+ # FIXME: Figure out what HasNumericIndexGetter is really supposed to do. Right now, it's only set on WebGL-related files.
+ my $hasCustomSetter = $dataNode->extendedAttributes->{"HasCustomIndexSetter"} && !$dataNode->extendedAttributes->{"HasNumericIndexGetter"};
+ my $hasGetter = $dataNode->extendedAttributes->{"HasIndexGetter"} || $dataNode->extendedAttributes->{"CustomGetOwnPropertySlot"};
+
+ # FIXME: Find a way to not have to special-case HTMLOptionsCollection.
+ if ($interfaceName eq "HTMLOptionsCollection") {
+ $hasGetter = 1;
+ }
+ # FIXME: If the parent interface of $dataNode already has
+ # HasIndexGetter, we don't need to handle the getter here.
+ if ($interfaceName eq "WebKitCSSTransformValue") {
+ $hasGetter = 0;
+ }
+
+ # FIXME: Investigate and remove this nastinesss. In V8, named property handling and indexer handling are apparently decoupled,
+ # which means that object[X] where X is a number doesn't reach named property indexer. So we need to provide
+ # simplistic, mirrored indexer handling in addition to named property handling.
+ my $isSpecialCase = exists $indexerSpecialCases{$interfaceName};
+ if ($isSpecialCase) {
+ $hasGetter = 1;
+ if ($dataNode->extendedAttributes->{"DelegatingPutFunction"}) {
+ $hasCustomSetter = 1;
+ }
+ }
+
+ if (!$hasGetter) {
+ return;
+ }
+
+ $implIncludes{"V8Collection.h"} = 1;
+
+ my $indexerType = $indexer ? $indexer->type : 0;
+
+ # FIXME: Remove this once toV8 helper methods are implemented (see https://bugs.webkit.org/show_bug.cgi?id=32563).
+ if ($interfaceName eq "WebKitCSSKeyframesRule") {
+ $indexerType = "WebKitCSSKeyframeRule";
+ }
+
+ if ($indexerType && !$hasCustomSetter) {
+ if ($indexerType eq "DOMString") {
+ my $conversion = $indexer->extendedAttributes->{"ConvertNullStringTo"};
+ if ($conversion && $conversion eq "Null") {
+ push(@implContent, <<END);
+ setCollectionStringOrNullIndexedGetter<${interfaceName}>(desc);
+END
+ } else {
+ push(@implContent, <<END);
+ setCollectionStringIndexedGetter<${interfaceName}>(desc);
+END
+ }
+ } else {
+ my $indexerClassIndex = uc($indexerType);
+ push(@implContent, <<END);
+ setCollectionIndexedGetter<${interfaceName}, ${indexerType}>(desc, V8ClassIndex::${indexerClassIndex});
+END
+ }
+
+ return;
+ }
+
+ my $hasDeleter = $dataNode->extendedAttributes->{"CustomDeleteProperty"};
+ my $hasEnumerator = !$isSpecialCase && IsNodeSubType($dataNode);
+ my $setOn = "Instance";
+
+ # V8 has access-check callback API (see ObjectTemplate::SetAccessCheckCallbacks) and it's used on DOMWindow
+ # instead of deleters or enumerators. In addition, the getter should be set on prototype template, to
+ # get implementation straight out of the DOMWindow prototype regardless of what prototype is actually set
+ # on the object.
+ if ($interfaceName eq "DOMWindow") {
+ $setOn = "Prototype";
+ $hasDeleter = 0;
+ }
+
+ push(@implContent, " desc->${setOn}Template()->SetIndexedPropertyHandler(V8${interfaceName}::indexedPropertyGetter");
+ push(@implContent, $hasCustomSetter ? ", V8${interfaceName}::indexedPropertySetter" : ", 0");
+ push(@implContent, ", 0"); # IndexedPropertyQuery -- not being used at the moment.
+ push(@implContent, $hasDeleter ? ", V8${interfaceName}::indexedPropertyDeleter" : ", 0");
+ push(@implContent, ", nodeCollectionIndexedPropertyEnumerator<${interfaceName}>, v8::Integer::New(V8ClassIndex::NODE)") if $hasEnumerator;
+ push(@implContent, ");\n");
+}
+
+sub GenerateImplementationNamedPropertyGetter
+{
+ my $dataNode = shift;
+ my $namedPropertyGetter = shift;
+ my $interfaceName = $dataNode->name;
+ my $hasCustomGetter = $dataNode->extendedAttributes->{"HasOverridingNameGetter"} || $dataNode->extendedAttributes->{"CustomGetOwnPropertySlot"};
+
+ # FIXME: Remove hard-coded HTMLOptionsCollection reference by changing HTMLOptionsCollection to not inherit
+ # from HTMLCollection per W3C spec (http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#HTMLOptionsCollection).
+ if ($interfaceName eq "HTMLOptionsCollection") {
+ $interfaceName = "HTMLCollection";
+ $hasCustomGetter = 1;
+ }
+
+ my $hasGetter = $dataNode->extendedAttributes->{"HasNameGetter"} || $hasCustomGetter || $namedPropertyGetter;
+ if (!$hasGetter) {
+ return;
+ }
+
+ if ($namedPropertyGetter && $namedPropertyGetter->type ne "Node" && !$namedPropertyGetter->extendedAttributes->{"Custom"} && !$hasCustomGetter) {
+ $implIncludes{"V8Collection.h"} = 1;
+ my $type = $namedPropertyGetter->type;
+ my $classIndex = uc($type);
+ push(@implContent, <<END);
+ setCollectionNamedGetter<${interfaceName}, ${type}>(desc, V8ClassIndex::${classIndex});
+END
+ return;
+ }
+
+ my $hasSetter = $dataNode->extendedAttributes->{"DelegatingPutFunction"};
+ # FIXME: Try to remove hard-coded HTMLDocument reference by aligning handling of document.all with JSC bindings.
+ my $hasDeleter = $dataNode->extendedAttributes->{"CustomDeleteProperty"} || $interfaceName eq "HTMLDocument";
+ my $hasEnumerator = $dataNode->extendedAttributes->{"CustomGetPropertyNames"};
+ my $setOn = "Instance";
+
+ # V8 has access-check callback API (see ObjectTemplate::SetAccessCheckCallbacks) and it's used on DOMWindow
+ # instead of deleters or enumerators. In addition, the getter should be set on prototype template, to
+ # get implementation straight out of the DOMWindow prototype regardless of what prototype is actually set
+ # on the object.
+ if ($interfaceName eq "DOMWindow") {
+ $setOn = "Prototype";
+ $hasDeleter = 0;
+ $hasEnumerator = 0;
+ }
+
+ push(@implContent, " desc->${setOn}Template()->SetNamedPropertyHandler(V8${interfaceName}::namedPropertyGetter, ");
+ push(@implContent, $hasSetter ? "V8${interfaceName}::namedPropertySetter, " : "0, ");
+ push(@implContent, "0, "); # NamedPropertyQuery -- not being used at the moment.
+ push(@implContent, $hasDeleter ? "V8${interfaceName}::namedPropertyDeleter, " : "0, ");
+ push(@implContent, $hasEnumerator ? "V8${interfaceName}::namedPropertyEnumerator" : "0");
+ push(@implContent, ");\n");
+}
+
+sub GenerateImplementationCustomCall
+{
+ my $dataNode = shift;
+ my $interfaceName = $dataNode->name;
+ my $hasCustomCall = $dataNode->extendedAttributes->{"CustomCall"};
+
+ # FIXME: Remove hard-coded HTMLOptionsCollection reference.
+ if ($interfaceName eq "HTMLOptionsCollection") {
+ $interfaceName = "HTMLCollection";
+ $hasCustomCall = 1;
+ }
+
+ if ($hasCustomCall) {
+ push(@implContent, " desc->InstanceTemplate()->SetCallAsFunctionHandler(V8${interfaceName}::callAsFunctionCallback);\n");
+ }
+}
+
+sub GenerateImplementationMasqueradesAsUndefined
+{
+ my $dataNode = shift;
+ if ($dataNode->extendedAttributes->{"MasqueradesAsUndefined"})
+ {
+ push(@implContent, " desc->InstanceTemplate()->MarkAsUndetectable();\n");
+ }
+}
+
sub GenerateImplementation
{
my $object = shift;
@@ -1145,7 +1471,8 @@ sub GenerateImplementation
push(@implFixedHeader,
"#include \"config.h\"\n" .
"#include \"V8Proxy.h\"\n" .
- "#include \"V8Binding.h\"\n\n" .
+ "#include \"V8Binding.h\"\n" .
+ "#include \"V8BindingState.h\"\n\n" .
"#undef LOG\n\n");
push(@implFixedHeader, "\n#if ${conditionalString}\n\n") if $conditionalString;
@@ -1157,14 +1484,12 @@ sub GenerateImplementation
$implIncludes{"${className}.h"} = 1;
AddIncludesForType($interfaceName);
- $implIncludes{"V8Proxy.h"} = 1;
push(@implContentDecls, "namespace WebCore {\n");
push(@implContentDecls, "namespace ${interfaceName}Internal {\n\n");
push(@implContentDecls, "template <typename T> void V8_USE(T) { }\n\n");
my $hasConstructors = 0;
-
# Generate property accessors for attributes.
for ($index = 0; $index < @{$dataNode->attributes}; $index++) {
$attribute = @{$dataNode->attributes}[$index];
@@ -1173,7 +1498,8 @@ sub GenerateImplementation
# Generate special code for the constructor attributes.
if ($attrType =~ /Constructor$/) {
- if ($attribute->signature->extendedAttributes->{"CustomGetter"}) {
+ if ($attribute->signature->extendedAttributes->{"CustomGetter"} ||
+ $attribute->signature->extendedAttributes->{"V8CustomGetter"}) {
$implIncludes{"V8CustomBinding.h"} = 1;
} else {
$hasConstructors = 1;
@@ -1195,7 +1521,8 @@ sub GenerateImplementation
}
# Generate the accessor.
- if ($attribute->signature->extendedAttributes->{"CustomGetter"}) {
+ if ($attribute->signature->extendedAttributes->{"CustomGetter"} ||
+ $attribute->signature->extendedAttributes->{"V8CustomGetter"}) {
$implIncludes{"V8CustomBinding.h"} = 1;
} else {
GenerateNormalAttrGetter($attribute, $dataNode, $classIndex, $implClassName, $interfaceName);
@@ -1214,7 +1541,9 @@ sub GenerateImplementation
if ($hasConstructors) {
GenerateConstructorGetter($implClassName, $classIndex);
}
-
+
+ my $indexer;
+ my $namedPropertyGetter;
# Generate methods for functions.
foreach my $function (@{$dataNode->functions}) {
# hack for addEventListener/RemoveEventListener
@@ -1225,6 +1554,14 @@ sub GenerateImplementation
GenerateFunctionCallback($function, $dataNode, $classIndex, $implClassName);
}
+ if ($function->signature->name eq "item") {
+ $indexer = $function->signature;
+ }
+
+ if ($function->signature->name eq "namedItem") {
+ $namedPropertyGetter = $function->signature;
+ }
+
# If the function does not need domain security check, we need to
# generate an access getter that returns different function objects
# for different calling context.
@@ -1243,6 +1580,7 @@ sub GenerateImplementation
my @enabledAtRuntime;
my @normal;
foreach my $attribute (@$attributes) {
+
if ($interfaceName eq "DOMWindow" && $attribute->signature->extendedAttributes->{"V8DisallowShadowing"}) {
push(@disallowsShadowing, $attribute);
} elsif ($attribute->signature->extendedAttributes->{"EnabledAtRuntime"}) {
@@ -1321,9 +1659,20 @@ END
push(@implContentDecls, "} // namespace ${interfaceName}Internal\n\n");
+ # In namespace WebCore, add generated implementation for 'CanBeConstructed'.
+ if ($dataNode->extendedAttributes->{"CanBeConstructed"} && !$dataNode->extendedAttributes->{"CustomConstructor"}) {
+ push(@implContent, <<END);
+ v8::Handle<v8::Value> ${className}::constructorCallback(const v8::Arguments& args)
+ {
+ INC_STATS("DOM.${interfaceName}.Contructor");
+ return V8Proxy::constructDOMObject<V8ClassIndex::${classIndex}, $interfaceName>(args);
+ }
+END
+ }
+
my $access_check = "";
if ($dataNode->extendedAttributes->{"CheckDomainSecurity"} && !($interfaceName eq "DOMWindow")) {
- $access_check = "instance->SetAccessCheckCallbacks(V8Custom::v8${interfaceName}NamedSecurityCheck, V8Custom::v8${interfaceName}IndexedSecurityCheck, v8::Integer::New(V8ClassIndex::ToInt(V8ClassIndex::${classIndex})));";
+ $access_check = "instance->SetAccessCheckCallbacks(V8${interfaceName}::namedSecurityCheck, V8${interfaceName}::indexedSecurityCheck, v8::Integer::New(V8ClassIndex::ToInt(V8ClassIndex::${classIndex})));";
}
# For the DOMWindow interface, generate the shadow object template
@@ -1335,6 +1684,10 @@ static v8::Persistent<v8::ObjectTemplate> ConfigureShadowObjectTemplate(v8::Pers
v8::Handle<v8::ObjectTemplate>(),
shadow_attrs,
sizeof(shadow_attrs)/sizeof(*shadow_attrs));
+
+ // Install a security handler with V8.
+ templ->SetAccessCheckCallbacks(V8DOMWindow::namedSecurityCheck, V8DOMWindow::indexedSecurityCheck, v8::Integer::New(V8ClassIndex::DOMWINDOW));
+ templ->SetInternalFieldCount(V8DOMWindow::internalFieldCount);
return templ;
}
END
@@ -1349,20 +1702,13 @@ END
$parentClassIndex = uc($codeGenerator->StripModule($parent));
last;
}
-
- # find the field count
- my $fieldCount = "V8Custom::kDefaultWrapperInternalFieldCount";
- if (IsNodeSubType($dataNode)) {
- $fieldCount = "V8Custom::kNodeMinimumInternalFieldCount";
- }
# Generate the template configuration method
push(@implContent, <<END);
static v8::Persistent<v8::FunctionTemplate> Configure${className}Template(v8::Persistent<v8::FunctionTemplate> desc) {
v8::Local<v8::Signature> default_signature = configureTemplate(desc, \"${interfaceName}\",
- V8ClassIndex::$parentClassIndex, $fieldCount,
+ V8ClassIndex::$parentClassIndex, V8${interfaceName}::internalFieldCount,
END
-
# Set up our attributes if we have them
if ($has_attributes) {
push(@implContent, <<END);
@@ -1384,6 +1730,12 @@ END
END
}
+ if ($dataNode->extendedAttributes->{"CustomConstructor"} || $dataNode->extendedAttributes->{"CanBeConstructed"}) {
+ push(@implContent, <<END);
+ desc->SetCallHandler(V8${interfaceName}::constructorCallback);
+END
+ }
+
if ($access_check or @enabledAtRuntime or @{$dataNode->functions} or $has_constants) {
push(@implContent, <<END);
v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
@@ -1395,10 +1747,10 @@ END
# Setup the enable-at-runtime attrs if we have them
foreach my $runtime_attr (@enabledAtRuntime) {
- $enable_function = $interfaceName . $codeGenerator->WK_ucfirst($runtime_attr->signature->name);
+ $enable_function = $interfaceName . "::" . $codeGenerator->WK_ucfirst($runtime_attr->signature->name);
my $conditionalString = GenerateConditionalString($runtime_attr->signature);
push(@implContent, "\n#if ${conditionalString}\n") if $conditionalString;
- push(@implContent, " if (V8Custom::v8${enable_function}Enabled()) {\n");
+ push(@implContent, " if (V8${enable_function}Enabled()) {\n");
push(@implContent, " static const BatchedAttribute attrData =\\\n");
GenerateSingleBatchedAttribute($interfaceName, $runtime_attr, ";", " ");
push(@implContent, <<END);
@@ -1408,6 +1760,11 @@ END
push(@implContent, "\n#endif // ${conditionalString}\n") if $conditionalString;
}
+ GenerateImplementationIndexer($dataNode, $indexer);
+ GenerateImplementationNamedPropertyGetter($dataNode, $namedPropertyGetter);
+ GenerateImplementationCustomCall($dataNode);
+ GenerateImplementationMasqueradesAsUndefined($dataNode);
+
# Define our functions with Set() or SetAccessor()
$total_functions = 0;
foreach my $function (@{$dataNode->functions}) {
@@ -1433,8 +1790,8 @@ END
my $conditional = "";
if ($attrExt->{"EnabledAtRuntime"}) {
# Only call Set()/SetAccessor() if this method should be enabled
- $enable_function = $interfaceName . $codeGenerator->WK_ucfirst($function->signature->name);
- $conditional = "if (V8Custom::v8${enable_function}Enabled())\n";
+ $enable_function = $interfaceName . "::" . $codeGenerator->WK_ucfirst($function->signature->name);
+ $conditional = "if (V8${enable_function}Enabled())\n";
}
if ($attrExt->{"DoNotCheckDomainSecurity"} &&
@@ -1494,7 +1851,7 @@ END
}
push(@implContent, <<END);
- ${conditional}createCallback($template, "$name", $callback, ${signature}$property_attributes);
+ ${conditional}$template->Set(v8::String::New("$name"), v8::FunctionTemplate::New($callback, v8::Handle<v8::Value>(), ${signature})$property_attributes);
END
$num_callbacks++;
}
@@ -1506,8 +1863,36 @@ END
batchConfigureConstants(desc, proto, ${interfaceName}_consts, sizeof(${interfaceName}_consts)/sizeof(*${interfaceName}_consts));
END
}
+
+ # Special cases
+ if ($interfaceName eq "DOMWindow") {
+ push(@implContent, <<END);
+
+ proto->SetInternalFieldCount(V8DOMWindow::internalFieldCount);
+ desc->SetHiddenPrototype(true);
+ instance->SetInternalFieldCount(V8DOMWindow::internalFieldCount);
+ // Set access check callbacks, but turned off initially.
+ // When a context is detached from a frame, turn on the access check.
+ // Turning on checks also invalidates inline caches of the object.
+ instance->SetAccessCheckCallbacks(V8DOMWindow::namedSecurityCheck, V8DOMWindow::indexedSecurityCheck, v8::Integer::New(V8ClassIndex::DOMWINDOW), false);
+END
+ }
+ if ($interfaceName eq "Location") {
+ push(@implContent, <<END);
+
+ // For security reasons, these functions are on the instance instead
+ // of on the prototype object to insure that they cannot be overwritten.
+ instance->SetAccessor(v8::String::New("reload"), V8Location::reloadAccessorGetter, 0, v8::Handle<v8::Value>(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly));
+ instance->SetAccessor(v8::String::New("replace"), V8Location::replaceAccessorGetter, 0, v8::Handle<v8::Value>(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly));
+ instance->SetAccessor(v8::String::New("assign"), V8Location::assignAccessorGetter, 0, v8::Handle<v8::Value>(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly));
+END
+ }
+ $toNativeReturnType = GetReturnTypeForToNative($interfaceName);
push(@implContent, <<END);
+
+ // Custom toString template
+ desc->Set(getToStringName(), getToStringTemplate());
return desc;
}
@@ -1521,6 +1906,10 @@ v8::Persistent<v8::FunctionTemplate> ${className}::GetTemplate() {
return ${className}_cache_;
}
+${toNativeReturnType}* ${className}::toNative(v8::Handle<v8::Object> object) {
+ return reinterpret_cast<${toNativeReturnType}*>(object->GetPointerFromInternalField(v8DOMWrapperObjectIndex));
+}
+
bool ${className}::HasInstance(v8::Handle<v8::Value> value) {
return GetRawTemplate()->HasInstance(value);
}
@@ -1547,6 +1936,15 @@ END
push(@implContent, "\n#endif // ${conditionalString}\n") if $conditionalString;
}
+sub GetReturnTypeForToNative
+{
+ my $type = shift;
+ return "FloatRect" if $type eq "SVGRect";
+ return "FloatPoint" if $type eq "SVGPoint";
+ return "TransformationMatrix" if $type eq "SVGMatrix";
+ return "float" if $type eq "SVGNumber";
+ return $type;
+}
sub GenerateFunctionCallString()
{
@@ -1757,101 +2155,20 @@ sub GetNativeTypeFromSignature
sub IsRefPtrType
{
my $type = shift;
- return 1 if $type eq "Attr";
- return 1 if $type eq "CanvasBooleanArray";
- return 1 if $type eq "CanvasGradient";
- return 1 if $type eq "CanvasObject";
- return 1 if $type eq "ClientRect";
- return 1 if $type eq "ClientRectList";
- return 1 if $type eq "CDATASection";
- return 1 if $type eq "Comment";
- return 1 if $type eq "CSSRule";
- return 1 if $type eq "CSSStyleRule";
- return 1 if $type eq "CSSCharsetRule";
- return 1 if $type eq "CSSImportRule";
- return 1 if $type eq "CSSMediaRule";
- return 1 if $type eq "CSSFontFaceRule";
- return 1 if $type eq "CSSPageRule";
- return 1 if $type eq "CSSPrimitiveValue";
- return 1 if $type eq "CSSStyleSheet";
- return 1 if $type eq "CSSStyleDeclaration";
- return 1 if $type eq "CSSValue";
- return 1 if $type eq "CSSRuleList";
- return 1 if $type eq "Database";
- return 1 if $type eq "Document";
- return 1 if $type eq "DocumentFragment";
- return 1 if $type eq "DocumentType";
- return 1 if $type eq "Element";
- return 1 if $type eq "EntityReference";
- return 1 if $type eq "Event";
- return 1 if $type eq "EventListener";
- return 1 if $type eq "FileList";
- return 1 if $type eq "HTMLCollection";
- return 1 if $type eq "HTMLAllCollection";
- return 1 if $type eq "HTMLDocument";
- return 1 if $type eq "HTMLElement";
- return 1 if $type eq "HTMLOptionsCollection";
- return 1 if $type eq "ImageData";
- return 1 if $type eq "Media";
- return 1 if $type eq "MediaError";
- return 1 if $type eq "MimeType";
- return 1 if $type eq "Node";
- return 1 if $type eq "NodeList";
- return 1 if $type eq "NodeFilter";
- return 1 if $type eq "NodeIterator";
- return 1 if $type eq "NSResolver";
- return 1 if $type eq "Plugin";
- return 1 if $type eq "ProcessingInstruction";
- return 1 if $type eq "Range";
- return 1 if $type eq "RGBColor";
- return 1 if $type eq "Text";
- return 1 if $type eq "TextMetrics";
- return 1 if $type eq "TimeRanges";
- return 1 if $type eq "TreeWalker";
- return 1 if $type eq "WebGLActiveInfo";
- return 1 if $type eq "WebGLArray";
- return 1 if $type eq "WebGLArrayBuffer";
- return 1 if $type eq "WebGLByteArray";
- return 1 if $type eq "WebGLBuffer";
- return 1 if $type eq "WebGLFloatArray";
- return 1 if $type eq "WebGLFramebuffer";
- return 1 if $type eq "WebGLIntArray";
- return 1 if $type eq "WebGLProgram";
- return 1 if $type eq "WebGLRenderbuffer";
- return 1 if $type eq "WebGLShader";
- return 1 if $type eq "WebGLShortArray";
- return 1 if $type eq "WebGLTexture";
- return 1 if $type eq "WebGLUniformLocation";
- return 1 if $type eq "WebGLUnsignedByteArray";
- return 1 if $type eq "WebGLUnsignedIntArray";
- return 1 if $type eq "WebGLUnsignedShortArray";
- return 1 if $type eq "WebKitCSSMatrix";
- return 1 if $type eq "WebKitPoint";
- return 1 if $type eq "XPathExpression";
- return 1 if $type eq "XPathNSResolver";
- return 1 if $type eq "XPathResult";
-
- return 1 if $type eq "SVGAngle";
- return 1 if $type eq "SVGElementInstance";
- return 1 if $type eq "SVGElementInstanceList";
- return 1 if $type =~ /^SVGPathSeg/;
-
- return 1 if $type =~ /^SVGAnimated/;
-
- return 0;
-}
-sub IsVideoClassName
-{
- my $class = shift;
- return 1 if $class eq "V8HTMLAudioElement";
- return 1 if $class eq "V8HTMLMediaElement";
- return 1 if $class eq "V8HTMLSourceElement";
- return 1 if $class eq "V8HTMLVideoElement";
- return 1 if $class eq "V8MediaError";
- return 1 if $class eq "V8TimeRanges";
-
- return 0;
+ return 0 if $type eq "boolean";
+ return 0 if $type eq "float";
+ return 0 if $type eq "int";
+ return 0 if $type eq "Date";
+ return 0 if $type eq "DOMString";
+ return 0 if $type eq "double";
+ return 0 if $type eq "short";
+ return 0 if $type eq "long";
+ return 0 if $type eq "unsigned";
+ return 0 if $type eq "unsigned long";
+ return 0 if $type eq "unsigned short";
+
+ return 1;
}
sub IsWorkerClassName
@@ -1879,6 +2196,7 @@ sub GetNativeType
return "int" if $type eq "short" or $type eq "unsigned short";
return "unsigned" if $type eq "unsigned long";
return "int" if $type eq "long";
+ return "long long" if $type eq "long long";
return "unsigned long long" if $type eq "unsigned long long";
return "bool" if $type eq "boolean";
return "String" if $type eq "DOMString";
@@ -1888,11 +2206,14 @@ sub GetNativeType
return "TransformationMatrix" if $type eq "SVGMatrix";
return "SVGTransform" if $type eq "SVGTransform";
return "SVGLength" if $type eq "SVGLength";
+ return "SVGAngle" if $type eq "SVGAngle";
return "double" if $type eq "SVGNumber";
+ return "SVGPreserveAspectRatio" if $type eq "SVGPreserveAspectRatio";
return "SVGPaint::SVGPaintType" if $type eq "SVGPaintType";
return "DOMTimeStamp" if $type eq "DOMTimeStamp";
return "unsigned" if $type eq "unsigned int";
return "Node*" if $type eq "EventTarget" and $isParameter;
+ return "double" if $type eq "Date";
return "String" if $type eq "DOMUserData"; # FIXME: Temporary hack?
@@ -1914,6 +2235,8 @@ my %typeCanFailConversion = (
"WebGLArray" => 0,
"WebGLBuffer" => 0,
"WebGLByteArray" => 0,
+ "WebGLUnsignedByteArray" => 0,
+ "WebGLContextAttributes" => 0,
"WebGLFloatArray" => 0,
"WebGLFramebuffer" => 0,
"CanvasGradient" => 0,
@@ -1946,7 +2269,7 @@ my %typeCanFailConversion = (
"Range" => 0,
"SQLResultSet" => 0,
"Storage" => 0,
- "SVGAngle" => 0,
+ "SVGAngle" => 1,
"SVGElement" => 0,
"SVGLength" => 1,
"SVGMatrix" => 1,
@@ -1954,6 +2277,7 @@ my %typeCanFailConversion = (
"SVGPaintType" => 0,
"SVGPathSeg" => 0,
"SVGPoint" => 1,
+ "SVGPreserveAspectRatio" => 1,
"SVGRect" => 1,
"SVGTransform" => 1,
"TouchList" => 0,
@@ -1969,6 +2293,8 @@ my %typeCanFailConversion = (
"long" => 0,
"unsigned long" => 0,
"unsigned short" => 0,
+ "long long" => 0,
+ "unsigned long long" => 0
);
@@ -1987,9 +2313,11 @@ sub BasicTypeCanFailConversion
my $signature = shift;
my $type = GetTypeFromSignature($signature);
+ return 1 if $type eq "SVGAngle";
return 1 if $type eq "SVGLength";
return 1 if $type eq "SVGMatrix";
return 1 if $type eq "SVGPoint";
+ return 1 if $type eq "SVGPreserveAspectRatio";
return 1 if $type eq "SVGRect";
return 1 if $type eq "SVGTransform";
return 0;
@@ -2023,8 +2351,10 @@ sub JSValueToNative
return "$value->NumberValue()" if $type eq "SVGNumber";
return "toInt32($value${maybeOkParam})" if $type eq "unsigned long" or $type eq "unsigned short" or $type eq "long";
+ return "toInt64($value)" if $type eq "unsigned long long" or $type eq "long long";
return "static_cast<Range::CompareHow>($value->Int32Value())" if $type eq "CompareHow";
return "static_cast<SVGPaint::SVGPaintType>($value->ToInt32()->Int32Value())" if $type eq "SVGPaintType";
+ return "toWebCoreDate($value)" if $type eq "Date";
if ($type eq "DOMString" or $type eq "DOMUserData") {
return $value;
@@ -2048,12 +2378,11 @@ sub JSValueToNative
}
# Default, assume autogenerated type conversion routines
- $implIncludes{"V8Proxy.h"} = 1;
if ($type eq "EventTarget") {
$implIncludes{"V8Node.h"} = 1;
# EventTarget is not in DOM hierarchy, but all Nodes are EventTarget.
- return "V8Node::HasInstance($value) ? v8DOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast($value)) : 0";
+ return "V8Node::HasInstance($value) ? V8Node::toNative(v8::Handle<v8::Object>::Cast($value)) : 0";
}
if ($type eq "XPathNSResolver") {
@@ -2061,14 +2390,13 @@ sub JSValueToNative
}
AddIncludesForType($type);
- # $implIncludes{"$type.h"} = 1 unless AvoidInclusionOfType($type);
if (IsDOMNodeType($type)) {
$implIncludes{"V8${type}.h"} = 1;
# Perform type checks on the parameter, if it is expected Node type,
# return NULL.
- return "V8${type}::HasInstance($value) ? v8DOMWrapperToNode<${type}>(v8::Handle<v8::Object>::Cast($value)) : 0";
+ return "V8${type}::HasInstance($value) ? V8${type}::toNative(v8::Handle<v8::Object>::Cast($value)) : 0";
} else {
# TODO: Temporary to avoid Window name conflict.
my $classIndex = uc($type);
@@ -2087,7 +2415,7 @@ sub JSValueToNative
# Perform type checks on the parameter, if it is expected Node type,
# return NULL.
- return "V8${type}::HasInstance($value) ? v8DOMWrapperTo<${implClassName}>(V8ClassIndex::${classIndex}, v8::Handle<v8::Object>::Cast($value)) : 0";
+ return "V8${type}::HasInstance($value) ? V8${type}::toNative(v8::Handle<v8::Object>::Cast($value)) : 0";
}
}
@@ -2157,10 +2485,14 @@ my %non_wrapper_types = (
'long' => 1,
'unsigned long' => 1,
'boolean' => 1,
+ 'long long' => 1,
+ 'unsigned long long' => 1,
'DOMString' => 1,
'CompareHow' => 1,
+ 'SVGAngle' => 1,
'SVGRect' => 1,
'SVGPoint' => 1,
+ 'SVGPreserveAspectRatio' => 1,
'SVGMatrix' => 1,
'SVGTransform' => 1,
'SVGLength' => 1,
@@ -2228,6 +2560,7 @@ sub ReturnNativeToJSValue
return "return v8::Integer::New($value)" if $nativeType eq "int";
return "return v8::Integer::NewFromUnsigned($value)" if $nativeType eq "unsigned";
+ return "return v8DateOrNull($value);" if $type eq "Date";
return "return v8::Number::New($value)" if $codeGenerator->IsPrimitiveType($type) or $type eq "SVGPaintType";
if ($codeGenerator->IsStringType($type)) {
@@ -2245,7 +2578,6 @@ sub ReturnNativeToJSValue
# V8 specific.
my $implClassName = $type;
AddIncludesForType($type);
- # $implIncludes{GetImplementationFileName($type)} = 1 unless AvoidInclusionOfType($type);
# special case for non-DOM node interfaces
if (IsDOMNodeType($type)) {
@@ -2270,7 +2602,7 @@ sub ReturnNativeToJSValue
if ($type eq "SerializedScriptValue") {
$implIncludes{"$type.h"} = 1;
- return "return v8String($value->toString())";
+ return "return $value->deserialize()";
}
if ($type eq "DedicatedWorkerContext" or $type eq "WorkerContext" or $type eq "SharedWorkerContext") {
diff --git a/WebCore/bindings/scripts/IDLParser.pm b/WebCore/bindings/scripts/IDLParser.pm
index 5affe94..b2577d2 100644
--- a/WebCore/bindings/scripts/IDLParser.pm
+++ b/WebCore/bindings/scripts/IDLParser.pm
@@ -158,6 +158,7 @@ sub parseExtendedAttributes
# Attributes with no value are set to be true
$value = 1 unless defined $value;
$attrs{$name} = $value;
+ die("Invalid extended attribute name: '$name'\n") if $name =~ /\s/;
}
return \%attrs;
@@ -370,7 +371,9 @@ sub DetermineParseMode
$mode = MODE_INTERFACE;
} elsif ($_ =~ /exception/) {
$mode = MODE_EXCEPTION;
- } elsif ($_ =~ /alias/) {
+ } elsif ($_ =~ /(\A|\b)alias/) {
+ # The (\A|\b) above is needed so we don't match attributes
+ # whose names contain the substring "alias".
$mode = MODE_ALIAS;
}
diff --git a/WebCore/bindings/scripts/generate-bindings.pl b/WebCore/bindings/scripts/generate-bindings.pl
index c7adeb3..ad29dc5 100755
--- a/WebCore/bindings/scripts/generate-bindings.pl
+++ b/WebCore/bindings/scripts/generate-bindings.pl
@@ -56,7 +56,6 @@ my $idlFile = $ARGV[0];
die('Must specify input file.') unless defined($idlFile);
die('Must specify IDL search path.') unless @idlDirectories;
die('Must specify generator') unless defined($generator);
-die('Must specify input file.') unless defined($idlFile);
die('Must specify output directory.') unless defined($outputDirectory);
die('Must specify defines') unless defined($defines);
diff --git a/WebCore/bindings/v8/DOMData.cpp b/WebCore/bindings/v8/DOMData.cpp
index ec9a938..417426f 100644
--- a/WebCore/bindings/v8/DOMData.cpp
+++ b/WebCore/bindings/v8/DOMData.cpp
@@ -33,6 +33,7 @@
#include "ChildThreadDOMData.h"
#include "MainThreadDOMData.h"
+#include "WebGLContextAttributes.h"
#include "WebGLUniformLocation.h"
namespace WebCore {
diff --git a/WebCore/bindings/v8/DOMData.h b/WebCore/bindings/v8/DOMData.h
index 4947e82..7fa9e7d 100644
--- a/WebCore/bindings/v8/DOMData.h
+++ b/WebCore/bindings/v8/DOMData.h
@@ -51,7 +51,7 @@ namespace WebCore {
virtual DOMDataStore& getStore() = 0;
template<typename T>
- static void handleWeakObject(DOMDataStore::DOMWrapperMapType, v8::Handle<v8::Object>, T* domObject);
+ static void handleWeakObject(DOMDataStore::DOMWrapperMapType, v8::Persistent<v8::Object>, T* domObject);
void forgetDelayedObject(void* object) { m_delayedObjectMap.take(object); }
@@ -62,7 +62,7 @@ namespace WebCore {
void derefDelayedObjects();
template<typename T>
- static void removeObjectsFromWrapperMap(DOMWrapperMap<T>& domMap);
+ static void removeObjectsFromWrapperMap(AbstractWeakReferenceMap<T, v8::Object>& domMap);
ThreadIdentifier owningThread() const { return m_owningThread; }
@@ -72,6 +72,17 @@ namespace WebCore {
void ensureDeref(V8ClassIndex::V8WrapperType type, void* domObject);
static void derefObject(V8ClassIndex::V8WrapperType type, void* domObject);
+ template<typename T>
+ class WrapperMapObjectRemover : public WeakReferenceMap<T, v8::Object>::Visitor {
+ public:
+ virtual void visitDOMWrapper(T* domObject, v8::Persistent<v8::Object> v8Object)
+ {
+ V8ClassIndex::V8WrapperType type = V8DOMWrapper::domWrapperType(v8Object);
+ derefObject(type, domObject);
+ v8Object.Dispose();
+ }
+ };
+
// Stores all the DOM objects that are delayed to be processed when the
// owning thread gains control.
DelayedObjectMap m_delayedObjectMap;
@@ -85,7 +96,7 @@ namespace WebCore {
};
template<typename T>
- void DOMData::handleWeakObject(DOMDataStore::DOMWrapperMapType mapType, v8::Handle<v8::Object> v8Object, T* domObject)
+ void DOMData::handleWeakObject(DOMDataStore::DOMWrapperMapType mapType, v8::Persistent<v8::Object> v8Object, T* domObject)
{
ASSERT(WTF::isMainThread());
DOMDataList& list = DOMDataStore::allStores();
@@ -94,10 +105,7 @@ namespace WebCore {
DOMDataStore::InternalDOMWrapperMap<T>* domMap = static_cast<DOMDataStore::InternalDOMWrapperMap<T>*>(store->getDOMWrapperMap(mapType));
- v8::Handle<v8::Object> wrapper = domMap->get(domObject);
- if (*wrapper == *v8Object) {
- // Clear the JS reference.
- domMap->forgetOnly(domObject);
+ if (domMap->removeIfPresent(domObject, v8Object)) {
ASSERT(store->domData()->owningThread() == WTF::currentThread());
store->domData()->derefObject(V8DOMWrapper::domWrapperType(v8Object), domObject);
}
@@ -105,21 +113,11 @@ namespace WebCore {
}
template<typename T>
- void DOMData::removeObjectsFromWrapperMap(DOMWrapperMap<T>& domMap)
+ void DOMData::removeObjectsFromWrapperMap(AbstractWeakReferenceMap<T, v8::Object>& domMap)
{
- for (typename WTF::HashMap<T*, v8::Object*>::iterator iter(domMap.impl().begin()); iter != domMap.impl().end(); ++iter) {
- T* domObject = static_cast<T*>(iter->first);
- v8::Persistent<v8::Object> v8Object(iter->second);
-
- V8ClassIndex::V8WrapperType type = V8DOMWrapper::domWrapperType(v8::Handle<v8::Object>::Cast(v8Object));
-
- // Deref the DOM object.
- derefObject(type, domObject);
-
- // Clear the JS wrapper.
- v8Object.Dispose();
- }
- domMap.impl().clear();
+ WrapperMapObjectRemover<T> remover;
+ domMap.visit(&remover);
+ domMap.clear();
}
} // namespace WebCore
diff --git a/WebCore/bindings/v8/DOMDataStore.cpp b/WebCore/bindings/v8/DOMDataStore.cpp
index a76ca53..e181ebc 100644
--- a/WebCore/bindings/v8/DOMDataStore.cpp
+++ b/WebCore/bindings/v8/DOMDataStore.cpp
@@ -146,14 +146,14 @@ void DOMDataStore::weakDOMObjectCallback(v8::Persistent<v8::Value> v8Object, voi
{
v8::HandleScope scope;
ASSERT(v8Object->IsObject());
- DOMData::handleWeakObject(DOMDataStore::DOMObjectMap, v8::Handle<v8::Object>::Cast(v8Object), domObject);
+ DOMData::handleWeakObject(DOMDataStore::DOMObjectMap, v8::Persistent<v8::Object>::Cast(v8Object), domObject);
}
void DOMDataStore::weakActiveDOMObjectCallback(v8::Persistent<v8::Value> v8Object, void* domObject)
{
v8::HandleScope scope;
ASSERT(v8Object->IsObject());
- DOMData::handleWeakObject(DOMDataStore::ActiveDOMObjectMap, v8::Handle<v8::Object>::Cast(v8Object), domObject);
+ DOMData::handleWeakObject(DOMDataStore::ActiveDOMObjectMap, v8::Persistent<v8::Object>::Cast(v8Object), domObject);
}
void DOMDataStore::weakNodeCallback(v8::Persistent<v8::Value> v8Object, void* domObject)
@@ -166,32 +166,42 @@ void DOMDataStore::weakNodeCallback(v8::Persistent<v8::Value> v8Object, void* do
DOMDataList& list = DOMDataStore::allStores();
for (size_t i = 0; i < list.size(); ++i) {
DOMDataStore* store = list[i];
- HashMap<Node*, v8::Object*>& domMapImpl = store->domNodeMap().impl();
- HashMap<Node*, v8::Object*>::iterator it = domMapImpl.find(node);
- if (it == domMapImpl.end() || it->second != *v8Object)
- continue;
- ASSERT(store->domData()->owningThread() == WTF::currentThread());
- v8Object.Dispose();
- domMapImpl.remove(it);
- node->deref(); // Nobody overrides Node::deref so it's safe
- break; // There might be at most one wrapper for the node in world's maps
+ if (store->domNodeMap().removeIfPresent(node, v8Object)) {
+ ASSERT(store->domData()->owningThread() == WTF::currentThread());
+ node->deref(); // Nobody overrides Node::deref so it's safe
+ break; // There might be at most one wrapper for the node in world's maps
+ }
}
}
+bool DOMDataStore::IntrusiveDOMWrapperMap::removeIfPresent(Node* obj, v8::Persistent<v8::Data> value)
+{
+ ASSERT(obj);
+ v8::Persistent<v8::Object>* entry = obj->wrapper();
+ if (!entry)
+ return false;
+ if (*entry != value)
+ return false;
+ obj->clearWrapper();
+ m_table.remove(entry);
+ value.Dispose();
+ return true;
+}
+
#if ENABLE(SVG)
void DOMDataStore::weakSVGElementInstanceCallback(v8::Persistent<v8::Value> v8Object, void* domObject)
{
v8::HandleScope scope;
ASSERT(v8Object->IsObject());
- DOMData::handleWeakObject(DOMDataStore::DOMSVGElementInstanceMap, v8::Handle<v8::Object>::Cast(v8Object), static_cast<SVGElementInstance*>(domObject));
+ DOMData::handleWeakObject(DOMDataStore::DOMSVGElementInstanceMap, v8::Persistent<v8::Object>::Cast(v8Object), static_cast<SVGElementInstance*>(domObject));
}
void DOMDataStore::weakSVGObjectWithContextCallback(v8::Persistent<v8::Value> v8Object, void* domObject)
{
v8::HandleScope scope;
ASSERT(v8Object->IsObject());
- DOMData::handleWeakObject(DOMDataStore::DOMSVGObjectWithContextMap, v8::Handle<v8::Object>::Cast(v8Object), domObject);
+ DOMData::handleWeakObject(DOMDataStore::DOMSVGObjectWithContextMap, v8::Persistent<v8::Object>::Cast(v8Object), domObject);
}
#endif // ENABLE(SVG)
diff --git a/WebCore/bindings/v8/DOMDataStore.h b/WebCore/bindings/v8/DOMDataStore.h
index b127089..54a49e7 100644
--- a/WebCore/bindings/v8/DOMDataStore.h
+++ b/WebCore/bindings/v8/DOMDataStore.h
@@ -32,6 +32,7 @@
#define DOMDataStore_h
#include "DOMObjectsInclude.h"
+#include "V8Node.h"
#include <v8.h>
#include <wtf/HashMap.h>
@@ -49,6 +50,95 @@ namespace WebCore {
typedef WTF::Vector<DOMDataStore*> DOMDataList;
+ template <class T, int CHUNK_SIZE, class Traits>
+ class ChunkedTable {
+ public:
+ ChunkedTable() : m_chunks(0), m_current(0), m_last(0) { }
+
+ T* add(T element)
+ {
+ if (m_current == m_last) {
+ m_chunks = new Chunk(m_chunks);
+ m_current = m_chunks->m_entries;
+ m_last = m_current + CHUNK_SIZE;
+ }
+ ASSERT((m_chunks->m_entries <= m_current) && (m_current < m_last));
+ T* p = m_current++;
+ *p = element;
+ return p;
+ }
+
+ void remove(T* element)
+ {
+ ASSERT(element);
+ ASSERT(m_current > m_chunks->m_entries);
+ m_current--;
+ if (element != m_current)
+ Traits::move(element, m_current);
+ if (m_current == m_chunks->m_entries) {
+ Chunk* toDelete = m_chunks;
+ m_chunks = toDelete->m_previous;
+ m_current = m_last = m_chunks ? m_chunks->m_entries + CHUNK_SIZE : 0;
+ delete toDelete;
+ }
+ ASSERT(!m_chunks || ((m_chunks->m_entries < m_current) && (m_current <= m_last)));
+ }
+
+ void clear()
+ {
+ if (!m_chunks)
+ return;
+
+ clearEntries(m_chunks->m_entries, m_current);
+ Chunk* last = m_chunks;
+ while (true) {
+ Chunk* previous = last->m_previous;
+ if (!previous)
+ break;
+ delete last;
+ clearEntries(previous->m_entries, previous->m_entries + CHUNK_SIZE);
+ last = previous;
+ }
+
+ m_chunks = last;
+ m_current = m_chunks->m_entries;
+ m_last = m_current + CHUNK_SIZE;
+ }
+
+ void visit(typename Traits::Visitor* visitor)
+ {
+ if (!m_chunks)
+ return;
+
+ visitEntries(m_chunks->m_entries, m_current, visitor);
+ for (Chunk* chunk = m_chunks->m_previous; chunk; chunk = chunk->m_previous)
+ visitEntries(chunk->m_entries, chunk->m_entries + CHUNK_SIZE, visitor);
+ }
+
+ private:
+ struct Chunk {
+ explicit Chunk(Chunk* previous) : m_previous(previous) { }
+ Chunk* const m_previous;
+ T m_entries[CHUNK_SIZE];
+ };
+
+ static void clearEntries(T* first, T* last)
+ {
+ for (T* entry = first; entry < last; entry++)
+ Traits::clear(entry);
+ }
+
+ static void visitEntries(T* first, T* last, typename Traits::Visitor* visitor)
+ {
+ for (T* entry = first; entry < last; entry++)
+ Traits::visit(entry, visitor);
+ }
+
+ Chunk* m_chunks;
+ T* m_current;
+ T* m_last;
+ };
+
// DOMDataStore
//
// DOMDataStore is the backing store that holds the maps between DOM objects
@@ -82,12 +172,83 @@ namespace WebCore {
forgetDelayedObject(m_domData, object);
}
- void forgetOnly(KeyType* object) { DOMWrapperMap<KeyType>::forget(object); }
-
private:
DOMData* m_domData;
};
+ class IntrusiveDOMWrapperMap : public AbstractWeakReferenceMap<Node, v8::Object> {
+ public:
+ IntrusiveDOMWrapperMap(v8::WeakReferenceCallback callback)
+ : AbstractWeakReferenceMap<Node, v8::Object>(callback) { }
+
+ virtual v8::Persistent<v8::Object> get(Node* obj)
+ {
+ v8::Persistent<v8::Object>* wrapper = obj->wrapper();
+ return wrapper ? *wrapper : v8::Persistent<v8::Object>();
+ }
+
+ virtual void set(Node* obj, v8::Persistent<v8::Object> wrapper)
+ {
+ ASSERT(obj);
+ ASSERT(!obj->wrapper());
+ v8::Persistent<v8::Object>* entry = m_table.add(wrapper);
+ obj->setWrapper(entry);
+ wrapper.MakeWeak(obj, weakReferenceCallback());
+ }
+
+ virtual bool contains(Node* obj)
+ {
+ return obj->wrapper();
+ }
+
+ virtual void visit(Visitor* visitor)
+ {
+ m_table.visit(visitor);
+ }
+
+ virtual bool removeIfPresent(Node* key, v8::Persistent<v8::Data> value);
+
+ virtual void clear()
+ {
+ m_table.clear();
+ }
+
+ private:
+ static int const numberOfEntries = (1 << 10) - 1;
+
+ struct ChunkedTableTraits {
+ typedef IntrusiveDOMWrapperMap::Visitor Visitor;
+
+ static void move(v8::Persistent<v8::Object>* target, v8::Persistent<v8::Object>* source)
+ {
+ *target = *source;
+ Node* node = V8Node::toNative(*target);
+ ASSERT(node);
+ node->setWrapper(target);
+ }
+
+ static void clear(v8::Persistent<v8::Object>* entry)
+ {
+ Node* node = V8Node::toNative(*entry);
+ ASSERT(node->wrapper() == entry);
+
+ node->clearWrapper();
+ entry->Dispose();
+ }
+
+ static void visit(v8::Persistent<v8::Object>* entry, Visitor* visitor)
+ {
+ Node* node = V8Node::toNative(*entry);
+ ASSERT(node->wrapper() == entry);
+
+ visitor->visitDOMWrapper(node, *entry);
+ }
+ };
+
+ typedef ChunkedTable<v8::Persistent<v8::Object>, numberOfEntries, ChunkedTableTraits> Table;
+ Table m_table;
+ };
+
DOMDataStore(DOMData*);
virtual ~DOMDataStore();
@@ -104,7 +265,7 @@ namespace WebCore {
void* getDOMWrapperMap(DOMWrapperMapType);
- InternalDOMWrapperMap<Node>& domNodeMap() { return *m_domNodeMap; }
+ DOMNodeMapping& domNodeMap() { return *m_domNodeMap; }
InternalDOMWrapperMap<void>& domObjectMap() { return *m_domObjectMap; }
InternalDOMWrapperMap<void>& activeDomObjectMap() { return *m_activeDomObjectMap; }
#if ENABLE(SVG)
@@ -124,7 +285,7 @@ namespace WebCore {
static void weakSVGObjectWithContextCallback(v8::Persistent<v8::Value> v8Object, void* domObject);
#endif
- InternalDOMWrapperMap<Node>* m_domNodeMap;
+ DOMNodeMapping* m_domNodeMap;
InternalDOMWrapperMap<void>* m_domObjectMap;
InternalDOMWrapperMap<void>* m_activeDomObjectMap;
#if ENABLE(SVG)
diff --git a/WebCore/bindings/v8/DOMObjectsInclude.h b/WebCore/bindings/v8/DOMObjectsInclude.h
index bded7f2..8f1b43d 100644
--- a/WebCore/bindings/v8/DOMObjectsInclude.h
+++ b/WebCore/bindings/v8/DOMObjectsInclude.h
@@ -34,6 +34,7 @@
#include "Attr.h"
#include "BarInfo.h"
#include "BeforeLoadEvent.h"
+#include "Blob.h"
#include "WebGLActiveInfo.h"
#include "WebGLArray.h"
#include "WebGLArrayBuffer.h"
@@ -128,6 +129,7 @@
#include "PageTransitionEvent.h"
#include "Plugin.h"
#include "PluginArray.h"
+#include "PopStateEvent.h"
#include "ProcessingInstruction.h"
#include "ProgressEvent.h"
#include "Range.h"
@@ -186,12 +188,23 @@
#include "StorageEvent.h"
#endif // DOM_STORAGE
+#if ENABLE(EVENTSOURCE)
+#include "EventSource.h"
+#endif // EVENTSOURCE
+
// GEOLOCATION
#include "Coordinates.h"
#include "Geolocation.h"
#include "Geoposition.h"
#include "PositionError.h"
+#if ENABLE(INDEXED_DATABASE)
+#include "IDBDatabaseError.h"
+#include "IDBDatabaseException.h"
+#include "IDBRequest.h"
+#include "IndexedDatabaseRequest.h"
+#endif // DATABASE
+
#if ENABLE(SVG)
#include "SVGAngle.h"
#include "SVGAnimatedPoints.h"
diff --git a/WebCore/bindings/v8/custom/V8XPathEvaluatorConstructor.cpp b/WebCore/bindings/v8/DOMWrapperWorld.cpp
index 69a8635..1e9429f 100644
--- a/WebCore/bindings/v8/custom/V8XPathEvaluatorConstructor.cpp
+++ b/WebCore/bindings/v8/DOMWrapperWorld.cpp
@@ -14,7 +14,7 @@
* * 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
@@ -29,17 +29,23 @@
*/
#include "config.h"
-#include "XPathEvaluator.h"
+#include "DOMWrapperWorld.h"
-#include "V8Binding.h"
-#include "V8Proxy.h"
+#include <wtf/StdLibExtras.h>
+#include <wtf/Threading.h>
namespace WebCore {
-CALLBACK_FUNC_DECL(XPathEvaluatorConstructor)
+DOMWrapperWorld::DOMWrapperWorld()
+{
+ // This class is pretty boring, huh?
+}
+
+DOMWrapperWorld* mainThreadNormalWorld()
{
- INC_STATS("DOM.XPathEvaluator.Constructor");
- return V8Proxy::constructDOMObject<V8ClassIndex::XPATHEVALUATOR, XPathEvaluator>(args);
+ ASSERT(isMainThread());
+ DEFINE_STATIC_LOCAL(RefPtr<DOMWrapperWorld>, cachedNormalWorld, (DOMWrapperWorld::create()));
+ return cachedNormalWorld.get();
}
} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8ClientRectListCustom.cpp b/WebCore/bindings/v8/DOMWrapperWorld.h
index 3c62e14..f54cd4e 100644
--- a/WebCore/bindings/v8/custom/V8ClientRectListCustom.cpp
+++ b/WebCore/bindings/v8/DOMWrapperWorld.h
@@ -28,28 +28,28 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "config.h"
-#include "ClientRectList.h"
-
-#include "ClientRect.h"
-
-#include "V8Binding.h"
-#include "V8CustomBinding.h"
-#include "V8Proxy.h"
+#ifndef DOMWrapperWorld_h
+#define DOMWrapperWorld_h
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
namespace WebCore {
-INDEXED_PROPERTY_GETTER(ClientRectList)
-{
- INC_STATS("DOM.ClientRectList.IndexedPropertyGetter");
- ClientRectList* imp = V8DOMWrapper::convertToNativeObject<ClientRectList>(V8ClassIndex::CLIENTRECTLIST, info.Holder());
- RefPtr<ClientRect> result = imp->item(index);
- if (!result)
- return notHandledByInterceptor();
+// This class represent a collection of DOM wrappers for a specific world.
+// The base class is pretty boring because the wrappers are actually stored
+// statically in V8DOMMap and garbage collected by V8 itself.
+class DOMWrapperWorld : public RefCounted<DOMWrapperWorld> {
+public:
+ static PassRefPtr<DOMWrapperWorld> create() { return adoptRef(new DOMWrapperWorld()); }
- return V8DOMWrapper::convertToV8Object(V8ClassIndex::CLIENTRECT, result.release());
-}
+protected:
+ DOMWrapperWorld();
+};
+
+DOMWrapperWorld* mainThreadNormalWorld();
} // namespace WebCore
+
+#endif // DOMWrapperWorld_h
diff --git a/WebCore/bindings/v8/DateExtension.cpp b/WebCore/bindings/v8/DateExtension.cpp
index 7d8b9be..abf8967 100644
--- a/WebCore/bindings/v8/DateExtension.cpp
+++ b/WebCore/bindings/v8/DateExtension.cpp
@@ -116,7 +116,7 @@ v8::Handle<v8::Value> DateExtension::Setup(const v8::Arguments& args)
v8::Handle<v8::Value> DateExtension::OnSleepDetected(const v8::Arguments&)
{
- v8::V8::TerminateExecution();
+ V8Proxy::throwError(V8Proxy::GeneralError, "Too much time spent in unload handler.");
return v8::Undefined();
}
diff --git a/WebCore/bindings/v8/DerivedSourcesAllInOne.cpp b/WebCore/bindings/v8/DerivedSourcesAllInOne.cpp
index bd2bb7b..9658b19 100644
--- a/WebCore/bindings/v8/DerivedSourcesAllInOne.cpp
+++ b/WebCore/bindings/v8/DerivedSourcesAllInOne.cpp
@@ -38,11 +38,13 @@
#include "bindings/V8Attr.cpp"
#include "bindings/V8BarInfo.cpp"
#include "bindings/V8BeforeLoadEvent.cpp"
+#include "bindings/V8Blob.cpp"
#include "bindings/V8WebGLActiveInfo.cpp"
#include "bindings/V8WebGLArray.cpp"
#include "bindings/V8WebGLArrayBuffer.cpp"
#include "bindings/V8WebGLBuffer.cpp"
#include "bindings/V8WebGLByteArray.cpp"
+#include "bindings/V8WebGLContextAttributes.cpp"
#include "bindings/V8WebGLFloatArray.cpp"
#include "bindings/V8WebGLFramebuffer.cpp"
#include "bindings/V8CanvasGradient.cpp"
@@ -202,6 +204,7 @@
#include "bindings/V8PageTransitionEvent.cpp"
#include "bindings/V8Plugin.cpp"
#include "bindings/V8PluginArray.cpp"
+#include "bindings/V8PopStateEvent.cpp"
#include "bindings/V8PositionError.cpp"
#include "bindings/V8ProcessingInstruction.cpp"
#include "bindings/V8ProgressEvent.cpp"
@@ -254,6 +257,13 @@
#include "bindings/V8SQLTransaction.cpp"
#endif
+#if ENABLE(INDEXED_DATABASE)
+#include "bindings/V8IDBDatabaseError.cpp"
+#include "bindings/V8IDBDatabaseException.cpp"
+#include "bindings/V8IDBRequest.cpp"
+#include "bindings/V8IndexedDatabaseRequest.cpp"
+#endif
+
#if ENABLE(WORKERS)
#include "bindings/V8AbstractWorker.cpp"
#include "bindings/V8DedicatedWorkerContext.cpp"
@@ -421,3 +431,7 @@
#include "bindings/V8InspectorBackend.cpp"
#include "bindings/V8InspectorFrontendHost.cpp"
#endif
+
+#if ENABLE(EVENTSOURCE)
+#include "bindings/V8EventSource.cpp"
+#endif
diff --git a/WebCore/bindings/v8/custom/V8DOMParserConstructor.cpp b/WebCore/bindings/v8/IsolatedWorld.cpp
index 4af5c6e..368683d 100644
--- a/WebCore/bindings/v8/custom/V8DOMParserConstructor.cpp
+++ b/WebCore/bindings/v8/IsolatedWorld.cpp
@@ -14,7 +14,7 @@
* * 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
@@ -29,17 +29,20 @@
*/
#include "config.h"
-#include "DOMParser.h"
-
-#include "V8Binding.h"
-#include "V8Proxy.h"
+#include "IsolatedWorld.h"
namespace WebCore {
-CALLBACK_FUNC_DECL(DOMParserConstructor)
+int IsolatedWorld::isolatedWorldCount = 0;
+
+IsolatedWorld::IsolatedWorld()
+{
+ ++isolatedWorldCount;
+}
+
+IsolatedWorld::~IsolatedWorld()
{
- INC_STATS("DOM.DOMParser.Contructor");
- return V8Proxy::constructDOMObject<V8ClassIndex::DOMPARSER, DOMParser>(args);
+ --isolatedWorldCount;
}
} // namespace WebCore
diff --git a/WebCore/bindings/v8/IsolatedWorld.h b/WebCore/bindings/v8/IsolatedWorld.h
new file mode 100644
index 0000000..3e86437
--- /dev/null
+++ b/WebCore/bindings/v8/IsolatedWorld.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef IsolatedWorld_h
+#define IsolatedWorld_h
+
+#include "DOMWrapperWorld.h"
+#include "V8DOMMap.h"
+
+namespace WebCore {
+
+// An DOMWrapperWorld other than the thread's normal world.
+class IsolatedWorld : public DOMWrapperWorld {
+public:
+ static PassRefPtr<IsolatedWorld> create() { return adoptRef(new IsolatedWorld()); }
+ static int count() { return isolatedWorldCount; }
+
+ DOMDataStore* domDataStore() const { return m_domDataStore.getStore(); }
+
+protected:
+ IsolatedWorld();
+ ~IsolatedWorld();
+
+private:
+ // The backing store for the isolated world's DOM wrappers. This class
+ // doesn't have visibility into the wrappers. This handle simply helps
+ // manage their lifetime.
+ DOMDataStoreHandle m_domDataStore;
+
+ static int isolatedWorldCount;
+};
+
+} // namespace WebCore
+
+#endif // IsolatedWorld_h
diff --git a/WebCore/bindings/v8/MainThreadDOMData.cpp b/WebCore/bindings/v8/MainThreadDOMData.cpp
index b1b63bf..d9c865c 100644
--- a/WebCore/bindings/v8/MainThreadDOMData.cpp
+++ b/WebCore/bindings/v8/MainThreadDOMData.cpp
@@ -31,7 +31,7 @@
#include "config.h"
#include "MainThreadDOMData.h"
-#include "V8IsolatedWorld.h"
+#include "V8IsolatedContext.h"
namespace WebCore {
@@ -53,9 +53,9 @@ DOMDataStore& MainThreadDOMData::getMainThreadStore()
// so that it can be inlined by getCurrentMainThreadStore, which is
// a hot spot in Dromaeo DOM tests.
ASSERT(WTF::isMainThread());
- V8IsolatedWorld* world = V8IsolatedWorld::getEntered();
- if (UNLIKELY(world != 0))
- return *world->getDOMDataStore();
+ V8IsolatedContext* context = V8IsolatedContext::getEntered();
+ if (UNLIKELY(context != 0))
+ return *context->world()->domDataStore();
return m_defaultStore;
}
diff --git a/WebCore/bindings/v8/NPV8Object.cpp b/WebCore/bindings/v8/NPV8Object.cpp
index e222ecd..258f579 100644
--- a/WebCore/bindings/v8/NPV8Object.cpp
+++ b/WebCore/bindings/v8/NPV8Object.cpp
@@ -37,6 +37,7 @@
#include "V8CustomBinding.h"
#include "V8GCController.h"
#include "V8Helpers.h"
+#include "V8Index.h"
#include "V8NPUtils.h"
#include "V8Proxy.h"
#include "npruntime_impl.h"
@@ -46,6 +47,7 @@
#include <v8.h>
#include <wtf/StringExtras.h>
+using WebCore::npObjectInternalFieldCount;
using WebCore::toV8Context;
using WebCore::toV8Proxy;
using WebCore::V8ClassIndex;
@@ -92,6 +94,11 @@ static v8::Local<v8::String> npIdentifierToV8Identifier(NPIdentifier name)
return v8::String::New(buffer);
}
+NPObject* v8ObjectToNPObject(v8::Handle<v8::Object> object)
+{
+ return reinterpret_cast<NPObject*>(object->GetPointerFromInternalField(WebCore::v8DOMWrapperObjectIndex));
+}
+
static NPClass V8NPObjectClass = { NP_CLASS_STRUCT_VERSION,
allocV8NPObject,
freeV8NPObject,
@@ -103,11 +110,11 @@ NPClass* npScriptObjectClass = &V8NPObjectClass;
NPObject* npCreateV8ScriptObject(NPP npp, v8::Handle<v8::Object> object, WebCore::DOMWindow* root)
{
// Check to see if this object is already wrapped.
- if (object->InternalFieldCount() == V8Custom::kNPObjectInternalFieldCount) {
- v8::Local<v8::Value> typeIndex = object->GetInternalField(V8Custom::kDOMWrapperTypeIndex);
+ if (object->InternalFieldCount() == npObjectInternalFieldCount) {
+ v8::Local<v8::Value> typeIndex = object->GetInternalField(WebCore::v8DOMWrapperTypeIndex);
if (typeIndex->IsNumber() && typeIndex->Uint32Value() == V8ClassIndex::NPOBJECT) {
- NPObject* returnValue = V8DOMWrapper::convertToNativeObject<NPObject>(V8ClassIndex::NPOBJECT, object);
+ NPObject* returnValue = v8ObjectToNPObject(object);
_NPN_RetainObject(returnValue);
return returnValue;
}
diff --git a/WebCore/bindings/v8/NPV8Object.h b/WebCore/bindings/v8/NPV8Object.h
index 62b3ba4..911987a 100644
--- a/WebCore/bindings/v8/NPV8Object.h
+++ b/WebCore/bindings/v8/NPV8Object.h
@@ -30,6 +30,10 @@
#ifndef NPV8Object_h
#define NPV8Object_h
+<<<<<<< HEAD
+=======
+#include "V8Index.h"
+>>>>>>> webkit.org at r54127
#if PLATFORM(CHROMIUM)
// FIXME: Chromium uses a different npruntime.h, which is in
// the Chromium source repository under third_party/npapi/bindings.
@@ -43,6 +47,8 @@
namespace WebCore {
class DOMWindow;
+
+ static const int npObjectInternalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
}
extern NPClass* npScriptObjectClass;
@@ -65,4 +71,6 @@ struct PrivateIdentifier {
NPObject* npCreateV8ScriptObject(NPP, v8::Handle<v8::Object>, WebCore::DOMWindow*);
+NPObject* v8ObjectToNPObject(v8::Handle<v8::Object>);
+
#endif // NPV8Object_h
diff --git a/WebCore/bindings/v8/RuntimeEnabledFeatures.cpp b/WebCore/bindings/v8/RuntimeEnabledFeatures.cpp
index b750836..e542f53 100644
--- a/WebCore/bindings/v8/RuntimeEnabledFeatures.cpp
+++ b/WebCore/bindings/v8/RuntimeEnabledFeatures.cpp
@@ -33,6 +33,7 @@
namespace WebCore {
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
// This should default to true, to match the behavior with JSC
bool RuntimeEnabledFeatures::isDatabaseEnabled = true;
@@ -44,5 +45,13 @@ bool RuntimeEnabledFeatures::isSessionStorageEnabled = true;
bool RuntimeEnabledFeatures::isNotificationsEnabled = true;
bool RuntimeEnabledFeatures::isApplicationCacheEnabled = true;
#endif
+=======
+bool RuntimeEnabledFeatures::isLocalStorageEnabled = true;
+bool RuntimeEnabledFeatures::isSessionStorageEnabled = true;
+bool RuntimeEnabledFeatures::isNotificationsEnabled = false;
+bool RuntimeEnabledFeatures::isApplicationCacheEnabled = false;
+bool RuntimeEnabledFeatures::isGeolocationEnabled = false;
+bool RuntimeEnabledFeatures::isIndexedDatabaseEnabled = false;
+>>>>>>> webkit.org at r54127
} // namespace WebCore
diff --git a/WebCore/bindings/v8/RuntimeEnabledFeatures.h b/WebCore/bindings/v8/RuntimeEnabledFeatures.h
index d8078c5..4428004 100644
--- a/WebCore/bindings/v8/RuntimeEnabledFeatures.h
+++ b/WebCore/bindings/v8/RuntimeEnabledFeatures.h
@@ -36,9 +36,6 @@ namespace WebCore {
// A class that stores static enablers for all experimental features
class RuntimeEnabledFeatures {
public:
- static void setDatabaseEnabled(bool isEnabled) { isDatabaseEnabled = isEnabled; }
- static bool databaseEnabled() { return isDatabaseEnabled; }
-
static void setLocalStorageEnabled(bool isEnabled) { isLocalStorageEnabled = isEnabled; }
static bool localStorageEnabled() { return isLocalStorageEnabled; }
@@ -51,15 +48,22 @@ public:
static void setApplicationCacheEnabled(bool isEnabled) { isApplicationCacheEnabled = isEnabled; }
static bool applicationCacheEnabled() { return isApplicationCacheEnabled; }
+ static void setGeolocationEnabled(bool isEnabled) { isGeolocationEnabled = isEnabled; }
+ static bool geolocationEnabled() { return isGeolocationEnabled; }
+
+ static void setIndexedDatabaseEnabled(bool isEnabled) { isIndexedDatabaseEnabled = isEnabled; }
+ static bool indexedDatabaseEnabled() { return isIndexedDatabaseEnabled; }
+
private:
// Never instantiate.
RuntimeEnabledFeatures() { }
- static bool isDatabaseEnabled;
static bool isLocalStorageEnabled;
static bool isSessionStorageEnabled;
static bool isNotificationsEnabled;
static bool isApplicationCacheEnabled;
+ static bool isGeolocationEnabled;
+ static bool isIndexedDatabaseEnabled;
};
} // namespace WebCore
diff --git a/WebCore/bindings/v8/ScriptCallStack.cpp b/WebCore/bindings/v8/ScriptCallStack.cpp
index d9b2fcf..21063ed 100644
--- a/WebCore/bindings/v8/ScriptCallStack.cpp
+++ b/WebCore/bindings/v8/ScriptCallStack.cpp
@@ -31,6 +31,8 @@
#include "config.h"
#include "ScriptCallStack.h"
+#include "ScriptController.h"
+
#include <v8.h>
#include "V8Binding.h"
@@ -53,7 +55,7 @@ ScriptCallStack* ScriptCallStack::create(const v8::Arguments& arguments, unsigne
ScriptCallStack::ScriptCallStack(const v8::Arguments& arguments, unsigned skipArgumentCount, String sourceName, int sourceLineNumber)
: m_lastCaller(String(), sourceName, sourceLineNumber, arguments, skipArgumentCount)
- , m_scriptState(new ScriptState(V8Proxy::retrieveFrameForCurrentContext()))
+ , m_scriptState(ScriptState::current())
{
}
diff --git a/WebCore/bindings/v8/ScriptCallStack.h b/WebCore/bindings/v8/ScriptCallStack.h
index f6a7e39..8ac394c 100644
--- a/WebCore/bindings/v8/ScriptCallStack.h
+++ b/WebCore/bindings/v8/ScriptCallStack.h
@@ -35,7 +35,6 @@
#include "ScriptState.h"
#include "ScriptValue.h"
#include <wtf/Noncopyable.h>
-#include <wtf/OwnPtr.h>
namespace v8 {
class Arguments;
@@ -52,13 +51,14 @@ namespace WebCore {
// FIXME: implement retrieving and storing call stack trace
unsigned size() const { return 1; }
- ScriptState* state() const { return m_scriptState.get(); }
+ ScriptState* state() const { return m_scriptState; }
+ ScriptState* globalState() const { return m_scriptState; }
private:
ScriptCallStack(const v8::Arguments& arguments, unsigned skipArgumentCount, String sourceName, int sourceLineNumber);
ScriptCallFrame m_lastCaller;
- OwnPtr<ScriptState> m_scriptState;
+ ScriptState* m_scriptState;
};
} // namespace WebCore
diff --git a/WebCore/bindings/v8/ScriptController.cpp b/WebCore/bindings/v8/ScriptController.cpp
index aa38ba0..8db55a1 100644
--- a/WebCore/bindings/v8/ScriptController.cpp
+++ b/WebCore/bindings/v8/ScriptController.cpp
@@ -47,9 +47,11 @@
#include "npruntime_priv.h"
#include "NPV8Object.h"
#include "ScriptSourceCode.h"
-#include "ScriptState.h"
#include "Settings.h"
#include "V8Binding.h"
+#include "V8BindingState.h"
+#include "V8Event.h"
+#include "V8IsolatedContext.h"
#include "V8NPObject.h"
#include "V8Proxy.h"
#include "Widget.h"
@@ -84,7 +86,7 @@ Frame* ScriptController::retrieveFrameForCurrentContext()
bool ScriptController::isSafeScript(Frame* target)
{
- return V8Proxy::canAccessFrame(target, true);
+ return V8BindingSecurity::canAccessFrame(V8BindingState::Only(), target, true);
}
void ScriptController::gcProtectJSWrapper(void* domObject)
@@ -138,7 +140,7 @@ void ScriptController::clearScriptObjects()
void ScriptController::updateSecurityOrigin()
{
- m_proxy->updateSecurityOrigin();
+ m_proxy->windowShell()->updateSecurityOrigin();
}
void ScriptController::updatePlatformScriptObjects()
@@ -167,7 +169,7 @@ bool ScriptController::processingUserGesture() const
v8::Handle<v8::Object> global = v8Context->Global();
v8::Handle<v8::Value> jsEvent = global->Get(v8::String::NewSymbol("event"));
- Event* event = V8DOMWrapper::convertToNativeEvent(jsEvent);
+ Event* event = V8DOMWrapper::isDOMEventWrapper(jsEvent) ? V8Event::toNative(v8::Handle<v8::Object>::Cast(jsEvent)) : 0;
// Based on code from kjs_bindings.cpp.
// Note: This is more liberal than Firefox's implementation.
@@ -195,6 +197,12 @@ bool ScriptController::processingUserGesture() const
return false;
}
+bool ScriptController::anyPageIsProcessingUserGesture() const
+{
+ // FIXME: is this right?
+ return processingUserGesture();
+}
+
void ScriptController::evaluateInIsolatedWorld(unsigned worldID, const Vector<ScriptSourceCode>& sources)
{
m_proxy->evaluateInIsolatedWorld(worldID, sources, 0);
@@ -205,11 +213,6 @@ void ScriptController::evaluateInIsolatedWorld(unsigned worldID, const Vector<Sc
m_proxy->evaluateInIsolatedWorld(worldID, sources, extensionGroup);
}
-void ScriptController::evaluateInNewContext(const Vector<ScriptSourceCode>& sources, int extensionGroup)
-{
- m_proxy->evaluateInNewContext(sources, extensionGroup);
-}
-
// Evaluate a script file in the environment of this proxy.
ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode)
{
@@ -232,7 +235,7 @@ ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode)
v8::Local<v8::Value> object = m_proxy->evaluate(sourceCode, 0);
// Evaluating the JavaScript could cause the frame to be deallocated
- // so we start the keep alive timer here.
+ // so we starot the keep alive timer here.
m_frame->keepAlive();
if (object.IsEmpty() || object->IsUndefined())
@@ -288,13 +291,7 @@ void ScriptController::lowMemoryNotification()
bool ScriptController::haveInterpreter() const
{
- return m_proxy->isContextInitialized();
-}
-
-bool ScriptController::isEnabled() const
-{
- Settings* settings = m_proxy->frame()->settings();
- return m_proxy->frame()->loader()->client()->allowJavaScript(settings && settings->isJavaScriptEnabled() && !m_frame->loader()->isSandboxed(SandboxScripts));
+ return m_proxy->windowShell()->isContextInitialized();
}
PassScriptInstance ScriptController::createScriptInstanceForWidget(Widget* widget)
@@ -356,13 +353,6 @@ void ScriptController::getAllWorlds(Vector<DOMWrapperWorld*>& worlds)
worlds.append(mainThreadNormalWorld());
}
-ScriptState* ScriptController::mainWorldScriptState()
-{
- if (!m_mainWorldScriptState)
- m_mainWorldScriptState.set(new ScriptState(m_frame, V8Proxy::mainWorldContext(m_frame)));
- return m_mainWorldScriptState.get();
-}
-
static NPObject* createNoScriptObject()
{
notImplemented();
@@ -388,7 +378,7 @@ NPObject* ScriptController::windowScriptNPObject()
if (m_windowScriptNPObject)
return m_windowScriptNPObject;
- if (isEnabled()) {
+ if (canExecuteScripts()) {
// JavaScript is enabled, so there is a JavaScript window object.
// Return an NPObject bound to the window object.
m_windowScriptNPObject = createScriptObject(m_frame);
@@ -405,7 +395,7 @@ NPObject* ScriptController::windowScriptNPObject()
NPObject* ScriptController::createScriptObjectForPluginElement(HTMLPlugInElement* plugin)
{
// Can't create NPObjects when JavaScript is disabled.
- if (!isEnabled())
+ if (!canExecuteScripts())
return createNoScriptObject();
v8::HandleScope handleScope;
@@ -438,7 +428,7 @@ void ScriptController::attachDebugger(void*)
void ScriptController::updateDocument()
{
- m_proxy->updateDocument();
+ m_proxy->windowShell()->updateDocument();
}
} // namespace WebCore
diff --git a/WebCore/bindings/v8/ScriptController.h b/WebCore/bindings/v8/ScriptController.h
index fb7bbee..b45bdef 100644
--- a/WebCore/bindings/v8/ScriptController.h
+++ b/WebCore/bindings/v8/ScriptController.h
@@ -42,164 +42,155 @@
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
+struct NPObject;
+
namespace WebCore {
- class DOMWrapperWorld;
- class Event;
- class Frame;
- class HTMLPlugInElement;
- class ScriptSourceCode;
- class ScriptState;
- class String;
- class Widget;
- class XSSAuditor;
- class ScriptController {
- public:
- ScriptController(Frame*);
- ~ScriptController();
+class DOMWrapperWorld;
+class Event;
+class Frame;
+class HTMLPlugInElement;
+class ScriptSourceCode;
+class String;
+class Widget;
+class XSSAuditor;
- // FIXME: V8Proxy should either be folded into ScriptController
- // or this accessor should be made JSProxy*
- V8Proxy* proxy() { return m_proxy.get(); }
+class ScriptController {
+public:
+ ScriptController(Frame*);
+ ~ScriptController();
- ScriptValue executeScript(const ScriptSourceCode&);
- ScriptValue executeScript(const String& script, bool forceUserGesture = false);
+ // FIXME: V8Proxy should either be folded into ScriptController
+ // or this accessor should be made JSProxy*
+ V8Proxy* proxy() { return m_proxy.get(); }
- // Returns true if argument is a JavaScript URL.
- bool executeIfJavaScriptURL(const KURL&, bool userGesture = false, bool replaceDocument = true);
+ ScriptValue executeScript(const ScriptSourceCode&);
+ ScriptValue executeScript(const String& script, bool forceUserGesture = false);
- // This function must be called from the main thread. It is safe to call it repeatedly.
- static void initializeThreading();
+ // Returns true if argument is a JavaScript URL.
+ bool executeIfJavaScriptURL(const KURL&, bool userGesture = false, bool replaceDocument = true);
- // Evaluate a script file in the environment of this proxy.
- // If succeeded, 'succ' is set to true and result is returned
- // as a string.
- ScriptValue evaluate(const ScriptSourceCode&);
+ // This function must be called from the main thread. It is safe to call it repeatedly.
+ static void initializeThreading();
- void evaluateInIsolatedWorld(unsigned worldID, const Vector<ScriptSourceCode>&);
+ // Evaluate a script file in the environment of this proxy.
+ // If succeeded, 'succ' is set to true and result is returned
+ // as a string.
+ ScriptValue evaluate(const ScriptSourceCode&);
- // Executes JavaScript in an isolated world. The script gets its own global scope,
- // its own prototypes for intrinsic JavaScript objects (String, Array, and so-on),
- // and its own wrappers for all DOM nodes and DOM constructors.
- //
- // If an isolated world with the specified ID already exists, it is reused.
- // Otherwise, a new world is created.
- //
- // If the worldID is 0, a new world is always created.
- //
- // FIXME: Get rid of extensionGroup here.
- void evaluateInIsolatedWorld(unsigned worldID, const Vector<ScriptSourceCode>&, int extensionGroup);
+ void evaluateInIsolatedWorld(unsigned worldID, const Vector<ScriptSourceCode>&);
- // Executes JavaScript in a new context associated with the web frame. The
- // script gets its own global scope and its own prototypes for intrinsic
- // JavaScript objects (String, Array, and so-on). It shares the wrappers for
- // all DOM nodes and DOM constructors.
- void evaluateInNewContext(const Vector<ScriptSourceCode>&, int extensionGroup);
+ // Executes JavaScript in an isolated world. The script gets its own global scope,
+ // its own prototypes for intrinsic JavaScript objects (String, Array, and so-on),
+ // and its own wrappers for all DOM nodes and DOM constructors.
+ //
+ // If an isolated world with the specified ID already exists, it is reused.
+ // Otherwise, a new world is created.
+ //
+ // If the worldID is 0, a new world is always created.
+ //
+ // FIXME: Get rid of extensionGroup here.
+ void evaluateInIsolatedWorld(unsigned worldID, const Vector<ScriptSourceCode>&, int extensionGroup);
- // Masquerade 'this' as the windowShell.
- // This is a bit of a hack, but provides reasonable compatibility
- // with what JSC does as well.
- ScriptController* windowShell(DOMWrapperWorld*) { return this; }
- ScriptController* existingWindowShell(DOMWrapperWorld*) { return this; }
+ // Masquerade 'this' as the windowShell.
+ // This is a bit of a hack, but provides reasonable compatibility
+ // with what JSC does as well.
+ ScriptController* windowShell(DOMWrapperWorld*) { return this; }
+ ScriptController* existingWindowShell(DOMWrapperWorld*) { return this; }
- XSSAuditor* xssAuditor() { return m_XSSAuditor.get(); }
+ XSSAuditor* xssAuditor() { return m_XSSAuditor.get(); }
- void collectGarbage();
+ void collectGarbage();
- // Notify V8 that the system is running low on memory.
- void lowMemoryNotification();
+ // Notify V8 that the system is running low on memory.
+ void lowMemoryNotification();
- // Creates a property of the global object of a frame.
- void bindToWindowObject(Frame*, const String& key, NPObject*);
+ // Creates a property of the global object of a frame.
+ void bindToWindowObject(Frame*, const String& key, NPObject*);
- PassScriptInstance createScriptInstanceForWidget(Widget*);
+ PassScriptInstance createScriptInstanceForWidget(Widget*);
- // Check if the javascript engine has been initialized.
- bool haveInterpreter() const;
+ // Check if the javascript engine has been initialized.
+ bool haveInterpreter() const;
- bool isEnabled() const;
+ bool canExecuteScripts();
- // FIXME: void* is a compile hack.
- void attachDebugger(void*);
+ // FIXME: void* is a compile hack.
+ void attachDebugger(void*);
- // --- Static methods assume we are running VM in single thread, ---
- // --- and there is only one VM instance. ---
+ // --- Static methods assume we are running VM in single thread, ---
+ // --- and there is only one VM instance. ---
- // Returns the frame for the entered context. See comments in
- // V8Proxy::retrieveFrameForEnteredContext() for more information.
- static Frame* retrieveFrameForEnteredContext();
+ // Returns the frame for the entered context. See comments in
+ // V8Proxy::retrieveFrameForEnteredContext() for more information.
+ static Frame* retrieveFrameForEnteredContext();
- // Returns the frame for the current context. See comments in
- // V8Proxy::retrieveFrameForEnteredContext() for more information.
- static Frame* retrieveFrameForCurrentContext();
+ // Returns the frame for the current context. See comments in
+ // V8Proxy::retrieveFrameForEnteredContext() for more information.
+ static Frame* retrieveFrameForCurrentContext();
- // Check whether it is safe to access a frame in another domain.
- static bool isSafeScript(Frame*);
+ // Check whether it is safe to access a frame in another domain.
+ static bool isSafeScript(Frame*);
- // Pass command-line flags to the JS engine.
- static void setFlags(const char* string, int length);
+ // Pass command-line flags to the JS engine.
+ static void setFlags(const char* string, int length);
- // Protect and unprotect the JS wrapper from garbage collected.
- static void gcProtectJSWrapper(void*);
- static void gcUnprotectJSWrapper(void*);
+ // Protect and unprotect the JS wrapper from garbage collected.
+ static void gcProtectJSWrapper(void*);
+ static void gcUnprotectJSWrapper(void*);
- void finishedWithEvent(Event*);
- void setEventHandlerLineNumber(int lineNumber);
+ void finishedWithEvent(Event*);
+ void setEventHandlerLineNumber(int lineNumber);
- void setProcessingTimerCallback(bool processingTimerCallback) { m_processingTimerCallback = processingTimerCallback; }
- bool processingUserGesture() const;
+ void setProcessingTimerCallback(bool processingTimerCallback) { m_processingTimerCallback = processingTimerCallback; }
+ bool processingUserGesture() const;
+ bool anyPageIsProcessingUserGesture() const;
- void setPaused(bool paused) { m_paused = paused; }
- bool isPaused() const { return m_paused; }
+ void setPaused(bool paused) { m_paused = paused; }
+ bool isPaused() const { return m_paused; }
- const String* sourceURL() const { return m_sourceURL; } // 0 if we are not evaluating any script.
+ const String* sourceURL() const { return m_sourceURL; } // 0 if we are not evaluating any script.
- void clearWindowShell();
- void updateDocument();
+ void clearWindowShell();
+ void updateDocument();
- void updateSecurityOrigin();
- void clearScriptObjects();
- void updatePlatformScriptObjects();
- void cleanupScriptObjectsForPlugin(Widget*);
+ void updateSecurityOrigin();
+ void clearScriptObjects();
+ void updatePlatformScriptObjects();
+ void cleanupScriptObjectsForPlugin(Widget*);
#if ENABLE(NETSCAPE_PLUGIN_API)
- NPObject* createScriptObjectForPluginElement(HTMLPlugInElement*);
- NPObject* windowScriptNPObject();
+ NPObject* createScriptObjectForPluginElement(HTMLPlugInElement*);
+ NPObject* windowScriptNPObject();
#endif
- // Dummy method to avoid a bunch of ifdef's in WebCore.
- void evaluateInWorld(const ScriptSourceCode&, DOMWrapperWorld*) { }
- static void getAllWorlds(Vector<DOMWrapperWorld*>& worlds);
-
- // Script state for the main world context.
- ScriptState* mainWorldScriptState();
+ // Dummy method to avoid a bunch of ifdef's in WebCore.
+ void evaluateInWorld(const ScriptSourceCode&, DOMWrapperWorld*) { }
+ static void getAllWorlds(Vector<DOMWrapperWorld*>& worlds);
- private:
- Frame* m_frame;
- const String* m_sourceURL;
+private:
+ Frame* m_frame;
+ const String* m_sourceURL;
- bool m_inExecuteScript;
+ bool m_inExecuteScript;
- bool m_processingTimerCallback;
- bool m_paused;
+ bool m_processingTimerCallback;
+ bool m_paused;
- OwnPtr<V8Proxy> m_proxy;
- typedef HashMap<Widget*, NPObject*> PluginObjectMap;
+ OwnPtr<V8Proxy> m_proxy;
+ typedef HashMap<Widget*, NPObject*> PluginObjectMap;
- // A mapping between Widgets and their corresponding script object.
- // This list is used so that when the plugin dies, we can immediately
- // invalidate all sub-objects which are associated with that plugin.
- // The frame keeps a NPObject reference for each item on the list.
- PluginObjectMap m_pluginObjects;
+ // A mapping between Widgets and their corresponding script object.
+ // This list is used so that when the plugin dies, we can immediately
+ // invalidate all sub-objects which are associated with that plugin.
+ // The frame keeps a NPObject reference for each item on the list.
+ PluginObjectMap m_pluginObjects;
#if ENABLE(NETSCAPE_PLUGIN_API)
- NPObject* m_windowScriptNPObject;
+ NPObject* m_windowScriptNPObject;
#endif
- // The XSSAuditor associated with this ScriptController.
- OwnPtr<XSSAuditor> m_XSSAuditor;
-
- // Script state for the main world context.
- OwnPtr<ScriptState> m_mainWorldScriptState;
- };
+ // The XSSAuditor associated with this ScriptController.
+ OwnPtr<XSSAuditor> m_XSSAuditor;
+};
} // namespace WebCore
diff --git a/WebCore/bindings/v8/ScriptEventListener.cpp b/WebCore/bindings/v8/ScriptEventListener.cpp
index 51d53ab..b318d2e 100644
--- a/WebCore/bindings/v8/ScriptEventListener.cpp
+++ b/WebCore/bindings/v8/ScriptEventListener.cpp
@@ -46,13 +46,17 @@ namespace WebCore {
PassRefPtr<V8LazyEventListener> createAttributeEventListener(Node* node, Attribute* attr)
{
ASSERT(node);
+ ASSERT(attr);
+ if (attr->isNull())
+ return 0;
+
int lineNumber = 1;
int columnNumber = 0;
String sourceURL;
if (Frame* frame = node->document()->frame()) {
ScriptController* scriptController = frame->script();
- if (!scriptController->isEnabled())
+ if (!scriptController->canExecuteScripts())
return 0;
if (!scriptController->xssAuditor()->canCreateInlineEventListener(attr->localName().string(), attr->value())) {
@@ -76,12 +80,16 @@ PassRefPtr<V8LazyEventListener> createAttributeEventListener(Frame* frame, Attri
if (!frame)
return 0;
+ ASSERT(attr);
+ if (attr->isNull())
+ return 0;
+
int lineNumber = 1;
int columnNumber = 0;
String sourceURL;
ScriptController* scriptController = frame->script();
- if (!scriptController->isEnabled())
+ if (!scriptController->canExecuteScripts())
return 0;
if (!scriptController->xssAuditor()->canCreateInlineEventListener(attr->localName().string(), attr->value())) {
diff --git a/WebCore/bindings/v8/ScriptObject.h b/WebCore/bindings/v8/ScriptObject.h
index 630d3b9..a60f2a8 100644
--- a/WebCore/bindings/v8/ScriptObject.h
+++ b/WebCore/bindings/v8/ScriptObject.h
@@ -48,6 +48,7 @@ namespace WebCore {
virtual ~ScriptObject() {}
v8::Local<v8::Object> v8Object() const;
+ ScriptState* scriptState() const { return m_scriptState; }
bool set(const String& name, const String&);
bool set(const char* name, const ScriptObject&);
diff --git a/WebCore/bindings/v8/ScriptScope.cpp b/WebCore/bindings/v8/ScriptScope.cpp
index 727ab25..a1b13a1 100644
--- a/WebCore/bindings/v8/ScriptScope.cpp
+++ b/WebCore/bindings/v8/ScriptScope.cpp
@@ -33,10 +33,6 @@
#include "ScriptState.h"
-#include "Document.h"
-#include "Frame.h"
-#include "V8Binding.h"
-
#include <v8.h>
namespace WebCore {
@@ -45,8 +41,8 @@ ScriptScope::ScriptScope(ScriptState* scriptState, bool reportExceptions)
: m_context(scriptState->context())
, m_scope(m_context)
, m_scriptState(scriptState)
- , m_reportExceptions(reportExceptions)
{
+ m_exceptionCatcher.SetVerbose(reportExceptions);
ASSERT(!m_context.IsEmpty());
}
@@ -54,11 +50,6 @@ bool ScriptScope::success()
{
if (!m_exceptionCatcher.HasCaught())
return true;
-
- v8::Local<v8::Message> message = m_exceptionCatcher.Message();
- if (m_reportExceptions)
- m_scriptState->frame()->document()->reportException(toWebCoreString(message->Get()), message->GetLineNumber(), toWebCoreString(message->GetScriptResourceName()));
-
m_exceptionCatcher.Reset();
return false;
}
diff --git a/WebCore/bindings/v8/ScriptScope.h b/WebCore/bindings/v8/ScriptScope.h
index 6fee458..3f9a332 100644
--- a/WebCore/bindings/v8/ScriptScope.h
+++ b/WebCore/bindings/v8/ScriptScope.h
@@ -49,7 +49,6 @@ namespace WebCore {
v8::Context::Scope m_scope;
v8::TryCatch m_exceptionCatcher;
ScriptState* m_scriptState;
- bool m_reportExceptions;
};
}
diff --git a/WebCore/bindings/v8/ScriptState.cpp b/WebCore/bindings/v8/ScriptState.cpp
index 68593e7..fac1d26 100644
--- a/WebCore/bindings/v8/ScriptState.cpp
+++ b/WebCore/bindings/v8/ScriptState.cpp
@@ -35,22 +35,17 @@
#include "Node.h"
#include "Page.h"
#include "ScriptController.h"
+#include "V8HiddenPropertyName.h"
+#include <v8.h>
#include <wtf/Assertions.h>
-#include <wtf/StdLibExtras.h>
namespace WebCore {
-ScriptState::ScriptState(Frame* frame)
- : m_frame(frame)
- , m_context(v8::Persistent<v8::Context>::New(V8Proxy::mainWorldContext(frame)))
-{
-}
-
-ScriptState::ScriptState(Frame* frame, v8::Handle<v8::Context> context)
- : m_frame(frame)
- , m_context(v8::Persistent<v8::Context>::New(context))
+ScriptState::ScriptState(v8::Handle<v8::Context> context)
+ : m_context(v8::Persistent<v8::Context>::New(context))
{
+ m_context.MakeWeak(this, &ScriptState::weakReferenceCallback);
}
ScriptState::~ScriptState()
@@ -59,6 +54,49 @@ ScriptState::~ScriptState()
m_context.Clear();
}
+ScriptState* ScriptState::forContext(v8::Local<v8::Context> context)
+{
+ v8::Context::Scope contextScope(context);
+
+ v8::Local<v8::Object> global = context->Global();
+ // Skip proxy object. The proxy object will survive page navigation while we need
+ // an object whose lifetime consides with that of the inspected context.
+ global = v8::Local<v8::Object>::Cast(global->GetPrototype());
+
+ v8::Handle<v8::String> key = V8HiddenPropertyName::scriptState();
+ v8::Local<v8::Value> val = global->GetHiddenValue(key);
+ if (!val.IsEmpty() && val->IsExternal())
+ return static_cast<ScriptState*>(v8::External::Cast(*val)->Value());
+
+ ScriptState* state = new ScriptState(context);
+ global->SetHiddenValue(key, v8::External::New(state));
+ return state;
+}
+
+ScriptState* ScriptState::current()
+{
+ v8::HandleScope handleScope;
+ v8::Local<v8::Context> context = v8::Context::GetCurrent();
+ if (context.IsEmpty()) {
+ ASSERT_NOT_REACHED();
+ return 0;
+ }
+ return ScriptState::forContext(context);
+}
+
+void ScriptState::weakReferenceCallback(v8::Persistent<v8::Value> object, void* parameter)
+{
+ ScriptState* scriptState = static_cast<ScriptState*>(parameter);
+ delete scriptState;
+}
+
+ScriptState* mainWorldScriptState(Frame* frame)
+{
+ v8::HandleScope handleScope;
+ V8Proxy* proxy = frame->script()->proxy();
+ return ScriptState::forContext(proxy->mainWorldContext());
+}
+
ScriptState* scriptStateFromNode(DOMWrapperWorld*, Node* node)
{
// This should be never reached with V8 bindings (WebKit only uses it
@@ -70,14 +108,7 @@ ScriptState* scriptStateFromNode(DOMWrapperWorld*, Node* node)
ScriptState* scriptStateFromPage(DOMWrapperWorld*, Page* page)
{
// This should be only reached with V8 bindings from single process layout tests.
- return page->mainFrame()->script()->mainWorldScriptState();
-}
-
-// FIXME: Stub method so we compile. Currently called from FrameLoader.cpp.
-DOMWrapperWorld* mainThreadNormalWorld()
-{
- DEFINE_STATIC_LOCAL(DOMWrapperWorld, oneWorld, ());
- return &oneWorld;
+ return mainWorldScriptState(page->mainFrame());
}
}
diff --git a/WebCore/bindings/v8/ScriptState.h b/WebCore/bindings/v8/ScriptState.h
index 12a1388..e71becb 100644
--- a/WebCore/bindings/v8/ScriptState.h
+++ b/WebCore/bindings/v8/ScriptState.h
@@ -31,6 +31,7 @@
#ifndef ScriptState_h
#define ScriptState_h
+#include "DOMWrapperWorld.h"
#include <v8.h>
#include <wtf/Noncopyable.h>
#include <wtf/RefCounted.h>
@@ -43,11 +44,6 @@ namespace WebCore {
class ScriptState : public Noncopyable {
public:
- ScriptState() { }
- ScriptState(Frame* frame);
- ScriptState(Frame* frame, v8::Handle<v8::Context> context);
- ~ScriptState();
-
bool hadException() { return !m_exception.IsEmpty(); }
void setException(v8::Local<v8::Value> exception)
{
@@ -55,29 +51,42 @@ namespace WebCore {
}
v8::Local<v8::Value> exception() { return m_exception; }
- Frame* frame() const { return m_frame; }
v8::Local<v8::Context> context() const
{
return v8::Local<v8::Context>::New(m_context);
}
+ static ScriptState* forContext(v8::Local<v8::Context>);
+ static ScriptState* current();
+
+ protected:
+ ScriptState() { }
+ ~ScriptState();
+
private:
+ friend ScriptState* mainWorldScriptState(Frame*);
+ explicit ScriptState(v8::Handle<v8::Context>);
+
+ static void weakReferenceCallback(v8::Persistent<v8::Value> object, void* parameter);
+
v8::Local<v8::Value> m_exception;
- Frame* m_frame;
v8::Persistent<v8::Context> m_context;
};
+ class EmptyScriptState : public ScriptState {
+ public:
+ EmptyScriptState() : ScriptState() { }
+ ~EmptyScriptState() { }
+ };
+
+ ScriptState* mainWorldScriptState(Frame*);
+
ScriptState* scriptStateFromNode(DOMWrapperWorld*, Node*);
ScriptState* scriptStateFromPage(DOMWrapperWorld*, Page*);
- DOMWrapperWorld* mainThreadNormalWorld();
inline DOMWrapperWorld* debuggerWorld() { return mainThreadNormalWorld(); }
inline DOMWrapperWorld* pluginWorld() { return mainThreadNormalWorld(); }
- // Dummy class to avoid a bunch of ifdef's in WebCore.
- class DOMWrapperWorld : public RefCounted<DOMWrapperWorld> {
- };
-
}
#endif // ScriptState_h
diff --git a/WebCore/bindings/v8/ScriptValue.h b/WebCore/bindings/v8/ScriptValue.h
index c0ba8d5..6a70bd7 100644
--- a/WebCore/bindings/v8/ScriptValue.h
+++ b/WebCore/bindings/v8/ScriptValue.h
@@ -44,11 +44,6 @@ namespace WebCore {
class ScriptValue {
public:
- static ScriptValue quarantineValue(ScriptState* scriptState, const ScriptValue& value)
- {
- return value;
- }
-
ScriptValue() {}
ScriptValue(v8::Handle<v8::Value> value)
diff --git a/WebCore/bindings/v8/ScriptWrappable.h b/WebCore/bindings/v8/ScriptWrappable.h
new file mode 100644
index 0000000..850994a
--- /dev/null
+++ b/WebCore/bindings/v8/ScriptWrappable.h
@@ -0,0 +1,61 @@
+/*
+ * 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 ScriptWrappable_h
+#define ScriptWrappable_h
+
+#include <v8.h>
+
+namespace WebCore {
+
+class ScriptWrappable {
+public:
+ ScriptWrappable() : m_wrapper(0) { }
+
+ v8::Persistent<v8::Object>* wrapper() const
+ {
+ return m_wrapper;
+ }
+
+ void setWrapper(v8::Persistent<v8::Object>* wrapper)
+ {
+ ASSERT(wrapper);
+ m_wrapper = wrapper;
+ }
+
+ void clearWrapper() { m_wrapper = 0; }
+
+private:
+ v8::Persistent<v8::Object>* m_wrapper;
+};
+
+} // namespace WebCore
+
+#endif // ScriptWrappable_h
diff --git a/WebCore/bindings/v8/SerializedScriptValue.cpp b/WebCore/bindings/v8/SerializedScriptValue.cpp
new file mode 100644
index 0000000..bac7f20
--- /dev/null
+++ b/WebCore/bindings/v8/SerializedScriptValue.cpp
@@ -0,0 +1,699 @@
+/*
+ * 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 "SerializedScriptValue.h"
+
+#include "SharedBuffer.h"
+
+#include <v8.h>
+#include <wtf/Assertions.h>
+#include <wtf/RefCounted.h>
+#include <wtf/Vector.h>
+
+// FIXME:
+// - catch V8 exceptions
+// - be ready to get empty handles
+// - consider crashing in debug mode on deserialization errors
+
+namespace WebCore {
+
+namespace {
+
+typedef UChar BufferValueType;
+
+// Serialization format is a sequence of (tag, optional data)
+// pairs. Tag always takes exactly one byte.
+enum SerializationTag {
+ InvalidTag = '!',
+ PaddingTag = '\0',
+ UndefinedTag = '_',
+ NullTag = '0',
+ TrueTag = 'T',
+ FalseTag = 'F',
+ StringTag = 'S',
+ Int32Tag = 'I',
+ NumberTag = 'N',
+ ObjectTag = '{',
+ ArrayTag = '[',
+};
+
+// Helpers to do verbose handle casts.
+
+template <typename T, typename U>
+static v8::Handle<T> handleCast(v8::Handle<U> handle) { return v8::Handle<T>::Cast(handle); }
+
+template <typename T, typename U>
+static v8::Local<T> handleCast(v8::Local<U> handle) { return v8::Local<T>::Cast(handle); }
+
+static bool shouldCheckForCycles(int depth)
+{
+ ASSERT(depth >= 0);
+ // Since we are not required to spot the cycle as soon as it
+ // happens we can check for cycles only when the current depth
+ // is a power of two.
+ return !(depth & (depth - 1));
+}
+
+static const int maxDepth = 20000;
+
+// VarInt encoding constants.
+static const int varIntShift = 7;
+static const int varIntMask = (1 << varIntShift) - 1;
+
+// ZigZag encoding helps VarInt encoding stay small for negative
+// numbers with small absolute values.
+class ZigZag {
+public:
+ static uint32_t encode(uint32_t value)
+ {
+ if (value & (1U << 31))
+ value = ((~value) << 1) + 1;
+ else
+ value <<= 1;
+ return value;
+ }
+
+ static uint32_t decode(uint32_t value)
+ {
+ if (value & 1)
+ value = ~(value >> 1);
+ else
+ value >>= 1;
+ return value;
+ }
+
+private:
+ ZigZag();
+};
+
+// Writer is responsible for serializing primitive types and storing
+// information used to reconstruct composite types.
+class Writer : Noncopyable {
+public:
+ Writer() : m_position(0)
+ {
+ }
+
+ // Write functions for primitive types.
+
+ void writeUndefined() { append(UndefinedTag); }
+
+ void writeNull() { append(NullTag); }
+
+ void writeTrue() { append(TrueTag); }
+
+ void writeFalse() { append(FalseTag); }
+
+ void writeString(const char* data, int length)
+ {
+ append(StringTag);
+ doWriteUint32(static_cast<uint32_t>(length));
+ append(data, length);
+ }
+
+ void writeInt32(int32_t value)
+ {
+ append(Int32Tag);
+ doWriteUint32(ZigZag::encode(static_cast<uint32_t>(value)));
+ }
+
+ void writeNumber(double number)
+ {
+ append(NumberTag);
+ append(reinterpret_cast<char*>(&number), sizeof(number));
+ }
+
+ // Records that a composite object can be constructed by using
+ // |length| previously stored values.
+ void endComposite(SerializationTag tag, int32_t length)
+ {
+ ASSERT(tag == ObjectTag || tag == ArrayTag);
+ append(tag);
+ doWriteUint32(static_cast<uint32_t>(length));
+ }
+
+ Vector<BufferValueType>& data()
+ {
+ fillHole();
+ return m_buffer;
+ }
+
+private:
+ void doWriteUint32(uint32_t value)
+ {
+ while (true) {
+ char b = (value & varIntMask);
+ value >>= varIntShift;
+ if (!value) {
+ append(b);
+ break;
+ }
+ append(b | (1 << varIntShift));
+ }
+ }
+
+ void append(SerializationTag tag)
+ {
+ append(static_cast<char>(tag));
+ }
+
+ void append(char b)
+ {
+ ensureSpace(1);
+ *charAt(m_position++) = b;
+ }
+
+ void append(const char* data, int length)
+ {
+ ensureSpace(length);
+ memcpy(charAt(m_position), data, length);
+ m_position += length;
+ }
+
+ void ensureSpace(int extra)
+ {
+ COMPILE_ASSERT(sizeof(BufferValueType) == 2, BufferValueTypeIsTwoBytes);
+ m_buffer.grow((m_position + extra + 1) / 2); // "+ 1" to round up.
+ }
+
+ void fillHole()
+ {
+ COMPILE_ASSERT(sizeof(BufferValueType) == 2, BufferValueTypeIsTwoBytes);
+ // If the writer is at odd position in the buffer, then one of
+ // the bytes in the last UChar is not initialized.
+ if (m_position % 2)
+ *charAt(m_position) = static_cast<char>(PaddingTag);
+ }
+
+ char* charAt(int position) { return reinterpret_cast<char*>(m_buffer.data()) + position; }
+
+ Vector<BufferValueType> m_buffer;
+ unsigned m_position;
+};
+
+class Serializer {
+public:
+ explicit Serializer(Writer& writer)
+ : m_writer(writer)
+ , m_state(0)
+ , m_depth(0)
+ {
+ }
+
+ bool serialize(v8::Handle<v8::Value> value)
+ {
+ v8::HandleScope scope;
+ StackCleaner cleaner(&m_state);
+ if (!doSerialize(value))
+ return false;
+ while (top()) {
+ int length;
+ while (!top()->isDone(&length)) {
+ // Note that doSerialize() can change current top().
+ if (!doSerialize(top()->advance()))
+ return false;
+ }
+ m_writer.endComposite(top()->tag(), length);
+ pop();
+ }
+ return true;
+ }
+
+private:
+ class StateBase : public Noncopyable {
+ public:
+ virtual ~StateBase() { }
+
+ // Link to the next state to form a stack.
+ StateBase* nextState() { return m_next; }
+ void setNextState(StateBase* next) { m_next = next; }
+
+ // Composite object we're processing in this state.
+ v8::Handle<v8::Value> composite() { return m_composite; }
+
+ // Serialization tag for the current composite.
+ virtual SerializationTag tag() const = 0;
+
+ // Returns whether iteration over subobjects of the current
+ // composite object is done. If yes, |*length| is set to the
+ // number of subobjects.
+ virtual bool isDone(int* length) = 0;
+
+ // Advances to the next subobject.
+ // Requires: !this->isDone().
+ virtual v8::Local<v8::Value> advance() = 0;
+
+ protected:
+ StateBase(v8::Handle<v8::Value> composite)
+ : m_next(0)
+ , m_composite(composite)
+ {
+ }
+
+ private:
+ StateBase* m_next;
+ v8::Handle<v8::Value> m_composite;
+ };
+
+ template <typename T, SerializationTag compositeTag>
+ class State : public StateBase {
+ public:
+ v8::Handle<T> composite() { return handleCast<T>(StateBase::composite()); }
+
+ virtual SerializationTag tag() const { return compositeTag; }
+
+ protected:
+ explicit State(v8::Handle<T> composite) : StateBase(composite)
+ {
+ }
+ };
+
+ // Helper to clean up the state stack in case of errors.
+ class StackCleaner : Noncopyable {
+ public:
+ explicit StackCleaner(StateBase** stack) : m_stack(stack)
+ {
+ }
+
+ ~StackCleaner()
+ {
+ StateBase* state = *m_stack;
+ while (state) {
+ StateBase* tmp = state->nextState();
+ delete state;
+ state = tmp;
+ }
+ *m_stack = 0;
+ }
+
+ private:
+ StateBase** m_stack;
+ };
+
+ class ArrayState : public State<v8::Array, ArrayTag> {
+ public:
+ ArrayState(v8::Handle<v8::Array> array)
+ : State<v8::Array, ArrayTag>(array)
+ , m_index(0)
+ {
+ }
+
+ virtual bool isDone(int* length)
+ {
+ *length = composite()->Length();
+ return static_cast<int>(m_index) >= *length;
+ }
+
+ virtual v8::Local<v8::Value> advance()
+ {
+ ASSERT(m_index < composite()->Length());
+ v8::HandleScope scope;
+ return scope.Close(composite()->Get(v8::Integer::New(m_index++)));
+ }
+
+ private:
+ unsigned m_index;
+ };
+
+ class ObjectState : public State<v8::Object, ObjectTag> {
+ public:
+ ObjectState(v8::Handle<v8::Object> object)
+ : State<v8::Object, ObjectTag>(object)
+ , m_propertyNames(object->GetPropertyNames())
+ , m_index(-1)
+ , m_length(0)
+ {
+ nextProperty();
+ }
+
+ virtual bool isDone(int* length)
+ {
+ *length = m_length;
+ return m_index >= 2 * m_propertyNames->Length();
+ }
+
+ virtual v8::Local<v8::Value> advance()
+ {
+ ASSERT(m_index < 2 * m_propertyNames->Length());
+ if (!(m_index % 2)) {
+ ++m_index;
+ return m_propertyName;
+ }
+ v8::Local<v8::Value> result = composite()->Get(m_propertyName);
+ nextProperty();
+ return result;
+ }
+
+ private:
+ void nextProperty()
+ {
+ v8::HandleScope scope;
+ ++m_index;
+ ASSERT(!(m_index % 2));
+ for (; m_index < 2 * m_propertyNames->Length(); m_index += 2) {
+ v8::Local<v8::Value> propertyName = m_propertyNames->Get(v8::Integer::New(m_index / 2));
+ if ((propertyName->IsString() && composite()->HasRealNamedProperty(handleCast<v8::String>(propertyName)))
+ || (propertyName->IsInt32() && composite()->HasRealIndexedProperty(propertyName->Uint32Value()))) {
+ m_propertyName = scope.Close(propertyName);
+ m_length += 2;
+ return;
+ }
+ }
+ }
+
+ v8::Local<v8::Array> m_propertyNames;
+ v8::Local<v8::Value> m_propertyName;
+ unsigned m_index;
+ unsigned m_length;
+ };
+
+ bool doSerialize(v8::Handle<v8::Value> value)
+ {
+ if (value->IsUndefined())
+ m_writer.writeUndefined();
+ else if (value->IsNull())
+ m_writer.writeNull();
+ else if (value->IsTrue())
+ m_writer.writeTrue();
+ else if (value->IsFalse())
+ m_writer.writeFalse();
+ else if (value->IsInt32())
+ m_writer.writeInt32(value->Int32Value());
+ else if (value->IsNumber())
+ m_writer.writeNumber(handleCast<v8::Number>(value)->Value());
+ else if (value->IsString()) {
+ v8::String::Utf8Value stringValue(value);
+ m_writer.writeString(*stringValue, stringValue.length());
+ } else if (value->IsArray()) {
+ if (!checkComposite(value))
+ return false;
+ push(new ArrayState(handleCast<v8::Array>(value)));
+ } else if (value->IsObject()) {
+ if (!checkComposite(value))
+ return false;
+ push(new ObjectState(handleCast<v8::Object>(value)));
+ // FIXME:
+ // - check not a wrapper
+ // - support File, ImageData, etc.
+ }
+ return true;
+ }
+
+ void push(StateBase* state)
+ {
+ state->setNextState(m_state);
+ m_state = state;
+ ++m_depth;
+ }
+
+ StateBase* top() { return m_state; }
+
+ void pop()
+ {
+ if (!m_state)
+ return;
+ StateBase* top = m_state;
+ m_state = top->nextState();
+ delete top;
+ --m_depth;
+ }
+
+ bool checkComposite(v8::Handle<v8::Value> composite)
+ {
+ if (m_depth > maxDepth)
+ return false;
+ if (!shouldCheckForCycles(m_depth))
+ return true;
+ for (StateBase* state = top(); state; state = state->nextState()) {
+ if (state->composite() == composite)
+ return false;
+ }
+ return true;
+ }
+
+ Writer& m_writer;
+ StateBase* m_state;
+ int m_depth;
+};
+
+// Reader is responsible for deserializing primitive types and
+// restoring information about saved objects of composite types.
+class Reader {
+public:
+ Reader(const char* buffer, int length)
+ : m_buffer(buffer)
+ , m_length(length)
+ , m_position(0)
+ {
+ ASSERT(length >= 0);
+ }
+
+ bool isEof() const { return m_position >= m_length; }
+
+ bool read(SerializationTag* tag, v8::Handle<v8::Value>* value, int* length)
+ {
+ uint32_t rawLength;
+ if (!readTag(tag))
+ return false;
+ switch (*tag) {
+ case InvalidTag:
+ return false;
+ case PaddingTag:
+ break;
+ case UndefinedTag:
+ *value = v8::Undefined();
+ break;
+ case NullTag:
+ *value = v8::Null();
+ break;
+ case TrueTag:
+ *value = v8::True();
+ break;
+ case FalseTag:
+ *value = v8::False();
+ break;
+ case StringTag:
+ if (!readString(value))
+ return false;
+ break;
+ case Int32Tag:
+ if (!readInt32(value))
+ return false;
+ break;
+ case NumberTag:
+ if (!readNumber(value))
+ return false;
+ break;
+ case ObjectTag:
+ case ArrayTag:
+ if (!doReadUint32(&rawLength))
+ return false;
+ *length = rawLength;
+ break;
+ }
+ return true;
+ }
+
+private:
+ bool readTag(SerializationTag* tag)
+ {
+ if (m_position >= m_length)
+ return false;
+ *tag = static_cast<SerializationTag>(m_buffer[m_position++]);
+ return true;
+ }
+
+ bool readString(v8::Handle<v8::Value>* value)
+ {
+ uint32_t length;
+ if (!doReadUint32(&length))
+ return false;
+ if (m_position + length > m_length)
+ return false;
+ *value = v8::String::New(m_buffer + m_position, length);
+ m_position += length;
+ return true;
+ }
+
+ bool readInt32(v8::Handle<v8::Value>* value)
+ {
+ uint32_t rawValue;
+ if (!doReadUint32(&rawValue))
+ return false;
+ *value = v8::Integer::New(static_cast<int32_t>(ZigZag::decode(rawValue)));
+ return true;
+ }
+
+ bool readNumber(v8::Handle<v8::Value>* value)
+ {
+ if (m_position + sizeof(double) > m_length)
+ return false;
+ double number;
+ char* numberAsByteArray = reinterpret_cast<char*>(&number);
+ for (unsigned i = 0; i < sizeof(double); ++i)
+ numberAsByteArray[i] = m_buffer[m_position++];
+ *value = v8::Number::New(number);
+ return true;
+ }
+
+ bool doReadUint32(uint32_t* value)
+ {
+ *value = 0;
+ char currentByte;
+ int shift = 0;
+ do {
+ if (m_position >= m_length)
+ return false;
+ currentByte = m_buffer[m_position++];
+ *value |= ((currentByte & varIntMask) << shift);
+ shift += varIntShift;
+ } while (currentByte & (1 << varIntShift));
+ return true;
+ }
+
+ const char* m_buffer;
+ const unsigned m_length;
+ unsigned m_position;
+};
+
+class Deserializer {
+public:
+ explicit Deserializer(Reader& reader) : m_reader(reader)
+ {
+ }
+
+ v8::Local<v8::Value> deserialize()
+ {
+ v8::HandleScope scope;
+ while (!m_reader.isEof()) {
+ if (!doDeserialize())
+ return v8::Local<v8::Value>();
+ }
+ if (stackDepth() != 1)
+ return v8::Local<v8::Value>();
+ return scope.Close(element(0));
+ }
+
+private:
+ bool doDeserialize()
+ {
+ SerializationTag tag;
+ v8::Local<v8::Value> value;
+ int length = 0;
+ if (!m_reader.read(&tag, &value, &length))
+ return false;
+ if (!value.IsEmpty()) {
+ push(value);
+ } else if (tag == ObjectTag) {
+ if (length > stackDepth())
+ return false;
+ v8::Local<v8::Object> object = v8::Object::New();
+ for (int i = stackDepth() - length; i < stackDepth(); i += 2) {
+ v8::Local<v8::Value> propertyName = element(i);
+ v8::Local<v8::Value> propertyValue = element(i + 1);
+ object->Set(propertyName, propertyValue);
+ }
+ pop(length);
+ push(object);
+ } else if (tag == ArrayTag) {
+ if (length > stackDepth())
+ return false;
+ v8::Local<v8::Array> array = v8::Array::New(length);
+ const int depth = stackDepth() - length;
+ {
+ v8::HandleScope scope;
+ for (int i = 0; i < length; ++i)
+ array->Set(v8::Integer::New(i), element(depth + i));
+ }
+ pop(length);
+ push(array);
+ } else if (tag != PaddingTag)
+ return false;
+ return true;
+ }
+
+ void push(v8::Local<v8::Value> value) { m_stack.append(value); }
+
+ void pop(unsigned length)
+ {
+ ASSERT(length <= m_stack.size());
+ m_stack.shrink(m_stack.size() - length);
+ }
+
+ int stackDepth() const { return m_stack.size(); }
+
+ v8::Local<v8::Value> element(unsigned index)
+ {
+ ASSERT(index < m_stack.size());
+ return m_stack[index];
+ }
+
+ Reader& m_reader;
+ Vector<v8::Local<v8::Value> > m_stack;
+};
+
+} // namespace
+
+SerializedScriptValue::SerializedScriptValue(v8::Handle<v8::Value> value)
+{
+ Writer writer;
+ Serializer serializer(writer);
+ if (!serializer.serialize(value)) {
+ // FIXME: throw exception
+ return;
+ }
+ m_data = StringImpl::adopt(writer.data());
+}
+
+SerializedScriptValue::SerializedScriptValue(String data, StringDataMode mode)
+{
+ if (mode == WireData)
+ m_data = data;
+ else {
+ ASSERT(mode == StringValue);
+ RefPtr<SharedBuffer> buffer = utf8Buffer(data);
+ Writer writer;
+ writer.writeString(buffer->data(), buffer->size());
+ m_data = StringImpl::adopt(writer.data());
+ }
+}
+
+v8::Local<v8::Value> SerializedScriptValue::deserialize()
+{
+ if (!m_data.impl())
+ return v8::Local<v8::Value>();
+ COMPILE_ASSERT(sizeof(BufferValueType) == 2, BufferValueTypeIsTwoBytes);
+ Reader reader(reinterpret_cast<const char*>(m_data.impl()->characters()), 2 * m_data.length());
+ Deserializer deserializer(reader);
+ return deserializer.deserialize();
+}
+
+} // namespace WebCore
diff --git a/WebCore/bindings/v8/SerializedScriptValue.h b/WebCore/bindings/v8/SerializedScriptValue.h
index 26a4199..7eb8935 100644
--- a/WebCore/bindings/v8/SerializedScriptValue.h
+++ b/WebCore/bindings/v8/SerializedScriptValue.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -40,11 +40,26 @@ namespace WebCore {
class SerializedScriptValue : public RefCounted<SerializedScriptValue> {
public:
- static PassRefPtr<SerializedScriptValue> create(String string)
+ // Creates a serialized representation of the given V8 value.
+ static PassRefPtr<SerializedScriptValue> create(v8::Handle<v8::Value> value)
{
- return adoptRef(new SerializedScriptValue(string));
+ return adoptRef(new SerializedScriptValue(value));
}
+ // Creates a serialized value with the given data obtained from a
+ // prior call to toWireString().
+ static PassRefPtr<SerializedScriptValue> createFromWire(String data)
+ {
+ return adoptRef(new SerializedScriptValue(data, WireData));
+ }
+
+ // Creates a serialized representation of WebCore string.
+ static PassRefPtr<SerializedScriptValue> create(String data)
+ {
+ return adoptRef(new SerializedScriptValue(data, StringValue));
+ }
+
+ // Creates an empty serialized value.
static PassRefPtr<SerializedScriptValue> create()
{
return adoptRef(new SerializedScriptValue());
@@ -52,23 +67,29 @@ public:
PassRefPtr<SerializedScriptValue> release()
{
- RefPtr<SerializedScriptValue> result = adoptRef(new SerializedScriptValue(m_data));
+ RefPtr<SerializedScriptValue> result = adoptRef(new SerializedScriptValue(m_data, WireData));
m_data = String();
return result.release();
}
- String toString()
- {
- return m_data;
- }
+ String toWireString() const { return m_data; }
+
+ // Deserializes the value (in the current context). Returns an
+ // empty handle in case of failure.
+ v8::Local<v8::Value> deserialize();
private:
- SerializedScriptValue(String string)
- : m_data(string)
- {
- }
+ enum StringDataMode {
+ StringValue,
+ WireData
+ };
SerializedScriptValue() { }
+
+ explicit SerializedScriptValue(v8::Handle<v8::Value>);
+
+ SerializedScriptValue(String data, StringDataMode mode);
+
String m_data;
};
diff --git a/WebCore/bindings/v8/StaticDOMDataStore.cpp b/WebCore/bindings/v8/StaticDOMDataStore.cpp
index 3a02c0b..722051b 100644
--- a/WebCore/bindings/v8/StaticDOMDataStore.cpp
+++ b/WebCore/bindings/v8/StaticDOMDataStore.cpp
@@ -35,7 +35,7 @@ namespace WebCore {
StaticDOMDataStore::StaticDOMDataStore(DOMData* domData)
: DOMDataStore(domData)
- , m_staticDomNodeMap(domData, &DOMDataStore::weakNodeCallback)
+ , m_staticDomNodeMap(&DOMDataStore::weakNodeCallback)
, m_staticDomObjectMap(domData, &DOMDataStore::weakDOMObjectCallback)
, m_staticActiveDomObjectMap(domData, &DOMDataStore::weakActiveDOMObjectCallback)
#if ENABLE(SVG)
diff --git a/WebCore/bindings/v8/StaticDOMDataStore.h b/WebCore/bindings/v8/StaticDOMDataStore.h
index 4cd0515..64a90e0 100644
--- a/WebCore/bindings/v8/StaticDOMDataStore.h
+++ b/WebCore/bindings/v8/StaticDOMDataStore.h
@@ -48,7 +48,7 @@ public:
StaticDOMDataStore(DOMData*);
private:
- InternalDOMWrapperMap<Node> m_staticDomNodeMap;
+ IntrusiveDOMWrapperMap m_staticDomNodeMap;
InternalDOMWrapperMap<void> m_staticDomObjectMap;
InternalDOMWrapperMap<void> m_staticActiveDomObjectMap;
#if ENABLE(SVG)
diff --git a/WebCore/bindings/v8/V8Binding.cpp b/WebCore/bindings/v8/V8Binding.cpp
index 00286e5..4379230 100644
--- a/WebCore/bindings/v8/V8Binding.cpp
+++ b/WebCore/bindings/v8/V8Binding.cpp
@@ -41,6 +41,7 @@
#include "StringBuffer.h"
#include "StringHash.h"
#include "Threading.h"
+#include "V8Element.h"
#include "V8Proxy.h"
#include <v8.h>
@@ -126,16 +127,6 @@ private:
#endif
};
-
-void* v8DOMWrapperToNative(v8::Handle<v8::Object> object) {
- return object->GetPointerFromInternalField(V8Custom::kDOMWrapperObjectIndex);
-}
-
-void* v8DOMWrapperToNative(const v8::AccessorInfo& info) {
- return info.Holder()->GetPointerFromInternalField(V8Custom::kDOMWrapperObjectIndex);
-}
-
-
String v8ValueToWebCoreString(v8::Handle<v8::Value> value)
{
if (value->IsString())
@@ -239,6 +230,17 @@ v8::Handle<v8::Value> v8StringOrFalse(const String& str)
return str.isNull() ? v8::Handle<v8::Value>(v8::False()) : v8::Handle<v8::Value>(v8String(str));
}
+double toWebCoreDate(v8::Handle<v8::Value> object)
+{
+ return (object->IsDate() || object->IsNumber()) ? object->NumberValue() : std::numeric_limits<double>::quiet_NaN();
+}
+
+v8::Handle<v8::Value> v8DateOrNull(double value)
+{
+ if (isfinite(value))
+ return v8::Date::New(value);
+ return v8::Null();
+}
template <class S> struct StringTraits
{
@@ -407,7 +409,11 @@ v8::Local<v8::String> v8ExternalString(const String& string)
StringCache& stringCache = getStringCache();
v8::String* cachedV8String = stringCache.get(stringImpl);
if (cachedV8String)
- return v8::Local<v8::String>::New(v8::Handle<v8::String>(cachedV8String));
+ {
+ v8::Persistent<v8::String> handle(cachedV8String);
+ if (!handle.IsNearDeath() && !handle.IsEmpty())
+ return v8::Local<v8::String>::New(handle);
+ }
v8::Local<v8::String> newString = makeExternalString(string);
if (newString.IsEmpty())
@@ -457,21 +463,42 @@ v8::Local<v8::Signature> configureTemplate(v8::Persistent<v8::FunctionTemplate>d
return defaultSignature;
}
-void createCallback(v8::Local<v8::ObjectTemplate> proto,
- const char *name,
- v8::InvocationCallback callback,
- v8::Handle<v8::Signature> signature,
- v8::PropertyAttribute attribute)
+v8::Persistent<v8::String> getToStringName()
+{
+ DEFINE_STATIC_LOCAL(v8::Persistent<v8::String>, value, ());
+ if (value.IsEmpty())
+ value = v8::Persistent<v8::String>::New(v8::String::New("toString"));
+ return value;
+}
+
+static v8::Handle<v8::Value> constructorToString(const v8::Arguments& args)
+{
+ // The DOM constructors' toString functions grab the current toString
+ // for Functions by taking the toString function of itself and then
+ // calling it with the constructor as its receiver. This means that
+ // changes to the Function prototype chain or toString function are
+ // reflected when printing DOM constructors. The only wart is that
+ // changes to a DOM constructor's toString's toString will cause the
+ // toString of the DOM constructor itself to change. This is extremely
+ // obscure and unlikely to be a problem.
+ v8::Handle<v8::Value> value = args.Callee()->Get(getToStringName());
+ if (!value->IsFunction())
+ return v8::String::New("");
+ return v8::Handle<v8::Function>::Cast(value)->Call(args.This(), 0, 0);
+}
+
+v8::Persistent<v8::FunctionTemplate> getToStringTemplate()
{
- proto->Set(v8::String::New(name),
- v8::FunctionTemplate::New(callback, v8::Handle<v8::Value>(), signature),
- attribute);
+ DEFINE_STATIC_LOCAL(v8::Persistent<v8::FunctionTemplate>, toStringTemplate, ());
+ if (toStringTemplate.IsEmpty())
+ toStringTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(constructorToString));
+ return toStringTemplate;
}
v8::Handle<v8::Value> getElementStringAttr(const v8::AccessorInfo& info,
const QualifiedName& name)
{
- Element *imp = v8DOMWrapperToNode<Element>(info);
+ Element* imp = V8Element::toNative(info.Holder());
return v8ExternalString(imp->getAttribute(name));
}
@@ -479,7 +506,7 @@ void setElementStringAttr(const v8::AccessorInfo& info,
const QualifiedName& name,
v8::Local<v8::Value> value)
{
- Element* imp = v8DOMWrapperToNode<Element>(info);
+ Element* imp = V8Element::toNative(info.Holder());
AtomicString v = toAtomicWebCoreStringWithNullCheck(value);
imp->setAttribute(name, v);
}
diff --git a/WebCore/bindings/v8/V8Binding.h b/WebCore/bindings/v8/V8Binding.h
index de5bb4c..439dfd7 100644
--- a/WebCore/bindings/v8/V8Binding.h
+++ b/WebCore/bindings/v8/V8Binding.h
@@ -32,6 +32,7 @@
#define V8Binding_h
#include "AtomicString.h"
+#include "BindingSecurity.h"
#include "MathExtras.h"
#include "PlatformString.h"
#include "V8DOMWrapper.h"
@@ -43,72 +44,15 @@ namespace WebCore {
class EventListener;
class EventTarget;
-
- // A helper function extract native object pointer from a DOM wrapper
- // and cast to the specified type.
- void* v8DOMWrapperToNative(v8::Handle<v8::Object>);
-
- template <class C>
- C* v8DOMWrapperTo(v8::Handle<v8::Object> object)
- {
- ASSERT(V8DOMWrapper::maybeDOMWrapper(object));
- return reinterpret_cast<C*>(v8DOMWrapperToNative(object));
- }
- template <class C>
- C* v8DOMWrapperToNode(v8::Handle<v8::Object> object)
- {
- ASSERT(V8DOMWrapper::maybeDOMWrapper(object));
- ASSERT(V8DOMWrapper::domWrapperType(object) == V8ClassIndex::NODE);
- return reinterpret_cast<C*>(v8DOMWrapperToNative(object));
- }
-
- void* v8DOMWrapperToNative(const v8::AccessorInfo&);
-
- template <class C>
- C* v8DOMWrapperTo(const v8::AccessorInfo& info) {
- ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
- return reinterpret_cast<C*>(v8DOMWrapperToNative(info));
- }
- template <class C>
- C* v8DOMWrapperToNode(const v8::AccessorInfo& info) {
- ASSERT(V8DOMWrapper::domWrapperType(info.Holder()) == V8ClassIndex::NODE);
- return reinterpret_cast<C*>(v8DOMWrapperToNative(info));
- }
-
- template <class C>
- C* v8DOMWrapperTo(V8ClassIndex::V8WrapperType type, v8::Handle<v8::Object> object)
- {
- // Native event listener is per frame, it cannot be handled by this generic function.
- ASSERT(type != V8ClassIndex::EVENTLISTENER);
- ASSERT(type != V8ClassIndex::EVENTTARGET);
-
- ASSERT(V8DOMWrapper::maybeDOMWrapper(object));
-
-#ifndef NDEBUG
- const bool typeIsValid =
-#define MAKE_CASE(TYPE, NAME) (type != V8ClassIndex::TYPE) &&
- DOM_NODE_TYPES(MAKE_CASE)
-#if ENABLE(SVG)
- SVG_NODE_TYPES(MAKE_CASE)
-#endif
-#undef MAKE_CASE
- true;
- ASSERT(typeIsValid);
-#endif
-
- return v8DOMWrapperTo<C>(object);
- }
-
- template <class C>
- C* v8DOMWrapperTo(V8ClassIndex::V8WrapperType type, const v8::AccessorInfo& info)
- {
-#ifndef NDEBUG
- return v8DOMWrapperTo<C>(type, info.Holder());
-#else
- return reinterpret_cast<C*>(v8DOMWrapperToNative(info));
-#endif
- }
+ class V8BindingDOMWindow;
+ // Instantiate binding template classes for V8.
+ class V8Binding {
+ public:
+ typedef v8::Handle<v8::Value> Value;
+ typedef V8BindingDOMWindow DOMWindow;
+ };
+ typedef BindingSecurity<V8Binding> V8BindingSecurity;
enum ExternalMode {
Externalize,
@@ -168,6 +112,11 @@ namespace WebCore {
return static_cast<float>(value->NumberValue());
}
+ inline long long toInt64(v8::Local<v8::Value> value)
+ {
+ return static_cast<long long>(value->IntegerValue());
+ }
+
// FIXME: Drop this in favor of the type specific v8ValueToWebCoreString when we rework the code generation.
inline String toWebCoreString(v8::Handle<v8::Value> object)
{
@@ -200,6 +149,10 @@ namespace WebCore {
v8::Handle<v8::Value> v8StringOrUndefined(const String& str);
v8::Handle<v8::Value> v8StringOrFalse(const String& str);
+
+ double toWebCoreDate(v8::Handle<v8::Value> object);
+
+ v8::Handle<v8::Value> v8DateOrNull(double value);
v8::Persistent<v8::FunctionTemplate> createRawTemplate();
@@ -215,20 +168,15 @@ namespace WebCore {
const BatchedCallback*,
size_t callbackCount);
- void createCallback(v8::Local<v8::ObjectTemplate> proto,
- const char *name,
- v8::InvocationCallback,
- v8::Handle<v8::Signature>,
- v8::PropertyAttribute attributes = v8::DontDelete);
-
v8::Handle<v8::Value> getElementStringAttr(const v8::AccessorInfo&,
const QualifiedName&);
void setElementStringAttr(const v8::AccessorInfo&,
const QualifiedName&,
v8::Local<v8::Value>);
- v8::Handle<v8::Value> getElementEventHandlerAttr(const v8::AccessorInfo&,
- const AtomicString&);
+
+ v8::Persistent<v8::String> getToStringName();
+ v8::Persistent<v8::FunctionTemplate> getToStringTemplate();
// V8Parameter is an adapter class that converts V8 values to Strings
// or AtomicStrings as appropriate, using multiple typecast operators.
diff --git a/WebCore/bindings/v8/V8Collection.cpp b/WebCore/bindings/v8/V8Collection.cpp
index c9fc9ac..2ff5c88 100644
--- a/WebCore/bindings/v8/V8Collection.cpp
+++ b/WebCore/bindings/v8/V8Collection.cpp
@@ -52,7 +52,7 @@ v8::Handle<v8::Value> toOptionsCollectionSetter(uint32_t index, v8::Handle<v8::V
return value;
}
- HTMLOptionElement* element = V8DOMWrapper::convertDOMWrapperToNode<HTMLOptionElement>(v8::Handle<v8::Object>::Cast(value));
+ HTMLOptionElement* element = V8HTMLOptionElement::toNative(v8::Handle<v8::Object>::Cast(value));
base->setOption(index, element, ec);
V8Proxy::setDOMException(ec);
diff --git a/WebCore/bindings/v8/V8Collection.h b/WebCore/bindings/v8/V8Collection.h
index 0a4134e..84150d8 100644
--- a/WebCore/bindings/v8/V8Collection.h
+++ b/WebCore/bindings/v8/V8Collection.h
@@ -51,6 +51,11 @@ namespace WebCore {
return V8DOMWrapper::convertToV8Object(type, implementation);
}
+ template<class Collection> static Collection* toNativeCollection(v8::Local<v8::Object> object)
+ {
+ return reinterpret_cast<Collection*>(object->GetPointerFromInternalField(v8DOMWrapperObjectIndex));
+ }
+
template<class T> static v8::Handle<v8::Value> getV8Object(PassRefPtr<T> implementation, v8::Local<v8::Value> implementationType)
{
return getV8Object(implementation.get(), implementationType);
@@ -62,10 +67,9 @@ namespace WebCore {
{
// FIXME: assert object is a collection type
ASSERT(V8DOMWrapper::maybeDOMWrapper(object));
- V8ClassIndex::V8WrapperType wrapperType = V8DOMWrapper::domWrapperType(object);
- ASSERT(wrapperType != V8ClassIndex::NODE);
- Collection* collection = V8DOMWrapper::convertToNativeObject<Collection>(wrapperType, object);
- String propertyName = toWebCoreString(name);
+ ASSERT(V8DOMWrapper::domWrapperType(object) != V8ClassIndex::NODE);
+ Collection* collection = toNativeCollection<Collection>(object);
+ AtomicString propertyName = toAtomicWebCoreStringWithNullCheck(name);
return getV8Object<ItemType>(collection->namedItem(propertyName), implementationType);
}
@@ -84,35 +88,14 @@ namespace WebCore {
return getNamedPropertyOfCollection<Collection, ItemType>(name, info.Holder(), info.Data());
}
- // A template of named property accessor of HTMLSelectElement and HTMLFormElement.
- template<class Collection> static v8::Handle<v8::Value> nodeCollectionNamedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
- {
- ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
- ASSERT(V8DOMWrapper::domWrapperType(info.Holder()) == V8ClassIndex::NODE);
- v8::Handle<v8::Value> value = info.Holder()->GetRealNamedPropertyInPrototypeChain(name);
-
- if (!value.IsEmpty())
- return value;
-
- // Search local callback properties next to find IDL defined
- // properties.
- if (info.Holder()->HasRealNamedCallbackProperty(name))
- return notHandledByInterceptor();
- Collection* collection = V8DOMWrapper::convertDOMWrapperToNode<Collection>(info.Holder());
- String propertyName = toWebCoreString(name);
- void* implementation = collection->namedItem(propertyName);
- return getV8Object(implementation, info.Data());
- }
-
// Returns the property at the index of a collection.
template<class Collection, class ItemType> static v8::Handle<v8::Value> getIndexedPropertyOfCollection(uint32_t index, v8::Local<v8::Object> object,
v8::Local<v8::Value> implementationType)
{
// FIXME: Assert that object must be a collection type.
ASSERT(V8DOMWrapper::maybeDOMWrapper(object));
- V8ClassIndex::V8WrapperType wrapperType = V8DOMWrapper::domWrapperType(object);
- ASSERT(wrapperType != V8ClassIndex::NODE);
- Collection* collection = V8DOMWrapper::convertToNativeObject<Collection>(wrapperType, object);
+ ASSERT(V8DOMWrapper::domWrapperType(object) != V8ClassIndex::NODE);
+ Collection* collection = toNativeCollection<Collection>(object);
return getV8Object<ItemType>(collection->item(index), implementationType);
}
@@ -122,22 +105,12 @@ namespace WebCore {
return getIndexedPropertyOfCollection<Collection, ItemType>(index, info.Holder(), info.Data());
}
- // A template of index interceptor of HTMLSelectElement and HTMLFormElement.
- template<class Collection> static v8::Handle<v8::Value> nodeCollectionIndexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
- {
- ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
- ASSERT(V8DOMWrapper::domWrapperType(info.Holder()) == V8ClassIndex::NODE);
- Collection* collection = V8DOMWrapper::convertDOMWrapperToNode<Collection>(info.Holder());
- void* implementation = collection->item(index);
- return getV8Object(implementation, info.Data());
- }
-
// Get an array containing the names of indexed properties of HTMLSelectElement and HTMLFormElement.
template<class Collection> static v8::Handle<v8::Array> nodeCollectionIndexedPropertyEnumerator(const v8::AccessorInfo& info)
{
ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
ASSERT(V8DOMWrapper::domWrapperType(info.Holder()) == V8ClassIndex::NODE);
- Collection* collection = V8DOMWrapper::convertDOMWrapperToNode<Collection>(info.Holder());
+ Collection* collection = toNativeCollection<Collection>(info.Holder());
int length = collection->length();
v8::Handle<v8::Array> properties = v8::Array::New(length);
for (int i = 0; i < length; ++i) {
@@ -152,8 +125,7 @@ namespace WebCore {
template<class Collection> static v8::Handle<v8::Array> collectionIndexedPropertyEnumerator(const v8::AccessorInfo& info)
{
ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
- V8ClassIndex::V8WrapperType wrapperType = V8DOMWrapper::domWrapperType(info.Holder());
- Collection* collection = V8DOMWrapper::convertToNativeObject<Collection>(wrapperType, info.Holder());
+ Collection* collection = toNativeCollection<Collection>(info.Holder());
int length = collection->length();
v8::Handle<v8::Array> properties = v8::Array::New(length);
for (int i = 0; i < length; ++i) {
@@ -170,8 +142,7 @@ namespace WebCore {
{
// FIXME: assert that object must be a collection type
ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
- V8ClassIndex::V8WrapperType wrapperType = V8DOMWrapper::domWrapperType(info.Holder());
- Collection* collection = V8DOMWrapper::convertToNativeObject<Collection>(wrapperType, info.Holder());
+ Collection* collection = toNativeCollection<Collection>(info.Holder());
String result = collection->item(index);
return v8StringOrNull(result);
}
@@ -182,8 +153,7 @@ namespace WebCore {
{
// FIXME: assert that object must be a collection type
ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
- V8ClassIndex::V8WrapperType wrapperType = V8DOMWrapper::domWrapperType(info.Holder());
- Collection* collection = V8DOMWrapper::convertToNativeObject<Collection>(wrapperType, info.Holder());
+ Collection* collection = toNativeCollection<Collection>(info.Holder());
String result = collection->item(index);
return v8String(result);
}
@@ -203,17 +173,6 @@ namespace WebCore {
desc->InstanceTemplate()->SetNamedPropertyHandler(collectionNamedPropertyGetter<Collection, ItemType>, 0, 0, 0, 0, v8::Integer::New(V8ClassIndex::ToInt(type)));
}
-
- // Add named and indexed getters to the function template for a collection.
- template<class Collection, class ItemType> static void setCollectionIndexedAndNamedGetters(v8::Handle<v8::FunctionTemplate> desc, V8ClassIndex::V8WrapperType type)
- {
- // If we interceptor before object, accessing 'length' can trigger a webkit assertion error (see fast/dom/HTMLDocument/document-special-properties.html).
- desc->InstanceTemplate()->SetNamedPropertyHandler(collectionNamedPropertyGetter<Collection, ItemType>, 0, 0, 0, 0, v8::Integer::New(V8ClassIndex::ToInt(type)));
- desc->InstanceTemplate()->SetIndexedPropertyHandler(collectionIndexedPropertyGetter<Collection, ItemType>, 0, 0, 0, collectionIndexedPropertyEnumerator<Collection>,
- v8::Integer::New(V8ClassIndex::ToInt(type)));
- }
-
-
// Add indexed getter returning a string or null to a function template for a collection.
template<class Collection> static void setCollectionStringOrNullIndexedGetter(v8::Handle<v8::FunctionTemplate> desc)
{
diff --git a/WebCore/bindings/v8/V8DOMMap.cpp b/WebCore/bindings/v8/V8DOMMap.cpp
index acd88ec..fa2fba3 100644
--- a/WebCore/bindings/v8/V8DOMMap.cpp
+++ b/WebCore/bindings/v8/V8DOMMap.cpp
@@ -65,7 +65,7 @@ void enableFasterDOMStoreAccess()
fasterDOMStoreAccess = true;
}
-DOMWrapperMap<Node>& getDOMNodeMap()
+DOMNodeMapping& getDOMNodeMap()
{
return getDOMDataStore().domNodeMap();
}
@@ -145,9 +145,7 @@ void visitDOMNodesInCurrentThread(DOMWrapperMap<Node>::Visitor* visitor)
if (!store->domData()->owningThread() == WTF::currentThread())
continue;
- HashMap<Node*, v8::Object*>& map = store->domNodeMap().impl();
- for (HashMap<Node*, v8::Object*>::iterator it = map.begin(); it != map.end(); ++it)
- visitor->visitDOMWrapper(it->first, v8::Persistent<v8::Object>(it->second));
+ store->domNodeMap().visit(visitor);
}
}
@@ -162,9 +160,7 @@ void visitDOMObjectsInCurrentThread(DOMWrapperMap<void>::Visitor* visitor)
if (!store->domData()->owningThread() == WTF::currentThread())
continue;
- HashMap<void*, v8::Object*> & map = store->domObjectMap().impl();
- for (HashMap<void*, v8::Object*>::iterator it = map.begin(); it != map.end(); ++it)
- visitor->visitDOMWrapper(it->first, v8::Persistent<v8::Object>(it->second));
+ store->domObjectMap().visit(visitor);
}
}
@@ -179,9 +175,7 @@ void visitActiveDOMObjectsInCurrentThread(DOMWrapperMap<void>::Visitor* visitor)
if (!store->domData()->owningThread() == WTF::currentThread())
continue;
- HashMap<void*, v8::Object*>& map = store->activeDomObjectMap().impl();
- for (HashMap<void*, v8::Object*>::iterator it = map.begin(); it != map.end(); ++it)
- visitor->visitDOMWrapper(it->first, v8::Persistent<v8::Object>(it->second));
+ store->activeDomObjectMap().visit(visitor);
}
}
@@ -198,9 +192,7 @@ void visitDOMSVGElementInstancesInCurrentThread(DOMWrapperMap<SVGElementInstance
if (!store->domData()->owningThread() == WTF::currentThread())
continue;
- HashMap<SVGElementInstance*, v8::Object*> & map = store->domSvgElementInstanceMap().impl();
- for (HashMap<SVGElementInstance*, v8::Object*>::iterator it = map.begin(); it != map.end(); ++it)
- visitor->visitDOMWrapper(it->first, v8::Persistent<v8::Object>(it->second));
+ store->domSvgElementInstanceMap().visit(visitor);
}
}
@@ -215,9 +207,7 @@ void visitSVGObjectsInCurrentThread(DOMWrapperMap<void>::Visitor* visitor)
if (!store->domData()->owningThread() == WTF::currentThread())
continue;
- HashMap<void*, v8::Object*>& map = store->domSvgObjectWithContextMap().impl();
- for (HashMap<void*, v8::Object*>::iterator it = map.begin(); it != map.end(); ++it)
- visitor->visitDOMWrapper(it->first, v8::Persistent<v8::Object>(it->second));
+ store->domSvgObjectWithContextMap().visit(visitor);
}
}
diff --git a/WebCore/bindings/v8/V8DOMMap.h b/WebCore/bindings/v8/V8DOMMap.h
index b6861d4..8f93127 100644
--- a/WebCore/bindings/v8/V8DOMMap.h
+++ b/WebCore/bindings/v8/V8DOMMap.h
@@ -41,12 +41,36 @@ namespace WebCore {
class SVGElementInstance;
#endif
+ template <class KeyType, class ValueType> class AbstractWeakReferenceMap {
+ public:
+ AbstractWeakReferenceMap(v8::WeakReferenceCallback callback) : m_weakReferenceCallback(callback) { }
+
+ class Visitor {
+ public:
+ virtual void visitDOMWrapper(KeyType* key, v8::Persistent<ValueType> object) = 0;
+ };
+
+ virtual v8::Persistent<ValueType> get(KeyType* obj) = 0;
+ virtual void set(KeyType* obj, v8::Persistent<ValueType> wrapper) = 0;
+ virtual bool contains(KeyType* obj) = 0;
+ virtual void visit(Visitor* visitor) = 0;
+ virtual bool removeIfPresent(KeyType* key, v8::Persistent<v8::Data> value) = 0;
+ virtual void clear() = 0;
+
+ v8::WeakReferenceCallback weakReferenceCallback() { return m_weakReferenceCallback; }
+ private:
+ v8::WeakReferenceCallback m_weakReferenceCallback;
+ };
+
+ typedef AbstractWeakReferenceMap<Node, v8::Object> DOMNodeMapping;
+
// A table of wrappers with weak pointers.
// This table allows us to avoid track wrapped objects for debugging
// and for ensuring that we don't double wrap the same object.
- template<class KeyType, class ValueType> class WeakReferenceMap {
+ template<class KeyType, class ValueType> class WeakReferenceMap : public AbstractWeakReferenceMap<KeyType, ValueType> {
public:
- WeakReferenceMap(v8::WeakReferenceCallback callback) : m_weakReferenceCallback(callback) { }
+ typedef AbstractWeakReferenceMap<KeyType, ValueType> Parent;
+ WeakReferenceMap(v8::WeakReferenceCallback callback) : Parent(callback) { }
virtual ~WeakReferenceMap()
{
#ifndef NDEBUG
@@ -65,7 +89,7 @@ namespace WebCore {
virtual void set(KeyType* obj, v8::Persistent<ValueType> wrapper)
{
ASSERT(!m_map.contains(obj));
- wrapper.MakeWeak(obj, m_weakReferenceCallback);
+ wrapper.MakeWeak(obj, Parent::weakReferenceCallback());
m_map.set(obj, *wrapper);
}
@@ -81,9 +105,30 @@ namespace WebCore {
handle.Clear();
}
+ bool removeIfPresent(KeyType* key, v8::Persistent<v8::Data> value)
+ {
+ typename HashMap<KeyType*, ValueType*>::iterator it = m_map.find(key);
+ if (it == m_map.end() || it->second != *value)
+ return false;
+
+ m_map.remove(it);
+ value.Dispose();
+ return true;
+ }
+
+ void clear()
+ {
+ m_map.clear();
+ }
+
bool contains(KeyType* obj) { return m_map.contains(obj); }
- HashMap<KeyType*, ValueType*>& impl() { return m_map; }
+ virtual void visit(typename Parent::Visitor* visitor)
+ {
+ typename HashMap<KeyType*, ValueType*>::iterator it = m_map.begin();
+ for (; it != m_map.end(); ++it)
+ visitor->visitDOMWrapper(it->first, v8::Persistent<ValueType>(it->second));
+ }
protected:
HashMap<KeyType*, ValueType*> m_map;
@@ -93,12 +138,15 @@ namespace WebCore {
template <class KeyType> class DOMWrapperMap : public WeakReferenceMap<KeyType, v8::Object> {
public:
DOMWrapperMap(v8::WeakReferenceCallback callback) : WeakReferenceMap<KeyType, v8::Object>(callback) { }
+<<<<<<< HEAD
class Visitor {
public:
virtual void visitDOMWrapper(KeyType* key, v8::Persistent<v8::Object> object) = 0;
virtual ~Visitor() { }
};
+=======
+>>>>>>> webkit.org at r54127
};
// An opaque class that represents a set of DOM wrappers.
@@ -117,7 +165,7 @@ namespace WebCore {
};
// A map from DOM node to its JS wrapper.
- DOMWrapperMap<Node>& getDOMNodeMap();
+ DOMNodeMapping& getDOMNodeMap();
void visitDOMNodesInCurrentThread(DOMWrapperMap<Node>::Visitor*);
// A map from a DOM object (non-node) to its JS wrapper. This map does not contain the DOM objects which can have pending activity (active dom objects).
diff --git a/WebCore/bindings/v8/V8DOMWindowShell.cpp b/WebCore/bindings/v8/V8DOMWindowShell.cpp
new file mode 100644
index 0000000..793547d
--- /dev/null
+++ b/WebCore/bindings/v8/V8DOMWindowShell.cpp
@@ -0,0 +1,559 @@
+/*
+ * Copyright (C) 2008, 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "V8DOMWindowShell.h"
+
+#include "CString.h"
+#include "PlatformBridge.h"
+#include "CSSMutableStyleDeclaration.h"
+#include "DateExtension.h"
+#include "DocumentLoader.h"
+#include "DOMObjectsInclude.h"
+#include "Frame.h"
+#include "FrameLoaderClient.h"
+#include "InspectorTimelineAgent.h"
+#include "Page.h"
+#include "PageGroup.h"
+#include "ScriptController.h"
+#include "StorageNamespace.h"
+#include "V8Binding.h"
+#include "V8BindingState.h"
+#include "V8Collection.h"
+#include "V8ConsoleMessage.h"
+#include "V8CustomBinding.h"
+#include "V8DOMMap.h"
+#include "V8DOMWindow.h"
+#include "V8HiddenPropertyName.h"
+#include "V8History.h"
+#include "V8Index.h"
+#include "V8Location.h"
+#include "V8Proxy.h"
+#include "WorkerContextExecutionProxy.h"
+
+#include <algorithm>
+#include <stdio.h>
+#include <utility>
+#include <v8-debug.h>
+#include <v8.h>
+#include <wtf/Assertions.h>
+#include <wtf/OwnArrayPtr.h>
+#include <wtf/StdLibExtras.h>
+#include <wtf/StringExtras.h>
+#include <wtf/UnusedParam.h>
+
+namespace WebCore {
+
+static void handleFatalErrorInV8()
+{
+ // FIXME: We temporarily deal with V8 internal error situations
+ // such as out-of-memory by crashing the renderer.
+ CRASH();
+}
+
+static void reportFatalErrorInV8(const char* location, const char* message)
+{
+ // V8 is shutdown, we cannot use V8 api.
+ // The only thing we can do is to disable JavaScript.
+ // FIXME: clean up V8Proxy and disable JavaScript.
+ printf("V8 error: %s (%s)\n", message, location);
+ handleFatalErrorInV8();
+}
+
+// Returns the owner frame pointer of a DOM wrapper object. It only works for
+// these DOM objects requiring cross-domain access check.
+static Frame* getTargetFrame(v8::Local<v8::Object> host, v8::Local<v8::Value> data)
+{
+ Frame* target = 0;
+ switch (V8ClassIndex::FromInt(data->Int32Value())) {
+ case V8ClassIndex::DOMWINDOW: {
+ v8::Handle<v8::Object> window = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::DOMWINDOW, host);
+ if (window.IsEmpty())
+ return target;
+
+ DOMWindow* targetWindow = V8DOMWindow::toNative(window);
+ target = targetWindow->frame();
+ break;
+ }
+ case V8ClassIndex::LOCATION: {
+ History* history = V8History::toNative(host);
+ target = history->frame();
+ break;
+ }
+ case V8ClassIndex::HISTORY: {
+ Location* location = V8Location::toNative(host);
+ target = location->frame();
+ break;
+ }
+ default:
+ break;
+ }
+ return target;
+}
+
+static void reportUnsafeJavaScriptAccess(v8::Local<v8::Object> host, v8::AccessType type, v8::Local<v8::Value> data)
+{
+ Frame* target = getTargetFrame(host, data);
+ if (target)
+ V8Proxy::reportUnsafeAccessTo(target, V8Proxy::ReportLater);
+}
+
+PassRefPtr<V8DOMWindowShell> V8DOMWindowShell::create(Frame* frame)
+{
+ return adoptRef(new V8DOMWindowShell(frame));
+}
+
+V8DOMWindowShell::V8DOMWindowShell(Frame* frame)
+ : m_frame(frame)
+{
+}
+
+bool V8DOMWindowShell::isContextInitialized()
+{
+ // m_context, m_global, and m_wrapperBoilerplates should
+ // all be non-empty if if m_context is non-empty.
+ ASSERT(m_context.IsEmpty() || !m_global.IsEmpty());
+ ASSERT(m_context.IsEmpty() || !m_wrapperBoilerplates.IsEmpty());
+ return !m_context.IsEmpty();
+}
+
+void V8DOMWindowShell::disposeContextHandles()
+{
+ if (!m_context.IsEmpty()) {
+ m_frame->loader()->client()->didDestroyScriptContextForFrame();
+ m_context.Dispose();
+ m_context.Clear();
+ }
+
+ if (!m_wrapperBoilerplates.IsEmpty()) {
+#ifndef NDEBUG
+ V8GCController::unregisterGlobalHandle(this, m_wrapperBoilerplates);
+#endif
+ m_wrapperBoilerplates.Dispose();
+ m_wrapperBoilerplates.Clear();
+ }
+}
+
+void V8DOMWindowShell::destroyGlobal()
+{
+ if (!m_global.IsEmpty()) {
+#ifndef NDEBUG
+ V8GCController::unregisterGlobalHandle(this, m_global);
+#endif
+ m_global.Dispose();
+ m_global.Clear();
+ }
+}
+
+void V8DOMWindowShell::clearForClose()
+{
+ if (!m_context.IsEmpty()) {
+ v8::HandleScope handleScope;
+
+ clearDocumentWrapper();
+ disposeContextHandles();
+ }
+}
+
+void V8DOMWindowShell::clearForNavigation()
+{
+ if (!m_context.IsEmpty()) {
+ v8::HandleScope handle;
+ clearDocumentWrapper();
+
+ v8::Context::Scope contextScope(m_context);
+
+ // Clear the document wrapper cache before turning on access checks on
+ // the old DOMWindow wrapper. This way, access to the document wrapper
+ // will be protected by the security checks on the DOMWindow wrapper.
+ clearDocumentWrapperCache();
+
+ // Turn on access check on the old DOMWindow wrapper.
+ v8::Handle<v8::Object> wrapper = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::DOMWINDOW, m_global);
+ ASSERT(!wrapper.IsEmpty());
+ wrapper->TurnOnAccessCheck();
+
+ // Separate the context from its global object.
+ m_context->DetachGlobal();
+
+ disposeContextHandles();
+ }
+}
+
+// Create a new environment and setup the global object.
+//
+// The global object corresponds to a DOMWindow instance. However, to
+// allow properties of the JS DOMWindow instance to be shadowed, we
+// use a shadow object as the global object and use the JS DOMWindow
+// instance as the prototype for that shadow object. The JS DOMWindow
+// instance is undetectable from javascript code because the __proto__
+// accessors skip that object.
+//
+// The shadow object and the DOMWindow instance are seen as one object
+// from javascript. The javascript object that corresponds to a
+// DOMWindow instance is the shadow object. When mapping a DOMWindow
+// instance to a V8 object, we return the shadow object.
+//
+// To implement split-window, see
+// 1) https://bugs.webkit.org/show_bug.cgi?id=17249
+// 2) https://wiki.mozilla.org/Gecko:SplitWindow
+// 3) https://bugzilla.mozilla.org/show_bug.cgi?id=296639
+// we need to split the shadow object further into two objects:
+// an outer window and an inner window. The inner window is the hidden
+// prototype of the outer window. The inner window is the default
+// global object of the context. A variable declared in the global
+// scope is a property of the inner window.
+//
+// The outer window sticks to a Frame, it is exposed to JavaScript
+// via window.window, window.self, window.parent, etc. The outer window
+// has a security token which is the domain. The outer window cannot
+// have its own properties. window.foo = 'x' is delegated to the
+// inner window.
+//
+// When a frame navigates to a new page, the inner window is cut off
+// the outer window, and the outer window identify is preserved for
+// the frame. However, a new inner window is created for the new page.
+// If there are JS code holds a closure to the old inner window,
+// it won't be able to reach the outer window via its global object.
+void V8DOMWindowShell::initContextIfNeeded()
+{
+ // Bail out if the context has already been initialized.
+ if (!m_context.IsEmpty())
+ return;
+
+ // Create a handle scope for all local handles.
+ v8::HandleScope handleScope;
+
+ // Setup the security handlers and message listener. This only has
+ // to be done once.
+ static bool isV8Initialized = false;
+ if (!isV8Initialized) {
+ // Tells V8 not to call the default OOM handler, binding code
+ // will handle it.
+ v8::V8::IgnoreOutOfMemoryException();
+ v8::V8::SetFatalErrorHandler(reportFatalErrorInV8);
+
+ v8::V8::SetGlobalGCPrologueCallback(&V8GCController::gcPrologue);
+ v8::V8::SetGlobalGCEpilogueCallback(&V8GCController::gcEpilogue);
+
+ v8::V8::AddMessageListener(&V8ConsoleMessage::handler);
+
+ v8::V8::SetFailedAccessCheckCallbackFunction(reportUnsafeJavaScriptAccess);
+
+ isV8Initialized = true;
+ }
+
+
+ m_context = createNewContext(m_global, 0);
+ if (m_context.IsEmpty())
+ return;
+
+ v8::Local<v8::Context> v8Context = v8::Local<v8::Context>::New(m_context);
+ v8::Context::Scope contextScope(v8Context);
+
+ // Store the first global object created so we can reuse it.
+ if (m_global.IsEmpty()) {
+ m_global = v8::Persistent<v8::Object>::New(v8Context->Global());
+ // Bail out if allocation of the first global objects fails.
+ if (m_global.IsEmpty()) {
+ disposeContextHandles();
+ return;
+ }
+#ifndef NDEBUG
+ V8GCController::registerGlobalHandle(PROXY, this, m_global);
+#endif
+ }
+
+ installHiddenObjectPrototype(v8Context);
+ m_wrapperBoilerplates = v8::Persistent<v8::Array>::New(v8::Array::New(V8ClassIndex::WRAPPER_TYPE_COUNT));
+ // Bail out if allocation failed.
+ if (m_wrapperBoilerplates.IsEmpty()) {
+ disposeContextHandles();
+ return;
+ }
+#ifndef NDEBUG
+ V8GCController::registerGlobalHandle(PROXY, this, m_wrapperBoilerplates);
+#endif
+
+ if (!installDOMWindow(v8Context, m_frame->domWindow()))
+ disposeContextHandles();
+
+ updateDocument();
+
+ setSecurityToken();
+
+ m_frame->loader()->client()->didCreateScriptContextForFrame();
+
+ // FIXME: This is wrong. We should actually do this for the proper world once
+ // we do isolated worlds the WebCore way.
+ m_frame->loader()->dispatchDidClearWindowObjectInWorld(0);
+}
+
+v8::Persistent<v8::Context> V8DOMWindowShell::createNewContext(v8::Handle<v8::Object> global, int extensionGroup)
+{
+ v8::Persistent<v8::Context> result;
+
+ // The activeDocumentLoader pointer could be 0 during frame shutdown.
+ if (!m_frame->loader()->activeDocumentLoader())
+ return result;
+
+ // Create a new environment using an empty template for the shadow
+ // object. Reuse the global object if one has been created earlier.
+ v8::Persistent<v8::ObjectTemplate> globalTemplate = V8DOMWindow::GetShadowObjectTemplate();
+ if (globalTemplate.IsEmpty())
+ return result;
+
+ // Used to avoid sleep calls in unload handlers.
+ if (!V8Proxy::registeredExtensionWithV8(DateExtension::get()))
+ V8Proxy::registerExtension(DateExtension::get(), String());
+
+ // Dynamically tell v8 about our extensions now.
+ const V8Extensions& extensions = V8Proxy::extensions();
+ OwnArrayPtr<const char*> extensionNames(new const char*[extensions.size()]);
+ int index = 0;
+ for (size_t i = 0; i < extensions.size(); ++i) {
+ if (extensions[i].group && extensions[i].group != extensionGroup)
+ continue;
+
+ // Note: we check the loader URL here instead of the document URL
+ // because we might be currently loading an URL into a blank page.
+ // See http://code.google.com/p/chromium/issues/detail?id=10924
+ if (extensions[i].scheme.length() > 0 && (extensions[i].scheme != m_frame->loader()->activeDocumentLoader()->url().protocol() || extensions[i].scheme != m_frame->page()->mainFrame()->loader()->activeDocumentLoader()->url().protocol()))
+ continue;
+
+ extensionNames[index++] = extensions[i].extension->name();
+ }
+ v8::ExtensionConfiguration extensionConfiguration(index, extensionNames.get());
+ result = v8::Context::New(&extensionConfiguration, globalTemplate, global);
+
+ return result;
+}
+
+bool V8DOMWindowShell::installDOMWindow(v8::Handle<v8::Context> context, DOMWindow* window)
+{
+ v8::Handle<v8::String> implicitProtoString = v8::String::New("__proto__");
+ if (implicitProtoString.IsEmpty())
+ return false;
+
+ // Create a new JS window object and use it as the prototype for the shadow global object.
+ v8::Handle<v8::Function> windowConstructor = V8DOMWrapper::getConstructor(V8ClassIndex::DOMWINDOW, getHiddenObjectPrototype(context));
+ v8::Local<v8::Object> jsWindow = SafeAllocation::newInstance(windowConstructor);
+ // Bail out if allocation failed.
+ if (jsWindow.IsEmpty())
+ return false;
+
+ // Wrap the window.
+ V8DOMWrapper::setDOMWrapper(jsWindow, V8ClassIndex::ToInt(V8ClassIndex::DOMWINDOW), window);
+ V8DOMWrapper::setDOMWrapper(v8::Handle<v8::Object>::Cast(jsWindow->GetPrototype()), V8ClassIndex::ToInt(V8ClassIndex::DOMWINDOW), window);
+
+ window->ref();
+ V8DOMWrapper::setJSWrapperForDOMObject(window, v8::Persistent<v8::Object>::New(jsWindow));
+
+ // Insert the window instance as the prototype of the shadow object.
+ v8::Handle<v8::Object> v8Global = context->Global();
+ V8DOMWrapper::setDOMWrapper(v8::Handle<v8::Object>::Cast(v8Global->GetPrototype()), V8ClassIndex::ToInt(V8ClassIndex::DOMWINDOW), window);
+ v8Global->Set(implicitProtoString, jsWindow);
+ return true;
+}
+
+void V8DOMWindowShell::updateDocumentWrapper(v8::Handle<v8::Value> wrapper)
+{
+ clearDocumentWrapper();
+
+ ASSERT(m_document.IsEmpty());
+ m_document = v8::Persistent<v8::Value>::New(wrapper);
+#ifndef NDEBUG
+ V8GCController::registerGlobalHandle(PROXY, this, m_document);
+#endif
+}
+
+void V8DOMWindowShell::clearDocumentWrapper()
+{
+ if (!m_document.IsEmpty()) {
+#ifndef NDEBUG
+ V8GCController::unregisterGlobalHandle(this, m_document);
+#endif
+ m_document.Dispose();
+ m_document.Clear();
+ }
+}
+
+void V8DOMWindowShell::updateDocumentWrapperCache()
+{
+ v8::HandleScope handleScope;
+ v8::Context::Scope contextScope(m_context);
+
+ // If the document has no frame, NodeToV8Object might get the
+ // document wrapper for a document that is about to be deleted.
+ // If the ForceSet below causes a garbage collection, the document
+ // might get deleted and the global handle for the document
+ // wrapper cleared. Using the cleared global handle will lead to
+ // crashes. In this case we clear the cache and let the DOMWindow
+ // accessor handle access to the document.
+ if (!m_frame->document()->frame()) {
+ clearDocumentWrapperCache();
+ return;
+ }
+
+ v8::Handle<v8::Value> documentWrapper = V8DOMWrapper::convertNodeToV8Object(m_frame->document());
+
+ // If instantiation of the document wrapper fails, clear the cache
+ // and let the DOMWindow accessor handle access to the document.
+ if (documentWrapper.IsEmpty()) {
+ clearDocumentWrapperCache();
+ return;
+ }
+ m_context->Global()->ForceSet(v8::String::New("document"), documentWrapper, static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete));
+}
+
+void V8DOMWindowShell::clearDocumentWrapperCache()
+{
+ ASSERT(!m_context.IsEmpty());
+ m_context->Global()->ForceDelete(v8::String::New("document"));
+}
+
+void V8DOMWindowShell::setSecurityToken()
+{
+ Document* document = m_frame->document();
+ // Setup security origin and security token.
+ if (!document) {
+ m_context->UseDefaultSecurityToken();
+ return;
+ }
+
+ // Ask the document's SecurityOrigin to generate a security token.
+ // If two tokens are equal, then the SecurityOrigins canAccess each other.
+ // If two tokens are not equal, then we have to call canAccess.
+ // Note: we can't use the HTTPOrigin if it was set from the DOM.
+ SecurityOrigin* origin = document->securityOrigin();
+ String token;
+ if (!origin->domainWasSetInDOM())
+ token = document->securityOrigin()->toString();
+
+ // An empty or "null" token means we always have to call
+ // canAccess. The toString method on securityOrigins returns the
+ // string "null" for empty security origins and for security
+ // origins that should only allow access to themselves. In this
+ // case, we use the global object as the security token to avoid
+ // calling canAccess when a script accesses its own objects.
+ if (token.isEmpty() || token == "null") {
+ m_context->UseDefaultSecurityToken();
+ return;
+ }
+
+ CString utf8Token = token.utf8();
+ // NOTE: V8 does identity comparison in fast path, must use a symbol
+ // as the security token.
+ m_context->SetSecurityToken(v8::String::NewSymbol(utf8Token.data(), utf8Token.length()));
+}
+
+void V8DOMWindowShell::updateDocument()
+{
+ if (!m_frame->document())
+ return;
+
+ if (m_global.IsEmpty())
+ return;
+
+ // There is an existing JavaScript wrapper for the global object
+ // of this frame. JavaScript code in other frames might hold a
+ // reference to this wrapper. We eagerly initialize the JavaScript
+ // context for the new document to make property access on the
+ // global object wrapper succeed.
+ initContextIfNeeded();
+
+ // Bail out if context initialization failed.
+ if (m_context.IsEmpty())
+ return;
+
+ // We have a new document and we need to update the cache.
+ updateDocumentWrapperCache();
+
+ updateSecurityOrigin();
+}
+
+void V8DOMWindowShell::updateSecurityOrigin()
+{
+ v8::HandleScope scope;
+ setSecurityToken();
+}
+
+v8::Handle<v8::Value> V8DOMWindowShell::getHiddenObjectPrototype(v8::Handle<v8::Context> context)
+{
+ return context->Global()->GetHiddenValue(V8HiddenPropertyName::objectPrototype());
+}
+
+void V8DOMWindowShell::installHiddenObjectPrototype(v8::Handle<v8::Context> context)
+{
+ v8::Handle<v8::String> objectString = v8::String::New("Object");
+ v8::Handle<v8::String> prototypeString = v8::String::New("prototype");
+ v8::Handle<v8::String> hiddenObjectPrototypeString = V8HiddenPropertyName::objectPrototype();
+ // Bail out if allocation failed.
+ if (objectString.IsEmpty() || prototypeString.IsEmpty() || hiddenObjectPrototypeString.IsEmpty())
+ return;
+
+ v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(context->Global()->Get(objectString));
+ v8::Handle<v8::Value> objectPrototype = object->Get(prototypeString);
+
+ context->Global()->SetHiddenValue(hiddenObjectPrototypeString, objectPrototype);
+}
+
+v8::Local<v8::Object> V8DOMWindowShell::createWrapperFromCacheSlowCase(V8ClassIndex::V8WrapperType type)
+{
+ // Not in cache.
+ int classIndex = V8ClassIndex::ToInt(type);
+ initContextIfNeeded();
+ v8::Context::Scope scope(m_context);
+ v8::Local<v8::Function> function = V8DOMWrapper::getConstructor(type, getHiddenObjectPrototype(m_context));
+ v8::Local<v8::Object> instance = SafeAllocation::newInstance(function);
+ if (!instance.IsEmpty()) {
+ m_wrapperBoilerplates->Set(v8::Integer::New(classIndex), instance);
+ return instance->Clone();
+ }
+ return notHandledByInterceptor();
+}
+
+void V8DOMWindowShell::setLocation(DOMWindow* window, const String& relativeURL)
+{
+ Frame* frame = window->frame();
+ if (!frame)
+ return;
+
+ KURL url = completeURL(relativeURL);
+ if (url.isNull())
+ return;
+
+ if (!shouldAllowNavigation(frame))
+ return;
+
+ navigateIfAllowed(frame, url, false, false);
+}
+
+} // WebCore
diff --git a/WebCore/bindings/v8/V8DOMWindowShell.h b/WebCore/bindings/v8/V8DOMWindowShell.h
new file mode 100644
index 0000000..29dd517
--- /dev/null
+++ b/WebCore/bindings/v8/V8DOMWindowShell.h
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef V8DOMWindowShell_h
+#define V8DOMWindowShell_h
+
+#include "V8CustomBinding.h"
+#include "V8Index.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+class DOMWindow;
+class Frame;
+class String;
+
+// V8WindowShell represents all the per-global object state for a Frame that
+// persist between navigations.
+class V8DOMWindowShell : public RefCounted<V8DOMWindowShell> {
+public:
+ static PassRefPtr<V8DOMWindowShell> create(Frame*);
+
+ v8::Handle<v8::Context> context() const { return m_context; }
+
+ // Update document object of the frame.
+ void updateDocument();
+
+ // Update the security origin of a document
+ // (e.g., after setting docoument.domain).
+ void updateSecurityOrigin();
+
+ bool isContextInitialized();
+
+ v8::Persistent<v8::Context> createNewContext(v8::Handle<v8::Object> global, int extensionGroup);
+ static bool installDOMWindow(v8::Handle<v8::Context> context, DOMWindow*);
+
+ void initContextIfNeeded();
+ void updateDocumentWrapper(v8::Handle<v8::Value> wrapper);
+
+ void clearForNavigation();
+ void clearForClose();
+
+ void destroyGlobal();
+
+ static v8::Handle<v8::Value> getHiddenObjectPrototype(v8::Handle<v8::Context>);
+ // WARNING: Call |installHiddenObjectPrototype| only on fresh contexts!
+ static void installHiddenObjectPrototype(v8::Handle<v8::Context>);
+
+ // To create JS Wrapper objects, we create a cache of a 'boiler plate'
+ // object, and then simply Clone that object each time we need a new one.
+ // This is faster than going through the full object creation process.
+ v8::Local<v8::Object> createWrapperFromCache(V8ClassIndex::V8WrapperType type)
+ {
+ int classIndex = V8ClassIndex::ToInt(type);
+ v8::Local<v8::Object> clone(m_wrapperBoilerplates->CloneElementAt(classIndex));
+ return clone.IsEmpty() ? createWrapperFromCacheSlowCase(type) : clone;
+ }
+
+ static void setLocation(DOMWindow*, const String& relativeURL);
+
+private:
+ V8DOMWindowShell(Frame*);
+
+ void disposeContextHandles();
+
+ void setSecurityToken();
+ void clearDocumentWrapper();
+
+ // The JavaScript wrapper for the document object is cached on the global
+ // object for fast access. UpdateDocumentWrapperCache sets the wrapper
+ // for the current document on the global object. ClearDocumentWrapperCache
+ // deletes the document wrapper from the global object.
+ void updateDocumentWrapperCache();
+ void clearDocumentWrapperCache();
+
+ v8::Local<v8::Object> createWrapperFromCacheSlowCase(V8ClassIndex::V8WrapperType);
+
+ Frame* m_frame;
+
+ // For each possible type of wrapper, we keep a boilerplate object.
+ // The boilerplate is used to create additional wrappers of the same
+ // type. We keep a single persistent handle to an array of the
+ // activated boilerplates.
+ v8::Persistent<v8::Array> m_wrapperBoilerplates;
+
+ v8::Persistent<v8::Context> m_context;
+ v8::Persistent<v8::Object> m_global;
+ v8::Persistent<v8::Value> m_document;
+};
+
+} // namespace WebCore
+
+#endif // V8DOMWindowShell_h
diff --git a/WebCore/bindings/v8/V8DOMWrapper.cpp b/WebCore/bindings/v8/V8DOMWrapper.cpp
index 28b316a..da50af6 100644
--- a/WebCore/bindings/v8/V8DOMWrapper.cpp
+++ b/WebCore/bindings/v8/V8DOMWrapper.cpp
@@ -32,11 +32,16 @@
#include "V8DOMWrapper.h"
#include "CSSMutableStyleDeclaration.h"
+<<<<<<< HEAD
+=======
+#include "DOMDataStore.h"
+>>>>>>> webkit.org at r54127
#include "DOMObjectsInclude.h"
#include "DocumentLoader.h"
#include "FrameLoaderClient.h"
#include "Notification.h"
#include "SVGElementInstance.h"
+#include "SVGPathSeg.h"
#include "ScriptController.h"
#include "V8AbstractEventListener.h"
#include "V8Binding.h"
@@ -46,10 +51,18 @@
#include "V8DOMMap.h"
#include "V8DOMWindow.h"
#include "V8EventListenerList.h"
+#include "V8HTMLCollection.h"
+#include "V8HTMLDocument.h"
#include "V8Index.h"
-#include "V8IsolatedWorld.h"
+#include "V8IsolatedContext.h"
+#include "V8MessageChannel.h"
+#include "V8Location.h"
+#include "V8NamedNodeMap.h"
+#include "V8NodeList.h"
#include "V8Proxy.h"
+#include "V8StyleSheet.h"
#include "WebGLArray.h"
+#include "WebGLContextAttributes.h"
#include "WebGLUniformLocation.h"
#include "WorkerContextExecutionProxy.h"
@@ -67,32 +80,36 @@ namespace WebCore {
typedef HashMap<Node*, v8::Object*> DOMNodeMap;
typedef HashMap<void*, v8::Object*> DOMObjectMap;
-// Get the string 'toString'.
-static v8::Persistent<v8::String> GetToStringName()
-{
- DEFINE_STATIC_LOCAL(v8::Persistent<v8::String>, value, ());
- if (value.IsEmpty())
- value = v8::Persistent<v8::String>::New(v8::String::New("toString"));
- return value;
-}
+#if ENABLE(SVG)
-static v8::Handle<v8::Value> ConstructorToString(const v8::Arguments& args)
+static V8ClassIndex::V8WrapperType downcastSVGPathSeg(void* pathSeg)
{
- // The DOM constructors' toString functions grab the current toString
- // for Functions by taking the toString function of itself and then
- // calling it with the constructor as its receiver. This means that
- // changes to the Function prototype chain or toString function are
- // reflected when printing DOM constructors. The only wart is that
- // changes to a DOM constructor's toString's toString will cause the
- // toString of the DOM constructor itself to change. This is extremely
- // obscure and unlikely to be a problem.
- v8::Handle<v8::Value> value = args.Callee()->Get(GetToStringName());
- if (!value->IsFunction())
- return v8::String::New("");
- return v8::Handle<v8::Function>::Cast(value)->Call(args.This(), 0, 0);
+ SVGPathSeg* realPathSeg = reinterpret_cast<SVGPathSeg*>(pathSeg);
+
+ switch (realPathSeg->pathSegType()) {
+ case SVGPathSeg::PATHSEG_CLOSEPATH: return V8ClassIndex::SVGPATHSEGCLOSEPATH;
+ case SVGPathSeg::PATHSEG_MOVETO_ABS: return V8ClassIndex::SVGPATHSEGMOVETOABS;
+ case SVGPathSeg::PATHSEG_MOVETO_REL: return V8ClassIndex::SVGPATHSEGMOVETOREL;
+ case SVGPathSeg::PATHSEG_LINETO_ABS: return V8ClassIndex::SVGPATHSEGLINETOABS;
+ case SVGPathSeg::PATHSEG_LINETO_REL: return V8ClassIndex::SVGPATHSEGLINETOREL;
+ case SVGPathSeg::PATHSEG_CURVETO_CUBIC_ABS: return V8ClassIndex::SVGPATHSEGCURVETOCUBICABS;
+ case SVGPathSeg::PATHSEG_CURVETO_CUBIC_REL: return V8ClassIndex::SVGPATHSEGCURVETOCUBICREL;
+ case SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_ABS: return V8ClassIndex::SVGPATHSEGCURVETOQUADRATICABS;
+ case SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_REL: return V8ClassIndex::SVGPATHSEGCURVETOQUADRATICREL;
+ case SVGPathSeg::PATHSEG_ARC_ABS: return V8ClassIndex::SVGPATHSEGARCABS;
+ case SVGPathSeg::PATHSEG_ARC_REL: return V8ClassIndex::SVGPATHSEGARCREL;
+ case SVGPathSeg::PATHSEG_LINETO_HORIZONTAL_ABS: return V8ClassIndex::SVGPATHSEGLINETOHORIZONTALABS;
+ case SVGPathSeg::PATHSEG_LINETO_HORIZONTAL_REL: return V8ClassIndex::SVGPATHSEGLINETOHORIZONTALREL;
+ case SVGPathSeg::PATHSEG_LINETO_VERTICAL_ABS: return V8ClassIndex::SVGPATHSEGLINETOVERTICALABS;
+ case SVGPathSeg::PATHSEG_LINETO_VERTICAL_REL: return V8ClassIndex::SVGPATHSEGLINETOVERTICALREL;
+ case SVGPathSeg::PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: return V8ClassIndex::SVGPATHSEGCURVETOCUBICSMOOTHABS;
+ case SVGPathSeg::PATHSEG_CURVETO_CUBIC_SMOOTH_REL: return V8ClassIndex::SVGPATHSEGCURVETOCUBICSMOOTHREL;
+ case SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: return V8ClassIndex::SVGPATHSEGCURVETOQUADRATICSMOOTHABS;
+ case SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: return V8ClassIndex::SVGPATHSEGCURVETOQUADRATICSMOOTHREL;
+ default: return V8ClassIndex::INVALID_CLASS_INDEX;
+ }
}
-#if ENABLE(SVG)
v8::Handle<v8::Value> V8DOMWrapper::convertSVGElementInstanceToV8Object(SVGElementInstance* instance)
{
if (!instance)
@@ -124,7 +141,7 @@ v8::Handle<v8::Value> V8DOMWrapper::convertSVGObjectWithContextToV8Object(V8Clas
// Special case: SVGPathSegs need to be downcast to their real type
if (type == V8ClassIndex::SVGPATHSEG)
- type = V8Custom::DowncastSVGPathSeg(object);
+ type = downcastSVGPathSeg(object);
v8::Local<v8::Object> v8Object = instantiateV8Object(type, type, object);
if (!v8Object.IsEmpty()) {
@@ -148,7 +165,7 @@ v8::Handle<v8::Value> V8DOMWrapper::convertSVGObjectWithContextToV8Object(V8Clas
return result;
}
-#endif
+#endif // ENABLE(SVG)
#if ENABLE(3D_CANVAS)
void V8DOMWrapper::setIndexedPropertiesToExternalArray(v8::Handle<v8::Object> wrapper,
@@ -189,25 +206,6 @@ void V8DOMWrapper::setIndexedPropertiesToExternalArray(v8::Handle<v8::Object> wr
}
#endif
-bool V8DOMWrapper::domObjectHasJSWrapper(void* object)
-{
- return getDOMObjectMap().contains(object) || getActiveDOMObjectMap().contains(object);
-}
-
-v8::Persistent<v8::Object> V8DOMWrapper::jsWrapperForDOMObject(void* object)
-{
- v8::Persistent<v8::Object> wrapper = getDOMObjectMap().get(object);
- ASSERT(!wrapper.IsEmpty());
- return wrapper;
-}
-
-v8::Persistent<v8::Object> V8DOMWrapper::jsWrapperForActiveDOMObject(void* object)
-{
- v8::Persistent<v8::Object> wrapper = getActiveDOMObjectMap().get(object);
- ASSERT(!wrapper.IsEmpty());
- return wrapper;
-}
-
// The caller must have increased obj's ref count.
void V8DOMWrapper::setJSWrapperForDOMObject(void* object, v8::Persistent<v8::Object> wrapper)
{
@@ -259,6 +257,7 @@ v8::Persistent<v8::FunctionTemplate> V8DOMWrapper::getTemplate(V8ClassIndex::V8W
// Not in the cache.
FunctionTemplateFactory factory = V8ClassIndex::GetFactory(type);
v8::Persistent<v8::FunctionTemplate> descriptor = factory();
+<<<<<<< HEAD
// DOM constructors are functions and should print themselves as such.
// However, we will later replace their prototypes with Object
// prototypes so we need to explicitly override toString on the
@@ -618,6 +617,8 @@ v8::Persistent<v8::FunctionTemplate> V8DOMWrapper::getTemplate(V8ClassIndex::V8W
default:
break;
}
+=======
+>>>>>>> webkit.org at r54127
*cacheCell = descriptor;
return descriptor;
@@ -652,7 +653,7 @@ v8::Local<v8::Function> V8DOMWrapper::getConstructorForContext(V8ClassIndex::V8W
// Enter the scope for this context to get the correct constructor.
v8::Context::Scope scope(context);
- return getConstructor(type, V8Proxy::getHiddenObjectPrototype(context));
+ return getConstructor(type, V8DOMWindowShell::getHiddenObjectPrototype(context));
}
v8::Local<v8::Function> V8DOMWrapper::getConstructor(V8ClassIndex::V8WrapperType type, DOMWindow* window)
@@ -813,44 +814,44 @@ v8::Handle<v8::Value> V8DOMWrapper::convertToV8Object(V8ClassIndex::V8WrapperTyp
// reused by a new page.
switch (type) {
case V8ClassIndex::CONSOLE:
- setHiddenWindowReference(static_cast<Console*>(impl)->frame(), V8Custom::kDOMWindowConsoleIndex, result);
+ setHiddenWindowReference(static_cast<Console*>(impl)->frame(), V8DOMWindow::consoleIndex, result);
break;
case V8ClassIndex::HISTORY:
- setHiddenWindowReference(static_cast<History*>(impl)->frame(), V8Custom::kDOMWindowHistoryIndex, result);
+ setHiddenWindowReference(static_cast<History*>(impl)->frame(), V8DOMWindow::historyIndex, result);
break;
case V8ClassIndex::NAVIGATOR:
- setHiddenWindowReference(static_cast<Navigator*>(impl)->frame(), V8Custom::kDOMWindowNavigatorIndex, result);
+ setHiddenWindowReference(static_cast<Navigator*>(impl)->frame(), V8DOMWindow::navigatorIndex, result);
break;
case V8ClassIndex::SCREEN:
- setHiddenWindowReference(static_cast<Screen*>(impl)->frame(), V8Custom::kDOMWindowScreenIndex, result);
+ setHiddenWindowReference(static_cast<Screen*>(impl)->frame(), V8DOMWindow::screenIndex, result);
break;
case V8ClassIndex::LOCATION:
- setHiddenWindowReference(static_cast<Location*>(impl)->frame(), V8Custom::kDOMWindowLocationIndex, result);
+ setHiddenWindowReference(static_cast<Location*>(impl)->frame(), V8DOMWindow::locationIndex, result);
break;
case V8ClassIndex::DOMSELECTION:
- setHiddenWindowReference(static_cast<DOMSelection*>(impl)->frame(), V8Custom::kDOMWindowDOMSelectionIndex, result);
+ setHiddenWindowReference(static_cast<DOMSelection*>(impl)->frame(), V8DOMWindow::domSelectionIndex, result);
break;
case V8ClassIndex::BARINFO: {
BarInfo* barInfo = static_cast<BarInfo*>(impl);
Frame* frame = barInfo->frame();
switch (barInfo->type()) {
case BarInfo::Locationbar:
- setHiddenWindowReference(frame, V8Custom::kDOMWindowLocationbarIndex, result);
+ setHiddenWindowReference(frame, V8DOMWindow::locationbarIndex, result);
break;
case BarInfo::Menubar:
- setHiddenWindowReference(frame, V8Custom::kDOMWindowMenubarIndex, result);
+ setHiddenWindowReference(frame, V8DOMWindow::menubarIndex, result);
break;
case BarInfo::Personalbar:
- setHiddenWindowReference(frame, V8Custom::kDOMWindowPersonalbarIndex, result);
+ setHiddenWindowReference(frame, V8DOMWindow::personalbarIndex, result);
break;
case BarInfo::Scrollbars:
- setHiddenWindowReference(frame, V8Custom::kDOMWindowScrollbarsIndex, result);
+ setHiddenWindowReference(frame, V8DOMWindow::scrollbarsIndex, result);
break;
case BarInfo::Statusbar:
- setHiddenWindowReference(frame, V8Custom::kDOMWindowStatusbarIndex, result);
+ setHiddenWindowReference(frame, V8DOMWindow::statusbarIndex, result);
break;
case BarInfo::Toolbar:
- setHiddenWindowReference(frame, V8Custom::kDOMWindowToolbarIndex, result);
+ setHiddenWindowReference(frame, V8DOMWindow::toolbarIndex, result);
break;
}
break;
@@ -872,7 +873,7 @@ void V8DOMWrapper::setHiddenWindowReference(Frame* frame, const int internalInde
if (context.IsEmpty())
return;
- ASSERT(internalIndex < V8Custom::kDOMWindowInternalFieldCount);
+ ASSERT(internalIndex < V8DOMWindow::internalFieldCount);
v8::Handle<v8::Object> global = context->Global();
// Look for real DOM wrapper.
@@ -885,15 +886,10 @@ void V8DOMWrapper::setHiddenWindowReference(Frame* frame, const int internalInde
V8ClassIndex::V8WrapperType V8DOMWrapper::domWrapperType(v8::Handle<v8::Object> object)
{
ASSERT(V8DOMWrapper::maybeDOMWrapper(object));
- v8::Handle<v8::Value> type = object->GetInternalField(V8Custom::kDOMWrapperTypeIndex);
+ v8::Handle<v8::Value> type = object->GetInternalField(v8DOMWrapperTypeIndex);
return V8ClassIndex::FromInt(type->Int32Value());
}
-void* V8DOMWrapper::convertToSVGPODTypeImpl(V8ClassIndex::V8WrapperType type, v8::Handle<v8::Value> object)
-{
- return isWrapperOfType(object, type) ? convertDOMWrapperToNative<void>(v8::Handle<v8::Object>::Cast(object)) : 0;
-}
-
PassRefPtr<NodeFilter> V8DOMWrapper::wrapNativeNodeFilter(v8::Handle<v8::Value> filter)
{
// A NodeFilter is used when walking through a DOM tree or iterating tree
@@ -917,17 +913,19 @@ v8::Local<v8::Object> V8DOMWrapper::instantiateV8Object(V8Proxy* proxy, V8ClassI
if (descriptorType == V8ClassIndex::HTMLCOLLECTION && static_cast<HTMLCollection*>(impl)->type() == DocAll)
descriptorType = V8ClassIndex::HTMLALLCOLLECTION;
- if (V8IsolatedWorld::getEntered()) {
+ if (V8IsolatedContext::getEntered()) {
// This effectively disables the wrapper cache for isolated worlds.
proxy = 0;
// FIXME: Do we need a wrapper cache for the isolated world? We should
- // see if the performance gains are worth while.
+ // see if the performance gains are worth while.
+ // We'll get one once we give the isolated context a proper window shell.
} else if (!proxy)
proxy = V8Proxy::retrieve();
v8::Local<v8::Object> instance;
if (proxy)
- instance = proxy->createWrapperFromCache(descriptorType);
+ // FIXME: Fix this to work properly with isolated worlds (see above).
+ instance = proxy->windowShell()->createWrapperFromCache(descriptorType);
else {
v8::Local<v8::Function> function = getTemplate(descriptorType)->GetFunction();
instance = SafeAllocation::newInstance(function);
@@ -949,13 +947,13 @@ bool V8DOMWrapper::maybeDOMWrapper(v8::Handle<v8::Value> value)
if (!object->InternalFieldCount())
return false;
- ASSERT(object->InternalFieldCount() >= V8Custom::kDefaultWrapperInternalFieldCount);
+ ASSERT(object->InternalFieldCount() >= v8DefaultWrapperInternalFieldCount);
- v8::Handle<v8::Value> type = object->GetInternalField(V8Custom::kDOMWrapperTypeIndex);
+ v8::Handle<v8::Value> type = object->GetInternalField(v8DOMWrapperTypeIndex);
ASSERT(type->IsInt32());
ASSERT(V8ClassIndex::INVALID_CLASS_INDEX < type->Int32Value() && type->Int32Value() < V8ClassIndex::CLASSINDEX_END);
- v8::Handle<v8::Value> wrapper = object->GetInternalField(V8Custom::kDOMWrapperObjectIndex);
+ v8::Handle<v8::Value> wrapper = object->GetInternalField(v8DOMWrapperObjectIndex);
ASSERT(wrapper->IsNumber() || wrapper->IsExternal());
return true;
@@ -978,12 +976,12 @@ bool V8DOMWrapper::isWrapperOfType(v8::Handle<v8::Value> value, V8ClassIndex::V8
if (!object->InternalFieldCount())
return false;
- ASSERT(object->InternalFieldCount() >= V8Custom::kDefaultWrapperInternalFieldCount);
+ ASSERT(object->InternalFieldCount() >= v8DefaultWrapperInternalFieldCount);
- v8::Handle<v8::Value> wrapper = object->GetInternalField(V8Custom::kDOMWrapperObjectIndex);
+ v8::Handle<v8::Value> wrapper = object->GetInternalField(v8DOMWrapperObjectIndex);
ASSERT(wrapper->IsNumber() || wrapper->IsExternal());
- v8::Handle<v8::Value> type = object->GetInternalField(V8Custom::kDOMWrapperTypeIndex);
+ v8::Handle<v8::Value> type = object->GetInternalField(v8DOMWrapperTypeIndex);
ASSERT(type->IsInt32());
ASSERT(V8ClassIndex::INVALID_CLASS_INDEX < type->Int32Value() && type->Int32Value() < V8ClassIndex::CLASSINDEX_END);
@@ -1135,6 +1133,7 @@ V8ClassIndex::V8WrapperType V8DOMWrapper::htmlElementType(HTMLElement* element)
macro(feImage, FEIMAGE) \
macro(feMerge, FEMERGE) \
macro(feMergeNode, FEMERGENODE) \
+ macro(feMorphology, FEMORPHOLOGY) \
macro(feOffset, FEOFFSET) \
macro(fePointLight, FEPOINTLIGHT) \
macro(feSpecularLighting, FESPECULARLIGHTING) \
@@ -1274,6 +1273,8 @@ v8::Handle<v8::Value> V8DOMWrapper::convertEventToV8Object(Event* event)
type = V8ClassIndex::MESSAGEEVENT;
else if (event->isPageTransitionEvent())
type = V8ClassIndex::PAGETRANSITIONEVENT;
+ else if (event->isPopStateEvent())
+ type = V8ClassIndex::POPSTATEEVENT;
else if (event->isProgressEvent()) {
if (event->isXMLHttpRequestProgressEvent())
type = V8ClassIndex::XMLHTTPREQUESTPROGRESSEVENT;
@@ -1335,9 +1336,9 @@ v8::Handle<v8::Value> V8DOMWrapper::convertDocumentToV8Object(Document* document
// checking if the node already has a wrapper.
V8Proxy* proxy = V8Proxy::retrieve(document->frame());
if (proxy)
- proxy->initContextIfNeeded();
+ proxy->windowShell()->initContextIfNeeded();
- DOMWrapperMap<Node>& domNodeMap = getDOMNodeMap();
+ DOMNodeMapping& domNodeMap = getDOMNodeMap();
v8::Handle<v8::Object> wrapper = domNodeMap.get(document);
if (wrapper.IsEmpty())
return convertNewNodeToV8Object(document, proxy, domNodeMap);
@@ -1345,25 +1346,39 @@ v8::Handle<v8::Value> V8DOMWrapper::convertDocumentToV8Object(Document* document
return wrapper;
}
+static v8::Handle<v8::Value> getWrapper(Node* node)
+{
+ ASSERT(WTF::isMainThread());
+ V8IsolatedContext* context = V8IsolatedContext::getEntered();
+ if (LIKELY(!context)) {
+ v8::Persistent<v8::Object>* wrapper = node->wrapper();
+ if (!wrapper)
+ return v8::Handle<v8::Value>();
+ return *wrapper;
+ }
+
+ DOMNodeMapping& domNodeMap = context->world()->domDataStore()->domNodeMap();
+ return domNodeMap.get(node);
+}
+
v8::Handle<v8::Value> V8DOMWrapper::convertNodeToV8Object(Node* node)
{
if (!node)
return v8::Null();
+ v8::Handle<v8::Value> wrapper = getWrapper(node);
+ if (!wrapper.IsEmpty())
+ return wrapper;
+
Document* document = node->document();
if (node == document)
return convertDocumentToV8Object(document);
-
- DOMWrapperMap<Node>& domNodeMap = getDOMNodeMap();
- v8::Handle<v8::Object> wrapper = domNodeMap.get(node);
- if (wrapper.IsEmpty())
- return convertNewNodeToV8Object(node, 0, domNodeMap);
-
- return wrapper;
+
+ return convertNewNodeToV8Object(node, 0, getDOMNodeMap());
}
// Caller checks node is not null.
-v8::Handle<v8::Value> V8DOMWrapper::convertNewNodeToV8Object(Node* node, V8Proxy* proxy, DOMWrapperMap<Node>& domNodeMap)
+v8::Handle<v8::Value> V8DOMWrapper::convertNewNodeToV8Object(Node* node, V8Proxy* proxy, DOMNodeMapping& domNodeMap)
{
if (!proxy && node->document())
proxy = V8Proxy::retrieve(node->document()->frame());
@@ -1425,16 +1440,16 @@ v8::Handle<v8::Value> V8DOMWrapper::convertNewNodeToV8Object(Node* node, V8Proxy
if (isDocument) {
if (proxy)
- proxy->updateDocumentWrapper(result);
+ proxy->windowShell()->updateDocumentWrapper(result);
if (type == V8ClassIndex::HTMLDOCUMENT) {
// Create marker object and insert it in two internal fields.
// This is used to implement temporary shadowing of
// document.all.
- ASSERT(result->InternalFieldCount() == V8Custom::kHTMLDocumentInternalFieldCount);
+ ASSERT(result->InternalFieldCount() == V8HTMLDocument::internalFieldCount);
v8::Local<v8::Object> marker = v8::Object::New();
- result->SetInternalField(V8Custom::kHTMLDocumentMarkerIndex, marker);
- result->SetInternalField(V8Custom::kHTMLDocumentShadowIndex, marker);
+ result->SetInternalField(V8HTMLDocument::markerIndex, marker);
+ result->SetInternalField(V8HTMLDocument::shadowIndex, marker);
}
}
@@ -1514,6 +1529,12 @@ v8::Handle<v8::Value> V8DOMWrapper::convertEventTargetToV8Object(EventTarget* ta
return convertToV8Object(V8ClassIndex::DOMAPPLICATIONCACHE, domAppCache);
#endif
+#if ENABLE(EVENTSOURCE)
+ EventSource* eventSource = target->toEventSource();
+ if (eventSource)
+ return convertToV8Object(V8ClassIndex::EVENTSOURCE, eventSource);
+#endif
+
ASSERT(0);
return notHandledByInterceptor();
}
@@ -1578,6 +1599,22 @@ PassRefPtr<EventListener> V8DOMWrapper::getEventListener(XMLHttpRequestUpload* u
return getEventListener(upload->associatedXMLHttpRequest(), value, isAttribute, lookup);
}
+#if ENABLE(EVENTSOURCE)
+PassRefPtr<EventListener> V8DOMWrapper::getEventListener(EventSource* eventSource, v8::Local<v8::Value> value, bool isAttribute, ListenerLookupType lookup)
+{
+ if (V8Proxy::retrieve(eventSource->scriptExecutionContext()))
+ return (lookup == ListenerFindOnly) ? V8EventListenerList::findWrapper(value, isAttribute) : V8EventListenerList::findOrCreateWrapper<V8EventListener>(value, isAttribute);
+
+#if ENABLE(WORKERS)
+ WorkerContextExecutionProxy* workerContextProxy = WorkerContextExecutionProxy::retrieve();
+ if (workerContextProxy)
+ return workerContextProxy->findOrCreateEventListener(value, isAttribute, lookup == ListenerFindOnly);
+#endif
+
+ return 0;
+}
+#endif
+
PassRefPtr<EventListener> V8DOMWrapper::getEventListener(EventTarget* eventTarget, v8::Local<v8::Value> value, bool isAttribute, ListenerLookupType lookup)
{
if (V8Proxy::retrieve(eventTarget->scriptExecutionContext()))
@@ -1632,7 +1669,7 @@ v8::Handle<v8::Value> V8DOMWrapper::convertStyleSheetToV8Object(StyleSheet* shee
Node* ownerNode = sheet->ownerNode();
if (ownerNode) {
v8::Handle<v8::Object> owner = v8::Handle<v8::Object>::Cast(convertNodeToV8Object(ownerNode));
- result->SetInternalField(V8Custom::kStyleSheetOwnerNodeIndex, owner);
+ result->SetInternalField(V8StyleSheet::ownerNodeIndex, owner);
}
return result;
@@ -1737,7 +1774,7 @@ v8::Handle<v8::Value> V8DOMWrapper::convertWindowToV8Object(DOMWindow* window)
if (!frame)
return v8::Handle<v8::Object>();
- // Special case: Because of evaluateInNewContext() one DOMWindow can have
+ // Special case: Because of evaluateInIsolatedWorld() one DOMWindow can have
// multiple contexts and multiple global objects associated with it. When
// code running in one of those contexts accesses the window object, we
// want to return the global object associated with that context, not
@@ -1746,7 +1783,7 @@ v8::Handle<v8::Value> V8DOMWrapper::convertWindowToV8Object(DOMWindow* window)
v8::Handle<v8::Object> currentGlobal = currentContext->Global();
v8::Handle<v8::Object> windowWrapper = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::DOMWINDOW, currentGlobal);
if (!windowWrapper.IsEmpty()) {
- if (convertDOMWrapperToNative<DOMWindow>(windowWrapper) == window)
+ if (V8DOMWindow::toNative(windowWrapper) == window)
return currentGlobal;
}
@@ -1780,7 +1817,7 @@ v8::Handle<v8::Value> V8DOMWrapper::convertNamedNodeMapToV8Object(NamedNodeMap*
// Add a hidden reference from named node map to its owner node.
if (Element* element = map->element()) {
v8::Handle<v8::Object> owner = v8::Handle<v8::Object>::Cast(convertNodeToV8Object(element));
- result->SetInternalField(V8Custom::kNamedNodeMapOwnerNodeIndex, owner);
+ result->SetInternalField(V8NamedNodeMap::ownerNodeIndex, owner);
}
return result;
diff --git a/WebCore/bindings/v8/V8DOMWrapper.h b/WebCore/bindings/v8/V8DOMWrapper.h
index b00915e..3cff691 100644
--- a/WebCore/bindings/v8/V8DOMWrapper.h
+++ b/WebCore/bindings/v8/V8DOMWrapper.h
@@ -39,6 +39,7 @@
#include "V8CustomBinding.h"
#include "V8CustomXPathNSResolver.h"
#include "V8DOMMap.h"
+#include "V8Event.h"
#include "V8Index.h"
#include "V8Utilities.h"
#include "V8XPathNSResolver.h"
@@ -91,6 +92,7 @@ namespace WebCore {
class StyleSheetList;
class V8EventListener;
class V8ObjectEventListener;
+ class V8Proxy;
#if ENABLE(WEB_SOCKETS)
class WebSocket;
#endif
@@ -112,8 +114,8 @@ namespace WebCore {
static void setDOMWrapper(v8::Handle<v8::Object> object, int type, void* cptr)
{
ASSERT(object->InternalFieldCount() >= 2);
- object->SetPointerInInternalField(V8Custom::kDOMWrapperObjectIndex, cptr);
- object->SetInternalField(V8Custom::kDOMWrapperTypeIndex, v8::Integer::New(type));
+ object->SetPointerInInternalField(v8DOMWrapperObjectIndex, cptr);
+ object->SetInternalField(v8DOMWrapperTypeIndex, v8::Integer::New(type));
}
static v8::Handle<v8::Object> lookupDOMWrapper(V8ClassIndex::V8WrapperType type, v8::Handle<v8::Object> object)
@@ -121,23 +123,6 @@ namespace WebCore {
return object.IsEmpty() ? object : object->FindInstanceInPrototypeChain(getTemplate(type));
}
- // A helper function extract native object pointer from a DOM wrapper
- // and cast to the specified type.
- template <class C>
- static C* convertDOMWrapperToNative(v8::Handle<v8::Object> object)
- {
- ASSERT(maybeDOMWrapper(object));
- return reinterpret_cast<C*>(object->GetPointerFromInternalField(V8Custom::kDOMWrapperObjectIndex));
- }
-
- template <class C>
- static C* convertDOMWrapperToNode(v8::Handle<v8::Object> object)
- {
- ASSERT(maybeDOMWrapper(object));
- ASSERT(domWrapperType(object) == V8ClassIndex::NODE);
- return convertDOMWrapperToNative<C>(object);
- }
-
template<typename T>
static v8::Handle<v8::Value> convertToV8Object(V8ClassIndex::V8WrapperType type, PassRefPtr<T> imp)
{
@@ -166,31 +151,7 @@ namespace WebCore {
return convertNewNodeToV8Object(node, 0, getDOMNodeMap());
}
- static v8::Handle<v8::Value> convertNewNodeToV8Object(Node*, V8Proxy*, DOMWrapperMap<Node>&);
-
- template <class C>
- static C* convertToNativeObject(V8ClassIndex::V8WrapperType type, v8::Handle<v8::Object> object)
- {
- // Native event listener is per frame, it cannot be handled by this generic function.
- ASSERT(type != V8ClassIndex::EVENTLISTENER);
- ASSERT(type != V8ClassIndex::EVENTTARGET);
-
- ASSERT(maybeDOMWrapper(object));
-
-#ifndef NDEBUG
- const bool typeIsValid =
-#define MAKE_CASE(TYPE, NAME) (type != V8ClassIndex::TYPE) &&
- DOM_NODE_TYPES(MAKE_CASE)
-#if ENABLE(SVG)
- SVG_NODE_TYPES(MAKE_CASE)
-#endif
-#undef MAKE_CASE
- true;
- ASSERT(typeIsValid);
-#endif
-
- return convertDOMWrapperToNative<C>(object);
- }
+ static v8::Handle<v8::Value> convertNewNodeToV8Object(Node*, V8Proxy*, DOMNodeMapping&);
static V8ClassIndex::V8WrapperType domWrapperType(v8::Handle<v8::Object>);
@@ -201,13 +162,6 @@ namespace WebCore {
static v8::Handle<v8::Value> convertEventToV8Object(Event*);
- static Event* convertToNativeEvent(v8::Handle<v8::Value> jsEvent)
- {
- if (!isDOMEventWrapper(jsEvent))
- return 0;
- return convertDOMWrapperToNative<Event>(v8::Handle<v8::Object>::Cast(jsEvent));
- }
-
static v8::Handle<v8::Value> convertEventTargetToV8Object(PassRefPtr<EventTarget> eventTarget)
{
return convertEventTargetToV8Object(eventTarget.get());
@@ -237,6 +191,10 @@ namespace WebCore {
static PassRefPtr<EventListener> getEventListener(XMLHttpRequestUpload* upload, v8::Local<v8::Value> value, bool isAttribute, ListenerLookupType lookup);
+#if ENABLE(EVENTSOURCE)
+ static PassRefPtr<EventListener> getEventListener(EventSource* eventTarget, v8::Local<v8::Value> value, bool isAttribute, ListenerLookupType lookup);
+#endif
+
static PassRefPtr<EventListener> getEventListener(EventTarget* eventTarget, v8::Local<v8::Value> value, bool isAttribute, ListenerLookupType lookup);
static PassRefPtr<EventListener> getEventListener(V8Proxy* proxy, v8::Local<v8::Value> value, bool isAttribute, ListenerLookupType lookup);
@@ -247,7 +205,7 @@ namespace WebCore {
{
RefPtr<XPathNSResolver> resolver;
if (V8XPathNSResolver::HasInstance(value))
- resolver = convertToNativeObject<XPathNSResolver>(V8ClassIndex::XPATHNSRESOLVER, v8::Handle<v8::Object>::Cast(value));
+ resolver = V8XPathNSResolver::toNative(v8::Handle<v8::Object>::Cast(value));
else if (value->IsObject())
resolver = V8CustomXPathNSResolver::create(proxy, value->ToObject());
return resolver;
@@ -267,12 +225,6 @@ namespace WebCore {
static v8::Local<v8::Function> getConstructor(V8ClassIndex::V8WrapperType, DOMWindow*);
static v8::Local<v8::Function> getConstructor(V8ClassIndex::V8WrapperType, WorkerContext*);
- // Checks whether a DOM object has a JS wrapper.
- static bool domObjectHasJSWrapper(void*);
- // Get JS wrapper of an existing DOM object, assuming that the wrapper
- // exists.
- static v8::Persistent<v8::Object> jsWrapperForDOMObject(void*);
- static v8::Persistent<v8::Object> jsWrapperForActiveDOMObject(void*);
// Set JS wrapper of a DOM object, the caller in charge of increase ref.
static void setJSWrapperForDOMObject(void*, v8::Persistent<v8::Object>);
static void setJSWrapperForActiveDOMObject(void*, v8::Persistent<v8::Object>);
@@ -281,8 +233,6 @@ namespace WebCore {
// Check whether a V8 value is a wrapper of type |classType|.
static bool isWrapperOfType(v8::Handle<v8::Value>, V8ClassIndex::V8WrapperType);
- static void* convertToSVGPODTypeImpl(V8ClassIndex::V8WrapperType, v8::Handle<v8::Value>);
-
// Check whether a V8 value is a DOM Event wrapper.
static bool isDOMEventWrapper(v8::Handle<v8::Value>);
diff --git a/WebCore/bindings/v8/V8HiddenPropertyName.h b/WebCore/bindings/v8/V8HiddenPropertyName.h
index bb1ca4c..0bfadd9 100644
--- a/WebCore/bindings/v8/V8HiddenPropertyName.h
+++ b/WebCore/bindings/v8/V8HiddenPropertyName.h
@@ -39,6 +39,7 @@ namespace WebCore {
V(objectPrototype) \
V(listener) \
V(attributeListener) \
+ V(scriptState) \
V(sleepFunction) \
V(toStringString)
diff --git a/WebCore/bindings/v8/V8Index.cpp b/WebCore/bindings/v8/V8Index.cpp
index ea13d2f..b87e060 100644
--- a/WebCore/bindings/v8/V8Index.cpp
+++ b/WebCore/bindings/v8/V8Index.cpp
@@ -34,6 +34,7 @@
#include "V8Attr.h"
#include "V8BarInfo.h"
#include "V8BeforeLoadEvent.h"
+#include "V8Blob.h"
#include "V8WebGLActiveInfo.h"
#include "V8CanvasRenderingContext.h"
#include "V8CanvasRenderingContext2D.h"
@@ -154,6 +155,7 @@
#include "V8NodeList.h"
#include "V8NodeFilter.h"
#include "V8Notation.h"
+#include "V8PopStateEvent.h"
#include "V8ProcessingInstruction.h"
#include "V8ProgressEvent.h"
#include "V8StyleSheet.h"
@@ -249,11 +251,13 @@
#endif
#if ENABLE(SVG_FONTS)
+#include "V8SVGFontElement.h"
#include "V8SVGFontFaceElement.h"
#include "V8SVGFontFaceFormatElement.h"
#include "V8SVGFontFaceNameElement.h"
#include "V8SVGFontFaceSrcElement.h"
#include "V8SVGFontFaceUriElement.h"
+#include "V8SVGMissingGlyphElement.h"
#endif
#if ENABLE(SVG_FOREIGN_OBJECT)
@@ -400,6 +404,7 @@
#include "V8WebGLArray.h"
#include "V8WebGLByteArray.h"
#include "V8WebGLBuffer.h"
+#include "V8WebGLContextAttributes.h"
#include "V8WebGLFloatArray.h"
#include "V8WebGLFramebuffer.h"
#include "V8WebGLIntArray.h"
@@ -422,6 +427,13 @@
#include "V8SQLTransaction.h"
#endif
+#if ENABLE(INDEXED_DATABASE)
+#include "V8IDBDatabaseError.h"
+#include "V8IDBDatabaseException.h"
+#include "V8IDBRequest.h"
+#include "V8IndexedDatabaseRequest.h"
+#endif
+
#if ENABLE(XPATH)
#include "V8XPathResult.h"
#include "V8XPathException.h"
@@ -440,6 +452,10 @@
#include "V8InspectorFrontendHost.h"
#endif
+#if ENABLE(EVENTSOURCE)
+#include "V8EventSource.h"
+#endif
+
// Geolocation
#include "V8Coordinates.h"
#include "V8Geolocation.h"
diff --git a/WebCore/bindings/v8/V8Index.h b/WebCore/bindings/v8/V8Index.h
index a3aebdf..f7582f7 100644
--- a/WebCore/bindings/v8/V8Index.h
+++ b/WebCore/bindings/v8/V8Index.h
@@ -32,10 +32,13 @@
#define V8Index_h
#include <v8.h>
-#include "PlatformString.h" // for WebCore::String
namespace WebCore {
+static const int v8DOMWrapperTypeIndex = 0;
+static const int v8DOMWrapperObjectIndex = 1;
+static const int v8DefaultWrapperInternalFieldCount = 2;
+
typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
#if ENABLE(DATAGRID)
@@ -82,6 +85,13 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
#define WORKER_NONNODE_WRAPPER_TYPES(V)
#endif
+#if ENABLE(EVENTSOURCE)
+#define EVENTSOURCE_ACTIVE_OBJECT_WRAPPER_TYPES(V) \
+ V(EVENTSOURCE, EventSource)
+#else
+#define EVENTSOURCE_ACTIVE_OBJECT_WRAPPER_TYPES(V)
+#endif
+
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
#define APPLICATIONCACHE_NONNODE_WRAPPER_TYPES(V) \
V(DOMAPPLICATIONCACHE, DOMApplicationCache)
@@ -230,11 +240,13 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
#if ENABLE(SVG_FONTS)
#define SVG_FONTS_ELEMENT_TYPES(V) \
+ V(SVGFONTELEMENT, SVGFontElement) \
V(SVGFONTFACEELEMENT, SVGFontFaceElement) \
V(SVGFONTFACEFORMATELEMENT, SVGFontFaceFormatElement) \
V(SVGFONTFACENAMEELEMENT, SVGFontFaceNameElement) \
V(SVGFONTFACESRCELEMENT, SVGFontFaceSrcElement) \
- V(SVGFONTFACEURIELEMENT, SVGFontFaceUriElement)
+ V(SVGFONTFACEURIELEMENT, SVGFontFaceUriElement) \
+ V(SVGMISSINGGLYPHELEMENT, SVGMissingGlyphElement)
#else
#define SVG_FONTS_ELEMENT_TYPES(V)
#endif
@@ -316,7 +328,8 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
V(XMLHTTPREQUEST, XMLHttpRequest) \
WORKER_ACTIVE_OBJECT_WRAPPER_TYPES(V) \
SHARED_WORKER_ACTIVE_OBJECT_WRAPPER_TYPES(V) \
- WEBSOCKET_ACTIVE_OBJECT_WRAPPER_TYPES(V)
+ WEBSOCKET_ACTIVE_OBJECT_WRAPPER_TYPES(V) \
+ EVENTSOURCE_ACTIVE_OBJECT_WRAPPER_TYPES(V)
// NOTE: DOM_OBJECT_TYPES is split into two halves because
// Visual Studio's Intellinonsense crashes when macros get
@@ -325,6 +338,7 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
#define DOM_OBJECT_TYPES_1(V) \
V(BARINFO, BarInfo) \
V(BEFORELOADEVENT, BeforeLoadEvent) \
+ V(BLOB, Blob) \
V(CANVASGRADIENT, CanvasGradient) \
V(CANVASPATTERN, CanvasPattern) \
V(CANVASRENDERINGCONTEXT, CanvasRenderingContext) \
@@ -386,6 +400,7 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
V(PAGETRANSITIONEVENT, PageTransitionEvent) \
V(PLUGIN, Plugin) \
V(PLUGINARRAY, PluginArray) \
+ V(POPSTATEEVENT, PopStateEvent) \
V(PROGRESSEVENT, ProgressEvent) \
V(RANGE, Range) \
V(RANGEEXCEPTION, RangeException) \
@@ -438,6 +453,16 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
#define DOM_OBJECT_STORAGE_TYPES(V)
#endif
+#if ENABLE(INDEXED_DATABASE)
+#define DOM_OBJECT_INDEXED_DATABASE_TYPES(V) \
+ V(IDBDATABASEERROR, IDBDatabaseError) \
+ V(IDBDATABASEEXCEPTION, IDBDatabaseException) \
+ V(IDBREQUEST, IDBRequest) \
+ V(INDEXEDDATABASEREQUEST, IndexedDatabaseRequest)
+#else
+#define DOM_OBJECT_INDEXED_DATABASE_TYPES(V)
+#endif
+
#if ENABLE(WORKERS)
#define DOM_OBJECT_WORKERS_TYPES(V) \
V(ERROREVENT, ErrorEvent)
@@ -452,6 +477,7 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
V(WEBGLARRAYBUFFER, WebGLArrayBuffer) \
V(WEBGLBUFFER, WebGLBuffer) \
V(WEBGLBYTEARRAY, WebGLByteArray) \
+ V(WEBGLCONTEXTATTRIBUTES, WebGLContextAttributes) \
V(WEBGLFLOATARRAY, WebGLFloatArray) \
V(WEBGLFRAMEBUFFER, WebGLFramebuffer) \
V(WEBGLINTARRAY, WebGLIntArray) \
@@ -530,6 +556,7 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
DOM_OBJECT_TYPES_2(V) \
DOM_OBJECT_DATABASE_TYPES(V) \
DOM_OBJECT_STORAGE_TYPES(V) \
+ DOM_OBJECT_INDEXED_DATABASE_TYPES(V) \
DOM_OBJECT_WORKERS_TYPES(V) \
DOM_OBJECT_3D_CANVAS_TYPES(V) \
DOM_OBJECT_XPATH_TYPES(V) \
@@ -544,7 +571,6 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
#if ENABLE(SVG)
// SVG_OBJECT_TYPES are svg non-node, non-pod types.
#define SVG_OBJECT_TYPES(V) \
- V(SVGANGLE, SVGAngle) \
V(SVGANIMATEDANGLE, SVGAnimatedAngle) \
V(SVGANIMATEDBOOLEAN, SVGAnimatedBoolean) \
V(SVGANIMATEDENUMERATION, SVGAnimatedEnumeration) \
@@ -586,7 +612,6 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
V(SVGPATHSEGMOVETOABS, SVGPathSegMovetoAbs) \
V(SVGPATHSEGMOVETOREL, SVGPathSegMovetoRel) \
V(SVGPOINTLIST, SVGPointList) \
- V(SVGPRESERVEASPECTRATIO, SVGPreserveAspectRatio) \
V(SVGRENDERINGINTENT, SVGRenderingIntent) \
V(SVGSTRINGLIST, SVGStringList) \
V(SVGTRANSFORMLIST, SVGTransformList) \
@@ -595,7 +620,9 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
// SVG POD types should list all types whose IDL has PODType declaration.
#define SVG_POD_TYPES(V) \
+ V(SVGANGLE, SVGAngle) \
V(SVGLENGTH, SVGLength) \
+ V(SVGPRESERVEASPECTRATIO, SVGPreserveAspectRatio) \
V(SVGTRANSFORM, SVGTransform) \
V(SVGMATRIX, SVGMatrix) \
V(SVGNUMBER, SVGNumber) \
@@ -604,7 +631,9 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
// POD types can have different implementation names, see CodeGenerateV8.pm.
#define SVG_POD_NATIVE_TYPES(V) \
+ V(SVGANGLE, SVGAngle) \
V(SVGLENGTH, SVGLength) \
+ V(SVGPRESERVEASPECTRATIO, SVGPreserveAspectRatio) \
V(SVGTRANSFORM, SVGTransform) \
V(SVGMATRIX, TransformationMatrix) \
V(SVGNUMBER, float) \
diff --git a/WebCore/bindings/v8/V8IsolatedWorld.cpp b/WebCore/bindings/v8/V8IsolatedContext.cpp
index cb65097..3237ede 100644
--- a/WebCore/bindings/v8/V8IsolatedWorld.cpp
+++ b/WebCore/bindings/v8/V8IsolatedContext.cpp
@@ -30,9 +30,7 @@
#include "config.h"
-#include "V8IsolatedWorld.h"
-
-#include <v8.h>
+#include "V8IsolatedContext.h"
#include "Frame.h"
#include "FrameLoaderClient.h"
@@ -40,34 +38,35 @@
#include "ScriptController.h"
#include "V8DOMWindow.h"
#include "V8HiddenPropertyName.h"
+#include <v8.h>
namespace WebCore {
-int V8IsolatedWorld::isolatedWorldCount = 0;
-void V8IsolatedWorld::contextWeakReferenceCallback(v8::Persistent<v8::Value> object, void* isolated_world)
+void V8IsolatedContext::contextWeakReferenceCallback(v8::Persistent<v8::Value> object, void* isolatedContext)
{
// Our context is going away. Time to clean up the world.
- V8IsolatedWorld* world = static_cast<V8IsolatedWorld*>(isolated_world);
- delete world;
+ V8IsolatedContext* context = static_cast<V8IsolatedContext*>(isolatedContext);
+ delete context;
}
-V8IsolatedWorld::V8IsolatedWorld(V8Proxy* proxy, int extensionGroup)
+V8IsolatedContext::V8IsolatedContext(V8Proxy* proxy, int extensionGroup)
+ : m_world(IsolatedWorld::create())
{
- ++isolatedWorldCount;
-
v8::HandleScope scope;
- m_context = SharedPersistent<v8::Context>::create(proxy->createNewContext(v8::Handle<v8::Object>(), extensionGroup));
+ // FIXME: We should be creating a new V8DOMWindowShell here instead of riping out the context.
+ m_context = SharedPersistent<v8::Context>::create(proxy->windowShell()->createNewContext(v8::Handle<v8::Object>(), extensionGroup));
if (m_context->get().IsEmpty())
return;
// Run code in the new context.
- v8::Context::Scope context_scope(m_context->get());
+ v8::Context::Scope contextScope(m_context->get());
- getGlobalObject(m_context->get())->SetPointerInInternalField(V8Custom::kDOMWindowEnteredIsolatedWorldIndex, this);
+ getGlobalObject(m_context->get())->SetPointerInInternalField(V8DOMWindow::enteredIsolatedWorldIndex, this);
- V8Proxy::installHiddenObjectPrototype(m_context->get());
- proxy->installDOMWindow(m_context->get(), proxy->frame()->domWindow());
+ V8DOMWindowShell::installHiddenObjectPrototype(m_context->get());
+ // FIXME: This will go away once we have a windowShell for the isolated world.
+ proxy->windowShell()->installDOMWindow(m_context->get(), proxy->frame()->domWindow());
// Using the default security token means that the canAccess is always
// called, which is slow.
@@ -80,14 +79,13 @@ V8IsolatedWorld::V8IsolatedWorld(V8Proxy* proxy, int extensionGroup)
proxy->frame()->loader()->client()->didCreateIsolatedScriptContext();
}
-void V8IsolatedWorld::destroy()
+void V8IsolatedContext::destroy()
{
m_context->get().MakeWeak(this, &contextWeakReferenceCallback);
}
-V8IsolatedWorld::~V8IsolatedWorld()
+V8IsolatedContext::~V8IsolatedContext()
{
- --isolatedWorldCount;
m_context->disposeHandle();
}
diff --git a/WebCore/bindings/v8/V8IsolatedContext.h b/WebCore/bindings/v8/V8IsolatedContext.h
new file mode 100644
index 0000000..70ca270
--- /dev/null
+++ b/WebCore/bindings/v8/V8IsolatedContext.h
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef V8IsolatedContext_h
+#define V8IsolatedContext_h
+
+#include "IsolatedWorld.h"
+#include "ScriptSourceCode.h" // for WebCore::ScriptSourceCode
+#include "V8DOMWindow.h"
+#include "V8Index.h"
+#include "V8Proxy.h"
+#include "V8Utilities.h"
+#include <v8.h>
+
+namespace WebCore {
+
+class V8Proxy;
+
+// V8IsolatedContext
+//
+// V8IsolatedContext represents a isolated execution environment for
+// JavaScript. Each isolated world executes in parallel with the main
+// JavaScript world. An isolated world has access to the same DOM data
+// structures as the main world but none of the JavaScript pointers.
+//
+// It is an error to ever share a JavaScript pointer between two isolated
+// worlds or between an isolated world and the main world. Because
+// isolated worlds have access to the DOM, they need their own DOM wrappers
+// to avoid having pointers to the main world's DOM wrappers (which are
+// JavaScript objects).
+class V8IsolatedContext {
+public:
+ // Creates an isolated world. To destroy it, call destroy().
+ // This will delete the isolated world when the context it owns is GC'd.
+ V8IsolatedContext(V8Proxy* proxy, int extensionGroup);
+ ~V8IsolatedContext();
+
+ // Call this to destroy the isolated world. It will be deleted sometime
+ // after this call, once all script references to the world's context
+ // have been dropped.
+ void destroy();
+
+ // Returns the isolated world associated with
+ // v8::Context::GetEntered(). Because worlds are isolated, the entire
+ // JavaScript call stack should be from the same isolated world.
+ // Returns 0 if the entered context is from the main world.
+ //
+ // FIXME: Consider edge cases with DOM mutation events that might
+ // violate this invariant.
+ //
+ static V8IsolatedContext* getEntered()
+ {
+ // This is a temporary performance optimization. Essentially,
+ // GetHiddenValue is too slow for this code path. We need to get the
+ // V8 team to add a real property to v8::Context for isolated worlds.
+ // Until then, we optimize the common case of not having any isolated
+ // worlds at all.
+ if (!IsolatedWorld::count())
+ return 0;
+ if (!v8::Context::InContext())
+ return 0;
+ return reinterpret_cast<V8IsolatedContext*>(getGlobalObject(v8::Context::GetEntered())->GetPointerFromInternalField(V8DOMWindow::enteredIsolatedWorldIndex));
+ }
+
+ v8::Handle<v8::Context> context() { return m_context->get(); }
+ PassRefPtr<SharedPersistent<v8::Context> > sharedContext() { return m_context; }
+
+ IsolatedWorld* world() const { return m_world.get(); }
+
+private:
+ static v8::Handle<v8::Object> getGlobalObject(v8::Handle<v8::Context> context)
+ {
+ return v8::Handle<v8::Object>::Cast(context->Global()->GetPrototype());
+ }
+
+ // Called by the garbage collector when our JavaScript context is about
+ // to be destroyed.
+ static void contextWeakReferenceCallback(v8::Persistent<v8::Value> object, void* isolatedContext);
+
+ // The underlying v8::Context. This object is keep on the heap as
+ // long as |m_context| has not been garbage collected.
+ RefPtr<SharedPersistent<v8::Context> > m_context;
+
+ RefPtr<IsolatedWorld> m_world;
+};
+
+} // namespace WebCore
+
+#endif // V8IsolatedContext_h
diff --git a/WebCore/bindings/v8/V8IsolatedWorld.h b/WebCore/bindings/v8/V8IsolatedWorld.h
deleted file mode 100644
index 6313da8..0000000
--- a/WebCore/bindings/v8/V8IsolatedWorld.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef V8IsolatedWorld_h
-#define V8IsolatedWorld_h
-
-#include <v8.h>
-
-#include "V8DOMMap.h"
-#include "V8Index.h"
-#include "V8Proxy.h"
-#include "V8Utilities.h"
-#include "ScriptSourceCode.h" // for WebCore::ScriptSourceCode
-
-namespace WebCore {
-
- class V8Proxy;
-
- // V8IsolatedWorld
- //
- // V8IsolatedWorld represents a isolated execution environment for
- // JavaScript. Each isolated world executes in parallel with the main
- // JavaScript world. An isolated world has access to the same DOM data
- // structures as the main world but none of the JavaScript pointers.
- //
- // It is an error to ever share a JavaScript pointer between two isolated
- // worlds or between an isolated world and the main world. Because
- // isolated worlds have access to the DOM, they need their own DOM wrappers
- // to avoid having pointers to the main world's DOM wrappers (which are
- // JavaScript objects).
- //
- class V8IsolatedWorld {
- public:
- // Creates an isolated world. To destroy it, call destroy().
- // This will delete the isolated world when the context it owns is GC'd.
- V8IsolatedWorld(V8Proxy* proxy, int extensionGroup);
- ~V8IsolatedWorld();
-
- // Call this to destroy the isolated world. It will be deleted sometime
- // after this call, once all script references to the world's context
- // have been dropped.
- void destroy();
-
- // Returns the isolated world associated with
- // v8::Context::GetEntered(). Because worlds are isolated, the entire
- // JavaScript call stack should be from the same isolated world.
- // Returns NULL if the entered context is from the main world.
- //
- // FIXME: Consider edge cases with DOM mutation events that might
- // violate this invariant.
- //
- static V8IsolatedWorld* getEntered()
- {
- // This is a temporary performance optimization. Essentially,
- // GetHiddenValue is too slow for this code path. We need to get the
- // V8 team to add a real property to v8::Context for isolated worlds.
- // Until then, we optimize the common case of not having any isolated
- // worlds at all.
- if (!isolatedWorldCount)
- return 0;
- if (!v8::Context::InContext())
- return 0;
- return reinterpret_cast<V8IsolatedWorld*>(getGlobalObject(v8::Context::GetEntered())->GetPointerFromInternalField(V8Custom::kDOMWindowEnteredIsolatedWorldIndex));
- }
-
- v8::Handle<v8::Context> context() { return m_context->get(); }
- PassRefPtr<SharedPersistent<v8::Context> > sharedContext() { return m_context; }
-
- DOMDataStore* getDOMDataStore() const { return m_domDataStore.getStore(); }
-
- private:
- static v8::Handle<v8::Object> getGlobalObject(v8::Handle<v8::Context> context)
- {
- return v8::Handle<v8::Object>::Cast(context->Global()->GetPrototype());
- }
-
- // Called by the garbage collector when our JavaScript context is about
- // to be destroyed.
- static void contextWeakReferenceCallback(v8::Persistent<v8::Value> object, void* isolated_world);
-
- // The v8::Context for the isolated world. This object is keep on the
- // heap as long as |m_context| has not been garbage collected.
- RefPtr<SharedPersistent<v8::Context> > m_context;
-
- // The backing store for the isolated world's DOM wrappers. This class
- // doesn't have visibility into the wrappers. This handle simply helps
- // manage their lifetime.
- DOMDataStoreHandle m_domDataStore;
-
- static int isolatedWorldCount;
- };
-
-} // namespace WebCore
-
-#endif // V8IsolatedWorld_h
diff --git a/WebCore/bindings/v8/V8LazyEventListener.cpp b/WebCore/bindings/v8/V8LazyEventListener.cpp
index 16b21d6..7f13c5a 100644
--- a/WebCore/bindings/v8/V8LazyEventListener.cpp
+++ b/WebCore/bindings/v8/V8LazyEventListener.cpp
@@ -54,7 +54,11 @@ V8LazyEventListener::V8LazyEventListener(const String& functionName, bool isSVGE
v8::Local<v8::Value> V8LazyEventListener::callListenerFunction(ScriptExecutionContext* context, v8::Handle<v8::Value> jsEvent, Event* event)
{
- v8::Local<v8::Function> handlerFunction = v8::Local<v8::Function>::Cast(getListenerObject(context));
+ v8::Local<v8::Object> listenerObject = getListenerObject(context);
+ if (listenerObject.IsEmpty())
+ return v8::Local<v8::Value>();
+
+ v8::Local<v8::Function> handlerFunction = v8::Local<v8::Function>::Cast(listenerObject);
v8::Local<v8::Object> receiver = getReceiverObject(event);
if (handlerFunction.IsEmpty() || receiver.IsEmpty())
return v8::Local<v8::Value>();
diff --git a/WebCore/bindings/v8/V8NPObject.cpp b/WebCore/bindings/v8/V8NPObject.cpp
index bab3688..196972e 100644
--- a/WebCore/bindings/v8/V8NPObject.cpp
+++ b/WebCore/bindings/v8/V8NPObject.cpp
@@ -65,19 +65,25 @@ static v8::Handle<v8::Value> npObjectInvokeImpl(const v8::Arguments& args, Invok
if (V8HTMLAppletElement::HasInstance(args.Holder()) || V8HTMLEmbedElement::HasInstance(args.Holder())
|| V8HTMLObjectElement::HasInstance(args.Holder())) {
// The holder object is a subtype of HTMLPlugInElement.
- HTMLPlugInElement* element = V8DOMWrapper::convertDOMWrapperToNode<HTMLPlugInElement>(args.Holder());
+ HTMLPlugInElement* element;
+ if (V8HTMLAppletElement::HasInstance(args.Holder()))
+ element = V8HTMLAppletElement::toNative(args.Holder());
+ else if (V8HTMLEmbedElement::HasInstance(args.Holder()))
+ element = V8HTMLEmbedElement::toNative(args.Holder());
+ else
+ element = V8HTMLObjectElement::toNative(args.Holder());
ScriptInstance scriptInstance = element->getInstance();
if (scriptInstance)
- npObject = V8DOMWrapper::convertToNativeObject<NPObject>(V8ClassIndex::NPOBJECT, scriptInstance->instance());
+ npObject = v8ObjectToNPObject(scriptInstance->instance());
else
npObject = 0;
} else {
// The holder object is not a subtype of HTMLPlugInElement, it must be an NPObject which has three
// internal fields.
- if (args.Holder()->InternalFieldCount() != V8Custom::kNPObjectInternalFieldCount)
+ if (args.Holder()->InternalFieldCount() != npObjectInternalFieldCount)
return throwError("NPMethod called on non-NPObject", V8Proxy::ReferenceError);
- npObject = V8DOMWrapper::convertToNativeObject<NPObject>(V8ClassIndex::NPOBJECT, args.Holder());
+ npObject = v8ObjectToNPObject(args.Holder());
}
// Verify that our wrapper wasn't using a NPObject which has already been deleted.
@@ -161,7 +167,7 @@ static void weakTemplateCallback(v8::Persistent<v8::Value> object, void* paramet
static v8::Handle<v8::Value> npObjectGetProperty(v8::Local<v8::Object> self, NPIdentifier identifier, v8::Local<v8::Value> key)
{
- NPObject* npObject = V8DOMWrapper::convertToNativeObject<NPObject>(V8ClassIndex::NPOBJECT, self);
+ NPObject* npObject = v8ObjectToNPObject(self);
// Verify that our wrapper wasn't using a NPObject which
// has already been deleted.
@@ -230,7 +236,7 @@ v8::Handle<v8::Value> npObjectGetIndexedProperty(v8::Local<v8::Object> self, uin
static v8::Handle<v8::Value> npObjectSetProperty(v8::Local<v8::Object> self, NPIdentifier identifier, v8::Local<v8::Value> value)
{
- NPObject* npObject = V8DOMWrapper::convertToNativeObject<NPObject>(V8ClassIndex::NPOBJECT, self);
+ NPObject* npObject = v8ObjectToNPObject(self);
// Verify that our wrapper wasn't using a NPObject which has already been deleted.
if (!npObject || !_NPN_IsAlive(npObject)) {
@@ -280,7 +286,7 @@ v8::Handle<v8::Value> npObjectSetIndexedProperty(v8::Local<v8::Object> self, uin
v8::Handle<v8::Array> npObjectPropertyEnumerator(const v8::AccessorInfo& info, bool namedProperty)
{
- NPObject* npObject = V8DOMWrapper::convertToNativeObject<NPObject>(V8ClassIndex::NPOBJECT, info.Holder());
+ NPObject* npObject = v8ObjectToNPObject(info.Holder());
// Verify that our wrapper wasn't using a NPObject which
// has already been deleted.
@@ -357,7 +363,7 @@ v8::Local<v8::Object> createV8ObjectForNPObject(NPObject* object, NPObject* root
// can be used by DOM bindings.
if (npObjectDesc.IsEmpty()) {
npObjectDesc = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New());
- npObjectDesc->InstanceTemplate()->SetInternalFieldCount(V8Custom::kNPObjectInternalFieldCount);
+ npObjectDesc->InstanceTemplate()->SetInternalFieldCount(npObjectInternalFieldCount);
npObjectDesc->InstanceTemplate()->SetNamedPropertyHandler(npObjectNamedPropertyGetter, npObjectNamedPropertySetter, 0, 0, npObjectNamedPropertyEnumerator);
npObjectDesc->InstanceTemplate()->SetIndexedPropertyHandler(npObjectIndexedPropertyGetter, npObjectIndexedPropertySetter, 0, 0, npObjectIndexedPropertyEnumerator);
npObjectDesc->InstanceTemplate()->SetCallAsFunctionHandler(npObjectInvokeDefaultHandler);
diff --git a/WebCore/bindings/v8/V8Proxy.cpp b/WebCore/bindings/v8/V8Proxy.cpp
index 5da73d5..a5cc433 100644
--- a/WebCore/bindings/v8/V8Proxy.cpp
+++ b/WebCore/bindings/v8/V8Proxy.cpp
@@ -42,6 +42,7 @@
#include "ScriptController.h"
#include "StorageNamespace.h"
#include "V8Binding.h"
+#include "V8BindingState.h"
#include "V8Collection.h"
#include "V8ConsoleMessage.h"
#include "V8CustomBinding.h"
@@ -49,7 +50,7 @@
#include "V8DOMWindow.h"
#include "V8HiddenPropertyName.h"
#include "V8Index.h"
-#include "V8IsolatedWorld.h"
+#include "V8IsolatedContext.h"
#include "WorkerContextExecutionProxy.h"
#include <algorithm>
@@ -174,7 +175,7 @@ enum DelayReporting {
ReportNow
};
-static void reportUnsafeAccessTo(Frame* target, DelayReporting delay)
+void V8Proxy::reportUnsafeAccessTo(Frame* target, DelayReporting delay)
{
ASSERT(target);
Document* targetDocument = target->document();
@@ -214,13 +215,6 @@ static void reportUnsafeAccessTo(Frame* target, DelayReporting delay)
}
}
-static void reportUnsafeJavaScriptAccess(v8::Local<v8::Object> host, v8::AccessType type, v8::Local<v8::Value> data)
-{
- Frame* target = V8Custom::GetTargetFrame(host, data);
- if (target)
- reportUnsafeAccessTo(target, ReportLater);
-}
-
static void handleFatalErrorInV8()
{
// FIXME: We temporarily deal with V8 internal error situations
@@ -228,17 +222,9 @@ static void handleFatalErrorInV8()
CRASH();
}
-static void reportFatalErrorInV8(const char* location, const char* message)
-{
- // V8 is shutdown, we cannot use V8 api.
- // The only thing we can do is to disable JavaScript.
- // FIXME: clean up V8Proxy and disable JavaScript.
- printf("V8 error: %s (%s)\n", message, location);
- handleFatalErrorInV8();
-}
-
V8Proxy::V8Proxy(Frame* frame)
: m_frame(frame)
+ , m_windowShell(V8DOMWindowShell::create(frame))
, m_inlineCode(false)
, m_timerCallback(false)
, m_recursion(0)
@@ -248,18 +234,7 @@ V8Proxy::V8Proxy(Frame* frame)
V8Proxy::~V8Proxy()
{
clearForClose();
- destroyGlobal();
-}
-
-void V8Proxy::destroyGlobal()
-{
- if (!m_global.IsEmpty()) {
-#ifndef NDEBUG
- V8GCController::unregisterGlobalHandle(this, m_global);
-#endif
- m_global.Dispose();
- m_global.Clear();
- }
+ windowShell()->destroyGlobal();
}
v8::Handle<v8::Script> V8Proxy::compileScript(v8::Handle<v8::String> code, const String& fileName, int baseLine)
@@ -297,7 +272,7 @@ bool V8Proxy::handleOutOfMemory()
// Clean m_context, and event handlers.
proxy->clearForClose();
- proxy->destroyGlobal();
+ proxy->windowShell()->destroyGlobal();
}
#if PLATFORM(CHROMIUM)
@@ -315,104 +290,58 @@ bool V8Proxy::handleOutOfMemory()
void V8Proxy::evaluateInIsolatedWorld(int worldID, const Vector<ScriptSourceCode>& sources, int extensionGroup)
{
- initContextIfNeeded();
+ // FIXME: This will need to get reorganized once we have a windowShell for the isolated world.
+ windowShell()->initContextIfNeeded();
v8::HandleScope handleScope;
- V8IsolatedWorld* world = 0;
+ V8IsolatedContext* isolatedContext = 0;
if (worldID > 0) {
IsolatedWorldMap::iterator iter = m_isolatedWorlds.find(worldID);
if (iter != m_isolatedWorlds.end()) {
- world = iter->second;
+ isolatedContext = iter->second;
} else {
- world = new V8IsolatedWorld(this, extensionGroup);
- if (world->context().IsEmpty()) {
- delete world;
+ isolatedContext = new V8IsolatedContext(this, extensionGroup);
+ if (isolatedContext->context().IsEmpty()) {
+ delete isolatedContext;
return;
}
- m_isolatedWorlds.set(worldID, world);
+ // FIXME: We should change this to using window shells to match JSC.
+ m_isolatedWorlds.set(worldID, isolatedContext);
// Setup context id for JS debugger.
- if (!setInjectedScriptContextDebugId(world->context())) {
+ if (!setInjectedScriptContextDebugId(isolatedContext->context())) {
m_isolatedWorlds.take(worldID);
- delete world;
+ delete isolatedContext;
return;
}
}
} else {
- world = new V8IsolatedWorld(this, extensionGroup);
- if (world->context().IsEmpty()) {
- delete world;
+ isolatedContext = new V8IsolatedContext(this, extensionGroup);
+ if (isolatedContext->context().IsEmpty()) {
+ delete isolatedContext;
return;
}
}
- v8::Local<v8::Context> context = v8::Local<v8::Context>::New(world->context());
+ v8::Local<v8::Context> context = v8::Local<v8::Context>::New(isolatedContext->context());
v8::Context::Scope context_scope(context);
for (size_t i = 0; i < sources.size(); ++i)
evaluate(sources[i], 0);
if (worldID == 0)
- world->destroy();
-}
-
-void V8Proxy::evaluateInNewContext(const Vector<ScriptSourceCode>& sources, int extensionGroup)
-{
- initContextIfNeeded();
-
- v8::HandleScope handleScope;
-
- // Set up the DOM window as the prototype of the new global object.
- v8::Handle<v8::Context> windowContext = m_context;
- v8::Handle<v8::Object> windowGlobal = windowContext->Global();
- v8::Handle<v8::Object> windowWrapper = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::DOMWINDOW, windowGlobal);
-
- ASSERT(V8DOMWrapper::convertDOMWrapperToNative<DOMWindow>(windowWrapper) == m_frame->domWindow());
-
- v8::Persistent<v8::Context> context = createNewContext(v8::Handle<v8::Object>(), extensionGroup);
- if (context.IsEmpty())
- return;
-
- v8::Context::Scope contextScope(context);
-
- // Setup context id for JS debugger.
- if (!setInjectedScriptContextDebugId(context)) {
- context.Dispose();
- return;
- }
-
- v8::Handle<v8::Object> global = context->Global();
-
- v8::Handle<v8::String> implicitProtoString = v8::String::New("__proto__");
- global->Set(implicitProtoString, windowWrapper);
-
- // Give the code running in the new context a way to get access to the
- // original context.
- global->Set(v8::String::New("contentWindow"), windowGlobal);
-
- m_frame->loader()->client()->didCreateIsolatedScriptContext();
-
- // Run code in the new context.
- for (size_t i = 0; i < sources.size(); ++i)
- evaluate(sources[i], 0);
-
- // Using the default security token means that the canAccess is always
- // called, which is slow.
- // FIXME: Use tokens where possible. This will mean keeping track of all
- // created contexts so that they can all be updated when the document domain
- // changes.
- context->UseDefaultSecurityToken();
- context.Dispose();
+ isolatedContext->destroy();
}
bool V8Proxy::setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContext)
{
// Setup context id for JS debugger.
v8::Context::Scope contextScope(targetContext);
- if (m_context.IsEmpty())
+ v8::Handle<v8::Context> context = windowShell()->context();
+ if (context.IsEmpty())
return false;
- int debugId = contextDebugId(m_context);
+ int debugId = contextDebugId(context);
char buffer[32];
if (debugId == -1)
@@ -611,37 +540,13 @@ v8::Local<v8::Value> V8Proxy::newInstance(v8::Handle<v8::Function> constructor,
return result;
}
-v8::Local<v8::Object> V8Proxy::createWrapperFromCacheSlowCase(V8ClassIndex::V8WrapperType type)
-{
- // Not in cache.
- int classIndex = V8ClassIndex::ToInt(type);
- initContextIfNeeded();
- v8::Context::Scope scope(m_context);
- v8::Local<v8::Function> function = V8DOMWrapper::getConstructor(type, getHiddenObjectPrototype(m_context));
- v8::Local<v8::Object> instance = SafeAllocation::newInstance(function);
- if (!instance.IsEmpty()) {
- m_wrapperBoilerplates->Set(v8::Integer::New(classIndex), instance);
- return instance->Clone();
- }
- return notHandledByInterceptor();
-}
-
-bool V8Proxy::isContextInitialized()
-{
- // m_context, m_global, and m_wrapperBoilerplates should
- // all be non-empty if if m_context is non-empty.
- ASSERT(m_context.IsEmpty() || !m_global.IsEmpty());
- ASSERT(m_context.IsEmpty() || !m_wrapperBoilerplates.IsEmpty());
- return !m_context.IsEmpty();
-}
-
DOMWindow* V8Proxy::retrieveWindow(v8::Handle<v8::Context> context)
{
v8::Handle<v8::Object> global = context->Global();
ASSERT(!global.IsEmpty());
global = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::DOMWINDOW, global);
ASSERT(!global.IsEmpty());
- return V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, global);
+ return V8DOMWindow::toNative(global);
}
Frame* V8Proxy::retrieveFrame(v8::Handle<v8::Context> context)
@@ -691,12 +596,12 @@ V8Proxy* V8Proxy::retrieve(Frame* frame)
{
if (!frame)
return 0;
- return frame->script()->isEnabled() ? frame->script()->proxy() : 0;
+ return frame->script()->canExecuteScripts() ? frame->script()->proxy() : 0;
}
V8Proxy* V8Proxy::retrieve(ScriptExecutionContext* context)
{
- if (!context->isDocument())
+ if (!context || !context->isDocument())
return 0;
return retrieve(static_cast<Document*>(context)->frame());
}
@@ -705,79 +610,6 @@ void V8Proxy::disconnectFrame()
{
}
-void V8Proxy::updateDocumentWrapper(v8::Handle<v8::Value> wrapper)
-{
- clearDocumentWrapper();
-
- ASSERT(m_document.IsEmpty());
- m_document = v8::Persistent<v8::Value>::New(wrapper);
-#ifndef NDEBUG
- V8GCController::registerGlobalHandle(PROXY, this, m_document);
-#endif
-}
-
-void V8Proxy::clearDocumentWrapper()
-{
- if (!m_document.IsEmpty()) {
-#ifndef NDEBUG
- V8GCController::unregisterGlobalHandle(this, m_document);
-#endif
- m_document.Dispose();
- m_document.Clear();
- }
-}
-
-void V8Proxy::updateDocumentWrapperCache()
-{
- v8::HandleScope handleScope;
- v8::Context::Scope contextScope(m_context);
-
- // If the document has no frame, NodeToV8Object might get the
- // document wrapper for a document that is about to be deleted.
- // If the ForceSet below causes a garbage collection, the document
- // might get deleted and the global handle for the document
- // wrapper cleared. Using the cleared global handle will lead to
- // crashes. In this case we clear the cache and let the DOMWindow
- // accessor handle access to the document.
- if (!m_frame->document()->frame()) {
- clearDocumentWrapperCache();
- return;
- }
-
- v8::Handle<v8::Value> documentWrapper = V8DOMWrapper::convertNodeToV8Object(m_frame->document());
-
- // If instantiation of the document wrapper fails, clear the cache
- // and let the DOMWindow accessor handle access to the document.
- if (documentWrapper.IsEmpty()) {
- clearDocumentWrapperCache();
- return;
- }
- m_context->Global()->ForceSet(v8::String::New("document"), documentWrapper, static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete));
-}
-
-void V8Proxy::clearDocumentWrapperCache()
-{
- ASSERT(!m_context.IsEmpty());
- m_context->Global()->ForceDelete(v8::String::New("document"));
-}
-
-void V8Proxy::disposeContextHandles()
-{
- if (!m_context.IsEmpty()) {
- m_frame->loader()->client()->didDestroyScriptContextForFrame();
- m_context.Dispose();
- m_context.Clear();
- }
-
- if (!m_wrapperBoilerplates.IsEmpty()) {
-#ifndef NDEBUG
- V8GCController::unregisterGlobalHandle(this, m_wrapperBoilerplates);
-#endif
- m_wrapperBoilerplates.Dispose();
- m_wrapperBoilerplates.Clear();
- }
-}
-
void V8Proxy::releaseStorageMutex()
{
// If we've just left a top level script context and local storage has been
@@ -804,18 +636,13 @@ void V8Proxy::resetIsolatedWorlds()
void V8Proxy::clearForClose()
{
resetIsolatedWorlds();
-
- if (!m_context.IsEmpty()) {
- v8::HandleScope handleScope;
-
- clearDocumentWrapper();
- disposeContextHandles();
- }
+ windowShell()->clearForClose();
}
void V8Proxy::clearForNavigation()
{
resetIsolatedWorlds();
+<<<<<<< HEAD
if (!m_context.IsEmpty()) {
v8::HandleScope handle;
@@ -1181,6 +1008,9 @@ void V8Proxy::initContextIfNeeded()
#ifdef ANDROID_INSTRUMENT
android::TimeCounter::record(android::TimeCounter::JavaScriptInitTimeCounter, __FUNCTION__);
#endif
+=======
+ windowShell()->clearForNavigation();
+>>>>>>> webkit.org at r54127
}
void V8Proxy::setDOMException(int exceptionCode)
@@ -1246,8 +1076,8 @@ v8::Local<v8::Context> V8Proxy::context(Frame* frame)
if (context.IsEmpty())
return v8::Local<v8::Context>();
- if (V8IsolatedWorld* world = V8IsolatedWorld::getEntered()) {
- context = v8::Local<v8::Context>::New(world->context());
+ if (V8IsolatedContext* isolatedContext = V8IsolatedContext::getEntered()) {
+ context = v8::Local<v8::Context>::New(isolatedContext->context());
if (frame != V8Proxy::retrieveFrame(context))
return v8::Local<v8::Context>();
}
@@ -1257,8 +1087,8 @@ v8::Local<v8::Context> V8Proxy::context(Frame* frame)
v8::Local<v8::Context> V8Proxy::context()
{
- if (V8IsolatedWorld* world = V8IsolatedWorld::getEntered()) {
- RefPtr<SharedPersistent<v8::Context> > context = world->sharedContext();
+ if (V8IsolatedContext* isolatedContext = V8IsolatedContext::getEntered()) {
+ RefPtr<SharedPersistent<v8::Context> > context = isolatedContext->sharedContext();
if (m_frame != V8Proxy::retrieveFrame(context->get()))
return v8::Local<v8::Context>();
return v8::Local<v8::Context>::New(context->get());
@@ -1268,8 +1098,8 @@ v8::Local<v8::Context> V8Proxy::context()
v8::Local<v8::Context> V8Proxy::mainWorldContext()
{
- initContextIfNeeded();
- return v8::Local<v8::Context>::New(m_context);
+ windowShell()->initContextIfNeeded();
+ return v8::Local<v8::Context>::New(windowShell()->context());
}
v8::Local<v8::Context> V8Proxy::mainWorldContext(Frame* frame)
@@ -1427,17 +1257,18 @@ void V8Proxy::registerExtension(v8::Extension* extension, int extensionGroup)
bool V8Proxy::setContextDebugId(int debugId)
{
ASSERT(debugId > 0);
- if (m_context.IsEmpty())
- return false;
v8::HandleScope scope;
- if (!m_context->GetData()->IsUndefined())
+ v8::Handle<v8::Context> context = windowShell()->context();
+ if (context.IsEmpty())
+ return false;
+ if (!context->GetData()->IsUndefined())
return false;
- v8::Context::Scope contextScope(m_context);
+ v8::Context::Scope contextScope(context);
char buffer[32];
snprintf(buffer, sizeof(buffer), "page,%d", debugId);
- m_context->SetData(v8::String::New(buffer));
+ context->SetData(v8::String::New(buffer));
return true;
}
@@ -1454,26 +1285,6 @@ int V8Proxy::contextDebugId(v8::Handle<v8::Context> context)
return atoi(comma + 1);
}
-v8::Handle<v8::Value> V8Proxy::getHiddenObjectPrototype(v8::Handle<v8::Context> context)
-{
- return context->Global()->GetHiddenValue(V8HiddenPropertyName::objectPrototype());
-}
-
-void V8Proxy::installHiddenObjectPrototype(v8::Handle<v8::Context> context)
-{
- v8::Handle<v8::String> objectString = v8::String::New("Object");
- v8::Handle<v8::String> prototypeString = v8::String::New("prototype");
- v8::Handle<v8::String> hiddenObjectPrototypeString = V8HiddenPropertyName::objectPrototype();
- // Bail out if allocation failed.
- if (objectString.IsEmpty() || prototypeString.IsEmpty() || hiddenObjectPrototypeString.IsEmpty())
- return;
-
- v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(context->Global()->Get(objectString));
- v8::Handle<v8::Value> objectPrototype = object->Get(prototypeString);
-
- context->Global()->SetHiddenValue(hiddenObjectPrototypeString, objectPrototype);
-}
-
v8::Local<v8::Context> toV8Context(ScriptExecutionContext* context, const WorldContextHandle& worldContext)
{
if (context->isDocument()) {
diff --git a/WebCore/bindings/v8/V8Proxy.h b/WebCore/bindings/v8/V8Proxy.h
index 900ee18..6f6470e 100644
--- a/WebCore/bindings/v8/V8Proxy.h
+++ b/WebCore/bindings/v8/V8Proxy.h
@@ -35,6 +35,7 @@
#include "SecurityOrigin.h" // for WebCore::SecurityOrigin
#include "SharedPersistent.h"
#include "V8AbstractEventListener.h"
+#include "V8DOMWindowShell.h"
#include "V8DOMWrapper.h"
#include "V8GCController.h"
#include "V8Index.h"
@@ -58,7 +59,7 @@ namespace WebCore {
class ScriptExecutionContext;
class String;
class V8EventListener;
- class V8IsolatedWorld;
+ class V8IsolatedContext;
class WorldContextHandle;
// FIXME: use standard logging facilities in WebCore.
@@ -139,28 +140,21 @@ namespace WebCore {
GeneralError
};
+ // When to report errors.
+ enum DelayReporting {
+ ReportLater,
+ ReportNow
+ };
+
explicit V8Proxy(Frame*);
~V8Proxy();
Frame* frame() { return m_frame; }
- // Clear page-specific data, but keep the global object identify.
void clearForNavigation();
-
- // Clear page-specific data before shutting down the proxy object.
void clearForClose();
- // Update document object of the frame.
- void updateDocument();
-
- // Update the security origin of a document
- // (e.g., after setting docoument.domain).
- void updateSecurityOrigin();
-
- // Destroy the global object.
- void destroyGlobal();
-
// FIXME: Need comment. User Gesture related.
bool inlineCode() const { return m_inlineCode; }
void setInlineCode(bool value) { m_inlineCode = value; }
@@ -168,9 +162,6 @@ namespace WebCore {
bool timerCallback() const { return m_timerCallback; }
void setTimerCallback(bool value) { m_timerCallback = value; }
- // Has the context for this proxy been initialized?
- bool isContextInitialized();
-
// Disconnects the proxy from its owner frame,
// and clears all timeouts on the DOM window.
void disconnectFrame();
@@ -216,11 +207,6 @@ namespace WebCore {
// constructors.
void evaluateInIsolatedWorld(int worldId, const Vector<ScriptSourceCode>& sources, int extensionGroup);
- // Evaluate JavaScript in a new context. The script gets its own global scope
- // and its own prototypes for intrinsic JavaScript objects (String, Array,
- // and so-on). It shares the wrappers for all DOM nodes and DOM constructors.
- void evaluateInNewContext(const Vector<ScriptSourceCode>&, int extensionGroup);
-
// Evaluate a script file in the current execution environment.
// The caller must hold an execution context.
// If cannot evalute the script, it returns an error.
@@ -239,16 +225,6 @@ namespace WebCore {
// Call the function as constructor with the given arguments.
v8::Local<v8::Value> newInstance(v8::Handle<v8::Function>, int argc, v8::Handle<v8::Value> argv[]);
- // To create JS Wrapper objects, we create a cache of a 'boiler plate'
- // object, and then simply Clone that object each time we need a new one.
- // This is faster than going through the full object creation process.
- v8::Local<v8::Object> createWrapperFromCache(V8ClassIndex::V8WrapperType type)
- {
- int classIndex = V8ClassIndex::ToInt(type);
- v8::Local<v8::Object> clone(m_wrapperBoilerplates->CloneElementAt(classIndex));
- return clone.IsEmpty() ? createWrapperFromCacheSlowCase(type) : clone;
- }
-
// Returns the window object associated with a context.
static DOMWindow* retrieveWindow(v8::Handle<v8::Context>);
// Returns V8Proxy object of the currently executing context.
@@ -305,13 +281,6 @@ namespace WebCore {
// is disabled and it returns true.
static bool handleOutOfMemory();
- // Check if the active execution context can access the target frame.
- static bool canAccessFrame(Frame*, bool reportError);
-
- // Check if it is safe to access the given node from the
- // current security context.
- static bool checkNodeSecurity(Node*);
-
static v8::Handle<v8::Value> checkNewLegal(const v8::Arguments&);
static v8::Handle<v8::Script> compileScript(v8::Handle<v8::String> code, const String& fileName, int baseLine);
@@ -350,13 +319,12 @@ namespace WebCore {
v8::Local<v8::Context> context();
v8::Local<v8::Context> mainWorldContext();
+ // FIXME: This should eventually take DOMWrapperWorld argument!
+ V8DOMWindowShell* windowShell() const { return m_windowShell.get(); }
+
bool setContextDebugId(int id);
static int contextDebugId(v8::Handle<v8::Context>);
- static v8::Handle<v8::Value> getHiddenObjectPrototype(v8::Handle<v8::Context>);
- // WARNING: Call |installHiddenObjectPrototype| only on fresh contexts!
- static void installHiddenObjectPrototype(v8::Handle<v8::Context>);
-
// Registers a v8 extension to be available on webpages. The two forms
// offer various restrictions on what types of contexts the extension is
// loaded into. If a scheme is provided, only pages whose URL has the given
@@ -367,27 +335,15 @@ namespace WebCore {
static void registerExtension(v8::Extension*, const String& schemeRestriction);
static void registerExtension(v8::Extension*, int extensionGroup);
- // FIXME: Separate these concerns from V8Proxy?
- v8::Persistent<v8::Context> createNewContext(v8::Handle<v8::Object> global, int extensionGroup);
- static bool installDOMWindow(v8::Handle<v8::Context> context, DOMWindow* window);
-
- void initContextIfNeeded();
- void updateDocumentWrapper(v8::Handle<v8::Value> wrapper);
-
- private:
- void setSecurityToken();
- void clearDocumentWrapper();
+ static void registerExtensionWithV8(v8::Extension*);
+ static bool registeredExtensionWithV8(v8::Extension*);
- // The JavaScript wrapper for the document object is cached on the global
- // object for fast access. UpdateDocumentWrapperCache sets the wrapper
- // for the current document on the global object. ClearDocumentWrapperCache
- // deletes the document wrapper from the global object.
- void updateDocumentWrapperCache();
- void clearDocumentWrapperCache();
+ static const V8Extensions& extensions() { return m_extensions; }
- // Dispose global handles of m_contexts and friends.
- void disposeContextHandles();
+ // Report an unsafe attempt to access the given frame on the console.
+ static void reportUnsafeAccessTo(Frame* target, DelayReporting delay);
+ private:
// If m_recursionCount is 0, let LocalStorage know so we can release
// the storage mutex.
void releaseStorageMutex();
@@ -397,8 +353,6 @@ namespace WebCore {
// Returns false when we're out of memory in V8.
bool setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContext);
- static bool canAccessPrivate(DOMWindow*);
-
static const char* rangeExceptionName(int exceptionCode);
static const char* eventExceptionName(int exceptionCode);
static const char* xmlHttpRequestExceptionName(int exceptionCode);
@@ -422,24 +376,11 @@ namespace WebCore {
return v8::Local<v8::Context>::New(m_utilityContext);
}
- v8::Local<v8::Object> createWrapperFromCacheSlowCase(V8ClassIndex::V8WrapperType);
-
- static void registerExtensionWithV8(v8::Extension*);
- static bool registeredExtensionWithV8(v8::Extension*);
-
Frame* m_frame;
- v8::Persistent<v8::Context> m_context;
-
- // For each possible type of wrapper, we keep a boilerplate object.
- // The boilerplate is used to create additional wrappers of the same
- // type. We keep a single persistent handle to an array of the
- // activated boilerplates.
- v8::Persistent<v8::Array> m_wrapperBoilerplates;
-
- v8::Persistent<v8::Object> m_global;
- v8::Persistent<v8::Value> m_document;
-
+ // For the moment, we have one of these. Soon we will have one per DOMWrapperWorld.
+ RefPtr<V8DOMWindowShell> m_windowShell;
+
// Utility context holding JavaScript functions used internally.
static v8::Persistent<v8::Context> m_utilityContext;
@@ -468,7 +409,10 @@ namespace WebCore {
// Note: although the pointer is raw, the instance is kept alive by a strong
// reference to the v8 context it contains, which is not made weak until we
// call world->destroy().
- typedef HashMap<int, V8IsolatedWorld*> IsolatedWorldMap;
+ //
+ // FIXME: We want to eventually be holding window shells instead of the
+ // IsolatedContext directly.
+ typedef HashMap<int, V8IsolatedContext*> IsolatedWorldMap;
IsolatedWorldMap m_isolatedWorlds;
};
diff --git a/WebCore/bindings/v8/V8SVGPODTypeWrapper.h b/WebCore/bindings/v8/V8SVGPODTypeWrapper.h
index b6e47af..d4cdcf8 100644
--- a/WebCore/bindings/v8/V8SVGPODTypeWrapper.h
+++ b/WebCore/bindings/v8/V8SVGPODTypeWrapper.h
@@ -51,6 +51,11 @@ public:
virtual ~V8SVGPODTypeWrapper() { }
virtual operator PODType() = 0;
virtual void commitChange(PODType, SVGElement*) = 0;
+
+ static V8SVGPODTypeWrapper<PODType>* toNative(v8::Handle<v8::Object> object)
+ {
+ return reinterpret_cast<V8SVGPODTypeWrapper<PODType>*>(object->GetPointerFromInternalField(v8DOMWrapperObjectIndex));
+ }
};
template<typename PODType>
@@ -59,7 +64,7 @@ public:
typedef SVGPODListItem<PODType> PODListItemPtrType;
typedef PODType (SVGPODListItem<PODType>::*GetterMethod)() const;
- typedef void (SVGPODListItem<PODType>::*SetterMethod)(PODType);
+ typedef void (SVGPODListItem<PODType>::*SetterMethod)(const PODType&);
static PassRefPtr<V8SVGPODTypeWrapperCreatorForList> create(PassRefPtr<PODListItemPtrType> creator, const QualifiedName& attributeName)
{
@@ -197,7 +202,7 @@ template<typename PODType, typename PODTypeCreator>
class V8SVGDynamicPODTypeWrapper : public V8SVGPODTypeWrapper<PODType> {
public:
typedef PODType (PODTypeCreator::*GetterMethod)() const;
- typedef void (PODTypeCreator::*SetterMethod)(PODType);
+ typedef void (PODTypeCreator::*SetterMethod)(const PODType&);
typedef void (*CacheRemovalCallback)(V8SVGPODTypeWrapper<PODType>*);
static PassRefPtr<V8SVGDynamicPODTypeWrapper> create(PassRefPtr<PODTypeCreator> creator, GetterMethod getter, SetterMethod setter, CacheRemovalCallback cacheRemovalCallback)
@@ -247,7 +252,7 @@ private:
template<typename PODType, typename PODTypeCreator>
struct PODTypeWrapperCacheInfo {
typedef PODType (PODTypeCreator::*GetterMethod)() const;
- typedef void (PODTypeCreator::*SetterMethod)(PODType);
+ typedef void (PODTypeCreator::*SetterMethod)(const PODType&);
// Empty value
PODTypeWrapperCacheInfo()
@@ -338,7 +343,7 @@ template<typename PODType, typename PODTypeCreator>
class V8SVGDynamicPODTypeWrapperCache {
public:
typedef PODType (PODTypeCreator::*GetterMethod)() const;
- typedef void (PODTypeCreator::*SetterMethod)(PODType);
+ typedef void (PODTypeCreator::*SetterMethod)(const PODType&);
typedef PODTypeWrapperCacheInfo<PODType, PODTypeCreator> CacheInfo;
typedef PODTypeWrapperCacheInfoHash<PODType, PODTypeCreator> CacheInfoHash;
@@ -397,14 +402,12 @@ public:
template <class P>
P V8SVGPODTypeUtil::toSVGPODType(V8ClassIndex::V8WrapperType type, v8::Handle<v8::Value> object, bool& ok)
{
- void *wrapper = V8DOMWrapper::convertToSVGPODTypeImpl(type, object);
- if (wrapper == NULL) {
+ if (!V8DOMWrapper::isWrapperOfType(object, type)) {
ok = false;
return P();
- } else {
- ok = true;
- return *static_cast<V8SVGPODTypeWrapper<P>*>(wrapper);
}
+ ok = true;
+ return *V8SVGPODTypeWrapper<P>::toNative(v8::Handle<v8::Object>::Cast(object));
}
} // namespace WebCore
diff --git a/WebCore/bindings/v8/V8Utilities.cpp b/WebCore/bindings/v8/V8Utilities.cpp
index c547cc7..fb1ecaa 100644
--- a/WebCore/bindings/v8/V8Utilities.cpp
+++ b/WebCore/bindings/v8/V8Utilities.cpp
@@ -134,13 +134,15 @@ ScriptExecutionContext* getScriptExecutionContext(ScriptState* scriptState)
return proxy->workerContext()->scriptExecutionContext();
#endif
- if (scriptState)
- return scriptState->frame()->document()->scriptExecutionContext();
- else {
- Frame* frame = V8Proxy::retrieveFrameForCurrentContext();
- if (frame)
- return frame->document()->scriptExecutionContext();
- }
+ Frame* frame;
+ if (scriptState) {
+ v8::HandleScope handleScope;
+ frame = V8Proxy::retrieveFrame(scriptState->context());
+ } else
+ frame = V8Proxy::retrieveFrameForCurrentContext();
+
+ if (frame)
+ return frame->document()->scriptExecutionContext();
return 0;
}
@@ -170,7 +172,7 @@ void reportException(ScriptState* scriptState, v8::TryCatch& exceptionCatcher)
ScriptExecutionContext* context = getScriptExecutionContext(scriptState);
// During the frame teardown, there may not be a valid context.
if (context && !context->isDocument())
- context->reportException(errorMessage, lineNumber, sourceURL);
+ context->reportException(errorMessage, lineNumber, sourceURL);
exceptionCatcher.Reset();
}
diff --git a/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp b/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp
index 412fde0..ac677a2 100644
--- a/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp
+++ b/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp
@@ -38,6 +38,7 @@
#include "DOMCoreException.h"
#include "DedicatedWorkerContext.h"
#include "Event.h"
+#include "EventSource.h"
#include "Notification.h"
#include "NotificationCenter.h"
#include "EventException.h"
@@ -49,6 +50,7 @@
#include "V8DOMMap.h"
#include "V8Index.h"
#include "V8Proxy.h"
+#include "V8WorkerContext.h"
#include "V8WorkerContextEventListener.h"
#if ENABLE(WEB_SOCKETS)
#include "WebSocket.h"
@@ -109,7 +111,7 @@ WorkerContextExecutionProxy* WorkerContextExecutionProxy::retrieve()
// Return 0 if the current executing context is not the worker context.
if (global.IsEmpty())
return 0;
- WorkerContext* workerContext = V8DOMWrapper::convertToNativeObject<WorkerContext>(V8ClassIndex::WORKERCONTEXT, global);
+ WorkerContext* workerContext = V8WorkerContext::toNative(global);
return workerContext->script()->proxy();
}
@@ -319,6 +321,18 @@ v8::Handle<v8::Value> WorkerContextExecutionProxy::convertEventTargetToV8Object(
if (mp)
return convertToV8Object(V8ClassIndex::MESSAGEPORT, mp);
+#if ENABLE(WEB_SOCKETS)
+ WebSocket* webSocket = target->toWebSocket();
+ if (webSocket)
+ return convertToV8Object(V8ClassIndex::WEBSOCKET, webSocket);
+#endif
+
+#if ENABLE(EVENTSOURCE)
+ EventSource* eventSource = target->toEventSource();
+ if (eventSource)
+ return convertToV8Object(V8ClassIndex::EVENTSOURCE, eventSource);
+#endif
+
ASSERT_NOT_REACHED();
return v8::Handle<v8::Value>();
}
diff --git a/WebCore/bindings/v8/WorldContextHandle.cpp b/WebCore/bindings/v8/WorldContextHandle.cpp
index eb83586..7ba76d3 100644
--- a/WebCore/bindings/v8/WorldContextHandle.cpp
+++ b/WebCore/bindings/v8/WorldContextHandle.cpp
@@ -31,7 +31,7 @@
#include "config.h"
#include "WorldContextHandle.h"
-#include "V8IsolatedWorld.h"
+#include "V8IsolatedContext.h"
namespace WebCore {
@@ -41,8 +41,8 @@ WorldContextHandle::WorldContextHandle(WorldToUse worldToUse)
if (worldToUse == UseMainWorld)
return;
- if (V8IsolatedWorld* world = V8IsolatedWorld::getEntered())
- m_context = world->sharedContext();
+ if (V8IsolatedContext* context = V8IsolatedContext::getEntered())
+ m_context = context->sharedContext();
}
v8::Local<v8::Context> WorldContextHandle::adjustedContext(V8Proxy* proxy) const
diff --git a/WebCore/bindings/v8/custom/V8AbstractWorkerCustom.cpp b/WebCore/bindings/v8/custom/V8AbstractWorkerCustom.cpp
index 0240895..6b8f195 100644
--- a/WebCore/bindings/v8/custom/V8AbstractWorkerCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8AbstractWorkerCustom.cpp
@@ -31,9 +31,9 @@
#include "config.h"
#if ENABLE(WORKERS)
+#include "V8AbstractWorker.h"
#include "AbstractWorker.h"
-
#include "ExceptionCode.h"
#include "ScriptExecutionContext.h"
#include "V8Binding.h"
@@ -44,10 +44,10 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(AbstractWorkerAddEventListener)
+v8::Handle<v8::Value> V8AbstractWorker::addEventListenerCallback(const v8::Arguments& args)
{
INC_STATS(L"DOM.AbstractWorker.addEventListener()");
- AbstractWorker* worker = V8DOMWrapper::convertToNativeObject<AbstractWorker>(V8ClassIndex::ABSTRACTWORKER, args.Holder());
+ AbstractWorker* worker = V8AbstractWorker::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(worker, args[1], false, ListenerFindOrCreate);
if (listener) {
@@ -55,15 +55,15 @@ CALLBACK_FUNC_DECL(AbstractWorkerAddEventListener)
bool useCapture = args[2]->BooleanValue();
worker->addEventListener(type, listener, useCapture);
- createHiddenDependency(args.Holder(), args[1], V8Custom::kAbstractWorkerRequestCacheIndex);
+ createHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(AbstractWorkerRemoveEventListener)
+v8::Handle<v8::Value> V8AbstractWorker::removeEventListenerCallback(const v8::Arguments& args)
{
INC_STATS(L"DOM.AbstractWorker.removeEventListener()");
- AbstractWorker* worker = V8DOMWrapper::convertToNativeObject<AbstractWorker>(V8ClassIndex::ABSTRACTWORKER, args.Holder());
+ AbstractWorker* worker = V8AbstractWorker::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(worker, args[1], false, ListenerFindOnly);
if (listener) {
@@ -71,7 +71,7 @@ CALLBACK_FUNC_DECL(AbstractWorkerRemoveEventListener)
bool useCapture = args[2]->BooleanValue();
worker->removeEventListener(type, listener.get(), useCapture);
- removeHiddenDependency(args.Holder(), args[1], V8Custom::kAbstractWorkerRequestCacheIndex);
+ removeHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
diff --git a/WebCore/bindings/v8/custom/V8AttrCustom.cpp b/WebCore/bindings/v8/custom/V8AttrCustom.cpp
index 81f1586..7bec619 100644
--- a/WebCore/bindings/v8/custom/V8AttrCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8AttrCustom.cpp
@@ -29,24 +29,25 @@
*/
#include "config.h"
-#include "Attr.h"
+#include "V8Attr.h"
+#include "Attr.h"
#include "Element.h"
#include "ExceptionCode.h"
-
#include "V8Binding.h"
+#include "V8BindingState.h"
#include "V8CustomBinding.h"
#include "V8Proxy.h"
namespace WebCore {
-ACCESSOR_SETTER(AttrValue)
+void V8Attr::valueAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
- Attr* imp = V8DOMWrapper::convertDOMWrapperToNode<Attr>(info.Holder());
+ Attr* imp = V8Attr::toNative(info.Holder());
String attrValue = toWebCoreStringWithNullCheck(value);
Element* ownerElement = imp->ownerElement();
- if (ownerElement && !allowSettingSrcToJavascriptURL(ownerElement, imp->name(), attrValue))
+ if (ownerElement && !V8BindingSecurity::allowSettingSrcToJavascriptURL(V8BindingState::Only(), ownerElement, imp->name(), attrValue))
return;
ExceptionCode ec = 0;
diff --git a/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp b/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp
index 6bd0035..25d141a 100644
--- a/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp
@@ -29,9 +29,10 @@
*/
#include "config.h"
-#include "CSSStyleDeclaration.h"
+#include "V8CSSStyleDeclaration.h"
#include "CSSParser.h"
+#include "CSSStyleDeclaration.h"
#include "CSSValue.h"
#include "CSSPrimitiveValue.h"
#include "EventTarget.h"
@@ -152,7 +153,7 @@ static CSSPropertyInfo* cssPropertyInfo(v8::Handle<v8::String>v8PropertyName)
return propInfo;
}
-NAMED_PROPERTY_GETTER(CSSStyleDeclaration)
+v8::Handle<v8::Value> V8CSSStyleDeclaration::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.CSSStyleDeclaration.NamedPropertyGetter");
// First look for API defined attributes on the style declaration object.
@@ -160,8 +161,7 @@ NAMED_PROPERTY_GETTER(CSSStyleDeclaration)
return notHandledByInterceptor();
// Search the style declaration.
- CSSStyleDeclaration* imp =
- V8DOMWrapper::convertToNativeObject<CSSStyleDeclaration>(V8ClassIndex::CSSSTYLEDECLARATION, info.Holder());
+ CSSStyleDeclaration* imp = V8CSSStyleDeclaration::toNative(info.Holder());
CSSPropertyInfo* propInfo = cssPropertyInfo(name);
// Do not handle non-property names.
@@ -191,12 +191,10 @@ NAMED_PROPERTY_GETTER(CSSStyleDeclaration)
return v8String(result);
}
-NAMED_PROPERTY_SETTER(CSSStyleDeclaration)
+v8::Handle<v8::Value> V8CSSStyleDeclaration::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.CSSStyleDeclaration.NamedPropertySetter");
- CSSStyleDeclaration* imp =
- V8DOMWrapper::convertToNativeObject<CSSStyleDeclaration>(
- V8ClassIndex::CSSSTYLEDECLARATION, info.Holder());
+ CSSStyleDeclaration* imp = V8CSSStyleDeclaration::toNative(info.Holder());
CSSPropertyInfo* propInfo = cssPropertyInfo(name);
if (!propInfo)
return notHandledByInterceptor();
diff --git a/WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp b/WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp
index 676610c..b45ef35 100644
--- a/WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp
@@ -29,9 +29,10 @@
*/
#include "config.h"
-#include "CanvasRenderingContext2D.h"
+#include "V8CanvasRenderingContext2D.h"
#include "CanvasGradient.h"
+#include "CanvasRenderingContext2D.h"
#include "CanvasPattern.h"
#include "CanvasStyle.h"
#include "ExceptionCode.h"
@@ -44,6 +45,7 @@
#include "V8HTMLCanvasElement.h"
#include "V8HTMLImageElement.h"
#include "V8HTMLVideoElement.h"
+#include "V8ImageData.h"
#include "V8Proxy.h"
namespace WebCore {
@@ -65,44 +67,44 @@ static PassRefPtr<CanvasStyle> toCanvasStyle(v8::Handle<v8::Value> value)
return CanvasStyle::create(toWebCoreString(value));
if (V8CanvasGradient::HasInstance(value))
- return CanvasStyle::create(V8DOMWrapper::convertDOMWrapperToNative<CanvasGradient>(v8::Handle<v8::Object>::Cast(value)));
+ return CanvasStyle::create(V8CanvasGradient::toNative(v8::Handle<v8::Object>::Cast(value)));
if (V8CanvasPattern::HasInstance(value))
- return CanvasStyle::create(V8DOMWrapper::convertDOMWrapperToNative<CanvasPattern>(v8::Handle<v8::Object>::Cast(value)));
+ return CanvasStyle::create(V8CanvasPattern::toNative(v8::Handle<v8::Object>::Cast(value)));
return 0;
}
-ACCESSOR_GETTER(CanvasRenderingContext2DStrokeStyle)
+v8::Handle<v8::Value> V8CanvasRenderingContext2D::strokeStyleAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
- CanvasRenderingContext2D* impl = V8DOMWrapper::convertDOMWrapperToNative<CanvasRenderingContext2D>(info.Holder());
+ CanvasRenderingContext2D* impl = V8CanvasRenderingContext2D::toNative(info.Holder());
return toV8(impl->strokeStyle());
}
-ACCESSOR_SETTER(CanvasRenderingContext2DStrokeStyle)
+void V8CanvasRenderingContext2D::strokeStyleAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
- CanvasRenderingContext2D* impl = V8DOMWrapper::convertDOMWrapperToNative<CanvasRenderingContext2D>(info.Holder());
+ CanvasRenderingContext2D* impl = V8CanvasRenderingContext2D::toNative(info.Holder());
impl->setStrokeStyle(toCanvasStyle(value));
}
-ACCESSOR_GETTER(CanvasRenderingContext2DFillStyle)
+v8::Handle<v8::Value> V8CanvasRenderingContext2D::fillStyleAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
- CanvasRenderingContext2D* impl = V8DOMWrapper::convertDOMWrapperToNative<CanvasRenderingContext2D>(info.Holder());
+ CanvasRenderingContext2D* impl = V8CanvasRenderingContext2D::toNative(info.Holder());
return toV8(impl->fillStyle());
}
-ACCESSOR_SETTER(CanvasRenderingContext2DFillStyle)
+void V8CanvasRenderingContext2D::fillStyleAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
- CanvasRenderingContext2D* impl = V8DOMWrapper::convertDOMWrapperToNative<CanvasRenderingContext2D>(info.Holder());
+ CanvasRenderingContext2D* impl = V8CanvasRenderingContext2D::toNative(info.Holder());
impl->setFillStyle(toCanvasStyle(value));
}
// TODO: SetStrokeColor and SetFillColor are similar except function names,
// consolidate them into one.
-CALLBACK_FUNC_DECL(CanvasRenderingContext2DSetStrokeColor)
+v8::Handle<v8::Value> V8CanvasRenderingContext2D::setStrokeColorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.CanvasRenderingContext2D.setStrokeColor()");
- CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+ CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
switch (args.Length()) {
case 1:
if (args[0]->IsString())
@@ -129,10 +131,10 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DSetStrokeColor)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(CanvasRenderingContext2DSetFillColor)
+v8::Handle<v8::Value> V8CanvasRenderingContext2D::setFillColorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.CanvasRenderingContext2D.setFillColor()");
- CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+ CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
switch (args.Length()) {
case 1:
if (args[0]->IsString())
@@ -159,10 +161,10 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DSetFillColor)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(CanvasRenderingContext2DStrokeRect)
+v8::Handle<v8::Value> V8CanvasRenderingContext2D::strokeRectCallback(const v8::Arguments& args)
{
INC_STATS("DOM.CanvasRenderingContext2D.strokeRect()");
- CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+ CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
if (args.Length() == 5)
context->strokeRect(toFloat(args[0]), toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]));
else if (args.Length() == 4)
@@ -174,10 +176,10 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DStrokeRect)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(CanvasRenderingContext2DSetShadow)
+v8::Handle<v8::Value> V8CanvasRenderingContext2D::setShadowCallback(const v8::Arguments& args)
{
INC_STATS("DOM.CanvasRenderingContext2D.setShadow()");
- CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+ CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
switch (args.Length()) {
case 3:
@@ -209,29 +211,29 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DSetShadow)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(CanvasRenderingContext2DDrawImage)
+v8::Handle<v8::Value> V8CanvasRenderingContext2D::drawImageCallback(const v8::Arguments& args)
{
INC_STATS("DOM.CanvasRenderingContext2D.drawImage()");
- CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+ CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
v8::Handle<v8::Value> arg = args[0];
if (V8HTMLImageElement::HasInstance(arg)) {
ExceptionCode ec = 0;
- HTMLImageElement* image_element = V8DOMWrapper::convertDOMWrapperToNode<HTMLImageElement>(v8::Handle<v8::Object>::Cast(arg));
+ HTMLImageElement* imageElement = V8HTMLImageElement::toNative(v8::Handle<v8::Object>::Cast(arg));
switch (args.Length()) {
case 3:
- context->drawImage(image_element, toFloat(args[1]), toFloat(args[2]));
+ context->drawImage(imageElement, toFloat(args[1]), toFloat(args[2]));
break;
case 5:
- context->drawImage(image_element, toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), ec);
+ context->drawImage(imageElement, toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), ec);
if (ec != 0) {
V8Proxy::setDOMException(ec);
return notHandledByInterceptor();
}
break;
case 9:
- context->drawImage(image_element,
+ context->drawImage(imageElement,
FloatRect(toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4])),
FloatRect(toFloat(args[5]), toFloat(args[6]), toFloat(args[7]), toFloat(args[8])),
ec);
@@ -249,20 +251,20 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DDrawImage)
// HTMLCanvasElement
if (V8HTMLCanvasElement::HasInstance(arg)) {
ExceptionCode ec = 0;
- HTMLCanvasElement* canvas_element = V8DOMWrapper::convertDOMWrapperToNode<HTMLCanvasElement>(v8::Handle<v8::Object>::Cast(arg));
+ HTMLCanvasElement* canvasElement = V8HTMLCanvasElement::toNative(v8::Handle<v8::Object>::Cast(arg));
switch (args.Length()) {
case 3:
- context->drawImage(canvas_element, toFloat(args[1]), toFloat(args[2]));
+ context->drawImage(canvasElement, toFloat(args[1]), toFloat(args[2]));
break;
case 5:
- context->drawImage(canvas_element, toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), ec);
+ context->drawImage(canvasElement, toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), ec);
if (ec != 0) {
V8Proxy::setDOMException(ec);
return notHandledByInterceptor();
}
break;
case 9:
- context->drawImage(canvas_element,
+ context->drawImage(canvasElement,
FloatRect(toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4])),
FloatRect(toFloat(args[5]), toFloat(args[6]), toFloat(args[7]), toFloat(args[8])),
ec);
@@ -281,20 +283,20 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DDrawImage)
// HTMLVideoElement
if (V8HTMLVideoElement::HasInstance(arg)) {
ExceptionCode ec = 0;
- HTMLVideoElement* video_element = V8DOMWrapper::convertDOMWrapperToNode<HTMLVideoElement>(v8::Handle<v8::Object>::Cast(arg));
+ HTMLVideoElement* videoElement = V8HTMLVideoElement::toNative(v8::Handle<v8::Object>::Cast(arg));
switch (args.Length()) {
case 3:
- context->drawImage(video_element, toFloat(args[1]), toFloat(args[2]));
+ context->drawImage(videoElement, toFloat(args[1]), toFloat(args[2]));
break;
case 5:
- context->drawImage(video_element, toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), ec);
+ context->drawImage(videoElement, toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), ec);
if (ec != 0) {
V8Proxy::setDOMException(ec);
return notHandledByInterceptor();
}
break;
case 9:
- context->drawImage(video_element,
+ context->drawImage(videoElement,
FloatRect(toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4])),
FloatRect(toFloat(args[5]), toFloat(args[6]), toFloat(args[7]), toFloat(args[8])),
ec);
@@ -314,33 +316,34 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DDrawImage)
return notHandledByInterceptor();
}
-CALLBACK_FUNC_DECL(CanvasRenderingContext2DDrawImageFromRect)
+
+v8::Handle<v8::Value> V8CanvasRenderingContext2D::drawImageFromRectCallback(const v8::Arguments& args)
{
INC_STATS("DOM.CanvasRenderingContext2D.drawImageFromRect()");
- CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+ CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
v8::Handle<v8::Value> arg = args[0];
if (V8HTMLImageElement::HasInstance(arg)) {
- HTMLImageElement* image_element = V8DOMWrapper::convertDOMWrapperToNode<HTMLImageElement>(v8::Handle<v8::Object>::Cast(arg));
- context->drawImageFromRect(image_element, toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), toFloat(args[5]), toFloat(args[6]), toFloat(args[7]), toFloat(args[8]), toWebCoreString(args[9]));
+ HTMLImageElement* imageElement = V8HTMLImageElement::toNative(v8::Handle<v8::Object>::Cast(arg));
+ context->drawImageFromRect(imageElement, toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), toFloat(args[5]), toFloat(args[6]), toFloat(args[7]), toFloat(args[8]), toWebCoreString(args[9]));
} else
V8Proxy::throwError(V8Proxy::TypeError, "drawImageFromRect: Invalid type of arguments");
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(CanvasRenderingContext2DCreatePattern)
+v8::Handle<v8::Value> V8CanvasRenderingContext2D::createPatternCallback(const v8::Arguments& args)
{
INC_STATS("DOM.CanvasRenderingContext2D.createPattern()");
- CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+ CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
v8::Handle<v8::Value> arg = args[0];
if (V8HTMLImageElement::HasInstance(arg)) {
- HTMLImageElement* image_element = V8DOMWrapper::convertDOMWrapperToNode<HTMLImageElement>(v8::Handle<v8::Object>::Cast(arg));
+ HTMLImageElement* imageElement = V8HTMLImageElement::toNative(v8::Handle<v8::Object>::Cast(arg));
ExceptionCode ec = 0;
- RefPtr<CanvasPattern> pattern = context->createPattern(image_element, toWebCoreStringWithNullCheck(args[1]), ec);
+ RefPtr<CanvasPattern> pattern = context->createPattern(imageElement, toWebCoreStringWithNullCheck(args[1]), ec);
if (ec != 0) {
V8Proxy::setDOMException(ec);
return notHandledByInterceptor();
@@ -349,9 +352,9 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DCreatePattern)
}
if (V8HTMLCanvasElement::HasInstance(arg)) {
- HTMLCanvasElement* canvas_element = V8DOMWrapper::convertDOMWrapperToNode<HTMLCanvasElement>(v8::Handle<v8::Object>::Cast(arg));
+ HTMLCanvasElement* canvasElement = V8HTMLCanvasElement::toNative(v8::Handle<v8::Object>::Cast(arg));
ExceptionCode ec = 0;
- RefPtr<CanvasPattern> pattern = context->createPattern(canvas_element, toWebCoreStringWithNullCheck(args[1]), ec);
+ RefPtr<CanvasPattern> pattern = context->createPattern(canvasElement, toWebCoreStringWithNullCheck(args[1]), ec);
if (ec != 0) {
V8Proxy::setDOMException(ec);
return notHandledByInterceptor();
@@ -363,11 +366,11 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DCreatePattern)
return notHandledByInterceptor();
}
-CALLBACK_FUNC_DECL(CanvasRenderingContext2DFillText)
+v8::Handle<v8::Value> V8CanvasRenderingContext2D::fillTextCallback(const v8::Arguments& args)
{
INC_STATS("DOM.CanvasRenderingContext2D.fillText()");
- CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+ CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
// Two forms:
// * fillText(text, x, y)
@@ -390,10 +393,10 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DFillText)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(CanvasRenderingContext2DStrokeText)
+v8::Handle<v8::Value> V8CanvasRenderingContext2D::strokeTextCallback(const v8::Arguments& args)
{
INC_STATS("DOM.CanvasRenderingContext2D.strokeText()");
- CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+ CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
// Two forms:
// * strokeText(text, x, y)
@@ -416,7 +419,7 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DStrokeText)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(CanvasRenderingContext2DPutImageData)
+v8::Handle<v8::Value> V8CanvasRenderingContext2D::putImageDataCallback(const v8::Arguments& args)
{
INC_STATS("DOM.CanvasRenderingContext2D.putImageData()");
@@ -428,16 +431,16 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DPutImageData)
return notHandledByInterceptor();
}
- CanvasRenderingContext2D* context = V8DOMWrapper::convertToNativeObject<CanvasRenderingContext2D>(V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder());
+ CanvasRenderingContext2D* context = V8CanvasRenderingContext2D::toNative(args.Holder());
ImageData* imageData = 0;
// Need to check that the argument is of the correct type, since
- // convertToNativeObject() expects it to be correct. If the argument was incorrect
+ // toNative() expects it to be correct. If the argument was incorrect
// we leave it null, and putImageData() will throw the correct exception
// (TYPE_MISMATCH_ERR).
if (V8DOMWrapper::isWrapperOfType(args[0], V8ClassIndex::IMAGEDATA))
- imageData = V8DOMWrapper::convertToNativeObject<ImageData>(V8ClassIndex::IMAGEDATA, v8::Handle<v8::Object>::Cast(args[0]));
+ imageData = V8ImageData::toNative(v8::Handle<v8::Object>::Cast(args[0]));
ExceptionCode ec = 0;
diff --git a/WebCore/bindings/v8/custom/V8ClipboardCustom.cpp b/WebCore/bindings/v8/custom/V8ClipboardCustom.cpp
index 4526304..5f0b4e3 100644
--- a/WebCore/bindings/v8/custom/V8ClipboardCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8ClipboardCustom.cpp
@@ -29,8 +29,9 @@
*/
#include "config.h"
-#include "Clipboard.h"
+#include "V8Clipboard.h"
+#include "Clipboard.h"
#include "HTMLImageElement.h"
#include "HTMLNames.h"
#include "IntPoint.h"
@@ -44,10 +45,10 @@
namespace WebCore {
-ACCESSOR_GETTER(ClipboardTypes)
+v8::Handle<v8::Value> V8Clipboard::typesAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Clipboard.types()");
- Clipboard* clipboard = V8DOMWrapper::convertToNativeObject<Clipboard>(V8ClassIndex::CLIPBOARD, info.Holder());
+ Clipboard* clipboard = V8Clipboard::toNative(info.Holder());
HashSet<String> types = clipboard->types();
if (types.isEmpty())
@@ -62,10 +63,10 @@ ACCESSOR_GETTER(ClipboardTypes)
return result;
}
-CALLBACK_FUNC_DECL(ClipboardClearData)
+v8::Handle<v8::Value> V8Clipboard::clearDataCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Clipboard.clearData()");
- Clipboard* clipboard = V8DOMWrapper::convertToNativeObject<Clipboard>(V8ClassIndex::CLIPBOARD, args.Holder());
+ Clipboard* clipboard = V8Clipboard::toNative(args.Holder());
if (!args.Length()) {
clipboard->clearAllData();
@@ -80,10 +81,10 @@ CALLBACK_FUNC_DECL(ClipboardClearData)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(ClipboardGetData)
+v8::Handle<v8::Value> V8Clipboard::getDataCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Clipboard.getData()");
- Clipboard* clipboard = V8DOMWrapper::convertToNativeObject<Clipboard>(V8ClassIndex::CLIPBOARD, args.Holder());
+ Clipboard* clipboard = V8Clipboard::toNative(args.Holder());
if (args.Length() != 1)
return throwError("getData: Invalid number of arguments", V8Proxy::SyntaxError);
@@ -96,10 +97,10 @@ CALLBACK_FUNC_DECL(ClipboardGetData)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(ClipboardSetData)
+v8::Handle<v8::Value> V8Clipboard::setDataCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Clipboard.setData()");
- Clipboard* clipboard = V8DOMWrapper::convertToNativeObject<Clipboard>(V8ClassIndex::CLIPBOARD, args.Holder());
+ Clipboard* clipboard = V8Clipboard::toNative(args.Holder());
if (args.Length() != 2)
return throwError("setData: Invalid number of arguments", V8Proxy::SyntaxError);
@@ -109,10 +110,10 @@ CALLBACK_FUNC_DECL(ClipboardSetData)
return v8Boolean(clipboard->setData(type, data));
}
-CALLBACK_FUNC_DECL(ClipboardSetDragImage)
+v8::Handle<v8::Value> V8Clipboard::setDragImageCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Clipboard.setDragImage()");
- Clipboard* clipboard = V8DOMWrapper::convertToNativeObject<Clipboard>(V8ClassIndex::CLIPBOARD, args.Holder());
+ Clipboard* clipboard = V8Clipboard::toNative(args.Holder());
if (!clipboard->isForDragging())
return v8::Undefined();
@@ -125,7 +126,7 @@ CALLBACK_FUNC_DECL(ClipboardSetDragImage)
Node* node = 0;
if (V8Node::HasInstance(args[0]))
- node = V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0]));
+ node = V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0]));
if (!node || !node->isElementNode())
return throwError("setDragImageFromElement: Invalid first argument");
diff --git a/WebCore/bindings/v8/custom/V8ConsoleCustom.cpp b/WebCore/bindings/v8/custom/V8ConsoleCustom.cpp
index b44e074..0dbdcd7 100644
--- a/WebCore/bindings/v8/custom/V8ConsoleCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8ConsoleCustom.cpp
@@ -29,6 +29,7 @@
*/
#include "config.h"
+#include "V8Console.h"
#include "V8Binding.h"
#include "V8CustomBinding.h"
@@ -37,7 +38,7 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(ConsoleProfile)
+v8::Handle<v8::Value> V8Console::profileCallback(const v8::Arguments& args)
{
INC_STATS("console.profile()");
v8::HandleScope scope;
@@ -46,7 +47,7 @@ CALLBACK_FUNC_DECL(ConsoleProfile)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(ConsoleProfileEnd)
+v8::Handle<v8::Value> V8Console::profileEndCallback(const v8::Arguments& args)
{
INC_STATS("console.profileEnd()");
v8::V8::PauseProfiler();
diff --git a/WebCore/bindings/v8/custom/V8CoordinatesCustom.cpp b/WebCore/bindings/v8/custom/V8CoordinatesCustom.cpp
index 1c07f29..a5197f5 100644
--- a/WebCore/bindings/v8/custom/V8CoordinatesCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8CoordinatesCustom.cpp
@@ -24,49 +24,50 @@
*/
#include "config.h"
-#include "Coordinates.h"
+#include "V8Coordinates.h"
+#include "Coordinates.h"
#include "V8Binding.h"
#include "V8CustomBinding.h"
#include "V8Proxy.h"
namespace WebCore {
-ACCESSOR_GETTER(CoordinatesAltitude)
+v8::Handle<v8::Value> V8Coordinates::altitudeAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Coordinates.altitude._get");
v8::Handle<v8::Object> holder = info.Holder();
- Coordinates* imp = V8DOMWrapper::convertToNativeObject<Coordinates>(V8ClassIndex::COORDINATES, holder);
+ Coordinates* imp = V8Coordinates::toNative(holder);
if (!imp->canProvideAltitude())
return v8::Null();
return v8::Number::New(imp->altitude());
}
-ACCESSOR_GETTER(CoordinatesAltitudeAccuracy)
+v8::Handle<v8::Value> V8Coordinates::altitudeAccuracyAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Coordinates.altitudeAccuracy._get");
v8::Handle<v8::Object> holder = info.Holder();
- Coordinates* imp = V8DOMWrapper::convertToNativeObject<Coordinates>(V8ClassIndex::COORDINATES, holder);
+ Coordinates* imp = V8Coordinates::toNative(holder);
if (!imp->canProvideAltitudeAccuracy())
return v8::Null();
return v8::Number::New(imp->altitudeAccuracy());
}
-ACCESSOR_GETTER(CoordinatesHeading)
+v8::Handle<v8::Value> V8Coordinates::headingAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Coordinates.heading._get");
v8::Handle<v8::Object> holder = info.Holder();
- Coordinates* imp = V8DOMWrapper::convertToNativeObject<Coordinates>(V8ClassIndex::COORDINATES, holder);
+ Coordinates* imp = V8Coordinates::toNative(holder);
if (!imp->canProvideHeading())
return v8::Null();
return v8::Number::New(imp->heading());
}
-ACCESSOR_GETTER(CoordinatesSpeed)
+v8::Handle<v8::Value> V8Coordinates::speedAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Coordinates.speed._get");
v8::Handle<v8::Object> holder = info.Holder();
- Coordinates* imp = V8DOMWrapper::convertToNativeObject<Coordinates>(V8ClassIndex::COORDINATES, holder);
+ Coordinates* imp = V8Coordinates::toNative(holder);
if (!imp->canProvideSpeed())
return v8::Null();
return v8::Number::New(imp->speed());
diff --git a/WebCore/bindings/v8/custom/V8CustomBinding.cpp b/WebCore/bindings/v8/custom/V8CustomBinding.cpp
deleted file mode 100644
index 510aded..0000000
--- a/WebCore/bindings/v8/custom/V8CustomBinding.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (C) 2007-2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "V8CustomBinding.h"
-
-#include "CSSHelper.h"
-#include "Element.h"
-#include "Document.h"
-#include "DOMWindow.h"
-#include "History.h"
-#include "HTMLNames.h"
-#include "HTMLFrameElementBase.h"
-#include "Location.h"
-#include "V8Proxy.h"
-
-#if ENABLE(SVG)
-#include "SVGPathSeg.h"
-#endif
-
-namespace WebCore {
-
-bool allowSettingFrameSrcToJavascriptUrl(HTMLFrameElementBase* frame, String value)
-{
- if (protocolIs(deprecatedParseURL(value), "javascript")) {
- Node* contentDoc = frame->contentDocument();
- if (contentDoc && !V8Proxy::checkNodeSecurity(contentDoc))
- return false;
- }
- return true;
-}
-
-bool allowSettingSrcToJavascriptURL(Element* element, String name, String value)
-{
- if ((element->hasTagName(HTMLNames::iframeTag) || element->hasTagName(HTMLNames::frameTag)) && equalIgnoringCase(name, "src"))
- return allowSettingFrameSrcToJavascriptUrl(static_cast<HTMLFrameElementBase*>(element), value);
- return true;
-}
-
-// DOMImplementation is a singleton in WebCore. If we use our normal
-// mapping from DOM objects to V8 wrappers, the same wrapper will be
-// shared for all frames in the same process. This is a major
-// security problem. Therefore, we generate a DOMImplementation
-// wrapper per document and store it in an internal field of the
-// document. Since the DOMImplementation object is a singleton, we do
-// not have to do anything to keep the DOMImplementation object alive
-// for the lifetime of the wrapper.
-ACCESSOR_GETTER(DocumentImplementation)
-{
- ASSERT(info.Holder()->InternalFieldCount() >= kDocumentMinimumInternalFieldCount);
-
- // Check if the internal field already contains a wrapper.
- v8::Local<v8::Value> implementation = info.Holder()->GetInternalField(kDocumentImplementationIndex);
- if (!implementation->IsUndefined())
- return implementation;
-
- // Generate a wrapper.
- Document* document = V8DOMWrapper::convertDOMWrapperToNative<Document>(info.Holder());
- v8::Handle<v8::Value> wrapper = V8DOMWrapper::convertDOMImplementationToV8Object(document->implementation());
-
- // Store the wrapper in the internal field.
- info.Holder()->SetInternalField(kDocumentImplementationIndex, wrapper);
-
- return wrapper;
-}
-
-// --------------- Security Checks -------------------------
-INDEXED_ACCESS_CHECK(History)
-{
- ASSERT(V8ClassIndex::FromInt(data->Int32Value()) == V8ClassIndex::HISTORY);
- // Only allow same origin access.
- History* history = V8DOMWrapper::convertToNativeObject<History>(V8ClassIndex::HISTORY, host);
- return V8Proxy::canAccessFrame(history->frame(), false);
-}
-
-NAMED_ACCESS_CHECK(History)
-{
- ASSERT(V8ClassIndex::FromInt(data->Int32Value()) == V8ClassIndex::HISTORY);
- // Only allow same origin access.
- History* history = V8DOMWrapper::convertToNativeObject<History>(V8ClassIndex::HISTORY, host);
- return V8Proxy::canAccessFrame(history->frame(), false);
-}
-
-#undef INDEXED_ACCESS_CHECK
-#undef NAMED_ACCESS_CHECK
-#undef NAMED_PROPERTY_GETTER
-#undef NAMED_PROPERTY_SETTER
-
-Frame* V8Custom::GetTargetFrame(v8::Local<v8::Object> host, v8::Local<v8::Value> data)
-{
- Frame* target = 0;
- switch (V8ClassIndex::FromInt(data->Int32Value())) {
- case V8ClassIndex::DOMWINDOW: {
- v8::Handle<v8::Object> window = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::DOMWINDOW, host);
- if (window.IsEmpty())
- return target;
-
- DOMWindow* targetWindow = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, window);
- target = targetWindow->frame();
- break;
- }
- case V8ClassIndex::LOCATION: {
- History* history = V8DOMWrapper::convertToNativeObject<History>(V8ClassIndex::HISTORY, host);
- target = history->frame();
- break;
- }
- case V8ClassIndex::HISTORY: {
- Location* location = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, host);
- target = location->frame();
- break;
- }
- default:
- break;
- }
- return target;
-}
-
-#if ENABLE(SVG)
-V8ClassIndex::V8WrapperType V8Custom::DowncastSVGPathSeg(void* pathSeg)
-{
- WebCore::SVGPathSeg* realPathSeg = reinterpret_cast<WebCore::SVGPathSeg*>(pathSeg);
-
- switch (realPathSeg->pathSegType()) {
-#define MAKE_CASE(svgValue, v8Value) case WebCore::SVGPathSeg::svgValue: return V8ClassIndex::v8Value
-
- MAKE_CASE(PATHSEG_CLOSEPATH, SVGPATHSEGCLOSEPATH);
- MAKE_CASE(PATHSEG_MOVETO_ABS, SVGPATHSEGMOVETOABS);
- MAKE_CASE(PATHSEG_MOVETO_REL, SVGPATHSEGMOVETOREL);
- MAKE_CASE(PATHSEG_LINETO_ABS, SVGPATHSEGLINETOABS);
- MAKE_CASE(PATHSEG_LINETO_REL, SVGPATHSEGLINETOREL);
- MAKE_CASE(PATHSEG_CURVETO_CUBIC_ABS, SVGPATHSEGCURVETOCUBICABS);
- MAKE_CASE(PATHSEG_CURVETO_CUBIC_REL, SVGPATHSEGCURVETOCUBICREL);
- MAKE_CASE(PATHSEG_CURVETO_QUADRATIC_ABS, SVGPATHSEGCURVETOQUADRATICABS);
- MAKE_CASE(PATHSEG_CURVETO_QUADRATIC_REL, SVGPATHSEGCURVETOQUADRATICREL);
- MAKE_CASE(PATHSEG_ARC_ABS, SVGPATHSEGARCABS);
- MAKE_CASE(PATHSEG_ARC_REL, SVGPATHSEGARCREL);
- MAKE_CASE(PATHSEG_LINETO_HORIZONTAL_ABS, SVGPATHSEGLINETOHORIZONTALABS);
- MAKE_CASE(PATHSEG_LINETO_HORIZONTAL_REL, SVGPATHSEGLINETOHORIZONTALREL);
- MAKE_CASE(PATHSEG_LINETO_VERTICAL_ABS, SVGPATHSEGLINETOVERTICALABS);
- MAKE_CASE(PATHSEG_LINETO_VERTICAL_REL, SVGPATHSEGLINETOVERTICALREL);
- MAKE_CASE(PATHSEG_CURVETO_CUBIC_SMOOTH_ABS, SVGPATHSEGCURVETOCUBICSMOOTHABS);
- MAKE_CASE(PATHSEG_CURVETO_CUBIC_SMOOTH_REL, SVGPATHSEGCURVETOCUBICSMOOTHREL);
- MAKE_CASE(PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS, SVGPATHSEGCURVETOQUADRATICSMOOTHABS);
- MAKE_CASE(PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL, SVGPATHSEGCURVETOQUADRATICSMOOTHREL);
-
-#undef MAKE_CASE
-
- default:
- return V8ClassIndex::INVALID_CLASS_INDEX;
- }
-}
-
-#endif // ENABLE(SVG)
-
-} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8CustomBinding.h b/WebCore/bindings/v8/custom/V8CustomBinding.h
index e7670b7..25f4507 100644
--- a/WebCore/bindings/v8/custom/V8CustomBinding.h
+++ b/WebCore/bindings/v8/custom/V8CustomBinding.h
@@ -34,308 +34,16 @@
#include "V8Index.h"
#include <v8.h>
-struct NPObject;
-
-#define CALLBACK_FUNC_DECL(NAME) v8::Handle<v8::Value> V8Custom::v8##NAME##Callback(const v8::Arguments& args)
-
-#define ACCESSOR_GETTER(NAME) \
- v8::Handle<v8::Value> V8Custom::v8##NAME##AccessorGetter( \
- v8::Local<v8::String> name, const v8::AccessorInfo& info)
-
-#define ACCESSOR_SETTER(NAME) \
- void V8Custom::v8##NAME##AccessorSetter(v8::Local<v8::String> name, \
- v8::Local<v8::Value> value, const v8::AccessorInfo& info)
-
-#define INDEXED_PROPERTY_GETTER(NAME) \
- v8::Handle<v8::Value> V8Custom::v8##NAME##IndexedPropertyGetter( \
- uint32_t index, const v8::AccessorInfo& info)
-
-#define INDEXED_PROPERTY_SETTER(NAME) \
- v8::Handle<v8::Value> V8Custom::v8##NAME##IndexedPropertySetter( \
- uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
-
-#define INDEXED_PROPERTY_DELETER(NAME) \
- v8::Handle<v8::Boolean> V8Custom::v8##NAME##IndexedPropertyDeleter( \
- uint32_t index, const v8::AccessorInfo& info)
-
-#define NAMED_PROPERTY_GETTER(NAME) \
- v8::Handle<v8::Value> V8Custom::v8##NAME##NamedPropertyGetter( \
- v8::Local<v8::String> name, const v8::AccessorInfo& info)
-
-#define NAMED_PROPERTY_SETTER(NAME) \
- v8::Handle<v8::Value> V8Custom::v8##NAME##NamedPropertySetter( \
- v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
-
-#define NAMED_PROPERTY_DELETER(NAME) \
- v8::Handle<v8::Boolean> V8Custom::v8##NAME##NamedPropertyDeleter( \
- v8::Local<v8::String> name, const v8::AccessorInfo& info)
-
-#define NAMED_ACCESS_CHECK(NAME) \
- bool V8Custom::v8##NAME##NamedSecurityCheck(v8::Local<v8::Object> host, \
- v8::Local<v8::Value> key, v8::AccessType type, v8::Local<v8::Value> data)
-
-#define INDEXED_ACCESS_CHECK(NAME) \
- bool V8Custom::v8##NAME##IndexedSecurityCheck(v8::Local<v8::Object> host, \
- uint32_t index, v8::AccessType type, v8::Local<v8::Value> data)
-
-#define ACCESSOR_RUNTIME_ENABLER(NAME) bool V8Custom::v8##NAME##Enabled()
-
namespace WebCore {
-
- class DOMWindow;
- class Element;
- class Frame;
- class HTMLCollection;
- class HTMLFrameElementBase;
- class String;
- class V8Proxy;
-
- bool allowSettingFrameSrcToJavascriptUrl(HTMLFrameElementBase*, String value);
- bool allowSettingSrcToJavascriptURL(Element*, String name, String value);
-
class V8Custom {
public:
- // Constants.
- static const int kDOMWrapperTypeIndex = 0;
- static const int kDOMWrapperObjectIndex = 1;
- static const int kDefaultWrapperInternalFieldCount = 2;
-
- static const int kNPObjectInternalFieldCount = kDefaultWrapperInternalFieldCount + 0;
-
- static const int kNodeEventListenerCacheIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kNodeMinimumInternalFieldCount = kDefaultWrapperInternalFieldCount + 1;
-
- static const int kDocumentImplementationIndex = kNodeMinimumInternalFieldCount + 0;
- static const int kDocumentMinimumInternalFieldCount = kNodeMinimumInternalFieldCount + 1;
-
- static const int kHTMLDocumentMarkerIndex = kDocumentMinimumInternalFieldCount + 0;
- static const int kHTMLDocumentShadowIndex = kDocumentMinimumInternalFieldCount + 1;
- static const int kHTMLDocumentInternalFieldCount = kDocumentMinimumInternalFieldCount + 2;
-
- static const int kXMLHttpRequestCacheIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kXMLHttpRequestInternalFieldCount = kDefaultWrapperInternalFieldCount + 1;
-
- static const int kMessageChannelPort1Index = kDefaultWrapperInternalFieldCount + 0;
- static const int kMessageChannelPort2Index = kDefaultWrapperInternalFieldCount + 1;
- static const int kMessageChannelInternalFieldCount = kDefaultWrapperInternalFieldCount + 2;
-
- static const int kMessagePortRequestCacheIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kMessagePortInternalFieldCount = kDefaultWrapperInternalFieldCount + 1;
-
-#if ENABLE(WORKERS)
- static const int kAbstractWorkerRequestCacheIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kAbstractWorkerInternalFieldCount = kDefaultWrapperInternalFieldCount + 1;
-
- static const int kWorkerRequestCacheIndex = kAbstractWorkerInternalFieldCount + 0;
- static const int kWorkerInternalFieldCount = kAbstractWorkerInternalFieldCount + 1;
-
- static const int kWorkerContextRequestCacheIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kWorkerContextMinimumInternalFieldCount = kDefaultWrapperInternalFieldCount + 1;
-
- static const int kDedicatedWorkerContextRequestCacheIndex = kWorkerContextMinimumInternalFieldCount + 0;
- static const int kDedicatedWorkerContextInternalFieldCount = kWorkerContextMinimumInternalFieldCount + 1;
-#endif
-
-#if ENABLE(SHARED_WORKERS)
- static const int kSharedWorkerRequestCacheIndex = kAbstractWorkerInternalFieldCount + 0;
- static const int kSharedWorkerInternalFieldCount = kAbstractWorkerInternalFieldCount + 1;
-
- static const int kSharedWorkerContextRequestCacheIndex = kWorkerContextMinimumInternalFieldCount + 0;
- static const int kSharedWorkerContextInternalFieldCount = kWorkerContextMinimumInternalFieldCount + 1;
-#endif
-
-#if ENABLE(NOTIFICATIONS)
- static const int kNotificationRequestCacheIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kNotificationInternalFieldCount = kDefaultWrapperInternalFieldCount + 1;
-#endif
-
-#if ENABLE(SVG)
- static const int kSVGElementInstanceEventListenerCacheIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kSVGElementInstanceInternalFieldCount = kDefaultWrapperInternalFieldCount + 1;
-#endif
-
- static const int kDOMWindowConsoleIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kDOMWindowHistoryIndex = kDefaultWrapperInternalFieldCount + 1;
- static const int kDOMWindowLocationbarIndex = kDefaultWrapperInternalFieldCount + 2;
- static const int kDOMWindowMenubarIndex = kDefaultWrapperInternalFieldCount + 3;
- static const int kDOMWindowNavigatorIndex = kDefaultWrapperInternalFieldCount + 4;
- static const int kDOMWindowPersonalbarIndex = kDefaultWrapperInternalFieldCount + 5;
- static const int kDOMWindowScreenIndex = kDefaultWrapperInternalFieldCount + 6;
- static const int kDOMWindowScrollbarsIndex = kDefaultWrapperInternalFieldCount + 7;
- static const int kDOMWindowSelectionIndex = kDefaultWrapperInternalFieldCount + 8;
- static const int kDOMWindowStatusbarIndex = kDefaultWrapperInternalFieldCount + 9;
- static const int kDOMWindowToolbarIndex = kDefaultWrapperInternalFieldCount + 10;
- static const int kDOMWindowLocationIndex = kDefaultWrapperInternalFieldCount + 11;
- static const int kDOMWindowDOMSelectionIndex = kDefaultWrapperInternalFieldCount + 12;
- static const int kDOMWindowEventListenerCacheIndex = kDefaultWrapperInternalFieldCount + 13;
- static const int kDOMWindowEnteredIsolatedWorldIndex = kDefaultWrapperInternalFieldCount + 14;
- static const int kDOMWindowInternalFieldCount = kDefaultWrapperInternalFieldCount + 15;
-
- static const int kStyleSheetOwnerNodeIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kStyleSheetInternalFieldCount = kDefaultWrapperInternalFieldCount + 1;
- static const int kNamedNodeMapOwnerNodeIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kNamedNodeMapInternalFieldCount = kDefaultWrapperInternalFieldCount + 1;
-
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
- static const int kDOMApplicationCacheCacheIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kDOMApplicationCacheFieldCount = kDefaultWrapperInternalFieldCount + 1;
-#endif
-
-#if ENABLE(WEB_SOCKETS)
- static const int kWebSocketCacheIndex = kDefaultWrapperInternalFieldCount + 0;
- static const int kWebSocketInternalFieldCount = kDefaultWrapperInternalFieldCount + 1;
-#endif
-
-#define DECLARE_PROPERTY_ACCESSOR_GETTER(NAME) \
- static v8::Handle<v8::Value> v8##NAME##AccessorGetter( \
- v8::Local<v8::String> name, const v8::AccessorInfo& info)
-
-#define DECLARE_PROPERTY_ACCESSOR_SETTER(NAME) \
- static void v8##NAME##AccessorSetter(v8::Local<v8::String> name, \
- v8::Local<v8::Value> value, const v8::AccessorInfo& info)
-
-#define DECLARE_PROPERTY_ACCESSOR(NAME) DECLARE_PROPERTY_ACCESSOR_GETTER(NAME); DECLARE_PROPERTY_ACCESSOR_SETTER(NAME)
-
-#define DECLARE_NAMED_PROPERTY_GETTER(NAME) \
- static v8::Handle<v8::Value> v8##NAME##NamedPropertyGetter( \
- v8::Local<v8::String> name, const v8::AccessorInfo& info)
-
-#define DECLARE_NAMED_PROPERTY_SETTER(NAME) \
- static v8::Handle<v8::Value> v8##NAME##NamedPropertySetter( \
- v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
-
-#define DECLARE_NAMED_PROPERTY_DELETER(NAME) \
- static v8::Handle<v8::Boolean> v8##NAME##NamedPropertyDeleter( \
- v8::Local<v8::String> name, const v8::AccessorInfo& info)
-
-#define USE_NAMED_PROPERTY_GETTER(NAME) V8Custom::v8##NAME##NamedPropertyGetter
-
-#define USE_NAMED_PROPERTY_SETTER(NAME) V8Custom::v8##NAME##NamedPropertySetter
-
-#define USE_NAMED_PROPERTY_DELETER(NAME) V8Custom::v8##NAME##NamedPropertyDeleter
-
-#define DECLARE_INDEXED_PROPERTY_GETTER(NAME) \
- static v8::Handle<v8::Value> v8##NAME##IndexedPropertyGetter( \
- uint32_t index, const v8::AccessorInfo& info)
-
-#define DECLARE_INDEXED_PROPERTY_SETTER(NAME) \
- static v8::Handle<v8::Value> v8##NAME##IndexedPropertySetter( \
- uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
-
-#define DECLARE_INDEXED_PROPERTY_DELETER(NAME) \
- static v8::Handle<v8::Boolean> v8##NAME##IndexedPropertyDeleter( \
- uint32_t index, const v8::AccessorInfo& info)
-
-#define USE_INDEXED_PROPERTY_GETTER(NAME) V8Custom::v8##NAME##IndexedPropertyGetter
-
-#define USE_INDEXED_PROPERTY_SETTER(NAME) V8Custom::v8##NAME##IndexedPropertySetter
-
-#define USE_INDEXED_PROPERTY_DELETER(NAME) V8Custom::v8##NAME##IndexedPropertyDeleter
-
#define DECLARE_CALLBACK(NAME) static v8::Handle<v8::Value> v8##NAME##Callback(const v8::Arguments& args)
-
#define USE_CALLBACK(NAME) V8Custom::v8##NAME##Callback
-#define DECLARE_NAMED_ACCESS_CHECK(NAME) \
- static bool v8##NAME##NamedSecurityCheck(v8::Local<v8::Object> host, \
- v8::Local<v8::Value> key, v8::AccessType type, v8::Local<v8::Value> data)
-
-#define DECLARE_INDEXED_ACCESS_CHECK(NAME) \
- static bool v8##NAME##IndexedSecurityCheck(v8::Local<v8::Object> host, \
- uint32_t index, v8::AccessType type, v8::Local<v8::Value> data)
-
-#define DECLARE_ACCESSOR_RUNTIME_ENABLER(NAME) static bool v8##NAME##Enabled()
-
- DECLARE_PROPERTY_ACCESSOR(CanvasRenderingContext2DStrokeStyle);
- DECLARE_PROPERTY_ACCESSOR(CanvasRenderingContext2DFillStyle);
- DECLARE_PROPERTY_ACCESSOR(DOMWindowEvent);
- DECLARE_PROPERTY_ACCESSOR_GETTER(DOMWindowCrypto);
- DECLARE_PROPERTY_ACCESSOR_SETTER(DOMWindowLocation);
- DECLARE_PROPERTY_ACCESSOR_SETTER(DOMWindowOpener);
-
-#if ENABLE(VIDEO)
- DECLARE_PROPERTY_ACCESSOR_GETTER(DOMWindowAudio);
- DECLARE_ACCESSOR_RUNTIME_ENABLER(DOMWindowAudio);
- DECLARE_ACCESSOR_RUNTIME_ENABLER(DOMWindowHTMLMediaElement);
- DECLARE_ACCESSOR_RUNTIME_ENABLER(DOMWindowHTMLAudioElement);
- DECLARE_ACCESSOR_RUNTIME_ENABLER(DOMWindowHTMLVideoElement);
- DECLARE_ACCESSOR_RUNTIME_ENABLER(DOMWindowMediaError);
-#endif
-
- DECLARE_PROPERTY_ACCESSOR_GETTER(DOMWindowImage);
- DECLARE_PROPERTY_ACCESSOR_GETTER(DOMWindowOption);
-
- DECLARE_PROPERTY_ACCESSOR(DocumentLocation);
- DECLARE_PROPERTY_ACCESSOR(DocumentImplementation);
- DECLARE_PROPERTY_ACCESSOR_GETTER(EventSrcElement);
- DECLARE_PROPERTY_ACCESSOR(EventReturnValue);
- DECLARE_PROPERTY_ACCESSOR_GETTER(EventDataTransfer);
- DECLARE_PROPERTY_ACCESSOR_GETTER(EventClipboardData);
-
- DECLARE_PROPERTY_ACCESSOR(DOMWindowEventHandler);
-
- DECLARE_CALLBACK(HTMLCanvasElementGetContext);
-
- DECLARE_PROPERTY_ACCESSOR_SETTER(HTMLFrameElementSrc);
- DECLARE_PROPERTY_ACCESSOR_SETTER(HTMLFrameElementLocation);
- DECLARE_PROPERTY_ACCESSOR_SETTER(HTMLIFrameElementSrc);
-
- DECLARE_PROPERTY_ACCESSOR_SETTER(AttrValue);
-
- DECLARE_PROPERTY_ACCESSOR(HTMLOptionsCollectionLength);
-
- DECLARE_CALLBACK(HTMLInputElementSetSelectionRange);
-
- DECLARE_PROPERTY_ACCESSOR(HTMLInputElementSelectionStart);
- DECLARE_PROPERTY_ACCESSOR(HTMLInputElementSelectionEnd);
-
- DECLARE_NAMED_ACCESS_CHECK(Location);
- DECLARE_INDEXED_ACCESS_CHECK(History);
-
- DECLARE_NAMED_ACCESS_CHECK(History);
- DECLARE_INDEXED_ACCESS_CHECK(Location);
-
- DECLARE_CALLBACK(HTMLCollectionItem);
- DECLARE_CALLBACK(HTMLCollectionNamedItem);
- DECLARE_CALLBACK(HTMLCollectionCallAsFunction);
-
- DECLARE_CALLBACK(HTMLAllCollectionItem);
- DECLARE_CALLBACK(HTMLAllCollectionNamedItem);
- DECLARE_CALLBACK(HTMLAllCollectionCallAsFunction);
-
- DECLARE_CALLBACK(HTMLSelectElementRemove);
-
- DECLARE_CALLBACK(HTMLOptionsCollectionRemove);
- DECLARE_CALLBACK(HTMLOptionsCollectionAdd);
-
- DECLARE_CALLBACK(HTMLDocumentWrite);
- DECLARE_CALLBACK(HTMLDocumentWriteln);
- DECLARE_CALLBACK(HTMLDocumentOpen);
- DECLARE_PROPERTY_ACCESSOR(HTMLDocumentAll);
- DECLARE_NAMED_PROPERTY_GETTER(HTMLDocument);
- DECLARE_NAMED_PROPERTY_DELETER(HTMLDocument);
-
- DECLARE_CALLBACK(DocumentEvaluate);
- DECLARE_CALLBACK(DocumentGetCSSCanvasContext);
-
- DECLARE_CALLBACK(DOMWindowAddEventListener);
- DECLARE_CALLBACK(DOMWindowRemoveEventListener);
- DECLARE_CALLBACK(DOMWindowPostMessage);
- DECLARE_CALLBACK(DOMWindowSetTimeout);
- DECLARE_CALLBACK(DOMWindowSetInterval);
- DECLARE_CALLBACK(DOMWindowAtob);
- DECLARE_CALLBACK(DOMWindowBtoa);
- DECLARE_CALLBACK(DOMWindowNOP);
- DECLARE_CALLBACK(DOMWindowToString);
- DECLARE_CALLBACK(DOMWindowShowModalDialog);
- DECLARE_CALLBACK(DOMWindowOpen);
- DECLARE_CALLBACK(DOMWindowClearTimeout);
- DECLARE_CALLBACK(DOMWindowClearInterval);
-
- DECLARE_CALLBACK(DOMParserConstructor);
DECLARE_CALLBACK(HTMLAudioElementConstructor);
DECLARE_CALLBACK(HTMLImageElementConstructor);
DECLARE_CALLBACK(HTMLOptionElementConstructor);
+<<<<<<< HEAD
DECLARE_CALLBACK(MessageChannelConstructor);
DECLARE_CALLBACK(WebKitCSSMatrixConstructor);
DECLARE_CALLBACK(WebKitPointConstructor);
@@ -714,27 +422,11 @@ namespace WebCore {
#undef DECLARE_INDEXED_PROPERTY_GETTER
#undef DECLARE_INDEXED_PROPERTY_SETTER
#undef DECLARE_INDEXED_PROPERTY_DELETER
+=======
+>>>>>>> webkit.org at r54127
#undef DECLARE_CALLBACK
-
- // Returns the NPObject corresponding to an HTMLElement object.
- static NPObject* GetHTMLPlugInElementNPObject(v8::Handle<v8::Object>);
-
- // Returns the owner frame pointer of a DOM wrapper object. It only works for
- // these DOM objects requiring cross-domain access check.
- static Frame* GetTargetFrame(v8::Local<v8::Object> host, v8::Local<v8::Value> data);
-
- // Special case for downcasting SVG path segments.
-#if ENABLE(SVG)
- static V8ClassIndex::V8WrapperType DowncastSVGPathSeg(void* pathSeg);
-#endif
-
- private:
- static v8::Handle<v8::Value> WindowSetTimeoutImpl(const v8::Arguments&, bool singleShot);
- static void ClearTimeoutImpl(const v8::Arguments&);
- static void WindowSetLocation(DOMWindow*, const String&);
};
-
} // namespace WebCore
#endif // V8CustomBinding_h
diff --git a/WebCore/bindings/v8/custom/V8DOMApplicationCacheCustom.cpp b/WebCore/bindings/v8/custom/V8DOMApplicationCacheCustom.cpp
index 134de95..a439432 100644
--- a/WebCore/bindings/v8/custom/V8DOMApplicationCacheCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DOMApplicationCacheCustom.cpp
@@ -29,11 +29,12 @@
*/
#include "config.h"
-#include "DOMApplicationCache.h"
+#include "V8DOMApplicationCache.h"
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
#include "ApplicationCacheHost.h"
+#include "DOMApplicationCache.h"
#include "V8Binding.h"
#include "V8CustomBinding.h"
#include "V8Document.h"
@@ -44,14 +45,14 @@
namespace WebCore {
// Handles appcache.addEventListner(name, func, capture) method calls
-CALLBACK_FUNC_DECL(DOMApplicationCacheAddEventListener)
+v8::Handle<v8::Value> V8DOMApplicationCache::addEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOMApplicationCache.addEventListener()");
- DOMApplicationCache* appcache = V8DOMWrapper::convertToNativeObject<DOMApplicationCache>(V8ClassIndex::DOMAPPLICATIONCACHE, args.Holder());
+ DOMApplicationCache* appcache = V8DOMApplicationCache::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(appcache, args[1], false, ListenerFindOrCreate);
if (listener) {
- createHiddenDependency(args.Holder(), args[1], V8Custom::kDOMApplicationCacheCacheIndex);
+ createHiddenDependency(args.Holder(), args[1], cacheIndex);
String eventType = toWebCoreString(args[0]);
bool useCapture = args[2]->BooleanValue();
appcache->addEventListener(eventType, listener, useCapture);
@@ -60,14 +61,14 @@ CALLBACK_FUNC_DECL(DOMApplicationCacheAddEventListener)
}
// Handles appcache.removeEventListner(name, func, capture) method calls
-CALLBACK_FUNC_DECL(DOMApplicationCacheRemoveEventListener)
+v8::Handle<v8::Value> V8DOMApplicationCache::removeEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOMApplicationCache.removeEventListener()");
- DOMApplicationCache* appcache = V8DOMWrapper::convertToNativeObject<DOMApplicationCache>(V8ClassIndex::DOMAPPLICATIONCACHE, args.Holder());
+ DOMApplicationCache* appcache = V8DOMApplicationCache::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(appcache, args[1], false, ListenerFindOnly);
if (listener) {
- removeHiddenDependency(args.Holder(), args[1], V8Custom::kDOMApplicationCacheCacheIndex);
+ removeHiddenDependency(args.Holder(), args[1], cacheIndex);
String eventType = toWebCoreString(args[0]);
bool useCapture = args[2]->BooleanValue();
appcache->removeEventListener(eventType, listener.get(), useCapture);
diff --git a/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp b/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
index 46c33b9..2933b4d 100644
--- a/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
@@ -29,22 +29,19 @@
*/
#include "config.h"
-#include "DOMWindow.h"
-
-#include "V8Binding.h"
-#include "V8CustomBinding.h"
-#include "V8CustomEventListener.h"
-#include "V8MessagePortCustom.h"
-#include "V8Proxy.h"
-#include "V8Utilities.h"
+#include "V8DOMWindow.h"
#include "Base64.h"
-#include "ExceptionCode.h"
+#include "Chrome.h"
+#include "Database.h"
#include "DOMTimer.h"
+#include "DOMWindow.h"
+#include "ExceptionCode.h"
#include "Frame.h"
#include "FrameLoadRequest.h"
#include "FrameView.h"
#include "HTMLCollection.h"
+#include "HTMLDocument.h"
#include "MediaPlayer.h"
#include "Page.h"
#include "PlatformScreen.h"
@@ -55,6 +52,14 @@
#include "Settings.h"
#include "SharedWorkerRepository.h"
#include "Storage.h"
+#include "V8Binding.h"
+#include "V8BindingDOMWindow.h"
+#include "V8BindingState.h"
+#include "V8CustomBinding.h"
+#include "V8CustomEventListener.h"
+#include "V8MessagePortCustom.h"
+#include "V8Proxy.h"
+#include "V8Utilities.h"
#if ENABLE(WEB_SOCKETS)
#include "WebSocket.h"
#endif
@@ -66,7 +71,7 @@ static const int popupTilePixels = 10;
namespace WebCore {
-v8::Handle<v8::Value> V8Custom::WindowSetTimeoutImpl(const v8::Arguments& args, bool singleShot)
+v8::Handle<v8::Value> WindowSetTimeoutImpl(const v8::Arguments& args, bool singleShot)
{
int argumentCount = args.Length();
@@ -99,9 +104,9 @@ v8::Handle<v8::Value> V8Custom::WindowSetTimeoutImpl(const v8::Arguments& args,
if (argumentCount >= 2)
timeout = args[1]->Int32Value();
- DOMWindow* imp = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, args.Holder());
+ DOMWindow* imp = V8DOMWindow::toNative(args.Holder());
- if (!V8Proxy::canAccessFrame(imp->frame(), true))
+ if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
return v8::Undefined();
ScriptExecutionContext* scriptContext = static_cast<ScriptExecutionContext*>(imp->document());
@@ -164,14 +169,14 @@ static v8::Handle<v8::Value> convertBase64(const String& str, bool encode)
return v8String(String(outputCharacters.data(), outputCharacters.size()));
}
-ACCESSOR_GETTER(DOMWindowEvent)
+v8::Handle<v8::Value> V8DOMWindow::eventAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
v8::Handle<v8::Object> holder = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::DOMWINDOW, info.This());
if (holder.IsEmpty())
return v8::Undefined();
- Frame* frame = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, holder)->frame();
- if (!V8Proxy::canAccessFrame(frame, true))
+ Frame* frame = V8DOMWindow::toNative(holder)->frame();
+ if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), frame, true))
return v8::Undefined();
v8::Local<v8::Context> context = V8Proxy::context(frame);
@@ -185,14 +190,14 @@ ACCESSOR_GETTER(DOMWindowEvent)
return jsEvent;
}
-ACCESSOR_SETTER(DOMWindowEvent)
+void V8DOMWindow::eventAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
v8::Handle<v8::Object> holder = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::DOMWINDOW, info.This());
if (holder.IsEmpty())
return;
- Frame* frame = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, holder)->frame();
- if (!V8Proxy::canAccessFrame(frame, true))
+ Frame* frame = V8DOMWindow::toNative(holder)->frame();
+ if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), frame, true))
return;
v8::Local<v8::Context> context = V8Proxy::context(frame);
@@ -203,24 +208,24 @@ ACCESSOR_SETTER(DOMWindowEvent)
context->Global()->SetHiddenValue(eventSymbol, value);
}
-ACCESSOR_GETTER(DOMWindowCrypto)
+v8::Handle<v8::Value> V8DOMWindow::cryptoAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
// FIXME: Implement me.
return v8::Undefined();
}
-ACCESSOR_SETTER(DOMWindowLocation)
+void V8DOMWindow::locationAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
- DOMWindow* imp = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
- WindowSetLocation(imp, toWebCoreString(value));
+ DOMWindow* imp = V8DOMWindow::toNative(info.Holder());
+ V8DOMWindowShell::setLocation(imp, toWebCoreString(value));
}
-ACCESSOR_SETTER(DOMWindowOpener)
+void V8DOMWindow::openerAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
- DOMWindow* imp = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
+ DOMWindow* imp = V8DOMWindow::toNative(info.Holder());
- if (!V8Proxy::canAccessFrame(imp->frame(), true))
+ if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
return;
// Opener can be shadowed if it is in the same domain.
@@ -242,33 +247,33 @@ ACCESSOR_SETTER(DOMWindowOpener)
#if ENABLE(VIDEO)
-ACCESSOR_GETTER(DOMWindowAudio)
+v8::Handle<v8::Value> V8DOMWindow::AudioAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
- DOMWindow* window = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
+ DOMWindow* window = V8DOMWindow::toNative(info.Holder());
return V8DOMWrapper::getConstructor(V8ClassIndex::AUDIO, window);
}
-ACCESSOR_RUNTIME_ENABLER(DOMWindowAudio)
+bool V8DOMWindow::AudioEnabled()
{
return MediaPlayer::isAvailable();
}
-ACCESSOR_RUNTIME_ENABLER(DOMWindowHTMLMediaElement)
+bool V8DOMWindow::HTMLMediaElementEnabled()
{
return MediaPlayer::isAvailable();
}
-ACCESSOR_RUNTIME_ENABLER(DOMWindowHTMLAudioElement)
+bool V8DOMWindow::HTMLAudioElementEnabled()
{
return MediaPlayer::isAvailable();
}
-ACCESSOR_RUNTIME_ENABLER(DOMWindowHTMLVideoElement)
+bool V8DOMWindow::HTMLVideoElementEnabled()
{
return MediaPlayer::isAvailable();
}
-ACCESSOR_RUNTIME_ENABLER(DOMWindowMediaError)
+bool V8DOMWindow::MediaErrorEnabled()
{
return MediaPlayer::isAvailable();
}
@@ -276,74 +281,81 @@ ACCESSOR_RUNTIME_ENABLER(DOMWindowMediaError)
#endif
#if ENABLE(SHARED_WORKERS)
-ACCESSOR_RUNTIME_ENABLER(DOMWindowSharedWorker)
+bool V8DOMWindow::SharedWorkerEnabled()
{
return SharedWorkerRepository::isAvailable();
}
#endif
#if ENABLE(WEB_SOCKETS)
-ACCESSOR_RUNTIME_ENABLER(DOMWindowWebSocket)
+bool V8DOMWindow::WebSocketEnabled()
{
return WebSocket::isAvailable();
}
#endif
#if ENABLE(DATABASE)
-ACCESSOR_RUNTIME_ENABLER(DOMWindowOpenDatabase)
+bool V8DOMWindow::OpenDatabaseEnabled()
+{
+ return Database::isAvailable();
+}
+#endif
+
+#if ENABLE(INDEXED_DATABASE)
+bool V8DOMWindow::IndexedDBEnabled()
{
- return WebCore::RuntimeEnabledFeatures::databaseEnabled();
+ return RuntimeEnabledFeatures::indexedDatabaseEnabled();
}
#endif
#if ENABLE(DOM_STORAGE)
-ACCESSOR_RUNTIME_ENABLER(DOMWindowLocalStorage)
+bool V8DOMWindow::LocalStorageEnabled()
{
return RuntimeEnabledFeatures::localStorageEnabled();
}
-ACCESSOR_RUNTIME_ENABLER(DOMWindowSessionStorage)
+bool V8DOMWindow::SessionStorageEnabled()
{
return RuntimeEnabledFeatures::sessionStorageEnabled();
}
#endif
#if ENABLE(NOTIFICATIONS)
-ACCESSOR_RUNTIME_ENABLER(DOMWindowWebkitNotifications)
+bool V8DOMWindow::WebkitNotificationsEnabled()
{
return RuntimeEnabledFeatures::notificationsEnabled();
}
#endif
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
-ACCESSOR_RUNTIME_ENABLER(DOMWindowApplicationCache)
+bool V8DOMWindow::ApplicationCacheEnabled()
{
return RuntimeEnabledFeatures::applicationCacheEnabled();
}
#endif
-ACCESSOR_GETTER(DOMWindowImage)
+v8::Handle<v8::Value> V8DOMWindow::ImageAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
- DOMWindow* window = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
+ DOMWindow* window = V8DOMWindow::toNative(info.Holder());
return V8DOMWrapper::getConstructor(V8ClassIndex::IMAGE, window);
}
-ACCESSOR_GETTER(DOMWindowOption)
+v8::Handle<v8::Value> V8DOMWindow::OptionAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
- DOMWindow* window = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
+ DOMWindow* window = V8DOMWindow::toNative(info.Holder());
return V8DOMWrapper::getConstructor(V8ClassIndex::OPTION, window);
}
-CALLBACK_FUNC_DECL(DOMWindowAddEventListener)
+v8::Handle<v8::Value> V8DOMWindow::addEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.DOMWindow.addEventListener()");
String eventType = toWebCoreString(args[0]);
bool useCapture = args[2]->BooleanValue();
- DOMWindow* imp = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, args.Holder());
+ DOMWindow* imp = V8DOMWindow::toNative(args.Holder());
- if (!V8Proxy::canAccessFrame(imp->frame(), true))
+ if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
return v8::Undefined();
Document* doc = imp->document();
@@ -360,23 +372,23 @@ CALLBACK_FUNC_DECL(DOMWindowAddEventListener)
if (listener) {
imp->addEventListener(eventType, listener, useCapture);
- createHiddenDependency(args.Holder(), args[1], V8Custom::kDOMWindowEventListenerCacheIndex);
+ createHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(DOMWindowRemoveEventListener)
+v8::Handle<v8::Value> V8DOMWindow::removeEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.DOMWindow.removeEventListener()");
String eventType = toWebCoreString(args[0]);
bool useCapture = args[2]->BooleanValue();
- DOMWindow* imp = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, args.Holder());
+ DOMWindow* imp = V8DOMWindow::toNative(args.Holder());
- if (!V8Proxy::canAccessFrame(imp->frame(), true))
+ if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
return v8::Undefined();
Document* doc = imp->document();
@@ -392,22 +404,22 @@ CALLBACK_FUNC_DECL(DOMWindowRemoveEventListener)
if (listener) {
imp->removeEventListener(eventType, listener.get(), useCapture);
- removeHiddenDependency(args.Holder(), args[1], V8Custom::kDOMWindowEventListenerCacheIndex);
+ removeHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(DOMWindowPostMessage)
+v8::Handle<v8::Value> V8DOMWindow::postMessageCallback(const v8::Arguments& args)
{
INC_STATS("DOM.DOMWindow.postMessage()");
- DOMWindow* window = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, args.Holder());
+ DOMWindow* window = V8DOMWindow::toNative(args.Holder());
DOMWindow* source = V8Proxy::retrieveFrameForCallingContext()->domWindow();
ASSERT(source->frame());
v8::TryCatch tryCatch;
- RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(toWebCoreString(args[0]));
+ RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(args[0]);
MessagePortArray portArray;
String targetOrigin;
@@ -431,7 +443,7 @@ CALLBACK_FUNC_DECL(DOMWindowPostMessage)
return throwError(ec);
}
-CALLBACK_FUNC_DECL(DOMWindowAtob)
+v8::Handle<v8::Value> V8DOMWindow::atobCallback(const v8::Arguments& args)
{
INC_STATS("DOM.DOMWindow.atob()");
@@ -439,9 +451,9 @@ CALLBACK_FUNC_DECL(DOMWindowAtob)
return v8String("");
String str = toWebCoreString(args[0]);
- DOMWindow* imp = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, args.Holder());
+ DOMWindow* imp = V8DOMWindow::toNative(args.Holder());
- if (!V8Proxy::canAccessFrame(imp->frame(), true))
+ if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
return v8::Undefined();
if (args.Length() < 1)
@@ -450,7 +462,7 @@ CALLBACK_FUNC_DECL(DOMWindowAtob)
return convertBase64(str, false);
}
-CALLBACK_FUNC_DECL(DOMWindowBtoa)
+v8::Handle<v8::Value> V8DOMWindow::btoaCallback(const v8::Arguments& args)
{
INC_STATS("DOM.DOMWindow.btoa()");
@@ -458,9 +470,9 @@ CALLBACK_FUNC_DECL(DOMWindowBtoa)
return v8String("");
String str = toWebCoreString(args[0]);
- DOMWindow* imp = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, args.Holder());
+ DOMWindow* imp = V8DOMWindow::toNative(args.Holder());
- if (!V8Proxy::canAccessFrame(imp->frame(), true))
+ if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
return v8::Undefined();
if (args.Length() < 1)
@@ -473,7 +485,7 @@ CALLBACK_FUNC_DECL(DOMWindowBtoa)
// fix this by calling toString function on the receiver.
// However, V8 implements toString in JavaScript, which requires
// switching context of receiver. I consider it is dangerous.
-CALLBACK_FUNC_DECL(DOMWindowToString)
+v8::Handle<v8::Value> V8DOMWindow::toStringCallback(const v8::Arguments& args)
{
INC_STATS("DOM.DOMWindow.toString()");
v8::Handle<v8::Object> domWrapper = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::DOMWINDOW, args.This());
@@ -482,7 +494,13 @@ CALLBACK_FUNC_DECL(DOMWindowToString)
return domWrapper->ObjectProtoToString();
}
-CALLBACK_FUNC_DECL(DOMWindowNOP)
+v8::Handle<v8::Value> V8DOMWindow::releaseEventsCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.DOMWindow.nop()");
+ return v8::Undefined();
+}
+
+v8::Handle<v8::Value> V8DOMWindow::captureEventsCallback(const v8::Arguments& args)
{
INC_STATS("DOM.DOMWindow.nop()");
return v8::Undefined();
@@ -538,78 +556,7 @@ static HashMap<String, String> parseModalDialogFeatures(const String& featuresAr
return map;
}
-
-static Frame* createWindow(Frame* callingFrame,
- Frame* enteredFrame,
- Frame* openerFrame,
- const String& url,
- const String& frameName,
- const WindowFeatures& windowFeatures,
- v8::Local<v8::Value> dialogArgs)
-{
- ASSERT(callingFrame);
- ASSERT(enteredFrame);
-
- // Sandboxed iframes cannot open new auxiliary browsing contexts.
- if (callingFrame && callingFrame->loader()->isSandboxed(SandboxNavigation))
- return 0;
-
- ResourceRequest request;
-
- // For whatever reason, Firefox uses the entered frame to determine
- // the outgoingReferrer. We replicate that behavior here.
- String referrer = enteredFrame->loader()->outgoingReferrer();
- request.setHTTPReferrer(referrer);
- FrameLoader::addHTTPOriginIfNeeded(request, enteredFrame->loader()->outgoingOrigin());
- FrameLoadRequest frameRequest(request, frameName);
-
- // FIXME: It's much better for client API if a new window starts with a URL,
- // here where we know what URL we are going to open. Unfortunately, this
- // code passes the empty string for the URL, but there's a reason for that.
- // Before loading we have to set up the opener, openedByDOM,
- // and dialogArguments values. Also, to decide whether to use the URL
- // we currently do an allowsAccessFrom call using the window we create,
- // which can't be done before creating it. We'd have to resolve all those
- // issues to pass the URL instead of "".
-
- bool created;
- // We pass in the opener frame here so it can be used for looking up the
- // frame name, in case the active frame is different from the opener frame,
- // and the name references a frame relative to the opener frame, for example
- // "_self" or "_parent".
- Frame* newFrame = callingFrame->loader()->createWindow(openerFrame->loader(), frameRequest, windowFeatures, created);
- if (!newFrame)
- return 0;
-
- newFrame->loader()->setOpener(openerFrame);
- newFrame->page()->setOpenedByDOM();
-
- // Set dialog arguments on the global object of the new frame.
- if (!dialogArgs.IsEmpty()) {
- v8::Local<v8::Context> context = V8Proxy::context(newFrame);
- if (!context.IsEmpty()) {
- v8::Context::Scope scope(context);
- context->Global()->Set(v8::String::New("dialogArguments"), dialogArgs);
- }
- }
-
- if (protocolIsJavaScript(url) || ScriptController::isSafeScript(newFrame)) {
- KURL completedUrl =
- url.isEmpty() ? KURL(ParsedURLString, "") : completeURL(url);
- bool userGesture = processingUserGesture();
-
- if (created)
- newFrame->loader()->changeLocation(completedUrl, referrer, false, false, userGesture);
- else if (!url.isEmpty())
- newFrame->redirectScheduler()->scheduleLocationChange(completedUrl.string(), referrer, false, userGesture);
- }
-
- return newFrame;
-}
-
-
-
-CALLBACK_FUNC_DECL(DOMWindowShowModalDialog)
+v8::Handle<v8::Value> V8DOMWindow::showModalDialogCallback(const v8::Arguments& args)
{
INC_STATS("DOM.DOMWindow.showModalDialog()");
@@ -617,11 +564,10 @@ CALLBACK_FUNC_DECL(DOMWindowShowModalDialog)
v8::Local<v8::Value> dialogArgs = args[1];
String featureArgs = toWebCoreStringWithNullOrUndefinedCheck(args[2]);
- DOMWindow* window = V8DOMWrapper::convertToNativeObject<DOMWindow>(
- V8ClassIndex::DOMWINDOW, args.Holder());
+ DOMWindow* window = V8DOMWindow::toNative(args.Holder());
Frame* frame = window->frame();
- if (!V8Proxy::canAccessFrame(frame, true))
+ if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), frame, true))
return v8::Undefined();
Frame* callingFrame = V8Proxy::retrieveFrameForCallingContext();
@@ -674,7 +620,7 @@ CALLBACK_FUNC_DECL(DOMWindowShowModalDialog)
windowFeatures.locationBarVisible = false;
windowFeatures.fullscreen = false;
- Frame* dialogFrame = createWindow(callingFrame, enteredFrame, frame, url, "", windowFeatures, dialogArgs);
+ Frame* dialogFrame = V8BindingDOMWindow::createWindow(V8BindingState::Only(), callingFrame, enteredFrame, frame, url, "", windowFeatures, dialogArgs);
if (!dialogFrame)
return v8::Undefined();
@@ -699,17 +645,17 @@ CALLBACK_FUNC_DECL(DOMWindowShowModalDialog)
}
-CALLBACK_FUNC_DECL(DOMWindowOpen)
+v8::Handle<v8::Value> V8DOMWindow::openCallback(const v8::Arguments& args)
{
INC_STATS("DOM.DOMWindow.open()");
String urlString = toWebCoreStringWithNullOrUndefinedCheck(args[0]);
AtomicString frameName = (args[1]->IsUndefined() || args[1]->IsNull()) ? "_blank" : AtomicString(toWebCoreString(args[1]));
- DOMWindow* parent = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, args.Holder());
+ DOMWindow* parent = V8DOMWindow::toNative(args.Holder());
Frame* frame = parent->frame();
- if (!V8Proxy::canAccessFrame(frame, true))
+ if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), frame, true))
return v8::Undefined();
Frame* enteredFrame = V8Proxy::retrieveFrameForEnteredContext();
@@ -817,7 +763,7 @@ CALLBACK_FUNC_DECL(DOMWindowOpen)
windowFeatures.ySet = false;
}
- frame = createWindow(callingFrame, enteredFrame, frame, urlString, frameName, windowFeatures, v8::Local<v8::Value>());
+ frame = V8BindingDOMWindow::createWindow(V8BindingState::Only(), callingFrame, enteredFrame, frame, urlString, frameName, windowFeatures, v8::Local<v8::Value>());
if (!frame)
return v8::Undefined();
@@ -826,11 +772,11 @@ CALLBACK_FUNC_DECL(DOMWindowOpen)
}
-INDEXED_PROPERTY_GETTER(DOMWindow)
+v8::Handle<v8::Value> V8DOMWindow::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
{
INC_STATS("DOM.DOMWindow.IndexedPropertyGetter");
- DOMWindow* window = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
+ DOMWindow* window = V8DOMWindow::toNative(info.Holder());
if (!window)
return notHandledByInterceptor();
@@ -846,12 +792,11 @@ INDEXED_PROPERTY_GETTER(DOMWindow)
}
-NAMED_PROPERTY_GETTER(DOMWindow)
+v8::Handle<v8::Value> V8DOMWindow::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.DOMWindow.NamedPropertyGetter");
- // TODO(antonm): investigate what convertToNativeObject does for the case of DOMWINDOW.
- DOMWindow* window = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder());
+ DOMWindow* window = V8DOMWindow::toNative(info.Holder());
if (!window)
return notHandledByInterceptor();
@@ -874,13 +819,14 @@ NAMED_PROPERTY_GETTER(DOMWindow)
// Search named items in the document.
Document* doc = frame->document();
- if (doc) {
- RefPtr<HTMLCollection> items = doc->windowNamedItems(propName);
- if (items->length() >= 1) {
- if (items->length() == 1)
- return V8DOMWrapper::convertNodeToV8Object(items->firstItem());
- else
+ if (doc && doc->isHTMLDocument()) {
+ if (static_cast<HTMLDocument*>(doc)->hasNamedItem(propName.impl()) || doc->hasElementWithId(propName.impl())) {
+ RefPtr<HTMLCollection> items = doc->windowNamedItems(propName);
+ if (items->length() >= 1) {
+ if (items->length() == 1)
+ return V8DOMWrapper::convertNodeToV8Object(items->firstItem());
return V8DOMWrapper::convertToV8Object(V8ClassIndex::HTMLCOLLECTION, items.release());
+ }
}
}
@@ -888,44 +834,27 @@ NAMED_PROPERTY_GETTER(DOMWindow)
}
-void V8Custom::WindowSetLocation(DOMWindow* window, const String& relativeURL)
-{
- Frame* frame = window->frame();
- if (!frame)
- return;
-
- KURL url = completeURL(relativeURL);
- if (url.isNull())
- return;
-
- if (!shouldAllowNavigation(frame))
- return;
-
- navigateIfAllowed(frame, url, false, false);
-}
-
-
-CALLBACK_FUNC_DECL(DOMWindowSetTimeout)
+v8::Handle<v8::Value> V8DOMWindow::setTimeoutCallback(const v8::Arguments& args)
{
INC_STATS("DOM.DOMWindow.setTimeout()");
return WindowSetTimeoutImpl(args, true);
}
-CALLBACK_FUNC_DECL(DOMWindowSetInterval)
+v8::Handle<v8::Value> V8DOMWindow::setIntervalCallback(const v8::Arguments& args)
{
INC_STATS("DOM.DOMWindow.setInterval()");
return WindowSetTimeoutImpl(args, false);
}
-void V8Custom::ClearTimeoutImpl(const v8::Arguments& args)
+void ClearTimeoutImpl(const v8::Arguments& args)
{
int handle = toInt32(args[0]);
v8::Handle<v8::Object> holder = args.Holder();
- DOMWindow* imp = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, holder);
- if (!V8Proxy::canAccessFrame(imp->frame(), true))
+ DOMWindow* imp = V8DOMWindow::toNative(holder);
+ if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
return;
ScriptExecutionContext* context = static_cast<ScriptExecutionContext*>(imp->document());
if (!context)
@@ -934,28 +863,28 @@ void V8Custom::ClearTimeoutImpl(const v8::Arguments& args)
}
-CALLBACK_FUNC_DECL(DOMWindowClearTimeout)
+v8::Handle<v8::Value> V8DOMWindow::clearTimeoutCallback(const v8::Arguments& args)
{
INC_STATS("DOM.DOMWindow.clearTimeout");
ClearTimeoutImpl(args);
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(DOMWindowClearInterval)
+v8::Handle<v8::Value> V8DOMWindow::clearIntervalCallback(const v8::Arguments& args)
{
INC_STATS("DOM.DOMWindow.clearInterval");
ClearTimeoutImpl(args);
return v8::Undefined();
}
-NAMED_ACCESS_CHECK(DOMWindow)
+bool V8DOMWindow::namedSecurityCheck(v8::Local<v8::Object> host, v8::Local<v8::Value> key, v8::AccessType type, v8::Local<v8::Value> data)
{
ASSERT(V8ClassIndex::FromInt(data->Int32Value()) == V8ClassIndex::DOMWINDOW);
v8::Handle<v8::Object> window = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::DOMWINDOW, host);
if (window.IsEmpty())
return false; // the frame is gone.
- DOMWindow* targetWindow = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, window);
+ DOMWindow* targetWindow = V8DOMWindow::toNative(window);
ASSERT(targetWindow);
@@ -971,17 +900,17 @@ NAMED_ACCESS_CHECK(DOMWindow)
return true;
}
- return V8Proxy::canAccessFrame(target, false);
+ return V8BindingSecurity::canAccessFrame(V8BindingState::Only(), target, false);
}
-INDEXED_ACCESS_CHECK(DOMWindow)
+bool V8DOMWindow::indexedSecurityCheck(v8::Local<v8::Object> host, uint32_t index, v8::AccessType type, v8::Local<v8::Value> data)
{
ASSERT(V8ClassIndex::FromInt(data->Int32Value()) == V8ClassIndex::DOMWINDOW);
v8::Handle<v8::Object> window = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::DOMWINDOW, host);
if (window.IsEmpty())
return false;
- DOMWindow* targetWindow = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, window);
+ DOMWindow* targetWindow = V8DOMWindow::toNative(window);
ASSERT(targetWindow);
@@ -993,7 +922,7 @@ INDEXED_ACCESS_CHECK(DOMWindow)
if ((type == v8::ACCESS_GET || type == v8::ACCESS_HAS) && target->tree()->child(index))
return true;
- return V8Proxy::canAccessFrame(target, false);
+ return V8BindingSecurity::canAccessFrame(V8BindingState::Only(), target, false);
}
} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8DataGridColumnListCustom.cpp b/WebCore/bindings/v8/custom/V8DataGridColumnListCustom.cpp
index 1dde996..8980cfe 100644
--- a/WebCore/bindings/v8/custom/V8DataGridColumnListCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DataGridColumnListCustom.cpp
@@ -40,16 +40,6 @@
namespace WebCore {
-INDEXED_PROPERTY_GETTER(DataGridColumnList)
-{
- INC_STATS("DataGridColumnList.IndexedPropertyGetter");
- DataGridColumnList* imp = V8DOMWrapper::convertToNativeObject<DataGridColumnList>(V8ClassIndex::DATAGRIDCOLUMNLIST, info.Holder());
- DataGridColumn* result = imp->item(index);
- if (!result)
- return notHandledByInterceptor();
- return V8DOMWrapper::convertToV8Object(V8ClassIndex::DATAGRIDCOLUMN, result);
-}
-
NAMED_PROPERTY_GETTER(DataGridColumnList)
{
INC_STATS("DataGridColumnList.NamedPropertyGetter");
@@ -63,7 +53,7 @@ NAMED_PROPERTY_GETTER(DataGridColumnList)
return notHandledByInterceptor();
// Finally, look up a column by name.
- DataGridColumnList* imp = V8DOMWrapper::convertToNativeObject<DataGridColumnList>(V8ClassIndex::DATAGRIDCOLUMNLIST, info.Holder());
+ DataGridColumnList* imp = V8DataGridColumnList::toNative(info.Holder());
DataGridColumn* result = imp->itemWithName(toWebCoreString(name));
if (!result)
return notHandledByInterceptor();
diff --git a/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp b/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp
index 9ddd620..c83e1cc 100644
--- a/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#if ENABLE(DATABASE)
+#include "V8Database.h"
#include "Database.h"
#include "V8Binding.h"
@@ -42,7 +43,7 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(DatabaseChangeVersion)
+v8::Handle<v8::Value> V8Database::changeVersionCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Database.changeVersion()");
@@ -52,7 +53,7 @@ CALLBACK_FUNC_DECL(DatabaseChangeVersion)
if (!(args[0]->IsString() && args[1]->IsString()))
return throwError("The old and new versions must be strings.");
- Database* database = V8DOMWrapper::convertToNativeObject<Database>(V8ClassIndex::DATABASE, args.Holder());
+ Database* database = V8Database::toNative(args.Holder());
Frame* frame = V8Proxy::retrieveFrameForCurrentContext();
if (!frame)
@@ -95,7 +96,7 @@ static v8::Handle<v8::Value> createTransaction(const v8::Arguments& args, bool r
if (!args[0]->IsObject())
return throwError("Transaction callback must be of valid type.");
- Database* database = V8DOMWrapper::convertToNativeObject<Database>(V8ClassIndex::DATABASE, args.Holder());
+ Database* database = V8Database::toNative(args.Holder());
Frame* frame = V8Proxy::retrieveFrameForCurrentContext();
if (!frame)
@@ -123,13 +124,13 @@ static v8::Handle<v8::Value> createTransaction(const v8::Arguments& args, bool r
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(DatabaseTransaction)
+v8::Handle<v8::Value> V8Database::transactionCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Database.transaction()");
return createTransaction(args, false);
}
-CALLBACK_FUNC_DECL(DatabaseReadTransaction)
+v8::Handle<v8::Value> V8Database::readTransactionCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Database.readTransaction()");
return createTransaction(args, true);
diff --git a/WebCore/bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp b/WebCore/bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp
index 263c005..4486dbe 100644
--- a/WebCore/bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp
@@ -31,10 +31,10 @@
#include "config.h"
#if ENABLE(WORKERS)
-
-#include "WorkerContextExecutionProxy.h"
+#include "V8DedicatedWorkerContext.h"
#include "DedicatedWorkerContext.h"
+#include "WorkerContextExecutionProxy.h"
#include "V8Binding.h"
#include "V8MessagePortCustom.h"
#include "V8Proxy.h"
@@ -42,11 +42,11 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(DedicatedWorkerContextPostMessage)
+v8::Handle<v8::Value> V8DedicatedWorkerContext::postMessageCallback(const v8::Arguments& args)
{
INC_STATS(L"DOM.DedicatedWorkerContext.postMessage");
- DedicatedWorkerContext* workerContext = V8DOMWrapper::convertToNativeObject<DedicatedWorkerContext>(V8ClassIndex::DEDICATEDWORKERCONTEXT, args.Holder());
- RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(v8ValueToWebCoreString(args[0]));
+ DedicatedWorkerContext* workerContext = V8DedicatedWorkerContext::toNative(args.Holder());
+ RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(args[0]);
MessagePortArray portArray;
if (args.Length() > 1) {
if (!getMessagePortArray(args[1], portArray))
diff --git a/WebCore/bindings/v8/custom/V8DocumentCustom.cpp b/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
index ee68293..4aedde5 100644
--- a/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
@@ -29,9 +29,10 @@
*/
#include "config.h"
-#include "Document.h"
+#include "V8Document.h"
#include "CanvasRenderingContext.h"
+#include "Document.h"
#include "ExceptionCode.h"
#include "Node.h"
#include "XPathNSResolver.h"
@@ -53,16 +54,21 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(DocumentEvaluate)
+v8::Handle<v8::Value> V8Document::evaluateCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Document.evaluate()");
+<<<<<<< HEAD
#if ENABLE(XPATH)
RefPtr<Document> document = V8DOMWrapper::convertDOMWrapperToNode<Document>(args.Holder());
+=======
+
+ RefPtr<Document> document = V8Document::toNative(args.Holder());
+>>>>>>> webkit.org at r54127
ExceptionCode ec = 0;
String expression = toWebCoreString(args[0]);
RefPtr<Node> contextNode;
if (V8Node::HasInstance(args[1]))
- contextNode = V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[1]));
+ contextNode = V8Node::toNative(v8::Handle<v8::Object>::Cast(args[1]));
RefPtr<XPathNSResolver> resolver = V8DOMWrapper::getXPathNSResolver(args[2], V8Proxy::retrieve(V8Proxy::retrieveFrameForCallingContext()));
if (!resolver && !args[2]->IsNull() && !args[2]->IsUndefined())
@@ -71,7 +77,7 @@ CALLBACK_FUNC_DECL(DocumentEvaluate)
int type = toInt32(args[3]);
RefPtr<XPathResult> inResult;
if (V8XPathResult::HasInstance(args[4]))
- inResult = V8DOMWrapper::convertToNativeObject<XPathResult>(V8ClassIndex::XPATHRESULT, v8::Handle<v8::Object>::Cast(args[4]));
+ inResult = V8XPathResult::toNative(v8::Handle<v8::Object>::Cast(args[4]));
v8::TryCatch exceptionCatcher;
RefPtr<XPathResult> result = document->evaluate(expression, contextNode.get(), resolver.get(), type, inResult.get(), ec);
@@ -88,11 +94,11 @@ CALLBACK_FUNC_DECL(DocumentEvaluate)
}
-CALLBACK_FUNC_DECL(DocumentGetCSSCanvasContext)
+v8::Handle<v8::Value> V8Document::getCSSCanvasContextCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Document.getCSSCanvasContext");
v8::Handle<v8::Object> holder = args.Holder();
- Document* imp = V8DOMWrapper::convertDOMWrapperToNode<Document>(holder);
+ Document* imp = V8Document::toNative(holder);
String contextId = toWebCoreString(args[0]);
String name = toWebCoreString(args[1]);
int width = toInt32(args[2]);
@@ -110,4 +116,32 @@ CALLBACK_FUNC_DECL(DocumentGetCSSCanvasContext)
return v8::Undefined();
}
+
+// DOMImplementation is a singleton in WebCore. If we use our normal
+// mapping from DOM objects to V8 wrappers, the same wrapper will be
+// shared for all frames in the same process. This is a major
+// security problem. Therefore, we generate a DOMImplementation
+// wrapper per document and store it in an internal field of the
+// document. Since the DOMImplementation object is a singleton, we do
+// not have to do anything to keep the DOMImplementation object alive
+// for the lifetime of the wrapper.
+v8::Handle<v8::Value> V8Document::implementationAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ ASSERT(info.Holder()->InternalFieldCount() >= internalFieldCount);
+
+ // Check if the internal field already contains a wrapper.
+ v8::Local<v8::Value> implementation = info.Holder()->GetInternalField(V8Document::implementationIndex);
+ if (!implementation->IsUndefined())
+ return implementation;
+
+ // Generate a wrapper.
+ Document* document = V8Document::toNative(info.Holder());
+ v8::Handle<v8::Value> wrapper = V8DOMWrapper::convertDOMImplementationToV8Object(document->implementation());
+
+ // Store the wrapper in the internal field.
+ info.Holder()->SetInternalField(implementationIndex, wrapper);
+
+ return wrapper;
+}
+
} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8DocumentLocationCustom.cpp b/WebCore/bindings/v8/custom/V8DocumentLocationCustom.cpp
index 440bbdc..8dc4672 100644
--- a/WebCore/bindings/v8/custom/V8DocumentLocationCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DocumentLocationCustom.cpp
@@ -22,19 +22,20 @@
*/
#include "config.h"
-#include "V8CustomBinding.h"
+#include "V8Document.h"
#include "DOMWindow.h"
#include "Frame.h"
#include "V8Binding.h"
+#include "V8CustomBinding.h"
#include "V8Document.h"
#include "V8Proxy.h"
namespace WebCore {
-ACCESSOR_GETTER(DocumentLocation)
+v8::Handle<v8::Value> V8Document::locationAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
- Document* document = V8DOMWrapper::convertDOMWrapperToNative<Document>(info.Holder());
+ Document* document = V8Document::toNative(info.Holder());
if (!document->frame())
return v8::Null();
@@ -42,15 +43,15 @@ ACCESSOR_GETTER(DocumentLocation)
return V8DOMWrapper::convertToV8Object(V8ClassIndex::LOCATION, window->location());
}
-ACCESSOR_SETTER(DocumentLocation)
+void V8Document::locationAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
- Document* document = V8DOMWrapper::convertDOMWrapperToNative<Document>(info.Holder());
+ Document* document = V8Document::toNative(info.Holder());
if (!document->frame())
return;
DOMWindow* window = document->frame()->domWindow();
- // WindowSetLocation does security checks. // XXXMB- verify!
- WindowSetLocation(window, toWebCoreString(value));
+ // setLocation does security checks. // XXXMB- verify!
+ V8DOMWindowShell::setLocation(window, toWebCoreString(value));
}
} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8ElementCustom.cpp b/WebCore/bindings/v8/custom/V8ElementCustom.cpp
index e17e0a9..0f13f9d 100644
--- a/WebCore/bindings/v8/custom/V8ElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8ElementCustom.cpp
@@ -29,11 +29,12 @@
*/
#include "config.h"
-#include "Element.h"
+#include "V8Element.h"
#include "Attr.h"
#include "CSSHelper.h"
#include "Document.h"
+#include "Element.h"
#include "ExceptionCode.h"
#include "HTMLFrameElementBase.h"
#include "HTMLNames.h"
@@ -41,6 +42,7 @@
#include "V8Attr.h"
#include "V8Binding.h"
+#include "V8BindingState.h"
#include "V8CustomBinding.h"
#include "V8Proxy.h"
@@ -48,14 +50,14 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(ElementSetAttribute)
+v8::Handle<v8::Value> V8Element::setAttributeCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Element.setAttribute()");
- Element* element = V8DOMWrapper::convertDOMWrapperToNode<Element>(args.Holder());
+ Element* element = V8Element::toNative(args.Holder());
String name = toWebCoreString(args[0]);
String value = toWebCoreString(args[1]);
- if (!allowSettingSrcToJavascriptURL(element, name, value))
+ if (!V8BindingSecurity::allowSettingSrcToJavascriptURL(V8BindingState::Only(), element, name, value))
return v8::Undefined();
ExceptionCode ec = 0;
@@ -66,16 +68,16 @@ CALLBACK_FUNC_DECL(ElementSetAttribute)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(ElementSetAttributeNode)
+v8::Handle<v8::Value> V8Element::setAttributeNodeCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Element.setAttributeNode()");
if (!V8Attr::HasInstance(args[0]))
return throwError(TYPE_MISMATCH_ERR);
- Attr* newAttr = V8DOMWrapper::convertDOMWrapperToNode<Attr>(v8::Handle<v8::Object>::Cast(args[0]));
- Element* element = V8DOMWrapper::convertDOMWrapperToNode<Element>(args.Holder());
+ Attr* newAttr = V8Attr::toNative(v8::Handle<v8::Object>::Cast(args[0]));
+ Element* element = V8Element::toNative(args.Holder());
- if (!allowSettingSrcToJavascriptURL(element, newAttr->name(), newAttr->value()))
+ if (!V8BindingSecurity::allowSettingSrcToJavascriptURL(V8BindingState::Only(), element, newAttr->name(), newAttr->value()))
return v8::Undefined();
ExceptionCode ec = 0;
@@ -86,15 +88,15 @@ CALLBACK_FUNC_DECL(ElementSetAttributeNode)
return V8DOMWrapper::convertNodeToV8Object(result.release());
}
-CALLBACK_FUNC_DECL(ElementSetAttributeNS)
+v8::Handle<v8::Value> V8Element::setAttributeNSCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Element.setAttributeNS()");
- Element* element = V8DOMWrapper::convertDOMWrapperToNode<Element>(args.Holder());
+ Element* element = V8Element::toNative(args.Holder());
String namespaceURI = toWebCoreStringWithNullCheck(args[0]);
String qualifiedName = toWebCoreString(args[1]);
String value = toWebCoreString(args[2]);
- if (!allowSettingSrcToJavascriptURL(element, qualifiedName, value))
+ if (!V8BindingSecurity::allowSettingSrcToJavascriptURL(V8BindingState::Only(), element, qualifiedName, value))
return v8::Undefined();
ExceptionCode ec = 0;
@@ -105,16 +107,16 @@ CALLBACK_FUNC_DECL(ElementSetAttributeNS)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(ElementSetAttributeNodeNS)
+v8::Handle<v8::Value> V8Element::setAttributeNodeNSCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Element.setAttributeNodeNS()");
if (!V8Attr::HasInstance(args[0]))
return throwError(TYPE_MISMATCH_ERR);
- Attr* newAttr = V8DOMWrapper::convertDOMWrapperToNode<Attr>(v8::Handle<v8::Object>::Cast(args[0]));
- Element* element = V8DOMWrapper::convertDOMWrapperToNode<Element>(args.Holder());
+ Attr* newAttr = V8Attr::toNative(v8::Handle<v8::Object>::Cast(args[0]));
+ Element* element = V8Element::toNative(args.Holder());
- if (!allowSettingSrcToJavascriptURL(element, newAttr->name(), newAttr->value()))
+ if (!V8BindingSecurity::allowSettingSrcToJavascriptURL(V8BindingState::Only(), element, newAttr->name(), newAttr->value()))
return v8::Undefined();
ExceptionCode ec = 0;
diff --git a/WebCore/bindings/v8/custom/V8EventCustom.cpp b/WebCore/bindings/v8/custom/V8EventCustom.cpp
index 8bac40f..65cd41e 100644
--- a/WebCore/bindings/v8/custom/V8EventCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8EventCustom.cpp
@@ -29,27 +29,27 @@
*/
#include "config.h"
-#include "Event.h"
+#include "V8Event.h"
#include "Clipboard.h"
#include "ClipboardEvent.h"
+#include "Event.h"
#include "MouseEvent.h"
-
#include "V8Binding.h"
#include "V8CustomBinding.h"
#include "V8Proxy.h"
namespace WebCore {
-ACCESSOR_SETTER(EventReturnValue)
+void V8Event::valueAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
- Event* event = V8DOMWrapper::convertDOMWrapperToNative<Event>(info.Holder());
+ Event* event = V8Event::toNative(info.Holder());
event->setDefaultPrevented(!value->BooleanValue());
}
-ACCESSOR_GETTER(EventDataTransfer)
+v8::Handle<v8::Value> V8Event::dataTransferAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
- Event* event = V8DOMWrapper::convertDOMWrapperToNative<Event>(info.Holder());
+ Event* event = V8Event::toNative(info.Holder());
if (event->isDragEvent())
return V8DOMWrapper::convertToV8Object(V8ClassIndex::CLIPBOARD, static_cast<MouseEvent*>(event)->clipboard());
@@ -57,9 +57,9 @@ ACCESSOR_GETTER(EventDataTransfer)
return v8::Undefined();
}
-ACCESSOR_GETTER(EventClipboardData)
+v8::Handle<v8::Value> V8Event::clipboardDataAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
- Event* event = V8DOMWrapper::convertDOMWrapperToNative<Event>(info.Holder());
+ Event* event = V8Event::toNative(info.Holder());
if (event->isClipboardEvent())
return V8DOMWrapper::convertToV8Object(V8ClassIndex::CLIPBOARD, static_cast<ClipboardEvent*>(event)->clipboard());
@@ -67,16 +67,4 @@ ACCESSOR_GETTER(EventClipboardData)
return v8::Undefined();
}
-ACCESSOR_GETTER(EventSrcElement)
-{
- Event* event = V8DOMWrapper::convertDOMWrapperToNative<Event>(info.Holder());
- return V8DOMWrapper::convertEventTargetToV8Object(event->target());
-}
-
-ACCESSOR_GETTER(EventReturnValue)
-{
- Event* event = V8DOMWrapper::convertDOMWrapperToNative<Event>(info.Holder());
- return event->defaultPrevented() ? v8::False() : v8::True();
-}
-
} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp b/WebCore/bindings/v8/custom/V8EventSourceConstructor.cpp
index 0dfa515..458c35d 100644
--- a/WebCore/bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8EventSourceConstructor.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -29,50 +29,52 @@
*/
#include "config.h"
-#include "HTMLSelectElement.h"
-#include "HTMLOptionsCollection.h"
+#if ENABLE(EVENTSOURCE)
+#include "V8EventSource.h"
+
+#include "EventSource.h"
+#include "Frame.h"
#include "V8Binding.h"
-#include "V8Collection.h"
#include "V8CustomBinding.h"
-#include "V8NamedNodesCollection.h"
#include "V8Proxy.h"
+#include "V8Utilities.h"
+#include "WorkerContext.h"
+#include "WorkerContextExecutionProxy.h"
namespace WebCore {
-NAMED_PROPERTY_GETTER(HTMLSelectElementCollection)
+v8::Handle<v8::Value> V8EventSource::constructorCallback(const v8::Arguments& args)
{
- INC_STATS("DOM.HTMLSelectElementCollection.NamedPropertySetter");
- HTMLSelectElement* select = V8DOMWrapper::convertDOMWrapperToNode<HTMLSelectElement>(info.Holder());
- v8::Handle<v8::Value> value = info.Holder()->GetRealNamedPropertyInPrototypeChain(name);
-
- if (!value.IsEmpty())
- return value;
-
- // Search local callback properties next to find IDL defined properties.
- if (info.Holder()->HasRealNamedCallbackProperty(name))
- return notHandledByInterceptor();
+ INC_STATS("DOM.EventSource.Constructor");
- PassRefPtr<HTMLOptionsCollection> collection = select->options();
+ if (!args.IsConstructCall())
+ return throwError("DOM object constructor cannot be called as a function.", V8Proxy::TypeError);
- Vector<RefPtr<Node> > items;
- collection->namedItems(v8StringToAtomicWebCoreString(name), items);
+ // Expect one parameter.
+ // Allocate an EventSource object as its internal field.
+ ScriptExecutionContext* context = getScriptExecutionContext();
+ if (!context)
+ return throwError("EventSource constructor's associated context is not available", V8Proxy::ReferenceError);
+ if (args.Length() != 1)
+ return throwError("EventSource constructor wrong number of parameters", V8Proxy::TypeError);
- if (!items.size())
- return notHandledByInterceptor();
+ ExceptionCode ec = 0;
+ String url = toWebCoreString(args[0]);
- if (items.size() == 1)
- return V8DOMWrapper::convertNodeToV8Object(items.at(0).release());
+ RefPtr<EventSource> eventSource = EventSource::create(url, context, ec);
+
+ if (ec)
+ return throwError(ec);
- NodeList* list = new V8NamedNodesCollection(items);
- return V8DOMWrapper::convertToV8Object(V8ClassIndex::NODELIST, list);
-}
+ V8DOMWrapper::setDOMWrapper(args.Holder(), V8ClassIndex::ToInt(V8ClassIndex::EVENTSOURCE), eventSource.get());
-INDEXED_PROPERTY_SETTER(HTMLSelectElementCollection)
-{
- INC_STATS("DOM.HTMLSelectElementCollection.IndexedPropertySetter");
- HTMLSelectElement* select = V8DOMWrapper::convertDOMWrapperToNode<HTMLSelectElement>(info.Holder());
- return toOptionsCollectionSetter(index, value, select);
+ // Add object to the wrapper map.
+ eventSource->ref();
+ V8DOMWrapper::setJSWrapperForActiveDOMObject(eventSource.get(), v8::Persistent<v8::Object>::New(args.Holder()));
+ return args.Holder();
}
} // namespace WebCore
+
+#endif // ENABLE(EVENTSOURCE)
diff --git a/WebCore/bindings/v8/custom/V8EventSourceCustom.cpp b/WebCore/bindings/v8/custom/V8EventSourceCustom.cpp
new file mode 100644
index 0000000..e603549
--- /dev/null
+++ b/WebCore/bindings/v8/custom/V8EventSourceCustom.cpp
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2010, The Android Open Source Project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(EVENTSOURCE)
+#include "V8EventSource.h"
+
+#include "EventSource.h"
+
+#include "V8Binding.h"
+#include "V8CustomBinding.h"
+#include "V8Proxy.h"
+
+namespace WebCore {
+
+v8::Handle<v8::Value> V8EventSource::addEventListenerCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.EventSource.addEventListener()");
+ EventSource* eventSource = V8EventSource::toNative(args.Holder());
+
+ RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(eventSource, args[1], false, ListenerFindOrCreate);
+ if (listener) {
+ String type = toWebCoreString(args[0]);
+ bool useCapture = args[2]->BooleanValue();
+ eventSource->addEventListener(type, listener, useCapture);
+
+ createHiddenDependency(args.Holder(), args[1], cacheIndex);
+ }
+ return v8::Undefined();
+}
+
+v8::Handle<v8::Value> V8EventSource::removeEventListenerCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.EventSource.removeEventListener()");
+ EventSource* eventSource = V8EventSource::toNative(args.Holder());
+
+ RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(eventSource, args[1], false, ListenerFindOnly);
+ if (listener) {
+ String type = toWebCoreString(args[0]);
+ bool useCapture = args[2]->BooleanValue();
+ eventSource->removeEventListener(type, listener.get(), useCapture);
+
+ removeHiddenDependency(args.Holder(), args[1], cacheIndex);
+ }
+
+ return v8::Undefined();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(EVENTSOURCE)
diff --git a/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp b/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
index 011beff..6bd9ff2 100644
--- a/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
@@ -24,6 +24,8 @@
*/
#include "config.h"
+#include "V8Geolocation.h"
+
#include "Geolocation.h"
#include "V8Binding.h"
@@ -165,7 +167,7 @@ static PassRefPtr<PositionOptions> createPositionOptions(v8::Local<v8::Value> va
return options.release();
}
-CALLBACK_FUNC_DECL(GeolocationGetCurrentPosition)
+v8::Handle<v8::Value> V8Geolocation::getCurrentPositionCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Geolocation.getCurrentPosition()");
@@ -185,12 +187,12 @@ CALLBACK_FUNC_DECL(GeolocationGetCurrentPosition)
return v8::Undefined();
ASSERT(positionOptions);
- Geolocation* geolocation = V8DOMWrapper::convertToNativeObject<Geolocation>(V8ClassIndex::GEOLOCATION, args.Holder());
+ Geolocation* geolocation = V8Geolocation::toNative(args.Holder());
geolocation->getCurrentPosition(positionCallback.release(), positionErrorCallback.release(), positionOptions.release());
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(GeolocationWatchPosition)
+v8::Handle<v8::Value> V8Geolocation::watchPositionCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Geolocation.watchPosition()");
@@ -210,7 +212,7 @@ CALLBACK_FUNC_DECL(GeolocationWatchPosition)
return v8::Undefined();
ASSERT(positionOptions);
- Geolocation* geolocation = V8DOMWrapper::convertToNativeObject<Geolocation>(V8ClassIndex::GEOLOCATION, args.Holder());
+ Geolocation* geolocation = V8Geolocation::toNative(args.Holder());
int watchId = geolocation->watchPosition(positionCallback.release(), positionErrorCallback.release(), positionOptions.release());
return v8::Number::New(watchId);
}
diff --git a/WebCore/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp
index 419f374..c34d9e7 100644
--- a/WebCore/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp
@@ -29,6 +29,8 @@
*/
#include "config.h"
+#include "V8HTMLAllCollection.h"
+
#include "HTMLAllCollection.h"
#include "V8Binding.h"
@@ -69,7 +71,7 @@ static v8::Handle<v8::Value> getItem(HTMLAllCollection* collection, v8::Handle<v
return V8DOMWrapper::convertNodeToV8Object(result.release());
}
-NAMED_PROPERTY_GETTER(HTMLAllCollection)
+v8::Handle<v8::Value> V8HTMLAllCollection::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLAllCollection.NamedPropertyGetter");
// Search the prototype chain first.
@@ -84,21 +86,21 @@ NAMED_PROPERTY_GETTER(HTMLAllCollection)
return v8::Handle<v8::Value>();
// Finally, search the DOM structure.
- HTMLAllCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLAllCollection>(V8ClassIndex::HTMLALLCOLLECTION, info.Holder());
+ HTMLAllCollection* imp = V8HTMLAllCollection::toNative(info.Holder());
return getNamedItems(imp, v8StringToAtomicWebCoreString(name));
}
-CALLBACK_FUNC_DECL(HTMLAllCollectionItem)
+v8::Handle<v8::Value> V8HTMLAllCollection::itemCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLAllCollection.item()");
- HTMLAllCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLAllCollection>(V8ClassIndex::HTMLALLCOLLECTION, args.Holder());
+ HTMLAllCollection* imp = V8HTMLAllCollection::toNative(args.Holder());
return getItem(imp, args[0]);
}
-CALLBACK_FUNC_DECL(HTMLAllCollectionNamedItem)
+v8::Handle<v8::Value> V8HTMLAllCollection::namedItemCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLAllCollection.namedItem()");
- HTMLAllCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLAllCollection>(V8ClassIndex::HTMLALLCOLLECTION, args.Holder());
+ HTMLAllCollection* imp = V8HTMLAllCollection::toNative(args.Holder());
v8::Handle<v8::Value> result = getNamedItems(imp, toWebCoreString(args[0]));
if (result.IsEmpty())
@@ -107,13 +109,13 @@ CALLBACK_FUNC_DECL(HTMLAllCollectionNamedItem)
return result;
}
-CALLBACK_FUNC_DECL(HTMLAllCollectionCallAsFunction)
+v8::Handle<v8::Value> V8HTMLAllCollection::callAsFunctionCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLAllCollection.callAsFunction()");
if (args.Length() < 1)
return v8::Undefined();
- HTMLAllCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLAllCollection>(V8ClassIndex::HTMLALLCOLLECTION, args.Holder());
+ HTMLAllCollection* imp = V8HTMLAllCollection::toNative(args.Holder());
if (args.Length() == 1)
return getItem(imp, args[0]);
diff --git a/WebCore/bindings/v8/custom/V8HTMLAudioElementConstructor.cpp b/WebCore/bindings/v8/custom/V8HTMLAudioElementConstructor.cpp
index c82d88a..e634003 100644
--- a/WebCore/bindings/v8/custom/V8HTMLAudioElementConstructor.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLAudioElementConstructor.cpp
@@ -35,8 +35,8 @@
#include "Document.h"
#include "Frame.h"
#include "HTMLNames.h"
-
#include "V8Binding.h"
+#include "V8HTMLAudioElement.h"
#include "V8Proxy.h"
#include <wtf/RefPtr.h>
@@ -53,7 +53,7 @@ v8::Persistent<v8::FunctionTemplate> V8HTMLAudioElementConstructor::GetTemplate(
v8::Local<v8::FunctionTemplate> result = v8::FunctionTemplate::New(USE_CALLBACK(HTMLAudioElementConstructor));
v8::Local<v8::ObjectTemplate> instance = result->InstanceTemplate();
- instance->SetInternalFieldCount(V8Custom::kNodeMinimumInternalFieldCount);
+ instance->SetInternalFieldCount(V8HTMLAudioElement::internalFieldCount);
result->SetClassName(v8::String::New("HTMLAudioElement"));
result->Inherit(V8DOMWrapper::getTemplate(V8ClassIndex::HTMLAUDIOELEMENT));
@@ -61,7 +61,7 @@ v8::Persistent<v8::FunctionTemplate> V8HTMLAudioElementConstructor::GetTemplate(
return cachedTemplate;
}
-CALLBACK_FUNC_DECL(HTMLAudioElementConstructor)
+v8::Handle<v8::Value> V8Custom::v8HTMLAudioElementConstructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLAudioElement.Contructor");
diff --git a/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
index e51437e..0d1ff44 100644
--- a/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
@@ -29,10 +29,12 @@
*/
#include "config.h"
-#include "HTMLCanvasElement.h"
-#include "CanvasRenderingContext.h"
+#include "V8HTMLCanvasElement.h"
+#include "CanvasContextAttributes.h"
#include "CanvasRenderingContext.h"
+#include "HTMLCanvasElement.h"
+#include "WebGLContextAttributes.h"
#include "V8Binding.h"
#include "V8CustomBinding.h"
#include "V8Node.h"
@@ -40,13 +42,38 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(HTMLCanvasElementGetContext)
+v8::Handle<v8::Value> V8HTMLCanvasElement::getContextCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLCanvasElement.context");
v8::Handle<v8::Object> holder = args.Holder();
- HTMLCanvasElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLCanvasElement>(holder);
+ HTMLCanvasElement* imp = V8HTMLCanvasElement::toNative(holder);
String contextId = toWebCoreString(args[0]);
- CanvasRenderingContext* result = imp->getContext(contextId);
+ RefPtr<CanvasContextAttributes> attrs;
+#if ENABLE(3D_CANVAS)
+ if (contextId == "experimental-webgl" || contextId == "webkit-3d") {
+ attrs = WebGLContextAttributes::create();
+ WebGLContextAttributes* webGLAttrs = static_cast<WebGLContextAttributes*>(attrs.get());
+ if (args.Length() > 1 && args[0]->IsObject()) {
+ v8::Handle<v8::Object> jsAttrs = args[1]->ToObject();
+ v8::Handle<v8::String> alpha = v8::String::New("alpha");
+ if (jsAttrs->Has(alpha))
+ webGLAttrs->setAlpha(jsAttrs->Get(alpha)->BooleanValue());
+ v8::Handle<v8::String> depth = v8::String::New("depth");
+ if (jsAttrs->Has(depth))
+ webGLAttrs->setDepth(jsAttrs->Get(depth)->BooleanValue());
+ v8::Handle<v8::String> stencil = v8::String::New("stencil");
+ if (jsAttrs->Has(stencil))
+ webGLAttrs->setStencil(jsAttrs->Get(stencil)->BooleanValue());
+ v8::Handle<v8::String> antialias = v8::String::New("antialias");
+ if (jsAttrs->Has(antialias))
+ webGLAttrs->setAntialias(jsAttrs->Get(antialias)->BooleanValue());
+ v8::Handle<v8::String> premultipliedAlpha = v8::String::New("premultipliedAlpha");
+ if (jsAttrs->Has(premultipliedAlpha))
+ webGLAttrs->setPremultipliedAlpha(jsAttrs->Get(premultipliedAlpha)->BooleanValue());
+ }
+ }
+#endif
+ CanvasRenderingContext* result = imp->getContext(contextId, attrs.get());
if (!result)
return v8::Undefined();
if (result->is2d())
@@ -60,4 +87,3 @@ CALLBACK_FUNC_DECL(HTMLCanvasElementGetContext)
}
} // namespace WebCore
-
diff --git a/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp
index 7c9b40f..8bb3c3a 100644
--- a/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp
@@ -29,8 +29,9 @@
*/
#include "config.h"
-#include "HTMLCollection.h"
+#include "V8HTMLCollection.h"
+#include "HTMLCollection.h"
#include "V8Binding.h"
#include "V8CustomBinding.h"
#include "V8NamedNodesCollection.h"
@@ -69,7 +70,7 @@ static v8::Handle<v8::Value> getItem(HTMLCollection* collection, v8::Handle<v8::
return V8DOMWrapper::convertNodeToV8Object(result.release());
}
-NAMED_PROPERTY_GETTER(HTMLCollection)
+v8::Handle<v8::Value> V8HTMLCollection::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLCollection.NamedPropertyGetter");
// Search the prototype chain first.
@@ -84,21 +85,21 @@ NAMED_PROPERTY_GETTER(HTMLCollection)
return v8::Handle<v8::Value>();
// Finally, search the DOM structure.
- HTMLCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLCollection>(V8ClassIndex::HTMLCOLLECTION, info.Holder());
+ HTMLCollection* imp = V8HTMLCollection::toNative(info.Holder());
return getNamedItems(imp, v8StringToAtomicWebCoreString(name));
}
-CALLBACK_FUNC_DECL(HTMLCollectionItem)
+v8::Handle<v8::Value> V8HTMLCollection::itemCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLCollection.item()");
- HTMLCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLCollection>(V8ClassIndex::HTMLCOLLECTION, args.Holder());
+ HTMLCollection* imp = V8HTMLCollection::toNative(args.Holder());
return getItem(imp, args[0]);
}
-CALLBACK_FUNC_DECL(HTMLCollectionNamedItem)
+v8::Handle<v8::Value> V8HTMLCollection::namedItemCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLCollection.namedItem()");
- HTMLCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLCollection>(V8ClassIndex::HTMLCOLLECTION, args.Holder());
+ HTMLCollection* imp = V8HTMLCollection::toNative(args.Holder());
v8::Handle<v8::Value> result = getNamedItems(imp, toWebCoreString(args[0]));
if (result.IsEmpty())
@@ -107,13 +108,13 @@ CALLBACK_FUNC_DECL(HTMLCollectionNamedItem)
return result;
}
-CALLBACK_FUNC_DECL(HTMLCollectionCallAsFunction)
+v8::Handle<v8::Value> V8HTMLCollection::callAsFunctionCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLCollection.callAsFunction()");
if (args.Length() < 1)
return v8::Undefined();
- HTMLCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLCollection>(V8ClassIndex::HTMLCOLLECTION, args.Holder());
+ HTMLCollection* imp = V8HTMLCollection::toNative(args.Holder());
if (args.Length() == 1)
return getItem(imp, args[0]);
diff --git a/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
index 9cf2f3d..13243ef 100644
--- a/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
@@ -29,24 +29,22 @@
*/
#include "config.h"
-#include "HTMLDocument.h"
+#include "V8HTMLDocument.h"
#include "Frame.h"
#include "HTMLAllCollection.h"
+#include "HTMLDocument.h"
#include "HTMLCollection.h"
#include "HTMLIFrameElement.h"
#include "HTMLNames.h"
-
#include "V8Binding.h"
-#include "V8CustomBinding.h"
#include "V8Proxy.h"
-
#include <wtf/RefPtr.h>
#include <wtf/StdLibExtras.h>
namespace WebCore {
-NAMED_PROPERTY_DELETER(HTMLDocument)
+v8::Handle<v8::Boolean> V8HTMLDocument::namedPropertyDeleter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
// Only handle document.all. Insert the marker object into the
// shadow internal field to signal that document.all is no longer
@@ -56,13 +54,13 @@ NAMED_PROPERTY_DELETER(HTMLDocument)
if (key != all)
return deletionNotHandledByInterceptor();
- ASSERT(info.Holder()->InternalFieldCount() == kHTMLDocumentInternalFieldCount);
- v8::Local<v8::Value> marker = info.Holder()->GetInternalField(kHTMLDocumentMarkerIndex);
- info.Holder()->SetInternalField(kHTMLDocumentShadowIndex, marker);
+ ASSERT(info.Holder()->InternalFieldCount() == V8HTMLDocument::internalFieldCount);
+ v8::Local<v8::Value> marker = info.Holder()->GetInternalField(V8HTMLDocument::markerIndex);
+ info.Holder()->SetInternalField(V8HTMLDocument::shadowIndex, marker);
return v8::True();
}
-NAMED_PROPERTY_GETTER(HTMLDocument)
+v8::Handle<v8::Value> V8HTMLDocument::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLDocument.NamedPropertyGetter");
AtomicString key = v8StringToAtomicWebCoreString(name);
@@ -72,14 +70,14 @@ NAMED_PROPERTY_GETTER(HTMLDocument)
// been temporarily shadowed and we return the value.
DEFINE_STATIC_LOCAL(const AtomicString, all, ("all"));
if (key == all) {
- ASSERT(info.Holder()->InternalFieldCount() == kHTMLDocumentInternalFieldCount);
- v8::Local<v8::Value> marker = info.Holder()->GetInternalField(kHTMLDocumentMarkerIndex);
- v8::Local<v8::Value> value = info.Holder()->GetInternalField(kHTMLDocumentShadowIndex);
+ ASSERT(info.Holder()->InternalFieldCount() == V8HTMLDocument::internalFieldCount);
+ v8::Local<v8::Value> marker = info.Holder()->GetInternalField(V8HTMLDocument::markerIndex);
+ v8::Local<v8::Value> value = info.Holder()->GetInternalField(V8HTMLDocument::shadowIndex);
if (marker != value)
return value;
}
- HTMLDocument* htmlDocument = V8DOMWrapper::convertDOMWrapperToNode<HTMLDocument>(info.Holder());
+ HTMLDocument* htmlDocument = V8HTMLDocument::toNative(info.Holder());
// Fast case for named elements that are not there.
if (!htmlDocument->hasNamedItem(key.impl()) && !htmlDocument->hasExtraNamedItem(key.impl()))
@@ -101,6 +99,13 @@ NAMED_PROPERTY_GETTER(HTMLDocument)
return V8DOMWrapper::convertToV8Object(V8ClassIndex::HTMLCOLLECTION, items.release());
}
+v8::Handle<v8::Value> V8HTMLDocument::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo &info)
+{
+ INC_STATS("DOM.HTMLDocument.IndexedPropertyGetter");
+ v8::Local<v8::Integer> indexV8 = v8::Integer::NewFromUnsigned(index);
+ return namedPropertyGetter(indexV8->ToString(), info);
+}
+
// HTMLDocument ----------------------------------------------------------------
// Concatenates "args" to a string. If args is empty, returns empty string.
@@ -115,28 +120,28 @@ static String writeHelperGetString(const v8::Arguments& args)
return str;
}
-CALLBACK_FUNC_DECL(HTMLDocumentWrite)
+v8::Handle<v8::Value> V8HTMLDocument::writeCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLDocument.write()");
- HTMLDocument* htmlDocument = V8DOMWrapper::convertDOMWrapperToNode<HTMLDocument>(args.Holder());
+ HTMLDocument* htmlDocument = V8HTMLDocument::toNative(args.Holder());
Frame* frame = V8Proxy::retrieveFrameForCallingContext();
htmlDocument->write(writeHelperGetString(args), frame ? frame->document() : NULL);
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(HTMLDocumentWriteln)
+v8::Handle<v8::Value> V8HTMLDocument::writelnCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLDocument.writeln()");
- HTMLDocument* htmlDocument = V8DOMWrapper::convertDOMWrapperToNode<HTMLDocument>(args.Holder());
+ HTMLDocument* htmlDocument = V8HTMLDocument::toNative(args.Holder());
Frame* frame = V8Proxy::retrieveFrameForCallingContext();
htmlDocument->writeln(writeHelperGetString(args), frame ? frame->document() : NULL);
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(HTMLDocumentOpen)
+v8::Handle<v8::Value> V8HTMLDocument::openCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLDocument.open()");
- HTMLDocument* htmlDocument = V8DOMWrapper::convertDOMWrapperToNode<HTMLDocument>(args.Holder());
+ HTMLDocument* htmlDocument = V8HTMLDocument::toNative(args.Holder());
if (args.Length() > 2) {
if (Frame* frame = htmlDocument->frame()) {
@@ -173,21 +178,21 @@ CALLBACK_FUNC_DECL(HTMLDocumentOpen)
return args.Holder();
}
-ACCESSOR_GETTER(HTMLDocumentAll)
+v8::Handle<v8::Value> V8HTMLDocument::allAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLDocument.all._get");
v8::HandleScope scope;
v8::Handle<v8::Object> holder = info.Holder();
- HTMLDocument* htmlDocument = V8DOMWrapper::convertDOMWrapperToNode<HTMLDocument>(holder);
+ HTMLDocument* htmlDocument = V8HTMLDocument::toNative(holder);
return V8DOMWrapper::convertToV8Object(V8ClassIndex::HTMLCOLLECTION, htmlDocument->all());
}
-ACCESSOR_SETTER(HTMLDocumentAll)
+void V8HTMLDocument::allAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLDocument.all._set");
v8::Handle<v8::Object> holder = info.Holder();
- ASSERT(info.Holder()->InternalFieldCount() == kHTMLDocumentInternalFieldCount);
- info.Holder()->SetInternalField(kHTMLDocumentShadowIndex, value);
+ ASSERT(info.Holder()->InternalFieldCount() == V8HTMLDocument::internalFieldCount);
+ info.Holder()->SetInternalField(V8HTMLDocument::shadowIndex, value);
}
} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8HTMLFormElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLFormElementCustom.cpp
index 1ec09f7..d819e9b 100644
--- a/WebCore/bindings/v8/custom/V8HTMLFormElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLFormElementCustom.cpp
@@ -29,9 +29,10 @@
*/
#include "config.h"
-#include "HTMLFormElement.h"
+#include "V8HTMLFormElement.h"
#include "HTMLCollection.h"
+#include "HTMLFormElement.h"
#include "V8Binding.h"
#include "V8CustomBinding.h"
#include "V8NamedNodesCollection.h"
@@ -39,10 +40,10 @@
namespace WebCore {
-INDEXED_PROPERTY_GETTER(HTMLFormElement)
+v8::Handle<v8::Value> V8HTMLFormElement::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLFormElement.IndexedPropertyGetter");
- HTMLFormElement* form = V8DOMWrapper::convertDOMWrapperToNode<HTMLFormElement>(info.Holder());
+ HTMLFormElement* form = V8HTMLFormElement::toNative(info.Holder());
RefPtr<Node> formElement = form->elements()->item(index);
if (!formElement)
@@ -50,11 +51,10 @@ INDEXED_PROPERTY_GETTER(HTMLFormElement)
return V8DOMWrapper::convertNodeToV8Object(formElement.release());
}
-
-NAMED_PROPERTY_GETTER(HTMLFormElement)
+v8::Handle<v8::Value> V8HTMLFormElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLFormElement.NamedPropertyGetter");
- HTMLFormElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLFormElement>(info.Holder());
+ HTMLFormElement* imp = V8HTMLFormElement::toNative(info.Holder());
AtomicString v = v8StringToAtomicWebCoreString(name);
// Call getNamedElements twice, first time check if it has a value
@@ -80,10 +80,15 @@ NAMED_PROPERTY_GETTER(HTMLFormElement)
return V8DOMWrapper::convertToV8Object(V8ClassIndex::NODELIST, collection);
}
-CALLBACK_FUNC_DECL(HTMLFormElementSubmit) {
+v8::Handle<v8::Value> V8HTMLFormElement::submitCallback(const v8::Arguments& args)
+{
INC_STATS("DOM.HTMLFormElement.submit()");
- HTMLFormElement* form = V8DOMWrapper::convertDOMWrapperToNative<HTMLFormElement>(args.Holder());
- form->submit(0, false, false);
+ HTMLFormElement* form = V8HTMLFormElement::toNative(args.Holder());
+ Frame* frame = V8Proxy::retrieveFrameForEnteredContext();
+ if (!frame)
+ return v8::Undefined();
+
+ form->submit(frame);
return v8::Undefined();
}
diff --git a/WebCore/bindings/v8/custom/V8HTMLFrameElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLFrameElementCustom.cpp
index 2f55758..fd831bf 100644
--- a/WebCore/bindings/v8/custom/V8HTMLFrameElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLFrameElementCustom.cpp
@@ -29,10 +29,12 @@
*/
#include "config.h"
+#include "V8HTMLFrameElement.h"
+
#include "HTMLFrameElement.h"
#include "HTMLNames.h"
-
#include "V8Binding.h"
+#include "V8BindingState.h"
#include "V8CustomBinding.h"
#include "V8Proxy.h"
@@ -40,23 +42,23 @@ namespace WebCore {
using namespace HTMLNames;
-ACCESSOR_SETTER(HTMLFrameElementSrc)
+void V8HTMLFrameElement::srcAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
- HTMLFrameElement* frame = V8DOMWrapper::convertDOMWrapperToNode<HTMLFrameElement>(info.Holder());
+ HTMLFrameElement* frame = V8HTMLFrameElement::toNative(info.Holder());
String srcValue = toWebCoreStringWithNullCheck(value);
- if (!allowSettingFrameSrcToJavascriptUrl(frame, srcValue))
+ if (!V8BindingSecurity::allowSettingFrameSrcToJavascriptUrl(V8BindingState::Only(), frame, srcValue))
return;
frame->setAttribute(srcAttr, srcValue);
}
-ACCESSOR_SETTER(HTMLFrameElementLocation)
+void V8HTMLFrameElement::locationAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
- HTMLFrameElement* frame = V8DOMWrapper::convertDOMWrapperToNode<HTMLFrameElement>(info.Holder());
+ HTMLFrameElement* frame = V8HTMLFrameElement::toNative(info.Holder());
String locationValue = toWebCoreStringWithNullCheck(value);
- if (!allowSettingFrameSrcToJavascriptUrl(frame, locationValue))
+ if (!V8BindingSecurity::allowSettingFrameSrcToJavascriptUrl(V8BindingState::Only(), frame, locationValue))
return;
frame->setLocation(locationValue);
diff --git a/WebCore/bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp
index e8e2e72..214b11e 100644
--- a/WebCore/bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp
@@ -29,12 +29,13 @@
*/
#include "config.h"
-#include "HTMLFrameSetElement.h"
+#include "V8HTMLFrameSetElement.h"
#include "Document.h"
#include "Frame.h"
#include "HTMLCollection.h"
#include "HTMLFrameElement.h"
+#include "HTMLFrameSetElement.h"
#include "HTMLNames.h"
#include "Node.h"
@@ -44,10 +45,10 @@
namespace WebCore {
-NAMED_PROPERTY_GETTER(HTMLFrameSetElement)
+v8::Handle<v8::Value> V8HTMLFrameSetElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLFrameSetElement.NamedPropertyGetter");
- HTMLFrameSetElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLFrameSetElement>(info.Holder());
+ HTMLFrameSetElement* imp = V8HTMLFrameSetElement::toNative(info.Holder());
Node* frameNode = imp->children()->namedItem(v8StringToAtomicWebCoreString(name));
if (frameNode && frameNode->hasTagName(HTMLNames::frameTag)) {
Document* doc = static_cast<HTMLFrameElement*>(frameNode)->contentDocument();
diff --git a/WebCore/bindings/v8/custom/V8HTMLIFrameElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLIFrameElementCustom.cpp
index a4863e8..1949632 100644
--- a/WebCore/bindings/v8/custom/V8HTMLIFrameElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLIFrameElementCustom.cpp
@@ -29,10 +29,12 @@
*/
#include "config.h"
+#include "V8HTMLIFrameElement.h"
+
#include "HTMLIFrameElement.h"
#include "HTMLNames.h"
-
#include "V8Binding.h"
+#include "V8BindingState.h"
#include "V8CustomBinding.h"
#include "V8Proxy.h"
@@ -40,12 +42,12 @@ namespace WebCore {
using namespace HTMLNames;
-ACCESSOR_SETTER(HTMLIFrameElementSrc)
+void V8HTMLIFrameElement::srcAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
- HTMLIFrameElement* iframe = V8DOMWrapper::convertDOMWrapperToNode<HTMLIFrameElement>(info.Holder());
+ HTMLIFrameElement* iframe = V8HTMLIFrameElement::toNative(info.Holder());
String v = toWebCoreStringWithNullCheck(value);
- if (!allowSettingFrameSrcToJavascriptUrl(iframe, v))
+ if (!V8BindingSecurity::allowSettingFrameSrcToJavascriptUrl(V8BindingState::Only(), iframe, v))
return;
iframe->setAttribute(srcAttr, v);
diff --git a/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp b/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp
index 71c99cf..57efa34 100644
--- a/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp
@@ -35,8 +35,8 @@
#include "Document.h"
#include "Frame.h"
#include "HTMLNames.h"
-
#include "V8Binding.h"
+#include "V8HTMLImageElement.h"
#include "V8Proxy.h"
#include <wtf/RefPtr.h>
@@ -53,7 +53,7 @@ v8::Persistent<v8::FunctionTemplate> V8HTMLImageElementConstructor::GetTemplate(
v8::Local<v8::FunctionTemplate> result = v8::FunctionTemplate::New(USE_CALLBACK(HTMLImageElementConstructor));
v8::Local<v8::ObjectTemplate> instance = result->InstanceTemplate();
- instance->SetInternalFieldCount(V8Custom::kNodeMinimumInternalFieldCount);
+ instance->SetInternalFieldCount(V8HTMLImageElement::internalFieldCount);
result->SetClassName(v8::String::New("HTMLImageElement"));
result->Inherit(V8DOMWrapper::getTemplate(V8ClassIndex::HTMLIMAGEELEMENT));
@@ -61,7 +61,7 @@ v8::Persistent<v8::FunctionTemplate> V8HTMLImageElementConstructor::GetTemplate(
return cachedTemplate;
}
-CALLBACK_FUNC_DECL(HTMLImageElementConstructor)
+v8::Handle<v8::Value> V8Custom::v8HTMLImageElementConstructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLImageElement.Contructor");
diff --git a/WebCore/bindings/v8/custom/V8HTMLInputElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLInputElementCustom.cpp
index 63fbcec..78486b3 100644
--- a/WebCore/bindings/v8/custom/V8HTMLInputElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLInputElementCustom.cpp
@@ -29,6 +29,8 @@
*/
#include "config.h"
+#include "V8HTMLInputElement.h"
+
#include "HTMLInputElement.h"
#include "V8Binding.h"
@@ -37,11 +39,11 @@
namespace WebCore {
-ACCESSOR_GETTER(HTMLInputElementSelectionStart)
+v8::Handle<v8::Value> V8HTMLInputElement::selectionStartAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLInputElement.selectionStart._get");
v8::Handle<v8::Object> holder = info.Holder();
- HTMLInputElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLInputElement>(holder);
+ HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
if (!imp->canHaveSelection())
return throwError("Accessing selectionStart on an input element that cannot have a selection.");
@@ -50,11 +52,11 @@ ACCESSOR_GETTER(HTMLInputElementSelectionStart)
return v8::Integer::New(v);
}
-ACCESSOR_SETTER(HTMLInputElementSelectionStart)
+void V8HTMLInputElement::selectionStartAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLInputElement.selectionStart._set");
v8::Handle<v8::Object> holder = info.Holder();
- HTMLInputElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLInputElement>(holder);
+ HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
if (!imp->canHaveSelection()) {
throwError("Accessing selectionStart on an input element that cannot have a selection.");
@@ -63,11 +65,11 @@ ACCESSOR_SETTER(HTMLInputElementSelectionStart)
imp->setSelectionStart(value->Int32Value());
}
-ACCESSOR_GETTER(HTMLInputElementSelectionEnd)
+v8::Handle<v8::Value> V8HTMLInputElement::selectionEndAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLInputElement.selectionEnd._get");
v8::Handle<v8::Object> holder = info.Holder();
- HTMLInputElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLInputElement>(holder);
+ HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
if (!imp->canHaveSelection())
return throwError("Accessing selectionEnd on an input element that cannot have a selection.");
@@ -76,11 +78,11 @@ ACCESSOR_GETTER(HTMLInputElementSelectionEnd)
return v8::Integer::New(v);
}
-ACCESSOR_SETTER(HTMLInputElementSelectionEnd)
+void V8HTMLInputElement::selectionEndAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLInputElement.selectionEnd._set");
v8::Handle<v8::Object> holder = info.Holder();
- HTMLInputElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLInputElement>(holder);
+ HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
if (!imp->canHaveSelection()) {
throwError("Accessing selectionEnd on an input element that cannot have a selection.");
@@ -90,11 +92,11 @@ ACCESSOR_SETTER(HTMLInputElementSelectionEnd)
imp->setSelectionEnd(value->Int32Value());
}
-CALLBACK_FUNC_DECL(HTMLInputElementSetSelectionRange)
+v8::Handle<v8::Value> V8HTMLInputElement::setSelectionRangeCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLInputElement.setSelectionRange");
v8::Handle<v8::Object> holder = args.Holder();
- HTMLInputElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLInputElement>(holder);
+ HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
if (!imp->canHaveSelection())
return throwError("Calling setSelectionRange on an input element that cannot have a selection.");
diff --git a/WebCore/bindings/v8/custom/V8HTMLOptionElementConstructor.cpp b/WebCore/bindings/v8/custom/V8HTMLOptionElementConstructor.cpp
index f9c9cb4..5325933 100644
--- a/WebCore/bindings/v8/custom/V8HTMLOptionElementConstructor.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLOptionElementConstructor.cpp
@@ -36,8 +36,8 @@
#include "Frame.h"
#include "HTMLNames.h"
#include "Text.h"
-
#include "V8Binding.h"
+#include "V8HTMLOptionElement.h"
#include "V8Proxy.h"
#include <wtf/RefPtr.h>
@@ -54,7 +54,7 @@ v8::Persistent<v8::FunctionTemplate> V8HTMLOptionElementConstructor::GetTemplate
v8::Local<v8::FunctionTemplate> result = v8::FunctionTemplate::New(USE_CALLBACK(HTMLOptionElementConstructor));
v8::Local<v8::ObjectTemplate> instance = result->InstanceTemplate();
- instance->SetInternalFieldCount(V8Custom::kNodeMinimumInternalFieldCount);
+ instance->SetInternalFieldCount(V8HTMLOptionElement::internalFieldCount);
result->SetClassName(v8::String::New("HTMLOptionElement"));
result->Inherit(V8DOMWrapper::getTemplate(V8ClassIndex::HTMLOPTIONELEMENT));
@@ -62,7 +62,7 @@ v8::Persistent<v8::FunctionTemplate> V8HTMLOptionElementConstructor::GetTemplate
return cachedTemplate;
}
-CALLBACK_FUNC_DECL(HTMLOptionElementConstructor)
+v8::Handle<v8::Value> V8Custom::v8HTMLOptionElementConstructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLOptionElement.Contructor");
diff --git a/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
index 02c3499..c060df7 100644
--- a/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
@@ -29,8 +29,9 @@
*/
#include "config.h"
-#include "HTMLOptionsCollection.h"
+#include "V8HTMLOptionsCollection.h"
+#include "HTMLOptionsCollection.h"
#include "HTMLOptionElement.h"
#include "ExceptionCode.h"
@@ -43,23 +44,23 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(HTMLOptionsCollectionRemove)
+v8::Handle<v8::Value> V8HTMLOptionsCollection::removeCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLOptionsCollection.remove()");
- HTMLOptionsCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLOptionsCollection>(V8ClassIndex::HTMLOPTIONSCOLLECTION, args.Holder());
+ HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(args.Holder());
HTMLSelectElement* base = static_cast<HTMLSelectElement*>(imp->base());
return removeElement(base, args);
}
-CALLBACK_FUNC_DECL(HTMLOptionsCollectionAdd)
+v8::Handle<v8::Value> V8HTMLOptionsCollection::addCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLOptionsCollection.add()");
if (!V8HTMLOptionElement::HasInstance(args[0])) {
V8Proxy::setDOMException(TYPE_MISMATCH_ERR);
return v8::Undefined();
}
- HTMLOptionsCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLOptionsCollection>(V8ClassIndex::HTMLOPTIONSCOLLECTION, args.Holder());
- HTMLOptionElement* option = V8DOMWrapper::convertDOMWrapperToNode<HTMLOptionElement>(v8::Handle<v8::Object>(v8::Handle<v8::Object>::Cast(args[0])));
+ HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(args.Holder());
+ HTMLOptionElement* option = V8HTMLOptionElement::toNative(v8::Handle<v8::Object>(v8::Handle<v8::Object>::Cast(args[0])));
ExceptionCode ec = 0;
if (args.Length() < 2)
@@ -84,18 +85,18 @@ CALLBACK_FUNC_DECL(HTMLOptionsCollectionAdd)
return v8::Undefined();
}
-ACCESSOR_GETTER(HTMLOptionsCollectionLength)
+v8::Handle<v8::Value> V8HTMLOptionsCollection::lengthAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLOptionsCollection.length._get");
- HTMLOptionsCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLOptionsCollection>(V8ClassIndex::HTMLOPTIONSCOLLECTION, info.Holder());
+ HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(info.Holder());
int v = imp->length();
return v8::Integer::New(v);
}
-ACCESSOR_SETTER(HTMLOptionsCollectionLength)
+void V8HTMLOptionsCollection::lengthAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLOptionsCollection.length._set");
- HTMLOptionsCollection* imp = V8DOMWrapper::convertToNativeObject<HTMLOptionsCollection>(V8ClassIndex::HTMLOPTIONSCOLLECTION, info.Holder());
+ HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(info.Holder());
double v = value->NumberValue();
unsigned newLength = 0;
ExceptionCode ec = 0;
@@ -113,10 +114,10 @@ ACCESSOR_SETTER(HTMLOptionsCollectionLength)
V8Proxy::setDOMException(ec);
}
-INDEXED_PROPERTY_GETTER(HTMLOptionsCollection)
+v8::Handle<v8::Value> V8HTMLOptionsCollection::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLOptionsCollection.IndexedPropertyGetter");
- HTMLOptionsCollection* collection = V8DOMWrapper::convertToNativeObject<HTMLOptionsCollection>(V8ClassIndex::HTMLOPTIONSCOLLECTION, info.Holder());
+ HTMLOptionsCollection* collection = V8HTMLOptionsCollection::toNative(info.Holder());
RefPtr<Node> result = collection->item(index);
if (!result)
@@ -125,10 +126,10 @@ INDEXED_PROPERTY_GETTER(HTMLOptionsCollection)
return V8DOMWrapper::convertNodeToV8Object(result.release());
}
-INDEXED_PROPERTY_SETTER(HTMLOptionsCollection)
+v8::Handle<v8::Value> V8HTMLOptionsCollection::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLOptionsCollection.IndexedPropertySetter");
- HTMLOptionsCollection* collection = V8DOMWrapper::convertToNativeObject<HTMLOptionsCollection>(V8ClassIndex::HTMLOPTIONSCOLLECTION, info.Holder());
+ HTMLOptionsCollection* collection = V8HTMLOptionsCollection::toNative(info.Holder());
HTMLSelectElement* base = static_cast<HTMLSelectElement*>(collection->base());
return toOptionsCollectionSetter(index, value, base);
}
diff --git a/WebCore/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp
index 13c82f3..261b5a8 100644
--- a/WebCore/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp
@@ -32,18 +32,23 @@
#include "HTMLPlugInElement.h"
#include "ScriptInstance.h"
-
#include "V8Binding.h"
#include "V8CustomBinding.h"
+#include "V8HTMLAppletElement.h"
+#include "V8HTMLEmbedElement.h"
+#include "V8HTMLObjectElement.h"
#include "V8NPObject.h"
#include "V8Proxy.h"
namespace WebCore {
-NAMED_PROPERTY_GETTER(HTMLPlugInElement)
+// FIXME: Consider moving getter/setter helpers to V8NPObject and renaming this file to V8PluginElementFunctions
+// to match JSC bindings naming convention.
+
+template <class C>
+static v8::Handle<v8::Value> npObjectNamedGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
- INC_STATS("DOM.HTMLPlugInElement.NamedPropertyGetter");
- HTMLPlugInElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLPlugInElement>(info.Holder());
+ HTMLPlugInElement* imp = C::toNative(info.Holder());
ScriptInstance scriptInstance = imp->getInstance();
if (!scriptInstance)
return notHandledByInterceptor();
@@ -55,10 +60,10 @@ NAMED_PROPERTY_GETTER(HTMLPlugInElement)
return npObjectGetNamedProperty(instance, name);
}
-NAMED_PROPERTY_SETTER(HTMLPlugInElement)
+template <class C>
+static v8::Handle<v8::Value> npObjectNamedSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
- INC_STATS("DOM.HTMLPlugInElement.NamedPropertySetter");
- HTMLPlugInElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLPlugInElement>(info.Holder());
+ HTMLPlugInElement* imp = C::toNative(info.Holder());
ScriptInstance scriptInstance = imp->getInstance();
if (!scriptInstance)
return notHandledByInterceptor();
@@ -70,16 +75,65 @@ NAMED_PROPERTY_SETTER(HTMLPlugInElement)
return npObjectSetNamedProperty(instance, name, value);
}
-CALLBACK_FUNC_DECL(HTMLPlugInElement)
+v8::Handle<v8::Value> V8HTMLAppletElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.HTMLAppletElement.NamedPropertyGetter");
+ return npObjectNamedGetter<V8HTMLAppletElement>(name, info);
+}
+
+v8::Handle<v8::Value> V8HTMLEmbedElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.HTMLEmbedElement.NamedPropertyGetter");
+ return npObjectNamedGetter<V8HTMLEmbedElement>(name, info);
+}
+
+v8::Handle<v8::Value> V8HTMLObjectElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.HTMLObjectElement.NamedPropertyGetter");
+ return npObjectNamedGetter<V8HTMLObjectElement>(name, info);
+}
+
+v8::Handle<v8::Value> V8HTMLAppletElement::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.HTMLAppletElement.NamedPropertySetter");
+ return npObjectNamedSetter<V8HTMLAppletElement>(name, value, info);
+}
+
+v8::Handle<v8::Value> V8HTMLEmbedElement::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.HTMLEmbedElement.NamedPropertySetter");
+ return npObjectNamedSetter<V8HTMLEmbedElement>(name, value, info);
+}
+
+v8::Handle<v8::Value> V8HTMLObjectElement::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.HTMLObjectElement.NamedPropertySetter");
+ return npObjectNamedSetter<V8HTMLObjectElement>(name, value, info);
+}
+
+v8::Handle<v8::Value> V8HTMLAppletElement::callAsFunctionCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.HTMLAppletElement()");
+ return npObjectInvokeDefaultHandler(args);
+}
+
+v8::Handle<v8::Value> V8HTMLEmbedElement::callAsFunctionCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.HTMLEmbedElement()");
+ return npObjectInvokeDefaultHandler(args);
+}
+
+v8::Handle<v8::Value> V8HTMLObjectElement::callAsFunctionCallback(const v8::Arguments& args)
{
- INC_STATS("DOM.HTMLPluginElement()");
+ INC_STATS("DOM.HTMLObjectElement()");
return npObjectInvokeDefaultHandler(args);
}
-INDEXED_PROPERTY_GETTER(HTMLPlugInElement)
+template <class C>
+v8::Handle<v8::Value> npObjectIndexedGetter(uint32_t index, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLPlugInElement.IndexedPropertyGetter");
- HTMLPlugInElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLPlugInElement>(info.Holder());
+ HTMLPlugInElement* imp = C::toNative(info.Holder());
ScriptInstance scriptInstance = imp->getInstance();
if (!scriptInstance)
return notHandledByInterceptor();
@@ -91,10 +145,11 @@ INDEXED_PROPERTY_GETTER(HTMLPlugInElement)
return npObjectGetIndexedProperty(instance, index);
}
-INDEXED_PROPERTY_SETTER(HTMLPlugInElement)
+template <class C>
+v8::Handle<v8::Value> npObjectIndexedSetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLPlugInElement.IndexedPropertySetter");
- HTMLPlugInElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLPlugInElement>(info.Holder());
+ HTMLPlugInElement* imp = C::toNative(info.Holder());
ScriptInstance scriptInstance = imp->getInstance();
if (!scriptInstance)
return notHandledByInterceptor();
@@ -106,4 +161,40 @@ INDEXED_PROPERTY_SETTER(HTMLPlugInElement)
return npObjectSetIndexedProperty(instance, index, value);
}
+v8::Handle<v8::Value> V8HTMLAppletElement::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.HTMLAppletElement.IndexedPropertyGetter");
+ return npObjectIndexedGetter<V8HTMLAppletElement>(index, info);
+}
+
+v8::Handle<v8::Value> V8HTMLEmbedElement::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.HTMLEmbedElement.IndexedPropertyGetter");
+ return npObjectIndexedGetter<V8HTMLEmbedElement>(index, info);
+}
+
+v8::Handle<v8::Value> V8HTMLObjectElement::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.HTMLObjectElement.IndexedPropertyGetter");
+ return npObjectIndexedGetter<V8HTMLObjectElement>(index, info);
+}
+
+v8::Handle<v8::Value> V8HTMLAppletElement::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.HTMLAppletElement.IndexedPropertySetter");
+ return npObjectIndexedSetter<V8HTMLAppletElement>(index, value, info);
+}
+
+v8::Handle<v8::Value> V8HTMLEmbedElement::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.HTMLEmbedElement.IndexedPropertySetter");
+ return npObjectIndexedSetter<V8HTMLEmbedElement>(index, value, info);
+}
+
+v8::Handle<v8::Value> V8HTMLObjectElement::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.HTMLObjectElement.IndexedPropertySetter");
+ return npObjectIndexedSetter<V8HTMLObjectElement>(index, value, info);
+}
+
} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8HTMLSelectElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLSelectElementCustom.cpp
index 661ffa2..0904b3e 100644
--- a/WebCore/bindings/v8/custom/V8HTMLSelectElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLSelectElementCustom.cpp
@@ -33,25 +33,75 @@
#include "HTMLSelectElement.h"
#include "HTMLOptionElement.h"
+#include "HTMLOptionsCollection.h"
#include "V8Binding.h"
+#include "V8Collection.h"
#include "V8CustomBinding.h"
#include "V8HTMLOptionElement.h"
+#include "V8HTMLSelectElement.h"
+#include "V8NamedNodesCollection.h"
#include "V8Proxy.h"
namespace WebCore {
-CALLBACK_FUNC_DECL(HTMLSelectElementRemove)
+v8::Handle<v8::Value> V8HTMLSelectElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.HTMLSelectElement.NamedPropertyGetter");
+ HTMLSelectElement* select = V8HTMLSelectElement::toNative(info.Holder());
+ v8::Handle<v8::Value> value = info.Holder()->GetRealNamedPropertyInPrototypeChain(name);
+
+ if (!value.IsEmpty())
+ return value;
+
+ // Search local callback properties next to find IDL defined properties.
+ if (info.Holder()->HasRealNamedCallbackProperty(name))
+ return notHandledByInterceptor();
+
+ PassRefPtr<HTMLOptionsCollection> collection = select->options();
+
+ Vector<RefPtr<Node> > items;
+ collection->namedItems(v8StringToAtomicWebCoreString(name), items);
+
+ if (!items.size())
+ return notHandledByInterceptor();
+
+ if (items.size() == 1)
+ return V8DOMWrapper::convertNodeToV8Object(items.at(0).release());
+
+ NodeList* list = new V8NamedNodesCollection(items);
+ return V8DOMWrapper::convertToV8Object(V8ClassIndex::NODELIST, list);
+}
+
+v8::Handle<v8::Value> V8HTMLSelectElement::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
+{
+ ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
+ ASSERT(V8DOMWrapper::domWrapperType(info.Holder()) == V8ClassIndex::NODE);
+ RefPtr<Node> result = V8HTMLSelectElement::toNative(info.Holder())->item(index);
+ if (!result)
+ return notHandledByInterceptor();
+
+ return V8DOMWrapper::convertNodeToV8Object(result.release());
+}
+
+v8::Handle<v8::Value> V8HTMLSelectElement::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.HTMLSelectElement.IndexedPropertySetter");
+ HTMLSelectElement* select = V8HTMLSelectElement::toNative(info.Holder());
+ return toOptionsCollectionSetter(index, value, select);
+}
+
+v8::Handle<v8::Value> V8HTMLSelectElement::removeCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLSelectElement.remove");
- HTMLSelectElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLSelectElement>(args.Holder());
+ HTMLSelectElement* imp = V8HTMLSelectElement::toNative(args.Holder());
return removeElement(imp, args);
}
v8::Handle<v8::Value> removeElement(HTMLSelectElement* imp, const v8::Arguments& args)
{
if (V8HTMLOptionElement::HasInstance(args[0])) {
- HTMLOptionElement* element = V8DOMWrapper::convertDOMWrapperToNode<HTMLOptionElement>(v8::Handle<v8::Object>::Cast(args[0]));
+ HTMLOptionElement* element = V8HTMLOptionElement::toNative(v8::Handle<v8::Object>::Cast(args[0]));
imp->remove(element->index());
return v8::Undefined();
}
diff --git a/WebCore/bindings/v8/custom/V8HistoryCustom.cpp b/WebCore/bindings/v8/custom/V8HistoryCustom.cpp
index c884d15..b857d6e 100644
--- a/WebCore/bindings/v8/custom/V8HistoryCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HistoryCustom.cpp
@@ -29,18 +29,21 @@
*/
#include "config.h"
-#include "History.h"
+#include "V8History.h"
#include "ExceptionCode.h"
+#include "History.h"
#include "SerializedScriptValue.h"
#include "V8Binding.h"
+#include "V8BindingState.h"
#include "V8CustomBinding.h"
#include "V8Proxy.h"
namespace WebCore {
-CALLBACK_FUNC_DECL(HistoryPushState)
+
+v8::Handle<v8::Value> V8History::pushStateCallback(const v8::Arguments& args)
{
- RefPtr<SerializedScriptValue> historyState = SerializedScriptValue::create(toWebCoreString(args[0]));
+ RefPtr<SerializedScriptValue> historyState = SerializedScriptValue::create(args[0]);
v8::TryCatch tryCatch;
String title = toWebCoreStringWithNullOrUndefinedCheck(args[1]);
@@ -54,14 +57,14 @@ CALLBACK_FUNC_DECL(HistoryPushState)
}
ExceptionCode ec = 0;
- History* history = V8DOMWrapper::convertToNativeObject<History>(V8ClassIndex::HISTORY, args.Holder());
+ History* history = V8History::toNative(args.Holder());
history->stateObjectAdded(historyState.release(), title, url, History::StateObjectPush, ec);
return throwError(ec);
}
-CALLBACK_FUNC_DECL(HistoryReplaceState)
+v8::Handle<v8::Value> V8History::replaceStateCallback(const v8::Arguments& args)
{
- RefPtr<SerializedScriptValue> historyState = SerializedScriptValue::create(toWebCoreString(args[0]));
+ RefPtr<SerializedScriptValue> historyState = SerializedScriptValue::create(args[0]);
v8::TryCatch tryCatch;
String title = toWebCoreStringWithNullOrUndefinedCheck(args[1]);
@@ -75,9 +78,25 @@ CALLBACK_FUNC_DECL(HistoryReplaceState)
}
ExceptionCode ec = 0;
- History* history = V8DOMWrapper::convertToNativeObject<History>(V8ClassIndex::HISTORY, args.Holder());
+ History* history = V8History::toNative(args.Holder());
history->stateObjectAdded(historyState.release(), title, url, History::StateObjectReplace, ec);
return throwError(ec);
}
+bool V8History::indexedSecurityCheck(v8::Local<v8::Object> host, uint32_t index, v8::AccessType type, v8::Local<v8::Value> data)
+{
+ ASSERT(V8ClassIndex::FromInt(data->Int32Value()) == V8ClassIndex::HISTORY);
+ // Only allow same origin access.
+ History* history = V8History::toNative(host);
+ return V8BindingSecurity::canAccessFrame(V8BindingState::Only(), history->frame(), false);
+}
+
+bool V8History::namedSecurityCheck(v8::Local<v8::Object> host, v8::Local<v8::Value> key, v8::AccessType type, v8::Local<v8::Value> data)
+{
+ ASSERT(V8ClassIndex::FromInt(data->Int32Value()) == V8ClassIndex::HISTORY);
+ // Only allow same origin access.
+ History* history = V8History::toNative(host);
+ return V8BindingSecurity::canAccessFrame(V8BindingState::Only(), history->frame(), false);
+}
+
} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8FileListCustom.cpp b/WebCore/bindings/v8/custom/V8IDBRequestCustom.cpp
index bc533cf..5ee9542 100644
--- a/WebCore/bindings/v8/custom/V8FileListCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8IDBRequestCustom.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -29,26 +29,21 @@
*/
#include "config.h"
-#include "FileList.h"
+#include "V8IDBRequest.h"
-#include "File.h"
-#include "V8Binding.h"
-#include "V8CustomBinding.h"
+#include "SerializedScriptValue.h"
#include "V8Proxy.h"
-#include <wtf/RefPtr.h>
-
namespace WebCore {
-INDEXED_PROPERTY_GETTER(FileList)
+v8::Handle<v8::Value> V8IDBRequest::resultAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
- INC_STATS("DOM.FileList.IndexedPropertyGetter");
- FileList* fileList = V8DOMWrapper::convertToNativeObject<FileList>(V8ClassIndex::FILELIST, info.Holder());
- RefPtr<File> file = fileList->item(index);
- if (!file)
- return notHandledByInterceptor();
+ IDBRequest* request = V8IDBRequest::toNative(info.Holder());
+ SerializedScriptValue* result = request->result();
+ if (!result)
+ return v8::Null();
- return V8DOMWrapper::convertToV8Object(V8ClassIndex::FILE, file.release());
+ return result->deserialize();
}
} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8IndexedDatabaseRequestCustom.cpp b/WebCore/bindings/v8/custom/V8IndexedDatabaseRequestCustom.cpp
new file mode 100644
index 0000000..66220ea
--- /dev/null
+++ b/WebCore/bindings/v8/custom/V8IndexedDatabaseRequestCustom.cpp
@@ -0,0 +1,57 @@
+/*
+ * 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 "V8IndexedDatabaseRequest.h"
+
+#include "V8Binding.h"
+#include "V8Proxy.h"
+
+namespace WebCore {
+
+v8::Handle<v8::Value> V8IndexedDatabaseRequest::openCallback(const v8::Arguments& args)
+{
+ IndexedDatabaseRequest* imp = V8IndexedDatabaseRequest::toNative(args.Holder());
+ if (args.Length() < 2)
+ return throwError(V8Proxy::TypeError);
+ V8Parameter<> name = args[0];
+ V8Parameter<> description = args[1];
+ bool modifyDatabase = true;
+ if (args.Length() > 2)
+ modifyDatabase = args[2]->BooleanValue();
+
+ ExceptionCode ec = 0;
+ imp->open(name, description, modifyDatabase, ec);
+ if (ec)
+ return throwError(ec);
+ return v8::Handle<v8::Value>();
+}
+
+} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp b/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
index fac6733..0ddcf97 100644
--- a/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
@@ -29,45 +29,98 @@
*/
#include "config.h"
-#include "InjectedScriptHost.h"
+#include "V8InjectedScriptHost.h"
-#include "Database.h"
#include "DOMWindow.h"
+#include "Database.h"
#include "Frame.h"
+#include "InjectedScriptHost.h"
#include "InspectorController.h"
#include "Node.h"
#include "Page.h"
#include "V8Binding.h"
#include "V8CustomBinding.h"
+#include "V8Database.h"
+#include "V8Node.h"
#include "V8Proxy.h"
+#include "V8Storage.h"
namespace WebCore {
-CALLBACK_FUNC_DECL(InjectedScriptHostInspectedWindow)
+static void WeakReferenceCallback(v8::Persistent<v8::Value> object, void* parameter)
{
- INC_STATS("InjectedScriptHost.inspectedWindow()");
+ InjectedScriptHost* nativeObject = static_cast<InjectedScriptHost*>(parameter);
+ nativeObject->deref();
+ object.Dispose();
+}
- InjectedScriptHost* host = V8DOMWrapper::convertToNativeObject<InjectedScriptHost>(V8ClassIndex::INJECTEDSCRIPTHOST, args.Holder());
- InspectorController* ic = host->inspectorController();
- if (!ic)
- return v8::Undefined();
- return V8DOMWrapper::convertToV8Object<DOMWindow>(V8ClassIndex::DOMWINDOW, ic->inspectedPage()->mainFrame()->domWindow());
+static v8::Local<v8::Object> createInjectedScriptHostV8Wrapper(InjectedScriptHost* host)
+{
+ V8ClassIndex::V8WrapperType descriptorType = V8ClassIndex::INJECTEDSCRIPTHOST;
+ v8::Local<v8::Function> function = V8DOMWrapper::getTemplate(descriptorType)->GetFunction();
+ if (function.IsEmpty()) {
+ // Return if allocation failed.
+ return v8::Local<v8::Object>();
+ }
+ v8::Local<v8::Object> instance = SafeAllocation::newInstance(function);
+ if (instance.IsEmpty()) {
+ // Avoid setting the wrapper if allocation failed.
+ return v8::Local<v8::Object>();
+ }
+ V8DOMWrapper::setDOMWrapper(instance, V8ClassIndex::ToInt(descriptorType), host);
+ // Create a weak reference to the v8 wrapper of InspectorBackend to deref
+ // InspectorBackend when the wrapper is garbage collected.
+ host->ref();
+ v8::Persistent<v8::Object> weakHandle = v8::Persistent<v8::Object>::New(instance);
+ weakHandle.MakeWeak(host, &WeakReferenceCallback);
+ return instance;
}
-CALLBACK_FUNC_DECL(InjectedScriptHostWrapCallback)
+static ScriptObject createInjectedScript(const String& scriptSource, InjectedScriptHost* injectedScriptHost, ScriptState* inspectedScriptState, long id)
{
- INC_STATS("InjectedScriptHost.wrapCallback()");
- return args[0];
+ v8::HandleScope scope;
+
+ v8::Local<v8::Context> inspectedContext = inspectedScriptState->context();
+ v8::Context::Scope contextScope(inspectedContext);
+
+ // Call custom code to create InjectedScripHost wrapper specific for the context
+ // instead of calling V8DOMWrapper::convertToV8Object that would create the
+ // wrapper in the current context.
+ // FIXME: make it possible to use generic bindings factory for InjectedScriptHost.
+ v8::Local<v8::Object> scriptHostWrapper = createInjectedScriptHostV8Wrapper(injectedScriptHost);
+ if (scriptHostWrapper.IsEmpty())
+ return ScriptObject();
+
+ v8::Local<v8::Object> windowGlobal = inspectedContext->Global();
+
+ // Inject javascript into the context. The compiled script is supposed to evaluate into
+ // a single anonymous function(it's anonymous to avoid cluttering the global object with
+ // inspector's stuff) the function is called a few lines below with InjectedScriptHost wrapper,
+ // injected script id and explicit reference to the inspected global object. The function is expected
+ // to create and configure InjectedScript instance that is going to be used by the inspector.
+ v8::Local<v8::Script> script = v8::Script::Compile(v8String(scriptSource));
+ v8::Local<v8::Value> v = script->Run();
+ ASSERT(!v.IsEmpty());
+ ASSERT(v->IsFunction());
+
+ v8::Handle<v8::Value> args[] = {
+ scriptHostWrapper,
+ windowGlobal,
+ v8::Number::New(id)
+ };
+ v8::Local<v8::Value> injectedScriptValue = v8::Function::Cast(*v)->Call(windowGlobal, 3, args);
+ v8::Local<v8::Object> injectedScript(v8::Object::Cast(*injectedScriptValue));
+ return ScriptObject(inspectedScriptState, injectedScript);
}
-CALLBACK_FUNC_DECL(InjectedScriptHostNodeForId)
+v8::Handle<v8::Value> V8InjectedScriptHost::nodeForIdCallback(const v8::Arguments& args)
{
INC_STATS("InjectedScriptHost.nodeForId()");
if (args.Length() < 1)
return v8::Undefined();
- InjectedScriptHost* host = V8DOMWrapper::convertToNativeObject<InjectedScriptHost>(V8ClassIndex::INJECTEDSCRIPTHOST, args.Holder());
+ InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
Node* node = host->nodeForId(args[0]->ToInt32()->Value());
if (!node)
@@ -80,63 +133,44 @@ CALLBACK_FUNC_DECL(InjectedScriptHostNodeForId)
return V8DOMWrapper::convertToV8Object(V8ClassIndex::NODE, node);
}
-CALLBACK_FUNC_DECL(InjectedScriptHostWrapObject)
-{
- INC_STATS("InjectedScriptHost.wrapObject()");
- if (args.Length() < 2)
- return v8::Undefined();
-
- InjectedScriptHost* host = V8DOMWrapper::convertToNativeObject<InjectedScriptHost>(V8ClassIndex::INJECTEDSCRIPTHOST, args.Holder());
- return host->wrapObject(ScriptValue(args[0]), toWebCoreStringWithNullCheck(args[1])).v8Value();
-}
-
-CALLBACK_FUNC_DECL(InjectedScriptHostUnwrapObject)
-{
- INC_STATS("InjectedScriptHost.unwrapObject()");
- if (args.Length() < 1)
- return v8::Undefined();
-
- InjectedScriptHost* host = V8DOMWrapper::convertToNativeObject<InjectedScriptHost>(V8ClassIndex::INJECTEDSCRIPTHOST, args.Holder());
- return host->unwrapObject(toWebCoreStringWithNullCheck(args[0])).v8Value();
-}
-
-CALLBACK_FUNC_DECL(InjectedScriptHostPushNodePathToFrontend)
+v8::Handle<v8::Value> V8InjectedScriptHost::pushNodePathToFrontendCallback(const v8::Arguments& args)
{
INC_STATS("InjectedScriptHost.pushNodePathToFrontend()");
- if (args.Length() < 2)
+ if (args.Length() < 3)
return v8::Undefined();
- InjectedScriptHost* host = V8DOMWrapper::convertToNativeObject<InjectedScriptHost>(V8ClassIndex::INJECTEDSCRIPTHOST, args.Holder());
- Node* node = V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0]));
- bool selectInUI = args[1]->ToBoolean()->Value();
+ InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
+ Node* node = V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0]));
+ bool withChildren = args[1]->ToBoolean()->Value();
+ bool selectInUI = args[2]->ToBoolean()->Value();
if (node)
- return v8::Number::New(host->pushNodePathToFrontend(node, selectInUI));
+ return v8::Number::New(host->pushNodePathToFrontend(node, withChildren, selectInUI));
return v8::Undefined();
}
#if ENABLE(DATABASE)
-CALLBACK_FUNC_DECL(InjectedScriptHostDatabaseForId)
+v8::Handle<v8::Value> V8InjectedScriptHost::databaseForIdCallback(const v8::Arguments& args)
{
INC_STATS("InjectedScriptHost.databaseForId()");
if (args.Length() < 1)
return v8::Undefined();
- InjectedScriptHost* host = V8DOMWrapper::convertToNativeObject<InjectedScriptHost>(V8ClassIndex::INJECTEDSCRIPTHOST, args.Holder());
+ InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
Database* database = host->databaseForId(args[0]->ToInt32()->Value());
if (!database)
return v8::Undefined();
return V8DOMWrapper::convertToV8Object<Database>(V8ClassIndex::DATABASE, database);
}
-CALLBACK_FUNC_DECL(InjectedScriptHostSelectDatabase)
+v8::Handle<v8::Value> V8InjectedScriptHost::selectDatabaseCallback(const v8::Arguments& args)
{
INC_STATS("InjectedScriptHost.selectDatabase()");
if (args.Length() < 1)
return v8::Undefined();
- InjectedScriptHost* host = V8DOMWrapper::convertToNativeObject<InjectedScriptHost>(V8ClassIndex::INJECTEDSCRIPTHOST, args.Holder());
- Database* database = V8DOMWrapper::convertToNativeObject<Database>(V8ClassIndex::DATABASE, v8::Handle<v8::Object>::Cast(args[0]));
+ InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
+ Database* database = V8Database::toNative(v8::Handle<v8::Object>::Cast(args[0]));
if (database)
host->selectDatabase(database);
@@ -145,14 +179,14 @@ CALLBACK_FUNC_DECL(InjectedScriptHostSelectDatabase)
#endif
#if ENABLE(DOM_STORAGE)
-CALLBACK_FUNC_DECL(InjectedScriptHostSelectDOMStorage)
+v8::Handle<v8::Value> V8InjectedScriptHost::selectDOMStorageCallback(const v8::Arguments& args)
{
INC_STATS("InjectedScriptHost.selectDOMStorage()");
if (args.Length() < 1)
return v8::Undefined();
- InjectedScriptHost* host = V8DOMWrapper::convertToNativeObject<InjectedScriptHost>(V8ClassIndex::INJECTEDSCRIPTHOST, args.Holder());
- Storage* storage = V8DOMWrapper::convertToNativeObject<Storage>(V8ClassIndex::STORAGE, v8::Handle<v8::Object>::Cast(args[0]));
+ InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
+ Storage* storage = V8Storage::toNative(v8::Handle<v8::Object>::Cast(args[0]));
if (storage)
host->selectDOMStorage(storage);
@@ -160,4 +194,28 @@ CALLBACK_FUNC_DECL(InjectedScriptHostSelectDOMStorage)
}
#endif
+ScriptObject InjectedScriptHost::injectedScriptFor(ScriptState* inspectedScriptState)
+{
+ v8::HandleScope handleScope;
+ v8::Local<v8::Context> context = inspectedScriptState->context();
+ v8::Context::Scope contextScope(context);
+
+ v8::Local<v8::Object> global = context->Global();
+ // Skip proxy object. The proxy object will survive page navigation while we need
+ // an object whose lifetime consides with that of the inspected context.
+ global = v8::Local<v8::Object>::Cast(global->GetPrototype());
+
+ v8::Local<v8::String> key = v8::String::New("Devtools_InjectedScript");
+ v8::Local<v8::Value> val = global->GetHiddenValue(key);
+ if (!val.IsEmpty() && val->IsObject())
+ return ScriptObject(inspectedScriptState, v8::Local<v8::Object>::Cast(val));
+
+ ASSERT(!m_injectedScriptSource.isEmpty());
+ ScriptObject injectedScriptObject = createInjectedScript(m_injectedScriptSource, this, inspectedScriptState, m_nextInjectedScriptId);
+ m_idToInjectedScript.set(m_nextInjectedScriptId, injectedScriptObject);
+ ++m_nextInjectedScriptId;
+ global->SetHiddenValue(key, injectedScriptObject.v8Object());
+ return injectedScriptObject;
+}
+
} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp b/WebCore/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp
index 15b45e9..df63bf1 100644
--- a/WebCore/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp
@@ -29,15 +29,10 @@
*/
#include "config.h"
-#include "InspectorFrontendHost.h"
+#include "V8InspectorFrontendHost.h"
-#include "ExceptionCode.h"
#include "InspectorController.h"
-#include "Node.h"
-#include "Range.h"
-#include "Page.h"
-#include "TextIterator.h"
-#include "VisiblePosition.h"
+#include "InspectorFrontendHost.h"
#include "V8Binding.h"
#include "V8CustomBinding.h"
@@ -45,46 +40,7 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(InspectorFrontendHostSearch)
-{
- INC_STATS("InspectorFrontendHost.search()");
-
- if (args.Length() < 2)
- return v8::Undefined();
-
- Node* node = V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0]));
- if (!node)
- return v8::Undefined();
-
- String target = toWebCoreStringWithNullCheck(args[1]);
- if (target.isEmpty())
- return v8::Undefined();
-
- v8::Local<v8::Array> result = v8::Array::New();
- RefPtr<Range> searchRange(rangeOfContents(node));
-
- ExceptionCode ec = 0;
- int index = 0;
- do {
- RefPtr<Range> resultRange(findPlainText(searchRange.get(), target, true, false));
- if (resultRange->collapsed(ec))
- break;
-
- // A non-collapsed result range can in some funky whitespace cases still not
- // advance the range's start position (4509328). Break to avoid infinite loop.
- VisiblePosition newStart = endVisiblePosition(resultRange.get(), DOWNSTREAM);
- if (newStart == startVisiblePosition(searchRange.get(), DOWNSTREAM))
- break;
-
- result->Set(v8::Number::New(index++), V8DOMWrapper::convertToV8Object(V8ClassIndex::RANGE, resultRange.release()));
-
- setStart(searchRange.get(), newStart);
- } while (true);
-
- return result;
-}
-
-CALLBACK_FUNC_DECL(InspectorFrontendHostShowContextMenu)
+v8::Handle<v8::Value> V8InspectorFrontendHost::showContextMenuCallback(const v8::Arguments& args)
{
return v8::Undefined();
}
diff --git a/WebCore/bindings/v8/custom/V8LocationCustom.cpp b/WebCore/bindings/v8/custom/V8LocationCustom.cpp
index 1ed4c51..ce816b6 100644
--- a/WebCore/bindings/v8/custom/V8LocationCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8LocationCustom.cpp
@@ -29,23 +29,24 @@
*/
#include "config.h"
-#include "Location.h"
+#include "V8Location.h"
+#include "CSSHelper.h"
+#include "Document.h"
+#include "Frame.h"
+#include "FrameLoader.h"
+#include "KURL.h"
+#include "Location.h"
+#include "PlatformString.h"
+#include "ScriptController.h"
#include "V8Binding.h"
+#include "V8BindingState.h"
#include "V8CustomBinding.h"
#include "V8CustomEventListener.h"
#include "V8Location.h"
#include "V8Utilities.h"
#include "V8Proxy.h"
-#include "PlatformString.h"
-#include "KURL.h"
-#include "Document.h"
-#include "FrameLoader.h"
-#include "ScriptController.h"
-#include "CSSHelper.h"
-#include "Frame.h"
-
namespace WebCore {
// Notes about V8/JSC porting of this file.
@@ -58,11 +59,11 @@ namespace WebCore {
// we're just making all these custom for now. The functionality is simple
// and mirrors JSLocationCustom.cpp.
-ACCESSOR_SETTER(LocationHash)
+void V8Location::hashAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Location.hash._set");
v8::Handle<v8::Object> holder = info.Holder();
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+ Location* imp = V8Location::toNative(holder);
String hash = toWebCoreString(value);
Frame* frame = imp->frame();
@@ -81,11 +82,11 @@ ACCESSOR_SETTER(LocationHash)
navigateIfAllowed(frame, url, false, false);
}
-ACCESSOR_SETTER(LocationHost)
+void V8Location::hostAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Location.host._set");
v8::Handle<v8::Object> holder = info.Holder();
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+ Location* imp = V8Location::toNative(holder);
String host = toWebCoreString(value);
Frame* frame = imp->frame();
@@ -101,11 +102,11 @@ ACCESSOR_SETTER(LocationHost)
navigateIfAllowed(frame, url, false, false);
}
-ACCESSOR_SETTER(LocationHostname)
+void V8Location::hostnameAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Location.hostname._set");
v8::Handle<v8::Object> holder = info.Holder();
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+ Location* imp = V8Location::toNative(holder);
String hostname = toWebCoreString(value);
Frame* frame = imp->frame();
@@ -118,11 +119,11 @@ ACCESSOR_SETTER(LocationHostname)
navigateIfAllowed(frame, url, false, false);
}
-ACCESSOR_SETTER(LocationHref)
+void V8Location::hrefAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Location.href._set");
v8::Handle<v8::Object> holder = info.Holder();
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+ Location* imp = V8Location::toNative(holder);
Frame* frame = imp->frame();
if (!frame)
@@ -138,11 +139,11 @@ ACCESSOR_SETTER(LocationHref)
navigateIfAllowed(frame, url, false, false);
}
-ACCESSOR_SETTER(LocationPathname)
+void V8Location::pathnameAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Location.pathname._set");
v8::Handle<v8::Object> holder = info.Holder();
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+ Location* imp = V8Location::toNative(holder);
String pathname = toWebCoreString(value);
Frame* frame = imp->frame();
@@ -155,11 +156,11 @@ ACCESSOR_SETTER(LocationPathname)
navigateIfAllowed(frame, url, false, false);
}
-ACCESSOR_SETTER(LocationPort)
+void V8Location::portAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Location.port._set");
v8::Handle<v8::Object> holder = info.Holder();
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+ Location* imp = V8Location::toNative(holder);
String port = toWebCoreString(value);
Frame* frame = imp->frame();
@@ -172,11 +173,11 @@ ACCESSOR_SETTER(LocationPort)
navigateIfAllowed(frame, url, false, false);
}
-ACCESSOR_SETTER(LocationProtocol)
+void V8Location::protocolAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Location.protocol._set");
v8::Handle<v8::Object> holder = info.Holder();
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+ Location* imp = V8Location::toNative(holder);
String protocol = toWebCoreString(value);
Frame* frame = imp->frame();
@@ -189,11 +190,11 @@ ACCESSOR_SETTER(LocationProtocol)
navigateIfAllowed(frame, url, false, false);
}
-ACCESSOR_SETTER(LocationSearch)
+void V8Location::searchAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Location.search._set");
v8::Handle<v8::Object> holder = info.Holder();
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+ Location* imp = V8Location::toNative(holder);
String query = toWebCoreString(value);
Frame* frame = imp->frame();
@@ -206,68 +207,68 @@ ACCESSOR_SETTER(LocationSearch)
navigateIfAllowed(frame, url, false, false);
}
-ACCESSOR_GETTER(LocationReload)
+v8::Handle<v8::Value> V8Location::reloadAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Location.reload._get");
- static v8::Persistent<v8::FunctionTemplate> privateTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(v8LocationReloadCallback, v8::Handle<v8::Value>(), v8::Signature::New(V8Location::GetRawTemplate())));
+ static v8::Persistent<v8::FunctionTemplate> privateTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(V8Location::reloadCallback, v8::Handle<v8::Value>(), v8::Signature::New(V8Location::GetRawTemplate())));
v8::Handle<v8::Object> holder = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::LOCATION, info.This());
if (holder.IsEmpty()) {
// can only reach here by 'object.__proto__.func', and it should passed
// domain security check already
return privateTemplate->GetFunction();
}
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
- if (!V8Proxy::canAccessFrame(imp->frame(), false)) {
- static v8::Persistent<v8::FunctionTemplate> sharedTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(v8LocationReloadCallback, v8::Handle<v8::Value>(), v8::Signature::New(V8Location::GetRawTemplate())));
+ Location* imp = V8Location::toNative(holder);
+ if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), false)) {
+ static v8::Persistent<v8::FunctionTemplate> sharedTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(V8Location::reloadCallback, v8::Handle<v8::Value>(), v8::Signature::New(V8Location::GetRawTemplate())));
return sharedTemplate->GetFunction();
- } else
- return privateTemplate->GetFunction();
+ }
+ return privateTemplate->GetFunction();
}
-ACCESSOR_GETTER(LocationReplace)
+v8::Handle<v8::Value> V8Location::replaceAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Location.replace._get");
- static v8::Persistent<v8::FunctionTemplate> privateTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(v8LocationReplaceCallback, v8::Handle<v8::Value>(), v8::Signature::New(V8Location::GetRawTemplate())));
+ static v8::Persistent<v8::FunctionTemplate> privateTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(V8Location::replaceCallback, v8::Handle<v8::Value>(), v8::Signature::New(V8Location::GetRawTemplate())));
v8::Handle<v8::Object> holder = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::LOCATION, info.This());
if (holder.IsEmpty()) {
// can only reach here by 'object.__proto__.func', and it should passed
// domain security check already
return privateTemplate->GetFunction();
}
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
- if (!V8Proxy::canAccessFrame(imp->frame(), false)) {
- static v8::Persistent<v8::FunctionTemplate> sharedTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(v8LocationReplaceCallback, v8::Handle<v8::Value>(), v8::Signature::New(V8Location::GetRawTemplate())));
+ Location* imp = V8Location::toNative(holder);
+ if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), false)) {
+ static v8::Persistent<v8::FunctionTemplate> sharedTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(V8Location::replaceCallback, v8::Handle<v8::Value>(), v8::Signature::New(V8Location::GetRawTemplate())));
return sharedTemplate->GetFunction();
- } else
- return privateTemplate->GetFunction();
+ }
+ return privateTemplate->GetFunction();
}
-ACCESSOR_GETTER(LocationAssign)
+v8::Handle<v8::Value> V8Location::assignAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Location.assign._get");
static v8::Persistent<v8::FunctionTemplate> privateTemplate =
- v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(v8LocationAssignCallback, v8::Handle<v8::Value>(), v8::Signature::New(V8Location::GetRawTemplate())));
+ v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(V8Location::assignCallback, v8::Handle<v8::Value>(), v8::Signature::New(V8Location::GetRawTemplate())));
v8::Handle<v8::Object> holder = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::LOCATION, info.This());
if (holder.IsEmpty()) {
// can only reach here by 'object.__proto__.func', and it should passed
// domain security check already
return privateTemplate->GetFunction();
}
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
- if (!V8Proxy::canAccessFrame(imp->frame(), false)) {
- static v8::Persistent<v8::FunctionTemplate> sharedTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(v8LocationAssignCallback, v8::Handle<v8::Value>(), v8::Signature::New(V8Location::GetRawTemplate())));
+ Location* imp = V8Location::toNative(holder);
+ if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), false)) {
+ static v8::Persistent<v8::FunctionTemplate> sharedTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(V8Location::assignCallback, v8::Handle<v8::Value>(), v8::Signature::New(V8Location::GetRawTemplate())));
return sharedTemplate->GetFunction();
- } else
- return privateTemplate->GetFunction();
+ }
+ return privateTemplate->GetFunction();
}
-CALLBACK_FUNC_DECL(LocationReload)
+v8::Handle<v8::Value> V8Location::reloadCallback(const v8::Arguments& args)
{
// FIXME: we ignore the "forceget" parameter.
INC_STATS("DOM.Location.reload");
v8::Handle<v8::Object> holder = args.Holder();
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+ Location* imp = V8Location::toNative(holder);
Frame* frame = imp->frame();
if (!frame || !ScriptController::isSafeScript(frame))
@@ -278,11 +279,11 @@ CALLBACK_FUNC_DECL(LocationReload)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(LocationReplace)
+v8::Handle<v8::Value> V8Location::replaceCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Location.replace");
v8::Handle<v8::Object> holder = args.Holder();
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+ Location* imp = V8Location::toNative(holder);
Frame* frame = imp->frame();
if (!frame)
@@ -299,11 +300,11 @@ CALLBACK_FUNC_DECL(LocationReplace)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(LocationAssign)
+v8::Handle<v8::Value> V8Location::assignCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Location.assign");
v8::Handle<v8::Object> holder = args.Holder();
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
+ Location* imp = V8Location::toNative(holder);
Frame* frame = imp->frame();
if (!frame)
@@ -320,7 +321,7 @@ CALLBACK_FUNC_DECL(LocationAssign)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(LocationValueOf)
+v8::Handle<v8::Value> V8Location::valueOfCallback(const v8::Arguments& args)
{
// Just return the this object the way the normal valueOf function
// on the Object prototype would. The valueOf function is only
@@ -330,31 +331,31 @@ CALLBACK_FUNC_DECL(LocationValueOf)
return args.This();
}
-CALLBACK_FUNC_DECL(LocationToString)
+v8::Handle<v8::Value> V8Location::toStringCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Location.toString");
v8::Handle<v8::Object> holder = args.Holder();
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, holder);
- if (!V8Proxy::canAccessFrame(imp->frame(), true))
+ Location* imp = V8Location::toNative(holder);
+ if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
return v8::Undefined();
String result = imp->href();
return v8String(result);
}
-INDEXED_ACCESS_CHECK(Location)
+bool V8Location::indexedSecurityCheck(v8::Local<v8::Object> host, uint32_t index, v8::AccessType type, v8::Local<v8::Value> data)
{
ASSERT(V8ClassIndex::FromInt(data->Int32Value()) == V8ClassIndex::LOCATION);
// Only allow same origin access
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, host);
- return V8Proxy::canAccessFrame(imp->frame(), false);
+ Location* imp = V8Location::toNative(host);
+ return V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), false);
}
-NAMED_ACCESS_CHECK(Location)
+bool V8Location::namedSecurityCheck(v8::Local<v8::Object> host, v8::Local<v8::Value> key, v8::AccessType type, v8::Local<v8::Value> data)
{
ASSERT(V8ClassIndex::FromInt(data->Int32Value()) == V8ClassIndex::LOCATION);
// Only allow same origin access
- Location* imp = V8DOMWrapper::convertToNativeObject<Location>(V8ClassIndex::LOCATION, host);
- return V8Proxy::canAccessFrame(imp->frame(), false);
+ Location* imp = V8Location::toNative(host);
+ return V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), false);
}
} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp b/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp
index ca02b16..3ea8e26 100644
--- a/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp
+++ b/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp
@@ -29,13 +29,13 @@
*/
#include "config.h"
-#include "MessageChannel.h"
-
-#include "V8Binding.h"
-#include "V8Proxy.h"
+#include "V8MessageChannel.h"
#include "Document.h"
#include "Frame.h"
+#include "MessageChannel.h"
+#include "V8Binding.h"
+#include "V8Proxy.h"
#include "V8Utilities.h"
#include "WorkerContext.h"
#include "WorkerContextExecutionProxy.h"
@@ -44,7 +44,7 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(MessageChannelConstructor)
+v8::Handle<v8::Value> V8MessageChannel::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.MessageChannel.Constructor");
// FIXME: The logic here is almost exact duplicate of V8::constructDOMObject.
@@ -66,8 +66,8 @@ CALLBACK_FUNC_DECL(MessageChannelConstructor)
// Create references from the MessageChannel wrapper to the two
// MessagePort wrappers to make sure that the MessagePort wrappers
// stay alive as long as the MessageChannel wrapper is around.
- messageChannel->SetInternalField(kMessageChannelPort1Index, V8DOMWrapper::convertToV8Object(V8ClassIndex::MESSAGEPORT, obj->port1()));
- messageChannel->SetInternalField(kMessageChannelPort2Index, V8DOMWrapper::convertToV8Object(V8ClassIndex::MESSAGEPORT, obj->port2()));
+ messageChannel->SetInternalField(V8MessageChannel::port1Index, V8DOMWrapper::convertToV8Object(V8ClassIndex::MESSAGEPORT, obj->port1()));
+ messageChannel->SetInternalField(V8MessageChannel::port2Index, V8DOMWrapper::convertToV8Object(V8ClassIndex::MESSAGEPORT, obj->port2()));
// Setup the standard wrapper object internal fields.
V8DOMWrapper::setDOMWrapper(messageChannel, V8ClassIndex::MESSAGECHANNEL, obj.get());
diff --git a/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp b/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp
index c5af635..9e40855 100644
--- a/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp
@@ -29,6 +29,8 @@
*/
#include "config.h"
+#include "V8MessageEvent.h"
+
#include "MessageEvent.h"
#include "SerializedScriptValue.h"
@@ -40,10 +42,10 @@
namespace WebCore {
-ACCESSOR_GETTER(MessageEventPorts)
+v8::Handle<v8::Value> V8MessageEvent::portsAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.MessageEvent.ports");
- MessageEvent* event = V8DOMWrapper::convertToNativeObject<MessageEvent>(V8ClassIndex::MESSAGEEVENT, info.Holder());
+ MessageEvent* event = V8MessageEvent::toNative(info.Holder());
MessagePortArray* ports = event->ports();
if (!ports || ports->isEmpty())
@@ -56,17 +58,24 @@ ACCESSOR_GETTER(MessageEventPorts)
return portArray;
}
-CALLBACK_FUNC_DECL(MessageEventInitMessageEvent)
+v8::Handle<v8::Value> V8MessageEvent::initMessageEventCallback(const v8::Arguments& args)
{
INC_STATS("DOM.MessageEvent.initMessageEvent");
- MessageEvent* event = V8DOMWrapper::convertToNativeObject<MessageEvent>(V8ClassIndex::MESSAGEEVENT, args.Holder());
+ MessageEvent* event = V8MessageEvent::toNative(args.Holder());
String typeArg = v8ValueToWebCoreString(args[0]);
bool canBubbleArg = args[1]->BooleanValue();
bool cancelableArg = args[2]->BooleanValue();
- RefPtr<SerializedScriptValue> dataArg = SerializedScriptValue::create(v8ValueToWebCoreString(args[3]));
+ RefPtr<SerializedScriptValue> dataArg = SerializedScriptValue::create(args[3]);
String originArg = v8ValueToWebCoreString(args[4]);
String lastEventIdArg = v8ValueToWebCoreString(args[5]);
- DOMWindow* sourceArg = V8DOMWindow::HasInstance(args[6]) ? V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, v8::Handle<v8::Object>::Cast(args[6])) : 0;
+
+ DOMWindow* sourceArg = 0;
+ if (args[6]->IsObject()) {
+ v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(args[6]);
+ v8::Handle<v8::Object> window = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::DOMWINDOW, wrapper);
+ if (!window.IsEmpty())
+ sourceArg = V8DOMWindow::toNative(window);
+ }
OwnPtr<MessagePortArray> portArray;
if (!isUndefinedOrNull(args[7])) {
diff --git a/WebCore/bindings/v8/custom/V8MessagePortCustom.cpp b/WebCore/bindings/v8/custom/V8MessagePortCustom.cpp
index 0d8631f..cc70bc5 100644
--- a/WebCore/bindings/v8/custom/V8MessagePortCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8MessagePortCustom.cpp
@@ -43,42 +43,42 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(MessagePortAddEventListener)
+v8::Handle<v8::Value> V8MessagePort::addEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.MessagePort.addEventListener()");
- MessagePort* messagePort = V8DOMWrapper::convertToNativeObject<MessagePort>(V8ClassIndex::MESSAGEPORT, args.Holder());
+ MessagePort* messagePort = V8MessagePort::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(messagePort, args[1], false, ListenerFindOrCreate);
if (listener) {
String type = toWebCoreString(args[0]);
bool useCapture = args[2]->BooleanValue();
messagePort->addEventListener(type, listener, useCapture);
- createHiddenDependency(args.Holder(), args[1], V8Custom::kMessagePortRequestCacheIndex);
+ createHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(MessagePortRemoveEventListener)
+v8::Handle<v8::Value> V8MessagePort::removeEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.MessagePort.removeEventListener()");
- MessagePort* messagePort = V8DOMWrapper::convertToNativeObject<MessagePort>(V8ClassIndex::MESSAGEPORT, args.Holder());
+ MessagePort* messagePort = V8MessagePort::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(messagePort, args[1], false, ListenerFindOnly);
if (listener) {
String type = toWebCoreString(args[0]);
bool useCapture = args[2]->BooleanValue();
messagePort->removeEventListener(type, listener.get(), useCapture);
- removeHiddenDependency(args.Holder(), args[1], V8Custom::kMessagePortRequestCacheIndex);
+ removeHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(MessagePortPostMessage)
+v8::Handle<v8::Value> V8MessagePort::postMessageCallback(const v8::Arguments& args)
{
INC_STATS("DOM.MessagePort.postMessage");
- MessagePort* messagePort = V8DOMWrapper::convertToNativeObject<MessagePort>(V8ClassIndex::MESSAGEPORT, args.Holder());
- RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(toWebCoreString(args[0]));
+ MessagePort* messagePort = V8MessagePort::toNative(args.Holder());
+ RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(args[0]);
MessagePortArray portArray;
if (args.Length() > 1) {
if (!getMessagePortArray(args[1], portArray))
@@ -129,7 +129,7 @@ bool getMessagePortArray(v8::Local<v8::Value> value, MessagePortArray& portArray
throwError("MessagePortArray argument must contain only MessagePorts");
return false;
}
- portArray[i] = V8DOMWrapper::convertToNativeObject<MessagePort>(V8ClassIndex::MESSAGEPORT, v8::Handle<v8::Object>::Cast(port));
+ portArray[i] = V8MessagePort::toNative(v8::Handle<v8::Object>::Cast(port));
}
return true;
}
diff --git a/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp b/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp
index afa90b7..c7fff5a 100644
--- a/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp
@@ -29,8 +29,9 @@
*/
#include "config.h"
-#include "NamedNodeMap.h"
+#include "V8NamedNodeMap.h"
+#include "NamedNodeMap.h"
#include "V8Binding.h"
#include "V8CustomBinding.h"
#include "V8Proxy.h"
@@ -39,10 +40,10 @@
namespace WebCore {
-INDEXED_PROPERTY_GETTER(NamedNodeMap)
+v8::Handle<v8::Value> V8NamedNodeMap::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
{
INC_STATS("DOM.NamedNodeMap.IndexedPropertyGetter");
- NamedNodeMap* imp = V8DOMWrapper::convertToNativeObject<NamedNodeMap>(V8ClassIndex::NAMEDNODEMAP, info.Holder());
+ NamedNodeMap* imp = V8NamedNodeMap::toNative(info.Holder());
RefPtr<Node> result = imp->item(index);
if (!result)
return notHandledByInterceptor();
@@ -50,7 +51,7 @@ INDEXED_PROPERTY_GETTER(NamedNodeMap)
return V8DOMWrapper::convertNodeToV8Object(result.release());
}
-NAMED_PROPERTY_GETTER(NamedNodeMap)
+v8::Handle<v8::Value> V8NamedNodeMap::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.NamedNodeMap.NamedPropertyGetter");
// Search the prototype chain first.
@@ -63,7 +64,7 @@ NAMED_PROPERTY_GETTER(NamedNodeMap)
return notHandledByInterceptor();
// Finally, search the DOM.
- NamedNodeMap* imp = V8DOMWrapper::convertToNativeObject<NamedNodeMap>(V8ClassIndex::NAMEDNODEMAP, info.Holder());
+ NamedNodeMap* imp = V8NamedNodeMap::toNative(info.Holder());
RefPtr<Node> result = imp->getNamedItem(toWebCoreString(name));
if (!result)
return notHandledByInterceptor();
diff --git a/WebCore/bindings/v8/custom/V8NavigatorCustom.cpp b/WebCore/bindings/v8/custom/V8NavigatorCustom.cpp
index 6a7b209..266745d 100644
--- a/WebCore/bindings/v8/custom/V8NavigatorCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8NavigatorCustom.cpp
@@ -1,10 +1,10 @@
/*
- * Copyright (C) 2007-2009 Google Inc. All rights reserved.
- *
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* 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
@@ -14,7 +14,7 @@
* * 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
@@ -29,20 +29,17 @@
*/
#include "config.h"
-#include "Navigator.h"
+#include "V8Navigator.h"
-#include "V8Binding.h"
-#include "V8CustomBinding.h"
-#include "V8Proxy.h"
+#include "RuntimeEnabledFeatures.h"
namespace WebCore {
-ACCESSOR_GETTER(NavigatorAppVersion)
+#if ENABLE(GEOLOCATION)
+bool V8Navigator::GeolocationEnabled()
{
- INC_STATS("DOM.Navigator.appVersion");
- v8::Handle<v8::Object> holder = info.Holder();
- Navigator* navigator = V8DOMWrapper::convertToNativeObject<Navigator>(V8ClassIndex::NAVIGATOR, holder);
- return v8StringOrUndefined(navigator->appVersion());
+ return RuntimeEnabledFeatures::geolocationEnabled();
}
+#endif
} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8NodeCustom.cpp b/WebCore/bindings/v8/custom/V8NodeCustom.cpp
index 9b4b9aa..79afbe8 100644
--- a/WebCore/bindings/v8/custom/V8NodeCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8NodeCustom.cpp
@@ -45,25 +45,25 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(NodeAddEventListener)
+v8::Handle<v8::Value> V8Node::addEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Node.addEventListener()");
- Node* node = V8DOMWrapper::convertDOMWrapperToNode<Node>(args.Holder());
+ Node* node = V8Node::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(node, args[1], false, ListenerFindOrCreate);
if (listener) {
String type = toWebCoreString(args[0]);
bool useCapture = args[2]->BooleanValue();
node->addEventListener(type, listener, useCapture);
- createHiddenDependency(args.Holder(), args[1], V8Custom::kNodeEventListenerCacheIndex);
+ createHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(NodeRemoveEventListener)
+v8::Handle<v8::Value> V8Node::removeEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Node.removeEventListener()");
- Node* node = V8DOMWrapper::convertDOMWrapperToNode<Node>(args.Holder());
+ Node* node = V8Node::toNative(args.Holder());
// It is possbile that the owner document of the node is detached
// from the frame.
@@ -73,21 +73,21 @@ CALLBACK_FUNC_DECL(NodeRemoveEventListener)
AtomicString type = v8ValueToAtomicWebCoreString(args[0]);
bool useCapture = args[2]->BooleanValue();
node->removeEventListener(type, listener.get(), useCapture);
- removeHiddenDependency(args.Holder(), args[1], V8Custom::kNodeEventListenerCacheIndex);
+ removeHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
// This function is customized to take advantage of the optional 4th argument: shouldLazyAttach
-CALLBACK_FUNC_DECL(NodeInsertBefore)
+v8::Handle<v8::Value> V8Node::insertBeforeCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Node.insertBefore");
v8::Handle<v8::Object> holder = args.Holder();
- Node* imp = V8DOMWrapper::convertDOMWrapperToNode<Node>(holder);
+ Node* imp = V8Node::toNative(holder);
ExceptionCode ec = 0;
- Node* newChild = V8Node::HasInstance(args[0]) ? V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0])) : 0;
- Node* refChild = V8Node::HasInstance(args[1]) ? V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[1])) : 0;
+ Node* newChild = V8Node::HasInstance(args[0]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
+ Node* refChild = V8Node::HasInstance(args[1]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0;
bool success = imp->insertBefore(newChild, refChild, ec, true);
if (ec) {
V8Proxy::setDOMException(ec);
@@ -99,14 +99,14 @@ CALLBACK_FUNC_DECL(NodeInsertBefore)
}
// This function is customized to take advantage of the optional 4th argument: shouldLazyAttach
-CALLBACK_FUNC_DECL(NodeReplaceChild)
+v8::Handle<v8::Value> V8Node::replaceChildCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Node.replaceChild");
v8::Handle<v8::Object> holder = args.Holder();
- Node* imp = V8DOMWrapper::convertDOMWrapperToNode<Node>(holder);
+ Node* imp = V8Node::toNative(holder);
ExceptionCode ec = 0;
- Node* newChild = V8Node::HasInstance(args[0]) ? V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0])) : 0;
- Node* oldChild = V8Node::HasInstance(args[1]) ? V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[1])) : 0;
+ Node* newChild = V8Node::HasInstance(args[0]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
+ Node* oldChild = V8Node::HasInstance(args[1]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0;
bool success = imp->replaceChild(newChild, oldChild, ec, true);
if (ec) {
V8Proxy::setDOMException(ec);
@@ -117,13 +117,13 @@ CALLBACK_FUNC_DECL(NodeReplaceChild)
return v8::Null();
}
-CALLBACK_FUNC_DECL(NodeRemoveChild)
+v8::Handle<v8::Value> V8Node::removeChildCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Node.removeChild");
v8::Handle<v8::Object> holder = args.Holder();
- Node* imp = V8DOMWrapper::convertDOMWrapperToNode<Node>(holder);
+ Node* imp = V8Node::toNative(holder);
ExceptionCode ec = 0;
- Node* oldChild = V8Node::HasInstance(args[0]) ? V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0])) : 0;
+ Node* oldChild = V8Node::HasInstance(args[0]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
bool success = imp->removeChild(oldChild, ec);
if (ec) {
V8Proxy::setDOMException(ec);
@@ -135,13 +135,13 @@ CALLBACK_FUNC_DECL(NodeRemoveChild)
}
// This function is customized to take advantage of the optional 4th argument: shouldLazyAttach
-CALLBACK_FUNC_DECL(NodeAppendChild)
+v8::Handle<v8::Value> V8Node::appendChildCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Node.appendChild");
v8::Handle<v8::Object> holder = args.Holder();
- Node* imp = V8DOMWrapper::convertDOMWrapperToNode<Node>(holder);
+ Node* imp = V8Node::toNative(holder);
ExceptionCode ec = 0;
- Node* newChild = V8Node::HasInstance(args[0]) ? V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0])) : 0;
+ Node* newChild = V8Node::HasInstance(args[0]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
bool success = imp->appendChild(newChild, ec, true );
if (ec) {
V8Proxy::setDOMException(ec);
diff --git a/WebCore/bindings/v8/custom/V8NodeFilterCustom.cpp b/WebCore/bindings/v8/custom/V8NodeFilterCustom.cpp
index 8839420..032900c 100644
--- a/WebCore/bindings/v8/custom/V8NodeFilterCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8NodeFilterCustom.cpp
@@ -29,9 +29,10 @@
*/
#include "config.h"
-#include "NodeFilter.h"
+#include "V8NodeFilter.h"
#include "ExceptionCode.h"
+#include "NodeFilter.h"
#include "V8Binding.h"
#include "V8CustomBinding.h"
@@ -39,7 +40,7 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(NodeFilterAcceptNode)
+v8::Handle<v8::Value> V8NodeFilter::acceptNodeCallback(const v8::Arguments& args)
{
INC_STATS("DOM.NodeFilter.acceptNode()");
return throwError(NOT_SUPPORTED_ERR);
diff --git a/WebCore/bindings/v8/custom/V8NodeIteratorCustom.cpp b/WebCore/bindings/v8/custom/V8NodeIteratorCustom.cpp
index 47ae8ee..074eac3 100644
--- a/WebCore/bindings/v8/custom/V8NodeIteratorCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8NodeIteratorCustom.cpp
@@ -29,8 +29,9 @@
*/
#include "config.h"
-#include "NodeIterator.h"
+#include "V8NodeIterator.h"
+#include "NodeIterator.h"
#include "ScriptState.h"
#include "V8Binding.h"
@@ -56,24 +57,24 @@ static inline v8::Handle<v8::Value> toV8(PassRefPtr<Node> object, ExceptionCode
return V8DOMWrapper::convertNodeToV8Object(object);
}
-CALLBACK_FUNC_DECL(NodeIteratorNextNode)
+v8::Handle<v8::Value> V8NodeIterator::nextNodeCallback(const v8::Arguments& args)
{
INC_STATS("DOM.NodeIterator.nextNode()");
- NodeIterator* nodeIterator = V8DOMWrapper::convertToNativeObject<NodeIterator>(V8ClassIndex::NODEITERATOR, args.Holder());
+ NodeIterator* nodeIterator = V8NodeIterator::toNative(args.Holder());
ExceptionCode ec = 0;
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = nodeIterator->nextNode(&state, ec);
return toV8(result.release(), ec, &state);
}
-CALLBACK_FUNC_DECL(NodeIteratorPreviousNode)
+v8::Handle<v8::Value> V8NodeIterator::previousNodeCallback(const v8::Arguments& args)
{
INC_STATS("DOM.NodeIterator.previousNode()");
- NodeIterator* nodeIterator = V8DOMWrapper::convertToNativeObject<NodeIterator>(V8ClassIndex::NODEITERATOR, args.Holder());
+ NodeIterator* nodeIterator = V8NodeIterator::toNative(args.Holder());
ExceptionCode ec = 0;
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = nodeIterator->previousNode(&state, ec);
return toV8(result.release(), ec, &state);
}
diff --git a/WebCore/bindings/v8/custom/V8NodeListCustom.cpp b/WebCore/bindings/v8/custom/V8NodeListCustom.cpp
index ad10952..5721a7e 100644
--- a/WebCore/bindings/v8/custom/V8NodeListCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8NodeListCustom.cpp
@@ -29,6 +29,8 @@
*/
#include "config.h"
+#include "V8NodeList.h"
+
#include "NodeList.h"
#include "V8Binding.h"
@@ -40,10 +42,10 @@
namespace WebCore {
-NAMED_PROPERTY_GETTER(NodeList)
+v8::Handle<v8::Value> V8NodeList::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.NodeList.NamedPropertyGetter");
- NodeList* list = V8DOMWrapper::convertToNativeObject<NodeList>(V8ClassIndex::NODELIST, info.Holder());
+ NodeList* list = V8NodeList::toNative(info.Holder());
String key = toWebCoreString(name);
// Length property cannot be overridden.
@@ -58,4 +60,22 @@ NAMED_PROPERTY_GETTER(NodeList)
return V8DOMWrapper::convertNodeToV8Object(result.release());
}
+// Need to support call so that list(0) works.
+v8::Handle<v8::Value> V8NodeList::callAsFunctionCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.NodeList.callAsFunction()");
+ if (args.Length() < 1)
+ return v8::Undefined();
+
+ NodeList* list = V8NodeList::toNative(args.Holder());
+
+ // The first argument must be a number.
+ v8::Local<v8::Uint32> index = args[0]->ToArrayIndex();
+ if (index.IsEmpty())
+ return v8::Undefined();
+
+ RefPtr<Node> result = list->item(index->Uint32Value());
+ return V8DOMWrapper::convertNodeToV8Object(result.release());
+}
+
} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp b/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp
index a1f20cc..1cb4554 100644
--- a/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#if ENABLE(NOTIFICATIONS)
+#include "V8NotificationCenter.h"
#include "NotImplemented.h"
#include "Notification.h"
@@ -39,6 +40,7 @@
#include "V8CustomBinding.h"
#include "V8CustomEventListener.h"
#include "V8CustomVoidCallback.h"
+#include "V8Notification.h"
#include "V8Proxy.h"
#include "V8Utilities.h"
#include "WorkerContext.h"
@@ -46,42 +48,42 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(NotificationAddEventListener)
+v8::Handle<v8::Value> V8Notification::addEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Notification.addEventListener()");
- Notification* notification = V8DOMWrapper::convertToNativeObject<Notification>(V8ClassIndex::NOTIFICATION, args.Holder());
+ Notification* notification = V8Notification::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(notification, args[1], false, ListenerFindOrCreate);
if (listener) {
String type = toWebCoreString(args[0]);
bool useCapture = args[2]->BooleanValue();
notification->addEventListener(type, listener, useCapture);
- createHiddenDependency(args.Holder(), args[1], V8Custom::kNotificationRequestCacheIndex);
+ createHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(NotificationRemoveEventListener)
+v8::Handle<v8::Value> V8Notification::removeEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Notification.removeEventListener()");
- Notification* notification = V8DOMWrapper::convertToNativeObject<Notification>(V8ClassIndex::NOTIFICATION, args.Holder());
+ Notification* notification = V8Notification::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(notification, args[1], false, ListenerFindOnly);
if (listener) {
String type = toWebCoreString(args[0]);
bool useCapture = args[2]->BooleanValue();
notification->removeEventListener(type, listener.get(), useCapture);
- removeHiddenDependency(args.Holder(), args[1], V8Custom::kNotificationRequestCacheIndex);
+ removeHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(NotificationCenterCreateHTMLNotification)
+v8::Handle<v8::Value> V8NotificationCenter::createHTMLNotificationCallback(const v8::Arguments& args)
{
INC_STATS(L"DOM.NotificationCenter.CreateHTMLNotification()");
- NotificationCenter* notificationCenter = V8DOMWrapper::convertToNativeObject<NotificationCenter>(V8ClassIndex::NOTIFICATIONCENTER, args.Holder());
+ NotificationCenter* notificationCenter = V8NotificationCenter::toNative(args.Holder());
ExceptionCode ec = 0;
String url = toWebCoreString(args[0]);
@@ -96,10 +98,10 @@ CALLBACK_FUNC_DECL(NotificationCenterCreateHTMLNotification)
return V8DOMWrapper::convertToV8Object(V8ClassIndex::NOTIFICATION, notification.get());
}
-CALLBACK_FUNC_DECL(NotificationCenterCreateNotification)
+v8::Handle<v8::Value> V8NotificationCenter::createNotificationCallback(const v8::Arguments& args)
{
INC_STATS(L"DOM.NotificationCenter.CreateNotification()");
- NotificationCenter* notificationCenter = V8DOMWrapper::convertToNativeObject<NotificationCenter>(V8ClassIndex::NOTIFICATIONCENTER, args.Holder());
+ NotificationCenter* notificationCenter = V8NotificationCenter::toNative(args.Holder());
ExceptionCode ec = 0;
RefPtr<Notification> notification = notificationCenter->createNotification(toWebCoreString(args[0]), toWebCoreString(args[1]), toWebCoreString(args[2]), ec);
@@ -113,10 +115,10 @@ CALLBACK_FUNC_DECL(NotificationCenterCreateNotification)
return V8DOMWrapper::convertToV8Object(V8ClassIndex::NOTIFICATION, notification.get());
}
-CALLBACK_FUNC_DECL(NotificationCenterRequestPermission)
+v8::Handle<v8::Value> V8NotificationCenter::requestPermissionCallback(const v8::Arguments& args)
{
INC_STATS(L"DOM.NotificationCenter.RequestPermission()");
- NotificationCenter* notificationCenter = V8DOMWrapper::convertToNativeObject<NotificationCenter>(V8ClassIndex::NOTIFICATIONCENTER, args.Holder());
+ NotificationCenter* notificationCenter = V8NotificationCenter::toNative(args.Holder());
ScriptExecutionContext* context = notificationCenter->context();
// Requesting permission is only valid from a page context.
diff --git a/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp b/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp
new file mode 100644
index 0000000..46e9929
--- /dev/null
+++ b/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "V8PopStateEvent.h"
+
+#include "PopStateEvent.h"
+#include "SerializedScriptValue.h"
+#include "V8Proxy.h"
+
+namespace WebCore {
+
+v8::Handle<v8::Value> V8PopStateEvent::initPopStateEventCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.PopStateEvent.initPopStateEvent");
+
+ String typeArg = v8ValueToWebCoreString(args[0]);
+ bool canBubbleArg = args[1]->BooleanValue();
+ bool cancelableArg = args[2]->BooleanValue();
+ RefPtr<SerializedScriptValue> stateArg = SerializedScriptValue::create(args[3]);
+
+ PopStateEvent* event = V8PopStateEvent::toNative(args.Holder());
+ event->initPopStateEvent(typeArg, canBubbleArg, cancelableArg, stateArg.release());
+
+ return v8::Undefined();
+}
+
+v8::Handle<v8::Value> V8PopStateEvent::stateAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.PopStateEvent.state");
+
+ PopStateEvent* event = V8PopStateEvent::toNative(info.Holder());
+ SerializedScriptValue* state = event->state();
+ if (!state)
+ return v8::Null();
+
+ return state->deserialize();
+}
+
+} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp b/WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp
index 73aae12..ab58d1c 100644
--- a/WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#if ENABLE(DATABASE)
+#include "V8SQLResultSetRowList.h"
#include "SQLResultSetRowList.h"
#include "V8Binding.h"
@@ -39,7 +40,7 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(SQLResultSetRowListItem)
+v8::Handle<v8::Value> V8SQLResultSetRowList::itemCallback(const v8::Arguments& args)
{
INC_STATS("DOM.SQLResultSetRowList.item()");
@@ -53,7 +54,7 @@ CALLBACK_FUNC_DECL(SQLResultSetRowListItem)
return v8::Undefined();
}
- SQLResultSetRowList* rowList = V8DOMWrapper::convertToNativeObject<SQLResultSetRowList>(V8ClassIndex::SQLRESULTSETROWLIST, args.Holder());
+ SQLResultSetRowList* rowList = V8SQLResultSetRowList::toNative(args.Holder());
unsigned long index = args[0]->IntegerValue();
if (index < 0 || index >= rowList->length()) {
diff --git a/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp b/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp
index dc801bd..98fbd9a 100644
--- a/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp
@@ -32,6 +32,8 @@
#if ENABLE(DATABASE)
+#include "V8SQLTransaction.h"
+
#include "Database.h"
#include "SQLValue.h"
#include "V8Binding.h"
@@ -45,7 +47,7 @@ using namespace WTF;
namespace WebCore {
-CALLBACK_FUNC_DECL(SQLTransactionExecuteSql)
+v8::Handle<v8::Value> V8SQLTransaction::executeSqlCallback(const v8::Arguments& args)
{
INC_STATS("DOM.SQLTransaction.executeSql()");
@@ -94,7 +96,7 @@ CALLBACK_FUNC_DECL(SQLTransactionExecuteSql)
return throwError("sqlArgs should be array or object!", V8Proxy::TypeError);
}
- SQLTransaction* transaction = V8DOMWrapper::convertToNativeObject<SQLTransaction>(V8ClassIndex::SQLTRANSACTION, args.Holder());
+ SQLTransaction* transaction = V8SQLTransaction::toNative(args.Holder());
Frame* frame = V8Proxy::retrieveFrameForCurrentContext();
diff --git a/WebCore/bindings/v8/custom/V8SVGElementInstanceCustom.cpp b/WebCore/bindings/v8/custom/V8SVGElementInstanceCustom.cpp
index dff4ff4..23b5b06 100644
--- a/WebCore/bindings/v8/custom/V8SVGElementInstanceCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8SVGElementInstanceCustom.cpp
@@ -31,10 +31,10 @@
#include <config.h>
#if ENABLE(SVG)
-
-#include "SVGElementInstance.h"
+#include "V8SVGElementInstance.h"
#include "EventListener.h"
+#include "SVGElementInstance.h"
#include "V8Binding.h"
#include "V8CustomBinding.h"
@@ -44,33 +44,33 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(SVGElementInstanceAddEventListener)
+v8::Handle<v8::Value> V8SVGElementInstance::addEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.SVGElementInstance.AddEventListener()");
- SVGElementInstance* instance = V8DOMWrapper::convertDOMWrapperToNative<SVGElementInstance>(args.Holder());
+ SVGElementInstance* instance = V8SVGElementInstance::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(instance, args[1], false, ListenerFindOrCreate);
if (listener) {
String type = toWebCoreString(args[0]);
bool useCapture = args[2]->BooleanValue();
instance->addEventListener(type, listener, useCapture);
- createHiddenDependency(args.Holder(), args[1], V8Custom::kNodeEventListenerCacheIndex);
+ createHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(SVGElementInstanceRemoveEventListener)
+v8::Handle<v8::Value> V8SVGElementInstance::removeEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.SVGElementInstance.RemoveEventListener()");
- SVGElementInstance* instance = V8DOMWrapper::convertDOMWrapperToNative<SVGElementInstance>(args.Holder());
+ SVGElementInstance* instance = V8SVGElementInstance::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(instance, args[1], false, ListenerFindOnly);
if (listener) {
String type = toWebCoreString(args[0]);
bool useCapture = args[2]->BooleanValue();
instance->removeEventListener(type, listener.get(), useCapture);
- removeHiddenDependency(args.Holder(), args[1], V8Custom::kNodeEventListenerCacheIndex);
+ removeHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
diff --git a/WebCore/bindings/v8/custom/V8SVGLengthCustom.cpp b/WebCore/bindings/v8/custom/V8SVGLengthCustom.cpp
index 9f75f5a..129801d 100644
--- a/WebCore/bindings/v8/custom/V8SVGLengthCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8SVGLengthCustom.cpp
@@ -31,9 +31,9 @@
#include <config.h>
#if ENABLE(SVG)
+#include "V8SVGLength.h"
#include "SVGLength.h"
-
#include "V8Binding.h"
#include "V8CustomBinding.h"
#include "V8SVGPODTypeWrapper.h"
@@ -41,18 +41,18 @@
namespace WebCore {
-ACCESSOR_GETTER(SVGLengthValue)
+v8::Handle<v8::Value> V8SVGLength::valueAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.SVGLength.value");
- V8SVGPODTypeWrapper<SVGLength>* wrapper = V8DOMWrapper::convertToNativeObject<V8SVGPODTypeWrapper<SVGLength> >(V8ClassIndex::SVGLENGTH, info.Holder());
+ V8SVGPODTypeWrapper<SVGLength>* wrapper = V8SVGPODTypeWrapper<SVGLength>::toNative(info.Holder());
SVGLength imp = *wrapper;
return v8::Number::New(imp.value(V8Proxy::svgContext(wrapper)));
}
-CALLBACK_FUNC_DECL(SVGLengthConvertToSpecifiedUnits)
+v8::Handle<v8::Value> V8SVGLength::convertToSpecifiedUnitsCallback(const v8::Arguments& args)
{
INC_STATS("DOM.SVGLength.convertToSpecifiedUnits");
- V8SVGPODTypeWrapper<SVGLength>* wrapper = V8DOMWrapper::convertToNativeObject<V8SVGPODTypeWrapper<SVGLength> >(V8ClassIndex::SVGLENGTH, args.Holder());
+ V8SVGPODTypeWrapper<SVGLength>* wrapper = V8SVGPODTypeWrapper<SVGLength>::toNative(args.Holder());
SVGLength imp = *wrapper;
SVGElement* context = V8Proxy::svgContext(wrapper);
imp.convertToSpecifiedUnits(toInt32(args[0]), context);
diff --git a/WebCore/bindings/v8/custom/V8SVGMatrixCustom.cpp b/WebCore/bindings/v8/custom/V8SVGMatrixCustom.cpp
index 690eac1..78284cd 100644
--- a/WebCore/bindings/v8/custom/V8SVGMatrixCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8SVGMatrixCustom.cpp
@@ -44,7 +44,7 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(SVGMatrixMultiply)
+v8::Handle<v8::Value> V8SVGMatrix::multiplyCallback(const v8::Arguments& args)
{
INC_STATS("DOM.SVGMatrix.multiply()");
if (args.Length() < 1)
@@ -53,16 +53,16 @@ CALLBACK_FUNC_DECL(SVGMatrixMultiply)
if (!V8SVGMatrix::HasInstance(args[0]))
return throwError("secondMatrix argument was not a SVGMatrix");
- TransformationMatrix m1 = *V8DOMWrapper::convertToNativeObject<V8SVGPODTypeWrapper<TransformationMatrix> >(V8ClassIndex::SVGMATRIX, args.Holder());
- TransformationMatrix m2 = *V8DOMWrapper::convertToNativeObject<V8SVGPODTypeWrapper<TransformationMatrix> >(V8ClassIndex::SVGMATRIX, v8::Handle<v8::Object>::Cast(args[0]));
+ TransformationMatrix m1 = *V8SVGPODTypeWrapper<TransformationMatrix>::toNative(args.Holder());
+ TransformationMatrix m2 = *V8SVGPODTypeWrapper<TransformationMatrix>::toNative(v8::Handle<v8::Object>::Cast(args[0]));
return V8DOMWrapper::convertToV8Object(V8ClassIndex::SVGMATRIX, V8SVGStaticPODTypeWrapper<TransformationMatrix>::create(m1.multLeft(m2)));
}
-CALLBACK_FUNC_DECL(SVGMatrixInverse)
+v8::Handle<v8::Value> V8SVGMatrix::inverseCallback(const v8::Arguments& args)
{
INC_STATS("DOM.SVGMatrix.inverse()");
- TransformationMatrix matrix = *V8DOMWrapper::convertToNativeObject<V8SVGPODTypeWrapper<TransformationMatrix> >(V8ClassIndex::SVGMATRIX, args.Holder());
+ TransformationMatrix matrix = *V8SVGPODTypeWrapper<TransformationMatrix>::toNative(args.Holder());
ExceptionCode ec = 0;
TransformationMatrix result = matrix.inverse();
@@ -77,10 +77,10 @@ CALLBACK_FUNC_DECL(SVGMatrixInverse)
return V8DOMWrapper::convertToV8Object(V8ClassIndex::SVGMATRIX, V8SVGStaticPODTypeWrapper<TransformationMatrix>::create(result));
}
-CALLBACK_FUNC_DECL(SVGMatrixRotateFromVector)
+v8::Handle<v8::Value> V8SVGMatrix::rotateFromVectorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.SVGMatrix.rotateFromVector()");
- TransformationMatrix matrix = *V8DOMWrapper::convertToNativeObject<V8SVGPODTypeWrapper<TransformationMatrix> >(V8ClassIndex::SVGMATRIX, args.Holder());
+ TransformationMatrix matrix = *V8SVGPODTypeWrapper<TransformationMatrix>::toNative(args.Holder());
ExceptionCode ec = 0;
float x = toFloat(args[0]);
float y = toFloat(args[1]);
diff --git a/WebCore/bindings/v8/custom/V8SharedWorkerCustom.cpp b/WebCore/bindings/v8/custom/V8SharedWorkerCustom.cpp
index de53ac7..549de94 100644
--- a/WebCore/bindings/v8/custom/V8SharedWorkerCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8SharedWorkerCustom.cpp
@@ -32,7 +32,7 @@
#if ENABLE(SHARED_WORKERS)
-#include "SharedWorker.h"
+#include "V8SharedWorker.h"
#include "ExceptionCode.h"
#include "Frame.h"
@@ -45,7 +45,7 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(SharedWorkerConstructor)
+v8::Handle<v8::Value> V8SharedWorker::constructorCallback(const v8::Arguments& args)
{
INC_STATS(L"DOM.SharedWorker.Constructor");
diff --git a/WebCore/bindings/v8/custom/V8StorageCustom.cpp b/WebCore/bindings/v8/custom/V8StorageCustom.cpp
index f3f4687..ff3ac5e 100755
--- a/WebCore/bindings/v8/custom/V8StorageCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8StorageCustom.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#if ENABLE(DOM_STORAGE)
+#include "V8Storage.h"
#include "Storage.h"
#include "V8Binding.h"
@@ -40,9 +41,9 @@
namespace WebCore {
// Get an array containing the names of indexed properties in a collection.
-v8::Handle<v8::Array> V8Custom::v8StorageNamedPropertyEnumerator(const v8::AccessorInfo& info)
+v8::Handle<v8::Array> V8Storage::namedPropertyEnumerator(const v8::AccessorInfo& info)
{
- Storage* storage = V8DOMWrapper::convertToNativeObject<Storage>(V8ClassIndex::STORAGE, info.Holder());
+ Storage* storage = V8Storage::toNative(info.Holder());
unsigned int length = storage->length();
v8::Handle<v8::Array> properties = v8::Array::New(length);
for (unsigned int i = 0; i < length; ++i) {
@@ -57,7 +58,7 @@ v8::Handle<v8::Array> V8Custom::v8StorageNamedPropertyEnumerator(const v8::Acces
static v8::Handle<v8::Value> storageGetter(v8::Local<v8::String> v8Name, const v8::AccessorInfo& info)
{
- Storage* storage = V8DOMWrapper::convertToNativeObject<Storage>(V8ClassIndex::STORAGE, info.Holder());
+ Storage* storage = V8Storage::toNative(info.Holder());
String name = toWebCoreString(v8Name);
if (storage->contains(name) && name != "length")
@@ -66,14 +67,14 @@ static v8::Handle<v8::Value> storageGetter(v8::Local<v8::String> v8Name, const v
return notHandledByInterceptor();
}
-INDEXED_PROPERTY_GETTER(Storage)
+v8::Handle<v8::Value> V8Storage::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Storage.IndexedPropertyGetter");
v8::Local<v8::Integer> indexV8 = v8::Integer::New(index);
return storageGetter(indexV8->ToString(), info);
}
-NAMED_PROPERTY_GETTER(Storage)
+v8::Handle<v8::Value> V8Storage::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Storage.NamedPropertyGetter");
return storageGetter(name, info);
@@ -81,7 +82,7 @@ NAMED_PROPERTY_GETTER(Storage)
static v8::Handle<v8::Value> storageSetter(v8::Local<v8::String> v8Name, v8::Local<v8::Value> v8Value, const v8::AccessorInfo& info)
{
- Storage* storage = V8DOMWrapper::convertToNativeObject<Storage>(V8ClassIndex::STORAGE, info.Holder());
+ Storage* storage = V8Storage::toNative(info.Holder());
String name = toWebCoreString(v8Name);
String value = toWebCoreString(v8Value);
@@ -101,14 +102,14 @@ static v8::Handle<v8::Value> storageSetter(v8::Local<v8::String> v8Name, v8::Loc
return v8Value;
}
-INDEXED_PROPERTY_SETTER(Storage)
+v8::Handle<v8::Value> V8Storage::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Storage.NamedPropertyGetter");
v8::Local<v8::Integer> indexV8 = v8::Integer::New(index);
return storageSetter(indexV8->ToString(), value, info);
}
-NAMED_PROPERTY_SETTER(Storage)
+v8::Handle<v8::Value> V8Storage::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Storage.NamedPropertySetter");
return storageSetter(name, value, info);
@@ -116,7 +117,7 @@ NAMED_PROPERTY_SETTER(Storage)
static v8::Handle<v8::Boolean> storageDeleter(v8::Local<v8::String> v8Name, const v8::AccessorInfo& info)
{
- Storage* storage = V8DOMWrapper::convertToNativeObject<Storage>(V8ClassIndex::STORAGE, info.Holder());
+ Storage* storage = V8Storage::toNative(info.Holder());
String name = toWebCoreString(v8Name);
if (storage->contains(name)) {
@@ -127,14 +128,14 @@ static v8::Handle<v8::Boolean> storageDeleter(v8::Local<v8::String> v8Name, cons
return deletionNotHandledByInterceptor();
}
-INDEXED_PROPERTY_DELETER(Storage)
+v8::Handle<v8::Boolean> V8Storage::indexedPropertyDeleter(uint32_t index, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Storage.IndexedPropertyDeleter");
v8::Local<v8::Integer> indexV8 = v8::Integer::New(index);
return storageDeleter(indexV8->ToString(), info);
}
-NAMED_PROPERTY_DELETER(Storage)
+v8::Handle<v8::Boolean> V8Storage::namedPropertyDeleter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Storage.NamedPropertyDeleter");
return storageDeleter(name, info);
diff --git a/WebCore/bindings/v8/custom/V8StyleSheetListCustom.cpp b/WebCore/bindings/v8/custom/V8StyleSheetListCustom.cpp
index 32a48eb..a718451 100644
--- a/WebCore/bindings/v8/custom/V8StyleSheetListCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8StyleSheetListCustom.cpp
@@ -29,16 +29,17 @@
*/
#include "config.h"
+#include "V8StyleSheetList.h"
+
#include "HTMLStyleElement.h"
#include "StyleSheetList.h"
-
#include "V8Binding.h"
#include "V8CustomBinding.h"
#include "V8Proxy.h"
namespace WebCore {
-NAMED_PROPERTY_GETTER(StyleSheetList)
+v8::Handle<v8::Value> V8StyleSheetList::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.StyleSheetList.NamedPropertyGetter");
@@ -46,7 +47,7 @@ NAMED_PROPERTY_GETTER(StyleSheetList)
return notHandledByInterceptor();
// Search style sheet.
- StyleSheetList* imp = V8DOMWrapper::convertToNativeObject<StyleSheetList>(V8ClassIndex::STYLESHEETLIST, info.Holder());
+ StyleSheetList* imp = V8StyleSheetList::toNative(info.Holder());
HTMLStyleElement* item = imp->getNamedItem(toWebCoreString(name));
if (!item)
return notHandledByInterceptor();
diff --git a/WebCore/bindings/v8/custom/V8TreeWalkerCustom.cpp b/WebCore/bindings/v8/custom/V8TreeWalkerCustom.cpp
index 5052b7a..b848197 100644
--- a/WebCore/bindings/v8/custom/V8TreeWalkerCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8TreeWalkerCustom.cpp
@@ -29,10 +29,11 @@
*/
#include "config.h"
-#include "TreeWalker.h"
+#include "V8TreeWalker.h"
#include "Node.h"
#include "ScriptState.h"
+#include "TreeWalker.h"
#include "V8Binding.h"
#include "V8CustomBinding.h"
@@ -54,72 +55,72 @@ static inline v8::Handle<v8::Value> toV8(PassRefPtr<Node> object, ScriptState* s
return V8DOMWrapper::convertNodeToV8Object(object);
}
-CALLBACK_FUNC_DECL(TreeWalkerParentNode)
+v8::Handle<v8::Value> V8TreeWalker::parentNodeCallback(const v8::Arguments& args)
{
INC_STATS("DOM.TreeWalker.parentNode()");
- TreeWalker* treeWalker = V8DOMWrapper::convertToNativeObject<TreeWalker>(V8ClassIndex::TREEWALKER, args.Holder());
+ TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = treeWalker->parentNode(&state);
return toV8(result.release(), &state);
}
-CALLBACK_FUNC_DECL(TreeWalkerFirstChild)
+v8::Handle<v8::Value> V8TreeWalker::firstChildCallback(const v8::Arguments& args)
{
INC_STATS("DOM.TreeWalker.firstChild()");
- TreeWalker* treeWalker = V8DOMWrapper::convertToNativeObject<TreeWalker>(V8ClassIndex::TREEWALKER, args.Holder());
+ TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = treeWalker->firstChild(&state);
return toV8(result.release(), &state);
}
-CALLBACK_FUNC_DECL(TreeWalkerLastChild)
+v8::Handle<v8::Value> V8TreeWalker::lastChildCallback(const v8::Arguments& args)
{
INC_STATS("DOM.TreeWalker.lastChild()");
- TreeWalker* treeWalker = V8DOMWrapper::convertToNativeObject<TreeWalker>(V8ClassIndex::TREEWALKER, args.Holder());
+ TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = treeWalker->lastChild(&state);
return toV8(result.release(), &state);
}
-CALLBACK_FUNC_DECL(TreeWalkerNextNode)
+v8::Handle<v8::Value> V8TreeWalker::nextNodeCallback(const v8::Arguments& args)
{
INC_STATS("DOM.TreeWalker.nextNode()");
- TreeWalker* treeWalker = V8DOMWrapper::convertToNativeObject<TreeWalker>(V8ClassIndex::TREEWALKER, args.Holder());
+ TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = treeWalker->nextNode(&state);
return toV8(result.release(), &state);
}
-CALLBACK_FUNC_DECL(TreeWalkerPreviousNode)
+v8::Handle<v8::Value> V8TreeWalker::previousNodeCallback(const v8::Arguments& args)
{
INC_STATS("DOM.TreeWalker.previousNode()");
- TreeWalker* treeWalker = V8DOMWrapper::convertToNativeObject<TreeWalker>(V8ClassIndex::TREEWALKER, args.Holder());
+ TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = treeWalker->previousNode(&state);
return toV8(result.release(), &state);
}
-CALLBACK_FUNC_DECL(TreeWalkerNextSibling)
+v8::Handle<v8::Value> V8TreeWalker::nextSiblingCallback(const v8::Arguments& args)
{
INC_STATS("DOM.TreeWalker.nextSibling()");
- TreeWalker* treeWalker = V8DOMWrapper::convertToNativeObject<TreeWalker>(V8ClassIndex::TREEWALKER, args.Holder());
+ TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = treeWalker->nextSibling(&state);
return toV8(result.release(), &state);
}
-CALLBACK_FUNC_DECL(TreeWalkerPreviousSibling)
+v8::Handle<v8::Value> V8TreeWalker::previousSiblingCallback(const v8::Arguments& args)
{
INC_STATS("DOM.TreeWalker.previousSibling()");
- TreeWalker* treeWalker = V8DOMWrapper::convertToNativeObject<TreeWalker>(V8ClassIndex::TREEWALKER, args.Holder());
+ TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = treeWalker->previousSibling(&state);
return toV8(result.release(), &state);
}
diff --git a/WebCore/bindings/v8/custom/V8WebGLArrayBufferCustom.cpp b/WebCore/bindings/v8/custom/V8WebGLArrayBufferCustom.cpp
index 16a1f51..bc167c5 100644
--- a/WebCore/bindings/v8/custom/V8WebGLArrayBufferCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WebGLArrayBufferCustom.cpp
@@ -41,7 +41,7 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(WebGLArrayBufferConstructor)
+v8::Handle<v8::Value> V8WebGLArrayBuffer::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLArrayBuffer.Constructor");
diff --git a/WebCore/bindings/v8/custom/V8WebGLArrayCustom.h b/WebCore/bindings/v8/custom/V8WebGLArrayCustom.h
index 1a4b6a4..6a702f5 100644
--- a/WebCore/bindings/v8/custom/V8WebGLArrayCustom.h
+++ b/WebCore/bindings/v8/custom/V8WebGLArrayCustom.h
@@ -75,9 +75,7 @@ v8::Handle<v8::Value> constructWebGLArray(const v8::Arguments& args,
if (argLen > 3)
return throwError("Wrong number of arguments to new WebGL<T>Array(WebGLArrayBuffer, int, int)");
- WebGLArrayBuffer* buf =
- V8DOMWrapper::convertToNativeObject<WebGLArrayBuffer>(V8ClassIndex::WEBGLARRAYBUFFER,
- args[0]->ToObject());
+ WebGLArrayBuffer* buf = V8WebGLArrayBuffer::toNative(args[0]->ToObject());
if (buf == NULL)
return throwError("Could not convert argument 0 to a WebGLArrayBuffer");
bool ok;
@@ -155,7 +153,7 @@ v8::Handle<v8::Value> getWebGLArrayElement(const v8::Arguments& args,
V8Proxy::setDOMException(SYNTAX_ERR);
return notHandledByInterceptor();
}
- T* array = V8DOMWrapper::convertToNativeObject<T>(wrapperType, args.Holder());
+ T* array = reinterpret_cast<T*>(args.Holder()->GetPointerFromInternalField(v8DOMWrapperObjectIndex));
if (index >= array->length())
return v8::Undefined();
ElementType result;
@@ -174,9 +172,11 @@ v8::Handle<v8::Value> setWebGLArrayFromArray(T* webGLArray, const v8::Arguments&
if (args.Length() == 2)
offset = toInt32(args[1]);
uint32_t length = toInt32(array->Get(v8::String::New("length")));
- for (uint32_t i = 0; i < length; i++) {
- webGLArray->set(offset + i, array->Get(v8::Integer::New(i))->NumberValue());
- }
+ if (offset + length > webGLArray->length())
+ V8Proxy::setDOMException(INDEX_SIZE_ERR);
+ else
+ for (uint32_t i = 0; i < length; i++)
+ webGLArray->set(offset + i, array->Get(v8::Integer::New(i))->NumberValue());
}
return v8::Undefined();
@@ -191,10 +191,10 @@ v8::Handle<v8::Value> setWebGLArray(const v8::Arguments& args,
return notHandledByInterceptor();
}
- CPlusPlusArrayType* array = V8DOMWrapper::convertToNativeObject<CPlusPlusArrayType>(wrapperType, args.Holder());
+ CPlusPlusArrayType* array = JavaScriptWrapperArrayType::toNative(args.Holder());
if (args.Length() == 2 && args[0]->IsInt32()) {
- // void set(in unsigned long index, in long value);
+ // void set(in unsigned long index, in {long|float} value);
uint32_t index = toInt32(args[0]);
array->set(index, args[1]->NumberValue());
return v8::Undefined();
@@ -202,7 +202,7 @@ v8::Handle<v8::Value> setWebGLArray(const v8::Arguments& args,
if (JavaScriptWrapperArrayType::HasInstance(args[0])) {
// void set(in WebGL<T>Array array, [Optional] in unsigned long offset);
- CPlusPlusArrayType* src = V8DOMWrapper::convertToNativeObject<CPlusPlusArrayType>(wrapperType, args[0]->ToObject());
+ CPlusPlusArrayType* src = JavaScriptWrapperArrayType::toNative(args[0]->ToObject());
uint32_t offset = 0;
if (args.Length() == 2)
offset = toInt32(args[1]);
diff --git a/WebCore/bindings/v8/custom/V8WebGLByteArrayCustom.cpp b/WebCore/bindings/v8/custom/V8WebGLByteArrayCustom.cpp
index 5719c8a..6d52c83 100644
--- a/WebCore/bindings/v8/custom/V8WebGLByteArrayCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WebGLByteArrayCustom.cpp
@@ -44,48 +44,20 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(WebGLByteArrayConstructor)
+v8::Handle<v8::Value> V8WebGLByteArray::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLByteArray.Contructor");
return constructWebGLArray<WebGLByteArray>(args, V8ClassIndex::ToInt(V8ClassIndex::WEBGLBYTEARRAY));
}
-// Get the specified value from the byte buffer and return it wrapped as a JavaScript Number object to V8. Accesses outside the valid byte buffer range return "undefined".
-INDEXED_PROPERTY_GETTER(WebGLByteArray)
-{
- INC_STATS("DOM.WebGLByteArray.IndexedPropertyGetter");
- WebGLByteArray* byteBuffer = V8DOMWrapper::convertToNativeObject<WebGLByteArray>(V8ClassIndex::WEBGLBYTEARRAY, info.Holder());
-
- if ((index < 0) || (index >= byteBuffer->length()))
- return v8::Undefined();
- signed char result;
- if (!byteBuffer->get(index, result))
- return v8::Undefined();
- return v8::Number::New(result);
-}
-
-// Set the specified value in the byte buffer. Accesses outside the valid byte buffer range are silently ignored.
-INDEXED_PROPERTY_SETTER(WebGLByteArray)
-{
- INC_STATS("DOM.WebGLByteArray.IndexedPropertySetter");
- WebGLByteArray* array = V8DOMWrapper::convertToNativeObject<WebGLByteArray>(V8ClassIndex::WEBGLBYTEARRAY, info.Holder());
-
- if ((index >= 0) && (index < array->length())) {
- if (!value->IsNumber())
- return throwError("Could not convert value argument to a number");
- array->set(index, value->NumberValue());
- }
- return value;
-}
-
-CALLBACK_FUNC_DECL(WebGLByteArrayGet)
+v8::Handle<v8::Value> V8WebGLByteArray::getCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLByteArray.get()");
return getWebGLArrayElement<WebGLByteArray, signed char>(args, V8ClassIndex::WEBGLBYTEARRAY);
}
-CALLBACK_FUNC_DECL(WebGLByteArraySet)
+v8::Handle<v8::Value> V8WebGLByteArray::setCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLByteArray.set()");
return setWebGLArray<WebGLByteArray, V8WebGLByteArray>(args, V8ClassIndex::WEBGLBYTEARRAY);
diff --git a/WebCore/bindings/v8/custom/V8WebGLFloatArrayCustom.cpp b/WebCore/bindings/v8/custom/V8WebGLFloatArrayCustom.cpp
index 6e56760..4d4b0e2 100644
--- a/WebCore/bindings/v8/custom/V8WebGLFloatArrayCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WebGLFloatArrayCustom.cpp
@@ -44,45 +44,20 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(WebGLFloatArrayConstructor)
+v8::Handle<v8::Value> V8WebGLFloatArray::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLFloatArray.Contructor");
return constructWebGLArray<WebGLFloatArray>(args, V8ClassIndex::ToInt(V8ClassIndex::WEBGLFLOATARRAY));
}
-// Get the specified value from the array and return it wrapped as a JavaScript Number object to V8. Accesses outside the valid array range return "undefined".
-INDEXED_PROPERTY_GETTER(WebGLFloatArray)
-{
- INC_STATS("DOM.WebGLFloatArray.IndexedPropertyGetter");
- WebGLFloatArray* array = V8DOMWrapper::convertToNativeObject<WebGLFloatArray>(V8ClassIndex::WEBGLFLOATARRAY, info.Holder());
-
- if ((index < 0) || (index >= array->length()))
- return v8::Undefined();
- float result;
- if (!array->get(index, result))
- return v8::Undefined();
- return v8::Number::New(result);
-}
-
-// Set the specified value in the array. Accesses outside the valid array range are silently ignored.
-INDEXED_PROPERTY_SETTER(WebGLFloatArray)
-{
- INC_STATS("DOM.WebGLFloatArray.IndexedPropertySetter");
- WebGLFloatArray* array = V8DOMWrapper::convertToNativeObject<WebGLFloatArray>(V8ClassIndex::WEBGLFLOATARRAY, info.Holder());
-
- if ((index >= 0) && (index < array->length()))
- array->set(index, value->NumberValue());
- return value;
-}
-
-CALLBACK_FUNC_DECL(WebGLFloatArrayGet)
+v8::Handle<v8::Value> V8WebGLFloatArray::getCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLFloatArray.get()");
return getWebGLArrayElement<WebGLFloatArray, float>(args, V8ClassIndex::WEBGLFLOATARRAY);
}
-CALLBACK_FUNC_DECL(WebGLFloatArraySet)
+v8::Handle<v8::Value> V8WebGLFloatArray::setCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLFloatArray.set()");
return setWebGLArray<WebGLFloatArray, V8WebGLFloatArray>(args, V8ClassIndex::WEBGLFLOATARRAY);
diff --git a/WebCore/bindings/v8/custom/V8WebGLIntArrayCustom.cpp b/WebCore/bindings/v8/custom/V8WebGLIntArrayCustom.cpp
index 1bd30b2..7dde0a0 100644
--- a/WebCore/bindings/v8/custom/V8WebGLIntArrayCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WebGLIntArrayCustom.cpp
@@ -44,48 +44,20 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(WebGLIntArrayConstructor)
+v8::Handle<v8::Value> V8WebGLIntArray::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLIntArray.Contructor");
return constructWebGLArray<WebGLIntArray>(args, V8ClassIndex::ToInt(V8ClassIndex::WEBGLINTARRAY));
}
-// Get the specified value from the integer array and return it wrapped as a JavaScript Number object to V8. Accesses outside the valid pixel buffer range return "undefined".
-INDEXED_PROPERTY_GETTER(WebGLIntArray)
-{
- INC_STATS("DOM.WebGLIntArray.IndexedPropertyGetter");
- WebGLIntArray* array = V8DOMWrapper::convertToNativeObject<WebGLIntArray>(V8ClassIndex::WEBGLINTARRAY, info.Holder());
-
- if ((index < 0) || (index >= array->length()))
- return v8::Undefined();
- int result;
- if (!array->get(index, result))
- return v8::Undefined();
- return v8::Number::New(result);
-}
-
-// Set the specified value in the integer array. Accesses outside the valid integer array range are silently ignored.
-INDEXED_PROPERTY_SETTER(WebGLIntArray)
-{
- INC_STATS("DOM.WebGLIntArray.IndexedPropertySetter");
- WebGLIntArray* array = V8DOMWrapper::convertToNativeObject<WebGLIntArray>(V8ClassIndex::WEBGLINTARRAY, info.Holder());
-
- if ((index >= 0) && (index < array->length())) {
- if (!value->IsNumber())
- return throwError("Could not convert value argument to a number");
- array->set(index, value->NumberValue());
- }
- return value;
-}
-
-CALLBACK_FUNC_DECL(WebGLIntArrayGet)
+v8::Handle<v8::Value> V8WebGLIntArray::getCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLIntArray.get()");
return getWebGLArrayElement<WebGLIntArray, int>(args, V8ClassIndex::WEBGLINTARRAY);
}
-CALLBACK_FUNC_DECL(WebGLIntArraySet)
+v8::Handle<v8::Value> V8WebGLIntArray::setCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLIntArray.set()");
return setWebGLArray<WebGLIntArray, V8WebGLIntArray>(args, V8ClassIndex::WEBGLINTARRAY);
diff --git a/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp b/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
index fd73a5b..19b73d4 100644
--- a/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
@@ -32,7 +32,7 @@
#if ENABLE(3D_CANVAS)
-#include "WebGLRenderingContext.h"
+#include "V8WebGLRenderingContext.h"
#include "ExceptionCode.h"
@@ -54,7 +54,10 @@
#include "V8WebGLUnsignedShortArray.h"
#include "V8HTMLCanvasElement.h"
#include "V8HTMLImageElement.h"
+#include "V8HTMLVideoElement.h"
+#include "V8ImageData.h"
#include "V8Proxy.h"
+#include "WebGLRenderingContext.h"
namespace WebCore {
@@ -98,7 +101,7 @@ static int* jsArrayToIntArray(v8::Handle<v8::Array> array, uint32_t len)
return data;
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextBufferData)
+v8::Handle<v8::Value> V8WebGLRenderingContext::bufferDataCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.bufferData()");
@@ -112,8 +115,7 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextBufferData)
return notHandledByInterceptor();
}
- WebGLRenderingContext* context =
- V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+ WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
bool ok;
int target = toInt32(args[0], ok);
if (!ok) {
@@ -130,7 +132,7 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextBufferData)
ExceptionCode exceptionCode;
context->bufferData(target, size, usage, exceptionCode);
} else if (V8WebGLArray::HasInstance(args[1])) {
- WebGLArray* array = V8DOMWrapper::convertToNativeObject<WebGLArray>(V8ClassIndex::WEBGLARRAY, args[1]->ToObject());
+ WebGLArray* array = V8WebGLArray::toNative(args[1]->ToObject());
ExceptionCode exceptionCode;
context->bufferData(target, array, usage, exceptionCode);
} else {
@@ -140,7 +142,7 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextBufferData)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextBufferSubData)
+v8::Handle<v8::Value> V8WebGLRenderingContext::bufferSubDataCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.bufferSubData()");
@@ -151,8 +153,7 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextBufferSubData)
return notHandledByInterceptor();
}
- WebGLRenderingContext* context =
- V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+ WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
bool ok;
int target = toInt32(args[0], ok);
if (!ok) {
@@ -168,7 +169,7 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextBufferSubData)
V8Proxy::setDOMException(SYNTAX_ERR);
return notHandledByInterceptor();
}
- WebGLArray* array = V8DOMWrapper::convertToNativeObject<WebGLArray>(V8ClassIndex::WEBGLARRAY, args[2]->ToObject());
+ WebGLArray* array = V8WebGLArray::toNative(args[2]->ToObject());
ExceptionCode exceptionCode;
context->bufferSubData(target, offset, array, exceptionCode);
return v8::Undefined();
@@ -225,8 +226,7 @@ static v8::Handle<v8::Value> getObjectParameter(const v8::Arguments& args, Objec
}
ExceptionCode ec = 0;
- WebGLRenderingContext* context =
- V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+ WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
bool ok;
unsigned target = toInt32(args[0], ok);
if (!ok) {
@@ -269,8 +269,7 @@ static WebGLUniformLocation* toWebGLUniformLocation(v8::Handle<v8::Value> value,
ok = false;
WebGLUniformLocation* location = 0;
if (V8WebGLUniformLocation::HasInstance(value)) {
- location = V8DOMWrapper::convertToNativeObject<WebGLUniformLocation>(
- V8ClassIndex::WEBGLUNIFORMLOCATION, value->ToObject());
+ location = V8WebGLUniformLocation::toNative(value->ToObject());
ok = true;
}
return location;
@@ -280,13 +279,13 @@ enum WhichProgramCall {
kProgramParameter, kUniform
};
-CALLBACK_FUNC_DECL(WebGLRenderingContextGetBufferParameter)
+v8::Handle<v8::Value> V8WebGLRenderingContext::getBufferParameterCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.getBufferParameter()");
return getObjectParameter(args, kBuffer);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextGetFramebufferAttachmentParameter)
+v8::Handle<v8::Value> V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.getFramebufferAttachmentParameter()");
@@ -296,8 +295,7 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextGetFramebufferAttachmentParameter)
}
ExceptionCode ec = 0;
- WebGLRenderingContext* context =
- V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+ WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
bool ok;
unsigned target = toInt32(args[0], ok);
if (!ok) {
@@ -322,7 +320,7 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextGetFramebufferAttachmentParameter)
return toV8(info);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextGetParameter)
+v8::Handle<v8::Value> V8WebGLRenderingContext::getParameterCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.getParameter()");
@@ -332,8 +330,7 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextGetParameter)
}
ExceptionCode ec = 0;
- WebGLRenderingContext* context =
- V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+ WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
bool ok;
unsigned pname = toInt32(args[0], ok);
if (!ok) {
@@ -348,7 +345,7 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextGetParameter)
return toV8(info);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextGetProgramParameter)
+v8::Handle<v8::Value> V8WebGLRenderingContext::getProgramParameterCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.getProgramParameter()");
@@ -358,9 +355,8 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextGetProgramParameter)
}
ExceptionCode ec = 0;
- WebGLRenderingContext* context =
- V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
- WebGLProgram* program = V8WebGLProgram::HasInstance(args[0]) ? v8DOMWrapperTo<WebGLProgram>(V8ClassIndex::WEBGLPROGRAM, v8::Handle<v8::Object>::Cast(args[0])) : 0;
+ WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
+ WebGLProgram* program = V8WebGLProgram::HasInstance(args[0]) ? V8WebGLProgram::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
bool ok;
unsigned pname = toInt32(args[1], ok);
if (!ok) {
@@ -375,13 +371,13 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextGetProgramParameter)
return toV8(info);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextGetRenderbufferParameter)
+v8::Handle<v8::Value> V8WebGLRenderingContext::getRenderbufferParameterCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.getRenderbufferParameter()");
return getObjectParameter(args, kRenderbuffer);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextGetShaderParameter)
+v8::Handle<v8::Value> V8WebGLRenderingContext::getShaderParameterCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.getShaderParameter()");
@@ -391,9 +387,8 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextGetShaderParameter)
}
ExceptionCode ec = 0;
- WebGLRenderingContext* context =
- V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
- WebGLShader* shader = V8WebGLShader::HasInstance(args[0]) ? v8DOMWrapperTo<WebGLShader>(V8ClassIndex::WEBGLSHADER, v8::Handle<v8::Object>::Cast(args[0])) : 0;
+ WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
+ WebGLShader* shader = V8WebGLShader::HasInstance(args[0]) ? V8WebGLShader::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
bool ok;
unsigned pname = toInt32(args[1], ok);
if (!ok) {
@@ -408,13 +403,13 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextGetShaderParameter)
return toV8(info);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextGetTexParameter)
+v8::Handle<v8::Value> V8WebGLRenderingContext::getTexParameterCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.getTexParameter()");
return getObjectParameter(args, kTexture);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextGetUniform)
+v8::Handle<v8::Value> V8WebGLRenderingContext::getUniformCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.getUniform()");
@@ -424,9 +419,8 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextGetUniform)
}
ExceptionCode ec = 0;
- WebGLRenderingContext* context =
- V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
- WebGLProgram* program = V8WebGLProgram::HasInstance(args[0]) ? v8DOMWrapperTo<WebGLProgram>(V8ClassIndex::WEBGLPROGRAM, v8::Handle<v8::Object>::Cast(args[0])) : 0;
+ WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
+ WebGLProgram* program = V8WebGLProgram::HasInstance(args[0]) ? V8WebGLProgram::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
bool ok = false;
WebGLUniformLocation* location = toWebGLUniformLocation(args[1], ok);
@@ -443,13 +437,13 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextGetUniform)
return toV8(info);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextGetVertexAttrib)
+v8::Handle<v8::Value> V8WebGLRenderingContext::getVertexAttribCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.getVertexAttrib()");
return getObjectParameter(args, kVertexAttrib);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextTexImage2D)
+v8::Handle<v8::Value> V8WebGLRenderingContext::texImage2DCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.texImage2D()");
@@ -458,10 +452,14 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextTexImage2D)
// in GLint internalformat,
// in GLsizei width, in GLsizei height, in GLint border,
// in GLenum format, in GLenum type, in WebGLArray pixels);
+ // * void texImage2D(in GLenum target, in GLint level, in ImageData pixels,
+ // [Optional] in GLboolean flipY, [Optional] in GLboolean premulitplyAlpha);
// * void texImage2D(in GLenum target, in GLint level, in HTMLImageElement image,
// [Optional] in GLboolean flipY, [Optional] in GLboolean premultiplyAlpha);
// * void texImage2D(in GLenum target, in GLint level, in HTMLCanvasElement image,
// [Optional] in GLboolean flipY, [Optional] in GLboolean premultiplyAlpha);
+ // * void texImage2D(in GLenum target, in GLint level, in HTMLVideoElement image,
+ // [Optional] in GLboolean flipY, [Optional] in GLboolean premultiplyAlpha);
if (args.Length() != 3 &&
args.Length() != 4 &&
args.Length() != 5 &&
@@ -470,8 +468,7 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextTexImage2D)
return notHandledByInterceptor();
}
- WebGLRenderingContext* context =
- V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+ WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
bool ok;
int target = toInt32(args[0], ok);
if (!ok) {
@@ -488,21 +485,28 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextTexImage2D)
if (args.Length() == 3 ||
args.Length() == 4 ||
args.Length() == 5) {
- v8::Handle<v8::Value> arg = args[2];
bool flipY = false;
bool premultiplyAlpha = false;
if (args.Length() >= 4)
flipY = args[3]->BooleanValue();
if (args.Length() >= 5)
premultiplyAlpha = args[4]->BooleanValue();
+
+ v8::Handle<v8::Value> arg = args[2];
if (V8HTMLImageElement::HasInstance(arg)) {
- HTMLImageElement* element = V8DOMWrapper::convertDOMWrapperToNode<HTMLImageElement>(v8::Handle<v8::Object>::Cast(arg));
+ HTMLImageElement* element = V8HTMLImageElement::toNative(v8::Handle<v8::Object>::Cast(arg));
context->texImage2D(target, level, element, flipY, premultiplyAlpha, ec);
} else if (V8HTMLCanvasElement::HasInstance(arg)) {
- HTMLCanvasElement* element = V8DOMWrapper::convertDOMWrapperToNode<HTMLCanvasElement>(v8::Handle<v8::Object>::Cast(arg));
+ HTMLCanvasElement* element = V8HTMLCanvasElement::toNative(v8::Handle<v8::Object>::Cast(arg));
context->texImage2D(target, level, element, flipY, premultiplyAlpha, ec);
- } else {
- // FIXME: support HTMLVideoElement and ImageData.
+ } else if(V8ImageData::HasInstance(arg)) {
+ ImageData* imageElement = V8ImageData::toNative(v8::Handle<v8::Object>::Cast(arg));
+ context->texImage2D(target, level, imageElement, flipY, premultiplyAlpha, ec);
+ } else if (V8HTMLVideoElement::HasInstance(arg)) {
+ HTMLVideoElement* element = V8HTMLVideoElement::toNative(v8::Handle<v8::Object>::Cast(arg));
+ context->texImage2D(target, level, element, flipY, premultiplyAlpha, ec);
+ }
+ else {
// FIXME: consider different / better exception type.
V8Proxy::setDOMException(SYNTAX_ERR);
return notHandledByInterceptor();
@@ -540,10 +544,20 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextTexImage2D)
return notHandledByInterceptor();
}
v8::Handle<v8::Value> arg = args[8];
- if (V8WebGLArray::HasInstance(arg)) {
- WebGLArray* array = V8DOMWrapper::convertToNativeObject<WebGLArray>(V8ClassIndex::WEBGLARRAY, arg->ToObject());
- // FIXME: must do validation similar to JOGL's to ensure that
- // the incoming array is of the appropriate length and type
+ if (!arg->IsObject())
+ // Assume that the user is passing null for texture
+ context->texImage2D(target,
+ level,
+ internalformat,
+ width,
+ height,
+ border,
+ format,
+ type,
+ 0,
+ ec);
+ else if (V8WebGLArray::HasInstance(arg)) {
+ WebGLArray* array = V8WebGLArray::toNative(arg->ToObject());
context->texImage2D(target,
level,
internalformat,
@@ -571,13 +585,145 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextTexImage2D)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextTexSubImage2D)
+v8::Handle<v8::Value> V8WebGLRenderingContext::texSubImage2DCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.texSubImage2D()");
- // FIXME: implement
- notImplemented();
+ // Currently supported forms:
+ // * void texSubImage2D(in GLenum target, in GLint level, in GLint xoffset, in GLint yoffset,
+ // in GLsizei width, in GLsizei height,
+ // in GLenum format, in GLenum type, in WebGLArray pixels);
+ // * void texSubImage2D(in GLenum target, in GLint level, in GLint xoffset, in GLint yoffset,
+ // in ImageData pixels, [Optional] GLboolean flipY, [Optional] in premultiplyAlpha);
+ // * void texSubImage2D(in GLenum target, in GLint level, in GLint xoffset, in GLint yoffset,
+ // in HTMLImageElement image, [Optional] GLboolean flipY, [Optional] in premultiplyAlpha);
+ // * void texSubImage2D(in GLenum target, in GLint level, in GLint xoffset, in GLint yoffset,
+ // in HTMLCanvasElement canvas, [Optional] GLboolean flipY, [Optional] in premultiplyAlpha);
+ // * void texSubImage2D(in GLenum target, in GLint level, in GLint xoffset, in GLint yoffset,
+ // in HTMLVideoElement video, [Optional] GLboolean flipY, [Optional] in premultiplyAlpha);
+
+ if (args.Length() != 5 &&
+ args.Length() != 6 &&
+ args.Length() != 7 &&
+ args.Length() != 9) {
+ V8Proxy::setDOMException(SYNTAX_ERR);
+ return notHandledByInterceptor();
+ }
+ WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
+ bool ok;
+ int target = toInt32(args[0], ok);
+ if (!ok) {
+ V8Proxy::setDOMException(SYNTAX_ERR);
+ return notHandledByInterceptor();
+ }
+ int level = toInt32(args[1], ok);
+ if (!ok) {
+ V8Proxy::setDOMException(SYNTAX_ERR);
+ return notHandledByInterceptor();
+ }
+ int xoff = toInt32(args[2], ok);
+ if (!ok) {
+ V8Proxy::setDOMException(SYNTAX_ERR);
+ return notHandledByInterceptor();
+ }
+ int yoff = toInt32(args[3], ok);
+ if (!ok) {
+ V8Proxy::setDOMException(SYNTAX_ERR);
+ return notHandledByInterceptor();
+ }
+
+ ExceptionCode ec = 0;
+ if (args.Length() == 5 ||
+ args.Length() == 6 ||
+ args.Length() == 7) {
+ bool flipY = false;
+ bool premultiplyAlpha = false;
+ if (args.Length() >= 6)
+ flipY = args[5]->BooleanValue();
+ if (args.Length() >= 7)
+ premultiplyAlpha = args[6]->BooleanValue();
+
+ v8::Handle<v8::Value> arg = args[4];
+ if (V8HTMLImageElement::HasInstance(arg)) {
+ HTMLImageElement* element = V8HTMLImageElement::toNative(v8::Handle<v8::Object>::Cast(arg));
+ context->texSubImage2D(target, level, xoff, yoff, element, flipY, premultiplyAlpha, ec);
+ } else if (V8HTMLCanvasElement::HasInstance(arg)) {
+ HTMLCanvasElement* element = V8HTMLCanvasElement::toNative(v8::Handle<v8::Object>::Cast(arg));
+ context->texSubImage2D(target, level, xoff, yoff, element, flipY, premultiplyAlpha, ec);
+ } else if(V8ImageData::HasInstance(arg)) {
+ ImageData* imageElement = V8ImageData::toNative(v8::Handle<v8::Object>::Cast(arg));
+ context->texSubImage2D(target, level, xoff, yoff, imageElement, flipY, premultiplyAlpha, ec);
+ } else if (V8HTMLVideoElement::HasInstance(arg)) {
+ HTMLVideoElement* element = V8HTMLVideoElement::toNative(v8::Handle<v8::Object>::Cast(arg));
+ context->texSubImage2D(target, level, xoff, yoff, element, flipY, premultiplyAlpha, ec);
+ }
+ else {
+ // FIXME: consider different / better exception type.
+ V8Proxy::setDOMException(SYNTAX_ERR);
+ return notHandledByInterceptor();
+ }
+ // Fall through
+ } else if (args.Length() == 9) {
+ int width = toInt32(args[4], ok);
+ if (!ok) {
+ V8Proxy::setDOMException(SYNTAX_ERR);
+ return notHandledByInterceptor();
+ }
+ int height = toInt32(args[5], ok);
+ if (!ok) {
+ V8Proxy::setDOMException(SYNTAX_ERR);
+ return notHandledByInterceptor();
+ }
+ int format = toInt32(args[6], ok);
+ if (!ok) {
+ V8Proxy::setDOMException(SYNTAX_ERR);
+ return notHandledByInterceptor();
+ }
+ int type = toInt32(args[7], ok);
+ if (!ok) {
+ V8Proxy::setDOMException(SYNTAX_ERR);
+ return notHandledByInterceptor();
+ }
+ v8::Handle<v8::Value> arg = args[8];
+ if (!arg->IsObject())
+ // Assume that the user is passing null for texture
+ context->texSubImage2D(target,
+ level,
+ xoff,
+ yoff,
+ width,
+ height,
+ format,
+ type,
+ 0,
+ ec);
+ else if (V8WebGLArray::HasInstance(arg)) {
+ WebGLArray* array = V8WebGLArray::toNative(arg->ToObject());
+ context->texSubImage2D(target,
+ level,
+ xoff,
+ yoff,
+ width,
+ height,
+ format,
+ type,
+ array,
+ ec);
+ // Fall through
+ } else {
+ V8Proxy::setDOMException(SYNTAX_ERR);
+ return notHandledByInterceptor();
+ }
+ } else {
+ ASSERT_NOT_REACHED();
+ V8Proxy::setDOMException(SYNTAX_ERR);
+ return notHandledByInterceptor();
+ }
+ if (ec) {
+ V8Proxy::setDOMException(ec);
+ return v8::Handle<v8::Value>();
+ }
return v8::Undefined();
}
@@ -634,16 +780,14 @@ static v8::Handle<v8::Value> vertexAttribAndUniformHelperf(const v8::Arguments&
else
location = toWebGLUniformLocation(args[0], ok);
- WebGLRenderingContext* context =
- V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+ WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
if (!ok) {
V8Proxy::setDOMException(SYNTAX_ERR);
return notHandledByInterceptor();
}
if (V8WebGLFloatArray::HasInstance(args[1])) {
- WebGLFloatArray* array =
- V8DOMWrapper::convertToNativeObject<WebGLFloatArray>(V8ClassIndex::WEBGLFLOATARRAY, args[1]->ToObject());
+ WebGLFloatArray* array = V8WebGLFloatArray::toNative(args[1]->ToObject());
ASSERT(array != NULL);
ExceptionCode ec = 0;
switch (functionToCall) {
@@ -710,8 +854,7 @@ static v8::Handle<v8::Value> uniformHelperi(const v8::Arguments& args,
return notHandledByInterceptor();
}
- WebGLRenderingContext* context =
- V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+ WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
bool ok = false;
WebGLUniformLocation* location = toWebGLUniformLocation(args[0], ok);
@@ -720,8 +863,7 @@ static v8::Handle<v8::Value> uniformHelperi(const v8::Arguments& args,
return notHandledByInterceptor();
}
if (V8WebGLIntArray::HasInstance(args[1])) {
- WebGLIntArray* array =
- V8DOMWrapper::convertToNativeObject<WebGLIntArray>(V8ClassIndex::WEBGLINTARRAY, args[1]->ToObject());
+ WebGLIntArray* array = V8WebGLIntArray::toNative(args[1]->ToObject());
ASSERT(array != NULL);
ExceptionCode ec = 0;
switch (functionToCall) {
@@ -763,49 +905,49 @@ static v8::Handle<v8::Value> uniformHelperi(const v8::Arguments& args,
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextUniform1fv)
+v8::Handle<v8::Value> V8WebGLRenderingContext::uniform1fvCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.uniform1fv()");
return vertexAttribAndUniformHelperf(args, kUniform1v);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextUniform1iv)
+v8::Handle<v8::Value> V8WebGLRenderingContext::uniform1ivCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.uniform1iv()");
return uniformHelperi(args, kUniform1v);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextUniform2fv)
+v8::Handle<v8::Value> V8WebGLRenderingContext::uniform2fvCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.uniform2fv()");
return vertexAttribAndUniformHelperf(args, kUniform2v);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextUniform2iv)
+v8::Handle<v8::Value> V8WebGLRenderingContext::uniform2ivCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.uniform2iv()");
return uniformHelperi(args, kUniform2v);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextUniform3fv)
+v8::Handle<v8::Value> V8WebGLRenderingContext::uniform3fvCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.uniform3fv()");
return vertexAttribAndUniformHelperf(args, kUniform3v);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextUniform3iv)
+v8::Handle<v8::Value> V8WebGLRenderingContext::uniform3ivCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.uniform3iv()");
return uniformHelperi(args, kUniform3v);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextUniform4fv)
+v8::Handle<v8::Value> V8WebGLRenderingContext::uniform4fvCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.uniform4fv()");
return vertexAttribAndUniformHelperf(args, kUniform4v);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextUniform4iv)
+v8::Handle<v8::Value> V8WebGLRenderingContext::uniform4ivCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.uniform4iv()");
return uniformHelperi(args, kUniform4v);
@@ -828,8 +970,7 @@ static v8::Handle<v8::Value> uniformMatrixHelper(const v8::Arguments& args,
return notHandledByInterceptor();
}
- WebGLRenderingContext* context =
- V8DOMWrapper::convertDOMWrapperToNative<WebGLRenderingContext>(args.Holder());
+ WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
bool ok = false;
WebGLUniformLocation* location = toWebGLUniformLocation(args[0], ok);
@@ -840,8 +981,7 @@ static v8::Handle<v8::Value> uniformMatrixHelper(const v8::Arguments& args,
}
bool transpose = args[1]->BooleanValue();
if (V8WebGLFloatArray::HasInstance(args[2])) {
- WebGLFloatArray* array =
- V8DOMWrapper::convertToNativeObject<WebGLFloatArray>(V8ClassIndex::WEBGLFLOATARRAY, args[2]->ToObject());
+ WebGLFloatArray* array = V8WebGLFloatArray::toNative(args[2]->ToObject());
ASSERT(array != NULL);
ExceptionCode ec = 0;
switch (matrixSize) {
@@ -881,43 +1021,43 @@ static v8::Handle<v8::Value> uniformMatrixHelper(const v8::Arguments& args,
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextUniformMatrix2fv)
+v8::Handle<v8::Value> V8WebGLRenderingContext::uniformMatrix2fvCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.uniformMatrix2fv()");
return uniformMatrixHelper(args, 2);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextUniformMatrix3fv)
+v8::Handle<v8::Value> V8WebGLRenderingContext::uniformMatrix3fvCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.uniformMatrix3fv()");
return uniformMatrixHelper(args, 3);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextUniformMatrix4fv)
+v8::Handle<v8::Value> V8WebGLRenderingContext::uniformMatrix4fvCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.uniformMatrix4fv()");
return uniformMatrixHelper(args, 4);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextVertexAttrib1fv)
+v8::Handle<v8::Value> V8WebGLRenderingContext::vertexAttrib1fvCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.vertexAttrib1fv()");
return vertexAttribAndUniformHelperf(args, kVertexAttrib1v);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextVertexAttrib2fv)
+v8::Handle<v8::Value> V8WebGLRenderingContext::vertexAttrib2fvCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.vertexAttrib2fv()");
return vertexAttribAndUniformHelperf(args, kVertexAttrib2v);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextVertexAttrib3fv)
+v8::Handle<v8::Value> V8WebGLRenderingContext::vertexAttrib3fvCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.vertexAttrib3fv()");
return vertexAttribAndUniformHelperf(args, kVertexAttrib3v);
}
-CALLBACK_FUNC_DECL(WebGLRenderingContextVertexAttrib4fv)
+v8::Handle<v8::Value> V8WebGLRenderingContext::vertexAttrib4fvCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLRenderingContext.vertexAttrib4fv()");
return vertexAttribAndUniformHelperf(args, kVertexAttrib4v);
diff --git a/WebCore/bindings/v8/custom/V8WebGLShortArrayCustom.cpp b/WebCore/bindings/v8/custom/V8WebGLShortArrayCustom.cpp
index f8a26c3..9d3b478 100644
--- a/WebCore/bindings/v8/custom/V8WebGLShortArrayCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WebGLShortArrayCustom.cpp
@@ -44,48 +44,20 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(WebGLShortArrayConstructor)
+v8::Handle<v8::Value> V8WebGLShortArray::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLShortArray.Contructor");
return constructWebGLArray<WebGLShortArray>(args, V8ClassIndex::ToInt(V8ClassIndex::WEBGLSHORTARRAY));
}
-// Get the specified value from the array and return it wrapped as a JavaScript Number object to V8. Accesses outside the valid array range return "undefined".
-INDEXED_PROPERTY_GETTER(WebGLShortArray)
-{
- INC_STATS("DOM.WebGLShortArray.IndexedPropertyGetter");
- WebGLShortArray* array = V8DOMWrapper::convertToNativeObject<WebGLShortArray>(V8ClassIndex::WEBGLSHORTARRAY, info.Holder());
-
- if ((index < 0) || (index >= array->length()))
- return v8::Undefined();
- short result;
- if (!array->get(index, result))
- return v8::Undefined();
- return v8::Number::New(result);
-}
-
-// Set the specified value in the array. Accesses outside the valid array range are silently ignored.
-INDEXED_PROPERTY_SETTER(WebGLShortArray)
-{
- INC_STATS("DOM.WebGLShortArray.IndexedPropertySetter");
- WebGLShortArray* array = V8DOMWrapper::convertToNativeObject<WebGLShortArray>(V8ClassIndex::WEBGLSHORTARRAY, info.Holder());
-
- if ((index >= 0) && (index < array->length())) {
- if (!value->IsNumber())
- return throwError("Could not convert value argument to a number");
- array->set(index, value->NumberValue());
- }
- return value;
-}
-
-CALLBACK_FUNC_DECL(WebGLShortArrayGet)
+v8::Handle<v8::Value> V8WebGLShortArray::getCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLShortArray.get()");
return getWebGLArrayElement<WebGLShortArray, short>(args, V8ClassIndex::WEBGLSHORTARRAY);
}
-CALLBACK_FUNC_DECL(WebGLShortArraySet)
+v8::Handle<v8::Value> V8WebGLShortArray::setCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLShortArray.set()");
return setWebGLArray<WebGLShortArray, V8WebGLShortArray>(args, V8ClassIndex::WEBGLSHORTARRAY);
diff --git a/WebCore/bindings/v8/custom/V8WebGLUnsignedByteArrayCustom.cpp b/WebCore/bindings/v8/custom/V8WebGLUnsignedByteArrayCustom.cpp
index 391f213..3cc658a 100644
--- a/WebCore/bindings/v8/custom/V8WebGLUnsignedByteArrayCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WebGLUnsignedByteArrayCustom.cpp
@@ -44,48 +44,20 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(WebGLUnsignedByteArrayConstructor)
+v8::Handle<v8::Value> V8WebGLUnsignedByteArray::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLUnsignedByteArray.Contructor");
return constructWebGLArray<WebGLUnsignedByteArray>(args, V8ClassIndex::ToInt(V8ClassIndex::WEBGLUNSIGNEDBYTEARRAY));
}
-// Get the specified value from the array and return it wrapped as a JavaScript Number object to V8. Accesses outside the valid array range return "undefined".
-INDEXED_PROPERTY_GETTER(WebGLUnsignedByteArray)
-{
- INC_STATS("DOM.WebGLUnsignedByteArray.IndexedPropertyGetter");
- WebGLUnsignedByteArray* array = V8DOMWrapper::convertToNativeObject<WebGLUnsignedByteArray>(V8ClassIndex::WEBGLUNSIGNEDBYTEARRAY, info.Holder());
-
- if ((index < 0) || (index >= array->length()))
- return v8::Undefined();
- unsigned char result;
- if (!array->get(index, result))
- return v8::Undefined();
- return v8::Number::New(result);
-}
-
-// Set the specified value in the array. Accesses outside the valid array range are silently ignored.
-INDEXED_PROPERTY_SETTER(WebGLUnsignedByteArray)
-{
- INC_STATS("DOM.WebGLUnsignedByteArray.IndexedPropertySetter");
- WebGLUnsignedByteArray* array = V8DOMWrapper::convertToNativeObject<WebGLUnsignedByteArray>(V8ClassIndex::WEBGLUNSIGNEDBYTEARRAY, info.Holder());
-
- if ((index >= 0) && (index < array->length())) {
- if (!value->IsNumber())
- return throwError("Could not convert value argument to a number");
- array->set(index, value->NumberValue());
- }
- return value;
-}
-
-CALLBACK_FUNC_DECL(WebGLUnsignedByteArrayGet)
+v8::Handle<v8::Value> V8WebGLUnsignedByteArray::getCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLUnsignedByteArray.get()");
return getWebGLArrayElement<WebGLUnsignedByteArray, unsigned char>(args, V8ClassIndex::WEBGLUNSIGNEDBYTEARRAY);
}
-CALLBACK_FUNC_DECL(WebGLUnsignedByteArraySet)
+v8::Handle<v8::Value> V8WebGLUnsignedByteArray::setCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLUnsignedByteArray.set()");
return setWebGLArray<WebGLUnsignedByteArray, V8WebGLUnsignedByteArray>(args, V8ClassIndex::WEBGLUNSIGNEDBYTEARRAY);
diff --git a/WebCore/bindings/v8/custom/V8WebGLUnsignedIntArrayCustom.cpp b/WebCore/bindings/v8/custom/V8WebGLUnsignedIntArrayCustom.cpp
index 92b9fe0..93ccbd4 100644
--- a/WebCore/bindings/v8/custom/V8WebGLUnsignedIntArrayCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WebGLUnsignedIntArrayCustom.cpp
@@ -44,48 +44,20 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(WebGLUnsignedIntArrayConstructor)
+v8::Handle<v8::Value> V8WebGLUnsignedIntArray::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLUnsignedIntArray.Contructor");
return constructWebGLArray<WebGLUnsignedIntArray>(args, V8ClassIndex::ToInt(V8ClassIndex::WEBGLUNSIGNEDINTARRAY));
}
-// Get the specified value from the integer array and return it wrapped as a JavaScript Number object to V8. Accesses outside the valid pixel buffer range return "undefined".
-INDEXED_PROPERTY_GETTER(WebGLUnsignedIntArray)
-{
- INC_STATS("DOM.WebGLUnsignedIntArray.IndexedPropertyGetter");
- WebGLUnsignedIntArray* array = V8DOMWrapper::convertToNativeObject<WebGLUnsignedIntArray>(V8ClassIndex::WEBGLUNSIGNEDINTARRAY, info.Holder());
-
- if ((index < 0) || (index >= array->length()))
- return v8::Undefined();
- unsigned int result;
- if (!array->get(index, result))
- return v8::Undefined();
- return v8::Number::New(result);
-}
-
-// Set the specified value in the integer array. Accesses outside the valid integer array range are silently ignored.
-INDEXED_PROPERTY_SETTER(WebGLUnsignedIntArray)
-{
- INC_STATS("DOM.WebGLUnsignedIntArray.IndexedPropertySetter");
- WebGLUnsignedIntArray* array = V8DOMWrapper::convertToNativeObject<WebGLUnsignedIntArray>(V8ClassIndex::WEBGLUNSIGNEDINTARRAY, info.Holder());
-
- if ((index >= 0) && (index < array->length())) {
- if (!value->IsNumber())
- return throwError("Could not convert value argument to a number");
- array->set(index, value->NumberValue());
- }
- return value;
-}
-
-CALLBACK_FUNC_DECL(WebGLUnsignedIntArrayGet)
+v8::Handle<v8::Value> V8WebGLUnsignedIntArray::getCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLUnsignedIntArray.get()");
return getWebGLArrayElement<WebGLUnsignedIntArray, unsigned int>(args, V8ClassIndex::WEBGLUNSIGNEDINTARRAY);
}
-CALLBACK_FUNC_DECL(WebGLUnsignedIntArraySet)
+v8::Handle<v8::Value> V8WebGLUnsignedIntArray::setCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLUnsignedIntArray.set()");
return setWebGLArray<WebGLUnsignedIntArray, V8WebGLUnsignedIntArray>(args, V8ClassIndex::WEBGLUNSIGNEDINTARRAY);
diff --git a/WebCore/bindings/v8/custom/V8WebGLUnsignedShortArrayCustom.cpp b/WebCore/bindings/v8/custom/V8WebGLUnsignedShortArrayCustom.cpp
index ce261e9..d9e47cd 100644
--- a/WebCore/bindings/v8/custom/V8WebGLUnsignedShortArrayCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WebGLUnsignedShortArrayCustom.cpp
@@ -44,48 +44,20 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(WebGLUnsignedShortArrayConstructor)
+v8::Handle<v8::Value> V8WebGLUnsignedShortArray::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLUnsignedShortArray.Contructor");
return constructWebGLArray<WebGLUnsignedShortArray>(args, V8ClassIndex::ToInt(V8ClassIndex::WEBGLUNSIGNEDSHORTARRAY));
}
-// Get the specified value from the array and return it wrapped as a JavaScript Number object to V8. Accesses outside the valid array range return "undefined".
-INDEXED_PROPERTY_GETTER(WebGLUnsignedShortArray)
-{
- INC_STATS("DOM.WebGLUnsignedShortArray.IndexedPropertyGetter");
- WebGLUnsignedShortArray* array = V8DOMWrapper::convertToNativeObject<WebGLUnsignedShortArray>(V8ClassIndex::WEBGLUNSIGNEDSHORTARRAY, info.Holder());
-
- if ((index < 0) || (index >= array->length()))
- return v8::Undefined();
- unsigned short result;
- if (!array->get(index, result))
- return v8::Undefined();
- return v8::Number::New(result);
-}
-
-// Set the specified value in the array. Accesses outside the valid array range are silently ignored.
-INDEXED_PROPERTY_SETTER(WebGLUnsignedShortArray)
-{
- INC_STATS("DOM.WebGLUnsignedShortArray.IndexedPropertySetter");
- WebGLUnsignedShortArray* array = V8DOMWrapper::convertToNativeObject<WebGLUnsignedShortArray>(V8ClassIndex::WEBGLUNSIGNEDSHORTARRAY, info.Holder());
-
- if ((index >= 0) && (index < array->length())) {
- if (!value->IsNumber())
- return throwError("Could not convert value argument to a number");
- array->set(index, value->NumberValue());
- }
- return value;
-}
-
-CALLBACK_FUNC_DECL(WebGLUnsignedShortArrayGet)
+v8::Handle<v8::Value> V8WebGLUnsignedShortArray::getCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLUnsignedShortArray.get()");
return getWebGLArrayElement<WebGLUnsignedShortArray, unsigned short>(args, V8ClassIndex::WEBGLUNSIGNEDSHORTARRAY);
}
-CALLBACK_FUNC_DECL(WebGLUnsignedShortArraySet)
+v8::Handle<v8::Value> V8WebGLUnsignedShortArray::setCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLUnsignedShortArray.set()");
return setWebGLArray<WebGLUnsignedShortArray, V8WebGLUnsignedShortArray>(args, V8ClassIndex::WEBGLUNSIGNEDSHORTARRAY);
diff --git a/WebCore/bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp b/WebCore/bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp
index 4819064..55518d2 100644
--- a/WebCore/bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp
+++ b/WebCore/bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp
@@ -29,7 +29,7 @@
*/
#include "config.h"
-#include "WebKitCSSMatrix.h"
+#include "V8WebKitCSSMatrix.h"
#include "Document.h"
#include "DocumentFragment.h"
@@ -44,7 +44,7 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(WebKitCSSMatrixConstructor)
+v8::Handle<v8::Value> V8WebKitCSSMatrix::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebKitCSSMatrix.Constructor");
diff --git a/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp b/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp
index b2a807d..4e0d575 100755
--- a/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp
+++ b/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp
@@ -29,19 +29,19 @@
*/
#include "config.h"
+#include "V8WebKitPoint.h"
#include "V8Binding.h"
#include "V8CustomBinding.h"
#include "V8DOMWrapper.h"
#include "V8Index.h"
#include "V8Proxy.h"
-#include "WebKitPoint.h"
#include <wtf/MathExtras.h>
namespace WebCore {
-CALLBACK_FUNC_DECL(WebKitPointConstructor)
+v8::Handle<v8::Value> V8WebKitPoint::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebKitPoint.Constructor");
float x = 0;
diff --git a/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp b/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp
index b20635b..2451b90 100644
--- a/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp
@@ -32,22 +32,23 @@
#if ENABLE(WEB_SOCKETS)
-#include "WebSocket.h"
+#include "V8WebSocket.h"
#include "Frame.h"
#include "Settings.h"
#include "V8Binding.h"
#include "V8Proxy.h"
#include "V8Utilities.h"
+#include "WebSocket.h"
#include "WorkerContext.h"
#include "WorkerContextExecutionProxy.h"
namespace WebCore {
-CALLBACK_FUNC_DECL(WebSocketAddEventListener)
+v8::Handle<v8::Value> V8WebSocket::addEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebSocket.addEventListener()");
- WebSocket* webSocket = V8DOMWrapper::convertToNativeObject<WebSocket>(V8ClassIndex::WEBSOCKET, args.Holder());
+ WebSocket* webSocket = V8WebSocket::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(webSocket, args[1], false, ListenerFindOrCreate);
if (listener) {
@@ -55,27 +56,27 @@ CALLBACK_FUNC_DECL(WebSocketAddEventListener)
bool useCapture = args[2]->BooleanValue();
webSocket->addEventListener(type, listener, useCapture);
- createHiddenDependency(args.Holder(), args[1], V8Custom::kWebSocketCacheIndex);
+ createHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(WebSocketRemoveEventListener)
+v8::Handle<v8::Value> V8WebSocket::removeEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebSocket.removeEventListener()");
- WebSocket* webSocket = V8DOMWrapper::convertToNativeObject<WebSocket>(V8ClassIndex::WEBSOCKET, args.Holder());
+ WebSocket* webSocket = V8WebSocket::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(webSocket, args[1], false, ListenerFindOnly);
if (listener) {
String type = toWebCoreString(args[0]);
bool useCapture = args[2]->BooleanValue();
webSocket->removeEventListener(type, listener.get(), useCapture);
- removeHiddenDependency(args.Holder(), args[1], V8Custom::kWebSocketCacheIndex);
+ removeHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(WebSocketConstructor)
+v8::Handle<v8::Value> V8WebSocket::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebSocket.Constructor");
@@ -92,14 +93,9 @@ CALLBACK_FUNC_DECL(WebSocketConstructor)
return throwError("Empty URL", V8Proxy::SyntaxError);
// Get the script execution context.
- ScriptExecutionContext* context = 0;
- // TODO: Workers
- if (!context) {
- Frame* frame = V8Proxy::retrieveFrameForCurrentContext();
- if (!frame)
- return throwError("WebSocket constructor's associated frame is not available", V8Proxy::ReferenceError);
- context = frame->document();
- }
+ ScriptExecutionContext* context = getScriptExecutionContext();
+ if (!context)
+ return throwError("WebSocket constructor's associated frame is not available", V8Proxy::ReferenceError);
const KURL& url = context->completeURL(toWebCoreString(urlstring));
@@ -128,10 +124,10 @@ CALLBACK_FUNC_DECL(WebSocketConstructor)
return args.Holder();
}
-CALLBACK_FUNC_DECL(WebSocketSend)
+v8::Handle<v8::Value> V8WebSocket::sendCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebSocket.send()");
- WebSocket* webSocket = V8DOMWrapper::convertToNativeObject<WebSocket>(V8ClassIndex::WEBSOCKET, args.Holder());
+ WebSocket* webSocket = V8WebSocket::toNative(args.Holder());
ExceptionCode ec = 0;
bool ret = false;
@@ -146,15 +142,6 @@ CALLBACK_FUNC_DECL(WebSocketSend)
return v8Boolean(ret);
}
-CALLBACK_FUNC_DECL(WebSocketClose)
-{
- INC_STATS("DOM.WebSocket.close()");
- WebSocket* webSocket = V8DOMWrapper::convertToNativeObject<WebSocket>(V8ClassIndex::WEBSOCKET, args.Holder());
-
- webSocket->close();
- return v8::Undefined();
-}
-
} // namespace WebCore
#endif // ENABLE(WEB_SOCKETS)
diff --git a/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp b/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
index 9b68ac0..9d54f8e 100755
--- a/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#if ENABLE(WORKERS)
+#include "V8WorkerContext.h"
#include "DOMTimer.h"
#include "ExceptionCode.h"
@@ -41,28 +42,29 @@
#include "V8Proxy.h"
#include "V8Utilities.h"
#include "V8WorkerContextEventListener.h"
+#include "WebSocket.h"
#include "WorkerContext.h"
#include "WorkerContextExecutionProxy.h"
namespace WebCore {
#if ENABLE(NOTIFICATIONS)
-ACCESSOR_RUNTIME_ENABLER(WorkerContextWebkitNotifications)
+bool V8WorkerContext::WebkitNotificationsEnabled()
{
return RuntimeEnabledFeatures::notificationsEnabled();
}
#endif
-ACCESSOR_GETTER(WorkerContextSelf)
+#if ENABLE(WEB_SOCKETS)
+bool V8WorkerContext::WebSocketEnabled()
{
- INC_STATS(L"DOM.WorkerContext.self._get");
- WorkerContext* workerContext = V8DOMWrapper::convertDOMWrapperToNative<WorkerContext>(info.Holder());
- return WorkerContextExecutionProxy::convertWorkerContextToV8Object(workerContext);
+ return WebSocket::isAvailable();
}
+#endif
v8::Handle<v8::Value> SetTimeoutOrInterval(const v8::Arguments& args, bool singleShot)
{
- WorkerContext* workerContext = V8DOMWrapper::convertDOMWrapperToNative<WorkerContext>(args.Holder());
+ WorkerContext* workerContext = V8WorkerContext::toNative(args.Holder());
int argumentCount = args.Length();
if (argumentCount < 1)
@@ -94,7 +96,7 @@ v8::Handle<v8::Value> SetTimeoutOrInterval(const v8::Arguments& args, bool singl
return v8::Integer::New(timerId);
}
-CALLBACK_FUNC_DECL(WorkerContextImportScripts)
+v8::Handle<v8::Value> V8WorkerContext::importScriptsCallback(const v8::Arguments& args)
{
INC_STATS(L"DOM.WorkerContext.importScripts()");
if (!args.Length())
@@ -117,7 +119,7 @@ CALLBACK_FUNC_DECL(WorkerContextImportScripts)
urls.append(toWebCoreString(scriptUrl));
}
- WorkerContext* workerContext = V8DOMWrapper::convertDOMWrapperToNative<WorkerContext>(args.Holder());
+ WorkerContext* workerContext = V8WorkerContext::toNative(args.Holder());
ExceptionCode ec = 0;
workerContext->importScripts(urls, callerURL, callerLine, ec);
@@ -128,22 +130,22 @@ CALLBACK_FUNC_DECL(WorkerContextImportScripts)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(WorkerContextSetTimeout)
+v8::Handle<v8::Value> V8WorkerContext::setTimeoutCallback(const v8::Arguments& args)
{
INC_STATS(L"DOM.WorkerContext.setTimeout()");
return SetTimeoutOrInterval(args, true);
}
-CALLBACK_FUNC_DECL(WorkerContextSetInterval)
+v8::Handle<v8::Value> V8WorkerContext::setIntervalCallback(const v8::Arguments& args)
{
INC_STATS(L"DOM.WorkerContext.setInterval()");
return SetTimeoutOrInterval(args, false);
}
-CALLBACK_FUNC_DECL(WorkerContextAddEventListener)
+v8::Handle<v8::Value> V8WorkerContext::addEventListenerCallback(const v8::Arguments& args)
{
INC_STATS(L"DOM.WorkerContext.addEventListener()");
- WorkerContext* workerContext = V8DOMWrapper::convertDOMWrapperToNative<WorkerContext>(args.Holder());
+ WorkerContext* workerContext = V8WorkerContext::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(workerContext, args[1], false, ListenerFindOrCreate);
if (listener) {
@@ -151,15 +153,15 @@ CALLBACK_FUNC_DECL(WorkerContextAddEventListener)
bool useCapture = args[2]->BooleanValue();
workerContext->addEventListener(type, listener, useCapture);
- createHiddenDependency(args.Holder(), args[1], V8Custom::kWorkerContextRequestCacheIndex);
+ createHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(WorkerContextRemoveEventListener)
+v8::Handle<v8::Value> V8WorkerContext::removeEventListenerCallback(const v8::Arguments& args)
{
INC_STATS(L"DOM.WorkerContext.removeEventListener()");
- WorkerContext* workerContext = V8DOMWrapper::convertDOMWrapperToNative<WorkerContext>(args.Holder());
+ WorkerContext* workerContext = V8WorkerContext::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(workerContext, args[1], false, ListenerFindOnly);
if (listener) {
@@ -167,7 +169,7 @@ CALLBACK_FUNC_DECL(WorkerContextRemoveEventListener)
bool useCapture = args[2]->BooleanValue();
workerContext->removeEventListener(type, listener.get(), useCapture);
- removeHiddenDependency(args.Holder(), args[1], V8Custom::kWorkerContextRequestCacheIndex);
+ removeHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
diff --git a/WebCore/bindings/v8/custom/V8WorkerCustom.cpp b/WebCore/bindings/v8/custom/V8WorkerCustom.cpp
index 454e41f..ffca2a4 100755
--- a/WebCore/bindings/v8/custom/V8WorkerCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WorkerCustom.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#if ENABLE(WORKERS)
+#include "V8Worker.h"
#include "Worker.h"
@@ -47,7 +48,7 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(WorkerConstructor)
+v8::Handle<v8::Value> V8Worker::constructorCallback(const v8::Arguments& args)
{
INC_STATS(L"DOM.Worker.Constructor");
@@ -87,11 +88,11 @@ CALLBACK_FUNC_DECL(WorkerConstructor)
return wrapperObject;
}
-CALLBACK_FUNC_DECL(WorkerPostMessage)
+v8::Handle<v8::Value> V8Worker::postMessageCallback(const v8::Arguments& args)
{
INC_STATS("DOM.Worker.postMessage");
- Worker* worker = V8DOMWrapper::convertToNativeObject<Worker>(V8ClassIndex::WORKER, args.Holder());
- RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(toWebCoreString(args[0]));
+ Worker* worker = V8Worker::toNative(args.Holder());
+ RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(args[0]);
MessagePortArray portArray;
if (args.Length() > 1) {
if (!getMessagePortArray(args[1], portArray))
diff --git a/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp b/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp
index af647cd..e31e05f 100644
--- a/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp
+++ b/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp
@@ -29,19 +29,19 @@
*/
#include "config.h"
+#include "V8XMLHttpRequest.h"
#include "Frame.h"
#include "V8Binding.h"
#include "V8CustomBinding.h"
#include "V8Proxy.h"
#include "V8Utilities.h"
-#include "XMLHttpRequest.h"
#include "WorkerContext.h"
#include "WorkerContextExecutionProxy.h"
namespace WebCore {
-CALLBACK_FUNC_DECL(XMLHttpRequestConstructor)
+v8::Handle<v8::Value> V8XMLHttpRequest::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XMLHttpRequest.Constructor");
diff --git a/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp b/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
index c3e4645..d7cdcd1 100644
--- a/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
@@ -29,32 +29,33 @@
*/
#include "config.h"
-#include "XMLHttpRequest.h"
+#include "V8XMLHttpRequest.h"
#include "Frame.h"
#include "V8Binding.h"
+#include "V8Blob.h"
#include "V8CustomBinding.h"
#include "V8Document.h"
-#include "V8File.h"
#include "V8HTMLDocument.h"
#include "V8Proxy.h"
#include "V8Utilities.h"
#include "WorkerContext.h"
#include "WorkerContextExecutionProxy.h"
+#include "XMLHttpRequest.h"
namespace WebCore {
-ACCESSOR_GETTER(XMLHttpRequestResponseText)
+v8::Handle<v8::Value> V8XMLHttpRequest::responseTextAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.XMLHttpRequest.responsetext._get");
- XMLHttpRequest* xmlHttpRequest = V8DOMWrapper::convertToNativeObject<XMLHttpRequest>(V8ClassIndex::XMLHTTPREQUEST, info.Holder());
+ XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(info.Holder());
return xmlHttpRequest->responseText().v8StringOrNull();
}
-CALLBACK_FUNC_DECL(XMLHttpRequestAddEventListener)
+v8::Handle<v8::Value> V8XMLHttpRequest::addEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XMLHttpRequest.addEventListener()");
- XMLHttpRequest* xmlHttpRequest = V8DOMWrapper::convertToNativeObject<XMLHttpRequest>(V8ClassIndex::XMLHTTPREQUEST, args.Holder());
+ XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(xmlHttpRequest, args[1], false, ListenerFindOrCreate);
if (listener) {
@@ -62,15 +63,15 @@ CALLBACK_FUNC_DECL(XMLHttpRequestAddEventListener)
bool useCapture = args[2]->BooleanValue();
xmlHttpRequest->addEventListener(type, listener, useCapture);
- createHiddenDependency(args.Holder(), args[1], V8Custom::kXMLHttpRequestCacheIndex);
+ createHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(XMLHttpRequestRemoveEventListener)
+v8::Handle<v8::Value> V8XMLHttpRequest::removeEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XMLHttpRequest.removeEventListener()");
- XMLHttpRequest* xmlHttpRequest = V8DOMWrapper::convertToNativeObject<XMLHttpRequest>(V8ClassIndex::XMLHTTPREQUEST, args.Holder());
+ XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder());
RefPtr<EventListener> listener = V8DOMWrapper::getEventListener(xmlHttpRequest, args[1], false, ListenerFindOnly);
if (listener) {
@@ -78,13 +79,13 @@ CALLBACK_FUNC_DECL(XMLHttpRequestRemoveEventListener)
bool useCapture = args[2]->BooleanValue();
xmlHttpRequest->removeEventListener(type, listener.get(), useCapture);
- removeHiddenDependency(args.Holder(), args[1], V8Custom::kXMLHttpRequestCacheIndex);
+ removeHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(XMLHttpRequestOpen)
+v8::Handle<v8::Value> V8XMLHttpRequest::openCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XMLHttpRequest.open()");
// Four cases:
@@ -96,7 +97,7 @@ CALLBACK_FUNC_DECL(XMLHttpRequestOpen)
if (args.Length() < 2)
return throwError("Not enough arguments", V8Proxy::SyntaxError);
- XMLHttpRequest* xmlHttpRequest = V8DOMWrapper::convertToNativeObject<XMLHttpRequest>(V8ClassIndex::XMLHTTPREQUEST, args.Holder());
+ XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder());
String method = toWebCoreString(args[0]);
String urlstring = toWebCoreString(args[1]);
@@ -133,10 +134,10 @@ static bool IsDocumentType(v8::Handle<v8::Value> value)
return V8Document::HasInstance(value) || V8HTMLDocument::HasInstance(value);
}
-CALLBACK_FUNC_DECL(XMLHttpRequestSend)
+v8::Handle<v8::Value> V8XMLHttpRequest::sendCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XMLHttpRequest.send()");
- XMLHttpRequest* xmlHttpRequest = V8DOMWrapper::convertToNativeObject<XMLHttpRequest>(V8ClassIndex::XMLHTTPREQUEST, args.Holder());
+ XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder());
ExceptionCode ec = 0;
if (args.Length() < 1)
@@ -145,14 +146,14 @@ CALLBACK_FUNC_DECL(XMLHttpRequestSend)
v8::Handle<v8::Value> arg = args[0];
if (IsDocumentType(arg)) {
v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
- Document* document = V8DOMWrapper::convertDOMWrapperToNode<Document>(object);
+ Document* document = V8Document::toNative(object);
ASSERT(document);
xmlHttpRequest->send(document, ec);
- } else if (V8File::HasInstance(arg)) {
+ } else if (V8Blob::HasInstance(arg)) {
v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
- File* file = V8DOMWrapper::convertDOMWrapperToNative<File>(object);
- ASSERT(file);
- xmlHttpRequest->send(file, ec);
+ Blob* blob = V8Blob::toNative(object);
+ ASSERT(blob);
+ xmlHttpRequest->send(blob, ec);
} else
xmlHttpRequest->send(toWebCoreStringWithNullCheck(arg), ec);
}
@@ -163,12 +164,13 @@ CALLBACK_FUNC_DECL(XMLHttpRequestSend)
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(XMLHttpRequestSetRequestHeader) {
+v8::Handle<v8::Value> V8XMLHttpRequest::setRequestHeaderCallback(const v8::Arguments& args)
+{
INC_STATS("DOM.XMLHttpRequest.setRequestHeader()");
if (args.Length() < 2)
return throwError("Not enough arguments", V8Proxy::SyntaxError);
- XMLHttpRequest* xmlHttpRequest = V8DOMWrapper::convertToNativeObject<XMLHttpRequest>(V8ClassIndex::XMLHTTPREQUEST, args.Holder());
+ XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder());
ExceptionCode ec = 0;
String header = toWebCoreString(args[0]);
String value = toWebCoreString(args[1]);
@@ -178,13 +180,13 @@ CALLBACK_FUNC_DECL(XMLHttpRequestSetRequestHeader) {
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(XMLHttpRequestGetResponseHeader)
+v8::Handle<v8::Value> V8XMLHttpRequest::getResponseHeaderCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XMLHttpRequest.getResponseHeader()");
if (args.Length() < 1)
return throwError("Not enough arguments", V8Proxy::SyntaxError);
- XMLHttpRequest* xmlHttpRequest = V8DOMWrapper::convertToNativeObject<XMLHttpRequest>(V8ClassIndex::XMLHTTPREQUEST, args.Holder());
+ XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder());
ExceptionCode ec = 0;
String header = toWebCoreString(args[0]);
String result = xmlHttpRequest->getResponseHeader(header, ec);
@@ -193,19 +195,19 @@ CALLBACK_FUNC_DECL(XMLHttpRequestGetResponseHeader)
return v8StringOrNull(result);
}
-CALLBACK_FUNC_DECL(XMLHttpRequestOverrideMimeType)
+v8::Handle<v8::Value> V8XMLHttpRequest::overrideMimeTypeCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XMLHttpRequest.overrideMimeType()");
if (args.Length() < 1)
return throwError("Not enough arguments", V8Proxy::SyntaxError);
- XMLHttpRequest* xmlHttpRequest = V8DOMWrapper::convertToNativeObject<XMLHttpRequest>(V8ClassIndex::XMLHTTPREQUEST, args.Holder());
+ XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder());
String value = toWebCoreString(args[0]);
xmlHttpRequest->overrideMimeType(value);
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(XMLHttpRequestDispatchEvent)
+v8::Handle<v8::Value> V8XMLHttpRequest::dispatchEventCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XMLHttpRequest.dispatchEvent()");
return v8::Undefined();
diff --git a/WebCore/bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp b/WebCore/bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp
index 9323f71..0690189 100644
--- a/WebCore/bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp
@@ -29,7 +29,7 @@
*/
#include "config.h"
-#include "XMLHttpRequestUpload.h"
+#include "V8XMLHttpRequestUpload.h"
#include "ExceptionCode.h"
#include "V8Binding.h"
@@ -37,15 +37,16 @@
#include "V8Proxy.h"
#include "V8Utilities.h"
#include "XMLHttpRequest.h"
+#include "XMLHttpRequestUpload.h"
#include <wtf/Assertions.h>
namespace WebCore {
-CALLBACK_FUNC_DECL(XMLHttpRequestUploadAddEventListener)
+v8::Handle<v8::Value> V8XMLHttpRequestUpload::addEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XMLHttpRequestUpload.addEventListener()");
- XMLHttpRequestUpload* xmlHttpRequestUpload = V8DOMWrapper::convertToNativeObject<XMLHttpRequestUpload>(V8ClassIndex::XMLHTTPREQUESTUPLOAD, args.Holder());
+ XMLHttpRequestUpload* xmlHttpRequestUpload = V8XMLHttpRequestUpload::toNative(args.Holder());
XMLHttpRequest* xmlHttpRequest = xmlHttpRequestUpload->associatedXMLHttpRequest();
@@ -55,15 +56,15 @@ CALLBACK_FUNC_DECL(XMLHttpRequestUploadAddEventListener)
bool useCapture = args[2]->BooleanValue();
xmlHttpRequestUpload->addEventListener(type, listener, useCapture);
- createHiddenDependency(args.Holder(), args[1], V8Custom::kXMLHttpRequestCacheIndex);
+ createHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(XMLHttpRequestUploadRemoveEventListener)
+v8::Handle<v8::Value> V8XMLHttpRequestUpload::removeEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XMLHttpRequestUpload.removeEventListener()");
- XMLHttpRequestUpload* xmlHttpRequestUpload = V8DOMWrapper::convertToNativeObject<XMLHttpRequestUpload>(V8ClassIndex::XMLHTTPREQUESTUPLOAD, args.Holder());
+ XMLHttpRequestUpload* xmlHttpRequestUpload = V8XMLHttpRequestUpload::toNative(args.Holder());
XMLHttpRequest* xmlHttpRequest = xmlHttpRequestUpload->associatedXMLHttpRequest();
@@ -73,13 +74,13 @@ CALLBACK_FUNC_DECL(XMLHttpRequestUploadRemoveEventListener)
bool useCapture = args[2]->BooleanValue();
xmlHttpRequestUpload->removeEventListener(type, listener.get(), useCapture);
- removeHiddenDependency(args.Holder(), args[1], V8Custom::kXMLHttpRequestCacheIndex);
+ removeHiddenDependency(args.Holder(), args[1], cacheIndex);
}
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(XMLHttpRequestUploadDispatchEvent)
+v8::Handle<v8::Value> V8XMLHttpRequestUpload::dispatchEventCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XMLHttpRequestUpload.dispatchEvent()");
return throwError(NOT_SUPPORTED_ERR);
diff --git a/WebCore/bindings/v8/custom/V8XSLTProcessorCustom.cpp b/WebCore/bindings/v8/custom/V8XSLTProcessorCustom.cpp
index 1ad7d4a..fd0305a 100644
--- a/WebCore/bindings/v8/custom/V8XSLTProcessorCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8XSLTProcessorCustom.cpp
@@ -29,7 +29,7 @@
*/
#include "config.h"
-#include "XSLTProcessor.h"
+#include "V8XSLTProcessor.h"
#include "Document.h"
#include "DocumentFragment.h"
@@ -40,57 +40,58 @@
#include "V8Document.h"
#include "V8Node.h"
#include "V8Proxy.h"
+#include "XSLTProcessor.h"
#include <wtf/RefPtr.h>
namespace WebCore {
-CALLBACK_FUNC_DECL(XSLTProcessorConstructor)
+v8::Handle<v8::Value> V8XSLTProcessor::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XSLTProcessor.Constructor");
return V8Proxy::constructDOMObject<V8ClassIndex::XSLTPROCESSOR, XSLTProcessor>(args);
}
-CALLBACK_FUNC_DECL(XSLTProcessorImportStylesheet)
+v8::Handle<v8::Value> V8XSLTProcessor::importStylesheetCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XSLTProcessor.importStylesheet");
if (!V8Node::HasInstance(args[0]))
return v8::Undefined();
- XSLTProcessor* imp = V8DOMWrapper::convertToNativeObject<XSLTProcessor>(V8ClassIndex::XSLTPROCESSOR, args.Holder());
+ XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
- Node* node = V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0]));
+ Node* node = V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0]));
imp->importStylesheet(node);
return v8::Undefined();
}
-CALLBACK_FUNC_DECL(XSLTProcessorTransformToFragment)
+v8::Handle<v8::Value> V8XSLTProcessor::transformToFragmentCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XSLTProcessor.transformToFragment");
if (!V8Node::HasInstance(args[0]) || !V8Document::HasInstance(args[1]))
return v8::Undefined();
- XSLTProcessor* imp = V8DOMWrapper::convertToNativeObject<XSLTProcessor>(V8ClassIndex::XSLTPROCESSOR, args.Holder());
+ XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
- Node* source = V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0]));
- Document* owner = V8DOMWrapper::convertDOMWrapperToNode<Document>(v8::Handle<v8::Object>::Cast(args[1]));
+ Node* source = V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0]));
+ Document* owner = V8Document::toNative(v8::Handle<v8::Object>::Cast(args[1]));
RefPtr<DocumentFragment> result = imp->transformToFragment(source, owner);
return V8DOMWrapper::convertNodeToV8Object(result.release());
}
-CALLBACK_FUNC_DECL(XSLTProcessorTransformToDocument)
+v8::Handle<v8::Value> V8XSLTProcessor::transformToDocumentCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XSLTProcessor.transformToDocument");
if (!V8Node::HasInstance(args[0]))
return v8::Undefined();
- XSLTProcessor* imp = V8DOMWrapper::convertToNativeObject<XSLTProcessor>(V8ClassIndex::XSLTPROCESSOR, args.Holder());
+ XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
- Node* source = V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast(args[0]));
+ Node* source = V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0]));
if (!source)
return v8::Undefined();
@@ -102,13 +103,13 @@ CALLBACK_FUNC_DECL(XSLTProcessorTransformToDocument)
}
-CALLBACK_FUNC_DECL(XSLTProcessorSetParameter)
+v8::Handle<v8::Value> V8XSLTProcessor::setParameterCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XSLTProcessor.setParameter");
if (isUndefinedOrNull(args[1]) || isUndefinedOrNull(args[2]))
return v8::Undefined();
- XSLTProcessor* imp = V8DOMWrapper::convertToNativeObject<XSLTProcessor>(V8ClassIndex::XSLTPROCESSOR, args.Holder());
+ XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
String namespaceURI = toWebCoreString(args[0]);
String localName = toWebCoreString(args[1]);
@@ -119,13 +120,13 @@ CALLBACK_FUNC_DECL(XSLTProcessorSetParameter)
}
-CALLBACK_FUNC_DECL(XSLTProcessorGetParameter)
+v8::Handle<v8::Value> V8XSLTProcessor::getParameterCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XSLTProcessor.getParameter");
if (isUndefinedOrNull(args[1]))
return v8::Undefined();
- XSLTProcessor* imp = V8DOMWrapper::convertToNativeObject<XSLTProcessor>(V8ClassIndex::XSLTPROCESSOR, args.Holder());
+ XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
String namespaceURI = toWebCoreString(args[0]);
String localName = toWebCoreString(args[1]);
@@ -136,13 +137,13 @@ CALLBACK_FUNC_DECL(XSLTProcessorGetParameter)
return v8String(result);
}
-CALLBACK_FUNC_DECL(XSLTProcessorRemoveParameter)
+v8::Handle<v8::Value> V8XSLTProcessor::removeParameterCallback(const v8::Arguments& args)
{
INC_STATS("DOM.XSLTProcessor.removeParameter");
if (isUndefinedOrNull(args[1]))
return v8::Undefined();
- XSLTProcessor* imp = V8DOMWrapper::convertToNativeObject<XSLTProcessor>(V8ClassIndex::XSLTPROCESSOR, args.Holder());
+ XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
String namespaceURI = toWebCoreString(args[0]);
String localName = toWebCoreString(args[1]);
diff --git a/WebCore/bindings/v8/specialization/V8BindingDOMWindow.h b/WebCore/bindings/v8/specialization/V8BindingDOMWindow.h
new file mode 100644
index 0000000..0c4069f
--- /dev/null
+++ b/WebCore/bindings/v8/specialization/V8BindingDOMWindow.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef V8BindingDOMWindow_h
+#define V8BindingDOMWindow_h
+
+#include "BindingDOMWindow.h"
+#include "GenericBinding.h"
+#include "V8Proxy.h"
+
+namespace WebCore {
+
+class V8Binding;
+
+class V8BindingDOMWindow : public BindingDOMWindow<V8Binding> {
+public:
+ static void storeDialogArgs(State<V8Binding>*, Frame* newFrame, v8::Handle<v8::Value> dialogArgs)
+ {
+ // Set dialog arguments on the global object of the new frame.
+ if (!dialogArgs.IsEmpty()) {
+ v8::Local<v8::Context> context = V8Proxy::context(newFrame);
+ if (!context.IsEmpty()) {
+ v8::Context::Scope scope(context);
+ context->Global()->Set(v8::String::New("dialogArguments"), dialogArgs);
+ }
+ }
+ }
+};
+
+} // namespace WebCore
+
+#endif // V8BindingDOMWindow_h
diff --git a/WebCore/bindings/v8/specialization/V8BindingState.cpp b/WebCore/bindings/v8/specialization/V8BindingState.cpp
new file mode 100644
index 0000000..4710271
--- /dev/null
+++ b/WebCore/bindings/v8/specialization/V8BindingState.cpp
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "V8BindingState.h"
+
+#include "V8Proxy.h"
+#include <wtf/StdLibExtras.h>
+
+namespace WebCore {
+
+State<V8Binding>* State<V8Binding>::Only()
+{
+ DEFINE_STATIC_LOCAL(State, globalV8BindingState, ());
+ return &globalV8BindingState;
+}
+
+DOMWindow* State<V8Binding>::getActiveWindow()
+{
+ v8::Local<v8::Context> activeContext = v8::Context::GetCalling();
+ if (activeContext.IsEmpty()) {
+ // There is a single activation record on the stack, so that must
+ // be the activeContext.
+ activeContext = v8::Context::GetCurrent();
+ }
+ return V8Proxy::retrieveWindow(activeContext);
+}
+
+void State<V8Binding>::immediatelyReportUnsafeAccessTo(Frame* target)
+{
+ V8Proxy::reportUnsafeAccessTo(target, V8Proxy::ReportNow);
+}
+
+} // namespace WebCore
diff --git a/WebCore/bindings/v8/specialization/V8BindingState.h b/WebCore/bindings/v8/specialization/V8BindingState.h
new file mode 100644
index 0000000..f305c14
--- /dev/null
+++ b/WebCore/bindings/v8/specialization/V8BindingState.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef V8BindingState_h
+#define V8BindingState_h
+
+#include "GenericBinding.h"
+#include "V8Binding.h"
+
+namespace WebCore {
+
+// Singleton implementation of State<V8Binding>. Uses V8's global data
+// structures to return information about relevant execution state.
+template <>
+class State<V8Binding> : public State<GenericBinding> {
+public:
+ // Singleton
+ static State* Only();
+
+ // The DOMWindow corresponding to the 'calling context' of execution.
+ DOMWindow* getActiveWindow();
+
+ // Reports an error message (without delay) if the security check fails.
+ static void immediatelyReportUnsafeAccessTo(Frame*);
+
+private:
+ explicit State() {}
+ ~State();
+};
+
+typedef State<V8Binding> V8BindingState;
+
+}
+
+#endif // V8BindingState_h
diff --git a/WebCore/bridge/Bridge.h b/WebCore/bridge/Bridge.h
index 50efc64..e3155df 100644
--- a/WebCore/bridge/Bridge.h
+++ b/WebCore/bridge/Bridge.h
@@ -28,7 +28,10 @@
#define Bridge_h
#include "BridgeJSC.h"
+<<<<<<< HEAD
#include <wtf/Noncopyable.h>
+=======
+>>>>>>> webkit.org at r54127
namespace JSC {
diff --git a/WebCore/bridge/NP_jsobject.cpp b/WebCore/bridge/NP_jsobject.cpp
index 59900c5..a30b6d7 100644
--- a/WebCore/bridge/NP_jsobject.cpp
+++ b/WebCore/bridge/NP_jsobject.cpp
@@ -379,7 +379,7 @@ bool _NPN_HasMethod(NPP, NPObject* o, NPIdentifier methodName)
void _NPN_SetException(NPObject*, const NPUTF8* message)
{
- // Ignorning the NPObject param is consistent with the Mozilla implementation.
+ // Ignoring the NPObject param is consistent with the Mozilla implementation.
UString exception(message);
CInstance::setGlobalException(exception);
}
diff --git a/WebCore/bridge/jni/JNIBridge.cpp b/WebCore/bridge/jni/JNIBridge.cpp
index 4810e5f..008b3d3 100644
--- a/WebCore/bridge/jni/JNIBridge.cpp
+++ b/WebCore/bridge/jni/JNIBridge.cpp
@@ -55,20 +55,39 @@ JavaParameter::JavaParameter(JNIEnv* env, jstring type)
JavaMethod::JavaMethod(JNIEnv* env, jobject aMethod)
{
+<<<<<<< HEAD
// Get return type
jobject returnType = callJNIMethod<jobject>(aMethod, "getReturnType", "()Ljava/lang/Class;");
jstring returnTypeName = static_cast<jstring>(callJNIMethod<jobject>(returnType, "getName", "()Ljava/lang/String;"));
m_returnType = JavaString(env, returnTypeName);
m_JNIReturnType = JNITypeFromClassName(m_returnType.UTF8String());
env->DeleteLocalRef(returnType);
+=======
+ // Get return type name
+ jstring returnTypeName = 0;
+ if (jobject returnType = callJNIMethod<jobject>(aMethod, "getReturnType", "()Ljava/lang/Class;")) {
+ returnTypeName = static_cast<jstring>(callJNIMethod<jobject>(returnType, "getName", "()Ljava/lang/String;"));
+ if (!returnTypeName)
+ returnTypeName = env->NewStringUTF("<Unknown>");
+ env->DeleteLocalRef(returnType);
+ }
+ m_returnType = JavaString(env, returnTypeName);
+ m_JNIReturnType = JNITypeFromClassName(m_returnType.UTF8String());
+>>>>>>> webkit.org at r54127
env->DeleteLocalRef(returnTypeName);
// Get method name
jstring methodName = static_cast<jstring>(callJNIMethod<jobject>(aMethod, "getName", "()Ljava/lang/String;"));
+<<<<<<< HEAD
+=======
+ if (!returnTypeName)
+ returnTypeName = env->NewStringUTF("<Unknown>");
+>>>>>>> webkit.org at r54127
m_name = JavaString(env, methodName);
env->DeleteLocalRef(methodName);
// Get parameters
+<<<<<<< HEAD
jarray jparameters = static_cast<jarray>(callJNIMethod<jobject>(aMethod, "getParameterTypes", "()[Ljava/lang/Class;"));
m_numParameters = env->GetArrayLength(jparameters);
m_parameters = new JavaParameter[m_numParameters];
@@ -81,6 +100,26 @@ JavaMethod::JavaMethod(JNIEnv* env, jobject aMethod)
env->DeleteLocalRef(parameterName);
}
env->DeleteLocalRef(jparameters);
+=======
+ if (jarray jparameters = static_cast<jarray>(callJNIMethod<jobject>(aMethod, "getParameterTypes", "()[Ljava/lang/Class;"))) {
+ m_numParameters = env->GetArrayLength(jparameters);
+ m_parameters = new JavaParameter[m_numParameters];
+
+ for (int i = 0; i < m_numParameters; i++) {
+ jobject aParameter = env->GetObjectArrayElement(static_cast<jobjectArray>(jparameters), i);
+ jstring parameterName = static_cast<jstring>(callJNIMethod<jobject>(aParameter, "getName", "()Ljava/lang/String;"));
+ if (!parameterName)
+ parameterName = env->NewStringUTF("<Unknown>");
+ m_parameters[i] = JavaParameter(env, parameterName);
+ env->DeleteLocalRef(aParameter);
+ env->DeleteLocalRef(parameterName);
+ }
+ env->DeleteLocalRef(jparameters);
+ } else {
+ m_numParameters = 0;
+ m_parameters = 0;
+ }
+>>>>>>> webkit.org at r54127
// Created lazily.
m_signature = 0;
diff --git a/WebCore/bridge/jni/JNIBridge.h b/WebCore/bridge/jni/JNIBridge.h
index 5d482a7..c9d3a24 100644
--- a/WebCore/bridge/jni/JNIBridge.h
+++ b/WebCore/bridge/jni/JNIBridge.h
@@ -29,13 +29,19 @@
#if ENABLE(MAC_JAVA_BRIDGE)
+<<<<<<< HEAD
#include "Bridge.h"
+=======
+>>>>>>> webkit.org at r54127
#include "JNIUtility.h"
#if USE(JSC)
#include "JavaStringJSC.h"
+<<<<<<< HEAD
#elif USE(V8)
#include "JavaStringV8.h"
+=======
+>>>>>>> webkit.org at r54127
#endif
namespace JSC {
diff --git a/WebCore/bridge/jni/JNIUtility.h b/WebCore/bridge/jni/JNIUtility.h
index 85c3533..c832ef3 100644
--- a/WebCore/bridge/jni/JNIUtility.h
+++ b/WebCore/bridge/jni/JNIUtility.h
@@ -81,11 +81,11 @@ template <typename T> struct JNICaller;
template<> struct JNICaller<void> {
static void callA(jobject obj, jmethodID mid, jvalue* args)
{
- return getJNIEnv()->CallVoidMethodA(obj, mid, args);
+ getJNIEnv()->CallVoidMethodA(obj, mid, args);
}
static void callV(jobject obj, jmethodID mid, va_list args)
{
- return getJNIEnv()->CallVoidMethodV(obj, mid, args);
+ getJNIEnv()->CallVoidMethodV(obj, mid, args);
}
};
diff --git a/WebCore/bridge/jni/jni_jsobject.mm b/WebCore/bridge/jni/jni_jsobject.mm
index de67711..603624f 100644
--- a/WebCore/bridge/jni/jni_jsobject.mm
+++ b/WebCore/bridge/jni/jni_jsobject.mm
@@ -128,7 +128,7 @@ static void dispatchToJavaScriptThread(JSObjectCallContext *context)
completionSource = CFRunLoopSourceCreate(NULL, 0, &sourceContext);
CFRunLoopAddSource(currentRunLoop, completionSource, kCFRunLoopDefaultMode);
- // Wakeup JavaScript access thread and make it do it's work.
+ // Wakeup JavaScript access thread and make it do its work.
CFRunLoopSourceSignal(_performJavaScriptSource);
if (CFRunLoopIsWaiting(_performJavaScriptRunLoop))
CFRunLoopWakeUp(_performJavaScriptRunLoop);
@@ -533,7 +533,7 @@ jobject JavaJSObject::convertValueToJObject(JSValue value) const
// We either have a wrapper around a Java instance or a JavaScript
// object. If we have a wrapper around a Java instance, return that
// instance, otherwise create a new Java JavaJSObject with the JSObject*
- // as it's nativeHandle.
+ // as its nativeHandle.
if (imp->classInfo() && strcmp(imp->classInfo()->className, "RuntimeObject") == 0) {
RuntimeObjectImp* runtimeImp = static_cast<RuntimeObjectImp*>(imp);
JavaInstance *runtimeInstance = static_cast<JavaInstance *>(runtimeImp->getInternalInstance());
@@ -552,7 +552,7 @@ jobject JavaJSObject::convertValueToJObject(JSValue value) const
nativeHandle = UndefinedHandle;
}
- // Now create the Java JavaJSObject. Look for the JavaJSObject in it's new (Tiger)
+ // Now create the Java JavaJSObject. Look for the JavaJSObject in its new (Tiger)
// location and in the original Java 1.4.2 location.
jclass JSObjectClass;
@@ -580,30 +580,31 @@ JSValue JavaJSObject::convertJObjectToValue(ExecState* exec, jobject theObject)
// See section 22.7 of 'JavaScript: The Definitive Guide, 4th Edition',
// figure 22-4.
jobject classOfInstance = callJNIMethod<jobject>(theObject, "getClass", "()Ljava/lang/Class;");
- jstring className = (jstring)callJNIMethod<jobject>(classOfInstance, "getName", "()Ljava/lang/String;");
-
+ if (!classOfInstance) {
+ JSLock lock(SilenceAssertionsOnly);
+ return JavaInstance::create(theObject, _rootObject)->createRuntimeObject(exec);
+ }
+
// Only the sun.plugin.javascript.webkit.JSObject has a member called nativeJSObject. This class is
// created above to wrap internal browser objects. The constructor of this class takes the native
// pointer and stores it in this object, so that it can be retrieved below.
- if (strcmp(JavaString(className).UTF8String(), "sun.plugin.javascript.webkit.JSObject") == 0) {
- // Pull the nativeJSObject value from the Java instance. This is a
- // pointer to the JSObject.
- JNIEnv *env = getJNIEnv();
- jfieldID fieldID = env->GetFieldID((jclass)classOfInstance, "nativeJSObject", "J");
- if (fieldID == NULL) {
- return jsUndefined();
- }
- jlong nativeHandle = env->GetLongField(theObject, fieldID);
- if (nativeHandle == UndefinedHandle) {
- return jsUndefined();
- }
- JSObject *imp = static_cast<JSObject*>(jlong_to_impptr(nativeHandle));
- return imp;
+ jstring className = (jstring)callJNIMethod<jobject>(classOfInstance, "getName", "()Ljava/lang/String;");
+ if (!className || (strcmp(JavaString(className).UTF8String(), "sun.plugin.javascript.webkit.JSObject") != 0)) {
+ JSLock lock(SilenceAssertionsOnly);
+ return JavaInstance::create(theObject, _rootObject)->createRuntimeObject(exec);
}
- JSLock lock(SilenceAssertionsOnly);
-
- return JavaInstance::create(theObject, _rootObject)->createRuntimeObject(exec);
+ // Pull the nativeJSObject value from the Java instance. This is a
+ // pointer to the JSObject.
+ JNIEnv *env = getJNIEnv();
+ jfieldID fieldID = env->GetFieldID((jclass)classOfInstance, "nativeJSObject", "J");
+ if (fieldID == NULL)
+ return jsUndefined();
+ jlong nativeHandle = env->GetLongField(theObject, fieldID);
+ if (nativeHandle == UndefinedHandle)
+ return jsUndefined();
+ JSObject *imp = static_cast<JSObject*>(jlong_to_impptr(nativeHandle));
+ return imp;
}
void JavaJSObject::getListFromJArray(ExecState* exec, jobjectArray jArray, MarkedArgumentBuffer& list) const
diff --git a/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp b/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp
index 4bc6c47..4520bd6 100644
--- a/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp
+++ b/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp
@@ -49,14 +49,30 @@ using namespace JSC::Bindings;
JavaField::JavaField(JNIEnv* env, jobject aField)
{
+<<<<<<< HEAD
// Get field type
jobject fieldType = callJNIMethod<jobject>(aField, "getType", "()Ljava/lang/Class;");
jstring fieldTypeName = static_cast<jstring>(callJNIMethod<jobject>(fieldType, "getName", "()Ljava/lang/String;"));
m_type = JavaString(env, fieldTypeName);
+=======
+ // Get field type name
+ jstring fieldTypeName = 0;
+ if (jobject fieldType = callJNIMethod<jobject>(aField, "getType", "()Ljava/lang/Class;"))
+ fieldTypeName = static_cast<jstring>(callJNIMethod<jobject>(fieldType, "getName", "()Ljava/lang/String;"));
+ if (!fieldTypeName)
+ fieldTypeName = env->NewStringUTF("<Unknown>");
+ m_type = JavaString(env, fieldTypeName);
+
+>>>>>>> webkit.org at r54127
m_JNIType = JNITypeFromClassName(m_type.UTF8String());
// Get field name
jstring fieldName = static_cast<jstring>(callJNIMethod<jobject>(aField, "getName", "()Ljava/lang/String;"));
+<<<<<<< HEAD
+=======
+ if (!fieldName)
+ fieldName = env->NewStringUTF("<Unknown>");
+>>>>>>> webkit.org at r54127
m_name = JavaString(env, fieldName);
m_field = new JObjectWrapper(aField);
diff --git a/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp b/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
index 4d403ab..a0e6db5 100644
--- a/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
+++ b/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
@@ -90,6 +90,14 @@ JSValue JavaInstance::stringValue(ExecState* exec) const
JSLock lock(SilenceAssertionsOnly);
jstring stringValue = (jstring)callJNIMethod<jobject>(m_instance->m_instance, "toString", "()Ljava/lang/String;");
+<<<<<<< HEAD
+=======
+
+ // Should throw a JS exception, rather than returning ""? - but better than a null dereference.
+ if (!stringValue)
+ return jsString(exec, UString());
+
+>>>>>>> webkit.org at r54127
JNIEnv* env = getJNIEnv();
const jchar* c = getUCharactersFromJStringInEnv(env, stringValue);
UString u((const UChar*)c, (int)env->GetStringLength(stringValue));
@@ -118,7 +126,11 @@ JSValue JavaInstance::invokeMethod(ExecState* exec, const MethodList& methodList
size_t numMethods = methodList.size();
// Try to find a good match for the overloaded method. The
+<<<<<<< HEAD
// fundamental problem is that JavaScript doesn't have the
+=======
+ // fundamental problem is that JavaScript doesn have the
+>>>>>>> webkit.org at r54127
// notion of method overloading and Java does. We could
// get a bit more sophisticated and attempt to does some
// type checking as we as checking the number of parameters.
@@ -152,7 +164,7 @@ JSValue JavaInstance::invokeMethod(ExecState* exec, const MethodList& methodList
jvalue result;
// Try to use the JNI abstraction first, otherwise fall back to
- // nornmal JNI. The JNI dispatch abstraction allows the Java plugin
+ // normal JNI. The JNI dispatch abstraction allows the Java plugin
// to dispatch the call on the appropriate internal VM thread.
RootObject* rootObject = this->rootObject();
if (!rootObject)
@@ -320,7 +332,7 @@ JObjectWrapper::JObjectWrapper(jobject instance)
{
assert(instance);
- // Cache the JNIEnv used to get the global ref for this java instanace.
+ // Cache the JNIEnv used to get the global ref for this java instance.
// It'll be used to delete the reference.
m_env = getJNIEnv();
diff --git a/WebCore/bridge/objc/objc_instance.mm b/WebCore/bridge/objc/objc_instance.mm
index 25da8b9..86b701b 100644
--- a/WebCore/bridge/objc/objc_instance.mm
+++ b/WebCore/bridge/objc/objc_instance.mm
@@ -348,7 +348,7 @@ bool ObjcInstance::setValueOfUndefinedField(ExecState* exec, const Identifier& p
JSLock::DropAllLocks dropAllLocks(SilenceAssertionsOnly); // Can't put this inside the @try scope because it unwinds incorrectly.
// This check is not really necessary because NSObject implements
- // setValue:forUndefinedKey:, and unfortnately the default implementation
+ // setValue:forUndefinedKey:, and unfortunately the default implementation
// throws an exception.
if ([targetObject respondsToSelector:@selector(setValue:forUndefinedKey:)]){
setGlobalException(nil);
@@ -376,7 +376,7 @@ JSValue ObjcInstance::getValueOfUndefinedField(ExecState* exec, const Identifier
JSLock::DropAllLocks dropAllLocks(SilenceAssertionsOnly); // Can't put this inside the @try scope because it unwinds incorrectly.
// This check is not really necessary because NSObject implements
- // valueForUndefinedKey:, and unfortnately the default implementation
+ // valueForUndefinedKey:, and unfortunately the default implementation
// throws an exception.
if ([targetObject respondsToSelector:@selector(valueForUndefinedKey:)]){
setGlobalException(nil);
diff --git a/WebCore/bridge/objc/objc_runtime.h b/WebCore/bridge/objc/objc_runtime.h
index 4de1ce6..35485ad 100644
--- a/WebCore/bridge/objc/objc_runtime.h
+++ b/WebCore/bridge/objc/objc_runtime.h
@@ -104,7 +104,7 @@ public:
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
private:
diff --git a/WebCore/bridge/qt/qt_class.cpp b/WebCore/bridge/qt/qt_class.cpp
index c39b3af..09a1544 100644
--- a/WebCore/bridge/qt/qt_class.cpp
+++ b/WebCore/bridge/qt/qt_class.cpp
@@ -127,7 +127,7 @@ Field* QtClass::fieldNamed(const Identifier& identifier, Instance* instance) con
QObject* obj = qtinst->getObject();
UString ustring = identifier.ustring();
- QString objName(QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()));
+ QString objName((const QChar*)ustring.rep()->data(), ustring.size());
QByteArray ba = objName.toAscii();
// First check for a cached field
diff --git a/WebCore/bridge/qt/qt_instance.cpp b/WebCore/bridge/qt/qt_instance.cpp
index c6185e9..fcfe1cd 100644
--- a/WebCore/bridge/qt/qt_instance.cpp
+++ b/WebCore/bridge/qt/qt_instance.cpp
@@ -60,7 +60,7 @@ public:
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
diff --git a/WebCore/bridge/qt/qt_pixmapruntime.cpp b/WebCore/bridge/qt/qt_pixmapruntime.cpp
new file mode 100644
index 0000000..edae5a9
--- /dev/null
+++ b/WebCore/bridge/qt/qt_pixmapruntime.cpp
@@ -0,0 +1,348 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+#include "config.h"
+#include "qt_pixmapruntime.h"
+
+#include "CachedImage.h"
+#include "DOMWindow.h"
+#include "HTMLImageElement.h"
+#include "HTMLNames.h"
+#include "JSDOMBinding.h"
+#include "JSDOMWindow.h"
+#include "JSGlobalObject.h"
+#include "JSHTMLImageElement.h"
+#include "JSLock.h"
+#include "ObjectPrototype.h"
+#include "StillImageQt.h"
+#include <QBuffer>
+#include <QByteArray>
+#include <QImage>
+#include <QPixmap>
+#include <QVariant>
+#include <runtime_object.h>
+#include <runtime_root.h>
+
+using namespace WebCore;
+namespace JSC {
+
+namespace Bindings {
+
+class QtPixmapClass : public Class {
+public:
+ QtPixmapClass();
+ virtual MethodList methodsNamed(const Identifier&, Instance*) const;
+ virtual Field* fieldNamed(const Identifier&, Instance*) const;
+};
+
+
+class QtPixmapWidthField : public Field {
+public:
+ static const char* name() { return "width"; }
+ virtual JSValue valueFromInstance(ExecState* exec, const Instance* pixmap) const
+ {
+ return jsNumber(exec, static_cast<const QtPixmapInstance*>(pixmap)->width());
+ }
+ virtual void setValueToInstance(ExecState*, const Instance*, JSValue) const {}
+};
+class QtPixmapHeightField : public Field {
+public:
+ static const char* name() { return "height"; }
+ virtual JSValue valueFromInstance(ExecState* exec, const Instance* inst) const
+ {
+ return jsNumber(exec, static_cast<const QtPixmapInstance*>(inst)->height());
+ }
+ virtual void setValueToInstance(ExecState*, const Instance*, JSValue) const {}
+};
+
+class QtPixmapRuntimeMethod : public Method {
+public:
+ virtual int numParameters() const
+ {
+ return 0;
+ }
+ virtual JSValue invoke(ExecState* exec, QVariant&, PassRefPtr<RootObject> root, QtPixmapInstance* inst) = 0;
+
+};
+
+class QtPixmapCreateElementMethod : public QtPixmapRuntimeMethod {
+public:
+ static const char* name() { return "toHTMLImageElement"; }
+ JSValue invoke(ExecState* exec, QVariant& v, PassRefPtr<RootObject> root, QtPixmapInstance*)
+ {
+ QPixmap pxm;
+ if (v.type() == static_cast<QVariant::Type>(qMetaTypeId<QImage>())) {
+ pxm = QPixmap::fromImage(v.value<QImage>());
+ v = QVariant::fromValue<QPixmap>(pxm);
+ } else
+ pxm = v.value<QPixmap>();
+
+ Document* document = 0;
+ JSDOMGlobalObject* global = static_cast<JSDOMGlobalObject*>(root->globalObject());
+ if (global) {
+ DOMWindow* dWindow = toDOMWindow(global);
+ if (dWindow)
+ document = dWindow->document();
+ }
+
+ if (document) {
+ PassRefPtr<StillImage> img = WebCore::StillImage::create(pxm);
+ RefPtr<HTMLImageElement> image = new HTMLImageElement(HTMLNames::imgTag, document);
+ image->setCachedImage(new CachedImage(img.get()));
+ toJS(exec, global, document);
+ return asObject(toJS(exec, global, image.release()));
+ }
+ return jsUndefined();
+ }
+
+};
+
+class QtPixmapToDataUrlMethod : public QtPixmapRuntimeMethod {
+public:
+ static const char* name() { return "toDataUrl"; }
+ JSValue invoke(ExecState* exec, QVariant& v, PassRefPtr<RootObject> root, QtPixmapInstance*)
+ {
+ QImage image;
+ // for getting the data url, we always prefer the image.
+ if (v.type() == static_cast<QVariant::Type>(qMetaTypeId<QPixmap>())) {
+ image = v.value<QPixmap>().toImage();
+ v = QVariant::fromValue<QImage>(image);
+ } else
+ image = v.value<QImage>();
+ QByteArray ba;
+ QBuffer b(&ba);
+ image.save(&b, "PNG");
+ const QString b64 = QString("data:image/png;base64,") + ba.toBase64();
+ const UString ustring((UChar*)b64.utf16(), b64.length());
+ return jsString(exec, ustring);
+ }
+
+};
+
+class QtPixmapToStringMethod : public QtPixmapRuntimeMethod {
+ public:
+ static const char* name() { return "toString"; }
+ JSValue invoke(ExecState* exec, QVariant& v, PassRefPtr<RootObject> root, QtPixmapInstance* inst)
+ {
+ return inst->valueOf(exec);
+ }
+
+};
+
+struct QtPixmapMetaData {
+ QtPixmapToDataUrlMethod toDataUrlMethod;
+ QtPixmapCreateElementMethod createElementMethod;
+ QtPixmapToStringMethod toStringMethod;
+ QtPixmapHeightField heightField;
+ QtPixmapWidthField widthField;
+ QtPixmapClass cls;
+} qt_pixmap_metaData;
+
+// Derived RuntimeObject
+class QtPixmapRuntimeObjectImp : public RuntimeObjectImp {
+public:
+ QtPixmapRuntimeObjectImp(ExecState*, PassRefPtr<Instance>);
+
+ static const ClassInfo s_info;
+
+ static PassRefPtr<Structure> createStructure(JSValue prototype)
+ {
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
+ }
+
+protected:
+ static const unsigned StructureFlags = RuntimeObjectImp::StructureFlags | OverridesMarkChildren;
+
+private:
+ virtual const ClassInfo* classInfo() const { return &s_info; }
+};
+
+QtPixmapRuntimeObjectImp::QtPixmapRuntimeObjectImp(ExecState* exec, PassRefPtr<Instance> instance)
+ : RuntimeObjectImp(exec, WebCore::deprecatedGetDOMStructure<QtPixmapRuntimeObjectImp>(exec), instance)
+{
+}
+
+const ClassInfo QtPixmapRuntimeObjectImp::s_info = { "QtPixmapRuntimeObject", &RuntimeObjectImp::s_info, 0, 0 };
+
+
+QtPixmapClass::QtPixmapClass()
+{
+}
+
+
+Class* QtPixmapInstance::getClass() const
+{
+ return &qt_pixmap_metaData.cls;
+}
+
+JSValue QtPixmapInstance::invokeMethod(ExecState* exec, const MethodList& methods, const ArgList& args)
+{
+ if (methods.size() == 1) {
+ QtPixmapRuntimeMethod* mtd = static_cast<QtPixmapRuntimeMethod*>(methods[0]);
+ return mtd->invoke(exec, data, rootObject(), this);
+ }
+ return jsUndefined();
+}
+
+MethodList QtPixmapClass::methodsNamed(const Identifier& identifier, Instance*) const
+{
+ MethodList methods;
+ if (identifier == QtPixmapToDataUrlMethod::name())
+ methods.append(&qt_pixmap_metaData.toDataUrlMethod);
+ else if (identifier == QtPixmapCreateElementMethod::name())
+ methods.append(&qt_pixmap_metaData.createElementMethod);
+ else if (identifier == QtPixmapToStringMethod::name())
+ methods.append(&qt_pixmap_metaData.toStringMethod);
+ return methods;
+}
+
+Field* QtPixmapClass::fieldNamed(const Identifier& identifier, Instance*) const
+{
+ if (identifier == QtPixmapWidthField::name())
+ return &qt_pixmap_metaData.widthField;
+ if (identifier == QtPixmapHeightField::name())
+ return &qt_pixmap_metaData.heightField;
+ return 0;
+}
+
+void QtPixmapInstance::getPropertyNames(ExecState*exec, PropertyNameArray& arr)
+{
+ arr.add(Identifier(exec, UString(QtPixmapToDataUrlMethod::name())));
+ arr.add(Identifier(exec, UString(QtPixmapCreateElementMethod::name())));
+ arr.add(Identifier(exec, UString(QtPixmapToStringMethod::name())));
+ arr.add(Identifier(exec, UString(QtPixmapWidthField::name())));
+ arr.add(Identifier(exec, UString(QtPixmapHeightField::name())));
+}
+
+JSValue QtPixmapInstance::defaultValue(ExecState* exec, PreferredPrimitiveType ptype) const
+{
+ if (ptype == PreferNumber) {
+ return jsBoolean(
+ (data.type() == static_cast<QVariant::Type>(qMetaTypeId<QImage>()) && !(data.value<QImage>()).isNull())
+ || (data.type() == static_cast<QVariant::Type>(qMetaTypeId<QPixmap>()) && !data.value<QPixmap>().isNull()));
+ }
+ if (ptype == PreferString)
+ return valueOf(exec);
+ return jsUndefined();
+}
+
+JSValue QtPixmapInstance::valueOf(ExecState* exec) const
+{
+ const QString toStr = QString("[Qt Native Pixmap %1,%2]").arg(width()).arg(height());
+ UString ustring((UChar*)toStr.utf16(), toStr.length());
+ return jsString(exec, ustring);
+}
+
+QtPixmapInstance::QtPixmapInstance(PassRefPtr<RootObject> rootObj, const QVariant& d)
+ :Instance(rootObj), data(d)
+{
+}
+
+int QtPixmapInstance::width() const
+{
+ if (data.type() == static_cast<QVariant::Type>(qMetaTypeId<QPixmap>()))
+ return data.value<QPixmap>().width();
+ if (data.type() == static_cast<QVariant::Type>(qMetaTypeId<QImage>()))
+ return data.value<QImage>().width();
+ return 0;
+}
+
+int QtPixmapInstance::height() const
+{
+ if (data.type() == static_cast<QVariant::Type>(qMetaTypeId<QPixmap>()))
+ return data.value<QPixmap>().height();
+ if (data.type() == static_cast<QVariant::Type>(qMetaTypeId<QImage>()))
+ return data.value<QImage>().height();
+ return 0;
+}
+
+QPixmap QtPixmapInstance::toPixmap()
+{
+ if (data.type() == static_cast<QVariant::Type>(qMetaTypeId<QPixmap>()))
+ return data.value<QPixmap>();
+ if (data.type() == static_cast<QVariant::Type>(qMetaTypeId<QImage>())) {
+ const QPixmap pxm = QPixmap::fromImage(data.value<QImage>());
+ data = QVariant::fromValue<QPixmap>(pxm);
+ return pxm;
+ }
+ return QPixmap();
+
+}
+
+QImage QtPixmapInstance::toImage()
+{
+ if (data.type() == static_cast<QVariant::Type>(qMetaTypeId<QImage>()))
+ return data.value<QImage>();
+ if (data.type() == static_cast<QVariant::Type>(qMetaTypeId<QPixmap>())) {
+ const QImage img = data.value<QPixmap>().toImage();
+ data = QVariant::fromValue<QImage>(img);
+ return img;
+ }
+ return QImage();
+}
+
+QVariant QtPixmapInstance::variantFromObject(JSObject* object, QMetaType::Type hint)
+{
+ if (!object) {
+ if (hint == qMetaTypeId<QPixmap>())
+ return QVariant::fromValue<QPixmap>(QPixmap());
+ if (hint == qMetaTypeId<QImage>())
+ return QVariant::fromValue<QImage>(QImage());
+ } else if (object->inherits(&JSHTMLImageElement::s_info)) {
+ JSHTMLImageElement* el = static_cast<JSHTMLImageElement*>(object);
+ HTMLImageElement* imageElement = static_cast<HTMLImageElement*>(el->impl());
+ if (imageElement) {
+ CachedImage* cImg = imageElement->cachedImage();
+ if (cImg) {
+ Image* img = cImg->image();
+ if (img) {
+ QPixmap* pxm = img->nativeImageForCurrentFrame();
+ if (pxm) {
+ return (hint == static_cast<QMetaType::Type>(qMetaTypeId<QPixmap>()))
+ ? QVariant::fromValue<QPixmap>(*pxm)
+ : QVariant::fromValue<QImage>(pxm->toImage());
+ }
+ }
+ }
+ }
+ } else if (object->inherits(&QtPixmapRuntimeObjectImp::s_info)) {
+ QtPixmapRuntimeObjectImp* imp = static_cast<QtPixmapRuntimeObjectImp*>(object);
+ QtPixmapInstance* inst = static_cast<QtPixmapInstance*>(imp->getInternalInstance());
+ if (inst) {
+ if (hint == qMetaTypeId<QPixmap >())
+ return QVariant::fromValue<QPixmap>(inst->toPixmap());
+ if (hint == qMetaTypeId<QImage>())
+ return QVariant::fromValue<QImage>(inst->toImage());
+ }
+ }
+ return 0;
+}
+JSObject* QtPixmapInstance::createRuntimeObject(ExecState* exec, PassRefPtr<RootObject> root, const QVariant& data)
+{
+ JSLock lock(SilenceAssertionsOnly);
+ return new(exec) QtPixmapRuntimeObjectImp(exec, new QtPixmapInstance(root, data));
+}
+
+bool QtPixmapInstance::canHandle(QMetaType::Type hint)
+{
+ return hint == qMetaTypeId<QImage>() || hint == qMetaTypeId<QPixmap>();
+}
+
+}
+
+}
diff --git a/WebCore/bridge/qt/qt_pixmapruntime.h b/WebCore/bridge/qt/qt_pixmapruntime.h
new file mode 100644
index 0000000..5455298
--- /dev/null
+++ b/WebCore/bridge/qt/qt_pixmapruntime.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef qt_pixmapruntime_h
+#define qt_pixmapruntime_h
+
+#include "Bridge.h"
+#include <QVariant>
+
+namespace JSC {
+
+namespace Bindings {
+
+class QtPixmapInstance : public Instance {
+ QVariant data;
+public:
+ QtPixmapInstance(PassRefPtr<RootObject> rootObj, const QVariant& newData);
+ virtual Class* getClass() const;
+ virtual JSValue invokeMethod(ExecState*, const MethodList&, const ArgList& args);
+ virtual void getPropertyNames(ExecState*, PropertyNameArray&);
+
+ virtual JSValue defaultValue(ExecState*, PreferredPrimitiveType) const;
+ virtual JSValue valueOf(ExecState* exec) const;
+ int width() const;
+ int height() const;
+ QPixmap toPixmap();
+ QImage toImage();
+ static JSObject* createRuntimeObject(ExecState*, PassRefPtr<RootObject>, const QVariant&);
+ static QVariant variantFromObject(JSObject*, QMetaType::Type hint);
+ static bool canHandle(QMetaType::Type hint);
+};
+
+}
+
+}
+#endif
diff --git a/WebCore/bridge/qt/qt_runtime.cpp b/WebCore/bridge/qt/qt_runtime.cpp
index c711baa..9601a4a 100644
--- a/WebCore/bridge/qt/qt_runtime.cpp
+++ b/WebCore/bridge/qt/qt_runtime.cpp
@@ -43,6 +43,7 @@
#include "qobject.h"
#include "qstringlist.h"
#include "qt_instance.h"
+#include "qt_pixmapruntime.h"
#include "qvarlengtharray.h"
#include <JSFunction.h>
#include <limits.h>
@@ -304,7 +305,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
return QString();
} else {
UString ustring = value.toString(exec);
- ret = QVariant(QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()));
+ ret = QVariant(QString((const QChar*)ustring.rep()->data(), ustring.size()));
if (type == String)
dist = 0;
else
@@ -328,7 +329,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
QVariant v = convertValueToQVariant(exec, val, QMetaType::Void, &objdist, visitedObjects);
if (objdist >= 0) {
UString ustring = (*it).ustring();
- QString id = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString id = QString((const QChar*)ustring.rep()->data(), ustring.size());
result.insert(id, v);
}
}
@@ -403,7 +404,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
for (int i = 0; i < len; ++i) {
JSValue val = rtarray->getConcreteArray()->valueAt(exec, i);
UString ustring = val.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
result.append(qstring);
}
@@ -417,7 +418,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
for (int i = 0; i < len; ++i) {
JSValue val = array->get(exec, i);
UString ustring = val.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
result.append(qstring);
}
@@ -426,7 +427,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
} else {
// Make a single length array
UString ustring = value.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
QStringList result;
result.append(qstring);
ret = QVariant(result);
@@ -442,7 +443,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
dist = 0;
} else {
UString ustring = value.toString(exec);
- ret = QVariant(QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()).toLatin1());
+ ret = QVariant(QString((const QChar*)ustring.rep()->data(), ustring.size()).toLatin1());
if (type == String)
dist = 5;
else
@@ -484,7 +485,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
}
} else if (type == String) {
UString ustring = value.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
if (hint == QMetaType::QDateTime) {
QDateTime dt = QDateTime::fromString(qstring, Qt::ISODate);
@@ -533,7 +534,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
*/
// Attempt to convert.. a bit risky
UString ustring = value.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
// this is of the form '/xxxxxx/i'
int firstSlash = qstring.indexOf(QLatin1Char('/'));
@@ -553,7 +554,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
}
} else if (type == String) {
UString ustring = value.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
QRegExp re(qstring);
if (re.isValid()) {
@@ -719,6 +720,8 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
}
}
break;
+ } else if (QtPixmapInstance::canHandle(static_cast<QMetaType::Type>(hint))) {
+ ret = QtPixmapInstance::variantFromObject(object, static_cast<QMetaType::Type>(hint));
} else if (hint == (QMetaType::Type) qMetaTypeId<QVariant>()) {
if (value.isUndefinedOrNull()) {
if (distance)
@@ -848,6 +851,9 @@ JSValue convertQVariantToValue(ExecState* exec, PassRefPtr<RootObject> root, con
return QtInstance::getQtInstance(obj, root, QScriptEngine::QtOwnership)->createRuntimeObject(exec);
}
+ if (QtPixmapInstance::canHandle(static_cast<QMetaType::Type>(variant.type())))
+ return QtPixmapInstance::createRuntimeObject(exec, root, variant);
+
if (type == QMetaType::QVariantMap) {
// create a new object, and stuff properties into it
JSObject* ret = constructEmptyObject(exec);
@@ -1394,6 +1400,43 @@ bool QtRuntimeMetaMethod::getOwnPropertySlot(ExecState* exec, const Identifier&
return QtRuntimeMethod::getOwnPropertySlot(exec, propertyName, slot);
}
+bool QtRuntimeMetaMethod::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ if (propertyName == "connect") {
+ PropertySlot slot;
+ slot.setCustom(this, connectGetter);
+ descriptor.setDescriptor(slot.getValue(exec, propertyName), DontDelete | ReadOnly | DontEnum);
+ return true;
+ }
+
+ if (propertyName == "disconnect") {
+ PropertySlot slot;
+ slot.setCustom(this, disconnectGetter);
+ descriptor.setDescriptor(slot.getValue(exec, propertyName), DontDelete | ReadOnly | DontEnum);
+ return true;
+ }
+
+ if (propertyName == exec->propertyNames().length) {
+ PropertySlot slot;
+ slot.setCustom(this, lengthGetter);
+ descriptor.setDescriptor(slot.getValue(exec, propertyName), DontDelete | ReadOnly | DontEnum);
+ return true;
+ }
+
+ return QtRuntimeMethod::getOwnPropertyDescriptor(exec, propertyName, descriptor);
+}
+
+void QtRuntimeMetaMethod::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
+{
+ if (mode == IncludeDontEnumProperties) {
+ propertyNames.add(Identifier(exec, "connect"));
+ propertyNames.add(Identifier(exec, "disconnect"));
+ propertyNames.add(exec->propertyNames().length);
+ }
+
+ QtRuntimeMethod::getOwnPropertyNames(exec, propertyNames, mode);
+}
+
JSValue QtRuntimeMetaMethod::lengthGetter(ExecState* exec, const Identifier&, const PropertySlot&)
{
// QtScript always returns 0
@@ -1580,6 +1623,26 @@ bool QtRuntimeConnectionMethod::getOwnPropertySlot(ExecState* exec, const Identi
return QtRuntimeMethod::getOwnPropertySlot(exec, propertyName, slot);
}
+bool QtRuntimeConnectionMethod::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ if (propertyName == exec->propertyNames().length) {
+ PropertySlot slot;
+ slot.setCustom(this, lengthGetter);
+ descriptor.setDescriptor(slot.getValue(exec, propertyName), DontDelete | ReadOnly | DontEnum);
+ return true;
+ }
+
+ return QtRuntimeMethod::getOwnPropertyDescriptor(exec, propertyName, descriptor);
+}
+
+void QtRuntimeConnectionMethod::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
+{
+ if (mode == IncludeDontEnumProperties)
+ propertyNames.add(exec->propertyNames().length);
+
+ QtRuntimeMethod::getOwnPropertyNames(exec, propertyNames, mode);
+}
+
JSValue QtRuntimeConnectionMethod::lengthGetter(ExecState* exec, const Identifier&, const PropertySlot&)
{
// we have one formal argument, and one optional
diff --git a/WebCore/bridge/qt/qt_runtime.h b/WebCore/bridge/qt/qt_runtime.h
index d9450eb..c3fa8b4 100644
--- a/WebCore/bridge/qt/qt_runtime.h
+++ b/WebCore/bridge/qt/qt_runtime.h
@@ -151,11 +151,11 @@ public:
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
- static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags | OverridesMarkChildren;
+ static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesGetPropertyNames | InternalFunction::StructureFlags | OverridesMarkChildren;
QtRuntimeMethodData *d_func() const {return d_ptr;}
QtRuntimeMethod(QtRuntimeMethodData *dd, ExecState *exec, const Identifier &n, PassRefPtr<QtInstance> inst);
@@ -168,6 +168,8 @@ public:
QtRuntimeMetaMethod(ExecState *exec, const Identifier &n, PassRefPtr<QtInstance> inst, int index, const QByteArray& signature, bool allowPrivate);
virtual bool getOwnPropertySlot(ExecState *, const Identifier&, PropertySlot&);
+ virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
+ virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
virtual void markChildren(MarkStack& markStack);
@@ -189,6 +191,8 @@ public:
QtRuntimeConnectionMethod(ExecState *exec, const Identifier &n, bool isConnect, PassRefPtr<QtInstance> inst, int index, const QByteArray& signature );
virtual bool getOwnPropertySlot(ExecState *, const Identifier&, PropertySlot&);
+ virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
+ virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
protected:
QtRuntimeConnectionMethodData* d_func() const {return reinterpret_cast<QtRuntimeConnectionMethodData*>(d_ptr);}
diff --git a/WebCore/bridge/runtime_array.cpp b/WebCore/bridge/runtime_array.cpp
index feadb07..9e8da85 100644
--- a/WebCore/bridge/runtime_array.cpp
+++ b/WebCore/bridge/runtime_array.cpp
@@ -28,6 +28,7 @@
#include <runtime/ArrayPrototype.h>
#include <runtime/Error.h>
+#include <runtime/PropertyNameArray.h>
#include "JSDOMBinding.h"
using namespace WebCore;
@@ -56,6 +57,18 @@ JSValue RuntimeArray::indexGetter(ExecState* exec, const Identifier&, const Prop
return thisObj->getConcreteArray()->valueAt(exec, slot.index());
}
+void RuntimeArray::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
+{
+ unsigned length = getLength();
+ for (unsigned i = 0; i < length; ++i)
+ propertyNames.add(Identifier::from(exec, i));
+
+ if (mode == IncludeDontEnumProperties)
+ propertyNames.add(exec->propertyNames().length);
+
+ JSObject::getOwnPropertyNames(exec, propertyNames, mode);
+}
+
bool RuntimeArray::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
if (propertyName == exec->propertyNames().length) {
diff --git a/WebCore/bridge/runtime_array.h b/WebCore/bridge/runtime_array.h
index eeaa337..6c6cacd 100644
--- a/WebCore/bridge/runtime_array.h
+++ b/WebCore/bridge/runtime_array.h
@@ -34,7 +34,8 @@ namespace JSC {
class RuntimeArray : public JSObject {
public:
RuntimeArray(ExecState*, Bindings::Array*);
-
+
+ virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
virtual bool getOwnPropertySlot(ExecState *, const Identifier&, PropertySlot&);
virtual bool getOwnPropertySlot(ExecState *, unsigned, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState *, const Identifier&, PropertyDescriptor&);
@@ -59,7 +60,7 @@ public:
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
private:
diff --git a/WebCore/bridge/runtime_method.h b/WebCore/bridge/runtime_method.h
index 148be32..914ab00 100644
--- a/WebCore/bridge/runtime_method.h
+++ b/WebCore/bridge/runtime_method.h
@@ -47,7 +47,7 @@ public:
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
private:
diff --git a/WebCore/bridge/runtime_object.cpp b/WebCore/bridge/runtime_object.cpp
index 9583fb2..26b85f9 100644
--- a/WebCore/bridge/runtime_object.cpp
+++ b/WebCore/bridge/runtime_object.cpp
@@ -302,7 +302,7 @@ ConstructType RuntimeObjectImp::getConstructData(ConstructData& constructData)
return ConstructTypeHost;
}
-void RuntimeObjectImp::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
+void RuntimeObjectImp::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode)
{
if (!m_instance) {
throwInvalidAccessError(exec);
@@ -316,11 +316,6 @@ void RuntimeObjectImp::getPropertyNames(ExecState* exec, PropertyNameArray& prop
instance->end();
}
-void RuntimeObjectImp::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
-{
- getOwnPropertyNames(exec, propertyNames);
-}
-
JSObject* RuntimeObjectImp::throwInvalidAccessError(ExecState* exec)
{
return throwError(exec, ReferenceError, "Trying to access object from destroyed plug-in.");
diff --git a/WebCore/bridge/runtime_object.h b/WebCore/bridge/runtime_object.h
index 7d658fa..ef5a2f7 100644
--- a/WebCore/bridge/runtime_object.h
+++ b/WebCore/bridge/runtime_object.h
@@ -44,8 +44,7 @@ public:
virtual CallType getCallData(CallData&);
virtual ConstructType getConstructData(ConstructData&);
- virtual void getPropertyNames(ExecState*, PropertyNameArray&);
- virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&);
+ virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
void invalidate();
@@ -62,7 +61,7 @@ public:
static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
protected:
diff --git a/WebCore/config.h b/WebCore/config.h
index 6fa1f40..b8f3a05 100644
--- a/WebCore/config.h
+++ b/WebCore/config.h
@@ -25,7 +25,7 @@
#include <wtf/Platform.h>
-#if PLATFORM(WIN_OS) && !defined(BUILDING_WX__) && !COMPILER(GCC)
+#if OS(WINDOWS) && !defined(BUILDING_WX__) && !COMPILER(GCC)
#if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF)
#define JS_EXPORTDATA __declspec(dllexport)
#else
@@ -36,8 +36,10 @@
#else
#define WEBKIT_EXPORTDATA __declspec(dllimport)
#endif
+#define JS_EXPORTCLASS JS_EXPORTDATA
#else
#define JS_EXPORTDATA
+#define JS_EXPORTCLASS
#define WEBKIT_EXPORTDATA
#endif
@@ -47,7 +49,7 @@
#define HAVE_FUNC_USLEEP 1
#endif /* __APPLE__ */
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0500
@@ -73,7 +75,7 @@
#endif
#endif
-#endif /* PLATFORM(WIN_OS) */
+#endif /* OS(WINDOWS) */
// ANDROID def should be after all PLATFORM to avoid override.
#if PLATFORM(ANDROID)
@@ -109,6 +111,7 @@
#endif
#define ENABLE_XBL 0
+#define ENABLE_XHTMLMP 0
#define ENABLE_XPATH 0
#define ENABLE_XSLT 0
#undef ENABLE_ARCHIVE // Enabled by default in Platform.h
@@ -264,7 +267,7 @@
#define WTF_USE_NEW_THEME 1
#endif // PLATFORM(MAC)
-#if PLATFORM(SYMBIAN)
+#if OS(SYMBIAN)
#undef WIN32
#undef _WIN32
#undef SKIP_STATIC_CONSTRUCTORS_ON_GCC
@@ -282,10 +285,10 @@
#if PLATFORM(CHROMIUM)
-#if !PLATFORM(DARWIN)
+#if !OS(DARWIN)
// Define SKIA on non-Mac.
#define WTF_PLATFORM_SKIA 1
-#endif /* !PLATFORM(DARWIN) */
+#endif /* !OS(DARWIN) */
// Chromium uses this file instead of JavaScriptCore/config.h to compile
// JavaScriptCore/wtf (chromium doesn't compile the rest of JSC). Therefore,
diff --git a/WebCore/css/CSSCharsetRule.idl b/WebCore/css/CSSCharsetRule.idl
index db0333a..2b158ff 100644
--- a/WebCore/css/CSSCharsetRule.idl
+++ b/WebCore/css/CSSCharsetRule.idl
@@ -21,11 +21,7 @@
module css {
// Introduced in DOM Level 2:
- interface [
- GenerateConstructor,
- InterfaceUUID=94180bad-a74e-4df9-adbc-6ce4e5b96155,
- ImplementationUUID=354aa39e-ad53-4e9a-a927-80c3966c47f2
- ] CSSCharsetRule : CSSRule {
+ interface CSSCharsetRule : CSSRule {
#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
readonly attribute [ConvertNullStringTo=Null] DOMString encoding;
#else
diff --git a/WebCore/css/CSSComputedStyleDeclaration.cpp b/WebCore/css/CSSComputedStyleDeclaration.cpp
index ce43cd6..7ed9385 100644
--- a/WebCore/css/CSSComputedStyleDeclaration.cpp
+++ b/WebCore/css/CSSComputedStyleDeclaration.cpp
@@ -265,7 +265,7 @@ static const int computedProperties[] = {
CSSPropertyWritingMode,
CSSPropertyGlyphOrientationHorizontal,
CSSPropertyGlyphOrientationVertical,
- CSSPropertyWebkitShadow
+ CSSPropertyWebkitSvgShadow
#endif
#ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
,
@@ -926,8 +926,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
// for how high to be in pixels does include things like minimum font size and the zoom factor.
// On the other hand, since font-size doesn't include the zoom factor, we really can't do
// that here either.
- // The line height returned is rounded to the nearest integer.
- return CSSPrimitiveValue::create(length.calcMinValue(style->fontDescription().specifiedSize(), true), CSSPrimitiveValue::CSS_PX);
+ return CSSPrimitiveValue::create(static_cast<int>(length.percent() * style->fontDescription().specifiedSize()) / 100, CSSPrimitiveValue::CSS_PX);
return CSSPrimitiveValue::create(length.value(), CSSPrimitiveValue::CSS_PX);
}
case CSSPropertyListStyleImage:
diff --git a/WebCore/css/CSSFontFace.cpp b/WebCore/css/CSSFontFace.cpp
index 4d8da59..70cd9bb 100644
--- a/WebCore/css/CSSFontFace.cpp
+++ b/WebCore/css/CSSFontFace.cpp
@@ -77,8 +77,11 @@ void CSSFontFace::addSource(CSSFontFaceSource* source)
source->setFontFace(this);
}
-void CSSFontFace::fontLoaded(CSSFontFaceSource*)
+void CSSFontFace::fontLoaded(CSSFontFaceSource* source)
{
+ if (source != m_activeSource)
+ return;
+
// FIXME: Can we assert that m_segmentedFontFaces is not empty? That may
// require stopping in-progress font loading when the last
// CSSSegmentedFontFace is removed.
@@ -97,17 +100,22 @@ void CSSFontFace::fontLoaded(CSSFontFaceSource*)
SimpleFontData* CSSFontFace::getFontData(const FontDescription& fontDescription, bool syntheticBold, bool syntheticItalic)
{
+ m_activeSource = 0;
if (!isValid())
return 0;
-
+
ASSERT(!m_segmentedFontFaces.isEmpty());
CSSFontSelector* fontSelector = (*m_segmentedFontFaces.begin())->fontSelector();
- SimpleFontData* result = 0;
- unsigned size = m_sources.size();
- for (unsigned i = 0; i < size && !result; i++)
- result = m_sources[i]->getFontData(fontDescription, syntheticBold, syntheticItalic, fontSelector);
- return result;
+ size_t size = m_sources.size();
+ for (size_t i = 0; i < size; ++i) {
+ if (SimpleFontData* result = m_sources[i]->getFontData(fontDescription, syntheticBold, syntheticItalic, fontSelector)) {
+ m_activeSource = m_sources[i];
+ return result;
+ }
+ }
+
+ return 0;
}
}
diff --git a/WebCore/css/CSSFontFace.h b/WebCore/css/CSSFontFace.h
index 41c9c55..4e2fee5 100644
--- a/WebCore/css/CSSFontFace.h
+++ b/WebCore/css/CSSFontFace.h
@@ -82,6 +82,7 @@ public:
private:
CSSFontFace(FontTraitsMask traitsMask)
: m_traitsMask(traitsMask)
+ , m_activeSource(0)
{
}
@@ -89,6 +90,7 @@ private:
Vector<UnicodeRange> m_ranges;
HashSet<CSSSegmentedFontFace*> m_segmentedFontFaces;
Vector<CSSFontFaceSource*> m_sources;
+ CSSFontFaceSource* m_activeSource;
};
}
diff --git a/WebCore/css/CSSFontFaceRule.idl b/WebCore/css/CSSFontFaceRule.idl
index 514c7dd..bd38a61 100644
--- a/WebCore/css/CSSFontFaceRule.idl
+++ b/WebCore/css/CSSFontFaceRule.idl
@@ -21,11 +21,7 @@
module css {
// Introduced in DOM Level 2:
- interface [
- GenerateConstructor,
- InterfaceUUID=8afa4b1a-39fe-49fb-be6d-4d56e81d9b4a,
- ImplementationUUID=5a7971d9-5aad-4ed7-be67-3a1644560256
- ] CSSFontFaceRule : CSSRule {
+ interface CSSFontFaceRule : CSSRule {
readonly attribute CSSStyleDeclaration style;
};
diff --git a/WebCore/css/CSSGrammar.y b/WebCore/css/CSSGrammar.y
index 22e3aaf..9d5eb6e 100644
--- a/WebCore/css/CSSGrammar.y
+++ b/WebCore/css/CSSGrammar.y
@@ -97,7 +97,7 @@ static int cssyylex(YYSTYPE* yylval, void* parser)
%}
-%expect 48
+%expect 54
%nonassoc LOWEST_PREC
@@ -386,7 +386,9 @@ valid_rule:
;
rule:
- valid_rule
+ valid_rule {
+ static_cast<CSSParser*>(parser)->m_hadSyntacticallyValidCSSRule = true;
+ }
| invalid_rule
| invalid_at
;
@@ -1107,11 +1109,11 @@ pseudo:
}
}
// used by :nth-*(ax+b)
- | ':' FUNCTION NTH ')' {
+ | ':' FUNCTION maybe_space NTH maybe_space ')' {
CSSParser *p = static_cast<CSSParser*>(parser);
$$ = p->createFloatingSelector();
$$->m_match = CSSSelector::PseudoClass;
- $$->setArgument($3);
+ $$->setArgument($4);
$$->m_value = $2;
CSSSelector::PseudoType type = $$->pseudoType();
if (type == CSSSelector::PseudoUnknown)
@@ -1125,11 +1127,11 @@ pseudo:
}
}
// used by :nth-*
- | ':' FUNCTION INTEGER ')' {
+ | ':' FUNCTION maybe_space INTEGER maybe_space ')' {
CSSParser *p = static_cast<CSSParser*>(parser);
$$ = p->createFloatingSelector();
$$->m_match = CSSSelector::PseudoClass;
- $$->setArgument(String::number($3));
+ $$->setArgument(String::number($4));
$$->m_value = $2;
CSSSelector::PseudoType type = $$->pseudoType();
if (type == CSSSelector::PseudoUnknown)
@@ -1143,11 +1145,11 @@ pseudo:
}
}
// used by :nth-*(odd/even) and :lang
- | ':' FUNCTION IDENT ')' {
+ | ':' FUNCTION maybe_space IDENT maybe_space ')' {
CSSParser *p = static_cast<CSSParser*>(parser);
$$ = p->createFloatingSelector();
$$->m_match = CSSSelector::PseudoClass;
- $$->setArgument($3);
+ $$->setArgument($4);
$2.lower();
$$->m_value = $2;
CSSSelector::PseudoType type = $$->pseudoType();
@@ -1206,6 +1208,9 @@ decl_list:
declaration ';' maybe_space {
$$ = $1;
}
+ | declaration invalid_block_list maybe_space {
+ $$ = false;
+ }
| declaration invalid_block_list ';' maybe_space {
$$ = false;
}
@@ -1323,6 +1328,12 @@ expr:
$$->addValue(p->sinkFloatingValue($3));
}
}
+ | expr invalid_block_list {
+ $$ = 0;
+ }
+ | expr invalid_block_list error {
+ $$ = 0;
+ }
| expr error {
$$ = 0;
}
@@ -1477,8 +1488,12 @@ invalid_rule:
;
invalid_block:
- '{' error invalid_block_list error closing_brace
- | '{' error closing_brace
+ '{' error invalid_block_list error closing_brace {
+ static_cast<CSSParser*>(parser)->invalidBlockHit();
+ }
+ | '{' error closing_brace {
+ static_cast<CSSParser*>(parser)->invalidBlockHit();
+ }
;
invalid_block_list:
diff --git a/WebCore/css/CSSImportRule.cpp b/WebCore/css/CSSImportRule.cpp
index 8534adf..7ad5456 100644
--- a/WebCore/css/CSSImportRule.cpp
+++ b/WebCore/css/CSSImportRule.cpp
@@ -25,6 +25,7 @@
#include "CachedCSSStyleSheet.h"
#include "DocLoader.h"
#include "Document.h"
+#include "SecurityOrigin.h"
#include "Settings.h"
#include <wtf/StdLibExtras.h>
@@ -53,22 +54,41 @@ CSSImportRule::~CSSImportRule()
m_cachedSheet->removeClient(this);
}
-void CSSImportRule::setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet* sheet)
+void CSSImportRule::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet)
{
if (m_styleSheet)
m_styleSheet->setParent(0);
- m_styleSheet = CSSStyleSheet::create(this, url, charset);
+ m_styleSheet = CSSStyleSheet::create(this, href, baseURL, charset);
+ bool crossOriginCSS = false;
+ bool validMIMEType = false;
CSSStyleSheet* parent = parentStyleSheet();
bool strict = !parent || parent->useStrictParsing();
- String sheetText = sheet->sheetText(strict);
+ bool enforceMIMEType = strict;
+ bool needsSiteSpecificQuirks = parent && parent->doc() && parent->doc()->settings() && parent->doc()->settings()->needsSiteSpecificQuirks();
+
+#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
+ if (enforceMIMEType && needsSiteSpecificQuirks) {
+ // Covers both http and https, with or without "www."
+ if (baseURL.string().contains("mcafee.com/japan/", false))
+ enforceMIMEType = false;
+ }
+#endif
+
+ String sheetText = sheet->sheetText(enforceMIMEType, &validMIMEType);
m_styleSheet->parseString(sheetText, strict);
- if (strict && parent && parent->doc() && parent->doc()->settings() && parent->doc()->settings()->needsSiteSpecificQuirks()) {
+ if (!parent || !parent->doc() || !parent->doc()->securityOrigin()->canRequest(baseURL))
+ crossOriginCSS = true;
+
+ if (crossOriginCSS && !validMIMEType && !m_styleSheet->hasSyntacticallyValidCSSHeader())
+ m_styleSheet = CSSStyleSheet::create(this, href, baseURL, charset);
+
+ if (strict && needsSiteSpecificQuirks) {
// Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>.
DEFINE_STATIC_LOCAL(const String, slashKHTMLFixesDotCss, ("/KHTMLFixes.css"));
DEFINE_STATIC_LOCAL(const String, mediaWikiKHTMLFixesStyleSheet, ("/* KHTML fix stylesheet */\n/* work around the horizontal scrollbars */\n#column-content { margin-left: 0; }\n\n"));
- if (url.endsWith(slashKHTMLFixesDotCss) && sheetText == mediaWikiKHTMLFixesStyleSheet) {
+ if (baseURL.string().endsWith(slashKHTMLFixesDotCss) && sheetText == mediaWikiKHTMLFixesStyleSheet) {
ASSERT(m_styleSheet->length() == 1);
ExceptionCode ec;
m_styleSheet->deleteRule(0, ec);
@@ -97,15 +117,16 @@ void CSSImportRule::insertedIntoParent()
return;
String absHref = m_strHref;
- if (!parentSheet->href().isNull())
+ if (!parentSheet->putativeBaseURL().isNull())
// use parent styleheet's URL as the base URL
- absHref = KURL(KURL(ParsedURLString, parentSheet->href()), m_strHref).string();
+ absHref = KURL(parentSheet->putativeBaseURL(), m_strHref).string();
// Check for a cycle in our import chain. If we encounter a stylesheet
// in our parent chain with the same URL, then just bail.
StyleBase* root = this;
for (StyleBase* curr = parent(); curr; curr = curr->parent()) {
- if (curr->isCSSStyleSheet() && absHref == static_cast<CSSStyleSheet*>(curr)->href())
+ // FIXME: This is wrong if the putativeBaseURL was updated via document::updateBaseURL.
+ if (curr->isCSSStyleSheet() && absHref == static_cast<CSSStyleSheet*>(curr)->putativeBaseURL().string())
return;
root = curr;
}
diff --git a/WebCore/css/CSSImportRule.h b/WebCore/css/CSSImportRule.h
index c58088c..943d53e 100644
--- a/WebCore/css/CSSImportRule.h
+++ b/WebCore/css/CSSImportRule.h
@@ -63,7 +63,7 @@ private:
virtual unsigned short type() const { return IMPORT_RULE; }
// from CachedResourceClient
- virtual void setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet*);
+ virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet*);
#ifdef ANDROID_INSTRUMENT
// Overridden to resolve the ambiguous
diff --git a/WebCore/css/CSSImportRule.idl b/WebCore/css/CSSImportRule.idl
index 454553e..8e60905 100644
--- a/WebCore/css/CSSImportRule.idl
+++ b/WebCore/css/CSSImportRule.idl
@@ -21,11 +21,7 @@
module css {
// Introduced in DOM Level 2:
- interface [
- GenerateConstructor,
- InterfaceUUID=8f60b3a2-ebf0-484d-a714-47a9974a6a9e,
- ImplementationUUID=437ea93c-68e5-4897-85fe-e161653801eb
- ] CSSImportRule : CSSRule {
+ interface CSSImportRule : CSSRule {
readonly attribute [ConvertNullStringTo=Null] DOMString href;
readonly attribute stylesheets::MediaList media;
readonly attribute CSSStyleSheet styleSheet;
diff --git a/WebCore/css/CSSMediaRule.idl b/WebCore/css/CSSMediaRule.idl
index 1347171..813bd70 100644
--- a/WebCore/css/CSSMediaRule.idl
+++ b/WebCore/css/CSSMediaRule.idl
@@ -21,11 +21,7 @@
module css {
// Introduced in DOM Level 2:
- interface [
- GenerateConstructor,
- InterfaceUUID=9c623c09-2677-4d28-ba90-826da0ae316a,
- ImplementationUUID=30493ec9-e139-4e9e-ae24-cc8f532006d9
- ] CSSMediaRule : CSSRule {
+ interface CSSMediaRule : CSSRule {
readonly attribute stylesheets::MediaList media;
readonly attribute CSSRuleList cssRules;
diff --git a/WebCore/css/CSSMutableStyleDeclaration.cpp b/WebCore/css/CSSMutableStyleDeclaration.cpp
index b86be05..31c7507 100644
--- a/WebCore/css/CSSMutableStyleDeclaration.cpp
+++ b/WebCore/css/CSSMutableStyleDeclaration.cpp
@@ -313,7 +313,7 @@ String CSSMutableStyleDeclaration::getLayeredShorthandValue(const int* propertie
RefPtr<CSSValue> value;
if (values[j]) {
if (values[j]->isValueList())
- value = static_cast<CSSValueList*>(values[j].get())->itemWithoutBoundsCheck(i);
+ value = static_cast<CSSValueList*>(values[j].get())->item(i);
else {
value = values[j];
diff --git a/WebCore/css/CSSPageRule.idl b/WebCore/css/CSSPageRule.idl
index 3ad570e..6b50b6d 100644
--- a/WebCore/css/CSSPageRule.idl
+++ b/WebCore/css/CSSPageRule.idl
@@ -21,11 +21,7 @@
module css {
// Introduced in DOM Level 2:
- interface [
- GenerateConstructor,
- InterfaceUUID=4e8d9d26-65ca-483f-a6d4-be1a25905056,
- ImplementationUUID=d8e40379-8b0e-4dce-b1f8-636dcf055a5f
- ] CSSPageRule : CSSRule {
+ interface CSSPageRule : CSSRule {
attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString selectorText
setter raises(DOMException);
diff --git a/WebCore/css/CSSParser.cpp b/WebCore/css/CSSParser.cpp
index 19d82ee..e6ff1f0 100644
--- a/WebCore/css/CSSParser.cpp
+++ b/WebCore/css/CSSParser.cpp
@@ -143,6 +143,7 @@ CSSParser::CSSParser(bool strictParsing)
, m_currentShorthand(0)
, m_implicitShorthand(false)
, m_hasFontFaceOnlyValues(false)
+ , m_hadSyntacticallyValidCSSRule(false)
, m_defaultNamespace(starAtom)
, m_data(0)
, yy_start(1)
@@ -739,10 +740,8 @@ bool CSSParser::parseValue(int propId, bool important)
break;
case CSSPropertyListStyleType:
- // disc | circle | square | decimal | decimal-leading-zero | lower-roman |
- // upper-roman | lower-greek | lower-alpha | lower-latin | upper-alpha |
- // upper-latin | hebrew | armenian | georgian | cjk-ideographic | hiragana |
- // katakana | hiragana-iroha | katakana-iroha | none | inherit
+ // See section CSS_PROP_LIST_STYLE_TYPE of file CSSValueKeywords.in
+ // for the list of supported list-style-types.
if ((id >= CSSValueDisc && id <= CSSValueKatakanaIroha) || id == CSSValueNone)
valid_primitive = true;
break;
@@ -3829,8 +3828,8 @@ bool CSSParser::parseShadow(int propId, bool important)
// value. Treat as invalid.
return false;
#if ENABLE(SVG)
- // -webkit-shadow does not support multiple values.
- if (static_cast<CSSPropertyID>(propId) == CSSPropertyWebkitShadow)
+ // -webkit-svg-shadow does not support multiple values.
+ if (static_cast<CSSPropertyID>(propId) == CSSPropertyWebkitSvgShadow)
return false;
#endif
// The value is good. Commit it.
@@ -5299,6 +5298,12 @@ WebKitCSSKeyframeRule* CSSParser::createKeyframeRule(CSSParserValueList* keys)
return keyframePtr;
}
+void CSSParser::invalidBlockHit()
+{
+ if (m_styleSheet && !m_hadSyntacticallyValidCSSRule)
+ m_styleSheet->setHasSyntacticallyValidCSSHeader(false);
+}
+
static int cssPropertyID(const UChar* propertyName, unsigned length)
{
if (!length)
diff --git a/WebCore/css/CSSParser.h b/WebCore/css/CSSParser.h
index d032886..3922a2a 100644
--- a/WebCore/css/CSSParser.h
+++ b/WebCore/css/CSSParser.h
@@ -193,6 +193,7 @@ namespace WebCore {
bool addVariableDeclarationBlock(const CSSParserString&);
bool checkForVariables(CSSParserValueList*);
void addUnresolvedProperty(int propId, bool important);
+ void invalidBlockHit();
Vector<CSSSelector*>* reusableSelectorVector() { return &m_reusableSelectorVector; }
@@ -214,6 +215,7 @@ namespace WebCore {
bool m_implicitShorthand;
bool m_hasFontFaceOnlyValues;
+ bool m_hadSyntacticallyValidCSSRule;
Vector<String> m_variableNames;
Vector<RefPtr<CSSValue> > m_variableValues;
diff --git a/WebCore/css/CSSPrimitiveValue.cpp b/WebCore/css/CSSPrimitiveValue.cpp
index d2286bb..1f2c9ca 100644
--- a/WebCore/css/CSSPrimitiveValue.cpp
+++ b/WebCore/css/CSSPrimitiveValue.cpp
@@ -34,8 +34,6 @@
#include "Rect.h"
#include "RenderStyle.h"
#include <wtf/ASCIICType.h>
-#include <wtf/MathExtras.h>
-#include <wtf/StringExtras.h>
#include <wtf/StdLibExtras.h>
#if ENABLE(DASHBOARD_SUPPORT)
@@ -686,71 +684,6 @@ int CSSPrimitiveValue::getIdent()
return m_value.ident;
}
-static void appendCSSDouble(Vector<UChar>& vector, double value)
-{
- // From the CSS specification section titled "Integers and real numbers",
- // real numbers are only formatted as [sign] [digits] "." [digits].
- // This differs from printf-style formatting in that exponents (e.g. 1.3e06)
- // are not allowed. Since NaN/inf are also not valid CSS values this
- // function doesn't handle them.
-
- // For compatibility with what was returned by older versions of
- // WebKit, we target 6 digits of precision.
- const int digitsAfterDecimalPoint = 6;
- long long rounded = llround(fabs(value) * 1000000.0);
- if (rounded == 0) {
- vector.append('0');
- return;
- }
-
- char buf[24];
- int length = snprintf(buf, sizeof(buf), "%lld", rounded);
- int decimalPoint = length - digitsAfterDecimalPoint;
-
- // We are matching printf("%g")'s behavior and must trim trailing zeros,
- // regardless of whether they're significant.
- while (length > 0 && length > decimalPoint && buf[length - 1] == '0')
- length--;
-
- // Reserve an estimate of space for the number of digits we anticipate
- // along with a minus sign/initial zero/decimal point.
- vector.reserveCapacity(vector.size() + 3 + length);
-
- if (value < 0)
- vector.append('-');
-
- if (decimalPoint <= 0) {
- // Only digits after the decimal point.
- vector.append('0');
- vector.append('.');
- for (int i = decimalPoint; i < 0; i++)
- vector.append('0');
- for (int i = 0; i < length; i++)
- vector.append(buf[i]);
- } else if (length <= decimalPoint) {
- // Only digits before the decimal point.
- for (int i = 0; i < length; i++)
- vector.append(buf[i]);
- } else {
- // Digits before and after the decimal point.
- for (int i = 0; i < decimalPoint; i++)
- vector.append(buf[i]);
- vector.append('.');
- for (int i = decimalPoint; i < length; i++)
- vector.append(buf[i]);
- }
-}
-
-static String formatWithUnits(double value, const char* units)
-{
- Vector<UChar> result;
- appendCSSDouble(result, value);
- result.reserveCapacity(result.size() + strlen(units));
- for (int i = 0; units[i]; i++)
- result.append(units[i]);
- return String::adopt(result);
-}
-
String CSSPrimitiveValue::cssText() const
{
// FIXME: return the original value instead of a generated one (e.g. color
@@ -762,61 +695,61 @@ String CSSPrimitiveValue::cssText() const
break;
case CSS_NUMBER:
case CSS_PARSER_INTEGER:
- text = formatWithUnits(m_value.num, "");
+ text = String::number(m_value.num);
break;
case CSS_PERCENTAGE:
- text = formatWithUnits(m_value.num, "%");
+ text = String::format("%.6lg%%", m_value.num);
break;
case CSS_EMS:
- text = formatWithUnits(m_value.num, "em");
+ text = String::format("%.6lgem", m_value.num);
break;
case CSS_EXS:
- text = formatWithUnits(m_value.num, "ex");
+ text = String::format("%.6lgex", m_value.num);
break;
case CSS_REMS:
- text = formatWithUnits(m_value.num, "rem");
+ text = String::format("%.6lgrem", m_value.num);
break;
case CSS_PX:
- text = formatWithUnits(m_value.num, "px");
+ text = String::format("%.6lgpx", m_value.num);
break;
case CSS_CM:
- text = formatWithUnits(m_value.num, "cm");
+ text = String::format("%.6lgcm", m_value.num);
break;
case CSS_MM:
- text = formatWithUnits(m_value.num, "mm");
+ text = String::format("%.6lgmm", m_value.num);
break;
case CSS_IN:
- text = formatWithUnits(m_value.num, "in");
+ text = String::format("%.6lgin", m_value.num);
break;
case CSS_PT:
- text = formatWithUnits(m_value.num, "pt");
+ text = String::format("%.6lgpt", m_value.num);
break;
case CSS_PC:
- text = formatWithUnits(m_value.num, "pc");
+ text = String::format("%.6lgpc", m_value.num);
break;
case CSS_DEG:
- text = formatWithUnits(m_value.num, "deg");
+ text = String::format("%.6lgdeg", m_value.num);
break;
case CSS_RAD:
- text = formatWithUnits(m_value.num, "rad");
+ text = String::format("%.6lgrad", m_value.num);
break;
case CSS_GRAD:
- text = formatWithUnits(m_value.num, "grad");
+ text = String::format("%.6lggrad", m_value.num);
break;
case CSS_MS:
- text = formatWithUnits(m_value.num, "ms");
+ text = String::format("%.6lgms", m_value.num);
break;
case CSS_S:
- text = formatWithUnits(m_value.num, "s");
+ text = String::format("%.6lgs", m_value.num);
break;
case CSS_HZ:
- text = formatWithUnits(m_value.num, "hz");
+ text = String::format("%.6lghz", m_value.num);
break;
case CSS_KHZ:
- text = formatWithUnits(m_value.num, "khz");
+ text = String::format("%.6lgkhz", m_value.num);
break;
case CSS_TURN:
- text = formatWithUnits(m_value.num, "turn");
+ text = String::format("%.6lgturn", m_value.num);
break;
case CSS_DIMENSION:
// FIXME
diff --git a/WebCore/css/CSSPrimitiveValue.idl b/WebCore/css/CSSPrimitiveValue.idl
index befe5ac..8580664 100644
--- a/WebCore/css/CSSPrimitiveValue.idl
+++ b/WebCore/css/CSSPrimitiveValue.idl
@@ -19,11 +19,7 @@
module css {
- interface [
- GenerateConstructor,
- InterfaceUUID=a286b0cb-4ff0-4482-aa6e-7c5fb39afaba,
- ImplementationUUID=c310c84d-480f-4bbb-9187-28e00956ac47
- ] CSSPrimitiveValue : CSSValue {
+ interface CSSPrimitiveValue : CSSValue {
// UnitTypes
const unsigned short CSS_UNKNOWN = 0;
@@ -69,11 +65,8 @@ module css {
raises(DOMException);
Rect getRectValue()
raises(DOMException);
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
RGBColor getRGBColorValue()
raises(DOMException);
-#endif
-
};
}
diff --git a/WebCore/css/CSSPrimitiveValueMappings.h b/WebCore/css/CSSPrimitiveValueMappings.h
index 3c6097b..f920898 100644
--- a/WebCore/css/CSSPrimitiveValueMappings.h
+++ b/WebCore/css/CSSPrimitiveValueMappings.h
@@ -198,6 +198,9 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ControlPart e)
case DefaultButtonPart:
m_value.ident = CSSValueDefaultButton;
break;
+ case InnerSpinButtonPart:
+ m_value.ident = CSSValueInnerSpinButton;
+ break;
case ListboxPart:
m_value.ident = CSSValueListbox;
break;
@@ -269,6 +272,9 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ControlPart e)
case MenulistTextFieldPart:
m_value.ident = CSSValueMenulistTextfield;
break;
+ case OuterSpinButtonPart:
+ m_value.ident = CSSValueOuterSpinButton;
+ break;
case SliderHorizontalPart:
m_value.ident = CSSValueSliderHorizontal;
break;
@@ -930,69 +936,171 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStyleType e)
: m_type(CSS_IDENT)
{
switch (e) {
- case LNONE:
- m_value.ident = CSSValueNone;
- break;
- case DISC:
- m_value.ident = CSSValueDisc;
- break;
- case CIRCLE:
- m_value.ident = CSSValueCircle;
- break;
- case SQUARE:
- m_value.ident = CSSValueSquare;
- break;
- case LDECIMAL:
- m_value.ident = CSSValueDecimal;
- break;
- case DECIMAL_LEADING_ZERO:
- m_value.ident = CSSValueDecimalLeadingZero;
- break;
- case LOWER_ROMAN:
- m_value.ident = CSSValueLowerRoman;
- break;
- case UPPER_ROMAN:
- m_value.ident = CSSValueUpperRoman;
- break;
- case LOWER_GREEK:
- m_value.ident = CSSValueLowerGreek;
- break;
- case LOWER_ALPHA:
- m_value.ident = CSSValueLowerAlpha;
- break;
- case LOWER_LATIN:
- m_value.ident = CSSValueLowerLatin;
- break;
- case UPPER_ALPHA:
- m_value.ident = CSSValueUpperAlpha;
- break;
- case UPPER_LATIN:
- m_value.ident = CSSValueUpperLatin;
- break;
- case HEBREW:
- m_value.ident = CSSValueHebrew;
- break;
- case ARMENIAN:
- m_value.ident = CSSValueArmenian;
- break;
- case GEORGIAN:
- m_value.ident = CSSValueGeorgian;
- break;
- case CJK_IDEOGRAPHIC:
- m_value.ident = CSSValueCjkIdeographic;
- break;
- case HIRAGANA:
- m_value.ident = CSSValueHiragana;
- break;
- case KATAKANA:
- m_value.ident = CSSValueKatakana;
- break;
- case HIRAGANA_IROHA:
- m_value.ident = CSSValueHiraganaIroha;
- break;
- case KATAKANA_IROHA:
- m_value.ident = CSSValueKatakanaIroha;
- break;
+ case Afar:
+ m_value.ident = CSSValueAfar;
+ break;
+ case Amharic:
+ m_value.ident = CSSValueAmharic;
+ break;
+ case AmharicAbegede:
+ m_value.ident = CSSValueAmharicAbegede;
+ break;
+ case Armenian:
+ m_value.ident = CSSValueArmenian;
+ break;
+ case Circle:
+ m_value.ident = CSSValueCircle;
+ break;
+ case CjkEarthlyBranch:
+ m_value.ident = CSSValueCjkEarthlyBranch;
+ break;
+ case CjkHeavenlyStem:
+ m_value.ident = CSSValueCjkHeavenlyStem;
+ break;
+ case CJKIdeographic:
+ m_value.ident = CSSValueCjkIdeographic;
+ break;
+ case DecimalLeadingZero:
+ m_value.ident = CSSValueDecimalLeadingZero;
+ break;
+ case DecimalListStyle:
+ m_value.ident = CSSValueDecimal;
+ break;
+ case Disc:
+ m_value.ident = CSSValueDisc;
+ break;
+ case Ethiopic:
+ m_value.ident = CSSValueEthiopic;
+ break;
+ case EthiopicAbegede:
+ m_value.ident = CSSValueEthiopicAbegede;
+ break;
+ case EthiopicAbegedeAmEt:
+ m_value.ident = CSSValueEthiopicAbegedeAmEt;
+ break;
+ case EthiopicAbegedeGez:
+ m_value.ident = CSSValueEthiopicAbegedeGez;
+ break;
+ case EthiopicAbegedeTiEr:
+ m_value.ident = CSSValueEthiopicAbegedeTiEr;
+ break;
+ case EthiopicAbegedeTiEt:
+ m_value.ident = CSSValueEthiopicAbegedeTiEt;
+ break;
+ case EthiopicHalehameAaEr:
+ m_value.ident = CSSValueEthiopicHalehameAaEr;
+ break;
+ case EthiopicHalehameAaEt:
+ m_value.ident = CSSValueEthiopicHalehameAaEt;
+ break;
+ case EthiopicHalehameAmEt:
+ m_value.ident = CSSValueEthiopicHalehameAmEt;
+ break;
+ case EthiopicHalehameGez:
+ m_value.ident = CSSValueEthiopicHalehameGez;
+ break;
+ case EthiopicHalehameOmEt:
+ m_value.ident = CSSValueEthiopicHalehameOmEt;
+ break;
+ case EthiopicHalehameSidEt:
+ m_value.ident = CSSValueEthiopicHalehameSidEt;
+ break;
+ case EthiopicHalehameSoEt:
+ m_value.ident = CSSValueEthiopicHalehameSoEt;
+ break;
+ case EthiopicHalehameTiEr:
+ m_value.ident = CSSValueEthiopicHalehameTiEr;
+ break;
+ case EthiopicHalehameTiEt:
+ m_value.ident = CSSValueEthiopicHalehameTiEt;
+ break;
+ case EthiopicHalehameTig:
+ m_value.ident = CSSValueEthiopicHalehameTig;
+ break;
+ case Georgian:
+ m_value.ident = CSSValueGeorgian;
+ break;
+ case Hangul:
+ m_value.ident = CSSValueHangul;
+ break;
+ case HangulConsonant:
+ m_value.ident = CSSValueHangulConsonant;
+ break;
+ case Hebrew:
+ m_value.ident = CSSValueHebrew;
+ break;
+ case Hiragana:
+ m_value.ident = CSSValueHiragana;
+ break;
+ case HiraganaIroha:
+ m_value.ident = CSSValueHiraganaIroha;
+ break;
+ case Katakana:
+ m_value.ident = CSSValueKatakana;
+ break;
+ case KatakanaIroha:
+ m_value.ident = CSSValueKatakanaIroha;
+ break;
+ case LowerAlpha:
+ m_value.ident = CSSValueLowerAlpha;
+ break;
+ case LowerGreek:
+ m_value.ident = CSSValueLowerGreek;
+ break;
+ case LowerLatin:
+ m_value.ident = CSSValueLowerLatin;
+ break;
+ case LowerNorwegian:
+ m_value.ident = CSSValueLowerNorwegian;
+ break;
+ case LowerRoman:
+ m_value.ident = CSSValueLowerRoman;
+ break;
+ case NoneListStyle:
+ m_value.ident = CSSValueNone;
+ break;
+ case Oromo:
+ m_value.ident = CSSValueOromo;
+ break;
+ case Sidama:
+ m_value.ident = CSSValueSidama;
+ break;
+ case Somali:
+ m_value.ident = CSSValueSomali;
+ break;
+ case Square:
+ m_value.ident = CSSValueSquare;
+ break;
+ case Tigre:
+ m_value.ident = CSSValueTigre;
+ break;
+ case TigrinyaEr:
+ m_value.ident = CSSValueTigrinyaEr;
+ break;
+ case TigrinyaErAbegede:
+ m_value.ident = CSSValueTigrinyaErAbegede;
+ break;
+ case TigrinyaEt:
+ m_value.ident = CSSValueTigrinyaEt;
+ break;
+ case TigrinyaEtAbegede:
+ m_value.ident = CSSValueTigrinyaEtAbegede;
+ break;
+ case UpperAlpha:
+ m_value.ident = CSSValueUpperAlpha;
+ break;
+ case UpperGreek:
+ m_value.ident = CSSValueUpperGreek;
+ break;
+ case UpperLatin:
+ m_value.ident = CSSValueUpperLatin;
+ break;
+ case UpperNorwegian:
+ m_value.ident = CSSValueUpperNorwegian;
+ break;
+ case UpperRoman:
+ m_value.ident = CSSValueUpperRoman;
+ break;
}
}
@@ -1000,7 +1108,7 @@ template<> inline CSSPrimitiveValue::operator EListStyleType() const
{
switch (m_value.ident) {
case CSSValueNone:
- return LNONE;
+ return NoneListStyle;
default:
return static_cast<EListStyleType>(m_value.ident - CSSValueDisc);
}
diff --git a/WebCore/css/CSSRule.idl b/WebCore/css/CSSRule.idl
index bc57e55..eaf1335 100644
--- a/WebCore/css/CSSRule.idl
+++ b/WebCore/css/CSSRule.idl
@@ -23,10 +23,7 @@ module css {
// Introduced in DOM Level 2:
interface [
CustomToJS,
- GenerateConstructor,
- Polymorphic,
- InterfaceUUID=548139b4-31ab-4978-b1d5-cfcfdfbaea0e,
- ImplementationUUID=0268e673-2489-4743-9a3a-197dae4b4d9c
+ Polymorphic
] CSSRule {
// RuleType
diff --git a/WebCore/css/CSSRuleList.idl b/WebCore/css/CSSRuleList.idl
index 9add078..e253287 100644
--- a/WebCore/css/CSSRuleList.idl
+++ b/WebCore/css/CSSRuleList.idl
@@ -28,10 +28,7 @@ module css {
// Introduced in DOM Level 2:
interface [
CustomMarkFunction,
- GenerateConstructor,
- HasIndexGetter,
- InterfaceUUID=64c346a0-1e34-49d3-9472-57ec8e0fdccb,
- ImplementationUUID=971a28e0-d0da-4570-9b71-e39fc2cf9a1b
+ HasIndexGetter
] CSSRuleList {
readonly attribute unsigned long length;
CSSRule item(in unsigned long index);
diff --git a/WebCore/css/CSSSelector.cpp b/WebCore/css/CSSSelector.cpp
index ab2d22b..9ae9b9f 100644
--- a/WebCore/css/CSSSelector.cpp
+++ b/WebCore/css/CSSSelector.cpp
@@ -99,6 +99,7 @@ void CSSSelector::extractPseudoType() const
DEFINE_STATIC_LOCAL(AtomicString, focus, ("focus"));
DEFINE_STATIC_LOCAL(AtomicString, hover, ("hover"));
DEFINE_STATIC_LOCAL(AtomicString, indeterminate, ("indeterminate"));
+ DEFINE_STATIC_LOCAL(AtomicString, innerSpinButton, ("-webkit-inner-spin-button"));
#if ENABLE(DATALIST)
DEFINE_STATIC_LOCAL(AtomicString, inputListButton, ("-webkit-input-list-button"));
#endif
@@ -127,6 +128,7 @@ void CSSSelector::extractPseudoType() const
DEFINE_STATIC_LOCAL(AtomicString, onlyChild, ("only-child"));
DEFINE_STATIC_LOCAL(AtomicString, onlyOfType, ("only-of-type"));
DEFINE_STATIC_LOCAL(AtomicString, optional, ("optional"));
+ DEFINE_STATIC_LOCAL(AtomicString, outerSpinButton, ("-webkit-outer-spin-button"));
DEFINE_STATIC_LOCAL(AtomicString, required, ("required"));
DEFINE_STATIC_LOCAL(AtomicString, resizer, ("-webkit-resizer"));
DEFINE_STATIC_LOCAL(AtomicString, root, ("root"));
@@ -235,7 +237,10 @@ void CSSSelector::extractPseudoType() const
m_pseudoType = PseudoHover;
else if (m_value == indeterminate)
m_pseudoType = PseudoIndeterminate;
- else if (m_value == link)
+ else if (m_value == innerSpinButton) {
+ m_pseudoType = PseudoInnerSpinButton;
+ element = true;
+ } else if (m_value == link)
m_pseudoType = PseudoLink;
else if (m_value == lang)
m_pseudoType = PseudoLang;
@@ -297,7 +302,10 @@ void CSSSelector::extractPseudoType() const
m_pseudoType = PseudoNthLastChild;
else if (m_value == nthLastOfType)
m_pseudoType = PseudoNthLastOfType;
- else if (m_value == root)
+ else if (m_value == outerSpinButton) {
+ m_pseudoType = PseudoOuterSpinButton;
+ element = true;
+ } else if (m_value == root)
m_pseudoType = PseudoRoot;
else if (m_value == windowInactive)
m_pseudoType = PseudoWindowInactive;
diff --git a/WebCore/css/CSSSelector.h b/WebCore/css/CSSSelector.h
index 95a72e4..70f2574 100644
--- a/WebCore/css/CSSSelector.h
+++ b/WebCore/css/CSSSelector.h
@@ -183,7 +183,9 @@ namespace WebCore {
PseudoMediaControlsReturnToRealtimeButton,
PseudoMediaControlsStatusDisplay,
PseudoMediaControlsFullscreenButton,
- PseudoInputListButton
+ PseudoInputListButton,
+ PseudoInnerSpinButton,
+ PseudoOuterSpinButton,
};
PseudoType pseudoType() const
diff --git a/WebCore/css/CSSStyleDeclaration.idl b/WebCore/css/CSSStyleDeclaration.idl
index 42682ef..297b732 100644
--- a/WebCore/css/CSSStyleDeclaration.idl
+++ b/WebCore/css/CSSStyleDeclaration.idl
@@ -23,12 +23,9 @@ module css {
// Introduced in DOM Level 2:
interface [
CustomMarkFunction,
- GenerateConstructor,
DelegatingPutFunction,
HasNameGetter,
- HasIndexGetter,
- InterfaceUUID=9989b2c3-a2b6-449b-abf9-c60d2260b1d7,
- ImplementationUUID=985c50c7-9f19-436a-9e45-c0aa02996d0e
+ HasIndexGetter
] CSSStyleDeclaration {
attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString cssText
setter raises(DOMException);
diff --git a/WebCore/css/CSSStyleRule.idl b/WebCore/css/CSSStyleRule.idl
index 0240dd0..862acd8 100644
--- a/WebCore/css/CSSStyleRule.idl
+++ b/WebCore/css/CSSStyleRule.idl
@@ -21,11 +21,7 @@
module css {
// Introduced in DOM Level 2:
- interface [
- GenerateConstructor,
- InterfaceUUID=ce4e3330-c40b-4430-8ed4-030ab4ddbc93,
- ImplementationUUID=c3d2f1b8-3970-4b36-882e-ce7f5668d8e2
- ] CSSStyleRule : CSSRule {
+ interface CSSStyleRule : CSSRule {
attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString selectorText
setter raises(DOMException);
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index b3f5d72..8f00d2a 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -361,9 +361,9 @@ public:
void addToRuleSet(AtomicStringImpl* key, AtomRuleMap& map,
CSSStyleRule* rule, CSSSelector* sel);
- 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* getIDRules(AtomicStringImpl* key) { m_idRules.checkConsistency(); return m_idRules.get(key); }
+ CSSRuleDataList* getClassRules(AtomicStringImpl* key) { m_classRules.checkConsistency(); return m_classRules.get(key); }
+ CSSRuleDataList* getTagRules(AtomicStringImpl* key) { m_tagRules.checkConsistency(); return m_tagRules.get(key); }
CSSRuleDataList* getUniversalRules() { return m_universalRules; }
public:
@@ -414,7 +414,7 @@ CSSStyleSelector::CSSStyleSelector(Document* doc, StyleSheetList* styleSheets, C
, m_fontSelector(CSSFontSelector::create(doc))
{
init();
-
+
m_matchAuthorAndUserStyles = matchAuthorAndUserStyles;
Element* root = doc->documentElement();
@@ -441,7 +441,7 @@ CSSStyleSelector::CSSStyleSelector(Document* doc, StyleSheetList* styleSheets, C
m_medium = new MediaQueryEvaluator("all");
if (root)
- m_rootDefaultStyle = styleForElement(root, 0, false, true); // dont ref, because the RenderStyle is allocated from global heap
+ 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;
@@ -463,7 +463,7 @@ CSSStyleSelector::CSSStyleSelector(Document* doc, StyleSheetList* styleSheets, C
// add stylesheets from document
m_authorStyle = new CSSRuleSet();
- // Add rules from elments like SVG's <font-face>
+ // Add rules from elements like SVG's <font-face>
if (mappedElementSheet)
m_authorStyle->addRulesFromSheet(mappedElementSheet, *m_medium, this);
@@ -473,6 +473,9 @@ CSSStyleSelector::CSSStyleSelector(Document* doc, StyleSheetList* styleSheets, C
if (sheet->isCSSStyleSheet() && !sheet->disabled())
m_authorStyle->addRulesFromSheet(static_cast<CSSStyleSheet*>(sheet), *m_medium, this);
}
+
+ if (doc->renderer() && doc->renderer()->style())
+ doc->renderer()->style()->font().update(fontSelector());
}
// This is a simplified style setting function for keyframe styles
@@ -759,7 +762,7 @@ void CSSStyleSelector::sortMatchedRules(unsigned start, unsigned end)
return;
}
- // Peform a merge sort for larger lists.
+ // Perform a merge sort for larger lists.
unsigned mid = (start + end) / 2;
sortMatchedRules(start, mid);
sortMatchedRules(mid, end);
@@ -1001,9 +1004,15 @@ bool CSSStyleSelector::canShareStyleWithElement(Node* n)
if (s->isDefaultButtonForForm() != m_element->isDefaultButtonForForm())
return false;
-
- if ((s->willValidate() && s->isValidFormControlElement()) !=
- (m_element->willValidate() && m_element->isValidFormControlElement()))
+
+ if (!m_element->document()->containsValidityStyleRules())
+ return false;
+
+ bool willValidate = s->willValidate();
+ if (willValidate != m_element->willValidate())
+ return false;
+
+ if (willValidate && (s->isValidFormControlElement() != m_element->isValidFormControlElement()))
return false;
}
@@ -1089,6 +1098,38 @@ void CSSStyleSelector::matchUARules(int& firstUARule, int& lastUARule)
}
}
+PassRefPtr<RenderStyle> CSSStyleSelector::styleForDocument(Document* document)
+{
+ RefPtr<RenderStyle> documentStyle = RenderStyle::create();
+ documentStyle->setDisplay(BLOCK);
+ documentStyle->setVisuallyOrdered(document->visuallyOrdered());
+ documentStyle->setZoom(document->frame()->pageZoomFactor());
+
+ FontDescription fontDescription;
+ fontDescription.setUsePrinterFont(document->printing());
+ if (Settings* settings = document->settings()) {
+ fontDescription.setRenderingMode(settings->fontRenderingMode());
+ if (document->printing() && !settings->shouldPrintBackgrounds())
+ documentStyle->setForceBackgroundsToWhite(true);
+ const AtomicString& stdfont = settings->standardFontFamily();
+ if (!stdfont.isEmpty()) {
+ fontDescription.firstFamily().setFamily(stdfont);
+ fontDescription.firstFamily().appendFamily(0);
+ }
+ fontDescription.setKeywordSize(CSSValueMedium - CSSValueXxSmall + 1);
+ int size = CSSStyleSelector::fontSizeForKeyword(document, CSSValueMedium, false);
+ fontDescription.setSpecifiedSize(size);
+ fontDescription.setComputedSize(CSSStyleSelector::getComputedSizeFromSpecifiedSize(document, fontDescription.isAbsoluteSize(), size, documentStyle->effectiveZoom()));
+ }
+
+ documentStyle->setFontDescription(fontDescription);
+ documentStyle->font().update(0);
+ if (document->inCompatMode())
+ documentStyle->setHtmlHacks(true); // enable html specific rendering tricks
+
+ return documentStyle.release();
+}
+
// If resolveForRootDefault is true, style based on user agent style sheet only. This is used in media queries, where
// relative units are interpreted according to document root element style, styled only with UA stylesheet
@@ -1295,7 +1336,9 @@ void CSSStyleSelector::keyframeStylesForAnimation(Element* e, const RenderStyle*
// Get the keyframesRule for this name
if (!e || list.animationName().isEmpty())
return;
-
+
+ m_keyframesRuleMap.checkConsistency();
+
if (!m_keyframesRuleMap.contains(list.animationName().impl()))
return;
@@ -2407,11 +2450,17 @@ bool CSSStyleSelector::SelectorChecker::checkOneSelector(CSSSelector* sel, Eleme
return e && e->isOptionalFormControl();
case CSSSelector::PseudoRequired:
return e && e->isRequiredFormControl();
- case CSSSelector::PseudoValid:
- return e && e->willValidate() && e->isValidFormControlElement();
- case CSSSelector::PseudoInvalid:
- return e && e->willValidate() && !e->isValidFormControlElement();
- case CSSSelector::PseudoChecked: {
+ case CSSSelector::PseudoValid: {
+ if (!e)
+ return false;
+ e->document()->setContainsValidityStyleRules();
+ return e->willValidate() && e->isValidFormControlElement();
+ } case CSSSelector::PseudoInvalid: {
+ if (!e)
+ return false;
+ e->document()->setContainsValidityStyleRules();
+ return e->willValidate() && !e->isValidFormControlElement();
+ } case CSSSelector::PseudoChecked: {
if (!e || !e->isFormControlElement())
break;
// Even though WinIE allows checked and indeterminate to co-exist, the CSS selector spec says that
@@ -2584,6 +2633,12 @@ bool CSSStyleSelector::SelectorChecker::checkOneSelector(CSSSelector* sel, Eleme
case CSSSelector::PseudoResizer:
dynamicPseudo = RESIZER;
return true;
+ case CSSSelector::PseudoInnerSpinButton:
+ dynamicPseudo = INNER_SPIN_BUTTON;
+ return true;
+ case CSSSelector::PseudoOuterSpinButton:
+ dynamicPseudo = OUTER_SPIN_BUTTON;
+ return true;
case CSSSelector::PseudoUnknown:
case CSSSelector::PseudoNotParsed:
default:
@@ -2865,7 +2920,7 @@ void CSSStyleSelector::applyDeclarations(bool applyFirst, bool isImportant,
case CSSPropertyFontVariant:
case CSSPropertyZoom:
// these have to be applied first, because other properties use the computed
- // values of these porperties.
+ // values of these properties.
first = true;
break;
default:
@@ -3030,7 +3085,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
#if ENABLE(WCSS)
if (primitiveValue) {
if (primitiveValue->getIdent() == CSSValueWapMarquee) {
- // Initialize Wap Marquee style
+ // Initialize WAP Marquee style
m_style->setOverflowX(OMARQUEE);
m_style->setOverflowY(OMARQUEE);
m_style->setWhiteSpace(NOWRAP);
@@ -3879,7 +3934,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
if (m_parentNode)
fontDescription.setKeywordSize(m_parentStyle->fontDescription().keywordSize());
} else if (isInitial) {
- size = fontSizeForKeyword(CSSValueMedium, m_style->htmlHacks(), fontDescription.useFixedDefaultSize());
+ size = fontSizeForKeyword(m_checker.m_document, CSSValueMedium, fontDescription.useFixedDefaultSize());
fontDescription.setKeywordSize(CSSValueMedium - CSSValueXxSmall + 1);
} else if (primitiveValue->getIdent()) {
// Keywords are being used.
@@ -3892,7 +3947,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
case CSSValueXLarge:
case CSSValueXxLarge:
case CSSValueWebkitXxxLarge:
- size = fontSizeForKeyword(primitiveValue->getIdent(), m_style->htmlHacks(), fontDescription.useFixedDefaultSize());
+ size = fontSizeForKeyword(m_checker.m_document, primitiveValue->getIdent(), fontDescription.useFixedDefaultSize());
fontDescription.setKeywordSize(primitiveValue->getIdent() - CSSValueXxSmall + 1);
break;
case CSSValueLarger:
@@ -4141,7 +4196,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
// We need to adjust the size to account for the generic family change from monospace
// to non-monospace.
if (fontDescription.keywordSize() && fontDescription.useFixedDefaultSize())
- setFontSize(fontDescription, fontSizeForKeyword(CSSValueXxSmall + fontDescription.keywordSize() - 1, m_style->htmlHacks(), false));
+ setFontSize(fontDescription, fontSizeForKeyword(m_checker.m_document, CSSValueXxSmall + fontDescription.keywordSize() - 1, false));
fontDescription.setGenericFamily(initialDesc.genericFamily());
if (!initialDesc.firstFamily().familyIsEmpty())
fontDescription.setFamily(initialDesc.firstFamily());
@@ -4218,7 +4273,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
// If currFamily is non-zero then we set at least one family on this description.
if (currFamily) {
if (fontDescription.keywordSize() && fontDescription.useFixedDefaultSize() != oldFamilyUsedFixedDefaultSize)
- setFontSize(fontDescription, fontSizeForKeyword(CSSValueXxSmall + fontDescription.keywordSize() - 1, m_style->htmlHacks(), !oldFamilyUsedFixedDefaultSize));
+ setFontSize(fontDescription, fontSizeForKeyword(m_checker.m_document, CSSValueXxSmall + fontDescription.keywordSize() - 1, !oldFamilyUsedFixedDefaultSize));
if (m_style->setFontDescription(fontDescription))
m_fontDirty = true;
@@ -4438,7 +4493,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
fontDescription.firstFamily().appendFamily(0);
}
fontDescription.setKeywordSize(CSSValueMedium - CSSValueXxSmall + 1);
- setFontSize(fontDescription, fontSizeForKeyword(CSSValueMedium, m_style->htmlHacks(), false));
+ setFontSize(fontDescription, fontSizeForKeyword(m_checker.m_document, CSSValueMedium, false));
m_style->setLineHeight(RenderStyle::initialLineHeight());
m_lineHeightValue = 0;
if (m_style->setFontDescription(fontDescription))
@@ -4461,7 +4516,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
fontDescription.setUsePrinterFont(m_checker.m_document->printing());
// Handle the zoom factor.
- fontDescription.setComputedSize(getComputedSizeFromSpecifiedSize(fontDescription.isAbsoluteSize(), fontDescription.specifiedSize()));
+ fontDescription.setComputedSize(getComputedSizeFromSpecifiedSize(m_checker.m_document, fontDescription.isAbsoluteSize(), fontDescription.specifiedSize(), m_style->effectiveZoom()));
if (m_style->setFontDescription(fontDescription))
m_fontDirty = true;
}
@@ -5794,7 +5849,7 @@ void CSSStyleSelector::checkForGenericFamilyChange(RenderStyle* style, RenderSty
// multiplying by our scale factor.
float size;
if (childFont.keywordSize())
- size = fontSizeForKeyword(CSSValueXxSmall + childFont.keywordSize() - 1, style->htmlHacks(), childFont.useFixedDefaultSize());
+ size = fontSizeForKeyword(m_checker.m_document, CSSValueXxSmall + childFont.keywordSize() - 1, childFont.useFixedDefaultSize());
else {
Settings* settings = m_checker.m_document->settings();
float fixedScaleFactor = settings
@@ -5813,10 +5868,10 @@ void CSSStyleSelector::checkForGenericFamilyChange(RenderStyle* style, RenderSty
void CSSStyleSelector::setFontSize(FontDescription& fontDescription, float size)
{
fontDescription.setSpecifiedSize(size);
- fontDescription.setComputedSize(getComputedSizeFromSpecifiedSize(fontDescription.isAbsoluteSize(), size));
+ fontDescription.setComputedSize(getComputedSizeFromSpecifiedSize(m_checker.m_document, fontDescription.isAbsoluteSize(), size, m_style->effectiveZoom()));
}
-float CSSStyleSelector::getComputedSizeFromSpecifiedSize(bool isAbsoluteSize, float specifiedSize)
+float CSSStyleSelector::getComputedSizeFromSpecifiedSize(Document* document, bool isAbsoluteSize, float specifiedSize, float zoomFactor)
{
// We support two types of minimum font size. The first is a hard override that applies to
// all fonts. This is "minSize." The second type of minimum font size is a "smart minimum"
@@ -5828,16 +5883,15 @@ float CSSStyleSelector::getComputedSizeFromSpecifiedSize(bool isAbsoluteSize, fl
// However we always allow the page to set an explicit pixel size that is smaller,
// since sites will mis-render otherwise (e.g., http://www.gamespot.com with a 9px minimum).
- Settings* settings = m_checker.m_document->settings();
+ Settings* settings = document->settings();
if (!settings)
return 1.0f;
int minSize = settings->minimumFontSize();
int minLogicalSize = settings->minimumLogicalFontSize();
- float zoomFactor = m_style->effectiveZoom();
- if (m_checker.m_document->frame() && m_checker.m_document->frame()->shouldApplyTextZoom())
- zoomFactor *= m_checker.m_document->frame()->textZoomFactor();
+ if (document->frame() && document->frame()->shouldApplyTextZoom())
+ zoomFactor *= document->frame()->textZoomFactor();
float zoomedSize = specifiedSize * zoomFactor;
@@ -5899,12 +5953,13 @@ static const int strictFontSizeTable[fontSizeTableMax - fontSizeTableMin + 1][to
// factors for each keyword value.
static const float fontSizeFactors[totalKeywords] = { 0.60f, 0.75f, 0.89f, 1.0f, 1.2f, 1.5f, 2.0f, 3.0f };
-float CSSStyleSelector::fontSizeForKeyword(int keyword, bool quirksMode, bool fixed) const
+float CSSStyleSelector::fontSizeForKeyword(Document* document, int keyword, bool fixed)
{
- Settings* settings = m_checker.m_document->settings();
+ Settings* settings = document->settings();
if (!settings)
return 1.0f;
+ bool quirksMode = document->inCompatMode();
int mediumSize = fixed ? settings->defaultFixedFontSize() : settings->defaultFontSize();
if (mediumSize >= fontSizeTableMin && mediumSize <= fontSizeTableMax) {
// Look up the entry in the table.
diff --git a/WebCore/css/CSSStyleSelector.h b/WebCore/css/CSSStyleSelector.h
index fab5006..aac1bae 100644
--- a/WebCore/css/CSSStyleSelector.h
+++ b/WebCore/css/CSSStyleSelector.h
@@ -92,6 +92,8 @@ public:
PassRefPtr<RenderStyle> pseudoStyleForElement(PseudoId, Element*, RenderStyle* parentStyle = 0);
+ static PassRefPtr<RenderStyle> styleForDocument(Document*);
+
#if ENABLE(DATAGRID)
// Datagrid style computation (uses unique pseudo elements and structures)
PassRefPtr<RenderStyle> pseudoStyleForDataGridColumn(DataGridColumn*, RenderStyle* parentStyle);
@@ -112,8 +114,8 @@ public:
// Given a CSS keyword in the range (xx-small to -webkit-xxx-large), this function will return
// the correct font size scaled relative to the user's default (medium).
- float fontSizeForKeyword(int keyword, bool quirksMode, bool monospace) const;
-
+ static float fontSizeForKeyword(Document*, int keyword, bool monospace);
+
private:
// When the CSS keyword "larger" is used, this function will attempt to match within the keyword
// table, and failing that, will simply multiply by 1.2.
@@ -129,7 +131,7 @@ public:
void applyPropertyToStyle(int id, CSSValue*, RenderStyle*);
private:
- float getComputedSizeFromSpecifiedSize(bool isAbsoluteSize, float specifiedSize);
+ static float getComputedSizeFromSpecifiedSize(Document*, bool isAbsoluteSize, float specifiedSize, float zoomFactor = 1.0f);
public:
Color getColorFromPrimitiveValue(CSSPrimitiveValue*);
diff --git a/WebCore/css/CSSStyleSheet.cpp b/WebCore/css/CSSStyleSheet.cpp
index f6cd6f2..9c9aa18 100644
--- a/WebCore/css/CSSStyleSheet.cpp
+++ b/WebCore/css/CSSStyleSheet.cpp
@@ -34,34 +34,37 @@
namespace WebCore {
-CSSStyleSheet::CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const String& charset)
- : StyleSheet(parentSheet, href)
+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_charset(charset)
, m_loadCompleted(false)
, m_strictParsing(!parentSheet || parentSheet->useStrictParsing())
, m_isUserStyleSheet(parentSheet ? parentSheet->isUserStyleSheet() : false)
+ , m_hasSyntacticallyValidCSSHeader(true)
{
}
-CSSStyleSheet::CSSStyleSheet(Node* parentNode, const String& href, const String& charset)
- : StyleSheet(parentNode, href)
+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_charset(charset)
, m_loadCompleted(false)
, m_strictParsing(false)
, m_isUserStyleSheet(false)
+ , m_hasSyntacticallyValidCSSHeader(true)
{
}
-CSSStyleSheet::CSSStyleSheet(CSSRule* ownerRule, const String& href, const String& charset)
- : StyleSheet(ownerRule, href)
+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;
diff --git a/WebCore/css/CSSStyleSheet.h b/WebCore/css/CSSStyleSheet.h
index f534104..2d8a912 100644
--- a/WebCore/css/CSSStyleSheet.h
+++ b/WebCore/css/CSSStyleSheet.h
@@ -38,27 +38,31 @@ class CSSStyleSheet : public StyleSheet {
public:
static PassRefPtr<CSSStyleSheet> create()
{
- return adoptRef(new CSSStyleSheet(static_cast<CSSStyleSheet*>(0), String(), String()));
+ return adoptRef(new CSSStyleSheet(static_cast<CSSStyleSheet*>(0), String(), KURL(), String()));
}
static PassRefPtr<CSSStyleSheet> create(Node* ownerNode)
{
- return adoptRef(new CSSStyleSheet(ownerNode, String(), String()));
+ return adoptRef(new CSSStyleSheet(ownerNode, String(), KURL(), String()));
}
- static PassRefPtr<CSSStyleSheet> create(Node* ownerNode, const String& href)
+ static PassRefPtr<CSSStyleSheet> create(Node* ownerNode, const String& href, const KURL& baseURL)
{
- return adoptRef(new CSSStyleSheet(ownerNode, href, String()));
+ return adoptRef(new CSSStyleSheet(ownerNode, href, baseURL, String()));
}
- static PassRefPtr<CSSStyleSheet> create(Node* ownerNode, const String& href, const String& charset)
+ static PassRefPtr<CSSStyleSheet> create(Node* ownerNode, const String& href, const KURL& baseURL, const String& charset)
{
- return adoptRef(new CSSStyleSheet(ownerNode, href, charset));
+ return adoptRef(new CSSStyleSheet(ownerNode, href, baseURL, charset));
}
- static PassRefPtr<CSSStyleSheet> create(CSSRule* ownerRule, const String& href, const String& charset)
+ static PassRefPtr<CSSStyleSheet> create(CSSRule* ownerRule, const String& href, const KURL& baseURL, const String& charset)
{
- return adoptRef(new CSSStyleSheet(ownerRule, href, charset));
+ return adoptRef(new CSSStyleSheet(ownerRule, href, baseURL, charset));
+ }
+ static PassRefPtr<CSSStyleSheet> createInline(Node* ownerNode, const KURL& baseURL)
+ {
+ return adoptRef(new CSSStyleSheet(ownerNode, baseURL.string(), baseURL, String()));
}
virtual ~CSSStyleSheet();
-
+
CSSRule* ownerRule() const;
PassRefPtr<CSSRuleList> cssRules(bool omitCharsetRules = false);
unsigned insertRule(const String& rule, unsigned index, ExceptionCode&);
@@ -72,7 +76,7 @@ public:
void addNamespace(CSSParser*, const AtomicString& prefix, const AtomicString& uri);
const AtomicString& determineNamespace(const AtomicString& prefix);
-
+
virtual void styleSheetChanged();
virtual bool parseString(const String&, bool strict = true);
@@ -95,12 +99,14 @@ public:
void setIsUserStyleSheet(bool b) { m_isUserStyleSheet = b; }
bool isUserStyleSheet() const { return m_isUserStyleSheet; }
+ void setHasSyntacticallyValidCSSHeader(bool b) { m_hasSyntacticallyValidCSSHeader = b; }
+ bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValidCSSHeader; }
private:
- CSSStyleSheet(Node* ownerNode, const String& href, const String& charset);
- CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const String& charset);
- CSSStyleSheet(CSSRule* ownerRule, const String& href, const String& charset);
-
+ CSSStyleSheet(Node* ownerNode, const String& href, const KURL& baseURL, const String& charset);
+ CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const KURL& baseURL, const String& charset);
+ CSSStyleSheet(CSSRule* ownerRule, const String& href, const KURL& baseURL, const String& charset);
+
virtual bool isCSSStyleSheet() const { return true; }
virtual String type() const { return "text/css"; }
@@ -110,6 +116,7 @@ private:
bool m_loadCompleted : 1;
bool m_strictParsing : 1;
bool m_isUserStyleSheet : 1;
+ bool m_hasSyntacticallyValidCSSHeader : 1;
};
} // namespace
diff --git a/WebCore/css/CSSStyleSheet.idl b/WebCore/css/CSSStyleSheet.idl
index d10844c..e180217 100644
--- a/WebCore/css/CSSStyleSheet.idl
+++ b/WebCore/css/CSSStyleSheet.idl
@@ -21,11 +21,7 @@
module css {
// Introduced in DOM Level 2:
- interface [
- GenerateConstructor,
- InterfaceUUID=2f547f65-f8c4-4f13-8724-ed10ed79dcc4,
- ImplementationUUID=1b5c24b3-8b6f-43a9-8891-654ba858f42f
- ] CSSStyleSheet : stylesheets::StyleSheet {
+ interface CSSStyleSheet : stylesheets::StyleSheet {
readonly attribute CSSRule ownerRule;
readonly attribute CSSRuleList cssRules;
diff --git a/WebCore/css/CSSUnknownRule.idl b/WebCore/css/CSSUnknownRule.idl
index 2365cd2..b62ceb8 100644
--- a/WebCore/css/CSSUnknownRule.idl
+++ b/WebCore/css/CSSUnknownRule.idl
@@ -22,8 +22,7 @@ module css {
// Introduced in DOM Level 2:
interface [
- InterfaceUUID=35670098-b732-419c-b7cd-dc0d5e26d5e3,
- ImplementationUUID=4b755f87-2509-4b98-a953-8ecb88fe4b21
+ OmitConstructor
] CSSUnknownRule : CSSRule {
};
diff --git a/WebCore/css/CSSValue.idl b/WebCore/css/CSSValue.idl
index ee82b0c..fe6b8f2 100644
--- a/WebCore/css/CSSValue.idl
+++ b/WebCore/css/CSSValue.idl
@@ -22,10 +22,7 @@ module css {
interface [
CustomToJS,
- GenerateConstructor,
- Polymorphic,
- InterfaceUUID=9fd62a7b-539d-4500-bd6c-ec075abbc404,
- ImplementationUUID=e10a2860-f98e-4bd3-96b4-1493ad941dfe
+ Polymorphic
] CSSValue {
// UnitTypes
diff --git a/WebCore/css/CSSValueKeywords.in b/WebCore/css/CSSValueKeywords.in
index 1c35b23..8236115 100644
--- a/WebCore/css/CSSValueKeywords.in
+++ b/WebCore/css/CSSValueKeywords.in
@@ -232,6 +232,40 @@ lower-alpha
lower-latin
upper-alpha
upper-latin
+afar
+ethiopic-halehame-aa-et
+ethiopic-halehame-aa-er
+amharic
+ethiopic-halehame-am-et
+amharic-abegede
+ethiopic-abegede-am-et
+cjk-earthly-branch
+cjk-heavenly-stem
+ethiopic
+ethiopic-halehame-gez
+ethiopic-abegede
+ethiopic-abegede-gez
+hangul-consonant
+hangul
+lower-norwegian
+oromo
+ethiopic-halehame-om-et
+sidama
+ethiopic-halehame-sid-et
+somali
+ethiopic-halehame-so-et
+tigre
+ethiopic-halehame-tig
+tigrinya-er
+ethiopic-halehame-ti-er
+tigrinya-er-abegede
+ethiopic-abegede-ti-er
+tigrinya-et
+ethiopic-halehame-ti-et
+tigrinya-et-abegede
+ethiopic-abegede-ti-et
+upper-greek
+upper-norwegian
hebrew
armenian
georgian
@@ -501,6 +535,7 @@ square-button
button
button-bevel
default-button
+inner-spin-button
list-button
listbox
listitem
@@ -524,6 +559,7 @@ menulist
menulist-button
menulist-text
menulist-textfield
+outer-spin-button
slider-horizontal
slider-vertical
sliderthumb-horizontal
diff --git a/WebCore/css/CSSValueList.idl b/WebCore/css/CSSValueList.idl
index 8ddfaae..06df5d7 100644
--- a/WebCore/css/CSSValueList.idl
+++ b/WebCore/css/CSSValueList.idl
@@ -27,10 +27,7 @@ module css {
// Introduced in DOM Level 2:
interface [
- GenerateConstructor,
- HasIndexGetter,
- InterfaceUUID=2fb74620-9029-400c-bc4b-4ce8e25b081f,
- ImplementationUUID=1d8fc822-f89a-48d5-a2ac-827e5a24357e
+ HasIndexGetter
] CSSValueList : CSSValue {
readonly attribute unsigned long length;
CSSValue item(in unsigned long index);
diff --git a/WebCore/css/CSSVariablesDeclaration.idl b/WebCore/css/CSSVariablesDeclaration.idl
index 82d2e9c..672bfe2 100644
--- a/WebCore/css/CSSVariablesDeclaration.idl
+++ b/WebCore/css/CSSVariablesDeclaration.idl
@@ -26,7 +26,6 @@
module css {
interface [
- GenerateConstructor,
HasIndexGetter
] CSSVariablesDeclaration {
attribute DOMString cssText;
diff --git a/WebCore/css/CSSVariablesRule.idl b/WebCore/css/CSSVariablesRule.idl
index ec49282..780e84d 100644
--- a/WebCore/css/CSSVariablesRule.idl
+++ b/WebCore/css/CSSVariablesRule.idl
@@ -25,9 +25,7 @@
module css {
- interface [
- GenerateConstructor
- ] CSSVariablesRule : CSSRule {
+ interface CSSVariablesRule : CSSRule {
readonly attribute stylesheets::MediaList media;
readonly attribute CSSVariablesDeclaration variables;
};
diff --git a/WebCore/css/Counter.idl b/WebCore/css/Counter.idl
index 5be8f0d..6236c45 100644
--- a/WebCore/css/Counter.idl
+++ b/WebCore/css/Counter.idl
@@ -20,11 +20,7 @@
module css {
// Introduced in DOM Level 2:
- interface [
- GenerateConstructor,
- InterfaceUUID=365d0f26-3a6e-457c-a34c-174d98f79798,
- ImplementationUUID=8bfdc968-9a1b-4e4f-8d36-732d49b48eaa
- ] Counter {
+ interface Counter {
readonly attribute DOMString identifier;
readonly attribute DOMString listStyle;
readonly attribute DOMString separator;
diff --git a/WebCore/css/Media.cpp b/WebCore/css/Media.cpp
index 57c4aac..e238602 100644
--- a/WebCore/css/Media.cpp
+++ b/WebCore/css/Media.cpp
@@ -34,15 +34,14 @@
namespace WebCore {
-Media::Media(DOMWindow* window)
- : m_window(window)
+Media::Media(Frame* frame)
+ : m_frame(frame)
{
}
String Media::type() const
{
- Frame* frame = m_window->frame();
- FrameView* view = frame ? frame->view() : 0;
+ FrameView* view = m_frame ? m_frame->view() : 0;
if (view)
return view->mediaType();
@@ -51,15 +50,19 @@ String Media::type() const
bool Media::matchMedium(const String& query) const
{
- Document* document = m_window->document();
- Frame* frame = m_window->frame();
+ if (!m_frame)
+ return false;
+
+ Document* document = m_frame->document();
+ ASSERT(document);
+ Element* documentElement = document->documentElement();
+ ASSERT(documentElement);
CSSStyleSelector* styleSelector = document->styleSelector();
- Element* docElement = document->documentElement();
- if (!styleSelector || !docElement || !frame)
+ if (!styleSelector)
return false;
- RefPtr<RenderStyle> rootStyle = styleSelector->styleForElement(docElement, 0 /*defaultParent*/, false /*allowSharing*/, true /*resolveForRootDefault*/);
+ RefPtr<RenderStyle> rootStyle = styleSelector->styleForElement(documentElement, 0 /*defaultParent*/, false /*allowSharing*/, true /*resolveForRootDefault*/);
RefPtr<MediaList> media = MediaList::create();
ExceptionCode ec = 0;
@@ -67,7 +70,7 @@ bool Media::matchMedium(const String& query) const
if (ec)
return false;
- MediaQueryEvaluator screenEval(type(), frame, rootStyle.get());
+ MediaQueryEvaluator screenEval(type(), m_frame, rootStyle.get());
return screenEval.eval(media.get());
}
diff --git a/WebCore/css/Media.h b/WebCore/css/Media.h
index 0d7b504..ee6961b 100644
--- a/WebCore/css/Media.h
+++ b/WebCore/css/Media.h
@@ -32,21 +32,21 @@ namespace WebCore {
class Media : public RefCounted<Media> {
public:
- static PassRefPtr<Media> create(DOMWindow* window)
+ static PassRefPtr<Media> create(Frame* frame)
{
- return adoptRef(new Media(window));
+ return adoptRef(new Media(frame));
}
-
- Document* document() const { return m_window->document(); }
+
+ void disconnectFrame() { m_frame = 0; }
String type() const;
bool matchMedium(const String&) const;
private:
- Media(DOMWindow*);
+ Media(Frame*);
- RefPtr<DOMWindow> m_window;
+ Frame* m_frame;
};
} // namespace
diff --git a/WebCore/css/Media.idl b/WebCore/css/Media.idl
index b01d712..1bf5900 100644
--- a/WebCore/css/Media.idl
+++ b/WebCore/css/Media.idl
@@ -24,9 +24,7 @@
*/
module view {
- interface [
- GenerateConstructor,
- ] Media {
+ interface Media {
readonly attribute DOMString type;
boolean matchMedium(in DOMString mediaquery);
};
diff --git a/WebCore/css/MediaList.idl b/WebCore/css/MediaList.idl
index dc10e63..54ad4f8 100644
--- a/WebCore/css/MediaList.idl
+++ b/WebCore/css/MediaList.idl
@@ -27,10 +27,7 @@ module stylesheets {
// Introduced in DOM Level 2:
interface [
- GenerateConstructor,
- HasIndexGetter,
- InterfaceUUID=4ed02a0b-15b3-4a20-8f16-d91295aaf2cb,
- ImplementationUUID=6c5095d8-fdcc-4f9a-b04a-23c2a6d2cf49
+ HasIndexGetter
] MediaList {
attribute [ConvertNullToNullString, ConvertNullStringTo=Null] DOMString mediaText
diff --git a/WebCore/css/RGBColor.idl b/WebCore/css/RGBColor.idl
index d29f811..1dc87bc 100644
--- a/WebCore/css/RGBColor.idl
+++ b/WebCore/css/RGBColor.idl
@@ -21,11 +21,7 @@
module css {
// Introduced in DOM Level 2:
- interface [
- GenerateConstructor,
- InterfaceUUID=2e3b1501-2cf7-4a4a-bbf7-d8843d1c3be7,
- ImplementationUUID=cf779953-4898-4800-aa31-6c9e3f4711be
- ] RGBColor {
+ interface RGBColor {
readonly attribute CSSPrimitiveValue red;
readonly attribute CSSPrimitiveValue green;
readonly attribute CSSPrimitiveValue blue;
diff --git a/WebCore/css/Rect.idl b/WebCore/css/Rect.idl
index 3c31dc6..60eb70e 100644
--- a/WebCore/css/Rect.idl
+++ b/WebCore/css/Rect.idl
@@ -19,11 +19,7 @@
module css {
- interface [
- GenerateConstructor,
- InterfaceUUID=696bc4d9-c1d3-4225-a5b3-2cef28967705,
- ImplementationUUID=ae83743f-4dc4-4785-869b-8c3010c7d006
- ] Rect {
+ interface Rect {
readonly attribute CSSPrimitiveValue top;
readonly attribute CSSPrimitiveValue right;
readonly attribute CSSPrimitiveValue bottom;
diff --git a/WebCore/css/SVGCSSComputedStyleDeclaration.cpp b/WebCore/css/SVGCSSComputedStyleDeclaration.cpp
index 1f19983..f184b1b 100644
--- a/WebCore/css/SVGCSSComputedStyleDeclaration.cpp
+++ b/WebCore/css/SVGCSSComputedStyleDeclaration.cpp
@@ -166,7 +166,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getSVGPropertyCSSValue(int pro
return 0;
}
- case CSSPropertyWebkitShadow:
+ case CSSPropertyWebkitSvgShadow:
return valueForShadow(svgStyle->shadow(), propertyID);
case CSSPropertyMarker:
case CSSPropertyEnableBackground:
diff --git a/WebCore/css/SVGCSSParser.cpp b/WebCore/css/SVGCSSParser.cpp
index 8730e49..0986f1c 100644
--- a/WebCore/css/SVGCSSParser.cpp
+++ b/WebCore/css/SVGCSSParser.cpp
@@ -257,7 +257,7 @@ bool CSSParser::parseSVGValue(int propId, bool important)
m_valueList->next();
}
break;
- case CSSPropertyWebkitShadow:
+ case CSSPropertyWebkitSvgShadow:
if (id == CSSValueNone)
valid_primitive = true;
else
diff --git a/WebCore/css/SVGCSSPropertyNames.in b/WebCore/css/SVGCSSPropertyNames.in
index 809eabe..9f97146 100644
--- a/WebCore/css/SVGCSSPropertyNames.in
+++ b/WebCore/css/SVGCSSPropertyNames.in
@@ -47,4 +47,4 @@ kerning
text-anchor
writing-mode
--webkit-shadow
+-webkit-svg-shadow
diff --git a/WebCore/css/SVGCSSStyleSelector.cpp b/WebCore/css/SVGCSSStyleSelector.cpp
index 6d131df..5ba7344 100644
--- a/WebCore/css/SVGCSSStyleSelector.cpp
+++ b/WebCore/css/SVGCSSStyleSelector.cpp
@@ -525,7 +525,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
// Silently ignoring this property for now
// http://bugs.webkit.org/show_bug.cgi?id=6022
break;
- case CSSPropertyWebkitShadow: {
+ case CSSPropertyWebkitSvgShadow: {
if (isInherit)
return svgstyle->setShadow(m_parentStyle->svgStyle()->shadow() ? new ShadowData(*m_parentStyle->svgStyle()->shadow()) : 0);
if (isInitial || primitiveValue) // initial | none
@@ -546,7 +546,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
if (item->color)
color = getColorFromPrimitiveValue(item->color.get());
- // -webkit-shadow does should not have a spread or style
+ // -webkit-svg-shadow does should not have a spread or style
ASSERT(!item->spread);
ASSERT(!item->style);
diff --git a/WebCore/css/StyleBase.cpp b/WebCore/css/StyleBase.cpp
index 23a60ee..cc7c0d4 100644
--- a/WebCore/css/StyleBase.cpp
+++ b/WebCore/css/StyleBase.cpp
@@ -56,9 +56,9 @@ KURL StyleBase::baseURL() const
StyleSheet* sheet = const_cast<StyleBase*>(this)->stylesheet();
if (!sheet)
return KURL();
- if (!sheet->href().isNull())
- return KURL(ParsedURLString, sheet->href());
- if (sheet->parent())
+ if (!sheet->putativeBaseURL().isNull())
+ return sheet->putativeBaseURL();
+ if (sheet->parent())
return sheet->parent()->baseURL();
if (!sheet->ownerNode())
return KURL();
diff --git a/WebCore/css/StyleSheet.cpp b/WebCore/css/StyleSheet.cpp
index b4fb3b2..15e1c3b 100644
--- a/WebCore/css/StyleSheet.cpp
+++ b/WebCore/css/StyleSheet.cpp
@@ -24,27 +24,30 @@
namespace WebCore {
-StyleSheet::StyleSheet(StyleSheet* parentSheet, const String& href)
+StyleSheet::StyleSheet(StyleSheet* parentSheet, const String& href, const KURL& baseURL)
: StyleList(parentSheet)
, m_parentNode(0)
- , m_strHref(href)
+ , m_href(href)
+ , m_baseURL(baseURL)
, m_disabled(false)
{
}
-StyleSheet::StyleSheet(Node* parentNode, const String& href)
+StyleSheet::StyleSheet(Node* parentNode, const String& href, const KURL& baseURL)
: StyleList(0)
, m_parentNode(parentNode)
- , m_strHref(href)
+ , m_href(href)
+ , m_baseURL(baseURL)
, m_disabled(false)
{
}
-StyleSheet::StyleSheet(StyleBase* owner, const String& href)
+StyleSheet::StyleSheet(StyleBase* owner, const String& href, const KURL& baseURL)
: StyleList(owner)
, m_parentNode(0)
- , m_strHref(href)
+ , m_href(href)
+ , m_baseURL(baseURL)
, m_disabled(false)
{
}
diff --git a/WebCore/css/StyleSheet.h b/WebCore/css/StyleSheet.h
index 016d50a..5f8ad78 100644
--- a/WebCore/css/StyleSheet.h
+++ b/WebCore/css/StyleSheet.h
@@ -41,8 +41,18 @@ public:
Node* ownerNode() const { return m_parentNode; }
StyleSheet *parentStyleSheet() const;
- const String& href() const { return m_strHref; }
- void setHref(const String& href) { m_strHref = href; }
+
+ // Note that href is the URL that started the redirect chain that led to
+ // this style sheet. This property probably isn't useful for much except
+ // the JavaScript binding (which needs to use this value for security).
+ const String& href() const { return m_href; }
+
+ void setBaseURL(const KURL& baseURL) { m_baseURL = baseURL; }
+
+ // Notice that this object inherits a baseURL function from StyleBase that
+ // crawls the parent() relation looking for a non-0 putativeBaseURL.
+ const KURL& putativeBaseURL() const { return m_baseURL; }
+
const String& title() const { return m_strTitle; }
void setTitle(const String& s) { m_strTitle = s; }
MediaList* media() const { return m_media.get(); }
@@ -58,15 +68,16 @@ public:
virtual bool parseString(const String&, bool strict = true) = 0;
protected:
- StyleSheet(Node* ownerNode, const String& href);
- StyleSheet(StyleSheet* parentSheet, const String& href);
- StyleSheet(StyleBase* owner, const String& href);
+ StyleSheet(Node* ownerNode, const String& href, const KURL& baseURL);
+ StyleSheet(StyleSheet* parentSheet, const String& href, const KURL& baseURL);
+ StyleSheet(StyleBase* owner, const String& href, const KURL& baseURL);
private:
virtual bool isStyleSheet() const { return true; }
Node* m_parentNode;
- String m_strHref;
+ String m_href;
+ KURL m_baseURL;
String m_strTitle;
RefPtr<MediaList> m_media;
bool m_disabled;
diff --git a/WebCore/css/StyleSheet.idl b/WebCore/css/StyleSheet.idl
index e4f4090..4f53689 100644
--- a/WebCore/css/StyleSheet.idl
+++ b/WebCore/css/StyleSheet.idl
@@ -24,10 +24,7 @@ module stylesheets {
interface [
CustomMarkFunction,
CustomToJS,
- GenerateConstructor,
- Polymorphic,
- InterfaceUUID=2bd2db5f-aaab-4422-96a0-e05455313f35,
- ImplementationUUID=a8ca694d-71f2-4479-8c76-ee9c1c729b49
+ Polymorphic
] StyleSheet {
readonly attribute [ConvertNullStringTo=Null] DOMString type;
attribute boolean disabled;
diff --git a/WebCore/css/StyleSheetList.idl b/WebCore/css/StyleSheetList.idl
index 574d749..6cef99d 100644
--- a/WebCore/css/StyleSheetList.idl
+++ b/WebCore/css/StyleSheetList.idl
@@ -23,11 +23,8 @@ module stylesheets {
// Introduced in DOM Level 2:
interface [
CustomMarkFunction,
- GenerateConstructor,
HasIndexGetter,
- HasNameGetter,
- InterfaceUUID=707da1d7-7c8f-42b1-bbbf-c009e429663f,
- ImplementationUUID=5991ebaf-ce6c-42db-b1c8-fb34af8d5c76
+ HasNameGetter
] StyleSheetList {
readonly attribute unsigned long length;
StyleSheet item(in unsigned long index);
diff --git a/WebCore/css/WebKitCSSKeyframeRule.idl b/WebCore/css/WebKitCSSKeyframeRule.idl
index a8dd9c3..f6eac77 100644
--- a/WebCore/css/WebKitCSSKeyframeRule.idl
+++ b/WebCore/css/WebKitCSSKeyframeRule.idl
@@ -29,11 +29,7 @@
module css {
// Introduced in DOM Level ?:
- interface [
- GenerateConstructor,
- InterfaceUUID=87b7cde8-5818-4f68-b554-5382e6d9428c,
- ImplementationUUID=b000d468-bb7a-4866-8946-5dea8b6a3c13
- ] WebKitCSSKeyframeRule : CSSRule {
+ interface WebKitCSSKeyframeRule : CSSRule {
attribute DOMString keyText;
readonly attribute CSSStyleDeclaration style;
diff --git a/WebCore/css/WebKitCSSKeyframesRule.idl b/WebCore/css/WebKitCSSKeyframesRule.idl
index 2b64be1..c40aff9 100644
--- a/WebCore/css/WebKitCSSKeyframesRule.idl
+++ b/WebCore/css/WebKitCSSKeyframesRule.idl
@@ -30,10 +30,7 @@ module css {
// Introduced in DOM Level ?:
interface [
- GenerateConstructor,
- HasIndexGetter,
- InterfaceUUID=49f5644a-5dbb-4e31-ac6b-9446ae3895c9,
- ImplementationUUID=a7c78aaa-5883-4ef2-a8bd-f2f1a1fd025a
+ HasIndexGetter
] WebKitCSSKeyframesRule : CSSRule {
attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString name;
diff --git a/WebCore/css/WebKitCSSMatrix.idl b/WebCore/css/WebKitCSSMatrix.idl
index 6b22da1..9d6c897 100644
--- a/WebCore/css/WebKitCSSMatrix.idl
+++ b/WebCore/css/WebKitCSSMatrix.idl
@@ -26,7 +26,7 @@
module css {
// Introduced in DOM Level ?:
- interface WebKitCSSMatrix {
+ interface [CustomConstructor] WebKitCSSMatrix {
// These attributes are simple aliases for certain elements of the 4x4 matrix
attribute double a; // alias for m11
diff --git a/WebCore/css/WebKitCSSTransformValue.idl b/WebCore/css/WebKitCSSTransformValue.idl
index 14a373f..087aa82 100644
--- a/WebCore/css/WebKitCSSTransformValue.idl
+++ b/WebCore/css/WebKitCSSTransformValue.idl
@@ -29,10 +29,7 @@
module css {
interface [
- GenerateConstructor,
HasIndexGetter
- InterfaceUUID=303fe632-5dcf-4472-b977-33a5481e1d12,
- ImplementationUUID=eb49e5c6-6075-45b8-b5c4-7e775c01e7c4
] WebKitCSSTransformValue : CSSValueList {
// OperationTypes
diff --git a/WebCore/css/html.css b/WebCore/css/html.css
index 1132d24..913dbe5 100644
--- a/WebCore/css/html.css
+++ b/WebCore/css/html.css
@@ -72,7 +72,7 @@ layer {
display: block
}
-nav {
+article, aside, footer, header, nav, section {
display: block
}
@@ -359,6 +359,17 @@ input::-webkit-input-list-button {
display: inline-block;
}
+input::-webkit-inner-spin-button {
+ -webkit-appearance: inner-spin-button;
+ display: inline-block;
+}
+
+input::-webkit-outer-spin-button {
+ -webkit-appearance: outer-spin-button;
+ display: inline-block;
+ margin-left: 2px;
+}
+
textarea {
-webkit-appearance: textarea;
background-color: white;
diff --git a/WebCore/css/mathml.css b/WebCore/css/mathml.css
index e725d8c..b56a24b 100644
--- a/WebCore/css/mathml.css
+++ b/WebCore/css/mathml.css
@@ -1,91 +1,116 @@
@namespace "http://www.w3.org/1998/Math/MathML";
-/* approved */
math {
font-family: Symbol, STIXGeneral, "Times New Roman";
display: inline-block;
padding: 0px;
margin: 0px;
- text-indent: 0;
- font-size: 1.1em;
vertical-align: baseline;
+ line-height: 1.0;
}
+
math[display="block"] {
- font-family: "New Times Roman"
display: block;
text-align: center;
page-break-inside: avoid;
+ margin-bottom: 1em;
+}
+
+math > * {
+ vertical-align: baseline;
+}
+
+mrow, mfenced {
+ display: inline-block;
+ white-space: nowrap;
+ vertical-align: middle;
+}
+
+mrow > mo, mfenced > mo, math > mo
+{
+ vertical-align: middle;
+}
+
+mi, mtext {
+ font-style: italic;
+ padding-right: 0.1em;
+}
+
+mi + mrow {
+ margin-left: 0.1em;
}
mfrac {
+ display: inline-block;
vertical-align: middle;
}
msub, msup {
- display: inline-block;
+ display: inline-block;
+ vertical-align: baseline;
}
msub > * + * {
- vertical-align: sub;
- font-size: 0.75em;
- line-height: 0.75em;
+ vertical-align: sub;
+ font-size: 0.75em;
}
msup > * + * {
- vertical-align: super;
- font-size: 0.75em;
- line-height: 0.75em;
+ vertical-align: super;
+ font-size: 0.75em;
+}
+
+msubsup {
+ display: inline-block;
+ vertical-align: baseline;
}
msubsup > * {
margin: 0px;
padding: 0px;
- vertical-align: middle;
}
msubsup > * + * {
- font-size: 0.75em;
- line-height: 0.75em;
+ font-size: 0.75em;
}
-munderover {
- vertical-align: middle;
+munder, mover, munderover {
+ display: inline-block;
+ vertical-align: baseline;
}
munderover > * + *, mover > * + *, munder > * + * {
- font-size: 0.75em;
- line-height: 0.5625em;
+ font-size: 0.75em;
}
-mrow {
- line-height: 1em;
- white-space: nowrap;
- vertical-align: middle;
+mover > mi {
+ text-align: center;
}
-mfenced > * {
- vertical-align: middle;
+mo, mn, mi, mtext {
+ padding: 0px;
+ margin: 0px;
+}
+
+mo {
+ display: inline-block;
}
-mo, mn, mi {
- line-height: 0.75em;
- padding: 0px;
- margin: 0px;
+mo {
+ padding-left: 0.05em;
+ padding-right: 0.05em;
}
mo[mathsize="small"], mn[mathsize="small"], mi[mathsize="small"] {
- font-size: 0.75em;
- line-height: 0.5625em;
+ font-size: 0.75em;
}
mo[mathsize="normal"],mn[mathsize="normal"],mi[mathsize="normal"] {
- font-size: 1em;
- line-height: 0.75em;
+ font-size: 1em;
}
mo[mathsize="big"], mn[mathsize="big"], mi[mathsize="big"] {
- line-height: 1.2em;
- font-size: 1.5em;
+ font-size: 1.5em;
}
annotation, annotation-xml {
@@ -100,25 +125,25 @@ merror {
}
msqrt {
+ display: inline-block;
padding-top: 0.2em;
padding-left: 0.75em;
}
mroot {
+ display: inline-block;
padding-top: 0.2em;
padding-left: 0.2em;
}
mroot > * + * {
font-size: 0.75em;
- line-height: 0.75em;
vertical-align: top;
padding-right: 0.3em;
}
mtable {
display: inline-table;
- line-height: 1.5em;
text-align: center;
vertical-align: middle;
}
@@ -168,3 +193,6 @@ mtable[columnlines="dashed"] > mtr > mtd + mtd {
border-left: dashed thin;
}
+mspace[linebreak="newline"] {
+ display: block;
+}
diff --git a/WebCore/css/mediaControlsGtk.css b/WebCore/css/mediaControlsGtk.css
new file mode 100644
index 0000000..8e98ab1
--- /dev/null
+++ b/WebCore/css/mediaControlsGtk.css
@@ -0,0 +1,63 @@
+/*
+ * WebKitGTK+ specific overrides for HTML5 media elements.
+ *
+ * Copyright (C) 2009 Zan Dobersek <zandobersek@gmail.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.
+ *
+ */
+
+audio {
+ height: 20px;
+ width: 300px;
+}
+
+audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel {
+ height: 20px;
+}
+
+audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button {
+ width: 20px;
+ height: 20px;
+}
+
+audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button {
+ width: 20px;
+ height: 20px;
+}
+
+audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container {
+ height: 20px;
+}
+
+audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline {
+ height: 20px;
+}
+
+audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button {
+ width: 20px;
+ height: 20px;
+}
+
+audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button {
+ width: 20px;
+ height: 20px;
+}
+
+audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button {
+ width: 20px;
+ height: 20px;
+}
diff --git a/WebCore/css/view-source.css b/WebCore/css/view-source.css
index f898565..60467b9 100644
--- a/WebCore/css/view-source.css
+++ b/WebCore/css/view-source.css
@@ -130,7 +130,7 @@ td {
-webkit-border-fit: lines;
min-height: 13px;
font-size: 9px;
- font-family: Lucida Grande;
+ font-family: Lucida Grande, sans-serif;
font-weight: bold;
margin: 6px 25px;
padding: 0 7px 1px;
diff --git a/WebCore/dom/Attr.cpp b/WebCore/dom/Attr.cpp
index aa5916b..2ef5f9b 100644
--- a/WebCore/dom/Attr.cpp
+++ b/WebCore/dom/Attr.cpp
@@ -27,9 +27,12 @@
#include "Element.h"
#include "ExceptionCode.h"
#include "Text.h"
+#include "XMLNSNames.h"
namespace WebCore {
+using namespace HTMLNames;
+
inline Attr::Attr(Element* element, Document* document, PassRefPtr<Attribute> attribute)
: ContainerNode(document)
, m_element(element)
@@ -100,7 +103,13 @@ void Attr::setPrefix(const AtomicString& prefix, ExceptionCode& ec)
if (ec)
return;
- m_attribute->setPrefix(prefix);
+ if ((prefix == xmlnsAtom && namespaceURI() != XMLNSNames::xmlnsNamespaceURI)
+ || static_cast<Attr*>(this)->qualifiedName() == xmlnsAtom) {
+ ec = NAMESPACE_ERR;
+ return;
+ }
+
+ m_attribute->setPrefix(prefix.isEmpty() ? AtomicString() : prefix);
}
String Attr::nodeValue() const
@@ -164,4 +173,9 @@ void Attr::childrenChanged(bool changedByParser, Node* beforeChange, Node* after
m_element->attributeChanged(m_attribute.get());
}
+bool Attr::isId() const
+{
+ return qualifiedName().matches(m_element ? m_element->idAttributeName() : idAttr);
+}
+
}
diff --git a/WebCore/dom/Attr.h b/WebCore/dom/Attr.h
index e927a6e..2e02a02 100644
--- a/WebCore/dom/Attr.h
+++ b/WebCore/dom/Attr.h
@@ -52,6 +52,8 @@ public:
Attribute* attr() const { return m_attribute.get(); }
const QualifiedName& qualifiedName() const { return m_attribute->name(); }
+ bool isId() const;
+
// An extension to get presentational information for attributes.
CSSStyleDeclaration* style() { return m_attribute->style(); }
diff --git a/WebCore/dom/Attr.idl b/WebCore/dom/Attr.idl
index c01f34a..af84478 100644
--- a/WebCore/dom/Attr.idl
+++ b/WebCore/dom/Attr.idl
@@ -22,10 +22,7 @@ module core {
interface [
CustomMarkFunction,
- GenerateConstructor,
- GenerateNativeConverter,
- InterfaceUUID=EEE8E22B-22C3-4e50-95F4-5E0B8AAD8231,
- ImplementationUUID=41B16348-D8E7-4d21-BFDB-125705B7E91F
+ GenerateNativeConverter
] Attr : Node {
// DOM Level 1
@@ -38,11 +35,13 @@ module core {
// DOM Level 2
readonly attribute Element ownerElement;
-
+
+ // DOM Level 3
+
+ readonly attribute boolean isId;
+
// extensions
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
readonly attribute CSSStyleDeclaration style;
-#endif
};
}
diff --git a/WebCore/dom/BeforeLoadEvent.idl b/WebCore/dom/BeforeLoadEvent.idl
index d06a39d..9c8b7e5 100644
--- a/WebCore/dom/BeforeLoadEvent.idl
+++ b/WebCore/dom/BeforeLoadEvent.idl
@@ -26,9 +26,7 @@
module events {
- interface [
- GenerateConstructor
- ] BeforeLoadEvent : Event {
+ interface BeforeLoadEvent : Event {
void initBeforeLoadEvent(in DOMString type,
in boolean canBubble,
in boolean cancelable,
diff --git a/WebCore/dom/CDATASection.idl b/WebCore/dom/CDATASection.idl
index 7c6c1e6..70a4f55 100644
--- a/WebCore/dom/CDATASection.idl
+++ b/WebCore/dom/CDATASection.idl
@@ -19,11 +19,7 @@
module core {
- interface [
- GenerateConstructor,
- InterfaceUUID=DC8E30FD-42DD-4a12-9B74-78D634321B41,
- ImplementationUUID=10A5D70C-D93E-409c-A6BA-9D7CB4E3D06A
- ] CDATASection : Text {
+ interface CDATASection : Text {
};
}
diff --git a/WebCore/dom/CharacterData.idl b/WebCore/dom/CharacterData.idl
index 7c8c7ac..4ddd782 100644
--- a/WebCore/dom/CharacterData.idl
+++ b/WebCore/dom/CharacterData.idl
@@ -19,11 +19,7 @@
module core {
- interface [
- GenerateConstructor,
- InterfaceUUID=149159F4-D2BA-4040-8137-6BF6424C972A,
- ImplementationUUID=E2095280-B9BD-446a-8C03-79F78417CDFF
- ] CharacterData : Node {
+ interface CharacterData : Node {
attribute [ConvertNullToNullString] DOMString data
setter raises(DOMException);
diff --git a/WebCore/dom/CheckedRadioButtons.cpp b/WebCore/dom/CheckedRadioButtons.cpp
index 9883f58..3cf8848 100644
--- a/WebCore/dom/CheckedRadioButtons.cpp
+++ b/WebCore/dom/CheckedRadioButtons.cpp
@@ -60,6 +60,8 @@ HTMLInputElement* CheckedRadioButtons::checkedButtonForGroup(const AtomicString&
{
if (!m_nameToCheckedRadioButtonMap)
return 0;
+
+ m_nameToCheckedRadioButtonMap->checkConsistency();
return m_nameToCheckedRadioButtonMap->get(name.impl());
}
@@ -69,6 +71,8 @@ void CheckedRadioButtons::removeButton(HTMLFormControlElement* element)
if (element->name().isEmpty() || !m_nameToCheckedRadioButtonMap)
return;
+ m_nameToCheckedRadioButtonMap->checkConsistency();
+
NameToInputMap::iterator it = m_nameToCheckedRadioButtonMap->find(element->name().impl());
if (it == m_nameToCheckedRadioButtonMap->end() || it->second != element)
return;
diff --git a/WebCore/dom/ClientRect.idl b/WebCore/dom/ClientRect.idl
index 6f0598f..7dbdd68 100644
--- a/WebCore/dom/ClientRect.idl
+++ b/WebCore/dom/ClientRect.idl
@@ -26,9 +26,7 @@
module view {
- interface [
- GenerateConstructor
- ] ClientRect {
+ interface ClientRect {
readonly attribute float top;
readonly attribute float right;
readonly attribute float bottom;
diff --git a/WebCore/dom/ClientRectList.idl b/WebCore/dom/ClientRectList.idl
index 8230f6c..6372418 100644
--- a/WebCore/dom/ClientRectList.idl
+++ b/WebCore/dom/ClientRectList.idl
@@ -27,7 +27,6 @@
module view {
interface [
- GenerateConstructor,
HasIndexGetter
] ClientRectList {
readonly attribute unsigned long length;
diff --git a/WebCore/dom/Clipboard.cpp b/WebCore/dom/Clipboard.cpp
index 2aea90a..7f33aac 100644
--- a/WebCore/dom/Clipboard.cpp
+++ b/WebCore/dom/Clipboard.cpp
@@ -35,7 +35,9 @@
namespace WebCore {
Clipboard::Clipboard(ClipboardAccessPolicy policy, bool isForDragging)
- : m_policy(policy)
+ : m_policy(policy)
+ , m_dropEffect("none")
+ , m_effectAllowed("uninitialized")
, m_dragStarted(false)
, m_forDragging(isForDragging)
, m_dragImage(0)
@@ -64,7 +66,7 @@ static DragOperation dragOpFromIEOp(const String& op)
if (op == "link")
return DragOperationLink;
if (op == "move")
- return DragOperationGeneric;
+ return DragOperationGeneric; // FIXME: Why is this DragOperationGeneric? <http://webkit.org/b/33697>
if (op == "copyLink")
return (DragOperation)(DragOperationCopy | DragOperationLink);
if (op == "copyMove")
@@ -98,29 +100,29 @@ static String IEOpFromDragOp(DragOperation op)
return "none";
}
-bool Clipboard::sourceOperation(DragOperation& op) const
+DragOperation Clipboard::sourceOperation() const
{
- if (m_effectAllowed.isNull())
- return false;
- op = dragOpFromIEOp(m_effectAllowed);
- return true;
+ DragOperation op = dragOpFromIEOp(m_effectAllowed);
+ ASSERT(op != DragOperationPrivate);
+ return op;
}
-bool Clipboard::destinationOperation(DragOperation& op) const
+DragOperation Clipboard::destinationOperation() const
{
- if (m_dropEffect.isNull())
- return false;
- op = dragOpFromIEOp(m_dropEffect);
- return true;
+ DragOperation op = dragOpFromIEOp(m_dropEffect);
+ ASSERT(op == DragOperationCopy || op == DragOperationNone || op == DragOperationLink || op == DragOperationGeneric || op == DragOperationMove);
+ return op;
}
void Clipboard::setSourceOperation(DragOperation op)
{
+ ASSERT_ARG(op, op != DragOperationPrivate);
m_effectAllowed = IEOpFromDragOp(op);
}
void Clipboard::setDestinationOperation(DragOperation op)
{
+ ASSERT_ARG(op, op == DragOperationCopy || op == DragOperationNone || op == DragOperationLink || op == DragOperationGeneric || op == DragOperationMove);
m_dropEffect = IEOpFromDragOp(op);
}
@@ -129,6 +131,10 @@ void Clipboard::setDropEffect(const String &effect)
if (!m_forDragging)
return;
+ // The attribute must ignore any attempts to set it to a value other than none, copy, link, and move.
+ if (effect != "none" && effect != "copy" && effect != "link" && effect != "move")
+ return;
+
if (m_policy == ClipboardReadable || m_policy == ClipboardTypesReadable)
m_dropEffect = effect;
}
@@ -138,6 +144,17 @@ void Clipboard::setEffectAllowed(const String &effect)
if (!m_forDragging)
return;
+ if (dragOpFromIEOp(effect) == DragOperationPrivate) {
+ // This means that there was no conversion, and the effectAllowed that
+ // we are passed isn't a valid effectAllowed, so we should ignore it,
+ // and not set m_effectAllowed.
+
+ // The attribute must ignore any attempts to set it to a value other than
+ // none, copy, copyLink, copyMove, link, linkMove, move, all, and uninitialized.
+ return;
+ }
+
+
if (m_policy == ClipboardWritable)
m_effectAllowed = effect;
}
diff --git a/WebCore/dom/Clipboard.h b/WebCore/dom/Clipboard.h
index f6c09b2..042cd82 100644
--- a/WebCore/dom/Clipboard.h
+++ b/WebCore/dom/Clipboard.h
@@ -74,8 +74,8 @@ namespace WebCore {
void setAccessPolicy(ClipboardAccessPolicy);
- bool sourceOperation(DragOperation&) const;
- bool destinationOperation(DragOperation&) const;
+ DragOperation sourceOperation() const;
+ DragOperation destinationOperation() const;
void setSourceOperation(DragOperation);
void setDestinationOperation(DragOperation);
diff --git a/WebCore/dom/Clipboard.idl b/WebCore/dom/Clipboard.idl
index dc8677e..6509677 100644
--- a/WebCore/dom/Clipboard.idl
+++ b/WebCore/dom/Clipboard.idl
@@ -28,9 +28,7 @@
module core {
- interface [
- GenerateConstructor
- ] Clipboard {
+ interface Clipboard {
attribute [ConvertNullStringTo=Undefined] DOMString dropEffect;
attribute [ConvertNullStringTo=Undefined] DOMString effectAllowed;
readonly attribute [CustomGetter] Array types;
diff --git a/WebCore/dom/Comment.idl b/WebCore/dom/Comment.idl
index a89f0e7..b9f4e31 100644
--- a/WebCore/dom/Comment.idl
+++ b/WebCore/dom/Comment.idl
@@ -19,11 +19,7 @@
module core {
- interface [
- GenerateConstructor,
- InterfaceUUID=5D16069F-7E6B-4b28-8647-C36B2ED81ED1,
- ImplementationUUID=CB55DB55-411F-451f-97C6-284B99E77F8E
- ] Comment : CharacterData {
+ interface Comment : CharacterData {
};
}
diff --git a/WebCore/dom/CompositionEvent.idl b/WebCore/dom/CompositionEvent.idl
index 3752091..28d6625 100644
--- a/WebCore/dom/CompositionEvent.idl
+++ b/WebCore/dom/CompositionEvent.idl
@@ -26,9 +26,7 @@
module events {
// Introduced in DOM Level 3:
- interface [
- GenerateConstructor
- ] CompositionEvent : UIEvent {
+ interface CompositionEvent : UIEvent {
readonly attribute DOMString data;
diff --git a/WebCore/dom/ContainerNode.cpp b/WebCore/dom/ContainerNode.cpp
index 5cd0781..39cd3b4 100644
--- a/WebCore/dom/ContainerNode.cpp
+++ b/WebCore/dom/ContainerNode.cpp
@@ -33,6 +33,7 @@
#include "Frame.h"
#include "FrameView.h"
#include "InlineTextBox.h"
+#include "InspectorController.h"
#include "MutationEvent.h"
#include "Page.h"
#include "RenderTheme.h"
@@ -869,6 +870,13 @@ static void dispatchChildInsertionEvents(Node* child)
{
ASSERT(!eventDispatchForbidden());
+#if ENABLE(INSPECTOR)
+ if (Page* page = child->document()->page()) {
+ if (InspectorController* inspectorController = page->inspectorController())
+ inspectorController->didInsertDOMNode(child);
+ }
+#endif
+
RefPtr<Node> c = child;
RefPtr<Document> document = child->document();
@@ -891,6 +899,13 @@ static void dispatchChildInsertionEvents(Node* child)
static void dispatchChildRemovalEvents(Node* child)
{
+#if ENABLE(INSPECTOR)
+ if (Page* page = child->document()->page()) {
+ if (InspectorController* inspectorController = page->inspectorController())
+ inspectorController->didRemoveDOMNode(child);
+ }
+#endif
+
RefPtr<Node> c = child;
RefPtr<Document> document = child->document();
diff --git a/WebCore/dom/DOMCoreException.idl b/WebCore/dom/DOMCoreException.idl
index 3001995..9baea1b 100644
--- a/WebCore/dom/DOMCoreException.idl
+++ b/WebCore/dom/DOMCoreException.idl
@@ -28,9 +28,7 @@
module core {
- interface [
- GenerateConstructor
- ] DOMCoreException {
+ interface DOMCoreException {
readonly attribute unsigned short code;
readonly attribute DOMString name;
diff --git a/WebCore/dom/DOMImplementation.idl b/WebCore/dom/DOMImplementation.idl
index 6f4df80..81df6c8 100644
--- a/WebCore/dom/DOMImplementation.idl
+++ b/WebCore/dom/DOMImplementation.idl
@@ -20,11 +20,7 @@
module core {
- interface [
- GenerateConstructor,
- InterfaceUUID=B0CC344F-963C-4acc-9FC6-EB22649345E5,
- ImplementationUUID=9E835092-2CA3-426b-826B-8272A8105E49
- ] DOMImplementation {
+ interface DOMImplementation {
// DOM Level 1
@@ -44,7 +40,6 @@ module core {
// DOMImplementationCSS interface from DOM Level 2 CSS
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
[OldStyleObjC] CSSStyleSheet createCSSStyleSheet(in DOMString title,
in DOMString media)
raises(DOMException);
@@ -52,7 +47,6 @@ module core {
// HTMLDOMImplementation interface from DOM Level 2 HTML
HTMLDocument createHTMLDocument(in DOMString title);
-#endif
};
}
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index c8d21ba..73beef6 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -36,6 +36,8 @@
#include "CSSValueKeywords.h"
#include "CString.h"
#include "CachedCSSStyleSheet.h"
+#include "Chrome.h"
+#include "ChromeClient.h"
#include "Comment.h"
#include "Console.h"
#include "CookieJar.h"
@@ -67,6 +69,7 @@
#include "HTMLElementFactory.h"
#include "HTMLFrameOwnerElement.h"
#include "HTMLHeadElement.h"
+#include "HTMLIFrameElement.h"
#include "HTMLInputElement.h"
#include "HTMLLinkElement.h"
#include "HTMLMapElement.h"
@@ -113,6 +116,7 @@
#include "SegmentedString.h"
#include "SelectionController.h"
#include "Settings.h"
+#include "StringBuffer.h"
#include "StyleSheetList.h"
#include "TextEvent.h"
#include "TextIterator.h"
@@ -126,6 +130,7 @@
#include "WebKitTransitionEvent.h"
#include "WheelEvent.h"
#include "XMLHttpRequest.h"
+#include "XMLNSNames.h"
#include "XMLNames.h"
#include "XMLTokenizer.h"
#include "htmlediting.h"
@@ -135,11 +140,6 @@
#include <wtf/PassRefPtr.h>
#include <wtf/StdLibExtras.h>
-#if ENABLE(DATABASE)
-#include "Database.h"
-#include "DatabaseThread.h"
-#endif
-
#if ENABLE(SHARED_WORKERS)
#include "SharedWorkerRepository.h"
#endif
@@ -171,6 +171,7 @@
#include "SVGStyleElement.h"
#endif
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
// FIXME: We shouldn't be including this from WebCore!
#include "WebViewCore.h"
@@ -191,6 +192,9 @@
#if ENABLE(TOUCH_EVENTS)
#include "ChromeClient.h"
+=======
+#if ENABLE(TOUCH_EVENTS)
+>>>>>>> webkit.org at r54127
#include "TouchEvent.h"
#endif
@@ -338,15 +342,49 @@ static bool disableRangeMutation(Page* page)
static HashSet<Document*>* documentsThatNeedStyleRecalc = 0;
-Document::Document(Frame* frame, bool isXHTML)
+class DocumentWeakReference : public ThreadSafeShared<DocumentWeakReference> {
+public:
+ static PassRefPtr<DocumentWeakReference> create(Document* document)
+ {
+ return adoptRef(new DocumentWeakReference(document));
+ }
+
+ Document* document()
+ {
+ ASSERT(isMainThread());
+ return m_document;
+ }
+
+ void clear()
+ {
+ ASSERT(isMainThread());
+ m_document = 0;
+ }
+
+private:
+ DocumentWeakReference(Document* document)
+ : m_document(document)
+ {
+ ASSERT(isMainThread());
+ }
+
+ Document* m_document;
+};
+
+Document::Document(Frame* frame, bool isXHTML, bool isHTML)
: ContainerNode(0)
, m_domtree_version(0)
, m_styleSheets(StyleSheetList::create(this))
, m_styleRecalcTimer(this, &Document::styleRecalcTimerFired)
, m_frameElementsShouldIgnoreScrolling(false)
+ , m_containsValidityStyleRules(false)
, m_title("")
+ , m_rawTitle("")
, m_titleSetExplicitly(false)
, m_updateFocusAppearanceTimer(this, &Document::updateFocusAppearanceTimerFired)
+ , m_startTime(currentTime())
+ , m_overMinimumLayoutThreshold(false)
+ , m_extraLayoutDelay(0)
, m_executeScriptSoonTimer(this, &Document::executeScriptSoonTimerFired)
, m_xmlVersion("1.0")
, m_xmlStandalone(false)
@@ -369,14 +407,17 @@ Document::Document(Frame* frame, bool isXHTML)
, m_inPageCache(false)
, m_useSecureKeyboardEntryWhenActive(false)
, m_isXHTML(isXHTML)
+ , m_isHTML(isHTML)
, m_numNodeListCaches(0)
-#if ENABLE(DATABASE)
- , m_hasOpenDatabases(false)
+#if USE(JSC)
+ , m_normalWorldWrapperCache(0)
#endif
, m_usingGeolocation(false)
+ , m_storageEventTimer(this, &Document::storageEventTimerFired)
#if ENABLE(WML)
, m_containsWMLContent(false)
#endif
+ , m_weakReference(DocumentWeakReference::create(this))
{
m_document = this;
@@ -394,7 +435,7 @@ Document::Document(Frame* frame, bool isXHTML)
m_docLoader = new DocLoader(this);
- visuallyOrdered = false;
+ m_visuallyOrdered = false;
m_bParsing = false;
m_wellFormed = false;
@@ -415,7 +456,6 @@ Document::Document(Frame* frame, bool isXHTML)
m_gotoAnchorNeededAfterStylesheetsLoad = false;
- m_styleSelector = 0;
m_didCalculateStyleSelector = false;
m_pendingStylesheets = 0;
m_ignorePendingStylesheets = false;
@@ -429,9 +469,12 @@ Document::Document(Frame* frame, bool isXHTML)
resetActiveLinkColor();
m_processingLoadEvent = false;
+<<<<<<< HEAD
m_startTime = currentTime();
m_overMinimumLayoutThreshold = false;
m_extraLayoutDelay = 0;
+=======
+>>>>>>> webkit.org at r54127
initSecurityContext();
initDNSPrefetch();
@@ -462,6 +505,9 @@ void Document::removedLastRef()
m_titleElement = 0;
m_documentElement = 0;
+ // removeAllChildren() doesn't always unregister IDs, do it upfront to avoid having stale references in the map.
+ m_elementsById.clear();
+
removeAllChildren();
deleteAllValues(m_markers);
@@ -503,7 +549,6 @@ Document::~Document()
m_tokenizer.clear();
m_document = 0;
- delete m_styleSelector;
m_docLoader.clear();
m_renderArena.clear();
@@ -522,26 +567,25 @@ Document::~Document()
for (unsigned i = 0; i < count; i++)
deleteAllValues(m_nameCollectionInfo[i]);
-#if ENABLE(DATABASE)
- if (m_databaseThread) {
- ASSERT(m_databaseThread->terminationRequested());
- m_databaseThread = 0;
- }
-#endif
-
if (m_styleSheets)
m_styleSheets->documentDestroyed();
+
+ m_weakReference->clear();
}
+#if USE(JSC)
Document::JSWrapperCache* Document::createWrapperCache(DOMWrapperWorld* world)
{
JSWrapperCache* wrapperCache = new JSWrapperCache();
m_wrapperCacheMap.set(world, wrapperCache);
-#if USE(JSC)
+ if (world->isNormal()) {
+ ASSERT(!m_normalWorldWrapperCache);
+ m_normalWorldWrapperCache = wrapperCache;
+ }
world->rememberDocument(this);
-#endif
return wrapperCache;
}
+#endif
void Document::resetLinkColor()
{
@@ -796,6 +840,9 @@ PassRefPtr<Node> Document::adoptNode(PassRefPtr<Node> source, ExceptionCode& ec)
break;
}
default:
+ if (source->hasTagName(iframeTag))
+ static_cast<HTMLIFrameElement*>(source.get())->setRemainsAliveOnRemovalFromTree(attached());
+
if (source->parentNode())
source->parentNode()->removeChild(source.get(), ec);
}
@@ -808,21 +855,17 @@ PassRefPtr<Node> Document::adoptNode(PassRefPtr<Node> source, ExceptionCode& ec)
bool Document::hasPrefixNamespaceMismatch(const QualifiedName& qName)
{
- DEFINE_STATIC_LOCAL(const AtomicString, xmlnsNamespaceURI, ("http://www.w3.org/2000/xmlns/"));
- DEFINE_STATIC_LOCAL(const AtomicString, xmlns, ("xmlns"));
- DEFINE_STATIC_LOCAL(const AtomicString, xml, ("xml"));
-
// These checks are from DOM Core Level 2, createElementNS
// http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-DocCrElNS
if (!qName.prefix().isEmpty() && qName.namespaceURI().isNull()) // createElementNS(null, "html:div")
return true;
- if (qName.prefix() == xml && qName.namespaceURI() != XMLNames::xmlNamespaceURI) // createElementNS("http://www.example.com", "xml:lang")
+ if (qName.prefix() == xmlAtom && qName.namespaceURI() != XMLNames::xmlNamespaceURI) // createElementNS("http://www.example.com", "xml:lang")
return true;
// Required by DOM Level 3 Core and unspecified by DOM Level 2 Core:
// http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-DocCrElNS
// createElementNS("http://www.w3.org/2000/xmlns/", "foo:bar"), createElementNS(null, "xmlns:bar")
- if ((qName.prefix() == xmlns && qName.namespaceURI() != xmlnsNamespaceURI) || (qName.prefix() != xmlns && qName.namespaceURI() == xmlnsNamespaceURI))
+ if ((qName.prefix() == xmlnsAtom && qName.namespaceURI() != XMLNSNames::xmlnsNamespaceURI) || (qName.prefix() != xmlnsAtom && qName.namespaceURI() == XMLNSNames::xmlnsNamespaceURI))
return true;
return false;
@@ -883,6 +926,8 @@ Element* Document::getElementById(const AtomicString& elementId) const
if (elementId.isEmpty())
return 0;
+ m_elementsById.checkConsistency();
+
Element* element = m_elementsById.get(elementId.impl());
if (element)
return element;
@@ -892,7 +937,7 @@ Element* Document::getElementById(const AtomicString& elementId) const
for (Node *n = traverseNextNode(); n != 0; n = n->traverseNextNode()) {
if (n->isElementNode()) {
element = static_cast<Element*>(n);
- if (element->hasID() && element->getAttribute(idAttr) == elementId) {
+ if (element->hasID() && element->getAttribute(element->idAttributeName()) == elementId) {
m_duplicateIds.remove(elementId.impl());
m_elementsById.set(elementId.impl(), element);
return element;
@@ -1074,6 +1119,8 @@ void Document::addElementById(const AtomicString& elementId, Element* element)
void Document::removeElementById(const AtomicString& elementId, Element* element)
{
+ m_elementsById.checkConsistency();
+
if (m_elementsById.get(elementId.impl()) == element)
m_elementsById.remove(elementId.impl());
else
@@ -1098,8 +1145,67 @@ Element* Document::getElementByAccessKey(const String& key) const
return m_elementsByAccessKey.get(key.impl());
}
+/*
+ * Performs three operations:
+ * 1. Convert control characters to spaces
+ * 2. Trim leading and trailing spaces
+ * 3. Collapse internal whitespace.
+ */
+static inline String canonicalizedTitle(Document* document, const String& title)
+{
+ const UChar* characters = title.characters();
+ unsigned length = title.length();
+ unsigned i;
+
+ StringBuffer buffer(length);
+ unsigned builderIndex = 0;
+
+ // Skip leading spaces and leading characters that would convert to spaces
+ for (i = 0; i < length; ++i) {
+ UChar c = characters[i];
+ if (!(c <= 0x20 || c == 0x7F))
+ break;
+ }
+
+ if (i == length)
+ return "";
+
+ // Replace control characters with spaces, and backslashes with currency symbols, and collapse whitespace.
+ bool previousCharWasWS = false;
+ for (; i < length; ++i) {
+ UChar c = characters[i];
+ if (c <= 0x20 || c == 0x7F || (WTF::Unicode::category(c) & (WTF::Unicode::Separator_Line | WTF::Unicode::Separator_Paragraph))) {
+ if (previousCharWasWS)
+ continue;
+ buffer[builderIndex++] = ' ';
+ previousCharWasWS = true;
+ } else {
+ buffer[builderIndex++] = c;
+ previousCharWasWS = false;
+ }
+ }
+
+ // Strip trailing spaces
+ while (builderIndex > 0) {
+ --builderIndex;
+ if (buffer[builderIndex] != ' ')
+ break;
+ }
+
+ if (!builderIndex && buffer[builderIndex] == ' ')
+ return "";
+
+ buffer.shrink(builderIndex + 1);
+
+ // Replace the backslashes with currency symbols if the encoding requires it.
+ document->displayBufferModifiedByEncoding(buffer.characters(), buffer.length());
+
+ return String::adopt(buffer);
+}
+
void Document::updateTitle()
{
+ m_title = canonicalizedTitle(this, m_rawTitle);
if (Frame* f = frame())
f->loader()->setTitle(m_title);
}
@@ -1126,10 +1232,10 @@ void Document::setTitle(const String& title, Element* titleElement)
m_titleElement = titleElement;
}
- if (m_title == title)
+ if (m_rawTitle == title)
return;
- m_title = title;
+ m_rawTitle = title;
updateTitle();
if (m_titleSetExplicitly && m_titleElement && m_titleElement->hasTagName(titleTag))
@@ -1154,8 +1260,8 @@ void Document::removeTitle(Element* titleElement)
}
}
- if (!m_titleElement && !m_title.isEmpty()) {
- m_title = "";
+ if (!m_titleElement && !m_rawTitle.isEmpty()) {
+ m_rawTitle = "";
updateTitle();
}
}
@@ -1284,32 +1390,7 @@ void Document::recalcStyle(StyleChange change)
// style selector may set this again during recalc
m_hasNodesWithPlaceholderStyle = false;
- RefPtr<RenderStyle> documentStyle = RenderStyle::create();
- documentStyle->setDisplay(BLOCK);
- documentStyle->setVisuallyOrdered(visuallyOrdered);
- documentStyle->setZoom(frame()->pageZoomFactor());
- m_styleSelector->setStyle(documentStyle);
-
- FontDescription fontDescription;
- fontDescription.setUsePrinterFont(printing());
- if (Settings* settings = this->settings()) {
- fontDescription.setRenderingMode(settings->fontRenderingMode());
- if (printing() && !settings->shouldPrintBackgrounds())
- documentStyle->setForceBackgroundsToWhite(true);
- const AtomicString& stdfont = settings->standardFontFamily();
- if (!stdfont.isEmpty()) {
- fontDescription.firstFamily().setFamily(stdfont);
- fontDescription.firstFamily().appendFamily(0);
- }
- fontDescription.setKeywordSize(CSSValueMedium - CSSValueXxSmall + 1);
- m_styleSelector->setFontSize(fontDescription, m_styleSelector->fontSizeForKeyword(CSSValueMedium, inCompatMode(), false));
- }
-
- documentStyle->setFontDescription(fontDescription);
- documentStyle->font().update(m_styleSelector->fontSelector());
- if (inCompatMode())
- documentStyle->setHtmlHacks(true); // enable html specific rendering tricks
-
+ RefPtr<RenderStyle> documentStyle = CSSStyleSelector::styleForDocument(this);
StyleChange ch = diff(documentStyle.get(), renderer()->style());
if (renderer() && ch != NoChange)
renderer()->setStyle(documentStyle.release());
@@ -1421,7 +1502,7 @@ void Document::updateLayoutIgnorePendingStylesheets()
} 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
- // but here we need up-to-date style immediatly.
+ // but here we need up-to-date style immediately.
recalcStyle(Force);
}
@@ -1430,6 +1511,15 @@ void Document::updateLayoutIgnorePendingStylesheets()
m_ignorePendingStylesheets = oldIgnore;
}
+void Document::createStyleSelector()
+{
+ bool matchAuthorAndUserStyles = true;
+ if (Settings* docSettings = settings())
+ matchAuthorAndUserStyles = docSettings->authorAndUserStylesEnabled();
+ m_styleSelector.set(new CSSStyleSelector(this, m_styleSheets.get(), m_mappedElementSheet.get(), pageUserSheet(), pageGroupUserSheets(),
+ !inCompatMode(), matchAuthorAndUserStyles));
+}
+
void Document::attach()
{
ASSERT(!attached());
@@ -1447,14 +1537,6 @@ void Document::attach()
renderView()->didMoveOnscreen();
#endif
- if (!m_styleSelector) {
- bool matchAuthorAndUserStyles = true;
- if (Settings* docSettings = settings())
- matchAuthorAndUserStyles = docSettings->authorAndUserStylesEnabled();
- m_styleSelector = new CSSStyleSelector(this, m_styleSheets.get(), m_mappedElementSheet.get(), pageUserSheet(), pageGroupUserSheets(),
- !inCompatMode(), matchAuthorAndUserStyles);
- }
-
recalcStyle(Force);
RenderObject* render = renderer();
@@ -1514,14 +1596,8 @@ void Document::detach()
if (render)
render->destroy();
- HashSet<RefPtr<HistoryItem> > associatedHistoryItems;
- associatedHistoryItems.swap(m_associatedHistoryItems);
- HashSet<RefPtr<HistoryItem> >::iterator end = associatedHistoryItems.end();
- for (HashSet<RefPtr<HistoryItem> >::iterator i = associatedHistoryItems.begin(); i != end; ++i)
- (*i)->documentDetached(this);
-
// This is required, as our Frame might delete itself as soon as it detaches
- // us. However, this violates Node::detach() symantics, as it's never
+ // us. However, this violates Node::detach() semantics, as it's never
// possible to re-attach. Eventually Document::detach() should be renamed,
// or this setting of the frame to 0 could be made explicit in each of the
// callers of Document::detach().
@@ -1606,7 +1682,7 @@ AXObjectCache* Document::axObjectCache() const
void Document::setVisuallyOrdered()
{
- visuallyOrdered = true;
+ m_visuallyOrdered = true;
if (renderer())
renderer()->style()->setVisuallyOrdered(true);
}
@@ -1789,7 +1865,8 @@ void Document::implicitClose()
if (f)
f->animation()->resumeAnimations(this);
- ImageLoader::dispatchPendingEvents();
+ ImageLoader::dispatchPendingBeforeLoadEvents();
+ ImageLoader::dispatchPendingLoadEvents();
dispatchWindowLoadEvent();
dispatchWindowEvent(PageTransitionEvent::create(eventNames().pageshowEvent, false), this);
if (m_pendingStateObject)
@@ -1983,9 +2060,9 @@ void Document::updateBaseURL()
m_baseURL = KURL();
if (m_elemSheet)
- m_elemSheet->setHref(m_baseURL.string());
+ m_elemSheet->setBaseURL(m_baseURL);
if (m_mappedElementSheet)
- m_mappedElementSheet->setHref(m_baseURL.string());
+ m_mappedElementSheet->setBaseURL(m_baseURL);
}
String Document::userAgent(const KURL& url) const
@@ -2007,7 +2084,7 @@ CSSStyleSheet* Document::pageUserSheet()
return 0;
// Parse the sheet and cache it.
- m_pageUserSheet = CSSStyleSheet::create(this, settings()->userStyleSheetLocation());
+ m_pageUserSheet = CSSStyleSheet::createInline(this, settings()->userStyleSheetLocation());
m_pageUserSheet->setIsUserStyleSheet(true);
m_pageUserSheet->parseString(userSheetText, !inCompatMode());
return m_pageUserSheet.get();
@@ -2042,7 +2119,7 @@ const Vector<RefPtr<CSSStyleSheet> >* Document::pageGroupUserSheets() const
const UserStyleSheet* sheet = sheets->at(i).get();
if (!UserContentURLPattern::matchesPatterns(url(), sheet->whitelist(), sheet->blacklist()))
continue;
- RefPtr<CSSStyleSheet> parsedSheet = CSSStyleSheet::create(const_cast<Document*>(this), sheet->url());
+ RefPtr<CSSStyleSheet> parsedSheet = CSSStyleSheet::createInline(const_cast<Document*>(this), sheet->url());
parsedSheet->setIsUserStyleSheet(true);
parsedSheet->parseString(sheet->source(), !inCompatMode());
if (!m_pageGroupUserSheets)
@@ -2064,14 +2141,14 @@ void Document::clearPageGroupUserSheets()
CSSStyleSheet* Document::elementSheet()
{
if (!m_elemSheet)
- m_elemSheet = CSSStyleSheet::create(this, m_baseURL.string());
+ m_elemSheet = CSSStyleSheet::createInline(this, m_baseURL);
return m_elemSheet.get();
}
CSSStyleSheet* Document::mappedElementSheet()
{
if (!m_mappedElementSheet)
- m_mappedElementSheet = CSSStyleSheet::create(this, m_baseURL.string());
+ m_mappedElementSheet = CSSStyleSheet::createInline(this, m_baseURL);
return m_mappedElementSheet.get();
}
@@ -2681,10 +2758,7 @@ void Document::recalcStyleSelector()
m_styleSheets->swap(sheets);
- // Create a new style selector
- delete m_styleSelector;
- m_styleSelector = new CSSStyleSelector(this, m_styleSheets.get(), m_mappedElementSheet.get(),
- pageUserSheet(), pageGroupUserSheets(), !inCompatMode(), matchAuthorAndUserStyles);
+ m_styleSelector.clear();
m_didCalculateStyleSelector = true;
}
@@ -3026,6 +3100,25 @@ void Document::dispatchWindowLoadEvent()
domWindow->dispatchLoadEvent();
}
+void Document::enqueueStorageEvent(PassRefPtr<Event> storageEvent)
+{
+ m_storageEventQueue.append(storageEvent);
+ if (!m_storageEventTimer.isActive())
+ m_storageEventTimer.startOneShot(0);
+}
+
+void Document::storageEventTimerFired(Timer<Document>*)
+{
+ ASSERT(!m_storageEventTimer.isActive());
+ Vector<RefPtr<Event> > storageEventQueue;
+ storageEventQueue.swap(m_storageEventQueue);
+
+ typedef Vector<RefPtr<Event> >::const_iterator Iterator;
+ Iterator end = storageEventQueue.end();
+ for (Iterator it = storageEventQueue.begin(); it != end; ++it)
+ dispatchWindowEvent(*it);
+}
+
PassRefPtr<Event> Document::createEvent(const String& eventType, ExceptionCode& ec)
{
RefPtr<Event> event;
@@ -3138,7 +3231,7 @@ String Document::cookie(ExceptionCode& ec) const
// INVALID_STATE_ERR exception on getting if the Document has no
// browsing context.
- if (securityOrigin()->isSandboxed(SandboxOrigin)) {
+ if (!securityOrigin()->canAccessCookies()) {
ec = SECURITY_ERR;
return String();
}
@@ -3159,7 +3252,7 @@ void Document::setCookie(const String& value, ExceptionCode& ec)
// INVALID_STATE_ERR exception on setting if the Document has no
// browsing context.
- if (securityOrigin()->isSandboxed(SandboxOrigin)) {
+ if (!securityOrigin()->canAccessCookies()) {
ec = SECURITY_ERR;
return;
}
@@ -3185,6 +3278,11 @@ String Document::domain() const
void Document::setDomain(const String& newDomain, ExceptionCode& ec)
{
+ if (SecurityOrigin::isDomainRelaxationForbiddenForURLScheme(securityOrigin()->protocol())) {
+ ec = SECURITY_ERR;
+ return;
+ }
+
// Both NS and IE specify that changing the domain is only allowed when
// the new domain is a suffix of the old domain.
@@ -3365,6 +3463,8 @@ void Document::removeImageMap(HTMLMapElement* imageMap)
if (!name.impl())
return;
+ m_imageMapsByName.checkConsistency();
+
ImageMapsByName::iterator it = m_imageMapsByName.find(name.impl());
if (it != m_imageMapsByName.end() && it->second == imageMap)
m_imageMapsByName.remove(it);
@@ -3377,6 +3477,7 @@ HTMLMapElement *Document::getImageMap(const String& url) const
int hashPos = url.find('#');
String name = (hashPos < 0 ? url : url.substring(hashPos + 1)).impl();
AtomicString mapName = isHTMLDocument() ? name.lower() : name;
+ m_imageMapsByName.checkConsistency();
return m_imageMapsByName.get(mapName.impl());
}
@@ -4087,7 +4188,7 @@ PassRefPtr<Attr> Document::createAttributeNS(const String& namespaceURI, const S
}
// Spec: DOM Level 2 Core: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-DocCrAttrNS
- if (!shouldIgnoreNamespaceChecks && qName.localName() == "xmlns" && qName.namespaceURI() != "http://www.w3.org/2000/xmlns/") {
+ if (!shouldIgnoreNamespaceChecks && qName.localName() == xmlnsAtom && qName.namespaceURI() != XMLNSNames::xmlnsNamespaceURI) {
ec = NAMESPACE_ERR;
return 0;
}
@@ -4182,6 +4283,7 @@ CollectionCache* Document::nameCollectionInfo(CollectionType type, const AtomicS
NamedCollectionMap::iterator iter = map.find(name.impl());
if (iter == map.end())
iter = map.add(name.impl(), new CollectionCache).first;
+ iter->second->checkConsistency();
return iter->second;
}
@@ -4410,10 +4512,8 @@ void Document::initSecurityContext()
// loading URL.
const KURL& url = m_frame->loader()->url();
m_cookieURL = url;
- ScriptExecutionContext::setSecurityOrigin(SecurityOrigin::create(url));
+ ScriptExecutionContext::setSecurityOrigin(SecurityOrigin::create(url, m_frame->loader()->sandboxFlags()));
- updateSandboxFlags();
-
if (SecurityOrigin::allowSubstituteDataAccessToLocal()) {
// If this document was loaded with substituteData, then the document can
// load local resources. See https://bugs.webkit.org/show_bug.cgi?id=16756
@@ -4464,6 +4564,29 @@ void Document::setSecurityOrigin(SecurityOrigin* securityOrigin)
initDNSPrefetch();
}
+#if ENABLE(DATABASE)
+
+bool Document::isDatabaseReadOnly() const
+{
+ if (!page() || page()->settings()->privateBrowsingEnabled())
+ return true;
+ return false;
+}
+
+void Document::databaseExceededQuota(const String& name)
+{
+ Page* currentPage = page();
+ if (currentPage)
+ currentPage->chrome()->client()->exceededDatabaseQuota(document()->frame(), name);
+}
+
+#endif
+
+bool Document::isContextThread() const
+{
+ return isMainThread();
+}
+
void Document::updateURLForPushOrReplaceState(const KURL& url)
{
Frame* f = frame();
@@ -4486,18 +4609,6 @@ void Document::statePopped(SerializedScriptValue* stateObject)
m_pendingStateObject = stateObject;
}
-void Document::registerHistoryItem(HistoryItem* item)
-{
- ASSERT(!m_associatedHistoryItems.contains(item));
- m_associatedHistoryItems.add(item);
-}
-
-void Document::unregisterHistoryItem(HistoryItem* item)
-{
- ASSERT(m_associatedHistoryItems.contains(item) || m_associatedHistoryItems.isEmpty());
- m_associatedHistoryItems.remove(item);
-}
-
void Document::updateSandboxFlags()
{
if (m_frame && securityOrigin())
@@ -4558,63 +4669,12 @@ void Document::executeScriptSoon(ScriptElementData* data, CachedResourceHandle<C
m_executeScriptSoonTimer.startOneShot(0);
}
-// FF method for accessing the selection added for compatability.
+// FF method for accessing the selection added for compatibility.
DOMSelection* Document::getSelection() const
{
return frame() ? frame()->domWindow()->getSelection() : 0;
}
-#if ENABLE(DATABASE)
-
-void Document::addOpenDatabase(Database* database)
-{
- if (!m_openDatabaseSet)
- m_openDatabaseSet.set(new DatabaseSet);
-
- ASSERT(!m_openDatabaseSet->contains(database));
- m_openDatabaseSet->add(database);
-}
-
-void Document::removeOpenDatabase(Database* database)
-{
- ASSERT(m_openDatabaseSet && m_openDatabaseSet->contains(database));
- if (!m_openDatabaseSet)
- return;
-
- m_openDatabaseSet->remove(database);
-}
-
-DatabaseThread* Document::databaseThread()
-{
- if (!m_databaseThread && !m_hasOpenDatabases) {
- // Create the database thread on first request - but not if at least one database was already opened,
- // because in that case we already had a database thread and terminated it and should not create another.
- m_databaseThread = DatabaseThread::create();
- if (!m_databaseThread->start())
- m_databaseThread = 0;
- }
-
- return m_databaseThread.get();
-}
-
-void Document::stopDatabases()
-{
- if (m_openDatabaseSet) {
- DatabaseSet::iterator i = m_openDatabaseSet->begin();
- DatabaseSet::iterator end = m_openDatabaseSet->end();
- for (; i != end; ++i) {
- (*i)->stop();
- if (m_databaseThread)
- m_databaseThread->unscheduleDatabaseTasks(*i);
- }
- }
-
- if (m_databaseThread)
- m_databaseThread->requestTermination();
-}
-
-#endif
-
#if ENABLE(WML)
void Document::resetWMLPageState()
{
@@ -4753,21 +4813,27 @@ private:
};
struct PerformTaskContext : Noncopyable {
- PerformTaskContext(ScriptExecutionContext* scriptExecutionContext, PassOwnPtr<ScriptExecutionContext::Task> task)
- : scriptExecutionContext(scriptExecutionContext)
+ PerformTaskContext(PassRefPtr<DocumentWeakReference> documentReference, PassOwnPtr<ScriptExecutionContext::Task> task)
+ : documentReference(documentReference)
, task(task)
{
}
- ScriptExecutionContext* scriptExecutionContext; // The context should exist until task execution.
+ RefPtr<DocumentWeakReference> documentReference;
OwnPtr<ScriptExecutionContext::Task> task;
};
static void performTask(void* ctx)
{
- PerformTaskContext* ptctx = reinterpret_cast<PerformTaskContext*>(ctx);
- ptctx->task->performTask(ptctx->scriptExecutionContext);
- delete ptctx;
+ ASSERT(isMainThread());
+
+ PerformTaskContext* context = reinterpret_cast<PerformTaskContext*>(ctx);
+ ASSERT(context);
+
+ if (Document* document = context->documentReference->document())
+ context->task->performTask(document);
+
+ delete context;
}
void Document::postTask(PassOwnPtr<Task> task)
@@ -4776,7 +4842,7 @@ void Document::postTask(PassOwnPtr<Task> task)
ScriptExecutionContextTaskTimer* timer = new ScriptExecutionContextTaskTimer(static_cast<Document*>(this), task);
timer->startOneShot(0);
} else {
- callOnMainThread(performTask, new PerformTaskContext(this, task));
+ callOnMainThread(performTask, new PerformTaskContext(m_weakReference, task));
}
}
diff --git a/WebCore/dom/Document.h b/WebCore/dom/Document.h
index b24063a..f909ba1 100644
--- a/WebCore/dom/Document.h
+++ b/WebCore/dom/Document.h
@@ -32,9 +32,13 @@
#include "CollectionCache.h"
#include "CollectionType.h"
#include "Color.h"
+#include "Document.h"
#include "DocumentMarker.h"
#include "ScriptExecutionContext.h"
#include "Timer.h"
+#if USE(JSC)
+#include <runtime/WeakGCMap.h>
+#endif
#include <wtf/HashCountedSet.h>
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
@@ -60,6 +64,7 @@ namespace WebCore {
class DocLoader;
class DocumentFragment;
class DocumentType;
+ class DocumentWeakReference;
class EditingText;
class Element;
class EntityReference;
@@ -174,11 +179,11 @@ class Document : public ContainerNode, public ScriptExecutionContext {
public:
static PassRefPtr<Document> create(Frame* frame)
{
- return adoptRef(new Document(frame, false));
+ return adoptRef(new Document(frame, false, false));
}
static PassRefPtr<Document> createXHTML(Frame* frame)
{
- return adoptRef(new Document(frame, true));
+ return adoptRef(new Document(frame, true, false));
}
virtual ~Document();
@@ -344,13 +349,14 @@ public:
ASSERT(type >= FirstUnnamedDocumentCachedType);
unsigned index = type - FirstUnnamedDocumentCachedType;
ASSERT(index < NumUnnamedDocumentCachedTypes);
+ m_collectionInfo[index].checkConsistency();
return &m_collectionInfo[index];
}
CollectionCache* nameCollectionInfo(CollectionType, const AtomicString& name);
// Other methods (not part of DOM)
- virtual bool isHTMLDocument() const { return false; }
+ bool isHTMLDocument() const { return m_isHTML; }
virtual bool isImageDocument() const { return false; }
#if ENABLE(SVG)
virtual bool isSVGDocument() const { return false; }
@@ -369,7 +375,12 @@ public:
#endif
virtual bool isFrameSet() const { return false; }
- CSSStyleSelector* styleSelector() const { return m_styleSelector; }
+ CSSStyleSelector* styleSelector()
+ {
+ if (!m_styleSelector)
+ createStyleSelector();
+ return m_styleSelector.get();
+ }
Element* getElementByAccessKey(const String& key) const;
@@ -473,6 +484,7 @@ public:
// to get visually ordered hebrew and arabic pages right
void setVisuallyOrdered();
+ bool visuallyOrdered() const { return m_visuallyOrdered; }
void open(Document* ownerDocument = 0);
void implicitOpen();
@@ -613,6 +625,9 @@ public:
void dispatchWindowEvent(PassRefPtr<Event>, PassRefPtr<EventTarget> = 0);
void dispatchWindowLoadEvent();
+ void enqueueStorageEvent(PassRefPtr<Event>);
+ void storageEventTimerFired(Timer<Document>*);
+
PassRefPtr<Event> createEvent(const String& eventType, ExceptionCode&);
// keep track of what types of event listeners are registered, so we don't
@@ -826,7 +841,7 @@ public:
void updateFocusAppearanceSoon();
void cancelFocusAppearanceUpdate();
- // FF method for accessing the selection added for compatability.
+ // FF method for accessing the selection added for compatibility.
DOMSelection* getSelection() const;
// Extension for manipulating canvas drawing contexts for use in CSS
@@ -842,16 +857,13 @@ public:
virtual void scriptImported(unsigned long, const String&);
virtual void postTask(PassOwnPtr<Task>); // Executes the task on context's thread asynchronously.
- typedef HashMap<WebCore::Node*, JSNode*> JSWrapperCache;
+#if USE(JSC)
+ typedef JSC::WeakGCMap<WebCore::Node*, JSNode*> JSWrapperCache;
typedef HashMap<DOMWrapperWorld*, JSWrapperCache*> JSWrapperCacheMap;
JSWrapperCacheMap& wrapperCacheMap() { return m_wrapperCacheMap; }
- JSWrapperCache* getWrapperCache(DOMWrapperWorld* world)
- {
- if (JSWrapperCache* wrapperCache = m_wrapperCacheMap.get(world))
- return wrapperCache;
- return createWrapperCache(world);
- }
+ JSWrapperCache* getWrapperCache(DOMWrapperWorld* world);
JSWrapperCache* createWrapperCache(DOMWrapperWorld*);
+#endif
virtual void finishedParsing();
@@ -910,22 +922,18 @@ public:
void updateURLForPushOrReplaceState(const KURL&);
void statePopped(SerializedScriptValue*);
- void registerHistoryItem(HistoryItem* item);
- void unregisterHistoryItem(HistoryItem* item);
void updateSandboxFlags(); // Set sandbox flags as determined by the frame.
bool processingLoadEvent() const { return m_processingLoadEvent; }
#if ENABLE(DATABASE)
- void addOpenDatabase(Database*);
- void removeOpenDatabase(Database*);
- DatabaseThread* databaseThread(); // Creates the thread as needed, but not if it has been already terminated.
- void setHasOpenDatabases() { m_hasOpenDatabases = true; }
- bool hasOpenDatabases() { return m_hasOpenDatabases; }
- void stopDatabases();
+ virtual bool isDatabaseReadOnly() const;
+ virtual void databaseExceededQuota(const String& name);
#endif
+ virtual bool isContextThread() const;
+
void setUsingGeolocation(bool f) { m_usingGeolocation = f; }
bool usingGeolocation() const { return m_usingGeolocation; };
@@ -936,11 +944,12 @@ public:
void resetWMLPageState();
void initializeWMLPageState();
#endif
+
+ bool containsValidityStyleRules() const { return m_containsValidityStyleRules; }
+ void setContainsValidityStyleRules() { m_containsValidityStyleRules = true; }
protected:
- Document(Frame*, bool isXHTML);
-
- void setStyleSelector(CSSStyleSelector* styleSelector) { m_styleSelector = styleSelector; }
+ Document(Frame*, bool isXHTML, bool isHTML);
void clearXMLVersion() { m_xmlVersion = String(); }
@@ -976,7 +985,9 @@ private:
void cacheDocumentElement() const;
- CSSStyleSelector* m_styleSelector;
+ void createStyleSelector();
+
+ OwnPtr<CSSStyleSelector> m_styleSelector;
bool m_didCalculateStyleSelector;
Frame* m_frame;
@@ -1061,7 +1072,7 @@ private:
String m_selectedStylesheetSet;
bool m_loadingSheet;
- bool visuallyOrdered;
+ bool m_visuallyOrdered;
bool m_bParsing;
Timer<Document> m_styleRecalcTimer;
bool m_inStyleRecalc;
@@ -1076,8 +1087,10 @@ private:
bool m_isDNSPrefetchEnabled;
bool m_haveExplicitlyDisabledDNSPrefetch;
bool m_frameElementsShouldIgnoreScrolling;
+ bool m_containsValidityStyleRules;
String m_title;
+ String m_rawTitle;
bool m_titleSetExplicitly;
RefPtr<Element> m_titleElement;
@@ -1182,23 +1195,25 @@ private:
bool m_useSecureKeyboardEntryWhenActive;
bool m_isXHTML;
+ bool m_isHTML;
unsigned m_numNodeListCaches;
+#if USE(JSC)
JSWrapperCacheMap m_wrapperCacheMap;
-
-#if ENABLE(DATABASE)
- RefPtr<DatabaseThread> m_databaseThread;
- bool m_hasOpenDatabases; // This never changes back to false, even as the database thread is closed.
- typedef HashSet<Database*> DatabaseSet;
- OwnPtr<DatabaseSet> m_openDatabaseSet;
+ JSWrapperCache* m_normalWorldWrapperCache;
#endif
-
+
bool m_usingGeolocation;
+ Timer<Document> m_storageEventTimer;
+ Vector<RefPtr<Event> > m_storageEventQueue;
+
#if ENABLE(WML)
bool m_containsWMLContent;
#endif
+
+ RefPtr<DocumentWeakReference> m_weakReference;
};
inline bool Document::hasElementWithId(AtomicStringImpl* id) const
diff --git a/WebCore/dom/Document.idl b/WebCore/dom/Document.idl
index 69417c8..2b17a13 100644
--- a/WebCore/dom/Document.idl
+++ b/WebCore/dom/Document.idl
@@ -22,12 +22,9 @@ module core {
interface [
CustomToJS,
- GenerateConstructor,
GenerateNativeConverter,
CustomMarkFunction,
- InlineGetOwnPropertySlot,
- InterfaceUUID=48BB95FC-2D08-4c54-BE65-7558736A4CAE,
- ImplementationUUID=FF5CBE81-F817-429c-A6C2-0CCCD2328062
+ InlineGetOwnPropertySlot
] Document : Node {
// DOM Level 1 Core
@@ -81,7 +78,6 @@ module core {
attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString documentURI;
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
// DOM Level 2 Events (DocumentEvents interface)
Event createEvent(in DOMString eventType)
@@ -129,7 +125,6 @@ module core {
in XPathResult inResult)
raises(DOMException);
#endif // ENABLE_XPATH
-#endif // !defined(LANGUAGE_COM)
// Common extensions
@@ -171,9 +166,7 @@ module core {
attribute HTMLElement body
setter raises (DOMException);
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
readonly attribute HTMLHeadElement head;
-#endif
readonly attribute HTMLCollection images;
readonly attribute HTMLCollection applets;
readonly attribute HTMLCollection links;
@@ -194,9 +187,7 @@ module core {
readonly attribute [ConvertNullStringTo=Undefined] DOMString readyState;
Element elementFromPoint(in long x, in long y);
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
Range caretRangeFromPoint(in long x, in long y);
-#endif
// Mozilla extensions
#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
@@ -209,11 +200,9 @@ module core {
readonly attribute [ConvertNullStringTo=Null] DOMString preferredStylesheetSet;
attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString selectedStylesheetSet;
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
#if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT
CSSStyleDeclaration createCSSStyleDeclaration();
#endif
-#endif
#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
// DOM Level 2 Style Interface
@@ -230,11 +219,9 @@ module core {
#endif
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
[V8Custom] DOMObject getCSSCanvasContext(in DOMString contextId, in DOMString name, in long width, in long height);
#endif
-#endif
// HTML 5
NodeList getElementsByClassName(in DOMString tagname);
@@ -252,7 +239,6 @@ module core {
#endif
#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
// Event handler DOM attributes
attribute [DontEnum] EventListener onabort;
attribute [DontEnum] EventListener onblur;
@@ -325,7 +311,10 @@ module core {
attribute [DontEnum] EventListener ontouchmove;
attribute [DontEnum] EventListener ontouchend;
attribute [DontEnum] EventListener ontouchcancel;
+<<<<<<< HEAD
#endif
+=======
+>>>>>>> webkit.org at r54127
#endif
#endif
};
diff --git a/WebCore/dom/DocumentFragment.idl b/WebCore/dom/DocumentFragment.idl
index ff6232f..882b62d 100644
--- a/WebCore/dom/DocumentFragment.idl
+++ b/WebCore/dom/DocumentFragment.idl
@@ -19,11 +19,7 @@
module core {
- interface [
- GenerateConstructor,
- InterfaceUUID=F5C8DAF0-D728-4b2b-9D9C-630621B07D35,
- ImplementationUUID=E57BF71F-3FAA-495c-A307-E288F8E5B2EC
- ] DocumentFragment : Node {
+ interface DocumentFragment : Node {
// NodeSelector - Selector API
Element querySelector(in DOMString selectors)
raises(DOMException);
diff --git a/WebCore/dom/DocumentType.idl b/WebCore/dom/DocumentType.idl
index ef7b5b6..7992dc5 100644
--- a/WebCore/dom/DocumentType.idl
+++ b/WebCore/dom/DocumentType.idl
@@ -20,10 +20,7 @@
module core {
interface [
- GenerateConstructor,
- GenerateNativeConverter,
- InterfaceUUID=20F04535-A423-4273-8CFE-3AD996100D29,
- ImplementationUUID=736D952F-DBAF-458b-834B-F1638700BD88
+ GenerateNativeConverter
] DocumentType : Node {
// DOM Level 1
diff --git a/WebCore/dom/Element.cpp b/WebCore/dom/Element.cpp
index d7f1b11..ac4fdb3 100644
--- a/WebCore/dom/Element.cpp
+++ b/WebCore/dom/Element.cpp
@@ -42,6 +42,7 @@
#include "FrameView.h"
#include "HTMLElement.h"
#include "HTMLNames.h"
+#include "InspectorController.h"
#include "NamedNodeMap.h"
#include "NodeList.h"
#include "NodeRenderStyle.h"
@@ -159,21 +160,6 @@ NamedNodeMap* Element::attributes() const
return attributes(false);
}
-NamedNodeMap* Element::attributes(bool readonly) const
-{
- if (!m_isStyleAttributeValid)
- updateStyleAttribute();
-
-#if ENABLE(SVG)
- if (!m_areSVGAttributesValid)
- updateAnimatedSVGAttribute(String());
-#endif
-
- if (!readonly && !namedAttrMap)
- createAttributeMap();
- return namedAttrMap.get();
-}
-
Node::NodeType Element::nodeType() const
{
return ELEMENT_NODE;
@@ -196,7 +182,7 @@ const AtomicString& Element::getAttribute(const QualifiedName& name) const
#if ENABLE(SVG)
if (!m_areSVGAttributesValid)
- updateAnimatedSVGAttribute(name.localName());
+ updateAnimatedSVGAttribute(name);
#endif
if (namedAttrMap)
@@ -502,8 +488,10 @@ const AtomicString& Element::getAttribute(const String& name) const
updateStyleAttribute();
#if ENABLE(SVG)
- if (!m_areSVGAttributesValid)
- updateAnimatedSVGAttribute(name);
+ if (!m_areSVGAttributesValid) {
+ // We're not passing a namespace argument on purpose. SVGNames::*Attr are defined w/o namespaces as well.
+ updateAnimatedSVGAttribute(QualifiedName(nullAtom, name, nullAtom));
+ }
#endif
if (namedAttrMap)
@@ -532,9 +520,9 @@ void Element::setAttribute(const AtomicString& name, const AtomicString& value,
document()->incDOMTreeVersion();
- if (localName == idAttr.localName())
+ if (localName == idAttributeName().localName())
updateId(old ? old->value() : nullAtom, value);
-
+
if (old && value.isNull())
namedAttrMap->removeAttribute(old->name());
else if (!old && !value.isNull())
@@ -543,6 +531,15 @@ void Element::setAttribute(const AtomicString& name, const AtomicString& value,
old->setValue(value);
attributeChanged(old);
}
+
+#if ENABLE(INSPECTOR)
+ if (Page* page = document()->page()) {
+ if (InspectorController* inspectorController = page->inspectorController()) {
+ if (!m_synchronizingStyleAttribute)
+ inspectorController->didModifyDOMAttr(this);
+ }
+ }
+#endif
}
void Element::setAttribute(const QualifiedName& name, const AtomicString& value, ExceptionCode&)
@@ -552,9 +549,9 @@ void Element::setAttribute(const QualifiedName& name, const AtomicString& value,
// allocate attributemap if necessary
Attribute* old = attributes(false)->getAttributeItem(name);
- if (name == idAttr)
+ if (name == idAttributeName())
updateId(old ? old->value() : nullAtom, value);
-
+
if (old && value.isNull())
namedAttrMap->removeAttribute(name);
else if (!old && !value.isNull())
@@ -563,6 +560,15 @@ void Element::setAttribute(const QualifiedName& name, const AtomicString& value,
old->setValue(value);
attributeChanged(old);
}
+
+#if ENABLE(INSPECTOR)
+ if (Page* page = document()->page()) {
+ if (InspectorController* inspectorController = page->inspectorController()) {
+ if (!m_synchronizingStyleAttribute)
+ inspectorController->didModifyDOMAttr(this);
+ }
+ }
+#endif
}
PassRefPtr<Attribute> Element::createAttribute(const QualifiedName& name, const AtomicString& value)
@@ -578,20 +584,22 @@ void Element::attributeChanged(Attribute* attr, bool)
void Element::updateAfterAttributeChanged(Attribute* attr)
{
- AXObjectCache* axObjectCache = document()->axObjectCache();
- if (!axObjectCache->accessibilityEnabled())
+ if (!AXObjectCache::accessibilityEnabled())
return;
const QualifiedName& attrName = attr->name();
if (attrName == aria_activedescendantAttr) {
// any change to aria-activedescendant attribute triggers accessibility focus change, but document focus remains intact
- axObjectCache->handleActiveDescendantChanged(renderer());
+ document()->axObjectCache()->handleActiveDescendantChanged(renderer());
} else if (attrName == roleAttr) {
// the role attribute can change at any time, and the AccessibilityObject must pick up these changes
- axObjectCache->handleAriaRoleChanged(renderer());
+ document()->axObjectCache()->handleAriaRoleChanged(renderer());
} else if (attrName == aria_valuenowAttr) {
// If the valuenow attribute changes, AX clients need to be notified.
- axObjectCache->postNotification(renderer(), AXObjectCache::AXValueChanged, true);
+ document()->axObjectCache()->postNotification(renderer(), AXObjectCache::AXValueChanged, true);
+ } else if (attrName == aria_labelAttr || attrName == aria_labeledbyAttr || attrName == altAttr || attrName == titleAttr) {
+ // If the content of an element changes due to an attribute change, notify accessibility.
+ document()->axObjectCache()->contentChanged(renderer());
}
}
@@ -600,15 +608,31 @@ void Element::recalcStyleIfNeededAfterAttributeChanged(Attribute* attr)
if (document()->attached() && document()->styleSelector()->hasSelectorForAttribute(attr->name().localName()))
setNeedsStyleRecalc();
}
-
-void Element::setAttributeMap(PassRefPtr<NamedNodeMap> list)
+
+// Returns true is the given attribute is an event handler.
+// We consider an event handler any attribute that begins with "on".
+// It is a simple solution that has the advantage of not requiring any
+// code or configuration change if a new event handler is defined.
+
+static bool isEventHandlerAttribute(const QualifiedName& name)
+{
+ return name.namespaceURI().isNull() && name.localName().startsWith("on");
+}
+
+static bool isAttributeToRemove(const QualifiedName& name, const AtomicString& value)
+{
+ return (name.localName().endsWith(hrefAttr.localName()) || name == srcAttr || name == actionAttr) && protocolIsJavaScript(deprecatedParseURL(value));
+}
+
+void Element::setAttributeMap(PassRefPtr<NamedNodeMap> list, FragmentScriptingPermission scriptingPermission)
{
document()->incDOMTreeVersion();
// If setting the whole map changes the id attribute, we need to call updateId.
- Attribute* oldId = namedAttrMap ? namedAttrMap->getAttributeItem(idAttr) : 0;
- Attribute* newId = list ? list->getAttributeItem(idAttr) : 0;
+ const QualifiedName& idName = idAttributeName();
+ Attribute* oldId = namedAttrMap ? namedAttrMap->getAttributeItem(idName) : 0;
+ Attribute* newId = list ? list->getAttributeItem(idName) : 0;
if (oldId || newId)
updateId(oldId ? oldId->value() : nullAtom, newId ? newId->value() : nullAtom);
@@ -620,6 +644,22 @@ void Element::setAttributeMap(PassRefPtr<NamedNodeMap> list)
if (namedAttrMap) {
namedAttrMap->m_element = this;
+ // If the element is created as result of a paste or drag-n-drop operation
+ // we want to remove all the script and event handlers.
+ if (scriptingPermission == FragmentScriptingNotAllowed) {
+ unsigned i = 0;
+ while (i < namedAttrMap->length()) {
+ const QualifiedName& attributeName = namedAttrMap->m_attributes[i]->name();
+ if (isEventHandlerAttribute(attributeName)) {
+ namedAttrMap->m_attributes.remove(i);
+ continue;
+ }
+
+ if (isAttributeToRemove(attributeName, namedAttrMap->m_attributes[i]->value()))
+ namedAttrMap->m_attributes[i]->setValue(nullAtom);
+ i++;
+ }
+ }
unsigned len = namedAttrMap->length();
for (unsigned i = 0; i < len; i++)
attributeChanged(namedAttrMap->m_attributes[i].get());
@@ -634,7 +674,7 @@ bool Element::hasAttributes() const
#if ENABLE(SVG)
if (!m_areSVGAttributesValid)
- updateAnimatedSVGAttribute(String());
+ updateAnimatedSVGAttribute(anyQName());
#endif
return namedAttrMap && namedAttrMap->length() > 0;
@@ -650,14 +690,14 @@ String Element::nodeNamePreservingCase() const
return m_tagName.toString();
}
-void Element::setPrefix(const AtomicString &_prefix, ExceptionCode& ec)
+void Element::setPrefix(const AtomicString& prefix, ExceptionCode& ec)
{
ec = 0;
- checkSetPrefix(_prefix, ec);
+ checkSetPrefix(prefix, ec);
if (ec)
return;
- m_tagName.setPrefix(_prefix);
+ m_tagName.setPrefix(prefix.isEmpty() ? AtomicString() : prefix);
}
KURL Element::baseURI() const
@@ -713,7 +753,7 @@ void Element::insertedIntoDocument()
if (hasID()) {
if (NamedNodeMap* attrs = namedAttrMap.get()) {
- Attribute* idItem = attrs->getAttributeItem(idAttr);
+ Attribute* idItem = attrs->getAttributeItem(idAttributeName());
if (idItem && !idItem->isNull())
updateId(nullAtom, idItem->value());
}
@@ -724,7 +764,7 @@ void Element::removedFromDocument()
{
if (hasID()) {
if (NamedNodeMap* attrs = namedAttrMap.get()) {
- Attribute* idItem = attrs->getAttributeItem(idAttr);
+ Attribute* idItem = attrs->getAttributeItem(idAttributeName());
if (idItem && !idItem->isNull())
updateId(idItem->value(), nullAtom);
}
@@ -1001,6 +1041,7 @@ void Element::finishParsingChildren()
void Element::dispatchAttrRemovalEvent(Attribute*)
{
ASSERT(!eventDispatchForbidden());
+
#if 0
if (!document()->hasListenerType(Document::DOMATTRMODIFIED_LISTENER))
return;
@@ -1013,6 +1054,7 @@ void Element::dispatchAttrRemovalEvent(Attribute*)
void Element::dispatchAttrAdditionEvent(Attribute*)
{
ASSERT(!eventDispatchForbidden());
+
#if 0
if (!document()->hasListenerType(Document::DOMATTRMODIFIED_LISTENER))
return;
@@ -1047,21 +1089,6 @@ String Element::openTagStartToString() const
return result;
}
-void Element::updateId(const AtomicString& oldId, const AtomicString& newId)
-{
- if (!inDocument())
- return;
-
- if (oldId == newId)
- return;
-
- Document* doc = document();
- if (!oldId.isEmpty())
- doc->removeElementById(oldId, this);
- if (!newId.isEmpty())
- doc->addElementById(newId, this);
-}
-
#ifndef NDEBUG
void Element::formatForDebugger(char* buffer, unsigned length) const
{
@@ -1073,7 +1100,7 @@ void Element::formatForDebugger(char* buffer, unsigned length) const
result += s;
}
- s = getAttribute(idAttr);
+ s = getAttribute(idAttributeName());
if (s.length() > 0) {
if (result.length() > 0)
result += "; ";
@@ -1133,13 +1160,17 @@ PassRefPtr<Attr> Element::removeAttributeNode(Attr* attr, ExceptionCode& ec)
return static_pointer_cast<Attr>(attrs->removeNamedItem(attr->qualifiedName(), ec));
}
-void Element::setAttributeNS(const AtomicString& namespaceURI, const AtomicString& qualifiedName, const AtomicString& value, ExceptionCode& ec)
+void Element::setAttributeNS(const AtomicString& namespaceURI, const AtomicString& qualifiedName, const AtomicString& value, ExceptionCode& ec, FragmentScriptingPermission scriptingPermission)
{
String prefix, localName;
if (!Document::parseQualifiedName(qualifiedName, prefix, localName, ec))
return;
QualifiedName qName(prefix, localName, namespaceURI);
+
+ if (scriptingPermission == FragmentScriptingNotAllowed && (isEventHandlerAttribute(qName) || isAttributeToRemove(qName, value)))
+ return;
+
setAttribute(qName, value, ec);
}
@@ -1152,6 +1183,14 @@ void Element::removeAttribute(const String& name, ExceptionCode& ec)
if (ec == NOT_FOUND_ERR)
ec = 0;
}
+
+#if ENABLE(INSPECTOR)
+ if (Page* page = document()->page()) {
+ if (InspectorController* inspectorController = page->inspectorController())
+ inspectorController->didModifyDOMAttr(this);
+ }
+#endif
+
}
void Element::removeAttributeNS(const String& namespaceURI, const String& localName, ExceptionCode& ec)
@@ -1250,7 +1289,7 @@ void Element::updateFocusAppearance(bool /*restorePreviousSelection*/)
}
}
// FIXME: I'm not sure all devices will want this off, but this is
- // currently turned off for Andriod.
+ // currently turned off for Android.
#if !ENABLE(DIRECTIONAL_PAD_NAVIGATION)
else if (renderer() && !renderer()->isWidget())
renderer()->enclosingLayer()->scrollRectToVisible(getRect());
@@ -1423,7 +1462,7 @@ bool Element::webkitMatchesSelector(const String& selector, ExceptionCode& ec)
KURL Element::getURLAttribute(const QualifiedName& name) const
{
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
if (namedAttrMap) {
if (Attribute* attribute = namedAttrMap->getAttributeItem(name))
ASSERT(isURLAttribute(attribute));
@@ -1432,4 +1471,9 @@ KURL Element::getURLAttribute(const QualifiedName& name) const
return document()->completeURL(deprecatedParseURL(getAttribute(name)));
}
+const QualifiedName& Element::rareIDAttributeName() const
+{
+ return rareData()->m_idAttributeName;
+}
+
} // namespace WebCore
diff --git a/WebCore/dom/Element.h b/WebCore/dom/Element.h
index bc9a7d7..15032d7 100644
--- a/WebCore/dom/Element.h
+++ b/WebCore/dom/Element.h
@@ -26,6 +26,9 @@
#define Element_h
#include "ContainerNode.h"
+#include "Document.h"
+#include "HTMLNames.h"
+#include "MappedAttributeEntry.h"
#include "QualifiedName.h"
#include "ScrollTypes.h"
@@ -71,7 +74,7 @@ public:
DEFINE_ATTRIBUTE_EVENT_LISTENER(select);
DEFINE_ATTRIBUTE_EVENT_LISTENER(submit);
- // These 4 attribute event handler attributes are overrided by HTMLBodyElement
+ // These four attribute event handler attributes are overridden by HTMLBodyElement
// and HTMLFrameSetElement to forward to the DOMWindow.
DEFINE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER(blur);
DEFINE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER(error);
@@ -110,7 +113,9 @@ public:
const AtomicString& getAttributeNS(const String& namespaceURI, const String& localName) const;
void setAttribute(const AtomicString& name, const AtomicString& value, ExceptionCode&);
- void setAttributeNS(const AtomicString& namespaceURI, const AtomicString& qualifiedName, const AtomicString& value, ExceptionCode&);
+ void setAttributeNS(const AtomicString& namespaceURI, const AtomicString& qualifiedName, const AtomicString& value, ExceptionCode&, FragmentScriptingPermission = FragmentScriptingAllowed);
+
+ const QualifiedName& idAttributeName() const;
void scrollIntoView(bool alignToTop = true);
void scrollIntoViewIfNeeded(bool centerIfNeeded = true);
@@ -184,7 +189,7 @@ public:
virtual void attributeChanged(Attribute*, bool preserveDecls = false);
// not part of the DOM
- void setAttributeMap(PassRefPtr<NamedNodeMap>);
+ void setAttributeMap(PassRefPtr<NamedNodeMap>, FragmentScriptingPermission = FragmentScriptingAllowed);
NamedNodeMap* attributeMap() const { return namedAttrMap.get(); }
virtual void copyNonAttributeProperties(const Element* /*source*/) { }
@@ -283,6 +288,7 @@ private:
virtual bool childTypeAllowed(NodeType);
virtual PassRefPtr<Attribute> createAttribute(const QualifiedName&, const AtomicString& value);
+ const QualifiedName& rareIDAttributeName() const;
#ifndef NDEBUG
virtual void formatForDebugger(char* buffer, unsigned length) const;
@@ -295,7 +301,7 @@ private:
virtual void updateStyleAttribute() const { }
#if ENABLE(SVG)
- virtual void updateAnimatedSVGAttribute(const String&) const { }
+ virtual void updateAnimatedSVGAttribute(const QualifiedName&) const { }
#endif
void updateFocusAppearanceSoonAfterAttach();
@@ -340,6 +346,41 @@ inline Element* Node::parentElement() const
return parent && parent->isElementNode() ? static_cast<Element*>(parent) : 0;
}
+inline const QualifiedName& Element::idAttributeName() const
+{
+ return hasRareData() ? rareIDAttributeName() : HTMLNames::idAttr;
+}
+
+inline NamedNodeMap* Element::attributes(bool readonly) const
+{
+ if (!m_isStyleAttributeValid)
+ updateStyleAttribute();
+
+#if ENABLE(SVG)
+ if (!m_areSVGAttributesValid)
+ updateAnimatedSVGAttribute(anyQName());
+#endif
+
+ if (!readonly && !namedAttrMap)
+ createAttributeMap();
+ return namedAttrMap.get();
+}
+
+inline void Element::updateId(const AtomicString& oldId, const AtomicString& newId)
+{
+ if (!inDocument())
+ return;
+
+ if (oldId == newId)
+ return;
+
+ Document* doc = document();
+ if (!oldId.isEmpty())
+ doc->removeElementById(oldId, this);
+ if (!newId.isEmpty())
+ doc->addElementById(newId, this);
+}
+
} //namespace
#endif
diff --git a/WebCore/dom/Element.idl b/WebCore/dom/Element.idl
index 4a223bb..c9b6260 100644
--- a/WebCore/dom/Element.idl
+++ b/WebCore/dom/Element.idl
@@ -22,11 +22,8 @@ module core {
interface [
CustomMarkFunction,
- GenerateConstructor,
GenerateNativeConverter,
- InlineGetOwnPropertySlot,
- InterfaceUUID=FEFE9C21-E58C-4b5b-821A-61A514613763,
- ImplementationUUID=12E5B08E-A680-4baf-9D1E-108AEF7ABBFB
+ InlineGetOwnPropertySlot
] Element : Node {
// DOM Level 1 Core
@@ -67,9 +64,7 @@ module core {
[OldStyleObjC] boolean hasAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI,
in DOMString localName);
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
readonly attribute CSSStyleDeclaration style;
-#endif
// Common extensions
@@ -110,7 +105,6 @@ module core {
NodeList querySelectorAll(in DOMString selectors)
raises(DOMException);
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
// WebKit extension, pending specification.
boolean webkitMatchesSelector(in DOMString selectors)
raises(DOMException);
@@ -121,7 +115,6 @@ module core {
readonly attribute Element previousElementSibling;
readonly attribute Element nextElementSibling;
readonly attribute unsigned long childElementCount;
-#endif
#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
// CSSOM View Module API
@@ -135,7 +128,6 @@ module core {
#endif
#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
// Event handler DOM attributes
attribute [DontEnum] EventListener onabort;
attribute [DontEnum] EventListener onblur;
@@ -208,7 +200,10 @@ module core {
attribute [DontEnum] EventListener ontouchmove;
attribute [DontEnum] EventListener ontouchend;
attribute [DontEnum] EventListener ontouchcancel;
+<<<<<<< HEAD
#endif
+=======
+>>>>>>> webkit.org at r54127
#endif
#endif
};
diff --git a/WebCore/dom/ElementRareData.h b/WebCore/dom/ElementRareData.h
index 94e0499..f23ad8e 100644
--- a/WebCore/dom/ElementRareData.h
+++ b/WebCore/dom/ElementRareData.h
@@ -27,6 +27,8 @@
namespace WebCore {
+using namespace HTMLNames;
+
class ElementRareData : public NodeRareData {
public:
ElementRareData();
@@ -38,6 +40,7 @@ public:
IntSize m_minimumSizeForResizing;
RefPtr<RenderStyle> m_computedStyle;
+ QualifiedName m_idAttributeName;
};
inline IntSize defaultMinimumSizeForResizing()
@@ -47,6 +50,7 @@ inline IntSize defaultMinimumSizeForResizing()
inline ElementRareData::ElementRareData()
: m_minimumSizeForResizing(defaultMinimumSizeForResizing())
+ , m_idAttributeName(idAttr)
{
}
diff --git a/WebCore/dom/Entity.idl b/WebCore/dom/Entity.idl
index b154797..8dacbe9 100644
--- a/WebCore/dom/Entity.idl
+++ b/WebCore/dom/Entity.idl
@@ -19,11 +19,7 @@
module core {
- interface [
- GenerateConstructor,
- InterfaceUUID=5CDB5ACA-F3A7-47ea-B89C-F335E4342C55,
- ImplementationUUID=DDD2A621-59FD-4bb2-9F95-7061C3FB9F06
- ] Entity : Node {
+ interface Entity : Node {
readonly attribute [ConvertNullStringTo=Null] DOMString publicId;
readonly attribute [ConvertNullStringTo=Null] DOMString systemId;
readonly attribute [ConvertNullStringTo=Null] DOMString notationName;
diff --git a/WebCore/dom/EntityReference.idl b/WebCore/dom/EntityReference.idl
index 8a206e9..f652d9a 100644
--- a/WebCore/dom/EntityReference.idl
+++ b/WebCore/dom/EntityReference.idl
@@ -19,11 +19,7 @@
module core {
- interface [
- GenerateConstructor,
- InterfaceUUID=61BF4A03-19FB-4ac4-A624-5BF0893FDA65,
- ImplementationUUID=486E1182-CF4F-450b-B411-A584CA42BBD0
- ] EntityReference : Node {
+ interface EntityReference : Node {
};
}
diff --git a/WebCore/dom/ErrorEvent.idl b/WebCore/dom/ErrorEvent.idl
index 6125e1e..ad13193 100644
--- a/WebCore/dom/ErrorEvent.idl
+++ b/WebCore/dom/ErrorEvent.idl
@@ -32,7 +32,6 @@ module events {
interface [
Conditional=WORKERS,
- GenerateConstructor,
NoStaticTables
] ErrorEvent : Event {
diff --git a/WebCore/dom/Event.idl b/WebCore/dom/Event.idl
index 75b6b5f..d64d122 100644
--- a/WebCore/dom/Event.idl
+++ b/WebCore/dom/Event.idl
@@ -23,11 +23,8 @@ module events {
// Introduced in DOM Level 2:
interface [
CustomToJS,
- GenerateConstructor,
NoStaticTables,
- Polymorphic,
- InterfaceUUID=D17495FA-ACAD-4d27-9362-E19E057B189D,
- ImplementationUUID=CFDCDDB2-5B3F-412d-BDA4-80B23C721549
+ Polymorphic
] Event {
// DOM PhaseType
@@ -61,9 +58,8 @@ module events {
readonly attribute unsigned short eventPhase;
readonly attribute boolean bubbles;
readonly attribute boolean cancelable;
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
readonly attribute DOMTimeStamp timeStamp;
-#endif
+
void stopPropagation();
void preventDefault();
[OldStyleObjC] void initEvent(in DOMString eventTypeArg,
diff --git a/WebCore/dom/EventException.idl b/WebCore/dom/EventException.idl
index 3d82f85..1c8fac6 100644
--- a/WebCore/dom/EventException.idl
+++ b/WebCore/dom/EventException.idl
@@ -30,7 +30,6 @@ module events {
// Introduced in DOM Level 2:
interface [
- GenerateConstructor,
NoStaticTables
] EventException {
diff --git a/WebCore/dom/EventListener.idl b/WebCore/dom/EventListener.idl
index 1edf52f..023777b 100644
--- a/WebCore/dom/EventListener.idl
+++ b/WebCore/dom/EventListener.idl
@@ -25,7 +25,7 @@ module events {
NoStaticTables,
ObjCProtocol,
PureInterface,
- InterfaceUUID=B04F2AE3-71E2-4ebe-ABFE-EF4938354082,
+ OmitConstructor
] EventListener {
void handleEvent(in Event evt);
};
diff --git a/WebCore/dom/EventNames.h b/WebCore/dom/EventNames.h
index c8c3291..4a0a042 100644
--- a/WebCore/dom/EventNames.h
+++ b/WebCore/dom/EventNames.h
@@ -150,10 +150,15 @@ namespace WebCore {
macro(touchmove) \
macro(touchend) \
macro(touchcancel) \
+<<<<<<< HEAD
/* #if PLATFORM(ANDROID) */ \
macro(touchlongpress) \
macro(touchdoubletap) \
/* #endif */ \
+=======
+ \
+ macro(success) \
+>>>>>>> webkit.org at r54127
\
// end of DOM_EVENT_NAMES_FOR_EACH
diff --git a/WebCore/dom/EventTarget.h b/WebCore/dom/EventTarget.h
index 2d77c87..fa5ca09 100644
--- a/WebCore/dom/EventTarget.h
+++ b/WebCore/dom/EventTarget.h
@@ -36,6 +36,7 @@
#include "EventNames.h"
#include "RegisteredEventListener.h"
#include <wtf/Forward.h>
+#include <wtf/HashMap.h>
namespace WebCore {
diff --git a/WebCore/dom/EventTarget.idl b/WebCore/dom/EventTarget.idl
index 844dc32..0cdb6b3 100644
--- a/WebCore/dom/EventTarget.idl
+++ b/WebCore/dom/EventTarget.idl
@@ -24,7 +24,7 @@ module events {
interface [
ObjCProtocol,
PureInterface,
- InterfaceUUID=1D71C7EC-0BA0-4044-BDFD-56B3E8F5F9D4
+ OmitConstructor
] EventTarget {
[OldStyleObjC] void addEventListener(in DOMString type,
in EventListener listener,
diff --git a/WebCore/dom/InputElement.cpp b/WebCore/dom/InputElement.cpp
index c29cb1c..13bb0b2 100644
--- a/WebCore/dom/InputElement.cpp
+++ b/WebCore/dom/InputElement.cpp
@@ -22,6 +22,7 @@
#include "InputElement.h"
#include "BeforeTextInsertedEvent.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
#include "Event.h"
diff --git a/WebCore/dom/InputElement.h b/WebCore/dom/InputElement.h
index 2ae0312..a24b438 100644
--- a/WebCore/dom/InputElement.h
+++ b/WebCore/dom/InputElement.h
@@ -47,6 +47,7 @@ public:
virtual bool searchEventsShouldBeDispatched() const = 0;
virtual int size() const = 0;
+ virtual const String& suggestedValue() const = 0;
virtual String value() const = 0;
virtual void setValue(const String&, bool sendChangeEvent = false) = 0;
virtual void setValueForUser(const String&) = 0;
@@ -92,6 +93,9 @@ public:
String value() const { return m_value; }
void setValue(const String& value) { m_value = value; }
+ const String& suggestedValue() const { return m_suggestedValue; }
+ void setSuggestedValue(const String& value) { m_suggestedValue = value; }
+
int size() const { return m_size; }
void setSize(int value) { m_size = value; }
@@ -107,6 +111,7 @@ public:
private:
AtomicString m_name;
String m_value;
+ String m_suggestedValue;
int m_size;
int m_maxLength;
int m_cachedSelectionStart;
diff --git a/WebCore/dom/KeyboardEvent.idl b/WebCore/dom/KeyboardEvent.idl
index 58e5da7..1af3d02 100644
--- a/WebCore/dom/KeyboardEvent.idl
+++ b/WebCore/dom/KeyboardEvent.idl
@@ -21,9 +21,7 @@
module events {
// Introduced in DOM Level 3:
- interface [
- GenerateConstructor
- ] KeyboardEvent : UIEvent {
+ interface KeyboardEvent : UIEvent {
#if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT
// KeyLocationCode
diff --git a/WebCore/dom/MappedAttributeEntry.h b/WebCore/dom/MappedAttributeEntry.h
index 842e7a8..ce2464e 100644
--- a/WebCore/dom/MappedAttributeEntry.h
+++ b/WebCore/dom/MappedAttributeEntry.h
@@ -47,7 +47,9 @@ enum MappedAttributeEntry {
// When adding new entries, make sure to keep eLastEntry at the end of the list.
, eLastEntry
};
-
+
+enum FragmentScriptingPermission { FragmentScriptingAllowed, FragmentScriptingNotAllowed };
+
}
#endif
diff --git a/WebCore/dom/MessageChannel.idl b/WebCore/dom/MessageChannel.idl
index 4e0892b..bae5b18 100644
--- a/WebCore/dom/MessageChannel.idl
+++ b/WebCore/dom/MessageChannel.idl
@@ -26,7 +26,7 @@
module events {
- interface [CustomMarkFunction, NoStaticTables] MessageChannel {
+ interface [CustomConstructor, CustomMarkFunction, NoStaticTables] MessageChannel {
readonly attribute MessagePort port1;
readonly attribute MessagePort port2;
diff --git a/WebCore/dom/MessageEvent.idl b/WebCore/dom/MessageEvent.idl
index 7e497fc..2b47374 100644
--- a/WebCore/dom/MessageEvent.idl
+++ b/WebCore/dom/MessageEvent.idl
@@ -27,10 +27,9 @@
module events {
interface [
- GenerateConstructor,
NoStaticTables
] MessageEvent : Event {
- readonly attribute SerializedScriptValue data;
+ readonly attribute [CachedAttribute] SerializedScriptValue data;
readonly attribute DOMString origin;
readonly attribute DOMString lastEventId;
diff --git a/WebCore/dom/MessagePort.idl b/WebCore/dom/MessagePort.idl
index a9149ec..62cf63a 100644
--- a/WebCore/dom/MessagePort.idl
+++ b/WebCore/dom/MessagePort.idl
@@ -29,7 +29,6 @@ module events {
interface [
CustomMarkFunction,
EventTarget,
- GenerateConstructor,
NoStaticTables
] MessagePort {
// We need to have something as an ObjC binding, because MessagePort is used in MessageEvent, which already has one,
diff --git a/WebCore/dom/MessagePortChannel.h b/WebCore/dom/MessagePortChannel.h
index 90cb0d9..192cb92 100644
--- a/WebCore/dom/MessagePortChannel.h
+++ b/WebCore/dom/MessagePortChannel.h
@@ -62,7 +62,7 @@ namespace WebCore {
// Creates a new wrapper for the passed channel.
static PassOwnPtr<MessagePortChannel> create(PassRefPtr<PlatformMessagePortChannel>);
- // Entangles the channel with a port (called when a port has been cloned, after the clone has been marshalled to its new owning thread and is ready to receive messages).
+ // Entangles the channel with a port (called when a port has been cloned, after the clone has been marshaled to its new owning thread and is ready to receive messages).
// Returns false if the entanglement failed because the port was closed.
bool entangleIfOpen(MessagePort*);
diff --git a/WebCore/dom/MouseEvent.idl b/WebCore/dom/MouseEvent.idl
index c509459..49385f1 100644
--- a/WebCore/dom/MouseEvent.idl
+++ b/WebCore/dom/MouseEvent.idl
@@ -20,9 +20,7 @@
module events {
// Introduced in DOM Level 2:
- interface [
- GenerateConstructor
- ] MouseEvent : UIEvent {
+ interface MouseEvent : UIEvent {
readonly attribute long screenX;
readonly attribute long screenY;
readonly attribute long clientX;
diff --git a/WebCore/dom/MouseRelatedEvent.cpp b/WebCore/dom/MouseRelatedEvent.cpp
index 87815b1..15d4e43 100644
--- a/WebCore/dom/MouseRelatedEvent.cpp
+++ b/WebCore/dom/MouseRelatedEvent.cpp
@@ -151,7 +151,7 @@ void MouseRelatedEvent::receivedTarget()
}
// Adjust layerX/Y to be relative to the layer.
- // FIXME: We're pretty sure this is the wrong defintion of "layer."
+ // FIXME: We're pretty sure this is the wrong definition of "layer."
// Our RenderLayer is a more modern concept, and layerX/Y is some
// other notion about groups of elements (left over from the Netscape 4 days?);
// we should test and fix this.
diff --git a/WebCore/dom/MutationEvent.idl b/WebCore/dom/MutationEvent.idl
index ea7a4dd..99a6aaa 100644
--- a/WebCore/dom/MutationEvent.idl
+++ b/WebCore/dom/MutationEvent.idl
@@ -20,9 +20,7 @@
module events {
// Introduced in DOM Level 2:
- interface [
- GenerateConstructor
- ] MutationEvent : Event {
+ interface MutationEvent : Event {
// attrChangeType
const unsigned short MODIFICATION = 1;
diff --git a/WebCore/dom/NamedAttrMap.cpp b/WebCore/dom/NamedAttrMap.cpp
index 56b40b9..d8a6ba8 100644
--- a/WebCore/dom/NamedAttrMap.cpp
+++ b/WebCore/dom/NamedAttrMap.cpp
@@ -130,7 +130,7 @@ PassRefPtr<Node> NamedNodeMap::setNamedItem(Node* arg, ExceptionCode& ec)
return 0;
}
- if (a->name() == idAttr)
+ if (attr->isId())
m_element->updateId(old ? old->value() : nullAtom, a->value());
// ### slightly inefficient - resizes attribute array twice.
@@ -155,9 +155,9 @@ PassRefPtr<Node> NamedNodeMap::removeNamedItem(const QualifiedName& name, Except
return 0;
}
- RefPtr<Node> r = a->createAttrIfNeeded(m_element);
+ RefPtr<Attr> r = a->createAttrIfNeeded(m_element);
- if (name == idAttr)
+ if (r->isId())
m_element->updateId(a->value(), nullAtom);
removeAttribute(name);
@@ -172,52 +172,27 @@ PassRefPtr<Node> NamedNodeMap::item(unsigned index) const
return m_attributes[index]->createAttrIfNeeded(m_element);
}
-// We use a boolean parameter instead of calling shouldIgnoreAttributeCase so that the caller
-// can tune the behaviour (hasAttribute is case sensitive whereas getAttribute is not).
-Attribute* NamedNodeMap::getAttributeItem(const String& name, bool shouldIgnoreAttributeCase) const
+Attribute* NamedNodeMap::getAttributeItemSlowCase(const String& name, bool shouldIgnoreAttributeCase) const
{
unsigned len = length();
- bool doSlowCheck = shouldIgnoreAttributeCase;
-
- // Optimize for the case where the attribute exists and its name exactly matches.
+
+ // Continue to checking case-insensitively and/or full namespaced names if necessary:
for (unsigned i = 0; i < len; ++i) {
const QualifiedName& attrName = m_attributes[i]->name();
if (!attrName.hasPrefix()) {
- if (name == attrName.localName())
+ if (shouldIgnoreAttributeCase && equalIgnoringCase(name, attrName.localName()))
+ return m_attributes[i].get();
+ } else {
+ // FIXME: Would be faster to do this comparison without calling toString, which
+ // generates a temporary string by concatenation. But this branch is only reached
+ // if the attribute name has a prefix, which is rare in HTML.
+ if (equalPossiblyIgnoringCase(name, attrName.toString(), shouldIgnoreAttributeCase))
return m_attributes[i].get();
- } else
- doSlowCheck = true;
- }
-
- // Continue to checking case-insensitively and/or full namespaced names if necessary:
- if (doSlowCheck) {
- for (unsigned i = 0; i < len; ++i) {
- const QualifiedName& attrName = m_attributes[i]->name();
- if (!attrName.hasPrefix()) {
- if (shouldIgnoreAttributeCase && equalIgnoringCase(name, attrName.localName()))
- return m_attributes[i].get();
- } else {
- // FIXME: Would be faster to do this comparison without calling toString, which
- // generates a temporary string by concatenation. But this branch is only reached
- // if the attribute name has a prefix, which is rare in HTML.
- if (equalPossiblyIgnoringCase(name, attrName.toString(), shouldIgnoreAttributeCase))
- return m_attributes[i].get();
- }
}
}
return 0;
}
-Attribute* NamedNodeMap::getAttributeItem(const QualifiedName& name) const
-{
- unsigned len = length();
- for (unsigned i = 0; i < len; ++i) {
- if (m_attributes[i]->name().matches(name))
- return m_attributes[i].get();
- }
- return 0;
-}
-
void NamedNodeMap::clearAttributes()
{
detachAttributesFromElement();
@@ -242,8 +217,8 @@ void NamedNodeMap::setAttributes(const NamedNodeMap& other)
// If assigning the map changes the id attribute, we need to call
// updateId.
- Attribute *oldId = getAttributeItem(idAttr);
- Attribute *newId = other.getAttributeItem(idAttr);
+ Attribute* oldId = getAttributeItem(m_element->idAttributeName());
+ Attribute* newId = other.getAttributeItem(m_element->idAttributeName());
if (oldId || newId)
m_element->updateId(oldId ? oldId->value() : nullAtom, newId ? newId->value() : nullAtom);
diff --git a/WebCore/dom/NamedAttrMap.h b/WebCore/dom/NamedAttrMap.h
index 759900b..d5136b5 100644
--- a/WebCore/dom/NamedAttrMap.h
+++ b/WebCore/dom/NamedAttrMap.h
@@ -103,12 +103,45 @@ private:
void detachAttributesFromElement();
void detachFromElement();
Attribute* getAttributeItem(const String& name, bool shouldIgnoreAttributeCase) const;
+ Attribute* getAttributeItemSlowCase(const String& name, bool shouldIgnoreAttributeCase) const;
Element* m_element;
Vector<RefPtr<Attribute> > m_attributes;
AtomicString m_id;
};
+inline Attribute* NamedNodeMap::getAttributeItem(const QualifiedName& name) const
+{
+ unsigned len = length();
+ for (unsigned i = 0; i < len; ++i) {
+ if (m_attributes[i]->name().matches(name))
+ return m_attributes[i].get();
+ }
+ return 0;
+}
+
+// We use a boolean parameter instead of calling shouldIgnoreAttributeCase so that the caller
+// can tune the behaviour (hasAttribute is case sensitive whereas getAttribute is not).
+inline Attribute* NamedNodeMap::getAttributeItem(const String& name, bool shouldIgnoreAttributeCase) const
+{
+ unsigned len = length();
+ bool doSlowCheck = shouldIgnoreAttributeCase;
+
+ // Optimize for the case where the attribute exists and its name exactly matches.
+ for (unsigned i = 0; i < len; ++i) {
+ const QualifiedName& attrName = m_attributes[i]->name();
+ if (!attrName.hasPrefix()) {
+ if (name == attrName.localName())
+ return m_attributes[i].get();
+ } else
+ doSlowCheck = true;
+ }
+
+ if (doSlowCheck)
+ return getAttributeItemSlowCase(name, shouldIgnoreAttributeCase);
+ return 0;
+}
+
} //namespace
#undef id
diff --git a/WebCore/dom/NamedNodeMap.idl b/WebCore/dom/NamedNodeMap.idl
index 8166853..4d36577 100644
--- a/WebCore/dom/NamedNodeMap.idl
+++ b/WebCore/dom/NamedNodeMap.idl
@@ -22,11 +22,8 @@ module core {
interface [
CustomMarkFunction,
- GenerateConstructor,
HasIndexGetter,
- HasNameGetter,
- InterfaceUUID=08DAF7A4-4C32-4709-B72F-622721FF0FB8,
- ImplementationUUID=A1CC9F5B-092D-4a04-96D9-D7718A8D6242
+ HasNameGetter
] NamedNodeMap {
Node getNamedItem(in DOMString name);
diff --git a/WebCore/dom/Node.cpp b/WebCore/dom/Node.cpp
index b48819a..2f0de43 100644
--- a/WebCore/dom/Node.cpp
+++ b/WebCore/dom/Node.cpp
@@ -42,6 +42,7 @@
#include "CString.h"
#include "ChildNodeList.h"
#include "ClassNodeList.h"
+#include "ContextMenuController.h"
#include "DOMImplementation.h"
#include "Document.h"
#include "DynamicNodeList.h"
@@ -58,6 +59,7 @@
#include "InspectorTimelineAgent.h"
#include "KeyboardEvent.h"
#include "Logging.h"
+#include "MappedAttribute.h"
#include "MouseEvent.h"
#include "MutationEvent.h"
#include "NameNodeList.h"
@@ -152,7 +154,7 @@ void Node::dumpStatistics()
size_t attrMaps = 0;
size_t mappedAttrMaps = 0;
- for (HashSet<Node*>::const_iterator it = liveNodeSet.begin(); it != liveNodeSet.end(); ++it) {
+ for (HashSet<Node*>::iterator it = liveNodeSet.begin(); it != liveNodeSet.end(); ++it) {
Node* node = *it;
if (node->hasRareData())
@@ -258,7 +260,7 @@ void Node::dumpStatistics()
printf(" Number of XPathNS nodes: %zu\n", xpathNSNodes);
printf("Element tag name distibution:\n");
- for (HashMap<String, size_t>::const_iterator it = perTagCount.begin(); it != perTagCount.end(); ++it)
+ for (HashMap<String, size_t>::iterator it = perTagCount.begin(); it != perTagCount.end(); ++it)
printf(" Number of <%s> tags: %zu\n", it->first.utf8().data(), it->second);
printf("Attribute Maps:\n");
@@ -429,6 +431,7 @@ Node::Node(Document* document, ConstructionType type)
#if ENABLE(SVG)
, m_areSVGAttributesValid(true)
, m_synchronizingSVGAttributes(false)
+ , m_hasRareSVGData(false)
#endif
{
if (m_document)
@@ -527,6 +530,12 @@ void Node::setDocument(Document* document)
updateDOMNodeDocument(this, m_document, document);
#endif
+ if (hasRareData() && rareData()->nodeLists()) {
+ if (m_document)
+ m_document->removeNodeListCache();
+ document->addNodeListCache();
+ }
+
if (m_document)
m_document->selfOnlyDeref();
@@ -682,7 +691,7 @@ void Node::normalize()
// Merge text nodes.
while (Node* nextSibling = node->nextSibling()) {
- if (!nextSibling->isTextNode())
+ if (nextSibling->nodeType() != TEXT_NODE)
break;
RefPtr<Text> nextText = static_cast<Text*>(nextSibling);
@@ -850,7 +859,7 @@ bool Node::isFocusable() const
ASSERT(!renderer()->needsLayout());
else
// If the node is in a display:none tree it might say it needs style recalc but
- // the whole document is atually up to date.
+ // the whole document is actually up to date.
ASSERT(!document()->childNeedsStyleRecalc());
// FIXME: Even if we are not visible, we might have a child that is visible.
@@ -918,7 +927,10 @@ void Node::notifyLocalNodeListsAttributeChanged()
if (!data->nodeLists())
return;
- data->nodeLists()->invalidateCachesThatDependOnAttributes();
+ if (!isAttributeNode())
+ data->nodeLists()->invalidateCachesThatDependOnAttributes();
+ else
+ data->nodeLists()->invalidateCaches();
if (data->nodeLists()->isEmpty()) {
data->clearNodeLists();
@@ -1041,34 +1053,27 @@ Node* Node::traversePreviousSiblingPostOrder(const Node* stayWithin) const
return 0;
}
-void Node::checkSetPrefix(const AtomicString&, ExceptionCode& ec)
+void Node::checkSetPrefix(const AtomicString& prefix, ExceptionCode& ec)
{
// Perform error checking as required by spec for setting Node.prefix. Used by
// Element::setPrefix() and Attr::setPrefix()
// FIXME: Implement support for INVALID_CHARACTER_ERR: Raised if the specified prefix contains an illegal character.
- // NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
if (isReadOnlyNode()) {
ec = NO_MODIFICATION_ALLOWED_ERR;
return;
}
- // FIXME: Implement NAMESPACE_ERR: - Raised if the specified prefix is malformed
- // We have to comment this out, since it's used for attributes and tag names, and we've only
- // switched one over.
- /*
- // - if the namespaceURI of this node is null,
- // - if the specified prefix is "xml" and the namespaceURI of this node is different from
- // "http://www.w3.org/XML/1998/namespace",
- // - if this node is an attribute and the specified prefix is "xmlns" and
- // the namespaceURI of this node is different from "http://www.w3.org/2000/xmlns/",
- // - or if this node is an attribute and the qualifiedName of this node is "xmlns" [Namespaces].
- if ((namespacePart(id()) == noNamespace && id() > ID_LAST_TAG) ||
- (_prefix == "xml" && String(document()->namespaceURI(id())) != "http://www.w3.org/XML/1998/namespace")) {
+ // FIXME: Raise NAMESPACE_ERR if prefix is malformed per the Namespaces in XML specification.
+
+ const AtomicString& nodeNamespaceURI = namespaceURI();
+ if ((nodeNamespaceURI.isEmpty() && !prefix.isEmpty())
+ || (prefix == xmlAtom && nodeNamespaceURI != XMLNames::xmlNamespaceURI)) {
ec = NAMESPACE_ERR;
return;
- }*/
+ }
+ // Attribute-specific checks are in Attr::setPrefix().
}
bool Node::canReplaceChild(Node* newChild, Node*)
@@ -1472,7 +1477,7 @@ bool Node::canStartSelection() const
Node* Node::shadowAncestorNode()
{
#if ENABLE(SVG)
- // SVG elements living in a shadow tree only occour when <use> created them.
+ // SVG elements living in a shadow tree only occur when <use> created them.
// For these cases we do NOT want to return the shadowParentNode() here
// but the actual shadow tree element - as main difference to the HTML forms
// shadow tree concept. (This function _could_ be made virtual - opinions?)
@@ -1661,7 +1666,6 @@ PassRefPtr<Element> Node::querySelector(const String& selectors, ExceptionCode&
// FIXME: we could also optimize for the the [id="foo"] case
if (strictParsing && inDocument() && querySelectorList.hasOneSelector() && querySelectorList.first()->m_match == CSSSelector::Id) {
- ASSERT(querySelectorList.first()->attribute() == idAttr);
Element* element = document()->getElementById(querySelectorList.first()->m_value);
if (element && (isDocumentNode() || element->isDescendantOf(this)) && selectorChecker.checkSelector(querySelectorList.first(), element))
return element;
@@ -1788,7 +1792,7 @@ bool Node::isDefaultNamespace(const AtomicString& namespaceURIMaybeEmpty) const
for (unsigned i = 0; i < attrs->length(); i++) {
Attribute* attr = attrs->attributeItem(i);
- if (attr->localName() == "xmlns")
+ if (attr->localName() == xmlnsAtom)
return attr->value() == namespaceURI;
}
}
@@ -1874,12 +1878,12 @@ String Node::lookupNamespaceURI(const String &prefix) const
for (unsigned i = 0; i < attrs->length(); i++) {
Attribute *attr = attrs->attributeItem(i);
- if (attr->prefix() == "xmlns" && attr->localName() == prefix) {
+ if (attr->prefix() == xmlnsAtom && attr->localName() == prefix) {
if (!attr->value().isEmpty())
return attr->value();
return String();
- } else if (attr->localName() == "xmlns" && prefix.isNull()) {
+ } else if (attr->localName() == xmlnsAtom && prefix.isNull()) {
if (!attr->value().isEmpty())
return attr->value();
@@ -1929,7 +1933,7 @@ String Node::lookupNamespacePrefix(const AtomicString &_namespaceURI, const Elem
for (unsigned i = 0; i < attrs->length(); i++) {
Attribute *attr = attrs->attributeItem(i);
- if (attr->prefix() == "xmlns" &&
+ if (attr->prefix() == xmlnsAtom &&
attr->value() == _namespaceURI &&
originalElement->lookupNamespaceURI(attr->localName()) == _namespaceURI)
return attr->localName();
@@ -2332,6 +2336,7 @@ ContainerNode* Node::eventParentNode()
return static_cast<ContainerNode*>(parent);
}
+<<<<<<< HEAD
#ifdef ANDROID_INSTRUMENT
static size_t nodeSize = 0;
@@ -2364,6 +2369,20 @@ size_t Node::reportDOMNodesSize()
return nodeSize;
}
#endif
+=======
+Node* Node::enclosingLinkEventParentOrSelf()
+{
+ for (Node* node = this; node; node = node->eventParentNode()) {
+ // For imagemaps, the enclosing link node is the associated area element not the image itself.
+ // So we don't let images be the enclosingLinkNode, even though isLink sometimes returns true
+ // for them.
+ if (node->isLink() && !node->hasTagName(imgTag))
+ return node;
+ }
+
+ return 0;
+}
+>>>>>>> webkit.org at r54127
// --------
@@ -2394,51 +2413,170 @@ void Node::didMoveToNewOwnerDocument()
setDidMoveToNewOwnerDocumentWasCalled(true);
}
-static inline void updateSVGElementInstancesAfterEventListenerChange(Node* referenceNode)
+#if ENABLE(SVG)
+static inline HashSet<SVGElementInstance*> instancesForSVGElement(Node* node)
+{
+ HashSet<SVGElementInstance*> instances;
+
+ ASSERT(node);
+ if (!node->isSVGElement() || node->shadowTreeRootNode())
+ return HashSet<SVGElementInstance*>();
+
+ SVGElement* element = static_cast<SVGElement*>(node);
+ if (!element->isStyled())
+ return HashSet<SVGElementInstance*>();
+
+ SVGStyledElement* styledElement = static_cast<SVGStyledElement*>(element);
+ ASSERT(!styledElement->instanceUpdatesBlocked());
+
+ return styledElement->instancesForElement();
+}
+#endif
+
+static inline bool tryAddEventListener(Node* targetNode, const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
+{
+ if (!targetNode->EventTarget::addEventListener(eventType, listener, useCapture))
+ return false;
+
+ if (Document* document = targetNode->document())
+ document->addListenerTypeIfNeeded(eventType);
+
+ return true;
+}
+
+bool Node::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
{
#if !ENABLE(SVG)
- UNUSED_PARAM(referenceNode);
+ return tryAddEventListener(this, eventType, listener, useCapture);
#else
- ASSERT(referenceNode);
- if (!referenceNode->isSVGElement())
- return;
+ if (!isSVGElement())
+ return tryAddEventListener(this, eventType, listener, useCapture);
- // Elements living inside a <use> shadow tree, never cause any updates!
- if (referenceNode->shadowTreeRootNode())
- return;
+ HashSet<SVGElementInstance*> instances = instancesForSVGElement(this);
+ if (instances.isEmpty())
+ return tryAddEventListener(this, eventType, listener, useCapture);
- // We're possibly (a child of) an element that is referenced by a <use> client
- // If an event listeners changes on a referenced element, update all instances.
- for (Node* node = referenceNode; node; node = node->parentNode()) {
- if (!node->hasID() || !node->isSVGElement())
- continue;
+ RefPtr<EventListener> listenerForRegularTree = listener;
+ RefPtr<EventListener> listenerForShadowTree = listenerForRegularTree;
- SVGElementInstance::invalidateAllInstancesOfElement(static_cast<SVGElement*>(node));
- break;
+ // Add event listener to regular DOM element
+ if (!tryAddEventListener(this, eventType, listenerForRegularTree.release(), useCapture))
+ return false;
+
+ // Add event listener to all shadow tree DOM element instances
+ const HashSet<SVGElementInstance*>::const_iterator end = instances.end();
+ for (HashSet<SVGElementInstance*>::const_iterator it = instances.begin(); it != end; ++it) {
+ ASSERT((*it)->shadowTreeElement());
+ ASSERT((*it)->correspondingElement() == this);
+
+ RefPtr<EventListener> listenerForCurrentShadowTreeElement = listenerForShadowTree;
+ bool result = tryAddEventListener((*it)->shadowTreeElement(), eventType, listenerForCurrentShadowTreeElement.release(), useCapture);
+ ASSERT_UNUSED(result, result);
}
+
+ return true;
#endif
}
-bool Node::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
+static inline bool tryRemoveEventListener(Node* targetNode, const AtomicString& eventType, EventListener* listener, bool useCapture)
{
- if (!EventTarget::addEventListener(eventType, listener, useCapture))
+ if (!targetNode->EventTarget::removeEventListener(eventType, listener, useCapture))
return false;
+<<<<<<< HEAD
if (Document* document = this->document())
document->addListenerTypeIfNeeded(eventType);
updateSVGElementInstancesAfterEventListenerChange(this);
+=======
+ // FIXME: Notify Document that the listener has vanished. We need to keep track of a number of
+ // listeners for each type, not just a bool - see https://bugs.webkit.org/show_bug.cgi?id=33861
+
+>>>>>>> webkit.org at r54127
return true;
}
bool Node::removeEventListener(const AtomicString& eventType, EventListener* listener, bool useCapture)
{
- if (!EventTarget::removeEventListener(eventType, listener, useCapture))
+#if !ENABLE(SVG)
+ return tryRemoveEventListener(this, eventType, listener, useCapture);
+#else
+ if (!isSVGElement())
+ return tryRemoveEventListener(this, eventType, listener, useCapture);
+
+ HashSet<SVGElementInstance*> instances = instancesForSVGElement(this);
+ if (instances.isEmpty())
+ return tryRemoveEventListener(this, eventType, listener, useCapture);
+
+ // EventTarget::removeEventListener creates a PassRefPtr around the given EventListener
+ // object when creating a temporary RegisteredEventListener object used to look up the
+ // event listener in a cache. If we want to be able to call removeEventListener() multiple
+ // times on different nodes, we have to delay its immediate destruction, which would happen
+ // after the first call below.
+ RefPtr<EventListener> protector(listener);
+
+ // Remove event listener from regular DOM element
+ if (!tryRemoveEventListener(this, eventType, listener, useCapture))
return false;
+<<<<<<< HEAD
updateSVGElementInstancesAfterEventListenerChange(this);
+=======
+ // Remove event listener from all shadow tree DOM element instances
+ const HashSet<SVGElementInstance*>::const_iterator end = instances.end();
+ for (HashSet<SVGElementInstance*>::const_iterator it = instances.begin(); it != end; ++it) {
+ ASSERT((*it)->correspondingElement() == this);
+
+ SVGElement* shadowTreeElement = (*it)->shadowTreeElement();
+ ASSERT(shadowTreeElement);
+
+ if (tryRemoveEventListener(shadowTreeElement, eventType, listener, useCapture))
+ continue;
+
+ // This case can only be hit for event listeners created from markup
+ ASSERT(listener->wasCreatedFromMarkup());
+
+ // If the event listener 'listener' has been created from markup and has been fired before
+ // then JSLazyEventListener::parseCode() has been called and m_jsFunction of that listener
+ // has been created (read: it's not 0 anymore). During shadow tree creation, the event
+ // listener DOM attribute has been cloned, and another event listener has been setup in
+ // the shadow tree. If that event listener has not been used yet, m_jsFunction is still 0,
+ // and tryRemoveEventListener() above will fail. Work around that very seldom problem.
+ EventTargetData* data = shadowTreeElement->eventTargetData();
+ ASSERT(data);
+
+ EventListenerMap::iterator result = data->eventListenerMap.find(eventType);
+ ASSERT(result != data->eventListenerMap.end());
+
+ EventListenerVector* entry = result->second;
+ ASSERT(entry);
+
+ unsigned int index = 0;
+ bool foundListener = false;
+
+ EventListenerVector::iterator end = entry->end();
+ for (EventListenerVector::iterator it = entry->begin(); it != end; ++it) {
+ if (!(*it).listener->wasCreatedFromMarkup()) {
+ ++index;
+ continue;
+ }
+
+ foundListener = true;
+ entry->remove(index);
+ break;
+ }
+
+ ASSERT(foundListener);
+
+ if (entry->isEmpty()) {
+ delete entry;
+ data->eventListenerMap.remove(result);
+ }
+ }
+>>>>>>> webkit.org at r54127
return true;
+#endif
}
EventTargetData* Node::eventTargetData()
@@ -2907,6 +3045,23 @@ void Node::defaultEventHandler(Event* event)
if (event->isTextEvent())
if (Frame* frame = document()->frame())
frame->eventHandler()->defaultTextInputEventHandler(static_cast<TextEvent*>(event));
+#if ENABLE(PAN_SCROLLING)
+ } else if (eventType == eventNames().mousedownEvent) {
+ MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
+ if (mouseEvent->button() == MiddleButton) {
+ if (enclosingLinkEventParentOrSelf())
+ return;
+
+ RenderObject* renderer = this->renderer();
+ while (renderer && (!renderer->isBox() || !toRenderBox(renderer)->canBeScrolledAndHasScrollableArea()))
+ renderer = renderer->parent();
+
+ if (renderer) {
+ if (Frame* frame = document()->frame())
+ frame->eventHandler()->startPanScrolling(renderer);
+ }
+ }
+#endif
}
}
diff --git a/WebCore/dom/Node.h b/WebCore/dom/Node.h
index ebf275a..495bca9 100644
--- a/WebCore/dom/Node.h
+++ b/WebCore/dom/Node.h
@@ -27,14 +27,9 @@
#include "EventTarget.h"
#include "KURLHash.h"
-#include "PlatformString.h"
-#include "RegisteredEventListener.h"
+#include "ScriptWrappable.h"
#include "TreeShared.h"
-#include "FloatPoint.h"
-#include <wtf/Assertions.h>
#include <wtf/ListHashSet.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassRefPtr.h>
namespace WebCore {
@@ -46,6 +41,7 @@ class DynamicNodeList;
class Element;
class Event;
class EventListener;
+class FloatPoint;
class Frame;
class IntRect;
class KeyboardEvent;
@@ -81,7 +77,7 @@ const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10;
const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
// this class implements nodes, which can have a parent but no children:
-class Node : public EventTarget, public TreeShared<Node> {
+class Node : public EventTarget, public TreeShared<Node>, public ScriptWrappable {
friend class Document;
public:
enum NodeType {
@@ -206,6 +202,9 @@ public:
// The node's parent for the purpose of event capture and bubbling.
virtual ContainerNode* eventParentNode();
+ // Returns the enclosing event parent node (or self) that, when clicked, would trigger a navigation.
+ Node* enclosingLinkEventParentOrSelf();
+
// Node ancestors when concerned about event flow
void eventAncestors(Vector<RefPtr<ContainerNode> > &ancestors);
@@ -252,7 +251,7 @@ public:
virtual ContainerNode* addChild(PassRefPtr<Node>);
// Called by the parser when this element's close tag is reached,
- // signalling that all child tags have been parsed and added.
+ // signaling that all child tags have been parsed and added.
// This is needed for <applet> and <object> elements, which can't lay themselves out
// until they know all of their nested <param>s. [Radar 3603191, 4040848].
// Also used for script elements and some SVG elements for similar purposes,
@@ -584,7 +583,10 @@ protected:
void setTabIndexExplicitly(short);
bool hasRareData() const { return m_hasRareData; }
-
+#if ENABLE(SVG)
+ bool hasRareSVGData() const { return m_hasRareSVGData; }
+#endif
+
NodeRareData* rareData() const;
NodeRareData* ensureRareData();
@@ -648,9 +650,10 @@ protected:
#if ENABLE(SVG)
mutable bool m_areSVGAttributesValid : 1; // Element
mutable bool m_synchronizingSVGAttributes : 1; // SVGElement
+ bool m_hasRareSVGData : 1; // SVGElement
#endif
- // 11 bits remaining
+ // 10 bits remaining
};
// Used in Node::addSubresourceAttributeURLs() and in addSubresourceStyleURLs()
diff --git a/WebCore/dom/Node.idl b/WebCore/dom/Node.idl
index 45ea132..c6cd4b9 100644
--- a/WebCore/dom/Node.idl
+++ b/WebCore/dom/Node.idl
@@ -25,12 +25,9 @@ module core {
CustomPushEventHandlerScope,
CustomToJS,
EventTarget,
- GenerateConstructor,
GenerateNativeConverter,
InlineGetOwnPropertySlot,
- Polymorphic,
- InterfaceUUID=84BA0D7A-7E3E-4a7b-B6FB-7653E8FB54ED,
- ImplementationUUID=81B47FDB-94B0-40fd-8E0C-FB2A6E53CC04
+ Polymorphic
] Node
#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
: Object, EventTarget
@@ -135,7 +132,6 @@ module core {
#endif /* defined(LANGUAGE_OBJECTIVE_C) */
#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
[Custom] void addEventListener(in DOMString type,
in EventListener listener,
in boolean useCapture);
@@ -145,7 +141,6 @@ module core {
boolean dispatchEvent(in Event event)
raises(EventException);
#endif
-#endif
};
}
diff --git a/WebCore/dom/NodeFilter.idl b/WebCore/dom/NodeFilter.idl
index 3cc5e86..d721f80 100644
--- a/WebCore/dom/NodeFilter.idl
+++ b/WebCore/dom/NodeFilter.idl
@@ -21,7 +21,7 @@
module traversal {
// Introduced in DOM Level 2:
- interface [GenerateConstructor, CustomMarkFunction, CustomNativeConverter, ObjCProtocol] NodeFilter {
+ interface [CustomMarkFunction, CustomNativeConverter, ObjCProtocol] NodeFilter {
// Constants returned by acceptNode
const short FILTER_ACCEPT = 1;
diff --git a/WebCore/dom/NodeIterator.idl b/WebCore/dom/NodeIterator.idl
index 8805d07..e1818a1 100644
--- a/WebCore/dom/NodeIterator.idl
+++ b/WebCore/dom/NodeIterator.idl
@@ -22,8 +22,7 @@ module traversal {
// Introduced in DOM Level 2:
interface [
- CustomMarkFunction,
- GenerateConstructor
+ CustomMarkFunction
] NodeIterator {
readonly attribute Node root;
readonly attribute unsigned long whatToShow;
diff --git a/WebCore/dom/NodeList.idl b/WebCore/dom/NodeList.idl
index cf21cc7..edb2dc7 100644
--- a/WebCore/dom/NodeList.idl
+++ b/WebCore/dom/NodeList.idl
@@ -21,12 +21,9 @@
module core {
interface [
- GenerateConstructor,
HasIndexGetter,
HasNameGetter,
- CustomCall,
- InterfaceUUID=F9A9F6A9-385C-414e-A6F6-E2E0CF574130,
- ImplementationUUID=BBB49E8B-DB1D-4c4a-B970-D300FB4609FA
+ CustomCall
] NodeList {
Node item(in [IsIndex] unsigned long index);
diff --git a/WebCore/dom/Notation.idl b/WebCore/dom/Notation.idl
index a16fde6..96351d2 100644
--- a/WebCore/dom/Notation.idl
+++ b/WebCore/dom/Notation.idl
@@ -19,11 +19,7 @@
module core {
- interface [
- GenerateConstructor,
- InterfaceUUID=6580C703-F5FF-40a7-ACF2-AB80EBC83CA1,
- ImplementationUUID=A52869F7-A3CE-4f4c-8C27-E369C4ED9FF9
- ] Notation : Node {
+ interface Notation : Node {
readonly attribute [ConvertNullStringTo=Null] DOMString publicId;
readonly attribute [ConvertNullStringTo=Null] DOMString systemId;
};
diff --git a/WebCore/dom/OverflowEvent.idl b/WebCore/dom/OverflowEvent.idl
index 4a1bed5..0b4f5c6 100644
--- a/WebCore/dom/OverflowEvent.idl
+++ b/WebCore/dom/OverflowEvent.idl
@@ -24,9 +24,7 @@
*/
module events {
- interface [
- GenerateConstructor
- ] OverflowEvent : Event {
+ interface OverflowEvent : Event {
const unsigned short HORIZONTAL = 0;
const unsigned short VERTICAL = 1;
const unsigned short BOTH = 2;
diff --git a/WebCore/dom/PageTransitionEvent.idl b/WebCore/dom/PageTransitionEvent.idl
index a09f94b..8d70f67 100644
--- a/WebCore/dom/PageTransitionEvent.idl
+++ b/WebCore/dom/PageTransitionEvent.idl
@@ -25,9 +25,7 @@
module events {
- interface [
- GenerateConstructor
- ] PageTransitionEvent : Event {
+ interface PageTransitionEvent : Event {
readonly attribute boolean persisted;
diff --git a/WebCore/dom/PopStateEvent.idl b/WebCore/dom/PopStateEvent.idl
index c6775ec..f9c9a71 100644
--- a/WebCore/dom/PopStateEvent.idl
+++ b/WebCore/dom/PopStateEvent.idl
@@ -26,15 +26,13 @@
module events {
- interface [
- GenerateConstructor
- ] PopStateEvent : Event {
+ interface PopStateEvent : Event {
[Custom] void initPopStateEvent(in DOMString typeArg,
in boolean canBubbleArg,
in boolean cancelableArg,
in any stateArg);
- readonly attribute [CustomGetter] any state;
+ readonly attribute [V8CustomGetter] any state;
};
}
diff --git a/WebCore/dom/Position.cpp b/WebCore/dom/Position.cpp
index 0ff8262..0126835 100644
--- a/WebCore/dom/Position.cpp
+++ b/WebCore/dom/Position.cpp
@@ -498,7 +498,7 @@ Position Position::upstream(EditingBoundaryCrossingRule rule) const
lastNode = currentNode;
}
- // If we've moved to a position that is visually disinct, return the last saved position. There
+ // If we've moved to a position that is visually distinct, return the last saved position. There
// is code below that terminates early if we're *about* to move to a visually distinct position.
if (endsOfNodeAreVisuallyDistinctPositions(currentNode) && currentNode != boundary)
return lastVisible;
@@ -744,13 +744,17 @@ bool Position::isCandidate() const
if (isTableElement(node()) || editingIgnoresContent(node()))
return (atFirstEditingPositionForNode() || atLastEditingPositionForNode()) && !nodeIsUserSelectNone(node()->parent());
- if (!m_anchorNode->hasTagName(htmlTag) && renderer->isBlockFlow()) {
+ if (m_anchorNode->hasTagName(htmlTag))
+ return false;
+
+ if (renderer->isBlockFlow()) {
if (toRenderBlock(renderer)->height() || m_anchorNode->hasTagName(bodyTag)) {
if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer))
return atFirstEditingPositionForNode() && !Position::nodeIsUserSelectNone(node());
return m_anchorNode->isContentEditable() && !Position::nodeIsUserSelectNone(node()) && atEditingBoundary();
}
- }
+ } else
+ return m_anchorNode->isContentEditable() && !Position::nodeIsUserSelectNone(node()) && atEditingBoundary();
return false;
}
@@ -995,7 +999,7 @@ void Position::getInlineBoxAndOffset(EAffinity affinity, TextDirection primaryDi
RenderObject* renderer = node()->renderer();
if (!renderer->isText()) {
- if (renderer->isBlockFlow() && hasRenderedNonAnonymousDescendantsWithHeight(renderer)) {
+ if (!renderer->isRenderButton() && renderer->isBlockFlow() && hasRenderedNonAnonymousDescendantsWithHeight(renderer)) {
bool lastPosition = caretOffset == lastOffsetInNode(node());
Node* startNode = lastPosition ? node()->childNode(caretOffset - 1) : node()->childNode(caretOffset);
while (startNode && (!startNode->renderer() || (startNode->isTextNode() && toRenderText(startNode->renderer())->isAllCollapsibleWhitespace())))
@@ -1009,9 +1013,16 @@ void Position::getInlineBoxAndOffset(EAffinity affinity, TextDirection primaryDi
return;
}
}
- inlineBox = renderer->isBox() ? toRenderBox(renderer)->inlineBoxWrapper() : 0;
- if (!inlineBox || (caretOffset > inlineBox->caretMinOffset() && caretOffset < inlineBox->caretMaxOffset()))
+ inlineBox = 0;
+ if (renderer->isBox()) {
+ inlineBox = toRenderBox(renderer)->inlineBoxWrapper();
+ if (!inlineBox || (caretOffset > inlineBox->caretMinOffset() && caretOffset < inlineBox->caretMaxOffset()))
+ return;
+ } else if (node()->isContentEditable()) {
+ Position pos = positionInParentBeforeNode(node()).upstream();
+ pos.getInlineBoxAndOffset(DOWNSTREAM, primaryDirection, inlineBox, caretOffset);
return;
+ }
} else {
RenderText* textRenderer = toRenderText(renderer);
@@ -1165,8 +1176,10 @@ void Position::formatForDebugger(char* buffer, unsigned length) const
void Position::showTreeForThis() const
{
- if (node())
+ if (node()) {
node()->showTreeForThis();
+ fprintf(stderr, "offset: %d\n", m_offset);
+ }
}
#endif
diff --git a/WebCore/dom/Position.h b/WebCore/dom/Position.h
index 1e0304e..fc5849f 100644
--- a/WebCore/dom/Position.h
+++ b/WebCore/dom/Position.h
@@ -135,7 +135,7 @@ public:
bool atFirstEditingPositionForNode() const;
bool atLastEditingPositionForNode() const;
- // Retuns true if the visually equivalent positions around have different editability
+ // Returns true if the visually equivalent positions around have different editability
bool atEditingBoundary() const;
bool atStartOfTree() const;
diff --git a/WebCore/dom/ProcessingInstruction.cpp b/WebCore/dom/ProcessingInstruction.cpp
index 8adf9aa..d4636b4 100644
--- a/WebCore/dom/ProcessingInstruction.cpp
+++ b/WebCore/dom/ProcessingInstruction.cpp
@@ -139,7 +139,8 @@ void ProcessingInstruction::checkStyleSheet()
// We need to make a synthetic XSLStyleSheet that is embedded. It needs to be able
// to kick off import/include loads that can hang off some parent sheet.
if (m_isXSL) {
- m_sheet = XSLStyleSheet::createEmbedded(this, m_localHref);
+ KURL baseURL = KURL(ParsedURLString, m_localHref);
+ m_sheet = XSLStyleSheet::createEmbedded(this, m_localHref, baseURL);
m_loading = false;
}
#endif
@@ -197,24 +198,27 @@ bool ProcessingInstruction::sheetLoaded()
return false;
}
-void ProcessingInstruction::setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet* sheet)
+void ProcessingInstruction::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet)
{
#if ENABLE(XSLT)
ASSERT(!m_isXSL);
#endif
- RefPtr<CSSStyleSheet> newSheet = CSSStyleSheet::create(this, url, charset);
+ RefPtr<CSSStyleSheet> newSheet = CSSStyleSheet::create(this, href, baseURL, charset);
m_sheet = newSheet;
- parseStyleSheet(sheet->sheetText());
+ // We don't need the cross-origin security check here because we are
+ // getting the sheet text in "strict" mode. This enforces a valid CSS MIME
+ // type.
+ parseStyleSheet(sheet->sheetText(true));
newSheet->setTitle(m_title);
newSheet->setMedia(MediaList::create(newSheet.get(), m_media));
newSheet->setDisabled(m_alternate);
}
#if ENABLE(XSLT)
-void ProcessingInstruction::setXSLStyleSheet(const String& url, const String& sheet)
+void ProcessingInstruction::setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet)
{
ASSERT(m_isXSL);
- m_sheet = XSLStyleSheet::create(this, url);
+ m_sheet = XSLStyleSheet::create(this, href, baseURL);
parseStyleSheet(sheet);
}
#endif
diff --git a/WebCore/dom/ProcessingInstruction.h b/WebCore/dom/ProcessingInstruction.h
index 61af9cf..31f680d 100644
--- a/WebCore/dom/ProcessingInstruction.h
+++ b/WebCore/dom/ProcessingInstruction.h
@@ -76,9 +76,9 @@ private:
virtual void removedFromDocument();
void checkStyleSheet();
- virtual void setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet*);
+ virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet*);
#if ENABLE(XSLT)
- virtual void setXSLStyleSheet(const String& url, const String& sheet);
+ virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet);
#endif
bool isLoading() const;
diff --git a/WebCore/dom/ProcessingInstruction.idl b/WebCore/dom/ProcessingInstruction.idl
index 578b22e..efcc9c1 100644
--- a/WebCore/dom/ProcessingInstruction.idl
+++ b/WebCore/dom/ProcessingInstruction.idl
@@ -20,11 +20,7 @@
module core {
- interface [
- GenerateConstructor,
- InterfaceUUID=5947E8F8-B5CB-4a51-B883-B91F344F1E13,
- ImplementationUUID=7EEC0376-3D76-4643-A964-97B8AC1FB6D3
- ] ProcessingInstruction : Node {
+ interface ProcessingInstruction : Node {
// DOM Level 1
@@ -32,11 +28,8 @@ module core {
attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString data
setter raises(DOMException);
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
// interface LinkStyle from DOM Level 2 Style Sheets
readonly attribute StyleSheet sheet;
-#endif
-
};
}
diff --git a/WebCore/dom/ProgressEvent.idl b/WebCore/dom/ProgressEvent.idl
index 2db72af..afdf3a2 100644
--- a/WebCore/dom/ProgressEvent.idl
+++ b/WebCore/dom/ProgressEvent.idl
@@ -25,9 +25,7 @@
module events {
- interface [
- GenerateConstructor
- ] ProgressEvent : Event {
+ interface ProgressEvent : Event {
readonly attribute boolean lengthComputable;
readonly attribute unsigned long loaded;
readonly attribute unsigned long total;
diff --git a/WebCore/dom/QualifiedName.h b/WebCore/dom/QualifiedName.h
index a7e1fcb..7581ba1 100644
--- a/WebCore/dom/QualifiedName.h
+++ b/WebCore/dom/QualifiedName.h
@@ -22,7 +22,7 @@
#define QualifiedName_h
#include "AtomicString.h"
-#include <wtf/HashFunctions.h>
+#include <wtf/HashTraits.h>
namespace WebCore {
diff --git a/WebCore/dom/Range.cpp b/WebCore/dom/Range.cpp
index 84a46c2..52d1785 100644
--- a/WebCore/dom/Range.cpp
+++ b/WebCore/dom/Range.cpp
@@ -666,7 +666,7 @@ PassRefPtr<DocumentFragment> Range::processContents(ActionType action, Exception
}
// Complex case: Start and end containers are different.
- // There are three possiblities here:
+ // There are three possibilities here:
// 1. Start container == commonRoot (End container must be a descendant)
// 2. End container == commonRoot (Start container must be a descendant)
// 3. Neither is commonRoot, they are both descendants
@@ -1417,7 +1417,7 @@ void Range::surroundContents(PassRefPtr<Node> passNewParent, ExceptionCode& ec)
// although this will fail below for another reason).
if (parentOfNewParent->isCharacterDataNode())
parentOfNewParent = parentOfNewParent->parentNode();
- if (!parentOfNewParent->childTypeAllowed(newParent->nodeType())) {
+ if (!parentOfNewParent || !parentOfNewParent->childTypeAllowed(newParent->nodeType())) {
ec = HIERARCHY_REQUEST_ERR;
return;
}
@@ -1930,3 +1930,17 @@ void Range::getBorderAndTextQuads(Vector<FloatQuad>& quads) const
}
} // namespace WebCore
+
+#ifndef NDEBUG
+
+void showTree(const WebCore::Range* range)
+{
+ if (range && range->boundaryPointsValid()) {
+ WebCore::Position start = range->startPosition();
+ WebCore::Position end = range->endPosition();
+ start.node()->showTreeAndMark(start.node(), "S", end.node(), "E");
+ fprintf(stderr, "start offset: %d, end offset: %d\n", start.deprecatedEditingOffset(), end.deprecatedEditingOffset());
+ }
+}
+
+#endif
diff --git a/WebCore/dom/Range.h b/WebCore/dom/Range.h
index 583f9f0..fd0f66a 100644
--- a/WebCore/dom/Range.h
+++ b/WebCore/dom/Range.h
@@ -158,4 +158,9 @@ inline bool operator!=(const Range& a, const Range& b) { return !(a == b); }
} // namespace
+#ifndef NDEBUG
+// Outside the WebCore namespace for ease of invocation from gdb.
+void showTree(const WebCore::Range*);
+#endif
+
#endif
diff --git a/WebCore/dom/Range.idl b/WebCore/dom/Range.idl
index 9024e09..cd01d61 100644
--- a/WebCore/dom/Range.idl
+++ b/WebCore/dom/Range.idl
@@ -21,7 +21,7 @@
module ranges {
// Introduced in DOM Level 2:
- interface [GenerateConstructor] Range {
+ interface Range {
readonly attribute Node startContainer
getter raises(DOMException);
diff --git a/WebCore/dom/RangeException.idl b/WebCore/dom/RangeException.idl
index d2cf385..100912d 100644
--- a/WebCore/dom/RangeException.idl
+++ b/WebCore/dom/RangeException.idl
@@ -19,9 +19,7 @@
module ranges {
- interface [
- GenerateConstructor
- ] RangeException {
+ interface RangeException {
readonly attribute unsigned short code;
readonly attribute DOMString name;
diff --git a/WebCore/dom/ScriptElement.cpp b/WebCore/dom/ScriptElement.cpp
index 83ed2bb..9a80e16 100644
--- a/WebCore/dom/ScriptElement.cpp
+++ b/WebCore/dom/ScriptElement.cpp
@@ -177,7 +177,7 @@ void ScriptElementData::evaluateScript(const ScriptSourceCode& sourceCode)
return;
if (Frame* frame = m_element->document()->frame()) {
- if (!frame->script()->isEnabled())
+ if (!frame->script()->canExecuteScripts())
return;
m_evaluated = true;
diff --git a/WebCore/dom/ScriptExecutionContext.cpp b/WebCore/dom/ScriptExecutionContext.cpp
index bc71084..c2fe120 100644
--- a/WebCore/dom/ScriptExecutionContext.cpp
+++ b/WebCore/dom/ScriptExecutionContext.cpp
@@ -28,7 +28,9 @@
#include "ScriptExecutionContext.h"
#include "ActiveDOMObject.h"
-#include "Document.h"
+#include "Database.h"
+#include "DatabaseTask.h"
+#include "DatabaseThread.h"
#include "MessagePort.h"
#include "SecurityOrigin.h"
#include "WorkerContext.h"
@@ -56,6 +58,9 @@ public:
};
ScriptExecutionContext::ScriptExecutionContext()
+#if ENABLE(DATABASE)
+ : m_hasOpenDatabases(false)
+#endif
{
}
@@ -72,8 +77,69 @@ ScriptExecutionContext::~ScriptExecutionContext()
ASSERT((*iter)->scriptExecutionContext() == this);
(*iter)->contextDestroyed();
}
+#if ENABLE(DATABASE)
+ if (m_databaseThread) {
+ ASSERT(m_databaseThread->terminationRequested());
+ m_databaseThread = 0;
+ }
+#endif
+}
+
+#if ENABLE(DATABASE)
+
+DatabaseThread* ScriptExecutionContext::databaseThread()
+{
+ if (!m_databaseThread && !m_hasOpenDatabases) {
+ // Create the database thread on first request - but not if at least one database was already opened,
+ // because in that case we already had a database thread and terminated it and should not create another.
+ m_databaseThread = DatabaseThread::create();
+ if (!m_databaseThread->start())
+ m_databaseThread = 0;
+ }
+
+ return m_databaseThread.get();
+}
+
+void ScriptExecutionContext::addOpenDatabase(Database* database)
+{
+ ASSERT(isContextThread());
+ if (!m_openDatabaseSet)
+ m_openDatabaseSet.set(new DatabaseSet());
+
+ ASSERT(!m_openDatabaseSet->contains(database));
+ m_openDatabaseSet->add(database);
+}
+
+void ScriptExecutionContext::removeOpenDatabase(Database* database)
+{
+ ASSERT(isContextThread());
+ ASSERT(m_openDatabaseSet && m_openDatabaseSet->contains(database));
+ if (!m_openDatabaseSet)
+ return;
+ m_openDatabaseSet->remove(database);
+}
+
+void ScriptExecutionContext::stopDatabases(DatabaseTaskSynchronizer* cleanupSync)
+{
+ ASSERT(isContextThread());
+ if (m_openDatabaseSet) {
+ DatabaseSet::iterator i = m_openDatabaseSet->begin();
+ DatabaseSet::iterator end = m_openDatabaseSet->end();
+ for (; i != end; ++i) {
+ (*i)->stop();
+ if (m_databaseThread)
+ m_databaseThread->unscheduleDatabaseTasks(*i);
+ }
+ }
+
+ if (m_databaseThread)
+ m_databaseThread->requestTermination(cleanupSync);
+ else if (cleanupSync)
+ cleanupSync->taskCompleted();
}
+#endif
+
void ScriptExecutionContext::processMessagePortMessagesSoon()
{
postTask(ProcessMessagesSoonTask::create());
diff --git a/WebCore/dom/ScriptExecutionContext.h b/WebCore/dom/ScriptExecutionContext.h
index cf332c3..709bc69 100644
--- a/WebCore/dom/ScriptExecutionContext.h
+++ b/WebCore/dom/ScriptExecutionContext.h
@@ -33,11 +33,17 @@
#include <wtf/HashSet.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
#include <wtf/Threading.h>
namespace WebCore {
class ActiveDOMObject;
+#if ENABLE(DATABASE)
+ class Database;
+ class DatabaseTaskSynchronizer;
+ class DatabaseThread;
+#endif
class DOMTimer;
class MessagePort;
class SecurityOrigin;
@@ -59,6 +65,19 @@ namespace WebCore {
virtual bool isDocument() const { return false; }
virtual bool isWorkerContext() const { return false; }
+#if ENABLE(DATABASE)
+ virtual bool isDatabaseReadOnly() const = 0;
+ virtual void databaseExceededQuota(const String& name) = 0;
+ DatabaseThread* databaseThread();
+ void setHasOpenDatabases() { m_hasOpenDatabases = true; }
+ bool hasOpenDatabases() const { return m_hasOpenDatabases; }
+ void addOpenDatabase(Database*);
+ void removeOpenDatabase(Database*);
+ // When the database cleanup is done, cleanupSync will be signalled.
+ void stopDatabases(DatabaseTaskSynchronizer*);
+#endif
+ virtual bool isContextThread() const = 0;
+
const KURL& url() const { return virtualURL(); }
KURL completeURL(const String& url) const { return virtualCompleteURL(url); }
@@ -97,6 +116,8 @@ namespace WebCore {
public:
virtual ~Task();
virtual void performTask(ScriptExecutionContext*) = 0;
+ // Certain tasks get marked specially so that they aren't discarded, and are executed, when the context is shutting down its message queue.
+ virtual bool isCleanupTask() const { return false; }
};
virtual void postTask(PassOwnPtr<Task>) = 0; // Executes the task on context's thread asynchronously.
@@ -129,6 +150,13 @@ namespace WebCore {
virtual void refScriptExecutionContext() = 0;
virtual void derefScriptExecutionContext() = 0;
+
+#if ENABLE(DATABASE)
+ RefPtr<DatabaseThread> m_databaseThread;
+ bool m_hasOpenDatabases; // This never changes back to false, even after the database thread is closed.
+ typedef HashSet<Database* > DatabaseSet;
+ OwnPtr<DatabaseSet> m_openDatabaseSet;
+#endif
};
} // namespace WebCore
diff --git a/WebCore/dom/SelectElement.cpp b/WebCore/dom/SelectElement.cpp
index 3d2a549..866b6ca 100644
--- a/WebCore/dom/SelectElement.cpp
+++ b/WebCore/dom/SelectElement.cpp
@@ -22,6 +22,7 @@
#include "SelectElement.h"
#include "CharacterNames.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "Element.h"
#include "EventHandler.h"
@@ -49,10 +50,10 @@
// Configure platform-specific behavior when focused pop-up receives arrow/space/return keystroke.
// (PLATFORM(MAC) and PLATFORM(GTK) are always false in Chromium, hence the extra tests.)
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
#define ARROW_KEYS_POP_MENU 1
#define SPACE_OR_RETURN_POP_MENU 0
-#elif PLATFORM(GTK) || (PLATFORM(CHROMIUM) && PLATFORM(LINUX))
+#elif PLATFORM(GTK) || (PLATFORM(CHROMIUM) && OS(LINUX))
#define ARROW_KEYS_POP_MENU 0
#define SPACE_OR_RETURN_POP_MENU 1
#else
@@ -221,28 +222,21 @@ void SelectElement::scrollToSelection(SelectElementData& data, Element* element)
toRenderListBox(renderer)->selectionChanged();
}
-void SelectElement::recalcStyle(SelectElementData& data, Element* element)
+void SelectElement::setOptionsChangedOnRenderer(SelectElementData& data, Element* element)
{
- RenderObject* renderer = element->renderer();
- if (element->childNeedsStyleRecalc() && renderer) {
+ if (RenderObject* renderer = element->renderer()) {
if (data.usesMenuList())
toRenderMenuList(renderer)->setOptionsChanged(true);
else
toRenderListBox(renderer)->setOptionsChanged(true);
- } else if (data.shouldRecalcListItems())
- recalcListItems(data, element);
+ }
}
void SelectElement::setRecalcListItems(SelectElementData& data, Element* element)
{
data.setShouldRecalcListItems(true);
data.setActiveSelectionAnchorIndex(-1); // Manual selection anchor is reset when manipulating the select programmatically.
- if (RenderObject* renderer = element->renderer()) {
- if (data.usesMenuList())
- toRenderMenuList(renderer)->setOptionsChanged(true);
- else
- toRenderListBox(renderer)->setOptionsChanged(true);
- }
+ setOptionsChangedOnRenderer(data, element);
element->setNeedsStyleRecalc();
}
@@ -251,6 +245,8 @@ void SelectElement::recalcListItems(SelectElementData& data, const Element* elem
Vector<Element*>& listItems = data.rawListItems();
listItems.clear();
+ data.setShouldRecalcListItems(false);
+
OptionElement* foundSelected = 0;
for (Node* currentNode = element->firstChild(); currentNode;) {
if (!currentNode->isElementNode()) {
@@ -296,8 +292,6 @@ void SelectElement::recalcListItems(SelectElementData& data, const Element* elem
// <select>'s subtree at this point.
currentNode = currentNode->traverseNextSibling(element);
}
-
- data.setShouldRecalcListItems(false);
}
int SelectElement::selectedIndex(const SelectElementData& data, const Element* element)
@@ -348,6 +342,8 @@ void SelectElement::setSelectedIndex(SelectElementData& data, Element* element,
data.setUserDrivenChange(userDrivenChange);
if (fireOnChangeNow)
menuListOnChange(data, element);
+ if (RenderMenuList* menuList = toRenderMenuList(element->renderer()))
+ menuList->didSetSelectedIndex();
}
if (Frame* frame = element->document()->frame())
@@ -444,7 +440,7 @@ void SelectElement::restoreFormControlState(SelectElementData& data, Element* el
optionElement->setSelectedState(state[i] == 'X');
}
- element->setNeedsStyleRecalc();
+ setOptionsChangedOnRenderer(data, element);
}
void SelectElement::parseMultipleAttribute(SelectElementData& data, Element* element, MappedAttribute* attribute)
@@ -518,6 +514,7 @@ void SelectElement::reset(SelectElementData& data, Element* element)
if (!selectedOption && firstOption && data.usesMenuList())
firstOption->setSelectedState(true);
+ setOptionsChangedOnRenderer(data, element);
element->setNeedsStyleRecalc();
}
@@ -680,7 +677,7 @@ void SelectElement::listBoxDefaultEventHandler(SelectElementData& data, Element*
data.setActiveSelectionState(true);
bool multiSelectKeyPressed = false;
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
multiSelectKeyPressed = mouseEvent->metaKey();
#else
multiSelectKeyPressed = mouseEvent->ctrlKey();
@@ -892,6 +889,8 @@ void SelectElement::typeAheadFind(SelectElementData& data, Element* element, Key
setSelectedIndex(data, element, listToOptionIndex(data, element, index));
if (!data.usesMenuList())
listBoxOnChange(data, element);
+
+ setOptionsChangedOnRenderer(data, element);
element->setNeedsStyleRecalc();
return;
}
@@ -954,7 +953,7 @@ SelectElementData::SelectElementData()
void SelectElementData::checkListItems(const Element* element) const
{
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
const Vector<Element*>& items = m_listItems;
SelectElement::recalcListItems(*const_cast<SelectElementData*>(this), element, false);
ASSERT(items == m_listItems);
diff --git a/WebCore/dom/SelectElement.h b/WebCore/dom/SelectElement.h
index 4cc76a0..6891c22 100644
--- a/WebCore/dom/SelectElement.h
+++ b/WebCore/dom/SelectElement.h
@@ -75,7 +75,6 @@ protected:
static void listBoxOnChange(SelectElementData&, Element*);
static void menuListOnChange(SelectElementData&, Element*);
static void scrollToSelection(SelectElementData&, Element*);
- static void recalcStyle(SelectElementData&, Element*);
static void setRecalcListItems(SelectElementData&, Element*);
static void recalcListItems(SelectElementData&, const Element*, bool updateSelectedStates = true);
static int selectedIndex(const SelectElementData&, const Element*);
@@ -100,6 +99,7 @@ protected:
private:
static void menuListDefaultEventHandler(SelectElementData&, Element*, Event*, HTMLFormElement*);
static void listBoxDefaultEventHandler(SelectElementData&, Element*, Event*, HTMLFormElement*);
+ static void setOptionsChangedOnRenderer(SelectElementData&, Element*);
};
// HTML/WMLSelectElement hold this struct as member variable
diff --git a/WebCore/dom/SelectorNodeList.cpp b/WebCore/dom/SelectorNodeList.cpp
index 85b1238..bc97034 100644
--- a/WebCore/dom/SelectorNodeList.cpp
+++ b/WebCore/dom/SelectorNodeList.cpp
@@ -50,7 +50,6 @@ PassRefPtr<StaticNodeList> createSelectorNodeList(Node* rootNode, const CSSSelec
CSSStyleSelector::SelectorChecker selectorChecker(document, strictParsing);
if (strictParsing && rootNode->inDocument() && onlySelector && onlySelector->m_match == CSSSelector::Id && !document->containsMultipleElementsWithId(onlySelector->m_value)) {
- ASSERT(querySelectorList.first()->attribute() == idAttr);
Element* element = document->getElementById(onlySelector->m_value);
if (element && (rootNode->isDocumentNode() || element->isDescendantOf(rootNode)) && selectorChecker.checkSelector(onlySelector, element))
nodes.append(element);
diff --git a/WebCore/dom/StyleElement.cpp b/WebCore/dom/StyleElement.cpp
index a21959d..f881179 100644
--- a/WebCore/dom/StyleElement.cpp
+++ b/WebCore/dom/StyleElement.cpp
@@ -103,7 +103,7 @@ void StyleElement::createSheet(Element* e, const String& text)
if (screenEval.eval(mediaList.get()) || printEval.eval(mediaList.get())) {
document->addPendingSheet();
setLoading(true);
- m_sheet = CSSStyleSheet::create(e, String(), document->inputEncoding());
+ m_sheet = CSSStyleSheet::create(e, String(), KURL(), document->inputEncoding());
m_sheet->parseString(text, !document->inCompatMode());
m_sheet->setMedia(mediaList.get());
m_sheet->setTitle(e->title());
diff --git a/WebCore/dom/StyledElement.cpp b/WebCore/dom/StyledElement.cpp
index 46ce137..3607963 100644
--- a/WebCore/dom/StyledElement.cpp
+++ b/WebCore/dom/StyledElement.cpp
@@ -234,7 +234,7 @@ void StyledElement::classAttributeChanged(const AtomicString& newClassString)
void StyledElement::parseMappedAttribute(MappedAttribute *attr)
{
- if (attr->name() == idAttr) {
+ if (attr->name() == idAttributeName()) {
// unique id
setHasID(!attr->isNull());
if (namedAttrMap) {
@@ -346,7 +346,7 @@ void StyledElement::addCSSColor(MappedAttribute* attr, int id, const String& c)
// not something that fits the specs.
// we're emulating IEs color parser here. It maps transparent to black, otherwise it tries to build a rgb value
- // out of everyhting you put in. The algorithm is experimentally determined, but seems to work for all test cases I have.
+ // out of everything you put in. The algorithm is experimentally determined, but seems to work for all test cases I have.
// the length of the color value is rounded up to the next
// multiple of 3. each part of the rgb triple then gets one third
diff --git a/WebCore/dom/Text.idl b/WebCore/dom/Text.idl
index 1b0009d..116eab7 100644
--- a/WebCore/dom/Text.idl
+++ b/WebCore/dom/Text.idl
@@ -19,11 +19,7 @@
module core {
- interface [
- GenerateConstructor,
- InterfaceUUID=4EA6B89C-F8E5-462a-A807-519446123184,
- ImplementationUUID=CB5D61CB-D30D-486e-9BD7-F42B7611C2E5
- ] Text : CharacterData {
+ interface Text : CharacterData {
// DOM Level 1
diff --git a/WebCore/dom/TextEvent.idl b/WebCore/dom/TextEvent.idl
index 779afd1..83b0e3b 100644
--- a/WebCore/dom/TextEvent.idl
+++ b/WebCore/dom/TextEvent.idl
@@ -26,9 +26,7 @@
module events {
// Introduced in DOM Level 3:
- interface [
- GenerateConstructor
- ] TextEvent : UIEvent {
+ interface TextEvent : UIEvent {
readonly attribute DOMString data;
diff --git a/WebCore/dom/Touch.idl b/WebCore/dom/Touch.idl
index 29bf18d..e684d1f 100644
--- a/WebCore/dom/Touch.idl
+++ b/WebCore/dom/Touch.idl
@@ -26,8 +26,12 @@
module events {
interface [
+<<<<<<< HEAD
Conditional=TOUCH_EVENTS,
GenerateConstructor
+=======
+ Conditional=TOUCH_EVENTS
+>>>>>>> webkit.org at r54127
] Touch {
readonly attribute long clientX;
readonly attribute long clientY;
diff --git a/WebCore/dom/TouchEvent.cpp b/WebCore/dom/TouchEvent.cpp
index 1fbba6c..f06efb6 100644
--- a/WebCore/dom/TouchEvent.cpp
+++ b/WebCore/dom/TouchEvent.cpp
@@ -40,10 +40,13 @@ TouchEvent::TouchEvent(TouchList* touches, TouchList* targetTouches,
, m_touches(touches)
, m_targetTouches(targetTouches)
, m_changedTouches(changedTouches)
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
, m_longPressPrevented(false)
, m_doubleTapPrevented(false)
#endif
+=======
+>>>>>>> webkit.org at r54127
{
}
diff --git a/WebCore/dom/TouchEvent.h b/WebCore/dom/TouchEvent.h
index abc1ee2..263dc36 100644
--- a/WebCore/dom/TouchEvent.h
+++ b/WebCore/dom/TouchEvent.h
@@ -60,6 +60,7 @@ public:
TouchList* targetTouches() const { return m_targetTouches.get(); }
TouchList* changedTouches() const { return m_changedTouches.get(); }
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
bool longPressPrevented() const { return m_longPressPrevented; }
void preventLongPress() { m_longPressPrevented = true; }
@@ -70,6 +71,8 @@ public:
void setDoubleTapPrevented(bool prevented) { m_doubleTapPrevented = prevented; }
#endif
+=======
+>>>>>>> webkit.org at r54127
private:
TouchEvent() {}
TouchEvent(TouchList* touches, TouchList* targetTouches,
@@ -83,11 +86,14 @@ private:
RefPtr<TouchList> m_touches;
RefPtr<TouchList> m_targetTouches;
RefPtr<TouchList> m_changedTouches;
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
bool m_longPressPrevented;
bool m_doubleTapPrevented;
#endif
+=======
+>>>>>>> webkit.org at r54127
};
} // namespace WebCore
diff --git a/WebCore/dom/TouchEvent.idl b/WebCore/dom/TouchEvent.idl
index 010c36f..b46d68f 100644
--- a/WebCore/dom/TouchEvent.idl
+++ b/WebCore/dom/TouchEvent.idl
@@ -26,8 +26,12 @@
module events {
interface [
+<<<<<<< HEAD
Conditional=TOUCH_EVENTS,
GenerateConstructor
+=======
+ Conditional=TOUCH_EVENTS
+>>>>>>> webkit.org at r54127
] TouchEvent : UIEvent {
readonly attribute TouchList touches;
readonly attribute TouchList targetTouches;
diff --git a/WebCore/dom/TouchList.h b/WebCore/dom/TouchList.h
index f5033c9..a578e4c 100644
--- a/WebCore/dom/TouchList.h
+++ b/WebCore/dom/TouchList.h
@@ -28,9 +28,15 @@
#if ENABLE(TOUCH_EVENTS)
+<<<<<<< HEAD
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
#include "Touch.h"
+=======
+#include "Touch.h"
+#include <wtf/RefCounted.h>
+#include <wtf/Vector.h>
+>>>>>>> webkit.org at r54127
namespace WebCore {
diff --git a/WebCore/dom/TouchList.idl b/WebCore/dom/TouchList.idl
index c2aa58a..4bb9e81 100644
--- a/WebCore/dom/TouchList.idl
+++ b/WebCore/dom/TouchList.idl
@@ -27,7 +27,10 @@ module events {
interface [
Conditional=TOUCH_EVENTS,
+<<<<<<< HEAD
GenerateConstructor,
+=======
+>>>>>>> webkit.org at r54127
HasIndexGetter
] TouchList {
readonly attribute unsigned long length;
diff --git a/WebCore/dom/TransformSourceLibxslt.cpp b/WebCore/dom/TransformSourceLibxslt.cpp
index 33a85e8..e058438 100644
--- a/WebCore/dom/TransformSourceLibxslt.cpp
+++ b/WebCore/dom/TransformSourceLibxslt.cpp
@@ -24,6 +24,8 @@
*/
#include "config.h"
+
+#if ENABLE(XSLT)
#include "TransformSource.h"
#include <libxml/tree.h>
@@ -41,3 +43,5 @@ TransformSource::~TransformSource()
}
}
+
+#endif
diff --git a/WebCore/dom/TreeWalker.idl b/WebCore/dom/TreeWalker.idl
index 4ff969e..f591128 100644
--- a/WebCore/dom/TreeWalker.idl
+++ b/WebCore/dom/TreeWalker.idl
@@ -22,8 +22,7 @@ module traversal {
// Introduced in DOM Level 2:
interface [
- CustomMarkFunction,
- GenerateConstructor
+ CustomMarkFunction
] TreeWalker {
readonly attribute Node root;
readonly attribute unsigned long whatToShow;
diff --git a/WebCore/dom/UIEvent.idl b/WebCore/dom/UIEvent.idl
index 36d0988..88dc108 100644
--- a/WebCore/dom/UIEvent.idl
+++ b/WebCore/dom/UIEvent.idl
@@ -20,9 +20,7 @@
module events {
// Introduced in DOM Level 2:
- interface [
- GenerateConstructor
- ] UIEvent : Event {
+ interface UIEvent : Event {
readonly attribute DOMWindow view;
readonly attribute long detail;
diff --git a/WebCore/dom/WebKitAnimationEvent.idl b/WebCore/dom/WebKitAnimationEvent.idl
index f874995..86ffcc5 100644
--- a/WebCore/dom/WebKitAnimationEvent.idl
+++ b/WebCore/dom/WebKitAnimationEvent.idl
@@ -25,9 +25,7 @@
module events {
- interface [
- GenerateConstructor
- ] WebKitAnimationEvent : Event {
+ interface WebKitAnimationEvent : Event {
readonly attribute DOMString animationName;
readonly attribute double elapsedTime;
void initWebKitAnimationEvent(in DOMString typeArg,
diff --git a/WebCore/dom/WebKitTransitionEvent.idl b/WebCore/dom/WebKitTransitionEvent.idl
index 8c645cb..fa619fa 100644
--- a/WebCore/dom/WebKitTransitionEvent.idl
+++ b/WebCore/dom/WebKitTransitionEvent.idl
@@ -25,9 +25,7 @@
module events {
- interface [
- GenerateConstructor
- ] WebKitTransitionEvent : Event {
+ interface WebKitTransitionEvent : Event {
readonly attribute DOMString propertyName;
readonly attribute double elapsedTime;
void initWebKitTransitionEvent(in DOMString typeArg,
diff --git a/WebCore/dom/WheelEvent.idl b/WebCore/dom/WheelEvent.idl
index 4cba4ac..a8481a0 100644
--- a/WebCore/dom/WheelEvent.idl
+++ b/WebCore/dom/WheelEvent.idl
@@ -21,9 +21,7 @@
module events {
// Based off of proposed IDL interface for WheelEvent:
- interface [
- GenerateConstructor
- ] WheelEvent : UIEvent {
+ interface WheelEvent : UIEvent {
readonly attribute long screenX;
readonly attribute long screenY;
readonly attribute long clientX;
diff --git a/WebCore/dom/XMLTokenizer.cpp b/WebCore/dom/XMLTokenizer.cpp
index 56f8ff4..1c43322 100644
--- a/WebCore/dom/XMLTokenizer.cpp
+++ b/WebCore/dom/XMLTokenizer.cpp
@@ -134,8 +134,8 @@ void XMLTokenizer::write(const SegmentedString& s, bool /*appendData*/)
doWrite(s.toString());
- // After parsing, go ahead and dispatch image beforeload/load events.
- ImageLoader::dispatchPendingEvents();
+ // After parsing, go ahead and dispatch image beforeload events.
+ ImageLoader::dispatchPendingBeforeLoadEvents();
}
void XMLTokenizer::handleError(ErrorType type, const char* m, int lineNumber, int columnNumber)
diff --git a/WebCore/dom/XMLTokenizer.h b/WebCore/dom/XMLTokenizer.h
index 2f9c113..92e2830 100644
--- a/WebCore/dom/XMLTokenizer.h
+++ b/WebCore/dom/XMLTokenizer.h
@@ -136,6 +136,7 @@ bool parseXMLDocumentFragment(const String&, DocumentFragment*, Element* parent
#include "CachedResourceClient.h"
#include "CachedResourceHandle.h"
+#include "MappedAttributeEntry.h"
#include "SegmentedString.h"
#include "StringHash.h"
#include "Tokenizer.h"
@@ -143,7 +144,7 @@ bool parseXMLDocumentFragment(const String&, DocumentFragment*, Element* parent
#include <wtf/OwnPtr.h>
#if USE(QXMLSTREAM)
-#include <QtXml/qxmlstream.h>
+#include <qxmlstream.h>
#else
#include <libxml/tree.h>
#include <libxml/xmlstring.h>
@@ -181,7 +182,7 @@ namespace WebCore {
class XMLTokenizer : public Tokenizer, public CachedResourceClient {
public:
XMLTokenizer(Document*, FrameView* = 0);
- XMLTokenizer(DocumentFragment*, Element*);
+ XMLTokenizer(DocumentFragment*, Element*, FragmentScriptingPermission);
~XMLTokenizer();
enum ErrorType { warning, nonFatal, fatal };
@@ -247,7 +248,7 @@ public:
void endDocument();
#endif
private:
- friend bool parseXMLDocumentFragment(const String& chunk, DocumentFragment* fragment, Element* parent);
+ friend bool parseXMLDocumentFragment(const String&, DocumentFragment*, Element*, FragmentScriptingPermission);
void initializeParserContext(const char* chunk = 0);
@@ -308,6 +309,7 @@ public:
typedef HashMap<String, String> PrefixForNamespaceMap;
PrefixForNamespaceMap m_prefixToNamespaceMap;
SegmentedString m_pendingSrc;
+ FragmentScriptingPermission m_scriptingPermission;
};
#if ENABLE(XSLT)
@@ -315,7 +317,7 @@ void* xmlDocPtrForString(DocLoader*, const String& source, const String& url);
#endif
HashMap<String, String> parseAttributes(const String&, bool& attrsOK);
-bool parseXMLDocumentFragment(const String&, DocumentFragment*, Element* parent = 0);
+bool parseXMLDocumentFragment(const String&, DocumentFragment*, Element* parent = 0, FragmentScriptingPermission = FragmentScriptingAllowed);
} // namespace WebCore
diff --git a/WebCore/dom/XMLTokenizerLibxml2.cpp b/WebCore/dom/XMLTokenizerLibxml2.cpp
index 42c8b9b..fcb3718 100644
--- a/WebCore/dom/XMLTokenizerLibxml2.cpp
+++ b/WebCore/dom/XMLTokenizerLibxml2.cpp
@@ -51,6 +51,7 @@
#include "ScriptValue.h"
#include "TextResourceDecoder.h"
#include "TransformSource.h"
+#include "XMLNSNames.h"
#include "XMLTokenizerScope.h"
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
@@ -168,11 +169,11 @@ public:
m_callbacks.append(callback);
}
- void appendErrorCallback(XMLTokenizer::ErrorType type, const char* message, int lineNumber, int columnNumber)
+ void appendErrorCallback(XMLTokenizer::ErrorType type, const xmlChar* message, int lineNumber, int columnNumber)
{
PendingErrorCallback* callback = new PendingErrorCallback;
- callback->message = strdup(message);
+ callback->message = xmlStrdup(message);
callback->type = type;
callback->lineNumber = lineNumber;
callback->columnNumber = columnNumber;
@@ -315,16 +316,16 @@ private:
struct PendingErrorCallback: public PendingCallback {
virtual ~PendingErrorCallback()
{
- free(message);
+ xmlFree(message);
}
virtual void call(XMLTokenizer* tokenizer)
{
- tokenizer->handleError(type, message, lineNumber, columnNumber);
+ tokenizer->handleError(type, reinterpret_cast<char*>(message), lineNumber, columnNumber);
}
XMLTokenizer::ErrorType type;
- char* message;
+ xmlChar* message;
int lineNumber;
int columnNumber;
};
@@ -547,10 +548,11 @@ XMLTokenizer::XMLTokenizer(Document* _doc, FrameView* _view)
, m_pendingScript(0)
, m_scriptStartLine(0)
, m_parsingFragment(false)
+ , m_scriptingPermission(FragmentScriptingAllowed)
{
}
-XMLTokenizer::XMLTokenizer(DocumentFragment* fragment, Element* parentElement)
+XMLTokenizer::XMLTokenizer(DocumentFragment* fragment, Element* parentElement, FragmentScriptingPermission scriptingPermission)
: m_doc(fragment->document())
, m_view(0)
, m_context(0)
@@ -573,6 +575,7 @@ XMLTokenizer::XMLTokenizer(DocumentFragment* fragment, Element* parentElement)
, m_pendingScript(0)
, m_scriptStartLine(0)
, m_parsingFragment(true)
+ , m_scriptingPermission(scriptingPermission)
{
fragment->ref();
if (m_doc)
@@ -596,9 +599,9 @@ XMLTokenizer::XMLTokenizer(DocumentFragment* fragment, Element* parentElement)
if (NamedNodeMap* attrs = element->attributes()) {
for (unsigned i = 0; i < attrs->length(); i++) {
Attribute* attr = attrs->attributeItem(i);
- if (attr->localName() == "xmlns")
+ if (attr->localName() == xmlnsAtom)
m_defaultNamespaceURI = attr->value();
- else if (attr->prefix() == "xmlns")
+ else if (attr->prefix() == xmlnsAtom)
m_prefixToNamespaceMap.set(attr->localName(), attr->value());
}
}
@@ -674,15 +677,15 @@ struct _xmlSAX2Namespace {
};
typedef struct _xmlSAX2Namespace xmlSAX2Namespace;
-static inline void handleElementNamespaces(Element* newElement, const xmlChar** libxmlNamespaces, int nb_namespaces, ExceptionCode& ec)
+static inline void handleElementNamespaces(Element* newElement, const xmlChar** libxmlNamespaces, int nb_namespaces, ExceptionCode& ec, FragmentScriptingPermission scriptingPermission)
{
xmlSAX2Namespace* namespaces = reinterpret_cast<xmlSAX2Namespace*>(libxmlNamespaces);
for (int i = 0; i < nb_namespaces; i++) {
- String namespaceQName = "xmlns";
+ AtomicString namespaceQName = xmlnsAtom;
String namespaceURI = toString(namespaces[i].uri);
if (namespaces[i].prefix)
namespaceQName = "xmlns:" + toString(namespaces[i].prefix);
- newElement->setAttributeNS("http://www.w3.org/2000/xmlns/", namespaceQName, namespaceURI, ec);
+ newElement->setAttributeNS(XMLNSNames::xmlnsNamespaceURI, namespaceQName, namespaceURI, ec, scriptingPermission);
if (ec) // exception setting attributes
return;
}
@@ -697,7 +700,7 @@ struct _xmlSAX2Attributes {
};
typedef struct _xmlSAX2Attributes xmlSAX2Attributes;
-static inline void handleElementAttributes(Element* newElement, const xmlChar** libxmlAttributes, int nb_attributes, ExceptionCode& ec)
+static inline void handleElementAttributes(Element* newElement, const xmlChar** libxmlAttributes, int nb_attributes, ExceptionCode& ec, FragmentScriptingPermission scriptingPermission)
{
xmlSAX2Attributes* attributes = reinterpret_cast<xmlSAX2Attributes*>(libxmlAttributes);
for (int i = 0; i < nb_attributes; i++) {
@@ -708,7 +711,7 @@ static inline void handleElementAttributes(Element* newElement, const xmlChar**
String attrURI = attrPrefix.isEmpty() ? String() : toString(attributes[i].uri);
String attrQName = attrPrefix.isEmpty() ? attrLocalName : attrPrefix + ":" + attrLocalName;
- newElement->setAttributeNS(attrURI, attrQName, attrValue, ec);
+ newElement->setAttributeNS(attrURI, attrQName, attrValue, ec, scriptingPermission);
if (ec) // exception setting attributes
return;
}
@@ -776,17 +779,17 @@ void XMLTokenizer::startElementNs(const xmlChar* xmlLocalName, const xmlChar* xm
}
ExceptionCode ec = 0;
- handleElementNamespaces(newElement.get(), libxmlNamespaces, nb_namespaces, ec);
+ handleElementNamespaces(newElement.get(), libxmlNamespaces, nb_namespaces, ec, m_scriptingPermission);
if (ec) {
stopParsing();
return;
}
ScriptController* jsProxy = m_doc->frame() ? m_doc->frame()->script() : 0;
- if (jsProxy && m_doc->frame()->script()->isEnabled())
+ if (jsProxy && m_doc->frame()->script()->canExecuteScripts())
jsProxy->setEventHandlerLineNumber(lineNumber());
- handleElementAttributes(newElement.get(), libxmlAttributes, nb_attributes, ec);
+ handleElementAttributes(newElement.get(), libxmlAttributes, nb_attributes, ec, m_scriptingPermission);
if (ec) {
stopParsing();
return;
@@ -810,7 +813,7 @@ void XMLTokenizer::startElementNs(const xmlChar* xmlLocalName, const xmlChar* xm
if (m_view && !newElement->attached())
newElement->attach();
- if (isFirstElement && m_doc->frame())
+ if (!m_parsingFragment && isFirstElement && m_doc->frame())
m_doc->frame()->loader()->dispatchDocumentElementAvailable();
}
@@ -829,6 +832,13 @@ void XMLTokenizer::endElementNs()
Node* n = m_currentNode;
n->finishParsingChildren();
+ if (m_scriptingPermission == FragmentScriptingNotAllowed && n->isElementNode() && toScriptElement(static_cast<Element*>(n))) {
+ popCurrentNode();
+ ExceptionCode ec;
+ n->remove(ec);
+ return;
+ }
+
if (!n->isElementNode() || !m_view) {
popCurrentNode();
return;
@@ -899,7 +909,7 @@ void XMLTokenizer::error(ErrorType type, const char* message, va_list args)
if (m_parserStopped)
return;
-#if COMPILER(MSVC)
+#if COMPILER(MSVC) || COMPILER(RVCT)
char m[1024];
vsnprintf(m, sizeof(m) - 1, message, args);
#else
@@ -909,11 +919,11 @@ void XMLTokenizer::error(ErrorType type, const char* message, va_list args)
#endif
if (m_parserPaused)
- m_pendingCallbacks->appendErrorCallback(type, m, lineNumber(), columnNumber());
+ m_pendingCallbacks->appendErrorCallback(type, reinterpret_cast<const xmlChar*>(m), lineNumber(), columnNumber());
else
handleError(type, m, lineNumber(), columnNumber());
-#if !COMPILER(MSVC)
+#if !COMPILER(MSVC) && !COMPILER(RVCT)
free(m);
#endif
}
@@ -1380,12 +1390,12 @@ void XMLTokenizer::resumeParsing()
end();
}
-bool parseXMLDocumentFragment(const String& chunk, DocumentFragment* fragment, Element* parent)
+bool parseXMLDocumentFragment(const String& chunk, DocumentFragment* fragment, Element* parent, FragmentScriptingPermission scriptingPermission)
{
if (!chunk.length())
return true;
- XMLTokenizer tokenizer(fragment, parent);
+ XMLTokenizer tokenizer(fragment, parent, scriptingPermission);
CString chunkAsUtf8 = chunk.utf8();
tokenizer.initializeParserContext(chunkAsUtf8.data());
diff --git a/WebCore/dom/XMLTokenizerQt.cpp b/WebCore/dom/XMLTokenizerQt.cpp
index 4e61715..5335b07 100644
--- a/WebCore/dom/XMLTokenizerQt.cpp
+++ b/WebCore/dom/XMLTokenizerQt.cpp
@@ -100,11 +100,12 @@ XMLTokenizer::XMLTokenizer(Document* _doc, FrameView* _view)
, m_pendingScript(0)
, m_scriptStartLine(0)
, m_parsingFragment(false)
+ , m_scriptingPermission(FragmentScriptingAllowed)
{
m_stream.setEntityResolver(new EntityResolver);
}
-XMLTokenizer::XMLTokenizer(DocumentFragment* fragment, Element* parentElement)
+XMLTokenizer::XMLTokenizer(DocumentFragment* fragment, Element* parentElement, FragmentScriptingPermission permission)
: m_doc(fragment->document())
, m_view(0)
, m_wroteText(false)
@@ -126,6 +127,7 @@ XMLTokenizer::XMLTokenizer(DocumentFragment* fragment, Element* parentElement)
, m_pendingScript(0)
, m_scriptStartLine(0)
, m_parsingFragment(true)
+ , m_scriptingPermission(permission)
{
fragment->ref();
if (m_doc)
@@ -256,12 +258,12 @@ void XMLTokenizer::resumeParsing()
end();
}
-bool parseXMLDocumentFragment(const String& chunk, DocumentFragment* fragment, Element* parent)
+bool parseXMLDocumentFragment(const String& chunk, DocumentFragment* fragment, Element* parent, FragmentScriptingPermission scriptingPermission)
{
if (!chunk.length())
return true;
- XMLTokenizer tokenizer(fragment, parent);
+ XMLTokenizer tokenizer(fragment, parent, scriptingPermission);
tokenizer.write(String("<qxmlstreamdummyelement>"), false);
tokenizer.write(chunk, false);
@@ -322,19 +324,20 @@ static inline String prefixFromQName(const QString& qName)
}
static inline void handleElementNamespaces(Element* newElement, const QXmlStreamNamespaceDeclarations &ns,
- ExceptionCode& ec)
+ ExceptionCode& ec, FragmentScriptingPermission scriptingPermission)
{
for (int i = 0; i < ns.count(); ++i) {
const QXmlStreamNamespaceDeclaration &decl = ns[i];
String namespaceURI = decl.namespaceUri();
String namespaceQName = decl.prefix().isEmpty() ? String("xmlns") : String("xmlns:") + decl.prefix();
- newElement->setAttributeNS("http://www.w3.org/2000/xmlns/", namespaceQName, namespaceURI, ec);
+ newElement->setAttributeNS("http://www.w3.org/2000/xmlns/", namespaceQName, namespaceURI, ec, scriptingPermission);
if (ec) // exception setting attributes
return;
}
}
-static inline void handleElementAttributes(Element* newElement, const QXmlStreamAttributes &attrs, ExceptionCode& ec)
+static inline void handleElementAttributes(Element* newElement, const QXmlStreamAttributes &attrs, ExceptionCode& ec,
+ FragmentScriptingPermission scriptingPermission)
{
for (int i = 0; i < attrs.count(); ++i) {
const QXmlStreamAttribute &attr = attrs[i];
@@ -342,7 +345,7 @@ static inline void handleElementAttributes(Element* newElement, const QXmlStream
String attrValue = attr.value();
String attrURI = attr.namespaceUri().isEmpty() ? String() : String(attr.namespaceUri());
String attrQName = attr.qualifiedName();
- newElement->setAttributeNS(attrURI, attrQName, attrValue, ec);
+ newElement->setAttributeNS(attrURI, attrQName, attrValue, ec, scriptingPermission);
if (ec) // exception setting attributes
return;
}
@@ -502,13 +505,13 @@ void XMLTokenizer::parseStartElement()
m_sawFirstElement = true;
ExceptionCode ec = 0;
- handleElementNamespaces(newElement.get(), m_stream.namespaceDeclarations(), ec);
+ handleElementNamespaces(newElement.get(), m_stream.namespaceDeclarations(), ec, m_scriptingPermission);
if (ec) {
stopParsing();
return;
}
- handleElementAttributes(newElement.get(), m_stream.attributes(), ec);
+ handleElementAttributes(newElement.get(), m_stream.attributes(), ec, m_scriptingPermission);
if (ec) {
stopParsing();
return;
@@ -538,6 +541,13 @@ void XMLTokenizer::parseEndElement()
Node* n = m_currentNode;
n->finishParsingChildren();
+ if (m_scriptingPermission == FragmentScriptingNotAllowed && n->isElementNode() && toScriptElement(static_cast<Element*>(n))) {
+ popCurrentNode();
+ ExceptionCode ec;
+ n->remove(ec);
+ return;
+ }
+
if (!n->isElementNode() || !m_view) {
if (!m_currentNodeStack.isEmpty())
popCurrentNode();
diff --git a/WebCore/dom/make_names.pl b/WebCore/dom/make_names.pl
index 6b5ddb4..daf45ef 100755
--- a/WebCore/dom/make_names.pl
+++ b/WebCore/dom/make_names.pl
@@ -94,7 +94,6 @@ sub defaultTagPropertyHash
'constructorNeedsCreatedByParser' => 0,
'constructorNeedsFormElement' => 0,
'createWithNew' => 0,
- 'exportString' => 0,
'interfaceName' => defaultInterfaceName($_[0]),
# By default, the JSInterfaceName is the same as the interfaceName.
'JSInterfaceName' => defaultInterfaceName($_[0]),
@@ -104,11 +103,6 @@ sub defaultTagPropertyHash
);
}
-sub defaultAttrPropertyHash
-{
- return ('exportString' => 0);
-}
-
sub defaultParametersHash
{
return (
@@ -117,8 +111,7 @@ sub defaultParametersHash
'namespaceURI' => '',
'guardFactoryWith' => '',
'tagsNullNamespace' => 0,
- 'attrsNullNamespace' => 0,
- 'exportStrings' => 0
+ 'attrsNullNamespace' => 0
);
}
@@ -157,7 +150,7 @@ sub attrsHandler
$attr =~ s/-/_/g;
# Initialize default properties' values.
- $attrs{$attr} = { defaultAttrPropertyHash($attr) } if !defined($attrs{$attr});
+ $attrs{$attr} = {} if !defined($attrs{$attr});
if ($property) {
die "Unknown property $property for attribute $attr\n" if !defined($attrs{$attr}{$property});
@@ -220,10 +213,6 @@ sub printMacros
for my $name (sort keys %$namesRef) {
print F "$macro $name","$suffix;\n";
-
- if ($parameters{exportStrings} or $names{$name}{exportString}) {
- print F "extern char $name", "${suffix}String[];\n";
- }
}
}
@@ -534,14 +523,6 @@ DEFINE_GLOBAL(AtomicString, ${lowerNamespace}NamespaceURI, \"$parameters{namespa
print F "}\n";
}
- if (keys %tags) {
- printDefinitionStrings($F, \%tags, "tags");
- }
-
- if (keys %attrs) {
- printDefinitionStrings($F, \%attrs, "attributes");
- }
-
print F "\nvoid init()
{
static bool initialized = false;
@@ -599,25 +580,6 @@ sub printElementIncludes
}
}
-sub printDefinitionStrings
-{
- my ($F, $namesRef, $type) = @_;
- my $singularType = substr($type, 0, -1);
- my $shortType = substr($singularType, 0, 4);
- my $shortCamelType = ucfirst($shortType);
- print F "\n// " . ucfirst($type) . " as strings\n";
-
- my %names = %$namesRef;
- for my $name (sort keys %$namesRef) {
- next if (!$parameters{exportStrings} and !$names{$name}{exportString});
-
- my $realName = $name;
- $realName =~ s/_/-/g;
-
- print F "char $name","${shortCamelType}String[] = \"$realName\";\n";
- }
-}
-
sub printDefinitions
{
my ($F, $namesRef, $type, $namespaceURI) = @_;
@@ -628,19 +590,10 @@ sub printDefinitions
print F " // " . ucfirst($type) . "\n";
- my %names = %$namesRef;
for my $name (sort keys %$namesRef) {
- next if ($parameters{exportStrings} or $names{$name}{exportString});
-
my $realName = $name;
$realName =~ s/_/-/g;
- print F " const char *$name","${shortCamelType}String = \"$realName\";\n";
- }
-
- print "\n";
-
- for my $name (sort keys %$namesRef) {
- print F " new ((void*)&$name","${shortCamelType}) QualifiedName(nullAtom, $name","${shortCamelType}String, $namespaceURI);\n";
+ print F " new ((void*)&$name","${shortCamelType}) QualifiedName(nullAtom, \"$realName\", $namespaceURI);\n";
}
}
diff --git a/WebCore/editing/ApplyStyleCommand.cpp b/WebCore/editing/ApplyStyleCommand.cpp
index 7a8f025..1c739ec 100644
--- a/WebCore/editing/ApplyStyleCommand.cpp
+++ b/WebCore/editing/ApplyStyleCommand.cpp
@@ -137,7 +137,7 @@ void StyleChange::reconcileTextDecorationProperties(CSSMutableStyleDeclaration*
textDecoration = textDecorationsInEffect;
}
- // If text-decration is set to "none", remove the property because we don't want to add redundant "text-decoration: none".
+ // If text-decoration is set to "none", remove the property because we don't want to add redundant "text-decoration: none".
if (textDecoration && !textDecoration->isValueList())
style->removeProperty(CSSPropertyTextDecoration);
}
@@ -250,7 +250,7 @@ void StyleChange::extractTextStyles(CSSMutableStyleDeclaration* style)
else
m_applyFontSize = "7";
}
- // Huge quirk in Microsft Entourage is that they understand CSS font-size, but also write
+ // Huge quirk in Microsoft Entourage is that they understand CSS font-size, but also write
// out legacy 1-7 values in font tags (I guess for mailers that are not CSS-savvy at all,
// like Eudora). Yes, they write out *both*. We need to write out both as well.
}
@@ -302,7 +302,9 @@ static bool isEmptyFontTag(const Node *node)
const Element *elem = static_cast<const Element *>(node);
NamedNodeMap *map = elem->attributes(true); // true for read-only
- return (!map || map->length() == 1) && elem->getAttribute(classAttr) == styleSpanClassString();
+ if (!map)
+ return true;
+ return map->isEmpty() || (map->length() == 1 && elem->getAttribute(classAttr) == styleSpanClassString());
}
static PassRefPtr<Element> createFontElement(Document* document)
@@ -449,8 +451,8 @@ PassRefPtr<CSSMutableStyleDeclaration> editingStyleAtPosition(Position pos, Shou
void prepareEditingStyleToApplyAt(CSSMutableStyleDeclaration* editingStyle, Position pos)
{
- // ReplaceSelectionCommand::handleStyleSpans() requiers that this function only removes the editing style.
- // If this function was modified in the futureto delete all redundant properties, then add a boolean value to indicate
+ // ReplaceSelectionCommand::handleStyleSpans() requires that this function only removes the editing style.
+ // If this function was modified in the future to delete all redundant properties, then add a boolean value to indicate
// which one of editingStyleAtPosition or computedStyle is called.
RefPtr<CSSMutableStyleDeclaration> style = editingStyleAtPosition(pos);
style->diff(editingStyle);
diff --git a/WebCore/editing/CompositeEditCommand.cpp b/WebCore/editing/CompositeEditCommand.cpp
index 2796690..e9b6971 100644
--- a/WebCore/editing/CompositeEditCommand.cpp
+++ b/WebCore/editing/CompositeEditCommand.cpp
@@ -771,9 +771,17 @@ void CompositeEditCommand::cloneParagraphUnderNewElement(Position& start, Positi
// cloning all the siblings until end.node() is reached.
if (start.node() != end.node() && !start.node()->isDescendantOf(end.node())) {
+ // If end is not a descendant of outerNode we need to
+ // find the first common ancestor and adjust the insertion
+ // point accordingly.
+ while (!end.node()->isDescendantOf(outerNode)) {
+ outerNode = outerNode->parentNode();
+ topNode = topNode->parentNode();
+ }
+
for (Node* n = start.node()->traverseNextSibling(outerNode); n; n = n->nextSibling()) {
if (n->parentNode() != start.node()->parentNode())
- lastNode = topNode->firstChild();
+ lastNode = topNode->lastChild();
RefPtr<Node> clonedNode = n->cloneNode(true);
insertNodeAfter(clonedNode, lastNode);
@@ -1082,7 +1090,7 @@ bool CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph()
Position caretPos(caret.deepEquivalent());
// A line break is either a br or a preserved newline.
- ASSERT(caretPos.node()->hasTagName(brTag) || caretPos.node()->isTextNode() && caretPos.node()->renderer()->style()->preserveNewline());
+ ASSERT(caretPos.node()->hasTagName(brTag) || (caretPos.node()->isTextNode() && caretPos.node()->renderer()->style()->preserveNewline()));
if (caretPos.node()->hasTagName(brTag)) {
Position beforeBR(positionInParentBeforeNode(caretPos.node()));
diff --git a/WebCore/editing/DeleteButtonController.cpp b/WebCore/editing/DeleteButtonController.cpp
index c154426..d999f84 100644
--- a/WebCore/editing/DeleteButtonController.cpp
+++ b/WebCore/editing/DeleteButtonController.cpp
@@ -66,7 +66,7 @@ static bool isDeletableElement(const Node* node)
if (!node || !node->isHTMLElement() || !node->inDocument() || !node->isContentEditable())
return false;
- // In general we want to only draw the UI arround object of a certain area, but we still keep the min width/height to
+ // In general we want to only draw the UI around object of a certain area, but we still keep the min width/height to
// make sure we don't end up with very thin or very short elements getting the UI.
const int minimumArea = 2500;
const int minimumWidth = 48;
@@ -187,7 +187,7 @@ void DeleteButtonController::respondToChangedSelection(const VisibleSelection& o
void DeleteButtonController::createDeletionUI()
{
RefPtr<HTMLDivElement> container = new HTMLDivElement(divTag, m_target->document());
- container->setAttribute(idAttr, containerElementIdentifier);
+ container->setAttribute(container->idAttributeName(), containerElementIdentifier);
CSSMutableStyleDeclaration* style = container->getInlineStyleDecl();
style->setProperty(CSSPropertyWebkitUserDrag, CSSValueNone);
@@ -202,7 +202,7 @@ void DeleteButtonController::createDeletionUI()
style->setProperty(CSSPropertyLeft, "0");
RefPtr<HTMLDivElement> outline = new HTMLDivElement(divTag, m_target->document());
- outline->setAttribute(idAttr, outlineElementIdentifier);
+ outline->setAttribute(outline->idAttributeName(), outlineElementIdentifier);
const int borderWidth = 4;
const int borderRadius = 6;
@@ -225,7 +225,7 @@ void DeleteButtonController::createDeletionUI()
return;
RefPtr<DeleteButton> button = new DeleteButton(m_target->document());
- button->setAttribute(idAttr, buttonElementIdentifier);
+ button->setAttribute(button->idAttributeName(), buttonElementIdentifier);
const int buttonWidth = 30;
const int buttonHeight = 30;
diff --git a/WebCore/editing/DeleteSelectionCommand.cpp b/WebCore/editing/DeleteSelectionCommand.cpp
index 9e4ba29..d3d9cc9 100644
--- a/WebCore/editing/DeleteSelectionCommand.cpp
+++ b/WebCore/editing/DeleteSelectionCommand.cpp
@@ -121,7 +121,7 @@ void DeleteSelectionCommand::initializeStartEnd(Position& start, Position& end)
else if (end.node()->hasTagName(hrTag))
end = Position(end.node(), 1);
- // FIXME: This is only used so that moveParagraphs can avoid the bugs in special element expanion.
+ // FIXME: This is only used so that moveParagraphs can avoid the bugs in special element expansion.
if (!m_expandForSpecialElements)
return;
@@ -589,10 +589,11 @@ void DeleteSelectionCommand::mergeParagraphs()
// The rule for merging into an empty block is: only do so if its farther to the right.
// FIXME: Consider RTL.
if (!m_startsAtEmptyLine && isStartOfParagraph(mergeDestination) && startOfParagraphToMove.absoluteCaretBounds().x() > mergeDestination.absoluteCaretBounds().x()) {
- ASSERT(mergeDestination.deepEquivalent().downstream().node()->hasTagName(brTag));
- removeNodeAndPruneAncestors(mergeDestination.deepEquivalent().downstream().node());
- m_endingPosition = startOfParagraphToMove.deepEquivalent();
- return;
+ if (mergeDestination.deepEquivalent().downstream().node()->hasTagName(brTag)) {
+ removeNodeAndPruneAncestors(mergeDestination.deepEquivalent().downstream().node());
+ m_endingPosition = startOfParagraphToMove.deepEquivalent();
+ return;
+ }
}
// Block images, tables and horizontal rules cannot be made inline with content at mergeDestination. If there is
diff --git a/WebCore/editing/Editor.cpp b/WebCore/editing/Editor.cpp
index 0744fd6..5798452 100644
--- a/WebCore/editing/Editor.cpp
+++ b/WebCore/editing/Editor.cpp
@@ -1077,6 +1077,8 @@ void Editor::paste()
void Editor::pasteAsPlainText()
{
+ if (tryDHTMLPaste())
+ return;
if (!canPaste())
return;
pasteAsPlainTextWithPasteboard(Pasteboard::generalPasteboard());
@@ -1391,8 +1393,11 @@ void Editor::confirmComposition(const String& text, bool preserveSelection)
insertText(text, 0);
- if (preserveSelection)
+ if (preserveSelection) {
m_frame->selection()->setSelection(oldSelection, false, false);
+ // An open typing command that disagrees about current selection would cause issues with typing later on.
+ TypingCommand::closeTyping(m_lastEditCommand.get());
+ }
setIgnoreCompositionSelectionChange(false);
}
@@ -1497,7 +1502,7 @@ void Editor::learnSpelling()
if (!client())
return;
- // FIXME: We don't call this on the Mac, and it should remove misppelling markers around the
+ // FIXME: We don't call this on the Mac, and it should remove misspelling markers around the
// learned word, see <rdar://problem/5396072>.
String text = frame()->selectedText();
diff --git a/WebCore/editing/EditorCommand.cpp b/WebCore/editing/EditorCommand.cpp
index 3379b3c..6a9e10f 100644
--- a/WebCore/editing/EditorCommand.cpp
+++ b/WebCore/editing/EditorCommand.cpp
@@ -32,6 +32,7 @@
#include "CSSMutableStyleDeclaration.h"
#include "CSSPropertyNames.h"
#include "CSSValueKeywords.h"
+#include "Chrome.h"
#include "CreateLinkCommand.h"
#include "DocumentFragment.h"
#include "Editor.h"
@@ -259,7 +260,7 @@ static int verticalScrollDistance(Frame* frame)
if (!(style->overflowY() == OSCROLL || style->overflowY() == OAUTO || renderer->isTextArea()))
return 0;
int height = toRenderBox(renderer)->clientHeight();
- return max((height + 1) / 2, height - cAmountToKeepWhenPaging);
+ return max(height * cFractionToStepWhenPaging, 1.f);
}
static RefPtr<Range> unionDOMRanges(Range* a, Range* b)
@@ -471,7 +472,7 @@ static bool executeInsertHorizontalRule(Frame* frame, Event*, EditorCommandSourc
{
RefPtr<HTMLHRElement> hr = new HTMLHRElement(hrTag, frame->document());
if (!value.isEmpty())
- hr->setAttribute(idAttr, value);
+ hr->setAttribute(hr->idAttributeName(), value);
return executeInsertNode(frame, hr.release());
}
diff --git a/WebCore/editing/IndentOutdentCommand.cpp b/WebCore/editing/IndentOutdentCommand.cpp
index 5e6f339..0f3975b 100644
--- a/WebCore/editing/IndentOutdentCommand.cpp
+++ b/WebCore/editing/IndentOutdentCommand.cpp
@@ -76,7 +76,12 @@ bool IndentOutdentCommand::tryIndentingAsListItem(const VisiblePosition& endOfCu
return false;
// Find the list item enclosing the current paragraph
- Element* selectedListItem = static_cast<Element*>(enclosingBlock(endOfCurrentParagraph.deepEquivalent().node()));
+ Element* selectedListItem = static_cast<Element*>(enclosingBlock(lastNodeInSelectedParagraph));
+ // FIXME: enclosingBlock shouldn't return the passed in element. See the
+ // comment on the function about how to fix rather than having to adjust here.
+ if (selectedListItem == lastNodeInSelectedParagraph)
+ selectedListItem = static_cast<Element*>(enclosingBlock(lastNodeInSelectedParagraph->parentNode()));
+
// FIXME: we need to deal with the case where there is no li (malformed HTML)
if (!selectedListItem->hasTagName(liTag))
return false;
diff --git a/WebCore/editing/ReplaceSelectionCommand.cpp b/WebCore/editing/ReplaceSelectionCommand.cpp
index b40dab2..85a4471 100644
--- a/WebCore/editing/ReplaceSelectionCommand.cpp
+++ b/WebCore/editing/ReplaceSelectionCommand.cpp
@@ -877,6 +877,8 @@ void ReplaceSelectionCommand::doApply()
if (!refNode->inDocument())
return;
+ bool plainTextFragment = isPlainTextMarkup(refNode.get());
+
while (node) {
Node* next = node->nextSibling();
fragment.removeNode(node);
@@ -887,6 +889,8 @@ void ReplaceSelectionCommand::doApply()
return;
refNode = node;
+ if (node && plainTextFragment)
+ plainTextFragment = isPlainTextMarkup(node.get());
node = next;
}
@@ -913,7 +917,7 @@ void ReplaceSelectionCommand::doApply()
bool interchangeNewlineAtEnd = fragment.hasInterchangeNewlineAtEnd();
- if (shouldRemoveEndBR(endBR, originalVisPosBeforeEndBR))
+ if (endBR && (plainTextFragment || shouldRemoveEndBR(endBR, originalVisPosBeforeEndBR)))
removeNodeAndPruneAncestors(endBR);
// Determine whether or not we should merge the end of inserted content with what's after it before we do
@@ -1020,6 +1024,11 @@ void ReplaceSelectionCommand::doApply()
}
}
+ // If we are dealing with a fragment created from plain text
+ // no style matching is necessary.
+ if (plainTextFragment)
+ m_matchStyle = false;
+
completeHTMLReplacement(lastPositionToSelect);
}
diff --git a/WebCore/editing/SelectionController.cpp b/WebCore/editing/SelectionController.cpp
index af89ccb..5b2d0d0 100644
--- a/WebCore/editing/SelectionController.cpp
+++ b/WebCore/editing/SelectionController.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 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
@@ -47,6 +47,7 @@
#include "Range.h"
#include "RenderTheme.h"
#include "RenderView.h"
+#include "Settings.h"
#include "TextIterator.h"
#include "TypingCommand.h"
#include "htmlediting.h"
@@ -64,12 +65,15 @@ const int NoXPosForVerticalArrowNavigation = INT_MIN;
SelectionController::SelectionController(Frame* frame, bool isDragCaretController)
: m_frame(frame)
, m_xPosForVerticalArrowNavigation(NoXPosForVerticalArrowNavigation)
+ , m_caretBlinkTimer(this, &SelectionController::caretBlinkTimerFired)
, m_needsLayout(true)
, m_absCaretBoundsDirty(true)
, m_lastChangeWasHorizontalExtension(false)
, m_isDragCaretController(isDragCaretController)
, m_isCaretBlinkingSuspended(false)
, m_focused(frame && frame->page() && frame->page()->focusController()->focusedFrame() == frame)
+ , m_caretVisible(isDragCaretController)
+ , m_caretPaint(true)
{
}
@@ -105,13 +109,13 @@ void SelectionController::setSelection(const VisibleSelection& s, bool closeTypi
if (m_isDragCaretController) {
invalidateCaretRect();
- m_sel = s;
+ m_selection = s;
m_needsLayout = true;
invalidateCaretRect();
return;
}
if (!m_frame) {
- m_sel = s;
+ m_selection = s;
return;
}
@@ -133,19 +137,20 @@ void SelectionController::setSelection(const VisibleSelection& s, bool closeTypi
if (clearTypingStyle)
m_frame->clearTypingStyle();
- if (m_sel == s)
+ if (m_selection == s)
return;
- VisibleSelection oldSelection = m_sel;
+ VisibleSelection oldSelection = m_selection;
- m_sel = s;
+ m_selection = s;
m_needsLayout = true;
if (!s.isNone())
m_frame->setFocusedNodeIfNeeded();
- m_frame->selectionLayoutChanged();
+ updateAppearance();
+
// Always clear the x position used for vertical arrow navigation.
// It will be restored by the vertical arrow navigation code if necessary.
m_xPosForVerticalArrowNavigation = NoXPosForVerticalArrowNavigation;
@@ -183,10 +188,10 @@ void SelectionController::nodeWillBeRemoved(Node *node)
if (node && highestAncestor(node)->nodeType() == Node::DOCUMENT_FRAGMENT_NODE)
return;
- bool baseRemoved = removingNodeRemovesPosition(node, m_sel.base());
- bool extentRemoved = removingNodeRemovesPosition(node, m_sel.extent());
- bool startRemoved = removingNodeRemovesPosition(node, m_sel.start());
- bool endRemoved = removingNodeRemovesPosition(node, m_sel.end());
+ bool baseRemoved = removingNodeRemovesPosition(node, m_selection.base());
+ bool extentRemoved = removingNodeRemovesPosition(node, m_selection.extent());
+ bool startRemoved = removingNodeRemovesPosition(node, m_selection.start());
+ bool endRemoved = removingNodeRemovesPosition(node, m_selection.end());
bool clearRenderTreeSelection = false;
bool clearDOMTreeSelection = false;
@@ -200,12 +205,12 @@ void SelectionController::nodeWillBeRemoved(Node *node)
// Change the base and extent to the start and end, but don't re-validate the
// selection, since doing so could move the start and end into the node
// that is about to be removed.
- if (m_sel.isBaseFirst())
- m_sel.setWithoutValidation(m_sel.start(), m_sel.end());
+ if (m_selection.isBaseFirst())
+ m_selection.setWithoutValidation(m_selection.start(), m_selection.end());
else
- m_sel.setWithoutValidation(m_sel.end(), m_sel.start());
+ m_selection.setWithoutValidation(m_selection.end(), m_selection.start());
// FIXME: This could be more efficient if we had an isNodeInRange function on Ranges.
- } else if (comparePositions(m_sel.start(), Position(node, 0)) == -1 && comparePositions(m_sel.end(), Position(node, 0)) == 1) {
+ } else if (comparePositions(m_selection.start(), Position(node, 0)) == -1 && comparePositions(m_selection.end(), Position(node, 0)) == 1) {
// If we did nothing here, when this node's renderer was destroyed, the rect that it
// occupied would be invalidated, but, selection gaps that change as a result of
// the removal wouldn't be invalidated.
@@ -214,7 +219,7 @@ void SelectionController::nodeWillBeRemoved(Node *node)
}
if (clearRenderTreeSelection) {
- RefPtr<Document> document = m_sel.start().node()->document();
+ RefPtr<Document> document = m_selection.start().node()->document();
document->updateStyleIfNeeded();
if (RenderView* view = toRenderView(document->renderer()))
view->clearSelection();
@@ -231,26 +236,26 @@ void SelectionController::willBeModified(EAlteration alter, EDirection direction
if (m_lastChangeWasHorizontalExtension)
return;
- Position start = m_sel.start();
- Position end = m_sel.end();
+ Position start = m_selection.start();
+ Position end = m_selection.end();
// FIXME: This is probably not correct for right and left when the direction is RTL.
switch (direction) {
case RIGHT:
case FORWARD:
- m_sel.setBase(start);
- m_sel.setExtent(end);
+ m_selection.setBase(start);
+ m_selection.setExtent(end);
break;
case LEFT:
case BACKWARD:
- m_sel.setBase(end);
- m_sel.setExtent(start);
+ m_selection.setBase(end);
+ m_selection.setExtent(start);
break;
}
}
TextDirection SelectionController::directionOfEnclosingBlock()
{
- Node* n = m_sel.extent().node();
+ Node* n = m_selection.extent().node();
Node* enclosingBlockNode = enclosingBlock(n);
if (!enclosingBlockNode)
return LTR;
@@ -262,7 +267,7 @@ TextDirection SelectionController::directionOfEnclosingBlock()
VisiblePosition SelectionController::modifyExtendingRight(TextGranularity granularity)
{
- VisiblePosition pos(m_sel.extent(), m_sel.affinity());
+ VisiblePosition pos(m_selection.extent(), m_selection.affinity());
// The difference between modifyExtendingRight and modifyExtendingForward is:
// modifyExtendingForward always extends forward logically.
@@ -297,7 +302,7 @@ VisiblePosition SelectionController::modifyExtendingRight(TextGranularity granul
VisiblePosition SelectionController::modifyExtendingForward(TextGranularity granularity)
{
- VisiblePosition pos(m_sel.extent(), m_sel.affinity());
+ VisiblePosition pos(m_selection.extent(), m_selection.affinity());
switch (granularity) {
case CharacterGranularity:
pos = pos.next(true);
@@ -315,16 +320,16 @@ VisiblePosition SelectionController::modifyExtendingForward(TextGranularity gran
pos = nextParagraphPosition(pos, xPosForVerticalArrowNavigation(EXTENT));
break;
case SentenceBoundary:
- pos = endOfSentence(VisiblePosition(m_sel.end(), m_sel.affinity()));
+ pos = endOfSentence(VisiblePosition(m_selection.end(), m_selection.affinity()));
break;
case LineBoundary:
- pos = logicalEndOfLine(VisiblePosition(m_sel.end(), m_sel.affinity()));
+ pos = logicalEndOfLine(VisiblePosition(m_selection.end(), m_selection.affinity()));
break;
case ParagraphBoundary:
- pos = endOfParagraph(VisiblePosition(m_sel.end(), m_sel.affinity()));
+ pos = endOfParagraph(VisiblePosition(m_selection.end(), m_selection.affinity()));
break;
case DocumentBoundary:
- pos = VisiblePosition(m_sel.end(), m_sel.affinity());
+ pos = VisiblePosition(m_selection.end(), m_selection.affinity());
if (isEditablePosition(pos.deepEquivalent()))
pos = endOfEditableContent(pos);
else
@@ -341,9 +346,9 @@ VisiblePosition SelectionController::modifyMovingRight(TextGranularity granulari
switch (granularity) {
case CharacterGranularity:
if (isRange())
- pos = VisiblePosition(m_sel.end(), m_sel.affinity());
+ pos = VisiblePosition(m_selection.end(), m_selection.affinity());
else
- pos = VisiblePosition(m_sel.extent(), m_sel.affinity()).right(true);
+ pos = VisiblePosition(m_selection.extent(), m_selection.affinity()).right(true);
break;
case WordGranularity:
case SentenceGranularity:
@@ -367,38 +372,38 @@ VisiblePosition SelectionController::modifyMovingForward(TextGranularity granula
switch (granularity) {
case CharacterGranularity:
if (isRange())
- pos = VisiblePosition(m_sel.end(), m_sel.affinity());
+ pos = VisiblePosition(m_selection.end(), m_selection.affinity());
else
- pos = VisiblePosition(m_sel.extent(), m_sel.affinity()).next(true);
+ pos = VisiblePosition(m_selection.extent(), m_selection.affinity()).next(true);
break;
case WordGranularity:
- pos = nextWordPosition(VisiblePosition(m_sel.extent(), m_sel.affinity()));
+ pos = nextWordPosition(VisiblePosition(m_selection.extent(), m_selection.affinity()));
break;
case SentenceGranularity:
- pos = nextSentencePosition(VisiblePosition(m_sel.extent(), m_sel.affinity()));
+ pos = nextSentencePosition(VisiblePosition(m_selection.extent(), m_selection.affinity()));
break;
case LineGranularity: {
// down-arrowing from a range selection that ends at the start of a line needs
// to leave the selection at that line start (no need to call nextLinePosition!)
- pos = VisiblePosition(m_sel.end(), m_sel.affinity());
+ pos = VisiblePosition(m_selection.end(), m_selection.affinity());
if (!isRange() || !isStartOfLine(pos))
pos = nextLinePosition(pos, xPosForVerticalArrowNavigation(START));
break;
}
case ParagraphGranularity:
- pos = nextParagraphPosition(VisiblePosition(m_sel.end(), m_sel.affinity()), xPosForVerticalArrowNavigation(START));
+ pos = nextParagraphPosition(VisiblePosition(m_selection.end(), m_selection.affinity()), xPosForVerticalArrowNavigation(START));
break;
case SentenceBoundary:
- pos = endOfSentence(VisiblePosition(m_sel.end(), m_sel.affinity()));
+ pos = endOfSentence(VisiblePosition(m_selection.end(), m_selection.affinity()));
break;
case LineBoundary:
- pos = logicalEndOfLine(VisiblePosition(m_sel.end(), m_sel.affinity()));
+ pos = logicalEndOfLine(VisiblePosition(m_selection.end(), m_selection.affinity()));
break;
case ParagraphBoundary:
- pos = endOfParagraph(VisiblePosition(m_sel.end(), m_sel.affinity()));
+ pos = endOfParagraph(VisiblePosition(m_selection.end(), m_selection.affinity()));
break;
case DocumentBoundary:
- pos = VisiblePosition(m_sel.end(), m_sel.affinity());
+ pos = VisiblePosition(m_selection.end(), m_selection.affinity());
if (isEditablePosition(pos.deepEquivalent()))
pos = endOfEditableContent(pos);
else
@@ -411,7 +416,7 @@ VisiblePosition SelectionController::modifyMovingForward(TextGranularity granula
VisiblePosition SelectionController::modifyExtendingLeft(TextGranularity granularity)
{
- VisiblePosition pos(m_sel.extent(), m_sel.affinity());
+ VisiblePosition pos(m_selection.extent(), m_selection.affinity());
// The difference between modifyExtendingLeft and modifyExtendingBackward is:
// modifyExtendingBackward always extends backward logically.
@@ -445,7 +450,7 @@ VisiblePosition SelectionController::modifyExtendingLeft(TextGranularity granula
VisiblePosition SelectionController::modifyExtendingBackward(TextGranularity granularity)
{
- VisiblePosition pos(m_sel.extent(), m_sel.affinity());
+ VisiblePosition pos(m_selection.extent(), m_selection.affinity());
// Extending a selection backward by word or character from just after a table selects
// the table. This "makes sense" from the user perspective, esp. when deleting.
@@ -468,16 +473,16 @@ VisiblePosition SelectionController::modifyExtendingBackward(TextGranularity gra
pos = previousParagraphPosition(pos, xPosForVerticalArrowNavigation(EXTENT));
break;
case SentenceBoundary:
- pos = startOfSentence(VisiblePosition(m_sel.start(), m_sel.affinity()));
+ pos = startOfSentence(VisiblePosition(m_selection.start(), m_selection.affinity()));
break;
case LineBoundary:
- pos = logicalStartOfLine(VisiblePosition(m_sel.start(), m_sel.affinity()));
+ pos = logicalStartOfLine(VisiblePosition(m_selection.start(), m_selection.affinity()));
break;
case ParagraphBoundary:
- pos = startOfParagraph(VisiblePosition(m_sel.start(), m_sel.affinity()));
+ pos = startOfParagraph(VisiblePosition(m_selection.start(), m_selection.affinity()));
break;
case DocumentBoundary:
- pos = VisiblePosition(m_sel.start(), m_sel.affinity());
+ pos = VisiblePosition(m_selection.start(), m_selection.affinity());
if (isEditablePosition(pos.deepEquivalent()))
pos = startOfEditableContent(pos);
else
@@ -493,9 +498,9 @@ VisiblePosition SelectionController::modifyMovingLeft(TextGranularity granularit
switch (granularity) {
case CharacterGranularity:
if (isRange())
- pos = VisiblePosition(m_sel.start(), m_sel.affinity());
+ pos = VisiblePosition(m_selection.start(), m_selection.affinity());
else
- pos = VisiblePosition(m_sel.extent(), m_sel.affinity()).left(true);
+ pos = VisiblePosition(m_selection.extent(), m_selection.affinity()).left(true);
break;
case WordGranularity:
case SentenceGranularity:
@@ -518,33 +523,33 @@ VisiblePosition SelectionController::modifyMovingBackward(TextGranularity granul
switch (granularity) {
case CharacterGranularity:
if (isRange())
- pos = VisiblePosition(m_sel.start(), m_sel.affinity());
+ pos = VisiblePosition(m_selection.start(), m_selection.affinity());
else
- pos = VisiblePosition(m_sel.extent(), m_sel.affinity()).previous(true);
+ pos = VisiblePosition(m_selection.extent(), m_selection.affinity()).previous(true);
break;
case WordGranularity:
- pos = previousWordPosition(VisiblePosition(m_sel.extent(), m_sel.affinity()));
+ pos = previousWordPosition(VisiblePosition(m_selection.extent(), m_selection.affinity()));
break;
case SentenceGranularity:
- pos = previousSentencePosition(VisiblePosition(m_sel.extent(), m_sel.affinity()));
+ pos = previousSentencePosition(VisiblePosition(m_selection.extent(), m_selection.affinity()));
break;
case LineGranularity:
- pos = previousLinePosition(VisiblePosition(m_sel.start(), m_sel.affinity()), xPosForVerticalArrowNavigation(START));
+ pos = previousLinePosition(VisiblePosition(m_selection.start(), m_selection.affinity()), xPosForVerticalArrowNavigation(START));
break;
case ParagraphGranularity:
- pos = previousParagraphPosition(VisiblePosition(m_sel.start(), m_sel.affinity()), xPosForVerticalArrowNavigation(START));
+ pos = previousParagraphPosition(VisiblePosition(m_selection.start(), m_selection.affinity()), xPosForVerticalArrowNavigation(START));
break;
case SentenceBoundary:
- pos = startOfSentence(VisiblePosition(m_sel.start(), m_sel.affinity()));
+ pos = startOfSentence(VisiblePosition(m_selection.start(), m_selection.affinity()));
break;
case LineBoundary:
- pos = logicalStartOfLine(VisiblePosition(m_sel.start(), m_sel.affinity()));
+ pos = logicalStartOfLine(VisiblePosition(m_selection.start(), m_selection.affinity()));
break;
case ParagraphBoundary:
- pos = startOfParagraph(VisiblePosition(m_sel.start(), m_sel.affinity()));
+ pos = startOfParagraph(VisiblePosition(m_selection.start(), m_selection.affinity()));
break;
case DocumentBoundary:
- pos = VisiblePosition(m_sel.start(), m_sel.affinity());
+ pos = VisiblePosition(m_selection.start(), m_selection.affinity());
if (isEditablePosition(pos.deepEquivalent()))
pos = startOfEditableContent(pos);
else
@@ -558,7 +563,7 @@ bool SelectionController::modify(EAlteration alter, EDirection dir, TextGranular
{
if (userTriggered) {
SelectionController trialSelectionController;
- trialSelectionController.setSelection(m_sel);
+ trialSelectionController.setSelection(m_selection);
trialSelectionController.setLastChangeWasHorizontalExtension(m_lastChangeWasHorizontalExtension);
trialSelectionController.modify(alter, dir, granularity, false);
@@ -654,7 +659,7 @@ bool SelectionController::modify(EAlteration alter, int verticalDistance, bool u
if (userTriggered) {
SelectionController trialSelectionController;
- trialSelectionController.setSelection(m_sel);
+ trialSelectionController.setSelection(m_selection);
trialSelectionController.setLastChangeWasHorizontalExtension(m_lastChangeWasHorizontalExtension);
trialSelectionController.modify(alter, verticalDistance, false);
@@ -673,14 +678,14 @@ bool SelectionController::modify(EAlteration alter, int verticalDistance, bool u
int xPos = 0;
switch (alter) {
case MOVE:
- pos = VisiblePosition(up ? m_sel.start() : m_sel.end(), m_sel.affinity());
+ pos = VisiblePosition(up ? m_selection.start() : m_selection.end(), m_selection.affinity());
xPos = xPosForVerticalArrowNavigation(up ? START : END);
- m_sel.setAffinity(up ? UPSTREAM : DOWNSTREAM);
+ m_selection.setAffinity(up ? UPSTREAM : DOWNSTREAM);
break;
case EXTEND:
- pos = VisiblePosition(m_sel.extent(), m_sel.affinity());
+ pos = VisiblePosition(m_selection.extent(), m_selection.affinity());
xPos = xPosForVerticalArrowNavigation(EXTENT);
- m_sel.setAffinity(DOWNSTREAM);
+ m_selection.setAffinity(DOWNSTREAM);
break;
}
@@ -735,7 +740,7 @@ bool SelectionController::expandUsingGranularity(TextGranularity granularity)
if (isNone())
return false;
- m_sel.expandUsingGranularity(granularity);
+ m_selection.expandUsingGranularity(granularity);
m_needsLayout = true;
return true;
}
@@ -750,16 +755,16 @@ int SelectionController::xPosForVerticalArrowNavigation(EPositionType type)
Position pos;
switch (type) {
case START:
- pos = m_sel.start();
+ pos = m_selection.start();
break;
case END:
- pos = m_sel.end();
+ pos = m_selection.end();
break;
case BASE:
- pos = m_sel.base();
+ pos = m_selection.base();
break;
case EXTENT:
- pos = m_sel.extent();
+ pos = m_selection.extent();
break;
}
@@ -768,7 +773,7 @@ int SelectionController::xPosForVerticalArrowNavigation(EPositionType type)
return x;
if (m_xPosForVerticalArrowNavigation == NoXPosForVerticalArrowNavigation) {
- VisiblePosition visiblePosition(pos, m_sel.affinity());
+ VisiblePosition visiblePosition(pos, m_selection.affinity());
// VisiblePosition creation can fail here if a node containing the selection becomes visibility:hidden
// after the selection is created and before this function is called.
x = visiblePosition.isNotNull() ? visiblePosition.xOffsetForVerticalNavigation() : 0;
@@ -787,22 +792,22 @@ void SelectionController::clear()
void SelectionController::setBase(const VisiblePosition &pos, bool userTriggered)
{
- setSelection(VisibleSelection(pos.deepEquivalent(), m_sel.extent(), pos.affinity()), true, true, userTriggered);
+ setSelection(VisibleSelection(pos.deepEquivalent(), m_selection.extent(), pos.affinity()), true, true, userTriggered);
}
void SelectionController::setExtent(const VisiblePosition &pos, bool userTriggered)
{
- setSelection(VisibleSelection(m_sel.base(), pos.deepEquivalent(), pos.affinity()), true, true, userTriggered);
+ setSelection(VisibleSelection(m_selection.base(), pos.deepEquivalent(), pos.affinity()), true, true, userTriggered);
}
void SelectionController::setBase(const Position &pos, EAffinity affinity, bool userTriggered)
{
- setSelection(VisibleSelection(pos, m_sel.extent(), affinity), true, true, userTriggered);
+ setSelection(VisibleSelection(pos, m_selection.extent(), affinity), true, true, userTriggered);
}
void SelectionController::setExtent(const Position &pos, EAffinity affinity, bool userTriggered)
{
- setSelection(VisibleSelection(m_sel.base(), pos, affinity), true, true, userTriggered);
+ setSelection(VisibleSelection(m_selection.base(), pos, affinity), true, true, userTriggered);
}
void SelectionController::setNeedsLayout(bool flag)
@@ -812,17 +817,17 @@ void SelectionController::setNeedsLayout(bool flag)
void SelectionController::layout()
{
- if (isNone() || !m_sel.start().node()->inDocument() || !m_sel.end().node()->inDocument()) {
+ if (isNone() || !m_selection.start().node()->inDocument() || !m_selection.end().node()->inDocument()) {
m_caretRect = IntRect();
return;
}
- m_sel.start().node()->document()->updateStyleIfNeeded();
+ m_selection.start().node()->document()->updateStyleIfNeeded();
m_caretRect = IntRect();
if (isCaret()) {
- VisiblePosition pos(m_sel.start(), m_sel.affinity());
+ VisiblePosition pos(m_selection.start(), m_selection.affinity());
if (pos.isNotNull()) {
ASSERT(pos.deepEquivalent().node()->renderer());
@@ -862,7 +867,7 @@ void SelectionController::layout()
RenderObject* SelectionController::caretRenderer() const
{
- Node* node = m_sel.start().node();
+ Node* node = m_selection.start().node();
if (!node)
return 0;
@@ -956,7 +961,7 @@ void SelectionController::invalidateCaretRect()
if (!isCaret())
return;
- Document* d = m_sel.start().node()->document();
+ Document* d = m_selection.start().node()->document();
// recomputeCaretRect will always return false for the drag caret,
// because its m_frame is always 0.
@@ -981,28 +986,32 @@ void SelectionController::invalidateCaretRect()
}
}
-void SelectionController::paintCaret(GraphicsContext* p, int tx, int ty, const IntRect& clipRect)
+void SelectionController::paintCaret(GraphicsContext* context, int tx, int ty, const IntRect& clipRect)
{
- if (! m_sel.isCaret())
+#if ENABLE(TEXT_CARET)
+ if (!m_caretVisible)
+ return;
+ if (!m_caretPaint)
+ return;
+ if (!m_selection.isCaret())
return;
-
- if (m_needsLayout)
- layout();
IntRect drawingRect = localCaretRect();
drawingRect.move(tx, ty);
IntRect caret = intersection(drawingRect, clipRect);
- if (!caret.isEmpty()) {
- Color caretColor = Color::black;
- ColorSpace colorSpace = DeviceColorSpace;
- Element* element = rootEditableElement();
- if (element && element->renderer()) {
- caretColor = element->renderer()->style()->color();
- colorSpace = element->renderer()->style()->colorSpace();
- }
+ if (caret.isEmpty())
+ return;
- p->fillRect(caret, caretColor, colorSpace);
+ Color caretColor = Color::black;
+ ColorSpace colorSpace = DeviceColorSpace;
+ Element* element = rootEditableElement();
+ if (element && element->renderer()) {
+ caretColor = element->renderer()->style()->color();
+ colorSpace = element->renderer()->style()->colorSpace();
}
+
+ context->fillRect(caret, caretColor, colorSpace);
+#endif
}
void SelectionController::debugRenderer(RenderObject *r, bool selected) const
@@ -1023,10 +1032,10 @@ void SelectionController::debugRenderer(RenderObject *r, bool selected) const
int textLength = text.length();
if (selected) {
int offset = 0;
- if (r->node() == m_sel.start().node())
- offset = m_sel.start().deprecatedEditingOffset();
- else if (r->node() == m_sel.end().node())
- offset = m_sel.end().deprecatedEditingOffset();
+ if (r->node() == m_selection.start().node())
+ offset = m_selection.start().deprecatedEditingOffset();
+ else if (r->node() == m_selection.end().node())
+ offset = m_selection.end().deprecatedEditingOffset();
int pos;
InlineTextBox *box = textRenderer->findNextInlineTextBox(offset, pos);
@@ -1100,11 +1109,11 @@ bool SelectionController::contains(const IntPoint& point)
if (visiblePos.isNull())
return false;
- if (m_sel.visibleStart().isNull() || m_sel.visibleEnd().isNull())
+ if (m_selection.visibleStart().isNull() || m_selection.visibleEnd().isNull())
return false;
- Position start(m_sel.visibleStart().deepEquivalent());
- Position end(m_sel.visibleEnd().deepEquivalent());
+ Position start(m_selection.visibleStart().deepEquivalent());
+ Position end(m_selection.visibleEnd().deepEquivalent());
Position p(visiblePos.deepEquivalent());
return comparePositions(start, p) <= 0 && comparePositions(p, end) <= 0;
@@ -1170,7 +1179,7 @@ void SelectionController::selectAll()
Node* root = 0;
if (isContentEditable())
- root = highestEditableRoot(m_sel.start());
+ root = highestEditableRoot(m_selection.start());
else {
root = shadowTreeRootNode();
if (!root)
@@ -1262,7 +1271,7 @@ void SelectionController::focusedOrActiveStateChanged()
// Caret appears in the active frame.
if (activeAndFocused)
m_frame->setSelectionFromNone();
- m_frame->setCaretVisible(activeAndFocused);
+ setCaretVisible(activeAndFocused);
// Update for caps lock state
m_frame->eventHandler()->capsLockStateMayHaveChanged();
@@ -1301,16 +1310,110 @@ bool SelectionController::isFocusedAndActive() const
return m_focused && m_frame->page() && m_frame->page()->focusController()->isActive();
}
+void SelectionController::updateAppearance()
+{
+ ASSERT(!m_isDragCaretController);
+
+#if ENABLE(TEXT_CARET)
+ bool caretRectChanged = recomputeCaretRect();
+
+ bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();
+ bool shouldBlink = m_caretVisible
+ && isCaret() && (isContentEditable() || caretBrowsing);
+
+ // If the caret moved, stop the blink timer so we can restart with a
+ // black caret in the new location.
+ if (caretRectChanged || !shouldBlink)
+ m_caretBlinkTimer.stop();
+
+ // Start blinking with a black caret. Be sure not to restart if we're
+ // already blinking in the right location.
+ if (shouldBlink && !m_caretBlinkTimer.isActive()) {
+ if (double blinkInterval = m_frame->page()->theme()->caretBlinkInterval())
+ m_caretBlinkTimer.startRepeating(blinkInterval);
+
+ if (!m_caretPaint) {
+ m_caretPaint = true;
+ invalidateCaretRect();
+ }
+ }
+#endif
+
+ RenderView* view = m_frame->contentRenderer();
+ if (!view)
+ return;
+
+ VisibleSelection selection = this->selection();
+
+ if (!selection.isRange()) {
+ view->clearSelection();
+ return;
+ }
+
+ // Use the rightmost candidate for the start of the selection, and the leftmost candidate for the end of the selection.
+ // Example: foo <a>bar</a>. Imagine that a line wrap occurs after 'foo', and that 'bar' is selected. If we pass [foo, 3]
+ // as the start of the selection, the selection painting code will think that content on the line containing 'foo' is selected
+ // and will fill the gap before 'bar'.
+ Position startPos = selection.start();
+ Position candidate = startPos.downstream();
+ if (candidate.isCandidate())
+ startPos = candidate;
+ Position endPos = selection.end();
+ candidate = endPos.upstream();
+ if (candidate.isCandidate())
+ endPos = candidate;
+
+ // We can get into a state where the selection endpoints map to the same VisiblePosition when a selection is deleted
+ // because we don't yet notify the SelectionController of text removal.
+ if (startPos.isNotNull() && endPos.isNotNull() && selection.visibleStart() != selection.visibleEnd()) {
+ RenderObject* startRenderer = startPos.node()->renderer();
+ RenderObject* endRenderer = endPos.node()->renderer();
+ view->setSelection(startRenderer, startPos.deprecatedEditingOffset(), endRenderer, endPos.deprecatedEditingOffset());
+ }
+}
+
+void SelectionController::setCaretVisible(bool flag)
+{
+ if (m_caretVisible == flag)
+ return;
+ clearCaretRectIfNeeded();
+ m_caretVisible = flag;
+ updateAppearance();
+}
+
+void SelectionController::clearCaretRectIfNeeded()
+{
+#if ENABLE(TEXT_CARET)
+ if (!m_caretPaint)
+ return;
+ m_caretPaint = false;
+ invalidateCaretRect();
+#endif
+}
+
+void SelectionController::caretBlinkTimerFired(Timer<SelectionController>*)
+{
+#if ENABLE(TEXT_CARET)
+ ASSERT(m_caretVisible);
+ ASSERT(isCaret());
+ bool caretPaint = m_caretPaint;
+ if (isCaretBlinkingSuspended() && caretPaint)
+ return;
+ m_caretPaint = !caretPaint;
+ invalidateCaretRect();
+#endif
+}
+
#ifndef NDEBUG
void SelectionController::formatForDebugger(char* buffer, unsigned length) const
{
- m_sel.formatForDebugger(buffer, length);
+ m_selection.formatForDebugger(buffer, length);
}
void SelectionController::showTreeForThis() const
{
- m_sel.showTreeForThis();
+ m_selection.showTreeForThis();
}
#endif
diff --git a/WebCore/editing/SelectionController.h b/WebCore/editing/SelectionController.h
index 4a13a30..7cad435 100644
--- a/WebCore/editing/SelectionController.h
+++ b/WebCore/editing/SelectionController.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2004, 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
@@ -28,6 +28,7 @@
#include "IntRect.h"
#include "Range.h"
+#include "Timer.h"
#include "VisibleSelection.h"
#include <wtf/Noncopyable.h>
@@ -45,10 +46,10 @@ public:
SelectionController(Frame* = 0, bool isDragCaretController = false);
- Element* rootEditableElement() const { return m_sel.rootEditableElement(); }
- bool isContentEditable() const { return m_sel.isContentEditable(); }
- bool isContentRichlyEditable() const { return m_sel.isContentRichlyEditable(); }
- Node* shadowTreeRootNode() const { return m_sel.shadowTreeRootNode(); }
+ Element* rootEditableElement() const { return m_selection.rootEditableElement(); }
+ bool isContentEditable() const { return m_selection.isContentEditable(); }
+ bool isContentRichlyEditable() const { return m_selection.isContentRichlyEditable(); }
+ Node* shadowTreeRootNode() const { return m_selection.shadowTreeRootNode(); }
void moveTo(const Range*, EAffinity, bool userTriggered = false);
void moveTo(const VisiblePosition&, bool userTriggered = false);
@@ -56,7 +57,7 @@ public:
void moveTo(const Position&, EAffinity, bool userTriggered = false);
void moveTo(const Position&, const Position&, EAffinity, bool userTriggered = false);
- const VisibleSelection& selection() const { return m_sel; }
+ const VisibleSelection& selection() const { return m_selection; }
void setSelection(const VisibleSelection&, bool closeTyping = true, bool clearTypingStyle = true, bool userTriggered = false);
bool setSelectedRange(Range*, EAffinity, bool closeTyping);
void selectAll();
@@ -67,9 +68,9 @@ public:
bool contains(const IntPoint&);
- VisibleSelection::SelectionType selectionType() const { return m_sel.selectionType(); }
+ VisibleSelection::SelectionType selectionType() const { return m_selection.selectionType(); }
- EAffinity affinity() const { return m_sel.affinity(); }
+ EAffinity affinity() const { return m_selection.affinity(); }
bool modify(EAlteration, EDirection, TextGranularity, bool userTriggered = false);
bool modify(EAlteration, int verticalDistance, bool userTriggered = false);
@@ -80,10 +81,10 @@ public:
void setExtent(const VisiblePosition&, bool userTriggered = false);
void setExtent(const Position&, EAffinity, bool userTriggered = false);
- Position base() const { return m_sel.base(); }
- Position extent() const { return m_sel.extent(); }
- Position start() const { return m_sel.start(); }
- Position end() const { return m_sel.end(); }
+ Position base() const { return m_selection.base(); }
+ Position extent() const { return m_selection.extent(); }
+ Position start() const { return m_selection.start(); }
+ Position end() const { return m_selection.end(); }
// Return the renderer that is responsible for painting the caret (in the selection start node)
RenderObject* caretRenderer() const;
@@ -97,19 +98,21 @@ public:
void setLastChangeWasHorizontalExtension(bool b) { m_lastChangeWasHorizontalExtension = b; }
void willBeModified(EAlteration, EDirection);
- bool isNone() const { return m_sel.isNone(); }
- bool isCaret() const { return m_sel.isCaret(); }
- bool isRange() const { return m_sel.isRange(); }
- bool isCaretOrRange() const { return m_sel.isCaretOrRange(); }
+ bool isNone() const { return m_selection.isNone(); }
+ bool isCaret() const { return m_selection.isCaret(); }
+ bool isRange() const { return m_selection.isRange(); }
+ bool isCaretOrRange() const { return m_selection.isCaretOrRange(); }
bool isInPasswordField() const;
- bool isAll(StayInEditableContent stayInEditableContent = MustStayInEditableContent) const { return m_sel.isAll(stayInEditableContent); }
+ bool isAll(StayInEditableContent stayInEditableContent = MustStayInEditableContent) const { return m_selection.isAll(stayInEditableContent); }
- PassRefPtr<Range> toNormalizedRange() const { return m_sel.toNormalizedRange(); }
+ PassRefPtr<Range> toNormalizedRange() const { return m_selection.toNormalizedRange(); }
void debugRenderer(RenderObject*, bool selected) const;
void nodeWillBeRemoved(Node*);
+ void setCaretVisible(bool = true);
+ void clearCaretRectIfNeeded();
bool recomputeCaretRect(); // returns true if caret rect moved
void invalidateCaretRect();
void paintCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect);
@@ -124,6 +127,9 @@ public:
bool isFocusedAndActive() const;
void pageActivationChanged();
+ // Painting.
+ void updateAppearance();
+
#ifndef NDEBUG
void formatForDebugger(char* buffer, unsigned length) const;
void showTreeForThis() const;
@@ -148,44 +154,42 @@ private:
int xPosForVerticalArrowNavigation(EPositionType);
-#if PLATFORM(MAC) || PLATFORM(GTK)
void notifyAccessibilityForSelectionChange();
-#else
- void notifyAccessibilityForSelectionChange() {};
-#endif
void focusedOrActiveStateChanged();
bool caretRendersInsideNode(Node*) const;
IntRect absoluteBoundsForLocalRect(const IntRect&) const;
+ void caretBlinkTimerFired(Timer<SelectionController>*);
+
Frame* m_frame;
+
int m_xPosForVerticalArrowNavigation;
- VisibleSelection m_sel;
+ VisibleSelection m_selection;
+
+ Timer<SelectionController> m_caretBlinkTimer;
- IntRect m_caretRect; // caret rect in coords local to the renderer responsible for painting the caret
- IntRect m_absCaretBounds; // absolute bounding rect for the caret
+ IntRect m_caretRect; // caret rect in coords local to the renderer responsible for painting the caret
+ IntRect m_absCaretBounds; // absolute bounding rect for the caret
IntRect m_absoluteCaretRepaintBounds;
- bool m_needsLayout : 1; // true if the caret and expectedVisible rectangles need to be calculated
- bool m_absCaretBoundsDirty: 1;
- bool m_lastChangeWasHorizontalExtension : 1;
- bool m_isDragCaretController : 1;
- bool m_isCaretBlinkingSuspended : 1;
- bool m_focused : 1;
-
+ bool m_needsLayout; // true if m_caretRect and m_absCaretBounds need to be calculated
+ bool m_absCaretBoundsDirty;
+ bool m_lastChangeWasHorizontalExtension;
+ bool m_isDragCaretController;
+ bool m_isCaretBlinkingSuspended;
+ bool m_focused;
+ bool m_caretVisible;
+ bool m_caretPaint;
};
-inline bool operator==(const SelectionController& a, const SelectionController& b)
+#if !(PLATFORM(MAC) || PLATFORM(GTK))
+inline void SelectionController::notifyAccessibilityForSelectionChange()
{
- return a.start() == b.start() && a.end() == b.end() && a.affinity() == b.affinity();
-}
-
-inline bool operator!=(const SelectionController& a, const SelectionController& b)
-{
- return !(a == b);
}
+#endif
} // namespace WebCore
diff --git a/WebCore/editing/TextIterator.cpp b/WebCore/editing/TextIterator.cpp
index df271b6..923f537 100644
--- a/WebCore/editing/TextIterator.cpp
+++ b/WebCore/editing/TextIterator.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
* Copyright (C) 2005 Alexey Proskuryakov.
*
* Redistribution and use in source and binary forms, with or without
@@ -73,11 +73,17 @@ public:
#if USE(ICU_UNICODE) && !UCONFIG_NO_COLLATION
private:
+ bool isBadMatch(const UChar*, size_t length) const;
+
String m_target;
Vector<UChar> m_buffer;
size_t m_overlap;
bool m_atBreak;
+ bool m_targetRequiresKanaWorkaround;
+ Vector<UChar> m_normalizedTarget;
+ mutable Vector<UChar> m_normalizedMatch;
+
#else
private:
@@ -150,7 +156,7 @@ static inline Node* parentCrossingShadowBoundaries(Node* node)
return node->shadowParentNode();
}
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
static unsigned depthCrossingShadowBoundaries(Node* node)
{
@@ -705,6 +711,28 @@ static bool shouldEmitExtraNewlineForNode(Node* node)
return false;
}
+static int collapsedSpaceLength(RenderText* renderer, int textEnd)
+{
+ const UChar* characters = renderer->text()->characters();
+ int length = renderer->text()->length();
+ for (int i = textEnd; i < length; ++i) {
+ if (!renderer->style()->isCollapsibleWhiteSpace(characters[i]))
+ return i - textEnd;
+ }
+
+ return length - textEnd;
+}
+
+static int maxOffsetIncludingCollapsedSpaces(Node* node)
+{
+ int offset = caretMaxOffset(node);
+
+ if (node->renderer() && node->renderer()->isText())
+ offset += collapsedSpaceLength(toRenderText(node->renderer()), offset);
+
+ return offset;
+}
+
// Whether or not we should emit a character as we enter m_node (if it's a container) or as we hit it (if it's atomic).
bool TextIterator::shouldRepresentNodeOffsetZero()
{
@@ -1029,7 +1057,9 @@ void SimplifiedBackwardsTextIterator::advance()
m_node = next;
if (m_node)
pushFullyClippedState(m_fullyClippedStack, m_node);
- m_offset = m_node ? caretMaxOffset(m_node) : 0;
+ // For the purpose of word boundary detection,
+ // we should iterate all visible text and trailing (collapsed) whitespaces.
+ m_offset = m_node ? maxOffsetIncludingCollapsedSpaces(m_node) : 0;
m_handledNode = false;
m_handledChildren = false;
@@ -1465,9 +1495,212 @@ static inline void unlockSearcher()
#endif
}
+// ICU's search ignores the distinction between small kana letters and ones
+// that are not small, and also characters that differ only in the voicing
+// marks when considering only primary collation strength diffrences.
+// This is not helpful for end users, since these differences make words
+// distinct, so for our purposes we need these to be considered.
+// The Unicode folks do not think the collation algorithm should be
+// changed. To work around this, we would like to tailor the ICU searcher,
+// but we can't get that to work yet. So instead, we check for cases where
+// these differences occur, and skip those matches.
+
+// We refer to the above technique as the "kana workaround". The next few
+// functions are helper functinos for the kana workaround.
+
+static inline bool isKanaLetter(UChar character)
+{
+ // Hiragana letters.
+ if (character >= 0x3041 && character <= 0x3096)
+ return true;
+
+ // Katakana letters.
+ if (character >= 0x30A1 && character <= 0x30FA)
+ return true;
+ if (character >= 0x31F0 && character <= 0x31FF)
+ return true;
+
+ // Halfwidth katakana letters.
+ if (character >= 0xFF66 && character <= 0xFF9D && character != 0xFF70)
+ return true;
+
+ return false;
+}
+
+static inline bool isSmallKanaLetter(UChar character)
+{
+ ASSERT(isKanaLetter(character));
+
+ switch (character) {
+ case 0x3041: // HIRAGANA LETTER SMALL A
+ case 0x3043: // HIRAGANA LETTER SMALL I
+ case 0x3045: // HIRAGANA LETTER SMALL U
+ case 0x3047: // HIRAGANA LETTER SMALL E
+ case 0x3049: // HIRAGANA LETTER SMALL O
+ case 0x3063: // HIRAGANA LETTER SMALL TU
+ case 0x3083: // HIRAGANA LETTER SMALL YA
+ case 0x3085: // HIRAGANA LETTER SMALL YU
+ case 0x3087: // HIRAGANA LETTER SMALL YO
+ case 0x308E: // HIRAGANA LETTER SMALL WA
+ case 0x3095: // HIRAGANA LETTER SMALL KA
+ case 0x3096: // HIRAGANA LETTER SMALL KE
+ case 0x30A1: // KATAKANA LETTER SMALL A
+ case 0x30A3: // KATAKANA LETTER SMALL I
+ case 0x30A5: // KATAKANA LETTER SMALL U
+ case 0x30A7: // KATAKANA LETTER SMALL E
+ case 0x30A9: // KATAKANA LETTER SMALL O
+ case 0x30C3: // KATAKANA LETTER SMALL TU
+ case 0x30E3: // KATAKANA LETTER SMALL YA
+ case 0x30E5: // KATAKANA LETTER SMALL YU
+ case 0x30E7: // KATAKANA LETTER SMALL YO
+ case 0x30EE: // KATAKANA LETTER SMALL WA
+ case 0x30F5: // KATAKANA LETTER SMALL KA
+ case 0x30F6: // KATAKANA LETTER SMALL KE
+ case 0x31F0: // KATAKANA LETTER SMALL KU
+ case 0x31F1: // KATAKANA LETTER SMALL SI
+ case 0x31F2: // KATAKANA LETTER SMALL SU
+ case 0x31F3: // KATAKANA LETTER SMALL TO
+ case 0x31F4: // KATAKANA LETTER SMALL NU
+ case 0x31F5: // KATAKANA LETTER SMALL HA
+ case 0x31F6: // KATAKANA LETTER SMALL HI
+ case 0x31F7: // KATAKANA LETTER SMALL HU
+ case 0x31F8: // KATAKANA LETTER SMALL HE
+ case 0x31F9: // KATAKANA LETTER SMALL HO
+ case 0x31FA: // KATAKANA LETTER SMALL MU
+ case 0x31FB: // KATAKANA LETTER SMALL RA
+ case 0x31FC: // KATAKANA LETTER SMALL RI
+ case 0x31FD: // KATAKANA LETTER SMALL RU
+ case 0x31FE: // KATAKANA LETTER SMALL RE
+ case 0x31FF: // KATAKANA LETTER SMALL RO
+ case 0xFF67: // HALFWIDTH KATAKANA LETTER SMALL A
+ case 0xFF68: // HALFWIDTH KATAKANA LETTER SMALL I
+ case 0xFF69: // HALFWIDTH KATAKANA LETTER SMALL U
+ case 0xFF6A: // HALFWIDTH KATAKANA LETTER SMALL E
+ case 0xFF6B: // HALFWIDTH KATAKANA LETTER SMALL O
+ case 0xFF6C: // HALFWIDTH KATAKANA LETTER SMALL YA
+ case 0xFF6D: // HALFWIDTH KATAKANA LETTER SMALL YU
+ case 0xFF6E: // HALFWIDTH KATAKANA LETTER SMALL YO
+ case 0xFF6F: // HALFWIDTH KATAKANA LETTER SMALL TU
+ return true;
+ }
+ return false;
+}
+
+enum VoicedSoundMarkType { NoVoicedSoundMark, VoicedSoundMark, SemiVoicedSoundMark };
+
+static inline VoicedSoundMarkType composedVoicedSoundMark(UChar character)
+{
+ ASSERT(isKanaLetter(character));
+
+ switch (character) {
+ case 0x304C: // HIRAGANA LETTER GA
+ case 0x304E: // HIRAGANA LETTER GI
+ case 0x3050: // HIRAGANA LETTER GU
+ case 0x3052: // HIRAGANA LETTER GE
+ case 0x3054: // HIRAGANA LETTER GO
+ case 0x3056: // HIRAGANA LETTER ZA
+ case 0x3058: // HIRAGANA LETTER ZI
+ case 0x305A: // HIRAGANA LETTER ZU
+ case 0x305C: // HIRAGANA LETTER ZE
+ case 0x305E: // HIRAGANA LETTER ZO
+ case 0x3060: // HIRAGANA LETTER DA
+ case 0x3062: // HIRAGANA LETTER DI
+ case 0x3065: // HIRAGANA LETTER DU
+ case 0x3067: // HIRAGANA LETTER DE
+ case 0x3069: // HIRAGANA LETTER DO
+ case 0x3070: // HIRAGANA LETTER BA
+ case 0x3073: // HIRAGANA LETTER BI
+ case 0x3076: // HIRAGANA LETTER BU
+ case 0x3079: // HIRAGANA LETTER BE
+ case 0x307C: // HIRAGANA LETTER BO
+ case 0x3094: // HIRAGANA LETTER VU
+ case 0x30AC: // KATAKANA LETTER GA
+ case 0x30AE: // KATAKANA LETTER GI
+ case 0x30B0: // KATAKANA LETTER GU
+ case 0x30B2: // KATAKANA LETTER GE
+ case 0x30B4: // KATAKANA LETTER GO
+ case 0x30B6: // KATAKANA LETTER ZA
+ case 0x30B8: // KATAKANA LETTER ZI
+ case 0x30BA: // KATAKANA LETTER ZU
+ case 0x30BC: // KATAKANA LETTER ZE
+ case 0x30BE: // KATAKANA LETTER ZO
+ case 0x30C0: // KATAKANA LETTER DA
+ case 0x30C2: // KATAKANA LETTER DI
+ case 0x30C5: // KATAKANA LETTER DU
+ case 0x30C7: // KATAKANA LETTER DE
+ case 0x30C9: // KATAKANA LETTER DO
+ case 0x30D0: // KATAKANA LETTER BA
+ case 0x30D3: // KATAKANA LETTER BI
+ case 0x30D6: // KATAKANA LETTER BU
+ case 0x30D9: // KATAKANA LETTER BE
+ case 0x30DC: // KATAKANA LETTER BO
+ case 0x30F4: // KATAKANA LETTER VU
+ case 0x30F7: // KATAKANA LETTER VA
+ case 0x30F8: // KATAKANA LETTER VI
+ case 0x30F9: // KATAKANA LETTER VE
+ case 0x30FA: // KATAKANA LETTER VO
+ return VoicedSoundMark;
+ case 0x3071: // HIRAGANA LETTER PA
+ case 0x3074: // HIRAGANA LETTER PI
+ case 0x3077: // HIRAGANA LETTER PU
+ case 0x307A: // HIRAGANA LETTER PE
+ case 0x307D: // HIRAGANA LETTER PO
+ case 0x30D1: // KATAKANA LETTER PA
+ case 0x30D4: // KATAKANA LETTER PI
+ case 0x30D7: // KATAKANA LETTER PU
+ case 0x30DA: // KATAKANA LETTER PE
+ case 0x30DD: // KATAKANA LETTER PO
+ return SemiVoicedSoundMark;
+ }
+ return NoVoicedSoundMark;
+}
+
+static inline bool isCombiningVoicedSoundMark(UChar character)
+{
+ switch (character) {
+ case 0x3099: // COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK
+ case 0x309A: // COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+ return true;
+ }
+ return false;
+}
+
+static inline bool containsKanaLetters(const String& pattern)
+{
+ const UChar* characters = pattern.characters();
+ unsigned length = pattern.length();
+ for (unsigned i = 0; i < length; ++i) {
+ if (isKanaLetter(characters[i]))
+ return true;
+ }
+ return false;
+}
+
+static void normalizeCharacters(const UChar* characters, unsigned length, Vector<UChar>& buffer)
+{
+ ASSERT(length);
+
+ buffer.resize(length);
+
+ UErrorCode status = U_ZERO_ERROR;
+ size_t bufferSize = unorm_normalize(characters, length, UNORM_NFC, 0, buffer.data(), length, &status);
+ ASSERT(status == U_ZERO_ERROR || status == U_STRING_NOT_TERMINATED_WARNING || status == U_BUFFER_OVERFLOW_ERROR);
+ ASSERT(bufferSize);
+
+ buffer.resize(bufferSize);
+
+ if (status == U_ZERO_ERROR || status == U_STRING_NOT_TERMINATED_WARNING)
+ return;
+
+ status = U_ZERO_ERROR;
+ unorm_normalize(characters, length, UNORM_NFC, 0, buffer.data(), bufferSize, &status);
+ ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
+}
+
inline SearchBuffer::SearchBuffer(const String& target, bool isCaseSensitive)
: m_target(target)
, m_atBreak(true)
+ , m_targetRequiresKanaWorkaround(containsKanaLetters(m_target))
{
ASSERT(!m_target.isEmpty());
@@ -1497,6 +1730,10 @@ inline SearchBuffer::SearchBuffer(const String& target, bool isCaseSensitive)
UErrorCode status = U_ZERO_ERROR;
usearch_setPattern(searcher, m_target.characters(), targetLength, &status);
ASSERT(status == U_ZERO_ERROR);
+
+ // The kana workaround requires a normalized copy of the target string.
+ if (m_targetRequiresKanaWorkaround)
+ normalizeCharacters(m_target.characters(), m_target.length(), m_normalizedTarget);
}
inline SearchBuffer::~SearchBuffer()
@@ -1534,6 +1771,66 @@ inline void SearchBuffer::reachedBreak()
m_atBreak = true;
}
+inline bool SearchBuffer::isBadMatch(const UChar* match, size_t matchLength) const
+{
+ // This function implements the kana workaround. If usearch treats
+ // it as a match, but we do not want to, then it's a "bad match".
+ if (!m_targetRequiresKanaWorkaround)
+ return false;
+
+ // Normalize into a match buffer. We reuse a single buffer rather than
+ // creating a new one each time.
+ normalizeCharacters(match, matchLength, m_normalizedMatch);
+
+ const UChar* a = m_normalizedTarget.begin();
+ const UChar* aEnd = m_normalizedTarget.end();
+
+ const UChar* b = m_normalizedMatch.begin();
+ const UChar* bEnd = m_normalizedMatch.end();
+
+ while (true) {
+ // Skip runs of non-kana-letter characters. This is necessary so we can
+ // correctly handle strings where the target and match have different-length
+ // runs of characters that match, while still double checking the correctness
+ // of matches of kana letters with other kana letters.
+ while (a != aEnd && !isKanaLetter(*a))
+ ++a;
+ while (b != bEnd && !isKanaLetter(*b))
+ ++b;
+
+ // If we reached the end of either the target or the match, we should have
+ // reached the end of both; both should have the same number of kana letters.
+ if (a == aEnd || b == bEnd) {
+ ASSERT(a == aEnd);
+ ASSERT(b == bEnd);
+ return false;
+ }
+
+ // Check for differences in the kana letter character itself.
+ if (isSmallKanaLetter(*a) != isSmallKanaLetter(*b))
+ return true;
+ if (composedVoicedSoundMark(*a) != composedVoicedSoundMark(*b))
+ return true;
+ ++a;
+ ++b;
+
+ // Check for differences in combining voiced sound marks found after the letter.
+ while (1) {
+ if (!(a != aEnd && isCombiningVoicedSoundMark(*a))) {
+ if (b != bEnd && isCombiningVoicedSoundMark(*b))
+ return true;
+ break;
+ }
+ if (!(b != bEnd && isCombiningVoicedSoundMark(*b)))
+ return true;
+ if (*a != *b)
+ return true;
+ ++a;
+ ++b;
+ }
+ }
+}
+
inline size_t SearchBuffer::search(size_t& start)
{
size_t size = m_buffer.size();
@@ -1553,6 +1850,8 @@ inline size_t SearchBuffer::search(size_t& start)
int matchStart = usearch_first(searcher, &status);
ASSERT(status == U_ZERO_ERROR);
+
+nextMatch:
if (!(matchStart >= 0 && static_cast<size_t>(matchStart) < size)) {
ASSERT(matchStart == USEARCH_DONE);
return 0;
@@ -1567,12 +1866,22 @@ inline size_t SearchBuffer::search(size_t& start)
return 0;
}
+ size_t matchedLength = usearch_getMatchedLength(searcher);
+ ASSERT(matchStart + matchedLength <= size);
+
+ // If this match is "bad", move on to the next match.
+ if (isBadMatch(m_buffer.data() + matchStart, matchedLength)) {
+ matchStart = usearch_next(searcher, &status);
+ ASSERT(status == U_ZERO_ERROR);
+ goto nextMatch;
+ }
+
size_t newSize = size - (matchStart + 1);
memmove(m_buffer.data(), m_buffer.data() + matchStart + 1, newSize * sizeof(UChar));
m_buffer.shrink(newSize);
start = size - matchStart;
- return usearch_getMatchedLength(searcher);
+ return matchedLength;
}
#else // !ICU_UNICODE
diff --git a/WebCore/editing/TypingCommand.cpp b/WebCore/editing/TypingCommand.cpp
index 2b0f61e..1c9db90 100644
--- a/WebCore/editing/TypingCommand.cpp
+++ b/WebCore/editing/TypingCommand.cpp
@@ -450,6 +450,10 @@ void TypingCommand::deleteKeyPressed(TextGranularity granularity, bool killRing)
}
VisiblePosition visibleStart(endingSelection().visibleStart());
+ // If we have a caret selection on an empty cell, we have nothing to do.
+ if (isEmptyTableCell(visibleStart.deepEquivalent().node()))
+ return;
+
// If the caret is at the start of a paragraph after a table, move content into the last table cell.
if (isStartOfParagraph(visibleStart) && isFirstPositionAfterTable(visibleStart.previous(true))) {
// Unless the caret is just before a table. We don't want to move a table into the last table cell.
diff --git a/WebCore/editing/VisibleSelection.cpp b/WebCore/editing/VisibleSelection.cpp
index 68d5a3e..baef2b5 100644
--- a/WebCore/editing/VisibleSelection.cpp
+++ b/WebCore/editing/VisibleSelection.cpp
@@ -301,7 +301,7 @@ void VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity()
VisiblePosition wordEnd(endOfWord(originalEnd, side));
VisiblePosition end(wordEnd);
- if (isEndOfParagraph(originalEnd)) {
+ if (isEndOfParagraph(originalEnd) && !isEmptyTableCell(m_start.node())) {
// Select the paragraph break (the space from the end of a paragraph to the start of
// the next one) to match TextEdit.
end = wordEnd.next();
diff --git a/WebCore/editing/VisibleSelection.h b/WebCore/editing/VisibleSelection.h
index e346b27..bbcecf2 100644
--- a/WebCore/editing/VisibleSelection.h
+++ b/WebCore/editing/VisibleSelection.h
@@ -114,7 +114,11 @@ private:
void adjustSelectionToAvoidCrossingEditingBoundaries();
void updateSelectionType();
- // FIXME: These should all be VisiblePositions
+ // We need to store these as Positions because VisibleSelection is
+ // used to store values in editing commands for use when
+ // undoing the command. We need to be able to create a selection that, while currently
+ // invalid, will be valid once the changes are undone.
+
Position m_base; // Where the first click happened
Position m_extent; // Where the end click happened
Position m_start; // Leftmost position when expanded to respect granularity
diff --git a/WebCore/editing/gtk/SelectionControllerGtk.cpp b/WebCore/editing/gtk/SelectionControllerGtk.cpp
index f3bd4bc..6a3258a 100644
--- a/WebCore/editing/gtk/SelectionControllerGtk.cpp
+++ b/WebCore/editing/gtk/SelectionControllerGtk.cpp
@@ -20,6 +20,7 @@
#include "config.h"
#include "SelectionController.h"
+#include "AccessibilityObjectWrapperAtk.h"
#include "AXObjectCache.h"
#include "Frame.h"
@@ -29,14 +30,16 @@ namespace WebCore {
void SelectionController::notifyAccessibilityForSelectionChange()
{
- if (AXObjectCache::accessibilityEnabled() && m_sel.start().isNotNull() && m_sel.end().isNotNull()) {
- RenderObject* focusedNode = m_sel.end().node()->renderer();
+ if (AXObjectCache::accessibilityEnabled() && m_selection.start().isNotNull() && m_selection.end().isNotNull()) {
+ RenderObject* focusedNode = m_selection.end().node()->renderer();
AccessibilityObject* accessibilityObject = m_frame->document()->axObjectCache()->getOrCreate(focusedNode);
- AtkObject* wrapper = accessibilityObject->wrapper();
+ int offset;
+ // Always report the events w.r.t. the non-linked unignored parent. (i.e. ignoreLinks == true)
+ AccessibilityObject* object = objectAndOffsetUnignored(accessibilityObject, offset, true);
+ AtkObject* wrapper = object->wrapper();
if (ATK_IS_TEXT(wrapper)) {
- g_signal_emit_by_name(wrapper, "text-caret-moved", m_sel.end().computeOffsetInContainerNode());
-
- if (m_sel.isRange())
+ g_signal_emit_by_name(wrapper, "text-caret-moved", offset);
+ if (m_selection.isRange())
g_signal_emit_by_name(wrapper, "text-selection-changed");
}
}
diff --git a/WebCore/editing/htmlediting.cpp b/WebCore/editing/htmlediting.cpp
index 8b1c98d..b58dff3 100644
--- a/WebCore/editing/htmlediting.cpp
+++ b/WebCore/editing/htmlediting.cpp
@@ -474,20 +474,25 @@ bool validBlockTag(const AtomicString& blockTag)
DEFINE_STATIC_LOCAL(HashSet<AtomicString>, blockTags, ());
if (blockTags.isEmpty()) {
blockTags.add(addressTag.localName());
+ blockTags.add(articleTag.localName());
+ blockTags.add(asideTag.localName());
blockTags.add(blockquoteTag.localName());
blockTags.add(ddTag.localName());
blockTags.add(divTag.localName());
blockTags.add(dlTag.localName());
blockTags.add(dtTag.localName());
+ blockTags.add(footerTag.localName());
blockTags.add(h1Tag.localName());
blockTags.add(h2Tag.localName());
blockTags.add(h3Tag.localName());
blockTags.add(h4Tag.localName());
blockTags.add(h5Tag.localName());
blockTags.add(h6Tag.localName());
+ blockTags.add(headerTag.localName());
blockTags.add(navTag.localName());
blockTags.add(pTag.localName());
blockTags.add(preTag.localName());
+ blockTags.add(sectionTag.localName());
}
return blockTags.contains(blockTag);
}
@@ -851,6 +856,11 @@ bool isTableCell(const Node* node)
return r->isTableCell();
}
+bool isEmptyTableCell(const Node* node)
+{
+ return node && node->renderer() && (node->renderer()->isTableCell() || (node->renderer()->isBR() && node->parentNode()->renderer() && node->parentNode()->renderer()->isTableCell()));
+}
+
PassRefPtr<HTMLElement> createDefaultParagraphElement(Document* document)
{
return new HTMLDivElement(divTag, document);
@@ -973,7 +983,7 @@ unsigned numEnclosingMailBlockquotes(const Position& p)
bool isMailBlockquote(const Node *node)
{
- if (!node || (!node->isElementNode() && !node->hasTagName(blockquoteTag)))
+ if (!node || !node->hasTagName(blockquoteTag))
return false;
return static_cast<const Element *>(node)->getAttribute("type") == "cite";
diff --git a/WebCore/editing/htmlediting.h b/WebCore/editing/htmlediting.h
index 43048e0..c5a44ac 100644
--- a/WebCore/editing/htmlediting.h
+++ b/WebCore/editing/htmlediting.h
@@ -87,6 +87,7 @@ bool isTabSpanTextNode(const Node*);
bool isMailBlockquote(const Node*);
bool isTableElement(Node*);
bool isTableCell(const Node*);
+bool isEmptyTableCell(const Node*);
bool isTableStructureNode(const Node*);
bool isListElement(Node*);
bool isNodeRendered(const Node*);
diff --git a/WebCore/editing/mac/SelectionControllerMac.mm b/WebCore/editing/mac/SelectionControllerMac.mm
index 47fb434..730eb60 100644
--- a/WebCore/editing/mac/SelectionControllerMac.mm
+++ b/WebCore/editing/mac/SelectionControllerMac.mm
@@ -37,11 +37,11 @@ void SelectionController::notifyAccessibilityForSelectionChange()
{
Document* document = m_frame->document();
- if (AXObjectCache::accessibilityEnabled() && m_sel.start().isNotNull() && m_sel.end().isNotNull())
- document->axObjectCache()->postNotification(m_sel.start().node()->renderer(), AXObjectCache::AXSelectedTextChanged, false);
+ if (AXObjectCache::accessibilityEnabled() && m_selection.start().isNotNull() && m_selection.end().isNotNull())
+ document->axObjectCache()->postNotification(m_selection.start().node()->renderer(), AXObjectCache::AXSelectedTextChanged, false);
// if zoom feature is enabled, insertion point changes should update the zoom
- if (!UAZoomEnabled() || !m_sel.isCaret())
+ if (!UAZoomEnabled() || !m_selection.isCaret())
return;
RenderView* renderView = document->renderView();
diff --git a/WebCore/editing/markup.cpp b/WebCore/editing/markup.cpp
index 47714e7..dc6cbc2 100644
--- a/WebCore/editing/markup.cpp
+++ b/WebCore/editing/markup.cpp
@@ -55,6 +55,7 @@
#include "Range.h"
#include "VisibleSelection.h"
#include "TextIterator.h"
+#include "XMLNSNames.h"
#include "htmlediting.h"
#include "visible_units.h"
#include <wtf/StdLibExtras.h>
@@ -314,15 +315,15 @@ static bool shouldAddNamespaceElem(const Element* elem)
static bool shouldAddNamespaceAttr(const Attribute* attr, HashMap<AtomicStringImpl*, AtomicStringImpl*>& namespaces)
{
+ namespaces.checkConsistency();
+
// Don't add namespace attributes twice
- DEFINE_STATIC_LOCAL(const AtomicString, xmlnsURI, ("http://www.w3.org/2000/xmlns/"));
- DEFINE_STATIC_LOCAL(const QualifiedName, xmlnsAttr, (nullAtom, "xmlns", xmlnsURI));
- if (attr->name() == xmlnsAttr) {
+ if (attr->name() == XMLNSNames::xmlnsAttr) {
namespaces.set(emptyAtom.impl(), attr->value().impl());
return false;
}
- QualifiedName xmlnsPrefixAttr("xmlns", attr->localName(), xmlnsURI);
+ QualifiedName xmlnsPrefixAttr(xmlnsAtom, attr->localName(), XMLNSNames::xmlnsNamespaceURI);
if (attr->name() == xmlnsPrefixAttr) {
namespaces.set(attr->localName().impl(), attr->value().impl());
return false;
@@ -333,6 +334,7 @@ static bool shouldAddNamespaceAttr(const Attribute* attr, HashMap<AtomicStringIm
static void appendNamespace(Vector<UChar>& result, const AtomicString& prefix, const AtomicString& ns, HashMap<AtomicStringImpl*, AtomicStringImpl*>& namespaces)
{
+ namespaces.checkConsistency();
if (ns.isEmpty())
return;
@@ -341,9 +343,8 @@ static void appendNamespace(Vector<UChar>& result, const AtomicString& prefix, c
AtomicStringImpl* foundNS = namespaces.get(pre);
if (foundNS != ns.impl()) {
namespaces.set(pre, ns.impl());
- DEFINE_STATIC_LOCAL(const String, xmlns, ("xmlns"));
result.append(' ');
- append(result, xmlns);
+ append(result, xmlnsAtom.string());
if (!prefix.isEmpty()) {
result.append(':');
append(result, prefix);
@@ -394,6 +395,9 @@ enum RangeFullySelectsNode { DoesFullySelectNode, DoesNotFullySelectNode };
static void appendStartMarkup(Vector<UChar>& result, const Node* node, const Range* range, EAnnotateForInterchange annotate, bool convertBlocksToInlines = false, HashMap<AtomicStringImpl*, AtomicStringImpl*>* namespaces = 0, RangeFullySelectsNode rangeFullySelectsNode = DoesFullySelectNode)
{
+ if (namespaces)
+ namespaces->checkConsistency();
+
bool documentIsHTML = node->document()->isHTMLDocument();
switch (node->nodeType()) {
case Node::TEXT_NODE: {
@@ -1052,13 +1056,13 @@ String createMarkup(const Range* range, Vector<Node*>* nodes, EAnnotateForInterc
return joinMarkups(preMarkups, markups);
}
-PassRefPtr<DocumentFragment> createFragmentFromMarkup(Document* document, const String& markup, const String& baseURL)
+PassRefPtr<DocumentFragment> createFragmentFromMarkup(Document* document, const String& markup, const String& baseURL, FragmentScriptingPermission scriptingPermission)
{
ASSERT(document->documentElement()->isHTMLElement());
// FIXME: What if the document element is not an HTML element?
HTMLElement *element = static_cast<HTMLElement*>(document->documentElement());
- RefPtr<DocumentFragment> fragment = element->createContextualFragment(markup);
+ RefPtr<DocumentFragment> fragment = element->createContextualFragment(markup, scriptingPermission);
if (fragment && !baseURL.isEmpty() && baseURL != blankURL() && baseURL != document->baseURL())
completeURLs(fragment.get(), baseURL);
@@ -1129,6 +1133,17 @@ static void fillContainerFromString(ContainerNode* paragraph, const String& stri
}
}
+bool isPlainTextMarkup(Node *node)
+{
+ if (!node->isElementNode() || !node->hasTagName(divTag) || static_cast<Element*>(node)->attributes()->length())
+ return false;
+
+ if (node->childNodeCount() == 1 && (node->firstChild()->isTextNode() || (node->firstChild()->firstChild())))
+ return true;
+
+ return (node->childNodeCount() == 2 && isTabSpanTextNode(node->firstChild()->firstChild()) && node->firstChild()->nextSibling()->isTextNode());
+}
+
PassRefPtr<DocumentFragment> createFragmentFromText(Range* context, const String& text)
{
if (!context)
diff --git a/WebCore/editing/markup.h b/WebCore/editing/markup.h
index 6b7333c..5ace04a 100644
--- a/WebCore/editing/markup.h
+++ b/WebCore/editing/markup.h
@@ -27,6 +27,7 @@
#define markup_h
#include "HTMLInterchange.h"
+#include "MappedAttributeEntry.h"
#include <wtf/Forward.h>
#include <wtf/Vector.h>
@@ -41,9 +42,11 @@ namespace WebCore {
enum EChildrenOnly { IncludeNode, ChildrenOnly };
PassRefPtr<DocumentFragment> createFragmentFromText(Range* context, const String& text);
- PassRefPtr<DocumentFragment> createFragmentFromMarkup(Document*, const String& markup, const String& baseURL);
+ PassRefPtr<DocumentFragment> createFragmentFromMarkup(Document*, const String& markup, const String& baseURL, FragmentScriptingPermission = FragmentScriptingAllowed);
PassRefPtr<DocumentFragment> createFragmentFromNodes(Document*, const Vector<Node*>&);
+ bool isPlainTextMarkup(Node *node);
+
String createMarkup(const Range*,
Vector<Node*>* = 0, EAnnotateForInterchange = DoNotAnnotateForInterchange, bool convertBlocksToInlines = false);
String createMarkup(const Node*, EChildrenOnly = IncludeNode, Vector<Node*>* = 0);
diff --git a/WebCore/history/BackForwardList.cpp b/WebCore/history/BackForwardList.cpp
index 3550e37..721d949 100644
--- a/WebCore/history/BackForwardList.cpp
+++ b/WebCore/history/BackForwardList.cpp
@@ -59,17 +59,12 @@ BackForwardList::~BackForwardList()
void BackForwardList::addItem(PassRefPtr<HistoryItem> prpItem)
{
- insertItemAfterCurrent(prpItem, true);
-}
-
-void BackForwardList::insertItemAfterCurrent(PassRefPtr<HistoryItem> prpItem, bool removeForwardList)
-{
ASSERT(prpItem);
if (m_capacity == 0 || !m_enabled)
return;
// Toss anything in the forward list
- if (removeForwardList && m_current != NoCurrentItemIndex) {
+ if (m_current != NoCurrentItemIndex) {
unsigned targetSize = m_current + 1;
while (m_entries.size() > targetSize) {
RefPtr<HistoryItem> item = m_entries.last();
@@ -244,25 +239,15 @@ HistoryItemVector& BackForwardList::entries()
void BackForwardList::pushStateItem(PassRefPtr<HistoryItem> newItem)
{
ASSERT(newItem);
- ASSERT(newItem->document());
ASSERT(newItem->stateObject());
RefPtr<HistoryItem> current = currentItem();
ASSERT(current);
- Document* newItemDocument = newItem->document();
- while (HistoryItem* item = forwardItem()) {
- if (item->document() != newItemDocument)
- break;
- removeItem(item);
- }
-
- insertItemAfterCurrent(newItem, false);
+ addItem(newItem);
- if (!current->document()) {
- current->setDocument(newItemDocument);
+ if (!current->stateObject())
current->setStateObject(SerializedScriptValue::create());
- }
}
void BackForwardList::close()
diff --git a/WebCore/history/BackForwardList.h b/WebCore/history/BackForwardList.h
index 88398a5..eb4921a 100644
--- a/WebCore/history/BackForwardList.h
+++ b/WebCore/history/BackForwardList.h
@@ -108,8 +108,6 @@ public:
private:
BackForwardList(Page*);
- void insertItemAfterCurrent(PassRefPtr<HistoryItem>, bool removeForwardList);
-
Page* m_page;
#if PLATFORM(CHROMIUM)
BackForwardListClient* m_client;
diff --git a/WebCore/history/BackForwardListChromium.cpp b/WebCore/history/BackForwardListChromium.cpp
index f539e80..a780b7d 100644
--- a/WebCore/history/BackForwardListChromium.cpp
+++ b/WebCore/history/BackForwardListChromium.cpp
@@ -123,7 +123,12 @@ HistoryItem* BackForwardList::itemAtIndex(int index)
void BackForwardList::pushStateItem(PassRefPtr<HistoryItem> newItem)
{
- // FIXME: Need to implement state support for chromium.
+ RefPtr<HistoryItem> current = m_client->currentItem();
+
+ addItem(newItem);
+
+ if (!current->stateObject())
+ current->setStateObject(SerializedScriptValue::create());
}
HistoryItemVector& BackForwardList::entries()
diff --git a/WebCore/history/CachedFrame.cpp b/WebCore/history/CachedFrame.cpp
index 7d69195..3d2399f 100644
--- a/WebCore/history/CachedFrame.cpp
+++ b/WebCore/history/CachedFrame.cpp
@@ -43,6 +43,10 @@
#endif
#if ENABLE(TOUCH_EVENTS)
+<<<<<<< HEAD
+=======
+#include "Chrome.h"
+>>>>>>> webkit.org at r54127
#include "ChromeClient.h"
#include "Page.h"
#endif
@@ -149,6 +153,9 @@ CachedFrame::CachedFrame(Frame* frame)
for (unsigned i = 0; i < m_childFrames.size(); ++i)
frame->tree()->removeChild(m_childFrames[i]->view()->frame());
+ if (!m_isMainFrame)
+ frame->page()->decrementFrameCount();
+
#ifndef NDEBUG
if (m_isMainFrame)
LOG(PageCache, "Finished creating CachedFrame for main frame url '%s' and DocumentLoader %p\n", m_url.string().utf8().data(), m_documentLoader.get());
@@ -166,6 +173,9 @@ void CachedFrame::open()
{
ASSERT(m_view);
m_view->frame()->loader()->open(*this);
+
+ if (!m_isMainFrame)
+ m_view->frame()->page()->incrementFrameCount();
}
void CachedFrame::clear()
diff --git a/WebCore/history/CachedFrame.h b/WebCore/history/CachedFrame.h
index 883c12a..ca772a4 100644
--- a/WebCore/history/CachedFrame.h
+++ b/WebCore/history/CachedFrame.h
@@ -31,15 +31,13 @@
#include <wtf/RefPtr.h>
namespace WebCore {
-
- class CachedFrame;
- class CachedFramePlatformData;
- class DOMWindow;
- class Document;
- class DocumentLoader;
- class Frame;
- class FrameView;
- class Node;
+
+class CachedFrame;
+class CachedFramePlatformData;
+class Document;
+class DocumentLoader;
+class FrameView;
+class Node;
typedef Vector<RefPtr<CachedFrame> > CachedFrameVector;
diff --git a/WebCore/history/CachedPage.cpp b/WebCore/history/CachedPage.cpp
index 20c5fd7..acbfd31 100644
--- a/WebCore/history/CachedPage.cpp
+++ b/WebCore/history/CachedPage.cpp
@@ -69,6 +69,7 @@ void CachedPage::restore(Page* page)
{
ASSERT(m_cachedMainFrame);
ASSERT(page && page->mainFrame() && page->mainFrame() == m_cachedMainFrame->view()->frame());
+ ASSERT(!page->frameCount());
m_cachedMainFrame->open();
diff --git a/WebCore/history/CachedPage.h b/WebCore/history/CachedPage.h
index c68c753..4741c79 100644
--- a/WebCore/history/CachedPage.h
+++ b/WebCore/history/CachedPage.h
@@ -30,14 +30,9 @@
namespace WebCore {
- class CachedFramePlatformData;
- class DOMWindow;
- class Document;
- class DocumentLoader;
- class FrameView;
- class KURL;
- class Node;
- class Page;
+class Document;
+class DocumentLoader;
+class Page;
class CachedPage : public RefCounted<CachedPage> {
public:
diff --git a/WebCore/history/HistoryItem.cpp b/WebCore/history/HistoryItem.cpp
index 21e67ca..d641d4e 100644
--- a/WebCore/history/HistoryItem.cpp
+++ b/WebCore/history/HistoryItem.cpp
@@ -33,9 +33,18 @@
#include "PageCache.h"
#include "ResourceRequest.h"
#include <stdio.h>
+#include <wtf/CurrentTime.h>
namespace WebCore {
+static long long generateDocumentSequenceNumber()
+{
+ // Initialize to the current time to reduce the likelihood of generating
+ // identifiers that overlap with those from past/future browser sessions.
+ static long long next = static_cast<long long>(currentTime() * 1000000.0);
+ return ++next;
+}
+
static void defaultNotifyHistoryItemChanged(HistoryItem*)
{
}
@@ -48,7 +57,7 @@ HistoryItem::HistoryItem()
, m_lastVisitWasFailure(false)
, m_isTargetItem(false)
, m_visitCount(0)
- , m_document(0)
+ , m_documentSequenceNumber(generateDocumentSequenceNumber())
{
}
@@ -61,7 +70,7 @@ HistoryItem::HistoryItem(const String& urlString, const String& title, double ti
, m_lastVisitWasFailure(false)
, m_isTargetItem(false)
, m_visitCount(0)
- , m_document(0)
+ , m_documentSequenceNumber(generateDocumentSequenceNumber())
{
iconDatabase()->retainIconForPageURL(m_urlString);
}
@@ -76,7 +85,7 @@ HistoryItem::HistoryItem(const String& urlString, const String& title, const Str
, m_lastVisitWasFailure(false)
, m_isTargetItem(false)
, m_visitCount(0)
- , m_document(0)
+ , m_documentSequenceNumber(generateDocumentSequenceNumber())
{
iconDatabase()->retainIconForPageURL(m_urlString);
}
@@ -92,7 +101,7 @@ HistoryItem::HistoryItem(const KURL& url, const String& target, const String& pa
, m_lastVisitWasFailure(false)
, m_isTargetItem(false)
, m_visitCount(0)
- , m_document(0)
+ , m_documentSequenceNumber(generateDocumentSequenceNumber())
{
iconDatabase()->retainIconForPageURL(m_urlString);
}
@@ -100,7 +109,6 @@ HistoryItem::HistoryItem(const KURL& url, const String& target, const String& pa
HistoryItem::~HistoryItem()
{
ASSERT(!m_cachedPage);
- ASSERT(!m_document);
iconDatabase()->releaseIconForPageURL(m_urlString);
#if PLATFORM(ANDROID)
if (m_bridge)
@@ -125,7 +133,7 @@ inline HistoryItem::HistoryItem(const HistoryItem& item)
, m_visitCount(item.m_visitCount)
, m_dailyVisitCounts(item.m_dailyVisitCounts)
, m_weeklyVisitCounts(item.m_weeklyVisitCounts)
- , m_document(0)
+ , m_documentSequenceNumber(generateDocumentSequenceNumber())
, m_formContentType(item.m_formContentType)
{
if (item.m_formData)
@@ -397,30 +405,9 @@ void HistoryItem::setIsTargetItem(bool flag)
void HistoryItem::setStateObject(PassRefPtr<SerializedScriptValue> object)
{
- ASSERT(m_document);
m_stateObject = object;
}
-void HistoryItem::setDocument(Document* document)
-{
- if (m_document == document)
- return;
-
- if (m_document)
- m_document->unregisterHistoryItem(this);
- if (document)
- document->registerHistoryItem(this);
-
- m_document = document;
-}
-
-void HistoryItem::documentDetached(Document* document)
-{
- ASSERT_UNUSED(document, m_document == document);
- m_document = 0;
- m_stateObject = 0;
-}
-
void HistoryItem::addChildItem(PassRefPtr<HistoryItem> child)
{
ASSERT(!childItemWithTarget(child->target()));
diff --git a/WebCore/history/HistoryItem.h b/WebCore/history/HistoryItem.h
index 4c91e76..ee8c0c8 100644
--- a/WebCore/history/HistoryItem.h
+++ b/WebCore/history/HistoryItem.h
@@ -135,9 +135,9 @@ public:
void setStateObject(PassRefPtr<SerializedScriptValue> object);
SerializedScriptValue* stateObject() const { return m_stateObject.get(); }
- void setDocument(Document* document);
- Document* document() const { return m_document; }
- void documentDetached(Document*);
+
+ void setDocumentSequenceNumber(long long number) { m_documentSequenceNumber = number; }
+ long long documentSequenceNumber() const { return m_documentSequenceNumber; }
void setFormInfoFromRequest(const ResourceRequest&);
void setFormData(PassRefPtr<FormData>);
@@ -244,7 +244,7 @@ private:
// Support for HTML5 History
RefPtr<SerializedScriptValue> m_stateObject;
- Document* m_document;
+ long long m_documentSequenceNumber;
// info used to repost form data
RefPtr<FormData> m_formData;
diff --git a/WebCore/html/Blob.cpp b/WebCore/html/Blob.cpp
new file mode 100644
index 0000000..0b677ea
--- /dev/null
+++ b/WebCore/html/Blob.cpp
@@ -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.
+ */
+
+#include "config.h"
+#include "Blob.h"
+
+#include "FileSystem.h"
+
+namespace WebCore {
+
+Blob::Blob(const String& path)
+ : m_path(path)
+{
+}
+
+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.
+ long long size;
+ if (!getFileSize(m_path, size))
+ return 0;
+ return static_cast<unsigned long long>(size);
+}
+
+} // namespace WebCore
diff --git a/WebCore/html/Blob.h b/WebCore/html/Blob.h
new file mode 100644
index 0000000..b910e8f
--- /dev/null
+++ b/WebCore/html/Blob.h
@@ -0,0 +1,62 @@
+/*
+ * 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 Blob_h
+#define Blob_h
+
+#include "ExceptionCode.h"
+#include "PlatformString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class Blob : public RefCounted<Blob> {
+public:
+ static PassRefPtr<Blob> create(const String& path)
+ {
+ return adoptRef(new Blob(path));
+ }
+
+ virtual ~Blob() { }
+
+ const String& path() const { return m_path; }
+ unsigned long long size() const;
+
+protected:
+ Blob(const String& path);
+
+private:
+ String m_path;
+};
+
+} // namespace WebCore
+
+#endif // Blob_h
diff --git a/WebCore/html/Blob.idl b/WebCore/html/Blob.idl
new file mode 100644
index 0000000..573be35
--- /dev/null
+++ b/WebCore/html/Blob.idl
@@ -0,0 +1,37 @@
+/*
+ * 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 Blob {
+ readonly attribute unsigned long long size;
+ };
+
+}
diff --git a/WebCore/html/CollectionCache.cpp b/WebCore/html/CollectionCache.cpp
index feecd96..745cf6e 100644
--- a/WebCore/html/CollectionCache.cpp
+++ b/WebCore/html/CollectionCache.cpp
@@ -85,4 +85,12 @@ void CollectionCache::reset()
hasNameCache = false;
}
+#if !ASSERT_DISABLED
+void CollectionCache::checkConsistency()
+{
+ idCache.checkConsistency();
+ nameCache.checkConsistency();
+}
+#endif
+
} // namespace WebCore
diff --git a/WebCore/html/CollectionCache.h b/WebCore/html/CollectionCache.h
index 0a49fb8..70a5af7 100644
--- a/WebCore/html/CollectionCache.h
+++ b/WebCore/html/CollectionCache.h
@@ -43,6 +43,8 @@ struct CollectionCache : FastAllocBase {
void reset();
void swap(CollectionCache&);
+ void checkConsistency();
+
typedef HashMap<AtomicStringImpl*, Vector<Element*>*> NodeCacheMap;
unsigned version;
@@ -59,6 +61,10 @@ private:
static void copyCacheMap(NodeCacheMap&, const NodeCacheMap&);
};
+#if ASSERT_DISABLED
+ inline void CollectionCache::checkConsistency() { }
+#endif
+
} // namespace
#endif
diff --git a/WebCore/html/DataGridColumn.idl b/WebCore/html/DataGridColumn.idl
index f566325..9214800 100644
--- a/WebCore/html/DataGridColumn.idl
+++ b/WebCore/html/DataGridColumn.idl
@@ -26,7 +26,6 @@
module html {
interface [
- GenerateConstructor,
Conditional=DATAGRID
] DataGridColumn {
attribute DOMString id; // The identifier for the column.
diff --git a/WebCore/html/DataGridColumnList.idl b/WebCore/html/DataGridColumnList.idl
index 1a59f43..9a8ea5c 100644
--- a/WebCore/html/DataGridColumnList.idl
+++ b/WebCore/html/DataGridColumnList.idl
@@ -26,7 +26,6 @@
module html {
interface [
- GenerateConstructor,
HasIndexGetter,
HasNameGetter,
Conditional=DATAGRID
diff --git a/WebCore/html/ISODateTime.cpp b/WebCore/html/DateComponents.cpp
index 4c28ac0..9c62d30 100644
--- a/WebCore/html/ISODateTime.cpp
+++ b/WebCore/html/DateComponents.cpp
@@ -29,10 +29,15 @@
*/
#include "config.h"
-#include "ISODateTime.h"
+#include "DateComponents.h"
+#include "PlatformString.h"
#include <limits.h>
#include <wtf/ASCIICType.h>
+#include <wtf/DateMath.h>
+#include <wtf/MathExtras.h>
+
+using namespace std;
namespace WebCore {
@@ -54,7 +59,7 @@ static bool isLeapYear(int year)
return true;
}
-// `month' is 0-based.
+// 'month' is 0-based.
static int maxDayOfMonth(int year, int month)
{
if (month != 1) // February?
@@ -62,7 +67,7 @@ static int maxDayOfMonth(int year, int month)
return isLeapYear(year) ? 29 : 28;
}
-// `month' is 0-based.
+// 'month' is 0-based.
static int dayOfWeek(int year, int month, int day)
{
int shiftedMonth = month + 2;
@@ -82,7 +87,7 @@ static int dayOfWeek(int year, int month, int day)
return result;
}
-int ISODateTime::maxWeekNumberInYear() const
+int DateComponents::maxWeekNumberInYear() const
{
int day = dayOfWeek(m_year, 0, 1); // January 1.
return day == Thursday || (day == Wednesday && isLeapYear(m_year)) ? 53 : 52;
@@ -120,7 +125,7 @@ static bool toInt(const UChar* src, unsigned length, unsigned parseStart, unsign
return true;
}
-bool ISODateTime::parseYear(const UChar* src, unsigned length, unsigned start, unsigned& end)
+bool DateComponents::parseYear(const UChar* src, unsigned length, unsigned start, unsigned& end)
{
unsigned digitsLength = countDigits(src, length, start);
// Needs at least 4 digits according to the standard.
@@ -137,7 +142,14 @@ bool ISODateTime::parseYear(const UChar* src, unsigned length, unsigned start, u
return true;
}
-bool ISODateTime::addDay(int dayDiff)
+static bool beforeGregorianStartDate(int year, int month, int monthDay)
+{
+ return year < gregorianStartYear
+ || year == gregorianStartYear && month < gregorianStartMonth
+ || year == gregorianStartYear && month == gregorianStartMonth && monthDay < gregorianStartDay;
+}
+
+bool DateComponents::addDay(int dayDiff)
{
ASSERT(m_monthDay);
@@ -177,9 +189,7 @@ bool ISODateTime::addDay(int dayDiff)
}
day = maxDayOfMonth(year, month);
}
- if (year < gregorianStartYear
- || (year == gregorianStartYear && month < gregorianStartMonth)
- || (year == gregorianStartYear && month == gregorianStartMonth && day < gregorianStartDay))
+ if (beforeGregorianStartDate(year, month, day))
return false;
}
m_year = year;
@@ -189,7 +199,7 @@ bool ISODateTime::addDay(int dayDiff)
return true;
}
-bool ISODateTime::addMinute(int minute)
+bool DateComponents::addMinute(int minute)
{
int carry;
// min can be negative or greater than 59.
@@ -229,7 +239,7 @@ bool ISODateTime::addMinute(int minute)
}
// Parses a timezone part, and adjust year, month, monthDay, hour, minute, second, millisecond.
-bool ISODateTime::parseTimeZone(const UChar* src, unsigned length, unsigned start, unsigned& end)
+bool DateComponents::parseTimeZone(const UChar* src, unsigned length, unsigned start, unsigned& end)
{
if (start >= length)
return false;
@@ -274,7 +284,7 @@ bool ISODateTime::parseTimeZone(const UChar* src, unsigned length, unsigned star
return true;
}
-bool ISODateTime::parseMonth(const UChar* src, unsigned length, unsigned start, unsigned& end)
+bool DateComponents::parseMonth(const UChar* src, unsigned length, unsigned start, unsigned& end)
{
ASSERT(src);
unsigned index;
@@ -289,14 +299,15 @@ bool ISODateTime::parseMonth(const UChar* src, unsigned length, unsigned start,
return false;
--month;
// No support for months before Gregorian calendar.
- if (m_year == gregorianStartYear && month < gregorianStartMonth)
+ if (beforeGregorianStartDate(m_year, month, gregorianStartDay))
return false;
m_month = month;
end = index + 2;
+ m_type = Month;
return true;
}
-bool ISODateTime::parseDate(const UChar* src, unsigned length, unsigned start, unsigned& end)
+bool DateComponents::parseDate(const UChar* src, unsigned length, unsigned start, unsigned& end)
{
ASSERT(src);
unsigned index;
@@ -317,10 +328,11 @@ bool ISODateTime::parseDate(const UChar* src, unsigned length, unsigned start, u
return false;
m_monthDay = day;
end = index + 2;
+ m_type = Date;
return true;
}
-bool ISODateTime::parseWeek(const UChar* src, unsigned length, unsigned start, unsigned& end)
+bool DateComponents::parseWeek(const UChar* src, unsigned length, unsigned start, unsigned& end)
{
ASSERT(src);
unsigned index;
@@ -345,10 +357,11 @@ bool ISODateTime::parseWeek(const UChar* src, unsigned length, unsigned start, u
return false;
m_week = week;
end = index + 2;
+ m_type = Week;
return true;
}
-bool ISODateTime::parseTime(const UChar* src, unsigned length, unsigned start, unsigned& end)
+bool DateComponents::parseTime(const UChar* src, unsigned length, unsigned start, unsigned& end)
{
ASSERT(src);
int hour;
@@ -399,10 +412,11 @@ bool ISODateTime::parseTime(const UChar* src, unsigned length, unsigned start, u
m_second = second;
m_millisecond = millisecond;
end = index;
+ m_type = Time;
return true;
}
-bool ISODateTime::parseDateTimeLocal(const UChar* src, unsigned length, unsigned start, unsigned& end)
+bool DateComponents::parseDateTimeLocal(const UChar* src, unsigned length, unsigned start, unsigned& end)
{
ASSERT(src);
unsigned index;
@@ -413,10 +427,13 @@ bool ISODateTime::parseDateTimeLocal(const UChar* src, unsigned length, unsigned
if (src[index] != 'T')
return false;
++index;
- return parseTime(src, length, index, end);
+ if (!parseTime(src, length, index, end))
+ return false;
+ m_type = DateTimeLocal;
+ return true;
}
-bool ISODateTime::parseDateTime(const UChar* src, unsigned length, unsigned start, unsigned& end)
+bool DateComponents::parseDateTime(const UChar* src, unsigned length, unsigned start, unsigned& end)
{
ASSERT(src);
unsigned index;
@@ -429,7 +446,236 @@ bool ISODateTime::parseDateTime(const UChar* src, unsigned length, unsigned star
++index;
if (!parseTime(src, length, index, index))
return false;
- return parseTimeZone(src, length, index, end);
+ if (!parseTimeZone(src, length, index, end))
+ return false;
+ m_type = DateTime;
+ return true;
+}
+
+static inline double positiveFmod(double value, double divider)
+{
+ double remainder = fmod(value, divider);
+ return remainder < 0 ? remainder + divider : remainder;
+}
+
+void DateComponents::setMillisecondsSinceMidnightInternal(double msInDay)
+{
+ ASSERT(msInDay >= 0 && msInDay < msPerDay);
+ m_millisecond = static_cast<int>(fmod(msInDay, msPerSecond));
+ double value = floor(msInDay / msPerSecond);
+ m_second = static_cast<int>(fmod(value, secondsPerMinute));
+ value = floor(value / secondsPerMinute);
+ m_minute = static_cast<int>(fmod(value, minutesPerHour));
+ m_hour = static_cast<int>(value / minutesPerHour);
+}
+
+bool DateComponents::setMillisecondsSinceEpochForDateInternal(double ms)
+{
+ m_year = msToYear(ms);
+ int yearDay = dayInYear(ms, m_year);
+ m_month = monthFromDayInYear(yearDay, isLeapYear(m_year));
+ m_monthDay = dayInMonthFromDayInYear(yearDay, isLeapYear(m_year));
+ return true;
+}
+
+bool DateComponents::setMillisecondsSinceEpochForDate(double ms)
+{
+ m_type = Invalid;
+ if (!isfinite(ms))
+ return false;
+ if (!setMillisecondsSinceEpochForDateInternal(round(ms)))
+ return false;
+ if (beforeGregorianStartDate(m_year, m_month, m_monthDay))
+ return false;
+ m_type = Date;
+ return true;
+}
+
+bool DateComponents::setMillisecondsSinceEpochForDateTime(double ms)
+{
+ m_type = Invalid;
+ if (!isfinite(ms))
+ return false;
+ ms = round(ms);
+ setMillisecondsSinceMidnightInternal(positiveFmod(ms, msPerDay));
+ if (!setMillisecondsSinceEpochForDateInternal(ms))
+ return false;
+ if (beforeGregorianStartDate(m_year, m_month, m_monthDay))
+ return false;
+ m_type = DateTime;
+ return true;
+}
+
+bool DateComponents::setMillisecondsSinceEpochForDateTimeLocal(double ms)
+{
+ // Internal representation of DateTimeLocal is the same as DateTime except m_type.
+ if (!setMillisecondsSinceEpochForDateTime(ms))
+ return false;
+ m_type = DateTimeLocal;
+ return true;
+}
+
+bool DateComponents::setMillisecondsSinceEpochForMonth(double ms)
+{
+ m_type = Invalid;
+ if (!isfinite(ms))
+ return false;
+ if (!setMillisecondsSinceEpochForDateInternal(round(ms)))
+ return false;
+ // Ignore m_monthDay updated by setMillisecondsSinceEpochForDateInternal().
+ if (beforeGregorianStartDate(m_year, m_month, gregorianStartDay))
+ return false;
+ m_type = Month;
+ return true;
+}
+
+bool DateComponents::setMillisecondsSinceMidnight(double ms)
+{
+ m_type = Invalid;
+ if (!isfinite(ms))
+ return false;
+ setMillisecondsSinceMidnightInternal(positiveFmod(round(ms), msPerDay));
+ m_type = Time;
+ return true;
+}
+
+bool DateComponents::setMonthsSinceEpoch(double months)
+{
+ if (!isfinite(months))
+ return false;
+ months = round(months);
+ double doubleMonth = positiveFmod(months, 12);
+ double doubleYear = 1970 + (months - doubleMonth) / 12;
+ if (doubleYear < gregorianStartYear || numeric_limits<int>::max() < doubleYear)
+ return false;
+ int year = static_cast<int>(doubleYear);
+ int month = static_cast<int>(doubleMonth);
+ if (beforeGregorianStartDate(year, month, gregorianStartDay))
+ return false;
+ m_year = year;
+ m_month = month;
+ m_type = Month;
+ return true;
+}
+
+// Offset from January 1st to Monday of the ISO 8601's first week.
+// ex. If January 1st is Friday, such Monday is 3 days later. Returns 3.
+static int offsetTo1stWeekStart(int year)
+{
+ int offsetTo1stWeekStart = 1 - dayOfWeek(year, 0, 1);
+ if (offsetTo1stWeekStart <= -4)
+ offsetTo1stWeekStart += 7;
+ return offsetTo1stWeekStart;
+}
+
+bool DateComponents::setMillisecondsSinceEpochForWeek(double ms)
+{
+ m_type = Invalid;
+ if (!isfinite(ms))
+ return false;
+ ms = round(ms);
+
+ m_year = msToYear(ms);
+ // We don't support gregorianStartYear. Week numbers are undefined in that year.
+ if (m_year <= gregorianStartYear)
+ return false;
+
+ int yearDay = dayInYear(ms, m_year);
+ int offset = offsetTo1stWeekStart(m_year);
+ if (yearDay < offset) {
+ // The day belongs to the last week of the previous year.
+ m_year--;
+ if (m_year <= gregorianStartYear)
+ return false;
+ m_week = maxWeekNumberInYear();
+ } else {
+ m_week = ((yearDay - offset) / 7) + 1;
+ if (m_week > maxWeekNumberInYear()) {
+ m_year++;
+ m_week = 1;
+ }
+ }
+ m_type = Week;
+ return true;
+}
+
+double DateComponents::millisecondsSinceEpochForTime() const
+{
+ ASSERT(m_type == Time || m_type == DateTime || m_type == DateTimeLocal);
+ return ((m_hour * minutesPerHour + m_minute) * secondsPerMinute + m_second) * msPerSecond + m_millisecond;
+}
+
+double DateComponents::millisecondsSinceEpoch() const
+{
+ switch (m_type) {
+ case Date:
+ return dateToDaysFrom1970(m_year, m_month, m_monthDay) * msPerDay;
+ case DateTime:
+ case DateTimeLocal:
+ return dateToDaysFrom1970(m_year, m_month, m_monthDay) * msPerDay + millisecondsSinceEpochForTime();
+ case Month:
+ return dateToDaysFrom1970(m_year, m_month, 1) * msPerDay;
+ case Time:
+ return millisecondsSinceEpochForTime();
+ case Week:
+ return (dateToDaysFrom1970(m_year, 0, 1) + offsetTo1stWeekStart(m_year) + (m_week - 1) * 7) * msPerDay;
+ case Invalid:
+ break;
+ }
+ ASSERT_NOT_REACHED();
+ return invalidMilliseconds();
+}
+
+double DateComponents::monthsSinceEpoch() const
+{
+ ASSERT(m_type == Month);
+ return (m_year - 1970) * 12 + m_month;
+}
+
+String DateComponents::toStringForTime(SecondFormat format) const
+{
+ ASSERT(m_type == DateTime || m_type == DateTimeLocal || m_type == Time);
+ SecondFormat effectiveFormat = format;
+ if (m_millisecond)
+ effectiveFormat = Millisecond;
+ else if (format == None && m_second)
+ effectiveFormat = Second;
+
+ switch (effectiveFormat) {
+ default:
+ ASSERT_NOT_REACHED();
+ // Fallback to None.
+ case None:
+ return String::format("%02d:%02d", m_hour, m_minute);
+ case Second:
+ return String::format("%02d:%02d:%02d", m_hour, m_minute, m_second);
+ case Millisecond:
+ return String::format("%02d:%02d:%02d.%03d", m_hour, m_minute, m_second, m_millisecond);
+ }
+}
+
+String DateComponents::toString(SecondFormat format) const
+{
+ switch (m_type) {
+ case Date:
+ return String::format("%04d-%02d-%02d", m_year, m_month + 1, m_monthDay);
+ case DateTime:
+ return String::format("%04d-%02d-%02dT", m_year, m_month + 1, m_monthDay)
+ + toStringForTime(format) + String("Z");
+ case DateTimeLocal:
+ return String::format("%04d-%02d-%02dT", m_year, m_month + 1, m_monthDay)
+ + toStringForTime(format);
+ case Month:
+ return String::format("%04d-%02d", m_year, m_month + 1);
+ case Time:
+ return toStringForTime(format);
+ case Week:
+ return String::format("%04d-W%02d", m_year, m_week);
+ case Invalid:
+ break;
+ }
+ ASSERT_NOT_REACHED();
+ return String("(Invalid DateComponents)");
}
} // namespace WebCore
diff --git a/WebCore/html/ISODateTime.h b/WebCore/html/DateComponents.h
index ee4cfb9..aff8855 100644
--- a/WebCore/html/ISODateTime.h
+++ b/WebCore/html/DateComponents.h
@@ -28,22 +28,25 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ISODateTime_h
-#define ISODateTime_h
+#ifndef DateComponents_h
+#define DateComponents_h
+#include <limits>
#include <wtf/unicode/Unicode.h>
namespace WebCore {
-// An ISODateTime instance represents one of the following date and time combinations:
-// * year-month
-// * year-month-day
-// * year-week
-// * hour-minute-second-millisecond
-// * year-month-day hour-minute-second-millisecond
-class ISODateTime {
+class String;
+
+// A DateComponents instance represents one of the following date and time combinations:
+// * Month type: year-month
+// * Date type: year-month-day
+// * Week type: year-week
+// * Time type: hour-minute-second-millisecond
+// * DateTime or DateTimeLocal type: year-month-day hour-minute-second-millisecond
+class DateComponents {
public:
- ISODateTime()
+ DateComponents()
: m_millisecond(0)
, m_second(0)
, m_minute(0)
@@ -52,6 +55,7 @@ public:
, m_month(0)
, m_year(0)
, m_week(0)
+ , m_type(Invalid)
{
}
@@ -64,12 +68,26 @@ public:
int fullYear() const { return m_year; }
int week() const { return m_week; }
- // The following six functions parse the input `src' whose length is
- // `length', and updates some fields of this instance. The parsing starts at
+ enum SecondFormat {
+ None, // Suppress the second part and the millisecond part if they are 0.
+ Second, // Always show the second part, and suppress the millisecond part if it is 0.
+ Millisecond // Always show the second part and the millisecond part.
+ };
+
+ // Returns an ISO 8601 representation for this instance.
+ // The format argument is valid for DateTime, DateTimeLocal, and Time types.
+ String toString(SecondFormat format = None) const;
+
+ // parse*() and setMillisecondsSince*() functions are initializers for an
+ // DateComponents instance. If these functions return false, the instance
+ // might be invalid.
+
+ // The following six functions parse the input 'src' whose length is
+ // 'length', and updates some fields of this instance. The parsing starts at
// src[start] and examines characters before src[length].
- // `src' `date' must be non-null. The `src' string doesn't need to be
+ // 'src' must be non-null. The 'src' string doesn't need to be
// null-terminated.
- // The functions return true if the parsing succeeds, and set `end' to the
+ // The functions return true if the parsing succeeds, and set 'end' to the
// next index after the last consumed. Extra leading characters cause parse
// failures, and the trailing extra characters don't cause parse failures.
@@ -86,14 +104,53 @@ public:
// Sets year, month, monthDay, hour, minute, second and millisecond, and adjusts timezone.
bool parseDateTime(const UChar* src, unsigned length, unsigned start, unsigned& end);
+ // The following setMillisecondsSinceEpochFor*() functions take
+ // the number of milliseconds since 1970-01-01 00:00:00.000 UTC as
+ // the argument, and update all fields for the corresponding
+ // DateComponents type. The functions return true if it succeeds, and
+ // false if they fail.
+
+ // For Date type. Updates m_year, m_month and m_monthDay.
+ bool setMillisecondsSinceEpochForDate(double ms);
+ // For DateTime type. Updates m_year, m_month, m_monthDay, m_hour, m_minute, m_second and m_millisecond.
+ bool setMillisecondsSinceEpochForDateTime(double ms);
+ // For DateTimeLocal type. Updates m_year, m_month, m_monthDay, m_hour, m_minute, m_second and m_millisecond.
+ bool setMillisecondsSinceEpochForDateTimeLocal(double ms);
+ // For Month type. Updates m_year and m_month.
+ bool setMillisecondsSinceEpochForMonth(double ms);
+ // For Week type. Updates m_year and m_week.
+ bool setMillisecondsSinceEpochForWeek(double ms);
+
+ // For Time type. Updates m_hour, m_minute, m_second and m_millisecond.
+ bool setMillisecondsSinceMidnight(double ms);
+
+ // Another initializer for Month type. Updates m_year and m_month.
+ bool setMonthsSinceEpoch(double months);
+
+ // Returns the number of milliseconds from 1970-01-01 00:00:00 UTC.
+ // For a DateComponents initialized with parseDateTimeLocal(),
+ // millisecondsSinceEpoch() returns a value for UTC timezone.
+ double millisecondsSinceEpoch() const;
+ // Returns the number of months from 1970-01.
+ // Do not call this for types other than Month.
+ double monthsSinceEpoch() const;
+ static inline double invalidMilliseconds() { return std::numeric_limits<double>::quiet_NaN(); }
+
private:
- // Returns the maximum week number in this ISODateTime's year.
+ // Returns the maximum week number in this DateComponents's year.
// The result is either of 52 and 53.
int maxWeekNumberInYear() const;
bool parseYear(const UChar* src, unsigned length, unsigned start, unsigned& end);
bool addDay(int);
bool addMinute(int);
bool parseTimeZone(const UChar* src, unsigned length, unsigned start, unsigned& end);
+ // Helper for millisecondsSinceEpoch().
+ double millisecondsSinceEpochForTime() const;
+ // Helpers for setMillisecondsSinceEpochFor*().
+ bool setMillisecondsSinceEpochForDateInternal(double ms);
+ void setMillisecondsSinceMidnightInternal(double ms);
+ // Helper for toString().
+ String toStringForTime(SecondFormat) const;
// m_weekDay values
enum {
@@ -106,17 +163,28 @@ private:
Saturday,
};
- int m_millisecond; // 0 - 999
+ int m_millisecond; // 0 - 999
int m_second;
int m_minute;
int m_hour;
- int m_monthDay; // 1 - 31
- int m_month; // 0:January - 11:December
- int m_year; // 1582 -
- int m_week; // 1 - 53
+ int m_monthDay; // 1 - 31
+ int m_month; // 0:January - 11:December
+ int m_year; // 1582 -
+ int m_week; // 1 - 53
+
+ enum Type {
+ Invalid,
+ Date,
+ DateTime,
+ DateTimeLocal,
+ Month,
+ Time,
+ Week,
+ };
+ Type m_type;
};
} // namespace WebCore
-#endif // ISODateTime_h
+#endif // DateComponents_h
diff --git a/WebCore/html/File.cpp b/WebCore/html/File.cpp
index dbbbfa6..25e28e4 100644
--- a/WebCore/html/File.cpp
+++ b/WebCore/html/File.cpp
@@ -27,25 +27,13 @@
#include "File.h"
#include "FileSystem.h"
-#include "PlatformString.h"
namespace WebCore {
File::File(const String& path)
- : m_path(path)
- , m_fileName(pathGetFileName(path))
+ : Blob(path)
+ , m_name(pathGetFileName(path))
{
}
-unsigned long long File::fileSize()
-{
- // FIXME: Should we cache this?
- // 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.
- long long size;
- if (!getFileSize(m_path, size))
- return 0;
- return size;
-}
-
} // namespace WebCore
diff --git a/WebCore/html/File.h b/WebCore/html/File.h
index 7d79aa5..be53e30 100644
--- a/WebCore/html/File.h
+++ b/WebCore/html/File.h
@@ -26,30 +26,30 @@
#ifndef File_h
#define File_h
-#include "PlatformString.h"
+#include "Blob.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
- class File : public RefCounted<File> {
- public:
- static PassRefPtr<File> create(const String& path)
- {
- return adoptRef(new File(path));
- }
+class File : public Blob {
+public:
+ static PassRefPtr<File> create(const String& path)
+ {
+ return adoptRef(new File(path));
+ }
- const String& fileName() const { return m_fileName; }
- unsigned long long fileSize();
+ const String& name() const { return m_name; }
- const String& path() const { return m_path; }
+ // FIXME: obsolete attributes. To be removed.
+ const String& fileName() const { return m_name; }
+ unsigned long long fileSize() const { return size(); }
- private:
- File(const String& path);
+private:
+ File(const String& path);
- String m_path;
- String m_fileName;
- };
+ String m_name;
+};
} // namespace WebCore
diff --git a/WebCore/html/File.idl b/WebCore/html/File.idl
index ada9f0c..2632a4d 100644
--- a/WebCore/html/File.idl
+++ b/WebCore/html/File.idl
@@ -26,8 +26,12 @@
module html {
interface [
- GenerateConstructor
- ] File {
+ GenerateNativeConverter,
+ GenerateToJS
+ ] File : Blob {
+ readonly attribute DOMString name;
+
+ // FIXME: obsolete attributes. To be removed.
readonly attribute DOMString fileName;
readonly attribute unsigned long long fileSize;
};
diff --git a/WebCore/html/FileList.idl b/WebCore/html/FileList.idl
index 01c286e..6baf3e1 100644
--- a/WebCore/html/FileList.idl
+++ b/WebCore/html/FileList.idl
@@ -26,7 +26,6 @@
module html {
interface [
- GenerateConstructor,
HasIndexGetter
] FileList {
readonly attribute unsigned long length;
diff --git a/WebCore/html/HTMLAllCollection.idl b/WebCore/html/HTMLAllCollection.idl
index d36f41e..3b65a0a 100644
--- a/WebCore/html/HTMLAllCollection.idl
+++ b/WebCore/html/HTMLAllCollection.idl
@@ -26,7 +26,6 @@
module html {
interface [
- GenerateConstructor,
HasIndexGetter,
HasNameGetter,
CustomCall,
diff --git a/WebCore/html/HTMLAnchorElement.cpp b/WebCore/html/HTMLAnchorElement.cpp
index 1d5d569..f3b6ddd 100644
--- a/WebCore/html/HTMLAnchorElement.cpp
+++ b/WebCore/html/HTMLAnchorElement.cpp
@@ -497,20 +497,8 @@ String HTMLAnchorElement::protocol() const
void HTMLAnchorElement::setProtocol(const String& value)
{
- int separator = value.find(':');
-
- if (!separator)
- return;
- if (value.isEmpty())
- return;
-
KURL url = href();
- // Following Firefox 3.5.2 which removes anything after the first ":"
- String newProtocol = value.substring(0, separator);
- if (!isValidProtocol(newProtocol))
- return;
- url.setProtocol(newProtocol);
-
+ url.setProtocol(value);
setHref(url.string());
}
diff --git a/WebCore/html/HTMLAnchorElement.idl b/WebCore/html/HTMLAnchorElement.idl
index e55bd86..03b3986 100644
--- a/WebCore/html/HTMLAnchorElement.idl
+++ b/WebCore/html/HTMLAnchorElement.idl
@@ -20,11 +20,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=0c74cef8-b1f7-4b44-83a9-8deeb376a257,
- ImplementationUUID=30f797d5-d145-498e-a126-d8e9ddeedea3
- ] HTMLAnchorElement : HTMLElement {
+ interface HTMLAnchorElement : HTMLElement {
attribute [ConvertNullToNullString, Reflect=accesskey] DOMString accessKey;
attribute [ConvertNullToNullString, Reflect] DOMString charset;
attribute [ConvertNullToNullString, Reflect] DOMString coords;
diff --git a/WebCore/html/HTMLAppletElement.cpp b/WebCore/html/HTMLAppletElement.cpp
index f67e9dc..fb23b5c 100644
--- a/WebCore/html/HTMLAppletElement.cpp
+++ b/WebCore/html/HTMLAppletElement.cpp
@@ -63,7 +63,7 @@ void HTMLAppletElement::parseMappedAttribute(MappedAttribute* attr)
document->addNamedItem(newName);
}
m_name = newName;
- } else if (attr->name() == idAttr) {
+ } else if (attr->name() == idAttributeName()) {
const AtomicString& newId = attr->value();
if (inDocument() && document()->isHTMLDocument()) {
HTMLDocument* document = static_cast<HTMLDocument*>(this->document());
@@ -118,7 +118,7 @@ RenderObject* HTMLAppletElement::createRenderer(RenderArena*, RenderStyle* style
if (!codeBase.isNull())
args.set("codeBase", codeBase);
- const AtomicString& name = getAttribute(document()->isHTMLDocument() ? nameAttr : idAttr);
+ const AtomicString& name = getAttribute(document()->isHTMLDocument() ? nameAttr : idAttributeName());
if (!name.isNull())
args.set("name", name);
const AtomicString& archive = getAttribute(archiveAttr);
diff --git a/WebCore/html/HTMLAppletElement.idl b/WebCore/html/HTMLAppletElement.idl
index cc923ca..8d6803e 100644
--- a/WebCore/html/HTMLAppletElement.idl
+++ b/WebCore/html/HTMLAppletElement.idl
@@ -21,13 +21,10 @@
module html {
interface [
- GenerateConstructor,
DelegatingPutFunction,
DelegatingGetOwnPropertySlot,
CustomCall,
- HasOverridingNameGetter,
- InterfaceUUID=9b5cb4a8-c156-4b55-afdb-c60938a4d1b1,
- ImplementationUUID=56544372-675e-40dd-ba39-fa708a4c7678
+ HasOverridingNameGetter
] HTMLAppletElement : HTMLElement {
attribute [ConvertNullToNullString, Reflect] DOMString align;
attribute [ConvertNullToNullString, Reflect] DOMString alt;
diff --git a/WebCore/html/HTMLAreaElement.cpp b/WebCore/html/HTMLAreaElement.cpp
index b202cae..b862f69 100644
--- a/WebCore/html/HTMLAreaElement.cpp
+++ b/WebCore/html/HTMLAreaElement.cpp
@@ -22,6 +22,8 @@
#include "config.h"
#include "HTMLAreaElement.h"
+#include "HTMLImageElement.h"
+#include "HTMLMapElement.h"
#include "HTMLNames.h"
#include "HitTestResult.h"
#include "MappedAttribute.h"
@@ -82,13 +84,27 @@ bool HTMLAreaElement::mapMouseEvent(int x, int y, const IntSize& size, HitTestRe
return true;
}
-IntRect HTMLAreaElement::getRect(RenderObject* obj) const
+Path HTMLAreaElement::getPath(RenderObject* obj) const
{
+ if (!obj)
+ return Path();
+
// FIXME: This doesn't work correctly with transforms.
FloatPoint absPos = obj->localToAbsolute();
- Path p = getRegion(m_lastSize);
+
+ // Default should default to the size of the containing object.
+ IntSize size = m_lastSize;
+ if (m_shape == Default)
+ size = obj->absoluteOutlineBounds().size();
+
+ Path p = getRegion(size);
p.translate(absPos - FloatPoint());
- return enclosingIntRect(p.boundingRect());
+ return p;
+}
+
+IntRect HTMLAreaElement::getRect(RenderObject* obj) const
+{
+ return enclosingIntRect(getPath(obj).boundingRect());
}
Path HTMLAreaElement::getRegion(const IntSize& size) const
@@ -161,11 +177,58 @@ void HTMLAreaElement::setNoHref(bool noHref)
{
setAttribute(nohrefAttr, noHref ? "" : 0);
}
+
+HTMLImageElement* HTMLAreaElement::imageElement() const
+{
+ Node* mapElement = parent();
+ if (!mapElement->hasTagName(mapTag))
+ return 0;
+
+ return static_cast<HTMLMapElement*>(mapElement)->imageElement();
+}
+bool HTMLAreaElement::isKeyboardFocusable(KeyboardEvent*) const
+{
+ return supportsFocus();
+}
+
+bool HTMLAreaElement::isFocusable() const
+{
+ return supportsFocus();
+}
+
+void HTMLAreaElement::dispatchBlurEvent()
+{
+ HTMLAnchorElement::dispatchBlurEvent();
+
+ // On a blur, we might need to remove our focus rings by repainting.
+ updateFocusAppearance(false);
+}
+
+void HTMLAreaElement::updateFocusAppearance(bool restorePreviousSelection)
+{
+ Node* parent = parentNode();
+ if (!parent || !parent->hasTagName(mapTag))
+ return;
+
+ HTMLImageElement* imageElement = static_cast<HTMLMapElement*>(parent)->imageElement();
+ if (!imageElement)
+ return;
+
+ // This will handle scrolling to the image if necessary.
+ imageElement->updateFocusAppearance(restorePreviousSelection);
+
+ RenderObject* imageRenderer = imageElement->renderer();
+ if (imageRenderer)
+ imageRenderer->setNeedsLayout(true);
+}
+
bool HTMLAreaElement::supportsFocus() const
{
- // Skip HTMLAnchorElements isLink() check.
- return HTMLElement::supportsFocus();
+ // If the AREA element was a link, it should support focus.
+ // The inherited method is not used because it assumes that a render object must exist
+ // for the element to support focus. AREA elements do not have render objects.
+ return isLink();
}
String HTMLAreaElement::target() const
diff --git a/WebCore/html/HTMLAreaElement.h b/WebCore/html/HTMLAreaElement.h
index 7b2497c..f8e2564 100644
--- a/WebCore/html/HTMLAreaElement.h
+++ b/WebCore/html/HTMLAreaElement.h
@@ -30,6 +30,7 @@
namespace WebCore {
class HitTestResult;
+class HTMLImageElement;
class Path;
class HTMLAreaElement : public HTMLAnchorElement {
@@ -41,7 +42,11 @@ public:
bool mapMouseEvent(int x, int y, const IntSize&, HitTestResult&);
IntRect getRect(RenderObject*) const;
-
+ Path getPath(RenderObject*) const;
+
+ // Convenience method to get the parent map's image.
+ HTMLImageElement* imageElement() const;
+
KURL href() const;
bool noHref() const;
@@ -55,7 +60,11 @@ private:
virtual void parseMappedAttribute(MappedAttribute*);
virtual bool supportsFocus() const;
virtual String target() const;
-
+ virtual bool isKeyboardFocusable(KeyboardEvent*) const;
+ virtual bool isFocusable() const;
+ virtual void updateFocusAppearance(bool /*restorePreviousSelection*/);
+ virtual void dispatchBlurEvent();
+
enum Shape { Default, Poly, Rect, Circle, Unknown };
Path getRegion(const IntSize&) const;
diff --git a/WebCore/html/HTMLAreaElement.idl b/WebCore/html/HTMLAreaElement.idl
index 53239c6..210d6e5 100644
--- a/WebCore/html/HTMLAreaElement.idl
+++ b/WebCore/html/HTMLAreaElement.idl
@@ -20,11 +20,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=aac98729-47d3-4623-8c5b-004783af5bd6,
- ImplementationUUID=f0631a41-5f55-40e5-a879-c09e663c26ba
- ] HTMLAreaElement : HTMLElement {
+ interface HTMLAreaElement : HTMLElement {
attribute [ConvertNullToNullString, Reflect=accesskey] DOMString accessKey;
attribute [ConvertNullToNullString, Reflect] DOMString alt;
attribute [ConvertNullToNullString, Reflect] DOMString coords;
diff --git a/WebCore/html/HTMLAttributeNames.in b/WebCore/html/HTMLAttributeNames.in
index 967b695..ad13070 100644
--- a/WebCore/html/HTMLAttributeNames.in
+++ b/WebCore/html/HTMLAttributeNames.in
@@ -13,6 +13,8 @@ alink
alt
archive
aria-activedescendant
+aria-atomic
+aria-busy
aria-checked
aria-controls
aria-describedby
@@ -21,16 +23,19 @@ aria-dropeffect
aria-expanded
aria-flowto
aria-grabbed
+aria-haspopup
aria-hidden
aria-label
aria-labeledby
aria-labelledby
aria-level
+aria-live
aria-multiselectable
aria-orientation
aria-owns
aria-pressed
aria-readonly
+aria-relevant
aria-required
aria-selected
aria-valuemax
@@ -58,7 +63,7 @@ charset
checked
cellborder
cite
-class exportString
+class
classid
clear
code
diff --git a/WebCore/html/HTMLAudioElement.idl b/WebCore/html/HTMLAudioElement.idl
index f335d86..107b8b1 100644
--- a/WebCore/html/HTMLAudioElement.idl
+++ b/WebCore/html/HTMLAudioElement.idl
@@ -24,7 +24,7 @@
*/
module html {
- interface [GenerateConstructor, Conditional=VIDEO] HTMLAudioElement : HTMLMediaElement {
+ interface [Conditional=VIDEO] HTMLAudioElement : HTMLMediaElement {
};
}
diff --git a/WebCore/html/HTMLBRElement.idl b/WebCore/html/HTMLBRElement.idl
index 6d626ff..4048911 100644
--- a/WebCore/html/HTMLBRElement.idl
+++ b/WebCore/html/HTMLBRElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=e84b14bc-b0aa-431f-83c4-fcc297e354b0,
- ImplementationUUID=c10d45a4-b042-45d0-b170-6ac7173ee823
- ] HTMLBRElement : HTMLElement {
+ interface HTMLBRElement : HTMLElement {
attribute [ConvertNullToNullString, Reflect] DOMString clear;
};
diff --git a/WebCore/html/HTMLBaseElement.idl b/WebCore/html/HTMLBaseElement.idl
index b7385ec..087faca 100644
--- a/WebCore/html/HTMLBaseElement.idl
+++ b/WebCore/html/HTMLBaseElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=e4112bea-13de-40f6-93d0-41e285ae1491,
- ImplementationUUID=23cec074-660f-490a-996d-167d66c164d5
- ] HTMLBaseElement : HTMLElement {
+ interface HTMLBaseElement : HTMLElement {
attribute [ConvertNullToNullString, Reflect] DOMString href;
attribute [ConvertNullToNullString, Reflect] DOMString target;
};
diff --git a/WebCore/html/HTMLBaseFontElement.idl b/WebCore/html/HTMLBaseFontElement.idl
index 665f124..d55654e 100644
--- a/WebCore/html/HTMLBaseFontElement.idl
+++ b/WebCore/html/HTMLBaseFontElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=434b1be5-408e-45b5-be83-c70e11e9bb37,
- ImplementationUUID=1dc8508e-53c4-4e7e-93c0-16772372b2dc
- ] HTMLBaseFontElement : HTMLElement {
+ interface HTMLBaseFontElement : HTMLElement {
attribute [ConvertNullToNullString, Reflect] DOMString color;
attribute [ConvertNullToNullString, Reflect] DOMString face;
#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
diff --git a/WebCore/html/HTMLBlockquoteElement.idl b/WebCore/html/HTMLBlockquoteElement.idl
index f6463dd..b819236 100644
--- a/WebCore/html/HTMLBlockquoteElement.idl
+++ b/WebCore/html/HTMLBlockquoteElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=902d9011-c6d6-4363-b6fe-bd2d28ef553b,
- ImplementationUUID=345db946-ba9c-44b9-87fd-06083aa472e4
- ] HTMLBlockquoteElement : HTMLElement {
+ interface HTMLBlockquoteElement : HTMLElement {
attribute [ConvertNullToNullString, Reflect] DOMString cite;
};
diff --git a/WebCore/html/HTMLBodyElement.idl b/WebCore/html/HTMLBodyElement.idl
index b2f0c65..95140c7 100644
--- a/WebCore/html/HTMLBodyElement.idl
+++ b/WebCore/html/HTMLBodyElement.idl
@@ -20,11 +20,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=4789afc6-2d9e-4f3b-8c27-12abc9d4a014,
- ImplementationUUID=d2e16911-2f7e-4d58-a92c-94700d445b38
- ] HTMLBodyElement : HTMLElement {
+ interface HTMLBodyElement : HTMLElement {
attribute [ConvertNullToNullString, Reflect=alink] DOMString aLink;
attribute [ConvertNullToNullString, Reflect] DOMString background;
attribute [ConvertNullToNullString, Reflect=bgcolor] DOMString bgColor;
@@ -33,7 +29,6 @@ module html {
attribute [ConvertNullToNullString, Reflect=vlink] DOMString vLink;
#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
// Event handler attributes
attribute [DontEnum] EventListener onbeforeunload;
attribute [DontEnum] EventListener onhashchange;
@@ -58,11 +53,9 @@ module html {
// Not implemented yet.
// attribute [DontEnum] EventListener onafterprint;
// attribute [DontEnum] EventListener onbeforeprint;
- // attribute [DontEnum] EventListener onpopstate;
// attribute [DontEnum] EventListener onredo;
// attribute [DontEnum] EventListener onundo;
#endif
-#endif
};
}
diff --git a/WebCore/html/HTMLButtonElement.idl b/WebCore/html/HTMLButtonElement.idl
index cb9383d..73098fe 100644
--- a/WebCore/html/HTMLButtonElement.idl
+++ b/WebCore/html/HTMLButtonElement.idl
@@ -20,16 +20,10 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=b9715643-5591-442d-ab65-e05309607271,
- ImplementationUUID=1be13b5f-40df-4550-b70e-8c805e546cad
- ] HTMLButtonElement : HTMLElement {
+ interface HTMLButtonElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute boolean formNoValidate;
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
readonly attribute ValidityState validity;
-#endif
attribute [ConvertNullToNullString] DOMString accessKey;
attribute boolean disabled;
attribute boolean autofocus;
diff --git a/WebCore/html/HTMLCanvasElement.cpp b/WebCore/html/HTMLCanvasElement.cpp
index be0fa36..4cbbb65 100644
--- a/WebCore/html/HTMLCanvasElement.cpp
+++ b/WebCore/html/HTMLCanvasElement.cpp
@@ -27,10 +27,12 @@
#include "config.h"
#include "HTMLCanvasElement.h"
+#include "CanvasContextAttributes.h"
#include "CanvasGradient.h"
#include "CanvasPattern.h"
#include "CanvasRenderingContext2D.h"
#if ENABLE(3D_CANVAS)
+#include "WebGLContextAttributes.h"
#include "WebGLRenderingContext.h"
#endif
#include "CanvasStyle.h"
@@ -147,7 +149,7 @@ String HTMLCanvasElement::toDataURL(const String& mimeType, ExceptionCode& ec)
return buffer()->toDataURL(mimeType);
}
-CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type)
+CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type, CanvasContextAttributes* attrs)
{
// A Canvas can either be "2D" or "webgl" but never both. If you request a 2D canvas and the existing
// context is already 2D, just return that. If the existing context is WebGL, then destroy it
@@ -174,7 +176,7 @@ CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type)
if (m_context && !m_context->is3d())
return 0;
if (!m_context) {
- m_context = WebGLRenderingContext::create(this);
+ m_context = WebGLRenderingContext::create(this, static_cast<WebGLContextAttributes*>(attrs));
if (m_context) {
// Need to make sure a RenderLayer and compositing layer get created for the Canvas
setNeedsStyleRecalc(SyntheticStyleChange);
@@ -183,6 +185,8 @@ CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type)
return m_context.get();
}
}
+#else
+ UNUSED_PARAM(attrs);
#endif
return 0;
}
@@ -223,6 +227,11 @@ void HTMLCanvasElement::reset()
IntSize oldSize = m_size;
m_size = IntSize(w, h);
+#if ENABLE(3D_CANVAS)
+ if (m_context && m_context->is3d())
+ static_cast<WebGLRenderingContext*>(m_context.get())->reshape(width(), height());
+#endif
+
bool hadImageBuffer = m_createdImageBuffer;
m_createdImageBuffer = false;
m_imageBuffer.clear();
@@ -251,7 +260,7 @@ void HTMLCanvasElement::paint(GraphicsContext* context, const IntRect& r)
return;
#if ENABLE(3D_CANVAS)
- WebGLRenderingContext* context3D = NULL;
+ WebGLRenderingContext* context3D = 0;
if (m_context && m_context->is3d()) {
context3D = static_cast<WebGLRenderingContext*>(m_context.get());
context3D->beginPaint();
@@ -265,10 +274,8 @@ void HTMLCanvasElement::paint(GraphicsContext* context, const IntRect& r)
}
#if ENABLE(3D_CANVAS)
- if (context3D != NULL) {
- context3D->reshape(r.width(), r.height());
+ if (context3D)
context3D->endPaint();
- }
#endif
}
diff --git a/WebCore/html/HTMLCanvasElement.h b/WebCore/html/HTMLCanvasElement.h
index edae9e5..db80396 100644
--- a/WebCore/html/HTMLCanvasElement.h
+++ b/WebCore/html/HTMLCanvasElement.h
@@ -37,6 +37,7 @@
namespace WebCore {
+class CanvasContextAttributes;
class CanvasRenderingContext;
class FloatPoint;
class FloatRect;
@@ -68,7 +69,7 @@ public:
String toDataURL(const String& mimeType, ExceptionCode&);
- CanvasRenderingContext* getContext(const String&);
+ CanvasRenderingContext* getContext(const String&, CanvasContextAttributes* attributes = 0);
const IntSize& size() const { return m_size; }
void setSize(const IntSize& size)
diff --git a/WebCore/html/HTMLCanvasElement.idl b/WebCore/html/HTMLCanvasElement.idl
index 4b1b057..ea7f982 100644
--- a/WebCore/html/HTMLCanvasElement.idl
+++ b/WebCore/html/HTMLCanvasElement.idl
@@ -26,10 +26,7 @@
module html {
interface [
- CustomMarkFunction,
- GenerateConstructor,
- InterfaceUUID=a14d88c8-c6af-4e34-ad17-659700c77a10,
- ImplementationUUID=7ae731bc-c264-4ee3-a4b4-5d4540af26c3
+ CustomMarkFunction
] HTMLCanvasElement : HTMLElement {
attribute long width;
@@ -39,7 +36,8 @@ module html {
raises(DOMException);
#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
- [V8Custom] DOMObject getContext(in DOMString contextId);
+ // The custom binding is needed to handle context creation attributes.
+ [Custom] DOMObject getContext(in DOMString contextId);
#endif
};
diff --git a/WebCore/html/HTMLCollection.cpp b/WebCore/html/HTMLCollection.cpp
index 2b29589..5e42d30 100644
--- a/WebCore/html/HTMLCollection.cpp
+++ b/WebCore/html/HTMLCollection.cpp
@@ -274,7 +274,7 @@ bool HTMLCollection::checkForNameMatch(Element* element, bool checkName, const A
HTMLElement* e = static_cast<HTMLElement*>(element);
if (!checkName)
- return e->getAttribute(idAttr) == name;
+ return e->getAttribute(e->idAttributeName()) == name;
// document.all returns only images, forms, applets, objects and embeds
// by name (though everything by id)
@@ -285,7 +285,7 @@ bool HTMLCollection::checkForNameMatch(Element* element, bool checkName, const A
e->hasLocalName(selectTag)))
return false;
- return e->getAttribute(nameAttr) == name && e->getAttribute(idAttr) != name;
+ return e->getAttribute(nameAttr) == name && e->getAttribute(e->idAttributeName()) != name;
}
Node* HTMLCollection::namedItem(const AtomicString& name) const
@@ -327,7 +327,7 @@ void HTMLCollection::updateNameCache() const
if (!element->isHTMLElement())
continue;
HTMLElement* e = static_cast<HTMLElement*>(element);
- const AtomicString& idAttrVal = e->getAttribute(idAttr);
+ const AtomicString& idAttrVal = e->getAttribute(e->idAttributeName());
const AtomicString& nameAttrVal = e->getAttribute(nameAttr);
if (!idAttrVal.isEmpty()) {
// add to id cache
@@ -366,7 +366,8 @@ void HTMLCollection::namedItems(const AtomicString& name, Vector<RefPtr<Node> >&
resetCollectionInfo();
updateNameCache();
-
+ m_info->checkConsistency();
+
Vector<Element*>* idResults = m_info->idCache.get(name.impl());
Vector<Element*>* nameResults = m_info->nameCache.get(name.impl());
@@ -381,6 +382,7 @@ void HTMLCollection::namedItems(const AtomicString& name, Vector<RefPtr<Node> >&
Node* HTMLCollection::nextNamedItem(const AtomicString& name) const
{
resetCollectionInfo();
+ m_info->checkConsistency();
for (Element* e = itemAfter(m_info->current); e; e = itemAfter(e)) {
if (checkForNameMatch(e, m_idsDone, name)) {
diff --git a/WebCore/html/HTMLCollection.idl b/WebCore/html/HTMLCollection.idl
index 45d1127..a3e4332 100644
--- a/WebCore/html/HTMLCollection.idl
+++ b/WebCore/html/HTMLCollection.idl
@@ -21,14 +21,11 @@
module html {
interface [
- GenerateConstructor,
HasIndexGetter,
HasNameGetter,
CustomCall,
CustomToJS,
- Polymorphic,
- InterfaceUUID=b0d215ff-6f9c-4d1f-86c3-f200a65a5134,
- ImplementationUUID=8e81b17f-7f74-4121-8f2f-a339a7e66447
+ Polymorphic
] HTMLCollection {
readonly attribute unsigned long length;
[Custom] Node item(in unsigned long index);
diff --git a/WebCore/html/HTMLDListElement.idl b/WebCore/html/HTMLDListElement.idl
index 1578dfd..57c5c57 100644
--- a/WebCore/html/HTMLDListElement.idl
+++ b/WebCore/html/HTMLDListElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=5665c589-aea9-4322-844f-d3395fd5839e,
- ImplementationUUID=99ac26a3-224b-4bc6-b287-89946a6de9a7
- ] HTMLDListElement : HTMLElement {
+ interface HTMLDListElement : HTMLElement {
attribute boolean compact;
};
diff --git a/WebCore/html/HTMLDataGridCellElement.idl b/WebCore/html/HTMLDataGridCellElement.idl
index c7c51bc..1064cf7 100644
--- a/WebCore/html/HTMLDataGridCellElement.idl
+++ b/WebCore/html/HTMLDataGridCellElement.idl
@@ -26,7 +26,6 @@
module html {
interface [
- GenerateConstructor,
Conditional=DATAGRID
] HTMLDataGridCellElement : HTMLElement {
attribute DOMString label; // The text to display in the column, assuming the type supports text.
diff --git a/WebCore/html/HTMLDataGridColElement.cpp b/WebCore/html/HTMLDataGridColElement.cpp
index 8398545..935375e 100644
--- a/WebCore/html/HTMLDataGridColElement.cpp
+++ b/WebCore/html/HTMLDataGridColElement.cpp
@@ -55,7 +55,7 @@ void HTMLDataGridColElement::ensureColumn()
{
if (m_column)
return;
- m_column = DataGridColumn::create(getAttribute(idAttr), label(), type(), primary(), sortable());
+ m_column = DataGridColumn::create(getAttribute(idAttributeName()), label(), type(), primary(), sortable());
}
void HTMLDataGridColElement::insertedIntoTree(bool deep)
@@ -162,8 +162,8 @@ void HTMLDataGridColElement::parseMappedAttribute(MappedAttribute* attr)
column()->setSortable(sortable());
else if (attr->name() == sortdirectionAttr)
column()->setSortDirection(sortDirection());
- else if (attr->name() == idAttr)
- column()->setId(getAttribute(idAttr));
+ else if (attr->name() == idAttributeName())
+ column()->setId(getAttribute(idAttributeName()));
}
} // namespace WebCore
diff --git a/WebCore/html/HTMLDataGridColElement.idl b/WebCore/html/HTMLDataGridColElement.idl
index 5861039..7a67c7e 100644
--- a/WebCore/html/HTMLDataGridColElement.idl
+++ b/WebCore/html/HTMLDataGridColElement.idl
@@ -26,7 +26,6 @@
module html {
interface [
- GenerateConstructor,
Conditional=DATAGRID
] HTMLDataGridColElement : HTMLElement {
attribute DOMString label; // The text to display in the column.
diff --git a/WebCore/html/HTMLDataGridElement.idl b/WebCore/html/HTMLDataGridElement.idl
index c9e6d9d..e9a800b 100644
--- a/WebCore/html/HTMLDataGridElement.idl
+++ b/WebCore/html/HTMLDataGridElement.idl
@@ -26,7 +26,6 @@
module html {
interface [
- GenerateConstructor,
Conditional=DATAGRID
] HTMLDataGridElement : HTMLElement {
attribute [Custom] DataGridDataSource dataSource;
diff --git a/WebCore/html/HTMLDataGridRowElement.idl b/WebCore/html/HTMLDataGridRowElement.idl
index f6954af..7b3e68f 100644
--- a/WebCore/html/HTMLDataGridRowElement.idl
+++ b/WebCore/html/HTMLDataGridRowElement.idl
@@ -26,7 +26,6 @@
module html {
interface [
- GenerateConstructor,
Conditional=DATAGRID
] HTMLDataGridRowElement : HTMLElement {
attribute boolean selected; // Whether or not the row is currently selected.
diff --git a/WebCore/html/HTMLDataListElement.idl b/WebCore/html/HTMLDataListElement.idl
index 916c0a1..a971fa7 100644
--- a/WebCore/html/HTMLDataListElement.idl
+++ b/WebCore/html/HTMLDataListElement.idl
@@ -30,7 +30,6 @@
module html {
interface [
- GenerateConstructor,
Conditional=DATALIST
] HTMLDataListElement : HTMLElement {
readonly attribute HTMLCollection options;
diff --git a/WebCore/html/HTMLDirectoryElement.idl b/WebCore/html/HTMLDirectoryElement.idl
index 308e30d..c88e2e0 100644
--- a/WebCore/html/HTMLDirectoryElement.idl
+++ b/WebCore/html/HTMLDirectoryElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=49292c6b-2b2e-49cb-98b6-20d4cd806bd2,
- ImplementationUUID=45749798-4afe-4884-a42a-a2c8b3d98795
- ] HTMLDirectoryElement : HTMLElement {
+ interface HTMLDirectoryElement : HTMLElement {
attribute boolean compact;
};
diff --git a/WebCore/html/HTMLDivElement.idl b/WebCore/html/HTMLDivElement.idl
index 41cc327..9f0b581 100644
--- a/WebCore/html/HTMLDivElement.idl
+++ b/WebCore/html/HTMLDivElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=46fb9095-b485-4925-b6fd-2622935fd8bf,
- ImplementationUUID=5f8661b7-96ad-4a8b-864a-85d544319fd2
- ] HTMLDivElement : HTMLElement {
+ interface HTMLDivElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString align;
};
diff --git a/WebCore/html/HTMLDocument.cpp b/WebCore/html/HTMLDocument.cpp
index c04f73f..cf98755 100644
--- a/WebCore/html/HTMLDocument.cpp
+++ b/WebCore/html/HTMLDocument.cpp
@@ -80,7 +80,7 @@ namespace WebCore {
using namespace HTMLNames;
HTMLDocument::HTMLDocument(Frame* frame)
- : Document(frame, false)
+ : Document(frame, false, true)
{
clearXMLVersion();
setParseMode(Compat);
@@ -398,8 +398,11 @@ void HTMLDocument::determineParseMode()
}
}
- if (inCompatMode() != wasInCompatMode)
+ if (inCompatMode() != wasInCompatMode) {
+ clearPageUserSheet();
+ clearPageGroupUserSheets();
updateStyleSelector();
+ }
}
void HTMLDocument::clear()
diff --git a/WebCore/html/HTMLDocument.h b/WebCore/html/HTMLDocument.h
index f4bdaec..4a8dd8b 100644
--- a/WebCore/html/HTMLDocument.h
+++ b/WebCore/html/HTMLDocument.h
@@ -95,7 +95,6 @@ private:
virtual PassRefPtr<Element> createElement(const AtomicString& tagName, ExceptionCode&);
- virtual bool isHTMLDocument() const { return true; }
virtual bool isFrameSet() const;
virtual Tokenizer* createTokenizer();
virtual void determineParseMode();
diff --git a/WebCore/html/HTMLDocument.idl b/WebCore/html/HTMLDocument.idl
index d250741..a79b913 100644
--- a/WebCore/html/HTMLDocument.idl
+++ b/WebCore/html/HTMLDocument.idl
@@ -21,10 +21,7 @@
module html {
interface [
- GenerateConstructor,
- HasOverridingNameGetter,
- InterfaceUUID=a183339c-8d74-412a-933d-6f6a4ad6266e,
- ImplementationUUID=d0f7d966-033c-4cbf-847c-1461dacc2f6a
+ HasOverridingNameGetter
] HTMLDocument : Document {
[Custom] void open();
void close();
diff --git a/WebCore/html/HTMLElement.cpp b/WebCore/html/HTMLElement.cpp
index a4fc52a..d3a7f22 100644
--- a/WebCore/html/HTMLElement.cpp
+++ b/WebCore/html/HTMLElement.cpp
@@ -82,19 +82,48 @@ HTMLTagStatus HTMLElement::endTagRequirement() const
return TagStatusRequired;
}
-int HTMLElement::tagPriority() const
+struct Empty1IntHashTraits : HashTraits<int> {
+ static const bool emptyValueIsZero = false;
+ static int emptyValue() { return 1; }
+};
+typedef HashMap<AtomicStringImpl*, int, DefaultHash<AtomicStringImpl*>::Hash, HashTraits<AtomicStringImpl*>, Empty1IntHashTraits> TagPriorityMap;
+
+static const TagPriorityMap* createTagPriorityMap()
{
- if (hasLocalName(wbrTag))
- return 0;
- if (hasLocalName(addressTag) || hasLocalName(ddTag) || hasLocalName(dtTag) || hasLocalName(noscriptTag) || hasLocalName(rpTag) || hasLocalName(rtTag))
- return 3;
- if (hasLocalName(centerTag) || hasLocalName(nobrTag) || hasLocalName(rubyTag) || hasLocalName(navTag))
- return 5;
- if (hasLocalName(noembedTag) || hasLocalName(noframesTag))
- return 10;
+ TagPriorityMap* map = new TagPriorityMap;
+
+ map->add(wbrTag.localName().impl(), 0);
+
+ map->add(addressTag.localName().impl(), 3);
+ map->add(ddTag.localName().impl(), 3);
+ map->add(dtTag.localName().impl(), 3);
+ map->add(noscriptTag.localName().impl(), 3);
+ map->add(rpTag.localName().impl(), 3);
+ map->add(rtTag.localName().impl(), 3);
+
+ // 5 is same as <div>'s priority.
+ map->add(articleTag.localName().impl(), 5);
+ map->add(asideTag.localName().impl(), 5);
+ map->add(centerTag.localName().impl(), 5);
+ map->add(footerTag.localName().impl(), 5);
+ map->add(headerTag.localName().impl(), 5);
+ map->add(nobrTag.localName().impl(), 5);
+ map->add(rubyTag.localName().impl(), 5);
+ map->add(navTag.localName().impl(), 5);
+ map->add(sectionTag.localName().impl(), 5);
+
+ map->add(noembedTag.localName().impl(), 10);
+ map->add(noframesTag.localName().impl(), 10);
+
+ // TagPriorityMap returns 1 for unregistered tags. It's same as <span>.
+ // This way custom tag name elements will behave like inline spans.
+ return map;
+}
- // Same values as <span>. This way custom tag name elements will behave like inline spans.
- return 1;
+int HTMLElement::tagPriority() const
+{
+ static const TagPriorityMap* tagPriorityMap = createTagPriorityMap();
+ return tagPriorityMap->get(localName().impl());
}
bool HTMLElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
@@ -114,7 +143,7 @@ bool HTMLElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry
void HTMLElement::parseMappedAttribute(MappedAttribute *attr)
{
- if (attr->name() == idAttr || attr->name() == classAttr || attr->name() == styleAttr)
+ if (attr->name() == idAttributeName() || attr->name() == classAttr || attr->name() == styleAttr)
return StyledElement::parseMappedAttribute(attr);
String indexstring;
@@ -243,7 +272,7 @@ String HTMLElement::outerHTML() const
return createMarkup(this);
}
-PassRefPtr<DocumentFragment> HTMLElement::createContextualFragment(const String &html)
+PassRefPtr<DocumentFragment> HTMLElement::createContextualFragment(const String &html, FragmentScriptingPermission scriptingPermission)
{
// the following is in accordance with the definition as used by IE
if (endTagRequirement() == TagStatusForbidden)
@@ -256,9 +285,9 @@ PassRefPtr<DocumentFragment> HTMLElement::createContextualFragment(const String
RefPtr<DocumentFragment> fragment = DocumentFragment::create(document());
if (document()->isHTMLDocument())
- parseHTMLDocumentFragment(html, fragment.get());
+ parseHTMLDocumentFragment(html, fragment.get(), scriptingPermission);
else {
- if (!parseXMLDocumentFragment(html, fragment.get(), this))
+ if (!parseXMLDocumentFragment(html, fragment.get(), this, scriptingPermission))
// FIXME: We should propagate a syntax error exception out here.
return 0;
}
@@ -348,6 +377,13 @@ static void replaceChildrenWithText(HTMLElement* element, const String& text, Ex
void HTMLElement::setInnerHTML(const String& html, ExceptionCode& ec)
{
+ if (hasLocalName(scriptTag) || hasLocalName(styleTag)) {
+ // Script and CSS source shouldn't be parsed as HTML.
+ removeChildren();
+ appendChild(document()->createTextNode(html), ec);
+ return;
+ }
+
RefPtr<DocumentFragment> fragment = createContextualFragment(html);
if (!fragment) {
ec = NO_MODIFICATION_ALLOWED_ERR;
@@ -866,6 +902,8 @@ static HashSet<AtomicStringImpl*>* blockTagList()
DEFINE_STATIC_LOCAL(HashSet<AtomicStringImpl*>, tagList, ());
if (tagList.isEmpty()) {
tagList.add(addressTag.localName().impl());
+ tagList.add(articleTag.localName().impl());
+ tagList.add(asideTag.localName().impl());
tagList.add(blockquoteTag.localName().impl());
tagList.add(centerTag.localName().impl());
tagList.add(ddTag.localName().impl());
@@ -874,6 +912,7 @@ static HashSet<AtomicStringImpl*>* blockTagList()
tagList.add(dlTag.localName().impl());
tagList.add(dtTag.localName().impl());
tagList.add(fieldsetTag.localName().impl());
+ tagList.add(footerTag.localName().impl());
tagList.add(formTag.localName().impl());
tagList.add(h1Tag.localName().impl());
tagList.add(h2Tag.localName().impl());
@@ -881,6 +920,7 @@ static HashSet<AtomicStringImpl*>* blockTagList()
tagList.add(h4Tag.localName().impl());
tagList.add(h5Tag.localName().impl());
tagList.add(h6Tag.localName().impl());
+ tagList.add(headerTag.localName().impl());
tagList.add(hrTag.localName().impl());
tagList.add(isindexTag.localName().impl());
tagList.add(layerTag.localName().impl());
@@ -897,6 +937,7 @@ static HashSet<AtomicStringImpl*>* blockTagList()
tagList.add(pTag.localName().impl());
tagList.add(plaintextTag.localName().impl());
tagList.add(preTag.localName().impl());
+ tagList.add(sectionTag.localName().impl());
tagList.add(tableTag.localName().impl());
tagList.add(ulTag.localName().impl());
tagList.add(xmpTag.localName().impl());
diff --git a/WebCore/html/HTMLElement.h b/WebCore/html/HTMLElement.h
index c6a384b..ccc9aa3 100644
--- a/WebCore/html/HTMLElement.h
+++ b/WebCore/html/HTMLElement.h
@@ -46,7 +46,7 @@ public:
String innerHTML() const;
String outerHTML() const;
- PassRefPtr<DocumentFragment> createContextualFragment(const String&);
+ PassRefPtr<DocumentFragment> createContextualFragment(const String&, FragmentScriptingPermission = FragmentScriptingAllowed);
void setInnerHTML(const String&, ExceptionCode&);
void setOuterHTML(const String&, ExceptionCode&);
void setInnerText(const String&, ExceptionCode&);
@@ -116,6 +116,7 @@ private:
inline HTMLElement::HTMLElement(const QualifiedName& tagName, Document* document, ConstructionType type)
: StyledElement(tagName, document, type)
{
+ ASSERT(tagName.localName().impl());
}
} // namespace WebCore
diff --git a/WebCore/html/HTMLElement.idl b/WebCore/html/HTMLElement.idl
index 6b9e1d0..627dda2 100644
--- a/WebCore/html/HTMLElement.idl
+++ b/WebCore/html/HTMLElement.idl
@@ -21,11 +21,8 @@
module html {
interface [
- GenerateConstructor,
GenerateNativeConverter,
- CustomPushEventHandlerScope,
- InterfaceUUID=b2f172f1-d209-446f-8143-5f21de678f95,
- ImplementationUUID=c81b0e16-a2b9-448b-ad0a-81c9346d6f8a
+ CustomPushEventHandlerScope
] HTMLElement : Element {
// iht.com relies on id returning the empty string when no id is present.
// Other browsers do this as well. So we don't convert null to JS null.
diff --git a/WebCore/html/HTMLEmbedElement.cpp b/WebCore/html/HTMLEmbedElement.cpp
index 81b88a4..6c62848 100644
--- a/WebCore/html/HTMLEmbedElement.cpp
+++ b/WebCore/html/HTMLEmbedElement.cpp
@@ -32,8 +32,8 @@
#include "HTMLNames.h"
#include "HTMLObjectElement.h"
#include "MappedAttribute.h"
+#include "RenderEmbeddedObject.h"
#include "RenderImage.h"
-#include "RenderPartObject.h"
#include "RenderWidget.h"
#include "ScriptController.h"
#include "Settings.h"
@@ -155,7 +155,7 @@ RenderObject* HTMLEmbedElement::createRenderer(RenderArena* arena, RenderStyle*)
{
if (isImageType())
return new (arena) RenderImage(this);
- return new (arena) RenderPartObject(this);
+ return new (arena) RenderEmbeddedObject(this);
}
void HTMLEmbedElement::attach()
@@ -183,7 +183,7 @@ void HTMLEmbedElement::updateWidget()
{
document()->updateStyleIfNeeded();
if (m_needWidgetUpdate && renderer() && !isImageType())
- toRenderPartObject(renderer())->updateWidget(true);
+ toRenderEmbeddedObject(renderer())->updateWidget(true);
}
void HTMLEmbedElement::insertedIntoDocument()
diff --git a/WebCore/html/HTMLEmbedElement.idl b/WebCore/html/HTMLEmbedElement.idl
index 05c10db..d491a0d 100644
--- a/WebCore/html/HTMLEmbedElement.idl
+++ b/WebCore/html/HTMLEmbedElement.idl
@@ -21,13 +21,10 @@
module html {
interface [
- GenerateConstructor,
DelegatingPutFunction,
DelegatingGetOwnPropertySlot,
CustomCall,
- HasOverridingNameGetter,
- InterfaceUUID=18f9bd58-6bb3-4b5c-aa30-6da13adfc91e,
- ImplementationUUID=93e0407a-8380-4ff0-978d-f773f2dee6a3
+ HasOverridingNameGetter
] HTMLEmbedElement : HTMLElement {
attribute [ConvertNullToNullString, Reflect] DOMString align;
#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
@@ -44,14 +41,12 @@ module html {
attribute [ConvertFromString] long width;
#endif
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
#if defined(ENABLE_SVG) && ENABLE_SVG
#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C || defined(ENABLE_SVG_DOM_OBJC_BINDINGS) && ENABLE_SVG_DOM_OBJC_BINDINGS
[SVGCheckSecurityDocument] SVGDocument getSVGDocument()
raises(DOMException);
#endif
#endif
-#endif
};
}
diff --git a/WebCore/html/HTMLFieldSetElement.idl b/WebCore/html/HTMLFieldSetElement.idl
index c55e604..8cffe3d 100644
--- a/WebCore/html/HTMLFieldSetElement.idl
+++ b/WebCore/html/HTMLFieldSetElement.idl
@@ -19,15 +19,9 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=cf9e4c4c-a1c9-4740-ad6c-6e5ea94a51a5,
- ImplementationUUID=93573758-96db-415d-9bdc-ee7238604094
- ] HTMLFieldSetElement : HTMLElement {
+ interface HTMLFieldSetElement : HTMLElement {
readonly attribute HTMLFormElement form;
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
readonly attribute ValidityState validity;
-#endif
readonly attribute boolean willValidate;
readonly attribute DOMString validationMessage;
boolean checkValidity();
diff --git a/WebCore/html/HTMLFontElement.idl b/WebCore/html/HTMLFontElement.idl
index cb9cbbe..fa7d908 100644
--- a/WebCore/html/HTMLFontElement.idl
+++ b/WebCore/html/HTMLFontElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=f6a11dbe-7f40-49dc-a304-7997b25b2cb9,
- ImplementationUUID=a37453b9-f7ba-4896-8e91-37d1ecc5b7ce
- ] HTMLFontElement : HTMLElement {
+ interface HTMLFontElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString color;
attribute [ConvertNullToNullString] DOMString face;
attribute [ConvertNullToNullString] DOMString size;
diff --git a/WebCore/html/HTMLFormCollection.cpp b/WebCore/html/HTMLFormCollection.cpp
index 812d98a..602f23b 100644
--- a/WebCore/html/HTMLFormCollection.cpp
+++ b/WebCore/html/HTMLFormCollection.cpp
@@ -40,6 +40,7 @@ inline CollectionCache* HTMLFormCollection::formCollectionInfo(HTMLFormElement*
{
if (!form->collectionInfo)
form->collectionInfo = new CollectionCache;
+ form->collectionInfo->checkConsistency();
return form->collectionInfo;
}
@@ -110,7 +111,8 @@ Element* HTMLFormCollection::getNamedFormItem(const QualifiedName& attrName, con
bool foundInputElements = false;
for (unsigned i = 0; i < form->formElements.size(); ++i) {
HTMLFormControlElement* e = form->formElements[i];
- if (e->isEnumeratable() && e->getAttribute(attrName) == name) {
+ const QualifiedName& attributeName = (attrName == idAttr) ? e->idAttributeName() : attrName;
+ if (e->isEnumeratable() && e->getAttribute(attributeName) == name) {
foundInputElements = true;
if (!duplicateNumber)
return e;
@@ -121,7 +123,8 @@ Element* HTMLFormCollection::getNamedFormItem(const QualifiedName& attrName, con
if (!foundInputElements) {
for (unsigned i = 0; i < form->imgElements.size(); ++i) {
HTMLImageElement* e = form->imgElements[i];
- if (e->getAttribute(attrName) == name) {
+ const QualifiedName& attributeName = (attrName == idAttr) ? e->idAttributeName() : attrName;
+ if (e->getAttribute(attributeName) == name) {
if (!duplicateNumber)
return e;
--duplicateNumber;
@@ -171,10 +174,10 @@ Node* HTMLFormCollection::nextNamedItem(const AtomicString& name) const
// The nextNamedItemInternal function can return the same item twice if it has
// both an id and name that are equal to the name parameter. So this function
// checks if we are on the nameAttr half of the iteration and skips over any
- // that also have the same idAttr.
+ // that also have the same idAttributeName.
Element* impl = nextNamedItemInternal(name);
if (m_idsDone)
- while (impl && impl->getAttribute(idAttr) == name)
+ while (impl && impl->getAttribute(impl->idAttributeName()) == name)
impl = nextNamedItemInternal(name);
return impl;
}
@@ -191,7 +194,7 @@ void HTMLFormCollection::updateNameCache() const
for (unsigned i = 0; i < f->formElements.size(); ++i) {
HTMLFormControlElement* e = f->formElements[i];
if (e->isEnumeratable()) {
- const AtomicString& idAttrVal = e->getAttribute(idAttr);
+ const AtomicString& idAttrVal = e->getAttribute(e->idAttributeName());
const AtomicString& nameAttrVal = e->getAttribute(nameAttr);
if (!idAttrVal.isEmpty()) {
// add to id cache
@@ -218,7 +221,7 @@ void HTMLFormCollection::updateNameCache() const
for (unsigned i = 0; i < f->imgElements.size(); ++i) {
HTMLImageElement* e = f->imgElements[i];
- const AtomicString& idAttrVal = e->getAttribute(idAttr);
+ const AtomicString& idAttrVal = e->getAttribute(e->idAttributeName());
const AtomicString& nameAttrVal = e->getAttribute(nameAttr);
if (!idAttrVal.isEmpty() && !foundInputElements.contains(idAttrVal.impl())) {
// add to id cache
diff --git a/WebCore/html/HTMLFormControlElement.cpp b/WebCore/html/HTMLFormControlElement.cpp
index 2531c48..eb25c40 100644
--- a/WebCore/html/HTMLFormControlElement.cpp
+++ b/WebCore/html/HTMLFormControlElement.cpp
@@ -25,6 +25,7 @@
#include "config.h"
#include "HTMLFormControlElement.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
#include "Event.h"
@@ -233,12 +234,23 @@ void HTMLFormControlElement::setRequired(bool b)
setAttribute(requiredAttr, b ? "required" : 0);
}
+static void updateFromElementCallback(Node* node)
+{
+ ASSERT_ARG(node, node->isElementNode());
+ ASSERT_ARG(node, static_cast<Element*>(node)->isFormControlElement());
+ ASSERT(node->renderer());
+ if (RenderObject* renderer = node->renderer())
+ renderer->updateFromElement();
+}
+
void HTMLFormControlElement::recalcStyle(StyleChange change)
{
HTMLElement::recalcStyle(change);
+ // updateFromElement() can cause the selection to change, and in turn
+ // trigger synchronous layout, so it must not be called during style recalc.
if (renderer())
- renderer()->updateFromElement();
+ queuePostAttachCallback(updateFromElementCallback, this);
}
bool HTMLFormControlElement::supportsFocus() const
diff --git a/WebCore/html/HTMLFormControlElement.h b/WebCore/html/HTMLFormControlElement.h
index 7105112..358546b 100644
--- a/WebCore/html/HTMLFormControlElement.h
+++ b/WebCore/html/HTMLFormControlElement.h
@@ -43,7 +43,7 @@ public:
virtual int tagPriority() const { return 1; }
HTMLFormElement* form() const { return m_form; }
- virtual ValidityState* validity();
+ ValidityState* validity();
bool formNoValidate() const;
void setFormNoValidate(bool);
@@ -129,7 +129,7 @@ private:
virtual bool isValidFormControlElement();
HTMLFormElement* m_form;
- RefPtr<ValidityState> m_validityState;
+ OwnPtr<ValidityState> m_validityState;
bool m_disabled : 1;
bool m_readOnly : 1;
bool m_required : 1;
diff --git a/WebCore/html/HTMLFormElement.cpp b/WebCore/html/HTMLFormElement.cpp
index ace0f2f..bf25bf6 100644
--- a/WebCore/html/HTMLFormElement.cpp
+++ b/WebCore/html/HTMLFormElement.cpp
@@ -26,6 +26,7 @@
#include "HTMLFormElement.h"
#include "CSSHelper.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
#include "Event.h"
@@ -302,7 +303,7 @@ bool HTMLFormElement::prepareSubmit(Event* event)
m_insubmit = false;
if (m_doingsubmit)
- submit(event, true);
+ submit(event, true, false, NotSubmittedByJavaScript);
return m_doingsubmit;
}
@@ -329,7 +330,15 @@ static void transferMailtoPostFormDataToURL(RefPtr<FormData>& data, KURL& url, c
url.setQuery(query);
}
-void HTMLFormElement::submit(Event* event, bool activateSubmitButton, bool lockHistory)
+void HTMLFormElement::submit(Frame* javaScriptActiveFrame)
+{
+ if (javaScriptActiveFrame)
+ submit(0, false, !javaScriptActiveFrame->script()->anyPageIsProcessingUserGesture(), SubmittedByJavaScript);
+ else
+ submit(0, false, false, NotSubmittedByJavaScript);
+}
+
+void HTMLFormElement::submit(Event* event, bool activateSubmitButton, bool lockHistory, FormSubmissionTrigger formSubmissionTrigger)
{
FrameView* view = document()->view();
Frame* frame = document()->frame();
@@ -366,7 +375,7 @@ void HTMLFormElement::submit(Event* event, bool activateSubmitButton, bool lockH
}
}
- RefPtr<FormState> formState = FormState::create(this, formValues, frame);
+ RefPtr<FormState> formState = FormState::create(this, formValues, frame, formSubmissionTrigger);
if (needButtonActivation && firstSuccessfulSubmitButton)
firstSuccessfulSubmitButton->setActivatedSubmit(true);
diff --git a/WebCore/html/HTMLFormElement.h b/WebCore/html/HTMLFormElement.h
index a2e9585..c0ce3e3 100644
--- a/WebCore/html/HTMLFormElement.h
+++ b/WebCore/html/HTMLFormElement.h
@@ -26,6 +26,7 @@
#include "CheckedRadioButtons.h"
#include "FormDataBuilder.h"
+#include "FormState.h"
#include "HTMLElement.h"
#include <wtf/OwnPtr.h>
@@ -78,7 +79,7 @@ public:
void removeImgElement(HTMLImageElement*);
bool prepareSubmit(Event*);
- void submit(Event* = 0, bool activateSubmitButton = false, bool lockHistory = false);
+ void submit(Frame* javaScriptActiveFrame = 0);
void reset();
// Used to indicate a malformed state to keep from applying the bottom margin of the form.
@@ -130,6 +131,8 @@ protected:
virtual void didMoveToNewOwnerDocument();
private:
+ void submit(Event*, bool activateSubmitButton, bool lockHistory, FormSubmissionTrigger);
+
bool isMailtoForm() const;
TextEncoding dataEncoding() const;
PassRefPtr<FormData> createFormData(const CString& boundary);
diff --git a/WebCore/html/HTMLFormElement.idl b/WebCore/html/HTMLFormElement.idl
index 3e846d6..d639c34 100644
--- a/WebCore/html/HTMLFormElement.idl
+++ b/WebCore/html/HTMLFormElement.idl
@@ -22,10 +22,7 @@ module html {
interface [
HasIndexGetter,
- HasOverridingNameGetter,
- GenerateConstructor,
- InterfaceUUID=c7e79252-3b6d-4636-9efb-0667192ca5c3,
- ImplementationUUID=3561288f-5f67-4c45-9290-de4191d4c9c9
+ HasOverridingNameGetter
] HTMLFormElement : HTMLElement {
readonly attribute HTMLCollection elements;
readonly attribute long length;
diff --git a/WebCore/html/HTMLFrameElement.idl b/WebCore/html/HTMLFrameElement.idl
index d0076eb..453de0a 100644
--- a/WebCore/html/HTMLFrameElement.idl
+++ b/WebCore/html/HTMLFrameElement.idl
@@ -20,11 +20,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=0795de43-e0cb-429e-ae0b-d38dbb641fd7,
- ImplementationUUID=38c9e3c8-3384-40b6-a484-cb845c48b67d
- ] HTMLFrameElement : HTMLElement {
+ interface HTMLFrameElement : HTMLElement {
attribute [ConvertNullToNullString, Reflect=frameborder] DOMString frameBorder;
attribute [ConvertNullToNullString, Reflect=longdesc] DOMString longDesc;
@@ -38,7 +34,6 @@ module html {
// Introduced in DOM Level 2:
readonly attribute [CheckFrameSecurity] Document contentDocument;
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
// Extensions
readonly attribute DOMWindow contentWindow;
@@ -48,7 +43,6 @@ module html {
raises(DOMException);
#endif
#endif
-#endif
attribute [ConvertNullToNullString, CustomSetter] DOMString location;
readonly attribute long width;
diff --git a/WebCore/html/HTMLFrameElementBase.cpp b/WebCore/html/HTMLFrameElementBase.cpp
index 80df829..3890850 100644
--- a/WebCore/html/HTMLFrameElementBase.cpp
+++ b/WebCore/html/HTMLFrameElementBase.cpp
@@ -50,8 +50,10 @@ HTMLFrameElementBase::HTMLFrameElementBase(const QualifiedName& tagName, Documen
, m_scrolling(ScrollbarAuto)
, m_marginWidth(-1)
, m_marginHeight(-1)
+ , m_checkAttachedTimer(this, &HTMLFrameElementBase::checkAttachedTimerFired)
, m_viewSource(false)
, m_shouldOpenURLAfterAttach(false)
+ , m_remainsAliveOnRemovalFromTree(false)
{
}
@@ -111,7 +113,7 @@ void HTMLFrameElementBase::parseMappedAttribute(MappedAttribute *attr)
{
if (attr->name() == srcAttr)
setLocation(deprecatedParseURL(attr->value()));
- else if (attr->name() == idAttr) {
+ else if (attr->name() == idAttributeName()) {
// Important to call through to base for the id attribute so the hasID bit gets set.
HTMLFrameOwnerElement::parseMappedAttribute(attr);
m_frameName = attr->value();
@@ -152,7 +154,7 @@ void HTMLFrameElementBase::setNameAndOpenURL()
{
m_frameName = getAttribute(nameAttr);
if (m_frameName.isNull())
- m_frameName = getAttribute(idAttr);
+ m_frameName = getAttribute(idAttributeName());
if (Frame* parentFrame = document()->frame())
m_frameName = parentFrame->tree()->uniqueChildName(m_frameName);
@@ -186,9 +188,12 @@ void HTMLFrameElementBase::attach()
{
if (m_shouldOpenURLAfterAttach) {
m_shouldOpenURLAfterAttach = false;
- queuePostAttachCallback(&HTMLFrameElementBase::setNameAndOpenURLCallback, this);
+ if (!m_remainsAliveOnRemovalFromTree)
+ queuePostAttachCallback(&HTMLFrameElementBase::setNameAndOpenURLCallback, this);
}
+ setRemainsAliveOnRemovalFromTree(false);
+
HTMLFrameOwnerElement::attach();
if (RenderPart* renderPart = toRenderPart(renderer())) {
@@ -249,4 +254,33 @@ int HTMLFrameElementBase::height() const
return toRenderBox(renderer())->height();
}
+void HTMLFrameElementBase::setRemainsAliveOnRemovalFromTree(bool value)
+{
+ m_remainsAliveOnRemovalFromTree = value;
+
+ // There is a possibility that JS will do document.adoptNode() on this element but will not insert it into the tree.
+ // Start the async timer that is normally stopped by attach(). If it's not stopped and fires, it'll unload the frame.
+ if (value)
+ m_checkAttachedTimer.startOneShot(0);
+ else
+ m_checkAttachedTimer.stop();
+}
+
+void HTMLFrameElementBase::checkAttachedTimerFired(Timer<HTMLFrameElementBase>*)
+{
+ ASSERT(!attached());
+ ASSERT(m_remainsAliveOnRemovalFromTree);
+
+ m_remainsAliveOnRemovalFromTree = false;
+ willRemove();
+}
+
+void HTMLFrameElementBase::willRemove()
+{
+ if (m_remainsAliveOnRemovalFromTree)
+ return;
+
+ HTMLFrameOwnerElement::willRemove();
+}
+
} // namespace WebCore
diff --git a/WebCore/html/HTMLFrameElementBase.h b/WebCore/html/HTMLFrameElementBase.h
index c211ba7..ea93ae7 100644
--- a/WebCore/html/HTMLFrameElementBase.h
+++ b/WebCore/html/HTMLFrameElementBase.h
@@ -42,6 +42,8 @@ public:
int width() const;
int height() const;
+ void setRemainsAliveOnRemovalFromTree(bool);
+
protected:
HTMLFrameElementBase(const QualifiedName&, Document*);
@@ -62,6 +64,9 @@ private:
virtual bool isURLAttribute(Attribute*) const;
+ virtual void willRemove();
+ void checkAttachedTimerFired(Timer<HTMLFrameElementBase>*);
+
bool viewSourceMode() const { return m_viewSource; }
void setNameAndOpenURL();
@@ -77,9 +82,13 @@ private:
int m_marginWidth;
int m_marginHeight;
+ Timer<HTMLFrameElementBase> m_checkAttachedTimer;
+
bool m_viewSource;
bool m_shouldOpenURLAfterAttach;
+
+ bool m_remainsAliveOnRemovalFromTree;
};
} // namespace WebCore
diff --git a/WebCore/html/HTMLFrameOwnerElement.cpp b/WebCore/html/HTMLFrameOwnerElement.cpp
index 7598da2..c3ae785 100644
--- a/WebCore/html/HTMLFrameOwnerElement.cpp
+++ b/WebCore/html/HTMLFrameOwnerElement.cpp
@@ -71,7 +71,7 @@ void HTMLFrameOwnerElement::setSandboxFlags(SandboxFlags flags)
return;
m_sandboxFlags = flags;
-
+
if (Frame* frame = contentFrame())
frame->loader()->ownerElementSandboxFlagsChanged();
}
diff --git a/WebCore/html/HTMLFrameOwnerElement.h b/WebCore/html/HTMLFrameOwnerElement.h
index 308a100..4a56e45 100644
--- a/WebCore/html/HTMLFrameOwnerElement.h
+++ b/WebCore/html/HTMLFrameOwnerElement.h
@@ -48,19 +48,19 @@ public:
virtual ScrollbarMode scrollingMode() const { return ScrollbarAuto; }
SandboxFlags sandboxFlags() const { return m_sandboxFlags; }
-
+
protected:
HTMLFrameOwnerElement(const QualifiedName& tagName, Document*);
void setSandboxFlags(SandboxFlags);
-
+
+ virtual void willRemove();
+
private:
friend class Frame;
virtual bool isFrameOwnerElement() const { return true; }
virtual bool isKeyboardFocusable(KeyboardEvent*) const { return m_contentFrame; }
-
- virtual void willRemove();
Frame* m_contentFrame;
SandboxFlags m_sandboxFlags;
diff --git a/WebCore/html/HTMLFrameSetElement.idl b/WebCore/html/HTMLFrameSetElement.idl
index 6ab1a8b..3a761ae 100644
--- a/WebCore/html/HTMLFrameSetElement.idl
+++ b/WebCore/html/HTMLFrameSetElement.idl
@@ -21,16 +21,12 @@
module html {
interface [
- GenerateConstructor,
- HasOverridingNameGetter,
- InterfaceUUID=5038a73d-c0db-4847-acb4-4c6d31f48790,
- ImplementationUUID=450f7bf6-fdc0-4a0f-b7e1-baea7f7e5732
+ HasOverridingNameGetter
] HTMLFrameSetElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString cols;
attribute [ConvertNullToNullString] DOMString rows;
#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
// Event handler attributes
attribute [DontEnum] EventListener onbeforeunload;
attribute [DontEnum] EventListener onhashchange;
@@ -55,11 +51,9 @@ module html {
// Not implemented yet.
// attribute [DontEnum] EventListener onafterprint;
// attribute [DontEnum] EventListener onbeforeprint;
- // attribute [DontEnum] EventListener onpopstate;
// attribute [DontEnum] EventListener onredo;
// attribute [DontEnum] EventListener onundo;
#endif
-#endif
};
}
diff --git a/WebCore/html/HTMLHRElement.idl b/WebCore/html/HTMLHRElement.idl
index e49932a..bb1fdcf 100644
--- a/WebCore/html/HTMLHRElement.idl
+++ b/WebCore/html/HTMLHRElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=20477b34-ab22-47e3-b9aa-80c388d32975,
- ImplementationUUID=6cfc8977-172d-48f6-8f08-c7671f02354c
- ] HTMLHRElement : HTMLElement {
+ interface HTMLHRElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString align;
attribute boolean noShade;
attribute [ConvertNullToNullString] DOMString size;
diff --git a/WebCore/html/HTMLHeadElement.idl b/WebCore/html/HTMLHeadElement.idl
index 82ff796..8559dd3 100644
--- a/WebCore/html/HTMLHeadElement.idl
+++ b/WebCore/html/HTMLHeadElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=47e0c1a2-39ca-4be8-a4ef-38af06462d2e,
- ImplementationUUID=f56408fe-6987-4ece-b925-599f517bde50
- ] HTMLHeadElement : HTMLElement {
+ interface HTMLHeadElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString profile;
};
diff --git a/WebCore/html/HTMLHeadingElement.idl b/WebCore/html/HTMLHeadingElement.idl
index 7173252..486a5bd 100644
--- a/WebCore/html/HTMLHeadingElement.idl
+++ b/WebCore/html/HTMLHeadingElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=91c029bb-aa3a-4877-8ab5-59f304525fd5,
- ImplementationUUID=ab39e189-5d0c-465d-b518-f57bc920038b
- ] HTMLHeadingElement : HTMLElement {
+ interface HTMLHeadingElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString align;
};
diff --git a/WebCore/html/HTMLHtmlElement.idl b/WebCore/html/HTMLHtmlElement.idl
index e9709bf..9cee000 100644
--- a/WebCore/html/HTMLHtmlElement.idl
+++ b/WebCore/html/HTMLHtmlElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=162828a5-d4d9-4973-b5ca-00ccbb26ded9,
- ImplementationUUID=362f4f5f-99c5-4bbf-91ba-9ae7f9a7b297
- ] HTMLHtmlElement : HTMLElement {
+ interface HTMLHtmlElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString version;
diff --git a/WebCore/html/HTMLIFrameElement.cpp b/WebCore/html/HTMLIFrameElement.cpp
index a2f287e..359bdb7 100644
--- a/WebCore/html/HTMLIFrameElement.cpp
+++ b/WebCore/html/HTMLIFrameElement.cpp
@@ -155,14 +155,6 @@ void HTMLIFrameElement::removedFromDocument()
HTMLFrameElementBase::removedFromDocument();
}
-void HTMLIFrameElement::attach()
-{
- HTMLFrameElementBase::attach();
-
- if (RenderPartObject* renderPartObject = toRenderPartObject(renderer()))
- renderPartObject->updateWidget(false);
-}
-
bool HTMLIFrameElement::isURLAttribute(Attribute* attr) const
{
return attr->name() == srcAttr;
diff --git a/WebCore/html/HTMLIFrameElement.h b/WebCore/html/HTMLIFrameElement.h
index f1c6a35..c708456 100644
--- a/WebCore/html/HTMLIFrameElement.h
+++ b/WebCore/html/HTMLIFrameElement.h
@@ -44,8 +44,6 @@ private:
virtual void insertedIntoDocument();
virtual void removedFromDocument();
- virtual void attach();
-
virtual bool rendererIsNeeded(RenderStyle*);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
diff --git a/WebCore/html/HTMLIFrameElement.idl b/WebCore/html/HTMLIFrameElement.idl
index dad8416..e1aed03 100644
--- a/WebCore/html/HTMLIFrameElement.idl
+++ b/WebCore/html/HTMLIFrameElement.idl
@@ -20,11 +20,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=32265f2e-79b1-4e4e-b0d1-86b050298883,
- ImplementationUUID=370c6318-f804-49f9-bc8a-46b99cd87399
- ] HTMLIFrameElement : HTMLElement {
+ interface HTMLIFrameElement : HTMLElement {
attribute [ConvertNullToNullString, Reflect] DOMString align;
attribute [ConvertNullToNullString, Reflect=frameborder] DOMString frameBorder;
@@ -41,7 +37,6 @@ module html {
// Introduced in DOM Level 2:
readonly attribute [CheckFrameSecurity] Document contentDocument;
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
// Extensions
readonly attribute DOMWindow contentWindow;
@@ -51,7 +46,6 @@ module html {
raises(DOMException);
#endif
#endif
-#endif
};
diff --git a/WebCore/html/HTMLImageElement.cpp b/WebCore/html/HTMLImageElement.cpp
index d353073..34646ad 100644
--- a/WebCore/html/HTMLImageElement.cpp
+++ b/WebCore/html/HTMLImageElement.cpp
@@ -54,8 +54,6 @@ HTMLImageElement::HTMLImageElement(const QualifiedName& tagName, Document* doc,
HTMLImageElement::~HTMLImageElement()
{
- if (m_form)
- m_form->removeImgElement(this);
}
bool HTMLImageElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
@@ -131,7 +129,7 @@ void HTMLImageElement::parseMappedAttribute(MappedAttribute* attr)
document->addNamedItem(newName);
}
m_name = newName;
- } else if (attr->name() == idAttr) {
+ } else if (attr->name() == idAttributeName()) {
const AtomicString& newId = attr->value();
if (inDocument() && document()->isHTMLDocument()) {
HTMLDocument* document = static_cast<HTMLDocument*>(this->document());
@@ -209,6 +207,30 @@ void HTMLImageElement::removedFromDocument()
HTMLElement::removedFromDocument();
}
+void HTMLImageElement::insertedIntoTree(bool deep)
+{
+ if (!m_form) {
+ // m_form can be non-null if it was set in constructor.
+ for (Node* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNode()) {
+ if (ancestor->hasTagName(formTag)) {
+ m_form = static_cast<HTMLFormElement*>(ancestor);
+ m_form->registerImgElement(this);
+ break;
+ }
+ }
+ }
+
+ HTMLElement::insertedIntoTree(deep);
+}
+
+void HTMLImageElement::removedFromTree(bool deep)
+{
+ if (m_form)
+ m_form->removeImgElement(this);
+ m_form = 0;
+ HTMLElement::removedFromTree(deep);
+}
+
int HTMLImageElement::width(bool ignorePendingStylesheets) const
{
if (!renderer()) {
diff --git a/WebCore/html/HTMLImageElement.h b/WebCore/html/HTMLImageElement.h
index f58574d..14e5fa3 100644
--- a/WebCore/html/HTMLImageElement.h
+++ b/WebCore/html/HTMLImageElement.h
@@ -45,8 +45,6 @@ public:
virtual void attach();
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- virtual void insertedIntoDocument();
- virtual void removedFromDocument();
virtual bool canStartSelection() const { return false; }
@@ -105,6 +103,11 @@ public:
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
private:
+ virtual void insertedIntoDocument();
+ virtual void removedFromDocument();
+ virtual void insertedIntoTree(bool deep);
+ virtual void removedFromTree(bool deep);
+
HTMLImageLoader m_imageLoader;
String usemap;
bool ismap;
diff --git a/WebCore/html/HTMLImageElement.idl b/WebCore/html/HTMLImageElement.idl
index a90ae25..3862539 100644
--- a/WebCore/html/HTMLImageElement.idl
+++ b/WebCore/html/HTMLImageElement.idl
@@ -20,11 +20,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=b21b8125-d00b-4bdf-b0e8-659678db3923,
- ImplementationUUID=2121ca21-8118-4f1b-b9fe-4788a9050281
- ] HTMLImageElement : HTMLElement {
+ interface HTMLImageElement : HTMLElement {
attribute [ConvertNullToNullString, Reflect] DOMString name;
attribute [ConvertNullToNullString, Reflect] DOMString align;
attribute [ConvertNullToNullString, Reflect] DOMString alt;
diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp
index acfe51f..5567fe2 100644
--- a/WebCore/html/HTMLInputElement.cpp
+++ b/WebCore/html/HTMLInputElement.cpp
@@ -29,6 +29,7 @@
#include "AXObjectCache.h"
#include "CSSPropertyNames.h"
#include "ChromeClient.h"
+#include "DateComponents.h"
#include "Document.h"
#include "Editor.h"
#include "Event.h"
@@ -45,7 +46,6 @@
#include "HTMLImageLoader.h"
#include "HTMLNames.h"
#include "HTMLOptionElement.h"
-#include "ISODateTime.h"
#include "ScriptEventListener.h"
#include "KeyboardEvent.h"
#include "LocalizedStrings.h"
@@ -82,9 +82,11 @@ const int maxSavedResults = 256;
static const double numberDefaultStep = 1.0;
static const double numberStepScaleFactor = 1.0;
// Constant values for minimum().
+static const double dateDefaultMinimum = -12219292800000.0; // This means 1582-10-15T00:00Z.
static const double numberDefaultMinimum = -DBL_MAX;
static const double rangeDefaultMinimum = 0.0;
// Constant values for maximum().
+static const double dateDefaultMaximum = DBL_MAX;
static const double numberDefaultMaximum = DBL_MAX;
static const double rangeDefaultMaximum = 100.0;
@@ -269,46 +271,153 @@ bool HTMLInputElement::tooLong() const
bool HTMLInputElement::rangeUnderflow() const
{
- if (inputType() == NUMBER || inputType() == RANGE) {
- double doubleValue;
- if (formStringToDouble(value(), &doubleValue))
- return doubleValue < minimum();
+ const double nan = numeric_limits<double>::quiet_NaN();
+ switch (inputType()) {
+ case DATE:
+ case NUMBER:
+ case RANGE: {
+ double doubleValue = parseToDouble(value(), nan);
+ return isfinite(doubleValue) && doubleValue < minimum();
+ }
+ case BUTTON:
+ case CHECKBOX:
+ case COLOR:
+ case DATETIME:
+ case DATETIMELOCAL:
+ case EMAIL:
+ case FILE:
+ case HIDDEN:
+ case IMAGE:
+ case ISINDEX:
+ case MONTH:
+ case PASSWORD:
+ case RADIO:
+ case RESET:
+ case SEARCH:
+ case SUBMIT:
+ case TELEPHONE:
+ case TEXT:
+ case TIME:
+ case URL:
+ case WEEK:
+ break;
}
return false;
}
bool HTMLInputElement::rangeOverflow() const
{
- if (inputType() == NUMBER || inputType() == RANGE) {
- double doubleValue;
- if (formStringToDouble(value(), &doubleValue))
- return doubleValue > maximum();
+ const double nan = numeric_limits<double>::quiet_NaN();
+ switch (inputType()) {
+ case DATE:
+ case NUMBER:
+ case RANGE: {
+ double doubleValue = parseToDouble(value(), nan);
+ return isfinite(doubleValue) && doubleValue > maximum();
+ }
+ case BUTTON:
+ case CHECKBOX:
+ case COLOR:
+ case DATETIME:
+ case DATETIMELOCAL:
+ case EMAIL:
+ case FILE:
+ case HIDDEN:
+ case IMAGE:
+ case ISINDEX:
+ case MONTH:
+ case PASSWORD:
+ case RADIO:
+ case RESET:
+ case SEARCH:
+ case SUBMIT:
+ case TELEPHONE:
+ case TEXT:
+ case TIME:
+ case URL:
+ case WEEK:
+ break;
}
return false;
}
double HTMLInputElement::minimum() const
{
- ASSERT(inputType() == NUMBER || inputType() == RANGE);
- double min = inputType() == RANGE ? rangeDefaultMinimum : numberDefaultMinimum;
- formStringToDouble(getAttribute(minAttr), &min);
- return min;
+ switch (inputType()) {
+ case DATE:
+ return parseToDouble(getAttribute(minAttr), dateDefaultMinimum);
+ case NUMBER:
+ return parseToDouble(getAttribute(minAttr), numberDefaultMinimum);
+ case RANGE:
+ return parseToDouble(getAttribute(minAttr), rangeDefaultMinimum);
+ case BUTTON:
+ case CHECKBOX:
+ case COLOR:
+ case DATETIME:
+ case DATETIMELOCAL:
+ case EMAIL:
+ case FILE:
+ case HIDDEN:
+ case IMAGE:
+ case ISINDEX:
+ case MONTH:
+ case PASSWORD:
+ case RADIO:
+ case RESET:
+ case SEARCH:
+ case SUBMIT:
+ case TELEPHONE:
+ case TEXT:
+ case TIME:
+ case URL:
+ case WEEK:
+ break;
+ }
+ ASSERT_NOT_REACHED();
+ return 0;
}
double HTMLInputElement::maximum() const
{
- ASSERT(inputType() == NUMBER || inputType() == RANGE);
- double defaultMaximum = inputType() == RANGE ? rangeDefaultMaximum : numberDefaultMaximum;
- double max = defaultMaximum;
- formStringToDouble(getAttribute(maxAttr), &max);
- if (inputType() == RANGE) {
+ switch (inputType()) {
+ case DATE:
+ return parseToDouble(getAttribute(maxAttr), dateDefaultMaximum);
+ case NUMBER:
+ return parseToDouble(getAttribute(maxAttr), numberDefaultMaximum);
+ case RANGE: {
+ double max = parseToDouble(getAttribute(maxAttr), rangeDefaultMaximum);
// A remedy for the inconsistent min/max values for RANGE.
- // Sets the maxmimum to the default or the minimum value.
+ // Sets the maximum to the default or the minimum value.
double min = minimum();
if (max < min)
- max = std::max(min, defaultMaximum);
+ max = std::max(min, rangeDefaultMaximum);
+ return max;
+ }
+ case BUTTON:
+ case CHECKBOX:
+ case COLOR:
+ case DATETIME:
+ case DATETIMELOCAL:
+ case EMAIL:
+ case FILE:
+ case HIDDEN:
+ case IMAGE:
+ case ISINDEX:
+ case MONTH:
+ case PASSWORD:
+ case RADIO:
+ case RESET:
+ case SEARCH:
+ case SUBMIT:
+ case TELEPHONE:
+ case TEXT:
+ case TIME:
+ case URL:
+ case WEEK:
+ break;
}
- return max;
+ ASSERT_NOT_REACHED();
+ return 0;
}
double HTMLInputElement::stepBase() const
@@ -1320,6 +1429,23 @@ void HTMLInputElement::setValueForUser(const String& value)
setValue(value, true);
}
+const String& HTMLInputElement::suggestedValue() const
+{
+ return m_data.suggestedValue();
+}
+
+void HTMLInputElement::setSuggestedValue(const String& value)
+{
+ if (inputType() != TEXT)
+ return;
+ setFormControlValueMatchesRenderer(false);
+ m_data.setSuggestedValue(sanitizeValue(value));
+ updatePlaceholderVisibility(false);
+ if (renderer())
+ renderer()->updateFromElement();
+ setNeedsStyleRecalc();
+}
+
void HTMLInputElement::setValue(const String& value, bool sendChangeEvent)
{
// For security reasons, we don't allow setting the filename, but we do allow clearing it.
@@ -1356,6 +1482,7 @@ void HTMLInputElement::setValue(const String& value, bool sendChangeEvent)
InputElement::updateSelectionRange(this, this, max, max);
else
cacheSelection(max, max);
+ m_data.setSuggestedValue(String());
}
// Don't dispatch the change event when focused, it will be dispatched
@@ -1367,6 +1494,255 @@ void HTMLInputElement::setValue(const String& value, bool sendChangeEvent)
updateValidity();
}
+double HTMLInputElement::parseToDouble(const String& src, double defaultValue) const
+{
+ switch (inputType()) {
+ case DATE:
+ case DATETIME:
+ case DATETIMELOCAL:
+ case TIME:
+ case WEEK: {
+ DateComponents date;
+ if (!formStringToDateComponents(inputType(), src, &date))
+ return defaultValue;
+ double msec = date.millisecondsSinceEpoch();
+ ASSERT(isfinite(msec));
+ return msec;
+ }
+ case MONTH: {
+ DateComponents date;
+ if (!formStringToDateComponents(inputType(), src, &date))
+ return defaultValue;
+ double months = date.monthsSinceEpoch();
+ ASSERT(isfinite(months));
+ return months;
+ }
+ case NUMBER:
+ case RANGE: {
+ double numberValue;
+ if (!formStringToDouble(src, &numberValue))
+ return defaultValue;
+ ASSERT(isfinite(numberValue));
+ return numberValue;
+ }
+
+ case BUTTON:
+ case CHECKBOX:
+ case COLOR:
+ case EMAIL:
+ case FILE:
+ case HIDDEN:
+ case IMAGE:
+ case ISINDEX:
+ case PASSWORD:
+ case RADIO:
+ case RESET:
+ case SEARCH:
+ case SUBMIT:
+ case TELEPHONE:
+ case TEXT:
+ case URL:
+ return defaultValue;
+ }
+ ASSERT_NOT_REACHED();
+ return defaultValue;
+}
+
+double HTMLInputElement::valueAsDate() const
+{
+ switch (inputType()) {
+ case DATE:
+ case DATETIME:
+ case TIME:
+ case WEEK:
+ return parseToDouble(value(), DateComponents::invalidMilliseconds());
+ case MONTH: {
+ DateComponents date;
+ if (!formStringToDateComponents(inputType(), value(), &date))
+ return DateComponents::invalidMilliseconds();
+ double msec = date.millisecondsSinceEpoch();
+ ASSERT(isfinite(msec));
+ return msec;
+ }
+
+ case BUTTON:
+ case CHECKBOX:
+ case COLOR:
+ case DATETIMELOCAL: // valueAsDate doesn't work for the DATETIMELOCAL type according to the standard.
+ case EMAIL:
+ case FILE:
+ case HIDDEN:
+ case IMAGE:
+ case ISINDEX:
+ case NUMBER:
+ case PASSWORD:
+ case RADIO:
+ case RANGE:
+ case RESET:
+ case SEARCH:
+ case SUBMIT:
+ case TELEPHONE:
+ case TEXT:
+ case URL:
+ return DateComponents::invalidMilliseconds();
+ }
+ ASSERT_NOT_REACHED();
+ return DateComponents::invalidMilliseconds();
+}
+
+void HTMLInputElement::setValueAsDate(double value, ExceptionCode& ec)
+{
+ DateComponents date;
+ bool success;
+ switch (inputType()) {
+ case DATE:
+ success = date.setMillisecondsSinceEpochForDate(value);
+ break;
+ case DATETIME:
+ success = date.setMillisecondsSinceEpochForDateTime(value);
+ break;
+ case MONTH:
+ success = date.setMillisecondsSinceEpochForMonth(value);
+ break;
+ case TIME:
+ success = date.setMillisecondsSinceMidnight(value);
+ break;
+ case WEEK:
+ success = date.setMillisecondsSinceEpochForWeek(value);
+ break;
+ case BUTTON:
+ case CHECKBOX:
+ case COLOR:
+ case DATETIMELOCAL: // valueAsDate doesn't work for the DATETIMELOCAL type according to the standard.
+ case EMAIL:
+ case FILE:
+ case HIDDEN:
+ case IMAGE:
+ case ISINDEX:
+ case NUMBER:
+ case PASSWORD:
+ case RADIO:
+ case RANGE:
+ case RESET:
+ case SEARCH:
+ case SUBMIT:
+ case TELEPHONE:
+ case TEXT:
+ case URL:
+ ec = INVALID_STATE_ERR;
+ return;
+ default:
+ ASSERT_NOT_REACHED();
+ success = false;
+ }
+ if (!success) {
+ setValue(String());
+ return;
+ }
+ // FIXME: We should specify SecondFormat.
+ // e.g. If the step value is 60, use SecondFormat::None.
+ // If the step value is 1, use SecondFormat::Second.
+ setValue(date.toString());
+}
+
+double HTMLInputElement::valueAsNumber() const
+{
+ const double nan = numeric_limits<double>::quiet_NaN();
+ switch (inputType()) {
+ case DATE:
+ case DATETIME:
+ case DATETIMELOCAL:
+ case MONTH:
+ case NUMBER:
+ case RANGE:
+ case TIME:
+ case WEEK:
+ return parseToDouble(value(), nan);
+
+ case BUTTON:
+ case CHECKBOX:
+ case COLOR:
+ case EMAIL:
+ case FILE:
+ case HIDDEN:
+ case IMAGE:
+ case ISINDEX:
+ case PASSWORD:
+ case RADIO:
+ case RESET:
+ case SEARCH:
+ case SUBMIT:
+ case TELEPHONE:
+ case TEXT:
+ case URL:
+ return nan;
+ }
+ ASSERT_NOT_REACHED();
+ return nan;
+}
+
+void HTMLInputElement::setValueAsNumber(double newValue, ExceptionCode& ec)
+{
+ if (!isfinite(newValue)) {
+ ec = NOT_SUPPORTED_ERR;
+ return;
+ }
+ switch (inputType()) {
+ case DATE:
+ case DATETIME:
+ case TIME:
+ case WEEK:
+ setValueAsDate(newValue, ec);
+ return;
+ case MONTH: {
+ DateComponents date;
+ if (!date.setMonthsSinceEpoch(newValue)) {
+ setValue(String());
+ return;
+ }
+ setValue(date.toString());
+ return;
+ }
+ case DATETIMELOCAL: {
+ DateComponents date;
+ if (!date.setMillisecondsSinceEpochForDateTimeLocal(newValue)) {
+ setValue(String());
+ return;
+ }
+ // FIXME: We should specify SecondFormat.
+ // e.g. If the step value is 60, use SecondFormat::None.
+ // If the step value is 1, use SecondFormat::Second.
+ setValue(date.toString());
+ return;
+ }
+ case NUMBER:
+ case RANGE:
+ setValue(formStringFromDouble(newValue));
+ return;
+
+ case BUTTON:
+ case CHECKBOX:
+ case COLOR:
+ case EMAIL:
+ case FILE:
+ case HIDDEN:
+ case IMAGE:
+ case ISINDEX:
+ case PASSWORD:
+ case RADIO:
+ case RESET:
+ case SEARCH:
+ case SUBMIT:
+ case TELEPHONE:
+ case TEXT:
+ case URL:
+ ec = INVALID_STATE_ERR;
+ return;
+ }
+ ASSERT_NOT_REACHED();
+ return;
+}
+
String HTMLInputElement::placeholder() const
{
return getAttribute(placeholderAttr).string();
@@ -1386,6 +1762,7 @@ void HTMLInputElement::setValueFromRenderer(const String& value)
{
// File upload controls will always use setFileListFromRenderer.
ASSERT(inputType() != FILE);
+ m_data.setSuggestedValue(String());
updatePlaceholderVisibility(false);
InputElement::setValueFromRenderer(m_data, this, this, value);
updateValidity();
@@ -2095,16 +2472,21 @@ bool HTMLInputElement::formStringToDouble(const String& src, double* out)
if (!valid)
return false;
// NaN and Infinity are not valid numbers according to the standard.
- if (isnan(value) || isinf(value))
+ if (!isfinite(value))
return false;
+ // -0 -> 0
+ if (!value)
+ value = 0;
if (out)
*out = value;
return true;
}
-bool HTMLInputElement::formStringToISODateTime(InputType type, const String& formString, ISODateTime* out)
+bool HTMLInputElement::formStringToDateComponents(InputType type, const String& formString, DateComponents* out)
{
- ISODateTime ignoredResult;
+ if (formString.isEmpty())
+ return false;
+ DateComponents ignoredResult;
if (!out)
out = &ignoredResult;
const UChar* characters = formString.characters();
diff --git a/WebCore/html/HTMLInputElement.h b/WebCore/html/HTMLInputElement.h
index 8f00aeb..f35a1b1 100644
--- a/WebCore/html/HTMLInputElement.h
+++ b/WebCore/html/HTMLInputElement.h
@@ -30,11 +30,11 @@
namespace WebCore {
+class DateComponents;
class FileList;
class HTMLDataListElement;
class HTMLImageLoader;
class HTMLOptionElement;
-class ISODateTime;
class KURL;
class VisibleSelection;
@@ -106,9 +106,9 @@ public:
// For ValidityState
bool rangeUnderflow() const;
bool rangeOverflow() const;
- // Returns the minimum value for type=number or range. Don't call this for other types.
+ // 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=number or range. Don't call this for other types.
+ // Returns the maximum value for type=date, number, or range. Don't call this for other types.
// This always returns a value which is >= minimum().
double maximum() const;
// Sets the "allowed value step" defined in the HTML spec to the specified double pointer.
@@ -137,10 +137,19 @@ public:
virtual const AtomicString& formControlType() const;
void setType(const String&);
+ virtual const String& suggestedValue() const;
+ void setSuggestedValue(const String&);
+
virtual String value() const;
virtual void setValue(const String&, bool sendChangeEvent = false);
virtual void setValueForUser(const String&);
+ double valueAsDate() const;
+ void setValueAsDate(double, ExceptionCode&);
+
+ double valueAsNumber() const;
+ void setValueAsNumber(double, ExceptionCode&);
+
virtual String placeholder() const;
virtual void setPlaceholder(const String&);
@@ -258,9 +267,9 @@ public:
// HTML5's "algorithm to convert a number to a string" for NUMBER/RANGE types.
static String formStringFromDouble(double);
// Parses the specified string as the InputType, and returns true if it is successfully parsed.
- // An instance pointed by the ISODateTime* parameter will have parsed values and be
- // modified even if the parsing fails. The ISODateTime* parameter may be 0.
- static bool formStringToISODateTime(InputType, const String&, ISODateTime*);
+ // An instance pointed by the DateComponents* parameter will have parsed values and be
+ // modified even if the parsing fails. The DateComponents* parameter may be 0.
+ static bool formStringToDateComponents(InputType, const String&, DateComponents*);
protected:
virtual void willMoveToNewOwnerDocument();
@@ -291,6 +300,12 @@ private:
// Helper for applyStepForNumberOrRange().
double stepBase() const;
+ // Parses the specified string for the current type, and return
+ // the double value for the parsing result if the parsing
+ // succeeds; Returns defaultValue otherwise. This function can
+ // return NaN or Infinity only if defaultValue is NaN or Infinity.
+ double parseToDouble(const String&, double defaultValue) const;
+
#if ENABLE(DATALIST)
HTMLDataListElement* dataList() const;
#endif
diff --git a/WebCore/html/HTMLInputElement.idl b/WebCore/html/HTMLInputElement.idl
index 2ac6674..4563120 100644
--- a/WebCore/html/HTMLInputElement.idl
+++ b/WebCore/html/HTMLInputElement.idl
@@ -20,18 +20,12 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=8f388ea3-1c31-4cca-8edd-449d14e222e1,
- ImplementationUUID=aeb56b87-a90e-4d9d-a4d5-7eec3687c338
- ] HTMLInputElement : HTMLElement {
+ interface HTMLInputElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString defaultValue;
attribute boolean defaultChecked;
readonly attribute HTMLFormElement form;
attribute boolean formNoValidate;
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
readonly attribute ValidityState validity;
-#endif
attribute [ConvertNullToNullString] DOMString accept;
attribute [ConvertNullToNullString] DOMString accessKey;
attribute [ConvertNullToNullString] DOMString align;
@@ -42,14 +36,10 @@ module html {
#if defined(ENABLE_DATALIST) && ENABLE_DATALIST
readonly attribute HTMLElement list;
#endif
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
attribute [ConvertNullToNullString, Reflect] DOMString max;
-#endif
attribute long maxLength
setter raises(DOMException);
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
attribute [ConvertNullToNullString, Reflect] DOMString min;
-#endif
attribute boolean multiple;
attribute [ConvertNullToNullString] DOMString name;
attribute [ConvertNullToNullString, Reflect] DOMString pattern;
@@ -67,6 +57,8 @@ module html {
attribute [ConvertNullToNullString, JSCCustomGetter] DOMString type; // readonly dropped as part of DOM level 2
attribute [ConvertNullToNullString] DOMString useMap;
attribute [ConvertNullToNullString] DOMString value;
+ attribute Date valueAsDate setter raises(DOMException);
+ attribute double valueAsNumber setter raises(DOMException);
#if defined(ENABLE_DATALIST) && ENABLE_DATALIST
readonly attribute HTMLOptionElement selectedOption;
#endif
@@ -102,9 +94,7 @@ module html {
readonly attribute URL absoluteImageURL;
#endif
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
readonly attribute FileList files;
-#endif
};
}
diff --git a/WebCore/html/HTMLIsIndexElement.idl b/WebCore/html/HTMLIsIndexElement.idl
index 1e978b2..d968fa7 100644
--- a/WebCore/html/HTMLIsIndexElement.idl
+++ b/WebCore/html/HTMLIsIndexElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=94fc4e39-4d81-44e3-a37d-364553b23a37,
- ImplementationUUID=b31d409b-8f68-495d-a0c2-b81520716974
- ] HTMLIsIndexElement : HTMLInputElement {
+ interface HTMLIsIndexElement : HTMLInputElement {
readonly attribute HTMLFormElement form;
attribute [ConvertNullToNullString] DOMString prompt;
};
diff --git a/WebCore/html/HTMLLIElement.idl b/WebCore/html/HTMLLIElement.idl
index 015454e..946ec18 100644
--- a/WebCore/html/HTMLLIElement.idl
+++ b/WebCore/html/HTMLLIElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=83a4a75c-4427-4f53-b974-8107fedb4c2b,
- ImplementationUUID=5747808d-8cbd-49c9-b89b-3fdc315c55fe
- ] HTMLLIElement : HTMLElement {
+ interface HTMLLIElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString type;
attribute long value;
};
diff --git a/WebCore/html/HTMLLabelElement.idl b/WebCore/html/HTMLLabelElement.idl
index 85b7ef3..3b25fa9 100644
--- a/WebCore/html/HTMLLabelElement.idl
+++ b/WebCore/html/HTMLLabelElement.idl
@@ -20,11 +20,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=9978d8e6-1d27-4390-bd2f-56f0e72f16e3,
- ImplementationUUID=165b7633-0377-4853-a647-2b9005f5aaec
- ] HTMLLabelElement : HTMLElement {
+ interface HTMLLabelElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute [ConvertNullToNullString] DOMString accessKey;
attribute [ConvertNullToNullString] DOMString htmlFor;
diff --git a/WebCore/html/HTMLLegendElement.idl b/WebCore/html/HTMLLegendElement.idl
index da00cc1..ee21e4c 100644
--- a/WebCore/html/HTMLLegendElement.idl
+++ b/WebCore/html/HTMLLegendElement.idl
@@ -20,11 +20,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=a6eb4254-6066-465a-a1c0-b4732281c255,
- ImplementationUUID=323e883c-edf8-4b13-a165-8604f4f06ae2
- ] HTMLLegendElement : HTMLElement {
+ interface HTMLLegendElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute [ConvertNullToNullString] DOMString accessKey;
attribute [ConvertNullToNullString] DOMString align;
diff --git a/WebCore/html/HTMLLinkElement.cpp b/WebCore/html/HTMLLinkElement.cpp
index ab06544..5376611 100644
--- a/WebCore/html/HTMLLinkElement.cpp
+++ b/WebCore/html/HTMLLinkElement.cpp
@@ -40,6 +40,7 @@
#include "Page.h"
#include "ScriptEventListener.h"
#include "Settings.h"
+#include <wtf/StdLibExtras.h>
namespace WebCore {
@@ -283,28 +284,50 @@ void HTMLLinkElement::finishParsingChildren()
HTMLElement::finishParsingChildren();
}
-void HTMLLinkElement::setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet* sheet)
+void HTMLLinkElement::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet)
{
- m_sheet = CSSStyleSheet::create(this, url, charset);
+ m_sheet = CSSStyleSheet::create(this, href, baseURL, charset);
bool strictParsing = !document()->inCompatMode();
bool enforceMIMEType = strictParsing;
+ bool crossOriginCSS = false;
+ bool validMIMEType = false;
+ bool needsSiteSpecificQuirks = document()->page() && document()->page()->settings()->needsSiteSpecificQuirks();
// 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())
enforceMIMEType = false;
- String sheetText = sheet->sheetText(enforceMIMEType);
+#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
+ if (enforceMIMEType && needsSiteSpecificQuirks) {
+ // Covers both http and https, with or without "www."
+ if (baseURL.string().contains("mcafee.com/japan/", false))
+ enforceMIMEType = false;
+ }
+#endif
+
+ String sheetText = sheet->sheetText(enforceMIMEType, &validMIMEType);
m_sheet->parseString(sheetText, strictParsing);
- if (strictParsing && document()->settings() && document()->settings()->needsSiteSpecificQuirks()) {
+ // If we're loading a stylesheet cross-origin, and the MIME type is not
+ // standard, require the CSS to at least start with a syntactically
+ // valid CSS rule.
+ // This prevents an attacker playing games by injecting CSS strings into
+ // HTML, XML, JSON, etc. etc.
+ if (!document()->securityOrigin()->canRequest(baseURL))
+ crossOriginCSS = true;
+
+ if (crossOriginCSS && !validMIMEType && !m_sheet->hasSyntacticallyValidCSSHeader())
+ m_sheet = CSSStyleSheet::create(this, href, baseURL, charset);
+
+ if (strictParsing && needsSiteSpecificQuirks) {
// Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>.
DEFINE_STATIC_LOCAL(const String, slashKHTMLFixesDotCss, ("/KHTMLFixes.css"));
DEFINE_STATIC_LOCAL(const String, mediaWikiKHTMLFixesStyleSheet, ("/* KHTML fix stylesheet */\n/* work around the horizontal scrollbars */\n#column-content { margin-left: 0; }\n\n"));
// There are two variants of KHTMLFixes.css. One is equal to mediaWikiKHTMLFixesStyleSheet,
// while the other lacks the second trailing newline.
- if (url.endsWith(slashKHTMLFixesDotCss) && !sheetText.isNull() && mediaWikiKHTMLFixesStyleSheet.startsWith(sheetText)
+ if (baseURL.string().endsWith(slashKHTMLFixesDotCss) && !sheetText.isNull() && mediaWikiKHTMLFixesStyleSheet.startsWith(sheetText)
&& sheetText.length() >= mediaWikiKHTMLFixesStyleSheet.length() - 1) {
ASSERT(m_sheet->length() == 1);
ExceptionCode ec;
diff --git a/WebCore/html/HTMLLinkElement.h b/WebCore/html/HTMLLinkElement.h
index e1b5171..324c244 100644
--- a/WebCore/html/HTMLLinkElement.h
+++ b/WebCore/html/HTMLLinkElement.h
@@ -79,7 +79,7 @@ public:
virtual void removedFromDocument();
// from CachedResourceClient
- virtual void setCSSStyleSheet(const String &url, const String& charset, const CachedCSSStyleSheet* sheet);
+ virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet);
bool isLoading() const;
virtual bool sheetLoaded();
diff --git a/WebCore/html/HTMLLinkElement.idl b/WebCore/html/HTMLLinkElement.idl
index 98de809..dc700df 100644
--- a/WebCore/html/HTMLLinkElement.idl
+++ b/WebCore/html/HTMLLinkElement.idl
@@ -20,11 +20,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=a9e9ef29-f20b-429d-848e-e5dadd32694a,
- ImplementationUUID=2d9b944e-88e3-451a-8640-06c593c339a8
- ] HTMLLinkElement : HTMLElement {
+ interface HTMLLinkElement : HTMLElement {
attribute boolean disabled;
attribute [ConvertNullToNullString] DOMString charset;
attribute [ConvertNullToNullString] DOMString href;
@@ -35,10 +31,8 @@ module html {
attribute [ConvertNullToNullString] DOMString target;
attribute [ConvertNullToNullString] DOMString type;
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
// DOM Level 2 Style
readonly attribute StyleSheet sheet;
-#endif
#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
// Objective-C extension:
diff --git a/WebCore/html/HTMLMapElement.cpp b/WebCore/html/HTMLMapElement.cpp
index 90204e0..9617afc 100644
--- a/WebCore/html/HTMLMapElement.cpp
+++ b/WebCore/html/HTMLMapElement.cpp
@@ -25,10 +25,12 @@
#include "Document.h"
#include "HTMLAreaElement.h"
#include "HTMLCollection.h"
+#include "HTMLImageElement.h"
#include "HTMLNames.h"
#include "HitTestResult.h"
#include "IntSize.h"
#include "MappedAttribute.h"
+#include "RenderObject.h"
using namespace std;
@@ -75,12 +77,30 @@ bool HTMLMapElement::mapMouseEvent(int x, int y, const IntSize& size, HitTestRes
return defaultArea;
}
+HTMLImageElement* HTMLMapElement::imageElement() const
+{
+ RefPtr<HTMLCollection> coll = renderer()->document()->images();
+ for (Node* curr = coll->firstItem(); curr; curr = coll->nextItem()) {
+ if (!curr->hasTagName(imgTag))
+ continue;
+
+ // The HTMLImageElement's useMap() value includes the '#' symbol at the beginning,
+ // which has to be stripped off.
+ HTMLImageElement* imageElement = static_cast<HTMLImageElement*>(curr);
+ String useMapName = imageElement->getAttribute(usemapAttr).string().substring(1);
+ if (equalIgnoringCase(useMapName, m_name))
+ return imageElement;
+ }
+
+ return 0;
+}
+
void HTMLMapElement::parseMappedAttribute(MappedAttribute* attr)
{
const QualifiedName& attrName = attr->name();
- if (attrName == idAttr || attrName == nameAttr) {
+ if (attrName == idAttributeName() || attrName == nameAttr) {
Document* doc = document();
- if (attrName == idAttr) {
+ if (attrName == idAttributeName()) {
// Call base class so that hasID bit gets set.
HTMLElement::parseMappedAttribute(attr);
if (doc->isHTMLDocument())
diff --git a/WebCore/html/HTMLMapElement.h b/WebCore/html/HTMLMapElement.h
index 2a6eb8d..f40e78e 100644
--- a/WebCore/html/HTMLMapElement.h
+++ b/WebCore/html/HTMLMapElement.h
@@ -29,7 +29,8 @@ namespace WebCore {
class IntSize;
class HitTestResult;
-
+class HTMLImageElement;
+
class HTMLMapElement : public HTMLElement {
public:
HTMLMapElement(const QualifiedName&, Document*);
@@ -44,7 +45,8 @@ public:
virtual void parseMappedAttribute(MappedAttribute*);
bool mapMouseEvent(int x, int y, const IntSize&, HitTestResult&);
-
+
+ HTMLImageElement* imageElement() const;
PassRefPtr<HTMLCollection> areas();
String name() const;
diff --git a/WebCore/html/HTMLMapElement.idl b/WebCore/html/HTMLMapElement.idl
index 9d5db47..1a760d1 100644
--- a/WebCore/html/HTMLMapElement.idl
+++ b/WebCore/html/HTMLMapElement.idl
@@ -20,11 +20,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=8a660b48-4beb-4f9e-855b-e04131eb2519,
- ImplementationUUID=7ad57e02-91e5-4761-a1ca-e967188e5e0d
- ] HTMLMapElement : HTMLElement {
+ interface HTMLMapElement : HTMLElement {
readonly attribute HTMLCollection areas;
attribute [ConvertNullToNullString] DOMString name;
};
diff --git a/WebCore/html/HTMLMarqueeElement.cpp b/WebCore/html/HTMLMarqueeElement.cpp
index 0cb6501..7c16f16 100644
--- a/WebCore/html/HTMLMarqueeElement.cpp
+++ b/WebCore/html/HTMLMarqueeElement.cpp
@@ -112,14 +112,14 @@ void HTMLMarqueeElement::parseMappedAttribute(MappedAttribute *attr)
void HTMLMarqueeElement::start()
{
- if (renderer() && renderer()->hasLayer() && renderBox()->layer()->marquee())
- renderBox()->layer()->marquee()->start();
+ if (RenderMarquee* marqueeRenderer = renderMarquee())
+ marqueeRenderer->start();
}
void HTMLMarqueeElement::stop()
{
- if (renderer() && renderer()->hasLayer() && renderBox()->layer()->marquee())
- renderBox()->layer()->marquee()->stop();
+ if (RenderMarquee* marqueeRenderer = renderMarquee())
+ marqueeRenderer->stop();
}
bool HTMLMarqueeElement::canSuspend() const
@@ -129,14 +129,21 @@ bool HTMLMarqueeElement::canSuspend() const
void HTMLMarqueeElement::suspend()
{
- if (renderer() && renderer()->hasLayer() && renderBox()->layer()->marquee())
- renderBox()->layer()->marquee()->suspend();
+ if (RenderMarquee* marqueeRenderer = renderMarquee())
+ marqueeRenderer->suspend();
}
-
+
void HTMLMarqueeElement::resume()
{
- if (renderer() && renderer()->hasLayer() && renderBox()->layer()->marquee())
- renderBox()->layer()->marquee()->updateMarqueePosition();
+ if (RenderMarquee* marqueeRenderer = renderMarquee())
+ marqueeRenderer->updateMarqueePosition();
+}
+
+RenderMarquee* HTMLMarqueeElement::renderMarquee() const
+{
+ if (renderer() && renderer()->hasLayer())
+ return renderBoxModelObject()->layer()->marquee();
+ return 0;
}
} // namespace WebCore
diff --git a/WebCore/html/HTMLMarqueeElement.h b/WebCore/html/HTMLMarqueeElement.h
index 2423fc6..9100e8f 100644
--- a/WebCore/html/HTMLMarqueeElement.h
+++ b/WebCore/html/HTMLMarqueeElement.h
@@ -28,6 +28,8 @@
namespace WebCore {
+class RenderMarquee;
+
class HTMLMarqueeElement : public HTMLElement, private ActiveDOMObject {
public:
HTMLMarqueeElement(const QualifiedName&, Document*);
@@ -51,6 +53,8 @@ private:
virtual void suspend();
virtual void resume();
+ RenderMarquee* renderMarquee() const;
+
int m_minimumDelay;
};
diff --git a/WebCore/html/HTMLMarqueeElement.idl b/WebCore/html/HTMLMarqueeElement.idl
index eca53db..3659f81 100644
--- a/WebCore/html/HTMLMarqueeElement.idl
+++ b/WebCore/html/HTMLMarqueeElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=100ca673-eb1e-40b6-8cba-a15abc4cd590,
- ImplementationUUID=b9427505-1f10-4299-8b85-4e2891428988
- ] HTMLMarqueeElement : HTMLElement {
+ interface HTMLMarqueeElement : HTMLElement {
void start();
void stop();
diff --git a/WebCore/html/HTMLMediaElement.cpp b/WebCore/html/HTMLMediaElement.cpp
index 30f762a..5cd0157 100644
--- a/WebCore/html/HTMLMediaElement.cpp
+++ b/WebCore/html/HTMLMediaElement.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 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
@@ -28,9 +28,10 @@
#if ENABLE(VIDEO)
#include "HTMLMediaElement.h"
+#include "Chrome.h"
+#include "ChromeClient.h"
#include "ClientRect.h"
#include "ClientRectList.h"
-#include "ChromeClient.h"
#include "CSSHelper.h"
#include "CSSPropertyNames.h"
#include "CSSValueKeywords.h"
@@ -55,7 +56,6 @@
#include "MediaPlayer.h"
#include "MediaQueryEvaluator.h"
#include "Page.h"
-#include "ProgressEvent.h"
#include "RenderVideo.h"
#include "RenderView.h"
#include "ScriptEventListener.h"
@@ -132,6 +132,21 @@ HTMLMediaElement::~HTMLMediaElement()
document()->unregisterForMediaVolumeCallbacks(this);
}
+void HTMLMediaElement::willMoveToNewOwnerDocument()
+{
+ document()->unregisterForDocumentActivationCallbacks(this);
+ document()->unregisterForMediaVolumeCallbacks(this);
+ HTMLElement::willMoveToNewOwnerDocument();
+}
+
+void HTMLMediaElement::didMoveToNewOwnerDocument()
+{
+ document()->registerForDocumentActivationCallbacks(this);
+ document()->registerForMediaVolumeCallbacks(this);
+ HTMLElement::didMoveToNewOwnerDocument();
+}
+
+
bool HTMLMediaElement::checkDTD(const Node* newChild)
{
return newChild->hasTagName(sourceTag) || HTMLElement::checkDTD(newChild);
@@ -239,7 +254,7 @@ bool HTMLMediaElement::rendererIsNeeded(RenderStyle* style)
RenderObject* HTMLMediaElement::createRenderer(RenderArena* arena, RenderStyle*)
{
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
- return new (arena) RenderPartObject(this);
+ return new (arena) RenderEmbeddedObject(this);
#else
return new (arena) RenderMedia(this);
#endif
@@ -299,12 +314,7 @@ void HTMLMediaElement::scheduleNextSourceChild()
void HTMLMediaElement::scheduleEvent(const AtomicString& eventName)
{
- enqueueEvent(Event::create(eventName, false, true));
-}
-
-void HTMLMediaElement::enqueueEvent(RefPtr<Event> event)
-{
- m_pendingEvents.append(event);
+ m_pendingEvents.append(Event::create(eventName, false, true));
if (!m_asyncEventTimer.isActive())
m_asyncEventTimer.startOneShot(0);
}
@@ -439,38 +449,19 @@ void HTMLMediaElement::prepareForLoad()
void HTMLMediaElement::loadInternal()
{
- // 1 - If the load() method for this element is already being invoked, then abort these steps.
+ // If the load() method for this element is already being invoked, then abort these steps.
if (m_processingLoad)
return;
m_processingLoad = true;
- // Steps 2 and 3 were done in prepareForLoad()
-
- // 4 - If the media element's networkState is set to NETWORK_LOADING or NETWORK_IDLE, set
- // the error attribute to a new MediaError object whose code attribute is set to
- // MEDIA_ERR_ABORTED, fire a progress event called abort at the media element, in the
- // context of the fetching process that is in progress for the element.
- if (m_networkState == NETWORK_LOADING || m_networkState == NETWORK_IDLE) {
- m_error = MediaError::create(MediaError::MEDIA_ERR_ABORTED);
-
- // fire synchronous 'abort'
- bool totalKnown = m_player && m_player->totalBytesKnown();
- unsigned loaded = m_player ? m_player->bytesLoaded() : 0;
- unsigned total = m_player ? m_player->totalBytes() : 0;
- dispatchEvent(ProgressEvent::create(eventNames().abortEvent, totalKnown, loaded, total));
- }
+ // Steps 1 and 2 were done in prepareForLoad()
- // 5
- m_error = 0;
- m_autoplaying = true;
- m_playedTimeRanges = TimeRanges::create();
- m_lastSeekTime = 0;
- m_closedCaptionsVisible = false;
+ // 3 - If the media element's networkState is set to NETWORK_LOADING or NETWORK_IDLE, queue
+ // a task to fire a simple event named abort at the media element.
+ if (m_networkState == NETWORK_LOADING || m_networkState == NETWORK_IDLE)
+ scheduleEvent(eventNames().abortEvent);
- // 6
- setPlaybackRate(defaultPlaybackRate());
-
- // 7
+ // 4
if (m_networkState != NETWORK_EMPTY) {
m_networkState = NETWORK_EMPTY;
m_readyState = HAVE_NOTHING;
@@ -481,9 +472,21 @@ void HTMLMediaElement::loadInternal()
m_playing = false;
m_player->seek(0);
}
- dispatchEvent(Event::create(eventNames().emptiedEvent, false, true));
+ scheduleEvent(eventNames().emptiedEvent);
}
+ // 5 - Set the playbackRate attribute to the value of the defaultPlaybackRate attribute.
+ setPlaybackRate(defaultPlaybackRate());
+
+ // 6 - Set the error attribute to null and the autoplaying flag to true.
+ m_error = 0;
+ m_autoplaying = true;
+
+ m_playedTimeRanges = TimeRanges::create();
+ m_lastSeekTime = 0;
+ m_closedCaptionsVisible = false;
+
+ // 7 - Invoke the media element's resource selection algorithm.
selectMediaResource();
m_processingLoad = false;
}
@@ -495,15 +498,24 @@ void HTMLMediaElement::selectMediaResource()
// 2 - Asynchronously await a stable state.
- // 3 - If the media element has neither a src attribute nor any source element children, run these substeps
+ // 3 - ... the media element has neither a src attribute ...
String mediaSrc = getAttribute(srcAttr);
- if (!mediaSrc && !havePotentialSourceChild()) {
- m_loadState = WaitingForSource;
+ if (!mediaSrc) {
+ // ... nor a source element child: ...
+ Node* node;
+ for (node = firstChild(); node; node = node->nextSibling()) {
+ if (node->hasTagName(sourceTag))
+ break;
+ }
- // 1 - Set the networkState to NETWORK_EMPTY and abort these steps
- m_networkState = NETWORK_EMPTY;
- ASSERT(!m_delayingTheLoadEvent);
- return;
+ if (!node) {
+ m_loadState = WaitingForSource;
+
+ // ... set the networkState to NETWORK_EMPTY, and abort these steps
+ m_networkState = NETWORK_EMPTY;
+ ASSERT(!m_delayingTheLoadEvent);
+ return;
+ }
}
// 4
@@ -536,9 +548,7 @@ void HTMLMediaElement::loadNextSourceChild()
ContentType contentType("");
KURL mediaURL = selectNextSourceChild(&contentType, Complain);
if (!mediaURL.isValid()) {
- // It seems wrong to fail silently when we give up because no suitable <source>
- // element can be found and set the error attribute if the element's 'src' attribute
- // fails, but that is what the spec says.
+ waitForSourceChange();
return;
}
@@ -576,6 +586,7 @@ void HTMLMediaElement::loadResource(const KURL& initialURL, ContentType& content
m_player = MediaPlayer::create(this);
#endif
+ m_player->setAutobuffer(autobuffer());
m_player->setPreservesPitch(m_webkitPreservesPitch);
updateVolume();
@@ -617,6 +628,18 @@ void HTMLMediaElement::startProgressEventTimer()
m_progressEventTimer.startRepeating(0.350);
}
+void HTMLMediaElement::waitForSourceChange()
+{
+ stopPeriodicTimers();
+ m_loadState = WaitingForSource;
+
+ // 6.17 - Waiting: Set the element's networkState attribute to the NETWORK_NO_SOURCE value
+ 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;
+}
+
void HTMLMediaElement::noneSupported()
{
stopPeriodicTimers();
@@ -707,6 +730,9 @@ void HTMLMediaElement::setNetworkState(MediaPlayer::NetworkState state)
m_currentSourceNode->scheduleErrorEvent();
if (havePotentialSourceChild())
scheduleNextSourceChild();
+ else
+ waitForSourceChange();
+
return;
}
@@ -818,6 +844,8 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state)
m_player->seek(0);
}
+ bool shouldUpdatePosterImage = 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
@@ -825,6 +853,7 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state)
// 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;
+ shouldUpdatePosterImage = true;
scheduleEvent(eventNames().loadeddataEvent);
}
@@ -833,9 +862,7 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state)
scheduleEvent(eventNames().canplayEvent);
if (isPotentiallyPlaying)
scheduleEvent(eventNames().playingEvent);
-
- if (isVideo())
- static_cast<HTMLVideoElement*>(this)->updatePosterImage();
+ shouldUpdatePosterImage = true;
}
if (m_readyState == HAVE_ENOUGH_DATA && oldState < HAVE_ENOUGH_DATA) {
@@ -853,10 +880,12 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state)
scheduleEvent(eventNames().playingEvent);
}
- if (isVideo())
- static_cast<HTMLVideoElement*>(this)->updatePosterImage();
+ shouldUpdatePosterImage = true;
}
+ if (shouldUpdatePosterImage && isVideo())
+ static_cast<HTMLVideoElement*>(this)->updatePosterImage();
+
updatePlayState();
}
@@ -1065,7 +1094,10 @@ void HTMLMediaElement::setWebkitPreservesPitch(bool preservesPitch)
bool HTMLMediaElement::ended() const
{
- return endedPlayback();
+ // 4.8.10.8 Playing the media resource
+ // The ended attribute must return true if the media element has ended
+ // playback and the direction of playback is forwards, and false otherwise.
+ return endedPlayback() && m_playbackRate > 0;
}
bool HTMLMediaElement::autoplay() const
@@ -1164,7 +1196,7 @@ bool HTMLMediaElement::controls() const
Frame* frame = document()->frame();
// always show controls when scripting is disabled
- if (frame && !frame->script()->isEnabled())
+ if (frame && !frame->script()->canExecuteScripts())
return true;
return hasAttribute(controlsAttr);
@@ -1379,10 +1411,14 @@ void HTMLMediaElement::mediaPlayerTimeChanged(MediaPlayer*)
{
beginProcessingMediaPlayerCallback();
+ // Always call scheduleTimeupdateEvent when the media engine reports a time discontinuity,
+ // it will only queue a 'timeupdate' event if we haven't already posted one at the current
+ // movie time.
+ scheduleTimeupdateEvent(false);
+
// 4.8.10.10 step 12 & 13. Needed if no ReadyState change is associated with the seek.
- if (m_readyState >= HAVE_CURRENT_DATA && m_seeking) {
+ if (m_readyState >= HAVE_CURRENT_DATA && m_seeking)
finishSeek();
- }
float now = currentTime();
float dur = duration();
@@ -1394,7 +1430,6 @@ void HTMLMediaElement::mediaPlayerTimeChanged(MediaPlayer*)
} else {
if (!m_sentEndEvent) {
m_sentEndEvent = true;
- scheduleTimeupdateEvent(false);
scheduleEvent(eventNames().endedEvent);
}
}
@@ -1525,11 +1560,29 @@ bool HTMLMediaElement::couldPlayIfEnoughData() const
bool HTMLMediaElement::endedPlayback() const
{
- if (!m_player || m_readyState < HAVE_METADATA)
+ float dur = duration();
+ if (!m_player || isnan(dur))
+ return false;
+
+ // 4.8.10.8 Playing the media resource
+
+ // A media element is said to have ended playback when the element's
+ // readyState attribute is HAVE_METADATA or greater,
+ if (m_readyState < HAVE_METADATA)
return false;
- float dur = duration();
- return !isnan(dur) && currentTime() >= dur && !loop();
+ // and the current playback position is the end of the media resource and the direction
+ // of playback is forwards and the media element does not have a loop attribute specified,
+ float now = currentTime();
+ if (m_playbackRate > 0)
+ return now >= dur && !loop();
+
+ // or the current playback position is the earliest possible position and the direction
+ // of playback is backwards
+ if (m_playbackRate < 0)
+ return now <= 0;
+
+ return false;
}
bool HTMLMediaElement::stoppedDueToErrors() const
@@ -1777,7 +1830,7 @@ void HTMLMediaElement::finishParsingChildren()
document()->updateStyleIfNeeded();
if (m_needWidgetUpdate && renderer())
- toRenderPartObject(renderer())->updateWidget(true);
+ toRenderEmbeddedObject(renderer())->updateWidget(true);
}
#endif
diff --git a/WebCore/html/HTMLMediaElement.h b/WebCore/html/HTMLMediaElement.h
index bc39dd7..9ee2c25 100644
--- a/WebCore/html/HTMLMediaElement.h
+++ b/WebCore/html/HTMLMediaElement.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 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
@@ -187,7 +187,10 @@ protected:
void setReadyState(MediaPlayer::ReadyState);
void setNetworkState(MediaPlayer::NetworkState);
-
+
+ virtual void willMoveToNewOwnerDocument();
+ virtual void didMoveToNewOwnerDocument();
+
private: // MediaPlayerClient
virtual void mediaPlayerNetworkStateChanged(MediaPlayer*);
virtual void mediaPlayerReadyStateChanged(MediaPlayer*);
@@ -219,7 +222,6 @@ private:
void scheduleTimeupdateEvent(bool periodicEvent);
void scheduleEvent(const AtomicString& eventName);
- void enqueueEvent(RefPtr<Event> event);
// loading
void selectMediaResource();
@@ -231,6 +233,7 @@ private:
void noneSupported();
void mediaEngineError(PassRefPtr<MediaError> err);
void cancelPendingEventsAndCallbacks();
+ void waitForSourceChange();
enum InvalidSourceAction { DoNothing, Complain };
bool isSafeToLoadURL(const KURL&, InvalidSourceAction);
diff --git a/WebCore/html/HTMLMediaElement.idl b/WebCore/html/HTMLMediaElement.idl
index e418a63..1097e55 100644
--- a/WebCore/html/HTMLMediaElement.idl
+++ b/WebCore/html/HTMLMediaElement.idl
@@ -24,7 +24,7 @@
*/
module html {
-interface [GenerateConstructor, Conditional=VIDEO] HTMLMediaElement : HTMLElement {
+interface [Conditional=VIDEO] HTMLMediaElement : HTMLElement {
// error state
readonly attribute MediaError error;
diff --git a/WebCore/html/HTMLMenuElement.idl b/WebCore/html/HTMLMenuElement.idl
index 4c2701a..238263a 100644
--- a/WebCore/html/HTMLMenuElement.idl
+++ b/WebCore/html/HTMLMenuElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=fb353af6-4927-4512-ad43-4ad8191b5615,
- ImplementationUUID=ec26257c-a2a4-43dc-b234-cf644d22b1fb
- ] HTMLMenuElement : HTMLElement {
+ interface HTMLMenuElement : HTMLElement {
attribute boolean compact;
};
diff --git a/WebCore/html/HTMLMetaElement.idl b/WebCore/html/HTMLMetaElement.idl
index 2c350c9..ef7e4ab 100644
--- a/WebCore/html/HTMLMetaElement.idl
+++ b/WebCore/html/HTMLMetaElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=65e3374d-4789-4c81-983b-1b5a29d2c075,
- ImplementationUUID=a9ac9c73-055d-4c00-bd02-1fa215ae32f1
- ] HTMLMetaElement : HTMLElement {
+ interface HTMLMetaElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString content;
attribute [ConvertNullToNullString] DOMString httpEquiv;
attribute [ConvertNullToNullString] DOMString name;
diff --git a/WebCore/html/HTMLModElement.idl b/WebCore/html/HTMLModElement.idl
index a22b7b4..a6e3a02 100644
--- a/WebCore/html/HTMLModElement.idl
+++ b/WebCore/html/HTMLModElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=78c2bf89-c6e7-4d81-97df-429d07b91ff8,
- ImplementationUUID=39e7c659-40be-4620-949b-15ec6a25bb90
- ] HTMLModElement : HTMLElement {
+ interface HTMLModElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString cite;
attribute [ConvertNullToNullString] DOMString dateTime;
};
diff --git a/WebCore/html/HTMLNameCollection.cpp b/WebCore/html/HTMLNameCollection.cpp
index d5657da..eb88c02 100644
--- a/WebCore/html/HTMLNameCollection.cpp
+++ b/WebCore/html/HTMLNameCollection.cpp
@@ -63,7 +63,7 @@ Element* HTMLNameCollection::itemAfter(Element* previous) const
e->hasTagName(objectTag))
if (e->getAttribute(nameAttr) == m_name)
return e;
- if (e->getAttribute(idAttr) == m_name)
+ if (e->getAttribute(e->idAttributeName()) == m_name)
return e;
break;
case DocumentNamedItems:
@@ -74,14 +74,14 @@ Element* HTMLNameCollection::itemAfter(Element* previous) const
if (e->getAttribute(nameAttr) == m_name)
return e;
} else if (e->hasTagName(appletTag)) {
- if (e->getAttribute(nameAttr) == m_name || e->getAttribute(idAttr) == m_name)
+ if (e->getAttribute(nameAttr) == m_name || e->getAttribute(e->idAttributeName()) == m_name)
return e;
} else if (e->hasTagName(objectTag)) {
- if ((e->getAttribute(nameAttr) == m_name || e->getAttribute(idAttr) == m_name)
+ if ((e->getAttribute(nameAttr) == m_name || e->getAttribute(e->idAttributeName()) == m_name)
&& static_cast<HTMLObjectElement*>(e)->isDocNamedItem())
return e;
} else if (e->hasTagName(imgTag)) {
- if (e->getAttribute(nameAttr) == m_name || (e->getAttribute(idAttr) == m_name && e->hasAttribute(nameAttr)))
+ if (e->getAttribute(nameAttr) == m_name || (e->getAttribute(e->idAttributeName()) == m_name && e->hasAttribute(nameAttr)))
return e;
}
break;
diff --git a/WebCore/html/HTMLOListElement.idl b/WebCore/html/HTMLOListElement.idl
index d787ee7..32d81f2 100644
--- a/WebCore/html/HTMLOListElement.idl
+++ b/WebCore/html/HTMLOListElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=64165a4c-8889-4725-a149-abd13d5b4b61,
- ImplementationUUID=a20e9b6a-e3a5-4276-aa43-0097e57df8d8
- ] HTMLOListElement : HTMLElement {
+ interface HTMLOListElement : HTMLElement {
attribute boolean compact;
attribute long start;
attribute [ConvertNullToNullString] DOMString type;
diff --git a/WebCore/html/HTMLObjectElement.cpp b/WebCore/html/HTMLObjectElement.cpp
index d3ccfa4..80a5efa 100644
--- a/WebCore/html/HTMLObjectElement.cpp
+++ b/WebCore/html/HTMLObjectElement.cpp
@@ -35,8 +35,8 @@
#include "ScriptEventListener.h"
#include "MIMETypeRegistry.h"
#include "MappedAttribute.h"
+#include "RenderEmbeddedObject.h"
#include "RenderImage.h"
-#include "RenderPartObject.h"
#include "RenderWidget.h"
#include "ScriptController.h"
#include "Text.h"
@@ -107,7 +107,7 @@ void HTMLObjectElement::parseMappedAttribute(MappedAttribute *attr)
document->addNamedItem(newName);
}
m_name = newName;
- } else if (attr->name() == idAttr) {
+ } else if (attr->name() == idAttributeName()) {
const AtomicString& newId = attr->value();
if (isDocNamedItem() && inDocument() && document()->isHTMLDocument()) {
HTMLDocument* document = static_cast<HTMLDocument*>(this->document());
@@ -140,7 +140,7 @@ RenderObject *HTMLObjectElement::createRenderer(RenderArena* arena, RenderStyle*
return RenderObject::createObject(this, style);
if (isImageType())
return new (arena) RenderImage(this);
- return new (arena) RenderPartObject(this);
+ return new (arena) RenderEmbeddedObject(this);
}
void HTMLObjectElement::attach()
@@ -169,7 +169,7 @@ void HTMLObjectElement::updateWidget()
{
document()->updateStyleIfNeeded();
if (m_needWidgetUpdate && renderer() && !m_useFallbackContent && !isImageType())
- toRenderPartObject(renderer())->updateWidget(true);
+ toRenderEmbeddedObject(renderer())->updateWidget(true);
}
void HTMLObjectElement::finishParsingChildren()
diff --git a/WebCore/html/HTMLObjectElement.idl b/WebCore/html/HTMLObjectElement.idl
index b51c568..8d975ba 100644
--- a/WebCore/html/HTMLObjectElement.idl
+++ b/WebCore/html/HTMLObjectElement.idl
@@ -21,13 +21,10 @@
module html {
interface [
- GenerateConstructor,
DelegatingPutFunction,
DelegatingGetOwnPropertySlot,
CustomCall,
- HasOverridingNameGetter,
- InterfaceUUID=9d04a3b8-9016-4b64-913a-3b00d548aca7,
- ImplementationUUID=2dd24554-6784-4ef9-9713-179f3d37b2f9
+ HasOverridingNameGetter
] HTMLObjectElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute [ConvertNullToNullString, Reflect] DOMString code;
@@ -51,14 +48,12 @@ module html {
// Introduced in DOM Level 2:
readonly attribute [CheckFrameSecurity] Document contentDocument;
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
#if defined(ENABLE_SVG) && ENABLE_SVG
#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C || defined(ENABLE_SVG_DOM_OBJC_BINDINGS) && ENABLE_SVG_DOM_OBJC_BINDINGS
[SVGCheckSecurityDocument] SVGDocument getSVGDocument()
raises(DOMException);
#endif
#endif
-#endif
#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
// Objective-C extension:
diff --git a/WebCore/html/HTMLOptGroupElement.idl b/WebCore/html/HTMLOptGroupElement.idl
index 9f07c38..691bd13 100644
--- a/WebCore/html/HTMLOptGroupElement.idl
+++ b/WebCore/html/HTMLOptGroupElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=18b0ea8c-d3ea-4b14-abd8-8e1d4269fffc,
- ImplementationUUID=e26d8c4b-5181-4858-8231-f68ccbf819df
- ] HTMLOptGroupElement : HTMLElement {
+ interface HTMLOptGroupElement : HTMLElement {
attribute boolean disabled;
attribute [ConvertNullToNullString] DOMString label;
};
diff --git a/WebCore/html/HTMLOptionElement.cpp b/WebCore/html/HTMLOptionElement.cpp
index 501615f..cab4e18 100644
--- a/WebCore/html/HTMLOptionElement.cpp
+++ b/WebCore/html/HTMLOptionElement.cpp
@@ -137,6 +137,8 @@ void HTMLOptionElement::setValue(const String& value)
bool HTMLOptionElement::selected() const
{
+ if (HTMLSelectElement* select = ownerSelectElement())
+ select->recalcListItemsIfNeeded();
return m_data.selected();
}
@@ -217,14 +219,15 @@ String HTMLOptionElement::textIndentedToRespectGroupLabel() const
bool HTMLOptionElement::disabled() const
{
- return HTMLFormControlElement::disabled() || (parentNode() && static_cast<HTMLFormControlElement*>(parentNode())->disabled());
+ return ownElementDisabled() || (parentNode() && static_cast<HTMLFormControlElement*>(parentNode())->disabled());
}
void HTMLOptionElement::insertedIntoTree(bool deep)
{
if (HTMLSelectElement* select = ownerSelectElement()) {
select->setRecalcListItems();
- if (selected())
+ // Avoid our selected() getter since it will recalculate list items incorrectly for us.
+ if (m_data.selected())
select->setSelectedIndex(index(), false);
select->scrollToSelection();
}
diff --git a/WebCore/html/HTMLOptionElement.h b/WebCore/html/HTMLOptionElement.h
index 843608f..7be9e9a 100644
--- a/WebCore/html/HTMLOptionElement.h
+++ b/WebCore/html/HTMLOptionElement.h
@@ -76,6 +76,7 @@ public:
virtual String textIndentedToRespectGroupLabel() const;
+ bool ownElementDisabled() const { return HTMLFormControlElement::disabled(); }
virtual bool disabled() const;
virtual void insertedIntoTree(bool);
diff --git a/WebCore/html/HTMLOptionElement.idl b/WebCore/html/HTMLOptionElement.idl
index 612d459..c43132e 100644
--- a/WebCore/html/HTMLOptionElement.idl
+++ b/WebCore/html/HTMLOptionElement.idl
@@ -21,10 +21,7 @@
module html {
interface [
- GenerateConstructor,
- GenerateNativeConverter,
- InterfaceUUID=74a7b64a-cf18-4da9-b3aa-e1f4d245d607,
- ImplementationUUID=166915d5-2c93-404b-b076-af3fa5ccbd83
+ GenerateNativeConverter
] HTMLOptionElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute boolean defaultSelected;
diff --git a/WebCore/html/HTMLOptionsCollection.idl b/WebCore/html/HTMLOptionsCollection.idl
index a7e191a..d9bfd45 100644
--- a/WebCore/html/HTMLOptionsCollection.idl
+++ b/WebCore/html/HTMLOptionsCollection.idl
@@ -23,9 +23,7 @@ module html {
// FIXME: The W3C spec says that HTMLOptionsCollection should not have a parent class.
interface [
GenerateNativeConverter,
- HasCustomIndexSetter,
- InterfaceUUID=a03aaeac-e47d-4bb3-acb4-f1897ae74237,
- ImplementationUUID=99c11fde-6f9f-44a4-a041-49a894c52e70
+ HasCustomIndexSetter
] HTMLOptionsCollection : HTMLCollection {
attribute long selectedIndex;
attribute [Custom] unsigned long length
diff --git a/WebCore/html/HTMLParagraphElement.idl b/WebCore/html/HTMLParagraphElement.idl
index b974ec2..cd3b940 100644
--- a/WebCore/html/HTMLParagraphElement.idl
+++ b/WebCore/html/HTMLParagraphElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=dffe0809-f3f8-499d-8d5c-7d9893f23337,
- ImplementationUUID=21d60b62-4ecb-4849-8729-0a40c64d12aa
- ] HTMLParagraphElement : HTMLElement {
+ interface HTMLParagraphElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString align;
};
diff --git a/WebCore/html/HTMLParamElement.cpp b/WebCore/html/HTMLParamElement.cpp
index d5fc6e7..2b0637a 100644
--- a/WebCore/html/HTMLParamElement.cpp
+++ b/WebCore/html/HTMLParamElement.cpp
@@ -43,7 +43,7 @@ HTMLParamElement::~HTMLParamElement()
void HTMLParamElement::parseMappedAttribute(MappedAttribute* attr)
{
- if (attr->name() == idAttr) {
+ if (attr->name() == idAttributeName()) {
// Must call base class so that hasID bit gets set.
HTMLElement::parseMappedAttribute(attr);
if (document()->isHTMLDocument())
diff --git a/WebCore/html/HTMLParamElement.idl b/WebCore/html/HTMLParamElement.idl
index 805d170..2473381 100644
--- a/WebCore/html/HTMLParamElement.idl
+++ b/WebCore/html/HTMLParamElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=76e05eee-c30d-4d52-a356-271f17b31dbf,
- ImplementationUUID=418d8a82-0a99-4c6f-a630-1e6071a74350
- ] HTMLParamElement : HTMLElement {
+ interface HTMLParamElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString name;
attribute [ConvertNullToNullString] DOMString type;
attribute [ConvertNullToNullString] DOMString value;
diff --git a/WebCore/html/HTMLParser.cpp b/WebCore/html/HTMLParser.cpp
index f13c19b..644f63e 100644
--- a/WebCore/html/HTMLParser.cpp
+++ b/WebCore/html/HTMLParser.cpp
@@ -28,6 +28,7 @@
#include "CharacterNames.h"
#include "CSSPropertyNames.h"
#include "CSSValueKeywords.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "Comment.h"
#include "Console.h"
@@ -64,6 +65,8 @@ using namespace HTMLNames;
static const unsigned cMaxRedundantTagDepth = 20;
static const unsigned cResidualStyleMaxDepth = 200;
+static const unsigned cResidualStyleIterationLimit = 5;
+
static const int minBlockLevelTagPriority = 3;
@@ -137,11 +140,12 @@ HTMLParser::HTMLParser(HTMLDocument* doc, bool reportErrors)
, m_reportErrors(reportErrors)
, m_handlingResidualStyleAcrossBlocks(false)
, m_inStrayTableContent(0)
+ , m_scriptingPermission(FragmentScriptingAllowed)
, m_parserQuirks(m_document->page() ? m_document->page()->chrome()->client()->createHTMLParserQuirks() : 0)
{
}
-HTMLParser::HTMLParser(DocumentFragment* frag)
+HTMLParser::HTMLParser(DocumentFragment* frag, FragmentScriptingPermission scriptingPermission)
: m_document(frag->document())
, m_current(frag)
, m_didRefCurrent(true)
@@ -155,6 +159,7 @@ HTMLParser::HTMLParser(DocumentFragment* frag)
, m_reportErrors(false)
, m_handlingResidualStyleAcrossBlocks(false)
, m_inStrayTableContent(0)
+ , m_scriptingPermission(scriptingPermission)
, m_parserQuirks(m_document->page() ? m_document->page()->chrome()->client()->createHTMLParserQuirks() : 0)
{
if (frag)
@@ -274,7 +279,8 @@ PassRefPtr<Node> HTMLParser::parseToken(Token* t)
// set attributes
if (n->isHTMLElement()) {
HTMLElement* e = static_cast<HTMLElement*>(n.get());
- e->setAttributeMap(t->attrs.get());
+ if (m_scriptingPermission == FragmentScriptingAllowed || t->tagName != scriptTag)
+ e->setAttributeMap(t->attrs.get(), m_scriptingPermission);
// take care of optional close tags
if (e->endTagRequirement() == TagStatusOptional)
@@ -652,7 +658,7 @@ bool HTMLParser::handleError(Node* n, bool flat, const AtomicString& localName,
reportError(MisplacedContentRetryError, &localName, &currentTagName);
popBlock(objectTag);
handled = true;
- } else if (h->hasLocalName(pTag) || isHeaderTag(currentTagName)) {
+ } else if (h->hasLocalName(pTag) || isHeadingTag(currentTagName)) {
if (!isInline(n)) {
popBlock(currentTagName);
handled = true;
@@ -907,6 +913,8 @@ PassRefPtr<Node> HTMLParser::getNode(Token* t)
if (gFunctionMap.isEmpty()) {
gFunctionMap.set(aTag.localName().impl(), &HTMLParser::nestedCreateErrorCheck);
gFunctionMap.set(addressTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
+ gFunctionMap.set(articleTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
+ gFunctionMap.set(asideTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
gFunctionMap.set(bTag.localName().impl(), &HTMLParser::nestedStyleCreateErrorCheck);
gFunctionMap.set(bigTag.localName().impl(), &HTMLParser::nestedStyleCreateErrorCheck);
gFunctionMap.set(blockquoteTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
@@ -921,6 +929,7 @@ PassRefPtr<Node> HTMLParser::getNode(Token* t)
gFunctionMap.set(dtTag.localName().impl(), &HTMLParser::dtCreateErrorCheck);
gFunctionMap.set(formTag.localName().impl(), &HTMLParser::formCreateErrorCheck);
gFunctionMap.set(fieldsetTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
+ gFunctionMap.set(footerTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
gFunctionMap.set(framesetTag.localName().impl(), &HTMLParser::framesetCreateErrorCheck);
gFunctionMap.set(h1Tag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
gFunctionMap.set(h2Tag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
@@ -929,6 +938,7 @@ PassRefPtr<Node> HTMLParser::getNode(Token* t)
gFunctionMap.set(h5Tag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
gFunctionMap.set(h6Tag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
gFunctionMap.set(headTag.localName().impl(), &HTMLParser::headCreateErrorCheck);
+ gFunctionMap.set(headerTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
gFunctionMap.set(hrTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
gFunctionMap.set(iTag.localName().impl(), &HTMLParser::nestedStyleCreateErrorCheck);
gFunctionMap.set(isindexTag.localName().impl(), &HTMLParser::isindexCreateErrorCheck);
@@ -940,9 +950,7 @@ PassRefPtr<Node> HTMLParser::getNode(Token* t)
gFunctionMap.set(nobrTag.localName().impl(), &HTMLParser::nestedCreateErrorCheck);
gFunctionMap.set(noembedTag.localName().impl(), &HTMLParser::noembedCreateErrorCheck);
gFunctionMap.set(noframesTag.localName().impl(), &HTMLParser::noframesCreateErrorCheck);
-#if !ENABLE(XHTMLMP)
gFunctionMap.set(noscriptTag.localName().impl(), &HTMLParser::noscriptCreateErrorCheck);
-#endif
gFunctionMap.set(olTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
gFunctionMap.set(pTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
gFunctionMap.set(plaintextTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
@@ -950,6 +958,7 @@ PassRefPtr<Node> HTMLParser::getNode(Token* t)
gFunctionMap.set(rpTag.localName().impl(), &HTMLParser::rpCreateErrorCheck);
gFunctionMap.set(rtTag.localName().impl(), &HTMLParser::rtCreateErrorCheck);
gFunctionMap.set(sTag.localName().impl(), &HTMLParser::nestedStyleCreateErrorCheck);
+ gFunctionMap.set(sectionTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck);
gFunctionMap.set(selectTag.localName().impl(), &HTMLParser::selectCreateErrorCheck);
gFunctionMap.set(smallTag.localName().impl(), &HTMLParser::nestedStyleCreateErrorCheck);
gFunctionMap.set(strikeTag.localName().impl(), &HTMLParser::nestedStyleCreateErrorCheck);
@@ -1017,19 +1026,19 @@ void HTMLParser::processCloseTag(Token* t)
}
}
-bool HTMLParser::isHeaderTag(const AtomicString& tagName)
+bool HTMLParser::isHeadingTag(const AtomicString& tagName)
{
- DEFINE_STATIC_LOCAL(HashSet<AtomicStringImpl*>, headerTags, ());
- if (headerTags.isEmpty()) {
- headerTags.add(h1Tag.localName().impl());
- headerTags.add(h2Tag.localName().impl());
- headerTags.add(h3Tag.localName().impl());
- headerTags.add(h4Tag.localName().impl());
- headerTags.add(h5Tag.localName().impl());
- headerTags.add(h6Tag.localName().impl());
+ DEFINE_STATIC_LOCAL(HashSet<AtomicStringImpl*>, headingTags, ());
+ if (headingTags.isEmpty()) {
+ headingTags.add(h1Tag.localName().impl());
+ headingTags.add(h2Tag.localName().impl());
+ headingTags.add(h3Tag.localName().impl());
+ headingTags.add(h4Tag.localName().impl());
+ headingTags.add(h5Tag.localName().impl());
+ headingTags.add(h6Tag.localName().impl());
}
- return headerTags.contains(tagName.impl());
+ return headingTags.contains(tagName.impl());
}
bool HTMLParser::isInline(Node* node) const
@@ -1121,8 +1130,10 @@ void HTMLParser::handleResidualStyleCloseTagAcrossBlocks(HTMLStackElem* elem)
bool finished = false;
bool strayTableContent = elem->strayTableContent;
+ unsigned iterationCount = 0;
+
m_handlingResidualStyleAcrossBlocks = true;
- while (!finished) {
+ while (!finished && (iterationCount++ < cResidualStyleIterationLimit)) {
// Find the outermost element that crosses over to a higher level. If there exists another higher-level
// element, we will do another pass, until we have corrected the innermost one.
ExceptionCode ec = 0;
@@ -1290,7 +1301,8 @@ void HTMLParser::handleResidualStyleCloseTagAcrossBlocks(HTMLStackElem* elem)
prevMaxElem->next = elem;
ASSERT(newNodePtr);
prevMaxElem->node = newNodePtr;
- prevMaxElem->didRefNode = false;
+ newNodePtr->ref();
+ prevMaxElem->didRefNode = true;
} else
delete elem;
}
diff --git a/WebCore/html/HTMLParser.h b/WebCore/html/HTMLParser.h
index f07b64b..acb6a6f 100644
--- a/WebCore/html/HTMLParser.h
+++ b/WebCore/html/HTMLParser.h
@@ -29,6 +29,7 @@
#include <wtf/OwnPtr.h>
#include <wtf/RefPtr.h>
#include "HTMLParserErrorCodes.h"
+#include "MappedAttributeEntry.h"
namespace WebCore {
@@ -52,7 +53,7 @@ struct Token;
class HTMLParser : public Noncopyable {
public:
HTMLParser(HTMLDocument*, bool reportErrors);
- HTMLParser(DocumentFragment*);
+ HTMLParser(DocumentFragment*, FragmentScriptingPermission = FragmentScriptingAllowed);
virtual ~HTMLParser();
/**
@@ -136,8 +137,7 @@ private:
bool allowNestedRedundantTag(const AtomicString& tagName);
- static bool isHeaderTag(const AtomicString& tagName);
- void popNestedHeaderTag();
+ static bool isHeadingTag(const AtomicString& tagName);
bool isInline(Node*) const;
@@ -189,6 +189,7 @@ private:
bool m_reportErrors;
bool m_handlingResidualStyleAcrossBlocks;
int m_inStrayTableContent;
+ FragmentScriptingPermission m_scriptingPermission;
OwnPtr<HTMLParserQuirks> m_parserQuirks;
};
diff --git a/WebCore/html/HTMLPlugInElement.cpp b/WebCore/html/HTMLPlugInElement.cpp
index 9626c83..dafa8fb 100644
--- a/WebCore/html/HTMLPlugInElement.cpp
+++ b/WebCore/html/HTMLPlugInElement.cpp
@@ -45,7 +45,6 @@ namespace WebCore {
using namespace HTMLNames;
HTMLPlugInElement::HTMLPlugInElement(const QualifiedName& tagName, Document* doc)
- // FIXME: Always passing false as createdByParser is odd (see bug22851).
: HTMLFrameOwnerElement(tagName, doc)
#if ENABLE(NETSCAPE_PLUGIN_API)
, m_NPObject(0)
diff --git a/WebCore/html/HTMLPreElement.idl b/WebCore/html/HTMLPreElement.idl
index 5597d95..5dc0e9e 100644
--- a/WebCore/html/HTMLPreElement.idl
+++ b/WebCore/html/HTMLPreElement.idl
@@ -20,11 +20,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=84050abc-45e6-4fd8-bdc3-29c7b4efb5cb,
- ImplementationUUID=e6de0d19-883e-4e87-9569-fd068e5ee17d
- ] HTMLPreElement : HTMLElement {
+ interface HTMLPreElement : HTMLElement {
// FIXME: DOM spec says that width should be of type DOMString
// see http://bugs.webkit.org/show_bug.cgi?id=8992
attribute long width;
diff --git a/WebCore/html/HTMLQuoteElement.idl b/WebCore/html/HTMLQuoteElement.idl
index 99047c4..f95dc20 100644
--- a/WebCore/html/HTMLQuoteElement.idl
+++ b/WebCore/html/HTMLQuoteElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=a011e1a3-19ec-4999-a225-79ebdc64abdd,
- ImplementationUUID=85c885ee-cc47-4d98-852c-fb907d573024
- ] HTMLQuoteElement : HTMLElement {
+ interface HTMLQuoteElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString cite;
};
}
diff --git a/WebCore/html/HTMLScriptElement.idl b/WebCore/html/HTMLScriptElement.idl
index 4a19b8c..8985512 100644
--- a/WebCore/html/HTMLScriptElement.idl
+++ b/WebCore/html/HTMLScriptElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=57ddf4da-1c9b-4005-87d7-eb9b2ed78e95,
- ImplementationUUID=2edb1093-08f1-4e76-9728-df5dedb879fe
- ] HTMLScriptElement : HTMLElement {
+ interface HTMLScriptElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString text;
attribute [ConvertNullToNullString] DOMString htmlFor;
attribute [ConvertNullToNullString] DOMString event;
diff --git a/WebCore/html/HTMLSelectElement.cpp b/WebCore/html/HTMLSelectElement.cpp
index 2409f31..5f5c855 100644
--- a/WebCore/html/HTMLSelectElement.cpp
+++ b/WebCore/html/HTMLSelectElement.cpp
@@ -4,6 +4,7 @@
* (C) 2001 Dirk Mueller (mueller@kde.org)
* Copyright (C) 2004, 2005, 2006, 2007, 2009 Apple Inc. All rights reserved.
* (C) 2006 Alexey Proskuryakov (ap@nypop.com)
+ * 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
@@ -59,7 +60,6 @@ bool HTMLSelectElement::checkDTD(const Node* newChild)
void HTMLSelectElement::recalcStyle(StyleChange change)
{
- SelectElement::recalcStyle(m_data, this);
HTMLFormControlElementWithState::recalcStyle(change);
}
@@ -261,6 +261,12 @@ void HTMLSelectElement::recalcListItems(bool updateSelectedStates) const
SelectElement::recalcListItems(const_cast<SelectElementData&>(m_data), this, updateSelectedStates);
}
+void HTMLSelectElement::recalcListItemsIfNeeded()
+{
+ if (m_data.shouldRecalcListItems())
+ recalcListItems();
+}
+
void HTMLSelectElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
{
setRecalcListItems();
diff --git a/WebCore/html/HTMLSelectElement.h b/WebCore/html/HTMLSelectElement.h
index 8f575d2..0a2050e 100644
--- a/WebCore/html/HTMLSelectElement.h
+++ b/WebCore/html/HTMLSelectElement.h
@@ -3,6 +3,7 @@
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2000 Dirk Mueller (mueller@kde.org)
* Copyright (C) 2004, 2005, 2006, 2007, 2009 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
@@ -58,6 +59,7 @@ public:
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
void setRecalcListItems();
+ void recalcListItemsIfNeeded();
virtual const Vector<Element*>& listItems() const { return m_data.listItems(this); }
@@ -74,7 +76,7 @@ public:
Node* namedItem(const AtomicString& name);
Node* item(unsigned index);
- CollectionCache* collectionInfo() { return &m_collectionInfo; }
+ CollectionCache* collectionInfo() { m_collectionInfo.checkConsistency(); return &m_collectionInfo; }
void scrollToSelection();
diff --git a/WebCore/html/HTMLSelectElement.idl b/WebCore/html/HTMLSelectElement.idl
index ae47896..d260fad 100644
--- a/WebCore/html/HTMLSelectElement.idl
+++ b/WebCore/html/HTMLSelectElement.idl
@@ -22,10 +22,7 @@ module html {
interface [
HasIndexGetter,
- HasCustomIndexSetter,
- GenerateConstructor,
- InterfaceUUID=99013cd3-d644-4bb5-86a3-2e743821383b,
- ImplementationUUID=afe20462-588d-469a-9b4c-8879c4a461d5
+ HasCustomIndexSetter
] HTMLSelectElement : HTMLElement {
readonly attribute DOMString type;
@@ -41,9 +38,7 @@ module html {
#endif
readonly attribute HTMLFormElement form;
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
readonly attribute ValidityState validity;
-#endif
readonly attribute boolean willValidate;
readonly attribute DOMString validationMessage;
boolean checkValidity();
diff --git a/WebCore/html/HTMLSourceElement.idl b/WebCore/html/HTMLSourceElement.idl
index 5a25c23..863e180 100644
--- a/WebCore/html/HTMLSourceElement.idl
+++ b/WebCore/html/HTMLSourceElement.idl
@@ -24,7 +24,7 @@
*/
module html {
-interface [GenerateConstructor, Conditional=VIDEO] HTMLSourceElement : HTMLElement {
+interface [Conditional=VIDEO] HTMLSourceElement : HTMLElement {
attribute DOMString src;
attribute DOMString type;
attribute DOMString media;
diff --git a/WebCore/html/HTMLStyleElement.idl b/WebCore/html/HTMLStyleElement.idl
index a1b86f8..562d01b 100644
--- a/WebCore/html/HTMLStyleElement.idl
+++ b/WebCore/html/HTMLStyleElement.idl
@@ -20,19 +20,13 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=3aaa334c-9660-48cf-b8e2-6d2b4ac0a1da,
- ImplementationUUID=73024a55-b8a1-461b-ad85-befa4089f80d
- ] HTMLStyleElement : HTMLElement {
+ interface HTMLStyleElement : HTMLElement {
attribute boolean disabled;
attribute [ConvertNullToNullString] DOMString media;
attribute [ConvertNullToNullString] DOMString type;
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
// DOM Level 2 Style
readonly attribute StyleSheet sheet;
-#endif
};
}
diff --git a/WebCore/html/HTMLTableCaptionElement.idl b/WebCore/html/HTMLTableCaptionElement.idl
index 9424cd5..86a197f 100644
--- a/WebCore/html/HTMLTableCaptionElement.idl
+++ b/WebCore/html/HTMLTableCaptionElement.idl
@@ -21,10 +21,7 @@
module html {
interface [
- GenerateNativeConverter,
- GenerateConstructor,
- InterfaceUUID=cd92752d-2f0e-44af-b68e-12c178e1f087,
- ImplementationUUID=7c0e3749-0f81-4063-9760-8cec314a5b72
+ GenerateNativeConverter
] HTMLTableCaptionElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString align;
diff --git a/WebCore/html/HTMLTableCellElement.idl b/WebCore/html/HTMLTableCellElement.idl
index c0d22ca..a89149f 100644
--- a/WebCore/html/HTMLTableCellElement.idl
+++ b/WebCore/html/HTMLTableCellElement.idl
@@ -20,11 +20,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=3ad21d30-ce64-4a6f-9296-c07a16170783,
- ImplementationUUID=36fe6075-c9c1-4f22-bbc2-dd440f21f7cf
- ] HTMLTableCellElement : HTMLElement {
+ interface HTMLTableCellElement : HTMLElement {
readonly attribute long cellIndex;
attribute [ConvertNullToNullString] DOMString abbr;
diff --git a/WebCore/html/HTMLTableColElement.idl b/WebCore/html/HTMLTableColElement.idl
index 083e4a6..453ff3f 100644
--- a/WebCore/html/HTMLTableColElement.idl
+++ b/WebCore/html/HTMLTableColElement.idl
@@ -20,11 +20,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=4e886641-910e-424a-995c-e525c09dcfd3,
- ImplementationUUID=5f4cdf17-44f1-4b1d-9c68-206737085892
- ] HTMLTableColElement : HTMLElement {
+ interface HTMLTableColElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString align;
attribute [ConvertNullToNullString] DOMString ch;
diff --git a/WebCore/html/HTMLTableElement.idl b/WebCore/html/HTMLTableElement.idl
index 7092be0..9cd72b0 100644
--- a/WebCore/html/HTMLTableElement.idl
+++ b/WebCore/html/HTMLTableElement.idl
@@ -20,11 +20,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=3f9c6e17-ee0c-43de-94b0-2a21b19b612c,
- ImplementationUUID=159bb8fe-ffee-4ff9-b507-76741118143f
- ] HTMLTableElement : HTMLElement {
+ interface HTMLTableElement : HTMLElement {
// could raise excepetions on setting.
attribute HTMLTableCaptionElement caption
diff --git a/WebCore/html/HTMLTableRowElement.idl b/WebCore/html/HTMLTableRowElement.idl
index 3a76ca3..052b516 100644
--- a/WebCore/html/HTMLTableRowElement.idl
+++ b/WebCore/html/HTMLTableRowElement.idl
@@ -20,11 +20,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=f14ea3d9-8643-4cfd-a692-cefe6d5c65ea,
- ImplementationUUID=0ce090da-33bb-4163-bb35-3ca8a2f6be47
- ] HTMLTableRowElement : HTMLElement {
+ interface HTMLTableRowElement : HTMLElement {
readonly attribute long rowIndex;
readonly attribute long sectionRowIndex;
diff --git a/WebCore/html/HTMLTableSectionElement.idl b/WebCore/html/HTMLTableSectionElement.idl
index 7078e33..57e4293 100644
--- a/WebCore/html/HTMLTableSectionElement.idl
+++ b/WebCore/html/HTMLTableSectionElement.idl
@@ -21,10 +21,7 @@
module html {
interface [
- GenerateNativeConverter,
- GenerateConstructor,
- InterfaceUUID=e0cf6b6a-9ba1-400f-b523-dbb22819dfb6,
- ImplementationUUID=85329cf4-1eae-4245-a971-1bddb212a9c5
+ GenerateNativeConverter
] HTMLTableSectionElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString align;
diff --git a/WebCore/html/HTMLTagNames.in b/WebCore/html/HTMLTagNames.in
index 8842b23..1b77c5a 100644
--- a/WebCore/html/HTMLTagNames.in
+++ b/WebCore/html/HTMLTagNames.in
@@ -8,6 +8,8 @@ acronym interfaceName=HTMLElement
address interfaceName=HTMLElement
applet
area
+article interfaceName=HTMLElement
+aside interfaceName=HTMLElement
audio wrapperOnlyIfMediaIsAvailable, conditional=VIDEO, createWithNew
b interfaceName=HTMLElement
base createWithNew
@@ -41,6 +43,7 @@ em interfaceName=HTMLElement
embed
fieldset interfaceName=HTMLFieldSetElement, constructorNeedsFormElement, createWithNew
font createWithNew
+footer interfaceName=HTMLElement
form createWithNew
frame
frameset interfaceName=HTMLFrameSetElement, createWithNew
@@ -51,6 +54,7 @@ h4 interfaceName=HTMLHeadingElement, createWithNew
h5 interfaceName=HTMLHeadingElement, createWithNew
h6 interfaceName=HTMLHeadingElement, createWithNew
head createWithNew
+header interfaceName=HTMLElement
hr interfaceName=HTMLHRElement, createWithNew
html createWithNew
i interfaceName=HTMLElement
@@ -92,6 +96,7 @@ ruby interfaceName=HTMLElement
s interfaceName=HTMLElement
samp interfaceName=HTMLElement
script constructorNeedsCreatedByParser, createWithNew
+section interfaceName=HTMLElement
select constructorNeedsFormElement, createWithNew
small interfaceName=HTMLElement
source wrapperOnlyIfMediaIsAvailable, conditional=VIDEO, createWithNew
diff --git a/WebCore/html/HTMLTextAreaElement.cpp b/WebCore/html/HTMLTextAreaElement.cpp
index 0e8350c..7159cc7 100644
--- a/WebCore/html/HTMLTextAreaElement.cpp
+++ b/WebCore/html/HTMLTextAreaElement.cpp
@@ -27,6 +27,7 @@
#include "HTMLTextAreaElement.h"
#include "BeforeTextInsertedEvent.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "CSSValueKeywords.h"
#include "Document.h"
diff --git a/WebCore/html/HTMLTextAreaElement.idl b/WebCore/html/HTMLTextAreaElement.idl
index 107a1fe..2d82eed 100644
--- a/WebCore/html/HTMLTextAreaElement.idl
+++ b/WebCore/html/HTMLTextAreaElement.idl
@@ -20,16 +20,10 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=8b16bba6-efa9-4887-b863-308b4f9b9202,
- ImplementationUUID=2414be6e-bae0-472d-b124-beed5ca82d3b
- ] HTMLTextAreaElement : HTMLElement {
+ interface HTMLTextAreaElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString defaultValue;
readonly attribute HTMLFormElement form;
-#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
readonly attribute ValidityState validity;
-#endif
attribute [ConvertNullToNullString] DOMString accessKey;
attribute long cols;
attribute boolean disabled;
diff --git a/WebCore/html/HTMLTitleElement.idl b/WebCore/html/HTMLTitleElement.idl
index d0f27e7..de857e8 100644
--- a/WebCore/html/HTMLTitleElement.idl
+++ b/WebCore/html/HTMLTitleElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=036211fb-c1e9-4265-aac5-c5874e4a499c,
- ImplementationUUID=ff577152-4ea3-404f-912d-ed1d0b64e60e
- ] HTMLTitleElement : HTMLElement {
+ interface HTMLTitleElement : HTMLElement {
attribute [ConvertNullToNullString] DOMString text;
};
diff --git a/WebCore/html/HTMLTokenizer.cpp b/WebCore/html/HTMLTokenizer.cpp
index a552442..6fa3e20 100644
--- a/WebCore/html/HTMLTokenizer.cpp
+++ b/WebCore/html/HTMLTokenizer.cpp
@@ -171,10 +171,12 @@ HTMLTokenizer::HTMLTokenizer(HTMLDocument* doc, bool reportErrors)
, m_requestingScript(false)
, m_hasScriptsWaitingForStylesheets(false)
, m_timer(this, &HTMLTokenizer::timerFired)
+ , m_externalScriptsTimer(this, &HTMLTokenizer::executeExternalScriptsTimerFired)
, m_doc(doc)
, m_parser(new HTMLParser(doc, reportErrors))
, m_inWrite(false)
, m_fragment(false)
+ , m_scriptingPermission(FragmentScriptingAllowed)
{
begin();
}
@@ -190,15 +192,17 @@ HTMLTokenizer::HTMLTokenizer(HTMLViewSourceDocument* doc)
, m_requestingScript(false)
, m_hasScriptsWaitingForStylesheets(false)
, m_timer(this, &HTMLTokenizer::timerFired)
+ , m_externalScriptsTimer(this, &HTMLTokenizer::executeExternalScriptsTimerFired)
, m_doc(doc)
, m_parser(0)
, m_inWrite(false)
, m_fragment(false)
+ , m_scriptingPermission(FragmentScriptingAllowed)
{
begin();
}
-HTMLTokenizer::HTMLTokenizer(DocumentFragment* frag)
+HTMLTokenizer::HTMLTokenizer(DocumentFragment* frag, FragmentScriptingPermission scriptingPermission)
: m_buffer(0)
, m_scriptCode(0)
, m_scriptCodeSize(0)
@@ -208,10 +212,12 @@ HTMLTokenizer::HTMLTokenizer(DocumentFragment* frag)
, m_requestingScript(false)
, m_hasScriptsWaitingForStylesheets(false)
, m_timer(this, &HTMLTokenizer::timerFired)
+ , m_externalScriptsTimer(this, &HTMLTokenizer::executeExternalScriptsTimerFired)
, m_doc(frag->document())
- , m_parser(new HTMLParser(frag))
+ , m_parser(new HTMLParser(frag, scriptingPermission))
, m_inWrite(false)
, m_fragment(true)
+ , m_scriptingPermission(scriptingPermission)
{
begin();
}
@@ -236,6 +242,8 @@ void HTMLTokenizer::reset()
m_scriptCodeSize = m_scriptCodeCapacity = m_scriptCodeResync = 0;
m_timer.stop();
+ m_externalScriptsTimer.stop();
+
m_state.setAllowYield(false);
m_state.setForceSynchronous(false);
@@ -467,6 +475,13 @@ HTMLTokenizer::State HTMLTokenizer::scriptHandler(State state)
state = processListing(SegmentedString(m_scriptCode, m_scriptCodeSize), state);
RefPtr<Node> node = processToken();
+
+ if (node && m_scriptingPermission == FragmentScriptingNotAllowed) {
+ ExceptionCode ec;
+ node->remove(ec);
+ node = 0;
+ }
+
String scriptString = node ? node->textContent() : "";
m_currentToken.tagName = scriptTag.localName();
m_currentToken.beginTag = false;
@@ -1508,7 +1523,7 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
m_scriptTagSrcAttrValue = String();
m_scriptTagCharsetAttrValue = String();
if (m_currentToken.attrs && !m_fragment) {
- if (m_doc->frame() && m_doc->frame()->script()->isEnabled()) {
+ if (m_doc->frame() && m_doc->frame()->script()->canExecuteScripts()) {
if ((a = m_currentToken.attrs->getAttributeItem(srcAttr)))
m_scriptTagSrcAttrValue = m_doc->completeURL(deprecatedParseURL(a->value())).string();
}
@@ -1682,7 +1697,7 @@ void HTMLTokenizer::write(const SegmentedString& str, bool appendData)
#if ENABLE(INSPECTOR)
if (InspectorTimelineAgent* timelineAgent = m_doc->inspectorTimelineAgent())
- timelineAgent->willWriteHTML();
+ timelineAgent->willWriteHTML(source.length(), m_lineNumber);
#endif
Frame* frame = m_doc->frame();
@@ -1808,7 +1823,7 @@ void HTMLTokenizer::write(const SegmentedString& str, bool appendData)
#if ENABLE(INSPECTOR)
if (InspectorTimelineAgent* timelineAgent = m_doc->inspectorTimelineAgent())
- timelineAgent->didWriteHTML();
+ timelineAgent->didWriteHTML(m_lineNumber);
#endif
m_inWrite = wasInWrite;
@@ -1822,8 +1837,8 @@ void HTMLTokenizer::write(const SegmentedString& str, bool appendData)
if (m_noMoreData && !m_inWrite && !state.loadingExtScript() && !m_executingScript && !m_timer.isActive())
end(); // this actually causes us to be deleted
- // After parsing, go ahead and dispatch image beforeload/load events.
- ImageLoader::dispatchPendingEvents();
+ // After parsing, go ahead and dispatch image beforeload events.
+ ImageLoader::dispatchPendingBeforeLoadEvents();
}
void HTMLTokenizer::stopParsing()
@@ -1925,7 +1940,7 @@ void HTMLTokenizer::finish()
PassRefPtr<Node> HTMLTokenizer::processToken()
{
ScriptController* scriptController = (!m_fragment && m_doc->frame()) ? m_doc->frame()->script() : 0;
- if (scriptController && scriptController->isEnabled())
+ if (scriptController && scriptController->canExecuteScripts())
// FIXME: Why isn't this m_currentScriptTagStartLineNumber? I suspect this is wrong.
scriptController->setEventHandlerLineNumber(m_currentTagStartLineNumber + 1); // Script line numbers are 1 based.
if (m_dest > m_buffer) {
@@ -2026,6 +2041,11 @@ void HTMLTokenizer::executeScriptsWaitingForStylesheets()
void HTMLTokenizer::notifyFinished(CachedResource*)
{
+ executeExternalScriptsIfReady();
+}
+
+void HTMLTokenizer::executeExternalScriptsIfReady()
+{
#ifdef INSTRUMENT_LAYOUT_SCHEDULING
if (!m_doc->ownerElement())
printf("script loaded at %d\n", m_doc->elapsedTime());
@@ -2040,7 +2060,12 @@ void HTMLTokenizer::notifyFinished(CachedResource*)
return;
bool finished = false;
+
+ double startTime = currentTime();
while (!finished && m_pendingScripts.first()->isLoaded()) {
+ if (!continueExecutingExternalScripts(startTime))
+ break;
+
CachedScript* cs = m_pendingScripts.first().get();
m_pendingScripts.removeFirst();
ASSERT(cache()->disabled() || cs->accessCount() > 0);
@@ -2100,6 +2125,31 @@ void HTMLTokenizer::notifyFinished(CachedResource*)
}
}
+void HTMLTokenizer::executeExternalScriptsTimerFired(Timer<HTMLTokenizer>*)
+{
+ if (m_doc->view() && m_doc->view()->layoutPending() && !m_doc->minimumLayoutDelay()) {
+ // Restart the timer and do layout first.
+ m_externalScriptsTimer.startOneShot(0);
+ return;
+ }
+
+ // Continue executing external scripts.
+ executeExternalScriptsIfReady();
+}
+
+bool HTMLTokenizer::continueExecutingExternalScripts(double startTime)
+{
+ if (m_externalScriptsTimer.isActive())
+ return false;
+
+ if (currentTime() - startTime > m_tokenizerTimeDelay) {
+ // Schedule the timer to keep processing as soon as possible.
+ m_externalScriptsTimer.startOneShot(0);
+ return false;
+ }
+ return true;
+}
+
bool HTMLTokenizer::isWaitingForScripts() const
{
return m_state.loadingExtScript();
@@ -2110,9 +2160,9 @@ void HTMLTokenizer::setSrc(const SegmentedString& source)
m_src = source;
}
-void parseHTMLDocumentFragment(const String& source, DocumentFragment* fragment)
+void parseHTMLDocumentFragment(const String& source, DocumentFragment* fragment, FragmentScriptingPermission scriptingPermission)
{
- HTMLTokenizer tok(fragment);
+ HTMLTokenizer tok(fragment, scriptingPermission);
tok.setForceSynchronous(true);
tok.write(source, true);
tok.finish();
diff --git a/WebCore/html/HTMLTokenizer.h b/WebCore/html/HTMLTokenizer.h
index d731b2d..ef7cbfc 100644
--- a/WebCore/html/HTMLTokenizer.h
+++ b/WebCore/html/HTMLTokenizer.h
@@ -27,6 +27,7 @@
#include "CachedResourceClient.h"
#include "CachedResourceHandle.h"
#include "NamedMappedAttrMap.h"
+#include "MappedAttributeEntry.h"
#include "SegmentedString.h"
#include "Timer.h"
#include "Tokenizer.h"
@@ -135,7 +136,7 @@ class HTMLTokenizer : public Tokenizer, public CachedResourceClient {
public:
HTMLTokenizer(HTMLDocument*, bool reportErrors);
HTMLTokenizer(HTMLViewSourceDocument*);
- HTMLTokenizer(DocumentFragment*);
+ HTMLTokenizer(DocumentFragment*, FragmentScriptingPermission = FragmentScriptingAllowed);
virtual ~HTMLTokenizer();
virtual void write(const SegmentedString&, bool appendData);
@@ -205,6 +206,10 @@ private:
// from CachedResourceClient
void notifyFinished(CachedResource*);
+ void executeExternalScriptsIfReady();
+ void executeExternalScriptsTimerFired(Timer<HTMLTokenizer>*);
+ bool continueExecutingExternalScripts(double startTime);
+
// Internal buffers
///////////////////
UChar* m_buffer;
@@ -401,6 +406,9 @@ private:
// The timer for continued processing.
Timer<HTMLTokenizer> m_timer;
+ // The timer for continued executing external scripts.
+ Timer<HTMLTokenizer> m_externalScriptsTimer;
+
// This buffer can hold arbitrarily long user-defined attribute names, such as in EMBED tags.
// So any fixed number might be too small, but rather than rewriting all usage of this buffer
// we'll just make it large enough to handle all imaginable cases.
@@ -413,11 +421,12 @@ private:
OwnPtr<HTMLParser> m_parser;
bool m_inWrite;
bool m_fragment;
+ FragmentScriptingPermission m_scriptingPermission;
OwnPtr<PreloadScanner> m_preloadScanner;
};
-void parseHTMLDocumentFragment(const String&, DocumentFragment*);
+void parseHTMLDocumentFragment(const String&, DocumentFragment*, FragmentScriptingPermission = FragmentScriptingAllowed);
UChar decodeNamedEntity(const char*);
diff --git a/WebCore/html/HTMLUListElement.idl b/WebCore/html/HTMLUListElement.idl
index c49b058..38434f1 100644
--- a/WebCore/html/HTMLUListElement.idl
+++ b/WebCore/html/HTMLUListElement.idl
@@ -19,11 +19,7 @@
module html {
- interface [
- GenerateConstructor,
- InterfaceUUID=6877dee4-be67-4fb0-af8c-5023b108a1b0,
- ImplementationUUID=23e9c21a-618e-42ac-a053-df85918118df
- ] HTMLUListElement : HTMLElement {
+ interface HTMLUListElement : HTMLElement {
attribute boolean compact;
attribute [ConvertNullToNullString] DOMString type;
};
diff --git a/WebCore/html/HTMLVideoElement.cpp b/WebCore/html/HTMLVideoElement.cpp
index d0b1042..1fae354 100644
--- a/WebCore/html/HTMLVideoElement.cpp
+++ b/WebCore/html/HTMLVideoElement.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 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
@@ -28,6 +28,7 @@
#if ENABLE(VIDEO)
#include "HTMLVideoElement.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "CSSHelper.h"
#include "CSSPropertyNames.h"
@@ -45,11 +46,11 @@ using namespace HTMLNames;
HTMLVideoElement::HTMLVideoElement(const QualifiedName& tagName, Document* doc)
: HTMLMediaElement(tagName, doc)
- , m_shouldShowPosterImage(false)
+ , m_shouldDisplayPosterImage(false)
{
ASSERT(hasTagName(videoTag));
}
-
+
bool HTMLVideoElement::rendererIsNeeded(RenderStyle* style)
{
return HTMLElement::rendererIsNeeded(style);
@@ -58,8 +59,6 @@ bool HTMLVideoElement::rendererIsNeeded(RenderStyle* style)
#if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
RenderObject* HTMLVideoElement::createRenderer(RenderArena* arena, RenderStyle*)
{
- if (m_shouldShowPosterImage)
- return new (arena) RenderImage(this);
return new (arena) RenderVideo(this);
}
#endif
@@ -69,11 +68,12 @@ void HTMLVideoElement::attach()
HTMLMediaElement::attach();
#if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
- if (m_shouldShowPosterImage) {
+ updatePosterImage();
+ if (m_shouldDisplayPosterImage) {
if (!m_imageLoader)
m_imageLoader.set(new HTMLImageLoader(this));
m_imageLoader->updateFromElement();
- if (renderer() && renderer()->isImage()) {
+ if (renderer()) {
RenderImage* imageRenderer = toRenderImage(renderer());
imageRenderer->setCachedImage(m_imageLoader->image());
}
@@ -85,7 +85,7 @@ void HTMLVideoElement::detach()
{
HTMLMediaElement::detach();
- if (!m_shouldShowPosterImage)
+ if (!m_shouldDisplayPosterImage)
if (m_imageLoader)
m_imageLoader.clear();
}
@@ -95,8 +95,9 @@ void HTMLVideoElement::parseMappedAttribute(MappedAttribute* attr)
const QualifiedName& attrName = attr->name();
if (attrName == posterAttr) {
+ m_posterURL = document()->completeURL(attr->value());
updatePosterImage();
- if (m_shouldShowPosterImage) {
+ if (m_shouldDisplayPosterImage) {
#if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
if (!m_imageLoader)
m_imageLoader.set(new HTMLImageLoader(this));
@@ -165,11 +166,6 @@ void HTMLVideoElement::setHeight(unsigned value)
setAttribute(heightAttr, String::number(value));
}
-KURL HTMLVideoElement::poster() const
-{
- return document()->completeURL(getAttribute(posterAttr));
-}
-
void HTMLVideoElement::setPoster(const String& value)
{
setAttribute(posterAttr, value);
@@ -188,16 +184,14 @@ const QualifiedName& HTMLVideoElement::imageSourceAttributeName() const
void HTMLVideoElement::updatePosterImage()
{
#if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
- bool oldShouldShowPosterImage = m_shouldShowPosterImage;
+ bool oldShouldShowPosterImage = m_shouldDisplayPosterImage;
#endif
- m_shouldShowPosterImage = !poster().isEmpty() && readyState() < HAVE_CURRENT_DATA;
+ m_shouldDisplayPosterImage = !poster().isEmpty() && !hasAvailableVideoFrame();
#if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
- if (attached() && oldShouldShowPosterImage != m_shouldShowPosterImage) {
- detach();
- attach();
- }
+ if (renderer() && oldShouldShowPosterImage != m_shouldDisplayPosterImage)
+ renderer()->updateFromElement();
#endif
}
@@ -225,5 +219,13 @@ void HTMLVideoElement::paintCurrentFrameInContext(GraphicsContext* context, cons
player->paintCurrentFrameInContext(context, destRect);
}
+bool HTMLVideoElement::hasAvailableVideoFrame() const
+{
+ if (!m_player)
+ return false;
+
+ return m_player->hasAvailableVideoFrame();
+}
+
}
#endif
diff --git a/WebCore/html/HTMLVideoElement.h b/WebCore/html/HTMLVideoElement.h
index 096eb53..834ec4c 100644
--- a/WebCore/html/HTMLVideoElement.h
+++ b/WebCore/html/HTMLVideoElement.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 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
@@ -38,7 +38,7 @@ class HTMLImageLoader;
class HTMLVideoElement : public HTMLMediaElement {
public:
HTMLVideoElement(const QualifiedName&, Document*);
-
+
virtual int tagPriority() const { return 5; }
virtual bool rendererIsNeeded(RenderStyle*);
#if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
@@ -61,18 +61,22 @@ public:
unsigned videoWidth() const;
unsigned videoHeight() const;
- KURL poster() const;
+ const KURL& poster() const { return m_posterURL; }
void setPoster(const String&);
void updatePosterImage();
+ bool shouldDisplayPosterImage() const { return m_shouldDisplayPosterImage; }
void paint(GraphicsContext*, const IntRect&);
// Used by canvas to gain raw pixel access
void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
private:
+ virtual bool hasAvailableVideoFrame() const;
+
OwnPtr<HTMLImageLoader> m_imageLoader;
- bool m_shouldShowPosterImage;
+ KURL m_posterURL;
+ bool m_shouldDisplayPosterImage;
};
} //namespace
diff --git a/WebCore/html/HTMLVideoElement.idl b/WebCore/html/HTMLVideoElement.idl
index c78594f..f43bf82 100644
--- a/WebCore/html/HTMLVideoElement.idl
+++ b/WebCore/html/HTMLVideoElement.idl
@@ -24,7 +24,7 @@
*/
module html {
- interface [GenerateConstructor, Conditional=VIDEO] HTMLVideoElement : HTMLMediaElement {
+ interface [Conditional=VIDEO] HTMLVideoElement : HTMLMediaElement {
attribute unsigned long width;
attribute unsigned long height;
readonly attribute unsigned long videoWidth;
diff --git a/WebCore/html/ImageData.idl b/WebCore/html/ImageData.idl
index 8025de1..a5e2467 100644
--- a/WebCore/html/ImageData.idl
+++ b/WebCore/html/ImageData.idl
@@ -29,8 +29,7 @@
module html {
interface [
- CustomToJS,
- GenerateConstructor,
+ CustomToJS
] ImageData {
readonly attribute long width;
readonly attribute long height;
diff --git a/WebCore/html/MediaError.idl b/WebCore/html/MediaError.idl
index 4dcea7d..9d6f3bd 100644
--- a/WebCore/html/MediaError.idl
+++ b/WebCore/html/MediaError.idl
@@ -24,7 +24,7 @@
*/
module html {
- interface [GenerateConstructor, Conditional=VIDEO] MediaError {
+ interface [Conditional=VIDEO] MediaError {
const unsigned short MEDIA_ERR_ABORTED = 1;
const unsigned short MEDIA_ERR_NETWORK = 2;
const unsigned short MEDIA_ERR_DECODE = 3;
diff --git a/WebCore/html/TextMetrics.idl b/WebCore/html/TextMetrics.idl
index dc88716..1a315ba 100644
--- a/WebCore/html/TextMetrics.idl
+++ b/WebCore/html/TextMetrics.idl
@@ -25,9 +25,7 @@
module html {
- interface [
- GenerateConstructor
- ] TextMetrics {
+ interface TextMetrics {
readonly attribute float width;
};
diff --git a/WebCore/html/TimeRanges.idl b/WebCore/html/TimeRanges.idl
index d8686be..992b12a 100644
--- a/WebCore/html/TimeRanges.idl
+++ b/WebCore/html/TimeRanges.idl
@@ -25,7 +25,7 @@
module html {
-interface [Conditional=VIDEO] TimeRanges {
+interface [Conditional=VIDEO, OmitConstructor] TimeRanges {
readonly attribute unsigned long length;
float start(in unsigned long index)
raises (DOMException);
diff --git a/WebCore/html/ValidityState.cpp b/WebCore/html/ValidityState.cpp
index e7df225..1e0a07b 100644
--- a/WebCore/html/ValidityState.cpp
+++ b/WebCore/html/ValidityState.cpp
@@ -2,6 +2,7 @@
* This file is part of the WebKit project.
*
* Copyright (C) 2009 Michelangelo De Simone <micdesim@gmail.com>
+ * Copyright (C) 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
@@ -30,23 +31,18 @@
#include "RegularExpression.h"
#include <wtf/StdLibExtras.h>
-#define EMAIL_LOCALPART "[a-z0-9!#$%&'*+/=?^_`{|}~.-]+"
-#define EMAIL_DOMAINPART "[a-z0-9-]+(\\.[a-z0-9-]+)+"
-#define EMAIL_PATTERN EMAIL_LOCALPART "@" EMAIL_DOMAINPART
-
namespace WebCore {
using namespace HTMLNames;
-ValidityState::ValidityState(HTMLFormControlElement* parent)
- : m_control(parent)
-{
- ASSERT(parent);
-}
+static const char emailPattern[] =
+ "[a-z0-9!#$%&'*+/=?^_`{|}~.-]+" // local part
+ "@"
+ "[a-z0-9-]+(\\.[a-z0-9-]+)+"; // domain part
-String ValidityState::validationMessage()
+String ValidityState::validationMessage() const
{
- if (!control()->willValidate())
+ if (!m_control->willValidate())
return String();
if (customError())
@@ -69,12 +65,12 @@ String ValidityState::validationMessage()
return String();
}
-bool ValidityState::typeMismatch()
+bool ValidityState::typeMismatch() const
{
- if (!control()->hasTagName(inputTag))
+ if (!m_control->hasTagName(inputTag))
return false;
- HTMLInputElement* input = static_cast<HTMLInputElement*>(control());
+ HTMLInputElement* input = static_cast<HTMLInputElement*>(m_control);
String value = input->value();
if (value.isEmpty())
@@ -87,17 +83,15 @@ bool ValidityState::typeMismatch()
return !HTMLInputElement::formStringToDouble(value, 0);
case HTMLInputElement::URL:
return !KURL(KURL(), value).isValid();
- case HTMLInputElement::EMAIL:
- {
+ case HTMLInputElement::EMAIL: {
if (!input->multiple())
return !isValidEmailAddress(value);
-
- Vector<String> email_list;
- value.split(',', email_list);
- for (unsigned i = 0; i < email_list.size(); ++i)
- if (!isValidEmailAddress(email_list[i]))
+ Vector<String> addresses;
+ value.split(',', addresses);
+ for (unsigned i = 0; i < addresses.size(); ++i) {
+ if (!isValidEmailAddress(addresses[i]))
return true;
-
+ }
return false;
}
case HTMLInputElement::DATE:
@@ -106,38 +100,53 @@ bool ValidityState::typeMismatch()
case HTMLInputElement::MONTH:
case HTMLInputElement::TIME:
case HTMLInputElement::WEEK:
- return !HTMLInputElement::formStringToISODateTime(input->inputType(), value, 0);
- default:
+ return !HTMLInputElement::formStringToDateComponents(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;
}
+
+ ASSERT_NOT_REACHED();
+ return false;
}
-bool ValidityState::rangeUnderflow()
+bool ValidityState::rangeUnderflow() const
{
- if (!control()->hasTagName(inputTag))
+ if (!m_control->hasTagName(inputTag))
return false;
- return static_cast<HTMLInputElement*>(control())->rangeUnderflow();
+ return static_cast<HTMLInputElement*>(m_control)->rangeUnderflow();
}
-bool ValidityState::rangeOverflow()
+bool ValidityState::rangeOverflow() const
{
- if (!control()->hasTagName(inputTag))
+ if (!m_control->hasTagName(inputTag))
return false;
- return static_cast<HTMLInputElement*>(control())->rangeOverflow();
+ return static_cast<HTMLInputElement*>(m_control)->rangeOverflow();
}
-bool ValidityState::stepMismatch()
+bool ValidityState::stepMismatch() const
{
- if (!control()->hasTagName(inputTag))
+ if (!m_control->hasTagName(inputTag))
return false;
- return static_cast<HTMLInputElement*>(control())->stepMismatch();
+ return static_cast<HTMLInputElement*>(m_control)->stepMismatch();
}
-bool ValidityState::valid()
+bool ValidityState::valid() const
{
- bool someError = typeMismatch() || stepMismatch() || rangeUnderflow() || rangeOverflow() ||
- tooLong() || patternMismatch() || valueMissing() || customError();
-
+ bool someError = typeMismatch() || stepMismatch() || rangeUnderflow() || rangeOverflow()
+ || tooLong() || patternMismatch() || valueMissing() || customError();
return !someError;
}
@@ -154,19 +163,18 @@ bool ValidityState::isValidColorString(const String& value)
return color.isValid() && !color.hasAlpha();
}
-bool ValidityState::isValidEmailAddress(const String& email)
+bool ValidityState::isValidEmailAddress(const String& address)
{
- if (email.isEmpty())
+ int addressLength = address.length();
+ if (!addressLength)
return false;
- DEFINE_STATIC_LOCAL(AtomicString, emailPattern, (EMAIL_PATTERN));
- DEFINE_STATIC_LOCAL(RegularExpression, regExp, (emailPattern, TextCaseInsensitive));
+ DEFINE_STATIC_LOCAL(const RegularExpression, regExp, (emailPattern, TextCaseInsensitive));
- int matchLength = 0;
- int emailLength = email.length();
- int matchOffset = regExp.match(email, 0, &matchLength);
+ int matchLength;
+ int matchOffset = regExp.match(address, 0, &matchLength);
- return matchOffset == 0 && matchLength == emailLength;
+ return matchOffset == 0 && matchLength == addressLength;
}
} // namespace
diff --git a/WebCore/html/ValidityState.h b/WebCore/html/ValidityState.h
index 7ae95d7..78238f1 100644
--- a/WebCore/html/ValidityState.h
+++ b/WebCore/html/ValidityState.h
@@ -2,6 +2,7 @@
* This file is part of the WebKit project.
*
* Copyright (C) 2009 Michelangelo De Simone <micdesim@gmail.com>
+ * Copyright (C) 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
@@ -24,41 +25,43 @@
#define ValidityState_h
#include "HTMLFormControlElement.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
+#include <wtf/PassOwnPtr.h>
namespace WebCore {
- class ValidityState : public RefCounted<ValidityState> {
- public:
- static PassRefPtr<ValidityState> create(HTMLFormControlElement* owner)
- {
- return adoptRef(new ValidityState(owner));
- }
+class ValidityState : public Noncopyable {
+public:
+ static PassOwnPtr<ValidityState> create(HTMLFormControlElement* control)
+ {
+ return new ValidityState(control);
+ }
- HTMLFormControlElement* control() const { return m_control; }
+ void ref() { m_control->ref(); }
+ void deref() { m_control->deref(); }
- String validationMessage();
- void setCustomErrorMessage(const String& message) { m_customErrorMessage = message; }
+ String validationMessage() const;
- bool valueMissing() { return control()->valueMissing(); }
- bool typeMismatch();
- bool patternMismatch() { return control()->patternMismatch(); }
- bool tooLong() { return control()->tooLong(); }
- bool rangeUnderflow();
- bool rangeOverflow();
- bool stepMismatch();
- bool customError() { return !m_customErrorMessage.isEmpty(); }
- bool valid();
+ void setCustomErrorMessage(const String& message) { m_customErrorMessage = message; }
- private:
- ValidityState(HTMLFormControlElement*);
- HTMLFormControlElement* m_control;
- String m_customErrorMessage;
+ bool valueMissing() const { return m_control->valueMissing(); }
+ bool typeMismatch() const;
+ bool patternMismatch() const { return m_control->patternMismatch(); }
+ bool tooLong() const { return m_control->tooLong(); }
+ bool rangeUnderflow() const;
+ bool rangeOverflow() const;
+ bool stepMismatch() const;
+ bool customError() const { return !m_customErrorMessage.isEmpty(); }
+ bool valid() const;
- static bool isValidColorString(const String&);
- bool isValidEmailAddress(const String&);
- };
+private:
+ ValidityState(HTMLFormControlElement* control) : m_control(control) { }
+
+ static bool isValidColorString(const String&);
+ static bool isValidEmailAddress(const String&);
+
+ HTMLFormControlElement* m_control;
+ String m_customErrorMessage;
+};
} // namespace WebCore
diff --git a/WebCore/html/ValidityState.idl b/WebCore/html/ValidityState.idl
index b926852..576fab4 100644
--- a/WebCore/html/ValidityState.idl
+++ b/WebCore/html/ValidityState.idl
@@ -22,7 +22,7 @@
module html {
- interface ValidityState {
+ interface [OmitConstructor] ValidityState {
readonly attribute boolean valueMissing;
readonly attribute boolean typeMismatch;
readonly attribute boolean patternMismatch;
diff --git a/WebCore/html/VoidCallback.idl b/WebCore/html/VoidCallback.idl
index 3682cf7..8a7cf19 100644
--- a/WebCore/html/VoidCallback.idl
+++ b/WebCore/html/VoidCallback.idl
@@ -24,7 +24,7 @@
*/
module html {
- interface [CustomNativeConverter] VoidCallback {
+ interface [CustomNativeConverter, OmitConstructor] VoidCallback {
void handleEvent();
};
}
diff --git a/WebCore/html/canvas/CanvasContextAttributes.cpp b/WebCore/html/canvas/CanvasContextAttributes.cpp
new file mode 100644
index 0000000..d3d0398
--- /dev/null
+++ b/WebCore/html/canvas/CanvasContextAttributes.cpp
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2010, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 "CanvasContextAttributes.h"
+
+namespace WebCore {
+
+CanvasContextAttributes::CanvasContextAttributes()
+{
+}
+
+CanvasContextAttributes::~CanvasContextAttributes()
+{
+}
+
+} // namespace WebCore
diff --git a/WebCore/html/canvas/CanvasContextAttributes.h b/WebCore/html/canvas/CanvasContextAttributes.h
new file mode 100644
index 0000000..97483b3
--- /dev/null
+++ b/WebCore/html/canvas/CanvasContextAttributes.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2010, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 CanvasContextAttributes_h
+#define CanvasContextAttributes_h
+
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+// A base class for any attributes that are needed which would affect
+// the creation of the Canvas's rendering context. Currently only the
+// WebGLRenderingContext uses this mechanism.
+
+class CanvasContextAttributes : public RefCounted<CanvasContextAttributes> {
+ public:
+ virtual ~CanvasContextAttributes();
+
+ protected:
+ CanvasContextAttributes();
+};
+
+} // namespace WebCore
+
+#endif // CanvasContextAttributes_h
diff --git a/WebCore/html/canvas/CanvasGradient.idl b/WebCore/html/canvas/CanvasGradient.idl
index a925a26..32813bc 100644
--- a/WebCore/html/canvas/CanvasGradient.idl
+++ b/WebCore/html/canvas/CanvasGradient.idl
@@ -27,7 +27,8 @@ module html {
interface [
InterfaceUUID=bb1108ea-6b8c-4a08-894a-218628630cdb,
- ImplementationUUID=a2942ae6-2731-4286-98cc-9d5e79e20de1
+ ImplementationUUID=a2942ae6-2731-4286-98cc-9d5e79e20de1,
+ OmitConstructor
] CanvasGradient {
void addColorStop(in float offset, in DOMString color)
diff --git a/WebCore/html/canvas/CanvasNumberArray.idl b/WebCore/html/canvas/CanvasNumberArray.idl
index 56e807e..036d4ee 100644
--- a/WebCore/html/canvas/CanvasNumberArray.idl
+++ b/WebCore/html/canvas/CanvasNumberArray.idl
@@ -26,7 +26,6 @@
module html {
interface [
Conditional=3D_CANVAS,
- GenerateConstructor,
HasCustomIndexGetter
] CanvasNumberArray {
readonly attribute unsigned long length;
diff --git a/WebCore/html/canvas/CanvasPattern.idl b/WebCore/html/canvas/CanvasPattern.idl
index 1cac8f8..492c93f 100644
--- a/WebCore/html/canvas/CanvasPattern.idl
+++ b/WebCore/html/canvas/CanvasPattern.idl
@@ -27,7 +27,8 @@ module html {
interface [
InterfaceUUID=c2131348-6d8c-47b5-86cc-d41aff34ce15,
- ImplementationUUID=82f5d713-3d17-44dd-aa4a-7766fe345940
+ ImplementationUUID=82f5d713-3d17-44dd-aa4a-7766fe345940,
+ OmitConstructor
] CanvasPattern {
};
diff --git a/WebCore/html/canvas/CanvasPixelArray.idl b/WebCore/html/canvas/CanvasPixelArray.idl
index 2295af6..60726cd 100644
--- a/WebCore/html/canvas/CanvasPixelArray.idl
+++ b/WebCore/html/canvas/CanvasPixelArray.idl
@@ -29,6 +29,7 @@
module html {
#if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT || defined(V8_BINDING) && V8_BINDING
interface [
+ OmitConstructor,
CustomHeader,
HasNumericIndexGetter,
HasCustomIndexSetter
diff --git a/WebCore/html/canvas/CanvasRenderingContext.idl b/WebCore/html/canvas/CanvasRenderingContext.idl
index 8701c80..a11aa75 100644
--- a/WebCore/html/canvas/CanvasRenderingContext.idl
+++ b/WebCore/html/canvas/CanvasRenderingContext.idl
@@ -26,7 +26,6 @@
module html {
interface [
- GenerateConstructor,
CustomToJS,
InterfaceUUID=98fb48ae-7216-489c-862b-8e1217fc4443,
ImplementationUUID=ab4f0781-152f-450e-9546-5b3987491a54
diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index 1ae9f75..1e09534 100644
--- a/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -42,7 +42,6 @@
#include "Document.h"
#include "ExceptionCode.h"
#include "FloatConversion.h"
-#include "Frame.h"
#include "GraphicsContext.h"
#include "HTMLCanvasElement.h"
#include "HTMLImageElement.h"
diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.idl b/WebCore/html/canvas/CanvasRenderingContext2D.idl
index ef66d1a..f93a752 100644
--- a/WebCore/html/canvas/CanvasRenderingContext2D.idl
+++ b/WebCore/html/canvas/CanvasRenderingContext2D.idl
@@ -26,7 +26,6 @@
module html {
interface [
- GenerateConstructor,
InterfaceUUID=98fb48ae-7216-489c-862b-8e1217fc4443,
ImplementationUUID=ab4f0781-152f-450e-9546-5b3987491a54
] CanvasRenderingContext2D : CanvasRenderingContext {
diff --git a/WebCore/html/canvas/WebGLActiveInfo.idl b/WebCore/html/canvas/WebGLActiveInfo.idl
index a3f79b8..17bb4d6 100644
--- a/WebCore/html/canvas/WebGLActiveInfo.idl
+++ b/WebCore/html/canvas/WebGLActiveInfo.idl
@@ -27,6 +27,7 @@ module html {
interface [
Conditional=3D_CANVAS,
+ OmitConstructor
] WebGLActiveInfo {
readonly attribute int size;
readonly attribute unsigned int type;
diff --git a/WebCore/html/canvas/WebGLArray.idl b/WebCore/html/canvas/WebGLArray.idl
index 156ca5b..02e1f51 100644
--- a/WebCore/html/canvas/WebGLArray.idl
+++ b/WebCore/html/canvas/WebGLArray.idl
@@ -24,7 +24,7 @@
*/
module html {
- interface [Conditional=3D_CANVAS, CustomToJS] WebGLArray {
+ interface [Conditional=3D_CANVAS, CustomToJS, OmitConstructor] WebGLArray {
readonly attribute WebGLArrayBuffer buffer;
readonly attribute unsigned long byteOffset;
readonly attribute unsigned long byteLength;
diff --git a/WebCore/html/canvas/WebGLArrayBuffer.idl b/WebCore/html/canvas/WebGLArrayBuffer.idl
index ec4a67a..3325210 100644
--- a/WebCore/html/canvas/WebGLArrayBuffer.idl
+++ b/WebCore/html/canvas/WebGLArrayBuffer.idl
@@ -24,7 +24,7 @@
*/
module html {
- interface [Conditional=3D_CANVAS] WebGLArrayBuffer {
+ interface [Conditional=3D_CANVAS, CustomConstructor] WebGLArrayBuffer {
readonly attribute int byteLength;
};
}
diff --git a/WebCore/html/canvas/WebGLBuffer.cpp b/WebCore/html/canvas/WebGLBuffer.cpp
index cbad6a0..958bedc 100644
--- a/WebCore/html/canvas/WebGLBuffer.cpp
+++ b/WebCore/html/canvas/WebGLBuffer.cpp
@@ -46,15 +46,18 @@ WebGLBuffer::WebGLBuffer(WebGLRenderingContext* ctx)
: CanvasObject(ctx)
, m_elementArrayBufferByteLength(0)
, m_arrayBufferByteLength(0)
- , m_elementArrayBufferCloned(false)
+ , m_nextAvailableCacheEntry(0)
{
setObject(context()->graphicsContext3D()->createBuffer());
+ clearCachedMaxIndices();
}
WebGLBuffer::WebGLBuffer(WebGLRenderingContext* ctx, Platform3DObject obj)
: CanvasObject(ctx)
+ , m_nextAvailableCacheEntry(0)
{
setObject(obj, false);
+ clearCachedMaxIndices();
}
void WebGLBuffer::_deleteObject(Platform3DObject object)
@@ -83,9 +86,12 @@ bool WebGLBuffer::associateBufferData(unsigned long target, WebGLArray* array)
return false;
if (target == GraphicsContext3D::ELEMENT_ARRAY_BUFFER) {
+ clearCachedMaxIndices();
m_elementArrayBufferByteLength = array->byteLength();
- m_elementArrayBuffer = array->buffer();
- m_elementArrayBufferCloned = false;
+ // We must always clone the incoming data because client-side
+ // modifications without calling bufferData or bufferSubData
+ // must never be able to change the validation results.
+ m_elementArrayBuffer = WebGLArrayBuffer::create(array->buffer().get());
return true;
}
@@ -103,6 +109,8 @@ bool WebGLBuffer::associateBufferSubData(unsigned long target, long offset, WebG
return false;
if (target == GraphicsContext3D::ELEMENT_ARRAY_BUFFER) {
+ clearCachedMaxIndices();
+
// We need to protect against integer overflow with these tests
if (offset < 0)
return false;
@@ -111,12 +119,6 @@ bool WebGLBuffer::associateBufferSubData(unsigned long target, long offset, WebG
if (uoffset > m_elementArrayBufferByteLength || array->byteLength() > m_elementArrayBufferByteLength - uoffset)
return false;
- // If we already have a buffer, we need to clone it and add the new data
- if (m_elementArrayBuffer && !m_elementArrayBufferCloned) {
- m_elementArrayBuffer = WebGLArrayBuffer::create(m_elementArrayBuffer.get());
- m_elementArrayBufferCloned = true;
- }
-
memcpy(static_cast<unsigned char*>(m_elementArrayBuffer->data()) + offset, array->baseAddress(), array->byteLength());
return true;
}
@@ -132,6 +134,33 @@ unsigned WebGLBuffer::byteLength(unsigned long target) const
return (target == GraphicsContext3D::ARRAY_BUFFER) ? m_arrayBufferByteLength : m_elementArrayBufferByteLength;
}
+long WebGLBuffer::getCachedMaxIndex(unsigned long type)
+{
+ size_t numEntries = sizeof(m_maxIndexCache) / sizeof(MaxIndexCacheEntry);
+ for (size_t i = 0; i < numEntries; i++)
+ if (m_maxIndexCache[i].type == type)
+ return m_maxIndexCache[i].maxIndex;
+ return -1;
+}
+
+void WebGLBuffer::setCachedMaxIndex(unsigned long type, long value)
+{
+ int numEntries = sizeof(m_maxIndexCache) / sizeof(MaxIndexCacheEntry);
+ for (int i = 0; i < numEntries; i++)
+ if (m_maxIndexCache[i].type == type) {
+ m_maxIndexCache[i].maxIndex = value;
+ return;
+ }
+ m_maxIndexCache[m_nextAvailableCacheEntry].type = type;
+ m_maxIndexCache[m_nextAvailableCacheEntry].maxIndex = value;
+ m_nextAvailableCacheEntry = (m_nextAvailableCacheEntry + 1) % numEntries;
+}
+
+void WebGLBuffer::clearCachedMaxIndices()
+{
+ memset(m_maxIndexCache, 0, sizeof(m_maxIndexCache));
+}
+
}
#endif // ENABLE(3D_CANVAS)
diff --git a/WebCore/html/canvas/WebGLBuffer.h b/WebCore/html/canvas/WebGLBuffer.h
index cb953c6..bdb7052 100644
--- a/WebCore/html/canvas/WebGLBuffer.h
+++ b/WebCore/html/canvas/WebGLBuffer.h
@@ -51,6 +51,12 @@ namespace WebCore {
unsigned byteLength(unsigned long target) const;
const WebGLArrayBuffer* elementArrayBuffer() const { return m_elementArrayBuffer.get(); }
+ // Gets the cached max index for the given type. Returns -1 if
+ // none has been set.
+ long getCachedMaxIndex(unsigned long type);
+ // Sets the cached max index for the given type.
+ void setCachedMaxIndex(unsigned long type, long value);
+
protected:
WebGLBuffer(WebGLRenderingContext*);
WebGLBuffer(WebGLRenderingContext*, Platform3DObject obj);
@@ -61,7 +67,26 @@ namespace WebCore {
RefPtr<WebGLArrayBuffer> m_elementArrayBuffer;
unsigned m_elementArrayBufferByteLength;
unsigned m_arrayBufferByteLength;
- bool m_elementArrayBufferCloned;
+
+ // Optimization for index validation. For each type of index
+ // (i.e., UNSIGNED_SHORT), cache the maximum index in the
+ // entire buffer.
+ //
+ // This is sufficient to eliminate a lot of work upon each
+ // draw call as long as all bound array buffers are at least
+ // that size.
+ struct MaxIndexCacheEntry {
+ unsigned long type;
+ long maxIndex;
+ };
+ // OpenGL ES 2.0 only has two valid index types (UNSIGNED_BYTE
+ // and UNSIGNED_SHORT), but might as well leave open the
+ // possibility of adding others.
+ MaxIndexCacheEntry m_maxIndexCache[4];
+ unsigned m_nextAvailableCacheEntry;
+
+ // Clears all of the cached max indices.
+ void clearCachedMaxIndices();
};
} // namespace WebCore
diff --git a/WebCore/html/canvas/WebGLBuffer.idl b/WebCore/html/canvas/WebGLBuffer.idl
index 30b7606..9dd97c0 100644
--- a/WebCore/html/canvas/WebGLBuffer.idl
+++ b/WebCore/html/canvas/WebGLBuffer.idl
@@ -24,6 +24,6 @@
*/
module html {
- interface [Conditional=3D_CANVAS] WebGLBuffer {
+ interface [Conditional=3D_CANVAS, OmitConstructor] WebGLBuffer {
};
}
diff --git a/WebCore/html/canvas/WebGLByteArray.idl b/WebCore/html/canvas/WebGLByteArray.idl
index 054a912..dbb3bb2 100644
--- a/WebCore/html/canvas/WebGLByteArray.idl
+++ b/WebCore/html/canvas/WebGLByteArray.idl
@@ -30,7 +30,7 @@ module html {
HasNumericIndexGetter,
HasCustomIndexSetter,
GenerateNativeConverter,
- GenerateCustomConstructor,
+ CustomConstructor,
CustomToJS
] WebGLByteArray : WebGLArray {
long get(in unsigned long index);
diff --git a/WebCore/html/canvas/WebGLContextAttributes.cpp b/WebCore/html/canvas/WebGLContextAttributes.cpp
new file mode 100644
index 0000000..a0725ca
--- /dev/null
+++ b/WebCore/html/canvas/WebGLContextAttributes.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:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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(3D_CANVAS)
+
+#include "WebGLContextAttributes.h"
+
+namespace WebCore {
+
+PassRefPtr<WebGLContextAttributes> WebGLContextAttributes::create()
+{
+ return adoptRef(new WebGLContextAttributes());
+}
+
+PassRefPtr<WebGLContextAttributes> WebGLContextAttributes::create(GraphicsContext3D::Attributes attributes)
+{
+ return adoptRef(new WebGLContextAttributes(attributes));
+}
+
+WebGLContextAttributes::WebGLContextAttributes()
+ : CanvasContextAttributes()
+{
+}
+
+WebGLContextAttributes::WebGLContextAttributes(GraphicsContext3D::Attributes attributes)
+ : CanvasContextAttributes()
+ , m_attrs(attributes)
+{
+}
+
+WebGLContextAttributes::~WebGLContextAttributes()
+{
+}
+
+bool WebGLContextAttributes::alpha() const
+{
+ return m_attrs.alpha;
+}
+
+void WebGLContextAttributes::setAlpha(bool alpha)
+{
+ m_attrs.alpha = alpha;
+}
+
+bool WebGLContextAttributes::depth() const
+{
+ return m_attrs.depth;
+}
+
+void WebGLContextAttributes::setDepth(bool depth)
+{
+ m_attrs.depth = depth;
+}
+
+bool WebGLContextAttributes::stencil() const
+{
+ return m_attrs.stencil;
+}
+
+void WebGLContextAttributes::setStencil(bool stencil)
+{
+ m_attrs.stencil = stencil;
+}
+
+bool WebGLContextAttributes::antialias() const
+{
+ return m_attrs.antialias;
+}
+
+void WebGLContextAttributes::setAntialias(bool antialias)
+{
+ m_attrs.antialias = antialias;
+}
+
+bool WebGLContextAttributes::premultipliedAlpha() const
+{
+ return m_attrs.premultipliedAlpha;
+}
+
+void WebGLContextAttributes::setPremultipliedAlpha(bool premultipliedAlpha)
+{
+ m_attrs.premultipliedAlpha = premultipliedAlpha;
+}
+
+GraphicsContext3D::Attributes WebGLContextAttributes::attributes() const
+{
+ return m_attrs;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(3D_CANVAS)
diff --git a/WebCore/html/canvas/WebGLContextAttributes.h b/WebCore/html/canvas/WebGLContextAttributes.h
new file mode 100644
index 0000000..a108605
--- /dev/null
+++ b/WebCore/html/canvas/WebGLContextAttributes.h
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2010, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 WebGLContextAttributes_h
+#define WebGLContextAttributes_h
+
+#include "CanvasContextAttributes.h"
+#include "GraphicsContext3D.h"
+#include <wtf/PassRefPtr.h>
+
+namespace WebCore {
+
+class WebGLContextAttributes : public CanvasContextAttributes {
+ public:
+ virtual ~WebGLContextAttributes();
+
+ // Create a new attributes object
+ static PassRefPtr<WebGLContextAttributes> create();
+
+ // Create a new attributes object initialized with preexisting attributes
+ static PassRefPtr<WebGLContextAttributes> create(GraphicsContext3D::Attributes attributes);
+
+ // Whether or not the drawing buffer has an alpha channel; default=true
+ bool alpha() const;
+ void setAlpha(bool alpha);
+
+ // Whether or not the drawing buffer has a depth buffer; default=true
+ bool depth() const;
+ void setDepth(bool depth);
+
+ // Whether or not the drawing buffer has a stencil buffer; default=true
+ bool stencil() const;
+ void setStencil(bool stencil);
+
+ // Whether or not the drawing buffer is antialiased; default=true
+ bool antialias() const;
+ void setAntialias(bool antialias);
+
+ // Whether or not to treat the values in the drawing buffer as
+ // though their alpha channel has already been multiplied into the
+ // color channels; default=true
+ bool premultipliedAlpha() const;
+ void setPremultipliedAlpha(bool premultipliedAlpha);
+
+ // Fetches a copy of the attributes stored in this object in a
+ // form that can be used to initialize a GraphicsContext3D.
+ GraphicsContext3D::Attributes attributes() const;
+
+ protected:
+ WebGLContextAttributes();
+ WebGLContextAttributes(GraphicsContext3D::Attributes attributes);
+
+ private:
+ GraphicsContext3D::Attributes m_attrs;
+};
+
+} // namespace WebCore
+
+#endif // WebGLContextAttributes_h
diff --git a/WebCore/html/canvas/WebGLContextAttributes.idl b/WebCore/html/canvas/WebGLContextAttributes.idl
new file mode 100644
index 0000000..be2b20c
--- /dev/null
+++ b/WebCore/html/canvas/WebGLContextAttributes.idl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2010, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 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=3D_CANVAS,
+ OmitConstructor
+ ] WebGLContextAttributes {
+ attribute boolean alpha;
+ attribute boolean depth;
+ attribute boolean stencil;
+ attribute boolean antialias;
+ attribute boolean premultipliedAlpha;
+ };
+}
diff --git a/WebCore/html/canvas/WebGLFloatArray.idl b/WebCore/html/canvas/WebGLFloatArray.idl
index 83479b3..e0a80f2 100644
--- a/WebCore/html/canvas/WebGLFloatArray.idl
+++ b/WebCore/html/canvas/WebGLFloatArray.idl
@@ -30,11 +30,11 @@ module html {
HasNumericIndexGetter,
HasCustomIndexSetter,
GenerateNativeConverter,
- GenerateCustomConstructor,
+ CustomConstructor,
CustomToJS
] WebGLFloatArray : WebGLArray {
- long get(in unsigned long index);
- // void set(in unsigned long index, in long value);
+ float get(in unsigned long index);
+ // void set(in unsigned long index, in float value);
// void set(in WebGLFloatArray array, [Optional] in unsigned long offset);
// void set(in sequence<long> array, [Optional] in unsigned long offset);
[Custom] void set();
diff --git a/WebCore/html/canvas/WebGLFramebuffer.idl b/WebCore/html/canvas/WebGLFramebuffer.idl
index 8c1d9fd..f433352 100644
--- a/WebCore/html/canvas/WebGLFramebuffer.idl
+++ b/WebCore/html/canvas/WebGLFramebuffer.idl
@@ -24,6 +24,6 @@
*/
module html {
- interface [Conditional=3D_CANVAS] WebGLFramebuffer {
+ interface [Conditional=3D_CANVAS, OmitConstructor] WebGLFramebuffer {
};
}
diff --git a/WebCore/html/canvas/WebGLIntArray.idl b/WebCore/html/canvas/WebGLIntArray.idl
index 3bc037c..ef0d92f 100644
--- a/WebCore/html/canvas/WebGLIntArray.idl
+++ b/WebCore/html/canvas/WebGLIntArray.idl
@@ -30,7 +30,7 @@ module html {
HasNumericIndexGetter,
HasCustomIndexSetter,
GenerateNativeConverter,
- GenerateCustomConstructor,
+ CustomConstructor,
CustomToJS
] WebGLIntArray : WebGLArray {
long get(in unsigned long index);
diff --git a/WebCore/html/canvas/WebGLProgram.idl b/WebCore/html/canvas/WebGLProgram.idl
index 562fa3a..47e5cda 100644
--- a/WebCore/html/canvas/WebGLProgram.idl
+++ b/WebCore/html/canvas/WebGLProgram.idl
@@ -24,6 +24,6 @@
*/
module html {
- interface [Conditional=3D_CANVAS] WebGLProgram {
+ interface [Conditional=3D_CANVAS, OmitConstructor] WebGLProgram {
};
}
diff --git a/WebCore/html/canvas/WebGLRenderbuffer.idl b/WebCore/html/canvas/WebGLRenderbuffer.idl
index 2524433..6a4fc35 100644
--- a/WebCore/html/canvas/WebGLRenderbuffer.idl
+++ b/WebCore/html/canvas/WebGLRenderbuffer.idl
@@ -24,6 +24,6 @@
*/
module html {
- interface [Conditional=3D_CANVAS] WebGLRenderbuffer {
+ interface [Conditional=3D_CANVAS, OmitConstructor] WebGLRenderbuffer {
};
}
diff --git a/WebCore/html/canvas/WebGLRenderingContext.cpp b/WebCore/html/canvas/WebGLRenderingContext.cpp
index 7a7215d..6cb3348 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.cpp
+++ b/WebCore/html/canvas/WebGLRenderingContext.cpp
@@ -29,8 +29,17 @@
#include "WebGLRenderingContext.h"
+#include "CanvasPixelArray.h"
+#include "HTMLCanvasElement.h"
+#include "HTMLImageElement.h"
+#include "ImageBuffer.h"
+#include "ImageData.h"
+#include "NotImplemented.h"
+#include "RenderBox.h"
+#include "RenderLayer.h"
#include "WebGLActiveInfo.h"
#include "WebGLBuffer.h"
+#include "WebGLContextAttributes.h"
#include "WebGLFramebuffer.h"
#include "WebGLProgram.h"
#include "WebGLRenderbuffer.h"
@@ -44,6 +53,8 @@
#include "RenderBox.h"
#include "RenderLayer.h"
+#include <wtf/ByteArray.h>
+
namespace WebCore {
class WebGLStateRestorer {
@@ -65,9 +76,9 @@ private:
bool m_changed;
};
-PassOwnPtr<WebGLRenderingContext> WebGLRenderingContext::create(HTMLCanvasElement* canvas)
+PassOwnPtr<WebGLRenderingContext> WebGLRenderingContext::create(HTMLCanvasElement* canvas, WebGLContextAttributes* attrs)
{
- OwnPtr<GraphicsContext3D> context(GraphicsContext3D::create());
+ OwnPtr<GraphicsContext3D> context(GraphicsContext3D::create(attrs->attributes()));
if (!context)
return 0;
@@ -574,43 +585,98 @@ void WebGLRenderingContext::disableVertexAttribArray(unsigned long index, Except
cleanupAfterGraphicsCall(false);
}
-bool WebGLRenderingContext::validateIndexArray(unsigned long count, unsigned long type, long offset, long& numElements)
+bool WebGLRenderingContext::validateElementArraySize(unsigned long count, unsigned long type, long offset)
{
- long lastIndex = -1;
if (!m_boundElementArrayBuffer)
return false;
-
+
if (offset < 0)
return false;
-
- // The GL spec says that count must be "greater
-
+
unsigned long uoffset = static_cast<unsigned long>(offset);
-
+
if (type == GraphicsContext3D::UNSIGNED_SHORT) {
// For an unsigned short array, offset must be divisible by 2 for alignment reasons.
if (uoffset & 1)
return false;
-
+
// Make uoffset an element offset.
uoffset /= 2;
-
+
unsigned long n = m_boundElementArrayBuffer->byteLength(GraphicsContext3D::ELEMENT_ARRAY_BUFFER) / 2;
if (uoffset > n || count > n - uoffset)
return false;
-
- const unsigned short* p = static_cast<const unsigned short*>(m_boundElementArrayBuffer->elementArrayBuffer()->data());
+ } else if (type == GraphicsContext3D::UNSIGNED_BYTE) {
+ unsigned long n = m_boundElementArrayBuffer->byteLength(GraphicsContext3D::ELEMENT_ARRAY_BUFFER);
+ if (uoffset > n || count > n - uoffset)
+ return false;
+ }
+ return true;
+}
+
+bool WebGLRenderingContext::validateIndexArrayConservative(unsigned long type, long& numElementsRequired)
+{
+ // Performs conservative validation by caching a maximum index of
+ // the given type per element array buffer. If all of the bound
+ // array buffers have enough elements to satisfy that maximum
+ // index, skips the expensive per-draw-call iteration in
+ // validateIndexArrayPrecise.
+
+ long maxIndex = m_boundElementArrayBuffer->getCachedMaxIndex(type);
+ if (maxIndex < 0) {
+ // Compute the maximum index in the entire buffer for the given type of index.
+ switch (type) {
+ case GraphicsContext3D::UNSIGNED_BYTE: {
+ unsigned numElements = m_boundElementArrayBuffer->byteLength(GraphicsContext3D::ELEMENT_ARRAY_BUFFER);
+ const unsigned char* p = static_cast<const unsigned char*>(m_boundElementArrayBuffer->elementArrayBuffer()->data());
+ for (unsigned i = 0; i < numElements; i++)
+ maxIndex = max(maxIndex, static_cast<long>(p[i]));
+ break;
+ }
+ case GraphicsContext3D::UNSIGNED_SHORT: {
+ unsigned numElements = m_boundElementArrayBuffer->byteLength(GraphicsContext3D::ELEMENT_ARRAY_BUFFER) / sizeof(unsigned short);
+ const unsigned short* p = static_cast<const unsigned short*>(m_boundElementArrayBuffer->elementArrayBuffer()->data());
+ for (unsigned i = 0; i < numElements; i++)
+ maxIndex = max(maxIndex, static_cast<long>(p[i]));
+ break;
+ }
+ default:
+ return false;
+ }
+ m_boundElementArrayBuffer->setCachedMaxIndex(type, maxIndex);
+ }
+
+ if (maxIndex >= 0) {
+ // The number of required elements is one more than the maximum
+ // index that will be accessed.
+ numElementsRequired = maxIndex + 1;
+ return true;
+ }
+
+ return false;
+}
+
+bool WebGLRenderingContext::validateIndexArrayPrecise(unsigned long count, unsigned long type, long offset, long& numElementsRequired)
+{
+ long lastIndex = -1;
+
+ if (!m_boundElementArrayBuffer)
+ return false;
+
+ unsigned long uoffset = static_cast<unsigned long>(offset);
+ unsigned long n = count;
+
+ if (type == GraphicsContext3D::UNSIGNED_SHORT) {
+ // Make uoffset an element offset.
+ uoffset /= 2;
+ const unsigned short* p = static_cast<const unsigned short*>(m_boundElementArrayBuffer->elementArrayBuffer()->data()) + uoffset;
while (n-- > 0) {
if (*p > lastIndex)
lastIndex = *p;
++p;
}
} else if (type == GraphicsContext3D::UNSIGNED_BYTE) {
- unsigned long n = m_boundElementArrayBuffer->byteLength(GraphicsContext3D::ELEMENT_ARRAY_BUFFER);
- if (uoffset > n || count > n - uoffset)
- return false;
-
- const unsigned char* p = static_cast<const unsigned char*>(m_boundElementArrayBuffer->elementArrayBuffer()->data());
+ const unsigned char* p = static_cast<const unsigned char*>(m_boundElementArrayBuffer->elementArrayBuffer()->data()) + uoffset;
while (n-- > 0) {
if (*p > lastIndex)
lastIndex = *p;
@@ -619,11 +685,11 @@ bool WebGLRenderingContext::validateIndexArray(unsigned long count, unsigned lon
}
// Then set the last index in the index array and make sure it is valid.
- numElements = lastIndex + 1;
- return numElements > 0;
+ numElementsRequired = lastIndex + 1;
+ return numElementsRequired > 0;
}
-bool WebGLRenderingContext::validateRenderingState(long numElements)
+bool WebGLRenderingContext::validateRenderingState(long numElementsRequired)
{
// Look in each enabled vertex attrib and find the smallest buffer size
long smallestNumElements = LONG_MAX;
@@ -636,7 +702,7 @@ bool WebGLRenderingContext::validateRenderingState(long numElements)
if (smallestNumElements == LONG_MAX)
smallestNumElements = 0;
- return numElements <= smallestNumElements;
+ return numElementsRequired <= smallestNumElements;
}
void WebGLRenderingContext::drawArrays(unsigned long mode, long first, long count, ExceptionCode& ec)
@@ -658,10 +724,16 @@ void WebGLRenderingContext::drawElements(unsigned long mode, unsigned long count
// Ensure we have a valid rendering state
long numElements;
- if (offset < 0 || !validateIndexArray(count, type, offset, numElements) || !validateRenderingState(numElements)) {
+ if (offset < 0 || !validateElementArraySize(count, type, offset)) {
m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
return;
}
+
+ if (!validateIndexArrayConservative(type, numElements) || !validateRenderingState(numElements))
+ if (!validateIndexArrayPrecise(count, type, offset, numElements) || !validateRenderingState(numElements)) {
+ m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
+ return;
+ }
m_context->drawElements(mode, count, type, offset);
cleanupAfterGraphicsCall(true);
@@ -710,6 +782,13 @@ void WebGLRenderingContext::framebufferRenderbuffer(unsigned long target, unsign
m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
return;
}
+ // Don't allow the default framebuffer to be mutated; all current
+ // implementations use an FBO internally in place of the default
+ // FBO.
+ if (!m_framebufferBinding || !m_framebufferBinding->object()) {
+ m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
+ return;
+ }
m_context->framebufferRenderbuffer(target, attachment, renderbuffertarget, buffer);
cleanupAfterGraphicsCall(false);
}
@@ -721,6 +800,13 @@ void WebGLRenderingContext::framebufferTexture2D(unsigned long target, unsigned
m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
return;
}
+ // Don't allow the default framebuffer to be mutated; all current
+ // implementations use an FBO internally in place of the default
+ // FBO.
+ if (!m_framebufferBinding || !m_framebufferBinding->object()) {
+ m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
+ return;
+ }
m_context->framebufferTexture2D(target, attachment, textarget, texture, level);
cleanupAfterGraphicsCall(false);
}
@@ -792,6 +878,13 @@ WebGLGetInfo WebGLRenderingContext::getBufferParameter(unsigned long target, uns
return WebGLGetInfo(static_cast<unsigned long>(value));
}
+PassRefPtr<WebGLContextAttributes> WebGLRenderingContext::getContextAttributes()
+{
+ // We always need to return a new WebGLContextAttributes object to
+ // prevent the user from mutating any cached version.
+ return WebGLContextAttributes::create(m_context->getContextAttributes());
+}
+
unsigned long WebGLRenderingContext::getError()
{
return m_context->getError();
@@ -1530,25 +1623,28 @@ void WebGLRenderingContext::texImage2D(unsigned target, unsigned level, unsigned
unsigned format, unsigned type, WebGLArray* pixels, ExceptionCode& ec)
{
// FIXME: For now we ignore any errors returned
+ // FIXME: Need to make sure passed buffer has enough bytes to define the texture
ec = 0;
m_context->texImage2D(target, level, internalformat, width, height,
- border, format, type, pixels);
+ border, format, type, pixels ? pixels->baseAddress() : 0);
cleanupAfterGraphicsCall(false);
}
-void WebGLRenderingContext::texImage2D(unsigned target, unsigned level, unsigned internalformat,
- unsigned width, unsigned height, unsigned border,
- unsigned format, unsigned type, ImageData* pixels, ExceptionCode& ec)
+void WebGLRenderingContext::texImage2D(unsigned target, unsigned level, ImageData* pixels,
+ bool flipY, bool premultiplyAlpha, ExceptionCode& ec)
{
// FIXME: For now we ignore any errors returned
+ // FIXME: Need a form of this call that can take both a pixel buffer and flipY and premultiplyAlpha flags
+ UNUSED_PARAM(flipY);
+ UNUSED_PARAM(premultiplyAlpha);
ec = 0;
- m_context->texImage2D(target, level, internalformat, width, height,
- border, format, type, pixels);
+ m_context->texImage2D(target, level, GraphicsContext3D::RGBA, pixels->width(), pixels->height(), 0, GraphicsContext3D::RGBA, GraphicsContext3D::UNSIGNED_BYTE, pixels->data()->data()->data());
+ //RLP: m_context->texImage2D(target, level, pixels, flipY, premultiplyAlpha);
cleanupAfterGraphicsCall(false);
}
void WebGLRenderingContext::texImage2D(unsigned target, unsigned level, HTMLImageElement* image,
- bool flipY, bool premultiplyAlpha, ExceptionCode& ec)
+ bool flipY, bool premultiplyAlpha, ExceptionCode& ec)
{
ec = 0;
if (!image) {
@@ -1590,9 +1686,14 @@ void WebGLRenderingContext::texImage2D(unsigned target, unsigned level, HTMLCanv
void WebGLRenderingContext::texImage2D(unsigned target, unsigned level, HTMLVideoElement* video,
bool flipY, bool premultiplyAlpha, ExceptionCode& ec)
{
- // FIXME: For now we ignore any errors returned
+ // FIXME: Need implement this call
+ UNUSED_PARAM(target);
+ UNUSED_PARAM(level);
+ UNUSED_PARAM(video);
+ UNUSED_PARAM(flipY);
+ UNUSED_PARAM(premultiplyAlpha);
+
ec = 0;
- m_context->texImage2D(target, level, video, flipY, premultiplyAlpha);
cleanupAfterGraphicsCall(false);
}
@@ -1613,24 +1714,26 @@ void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, unsig
unsigned format, unsigned type, WebGLArray* pixels, ExceptionCode& ec)
{
// FIXME: For now we ignore any errors returned
+ // FIXME: Need to make sure passed buffer has enough bytes to define the texture
ec = 0;
- m_context->texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+ m_context->texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels ? pixels->baseAddress() : 0);
cleanupAfterGraphicsCall(false);
}
void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
- unsigned width, unsigned height,
- unsigned format, unsigned type, ImageData* pixels, ExceptionCode& ec)
+ ImageData* pixels, bool flipY, bool premultiplyAlpha, ExceptionCode& ec)
{
// FIXME: For now we ignore any errors returned
+ UNUSED_PARAM(flipY);
+ UNUSED_PARAM(premultiplyAlpha);
ec = 0;
- m_context->texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+ m_context->texSubImage2D(target, level, xoffset, yoffset, pixels->width(), pixels->height(), GraphicsContext3D::RGBA, GraphicsContext3D::UNSIGNED_BYTE, pixels->data()->data()->data());
+ //RLP: m_context->texSubImage2D(target, level, xoffset, yoffset, pixels, flipY, premultiplyAlpha);
cleanupAfterGraphicsCall(false);
}
void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
- unsigned width, unsigned height, HTMLImageElement* image,
- bool flipY, bool premultiplyAlpha, ExceptionCode& ec)
+ HTMLImageElement* image, bool flipY, bool premultiplyAlpha, ExceptionCode& ec)
{
// FIXME: For now we ignore any errors returned
ec = 0;
@@ -1645,13 +1748,12 @@ void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, unsig
return;
}
- m_context->texSubImage2D(target, level, xoffset, yoffset, width, height, cachedImage->image(), flipY, premultiplyAlpha);
+ m_context->texSubImage2D(target, level, xoffset, yoffset, cachedImage->image(), flipY, premultiplyAlpha);
cleanupAfterGraphicsCall(false);
}
void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
- unsigned width, unsigned height, HTMLCanvasElement* canvas,
- bool flipY, bool premultiplyAlpha, ExceptionCode& ec)
+ HTMLCanvasElement* canvas, bool flipY, bool premultiplyAlpha, ExceptionCode& ec)
{
ec = 0;
if (!canvas) {
@@ -1666,17 +1768,22 @@ void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, unsig
}
// FIXME: For now we ignore any errors returned
- m_context->texSubImage2D(target, level, xoffset, yoffset, width, height, buffer->image(), flipY, premultiplyAlpha);
+ m_context->texSubImage2D(target, level, xoffset, yoffset, buffer->image(), flipY, premultiplyAlpha);
cleanupAfterGraphicsCall(false);
}
void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
- unsigned width, unsigned height, HTMLVideoElement* video,
- bool flipY, bool premultiplyAlpha, ExceptionCode& ec)
-{
- // FIXME: For now we ignore any errors returned
+ HTMLVideoElement* video, bool flipY, bool premultiplyAlpha, ExceptionCode& ec)
+{
+ // FIXME: Need to implement this call
+ UNUSED_PARAM(target);
+ UNUSED_PARAM(level);
+ UNUSED_PARAM(xoffset);
+ UNUSED_PARAM(yoffset);
+ UNUSED_PARAM(video);
+ UNUSED_PARAM(flipY);
+ UNUSED_PARAM(premultiplyAlpha);
ec = 0;
- m_context->texSubImage2D(target, level, xoffset, yoffset, width, height, video, flipY, premultiplyAlpha);
cleanupAfterGraphicsCall(false);
}
diff --git a/WebCore/html/canvas/WebGLRenderingContext.h b/WebCore/html/canvas/WebGLRenderingContext.h
index 3335eba..90d4fab 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.h
+++ b/WebCore/html/canvas/WebGLRenderingContext.h
@@ -39,6 +39,7 @@ namespace WebCore {
class WebGLActiveInfo;
class WebGLBuffer;
+class WebGLContextAttributes;
class WebGLFramebuffer;
class CanvasObject;
class WebGLProgram;
@@ -53,7 +54,7 @@ class WebKitCSSMatrix;
class WebGLRenderingContext : public CanvasRenderingContext {
public:
- static PassOwnPtr<WebGLRenderingContext> create(HTMLCanvasElement*);
+ static PassOwnPtr<WebGLRenderingContext> create(HTMLCanvasElement*, WebGLContextAttributes*);
virtual ~WebGLRenderingContext();
virtual bool is3d() const { return true; }
@@ -134,6 +135,8 @@ class WebKitCSSMatrix;
WebGLGetInfo getBufferParameter(unsigned long target, unsigned long pname, ExceptionCode&);
+ PassRefPtr<WebGLContextAttributes> getContextAttributes();
+
unsigned long getError();
WebGLGetInfo getFramebufferAttachmentParameter(unsigned long target, unsigned long attachment, unsigned long pname, ExceptionCode&);
@@ -196,9 +199,8 @@ class WebKitCSSMatrix;
void texImage2D(unsigned target, unsigned level, unsigned internalformat,
unsigned width, unsigned height, unsigned border,
unsigned format, unsigned type, WebGLArray* pixels, ExceptionCode&);
- void texImage2D(unsigned target, unsigned level, unsigned internalformat,
- unsigned width, unsigned height, unsigned border,
- unsigned format, unsigned type, ImageData* pixels, ExceptionCode&);
+ void texImage2D(unsigned target, unsigned level, ImageData* pixels,
+ bool flipY, bool premultiplyAlpha, ExceptionCode&);
void texImage2D(unsigned target, unsigned level, HTMLImageElement* image,
bool flipY, bool premultiplyAlpha, ExceptionCode&);
void texImage2D(unsigned target, unsigned level, HTMLCanvasElement* canvas,
@@ -213,17 +215,13 @@ class WebKitCSSMatrix;
unsigned width, unsigned height,
unsigned format, unsigned type, WebGLArray* pixels, ExceptionCode&);
void texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
- unsigned width, unsigned height,
- unsigned format, unsigned type, ImageData* pixels, ExceptionCode&);
+ ImageData* pixels, bool flipY, bool premultiplyAlpha, ExceptionCode&);
void texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
- unsigned width, unsigned height, HTMLImageElement* image,
- bool flipY, bool premultiplyAlpha, ExceptionCode&);
+ HTMLImageElement* image, bool flipY, bool premultiplyAlpha, ExceptionCode&);
void texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
- unsigned width, unsigned height, HTMLCanvasElement* canvas,
- bool flipY, bool premultiplyAlpha, ExceptionCode&);
+ HTMLCanvasElement* canvas, bool flipY, bool premultiplyAlpha, ExceptionCode&);
void texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
- unsigned width, unsigned height, HTMLVideoElement* video,
- bool flipY, bool premultiplyAlpha, ExceptionCode&);
+ HTMLVideoElement* video, bool flipY, bool premultiplyAlpha, ExceptionCode&);
void uniform1f(const WebGLUniformLocation* location, float x, ExceptionCode&);
void uniform1fv(const WebGLUniformLocation* location, WebGLFloatArray* v, ExceptionCode&);
@@ -301,7 +299,14 @@ class WebKitCSSMatrix;
markContextChanged();
}
- bool validateIndexArray(unsigned long count, unsigned long type, long offset, long& numElements);
+ // Basic validation of count and offset against number of elements in element array buffer
+ bool validateElementArraySize(unsigned long count, unsigned long type, long offset);
+
+ // Conservative but quick index validation
+ bool validateIndexArrayConservative(unsigned long type, long& numElementsRequired);
+
+ // Precise but slow index validation -- only done if conservative checks fail
+ bool validateIndexArrayPrecise(unsigned long count, unsigned long type, long offset, long& numElementsRequired);
bool validateRenderingState(long numElements);
OwnPtr<GraphicsContext3D> m_context;
diff --git a/WebCore/html/canvas/WebGLRenderingContext.idl b/WebCore/html/canvas/WebGLRenderingContext.idl
index 78de8c8..ce01f43 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.idl
+++ b/WebCore/html/canvas/WebGLRenderingContext.idl
@@ -27,7 +27,6 @@ module html {
interface [
Conditional=3D_CANVAS,
- GenerateConstructor,
InterfaceUUID=98fb48ae-7216-489c-862b-8e1217fc4443,
ImplementationUUID=ab4f0781-152f-450e-9546-5b3987491a54
] WebGLRenderingContext : CanvasRenderingContext {
@@ -542,6 +541,8 @@ module html {
// any getBufferParameter(in unsigned long target, in unsigned long pname) raises(DOMException);
[Custom] void getBufferParameter();
+ WebGLContextAttributes getContextAttributes();
+
unsigned long getError();
// any getFramebufferAttachmentParameter(in unsigned long target, in unsigned long attachment, in unsigned long pname) raises(DOMException);
@@ -610,8 +611,8 @@ module html {
// Supported forms:
// void texImage2D(in GLenum target, in GLint level, in GLenum internalformat, in GLsizei width, in GLsizei height,
// in GLint border, in GLenum format, in GLenum type, in WebGLArray pixels);
- // void texImage2D(in GLenum target, in GLint level, in GLenum internalformat, in GLsizei width, in GLsizei height,
- // in GLint border, in GLenum format, in GLenum type, in ImageData pixels);
+ // void texImage2D(in GLenum target, in GLint level, in ImageData pixels,
+ // [Optional] in GLboolean flipY, [Optional] in premultiplyAlpha);
// void texImage2D(in GLenum target, in GLint level, in HTMLImageElement image,
// [Optional] in GLboolean flipY, [Optional] in premultiplyAlpha);
// void texImage2D(in GLenum target, in GLint level, in HTMLCanvasElement canvas,
@@ -624,18 +625,14 @@ module html {
// void texSubImage2D(in GLenum target, in GLint level, in GLint xoffset, in GLint yoffset,
// in GLsizei width, in GLsizei height,
// in GLenum format, in GLenum type, in WebGLArray pixels);
+ // void texSubImage2D(in GLenum target, in GLint level, in GLint xoffset, in GLint yoffset,
+ // in ImageData pixels, [Optional] GLboolean flipY, [Optional] in premultiplyAlpha);
// void texSubImage2D(in GLenum target, in GLint level, in GLint xoffset, in GLint yoffset,
- // in GLsizei width, in GLsizei height,
- // in GLenum format, in GLenum type, in ImageData pixels);
- // void texSubImage2D(in GLenum target, in GLint level, in GLint xoffset, in GLint yoffset,
- // in GLsizei width, in GLsizei height, in HTMLImageElement image,
- // [Optional] GLboolean flipY, [Optional] in premultiplyAlpha);
+ // in HTMLImageElement image, [Optional] GLboolean flipY, [Optional] in premultiplyAlpha);
// void texSubImage2D(in GLenum target, in GLint level, in GLint xoffset, in GLint yoffset,
- // in GLsizei width, in GLsizei height, in HTMLCanvasElement canvas,
- // [Optional] GLboolean flipY, [Optional] in premultiplyAlpha);
+ // in HTMLCanvasElement canvas, [Optional] GLboolean flipY, [Optional] in premultiplyAlpha);
// void texSubImage2D(in GLenum target, in GLint level, in GLint xoffset, in GLint yoffset,
- // in GLsizei width, in GLsizei height, in HTMLVideoElement video,
- // [Optional] GLboolean flipY, [Optional] in premultiplyAlpha);
+ // in HTMLVideoElement video, [Optional] GLboolean flipY, [Optional] in premultiplyAlpha);
[Custom] void texSubImage2D();
void uniform1f(in WebGLUniformLocation location, in float x) raises(DOMException);
diff --git a/WebCore/html/canvas/WebGLShader.idl b/WebCore/html/canvas/WebGLShader.idl
index 45e7f54..2d79e49 100644
--- a/WebCore/html/canvas/WebGLShader.idl
+++ b/WebCore/html/canvas/WebGLShader.idl
@@ -24,6 +24,6 @@
*/
module html {
- interface [Conditional=3D_CANVAS] WebGLShader {
+ interface [Conditional=3D_CANVAS, OmitConstructor] WebGLShader {
};
}
diff --git a/WebCore/html/canvas/WebGLShortArray.idl b/WebCore/html/canvas/WebGLShortArray.idl
index bd8380f..59dce76 100644
--- a/WebCore/html/canvas/WebGLShortArray.idl
+++ b/WebCore/html/canvas/WebGLShortArray.idl
@@ -29,7 +29,7 @@ module html {
HasNumericIndexGetter,
HasCustomIndexSetter,
GenerateNativeConverter,
- GenerateCustomConstructor,
+ CustomConstructor,
CustomToJS
] WebGLShortArray : WebGLArray {
long get(in unsigned long index);
diff --git a/WebCore/html/canvas/WebGLTexture.idl b/WebCore/html/canvas/WebGLTexture.idl
index da7e066..0200e7e 100644
--- a/WebCore/html/canvas/WebGLTexture.idl
+++ b/WebCore/html/canvas/WebGLTexture.idl
@@ -24,6 +24,6 @@
*/
module html {
- interface [Conditional=3D_CANVAS] WebGLTexture {
+ interface [Conditional=3D_CANVAS, OmitConstructor] WebGLTexture {
};
}
diff --git a/WebCore/html/canvas/WebGLUniformLocation.idl b/WebCore/html/canvas/WebGLUniformLocation.idl
index b080241..f25e834 100644
--- a/WebCore/html/canvas/WebGLUniformLocation.idl
+++ b/WebCore/html/canvas/WebGLUniformLocation.idl
@@ -25,6 +25,6 @@
*/
module html {
- interface [Conditional=3D_CANVAS] WebGLUniformLocation {
+ interface [Conditional=3D_CANVAS, OmitConstructor] WebGLUniformLocation {
};
}
diff --git a/WebCore/html/canvas/WebGLUnsignedByteArray.idl b/WebCore/html/canvas/WebGLUnsignedByteArray.idl
index 57aa4ff..4de8b42 100644
--- a/WebCore/html/canvas/WebGLUnsignedByteArray.idl
+++ b/WebCore/html/canvas/WebGLUnsignedByteArray.idl
@@ -30,7 +30,7 @@ module html {
HasNumericIndexGetter,
HasCustomIndexSetter,
GenerateNativeConverter,
- GenerateCustomConstructor,
+ CustomConstructor,
CustomToJS
] WebGLUnsignedByteArray : WebGLArray {
long get(in unsigned long index);
diff --git a/WebCore/html/canvas/WebGLUnsignedIntArray.idl b/WebCore/html/canvas/WebGLUnsignedIntArray.idl
index 8697e70..75ff598 100644
--- a/WebCore/html/canvas/WebGLUnsignedIntArray.idl
+++ b/WebCore/html/canvas/WebGLUnsignedIntArray.idl
@@ -27,13 +27,13 @@
module html {
interface [
Conditional=3D_CANVAS,
+ CustomConstructor,
HasNumericIndexGetter,
HasCustomIndexSetter,
GenerateNativeConverter,
- GenerateCustomConstructor,
CustomToJS
] WebGLUnsignedIntArray : WebGLArray {
- long get(in unsigned long index);
+ unsigned long get(in unsigned long index);
// void set(in unsigned long index, in long value);
// void set(in WebGLUnsignedIntArray array, [Optional] in unsigned long offset);
// void set(in sequence<long> array, [Optional] in unsigned long offset);
diff --git a/WebCore/html/canvas/WebGLUnsignedShortArray.idl b/WebCore/html/canvas/WebGLUnsignedShortArray.idl
index d546444..fc53929 100644
--- a/WebCore/html/canvas/WebGLUnsignedShortArray.idl
+++ b/WebCore/html/canvas/WebGLUnsignedShortArray.idl
@@ -27,10 +27,10 @@
module html {
interface [
Conditional=3D_CANVAS,
+ CustomConstructor,
HasNumericIndexGetter,
HasCustomIndexSetter,
GenerateNativeConverter,
- GenerateCustomConstructor,
CustomToJS
] WebGLUnsignedShortArray : WebGLArray {
long get(in unsigned long index);
diff --git a/WebCore/inspector/ConsoleMessage.cpp b/WebCore/inspector/ConsoleMessage.cpp
index fe32da7..5539e9d 100644
--- a/WebCore/inspector/ConsoleMessage.cpp
+++ b/WebCore/inspector/ConsoleMessage.cpp
@@ -54,7 +54,8 @@ ConsoleMessage::ConsoleMessage(MessageSource s, MessageType t, MessageLevel l, S
, m_type(t)
, m_level(l)
#if ENABLE(INSPECTOR)
- , m_wrappedArguments(callStack->at(0).argumentCount())
+ , m_arguments(callStack->at(0).argumentCount())
+ , m_scriptState(callStack->globalState())
#endif
, m_frames(storeTrace ? callStack->size() : 0)
, m_groupLevel(g)
@@ -74,7 +75,7 @@ ConsoleMessage::ConsoleMessage(MessageSource s, MessageType t, MessageLevel l, S
#if ENABLE(INSPECTOR)
for (unsigned i = 0; i < lastCaller.argumentCount(); ++i)
- m_wrappedArguments[i] = ScriptObject::quarantineValue(callStack->state(), lastCaller.argumentAt(i));
+ m_arguments[i] = lastCaller.argumentAt(i);
#endif
}
@@ -89,7 +90,7 @@ void ConsoleMessage::addToConsole(InspectorFrontend* frontend)
jsonObj.set("url", m_url);
jsonObj.set("groupLevel", static_cast<int>(m_groupLevel));
jsonObj.set("repeatCount", static_cast<int>(m_repeatCount));
- frontend->addConsoleMessage(jsonObj, m_frames, m_wrappedArguments, m_message);
+ frontend->addConsoleMessage(jsonObj, m_frames, m_scriptState, m_arguments, m_message);
}
void ConsoleMessage::updateRepeatCountInConsole(InspectorFrontend* frontend)
@@ -101,15 +102,15 @@ void ConsoleMessage::updateRepeatCountInConsole(InspectorFrontend* frontend)
bool ConsoleMessage::isEqual(ScriptState* state, ConsoleMessage* msg) const
{
#if ENABLE(INSPECTOR)
- if (msg->m_wrappedArguments.size() != m_wrappedArguments.size())
+ if (msg->m_arguments.size() != m_arguments.size())
return false;
- if (!state && msg->m_wrappedArguments.size())
+ if (!state && msg->m_arguments.size())
return false;
- ASSERT_ARG(state, state || msg->m_wrappedArguments.isEmpty());
+ ASSERT_ARG(state, state || msg->m_arguments.isEmpty());
- for (size_t i = 0; i < msg->m_wrappedArguments.size(); ++i) {
- if (!m_wrappedArguments[i].isEqual(state, msg->m_wrappedArguments[i]))
+ for (size_t i = 0; i < msg->m_arguments.size(); ++i) {
+ if (!m_arguments[i].isEqual(state, msg->m_arguments[i]))
return false;
}
#else
diff --git a/WebCore/inspector/ConsoleMessage.h b/WebCore/inspector/ConsoleMessage.h
index 8ed6660..e9ae130 100644
--- a/WebCore/inspector/ConsoleMessage.h
+++ b/WebCore/inspector/ConsoleMessage.h
@@ -42,7 +42,7 @@ namespace WebCore {
class ScriptCallStack;
class ScriptString;
- class ConsoleMessage {
+ class ConsoleMessage : public Noncopyable {
public:
ConsoleMessage(MessageSource, MessageType, MessageLevel, const String& m, unsigned li, const String& u, unsigned g);
ConsoleMessage(MessageSource, MessageType, MessageLevel, ScriptCallStack*, unsigned g, bool storeTrace = false);
@@ -63,7 +63,8 @@ namespace WebCore {
MessageLevel m_level;
String m_message;
#if ENABLE(INSPECTOR)
- Vector<ScriptValue> m_wrappedArguments;
+ Vector<ScriptValue> m_arguments;
+ ScriptState* m_scriptState;
#endif
Vector<ScriptString> m_frames;
unsigned m_line;
diff --git a/WebCore/inspector/InjectedScriptHost.cpp b/WebCore/inspector/InjectedScriptHost.cpp
index f326f52..d5bbd1c 100644
--- a/WebCore/inspector/InjectedScriptHost.cpp
+++ b/WebCore/inspector/InjectedScriptHost.cpp
@@ -72,6 +72,7 @@ namespace WebCore {
InjectedScriptHost::InjectedScriptHost(InspectorController* inspectorController)
: m_inspectorController(inspectorController)
+ , m_nextInjectedScriptId(1)
{
}
@@ -79,6 +80,12 @@ InjectedScriptHost::~InjectedScriptHost()
{
}
+void InjectedScriptHost::clearConsoleMessages()
+{
+ if (m_inspectorController)
+ m_inspectorController->clearConsoleMessages();
+}
+
void InjectedScriptHost::copyText(const String& text)
{
Pasteboard::generalPasteboard()->writePlainText(text);
@@ -91,27 +98,15 @@ Node* InjectedScriptHost::nodeForId(long nodeId)
return 0;
}
-ScriptValue InjectedScriptHost::wrapObject(const ScriptValue& object, const String& objectGroup)
-{
- if (m_inspectorController)
- return m_inspectorController->wrapObject(object, objectGroup);
- return ScriptValue();
-}
-
-ScriptValue InjectedScriptHost::unwrapObject(const String& objectId)
-{
- if (m_inspectorController)
- return m_inspectorController->unwrapObject(objectId);
- return ScriptValue();
-}
-
-long InjectedScriptHost::pushNodePathToFrontend(Node* node, bool selectInUI)
+long InjectedScriptHost::pushNodePathToFrontend(Node* node, bool withChildren, bool selectInUI)
{
InspectorFrontend* frontend = inspectorFrontend();
InspectorDOMAgent* domAgent = inspectorDOMAgent();
if (!domAgent || !frontend)
return 0;
long id = domAgent->pushNodePathToFrontend(node);
+ if (withChildren)
+ domAgent->pushChildNodesToFrontend(id);
if (selectInUI)
frontend->updateFocusedNode(id);
return id;
@@ -172,6 +167,29 @@ void InjectedScriptHost::reportDidDispatchOnInjectedScript(long callId, const St
frontend->didDispatchOnInjectedScript(callId, result, isException);
}
+ScriptObject InjectedScriptHost::injectedScriptForId(long id)
+{
+ return m_idToInjectedScript.get(id);
+}
+
+void InjectedScriptHost::discardInjectedScripts()
+{
+ m_idToInjectedScript.clear();
+}
+
+void InjectedScriptHost::releaseWrapperObjectGroup(long injectedScriptId, const String& objectGroup)
+{
+ if (injectedScriptId) {
+ ScriptObject injectedScript = m_idToInjectedScript.get(injectedScriptId);
+ if (!injectedScript.hasNoValue())
+ releaseWrapperObjectGroup(injectedScript, objectGroup);
+ } else {
+ // Iterate over all injected scripts if injectedScriptId is not specified.
+ for (IdToInjectedScriptMap::iterator it = m_idToInjectedScript.begin(); it != m_idToInjectedScript.end(); ++it)
+ releaseWrapperObjectGroup(it->second, objectGroup);
+ }
+}
+
InspectorDOMAgent* InjectedScriptHost::inspectorDOMAgent()
{
if (!m_inspectorController)
@@ -186,6 +204,13 @@ InspectorFrontend* InjectedScriptHost::inspectorFrontend()
return m_inspectorController->m_frontend.get();
}
+void InjectedScriptHost::releaseWrapperObjectGroup(const ScriptObject& injectedScript, const String& objectGroup)
+{
+ ScriptFunctionCall releaseFunction(injectedScript.scriptState(), injectedScript, "releaseWrapperObjectGroup");
+ releaseFunction.appendArgument(objectGroup);
+ releaseFunction.call();
+}
+
} // namespace WebCore
#endif // ENABLE(INSPECTOR)
diff --git a/WebCore/inspector/InjectedScriptHost.h b/WebCore/inspector/InjectedScriptHost.h
index aa2fd76..d91c8e2 100644
--- a/WebCore/inspector/InjectedScriptHost.h
+++ b/WebCore/inspector/InjectedScriptHost.h
@@ -33,7 +33,9 @@
#include "Console.h"
#include "InspectorController.h"
#include "PlatformString.h"
+#include "ScriptState.h"
+#include <wtf/HashMap.h>
#include <wtf/RefCounted.h>
namespace WebCore {
@@ -55,14 +57,16 @@ public:
~InjectedScriptHost();
+ void setInjectedScriptSource(const String& source) { m_injectedScriptSource = source; }
+
InspectorController* inspectorController() { return m_inspectorController; }
void disconnectController() { m_inspectorController = 0; }
+ void clearConsoleMessages();
+
void copyText(const String& text);
Node* nodeForId(long nodeId);
- ScriptValue wrapObject(const ScriptValue& object, const String& objectGroup);
- ScriptValue unwrapObject(const String& objectId);
- long pushNodePathToFrontend(Node* node, bool selectInUI);
+ long pushNodePathToFrontend(Node* node, bool withChildren, bool selectInUI);
void addNodesToSearchResult(const String& nodeIds);
long pushNodeByPathToFrontend(const String& path);
@@ -79,12 +83,23 @@ public:
#endif
void reportDidDispatchOnInjectedScript(long callId, const String& result, bool isException);
+ ScriptObject injectedScriptFor(ScriptState*);
+ ScriptObject injectedScriptForId(long);
+ void discardInjectedScripts();
+ void releaseWrapperObjectGroup(long injectedScriptId, const String& objectGroup);
+
private:
InjectedScriptHost(InspectorController* inspectorController);
InspectorDOMAgent* inspectorDOMAgent();
InspectorFrontend* inspectorFrontend();
+ void releaseWrapperObjectGroup(const ScriptObject& injectedScript, const String& objectGroup);
+
InspectorController* m_inspectorController;
+ String m_injectedScriptSource;
+ long m_nextInjectedScriptId;
+ typedef HashMap<long, ScriptObject> IdToInjectedScriptMap;
+ IdToInjectedScriptMap m_idToInjectedScript;
};
} // namespace WebCore
diff --git a/WebCore/inspector/InjectedScriptHost.idl b/WebCore/inspector/InjectedScriptHost.idl
index be627ec..d224d1a 100644
--- a/WebCore/inspector/InjectedScriptHost.idl
+++ b/WebCore/inspector/InjectedScriptHost.idl
@@ -31,22 +31,19 @@
*/
module core {
- interface [
- GenerateConstructor
- ] InjectedScriptHost {
- [Custom] DOMWindow inspectedWindow();
- [Custom] DOMObject wrapCallback(in DOMObject callback);
+ interface [Conditional=INSPECTOR] InjectedScriptHost {
+ void clearConsoleMessages();
+
void copyText(in DOMString text);
[Custom] DOMObject nodeForId(in long nodeId);
- [Custom] long wrapObject(in DOMObject object, in DOMString objectGroup);
- [Custom] DOMObject unwrapObject(in long objectId);
- [Custom] int pushNodePathToFrontend(in DOMObject node, in boolean selectInUI);
+ [Custom] int pushNodePathToFrontend(in DOMObject node, in boolean withChildren, in boolean selectInUI);
void addNodesToSearchResult(in DOMString nodeIds);
long pushNodeByPathToFrontend(in DOMString path);
#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
[Custom] DOMObject currentCallFrame();
+ [Custom] boolean isActivation(in DOMObject object);
#endif
#if defined(ENABLE_DATABASE) && ENABLE_DATABASE
diff --git a/WebCore/inspector/InspectorBackend.cpp b/WebCore/inspector/InspectorBackend.cpp
index 11f58c7..999a4b7 100644
--- a/WebCore/inspector/InspectorBackend.cpp
+++ b/WebCore/inspector/InspectorBackend.cpp
@@ -40,6 +40,7 @@
#include "Frame.h"
#include "FrameLoader.h"
#include "HTMLFrameOwnerElement.h"
+#include "InjectedScriptHost.h"
#include "InspectorClient.h"
#include "InspectorController.h"
#include "InspectorDOMAgent.h"
@@ -77,10 +78,10 @@ InspectorBackend::~InspectorBackend()
{
}
-void InspectorBackend::clearMessages(bool clearUI)
+void InspectorBackend::saveFrontendSettings(const String& settings)
{
if (m_inspectorController)
- m_inspectorController->clearConsoleMessages(clearUI);
+ m_inspectorController->setSetting(InspectorController::FrontendSettingsSettingName, settings);
}
void InspectorBackend::storeLastActivePanel(const String& panelName)
@@ -121,6 +122,19 @@ void InspectorBackend::disableResourceTracking(bool always)
m_inspectorController->disableResourceTracking(always);
}
+void InspectorBackend::getResourceContent(long callId, unsigned long identifier)
+{
+ InspectorFrontend* frontend = inspectorFrontend();
+ if (!frontend)
+ return;
+
+ RefPtr<InspectorResource> resource = m_inspectorController->resources().get(identifier);
+ if (resource)
+ frontend->didGetResourceContent(callId, resource->sourceString());
+ else
+ frontend->didGetResourceContent(callId, "");
+}
+
void InspectorBackend::startTimelineProfiler()
{
if (m_inspectorController)
@@ -197,14 +211,14 @@ void InspectorBackend::stepOutOfFunctionInDebugger()
JavaScriptDebugServer::shared().stepOutOfFunction();
}
-bool InspectorBackend::pauseOnExceptions()
+long InspectorBackend::pauseOnExceptionsState()
{
- return JavaScriptDebugServer::shared().pauseOnExceptions();
+ return JavaScriptDebugServer::shared().pauseOnExceptionsState();
}
-void InspectorBackend::setPauseOnExceptions(bool pause)
+void InspectorBackend::setPauseOnExceptionsState(long pauseState)
{
- JavaScriptDebugServer::shared().setPauseOnExceptions(pause);
+ JavaScriptDebugServer::shared().setPauseOnExceptionsState(static_cast<JavaScriptDebugServer::PauseOnExceptionsState>(pauseState));
}
bool InspectorBackend::profilerEnabled()
@@ -256,13 +270,31 @@ JavaScriptCallFrame* InspectorBackend::currentCallFrame() const
}
#endif
-void InspectorBackend::dispatchOnInjectedScript(long callId, const String& methodName, const String& arguments, bool async)
+void InspectorBackend::setInjectedScriptSource(const String& source)
+{
+ if (m_inspectorController)
+ m_inspectorController->injectedScriptHost()->setInjectedScriptSource(source);
+}
+
+void InspectorBackend::dispatchOnInjectedScript(long callId, long injectedScriptId, const String& methodName, const String& arguments, bool async)
{
InspectorFrontend* frontend = inspectorFrontend();
if (!frontend)
return;
- ScriptFunctionCall function(m_inspectorController->m_scriptState, m_inspectorController->m_injectedScriptObj, "dispatch");
+ // FIXME: explicitly pass injectedScriptId along with node id to the frontend.
+ bool injectedScriptIdIsNodeId = injectedScriptId <= 0;
+
+ ScriptObject injectedScript;
+ if (injectedScriptIdIsNodeId)
+ injectedScript = m_inspectorController->injectedScriptForNodeId(-injectedScriptId);
+ else
+ injectedScript = m_inspectorController->injectedScriptHost()->injectedScriptForId(injectedScriptId);
+
+ if (injectedScript.hasNoValue())
+ return;
+
+ ScriptFunctionCall function(injectedScript.scriptState(), injectedScript, "dispatch");
function.appendArgument(methodName);
function.appendArgument(arguments);
if (async)
@@ -274,7 +306,7 @@ void InspectorBackend::dispatchOnInjectedScript(long callId, const String& metho
if (hadException)
frontend->didDispatchOnInjectedScript(callId, "", true);
else
- frontend->didDispatchOnInjectedScript(callId, result.toString(m_inspectorController->m_scriptState), false);
+ frontend->didDispatchOnInjectedScript(callId, result.toString(injectedScript.scriptState()), false);
}
void InspectorBackend::getChildNodes(long callId, long nodeId)
@@ -371,10 +403,11 @@ void InspectorBackend::deleteCookie(const String& cookieName, const String& doma
m_inspectorController->deleteCookie(cookieName, domain);
}
-void InspectorBackend::releaseWrapperObjectGroup(const String& objectGroup)
+void InspectorBackend::releaseWrapperObjectGroup(long injectedScriptId, const String& objectGroup)
{
- if (m_inspectorController)
- m_inspectorController->releaseWrapperObjectGroup(objectGroup);
+ if (!m_inspectorController)
+ return;
+ m_inspectorController->injectedScriptHost()->releaseWrapperObjectGroup(injectedScriptId, objectGroup);
}
void InspectorBackend::didEvaluateForTestInFrontend(long callId, const String& jsonResult)
diff --git a/WebCore/inspector/InspectorBackend.h b/WebCore/inspector/InspectorBackend.h
index d6e89fa..81c1f2d 100644
--- a/WebCore/inspector/InspectorBackend.h
+++ b/WebCore/inspector/InspectorBackend.h
@@ -58,7 +58,8 @@ public:
InspectorController* inspectorController() { return m_inspectorController; }
void disconnectController() { m_inspectorController = 0; }
- void clearMessages(bool clearUI);
+ void saveFrontendSettings(const String&);
+
void storeLastActivePanel(const String& panelName);
void toggleNodeSearch();
@@ -67,6 +68,7 @@ public:
void enableResourceTracking(bool always);
void disableResourceTracking(bool always);
bool resourceTrackingEnabled() const;
+ void getResourceContent(long callId, unsigned long identifier);
void startTimelineProfiler();
void stopTimelineProfiler();
@@ -83,8 +85,8 @@ public:
void pauseInDebugger();
void resumeDebugger();
- bool pauseOnExceptions();
- void setPauseOnExceptions(bool pause);
+ long pauseOnExceptionsState();
+ void setPauseOnExceptionsState(long pauseState);
void stepOverStatementInDebugger();
void stepIntoStatementInDebugger();
@@ -103,7 +105,8 @@ public:
JavaScriptCallFrame* currentCallFrame() const;
#endif
- void dispatchOnInjectedScript(long callId, const String& methodName, const String& arguments, bool async);
+ void setInjectedScriptSource(const String& source);
+ void dispatchOnInjectedScript(long callId, long injectedScriptId, const String& methodName, const String& arguments, bool async);
void getChildNodes(long callId, long nodeId);
void setAttribute(long callId, long elementId, const String& name, const String& value);
void removeAttribute(long callId, long elementId, const String& name);
@@ -118,7 +121,7 @@ public:
void deleteCookie(const String& cookieName, const String& domain);
// Generic code called from custom implementations.
- void releaseWrapperObjectGroup(const String& objectGroup);
+ void releaseWrapperObjectGroup(long injectedScriptId, const String& objectGroup);
void didEvaluateForTestInFrontend(long callId, const String& jsonResult);
#if ENABLE(DATABASE)
diff --git a/WebCore/inspector/InspectorBackend.idl b/WebCore/inspector/InspectorBackend.idl
index 61c76d6..043a9f5 100644
--- a/WebCore/inspector/InspectorBackend.idl
+++ b/WebCore/inspector/InspectorBackend.idl
@@ -31,18 +31,18 @@
*/
module core {
- interface [
- GenerateConstructor
- ] InspectorBackend {
- void clearMessages(in boolean clearUI);
+ interface [Conditional=INSPECTOR] InspectorBackend {
void storeLastActivePanel(in DOMString panelName);
+ void saveFrontendSettings(in DOMString settings);
+
void toggleNodeSearch();
boolean searchingForNode();
boolean resourceTrackingEnabled();
void enableResourceTracking(in boolean always);
void disableResourceTracking(in boolean always);
+ void getResourceContent(in long callId, in unsigned long identifier);
void startTimelineProfiler();
void stopTimelineProfiler();
@@ -63,8 +63,8 @@ module core {
void stepIntoStatementInDebugger();
void stepOutOfFunctionInDebugger();
- boolean pauseOnExceptions();
- void setPauseOnExceptions(in boolean pauseOnExceptions);
+ long pauseOnExceptionsState();
+ void setPauseOnExceptionsState(in long pauseOnExceptionsState);
boolean profilerEnabled();
void enableProfiler(in boolean always);
@@ -76,7 +76,9 @@ module core {
void getProfileHeaders(in long callId);
void getProfile(in long callId, in unsigned long uid);
#endif
- void dispatchOnInjectedScript(in long callId, in DOMString methodName, in DOMString arguments, in boolean async);
+ void setInjectedScriptSource(in DOMString scriptSource);
+ void dispatchOnInjectedScript(in long callId, in long injectedScriptId, in DOMString methodName, in DOMString arguments, in boolean async);
+
void getChildNodes(in long callId, in long nodeId);
void setAttribute(in long callId, in long elementId, in DOMString name, in DOMString value);
void removeAttribute(in long callId, in long elementId, in DOMString name);
@@ -90,7 +92,7 @@ module core {
void getCookies(in long callId);
void deleteCookie(in DOMString cookieName, in DOMString domain);
- void releaseWrapperObjectGroup(in DOMString objectGroup);
+ void releaseWrapperObjectGroup(in long injectedScriptId, in DOMString objectGroup);
void didEvaluateForTestInFrontend(in long callId, in DOMString jsonResult);
#if defined(ENABLE_DATABASE) && ENABLE_DATABASE
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index fd319a4..5ab1354 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -34,6 +34,7 @@
#include "CString.h"
#include "CachedResource.h"
+#include "Chrome.h"
#include "Console.h"
#include "ConsoleMessage.h"
#include "Cookie.h"
@@ -100,6 +101,7 @@
#include <profiler/Profile.h>
#include <profiler/Profiler.h>
#include <runtime/JSLock.h>
+#include <runtime/StringBuilder.h>
#include <runtime/UString.h>
using namespace JSC;
@@ -115,10 +117,13 @@ static const char* const debuggerEnabledSettingName = "debuggerEnabled";
static const char* const profilerEnabledSettingName = "profilerEnabled";
static const char* const inspectorAttachedHeightName = "inspectorAttachedHeight";
static const char* const lastActivePanelSettingName = "lastActivePanel";
+const char* const InspectorController::FrontendSettingsSettingName = "frontendSettings";
static const unsigned defaultAttachedHeight = 300;
static const float minimumAttachedHeight = 250.0f;
static const float maximumAttachedHeightRatio = 0.75f;
+static const unsigned maximumConsoleMessages = 1000;
+static const unsigned expireConsoleMessagesStep = 100;
static unsigned s_inspectorControllerCount;
@@ -126,6 +131,7 @@ InspectorController::InspectorController(Page* page, InspectorClient* client)
: m_inspectedPage(page)
, m_client(client)
, m_page(0)
+ , m_expiredConsoleMessageCount(0)
, m_scriptState(0)
, m_windowVisible(false)
, m_showAfterVisible(CurrentPanel)
@@ -137,7 +143,6 @@ InspectorController::InspectorController(Page* page, InspectorClient* client)
, m_inspectorBackend(InspectorBackend::create(this))
, m_inspectorFrontendHost(InspectorFrontendHost::create(this, client))
, m_injectedScriptHost(InjectedScriptHost::create(this))
- , m_lastBoundObjectId(1)
#if ENABLE(JAVASCRIPT_DEBUGGER)
, m_debuggerEnabled(false)
, m_attachDebuggerWhenShown(false)
@@ -223,7 +228,7 @@ static bool canPassNodeToJavaScript(Node* node)
if (!node)
return false;
Frame* frame = node->document()->frame();
- return frame && frame->script()->isEnabled();
+ return frame && frame->script()->canExecuteScripts();
}
void InspectorController::inspect(Node* node)
@@ -353,18 +358,26 @@ void InspectorController::addConsoleMessage(ScriptState* scriptState, ConsoleMes
if (windowVisible())
m_previousMessage->addToConsole(m_frontend.get());
}
+
+ if (!windowVisible() && m_consoleMessages.size() >= maximumConsoleMessages) {
+ m_expiredConsoleMessageCount += expireConsoleMessagesStep;
+ for (size_t i = 0; i < expireConsoleMessagesStep; ++i)
+ delete m_consoleMessages[i];
+ m_consoleMessages.remove(0, expireConsoleMessagesStep);
+ }
}
-void InspectorController::clearConsoleMessages(bool clearUI)
+void InspectorController::clearConsoleMessages()
{
deleteAllValues(m_consoleMessages);
m_consoleMessages.clear();
+ m_expiredConsoleMessageCount = 0;
m_previousMessage = 0;
m_groupLevel = 0;
- releaseWrapperObjectGroup("console");
+ m_injectedScriptHost->releaseWrapperObjectGroup(0 /* release the group in all scripts */, "console");
if (m_domAgent)
m_domAgent->releaseDanglingNodes();
- if (clearUI && m_frontend)
+ if (m_frontend)
m_frontend->clearConsoleMessages();
}
@@ -486,7 +499,7 @@ void InspectorController::inspectedWindowScriptObjectCleared(Frame* frame)
{
if (!enabled() || !m_frontend || frame != m_inspectedPage->mainFrame())
return;
- resetInjectedScript();
+ m_injectedScriptHost->discardInjectedScripts();
}
void InspectorController::windowScriptObjectAvailable()
@@ -499,7 +512,6 @@ void InspectorController::windowScriptObjectAvailable()
m_scriptState = scriptStateFromPage(debuggerWorld(), m_page);
ScriptGlobalObject::set(m_scriptState, "InspectorBackend", m_inspectorBackend.get());
ScriptGlobalObject::set(m_scriptState, "InspectorFrontendHost", m_inspectorFrontendHost.get());
- ScriptGlobalObject::set(m_scriptState, "InjectedScriptHost", m_injectedScriptHost.get());
}
void InspectorController::scriptObjectReady()
@@ -512,8 +524,6 @@ void InspectorController::scriptObjectReady()
if (!ScriptGlobalObject::get(m_scriptState, "WebInspector", webInspectorObj))
return;
ScriptObject injectedScriptObj;
- if (!ScriptGlobalObject::get(m_scriptState, "InjectedScript", injectedScriptObj))
- return;
setFrontendProxyObject(m_scriptState, webInspectorObj, injectedScriptObj);
#if ENABLE(JAVASCRIPT_DEBUGGER)
@@ -531,10 +541,9 @@ void InspectorController::scriptObjectReady()
m_client->inspectorWindowObjectCleared();
}
-void InspectorController::setFrontendProxyObject(ScriptState* scriptState, ScriptObject webInspectorObj, ScriptObject injectedScriptObj)
+void InspectorController::setFrontendProxyObject(ScriptState* scriptState, ScriptObject webInspectorObj, ScriptObject)
{
m_scriptState = scriptState;
- m_injectedScriptObj = injectedScriptObj;
m_frontend.set(new InspectorFrontend(this, scriptState, webInspectorObj));
releaseDOMAgent();
m_domAgent = InspectorDOMAgent::create(m_frontend.get());
@@ -592,7 +601,6 @@ void InspectorController::close()
#endif
closeWindow();
- m_injectedScriptObj = ScriptObject();
releaseDOMAgent();
m_frontend.set(0);
m_timelineAgent = 0;
@@ -644,12 +652,15 @@ void InspectorController::populateScriptObjects()
if (!m_frontend)
return;
+ m_frontend->populateFrontendSettings(setting(FrontendSettingsSettingName));
m_domAgent->setDocument(m_inspectedPage->mainFrame()->document());
ResourcesMap::iterator resourcesEnd = m_resources.end();
for (ResourcesMap::iterator it = m_resources.begin(); it != resourcesEnd; ++it)
- it->second->createScriptObject(m_frontend.get());
+ it->second->updateScriptObject(m_frontend.get());
+ if (m_expiredConsoleMessageCount)
+ m_frontend->updateConsoleMessageExpiredCount(m_expiredConsoleMessageCount);
unsigned messageCount = m_consoleMessages.size();
for (unsigned i = 0; i < messageCount; ++i)
m_consoleMessages[i]->addToConsole(m_frontend.get());
@@ -698,8 +709,6 @@ void InspectorController::resetScriptObjects()
m_frontend->reset();
m_domAgent->reset();
- m_objectGroups.clear();
- m_idToWrappedObject.clear();
}
void InspectorController::pruneResources(ResourcesMap* resourceMap, DocumentLoader* loaderToKeep)
@@ -731,7 +740,8 @@ void InspectorController::didCommitLoad(DocumentLoader* loader)
if (loader->frame() == m_inspectedPage->mainFrame()) {
m_client->inspectedURLChanged(loader->url().string());
- clearConsoleMessages(false);
+ m_injectedScriptHost->discardInjectedScripts();
+ clearConsoleMessages();
m_times.clear();
m_counts.clear();
@@ -758,7 +768,7 @@ void InspectorController::didCommitLoad(DocumentLoader* loader)
// needed to keep the load for a user-entered URL from showing up in the
// list of resources for the page they are navigating away from.
if (windowVisible())
- m_mainResource->createScriptObject(m_frontend.get());
+ m_mainResource->updateScriptObject(m_frontend.get());
} else {
// Pages loaded from the page cache are committed before
// m_mainResource is the right resource for this load, so we
@@ -853,7 +863,7 @@ void InspectorController::didLoadResourceFromMemoryCache(DocumentLoader* loader,
if (!isMainResource && !m_resourceTrackingEnabled)
return;
- RefPtr<InspectorResource> resource = InspectorResource::createCached(m_inspectedPage->progress()->createUniqueIdentifier() , loader, cachedResource);
+ RefPtr<InspectorResource> resource = InspectorResource::createCached(m_inspectedPage->progress()->createUniqueIdentifier(), loader, cachedResource);
if (isMainResource) {
m_mainResource = resource;
@@ -863,7 +873,7 @@ void InspectorController::didLoadResourceFromMemoryCache(DocumentLoader* loader,
addResource(resource.get());
if (windowVisible())
- resource->createScriptObject(m_frontend.get());
+ resource->updateScriptObject(m_frontend.get());
}
void InspectorController::identifierForInitialRequest(unsigned long identifier, DocumentLoader* loader, const ResourceRequest& request)
@@ -877,9 +887,7 @@ void InspectorController::identifierForInitialRequest(unsigned long identifier,
if (!isMainResource && !m_resourceTrackingEnabled)
return;
- RefPtr<InspectorResource> resource = InspectorResource::create(identifier, loader);
-
- resource->updateRequest(request);
+ RefPtr<InspectorResource> resource = InspectorResource::create(identifier, loader, request.url());
if (isMainResource) {
m_mainResource = resource;
@@ -889,7 +897,7 @@ void InspectorController::identifierForInitialRequest(unsigned long identifier,
addResource(resource.get());
if (windowVisible() && loader->frameLoader()->isLoadingFromCachedPage() && resource == m_mainResource)
- resource->createScriptObject(m_frontend.get());
+ resource->updateScriptObject(m_frontend.get());
}
void InspectorController::mainResourceFiredDOMContentEvent(DocumentLoader* loader, const KURL& url)
@@ -931,15 +939,28 @@ void InspectorController::willSendRequest(unsigned long identifier, const Resour
if (!resource)
return;
- resource->startTiming();
-
if (!redirectResponse.isNull()) {
- resource->updateRequest(request);
+ resource->markResponseReceivedTime();
+ resource->endTiming();
resource->updateResponse(redirectResponse);
+
+ // We always store last redirect by the original id key. Rest of the redirects are stored within the last one.
+ unsigned long id = m_inspectedPage->progress()->createUniqueIdentifier();
+ RefPtr<InspectorResource> withRedirect = resource->appendRedirect(id, request.url());
+ removeResource(resource.get());
+ addResource(withRedirect.get());
+ if (isMainResource) {
+ m_mainResource = withRedirect;
+ withRedirect->markMainResource();
+ }
+ resource = withRedirect;
}
+ resource->startTiming();
+ resource->updateRequest(request);
+
if (resource != m_mainResource && windowVisible())
- resource->createScriptObject(m_frontend.get());
+ resource->updateScriptObject(m_frontend.get());
}
void InspectorController::didReceiveResponse(unsigned long identifier, const ResourceResponse& response)
@@ -954,7 +975,7 @@ void InspectorController::didReceiveResponse(unsigned long identifier, const Res
resource->updateResponse(response);
resource->markResponseReceivedTime();
- if (windowVisible())
+ if (resource != m_mainResource && windowVisible())
resource->updateScriptObject(m_frontend.get());
}
@@ -966,7 +987,7 @@ void InspectorController::didReceiveContentLength(unsigned long identifier, int
resource->addLength(lengthReceived);
- if (windowVisible())
+ if (resource != m_mainResource && windowVisible())
resource->updateScriptObject(m_frontend.get());
}
@@ -979,13 +1000,9 @@ void InspectorController::didFinishLoading(unsigned long identifier)
if (!resource)
return;
- removeResource(resource.get());
-
resource->endTiming();
- addResource(resource.get());
-
- if (windowVisible())
+ if (resource != m_mainResource && windowVisible())
resource->updateScriptObject(m_frontend.get());
}
@@ -998,14 +1015,10 @@ void InspectorController::didFailLoading(unsigned long identifier, const Resourc
if (!resource)
return;
- removeResource(resource.get());
-
resource->markFailed();
resource->endTiming();
- addResource(resource.get());
-
- if (windowVisible())
+ if (resource != m_mainResource && windowVisible())
resource->updateScriptObject(m_frontend.get());
}
@@ -1036,7 +1049,7 @@ void InspectorController::scriptImported(unsigned long identifier, const String&
// FIXME: imported script and XHR response are currently viewed as the same
// thing by the Inspector. They should be made into distinct types.
resource->setXMLHttpResponseText(ScriptString(sourceString));
-
+
if (windowVisible())
resource->updateScriptObject(m_frontend.get());
}
@@ -1352,24 +1365,26 @@ void InspectorController::addProfileFinishedMessageToConsole(PassRefPtr<Profile>
{
RefPtr<Profile> profile = prpProfile;
- UString message = "Profile \"webkit-profile://";
- message += encodeWithURLEscapeSequences(CPUProfileType);
- message += "/";
- message += encodeWithURLEscapeSequences(profile->title());
- message += "#";
- message += UString::from(profile->uid());
- message += "\" finished.";
- addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lineNumber, sourceURL);
+ JSC::StringBuilder message;
+ message.append("Profile \"webkit-profile://");
+ message.append((UString)encodeWithURLEscapeSequences(CPUProfileType));
+ message.append("/");
+ message.append((UString)encodeWithURLEscapeSequences(profile->title()));
+ message.append("#");
+ message.append(UString::from(profile->uid()));
+ message.append("\" finished.");
+ addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message.release(), lineNumber, sourceURL);
}
void InspectorController::addStartProfilingMessageToConsole(const UString& title, unsigned lineNumber, const UString& sourceURL)
{
- UString message = "Profile \"webkit-profile://";
- message += encodeWithURLEscapeSequences(CPUProfileType);
- message += "/";
- message += encodeWithURLEscapeSequences(title);
- message += "#0\" started.";
- addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lineNumber, sourceURL);
+ JSC::StringBuilder message;
+ message.append("Profile \"webkit-profile://");
+ message.append(encodeWithURLEscapeSequences(CPUProfileType));
+ message.append("/");
+ message.append(encodeWithURLEscapeSequences(title));
+ message.append("#0\" started.");
+ addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message.release(), lineNumber, sourceURL);
}
void InspectorController::getProfileHeaders(long callId)
@@ -1407,11 +1422,12 @@ UString InspectorController::getCurrentUserInitiatedProfileName(bool incrementPr
if (incrementProfileNumber)
m_currentUserInitiatedProfileNumber = m_nextUserInitiatedProfileNumber++;
- UString title = UserInitiatedProfileName;
- title += ".";
- title += UString::from(m_currentUserInitiatedProfileNumber);
+ JSC::StringBuilder title;
+ title.append(UserInitiatedProfileName);
+ title.append(".");
+ title.append(UString::from(m_currentUserInitiatedProfileNumber));
- return title;
+ return title.release();
}
void InspectorController::startUserInitiatedProfilingSoon()
@@ -1568,8 +1584,14 @@ void InspectorController::failedToParseSource(ExecState*, const SourceCode& sour
void InspectorController::didPause()
{
- ScriptFunctionCall function(m_scriptState, m_injectedScriptObj, "getCallFrames");
- ScriptValue callFrames = function.call();
+ JavaScriptCallFrame* callFrame = m_injectedScriptHost->currentCallFrame();
+ ScriptState* scriptState = callFrame->scopeChain()->globalObject->globalExec();
+ ASSERT(scriptState);
+ ScriptObject injectedScriptObj = m_injectedScriptHost->injectedScriptFor(scriptState);
+ ScriptFunctionCall function(scriptState, injectedScriptObj, "getCallFrames");
+ ScriptValue callFramesValue = function.call();
+ String callFrames = callFramesValue.toString(scriptState);
+
m_frontend->pausedScript(callFrames);
}
@@ -1797,50 +1819,6 @@ InspectorController::SpecialPanels InspectorController::specialPanelForJSName(co
return ElementsPanel;
}
-ScriptValue InspectorController::wrapObject(const ScriptValue& quarantinedObject, const String& objectGroup)
-{
- ScriptFunctionCall function(m_scriptState, m_injectedScriptObj, "createProxyObject");
- function.appendArgument(quarantinedObject);
- if (quarantinedObject.isObject()) {
- long id = m_lastBoundObjectId++;
- String objectId = String::format("object#%ld", id);
- m_idToWrappedObject.set(objectId, quarantinedObject);
- ObjectGroupsMap::iterator it = m_objectGroups.find(objectGroup);
- if (it == m_objectGroups.end())
- it = m_objectGroups.set(objectGroup, Vector<String>()).first;
- it->second.append(objectId);
- function.appendArgument(objectId);
- }
- ScriptValue wrapper = function.call();
- return wrapper;
-}
-
-ScriptValue InspectorController::unwrapObject(const String& objectId)
-{
- HashMap<String, ScriptValue>::iterator it = m_idToWrappedObject.find(objectId);
- if (it != m_idToWrappedObject.end())
- return it->second;
- return ScriptValue();
-}
-
-void InspectorController::releaseWrapperObjectGroup(const String& objectGroup)
-{
- ObjectGroupsMap::iterator groupIt = m_objectGroups.find(objectGroup);
- if (groupIt == m_objectGroups.end())
- return;
-
- Vector<String>& groupIds = groupIt->second;
- for (Vector<String>::iterator it = groupIds.begin(); it != groupIds.end(); ++it)
- m_idToWrappedObject.remove(*it);
- m_objectGroups.remove(groupIt);
-}
-
-void InspectorController::resetInjectedScript()
-{
- ScriptFunctionCall function(m_scriptState, m_injectedScriptObj, "reset");
- function.call();
-}
-
void InspectorController::deleteCookie(const String& cookieName, const String& domain)
{
ResourcesMap::iterator resourcesEnd = m_resources.end();
@@ -1851,6 +1829,27 @@ void InspectorController::deleteCookie(const String& cookieName, const String& d
}
}
+ScriptObject InspectorController::injectedScriptForNodeId(long id)
+{
+
+ Frame* frame = 0;
+ if (id) {
+ ASSERT(m_domAgent);
+ Node* node = m_domAgent->nodeForId(id);
+ if (node) {
+ Document* document = node->ownerDocument();
+ if (document)
+ frame = document->frame();
+ }
+ } else
+ frame = m_inspectedPage->mainFrame();
+
+ if (frame)
+ return m_injectedScriptHost->injectedScriptFor(mainWorldScriptState(frame));
+
+ return ScriptObject();
+}
+
} // namespace WebCore
#endif // ENABLE(INSPECTOR)
diff --git a/WebCore/inspector/InspectorController.h b/WebCore/inspector/InspectorController.h
index bb4e1f3..860bf49 100644
--- a/WebCore/inspector/InspectorController.h
+++ b/WebCore/inspector/InspectorController.h
@@ -31,6 +31,7 @@
#include "Console.h"
#include "Cookie.h"
+#include "InspectorDOMAgent.h"
#include "PlatformString.h"
#include "ScriptArray.h"
#include "ScriptObject.h"
@@ -60,12 +61,12 @@ class CachedResource;
class Database;
class Document;
class DocumentLoader;
+class Element;
class GraphicsContext;
class HitTestResult;
class InjectedScriptHost;
class InspectorBackend;
class InspectorClient;
-class InspectorDOMAgent;
class InspectorFrontend;
class InspectorFrontendHost;
class InspectorTimelineAgent;
@@ -89,7 +90,9 @@ class InspectorResource;
class InspectorController
#if ENABLE(JAVASCRIPT_DEBUGGER)
- : JavaScriptDebugListener
+ : JavaScriptDebugListener, public Noncopyable
+#else
+ : public Noncopyable
#endif
{
public:
@@ -97,7 +100,6 @@ public:
typedef HashMap<RefPtr<Frame>, ResourcesMap*> FrameResourcesMap;
typedef HashMap<int, RefPtr<InspectorDatabaseResource> > DatabaseResourcesMap;
typedef HashMap<int, RefPtr<InspectorDOMStorageResource> > DOMStorageResourcesMap;
- typedef HashMap<String, Vector<String> > ObjectGroupsMap;
typedef enum {
CurrentPanel,
@@ -140,7 +142,7 @@ public:
void addMessageToConsole(MessageSource, MessageType, MessageLevel, ScriptCallStack*);
void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID);
- void clearConsoleMessages(bool clearUI);
+ void clearConsoleMessages();
const Vector<ConsoleMessage*>& consoleMessages() const { return m_consoleMessages; }
void attachWindow();
@@ -185,6 +187,10 @@ public:
void mainResourceFiredLoadEvent(DocumentLoader*, const KURL&);
void mainResourceFiredDOMContentEvent(DocumentLoader*, const KURL&);
+
+ void didInsertDOMNode(Node*);
+ void didRemoveDOMNode(Node*);
+ void didModifyDOMAttr(Element*);
void getCookies(long callId);
@@ -242,7 +248,10 @@ public:
void evaluateForTestInFrontend(long callId, const String& script);
+ ScriptObject injectedScriptForNodeId(long id);
+
private:
+ static const char* const FrontendSettingsSettingName;
friend class InspectorBackend;
friend class InspectorFrontendHost;
friend class InjectedScriptHost;
@@ -256,16 +265,6 @@ private:
InspectorDOMAgent* domAgent() { return m_domAgent.get(); }
void releaseDOMAgent();
- friend class InspectorFrontend;
- // Following are used from InspectorFrontend only. We don't want to expose them to the
- // rest of the InspectorController clients.
- // TODO: extract these into a separate interface.
- ScriptValue wrapObject(const ScriptValue& object, const String& objectGroup);
- ScriptValue unwrapObject(const String& objectId);
- void releaseWrapperObjectGroup(const String& objectGroup);
-
- void resetInjectedScript();
-
void deleteCookie(const String& cookieName, const String& domain);
#if ENABLE(JAVASCRIPT_DEBUGGER)
@@ -313,7 +312,6 @@ private:
OwnPtr<InspectorFrontend> m_frontend;
RefPtr<InspectorDOMAgent> m_domAgent;
OwnPtr<InspectorTimelineAgent> m_timelineAgent;
- ScriptObject m_injectedScriptObj;
Page* m_page;
RefPtr<Node> m_nodeToFocus;
RefPtr<InspectorResource> m_mainResource;
@@ -321,6 +319,7 @@ private:
HashSet<String> m_knownResources;
FrameResourcesMap m_frameResources;
Vector<ConsoleMessage*> m_consoleMessages;
+ unsigned m_expiredConsoleMessageCount;
HashMap<String, double> m_times;
HashMap<String, unsigned> m_counts;
#if ENABLE(DATABASE)
@@ -341,9 +340,6 @@ private:
RefPtr<InspectorBackend> m_inspectorBackend;
RefPtr<InspectorFrontendHost> m_inspectorFrontendHost;
RefPtr<InjectedScriptHost> m_injectedScriptHost;
- HashMap<String, ScriptValue> m_idToWrappedObject;
- ObjectGroupsMap m_objectGroups;
- long m_lastBoundObjectId;
typedef HashMap<String, String> Settings;
mutable Settings m_settings;
@@ -361,6 +357,24 @@ private:
#endif
};
+inline void InspectorController::didInsertDOMNode(Node* node)
+{
+ if (m_domAgent)
+ m_domAgent->didInsertDOMNode(node);
+}
+
+inline void InspectorController::didRemoveDOMNode(Node* node)
+{
+ if (m_domAgent)
+ m_domAgent->didRemoveDOMNode(node);
+}
+
+inline void InspectorController::didModifyDOMAttr(Element* element)
+{
+ if (m_domAgent)
+ m_domAgent->didModifyDOMAttr(element);
+}
+
} // namespace WebCore
#endif // !defined(InspectorController_h)
diff --git a/WebCore/inspector/InspectorDOMAgent.cpp b/WebCore/inspector/InspectorDOMAgent.cpp
index 1aaf309..8b0b6f8 100644
--- a/WebCore/inspector/InspectorDOMAgent.cpp
+++ b/WebCore/inspector/InspectorDOMAgent.cpp
@@ -39,6 +39,7 @@
#include "CookieJar.h"
#include "DOMWindow.h"
#include "Document.h"
+#include "DocumentType.h"
#include "Event.h"
#include "EventListener.h"
#include "EventNames.h"
@@ -109,9 +110,6 @@ void InspectorDOMAgent::startListening(Document* doc)
return;
doc->addEventListener(eventNames().DOMContentLoadedEvent, this, false);
- doc->addEventListener(eventNames().DOMNodeInsertedEvent, this, false);
- doc->addEventListener(eventNames().DOMNodeRemovedEvent, this, false);
- doc->addEventListener(eventNames().DOMAttrModifiedEvent, this, false);
doc->addEventListener(eventNames().loadEvent, this, true);
m_documents.add(doc);
}
@@ -122,9 +120,6 @@ void InspectorDOMAgent::stopListening(Document* doc)
return;
doc->removeEventListener(eventNames().DOMContentLoadedEvent, this, false);
- doc->removeEventListener(eventNames().DOMNodeInsertedEvent, this, false);
- doc->removeEventListener(eventNames().DOMNodeRemovedEvent, this, false);
- doc->removeEventListener(eventNames().DOMAttrModifiedEvent, this, false);
doc->removeEventListener(eventNames().loadEvent, this, true);
m_documents.remove(doc);
}
@@ -134,56 +129,7 @@ void InspectorDOMAgent::handleEvent(ScriptExecutionContext*, Event* event)
AtomicString type = event->type();
Node* node = event->target()->toNode();
- if (type == eventNames().DOMAttrModifiedEvent) {
- long id = m_documentNodeToIdMap.get(node);
- // If node is not mapped yet -> ignore the event.
- if (!id)
- return;
-
- Element* element = static_cast<Element*>(node);
- m_frontend->attributesUpdated(id, buildArrayForElementAttributes(element));
- } else if (type == eventNames().DOMNodeInsertedEvent) {
- if (isWhitespace(node))
- return;
-
- // We could be attaching existing subtree. Forget the bindings.
- unbind(node, &m_documentNodeToIdMap);
-
- Node* parent = static_cast<MutationEvent*>(event)->relatedNode();
- long parentId = m_documentNodeToIdMap.get(parent);
- // Return if parent is not mapped yet.
- if (!parentId)
- return;
-
- if (!m_childrenRequested.contains(parentId)) {
- // No children are mapped yet -> only notify on changes of hasChildren.
- m_frontend->childNodeCountUpdated(parentId, innerChildNodeCount(parent));
- } else {
- // Children have been requested -> return value of a new child.
- Node* prevSibling = innerPreviousSibling(node);
- long prevId = prevSibling ? m_documentNodeToIdMap.get(prevSibling) : 0;
- ScriptObject value = buildObjectForNode(node, 0, &m_documentNodeToIdMap);
- m_frontend->childNodeInserted(parentId, prevId, value);
- }
- } else if (type == eventNames().DOMNodeRemovedEvent) {
- if (isWhitespace(node))
- return;
-
- Node* parent = static_cast<MutationEvent*>(event)->relatedNode();
- long parentId = m_documentNodeToIdMap.get(parent);
- // If parent is not mapped yet -> ignore the event.
- if (!parentId)
- return;
-
- if (!m_childrenRequested.contains(parentId)) {
- // No children are mapped yet -> only notify on changes of hasChildren.
- if (innerChildNodeCount(parent) == 1)
- m_frontend->childNodeCountUpdated(parentId, 0);
- } else {
- m_frontend->childNodeRemoved(parentId, m_documentNodeToIdMap.get(node));
- }
- unbind(node, &m_documentNodeToIdMap);
- } else if (type == eventNames().DOMContentLoadedEvent) {
+ if (type == eventNames().DOMContentLoadedEvent) {
// Re-push document once it is loaded.
discardBindings();
pushDocumentToFrontend();
@@ -478,6 +424,13 @@ void InspectorDOMAgent::getEventListenersForNode(long callId, long nodeId)
m_frontend->didGetEventListenersForNode(callId, nodeId, listenersArray);
}
+String InspectorDOMAgent::documentURLString(Document* document) const
+{
+ if (!document || document->url().isNull())
+ return "";
+ return document->url().string();
+}
+
ScriptObject InspectorDOMAgent::buildObjectForNode(Node* node, int depth, NodeToIdMap* nodesMap)
{
ScriptObject value = m_frontend->newScriptObject();
@@ -511,16 +464,29 @@ ScriptObject InspectorDOMAgent::buildObjectForNode(Node* node, int depth, NodeTo
value.set("localName", localName);
value.set("nodeValue", nodeValue);
- if (node->nodeType() == Node::ELEMENT_NODE) {
- Element* element = static_cast<Element*>(node);
- value.set("attributes", buildArrayForElementAttributes(element));
- }
if (node->nodeType() == Node::ELEMENT_NODE || node->nodeType() == Node::DOCUMENT_NODE) {
int nodeCount = innerChildNodeCount(node);
value.set("childNodeCount", nodeCount);
ScriptArray children = buildArrayForContainerChildren(node, depth, nodesMap);
if (children.length() > 0)
value.set("children", children);
+
+ if (node->nodeType() == Node::ELEMENT_NODE) {
+ Element* element = static_cast<Element*>(node);
+ value.set("attributes", buildArrayForElementAttributes(element));
+ if (node->isFrameOwnerElement()) {
+ HTMLFrameOwnerElement* frameOwner = static_cast<HTMLFrameOwnerElement*>(node);
+ value.set("documentURL", documentURLString(frameOwner->contentDocument()));
+ }
+ } else {
+ Document* document = static_cast<Document*>(node);
+ value.set("documentURL", documentURLString(document));
+ }
+ } else if (node->nodeType() == Node::DOCUMENT_TYPE_NODE) {
+ DocumentType* docType = static_cast<DocumentType*>(node);
+ value.set("publicId", docType->publicId());
+ value.set("systemId", docType->systemId());
+ value.set("internalSubset", docType->internalSubset());
}
return value;
}
@@ -649,6 +615,62 @@ bool InspectorDOMAgent::operator==(const EventListener& listener)
return false;
}
+void InspectorDOMAgent::didInsertDOMNode(Node* node)
+{
+ if (isWhitespace(node))
+ return;
+
+ // We could be attaching existing subtree. Forget the bindings.
+ unbind(node, &m_documentNodeToIdMap);
+
+ Node* parent = node->parentNode();
+ long parentId = m_documentNodeToIdMap.get(parent);
+ // Return if parent is not mapped yet.
+ if (!parentId)
+ return;
+
+ if (!m_childrenRequested.contains(parentId)) {
+ // No children are mapped yet -> only notify on changes of hasChildren.
+ m_frontend->childNodeCountUpdated(parentId, innerChildNodeCount(parent));
+ } else {
+ // Children have been requested -> return value of a new child.
+ Node* prevSibling = innerPreviousSibling(node);
+ long prevId = prevSibling ? m_documentNodeToIdMap.get(prevSibling) : 0;
+ ScriptObject value = buildObjectForNode(node, 0, &m_documentNodeToIdMap);
+ m_frontend->childNodeInserted(parentId, prevId, value);
+ }
+}
+
+void InspectorDOMAgent::didRemoveDOMNode(Node* node)
+{
+ if (isWhitespace(node))
+ return;
+
+ Node* parent = node->parentNode();
+ long parentId = m_documentNodeToIdMap.get(parent);
+ // If parent is not mapped yet -> ignore the event.
+ if (!parentId)
+ return;
+
+ if (!m_childrenRequested.contains(parentId)) {
+ // No children are mapped yet -> only notify on changes of hasChildren.
+ if (innerChildNodeCount(parent) == 1)
+ m_frontend->childNodeCountUpdated(parentId, 0);
+ } else
+ m_frontend->childNodeRemoved(parentId, m_documentNodeToIdMap.get(node));
+ unbind(node, &m_documentNodeToIdMap);
+}
+
+void InspectorDOMAgent::didModifyDOMAttr(Element* element)
+{
+ long id = m_documentNodeToIdMap.get(element);
+ // If node is not mapped yet -> ignore the event.
+ if (!id)
+ return;
+
+ m_frontend->attributesUpdated(id, buildArrayForElementAttributes(element));
+}
+
} // namespace WebCore
#endif // ENABLE(INSPECTOR)
diff --git a/WebCore/inspector/InspectorDOMAgent.h b/WebCore/inspector/InspectorDOMAgent.h
index 4579548..d7334b7 100644
--- a/WebCore/inspector/InspectorDOMAgent.h
+++ b/WebCore/inspector/InspectorDOMAgent.h
@@ -98,9 +98,14 @@ namespace WebCore {
void setDocument(Document* document);
void releaseDanglingNodes();
+ void didInsertDOMNode(Node*);
+ void didRemoveDOMNode(Node*);
+ void didModifyDOMAttr(Element*);
+
Node* nodeForId(long nodeId);
Node* nodeForPath(const String& path);
long pushNodePathToFrontend(Node* node);
+ void pushChildNodesToFrontend(long nodeId);
private:
void startListening(Document* document);
@@ -113,7 +118,6 @@ namespace WebCore {
void unbind(Node* node, NodeToIdMap* nodesMap);
bool pushDocumentToFrontend();
- void pushChildNodesToFrontend(long nodeId);
ScriptObject buildObjectForNode(Node* node, int depth, NodeToIdMap* nodesMap);
ScriptArray buildArrayForElementAttributes(Element* element);
@@ -131,6 +135,7 @@ namespace WebCore {
bool isWhitespace(Node* node);
Document* mainFrameDocument() const;
+ String documentURLString(Document* document) const;
void discardBindings();
InspectorFrontend* m_frontend;
diff --git a/WebCore/inspector/InspectorFrontend.cpp b/WebCore/inspector/InspectorFrontend.cpp
index 70f4868..d5c817d 100644
--- a/WebCore/inspector/InspectorFrontend.cpp
+++ b/WebCore/inspector/InspectorFrontend.cpp
@@ -34,6 +34,7 @@
#include "ConsoleMessage.h"
#include "Frame.h"
+#include "InjectedScriptHost.h"
#include "InspectorController.h"
#include "Node.h"
#include "ScriptFunctionCall.h"
@@ -77,23 +78,52 @@ void InspectorFrontend::didCommitLoad()
callSimpleFunction("didCommitLoad");
}
-void InspectorFrontend::addConsoleMessage(const ScriptObject& messageObj, const Vector<ScriptString>& frames, const Vector<ScriptValue> wrappedArguments, const String& message)
+void InspectorFrontend::populateFrontendSettings(const String& settings)
+{
+ ScriptFunctionCall function(m_scriptState, m_webInspector, "dispatch");
+ function.appendArgument("populateFrontendSettings");
+ function.appendArgument(settings);
+ function.call();
+}
+
+void InspectorFrontend::updateConsoleMessageExpiredCount(unsigned count)
+{
+ ScriptFunctionCall function(m_scriptState, m_webInspector, "dispatch");
+ function.appendArgument("updateConsoleMessageExpiredCount");
+ function.appendArgument(count);
+ function.call();
+}
+
+void InspectorFrontend::addConsoleMessage(const ScriptObject& messageObj, const Vector<ScriptString>& frames, ScriptState* scriptState, const Vector<ScriptValue> arguments, const String& message)
{
ScriptFunctionCall function(m_scriptState, m_webInspector, "dispatch");
function.appendArgument("addConsoleMessage");
function.appendArgument(messageObj);
if (!frames.isEmpty()) {
+ function.appendArgument(false);
for (unsigned i = 0; i < frames.size(); ++i)
function.appendArgument(frames[i]);
- } else if (!wrappedArguments.isEmpty()) {
- for (unsigned i = 0; i < wrappedArguments.size(); ++i)
- function.appendArgument(m_inspectorController->wrapObject(wrappedArguments[i], "console"));
- } else
+ } else if (!arguments.isEmpty()) {
+ function.appendArgument(true);
+ ScriptObject injectedScript = m_inspectorController->injectedScriptHost()->injectedScriptFor(scriptState);
+ for (unsigned i = 0; i < arguments.size(); ++i) {
+ ScriptFunctionCall wrapFunction(scriptState, injectedScript, "wrapAndStringifyObject");
+ wrapFunction.appendArgument(arguments[i]);
+ wrapFunction.appendArgument("console");
+ ScriptValue r = wrapFunction.call();
+ if (r.hasNoValue())
+ return;
+ String s = r.toString(scriptState);
+ function.appendArgument(s);
+ }
+ } else {
+ function.appendArgument(false);
function.appendArgument(message);
+ }
function.call();
}
-void InspectorFrontend::updateConsoleMessageRepeatCount(const int count)
+void InspectorFrontend::updateConsoleMessageRepeatCount(unsigned count)
{
ScriptFunctionCall function(m_scriptState, m_webInspector, "dispatch");
function.appendArgument("updateConsoleMessageRepeatCount");
@@ -106,17 +136,6 @@ void InspectorFrontend::clearConsoleMessages()
callSimpleFunction("clearConsoleMessages");
}
-bool InspectorFrontend::addResource(unsigned long identifier, const ScriptObject& resourceObj)
-{
- ScriptFunctionCall function(m_scriptState, m_webInspector, "dispatch");
- function.appendArgument("addResource");
- function.appendArgument(identifier);
- function.appendArgument(resourceObj);
- bool hadException = false;
- function.call(hadException);
- return !hadException;
-}
-
bool InspectorFrontend::updateResource(unsigned long identifier, const ScriptObject& resourceObj)
{
ScriptFunctionCall function(m_scriptState, m_webInspector, "dispatch");
@@ -136,6 +155,15 @@ void InspectorFrontend::removeResource(unsigned long identifier)
function.call();
}
+void InspectorFrontend::didGetResourceContent(int callId, const String& content)
+{
+ ScriptFunctionCall function(m_scriptState, m_webInspector, "dispatch");
+ function.appendArgument("didGetResourceContent");
+ function.appendArgument(callId);
+ function.appendArgument(content);
+ function.call();
+}
+
void InspectorFrontend::updateFocusedNode(long nodeId)
{
ScriptFunctionCall function(m_scriptState, m_webInspector, "dispatch");
@@ -307,7 +335,7 @@ void InspectorFrontend::didGetProfile(int callId, const ScriptValue& profile)
function.call();
}
-void InspectorFrontend::pausedScript(const ScriptValue& callFrames)
+void InspectorFrontend::pausedScript(const String& callFrames)
{
ScriptFunctionCall function(m_scriptState, m_webInspector, "dispatch");
function.appendArgument("pausedScript");
diff --git a/WebCore/inspector/InspectorFrontend.h b/WebCore/inspector/InspectorFrontend.h
index 03dac14..0b52566 100644
--- a/WebCore/inspector/InspectorFrontend.h
+++ b/WebCore/inspector/InspectorFrontend.h
@@ -54,7 +54,7 @@ namespace WebCore {
class ScriptString;
class Storage;
- class InspectorFrontend {
+ class InspectorFrontend : public Noncopyable {
public:
InspectorFrontend(InspectorController* inspectorController, ScriptState*, ScriptObject webInspector);
~InspectorFrontend();
@@ -63,13 +63,17 @@ namespace WebCore {
ScriptObject newScriptObject();
void didCommitLoad();
- void addConsoleMessage(const ScriptObject& messageObj, const Vector<ScriptString>& frames, const Vector<ScriptValue> wrappedArguments, const String& message);
- void updateConsoleMessageRepeatCount(const int count);
+
+ void populateFrontendSettings(const String& settings);
+
+ void updateConsoleMessageExpiredCount(unsigned count);
+ void addConsoleMessage(const ScriptObject& messageObj, const Vector<ScriptString>& frames, ScriptState*, const Vector<ScriptValue> arguments, const String& message);
+ void updateConsoleMessageRepeatCount(unsigned count);
void clearConsoleMessages();
- bool addResource(unsigned long identifier, const ScriptObject& resourceObj);
bool updateResource(unsigned long identifier, const ScriptObject& resourceObj);
void removeResource(unsigned long identifier);
+ void didGetResourceContent(int callId, const String& content);
void updateFocusedNode(long nodeId);
void setAttachedWindow(bool attached);
@@ -92,7 +96,7 @@ namespace WebCore {
void setRecordingProfile(bool isProfiling);
void didGetProfileHeaders(int callId, const ScriptArray& headers);
void didGetProfile(int callId, const ScriptValue& profile);
- void pausedScript(const ScriptValue& callFrames);
+ void pausedScript(const String& callFrames);
void resumedScript();
#endif
diff --git a/WebCore/inspector/InspectorFrontendHost.cpp b/WebCore/inspector/InspectorFrontendHost.cpp
index 2b83942..1aeb1d7 100644
--- a/WebCore/inspector/InspectorFrontendHost.cpp
+++ b/WebCore/inspector/InspectorFrontendHost.cpp
@@ -35,7 +35,7 @@
#include "ContextMenu.h"
#include "ContextMenuItem.h"
#include "ContextMenuController.h"
-#include "ContextMenuSelectionHandler.h"
+#include "ContextMenuProvider.h"
#include "Element.h"
#include "Frame.h"
#include "FrameLoader.h"
@@ -45,6 +45,7 @@
#include "InspectorFrontend.h"
#include "InspectorResource.h"
#include "Page.h"
+#include "Pasteboard.h"
#include <wtf/RefPtr.h>
#include <wtf/StdLibExtras.h>
@@ -56,13 +57,13 @@ namespace WebCore {
InspectorFrontendHost::InspectorFrontendHost(InspectorController* inspectorController, InspectorClient* client)
: m_inspectorController(inspectorController)
, m_client(client)
- , m_menuSelectionHandler(MenuSelectionHandler::create(this))
{
}
InspectorFrontendHost::~InspectorFrontendHost()
{
- m_menuSelectionHandler->disconnect();
+ if (m_menuProvider)
+ m_menuProvider->disconnect();
}
void InspectorFrontendHost::loaded()
@@ -120,20 +121,17 @@ String InspectorFrontendHost::hiddenPanels()
const String& InspectorFrontendHost::platform() const
{
#if PLATFORM(MAC)
-#ifdef BUILDING_ON_TIGER
- DEFINE_STATIC_LOCAL(const String, platform, ("mac-tiger"));
-#else
- DEFINE_STATIC_LOCAL(const String, platform, ("mac-leopard"));
-#endif
-#elif PLATFORM(WIN_OS)
+ DEFINE_STATIC_LOCAL(const String, platform, ("mac"));
+#elif OS(WINDOWS)
DEFINE_STATIC_LOCAL(const String, platform, ("windows"));
+#elif OS(LINUX)
+ DEFINE_STATIC_LOCAL(const String, platform, ("linux"));
#else
DEFINE_STATIC_LOCAL(const String, platform, ("unknown"));
#endif
return platform;
}
-
const String& InspectorFrontendHost::port() const
{
#if PLATFORM(QT)
@@ -149,74 +147,22 @@ const String& InspectorFrontendHost::port() const
return port;
}
-void InspectorFrontendHost::addResourceSourceToFrame(long identifier, Node* frame)
-{
- if (!m_inspectorController)
- return;
- RefPtr<InspectorResource> resource = m_inspectorController->resources().get(identifier);
- if (resource) {
- String sourceString = resource->sourceString();
- if (!sourceString.isEmpty())
- addSourceToFrame(resource->mimeType(), sourceString, frame);
- }
-}
-
-bool InspectorFrontendHost::addSourceToFrame(const String& mimeType, const String& source, Node* frameNode)
-{
- ASSERT_ARG(frameNode, frameNode);
-
- if (!frameNode)
- return false;
-
- if (!frameNode->attached()) {
- ASSERT_NOT_REACHED();
- return false;
- }
-
- ASSERT(frameNode->isElementNode());
- if (!frameNode->isElementNode())
- return false;
-
- Element* element = static_cast<Element*>(frameNode);
- ASSERT(element->isFrameOwnerElement());
- if (!element->isFrameOwnerElement())
- return false;
-
- HTMLFrameOwnerElement* frameOwner = static_cast<HTMLFrameOwnerElement*>(element);
- ASSERT(frameOwner->contentFrame());
- if (!frameOwner->contentFrame())
- return false;
-
- FrameLoader* loader = frameOwner->contentFrame()->loader();
-
- loader->setResponseMIMEType(mimeType);
- loader->begin();
- loader->write(source);
- loader->end();
-
- return true;
-}
-
-String InspectorFrontendHost::setting(const String& key)
-{
- return m_inspectorController ? m_inspectorController->setting(key) : "";
-}
-
-void InspectorFrontendHost::setSetting(const String& key, const String& value)
+void InspectorFrontendHost::copyText(const String& text)
{
- if (m_inspectorController)
- m_inspectorController->setSetting(key, value);
+ Pasteboard::generalPasteboard()->writePlainText(text);
}
-void InspectorFrontendHost::showContextMenu(Event* event, Vector<ContextMenuItem>& items)
+void InspectorFrontendHost::showContextMenu(Event* event, const Vector<ContextMenuItem*>& items)
{
if (!m_inspectorController)
return;
if (!m_inspectorController->windowVisible())
return;
+
+ m_menuProvider = MenuProvider::create(this, items);
ContextMenuController* menuController = m_inspectorController->m_page->contextMenuController();
- menuController->showContextMenu(event, items, m_menuSelectionHandler);
+ menuController->showContextMenu(event, m_menuProvider);
}
void InspectorFrontendHost::contextMenuItemSelected(ContextMenuItem* item)
@@ -229,6 +175,7 @@ void InspectorFrontendHost::contextMenuItemSelected(ContextMenuItem* item)
void InspectorFrontendHost::contextMenuCleared()
{
+ m_menuProvider = 0;
if (m_inspectorController && m_inspectorController->windowVisible())
m_inspectorController->m_frontend->contextMenuCleared();
}
diff --git a/WebCore/inspector/InspectorFrontendHost.h b/WebCore/inspector/InspectorFrontendHost.h
index e0cfa6d..390b018 100644
--- a/WebCore/inspector/InspectorFrontendHost.h
+++ b/WebCore/inspector/InspectorFrontendHost.h
@@ -30,7 +30,8 @@
#define InspectorFrontendHost_h
#include "Console.h"
-#include "ContextMenuSelectionHandler.h"
+#include "ContextMenu.h"
+#include "ContextMenuProvider.h"
#include "InspectorController.h"
#include "PlatformString.h"
@@ -72,28 +73,34 @@ public:
const String& platform() const;
const String& port() const;
- void addResourceSourceToFrame(long identifier, Node* frame);
- bool addSourceToFrame(const String& mimeType, const String& source, Node* frame);
-
- String setting(const String& key);
- void setSetting(const String& key, const String& value);
+ void copyText(const String& text);
// Called from [Custom] implementations.
- void showContextMenu(Event*, Vector<ContextMenuItem>& items);
- void contextMenuItemSelected(ContextMenuItem*);
- void contextMenuCleared();
+ void showContextMenu(Event*, const Vector<ContextMenuItem*>& items);
private:
- class MenuSelectionHandler : public ContextMenuSelectionHandler {
+ class MenuProvider : public ContextMenuProvider {
public:
- static PassRefPtr<MenuSelectionHandler> create(InspectorFrontendHost* frontendHost)
+ static PassRefPtr<MenuProvider> create(InspectorFrontendHost* frontendHost, const Vector<ContextMenuItem*>& items)
{
- return adoptRef(new MenuSelectionHandler(frontendHost));
+ return adoptRef(new MenuProvider(frontendHost, items));
}
- virtual ~MenuSelectionHandler() { }
+ virtual ~MenuProvider()
+ {
+ contextMenuCleared();
+ }
- void disconnect() { m_frontendHost = 0; }
+ void disconnect()
+ {
+ m_frontendHost = 0;
+ }
+
+ virtual void populateContextMenu(ContextMenu* menu)
+ {
+ for (size_t i = 0; i < m_items.size(); ++i)
+ menu->appendItem(*m_items[i]);
+ }
virtual void contextMenuItemSelected(ContextMenuItem* item)
{
@@ -105,19 +112,26 @@ private:
{
if (m_frontendHost)
m_frontendHost->contextMenuCleared();
+ deleteAllValues(m_items);
+ m_items.clear();
}
private:
- MenuSelectionHandler(InspectorFrontendHost* frontendHost)
- : m_frontendHost(frontendHost) { }
+ MenuProvider(InspectorFrontendHost* frontendHost, const Vector<ContextMenuItem*>& items)
+ : m_frontendHost(frontendHost)
+ , m_items(items) { }
InspectorFrontendHost* m_frontendHost;
+ Vector<ContextMenuItem*> m_items;
};
InspectorFrontendHost(InspectorController* inspectorController, InspectorClient* client);
+ void contextMenuItemSelected(ContextMenuItem*);
+ void contextMenuCleared();
+
InspectorController* m_inspectorController;
InspectorClient* m_client;
- RefPtr<MenuSelectionHandler> m_menuSelectionHandler;
+ RefPtr<MenuProvider> m_menuProvider;
};
} // namespace WebCore
diff --git a/WebCore/inspector/InspectorFrontendHost.idl b/WebCore/inspector/InspectorFrontendHost.idl
index c62a7e2..9de49c1 100644
--- a/WebCore/inspector/InspectorFrontendHost.idl
+++ b/WebCore/inspector/InspectorFrontendHost.idl
@@ -31,9 +31,7 @@
*/
module core {
- interface [
- GenerateConstructor
- ] InspectorFrontendHost {
+ interface [Conditional=INSPECTOR] InspectorFrontendHost {
void loaded();
void attach();
void detach();
@@ -48,13 +46,8 @@ module core {
DOMString platform();
DOMString port();
- void addResourceSourceToFrame(in long identifier, in Node frame);
- boolean addSourceToFrame(in DOMString mimeType, in DOMString sourceValue, in Node frame);
+ void copyText(in DOMString text);
- DOMString setting(in DOMString key);
- void setSetting(in DOMString key, in DOMString value);
-
- [Custom] void search(in Node node, in DOMString query);
[Custom] void showContextMenu(in MouseEvent event, in DOMObject items);
};
}
diff --git a/WebCore/inspector/InspectorResource.cpp b/WebCore/inspector/InspectorResource.cpp
index 0a4cb73..191d271 100644
--- a/WebCore/inspector/InspectorResource.cpp
+++ b/WebCore/inspector/InspectorResource.cpp
@@ -46,11 +46,11 @@
namespace WebCore {
-InspectorResource::InspectorResource(unsigned long identifier, DocumentLoader* loader)
+InspectorResource::InspectorResource(unsigned long identifier, DocumentLoader* loader, const KURL& requestURL)
: m_identifier(identifier)
, m_loader(loader)
, m_frame(loader->frame())
- , m_scriptObjectCreated(false)
+ , m_requestURL(requestURL)
, m_expectedContentLength(0)
, m_cached(false)
, m_finished(false)
@@ -70,13 +70,27 @@ InspectorResource::~InspectorResource()
{
}
+PassRefPtr<InspectorResource> InspectorResource::appendRedirect(unsigned long identifier, const KURL& redirectURL)
+{
+ // Last redirect is always a container of all previous ones. Pass this container here.
+ RefPtr<InspectorResource> redirect = InspectorResource::create(m_identifier, m_loader.get(), redirectURL);
+ redirect->m_redirects = m_redirects;
+ redirect->m_redirects.append(this);
+ redirect->m_changes.set(RedirectsChange);
+
+ m_identifier = identifier;
+ // Re-send request info with new id.
+ m_changes.set(RequestChange);
+ m_redirects.clear();
+ return redirect;
+}
+
PassRefPtr<InspectorResource> InspectorResource::createCached(unsigned long identifier, DocumentLoader* loader, const CachedResource* cachedResource)
{
- PassRefPtr<InspectorResource> resource = create(identifier, loader);
+ PassRefPtr<InspectorResource> resource = create(identifier, loader, KURL(ParsedURLString, cachedResource->url()));
resource->m_finished = true;
- resource->m_requestURL = KURL(ParsedURLString, cachedResource->url());
resource->updateResponse(cachedResource->response());
resource->m_length = cachedResource->encodedSize();
@@ -93,7 +107,6 @@ PassRefPtr<InspectorResource> InspectorResource::createCached(unsigned long iden
void InspectorResource::updateRequest(const ResourceRequest& request)
{
m_requestHeaderFields = request.httpHeaderFields();
- m_requestURL = request.url();
m_requestMethod = request.httpMethod();
if (request.httpBody() && !request.httpBody()->isEmpty())
m_requestFormData = request.httpBody()->flattenToString();
@@ -126,36 +139,9 @@ static void populateHeadersObject(ScriptObject* object, const HTTPHeaderMap& hea
}
}
-void InspectorResource::createScriptObject(InspectorFrontend* frontend)
-{
- if (!m_scriptObjectCreated) {
- ScriptObject jsonObject = frontend->newScriptObject();
- ScriptObject requestHeaders = frontend->newScriptObject();
- populateHeadersObject(&requestHeaders, m_requestHeaderFields);
- jsonObject.set("requestHeaders", requestHeaders);
- jsonObject.set("documentURL", m_frame->document()->url().string());
- jsonObject.set("requestURL", requestURL());
- jsonObject.set("host", m_requestURL.host());
- jsonObject.set("path", m_requestURL.path());
- jsonObject.set("lastPathComponent", m_requestURL.lastPathComponent());
- jsonObject.set("isMainResource", m_isMainResource);
- jsonObject.set("cached", m_cached);
- jsonObject.set("requestMethod", m_requestMethod);
- jsonObject.set("requestFormData", m_requestFormData);
- if (!frontend->addResource(m_identifier, jsonObject))
- return;
-
- m_scriptObjectCreated = true;
- m_changes.clear(RequestChange);
- }
- updateScriptObject(frontend);
-}
void InspectorResource::updateScriptObject(InspectorFrontend* frontend)
{
- if (!m_scriptObjectCreated)
- return;
-
if (m_changes.hasChange(NoChange))
return;
@@ -163,7 +149,7 @@ void InspectorResource::updateScriptObject(InspectorFrontend* frontend)
if (m_changes.hasChange(RequestChange)) {
jsonObject.set("url", requestURL());
jsonObject.set("documentURL", m_frame->document()->url().string());
- jsonObject.set("domain", m_requestURL.host());
+ jsonObject.set("host", m_requestURL.host());
jsonObject.set("path", m_requestURL.path());
jsonObject.set("lastPathComponent", m_requestURL.lastPathComponent());
ScriptObject requestHeaders = frontend->newScriptObject();
@@ -173,6 +159,7 @@ void InspectorResource::updateScriptObject(InspectorFrontend* frontend)
jsonObject.set("requestMethod", m_requestMethod);
jsonObject.set("requestFormData", m_requestFormData);
jsonObject.set("didRequestChange", true);
+ jsonObject.set("cached", m_cached);
}
if (m_changes.hasChange(ResponseChange)) {
@@ -216,19 +203,23 @@ void InspectorResource::updateScriptObject(InspectorFrontend* frontend)
jsonObject.set("domContentEventTime", m_domContentEventTime);
jsonObject.set("didTimingChange", true);
}
- if (!frontend->updateResource(m_identifier, jsonObject))
- return;
- m_changes.clearAll();
+
+ if (m_changes.hasChange(RedirectsChange)) {
+ for (size_t i = 0; i < m_redirects.size(); ++i)
+ m_redirects[i]->updateScriptObject(frontend);
+ }
+
+ if (frontend->updateResource(m_identifier, jsonObject))
+ m_changes.clearAll();
}
void InspectorResource::releaseScriptObject(InspectorFrontend* frontend, bool callRemoveResource)
{
- if (!m_scriptObjectCreated)
- return;
-
- m_scriptObjectCreated = false;
m_changes.setAll();
+ for (size_t i = 0; i < m_redirects.size(); ++i)
+ m_redirects[i]->releaseScriptObject(frontend, callRemoveResource);
+
if (!callRemoveResource)
return;
@@ -288,7 +279,6 @@ InspectorResource::Type InspectorResource::type() const
return Image;
return cachedResourceType();
-
}
void InspectorResource::setXMLHttpResponseText(const ScriptString& data)
diff --git a/WebCore/inspector/InspectorResource.h b/WebCore/inspector/InspectorResource.h
index 7d9b977..ce86dd7 100644
--- a/WebCore/inspector/InspectorResource.h
+++ b/WebCore/inspector/InspectorResource.h
@@ -68,16 +68,16 @@ namespace WebCore {
Other
};
- static PassRefPtr<InspectorResource> create(unsigned long identifier, DocumentLoader* loader)
+ static PassRefPtr<InspectorResource> create(unsigned long identifier, DocumentLoader* loader, const KURL& requestURL)
{
- return adoptRef(new InspectorResource(identifier, loader));
+ return adoptRef(new InspectorResource(identifier, loader, requestURL));
}
static PassRefPtr<InspectorResource> createCached(unsigned long identifier, DocumentLoader*, const CachedResource*);
~InspectorResource();
- void createScriptObject(InspectorFrontend* frontend);
+ PassRefPtr<InspectorResource> appendRedirect(unsigned long identifier, const KURL& redirectURL);
void updateScriptObject(InspectorFrontend* frontend);
void releaseScriptObject(InspectorFrontend* frontend, bool callRemoveResource);
@@ -118,7 +118,8 @@ namespace WebCore {
TypeChange = 4,
LengthChange = 8,
CompletionChange = 16,
- TimingChange = 32
+ TimingChange = 32,
+ RedirectsChange = 64
};
class Changes {
@@ -138,14 +139,14 @@ namespace WebCore {
m_change = static_cast<ChangeType>(static_cast<unsigned>(m_change) & ~static_cast<unsigned>(change));
}
- inline void setAll() { m_change = static_cast<ChangeType>(63); }
+ inline void setAll() { m_change = static_cast<ChangeType>(127); }
inline void clearAll() { m_change = NoChange; }
private:
ChangeType m_change;
};
- InspectorResource(unsigned long identifier, DocumentLoader*);
+ InspectorResource(unsigned long identifier, DocumentLoader*, const KURL& requestURL);
Type type() const;
Type cachedResourceType() const;
@@ -159,7 +160,6 @@ namespace WebCore {
HTTPHeaderMap m_responseHeaderFields;
String m_mimeType;
String m_suggestedFilename;
- bool m_scriptObjectCreated;
long long m_expectedContentLength;
bool m_cached;
bool m_finished;
@@ -176,6 +176,7 @@ namespace WebCore {
bool m_isMainResource;
String m_requestMethod;
String m_requestFormData;
+ Vector<RefPtr<InspectorResource> > m_redirects;
};
} // namespace WebCore
diff --git a/WebCore/inspector/InspectorTimelineAgent.cpp b/WebCore/inspector/InspectorTimelineAgent.cpp
index b28aa97..cbf6ee1 100644
--- a/WebCore/inspector/InspectorTimelineAgent.cpp
+++ b/WebCore/inspector/InspectorTimelineAgent.cpp
@@ -56,7 +56,7 @@ InspectorTimelineAgent::~InspectorTimelineAgent()
void InspectorTimelineAgent::willDispatchEvent(const Event& event)
{
- pushCurrentRecord(TimelineRecordFactory::createEventDispatchRecord(m_frontend, currentTimeInMilliseconds(), event),
+ pushCurrentRecord(TimelineRecordFactory::createEventDispatchData(m_frontend, event),
EventDispatchTimelineRecordType);
}
@@ -67,7 +67,7 @@ void InspectorTimelineAgent::didDispatchEvent()
void InspectorTimelineAgent::willLayout()
{
- pushCurrentRecord(TimelineRecordFactory::createGenericRecord(m_frontend, currentTimeInMilliseconds()), LayoutTimelineRecordType);
+ pushCurrentRecord(m_frontend->newScriptObject(), LayoutTimelineRecordType);
}
void InspectorTimelineAgent::didLayout()
@@ -77,7 +77,7 @@ void InspectorTimelineAgent::didLayout()
void InspectorTimelineAgent::willRecalculateStyle()
{
- pushCurrentRecord(TimelineRecordFactory::createGenericRecord(m_frontend, currentTimeInMilliseconds()), RecalculateStylesTimelineRecordType);
+ pushCurrentRecord(m_frontend->newScriptObject(), RecalculateStylesTimelineRecordType);
}
void InspectorTimelineAgent::didRecalculateStyle()
@@ -87,8 +87,7 @@ void InspectorTimelineAgent::didRecalculateStyle()
void InspectorTimelineAgent::willPaint(const IntRect& rect)
{
- pushCurrentRecord(TimelineRecordFactory::createPaintRecord(m_frontend, currentTimeInMilliseconds(), rect),
- PaintTimelineRecordType);
+ pushCurrentRecord(TimelineRecordFactory::createPaintData(m_frontend, rect), PaintTimelineRecordType);
}
void InspectorTimelineAgent::didPaint()
@@ -96,32 +95,37 @@ void InspectorTimelineAgent::didPaint()
didCompleteCurrentRecord(PaintTimelineRecordType);
}
-void InspectorTimelineAgent::willWriteHTML()
+void InspectorTimelineAgent::willWriteHTML(unsigned int length, unsigned int startLine)
{
- pushCurrentRecord(TimelineRecordFactory::createGenericRecord(m_frontend, currentTimeInMilliseconds()), ParseHTMLTimelineRecordType);
+ pushCurrentRecord(TimelineRecordFactory::createParseHTMLData(m_frontend, length, startLine), ParseHTMLTimelineRecordType);
}
-void InspectorTimelineAgent::didWriteHTML()
+void InspectorTimelineAgent::didWriteHTML(unsigned int endLine)
{
- didCompleteCurrentRecord(ParseHTMLTimelineRecordType);
+ if (!m_recordStack.isEmpty()) {
+ TimelineRecordEntry entry = m_recordStack.last();
+ entry.data.set("endLine", endLine);
+ didCompleteCurrentRecord(ParseHTMLTimelineRecordType);
+ }
}
void InspectorTimelineAgent::didInstallTimer(int timerId, int timeout, bool singleShot)
{
- addRecordToTimeline(TimelineRecordFactory::createTimerInstallRecord(m_frontend, currentTimeInMilliseconds(), timerId,
- timeout, singleShot), TimerInstallTimelineRecordType);
+ ScriptObject record = TimelineRecordFactory::createGenericRecord(m_frontend, currentTimeInMilliseconds());
+ record.set("data", TimelineRecordFactory::createTimerInstallData(m_frontend, timerId, timeout, singleShot));
+ addRecordToTimeline(record, TimerInstallTimelineRecordType);
}
void InspectorTimelineAgent::didRemoveTimer(int timerId)
{
- addRecordToTimeline(TimelineRecordFactory::createGenericTimerRecord(m_frontend, currentTimeInMilliseconds(), timerId),
- TimerRemoveTimelineRecordType);
+ ScriptObject record = TimelineRecordFactory::createGenericRecord(m_frontend, currentTimeInMilliseconds());
+ record.set("data", TimelineRecordFactory::createGenericTimerData(m_frontend, timerId));
+ addRecordToTimeline(record, TimerRemoveTimelineRecordType);
}
void InspectorTimelineAgent::willFireTimer(int timerId)
{
- pushCurrentRecord(TimelineRecordFactory::createGenericTimerRecord(m_frontend, currentTimeInMilliseconds(), timerId),
- TimerFireTimelineRecordType);
+ pushCurrentRecord(TimelineRecordFactory::createGenericTimerData(m_frontend, timerId), TimerFireTimelineRecordType);
}
void InspectorTimelineAgent::didFireTimer()
@@ -131,8 +135,7 @@ void InspectorTimelineAgent::didFireTimer()
void InspectorTimelineAgent::willChangeXHRReadyState(const String& url, int readyState)
{
- pushCurrentRecord(TimelineRecordFactory::createXHRReadyStateChangeRecord(m_frontend, currentTimeInMilliseconds(), url, readyState),
- XHRReadyStateChangeRecordType);
+ pushCurrentRecord(TimelineRecordFactory::createXHRReadyStateChangeData(m_frontend, url, readyState), XHRReadyStateChangeRecordType);
}
void InspectorTimelineAgent::didChangeXHRReadyState()
@@ -142,7 +145,7 @@ void InspectorTimelineAgent::didChangeXHRReadyState()
void InspectorTimelineAgent::willLoadXHR(const String& url)
{
- pushCurrentRecord(TimelineRecordFactory::createXHRLoadRecord(m_frontend, currentTimeInMilliseconds(), url), XHRLoadRecordType);
+ pushCurrentRecord(TimelineRecordFactory::createXHRLoadData(m_frontend, url), XHRLoadRecordType);
}
void InspectorTimelineAgent::didLoadXHR()
@@ -152,7 +155,7 @@ void InspectorTimelineAgent::didLoadXHR()
void InspectorTimelineAgent::willEvaluateScript(const String& url, int lineNumber)
{
- pushCurrentRecord(TimelineRecordFactory::createEvaluateScriptRecord(m_frontend, currentTimeInMilliseconds(), url, lineNumber), EvaluateScriptTimelineRecordType);
+ pushCurrentRecord(TimelineRecordFactory::createEvaluateScriptData(m_frontend, url, lineNumber), EvaluateScriptTimelineRecordType);
}
void InspectorTimelineAgent::didEvaluateScript()
@@ -163,31 +166,33 @@ void InspectorTimelineAgent::didEvaluateScript()
void InspectorTimelineAgent::willSendResourceRequest(unsigned long identifier, bool isMainResource,
const ResourceRequest& request)
{
- ScriptObject record = TimelineRecordFactory::createResourceSendRequestRecord(m_frontend, currentTimeInMilliseconds(),
- identifier, isMainResource, request);
+ ScriptObject record = TimelineRecordFactory::createGenericRecord(m_frontend, currentTimeInMilliseconds());
+ record.set("data", TimelineRecordFactory::createResourceSendRequestData(m_frontend, identifier, isMainResource, request));
record.set("type", ResourceSendRequestTimelineRecordType);
m_frontend->addRecordToTimeline(record);
}
void InspectorTimelineAgent::didReceiveResourceResponse(unsigned long identifier, const ResourceResponse& response)
{
- ScriptObject record = TimelineRecordFactory::createResourceReceiveResponseRecord(m_frontend, currentTimeInMilliseconds(),
- identifier, response);
+ ScriptObject record = TimelineRecordFactory::createGenericRecord(m_frontend, currentTimeInMilliseconds());
+ record.set("data", TimelineRecordFactory::createResourceReceiveResponseData(m_frontend, identifier, response));
record.set("type", ResourceReceiveResponseTimelineRecordType);
m_frontend->addRecordToTimeline(record);
}
void InspectorTimelineAgent::didFinishLoadingResource(unsigned long identifier, bool didFail)
{
- ScriptObject record = TimelineRecordFactory::createResourceFinishRecord(m_frontend, currentTimeInMilliseconds(),
- identifier, didFail);
+ ScriptObject record = TimelineRecordFactory::createGenericRecord(m_frontend, currentTimeInMilliseconds());
+ record.set("data", TimelineRecordFactory::createResourceFinishData(m_frontend, identifier, didFail));
record.set("type", ResourceFinishTimelineRecordType);
m_frontend->addRecordToTimeline(record);
}
void InspectorTimelineAgent::didMarkTimeline(const String& message)
{
- addRecordToTimeline(TimelineRecordFactory::createMarkTimelineRecord(m_frontend, currentTimeInMilliseconds(), message), MarkTimelineRecordType);
+ ScriptObject record = TimelineRecordFactory::createGenericRecord(m_frontend, currentTimeInMilliseconds());
+ record.set("data", TimelineRecordFactory::createMarkTimelineData(m_frontend, message));
+ addRecordToTimeline(record, MarkTimelineRecordType);
}
void InspectorTimelineAgent::reset()
@@ -221,6 +226,7 @@ void InspectorTimelineAgent::didCompleteCurrentRecord(TimelineRecordType type)
TimelineRecordEntry entry = m_recordStack.last();
m_recordStack.removeLast();
ASSERT(entry.type == type);
+ entry.record.set("data", entry.data);
entry.record.set("children", entry.children);
entry.record.set("endTime", currentTimeInMilliseconds());
addRecordToTimeline(entry.record, type);
@@ -232,9 +238,9 @@ double InspectorTimelineAgent::currentTimeInMilliseconds()
return currentTime() * 1000.0;
}
-void InspectorTimelineAgent::pushCurrentRecord(ScriptObject record, TimelineRecordType type)
+void InspectorTimelineAgent::pushCurrentRecord(ScriptObject data, TimelineRecordType type)
{
- m_recordStack.append(TimelineRecordEntry(record, m_frontend->newScriptArray(), type));
+ m_recordStack.append(TimelineRecordEntry(TimelineRecordFactory::createGenericRecord(m_frontend, currentTimeInMilliseconds()), data, m_frontend->newScriptArray(), type));
}
} // namespace WebCore
diff --git a/WebCore/inspector/InspectorTimelineAgent.h b/WebCore/inspector/InspectorTimelineAgent.h
index 1929286..fd86ba7 100644
--- a/WebCore/inspector/InspectorTimelineAgent.h
+++ b/WebCore/inspector/InspectorTimelineAgent.h
@@ -65,7 +65,7 @@ namespace WebCore {
ResourceFinishTimelineRecordType = 14,
};
- class InspectorTimelineAgent {
+ class InspectorTimelineAgent : public Noncopyable {
public:
InspectorTimelineAgent(InspectorFrontend* frontend);
~InspectorTimelineAgent();
@@ -86,8 +86,8 @@ namespace WebCore {
void willPaint(const IntRect&);
void didPaint();
- void willWriteHTML();
- void didWriteHTML();
+ void willWriteHTML(unsigned int length, unsigned int startLine);
+ void didWriteHTML(unsigned int endLine);
void didInstallTimer(int timerId, int timeout, bool singleShot);
void didRemoveTimer(int timerId);
@@ -111,8 +111,9 @@ namespace WebCore {
static InspectorTimelineAgent* retrieve(ScriptExecutionContext*);
private:
struct TimelineRecordEntry {
- TimelineRecordEntry(ScriptObject record, ScriptArray children, TimelineRecordType type) : record(record), children(children), type(type) { }
+ TimelineRecordEntry(ScriptObject record, ScriptObject data, ScriptArray children, TimelineRecordType type) : record(record), data(data), children(children), type(type) { }
ScriptObject record;
+ ScriptObject data;
ScriptArray children;
TimelineRecordType type;
};
@@ -122,7 +123,7 @@ namespace WebCore {
static double currentTimeInMilliseconds();
void didCompleteCurrentRecord(TimelineRecordType);
-
+
void addRecordToTimeline(ScriptObject, TimelineRecordType);
InspectorFrontend* m_frontend;
@@ -132,7 +133,7 @@ namespace WebCore {
inline InspectorTimelineAgent* InspectorTimelineAgent::retrieve(ScriptExecutionContext* context)
{
- if (context->isDocument())
+ if (context && context->isDocument())
return static_cast<Document*>(context)->inspectorTimelineAgent();
return 0;
}
diff --git a/WebCore/inspector/JavaScriptCallFrame.idl b/WebCore/inspector/JavaScriptCallFrame.idl
index 2f247f0..639ecc9 100644
--- a/WebCore/inspector/JavaScriptCallFrame.idl
+++ b/WebCore/inspector/JavaScriptCallFrame.idl
@@ -25,7 +25,7 @@
module inspector {
- interface [Conditional=JAVASCRIPT_DEBUGGER] JavaScriptCallFrame {
+ interface [Conditional=JAVASCRIPT_DEBUGGER, OmitConstructor] JavaScriptCallFrame {
[Custom] void evaluate(in DOMString script);
readonly attribute JavaScriptCallFrame caller;
diff --git a/WebCore/inspector/JavaScriptDebugServer.cpp b/WebCore/inspector/JavaScriptDebugServer.cpp
index e460ae8..4aab347 100644
--- a/WebCore/inspector/JavaScriptDebugServer.cpp
+++ b/WebCore/inspector/JavaScriptDebugServer.cpp
@@ -75,7 +75,7 @@ JavaScriptDebugServer& JavaScriptDebugServer::shared()
JavaScriptDebugServer::JavaScriptDebugServer()
: m_callingListeners(false)
- , m_pauseOnExceptions(false)
+ , m_pauseOnExceptionsState(DontPauseOnExceptions)
, m_pauseOnNextStatement(false)
, m_paused(false)
, m_doneProcessingDebuggerEvents(true)
@@ -249,9 +249,9 @@ void JavaScriptDebugServer::clearBreakpoints()
m_breakpoints.clear();
}
-void JavaScriptDebugServer::setPauseOnExceptions(bool pause)
+void JavaScriptDebugServer::setPauseOnExceptionsState(PauseOnExceptionsState pause)
{
- m_pauseOnExceptions = pause;
+ m_pauseOnExceptionsState = pause;
}
void JavaScriptDebugServer::pauseProgram()
@@ -423,7 +423,7 @@ void JavaScriptDebugServer::setJavaScriptPaused(Frame* frame, bool paused)
{
ASSERT_ARG(frame, frame);
- if (!frame->script()->isEnabled())
+ if (!frame->script()->canExecuteScripts())
return;
frame->script()->setPaused(paused);
@@ -540,7 +540,7 @@ void JavaScriptDebugServer::returnEvent(const DebuggerCallFrame& debuggerCallFra
m_currentCallFrame = m_currentCallFrame->caller();
}
-void JavaScriptDebugServer::exception(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber)
+void JavaScriptDebugServer::exception(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber, bool hasHandler)
{
if (m_paused)
return;
@@ -549,7 +549,7 @@ void JavaScriptDebugServer::exception(const DebuggerCallFrame& debuggerCallFrame
if (!m_currentCallFrame)
return;
- if (m_pauseOnExceptions)
+ if (m_pauseOnExceptionsState == PauseOnAllExceptions || (m_pauseOnExceptionsState == PauseOnUncaughtExceptions && !hasHandler))
m_pauseOnNextStatement = true;
m_currentCallFrame->update(debuggerCallFrame, sourceID, lineNumber);
diff --git a/WebCore/inspector/JavaScriptDebugServer.h b/WebCore/inspector/JavaScriptDebugServer.h
index 33c6e3d..b5b713d 100644
--- a/WebCore/inspector/JavaScriptDebugServer.h
+++ b/WebCore/inspector/JavaScriptDebugServer.h
@@ -52,7 +52,7 @@ namespace WebCore {
class JavaScriptCallFrame;
class JavaScriptDebugListener;
- class JavaScriptDebugServer : JSC::Debugger {
+ class JavaScriptDebugServer : JSC::Debugger, public Noncopyable {
public:
static JavaScriptDebugServer& shared();
@@ -68,8 +68,13 @@ namespace WebCore {
bool hasBreakpoint(intptr_t sourceID, unsigned lineNumber) const;
void clearBreakpoints();
- bool pauseOnExceptions() const { return m_pauseOnExceptions; }
- void setPauseOnExceptions(bool);
+ enum PauseOnExceptionsState {
+ DontPauseOnExceptions,
+ PauseOnAllExceptions,
+ PauseOnUncaughtExceptions
+ };
+ PauseOnExceptionsState pauseOnExceptionsState() const { return m_pauseOnExceptionsState; }
+ void setPauseOnExceptionsState(PauseOnExceptionsState);
void pauseProgram();
void continueProgram();
@@ -120,7 +125,7 @@ namespace WebCore {
virtual void callEvent(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber);
virtual void atStatement(const JSC::DebuggerCallFrame&, intptr_t sourceID, int firstLine);
virtual void returnEvent(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber);
- virtual void exception(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber);
+ virtual void exception(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber, bool hasHandler);
virtual void willExecuteProgram(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineno);
virtual void didExecuteProgram(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineno);
virtual void didReachBreakpoint(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineno);
@@ -136,7 +141,7 @@ namespace WebCore {
PageListenersMap m_pageListenersMap;
ListenerSet m_listeners;
bool m_callingListeners;
- bool m_pauseOnExceptions;
+ PauseOnExceptionsState m_pauseOnExceptionsState;
bool m_pauseOnNextStatement;
bool m_paused;
bool m_doneProcessingDebuggerEvents;
diff --git a/WebCore/inspector/TimelineRecordFactory.cpp b/WebCore/inspector/TimelineRecordFactory.cpp
index 4fdd502..525e61d 100644
--- a/WebCore/inspector/TimelineRecordFactory.cpp
+++ b/WebCore/inspector/TimelineRecordFactory.cpp
@@ -50,121 +50,104 @@ ScriptObject TimelineRecordFactory::createGenericRecord(InspectorFrontend* front
return record;
}
-ScriptObject TimelineRecordFactory::createEventDispatchRecord(InspectorFrontend* frontend, double startTime, const Event& event)
+ScriptObject TimelineRecordFactory::createEventDispatchData(InspectorFrontend* frontend, const Event& event)
{
- ScriptObject record = createGenericRecord(frontend, startTime);
ScriptObject data = frontend->newScriptObject();
data.set("type", event.type().string());
- record.set("data", data);
- return record;
+ return data;
}
-ScriptObject TimelineRecordFactory::createGenericTimerRecord(InspectorFrontend* frontend, double startTime, int timerId)
+ScriptObject TimelineRecordFactory::createGenericTimerData(InspectorFrontend* frontend, int timerId)
{
- ScriptObject record = createGenericRecord(frontend, startTime);
ScriptObject data = frontend->newScriptObject();
data.set("timerId", timerId);
- record.set("data", data);
- return record;
+ return data;
}
-ScriptObject TimelineRecordFactory::createTimerInstallRecord(InspectorFrontend* frontend, double startTime, int timerId, int timeout, bool singleShot)
+ScriptObject TimelineRecordFactory::createTimerInstallData(InspectorFrontend* frontend, int timerId, int timeout, bool singleShot)
{
- ScriptObject record = createGenericRecord(frontend, startTime);
ScriptObject data = frontend->newScriptObject();
data.set("timerId", timerId);
data.set("timeout", timeout);
data.set("singleShot", singleShot);
- record.set("data", data);
- return record;
+ return data;
}
-ScriptObject TimelineRecordFactory::createXHRReadyStateChangeRecord(InspectorFrontend* frontend, double startTime, const String& url, int readyState)
+ScriptObject TimelineRecordFactory::createXHRReadyStateChangeData(InspectorFrontend* frontend, const String& url, int readyState)
{
- ScriptObject record = createGenericRecord(frontend, startTime);
ScriptObject data = frontend->newScriptObject();
data.set("url", url);
data.set("readyState", readyState);
- record.set("data", data);
- return record;
+ return data;
}
-ScriptObject TimelineRecordFactory::createXHRLoadRecord(InspectorFrontend* frontend, double startTime, const String& url)
+ScriptObject TimelineRecordFactory::createXHRLoadData(InspectorFrontend* frontend, const String& url)
{
- ScriptObject record = createGenericRecord(frontend, startTime);
ScriptObject data = frontend->newScriptObject();
data.set("url", url);
- record.set("data", data);
- return record;
+ return data;
}
-ScriptObject TimelineRecordFactory::createEvaluateScriptRecord(InspectorFrontend* frontend, double startTime, const String& url, double lineNumber)
+ScriptObject TimelineRecordFactory::createEvaluateScriptData(InspectorFrontend* frontend, const String& url, double lineNumber)
{
- ScriptObject record = createGenericRecord(frontend, startTime);
ScriptObject data = frontend->newScriptObject();
data.set("url", url);
data.set("lineNumber", lineNumber);
- record.set("data", data);
- return record;
+ return data;
}
-ScriptObject TimelineRecordFactory::createMarkTimelineRecord(InspectorFrontend* frontend, double startTime, const String& message)
+ScriptObject TimelineRecordFactory::createMarkTimelineData(InspectorFrontend* frontend, const String& message)
{
- ScriptObject record = createGenericRecord(frontend, startTime);
ScriptObject data = frontend->newScriptObject();
data.set("message", message);
- record.set("data", data);
- return record;
+ return data;
}
-ScriptObject TimelineRecordFactory::createResourceSendRequestRecord(InspectorFrontend* frontend, double startTime,
- unsigned long identifier, bool isMainResource, const ResourceRequest& request)
+ScriptObject TimelineRecordFactory::createResourceSendRequestData(InspectorFrontend* frontend, unsigned long identifier, bool isMainResource, const ResourceRequest& request)
{
- ScriptObject record = createGenericRecord(frontend, startTime);
ScriptObject data = frontend->newScriptObject();
data.set("identifier", identifier);
data.set("url", request.url().string());
data.set("requestMethod", request.httpMethod());
data.set("isMainResource", isMainResource);
- record.set("data", data);
- return record;
+ return data;
}
-ScriptObject TimelineRecordFactory::createResourceReceiveResponseRecord(InspectorFrontend* frontend, double startTime,
- unsigned long identifier, const ResourceResponse& response)
+ScriptObject TimelineRecordFactory::createResourceReceiveResponseData(InspectorFrontend* frontend, unsigned long identifier, const ResourceResponse& response)
{
- ScriptObject record = createGenericRecord(frontend, startTime);
ScriptObject data = frontend->newScriptObject();
data.set("identifier", identifier);
data.set("statusCode", response.httpStatusCode());
data.set("mimeType", response.mimeType());
data.set("expectedContentLength", response.expectedContentLength());
- record.set("data", data);
- return record;
+ return data;
}
-ScriptObject TimelineRecordFactory::createResourceFinishRecord(InspectorFrontend* frontend, double startTime,
- unsigned long identifier, bool didFail)
+ScriptObject TimelineRecordFactory::createResourceFinishData(InspectorFrontend* frontend, unsigned long identifier, bool didFail)
{
- ScriptObject record = createGenericRecord(frontend, startTime);
ScriptObject data = frontend->newScriptObject();
data.set("identifier", identifier);
data.set("didFail", didFail);
- record.set("data", data);
- return record;
+ return data;
}
-ScriptObject TimelineRecordFactory::createPaintRecord(InspectorFrontend* frontend, double startTime, const IntRect& rect)
+ScriptObject TimelineRecordFactory::createPaintData(InspectorFrontend* frontend, const IntRect& rect)
{
- ScriptObject record = createGenericRecord(frontend, startTime);
ScriptObject data = frontend->newScriptObject();
data.set("x", rect.x());
data.set("y", rect.y());
data.set("width", rect.width());
data.set("height", rect.height());
- record.set("data", data);
- return record;
+ return data;
+}
+
+ScriptObject TimelineRecordFactory::createParseHTMLData(InspectorFrontend* frontend, unsigned int length, unsigned int startLine)
+{
+ ScriptObject data = frontend->newScriptObject();
+ data.set("length", length);
+ data.set("startLine", startLine);
+ return data;
}
} // namespace WebCore
diff --git a/WebCore/inspector/TimelineRecordFactory.h b/WebCore/inspector/TimelineRecordFactory.h
index e0ccc95..b7437f5 100644
--- a/WebCore/inspector/TimelineRecordFactory.h
+++ b/WebCore/inspector/TimelineRecordFactory.h
@@ -46,27 +46,30 @@ namespace WebCore {
public:
static ScriptObject createGenericRecord(InspectorFrontend*, double startTime);
- static ScriptObject createEventDispatchRecord(InspectorFrontend*, double startTime, const Event&);
+ static ScriptObject createEventDispatchData(InspectorFrontend*, const Event&);
- static ScriptObject createGenericTimerRecord(InspectorFrontend*, double startTime, int timerId);
+ static ScriptObject createGenericTimerData(InspectorFrontend*, int timerId);
- static ScriptObject createTimerInstallRecord(InspectorFrontend*, double startTime, int timerId, int timeout, bool singleShot);
+ static ScriptObject createTimerInstallData(InspectorFrontend*, int timerId, int timeout, bool singleShot);
- static ScriptObject createXHRReadyStateChangeRecord(InspectorFrontend*, double startTime, const String& url, int readyState);
- static ScriptObject createXHRLoadRecord(InspectorFrontend*, double startTime, const String& url);
+ static ScriptObject createXHRReadyStateChangeData(InspectorFrontend*, const String& url, int readyState);
+
+ static ScriptObject createXHRLoadData(InspectorFrontend*, const String& url);
- static ScriptObject createEvaluateScriptRecord(InspectorFrontend*, double startTime, const String&, double lineNumber);
+ static ScriptObject createEvaluateScriptData(InspectorFrontend*, const String&, double lineNumber);
- static ScriptObject createMarkTimelineRecord(InspectorFrontend*, double startTime, const String&);
+ static ScriptObject createMarkTimelineData(InspectorFrontend*, const String&);
+
+ static ScriptObject createResourceSendRequestData(InspectorFrontend*, unsigned long identifier,
+ bool isMainResource, const ResourceRequest&);
+
+ static ScriptObject createResourceReceiveResponseData(InspectorFrontend*, unsigned long identifier, const ResourceResponse&);
+
+ static ScriptObject createResourceFinishData(InspectorFrontend*, unsigned long identifier, bool didFail);
- static ScriptObject createResourceSendRequestRecord(InspectorFrontend*, double startTime,
- unsigned long identifier, bool isMainResource, const ResourceRequest&);
- static ScriptObject createResourceReceiveResponseRecord(InspectorFrontend*, double startTime,
- unsigned long identifier, const ResourceResponse&);
- static ScriptObject createResourceFinishRecord(InspectorFrontend*, double startTime,
- unsigned long identifier, bool didFail);
+ static ScriptObject createPaintData(InspectorFrontend*, const IntRect&);
- static ScriptObject createPaintRecord(InspectorFrontend*, double startTime, const IntRect&);
+ static ScriptObject createParseHTMLData(InspectorFrontend*, unsigned int length, unsigned int startLine);
private:
TimelineRecordFactory() { }
diff --git a/WebCore/inspector/front-end/AbstractTimelinePanel.js b/WebCore/inspector/front-end/AbstractTimelinePanel.js
index c5180f6..6c5d715 100644
--- a/WebCore/inspector/front-end/AbstractTimelinePanel.js
+++ b/WebCore/inspector/front-end/AbstractTimelinePanel.js
@@ -215,8 +215,9 @@ WebInspector.AbstractTimelinePanel.prototype = {
_updateDividersLabelBarPosition: function()
{
- var scrollTop = this.containerElement.scrollTop;
- var dividersTop = (scrollTop < this.summaryBar.element.offsetHeight ? this.summaryBar.element.offsetHeight : scrollTop);
+ const scrollTop = this.containerElement.scrollTop;
+ const offsetHeight = this.summaryBar.element.offsetHeight;
+ const dividersTop = (scrollTop < offsetHeight ? offsetHeight : scrollTop);
this._timelineGrid.setScrollAndDividerTop(scrollTop, dividersTop);
},
@@ -259,13 +260,15 @@ WebInspector.AbstractTimelinePanel.prototype = {
resize: function()
{
+ WebInspector.Panel.prototype.resize.call(this);
+
this.updateGraphDividersIfNeeded();
},
updateMainViewWidth: function(width)
{
this._containerContentElement.style.left = width + "px";
- this.updateGraphDividersIfNeeded();
+ this.resize();
},
invalidateAllItems: function()
diff --git a/WebCore/inspector/front-end/AuditLauncherView.js b/WebCore/inspector/front-end/AuditLauncherView.js
new file mode 100644
index 0000000..79fbb92
--- /dev/null
+++ b/WebCore/inspector/front-end/AuditLauncherView.js
@@ -0,0 +1,219 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.AuditLauncherView = function(categoriesById, runnerCallback)
+{
+ WebInspector.View.call(this);
+ this._categoriesById = categoriesById;
+ this._runnerCallback = runnerCallback;
+ this._categoryIdPrefix = "audit-category-item-";
+ this._auditRunning = false;
+
+ this.element.addStyleClass("audit-launcher-view");
+
+ this._contentElement = document.createElement("div");
+ this._contentElement.className = "audit-launcher-view-content";
+ this.element.appendChild(this._contentElement);
+
+ 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);
+
+ 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);
+}
+
+WebInspector.AuditLauncherView.prototype = {
+ updateResourceTrackingState: function()
+ {
+ if (!this._auditPresentStateLabelElement)
+ return;
+ if (InspectorBackend.resourceTrackingEnabled()) {
+ this._auditPresentStateLabelElement.nodeValue = WebInspector.UIString("Audit Present State");
+ this._auditPresentStateElement.disabled = false;
+ this._auditPresentStateElement.parentElement.removeStyleClass("disabled");
+ } else {
+ this._auditPresentStateLabelElement.nodeValue = WebInspector.UIString("Audit Present State (Resource Tracking must be enabled)");
+ this._auditPresentStateElement.disabled = true;
+ this._auditPresentStateElement.parentElement.addStyleClass("disabled");
+ this.auditReloadedStateElement.checked = true;
+ }
+ },
+
+ _setAuditRunning: function(auditRunning)
+ {
+ if (this._auditRunning === auditRunning)
+ return;
+ this._auditRunning = auditRunning;
+ this._updateButton();
+ },
+
+ _launchButtonClicked: function(event)
+ {
+ var catIds = [];
+ var childNodes = this._categoriesElement.childNodes;
+ for (var id in this._categoriesById) {
+ if (this._categoriesById[id]._checkboxElement.checked)
+ catIds.push(id);
+ }
+ function profilingFinishedCallback()
+ {
+ this._setAuditRunning(false);
+ }
+ this._setAuditRunning(true);
+ this._runnerCallback(catIds, this._auditPresentStateElement.checked, profilingFinishedCallback.bind(this));
+ },
+
+ _selectAllClicked: function(checkCategories)
+ {
+ 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._updateButton();
+ },
+
+ _categoryClicked: function(event)
+ {
+ this._currentCategoriesCount += event.target.checked ? 1 : -1;
+ this._selectAllCheckboxElement.checked = this._currentCategoriesCount === this._totalCategoriesCount;
+ this._updateButton();
+ },
+
+ _createCategoryElement: function(title, id)
+ {
+ var element;
+ var labelElement = document.createElement("label");
+ labelElement.id = this._categoryIdPrefix + id;
+
+ element = document.createElement("input");
+ element.type = "checkbox";
+ labelElement.appendChild(element);
+ labelElement.appendChild(document.createTextNode(title));
+
+ return labelElement;
+ },
+
+ _createLauncherUI: function(sortedCategories)
+ {
+ this._headerElement = document.createElement("h1");
+ this._headerElement.textContent = WebInspector.UIString("Select audits to run");
+ this._contentElement.appendChild(this._headerElement);
+
+ function handleSelectAllClick(event)
+ {
+ this._selectAllClicked(event.target.checked);
+ }
+ var categoryElement = this._createCategoryElement(WebInspector.UIString("Select All"), "");
+ categoryElement.id = "audit-launcher-selectall";
+ this._selectAllCheckboxElement = categoryElement.firstChild;
+ this._selectAllCheckboxElement.checked = true;
+ this._selectAllCheckboxElement.addEventListener("click", handleSelectAllClick.bind(this), false);
+ this._contentElement.appendChild(categoryElement);
+
+ this._categoriesElement = document.createElement("div");
+ 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;
+
+ this._buttonContainerElement = document.createElement("div");
+ this._buttonContainerElement.className = "button-container";
+
+ var labelElement = document.createElement("label");
+ this._auditPresentStateElement = document.createElement("input");
+ this._auditPresentStateElement.name = "audit-mode";
+ this._auditPresentStateElement.type = "radio";
+ this._auditPresentStateElement.checked = true;
+ this._auditPresentStateLabelElement = document.createTextNode("");
+ labelElement.appendChild(this._auditPresentStateElement);
+ labelElement.appendChild(this._auditPresentStateLabelElement);
+ this._buttonContainerElement.appendChild(labelElement);
+
+ labelElement = document.createElement("label");
+ this.auditReloadedStateElement = document.createElement("input");
+ this.auditReloadedStateElement.name = "audit-mode";
+ this.auditReloadedStateElement.type = "radio";
+ labelElement.appendChild(this.auditReloadedStateElement);
+ labelElement.appendChild(document.createTextNode("Reload Page and Audit on Load"));
+ this._buttonContainerElement.appendChild(labelElement);
+
+ this._launchButton = document.createElement("button");
+ this._launchButton.setAttribute("type", "button");
+ this._launchButton.addEventListener("click", this._launchButtonClicked.bind(this), false);
+ this._buttonContainerElement.appendChild(this._launchButton);
+
+ this._contentElement.appendChild(this._buttonContainerElement);
+
+ this._selectAllClicked(this._selectAllCheckboxElement.checked);
+ this.updateResourceTrackingState();
+ this._updateButton();
+ this.resize();
+ },
+
+ _updateButton: function()
+ {
+ this._launchButton.disabled = !this._currentCategoriesCount || this._auditRunning;
+ if (this._auditRunning)
+ this._launchButton.textContent = WebInspector.UIString("Running...");
+ else
+ this._launchButton.textContent = WebInspector.UIString("Run");
+ },
+
+ resize: function()
+ {
+ if (this._categoriesElement)
+ this._categoriesElement.style.height = (this._buttonContainerElement.totalOffsetTop - this._categoriesElement.totalOffsetTop) + "px";
+ }
+}
+
+WebInspector.AuditLauncherView.prototype.__proto__ = WebInspector.View.prototype;
diff --git a/WebCore/inspector/front-end/AuditResultView.js b/WebCore/inspector/front-end/AuditResultView.js
new file mode 100644
index 0000000..ac818fb
--- /dev/null
+++ b/WebCore/inspector/front-end/AuditResultView.js
@@ -0,0 +1,138 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.AuditResultView = function(categoryResults)
+{
+ WebInspector.View.call(this);
+
+ this.element.id = "audit-result-view";
+
+ function entrySortFunction(a, b)
+ {
+ var result = b.type - a.type;
+ if (!result)
+ result = (a.value || "").localeCompare(b.value || "");
+ return result;
+ }
+
+ for (var i = 0; i < categoryResults.length; ++i) {
+ var entries = categoryResults[i].entries;
+ if (entries) {
+ entries.sort(entrySortFunction);
+ this.element.appendChild(new WebInspector.AuditCategoryResultPane(categoryResults[i]).element);
+ }
+ }
+}
+
+WebInspector.AuditResultView.prototype.__proto__ = WebInspector.View.prototype;
+
+
+WebInspector.AuditCategoryResultPane = function(categoryResult)
+{
+ WebInspector.SidebarPane.call(this, categoryResult.title);
+ this.expand();
+ for (var i = 0; i < categoryResult.entries.length; ++i)
+ this.bodyElement.appendChild(new WebInspector.AuditRuleResultPane(categoryResult.entries[i]).element);
+}
+
+WebInspector.AuditCategoryResultPane.prototype.__proto__ = WebInspector.SidebarPane.prototype;
+
+
+WebInspector.AuditRuleResultPane = function(ruleResult)
+{
+ WebInspector.SidebarPane.call(this, ruleResult.value);
+ if (!ruleResult.children)
+ return;
+
+ this._decorateRuleResult(ruleResult);
+
+ for (var i = 0; i < ruleResult.children.length; ++i) {
+ var section = new WebInspector.AuditRuleResultChildSection(ruleResult.children[i]);
+ this.bodyElement.appendChild(section.element);
+ }
+}
+
+WebInspector.AuditRuleResultPane.prototype = {
+ _decorateRuleResult: function(ruleResult)
+ {
+ if (ruleResult.type == WebInspector.AuditRuleResult.Type.NA)
+ return;
+
+ var scoreElement = document.createElement("img");
+ scoreElement.className = "score";
+ var className = (ruleResult.type == WebInspector.AuditRuleResult.Type.Violation) ? "red" : "green";
+ scoreElement.addStyleClass(className);
+ this.element.insertBefore(scoreElement, this.element.firstChild);
+ }
+}
+
+WebInspector.AuditRuleResultPane.prototype.__proto__ = WebInspector.SidebarPane.prototype;
+
+
+WebInspector.AuditRuleResultChildSection = function(entry)
+{
+ WebInspector.Section.call(this, entry.value);
+ var children = entry.children;
+ this._hasChildren = !!children && children.length;
+ if (!this._hasChildren)
+ this.element.addStyleClass("blank-section");
+ else {
+ this.contentElement = document.createElement("div");
+ this.contentElement.addStyleClass("section-content");
+ for (var i = 0; i < children.length; ++i) {
+ var paraElement = document.createElement("p");
+ paraElement.innerHTML = children[i].value;
+ this.contentElement.appendChild(paraElement);
+ }
+ this.contentElement.appendChild(paraElement);
+ this.element.appendChild(this.contentElement);
+ }
+}
+
+WebInspector.AuditRuleResultChildSection.prototype = {
+
+ // title is considered pure HTML
+ set title(x)
+ {
+ if (this._title === x)
+ return;
+ this._title = x;
+
+ this.titleElement.innerHTML = x;
+ },
+
+ expand: function()
+ {
+ if (this._hasChildren)
+ WebInspector.Section.prototype.expand.call(this);
+ }
+}
+
+WebInspector.AuditRuleResultChildSection.prototype.__proto__ = WebInspector.Section.prototype;
diff --git a/WebCore/inspector/front-end/AuditsPanel.js b/WebCore/inspector/front-end/AuditsPanel.js
new file mode 100644
index 0000000..696d132
--- /dev/null
+++ b/WebCore/inspector/front-end/AuditsPanel.js
@@ -0,0 +1,466 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.AuditsPanel = function()
+{
+ WebInspector.Panel.call(this);
+
+ this._constructCategories();
+
+ this.createSidebar();
+ this.auditsTreeElement = new WebInspector.SidebarSectionTreeElement("", {}, true);
+ this.sidebarTree.appendChild(this.auditsTreeElement);
+ this.auditsTreeElement.expand();
+
+ this.auditsItemTreeElement = new WebInspector.AuditsSidebarTreeElement();
+ this.auditsTreeElement.appendChild(this.auditsItemTreeElement);
+
+ this.auditResultsTreeElement = new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("RESULTS"), {}, true);
+ this.sidebarTree.appendChild(this.auditResultsTreeElement);
+ this.auditResultsTreeElement.expand();
+
+ this.element.addStyleClass("audits");
+
+ this.clearResultsButton = new WebInspector.StatusBarButton(WebInspector.UIString("Clear audit results."), "clear-audit-results-status-bar-item");
+ this.clearResultsButton.addEventListener("click", this._clearButtonClicked.bind(this), false);
+
+ this.viewsContainerElement = document.createElement("div");
+ this.viewsContainerElement.id = "audit-views";
+ this.element.appendChild(this.viewsContainerElement);
+}
+
+WebInspector.AuditsPanel.prototype = {
+ toolbarItemClass: "audits",
+
+ get toolbarItemLabel()
+ {
+ return WebInspector.UIString("Audits");
+ },
+
+ get statusBarItems()
+ {
+ return [this.clearResultsButton.element];
+ },
+
+ get mainResourceLoadTime()
+ {
+ return this._mainResourceLoadTime;
+ },
+
+ set mainResourceLoadTime(x)
+ {
+ this._mainResourceLoadTime = x;
+ this._didMainResourceLoad();
+ },
+
+ get mainResourceDOMContentTime()
+ {
+ return this._mainResourceDOMContentTime;
+ },
+
+ set mainResourceDOMContentTime(x)
+ {
+ this._mainResourceDOMContentTime = x;
+ },
+
+ get categoriesById()
+ {
+ return this._auditCategoriesById;
+ },
+
+ get visibleView()
+ {
+ return this._visibleView;
+ },
+
+ _constructCategories: function()
+ {
+ this._auditCategoriesById = {};
+ for (var categoryCtorID in WebInspector.AuditCategories) {
+ var auditCategory = new WebInspector.AuditCategories[categoryCtorID]();
+ this.categoriesById[auditCategory.id] = auditCategory;
+ }
+ },
+
+ _executeAudit: function(categories, resultCallback)
+ {
+ var resources = [];
+ for (var id in WebInspector.resources)
+ resources.push(WebInspector.resources[id]);
+
+ var rulesRemaining = 0;
+ for (var i = 0; i < categories.length; ++i)
+ rulesRemaining += categories[i].ruleCount;
+
+ var results = [];
+ var mainResourceURL = WebInspector.mainResource.url;
+
+ function ruleResultReadyCallback(categoryResult, ruleResult)
+ {
+ if (ruleResult.children)
+ categoryResult.entries.push(ruleResult);
+
+ --rulesRemaining;
+
+ if (!rulesRemaining && resultCallback)
+ resultCallback(mainResourceURL, results);
+ }
+
+ if (!rulesRemaining) {
+ resultCallback(mainResourceURL, results);
+ return;
+ }
+
+ for (var i = 0; i < categories.length; ++i) {
+ var category = categories[i];
+ var result = new WebInspector.AuditCategoryResult(category);
+ results.push(result);
+ category.runRules(resources, ruleResultReadyCallback.bind(null, result));
+ }
+ },
+
+ _auditFinishedCallback: function(launcherCallback, mainResourceURL, results)
+ {
+ var children = this.auditResultsTreeElement.children;
+ var ordinal = 1;
+ for (var i = 0; i < children.length; ++i) {
+ if (children[i].mainResourceURL === mainResourceURL)
+ ordinal++;
+ }
+
+ var resultTreeElement = new WebInspector.AuditResultSidebarTreeElement(results, mainResourceURL, ordinal);
+ this.auditResultsTreeElement.appendChild(resultTreeElement);
+ resultTreeElement.reveal();
+ resultTreeElement.select();
+ if (launcherCallback)
+ launcherCallback();
+ },
+
+ initiateAudit: function(categoryIds, runImmediately, launcherCallback)
+ {
+ if (!categoryIds || !categoryIds.length)
+ return;
+
+ var categories = [];
+ for (var i = 0; i < categoryIds.length; ++i)
+ categories.push(this.categoriesById[categoryIds[i]]);
+
+ function initiateAuditCallback(categories, launcherCallback)
+ {
+ this._executeAudit(categories, this._auditFinishedCallback.bind(this, launcherCallback));
+ }
+
+ if (runImmediately)
+ initiateAuditCallback.call(this, categories, launcherCallback);
+ else
+ this._reloadResources(initiateAuditCallback.bind(this, categories, launcherCallback));
+ },
+
+ _reloadResources: function(callback)
+ {
+ function nullCallback()
+ {
+ }
+ this._resourceTrackingCallback = callback;
+ if (!InspectorBackend.resourceTrackingEnabled()) {
+ InspectorBackend.enableResourceTracking(false);
+ this._updateLauncherViewControls();
+ } else
+ InjectedScriptAccess.getDefault().evaluate("window.location.reload()", nullCallback);
+ },
+
+ _didMainResourceLoad: function()
+ {
+ if (this._resourceTrackingCallback) {
+ var callback = this._resourceTrackingCallback;
+ this._resourceTrackingCallback = null;
+ callback();
+ }
+ },
+
+ showResults: function(categoryResults)
+ {
+ if (!categoryResults._resultView)
+ categoryResults._resultView = new WebInspector.AuditResultView(categoryResults);
+
+ this.showView(categoryResults._resultView);
+ },
+
+ showLauncherView: function()
+ {
+ if (!this._launcherView)
+ this._launcherView = new WebInspector.AuditLauncherView(this.categoriesById, this.initiateAudit.bind(this));
+
+ this.showView(this._launcherView);
+ },
+
+ showView: function(view)
+ {
+ if (view) {
+ if (this._visibleView === view)
+ return;
+ this._closeVisibleView();
+ this._visibleView = view;
+ }
+ var visibleView = this.visibleView;
+ if (visibleView)
+ visibleView.show(this.viewsContainerElement);
+ },
+
+ show: function()
+ {
+ WebInspector.Panel.prototype.show.call(this);
+
+ this.showView();
+ this._updateLauncherViewControls();
+ },
+
+ attach: function()
+ {
+ WebInspector.Panel.prototype.attach.call(this);
+
+ this.auditsItemTreeElement.select();
+ },
+
+ updateMainViewWidth: function(width)
+ {
+ this.viewsContainerElement.style.left = width + "px";
+ },
+
+ _updateLauncherViewControls: function()
+ {
+ if (this._launcherView)
+ this._launcherView.updateResourceTrackingState();
+ },
+
+ _clearButtonClicked: function()
+ {
+ this.auditsItemTreeElement.reveal();
+ this.auditsItemTreeElement.select();
+ this.auditResultsTreeElement.removeChildren();
+ },
+
+ _closeVisibleView: function()
+ {
+ if (this.visibleView)
+ this.visibleView.hide();
+ }
+}
+
+WebInspector.AuditsPanel.prototype.__proto__ = WebInspector.Panel.prototype;
+
+
+
+WebInspector.AuditCategory = function(id, displayName)
+{
+ this._id = id;
+ this._displayName = displayName;
+ this._rules = [];
+}
+
+WebInspector.AuditCategory.prototype = {
+ get id()
+ {
+ return this._id;
+ },
+
+ get displayName()
+ {
+ return this._displayName;
+ },
+
+ get ruleCount()
+ {
+ return this._rules.length;
+ },
+
+ addRule: function(rule)
+ {
+ this._rules.push(rule);
+ },
+
+ runRules: function(resources, callback)
+ {
+ for (var i = 0; i < this._rules.length; ++i)
+ this._rules[i].run(resources, callback);
+ }
+}
+
+
+WebInspector.AuditRule = function(id, displayName, parametersObject)
+{
+ this._id = id;
+ this._displayName = displayName;
+ this._parametersObject = parametersObject;
+}
+
+WebInspector.AuditRule.prototype = {
+ get id()
+ {
+ return this._id;
+ },
+
+ get displayName()
+ {
+ return this._displayName;
+ },
+
+ run: function(resources, callback)
+ {
+ this.doRun(resources, new WebInspector.AuditRuleResult(this.displayName), callback);
+ },
+
+ doRun: function(resources, result, callback)
+ {
+ throw new Error("doRun() not implemented");
+ },
+
+ getValue: function(key)
+ {
+ if (key in this._parametersObject)
+ return this._parametersObject[key];
+ else
+ throw new Error(key + " not found in rule parameters");
+ }
+}
+
+
+WebInspector.AuditCategoryResult = function(category)
+{
+ this.categoryId = category.id;
+ this.title = category.displayName;
+ this.entries = [];
+}
+
+WebInspector.AuditCategoryResult.prototype = {
+ addEntry: function(value)
+ {
+ var entry = new WebInspector.AuditRuleResult(value);
+ this.entries.push(entry);
+ return entry;
+ }
+}
+
+/**
+ * @param {string} value The result message HTML contents.
+ */
+WebInspector.AuditRuleResult = function(value)
+{
+ this.value = value;
+ this.type = WebInspector.AuditRuleResult.Type.NA;
+}
+
+WebInspector.AuditRuleResult.Type = {
+ NA: 0,
+ Hint: 1,
+ Violation: 2
+}
+
+WebInspector.AuditRuleResult.prototype = {
+ appendChild: function(value)
+ {
+ if (!this.children)
+ this.children = [];
+ var entry = new WebInspector.AuditRuleResult(value);
+ this.children.push(entry);
+ return entry;
+ },
+
+ set type(x)
+ {
+ this._type = x;
+ },
+
+ get type()
+ {
+ return this._type;
+ }
+}
+
+
+WebInspector.AuditsSidebarTreeElement = function()
+{
+ this.small = false;
+
+ WebInspector.SidebarTreeElement.call(this, "audits-sidebar-tree-item", WebInspector.UIString("Audits"), "", null, false);
+}
+
+WebInspector.AuditsSidebarTreeElement.prototype = {
+ onattach: function()
+ {
+ WebInspector.SidebarTreeElement.prototype.onattach.call(this);
+ },
+
+ onselect: function()
+ {
+ WebInspector.panels.audits.showLauncherView();
+ },
+
+ get selectable()
+ {
+ return true;
+ },
+
+ refresh: function()
+ {
+ this.refreshTitles();
+ }
+}
+
+WebInspector.AuditsSidebarTreeElement.prototype.__proto__ = WebInspector.SidebarTreeElement.prototype;
+
+
+WebInspector.AuditResultSidebarTreeElement = function(results, mainResourceURL, ordinal)
+{
+ this.results = results;
+ this.mainResourceURL = mainResourceURL;
+
+ WebInspector.SidebarTreeElement.call(this, "audit-result-sidebar-tree-item", String.sprintf("%s (%d)", mainResourceURL, ordinal), "", {}, false);
+}
+
+WebInspector.AuditResultSidebarTreeElement.prototype = {
+ onselect: function()
+ {
+ WebInspector.panels.audits.showResults(this.results);
+ },
+
+ get selectable()
+ {
+ return true;
+ }
+}
+
+WebInspector.AuditResultSidebarTreeElement.prototype.__proto__ = WebInspector.SidebarTreeElement.prototype;
+
+// Contributed audit rules should go into this namespace.
+WebInspector.AuditRules = {};
+
+// Contributed audit categories should go into this namespace.
+WebInspector.AuditCategories = {};
diff --git a/WebCore/inspector/front-end/BreakpointsSidebarPane.js b/WebCore/inspector/front-end/BreakpointsSidebarPane.js
index 9d4fe55..8865f0b 100644
--- a/WebCore/inspector/front-end/BreakpointsSidebarPane.js
+++ b/WebCore/inspector/front-end/BreakpointsSidebarPane.js
@@ -99,7 +99,7 @@ WebInspector.BreakpointsSidebarPane.prototype = {
var sourceTextElement = document.createElement("div");
sourceTextElement.textContent = breakpoint.sourceText;
- sourceTextElement.className = "source-text";
+ sourceTextElement.className = "source-text monospace";
breakpointElement.appendChild(sourceTextElement);
var currentElement = this.listElement.firstChild;
diff --git a/WebCore/inspector/front-end/CallStackSidebarPane.js b/WebCore/inspector/front-end/CallStackSidebarPane.js
index 2fe4315..ddca80b 100644
--- a/WebCore/inspector/front-end/CallStackSidebarPane.js
+++ b/WebCore/inspector/front-end/CallStackSidebarPane.js
@@ -109,13 +109,12 @@ WebInspector.CallStackSidebarPane.prototype = {
this.dispatchEventToListeners("call frame selected");
},
- handleKeyEvent: function(event)
+ handleShortcut: function(event)
{
var shortcut = WebInspector.KeyboardShortcut.makeKeyFromEvent(event);
var handler = this._shortcuts[shortcut];
if (handler) {
handler(event);
- event.preventDefault();
event.handled = true;
}
},
diff --git a/WebCore/inspector/front-end/ConsoleView.js b/WebCore/inspector/front-end/ConsoleView.js
index 9815f4a..07d9812 100644
--- a/WebCore/inspector/front-end/ConsoleView.js
+++ b/WebCore/inspector/front-end/ConsoleView.js
@@ -45,7 +45,8 @@ WebInspector.ConsoleView = function(drawer)
this.messagesElement.addEventListener("click", this._messagesClicked.bind(this), true);
this.promptElement = document.getElementById("console-prompt");
- this.promptElement.handleKeyEvent = this._promptKeyDown.bind(this);
+ this.promptElement.className = "source-code";
+ this.promptElement.addEventListener("keydown", this._promptKeyDown.bind(this), true);
this.prompt = new WebInspector.TextPrompt(this.promptElement, this.completions.bind(this), ExpressionStopCharacters + ".");
this.topGroup = new WebInspector.ConsoleGroup(null, 0);
@@ -91,18 +92,25 @@ WebInspector.ConsoleView = function(drawer)
this._shortcuts = {};
var shortcut;
- var handler = this.clearMessages.bind(this, true);
+ var clearConsoleHandler = this.requestClearMessages.bind(this);
shortcut = WebInspector.KeyboardShortcut.makeKey("k", WebInspector.KeyboardShortcut.Modifiers.Meta);
- this._shortcuts[shortcut] = handler;
+ this._shortcuts[shortcut] = clearConsoleHandler;
this._shortcuts[shortcut].isMacOnly = true;
shortcut = WebInspector.KeyboardShortcut.makeKey("l", WebInspector.KeyboardShortcut.Modifiers.Ctrl);
- this._shortcuts[shortcut] = handler;
+ this._shortcuts[shortcut] = clearConsoleHandler;
+ // Since the Context Menu for the Console View will always be the same, we can create it in
+ // the constructor.
+ this._contextMenu = new WebInspector.ContextMenu();
+ this._contextMenu.appendItem(WebInspector.UIString("Clear Console"), clearConsoleHandler);
+ this.messagesElement.addEventListener("contextmenu", this._handleContextMenuEvent.bind(this), true);
+
this._customFormatters = {
"object": this._formatobject,
"array": this._formatarray,
- "node": this._formatnode
+ "node": this._formatnode,
+ "string": this._formatstring
};
}
@@ -282,10 +290,13 @@ WebInspector.ConsoleView.prototype = {
}
},
- clearMessages: function(clearInspectorController)
+ requestClearMessages: function()
+ {
+ InjectedScriptAccess.getDefault().clearConsoleMessages(function() {});
+ },
+
+ clearMessages: function()
{
- if (clearInspectorController)
- InspectorBackend.clearMessages(false);
if (WebInspector.panels.resources)
WebInspector.panels.resources.clearMessages();
@@ -323,9 +334,14 @@ WebInspector.ConsoleView.prototype = {
// Collect comma separated object properties for the completion.
var includeInspectorCommandLineAPI = (!dotNotation && !bracketNotation);
- if (WebInspector.panels.scripts && WebInspector.panels.scripts.paused)
- var callFrameId = WebInspector.panels.scripts.selectedCallFrameId();
- InjectedScriptAccess.getCompletions(expressionString, includeInspectorCommandLineAPI, callFrameId, reportCompletions);
+ var callFrameId = WebInspector.panels.scripts.selectedCallFrameId();
+ var injectedScriptAccess;
+ if (WebInspector.panels.scripts && WebInspector.panels.scripts.paused) {
+ var selectedCallFrame = WebInspector.panels.scripts.sidebarPanes.callstack.selectedCallFrame;
+ injectedScriptAccess = InjectedScriptAccess.get(selectedCallFrame.injectedScriptId);
+ } else
+ injectedScriptAccess = InjectedScriptAccess.getDefault();
+ injectedScriptAccess.getCompletions(expressionString, includeInspectorCommandLineAPI, callFrameId, reportCompletions);
},
_reportCompletions: function(bestMatchOnly, completionsReadyCallback, dotNotation, bracketNotation, prefix, result, isException) {
@@ -368,7 +384,18 @@ WebInspector.ConsoleView.prototype = {
_clearButtonClicked: function()
{
- this.clearMessages(true);
+ this.requestClearMessages();
+ },
+
+ _handleContextMenuEvent: function(event)
+ {
+ if (!window.getSelection().isCollapsed) {
+ // If there is a selection, we want to show our normal context menu
+ // (with Copy, etc.), and not Clear Console.
+ return;
+ }
+
+ this._contextMenu.show(event);
},
_messagesSelectStart: function(event)
@@ -407,13 +434,6 @@ WebInspector.ConsoleView.prototype = {
return;
}
- if (isFnKey(event)) {
- if (WebInspector.currentPanel && WebInspector.currentPanel.handleKeyEvent) {
- WebInspector.currentPanel.handleKeyEvent(event);
- return;
- }
- }
-
var shortcut = WebInspector.KeyboardShortcut.makeKeyFromEvent(event);
var handler = this._shortcuts[shortcut];
if (handler) {
@@ -423,8 +443,6 @@ WebInspector.ConsoleView.prototype = {
return;
}
}
-
- this.prompt.handleKeyEvent(event);
},
evalInInspectedWindow: function(expression, objectGroup, callback)
@@ -447,7 +465,7 @@ WebInspector.ConsoleView.prototype = {
{
callback(result.value, result.isException);
};
- InjectedScriptAccess.evaluate(expression, objectGroup, evalCallback);
+ InjectedScriptAccess.getDefault().evaluate(expression, objectGroup, evalCallback);
},
_enterKeyPressed: function(event)
@@ -487,11 +505,10 @@ WebInspector.ConsoleView.prototype = {
if (!formatter || !isProxy) {
formatter = this._formatvalue;
output = output.description || output;
- type = "undecorated";
}
var span = document.createElement("span");
- span.addStyleClass("console-formatted-" + type);
+ span.className = "console-formatted-" + type + " source-code";
formatter.call(this, output, span);
return span;
},
@@ -521,12 +538,25 @@ WebInspector.ConsoleView.prototype = {
elem.appendChild(treeOutline.element);
}
- InjectedScriptAccess.pushNodeToFrontend(object, printNode);
+ InjectedScriptAccess.get(object.injectedScriptId).pushNodeToFrontend(object, printNode);
},
_formatarray: function(arr, elem)
{
- InjectedScriptAccess.getProperties(arr, false, this._printArray.bind(this, elem));
+ InjectedScriptAccess.get(arr.injectedScriptId).getProperties(arr, false, false, this._printArray.bind(this, elem));
+ },
+
+ _formatstring: function(output, elem)
+ {
+ var span = document.createElement("span");
+ span.className = "console-formatted-string source-code";
+ span.appendChild(WebInspector.linkifyStringAsFragment(output.description));
+
+ // Make black quotes.
+ elem.removeStyleClass("console-formatted-string");
+ elem.appendChild(document.createTextNode("\""));
+ elem.appendChild(span);
+ elem.appendChild(document.createTextNode("\""));
},
_printArray: function(elem, properties)
@@ -579,7 +609,7 @@ WebInspector.ConsoleMessage.prototype = {
switch (this.type) {
case WebInspector.ConsoleMessage.MessageType.Trace:
var span = document.createElement("span");
- span.addStyleClass("console-formatted-trace");
+ span.className = "console-formatted-trace source-code";
var stack = Array.prototype.slice.call(args);
var funcNames = stack.map(function(f) {
return f || WebInspector.UIString("(anonymous function)");
@@ -606,7 +636,7 @@ WebInspector.ConsoleMessage.prototype = {
_format: function(parameters)
{
- // This node is used like a Builder. Values are contintually appended onto it.
+ // This node is used like a Builder. Values are continually appended onto it.
var formattedResult = document.createElement("span");
if (!parameters.length)
return formattedResult;
@@ -617,9 +647,13 @@ WebInspector.ConsoleMessage.prototype = {
if (typeof parameters[i] !== "object" && typeof parameters[i] !== "function")
parameters[i] = WebInspector.ObjectProxy.wrapPrimitiveValue(parameters[i]);
+ // There can be string log and string eval result. We distinguish between them based on message type.
+ var shouldFormatMessage = Object.proxyType(parameters[0]) === "string" && this.type !== WebInspector.ConsoleMessage.MessageType.Result;
+
// Multiple parameters with the first being a format string. Save unused substitutions.
- if (parameters.length > 1 && Object.proxyType(parameters[0]) === "string") {
- var result = this._formatWithSubstitutionString(parameters, formattedResult)
+ if (shouldFormatMessage) {
+ // Multiple parameters with the first being a format string. Save unused substitutions.
+ var result = this._formatWithSubstitutionString(parameters, formattedResult);
parameters = result.unusedSubstitutions;
if (parameters.length)
formattedResult.appendChild(document.createTextNode(" "));
@@ -627,11 +661,14 @@ WebInspector.ConsoleMessage.prototype = {
// Single parameter, or unused substitutions from above.
for (var i = 0; i < parameters.length; ++i) {
- this._formatIndividualValue(parameters[i], formattedResult);
+ // Inline strings when formatting.
+ if (shouldFormatMessage && parameters[i].type === "string")
+ formattedResult.appendChild(document.createTextNode(parameters[i].description));
+ else
+ formattedResult.appendChild(WebInspector.console._format(parameters[i]));
if (i < parameters.length - 1)
formattedResult.appendChild(document.createTextNode(" "));
}
-
return formattedResult;
},
@@ -652,7 +689,7 @@ WebInspector.ConsoleMessage.prototype = {
formatters.o = consoleFormatWrapper();
// Firebug allows both %i and %d for formatting integers.
formatters.i = formatters.d;
- // Support %O to force object formating, instead of the type-based %o formatting.
+ // Support %O to force object formatting, instead of the type-based %o formatting.
formatters.O = consoleFormatWrapper(true);
function append(a, b)
@@ -668,18 +705,6 @@ WebInspector.ConsoleMessage.prototype = {
return String.format(parameters[0].description, parameters.slice(1), formatters, formattedResult, append);
},
- _formatIndividualValue: function(param, formattedResult)
- {
- if (Object.proxyType(param) === "string") {
- if (this.originatingCommand && this.level === WebInspector.ConsoleMessage.MessageLevel.Log) {
- var quotedString = "\"" + param.description.replace(/"/g, "\\\"") + "\"";
- formattedResult.appendChild(WebInspector.linkifyStringAsFragment(quotedString));
- } else
- formattedResult.appendChild(WebInspector.linkifyStringAsFragment(param.description));
- } else
- formattedResult.appendChild(WebInspector.console._format(param));
- },
-
toMessageElement: function()
{
if (this._element)
@@ -757,7 +782,7 @@ WebInspector.ConsoleMessage.prototype = {
}
var messageTextElement = document.createElement("span");
- messageTextElement.className = "console-message-text";
+ messageTextElement.className = "console-message-text source-code";
if (this.type === WebInspector.ConsoleMessage.MessageType.Assert)
messageTextElement.appendChild(document.createTextNode(WebInspector.UIString("Assertion failed: ")));
messageTextElement.appendChild(this.formattedMessage);
@@ -824,6 +849,9 @@ WebInspector.ConsoleMessage.prototype = {
case WebInspector.ConsoleMessage.MessageType.Assert:
typeString = "Assert";
break;
+ case WebInspector.ConsoleMessage.MessageType.Result:
+ typeString = "Result";
+ break;
}
var levelString;
@@ -880,7 +908,8 @@ WebInspector.ConsoleMessage.MessageType = {
Trace: 2,
StartGroup: 3,
EndGroup: 4,
- Assert: 5
+ Assert: 5,
+ Result: 6
}
WebInspector.ConsoleMessage.MessageLevel = {
@@ -904,7 +933,7 @@ WebInspector.ConsoleCommand.prototype = {
element.className = "console-user-command";
var commandTextElement = document.createElement("span");
- commandTextElement.className = "console-message-text";
+ commandTextElement.className = "console-message-text source-code";
commandTextElement.textContent = this.command;
element.appendChild(commandTextElement);
@@ -924,12 +953,17 @@ WebInspector.ConsoleCommandResult = function(result, exception, originatingComma
{
var level = (exception ? WebInspector.ConsoleMessage.MessageLevel.Error : WebInspector.ConsoleMessage.MessageLevel.Log);
var message = result;
+ if (exception) {
+ // Distinguish between strings and errors (no need to quote latter).
+ message = WebInspector.ObjectProxy.wrapPrimitiveValue(result);
+ message.type = "error";
+ }
var line = (exception ? result.line : -1);
var url = (exception ? result.sourceURL : null);
this.originatingCommand = originatingCommand;
- WebInspector.ConsoleMessage.call(this, WebInspector.ConsoleMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageType.Log, level, line, url, null, 1, message);
+ WebInspector.ConsoleMessage.call(this, WebInspector.ConsoleMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageType.Result, level, line, url, null, 1, message);
}
WebInspector.ConsoleCommandResult.prototype = {
diff --git a/WebCore/inspector/front-end/DOMAgent.js b/WebCore/inspector/front-end/DOMAgent.js
index 4ccf843..6889408 100644
--- a/WebCore/inspector/front-end/DOMAgent.js
+++ b/WebCore/inspector/front-end/DOMAgent.js
@@ -33,6 +33,10 @@ WebInspector.DOMNode = function(doc, payload) {
this.ownerDocument = doc;
this.id = payload.id;
+ // injectedScriptId is a node is for DOM nodes which should be converted
+ // to corresponding InjectedScript by the inspector backend. We indicate
+ // this by making injectedScriptId negative.
+ this.injectedScriptId = -payload.id;
this.nodeType = payload.nodeType;
this.nodeName = payload.nodeName;
this.localName = payload.localName;
@@ -60,13 +64,20 @@ WebInspector.DOMNode = function(doc, payload) {
this.style = null;
this._matchedCSSRules = [];
- if (this.nodeType == Node.ELEMENT_NODE) {
+ if (this.nodeType === Node.ELEMENT_NODE) {
// HTML and BODY from internal iframes should not overwrite top-level ones.
if (!this.ownerDocument.documentElement && this.nodeName === "HTML")
this.ownerDocument.documentElement = this;
if (!this.ownerDocument.body && this.nodeName === "BODY")
this.ownerDocument.body = this;
- }
+ if (payload.documentURL)
+ this.documentURL = payload.documentURL;
+ } else if (this.nodeType === Node.DOCUMENT_TYPE_NODE) {
+ this.publicId = payload.publicId;
+ this.systemId = payload.systemId;
+ this.internalSubset = payload.internalSubset;
+ } else if (this.nodeType === Node.DOCUMENT_NODE)
+ this.documentURL = payload.documentURL;
}
WebInspector.DOMNode.prototype = {
@@ -133,6 +144,8 @@ WebInspector.DOMNode.prototype = {
_setAttributesPayload: function(attrs)
{
+ this.attributes = [];
+ this._attributesMap = {};
for (var i = 0; i < attrs.length; i += 2)
this._addAttribute(attrs[i], attrs[i + 1]);
},
@@ -356,15 +369,16 @@ WebInspector.DOMAgent.prototype = {
callback();
// TODO(pfeldman): Fix this hack.
var elem = WebInspector.panels.elements.treeOutline.findTreeElement(node);
- if (elem) {
- elem._updateTitle();
- }
+ if (elem)
+ elem.updateTitle();
},
_attributesUpdated: function(nodeId, attrsArray)
{
var node = this._idToDOMNode[nodeId];
node._setAttributesPayload(attrsArray);
+ var event = {target: node};
+ this.document._fireDomEvent("DOMAttrModified", event);
},
nodeForId: function(nodeId) {
@@ -506,6 +520,7 @@ WebInspector.EventListeners.getEventListenersForNodeAsync = function(node, callb
WebInspector.CSSStyleDeclaration = function(payload)
{
this.id = payload.id;
+ this.injectedScriptId = payload.injectedScriptId;
this.width = payload.width;
this.height = payload.height;
this.__disabledProperties = payload.__disabledProperties;
@@ -548,6 +563,7 @@ WebInspector.CSSStyleDeclaration.parseRule = function(payload)
{
var rule = {};
rule.id = payload.id;
+ rule.injectedScriptId = payload.injectedScriptId;
rule.selectorText = payload.selectorText;
rule.style = new WebInspector.CSSStyleDeclaration(payload.style);
rule.style.parentRule = rule;
diff --git a/WebCore/inspector/front-end/DOMSyntaxHighlighter.js b/WebCore/inspector/front-end/DOMSyntaxHighlighter.js
new file mode 100644
index 0000000..07233d3
--- /dev/null
+++ b/WebCore/inspector/front-end/DOMSyntaxHighlighter.js
@@ -0,0 +1,79 @@
+/*
+ * 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.DOMSyntaxHighlighter = function(mimeType)
+{
+ this._tokenizer = WebInspector.SourceTokenizer.Registry.getInstance().getTokenizer(mimeType);
+}
+
+WebInspector.DOMSyntaxHighlighter.prototype = {
+ createSpan: function(content, className)
+ {
+ var span = document.createElement("span");
+ span.className = "webkit-" + className;
+ span.appendChild(document.createTextNode(content));
+ return span;
+ },
+
+ syntaxHighlightNode: function(node)
+ {
+ this._tokenizer.condition = this._tokenizer.initialCondition;
+ var lines = node.textContent.split("\n");
+ node.removeChildren();
+
+ for (var i = lines[0].length ? 0 : 1; i < lines.length; ++i) {
+ var line = lines[i];
+ var plainTextStart = 0;
+ this._tokenizer.line = line;
+ var column = 0;
+ do {
+ var newColumn = this._tokenizer.nextToken(column);
+ var tokenType = this._tokenizer.tokenType;
+ if (tokenType) {
+ if (column > plainTextStart) {
+ var plainText = line.substring(plainTextStart, column);
+ node.appendChild(document.createTextNode(plainText));
+ }
+ var token = line.substring(column, newColumn);
+ node.appendChild(this.createSpan(token, tokenType));
+ plainTextStart = newColumn;
+ }
+ column = newColumn;
+ } while (column < line.length)
+
+ if (plainTextStart < line.length) {
+ var plainText = line.substring(plainTextStart, line.length);
+ node.appendChild(document.createTextNode(plainText));
+ }
+ if (i < lines.length - 1)
+ node.appendChild(document.createElement("br"));
+ }
+ }
+}
diff --git a/WebCore/inspector/front-end/DataGrid.js b/WebCore/inspector/front-end/DataGrid.js
index 7b58c8e..3eca9e4 100644
--- a/WebCore/inspector/front-end/DataGrid.js
+++ b/WebCore/inspector/front-end/DataGrid.js
@@ -39,6 +39,8 @@ WebInspector.DataGrid = function(columns, editCallback, deleteCallback)
this._dataTable.addEventListener("mousedown", this._mouseDownInDataTable.bind(this), true);
this._dataTable.addEventListener("click", this._clickInDataTable.bind(this), true);
+ this._dataTable.addEventListener("contextmenu", this._contextMenuInDataTable.bind(this), true);
+
// FIXME: Add a createCallback which is different from editCallback and has different
// behavior when creating a new node.
if (editCallback) {
@@ -469,10 +471,11 @@ WebInspector.DataGrid.prototype = {
this.children = [];
},
- handleKeyEvent: function(event)
+
+ _keyDown: function(event)
{
if (!this.selectedNode || event.shiftKey || event.metaKey || event.ctrlKey || this._editing)
- return false;
+ return;
var handled = false;
var nextSelectedNode;
@@ -540,8 +543,6 @@ WebInspector.DataGrid.prototype = {
event.preventDefault();
event.stopPropagation();
}
-
- return handled;
},
expand: function()
@@ -572,11 +573,6 @@ WebInspector.DataGrid.prototype = {
return rowElement._dataGridNode;
},
- _keyDown: function(event)
- {
- this.handleKeyEvent(event);
- },
-
_clickInHeaderCell: function(event)
{
var cell = event.target.enclosingNodeOrSelfWithNodeName("th");
@@ -621,6 +617,30 @@ WebInspector.DataGrid.prototype = {
} else
gridNode.select();
},
+
+ _contextMenuInDataTable: function(event)
+ {
+ var gridNode = this.dataGridNodeFromNode(event.target);
+ if (!gridNode || !gridNode.selectable)
+ return;
+
+ if (gridNode.isEventWithinDisclosureTriangle(event))
+ return;
+
+ var contextMenu = new WebInspector.ContextMenu();
+
+ // FIXME: Use the column names for Editing, instead of just "Edit".
+ if (this.dataGrid._editCallback) {
+ if (gridNode === this.creationNode)
+ contextMenu.appendItem(WebInspector.UIString("Add New"), this._startEditing.bind(this, event.target));
+ else
+ contextMenu.appendItem(WebInspector.UIString("Edit"), this._startEditing.bind(this, event.target));
+ }
+ if (this.dataGrid._deleteCallback && gridNode !== this.creationNode)
+ contextMenu.appendItem(WebInspector.UIString("Delete"), this._deleteCallback.bind(this, gridNode));
+
+ contextMenu.show(event);
+ },
_clickInDataTable: function(event)
{
diff --git a/WebCore/inspector/front-end/Database.js b/WebCore/inspector/front-end/Database.js
index 5edefb1..a0dc9ca 100644
--- a/WebCore/inspector/front-end/Database.js
+++ b/WebCore/inspector/front-end/Database.js
@@ -95,7 +95,8 @@ WebInspector.Database.prototype = {
}
onSuccess(result);
}
- InjectedScriptAccess.executeSql(this._id, query, callback);
+ // FIXME: execute the query in the frame the DB comes from.
+ InjectedScriptAccess.getDefault().executeSql(this._id, query, callback);
}
}
diff --git a/WebCore/inspector/front-end/DatabaseQueryView.js b/WebCore/inspector/front-end/DatabaseQueryView.js
index e85af66..2656842 100644
--- a/WebCore/inspector/front-end/DatabaseQueryView.js
+++ b/WebCore/inspector/front-end/DatabaseQueryView.js
@@ -31,6 +31,7 @@ WebInspector.DatabaseQueryView = function(database)
this.element.addStyleClass("storage-view");
this.element.addStyleClass("query");
+ this.element.addStyleClass("monospace");
this.element.tabIndex = 0;
this.element.addEventListener("selectstart", this._selectStart.bind(this), false);
@@ -38,7 +39,7 @@ WebInspector.DatabaseQueryView = function(database)
this.promptElement = document.createElement("div");
this.promptElement.className = "database-query-prompt";
this.promptElement.appendChild(document.createElement("br"));
- this.promptElement.handleKeyEvent = this._promptKeyDown.bind(this);
+ this.promptElement.addEventListener("keydown", this._promptKeyDown.bind(this), true);
this.element.appendChild(this.promptElement);
this.prompt = new WebInspector.TextPrompt(this.promptElement, this.completions.bind(this), " ");
@@ -98,8 +99,6 @@ WebInspector.DatabaseQueryView.prototype = {
this._enterKeyPressed(event);
return;
}
-
- this.prompt.handleKeyEvent(event);
},
_selectStart: function(event)
diff --git a/WebCore/inspector/front-end/Drawer.js b/WebCore/inspector/front-end/Drawer.js
index 0426a39..8bf707e 100644
--- a/WebCore/inspector/front-end/Drawer.js
+++ b/WebCore/inspector/front-end/Drawer.js
@@ -160,6 +160,7 @@ WebInspector.Drawer.prototype = {
function animationFinished()
{
+ WebInspector.currentPanel.resize();
var mainStatusBar = document.getElementById("main-status-bar");
mainStatusBar.insertBefore(anchoredItems, mainStatusBar.firstChild);
mainStatusBar.style.removeProperty("padding-left");
diff --git a/WebCore/inspector/front-end/ElementsPanel.js b/WebCore/inspector/front-end/ElementsPanel.js
index 9b18251..e839a60 100644
--- a/WebCore/inspector/front-end/ElementsPanel.js
+++ b/WebCore/inspector/front-end/ElementsPanel.js
@@ -36,7 +36,7 @@ WebInspector.ElementsPanel = function()
this.contentElement = document.createElement("div");
this.contentElement.id = "elements-content";
- this.contentElement.className = "outline-disclosure";
+ this.contentElement.className = "outline-disclosure source-code";
this.treeOutline = new WebInspector.ElementsTreeOutline();
this.treeOutline.panel = this;
@@ -46,7 +46,7 @@ WebInspector.ElementsPanel = function()
this.treeOutline.focusedNodeChanged = function(forceUpdate)
{
if (this.panel.visible && WebInspector.currentFocusElement !== document.getElementById("search"))
- WebInspector.currentFocusElement = document.getElementById("main-panels");
+ WebInspector.currentFocusElement = this.element;
this.panel.updateBreadcrumb(forceUpdate);
@@ -63,7 +63,7 @@ WebInspector.ElementsPanel = function()
this.panel.nodeSearchButton.toggled = false;
}
if (this._focusedDOMNode)
- InjectedScriptAccess.addInspectedNode(this._focusedDOMNode.id, function() {});
+ InjectedScriptAccess.get(this._focusedDOMNode.injectedScriptId).addInspectedNode(this._focusedDOMNode.id, function() {});
};
this.contentElement.appendChild(this.treeOutline.element);
@@ -129,6 +129,11 @@ WebInspector.ElementsPanel.prototype = {
return [this.nodeSearchButton.element, this.crumbsElement];
},
+ get defaultFocusedElement()
+ {
+ return this.treeOutline.element;
+ },
+
updateStatusBarItems: function()
{
this.updateBreadcrumbSizes();
@@ -141,7 +146,7 @@ WebInspector.ElementsPanel.prototype = {
this.updateBreadcrumb();
this.treeOutline.updateSelection();
if (this.recentlyModifiedNodes.length)
- this._updateModifiedNodes();
+ this.updateModifiedNodes();
},
hide: function()
@@ -200,6 +205,7 @@ WebInspector.ElementsPanel.prototype = {
inspectedRootDocument.addEventListener("DOMNodeInserted", this._nodeInserted.bind(this));
inspectedRootDocument.addEventListener("DOMNodeRemoved", this._nodeRemoved.bind(this));
+ inspectedRootDocument.addEventListener("DOMAttrModified", this._attributesUpdated.bind(this));
this.treeOutline.suppressSelectHighlight = true;
this.rootDOMNode = inspectedRootDocument;
@@ -222,12 +228,16 @@ WebInspector.ElementsPanel.prototype = {
function selectLastSelectedNode(nodeId)
{
+ if (this.focusedDOMNode) {
+ // Focused node has been explicitly set while reaching out for the last selected node.
+ return;
+ }
var node = nodeId ? WebInspector.domAgent.nodeForId(nodeId) : 0;
selectNode.call(this, node);
}
if (this._selectedPathOnReset)
- InjectedScriptAccess.nodeByPath(this._selectedPathOnReset, selectLastSelectedNode.bind(this));
+ InjectedScriptAccess.getDefault().nodeByPath(this._selectedPathOnReset, selectLastSelectedNode.bind(this));
else
selectNode.call(this);
delete this._selectedPathOnReset;
@@ -247,7 +257,7 @@ WebInspector.ElementsPanel.prototype = {
this._currentSearchResultIndex = 0;
this._searchResults = [];
- InjectedScriptAccess.searchCanceled(function() {});
+ InjectedScriptAccess.getDefault().searchCanceled(function() {});
},
performSearch: function(query)
@@ -255,14 +265,14 @@ WebInspector.ElementsPanel.prototype = {
// Call searchCanceled since it will reset everything we need before doing a new search.
this.searchCanceled();
- const whitespaceTrimmedQuery = query.trimWhitespace();
+ const whitespaceTrimmedQuery = query.trim();
if (!whitespaceTrimmedQuery.length)
return;
this._updatedMatchCountOnce = false;
this._matchesCountUpdateTimeout = null;
- InjectedScriptAccess.performSearch(whitespaceTrimmedQuery, function() {});
+ InjectedScriptAccess.getDefault().performSearch(whitespaceTrimmedQuery, function() {});
},
_updateMatchesCount: function()
@@ -468,6 +478,13 @@ WebInspector.ElementsPanel.prototype = {
this.treeOutline.focusedDOMNode = x;
},
+ _attributesUpdated: function(event)
+ {
+ this.recentlyModifiedNodes.push({node: event.target, updated: true});
+ if (this.visible)
+ this._updateModifiedNodesSoon();
+ },
+
_nodeInserted: function(event)
{
this.recentlyModifiedNodes.push({node: event.target, parent: event.relatedNode, inserted: true});
@@ -486,10 +503,10 @@ WebInspector.ElementsPanel.prototype = {
{
if ("_updateModifiedNodesTimeout" in this)
return;
- this._updateModifiedNodesTimeout = setTimeout(this._updateModifiedNodes.bind(this), 0);
+ this._updateModifiedNodesTimeout = setTimeout(this.updateModifiedNodes.bind(this), 0);
},
- _updateModifiedNodes: function()
+ updateModifiedNodes: function()
{
if ("_updateModifiedNodesTimeout" in this) {
clearTimeout(this._updateModifiedNodesTimeout);
@@ -502,6 +519,14 @@ WebInspector.ElementsPanel.prototype = {
for (var i = 0; i < this.recentlyModifiedNodes.length; ++i) {
var replaced = this.recentlyModifiedNodes[i].replaced;
var parent = this.recentlyModifiedNodes[i].parent;
+ var node = this.recentlyModifiedNodes[i].node;
+
+ if (this.recentlyModifiedNodes[i].updated) {
+ var nodeItem = this.treeOutline.findTreeElement(node);
+ nodeItem.updateTitle();
+ continue;
+ }
+
if (!parent)
continue;
@@ -1024,7 +1049,7 @@ WebInspector.ElementsPanel.prototype = {
eventListenersSidebarPane.needsUpdate = false;
},
- handleKeyEvent: function(event)
+ handleShortcut: function(event)
{
// Cmd/Control + Shift + C should be a shortcut to clicking the Node Search Button.
// This shortcut matches Firebug.
@@ -1036,12 +1061,10 @@ WebInspector.ElementsPanel.prototype = {
if (isNodeSearchKey) {
this._nodeSearchButtonClicked(event);
- event.preventDefault();
+ event.handled = true;
return;
}
}
-
- this.treeOutline.handleKeyEvent(event);
},
handleCopyEvent: function(event)
diff --git a/WebCore/inspector/front-end/ElementsTreeOutline.js b/WebCore/inspector/front-end/ElementsTreeOutline.js
index a035e7d..d38a7bb 100644
--- a/WebCore/inspector/front-end/ElementsTreeOutline.js
+++ b/WebCore/inspector/front-end/ElementsTreeOutline.js
@@ -43,6 +43,7 @@ WebInspector.ElementsTreeOutline = function() {
this.focusedDOMNode = null;
this.element.addEventListener("contextmenu", this._contextMenuEventFired.bind(this), true);
+ this.element.addEventListener("keydown", this._keyDown.bind(this), true);
}
WebInspector.ElementsTreeOutline.prototype = {
@@ -191,8 +192,11 @@ WebInspector.ElementsTreeOutline.prototype = {
return element;
},
- handleKeyEvent: function(event)
+ _keyDown: function(event)
{
+ if (event.target !== this.treeOutline.element)
+ return;
+
var selectedElement = this.selectedTreeElement;
if (!selectedElement)
return;
@@ -201,12 +205,13 @@ WebInspector.ElementsTreeOutline.prototype = {
event.keyCode === WebInspector.KeyboardShortcut.KeyCodes.Delete) {
selectedElement.remove();
event.preventDefault();
+ event.stopPropagation();
return;
}
// On Enter or Return start editing the first attribute
// or create a new attribute on the selected element.
- if (event.keyIdentifier === "Enter") {
+ if (isEnterKey(event)) {
if (this._editing)
return;
@@ -214,10 +219,9 @@ WebInspector.ElementsTreeOutline.prototype = {
// prevent a newline from being immediately inserted
event.preventDefault();
+ event.stopPropagation();
return;
}
-
- TreeOutline.prototype.handleKeyEvent.call(this, event);
},
_onmousedown: function(event)
@@ -331,15 +335,8 @@ WebInspector.ElementsTreeElement.prototype = {
if (x) {
this.updateSelection();
this.listItemElement.addStyleClass("hovered");
- if (this._canAddAttributes)
- this._pendingToggleNewAttribute = setTimeout(this.toggleNewAttributeButton.bind(this, true), 500);
} else {
this.listItemElement.removeStyleClass("hovered");
- if (this._pendingToggleNewAttribute) {
- clearTimeout(this._pendingToggleNewAttribute);
- delete this._pendingToggleNewAttribute;
- }
- this.toggleNewAttributeButton(false);
}
}
},
@@ -360,34 +357,10 @@ WebInspector.ElementsTreeElement.prototype = {
tooltipText = WebInspector.UIString("%d × %d pixels (Natural: %d × %d pixels)", properties.offsetWidth, properties.offsetHeight, properties.naturalWidth, properties.naturalHeight);
callback(tooltipText);
}
- var objectProxy = new WebInspector.ObjectProxy(node.id);
+ var objectProxy = new WebInspector.ObjectProxy(node.injectedScriptId, node.id);
WebInspector.ObjectProxy.getPropertiesAsync(objectProxy, ["naturalHeight", "naturalWidth", "offsetHeight", "offsetWidth"], createTooltipThenCallback);
},
- toggleNewAttributeButton: function(visible)
- {
- function removeAddAttributeSpan()
- {
- if (this._addAttributeElement && this._addAttributeElement.parentNode)
- this._addAttributeElement.parentNode.removeChild(this._addAttributeElement);
- delete this._addAttributeElement;
-
- this.updateSelection();
- }
-
- if (!this._addAttributeElement && visible && !this._editing) {
- var span = document.createElement("span");
- span.className = "add-attribute webkit-html-attribute-name";
- span.textContent = " ?=\"\"";
- span.addEventListener("dblclick", removeAddAttributeSpan.bind(this), false);
- this._addAttributeElement = span;
-
- var tag = this.listItemElement.getElementsByClassName("webkit-html-tag")[0];
- this._insertInLastAttributePosition(tag, span);
- } else if (!visible && this._addAttributeElement)
- removeAddAttributeSpan.call(this);
- },
-
updateSelection: function()
{
var listItemElement = this.listItemElement;
@@ -421,7 +394,7 @@ WebInspector.ElementsTreeElement.prototype = {
this.listItemElement.addStyleClass("hovered");
}
- this._updateTitle();
+ this.updateTitle();
this._preventFollowingLinksOnDoubleClick();
},
@@ -630,6 +603,8 @@ WebInspector.ElementsTreeElement.prototype = {
contextMenu.appendSeparator();
// Add node-related actions.
+ contextMenu.appendItem(WebInspector.UIString("Edit as HTML"), this._editAsHTML.bind(this));
+ contextMenu.appendItem(WebInspector.UIString("Copy as HTML"), this._copyHTML.bind(this));
contextMenu.appendItem(WebInspector.UIString("Delete Node"), this.remove.bind(this));
},
@@ -646,7 +621,6 @@ WebInspector.ElementsTreeElement.prototype = {
var listItem = this._listItemNode;
if (this._canAddAttributes) {
- this.toggleNewAttributeButton(false);
var attribute = listItem.getElementsByClassName("webkit-html-attribute")[0];
if (attribute)
return this._startEditingAttribute(attribute, attribute.getElementsByClassName("webkit-html-attribute-value")[0]);
@@ -746,6 +720,60 @@ WebInspector.ElementsTreeElement.prototype = {
return true;
},
+ _startEditingAsHTML: function(commitCallback, initialValue)
+ {
+ if (this._htmlEditElement && WebInspector.isBeingEdited(this._htmlEditElement))
+ return true;
+
+ this._editing = true;
+
+ this._htmlEditElement = document.createElement("div");
+ this._htmlEditElement.className = "source-code elements-tree-editor";
+ this._htmlEditElement.textContent = initialValue;
+
+ // Hide header items.
+ var child = this.listItemElement.firstChild;
+ while (child) {
+ child.style.display = "none";
+ child = child.nextSibling;
+ }
+ // Hide children item.
+ if (this._childrenListNode)
+ this._childrenListNode.style.display = "none";
+ // Append editor.
+ this.listItemElement.appendChild(this._htmlEditElement);
+
+ this.updateSelection();
+
+ function commit()
+ {
+ commitCallback(this._htmlEditElement.textContent);
+ dispose.call(this);
+ }
+
+ function dispose()
+ {
+ delete this._editing;
+
+ // Remove editor.
+ this.listItemElement.removeChild(this._htmlEditElement);
+ delete this._htmlEditElement;
+ // Unhide children item.
+ if (this._childrenListNode)
+ this._childrenListNode.style.removeProperty("display");
+ // Unhide header items.
+ var child = this.listItemElement.firstChild;
+ while (child) {
+ child.style.removeProperty("display");
+ child = child.nextSibling;
+ }
+
+ this.updateSelection();
+ }
+
+ WebInspector.startEditing(this._htmlEditElement, commit.bind(this), dispose.bind(this), null, true);
+ },
+
_attributeEditingCommitted: function(element, newText, oldText, attributeName, moveDirection)
{
delete this._editing;
@@ -829,20 +857,22 @@ WebInspector.ElementsTreeElement.prototype = {
textNode.nodeValue = newText;
- // No need to call _updateTitle here, it will be called after the nodeValue is committed.
+ // Need to restore attributes / node structure.
+ this.updateTitle();
},
_editingCancelled: function(element, context)
{
delete this._editing;
- // No need to call _updateTitle here, the editing code will revert to the original text.
+ // Need to restore attributes structure.
+ this.updateTitle();
},
- _updateTitle: function()
+ updateTitle: function()
{
// If we are editing, return early to prevent canceling the edit.
- // After editing is committed _updateTitle will be called.
+ // After editing is committed updateTitle will be called.
if (this._editing)
return;
@@ -863,6 +893,40 @@ WebInspector.ElementsTreeElement.prototype = {
this.createTooltipForImageNode(this.representedObject, callback);
},
+ _rewriteAttrHref: function(node, hrefValue)
+ {
+ if (!hrefValue || hrefValue.indexOf("://") > 0)
+ return hrefValue;
+
+ var match;
+ var documentURL;
+ for (var frameOwnerCandidate = node; frameOwnerCandidate; frameOwnerCandidate = frameOwnerCandidate.parentNode) {
+ if (frameOwnerCandidate.documentURL) {
+ documentURL = frameOwnerCandidate.documentURL;
+ break;
+ }
+ }
+ if (documentURL) {
+ match = documentURL.match(WebInspector.URLRegExp);
+ if (match) {
+ var path = hrefValue;
+ if (path.charAt(0) !== "/") {
+ var documentPath = match[4] || "/";
+ path = documentPath.substring(0, documentPath.lastIndexOf("/")) + "/" + path;
+ }
+ return match[1] + "://" + match[2] + (match[3] ? (":" + match[3]) : "") + path;
+ }
+ }
+
+ // documentURL not found or has bad value
+ for (var url in WebInspector.resourceURLMap) {
+ match = url.match(WebInspector.URLRegExp);
+ if (match && match[4] === hrefValue)
+ return url;
+ }
+ return hrefValue;
+ },
+
_nodeTitleInfo: function(node, hasChildren, linkify, tooltipText)
{
var info = {title: "", hasChildren: hasChildren};
@@ -883,7 +947,7 @@ WebInspector.ElementsTreeElement.prototype = {
var value = attr.value;
if (linkify && (attr.name === "src" || attr.name === "href")) {
var value = value.replace(/([\/;:\)\]\}])/g, "$1\u200B");
- info.title += linkify(attr.value, value, "webkit-html-attribute-value", node.nodeName.toLowerCase() == "a", tooltipText);
+ info.title += linkify(this._rewriteAttrHref(node, attr.value), value, "webkit-html-attribute-value", node.nodeName.toLowerCase() == "a", tooltipText);
} else {
var value = value.escapeHTML();
value = value.replace(/([\/;:\)\]\}])/g, "$1&#8203;");
@@ -915,7 +979,7 @@ WebInspector.ElementsTreeElement.prototype = {
var newNode = document.createElement("span");
newNode.textContent = node.textContent;
- var javascriptSyntaxHighlighter = new WebInspector.JavaScriptSourceSyntaxHighlighter(null, null);
+ var javascriptSyntaxHighlighter = new WebInspector.DOMSyntaxHighlighter("text/javascript");
javascriptSyntaxHighlighter.syntaxHighlightNode(newNode);
info.title = "<span class=\"webkit-html-text-node webkit-html-js-node\">" + newNode.innerHTML.replace(/^[\n\r]*/, "").replace(/\s*$/, "") + "</span>";
@@ -923,7 +987,7 @@ WebInspector.ElementsTreeElement.prototype = {
var newNode = document.createElement("span");
newNode.textContent = node.textContent;
- var cssSyntaxHighlighter = new WebInspector.CSSSourceSyntaxHighlighter(null, null);
+ var cssSyntaxHighlighter = new WebInspector.DOMSyntaxHighlighter("text/css");
cssSyntaxHighlighter.syntaxHighlightNode(newNode);
info.title = "<span class=\"webkit-html-text-node webkit-html-css-node\">" + newNode.innerHTML.replace(/^[\n\r]*/, "").replace(/\s*$/, "") + "</span>";
@@ -985,6 +1049,41 @@ WebInspector.ElementsTreeElement.prototype = {
var callId = WebInspector.Callback.wrap(removeNodeCallback);
InspectorBackend.removeNode(callId, this.representedObject.id);
+ },
+
+ _editAsHTML: function()
+ {
+ var treeOutline = this.treeOutline;
+ var node = this.representedObject;
+ var wasExpanded = this.expanded;
+
+ function selectNode(nodeId)
+ {
+ if (!nodeId)
+ return;
+
+ // Select it and expand if necessary. We force tree update so that it processes dom events and is up to date.
+ WebInspector.panels.elements.updateModifiedNodes();
+
+ WebInspector.updateFocusedNode(nodeId);
+ if (wasExpanded) {
+ var newTreeItem = treeOutline.findTreeElement(WebInspector.domAgent.nodeForId(nodeId));
+ if (newTreeItem)
+ newTreeItem.expand();
+ }
+ }
+
+ function commitChange(value)
+ {
+ InjectedScriptAccess.get(node.injectedScriptId).setOuterHTML(node.id, value, wasExpanded, selectNode.bind(this));
+ }
+
+ InjectedScriptAccess.get(node.injectedScriptId).getNodePropertyValue(node.id, "outerHTML", this._startEditingAsHTML.bind(this, commitChange));
+ },
+
+ _copyHTML: function()
+ {
+ InspectorBackend.copyNode(this.representedObject.id);
}
}
diff --git a/WebCore/inspector/front-end/EventListenersSidebarPane.js b/WebCore/inspector/front-end/EventListenersSidebarPane.js
index c083c0e..649eea8 100644
--- a/WebCore/inspector/front-end/EventListenersSidebarPane.js
+++ b/WebCore/inspector/front-end/EventListenersSidebarPane.js
@@ -38,18 +38,15 @@ WebInspector.EventListenersSidebarPane = function()
var option = document.createElement("option");
option.value = "all";
- if (Preferences.eventListenersFilter === "all")
- option.selected = true;
option.label = WebInspector.UIString("All Nodes");
this.settingsSelectElement.appendChild(option);
option = document.createElement("option");
option.value = "selected";
- if (Preferences.eventListenersFilter === "selected")
- option.selected = true;
option.label = WebInspector.UIString("Selected Node Only");
this.settingsSelectElement.appendChild(option);
+ WebInspector.settings.addEventListener("loaded", this._settingsLoaded, this);
this.settingsSelectElement.addEventListener("click", function(event) { event.stopPropagation() }, false);
this.settingsSelectElement.addEventListener("change", this._changeSetting.bind(this), false);
@@ -57,6 +54,15 @@ WebInspector.EventListenersSidebarPane = function()
}
WebInspector.EventListenersSidebarPane.prototype = {
+ _settingsLoaded: function()
+ {
+ var filter = WebInspector.settings.eventListenersFilter;
+ if (filter === "all")
+ this.settingsSelectElement[0].selected = true;
+ if (filter === "selected")
+ this.settingsSelectElement[1].selected = true;
+ },
+
update: function(node)
{
var body = this.bodyElement;
@@ -106,9 +112,7 @@ WebInspector.EventListenersSidebarPane.prototype = {
_changeSetting: function(event)
{
var selectedOption = this.settingsSelectElement[this.settingsSelectElement.selectedIndex];
- Preferences.eventListenersFilter = selectedOption.value;
-
- InspectorFrontendHost.setSetting("event-listeners-filter", Preferences.eventListenersFilter);
+ WebInspector.settings.eventListenersFilter = selectedOption.value;
for (var i = 0; i < this.sections.length; ++i)
this.sections[i].update();
@@ -138,7 +142,7 @@ WebInspector.EventListenersSection.prototype = {
{
// A Filtered Array simplifies when to create connectors
var filteredEventListeners = this.eventListeners;
- if (Preferences.eventListenersFilter === "selected") {
+ if (WebInspector.settings.eventListenersFilter === "selected") {
filteredEventListeners = [];
for (var i = 0; i < this.eventListeners.length; ++i) {
var eventListener = this.eventListeners[i];
@@ -187,7 +191,7 @@ WebInspector.EventListenerBar.prototype = {
// Just build properties in place - no need to reach out for injected script.
var value = this.eventListener[propertyName];
if (value instanceof WebInspector.DOMNode)
- value = new WebInspector.ObjectProxy(value.id, [], 0, appropriateSelectorForNode(value), true);
+ value = new WebInspector.ObjectProxy(value.injectedScriptId, value.id, [], 0, appropriateSelectorForNode(value), true);
else
value = WebInspector.ObjectProxy.wrapPrimitiveValue(value);
properties.push(new WebInspector.ObjectPropertyProxy(propertyName, value));
diff --git a/WebCore/inspector/front-end/Images/tipBalloon.png b/WebCore/inspector/front-end/Images/tipBalloon.png
deleted file mode 100644
index 4cdf738..0000000
--- a/WebCore/inspector/front-end/Images/tipBalloon.png
+++ /dev/null
Binary files differ
diff --git a/WebCore/inspector/front-end/Images/tipBalloonBottom.png b/WebCore/inspector/front-end/Images/tipBalloonBottom.png
deleted file mode 100644
index 3317a5a..0000000
--- a/WebCore/inspector/front-end/Images/tipBalloonBottom.png
+++ /dev/null
Binary files differ
diff --git a/WebCore/inspector/front-end/Images/tipIcon.png b/WebCore/inspector/front-end/Images/tipIcon.png
deleted file mode 100644
index 8ca6124..0000000
--- a/WebCore/inspector/front-end/Images/tipIcon.png
+++ /dev/null
Binary files differ
diff --git a/WebCore/inspector/front-end/Images/tipIconPressed.png b/WebCore/inspector/front-end/Images/tipIconPressed.png
deleted file mode 100644
index 443e410..0000000
--- a/WebCore/inspector/front-end/Images/tipIconPressed.png
+++ /dev/null
Binary files differ
diff --git a/WebCore/inspector/front-end/InjectedScript.js b/WebCore/inspector/front-end/InjectedScript.js
index 209e99f..9389117 100644
--- a/WebCore/inspector/front-end/InjectedScript.js
+++ b/WebCore/inspector/front-end/InjectedScript.js
@@ -26,8 +26,50 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+var injectedScriptConstructor = (function (InjectedScriptHost, inspectedWindow, injectedScriptId) {
+
var InjectedScript = {};
+InjectedScript.lastBoundObjectId = 1;
+InjectedScript.idToWrappedObject = {};
+InjectedScript.objectGroups = {};
+InjectedScript.wrapObject = function(object, objectGroupName)
+{
+ var objectId;
+ if (typeof object === "object" || typeof object === "function" ||
+ (typeof object === "undefined" && object instanceof inspectedWindow.HTMLAllCollection)) { // FIXME(33716)
+ var id = InjectedScript.lastBoundObjectId++;
+ objectId = "object#" + id;
+ InjectedScript.idToWrappedObject[objectId] = object;
+
+ var group = InjectedScript.objectGroups[objectGroupName];
+ if (!group) {
+ group = [];
+ InjectedScript.objectGroups[objectGroupName] = group;
+ }
+ group.push(objectId);
+ }
+ return InjectedScript.createProxyObject(object, objectId);
+};
+
+InjectedScript.wrapAndStringifyObject = function(object, objectGroupName) {
+ var r = InjectedScript.wrapObject(object, objectGroupName);
+ return InjectedScript.JSON.stringify(r);
+};
+
+InjectedScript.unwrapObject = function(objectId) {
+ return InjectedScript.idToWrappedObject[objectId];
+};
+
+InjectedScript.releaseWrapperObjectGroup = function(objectGroupName) {
+ var group = InjectedScript.objectGroups[objectGroupName];
+ if (!group)
+ return;
+ for (var i = 0; i < group.length; i++)
+ delete InjectedScript.idToWrappedObject[group[i]];
+ delete InjectedScript.objectGroups[objectGroupName];
+};
+
// Called from within InspectorController on the 'inspected page' side.
InjectedScript.reset = function()
{
@@ -43,7 +85,7 @@ InjectedScript.reset();
InjectedScript.dispatch = function(methodName, args, callId)
{
- var argsArray = JSON.parse(args);
+ var argsArray = InjectedScript.JSON.parse(args);
if (callId)
argsArray.splice(0, 0, callId); // Methods that run asynchronously have a call back id parameter.
var result = InjectedScript[methodName].apply(InjectedScript, argsArray);
@@ -51,7 +93,7 @@ InjectedScript.dispatch = function(methodName, args, callId)
InjectedScript._window().console.error("Web Inspector error: InjectedScript.%s returns undefined", methodName);
result = null;
}
- return JSON.stringify(result);
+ return InjectedScript.JSON.stringify(result);
}
InjectedScript.getStyles = function(nodeId, authorOnly)
@@ -169,10 +211,9 @@ InjectedScript.toggleStyleEnabled = function(styleId, propertyName, disabled)
if (disabled) {
if (!style.__disabledPropertyValues || !style.__disabledPropertyPriorities) {
- var inspectedWindow = InjectedScript._window();
- style.__disabledProperties = new inspectedWindow.Object;
- style.__disabledPropertyValues = new inspectedWindow.Object;
- style.__disabledPropertyPriorities = new inspectedWindow.Object;
+ style.__disabledProperties = {};
+ style.__disabledPropertyValues = {};
+ style.__disabledPropertyPriorities = {};
}
style.__disabledPropertyValues[propertyName] = style.getPropertyValue(propertyName);
@@ -306,6 +347,7 @@ InjectedScript._serializeRule = function(rule)
InjectedScript._styleRules[rule.id] = rule;
}
ruleValue.id = rule.id;
+ ruleValue.injectedScriptId = injectedScriptId;
}
return ruleValue;
}
@@ -344,6 +386,7 @@ InjectedScript._serializeStyle = function(style, doBind)
InjectedScript._styles[style.id] = style;
}
result.id = style.id;
+ result.injectedScriptId = injectedScriptId;
}
return result;
}
@@ -433,7 +476,7 @@ InjectedScript.getPrototypes = function(nodeId)
var result = [];
for (var prototype = node; prototype; prototype = prototype.__proto__) {
- var title = Object.describe(prototype, true);
+ var title = InjectedScript._describe(prototype, true);
if (title.match(/Prototype$/)) {
title = title.replace(/Prototype$/, "");
}
@@ -442,10 +485,10 @@ InjectedScript.getPrototypes = function(nodeId)
return result;
}
-InjectedScript.getProperties = function(objectProxy, ignoreHasOwnProperty)
+InjectedScript.getProperties = function(objectProxy, ignoreHasOwnProperty, abbreviate)
{
var object = InjectedScript._resolveObject(objectProxy);
- if (!object)
+ if (!InjectedScript._isDefined(object))
return false;
var properties = [];
@@ -461,7 +504,7 @@ InjectedScript.getProperties = function(objectProxy, ignoreHasOwnProperty)
var isGetter = object["__lookupGetter__"] && object.__lookupGetter__(propertyName);
if (!property.isGetter) {
var childObject = object[propertyName];
- var childObjectProxy = new InjectedScript.createProxyObject(childObject, objectProxy.objectId, true);
+ var childObjectProxy = new InjectedScript.createProxyObject(childObject, objectProxy.objectId, abbreviate);
childObjectProxy.path = objectProxy.path ? objectProxy.path.slice() : [];
childObjectProxy.path.push(propertyName);
childObjectProxy.protoDepth = objectProxy.protoDepth || 0;
@@ -479,7 +522,7 @@ InjectedScript.getProperties = function(objectProxy, ignoreHasOwnProperty)
InjectedScript.setPropertyValue = function(objectProxy, propertyName, expression)
{
var object = InjectedScript._resolveObject(objectProxy);
- if (!object)
+ if (!InjectedScript._isDefined(object))
return false;
var expressionLength = expression.length;
@@ -501,7 +544,7 @@ InjectedScript.setPropertyValue = function(objectProxy, propertyName, expression
return true;
} catch(e) {
try {
- var result = InjectedScript._window().eval("\"" + expression.escapeCharacters("\"") + "\"");
+ var result = InjectedScript._window().eval("\"" + InjectedScript._escapeCharacters(expression, "\"") + "\"");
object[propertyName] = result;
return true;
} catch(e) {
@@ -510,6 +553,46 @@ InjectedScript.setPropertyValue = function(objectProxy, propertyName, expression
}
}
+InjectedScript.getNodePropertyValue = function(nodeId, propertyName)
+{
+ var node = InjectedScript._nodeForId(nodeId);
+ if (!node)
+ return false;
+ var result = node[propertyName];
+ return result !== undefined ? result : false;
+}
+
+InjectedScript.setOuterHTML = function(nodeId, value, expanded)
+{
+ var node = InjectedScript._nodeForId(nodeId);
+ if (!node)
+ return false;
+
+ var parent = node.parentNode;
+ var prevSibling = node.previousSibling;
+ node.outerHTML = value;
+ var newNode = prevSibling ? prevSibling.nextSibling : parent.firstChild;
+
+ return InjectedScriptHost.pushNodePathToFrontend(newNode, expanded, false);
+}
+
+InjectedScript._getPropertyNames = function(object, resultSet)
+{
+ if (Object.getOwnPropertyNames) {
+ for (var o = object; o; o = o.__proto__) {
+ try {
+ var names = Object.getOwnPropertyNames(o);
+ for (var i = 0; i < names.length; ++i)
+ resultSet[names[i]] = true;
+ } catch (e) {
+ }
+ }
+ } else {
+ // Chromium doesn't support getOwnPropertyNames yet.
+ for (var name in object)
+ resultSet[name] = true;
+ }
+}
InjectedScript.getCompletions = function(expression, includeInspectorCommandLineAPI, callFrameId)
{
@@ -526,23 +609,16 @@ InjectedScript.getCompletions = function(expression, includeInspectorCommandLine
else {
// Evaluate into properties in scope of the selected call frame.
var scopeChain = callFrame.scopeChain;
- for (var i = 0; i < scopeChain.length; ++i) {
- var scopeObject = scopeChain[i];
- try {
- for (var propertyName in scopeObject)
- props[propertyName] = true;
- } catch (e) {
- }
- }
+ for (var i = 0; i < scopeChain.length; ++i)
+ InjectedScript._getPropertyNames(scopeChain[i], props);
}
} else {
if (!expression)
expression = "this";
expressionResult = InjectedScript._evaluateOn(InjectedScript._window().eval, InjectedScript._window(), expression);
}
- if (expressionResult)
- for (var prop in expressionResult)
- props[prop] = true;
+ if (typeof expressionResult == "object")
+ InjectedScript._getPropertyNames(expressionResult, props);
if (includeInspectorCommandLineAPI)
for (var prop in InjectedScript._window().console._inspectorCommandLineAPI)
if (prop.charAt(0) !== '_')
@@ -561,7 +637,8 @@ InjectedScript._evaluateAndWrap = function(evalFunction, object, expression, obj
{
var result = {};
try {
- result.value = InjectedScriptHost.wrapObject(InjectedScript._evaluateOn(evalFunction, object, expression), objectGroup);
+ result.value = InjectedScript.wrapObject(InjectedScript._evaluateOn(evalFunction, object, expression), objectGroup);
+
// Handle error that might have happened while describing result.
if (result.value.errorText) {
result.value = result.value.errorText;
@@ -583,7 +660,7 @@ InjectedScript._evaluateOn = function(evalFunction, object, expression)
var value = evalFunction.call(object, expression);
// When evaluating on call frame error is not thrown, but returned as a value.
- if (Object.type(value) === "error")
+ if (InjectedScript._type(value) === "error")
throw value.toString();
return value;
@@ -623,9 +700,9 @@ InjectedScript.performSearch = function(whitespaceTrimmedQuery)
if (!/^[a-zA-Z0-9\-_:]+$/.test(attributeNameQuery))
attributeNameQuery = null;
- const escapedQuery = whitespaceTrimmedQuery.escapeCharacters("'");
- const escapedTagNameQuery = (tagNameQuery ? tagNameQuery.escapeCharacters("'") : null);
- const escapedWhitespaceTrimmedQuery = whitespaceTrimmedQuery.escapeCharacters("'");
+ const escapedQuery = InjectedScript._escapeCharacters(whitespaceTrimmedQuery, "'");
+ const escapedTagNameQuery = (tagNameQuery ? InjectedScript._escapeCharacters(tagNameQuery, "'") : null);
+ const escapedWhitespaceTrimmedQuery = InjectedScript._escapeCharacters(whitespaceTrimmedQuery, "'");
const searchResultsProperty = InjectedScript._includedInSearchResultsPropertyName;
function addNodesToResults(nodes, length, getItem)
@@ -646,7 +723,7 @@ InjectedScript.performSearch = function(whitespaceTrimmedQuery)
node[searchResultsProperty] = true;
InjectedScript._searchResults.push(node);
- var nodeId = InjectedScriptHost.pushNodePathToFrontend(node, false);
+ var nodeId = InjectedScriptHost.pushNodePathToFrontend(node, false, false);
nodeIds.push(nodeId);
}
InjectedScriptHost.addNodesToSearchResult(nodeIds.join(","));
@@ -858,7 +935,7 @@ InjectedScript.getCallFrames = function()
result.push(new InjectedScript.CallFrameProxy(depth++, callFrame));
callFrame = callFrame.caller;
} while (callFrame);
- return result;
+ return InjectedScript.JSON.stringify(result);
}
InjectedScript.evaluateInCallFrame = function(callFrameId, code, objectGroup)
@@ -877,9 +954,10 @@ InjectedScript._callFrameForId = function(id)
return callFrame;
}
-InjectedScript._clearConsoleMessages = function()
+InjectedScript.clearConsoleMessages = function()
{
- InjectedScriptHost.clearMessages(true);
+ InjectedScriptHost.clearConsoleMessages();
+ return true;
}
InjectedScript._inspectObject = function(o)
@@ -887,12 +965,11 @@ InjectedScript._inspectObject = function(o)
if (arguments.length === 0)
return;
- var inspectedWindow = InjectedScript._window();
inspectedWindow.console.log(o);
- if (Object.type(o) === "node") {
- InjectedScriptHost.pushNodePathToFrontend(o, true);
+ if (InjectedScript._type(o) === "node") {
+ InjectedScriptHost.pushNodePathToFrontend(o, false, true);
} else {
- switch (Object.describe(o)) {
+ switch (InjectedScript._describe(o)) {
case "Database":
InjectedScriptHost.selectDatabase(o);
break;
@@ -905,8 +982,8 @@ InjectedScript._inspectObject = function(o)
InjectedScript._copy = function(o)
{
- if (Object.type(o) === "node") {
- var nodeId = InjectedScriptHost.pushNodePathToFrontend(o, false);
+ if (InjectedScript._type(o) === "node") {
+ var nodeId = InjectedScriptHost.pushNodePathToFrontend(o, false, false);
InjectedScriptHost.copyNode(nodeId);
} else {
InjectedScriptHost.copyText(o);
@@ -986,9 +1063,9 @@ InjectedScript._ensureCommandLineAPIInstalled = function(evalFunction, evalObjec
get $4() { return console._inspectorCommandLineAPI._inspectedNodes[4] }, \n\
};");
- inspectorCommandLineAPI.clear = InjectedScriptHost.wrapCallback(InjectedScript._clearConsoleMessages);
- inspectorCommandLineAPI.inspect = InjectedScriptHost.wrapCallback(InjectedScript._inspectObject);
- inspectorCommandLineAPI.copy = InjectedScriptHost.wrapCallback(InjectedScript._copy);
+ inspectorCommandLineAPI.clear = InjectedScript.clearConsoleMessages;
+ inspectorCommandLineAPI.inspect = InjectedScript._inspectObject;
+ inspectorCommandLineAPI.copy = InjectedScript._copy;
}
InjectedScript._resolveObject = function(objectProxy)
@@ -998,11 +1075,11 @@ InjectedScript._resolveObject = function(objectProxy)
var protoDepth = objectProxy.protoDepth;
// Follow the property path.
- for (var i = 0; object && path && i < path.length; ++i)
+ for (var i = 0; InjectedScript._isDefined(object) && path && i < path.length; ++i)
object = object[path[i]];
// Get to the necessary proto layer.
- for (var i = 0; object && protoDepth && i < protoDepth; ++i)
+ for (var i = 0; InjectedScript._isDefined(object) && protoDepth && i < protoDepth; ++i)
object = object.__proto__;
return object;
@@ -1012,7 +1089,7 @@ InjectedScript._window = function()
{
// TODO: replace with 'return window;' once this script is injected into
// the page's context.
- return InjectedScriptHost.inspectedWindow();
+ return inspectedWindow;
}
InjectedScript._nodeForId = function(nodeId)
@@ -1031,7 +1108,7 @@ InjectedScript._objectForId = function(objectId)
if (typeof objectId === "number") {
return InjectedScript._nodeForId(objectId);
} else if (typeof objectId === "string") {
- return InjectedScriptHost.unwrapObject(objectId);
+ return InjectedScript.unwrapObject(objectId);
} else if (typeof objectId === "object") {
var callFrame = InjectedScript._callFrameForId(objectId.callFrame);
if (objectId.thisObject)
@@ -1045,9 +1122,9 @@ InjectedScript._objectForId = function(objectId)
InjectedScript.pushNodeToFrontend = function(objectProxy)
{
var object = InjectedScript._resolveObject(objectProxy);
- if (!object || Object.type(object) !== "node")
+ if (!object || InjectedScript._type(object) !== "node")
return false;
- return InjectedScriptHost.pushNodePathToFrontend(object, false);
+ return InjectedScriptHost.pushNodePathToFrontend(object, false, false);
}
InjectedScript.nodeByPath = function(path)
@@ -1061,8 +1138,9 @@ InjectedScript.nodeByPath = function(path)
InjectedScript.createProxyObject = function(object, objectId, abbreviate)
{
var result = {};
+ result.injectedScriptId = injectedScriptId;
result.objectId = objectId;
- result.type = Object.type(object);
+ result.type = InjectedScript._type(object);
var type = typeof object;
if ((type === "object" && object !== null) || type === "function") {
@@ -1072,13 +1150,18 @@ InjectedScript.createProxyObject = function(object, objectId, abbreviate)
}
}
try {
- result.description = Object.describe(object, abbreviate);
+ result.description = InjectedScript._describe(object, abbreviate);
} catch (e) {
result.errorText = e.toString();
}
return result;
}
+InjectedScript.evaluateOnSelf = function(funcBody)
+{
+ return window.eval("(" + funcBody + ")();");
+}
+
InjectedScript.CallFrameProxy = function(id, callFrame)
{
this.id = id;
@@ -1099,7 +1182,7 @@ InjectedScript.CallFrameProxy.prototype = {
var scopeObject = scopeChain[i];
var scopeObjectProxy = InjectedScript.createProxyObject(scopeObject, { callFrame: this.id, chainIndex: i }, true);
- if (Object.prototype.toString.call(scopeObject) === "[object JSActivation]") {
+ if (InjectedScriptHost.isActivation(scopeObject)) {
if (!foundLocalScope)
scopeObjectProxy.thisObject = InjectedScript.createProxyObject(callFrame.thisObject, { callFrame: this.id, thisObject: true }, true);
else
@@ -1137,31 +1220,40 @@ InjectedScript.executeSql = function(callId, databaseId, query)
data[columnIdentifier] = String(text);
}
}
- InjectedScriptHost.reportDidDispatchOnInjectedScript(callId, JSON.stringify(result), false);
+ InjectedScriptHost.reportDidDispatchOnInjectedScript(callId, InjectedScript.JSON.stringify(result), false);
}
function errorCallback(tx, error)
{
- InjectedScriptHost.reportDidDispatchOnInjectedScript(callId, JSON.stringify(error), false);
+ InjectedScriptHost.reportDidDispatchOnInjectedScript(callId, InjectedScript.JSON.stringify(error), false);
}
function queryTransaction(tx)
{
- tx.executeSql(query, null, InjectedScriptHost.wrapCallback(successCallback), InjectedScriptHost.wrapCallback(errorCallback));
+ tx.executeSql(query, null, successCallback, errorCallback);
}
var database = InjectedScriptHost.databaseForId(databaseId);
if (!database)
errorCallback(null, { code : 2 }); // Return as unexpected version.
- database.transaction(InjectedScriptHost.wrapCallback(queryTransaction), InjectedScriptHost.wrapCallback(errorCallback));
+ database.transaction(queryTransaction, errorCallback);
return true;
}
-Object.type = function(obj)
+InjectedScript._isDefined = function(object)
+{
+ return object || object instanceof inspectedWindow.HTMLAllCollection;
+}
+
+InjectedScript._type = function(obj)
{
if (obj === null)
return "null";
+ // FIXME(33716): typeof document.all is always 'undefined'.
+ if (obj instanceof inspectedWindow.HTMLAllCollection)
+ return "array";
+
var type = typeof obj;
if (type !== "object" && type !== "function")
return type;
@@ -1191,19 +1283,10 @@ Object.type = function(obj)
return type;
}
-Object.hasProperties = function(obj)
-{
- if (typeof obj === "undefined" || typeof obj === "null")
- return false;
- for (var name in obj)
- return true;
- return false;
-}
-
-Object.describe = function(obj, abbreviated)
+InjectedScript._describe = function(obj, abbreviated)
{
- var type1 = Object.type(obj);
- var type2 = Object.className(obj);
+ var type1 = InjectedScript._type(obj);
+ var type2 = InjectedScript._className(obj);
switch (type1) {
case "object":
@@ -1228,40 +1311,324 @@ Object.describe = function(obj, abbreviated)
}
}
-Object.className = function(obj)
+InjectedScript._className = function(obj)
{
return Object.prototype.toString.call(obj).replace(/^\[object (.*)\]$/i, "$1")
}
-// Although Function.prototype.bind and String.prototype.escapeCharacters are defined in utilities.js they will soon become
-// unavailable in the InjectedScript context. So we define them here for the local use.
-// TODO: remove this comment once InjectedScript runs in a separate context.
-Function.prototype.bind = function(thisObject)
-{
- var func = this;
- var args = Array.prototype.slice.call(arguments, 1);
- return function() { return func.apply(thisObject, args.concat(Array.prototype.slice.call(arguments, 0))) };
-}
-
-String.prototype.escapeCharacters = function(chars)
+InjectedScript._escapeCharacters = function(str, chars)
{
var foundChar = false;
for (var i = 0; i < chars.length; ++i) {
- if (this.indexOf(chars.charAt(i)) !== -1) {
+ if (str.indexOf(chars.charAt(i)) !== -1) {
foundChar = true;
break;
}
}
if (!foundChar)
- return this;
+ return str;
var result = "";
- for (var i = 0; i < this.length; ++i) {
- if (chars.indexOf(this.charAt(i)) !== -1)
+ for (var i = 0; i < str.length; ++i) {
+ if (chars.indexOf(str.charAt(i)) !== -1)
result += "\\";
- result += this.charAt(i);
+ result += str.charAt(i);
}
return result;
}
+
+InjectedScript.JSON = {};
+
+// The following code is a slightly modified version of http://www.json.org/json2.js last modified on 2009-09-29.
+// Compared to the original version it ignores toJSON method on objects it serializes.
+// It's done to avoid weird behaviour when inspected application provides it's own implementation
+// of toJSON methods to the Object and other intrinsic types. We use InjectedScript.JSON implementation
+// instead of global JSON object since it can have been modified by the inspected code.
+(function() {
+
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10 ? '0' + n : n;
+ }
+
+ var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ gap,
+ indent,
+ meta = { // table of character substitutions
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '"' : '\\"',
+ '\\': '\\\\'
+ },
+ rep;
+
+
+ function quote(string) {
+
+// If the string contains no control characters, no quote characters, and no
+// backslash characters, then we can safely slap some quotes around it.
+// Otherwise we must also replace the offending characters with safe escape
+// sequences.
+
+ escapable.lastIndex = 0;
+ return escapable.test(string) ?
+ '"' + string.replace(escapable, function (a) {
+ var c = meta[a];
+ return typeof c === 'string' ? c :
+ '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ }) + '"' :
+ '"' + string + '"';
+ }
+
+
+ function str(key, holder) {
+
+// Produce a string from holder[key].
+
+ var i, // The loop counter.
+ k, // The member key.
+ v, // The member value.
+ length,
+ mind = gap,
+ partial,
+ value = holder[key];
+
+// If we were called with a replacer function, then call the replacer to
+// obtain a replacement value.
+
+ if (typeof rep === 'function') {
+ value = rep.call(holder, key, value);
+ }
+
+// What happens next depends on the value's type.
+
+ switch (typeof value) {
+ case 'string':
+ return quote(value);
+
+ case 'number':
+
+// JSON numbers must be finite. Encode non-finite numbers as null.
+
+ return isFinite(value) ? String(value) : 'null';
+
+ case 'boolean':
+ case 'null':
+
+// If the value is a boolean or null, convert it to a string. Note:
+// typeof null does not produce 'null'. The case is included here in
+// the remote chance that this gets fixed someday.
+
+ return String(value);
+
+// If the type is 'object', we might be dealing with an object or an array or
+// null.
+
+ case 'object':
+
+// Due to a specification blunder in ECMAScript, typeof null is 'object',
+// so watch out for that case.
+
+ if (!value) {
+ return 'null';
+ }
+
+// Make an array to hold the partial results of stringifying this object value.
+
+ gap += indent;
+ partial = [];
+
+// Is the value an array?
+
+ if (Object.prototype.toString.apply(value) === '[object Array]') {
+
+// The value is an array. Stringify every element. Use null as a placeholder
+// for non-JSON values.
+
+ length = value.length;
+ for (i = 0; i < length; i += 1) {
+ partial[i] = str(i, value) || 'null';
+ }
+
+// Join all of the elements together, separated with commas, and wrap them in
+// brackets.
+
+ v = partial.length === 0 ? '[]' :
+ gap ? '[\n' + gap +
+ partial.join(',\n' + gap) + '\n' +
+ mind + ']' :
+ '[' + partial.join(',') + ']';
+ gap = mind;
+ return v;
+ }
+
+// If the replacer is an array, use it to select the members to be stringified.
+
+ if (rep && typeof rep === 'object') {
+ length = rep.length;
+ for (i = 0; i < length; i += 1) {
+ k = rep[i];
+ if (typeof k === 'string') {
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ } else {
+
+// Otherwise, iterate through all of the keys in the object.
+
+ for (k in value) {
+ if (Object.hasOwnProperty.call(value, k)) {
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ }
+
+// Join all of the member texts together, separated with commas,
+// and wrap them in braces.
+
+ v = partial.length === 0 ? '{}' :
+ gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
+ mind + '}' : '{' + partial.join(',') + '}';
+ gap = mind;
+ return v;
+ }
+ }
+
+ InjectedScript.JSON.stringify = function (value, replacer, space) {
+
+// The stringify method takes a value and an optional replacer, and an optional
+// space parameter, and returns a JSON text. The replacer can be a function
+// that can replace values, or an array of strings that will select the keys.
+// A default replacer method can be provided. Use of the space parameter can
+// produce text that is more easily readable.
+
+ var i;
+ gap = '';
+ indent = '';
+
+// If the space parameter is a number, make an indent string containing that
+// many spaces.
+
+ if (typeof space === 'number') {
+ for (i = 0; i < space; i += 1) {
+ indent += ' ';
+ }
+
+// If the space parameter is a string, it will be used as the indent string.
+
+ } else if (typeof space === 'string') {
+ indent = space;
+ }
+
+// If there is a replacer, it must be a function or an array.
+// Otherwise, throw an error.
+
+ rep = replacer;
+ if (replacer && typeof replacer !== 'function' &&
+ (typeof replacer !== 'object' ||
+ typeof replacer.length !== 'number')) {
+ throw new Error('JSON.stringify');
+ }
+
+// Make a fake root object containing our value under the key of ''.
+// Return the result of stringifying the value.
+
+ return str('', {'': value});
+ };
+
+
+// If the JSON object does not yet have a parse method, give it one.
+
+ InjectedScript.JSON.parse = function (text, reviver) {
+
+// The parse method takes a text and an optional reviver function, and returns
+// a JavaScript value if the text is a valid JSON text.
+
+ var j;
+
+ function walk(holder, key) {
+
+// The walk method is used to recursively walk the resulting structure so
+// that modifications can be made.
+
+ var k, v, value = holder[key];
+ if (value && typeof value === 'object') {
+ for (k in value) {
+ if (Object.hasOwnProperty.call(value, k)) {
+ v = walk(value, k);
+ if (v !== undefined) {
+ value[k] = v;
+ } else {
+ delete value[k];
+ }
+ }
+ }
+ }
+ return reviver.call(holder, key, value);
+ }
+
+
+// Parsing happens in four stages. In the first stage, we replace certain
+// Unicode characters with escape sequences. JavaScript handles many characters
+// incorrectly, either silently deleting them, or treating them as line endings.
+
+ cx.lastIndex = 0;
+ if (cx.test(text)) {
+ text = text.replace(cx, function (a) {
+ return '\\u' +
+ ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ });
+ }
+
+// In the second stage, we run the text against regular expressions that look
+// for non-JSON patterns. We are especially concerned with '()' and 'new'
+// because they can cause invocation, and '=' because it can cause mutation.
+// But just to be safe, we want to reject all unexpected forms.
+
+// We split the second stage into 4 regexp operations in order to work around
+// crippling inefficiencies in IE's and Safari's regexp engines. First we
+// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
+// replace all simple value tokens with ']' characters. Third, we delete all
+// open brackets that follow a colon or comma or that begin the text. Finally,
+// we look to see that the remaining characters are only whitespace or ']' or
+// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
+
+ if (/^[\],:{}\s]*$/.
+test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
+replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
+replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
+
+// In the third stage we use the eval function to compile the text into a
+// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
+// in JavaScript: it can begin a block or an object literal. We wrap the text
+// in parens to eliminate the ambiguity.
+
+ j = eval('(' + text + ')');
+
+// In the optional fourth stage, we recursively walk the new structure, passing
+// each name/value pair to a reviver function for possible transformation.
+
+ return typeof reviver === 'function' ?
+ walk({'': j}, '') : j;
+ }
+
+// If the text is not JSON parseable, then a SyntaxError is thrown.
+
+ throw new SyntaxError('JSON.parse');
+ };
+}());
+
+return InjectedScript;
+});
diff --git a/WebCore/inspector/front-end/InjectedScriptAccess.js b/WebCore/inspector/front-end/InjectedScriptAccess.js
index 14a3a6b..2dd2908 100644
--- a/WebCore/inspector/front-end/InjectedScriptAccess.js
+++ b/WebCore/inspector/front-end/InjectedScriptAccess.js
@@ -29,11 +29,25 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-var InjectedScriptAccess = {};
+function InjectedScriptAccess(injectedScriptId) {
+ this._injectedScriptId = injectedScriptId;
+}
+
+InjectedScriptAccess.get = function(injectedScriptId)
+{
+ return new InjectedScriptAccess(injectedScriptId);
+}
+
+InjectedScriptAccess.getDefault = function()
+{
+ return InjectedScriptAccess.get(0);
+}
+
+InjectedScriptAccess.prototype = {};
InjectedScriptAccess._installHandler = function(methodName, async)
{
- InjectedScriptAccess[methodName] = function()
+ InjectedScriptAccess.prototype[methodName] = function()
{
var allArgs = Array.prototype.slice.call(arguments);
var callback = allArgs[allArgs.length - 1];
@@ -47,7 +61,8 @@ InjectedScriptAccess._installHandler = function(methodName, async)
WebInspector.console.addMessage(new WebInspector.ConsoleTextMessage("Error dispatching: " + methodName));
}
var callId = WebInspector.Callback.wrap(myCallback);
- InspectorBackend.dispatchOnInjectedScript(callId, methodName, argsString, !!async);
+
+ InspectorBackend.dispatchOnInjectedScript(callId, this._injectedScriptId, methodName, argsString, !!async);
};
}
@@ -59,11 +74,13 @@ InjectedScriptAccess._installHandler("addInspectedNode");
InjectedScriptAccess._installHandler("addStyleSelector");
InjectedScriptAccess._installHandler("applyStyleRuleText");
InjectedScriptAccess._installHandler("applyStyleText");
+InjectedScriptAccess._installHandler("clearConsoleMessages");
InjectedScriptAccess._installHandler("evaluate");
InjectedScriptAccess._installHandler("evaluateInCallFrame");
InjectedScriptAccess._installHandler("getCompletions");
InjectedScriptAccess._installHandler("getComputedStyle");
InjectedScriptAccess._installHandler("getInlineStyle");
+InjectedScriptAccess._installHandler("getNodePropertyValue");
InjectedScriptAccess._installHandler("getProperties");
InjectedScriptAccess._installHandler("getPrototypes");
InjectedScriptAccess._installHandler("getStyles");
@@ -72,10 +89,12 @@ InjectedScriptAccess._installHandler("performSearch");
InjectedScriptAccess._installHandler("pushNodeToFrontend");
InjectedScriptAccess._installHandler("nodeByPath");
InjectedScriptAccess._installHandler("searchCanceled");
+InjectedScriptAccess._installHandler("setOuterHTML");
InjectedScriptAccess._installHandler("setPropertyValue");
InjectedScriptAccess._installHandler("setStyleProperty");
InjectedScriptAccess._installHandler("setStyleText");
InjectedScriptAccess._installHandler("toggleStyleEnabled");
+InjectedScriptAccess._installHandler("evaluateOnSelf");
// Some methods can't run synchronously even on the injected script side (such as DB transactions).
// Mark them as asynchronous here.
diff --git a/WebCore/inspector/front-end/InspectorBackendStub.js b/WebCore/inspector/front-end/InspectorBackendStub.js
index 1710b12..5ddb74a 100644
--- a/WebCore/inspector/front-end/InspectorBackendStub.js
+++ b/WebCore/inspector/front-end/InspectorBackendStub.js
@@ -38,7 +38,6 @@ WebInspector.InspectorBackendStub = function()
this._profilerEnabled = true;
this._resourceTrackingEnabled = false;
this._timelineEnabled = false;
- this._settings = {};
}
WebInspector.InspectorBackendStub.prototype = {
@@ -101,19 +100,9 @@ WebInspector.InspectorBackendStub.prototype = {
{
},
-
- addResourceSourceToFrame: function(identifier, element)
- {
- },
-
- addSourceToFrame: function(mimeType, source, element)
- {
- return false;
- },
-
- getResourceDocumentNode: function(identifier)
+ getResourceContent: function(callId, identifier)
{
- return undefined;
+ WebInspector.didGetResourceContent(callId, "");
},
highlightDOMNode: function(node)
@@ -196,12 +185,12 @@ WebInspector.InspectorBackendStub.prototype = {
{
},
- pauseOnExceptions: function()
+ pauseOnExceptionsState: function()
{
- return false;
+ return 0;
},
- setPauseOnExceptions: function(value)
+ setPauseOnExceptionsState: function(value)
{
},
@@ -266,9 +255,8 @@ WebInspector.InspectorBackendStub.prototype = {
{
},
- setSetting: function(setting, value)
+ saveFrontendSettings: function()
{
- this._settings[setting] = value;
},
dispatchOnInjectedScript: function()
@@ -279,9 +267,8 @@ WebInspector.InspectorBackendStub.prototype = {
{
},
- setting: function(setting)
+ setInjectedScriptSource: function()
{
- return this._settings[setting];
}
}
diff --git a/WebCore/inspector/front-end/InspectorControllerStub.js b/WebCore/inspector/front-end/InspectorControllerStub.js
deleted file mode 100644
index e69de29..0000000
--- a/WebCore/inspector/front-end/InspectorControllerStub.js
+++ /dev/null
diff --git a/WebCore/inspector/front-end/InspectorFrontendHostStub.js b/WebCore/inspector/front-end/InspectorFrontendHostStub.js
index facea4e..dc7da61 100644
--- a/WebCore/inspector/front-end/InspectorFrontendHostStub.js
+++ b/WebCore/inspector/front-end/InspectorFrontendHostStub.js
@@ -33,7 +33,6 @@ if (!window.InspectorFrontendHost) {
WebInspector.InspectorFrontendHostStub = function()
{
this._attachedWindowHeight = 0;
- this._settings = {};
}
WebInspector.InspectorFrontendHostStub.prototype = {
@@ -72,15 +71,6 @@ WebInspector.InspectorFrontendHostStub.prototype = {
{
},
- addResourceSourceToFrame: function(identifier, element)
- {
- },
-
- addSourceToFrame: function(mimeType, source, element)
- {
- return false;
- },
-
loaded: function()
{
},
@@ -95,14 +85,12 @@ WebInspector.InspectorFrontendHostStub.prototype = {
return "";
},
- setSetting: function(setting, value)
+ windowUnloading: function()
{
- this._settings[setting] = value;
},
- setting: function(setting)
+ copyText: function()
{
- return this._settings[setting];
}
}
diff --git a/WebCore/inspector/front-end/KeyboardShortcut.js b/WebCore/inspector/front-end/KeyboardShortcut.js
index 0a068d5..b4dda8b 100644
--- a/WebCore/inspector/front-end/KeyboardShortcut.js
+++ b/WebCore/inspector/front-end/KeyboardShortcut.js
@@ -45,6 +45,7 @@ WebInspector.KeyboardShortcut.Modifiers = {
WebInspector.KeyboardShortcut.KeyCodes = {
Backspace: 8,
+ Tab: 9,
Esc: 27,
Space: 32,
PageUp: 33, // also NUM_NORTH_EAST
@@ -56,6 +57,7 @@ WebInspector.KeyboardShortcut.KeyCodes = {
Right: 39, // also NUM_EAST
Down: 40, // also NUM_SOUTH
Delete: 46,
+ Zero: 48,
F1: 112,
F2: 113,
F3: 114,
@@ -69,11 +71,13 @@ WebInspector.KeyboardShortcut.KeyCodes = {
F11: 122,
F12: 123,
Semicolon: 186, // ;
+ Plus: 187, // +
Comma: 188, // ,
+ Minus: 189, // -
Period: 190, // .
Slash: 191, // /
Apostrophe: 192, // `
- SingleQuote: 222, // '
+ SingleQuote: 222 // '
};
/**
diff --git a/WebCore/inspector/front-end/MetricsSidebarPane.js b/WebCore/inspector/front-end/MetricsSidebarPane.js
index f5e6758..767da1f 100644
--- a/WebCore/inspector/front-end/MetricsSidebarPane.js
+++ b/WebCore/inspector/front-end/MetricsSidebarPane.js
@@ -30,6 +30,7 @@ WebInspector.MetricsSidebarPane = function()
{
WebInspector.SidebarPane.call(this, WebInspector.UIString("Metrics"));
this._inlineStyleId = null;
+ this._inlineStyleInjectedScriptId = null;
}
WebInspector.MetricsSidebarPane.prototype = {
@@ -52,14 +53,15 @@ WebInspector.MetricsSidebarPane.prototype = {
var style = WebInspector.CSSStyleDeclaration.parseStyle(stylePayload);
self._update(style);
};
- InjectedScriptAccess.getComputedStyle(node.id, callback);
+ InjectedScriptAccess.get(node.injectedScriptId).getComputedStyle(node.id, callback);
var inlineStyleCallback = function(stylePayload) {
if (!stylePayload)
return;
self._inlineStyleId = stylePayload.id;
+ self._inlineStyleInjectedScriptId = stylePayload.injectedScriptId;
};
- InjectedScriptAccess.getInlineStyle(node.id, inlineStyleCallback);
+ InjectedScriptAccess.get(node.injectedScriptId).getInlineStyle(node.id, inlineStyleCallback);
},
_update: function(style)
@@ -204,7 +206,7 @@ WebInspector.MetricsSidebarPane.prototype = {
self.dispatchEventToListeners("metrics edited");
self.update();
};
- InjectedScriptAccess.setStyleProperty(this._inlineStyleId, context.styleProperty, userInput, callback);
+ InjectedScriptAccess.get(this._inlineStyleInjectedScriptId).setStyleProperty(this._inlineStyleId, context.styleProperty, userInput, callback);
}
}
diff --git a/WebCore/inspector/front-end/NativeTextViewer.js b/WebCore/inspector/front-end/NativeTextViewer.js
new file mode 100644
index 0000000..53b213d
--- /dev/null
+++ b/WebCore/inspector/front-end/NativeTextViewer.js
@@ -0,0 +1,209 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.NativeTextViewer = function(textModel, platform)
+{
+ WebInspector.TextEditor.call(this, textModel, platform);
+ this._sheet.className = "monospace";
+ this._sheet.tabIndex = 0;
+ this._canvas.style.zIndex = 0;
+ this._createLineDivs();
+}
+
+WebInspector.NativeTextViewer.prototype = {
+ // WebInspector.TextModel listener
+ _textChanged: function(oldRange, newRange, oldText, newText)
+ {
+ this._createLineDivs();
+ WebInspector.TextEditor.prototype._textChanged.call(this, oldRange, newRange, oldText, newText);
+ },
+
+ _createLineDivs: function()
+ {
+ this._container.removeChild(this._sheet);
+ this._sheet.removeChildren();
+ for (var i = 0; i < this._textModel.linesCount; ++i) {
+ var lineDiv = document.createElement("div");
+ lineDiv.className = "native-text-editor-line";
+ lineDiv.textContent = this._textModel.line(i);
+ this._sheet.appendChild(lineDiv);
+ this._textModel.setAttribute(i, "line-div", lineDiv);
+ }
+ this._container.appendChild(this._sheet);
+ },
+
+ _updatePreferredSize: function(startLine, endLine)
+ {
+ // Preferred size is automatically calculated based on the line divs.
+ // Only handle line numbers here.
+
+ this.setCoalescingUpdate(true);
+ var newLineNumberDigits = this._decimalDigits(this._textModel.linesCount);
+ this._lineNumberWidth = (newLineNumberDigits + 2) * this._digitWidth;
+
+ this._sheet.style.paddingLeft = this._textWidth + this._lineNumberWidth + "px";
+
+ this._lineNumberDigits = newLineNumberDigits;
+ this.repaintAll();
+
+ // Changes to size can change the client area (scrollers can appear/disappear)
+ this.resize();
+ this.setCoalescingUpdate(false);
+ },
+
+ _scroll: function(e)
+ {
+ // Do instant repaint so that offset of canvas was in sync with the sheet.
+ this._repaintOnScroll();
+ },
+
+ _registerMouseListeners: function()
+ {
+ this._sheet.addEventListener("mousedown", this._mouseDown.bind(this), false);
+ },
+
+ _registerKeyboardListeners: function()
+ {
+ // Noop - let browser take care of this.
+ },
+
+ _registerClipboardListeners: function()
+ {
+ // Noop - let browser take care of this.
+ },
+
+ _paintSelection: function()
+ {
+ // Noop - let browser take care of this.
+ },
+
+ _positionDivDecoration: function()
+ {
+ // Div decorations have fixed positions in our case.
+ },
+
+ _mouseDown: function(e)
+ {
+ if (e.offsetX + e.target.offsetTop >= this._lineNumberWidth && this._lineNumberDecorator)
+ return;
+
+ if (e.button === 2 || (this._isMac && e.ctrlKey))
+ return;
+
+ var location = this._caretForMouseEvent(e);
+ this._lineNumberDecorator.mouseDown(location.line, e);
+ },
+
+ _contextMenu: function(e)
+ {
+ // Override editor's implementation to add the line's offsets.
+ if (e.offsetX + e.target.offsetTop >= this._lineNumberWidth && this._lineNumberDecorator)
+ return;
+
+ var location = this._caretForMouseEvent(e);
+ this._lineNumberDecorator.contextMenu(location.line, e);
+ },
+
+ _caretForMouseEvent: function(e)
+ {
+ // Override editor's implementation to add the line's offsets.
+ var lineNumber = Math.max(0, this._offsetToLine(e.offsetY + e.target.offsetTop) - 1);
+ var offset = e.offsetX + e.target.offsetLeft + this._scrollLeft - this._lineNumberWidth;
+ return { line: lineNumber, column: this._columnForOffset(lineNumber, offset) };
+ },
+
+ _paintLine: function(lineNumber, lineOffset)
+ {
+ var divHighlighted = this._textModel.getAttribute(lineNumber, "div-highlighted");
+ if (divHighlighted)
+ return;
+
+ var highlighterState = this._textModel.getAttribute(lineNumber, "highlighter-state");
+ if (!highlighterState)
+ return;
+
+ var line = this._textModel.line(lineNumber);
+ var element = this._textModel.getAttribute(lineNumber, "line-div");
+ element.removeChildren();
+
+ var plainTextStart = -1;
+ for (var j = 0; j < line.length;) {
+ if (j > 1000) {
+ // This line is too long - do not waste cycles on minified js highlighting.
+ break;
+ }
+ var attribute = highlighterState && highlighterState.attributes[j];
+ if (!attribute || !attribute.style) {
+ if (plainTextStart === -1)
+ plainTextStart = j;
+ j++;
+ } else {
+ if (plainTextStart !== -1) {
+ element.appendChild(document.createTextNode(line.substring(plainTextStart, j)));
+ plainTextStart = -1;
+ }
+ element.appendChild(this._createSpan(line.substring(j, j + attribute.length), attribute.tokenType));
+ j += attribute.length;
+ }
+ }
+ if (plainTextStart !== -1)
+ element.appendChild(document.createTextNode(line.substring(plainTextStart, line.length)));
+
+ this._textModel.setAttribute(lineNumber, "div-highlighted", true);
+ },
+
+ _createSpan: function(content, className)
+ {
+ var span = document.createElement("span");
+ span.className = "webkit-" + className;
+ span.appendChild(document.createTextNode(content));
+ return span;
+ },
+
+ setDivDecoration: function(lineNumber, element)
+ {
+ var existingElement = this._textModel.getAttribute(lineNumber, "div-decoration");
+ if (existingElement && existingElement.parentNode)
+ existingElement.parentNode.removeChild(existingElement);
+ this._textModel.removeAttribute(lineNumber, "div-decoration");
+
+ if (element) {
+ if (lineNumber < this._textModel.linesCount - 1) {
+ var lineDiv = this._textModel.getAttribute(lineNumber + 1, "line-div");
+ this._sheet.insertBefore(element, lineDiv);
+ } else
+ this._sheet.appendChild(element);
+ this._textModel.setAttribute(lineNumber, "div-decoration", element);
+ }
+ this.revalidateDecorationsAndPaint();
+ }
+}
+
+WebInspector.NativeTextViewer.prototype.__proto__ = WebInspector.TextEditor.prototype;
diff --git a/WebCore/inspector/front-end/ObjectPropertiesSection.js b/WebCore/inspector/front-end/ObjectPropertiesSection.js
index 7bdf17f..6d71090 100644
--- a/WebCore/inspector/front-end/ObjectPropertiesSection.js
+++ b/WebCore/inspector/front-end/ObjectPropertiesSection.js
@@ -50,7 +50,7 @@ WebInspector.ObjectPropertiesSection.prototype = {
return;
self.updateProperties(properties);
};
- InjectedScriptAccess.getProperties(this.object, this.ignoreHasOwnProperty, callback);
+ InjectedScriptAccess.get(this.object.injectedScriptId).getProperties(this.object, this.ignoreHasOwnProperty, true, callback);
},
updateProperties: function(properties, rootTreeElementConstructor, rootPropertyComparer)
@@ -147,7 +147,7 @@ WebInspector.ObjectPropertyTreeElement.prototype = {
this.appendChild(new this.treeOutline.section.treeElementConstructor(properties[i]));
}
};
- InjectedScriptAccess.getProperties(this.property.value, false, callback.bind(this));
+ InjectedScriptAccess.get(this.property.value.injectedScriptId).getProperties(this.property.value, false, true, callback.bind(this));
},
ondblclick: function(event)
@@ -233,7 +233,7 @@ WebInspector.ObjectPropertyTreeElement.prototype = {
applyExpression: function(expression, updateInterface)
{
- expression = expression.trimWhitespace();
+ expression = expression.trim();
var expressionLength = expression.length;
var self = this;
var callback = function(success) {
@@ -251,7 +251,7 @@ WebInspector.ObjectPropertyTreeElement.prototype = {
self.updateSiblings();
}
};
- InjectedScriptAccess.setPropertyValue(this.property.parentObjectProxy, this.property.name, expression.trimWhitespace(), callback);
+ InjectedScriptAccess.get(this.property.parentObjectProxy.injectedScriptId).setPropertyValue(this.property.parentObjectProxy, this.property.name, expression.trim(), callback);
}
}
diff --git a/WebCore/inspector/front-end/ObjectProxy.js b/WebCore/inspector/front-end/ObjectProxy.js
index f4a59a7..62517b8 100644
--- a/WebCore/inspector/front-end/ObjectProxy.js
+++ b/WebCore/inspector/front-end/ObjectProxy.js
@@ -28,9 +28,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-WebInspector.ObjectProxy = function(objectId, path, protoDepth, description, hasChildren)
+WebInspector.ObjectProxy = function(injectedScriptId, objectId, path, protoDepth, description, hasChildren)
{
this.objectId = objectId;
+ this.injectedScriptId = injectedScriptId;
this.path = path || [];
this.protoDepth = protoDepth || 0;
this.description = description;
@@ -60,7 +61,7 @@ WebInspector.ObjectProxy.getPropertiesAsync = function(objectProxy, propertiesTo
result[propertiesPayload[i].name] = propertiesPayload[i].value.description;
callback(result);
};
- InjectedScriptAccess.getProperties(objectProxy, true, createPropertiesMapThenCallback);
+ InjectedScriptAccess.get(objectProxy.injectedScriptId).getProperties(objectProxy, true, false, createPropertiesMapThenCallback);
}
WebInspector.ObjectPropertyProxy = function(name, value)
diff --git a/WebCore/inspector/front-end/Panel.js b/WebCore/inspector/front-end/Panel.js
index d816ce5..5e81e2d 100644
--- a/WebCore/inspector/front-end/Panel.js
+++ b/WebCore/inspector/front-end/Panel.js
@@ -81,7 +81,7 @@ WebInspector.Panel.prototype = {
if ("_toolbarItem" in this)
this._toolbarItem.addStyleClass("toggled-on");
- WebInspector.currentFocusElement = document.getElementById("main-panels");
+ WebInspector.currentFocusElement = this.defaultFocusedElement;
this.updateSidebarWidth();
},
@@ -97,6 +97,11 @@ WebInspector.Panel.prototype = {
this._toolbarItem.removeStyleClass("toggled-on");
},
+ get defaultFocusedElement()
+ {
+ return this.sidebarTreeElement || this.element;
+ },
+
attach: function()
{
if (!this.element.parentNode)
@@ -274,17 +279,6 @@ WebInspector.Panel.prototype = {
currentView.jumpToPreviousSearchResult();
},
- handleKeyEvent: function(event)
- {
- this.handleSidebarKeyEvent(event);
- },
-
- handleSidebarKeyEvent: function(event)
- {
- if (this.hasSidebar && this.sidebarTree)
- this.sidebarTree.handleKeyEvent(event);
- },
-
createSidebar: function(parentElement, resizerParentElement)
{
if (this.hasSidebar)
@@ -354,10 +348,6 @@ WebInspector.Panel.prototype = {
this.setSidebarWidth(width);
this.updateMainViewWidth(width);
-
- var visibleView = this.visibleView;
- if (visibleView && "resize" in visibleView)
- visibleView.resize();
},
setSidebarWidth: function(width)
@@ -369,6 +359,23 @@ WebInspector.Panel.prototype = {
updateMainViewWidth: function(width)
{
// Should be implemented by ancestors.
+ },
+
+ resize: function()
+ {
+ var visibleView = this.visibleView;
+ if (visibleView && "resize" in visibleView)
+ visibleView.resize();
+ },
+
+ canShowSourceLineForURL: function(url)
+ {
+ return false;
+ },
+
+ showSourceLineForURL: function(url, line)
+ {
+ return false;
}
}
diff --git a/WebCore/inspector/front-end/PanelEnablerView.js b/WebCore/inspector/front-end/PanelEnablerView.js
index fab6d76..5c26604 100644
--- a/WebCore/inspector/front-end/PanelEnablerView.js
+++ b/WebCore/inspector/front-end/PanelEnablerView.js
@@ -71,8 +71,6 @@ WebInspector.PanelEnablerView = function(identifier, headingText, disclaimerText
this.enableButton.textContent = buttonTitle;
this.enableButton.addEventListener("click", this._enableButtonCicked.bind(this), false);
this.choicesForm.appendChild(this.enableButton);
-
- window.addEventListener("resize", this._windowResized.bind(this), true);
}
WebInspector.PanelEnablerView.prototype = {
@@ -81,7 +79,14 @@ WebInspector.PanelEnablerView.prototype = {
this.dispatchEventToListeners("enable clicked");
},
- _windowResized: function()
+ show: function(parentElement)
+ {
+ WebInspector.View.prototype.show.call(this, parentElement);
+
+ setTimeout(this.resize.bind(this), 0);
+ },
+
+ resize: function()
{
this.imageElement.removeStyleClass("hidden");
diff --git a/WebCore/inspector/front-end/ProfileDataGridTree.js b/WebCore/inspector/front-end/ProfileDataGridTree.js
index 9a7c741..db156bf 100644
--- a/WebCore/inspector/front-end/ProfileDataGridTree.js
+++ b/WebCore/inspector/front-end/ProfileDataGridTree.js
@@ -102,6 +102,7 @@ WebInspector.ProfileDataGridNode.prototype = {
urlElement.className = "profile-node-file webkit-html-resource-link";
urlElement.href = this.profileNode.url;
urlElement.lineNumber = this.profileNode.lineNumber;
+ urlElement.preferredPanel = "scripts";
if (this.profileNode.lineNumber > 0)
urlElement.textContent = fileName + ":" + this.profileNode.lineNumber;
diff --git a/WebCore/inspector/front-end/ProfileView.js b/WebCore/inspector/front-end/ProfileView.js
index c164e94..1efa0dc 100644
--- a/WebCore/inspector/front-end/ProfileView.js
+++ b/WebCore/inspector/front-end/ProfileView.js
@@ -233,7 +233,7 @@ WebInspector.CPUProfileView.prototype = {
// Call searchCanceled since it will reset everything we need before doing a new search.
this.searchCanceled();
- query = query.trimWhitespace();
+ query = query.trim();
if (!query.length)
return;
@@ -599,6 +599,11 @@ WebInspector.CPUProfileType.prototype = {
InspectorBackend.stopProfiling();
},
+ get welcomeMessage()
+ {
+ return WebInspector.UIString("Start CPU profiling by pressing<br>the %s button on the status bar.");
+ },
+
setRecordingProfile: function(isProfiling)
{
this._recording = isProfiling;
diff --git a/WebCore/inspector/front-end/ProfilesPanel.js b/WebCore/inspector/front-end/ProfilesPanel.js
index b276ecb..dd049a1 100644
--- a/WebCore/inspector/front-end/ProfilesPanel.js
+++ b/WebCore/inspector/front-end/ProfilesPanel.js
@@ -70,6 +70,11 @@ WebInspector.ProfileType.prototype = {
return profile._profileView;
},
+ get welcomeMessage()
+ {
+ return "";
+ },
+
// Must be implemented by subclasses.
createView: function(profile)
{
@@ -111,6 +116,9 @@ WebInspector.ProfilesPanel = function()
this.profileViewStatusBarItemsContainer = document.createElement("div");
this.profileViewStatusBarItemsContainer.id = "profile-view-status-bar-items";
+ this.welcomeView = new WebInspector.WelcomeView("profiles", WebInspector.UIString("Welcome to the Profiles panel"));
+ this.element.appendChild(this.welcomeView.element);
+
this._profiles = [];
this.reset();
}
@@ -176,6 +184,7 @@ WebInspector.ProfilesPanel.prototype = {
{
for (var i = 0; i < this._profiles.length; ++i)
delete this._profiles[i]._profileView;
+ delete this.visibleView;
delete this.currentQuery;
this.searchCanceled();
@@ -195,6 +204,7 @@ WebInspector.ProfilesPanel.prototype = {
this.profileViewStatusBarItemsContainer.removeChildren();
this._updateInterface();
+ this.welcomeView.show();
},
registerProfileType: function(profileType)
@@ -203,6 +213,32 @@ WebInspector.ProfilesPanel.prototype = {
profileType.treeElement = new WebInspector.SidebarSectionTreeElement(profileType.name, null, true);
this.sidebarTree.appendChild(profileType.treeElement);
profileType.treeElement.expand();
+ this._addWelcomeMessage(profileType);
+ },
+
+ _addWelcomeMessage: function(profileType)
+ {
+ var message = profileType.welcomeMessage;
+ // Message text is supposed to have a '%s' substring as a placeholder
+ // for a status bar button. If it is there, we split the message in two
+ // parts, and insert the button between them.
+ var buttonPos = message.indexOf("%s");
+ if (buttonPos > -1) {
+ var container = document.createDocumentFragment();
+ var part1 = document.createElement("span");
+ part1.innerHTML = message.substr(0, buttonPos);
+ container.appendChild(part1);
+
+ var button = new WebInspector.StatusBarButton(profileType.buttonTooltip, profileType.buttonStyle, profileType.buttonCaption);
+ button.element.addEventListener("click", profileType.buttonClicked.bind(profileType), false);
+ container.appendChild(button.element);
+
+ var part2 = document.createElement("span");
+ part2.innerHTML = message.substr(buttonPos + 2);
+ container.appendChild(part2);
+ this.welcomeView.addMessage(container);
+ } else
+ this.welcomeView.addMessage(message);
},
_makeKey: function(text, profileTypeId)
@@ -267,6 +303,7 @@ WebInspector.ProfilesPanel.prototype = {
profile._profilesTreeElement = profileTreeElement;
sidebarParent.appendChild(profileTreeElement);
+ this.welcomeView.hide();
if (!this.visibleView)
this.showProfile(profile);
},
@@ -276,8 +313,7 @@ WebInspector.ProfilesPanel.prototype = {
if (!profile)
return;
- if (this.visibleView)
- this.visibleView.hide();
+ this.closeVisibleView();
var view = profile.__profilesPanelProfileType.viewForProfile(profile);
@@ -390,13 +426,6 @@ WebInspector.ProfilesPanel.prototype = {
}
},
- resize: function()
- {
- var visibleView = this.visibleView;
- if (visibleView && "resize" in visibleView)
- visibleView.resize();
- },
-
_updateInterface: function()
{
// FIXME: Replace ProfileType-specific button visibility changes by a single ProfileType-agnostic "combo-button" visibility change.
@@ -456,8 +485,10 @@ WebInspector.ProfilesPanel.prototype = {
updateMainViewWidth: function(width)
{
+ this.welcomeView.element.style.left = width + "px";
this.profileViews.style.left = width + "px";
this.profileViewStatusBarItemsContainer.style.left = width + "px";
+ this.resize();
}
}
diff --git a/WebCore/inspector/front-end/PropertiesSection.js b/WebCore/inspector/front-end/PropertiesSection.js
index a4b2fba..5ced9ef 100644
--- a/WebCore/inspector/front-end/PropertiesSection.js
+++ b/WebCore/inspector/front-end/PropertiesSection.js
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2009 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,118 +29,15 @@
WebInspector.PropertiesSection = function(title, subtitle)
{
- this.element = document.createElement("div");
- this.element.className = "section";
-
- this.headerElement = document.createElement("div");
- this.headerElement.className = "header";
-
- this.titleElement = document.createElement("div");
- this.titleElement.className = "title";
-
- this.subtitleElement = document.createElement("div");
- this.subtitleElement.className = "subtitle";
-
- this.headerElement.appendChild(this.subtitleElement);
- this.headerElement.appendChild(this.titleElement);
-
- this.headerElement.addEventListener("click", this.toggleExpanded.bind(this), false);
+ WebInspector.Section.call(this, title, subtitle);
this.propertiesElement = document.createElement("ol");
- this.propertiesElement.className = "properties";
+ this.propertiesElement.className = "properties source-code";
+ this.propertiesElement.tabIndex = 0;
this.propertiesTreeOutline = new TreeOutline(this.propertiesElement);
this.propertiesTreeOutline.section = this;
- this.element.appendChild(this.headerElement);
this.element.appendChild(this.propertiesElement);
-
- this.title = title;
- this.subtitle = subtitle;
- this._expanded = false;
}
-WebInspector.PropertiesSection.prototype = {
- get title()
- {
- return this._title;
- },
-
- set title(x)
- {
- if (this._title === x)
- return;
- this._title = x;
-
- if (x instanceof Node) {
- this.titleElement.removeChildren();
- this.titleElement.appendChild(x);
- } else
- this.titleElement.textContent = x;
- },
-
- get subtitle()
- {
- return this._subtitle;
- },
-
- set subtitle(x)
- {
- if (this._subtitle === x)
- return;
- this._subtitle = x;
- this.subtitleElement.innerHTML = x;
- },
-
- get expanded()
- {
- return this._expanded;
- },
-
- set expanded(x)
- {
- if (x)
- this.expand();
- else
- this.collapse();
- },
-
- get populated()
- {
- return this._populated;
- },
-
- set populated(x)
- {
- this._populated = x;
- if (!x && this.onpopulate && this._expanded) {
- this.onpopulate(this);
- this._populated = true;
- }
- },
-
- expand: function()
- {
- if (this._expanded)
- return;
- this._expanded = true;
- this.element.addStyleClass("expanded");
-
- if (!this._populated && this.onpopulate) {
- this.onpopulate(this);
- this._populated = true;
- }
- },
-
- collapse: function()
- {
- if (!this._expanded)
- return;
- this._expanded = false;
- this.element.removeStyleClass("expanded");
- },
-
- toggleExpanded: function()
- {
- this.expanded = !this.expanded;
- }
-}
+WebInspector.PropertiesSection.prototype.__proto__ = WebInspector.Section.prototype;
diff --git a/WebCore/inspector/front-end/PropertiesSidebarPane.js b/WebCore/inspector/front-end/PropertiesSidebarPane.js
index d84874e..857d9a7 100644
--- a/WebCore/inspector/front-end/PropertiesSidebarPane.js
+++ b/WebCore/inspector/front-end/PropertiesSidebarPane.js
@@ -50,13 +50,13 @@ WebInspector.PropertiesSidebarPane.prototype = {
// Get array of prototype user-friendly names.
for (var i = 0; i < prototypes.length; ++i) {
- var prototype = new WebInspector.ObjectProxy(node.id, [], i);
+ var prototype = new WebInspector.ObjectProxy(node.injectedScriptId, node.id, [], i);
var section = new WebInspector.ObjectPropertiesSection(prototype, prototypes[i], WebInspector.UIString("Prototype"));
self.sections.push(section);
body.appendChild(section.element);
}
};
- InjectedScriptAccess.getPrototypes(node.id, callback);
+ InjectedScriptAccess.get(node.injectedScriptId).getPrototypes(node.id, callback);
}
}
diff --git a/WebCore/inspector/front-end/Resource.js b/WebCore/inspector/front-end/Resource.js
index d23b5da..9860300 100644
--- a/WebCore/inspector/front-end/Resource.js
+++ b/WebCore/inspector/front-end/Resource.js
@@ -26,27 +26,17 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-WebInspector.Resource = function(requestHeaders, url, documentURL, domain, path, lastPathComponent, identifier, mainResource, cached, requestMethod, requestFormData)
+WebInspector.Resource = function(identifier, url)
{
this.identifier = identifier;
-
- this.startTime = -1;
- this.endTime = -1;
- this.mainResource = mainResource;
- this.requestHeaders = requestHeaders;
- this.url = url;
- this.documentURL = documentURL;
- this.domain = domain;
- this.path = path;
- this.lastPathComponent = lastPathComponent;
- this.cached = cached;
- this.requestMethod = requestMethod || "";
- this.requestFormData = requestFormData || "";
-
- this.category = WebInspector.resourceCategories.other;
+ this._url = url;
+ this._startTime = -1;
+ this._endTime = -1;
+ this._requestMethod = "";
+ this._requestFormData = "";
+ this._category = WebInspector.resourceCategories.other;
}
-
WebInspector.Resource.StatusText = {
100: "Continue",
101: "Switching Protocols",
@@ -323,7 +313,6 @@ WebInspector.Resource.prototype = {
this._finished = x;
if (x) {
- this._checkTips();
this._checkWarnings();
this.dispatchEventToListeners("finished");
}
@@ -539,58 +528,6 @@ WebInspector.Resource.prototype = {
this._warnings = x;
},
- get tips()
- {
- if (!("_tips" in this))
- this._tips = {};
- return this._tips;
- },
-
- _addTip: function(tip)
- {
- if (tip.id in this.tips)
- return;
-
- this.tips[tip.id] = tip;
-
- // FIXME: Re-enable this code once we have a scope bar in the Console.
- // Otherwise, we flood the Console with too many tips.
- /*
- var msg = new WebInspector.ConsoleMessage(WebInspector.ConsoleMessage.MessageSource.Other,
- WebInspector.ConsoleMessage.MessageType.Log, WebInspector.ConsoleMessage.MessageLevel.Tip,
- -1, this.url, null, 1, tip.message);
- WebInspector.console.addMessage(msg);
- */
- },
-
- _checkTips: function()
- {
- for (var tip in WebInspector.Tips)
- this._checkTip(WebInspector.Tips[tip]);
- },
-
- _checkTip: function(tip)
- {
- var addTip = false;
- switch (tip.id) {
- case WebInspector.Tips.ResourceNotCompressed.id:
- addTip = this._shouldCompress();
- break;
- }
-
- if (addTip)
- this._addTip(tip);
- },
-
- _shouldCompress: function()
- {
- return WebInspector.Resource.Type.isTextType(this.type)
- && this.domain
- && !("Content-Encoding" in this.responseHeaders)
- && this.contentLength !== undefined
- && this.contentLength >= 512;
- },
-
_mimeTypeIsConsistentWithType: function()
{
if (typeof this.type === "undefined"
@@ -633,64 +570,40 @@ WebInspector.Resource.prototype.__proto__ = WebInspector.Object.prototype;
WebInspector.Resource.CompareByStartTime = function(a, b)
{
- if (a.startTime < b.startTime)
- return -1;
- if (a.startTime > b.startTime)
- return 1;
- return 0;
+ return a.startTime - b.startTime;
}
WebInspector.Resource.CompareByResponseReceivedTime = function(a, b)
{
- if (a.responseReceivedTime === -1 && b.responseReceivedTime !== -1)
- return 1;
- if (a.responseReceivedTime !== -1 && b.responseReceivedTime === -1)
- return -1;
- if (a.responseReceivedTime < b.responseReceivedTime)
- return -1;
- if (a.responseReceivedTime > b.responseReceivedTime)
- return 1;
- return 0;
+ var aVal = a.responseReceivedTime;
+ var bVal = b.responseReceivedTime;
+ if (aVal === -1 ^ bVal === -1)
+ return bVal - aVal;
+ return aVal - bVal;
}
WebInspector.Resource.CompareByEndTime = function(a, b)
{
- if (a.endTime === -1 && b.endTime !== -1)
- return 1;
- if (a.endTime !== -1 && b.endTime === -1)
- return -1;
- if (a.endTime < b.endTime)
- return -1;
- if (a.endTime > b.endTime)
- return 1;
- return 0;
+ var aVal = a.endTime;
+ var bVal = b.endTime;
+ if (aVal === -1 ^ bVal === -1)
+ return bVal - aVal;
+ return aVal - bVal;
}
WebInspector.Resource.CompareByDuration = function(a, b)
{
- if (a.duration < b.duration)
- return -1;
- if (a.duration > b.duration)
- return 1;
- return 0;
+ return a.duration - b.duration;
}
WebInspector.Resource.CompareByLatency = function(a, b)
{
- if (a.latency < b.latency)
- return -1;
- if (a.latency > b.latency)
- return 1;
- return 0;
+ return a.latency - b.latency;
}
WebInspector.Resource.CompareBySize = function(a, b)
{
- if (a.contentLength < b.contentLength)
- return -1;
- if (a.contentLength > b.contentLength)
- return 1;
- return 0;
+ return a.contentLength - b.contentLength;
}
WebInspector.Resource.StatusTextForCode = function(code)
diff --git a/WebCore/inspector/front-end/ResourceView.js b/WebCore/inspector/front-end/ResourceView.js
index 8175c2f..334847e 100644
--- a/WebCore/inspector/front-end/ResourceView.js
+++ b/WebCore/inspector/front-end/ResourceView.js
@@ -35,6 +35,20 @@ WebInspector.ResourceView = function(resource)
this.resource = resource;
+ this.tabsElement = document.createElement("div");
+ this.tabsElement.className = "scope-bar";
+ this.element.appendChild(this.tabsElement);
+
+ this.headersTabElement = document.createElement("li");
+ this.headersTabElement.textContent = WebInspector.UIString("Headers");
+ this.contentTabElement = document.createElement("li");
+ this.contentTabElement.textContent = WebInspector.UIString("Content");
+ this.tabsElement.appendChild(this.headersTabElement);
+ this.tabsElement.appendChild(this.contentTabElement);
+
+ this.headersTabElement.addEventListener("click", this._selectHeadersTab.bind(this), false);
+ this.contentTabElement.addEventListener("click", this._selectContentTab.bind(this), false);
+
this.headersElement = document.createElement("div");
this.headersElement.className = "resource-view-headers";
this.element.appendChild(this.headersElement);
@@ -54,13 +68,16 @@ WebInspector.ResourceView = function(resource)
this.urlTreeElement.selectable = false;
this.headersTreeOutline.appendChild(this.urlTreeElement);
- this.httpInformationTreeElement = new TreeElement("", null, true);
- this.httpInformationTreeElement.expanded = false;
- this.httpInformationTreeElement.selectable = false;
- this.headersTreeOutline.appendChild(this.httpInformationTreeElement);
+ this.requestMethodTreeElement = new TreeElement("", null, false);
+ this.requestMethodTreeElement.selectable = false;
+ this.headersTreeOutline.appendChild(this.requestMethodTreeElement);
+
+ this.statusCodeTreeElement = new TreeElement("", null, false);
+ this.statusCodeTreeElement.selectable = false;
+ this.headersTreeOutline.appendChild(this.statusCodeTreeElement);
this.requestHeadersTreeElement = new TreeElement("", null, true);
- this.requestHeadersTreeElement.expanded = false;
+ this.requestHeadersTreeElement.expanded = true;
this.requestHeadersTreeElement.selectable = false;
this.headersTreeOutline.appendChild(this.requestHeadersTreeElement);
@@ -68,25 +85,25 @@ WebInspector.ResourceView = function(resource)
this._decodeRequestParameters = true;
this.queryStringTreeElement = new TreeElement("", null, true);
- this.queryStringTreeElement.expanded = false;
+ this.queryStringTreeElement.expanded = true;
this.queryStringTreeElement.selectable = false;
this.queryStringTreeElement.hidden = true;
this.headersTreeOutline.appendChild(this.queryStringTreeElement);
this.formDataTreeElement = new TreeElement("", null, true);
- this.formDataTreeElement.expanded = false;
+ this.formDataTreeElement.expanded = true;
this.formDataTreeElement.selectable = false;
this.formDataTreeElement.hidden = true;
this.headersTreeOutline.appendChild(this.formDataTreeElement);
this.requestPayloadTreeElement = new TreeElement(WebInspector.UIString("Request Payload"), null, true);
- this.requestPayloadTreeElement.expanded = false;
+ this.requestPayloadTreeElement.expanded = true;
this.requestPayloadTreeElement.selectable = false;
this.requestPayloadTreeElement.hidden = true;
this.headersTreeOutline.appendChild(this.requestPayloadTreeElement);
this.responseHeadersTreeElement = new TreeElement("", null, true);
- this.responseHeadersTreeElement.expanded = false;
+ this.responseHeadersTreeElement.expanded = true;
this.responseHeadersTreeElement.selectable = false;
this.headersTreeOutline.appendChild(this.responseHeadersTreeElement);
@@ -101,55 +118,77 @@ WebInspector.ResourceView = function(resource)
this._refreshRequestHeaders();
this._refreshResponseHeaders();
this._refreshHTTPInformation();
+ this._selectTab();
}
WebInspector.ResourceView.prototype = {
- get headersVisible()
+ attach: function()
{
- return this._headersVisible;
+ if (!this.element.parentNode) {
+ var parentElement = (document.getElementById("resource-views") || document.getElementById("script-resource-views"));
+ if (parentElement)
+ parentElement.appendChild(this.element);
+ }
+ },
+
+ show: function(parentElement)
+ {
+ WebInspector.View.prototype.show.call(this, parentElement);
+ this._selectTab();
},
set headersVisible(x)
{
if (x === this._headersVisible)
return;
-
this._headersVisible = x;
-
if (x)
- this.element.addStyleClass("headers-visible");
+ this.element.addStyleClass("headers-visible");
else
- this.element.removeStyleClass("headers-visible");
+ this.element.removeStyleClass("headers-visible");
+ this._selectTab();
},
- attach: function()
+ _selectTab: function()
{
- if (!this.element.parentNode) {
- var parentElement = (document.getElementById("resource-views") || document.getElementById("script-resource-views"));
- if (parentElement)
- parentElement.appendChild(this.element);
- }
+ if (this._headersVisible) {
+ if (WebInspector.settings.resourceViewTab === "headers")
+ this._selectHeadersTab();
+ else
+ this._selectContentTab();
+ } else
+ this._innerSelectContentTab();
},
- _refreshURL: function()
+ _selectHeadersTab: function()
{
- var url = this.resource.url;
- var statusCodeImage = "";
- if (this.resource.statusCode) {
- var statusImageSource = "";
-
- if (this.resource.statusCode < 300)
- statusImageSource = "Images/successGreenDot.png";
- else if (this.resource.statusCode < 400)
- statusImageSource = "Images/warningOrangeDot.png";
- else
- statusImageSource = "Images/errorRedDot.png";
-
- statusCodeImage = "<img class=\"resource-status-image\" src=\"" + statusImageSource + "\" title=\"" + WebInspector.Resource.StatusTextForCode(this.resource.statusCode) + "\">";
- }
+ WebInspector.settings.resourceViewTab = "headers";
+ this.headersTabElement.addStyleClass("selected");
+ this.contentTabElement.removeStyleClass("selected");
+ this.headersElement.removeStyleClass("hidden");
+ this.contentElement.addStyleClass("hidden");
+ },
- this.urlTreeElement.title = statusCodeImage + "<span class=\"resource-url\">" + url.escapeHTML() + "</span>";
- this._refreshQueryString();
+ _selectContentTab: function()
+ {
+ WebInspector.settings.resourceViewTab = "content";
+ this._innerSelectContentTab();
+ },
+
+ _innerSelectContentTab: function()
+ {
+ this.contentTabElement.addStyleClass("selected");
+ this.headersTabElement.removeStyleClass("selected");
+ this.contentElement.removeStyleClass("hidden");
+ this.headersElement.addStyleClass("hidden");
+ if ("resize" in this)
+ this.resize();
+ },
+
+ _refreshURL: function()
+ {
+ this.urlTreeElement.title = "<div class=\"header-name\">" + WebInspector.UIString("Request URL") + ":</div>" +
+ "<div class=\"header-value source-code\">" + this.resource.url.escapeHTML() + "</div>";
},
_refreshQueryString: function()
@@ -195,7 +234,7 @@ WebInspector.ResourceView.prototype = {
this.requestPayloadTreeElement.removeChildren();
var title = "<div class=\"header-name\">&nbsp;</div>";
- title += "<div class=\"raw-form-data header-value\">" + formData.escapeHTML() + "</div>";
+ title += "<div class=\"raw-form-data header-value source-code\">" + formData.escapeHTML() + "</div>";
var parmTreeElement = new TreeElement(title, null, false);
parmTreeElement.selectable = false;
this.requestPayloadTreeElement.appendChild(parmTreeElement);
@@ -238,7 +277,7 @@ WebInspector.ResourceView.prototype = {
valueEscaped += " <span class=\"error-message\">" + WebInspector.UIString("(unable to decode value)").escapeHTML() + "</span>";
var title = "<div class=\"header-name\">" + key.escapeHTML() + ":</div>";
- title += "<div class=\"header-value\">" + valueEscaped + "</div>";
+ title += "<div class=\"header-value source-code\">" + valueEscaped + "</div>";
var parmTreeElement = new TreeElement(title, null, false);
parmTreeElement.selectable = false;
@@ -277,28 +316,27 @@ WebInspector.ResourceView.prototype = {
_refreshHTTPInformation: function()
{
- const listElements = 2;
-
- var headerElement = this.httpInformationTreeElement;
- headerElement.removeChildren();
- headerElement.hidden = !this.resource.statusCode;
+ var requestMethodElement = this.requestMethodTreeElement;
+ requestMethodElement.hidden = !this.resource.statusCode;
+ var statusCodeElement = this.statusCodeTreeElement;
+ statusCodeElement.hidden = !this.resource.statusCode;
+ var statusCodeImage = "";
if (this.resource.statusCode) {
- headerElement.title = WebInspector.UIString("HTTP Information") + "<span class=\"header-count\">" + WebInspector.UIString(" (%d)", listElements) + "</span>";
-
- var title = "<div class=\"header-name\">" + WebInspector.UIString("Request Method") + ":</div>";
- title += "<div class=\"header-value\">" + this.resource.requestMethod + "</div>"
-
- var headerTreeElement = new TreeElement(title, null, false);
- headerTreeElement.selectable = false;
- headerElement.appendChild(headerTreeElement);
-
- title = "<div class=\"header-name\">" + WebInspector.UIString("Status Code") + ":</div>";
- title += "<div class=\"header-value\">" + WebInspector.Resource.StatusTextForCode(this.resource.statusCode) + "</div>"
-
- headerTreeElement = new TreeElement(title, null, false);
- headerTreeElement.selectable = false;
- headerElement.appendChild(headerTreeElement);
+ var statusImageSource = "";
+ if (this.resource.statusCode < 300)
+ statusImageSource = "Images/successGreenDot.png";
+ else if (this.resource.statusCode < 400)
+ statusImageSource = "Images/warningOrangeDot.png";
+ else
+ statusImageSource = "Images/errorRedDot.png";
+ statusCodeImage = "<img class=\"resource-status-image\" src=\"" + statusImageSource + "\" title=\"" + WebInspector.Resource.StatusTextForCode(this.resource.statusCode) + "\">";
+
+ requestMethodElement.title = "<div class=\"header-name\">" + WebInspector.UIString("Request Method") + ":</div>" +
+ "<div class=\"header-value source-code\">" + this.resource.requestMethod + "</div>";
+
+ statusCodeElement.title = "<div class=\"header-name\">" + WebInspector.UIString("Status Code") + ":</div>" +
+ statusCodeImage + "<div class=\"header-value source-code\">" + WebInspector.Resource.StatusTextForCode(this.resource.statusCode) + "</div>";
}
},
@@ -313,7 +351,7 @@ WebInspector.ResourceView.prototype = {
var length = headers.length;
for (var i = 0; i < length; ++i) {
var title = "<div class=\"header-name\">" + headers[i].header.escapeHTML() + ":</div>";
- title += "<div class=\"header-value\">" + headers[i].value.escapeHTML() + "</div>"
+ title += "<div class=\"header-value source-code\">" + headers[i].value.escapeHTML() + "</div>"
var headerTreeElement = new TreeElement(title, null, false);
headerTreeElement.selectable = false;
diff --git a/WebCore/inspector/front-end/ResourcesPanel.js b/WebCore/inspector/front-end/ResourcesPanel.js
index 60c1895..e0c5521 100644
--- a/WebCore/inspector/front-end/ResourcesPanel.js
+++ b/WebCore/inspector/front-end/ResourcesPanel.js
@@ -141,18 +141,21 @@ WebInspector.ResourcesPanel.prototype = {
_createStatusbarButtons: function()
{
this.largerResourcesButton = new WebInspector.StatusBarButton(WebInspector.UIString("Use small resource rows."), "resources-larger-resources-status-bar-item");
- this.largerResourcesButton.toggled = Preferences.resourcesLargeRows;
- this.largerResourcesButton.addEventListener("click", this._toggleLargerResources.bind(this), false);
- if (!Preferences.resourcesLargeRows) {
- Preferences.resourcesLargeRows = !Preferences.resourcesLargeRows;
- this._toggleLargerResources(); // this will toggle the preference back to the original
- }
+ WebInspector.settings.addEventListener("loaded", this._settingsLoaded, this);
+ this.largerResourcesButton.addEventListener("click", this._toggleLargerResources.bind(this), false);
this.sortingSelectElement = document.createElement("select");
this.sortingSelectElement.className = "status-bar-item";
this.sortingSelectElement.addEventListener("change", this._changeSortingFunction.bind(this), false);
},
+ _settingsLoaded: function()
+ {
+ this.largerResourcesButton.toggled = WebInspector.settings.resourcesLargeRows;
+ if (!WebInspector.settings.resourcesLargeRows)
+ this._setLargerResources(WebInspector.settings.resourcesLargeRows);
+ },
+
get mainResourceLoadTime()
{
return this._mainResourceLoadTime || -1;
@@ -189,10 +192,11 @@ WebInspector.ResourcesPanel.prototype = {
WebInspector.AbstractTimelinePanel.prototype.show.call(this);
var visibleView = this.visibleView;
- if (visibleView) {
- visibleView.headersVisible = true;
- visibleView.show(this.viewsContainerElement);
- }
+ if (this.visibleResource) {
+ this.visibleView.headersVisible = true;
+ this.visibleView.show(this.viewsContainerElement);
+ } else if (visibleView)
+ visibleView.show();
// Hide any views that are visible that are not this panel's current visible view.
// This can happen when a ResourceView is visible in the Scripts panel then switched
@@ -207,15 +211,6 @@ WebInspector.ResourcesPanel.prototype = {
}
},
- resize: function()
- {
- WebInspector.AbstractTimelinePanel.prototype.resize.call(this);
-
- var visibleView = this.visibleView;
- if (visibleView && "resize" in visibleView)
- visibleView.resize();
- },
-
get searchableViews()
{
var views = [];
@@ -284,7 +279,7 @@ WebInspector.ResourcesPanel.prototype = {
{
if (this.visibleResource)
return this.visibleResource._resourcesView;
- return null;
+ return InspectorBackend.resourceTrackingEnabled() ? null : this.panelEnablerView;
},
get sortingFunction()
@@ -456,6 +451,16 @@ WebInspector.ResourcesPanel.prototype = {
newView.show(oldView.element.parentNode);
},
+ canShowSourceLineForURL: function(url)
+ {
+ return !!WebInspector.resourceForURL(url);
+ },
+
+ showSourceLineForURL: function(url, line)
+ {
+ this.showResource(WebInspector.resourceForURL(url), line);
+ },
+
showResource: function(resource, line)
{
if (!resource)
@@ -614,19 +619,21 @@ WebInspector.ResourcesPanel.prototype = {
if (!this.itemsTreeElement._childrenListNode)
return;
- this.itemsTreeElement.smallChildren = !this.itemsTreeElement.smallChildren;
- Preferences.resourcesLargeRows = !Preferences.resourcesLargeRows;
- InspectorFrontendHost.setSetting("resources-large-rows", Preferences.resourcesLargeRows);
+ WebInspector.settings.resourcesLargeRows = !WebInspector.settings.resourcesLargeRows;
+ this._setLargerResources(this.itemsTreeElement.smallChildren);
+ },
- if (this.itemsTreeElement.smallChildren) {
+ _setLargerResources: function(enabled)
+ {
+ this.largerResourcesButton.toggled = enabled;
+ this.itemsTreeElement.smallChildren = !enabled;
+ if (!enabled) {
this.itemsGraphsElement.addStyleClass("small");
this.largerResourcesButton.title = WebInspector.UIString("Use large resource rows.");
- this.largerResourcesButton.toggled = false;
this.adjustScrollPosition();
} else {
this.itemsGraphsElement.removeStyleClass("small");
this.largerResourcesButton.title = WebInspector.UIString("Use small resource rows.");
- this.largerResourcesButton.toggled = true;
}
},
@@ -669,8 +676,10 @@ WebInspector.ResourcesPanel.prototype = {
updateMainViewWidth: function(width)
{
- WebInspector.AbstractTimelinePanel.prototype.updateMainViewWidth.call(this, width);
this.viewsContainerElement.style.left = width + "px";
+
+ WebInspector.AbstractTimelinePanel.prototype.updateMainViewWidth.call(this, width);
+ this.resize();
},
_enableResourceTracking: function()
@@ -701,6 +710,13 @@ WebInspector.ResourcesPanel.prototype = {
WebInspector.ResourcesPanel.prototype.__proto__ = WebInspector.AbstractTimelinePanel.prototype;
+WebInspector.getResourceContent = function(identifier, callback)
+{
+ InspectorBackend.getResourceContent(WebInspector.Callback.wrap(callback), identifier);
+}
+
+WebInspector.didGetResourceContent = WebInspector.Callback.processCallback;
+
WebInspector.ResourceTimeCalculator = function(startAtZero)
{
WebInspector.AbstractTimelineCalculator.call(this);
@@ -969,7 +985,7 @@ WebInspector.ResourceSidebarTreeElement.prototype = {
ondblclick: function(event)
{
- InjectedScriptAccess.openInInspectedWindow(this.resource.url, function() {});
+ InjectedScriptAccess.getDefault().openInInspectedWindow(this.resource.url, function() {});
},
ondragstart: function(event) {
@@ -1172,14 +1188,19 @@ WebInspector.ResourceGraph.prototype = {
this._labelRightElement.removeStyleClass("hidden");
const labelPadding = 10;
- const rightBarWidth = (this._barRightElement.offsetWidth - labelPadding);
- const leftBarWidth = ((this._barLeftElement.offsetWidth - this._barRightElement.offsetWidth) - labelPadding);
+ const barRightElementOffsetWidth = this._barRightElement.offsetWidth;
+ const barLeftElementOffsetWidth = this._barLeftElement.offsetWidth;
+ const rightBarWidth = (barRightElementOffsetWidth - labelPadding);
+ const leftBarWidth = ((barLeftElementOffsetWidth - barRightElementOffsetWidth) - labelPadding);
+ const labelLeftElementOffsetWidth = this._labelLeftElement.offsetWidth;
+ const labelRightElementOffsetWidth = this._labelRightElement.offsetWidth;
- var labelBefore = (this._labelLeftElement.offsetWidth > leftBarWidth);
- var labelAfter = (this._labelRightElement.offsetWidth > rightBarWidth);
+ const labelBefore = (labelLeftElementOffsetWidth > leftBarWidth);
+ const labelAfter = (labelRightElementOffsetWidth > rightBarWidth);
+ const graphElementOffsetWidth = this._graphElement.offsetWidth;
if (labelBefore) {
- if ((this._graphElement.offsetWidth * (this._percentages.start / 100)) < (this._labelLeftElement.offsetWidth + 10))
+ if ((graphElementOffsetWidth * (this._percentages.start / 100)) < (labelLeftElementOffsetWidth + 10))
this._labelLeftElement.addStyleClass("hidden");
this._labelLeftElement.style.setProperty("right", (100 - this._percentages.start) + "%");
this._labelLeftElement.addStyleClass("before");
@@ -1189,7 +1210,7 @@ WebInspector.ResourceGraph.prototype = {
}
if (labelAfter) {
- if ((this._graphElement.offsetWidth * ((100 - this._percentages.end) / 100)) < (this._labelRightElement.offsetWidth + 10))
+ if ((graphElementOffsetWidth * ((100 - this._percentages.end) / 100)) < (labelRightElementOffsetWidth + 10))
this._labelRightElement.addStyleClass("hidden");
this._labelRightElement.style.setProperty("left", this._percentages.end + "%");
this._labelRightElement.addStyleClass("after");
diff --git a/WebCore/inspector/front-end/ScriptView.js b/WebCore/inspector/front-end/ScriptView.js
index 38157ac..cf7f1b1 100644
--- a/WebCore/inspector/front-end/ScriptView.js
+++ b/WebCore/inspector/front-end/ScriptView.js
@@ -33,10 +33,7 @@ WebInspector.ScriptView = function(script)
this._frameNeedsSetup = true;
this._sourceFrameSetup = false;
-
- this.sourceFrame = new WebInspector.SourceFrame(null, this._addBreakpoint.bind(this));
-
- this.element.appendChild(this.sourceFrame.element);
+ this.sourceFrame = new WebInspector.SourceFrame(this.element, this._addBreakpoint.bind(this));
}
WebInspector.ScriptView.prototype = {
@@ -44,12 +41,8 @@ WebInspector.ScriptView.prototype = {
{
WebInspector.View.prototype.show.call(this, parentElement);
this.setupSourceFrameIfNeeded();
- },
-
- hide: function()
- {
- WebInspector.View.prototype.hide.call(this);
- this._currentSearchResultIndex = -1;
+ this.sourceFrame.visible = true;
+ this.resize();
},
setupSourceFrameIfNeeded: function()
@@ -59,13 +52,9 @@ WebInspector.ScriptView.prototype = {
this.attach();
- if (!InspectorFrontendHost.addSourceToFrame("text/javascript", this.script.source, this.sourceFrame.element))
- return;
-
+ this.sourceFrame.setContent("text/javascript", this.script.source);
+ this._sourceFrameSetup = true;
delete this._frameNeedsSetup;
-
- this.sourceFrame.addEventListener("syntax highlighting complete", this._syntaxHighlightingComplete, this);
- this.sourceFrame.syntaxHighlightJavascript();
},
attach: function()
@@ -83,6 +72,7 @@ WebInspector.ScriptView.prototype = {
// The follow methods are pulled from SourceView, since they are
// generic and work with ScriptView just fine.
+ hide: WebInspector.SourceView.prototype.hide,
revealLine: WebInspector.SourceView.prototype.revealLine,
highlightLine: WebInspector.SourceView.prototype.highlightLine,
addMessage: WebInspector.SourceView.prototype.addMessage,
@@ -97,7 +87,7 @@ WebInspector.ScriptView.prototype = {
showingLastSearchResult: WebInspector.SourceView.prototype.showingLastSearchResult,
_jumpToSearchResult: WebInspector.SourceView.prototype._jumpToSearchResult,
_sourceFrameSetupFinished: WebInspector.SourceView.prototype._sourceFrameSetupFinished,
- _syntaxHighlightingComplete: WebInspector.SourceView.prototype._syntaxHighlightingComplete
+ resize: WebInspector.SourceView.prototype.resize
}
WebInspector.ScriptView.prototype.__proto__ = WebInspector.View.prototype;
diff --git a/WebCore/inspector/front-end/ScriptsPanel.js b/WebCore/inspector/front-end/ScriptsPanel.js
index 8b31a8b..da24ed2 100644
--- a/WebCore/inspector/front-end/ScriptsPanel.js
+++ b/WebCore/inspector/front-end/ScriptsPanel.js
@@ -56,7 +56,6 @@ WebInspector.ScriptsPanel = function()
this.filesSelectElement.className = "status-bar-item";
this.filesSelectElement.id = "scripts-files";
this.filesSelectElement.addEventListener("change", this._changeVisibleFile.bind(this), false);
- this.filesSelectElement.handleKeyEvent = this.handleKeyEvent.bind(this);
this.topStatusBar.appendChild(this.filesSelectElement);
this.functionsSelectElement = document.createElement("select");
@@ -155,7 +154,7 @@ WebInspector.ScriptsPanel = function()
this.enableToggleButton = new WebInspector.StatusBarButton("", "enable-toggle-status-bar-item");
this.enableToggleButton.addEventListener("click", this._toggleDebugging.bind(this), false);
- this.pauseOnExceptionButton = new WebInspector.StatusBarButton("", "scripts-pause-on-exceptions-status-bar-item");
+ this.pauseOnExceptionButton = new WebInspector.StatusBarButton("", "scripts-pause-on-exceptions-status-bar-item", 3);
this.pauseOnExceptionButton.addEventListener("click", this._togglePauseOnExceptions.bind(this), false);
this._breakpointsURLMap = {};
@@ -195,6 +194,13 @@ WebInspector.ScriptsPanel = function()
this.reset();
}
+// Keep these in sync with WebCore::JavaScriptDebugServer
+WebInspector.ScriptsPanel.PauseOnExceptionsState = {
+ DontPauseOnExceptions : 0,
+ PauseOnAllExceptions : 1,
+ PauseOnUncaughtExceptions: 2
+};
+
WebInspector.ScriptsPanel.prototype = {
toolbarItemClass: "scripts",
@@ -208,6 +214,11 @@ WebInspector.ScriptsPanel.prototype = {
return [this.enableToggleButton.element, this.pauseOnExceptionButton.element];
},
+ get defaultFocusedElement()
+ {
+ return this.filesSelectElement;
+ },
+
get paused()
{
return this._paused;
@@ -223,7 +234,6 @@ WebInspector.ScriptsPanel.prototype = {
this.visibleView.headersVisible = false;
this.visibleView.show(this.viewsContainerElement);
}
-
// Hide any views that are visible that are not this panel's current visible view.
// This can happen when a ResourceView is visible in the Resources panel then switched
// to the this panel.
@@ -306,6 +316,11 @@ WebInspector.ScriptsPanel.prototype = {
return this._sourceIDMap[id];
},
+ scriptForURL: function(url)
+ {
+ return this._scriptsForURLsInFilesSelect[url];
+ },
+
addBreakpoint: function(breakpoint)
{
this.sidebarPanes.breakpoints.addBreakpoint(breakpoint);
@@ -391,7 +406,7 @@ WebInspector.ScriptsPanel.prototype = {
if (result)
callback(result.value, result.isException);
}
- InjectedScriptAccess.evaluateInCallFrame(callFrame.id, code, objectGroup, evalCallback);
+ InjectedScriptAccess.get(callFrame.injectedScriptId).evaluateInCallFrame(callFrame.id, code, objectGroup, evalCallback);
},
debuggerPaused: function(callFrames)
@@ -493,9 +508,19 @@ WebInspector.ScriptsPanel.prototype = {
x.show(this.viewsContainerElement);
},
- canShowResource: function(resource)
+ canShowSourceLineForURL: function(url)
{
- return resource && resource.scripts.length && InspectorBackend.debuggerEnabled();
+ return InspectorBackend.debuggerEnabled() &&
+ !!(WebInspector.resourceForURL(url) || this.scriptForURL(url));
+ },
+
+ showSourceLineForURL: function(url, line)
+ {
+ var resource = WebInspector.resourceForURL(url);
+ if (resource)
+ this.showResource(resource, line);
+ else
+ this.showScript(this.scriptForURL(url), line);
},
showScript: function(script, line)
@@ -515,17 +540,15 @@ WebInspector.ScriptsPanel.prototype = {
this._showScriptOrResource((view.resource || view.script));
},
- handleKeyEvent: function(event)
+ handleShortcut: function(event)
{
var shortcut = WebInspector.KeyboardShortcut.makeKeyFromEvent(event);
var handler = this._shortcuts[shortcut];
if (handler) {
handler(event);
- event.preventDefault();
event.handled = true;
- } else {
- this.sidebarPanes.callstack.handleKeyEvent(event);
- }
+ } else
+ this.sidebarPanes.callstack.handleShortcut(event);
},
scriptViewForScript: function(script)
@@ -587,7 +610,7 @@ WebInspector.ScriptsPanel.prototype = {
if (!WebInspector.panels.resources)
return null;
view = WebInspector.panels.resources.resourceViewForResource(scriptOrResource);
- view.headersVisible = false;
+ view.headersVisible = false;
if (scriptOrResource.url in this._breakpointsURLMap) {
var sourceFrame = this._sourceFrameForScriptOrResource(scriptOrResource);
@@ -606,7 +629,7 @@ WebInspector.ScriptsPanel.prototype = {
var url = scriptOrResource.url || scriptOrResource.sourceURL;
if (url && !options.initialLoad)
- InspectorFrontendHost.setSetting("LastViewedScriptFile", url);
+ WebInspector.settings.lastViewedScriptFile = url;
if (!options.fromBackForwardAction) {
var oldIndex = this._currentBackForwardIndex;
@@ -649,7 +672,7 @@ WebInspector.ScriptsPanel.prototype = {
console.assert(option);
} else {
- var script = this._scriptsForURLsInFilesSelect[url];
+ var script = this.scriptForURL(url);
if (script)
option = script.filesSelectOption;
}
@@ -709,7 +732,7 @@ WebInspector.ScriptsPanel.prototype = {
else {
// if not first item, check to see if this was the last viewed
var url = option.representedObject.url || option.representedObject.sourceURL;
- var lastURL = InspectorFrontendHost.setting("LastViewedScriptFile");
+ var lastURL = WebInspector.settings.lastViewedScriptFile;
if (url && url === lastURL)
this._showScriptOrResource(option.representedObject, {initialLoad: true});
}
@@ -776,18 +799,21 @@ WebInspector.ScriptsPanel.prototype = {
this.sidebarResizeWidgetElement.style.right = newWidth + "px";
this.sidebarResizeElement.style.right = (newWidth - 3) + "px";
+ this.resize();
event.preventDefault();
},
-
+
_updatePauseOnExceptionsButton: function()
{
- if (InspectorBackend.pauseOnExceptions()) {
- this.pauseOnExceptionButton.title = WebInspector.UIString("Don't pause on exceptions.");
- this.pauseOnExceptionButton.toggled = true;
- } else {
- this.pauseOnExceptionButton.title = WebInspector.UIString("Pause on exceptions.");
- this.pauseOnExceptionButton.toggled = false;
- }
+ if (InspectorBackend.pauseOnExceptionsState() == WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions)
+ this.pauseOnExceptionButton.title = WebInspector.UIString("Don't pause on exceptions.\nClick to Pause on all exceptions.");
+ else if (InspectorBackend.pauseOnExceptionsState() == WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnAllExceptions)
+ this.pauseOnExceptionButton.title = WebInspector.UIString("Pause on all exceptions.\nClick to Pause on uncaught exceptions.");
+ else if (InspectorBackend.pauseOnExceptionsState() == WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnUncaughtExceptions)
+ this.pauseOnExceptionButton.title = WebInspector.UIString("Pause on uncaught exceptions.\nClick to Not pause on exceptions.");
+
+ this.pauseOnExceptionButton.state = InspectorBackend.pauseOnExceptionsState();
+
},
_updateDebuggerButtons: function()
@@ -890,7 +916,7 @@ WebInspector.ScriptsPanel.prototype = {
_togglePauseOnExceptions: function()
{
- InspectorBackend.setPauseOnExceptions(!InspectorBackend.pauseOnExceptions());
+ InspectorBackend.setPauseOnExceptionsState((InspectorBackend.pauseOnExceptionsState() + 1) % this.pauseOnExceptionButton.states);
this._updatePauseOnExceptionsButton();
},
diff --git a/WebCore/inspector/front-end/Section.js b/WebCore/inspector/front-end/Section.js
new file mode 100644
index 0000000..394f86d
--- /dev/null
+++ b/WebCore/inspector/front-end/Section.js
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 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.
+ */
+
+WebInspector.Section = function(title, subtitle)
+{
+ this.element = document.createElement("div");
+ this.element.className = "section";
+
+ this.headerElement = document.createElement("div");
+ this.headerElement.className = "header";
+
+ this.titleElement = document.createElement("div");
+ this.titleElement.className = "title";
+
+ this.subtitleElement = document.createElement("div");
+ this.subtitleElement.className = "subtitle";
+
+ this.headerElement.appendChild(this.subtitleElement);
+ this.headerElement.appendChild(this.titleElement);
+
+ this.headerElement.addEventListener("click", this.toggleExpanded.bind(this), false);
+ this.element.appendChild(this.headerElement);
+
+ this.title = title;
+ this.subtitle = subtitle;
+ this._expanded = false;
+}
+
+WebInspector.Section.prototype = {
+ get title()
+ {
+ return this._title;
+ },
+
+ set title(x)
+ {
+ if (this._title === x)
+ return;
+ this._title = x;
+
+ if (x instanceof Node) {
+ this.titleElement.removeChildren();
+ this.titleElement.appendChild(x);
+ } else
+ this.titleElement.textContent = x;
+ },
+
+ get subtitle()
+ {
+ return this._subtitle;
+ },
+
+ set subtitle(x)
+ {
+ if (this._subtitle === x)
+ return;
+ this._subtitle = x;
+ this.subtitleElement.innerHTML = x;
+ },
+
+ get expanded()
+ {
+ return this._expanded;
+ },
+
+ set expanded(x)
+ {
+ if (x)
+ this.expand();
+ else
+ this.collapse();
+ },
+
+ get populated()
+ {
+ return this._populated;
+ },
+
+ set populated(x)
+ {
+ this._populated = x;
+ if (!x && this.onpopulate && this._expanded) {
+ this.onpopulate(this);
+ this._populated = true;
+ }
+ },
+
+ expand: function()
+ {
+ if (this._expanded)
+ return;
+ this._expanded = true;
+ this.element.addStyleClass("expanded");
+
+ if (!this._populated && this.onpopulate) {
+ this.onpopulate(this);
+ this._populated = true;
+ }
+ },
+
+ collapse: function()
+ {
+ if (!this._expanded)
+ return;
+ this._expanded = false;
+ this.element.removeStyleClass("expanded");
+ },
+
+ toggleExpanded: function()
+ {
+ this.expanded = !this.expanded;
+ }
+}
diff --git a/WebCore/inspector/front-end/Settings.js b/WebCore/inspector/front-end/Settings.js
new file mode 100644
index 0000000..1838068
--- /dev/null
+++ b/WebCore/inspector/front-end/Settings.js
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+var Preferences = {
+ maxInlineTextChildLength: 80,
+ minConsoleHeight: 75,
+ minSidebarWidth: 100,
+ minElementsSidebarWidth: 200,
+ minScriptsSidebarWidth: 200,
+ styleRulesExpandedState: {},
+ showMissingLocalizedStrings: false,
+ samplingCPUProfiler: false,
+ showColorNicknames: true,
+ useCanvasBasedEditor: true
+}
+
+WebInspector.populateFrontendSettings = function(settingsString)
+{
+ WebInspector.settings._load(settingsString);
+}
+
+WebInspector.Settings = function()
+{
+}
+
+WebInspector.Settings.prototype = {
+ _load: function(settingsString)
+ {
+ try {
+ this._store = JSON.parse(settingsString);
+ } catch (e) {
+ // May fail;
+ this._store = {};
+ }
+
+ this._installSetting("eventListenersFilter", "event-listeners-filter", "all");
+ this._installSetting("colorFormat", "color-format", "hex");
+ this._installSetting("resourcesLargeRows", "resources-large-rows", true);
+ this._installSetting("watchExpressions", "watch-expressions", []);
+ this._installSetting("lastViewedScriptFile", "last-viewed-script-file");
+ this._installSetting("showInheritedComputedStyleProperties", "show-inherited-computed-style-properties", false);
+ this._installSetting("showUserAgentStyles", "show-user-agent-styles", true);
+ this._installSetting("resourceViewTab", "resource-view-tab", "headers");
+ this.dispatchEventToListeners("loaded");
+ },
+
+ _installSetting: function(name, propertyName, defaultValue)
+ {
+ this.__defineGetter__(name, this._get.bind(this, propertyName));
+ this.__defineSetter__(name, this._set.bind(this, propertyName));
+ if (!(propertyName in this._store)) {
+ this._store[propertyName] = defaultValue;
+ }
+ },
+
+ _get: function(propertyName)
+ {
+ return this._store[propertyName];
+ },
+
+ _set: function(propertyName, newValue)
+ {
+ this._store[propertyName] = newValue;
+ try {
+ InspectorBackend.saveFrontendSettings(JSON.stringify(this._store));
+ } catch (e) {
+ // May fail;
+ }
+ }
+}
+
+WebInspector.Settings.prototype.__proto__ = WebInspector.Object.prototype;
diff --git a/WebCore/inspector/front-end/SidebarPane.js b/WebCore/inspector/front-end/SidebarPane.js
index af9e5f9..855894c 100644
--- a/WebCore/inspector/front-end/SidebarPane.js
+++ b/WebCore/inspector/front-end/SidebarPane.js
@@ -33,7 +33,9 @@ WebInspector.SidebarPane = function(title)
this.titleElement = document.createElement("div");
this.titleElement.className = "title";
+ this.titleElement.tabIndex = 0;
this.titleElement.addEventListener("click", this.toggleExpanded.bind(this), false);
+ this.titleElement.addEventListener("keydown", this._onTitleKeyDown.bind(this), false);
this.bodyElement = document.createElement("div");
this.bodyElement.className = "body";
@@ -119,6 +121,12 @@ WebInspector.SidebarPane.prototype = {
toggleExpanded: function()
{
this.expanded = !this.expanded;
+ },
+
+ _onTitleKeyDown: function(event)
+ {
+ if (isEnterKey(event) || event.keyCode === WebInspector.KeyboardShortcut.KeyCodes.Space)
+ this.toggleExpanded();
}
}
diff --git a/WebCore/inspector/front-end/SourceCSSTokenizer.js b/WebCore/inspector/front-end/SourceCSSTokenizer.js
new file mode 100644
index 0000000..599cfb3
--- /dev/null
+++ b/WebCore/inspector/front-end/SourceCSSTokenizer.js
@@ -0,0 +1,1473 @@
+/* Generated by re2c 0.13.5 on Thu Jan 28 20:49:22 2010 */
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Generate js file as follows:
+//
+// re2c -isc WebCore/inspector/front-end/SourceCSSTokenizer.re2js \
+// | sed 's|^yy\([^:]*\)*\:|case \1:|' \
+// | sed 's|[*]cursor[+][+]|this._charAt(cursor++)|' \
+// | sed 's|[[*][+][+]cursor|this._charAt(++cursor)|' \
+// | sed 's|[*]cursor|this._charAt(cursor)|' \
+// | sed 's|yych = \*\([^;]*\)|yych = this._charAt\1|' \
+// | sed 's|{ gotoCase = \([^; continue; };]*\)|{ gotoCase = \1; continue; }|' \
+// | sed 's|unsigned\ int|var|' \
+// | sed 's|var\ yych|case 1: case 1: var yych|'
+
+WebInspector.SourceCSSTokenizer = function()
+{
+ WebInspector.SourceTokenizer.call(this);
+
+ this._propertyKeywords = [
+ "background", "background-attachment", "background-clip", "background-color", "background-image",
+ "background-origin", "background-position", "background-position-x", "background-position-y",
+ "background-repeat", "background-repeat-x", "background-repeat-y", "background-size", "border",
+ "border-bottom", "border-bottom-color", "border-bottom-left-radius", "border-bottom-right-radius",
+ "border-bottom-style", "border-bottom-width", "border-collapse", "border-color", "border-left",
+ "border-left-color", "border-left-style", "border-left-width", "border-radius", "border-right",
+ "border-right-color", "border-right-style", "border-right-width", "border-spacing", "border-style",
+ "border-top", "border-top-color", "border-top-left-radius", "border-top-right-radius", "border-top-style",
+ "border-top-width", "border-width", "bottom", "caption-side", "clear", "clip", "color", "content",
+ "counter-increment", "counter-reset", "cursor", "direction", "display", "empty-cells", "float",
+ "font", "font-family", "font-size", "font-stretch", "font-style", "font-variant", "font-weight",
+ "height", "left", "letter-spacing", "line-height", "list-style", "list-style-image", "list-style-position",
+ "list-style-type", "margin", "margin-bottom", "margin-left", "margin-right", "margin-top", "max-height",
+ "max-width", "min-height", "min-width", "opacity", "orphans", "outline", "outline-color", "outline-offset",
+ "outline-style", "outline-width", "overflow", "overflow-x", "overflow-y", "padding", "padding-bottom",
+ "padding-left", "padding-right", "padding-top", "page", "page-break-after", "page-break-before",
+ "page-break-inside", "pointer-events", "position", "quotes", "resize", "right", "size", "src",
+ "table-layout", "text-align", "text-decoration", "text-indent", "text-line-through", "text-line-through-color",
+ "text-line-through-mode", "text-line-through-style", "text-line-through-width", "text-overflow", "text-overline",
+ "text-overline-color", "text-overline-mode", "text-overline-style", "text-overline-width", "text-rendering",
+ "text-shadow", "text-transform", "text-underline", "text-underline-color", "text-underline-mode",
+ "text-underline-style", "text-underline-width", "top", "unicode-bidi", "unicode-range", "vertical-align",
+ "visibility", "white-space", "widows", "width", "word-break", "word-spacing", "word-wrap", "z-index", "zoom",
+ "-webkit-animation", "-webkit-animation-delay", "-webkit-animation-direction", "-webkit-animation-duration",
+ "-webkit-animation-iteration-count", "-webkit-animation-name", "-webkit-animation-play-state",
+ "-webkit-animation-timing-function", "-webkit-appearance", "-webkit-backface-visibility",
+ "-webkit-background-clip", "-webkit-background-composite", "-webkit-background-origin", "-webkit-background-size",
+ "-webkit-binding", "-webkit-border-fit", "-webkit-border-horizontal-spacing", "-webkit-border-image",
+ "-webkit-border-radius", "-webkit-border-vertical-spacing", "-webkit-box-align", "-webkit-box-direction",
+ "-webkit-box-flex", "-webkit-box-flex-group", "-webkit-box-lines", "-webkit-box-ordinal-group",
+ "-webkit-box-orient", "-webkit-box-pack", "-webkit-box-reflect", "-webkit-box-shadow", "-webkit-box-sizing",
+ "-webkit-column-break-after", "-webkit-column-break-before", "-webkit-column-break-inside", "-webkit-column-count",
+ "-webkit-column-gap", "-webkit-column-rule", "-webkit-column-rule-color", "-webkit-column-rule-style",
+ "-webkit-column-rule-width", "-webkit-column-width", "-webkit-columns", "-webkit-font-size-delta",
+ "-webkit-font-smoothing", "-webkit-highlight", "-webkit-line-break", "-webkit-line-clamp",
+ "-webkit-margin-bottom-collapse", "-webkit-margin-collapse", "-webkit-margin-start", "-webkit-margin-top-collapse",
+ "-webkit-marquee", "-webkit-marquee-direction", "-webkit-marquee-increment", "-webkit-marquee-repetition",
+ "-webkit-marquee-speed", "-webkit-marquee-style", "-webkit-mask", "-webkit-mask-attachment",
+ "-webkit-mask-box-image", "-webkit-mask-clip", "-webkit-mask-composite", "-webkit-mask-image",
+ "-webkit-mask-origin", "-webkit-mask-position", "-webkit-mask-position-x", "-webkit-mask-position-y",
+ "-webkit-mask-repeat", "-webkit-mask-repeat-x", "-webkit-mask-repeat-y", "-webkit-mask-size",
+ "-webkit-match-nearest-mail-blockquote-color", "-webkit-nbsp-mode", "-webkit-padding-start",
+ "-webkit-perspective", "-webkit-perspective-origin", "-webkit-perspective-origin-x", "-webkit-perspective-origin-y",
+ "-webkit-rtl-ordering", "-webkit-text-decorations-in-effect", "-webkit-text-fill-color", "-webkit-text-security",
+ "-webkit-text-size-adjust", "-webkit-text-stroke", "-webkit-text-stroke-color", "-webkit-text-stroke-width",
+ "-webkit-transform", "-webkit-transform-origin", "-webkit-transform-origin-x", "-webkit-transform-origin-y",
+ "-webkit-transform-origin-z", "-webkit-transform-style", "-webkit-transition", "-webkit-transition-delay",
+ "-webkit-transition-duration", "-webkit-transition-property", "-webkit-transition-timing-function",
+ "-webkit-user-drag", "-webkit-user-modify", "-webkit-user-select", "-webkit-variable-declaration-block"
+ ].keySet();
+
+ this._valueKeywords = [
+ "above", "absolute", "activeborder", "activecaption", "afar", "after-white-space", "ahead", "alias", "all", "all-scroll",
+ "alternate", "always","amharic", "amharic-abegede", "antialiased", "appworkspace", "aqua", "armenian", "auto", "avoid",
+ "background", "backwards", "baseline", "below", "bidi-override", "black", "blink", "block", "block-axis", "blue", "bold",
+ "bolder", "border", "border-box", "both", "bottom", "break-all", "break-word", "button", "button-bevel", "buttonface",
+ "buttonhighlight", "buttonshadow", "buttontext", "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret", "cell",
+ "center", "checkbox", "circle", "cjk-earthly-branch", "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
+ "col-resize", "collapse", "compact", "condensed", "contain", "content", "content-box", "context-menu", "continuous", "copy",
+ "cover", "crop", "cross", "crosshair", "currentcolor", "cursive", "dashed", "decimal", "decimal-leading-zero", "default",
+ "default-button", "destination-atop", "destination-in", "destination-out", "destination-over", "disc", "discard", "document",
+ "dot-dash", "dot-dot-dash", "dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out", "element",
+ "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede", "ethiopic-abegede-am-et", "ethiopic-abegede-gez",
+ "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",
+ "georgian", "gray", "graytext", "green", "grey", "groove", "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",
+ "inline-axis", "inline-block", "inline-table", "inset", "inside", "intrinsic", "invert", "italic", "justify", "katakana",
+ "katakana-iroha", "landscape", "large", "larger", "left", "level", "lighter", "lime", "line-through", "linear", "lines",
+ "list-button", "list-item", "listbox", "listitem", "local", "logical", "loud", "lower", "lower-alpha", "lower-greek", "lower-latin",
+ "lower-norwegian", "lower-roman", "lowercase", "ltr", "maroon", "match", "media-controls-background", "media-current-time-display",
+ "media-fullscreen-button", "media-mute-button", "media-play-button", "media-return-to-realtime-button", "media-rewind-button",
+ "media-seek-back-button", "media-seek-forward-button", "media-slider", "media-sliderthumb", "media-time-remaining-display",
+ "media-volume-slider", "media-volume-slider-container", "media-volume-sliderthumb", "medium", "menu", "menulist", "menulist-button",
+ "menulist-text", "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic", "mix", "monospace", "move", "multiple",
+ "n-resize", "narrower", "navy", "ne-resize", "nesw-resize", "no-close-quote", "no-drop", "no-open-quote", "no-repeat", "none",
+ "normal", "not-allowed", "nowrap", "ns-resize", "nw-resize", "nwse-resize", "oblique", "olive", "open-quote", "optimizeLegibility",
+ "optimizeSpeed", "orange", "oromo", "outset", "outside", "overlay", "overline", "padding", "padding-box", "painted", "paused",
+ "plus-darker", "plus-lighter", "pointer", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d", "progress", "purple",
+ "push-button", "radio", "read-only", "read-write", "read-write-plaintext-only", "red", "relative", "repeat", "repeat-x",
+ "repeat-y", "reset", "reverse", "rgb", "rgba", "ridge", "right", "round", "row-resize", "rtl", "run-in", "running", "s-resize", "sans-serif",
+ "scroll", "scrollbar", "se-resize", "searchfield", "searchfield-cancel-button", "searchfield-decoration", "searchfield-results-button",
+ "searchfield-results-decoration", "semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama", "silver", "single",
+ "skip-white-space", "slide", "slider-horizontal", "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
+ "small", "small-caps", "small-caption", "smaller", "solid", "somali", "source-atop", "source-in", "source-out", "source-over",
+ "space", "square", "square-button", "start", "static", "status-bar", "stretch", "stroke", "sub", "subpixel-antialiased", "super",
+ "sw-resize", "table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group",
+ "table-row", "table-row-group", "teal", "text", "text-bottom", "text-top", "textarea", "textfield", "thick", "thin", "threeddarkshadow",
+ "threedface", "threedhighlight", "threedlightshadow", "threedshadow", "tigre", "tigrinya-er", "tigrinya-er-abegede", "tigrinya-et",
+ "tigrinya-et-abegede", "to", "top", "transparent", "ultra-condensed", "ultra-expanded", "underline", "up", "upper-alpha", "upper-greek",
+ "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "url", "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted",
+ "visibleStroke", "visual", "w-resize", "wait", "wave", "white", "wider", "window", "windowframe", "windowtext", "x-large", "x-small",
+ "xor", "xx-large", "xx-small", "yellow", "-wap-marquee", "-webkit-activelink", "-webkit-auto", "-webkit-baseline-middle", "-webkit-body",
+ "-webkit-box", "-webkit-center", "-webkit-control", "-webkit-focus-ring-color", "-webkit-grab", "-webkit-grabbing", "-webkit-gradient", "-webkit-inline-box",
+ "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-right", "-webkit-small-control",
+ "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",
+ ].keySet();
+
+ this._mediaTypes = ["all", "aural", "braille", "embossed", "handheld", "import", "print", "projection", "screen", "tty", "tv"].keySet();
+
+ this._lexConditions = {
+ INITIAL: 0,
+ COMMENT: 1,
+ DSTRING: 2,
+ SSTRING: 3
+ };
+
+ this._parseConditions = {
+ INITIAL: 0,
+ PROPERTY: 1,
+ PROPERTY_VALUE: 2,
+ AT_RULE: 3
+ };
+
+ this.case_INITIAL = 1000;
+ this.case_COMMENT = 1002;
+ this.case_DSTRING = 1003;
+ this.case_SSTRING = 1004;
+
+ this.initialCondition = { lexCondition: this._lexConditions.INITIAL, parseCondition: this._parseConditions.INITIAL }
+}
+
+WebInspector.SourceCSSTokenizer.prototype = {
+ _stringToken: function(cursor, stringEnds)
+ {
+ if (this._isPropertyValue())
+ this.tokenType = "css-string";
+ else
+ this.tokenType = null;
+ return cursor;
+ },
+
+ _isPropertyValue: function()
+ {
+ return this._parseCondition === this._parseConditions.PROPERTY_VALUE || this._parseCondition === this._parseConditions.AT_RULE;
+ },
+
+ nextToken: function(cursor)
+ {
+ var cursorOnEnter = cursor;
+ var gotoCase = 1;
+ while (1) {
+ switch (gotoCase)
+ // Following comment is replaced with generated state machine.
+
+ {
+ case 1: var yych;
+ var yyaccept = 0;
+ if (this.getLexCondition() < 2) {
+ if (this.getLexCondition() < 1) {
+ { gotoCase = this.case_INITIAL; continue; };
+ } else {
+ { gotoCase = this.case_COMMENT; continue; };
+ }
+ } else {
+ if (this.getLexCondition() < 3) {
+ { gotoCase = this.case_DSTRING; continue; };
+ } else {
+ { gotoCase = this.case_SSTRING; continue; };
+ }
+ }
+/* *********************************** */
+case this.case_COMMENT:
+
+ yych = this._charAt(cursor);
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 4; continue; };
+ { gotoCase = 3; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 4; continue; };
+ if (yych == '*') { gotoCase = 6; continue; };
+ { gotoCase = 3; continue; };
+ }
+case 2:
+ { this.tokenType = "css-comment"; return cursor; }
+case 3:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 12; continue; };
+case 4:
+ ++cursor;
+ { this.tokenType = null; return cursor; }
+case 6:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == '*') { gotoCase = 9; continue; };
+ if (yych != '/') { gotoCase = 11; continue; };
+case 7:
+ ++cursor;
+ this.setLexCondition(this._lexConditions.INITIAL);
+ { this.tokenType = "css-comment"; return cursor; }
+case 9:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '*') { gotoCase = 9; continue; };
+ if (yych == '/') { gotoCase = 7; continue; };
+case 11:
+ yyaccept = 0;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+case 12:
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 2; continue; };
+ { gotoCase = 11; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 2; continue; };
+ if (yych == '*') { gotoCase = 9; continue; };
+ { gotoCase = 11; continue; };
+ }
+/* *********************************** */
+case this.case_DSTRING:
+ yych = this._charAt(cursor);
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 17; continue; };
+ if (yych <= '\f') { gotoCase = 16; continue; };
+ { gotoCase = 17; continue; };
+ } else {
+ if (yych <= '"') {
+ if (yych <= '!') { gotoCase = 16; continue; };
+ { gotoCase = 19; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 21; continue; };
+ { gotoCase = 16; continue; };
+ }
+ }
+case 15:
+ { return this._stringToken(cursor); }
+case 16:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 23; continue; };
+case 17:
+ ++cursor;
+case 18:
+ { this.tokenType = null; return cursor; }
+case 19:
+ ++cursor;
+case 20:
+ this.setLexCondition(this._lexConditions.INITIAL);
+ { return this._stringToken(cursor, true); }
+case 21:
+ yych = this._charAt(++cursor);
+ if (yych <= 'e') {
+ if (yych <= '\'') {
+ if (yych == '"') { gotoCase = 22; continue; };
+ if (yych <= '&') { gotoCase = 18; continue; };
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '[') { gotoCase = 18; continue; };
+ } else {
+ if (yych != 'b') { gotoCase = 18; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych <= 'm') {
+ if (yych >= 'g') { gotoCase = 18; continue; };
+ } else {
+ if (yych <= 'n') { gotoCase = 22; continue; };
+ if (yych <= 'q') { gotoCase = 18; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych <= 's') { gotoCase = 18; continue; };
+ } else {
+ if (yych != 'v') { gotoCase = 18; continue; };
+ }
+ }
+ }
+case 22:
+ yyaccept = 0;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+case 23:
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 15; continue; };
+ if (yych <= '\f') { gotoCase = 22; continue; };
+ { gotoCase = 15; continue; };
+ } else {
+ if (yych <= '"') {
+ if (yych <= '!') { gotoCase = 22; continue; };
+ { gotoCase = 26; continue; };
+ } else {
+ if (yych != '\\') { gotoCase = 22; continue; };
+ }
+ }
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'e') {
+ if (yych <= '\'') {
+ if (yych == '"') { gotoCase = 22; continue; };
+ if (yych >= '\'') { gotoCase = 22; continue; };
+ } else {
+ if (yych <= '\\') {
+ if (yych >= '\\') { gotoCase = 22; continue; };
+ } else {
+ if (yych == 'b') { gotoCase = 22; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych <= 'm') {
+ if (yych <= 'f') { gotoCase = 22; continue; };
+ } else {
+ if (yych <= 'n') { gotoCase = 22; continue; };
+ if (yych >= 'r') { gotoCase = 22; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych >= 't') { gotoCase = 22; continue; };
+ } else {
+ if (yych == 'v') { gotoCase = 22; continue; };
+ }
+ }
+ }
+ cursor = YYMARKER;
+ { gotoCase = 15; continue; };
+case 26:
+ ++cursor;
+ yych = this._charAt(cursor);
+ { gotoCase = 20; continue; };
+/* *********************************** */
+case this.case_INITIAL:
+ yych = this._charAt(cursor);
+ if (yych <= ';') {
+ if (yych <= '\'') {
+ if (yych <= '"') {
+ if (yych <= ' ') { gotoCase = 29; continue; };
+ if (yych <= '!') { gotoCase = 31; continue; };
+ { gotoCase = 33; continue; };
+ } else {
+ if (yych == '$') { gotoCase = 31; continue; };
+ if (yych >= '\'') { gotoCase = 34; continue; };
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= ',') { gotoCase = 29; continue; };
+ if (yych <= '-') { gotoCase = 35; continue; };
+ { gotoCase = 36; continue; };
+ } else {
+ if (yych <= '/') { gotoCase = 37; continue; };
+ if (yych <= '9') { gotoCase = 38; continue; };
+ if (yych <= ':') { gotoCase = 40; continue; };
+ { gotoCase = 42; continue; };
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') {
+ if (yych == '=') { gotoCase = 31; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 29; continue; };
+ if (yych <= ']') { gotoCase = 31; continue; };
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych != '`') { gotoCase = 31; continue; };
+ } else {
+ if (yych <= '{') { gotoCase = 44; continue; };
+ if (yych == '}') { gotoCase = 46; continue; };
+ }
+ }
+ }
+case 29:
+ ++cursor;
+case 30:
+ { this.tokenType = null; return cursor; }
+case 31:
+ ++cursor;
+ yych = this._charAt(cursor);
+ { gotoCase = 49; continue; };
+case 32:
+ {
+ var token = this._line.substring(cursorOnEnter, cursor);
+ if (this._parseCondition === this._parseConditions.INITIAL) {
+ if (token === "@import" || token === "@media") {
+ this.tokenType = "css-at-rule";
+ this._parseCondition = this._parseConditions.AT_RULE;
+ } else if (token.indexOf("@") === 0)
+ this.tokenType = "css-at-rule";
+ else
+ this.tokenType = "css-selector";
+ }
+ else if (this._parseCondition === this._parseConditions.AT_RULE && token in this._mediaTypes)
+ this.tokenType = "css-keyword";
+ else if (this._parseCondition === this._parseConditions.PROPERTY && token in this._propertyKeywords)
+ this.tokenType = "css-property";
+ else if (this._isPropertyValue() && token in this._valueKeywords)
+ this.tokenType = "css-keyword";
+ else if (token === "!important")
+ this.tokenType = "css-important";
+ else
+ this.tokenType = null;
+ return cursor;
+ }
+case 33:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= '-') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 32; continue; };
+ { gotoCase = 124; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 32; continue; };
+ if (yych <= ' ') { gotoCase = 124; continue; };
+ { gotoCase = 122; continue; };
+ }
+ } else {
+ if (yych <= '$') {
+ if (yych <= '"') { gotoCase = 114; continue; };
+ if (yych <= '#') { gotoCase = 124; continue; };
+ { gotoCase = 122; continue; };
+ } else {
+ if (yych == '\'') { gotoCase = 122; continue; };
+ if (yych <= ',') { gotoCase = 124; continue; };
+ { gotoCase = 122; continue; };
+ }
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych <= '<') {
+ if (yych <= '.') { gotoCase = 124; continue; };
+ if (yych <= '9') { gotoCase = 122; continue; };
+ { gotoCase = 124; continue; };
+ } else {
+ if (yych <= '=') { gotoCase = 122; continue; };
+ if (yych <= '?') { gotoCase = 124; continue; };
+ { gotoCase = 122; continue; };
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') { gotoCase = 126; continue; };
+ if (yych <= ']') { gotoCase = 122; continue; };
+ { gotoCase = 124; continue; };
+ } else {
+ if (yych == '`') { gotoCase = 124; continue; };
+ if (yych <= 'z') { gotoCase = 122; continue; };
+ { gotoCase = 124; continue; };
+ }
+ }
+ }
+case 34:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= '-') {
+ if (yych <= '"') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 32; continue; };
+ { gotoCase = 116; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 32; continue; };
+ if (yych <= ' ') { gotoCase = 116; continue; };
+ { gotoCase = 112; continue; };
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych == '$') { gotoCase = 112; continue; };
+ { gotoCase = 116; continue; };
+ } else {
+ if (yych <= '\'') { gotoCase = 114; continue; };
+ if (yych <= ',') { gotoCase = 116; continue; };
+ { gotoCase = 112; continue; };
+ }
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych <= '<') {
+ if (yych <= '.') { gotoCase = 116; continue; };
+ if (yych <= '9') { gotoCase = 112; continue; };
+ { gotoCase = 116; continue; };
+ } else {
+ if (yych <= '=') { gotoCase = 112; continue; };
+ if (yych <= '?') { gotoCase = 116; continue; };
+ { gotoCase = 112; continue; };
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') { gotoCase = 118; continue; };
+ if (yych <= ']') { gotoCase = 112; continue; };
+ { gotoCase = 116; continue; };
+ } else {
+ if (yych == '`') { gotoCase = 116; continue; };
+ if (yych <= 'z') { gotoCase = 112; continue; };
+ { gotoCase = 116; continue; };
+ }
+ }
+ }
+case 35:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == '.') { gotoCase = 65; continue; };
+ if (yych <= '/') { gotoCase = 49; continue; };
+ if (yych <= '9') { gotoCase = 50; continue; };
+ { gotoCase = 49; continue; };
+case 36:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 30; continue; };
+ if (yych <= '9') { gotoCase = 68; continue; };
+ { gotoCase = 30; continue; };
+case 37:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == '*') { gotoCase = 104; continue; };
+ { gotoCase = 49; continue; };
+case 38:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ switch (yych) {
+ case '!':
+ case '"':
+ case '$':
+ case '\'':
+ case '-':
+ case '/':
+ case '=':
+ case '@':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'G':
+ case 'I':
+ case 'J':
+ case 'K':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'S':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '[':
+ case ']':
+ case 'a':
+ case 'b':
+ case 'f':
+ case 'h':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': { gotoCase = 48; continue; };
+ case '%': { gotoCase = 67; continue; };
+ case '.': { gotoCase = 65; continue; };
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': { gotoCase = 50; continue; };
+ case 'H': { gotoCase = 52; continue; };
+ case '_': { gotoCase = 53; continue; };
+ case 'c': { gotoCase = 54; continue; };
+ case 'd': { gotoCase = 55; continue; };
+ case 'e': { gotoCase = 56; continue; };
+ case 'g': { gotoCase = 57; continue; };
+ case 'i': { gotoCase = 58; continue; };
+ case 'k': { gotoCase = 59; continue; };
+ case 'm': { gotoCase = 60; continue; };
+ case 'p': { gotoCase = 61; continue; };
+ case 'r': { gotoCase = 62; continue; };
+ case 's': { gotoCase = 63; continue; };
+ case 't': { gotoCase = 64; continue; };
+ default: { gotoCase = 39; continue; };
+ }
+case 39:
+ {
+ if (this._isPropertyValue())
+ this.tokenType = "css-number";
+ else
+ this.tokenType = null;
+ return cursor;
+ }
+case 40:
+ ++cursor;
+ {
+ this.tokenType = null;
+ if (this._parseCondition === this._parseConditions.PROPERTY)
+ this._parseCondition = this._parseConditions.PROPERTY_VALUE;
+ return cursor;
+ }
+case 42:
+ ++cursor;
+ {
+ this.tokenType = null;
+ if (this._parseCondition === this._parseConditions.AT_RULE)
+ this._parseCondition = this._parseConditions.INITIAL;
+ else
+ this._parseCondition = this._parseConditions.PROPERTY;
+ return cursor;
+ }
+case 44:
+ ++cursor;
+ {
+ this.tokenType = null;
+ if (this._parseCondition === this._parseConditions.AT_RULE)
+ this._parseCondition = this._parseConditions.INITIAL;
+ else
+ this._parseCondition = this._parseConditions.PROPERTY;
+ return cursor;
+ }
+case 46:
+ ++cursor;
+ {
+ this.tokenType = null;
+ this._parseCondition = this._parseConditions.INITIAL;
+ return cursor;
+ }
+case 48:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 49:
+ if (yych <= '9') {
+ if (yych <= '&') {
+ if (yych <= '"') {
+ if (yych <= ' ') { gotoCase = 32; continue; };
+ { gotoCase = 48; continue; };
+ } else {
+ if (yych == '$') { gotoCase = 48; continue; };
+ { gotoCase = 32; continue; };
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '\'') { gotoCase = 48; continue; };
+ { gotoCase = 32; continue; };
+ } else {
+ if (yych == '.') { gotoCase = 32; continue; };
+ { gotoCase = 48; continue; };
+ }
+ }
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '=') {
+ if (yych <= '<') { gotoCase = 32; continue; };
+ { gotoCase = 48; continue; };
+ } else {
+ if (yych <= '?') { gotoCase = 32; continue; };
+ if (yych <= '[') { gotoCase = 48; continue; };
+ { gotoCase = 32; continue; };
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych == '^') { gotoCase = 32; continue; };
+ { gotoCase = 48; continue; };
+ } else {
+ if (yych <= '`') { gotoCase = 32; continue; };
+ if (yych <= 'z') { gotoCase = 48; continue; };
+ { gotoCase = 32; continue; };
+ }
+ }
+ }
+case 50:
+ yyaccept = 1;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ switch (yych) {
+ case '!':
+ case '"':
+ case '$':
+ case '\'':
+ case '-':
+ case '/':
+ case '=':
+ case '@':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'G':
+ case 'I':
+ case 'J':
+ case 'K':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'S':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '[':
+ case ']':
+ case 'a':
+ case 'b':
+ case 'f':
+ case 'h':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': { gotoCase = 48; continue; };
+ case '%': { gotoCase = 67; continue; };
+ case '.': { gotoCase = 65; continue; };
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': { gotoCase = 50; continue; };
+ case 'H': { gotoCase = 52; continue; };
+ case '_': { gotoCase = 53; continue; };
+ case 'c': { gotoCase = 54; continue; };
+ case 'd': { gotoCase = 55; continue; };
+ case 'e': { gotoCase = 56; continue; };
+ case 'g': { gotoCase = 57; continue; };
+ case 'i': { gotoCase = 58; continue; };
+ case 'k': { gotoCase = 59; continue; };
+ case 'm': { gotoCase = 60; continue; };
+ case 'p': { gotoCase = 61; continue; };
+ case 'r': { gotoCase = 62; continue; };
+ case 's': { gotoCase = 63; continue; };
+ case 't': { gotoCase = 64; continue; };
+ default: { gotoCase = 39; continue; };
+ }
+case 52:
+ yych = this._charAt(++cursor);
+ if (yych == 'z') { gotoCase = 63; continue; };
+ { gotoCase = 49; continue; };
+case 53:
+ yych = this._charAt(++cursor);
+ if (yych == '_') { gotoCase = 101; continue; };
+ { gotoCase = 49; continue; };
+case 54:
+ yych = this._charAt(++cursor);
+ if (yych == 'm') { gotoCase = 63; continue; };
+ { gotoCase = 49; continue; };
+case 55:
+ yych = this._charAt(++cursor);
+ if (yych == 'e') { gotoCase = 100; continue; };
+ { gotoCase = 49; continue; };
+case 56:
+ yych = this._charAt(++cursor);
+ if (yych == 'm') { gotoCase = 63; continue; };
+ if (yych == 'x') { gotoCase = 63; continue; };
+ { gotoCase = 49; continue; };
+case 57:
+ yych = this._charAt(++cursor);
+ if (yych == 'r') { gotoCase = 98; continue; };
+ { gotoCase = 49; continue; };
+case 58:
+ yych = this._charAt(++cursor);
+ if (yych == 'n') { gotoCase = 63; continue; };
+ { gotoCase = 49; continue; };
+case 59:
+ yych = this._charAt(++cursor);
+ if (yych == 'H') { gotoCase = 97; continue; };
+ { gotoCase = 49; continue; };
+case 60:
+ yych = this._charAt(++cursor);
+ if (yych == 'm') { gotoCase = 63; continue; };
+ if (yych == 's') { gotoCase = 63; continue; };
+ { gotoCase = 49; continue; };
+case 61:
+ yych = this._charAt(++cursor);
+ if (yych <= 's') {
+ if (yych == 'c') { gotoCase = 63; continue; };
+ { gotoCase = 49; continue; };
+ } else {
+ if (yych <= 't') { gotoCase = 63; continue; };
+ if (yych == 'x') { gotoCase = 63; continue; };
+ { gotoCase = 49; continue; };
+ }
+case 62:
+ yych = this._charAt(++cursor);
+ if (yych == 'a') { gotoCase = 95; continue; };
+ if (yych == 'e') { gotoCase = 96; continue; };
+ { gotoCase = 49; continue; };
+case 63:
+ yych = this._charAt(++cursor);
+ if (yych <= '9') {
+ if (yych <= '&') {
+ if (yych <= '"') {
+ if (yych <= ' ') { gotoCase = 39; continue; };
+ { gotoCase = 48; continue; };
+ } else {
+ if (yych == '$') { gotoCase = 48; continue; };
+ { gotoCase = 39; continue; };
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '\'') { gotoCase = 48; continue; };
+ { gotoCase = 39; continue; };
+ } else {
+ if (yych == '.') { gotoCase = 39; continue; };
+ { gotoCase = 48; continue; };
+ }
+ }
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '=') {
+ if (yych <= '<') { gotoCase = 39; continue; };
+ { gotoCase = 48; continue; };
+ } else {
+ if (yych <= '?') { gotoCase = 39; continue; };
+ if (yych <= '[') { gotoCase = 48; continue; };
+ { gotoCase = 39; continue; };
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych == '^') { gotoCase = 39; continue; };
+ { gotoCase = 48; continue; };
+ } else {
+ if (yych <= '`') { gotoCase = 39; continue; };
+ if (yych <= 'z') { gotoCase = 48; continue; };
+ { gotoCase = 39; continue; };
+ }
+ }
+ }
+case 64:
+ yych = this._charAt(++cursor);
+ if (yych == 'u') { gotoCase = 93; continue; };
+ { gotoCase = 49; continue; };
+case 65:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 66; continue; };
+ if (yych <= '9') { gotoCase = 68; continue; };
+case 66:
+ cursor = YYMARKER;
+ if (yyaccept <= 0) {
+ { gotoCase = 32; continue; };
+ } else {
+ { gotoCase = 39; continue; };
+ }
+case 67:
+ yych = this._charAt(++cursor);
+ { gotoCase = 39; continue; };
+case 68:
+ yyaccept = 1;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'f') {
+ if (yych <= 'H') {
+ if (yych <= '/') {
+ if (yych == '%') { gotoCase = 67; continue; };
+ { gotoCase = 39; continue; };
+ } else {
+ if (yych <= '9') { gotoCase = 68; continue; };
+ if (yych <= 'G') { gotoCase = 39; continue; };
+ { gotoCase = 80; continue; };
+ }
+ } else {
+ if (yych <= 'b') {
+ if (yych == '_') { gotoCase = 72; continue; };
+ { gotoCase = 39; continue; };
+ } else {
+ if (yych <= 'c') { gotoCase = 74; continue; };
+ if (yych <= 'd') { gotoCase = 77; continue; };
+ if (yych >= 'f') { gotoCase = 39; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'm') {
+ if (yych <= 'i') {
+ if (yych <= 'g') { gotoCase = 78; continue; };
+ if (yych <= 'h') { gotoCase = 39; continue; };
+ { gotoCase = 76; continue; };
+ } else {
+ if (yych == 'k') { gotoCase = 81; continue; };
+ if (yych <= 'l') { gotoCase = 39; continue; };
+ { gotoCase = 75; continue; };
+ }
+ } else {
+ if (yych <= 'q') {
+ if (yych == 'p') { gotoCase = 73; continue; };
+ { gotoCase = 39; continue; };
+ } else {
+ if (yych <= 'r') { gotoCase = 71; continue; };
+ if (yych <= 's') { gotoCase = 67; continue; };
+ if (yych <= 't') { gotoCase = 79; continue; };
+ { gotoCase = 39; continue; };
+ }
+ }
+ }
+ yych = this._charAt(++cursor);
+ if (yych == 'm') { gotoCase = 67; continue; };
+ if (yych == 'x') { gotoCase = 67; continue; };
+ { gotoCase = 66; continue; };
+case 71:
+ yych = this._charAt(++cursor);
+ if (yych == 'a') { gotoCase = 91; continue; };
+ if (yych == 'e') { gotoCase = 92; continue; };
+ { gotoCase = 66; continue; };
+case 72:
+ yych = this._charAt(++cursor);
+ if (yych == '_') { gotoCase = 88; continue; };
+ { gotoCase = 66; continue; };
+case 73:
+ yych = this._charAt(++cursor);
+ if (yych <= 's') {
+ if (yych == 'c') { gotoCase = 67; continue; };
+ { gotoCase = 66; continue; };
+ } else {
+ if (yych <= 't') { gotoCase = 67; continue; };
+ if (yych == 'x') { gotoCase = 67; continue; };
+ { gotoCase = 66; continue; };
+ }
+case 74:
+ yych = this._charAt(++cursor);
+ if (yych == 'm') { gotoCase = 67; continue; };
+ { gotoCase = 66; continue; };
+case 75:
+ yych = this._charAt(++cursor);
+ if (yych == 'm') { gotoCase = 67; continue; };
+ if (yych == 's') { gotoCase = 67; continue; };
+ { gotoCase = 66; continue; };
+case 76:
+ yych = this._charAt(++cursor);
+ if (yych == 'n') { gotoCase = 67; continue; };
+ { gotoCase = 66; continue; };
+case 77:
+ yych = this._charAt(++cursor);
+ if (yych == 'e') { gotoCase = 87; continue; };
+ { gotoCase = 66; continue; };
+case 78:
+ yych = this._charAt(++cursor);
+ if (yych == 'r') { gotoCase = 85; continue; };
+ { gotoCase = 66; continue; };
+case 79:
+ yych = this._charAt(++cursor);
+ if (yych == 'u') { gotoCase = 83; continue; };
+ { gotoCase = 66; continue; };
+case 80:
+ yych = this._charAt(++cursor);
+ if (yych == 'z') { gotoCase = 67; continue; };
+ { gotoCase = 66; continue; };
+case 81:
+ yych = this._charAt(++cursor);
+ if (yych != 'H') { gotoCase = 66; continue; };
+ yych = this._charAt(++cursor);
+ if (yych == 'z') { gotoCase = 67; continue; };
+ { gotoCase = 66; continue; };
+case 83:
+ yych = this._charAt(++cursor);
+ if (yych != 'r') { gotoCase = 66; continue; };
+ yych = this._charAt(++cursor);
+ if (yych == 'n') { gotoCase = 67; continue; };
+ { gotoCase = 66; continue; };
+case 85:
+ yych = this._charAt(++cursor);
+ if (yych != 'a') { gotoCase = 66; continue; };
+ yych = this._charAt(++cursor);
+ if (yych == 'd') { gotoCase = 67; continue; };
+ { gotoCase = 66; continue; };
+case 87:
+ yych = this._charAt(++cursor);
+ if (yych == 'g') { gotoCase = 67; continue; };
+ { gotoCase = 66; continue; };
+case 88:
+ yych = this._charAt(++cursor);
+ if (yych != 'q') { gotoCase = 66; continue; };
+ yych = this._charAt(++cursor);
+ if (yych != 'e') { gotoCase = 66; continue; };
+ yych = this._charAt(++cursor);
+ if (yych == 'm') { gotoCase = 67; continue; };
+ { gotoCase = 66; continue; };
+case 91:
+ yych = this._charAt(++cursor);
+ if (yych == 'd') { gotoCase = 67; continue; };
+ { gotoCase = 66; continue; };
+case 92:
+ yych = this._charAt(++cursor);
+ if (yych == 'm') { gotoCase = 67; continue; };
+ { gotoCase = 66; continue; };
+case 93:
+ yych = this._charAt(++cursor);
+ if (yych != 'r') { gotoCase = 49; continue; };
+ yych = this._charAt(++cursor);
+ if (yych == 'n') { gotoCase = 63; continue; };
+ { gotoCase = 49; continue; };
+case 95:
+ yych = this._charAt(++cursor);
+ if (yych == 'd') { gotoCase = 63; continue; };
+ { gotoCase = 49; continue; };
+case 96:
+ yych = this._charAt(++cursor);
+ if (yych == 'm') { gotoCase = 63; continue; };
+ { gotoCase = 49; continue; };
+case 97:
+ yych = this._charAt(++cursor);
+ if (yych == 'z') { gotoCase = 63; continue; };
+ { gotoCase = 49; continue; };
+case 98:
+ yych = this._charAt(++cursor);
+ if (yych != 'a') { gotoCase = 49; continue; };
+ yych = this._charAt(++cursor);
+ if (yych == 'd') { gotoCase = 63; continue; };
+ { gotoCase = 49; continue; };
+case 100:
+ yych = this._charAt(++cursor);
+ if (yych == 'g') { gotoCase = 63; continue; };
+ { gotoCase = 49; continue; };
+case 101:
+ yych = this._charAt(++cursor);
+ if (yych != 'q') { gotoCase = 49; continue; };
+ yych = this._charAt(++cursor);
+ if (yych != 'e') { gotoCase = 49; continue; };
+ yych = this._charAt(++cursor);
+ if (yych == 'm') { gotoCase = 63; continue; };
+ { gotoCase = 49; continue; };
+case 104:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 108; continue; };
+ { gotoCase = 104; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 108; continue; };
+ if (yych != '*') { gotoCase = 104; continue; };
+ }
+case 106:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '*') { gotoCase = 106; continue; };
+ if (yych == '/') { gotoCase = 110; continue; };
+ { gotoCase = 104; continue; };
+case 108:
+ ++cursor;
+ this.setLexCondition(this._lexConditions.COMMENT);
+ { this.tokenType = "css-comment"; return cursor; }
+case 110:
+ ++cursor;
+ { this.tokenType = "css-comment"; return cursor; }
+case 112:
+ yyaccept = 0;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '-') {
+ if (yych <= '"') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 32; continue; };
+ { gotoCase = 116; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 32; continue; };
+ if (yych <= ' ') { gotoCase = 116; continue; };
+ { gotoCase = 112; continue; };
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych == '$') { gotoCase = 112; continue; };
+ { gotoCase = 116; continue; };
+ } else {
+ if (yych <= '\'') { gotoCase = 114; continue; };
+ if (yych <= ',') { gotoCase = 116; continue; };
+ { gotoCase = 112; continue; };
+ }
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych <= '<') {
+ if (yych <= '.') { gotoCase = 116; continue; };
+ if (yych <= '9') { gotoCase = 112; continue; };
+ { gotoCase = 116; continue; };
+ } else {
+ if (yych <= '=') { gotoCase = 112; continue; };
+ if (yych <= '?') { gotoCase = 116; continue; };
+ { gotoCase = 112; continue; };
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') { gotoCase = 118; continue; };
+ if (yych <= ']') { gotoCase = 112; continue; };
+ { gotoCase = 116; continue; };
+ } else {
+ if (yych == '`') { gotoCase = 116; continue; };
+ if (yych <= 'z') { gotoCase = 112; continue; };
+ { gotoCase = 116; continue; };
+ }
+ }
+ }
+case 114:
+ ++cursor;
+ if ((yych = this._charAt(cursor)) <= '9') {
+ if (yych <= '&') {
+ if (yych <= '"') {
+ if (yych >= '!') { gotoCase = 48; continue; };
+ } else {
+ if (yych == '$') { gotoCase = 48; continue; };
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '\'') { gotoCase = 48; continue; };
+ } else {
+ if (yych != '.') { gotoCase = 48; continue; };
+ }
+ }
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '=') {
+ if (yych >= '=') { gotoCase = 48; continue; };
+ } else {
+ if (yych <= '?') { gotoCase = 115; continue; };
+ if (yych <= '[') { gotoCase = 48; continue; };
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych != '^') { gotoCase = 48; continue; };
+ } else {
+ if (yych <= '`') { gotoCase = 115; continue; };
+ if (yych <= 'z') { gotoCase = 48; continue; };
+ }
+ }
+ }
+case 115:
+ { return this._stringToken(cursor, true); }
+case 116:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 66; continue; };
+ if (yych <= '\f') { gotoCase = 116; continue; };
+ { gotoCase = 66; continue; };
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '&') { gotoCase = 116; continue; };
+ { gotoCase = 121; continue; };
+ } else {
+ if (yych != '\\') { gotoCase = 116; continue; };
+ }
+ }
+case 118:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'a') {
+ if (yych <= '!') {
+ if (yych <= '\n') {
+ if (yych <= '\t') { gotoCase = 66; continue; };
+ } else {
+ if (yych != '\r') { gotoCase = 66; continue; };
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '"') { gotoCase = 116; continue; };
+ if (yych <= '&') { gotoCase = 66; continue; };
+ { gotoCase = 116; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 116; continue; };
+ { gotoCase = 66; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'q') {
+ if (yych <= 'f') {
+ if (yych <= 'b') { gotoCase = 116; continue; };
+ if (yych <= 'e') { gotoCase = 66; continue; };
+ { gotoCase = 116; continue; };
+ } else {
+ if (yych == 'n') { gotoCase = 116; continue; };
+ { gotoCase = 66; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych == 's') { gotoCase = 66; continue; };
+ { gotoCase = 116; continue; };
+ } else {
+ if (yych == 'v') { gotoCase = 116; continue; };
+ { gotoCase = 66; continue; };
+ }
+ }
+ }
+ ++cursor;
+ this.setLexCondition(this._lexConditions.SSTRING);
+ { return this._stringToken(cursor); }
+case 121:
+ yych = this._charAt(++cursor);
+ { gotoCase = 115; continue; };
+case 122:
+ yyaccept = 0;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '-') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 32; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 32; continue; };
+ if (yych >= '!') { gotoCase = 122; continue; };
+ }
+ } else {
+ if (yych <= '$') {
+ if (yych <= '"') { gotoCase = 114; continue; };
+ if (yych >= '$') { gotoCase = 122; continue; };
+ } else {
+ if (yych == '\'') { gotoCase = 122; continue; };
+ if (yych >= '-') { gotoCase = 122; continue; };
+ }
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych <= '<') {
+ if (yych <= '.') { gotoCase = 124; continue; };
+ if (yych <= '9') { gotoCase = 122; continue; };
+ } else {
+ if (yych <= '=') { gotoCase = 122; continue; };
+ if (yych >= '@') { gotoCase = 122; continue; };
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') { gotoCase = 126; continue; };
+ if (yych <= ']') { gotoCase = 122; continue; };
+ } else {
+ if (yych == '`') { gotoCase = 124; continue; };
+ if (yych <= 'z') { gotoCase = 122; continue; };
+ }
+ }
+ }
+case 124:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 66; continue; };
+ if (yych <= '\f') { gotoCase = 124; continue; };
+ { gotoCase = 66; continue; };
+ } else {
+ if (yych <= '"') {
+ if (yych <= '!') { gotoCase = 124; continue; };
+ { gotoCase = 121; continue; };
+ } else {
+ if (yych != '\\') { gotoCase = 124; continue; };
+ }
+ }
+case 126:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'a') {
+ if (yych <= '!') {
+ if (yych <= '\n') {
+ if (yych <= '\t') { gotoCase = 66; continue; };
+ } else {
+ if (yych != '\r') { gotoCase = 66; continue; };
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '"') { gotoCase = 124; continue; };
+ if (yych <= '&') { gotoCase = 66; continue; };
+ { gotoCase = 124; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 124; continue; };
+ { gotoCase = 66; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'q') {
+ if (yych <= 'f') {
+ if (yych <= 'b') { gotoCase = 124; continue; };
+ if (yych <= 'e') { gotoCase = 66; continue; };
+ { gotoCase = 124; continue; };
+ } else {
+ if (yych == 'n') { gotoCase = 124; continue; };
+ { gotoCase = 66; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych == 's') { gotoCase = 66; continue; };
+ { gotoCase = 124; continue; };
+ } else {
+ if (yych == 'v') { gotoCase = 124; continue; };
+ { gotoCase = 66; continue; };
+ }
+ }
+ }
+ ++cursor;
+ this.setLexCondition(this._lexConditions.DSTRING);
+ { return this._stringToken(cursor); }
+/* *********************************** */
+case this.case_SSTRING:
+ yych = this._charAt(cursor);
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 133; continue; };
+ if (yych <= '\f') { gotoCase = 132; continue; };
+ { gotoCase = 133; continue; };
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '&') { gotoCase = 132; continue; };
+ { gotoCase = 135; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 137; continue; };
+ { gotoCase = 132; continue; };
+ }
+ }
+case 131:
+ { return this._stringToken(cursor); }
+case 132:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 139; continue; };
+case 133:
+ ++cursor;
+case 134:
+ { this.tokenType = null; return cursor; }
+case 135:
+ ++cursor;
+case 136:
+ this.setLexCondition(this._lexConditions.INITIAL);
+ { return this._stringToken(cursor, true); }
+case 137:
+ yych = this._charAt(++cursor);
+ if (yych <= 'e') {
+ if (yych <= '\'') {
+ if (yych == '"') { gotoCase = 138; continue; };
+ if (yych <= '&') { gotoCase = 134; continue; };
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '[') { gotoCase = 134; continue; };
+ } else {
+ if (yych != 'b') { gotoCase = 134; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych <= 'm') {
+ if (yych >= 'g') { gotoCase = 134; continue; };
+ } else {
+ if (yych <= 'n') { gotoCase = 138; continue; };
+ if (yych <= 'q') { gotoCase = 134; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych <= 's') { gotoCase = 134; continue; };
+ } else {
+ if (yych != 'v') { gotoCase = 134; continue; };
+ }
+ }
+ }
+case 138:
+ yyaccept = 0;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+case 139:
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 131; continue; };
+ if (yych <= '\f') { gotoCase = 138; continue; };
+ { gotoCase = 131; continue; };
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '&') { gotoCase = 138; continue; };
+ { gotoCase = 142; continue; };
+ } else {
+ if (yych != '\\') { gotoCase = 138; continue; };
+ }
+ }
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'e') {
+ if (yych <= '\'') {
+ if (yych == '"') { gotoCase = 138; continue; };
+ if (yych >= '\'') { gotoCase = 138; continue; };
+ } else {
+ if (yych <= '\\') {
+ if (yych >= '\\') { gotoCase = 138; continue; };
+ } else {
+ if (yych == 'b') { gotoCase = 138; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych <= 'm') {
+ if (yych <= 'f') { gotoCase = 138; continue; };
+ } else {
+ if (yych <= 'n') { gotoCase = 138; continue; };
+ if (yych >= 'r') { gotoCase = 138; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych >= 't') { gotoCase = 138; continue; };
+ } else {
+ if (yych == 'v') { gotoCase = 138; continue; };
+ }
+ }
+ }
+ cursor = YYMARKER;
+ { gotoCase = 131; continue; };
+case 142:
+ ++cursor;
+ yych = this._charAt(cursor);
+ { gotoCase = 136; continue; };
+ }
+
+ }
+ }
+}
+
+WebInspector.SourceCSSTokenizer.prototype.__proto__ = WebInspector.SourceTokenizer.prototype;
diff --git a/WebCore/inspector/front-end/SourceCSSTokenizer.re2js b/WebCore/inspector/front-end/SourceCSSTokenizer.re2js
new file mode 100644
index 0000000..8d6c5f1
--- /dev/null
+++ b/WebCore/inspector/front-end/SourceCSSTokenizer.re2js
@@ -0,0 +1,318 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Generate js file as follows:
+//
+// re2c -isc WebCore/inspector/front-end/SourceCSSTokenizer.re2js \
+// | sed 's|^yy\([^:]*\)*\:|case \1:|' \
+// | sed 's|[*]cursor[+][+]|this._charAt(cursor++)|' \
+// | sed 's|[[*][+][+]cursor|this._charAt(++cursor)|' \
+// | sed 's|[*]cursor|this._charAt(cursor)|' \
+// | sed 's|yych = \*\([^;]*\)|yych = this._charAt\1|' \
+// | sed 's|goto case \([^;]*\)|{ gotoCase = \1; continue; }|' \
+// | sed 's|unsigned\ int|var|' \
+// | sed 's|var\ yych|case 1: var yych|'
+
+WebInspector.SourceCSSTokenizer = function()
+{
+ WebInspector.SourceTokenizer.call(this);
+
+ this._propertyKeywords = [
+ "background", "background-attachment", "background-clip", "background-color", "background-image",
+ "background-origin", "background-position", "background-position-x", "background-position-y",
+ "background-repeat", "background-repeat-x", "background-repeat-y", "background-size", "border",
+ "border-bottom", "border-bottom-color", "border-bottom-left-radius", "border-bottom-right-radius",
+ "border-bottom-style", "border-bottom-width", "border-collapse", "border-color", "border-left",
+ "border-left-color", "border-left-style", "border-left-width", "border-radius", "border-right",
+ "border-right-color", "border-right-style", "border-right-width", "border-spacing", "border-style",
+ "border-top", "border-top-color", "border-top-left-radius", "border-top-right-radius", "border-top-style",
+ "border-top-width", "border-width", "bottom", "caption-side", "clear", "clip", "color", "content",
+ "counter-increment", "counter-reset", "cursor", "direction", "display", "empty-cells", "float",
+ "font", "font-family", "font-size", "font-stretch", "font-style", "font-variant", "font-weight",
+ "height", "left", "letter-spacing", "line-height", "list-style", "list-style-image", "list-style-position",
+ "list-style-type", "margin", "margin-bottom", "margin-left", "margin-right", "margin-top", "max-height",
+ "max-width", "min-height", "min-width", "opacity", "orphans", "outline", "outline-color", "outline-offset",
+ "outline-style", "outline-width", "overflow", "overflow-x", "overflow-y", "padding", "padding-bottom",
+ "padding-left", "padding-right", "padding-top", "page", "page-break-after", "page-break-before",
+ "page-break-inside", "pointer-events", "position", "quotes", "resize", "right", "size", "src",
+ "table-layout", "text-align", "text-decoration", "text-indent", "text-line-through", "text-line-through-color",
+ "text-line-through-mode", "text-line-through-style", "text-line-through-width", "text-overflow", "text-overline",
+ "text-overline-color", "text-overline-mode", "text-overline-style", "text-overline-width", "text-rendering",
+ "text-shadow", "text-transform", "text-underline", "text-underline-color", "text-underline-mode",
+ "text-underline-style", "text-underline-width", "top", "unicode-bidi", "unicode-range", "vertical-align",
+ "visibility", "white-space", "widows", "width", "word-break", "word-spacing", "word-wrap", "z-index", "zoom",
+ "-webkit-animation", "-webkit-animation-delay", "-webkit-animation-direction", "-webkit-animation-duration",
+ "-webkit-animation-iteration-count", "-webkit-animation-name", "-webkit-animation-play-state",
+ "-webkit-animation-timing-function", "-webkit-appearance", "-webkit-backface-visibility",
+ "-webkit-background-clip", "-webkit-background-composite", "-webkit-background-origin", "-webkit-background-size",
+ "-webkit-binding", "-webkit-border-fit", "-webkit-border-horizontal-spacing", "-webkit-border-image",
+ "-webkit-border-radius", "-webkit-border-vertical-spacing", "-webkit-box-align", "-webkit-box-direction",
+ "-webkit-box-flex", "-webkit-box-flex-group", "-webkit-box-lines", "-webkit-box-ordinal-group",
+ "-webkit-box-orient", "-webkit-box-pack", "-webkit-box-reflect", "-webkit-box-shadow", "-webkit-box-sizing",
+ "-webkit-column-break-after", "-webkit-column-break-before", "-webkit-column-break-inside", "-webkit-column-count",
+ "-webkit-column-gap", "-webkit-column-rule", "-webkit-column-rule-color", "-webkit-column-rule-style",
+ "-webkit-column-rule-width", "-webkit-column-width", "-webkit-columns", "-webkit-font-size-delta",
+ "-webkit-font-smoothing", "-webkit-highlight", "-webkit-line-break", "-webkit-line-clamp",
+ "-webkit-margin-bottom-collapse", "-webkit-margin-collapse", "-webkit-margin-start", "-webkit-margin-top-collapse",
+ "-webkit-marquee", "-webkit-marquee-direction", "-webkit-marquee-increment", "-webkit-marquee-repetition",
+ "-webkit-marquee-speed", "-webkit-marquee-style", "-webkit-mask", "-webkit-mask-attachment",
+ "-webkit-mask-box-image", "-webkit-mask-clip", "-webkit-mask-composite", "-webkit-mask-image",
+ "-webkit-mask-origin", "-webkit-mask-position", "-webkit-mask-position-x", "-webkit-mask-position-y",
+ "-webkit-mask-repeat", "-webkit-mask-repeat-x", "-webkit-mask-repeat-y", "-webkit-mask-size",
+ "-webkit-match-nearest-mail-blockquote-color", "-webkit-nbsp-mode", "-webkit-padding-start",
+ "-webkit-perspective", "-webkit-perspective-origin", "-webkit-perspective-origin-x", "-webkit-perspective-origin-y",
+ "-webkit-rtl-ordering", "-webkit-text-decorations-in-effect", "-webkit-text-fill-color", "-webkit-text-security",
+ "-webkit-text-size-adjust", "-webkit-text-stroke", "-webkit-text-stroke-color", "-webkit-text-stroke-width",
+ "-webkit-transform", "-webkit-transform-origin", "-webkit-transform-origin-x", "-webkit-transform-origin-y",
+ "-webkit-transform-origin-z", "-webkit-transform-style", "-webkit-transition", "-webkit-transition-delay",
+ "-webkit-transition-duration", "-webkit-transition-property", "-webkit-transition-timing-function",
+ "-webkit-user-drag", "-webkit-user-modify", "-webkit-user-select", "-webkit-variable-declaration-block"
+ ].keySet();
+
+ this._valueKeywords = [
+ "above", "absolute", "activeborder", "activecaption", "afar", "after-white-space", "ahead", "alias", "all", "all-scroll",
+ "alternate", "always","amharic", "amharic-abegede", "antialiased", "appworkspace", "aqua", "armenian", "auto", "avoid",
+ "background", "backwards", "baseline", "below", "bidi-override", "black", "blink", "block", "block-axis", "blue", "bold",
+ "bolder", "border", "border-box", "both", "bottom", "break-all", "break-word", "button", "button-bevel", "buttonface",
+ "buttonhighlight", "buttonshadow", "buttontext", "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret", "cell",
+ "center", "checkbox", "circle", "cjk-earthly-branch", "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
+ "col-resize", "collapse", "compact", "condensed", "contain", "content", "content-box", "context-menu", "continuous", "copy",
+ "cover", "crop", "cross", "crosshair", "currentcolor", "cursive", "dashed", "decimal", "decimal-leading-zero", "default",
+ "default-button", "destination-atop", "destination-in", "destination-out", "destination-over", "disc", "discard", "document",
+ "dot-dash", "dot-dot-dash", "dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out", "element",
+ "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede", "ethiopic-abegede-am-et", "ethiopic-abegede-gez",
+ "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",
+ "georgian", "gray", "graytext", "green", "grey", "groove", "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",
+ "inline-axis", "inline-block", "inline-table", "inset", "inside", "intrinsic", "invert", "italic", "justify", "katakana",
+ "katakana-iroha", "landscape", "large", "larger", "left", "level", "lighter", "lime", "line-through", "linear", "lines",
+ "list-button", "list-item", "listbox", "listitem", "local", "logical", "loud", "lower", "lower-alpha", "lower-greek", "lower-latin",
+ "lower-norwegian", "lower-roman", "lowercase", "ltr", "maroon", "match", "media-controls-background", "media-current-time-display",
+ "media-fullscreen-button", "media-mute-button", "media-play-button", "media-return-to-realtime-button", "media-rewind-button",
+ "media-seek-back-button", "media-seek-forward-button", "media-slider", "media-sliderthumb", "media-time-remaining-display",
+ "media-volume-slider", "media-volume-slider-container", "media-volume-sliderthumb", "medium", "menu", "menulist", "menulist-button",
+ "menulist-text", "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic", "mix", "monospace", "move", "multiple",
+ "n-resize", "narrower", "navy", "ne-resize", "nesw-resize", "no-close-quote", "no-drop", "no-open-quote", "no-repeat", "none",
+ "normal", "not-allowed", "nowrap", "ns-resize", "nw-resize", "nwse-resize", "oblique", "olive", "open-quote", "optimizeLegibility",
+ "optimizeSpeed", "orange", "oromo", "outset", "outside", "overlay", "overline", "padding", "padding-box", "painted", "paused",
+ "plus-darker", "plus-lighter", "pointer", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d", "progress", "purple",
+ "push-button", "radio", "read-only", "read-write", "read-write-plaintext-only", "red", "relative", "repeat", "repeat-x",
+ "repeat-y", "reset", "reverse", "rgb", "rgba", "ridge", "right", "round", "row-resize", "rtl", "run-in", "running", "s-resize", "sans-serif",
+ "scroll", "scrollbar", "se-resize", "searchfield", "searchfield-cancel-button", "searchfield-decoration", "searchfield-results-button",
+ "searchfield-results-decoration", "semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama", "silver", "single",
+ "skip-white-space", "slide", "slider-horizontal", "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
+ "small", "small-caps", "small-caption", "smaller", "solid", "somali", "source-atop", "source-in", "source-out", "source-over",
+ "space", "square", "square-button", "start", "static", "status-bar", "stretch", "stroke", "sub", "subpixel-antialiased", "super",
+ "sw-resize", "table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group",
+ "table-row", "table-row-group", "teal", "text", "text-bottom", "text-top", "textarea", "textfield", "thick", "thin", "threeddarkshadow",
+ "threedface", "threedhighlight", "threedlightshadow", "threedshadow", "tigre", "tigrinya-er", "tigrinya-er-abegede", "tigrinya-et",
+ "tigrinya-et-abegede", "to", "top", "transparent", "ultra-condensed", "ultra-expanded", "underline", "up", "upper-alpha", "upper-greek",
+ "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "url", "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted",
+ "visibleStroke", "visual", "w-resize", "wait", "wave", "white", "wider", "window", "windowframe", "windowtext", "x-large", "x-small",
+ "xor", "xx-large", "xx-small", "yellow", "-wap-marquee", "-webkit-activelink", "-webkit-auto", "-webkit-baseline-middle", "-webkit-body",
+ "-webkit-box", "-webkit-center", "-webkit-control", "-webkit-focus-ring-color", "-webkit-grab", "-webkit-grabbing", "-webkit-gradient", "-webkit-inline-box",
+ "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-right", "-webkit-small-control",
+ "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",
+ ].keySet();
+
+ this._mediaTypes = ["all", "aural", "braille", "embossed", "handheld", "import", "print", "projection", "screen", "tty", "tv"].keySet();
+
+ this._lexConditions = {
+ INITIAL: 0,
+ COMMENT: 1,
+ DSTRING: 2,
+ SSTRING: 3
+ };
+
+ this._parseConditions = {
+ INITIAL: 0,
+ PROPERTY: 1,
+ PROPERTY_VALUE: 2,
+ AT_RULE: 3
+ };
+
+ this.case_INITIAL = 1000;
+ this.case_COMMENT = 1002;
+ this.case_DSTRING = 1003;
+ this.case_SSTRING = 1004;
+
+ this.initialCondition = { lexCondition: this._lexConditions.INITIAL, parseCondition: this._parseConditions.INITIAL }
+}
+
+WebInspector.SourceCSSTokenizer.prototype = {
+ _stringToken: function(cursor, stringEnds)
+ {
+ if (this._isPropertyValue())
+ this.tokenType = "css-string";
+ else
+ this.tokenType = null;
+ return cursor;
+ },
+
+ _isPropertyValue: function()
+ {
+ return this._parseCondition === this._parseConditions.PROPERTY_VALUE || this._parseCondition === this._parseConditions.AT_RULE;
+ },
+
+ nextToken: function(cursor)
+ {
+ var cursorOnEnter = cursor;
+ var gotoCase = 1;
+ while (1) {
+ switch (gotoCase)
+ // Following comment is replaced with generated state machine.
+ /*!re2c
+ re2c:define:YYCTYPE = "var";
+ re2c:define:YYCURSOR = cursor;
+ re2c:define:YYGETCONDITION = "this.getLexCondition";
+ re2c:define:YYSETCONDITION = "this.setLexCondition";
+ re2c:condprefix = "case this.case_";
+ re2c:condenumprefix = "this._lexConditions.";
+ re2c:yyfill:enable = 0;
+ re2c:labelprefix = "case ";
+ re2c:indent:top = 2;
+ re2c:indent:string = " ";
+
+ CommentContent = ([^*\r\n] | ("*"+[^/*]))*;
+ Comment = "/*" CommentContent "*"+ "/";
+ CommentStart = "/*" CommentContent [\r\n];
+ CommentEnd = CommentContent "*"+ "/";
+
+ OpenCurlyBracket = "{";
+ CloseCurlyBracket = "}";
+
+ Colon = ":";
+ Semicolon = ";";
+
+ NumericLiteral = "-"? ([0-9]+ | [0-9]* "." [0-9]+) ("em" | "rem" | "__qem" | "ex" | "px" | "cm" |
+ "mm" | "in" | "pt" | "pc" | "deg" | "rad" | "grad" | "turn" | "ms" | "s" | "Hz" | "kHz" | "%")?;
+
+ Identifier = [@!_\-$0-9a-zA-Z\[\]='"/]+;
+
+ DoubleStringContent = ([^\r\n\"\\] | "\\" ['"\\bfnrtv])*;
+ SingleStringContent = ([^\r\n\'\\] | "\\" ['"\\bfnrtv])*;
+ StringLiteral = "\"" DoubleStringContent "\"" | "'" SingleStringContent "'";
+ DoubleStringStart = "\"" DoubleStringContent "\\" [\r\n];
+ DoubleStringEnd = DoubleStringContent "\"";
+ SingleStringStart = "'" SingleStringContent "\\" [\r\n];
+ SingleStringEnd = SingleStringContent "'";
+
+ <INITIAL> Comment { this.tokenType = "css-comment"; return cursor; }
+ <INITIAL> CommentStart => COMMENT { this.tokenType = "css-comment"; return cursor; }
+ <COMMENT> CommentContent => COMMENT { this.tokenType = "css-comment"; return cursor; }
+ <COMMENT> CommentEnd => INITIAL { this.tokenType = "css-comment"; return cursor; }
+
+ <INITIAL> StringLiteral { return this._stringToken(cursor, true); }
+ <INITIAL> DoubleStringStart => DSTRING { return this._stringToken(cursor); }
+ <DSTRING> DoubleStringContent => DSTRING { return this._stringToken(cursor); }
+ <DSTRING> DoubleStringEnd => INITIAL { return this._stringToken(cursor, true); }
+ <INITIAL> SingleStringStart => SSTRING { return this._stringToken(cursor); }
+ <SSTRING> SingleStringContent => SSTRING { return this._stringToken(cursor); }
+ <SSTRING> SingleStringEnd => INITIAL { return this._stringToken(cursor, true); }
+
+ <INITIAL> OpenCurlyBracket
+ {
+ this.tokenType = null;
+ if (this._parseCondition === this._parseConditions.AT_RULE)
+ this._parseCondition = this._parseConditions.INITIAL;
+ else
+ this._parseCondition = this._parseConditions.PROPERTY;
+ return cursor;
+ }
+
+ <INITIAL> CloseCurlyBracket
+ {
+ this.tokenType = null;
+ this._parseCondition = this._parseConditions.INITIAL;
+ return cursor;
+ }
+
+ <INITIAL> Colon
+ {
+ this.tokenType = null;
+ if (this._parseCondition === this._parseConditions.PROPERTY)
+ this._parseCondition = this._parseConditions.PROPERTY_VALUE;
+ return cursor;
+ }
+
+ <INITIAL> Semicolon
+ {
+ this.tokenType = null;
+ if (this._parseCondition === this._parseConditions.AT_RULE)
+ this._parseCondition = this._parseConditions.INITIAL;
+ else
+ this._parseCondition = this._parseConditions.PROPERTY;
+ return cursor;
+ }
+
+ <INITIAL> NumericLiteral
+ {
+ if (this._isPropertyValue())
+ this.tokenType = "css-number";
+ else
+ this.tokenType = null;
+ return cursor;
+ }
+
+ <INITIAL> Identifier
+ {
+ var token = this._line.substring(cursorOnEnter, cursor);
+ if (this._parseCondition === this._parseConditions.INITIAL) {
+ if (token === "@import" || token === "@media") {
+ this.tokenType = "css-at-rule";
+ this._parseCondition = this._parseConditions.AT_RULE;
+ } else if (token.indexOf("@") === 0)
+ this.tokenType = "css-at-rule";
+ else
+ this.tokenType = "css-selector";
+ }
+ else if (this._parseCondition === this._parseConditions.AT_RULE && token in this._mediaTypes)
+ this.tokenType = "css-keyword";
+ else if (this._parseCondition === this._parseConditions.PROPERTY && token in this._propertyKeywords)
+ this.tokenType = "css-property";
+ else if (this._isPropertyValue() && token in this._valueKeywords)
+ this.tokenType = "css-keyword";
+ else if (token === "!important")
+ this.tokenType = "css-important";
+ else
+ this.tokenType = null;
+ return cursor;
+ }
+ <*> [^] { this.tokenType = null; return cursor; }
+ */
+ }
+ }
+}
+
+WebInspector.SourceCSSTokenizer.prototype.__proto__ = WebInspector.SourceTokenizer.prototype;
diff --git a/WebCore/inspector/front-end/SourceFrame.js b/WebCore/inspector/front-end/SourceFrame.js
index b5cf4c0..1e1bd0c 100644
--- a/WebCore/inspector/front-end/SourceFrame.js
+++ b/WebCore/inspector/front-end/SourceFrame.js
@@ -1,45 +1,58 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- * Copyright (C) 2009 Joseph Pecoraro
+ * Copyright (C) 2009 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 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.
+ * modification, are permitted provided that the following conditions are
+ * met:
*
- * 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
+ * * 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.SourceFrame = function(element, addBreakpointDelegate)
+WebInspector.SourceFrame = function(parentElement, addBreakpointDelegate)
{
- this.messages = [];
+ this._parentElement = parentElement;
+
+ this._textModel = new WebInspector.TextEditorModel();
+
+ this._messages = [];
+ this._rowMessages = {};
+ this._messageBubbles = {};
this.breakpoints = [];
this._shortcuts = {};
- this.addBreakpointDelegate = addBreakpointDelegate;
-
- this.element = element || document.createElement("iframe");
- this.element.addStyleClass("source-view-frame");
- this.element.setAttribute("viewsource", "true");
+ this._loaded = false;
- this.element.addEventListener("load", this._loaded.bind(this), false);
+ this._addBreakpointDelegate = addBreakpointDelegate;
}
WebInspector.SourceFrame.prototype = {
+
+ set visible(visible)
+ {
+ this._visible = visible;
+ this._createEditorIfNeeded();
+ },
+
get executionLine()
{
return this._executionLine;
@@ -49,84 +62,25 @@ WebInspector.SourceFrame.prototype = {
{
if (this._executionLine === x)
return;
-
- var previousLine = this._executionLine;
this._executionLine = x;
-
- this._updateExecutionLine(previousLine);
- },
-
- get autoSizesToFitContentHeight()
- {
- return this._autoSizesToFitContentHeight;
- },
-
- set autoSizesToFitContentHeight(x)
- {
- if (this._autoSizesToFitContentHeight === x)
- return;
-
- this._autoSizesToFitContentHeight = x;
-
- if (this._autoSizesToFitContentHeight) {
- this._windowResizeListener = this._windowResized.bind(this);
- window.addEventListener("resize", this._windowResizeListener, false);
- this.sizeToFitContentHeight();
- } else {
- this.element.style.removeProperty("height");
- if (this.element.contentDocument)
- this.element.contentDocument.body.removeStyleClass("webkit-height-sized-to-fit");
- window.removeEventListener("resize", this._windowResizeListener, false);
- delete this._windowResizeListener;
- }
- },
-
- sourceRow: function(lineNumber)
- {
- if (!lineNumber || !this.element.contentDocument)
- return;
-
- var table = this.element.contentDocument.getElementsByTagName("table")[0];
- if (!table)
- return;
-
- var rows = table.rows;
-
- // Line numbers are a 1-based index, but the rows collection is 0-based.
- --lineNumber;
-
- return rows[lineNumber];
- },
-
- lineNumberForSourceRow: function(sourceRow)
- {
- // Line numbers are a 1-based index, but the rows collection is 0-based.
- var lineNumber = 0;
- while (sourceRow) {
- ++lineNumber;
- sourceRow = sourceRow.previousSibling;
- }
-
- return lineNumber;
+ if (this._editor)
+ this._editor.repaintAll();
},
revealLine: function(lineNumber)
{
- if (!this._isContentLoaded()) {
+ if (this._editor)
+ this._editor.reveal(lineNumber - 1, 0);
+ else
this._lineNumberToReveal = lineNumber;
- return;
- }
-
- var row = this.sourceRow(lineNumber);
- if (row)
- row.scrollIntoViewIfNeeded(true);
},
addBreakpoint: function(breakpoint)
{
this.breakpoints.push(breakpoint);
- breakpoint.addEventListener("enabled", this._breakpointEnableChanged, this);
- breakpoint.addEventListener("disabled", this._breakpointEnableChanged, this);
+ breakpoint.addEventListener("enabled", this._breakpointChanged, this);
+ breakpoint.addEventListener("disabled", this._breakpointChanged, this);
+ breakpoint.addEventListener("condition-changed", this._breakpointChanged, this);
this._addBreakpointToSource(breakpoint);
},
@@ -135,6 +89,7 @@ WebInspector.SourceFrame.prototype = {
this.breakpoints.remove(breakpoint);
breakpoint.removeEventListener("enabled", null, this);
breakpoint.removeEventListener("disabled", null, this);
+ breakpoint.removeEventListener("condition-changed", null, this);
this._removeBreakpointFromSource(breakpoint);
},
@@ -143,368 +98,135 @@ WebInspector.SourceFrame.prototype = {
// Don't add the message if there is no message or valid line or if the msg isn't an error or warning.
if (!msg.message || msg.line <= 0 || !msg.isErrorOrWarning())
return;
- this.messages.push(msg);
- this._addMessageToSource(msg);
+ this._messages.push(msg)
+ if (this._editor)
+ this._addMessageToSource(msg);
},
clearMessages: function()
{
- this.messages = [];
-
- if (!this.element.contentDocument)
- return;
-
- var bubbles = this.element.contentDocument.querySelectorAll(".webkit-html-message-bubble");
- if (!bubbles)
- return;
-
- for (var i = 0; i < bubbles.length; ++i) {
- var bubble = bubbles[i];
+ for (var line in this._messageBubbles) {
+ var bubble = this._messageBubbles[line];
bubble.parentNode.removeChild(bubble);
}
+
+ this._messages = [];
+ this._rowMessages = {};
+ this._messageBubbles = {};
+ if (this._editor)
+ this._editor.revalidateDecorationsAndPaint();
},
sizeToFitContentHeight: function()
{
- if (this.element.contentDocument) {
- this.element.style.setProperty("height", this.element.contentDocument.body.offsetHeight + "px");
- this.element.contentDocument.body.addStyleClass("webkit-height-sized-to-fit");
- }
+ if (this._editor)
+ this._editor.revalidateDecorationsAndPaint();
},
- _highlightLineEnds: function(event)
+ setContent: function(mimeType, content)
{
- event.target.parentNode.removeStyleClass("webkit-highlighted-line");
+ this._loaded = true;
+ this._textModel.setText(null, content);
+ this._mimeType = mimeType;
+ this._createEditorIfNeeded();
},
- highlightLine: function(lineNumber)
+ _createEditorIfNeeded: function()
{
- if (!this._isContentLoaded()) {
- this._lineNumberToHighlight = lineNumber;
+ if (!this._visible || !this._loaded || this._editor)
return;
- }
- var sourceRow = this.sourceRow(lineNumber);
- if (!sourceRow)
- return;
- var line = sourceRow.getElementsByClassName('webkit-line-content')[0];
- // Trick to reset the animation if the user clicks on the same link
- // Using a timeout to avoid coalesced style updates
- line.style.setProperty("-webkit-animation-name", "none");
- setTimeout(function () {
- line.style.removeProperty("-webkit-animation-name");
- sourceRow.addStyleClass("webkit-highlighted-line");
- }, 0);
- },
+ var editorConstructor = Preferences.useCanvasBasedEditor ? WebInspector.TextEditor : WebInspector.NativeTextViewer;
+ this._editor = new editorConstructor(this._textModel, WebInspector.platform);
+ this._editor.lineNumberDecorator = new WebInspector.BreakpointLineNumberDecorator(this, this._editor.textModel);
+ this._editor.lineDecorator = new WebInspector.ExecutionLineDecorator(this);
+ this._editor.readOnly = true;
+ this._element = this._editor.element;
+ this._element.addEventListener("keydown", this._keyDown.bind(this), true);
+ this._parentElement.appendChild(this._element);
- _loaded: function()
- {
- WebInspector.addMainEventListeners(this.element.contentDocument);
- this.element.contentDocument.addEventListener("contextmenu", this._documentContextMenu.bind(this), true);
- this.element.contentDocument.addEventListener("mousedown", this._documentMouseDown.bind(this), true);
- this.element.contentDocument.addEventListener("keydown", this._documentKeyDown.bind(this), true);
- this.element.contentDocument.addEventListener("keyup", WebInspector.documentKeyUp.bind(WebInspector), true);
- this.element.contentDocument.addEventListener("webkitAnimationEnd", this._highlightLineEnds.bind(this), false);
-
- // Register 'eval' shortcut.
- var platformSpecificModifier = WebInspector.isMac() ? WebInspector.KeyboardShortcut.Modifiers.Meta : WebInspector.KeyboardShortcut.Modifiers.Ctrl;
- var shortcut = WebInspector.KeyboardShortcut.makeKey(69 /* 'E' */, platformSpecificModifier | WebInspector.KeyboardShortcut.Modifiers.Shift);
- this._shortcuts[shortcut] = this._evalSelectionInCallFrame.bind(this);
-
- var headElement = this.element.contentDocument.head;
- if (!headElement) {
- headElement = this.element.contentDocument.createElement("head");
- this.element.contentDocument.documentElement.insertBefore(headElement, this.element.contentDocument.documentElement.firstChild);
- }
-
- var linkElement = this.element.contentDocument.createElement("link");
- linkElement.type = "text/css";
- linkElement.rel = "stylesheet";
- linkElement.href = "inspectorSyntaxHighlight.css";
- headElement.appendChild(linkElement);
-
- var styleElement = this.element.contentDocument.createElement("style");
- headElement.appendChild(styleElement);
-
- // Add these style rules here since they are specific to the Inspector. They also behave oddly and not
- // all properties apply if added to view-source.css (because it is a user agent sheet.)
- var styleText = ".webkit-line-number { background-repeat: no-repeat; background-position: right 1px; }\n";
- styleText += ".webkit-execution-line .webkit-line-number { color: transparent; background-image: -webkit-canvas(program-counter); }\n";
-
- styleText += ".webkit-breakpoint .webkit-line-number { color: white; background-image: -webkit-canvas(breakpoint); }\n";
- styleText += ".webkit-breakpoint-disabled .webkit-line-number { color: white; background-image: -webkit-canvas(breakpoint-disabled); }\n";
- styleText += ".webkit-breakpoint.webkit-execution-line .webkit-line-number { color: transparent; background-image: -webkit-canvas(breakpoint-program-counter); }\n";
- styleText += ".webkit-breakpoint-disabled.webkit-execution-line .webkit-line-number { color: transparent; background-image: -webkit-canvas(breakpoint-disabled-program-counter); }\n";
-
- styleText += ".webkit-breakpoint.webkit-breakpoint-conditional .webkit-line-number { color: white; background-image: -webkit-canvas(breakpoint-conditional); }\n";
- styleText += ".webkit-breakpoint-disabled.webkit-breakpoint-conditional .webkit-line-number { color: white; background-image: -webkit-canvas(breakpoint-disabled-conditional); }\n";
- styleText += ".webkit-breakpoint.webkit-breakpoint-conditional.webkit-execution-line .webkit-line-number { color: transparent; background-image: -webkit-canvas(breakpoint-conditional-program-counter); }\n";
- styleText += ".webkit-breakpoint-disabled.webkit-breakpoint-conditional.webkit-execution-line .webkit-line-number { color: transparent; background-image: -webkit-canvas(breakpoint-disabled-conditional-program-counter); }\n";
-
- styleText += ".webkit-execution-line .webkit-line-content { background-color: rgb(171, 191, 254); outline: 1px solid rgb(64, 115, 244); }\n";
- styleText += ".webkit-height-sized-to-fit { overflow-y: hidden }\n";
- styleText += ".webkit-line-content { background-color: white; }\n";
- styleText += "@-webkit-keyframes fadeout {from {background-color: rgb(255, 255, 120);} to { background-color: white;}}\n";
- styleText += ".webkit-highlighted-line .webkit-line-content { background-color: rgb(255, 255, 120); -webkit-animation: 'fadeout' 2s 500ms}\n";
-
- // TODO: Move these styles into inspector.css once https://bugs.webkit.org/show_bug.cgi?id=28913 is fixed and popup moved into the top frame.
- styleText += ".popup-content { position: absolute; z-index: 10000; padding: 4px; background-color: rgb(203, 226, 255); -webkit-border-radius: 7px; border: 2px solid rgb(169, 172, 203); }";
- styleText += ".popup-glasspane { position: absolute; top: 0; left: 0; height: 100%; width: 100%; opacity: 0; z-index: 9900; }";
- styleText += ".popup-message { background-color: transparent; font-family: Lucida Grande, sans-serif; font-weight: normal; font-size: 11px; text-align: left; text-shadow: none; color: rgb(85, 85, 85); cursor: default; margin: 0 0 2px 0; }";
- styleText += ".popup-content.breakpoint-condition { width: 90%; }";
- styleText += ".popup-content input#bp-condition { font-family: monospace; margin: 0; border: 1px inset rgb(190, 190, 190) !important; width: 100%; box-shadow: none !important; outline: none !important; -webkit-user-modify: read-write; }";
- // This class is already in inspector.css
- styleText += ".hidden { display: none !important; }";
-
- styleElement.textContent = styleText;
-
- this._needsProgramCounterImage = true;
- this._needsBreakpointImages = true;
-
- this.element.contentWindow.Element.prototype.addStyleClass = Element.prototype.addStyleClass;
- this.element.contentWindow.Element.prototype.removeStyleClass = Element.prototype.removeStyleClass;
- this.element.contentWindow.Element.prototype.removeChildren = Element.prototype.removeChildren;
- this.element.contentWindow.Element.prototype.positionAt = Element.prototype.positionAt;
- this.element.contentWindow.Element.prototype.removeMatchingStyleClasses = Element.prototype.removeMatchingStyleClasses;
- this.element.contentWindow.Element.prototype.hasStyleClass = Element.prototype.hasStyleClass;
- this.element.contentWindow.Element.prototype.pageOffsetRelativeToWindow = Element.prototype.pageOffsetRelativeToWindow;
- this.element.contentWindow.Element.prototype.__defineGetter__("totalOffsetLeft", Element.prototype.__lookupGetter__("totalOffsetLeft"));
- this.element.contentWindow.Element.prototype.__defineGetter__("totalOffsetTop", Element.prototype.__lookupGetter__("totalOffsetTop"));
- this.element.contentWindow.Node.prototype.enclosingNodeOrSelfWithNodeName = Node.prototype.enclosingNodeOrSelfWithNodeName;
- this.element.contentWindow.Node.prototype.enclosingNodeOrSelfWithNodeNameInArray = Node.prototype.enclosingNodeOrSelfWithNodeNameInArray;
+ this._editor.mimeType = this._mimeType;
this._addExistingMessagesToSource();
this._addExistingBreakpointsToSource();
- this._updateExecutionLine();
+
+ this._editor.setCoalescingUpdate(true);
+ this._editor.resize();
+ this._editor.revalidateDecorationsAndPaint();
+
if (this._executionLine)
this.revealLine(this._executionLine);
- if (this.autoSizesToFitContentHeight)
- this.sizeToFitContentHeight();
-
if (this._lineNumberToReveal) {
this.revealLine(this._lineNumberToReveal);
delete this._lineNumberToReveal;
}
- if (this._lineNumberToHighlight) {
- this.highlightLine(this._lineNumberToHighlight);
- delete this._lineNumberToHighlight;
+ if (this._pendingSelectionRange) {
+ var range = this._pendingSelectionRange;
+ this._editor.setSelection(range.startLine, range.startColumn, range.endLine, range.endColumn);
+ delete this._pendingSelectionRange;
}
-
- this.dispatchEventToListeners("content loaded");
- },
-
- _isContentLoaded: function() {
- var doc = this.element.contentDocument;
- return doc && doc.getElementsByTagName("table")[0];
- },
-
- _windowResized: function(event)
- {
- if (!this._autoSizesToFitContentHeight)
- return;
- this.sizeToFitContentHeight();
- },
-
- _documentContextMenu: function(event)
- {
- if (!event.target.hasStyleClass("webkit-line-number"))
- return;
- var sourceRow = event.target.enclosingNodeOrSelfWithNodeName("tr");
- if (!sourceRow._breakpointObject && this.addBreakpointDelegate)
- this.addBreakpointDelegate(this.lineNumberForSourceRow(sourceRow));
-
- var breakpoint = sourceRow._breakpointObject;
- if (!breakpoint)
- return;
-
- this._editBreakpointCondition(event.target, sourceRow, breakpoint);
- event.preventDefault();
- },
-
- _documentMouseDown: function(event)
- {
- if (!event.target.hasStyleClass("webkit-line-number"))
- return;
- if (event.button != 0 || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
- return;
- var sourceRow = event.target.enclosingNodeOrSelfWithNodeName("tr");
- if (sourceRow._breakpointObject && sourceRow._breakpointObject.enabled)
- sourceRow._breakpointObject.enabled = false;
- else if (sourceRow._breakpointObject)
- WebInspector.panels.scripts.removeBreakpoint(sourceRow._breakpointObject);
- else if (this.addBreakpointDelegate)
- this.addBreakpointDelegate(this.lineNumberForSourceRow(sourceRow));
-
- event.preventDefault();
+ this._editor.setCoalescingUpdate(false);
},
- _editBreakpointCondition: function(eventTarget, sourceRow, breakpoint)
+ findSearchMatches: function(query)
{
- // TODO: Migrate the popup to the top-level document and remove the blur listener from conditionElement once https://bugs.webkit.org/show_bug.cgi?id=28913 is fixed.
- var popupDocument = this.element.contentDocument;
- this._showBreakpointConditionPopup(eventTarget, breakpoint.line, popupDocument);
+ var ranges = [];
- function committed(element, newText)
- {
- breakpoint.condition = newText;
- if (breakpoint.condition)
- sourceRow.addStyleClass("webkit-breakpoint-conditional");
- else
- sourceRow.removeStyleClass("webkit-breakpoint-conditional");
- dismissed.call(this);
+ // First do case-insensitive search.
+ var regex = "";
+ for (var i = 0; i < query.length; ++i) {
+ var char = query.charAt(i);
+ if (char === "]")
+ char = "\\]";
+ regex += "[" + char + "]";
}
-
- function dismissed()
- {
- this._popup.hide();
- delete this._conditionEditorElement;
+ var regexObject = new RegExp(regex, "i");
+ this._collectRegexMatches(regexObject, ranges);
+
+ // Then try regex search if user knows the / / hint.
+ try {
+ if (/^\/.*\/$/.test(query))
+ this._collectRegexMatches(new RegExp(query.substring(1, query.length - 1)), ranges);
+ } catch (e) {
+ // Silent catch.
}
-
- var dismissedHandler = dismissed.bind(this);
- this._conditionEditorElement.addEventListener("blur", dismissedHandler, false);
-
- WebInspector.startEditing(this._conditionEditorElement, committed.bind(this), dismissedHandler);
- this._conditionEditorElement.value = breakpoint.condition;
- this._conditionEditorElement.select();
+ return ranges;
},
- _showBreakpointConditionPopup: function(clickedElement, lineNumber, popupDocument)
+ _collectRegexMatches: function(regexObject, ranges)
{
- var popupContentElement = this._createPopupElement(lineNumber, popupDocument);
- var lineElement = clickedElement.enclosingNodeOrSelfWithNodeName("td").nextSibling;
- if (this._popup) {
- this._popup.hide();
- this._popup.element = popupContentElement;
- } else {
- this._popup = new WebInspector.Popup(popupContentElement);
- this._popup.autoHide = true;
- }
- this._popup.anchor = lineElement;
- this._popup.show();
- },
-
- _createPopupElement: function(lineNumber, popupDocument)
- {
- var popupContentElement = popupDocument.createElement("div");
- popupContentElement.className = "popup-content breakpoint-condition";
-
- var labelElement = document.createElement("label");
- labelElement.className = "popup-message";
- labelElement.htmlFor = "bp-condition";
- labelElement.appendChild(document.createTextNode(WebInspector.UIString("The breakpoint on line %d will stop only if this expression is true:", lineNumber)));
- popupContentElement.appendChild(labelElement);
-
- var editorElement = document.createElement("input");
- editorElement.id = "bp-condition";
- editorElement.type = "text"
- popupContentElement.appendChild(editorElement);
- this._conditionEditorElement = editorElement;
-
- return popupContentElement;
- },
-
- _documentKeyDown: function(event)
- {
- var shortcut = WebInspector.KeyboardShortcut.makeKeyFromEvent(event);
- var handler = this._shortcuts[shortcut];
- if (handler) {
- handler(event);
- event.preventDefault();
- } else {
- WebInspector.documentKeyDown(event);
+ for (var i = 0; i < this._textModel.linesCount; ++i) {
+ var line = this._textModel.line(i);
+ var offset = 0;
+ do {
+ var match = regexObject.exec(line);
+ if (match) {
+ ranges.push(new WebInspector.TextRange(i, offset + match.index, i, offset + match.index + match[0].length));
+ offset += match.index + 1;
+ line = line.substring(match.index + 1);
+ }
+ } while (match)
}
+ return ranges;
},
- _evalSelectionInCallFrame: function(event)
- {
- if (!WebInspector.panels.scripts || !WebInspector.panels.scripts.paused)
- return;
-
- var selection = this.element.contentWindow.getSelection();
- if (!selection.rangeCount)
- return;
-
- var expression = selection.getRangeAt(0).toString().trimWhitespace();
- WebInspector.panels.scripts.evaluateInSelectedCallFrame(expression, false, "console", function(result, exception) {
- WebInspector.showConsole();
- var commandMessage = new WebInspector.ConsoleCommand(expression);
- WebInspector.console.addMessage(commandMessage);
- WebInspector.console.addMessage(new WebInspector.ConsoleCommandResult(result, exception, commandMessage));
- });
- },
-
- _breakpointEnableChanged: function(event)
+ setSelection: function(range)
{
- var breakpoint = event.target;
- var sourceRow = this.sourceRow(breakpoint.line);
- if (!sourceRow)
- return;
-
- sourceRow.addStyleClass("webkit-breakpoint");
-
- if (breakpoint.enabled)
- sourceRow.removeStyleClass("webkit-breakpoint-disabled");
+ if (this._editor)
+ this._editor.setSelection(range.startLine, range.startColumn, range.endLine, range.endColumn);
else
- sourceRow.addStyleClass("webkit-breakpoint-disabled");
+ this._pendingSelectionRange = range;
},
- _updateExecutionLine: function(previousLine)
+ clearSelection: function()
{
- if (previousLine) {
- var sourceRow = this.sourceRow(previousLine);
- if (sourceRow)
- sourceRow.removeStyleClass("webkit-execution-line");
- }
-
- if (!this._executionLine)
- return;
-
- this._drawProgramCounterImageIfNeeded();
-
- var sourceRow = this.sourceRow(this._executionLine);
- if (sourceRow)
- sourceRow.addStyleClass("webkit-execution-line");
- },
-
- _addExistingBreakpointsToSource: function()
- {
- var length = this.breakpoints.length;
- for (var i = 0; i < length; ++i)
- this._addBreakpointToSource(this.breakpoints[i]);
- },
-
- _addBreakpointToSource: function(breakpoint)
- {
- var sourceRow = this.sourceRow(breakpoint.line);
- if (!sourceRow)
- return;
-
- breakpoint.sourceText = sourceRow.getElementsByClassName('webkit-line-content')[0].textContent;
-
- this._drawBreakpointImagesIfNeeded();
-
- sourceRow._breakpointObject = breakpoint;
-
- sourceRow.addStyleClass("webkit-breakpoint");
- if (!breakpoint.enabled)
- sourceRow.addStyleClass("webkit-breakpoint-disabled");
- if (breakpoint.condition)
- sourceRow.addStyleClass("webkit-breakpoint-conditional");
- },
-
- _removeBreakpointFromSource: function(breakpoint)
- {
- var sourceRow = this.sourceRow(breakpoint.line);
- if (!sourceRow)
- return;
-
- delete sourceRow._breakpointObject;
-
- sourceRow.removeStyleClass("webkit-breakpoint");
- sourceRow.removeStyleClass("webkit-breakpoint-disabled");
- sourceRow.removeStyleClass("webkit-breakpoint-conditional");
+ if (this._editor) {
+ var range = this._editor.selection;
+ this._editor.setSelection(range.endLine, range.endColumn, range.endLine, range.endColumn);
+ } else
+ delete this._pendingSelectionRange;
},
_incrementMessageRepeatCount: function(msg, repeatDelta)
@@ -524,39 +246,39 @@ WebInspector.SourceFrame.prototype = {
_addExistingMessagesToSource: function()
{
- var length = this.messages.length;
+ var length = this._messages.length;
for (var i = 0; i < length; ++i)
- this._addMessageToSource(this.messages[i]);
+ this._addMessageToSource(this._messages[i]);
},
_addMessageToSource: function(msg)
{
- var row = this.sourceRow(msg.line);
- if (!row)
- return;
-
- var cell = row.cells[1];
- if (!cell)
+ if (msg.line >= this._textModel.linesCount)
return;
- var messageBubbleElement = cell.lastChild;
+ var messageBubbleElement = this._messageBubbles[msg.line];
if (!messageBubbleElement || messageBubbleElement.nodeType !== Node.ELEMENT_NODE || !messageBubbleElement.hasStyleClass("webkit-html-message-bubble")) {
- messageBubbleElement = this.element.contentDocument.createElement("div");
+ messageBubbleElement = document.createElement("div");
messageBubbleElement.className = "webkit-html-message-bubble";
- cell.appendChild(messageBubbleElement);
+ this._messageBubbles[msg.line] = messageBubbleElement;
+ this._editor.setDivDecoration(msg.line - 1, messageBubbleElement);
}
- if (!row.messages)
- row.messages = [];
+ var rowMessages = this._rowMessages[msg.line];
+ if (!rowMessages) {
+ rowMessages = [];
+ this._rowMessages[msg.line] = rowMessages;
+ }
- for (var i = 0; i < row.messages.length; ++i) {
- if (row.messages[i].isEqual(msg, true)) {
- this._incrementMessageRepeatCount(row.messages[i], msg.repeatDelta);
+ for (var i = 0; i < rowMessages.length; ++i) {
+ if (rowMessages[i].isEqual(msg, true)) {
+ this._incrementMessageRepeatCount(rowMessages[i], msg.repeatDelta);
+ this._editor.revalidateDecorationsAndPaint();
return;
}
}
- row.messages.push(msg);
+ rowMessages.push(msg);
var imageURL;
switch (msg.level) {
@@ -570,7 +292,7 @@ WebInspector.SourceFrame.prototype = {
break;
}
- var messageLineElement = this.element.contentDocument.createElement("div");
+ var messageLineElement = document.createElement("div");
messageLineElement.className = "webkit-html-message-line";
messageBubbleElement.appendChild(messageLineElement);
@@ -578,1580 +300,301 @@ WebInspector.SourceFrame.prototype = {
var image = document.createElement("img");
image.src = imageURL;
image.className = "webkit-html-message-icon";
-
- // Adopt the image element since it wasn't created in element's contentDocument.
- image = this.element.contentDocument.adoptNode(image);
messageLineElement.appendChild(image);
- messageLineElement.appendChild(this.element.contentDocument.createTextNode(msg.message));
+ messageLineElement.appendChild(document.createTextNode(msg.message));
msg._resourceMessageLineElement = messageLineElement;
+
+ this._editor.revalidateDecorationsAndPaint();
},
- _drawProgramCounterInContext: function(ctx, glow)
+ _addExistingBreakpointsToSource: function()
{
- if (glow)
- ctx.save();
-
- ctx.beginPath();
- ctx.moveTo(17, 2);
- ctx.lineTo(19, 2);
- ctx.lineTo(19, 0);
- ctx.lineTo(21, 0);
- ctx.lineTo(26, 5.5);
- ctx.lineTo(21, 11);
- ctx.lineTo(19, 11);
- ctx.lineTo(19, 9);
- ctx.lineTo(17, 9);
- ctx.closePath();
- ctx.fillStyle = "rgb(142, 5, 4)";
-
- if (glow) {
- ctx.shadowBlur = 4;
- ctx.shadowColor = "rgb(255, 255, 255)";
- ctx.shadowOffsetX = -1;
- ctx.shadowOffsetY = 0;
- }
-
- ctx.fill();
- ctx.fill(); // Fill twice to get a good shadow and darker anti-aliased pixels.
-
- if (glow)
- ctx.restore();
+ var length = this.breakpoints.length;
+ for (var i = 0; i < length; ++i)
+ this._addBreakpointToSource(this.breakpoints[i]);
},
- _drawProgramCounterImageIfNeeded: function()
+ _addBreakpointToSource: function(breakpoint)
{
- if (!this._needsProgramCounterImage || !this.element.contentDocument)
- return;
-
- var ctx = this.element.contentDocument.getCSSCanvasContext("2d", "program-counter", 26, 11);
- ctx.clearRect(0, 0, 26, 11);
- this._drawProgramCounterInContext(ctx, true);
+ this._textModel.setAttribute(breakpoint.line - 1, "breakpoint", breakpoint);
+ breakpoint.sourceText = this._textModel.line(breakpoint.line - 1);
+ this._editor.paintLineNumbers();
+ },
- delete this._needsProgramCounterImage;
+ _removeBreakpointFromSource: function(breakpoint)
+ {
+ this._textModel.removeAttribute(breakpoint.line - 1, "breakpoint");
+ this._editor.paintLineNumbers();
},
- _drawBreakpointImagesIfNeeded: function(conditional)
+ _contextMenu: function(lineNumber, event)
{
- if (!this._needsBreakpointImages || !this.element.contentDocument)
+ if (!this._addBreakpointDelegate)
return;
- function drawBreakpoint(ctx, disabled, conditional)
- {
- ctx.beginPath();
- ctx.moveTo(0, 2);
- ctx.lineTo(2, 0);
- ctx.lineTo(21, 0);
- ctx.lineTo(26, 5.5);
- ctx.lineTo(21, 11);
- ctx.lineTo(2, 11);
- ctx.lineTo(0, 9);
- ctx.closePath();
- ctx.fillStyle = conditional ? "rgb(217, 142, 1)" : "rgb(1, 142, 217)";
- ctx.strokeStyle = conditional ? "rgb(205, 103, 0)" : "rgb(0, 103, 205)";
- ctx.lineWidth = 3;
- ctx.fill();
- ctx.save();
- ctx.clip();
- ctx.stroke();
- ctx.restore();
+ var contextMenu = new WebInspector.ContextMenu();
- if (!disabled)
- return;
+ var breakpoint = this._textModel.getAttribute(lineNumber, "breakpoint");
+ if (!breakpoint) {
+ // This row doesn't have a breakpoint: We want to show Add Breakpoint and Add and Edit Breakpoint.
+ contextMenu.appendItem(WebInspector.UIString("Add Breakpoint"), this._addBreakpointDelegate.bind(this, lineNumber + 1));
- ctx.save();
- ctx.globalCompositeOperation = "destination-out";
- ctx.fillStyle = "rgba(0, 0, 0, 0.5)";
- ctx.fillRect(0, 0, 26, 11);
- ctx.restore();
- }
+ function addConditionalBreakpoint()
+ {
+ this._addBreakpointDelegate(lineNumber + 1);
+ var breakpoint = this._textModel.getAttribute(lineNumber, "breakpoint");
+ if (breakpoint)
+ this._editBreakpointCondition(breakpoint);
+ }
+ contextMenu.appendItem(WebInspector.UIString("Add Conditional Breakpoint..."), addConditionalBreakpoint.bind(this));
+ } else {
+ // This row has a breakpoint, we want to show edit and remove breakpoint, and either disable or enable.
+ contextMenu.appendItem(WebInspector.UIString("Remove Breakpoint"), WebInspector.panels.scripts.removeBreakpoint.bind(WebInspector.panels.scripts, breakpoint));
+ contextMenu.appendItem(WebInspector.UIString("Edit Breakpoint..."), this._editBreakpointCondition.bind(this, breakpoint));
+ if (breakpoint.enabled)
+ contextMenu.appendItem(WebInspector.UIString("Disable Breakpoint"), function() { breakpoint.enabled = false; });
+ else
+ contextMenu.appendItem(WebInspector.UIString("Enable Breakpoint"), function() { breakpoint.enabled = true; });
+ }
+ contextMenu.show(event);
+ },
- // Unconditional breakpoints.
+ _toggleBreakpoint: function(lineNumber, event)
+ {
+ if (event.button != 0 || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
+ return;
+ var breakpoint = this._textModel.getAttribute(lineNumber, "breakpoint");
+ if (breakpoint)
+ WebInspector.panels.scripts.removeBreakpoint(breakpoint);
+ else if (this._addBreakpointDelegate)
+ this._addBreakpointDelegate(lineNumber + 1);
+ event.preventDefault();
+ },
- var ctx = this.element.contentDocument.getCSSCanvasContext("2d", "breakpoint", 26, 11);
- ctx.clearRect(0, 0, 26, 11);
- drawBreakpoint(ctx);
+ _editBreakpointCondition: function(breakpoint)
+ {
+ this._showBreakpointConditionPopup(breakpoint.line);
- var ctx = this.element.contentDocument.getCSSCanvasContext("2d", "breakpoint-program-counter", 26, 11);
- ctx.clearRect(0, 0, 26, 11);
- drawBreakpoint(ctx);
- ctx.clearRect(20, 0, 6, 11);
- this._drawProgramCounterInContext(ctx, true);
+ function committed(element, newText)
+ {
+ breakpoint.condition = newText;
+ this._editor.paintLineNumbers();
+ dismissed.call(this);
+ }
- var ctx = this.element.contentDocument.getCSSCanvasContext("2d", "breakpoint-disabled", 26, 11);
- ctx.clearRect(0, 0, 26, 11);
- drawBreakpoint(ctx, true);
+ function dismissed()
+ {
+ this._editor.setDivDecoration(breakpoint.line - 1, null);
+ delete this._conditionEditorElement;
+ }
- var ctx = this.element.contentDocument.getCSSCanvasContext("2d", "breakpoint-disabled-program-counter", 26, 11);
- ctx.clearRect(0, 0, 26, 11);
- drawBreakpoint(ctx, true);
- ctx.clearRect(20, 0, 6, 11);
- this._drawProgramCounterInContext(ctx, true);
+ var dismissedHandler = dismissed.bind(this);
+ this._conditionEditorElement.addEventListener("blur", dismissedHandler, false);
+ WebInspector.startEditing(this._conditionEditorElement, committed.bind(this), dismissedHandler);
+ this._conditionEditorElement.value = breakpoint.condition;
+ this._conditionEditorElement.select();
+ },
- // Conditional breakpoints.
+ _showBreakpointConditionPopup: function(lineNumber)
+ {
+ var conditionElement = this._createConditionElement(lineNumber);
+ this._editor.setDivDecoration(lineNumber - 1, conditionElement);
+ },
- var ctx = this.element.contentDocument.getCSSCanvasContext("2d", "breakpoint-conditional", 26, 11);
- ctx.clearRect(0, 0, 26, 11);
- drawBreakpoint(ctx, false, true);
+ _createConditionElement: function(lineNumber)
+ {
+ var conditionElement = document.createElement("div");
+ conditionElement.className = "source-breakpoint-condition";
- var ctx = this.element.contentDocument.getCSSCanvasContext("2d", "breakpoint-conditional-program-counter", 26, 11);
- ctx.clearRect(0, 0, 26, 11);
- drawBreakpoint(ctx, false, true);
- ctx.clearRect(20, 0, 6, 11);
- this._drawProgramCounterInContext(ctx, true);
+ var labelElement = document.createElement("label");
+ labelElement.className = "source-breakpoint-message";
+ labelElement.htmlFor = "source-breakpoint-condition";
+ labelElement.appendChild(document.createTextNode(WebInspector.UIString("The breakpoint on line %d will stop only if this expression is true:", lineNumber)));
+ conditionElement.appendChild(labelElement);
- var ctx = this.element.contentDocument.getCSSCanvasContext("2d", "breakpoint-disabled-conditional", 26, 11);
- ctx.clearRect(0, 0, 26, 11);
- drawBreakpoint(ctx, true, true);
+ var editorElement = document.createElement("input");
+ editorElement.id = "source-breakpoint-condition";
+ editorElement.className = "monospace";
+ editorElement.type = "text"
+ conditionElement.appendChild(editorElement);
+ this._conditionEditorElement = editorElement;
- var ctx = this.element.contentDocument.getCSSCanvasContext("2d", "breakpoint-disabled-conditional-program-counter", 26, 11);
- ctx.clearRect(0, 0, 26, 11);
- drawBreakpoint(ctx, true, true);
- ctx.clearRect(20, 0, 6, 11);
- this._drawProgramCounterInContext(ctx, true);
+ return conditionElement;
+ },
- delete this._needsBreakpointImages;
+ _keyDown: function(event)
+ {
+ var shortcut = WebInspector.KeyboardShortcut.makeKeyFromEvent(event);
+ var handler = this._shortcuts[shortcut];
+ if (handler) {
+ handler(event);
+ event.preventDefault();
+ } else {
+ WebInspector.documentKeyDown(event);
+ }
},
- syntaxHighlightJavascript: function()
+ _evalSelectionInCallFrame: function(event)
{
- var table = this.element.contentDocument.getElementsByTagName("table")[0];
- if (!table)
+ if (!WebInspector.panels.scripts || !WebInspector.panels.scripts.paused)
+ return;
+
+ var selection = this.element.contentWindow.getSelection();
+ if (!selection.rangeCount)
return;
- var jsSyntaxHighlighter = new WebInspector.JavaScriptSourceSyntaxHighlighter(table, this);
- jsSyntaxHighlighter.process();
+ var expression = selection.getRangeAt(0).toString().trimWhitespace();
+ WebInspector.panels.scripts.evaluateInSelectedCallFrame(expression, false, "console", function(result, exception) {
+ WebInspector.showConsole();
+ var commandMessage = new WebInspector.ConsoleCommand(expression);
+ WebInspector.console.addMessage(commandMessage);
+ WebInspector.console.addMessage(new WebInspector.ConsoleCommandResult(result, exception, commandMessage));
+ });
},
- syntaxHighlightCSS: function()
+ _breakpointChanged: function(event)
{
- var table = this.element.contentDocument.getElementsByTagName("table")[0];
- if (!table)
- return;
+ this._editor.paintLineNumbers();
+ },
- var cssSyntaxHighlighter = new WebInspector.CSSSourceSyntaxHighlighter(table, this);
- cssSyntaxHighlighter.process();
+ resize: function()
+ {
+ if (this._editor)
+ this._editor.resize();
}
}
WebInspector.SourceFrame.prototype.__proto__ = WebInspector.Object.prototype;
-WebInspector.SourceSyntaxHighlighter = function(table, sourceFrame)
+WebInspector.BreakpointLineNumberDecorator = function(sourceFrame, textModel)
{
- this.table = table;
- this.sourceFrame = sourceFrame;
+ this._sourceFrame = sourceFrame;
+ this._textModel = textModel;
}
-WebInspector.SourceSyntaxHighlighter.prototype = {
- createSpan: function(content, className)
- {
- var span = document.createElement("span");
- span.className = className;
- span.appendChild(document.createTextNode(content));
- return span;
- },
-
- process: function()
+WebInspector.BreakpointLineNumberDecorator.prototype = {
+ decorate: function(lineNumber, ctx, x, y, width, height, lineHeight)
{
- // Split up the work into chunks so we don't block the
- // UI thread while processing.
-
- var rows = this.table.rows;
- var rowsLength = rows.length;
- const tokensPerChunk = 100;
- const lineLengthLimit = 20000;
-
- var boundProcessChunk = processChunk.bind(this);
- var processChunkInterval = setInterval(boundProcessChunk, 25);
- boundProcessChunk();
-
- function processChunk()
- {
- for (var i = 0; i < tokensPerChunk; i++) {
- if (this.cursor >= this.lineCode.length)
- moveToNextLine.call(this);
- if (this.lineIndex >= rowsLength) {
- this.sourceFrame.dispatchEventToListeners("syntax highlighting complete");
- return;
- }
- if (this.cursor > lineLengthLimit) {
- var codeFragment = this.lineCode.substring(this.cursor);
- this.nonToken += codeFragment;
- this.cursor += codeFragment.length;
- }
+ var breakpoint = this._textModel.getAttribute(lineNumber, "breakpoint");
+ var isExecutionLine = lineNumber + 1 === this._sourceFrame._executionLine;
+ if (breakpoint || isExecutionLine) {
+ ctx.save();
+ ctx.translate(x + 4, y + 2);
+ var breakpointWidth = width - 6;
+ var breakpointHeight = lineHeight - 4;
+
+ if (breakpoint)
+ this._paintBreakpoint(ctx, breakpointWidth, breakpointHeight, breakpoint);
+
+ if (isExecutionLine)
+ this._paintProgramCounter(ctx, breakpointWidth, breakpointHeight, false);
- this.lex();
- }
+ ctx.restore();
}
-
- function moveToNextLine()
- {
- this.appendNonToken();
-
- var row = rows[this.lineIndex];
- var line = row ? row.cells[1] : null;
- if (line && this.newLine) {
- line.removeChildren();
-
- if (this.messageBubble)
- this.newLine.appendChild(this.messageBubble);
-
- line.parentNode.insertBefore(this.newLine, line);
- line.parentNode.removeChild(line);
-
- this.newLine = null;
- }
- this.lineIndex++;
- if (this.lineIndex >= rowsLength && processChunkInterval) {
- clearInterval(processChunkInterval);
- this.sourceFrame.dispatchEventToListeners("syntax highlighting complete");
- return;
- }
- row = rows[this.lineIndex];
- line = row ? row.cells[1] : null;
-
- this.messageBubble = null;
- if (line.lastChild && line.lastChild.nodeType === Node.ELEMENT_NODE && line.lastChild.hasStyleClass("webkit-html-message-bubble")) {
- this.messageBubble = line.lastChild;
- line.removeChild(this.messageBubble);
- }
- this.lineCode = line.textContent;
- this.newLine = line.cloneNode(false);
- this.cursor = 0;
- if (!line)
- moveToNextLine();
- }
- },
-
- lex: function()
- {
- var token = null;
- var codeFragment = this.lineCode.substring(this.cursor);
-
- for (var i = 0; i < this.rules.length; i++) {
- var rule = this.rules[i];
- var ruleContinueStateCondition = typeof rule.continueStateCondition === "undefined" ? this.ContinueState.None : rule.continueStateCondition;
- if (this.continueState === ruleContinueStateCondition) {
- if (typeof rule.lexStateCondition !== "undefined" && this.lexState !== rule.lexStateCondition)
- continue;
- var match = rule.pattern.exec(codeFragment);
- if (match) {
- token = match[0];
- if (token) {
- if (!rule.dontAppendNonToken)
- this.appendNonToken();
- return rule.action.call(this, token);
- }
- }
- }
- }
- this.nonToken += codeFragment[0];
- this.cursor++;
- },
-
- appendNonToken: function ()
- {
- if (this.nonToken.length > 0) {
- this.newLine.appendChild(document.createTextNode(this.nonToken));
- this.nonToken = "";
+ if (isExecutionLine) {
+ // Override default behavior.
+ return true;
}
+
+ ctx.fillStyle = breakpoint ? "rgb(255,255,255)" : "rgb(155,155,155)";
+ return false;
},
-
- syntaxHighlightNode: function(node)
+
+ _paintBreakpoint: function(ctx, width, height, breakpoint)
{
- this.lineCode = node.textContent;
- node.removeChildren();
- this.newLine = node;
- this.cursor = 0;
- while (true) {
- if (this.cursor >= this.lineCode.length) {
- var codeFragment = this.lineCode.substring(this.cursor);
- this.nonToken += codeFragment;
- this.cursor += codeFragment.length;
- this.appendNonToken();
- this.newLine = null;
- return;
- }
+ ctx.beginPath();
+ ctx.moveTo(0, 2);
+ ctx.lineTo(2, 0);
+ ctx.lineTo(width - 5, 0);
+ ctx.lineTo(width, height / 2);
+ ctx.lineTo(width - 5, height);
+ ctx.lineTo(2, height);
+ ctx.lineTo(0, height - 2);
+ ctx.closePath();
+ ctx.fillStyle = breakpoint.condition ? "rgb(217, 142, 1)" : "rgb(1, 142, 217)";
+ ctx.strokeStyle = breakpoint.condition ? "rgb(205, 103, 0)" : "rgb(0, 103, 205)";
+ ctx.lineWidth = 3;
+ ctx.fill();
- this.lex();
+ ctx.save();
+ ctx.clip();
+ ctx.stroke();
+ ctx.restore();
+
+ if (!breakpoint.enabled) {
+ ctx.save();
+ ctx.globalCompositeOperation = "destination-out";
+ ctx.fillStyle = "rgba(0, 0, 0, 0.5)";
+ ctx.fillRect(0, 0, width, height);
+ ctx.restore();
}
- }
-}
+ },
-WebInspector.CSSSourceSyntaxHighlighter = function(table, sourceFrame) {
- WebInspector.SourceSyntaxHighlighter.call(this, table, sourceFrame);
-
- this.LexState = {
- Initial: 1,
- DeclarationProperty: 2,
- DeclarationValue: 3,
- AtMedia: 4,
- AtRule: 5,
- AtKeyframes: 6
- };
- this.ContinueState = {
- None: 0,
- Comment: 1
- };
-
- this.nonToken = "";
- this.cursor = 0;
- this.lineIndex = -1;
- this.lineCode = "";
- this.newLine = null;
- this.lexState = this.LexState.Initial;
- this.continueState = this.ContinueState.None;
-
- const urlPattern = /^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i;
- const stringPattern = /^(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')/i;
- const identPattern = /^-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*/i;
- const startBlockPattern = /^{/i;
- const endBlockPattern = /^}/i;
- this.rules = [{
- pattern: /^\/\*[^\*]*\*+([^\/*][^*]*\*+)*\//i,
- action: commentAction
- }, {
- pattern: /^(?:\/\*(?:[^\*]|\*[^\/])*)/i,
- action: commentStartAction
- }, {
- pattern: /^(?:(?:[^\*]|\*[^\/])*\*+\/)/i,
- action: commentEndAction,
- continueStateCondition: this.ContinueState.Comment
- }, {
- pattern: /^.*/i,
- action: commentMiddleAction,
- continueStateCondition: this.ContinueState.Comment
- }, {
- pattern: /^(?:(?:-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*|\*)(?:#-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*|\.-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*|\[\s*-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*\s*(?:(?:=|~=|\|=)\s*(?:-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*|(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*'))\s*)?\]|:(?:-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*|-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*\(\s*(?:-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*\s*)?\)))*|(?:#-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*|\.-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*|\[\s*-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*\s*(?:(?:=|~=|\|=)\s*(?:-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*|(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*'))\s*)?\]|:(?:-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*|-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*\(\s*(?:-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*\s*)?\)))+)/i,
- action: selectorAction,
- lexStateCondition: this.LexState.Initial
- }, {
- pattern: startBlockPattern,
- action: startRulesetBlockAction,
- lexStateCondition: this.LexState.Initial,
- dontAppendNonToken: true
- }, {
- pattern: identPattern,
- action: propertyAction,
- lexStateCondition: this.LexState.DeclarationProperty,
- dontAppendNonToken: true
- }, {
- pattern: /^:/i,
- action: declarationColonAction,
- lexStateCondition: this.LexState.DeclarationProperty,
- dontAppendNonToken: true
- }, {
- pattern: /^(?:#(?:[\da-f]{6}|[\da-f]{3})|rgba\(\s*(?:\d+|\d*\.\d+)%?\s*,\s*(?:\d+|\d*\.\d+)%?\s*,\s*(?:\d+|\d*\.\d+)%?\s*,\s*(?:\d+|\d*\.\d+)%?\s*\)|hsla\(\s*(?:\d+|\d*\.\d+)%?\s*,\s*(?:\d+|\d*\.\d+)%?\s*,\s*(?:\d+|\d*\.\d+)%?\s*,\s*(?:\d+|\d*\.\d+)%?\s*\)|rgb\(\s*(?:\d+|\d*\.\d+)%?\s*,\s*(?:\d+|\d*\.\d+)%?\s*,\s*(?:\d+|\d*\.\d+)%?\s*\)|hsl\(\s*(?:\d+|\d*\.\d+)%?\s*,\s*(?:\d+|\d*\.\d+)%?\s*,\s*(?:\d+|\d*\.\d+)%?\s*\))/i,
- action: colorAction,
- lexStateCondition: this.LexState.DeclarationValue
- }, {
- pattern: /^(?:-?(?:\d+|\d*\.\d+)(?:em|rem|__qem|ex|px|cm|mm|in|pt|pc|deg|rad|grad|turn|ms|s|Hz|kHz|%)?)/i,
- action: numvalueAction,
- lexStateCondition: this.LexState.DeclarationValue
- }, {
- pattern: urlPattern,
- action: urlAction,
- lexStateCondition: this.LexState.DeclarationValue
- }, {
- pattern: stringPattern,
- action: stringAction,
- lexStateCondition: this.LexState.DeclarationValue
- }, {
- pattern: /^!\s*important/i,
- action: importantAction,
- lexStateCondition: this.LexState.DeclarationValue
- }, {
- pattern: identPattern,
- action: valueIdentAction,
- lexStateCondition: this.LexState.DeclarationValue,
- dontAppendNonToken: true
- }, {
- pattern: /^;/i,
- action: declarationSemicolonAction,
- lexStateCondition: this.LexState.DeclarationValue,
- dontAppendNonToken: true
- }, {
- pattern: endBlockPattern,
- action: endRulesetBlockAction,
- lexStateCondition: this.LexState.DeclarationProperty,
- dontAppendNonToken: true
- }, {
- pattern: endBlockPattern,
- action: endRulesetBlockAction,
- lexStateCondition: this.LexState.DeclarationValue,
- dontAppendNonToken: true
- }, {
- pattern: /^@media/i,
- action: atMediaAction,
- lexStateCondition: this.LexState.Initial
- }, {
- pattern: startBlockPattern,
- action: startAtMediaBlockAction,
- lexStateCondition: this.LexState.AtMedia,
- dontAppendNonToken: true
- }, {
- pattern: /^@-webkit-keyframes/i,
- action: atKeyframesAction,
- lexStateCondition: this.LexState.Initial
- }, {
- pattern: startBlockPattern,
- action: startAtMediaBlockAction,
- lexStateCondition: this.LexState.AtKeyframes,
- dontAppendNonToken: true
- }, {
- pattern: /^@-?(?:\w|(?:\\[\da-f]{1,6}\s?|\.))(?:[-\w]|(?:\\[\da-f]{1,6}\s?|\.))*/i,
- action: atRuleAction,
- lexStateCondition: this.LexState.Initial
- }, {
- pattern: /^;/i,
- action: endAtRuleAction,
- lexStateCondition: this.LexState.AtRule
- }, {
- pattern: urlPattern,
- action: urlAction,
- lexStateCondition: this.LexState.AtRule
- }, {
- pattern: stringPattern,
- action: stringAction,
- lexStateCondition: this.LexState.AtRule
- }, {
- pattern: stringPattern,
- action: stringAction,
- lexStateCondition: this.LexState.AtKeyframes
- }, {
- pattern: identPattern,
- action: atRuleIdentAction,
- lexStateCondition: this.LexState.AtRule,
- dontAppendNonToken: true
- }, {
- pattern: identPattern,
- action: atRuleIdentAction,
- lexStateCondition: this.LexState.AtMedia,
- dontAppendNonToken: true
- }, {
- pattern: startBlockPattern,
- action: startAtRuleBlockAction,
- lexStateCondition: this.LexState.AtRule,
- dontAppendNonToken: true
- }];
-
- function commentAction(token)
+ _paintProgramCounter: function(ctx, width, height)
{
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-css-comment"));
- }
-
- function commentStartAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-css-comment"));
- this.continueState = this.ContinueState.Comment;
- }
-
- function commentEndAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-css-comment"));
- this.continueState = this.ContinueState.None;
- }
+ ctx.save();
- function commentMiddleAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-css-comment"));
- }
-
- function selectorAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-css-selector"));
- }
-
- function startRulesetBlockAction(token)
- {
- this.cursor += token.length;
- this.nonToken += token;
- this.lexState = this.LexState.DeclarationProperty;
- }
-
- function endRulesetBlockAction(token)
- {
- this.cursor += token.length;
- this.nonToken += token;
- this.lexState = this.LexState.Initial;
- }
-
- const propertyKeywords = {
- "background": true,
- "background-attachment": true,
- "background-clip": true,
- "background-color": true,
- "background-image": true,
- "background-origin": true,
- "background-position": true,
- "background-position-x": true,
- "background-position-y": true,
- "background-repeat": true,
- "background-repeat-x": true,
- "background-repeat-y": true,
- "background-size": true,
- "border": true,
- "border-bottom": true,
- "border-bottom-color": true,
- "border-bottom-left-radius": true,
- "border-bottom-right-radius": true,
- "border-bottom-style": true,
- "border-bottom-width": true,
- "border-collapse": true,
- "border-color": true,
- "border-left": true,
- "border-left-color": true,
- "border-left-style": true,
- "border-left-width": true,
- "border-radius": true,
- "border-right": true,
- "border-right-color": true,
- "border-right-style": true,
- "border-right-width": true,
- "border-spacing": true,
- "border-style": true,
- "border-top": true,
- "border-top-color": true,
- "border-top-left-radius": true,
- "border-top-right-radius": true,
- "border-top-style": true,
- "border-top-width": true,
- "border-width": true,
- "bottom": true,
- "caption-side": true,
- "clear": true,
- "clip": true,
- "color": true,
- "content": true,
- "counter-increment": true,
- "counter-reset": true,
- "cursor": true,
- "direction": true,
- "display": true,
- "empty-cells": true,
- "float": true,
- "font": true,
- "font-family": true,
- "font-size": true,
- "font-stretch": true,
- "font-style": true,
- "font-variant": true,
- "font-weight": true,
- "height": true,
- "left": true,
- "letter-spacing": true,
- "line-height": true,
- "list-style": true,
- "list-style-image": true,
- "list-style-position": true,
- "list-style-type": true,
- "margin": true,
- "margin-bottom": true,
- "margin-left": true,
- "margin-right": true,
- "margin-top": true,
- "max-height": true,
- "max-width": true,
- "min-height": true,
- "min-width": true,
- "opacity": true,
- "orphans": true,
- "outline": true,
- "outline-color": true,
- "outline-offset": true,
- "outline-style": true,
- "outline-width": true,
- "overflow": true,
- "overflow-x": true,
- "overflow-y": true,
- "padding": true,
- "padding-bottom": true,
- "padding-left": true,
- "padding-right": true,
- "padding-top": true,
- "page": true,
- "page-break-after": true,
- "page-break-before": true,
- "page-break-inside": true,
- "pointer-events": true,
- "position": true,
- "quotes": true,
- "resize": true,
- "right": true,
- "size": true,
- "src": true,
- "table-layout": true,
- "text-align": true,
- "text-decoration": true,
- "text-indent": true,
- "text-line-through": true,
- "text-line-through-color": true,
- "text-line-through-mode": true,
- "text-line-through-style": true,
- "text-line-through-width": true,
- "text-overflow": true,
- "text-overline": true,
- "text-overline-color": true,
- "text-overline-mode": true,
- "text-overline-style": true,
- "text-overline-width": true,
- "text-rendering": true,
- "text-shadow": true,
- "text-transform": true,
- "text-underline": true,
- "text-underline-color": true,
- "text-underline-mode": true,
- "text-underline-style": true,
- "text-underline-width": true,
- "top": true,
- "unicode-bidi": true,
- "unicode-range": true,
- "vertical-align": true,
- "visibility": true,
- "white-space": true,
- "widows": true,
- "width": true,
- "word-break": true,
- "word-spacing": true,
- "word-wrap": true,
- "z-index": true,
- "zoom": true,
- "-webkit-animation": true,
- "-webkit-animation-delay": true,
- "-webkit-animation-direction": true,
- "-webkit-animation-duration": true,
- "-webkit-animation-iteration-count": true,
- "-webkit-animation-name": true,
- "-webkit-animation-play-state": true,
- "-webkit-animation-timing-function": true,
- "-webkit-appearance": true,
- "-webkit-backface-visibility": true,
- "-webkit-background-clip": true,
- "-webkit-background-composite": true,
- "-webkit-background-origin": true,
- "-webkit-background-size": true,
- "-webkit-binding": true,
- "-webkit-border-fit": true,
- "-webkit-border-horizontal-spacing": true,
- "-webkit-border-image": true,
- "-webkit-border-radius": true,
- "-webkit-border-vertical-spacing": true,
- "-webkit-box-align": true,
- "-webkit-box-direction": true,
- "-webkit-box-flex": true,
- "-webkit-box-flex-group": true,
- "-webkit-box-lines": true,
- "-webkit-box-ordinal-group": true,
- "-webkit-box-orient": true,
- "-webkit-box-pack": true,
- "-webkit-box-reflect": true,
- "-webkit-box-shadow": true,
- "-webkit-box-sizing": true,
- "-webkit-column-break-after": true,
- "-webkit-column-break-before": true,
- "-webkit-column-break-inside": true,
- "-webkit-column-count": true,
- "-webkit-column-gap": true,
- "-webkit-column-rule": true,
- "-webkit-column-rule-color": true,
- "-webkit-column-rule-style": true,
- "-webkit-column-rule-width": true,
- "-webkit-column-width": true,
- "-webkit-columns": true,
- "-webkit-font-size-delta": true,
- "-webkit-font-smoothing": true,
- "-webkit-highlight": true,
- "-webkit-line-break": true,
- "-webkit-line-clamp": true,
- "-webkit-margin-bottom-collapse": true,
- "-webkit-margin-collapse": true,
- "-webkit-margin-start": true,
- "-webkit-margin-top-collapse": true,
- "-webkit-marquee": true,
- "-webkit-marquee-direction": true,
- "-webkit-marquee-increment": true,
- "-webkit-marquee-repetition": true,
- "-webkit-marquee-speed": true,
- "-webkit-marquee-style": true,
- "-webkit-mask": true,
- "-webkit-mask-attachment": true,
- "-webkit-mask-box-image": true,
- "-webkit-mask-clip": true,
- "-webkit-mask-composite": true,
- "-webkit-mask-image": true,
- "-webkit-mask-origin": true,
- "-webkit-mask-position": true,
- "-webkit-mask-position-x": true,
- "-webkit-mask-position-y": true,
- "-webkit-mask-repeat": true,
- "-webkit-mask-repeat-x": true,
- "-webkit-mask-repeat-y": true,
- "-webkit-mask-size": true,
- "-webkit-match-nearest-mail-blockquote-color": true,
- "-webkit-nbsp-mode": true,
- "-webkit-padding-start": true,
- "-webkit-perspective": true,
- "-webkit-perspective-origin": true,
- "-webkit-perspective-origin-x": true,
- "-webkit-perspective-origin-y": true,
- "-webkit-rtl-ordering": true,
- "-webkit-text-decorations-in-effect": true,
- "-webkit-text-fill-color": true,
- "-webkit-text-security": true,
- "-webkit-text-size-adjust": true,
- "-webkit-text-stroke": true,
- "-webkit-text-stroke-color": true,
- "-webkit-text-stroke-width": true,
- "-webkit-transform": true,
- "-webkit-transform-origin": true,
- "-webkit-transform-origin-x": true,
- "-webkit-transform-origin-y": true,
- "-webkit-transform-origin-z": true,
- "-webkit-transform-style": true,
- "-webkit-transition": true,
- "-webkit-transition-delay": true,
- "-webkit-transition-duration": true,
- "-webkit-transition-property": true,
- "-webkit-transition-timing-function": true,
- "-webkit-user-drag": true,
- "-webkit-user-modify": true,
- "-webkit-user-select": true,
- "-webkit-variable-declaration-block": true
- };
- function propertyAction(token)
- {
- this.cursor += token.length;
- if (token in propertyKeywords) {
- this.appendNonToken.call(this);
- this.newLine.appendChild(this.createSpan(token, "webkit-css-property"));
- } else
- this.nonToken += token;
- }
-
- function declarationColonAction(token)
- {
- this.cursor += token.length;
- this.nonToken += token;
- this.lexState = this.LexState.DeclarationValue;
- }
+ ctx.beginPath();
+ ctx.moveTo(width - 9, 2);
+ ctx.lineTo(width - 7, 2);
+ ctx.lineTo(width - 7, 0);
+ ctx.lineTo(width - 5, 0);
+ ctx.lineTo(width, height / 2);
+ ctx.lineTo(width - 5, height);
+ ctx.lineTo(width - 7, height);
+ ctx.lineTo(width - 7, height - 2);
+ ctx.lineTo(width - 9, height - 2);
+ ctx.closePath();
+ ctx.fillStyle = "rgb(142, 5, 4)";
- const valueKeywords = {
- "inherit": true,
- "initial": true,
- "none": true,
- "hidden": true,
- "inset": true,
- "groove": true,
- "ridge": true,
- "outset": true,
- "dotted": true,
- "dashed": true,
- "solid": true,
- "double": true,
- "caption": true,
- "icon": true,
- "menu": true,
- "message-box": true,
- "small-caption": true,
- "-webkit-mini-control": true,
- "-webkit-small-control": true,
- "-webkit-control": true,
- "status-bar": true,
- "italic": true,
- "oblique": true,
- "all": true,
- "small-caps": true,
- "normal": true,
- "bold": true,
- "bolder": true,
- "lighter": true,
- "xx-small": true,
- "x-small": true,
- "small": true,
- "medium": true,
- "large": true,
- "x-large": true,
- "xx-large": true,
- "-webkit-xxx-large": true,
- "smaller": true,
- "larger": true,
- "wider": true,
- "narrower": true,
- "ultra-condensed": true,
- "extra-condensed": true,
- "condensed": true,
- "semi-condensed": true,
- "semi-expanded": true,
- "expanded": true,
- "extra-expanded": true,
- "ultra-expanded": true,
- "serif": true,
- "sans-serif": true,
- "cursive": true,
- "fantasy": true,
- "monospace": true,
- "-webkit-body": true,
- "aqua": true,
- "black": true,
- "blue": true,
- "fuchsia": true,
- "gray": true,
- "green": true,
- "lime": true,
- "maroon": true,
- "navy": true,
- "olive": true,
- "orange": true,
- "purple": true,
- "red": true,
- "silver": true,
- "teal": true,
- "white": true,
- "yellow": true,
- "transparent": true,
- "-webkit-link": true,
- "-webkit-activelink": true,
- "activeborder": true,
- "activecaption": true,
- "appworkspace": true,
- "background": true,
- "buttonface": true,
- "buttonhighlight": true,
- "buttonshadow": true,
- "buttontext": true,
- "captiontext": true,
- "graytext": true,
- "highlight": true,
- "highlighttext": true,
- "inactiveborder": true,
- "inactivecaption": true,
- "inactivecaptiontext": true,
- "infobackground": true,
- "infotext": true,
- "match": true,
- "menutext": true,
- "scrollbar": true,
- "threeddarkshadow": true,
- "threedface": true,
- "threedhighlight": true,
- "threedlightshadow": true,
- "threedshadow": true,
- "window": true,
- "windowframe": true,
- "windowtext": true,
- "-webkit-focus-ring-color": true,
- "currentcolor": true,
- "grey": true,
- "-webkit-text": true,
- "repeat": true,
- "repeat-x": true,
- "repeat-y": true,
- "no-repeat": true,
- "clear": true,
- "copy": true,
- "source-over": true,
- "source-in": true,
- "source-out": true,
- "source-atop": true,
- "destination-over": true,
- "destination-in": true,
- "destination-out": true,
- "destination-atop": true,
- "xor": true,
- "plus-darker": true,
- "plus-lighter": true,
- "baseline": true,
- "middle": true,
- "sub": true,
- "super": true,
- "text-top": true,
- "text-bottom": true,
- "top": true,
- "bottom": true,
- "-webkit-baseline-middle": true,
- "-webkit-auto": true,
- "left": true,
- "right": true,
- "center": true,
- "justify": true,
- "-webkit-left": true,
- "-webkit-right": true,
- "-webkit-center": true,
- "outside": true,
- "inside": true,
- "disc": true,
- "circle": true,
- "square": true,
- "decimal": true,
- "decimal-leading-zero": true,
- "lower-roman": true,
- "upper-roman": true,
- "lower-greek": true,
- "lower-alpha": true,
- "lower-latin": true,
- "upper-alpha": true,
- "upper-latin": true,
- "hebrew": true,
- "armenian": true,
- "georgian": true,
- "cjk-ideographic": true,
- "hiragana": true,
- "katakana": true,
- "hiragana-iroha": true,
- "katakana-iroha": true,
- "inline": true,
- "block": true,
- "list-item": true,
- "run-in": true,
- "compact": true,
- "inline-block": true,
- "table": true,
- "inline-table": true,
- "table-row-group": true,
- "table-header-group": true,
- "table-footer-group": true,
- "table-row": true,
- "table-column-group": true,
- "table-column": true,
- "table-cell": true,
- "table-caption": true,
- "-webkit-box": true,
- "-webkit-inline-box": true,
- "-wap-marquee": true,
- "auto": true,
- "crosshair": true,
- "default": true,
- "pointer": true,
- "move": true,
- "vertical-text": true,
- "cell": true,
- "context-menu": true,
- "alias": true,
- "progress": true,
- "no-drop": true,
- "not-allowed": true,
- "-webkit-zoom-in": true,
- "-webkit-zoom-out": true,
- "e-resize": true,
- "ne-resize": true,
- "nw-resize": true,
- "n-resize": true,
- "se-resize": true,
- "sw-resize": true,
- "s-resize": true,
- "w-resize": true,
- "ew-resize": true,
- "ns-resize": true,
- "nesw-resize": true,
- "nwse-resize": true,
- "col-resize": true,
- "row-resize": true,
- "text": true,
- "wait": true,
- "help": true,
- "all-scroll": true,
- "-webkit-grab": true,
- "-webkit-grabbing": true,
- "ltr": true,
- "rtl": true,
- "capitalize": true,
- "uppercase": true,
- "lowercase": true,
- "visible": true,
- "collapse": true,
- "above": true,
- "absolute": true,
- "always": true,
- "avoid": true,
- "below": true,
- "bidi-override": true,
- "blink": true,
- "both": true,
- "close-quote": true,
- "crop": true,
- "cross": true,
- "embed": true,
- "fixed": true,
- "hand": true,
- "hide": true,
- "higher": true,
- "invert": true,
- "landscape": true,
- "level": true,
- "line-through": true,
- "local": true,
- "loud": true,
- "lower": true,
- "-webkit-marquee": true,
- "mix": true,
- "no-close-quote": true,
- "no-open-quote": true,
- "nowrap": true,
- "open-quote": true,
- "overlay": true,
- "overline": true,
- "portrait": true,
- "pre": true,
- "pre-line": true,
- "pre-wrap": true,
- "relative": true,
- "scroll": true,
- "separate": true,
- "show": true,
- "static": true,
- "thick": true,
- "thin": true,
- "underline": true,
- "-webkit-nowrap": true,
- "stretch": true,
- "start": true,
- "end": true,
- "reverse": true,
- "horizontal": true,
- "vertical": true,
- "inline-axis": true,
- "block-axis": true,
- "single": true,
- "multiple": true,
- "forwards": true,
- "backwards": true,
- "ahead": true,
- "up": true,
- "down": true,
- "slow": true,
- "fast": true,
- "infinite": true,
- "slide": true,
- "alternate": true,
- "read-only": true,
- "read-write": true,
- "read-write-plaintext-only": true,
- "element": true,
- "ignore": true,
- "intrinsic": true,
- "min-intrinsic": true,
- "clip": true,
- "ellipsis": true,
- "discard": true,
- "dot-dash": true,
- "dot-dot-dash": true,
- "wave": true,
- "continuous": true,
- "skip-white-space": true,
- "break-all": true,
- "break-word": true,
- "space": true,
- "after-white-space": true,
- "checkbox": true,
- "radio": true,
- "push-button": true,
- "square-button": true,
- "button": true,
- "button-bevel": true,
- "default-button": true,
- "list-button": true,
- "listbox": true,
- "listitem": true,
- "media-fullscreen-button": true,
- "media-mute-button": true,
- "media-play-button": true,
- "media-seek-back-button": true,
- "media-seek-forward-button": true,
- "media-rewind-button": true,
- "media-return-to-realtime-button": true,
- "media-slider": true,
- "media-sliderthumb": true,
- "media-volume-slider-container": true,
- "media-volume-slider": true,
- "media-volume-sliderthumb": true,
- "media-controls-background": true,
- "media-current-time-display": true,
- "media-time-remaining-display": true,
- "menulist": true,
- "menulist-button": true,
- "menulist-text": true,
- "menulist-textfield": true,
- "slider-horizontal": true,
- "slider-vertical": true,
- "sliderthumb-horizontal": true,
- "sliderthumb-vertical": true,
- "caret": true,
- "searchfield": true,
- "searchfield-decoration": true,
- "searchfield-results-decoration": true,
- "searchfield-results-button": true,
- "searchfield-cancel-button": true,
- "textfield": true,
- "textarea": true,
- "caps-lock-indicator": true,
- "round": true,
- "border": true,
- "border-box": true,
- "content": true,
- "content-box": true,
- "padding": true,
- "padding-box": true,
- "contain": true,
- "cover": true,
- "logical": true,
- "visual": true,
- "lines": true,
- "running": true,
- "paused": true,
- "flat": true,
- "preserve-3d": true,
- "ease": true,
- "linear": true,
- "ease-in": true,
- "ease-out": true,
- "ease-in-out": true,
- "document": true,
- "reset": true,
- "visiblePainted": true,
- "visibleFill": true,
- "visibleStroke": true,
- "painted": true,
- "fill": true,
- "stroke": true,
- "antialiased": true,
- "subpixel-antialiased": true,
- "optimizeSpeed": true,
- "optimizeLegibility": true,
- "geometricPrecision": true
- };
- function valueIdentAction(token) {
- this.cursor += token.length;
- if (token in valueKeywords) {
- this.appendNonToken.call(this);
- this.newLine.appendChild(this.createSpan(token, "webkit-css-keyword"));
- } else
- this.nonToken += token;
- }
+ ctx.shadowBlur = 4;
+ ctx.shadowColor = "rgb(255, 255, 255)";
+ ctx.shadowOffsetX = -1;
+ ctx.shadowOffsetY = 0;
- function numvalueAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-css-number"));
- }
-
- function declarationSemicolonAction(token)
- {
- this.cursor += token.length;
- this.nonToken += token;
- this.lexState = this.LexState.DeclarationProperty;
- }
-
- function urlAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-css-url"));
- }
-
- function stringAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-css-string"));
- }
-
- function colorAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-css-color"));
- }
-
- function importantAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-css-important"));
- }
-
- function atMediaAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-css-at-rule"));
- this.lexState = this.LexState.AtMedia;
- }
-
- function startAtMediaBlockAction(token)
- {
- this.cursor += token.length;
- this.nonToken += token;
- this.lexState = this.LexState.Initial;
- }
-
- function atKeyframesAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-css-at-rule"));
- this.lexState = this.LexState.AtKeyframes;
- }
-
- function startAtKeyframesBlockAction(token)
- {
- this.cursor += token.length;
- this.nonToken += token;
- this.lexState = this.LexState.Initial;
- }
-
- function atRuleAction(token) {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-css-at-rule"));
- this.lexState = this.LexState.AtRule;
- }
-
- function endAtRuleAction(token) {
- this.cursor += token.length;
- this.nonToken += token;
- this.lexState = this.LexState.Initial;
- }
-
- function startAtRuleBlockAction(token)
- {
- this.cursor += token.length;
- this.nonToken += token;
- this.lexState = this.LexState.DeclarationProperty;
- }
-
- const mediaTypes = ["all", "aural", "braille", "embossed", "handheld", "print", "projection", "screen", "tty", "tv"];
- function atRuleIdentAction(token) {
- this.cursor += token.length;
- if (mediaTypes.indexOf(token) === -1)
- this.nonToken += token;
- else {
- this.appendNonToken.call(this);
- this.newLine.appendChild(this.createSpan(token, "webkit-css-keyword"));
- }
- }
-}
+ ctx.fill();
+ ctx.fill(); // Fill twice to get a good shadow and darker anti-aliased pixels.
-WebInspector.CSSSourceSyntaxHighlighter.prototype.__proto__ = WebInspector.SourceSyntaxHighlighter.prototype;
-
-WebInspector.JavaScriptSourceSyntaxHighlighter = function(table, sourceFrame) {
- WebInspector.SourceSyntaxHighlighter.call(this, table, sourceFrame);
-
- this.LexState = {
- Initial: 1,
- DivisionAllowed: 2,
- };
- this.ContinueState = {
- None: 0,
- Comment: 1,
- SingleQuoteString: 2,
- DoubleQuoteString: 3,
- RegExp: 4
- };
-
- this.nonToken = "";
- this.cursor = 0;
- this.lineIndex = -1;
- this.lineCode = "";
- this.newLine = null;
- this.lexState = this.LexState.Initial;
- this.continueState = this.ContinueState.None;
-
- this.rules = [{
- pattern: /^(?:\/\/.*)/,
- action: singleLineCommentAction
- }, {
- pattern: /^(?:\/\*(?:[^\*]|\*[^\/])*\*+\/)/,
- action: multiLineSingleLineCommentAction
- }, {
- pattern: /^(?:\/\*(?:[^\*]|\*[^\/])*)/,
- action: multiLineCommentStartAction
- }, {
- pattern: /^(?:(?:[^\*]|\*[^\/])*\*+\/)/,
- action: multiLineCommentEndAction,
- continueStateCondition: this.ContinueState.Comment
- }, {
- pattern: /^.*/,
- action: multiLineCommentMiddleAction,
- continueStateCondition: this.ContinueState.Comment
- }, {
- pattern: /^(?:(?:0|[1-9]\d*)\.\d+?(?:[eE](?:\d+|\+\d+|-\d+))?|\.\d+(?:[eE](?:\d+|\+\d+|-\d+))?|(?:0|[1-9]\d*)(?:[eE](?:\d+|\+\d+|-\d+))?|0x[0-9a-fA-F]+|0X[0-9a-fA-F]+)/,
- action: numericLiteralAction
- }, {
- pattern: /^(?:"(?:[^"\\]|\\(?:['"\bfnrtv]|[^'"\bfnrtv0-9xu]|0|x[0-9a-fA-F][0-9a-fA-F]|(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))*"|'(?:[^'\\]|\\(?:['"\bfnrtv]|[^'"\bfnrtv0-9xu]|0|x[0-9a-fA-F][0-9a-fA-F]|(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))*')/,
- action: stringLiteralAction
- }, {
- pattern: /^(?:'(?:[^'\\]|\\(?:['"\bfnrtv]|[^'"\bfnrtv0-9xu]|0|x[0-9a-fA-F][0-9a-fA-F]|(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))*)\\$/,
- action: singleQuoteStringStartAction
- }, {
- pattern: /^(?:(?:[^'\\]|\\(?:['"\bfnrtv]|[^'"\bfnrtv0-9xu]|0|x[0-9a-fA-F][0-9a-fA-F]|(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))*')/,
- action: singleQuoteStringEndAction,
- continueStateCondition: this.ContinueState.SingleQuoteString
- }, {
- pattern: /^(?:(?:[^'\\]|\\(?:['"\bfnrtv]|[^'"\bfnrtv0-9xu]|0|x[0-9a-fA-F][0-9a-fA-F]|(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))*)\\$/,
- action: singleQuoteStringMiddleAction,
- continueStateCondition: this.ContinueState.SingleQuoteString
- }, {
- pattern: /^(?:"(?:[^"\\]|\\(?:['"\bfnrtv]|[^'"\bfnrtv0-9xu]|0|x[0-9a-fA-F][0-9a-fA-F]|(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))*)\\$/,
- action: doubleQuoteStringStartAction
- }, {
- pattern: /^(?:(?:[^"\\]|\\(?:['"\bfnrtv]|[^'"\bfnrtv0-9xu]|0|x[0-9a-fA-F][0-9a-fA-F]|(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))*")/,
- action: doubleQuoteStringEndAction,
- continueStateCondition: this.ContinueState.DoubleQuoteString
- }, {
- pattern: /^(?:(?:[^"\\]|\\(?:['"\bfnrtv]|[^'"\bfnrtv0-9xu]|0|x[0-9a-fA-F][0-9a-fA-F]|(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))*)\\$/,
- action: doubleQuoteStringMiddleAction,
- continueStateCondition: this.ContinueState.DoubleQuoteString
- }, {
- pattern: /^(?:(?:[a-zA-Z]|[$_]|\\(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]))(?:(?:[a-zA-Z]|[$_]|\\(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]))|[0-9])*)/,
- action: identOrKeywordAction
- }, {
- pattern: /^\)/,
- action: rightParenAction,
- dontAppendNonToken: true
- }, {
- pattern: /^(?:<=|>=|===|==|!=|!==|\+\+|\-\-|<<|>>|>>>|&&|\|\||\+=|\-=|\*=|%=|<<=|>>=|>>>=|&=|\|=|^=|[{}\(\[\]\.;,<>\+\-\*%&\|\^!~\?:=])/,
- action: punctuatorAction,
- dontAppendNonToken: true
- }, {
- pattern: /^(?:\/=?)/,
- action: divPunctuatorAction,
- lexStateCondition: this.LexState.DivisionAllowed,
- dontAppendNonToken: true
- }, {
- pattern: /^(?:\/(?:(?:\\.)|[^\\*\/])(?:(?:\\.)|[^\\/])*\/(?:(?:[a-zA-Z]|[$_]|\\(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]))|[0-9])*)/,
- action: regExpLiteralAction
- }, {
- pattern: /^(?:\/(?:(?:\\.)|[^\\*\/])(?:(?:\\.)|[^\\/])*)\\$/,
- action: regExpStartAction
- }, {
- pattern: /^(?:(?:(?:\\.)|[^\\/])*\/(?:(?:[a-zA-Z]|[$_]|\\(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]))|[0-9])*)/,
- action: regExpEndAction,
- continueStateCondition: this.ContinueState.RegExp
- }, {
- pattern: /^(?:(?:(?:\\.)|[^\\/])*)\\$/,
- action: regExpMiddleAction,
- continueStateCondition: this.ContinueState.RegExp
- }];
-
- function singleLineCommentAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-comment"));
- }
-
- function multiLineSingleLineCommentAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-comment"));
- }
-
- function multiLineCommentStartAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-comment"));
- this.continueState = this.ContinueState.Comment;
- }
-
- function multiLineCommentEndAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-comment"));
- this.continueState = this.ContinueState.None;
- }
-
- function multiLineCommentMiddleAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-comment"));
- }
-
- function numericLiteralAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-number"));
- this.lexState = this.LexState.DivisionAllowed;
- }
-
- function stringLiteralAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-string"));
- this.lexState = this.LexState.Initial;
- }
-
- function singleQuoteStringStartAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-string"));
- this.continueState = this.ContinueState.SingleQuoteString;
- }
-
- function singleQuoteStringEndAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-string"));
- this.continueState = this.ContinueState.None;
- }
-
- function singleQuoteStringMiddleAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-string"));
- }
-
- function doubleQuoteStringStartAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-string"));
- this.continueState = this.ContinueState.DoubleQuoteString;
- }
-
- function doubleQuoteStringEndAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-string"));
- this.continueState = this.ContinueState.None;
- }
-
- function doubleQuoteStringMiddleAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-string"));
- }
-
- function regExpLiteralAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-regexp"));
- this.lexState = this.LexState.Initial;
- }
+ ctx.restore();
+ },
- function regExpStartAction(token)
+ mouseDown: function(lineNumber, e)
{
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-regexp"));
- this.continueState = this.ContinueState.RegExp;
- }
+ this._sourceFrame._toggleBreakpoint(lineNumber, e);
+ return true;
+ },
- function regExpEndAction(token)
+ contextMenu: function(lineNumber, e)
{
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-regexp"));
- this.continueState = this.ContinueState.None;
+ this._sourceFrame._contextMenu(lineNumber, e);
+ return true;
}
+}
- function regExpMiddleAction(token)
- {
- this.cursor += token.length;
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-regexp"));
- }
-
- const keywords = {
- "null": true,
- "true": true,
- "false": true,
- "break": true,
- "case": true,
- "catch": true,
- "const": true,
- "default": true,
- "finally": true,
- "for": true,
- "instanceof": true,
- "new": true,
- "var": true,
- "continue": true,
- "function": true,
- "return": true,
- "void": true,
- "delete": true,
- "if": true,
- "this": true,
- "do": true,
- "while": true,
- "else": true,
- "in": true,
- "switch": true,
- "throw": true,
- "try": true,
- "typeof": true,
- "debugger": true,
- "class": true,
- "enum": true,
- "export": true,
- "extends": true,
- "import": true,
- "super": true,
- "get": true,
- "set": true
- };
- function identOrKeywordAction(token)
+WebInspector.ExecutionLineDecorator = function(sourceFrame)
+{
+ this._sourceFrame = sourceFrame;
+}
+
+WebInspector.ExecutionLineDecorator.prototype = {
+ decorate: function(lineNumber, ctx, x, y, width, height, lineHeight)
{
- this.cursor += token.length;
-
- if (token in keywords) {
- this.newLine.appendChild(this.createSpan(token, "webkit-javascript-keyword"));
- this.lexState = this.LexState.Initial;
- } else {
- var identElement = this.createSpan(token, "webkit-javascript-ident");
- identElement.addEventListener("mouseover", showDatatip, false);
- this.newLine.appendChild(identElement);
- this.lexState = this.LexState.DivisionAllowed;
- }
- }
-
- function showDatatip(event) {
- if (!WebInspector.panels.scripts || !WebInspector.panels.scripts.paused)
+ if (this._sourceFrame._executionLine !== lineNumber + 1)
return;
+ ctx.save();
+ ctx.fillStyle = "rgb(171, 191, 254)";
+ ctx.fillRect(x, y, width, height);
+
+ ctx.beginPath();
+ ctx.rect(x - 1, y, width + 2, height);
+ ctx.clip();
+ ctx.strokeStyle = "rgb(64, 115, 244)";
+ ctx.stroke();
- var node = event.target;
- var parts = [node.textContent];
- while (node.previousSibling && node.previousSibling.textContent === ".") {
- node = node.previousSibling.previousSibling;
- if (!node || !node.hasStyleClass("webkit-javascript-ident"))
- break;
- parts.unshift(node.textContent);
- }
-
- var expression = parts.join(".");
-
- WebInspector.panels.scripts.evaluateInSelectedCallFrame(expression, false, "console", callback);
- function callback(result, exception)
- {
- if (exception)
- return;
- event.target.setAttribute("title", result.description);
- event.target.addEventListener("mouseout", onmouseout, false);
-
- function onmouseout(event)
- {
- event.target.removeAttribute("title");
- event.target.removeEventListener("mouseout", onmouseout, false);
- }
- }
- }
-
- function divPunctuatorAction(token)
- {
- this.cursor += token.length;
- this.nonToken += token;
- this.lexState = this.LexState.Initial;
- }
-
- function rightParenAction(token)
- {
- this.cursor += token.length;
- this.nonToken += token;
- this.lexState = this.LexState.DivisionAllowed;
- }
-
- function punctuatorAction(token)
- {
- this.cursor += token.length;
- this.nonToken += token;
- this.lexState = this.LexState.Initial;
+ ctx.restore();
}
}
-
-WebInspector.JavaScriptSourceSyntaxHighlighter.prototype.__proto__ = WebInspector.SourceSyntaxHighlighter.prototype;
diff --git a/WebCore/inspector/front-end/SourceHTMLTokenizer.js b/WebCore/inspector/front-end/SourceHTMLTokenizer.js
new file mode 100644
index 0000000..1212ffe
--- /dev/null
+++ b/WebCore/inspector/front-end/SourceHTMLTokenizer.js
@@ -0,0 +1,590 @@
+/* Generated by re2c 0.13.5 on Thu Jan 28 20:49:22 2010 */
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Generate js file as follows:
+//
+// re2c -isc WebCore/inspector/front-end/SourceHTMLTokenizer.re2js \
+// | sed 's|^yy\([^:]*\)*\:|case \1:|' \
+// | sed 's|[*]cursor[+][+]|this._charAt(cursor++)|' \
+// | sed 's|[[*][+][+]cursor|this._charAt(++cursor)|' \
+// | sed 's|[*]cursor|this._charAt(cursor)|' \
+// | sed 's|yych = \*\([^;]*\)|yych = this._charAt\1|' \
+// | sed 's|{ gotoCase = \([^; continue; };]*\)|{ gotoCase = \1; continue; }|' \
+// | sed 's|unsigned\ int|var|' \
+// | sed 's|var\ yych|case 1: case 1: var yych|'
+
+WebInspector.SourceHTMLTokenizer = function()
+{
+ WebInspector.SourceTokenizer.call(this);
+
+ this._lexConditions = {
+ INITIAL: 0,
+ COMMENT: 1,
+ DSTRING: 2,
+ SSTRING: 3
+ };
+
+ this._parseConditions = {
+ INITIAL: 0,
+ TAG: 1,
+ ATTRIBUTE: 2,
+ ATTRIBUTE_VALUE: 3,
+ SCRIPT: 4,
+ SCRIPT_ATTRIBUTE: 5,
+ SCRIPT_ATTRIBUTE_VALUE: 6,
+ DOCTYPE: 7
+ };
+
+ this.case_INITIAL = 1000;
+ this.case_COMMENT = 1001;
+ this.case_DSTRING = 1002;
+ this.case_SSTRING = 1003;
+
+ this.initialCondition = { lexCondition: this._lexConditions.INITIAL, parseCondition: this._parseConditions.INITIAL };
+}
+
+WebInspector.SourceHTMLTokenizer.prototype = {
+ _isAttribute: function()
+ {
+ return this._parseCondition === this._parseConditions.ATTRIBUTE || this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE;
+ },
+
+ _isAttributeValue: function()
+ {
+ return this._parseCondition === this._parseConditions.ATTRIBUTE_VALUE || this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE_VALUE;
+ },
+
+ _setAttributeValue: function()
+ {
+ if (this._parseCondition === this._parseConditions.ATTRIBUTE)
+ this._parseCondition = this._parseConditions.ATTRIBUTE_VALUE;
+ else if (this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE)
+ this._parseCondition = this._parseConditions.SCRIPT_ATTRIBUTE_VALUE;
+ },
+
+ _setAttribute: function()
+ {
+ if (this._parseCondition === this._parseConditions.ATTRIBUTE_VALUE)
+ this._parseCondition = this._parseConditions.ATTRIBUTE;
+ else if (this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE_VALUE)
+ this._parseCondition = this._parseConditions.SCRIPT_ATTRIBUTE;
+ },
+
+ _stringToken: function(cursor, stringEnds)
+ {
+ if (this._isAttributeValue()) {
+ this.tokenType = "html-attr-value";
+ if (stringEnds)
+ this._setAttribute();
+ } else if (this._parseCondition === this._parseConditions.DOCTYPE)
+ this.tokenType = "html-doctype";
+ else
+ this.tokenType = null;
+ return cursor;
+ },
+
+ nextToken: function(cursor)
+ {
+ var cursorOnEnter = cursor;
+ var gotoCase = 1;
+ while (1) {
+ switch (gotoCase)
+ // Following comment is replaced with generated state machine.
+
+ {
+ case 1: var yych;
+ var yyaccept = 0;
+ if (this.getLexCondition() < 2) {
+ if (this.getLexCondition() < 1) {
+ { gotoCase = this.case_INITIAL; continue; };
+ } else {
+ { gotoCase = this.case_COMMENT; continue; };
+ }
+ } else {
+ if (this.getLexCondition() < 3) {
+ { gotoCase = this.case_DSTRING; continue; };
+ } else {
+ { gotoCase = this.case_SSTRING; continue; };
+ }
+ }
+/* *********************************** */
+case this.case_COMMENT:
+
+ yych = this._charAt(cursor);
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 4; continue; };
+ { gotoCase = 3; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 4; continue; };
+ if (yych == '-') { gotoCase = 6; continue; };
+ { gotoCase = 3; continue; };
+ }
+case 2:
+ { this.tokenType = "html-comment"; return cursor; }
+case 3:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 9; continue; };
+case 4:
+ ++cursor;
+case 5:
+ { this.tokenType = null; return cursor; }
+case 6:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych != '-') { gotoCase = 5; continue; };
+case 7:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '>') { gotoCase = 10; continue; };
+case 8:
+ yyaccept = 0;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+case 9:
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 2; continue; };
+ { gotoCase = 8; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 2; continue; };
+ if (yych == '-') { gotoCase = 12; continue; };
+ { gotoCase = 8; continue; };
+ }
+case 10:
+ ++cursor;
+ this.setLexCondition(this._lexConditions.INITIAL);
+ { this.tokenType = "html-comment"; return cursor; }
+case 12:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '-') { gotoCase = 7; continue; };
+ cursor = YYMARKER;
+ if (yyaccept <= 0) {
+ { gotoCase = 2; continue; };
+ } else {
+ { gotoCase = 5; continue; };
+ }
+/* *********************************** */
+case this.case_DSTRING:
+ yych = this._charAt(cursor);
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 18; continue; };
+ { gotoCase = 17; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 18; continue; };
+ if (yych == '"') { gotoCase = 20; continue; };
+ { gotoCase = 17; continue; };
+ }
+case 16:
+ { return this._stringToken(cursor); }
+case 17:
+ yych = this._charAt(++cursor);
+ { gotoCase = 24; continue; };
+case 18:
+ ++cursor;
+ { this.tokenType = null; return cursor; }
+case 20:
+ ++cursor;
+case 21:
+ this.setLexCondition(this._lexConditions.INITIAL);
+ { return this._stringToken(cursor, true); }
+case 22:
+ yych = this._charAt(++cursor);
+ { gotoCase = 21; continue; };
+case 23:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 24:
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 16; continue; };
+ { gotoCase = 23; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 16; continue; };
+ if (yych == '"') { gotoCase = 22; continue; };
+ { gotoCase = 23; continue; };
+ }
+/* *********************************** */
+case this.case_INITIAL:
+ yych = this._charAt(cursor);
+ if (yych <= '=') {
+ if (yych <= '\'') {
+ if (yych == '"') { gotoCase = 29; continue; };
+ if (yych >= '\'') { gotoCase = 30; continue; };
+ } else {
+ if (yych <= '9') {
+ if (yych >= '0') { gotoCase = 31; continue; };
+ } else {
+ if (yych <= ';') { gotoCase = 27; continue; };
+ if (yych <= '<') { gotoCase = 33; continue; };
+ { gotoCase = 35; continue; };
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '>') { gotoCase = 37; continue; };
+ if (yych <= '@') { gotoCase = 27; continue; };
+ if (yych <= 'Z') { gotoCase = 31; continue; };
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') { gotoCase = 31; continue; };
+ } else {
+ if (yych <= 'z') { gotoCase = 31; continue; };
+ if (yych >= 0x80) { gotoCase = 31; continue; };
+ }
+ }
+ }
+case 27:
+ ++cursor;
+case 28:
+ { this.tokenType = null; return cursor; }
+case 29:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 82; continue; };
+case 30:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 76; continue; };
+case 31:
+ ++cursor;
+ yych = this._charAt(cursor);
+ { gotoCase = 74; continue; };
+case 32:
+ {
+ if (this._parseCondition === this._parseConditions.SCRIPT) {
+ this.tokenType = null;
+ return cursor;
+ }
+
+ if (this._parseCondition === this._parseConditions.TAG) {
+ this.tokenType = "html-tag";
+ this._parseCondition = this._parseConditions.ATTRIBUTE;
+ } else if (this._isAttribute())
+ this.tokenType = "html-attr-name";
+ else if (this._isAttributeValue())
+ this.tokenType = "html-attr-value";
+ else if (this._parseCondition === this._parseConditions.DOCTYPE)
+ this.tokenType = "html-doctype";
+ else
+ this.tokenType = null;
+ return cursor;
+ }
+case 33:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= '/') {
+ if (yych == '!') { gotoCase = 42; continue; };
+ if (yych >= '/') { gotoCase = 39; continue; };
+ } else {
+ if (yych <= 'S') {
+ if (yych >= 'S') { gotoCase = 40; continue; };
+ } else {
+ if (yych == 's') { gotoCase = 40; continue; };
+ }
+ }
+case 34:
+ {
+ if (this._parseCondition === this._parseConditions.SCRIPT) {
+ this.tokenType = null;
+ return cursor;
+ }
+
+ this.tokenType = "html-tag";
+ this._parseCondition = this._parseConditions.TAG;
+ return cursor;
+ }
+case 35:
+ ++cursor;
+ {
+ if (this._isAttribute()) {
+ this.tokenType = null;
+ this._setAttributeValue();
+ } else if (this._parseCondition === this._parseConditions.DOCTYPE)
+ this.tokenType = "html-doctype";
+ else
+ this.tokenType = null;
+ return cursor;
+ }
+case 37:
+ ++cursor;
+ {
+ if (this._parseCondition === this._parseConditions.SCRIPT) {
+ this.tokenType = null;
+ return cursor;
+ }
+
+ if (this._parseCondition === this._parseConditions.DOCTYPE)
+ this.tokenType = "html-doctype";
+ else
+ this.tokenType = "html-tag";
+
+ if (this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE)
+ this._parseCondition = this._parseConditions.SCRIPT;
+ else
+ this._parseCondition = this._parseConditions.INITIAL;
+ return cursor;
+ }
+case 39:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == 'S') { gotoCase = 66; continue; };
+ if (yych == 's') { gotoCase = 66; continue; };
+ { gotoCase = 34; continue; };
+case 40:
+ yych = this._charAt(++cursor);
+ if (yych == 'C') { gotoCase = 60; continue; };
+ if (yych == 'c') { gotoCase = 60; continue; };
+case 41:
+ cursor = YYMARKER;
+ if (yyaccept <= 0) {
+ { gotoCase = 28; continue; };
+ } else {
+ { gotoCase = 34; continue; };
+ }
+case 42:
+ yych = this._charAt(++cursor);
+ if (yych <= 'C') {
+ if (yych != '-') { gotoCase = 41; continue; };
+ } else {
+ if (yych <= 'D') { gotoCase = 44; continue; };
+ if (yych == 'd') { gotoCase = 44; continue; };
+ { gotoCase = 41; continue; };
+ }
+ yych = this._charAt(++cursor);
+ if (yych == '-') { gotoCase = 52; continue; };
+ { gotoCase = 41; continue; };
+case 44:
+ yych = this._charAt(++cursor);
+ if (yych == 'O') { gotoCase = 45; continue; };
+ if (yych != 'o') { gotoCase = 41; continue; };
+case 45:
+ yych = this._charAt(++cursor);
+ if (yych == 'C') { gotoCase = 46; continue; };
+ if (yych != 'c') { gotoCase = 41; continue; };
+case 46:
+ yych = this._charAt(++cursor);
+ if (yych == 'T') { gotoCase = 47; continue; };
+ if (yych != 't') { gotoCase = 41; continue; };
+case 47:
+ yych = this._charAt(++cursor);
+ if (yych == 'Y') { gotoCase = 48; continue; };
+ if (yych != 'y') { gotoCase = 41; continue; };
+case 48:
+ yych = this._charAt(++cursor);
+ if (yych == 'P') { gotoCase = 49; continue; };
+ if (yych != 'p') { gotoCase = 41; continue; };
+case 49:
+ yych = this._charAt(++cursor);
+ if (yych == 'E') { gotoCase = 50; continue; };
+ if (yych != 'e') { gotoCase = 41; continue; };
+case 50:
+ ++cursor;
+ {
+ this.tokenType = "html-doctype";
+ this._parseCondition = this._parseConditions.DOCTYPE;
+ return cursor;
+ }
+case 52:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 55; continue; };
+ { gotoCase = 52; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 55; continue; };
+ if (yych != '-') { gotoCase = 52; continue; };
+ }
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '-') { gotoCase = 57; continue; };
+ { gotoCase = 41; continue; };
+case 55:
+ ++cursor;
+ this.setLexCondition(this._lexConditions.COMMENT);
+ { this.tokenType = "html-comment"; return cursor; }
+case 57:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych != '>') { gotoCase = 52; continue; };
+ ++cursor;
+ { this.tokenType = "html-comment"; return cursor; }
+case 60:
+ yych = this._charAt(++cursor);
+ if (yych == 'R') { gotoCase = 61; continue; };
+ if (yych != 'r') { gotoCase = 41; continue; };
+case 61:
+ yych = this._charAt(++cursor);
+ if (yych == 'I') { gotoCase = 62; continue; };
+ if (yych != 'i') { gotoCase = 41; continue; };
+case 62:
+ yych = this._charAt(++cursor);
+ if (yych == 'P') { gotoCase = 63; continue; };
+ if (yych != 'p') { gotoCase = 41; continue; };
+case 63:
+ yych = this._charAt(++cursor);
+ if (yych == 'T') { gotoCase = 64; continue; };
+ if (yych != 't') { gotoCase = 41; continue; };
+case 64:
+ ++cursor;
+ {
+ this.tokenType = "html-tag";
+ this._parseCondition = this._parseConditions.SCRIPT_ATTRIBUTE;
+ return cursor;
+ }
+case 66:
+ yych = this._charAt(++cursor);
+ if (yych == 'C') { gotoCase = 67; continue; };
+ if (yych != 'c') { gotoCase = 41; continue; };
+case 67:
+ yych = this._charAt(++cursor);
+ if (yych == 'R') { gotoCase = 68; continue; };
+ if (yych != 'r') { gotoCase = 41; continue; };
+case 68:
+ yych = this._charAt(++cursor);
+ if (yych == 'I') { gotoCase = 69; continue; };
+ if (yych != 'i') { gotoCase = 41; continue; };
+case 69:
+ yych = this._charAt(++cursor);
+ if (yych == 'P') { gotoCase = 70; continue; };
+ if (yych != 'p') { gotoCase = 41; continue; };
+case 70:
+ yych = this._charAt(++cursor);
+ if (yych == 'T') { gotoCase = 71; continue; };
+ if (yych != 't') { gotoCase = 41; continue; };
+case 71:
+ ++cursor;
+ {
+ this.tokenType = "html-tag";
+ this._parseCondition = this._parseConditions.INITIAL;
+ return cursor;
+ }
+case 73:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 74:
+ if (yych <= '^') {
+ if (yych <= '9') {
+ if (yych <= '/') { gotoCase = 32; continue; };
+ { gotoCase = 73; continue; };
+ } else {
+ if (yych <= '@') { gotoCase = 32; continue; };
+ if (yych <= 'Z') { gotoCase = 73; continue; };
+ { gotoCase = 32; continue; };
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') { gotoCase = 73; continue; };
+ { gotoCase = 32; continue; };
+ } else {
+ if (yych <= 'z') { gotoCase = 73; continue; };
+ if (yych <= 0x7F) { gotoCase = 32; continue; };
+ { gotoCase = 73; continue; };
+ }
+ }
+case 75:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 76:
+ if (yych <= '\f') {
+ if (yych != '\n') { gotoCase = 75; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 77; continue; };
+ if (yych == '\'') { gotoCase = 79; continue; };
+ { gotoCase = 75; continue; };
+ }
+case 77:
+ ++cursor;
+ this.setLexCondition(this._lexConditions.SSTRING);
+ { return this._stringToken(cursor); }
+case 79:
+ ++cursor;
+ { return this._stringToken(cursor, true); }
+case 81:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 82:
+ if (yych <= '\f') {
+ if (yych != '\n') { gotoCase = 81; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 83; continue; };
+ if (yych == '"') { gotoCase = 79; continue; };
+ { gotoCase = 81; continue; };
+ }
+case 83:
+ ++cursor;
+ this.setLexCondition(this._lexConditions.DSTRING);
+ { return this._stringToken(cursor); }
+/* *********************************** */
+case this.case_SSTRING:
+ yych = this._charAt(cursor);
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 89; continue; };
+ { gotoCase = 88; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 89; continue; };
+ if (yych == '\'') { gotoCase = 91; continue; };
+ { gotoCase = 88; continue; };
+ }
+case 87:
+ { return this._stringToken(cursor); }
+case 88:
+ yych = this._charAt(++cursor);
+ { gotoCase = 95; continue; };
+case 89:
+ ++cursor;
+ { this.tokenType = null; return cursor; }
+case 91:
+ ++cursor;
+case 92:
+ this.setLexCondition(this._lexConditions.INITIAL);
+ { return this._stringToken(cursor, true); }
+case 93:
+ yych = this._charAt(++cursor);
+ { gotoCase = 92; continue; };
+case 94:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 95:
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 87; continue; };
+ { gotoCase = 94; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 87; continue; };
+ if (yych == '\'') { gotoCase = 93; continue; };
+ { gotoCase = 94; continue; };
+ }
+ }
+
+ }
+ }
+}
+
+WebInspector.SourceHTMLTokenizer.prototype.__proto__ = WebInspector.SourceTokenizer.prototype;
diff --git a/WebCore/inspector/front-end/SourceHTMLTokenizer.re2js b/WebCore/inspector/front-end/SourceHTMLTokenizer.re2js
new file mode 100644
index 0000000..e56f3ff
--- /dev/null
+++ b/WebCore/inspector/front-end/SourceHTMLTokenizer.re2js
@@ -0,0 +1,258 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Generate js file as follows:
+//
+// re2c -isc WebCore/inspector/front-end/SourceHTMLTokenizer.re2js \
+// | sed 's|^yy\([^:]*\)*\:|case \1:|' \
+// | sed 's|[*]cursor[+][+]|this._charAt(cursor++)|' \
+// | sed 's|[[*][+][+]cursor|this._charAt(++cursor)|' \
+// | sed 's|[*]cursor|this._charAt(cursor)|' \
+// | sed 's|yych = \*\([^;]*\)|yych = this._charAt\1|' \
+// | sed 's|goto case \([^;]*\)|{ gotoCase = \1; continue; }|' \
+// | sed 's|unsigned\ int|var|' \
+// | sed 's|var\ yych|case 1: var yych|'
+
+WebInspector.SourceHTMLTokenizer = function()
+{
+ WebInspector.SourceTokenizer.call(this);
+
+ this._lexConditions = {
+ INITIAL: 0,
+ COMMENT: 1,
+ DSTRING: 2,
+ SSTRING: 3
+ };
+
+ this._parseConditions = {
+ INITIAL: 0,
+ TAG: 1,
+ ATTRIBUTE: 2,
+ ATTRIBUTE_VALUE: 3,
+ SCRIPT: 4,
+ SCRIPT_ATTRIBUTE: 5,
+ SCRIPT_ATTRIBUTE_VALUE: 6,
+ DOCTYPE: 7
+ };
+
+ this.case_INITIAL = 1000;
+ this.case_COMMENT = 1001;
+ this.case_DSTRING = 1002;
+ this.case_SSTRING = 1003;
+
+ this.initialCondition = { lexCondition: this._lexConditions.INITIAL, parseCondition: this._parseConditions.INITIAL };
+}
+
+WebInspector.SourceHTMLTokenizer.prototype = {
+ _isAttribute: function()
+ {
+ return this._parseCondition === this._parseConditions.ATTRIBUTE || this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE;
+ },
+
+ _isAttributeValue: function()
+ {
+ return this._parseCondition === this._parseConditions.ATTRIBUTE_VALUE || this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE_VALUE;
+ },
+
+ _setAttributeValue: function()
+ {
+ if (this._parseCondition === this._parseConditions.ATTRIBUTE)
+ this._parseCondition = this._parseConditions.ATTRIBUTE_VALUE;
+ else if (this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE)
+ this._parseCondition = this._parseConditions.SCRIPT_ATTRIBUTE_VALUE;
+ },
+
+ _setAttribute: function()
+ {
+ if (this._parseCondition === this._parseConditions.ATTRIBUTE_VALUE)
+ this._parseCondition = this._parseConditions.ATTRIBUTE;
+ else if (this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE_VALUE)
+ this._parseCondition = this._parseConditions.SCRIPT_ATTRIBUTE;
+ },
+
+ _stringToken: function(cursor, stringEnds)
+ {
+ if (this._isAttributeValue()) {
+ this.tokenType = "html-attr-value";
+ if (stringEnds)
+ this._setAttribute();
+ } else if (this._parseCondition === this._parseConditions.DOCTYPE)
+ this.tokenType = "html-doctype";
+ else
+ this.tokenType = null;
+ return cursor;
+ },
+
+ nextToken: function(cursor)
+ {
+ var cursorOnEnter = cursor;
+ var gotoCase = 1;
+ while (1) {
+ switch (gotoCase)
+ // Following comment is replaced with generated state machine.
+ /*!re2c
+ re2c:define:YYCTYPE = "var";
+ re2c:define:YYCURSOR = cursor;
+ re2c:define:YYGETCONDITION = "this.getLexCondition";
+ re2c:define:YYSETCONDITION = "this.setLexCondition";
+ re2c:condprefix = "case this.case_";
+ re2c:condenumprefix = "this._lexConditions.";
+ re2c:yyfill:enable = 0;
+ re2c:labelprefix = "case ";
+ re2c:indent:top = 2;
+ re2c:indent:string = " ";
+
+ CommentContent = ([^-\r\n] | ("--" [^>]))*;
+ Comment = "<!--" CommentContent "-->";
+ CommentStart = "<!--" CommentContent [\r\n];
+ CommentEnd = CommentContent "-->";
+
+ DocTypeLT = "<!" [Dd] [Oo] [Cc] [Tt] [Yy] [Pp] [Ee];
+ ScriptStart = "<" [Ss] [Cc] [Rr] [Ii] [Pp] [Tt];
+ ScriptEnd = "</" [Ss] [Cc] [Rr] [Ii] [Pp] [Tt];
+
+ LT = "<" | "</";
+ GT = ">";
+ EqualSign = "=";
+
+ DoubleStringContent = [^\r\n\"]*;
+ SingleStringContent = [^\r\n\']*;
+ StringLiteral = "\"" DoubleStringContent "\"" | "'" SingleStringContent "'";
+ DoubleStringStart = "\"" DoubleStringContent [\r\n];
+ DoubleStringEnd = DoubleStringContent "\"";
+ SingleStringStart = "'" SingleStringContent [\r\n];
+ SingleStringEnd = SingleStringContent "'";
+
+ Identifier = [_a-zA-Z0-9\x80-\xFF]+;
+
+ <INITIAL> Comment { this.tokenType = "html-comment"; return cursor; }
+ <INITIAL> CommentStart => COMMENT { this.tokenType = "html-comment"; return cursor; }
+ <COMMENT> CommentContent => COMMENT { this.tokenType = "html-comment"; return cursor; }
+ <COMMENT> CommentEnd => INITIAL { this.tokenType = "html-comment"; return cursor; }
+
+ <INITIAL> DocTypeLT => INITIAL
+ {
+ this.tokenType = "html-doctype";
+ this._parseCondition = this._parseConditions.DOCTYPE;
+ return cursor;
+ }
+
+ <INITIAL> ScriptStart => INITIAL
+ {
+ this.tokenType = "html-tag";
+ this._parseCondition = this._parseConditions.SCRIPT_ATTRIBUTE;
+ return cursor;
+ }
+
+ <INITIAL> ScriptEnd => INITIAL
+ {
+ this.tokenType = "html-tag";
+ this._parseCondition = this._parseConditions.INITIAL;
+ return cursor;
+ }
+
+ <INITIAL> LT => INITIAL
+ {
+ if (this._parseCondition === this._parseConditions.SCRIPT) {
+ this.tokenType = null;
+ return cursor;
+ }
+
+ this.tokenType = "html-tag";
+ this._parseCondition = this._parseConditions.TAG;
+ return cursor;
+ }
+
+ <INITIAL> GT => INITIAL
+ {
+ if (this._parseCondition === this._parseConditions.SCRIPT) {
+ this.tokenType = null;
+ return cursor;
+ }
+
+ if (this._parseCondition === this._parseConditions.DOCTYPE)
+ this.tokenType = "html-doctype";
+ else
+ this.tokenType = "html-tag";
+
+ if (this._parseCondition === this._parseConditions.SCRIPT_ATTRIBUTE)
+ this._parseCondition = this._parseConditions.SCRIPT;
+ else
+ this._parseCondition = this._parseConditions.INITIAL;
+ return cursor;
+ }
+
+ <INITIAL> StringLiteral { return this._stringToken(cursor, true); }
+ <INITIAL> DoubleStringStart => DSTRING { return this._stringToken(cursor); }
+ <DSTRING> DoubleStringContent => DSTRING { return this._stringToken(cursor); }
+ <DSTRING> DoubleStringEnd => INITIAL { return this._stringToken(cursor, true); }
+ <INITIAL> SingleStringStart => SSTRING { return this._stringToken(cursor); }
+ <SSTRING> SingleStringContent => SSTRING { return this._stringToken(cursor); }
+ <SSTRING> SingleStringEnd => INITIAL { return this._stringToken(cursor, true); }
+
+ <INITIAL> EqualSign => INITIAL
+ {
+ if (this._isAttribute()) {
+ this.tokenType = null;
+ this._setAttributeValue();
+ } else if (this._parseCondition === this._parseConditions.DOCTYPE)
+ this.tokenType = "html-doctype";
+ else
+ this.tokenType = null;
+ return cursor;
+ }
+
+ <INITIAL> Identifier
+ {
+ if (this._parseCondition === this._parseConditions.SCRIPT) {
+ this.tokenType = null;
+ return cursor;
+ }
+
+ if (this._parseCondition === this._parseConditions.TAG) {
+ this.tokenType = "html-tag";
+ this._parseCondition = this._parseConditions.ATTRIBUTE;
+ } else if (this._isAttribute())
+ this.tokenType = "html-attr-name";
+ else if (this._isAttributeValue())
+ this.tokenType = "html-attr-value";
+ else if (this._parseCondition === this._parseConditions.DOCTYPE)
+ this.tokenType = "html-doctype";
+ else
+ this.tokenType = null;
+ return cursor;
+ }
+ <*> [^] { this.tokenType = null; return cursor; }
+ */
+ }
+ }
+}
+
+WebInspector.SourceHTMLTokenizer.prototype.__proto__ = WebInspector.SourceTokenizer.prototype;
diff --git a/WebCore/inspector/front-end/SourceJavaScriptTokenizer.js b/WebCore/inspector/front-end/SourceJavaScriptTokenizer.js
new file mode 100644
index 0000000..816023f
--- /dev/null
+++ b/WebCore/inspector/front-end/SourceJavaScriptTokenizer.js
@@ -0,0 +1,2416 @@
+/* Generated by re2c 0.13.5 on Thu Jan 28 20:49:23 2010 */
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Generate js file as follows:
+//
+// re2c -isc WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js \
+// | sed 's|^yy\([^:]*\)*\:|case \1:|' \
+// | sed 's|[*]cursor[+][+]|this._charAt(cursor++)|' \
+// | sed 's|[[*][+][+]cursor|this._charAt(++cursor)|' \
+// | sed 's|[*]cursor|this._charAt(cursor)|' \
+// | sed 's|yych = \*\([^;]*\)|yych = this._charAt\1|' \
+// | sed 's|{ gotoCase = \([^; continue; };]*\)|{ gotoCase = \1; continue; }|' \
+// | sed 's|unsigned\ int|var|' \
+// | sed 's|var\ yych|case 1: case 1: var yych|'
+
+WebInspector.SourceJavaScriptTokenizer = function()
+{
+ WebInspector.SourceTokenizer.call(this);
+
+ this._keywords = [
+ "null", "true", "false", "break", "case", "catch", "const", "default", "finally", "for",
+ "instanceof", "new", "var", "continue", "function", "return", "void", "delete", "if",
+ "this", "do", "while", "else", "in", "switch", "throw", "try", "typeof", "debugger",
+ "class", "enum", "export", "extends", "import", "super", "get", "set"
+ ].keySet();
+
+ this._lexConditions = {
+ DIV: 0,
+ NODIV: 1,
+ COMMENT: 2,
+ DSTRING: 3,
+ SSTRING: 4,
+ REGEX: 5
+ };
+
+ this.case_DIV = 1000;
+ this.case_NODIV = 1001;
+ this.case_COMMENT = 1002;
+ this.case_DSTRING = 1003;
+ this.case_SSTRING = 1004;
+ this.case_REGEX = 1005;
+
+ this.initialCondition = { lexCondition: this._lexConditions.NODIV }
+}
+
+WebInspector.SourceJavaScriptTokenizer.prototype = {
+ nextToken: function(cursor)
+ {
+ var cursorOnEnter = cursor;
+ var gotoCase = 1;
+ while (1) {
+ switch (gotoCase)
+ // Following comment is replaced with generated state machine.
+
+ {
+ case 1: var yych;
+ var yyaccept = 0;
+ if (this.getLexCondition() < 3) {
+ if (this.getLexCondition() < 1) {
+ { gotoCase = this.case_DIV; continue; };
+ } else {
+ if (this.getLexCondition() < 2) {
+ { gotoCase = this.case_NODIV; continue; };
+ } else {
+ { gotoCase = this.case_COMMENT; continue; };
+ }
+ }
+ } else {
+ if (this.getLexCondition() < 4) {
+ { gotoCase = this.case_DSTRING; continue; };
+ } else {
+ if (this.getLexCondition() < 5) {
+ { gotoCase = this.case_SSTRING; continue; };
+ } else {
+ { gotoCase = this.case_REGEX; continue; };
+ }
+ }
+ }
+/* *********************************** */
+case this.case_COMMENT:
+
+ yych = this._charAt(cursor);
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 4; continue; };
+ { gotoCase = 3; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 4; continue; };
+ if (yych == '*') { gotoCase = 6; continue; };
+ { gotoCase = 3; continue; };
+ }
+case 2:
+ { this.tokenType = "javascript-comment"; return cursor; }
+case 3:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 12; continue; };
+case 4:
+ ++cursor;
+ { this.tokenType = null; return cursor; }
+case 6:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == '*') { gotoCase = 9; continue; };
+ if (yych != '/') { gotoCase = 11; continue; };
+case 7:
+ ++cursor;
+ this.setLexCondition(this._lexConditions.NODIV);
+ { this.tokenType = "javascript-comment"; return cursor; }
+case 9:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '*') { gotoCase = 9; continue; };
+ if (yych == '/') { gotoCase = 7; continue; };
+case 11:
+ yyaccept = 0;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+case 12:
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 2; continue; };
+ { gotoCase = 11; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 2; continue; };
+ if (yych == '*') { gotoCase = 9; continue; };
+ { gotoCase = 11; continue; };
+ }
+/* *********************************** */
+case this.case_DIV:
+ yych = this._charAt(cursor);
+ if (yych <= '9') {
+ if (yych <= '(') {
+ if (yych <= '#') {
+ if (yych <= ' ') { gotoCase = 15; continue; };
+ if (yych <= '!') { gotoCase = 17; continue; };
+ if (yych <= '"') { gotoCase = 19; continue; };
+ } else {
+ if (yych <= '%') {
+ if (yych <= '$') { gotoCase = 20; continue; };
+ { gotoCase = 22; continue; };
+ } else {
+ if (yych <= '&') { gotoCase = 23; continue; };
+ if (yych <= '\'') { gotoCase = 24; continue; };
+ { gotoCase = 25; continue; };
+ }
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= ')') { gotoCase = 26; continue; };
+ if (yych <= '*') { gotoCase = 28; continue; };
+ if (yych <= '+') { gotoCase = 29; continue; };
+ { gotoCase = 25; continue; };
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') { gotoCase = 30; continue; };
+ { gotoCase = 31; continue; };
+ } else {
+ if (yych <= '/') { gotoCase = 32; continue; };
+ if (yych <= '0') { gotoCase = 34; continue; };
+ { gotoCase = 36; continue; };
+ }
+ }
+ }
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '>') {
+ if (yych <= ';') { gotoCase = 25; continue; };
+ if (yych <= '<') { gotoCase = 37; continue; };
+ if (yych <= '=') { gotoCase = 38; continue; };
+ { gotoCase = 39; continue; };
+ } else {
+ if (yych <= '@') {
+ if (yych <= '?') { gotoCase = 25; continue; };
+ } else {
+ if (yych <= 'Z') { gotoCase = 20; continue; };
+ if (yych <= '[') { gotoCase = 25; continue; };
+ { gotoCase = 40; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '^') {
+ if (yych <= ']') { gotoCase = 25; continue; };
+ { gotoCase = 41; continue; };
+ } else {
+ if (yych != '`') { gotoCase = 20; continue; };
+ }
+ } else {
+ if (yych <= '|') {
+ if (yych <= '{') { gotoCase = 25; continue; };
+ { gotoCase = 42; continue; };
+ } else {
+ if (yych <= '~') { gotoCase = 25; continue; };
+ if (yych >= 0x80) { gotoCase = 20; continue; };
+ }
+ }
+ }
+ }
+case 15:
+ ++cursor;
+case 16:
+ { this.tokenType = null; return cursor; }
+case 17:
+ ++cursor;
+ if ((yych = this._charAt(cursor)) == '=') { gotoCase = 115; continue; };
+case 18:
+ this.setLexCondition(this._lexConditions.NODIV);
+ { this.tokenType = null; return cursor; }
+case 19:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == '\n') { gotoCase = 16; continue; };
+ if (yych == '\r') { gotoCase = 16; continue; };
+ { gotoCase = 107; continue; };
+case 20:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 50; continue; };
+case 21:
+ {
+ var token = this._line.substring(cursorOnEnter, cursor);
+ if (token in this._keywords)
+ this.tokenType = "javascript-keyword";
+ else
+ this.tokenType = "javascript-ident";
+ return cursor;
+ }
+case 22:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 23:
+ yych = this._charAt(++cursor);
+ if (yych == '&') { gotoCase = 43; continue; };
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 24:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == '\n') { gotoCase = 16; continue; };
+ if (yych == '\r') { gotoCase = 16; continue; };
+ { gotoCase = 96; continue; };
+case 25:
+ yych = this._charAt(++cursor);
+ { gotoCase = 18; continue; };
+case 26:
+ ++cursor;
+ { this.tokenType = null; return cursor; }
+case 28:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 29:
+ yych = this._charAt(++cursor);
+ if (yych == '+') { gotoCase = 43; continue; };
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 30:
+ yych = this._charAt(++cursor);
+ if (yych == '-') { gotoCase = 43; continue; };
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 31:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 18; continue; };
+ if (yych <= '9') { gotoCase = 89; continue; };
+ { gotoCase = 18; continue; };
+case 32:
+ yyaccept = 2;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= '.') {
+ if (yych == '*') { gotoCase = 78; continue; };
+ } else {
+ if (yych <= '/') { gotoCase = 80; continue; };
+ if (yych == '=') { gotoCase = 77; continue; };
+ }
+case 33:
+ this.setLexCondition(this._lexConditions.NODIV);
+ { this.tokenType = null; return cursor; }
+case 34:
+ yyaccept = 3;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= 'E') {
+ if (yych <= '/') {
+ if (yych == '.') { gotoCase = 63; continue; };
+ } else {
+ if (yych <= '7') { gotoCase = 72; continue; };
+ if (yych >= 'E') { gotoCase = 62; continue; };
+ }
+ } else {
+ if (yych <= 'd') {
+ if (yych == 'X') { gotoCase = 74; continue; };
+ } else {
+ if (yych <= 'e') { gotoCase = 62; continue; };
+ if (yych == 'x') { gotoCase = 74; continue; };
+ }
+ }
+case 35:
+ { this.tokenType = "javascript-number"; return cursor; }
+case 36:
+ yyaccept = 3;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= '9') {
+ if (yych == '.') { gotoCase = 63; continue; };
+ if (yych <= '/') { gotoCase = 35; continue; };
+ { gotoCase = 60; continue; };
+ } else {
+ if (yych <= 'E') {
+ if (yych <= 'D') { gotoCase = 35; continue; };
+ { gotoCase = 62; continue; };
+ } else {
+ if (yych == 'e') { gotoCase = 62; continue; };
+ { gotoCase = 35; continue; };
+ }
+ }
+case 37:
+ yych = this._charAt(++cursor);
+ if (yych <= ';') { gotoCase = 18; continue; };
+ if (yych <= '<') { gotoCase = 59; continue; };
+ if (yych <= '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 38:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 58; continue; };
+ { gotoCase = 18; continue; };
+case 39:
+ yych = this._charAt(++cursor);
+ if (yych <= '<') { gotoCase = 18; continue; };
+ if (yych <= '=') { gotoCase = 43; continue; };
+ if (yych <= '>') { gotoCase = 56; continue; };
+ { gotoCase = 18; continue; };
+case 40:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == 'u') { gotoCase = 44; continue; };
+ { gotoCase = 16; continue; };
+case 41:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 42:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 43; continue; };
+ if (yych != '|') { gotoCase = 18; continue; };
+case 43:
+ yych = this._charAt(++cursor);
+ { gotoCase = 18; continue; };
+case 44:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 46; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 46; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych <= 'f') { gotoCase = 46; continue; };
+ }
+case 45:
+ cursor = YYMARKER;
+ if (yyaccept <= 1) {
+ if (yyaccept <= 0) {
+ { gotoCase = 16; continue; };
+ } else {
+ { gotoCase = 21; continue; };
+ }
+ } else {
+ if (yyaccept <= 2) {
+ { gotoCase = 33; continue; };
+ } else {
+ { gotoCase = 35; continue; };
+ }
+ }
+case 46:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 47; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 47:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 48; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 48:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 49; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 49:
+ yyaccept = 1;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+case 50:
+ if (yych <= '[') {
+ if (yych <= '/') {
+ if (yych == '$') { gotoCase = 49; continue; };
+ { gotoCase = 21; continue; };
+ } else {
+ if (yych <= '9') { gotoCase = 49; continue; };
+ if (yych <= '@') { gotoCase = 21; continue; };
+ if (yych <= 'Z') { gotoCase = 49; continue; };
+ { gotoCase = 21; continue; };
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= '\\') { gotoCase = 51; continue; };
+ if (yych <= '^') { gotoCase = 21; continue; };
+ { gotoCase = 49; continue; };
+ } else {
+ if (yych <= '`') { gotoCase = 21; continue; };
+ if (yych <= 'z') { gotoCase = 49; continue; };
+ if (yych <= 0x7F) { gotoCase = 21; continue; };
+ { gotoCase = 49; continue; };
+ }
+ }
+case 51:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych != 'u') { gotoCase = 45; continue; };
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 53; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 53:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 54; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 54:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 55; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 55:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 49; continue; };
+ { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 49; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych <= 'f') { gotoCase = 49; continue; };
+ { gotoCase = 45; continue; };
+ }
+case 56:
+ yych = this._charAt(++cursor);
+ if (yych <= '<') { gotoCase = 18; continue; };
+ if (yych <= '=') { gotoCase = 43; continue; };
+ if (yych >= '?') { gotoCase = 18; continue; };
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 58:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 59:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 60:
+ yyaccept = 3;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '9') {
+ if (yych == '.') { gotoCase = 63; continue; };
+ if (yych <= '/') { gotoCase = 35; continue; };
+ { gotoCase = 60; continue; };
+ } else {
+ if (yych <= 'E') {
+ if (yych <= 'D') { gotoCase = 35; continue; };
+ } else {
+ if (yych != 'e') { gotoCase = 35; continue; };
+ }
+ }
+case 62:
+ yych = this._charAt(++cursor);
+ if (yych <= ',') {
+ if (yych == '+') { gotoCase = 69; continue; };
+ { gotoCase = 45; continue; };
+ } else {
+ if (yych <= '-') { gotoCase = 69; continue; };
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 70; continue; };
+ { gotoCase = 45; continue; };
+ }
+case 63:
+ yyaccept = 3;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'D') {
+ if (yych <= '/') { gotoCase = 35; continue; };
+ if (yych <= '9') { gotoCase = 63; continue; };
+ { gotoCase = 35; continue; };
+ } else {
+ if (yych <= 'E') { gotoCase = 65; continue; };
+ if (yych != 'e') { gotoCase = 35; continue; };
+ }
+case 65:
+ yych = this._charAt(++cursor);
+ if (yych <= ',') {
+ if (yych != '+') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= '-') { gotoCase = 66; continue; };
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 67; continue; };
+ { gotoCase = 45; continue; };
+ }
+case 66:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+case 67:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '/') { gotoCase = 35; continue; };
+ if (yych <= '9') { gotoCase = 67; continue; };
+ { gotoCase = 35; continue; };
+case 69:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+case 70:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '/') { gotoCase = 35; continue; };
+ if (yych <= '9') { gotoCase = 70; continue; };
+ { gotoCase = 35; continue; };
+case 72:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '/') { gotoCase = 35; continue; };
+ if (yych <= '7') { gotoCase = 72; continue; };
+ { gotoCase = 35; continue; };
+case 74:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 75; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 75:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 35; continue; };
+ if (yych <= '9') { gotoCase = 75; continue; };
+ { gotoCase = 35; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 75; continue; };
+ if (yych <= '`') { gotoCase = 35; continue; };
+ if (yych <= 'f') { gotoCase = 75; continue; };
+ { gotoCase = 35; continue; };
+ }
+case 77:
+ yych = this._charAt(++cursor);
+ { gotoCase = 33; continue; };
+case 78:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 85; continue; };
+ { gotoCase = 78; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 85; continue; };
+ if (yych == '*') { gotoCase = 83; continue; };
+ { gotoCase = 78; continue; };
+ }
+case 80:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 82; continue; };
+ if (yych != '\r') { gotoCase = 80; continue; };
+case 82:
+ { this.tokenType = "javascript-comment"; return cursor; }
+case 83:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '*') { gotoCase = 83; continue; };
+ if (yych == '/') { gotoCase = 87; continue; };
+ { gotoCase = 78; continue; };
+case 85:
+ ++cursor;
+ this.setLexCondition(this._lexConditions.COMMENT);
+ { this.tokenType = "javascript-comment"; return cursor; }
+case 87:
+ ++cursor;
+ { this.tokenType = "javascript-comment"; return cursor; }
+case 89:
+ yyaccept = 3;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'D') {
+ if (yych <= '/') { gotoCase = 35; continue; };
+ if (yych <= '9') { gotoCase = 89; continue; };
+ { gotoCase = 35; continue; };
+ } else {
+ if (yych <= 'E') { gotoCase = 91; continue; };
+ if (yych != 'e') { gotoCase = 35; continue; };
+ }
+case 91:
+ yych = this._charAt(++cursor);
+ if (yych <= ',') {
+ if (yych != '+') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= '-') { gotoCase = 92; continue; };
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 93; continue; };
+ { gotoCase = 45; continue; };
+ }
+case 92:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+case 93:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '/') { gotoCase = 35; continue; };
+ if (yych <= '9') { gotoCase = 93; continue; };
+ { gotoCase = 35; continue; };
+case 95:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 96:
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 45; continue; };
+ if (yych <= '\f') { gotoCase = 95; continue; };
+ { gotoCase = 45; continue; };
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '&') { gotoCase = 95; continue; };
+ { gotoCase = 98; continue; };
+ } else {
+ if (yych != '\\') { gotoCase = 95; continue; };
+ }
+ }
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'a') {
+ if (yych <= '!') {
+ if (yych <= '\n') {
+ if (yych <= '\t') { gotoCase = 45; continue; };
+ { gotoCase = 101; continue; };
+ } else {
+ if (yych == '\r') { gotoCase = 101; continue; };
+ { gotoCase = 45; continue; };
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '"') { gotoCase = 95; continue; };
+ if (yych <= '&') { gotoCase = 45; continue; };
+ { gotoCase = 95; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 95; continue; };
+ { gotoCase = 45; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'q') {
+ if (yych <= 'f') {
+ if (yych <= 'b') { gotoCase = 95; continue; };
+ if (yych <= 'e') { gotoCase = 45; continue; };
+ { gotoCase = 95; continue; };
+ } else {
+ if (yych == 'n') { gotoCase = 95; continue; };
+ { gotoCase = 45; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych == 's') { gotoCase = 45; continue; };
+ { gotoCase = 95; continue; };
+ } else {
+ if (yych <= 'u') { gotoCase = 100; continue; };
+ if (yych <= 'v') { gotoCase = 95; continue; };
+ { gotoCase = 45; continue; };
+ }
+ }
+ }
+case 98:
+ ++cursor;
+ { this.tokenType = "javascript-string"; return cursor; }
+case 100:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 103; continue; };
+ { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 103; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych <= 'f') { gotoCase = 103; continue; };
+ { gotoCase = 45; continue; };
+ }
+case 101:
+ ++cursor;
+ this.setLexCondition(this._lexConditions.SSTRING);
+ { this.tokenType = "javascript-string"; return cursor; }
+case 103:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 104; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 104:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 105; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 105:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 95; continue; };
+ { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 95; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych <= 'f') { gotoCase = 95; continue; };
+ { gotoCase = 45; continue; };
+ }
+case 106:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 107:
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 45; continue; };
+ if (yych <= '\f') { gotoCase = 106; continue; };
+ { gotoCase = 45; continue; };
+ } else {
+ if (yych <= '"') {
+ if (yych <= '!') { gotoCase = 106; continue; };
+ { gotoCase = 98; continue; };
+ } else {
+ if (yych != '\\') { gotoCase = 106; continue; };
+ }
+ }
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'a') {
+ if (yych <= '!') {
+ if (yych <= '\n') {
+ if (yych <= '\t') { gotoCase = 45; continue; };
+ { gotoCase = 110; continue; };
+ } else {
+ if (yych == '\r') { gotoCase = 110; continue; };
+ { gotoCase = 45; continue; };
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '"') { gotoCase = 106; continue; };
+ if (yych <= '&') { gotoCase = 45; continue; };
+ { gotoCase = 106; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 106; continue; };
+ { gotoCase = 45; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'q') {
+ if (yych <= 'f') {
+ if (yych <= 'b') { gotoCase = 106; continue; };
+ if (yych <= 'e') { gotoCase = 45; continue; };
+ { gotoCase = 106; continue; };
+ } else {
+ if (yych == 'n') { gotoCase = 106; continue; };
+ { gotoCase = 45; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych == 's') { gotoCase = 45; continue; };
+ { gotoCase = 106; continue; };
+ } else {
+ if (yych <= 'u') { gotoCase = 109; continue; };
+ if (yych <= 'v') { gotoCase = 106; continue; };
+ { gotoCase = 45; continue; };
+ }
+ }
+ }
+case 109:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 112; continue; };
+ { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 112; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych <= 'f') { gotoCase = 112; continue; };
+ { gotoCase = 45; continue; };
+ }
+case 110:
+ ++cursor;
+ this.setLexCondition(this._lexConditions.DSTRING);
+ { this.tokenType = "javascript-string"; return cursor; }
+case 112:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 113; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 113:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 114; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 114:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 106; continue; };
+ { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 106; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych <= 'f') { gotoCase = 106; continue; };
+ { gotoCase = 45; continue; };
+ }
+case 115:
+ ++cursor;
+ if ((yych = this._charAt(cursor)) == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+/* *********************************** */
+case this.case_DSTRING:
+ yych = this._charAt(cursor);
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 120; continue; };
+ if (yych <= '\f') { gotoCase = 119; continue; };
+ { gotoCase = 120; continue; };
+ } else {
+ if (yych <= '"') {
+ if (yych <= '!') { gotoCase = 119; continue; };
+ { gotoCase = 122; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 124; continue; };
+ { gotoCase = 119; continue; };
+ }
+ }
+case 118:
+ { this.tokenType = "javascript-string"; return cursor; }
+case 119:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 126; continue; };
+case 120:
+ ++cursor;
+case 121:
+ { this.tokenType = null; return cursor; }
+case 122:
+ ++cursor;
+case 123:
+ this.setLexCondition(this._lexConditions.NODIV);
+ { this.tokenType = "javascript-string"; return cursor; }
+case 124:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= 'e') {
+ if (yych <= '\'') {
+ if (yych == '"') { gotoCase = 125; continue; };
+ if (yych <= '&') { gotoCase = 121; continue; };
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '[') { gotoCase = 121; continue; };
+ } else {
+ if (yych != 'b') { gotoCase = 121; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych <= 'm') {
+ if (yych >= 'g') { gotoCase = 121; continue; };
+ } else {
+ if (yych <= 'n') { gotoCase = 125; continue; };
+ if (yych <= 'q') { gotoCase = 121; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych <= 's') { gotoCase = 121; continue; };
+ } else {
+ if (yych <= 'u') { gotoCase = 127; continue; };
+ if (yych >= 'w') { gotoCase = 121; continue; };
+ }
+ }
+ }
+case 125:
+ yyaccept = 0;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+case 126:
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 118; continue; };
+ if (yych <= '\f') { gotoCase = 125; continue; };
+ { gotoCase = 118; continue; };
+ } else {
+ if (yych <= '"') {
+ if (yych <= '!') { gotoCase = 125; continue; };
+ { gotoCase = 133; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 132; continue; };
+ { gotoCase = 125; continue; };
+ }
+ }
+case 127:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 128; continue; };
+ if (yych <= '9') { gotoCase = 129; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 129; continue; };
+ if (yych <= '`') { gotoCase = 128; continue; };
+ if (yych <= 'f') { gotoCase = 129; continue; };
+ }
+case 128:
+ cursor = YYMARKER;
+ if (yyaccept <= 0) {
+ { gotoCase = 118; continue; };
+ } else {
+ { gotoCase = 121; continue; };
+ }
+case 129:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 128; continue; };
+ if (yych >= ':') { gotoCase = 128; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 130; continue; };
+ if (yych <= '`') { gotoCase = 128; continue; };
+ if (yych >= 'g') { gotoCase = 128; continue; };
+ }
+case 130:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 128; continue; };
+ if (yych >= ':') { gotoCase = 128; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 131; continue; };
+ if (yych <= '`') { gotoCase = 128; continue; };
+ if (yych >= 'g') { gotoCase = 128; continue; };
+ }
+case 131:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 128; continue; };
+ if (yych <= '9') { gotoCase = 125; continue; };
+ { gotoCase = 128; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 125; continue; };
+ if (yych <= '`') { gotoCase = 128; continue; };
+ if (yych <= 'f') { gotoCase = 125; continue; };
+ { gotoCase = 128; continue; };
+ }
+case 132:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'e') {
+ if (yych <= '\'') {
+ if (yych == '"') { gotoCase = 125; continue; };
+ if (yych <= '&') { gotoCase = 128; continue; };
+ { gotoCase = 125; continue; };
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '[') { gotoCase = 128; continue; };
+ { gotoCase = 125; continue; };
+ } else {
+ if (yych == 'b') { gotoCase = 125; continue; };
+ { gotoCase = 128; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych <= 'm') {
+ if (yych <= 'f') { gotoCase = 125; continue; };
+ { gotoCase = 128; continue; };
+ } else {
+ if (yych <= 'n') { gotoCase = 125; continue; };
+ if (yych <= 'q') { gotoCase = 128; continue; };
+ { gotoCase = 125; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych <= 's') { gotoCase = 128; continue; };
+ { gotoCase = 125; continue; };
+ } else {
+ if (yych <= 'u') { gotoCase = 127; continue; };
+ if (yych <= 'v') { gotoCase = 125; continue; };
+ { gotoCase = 128; continue; };
+ }
+ }
+ }
+case 133:
+ ++cursor;
+ yych = this._charAt(cursor);
+ { gotoCase = 123; continue; };
+/* *********************************** */
+case this.case_NODIV:
+ yych = this._charAt(cursor);
+ if (yych <= '9') {
+ if (yych <= '(') {
+ if (yych <= '#') {
+ if (yych <= ' ') { gotoCase = 136; continue; };
+ if (yych <= '!') { gotoCase = 138; continue; };
+ if (yych <= '"') { gotoCase = 140; continue; };
+ } else {
+ if (yych <= '%') {
+ if (yych <= '$') { gotoCase = 141; continue; };
+ { gotoCase = 143; continue; };
+ } else {
+ if (yych <= '&') { gotoCase = 144; continue; };
+ if (yych <= '\'') { gotoCase = 145; continue; };
+ { gotoCase = 146; continue; };
+ }
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= ')') { gotoCase = 147; continue; };
+ if (yych <= '*') { gotoCase = 149; continue; };
+ if (yych <= '+') { gotoCase = 150; continue; };
+ { gotoCase = 146; continue; };
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') { gotoCase = 151; continue; };
+ { gotoCase = 152; continue; };
+ } else {
+ if (yych <= '/') { gotoCase = 153; continue; };
+ if (yych <= '0') { gotoCase = 154; continue; };
+ { gotoCase = 156; continue; };
+ }
+ }
+ }
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '>') {
+ if (yych <= ';') { gotoCase = 146; continue; };
+ if (yych <= '<') { gotoCase = 157; continue; };
+ if (yych <= '=') { gotoCase = 158; continue; };
+ { gotoCase = 159; continue; };
+ } else {
+ if (yych <= '@') {
+ if (yych <= '?') { gotoCase = 146; continue; };
+ } else {
+ if (yych <= 'Z') { gotoCase = 141; continue; };
+ if (yych <= '[') { gotoCase = 146; continue; };
+ { gotoCase = 160; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '^') {
+ if (yych <= ']') { gotoCase = 146; continue; };
+ { gotoCase = 161; continue; };
+ } else {
+ if (yych != '`') { gotoCase = 141; continue; };
+ }
+ } else {
+ if (yych <= '|') {
+ if (yych <= '{') { gotoCase = 146; continue; };
+ { gotoCase = 162; continue; };
+ } else {
+ if (yych <= '~') { gotoCase = 146; continue; };
+ if (yych >= 0x80) { gotoCase = 141; continue; };
+ }
+ }
+ }
+ }
+case 136:
+ ++cursor;
+case 137:
+ { this.tokenType = null; return cursor; }
+case 138:
+ ++cursor;
+ if ((yych = this._charAt(cursor)) == '=') { gotoCase = 260; continue; };
+case 139:
+ { this.tokenType = null; return cursor; }
+case 140:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == '\n') { gotoCase = 137; continue; };
+ if (yych == '\r') { gotoCase = 137; continue; };
+ { gotoCase = 252; continue; };
+case 141:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 170; continue; };
+case 142:
+ this.setLexCondition(this._lexConditions.DIV);
+ {
+ var token = this._line.substring(cursorOnEnter, cursor);
+ if (token in this._keywords)
+ this.tokenType = "javascript-keyword";
+ else
+ this.tokenType = "javascript-ident";
+ return cursor;
+ }
+case 143:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 144:
+ yych = this._charAt(++cursor);
+ if (yych == '&') { gotoCase = 163; continue; };
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 145:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == '\n') { gotoCase = 137; continue; };
+ if (yych == '\r') { gotoCase = 137; continue; };
+ { gotoCase = 241; continue; };
+case 146:
+ yych = this._charAt(++cursor);
+ { gotoCase = 139; continue; };
+case 147:
+ ++cursor;
+ this.setLexCondition(this._lexConditions.DIV);
+ { this.tokenType = null; return cursor; }
+case 149:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 150:
+ yych = this._charAt(++cursor);
+ if (yych == '+') { gotoCase = 163; continue; };
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 151:
+ yych = this._charAt(++cursor);
+ if (yych == '-') { gotoCase = 163; continue; };
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 152:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 139; continue; };
+ if (yych <= '9') { gotoCase = 234; continue; };
+ { gotoCase = 139; continue; };
+case 153:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 137; continue; };
+ { gotoCase = 197; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 137; continue; };
+ if (yych <= ')') { gotoCase = 197; continue; };
+ { gotoCase = 202; continue; };
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych == '/') { gotoCase = 204; continue; };
+ { gotoCase = 197; continue; };
+ } else {
+ if (yych <= '[') { gotoCase = 200; continue; };
+ if (yych <= '\\') { gotoCase = 199; continue; };
+ if (yych <= ']') { gotoCase = 137; continue; };
+ { gotoCase = 197; continue; };
+ }
+ }
+case 154:
+ yyaccept = 2;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= 'E') {
+ if (yych <= '/') {
+ if (yych == '.') { gotoCase = 183; continue; };
+ } else {
+ if (yych <= '7') { gotoCase = 192; continue; };
+ if (yych >= 'E') { gotoCase = 182; continue; };
+ }
+ } else {
+ if (yych <= 'd') {
+ if (yych == 'X') { gotoCase = 194; continue; };
+ } else {
+ if (yych <= 'e') { gotoCase = 182; continue; };
+ if (yych == 'x') { gotoCase = 194; continue; };
+ }
+ }
+case 155:
+ this.setLexCondition(this._lexConditions.DIV);
+ { this.tokenType = "javascript-number"; return cursor; }
+case 156:
+ yyaccept = 2;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= '9') {
+ if (yych == '.') { gotoCase = 183; continue; };
+ if (yych <= '/') { gotoCase = 155; continue; };
+ { gotoCase = 180; continue; };
+ } else {
+ if (yych <= 'E') {
+ if (yych <= 'D') { gotoCase = 155; continue; };
+ { gotoCase = 182; continue; };
+ } else {
+ if (yych == 'e') { gotoCase = 182; continue; };
+ { gotoCase = 155; continue; };
+ }
+ }
+case 157:
+ yych = this._charAt(++cursor);
+ if (yych <= ';') { gotoCase = 139; continue; };
+ if (yych <= '<') { gotoCase = 179; continue; };
+ if (yych <= '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 158:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 178; continue; };
+ { gotoCase = 139; continue; };
+case 159:
+ yych = this._charAt(++cursor);
+ if (yych <= '<') { gotoCase = 139; continue; };
+ if (yych <= '=') { gotoCase = 163; continue; };
+ if (yych <= '>') { gotoCase = 176; continue; };
+ { gotoCase = 139; continue; };
+case 160:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == 'u') { gotoCase = 164; continue; };
+ { gotoCase = 137; continue; };
+case 161:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 162:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 163; continue; };
+ if (yych != '|') { gotoCase = 139; continue; };
+case 163:
+ yych = this._charAt(++cursor);
+ { gotoCase = 139; continue; };
+case 164:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 166; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 166; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych <= 'f') { gotoCase = 166; continue; };
+ }
+case 165:
+ cursor = YYMARKER;
+ if (yyaccept <= 1) {
+ if (yyaccept <= 0) {
+ { gotoCase = 137; continue; };
+ } else {
+ { gotoCase = 142; continue; };
+ }
+ } else {
+ if (yyaccept <= 2) {
+ { gotoCase = 155; continue; };
+ } else {
+ { gotoCase = 217; continue; };
+ }
+ }
+case 166:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 167; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 167:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 168; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 168:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 169; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 169:
+ yyaccept = 1;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+case 170:
+ if (yych <= '[') {
+ if (yych <= '/') {
+ if (yych == '$') { gotoCase = 169; continue; };
+ { gotoCase = 142; continue; };
+ } else {
+ if (yych <= '9') { gotoCase = 169; continue; };
+ if (yych <= '@') { gotoCase = 142; continue; };
+ if (yych <= 'Z') { gotoCase = 169; continue; };
+ { gotoCase = 142; continue; };
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= '\\') { gotoCase = 171; continue; };
+ if (yych <= '^') { gotoCase = 142; continue; };
+ { gotoCase = 169; continue; };
+ } else {
+ if (yych <= '`') { gotoCase = 142; continue; };
+ if (yych <= 'z') { gotoCase = 169; continue; };
+ if (yych <= 0x7F) { gotoCase = 142; continue; };
+ { gotoCase = 169; continue; };
+ }
+ }
+case 171:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych != 'u') { gotoCase = 165; continue; };
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 173; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 173:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 174; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 174:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 175; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 175:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 169; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 169; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych <= 'f') { gotoCase = 169; continue; };
+ { gotoCase = 165; continue; };
+ }
+case 176:
+ yych = this._charAt(++cursor);
+ if (yych <= '<') { gotoCase = 139; continue; };
+ if (yych <= '=') { gotoCase = 163; continue; };
+ if (yych >= '?') { gotoCase = 139; continue; };
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 178:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 179:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 180:
+ yyaccept = 2;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '9') {
+ if (yych == '.') { gotoCase = 183; continue; };
+ if (yych <= '/') { gotoCase = 155; continue; };
+ { gotoCase = 180; continue; };
+ } else {
+ if (yych <= 'E') {
+ if (yych <= 'D') { gotoCase = 155; continue; };
+ } else {
+ if (yych != 'e') { gotoCase = 155; continue; };
+ }
+ }
+case 182:
+ yych = this._charAt(++cursor);
+ if (yych <= ',') {
+ if (yych == '+') { gotoCase = 189; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych <= '-') { gotoCase = 189; continue; };
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 190; continue; };
+ { gotoCase = 165; continue; };
+ }
+case 183:
+ yyaccept = 2;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'D') {
+ if (yych <= '/') { gotoCase = 155; continue; };
+ if (yych <= '9') { gotoCase = 183; continue; };
+ { gotoCase = 155; continue; };
+ } else {
+ if (yych <= 'E') { gotoCase = 185; continue; };
+ if (yych != 'e') { gotoCase = 155; continue; };
+ }
+case 185:
+ yych = this._charAt(++cursor);
+ if (yych <= ',') {
+ if (yych != '+') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= '-') { gotoCase = 186; continue; };
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 187; continue; };
+ { gotoCase = 165; continue; };
+ }
+case 186:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+case 187:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '/') { gotoCase = 155; continue; };
+ if (yych <= '9') { gotoCase = 187; continue; };
+ { gotoCase = 155; continue; };
+case 189:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+case 190:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '/') { gotoCase = 155; continue; };
+ if (yych <= '9') { gotoCase = 190; continue; };
+ { gotoCase = 155; continue; };
+case 192:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '/') { gotoCase = 155; continue; };
+ if (yych <= '7') { gotoCase = 192; continue; };
+ { gotoCase = 155; continue; };
+case 194:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 195; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 195:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 155; continue; };
+ if (yych <= '9') { gotoCase = 195; continue; };
+ { gotoCase = 155; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 195; continue; };
+ if (yych <= '`') { gotoCase = 155; continue; };
+ if (yych <= 'f') { gotoCase = 195; continue; };
+ { gotoCase = 155; continue; };
+ }
+case 197:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '.') {
+ if (yych <= '\n') {
+ if (yych <= '\t') { gotoCase = 197; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych == '\r') { gotoCase = 165; continue; };
+ { gotoCase = 197; continue; };
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych <= '/') { gotoCase = 220; continue; };
+ if (yych <= 'Z') { gotoCase = 197; continue; };
+ { gotoCase = 228; continue; };
+ } else {
+ if (yych <= '\\') { gotoCase = 227; continue; };
+ if (yych <= ']') { gotoCase = 165; continue; };
+ { gotoCase = 197; continue; };
+ }
+ }
+case 199:
+ yych = this._charAt(++cursor);
+ if (yych == '\n') { gotoCase = 165; continue; };
+ if (yych == '\r') { gotoCase = 165; continue; };
+ { gotoCase = 197; continue; };
+case 200:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 165; continue; };
+ { gotoCase = 200; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 165; continue; };
+ if (yych <= ')') { gotoCase = 200; continue; };
+ { gotoCase = 165; continue; };
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych == '/') { gotoCase = 165; continue; };
+ { gotoCase = 200; continue; };
+ } else {
+ if (yych <= '\\') { gotoCase = 215; continue; };
+ if (yych <= ']') { gotoCase = 213; continue; };
+ { gotoCase = 200; continue; };
+ }
+ }
+case 202:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 209; continue; };
+ { gotoCase = 202; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 209; continue; };
+ if (yych == '*') { gotoCase = 207; continue; };
+ { gotoCase = 202; continue; };
+ }
+case 204:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 206; continue; };
+ if (yych != '\r') { gotoCase = 204; continue; };
+case 206:
+ { this.tokenType = "javascript-comment"; return cursor; }
+case 207:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '*') { gotoCase = 207; continue; };
+ if (yych == '/') { gotoCase = 211; continue; };
+ { gotoCase = 202; continue; };
+case 209:
+ ++cursor;
+ this.setLexCondition(this._lexConditions.COMMENT);
+ { this.tokenType = "javascript-comment"; return cursor; }
+case 211:
+ ++cursor;
+ { this.tokenType = "javascript-comment"; return cursor; }
+case 213:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 165; continue; };
+ { gotoCase = 213; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 165; continue; };
+ if (yych <= ')') { gotoCase = 213; continue; };
+ { gotoCase = 197; continue; };
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych == '/') { gotoCase = 220; continue; };
+ { gotoCase = 213; continue; };
+ } else {
+ if (yych <= '[') { gotoCase = 218; continue; };
+ if (yych <= '\\') { gotoCase = 216; continue; };
+ { gotoCase = 213; continue; };
+ }
+ }
+case 215:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 165; continue; };
+ if (yych == '\r') { gotoCase = 165; continue; };
+ { gotoCase = 200; continue; };
+case 216:
+ yyaccept = 3;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 217; continue; };
+ if (yych != '\r') { gotoCase = 213; continue; };
+case 217:
+ this.setLexCondition(this._lexConditions.REGEX);
+ { this.tokenType = "javascript-regexp"; return cursor; }
+case 218:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 165; continue; };
+ { gotoCase = 218; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 165; continue; };
+ if (yych <= ')') { gotoCase = 218; continue; };
+ { gotoCase = 165; continue; };
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych == '/') { gotoCase = 165; continue; };
+ { gotoCase = 218; continue; };
+ } else {
+ if (yych <= '\\') { gotoCase = 225; continue; };
+ if (yych <= ']') { gotoCase = 223; continue; };
+ { gotoCase = 218; continue; };
+ }
+ }
+case 220:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'h') {
+ if (yych == 'g') { gotoCase = 220; continue; };
+ } else {
+ if (yych <= 'i') { gotoCase = 220; continue; };
+ if (yych == 'm') { gotoCase = 220; continue; };
+ }
+ { this.tokenType = "javascript-regexp"; return cursor; }
+case 223:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 165; continue; };
+ { gotoCase = 223; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 165; continue; };
+ if (yych <= ')') { gotoCase = 223; continue; };
+ { gotoCase = 197; continue; };
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych == '/') { gotoCase = 220; continue; };
+ { gotoCase = 223; continue; };
+ } else {
+ if (yych <= '[') { gotoCase = 218; continue; };
+ if (yych <= '\\') { gotoCase = 226; continue; };
+ { gotoCase = 223; continue; };
+ }
+ }
+case 225:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 165; continue; };
+ if (yych == '\r') { gotoCase = 165; continue; };
+ { gotoCase = 218; continue; };
+case 226:
+ yyaccept = 3;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 217; continue; };
+ if (yych == '\r') { gotoCase = 217; continue; };
+ { gotoCase = 223; continue; };
+case 227:
+ yyaccept = 3;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 217; continue; };
+ if (yych == '\r') { gotoCase = 217; continue; };
+ { gotoCase = 197; continue; };
+case 228:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 165; continue; };
+ { gotoCase = 228; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 165; continue; };
+ if (yych <= ')') { gotoCase = 228; continue; };
+ { gotoCase = 165; continue; };
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych == '/') { gotoCase = 165; continue; };
+ { gotoCase = 228; continue; };
+ } else {
+ if (yych <= '\\') { gotoCase = 232; continue; };
+ if (yych >= '^') { gotoCase = 228; continue; };
+ }
+ }
+case 230:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 165; continue; };
+ { gotoCase = 230; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 165; continue; };
+ if (yych <= ')') { gotoCase = 230; continue; };
+ { gotoCase = 197; continue; };
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych == '/') { gotoCase = 220; continue; };
+ { gotoCase = 230; continue; };
+ } else {
+ if (yych <= '[') { gotoCase = 228; continue; };
+ if (yych <= '\\') { gotoCase = 233; continue; };
+ { gotoCase = 230; continue; };
+ }
+ }
+case 232:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 165; continue; };
+ if (yych == '\r') { gotoCase = 165; continue; };
+ { gotoCase = 228; continue; };
+case 233:
+ yyaccept = 3;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 217; continue; };
+ if (yych == '\r') { gotoCase = 217; continue; };
+ { gotoCase = 230; continue; };
+case 234:
+ yyaccept = 2;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'D') {
+ if (yych <= '/') { gotoCase = 155; continue; };
+ if (yych <= '9') { gotoCase = 234; continue; };
+ { gotoCase = 155; continue; };
+ } else {
+ if (yych <= 'E') { gotoCase = 236; continue; };
+ if (yych != 'e') { gotoCase = 155; continue; };
+ }
+case 236:
+ yych = this._charAt(++cursor);
+ if (yych <= ',') {
+ if (yych != '+') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= '-') { gotoCase = 237; continue; };
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 238; continue; };
+ { gotoCase = 165; continue; };
+ }
+case 237:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+case 238:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '/') { gotoCase = 155; continue; };
+ if (yych <= '9') { gotoCase = 238; continue; };
+ { gotoCase = 155; continue; };
+case 240:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 241:
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 165; continue; };
+ if (yych <= '\f') { gotoCase = 240; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '&') { gotoCase = 240; continue; };
+ { gotoCase = 243; continue; };
+ } else {
+ if (yych != '\\') { gotoCase = 240; continue; };
+ }
+ }
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'a') {
+ if (yych <= '!') {
+ if (yych <= '\n') {
+ if (yych <= '\t') { gotoCase = 165; continue; };
+ { gotoCase = 246; continue; };
+ } else {
+ if (yych == '\r') { gotoCase = 246; continue; };
+ { gotoCase = 165; continue; };
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '"') { gotoCase = 240; continue; };
+ if (yych <= '&') { gotoCase = 165; continue; };
+ { gotoCase = 240; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 240; continue; };
+ { gotoCase = 165; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'q') {
+ if (yych <= 'f') {
+ if (yych <= 'b') { gotoCase = 240; continue; };
+ if (yych <= 'e') { gotoCase = 165; continue; };
+ { gotoCase = 240; continue; };
+ } else {
+ if (yych == 'n') { gotoCase = 240; continue; };
+ { gotoCase = 165; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych == 's') { gotoCase = 165; continue; };
+ { gotoCase = 240; continue; };
+ } else {
+ if (yych <= 'u') { gotoCase = 245; continue; };
+ if (yych <= 'v') { gotoCase = 240; continue; };
+ { gotoCase = 165; continue; };
+ }
+ }
+ }
+case 243:
+ ++cursor;
+ { this.tokenType = "javascript-string"; return cursor; }
+case 245:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 248; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 248; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych <= 'f') { gotoCase = 248; continue; };
+ { gotoCase = 165; continue; };
+ }
+case 246:
+ ++cursor;
+ this.setLexCondition(this._lexConditions.SSTRING);
+ { this.tokenType = "javascript-string"; return cursor; }
+case 248:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 249; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 249:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 250; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 250:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 240; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 240; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych <= 'f') { gotoCase = 240; continue; };
+ { gotoCase = 165; continue; };
+ }
+case 251:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 252:
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 165; continue; };
+ if (yych <= '\f') { gotoCase = 251; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych <= '"') {
+ if (yych <= '!') { gotoCase = 251; continue; };
+ { gotoCase = 243; continue; };
+ } else {
+ if (yych != '\\') { gotoCase = 251; continue; };
+ }
+ }
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'a') {
+ if (yych <= '!') {
+ if (yych <= '\n') {
+ if (yych <= '\t') { gotoCase = 165; continue; };
+ { gotoCase = 255; continue; };
+ } else {
+ if (yych == '\r') { gotoCase = 255; continue; };
+ { gotoCase = 165; continue; };
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '"') { gotoCase = 251; continue; };
+ if (yych <= '&') { gotoCase = 165; continue; };
+ { gotoCase = 251; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 251; continue; };
+ { gotoCase = 165; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'q') {
+ if (yych <= 'f') {
+ if (yych <= 'b') { gotoCase = 251; continue; };
+ if (yych <= 'e') { gotoCase = 165; continue; };
+ { gotoCase = 251; continue; };
+ } else {
+ if (yych == 'n') { gotoCase = 251; continue; };
+ { gotoCase = 165; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych == 's') { gotoCase = 165; continue; };
+ { gotoCase = 251; continue; };
+ } else {
+ if (yych <= 'u') { gotoCase = 254; continue; };
+ if (yych <= 'v') { gotoCase = 251; continue; };
+ { gotoCase = 165; continue; };
+ }
+ }
+ }
+case 254:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 257; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 257; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych <= 'f') { gotoCase = 257; continue; };
+ { gotoCase = 165; continue; };
+ }
+case 255:
+ ++cursor;
+ this.setLexCondition(this._lexConditions.DSTRING);
+ { this.tokenType = "javascript-string"; return cursor; }
+case 257:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 258; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 258:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 259; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 259:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 251; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 251; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych <= 'f') { gotoCase = 251; continue; };
+ { gotoCase = 165; continue; };
+ }
+case 260:
+ ++cursor;
+ if ((yych = this._charAt(cursor)) == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+/* *********************************** */
+case this.case_REGEX:
+ yych = this._charAt(cursor);
+ if (yych <= '.') {
+ if (yych <= '\n') {
+ if (yych <= '\t') { gotoCase = 264; continue; };
+ { gotoCase = 265; continue; };
+ } else {
+ if (yych == '\r') { gotoCase = 265; continue; };
+ { gotoCase = 264; continue; };
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych <= '/') { gotoCase = 267; continue; };
+ if (yych <= 'Z') { gotoCase = 264; continue; };
+ { gotoCase = 269; continue; };
+ } else {
+ if (yych <= '\\') { gotoCase = 270; continue; };
+ if (yych <= ']') { gotoCase = 265; continue; };
+ { gotoCase = 264; continue; };
+ }
+ }
+case 263:
+ { this.tokenType = "javascript-regexp"; return cursor; }
+case 264:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 272; continue; };
+case 265:
+ ++cursor;
+case 266:
+ { this.tokenType = null; return cursor; }
+case 267:
+ ++cursor;
+ yych = this._charAt(cursor);
+ { gotoCase = 278; continue; };
+case 268:
+ this.setLexCondition(this._lexConditions.NODIV);
+ { this.tokenType = "javascript-regexp"; return cursor; }
+case 269:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 266; continue; };
+ if (yych <= '\f') { gotoCase = 276; continue; };
+ { gotoCase = 266; continue; };
+ } else {
+ if (yych <= '*') {
+ if (yych <= ')') { gotoCase = 276; continue; };
+ { gotoCase = 266; continue; };
+ } else {
+ if (yych == '/') { gotoCase = 266; continue; };
+ { gotoCase = 276; continue; };
+ }
+ }
+case 270:
+ yych = this._charAt(++cursor);
+ if (yych == '\n') { gotoCase = 266; continue; };
+ if (yych == '\r') { gotoCase = 266; continue; };
+case 271:
+ yyaccept = 0;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+case 272:
+ if (yych <= '.') {
+ if (yych <= '\n') {
+ if (yych <= '\t') { gotoCase = 271; continue; };
+ { gotoCase = 263; continue; };
+ } else {
+ if (yych == '\r') { gotoCase = 263; continue; };
+ { gotoCase = 271; continue; };
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych <= '/') { gotoCase = 277; continue; };
+ if (yych <= 'Z') { gotoCase = 271; continue; };
+ { gotoCase = 275; continue; };
+ } else {
+ if (yych <= '\\') { gotoCase = 273; continue; };
+ if (yych <= ']') { gotoCase = 263; continue; };
+ { gotoCase = 271; continue; };
+ }
+ }
+case 273:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 274; continue; };
+ if (yych != '\r') { gotoCase = 271; continue; };
+case 274:
+ cursor = YYMARKER;
+ if (yyaccept <= 0) {
+ { gotoCase = 263; continue; };
+ } else {
+ { gotoCase = 266; continue; };
+ }
+case 275:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 276:
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 274; continue; };
+ { gotoCase = 275; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 274; continue; };
+ if (yych <= ')') { gotoCase = 275; continue; };
+ { gotoCase = 274; continue; };
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych == '/') { gotoCase = 274; continue; };
+ { gotoCase = 275; continue; };
+ } else {
+ if (yych <= '\\') { gotoCase = 281; continue; };
+ if (yych <= ']') { gotoCase = 279; continue; };
+ { gotoCase = 275; continue; };
+ }
+ }
+case 277:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 278:
+ if (yych <= 'h') {
+ if (yych == 'g') { gotoCase = 277; continue; };
+ { gotoCase = 268; continue; };
+ } else {
+ if (yych <= 'i') { gotoCase = 277; continue; };
+ if (yych == 'm') { gotoCase = 277; continue; };
+ { gotoCase = 268; continue; };
+ }
+case 279:
+ yyaccept = 0;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 263; continue; };
+ { gotoCase = 279; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 263; continue; };
+ if (yych <= ')') { gotoCase = 279; continue; };
+ { gotoCase = 271; continue; };
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych == '/') { gotoCase = 277; continue; };
+ { gotoCase = 279; continue; };
+ } else {
+ if (yych <= '[') { gotoCase = 275; continue; };
+ if (yych <= '\\') { gotoCase = 282; continue; };
+ { gotoCase = 279; continue; };
+ }
+ }
+case 281:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 274; continue; };
+ if (yych == '\r') { gotoCase = 274; continue; };
+ { gotoCase = 275; continue; };
+case 282:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 274; continue; };
+ if (yych == '\r') { gotoCase = 274; continue; };
+ { gotoCase = 279; continue; };
+/* *********************************** */
+case this.case_SSTRING:
+ yych = this._charAt(cursor);
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 287; continue; };
+ if (yych <= '\f') { gotoCase = 286; continue; };
+ { gotoCase = 287; continue; };
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '&') { gotoCase = 286; continue; };
+ { gotoCase = 289; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 291; continue; };
+ { gotoCase = 286; continue; };
+ }
+ }
+case 285:
+ { this.tokenType = "javascript-string"; return cursor; }
+case 286:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 293; continue; };
+case 287:
+ ++cursor;
+case 288:
+ { this.tokenType = null; return cursor; }
+case 289:
+ ++cursor;
+case 290:
+ this.setLexCondition(this._lexConditions.NODIV);
+ { this.tokenType = "javascript-string"; return cursor; }
+case 291:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= 'e') {
+ if (yych <= '\'') {
+ if (yych == '"') { gotoCase = 292; continue; };
+ if (yych <= '&') { gotoCase = 288; continue; };
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '[') { gotoCase = 288; continue; };
+ } else {
+ if (yych != 'b') { gotoCase = 288; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych <= 'm') {
+ if (yych >= 'g') { gotoCase = 288; continue; };
+ } else {
+ if (yych <= 'n') { gotoCase = 292; continue; };
+ if (yych <= 'q') { gotoCase = 288; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych <= 's') { gotoCase = 288; continue; };
+ } else {
+ if (yych <= 'u') { gotoCase = 294; continue; };
+ if (yych >= 'w') { gotoCase = 288; continue; };
+ }
+ }
+ }
+case 292:
+ yyaccept = 0;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+case 293:
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 285; continue; };
+ if (yych <= '\f') { gotoCase = 292; continue; };
+ { gotoCase = 285; continue; };
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '&') { gotoCase = 292; continue; };
+ { gotoCase = 300; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 299; continue; };
+ { gotoCase = 292; continue; };
+ }
+ }
+case 294:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 295; continue; };
+ if (yych <= '9') { gotoCase = 296; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 296; continue; };
+ if (yych <= '`') { gotoCase = 295; continue; };
+ if (yych <= 'f') { gotoCase = 296; continue; };
+ }
+case 295:
+ cursor = YYMARKER;
+ if (yyaccept <= 0) {
+ { gotoCase = 285; continue; };
+ } else {
+ { gotoCase = 288; continue; };
+ }
+case 296:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 295; continue; };
+ if (yych >= ':') { gotoCase = 295; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 297; continue; };
+ if (yych <= '`') { gotoCase = 295; continue; };
+ if (yych >= 'g') { gotoCase = 295; continue; };
+ }
+case 297:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 295; continue; };
+ if (yych >= ':') { gotoCase = 295; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 298; continue; };
+ if (yych <= '`') { gotoCase = 295; continue; };
+ if (yych >= 'g') { gotoCase = 295; continue; };
+ }
+case 298:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 295; continue; };
+ if (yych <= '9') { gotoCase = 292; continue; };
+ { gotoCase = 295; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 292; continue; };
+ if (yych <= '`') { gotoCase = 295; continue; };
+ if (yych <= 'f') { gotoCase = 292; continue; };
+ { gotoCase = 295; continue; };
+ }
+case 299:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'e') {
+ if (yych <= '\'') {
+ if (yych == '"') { gotoCase = 292; continue; };
+ if (yych <= '&') { gotoCase = 295; continue; };
+ { gotoCase = 292; continue; };
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '[') { gotoCase = 295; continue; };
+ { gotoCase = 292; continue; };
+ } else {
+ if (yych == 'b') { gotoCase = 292; continue; };
+ { gotoCase = 295; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych <= 'm') {
+ if (yych <= 'f') { gotoCase = 292; continue; };
+ { gotoCase = 295; continue; };
+ } else {
+ if (yych <= 'n') { gotoCase = 292; continue; };
+ if (yych <= 'q') { gotoCase = 295; continue; };
+ { gotoCase = 292; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych <= 's') { gotoCase = 295; continue; };
+ { gotoCase = 292; continue; };
+ } else {
+ if (yych <= 'u') { gotoCase = 294; continue; };
+ if (yych <= 'v') { gotoCase = 292; continue; };
+ { gotoCase = 295; continue; };
+ }
+ }
+ }
+case 300:
+ ++cursor;
+ yych = this._charAt(cursor);
+ { gotoCase = 290; continue; };
+ }
+
+ }
+ }
+}
+
+WebInspector.SourceJavaScriptTokenizer.prototype.__proto__ = WebInspector.SourceTokenizer.prototype;
diff --git a/WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js b/WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js
new file mode 100644
index 0000000..8630ccb
--- /dev/null
+++ b/WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js
@@ -0,0 +1,177 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Generate js file as follows:
+//
+// re2c -isc WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js \
+// | sed 's|^yy\([^:]*\)*\:|case \1:|' \
+// | sed 's|[*]cursor[+][+]|this._charAt(cursor++)|' \
+// | sed 's|[[*][+][+]cursor|this._charAt(++cursor)|' \
+// | sed 's|[*]cursor|this._charAt(cursor)|' \
+// | sed 's|yych = \*\([^;]*\)|yych = this._charAt\1|' \
+// | sed 's|goto case \([^;]*\)|{ gotoCase = \1; continue; }|' \
+// | sed 's|unsigned\ int|var|' \
+// | sed 's|var\ yych|case 1: var yych|'
+
+WebInspector.SourceJavaScriptTokenizer = function()
+{
+ WebInspector.SourceTokenizer.call(this);
+
+ this._keywords = [
+ "null", "true", "false", "break", "case", "catch", "const", "default", "finally", "for",
+ "instanceof", "new", "var", "continue", "function", "return", "void", "delete", "if",
+ "this", "do", "while", "else", "in", "switch", "throw", "try", "typeof", "debugger",
+ "class", "enum", "export", "extends", "import", "super", "get", "set"
+ ].keySet();
+
+ this._lexConditions = {
+ DIV: 0,
+ NODIV: 1,
+ COMMENT: 2,
+ DSTRING: 3,
+ SSTRING: 4,
+ REGEX: 5
+ };
+
+ this.case_DIV = 1000;
+ this.case_NODIV = 1001;
+ this.case_COMMENT = 1002;
+ this.case_DSTRING = 1003;
+ this.case_SSTRING = 1004;
+ this.case_REGEX = 1005;
+
+ this.initialCondition = { lexCondition: this._lexConditions.NODIV }
+}
+
+WebInspector.SourceJavaScriptTokenizer.prototype = {
+ nextToken: function(cursor)
+ {
+ var cursorOnEnter = cursor;
+ var gotoCase = 1;
+ while (1) {
+ switch (gotoCase)
+ // Following comment is replaced with generated state machine.
+ /*!re2c
+ re2c:define:YYCTYPE = "var";
+ re2c:define:YYCURSOR = cursor;
+ re2c:define:YYGETCONDITION = "this.getLexCondition";
+ re2c:define:YYSETCONDITION = "this.setLexCondition";
+ re2c:condprefix = "case this.case_";
+ re2c:condenumprefix = "this._lexConditions.";
+ re2c:yyfill:enable = 0;
+ re2c:labelprefix = "case ";
+ re2c:indent:top = 2;
+ re2c:indent:string = " ";
+
+ LineComment = "//" [^\r\n]*;
+ CommentContent = ([^*\r\n] | ("*"+[^/*]))*;
+ Comment = "/*" CommentContent "*"+ "/";
+ CommentStart = "/*" CommentContent [\r\n];
+ CommentEnd = CommentContent "*"+ "/";
+
+ DecimalDigit = [0-9];
+ NonZeroDigit = [1-9];
+ OctalDigit = [0-7];
+ HexDigit = [0-9a-fA-F];
+ SignedInteger = ("+"|"-")? DecimalDigit+;
+ ExponentPart = ("e" | "E") SignedInteger;
+ DecimalIntegerLiteral = "0" | NonZeroDigit DecimalDigit*;
+ DecimalLiteral = DecimalIntegerLiteral "." DecimalDigit* ExponentPart? | "." DecimalDigit+ ExponentPart? | DecimalIntegerLiteral ExponentPart?;
+ HexIntegerLiteral = "0" ("x"|"X") HexDigit+;
+ OctalIntegerLiteral = "0" OctalDigit+;
+ NumericLiteral = DecimalLiteral | HexIntegerLiteral | OctalIntegerLiteral;
+
+ Punctuation = [\!\%\&\(\*\+\,\-\.\:\;\<\=\>\?\[\]\^\{\|\}\~] | "!=" | "!==" | "%=" | "&&" | "&=" | "*=" | "++" | "+=" | "--" | "-=" | "<<" | "<<=" | "<=" | "==" | "===" | ">=" | ">>" | ">>=" | ">>>" | ">>>=" | "^=" | "|=" | "||";
+ Division = "/" | "/=";
+ RightParen = ")";
+
+ Letter = [a-zA-Z\x80-\xFF];
+ UnicodeEscapeSequence = "\\u" HexDigit HexDigit HexDigit HexDigit;
+
+ IdentifierStart = Letter | "_" | "$" | UnicodeEscapeSequence;
+ IdentifierPart = IdentifierStart | DecimalDigit;
+ Identifier = IdentifierStart IdentifierPart *;
+
+ DoubleStringContent = ([^\r\n\"\\] | UnicodeEscapeSequence | "\\" ['"\\bfnrtv])*;
+ SingleStringContent = ([^\r\n\'\\] | UnicodeEscapeSequence | "\\" ['"\\bfnrtv])*;
+ StringLiteral = "\"" DoubleStringContent "\"" | "'" SingleStringContent "'";
+ DoubleStringStart = "\"" DoubleStringContent "\\" [\r\n];
+ DoubleStringEnd = DoubleStringContent "\"";
+ SingleStringStart = "'" SingleStringContent "\\" [\r\n];
+ SingleStringEnd = SingleStringContent "'";
+
+ BackslashSequence = "\\" [^\r\n];
+ RegexSet = "[" ([^\r\n*\\/] | BackslashSequence)* "]";
+ RegexFirstChar = [^\r\n*\\/\[\]] | BackslashSequence | RegexSet;
+ RegexChar = [^\r\n\\/\[\]] | BackslashSequence | RegexSet;
+ RegexContent = RegexChar*;
+ Regex = "/" RegexFirstChar RegexContent "/" [igm]*;
+ RegexStart = "/" RegexFirstChar RegexContent "\\";
+ RegexEnd = RegexContent "/" [igm]*;
+
+ <DIV,NODIV> LineComment { this.tokenType = "javascript-comment"; return cursor; }
+ <DIV,NODIV> Comment { this.tokenType = "javascript-comment"; return cursor; }
+ <DIV,NODIV> CommentStart => COMMENT { this.tokenType = "javascript-comment"; return cursor; }
+ <COMMENT> CommentContent => COMMENT { this.tokenType = "javascript-comment"; return cursor; }
+ <COMMENT> CommentEnd => NODIV { this.tokenType = "javascript-comment"; return cursor; }
+
+ <DIV,NODIV> StringLiteral { this.tokenType = "javascript-string"; return cursor; }
+ <DIV,NODIV> DoubleStringStart => DSTRING { this.tokenType = "javascript-string"; return cursor; }
+ <DSTRING> DoubleStringContent => DSTRING { this.tokenType = "javascript-string"; return cursor; }
+ <DSTRING> DoubleStringEnd => NODIV { this.tokenType = "javascript-string"; return cursor; }
+ <DIV,NODIV> SingleStringStart => SSTRING { this.tokenType = "javascript-string"; return cursor; }
+ <SSTRING> SingleStringContent => SSTRING { this.tokenType = "javascript-string"; return cursor; }
+ <SSTRING> SingleStringEnd => NODIV { this.tokenType = "javascript-string"; return cursor; }
+
+ <NODIV> Regex { this.tokenType = "javascript-regexp"; return cursor; }
+ <NODIV> RegexStart => REGEX { this.tokenType = "javascript-regexp"; return cursor; }
+ <REGEX> RegexContent => REGEX { this.tokenType = "javascript-regexp"; return cursor; }
+ <REGEX> RegexEnd => NODIV { this.tokenType = "javascript-regexp"; return cursor; }
+
+ <DIV,NODIV> NumericLiteral => DIV { this.tokenType = "javascript-number"; return cursor; }
+ <DIV,NODIV> Identifier => DIV
+ {
+ var token = this._line.substring(cursorOnEnter, cursor);
+ if (token in this._keywords)
+ this.tokenType = "javascript-keyword";
+ else
+ this.tokenType = "javascript-ident";
+ return cursor;
+ }
+ <DIV,NODIV> RightParen => DIV { this.tokenType = null; return cursor; }
+ <DIV,NODIV> Punctuation => NODIV { this.tokenType = null; return cursor; }
+ <DIV> Division => NODIV { this.tokenType = null; return cursor; }
+ <*> [^] { this.tokenType = null; return cursor; }
+ */
+ }
+ }
+}
+
+WebInspector.SourceJavaScriptTokenizer.prototype.__proto__ = WebInspector.SourceTokenizer.prototype;
diff --git a/WebCore/inspector/front-end/SourceTokenizer.js b/WebCore/inspector/front-end/SourceTokenizer.js
new file mode 100644
index 0000000..1192383
--- /dev/null
+++ b/WebCore/inspector/front-end/SourceTokenizer.js
@@ -0,0 +1,103 @@
+/* Generated by re2c 0.13.5 on Tue Jan 26 01:16:33 2010 */
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.SourceTokenizer = function()
+{
+}
+
+WebInspector.SourceTokenizer.prototype = {
+ set line(line) {
+ this._line = line;
+ },
+
+ set condition(condition)
+ {
+ this._lexCondition = condition.lexCondition;
+ this._parseCondition = condition.parseCondition;
+ },
+
+ get condition()
+ {
+ return { lexCondition: this._lexCondition, parseCondition: this._parseCondition };
+ },
+
+ hasCondition: function(condition)
+ {
+ return this._lexCondition === condition.lexCondition && this._parseCondition === condition.parseCondition;
+ },
+
+ getLexCondition: function()
+ {
+ return this._lexCondition;
+ },
+
+ setLexCondition: function(lexCondition)
+ {
+ this._lexCondition = lexCondition;
+ },
+
+ _charAt: function(cursor)
+ {
+ return cursor < this._line.length ? this._line.charAt(cursor) : "\n";
+ }
+}
+
+
+WebInspector.SourceTokenizer.Registry = function() {
+ this._tokenizers = {};
+ this._tokenizerConstructors = {
+ "text/css": WebInspector.SourceCSSTokenizer,
+ "text/html": WebInspector.SourceHTMLTokenizer,
+ "text/javascript": WebInspector.SourceJavaScriptTokenizer,
+ "application/x-javascript": WebInspector.SourceJavaScriptTokenizer
+ };
+}
+
+WebInspector.SourceTokenizer.Registry.getInstance = function()
+{
+ if (!WebInspector.SourceTokenizer.Registry._instance)
+ WebInspector.SourceTokenizer.Registry._instance = new WebInspector.SourceTokenizer.Registry();
+ return WebInspector.SourceTokenizer.Registry._instance;
+}
+
+WebInspector.SourceTokenizer.Registry.prototype = {
+ getTokenizer: function(mimeType)
+ {
+ if (!this._tokenizerConstructors[mimeType])
+ return null;
+ var tokenizer = this._tokenizers[mimeType];
+ if (!tokenizer) {
+ tokenizer = new this._tokenizerConstructors[mimeType]();
+ this._tokenizers[mimeType] = tokenizer;
+ }
+ return tokenizer;
+ }
+}
diff --git a/WebCore/inspector/front-end/SourceView.js b/WebCore/inspector/front-end/SourceView.js
index 7ab7b5b..292b8af 100644
--- a/WebCore/inspector/front-end/SourceView.js
+++ b/WebCore/inspector/front-end/SourceView.js
@@ -28,54 +28,35 @@
WebInspector.SourceView = function(resource)
{
- // Set the sourceFrame first since WebInspector.ResourceView will set headersVisible
- // and our override of headersVisible needs the sourceFrame.
- this.sourceFrame = new WebInspector.SourceFrame(null, this._addBreakpoint.bind(this));
-
WebInspector.ResourceView.call(this, resource);
- resource.addEventListener("finished", this._resourceLoadingFinished, this);
-
this.element.addStyleClass("source");
+ this.sourceFrame = new WebInspector.SourceFrame(this.contentElement, this._addBreakpoint.bind(this));
+ resource.addEventListener("finished", this._resourceLoadingFinished, this);
this._frameNeedsSetup = true;
-
- this.contentElement.appendChild(this.sourceFrame.element);
-
- var gutterElement = document.createElement("div");
- gutterElement.className = "webkit-line-gutter-backdrop";
- this.element.appendChild(gutterElement);
}
WebInspector.SourceView.prototype = {
- set headersVisible(x)
- {
- if (x === this._headersVisible)
- return;
-
- var superSetter = WebInspector.ResourceView.prototype.__lookupSetter__("headersVisible");
- if (superSetter)
- superSetter.call(this, x);
-
- this.sourceFrame.autoSizesToFitContentHeight = x;
- },
-
show: function(parentElement)
{
WebInspector.ResourceView.prototype.show.call(this, parentElement);
this.setupSourceFrameIfNeeded();
+ this.sourceFrame.visible = true;
+ this.resize();
},
hide: function()
{
WebInspector.View.prototype.hide.call(this);
+ this.sourceFrame.visible = false;
this._currentSearchResultIndex = -1;
},
resize: function()
{
- if (this.sourceFrame.autoSizesToFitContentHeight)
- this.sourceFrame.sizeToFitContentHeight();
+ if (this.sourceFrame)
+ this.sourceFrame.resize();
},
detach: function()
@@ -96,28 +77,13 @@ WebInspector.SourceView.prototype = {
this.attach();
delete this._frameNeedsSetup;
- this.sourceFrame.addEventListener("content loaded", this._contentLoaded, this);
- InspectorFrontendHost.addResourceSourceToFrame(this.resource.identifier, this.sourceFrame.element);
+ WebInspector.getResourceContent(this.resource.identifier, this._contentLoaded.bind(this));
},
- _contentLoaded: function()
+ _contentLoaded: function(content)
{
- delete this._frameNeedsSetup;
- this.sourceFrame.removeEventListener("content loaded", this._contentLoaded, this);
-
- if (this.resource.type === WebInspector.Resource.Type.Script
- || this.resource.mimeType === "application/json"
- || this.resource.mimeType === "application/javascript"
- || /\.js(on)?$/.test(this.resource.lastPathComponent) ) {
- this.sourceFrame.addEventListener("syntax highlighting complete", this._syntaxHighlightingComplete, this);
- this.sourceFrame.syntaxHighlightJavascript();
- } else if (this.resource.type === WebInspector.Resource.Type.Stylesheet
- || this.resource.mimeType === "text/css"
- || /\.css$/.test(this.resource.lastPathComponent) ) {
- this.sourceFrame.addEventListener("syntax highlighting complete", this._syntaxHighlightingComplete, this);
- this.sourceFrame.syntaxHighlightCSS();
- } else
- this._sourceFrameSetupFinished();
+ this.sourceFrame.setContent(this.resource.mimeType, content);
+ this._sourceFrameSetupFinished();
},
_resourceLoadingFinished: function(event)
@@ -155,6 +121,7 @@ WebInspector.SourceView.prototype = {
{
this._currentSearchResultIndex = -1;
this._searchResults = [];
+ this.sourceFrame.clearSelection();
delete this._delayedFindSearchMatches;
},
@@ -163,44 +130,11 @@ WebInspector.SourceView.prototype = {
// Call searchCanceled since it will reset everything we need before doing a new search.
this.searchCanceled();
- var lineQueryRegex = /(^|\s)(?:#|line:\s*)(\d+)(\s|$)/i;
- var lineQueryMatch = query.match(lineQueryRegex);
- if (lineQueryMatch) {
- var lineToSearch = parseInt(lineQueryMatch[2]);
-
- // If there was a space before and after the line query part, replace with a space.
- // Otherwise replace with an empty string to eat the prefix or postfix space.
- var lineQueryReplacement = (lineQueryMatch[1] && lineQueryMatch[3] ? " " : "");
- var filterlessQuery = query.replace(lineQueryRegex, lineQueryReplacement);
- }
-
this._searchFinishedCallback = finishedCallback;
function findSearchMatches(query, finishedCallback)
{
- if (isNaN(lineToSearch)) {
- // Search the whole document since there was no line to search.
- this._searchResults = (InspectorFrontendHost.search(this.sourceFrame.element.contentDocument, query) || []);
- } else {
- var sourceRow = this.sourceFrame.sourceRow(lineToSearch);
- if (sourceRow) {
- if (filterlessQuery) {
- // There is still a query string, so search for that string in the line.
- this._searchResults = (InspectorFrontendHost.search(sourceRow, filterlessQuery) || []);
- } else {
- // Match the whole line, since there was no remaining query string to match.
- var rowRange = this.sourceFrame.element.contentDocument.createRange();
- rowRange.selectNodeContents(sourceRow);
- this._searchResults = [rowRange];
- }
- }
-
- // Attempt to search for the whole query, just incase it matches a color like "#333".
- var wholeQueryMatches = InspectorFrontendHost.search(this.sourceFrame.element.contentDocument, query);
- if (wholeQueryMatches)
- this._searchResults = this._searchResults.concat(wholeQueryMatches);
- }
-
+ this._searchResults = this.sourceFrame.findSearchMatches(query);
if (this._searchResults)
finishedCallback(this, this._searchResults.length);
}
@@ -287,29 +221,17 @@ WebInspector.SourceView.prototype = {
if (!foundRange)
return;
- var selection = this.sourceFrame.element.contentWindow.getSelection();
- selection.removeAllRanges();
- selection.addRange(foundRange);
-
- if (foundRange.startContainer.scrollIntoViewIfNeeded)
- foundRange.startContainer.scrollIntoViewIfNeeded(true);
- else if (foundRange.startContainer.parentNode)
- foundRange.startContainer.parentNode.scrollIntoViewIfNeeded(true);
+ this.sourceFrame.setSelection(foundRange);
},
_sourceFrameSetupFinished: function()
{
this._sourceFrameSetup = true;
+ this.resize();
if (this._delayedFindSearchMatches) {
this._delayedFindSearchMatches();
delete this._delayedFindSearchMatches;
}
- },
-
- _syntaxHighlightingComplete: function(event)
- {
- this._sourceFrameSetupFinished();
- this.sourceFrame.removeEventListener("syntax highlighting complete", null, this);
}
}
diff --git a/WebCore/inspector/front-end/StatusBarButton.js b/WebCore/inspector/front-end/StatusBarButton.js
index 5c69ed5..e29b487 100644
--- a/WebCore/inspector/front-end/StatusBarButton.js
+++ b/WebCore/inspector/front-end/StatusBarButton.js
@@ -28,7 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-WebInspector.StatusBarButton = function(title, className)
+WebInspector.StatusBarButton = function(title, className, states)
{
this.element = document.createElement("button");
this.element.className = className + " status-bar-item";
@@ -41,10 +41,18 @@ WebInspector.StatusBarButton = function(title, className)
this.glyphShadow = document.createElement("div");
this.glyphShadow.className = "glyph shadow";
this.element.appendChild(this.glyphShadow);
-
+
+ this.states = states;
+ if (!states)
+ this.states = 2;
+
+ if (states == 2)
+ this._state = false;
+ else
+ this._state = 0;
+
this.title = title;
this.disabled = false;
- this._toggled = false;
this._visible = true;
}
@@ -79,22 +87,44 @@ WebInspector.StatusBarButton.prototype = {
this._title = x;
this.element.title = x;
},
+
+ get state()
+ {
+ return this._state;
+ },
+
+ set state(x)
+ {
+ if (this._state === x)
+ return;
+
+ if (this.states === 2) {
+ if (x)
+ this.element.addStyleClass("toggled-on");
+ else
+ this.element.removeStyleClass("toggled-on");
+ } else {
+ if (x !== 0) {
+ this.element.removeStyleClass("toggled-" + this._state);
+ this.element.addStyleClass("toggled-" + x);
+ } else
+ this.element.removeStyleClass("toggled-" + this._state);
+ }
+ this._state = x;
+ },
get toggled()
{
- return this._toggled;
+ if (this.states !== 2)
+ throw("Only used toggled when there are 2 states, otherwise, use state");
+ return this.state;
},
set toggled(x)
{
- if (this._toggled === x)
- return;
-
- if (x)
- this.element.addStyleClass("toggled-on");
- else
- this.element.removeStyleClass("toggled-on");
- this._toggled = x;
+ if (this.states !== 2)
+ throw("Only used toggled when there are 2 states, otherwise, use state");
+ this.state = x;
},
get visible()
diff --git a/WebCore/inspector/front-end/StoragePanel.js b/WebCore/inspector/front-end/StoragePanel.js
index dd558df..dee4442 100644
--- a/WebCore/inspector/front-end/StoragePanel.js
+++ b/WebCore/inspector/front-end/StoragePanel.js
@@ -354,13 +354,6 @@ WebInspector.StoragePanel.prototype = {
return dataGrid;
},
- resize: function()
- {
- var visibleView = this.visibleView;
- if (visibleView && "resize" in visibleView)
- visibleView.resize();
- },
-
updateDOMStorage: function(storageId)
{
var domStorage = this._domStorageForId(storageId);
@@ -389,6 +382,7 @@ WebInspector.StoragePanel.prototype = {
{
this.storageViews.style.left = width + "px";
this.storageViewStatusBarItemsContainer.style.left = width + "px";
+ this.resize();
}
}
diff --git a/WebCore/inspector/front-end/StylesSidebarPane.js b/WebCore/inspector/front-end/StylesSidebarPane.js
index 5178a98..f04cb66 100644
--- a/WebCore/inspector/front-end/StylesSidebarPane.js
+++ b/WebCore/inspector/front-end/StylesSidebarPane.js
@@ -36,24 +36,18 @@ WebInspector.StylesSidebarPane = function()
var option = document.createElement("option");
option.value = "hex";
option.action = this._changeColorFormat.bind(this);
- if (Preferences.colorFormat === "hex")
- option.selected = true;
option.label = WebInspector.UIString("Hex Colors");
this.settingsSelectElement.appendChild(option);
option = document.createElement("option");
option.value = "rgb";
option.action = this._changeColorFormat.bind(this);
- if (Preferences.colorFormat === "rgb")
- option.selected = true;
option.label = WebInspector.UIString("RGB Colors");
this.settingsSelectElement.appendChild(option);
option = document.createElement("option");
option.value = "hsl";
option.action = this._changeColorFormat.bind(this);
- if (Preferences.colorFormat === "hsl")
- option.selected = true;
option.label = WebInspector.UIString("HSL Colors");
this.settingsSelectElement.appendChild(option);
@@ -66,11 +60,23 @@ WebInspector.StylesSidebarPane = function()
this.settingsSelectElement.addEventListener("click", function(event) { event.stopPropagation() }, false);
this.settingsSelectElement.addEventListener("change", this._changeSetting.bind(this), false);
-
+ WebInspector.settings.addEventListener("loaded", this._settingsLoaded, this);
+
this.titleElement.appendChild(this.settingsSelectElement);
}
WebInspector.StylesSidebarPane.prototype = {
+ _settingsLoaded: function()
+ {
+ var format = WebInspector.settings.colorFormat;
+ if (format === "hex")
+ this.settingsSelectElement[0].selected = true;
+ if (format === "rgb")
+ this.settingsSelectElement[1].selected = true;
+ if (format === "hsl")
+ this.settingsSelectElement[2].selected = true;
+ },
+
update: function(node, editedSection, forceUpdate)
{
var refresh = false;
@@ -109,7 +115,7 @@ WebInspector.StylesSidebarPane.prototype = {
self._update(refresh, body, node, editedSection, forceUpdate);
}
- InjectedScriptAccess.getStyles(node.id, !Preferences.showUserAgentStyles, callback);
+ InjectedScriptAccess.get(node.injectedScriptId).getStyles(node.id, !WebInspector.settings.showUserAgentStyles, callback);
},
_update: function(refresh, body, node, editedSection, forceUpdate)
@@ -156,7 +162,7 @@ WebInspector.StylesSidebarPane.prototype = {
styleRules.push(inlineStyle);
}
- var matchedStyleRules = node.ownerDocument.defaultView.getMatchedCSSRules(node, "", !Preferences.showUserAgentStyles);
+ var matchedStyleRules = node.ownerDocument.defaultView.getMatchedCSSRules(node, "", !WebInspector.settings.showUserAgentStyles);
if (matchedStyleRules) {
// Add rules in reverse order to match the cascade order.
for (var i = (matchedStyleRules.length - 1); i >= 0; --i) {
@@ -320,7 +326,7 @@ WebInspector.StylesSidebarPane.prototype = {
// Select the correct color format setting again, since it needs to be selected.
var selectedIndex = 0;
for (var i = 0; i < options.length; ++i) {
- if (options[i].value === Preferences.colorFormat) {
+ if (options[i].value === WebInspector.settings.colorFormat) {
selectedIndex = i;
break;
}
@@ -332,9 +338,7 @@ WebInspector.StylesSidebarPane.prototype = {
_changeColorFormat: function(event)
{
var selectedOption = this.settingsSelectElement[this.settingsSelectElement.selectedIndex];
- Preferences.colorFormat = selectedOption.value;
-
- InspectorFrontendHost.setSetting("color-format", Preferences.colorFormat);
+ WebInspector.settings.colorFormat = selectedOption.value;
for (var i = 0; i < this.sections.length; ++i)
this.sections[i].update(true);
@@ -397,18 +401,18 @@ WebInspector.StylePropertiesSection = function(styleRule, subtitle, computedStyl
if (computedStyle) {
this.element.addStyleClass("computed-style");
- if (Preferences.showInheritedComputedStyleProperties)
+ if (WebInspector.settings.showInheritedComputedStyleProperties)
this.element.addStyleClass("show-inherited");
var showInheritedLabel = document.createElement("label");
var showInheritedInput = document.createElement("input");
showInheritedInput.type = "checkbox";
- showInheritedInput.checked = Preferences.showInheritedComputedStyleProperties;
+ showInheritedInput.checked = WebInspector.settings.showInheritedComputedStyleProperties;
var computedStyleSection = this;
var showInheritedToggleFunction = function(event) {
- Preferences.showInheritedComputedStyleProperties = showInheritedInput.checked;
- if (Preferences.showInheritedComputedStyleProperties)
+ WebInspector.settings.showInheritedComputedStyleProperties = showInheritedInput.checked;
+ if (WebInspector.settings.showInheritedComputedStyleProperties)
computedStyleSection.element.addStyleClass("show-inherited");
else
computedStyleSection.element.removeStyleClass("show-inherited");
@@ -688,7 +692,7 @@ WebInspector.StylePropertiesSection.prototype = {
moveToNextIfNeeded.call(self);
}
- InjectedScriptAccess.applyStyleRuleText(this.rule.id, newContent, this.pane.node.id, callback);
+ InjectedScriptAccess.get(this.rule.injectedScriptId).applyStyleRuleText(this.rule.id, newContent, this.pane.node.id, callback);
},
editingSelectorCancelled: function()
@@ -742,7 +746,7 @@ WebInspector.BlankStylePropertiesSection.prototype = {
self.addNewBlankProperty().startEditing();
}
- InjectedScriptAccess.addStyleSelector(newContent, this.pane.node.id, callback);
+ InjectedScriptAccess.get(this.pane.node.injectedScriptId).addStyleSelector(newContent, this.pane.node.id, callback);
},
editingSelectorCancelled: function()
@@ -916,9 +920,9 @@ WebInspector.StylePropertyTreeElement.prototype = {
var format;
if (Preferences.showColorNicknames && color.nickname)
format = "nickname";
- else if (Preferences.colorFormat === "rgb")
+ else if (WebInspector.settings.colorFormat === "rgb")
format = (color.simple ? "rgb" : "rgba");
- else if (Preferences.colorFormat === "hsl")
+ else if (WebInspector.settings.colorFormat === "hsl")
format = (color.simple ? "hsl" : "hsla");
else if (color.simple)
format = (color.hasShortHex() ? "shorthex" : "hex");
@@ -1049,7 +1053,7 @@ WebInspector.StylePropertyTreeElement.prototype = {
self.updateAll(true);
}
- InjectedScriptAccess.toggleStyleEnabled(this.style.id, this.name, disabled, callback);
+ InjectedScriptAccess.get(this.style.injectedScriptId).toggleStyleEnabled(this.style.id, this.name, disabled, callback);
},
updateState: function()
@@ -1212,7 +1216,7 @@ WebInspector.StylePropertyTreeElement.prototype = {
} else {
// Restore the original CSS text before applying user changes. This is needed to prevent
// new properties from sticking around if the user adds one, then removes it.
- InjectedScriptAccess.setStyleText(this.style.id, this.originalCSSText);
+ InjectedScriptAccess.get(this.style.injectedScriptId).setStyleText(this.style.id, this.originalCSSText);
}
this.applyStyleText(this.listItemElement.textContent);
@@ -1232,7 +1236,7 @@ WebInspector.StylePropertyTreeElement.prototype = {
if (this._newProperty)
this.treeOutline.removeChild(this);
else if (this.originalCSSText) {
- InjectedScriptAccess.setStyleText(this.style.id, this.originalCSSText);
+ InjectedScriptAccess.get(this.style.injectedScriptId).setStyleText(this.style.id, this.originalCSSText);
if (this.treeOutline.section && this.treeOutline.section.pane)
this.treeOutline.section.pane.dispatchEventToListeners("style edited");
@@ -1306,7 +1310,7 @@ WebInspector.StylePropertyTreeElement.prototype = {
{
var section = this.treeOutline.section;
var elementsPanel = WebInspector.panels.elements;
- var styleTextLength = styleText.trimWhitespace().length;
+ var styleTextLength = styleText.trim().length;
if (!styleTextLength && updateInterface) {
if (this._newProperty) {
// The user deleted everything, so remove the tree element and update.
@@ -1357,7 +1361,7 @@ WebInspector.StylePropertyTreeElement.prototype = {
WebInspector.panels.elements.treeOutline.update();
}
- InjectedScriptAccess.applyStyleText(this.style.id, styleText.trimWhitespace(), this.name, callback);
+ InjectedScriptAccess.get(this.style.injectedScriptId).applyStyleText(this.style.id, styleText.trim(), this.name, callback);
}
}
diff --git a/WebCore/inspector/front-end/TextEditor.js b/WebCore/inspector/front-end/TextEditor.js
new file mode 100644
index 0000000..afa97c1
--- /dev/null
+++ b/WebCore/inspector/front-end/TextEditor.js
@@ -0,0 +1,1206 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.TextEditor = function(textModel, platform)
+{
+ this._textModel = textModel;
+ this._textModel.changeListener = this._textChanged.bind(this);
+ this._highlighter = new WebInspector.TextEditorHighlighter(this._textModel, this._highlightChanged.bind(this));
+
+ this.element = document.createElement("div");
+ this.element.className = "text-editor";
+
+ this._canvas = document.createElement("canvas");
+ this._canvas.className = "text-editor-canvas";
+ this.element.appendChild(this._canvas);
+
+ this._container = document.createElement("div");
+ this._container.className = "text-editor-container";
+ this._container.tabIndex = 0;
+ this.element.appendChild(this._container);
+
+ this._sheet = document.createElement("div");
+ this._container.appendChild(this._sheet);
+
+ var cursorElement = document.createElement("div");
+ cursorElement.className = "text-editor-cursor";
+ this._container.appendChild(cursorElement);
+ this._cursor = new WebInspector.TextCursor(cursorElement);
+
+ this._container.addEventListener("scroll", this._scroll.bind(this), false);
+ this._sheet.addEventListener("contextmenu", this._contextMenu.bind(this), false);
+
+ this._registerMouseListeners();
+ this._registerKeyboardListeners();
+ this._registerClipboardListeners();
+
+ this._desiredCaretColumn = 0;
+ this._scrollLeft = 0;
+ this._scrollTop = 0;
+
+ this._ctx = this._canvas.getContext("2d");
+ this._selection = new WebInspector.TextSelectionModel(this._selectionChanged.bind(this));
+
+ this._isMac = platform && (platform.indexOf("mac") === 0);
+
+ this._initFont();
+
+ this._paintCoalescingLevel = 0;
+
+ this._registerShortcuts();
+ // Debugging flags, allow disabling / enabling highlights and track repaints.
+ this._highlightingEnabled = true;
+ this._debugMode = false;
+
+ this._textWidth = 0;
+ this._longestLineNumber = 0;
+
+ this._lineOffsetsCache = [0];
+ this._readOnly = false;
+}
+
+WebInspector.TextEditor.prototype = {
+ set text(text)
+ {
+ var lastLine = this._textModel.linesCount - 1;
+ this._textModel.setText(null, text);
+ this._textModel.resetUndoStack();
+ this._setCaretLocation(0, 0);
+ },
+
+ set mimeType(mimeType)
+ {
+ this._highlighter.mimeType = mimeType;
+ },
+
+ get textModel()
+ {
+ return this._textModel;
+ },
+
+ set readOnly(readOnly)
+ {
+ this._readOnly = readOnly;
+ if (readOnly)
+ this.element.addStyleClass("text-editor-readonly")
+ else
+ this.element.removeStyleClass("text-editor-readonly")
+ },
+
+ set lineNumberDecorator(lineNumberDecorator)
+ {
+ this._lineNumberDecorator = lineNumberDecorator;
+ },
+
+ set lineDecorator(lineDecorator)
+ {
+ this._lineDecorator = lineDecorator;
+ },
+
+ get selection()
+ {
+ return this._selection.range();
+ },
+
+ setSelection: function(startLine, startColumn, endLine, endColumn)
+ {
+ var start = this._fit(startLine, startColumn);
+ this._selection.setStart(start.line, start.column);
+ this._setSelectionEnd(endLine, endColumn);
+ },
+
+ setDivDecoration: function(lineNumber, element)
+ {
+ var existingElement = this._textModel.getAttribute(lineNumber, "div-decoration");
+ if (existingElement && existingElement.parentNode)
+ existingElement.parentNode.removeChild(existingElement);
+ this._textModel.removeAttribute(lineNumber, "div-decoration");
+
+ if (element) {
+ this.element.appendChild(element);
+ this._textModel.setAttribute(lineNumber, "div-decoration", element);
+ }
+ this.revalidateDecorationsAndPaint();
+ },
+
+ _registerMouseListeners: function()
+ {
+ this._sheet.addEventListener("mouseup", this._mouseUp.bind(this), false);
+ this._sheet.addEventListener("mousedown", this._mouseDown.bind(this), false);
+ this._sheet.addEventListener("mousemove", this._mouseMove.bind(this), false);
+ this._sheet.addEventListener("mouseout", this._mouseOut.bind(this), false);
+ this._sheet.addEventListener("dblclick", this._dblClick.bind(this), false);
+ },
+
+ _registerKeyboardListeners: function()
+ {
+ this._container.addEventListener("keydown", this._keyDown.bind(this), false);
+ this._container.addEventListener("textInput", this._textInput.bind(this), false);
+ },
+
+ _registerClipboardListeners: function()
+ {
+ this._container.addEventListener("beforecopy", this._beforeCopy.bind(this), false);
+ this._container.addEventListener("copy", this._copy.bind(this), false);
+ this._container.addEventListener("beforecut", this._beforeCut.bind(this), false);
+ this._container.addEventListener("cut", this._cut.bind(this), false);
+ this._container.addEventListener("beforepaste", this._beforePaste.bind(this), false);
+ this._container.addEventListener("paste", this._paste.bind(this), false);
+ },
+
+ _offsetToLine: function(offset)
+ {
+ if (offset > this._lineOffsetsCache[this._lineOffsetsCache.length - 1]) {
+ // Seeking outside cached area. Fill the cache.
+ var lineNumber = this._lineOffsetsCache.length;
+ while (this._lineToOffset(lineNumber) < offset)
+ lineNumber++;
+ return lineNumber;
+ }
+
+ // Bisect.
+ var from = 0;
+ var to = this._lineOffsetsCache.length;
+ while (to > from + 1) {
+ var mid = Math.floor((from + to) / 2);
+ if (this._lineOffsetsCache[mid] > offset)
+ to = mid;
+ else
+ from = mid;
+ }
+ return to;
+ },
+
+ _lineToOffset: function(lineNumber)
+ {
+ var offset = this._lineOffsetsCache[lineNumber];
+ if (offset)
+ return offset;
+ for (var line = lineNumber; line > 0; --line) {
+ if (this._lineOffsetsCache[line])
+ break;
+ }
+ offset = this._lineOffsetsCache[line];
+ for (var i = line + 1; i <= lineNumber; ++i) {
+ offset += this._lineHeight(i - 1);
+ this._lineOffsetsCache[i] = offset;
+ }
+ return offset;
+ },
+
+ _lineHeight: function(lineNumber)
+ {
+ var element = this._textModel.getAttribute(lineNumber, "div-decoration");
+ if (element)
+ return 2 * this._textLineHeight + element.clientHeight;
+ return this._textLineHeight;
+ },
+
+ reveal: function(line, column)
+ {
+ var maxScrollTop = this._lineToOffset(line);
+ var minScrollTop = maxScrollTop + this._lineHeight(line) - this._canvas.height;
+ if (this._scrollTop > maxScrollTop)
+ this._container.scrollTop = maxScrollTop - this._textLineHeight * 2;
+ else if (this._scrollTop < minScrollTop)
+ this._container.scrollTop = minScrollTop + this._textLineHeight * 2;
+
+ var firstColumn = this._columnForOffset(line, this._scrollLeft);
+ var maxScrollLeft = this._columnToOffset(line, column);
+ var minScrollLeft = maxScrollLeft - this._container.clientWidth + this._lineNumberWidth;
+ if (this._scrollLeft < minScrollLeft)
+ this._container.scrollLeft = minScrollLeft + 100;
+ if (this._scrollLeft > maxScrollLeft)
+ this._container.scrollLeft = maxScrollLeft;
+ },
+
+ // WebInspector.TextModel listener
+ _textChanged: function(oldRange, newRange, oldText, newText)
+ {
+ if (newRange.linesCount == oldRange.linesCount)
+ this._invalidateLines(newRange.startLine, newRange.endLine + 1);
+ else
+ // Lines shifted, invalidate all under start line. Also clear lines that now are outside model range.
+ this._invalidateLines(newRange.startLine, this._textModel.linesCount + Math.max(0, oldRange.endLine - newRange.endLine));
+
+ if (this._highlightingEnabled) {
+ var lastVisibleLine = Math.min(this._textModel.linesCount, this._offsetToLine(this._scrollTop + this._canvas.height) + 1);
+ this._highlighter.updateHighlight(newRange.startLine, lastVisibleLine);
+ }
+
+ this._updatePreferredSize(newRange.startLine, Math.max(newRange.endLine, oldRange.endLine));
+ if (oldRange.linesCount !== newRange.linesCount) {
+ // Invalidate offset cache.
+ this._lineOffsetsCache.length = oldRange.startLine + 1;
+ // Force linenumber cache to be continuous.
+ this._lineToOffset(oldRange.startLine);
+ this.paintLineNumbers();
+ }
+ this._paint();
+ },
+
+ // WebInspector.TextSelectionModel listener
+ _selectionChanged: function(oldRange, newRange)
+ {
+ if (oldRange.isEmpty() && newRange.isEmpty() && oldRange.startLine === newRange.startLine) {
+ // Nothing to repaint.
+ return;
+ }
+
+ this._invalidateLines(oldRange.startLine, oldRange.endLine + 1);
+ this._invalidateLines(newRange.startLine, newRange.endLine + 1);
+ this._paint();
+ },
+
+ _highlightChanged: function(fromLine, toLine)
+ {
+ if (this._muteHighlightListener)
+ return;
+
+ this._invalidateLines(fromLine, toLine);
+ this._paint();
+ },
+
+ revalidateDecorationsAndPaint: function()
+ {
+ this.setCoalescingUpdate(true);
+ this._lineOffsetsCache = [0];
+ this._updatePreferredSize(0, this._textModel.linesCount);
+ this.repaintAll();
+ this.setCoalescingUpdate(false);
+ },
+
+ _updatePreferredSize: function(startLine, endLine)
+ {
+ this._ctx.font = this._font;
+ this.setCoalescingUpdate(true);
+ var guardedEndLine = Math.min(this._textModel.linesCount, endLine + 1);
+ var newMaximum = false;
+ for (var i = startLine; i < guardedEndLine; ++i) {
+ var lineWidth = this._ctx.measureText(this._textModel.line(i)).width;
+ if (lineWidth > this._textWidth) {
+ this._textWidth = lineWidth;
+ this._longestLineNumber = i;
+ newMaximum = true;
+ }
+ }
+
+ if (!newMaximum && startLine <= this._longestLineNumber && this._longestLineNumber <= endLine) {
+ this._textWidth = 0;
+ this._longestLineNumber = 0;
+ for (var i = 0; i < this._textModel.linesCount; ++i) {
+ var lineWidth = this._ctx.measureText(this._textModel.line(i)).width;
+ if (lineWidth > this._textWidth) {
+ this._textWidth = lineWidth;
+ this._longestLineNumber = i;
+ }
+ }
+ }
+
+ var newLineNumberDigits = this._decimalDigits(this._textModel.linesCount);
+ this._lineNumberWidth = (newLineNumberDigits + 2) * this._digitWidth;
+
+ var newWidth = this._textWidth + this._lineNumberWidth + "px";
+ var newHeight = this._lineToOffset(this._textModel.linesCount) + "px";
+ this._sheet.style.width = newWidth;
+ this._sheet.style.height = newHeight;
+
+ if (newLineNumberDigits !== this._lineNumberDigits) {
+ this._lineNumberDigits = newLineNumberDigits;
+ this.repaintAll();
+ }
+
+ // Changes to size can change the client area (scrollers can appear/disappear)
+ this.resize();
+ this.setCoalescingUpdate(false);
+ },
+
+ resize: function()
+ {
+ if (this._canvas.width !== this._container.clientWidth || this._canvas.height !== this._container.clientHeight) {
+ this._canvas.width = this._container.clientWidth;
+ this._canvas.height = this._container.clientHeight;
+ this.repaintAll();
+ }
+ },
+
+ repaintAll: function()
+ {
+ this._invalidateLines(0, this._textModel.linesCount);
+ this._paint();
+ },
+
+ _invalidateLines: function(startLine, endLine)
+ {
+ if (!this._damage)
+ this._damage = [ { startLine: startLine, endLine: endLine } ];
+ else {
+ for (var i = 0; i < this._damage.length; ++i) {
+ var chunk = this._damage[i];
+ if (chunk.startLine <= endLine && chunk.endLine >= startLine) {
+ chunk.startLine = Math.min(chunk.startLine, startLine);
+ chunk.endLine = Math.max(chunk.endLine, endLine);
+ return;
+ }
+ }
+ this._damage.push({ startLine: startLine, endLine: endLine });
+ }
+ },
+
+ _paint: function()
+ {
+ if (this._paintCoalescingLevel)
+ return;
+
+ this.paintLineNumbers();
+
+ for (var i = 0; this._damage && i < this._damage.length; ++i)
+ this._paintLines(this._damage[i].startLine, this._damage[i].endLine);
+ delete this._damage;
+
+ this._updateDivDecorations();
+ this._updateCursor(this._selection.endLine, this._selection.endColumn);
+ },
+
+ _paintLines: function(firstLine, lastLine)
+ {
+ this._ctx.font = this._font;
+ this._ctx.textBaseline = "bottom";
+
+ firstLine = Math.max(firstLine, this._offsetToLine(this._scrollTop) - 1);
+ lastLine = Math.min(lastLine, this._offsetToLine(this._scrollTop + this._canvas.height) + 1);
+ if (firstLine > lastLine)
+ return;
+
+ if (this._debugMode) {
+ WebInspector.log("Repaint %d:%d", firstLine, lastLine);
+ this._ctx.fillStyle = "rgb(255,255,0)";
+ var fromOffset = this._lineToOffset(firstLine);
+ var toOffset = this._lineToOffset(lastLine);
+ this._ctx.fillRect(this._lineNumberWidth - 1, fromOffset - this._scrollTop, this._canvas.width - this._lineNumberWidth + 1, toOffset - fromOffset);
+ setTimeout(this._paintLinesContinuation.bind(this, firstLine, lastLine), 100);
+ } else
+ this._paintLinesContinuation(firstLine, lastLine);
+ },
+
+ _paintLinesContinuation: function(firstLine, lastLine) {
+ // Clip editor area.
+ this._ctx.save();
+ this._ctx.beginPath();
+ this._ctx.rect(this._lineNumberWidth - 1, 0, this._canvas.width - this._lineNumberWidth + 1, this._canvas.height);
+ this._ctx.clip();
+
+ // First clear the region, then update last line to fit model (this clears removed lines from the end of the document).
+ var fromOffset = this._lineToOffset(firstLine);
+ var toOffset = lastLine < this._textModel.linesCount ? this._lineToOffset(lastLine) : this._canvas.height + this._scrollTop;
+
+ // Do not clear region when paintCurrentLine is likely to do all the necessary work.
+ if (this._readOnly || firstLine + 1 != lastLine || this._selection.endLine != firstLine) {
+ this._ctx.fillStyle = "rgb(255,255,255)";
+ this._ctx.fillRect(0, fromOffset - this._scrollTop, this._canvas.width, toOffset - fromOffset);
+ }
+ lastLine = Math.min(lastLine, this._textModel.linesCount);
+
+ // Paint current line for editable mode only.
+ if (!this._readOnly && this._selection.startLine === this._selection.endLine && firstLine <= this._selection.startLine && this._selection.startLine < lastLine)
+ this._paintCurrentLine(this._selection.startLine);
+
+ this._paintSelection(firstLine, lastLine);
+
+ if (this._highlightingEnabled) {
+ this._muteHighlightListener = true;
+ this._highlighter.highlight(lastLine);
+ delete this._muteHighlightListener;
+ }
+ for (var i = firstLine; i < lastLine; ++i) {
+ var lineOffset = this._lineToOffset(i) - this._scrollTop;
+
+ if (this._lineDecorator)
+ this._lineDecorator.decorate(i, this._ctx, this._lineNumberWidth - 1, lineOffset, this._canvas.width - this._lineNumberWidth + 1, this._lineHeight(i), this._textLineHeight);
+
+ var element = this._textModel.getAttribute(i, "div-decoration");
+ if (element)
+ this._positionDivDecoration(i, element, true);
+
+ this._paintLine(i, lineOffset);
+ }
+ this._ctx.restore();
+ },
+
+ _paintLine: function(lineNumber, lineOffset)
+ {
+ var line = this._textModel.line(lineNumber);
+ if (!this._highlightingEnabled) {
+ this._ctx.fillStyle = "rgb(0,0,0)";
+ this._ctx.fillText(line, this._lineNumberWidth - this._scrollLeft, lineOffset + this._textLineHeight);
+ return;
+ }
+
+ if (line.length > 1000) {
+ // Optimization: no need to paint decorations outside visible area.
+ var firstColumn = this._columnForOffset(lineNumber, this._scrollLeft);
+ var lastColumn = this._columnForOffset(lineNumber, this._scrollLeft + this._canvas.width);
+ }
+ var highlighterState = this._textModel.getAttribute(lineNumber, "highlighter-state");
+ var plainTextStart = -1;
+ for (var j = 0; j < line.length;) {
+ var attribute = highlighterState && highlighterState.attributes[j];
+ if (attribute && firstColumn && j + attribute.length < firstColumn) {
+ j += attribute.length;
+ continue;
+ }
+ if (attribute && lastColumn && j > lastColumn)
+ break;
+ if (!attribute || !attribute.style) {
+ if (plainTextStart === -1)
+ plainTextStart = j;
+ j++;
+ } else {
+ if (plainTextStart !== -1) {
+ this._ctx.fillStyle = "rgb(0,0,0)";
+ this._ctx.fillText(line.substring(plainTextStart, j), this._lineNumberWidth - this._scrollLeft + this._columnToOffset(lineNumber, plainTextStart), lineOffset + this._textLineHeight);
+ plainTextStart = -1;
+ }
+ this._ctx.fillStyle = attribute.style;
+ this._ctx.fillText(line.substring(j, j + attribute.length), this._lineNumberWidth - this._scrollLeft + this._columnToOffset(lineNumber, j), lineOffset + this._textLineHeight);
+ j += attribute.length;
+ }
+ }
+ if (plainTextStart !== -1) {
+ this._ctx.fillStyle = "rgb(0,0,0)";
+ this._ctx.fillText(line.substring(plainTextStart, j), this._lineNumberWidth - this._scrollLeft + this._columnToOffset(lineNumber, plainTextStart), lineOffset + this._textLineHeight);
+ }
+ },
+
+ paintLineNumbers: function()
+ {
+ this._ctx.font = this._font;
+ this._ctx.textBaseline = "bottom";
+
+ this._ctx.fillStyle = "rgb(255,255,255)";
+ this._ctx.fillRect(0, 0, this._lineNumberWidth - 2, this._canvas.height);
+
+ this._ctx.fillStyle = "rgb(235,235,235)";
+ this._ctx.fillRect(this._lineNumberWidth - 2, 0, 1, this._canvas.height);
+
+ var firstLine = Math.max(0, this._offsetToLine(this._scrollTop) - 1);
+ var lastLine = Math.min(this._textModel.linesCount, this._offsetToLine(this._scrollTop + this._canvas.height) + 1);
+
+ for (var i = firstLine; i < lastLine; ++i) {
+ var lineOffset = this._lineToOffset(i) - this._scrollTop;
+ this._ctx.fillStyle = "rgb(155,155,155)";
+ if (this._lineNumberDecorator && this._lineNumberDecorator.decorate(i, this._ctx, 0, lineOffset, this._lineNumberWidth, this._lineHeight(i), this._textLineHeight))
+ continue;
+ this._ctx.fillText(i + 1, (this._lineNumberDigits - this._decimalDigits(i + 1) + 1) * this._digitWidth, lineOffset + this._textLineHeight);
+ }
+ },
+
+ _paintCurrentLine: function(line)
+ {
+ this._ctx.fillStyle = "rgb(232, 242, 254)";
+ this._ctx.fillRect(0, this._lineToOffset(line) - this._scrollTop, this._canvas.width, this._lineHeight(line));
+ },
+
+ _scroll: function(e)
+ {
+ // Hide div-based cursor first.
+ this._cursor._cursorElement.style.display = "none";
+ setTimeout(this._repaintOnScroll.bind(this), 10);
+ },
+
+ _repaintOnScroll: function()
+ {
+ if (this._scrollTop !== this._container.scrollTop || this._scrollLeft !== this._container.scrollLeft) {
+ this._scrollTop = this._container.scrollTop;
+ this._scrollLeft = this._container.scrollLeft;
+ this.repaintAll();
+ }
+ },
+
+ _mouseUp: function(e)
+ {
+ this._isDragging = false;
+ },
+
+ _mouseDown: function(e)
+ {
+ if (e.button === 2 || (this._isMac && e.ctrlKey))
+ return;
+
+ var location = this._caretForMouseEvent(e);
+
+ if (e.offsetX < this._lineNumberWidth && this._lineNumberDecorator) {
+ if (this._lineNumberDecorator.mouseDown(location.line, e))
+ return;
+ }
+
+ if (e.shiftKey)
+ this._setSelectionEnd(location.line, location.column);
+ else
+ this._setCaretLocation(location.line, location.column);
+ this._isDragging = true;
+ this._textModel.markUndoableState();
+ },
+
+ _mouseMove: function(e)
+ {
+ if (!this._isDragging)
+ return;
+ var location = this._caretForMouseEvent(e);
+ this._setSelectionEnd(location.line, location.column)
+ },
+
+ _mouseOut: function(e)
+ {
+ },
+
+ _dblClick: function(e)
+ {
+ var location = this._caretForMouseEvent(e);
+ var range = this._textModel.wordRange(location.line, location.column);
+ this.setSelection(range.startLine, range.startColumn, range.endLine, range.endColumn);
+ },
+
+ _contextMenu: function(e)
+ {
+ if (e.offsetX < this._lineNumberWidth && this._lineNumberDecorator) {
+ var location = this._caretForMouseEvent(e);
+ if (this._lineNumberDecorator.contextMenu(location.line, e))
+ return;
+ } else {
+ var range = this._selection.range();
+ if (!range.isEmpty()) {
+ var text = this._textModel.copyRange(range);
+ var contextMenu = new WebInspector.ContextMenu();
+ contextMenu.appendItem(WebInspector.UIString("Copy"), this._copy.bind(this));
+ contextMenu.show(event);
+ }
+ }
+ },
+
+ _caretForMouseEvent: function(e)
+ {
+ var lineNumber = Math.max(0, this._offsetToLine(e.offsetY) - 1);
+ var offset = e.offsetX + this._scrollLeft - this._lineNumberWidth;
+ return { line: lineNumber, column: this._columnForOffset(lineNumber, offset) };
+ },
+
+ _columnForOffset: function(lineNumber, offset)
+ {
+ var length = 0;
+ var line = this._textModel.line(lineNumber);
+
+ // First pretend it is monospace to get a quick guess.
+ var charWidth = this._ctx.measureText("a").width;
+ var index = Math.floor(offset / charWidth);
+ var indexOffset = this._ctx.measureText(line.substring(0, index)).width;
+ if (offset >= indexOffset && index < line.length && offset < indexOffset + this._ctx.measureText(line.charAt(index)).width)
+ return index;
+
+ // Fallback to non-monospace.
+ var delta = indexOffset < offset ? 1 : -1;
+ while (index >=0 && index < line.length) {
+ index += delta;
+ indexOffset += delta * this._ctx.measureText(line.charAt(index)).width;
+ if (offset >= indexOffset && offset < indexOffset + charWidth)
+ return index;
+ }
+ return line.length;
+ },
+
+ _columnToOffset: function(lineNumber, column)
+ {
+ var line = this._textModel.line(lineNumber);
+ return this._ctx.measureText(line.substring(0, column)).width;
+ },
+
+ _keyDown: function(e)
+ {
+ var shortcutKey = WebInspector.KeyboardShortcut.makeKeyFromEvent(e);
+ var handler = this._shortcuts[shortcutKey];
+ if (handler) {
+ handler.call(this);
+ e.preventDefault();
+ e.stopPropagation();
+ return;
+ }
+
+ if (this._handleNavigationKey(e)) {
+ e.preventDefault();
+ e.stopPropagation();
+ return;
+ }
+
+ if (this._readOnly)
+ return;
+
+ var keyCodes = WebInspector.KeyboardShortcut.KeyCodes;
+ switch (e.keyCode) {
+ case keyCodes.Backspace:
+ this._handleBackspaceKey();
+ break;
+ case keyCodes.Delete:
+ this._handleDeleteKey();
+ break;
+ case keyCodes.Tab:
+ this._replaceSelectionWith("\t");
+ break;
+ case keyCodes.Enter:
+ this._replaceSelectionWith("\n");
+ break;
+ default:
+ return;
+ }
+
+ e.preventDefault();
+ e.stopPropagation();
+ },
+
+ _handleNavigationKey: function(e)
+ {
+ var caretLine = this._selection.endLine;
+ var caretColumn = this._selection.endColumn;
+ var arrowAction = e.shiftKey ? this._setSelectionEnd : this._setCaretLocation;
+
+ var keyCodes = WebInspector.KeyboardShortcut.KeyCodes;
+ switch (e.keyCode) {
+ case keyCodes.Up:
+ case keyCodes.PageUp:
+ if (e.metaKey)
+ arrowAction.call(this, 0, 0, true);
+ else if (e.ctrlKey)
+ this._container.scrollTop -= this._lineHeight(caretLine);
+ else {
+ if (e.keyCode === keyCodes.Up)
+ arrowAction.call(this, caretLine - 1, this._desiredCaretColumn, true);
+ else {
+ var offset = Math.max(0, this._lineToOffset(caretLine) - this._canvas.height);
+ arrowAction.call(this, this._offsetToLine(offset), this._desiredCaretColumn, true);
+ }
+ }
+ break;
+ case keyCodes.Down:
+ case keyCodes.PageDown:
+ if (e.metaKey)
+ arrowAction.call(this, this._textModel.linesCount - 1, this._textModel.lineLength(this._textModel.linesCount - 1), true);
+ else if (e.ctrlKey)
+ this._container.scrollTop += this._lineHeight(caretLine);
+ else {
+ if (e.keyCode === keyCodes.Down)
+ arrowAction.call(this, caretLine + 1, this._desiredCaretColumn, true);
+ else {
+ var offset = this._lineToOffset(caretLine) + this._canvas.height;
+ arrowAction.call(this, this._offsetToLine(offset), this._desiredCaretColumn, true);
+ }
+ }
+ break;
+ case keyCodes.Home:
+ if (this._isMetaCtrl(e))
+ arrowAction.call(this, 0, 0, true);
+ else
+ arrowAction.call(this, this._selection.endLine, 0);
+ break;
+ case keyCodes.End:
+ if (this._isMetaCtrl(e))
+ arrowAction.call(this, this._textModel.linesCount - 1, this._textModel.lineLength(this._textModel.linesCount - 1), true);
+ else
+ arrowAction.call(this, this._selection.endLine, this._textModel.lineLength(this._selection.endLine));
+ break;
+ case keyCodes.Left:
+ if (!e.shiftKey && !e.metaKey && !this._isAltCtrl(e) && !this._selection.isEmpty()) {
+ // Reset selection
+ var range = this._selection.range();
+ this._setCaretLocation(range.startLine, range.startColumn);
+ } else if (e.metaKey)
+ arrowAction.call(this, this._selection.endLine, 0);
+ else if (caretColumn === 0 && caretLine > 0)
+ arrowAction.call(this, caretLine - 1, this._textModel.lineLength(caretLine - 1));
+ else if (this._isAltCtrl(e)) {
+ caretColumn = this._textModel.wordStart(this._selection.endLine, this._selection.endColumn);
+ if (caretColumn === this._selection.endColumn)
+ caretColumn = 0;
+ arrowAction.call(this, caretLine, caretColumn);
+ } else
+ arrowAction.call(this, caretLine, caretColumn - 1);
+ break;
+ case keyCodes.Right:
+ var line = this._textModel.line(caretLine);
+ if (!e.shiftKey && !e.metaKey && !this._isAltCtrl(e) && !this._selection.isEmpty()) {
+ // Reset selection
+ var range = this._selection.range();
+ this._setCaretLocation(range.endLine, range.endColumn);
+ } else if (e.metaKey)
+ arrowAction.call(this, this._selection.endLine, this._textModel.lineLength(this._selection.endLine));
+ else if (caretColumn === line.length && caretLine < this._textModel.linesCount - 1)
+ arrowAction.call(this, caretLine + 1, 0);
+ else if (this._isAltCtrl(e)) {
+ caretColumn = this._textModel.wordEnd(this._selection.endLine, this._selection.endColumn);
+ if (caretColumn === this._selection.endColumn)
+ caretColumn = line.length;
+ arrowAction.call(this, caretLine, caretColumn);
+ } else
+ arrowAction.call(this, caretLine, caretColumn + 1);
+ break;
+ default:
+ return false;
+ }
+ this._textModel.markUndoableState();
+ return true;
+ },
+
+ _textInput: function(e)
+ {
+ if (this._readOnly)
+ return;
+
+ if (e.data && !e.altKey && !e.ctrlKey && !e.metaKey) {
+ this._replaceSelectionWith(e.data);
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ },
+
+ _setCaretLocation: function(line, column, updown)
+ {
+ this.setSelection(line, column, line, column, updown);
+ },
+
+ _setSelectionEnd: function(line, column, updown)
+ {
+ if (!updown)
+ this._desiredCaretColumn = column;
+
+ var end = this._fit(line, column);
+ this._selection.setEnd(end.line, end.column);
+ this.reveal(this._selection.endLine, this._selection.endColumn);
+ this._updateCursor(end.line, end.column);
+ },
+
+ _updateDivDecorations: function()
+ {
+ var firstLine = this._offsetToLine(this._scrollTop) - 1;
+ var lastLine = this._offsetToLine(this._scrollTop + this._canvas.height) + 1;
+
+ var linesCount = this._textModel.linesCount;
+ for (var i = 0; i < linesCount; ++i) {
+ var element = this._textModel.getAttribute(i, "div-decoration");
+ if (element)
+ this._positionDivDecoration(i, element, i > firstLine && i < lastLine);
+ }
+ },
+
+ _positionDivDecoration: function(lineNumber, element, visible)
+ {
+ element.style.position = "absolute";
+ element.style.top = this._lineToOffset(lineNumber) - this._scrollTop + this._textLineHeight + "px";
+ element.style.left = this._lineNumberWidth + "px";
+ element.style.setProperty("max-width", this._canvas.width + "px");
+ },
+
+ _updateCursor: function(line, column)
+ {
+ if (line >= this._textModel.linesCount)
+ return;
+ var offset = this._columnToOffset(line, column);
+ if (offset >= this._container.scrollLeft && !this._readOnly)
+ this._cursor.setLocation(this._lineNumberWidth + offset - 1, this._lineToOffset(line));
+ else
+ this._cursor.hide();
+ },
+
+ _fit: function(line, column)
+ {
+ line = Math.max(0, Math.min(line, this._textModel.linesCount - 1));
+ var lineLength = this._textModel.lineLength(line);
+ column = Math.max(0, Math.min(column, lineLength));
+ return { line: line, column: column };
+ },
+
+ _paintSelection: function(firstLine, lastLine)
+ {
+ if (this._selection.isEmpty())
+ return;
+ var range = this._selection.range();
+ this._ctx.fillStyle = "rgb(181, 213, 255)";
+
+ firstLine = Math.max(firstLine, range.startLine);
+ endLine = Math.min(lastLine, range.endLine + 1);
+
+ for (var i = firstLine; i < endLine; ++i) {
+ var line = this._textModel.line(i);
+ var from, to;
+
+ if (i === range.startLine) {
+ var offset = this._columnToOffset(range.startLine, range.startColumn);
+ from = offset - this._scrollLeft + this._lineNumberWidth - 1;
+ } else
+ from = 0;
+
+ if (i === range.endLine) {
+ var offset = this._columnToOffset(range.endLine, range.endColumn);
+ to = offset - this._scrollLeft + this._lineNumberWidth - 1;
+ } else
+ to = this._canvas.width;
+
+ this._ctx.fillRect(from, this._lineToOffset(i) - this._scrollTop, to - from, this._lineHeight(i));
+ }
+ this._ctx.fillStyle = "rgb(0, 0, 0)";
+ },
+
+ _beforeCopy: function(e)
+ {
+ if (!this._selection.isEmpty())
+ e.preventDefault();
+ },
+
+ _copy: function(e)
+ {
+ var range = this._selection.range();
+ var text = this._textModel.copyRange(range);
+
+ function delayCopy()
+ {
+ InspectorFrontendHost.copyText(text);
+ }
+
+ setTimeout(delayCopy);
+ if (e)
+ e.preventDefault();
+ },
+
+ _beforeCut: function(e)
+ {
+ if (!this._selection.isEmpty())
+ e.preventDefault();
+ },
+
+ _cut: function(e)
+ {
+ if (this._readOnly) {
+ e.preventDefault();
+ return;
+ }
+
+ this._textModel.markUndoableState();
+ this._copy(e);
+ this._replaceSelectionWith("");
+ },
+
+ _beforePaste: function(e)
+ {
+ e.preventDefault();
+ },
+
+ _paste: function(e)
+ {
+ if (this._readOnly) {
+ e.preventDefault();
+ return;
+ }
+
+ var text = e.clipboardData.getData("Text");
+ if (!text)
+ return;
+
+ this._textModel.markUndoableState();
+ this._replaceSelectionWith(text);
+ e.preventDefault();
+ },
+
+ _replaceSelectionWith: function(newText, overrideRange)
+ {
+ var range = overrideRange || this._selection.range();
+ this.setCoalescingUpdate(true);
+ var newRange = this._textModel.setText(range, newText);
+ this._setCaretLocation(newRange.endLine, newRange.endColumn);
+ this.setCoalescingUpdate(false);
+ },
+
+ setCoalescingUpdate: function(enabled)
+ {
+ if (enabled)
+ this._paintCoalescingLevel++;
+ else
+ this._paintCoalescingLevel--;
+ if (!this._paintCoalescingLevel)
+ this._paint();
+ },
+
+ _selectAll: function()
+ {
+ // No need to reveal last selection line in select all.
+ this._selection.setStart(0, 0);
+ var lastLineNum = this._textModel.linesCount - 1;
+ this._selection.setEnd(lastLineNum, this._textModel.lineLength(lastLineNum));
+ this._updateCursor(this._selection.endLine, this._selection.endColumn);
+ },
+
+ _initFont: function(sansSerif)
+ {
+ if (!WebInspector.TextEditor.PlatformFonts) {
+ WebInspector.TextEditor.PlatformFonts = {};
+ WebInspector.TextEditor.PlatformFonts[WebInspector.OS.Windows] = {size: 12, face: "Lucida Console"};
+ WebInspector.TextEditor.PlatformFonts[WebInspector.OS.WindowsVistaOrLater] = {size: 12, face: "Courier"};
+ WebInspector.TextEditor.PlatformFonts[WebInspector.OS.MacSnowLeopard] = {size: 11, face: "Menlo"};
+ WebInspector.TextEditor.PlatformFonts[WebInspector.OS.MacLeopard] = {size: 10, face: "Monaco"};
+ WebInspector.TextEditor.PlatformFonts[WebInspector.OS.MacTiger] = {size: 10, face: "Monaco"};
+ }
+
+ if (sansSerif) {
+ this._isMonospace = false;
+ this._fontSize = 11;
+ this._font = this._fontSize + "px sans-serif";
+ } else {
+ this._isMonospace = true;
+ const platform = WebInspector.platform;
+ const fontInfo = WebInspector.TextEditor.PlatformFonts[platform] || {size: 10, face: "monospace"};
+ this._fontSize = fontInfo.size;
+ this._font = this._fontSize + "px " + fontInfo.face;
+ }
+ this._ctx.font = this._font;
+ this._digitWidth = this._ctx.measureText("0").width;
+
+ this._textLineHeight = Math.floor(this._fontSize * 1.4);
+ this._cursor.setTextLineHeight(this._textLineHeight);
+ this._lineOffsetsCache = [0];
+ },
+
+ _registerShortcuts: function()
+ {
+ var modifiers = WebInspector.KeyboardShortcut.Modifiers;
+ this._shortcuts = {};
+ this._shortcuts[WebInspector.KeyboardShortcut.makeKey("z", this._isMac ? modifiers.Meta : modifiers.Ctrl)] = this._handleUndo.bind(this);
+ this._shortcuts[WebInspector.KeyboardShortcut.makeKey("z", modifiers.Shift | (this._isMac ? modifiers.Meta : modifiers.Ctrl))] = this._handleRedo.bind(this);
+ this._shortcuts[WebInspector.KeyboardShortcut.makeKey("a", this._isMac ? modifiers.Meta : modifiers.Ctrl)] = this._selectAll.bind(this);
+ this._shortcuts[WebInspector.KeyboardShortcut.makeKey(WebInspector.KeyboardShortcut.KeyCodes.Plus, this._isMac ? modifiers.Meta : modifiers.Ctrl)] = this._handleZoomIn.bind(this);
+ this._shortcuts[WebInspector.KeyboardShortcut.makeKey(WebInspector.KeyboardShortcut.KeyCodes.Minus, this._isMac ? modifiers.Meta : modifiers.Ctrl)] = this._handleZoomOut.bind(this);
+ this._shortcuts[WebInspector.KeyboardShortcut.makeKey(WebInspector.KeyboardShortcut.KeyCodes.Zero, this._isMac ? modifiers.Meta : modifiers.Ctrl)] = this._handleZoomReset.bind(this);
+ if (this._isMac)
+ this._shortcuts[WebInspector.KeyboardShortcut.makeKey("d", modifiers.Ctrl)] = this._handleDeleteKey.bind(this);
+
+ this._shortcuts[WebInspector.KeyboardShortcut.makeKey("d", modifiers.Ctrl | modifiers.Alt)] = this._handleToggleDebugMode.bind(this);
+ this._shortcuts[WebInspector.KeyboardShortcut.makeKey("h", modifiers.Ctrl | modifiers.Alt)] = this._handleToggleHighlightMode.bind(this);
+ this._shortcuts[WebInspector.KeyboardShortcut.makeKey("m", modifiers.Ctrl | modifiers.Alt)] = this._handleToggleMonospaceMode.bind(this);
+ },
+
+ _handleUndo: function()
+ {
+ this.setCoalescingUpdate(true);
+ var range = this._textModel.undo();
+ if (range)
+ this._setCaretLocation(range.endLine, range.endColumn);
+ this.setCoalescingUpdate(false);
+ },
+
+ _handleRedo: function()
+ {
+ this.setCoalescingUpdate(true);
+ var range = this._textModel.redo();
+ if (range)
+ this._setCaretLocation(range.endLine, range.endColumn);
+ this.setCoalescingUpdate(false);
+ },
+
+ _handleDeleteKey: function()
+ {
+ var range = this._selection.range();
+ if (range.isEmpty()) {
+ if (range.endColumn < this._textModel.lineLength(range.startLine))
+ range.endColumn++;
+ else if (range.endLine < this._textModel.linesCount) {
+ range.endLine++;
+ range.endColumn = 0;
+ } else
+ return;
+ } else
+ this._textModel.markUndoableState();
+ this._replaceSelectionWith("", range);
+ },
+
+ _handleBackspaceKey: function()
+ {
+ var range = this._selection.range();
+ if (range.isEmpty()) {
+ if (range.startColumn > 0)
+ range.startColumn--;
+ else if (range.startLine > 0) {
+ range.startLine--;
+ range.startColumn = this._textModel.lineLength(range.startLine);
+ } else
+ return;
+ } else
+ this._textModel.markUndoableState();
+ this._replaceSelectionWith("", range);
+ },
+
+ _handleToggleDebugMode: function()
+ {
+ this._debugMode = !this._debugMode;
+ },
+
+ _handleZoomIn: function()
+ {
+ if (this._fontSize < 25)
+ this._changeFont(!this._isMonospace, this._fontSize + 1);
+ },
+
+ _handleZoomOut: function()
+ {
+ if (this._fontSize > 1)
+ this._changeFont(!this._isMonospace, this._fontSize - 1);
+ },
+
+ _handleZoomReset: function()
+ {
+ this._changeFont(!this._isMonospace);
+ },
+
+ _handleToggleMonospaceMode: function()
+ {
+ this._changeFont(this._isMonospace, this._fontSize);
+ },
+
+ _changeFont: function(sansSerif, fontSize) {
+ this._initFont(sansSerif, fontSize);
+ this._updatePreferredSize(0, this._textModel.linesCount);
+ this.repaintAll();
+ },
+
+ _handleToggleHighlightMode: function()
+ {
+ this._highlightingEnabled = !this._highlightingEnabled;
+ },
+
+ _isMetaCtrl: function(e)
+ {
+ return this._isMac ? e.metaKey : e.ctrlKey;
+ },
+
+ _isAltCtrl: function(e)
+ {
+ return this._isMac ? e.altKey : e.ctrlKey;
+ },
+
+ _decimalDigits: function(number)
+ {
+ return Math.ceil(Math.log(number + 1) / Math.log(10));
+ }
+}
+
+WebInspector.TextSelectionModel = function(changeListener)
+{
+ this.startLine = 0;
+ this.startColumn = 0;
+ this.endLine = 0;
+ this.endColumn = 0;
+ this._changeListener = changeListener;
+}
+
+WebInspector.TextSelectionModel.prototype = {
+ setStart: function(line, column)
+ {
+ var oldRange = this.range();
+
+ this.startLine = line;
+ this.startColumn = column;
+ this.endLine = line;
+ this.endColumn = column;
+
+ this._changeListener(oldRange, this.range());
+ },
+
+ setEnd: function(line, column)
+ {
+ var oldRange = this.range();
+
+ this.endLine = line;
+ this.endColumn = column;
+
+ this._changeListener(oldRange, this.range(), this.endLine, this.endColumn);
+ },
+
+ range: function()
+ {
+ if (this.startLine < this.endLine || (this.startLine === this.endLine && this.startColumn <= this.endColumn))
+ return new WebInspector.TextRange(this.startLine, this.startColumn, this.endLine, this.endColumn);
+ else
+ return new WebInspector.TextRange(this.endLine, this.endColumn, this.startLine, this.startColumn);
+ },
+
+ isEmpty: function()
+ {
+ return this.startLine === this.endLine && this.startColumn === this.endColumn;
+ }
+}
+
+WebInspector.TextCursor = function(cursorElement)
+{
+ this._visible = false;
+ this._cursorElement = cursorElement;
+}
+
+WebInspector.TextCursor.prototype = {
+ setLocation: function(x, y)
+ {
+ this._x = x;
+ this._y = y;
+ if (this._paintInterval) {
+ window.clearInterval(this._paintInterval);
+ delete this._paintInterval;
+ }
+ this._paintInterval = window.setInterval(this._paint.bind(this, false), 500);
+ this._paint(true);
+ },
+
+ hide: function()
+ {
+ if (this._paintInterval) {
+ window.clearInterval(this._paintInterval);
+ delete this._paintInterval;
+ }
+ this._cursorElement.style.display = "none";
+ },
+
+ setTextLineHeight: function(textLineHeight)
+ {
+ this._cursorElement.style.height = textLineHeight + "px";
+ },
+
+ _paint: function(force)
+ {
+ if (force)
+ this._visible = true;
+ else
+ this._visible = !this._visible;
+ this._cursorElement.style.left = this._x + "px";
+ this._cursorElement.style.top = this._y + "px";
+ this._cursorElement.style.display = this._visible ? "block" : "none";
+ }
+}
diff --git a/WebCore/inspector/front-end/TextEditorHighlighter.js b/WebCore/inspector/front-end/TextEditorHighlighter.js
new file mode 100644
index 0000000..9a7a050
--- /dev/null
+++ b/WebCore/inspector/front-end/TextEditorHighlighter.js
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2009 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:
+ *
+ * * 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.TextEditorHighlighter = function(textModel, damageCallback)
+{
+ this._textModel = textModel;
+
+ this._styles = [];
+
+ this._styles["css-comment"] = "rgb(0, 116, 0)";
+ this._styles["css-params"] = "rgb(7, 144, 154)";
+ this._styles["css-string"] = "rgb(7, 144, 154)";
+ this._styles["css-keyword"] = "rgb(7, 144, 154)";
+ this._styles["css-number"] = "rgb(50, 0, 255)";
+ this._styles["css-property"] = "rgb(200, 0, 0)";
+ this._styles["css-at-rule"] = "rgb(200, 0, 0)";
+ this._styles["css-selector"] = "rgb(0, 0, 0)";
+ this._styles["css-important"] = "rgb(200, 0, 180)";
+
+ /* Keep this in sync with inspector.css and view-source.css */
+ this._styles["html-tag"] = "rgb(136, 18, 128)";
+ this._styles["html-attr-name"] = "rgb(153, 69, 0)";
+ this._styles["html-attr-value"] = "rgb(26, 26, 166)";
+ this._styles["html-comment"] = "rgb(35, 110, 37)";
+ this._styles["html-doctype"] = "rgb(192, 192, 192)";
+
+ this._styles["javascript-comment"] = "rgb(0, 116, 0)";
+ this._styles["javascript-string"] = "rgb(196, 26, 22)";
+ this._styles["javascript-regexp"] = "rgb(196, 26, 22)";
+ this._styles["javascript-keyword"] = "rgb(170, 13, 145)";
+ this._styles["javascript-number"] = "rgb(28, 0, 207)";
+
+ this.mimeType = "text/html";
+ this._damageCallback = damageCallback;
+}
+
+WebInspector.TextEditorHighlighter.prototype = {
+ set mimeType(mimeType)
+ {
+ var tokenizer = WebInspector.SourceTokenizer.Registry.getInstance().getTokenizer(mimeType);
+ if (tokenizer)
+ this._tokenizer = tokenizer;
+ },
+
+ highlight: function(endLine)
+ {
+ // First check if we have work to do.
+ var state = this._textModel.getAttribute(endLine - 1, "highlighter-state")
+ if (state && !state.outOfDate) {
+ // Last line is highlighted, just exit.
+ return;
+ }
+
+ this._requestedEndLine = endLine;
+
+ if (this._highlightTimer) {
+ // There is a timer scheduled, it will catch the new job based on the new endLine set.
+ return;
+ }
+
+ // We will be highlighting. First rewind to the last highlighted line to gain proper highlighter context.
+ var startLine = endLine;
+ while (startLine > 0) {
+ var state = this._textModel.getAttribute(startLine - 1, "highlighter-state");
+ if (state && !state.outOfDate)
+ break;
+ startLine--;
+ }
+
+ // Do small highlight synchronously. This will provide instant highlight on PageUp / PageDown, gentle scrolling.
+ var toLine = Math.min(startLine + 200, endLine);
+ this._highlightInChunks(startLine, toLine);
+
+ // Schedule tail highlight if necessary.
+ if (endLine > toLine)
+ this._highlightTimer = setTimeout(this._highlightInChunks.bind(this, toLine, endLine), 100);
+ },
+
+ _highlightInChunks: function(startLine, endLine)
+ {
+ delete this._highlightTimer;
+
+ // First we always check if we have work to do. Could be that user scrolled back and we can quit.
+ var state = this._textModel.getAttribute(this._requestedEndLine - 1, "highlighter-state");
+ if (state && !state.outOfDate)
+ return;
+
+ if (this._requestedEndLine !== endLine) {
+ // User keeps updating the job in between of our timer ticks. Just reschedule self, don't eat CPU (they must be scrolling).
+ this._highlightTimer = setTimeout(this._highlightInChunks.bind(this, startLine, this._requestedEndLine), 100);
+ return;
+ }
+
+ // Highlight 500 lines chunk.
+ var toLine = Math.min(startLine + 500, this._requestedEndLine);
+ this._highlightLines(startLine, toLine);
+
+ // Schedule tail highlight if necessary.
+ if (toLine < this._requestedEndLine)
+ this._highlightTimer = setTimeout(this._highlightInChunks.bind(this, toLine, this._requestedEndLine), 10);
+ },
+
+ updateHighlight: function(startLine, endLine)
+ {
+ // Start line was edited, we should highlight everything until endLine synchronously.
+ if (startLine) {
+ var state = this._textModel.getAttribute(startLine - 1, "highlighter-state");
+ if (!state || state.outOfDate) {
+ // Highlighter did not reach this point yet, nothing to update. It will reach it on subsequent timer tick and do the job.
+ return;
+ }
+ }
+
+ var restored = this._highlightLines(startLine, endLine);
+
+ // Set invalidated flag to the subsequent lines.
+ for (var i = endLine; i < this._textModel.linesCount; ++i) {
+ var highlighterState = this._textModel.getAttribute(i, "highlighter-state");
+ if (highlighterState)
+ highlighterState.outOfDate = !restored;
+ else
+ return;
+ }
+ },
+
+ _highlightLines: function(startLine, endLine)
+ {
+ // Restore highlighter context taken from previous line.
+ var state = this._textModel.getAttribute(startLine - 1, "highlighter-state");
+ if (state)
+ this._tokenizer.condition = state.postCondition;
+ else
+ this._tokenizer.condition = this._tokenizer.initialCondition;
+
+ for (var i = startLine; i < endLine; ++i) {
+ state = {};
+ state.preCondition = this._tokenizer.condition;
+ state.attributes = {};
+
+ this._lex(this._textModel.line(i), i, state.attributes);
+
+ state.postCondition = this._tokenizer.condition;
+ this._textModel.setAttribute(i, "highlighter-state", state);
+
+ var nextLineState = this._textModel.getAttribute(i + 1, "highlighter-state");
+ if (nextLineState && this._tokenizer.hasCondition(nextLineState.preCondition)) {
+ // Following lines are up to date, no need re-highlight.
+ this._damageCallback(startLine, i + 1);
+ return true;
+ }
+ }
+ this._damageCallback(startLine, endLine);
+ return false;
+ },
+
+ _lex: function(line, lineNumber, attributes) {
+ this._tokenizer.line = line;
+ var column = 0;
+ do {
+ var newColumn = this._tokenizer.nextToken(column);
+ var tokenType = this._tokenizer.tokenType;
+ if (tokenType)
+ attributes[column] = { length: newColumn - column, tokenType: tokenType, style: this._styles[tokenType] };
+ column = newColumn;
+ } while (column < line.length)
+ }
+}
diff --git a/WebCore/inspector/front-end/TextEditorModel.js b/WebCore/inspector/front-end/TextEditorModel.js
new file mode 100644
index 0000000..fc56026
--- /dev/null
+++ b/WebCore/inspector/front-end/TextEditorModel.js
@@ -0,0 +1,286 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.TextRange = function(startLine, startColumn, endLine, endColumn)
+{
+ this.startLine = startLine;
+ this.startColumn = startColumn;
+ this.endLine = endLine;
+ this.endColumn = endColumn;
+}
+
+WebInspector.TextRange.prototype = {
+ isEmpty: function()
+ {
+ return this.startLine === this.endLine && this.startColumn === this.endColumn;
+ },
+
+ get linesCount()
+ {
+ return this.endLine - this.startLine;
+ },
+
+ clone: function()
+ {
+ return new WebInspector.TextRange(this.startLine, this.startColumn, this.endLine, this.endColumn);
+ }
+}
+
+WebInspector.TextEditorModel = function()
+{
+ this._lines = [""];
+ this._attributes = [];
+ this._undoStack = [];
+ this._noPunctuationRegex = /[^ !%&()*+,-.:;<=>?\[\]\^{|}~]+/;
+}
+
+WebInspector.TextEditorModel.prototype = {
+ set changeListener(changeListener)
+ {
+ this._changeListener = changeListener;
+ },
+
+ get linesCount()
+ {
+ return this._lines.length;
+ },
+
+ line: function(lineNumber)
+ {
+ if (lineNumber >= this._lines.length)
+ throw "Out of bounds:" + lineNumber;
+ return this._lines[lineNumber];
+ },
+
+ lineLength: function(lineNumber)
+ {
+ return this._lines[lineNumber].length;
+ },
+
+ setText: function(range, text)
+ {
+ if (!range)
+ range = new WebInspector.TextRange(0, 0, this._lines.length - 1, this._lines[this._lines.length - 1].length);
+ var command = this._pushUndoableCommand(range, text);
+ var newRange = this._innerSetText(range, text);
+ command.range = newRange.clone();
+
+ if (this._changeListener)
+ this._changeListener(range, newRange, command.text, text);
+ return newRange;
+ },
+
+ _innerSetText: function(range, text)
+ {
+ this._eraseRange(range);
+ if (text === "")
+ return new WebInspector.TextRange(range.startLine, range.startColumn, range.startLine, range.startColumn);
+
+ var newLines = text.split("\n");
+ var prefix = this._lines[range.startLine].substring(0, range.startColumn);
+ var prefixArguments = this._arguments
+ var suffix = this._lines[range.startLine].substring(range.startColumn);
+
+ var postCaret = prefix.length;
+ // Insert text.
+ if (newLines.length === 1) {
+ this._setLine(range.startLine, prefix + newLines[0] + suffix);
+ postCaret += newLines[0].length;
+ } else {
+ this._setLine(range.startLine, prefix + newLines[0]);
+ for (var i = 1; i < newLines.length; ++i)
+ this._insertLine(range.startLine + i, newLines[i]);
+ this._setLine(range.startLine + newLines.length - 1, newLines[newLines.length - 1] + suffix);
+ postCaret = newLines[newLines.length - 1].length;
+ }
+ return new WebInspector.TextRange(range.startLine, range.startColumn,
+ range.startLine + newLines.length - 1, postCaret);
+ },
+
+ _eraseRange: function(range)
+ {
+ if (range.isEmpty())
+ return;
+
+ var prefix = this._lines[range.startLine].substring(0, range.startColumn);
+ var suffix = this._lines[range.endLine].substring(range.endColumn);
+
+ if (range.endLine > range.startLine)
+ this._removeLines(range.startLine + 1, range.endLine - range.startLine);
+ this._setLine(range.startLine, prefix + suffix);
+ },
+
+ _setLine: function(lineNumber, text)
+ {
+ this._lines[lineNumber] = text;
+ },
+
+ _removeLines: function(fromLine, count)
+ {
+ this._lines.splice(fromLine, count);
+ this._attributes.splice(fromLine, count);
+ },
+
+ _insertLine: function(lineNumber, text)
+ {
+ this._lines.splice(lineNumber, 0, text);
+ this._attributes.splice(lineNumber, 0, {});
+ },
+
+ wordRange: function(lineNumber, column)
+ {
+ return new WebInspector.TextRange(lineNumber, this.wordStart(lineNumber, column, true), lineNumber, this.wordEnd(lineNumber, column, true));
+ },
+
+ wordStart: function(lineNumber, column, gapless)
+ {
+ var line = this._lines[lineNumber];
+ var prefix = line.substring(0, column).split("").reverse().join("");
+ var prefixMatch = this._noPunctuationRegex.exec(prefix);
+ return prefixMatch && (!gapless || prefixMatch.index === 0) ? column - prefixMatch.index - prefixMatch[0].length : column;
+ },
+
+ wordEnd: function(lineNumber, column, gapless)
+ {
+ var line = this._lines[lineNumber];
+ var suffix = line.substring(column);
+ var suffixMatch = this._noPunctuationRegex.exec(suffix);
+ return suffixMatch && (!gapless || suffixMatch.index === 0) ? column + suffixMatch.index + suffixMatch[0].length : column;
+ },
+
+ copyRange: function(range)
+ {
+ var clip = [];
+ if (range.startLine === range.endLine) {
+ clip.push(this._lines[range.startLine].substring(range.startColumn, range.endColumn));
+ return clip.join("\n");
+ }
+ clip.push(this._lines[range.startLine].substring(range.startColumn));
+ for (var i = range.startLine + 1; i < range.endLine; ++i)
+ clip.push(this._lines[i]);
+ clip.push(this._lines[range.endLine].substring(0, range.endColumn));
+ return clip.join("\n");
+ },
+
+ setAttribute: function(line, name, value)
+ {
+ var attrs = this._attributes[line];
+ if (!attrs) {
+ attrs = {};
+ this._attributes[line] = attrs;
+ }
+ attrs[name] = value;
+ },
+
+ getAttribute: function(line, name)
+ {
+ var attrs = this._attributes[line];
+ return attrs ? attrs[name] : null;
+ },
+
+ removeAttribute: function(line, name)
+ {
+ var attrs = this._attributes[line];
+ if (attrs)
+ delete attrs[name];
+ },
+
+ _pushUndoableCommand: function(range, text)
+ {
+ var command = {
+ text: this.copyRange(range),
+ startLine: range.startLine,
+ startColumn: range.startColumn,
+ endLine: range.startLine,
+ endColumn: range.startColumn
+ };
+ if (this._inUndo)
+ this._redoStack.push(command);
+ else {
+ if (!this._inRedo)
+ this._redoStack = [];
+ this._undoStack.push(command);
+ }
+ return command;
+ },
+
+ undo: function()
+ {
+ this._markRedoableState();
+
+ this._inUndo = true;
+ var range = this._doUndo(this._undoStack);
+ delete this._inUndo;
+
+ return range;
+ },
+
+ redo: function()
+ {
+ this.markUndoableState();
+
+ this._inRedo = true;
+ var range = this._doUndo(this._redoStack);
+ delete this._inRedo;
+
+ return range;
+ },
+
+ _doUndo: function(stack)
+ {
+ var range = null;
+ for (var i = stack.length - 1; i >= 0; --i) {
+ var command = stack[i];
+ stack.length = i;
+
+ range = this.setText(command.range, command.text);
+ if (i > 0 && stack[i - 1].explicit)
+ return range;
+ }
+ return range;
+ },
+
+ markUndoableState: function()
+ {
+ if (this._undoStack.length)
+ this._undoStack[this._undoStack.length - 1].explicit = true;
+ },
+
+ _markRedoableState: function()
+ {
+ if (this._redoStack.length)
+ this._redoStack[this._redoStack.length - 1].explicit = true;
+ },
+
+ resetUndoStack: function()
+ {
+ this._undoStack = [];
+ }
+}
diff --git a/WebCore/inspector/front-end/TextPrompt.js b/WebCore/inspector/front-end/TextPrompt.js
index 2230eaa..8554a28 100644
--- a/WebCore/inspector/front-end/TextPrompt.js
+++ b/WebCore/inspector/front-end/TextPrompt.js
@@ -33,6 +33,7 @@ WebInspector.TextPrompt = function(element, completions, stopCharacters)
this.completionStopCharacters = stopCharacters;
this.history = [];
this.historyOffset = 0;
+ this.element.addEventListener("keydown", this._onKeyDown.bind(this), true);
}
WebInspector.TextPrompt.prototype = {
@@ -53,7 +54,7 @@ WebInspector.TextPrompt.prototype = {
this.moveCaretToEndOfPrompt();
},
- handleKeyEvent: function(event)
+ _onKeyDown: function(event)
{
function defaultAction()
{
diff --git a/WebCore/inspector/front-end/TimelineGrid.js b/WebCore/inspector/front-end/TimelineGrid.js
index 2866ecd..12b889a 100644
--- a/WebCore/inspector/front-end/TimelineGrid.js
+++ b/WebCore/inspector/front-end/TimelineGrid.js
@@ -62,7 +62,7 @@ WebInspector.TimelineGrid.prototype = {
if (!force && this._currentDividerSlice === slice)
return false;
- if (!(typeof paddingLeft === "number"))
+ if (typeof paddingLeft !== "number")
paddingLeft = 0;
this._currentDividerSlice = slice;
@@ -71,7 +71,8 @@ WebInspector.TimelineGrid.prototype = {
var divider = this._dividersElement.firstChild;
var dividerLabelBar = this._dividersLabelBarElement.firstChild;
- var clientWidth = this._dividersLabelBarElement.clientWidth - paddingLeft;
+ var dividersLabelBarElementClientWidth = this._dividersLabelBarElement.clientWidth;
+ var clientWidth = dividersLabelBarElementClientWidth - paddingLeft;
for (var i = paddingLeft ? 0 : 1; i <= dividerCount; ++i) {
if (!divider) {
divider = document.createElement("div");
@@ -85,6 +86,7 @@ WebInspector.TimelineGrid.prototype = {
dividerLabelBar._labelElement = label;
dividerLabelBar.appendChild(label);
this._dividersLabelBarElement.appendChild(dividerLabelBar);
+ dividersLabelBarElementClientWidth = this._dividersLabelBarElement.clientWidth;
}
if (i === dividerCount)
@@ -93,12 +95,13 @@ WebInspector.TimelineGrid.prototype = {
divider.removeStyleClass("last");
var left = paddingLeft + clientWidth * (i / dividerCount);
- var percentLeft = 100 * left / this._dividersLabelBarElement.clientWidth + "%";
- divider.style.left = percentLeft;
- dividerLabelBar.style.left = percentLeft;
+ var percentLeft = 100 * left / dividersLabelBarElementClientWidth;
+ this._setDividerAndBarLeft(divider, dividerLabelBar, percentLeft);
if (!isNaN(slice))
dividerLabelBar._labelElement.textContent = calculator.formatValue(slice * i);
+ else
+ dividerLabelBar._labelElement.textContent = "";
divider = divider.nextSibling;
dividerLabelBar = dividerLabelBar.nextSibling;
@@ -118,6 +121,15 @@ WebInspector.TimelineGrid.prototype = {
return true;
},
+ _setDividerAndBarLeft: function(divider, dividerLabelBar, percentLeft)
+ {
+ var percentStyleLeft = parseFloat(divider.style.left);
+ if (!isNaN(percentStyleLeft) && Math.abs(percentStyleLeft - percentLeft) < 0.1)
+ return;
+ divider.style.left = percentLeft + "%";
+ dividerLabelBar.style.left = percentLeft + "%";
+ },
+
addEventDivider: function(divider)
{
this._eventDividersElement.appendChild(divider);
diff --git a/WebCore/inspector/front-end/TimelineOverviewPane.js b/WebCore/inspector/front-end/TimelineOverviewPane.js
index b673abe..8ae8352 100644
--- a/WebCore/inspector/front-end/TimelineOverviewPane.js
+++ b/WebCore/inspector/front-end/TimelineOverviewPane.js
@@ -173,10 +173,11 @@ WebInspector.TimelineOverviewPane.prototype = {
reset: function()
{
- this._overviewCalculator.reset();
- this._overviewGrid.updateDividers(true, this._overviewCalculator);
this.windowLeft = 0.0;
this.windowRight = 1.0;
+ this._setWindowPosition(0, this._overviewGrid.element.clientWidth);
+ this._overviewCalculator.reset();
+ this._overviewGrid.updateDividers(true, this._overviewCalculator);
},
_resizeWindow: function(resizeElement, event)
diff --git a/WebCore/inspector/front-end/TimelinePanel.js b/WebCore/inspector/front-end/TimelinePanel.js
index ac36fa5..b6d5fde 100644
--- a/WebCore/inspector/front-end/TimelinePanel.js
+++ b/WebCore/inspector/front-end/TimelinePanel.js
@@ -34,7 +34,7 @@ WebInspector.TimelinePanel = function()
this.element.addStyleClass("timeline");
this._overviewPane = new WebInspector.TimelineOverviewPane(this.categories);
- this._overviewPane.addEventListener("window changed", this._scheduleRefresh, this);
+ this._overviewPane.addEventListener("window changed", this._windowChanged, this);
this._overviewPane.addEventListener("filter changed", this._refresh, this);
this.element.appendChild(this._overviewPane.element);
@@ -80,6 +80,7 @@ WebInspector.TimelinePanel = function()
this._records = [];
this._sendRequestRecords = {};
this._calculator = new WebInspector.TimelineCalculator();
+ this._boundariesAreValid = true;
}
WebInspector.TimelinePanel.prototype = {
@@ -270,8 +271,10 @@ WebInspector.TimelinePanel.prototype = {
{
this._lastRecord = null;
this._sendRequestRecords = {};
- this._overviewPane.reset();
this._records = [];
+ this._boundariesAreValid = false;
+ this._overviewPane.reset();
+ this._adjustScrollPosition(0);
this._refresh();
},
@@ -291,14 +294,24 @@ WebInspector.TimelinePanel.prototype = {
this._scheduleRefresh(true);
},
- _scheduleRefresh: function(immediate)
+ _windowChanged: function()
{
+ this._scheduleRefresh();
+ },
+
+ _scheduleRefresh: function(preserveBoundaries)
+ {
+ this._boundariesAreValid &= preserveBoundaries;
if (this._needsRefresh)
return;
this._needsRefresh = true;
- if (this.visible && !("_refreshTimeout" in this))
- this._refreshTimeout = setTimeout(this._refresh.bind(this), immediate ? 0 : 100);
+ if (this.visible && !("_refreshTimeout" in this)) {
+ if (preserveBoundaries)
+ this._refresh();
+ else
+ this._refreshTimeout = setTimeout(this._refresh.bind(this), 100);
+ }
},
_refresh: function()
@@ -308,18 +321,25 @@ WebInspector.TimelinePanel.prototype = {
clearTimeout(this._refreshTimeout);
delete this._refreshTimeout;
}
- this._overviewPane.update(this._records);
- this._refreshRecords();
+
+ if (!this._boundariesAreValid)
+ this._overviewPane.update(this._records);
+ this._refreshRecords(!this._boundariesAreValid);
+ this._boundariesAreValid = true;
},
- _refreshRecords: function()
+ _refreshRecords: function(updateBoundaries)
{
- this._calculator.windowLeft = this._overviewPane.windowLeft;
- this._calculator.windowRight = this._overviewPane.windowRight;
- this._calculator.reset();
+ if (updateBoundaries) {
+ this._calculator.reset();
+ this._calculator.windowLeft = this._overviewPane.windowLeft;
+ this._calculator.windowRight = this._overviewPane.windowRight;
- for (var i = 0; i < this._records.length; ++i)
- this._calculator.updateBoundaries(this._records[i]);
+ for (var i = 0; i < this._records.length; ++i)
+ this._calculator.updateBoundaries(this._records[i]);
+
+ this._calculator.calculateWindow();
+ }
var recordsInWindow = [];
for (var i = 0; i < this._records.length; ++i) {
@@ -338,11 +358,11 @@ WebInspector.TimelinePanel.prototype = {
const expandOffset = 15;
// Convert visible area to visible indexes. Always include top-level record for a visible nested record.
- var startIndex = Math.max(0, Math.floor(visibleTop / rowHeight) - 1);
+ var startIndex = Math.max(0, Math.min(Math.floor(visibleTop / rowHeight) - 1, recordsInWindow.length - 1));
while (startIndex > 0 && recordsInWindow[startIndex].parent)
startIndex--;
var endIndex = Math.min(recordsInWindow.length, Math.ceil(visibleBottom / rowHeight));
- while (endIndex < recordsInWindow.length - 1 && recordsInWindow[startIndex].parent)
+ while (endIndex < recordsInWindow.length - 1 && recordsInWindow[endIndex].parent)
endIndex++;
// Resize gaps first.
@@ -354,8 +374,9 @@ WebInspector.TimelinePanel.prototype = {
// Update visible rows.
var listRowElement = this._sidebarListElement.firstChild;
- var graphRowElement = this._graphRowsElement.firstChild;
var width = this._graphRowsElement.offsetWidth;
+ this._itemsGraphsElement.removeChild(this._graphRowsElement);
+ var graphRowElement = this._graphRowsElement.firstChild;
var scheduleRefreshCallback = this._scheduleRefresh.bind(this, true);
for (var i = startIndex; i < endIndex; ++i) {
var record = recordsInWindow[i];
@@ -371,7 +392,7 @@ WebInspector.TimelinePanel.prototype = {
}
listRowElement.listRow.update(record, isEven);
- graphRowElement.graphRow.update(record, isEven, this._calculator, width, expandOffset);
+ graphRowElement.graphRow.update(record, isEven, this._calculator, width, expandOffset, i);
listRowElement = listRowElement.nextSibling;
graphRowElement = graphRowElement.nextSibling;
@@ -389,9 +410,11 @@ WebInspector.TimelinePanel.prototype = {
graphRowElement = nextElement;
}
+ this._itemsGraphsElement.insertBefore(this._graphRowsElement, this._bottomGapElement);
// Reserve some room for expand / collapse controls to the left for records that start at 0ms.
var timelinePaddingLeft = this._calculator.windowLeft === 0 ? expandOffset : 0;
- this._timelineGrid.updateDividers(true, this._calculator, timelinePaddingLeft);
+ if (updateBoundaries)
+ this._timelineGrid.updateDividers(true, this._calculator, timelinePaddingLeft);
this._adjustScrollPosition((recordsInWindow.length + 1) * rowHeight);
},
@@ -427,6 +450,7 @@ WebInspector.TimelineCategory = function(name, title, color)
WebInspector.TimelineCalculator = function()
{
+ this.reset();
this.windowLeft = 0.0;
this.windowRight = 1.0;
this._uiString = WebInspector.UIString.bind(WebInspector);
@@ -440,63 +464,28 @@ WebInspector.TimelineCalculator.prototype = {
return {start: start, end: end};
},
- get minimumBoundary()
- {
- if (typeof this._minimumBoundary === "number")
- return this._minimumBoundary;
-
- if (typeof this.windowLeft === "number")
- this._minimumBoundary = this._absoluteMinimumBoundary + this.windowLeft * (this._absoluteMaximumBoundary - this._absoluteMinimumBoundary);
- else
- this._minimumBoundary = this._absoluteMinimumBoundary;
- return this._minimumBoundary;
- },
-
- get maximumBoundary()
+ calculateWindow: function()
{
- if (typeof this._maximumBoundary === "number")
- return this._maximumBoundary;
-
- if (typeof this.windowLeft === "number")
- this._maximumBoundary = this._absoluteMinimumBoundary + this.windowRight * (this._absoluteMaximumBoundary - this._absoluteMinimumBoundary);
- else
- this._maximumBoundary = this._absoluteMaximumBoundary;
- return this._maximumBoundary;
+ this.minimumBoundary = this._absoluteMinimumBoundary + this.windowLeft * (this._absoluteMaximumBoundary - this._absoluteMinimumBoundary);
+ this.maximumBoundary = this._absoluteMinimumBoundary + this.windowRight * (this._absoluteMaximumBoundary - this._absoluteMinimumBoundary);
+ this.boundarySpan = this.maximumBoundary - this.minimumBoundary;
},
reset: function()
{
- delete this._absoluteMinimumBoundary;
- delete this._absoluteMaximumBoundary;
- delete this._minimumBoundary;
- delete this._maximumBoundary;
+ this._absoluteMinimumBoundary = -1;
+ this._absoluteMaximumBoundary = -1;
},
updateBoundaries: function(record)
{
- var didChange = false;
-
var lowerBound = record.startTime;
-
- if (typeof this._absoluteMinimumBoundary === "undefined" || lowerBound < this._absoluteMinimumBoundary) {
+ if (this._absoluteMinimumBoundary === -1 || lowerBound < this._absoluteMinimumBoundary)
this._absoluteMinimumBoundary = lowerBound;
- delete this._minimumBoundary;
- didChange = true;
- }
var upperBound = record.endTime;
- if (typeof this._absoluteMaximumBoundary === "undefined" || upperBound > this._absoluteMaximumBoundary) {
+ if (this._absoluteMaximumBoundary === -1 || upperBound > this._absoluteMaximumBoundary)
this._absoluteMaximumBoundary = upperBound;
- delete this._maximumBoundary;
- didChange = true;
- }
-
- return didChange;
- },
-
- get boundarySpan()
- {
- return this.maximumBoundary - this.minimumBoundary;
},
formatValue: function(value)
@@ -587,7 +576,7 @@ WebInspector.TimelineRecordGraphRow = function(graphContainer, refreshCallback,
}
WebInspector.TimelineRecordGraphRow.prototype = {
- update: function(record, isEven, calculator, clientWidth, expandOffset)
+ update: function(record, isEven, calculator, clientWidth, expandOffset, index)
{
this._record = record;
this.element.className = "timeline-graph-side timeline-category-" + record.category.name + (isEven ? " even" : "");
@@ -598,7 +587,7 @@ WebInspector.TimelineRecordGraphRow.prototype = {
this._barElement.style.width = width + "px";
if (record.visibleChildrenCount) {
- this._expandElement.style.top = this.element.offsetTop + "px";
+ this._expandElement.style.top = index * this._rowHeight + "px";
this._expandElement.style.left = left + "px";
this._expandElement.style.width = Math.max(12, width + 25) + "px";
if (!record.collapsed) {
diff --git a/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js b/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
index 4804897..3655d68 100644
--- a/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
+++ b/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
@@ -31,35 +31,41 @@
WebInspector.WatchExpressionsSidebarPane = function()
{
WebInspector.SidebarPane.call(this, WebInspector.UIString("Watch Expressions"));
+ WebInspector.settings.addEventListener("loaded", this._settingsLoaded, this);
+}
- this.section = new WebInspector.WatchExpressionsSection();
+WebInspector.WatchExpressionsSidebarPane.prototype = {
+ _settingsLoaded: function()
+ {
+ this.bodyElement.removeChildren();
- this.bodyElement.appendChild(this.section.element);
+ this.expanded = WebInspector.settings.watchExpressions.length > 0;
+ this.section = new WebInspector.WatchExpressionsSection();
+ this.bodyElement.appendChild(this.section.element);
- var addElement = document.createElement("button");
- addElement.setAttribute("type", "button");
- addElement.textContent = WebInspector.UIString("Add");
- addElement.addEventListener("click", this.section.addExpression.bind(this.section), false);
+ var addElement = document.createElement("button");
+ addElement.setAttribute("type", "button");
+ addElement.textContent = WebInspector.UIString("Add");
+ addElement.addEventListener("click", this.section.addExpression.bind(this.section), false);
- var refreshElement = document.createElement("button");
- refreshElement.setAttribute("type", "button");
- refreshElement.textContent = WebInspector.UIString("Refresh");
- refreshElement.addEventListener("click", this.section.update.bind(this.section), false);
+ var refreshElement = document.createElement("button");
+ refreshElement.setAttribute("type", "button");
+ refreshElement.textContent = WebInspector.UIString("Refresh");
+ refreshElement.addEventListener("click", this.section.update.bind(this.section), false);
- var centerElement = document.createElement("div");
- centerElement.addStyleClass("watch-expressions-buttons-container");
- centerElement.appendChild(addElement);
- centerElement.appendChild(refreshElement);
- this.bodyElement.appendChild(centerElement);
+ var centerElement = document.createElement("div");
+ centerElement.addStyleClass("watch-expressions-buttons-container");
+ centerElement.appendChild(addElement);
+ centerElement.appendChild(refreshElement);
+ this.bodyElement.appendChild(centerElement);
- this.expanded = this.section.loadSavedExpressions().length > 0;
- this.onexpand = this.refreshExpressions.bind(this);
-}
+ this.onexpand = this.refreshExpressions.bind(this);
+ },
-WebInspector.WatchExpressionsSidebarPane.prototype = {
refreshExpressions: function()
{
- this.section.update();
+ if (this.section)
+ this.section.update();
}
}
@@ -71,7 +77,7 @@ WebInspector.WatchExpressionsSection = function()
WebInspector.ObjectPropertiesSection.call(this);
- this.watchExpressions = this.loadSavedExpressions();
+ this.watchExpressions = WebInspector.settings.watchExpressions;
this.headerElement.className = "hidden";
this.editable = true;
@@ -127,7 +133,8 @@ WebInspector.WatchExpressionsSection.prototype = {
}
}
- InspectorBackend.releaseWrapperObjectGroup(this._watchObjectGroupId)
+ // TODO: pass exact injected script id.
+ InspectorBackend.releaseWrapperObjectGroup(0, this._watchObjectGroupId)
var properties = [];
// Count the properties, so we known when to call this.updateProperties()
@@ -181,21 +188,6 @@ WebInspector.WatchExpressionsSection.prototype = {
return children[i];
},
- loadSavedExpressions: function()
- {
- var json = InspectorFrontendHost.setting("watchExpressions");
- if (!json)
- return [];
-
- try {
- json = JSON.parse(json);
- } catch(e) {
- return [];
- }
-
- return json.expressions || [];
- },
-
saveExpressions: function()
{
var toSave = [];
@@ -203,9 +195,7 @@ WebInspector.WatchExpressionsSection.prototype = {
if (this.watchExpressions[i])
toSave.push(this.watchExpressions[i]);
- var json = JSON.stringify({expressions: toSave});
- InspectorFrontendHost.setSetting("watchExpressions", json);
-
+ WebInspector.settings.watchExpressions = toSave;
return toSave.length;
}
}
@@ -255,7 +245,7 @@ WebInspector.WatchExpressionTreeElement.prototype = {
if (WebInspector.isBeingEdited(this.nameElement) || !this.treeOutline.section.editable)
return;
- this.nameElement.textContent = this.property.name.trimWhitespace();
+ this.nameElement.textContent = this.property.name.trim();
var context = { expanded: this.expanded };
@@ -278,7 +268,7 @@ WebInspector.WatchExpressionTreeElement.prototype = {
applyExpression: function(expression, updateInterface)
{
- expression = expression.trimWhitespace();
+ expression = expression.trim();
if (!expression)
expression = null;
diff --git a/WebCore/inspector/front-end/WebKit.qrc b/WebCore/inspector/front-end/WebKit.qrc
index eb299fc..20e9aa2 100644
--- a/WebCore/inspector/front-end/WebKit.qrc
+++ b/WebCore/inspector/front-end/WebKit.qrc
@@ -2,6 +2,9 @@
<qresource prefix="/webkit/inspector">
<file>inspector.html</file>
<file>AbstractTimelinePanel.js</file>
+ <file>AuditLauncherView.js</file>
+ <file>AuditResultView.js</file>
+ <file>AuditsPanel.js</file>
<file>BottomUpProfileDataGridTree.js</file>
<file>Breakpoint.js</file>
<file>BreakpointsSidebarPane.js</file>
@@ -20,6 +23,7 @@
<file>DOMAgent.js</file>
<file>DOMStorage.js</file>
<file>DOMStorageItemsView.js</file>
+ <file>DOMSyntaxHighlighter.js</file>
<file>Drawer.js</file>
<file>ElementsPanel.js</file>
<file>ElementsTreeOutline.js</file>
@@ -33,6 +37,7 @@
<file>InspectorFrontendHostStub.js</file>
<file>KeyboardShortcut.js</file>
<file>MetricsSidebarPane.js</file>
+ <file>NativeTextViewer.js</file>
<file>Object.js</file>
<file>ObjectPropertiesSection.js</file>
<file>ObjectProxy.js</file>
@@ -53,15 +58,24 @@
<file>Script.js</file>
<file>ScriptsPanel.js</file>
<file>ScriptView.js</file>
+ <file>Section.js</file>
+ <file>Settings.js</file>
<file>SidebarPane.js</file>
<file>SidebarTreeElement.js</file>
+ <file>SourceCSSTokenizer.js</file>
<file>SourceFrame.js</file>
+ <file>SourceHTMLTokenizer.js</file>
+ <file>SourceJavaScriptTokenizer.js</file>
+ <file>SourceTokenizer.js</file>
<file>SourceView.js</file>
<file>StatusBarButton.js</file>
<file>StoragePanel.js</file>
<file>StylesSidebarPane.js</file>
<file>SummaryBar.js</file>
<file>TestController.js</file>
+ <file>TextEditor.js</file>
+ <file>TextEditorHighlighter.js</file>
+ <file>TextEditorModel.js</file>
<file>TextPrompt.js</file>
<file>TimelineAgent.js</file>
<file>TimelineGrid.js</file>
@@ -72,8 +86,11 @@
<file>utilities.js</file>
<file>View.js</file>
<file>WatchExpressionsSidebarPane.js</file>
+ <file>WelcomeView.js</file>
+ <file>audits.css</file>
<file>inspector.css</file>
<file>inspectorSyntaxHighlight.css</file>
+ <file>textEditor.css</file>
<file>Images/back.png</file>
<file>Images/checker.png</file>
<file>Images/clearConsoleButtonGlyph.png</file>
@@ -191,10 +208,6 @@
<file>Images/timelinePillPurple.png</file>
<file>Images/timelinePillRed.png</file>
<file>Images/timelinePillYellow.png</file>
- <file>Images/tipBalloon.png</file>
- <file>Images/tipBalloonBottom.png</file>
- <file>Images/tipIcon.png</file>
- <file>Images/tipIconPressed.png</file>
<file>Images/toolbarItemSelected.png</file>
<file>Images/treeDownTriangleBlack.png</file>
<file>Images/treeDownTriangleWhite.png</file>
diff --git a/WebCore/inspector/front-end/WelcomeView.js b/WebCore/inspector/front-end/WelcomeView.js
new file mode 100644
index 0000000..0feee12
--- /dev/null
+++ b/WebCore/inspector/front-end/WelcomeView.js
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 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.
+ */
+
+WebInspector.WelcomeView = function(identifier, headingText, instructionsText)
+{
+ WebInspector.View.call(this);
+
+ this.element.addStyleClass("panel-enabler-view");
+ this.element.addStyleClass(identifier);
+ this.element.addStyleClass("welcome");
+
+ this.contentElement = document.createElement("div");
+ this.contentElement.className = "panel-enabler-view-content";
+ this.element.appendChild(this.contentElement);
+
+ this.alignerElement = document.createElement("div");
+ this.alignerElement.className = "welcome-instructions-aligner";
+ this.contentElement.appendChild(this.alignerElement);
+
+ this.instructionsElement = document.createElement("div");
+ this.instructionsElement.className = "instructions";
+ this.contentElement.appendChild(this.instructionsElement);
+
+ this.headerElement = document.createElement("h1");
+ this.headerElement.textContent = headingText;
+ this.instructionsElement.appendChild(this.headerElement);
+
+ if (instructionsText)
+ this.addMessage(instructionsText);
+}
+
+WebInspector.WelcomeView.prototype = {
+ addMessage: function(message)
+ {
+ var messageElement = document.createElement("div");
+ messageElement.className = "message";
+ if (typeof message == "string")
+ // Message text can contain <br> tags for better text balancing, so we
+ // put it into elements using 'innerHTML', not 'textContent'.
+ messageElement.innerHTML = message;
+ else
+ messageElement.appendChild(message);
+ this.instructionsElement.appendChild(messageElement);
+ }
+}
+
+WebInspector.WelcomeView.prototype.__proto__ = WebInspector.View.prototype;
diff --git a/WebCore/inspector/front-end/audits.css b/WebCore/inspector/front-end/audits.css
new file mode 100644
index 0000000..35db76b
--- /dev/null
+++ b/WebCore/inspector/front-end/audits.css
@@ -0,0 +1,272 @@
+/*
+ * Copyright (C) 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.audits-sidebar-tree-item .icon {
+ content: url(Images/resourcesTimeGraphIcon.png);
+}
+
+.audit-result-sidebar-tree-item .icon {
+ content: url(Images/resourceDocumentIcon.png);
+}
+
+#audit-views {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 200px;
+ bottom: 0;
+ overflow: auto;
+}
+
+button.clear-audit-results-status-bar-item .glyph {
+ -webkit-mask-image: url(Images/clearConsoleButtonGlyph.png);
+}
+
+#audit-result-view {
+ display: none;
+ overflow: auto;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background-color: rgb(245, 245, 245);
+ cursor: default;
+ overflow: auto;
+}
+
+#audit-result-view.visible {
+ display: block;
+}
+
+#audit-result-view > .pane img.score {
+ float: left;
+ margin-top: 2px;
+ position: relative;
+ height: 16px;
+ width: 16px;
+ z-index: 100;
+}
+
+#audit-result-view > .pane img.score.red {
+ content: url(Images/errorRedDot.png);
+}
+
+#audit-result-view > .pane img.score.green {
+ content: url(Images/successGreenDot.png);
+}
+
+#audit-result-view > .pane.expanded:nth-last-of-type(1) {
+ border-bottom: 1px solid rgb(189, 189, 189) !important;
+}
+
+#audit-result-view .pane.expanded:nth-last-of-type(1) {
+ border-bottom: 0px transparent none;
+}
+
+#audit-result-view > .pane > .body > .pane > .title {
+ padding-left: 16px;
+ background-image: none;
+ border-bottom: none;
+}
+
+#audit-result-view > .pane > .body > .pane > .body {
+ background-color: transparent;
+}
+
+#audit-result-view > .pane > .body > .pane .section {
+ margin-left: 16px;
+}
+
+#audit-result-view .section .header {
+ border: 0;
+ background-image: none;
+ background-color: transparent;
+}
+
+#audit-result-view .section .header > .title {
+ color: rgb(0, 0, 0);
+}
+
+#audit-result-view .section .section-content {
+ width: 100%;
+ padding-left: 18px;
+ display: none;
+}
+
+#audit-result-view .section.expanded .section-content {
+ display: block;
+}
+
+#audit-result-view .section.expanded .section-content > p:nth-of-type(1) {
+ margin-top: 0;
+}
+
+#audit-result-view .section.expanded .section-content > p:nth-of-type(1) > *:nth-child(1) {
+ margin-top: 0;
+}
+
+#audit-result-view .section .header::before {
+ content: url(Images/treeRightTriangleBlack.png);
+}
+
+#audit-result-view .section.expanded .header::before {
+ content: url(Images/treeDownTriangleBlack.png);
+}
+
+div.panel.audits .sidebar > ol.sidebar-tree > li:nth-child(1) {
+ height: 0px;
+ padding-top: 0;
+ padding-bottom: 0;
+}
+
+.audit-launcher-view {
+ z-index: 1000;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background-color: white;
+ font-size: 13px;
+ overflow-x: hidden;
+ overflow-y: overlay;
+ display: none;
+}
+
+.audit-launcher-view.visible {
+ display: block;
+}
+
+.audit-launcher-view .audit-launcher-view-content {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ padding: 0 0 0 16px;
+ white-space: nowrap;
+}
+
+.audit-launcher-view h1 {
+ color: rgb(110, 116, 128);
+ font-size: 16px;
+ line-height: 20px;
+ font-weight: normal;
+ padding-top: 15px;
+}
+
+.audit-launcher-view h1.no-audits {
+ text-align: center;
+ font-style: italic;
+ position: relative;
+ left: -8px;
+}
+
+.audit-launcher-view div.button-container {
+ position: absolute;
+ width: 100%;
+ bottom: 16px;
+ padding-top: 16px;
+}
+
+.audit-launcher-view div.audit-categories-container {
+ position: relative;
+ top: 11px;
+ left: 0;
+ width: 100%;
+ overflow-y: auto;
+}
+
+.audit-launcher-view button {
+ color: rgb(6, 6, 6);
+ background-color: transparent;
+ border: 1px solid rgb(165, 165, 165);
+ background-color: rgb(237, 237, 237);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(252, 252, 252)), to(rgb(223, 223, 223)));
+ -webkit-border-radius: 12px;
+ -webkit-appearance: none;
+}
+
+.audit-launcher-view button {
+ font-size: 13px;
+ padding: 3px 20px;
+ height: 24px;
+ margin: 0 5px 0 0;
+}
+
+.audit-launcher-view button:active {
+ background-color: rgb(215, 215, 215);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(194, 194, 194)), to(rgb(239, 239, 239)));
+}
+
+body.inactive .audit-launcher-view button, .audit-launcher-view button:disabled {
+ color: rgb(130, 130, 130);
+ border-color: rgb(212, 212, 212);
+ background-color: rgb(239, 239, 239);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(250, 250, 250)), to(rgb(235, 235, 235)));
+}
+
+.audit-launcher-view label {
+ position: relative;
+ display: block;
+ text-align: left;
+ word-break: break-word;
+ padding: 0 0 5px 0;
+}
+
+.audit-launcher-view label.disabled {
+ color: rgb(130, 130, 130);
+}
+
+.audit-launcher-view input[type="checkbox"] {
+ margin-left: 0;
+}
+
+.audit-launcher-view input[type="radio"] {
+ height: 17px;
+ width: 17px;
+ border: 1px solid rgb(165, 165, 165);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(252, 252, 252)), to(rgb(223, 223, 223)));
+ -webkit-border-radius: 8px;
+ -webkit-appearance: none;
+ vertical-align: middle;
+ margin: 0 5px 5px 0;
+}
+
+.audit-launcher-view input[type="radio"]:active {
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(194, 194, 194)), to(rgb(239, 239, 239)));
+}
+
+.audit-launcher-view input[type="radio"]:checked {
+ background: url(Images/radioDot.png) center no-repeat,
+ -webkit-gradient(linear, left top, left bottom, from(rgb(252, 252, 252)), to(rgb(223, 223, 223)));
+}
diff --git a/WebCore/inspector/front-end/inspector.css b/WebCore/inspector/front-end/inspector.css
index 7cae8b2..501915d 100644
--- a/WebCore/inspector/front-end/inspector.css
+++ b/WebCore/inspector/front-end/inspector.css
@@ -83,7 +83,8 @@ body.inactive #toolbar {
border-bottom: 1px solid rgb(64%, 64%, 64%);
}
-body.detached.platform-mac-leopard #toolbar {
+body.detached.platform-mac-leopard #toolbar,
+body.detached.platform-mac-snowleopard #toolbar {
background: transparent !important;
}
@@ -245,11 +246,13 @@ body.attached.port-qt .toolbar-item.close-left, body.attached.port-qt .toolbar-i
display: none;
}
-body.platform-mac-tiger .toolbar-item.close-right, body.platform-mac-leopard .toolbar-item.close-right {
+body.platform-mac-tiger .toolbar-item.close-right,
+body.platform-mac-leopard .toolbar-item.close-right,
+body.platform-mac-snowleopard .toolbar-item.close-right {
display: none;
}
-body:not(.platform-mac-tiger):not(.platform-mac-leopard) .toolbar-item.close-left {
+body:not(.platform-mac-tiger):not(.platform-mac-leopard):not(.platform-mac-snowleopard) .toolbar-item.close-left {
display: none;
}
@@ -366,6 +369,14 @@ button.status-bar-item.toggled-on .glyph {
background-color: rgb(66, 129, 235);
}
+button.status-bar-item.toggled-1 .glyph {
+ background-color: rgb(66, 129, 235);
+}
+
+button.status-bar-item.toggled-2 .glyph {
+ background-color: purple;
+}
+
button.status-bar-item:disabled {
opacity: 0.5;
background-position: 0 0 !important;
@@ -487,6 +498,29 @@ body.drawer-visible #drawer {
background: none;
}
+.monospace {
+ font-size: 10px;
+ font-family: monospace;
+}
+
+body.platform-mac-tiger .monospace, body.platform-mac-leopard .monospace,
+body.platform-mac-tiger .source-code, body.platform-mac-leopard .source-code {
+ font-size: 10px;
+ font-family: Monaco, monospace;
+}
+
+body.platform-mac-snowleopard .monospace,
+body.platform-mac-snowleopard .source-code {
+ font-size: 11px;
+ font-family: Menlo, monospace;
+}
+
+body.platform-windows .monospace, body.platform-windows-vista-or-later .monospace,
+body.platform-windows .source-code, body.platform-windows-vista-or-later .source-code {
+ font-size: 12px;
+ font-family: Consolas, Lucida Console, monospace;
+}
+
#console-messages {
position: absolute;
z-index: 0;
@@ -494,10 +528,9 @@ body.drawer-visible #drawer {
left: 0;
right: 0;
bottom: 23px;
- font-size: initial;
- font-family: monospace;
padding: 2px 0;
overflow-y: overlay;
+ word-wrap: break-word;
-webkit-user-select: text;
-webkit-text-size-adjust: auto;
}
@@ -556,6 +589,7 @@ body.drawer-visible #drawer {
margin-right: 4px;
text-align: left;
font-size: 11px;
+ line-height: normal;
font-family: Helvetica, Arial, sans-serif;
font-weight: bold;
text-shadow: none;
@@ -690,7 +724,7 @@ body.drawer-visible #drawer {
.console-group-messages .outline-disclosure, .console-group-messages .outline-disclosure ol {
font-size: inherit;
- line-height: 1em;
+ line-height: 12px;
}
.console-group-messages .outline-disclosure.single-node li {
@@ -720,6 +754,18 @@ body.drawer-visible #drawer {
padding-left: 0 !important;
}
+.console-formatted-number {
+ color: rgb(28, 0, 207);
+}
+
+.console-formatted-string, .console-formatted-regexp {
+ color: rgb(196, 26, 22);
+}
+
+.console-formatted-null, .console-formatted-undefined {
+ color: rgb(128, 128, 128);
+}
+
.error-message {
color: red;
}
@@ -746,30 +792,50 @@ body.drawer-visible #drawer {
.resource-view {
display: none;
- overflow: hidden;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
- overflow: hidden;
}
.resource-view.visible {
display: block;
}
-.resource-view.headers-visible {
- overflow-y: auto;
- overflow-x: hidden;
+.resource-view .scope-bar {
+ display: none;
+ position: absolute;
+ height: 20px;
+ top: 0;
+ left: 0;
+ right: 0;
+ background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(236, 236, 236)), to(rgb(217, 217, 217)));
+ border-bottom: 1px solid rgb(163, 163, 163);
+}
+
+.resource-view.headers-visible .scope-bar {
+ display: block;
+}
+
+.resource-view .scope-bar li {
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
}
.resource-view-headers {
- display: none;
padding: 6px;
- border-bottom: 1px solid rgb(64%, 64%, 64%);
- background-color: white;
- -webkit-user-select: text;
+ -webkit-user-select: text;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ overflow: auto;
+}
+
+.resource-view.headers-visible .resource-view-headers {
+ top: 20px;
}
.resource-view-headers .outline-disclosure .parent {
@@ -777,10 +843,6 @@ body.drawer-visible #drawer {
font-weight: bold;
}
-.resource-view.headers-visible .resource-view-headers {
- display: block;
-}
-
.resource-view-headers .outline-disclosure .children li {
white-space: nowrap;
}
@@ -792,21 +854,18 @@ body.drawer-visible #drawer {
.resource-view-headers .outline-disclosure .header-name {
color: rgb(33%, 33%, 33%);
display: inline-block;
- width: 105px;
- text-align: right;
margin-right: 0.5em;
font-weight: bold;
vertical-align: top;
- overflow: hidden;
- text-overflow: ellipsis;
+ white-space: pre-wrap;
}
.resource-view-headers .outline-disclosure .header-value {
- display: inline-block;
- white-space: normal;
- word-break: break-word;
- vertical-align: top;
+ display: inline;
margin-right: 100px;
+ white-space: pre-wrap;
+ word-break: break-all;
+ margin-top: 1px;
}
.resource-view-headers .outline-disclosure .raw-form-data {
@@ -822,16 +881,7 @@ body.drawer-visible #drawer {
}
.resource-view.headers-visible .resource-view-content {
- position: relative;
- top: auto;
- right: auto;
- left: auto;
- bottom: auto;
-}
-
-.resource-view.headers-visible .source-view-frame {
- height: auto;
- vertical-align: top;
+ top: 20px;
}
.webkit-line-gutter-backdrop {
@@ -879,6 +929,7 @@ body.drawer-visible #drawer {
}
.resource-status-image {
+ margin-top: -3px;
vertical-align: middle;
}
@@ -1047,10 +1098,14 @@ body.drawer-visible #drawer {
background-color: rgb(212, 212, 212);
}
-:focus .outline-disclosure li.selected .selection {
+.outline-disclosure ol:focus li.selected .selection {
background-color: rgb(56, 121, 217);
}
+.outline-disclosure {
+ font-size: 11px;
+}
+
.outline-disclosure > ol {
position: relative;
padding: 2px 6px !important;
@@ -1062,24 +1117,33 @@ body.drawer-visible #drawer {
.outline-disclosure, .outline-disclosure ol {
list-style-type: none;
- font-size: 11px;
-webkit-padding-start: 12px;
margin: 0;
}
+.source-code {
+ font-family: monospace;
+ font-size: 10px;
+ white-space: pre-wrap;
+}
+
.outline-disclosure li {
- padding: 0 0 2px 14px;
+ padding: 0 0 0 14px;
margin-top: 1px;
margin-bottom: 1px;
word-wrap: break-word;
- text-indent: -2px
+ text-indent: -2px;
+}
+
+.resources .outline-disclosure li {
+ text-indent: -1px;
}
-:focus .outline-disclosure li.selected {
+.outline-disclosure ol:focus li.selected {
color: white;
}
-:focus .outline-disclosure li.selected * {
+.outline-disclosure ol:focus li.selected * {
color: inherit;
}
@@ -1104,7 +1168,7 @@ body.drawer-visible #drawer {
content: url(Images/treeRightTriangleBlack.png);
}
-:focus .outline-disclosure li.parent.selected::before {
+.outline-disclosure ol:focus li.parent.selected::before {
content: url(Images/treeRightTriangleWhite.png);
}
@@ -1112,7 +1176,7 @@ body.drawer-visible #drawer {
content: url(Images/treeDownTriangleBlack.png);
}
-:focus .outline-disclosure li.parent.expanded.selected::before {
+.outline-disclosure ol:focus li.parent.expanded.selected::before {
content: url(Images/treeDownTriangleWhite.png);
}
@@ -1474,6 +1538,11 @@ body.inactive .placard.selected {
text-decoration: none !important;
}
+.elements-tree-editor {
+ -webkit-user-select: text;
+ -webkit-user-modify: read-write-plaintext-only;
+}
+
.section .properties li.editing {
margin-left: 10px;
text-overflow: clip;
@@ -1781,7 +1850,7 @@ li.editing .swatch, li.editing .enabled-button, li.editing-sub-part .delete-but
.sidebar {
position: absolute;
top: 0;
- min-height: 100%;
+ bottom: 0;
left: 0;
width: 200px;
overflow-y: auto;
@@ -2074,8 +2143,6 @@ body.inactive .data-grid th.sort-ascending, body.inactive .data-grid th.sort-des
}
.storage-view.query {
- font-size: initial;
- font-family: monospace;
padding: 2px 0;
overflow-y: overlay;
overflow-x: hidden;
@@ -2189,7 +2256,7 @@ body.inactive .data-grid th.sort-ascending, body.inactive .data-grid th.sort-des
display: none;
}
-.panel-enabler-view img {
+.panel-enabler-view img, div.welcome-instructions-aligner {
height: 100%;
min-height: 200px;
max-width: 100%;
@@ -2222,7 +2289,7 @@ body.inactive .data-grid th.sort-ascending, body.inactive .data-grid th.sort-des
margin: 0 0 5px 20px;
}
-.panel-enabler-view button, .pane button {
+.panel-enabler-view button:not(.status-bar-item), .pane button {
color: rgb(6, 6, 6);
background-color: transparent;
border: 1px solid rgb(165, 165, 165);
@@ -2232,24 +2299,50 @@ body.inactive .data-grid th.sort-ascending, body.inactive .data-grid th.sort-des
-webkit-appearance: none;
}
-.panel-enabler-view button {
+.panel-enabler-view button:not(.status-bar-item) {
font-size: 13px;
margin: 6px 0 0 0;
padding: 3px 20px;
height: 24px;
}
+.panel-enabler-view.welcome {
+ z-index: auto;
+}
+
+.panel-enabler-view.welcome div.welcome-instructions-aligner {
+ display: inline-block;
+ width: 0;
+}
+
+.panel-enabler-view.welcome .instructions {
+ display: inline-block;
+ vertical-align: middle;
+ width: 330px;
+ margin: 0;
+ white-space: normal;
+ line-height: 175%;
+}
+
+.panel-enabler-view.welcome .message {
+ margin-bottom: 2ex;
+}
+
+.panel-enabler-view.welcome button.status-bar-item {
+ vertical-align: middle;
+}
+
.pane button {
margin: 6px 0 6px 3px;
padding: 2px 9px;
}
-.panel-enabler-view button:active, .pane button:active {
+.panel-enabler-view button:active:not(.status-bar-item), .pane button:active {
background-color: rgb(215, 215, 215);
background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(194, 194, 194)), to(rgb(239, 239, 239)));
}
-body.inactive .panel-enabler-view button, .panel-enabler-view button:disabled, body.inactive .pane button, .pane button:disabled {
+body.inactive .panel-enabler-view button:not(.status-bar-item), .panel-enabler-view button:disabled:not(.status-bar-item), body.inactive .pane button, .pane button:disabled {
color: rgb(130, 130, 130);
border-color: rgb(212, 212, 212);
background-color: rgb(239, 239, 239);
@@ -2379,7 +2472,6 @@ button.enable-toggle-status-bar-item.toggled-on .glyph {
#script-resource-views {
display: block;
- overflow: auto;
padding: 0;
position: absolute;
top: 23px;
@@ -2810,51 +2902,6 @@ button.enable-toggle-status-bar-item.toggled-on .glyph {
-webkit-border-image: url(Images/timelineHollowPillYellow.png) 6 7 6 7;
}
-.tip-button {
- background-image: url(Images/tipIcon.png);
- border: none;
- width: 16px;
- height: 16px;
- float: right;
- background-color: transparent;
- margin-top: 1px;
-}
-
-.tip-button:active {
- background-image: url(Images/tipIconPressed.png);
-}
-
-.tip-balloon {
- position: absolute;
- left: 145px;
- top: -5px;
- z-index: 1000;
- border-width: 51px 15px 18px 37px;
- -webkit-border-image: url(Images/tipBalloon.png) 51 15 18 37;
- width: 265px;
-}
-
-.tip-balloon.bottom {
- position: absolute;
- left: 145px;
- top: auto;
- bottom: -7px;
- z-index: 1000;
- border-width: 18px 15px 51px 37px;
- -webkit-border-image: url(Images/tipBalloonBottom.png) 18 15 51 37;
-}
-
-.tip-balloon-content {
- margin-top: -40px;
- margin-bottom: -2px;
- margin-left: 2px;
-}
-
-.tip-balloon.bottom .tip-balloon-content {
- margin-top: -10px;
- margin-bottom: -35px;
-}
-
#resource-views {
position: absolute;
top: 23px;
@@ -2871,7 +2918,7 @@ button.enable-toggle-status-bar-item.toggled-on .glyph {
.sidebar-resizer-vertical {
position: absolute;
top: 0;
- min-height: 100%;
+ bottom: 0;
width: 5px;
z-index: 500;
cursor: col-resize;
@@ -3025,6 +3072,7 @@ body.inactive .sidebar-tree-item .disclosure-button:active {
padding: 1px 4px;
text-align: center;
font-size: 11px;
+ line-height: normal;
font-family: Helvetica, Arial, sans-serif;
font-weight: bold;
text-shadow: none;
@@ -3296,6 +3344,8 @@ body.inactive .sidebar-tree-item.selected .bubble.search-matches {
.timeline .sidebar {
overflow-y: hidden;
z-index: 100;
+ min-height: 100%;
+ bottom: auto;
}
#timeline-overview-separator {
@@ -3739,6 +3789,12 @@ ol.breakpoint-list {
text-overflow: ellipsis;
overflow: hidden;
margin: 4px 0;
+ color: rgb(33%, 33%, 33%);
+ cursor: pointer;
+}
+
+.breakpoint-list li:hover {
+ color: rgb(15%, 15%, 15%);
}
.breakpoint-list .checkbox-elem {
@@ -3750,22 +3806,42 @@ ol.breakpoint-list {
}
.breakpoint-list .source-text {
- font-family: monospace;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
margin: 2px 0 0px 20px;
}
-.breakpoint-list a {
- color: rgb(33%, 33%, 33%);
- cursor: pointer;
+.webkit-html-js-node, .webkit-html-css-node {
+ white-space: pre;
}
-.breakpoint-list a:hover {
- color: rgb(15%, 15%, 15%);
+.source-breakpoint-condition {
+ z-index: 30;
+ padding: 4px;
+ background-color: rgb(203, 226, 255);
+ -webkit-border-radius: 7px;
+ border: 2px solid rgb(169, 172, 203);
+ width: 90%;
}
-.webkit-html-js-node, .webkit-html-css-node {
- white-space: pre;
+.source-breakpoint-message {
+ background-color: transparent;
+ font-family: Lucida Grande, sans-serif;
+ font-weight: normal;
+ font-size: 11px;
+ text-align: left;
+ text-shadow: none;
+ color: rgb(85, 85, 85);
+ cursor: default;
+ margin: 0 0 2px 0;
+}
+
+#source-breakpoint-condition {
+ margin: 0;
+ border: 1px inset rgb(190, 190, 190) !important;
+ width: 100%;
+ box-shadow: none !important;
+ outline: none !important;
+ -webkit-user-modify: read-write;
}
diff --git a/WebCore/inspector/front-end/inspector.html b/WebCore/inspector/front-end/inspector.html
index 77c7760..26264dc 100644
--- a/WebCore/inspector/front-end/inspector.html
+++ b/WebCore/inspector/front-end/inspector.html
@@ -29,6 +29,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <link rel="stylesheet" type="text/css" href="audits.css">
+ <link rel="stylesheet" type="text/css" href="textEditor.css">
<link rel="stylesheet" type="text/css" href="inspector.css">
<link rel="stylesheet" type="text/css" href="inspectorSyntaxHighlight.css">
<script type="text/javascript" src="utilities.js"></script>
@@ -37,6 +39,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<script type="text/javascript" src="InspectorBackendStub.js"></script>
<script type="text/javascript" src="InspectorFrontendHostStub.js"></script>
<script type="text/javascript" src="Object.js"></script>
+ <script type="text/javascript" src="Settings.js"></script>
<script type="text/javascript" src="ContextMenu.js"></script>
<script type="text/javascript" src="KeyboardShortcut.js"></script>
<script type="text/javascript" src="TextPrompt.js"></script>
@@ -62,6 +65,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<script type="text/javascript" src="SidebarPane.js"></script>
<script type="text/javascript" src="ElementsTreeOutline.js"></script>
<script type="text/javascript" src="SidebarTreeElement.js"></script>
+ <script type="text/javascript" src="Section.js"></script>
<script type="text/javascript" src="PropertiesSection.js"></script>
<script type="text/javascript" src="ObjectProxy.js"></script>
<script type="text/javascript" src="ObjectPropertiesSection.js"></script>
@@ -75,6 +79,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<script type="text/javascript" src="Color.js"></script>
<script type="text/javascript" src="StylesSidebarPane.js"></script>
<script type="text/javascript" src="PanelEnablerView.js"></script>
+ <script type="text/javascript" src="WelcomeView.js"></script>
<script type="text/javascript" src="StatusBarButton.js"></script>
<script type="text/javascript" src="SummaryBar.js"></script>
<script type="text/javascript" src="ElementsPanel.js"></script>
@@ -83,8 +88,20 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<script type="text/javascript" src="StoragePanel.js"></script>
<script type="text/javascript" src="ProfilesPanel.js"></script>
<script type="text/javascript" src="ConsolePanel.js"></script>
+ <script type="text/javascript" src="AuditsPanel.js"></script>
+ <script type="text/javascript" src="AuditResultView.js"></script>
+ <script type="text/javascript" src="AuditLauncherView.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>
+ <script type="text/javascript" src="TextEditorModel.js"></script>
+ <script type="text/javascript" src="TextEditor.js"></script>
+ <script type="text/javascript" src="TextEditorHighlighter.js"></script>
+ <script type="text/javascript" src="NativeTextViewer.js"></script>
+ <script type="text/javascript" src="SourceTokenizer.js"></script>
+ <script type="text/javascript" src="SourceCSSTokenizer.js"></script>
+ <script type="text/javascript" src="SourceHTMLTokenizer.js"></script>
+ <script type="text/javascript" src="SourceJavaScriptTokenizer.js"></script>
<script type="text/javascript" src="SourceView.js"></script>
<script type="text/javascript" src="FontView.js"></script>
<script type="text/javascript" src="ImageView.js"></script>
@@ -112,11 +129,11 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<div class="toolbar-item close-right"><button id="close-button-right"></button></div>
</div>
<div id="main">
- <div id="main-panels" tabindex="0" spellcheck="false"></div>
+ <div id="main-panels" spellcheck="false"></div>
<div id="main-status-bar" class="status-bar"><div id="anchored-status-bar-items"><button id="dock-status-bar-item" class="status-bar-item"><div class="glyph"></div><div class="glyph shadow"></div></button><button id="console-status-bar-item" class="status-bar-item"><div class="glyph"></div><div class="glyph shadow"></div></button><button id="changes-status-bar-item" class="status-bar-item hidden"></button><div id="count-items"><div id="changes-count" class="hidden"></div><div id="error-warning-count" class="hidden"></div></div></div></div>
</div>
<div id="drawer">
- <div id="console-view"><div id="console-messages"><div id="console-prompt" spellcheck="false"><br></div></div></div>
+ <div id="console-view"><div id="console-messages" class="monospace"><div id="console-prompt" spellcheck="false"><br></div></div></div>
<div id="drawer-status-bar" class="status-bar"><div id="other-drawer-status-bar-items"><button id="clear-console-status-bar-item" class="status-bar-item"><div class="glyph"></div><div class="glyph shadow"></div></button><div id="console-filter" class="scope-bar status-bar-item"></div></div></div>
</div>
</body>
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index 3f21f4f..c637f37 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -28,24 +28,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-var Preferences = {
- showUserAgentStyles: true,
- maxInlineTextChildLength: 80,
- minConsoleHeight: 75,
- minSidebarWidth: 100,
- minElementsSidebarWidth: 200,
- minScriptsSidebarWidth: 200,
- showInheritedComputedStyleProperties: false,
- styleRulesExpandedState: {},
- showMissingLocalizedStrings: false,
- heapProfilerPresent: false,
- samplingCPUProfiler: false,
- showColorNicknames: true,
- colorFormat: "hex",
- eventListenersFilter: "all",
- resourcesLargeRows: true
-}
-
function preloadImages()
{
(new Image()).src = "Images/clearConsoleButtonGlyph.png";
@@ -80,16 +62,44 @@ var WebInspector = {
// 3 - ?port
// 4 - ?path
// 5 - ?fragment
- URLRegExp: /^(http[s]?|file):\/\/([^\/:]+)(?::([\d]+))?(?:(\/[^#]*)(?:#(.*))?)?$/i,
+ URLRegExp: /^(http[s]?|file):\/\/([^\/:]*)(?::([\d]+))?(?:(\/[^#]*)(?:#(.*))?)?$/i,
get platform()
{
if (!("_platform" in this))
- this._platform = InspectorFrontendHost.platform();
+ this._platform = this._detectPlatform();
return this._platform;
},
+ _detectPlatform: function()
+ {
+ const userAgent = navigator.userAgent;
+ var nativePlatform = InspectorFrontendHost.platform();
+
+ if (nativePlatform === "windows") {
+ var match = userAgent.match(/Windows NT (\d+)\.(?:\d+)/);
+ if (match && match[1] >= 6)
+ return WebInspector.OS.WindowsVistaOrLater;
+ return WebInspector.OS.Windows;
+ } else if (nativePlatform === "mac") {
+ var match = userAgent.match(/Mac OS X\s*(?:(\d+)_(\d+))?/);
+ if (!match || match[1] != 10)
+ return WebInspector.OS.MacSnowLeopard;
+ switch (Number(match[2])) {
+ case 4:
+ return WebInspector.OS.MacTiger;
+ case 5:
+ return WebInspector.OS.MacLeopard;
+ case 6:
+ default:
+ return WebInspector.OS.MacSnowLeopard;
+ }
+ }
+
+ return nativePlatform;
+ },
+
get port()
{
if (!("_port" in this))
@@ -195,23 +205,13 @@ var WebInspector = {
if (hiddenPanels.indexOf("storage") === -1 && hiddenPanels.indexOf("databases") === -1)
this.panels.storage = new WebInspector.StoragePanel();
- if (hiddenPanels.indexOf("console") === -1)
- this.panels.console = new WebInspector.ConsolePanel();
- },
- _loadPreferences: function()
- {
- var colorFormat = InspectorFrontendHost.setting("color-format");
- if (colorFormat)
- Preferences.colorFormat = colorFormat;
-
- var eventListenersFilter = InspectorFrontendHost.setting("event-listeners-filter");
- if (eventListenersFilter)
- Preferences.eventListenersFilter = eventListenersFilter;
+ // FIXME: Uncomment when ready.
+ // if (hiddenPanels.indexOf("audits") === -1)
+ // this.panels.audits = new WebInspector.AuditsPanel();
- var resourcesLargeRows = InspectorFrontendHost.setting("resources-large-rows");
- if (typeof resourcesLargeRows !== "undefined")
- Preferences.resourcesLargeRows = resourcesLargeRows;
+ if (hiddenPanels.indexOf("console") === -1)
+ this.panels.console = new WebInspector.ConsolePanel();
},
get attached()
@@ -415,14 +415,24 @@ var WebInspector = {
}
}
+WebInspector.OS = {
+ Windows: "windows",
+ WindowsVistaOrLater: "windows-vista-or-later",
+ MacTiger: "mac-tiger",
+ MacLeopard: "mac-leopard",
+ MacSnowLeopard: "mac-snowleopard"
+}
+
WebInspector.loaded = function()
{
+ InspectorBackend.setInjectedScriptSource("(" + injectedScriptConstructor + ");");
+
var platform = WebInspector.platform;
document.body.addStyleClass("platform-" + platform);
var port = WebInspector.port;
document.body.addStyleClass("port-" + port);
- this._loadPreferences();
+ this.settings = new WebInspector.Settings();
this.drawer = new WebInspector.Drawer();
this.console = new WebInspector.ConsoleView(this.drawer);
@@ -475,20 +485,11 @@ WebInspector.loaded = function()
window.addEventListener("resize", this.windowResize.bind(this), true);
document.addEventListener("focus", this.focusChanged.bind(this), true);
- document.addEventListener("keydown", this.documentKeyDown.bind(this), true);
- document.addEventListener("keyup", this.documentKeyUp.bind(this), true);
+ document.addEventListener("keydown", this.documentKeyDown.bind(this), false);
document.addEventListener("beforecopy", this.documentCanCopy.bind(this), true);
document.addEventListener("copy", this.documentCopy.bind(this), true);
document.addEventListener("contextmenu", this.contextMenuEventFired.bind(this), true);
- var mainPanelsElement = document.getElementById("main-panels");
- mainPanelsElement.handleCopyEvent = this.mainCopy.bind(this);
-
- // Focus the mainPanelsElement in a timeout so it happens after the initial focus,
- // so it doesn't get reset to the first toolbar button. This initial focus happens
- // on Mac when the window is made key and the WebHTMLView becomes the first responder.
- setTimeout(function() { WebInspector.currentFocusElement = mainPanelsElement }, 0);
-
var dockToggleButton = document.getElementById("dock-status-bar-item");
dockToggleButton.addEventListener("click", this.toggleAttach.bind(this), false);
@@ -509,7 +510,8 @@ WebInspector.loaded = function()
var searchField = document.getElementById("search");
searchField.addEventListener("search", this.performSearch.bind(this), false); // when the search is emptied
- searchField.addEventListener("mousedown", this.searchFieldManualFocus.bind(this), false); // when the search field is manually selected
+ searchField.addEventListener("mousedown", this._searchFieldManualFocus.bind(this), false); // when the search field is manually selected
+ searchField.addEventListener("keydown", this._searchKeyDown.bind(this), true);
toolbarElement.addEventListener("mousedown", this.toolbarDragStart, true);
document.getElementById("close-button-left").addEventListener("click", this.close, true);
@@ -558,7 +560,7 @@ WebInspector.windowUnload = function(event)
WebInspector.windowResize = function(event)
{
- if (this.currentPanel && this.currentPanel.resize)
+ if (this.currentPanel)
this.currentPanel.resize();
this.drawer.resize();
}
@@ -608,13 +610,13 @@ WebInspector.documentClick = function(event)
function followLink()
{
// FIXME: support webkit-html-external-link links here.
- if (anchor.href in WebInspector.resourceURLMap) {
+ if (WebInspector.canShowSourceLineForURL(anchor.href, anchor.preferredPanel)) {
if (anchor.hasStyleClass("webkit-html-external-link")) {
anchor.removeStyleClass("webkit-html-external-link");
anchor.addStyleClass("webkit-html-resource-link");
}
- WebInspector.showResourceForURL(anchor.href, anchor.lineNumber, anchor.preferredPanel);
+ WebInspector.showSourceLineForURL(anchor.href, anchor.lineNumber, anchor.preferredPanel);
} else {
var profileString = WebInspector.ProfileType.URLRegExp.exec(anchor.href);
if (profileString)
@@ -638,131 +640,125 @@ WebInspector.documentClick = function(event)
WebInspector.documentKeyDown = function(event)
{
- if (this.currentFocusElement) {
- if (this.currentFocusElement.handleKeyEvent)
- this.currentFocusElement.handleKeyEvent(event);
- else if (this.currentFocusElement.id && this.currentFocusElement.id.length && WebInspector[this.currentFocusElement.id + "KeyDown"])
- WebInspector[this.currentFocusElement.id + "KeyDown"](event);
- if (event.handled)
+ if (this.currentFocusElement && this.currentFocusElement.handleKeyEvent) {
+ this.currentFocusElement.handleKeyEvent(event);
+ if (event.handled) {
+ event.preventDefault();
return;
+ }
}
- if (this.currentPanel && this.currentPanel.handleKeyEvent)
- this.currentPanel.handleKeyEvent(event);
+ if (this.currentPanel && this.currentPanel.handleShortcut) {
+ this.currentPanel.handleShortcut(event);
+ if (event.handled) {
+ event.preventDefault();
+ return;
+ }
+ }
- if (!event.handled) {
- var isMac = WebInspector.isMac();
+ var isMac = WebInspector.isMac();
- switch (event.keyIdentifier) {
- case "U+001B": // Escape key
- event.preventDefault();
- if (this.drawer.fullPanel)
- return;
+ switch (event.keyIdentifier) {
+ case "U+001B": // Escape key
+ event.preventDefault();
+ if (this.drawer.fullPanel)
+ return;
- this.drawer.visible = !this.drawer.visible;
- break;
+ this.drawer.visible = !this.drawer.visible;
+ break;
- case "U+0046": // F key
- if (isMac)
- var isFindKey = event.metaKey && !event.ctrlKey && !event.altKey && !event.shiftKey;
- else
- var isFindKey = event.ctrlKey && !event.metaKey && !event.altKey && !event.shiftKey;
+ case "U+0046": // F key
+ if (isMac)
+ var isFindKey = event.metaKey && !event.ctrlKey && !event.altKey && !event.shiftKey;
+ else
+ var isFindKey = event.ctrlKey && !event.metaKey && !event.altKey && !event.shiftKey;
- if (isFindKey) {
- var searchField = document.getElementById("search");
- searchField.focus();
- searchField.select();
- event.preventDefault();
- }
+ if (isFindKey) {
+ var searchField = document.getElementById("search");
+ searchField.focus();
+ searchField.select();
+ event.preventDefault();
+ }
- break;
+ break;
- case "U+0047": // G key
- if (isMac)
- var isFindAgainKey = event.metaKey && !event.ctrlKey && !event.altKey;
- else
- var isFindAgainKey = event.ctrlKey && !event.metaKey && !event.altKey;
-
- if (isFindAgainKey) {
- if (event.shiftKey) {
- if (this.currentPanel.jumpToPreviousSearchResult)
- this.currentPanel.jumpToPreviousSearchResult();
- } else if (this.currentPanel.jumpToNextSearchResult)
- this.currentPanel.jumpToNextSearchResult();
- event.preventDefault();
- }
+ case "U+0047": // G key
+ if (isMac)
+ var isFindAgainKey = event.metaKey && !event.ctrlKey && !event.altKey;
+ else
+ var isFindAgainKey = event.ctrlKey && !event.metaKey && !event.altKey;
+
+ if (isFindAgainKey) {
+ if (event.shiftKey) {
+ if (this.currentPanel.jumpToPreviousSearchResult)
+ this.currentPanel.jumpToPreviousSearchResult();
+ } else if (this.currentPanel.jumpToNextSearchResult)
+ this.currentPanel.jumpToNextSearchResult();
+ event.preventDefault();
+ }
- break;
+ break;
- // Windows and Mac have two different definitions of [, so accept both.
- case "U+005B":
- case "U+00DB": // [ key
- if (isMac)
- var isRotateLeft = event.metaKey && !event.shiftKey && !event.ctrlKey && !event.altKey;
- else
- var isRotateLeft = event.ctrlKey && !event.shiftKey && !event.metaKey && !event.altKey;
+ // Windows and Mac have two different definitions of [, so accept both.
+ case "U+005B":
+ case "U+00DB": // [ key
+ if (isMac)
+ var isRotateLeft = event.metaKey && !event.shiftKey && !event.ctrlKey && !event.altKey;
+ else
+ var isRotateLeft = event.ctrlKey && !event.shiftKey && !event.metaKey && !event.altKey;
- if (isRotateLeft) {
- var index = this.panelOrder.indexOf(this.currentPanel);
- index = (index === 0) ? this.panelOrder.length - 1 : index - 1;
- this.panelOrder[index].toolbarItem.click();
- event.preventDefault();
- }
+ if (isRotateLeft) {
+ var index = this.panelOrder.indexOf(this.currentPanel);
+ index = (index === 0) ? this.panelOrder.length - 1 : index - 1;
+ this.panelOrder[index].toolbarItem.click();
+ event.preventDefault();
+ }
- break;
+ break;
- // Windows and Mac have two different definitions of ], so accept both.
- case "U+005D":
- case "U+00DD": // ] key
- if (isMac)
- var isRotateRight = event.metaKey && !event.shiftKey && !event.ctrlKey && !event.altKey;
- else
- var isRotateRight = event.ctrlKey && !event.shiftKey && !event.metaKey && !event.altKey;
+ // Windows and Mac have two different definitions of ], so accept both.
+ case "U+005D":
+ case "U+00DD": // ] key
+ if (isMac)
+ var isRotateRight = event.metaKey && !event.shiftKey && !event.ctrlKey && !event.altKey;
+ else
+ var isRotateRight = event.ctrlKey && !event.shiftKey && !event.metaKey && !event.altKey;
- if (isRotateRight) {
- var index = this.panelOrder.indexOf(this.currentPanel);
- index = (index + 1) % this.panelOrder.length;
- this.panelOrder[index].toolbarItem.click();
- event.preventDefault();
- }
+ if (isRotateRight) {
+ var index = this.panelOrder.indexOf(this.currentPanel);
+ index = (index + 1) % this.panelOrder.length;
+ this.panelOrder[index].toolbarItem.click();
+ event.preventDefault();
+ }
- break;
- }
- }
-}
+ break;
-WebInspector.documentKeyUp = function(event)
-{
- if (this.currentFocusElement) {
- if (this.currentFocusElement.handleKeyUpEvent)
- this.currentFocusElement.handleKeyUpEvent(event);
- if (event.handled)
- return;
- }
+ case "U+0041": // A key
+ if (isMac)
+ var shouldShowAuditsPanel = event.metaKey && !event.shiftKey && !event.ctrlKey && event.altKey;
+ else
+ var shouldShowAuditsPanel = event.ctrlKey && !event.shiftKey && !event.metaKey && event.altKey;
+
+ if (shouldShowAuditsPanel) {
+ if (!this.panels.audits)
+ this.panels.audits = new WebInspector.AuditsPanel();
+ this.currentPanel = this.panels.audits;
+ }
- if (this.currentPanel && this.currentPanel.handleKeyUpEvent)
- this.currentPanel.handleKeyUpEvent(event);
+ break;
+ }
}
WebInspector.documentCanCopy = function(event)
{
- if (!this.currentFocusElement)
- return;
- // Calling preventDefault() will say "we support copying, so enable the Copy menu".
- if (this.currentFocusElement.handleCopyEvent)
- event.preventDefault();
- else if (this.currentFocusElement.id && this.currentFocusElement.id.length && WebInspector[this.currentFocusElement.id + "Copy"])
+ if (this.currentPanel && this.currentPanel.handleCopyEvent)
event.preventDefault();
}
WebInspector.documentCopy = function(event)
{
- if (!this.currentFocusElement)
- return;
- if (this.currentFocusElement.handleCopyEvent)
- this.currentFocusElement.handleCopyEvent(event);
- else if (this.currentFocusElement.id && this.currentFocusElement.id.length && WebInspector[this.currentFocusElement.id + "Copy"])
- WebInspector[this.currentFocusElement.id + "Copy"](event);
+ if (this.currentPanel && this.currentPanel.handleCopyEvent)
+ this.currentPanel.handleCopyEvent(event);
}
WebInspector.contextMenuEventFired = function(event)
@@ -771,12 +767,6 @@ WebInspector.contextMenuEventFired = function(event)
event.preventDefault();
}
-WebInspector.mainCopy = function(event)
-{
- if (this.currentPanel && this.currentPanel.handleCopyEvent)
- this.currentPanel.handleCopyEvent(event);
-}
-
WebInspector.animateStyle = function(animations, duration, callback)
{
var interval;
@@ -1005,37 +995,9 @@ WebInspector.showConsolePanel = function()
this.currentPanel = this.panels.console;
}
-WebInspector.addResource = function(identifier, payload)
-{
- var resource = new WebInspector.Resource(
- payload.requestHeaders,
- payload.requestURL,
- payload.documentURL,
- payload.host,
- payload.path,
- payload.lastPathComponent,
- identifier,
- payload.isMainResource,
- payload.cached,
- payload.requestMethod,
- payload.requestFormData);
- this.resources[identifier] = resource;
- this.resourceURLMap[resource.url] = resource;
-
- if (resource.mainResource)
- this.mainResource = resource;
-
- if (this.panels.resources)
- this.panels.resources.addResource(resource);
-
- var match = payload.documentURL.match(/^(http[s]?|file):\/\/([\/]*[^\/]+)/i);
- if (match)
- this.addCookieDomain(match[1].toLowerCase() === "file" ? "" : match[2]);
-}
-
WebInspector.clearConsoleMessages = function()
{
- WebInspector.console.clearMessages(false);
+ WebInspector.console.clearMessages();
}
WebInspector.selectDatabase = function(o)
@@ -1053,18 +1015,34 @@ WebInspector.selectDOMStorage = function(o)
WebInspector.updateResource = function(identifier, payload)
{
var resource = this.resources[identifier];
- if (!resource)
- return;
+ if (!resource) {
+ resource = new WebInspector.Resource(identifier, payload.url);
+ this.resources[identifier] = resource;
+ this.resourceURLMap[resource.url] = resource;
+ if (this.panels.resources)
+ this.panels.resources.addResource(resource);
+ }
if (payload.didRequestChange) {
- resource.url = payload.url;
- resource.domain = payload.domain;
+ resource.domain = payload.host;
resource.path = payload.path;
resource.lastPathComponent = payload.lastPathComponent;
resource.requestHeaders = payload.requestHeaders;
resource.mainResource = payload.mainResource;
resource.requestMethod = payload.requestMethod;
resource.requestFormData = payload.requestFormData;
+ resource.cached = payload.cached;
+ resource.documentURL = payload.documentURL;
+
+ if (resource.mainResource)
+ this.mainResource = resource;
+
+ var match = payload.documentURL.match(WebInspector.URLRegExp);
+ if (match) {
+ var protocol = match[1].toLowerCase();
+ if (protocol.indexOf("http") === 0 || protocol === "file")
+ this.addCookieDomain(protocol === "file" ? "" : match[2]);
+ }
}
if (payload.didResponseChange) {
@@ -1103,6 +1081,8 @@ WebInspector.updateResource = function(identifier, payload)
// of the resources panel instead of the individual resource.
if (this.panels.resources)
this.panels.resources.mainResourceLoadTime = payload.loadEventTime;
+ if (this.panels.audits)
+ this.panels.audits.mainResourceLoadTime = payload.loadEventTime;
}
if (payload.domContentEventTime) {
@@ -1110,6 +1090,8 @@ WebInspector.updateResource = function(identifier, payload)
// the resources panel for the same reasons as above.
if (this.panels.resources)
this.panels.resources.mainResourceDOMContentTime = payload.domContentEventTime;
+ if (this.panels.audits)
+ this.panels.audits.mainResourceDOMContentTime = payload.domContentEventTime;
}
}
}
@@ -1217,6 +1199,7 @@ WebInspector.failedToParseScriptSource = function(sourceURL, source, startingLin
WebInspector.pausedScript = function(callFrames)
{
+ callFrames = JSON.parse(callFrames);
this.panels.scripts.debuggerPaused(callFrames);
}
@@ -1267,7 +1250,13 @@ WebInspector.didCommitLoad = function()
WebInspector.setDocument(null);
}
-WebInspector.addConsoleMessage = function(payload)
+WebInspector.updateConsoleMessageExpiredCount = function(count)
+{
+ var message = String.sprintf(WebInspector.UIString("%d console messages are not shown."), count);
+ WebInspector.console.addMessage(new WebInspector.ConsoleTextMessage(message, WebInspector.ConsoleMessage.MessageLevel.Warning));
+}
+
+WebInspector.addConsoleMessage = function(payload, argumentsStringified, opt_args)
{
var consoleMessage = new WebInspector.ConsoleMessage(
payload.source,
@@ -1277,7 +1266,14 @@ WebInspector.addConsoleMessage = function(payload)
payload.url,
payload.groupLevel,
payload.repeatCount);
- consoleMessage.setMessageBody(Array.prototype.slice.call(arguments, 1));
+ var parsedArguments = [];
+ for (var i = 2; i < arguments.length; i++) {
+ if (argumentsStringified)
+ parsedArguments.push(JSON.parse(arguments[i]));
+ else
+ parsedArguments.push(arguments[i]);
+ }
+ consoleMessage.setMessageBody(parsedArguments);
this.console.addMessage(consoleMessage);
}
@@ -1334,7 +1330,7 @@ WebInspector.log = function(message)
WebInspector.log.repeatCount = repeatCount;
// ConsoleMessage expects a proxy object
- message = new WebInspector.ObjectProxy(null, [], 0, message, false);
+ message = new WebInspector.ObjectProxy(null, null, [], 0, message, false);
// post the message
var msg = new WebInspector.ConsoleMessage(
@@ -1447,24 +1443,27 @@ WebInspector.resourceForURL = function(url)
return null;
}
-WebInspector.showResourceForURL = function(url, line, preferredPanel)
+WebInspector._choosePanelToShowSourceLineForURL = function(url, preferredPanel)
{
- var resource = this.resourceForURL(url);
- if (!resource)
- return false;
+ preferredPanel = preferredPanel || "resources";
+ var panel = this.panels[preferredPanel];
+ if (panel && panel.canShowSourceLineForURL(url))
+ return panel;
+ panel = this.panels.resources;
+ return panel.canShowSourceLineForURL(url) ? panel : null;
+}
- if (preferredPanel && preferredPanel in WebInspector.panels) {
- var panel = this.panels[preferredPanel];
- if (!("showResource" in panel))
- panel = null;
- else if ("canShowResource" in panel && !panel.canShowResource(resource))
- panel = null;
- }
+WebInspector.canShowSourceLineForURL = function(url, preferredPanel)
+{
+ return !!this._choosePanelToShowSourceLineForURL(url, preferredPanel);
+}
- this.currentPanel = panel || this.panels.resources;
+WebInspector.showSourceLineForURL = function(url, line, preferredPanel)
+{
+ this.currentPanel = this._choosePanelToShowSourceLineForURL(url, preferredPanel);
if (!this.currentPanel)
return false;
- this.currentPanel.showResource(resource, line);
+ this.currentPanel.showSourceLineForURL(url, line);
return true;
}
@@ -1536,20 +1535,23 @@ WebInspector.addMainEventListeners = function(doc)
doc.addEventListener("click", this.documentClick.bind(this), true);
}
-WebInspector.searchFieldManualFocus = function(event)
+WebInspector._searchFieldManualFocus = function(event)
{
this.currentFocusElement = event.target;
this._previousFocusElement = event.target;
}
-WebInspector.searchKeyDown = function(event)
+WebInspector._searchKeyDown = function(event)
{
// Escape Key will clear the field and clear the search results
if (event.keyCode === WebInspector.KeyboardShortcut.KeyCodes.Esc) {
+ // If focus belongs here and text is empty - nothing to do, return unhandled.
+ if (event.target.value === "" && this.currentFocusElement === this.previousFocusElement)
+ return;
event.preventDefault();
+ event.stopPropagation();
// When search was selected manually and is currently blank, we'd like Esc stay unhandled
// and hit console drawer handler.
- event.handled = !(this.previousFocusElement === event.target && event.target.value === "");
event.target.value = "";
this.performSearch(event);
@@ -1557,10 +1559,6 @@ WebInspector.searchKeyDown = function(event)
if (this.currentFocusElement === event.target)
this.currentFocusElement.select();
return false;
- } else if (event.keyCode === WebInspector.KeyboardShortcut.KeyCodes.Backspace ||
- event.keyCode === WebInspector.KeyboardShortcut.KeyCodes.Delete) {
- event.handled = true;
- return false;
}
if (!isEnterKey(event))
@@ -1697,14 +1695,13 @@ WebInspector.isBeingEdited = function(element)
return element.__editing;
}
-WebInspector.startEditing = function(element, committedCallback, cancelledCallback, context)
+WebInspector.startEditing = function(element, committedCallback, cancelledCallback, context, multiline)
{
if (element.__editing)
return;
element.__editing = true;
var oldText = getContent(element);
- var oldHandleKeyEvent = element.handleKeyEvent;
var moveDirection = "";
element.addStyleClass("editing");
@@ -1732,8 +1729,8 @@ WebInspector.startEditing = function(element, committedCallback, cancelledCallba
this.scrollTop = 0;
this.scrollLeft = 0;
- this.handleKeyEvent = oldHandleKeyEvent;
element.removeEventListener("blur", blurEventListener, false);
+ element.removeEventListener("keydown", keyDownEventListener, true);
if (element === WebInspector.currentFocusElement || element.isAncestor(WebInspector.currentFocusElement))
WebInspector.currentFocusElement = WebInspector.previousFocusElement;
@@ -1758,26 +1755,24 @@ WebInspector.startEditing = function(element, committedCallback, cancelledCallba
committedCallback(this, getContent(this), oldText, context, moveDirection);
}
- element.handleKeyEvent = function(event) {
- if (oldHandleKeyEvent)
- oldHandleKeyEvent(event);
- if (event.handled)
- return;
-
- if (isEnterKey(event)) {
+ function keyDownEventListener(event) {
+ var isMetaOrCtrl = WebInspector.isMac() ?
+ event.metaKey && !event.shiftKey && !event.ctrlKey && !event.altKey :
+ event.ctrlKey && !event.shiftKey && !event.metaKey && !event.altKey;
+ if (isEnterKey(event) && (!multiline || isMetaOrCtrl)) {
editingCommitted.call(element);
event.preventDefault();
event.stopPropagation();
- event.handled = true;
- } else if (event.keyCode === 27) { // Escape key
+ } else if (event.keyCode === WebInspector.KeyboardShortcut.KeyCodes.Esc) {
editingCancelled.call(element);
event.preventDefault();
- event.handled = true;
+ event.stopPropagation();
} else if (event.keyIdentifier === "U+0009") // Tab key
moveDirection = (event.shiftKey ? "backward" : "forward");
}
element.addEventListener("blur", blurEventListener, false);
+ element.addEventListener("keydown", keyDownEventListener, true);
WebInspector.currentFocusElement = element;
}
diff --git a/WebCore/inspector/front-end/textEditor.css b/WebCore/inspector/front-end/textEditor.css
new file mode 100644
index 0000000..9629a07
--- /dev/null
+++ b/WebCore/inspector/front-end/textEditor.css
@@ -0,0 +1,91 @@
+.text-editor {
+ position: absolute;
+ top:0;
+ left:0;
+ right:0;
+ bottom:0;
+ -webkit-user-select: text;
+ -webkit-user-modify: read-write-plaintext-only;
+}
+
+.text-editor-readonly {
+ -webkit-user-modify: read-only;
+}
+
+.text-editor-canvas {
+ position: absolute;
+ top:0;
+ left:0;
+ right:0;
+ bottom:0;
+ z-index: 10;
+ pointer-events: none;
+}
+
+.text-editor-container {
+ position: absolute;
+ top:0;
+ left:0;
+ right:0;
+ bottom:0;
+ overflow: auto;
+}
+
+.text-editor-cursor {
+ -webkit-user-select: none;
+ -webkit-user-modify: none;
+ position: absolute;
+ top:0;
+ left:0;
+ width:1px;
+ height: 14px;
+ z-index: 20;
+ background-color: black;
+ pointer-events: none;
+}
+
+.native-text-editor-line {
+ height: 14px;
+ white-space: pre;
+}
+
+.webkit-html-message-bubble {
+ -webkit-box-shadow: black 0px 2px 5px;
+ -webkit-border-radius: 9px;
+ -webkit-border-fit: lines;
+ font-size: 10px;
+ font-family: Lucida Grande, sans-serif;
+ font-weight: bold;
+ margin: 6px 25px;
+ padding: 0 7px 1px;
+ z-index:20;
+}
+
+.webkit-html-warning-message {
+ background-color: rgb(100%, 62%, 42%);
+ border: 2px solid rgb(100%, 52%, 21%);
+}
+
+.webkit-html-error-message {
+ background-color: rgb(100%, 42%, 42%);
+ border: 2px solid rgb(100%, 31%, 31%);
+}
+
+.webkit-html-message-line {
+ padding-left: 23px;
+ text-indent: -20px;
+}
+
+.webkit-html-message-line-hover {
+ padding-left: 23px;
+ text-indent: -20px;
+ white-space: auto;
+ text-overflow: auto;
+ overflow: auto;
+}
+
+.webkit-html-message-icon {
+ position: relative;
+ top: 2px;
+ margin: 0 4px;
+}
diff --git a/WebCore/inspector/front-end/treeoutline.js b/WebCore/inspector/front-end/treeoutline.js
index 2cde151..b6e35bb 100644
--- a/WebCore/inspector/front-end/treeoutline.js
+++ b/WebCore/inspector/front-end/treeoutline.js
@@ -40,6 +40,9 @@ function TreeOutline(listNode)
this.expanded = true;
this.selected = false;
this.treeOutline = this;
+
+ this._childrenListNode.tabIndex = 0;
+ this._childrenListNode.addEventListener("keydown", this._treeKeyDown.bind(this), true);
}
TreeOutline._knownTreeElementNextIdentifier = 1;
@@ -141,7 +144,15 @@ TreeOutline._removeChildAtIndex = function(childIndex)
var child = this.children[childIndex];
this.children.splice(childIndex, 1);
- child.deselect();
+ var parent = child.parent;
+ if (child.deselect()) {
+ if (child.previousSibling)
+ child.previousSibling.select();
+ else if (child.nextSibling)
+ child.nextSibling.select();
+ else
+ parent.select();
+ }
if (child.previousSibling)
child.previousSibling.nextSibling = child.nextSibling;
@@ -327,10 +338,13 @@ TreeOutline.prototype.treeElementFromPoint = function(x, y)
return null;
}
-TreeOutline.prototype.handleKeyEvent = function(event)
+TreeOutline.prototype._treeKeyDown = function(event)
{
+ if (event.target !== this._childrenListNode)
+ return;
+
if (!this.selectedTreeElement || event.shiftKey || event.metaKey || event.ctrlKey)
- return false;
+ return;
var handled = false;
var nextSelectedElement;
@@ -386,8 +400,6 @@ TreeOutline.prototype.handleKeyEvent = function(event)
event.preventDefault();
event.stopPropagation();
}
-
- return handled;
}
TreeOutline.prototype.expand = function()
@@ -764,6 +776,7 @@ TreeElement.prototype.select = function(supressOnSelect)
this.treeOutline.selectedTreeElement.deselect();
this.selected = true;
+ this.treeOutline._childrenListNode.focus();
this.treeOutline.selectedTreeElement = this;
if (this._listItemNode)
this._listItemNode.addStyleClass("selected");
@@ -775,7 +788,7 @@ TreeElement.prototype.select = function(supressOnSelect)
TreeElement.prototype.deselect = function(supressOnDeselect)
{
if (!this.treeOutline || this.treeOutline.selectedTreeElement !== this || !this.selected)
- return;
+ return false;
this.selected = false;
this.treeOutline.selectedTreeElement = null;
@@ -784,6 +797,7 @@ TreeElement.prototype.deselect = function(supressOnDeselect)
if (this.ondeselect && !supressOnDeselect)
this.ondeselect(this);
+ return true;
}
TreeElement.prototype.traverseNextTreeElement = function(skipHidden, stayWithin, dontPopulate, info)
diff --git a/WebCore/inspector/front-end/utilities.js b/WebCore/inspector/front-end/utilities.js
index 04c9032..d54005a 100644
--- a/WebCore/inspector/front-end/utilities.js
+++ b/WebCore/inspector/front-end/utilities.js
@@ -333,21 +333,6 @@ String.prototype.collapseWhitespace = function()
return this.replace(/[\s\xA0]+/g, " ");
}
-String.prototype.trimLeadingWhitespace = function()
-{
- return this.replace(/^[\s\xA0]+/g, "");
-}
-
-String.prototype.trimTrailingWhitespace = function()
-{
- return this.replace(/[\s\xA0]+$/g, "");
-}
-
-String.prototype.trimWhitespace = function()
-{
- return this.replace(/^[\s\xA0]+|[\s\xA0]+$/g, "");
-}
-
String.prototype.trimURL = function(baseURLDomain)
{
var result = this.replace(/^https?:\/\//i, "");
@@ -628,6 +613,14 @@ Array.prototype.remove = function(value, onlyFirst)
}
}
+Array.prototype.keySet = function()
+{
+ var keys = {};
+ for (var i = 0; i < this.length; ++i)
+ keys[this[i]] = true;
+ return keys;
+}
+
function insertionIndexForObjectInListSortedByFunction(anObject, aList, aFunction)
{
// indexOf returns (-lowerBound - 1). Taking (-result - 1) works out to lowerBound.
@@ -833,7 +826,3 @@ function isEnterKey(event) {
// Check if in IME.
return event.keyCode !== 229 && event.keyIdentifier === "Enter";
}
-
-function isFnKey(event) {
- return event.keyCode >= 112 && event.keyCode <= 123;
-}
diff --git a/WebCore/loader/Cache.cpp b/WebCore/loader/Cache.cpp
index 46fb068..fdd9b25 100644
--- a/WebCore/loader/Cache.cpp
+++ b/WebCore/loader/Cache.cpp
@@ -31,6 +31,7 @@
#include "DocLoader.h"
#include "Document.h"
#include "FrameLoader.h"
+#include "FrameLoaderTypes.h"
#include "FrameView.h"
#include "Image.h"
#include "ResourceHandle.h"
@@ -123,19 +124,21 @@ CachedResource* Cache::requestResource(DocLoader* docLoader, CachedResource::Typ
resource->load(docLoader);
+ if (resource->errorOccurred()) {
+ // We don't support immediate loads, but we do support immediate failure.
+ // In that case we should to delete the resource now and return 0 because otherwise
+ // it would leak if no ref/deref was ever done on it.
+ resource->setInCache(false);
+ delete resource;
+ return 0;
+ }
+
if (!disabled())
m_resources.set(url.string(), resource); // The size will be added in later once the resource is loaded and calls back to us with the new size.
else {
// Kick the resource out of the cache, because the cache is disabled.
resource->setInCache(false);
resource->setDocLoader(docLoader);
- if (resource->errorOccurred()) {
- // We don't support immediate loads, but we do support immediate failure.
- // In that case we should to delete the resource now and return 0 because otherwise
- // it would leak if no ref/deref was ever done on it.
- delete resource;
- return 0;
- }
}
}
@@ -164,7 +167,7 @@ CachedCSSStyleSheet* Cache::requestUserCSSStyleSheet(DocLoader* docLoader, const
// FIXME: CachedResource should just use normal refcounting instead.
userSheet->setInCache(true);
// Don't load incrementally, skip load checks, don't send resource load callbacks.
- userSheet->load(docLoader, false, true, false);
+ userSheet->load(docLoader, false, SkipSecurityCheck, false);
if (!disabled())
m_resources.set(url, userSheet);
else
@@ -292,7 +295,7 @@ void Cache::pruneLiveResources()
return;
// Destroy our decoded data. This will remove us from
- // m_liveDecodedResources, and possibly move us to a differnt LRU
+ // m_liveDecodedResources, and possibly move us to a different LRU
// list in m_allResources.
current->destroyDecodedData();
@@ -344,7 +347,7 @@ void Cache::pruneDeadResources()
CachedResource* prev = current->m_prevInAllResourcesList;
if (!current->hasClients() && !current->isPreloaded() && current->isLoaded()) {
// Destroy our decoded data. This will remove us from
- // m_liveDecodedResources, and possibly move us to a differnt
+ // m_liveDecodedResources, and possibly move us to a different
// LRU list in m_allResources.
current->destroyDecodedData();
@@ -465,13 +468,13 @@ void Cache::removeFromLRUList(CachedResource* resource)
if (resource->accessCount() == 0)
return;
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
unsigned oldListIndex = resource->m_lruIndex;
#endif
LRUList* list = lruListFor(resource);
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
// Verify that the list we got is the list we want.
ASSERT(resource->m_lruIndex == oldListIndex);
diff --git a/WebCore/loader/Cache.h b/WebCore/loader/Cache.h
index 68be2d6..0a5b74d 100644
--- a/WebCore/loader/Cache.h
+++ b/WebCore/loader/Cache.h
@@ -195,7 +195,7 @@ private:
unsigned m_deadSize; // The number of bytes currently consumed by "dead" resources in the cache.
// Size-adjusted and popularity-aware LRU list collection for cache objects. This collection can hold
- // more resources than the cached resource map, since it can also hold "stale" muiltiple versions of objects that are
+ // more resources than the cached resource map, since it can also hold "stale" multiple versions of objects that are
// waiting to die when the clients referencing them go away.
Vector<LRUList, 32> m_allResources;
diff --git a/WebCore/loader/CachePolicy.h b/WebCore/loader/CachePolicy.h
index 93f92b1..2639caa 100644
--- a/WebCore/loader/CachePolicy.h
+++ b/WebCore/loader/CachePolicy.h
@@ -32,7 +32,8 @@ namespace WebCore {
CachePolicyCache,
CachePolicyVerify,
CachePolicyRevalidate,
- CachePolicyReload
+ CachePolicyReload,
+ CachePolicyAllowStale
};
}
diff --git a/WebCore/loader/CachedCSSStyleSheet.cpp b/WebCore/loader/CachedCSSStyleSheet.cpp
index 4c466fa..b2e03b9 100644
--- a/WebCore/loader/CachedCSSStyleSheet.cpp
+++ b/WebCore/loader/CachedCSSStyleSheet.cpp
@@ -52,9 +52,9 @@ CachedCSSStyleSheet::~CachedCSSStyleSheet()
void CachedCSSStyleSheet::didAddClient(CachedResourceClient *c)
{
if (!m_loading)
- c->setCSSStyleSheet(m_url, m_decoder->encoding().name(), this);
+ c->setCSSStyleSheet(m_url, m_response.url(), m_decoder->encoding().name(), this);
}
-
+
void CachedCSSStyleSheet::allClientsRemoved()
{
if (isSafeToMakePurgeable())
@@ -71,11 +71,11 @@ String CachedCSSStyleSheet::encoding() const
return m_decoder->encoding().name();
}
-const String CachedCSSStyleSheet::sheetText(bool enforceMIMEType) const
+const String CachedCSSStyleSheet::sheetText(bool enforceMIMEType, bool* hasValidMIMEType) const
{
ASSERT(!isPurgeable());
- if (!m_data || m_data->isEmpty() || !canUseSheet(enforceMIMEType))
+ if (!m_data || m_data->isEmpty() || !canUseSheet(enforceMIMEType, hasValidMIMEType))
return String();
if (!m_decodedSheetText.isNull())
@@ -112,7 +112,7 @@ void CachedCSSStyleSheet::checkNotify()
CachedResourceClientWalker w(m_clients);
while (CachedResourceClient *c = w.next())
- c->setCSSStyleSheet(m_response.url().string(), m_decoder->encoding().name(), this);
+ c->setCSSStyleSheet(m_url, m_response.url(), m_decoder->encoding().name(), this);
}
void CachedCSSStyleSheet::error()
@@ -122,12 +122,12 @@ void CachedCSSStyleSheet::error()
checkNotify();
}
-bool CachedCSSStyleSheet::canUseSheet(bool enforceMIMEType) const
+bool CachedCSSStyleSheet::canUseSheet(bool enforceMIMEType, bool* hasValidMIMEType) const
{
if (errorOccurred())
return false;
- if (!enforceMIMEType)
+ if (!enforceMIMEType && !hasValidMIMEType)
return true;
// This check exactly matches Firefox. Note that we grab the Content-Type
@@ -138,7 +138,12 @@ bool CachedCSSStyleSheet::canUseSheet(bool enforceMIMEType) const
// This code defaults to allowing the stylesheet for non-HTTP protocols so
// folks can use standards mode for local HTML documents.
String mimeType = extractMIMETypeFromMediaType(response().httpHeaderField("Content-Type"));
- return mimeType.isEmpty() || equalIgnoringCase(mimeType, "text/css") || equalIgnoringCase(mimeType, "application/x-unknown-content-type");
+ bool typeOK = mimeType.isEmpty() || equalIgnoringCase(mimeType, "text/css") || equalIgnoringCase(mimeType, "application/x-unknown-content-type");
+ if (hasValidMIMEType)
+ *hasValidMIMEType = typeOK;
+ if (!enforceMIMEType)
+ return true;
+ return typeOK;
}
}
diff --git a/WebCore/loader/CachedCSSStyleSheet.h b/WebCore/loader/CachedCSSStyleSheet.h
index e782f2e..908c4c0 100644
--- a/WebCore/loader/CachedCSSStyleSheet.h
+++ b/WebCore/loader/CachedCSSStyleSheet.h
@@ -40,7 +40,7 @@ namespace WebCore {
CachedCSSStyleSheet(const String& URL, const String& charset);
virtual ~CachedCSSStyleSheet();
- const String sheetText(bool enforceMIMEType = true) const;
+ const String sheetText(bool enforceMIMEType = true, bool* hasValidMIMEType = 0) const;
virtual void didAddClient(CachedResourceClient*);
@@ -56,7 +56,7 @@ namespace WebCore {
void checkNotify();
private:
- bool canUseSheet(bool enforceMIMEType) const;
+ bool canUseSheet(bool enforceMIMEType, bool* hasValidMIMEType) const;
protected:
RefPtr<TextResourceDecoder> m_decoder;
diff --git a/WebCore/loader/CachedFont.cpp b/WebCore/loader/CachedFont.cpp
index 7fb25fb..3d3fd8d 100644
--- a/WebCore/loader/CachedFont.cpp
+++ b/WebCore/loader/CachedFont.cpp
@@ -27,7 +27,11 @@
#include "config.h"
#include "CachedFont.h"
+<<<<<<< HEAD
#if PLATFORM(ANDROID) || PLATFORM(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (PLATFORM(WIN_OS) || PLATFORM(LINUX))) || PLATFORM(HAIKU) || PLATFORM(WINCE)
+=======
+#if PLATFORM(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (OS(WINDOWS) || OS(LINUX))) || PLATFORM(HAIKU) || OS(WINCE)
+>>>>>>> webkit.org at r54127
#define STORE_FONT_CUSTOM_PLATFORM_DATA
#endif
@@ -165,7 +169,7 @@ SVGFontElement* CachedFont::getSVGFontById(const String& fontName) const
Node* node = list->item(i);
ASSERT(node);
- if (static_cast<Element*>(node)->getAttribute(HTMLNames::idAttr) != fontName)
+ if (static_cast<Element*>(node)->getAttribute(static_cast<Element*>(node)->idAttributeName()) != fontName)
continue;
ASSERT(node->hasTagName(SVGNames::fontTag));
diff --git a/WebCore/loader/CachedImage.cpp b/WebCore/loader/CachedImage.cpp
index 780d7ee..1105f66 100644
--- a/WebCore/loader/CachedImage.cpp
+++ b/WebCore/loader/CachedImage.cpp
@@ -30,6 +30,7 @@
#include "CachedResourceClientWalker.h"
#include "DocLoader.h"
#include "Frame.h"
+#include "FrameLoaderTypes.h"
#include "FrameView.h"
#include "Request.h"
#include "Settings.h"
@@ -84,8 +85,12 @@ void CachedImage::load(DocLoader* docLoader)
if (!docLoader || (docLoader->autoLoadImages() && !docLoader->shouldBlockNetworkImage(m_url)))
#else
if (!docLoader || docLoader->autoLoadImages())
+<<<<<<< HEAD
#endif
CachedResource::load(docLoader, true, false, true);
+=======
+ CachedResource::load(docLoader, true, DoSecurityCheck, true);
+>>>>>>> webkit.org at r54127
else
m_loading = false;
}
diff --git a/WebCore/loader/CachedResource.cpp b/WebCore/loader/CachedResource.cpp
index f2f52b0..640d1f7 100644
--- a/WebCore/loader/CachedResource.cpp
+++ b/WebCore/loader/CachedResource.cpp
@@ -103,10 +103,10 @@ CachedResource::~CachedResource()
m_docLoader->removeCachedResource(this);
}
-void CachedResource::load(DocLoader* docLoader, bool incremental, bool skipCanLoadCheck, bool sendResourceLoadCallbacks)
+void CachedResource::load(DocLoader* docLoader, bool incremental, SecurityCheckPolicy securityCheck, bool sendResourceLoadCallbacks)
{
m_sendResourceLoadCallbacks = sendResourceLoadCallbacks;
- cache()->loader()->load(docLoader, this, incremental, skipCanLoadCheck, sendResourceLoadCallbacks);
+ cache()->loader()->load(docLoader, this, incremental, securityCheck, sendResourceLoadCallbacks);
m_loading = true;
}
@@ -431,7 +431,7 @@ bool CachedResource::makePurgeable(bool purgeable)
if (!m_data)
return false;
- // Should not make buffer purgeable if it has refs othen than this since we don't want two copies.
+ // Should not make buffer purgeable if it has refs other than this since we don't want two copies.
if (!m_data->hasOneRef())
return false;
diff --git a/WebCore/loader/CachedResource.h b/WebCore/loader/CachedResource.h
index 66ca1b1..0f46a62 100644
--- a/WebCore/loader/CachedResource.h
+++ b/WebCore/loader/CachedResource.h
@@ -24,6 +24,7 @@
#define CachedResource_h
#include "CachePolicy.h"
+#include "FrameLoaderTypes.h"
#include "PlatformString.h"
#include "ResourceResponse.h"
#include "SharedBuffer.h"
@@ -75,8 +76,8 @@ public:
CachedResource(const String& url, Type);
virtual ~CachedResource();
- virtual void load(DocLoader* docLoader) { load(docLoader, false, false, true); }
- void load(DocLoader*, bool incremental, bool skipCanLoadCheck, bool sendResourceLoadCallbacks);
+ virtual void load(DocLoader* docLoader) { load(docLoader, false, DoSecurityCheck, true); }
+ void load(DocLoader*, bool incremental, SecurityCheckPolicy, bool sendResourceLoadCallbacks);
virtual void setEncoding(const String&) { }
virtual String encoding() const { return String(); }
@@ -148,7 +149,7 @@ public:
virtual bool schedule() const { return false; }
- // List of acceptable MIME types seperated by ",".
+ // List of acceptable MIME types separated by ",".
// A MIME type may contain a wildcard, e.g. "text/*".
String accept() const { return m_accept; }
void setAccept(const String& accept) { m_accept = accept; }
diff --git a/WebCore/loader/CachedResourceClient.h b/WebCore/loader/CachedResourceClient.h
index dd9bb94..be3f87e 100644
--- a/WebCore/loader/CachedResourceClient.h
+++ b/WebCore/loader/CachedResourceClient.h
@@ -42,6 +42,7 @@ namespace WebCore {
class String;
class Image;
class IntRect;
+ class KURL;
/**
* @internal
@@ -65,8 +66,8 @@ namespace WebCore {
// e.g., in the b/f cache or in a background tab).
virtual bool willRenderImage(CachedImage*) { return false; }
- virtual void setCSSStyleSheet(const String& /*URL*/, const String& /*charset*/, const CachedCSSStyleSheet*) { }
- virtual void setXSLStyleSheet(const String& /*URL*/, const String& /*sheet*/) { }
+ virtual void setCSSStyleSheet(const String& /* href */, const KURL& /* baseURL */, const String& /* charset */, const CachedCSSStyleSheet*) { }
+ virtual void setXSLStyleSheet(const String& /* href */, const KURL& /* baseURL */, const String& /* sheet */) { }
virtual void fontLoaded(CachedFont*) {};
diff --git a/WebCore/loader/CachedResourceHandle.h b/WebCore/loader/CachedResourceHandle.h
index 0956e0c..7d485bf 100644
--- a/WebCore/loader/CachedResourceHandle.h
+++ b/WebCore/loader/CachedResourceHandle.h
@@ -72,7 +72,7 @@ namespace WebCore {
bool operator!=(const CachedResourceHandleBase& o) const { return get() != o.get(); }
};
- // Don't inline for winscw compiler to prevent the compiler agressively resolving
+ // Don't inline for winscw compiler to prevent the compiler aggressively resolving
// the base class of R* when CachedResourceHandler<T>(R*) is inlined. The bug is
// reported at: https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812.
template <class R>
diff --git a/WebCore/loader/CachedXSLStyleSheet.cpp b/WebCore/loader/CachedXSLStyleSheet.cpp
index 5da0abf..59c3907 100644
--- a/WebCore/loader/CachedXSLStyleSheet.cpp
+++ b/WebCore/loader/CachedXSLStyleSheet.cpp
@@ -48,7 +48,7 @@ CachedXSLStyleSheet::CachedXSLStyleSheet(const String &url)
void CachedXSLStyleSheet::didAddClient(CachedResourceClient* c)
{
if (!m_loading)
- c->setXSLStyleSheet(m_url, m_sheet);
+ c->setXSLStyleSheet(m_url, m_response.url(), m_sheet);
}
void CachedXSLStyleSheet::setEncoding(const String& chs)
@@ -83,10 +83,9 @@ void CachedXSLStyleSheet::checkNotify()
CachedResourceClientWalker w(m_clients);
while (CachedResourceClient *c = w.next())
- c->setXSLStyleSheet(m_url, m_sheet);
+ c->setXSLStyleSheet(m_url, m_response.url(), m_sheet);
}
-
void CachedXSLStyleSheet::error()
{
m_loading = false;
diff --git a/WebCore/loader/CrossOriginAccessControl.cpp b/WebCore/loader/CrossOriginAccessControl.cpp
index 7a21280..01596e2 100644
--- a/WebCore/loader/CrossOriginAccessControl.cpp
+++ b/WebCore/loader/CrossOriginAccessControl.cpp
@@ -100,8 +100,7 @@ bool passesAccessControlCheck(const ResourceResponse& response, bool includeCred
if (accessControlOriginString == "*" && !includeCredentials)
return true;
- // A sandboxed frame has a unique origin (for same-origin purposes).
- if (securityOrigin->isSandboxed(SandboxOrigin))
+ if (securityOrigin->isUnique())
return false;
RefPtr<SecurityOrigin> accessControlOrigin = SecurityOrigin::createFromString(accessControlOriginString);
diff --git a/WebCore/loader/CrossOriginPreflightResultCache.h b/WebCore/loader/CrossOriginPreflightResultCache.h
index 97b526a..faf55e5 100644
--- a/WebCore/loader/CrossOriginPreflightResultCache.h
+++ b/WebCore/loader/CrossOriginPreflightResultCache.h
@@ -26,6 +26,8 @@
#include "KURLHash.h"
#include "StringHash.h"
+#include <wtf/HashMap.h>
+#include <wtf/HashSet.h>
namespace WebCore {
diff --git a/WebCore/loader/DocLoader.cpp b/WebCore/loader/DocLoader.cpp
index fff8e59..54dc733 100644
--- a/WebCore/loader/DocLoader.cpp
+++ b/WebCore/loader/DocLoader.cpp
@@ -40,6 +40,7 @@
#include "HTMLElement.h"
#include "Frame.h"
#include "FrameLoader.h"
+#include "FrameLoaderClient.h"
#include "loader.h"
#include "SecurityOrigin.h"
#include "Settings.h"
@@ -114,8 +115,8 @@ void DocLoader::checkForReload(const KURL& fullURL)
case CachePolicyRevalidate:
cache()->revalidateResource(existing, this);
break;
- default:
- ASSERT_NOT_REACHED();
+ case CachePolicyAllowStale:
+ return;
}
m_reloadedURLs.add(fullURL.string());
@@ -123,6 +124,11 @@ void DocLoader::checkForReload(const KURL& fullURL)
CachedImage* DocLoader::requestImage(const String& url)
{
+ if (Frame* f = frame()) {
+ Settings* settings = f->settings();
+ if (!f->loader()->client()->allowImages(!settings || settings->areImagesEnabled()))
+ return 0;
+ }
CachedImage* resource = static_cast<CachedImage*>(requestResource(CachedResource::ImageResource, url, String()));
if (autoLoadImages() && resource && resource->stillNeedsLoad()) {
#ifdef ANDROID_BLOCK_NETWORK_IMAGE
diff --git a/WebCore/loader/DocumentLoader.cpp b/WebCore/loader/DocumentLoader.cpp
index e8c3652..dca416e 100644
--- a/WebCore/loader/DocumentLoader.cpp
+++ b/WebCore/loader/DocumentLoader.cpp
@@ -50,7 +50,6 @@
#include "PlatformString.h"
#include "Settings.h"
#include "SharedBuffer.h"
-#include "StringBuffer.h"
#include "XMLTokenizer.h"
#include <wtf/Assertions.h>
@@ -58,67 +57,6 @@
namespace WebCore {
-/*
- * Performs four operations:
- * 1. Convert backslashes to currency symbols
- * 2. Convert control characters to spaces
- * 3. Trim leading and trailing spaces
- * 4. Collapse internal whitespace.
- */
-static inline String canonicalizedTitle(const String& title, Frame* frame)
-{
- ASSERT(!title.isEmpty());
-
- const UChar* characters = title.characters();
- unsigned length = title.length();
- unsigned i;
-
- StringBuffer buffer(length);
- unsigned builderIndex = 0;
-
- // Skip leading spaces and leading characters that would convert to spaces
- for (i = 0; i < length; ++i) {
- UChar c = characters[i];
- if (!(c <= 0x20 || c == 0x7F))
- break;
- }
-
- if (i == length)
- return "";
-
- // Replace control characters with spaces, and backslashes with currency symbols, and collapse whitespace.
- bool previousCharWasWS = false;
- for (; i < length; ++i) {
- UChar c = characters[i];
- if (c <= 0x20 || c == 0x7F || (WTF::Unicode::category(c) & (WTF::Unicode::Separator_Line | WTF::Unicode::Separator_Paragraph))) {
- if (previousCharWasWS)
- continue;
- buffer[builderIndex++] = ' ';
- previousCharWasWS = true;
- } else {
- buffer[builderIndex++] = c;
- previousCharWasWS = false;
- }
- }
-
- // Strip trailing spaces
- while (builderIndex > 0) {
- --builderIndex;
- if (buffer[builderIndex] != ' ')
- break;
- }
-
- if (!builderIndex && buffer[builderIndex] == ' ')
- return "";
-
- buffer.shrink(builderIndex + 1);
-
- // Replace the backslashes with currency symbols if the encoding requires it.
- frame->document()->displayBufferModifiedByEncoding(buffer.characters(), buffer.length());
-
- return String::adopt(buffer);
-}
-
static void cancelAll(const ResourceLoaderSet& loaders)
{
const ResourceLoaderSet copy = loaders;
@@ -672,10 +610,9 @@ void DocumentLoader::setTitle(const String& title)
if (title.isEmpty())
return;
- String trimmed = canonicalizedTitle(title, m_frame);
- if (!trimmed.isEmpty() && m_pageTitle != trimmed) {
+ if (m_pageTitle != title) {
frameLoader()->willChangeTitle(this);
- m_pageTitle = trimmed;
+ m_pageTitle = title;
frameLoader()->didChangeTitle(this);
}
}
diff --git a/WebCore/loader/DocumentLoader.h b/WebCore/loader/DocumentLoader.h
index b8e659c..440cfc4 100644
--- a/WebCore/loader/DocumentLoader.h
+++ b/WebCore/loader/DocumentLoader.h
@@ -158,7 +158,7 @@ namespace WebCore {
KURL urlForHistory() const;
bool urlForHistoryReflectsFailure() const;
- // These accessors accomodate WebCore's somewhat fickle custom of creating history
+ // These accessors accommodate WebCore's somewhat fickle custom of creating history
// items for redirects, but only sometimes. For "source" and "destination",
// these accessors return the URL that would have been used if a history
// item were created. This allows WebKit to link history items reflecting
diff --git a/WebCore/loader/DocumentThreadableLoader.cpp b/WebCore/loader/DocumentThreadableLoader.cpp
index 8a223fd..de0a0b0 100644
--- a/WebCore/loader/DocumentThreadableLoader.cpp
+++ b/WebCore/loader/DocumentThreadableLoader.cpp
@@ -70,8 +70,7 @@ DocumentThreadableLoader::DocumentThreadableLoader(Document* document, Threadabl
ASSERT(client);
if (m_sameOriginRequest || m_options.crossOriginRequestPolicy == AllowCrossOriginRequests) {
- bool skipCanLoadCheck = false;
- loadRequest(request, skipCanLoadCheck);
+ loadRequest(request, DoSecurityCheck);
return;
}
@@ -111,8 +110,7 @@ void DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest(const Resource
crossOriginRequest.setAllowCookies(m_options.allowCredentials);
crossOriginRequest.setHTTPOrigin(m_document->securityOrigin()->toString());
- bool skipCanLoadCheck = false;
- loadRequest(crossOriginRequest, skipCanLoadCheck);
+ loadRequest(crossOriginRequest, DoSecurityCheck);
}
void DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight(const ResourceRequest& request)
@@ -142,8 +140,7 @@ void DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight(const R
preflightRequest.setHTTPHeaderField("Access-Control-Request-Headers", String::adopt(headerBuffer));
}
- bool skipCanLoadCheck = false;
- loadRequest(preflightRequest, skipCanLoadCheck);
+ loadRequest(preflightRequest, DoSecurityCheck);
}
DocumentThreadableLoader::~DocumentThreadableLoader()
@@ -284,8 +281,8 @@ void DocumentThreadableLoader::preflightSuccess()
OwnPtr<ResourceRequest> actualRequest;
actualRequest.swap(m_actualRequest);
- bool skipCanLoadCheck = true; // ok to skip load check since we already asked about the preflight request
- loadRequest(*actualRequest, skipCanLoadCheck);
+ // It should be ok to skip the security check since we already asked about the preflight request.
+ loadRequest(*actualRequest, SkipSecurityCheck);
}
void DocumentThreadableLoader::preflightFailure()
@@ -293,7 +290,7 @@ void DocumentThreadableLoader::preflightFailure()
m_client->didFail(ResourceError());
}
-void DocumentThreadableLoader::loadRequest(const ResourceRequest& request, bool skipCanLoadCheck)
+void DocumentThreadableLoader::loadRequest(const ResourceRequest& request, SecurityCheckPolicy securityCheck)
{
if (m_async) {
// Don't sniff content or send load callbacks for the preflight request.
@@ -302,7 +299,7 @@ void DocumentThreadableLoader::loadRequest(const ResourceRequest& request, bool
// Clear the loader so that any callbacks from SubresourceLoader::create will not have the old loader.
m_loader = 0;
- m_loader = SubresourceLoader::create(m_document->frame(), this, request, skipCanLoadCheck, sendLoadCallbacks, sniffContent);
+ m_loader = SubresourceLoader::create(m_document->frame(), this, request, securityCheck, sendLoadCallbacks, sniffContent);
return;
}
diff --git a/WebCore/loader/DocumentThreadableLoader.h b/WebCore/loader/DocumentThreadableLoader.h
index 7eb7f1c..48d1551 100644
--- a/WebCore/loader/DocumentThreadableLoader.h
+++ b/WebCore/loader/DocumentThreadableLoader.h
@@ -31,6 +31,7 @@
#ifndef DocumentThreadableLoader_h
#define DocumentThreadableLoader_h
+#include "FrameLoaderTypes.h"
#include "SubresourceLoaderClient.h"
#include "ThreadableLoader.h"
#include <wtf/OwnPtr.h>
@@ -85,7 +86,7 @@ namespace WebCore {
void preflightSuccess();
void preflightFailure();
- void loadRequest(const ResourceRequest&, bool skipCanLoadCheck);
+ void loadRequest(const ResourceRequest&, SecurityCheckPolicy);
bool isAllowedRedirect(const KURL&);
RefPtr<SubresourceLoader> m_loader;
diff --git a/WebCore/loader/EmptyClients.h b/WebCore/loader/EmptyClients.h
index e5385c5..2da2fb2 100644
--- a/WebCore/loader/EmptyClients.h
+++ b/WebCore/loader/EmptyClients.h
@@ -175,7 +175,7 @@ public:
#endif
};
-class EmptyFrameLoaderClient : public FrameLoaderClient {
+class EmptyFrameLoaderClient : public FrameLoaderClient, public Noncopyable {
public:
virtual ~EmptyFrameLoaderClient() { }
virtual void frameLoaderDestroyed() { }
@@ -328,7 +328,7 @@ public:
};
-class EmptyEditorClient : public EditorClient {
+class EmptyEditorClient : public EditorClient, public Noncopyable {
public:
virtual ~EmptyEditorClient() { }
virtual void pageDestroyed() { }
@@ -433,7 +433,7 @@ public:
};
#if ENABLE(CONTEXT_MENUS)
-class EmptyContextMenuClient : public ContextMenuClient {
+class EmptyContextMenuClient : public ContextMenuClient, public Noncopyable {
public:
virtual ~EmptyContextMenuClient() { }
virtual void contextMenuDestroyed() { }
@@ -456,7 +456,7 @@ public:
#endif // ENABLE(CONTEXT_MENUS)
#if ENABLE(DRAG_SUPPORT)
-class EmptyDragClient : public DragClient {
+class EmptyDragClient : public DragClient, public Noncopyable {
public:
virtual ~EmptyDragClient() {}
virtual void willPerformDragDestinationAction(DragDestinationAction, DragData*) { }
@@ -469,7 +469,7 @@ public:
};
#endif // ENABLE(DRAG_SUPPORT)
-class EmptyInspectorClient : public InspectorClient {
+class EmptyInspectorClient : public InspectorClient, public Noncopyable {
public:
virtual ~EmptyInspectorClient() { }
diff --git a/WebCore/loader/FTPDirectoryDocument.cpp b/WebCore/loader/FTPDirectoryDocument.cpp
index ee0f4ca..7a71d02 100644
--- a/WebCore/loader/FTPDirectoryDocument.cpp
+++ b/WebCore/loader/FTPDirectoryDocument.cpp
@@ -43,7 +43,7 @@
#if PLATFORM(QT)
#include <QDateTime>
// On Windows, use the threadsafe *_r functions provided by pthread.
-#elif PLATFORM(WIN_OS) && (USE(PTHREADS) || HAVE(PTHREAD_H))
+#elif OS(WINDOWS) && (USE(PTHREADS) || HAVE(PTHREAD_H))
#include <pthread.h>
#endif
@@ -234,7 +234,7 @@ static struct tm *localTimeQt(const time_t *const timep, struct tm *result)
}
#define localtime_r(x, y) localTimeQt(x, y)
-#elif PLATFORM(WIN_OS) && !defined(localtime_r)
+#elif OS(WINDOWS) && !defined(localtime_r)
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
#define localtime_r(x, y) localtime_s((y), (x))
#else /* !_MSC_VER */
diff --git a/WebCore/loader/FTPDirectoryParser.cpp b/WebCore/loader/FTPDirectoryParser.cpp
index 40bd714..34c19a4 100644
--- a/WebCore/loader/FTPDirectoryParser.cpp
+++ b/WebCore/loader/FTPDirectoryParser.cpp
@@ -27,7 +27,7 @@
#if PLATFORM(QT)
#include <QDateTime>
// On Windows, use the threadsafe *_r functions provided by pthread.
-#elif PLATFORM(WIN_OS) && (USE(PTHREADS) || HAVE(PTHREAD_H))
+#elif OS(WINDOWS) && (USE(PTHREADS) || HAVE(PTHREAD_H))
#include <pthread.h>
#endif
@@ -49,7 +49,7 @@ static struct tm *gmtimeQt(const time_t *const timep, struct tm *result)
}
#define gmtime_r(x, y) gmtimeQt(x, y)
-#elif PLATFORM(WIN_OS) && !defined(gmtime_r)
+#elif OS(WINDOWS) && !defined(gmtime_r)
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
#define gmtime_r(x, y) gmtime_s((y), (x))
#else /* !_MSC_VER */
@@ -1185,7 +1185,7 @@ FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& res
} /* time/year */
- // there is exacly 1 space between filename and previous token in all
+ // there is exactly 1 space between filename and previous token in all
// outputs except old Hellsoft
if (!isOldHellsoft)
result.filename = tokens[tokmarker+3] + toklen[tokmarker+3] + 1;
diff --git a/WebCore/loader/FormState.cpp b/WebCore/loader/FormState.cpp
index bd37086..552789a 100644
--- a/WebCore/loader/FormState.cpp
+++ b/WebCore/loader/FormState.cpp
@@ -34,16 +34,17 @@
namespace WebCore {
-inline FormState::FormState(PassRefPtr<HTMLFormElement> form, StringPairVector& textFieldValuesToAdopt, PassRefPtr<Frame> sourceFrame)
+inline FormState::FormState(PassRefPtr<HTMLFormElement> form, StringPairVector& textFieldValuesToAdopt, PassRefPtr<Frame> sourceFrame, FormSubmissionTrigger formSubmissionTrigger)
: m_form(form)
, m_sourceFrame(sourceFrame)
+ , m_formSubmissionTrigger(formSubmissionTrigger)
{
m_textFieldValues.swap(textFieldValuesToAdopt);
}
-PassRefPtr<FormState> FormState::create(PassRefPtr<HTMLFormElement> form, StringPairVector& textFieldValuesToAdopt, PassRefPtr<Frame> sourceFrame)
+PassRefPtr<FormState> FormState::create(PassRefPtr<HTMLFormElement> form, StringPairVector& textFieldValuesToAdopt, PassRefPtr<Frame> sourceFrame, FormSubmissionTrigger formSubmissionTrigger)
{
- return adoptRef(new FormState(form, textFieldValuesToAdopt, sourceFrame));
+ return adoptRef(new FormState(form, textFieldValuesToAdopt, sourceFrame, formSubmissionTrigger));
}
}
diff --git a/WebCore/loader/FormState.h b/WebCore/loader/FormState.h
index 03317b1..8f7166e 100644
--- a/WebCore/loader/FormState.h
+++ b/WebCore/loader/FormState.h
@@ -36,22 +36,29 @@ namespace WebCore {
class Frame;
class HTMLFormElement;
+ enum FormSubmissionTrigger {
+ SubmittedByJavaScript,
+ NotSubmittedByJavaScript
+ };
+
typedef Vector<std::pair<String, String> > StringPairVector;
class FormState : public RefCounted<FormState> {
public:
- static PassRefPtr<FormState> create(PassRefPtr<HTMLFormElement>, StringPairVector& textFieldValuesToAdopt, PassRefPtr<Frame>);
+ static PassRefPtr<FormState> create(PassRefPtr<HTMLFormElement>, StringPairVector& textFieldValuesToAdopt, PassRefPtr<Frame>, FormSubmissionTrigger);
HTMLFormElement* form() const { return m_form.get(); }
const StringPairVector& textFieldValues() const { return m_textFieldValues; }
Frame* sourceFrame() const { return m_sourceFrame.get(); }
+ FormSubmissionTrigger formSubmissionTrigger() const { return m_formSubmissionTrigger; }
private:
- FormState(PassRefPtr<HTMLFormElement>, StringPairVector& textFieldValuesToAdopt, PassRefPtr<Frame>);
+ FormState(PassRefPtr<HTMLFormElement>, StringPairVector& textFieldValuesToAdopt, PassRefPtr<Frame>, FormSubmissionTrigger);
RefPtr<HTMLFormElement> m_form;
StringPairVector m_textFieldValues;
RefPtr<Frame> m_sourceFrame;
+ FormSubmissionTrigger m_formSubmissionTrigger;
};
}
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index e07ee92..b88485e 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -37,7 +37,11 @@
#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size
#include "Archive.h"
#include "ArchiveFactory.h"
+<<<<<<< HEAD
#endif
+=======
+#include "BackForwardList.h"
+>>>>>>> webkit.org at r54127
#include "CString.h"
#include "Cache.h"
#include "CachedPage.h"
@@ -416,6 +420,12 @@ Frame* FrameLoader::loadSubframe(HTMLFrameOwnerElement* ownerElement, const KURL
return 0;
}
+ // All new frames will have m_isComplete set to true at this point due to synchronously loading
+ // an empty document in FrameLoader::init(). But many frames will now be starting an
+ // asynchronous load of url, so we set m_isComplete to false and then check if the load is
+ // actually completed below. (Note that we set m_isComplete to false even for synchronous
+ // loads, so that checkCompleted() below won't bail early.)
+ // FIXME: Can we remove this entirely? m_isComplete normally gets set to false when a load is committed.
frame->loader()->m_isComplete = false;
RenderObject* renderer = ownerElement->renderer();
@@ -425,16 +435,17 @@ Frame* FrameLoader::loadSubframe(HTMLFrameOwnerElement* ownerElement, const KURL
checkCallImplicitClose();
+ // Some loads are performed synchronously (e.g., about:blank and loads
+ // cancelled by returning a null ResourceRequest from requestFromDelegate).
// In these cases, the synchronous load would have finished
// before we could connect the signals, so make sure to send the
- // completed() signal for the child by hand
+ // completed() signal for the child by hand and mark the load as being
+ // complete.
// FIXME: In this case the Frame will have finished loading before
// it's being added to the child list. It would be a good idea to
// create the child first, then invoke the loader separately.
- if (url.isEmpty() || url == blankURL()) {
- frame->loader()->completed();
+ if (frame->loader()->state() == FrameStateComplete)
frame->loader()->checkCompleted();
- }
return frame.get();
}
@@ -577,7 +588,9 @@ void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy, DatabasePolic
#if ENABLE(DATABASE)
if (databasePolicy == DatabasePolicyStop)
- doc->stopDatabases();
+ doc->stopDatabases(0);
+#else
+ UNUSED_PARAM(databasePolicy);
#endif
}
@@ -629,7 +642,8 @@ KURL FrameLoader::iconURL()
return KURL();
KURL url;
- url.setProtocol(m_URL.protocol());
+ bool couldSetProtocol = url.setProtocol(m_URL.protocol());
+ ASSERT_UNUSED(couldSetProtocol, couldSetProtocol);
url.setHost(m_URL.host());
if (m_URL.hasPort())
url.setPort(m_URL.port());
@@ -679,7 +693,7 @@ void FrameLoader::didExplicitOpen()
// Prevent window.open(url) -- eg window.open("about:blank") -- from blowing away results
// from a subsequent window.document.open / window.document.write call.
- // Cancelling redirection here works for all cases because document.open
+ // Canceling redirection here works for all cases because document.open
// implicitly precedes document.write.
m_frame->redirectScheduler()->cancel();
if (m_frame->document()->url() != blankURL())
@@ -846,6 +860,11 @@ void FrameLoader::begin(const KURL& url, bool dispatch, SecurityOrigin* origin)
document->setURL(m_URL);
m_frame->setDocument(document);
+ if (m_pendingStateObject) {
+ document->statePopped(m_pendingStateObject.get());
+ m_pendingStateObject.clear();
+ }
+
if (m_decoder)
document->setDecoder(m_decoder.get());
if (forcedSecurityOrigin)
@@ -1289,8 +1308,8 @@ bool FrameLoader::requestObject(RenderPart* renderer, const String& url, const A
bool useFallback;
if (shouldUsePlugin(completedURL, mimeType, renderer->hasFallbackContent(), useFallback)) {
Settings* settings = m_frame->settings();
- if (!settings || !settings->arePluginsEnabled() ||
- (!settings->isJavaEnabled() && MIMETypeRegistry::isJavaAppletMIMEType(mimeType)))
+ if (!m_client->allowPlugins(settings && settings->arePluginsEnabled())
+ || (!settings->isJavaEnabled() && MIMETypeRegistry::isJavaAppletMIMEType(mimeType)))
return false;
if (isSandboxed(SandboxPlugins))
return false;
@@ -1412,7 +1431,7 @@ bool FrameLoader::isMixedContent(SecurityOrigin* context, const KURL& url)
if (context->protocol() != "https")
return false; // We only care about HTTPS security origins.
- if (url.protocolIs("https") || url.protocolIs("about") || url.protocolIs("data"))
+ if (!url.isValid() || url.protocolIs("https") || url.protocolIs("about") || url.protocolIs("data"))
return false; // Loading these protocols is secure.
return true;
@@ -1483,7 +1502,7 @@ void FrameLoader::provisionalLoadStarted()
bool FrameLoader::isProcessingUserGesture()
{
Frame* frame = m_frame->tree()->top();
- if (!frame->script()->isEnabled())
+ if (!frame->script()->canExecuteScripts())
return true; // If JavaScript is disabled, a user gesture must have initiated the navigation.
return frame->script()->processingUserGesture(); // FIXME: Use pageIsProcessingUserGesture.
}
@@ -2358,6 +2377,8 @@ void FrameLoader::stopAllLoaders(DatabasePolicy databasePolicy)
m_documentLoader->clearArchiveResources();
#endif
+ m_checkTimer.stop();
+
m_inStopAllLoaders = false;
}
@@ -2581,10 +2602,13 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
case FrameLoadTypeBack:
case FrameLoadTypeBackWMLDeckNotAccessible:
case FrameLoadTypeIndexedBackForward:
- if (Page* page = m_frame->page())
+ if (Page* page = m_frame->page()) {
if (page->backForwardList()) {
history()->updateForBackForwardNavigation();
+ if (history()->currentItem())
+ m_pendingStateObject = history()->currentItem()->stateObject();
+
// Create a document view for this document, or used the cached view.
if (cachedPage) {
DocumentLoader* cachedDocumentLoader = cachedPage->documentLoader();
@@ -2595,6 +2619,7 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
} else
m_client->transitionToCommittedForNewPage();
}
+ }
break;
case FrameLoadTypeReload:
@@ -2719,7 +2744,7 @@ void FrameLoader::open(CachedPage& cachedPage)
closeURL();
// Delete old status bar messages (if it _was_ activated on last URL).
- if (m_frame->script()->isEnabled()) {
+ if (m_frame->script()->canExecuteScripts()) {
m_frame->setJSStatusBarText(String());
m_frame->setJSDefaultStatusBarText(String());
}
@@ -2947,6 +2972,9 @@ CachePolicy FrameLoader::subresourceCachePolicy() const
if (m_loadType == FrameLoadTypeReload)
return CachePolicyRevalidate;
+ if (request.cachePolicy() == ReturnCacheDataElseLoad)
+ return CachePolicyAllowStale;
+
return CachePolicyVerify;
}
@@ -2986,6 +3014,10 @@ void FrameLoader::checkLoadCompleteForThisFrame()
stopLoadingSubframes();
pdl->stopLoading();
+ // If we're in the middle of loading multipart data, we need to restore the document loader.
+ if (isReplacing() && !m_documentLoader.get())
+ setDocumentLoader(m_provisionalDocumentLoader.get());
+
// Finish resetting the load state, but only if another load hasn't been started by the
// delegate callback.
if (pdl == m_provisionalDocumentLoader)
@@ -3191,6 +3223,10 @@ void FrameLoader::tokenizerProcessedData()
void FrameLoader::handledOnloadEvents()
{
m_client->dispatchDidHandleOnloadEvents();
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+ if (documentLoader())
+ documentLoader()->applicationCacheHost()->stopDeferringEvents();
+#endif
}
void FrameLoader::frameDetached()
@@ -3266,7 +3302,8 @@ void FrameLoader::addExtraFieldsToRequest(ResourceRequest& request, FrameLoadTyp
request.setCachePolicy(ReloadIgnoringCacheData);
request.setHTTPHeaderField("Cache-Control", "no-cache");
request.setHTTPHeaderField("Pragma", "no-cache");
- }
+ } else if (isBackForwardLoadType(loadType) && !request.url().protocolIs("https"))
+ request.setCachePolicy(ReturnCacheDataElseLoad);
if (mainResource)
request.setHTTPAccept(defaultAcceptHeader);
@@ -3745,7 +3782,7 @@ Frame* FrameLoader::findFrameForNavigation(const AtomicString& name)
void FrameLoader::navigateWithinDocument(HistoryItem* item)
{
- ASSERT(!item->document() || item->document() == m_frame->document());
+ ASSERT(item->documentSequenceNumber() == history()->currentItem()->documentSequenceNumber());
// Save user view state to the current history item here since we don't do a normal load.
// FIXME: Does form state need to be saved here too?
@@ -3759,9 +3796,6 @@ void FrameLoader::navigateWithinDocument(HistoryItem* item)
loadInSameDocument(item->url(), item->stateObject(), false);
// Restore user view state from the current history item here since we don't do a normal load.
- // Even though we just manually set the current history item, this ASSERT verifies nothing
- // inside of loadInSameDocument() caused it to change.
- ASSERT(history()->currentItem() == item);
history()->restoreScrollPositionAndViewState();
}
@@ -3869,7 +3903,7 @@ void FrameLoader::loadItem(HistoryItem* item, FrameLoadType loadType)
// - The HistoryItem has a history state object
// - Navigating to an anchor within the page, with no form data stored on the target item or the current history entry,
// and the URLs in the frame tree match the history item for fragment scrolling.
- bool sameDocumentNavigation = (!item->formData() && !(history()->currentItem() && history()->currentItem()->formData()) && history()->urlsMatchItem(item)) || item->document() == m_frame->document();
+ bool sameDocumentNavigation = (!item->formData() && !(history()->currentItem() && history()->currentItem()->formData()) && history()->urlsMatchItem(item)) || item->documentSequenceNumber() == history()->currentItem()->documentSequenceNumber();
#if ENABLE(WML)
// All WML decks should go through the real load mechanism, not the scroll-to-anchor code
@@ -3957,7 +3991,7 @@ void FrameLoader::dispatchDocumentElementAvailable()
void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
{
- if (!m_frame->script()->isEnabled())
+ if (!m_frame->script()->canExecuteScripts())
return;
Vector<DOMWrapperWorld*> worlds;
@@ -3968,7 +4002,7 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
void FrameLoader::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* world)
{
- if (!m_frame->script()->isEnabled() || !m_frame->script()->existingWindowShell(world))
+ if (!m_frame->script()->canExecuteScripts() || !m_frame->script()->existingWindowShell(world))
return;
m_client->dispatchDidClearWindowObjectInWorld(world);
@@ -3996,14 +4030,14 @@ void FrameLoader::updateSandboxFlags()
if (m_sandboxFlags == flags)
return;
-
+
m_sandboxFlags = flags;
m_frame->document()->updateSandboxFlags();
for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling())
child->loader()->updateSandboxFlags();
- }
+}
PassRefPtr<Widget> FrameLoader::createJavaAppletWidget(const IntSize& size, HTMLAppletElement* element, const HashMap<String, String>& args)
{
diff --git a/WebCore/loader/FrameLoader.h b/WebCore/loader/FrameLoader.h
index 875736f..aa1913c 100644
--- a/WebCore/loader/FrameLoader.h
+++ b/WebCore/loader/FrameLoader.h
@@ -257,7 +257,7 @@ public:
void dispatchDocumentElementAvailable();
void ownerElementSandboxFlagsChanged() { updateSandboxFlags(); }
-
+
bool isSandboxed(SandboxFlags mask) const { return m_sandboxFlags & mask; }
SandboxFlags sandboxFlags() const { return m_sandboxFlags; }
@@ -494,6 +494,8 @@ private:
bool m_isComplete;
bool m_isLoadingMainResource;
+ RefPtr<SerializedScriptValue> m_pendingStateObject;
+
KURL m_URL;
KURL m_workingURL;
diff --git a/WebCore/loader/FrameLoaderClient.h b/WebCore/loader/FrameLoaderClient.h
index 434e163..2668958 100644
--- a/WebCore/loader/FrameLoaderClient.h
+++ b/WebCore/loader/FrameLoaderClient.h
@@ -260,6 +260,8 @@ namespace WebCore {
virtual void didChangeScrollOffset() { }
virtual bool allowJavaScript(bool enabledPerSettings) { return enabledPerSettings; }
+ virtual bool allowPlugins(bool enabledPerSettings) { return enabledPerSettings; }
+ virtual bool allowImages(bool enabledPerSettings) { return enabledPerSettings; }
};
} // namespace WebCore
diff --git a/WebCore/loader/FrameLoaderTypes.h b/WebCore/loader/FrameLoaderTypes.h
index af3dde4..8288bce 100644
--- a/WebCore/loader/FrameLoaderTypes.h
+++ b/WebCore/loader/FrameLoaderTypes.h
@@ -102,6 +102,11 @@ namespace WebCore {
SandboxScripts = 1 << 4,
SandboxAll = -1 // Mask with all bits set to 1.
};
+
+ enum SecurityCheckPolicy {
+ SkipSecurityCheck,
+ DoSecurityCheck
+ };
typedef int SandboxFlags;
}
diff --git a/WebCore/loader/HistoryController.cpp b/WebCore/loader/HistoryController.cpp
index d30b231..43c9979 100644
--- a/WebCore/loader/HistoryController.cpp
+++ b/WebCore/loader/HistoryController.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "HistoryController.h"
+#include "BackForwardList.h"
#include "CachedPage.h"
#include "CString.h"
#include "DocumentLoader.h"
@@ -105,6 +106,10 @@ void HistoryController::restoreScrollPositionAndViewState()
void HistoryController::updateBackForwardListForFragmentScroll()
{
updateBackForwardListClippedAtTarget(false);
+
+ // Since the document isn't changed as a result of a fragment scroll, we should
+ // preserve the DocumentSequenceNumber of the previous item.
+ m_currentItem->setDocumentSequenceNumber(m_previousItem->documentSequenceNumber());
}
void HistoryController::saveDocumentState()
@@ -631,14 +636,16 @@ void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject,
// Get a HistoryItem tree for the current frame tree.
RefPtr<HistoryItem> item = createItemTree(m_frame, false);
+ ASSERT(item->isTargetItem());
// Override data in the target item to reflect the pushState() arguments.
- HistoryItem* targetItem = item->targetItem();
- ASSERT(targetItem->isTargetItem());
- targetItem->setDocument(m_frame->document());
- targetItem->setTitle(title);
- targetItem->setStateObject(stateObject);
- targetItem->setURLString(urlString);
+ item->setTitle(title);
+ item->setStateObject(stateObject);
+ item->setURLString(urlString);
+
+ // Since the document isn't changed as a result of a pushState call, we
+ // should preserve the DocumentSequenceNumber of the previous item.
+ item->setDocumentSequenceNumber(m_previousItem->documentSequenceNumber());
page->backForwardList()->pushStateItem(item.release());
}
@@ -649,10 +656,7 @@ void HistoryController::replaceState(PassRefPtr<SerializedScriptValue> stateObje
ASSERT(page);
HistoryItem* current = page->backForwardList()->currentItem();
ASSERT(current);
-
- ASSERT(!current->document() || current->document() == m_frame->document());
- current->setDocument(m_frame->document());
-
+
if (!urlString.isEmpty())
current->setURLString(urlString);
current->setTitle(title);
diff --git a/WebCore/loader/ImageDocument.cpp b/WebCore/loader/ImageDocument.cpp
index 9b5598d..2f564cc 100644
--- a/WebCore/loader/ImageDocument.cpp
+++ b/WebCore/loader/ImageDocument.cpp
@@ -33,6 +33,7 @@
#include "EventNames.h"
#include "Frame.h"
#include "FrameLoader.h"
+#include "FrameLoaderClient.h"
#include "FrameView.h"
#include "HTMLImageElement.h"
#include "HTMLNames.h"
@@ -115,8 +116,13 @@ void ImageTokenizer::write(const SegmentedString&, bool)
bool ImageTokenizer::writeRawData(const char*, int)
{
+ Frame* frame = m_doc->frame();
+ Settings* settings = frame->settings();
+ if (!frame->loader()->client()->allowImages(!settings || settings->areImagesEnabled()))
+ return false;
+
CachedImage* cachedImage = m_doc->cachedImage();
- cachedImage->data(m_doc->frame()->loader()->documentLoader()->mainResourceData(), false);
+ cachedImage->data(frame->loader()->documentLoader()->mainResourceData(), false);
m_doc->imageChanged();
diff --git a/WebCore/loader/ImageLoader.cpp b/WebCore/loader/ImageLoader.cpp
index e09d574..9c237cd 100644
--- a/WebCore/loader/ImageLoader.cpp
+++ b/WebCore/loader/ImageLoader.cpp
@@ -1,7 +1,7 @@
/*
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2007, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 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
@@ -186,7 +186,7 @@ void ImageLoader::notifyFinished(CachedResource*)
void ImageLoader::updateRenderer()
{
if (RenderObject* renderer = m_element->renderer()) {
- if (!renderer->isImage())
+ if (!renderer->isImage() && !renderer->isVideo())
return;
RenderImage* imageRenderer = toRenderImage(renderer);
@@ -231,9 +231,13 @@ void ImageLoader::dispatchPendingLoadEvent()
dispatchLoadEvent();
}
-void ImageLoader::dispatchPendingEvents()
+void ImageLoader::dispatchPendingBeforeLoadEvents()
{
beforeLoadEventSender().dispatchPendingEvents();
+}
+
+void ImageLoader::dispatchPendingLoadEvents()
+{
loadEventSender().dispatchPendingEvents();
}
diff --git a/WebCore/loader/ImageLoader.h b/WebCore/loader/ImageLoader.h
index 7f42e33..e7463d5 100644
--- a/WebCore/loader/ImageLoader.h
+++ b/WebCore/loader/ImageLoader.h
@@ -56,7 +56,8 @@ public:
bool haveFiredBeforeLoadEvent() const { return m_firedBeforeLoad; }
bool haveFiredLoadEvent() const { return m_firedLoad; }
- static void dispatchPendingEvents();
+ static void dispatchPendingBeforeLoadEvents();
+ static void dispatchPendingLoadEvents();
protected:
virtual void notifyFinished(CachedResource*);
diff --git a/WebCore/loader/MainResourceLoader.cpp b/WebCore/loader/MainResourceLoader.cpp
index c37daef..3e75880 100644
--- a/WebCore/loader/MainResourceLoader.cpp
+++ b/WebCore/loader/MainResourceLoader.cpp
@@ -38,6 +38,9 @@
#include "FrameLoaderClient.h"
#include "HTMLFormElement.h"
#include "Page.h"
+#if PLATFORM(QT)
+#include "PluginDatabase.h"
+#endif
#include "ResourceError.h"
#include "ResourceHandle.h"
#include "Settings.h"
@@ -279,6 +282,29 @@ void MainResourceLoader::continueAfterContentPolicy(PolicyAction policy)
deref(); // balances ref in didReceiveResponse
}
+#if PLATFORM(QT)
+void MainResourceLoader::substituteMIMETypeFromPluginDatabase(const ResourceResponse& r)
+{
+ if (!m_frame->settings()->arePluginsEnabled())
+ return;
+
+ String filename = r.url().lastPathComponent();
+ if (filename.endsWith("/"))
+ return;
+
+ int extensionPos = filename.reverseFind('.');
+ if (extensionPos == -1)
+ return;
+
+ String extension = filename.substring(extensionPos + 1);
+ String mimeType = PluginDatabase::installedPlugins()->MIMETypeForExtension(extension);
+ if (!mimeType.isEmpty()) {
+ ResourceResponse* response = const_cast<ResourceResponse*>(&r);
+ response->setMimeType(mimeType);
+ }
+}
+#endif
+
void MainResourceLoader::didReceiveResponse(const ResourceResponse& r)
{
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
@@ -301,6 +327,11 @@ void MainResourceLoader::didReceiveResponse(const ResourceResponse& r)
ASSERT(shouldLoadAsEmptyDocument(r.url()) || !defersLoading());
#endif
+#if PLATFORM(QT)
+ if (r.mimeType() == "application/octet-stream")
+ substituteMIMETypeFromPluginDatabase(r);
+#endif
+
if (m_loadingMultipartContent) {
frameLoader()->setupForReplaceByMIMEType(r.mimeType());
clearResourceData();
diff --git a/WebCore/loader/MainResourceLoader.h b/WebCore/loader/MainResourceLoader.h
index 1d5be45..eaaf2e8 100644
--- a/WebCore/loader/MainResourceLoader.h
+++ b/WebCore/loader/MainResourceLoader.h
@@ -92,6 +92,10 @@ namespace WebCore {
static void callContinueAfterContentPolicy(void*, PolicyAction);
void continueAfterContentPolicy(PolicyAction);
void continueAfterContentPolicy(PolicyAction, const ResourceResponse&);
+
+#if PLATFORM(QT)
+ void substituteMIMETypeFromPluginDatabase(const ResourceResponse&);
+#endif
ResourceRequest m_initialRequest;
SubstituteData m_substituteData;
diff --git a/WebCore/loader/PlaceholderDocument.cpp b/WebCore/loader/PlaceholderDocument.cpp
index af14c72..81222b3 100644
--- a/WebCore/loader/PlaceholderDocument.cpp
+++ b/WebCore/loader/PlaceholderDocument.cpp
@@ -35,11 +35,6 @@ void PlaceholderDocument::attach()
{
ASSERT(!attached());
- if (!styleSelector()) {
- RefPtr<StyleSheetList> styleSheetList = StyleSheetList::create(this);
- setStyleSelector(new CSSStyleSelector(this, styleSheetList.get(), 0, pageUserSheet(), pageGroupUserSheets(), true, false));
- }
-
// Skipping Document::attach().
ContainerNode::attach();
}
diff --git a/WebCore/loader/PlaceholderDocument.h b/WebCore/loader/PlaceholderDocument.h
index a759266..5b76a9c 100644
--- a/WebCore/loader/PlaceholderDocument.h
+++ b/WebCore/loader/PlaceholderDocument.h
@@ -40,7 +40,7 @@ public:
virtual void attach();
private:
- PlaceholderDocument(Frame* frame) : Document(frame, false) { }
+ PlaceholderDocument(Frame* frame) : Document(frame, false, false) { }
};
} // namespace WebCore
diff --git a/WebCore/loader/RedirectScheduler.cpp b/WebCore/loader/RedirectScheduler.cpp
index f2202cc..4b44422 100644
--- a/WebCore/loader/RedirectScheduler.cpp
+++ b/WebCore/loader/RedirectScheduler.cpp
@@ -32,13 +32,16 @@
#include "config.h"
#include "RedirectScheduler.h"
+#include "BackForwardList.h"
#include "DocumentLoader.h"
#include "Event.h"
#include "FormState.h"
#include "Frame.h"
#include "FrameLoadRequest.h"
#include "FrameLoader.h"
+#include "HistoryItem.h"
#include "HTMLFormElement.h"
+#include "HTMLFrameOwnerElement.h"
#include "Page.h"
#include <wtf/CurrentTime.h>
@@ -218,7 +221,13 @@ void RedirectScheduler::scheduleFormSubmission(const FrameLoadRequest& frameRequ
// This may happen when a frame changes the location of another frame.
bool duringLoad = !m_frame->loader()->committedFirstRealDocumentLoad();
- schedule(new ScheduledRedirection(frameRequest, lockHistory, mustLockBackForwardList(m_frame), event, formState, duringLoad));
+ // If this is a child frame and the form submission was triggered by a script, lock the back/forward list
+ // to match IE and Opera.
+ // See https://bugs.webkit.org/show_bug.cgi?id=32383 for the original motivation for this.
+
+ bool lockBackForwardList = mustLockBackForwardList(m_frame) || (formState->formSubmissionTrigger() == SubmittedByJavaScript && m_frame->tree()->parent());
+
+ schedule(new ScheduledRedirection(frameRequest, lockHistory, lockBackForwardList, event, formState, duringLoad));
}
void RedirectScheduler::scheduleRefresh(bool wasUserGesture)
@@ -258,11 +267,23 @@ void RedirectScheduler::scheduleHistoryNavigation(int steps)
// Invalid history navigations (such as history.forward() during a new load) have the side effect of cancelling any scheduled
// redirects. We also avoid the possibility of cancelling the current load by avoiding the scheduled redirection altogether.
- if (!m_frame->page()->canGoBackOrForward(steps)) {
- cancel();
- return;
- }
-
+ HistoryItem* specifiedEntry = m_frame->page()->backForwardList()->itemAtIndex(steps);
+ if (!specifiedEntry) {
+ cancel();
+ return;
+ }
+
+#if !ENABLE(HISTORY_ALWAYS_ASYNC)
+ // If the specified entry and the current entry have the same document, 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->documentSequenceNumber() == specifiedEntry->documentSequenceNumber()) {
+ m_frame->loader()->history()->goToItem(specifiedEntry, FrameLoadTypeIndexedBackForward);
+ return;
+ }
+#endif
+
+ // In all other cases, schedule the history traversal to occur asynchronously.
schedule(new ScheduledRedirection(steps));
}
diff --git a/WebCore/loader/Request.cpp b/WebCore/loader/Request.cpp
index 7791a48..630a4bb 100644
--- a/WebCore/loader/Request.cpp
+++ b/WebCore/loader/Request.cpp
@@ -28,12 +28,12 @@
namespace WebCore {
-Request::Request(DocLoader* docLoader, CachedResource* object, bool incremental, bool shouldSkipCanLoadCheck, bool sendResourceLoadCallbacks)
+Request::Request(DocLoader* docLoader, CachedResource* object, bool incremental, SecurityCheckPolicy shouldDoSecurityCheck, bool sendResourceLoadCallbacks)
: m_object(object)
, m_docLoader(docLoader)
, m_incremental(incremental)
, m_multipart(false)
- , m_shouldSkipCanLoadCheck(shouldSkipCanLoadCheck)
+ , m_shouldDoSecurityCheck(shouldDoSecurityCheck)
, m_sendResourceLoadCallbacks(sendResourceLoadCallbacks)
{
m_object->setRequest(this);
diff --git a/WebCore/loader/Request.h b/WebCore/loader/Request.h
index 1e02d77..468f8ff 100644
--- a/WebCore/loader/Request.h
+++ b/WebCore/loader/Request.h
@@ -23,6 +23,7 @@
#ifndef Request_h
#define Request_h
+#include "FrameLoaderTypes.h"
#include <wtf/Vector.h>
namespace WebCore {
@@ -32,7 +33,7 @@ namespace WebCore {
class Request : public Noncopyable {
public:
- Request(DocLoader*, CachedResource*, bool incremental, bool skipCanLoadCheck, bool sendResourceLoadCallbacks);
+ Request(DocLoader*, CachedResource*, bool incremental, SecurityCheckPolicy, bool sendResourceLoadCallbacks);
~Request();
Vector<char>& buffer() { return m_buffer; }
@@ -45,7 +46,7 @@ namespace WebCore {
bool isMultipart() { return m_multipart; }
void setIsMultipart(bool b = true) { m_multipart = b; }
- bool shouldSkipCanLoadCheck() const { return m_shouldSkipCanLoadCheck; }
+ SecurityCheckPolicy shouldDoSecurityCheck() const { return m_shouldDoSecurityCheck; }
bool sendResourceLoadCallbacks() const { return m_sendResourceLoadCallbacks; }
private:
@@ -54,7 +55,7 @@ namespace WebCore {
DocLoader* m_docLoader;
bool m_incremental;
bool m_multipart;
- bool m_shouldSkipCanLoadCheck;
+ SecurityCheckPolicy m_shouldDoSecurityCheck;
bool m_sendResourceLoadCallbacks;
};
diff --git a/WebCore/loader/ResourceLoader.cpp b/WebCore/loader/ResourceLoader.cpp
index fcc9f61..95ce209 100644
--- a/WebCore/loader/ResourceLoader.cpp
+++ b/WebCore/loader/ResourceLoader.cpp
@@ -320,7 +320,7 @@ void ResourceLoader::didCancel(const ResourceError& error)
// load itself to be cancelled (which could happen with a javascript that
// changes the window location). This is used to prevent both the body
// of this method and the body of connectionDidFinishLoading: running
- // for a single delegate. Cancelling wins.
+ // for a single delegate. Canceling wins.
m_cancelled = true;
if (m_handle)
diff --git a/WebCore/loader/SubresourceLoader.cpp b/WebCore/loader/SubresourceLoader.cpp
index 2ee4626..f92a074 100644
--- a/WebCore/loader/SubresourceLoader.cpp
+++ b/WebCore/loader/SubresourceLoader.cpp
@@ -61,18 +61,18 @@ SubresourceLoader::~SubresourceLoader()
#endif
}
-PassRefPtr<SubresourceLoader> SubresourceLoader::create(Frame* frame, SubresourceLoaderClient* client, const ResourceRequest& request, bool skipCanLoadCheck, bool sendResourceLoadCallbacks, bool shouldContentSniff)
+PassRefPtr<SubresourceLoader> SubresourceLoader::create(Frame* frame, SubresourceLoaderClient* client, const ResourceRequest& request, SecurityCheckPolicy securityCheck, bool sendResourceLoadCallbacks, bool shouldContentSniff)
{
if (!frame)
return 0;
FrameLoader* fl = frame->loader();
- if (!skipCanLoadCheck && (fl->state() == FrameStateProvisional || fl->activeDocumentLoader()->isStopping()))
+ if (securityCheck == DoSecurityCheck && (fl->state() == FrameStateProvisional || fl->activeDocumentLoader()->isStopping()))
return 0;
ResourceRequest newRequest = request;
- if (!skipCanLoadCheck
+ if (securityCheck == DoSecurityCheck
&& SecurityOrigin::restrictAccessToLocal()
&& !SecurityOrigin::canLoad(request.url(), String(), frame->document())) {
FrameLoader::reportLocalLoadFailed(frame, request.url().string());
diff --git a/WebCore/loader/SubresourceLoader.h b/WebCore/loader/SubresourceLoader.h
index 1a94c73..907d917 100644
--- a/WebCore/loader/SubresourceLoader.h
+++ b/WebCore/loader/SubresourceLoader.h
@@ -28,7 +28,8 @@
#ifndef SubresourceLoader_h
#define SubresourceLoader_h
-
+
+#include "FrameLoaderTypes.h"
#include "ResourceLoader.h"
namespace WebCore {
@@ -38,7 +39,7 @@ namespace WebCore {
class SubresourceLoader : public ResourceLoader {
public:
- static PassRefPtr<SubresourceLoader> create(Frame*, SubresourceLoaderClient*, const ResourceRequest&, bool skipCanLoadCheck = false, bool sendResourceLoadCallbacks = true, bool shouldContentSniff = true);
+ static PassRefPtr<SubresourceLoader> create(Frame*, SubresourceLoaderClient*, const ResourceRequest&, SecurityCheckPolicy = DoSecurityCheck, bool sendResourceLoadCallbacks = true, bool shouldContentSniff = true);
void clearClient() { m_client = 0; }
diff --git a/WebCore/loader/WorkerThreadableLoader.cpp b/WebCore/loader/WorkerThreadableLoader.cpp
index bd362f4..6837ca1 100644
--- a/WebCore/loader/WorkerThreadableLoader.cpp
+++ b/WebCore/loader/WorkerThreadableLoader.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -147,7 +147,7 @@ void WorkerThreadableLoader::MainThreadBridge::mainThreadCancel(ScriptExecutionC
void WorkerThreadableLoader::MainThreadBridge::cancel()
{
m_loaderProxy.postTaskToLoader(createCallbackTask(&MainThreadBridge::mainThreadCancel, this));
- ThreadableLoaderClientWrapper* clientWrapper = static_cast<ThreadableLoaderClientWrapper*>(m_workerClientWrapper.get());
+ ThreadableLoaderClientWrapper* clientWrapper = m_workerClientWrapper.get();
if (!clientWrapper->done()) {
// If the client hasn't reached a termination state, then transition it by sending a cancellation error.
// Note: no more client callbacks will be done after this method -- the clearClientWrapper() call ensures that.
@@ -160,7 +160,7 @@ void WorkerThreadableLoader::MainThreadBridge::cancel()
void WorkerThreadableLoader::MainThreadBridge::clearClientWrapper()
{
- static_cast<ThreadableLoaderClientWrapper*>(m_workerClientWrapper.get())->clearClient();
+ m_workerClientWrapper->clearClient();
}
static void workerContextDidSendData(ScriptExecutionContext* context, RefPtr<ThreadableLoaderClientWrapper> workerClientWrapper, unsigned long long bytesSent, unsigned long long totalBytesToBeSent)
diff --git a/WebCore/loader/WorkerThreadableLoader.h b/WebCore/loader/WorkerThreadableLoader.h
index 86083f5..09f8f85 100644
--- a/WebCore/loader/WorkerThreadableLoader.h
+++ b/WebCore/loader/WorkerThreadableLoader.h
@@ -82,7 +82,7 @@ namespace WebCore {
//
// all cases. All tasks posted from the worker context's thread are ok because
// the last task posted always is "mainThreadDestroy", so MainThreadBridge is
- // around for all tasks that use it on the mian thread.
+ // around for all tasks that use it on the main thread.
//
// case 1. worker.terminate is called.
// In this case, no more tasks are posted from the worker object's thread to the worker
@@ -124,7 +124,7 @@ namespace WebCore {
// ThreadableLoaderClientWrapper is to be used on the worker context thread.
// The ref counting is done on either thread.
- RefPtr<ThreadSafeShared<ThreadableLoaderClientWrapper> > m_workerClientWrapper;
+ RefPtr<ThreadableLoaderClientWrapper> m_workerClientWrapper;
// May be used on either thread.
WorkerLoaderProxy& m_loaderProxy;
diff --git a/WebCore/loader/appcache/ApplicationCacheGroup.cpp b/WebCore/loader/appcache/ApplicationCacheGroup.cpp
index 7398ef4..c8a485a 100644
--- a/WebCore/loader/appcache/ApplicationCacheGroup.cpp
+++ b/WebCore/loader/appcache/ApplicationCacheGroup.cpp
@@ -32,6 +32,7 @@
#include "ApplicationCacheHost.h"
#include "ApplicationCacheResource.h"
#include "ApplicationCacheStorage.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "DocumentLoader.h"
#include "DOMApplicationCache.h"
diff --git a/WebCore/loader/appcache/ApplicationCacheHost.cpp b/WebCore/loader/appcache/ApplicationCacheHost.cpp
index 751efc1..fc98746 100644
--- a/WebCore/loader/appcache/ApplicationCacheHost.cpp
+++ b/WebCore/loader/appcache/ApplicationCacheHost.cpp
@@ -46,6 +46,7 @@ namespace WebCore {
ApplicationCacheHost::ApplicationCacheHost(DocumentLoader* documentLoader)
: m_domApplicationCache(0)
, m_documentLoader(documentLoader)
+ , m_defersEvents(true)
, m_candidateApplicationCacheGroup(0)
{
ASSERT(m_documentLoader);
@@ -229,6 +230,11 @@ void ApplicationCacheHost::setDOMApplicationCache(DOMApplicationCache* domApplic
void ApplicationCacheHost::notifyDOMApplicationCache(EventID id)
{
+ if (m_defersEvents) {
+ // Events are deferred until document.onload has fired.
+ m_deferredEvents.append(id);
+ return;
+ }
if (m_domApplicationCache) {
ExceptionCode ec = 0;
m_domApplicationCache->dispatchEvent(Event::create(DOMApplicationCache::toEventType(id), false, false), ec);
@@ -236,6 +242,21 @@ void ApplicationCacheHost::notifyDOMApplicationCache(EventID id)
}
}
+void ApplicationCacheHost::stopDeferringEvents()
+{
+ RefPtr<DocumentLoader> protect(documentLoader());
+ for (unsigned i = 0; i < m_deferredEvents.size(); ++i) {
+ EventID id = m_deferredEvents[i];
+ if (m_domApplicationCache) {
+ ExceptionCode ec = 0;
+ m_domApplicationCache->dispatchEvent(Event::create(DOMApplicationCache::toEventType(id), false, false), ec);
+ ASSERT(!ec);
+ }
+ }
+ m_deferredEvents.clear();
+ m_defersEvents = false;
+}
+
void ApplicationCacheHost::setCandidateApplicationCacheGroup(ApplicationCacheGroup* group)
{
ASSERT(!m_applicationCache);
diff --git a/WebCore/loader/appcache/ApplicationCacheHost.h b/WebCore/loader/appcache/ApplicationCacheHost.h
index 9c355de..52d4d40 100644
--- a/WebCore/loader/appcache/ApplicationCacheHost.h
+++ b/WebCore/loader/appcache/ApplicationCacheHost.h
@@ -33,6 +33,7 @@
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+#include <wtf/Deque.h>
#include <wtf/OwnPtr.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
@@ -110,12 +111,16 @@ namespace WebCore {
void setDOMApplicationCache(DOMApplicationCache* domApplicationCache);
void notifyDOMApplicationCache(EventID id);
+ void stopDeferringEvents(); // Also raises the events that have been queued up.
+
private:
bool isApplicationCacheEnabled();
DocumentLoader* documentLoader() { return m_documentLoader; }
DOMApplicationCache* m_domApplicationCache;
DocumentLoader* m_documentLoader;
+ bool m_defersEvents; // Events are deferred until after document onload.
+ Vector<EventID> m_deferredEvents;
#if PLATFORM(CHROMIUM)
friend class ApplicationCacheHostInternal;
diff --git a/WebCore/loader/appcache/ApplicationCacheStorage.cpp b/WebCore/loader/appcache/ApplicationCacheStorage.cpp
index d6ee723..1e97d78 100644
--- a/WebCore/loader/appcache/ApplicationCacheStorage.cpp
+++ b/WebCore/loader/appcache/ApplicationCacheStorage.cpp
@@ -405,7 +405,7 @@ int64_t ApplicationCacheStorage::spaceNeeded(int64_t cacheToSave)
totalAvailableSize = (m_maximumSize - currentSize) + m_database.freeSpaceSize();
}
- // The space needed to be freed in order to accomodate the failed cache is
+ // The space needed to be freed in order to accommodate the failed cache is
// the size of the failed cache minus any already available free space.
spaceNeeded = cacheToSave - totalAvailableSize;
// The space needed value must be positive (or else the total already
diff --git a/WebCore/loader/appcache/DOMApplicationCache.cpp b/WebCore/loader/appcache/DOMApplicationCache.cpp
index 29c1bd5..b9297b1 100644
--- a/WebCore/loader/appcache/DOMApplicationCache.cpp
+++ b/WebCore/loader/appcache/DOMApplicationCache.cpp
@@ -42,7 +42,6 @@ namespace WebCore {
DOMApplicationCache::DOMApplicationCache(Frame* frame)
: m_frame(frame)
{
- ASSERT(!m_frame || applicationCacheHost());
ApplicationCacheHost* cacheHost = applicationCacheHost();
if (cacheHost)
cacheHost->setDOMApplicationCache(this);
@@ -87,8 +86,9 @@ void DOMApplicationCache::swapCache(ExceptionCode& ec)
ScriptExecutionContext* DOMApplicationCache::scriptExecutionContext() const
{
- ASSERT(m_frame);
- return m_frame->document();
+ if (m_frame)
+ return m_frame->document();
+ return 0;
}
const AtomicString& DOMApplicationCache::toEventType(ApplicationCacheHost::EventID id)
diff --git a/WebCore/loader/appcache/DOMApplicationCache.idl b/WebCore/loader/appcache/DOMApplicationCache.idl
index dd5468a..9c3a359 100644
--- a/WebCore/loader/appcache/DOMApplicationCache.idl
+++ b/WebCore/loader/appcache/DOMApplicationCache.idl
@@ -27,7 +27,8 @@ module offline {
interface [
Conditional=OFFLINE_WEB_APPLICATIONS,
- EventTarget
+ EventTarget,
+ OmitConstructor
] DOMApplicationCache {
// update status
const unsigned short UNCACHED = 0;
diff --git a/WebCore/loader/loader.cpp b/WebCore/loader/loader.cpp
index c98a2f0..d693341 100644
--- a/WebCore/loader/loader.cpp
+++ b/WebCore/loader/loader.cpp
@@ -117,14 +117,15 @@ Loader::Priority Loader::determinePriority(const CachedResource* resource) const
#endif
}
-void Loader::load(DocLoader* docLoader, CachedResource* resource, bool incremental, bool skipCanLoadCheck, bool sendResourceLoadCallbacks)
+void Loader::load(DocLoader* docLoader, CachedResource* resource, bool incremental, SecurityCheckPolicy securityCheck, bool sendResourceLoadCallbacks)
{
ASSERT(docLoader);
- Request* request = new Request(docLoader, resource, incremental, skipCanLoadCheck, sendResourceLoadCallbacks);
+ Request* request = new Request(docLoader, resource, incremental, securityCheck, sendResourceLoadCallbacks);
RefPtr<Host> host;
KURL url(ParsedURLString, resource->url());
if (url.protocolInHTTPFamily()) {
+ m_hosts.checkConsistency();
AtomicString hostName = url.host();
host = m_hosts.get(hostName.impl());
if (!host) {
@@ -169,6 +170,7 @@ void Loader::servePendingRequests(Priority minimumPriority)
m_nonHTTPProtocolHost->servePendingRequests(minimumPriority);
Vector<Host*> hostsToServe;
+ m_hosts.checkConsistency();
HostMap::iterator i = m_hosts.begin();
HostMap::iterator end = m_hosts.end();
for (;i != end; ++i)
@@ -205,6 +207,7 @@ void Loader::nonCacheRequestInFlight(const KURL& url)
return;
AtomicString hostName = url.host();
+ m_hosts.checkConsistency();
RefPtr<Host> host = m_hosts.get(hostName.impl());
if (!host) {
host = Host::create(hostName, maxRequestsInFlightPerHost);
@@ -220,6 +223,7 @@ void Loader::nonCacheRequestComplete(const KURL& url)
return;
AtomicString hostName = url.host();
+ m_hosts.checkConsistency();
RefPtr<Host> host = m_hosts.get(hostName.impl());
ASSERT(host);
if (!host)
@@ -236,6 +240,7 @@ void Loader::cancelRequests(DocLoader* docLoader)
m_nonHTTPProtocolHost->cancelRequests(docLoader);
Vector<Host*> hostsToCancel;
+ m_hosts.checkConsistency();
HostMap::iterator i = m_hosts.begin();
HostMap::iterator end = m_hosts.end();
for (;i != end; ++i)
@@ -347,7 +352,7 @@ void Loader::Host::servePendingRequests(RequestQueue& requestsPending, bool& ser
}
RefPtr<SubresourceLoader> loader = SubresourceLoader::create(docLoader->doc()->frame(),
- this, resourceRequest, request->shouldSkipCanLoadCheck(), request->sendResourceLoadCallbacks());
+ this, resourceRequest, request->shouldDoSecurityCheck(), request->sendResourceLoadCallbacks());
if (loader) {
m_requestsLoading.add(loader.release(), request);
request->cachedResource()->setRequestedFromNetworkingLayer();
diff --git a/WebCore/loader/loader.h b/WebCore/loader/loader.h
index d0a526f..a9de032 100644
--- a/WebCore/loader/loader.h
+++ b/WebCore/loader/loader.h
@@ -24,6 +24,7 @@
#include "AtomicString.h"
#include "AtomicStringImpl.h"
+#include "FrameLoaderTypes.h"
#include "PlatformString.h"
#include "SubresourceLoaderClient.h"
#include "Timer.h"
@@ -43,7 +44,7 @@ namespace WebCore {
Loader();
~Loader();
- void load(DocLoader*, CachedResource*, bool incremental = true, bool skipCanLoadCheck = false, bool sendResourceLoadCallbacks = true);
+ void load(DocLoader*, CachedResource*, bool incremental = true, SecurityCheckPolicy = DoSecurityCheck, bool sendResourceLoadCallbacks = true);
void cancelRequests(DocLoader*);
diff --git a/WebCore/manual-tests/animation/transitions-and-paused-animations.html b/WebCore/manual-tests/animation/transitions-and-paused-animations.html
new file mode 100644
index 0000000..388d837
--- /dev/null
+++ b/WebCore/manual-tests/animation/transitions-and-paused-animations.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Transitions and paused animations</title>
+ <style type="text/css" media="screen">
+
+ .container {
+ height: 200px;
+ width: 200px;
+ border: 1px solid black;
+ -webkit-transition: -webkit-transform 0.5s;
+ }
+
+ .moved {
+ -webkit-transform: translateX(100px);
+
+ }
+ .box {
+ position: relative;
+ height: 100px;
+ width: 100px;
+ margin: 50px;
+ background-color: blue;
+ -webkit-transform: translateZ(0);
+ -webkit-animation: fade 1s infinite linear alternate;
+ }
+
+ .moved .box {
+ -webkit-animation-play-state: paused;
+ }
+
+ @-webkit-keyframes fade {
+ from { -webkit-transform: rotate(-20deg); }
+ to { -webkit-transform: rotate(20deg); }
+ }
+ </style>
+ <script type="text/javascript" charset="utf-8">
+
+ function runTest()
+ {
+ var box = document.querySelectorAll('.box')[0];
+ var container = document.querySelectorAll('.container')[0];
+
+ window.setTimeout(function() {
+ container.className = 'container';
+ }, 250);
+
+ window.setTimeout(function() {
+ container.className = 'container moved';
+ }, 1500);
+
+ window.setTimeout(function() {
+ container.className = 'container';
+ }, 3000);
+ }
+
+ window.addEventListener('load', runTest, false)
+ </script>
+</head>
+<body>
+
+<p>Box should animate smoothly left, then right then left again, and not jump at the end.</p>
+<div class="container moved">
+ <div class="box"></div>
+</div>
+
+</body>
+</html>
diff --git a/WebCore/manual-tests/chromium/select-close-popup-value-change.html b/WebCore/manual-tests/chromium/select-close-popup-value-change.html
new file mode 100644
index 0000000..f2adf61
--- /dev/null
+++ b/WebCore/manual-tests/chromium/select-close-popup-value-change.html
@@ -0,0 +1,20 @@
+<html>
+<head>
+</head>
+<body>
+ <p>Do the following, the test passes if the select keeps the selected value after step 4, fails if the value reverted.</p>
+ <ul>
+ <li>1. Click the select to open the popup list.</li>
+ <li>2. Use keyboard to select a value by pressing the first letter of the value.</li>
+ <li>3. Click the select again to close the popup list, it should stay at the value from step 2.</li>
+ <li>4. Click anywhere else on the page to move the focus out of the select.</li>
+ </ul>
+
+ <select>
+ <option>0</option>
+ <option>1</option>
+ <option>2</option>
+ <option>3</option>
+ </select>
+</body>
+</html>
diff --git a/WebCore/manual-tests/debugger-caught-uncaught-exceptions.html b/WebCore/manual-tests/debugger-caught-uncaught-exceptions.html
new file mode 100644
index 0000000..d812ca6
--- /dev/null
+++ b/WebCore/manual-tests/debugger-caught-uncaught-exceptions.html
@@ -0,0 +1,35 @@
+<html>
+ <head>
+ <script>
+ function generateUncaughtException() {
+ var b = 5;
+ // Pause on uncaught exceptions and pause on all exceptions should pause here,
+ // because even though the exception is being caught by our caller in this case,
+ // it is not being caught in the same function.
+ b.foo.bar;
+ }
+
+ function generateCaughtAndUncaughtExceptions() {
+ var a = 5;
+ try {
+ // This will pause on Pause on all exceptions, but not Pause on uncaught exceptions.
+ a.foo.bar;
+ } catch (e) { }
+
+ try {
+ generateUncaughtException();
+ } catch (e) { }
+
+ // This will pause on both Pause on all exceptions and Pause on uncaught exceptions.
+ a.foo.bar;
+ }
+ </script>
+ </head>
+ <body>
+ <p>This page tests <a href="https://bugs.webkit.org/show_bug.cgi?id=28622">Caught exceptions still pause the debugger</a>
+ <p>To test this bug, open the inspector, open the scripts panel, and click the button to pause on all exceptions, press
+ the button, and see which exceptions are paused on. Then press the pause on exceptions button again to only
+ pause on uncaught exceptions, and see which exceptions are paused on.</p>
+ <input type="button" value="Generate caught and uncaught exceptions" onclick="generateCaughtAndUncaughtExceptions();" />
+ </body>
+</html>
diff --git a/WebCore/manual-tests/inspector/debugger-scopes-inspection.html b/WebCore/manual-tests/inspector/debugger-scopes-inspection.html
new file mode 100644
index 0000000..f06b3e7
--- /dev/null
+++ b/WebCore/manual-tests/inspector/debugger-scopes-inspection.html
@@ -0,0 +1,35 @@
+<script>
+
+var obj = {
+ objField: 30
+};
+
+function handleLoad(e) {
+ new C().m();
+}
+
+function C() {
+ this.a = 10;
+ this.timestamp = Date.now();
+}
+
+C.prototype.m = function() {
+ this.timestamp = Date.now();
+ with (obj) {
+ debugger;
+ objField++;
+ }
+ var self = this;
+ setTimeout(function() {
+ self.m();
+ }, 1000);
+};
+
+
+</script>
+<body onload="handleLoad(event)">
+
+<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34161"> Bug 34161 - Local scope is shown as With scope in scope chain pane </a>.</p>
+<p>To test, open the Inspector and start a debugging session. In a second debugger will pause. While paused look at scope chain pane. There should be three scopes: 'With scope' containing objField variable, 'Local scope' with this and self variables and 'Global scope'. All scopes but 'Global' should be expanced. 'Global' scope should be collapsed(it takes too long to expand DOMWindow so we prefer to do it on demand). </p>
+</body>
+
diff --git a/WebCore/manual-tests/qt/qtplugin-scrolling.html b/WebCore/manual-tests/qt/qtplugin-scrolling.html
new file mode 100644
index 0000000..8503832
--- /dev/null
+++ b/WebCore/manual-tests/qt/qtplugin-scrolling.html
@@ -0,0 +1,32 @@
+<html>
+<head>
+<style>
+ #spacer {
+ width: 100%;
+ height: 1000px;
+ background-color: yellow;
+ }
+</style>
+</head>
+<body>
+
+<p>
+ Scroll the page, ensure that the two labels move nicely along with the rest of the document.
+</p>
+
+<div>
+<object type="application/x-qt-plugin" classid="alien_QLabel" name="label1" height="30"></object>
+</div>
+
+<div>
+<object type="application/x-qt-plugin" classid="QLabel" name="label2" height="30"></object>
+</div>
+
+<div id="spacer"><p>&nbsp;</p></div>
+
+<script>
+document.label1.setText("Label one");
+document.label2.setText("Label two");
+</script>
+</body>
+</html>
diff --git a/WebCore/manual-tests/resources/textarea-form-back-on-submit.html b/WebCore/manual-tests/resources/textarea-form-back-on-submit.html
new file mode 100644
index 0000000..2348e2d
--- /dev/null
+++ b/WebCore/manual-tests/resources/textarea-form-back-on-submit.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<title>Form with a textarea that goes back on submit</title>
+</head>
+<body>
+<form id="form" method="get" action="data:text/html,<body onload='history.back()'></body>">
+ <p>
+ <textarea name="text" rows="3" cols="10" id="textarea">123</textarea><br />
+ <br />
+ <input type="submit" />
+ <input type="reset" />
+ </p>
+</form>
+
+</body>
+</html>
diff --git a/WebCore/manual-tests/select-delete-item.html b/WebCore/manual-tests/select-delete-item.html
new file mode 100644
index 0000000..43ca0c3
--- /dev/null
+++ b/WebCore/manual-tests/select-delete-item.html
@@ -0,0 +1,21 @@
+<html>
+<head>
+ <title>RenderMenuList::itemStyle Select Element Crash</title>
+ <script>
+ function removeItem() {
+ var select = document.getElementById("dropDown");
+ select.removeChild(document.getElementsByTagName("option")[2]);
+ }
+ </script>
+</head>
+<body>
+ <select id="dropDown" onfocus="setTimeout('removeItem();', 2000);">
+ <option>Option 1</option>
+ <option>Option 2</option>
+ <option>Option 3</option>
+ </select>
+ <p>This is a test for bug <a href="http://webkit.org/b/34182">34182</a> Crash in WebKit!WebCore::RenderMenuList::itemStyle.
+ Once the select gets focus, in 2 seconds it will delete an item. This test passes
+ if you have the select open when it deletes an item, and doesn't crash.</p>
+</body>
+</html>
diff --git a/WebCore/manual-tests/select-webkit-appearance-off-narrow-select.html b/WebCore/manual-tests/select-webkit-appearance-off-narrow-select.html
new file mode 100644
index 0000000..34e4681
--- /dev/null
+++ b/WebCore/manual-tests/select-webkit-appearance-off-narrow-select.html
@@ -0,0 +1,49 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>Padding on select with webkit-appearance: off</title>
+ <style type="text/css">
+ #webkit-appearance-none {
+ -webkit-appearance: none;
+ border: 1px solid black;
+ width: 15px;
+ padding-left: 5px;
+ padding-right: 5px;
+ }
+
+ #narrow-with-border {
+ border: 1px solid black;
+ width: 40px;
+ }
+ </style>
+</head>
+
+<body>
+ <p>This is a manual test for <a href="https://bugs.webkit.org/show_bug.cgi?id=33235">Padding in popup
+ menu gets lost with styled select in Windows</a></p>
+ <p>To open the selects, click inside the select boxes below.</p>
+
+ <p>The options in this selects should have padding on both the left and the right, the edges of
+ the text should not be pressed against the edges of the opened select.</p>
+ <select id="webkit-appearance-none">
+ <option href="#">Do Action ABCDEFG</option>
+ <option href="#">Do Action ABCDEFG</option>
+ <option href="#">Do Action ABCDEFG</option>
+ <option href="#">Do Action ABCDEFG</option>
+ <hr />
+ <option href="#">Do Action ABCDEFG</option>
+ <option href="#">Do Action ABCDEFG</option>
+ </select>
+
+ <p>The options in this select should not have too much padding on the right</p>
+ <select id="narrow-with-border">
+ <option href="#">Do Action ABCDEFG</option>
+ <option href="#">Do Action ABCDEFG</option>
+ <option href="#">Do Action ABCDEFG</option>
+ <option href="#">Do Action ABCDEFG</option>
+ <hr />
+ <option href="#">Do Action ABCDEFG</option>
+ <option href="#">Do Action ABCDEFG</option>
+ </select>
+</body>
+</html>
diff --git a/WebCore/manual-tests/svg-crash-hovering-use.svg b/WebCore/manual-tests/svg-crash-hovering-use.svg
new file mode 100644
index 0000000..029b23b
--- /dev/null
+++ b/WebCore/manual-tests/svg-crash-hovering-use.svg
@@ -0,0 +1,30 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg id="svg" viewBox="0 0 100 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<defs>
+ <rect id="rect" width="60" height="10"/>
+</defs>
+
+<text x="30" y="30" transform="scale(0.2 0.2)">Hover over the rectangle - it should not crash</text>
+<use id="use" x="20" y="10" xlink:href="#rect" />
+
+<script>
+<![CDATA[
+ var svg = document.getElementById("svg");
+ var use = document.getElementById("use");
+
+ function addUseElement() {
+ svg.appendChild(use, true);
+ setTimeout(removeUseElement, 50);
+ }
+
+ function removeUseElement() {
+ use.parentElement.removeChild(use);
+ setTimeout(addUseElement, 50);
+ }
+
+ document.addEventListener("DOMNodeInserted", function() {}, true);
+ removeUseElement();
+]]>
+</script>
+</svg>
diff --git a/WebCore/manual-tests/svg-node-count-vs-scroll.xhtml b/WebCore/manual-tests/svg-node-count-vs-scroll.xhtml
new file mode 100644
index 0000000..1890a53
--- /dev/null
+++ b/WebCore/manual-tests/svg-node-count-vs-scroll.xhtml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xml:lang="en">
+ <head>
+ <title>SVG Scrolling Performance depends on #node is Safari?</title>
+
+ <script type="text/javascript">
+ <![CDATA[
+
+ var SVG_NS = 'http://www.w3.org/2000/svg';
+
+ function init() {
+ var nodeCount = parseInt(prompt('# <rect> to generate? ', 50000));
+
+ var svgRoot = document.createElementNS(SVG_NS, 'svg');
+
+ for (var i = 0; i < nodeCount; i++) {
+ var node = document.createElementNS(SVG_NS, 'rect');
+ node.setAttribute('x', i);
+ node.setAttribute('y', i);
+ node.setAttribute('width', 1);
+ node.setAttribute('height', i);
+ node.setAttribute('fill', 'red');
+
+ svgRoot.appendChild(node);
+ }
+
+ svgRoot.style.width = nodeCount + 'px';
+ svgRoot.style.height = nodeCount + 'px';
+ document.body.appendChild(svgRoot);
+ }
+
+ ]]>
+ </script>
+ </head>
+
+ <body onload="init()">
+ <h1>SVG Scrolling Performance depends on #node is Safari?</h1>
+ </body>
+</html>
+
diff --git a/WebCore/manual-tests/textarea-reset-default-value.html b/WebCore/manual-tests/textarea-reset-default-value.html
new file mode 100644
index 0000000..1c747b6
--- /dev/null
+++ b/WebCore/manual-tests/textarea-reset-default-value.html
@@ -0,0 +1,24 @@
+<html>
+<head>
+<title>Test for https://bugs.webkit.org/show_bug.cgi?id=31539</title>
+
+<!-- Manual test for https://bugs.webkit.org/show_bug.cgi?id=31539.
+ Ensure that the value and defaultValue on a textarea is restored correctly when
+ we restore form state (e.g. by hitting back after submitting a form). -->
+
+</head>
+<body>
+<h2>Manual test for https://bugs.webkit.org/show_bug.cgi?id=31539.</h2>
+<p>To run this test:</p>
+<ul>
+ <li>Change the text in the &lt;textarea&gt; below.</li>
+ <li>Submit the form. The form should navigate back immediately.</li>
+ <li>Note that the value in the text area matches what you entered before submitting the form, this is correct.</li>
+ <li>Now click the reset button for the form.
+ <li>The text in the &lt;textarea&gt; should now match '123', the default text for the &lt;textarea&gt;.</li>
+</ul>
+
+<iframe src="resources/textarea-form-back-on-submit.html" width="800" height="200" id="frame"></iframe>
+
+</body>
+</html>
diff --git a/WebCore/manual-tests/video-player.html b/WebCore/manual-tests/video-player.html
index 2bced51..74f0a38 100644
--- a/WebCore/manual-tests/video-player.html
+++ b/WebCore/manual-tests/video-player.html
@@ -37,10 +37,7 @@ function stoppedPlaying() {
function updateProgress(ev) {
if (!showProgress)
return;
- if (ev.total)
- playButton.innerHTML = "Loading " + (100*ev.loaded/ev.total).toFixed(0) + "%";
- else
- playButton.innerHTML = "Loading...";
+ playButton.innerHTML = "Loading...";
playButton.className = "videobutton videoloading";
}
function initVideo() {
@@ -90,12 +87,8 @@ function initVideo() {
playButton.addEventListener("click", function () {
if (videoElem.paused) {
if (!videoElem.src)
- //videoElem.src = "sample.mov";
videoElem.src = "http://movies.apple.com/movies/us/apple/ipoditunes/2007/touch/ads/apple_ipodtouch_touch_r640-9cie.mov";
- if (videoElem.readyState == HTMLMediaElement.DATA_UNAVAILABLE)
- videoElem.load();
- if (videoElem.readyState == HTMLMediaElement.CAN_PLAY_THROUGH)
- videoElem.play();
+ videoElem.play();
} else
videoElem.pause();
} );
diff --git a/WebCore/manual-tests/webgl/Earth.html b/WebCore/manual-tests/webgl/Earth.html
deleted file mode 100644
index fa59a20..0000000
--- a/WebCore/manual-tests/webgl/Earth.html
+++ /dev/null
@@ -1,166 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>Canvas3d example</title>
- <script src="resources/CanvasMatrix.js"> </script>
- <script src="resources/utils3d.js"> </script>
-
- <script id="vshader" type="x-shader/x-vertex">
- uniform mat4 u_modelViewMatrix;
- uniform mat4 u_modelViewProjMatrix;
- uniform mat4 u_normalMatrix;
- uniform vec3 lightDir;
-
- attribute vec3 vNormal;
- attribute vec4 vTexCoord;
- attribute vec4 vPosition;
-
- varying float v_Dot;
- varying vec2 v_texCoord;
-
- void main()
- {
- gl_Position = u_modelViewProjMatrix * vPosition;
- v_texCoord = vTexCoord.st;
- vec4 transNormal = u_normalMatrix * vec4(vNormal,1);
- v_Dot = max(dot(transNormal.xyz, lightDir), 0.0);
- }
- </script>
-
- <script id="fshader" type="x-shader/x-fragment">
- uniform sampler2D sampler2d;
-
- varying float v_Dot;
- varying vec2 v_texCoord;
-
- void main()
- {
- vec4 color = texture2D(sampler2d,v_texCoord);
- color += vec4(0.1,0.1,0.1,1);
- gl_FragColor = vec4(color.xyz * v_Dot, color.a);
- }
- </script>
-
- <script>
- function init()
- {
- var gl = initWebGL("example", "vshader", "fshader",
- [ "vNormal", "vTexCoord", "vPosition"],
- [ 0, 0, 0, 1 ], 10000);
-
- gl.uniform3f(gl.getUniformLocation(gl.program, "lightDir"), 0, 0, 1);
- gl.uniform1i(gl.getUniformLocation(gl.program, "sampler2d"), 0);
-
- gl.enable(gl.TEXTURE_2D);
-
- gl.sphere = makeSphere(gl, 1, 30, 30);
-
- // get the images
- earthTexture = loadImageTexture(gl, "resources/earthmap1k.jpg");
- marsTexture = loadImageTexture(gl, "resources/mars500x250.png");
-
- return gl;
- }
-
- width = -1;
- height = -1;
-
- function reshape(ctx)
- {
- var canvas = document.getElementById('example');
- if (canvas.clientWidth == width && canvas.clientHeight == height)
- return;
-
- width = canvas.clientWidth;
- height = canvas.clientHeight;
-
- ctx.viewport(0, 0, width, height);
-
- ctx.perspectiveMatrix = new CanvasMatrix4();
- ctx.perspectiveMatrix.lookat(0,0,6, 0, 0, 0, 0, 1, 0);
- ctx.perspectiveMatrix.perspective(30, width/height, 1, 10000);
- }
-
- function drawOne(ctx, angle, x, y, z, scale, texture)
- {
- // setup VBOs
- ctx.enableVertexAttribArray(0);
- ctx.enableVertexAttribArray(1);
- ctx.enableVertexAttribArray(2);
-
- ctx.bindBuffer(ctx.ARRAY_BUFFER, ctx.sphere.vertexObject);
- ctx.vertexAttribPointer(2, 3, ctx.FLOAT, false, 0, 0);
-
- ctx.bindBuffer(ctx.ARRAY_BUFFER, ctx.sphere.normalObject);
- ctx.vertexAttribPointer(0, 3, ctx.FLOAT, false, 0, 0);
-
- ctx.bindBuffer(ctx.ARRAY_BUFFER, ctx.sphere.texCoordObject);
- ctx.vertexAttribPointer(1, 2, ctx.FLOAT, false, 0, 0);
-
- ctx.bindBuffer(ctx.ELEMENT_ARRAY_BUFFER, ctx.sphere.indexObject);
-
- // generate the model-view matrix
- var mvMatrix = new CanvasMatrix4();
- mvMatrix.scale(scale, scale, scale);
- mvMatrix.rotate(angle, 0,1,0);
- mvMatrix.rotate(30, 1,0,0);
- mvMatrix.translate(x,y,z);
- ctx.uniformMatrix4fv(ctx.getUniformLocation(ctx.program, "u_modelViewMatrix"), false, mvMatrix.getAsCanvasFloatArray());
-
- // construct the normal matrix from the model-view matrix
- var normalMatrix = new CanvasMatrix4(mvMatrix);
- normalMatrix.invert();
- normalMatrix.transpose();
- ctx.uniformMatrix4fv(ctx.getUniformLocation(ctx.program, "u_normalMatrix"), false, normalMatrix.getAsCanvasFloatArray());
-
- // construct the model-view * projection matrix
- var mvpMatrix = new CanvasMatrix4(mvMatrix);
- mvpMatrix.multRight(ctx.perspectiveMatrix);
- ctx.uniformMatrix4fv(ctx.getUniformLocation(ctx.program, "u_modelViewProjMatrix"), false, mvpMatrix.getAsCanvasFloatArray());
-
- ctx.bindTexture(ctx.TEXTURE_2D, texture);
- ctx.drawElements(ctx.TRIANGLES, ctx.sphere.numIndices, ctx.UNSIGNED_SHORT, 0);
- }
-
- function drawPicture(ctx)
- {
- reshape(ctx);
- ctx.clear(ctx.COLOR_BUFFER_BIT | ctx.DEPTH_BUFFER_BIT);
-
- drawOne(ctx, currentAngle, -1, 0, 0, 1, earthTexture);
- drawOne(ctx, -currentAngle, 1, 0, 0, 0.6, marsTexture);
- ctx.flush();
-
- framerate.snapshot();
-
- currentAngle += incAngle;
- if (currentAngle > 360)
- currentAngle -= 360;
- }
-
- function start()
- {
- var ctx = init();
- currentAngle = 0;
- incAngle = 0.2;
- var f = function() { drawPicture(ctx) };
- setInterval(f, 10);
- framerate = new Framerate("framerate");
- }
- </script>
- <style type="text/css">
- canvas {
- border: 2px solid black;
- width:90%;
- height:90%;
- }
- </style>
- </head>
- <body onload="start()">
- <canvas id="example">
- There is supposed to be an example drawing here, but it's not important.
- </canvas>
- <div id="framerate"></div>
- <div id="console"></div>
- </body>
-</html>
diff --git a/WebCore/manual-tests/webgl/ManyPlanetsDeep.html b/WebCore/manual-tests/webgl/ManyPlanetsDeep.html
deleted file mode 100644
index e5bb773..0000000
--- a/WebCore/manual-tests/webgl/ManyPlanetsDeep.html
+++ /dev/null
@@ -1,202 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>Canvas3d example</title>
- <script src="resources/CanvasMatrix.js"> </script>
- <script src="resources/utils3d.js"> </script>
-
- <script id="vshader" type="x-shader/x-vertex">
- uniform mat4 u_modelViewMatrix;
- uniform mat4 u_modelViewProjMatrix;
- uniform mat4 u_normalMatrix;
- uniform vec3 lightDir;
-
- attribute vec3 vNormal;
- attribute vec4 vTexCoord;
- attribute vec4 vPosition;
-
- varying float v_Dot;
- varying vec2 v_texCoord;
-
- void main()
- {
- gl_Position = u_modelViewProjMatrix * vPosition;
- v_texCoord = vTexCoord.st;
- vec4 transNormal = u_normalMatrix * vec4(vNormal,1);
- v_Dot = max(dot(transNormal.xyz, lightDir), 0.0);
- }
- </script>
-
- <script id="fshader" type="x-shader/x-fragment">
- uniform sampler2D sampler2d;
-
- varying float v_Dot;
- varying vec2 v_texCoord;
-
- void main()
- {
- vec4 color = texture2D(sampler2d,v_texCoord);
- color += vec4(0.1,0.1,0.1,1);
- gl_FragColor = vec4(color.xyz * v_Dot, color.a);
- }
- </script>
-
- <script>
- const numRowCols = 4;
- const numLayers = 3;
- const layoutWidth = 10;
- const layoutHeight = 8;
- const globeSize = 25;
- const minIncAngle = 0.2;
- const maxIncAngle = 2;
-
- function init()
- {
- var gl = initWebGL("example", "vshader", "fshader",
- [ "vNormal", "vTexCoord", "vPosition"],
- [ 0, 0, 0, 1 ], 10000);
-
- gl.uniform3f(gl.getUniformLocation(gl.program, "lightDir"), 0, 0, 1);
- gl.uniform1i(gl.getUniformLocation(gl.program, "sampler2d"), 0);
-
- gl.enable(gl.TEXTURE_2D);
-
- gl.sphere = makeSphere(gl, 1, 30, 30);
-
- // get the images
- earthTexture = loadImageTexture(gl, "resources/earthmap1k.jpg");
- marsTexture = loadImageTexture(gl, "resources/mars500x250.png");
-
- return gl;
- }
-
- width = -1;
- height = -1;
-
- function reshape(ctx)
- {
- var canvas = document.getElementById('example');
- if (canvas.clientWidth == width && canvas.clientHeight == height)
- return;
-
- width = canvas.clientWidth;
- height = canvas.clientHeight;
-
- ctx.viewport(0, 0, width, height);
-
- ctx.perspectiveMatrix = new CanvasMatrix4();
- ctx.perspectiveMatrix.lookat(0,0,20, 0, 0, 0, 0, 1, 0);
- ctx.perspectiveMatrix.perspective(30, width/height, 1, 10000);
- }
-
- function drawOne(ctx, angle, x, y, z, scale, texture)
- {
- // setup VBOs
- ctx.enableVertexAttribArray(0);
- ctx.enableVertexAttribArray(1);
- ctx.enableVertexAttribArray(2);
-
- ctx.bindBuffer(ctx.ARRAY_BUFFER, ctx.sphere.vertexObject);
- ctx.vertexAttribPointer(2, 3, ctx.FLOAT, false, 0, 0);
-
- ctx.bindBuffer(ctx.ARRAY_BUFFER, ctx.sphere.normalObject);
- ctx.vertexAttribPointer(0, 3, ctx.FLOAT, false, 0, 0);
-
- ctx.bindBuffer(ctx.ARRAY_BUFFER, ctx.sphere.texCoordObject);
- ctx.vertexAttribPointer(1, 2, ctx.FLOAT, false, 0, 0);
-
- ctx.bindBuffer(ctx.ELEMENT_ARRAY_BUFFER, ctx.sphere.indexObject);
-
- // generate the model-view matrix
- var mvMatrix = new CanvasMatrix4();
- mvMatrix.scale(scale, scale, scale);
- mvMatrix.rotate(angle, 0,1,0);
- mvMatrix.rotate(30, 1,0,0);
- mvMatrix.translate(x,y,z);
- ctx.uniformMatrix4fv(ctx.getUniformLocation(ctx.program, "u_modelViewMatrix"), false, mvMatrix.getAsCanvasFloatArray());
-
- // construct the normal matrix from the model-view matrix
- var normalMatrix = new CanvasMatrix4(mvMatrix);
- normalMatrix.invert();
- normalMatrix.transpose();
- ctx.uniformMatrix4fv(ctx.getUniformLocation(ctx.program, "u_normalMatrix"), false, normalMatrix.getAsCanvasFloatArray());
-
- // construct the model-view * projection matrix
- var mvpMatrix = new CanvasMatrix4(mvMatrix);
- mvpMatrix.multRight(ctx.perspectiveMatrix);
- ctx.uniformMatrix4fv(ctx.getUniformLocation(ctx.program, "u_modelViewProjMatrix"), false, mvpMatrix.getAsCanvasFloatArray());
-
- ctx.bindTexture(ctx.TEXTURE_2D, texture);
- ctx.drawElements(ctx.TRIANGLES, ctx.sphere.numIndices, ctx.UNSIGNED_SHORT, 0);
- }
-
- function drawPicture(ctx)
- {
- reshape(ctx);
- ctx.clear(ctx.COLOR_BUFFER_BIT | ctx.DEPTH_BUFFER_BIT);
-
- var startX = -layoutWidth/2;
- var startY = -layoutHeight/2;
- var startZ = 0;
- var incX = layoutWidth / (numRowCols-1);
- var incY = layoutHeight / (numRowCols-1);
- var incZ = -5;
-
- for (i = 0; i < numLayers; ++i) {
- for (j = 0; j < numRowCols; ++j) {
- for (k = 0; k < numRowCols; ++k) {
- var index = i * numLayers * numRowCols + j * numRowCols + k;
-
- drawOne(ctx, currentAngles[index],
- startX + incX * k,
- startY + incY * j,
- startZ + incZ * i,
- showEarth[index] ? 1 : 0.6, showEarth[index] ? earthTexture : marsTexture);
-
- currentAngles[index] += incAngles[i];
- if (currentAngles[index] > 360)
- currentAngles[index] -= 360;
- }
- }
- }
-
- ctx.bindTexture(ctx.TEXTURE_2D, 0);
- ctx.flush();
-
- framerate.snapshot();
- }
-
- function start()
- {
- var ctx = init();
- currentAngles = [ ];
- incAngles = [ ];
- showEarth = [ ];
-
- for (var i = 0; i < numRowCols * numRowCols * numLayers; ++i) {
- currentAngles[i] = 0;
- incAngles[i] = Math.random() * (maxIncAngle - minIncAngle) + minIncAngle;
- showEarth[i] = Math.random() > 0.5;
- }
-
- framerate = new Framerate("framerate");
-
- var f = function() { drawPicture(ctx) };
- setInterval(f, 10);
- }
- </script>
- <style type="text/css">
- canvas {
- border: 2px solid black;
- width:90%;
- height:90%;
- }
- </style>
- </head>
- <body onload="start()">
- <canvas id="example">
- There is supposed to be an example drawing here, but it's not important.
- </canvas>
- <div id="framerate"></div>
- </body>
-</html>
diff --git a/WebCore/manual-tests/webgl/SpinningBox.html b/WebCore/manual-tests/webgl/SpinningBox.html
deleted file mode 100644
index e68711c..0000000
--- a/WebCore/manual-tests/webgl/SpinningBox.html
+++ /dev/null
@@ -1,149 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>Canvas3d example</title>
- <script src="resources/CanvasMatrix.js"> </script>
- <script src="resources/utils3d.js"> </script>
- <script id="vshader" type="x-shader/x-vertex">
- uniform mat4 pMatrix;
- uniform mat4 mvMatrix;
- uniform vec3 lightDir;
-
- attribute vec3 vNormal;
- attribute vec4 vColor;
- attribute vec4 vPosition;
-
- varying float v_Dot;
-
- void main()
- {
- gl_FrontColor = vColor;
- vec4 transNormal = mvMatrix * vec4(vNormal,1);
- v_Dot = max(dot(transNormal.xyz, lightDir), 0.0);
- gl_Position = pMatrix * mvMatrix * vPosition;
- }
- </script>
-
- <script id="fshader" type="x-shader/x-fragment">
- varying float v_Dot;
-
- void main()
- {
- gl_FragColor = vec4(gl_Color.xyz * v_Dot, gl_Color.a);
- }
- </script>
-
- <script>
- function init()
- {
- var gl = initWebGL("example", "vshader", "fshader",
- [ "vNormal", "vColor", "vPosition"],
- [ 0, 0, 0, 1 ], 10000);
-
- gl.uniform3f(gl.getUniformLocation(gl.program, "lightDir"), 0, 0, 1);
-
- gl.box = makeBox(gl);
-
- // color array
- var colors = new WebGLUnsignedByteArray(
- [ 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, // v0-v1-v2-v3 front
- 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, // v0-v3-v4-v5 right
- 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, // v0-v5-v6-v1 top
- 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, // v1-v6-v7-v2 left
- 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, // v7-v4-v3-v2 bottom
- 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1 ] // v4-v7-v6-v5 back
- );
-
- gl.box.colorObject = gl.createBuffer();
- gl.bindBuffer(gl.ARRAY_BUFFER, gl.box.colorObject);
- gl.bufferData(gl.ARRAY_BUFFER, colors, gl.STATIC_DRAW);
-
- return gl;
- }
-
- width = -1;
- height = -1;
-
- function reshape(gl)
- {
- var canvas = document.getElementById('example');
- if (canvas.clientWidth == width && canvas.clientHeight == height)
- return;
-
- width = canvas.clientWidth;
- height = canvas.clientHeight;
-
- gl.viewport(0, 0, width, height);
- var pMatrix = new CanvasMatrix4();
- pMatrix.lookat(0,0,10, 0, 0, 0, 0, 1, 0);
- pMatrix.perspective(30, width/height, 1, 10000);
- gl.uniformMatrix4fv(gl.getUniformLocation(gl.program, "pMatrix"), false, pMatrix.getAsCanvasFloatArray());
- }
-
- function drawPicture(gl)
- {
- reshape(gl);
- gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-
- var mvMatrix = new CanvasMatrix4();
- mvMatrix.rotate(currentAngle, 0,1,0);
- mvMatrix.rotate(20, 1,0,0);
- gl.uniformMatrix4fv(gl.getUniformLocation(gl.program, "mvMatrix"), false, mvMatrix.getAsCanvasFloatArray());
-
- gl.enableVertexAttribArray(0);
- gl.enableVertexAttribArray(1);
- gl.enableVertexAttribArray(2);
-
- gl.bindBuffer(gl.ARRAY_BUFFER, gl.box.vertexObject);
- gl.vertexAttribPointer(2, 3, gl.FLOAT, false, 0, 0);
-
- gl.bindBuffer(gl.ARRAY_BUFFER, gl.box.normalObject);
- gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
-
- gl.bindBuffer(gl.ARRAY_BUFFER, gl.box.colorObject);
- gl.vertexAttribPointer(1, 4, gl.UNSIGNED_BYTE, false, 0, 0);
-
- gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, gl.box.indexObject);
- gl.drawElements(gl.TRIANGLES, gl.box.numIndices, gl.UNSIGNED_BYTE, 0);
-
- gl.flush();
-
- framerate.snapshot();
-
- currentAngle += incAngle;
- if (currentAngle > 360)
- currentAngle -= 360;
- }
-
- function start()
- {
- var gl = init();
- currentAngle = 0;
- incAngle = 0.5;
- framerate = new Framerate("framerate");
- setInterval(function() { drawPicture(gl) }, 10);
- }
- </script>
- <style type="text/css">
- canvas {
- border: 2px solid black;
- width:90%;
- height:90%;
- }
- .text {
- position:absolute;
- top:100px;
- left:20px;
- font-size:2em;
- color: blue;
- }
- </style>
- </head>
- <body onload="start()">
- <canvas id="example">
- There is supposed to be an example drawing here, but it's not important.
- </canvas>
- <div class="text">This is some text under the canvas</div>
- <div id="framerate"></div>
- </body>
-</html>
diff --git a/WebCore/manual-tests/webgl/TeapotPerPixel.html b/WebCore/manual-tests/webgl/TeapotPerPixel.html
deleted file mode 100644
index 6274c8b..0000000
--- a/WebCore/manual-tests/webgl/TeapotPerPixel.html
+++ /dev/null
@@ -1,332 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>Canvas3d example</title>
- <script src="resources/CanvasMatrix.js"> </script>
- <script src="resources/utils3d.js"> </script>
- <script id="vshader" type="x-shader/x-vertex">
- /*
- Copyright (c) 2008 Seneca College
- Licenced under the MIT License (http://www.c3dl.org/index.php/mit-license/)
- */
-
- // We need to create our own light structure since we can't access
- // the light() function in the 2.0 context.
- struct Light
- {
- vec4 ambient;
- vec4 diffuse;
- vec4 specular;
- vec4 position;
-
- vec3 halfVector;
- };
-
- struct Material
- {
- vec4 emission;
- vec4 ambient;
- vec4 diffuse;
- vec4 specular;
- float shininess;
- };
-
- //
- // vertex attributes
- //
- attribute vec4 a_vertex;
- attribute vec3 a_normal;
- attribute vec4 a_texCoord;
-
- // for every model we multiply the projection, view and model matrices
- // once to prevent having to do it for every vertex, however we still need
- // the view matrix to calculate lighting.
- uniform mat4 u_modelViewMatrix;
-
- // we can calculate this once per model to speed up processing done on the js side.
- uniform mat4 u_modelViewProjMatrix;
-
- // matrix to transform the vertex normals
- uniform mat4 u_normalMatrix;
-
- // custom light structures need to be used since we don't have access to
- // light states.
- uniform Light u_light;
-
- // material
- uniform vec4 u_globalAmbientColor;
- uniform Material u_frontMaterial;
- uniform Material u_backMaterial;
-
- // passed to fragment shader
- varying vec4 v_diffuse, v_ambient;
- varying vec3 v_normal, v_lightDir;
- varying vec2 v_texCoord;
-
- /*
- Given a reference to the ambient and diffuse lighting variables,
- this function will calculate how much each component contributes to the scene.
-
- Light light - the light in view space
- vec3 normal -
- vec4 ambient -
- vec4 diffuse -
- */
- vec3 directionalLight(inout vec4 ambient, inout vec4 diffuse)
- {
- ambient += u_light.ambient;
- diffuse += u_light.diffuse;
- return normalize(vec3(u_light.position));
- }
-
- void main()
- {
- v_normal = normalize(u_normalMatrix * vec4(a_normal, 1)).xyz;
-
- vec4 ambient = vec4(0.0, 0.0, 0.0, 1.0);
- vec4 diffuse = vec4(0.0, 0.0, 0.0, 1.0);
- vec4 specular = vec4(0.0, 0.0, 0.0, 1.0);
-
- // place the current vertex into view space
- // ecPos = eye coordinate position.
- vec4 ecPos4 = u_modelViewMatrix * a_vertex;
-
- // the current vertex in eye coordinate space
- vec3 ecPos = ecPos4.xyz/ecPos4.w;
- v_lightDir = directionalLight(ambient, diffuse);
-
- v_ambient = u_frontMaterial.ambient * ambient;
- v_ambient += u_globalAmbientColor * u_frontMaterial.ambient;
- v_diffuse = u_frontMaterial.diffuse * diffuse;
-
- gl_Position = u_modelViewProjMatrix * a_vertex;
- v_texCoord = a_texCoord.st;
- }
- </script>
-
- <script id="fshader" type="x-shader/x-fragment">
- struct Light
- {
- vec4 ambient;
- vec4 diffuse;
- vec4 specular;
- vec4 position;
-
- vec3 halfVector;
- };
-
- struct Material
- {
- vec4 emission;
- vec4 ambient;
- vec4 diffuse;
- vec4 specular;
- float shininess;
- };
-
- uniform sampler2D u_sampler2d;
- uniform Light u_light;
- uniform Material u_frontMaterial;
- uniform Material u_backMaterial;
-
- varying vec4 v_diffuse, v_ambient;
- varying vec3 v_normal, v_lightDir;
- varying vec2 v_texCoord;
-
- void main()
- {
- vec4 color = v_diffuse;
-
- vec3 n = normalize(v_normal);
-
- Light light = u_light;
- vec3 lightDir = v_lightDir;
- float nDotL = max(dot(n, lightDir), 0.0);
- if (nDotL > 0.0) {
- color = vec4(color.rgb * nDotL, color.a);
- float nDotHV = max(dot(n, light.halfVector), 0.0);
- vec4 specular = u_frontMaterial.specular * light.specular;
- color += vec4(specular.rgb * pow(nDotHV, u_frontMaterial.shininess), specular.a);
- }
-
- gl_FragColor = color + v_ambient;
- }
- </script>
-
- <script>
- console.log("Hello");
- function setDirectionalLight(ctx, program, eyeVector, direction, ambient, diffuse, specular)
- {
- var lightString = "u_light.";
-
- ctx.uniform4f(ctx.getUniformLocation(program, lightString+"ambient"),
- ambient[0], ambient[1], ambient[2], ambient[3]);
- ctx.uniform4f(ctx.getUniformLocation(program, lightString+"diffuse"),
- diffuse[0], diffuse[1], diffuse[2], diffuse[3]);
- ctx.uniform4f(ctx.getUniformLocation(program, lightString+"specular"),
- specular[0], specular[1], specular[2], specular[3]);
- ctx.uniform4f(ctx.getUniformLocation(program, lightString+"position"),
- direction[0], direction[1], direction[2], direction[3]);
-
- // compute the half vector
- var halfVector = [ eyeVector[0] + direction[0], eyeVector[1] + direction[1], eyeVector[2] + direction[2] ];
- var length = Math.sqrt(halfVector[0] * halfVector[0] +
- halfVector[1] * halfVector[1] +
- halfVector[2] * halfVector[2]);
- if (length == 0)
- halfVector = [ 0, 0, 1 ];
- else {
- halfVector[0] /= length;
- halfVector[1] /= length;
- halfVector[2] /= length;
- }
-
- ctx.uniform3f(ctx.getUniformLocation(program, lightString+"halfVector"),
- halfVector[0], halfVector[1], halfVector[2]);
- }
-
- function setMaterial(ctx, program, emission, ambient, diffuse, specular, shininess)
- {
- var matString = "u_frontMaterial.";
- ctx.uniform4f(ctx.getUniformLocation(program, matString+"emission"),
- emission[0], emission[1], emission[2], emission[3]);
- ctx.uniform4f(ctx.getUniformLocation(program, matString+"ambient"),
- ambient[0], ambient[1], ambient[2], ambient[3]);
- ctx.uniform4f(ctx.getUniformLocation(program, matString+"diffuse"),
- diffuse[0], diffuse[1], diffuse[2], diffuse[3]);
- ctx.uniform4f(ctx.getUniformLocation(program, matString+"specular"),
- specular[0], specular[1], specular[2], specular[3]);
- ctx.uniform1f(ctx.getUniformLocation(program, matString+"shininess"), shininess);
- }
-
- function init()
- {
- var gl = initWebGL("example", "vshader", "fshader",
- [ "a_normal", "a_texCoord", "a_vertex"],
- [ 0, 0, 0, 1 ], 10000);
-
- gl.uniform1i(gl.getUniformLocation(gl.program, "u_sampler2d"), 0);
- gl.uniform4f(gl.getUniformLocation(gl.program, "u_globalAmbientColor"), 0.2, 0.2, 0.2, 1);
-
- setDirectionalLight(gl, gl.program,
- [ 0, 0, 1 ], // eyeVector
- [0, 0, 1, 1], // position
- [0.1, 0.1, 0.1, 1], // ambient
- [1, 1, 1, 1], // diffuse
- [1, 1, 1, 1]); // specular
-
- setMaterial(gl, gl.program,
- [ 0, 0, 0, 0 ], // emission
- [ 0.1, 0.1, 0.1, 1 ], // ambient
- [ 0.8, 0.2, 0, 1 ], // diffuse
- [ 0, 0, 1, 1 ], // specular
- 32); // shininess
-
- obj = loadObj(gl, "resources/teapot.obj");
-
- mvMatrix = new CanvasMatrix4();
- normalMatrix = new CanvasMatrix4();
-
- return gl;
- }
-
- width = -1;
- height = -1;
- loaded = false;
-
- function reshape(ctx)
- {
- var canvas = document.getElementById('example');
- if (canvas.clientWidth == width && canvas.clientHeight == height)
- return;
-
- width = canvas.clientWidth;
- height = canvas.clientHeight;
-
- ctx.viewport(0, 0, width, height);
-
- ctx.perspectiveMatrix = new CanvasMatrix4();
- ctx.perspectiveMatrix.lookat(0,0,50, 0, 0, 0, 0, 1, 0);
- ctx.perspectiveMatrix.perspective(30, width/height, 1, 10000);
- }
-
- function drawPicture(ctx)
- {
- var startRenderTime = new Date().getTime();
-
- reshape(ctx);
- ctx.clear(ctx.COLOR_BUFFER_BIT | ctx.DEPTH_BUFFER_BIT);
-
- if (!loaded && obj.loaded) {
- loaded = true;
-
- ctx.enableVertexAttribArray(0);
- ctx.enableVertexAttribArray(1);
- ctx.enableVertexAttribArray(2);
-
- ctx.bindBuffer(ctx.ARRAY_BUFFER, obj.vertexObject);
- ctx.vertexAttribPointer(2, 3, ctx.FLOAT, false, 0, 0);
-
- ctx.bindBuffer(ctx.ARRAY_BUFFER, obj.normalObject);
- ctx.vertexAttribPointer(0, 3, ctx.FLOAT, false, 0, 0);
-
- ctx.bindBuffer(ctx.ARRAY_BUFFER, obj.texCoordObject);
- ctx.vertexAttribPointer(1, 2, ctx.FLOAT, false, 0, 0);
-
- ctx.bindBuffer(ctx.ELEMENT_ARRAY_BUFFER, obj.indexObject);
- }
-
- if (!loaded)
- return;
-
- // generate the model-view matrix
- mvMatrix.makeIdentity();
- mvMatrix.rotate(currentAngle, 0, 1, 0);
- mvMatrix.rotate(10, 1,0,0);
- ctx.uniformMatrix4fv(ctx.getUniformLocation(ctx.program, "u_modelViewMatrix"), false, mvMatrix.getAsCanvasFloatArray());
-
- // construct the normal matrix from the model-view matrix
- normalMatrix.load(mvMatrix);
- normalMatrix.invert();
- normalMatrix.transpose();
- ctx.uniformMatrix4fv(ctx.getUniformLocation(ctx.program, "u_normalMatrix"), false, normalMatrix.getAsCanvasFloatArray());
-
- mvMatrix.multRight(ctx.perspectiveMatrix);
- ctx.uniformMatrix4fv(ctx.getUniformLocation(ctx.program, "u_modelViewProjMatrix"), false, mvMatrix.getAsCanvasFloatArray());
-
- ctx.drawElements(ctx.TRIANGLES, obj.numIndices, ctx.UNSIGNED_SHORT, 0);
-
- ctx.flush();
-
- framerate.snapshot();
-
- currentAngle += incAngle;
- if (currentAngle > 360)
- currentAngle -= 360;
- }
-
- function start()
- {
- var ctx = init();
- currentAngle = 0;
- incAngle = 0.2;
- framerate = new Framerate("framerate");
- var f = function() { drawPicture(ctx) };
- setInterval(f, 10);
- }
- </script>
- <style type="text/css">
- canvas {
- border: 2px solid black;
- width:90%;
- height:90%;
- }
- </style>
- </head>
- <body onload="start()">
- <canvas id="example">
- There is supposed to be an example drawing here, but it's not important.
- </canvas>
- <div id="framerate"></div>
- </body>
-</html>
diff --git a/WebCore/manual-tests/webgl/TeapotPerVertex.html b/WebCore/manual-tests/webgl/TeapotPerVertex.html
deleted file mode 100644
index d2544a3..0000000
--- a/WebCore/manual-tests/webgl/TeapotPerVertex.html
+++ /dev/null
@@ -1,305 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>Canvas3d example</title>
- <script src="resources/CanvasMatrix.js"> </script>
- <script src="resources/utils3d.js"> </script>
- <script id="vshader" type="x-shader/x-vertex">
- /*
- Copyright (c) 2008 Seneca College
- Licenced under the MIT License (http://www.c3dl.org/index.php/mit-license/)
- */
-
- // We need to create our own light structure since we can't access
- // the light() function in the 2.0 context.
- struct Light
- {
- vec4 ambient;
- vec4 diffuse;
- vec4 specular;
- vec4 position;
-
- vec3 halfVector;
- };
-
- struct Material
- {
- vec4 emission;
- vec4 ambient;
- vec4 diffuse;
- vec4 specular;
- float shininess;
- };
-
- //
- // vertex attributes
- //
- attribute vec3 a_normal;
- attribute vec4 a_texCoord;
- attribute vec4 a_vertex;
-
- // for every model we multiply the projection, view and model matrices
- // once to prevent having to do it for every vertex, however we still need
- // the view matrix to calculate lighting.
- uniform mat4 u_modelViewMatrix;
-
- // we can calculate this once per model to speed up processing done on the js side.
- uniform mat4 u_modelViewProjMatrix;
-
- // matrix to transform the vertex normals
- uniform mat4 u_normalMatrix;
-
- // custom light structures need to be used since we don't have access to
- // light states.
- uniform Light u_light;
-
- // material
- uniform vec4 u_globalAmbientColor;
- uniform Material u_frontMaterial;
- uniform Material u_backMaterial;
-
- // passed to fragment shader
- varying vec4 v_diffuse, v_specular;
- varying vec2 v_texCoord;
-
- /*
- Given a reference to the ambient and diffuse lighting variables,
- this function will calculate how much each component contributes to the scene.
-
- Light light - the light in view space
- vec3 normal -
- vec4 ambient -
- vec4 diffuse -
- */
- void directionalLight(in vec3 normal, inout vec4 ambient, inout vec4 diffuse, inout vec4 specular)
- {
- vec3 lightDir = normalize(vec3(u_light.position));
- ambient += u_light.ambient;
-
- float nDotL = max(dot(normal, lightDir), 0.0);
- if (nDotL > 0.0) {
- diffuse += u_light.diffuse * nDotL;
- float nDotHV = max(dot(normal, u_light.halfVector), 0.0);
- nDotHV += 0.3;
- vec4 specularColor = u_frontMaterial.specular * u_light.specular;
- specular += vec4(specularColor.rgb * pow(nDotHV, u_frontMaterial.shininess), specularColor.a);
- }
- }
-
- void main()
- {
- vec3 normal = normalize(u_normalMatrix * vec4(a_normal, 1)).xyz;
-
- vec4 ambient = vec4(0.0, 0.0, 0.0, 1.0);
- vec4 diffuse = vec4(0.0, 0.0, 0.0, 1.0);
- vec4 specular = vec4(0.0, 0.0, 0.0, 1.0);
-
- // place the current vertex into view space
- // ecPos = eye coordinate position.
- vec4 ecPos4 = u_modelViewMatrix * a_vertex;
-
- // the current vertex in eye coordinate space
- vec3 ecPos = ecPos4.xyz/ecPos4.w;
- directionalLight(normal, ambient, diffuse, specular);
-
- ambient = u_frontMaterial.ambient * ambient;
- ambient += u_globalAmbientColor * u_frontMaterial.ambient;
- diffuse = u_frontMaterial.diffuse * diffuse;
-
- v_diffuse = diffuse;
- v_specular = specular + ambient;
- gl_Position = u_modelViewProjMatrix * a_vertex;
- v_texCoord = a_texCoord.st;
- }
- </script>
-
- <script id="fshader" type="x-shader/x-fragment">
- uniform sampler2D u_sampler2d;
-
- varying vec4 v_diffuse, v_specular;
- varying vec2 v_texCoord;
-
- void main()
- {
- vec4 color = v_diffuse;
-
- gl_FragColor = color + v_specular;
- }
- </script>
-
- <script>
- function setDirectionalLight(ctx, program, eyeVector, direction, ambient, diffuse, specular)
- {
- var lightString = "u_light.";
-
- ctx.uniform4f(ctx.getUniformLocation(program, lightString+"ambient"),
- ambient[0], ambient[1], ambient[2], ambient[3]);
- ctx.uniform4f(ctx.getUniformLocation(program, lightString+"diffuse"),
- diffuse[0], diffuse[1], diffuse[2], diffuse[3]);
- ctx.uniform4f(ctx.getUniformLocation(program, lightString+"specular"),
- specular[0], specular[1], specular[2], specular[3]);
- ctx.uniform4f(ctx.getUniformLocation(program, lightString+"position"),
- direction[0], direction[1], direction[2], direction[3]);
-
- // compute the half vector
- var halfVector = [ eyeVector[0] + direction[0], eyeVector[1] + direction[1], eyeVector[2] + direction[2] ];
- var length = Math.sqrt(halfVector[0] * halfVector[0] +
- halfVector[1] * halfVector[1] +
- halfVector[2] * halfVector[2]);
- if (length == 0)
- halfVector = [ 0, 0, 1 ];
- else {
- halfVector[0] /= length;
- halfVector[1] /= length;
- halfVector[2] /= length;
- }
-
- ctx.uniform3f(ctx.getUniformLocation(program, lightString+"halfVector"),
- halfVector[0], halfVector[1], halfVector[2]);
- }
-
- function setMaterial(ctx, program, emission, ambient, diffuse, specular, shininess)
- {
- var matString = "u_frontMaterial.";
- ctx.uniform4f(ctx.getUniformLocation(program, matString+"emission"),
- emission[0], emission[1], emission[2], emission[3]);
- ctx.uniform4f(ctx.getUniformLocation(program, matString+"ambient"),
- ambient[0], ambient[1], ambient[2], ambient[3]);
- ctx.uniform4f(ctx.getUniformLocation(program, matString+"diffuse"),
- diffuse[0], diffuse[1], diffuse[2], diffuse[3]);
- ctx.uniform4f(ctx.getUniformLocation(program, matString+"specular"),
- specular[0], specular[1], specular[2], specular[3]);
- ctx.uniform1f(ctx.getUniformLocation(program, matString+"shininess"), shininess);
- }
-
- function init()
- {
- var gl = initWebGL("example", "vshader", "fshader",
- [ "a_normal", "a_texCoord", "a_vertex"],
- [ 0, 0, 0, 1 ], 10000);
-
- gl.uniform1i(gl.getUniformLocation(gl.program, "u_sampler2d"), 0);
- gl.uniform4f(gl.getUniformLocation(gl.program, "u_globalAmbientColor"), 0.2, 0.2, 0.2, 1);
-
- setDirectionalLight(gl, gl.program,
- [ 0, 0, 1 ], // eyeVector
- [0, 0, 1, 1], // position
- [0.1, 0.1, 0.1, 1], // ambient
- [1, 1, 1, 1], // diffuse
- [1, 1, 1, 1]); // specular
-
- setMaterial(gl, gl.program,
- [ 0, 0, 0, 0 ], // emission
- [ 0.1, 0.1, 0.1, 1 ], // ambient
- [ 0.8, 0.2, 0, 1 ], // diffuse
- [ 0, 0, 1, 1 ], // specular
- 32); // shininess
-
- obj = loadObj(gl, "resources/teapot.obj");
-
- mvMatrix = new CanvasMatrix4();
- normalMatrix = new CanvasMatrix4();
-
- return gl;
- }
-
- width = -1;
- height = -1;
- loaded = false;
-
- function reshape(ctx)
- {
- var canvas = document.getElementById('example');
- if (canvas.clientWidth == width && canvas.clientHeight == height)
- return;
-
- width = canvas.clientWidth;
- height = canvas.clientHeight;
-
- ctx.viewport(0, 0, width, height);
-
- ctx.perspectiveMatrix = new CanvasMatrix4();
- ctx.perspectiveMatrix.lookat(0,0,50, 0, 0, 0, 0, 1, 0);
- ctx.perspectiveMatrix.perspective(30, width/height, 1, 10000);
- }
-
- function drawPicture(ctx)
- {
- var startRenderTime = new Date().getTime();
-
- reshape(ctx);
- ctx.clear(ctx.COLOR_BUFFER_BIT | ctx.DEPTH_BUFFER_BIT);
-
- if (!loaded && obj.loaded) {
- loaded = true;
-
- ctx.enableVertexAttribArray(0);
- ctx.enableVertexAttribArray(1);
- ctx.enableVertexAttribArray(2);
-
- ctx.bindBuffer(ctx.ARRAY_BUFFER, obj.normalObject);
- ctx.vertexAttribPointer(0, 3, ctx.FLOAT, false, 0, 0);
-
- ctx.bindBuffer(ctx.ARRAY_BUFFER, obj.texCoordObject);
- ctx.vertexAttribPointer(1, 2, ctx.FLOAT, false, 0, 0);
-
- ctx.bindBuffer(ctx.ARRAY_BUFFER, obj.vertexObject);
- ctx.vertexAttribPointer(2, 3, ctx.FLOAT, false, 0, 0);
-
- ctx.bindBuffer(ctx.ELEMENT_ARRAY_BUFFER, obj.indexObject);
- }
-
- if (!loaded)
- return;
-
- // generate the model-view matrix
- mvMatrix.makeIdentity();
- mvMatrix.rotate(currentAngle, 0, 1, 0);
- mvMatrix.rotate(10, 1,0,0);
- ctx.uniformMatrix4fv(ctx.getUniformLocation(ctx.program, "u_modelViewMatrix"), false, mvMatrix.getAsCanvasFloatArray());
-
- // construct the normal matrix from the model-view matrix
- normalMatrix.load(mvMatrix);
- normalMatrix.invert();
- normalMatrix.transpose();
- ctx.uniformMatrix4fv(ctx.getUniformLocation(ctx.program, "u_normalMatrix"), false, normalMatrix.getAsCanvasFloatArray());
-
- mvMatrix.multRight(ctx.perspectiveMatrix);
- ctx.uniformMatrix4fv(ctx.getUniformLocation(ctx.program, "u_modelViewProjMatrix"), false, mvMatrix.getAsCanvasFloatArray());
-
- ctx.drawElements(ctx.TRIANGLES, obj.numIndices, ctx.UNSIGNED_SHORT, 0);
-
- ctx.flush();
-
- framerate.snapshot();
-
- currentAngle += incAngle;
- if (currentAngle > 360)
- currentAngle -= 360;
- }
-
- function start()
- {
- var ctx = init();
- currentAngle = 0;
- incAngle = 0.2;
- framerate = new Framerate("framerate");
- var f = function() { drawPicture(ctx) };
- setInterval(f, 10);
- }
- </script>
- <style type="text/css">
- canvas {
- border: 2px solid black;
- width:90%;
- height:90%;
- }
- </style>
- </head>
- <body onload="start()">
- <canvas id="example">
- There is supposed to be an example drawing here, but it's not important.
- </canvas>
- <div id="framerate"></div>
- </body>
-</html>
diff --git a/WebCore/manual-tests/webgl/resources/CanvasMatrix.js b/WebCore/manual-tests/webgl/resources/CanvasMatrix.js
deleted file mode 100644
index 90fcb3f..0000000
--- a/WebCore/manual-tests/webgl/resources/CanvasMatrix.js
+++ /dev/null
@@ -1,698 +0,0 @@
-/*
- CanvasMatrix4 class
-
- This class implements a 4x4 matrix. It has functions which
- duplicate the functionality of the OpenGL matrix stack and
- glut functions.
-
- IDL:
-
- [
- Constructor(in CanvasMatrix4 matrix), // copy passed matrix into new CanvasMatrix4
- Constructor(in sequence<float> array) // create new CanvasMatrix4 with 16 floats (row major)
- Constructor() // create new CanvasMatrix4 with identity matrix
- ]
- interface CanvasMatrix4 {
- attribute float m11;
- attribute float m12;
- attribute float m13;
- attribute float m14;
- attribute float m21;
- attribute float m22;
- attribute float m23;
- attribute float m24;
- attribute float m31;
- attribute float m32;
- attribute float m33;
- attribute float m34;
- attribute float m41;
- attribute float m42;
- attribute float m43;
- attribute float m44;
-
- void load(in CanvasMatrix4 matrix); // copy the values from the passed matrix
- void load(in sequence<float> array); // copy 16 floats into the matrix
- sequence<float> getAsArray(); // return the matrix as an array of 16 floats
- WebGLFloatArray getAsCanvasFloatArray(); // return the matrix as a WebGLFloatArray with 16 values
- void makeIdentity(); // replace the matrix with identity
- void transpose(); // replace the matrix with its transpose
- void invert(); // replace the matrix with its inverse
-
- void translate(in float x, in float y, in float z); // multiply the matrix by passed translation values on the right
- void scale(in float x, in float y, in float z); // multiply the matrix by passed scale values on the right
- void rotate(in float angle, // multiply the matrix by passed rotation values on the right
- in float x, in float y, in float z); // (angle is in degrees)
- void multRight(in CanvasMatrix matrix); // multiply the matrix by the passed matrix on the right
- void multLeft(in CanvasMatrix matrix); // multiply the matrix by the passed matrix on the left
- void ortho(in float left, in float right, // multiply the matrix by the passed ortho values on the right
- in float bottom, in float top,
- in float near, in float far);
- void frustum(in float left, in float right, // multiply the matrix by the passed frustum values on the right
- in float bottom, in float top,
- in float near, in float far);
- void perspective(in float fovy, in float aspect, // multiply the matrix by the passed perspective values on the right
- in float zNear, in float zFar);
- void lookat(in float eyex, in float eyey, in float eyez, // multiply the matrix by the passed lookat
- in float ctrx, in float ctry, in float ctrz, // values on the right
- in float upx, in float upy, in float upz);
- }
-*/
-
-CanvasMatrix4 = function(m)
-{
- if (typeof m == 'object') {
- if ("length" in m && m.length >= 16) {
- this.load(m[0], m[1], m[2], m[3], m[4], m[5], m[6], m[7], m[8], m[9], m[10], m[11], m[12], m[13], m[14], m[15]);
- return;
- }
- else if (m instanceof CanvasMatrix4) {
- this.load(m);
- return;
- }
- }
- this.makeIdentity();
-}
-
-CanvasMatrix4.prototype.load = function()
-{
- if (arguments.length == 1 && typeof arguments[0] == 'object') {
- var matrix = arguments[0];
-
- if ("length" in matrix && matrix.length == 16) {
- this.m11 = matrix[0];
- this.m12 = matrix[1];
- this.m13 = matrix[2];
- this.m14 = matrix[3];
-
- this.m21 = matrix[4];
- this.m22 = matrix[5];
- this.m23 = matrix[6];
- this.m24 = matrix[7];
-
- this.m31 = matrix[8];
- this.m32 = matrix[9];
- this.m33 = matrix[10];
- this.m34 = matrix[11];
-
- this.m41 = matrix[12];
- this.m42 = matrix[13];
- this.m43 = matrix[14];
- this.m44 = matrix[15];
- return;
- }
-
- if (arguments[0] instanceof CanvasMatrix4) {
-
- this.m11 = matrix.m11;
- this.m12 = matrix.m12;
- this.m13 = matrix.m13;
- this.m14 = matrix.m14;
-
- this.m21 = matrix.m21;
- this.m22 = matrix.m22;
- this.m23 = matrix.m23;
- this.m24 = matrix.m24;
-
- this.m31 = matrix.m31;
- this.m32 = matrix.m32;
- this.m33 = matrix.m33;
- this.m34 = matrix.m34;
-
- this.m41 = matrix.m41;
- this.m42 = matrix.m42;
- this.m43 = matrix.m43;
- this.m44 = matrix.m44;
- return;
- }
- }
-
- this.makeIdentity();
-}
-
-CanvasMatrix4.prototype.getAsArray = function()
-{
- return [
- this.m11, this.m12, this.m13, this.m14,
- this.m21, this.m22, this.m23, this.m24,
- this.m31, this.m32, this.m33, this.m34,
- this.m41, this.m42, this.m43, this.m44
- ];
-}
-
-CanvasMatrix4.prototype.getAsCanvasFloatArray = function()
-{
- return new WebGLFloatArray(this.getAsArray());
-}
-
-CanvasMatrix4.prototype.makeIdentity = function()
-{
- this.m11 = 1;
- this.m12 = 0;
- this.m13 = 0;
- this.m14 = 0;
-
- this.m21 = 0;
- this.m22 = 1;
- this.m23 = 0;
- this.m24 = 0;
-
- this.m31 = 0;
- this.m32 = 0;
- this.m33 = 1;
- this.m34 = 0;
-
- this.m41 = 0;
- this.m42 = 0;
- this.m43 = 0;
- this.m44 = 1;
-}
-
-CanvasMatrix4.prototype.transpose = function()
-{
- var tmp = this.m12;
- this.m12 = this.m21;
- this.m21 = tmp;
-
- tmp = this.m13;
- this.m13 = this.m31;
- this.m31 = tmp;
-
- tmp = this.m14;
- this.m14 = this.m41;
- this.m41 = tmp;
-
- tmp = this.m23;
- this.m23 = this.m32;
- this.m32 = tmp;
-
- tmp = this.m24;
- this.m24 = this.m42;
- this.m42 = tmp;
-
- tmp = this.m34;
- this.m34 = this.m43;
- this.m43 = tmp;
-}
-
-CanvasMatrix4.prototype.invert = function()
-{
- // Calculate the 4x4 determinant
- // If the determinant is zero,
- // then the inverse matrix is not unique.
- var det = this._determinant4x4();
-
- if (Math.abs(det) < 1e-8)
- return null;
-
- this._makeAdjoint();
-
- // Scale the adjoint matrix to get the inverse
- this.m11 /= det;
- this.m12 /= det;
- this.m13 /= det;
- this.m14 /= det;
-
- this.m21 /= det;
- this.m22 /= det;
- this.m23 /= det;
- this.m24 /= det;
-
- this.m31 /= det;
- this.m32 /= det;
- this.m33 /= det;
- this.m34 /= det;
-
- this.m41 /= det;
- this.m42 /= det;
- this.m43 /= det;
- this.m44 /= det;
-}
-
-CanvasMatrix4.prototype.translate = function(x,y,z)
-{
- if (x == undefined)
- x = 0;
- if (y == undefined)
- y = 0;
- if (z == undefined)
- z = 0;
-
- var matrix = new CanvasMatrix4();
- matrix.m41 = x;
- matrix.m42 = y;
- matrix.m43 = z;
-
- this.multRight(matrix);
-}
-
-CanvasMatrix4.prototype.scale = function(x,y,z)
-{
- if (x == undefined)
- x = 1;
- if (z == undefined) {
- if (y == undefined) {
- y = x;
- z = x;
- }
- else
- z = 1;
- }
- else if (y == undefined)
- y = x;
-
- var matrix = new CanvasMatrix4();
- matrix.m11 = x;
- matrix.m22 = y;
- matrix.m33 = z;
-
- this.multRight(matrix);
-}
-
-CanvasMatrix4.prototype.rotate = function(angle,x,y,z)
-{
- // angles are in degrees. Switch to radians
- angle = angle / 180 * Math.PI;
-
- angle /= 2;
- var sinA = Math.sin(angle);
- var cosA = Math.cos(angle);
- var sinA2 = sinA * sinA;
-
- // normalize
- var length = Math.sqrt(x * x + y * y + z * z);
- if (length == 0) {
- // bad vector, just use something reasonable
- x = 0;
- y = 0;
- z = 1;
- } else if (length != 1) {
- x /= length;
- y /= length;
- z /= length;
- }
-
- var mat = new CanvasMatrix4();
-
- // optimize case where axis is along major axis
- if (x == 1 && y == 0 && z == 0) {
- mat.m11 = 1;
- mat.m12 = 0;
- mat.m13 = 0;
- mat.m21 = 0;
- mat.m22 = 1 - 2 * sinA2;
- mat.m23 = 2 * sinA * cosA;
- mat.m31 = 0;
- mat.m32 = -2 * sinA * cosA;
- mat.m33 = 1 - 2 * sinA2;
- mat.m14 = mat.m24 = mat.m34 = 0;
- mat.m41 = mat.m42 = mat.m43 = 0;
- mat.m44 = 1;
- } else if (x == 0 && y == 1 && z == 0) {
- mat.m11 = 1 - 2 * sinA2;
- mat.m12 = 0;
- mat.m13 = -2 * sinA * cosA;
- mat.m21 = 0;
- mat.m22 = 1;
- mat.m23 = 0;
- mat.m31 = 2 * sinA * cosA;
- mat.m32 = 0;
- mat.m33 = 1 - 2 * sinA2;
- mat.m14 = mat.m24 = mat.m34 = 0;
- mat.m41 = mat.m42 = mat.m43 = 0;
- mat.m44 = 1;
- } else if (x == 0 && y == 0 && z == 1) {
- mat.m11 = 1 - 2 * sinA2;
- mat.m12 = 2 * sinA * cosA;
- mat.m13 = 0;
- mat.m21 = -2 * sinA * cosA;
- mat.m22 = 1 - 2 * sinA2;
- mat.m23 = 0;
- mat.m31 = 0;
- mat.m32 = 0;
- mat.m33 = 1;
- mat.m14 = mat.m24 = mat.m34 = 0;
- mat.m41 = mat.m42 = mat.m43 = 0;
- mat.m44 = 1;
- } else {
- var x2 = x*x;
- var y2 = y*y;
- var z2 = z*z;
-
- mat.m11 = 1 - 2 * (y2 + z2) * sinA2;
- mat.m12 = 2 * (x * y * sinA2 + z * sinA * cosA);
- mat.m13 = 2 * (x * z * sinA2 - y * sinA * cosA);
- mat.m21 = 2 * (y * x * sinA2 - z * sinA * cosA);
- mat.m22 = 1 - 2 * (z2 + x2) * sinA2;
- mat.m23 = 2 * (y * z * sinA2 + x * sinA * cosA);
- mat.m31 = 2 * (z * x * sinA2 + y * sinA * cosA);
- mat.m32 = 2 * (z * y * sinA2 - x * sinA * cosA);
- mat.m33 = 1 - 2 * (x2 + y2) * sinA2;
- mat.m14 = mat.m24 = mat.m34 = 0;
- mat.m41 = mat.m42 = mat.m43 = 0;
- mat.m44 = 1;
- }
- this.multRight(mat);
-}
-
-CanvasMatrix4.prototype.multRight = function(mat)
-{
- var m11 = (this.m11 * mat.m11 + this.m12 * mat.m21
- + this.m13 * mat.m31 + this.m14 * mat.m41);
- var m12 = (this.m11 * mat.m12 + this.m12 * mat.m22
- + this.m13 * mat.m32 + this.m14 * mat.m42);
- var m13 = (this.m11 * mat.m13 + this.m12 * mat.m23
- + this.m13 * mat.m33 + this.m14 * mat.m43);
- var m14 = (this.m11 * mat.m14 + this.m12 * mat.m24
- + this.m13 * mat.m34 + this.m14 * mat.m44);
-
- var m21 = (this.m21 * mat.m11 + this.m22 * mat.m21
- + this.m23 * mat.m31 + this.m24 * mat.m41);
- var m22 = (this.m21 * mat.m12 + this.m22 * mat.m22
- + this.m23 * mat.m32 + this.m24 * mat.m42);
- var m23 = (this.m21 * mat.m13 + this.m22 * mat.m23
- + this.m23 * mat.m33 + this.m24 * mat.m43);
- var m24 = (this.m21 * mat.m14 + this.m22 * mat.m24
- + this.m23 * mat.m34 + this.m24 * mat.m44);
-
- var m31 = (this.m31 * mat.m11 + this.m32 * mat.m21
- + this.m33 * mat.m31 + this.m34 * mat.m41);
- var m32 = (this.m31 * mat.m12 + this.m32 * mat.m22
- + this.m33 * mat.m32 + this.m34 * mat.m42);
- var m33 = (this.m31 * mat.m13 + this.m32 * mat.m23
- + this.m33 * mat.m33 + this.m34 * mat.m43);
- var m34 = (this.m31 * mat.m14 + this.m32 * mat.m24
- + this.m33 * mat.m34 + this.m34 * mat.m44);
-
- var m41 = (this.m41 * mat.m11 + this.m42 * mat.m21
- + this.m43 * mat.m31 + this.m44 * mat.m41);
- var m42 = (this.m41 * mat.m12 + this.m42 * mat.m22
- + this.m43 * mat.m32 + this.m44 * mat.m42);
- var m43 = (this.m41 * mat.m13 + this.m42 * mat.m23
- + this.m43 * mat.m33 + this.m44 * mat.m43);
- var m44 = (this.m41 * mat.m14 + this.m42 * mat.m24
- + this.m43 * mat.m34 + this.m44 * mat.m44);
-
- this.m11 = m11;
- this.m12 = m12;
- this.m13 = m13;
- this.m14 = m14;
-
- this.m21 = m21;
- this.m22 = m22;
- this.m23 = m23;
- this.m24 = m24;
-
- this.m31 = m31;
- this.m32 = m32;
- this.m33 = m33;
- this.m34 = m34;
-
- this.m41 = m41;
- this.m42 = m42;
- this.m43 = m43;
- this.m44 = m44;
-}
-
-CanvasMatrix4.prototype.multLeft = function(mat)
-{
- var m11 = (mat.m11 * this.m11 + mat.m12 * this.m21
- + mat.m13 * this.m31 + mat.m14 * this.m41);
- var m12 = (mat.m11 * this.m12 + mat.m12 * this.m22
- + mat.m13 * this.m32 + mat.m14 * this.m42);
- var m13 = (mat.m11 * this.m13 + mat.m12 * this.m23
- + mat.m13 * this.m33 + mat.m14 * this.m43);
- var m14 = (mat.m11 * this.m14 + mat.m12 * this.m24
- + mat.m13 * this.m34 + mat.m14 * this.m44);
-
- var m21 = (mat.m21 * this.m11 + mat.m22 * this.m21
- + mat.m23 * this.m31 + mat.m24 * this.m41);
- var m22 = (mat.m21 * this.m12 + mat.m22 * this.m22
- + mat.m23 * this.m32 + mat.m24 * this.m42);
- var m23 = (mat.m21 * this.m13 + mat.m22 * this.m23
- + mat.m23 * this.m33 + mat.m24 * this.m43);
- var m24 = (mat.m21 * this.m14 + mat.m22 * this.m24
- + mat.m23 * this.m34 + mat.m24 * this.m44);
-
- var m31 = (mat.m31 * this.m11 + mat.m32 * this.m21
- + mat.m33 * this.m31 + mat.m34 * this.m41);
- var m32 = (mat.m31 * this.m12 + mat.m32 * this.m22
- + mat.m33 * this.m32 + mat.m34 * this.m42);
- var m33 = (mat.m31 * this.m13 + mat.m32 * this.m23
- + mat.m33 * this.m33 + mat.m34 * this.m43);
- var m34 = (mat.m31 * this.m14 + mat.m32 * this.m24
- + mat.m33 * this.m34 + mat.m34 * this.m44);
-
- var m41 = (mat.m41 * this.m11 + mat.m42 * this.m21
- + mat.m43 * this.m31 + mat.m44 * this.m41);
- var m42 = (mat.m41 * this.m12 + mat.m42 * this.m22
- + mat.m43 * this.m32 + mat.m44 * this.m42);
- var m43 = (mat.m41 * this.m13 + mat.m42 * this.m23
- + mat.m43 * this.m33 + mat.m44 * this.m43);
- var m44 = (mat.m41 * this.m14 + mat.m42 * this.m24
- + mat.m43 * this.m34 + mat.m44 * this.m44);
-
- this.m11 = m11;
- this.m12 = m12;
- this.m13 = m13;
- this.m14 = m14;
-
- this.m21 = m21;
- this.m22 = m22;
- this.m23 = m23;
- this.m24 = m24;
-
- this.m31 = m31;
- this.m32 = m32;
- this.m33 = m33;
- this.m34 = m34;
-
- this.m41 = m41;
- this.m42 = m42;
- this.m43 = m43;
- this.m44 = m44;
-}
-
-CanvasMatrix4.prototype.ortho = function(left, right, bottom, top, near, far)
-{
- var tx = (left + right) / (left - right);
- var ty = (top + bottom) / (top - bottom);
- var tz = (far + near) / (far - near);
-
- var matrix = new CanvasMatrix4();
- matrix.m11 = 2 / (left - right);
- matrix.m12 = 0;
- matrix.m13 = 0;
- matrix.m14 = 0;
- matrix.m21 = 0;
- matrix.m22 = 2 / (top - bottom);
- matrix.m23 = 0;
- matrix.m24 = 0;
- matrix.m31 = 0;
- matrix.m32 = 0;
- matrix.m33 = -2 / (far - near);
- matrix.m34 = 0;
- matrix.m41 = tx;
- matrix.m42 = ty;
- matrix.m43 = tz;
- matrix.m44 = 1;
-
- this.multRight(matrix);
-}
-
-CanvasMatrix4.prototype.frustum = function(left, right, bottom, top, near, far)
-{
- var matrix = new CanvasMatrix4();
- var A = (right + left) / (right - left);
- var B = (top + bottom) / (top - bottom);
- var C = -(far + near) / (far - near);
- var D = -(2 * far * near) / (far - near);
-
- matrix.m11 = (2 * near) / (right - left);
- matrix.m12 = 0;
- matrix.m13 = 0;
- matrix.m14 = 0;
-
- matrix.m21 = 0;
- matrix.m22 = 2 * near / (top - bottom);
- matrix.m23 = 0;
- matrix.m24 = 0;
-
- matrix.m31 = A;
- matrix.m32 = B;
- matrix.m33 = C;
- matrix.m34 = -1;
-
- matrix.m41 = 0;
- matrix.m42 = 0;
- matrix.m43 = D;
- matrix.m44 = 0;
-
- this.multRight(matrix);
-}
-
-CanvasMatrix4.prototype.perspective = function(fovy, aspect, zNear, zFar)
-{
- var top = Math.tan(fovy * Math.PI / 360) * zNear;
- var bottom = -top;
- var left = aspect * bottom;
- var right = aspect * top;
- this.frustum(left, right, bottom, top, zNear, zFar);
-}
-
-CanvasMatrix4.prototype.lookat = function(eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz)
-{
- var matrix = new CanvasMatrix4();
-
- // Make rotation matrix
-
- // Z vector
- var zx = eyex - centerx;
- var zy = eyey - centery;
- var zz = eyez - centerz;
- var mag = Math.sqrt(zx * zx + zy * zy + zz * zz);
- if (mag) {
- zx /= mag;
- zy /= mag;
- zz /= mag;
- }
-
- // Y vector
- var yx = upx;
- var yy = upy;
- var yz = upz;
-
- // X vector = Y cross Z
- xx = yy * zz - yz * zy;
- xy = -yx * zz + yz * zx;
- xz = yx * zy - yy * zx;
-
- // Recompute Y = Z cross X
- yx = zy * xz - zz * xy;
- yy = -zx * xz + zz * xx;
- yx = zx * xy - zy * xx;
-
- // cross product gives area of parallelogram, which is < 1.0 for
- // non-perpendicular unit-length vectors; so normalize x, y here
-
- mag = Math.sqrt(xx * xx + xy * xy + xz * xz);
- if (mag) {
- xx /= mag;
- xy /= mag;
- xz /= mag;
- }
-
- mag = Math.sqrt(yx * yx + yy * yy + yz * yz);
- if (mag) {
- yx /= mag;
- yy /= mag;
- yz /= mag;
- }
-
- matrix.m11 = xx;
- matrix.m12 = xy;
- matrix.m13 = xz;
- matrix.m14 = 0;
-
- matrix.m21 = yx;
- matrix.m22 = yy;
- matrix.m23 = yz;
- matrix.m24 = 0;
-
- matrix.m31 = zx;
- matrix.m32 = zy;
- matrix.m33 = zz;
- matrix.m34 = 0;
-
- matrix.m41 = 0;
- matrix.m42 = 0;
- matrix.m43 = 0;
- matrix.m44 = 1;
- matrix.translate(-eyex, -eyey, -eyez);
-
- this.multRight(matrix);
-}
-
-// Support functions
-CanvasMatrix4.prototype._determinant2x2 = function(a, b, c, d)
-{
- return a * d - b * c;
-}
-
-CanvasMatrix4.prototype._determinant3x3 = function(a1, a2, a3, b1, b2, b3, c1, c2, c3)
-{
- return a1 * this._determinant2x2(b2, b3, c2, c3)
- - b1 * this._determinant2x2(a2, a3, c2, c3)
- + c1 * this._determinant2x2(a2, a3, b2, b3);
-}
-
-CanvasMatrix4.prototype._determinant4x4 = function()
-{
- var a1 = this.m11;
- var b1 = this.m12;
- var c1 = this.m13;
- var d1 = this.m14;
-
- var a2 = this.m21;
- var b2 = this.m22;
- var c2 = this.m23;
- var d2 = this.m24;
-
- var a3 = this.m31;
- var b3 = this.m32;
- var c3 = this.m33;
- var d3 = this.m34;
-
- var a4 = this.m41;
- var b4 = this.m42;
- var c4 = this.m43;
- var d4 = this.m44;
-
- return a1 * this._determinant3x3(b2, b3, b4, c2, c3, c4, d2, d3, d4)
- - b1 * this._determinant3x3(a2, a3, a4, c2, c3, c4, d2, d3, d4)
- + c1 * this._determinant3x3(a2, a3, a4, b2, b3, b4, d2, d3, d4)
- - d1 * this._determinant3x3(a2, a3, a4, b2, b3, b4, c2, c3, c4);
-}
-
-CanvasMatrix4.prototype._makeAdjoint = function()
-{
- var a1 = this.m11;
- var b1 = this.m12;
- var c1 = this.m13;
- var d1 = this.m14;
-
- var a2 = this.m21;
- var b2 = this.m22;
- var c2 = this.m23;
- var d2 = this.m24;
-
- var a3 = this.m31;
- var b3 = this.m32;
- var c3 = this.m33;
- var d3 = this.m34;
-
- var a4 = this.m41;
- var b4 = this.m42;
- var c4 = this.m43;
- var d4 = this.m44;
-
- // Row column labeling reversed since we transpose rows & columns
- this.m11 = this._determinant3x3(b2, b3, b4, c2, c3, c4, d2, d3, d4);
- this.m21 = - this._determinant3x3(a2, a3, a4, c2, c3, c4, d2, d3, d4);
- this.m31 = this._determinant3x3(a2, a3, a4, b2, b3, b4, d2, d3, d4);
- this.m41 = - this._determinant3x3(a2, a3, a4, b2, b3, b4, c2, c3, c4);
-
- this.m12 = - this._determinant3x3(b1, b3, b4, c1, c3, c4, d1, d3, d4);
- this.m22 = this._determinant3x3(a1, a3, a4, c1, c3, c4, d1, d3, d4);
- this.m32 = - this._determinant3x3(a1, a3, a4, b1, b3, b4, d1, d3, d4);
- this.m42 = this._determinant3x3(a1, a3, a4, b1, b3, b4, c1, c3, c4);
-
- this.m13 = this._determinant3x3(b1, b2, b4, c1, c2, c4, d1, d2, d4);
- this.m23 = - this._determinant3x3(a1, a2, a4, c1, c2, c4, d1, d2, d4);
- this.m33 = this._determinant3x3(a1, a2, a4, b1, b2, b4, d1, d2, d4);
- this.m43 = - this._determinant3x3(a1, a2, a4, b1, b2, b4, c1, c2, c4);
-
- this.m14 = - this._determinant3x3(b1, b2, b3, c1, c2, c3, d1, d2, d3);
- this.m24 = this._determinant3x3(a1, a2, a3, c1, c2, c3, d1, d2, d3);
- this.m34 = - this._determinant3x3(a1, a2, a3, b1, b2, b3, d1, d2, d3);
- this.m44 = this._determinant3x3(a1, a2, a3, b1, b2, b3, c1, c2, c3);
-}
diff --git a/WebCore/manual-tests/webgl/resources/earthmap1k.jpg b/WebCore/manual-tests/webgl/resources/earthmap1k.jpg
deleted file mode 100644
index 7dcab8a..0000000
--- a/WebCore/manual-tests/webgl/resources/earthmap1k.jpg
+++ /dev/null
Binary files differ
diff --git a/WebCore/manual-tests/webgl/resources/mars500x250.png b/WebCore/manual-tests/webgl/resources/mars500x250.png
deleted file mode 100644
index f38ef09..0000000
--- a/WebCore/manual-tests/webgl/resources/mars500x250.png
+++ /dev/null
Binary files differ
diff --git a/WebCore/manual-tests/webgl/resources/teapot.obj b/WebCore/manual-tests/webgl/resources/teapot.obj
deleted file mode 100644
index b6c6810..0000000
--- a/WebCore/manual-tests/webgl/resources/teapot.obj
+++ /dev/null
@@ -1,2866 +0,0 @@
-# Max2Obj Version 4.0 Mar 10th, 2001
-#
-# object Teapot01 to come ...
-#
-v 5.929688 4.125000 0.000000
-v 5.832031 4.494141 0.000000
-v 5.945313 4.617188 0.000000
-v 6.175781 4.494141 0.000000
-v 6.429688 4.125000 0.000000
-v 5.387188 4.125000 2.747500
-v 5.297100 4.494141 2.709170
-v 5.401602 4.617188 2.753633
-v 5.614209 4.494141 2.844092
-v 5.848437 4.125000 2.943750
-v 3.899688 4.125000 4.970000
-v 3.830352 4.494141 4.900664
-v 3.910782 4.617188 4.981094
-v 4.074414 4.494141 5.144727
-v 4.254687 4.125000 5.325000
-v 1.677188 4.125000 6.457500
-v 1.638858 4.494141 6.367412
-v 1.683320 4.617188 6.471914
-v 1.773780 4.494141 6.684522
-v 1.873438 4.125000 6.918750
-v -1.070312 4.125000 7.000000
-v -1.070312 4.494141 6.902344
-v -1.070312 4.617188 7.015625
-v -1.070312 4.494141 7.246094
-v -1.070312 4.125000 7.500000
-v -4.007656 4.125000 6.457500
-v -3.859572 4.494141 6.367412
-v -3.847676 4.617188 6.471914
-v -3.917371 4.494141 6.684522
-v -4.014062 4.125000 6.918750
-v -6.209063 4.125000 4.970000
-v -6.042168 4.494141 4.900664
-v -6.072500 4.617188 4.981094
-v -6.217675 4.494141 5.144727
-v -6.395312 4.125000 5.325000
-v -7.591093 4.125000 2.747500
-v -7.464421 4.494141 2.709170
-v -7.550137 4.617188 2.753633
-v -7.755822 4.494141 2.844092
-v -7.989062 4.125000 2.943750
-v -8.070313 4.125000 0.000000
-v -7.972656 4.494141 0.000000
-v -8.085938 4.617188 0.000000
-v -8.316406 4.494141 0.000000
-v -8.570313 4.125000 0.000000
-v -7.527812 4.125000 -2.747500
-v -7.437724 4.494141 -2.709170
-v -7.542227 4.617188 -2.753633
-v -7.754834 4.494141 -2.844092
-v -7.989062 4.125000 -2.943750
-v -6.040312 4.125000 -4.970000
-v -5.970977 4.494141 -4.900664
-v -6.051406 4.617188 -4.981094
-v -6.215039 4.494141 -5.144727
-v -6.395312 4.125000 -5.325000
-v -3.817812 4.125000 -6.457500
-v -3.779482 4.494141 -6.367412
-v -3.823945 4.617188 -6.471914
-v -3.914404 4.494141 -6.684522
-v -4.014062 4.125000 -6.918750
-v -1.070312 4.125000 -7.000000
-v -1.070312 4.494141 -6.902344
-v -1.070312 4.617188 -7.015625
-v -1.070312 4.494141 -7.246094
-v -1.070312 4.125000 -7.500000
-v 1.677188 4.125000 -6.457500
-v 1.638858 4.494141 -6.367412
-v 1.683320 4.617188 -6.471914
-v 1.773780 4.494141 -6.684522
-v 1.873438 4.125000 -6.918750
-v 3.899688 4.125000 -4.970000
-v 3.830352 4.494141 -4.900664
-v 3.910782 4.617188 -4.981094
-v 4.074414 4.494141 -5.144727
-v 4.254687 4.125000 -5.325000
-v 5.387188 4.125000 -2.747500
-v 5.297100 4.494141 -2.709170
-v 5.401602 4.617188 -2.753633
-v 5.614209 4.494141 -2.844092
-v 5.848437 4.125000 -2.943750
-v 7.347656 2.162109 0.000000
-v 8.148438 0.234375 0.000000
-v 8.714844 -1.623047 0.000000
-v 8.929688 -3.375000 0.000000
-v 6.695264 2.162109 3.304053
-v 7.433985 0.234375 3.618360
-v 7.956494 -1.623047 3.840674
-v 8.154688 -3.375000 3.925000
-v 4.906446 2.162109 5.976758
-v 5.475000 0.234375 6.545312
-v 5.877149 -1.623047 6.947461
-v 6.029688 -3.375000 7.100000
-v 2.233740 2.162109 7.765576
-v 2.548047 0.234375 8.504297
-v 2.770362 -1.623047 9.026807
-v 2.854688 -3.375000 9.225000
-v -1.070312 2.162109 8.417969
-v -1.070312 0.234375 9.218750
-v -1.070312 -1.623047 9.785156
-v -1.070312 -3.375000 10.000000
-v -4.374365 2.162109 7.765576
-v -4.688672 0.234375 8.504297
-v -4.910986 -1.623047 9.026807
-v -4.995313 -3.375000 9.225000
-v -7.047071 2.162109 5.976758
-v -7.615624 0.234375 6.545312
-v -8.017773 -1.623047 6.947461
-v -8.170312 -3.375000 7.100000
-v -8.835889 2.162109 3.304053
-v -9.574610 0.234375 3.618360
-v -10.097119 -1.623047 3.840674
-v -10.295313 -3.375000 3.925000
-v -9.488281 2.162109 0.000000
-v -10.289063 0.234375 0.000000
-v -10.855469 -1.623047 0.000000
-v -11.070313 -3.375000 0.000000
-v -8.835889 2.162109 -3.304053
-v -9.574610 0.234375 -3.618360
-v -10.097119 -1.623047 -3.840674
-v -10.295313 -3.375000 -3.925000
-v -7.047071 2.162109 -5.976758
-v -7.615624 0.234375 -6.545312
-v -8.017773 -1.623047 -6.947461
-v -8.170312 -3.375000 -7.100000
-v -4.374365 2.162109 -7.765576
-v -4.688672 0.234375 -8.504297
-v -4.910986 -1.623047 -9.026807
-v -4.995313 -3.375000 -9.225000
-v -1.070312 2.162109 -8.417969
-v -1.070312 0.234375 -9.218750
-v -1.070312 -1.623047 -9.785156
-v -1.070312 -3.375000 -10.000000
-v 2.233740 2.162109 -7.765576
-v 2.548047 0.234375 -8.504297
-v 2.770362 -1.623047 -9.026807
-v 2.854688 -3.375000 -9.225000
-v 4.906446 2.162109 -5.976758
-v 5.475000 0.234375 -6.545312
-v 5.877149 -1.623047 -6.947461
-v 6.029688 -3.375000 -7.100000
-v 6.695264 2.162109 -3.304053
-v 7.433985 0.234375 -3.618360
-v 7.956494 -1.623047 -3.840674
-v 8.154688 -3.375000 -3.925000
-v 8.539063 -4.857422 0.000000
-v 7.679688 -5.953125 0.000000
-v 6.820313 -6.697266 0.000000
-v 6.429688 -7.125000 0.000000
-v 7.794336 -4.857422 3.771680
-v 7.001562 -5.953125 3.434375
-v 6.208789 -6.697266 3.097070
-v 5.848437 -7.125000 2.943750
-v 5.752343 -4.857422 6.822656
-v 5.142187 -5.953125 6.212500
-v 4.532031 -6.697266 5.602344
-v 4.254687 -7.125000 5.325000
-v 2.701367 -4.857422 8.864649
-v 2.364063 -5.953125 8.071875
-v 2.026758 -6.697266 7.279101
-v 1.873438 -7.125000 6.918750
-v -1.070312 -4.857422 9.609375
-v -1.070312 -5.953125 8.750000
-v -1.070312 -6.697266 7.890625
-v -1.070312 -7.125000 7.500000
-v -4.841992 -4.857422 8.864649
-v -4.504687 -5.953125 8.071875
-v -4.167383 -6.697266 7.279101
-v -4.014062 -7.125000 6.918750
-v -7.892968 -4.857422 6.822656
-v -7.282812 -5.953125 6.212500
-v -6.672656 -6.697266 5.602344
-v -6.395312 -7.125000 5.325000
-v -9.934961 -4.857422 3.771680
-v -9.142187 -5.953125 3.434375
-v -8.349414 -6.697266 3.097070
-v -7.989062 -7.125000 2.943750
-v -10.679688 -4.857422 0.000000
-v -9.820313 -5.953125 0.000000
-v -8.960938 -6.697266 0.000000
-v -8.570313 -7.125000 0.000000
-v -9.934961 -4.857422 -3.771680
-v -9.142187 -5.953125 -3.434375
-v -8.349414 -6.697266 -3.097070
-v -7.989062 -7.125000 -2.943750
-v -7.892968 -4.857422 -6.822656
-v -7.282812 -5.953125 -6.212500
-v -6.672656 -6.697266 -5.602344
-v -6.395312 -7.125000 -5.325000
-v -4.841992 -4.857422 -8.864649
-v -4.504687 -5.953125 -8.071875
-v -4.167383 -6.697266 -7.279101
-v -4.014062 -7.125000 -6.918750
-v -1.070312 -4.857422 -9.609375
-v -1.070312 -5.953125 -8.750000
-v -1.070312 -6.697266 -7.890625
-v -1.070312 -7.125000 -7.500000
-v 2.701367 -4.857422 -8.864649
-v 2.364063 -5.953125 -8.071875
-v 2.026758 -6.697266 -7.279101
-v 1.873438 -7.125000 -6.918750
-v 5.752343 -4.857422 -6.822656
-v 5.142187 -5.953125 -6.212500
-v 4.532031 -6.697266 -5.602344
-v 4.254687 -7.125000 -5.325000
-v 7.794336 -4.857422 -3.771680
-v 7.001562 -5.953125 -3.434375
-v 6.208789 -6.697266 -3.097070
-v 5.848437 -7.125000 -2.943750
-v 6.259766 -7.400391 0.000000
-v 5.351563 -7.640625 0.000000
-v 3.107422 -7.810547 0.000000
-v -1.070312 -7.875000 0.000000
-v 5.691685 -7.400391 2.877056
-v 4.853868 -7.640625 2.520586
-v 2.783648 -7.810547 1.639761
-v 4.134043 -7.400391 5.204355
-v 3.489219 -7.640625 4.559531
-v 1.895879 -7.810547 2.966191
-v 1.806743 -7.400391 6.761997
-v 1.450274 -7.640625 5.924180
-v 0.569448 -7.810547 3.853960
-v -1.070312 -7.400391 7.330078
-v -1.070312 -7.640625 6.421875
-v -1.070312 -7.810547 4.177734
-v -3.947368 -7.400391 6.761997
-v -3.590898 -7.640625 5.924180
-v -2.710073 -7.810547 3.853960
-v -6.274668 -7.400391 5.204355
-v -5.629844 -7.640625 4.559531
-v -4.036504 -7.810547 2.966191
-v -7.832309 -7.400391 2.877056
-v -6.994492 -7.640625 2.520586
-v -4.924272 -7.810547 1.639761
-v -8.400391 -7.400391 0.000000
-v -7.492188 -7.640625 0.000000
-v -5.248047 -7.810547 0.000000
-v -7.832309 -7.400391 -2.877056
-v -6.994492 -7.640625 -2.520586
-v -4.924272 -7.810547 -1.639761
-v -6.274668 -7.400391 -5.204355
-v -5.629844 -7.640625 -4.559531
-v -4.036504 -7.810547 -2.966191
-v -3.947368 -7.400391 -6.761997
-v -3.590898 -7.640625 -5.924180
-v -2.710073 -7.810547 -3.853960
-v -1.070312 -7.400391 -7.330078
-v -1.070312 -7.640625 -6.421875
-v -1.070312 -7.810547 -4.177734
-v 1.806743 -7.400391 -6.761997
-v 1.450274 -7.640625 -5.924180
-v 0.569448 -7.810547 -3.853960
-v 4.134043 -7.400391 -5.204355
-v 3.489219 -7.640625 -4.559531
-v 1.895879 -7.810547 -2.966191
-v 5.691685 -7.400391 -2.877056
-v 4.853868 -7.640625 -2.520586
-v 2.783648 -7.810547 -1.639761
-v -9.070313 2.250000 0.000000
-v -11.406250 2.232422 0.000000
-v -13.132813 2.109375 0.000000
-v -14.203125 1.775391 0.000000
-v -14.570313 1.125000 0.000000
-v -8.992188 2.425781 0.843750
-v -11.475830 2.405457 0.843750
-v -13.298828 2.263184 0.843750
-v -14.421631 1.877014 0.843750
-v -14.804688 1.125000 0.843750
-v -8.820313 2.812500 1.125000
-v -11.628906 2.786134 1.125000
-v -13.664063 2.601563 1.125000
-v -14.902344 2.100586 1.125000
-v -15.320313 1.125000 1.125000
-v -8.648438 3.199219 0.843750
-v -11.781982 3.166809 0.843750
-v -14.029297 2.939941 0.843750
-v -15.383057 2.324158 0.843750
-v -15.835938 1.125000 0.843750
-v -8.570313 3.375000 0.000000
-v -11.851563 3.339844 0.000000
-v -14.195313 3.093750 0.000000
-v -15.601563 2.425781 0.000000
-v -16.070313 1.125000 0.000000
-v -8.648438 3.199219 -0.843750
-v -11.781982 3.166809 -0.843750
-v -14.029297 2.939941 -0.843750
-v -15.383057 2.324158 -0.843750
-v -15.835938 1.125000 -0.843750
-v -8.820313 2.812500 -1.125000
-v -11.628906 2.786134 -1.125000
-v -13.664063 2.601563 -1.125000
-v -14.902344 2.100586 -1.125000
-v -15.320313 1.125000 -1.125000
-v -8.992188 2.425781 -0.843750
-v -11.475830 2.405457 -0.843750
-v -13.298828 2.263184 -0.843750
-v -14.421631 1.877014 -0.843750
-v -14.804688 1.125000 -0.843750
-v -14.375000 0.105469 0.000000
-v -13.757813 -1.125000 0.000000
-v -12.671875 -2.355469 0.000000
-v -11.070313 -3.375000 0.000000
-v -14.588013 0.007050 0.843750
-v -13.909180 -1.275146 0.843750
-v -12.724976 -2.540863 0.843750
-v -10.992188 -3.609375 0.843750
-v -15.056641 -0.209473 1.125000
-v -14.242188 -1.605469 1.125000
-v -12.841797 -2.948730 1.125000
-v -10.820313 -4.125000 1.125000
-v -15.525269 -0.425995 0.843750
-v -14.575195 -1.935791 0.843750
-v -12.958618 -3.356598 0.843750
-v -10.648438 -4.640625 0.843750
-v -15.738281 -0.524414 0.000000
-v -14.726563 -2.085938 0.000000
-v -13.011719 -3.541992 0.000000
-v -10.570313 -4.875000 0.000000
-v -15.525269 -0.425995 -0.843750
-v -14.575195 -1.935791 -0.843750
-v -12.958618 -3.356598 -0.843750
-v -10.648438 -4.640625 -0.843750
-v -15.056641 -0.209473 -1.125000
-v -14.242188 -1.605469 -1.125000
-v -12.841797 -2.948730 -1.125000
-v -10.820313 -4.125000 -1.125000
-v -14.588013 0.007050 -0.843750
-v -13.909180 -1.275146 -0.843750
-v -12.724976 -2.540863 -0.843750
-v -10.992188 -3.609375 -0.843750
-v 7.429688 -0.750000 0.000000
-v 9.828125 -0.199219 0.000000
-v 10.867188 1.125000 0.000000
-v 11.437500 2.730469 0.000000
-v 12.429688 4.125000 0.000000
-v 7.429688 -1.394531 1.856250
-v 10.011230 -0.677124 1.676074
-v 11.101563 0.846680 1.279688
-v 11.723145 2.629761 0.883301
-v 12.898438 4.125000 0.703125
-v 7.429688 -2.812500 2.475000
-v 10.414063 -1.728516 2.234766
-v 11.617188 0.234375 1.706250
-v 12.351563 2.408203 1.177734
-v 13.929688 4.125000 0.937500
-v 7.429688 -4.230469 1.856250
-v 10.816895 -2.779907 1.676074
-v 12.132813 -0.377930 1.279688
-v 12.979980 2.186646 0.883301
-v 14.960938 4.125000 0.703125
-v 7.429688 -4.875000 0.000000
-v 11.000000 -3.257813 0.000000
-v 12.367188 -0.656250 0.000000
-v 13.265625 2.085938 0.000000
-v 15.429688 4.125000 0.000000
-v 7.429688 -4.230469 -1.856250
-v 10.816895 -2.779907 -1.676074
-v 12.132813 -0.377930 -1.279688
-v 12.979980 2.186646 -0.883301
-v 14.960938 4.125000 -0.703125
-v 7.429688 -2.812500 -2.475000
-v 10.414063 -1.728516 -2.234766
-v 11.617188 0.234375 -1.706250
-v 12.351563 2.408203 -1.177734
-v 13.929688 4.125000 -0.937500
-v 7.429688 -1.394531 -1.856250
-v 10.011230 -0.677124 -1.676074
-v 11.101563 0.846680 -1.279688
-v 11.723145 2.629761 -0.883301
-v 12.898438 4.125000 -0.703125
-v 12.789063 4.335938 0.000000
-v 13.054688 4.406250 0.000000
-v 13.132813 4.335938 0.000000
-v 12.929688 4.125000 0.000000
-v 13.291077 4.346237 0.659180
-v 13.525879 4.422729 0.562500
-v 13.532898 4.350357 0.465820
-v 13.242188 4.125000 0.421875
-v 14.395508 4.368896 0.878906
-v 14.562500 4.458984 0.750000
-v 14.413086 4.382080 0.621094
-v 13.929688 4.125000 0.562500
-v 15.499939 4.391556 0.659180
-v 15.599121 4.495239 0.562500
-v 15.293274 4.413804 0.465820
-v 14.617188 4.125000 0.421875
-v 16.001953 4.401855 0.000000
-v 16.070313 4.511719 0.000000
-v 15.693359 4.428224 0.000000
-v 14.929688 4.125000 0.000000
-v 15.499939 4.391556 -0.659180
-v 15.599121 4.495239 -0.562500
-v 15.293274 4.413804 -0.465820
-v 14.617188 4.125000 -0.421875
-v 14.395508 4.368896 -0.878906
-v 14.562500 4.458984 -0.750000
-v 14.413086 4.382080 -0.621094
-v 13.929688 4.125000 -0.562500
-v 13.291077 4.346237 -0.659180
-v 13.525879 4.422729 -0.562500
-v 13.532898 4.350357 -0.465820
-v 13.242188 4.125000 -0.421875
-v -1.070312 7.875000 0.000000
-v 0.632813 7.628906 0.000000
-v 0.554688 7.031250 0.000000
-v -0.085937 6.292969 0.000000
-v -0.070312 5.625000 0.000000
-v 0.501414 7.628906 0.670256
-v 0.429278 7.031250 0.639395
-v -0.162029 6.292969 0.386960
-v -0.147812 5.625000 0.392500
-v 0.140489 7.628906 1.210801
-v 0.084844 7.031250 1.155156
-v -0.370879 6.292969 0.699434
-v -0.360312 5.625000 0.710000
-v -0.400056 7.628906 1.571726
-v -0.430918 7.031250 1.499590
-v -0.683352 6.292969 0.908284
-v -0.677812 5.625000 0.922500
-v -1.070312 7.628906 1.703125
-v -1.070312 7.031250 1.625000
-v -1.070312 6.292969 0.984375
-v -1.070312 5.625000 1.000000
-v -1.740569 7.628906 1.571726
-v -1.709707 7.031250 1.499590
-v -1.457273 6.292969 0.908284
-v -1.462812 5.625000 0.922500
-v -2.281113 7.628906 1.210801
-v -2.225469 7.031250 1.155156
-v -1.769746 6.292969 0.699434
-v -1.780312 5.625000 0.710000
-v -2.642038 7.628906 0.670256
-v -2.569902 7.031250 0.639395
-v -1.978596 6.292969 0.386960
-v -1.992812 5.625000 0.392500
-v -2.773438 7.628906 0.000000
-v -2.695313 7.031250 0.000000
-v -2.054687 6.292969 0.000000
-v -2.070312 5.625000 0.000000
-v -2.642038 7.628906 -0.670256
-v -2.569902 7.031250 -0.639395
-v -1.978596 6.292969 -0.386960
-v -1.992812 5.625000 -0.392500
-v -2.281113 7.628906 -1.210801
-v -2.225469 7.031250 -1.155156
-v -1.769746 6.292969 -0.699434
-v -1.780312 5.625000 -0.710000
-v -1.740569 7.628906 -1.571726
-v -1.709707 7.031250 -1.499590
-v -1.457273 6.292969 -0.908284
-v -1.462812 5.625000 -0.922500
-v -1.070312 7.628906 -1.703125
-v -1.070312 7.031250 -1.625000
-v -1.070312 6.292969 -0.984375
-v -1.070312 5.625000 -1.000000
-v -0.400056 7.628906 -1.571726
-v -0.430918 7.031250 -1.499590
-v -0.683352 6.292969 -0.908284
-v -0.677812 5.625000 -0.922500
-v 0.140489 7.628906 -1.210801
-v 0.084844 7.031250 -1.155156
-v -0.370879 6.292969 -0.699434
-v -0.360312 5.625000 -0.710000
-v 0.501414 7.628906 -0.670256
-v 0.429278 7.031250 -0.639395
-v -0.162029 6.292969 -0.386960
-v -0.147812 5.625000 -0.392500
-v 1.210938 5.179688 0.000000
-v 3.054688 4.875000 0.000000
-v 4.710938 4.570313 0.000000
-v 5.429688 4.125000 0.000000
-v 1.034141 5.179688 0.895391
-v 2.735000 4.875000 1.619062
-v 4.262891 4.570313 2.269140
-v 4.925938 4.125000 2.551250
-v 0.549375 5.179688 1.619688
-v 1.858438 4.875000 2.928750
-v 3.034375 4.570313 4.104687
-v 3.544688 4.125000 4.615000
-v -0.174922 5.179688 2.104453
-v 0.548750 4.875000 3.805313
-v 1.198828 4.570313 5.333203
-v 1.480938 4.125000 5.996250
-v -1.070312 5.179688 2.281250
-v -1.070312 4.875000 4.125000
-v -1.070312 4.570313 5.781250
-v -1.070312 4.125000 6.500000
-v -1.965703 5.179688 2.104453
-v -2.689375 4.875000 3.805313
-v -3.339453 4.570313 5.333203
-v -3.621562 4.125000 5.996250
-v -2.690000 5.179688 1.619688
-v -3.999062 4.875000 2.928750
-v -5.174999 4.570313 4.104687
-v -5.685312 4.125000 4.615000
-v -3.174765 5.179688 0.895391
-v -4.875625 4.875000 1.619062
-v -6.403516 4.570313 2.269140
-v -7.066563 4.125000 2.551250
-v -3.351562 5.179688 0.000000
-v -5.195313 4.875000 0.000000
-v -6.851563 4.570313 0.000000
-v -7.570313 4.125000 0.000000
-v -3.174765 5.179688 -0.895391
-v -4.875625 4.875000 -1.619062
-v -6.403516 4.570313 -2.269140
-v -7.066563 4.125000 -2.551250
-v -2.690000 5.179688 -1.619688
-v -3.999062 4.875000 -2.928750
-v -5.174999 4.570313 -4.104687
-v -5.685312 4.125000 -4.615000
-v -1.965703 5.179688 -2.104453
-v -2.689375 4.875000 -3.805313
-v -3.339453 4.570313 -5.333203
-v -3.621562 4.125000 -5.996250
-v -1.070312 5.179688 -2.281250
-v -1.070312 4.875000 -4.125000
-v -1.070312 4.570313 -5.781250
-v -1.070312 4.125000 -6.500000
-v -0.174922 5.179688 -2.104453
-v 0.548750 4.875000 -3.805313
-v 1.198828 4.570313 -5.333203
-v 1.480938 4.125000 -5.996250
-v 0.549375 5.179688 -1.619688
-v 1.858438 4.875000 -2.928750
-v 3.034375 4.570313 -4.104687
-v 3.544688 4.125000 -4.615000
-v 1.034141 5.179688 -0.895391
-v 2.735000 4.875000 -1.619062
-v 4.262891 4.570313 -2.269140
-v 4.925938 4.125000 -2.551250
-# 530 vertices
-
-vt 2.000000 2.000000 0.000000
-vt 2.000000 1.975000 0.000000
-vt 2.000000 1.950000 0.000000
-vt 2.000000 1.925000 0.000000
-vt 2.000000 1.900000 0.000000
-vt 1.750000 2.000000 0.000000
-vt 1.750000 1.975000 0.000000
-vt 1.750000 1.950000 0.000000
-vt 1.750000 1.925000 0.000000
-vt 1.750000 1.900000 0.000000
-vt 1.500000 2.000000 0.000000
-vt 1.500000 1.975000 0.000000
-vt 1.500000 1.950000 0.000000
-vt 1.500000 1.925000 0.000000
-vt 1.500000 1.900000 0.000000
-vt 1.250000 2.000000 0.000000
-vt 1.250000 1.975000 0.000000
-vt 1.250000 1.950000 0.000000
-vt 1.250000 1.925000 0.000000
-vt 1.250000 1.900000 0.000000
-vt 1.000000 2.000000 0.000000
-vt 1.000000 1.975000 0.000000
-vt 1.000000 1.950000 0.000000
-vt 1.000000 1.925000 0.000000
-vt 1.000000 1.900000 0.000000
-vt 1.000000 2.000000 0.000000
-vt 1.000000 1.975000 0.000000
-vt 1.000000 1.950000 0.000000
-vt 1.000000 1.925000 0.000000
-vt 1.000000 1.900000 0.000000
-vt 0.750000 2.000000 0.000000
-vt 0.750000 1.975000 0.000000
-vt 0.750000 1.950000 0.000000
-vt 0.750000 1.925000 0.000000
-vt 0.750000 1.900000 0.000000
-vt 0.500000 2.000000 0.000000
-vt 0.500000 1.975000 0.000000
-vt 0.500000 1.950000 0.000000
-vt 0.500000 1.925000 0.000000
-vt 0.500000 1.900000 0.000000
-vt 0.250000 2.000000 0.000000
-vt 0.250000 1.975000 0.000000
-vt 0.250000 1.950000 0.000000
-vt 0.250000 1.925000 0.000000
-vt 0.250000 1.900000 0.000000
-vt 0.000000 2.000000 0.000000
-vt 0.000000 1.975000 0.000000
-vt 0.000000 1.950000 0.000000
-vt 0.000000 1.925000 0.000000
-vt 0.000000 1.900000 0.000000
-vt 2.000000 2.000000 0.000000
-vt 2.000000 1.975000 0.000000
-vt 2.000000 1.950000 0.000000
-vt 2.000000 1.925000 0.000000
-vt 2.000000 1.900000 0.000000
-vt 1.750000 2.000000 0.000000
-vt 1.750000 1.975000 0.000000
-vt 1.750000 1.950000 0.000000
-vt 1.750000 1.925000 0.000000
-vt 1.750000 1.900000 0.000000
-vt 1.500000 2.000000 0.000000
-vt 1.500000 1.975000 0.000000
-vt 1.500000 1.950000 0.000000
-vt 1.500000 1.925000 0.000000
-vt 1.500000 1.900000 0.000000
-vt 1.250000 2.000000 0.000000
-vt 1.250000 1.975000 0.000000
-vt 1.250000 1.950000 0.000000
-vt 1.250000 1.925000 0.000000
-vt 1.250000 1.900000 0.000000
-vt 1.000000 2.000000 0.000000
-vt 1.000000 1.975000 0.000000
-vt 1.000000 1.950000 0.000000
-vt 1.000000 1.925000 0.000000
-vt 1.000000 1.900000 0.000000
-vt 1.000000 2.000000 0.000000
-vt 1.000000 1.975000 0.000000
-vt 1.000000 1.950000 0.000000
-vt 1.000000 1.925000 0.000000
-vt 1.000000 1.900000 0.000000
-vt 0.750000 2.000000 0.000000
-vt 0.750000 1.975000 0.000000
-vt 0.750000 1.950000 0.000000
-vt 0.750000 1.925000 0.000000
-vt 0.750000 1.900000 0.000000
-vt 0.500000 2.000000 0.000000
-vt 0.500000 1.975000 0.000000
-vt 0.500000 1.950000 0.000000
-vt 0.500000 1.925000 0.000000
-vt 0.500000 1.900000 0.000000
-vt 0.250000 2.000000 0.000000
-vt 0.250000 1.975000 0.000000
-vt 0.250000 1.950000 0.000000
-vt 0.250000 1.925000 0.000000
-vt 0.250000 1.900000 0.000000
-vt 0.000000 2.000000 0.000000
-vt 0.000000 1.975000 0.000000
-vt 0.000000 1.950000 0.000000
-vt 0.000000 1.925000 0.000000
-vt 0.000000 1.900000 0.000000
-vt 2.000000 1.900000 0.000000
-vt 2.000000 1.675000 0.000000
-vt 2.000000 1.450000 0.000000
-vt 2.000000 1.225000 0.000000
-vt 2.000000 1.000000 0.000000
-vt 1.750000 1.900000 0.000000
-vt 1.750000 1.675000 0.000000
-vt 1.750000 1.450000 0.000000
-vt 1.750000 1.225000 0.000000
-vt 1.750000 1.000000 0.000000
-vt 1.500000 1.900000 0.000000
-vt 1.500000 1.675000 0.000000
-vt 1.500000 1.450000 0.000000
-vt 1.500000 1.225000 0.000000
-vt 1.500000 1.000000 0.000000
-vt 1.250000 1.900000 0.000000
-vt 1.250000 1.675000 0.000000
-vt 1.250000 1.450000 0.000000
-vt 1.250000 1.225000 0.000000
-vt 1.250000 1.000000 0.000000
-vt 1.000000 1.900000 0.000000
-vt 1.000000 1.675000 0.000000
-vt 1.000000 1.450000 0.000000
-vt 1.000000 1.225000 0.000000
-vt 1.000000 1.000000 0.000000
-vt 1.000000 1.900000 0.000000
-vt 1.000000 1.675000 0.000000
-vt 1.000000 1.450000 0.000000
-vt 1.000000 1.225000 0.000000
-vt 1.000000 1.000000 0.000000
-vt 0.750000 1.900000 0.000000
-vt 0.750000 1.675000 0.000000
-vt 0.750000 1.450000 0.000000
-vt 0.750000 1.225000 0.000000
-vt 0.750000 1.000000 0.000000
-vt 0.500000 1.900000 0.000000
-vt 0.500000 1.675000 0.000000
-vt 0.500000 1.450000 0.000000
-vt 0.500000 1.225000 0.000000
-vt 0.500000 1.000000 0.000000
-vt 0.250000 1.900000 0.000000
-vt 0.250000 1.675000 0.000000
-vt 0.250000 1.450000 0.000000
-vt 0.250000 1.225000 0.000000
-vt 0.250000 1.000000 0.000000
-vt 0.000000 1.900000 0.000000
-vt 0.000000 1.675000 0.000000
-vt 0.000000 1.450000 0.000000
-vt 0.000000 1.225000 0.000000
-vt 0.000000 1.000000 0.000000
-vt 2.000000 1.900000 0.000000
-vt 2.000000 1.675000 0.000000
-vt 2.000000 1.450000 0.000000
-vt 2.000000 1.225000 0.000000
-vt 2.000000 1.000000 0.000000
-vt 1.750000 1.900000 0.000000
-vt 1.750000 1.675000 0.000000
-vt 1.750000 1.450000 0.000000
-vt 1.750000 1.225000 0.000000
-vt 1.750000 1.000000 0.000000
-vt 1.500000 1.900000 0.000000
-vt 1.500000 1.675000 0.000000
-vt 1.500000 1.450000 0.000000
-vt 1.500000 1.225000 0.000000
-vt 1.500000 1.000000 0.000000
-vt 1.250000 1.900000 0.000000
-vt 1.250000 1.675000 0.000000
-vt 1.250000 1.450000 0.000000
-vt 1.250000 1.225000 0.000000
-vt 1.250000 1.000000 0.000000
-vt 1.000000 1.900000 0.000000
-vt 1.000000 1.675000 0.000000
-vt 1.000000 1.450000 0.000000
-vt 1.000000 1.225000 0.000000
-vt 1.000000 1.000000 0.000000
-vt 1.000000 1.900000 0.000000
-vt 1.000000 1.675000 0.000000
-vt 1.000000 1.450000 0.000000
-vt 1.000000 1.225000 0.000000
-vt 1.000000 1.000000 0.000000
-vt 0.750000 1.900000 0.000000
-vt 0.750000 1.675000 0.000000
-vt 0.750000 1.450000 0.000000
-vt 0.750000 1.225000 0.000000
-vt 0.750000 1.000000 0.000000
-vt 0.500000 1.900000 0.000000
-vt 0.500000 1.675000 0.000000
-vt 0.500000 1.450000 0.000000
-vt 0.500000 1.225000 0.000000
-vt 0.500000 1.000000 0.000000
-vt 0.250000 1.900000 0.000000
-vt 0.250000 1.675000 0.000000
-vt 0.250000 1.450000 0.000000
-vt 0.250000 1.225000 0.000000
-vt 0.250000 1.000000 0.000000
-vt 0.000000 1.900000 0.000000
-vt 0.000000 1.675000 0.000000
-vt 0.000000 1.450000 0.000000
-vt 0.000000 1.225000 0.000000
-vt 0.000000 1.000000 0.000000
-vt 2.000000 1.000000 0.000000
-vt 2.000000 0.850000 0.000000
-vt 2.000000 0.700000 0.000000
-vt 2.000000 0.550000 0.000000
-vt 2.000000 0.400000 0.000000
-vt 1.750000 1.000000 0.000000
-vt 1.750000 0.850000 0.000000
-vt 1.750000 0.700000 0.000000
-vt 1.750000 0.550000 0.000000
-vt 1.750000 0.400000 0.000000
-vt 1.500000 1.000000 0.000000
-vt 1.500000 0.850000 0.000000
-vt 1.500000 0.700000 0.000000
-vt 1.500000 0.550000 0.000000
-vt 1.500000 0.400000 0.000000
-vt 1.250000 1.000000 0.000000
-vt 1.250000 0.850000 0.000000
-vt 1.250000 0.700000 0.000000
-vt 1.250000 0.550000 0.000000
-vt 1.250000 0.400000 0.000000
-vt 1.000000 1.000000 0.000000
-vt 1.000000 0.850000 0.000000
-vt 1.000000 0.700000 0.000000
-vt 1.000000 0.550000 0.000000
-vt 1.000000 0.400000 0.000000
-vt 1.000000 1.000000 0.000000
-vt 1.000000 0.850000 0.000000
-vt 1.000000 0.700000 0.000000
-vt 1.000000 0.550000 0.000000
-vt 1.000000 0.400000 0.000000
-vt 0.750000 1.000000 0.000000
-vt 0.750000 0.850000 0.000000
-vt 0.750000 0.700000 0.000000
-vt 0.750000 0.550000 0.000000
-vt 0.750000 0.400000 0.000000
-vt 0.500000 1.000000 0.000000
-vt 0.500000 0.850000 0.000000
-vt 0.500000 0.700000 0.000000
-vt 0.500000 0.550000 0.000000
-vt 0.500000 0.400000 0.000000
-vt 0.250000 1.000000 0.000000
-vt 0.250000 0.850000 0.000000
-vt 0.250000 0.700000 0.000000
-vt 0.250000 0.550000 0.000000
-vt 0.250000 0.400000 0.000000
-vt 0.000000 1.000000 0.000000
-vt 0.000000 0.850000 0.000000
-vt 0.000000 0.700000 0.000000
-vt 0.000000 0.550000 0.000000
-vt 0.000000 0.400000 0.000000
-vt 2.000000 1.000000 0.000000
-vt 2.000000 0.850000 0.000000
-vt 2.000000 0.700000 0.000000
-vt 2.000000 0.550000 0.000000
-vt 2.000000 0.400000 0.000000
-vt 1.750000 1.000000 0.000000
-vt 1.750000 0.850000 0.000000
-vt 1.750000 0.700000 0.000000
-vt 1.750000 0.550000 0.000000
-vt 1.750000 0.400000 0.000000
-vt 1.500000 1.000000 0.000000
-vt 1.500000 0.850000 0.000000
-vt 1.500000 0.700000 0.000000
-vt 1.500000 0.550000 0.000000
-vt 1.500000 0.400000 0.000000
-vt 1.250000 1.000000 0.000000
-vt 1.250000 0.850000 0.000000
-vt 1.250000 0.700000 0.000000
-vt 1.250000 0.550000 0.000000
-vt 1.250000 0.400000 0.000000
-vt 1.000000 1.000000 0.000000
-vt 1.000000 0.850000 0.000000
-vt 1.000000 0.700000 0.000000
-vt 1.000000 0.550000 0.000000
-vt 1.000000 0.400000 0.000000
-vt 1.000000 1.000000 0.000000
-vt 1.000000 0.850000 0.000000
-vt 1.000000 0.700000 0.000000
-vt 1.000000 0.550000 0.000000
-vt 1.000000 0.400000 0.000000
-vt 0.750000 1.000000 0.000000
-vt 0.750000 0.850000 0.000000
-vt 0.750000 0.700000 0.000000
-vt 0.750000 0.550000 0.000000
-vt 0.750000 0.400000 0.000000
-vt 0.500000 1.000000 0.000000
-vt 0.500000 0.850000 0.000000
-vt 0.500000 0.700000 0.000000
-vt 0.500000 0.550000 0.000000
-vt 0.500000 0.400000 0.000000
-vt 0.250000 1.000000 0.000000
-vt 0.250000 0.850000 0.000000
-vt 0.250000 0.700000 0.000000
-vt 0.250000 0.550000 0.000000
-vt 0.250000 0.400000 0.000000
-vt 0.000000 1.000000 0.000000
-vt 0.000000 0.850000 0.000000
-vt 0.000000 0.700000 0.000000
-vt 0.000000 0.550000 0.000000
-vt 0.000000 0.400000 0.000000
-vt 2.000000 0.400000 0.000000
-vt 2.000000 0.300000 0.000000
-vt 2.000000 0.200000 0.000000
-vt 2.000000 0.100000 0.000000
-vt 2.000000 0.000000 0.000000
-vt 1.750000 0.400000 0.000000
-vt 1.750000 0.300000 0.000000
-vt 1.750000 0.200000 0.000000
-vt 1.750000 0.100000 0.000000
-vt 1.750000 0.000000 0.000000
-vt 1.500000 0.400000 0.000000
-vt 1.500000 0.300000 0.000000
-vt 1.500000 0.200000 0.000000
-vt 1.500000 0.100000 0.000000
-vt 1.500000 0.000000 0.000000
-vt 1.250000 0.400000 0.000000
-vt 1.250000 0.300000 0.000000
-vt 1.250000 0.200000 0.000000
-vt 1.250000 0.100000 0.000000
-vt 1.250000 0.000000 0.000000
-vt 1.000000 0.400000 0.000000
-vt 1.000000 0.300000 0.000000
-vt 1.000000 0.200000 0.000000
-vt 1.000000 0.100000 0.000000
-vt 1.000000 0.000000 0.000000
-vt 1.000000 0.400000 0.000000
-vt 1.000000 0.300000 0.000000
-vt 1.000000 0.200000 0.000000
-vt 1.000000 0.100000 0.000000
-vt 1.000000 0.000000 0.000000
-vt 0.750000 0.400000 0.000000
-vt 0.750000 0.300000 0.000000
-vt 0.750000 0.200000 0.000000
-vt 0.750000 0.100000 0.000000
-vt 0.750000 0.000000 0.000000
-vt 0.500000 0.400000 0.000000
-vt 0.500000 0.300000 0.000000
-vt 0.500000 0.200000 0.000000
-vt 0.500000 0.100000 0.000000
-vt 0.500000 0.000000 0.000000
-vt 0.250000 0.400000 0.000000
-vt 0.250000 0.300000 0.000000
-vt 0.250000 0.200000 0.000000
-vt 0.250000 0.100000 0.000000
-vt 0.250000 0.000000 0.000000
-vt 0.000000 0.400000 0.000000
-vt 0.000000 0.300000 0.000000
-vt 0.000000 0.200000 0.000000
-vt 0.000000 0.100000 0.000000
-vt 0.000000 0.000000 0.000000
-vt 2.000000 0.400000 0.000000
-vt 2.000000 0.300000 0.000000
-vt 2.000000 0.200000 0.000000
-vt 2.000000 0.100000 0.000000
-vt 2.000000 0.000000 0.000000
-vt 1.750000 0.400000 0.000000
-vt 1.750000 0.300000 0.000000
-vt 1.750000 0.200000 0.000000
-vt 1.750000 0.100000 0.000000
-vt 1.750000 0.000000 0.000000
-vt 1.500000 0.400000 0.000000
-vt 1.500000 0.300000 0.000000
-vt 1.500000 0.200000 0.000000
-vt 1.500000 0.100000 0.000000
-vt 1.500000 0.000000 0.000000
-vt 1.250000 0.400000 0.000000
-vt 1.250000 0.300000 0.000000
-vt 1.250000 0.200000 0.000000
-vt 1.250000 0.100000 0.000000
-vt 1.250000 0.000000 0.000000
-vt 1.000000 0.400000 0.000000
-vt 1.000000 0.300000 0.000000
-vt 1.000000 0.200000 0.000000
-vt 1.000000 0.100000 0.000000
-vt 1.000000 0.000000 0.000000
-vt 1.000000 0.400000 0.000000
-vt 1.000000 0.300000 0.000000
-vt 1.000000 0.200000 0.000000
-vt 1.000000 0.100000 0.000000
-vt 1.000000 0.000000 0.000000
-vt 0.750000 0.400000 0.000000
-vt 0.750000 0.300000 0.000000
-vt 0.750000 0.200000 0.000000
-vt 0.750000 0.100000 0.000000
-vt 0.750000 0.000000 0.000000
-vt 0.500000 0.400000 0.000000
-vt 0.500000 0.300000 0.000000
-vt 0.500000 0.200000 0.000000
-vt 0.500000 0.100000 0.000000
-vt 0.500000 0.000000 0.000000
-vt 0.250000 0.400000 0.000000
-vt 0.250000 0.300000 0.000000
-vt 0.250000 0.200000 0.000000
-vt 0.250000 0.100000 0.000000
-vt 0.250000 0.000000 0.000000
-vt 0.000000 0.400000 0.000000
-vt 0.000000 0.300000 0.000000
-vt 0.000000 0.200000 0.000000
-vt 0.000000 0.100000 0.000000
-vt 0.000000 0.000000 0.000000
-vt 1.000000 1.000000 0.000000
-vt 1.000000 0.875000 0.000000
-vt 1.000000 0.750000 0.000000
-vt 1.000000 0.625000 0.000000
-vt 1.000000 0.500000 0.000000
-vt 0.875000 1.000000 0.000000
-vt 0.875000 0.875000 0.000000
-vt 0.875000 0.750000 0.000000
-vt 0.875000 0.625000 0.000000
-vt 0.875000 0.500000 0.000000
-vt 0.750000 1.000000 0.000000
-vt 0.750000 0.875000 0.000000
-vt 0.750000 0.750000 0.000000
-vt 0.750000 0.625000 0.000000
-vt 0.750000 0.500000 0.000000
-vt 0.625000 1.000000 0.000000
-vt 0.625000 0.875000 0.000000
-vt 0.625000 0.750000 0.000000
-vt 0.625000 0.625000 0.000000
-vt 0.625000 0.500000 0.000000
-vt 0.500000 1.000000 0.000000
-vt 0.500000 0.875000 0.000000
-vt 0.500000 0.750000 0.000000
-vt 0.500000 0.625000 0.000000
-vt 0.500000 0.500000 0.000000
-vt 0.500000 1.000000 0.000000
-vt 0.500000 0.875000 0.000000
-vt 0.500000 0.750000 0.000000
-vt 0.500000 0.625000 0.000000
-vt 0.500000 0.500000 0.000000
-vt 0.375000 1.000000 0.000000
-vt 0.375000 0.875000 0.000000
-vt 0.375000 0.750000 0.000000
-vt 0.375000 0.625000 0.000000
-vt 0.375000 0.500000 0.000000
-vt 0.250000 1.000000 0.000000
-vt 0.250000 0.875000 0.000000
-vt 0.250000 0.750000 0.000000
-vt 0.250000 0.625000 0.000000
-vt 0.250000 0.500000 0.000000
-vt 0.125000 1.000000 0.000000
-vt 0.125000 0.875000 0.000000
-vt 0.125000 0.750000 0.000000
-vt 0.125000 0.625000 0.000000
-vt 0.125000 0.500000 0.000000
-vt 0.000000 1.000000 0.000000
-vt 0.000000 0.875000 0.000000
-vt 0.000000 0.750000 0.000000
-vt 0.000000 0.625000 0.000000
-vt 0.000000 0.500000 0.000000
-vt 1.000000 0.500000 0.000000
-vt 1.000000 0.375000 0.000000
-vt 1.000000 0.250000 0.000000
-vt 1.000000 0.125000 0.000000
-vt 1.000000 0.000000 0.000000
-vt 0.875000 0.500000 0.000000
-vt 0.875000 0.375000 0.000000
-vt 0.875000 0.250000 0.000000
-vt 0.875000 0.125000 0.000000
-vt 0.875000 0.000000 0.000000
-vt 0.750000 0.500000 0.000000
-vt 0.750000 0.375000 0.000000
-vt 0.750000 0.250000 0.000000
-vt 0.750000 0.125000 0.000000
-vt 0.750000 0.000000 0.000000
-vt 0.625000 0.500000 0.000000
-vt 0.625000 0.375000 0.000000
-vt 0.625000 0.250000 0.000000
-vt 0.625000 0.125000 0.000000
-vt 0.625000 0.000000 0.000000
-vt 0.500000 0.500000 0.000000
-vt 0.500000 0.375000 0.000000
-vt 0.500000 0.250000 0.000000
-vt 0.500000 0.125000 0.000000
-vt 0.500000 0.000000 0.000000
-vt 0.500000 0.500000 0.000000
-vt 0.500000 0.375000 0.000000
-vt 0.500000 0.250000 0.000000
-vt 0.500000 0.125000 0.000000
-vt 0.500000 0.000000 0.000000
-vt 0.375000 0.500000 0.000000
-vt 0.375000 0.375000 0.000000
-vt 0.375000 0.250000 0.000000
-vt 0.375000 0.125000 0.000000
-vt 0.375000 0.000000 0.000000
-vt 0.250000 0.500000 0.000000
-vt 0.250000 0.375000 0.000000
-vt 0.250000 0.250000 0.000000
-vt 0.250000 0.125000 0.000000
-vt 0.250000 0.000000 0.000000
-vt 0.125000 0.500000 0.000000
-vt 0.125000 0.375000 0.000000
-vt 0.125000 0.250000 0.000000
-vt 0.125000 0.125000 0.000000
-vt 0.125000 0.000000 0.000000
-vt 0.000000 0.500000 0.000000
-vt 0.000000 0.375000 0.000000
-vt 0.000000 0.250000 0.000000
-vt 0.000000 0.125000 0.000000
-vt 0.000000 0.000000 0.000000
-vt 0.500000 0.000000 0.000000
-vt 0.500000 0.225000 0.000000
-vt 0.500000 0.450000 0.000000
-vt 0.500000 0.675000 0.000000
-vt 0.500000 0.900000 0.000000
-vt 0.625000 0.000000 0.000000
-vt 0.625000 0.225000 0.000000
-vt 0.625000 0.450000 0.000000
-vt 0.625000 0.675000 0.000000
-vt 0.625000 0.900000 0.000000
-vt 0.750000 0.000000 0.000000
-vt 0.750000 0.225000 0.000000
-vt 0.750000 0.450000 0.000000
-vt 0.750000 0.675000 0.000000
-vt 0.750000 0.900000 0.000000
-vt 0.875000 0.000000 0.000000
-vt 0.875000 0.225000 0.000000
-vt 0.875000 0.450000 0.000000
-vt 0.875000 0.675000 0.000000
-vt 0.875000 0.900000 0.000000
-vt 1.000000 0.000000 0.000000
-vt 1.000000 0.225000 0.000000
-vt 1.000000 0.450000 0.000000
-vt 1.000000 0.675000 0.000000
-vt 1.000000 0.900000 0.000000
-vt 0.000000 0.000000 0.000000
-vt 0.000000 0.225000 0.000000
-vt 0.000000 0.450000 0.000000
-vt 0.000000 0.675000 0.000000
-vt 0.000000 0.900000 0.000000
-vt 0.125000 0.000000 0.000000
-vt 0.125000 0.225000 0.000000
-vt 0.125000 0.450000 0.000000
-vt 0.125000 0.675000 0.000000
-vt 0.125000 0.900000 0.000000
-vt 0.250000 0.000000 0.000000
-vt 0.250000 0.225000 0.000000
-vt 0.250000 0.450000 0.000000
-vt 0.250000 0.675000 0.000000
-vt 0.250000 0.900000 0.000000
-vt 0.375000 0.000000 0.000000
-vt 0.375000 0.225000 0.000000
-vt 0.375000 0.450000 0.000000
-vt 0.375000 0.675000 0.000000
-vt 0.375000 0.900000 0.000000
-vt 0.500000 0.000000 0.000000
-vt 0.500000 0.225000 0.000000
-vt 0.500000 0.450000 0.000000
-vt 0.500000 0.675000 0.000000
-vt 0.500000 0.900000 0.000000
-vt 0.500000 0.900000 0.000000
-vt 0.500000 0.925000 0.000000
-vt 0.500000 0.950000 0.000000
-vt 0.500000 0.975000 0.000000
-vt 0.500000 1.000000 0.000000
-vt 0.625000 0.900000 0.000000
-vt 0.625000 0.925000 0.000000
-vt 0.625000 0.950000 0.000000
-vt 0.625000 0.975000 0.000000
-vt 0.625000 1.000000 0.000000
-vt 0.750000 0.900000 0.000000
-vt 0.750000 0.925000 0.000000
-vt 0.750000 0.950000 0.000000
-vt 0.750000 0.975000 0.000000
-vt 0.750000 1.000000 0.000000
-vt 0.875000 0.900000 0.000000
-vt 0.875000 0.925000 0.000000
-vt 0.875000 0.950000 0.000000
-vt 0.875000 0.975000 0.000000
-vt 0.875000 1.000000 0.000000
-vt 1.000000 0.900000 0.000000
-vt 1.000000 0.925000 0.000000
-vt 1.000000 0.950000 0.000000
-vt 1.000000 0.975000 0.000000
-vt 1.000000 1.000000 0.000000
-vt 0.000000 0.900000 0.000000
-vt 0.000000 0.925000 0.000000
-vt 0.000000 0.950000 0.000000
-vt 0.000000 0.975000 0.000000
-vt 0.000000 1.000000 0.000000
-vt 0.125000 0.900000 0.000000
-vt 0.125000 0.925000 0.000000
-vt 0.125000 0.950000 0.000000
-vt 0.125000 0.975000 0.000000
-vt 0.125000 1.000000 0.000000
-vt 0.250000 0.900000 0.000000
-vt 0.250000 0.925000 0.000000
-vt 0.250000 0.950000 0.000000
-vt 0.250000 0.975000 0.000000
-vt 0.250000 1.000000 0.000000
-vt 0.375000 0.900000 0.000000
-vt 0.375000 0.925000 0.000000
-vt 0.375000 0.950000 0.000000
-vt 0.375000 0.975000 0.000000
-vt 0.375000 1.000000 0.000000
-vt 0.500000 0.900000 0.000000
-vt 0.500000 0.925000 0.000000
-vt 0.500000 0.950000 0.000000
-vt 0.500000 0.975000 0.000000
-vt 0.500000 1.000000 0.000000
-vt 1.000000 1.000000 0.000000
-vt 1.000000 0.750000 0.000000
-vt 1.000000 0.500000 0.000000
-vt 1.000000 0.250000 0.000000
-vt 1.000000 0.000000 0.000000
-vt 0.875000 1.000000 0.000000
-vt 0.875000 0.750000 0.000000
-vt 0.875000 0.500000 0.000000
-vt 0.875000 0.250000 0.000000
-vt 0.875000 0.000000 0.000000
-vt 0.750000 1.000000 0.000000
-vt 0.750000 0.750000 0.000000
-vt 0.750000 0.500000 0.000000
-vt 0.750000 0.250000 0.000000
-vt 0.750000 0.000000 0.000000
-vt 0.625000 1.000000 0.000000
-vt 0.625000 0.750000 0.000000
-vt 0.625000 0.500000 0.000000
-vt 0.625000 0.250000 0.000000
-vt 0.625000 0.000000 0.000000
-vt 0.500000 1.000000 0.000000
-vt 0.500000 0.750000 0.000000
-vt 0.500000 0.500000 0.000000
-vt 0.500000 0.250000 0.000000
-vt 0.500000 0.000000 0.000000
-vt 0.500000 1.000000 0.000000
-vt 0.500000 0.750000 0.000000
-vt 0.500000 0.500000 0.000000
-vt 0.500000 0.250000 0.000000
-vt 0.500000 0.000000 0.000000
-vt 0.375000 1.000000 0.000000
-vt 0.375000 0.750000 0.000000
-vt 0.375000 0.500000 0.000000
-vt 0.375000 0.250000 0.000000
-vt 0.375000 0.000000 0.000000
-vt 0.250000 1.000000 0.000000
-vt 0.250000 0.750000 0.000000
-vt 0.250000 0.500000 0.000000
-vt 0.250000 0.250000 0.000000
-vt 0.250000 0.000000 0.000000
-vt 0.125000 1.000000 0.000000
-vt 0.125000 0.750000 0.000000
-vt 0.125000 0.500000 0.000000
-vt 0.125000 0.250000 0.000000
-vt 0.125000 0.000000 0.000000
-vt 0.000000 1.000000 0.000000
-vt 0.000000 0.750000 0.000000
-vt 0.000000 0.500000 0.000000
-vt 0.000000 0.250000 0.000000
-vt 0.000000 0.000000 0.000000
-vt 1.000000 1.000000 0.000000
-vt 1.000000 0.750000 0.000000
-vt 1.000000 0.500000 0.000000
-vt 1.000000 0.250000 0.000000
-vt 1.000000 0.000000 0.000000
-vt 0.875000 1.000000 0.000000
-vt 0.875000 0.750000 0.000000
-vt 0.875000 0.500000 0.000000
-vt 0.875000 0.250000 0.000000
-vt 0.875000 0.000000 0.000000
-vt 0.750000 1.000000 0.000000
-vt 0.750000 0.750000 0.000000
-vt 0.750000 0.500000 0.000000
-vt 0.750000 0.250000 0.000000
-vt 0.750000 0.000000 0.000000
-vt 0.625000 1.000000 0.000000
-vt 0.625000 0.750000 0.000000
-vt 0.625000 0.500000 0.000000
-vt 0.625000 0.250000 0.000000
-vt 0.625000 0.000000 0.000000
-vt 0.500000 1.000000 0.000000
-vt 0.500000 0.750000 0.000000
-vt 0.500000 0.500000 0.000000
-vt 0.500000 0.250000 0.000000
-vt 0.500000 0.000000 0.000000
-vt 0.500000 1.000000 0.000000
-vt 0.500000 0.750000 0.000000
-vt 0.500000 0.500000 0.000000
-vt 0.500000 0.250000 0.000000
-vt 0.500000 0.000000 0.000000
-vt 0.375000 1.000000 0.000000
-vt 0.375000 0.750000 0.000000
-vt 0.375000 0.500000 0.000000
-vt 0.375000 0.250000 0.000000
-vt 0.375000 0.000000 0.000000
-vt 0.250000 1.000000 0.000000
-vt 0.250000 0.750000 0.000000
-vt 0.250000 0.500000 0.000000
-vt 0.250000 0.250000 0.000000
-vt 0.250000 0.000000 0.000000
-vt 0.125000 1.000000 0.000000
-vt 0.125000 0.750000 0.000000
-vt 0.125000 0.500000 0.000000
-vt 0.125000 0.250000 0.000000
-vt 0.125000 0.000000 0.000000
-vt 0.000000 1.000000 0.000000
-vt 0.000000 0.750000 0.000000
-vt 0.000000 0.500000 0.000000
-vt 0.000000 0.250000 0.000000
-vt 0.000000 0.000000 0.000000
-vt 1.000000 1.000000 0.000000
-vt 1.000000 0.750000 0.000000
-vt 1.000000 0.500000 0.000000
-vt 1.000000 0.250000 0.000000
-vt 1.000000 0.000000 0.000000
-vt 0.875000 1.000000 0.000000
-vt 0.875000 0.750000 0.000000
-vt 0.875000 0.500000 0.000000
-vt 0.875000 0.250000 0.000000
-vt 0.875000 0.000000 0.000000
-vt 0.750000 1.000000 0.000000
-vt 0.750000 0.750000 0.000000
-vt 0.750000 0.500000 0.000000
-vt 0.750000 0.250000 0.000000
-vt 0.750000 0.000000 0.000000
-vt 0.625000 1.000000 0.000000
-vt 0.625000 0.750000 0.000000
-vt 0.625000 0.500000 0.000000
-vt 0.625000 0.250000 0.000000
-vt 0.625000 0.000000 0.000000
-vt 0.500000 1.000000 0.000000
-vt 0.500000 0.750000 0.000000
-vt 0.500000 0.500000 0.000000
-vt 0.500000 0.250000 0.000000
-vt 0.500000 0.000000 0.000000
-vt 0.500000 1.000000 0.000000
-vt 0.500000 0.750000 0.000000
-vt 0.500000 0.500000 0.000000
-vt 0.500000 0.250000 0.000000
-vt 0.500000 0.000000 0.000000
-vt 0.375000 1.000000 0.000000
-vt 0.375000 0.750000 0.000000
-vt 0.375000 0.500000 0.000000
-vt 0.375000 0.250000 0.000000
-vt 0.375000 0.000000 0.000000
-vt 0.250000 1.000000 0.000000
-vt 0.250000 0.750000 0.000000
-vt 0.250000 0.500000 0.000000
-vt 0.250000 0.250000 0.000000
-vt 0.250000 0.000000 0.000000
-vt 0.125000 1.000000 0.000000
-vt 0.125000 0.750000 0.000000
-vt 0.125000 0.500000 0.000000
-vt 0.125000 0.250000 0.000000
-vt 0.125000 0.000000 0.000000
-vt 0.000000 1.000000 0.000000
-vt 0.000000 0.750000 0.000000
-vt 0.000000 0.500000 0.000000
-vt 0.000000 0.250000 0.000000
-vt 0.000000 0.000000 0.000000
-vt 1.000000 1.000000 0.000000
-vt 1.000000 0.750000 0.000000
-vt 1.000000 0.500000 0.000000
-vt 1.000000 0.250000 0.000000
-vt 1.000000 0.000000 0.000000
-vt 0.875000 1.000000 0.000000
-vt 0.875000 0.750000 0.000000
-vt 0.875000 0.500000 0.000000
-vt 0.875000 0.250000 0.000000
-vt 0.875000 0.000000 0.000000
-vt 0.750000 1.000000 0.000000
-vt 0.750000 0.750000 0.000000
-vt 0.750000 0.500000 0.000000
-vt 0.750000 0.250000 0.000000
-vt 0.750000 0.000000 0.000000
-vt 0.625000 1.000000 0.000000
-vt 0.625000 0.750000 0.000000
-vt 0.625000 0.500000 0.000000
-vt 0.625000 0.250000 0.000000
-vt 0.625000 0.000000 0.000000
-vt 0.500000 1.000000 0.000000
-vt 0.500000 0.750000 0.000000
-vt 0.500000 0.500000 0.000000
-vt 0.500000 0.250000 0.000000
-vt 0.500000 0.000000 0.000000
-vt 0.500000 1.000000 0.000000
-vt 0.500000 0.750000 0.000000
-vt 0.500000 0.500000 0.000000
-vt 0.500000 0.250000 0.000000
-vt 0.500000 0.000000 0.000000
-vt 0.375000 1.000000 0.000000
-vt 0.375000 0.750000 0.000000
-vt 0.375000 0.500000 0.000000
-vt 0.375000 0.250000 0.000000
-vt 0.375000 0.000000 0.000000
-vt 0.250000 1.000000 0.000000
-vt 0.250000 0.750000 0.000000
-vt 0.250000 0.500000 0.000000
-vt 0.250000 0.250000 0.000000
-vt 0.250000 0.000000 0.000000
-vt 0.125000 1.000000 0.000000
-vt 0.125000 0.750000 0.000000
-vt 0.125000 0.500000 0.000000
-vt 0.125000 0.250000 0.000000
-vt 0.125000 0.000000 0.000000
-vt 0.000000 1.000000 0.000000
-vt 0.000000 0.750000 0.000000
-vt 0.000000 0.500000 0.000000
-vt 0.000000 0.250000 0.000000
-vt 0.000000 0.000000 0.000000
-# 800 texture vertices
-
-vn -0.966742 -0.255752 0.000000
-vn -0.966824 0.255443 0.000000
-vn -0.092052 0.995754 0.000000
-vn 0.682050 0.731305 0.000000
-vn 0.870301 0.492521 0.000000
-vn -0.893014 -0.256345 -0.369882
-vn -0.893437 0.255996 -0.369102
-vn -0.083877 0.995843 -0.035507
-vn 0.629724 0.731860 0.260439
-vn 0.803725 0.493370 0.332584
-vn -0.683407 -0.256728 -0.683407
-vn -0.683531 0.256068 -0.683531
-vn -0.064925 0.995776 -0.064925
-vn 0.481399 0.732469 0.481399
-vn 0.614804 0.493997 0.614804
-vn -0.369882 -0.256345 -0.893014
-vn -0.369102 0.255996 -0.893437
-vn -0.035507 0.995843 -0.083877
-vn 0.260439 0.731860 0.629724
-vn 0.332584 0.493369 0.803725
-vn -0.002848 -0.257863 -0.966177
-vn -0.001923 0.254736 -0.967009
-vn -0.000266 0.995734 -0.092270
-vn 0.000024 0.731295 0.682061
-vn -0.000000 0.492521 0.870301
-vn 0.379058 -0.359300 -0.852771
-vn 0.377110 0.149085 -0.914091
-vn 0.027502 0.992081 -0.122552
-vn -0.261010 0.726762 0.635367
-vn -0.332485 0.492546 0.804271
-vn 0.663548 -0.410790 -0.625264
-vn 0.712664 0.073722 -0.697621
-vn 0.099726 0.987509 -0.121983
-vn -0.487320 0.723754 0.488569
-vn -0.615242 0.492602 0.615484
-vn 0.880028 -0.332906 -0.338709
-vn 0.917276 0.167113 -0.361493
-vn 0.113584 0.992365 -0.048070
-vn -0.634150 0.727508 0.261889
-vn -0.804126 0.492634 0.332705
-vn 0.966690 -0.255738 0.010454
-vn 0.967442 0.252962 0.008103
-vn 0.093436 0.995624 0.001281
-vn -0.682167 0.731196 -0.000343
-vn -0.870322 0.492483 -0.000054
-vn 0.893014 -0.256345 0.369882
-vn 0.893437 0.255996 0.369102
-vn 0.083877 0.995843 0.035507
-vn -0.629724 0.731860 -0.260439
-vn -0.803725 0.493370 -0.332584
-vn 0.683407 -0.256728 0.683407
-vn 0.683531 0.256068 0.683531
-vn 0.064925 0.995776 0.064925
-vn -0.481399 0.732469 -0.481399
-vn -0.614804 0.493997 -0.614804
-vn 0.369882 -0.256345 0.893014
-vn 0.369102 0.255996 0.893437
-vn 0.035507 0.995843 0.083877
-vn -0.260439 0.731860 -0.629724
-vn -0.332584 0.493369 -0.803725
-vn 0.000000 -0.255752 0.966742
-vn 0.000000 0.255443 0.966824
-vn 0.000000 0.995754 0.092052
-vn 0.000000 0.731305 -0.682050
-vn 0.000000 0.492521 -0.870301
-vn -0.369882 -0.256345 0.893014
-vn -0.369102 0.255996 0.893437
-vn -0.035507 0.995843 0.083877
-vn 0.260439 0.731860 -0.629724
-vn 0.332584 0.493370 -0.803725
-vn -0.683407 -0.256728 0.683407
-vn -0.683531 0.256068 0.683531
-vn -0.064925 0.995776 0.064925
-vn 0.481399 0.732469 -0.481399
-vn 0.614804 0.493997 -0.614804
-vn -0.893014 -0.256345 0.369882
-vn -0.893437 0.255996 0.369102
-vn -0.083877 0.995843 0.035507
-vn 0.629724 0.731860 -0.260439
-vn 0.803725 0.493369 -0.332584
-vn 0.915321 0.402725 -0.000000
-vn 0.941808 0.336151 0.000000
-vn 0.978690 0.205342 0.000000
-vn 0.997804 -0.066240 -0.000000
-vn 0.845438 0.403546 0.349835
-vn 0.869996 0.336859 0.360047
-vn 0.904193 0.205791 0.374280
-vn 0.921879 -0.066370 0.381752
-vn 0.646802 0.404096 0.646802
-vn 0.665655 0.337351 0.665655
-vn 0.691923 0.206120 0.691923
-vn 0.705543 -0.066480 0.705542
-vn 0.349835 0.403546 0.845438
-vn 0.360047 0.336859 0.869996
-vn 0.374280 0.205791 0.904193
-vn 0.381752 -0.066369 0.921879
-vn 0.000000 0.402725 0.915321
-vn -0.000000 0.336151 0.941808
-vn 0.000000 0.205342 0.978690
-vn 0.000000 -0.066240 0.997804
-vn -0.349835 0.403546 0.845438
-vn -0.360047 0.336859 0.869996
-vn -0.374280 0.205791 0.904193
-vn -0.381752 -0.066370 0.921879
-vn -0.646802 0.404096 0.646802
-vn -0.665655 0.337351 0.665655
-vn -0.691923 0.206120 0.691923
-vn -0.705542 -0.066480 0.705543
-vn -0.845438 0.403546 0.349835
-vn -0.869996 0.336859 0.360047
-vn -0.904193 0.205791 0.374280
-vn -0.921879 -0.066369 0.381752
-vn -0.915321 0.402725 0.000000
-vn -0.941808 0.336151 -0.000000
-vn -0.978690 0.205342 0.000000
-vn -0.997804 -0.066240 0.000000
-vn -0.845438 0.403546 -0.349835
-vn -0.869996 0.336859 -0.360047
-vn -0.904193 0.205791 -0.374280
-vn -0.921879 -0.066370 -0.381752
-vn -0.646802 0.404096 -0.646802
-vn -0.665655 0.337351 -0.665655
-vn -0.691923 0.206120 -0.691923
-vn -0.705543 -0.066480 -0.705542
-vn -0.349835 0.403546 -0.845438
-vn -0.360047 0.336859 -0.869996
-vn -0.374280 0.205791 -0.904193
-vn -0.381752 -0.066369 -0.921879
-vn -0.000000 0.402725 -0.915321
-vn 0.000000 0.336151 -0.941808
-vn -0.000000 0.205342 -0.978690
-vn -0.000000 -0.066240 -0.997804
-vn 0.349835 0.403546 -0.845438
-vn 0.360047 0.336859 -0.869996
-vn 0.374280 0.205791 -0.904193
-vn 0.381752 -0.066370 -0.921879
-vn 0.646802 0.404096 -0.646802
-vn 0.665655 0.337351 -0.665655
-vn 0.691923 0.206120 -0.691923
-vn 0.705542 -0.066480 -0.705543
-vn 0.845438 0.403546 -0.349835
-vn 0.869996 0.336859 -0.360047
-vn 0.904193 0.205791 -0.374280
-vn 0.921879 -0.066369 -0.381752
-vn 0.900182 -0.435513 0.000000
-vn 0.729611 -0.683863 0.000000
-vn 0.693951 -0.720022 -0.000000
-vn 0.793950 -0.607983 0.000000
-vn 0.831437 -0.436180 0.344179
-vn 0.673512 -0.684666 0.278594
-vn 0.640399 -0.720924 0.264874
-vn 0.732949 -0.608995 0.303167
-vn 0.636092 -0.436778 0.636092
-vn 0.514965 -0.685290 0.514965
-vn 0.489651 -0.721446 0.489651
-vn 0.560555 -0.609554 0.560555
-vn 0.344179 -0.436180 0.831437
-vn 0.278595 -0.684666 0.673512
-vn 0.264874 -0.720924 0.640399
-vn 0.303167 -0.608995 0.732949
-vn -0.000000 -0.435513 0.900182
-vn -0.000000 -0.683863 0.729611
-vn 0.000000 -0.720022 0.693951
-vn -0.000000 -0.607983 0.793950
-vn -0.344179 -0.436180 0.831437
-vn -0.278594 -0.684666 0.673512
-vn -0.264874 -0.720924 0.640399
-vn -0.303167 -0.608995 0.732949
-vn -0.636092 -0.436778 0.636092
-vn -0.514965 -0.685290 0.514965
-vn -0.489651 -0.721446 0.489651
-vn -0.560555 -0.609554 0.560555
-vn -0.831437 -0.436180 0.344179
-vn -0.673512 -0.684666 0.278595
-vn -0.640399 -0.720924 0.264874
-vn -0.732949 -0.608995 0.303167
-vn -0.900182 -0.435513 -0.000000
-vn -0.729611 -0.683863 -0.000000
-vn -0.693951 -0.720022 0.000000
-vn -0.793950 -0.607983 -0.000000
-vn -0.831437 -0.436180 -0.344179
-vn -0.673512 -0.684666 -0.278594
-vn -0.640399 -0.720924 -0.264874
-vn -0.732949 -0.608995 -0.303167
-vn -0.636092 -0.436778 -0.636092
-vn -0.514965 -0.685290 -0.514965
-vn -0.489651 -0.721446 -0.489651
-vn -0.560555 -0.609554 -0.560555
-vn -0.344179 -0.436180 -0.831437
-vn -0.278595 -0.684666 -0.673512
-vn -0.264874 -0.720924 -0.640399
-vn -0.303167 -0.608995 -0.732949
-vn 0.000000 -0.435513 -0.900182
-vn 0.000000 -0.683863 -0.729611
-vn -0.000000 -0.720022 -0.693951
-vn 0.000000 -0.607983 -0.793950
-vn 0.344179 -0.436180 -0.831437
-vn 0.278594 -0.684666 -0.673512
-vn 0.264874 -0.720924 -0.640399
-vn 0.303167 -0.608995 -0.732949
-vn 0.636092 -0.436778 -0.636092
-vn 0.514965 -0.685290 -0.514965
-vn 0.489651 -0.721446 -0.489651
-vn 0.560555 -0.609554 -0.560555
-vn 0.831437 -0.436180 -0.344179
-vn 0.673512 -0.684666 -0.278595
-vn 0.640399 -0.720924 -0.264874
-vn 0.732949 -0.608995 -0.303167
-vn 0.623860 -0.781536 0.000000
-vn 0.177291 -0.984159 -0.000000
-vn 0.049207 -0.998789 0.000000
-vn 0.000000 -1.000000 0.000000
-vn 0.576230 -0.781801 0.238217
-vn 0.163628 -0.984208 0.067527
-vn 0.045422 -0.998792 0.018736
-vn 0.440416 -0.782348 0.440416
-vn 0.124903 -0.984276 0.124903
-vn 0.034662 -0.998798 0.034662
-vn 0.238217 -0.781801 0.576230
-vn 0.067527 -0.984208 0.163628
-vn 0.018736 -0.998792 0.045422
-vn -0.000000 -0.781536 0.623860
-vn 0.000000 -0.984159 0.177291
-vn -0.000000 -0.998789 0.049207
-vn -0.238217 -0.781801 0.576230
-vn -0.067527 -0.984208 0.163628
-vn -0.018736 -0.998792 0.045422
-vn -0.440416 -0.782348 0.440416
-vn -0.124903 -0.984276 0.124903
-vn -0.034662 -0.998798 0.034662
-vn -0.576230 -0.781801 0.238217
-vn -0.163628 -0.984208 0.067527
-vn -0.045422 -0.998792 0.018736
-vn -0.623860 -0.781536 -0.000000
-vn -0.177291 -0.984159 0.000000
-vn -0.049207 -0.998789 -0.000000
-vn -0.576230 -0.781801 -0.238217
-vn -0.163628 -0.984208 -0.067527
-vn -0.045422 -0.998792 -0.018736
-vn -0.440416 -0.782348 -0.440416
-vn -0.124903 -0.984276 -0.124903
-vn -0.034662 -0.998798 -0.034662
-vn -0.238217 -0.781801 -0.576230
-vn -0.067527 -0.984208 -0.163628
-vn -0.018736 -0.998792 -0.045422
-vn 0.000000 -0.781536 -0.623860
-vn -0.000000 -0.984159 -0.177291
-vn 0.000000 -0.998789 -0.049207
-vn 0.238217 -0.781801 -0.576230
-vn 0.067527 -0.984208 -0.163628
-vn 0.018736 -0.998792 -0.045422
-vn 0.440416 -0.782348 -0.440416
-vn 0.124903 -0.984276 -0.124903
-vn 0.034662 -0.998798 -0.034662
-vn 0.576230 -0.781801 -0.238217
-vn 0.163628 -0.984208 -0.067527
-vn 0.045422 -0.998792 -0.018736
-vn 0.007786 -0.999970 -0.000216
-vn 0.039138 -0.999233 -0.000989
-vn 0.179512 -0.983746 -0.004369
-vn 0.612299 -0.790557 -0.010460
-vn 0.986152 -0.165708 -0.006670
-vn 0.007039 -0.812495 0.582926
-vn 0.036127 -0.837257 0.545614
-vn 0.161846 -0.810421 0.563048
-vn 0.482365 -0.595148 0.642746
-vn 0.738720 -0.114594 0.664199
-vn -0.001909 0.162121 0.986769
-vn 0.002762 0.017107 0.999850
-vn 0.010533 0.073398 0.997247
-vn -0.066041 0.130070 0.989303
-vn -0.094427 0.016594 0.995393
-vn -0.009203 0.871509 0.490293
-vn -0.048606 0.840609 0.539457
-vn -0.223298 0.802880 0.552739
-vn -0.596365 0.559971 0.575135
-vn -0.803337 0.068236 0.591603
-vn -0.010561 0.999944 0.000103
-vn -0.058798 0.998270 0.000710
-vn -0.280710 0.959787 0.003269
-vn -0.749723 0.661738 0.004268
-vn -0.997351 0.072714 0.002059
-vn -0.008792 0.871493 -0.490330
-vn -0.046494 0.841178 -0.538756
-vn -0.217909 0.806807 -0.549161
-vn -0.597291 0.560026 -0.574121
-vn -0.804000 0.062913 -0.591292
-vn -0.001806 0.161691 -0.986840
-vn 0.002031 0.014555 -0.999892
-vn 0.009215 0.060069 -0.998152
-vn -0.059334 0.113865 -0.991723
-vn -0.086899 0.012290 -0.996141
-vn 0.006418 -0.812379 -0.583095
-vn 0.033783 -0.837512 -0.545373
-vn 0.157113 -0.811947 -0.562190
-vn 0.484406 -0.589366 -0.646528
-vn 0.738870 -0.101320 -0.666187
-vn 0.946512 0.322650 -0.003357
-vn 0.825830 0.563870 -0.007452
-vn 0.650011 0.759893 -0.006937
-vn 0.532429 0.846459 -0.005245
-vn 0.725608 0.259351 0.637361
-vn 0.645945 0.461988 0.607719
-vn 0.531615 0.636660 0.558614
-vn 0.424964 0.681717 0.595540
-vn -0.049562 -0.019755 0.998576
-vn -0.037816 -0.035624 0.998650
-vn -0.037914 -0.036512 0.998614
-vn -0.168854 -0.297945 0.939530
-vn -0.742342 -0.299166 0.599523
-vn -0.619602 -0.529406 0.579502
-vn -0.483708 -0.685760 0.543837
-vn -0.445293 -0.794355 0.413177
-vn -0.926513 -0.376258 0.001996
-vn -0.753920 -0.656952 0.004317
-vn -0.566224 -0.824244 0.003461
-vn -0.481804 -0.876277 0.001850
-vn -0.744675 -0.294425 -0.598977
-vn -0.621949 -0.528114 -0.578165
-vn -0.481171 -0.688340 -0.542828
-vn -0.438055 -0.797035 -0.415744
-vn -0.044337 -0.017056 -0.998871
-vn -0.026176 -0.028166 -0.999260
-vn -0.025294 -0.028332 -0.999278
-vn -0.157482 -0.289392 -0.944167
-vn 0.728244 0.252410 -0.637142
-vn 0.647055 0.459725 -0.608254
-vn 0.522994 0.640657 -0.562170
-vn 0.409978 0.682857 -0.604669
-vn -0.230787 0.972982 -0.006523
-vn -0.548936 0.835863 -0.001511
-vn -0.875671 0.482806 0.009893
-vn -0.877554 0.479097 0.019092
-vn -0.696190 0.717439 0.024497
-vn -0.152877 0.687211 0.710190
-vn -0.316721 0.637750 0.702113
-vn -0.601067 0.471452 0.645330
-vn -0.635889 0.446090 0.629801
-vn -0.435746 0.601008 0.670011
-vn 0.111113 -0.085070 0.990160
-vn 0.223310 0.006540 0.974726
-vn 0.190097 0.154964 0.969458
-vn 0.005271 0.189482 0.981870
-vn -0.011752 0.246688 0.969024
-vn 0.343906 -0.722796 0.599412
-vn 0.572489 -0.567656 0.591627
-vn 0.787436 -0.256459 0.560512
-vn 0.647097 -0.306374 0.698141
-vn 0.427528 -0.499343 0.753576
-vn 0.410926 -0.911668 0.001284
-vn 0.671520 -0.740986 -0.000899
-vn 0.922026 -0.387060 -0.007253
-vn 0.846910 -0.531556 -0.013854
-vn 0.535924 -0.844201 -0.010505
-vn 0.341188 -0.722823 -0.600931
-vn 0.578664 -0.561139 -0.591838
-vn 0.784869 -0.251020 -0.566542
-vn 0.642681 -0.302257 -0.703990
-vn 0.418589 -0.500042 -0.758117
-vn 0.115806 -0.079139 -0.990114
-vn 0.232811 0.012565 -0.972441
-vn 0.206662 0.153601 -0.966280
-vn 0.024500 0.161443 -0.986578
-vn 0.003382 0.211115 -0.977455
-vn -0.134912 0.687491 -0.713551
-vn -0.319540 0.633073 -0.705063
-vn -0.603902 0.461442 -0.649903
-vn -0.631815 0.437169 -0.640072
-vn -0.424306 0.612706 -0.666750
-vn -0.425801 0.904753 0.010805
-vn 0.022046 0.999756 0.001623
-vn 0.999598 0.025875 0.011556
-vn 0.709587 -0.704552 0.009672
-vn -0.259858 0.791937 0.552548
-vn 0.009539 0.999720 -0.021674
-vn 0.410157 0.332912 -0.849082
-vn 0.541523 -0.548619 -0.637001
-vn 0.046311 0.455223 0.889172
-vn -0.010688 0.988794 0.148900
-vn -0.044376 0.682946 -0.729120
-vn 0.122824 0.009233 -0.992385
-vn 0.481839 -0.180440 0.857480
-vn 0.455272 0.736752 0.499925
-vn -0.220542 0.907193 -0.358277
-vn -0.235919 0.657250 -0.715797
-vn 0.728094 -0.685300 -0.015585
-vn 0.888738 0.458112 -0.016679
-vn -0.260098 0.965582 0.000800
-vn -0.371611 0.928378 -0.004418
-vn 0.480165 -0.178362 -0.858853
-vn 0.488102 0.716802 -0.497947
-vn -0.222004 0.905399 0.361892
-vn -0.235405 0.663180 0.710477
-vn 0.058720 0.437702 -0.897200
-vn 0.001326 0.986459 -0.164002
-vn -0.044190 0.681675 0.730319
-vn 0.138801 -0.034188 0.989730
-vn -0.258890 0.797206 -0.545380
-vn 0.012270 0.999739 0.019287
-vn 0.398632 0.354890 0.845663
-vn 0.537564 -0.581398 0.610738
-vn 0.000000 1.000000 0.000000
-vn 0.824540 0.565804 0.000017
-vn 0.917701 -0.397272 0.000034
-vn 0.935269 -0.353939 0.000113
-vn 0.780712 0.624890 0.000075
-vn 0.762640 0.565035 0.314825
-vn 0.847982 -0.397998 0.350034
-vn 0.864141 -0.355261 0.356441
-vn 0.720992 0.625625 0.297933
-vn 0.583357 0.565165 0.583338
-vn 0.648485 -0.398726 0.648448
-vn 0.660872 -0.355894 0.660748
-vn 0.551862 0.625290 0.551780
-vn 0.314824 0.565051 0.762629
-vn 0.350045 -0.397976 0.847988
-vn 0.356474 -0.355199 0.864153
-vn 0.297983 0.625515 0.721067
-vn -0.000017 0.565804 0.824540
-vn -0.000034 -0.397272 0.917701
-vn -0.000113 -0.353939 0.935269
-vn -0.000075 0.624890 0.780712
-vn -0.314825 0.565035 0.762640
-vn -0.350034 -0.397998 0.847982
-vn -0.356441 -0.355261 0.864141
-vn -0.297933 0.625625 0.720992
-vn -0.583338 0.565165 0.583357
-vn -0.648448 -0.398726 0.648485
-vn -0.660748 -0.355894 0.660872
-vn -0.551780 0.625290 0.551862
-vn -0.762629 0.565051 0.314824
-vn -0.847988 -0.397976 0.350045
-vn -0.864153 -0.355199 0.356474
-vn -0.721067 0.625515 0.297983
-vn -0.824540 0.565804 -0.000017
-vn -0.917701 -0.397272 -0.000034
-vn -0.935269 -0.353939 -0.000113
-vn -0.780712 0.624890 -0.000075
-vn -0.762640 0.565035 -0.314825
-vn -0.847982 -0.397998 -0.350034
-vn -0.864141 -0.355261 -0.356441
-vn -0.720992 0.625625 -0.297933
-vn -0.583357 0.565165 -0.583338
-vn -0.648485 -0.398726 -0.648448
-vn -0.660872 -0.355894 -0.660748
-vn -0.551862 0.625290 -0.551780
-vn -0.314824 0.565051 -0.762629
-vn -0.350045 -0.397976 -0.847988
-vn -0.356474 -0.355199 -0.864153
-vn -0.297983 0.625515 -0.721067
-vn 0.000017 0.565804 -0.824540
-vn 0.000034 -0.397272 -0.917701
-vn 0.000113 -0.353939 -0.935269
-vn 0.000075 0.624890 -0.780712
-vn 0.314825 0.565035 -0.762640
-vn 0.350034 -0.397998 -0.847982
-vn 0.356441 -0.355261 -0.864141
-vn 0.297933 0.625625 -0.720992
-vn 0.583338 0.565165 -0.583357
-vn 0.648448 -0.398726 -0.648485
-vn 0.660748 -0.355894 -0.660872
-vn 0.551780 0.625290 -0.551862
-vn 0.762629 0.565051 -0.314824
-vn 0.847988 -0.397976 -0.350045
-vn 0.864153 -0.355199 -0.356474
-vn 0.721067 0.625515 -0.297983
-vn 0.236583 0.971611 -0.000000
-vn 0.173084 0.984907 -0.000000
-vn 0.379703 0.925108 -0.000000
-vn 0.526673 0.850068 0.000000
-vn 0.217978 0.971775 0.090216
-vn 0.159589 0.984977 0.065961
-vn 0.350498 0.925311 0.144740
-vn 0.485590 0.850653 0.201474
-vn 0.166631 0.971838 0.166631
-vn 0.121908 0.985026 0.121908
-vn 0.267668 0.925585 0.267668
-vn 0.371315 0.851029 0.371315
-vn 0.090216 0.971775 0.217978
-vn 0.065961 0.984977 0.159589
-vn 0.144740 0.925311 0.350498
-vn 0.201475 0.850653 0.485590
-vn 0.000000 0.971611 0.236583
-vn 0.000000 0.984907 0.173084
-vn 0.000000 0.925108 0.379703
-vn -0.000000 0.850068 0.526673
-vn -0.090216 0.971775 0.217978
-vn -0.065961 0.984977 0.159589
-vn -0.144740 0.925311 0.350498
-vn -0.201474 0.850653 0.485590
-vn -0.166631 0.971838 0.166631
-vn -0.121908 0.985026 0.121908
-vn -0.267668 0.925585 0.267668
-vn -0.371315 0.851029 0.371315
-vn -0.217978 0.971775 0.090216
-vn -0.159589 0.984977 0.065961
-vn -0.350498 0.925311 0.144740
-vn -0.485590 0.850653 0.201475
-vn -0.236583 0.971611 0.000000
-vn -0.173084 0.984907 0.000000
-vn -0.379703 0.925108 0.000000
-vn -0.526673 0.850068 -0.000000
-vn -0.217978 0.971775 -0.090216
-vn -0.159589 0.984977 -0.065961
-vn -0.350498 0.925311 -0.144740
-vn -0.485590 0.850653 -0.201474
-vn -0.166631 0.971838 -0.166631
-vn -0.121908 0.985026 -0.121908
-vn -0.267668 0.925585 -0.267668
-vn -0.371315 0.851029 -0.371315
-vn -0.090216 0.971775 -0.217978
-vn -0.065961 0.984977 -0.159589
-vn -0.144740 0.925311 -0.350498
-vn -0.201475 0.850653 -0.485590
-vn -0.000000 0.971611 -0.236583
-vn -0.000000 0.984907 -0.173084
-vn -0.000000 0.925108 -0.379703
-vn 0.000000 0.850068 -0.526673
-vn 0.090216 0.971775 -0.217978
-vn 0.065961 0.984977 -0.159589
-vn 0.144740 0.925311 -0.350498
-vn 0.201474 0.850653 -0.485590
-vn 0.166631 0.971838 -0.166631
-vn 0.121908 0.985026 -0.121908
-vn 0.267668 0.925585 -0.267668
-vn 0.371315 0.851029 -0.371315
-vn 0.217978 0.971775 -0.090216
-vn 0.159589 0.984977 -0.065961
-vn 0.350498 0.925311 -0.144740
-vn 0.485590 0.850653 -0.201475
-# 530 vertex normals
-
-g Teapot01
-f 1/1/1 6/6/6 7/7/7
-f 7/7/7 2/2/2 1/1/1
-f 2/2/2 7/7/7 8/8/8
-f 8/8/8 3/3/3 2/2/2
-f 3/3/3 8/8/8 9/9/9
-f 9/9/9 4/4/4 3/3/3
-f 4/4/4 9/9/9 10/10/10
-f 10/10/10 5/5/5 4/4/4
-f 6/6/6 11/11/11 12/12/12
-f 12/12/12 7/7/7 6/6/6
-f 7/7/7 12/12/12 13/13/13
-f 13/13/13 8/8/8 7/7/7
-f 8/8/8 13/13/13 14/14/14
-f 14/14/14 9/9/9 8/8/8
-f 9/9/9 14/14/14 15/15/15
-f 15/15/15 10/10/10 9/9/9
-f 11/11/11 16/16/16 17/17/17
-f 17/17/17 12/12/12 11/11/11
-f 12/12/12 17/17/17 18/18/18
-f 18/18/18 13/13/13 12/12/12
-f 13/13/13 18/18/18 19/19/19
-f 19/19/19 14/14/14 13/13/13
-f 14/14/14 19/19/19 20/20/20
-f 20/20/20 15/15/15 14/14/14
-f 16/16/16 21/21/21 22/22/22
-f 22/22/22 17/17/17 16/16/16
-f 17/17/17 22/22/22 23/23/23
-f 23/23/23 18/18/18 17/17/17
-f 18/18/18 23/23/23 24/24/24
-f 24/24/24 19/19/19 18/18/18
-f 19/19/19 24/24/24 25/25/25
-f 25/25/25 20/20/20 19/19/19
-f 21/26/21 26/31/26 27/32/27
-f 27/32/27 22/27/22 21/26/21
-f 22/27/22 27/32/27 28/33/28
-f 28/33/28 23/28/23 22/27/22
-f 23/28/23 28/33/28 29/34/29
-f 29/34/29 24/29/24 23/28/23
-f 24/29/24 29/34/29 30/35/30
-f 30/35/30 25/30/25 24/29/24
-f 26/31/26 31/36/31 32/37/32
-f 32/37/32 27/32/27 26/31/26
-f 27/32/27 32/37/32 33/38/33
-f 33/38/33 28/33/28 27/32/27
-f 28/33/28 33/38/33 34/39/34
-f 34/39/34 29/34/29 28/33/28
-f 29/34/29 34/39/34 35/40/35
-f 35/40/35 30/35/30 29/34/29
-f 31/36/31 36/41/36 37/42/37
-f 37/42/37 32/37/32 31/36/31
-f 32/37/32 37/42/37 38/43/38
-f 38/43/38 33/38/33 32/37/32
-f 33/38/33 38/43/38 39/44/39
-f 39/44/39 34/39/34 33/38/33
-f 34/39/34 39/44/39 40/45/40
-f 40/45/40 35/40/35 34/39/34
-f 36/41/36 41/46/41 42/47/42
-f 42/47/42 37/42/37 36/41/36
-f 37/42/37 42/47/42 43/48/43
-f 43/48/43 38/43/38 37/42/37
-f 38/43/38 43/48/43 44/49/44
-f 44/49/44 39/44/39 38/43/38
-f 39/44/39 44/49/44 45/50/45
-f 45/50/45 40/45/40 39/44/39
-f 41/51/41 46/56/46 47/57/47
-f 47/57/47 42/52/42 41/51/41
-f 42/52/42 47/57/47 48/58/48
-f 48/58/48 43/53/43 42/52/42
-f 43/53/43 48/58/48 49/59/49
-f 49/59/49 44/54/44 43/53/43
-f 44/54/44 49/59/49 50/60/50
-f 50/60/50 45/55/45 44/54/44
-f 46/56/46 51/61/51 52/62/52
-f 52/62/52 47/57/47 46/56/46
-f 47/57/47 52/62/52 53/63/53
-f 53/63/53 48/58/48 47/57/47
-f 48/58/48 53/63/53 54/64/54
-f 54/64/54 49/59/49 48/58/48
-f 49/59/49 54/64/54 55/65/55
-f 55/65/55 50/60/50 49/59/49
-f 51/61/51 56/66/56 57/67/57
-f 57/67/57 52/62/52 51/61/51
-f 52/62/52 57/67/57 58/68/58
-f 58/68/58 53/63/53 52/62/52
-f 53/63/53 58/68/58 59/69/59
-f 59/69/59 54/64/54 53/63/53
-f 54/64/54 59/69/59 60/70/60
-f 60/70/60 55/65/55 54/64/54
-f 56/66/56 61/71/61 62/72/62
-f 62/72/62 57/67/57 56/66/56
-f 57/67/57 62/72/62 63/73/63
-f 63/73/63 58/68/58 57/67/57
-f 58/68/58 63/73/63 64/74/64
-f 64/74/64 59/69/59 58/68/58
-f 59/69/59 64/74/64 65/75/65
-f 65/75/65 60/70/60 59/69/59
-f 61/76/61 66/81/66 67/82/67
-f 67/82/67 62/77/62 61/76/61
-f 62/77/62 67/82/67 68/83/68
-f 68/83/68 63/78/63 62/77/62
-f 63/78/63 68/83/68 69/84/69
-f 69/84/69 64/79/64 63/78/63
-f 64/79/64 69/84/69 70/85/70
-f 70/85/70 65/80/65 64/79/64
-f 66/81/66 71/86/71 72/87/72
-f 72/87/72 67/82/67 66/81/66
-f 67/82/67 72/87/72 73/88/73
-f 73/88/73 68/83/68 67/82/67
-f 68/83/68 73/88/73 74/89/74
-f 74/89/74 69/84/69 68/83/68
-f 69/84/69 74/89/74 75/90/75
-f 75/90/75 70/85/70 69/84/69
-f 71/86/71 76/91/76 77/92/77
-f 77/92/77 72/87/72 71/86/71
-f 72/87/72 77/92/77 78/93/78
-f 78/93/78 73/88/73 72/87/72
-f 73/88/73 78/93/78 79/94/79
-f 79/94/79 74/89/74 73/88/73
-f 74/89/74 79/94/79 80/95/80
-f 80/95/80 75/90/75 74/89/74
-f 76/91/76 1/96/1 2/97/2
-f 2/97/2 77/92/77 76/91/76
-f 77/92/77 2/97/2 3/98/3
-f 3/98/3 78/93/78 77/92/77
-f 78/93/78 3/98/3 4/99/4
-f 4/99/4 79/94/79 78/93/78
-f 79/94/79 4/99/4 5/100/5
-f 5/100/5 80/95/80 79/94/79
-f 5/101/5 10/106/10 85/107/85
-f 85/107/85 81/102/81 5/101/5
-f 81/102/81 85/107/85 86/108/86
-f 86/108/86 82/103/82 81/102/81
-f 82/103/82 86/108/86 87/109/87
-f 87/109/87 83/104/83 82/103/82
-f 83/104/83 87/109/87 88/110/88
-f 88/110/88 84/105/84 83/104/83
-f 10/106/10 15/111/15 89/112/89
-f 89/112/89 85/107/85 10/106/10
-f 85/107/85 89/112/89 90/113/90
-f 90/113/90 86/108/86 85/107/85
-f 86/108/86 90/113/90 91/114/91
-f 91/114/91 87/109/87 86/108/86
-f 87/109/87 91/114/91 92/115/92
-f 92/115/92 88/110/88 87/109/87
-f 15/111/15 20/116/20 93/117/93
-f 93/117/93 89/112/89 15/111/15
-f 89/112/89 93/117/93 94/118/94
-f 94/118/94 90/113/90 89/112/89
-f 90/113/90 94/118/94 95/119/95
-f 95/119/95 91/114/91 90/113/90
-f 91/114/91 95/119/95 96/120/96
-f 96/120/96 92/115/92 91/114/91
-f 20/116/20 25/121/25 97/122/97
-f 97/122/97 93/117/93 20/116/20
-f 93/117/93 97/122/97 98/123/98
-f 98/123/98 94/118/94 93/117/93
-f 94/118/94 98/123/98 99/124/99
-f 99/124/99 95/119/95 94/118/94
-f 95/119/95 99/124/99 100/125/100
-f 100/125/100 96/120/96 95/119/95
-f 25/126/25 30/131/30 101/132/101
-f 101/132/101 97/127/97 25/126/25
-f 97/127/97 101/132/101 102/133/102
-f 102/133/102 98/128/98 97/127/97
-f 98/128/98 102/133/102 103/134/103
-f 103/134/103 99/129/99 98/128/98
-f 99/129/99 103/134/103 104/135/104
-f 104/135/104 100/130/100 99/129/99
-f 30/131/30 35/136/35 105/137/105
-f 105/137/105 101/132/101 30/131/30
-f 101/132/101 105/137/105 106/138/106
-f 106/138/106 102/133/102 101/132/101
-f 102/133/102 106/138/106 107/139/107
-f 107/139/107 103/134/103 102/133/102
-f 103/134/103 107/139/107 108/140/108
-f 108/140/108 104/135/104 103/134/103
-f 35/136/35 40/141/40 109/142/109
-f 109/142/109 105/137/105 35/136/35
-f 105/137/105 109/142/109 110/143/110
-f 110/143/110 106/138/106 105/137/105
-f 106/138/106 110/143/110 111/144/111
-f 111/144/111 107/139/107 106/138/106
-f 107/139/107 111/144/111 112/145/112
-f 112/145/112 108/140/108 107/139/107
-f 40/141/40 45/146/45 113/147/113
-f 113/147/113 109/142/109 40/141/40
-f 109/142/109 113/147/113 114/148/114
-f 114/148/114 110/143/110 109/142/109
-f 110/143/110 114/148/114 115/149/115
-f 115/149/115 111/144/111 110/143/110
-f 111/144/111 115/149/115 116/150/116
-f 116/150/116 112/145/112 111/144/111
-f 45/151/45 50/156/50 117/157/117
-f 117/157/117 113/152/113 45/151/45
-f 113/152/113 117/157/117 118/158/118
-f 118/158/118 114/153/114 113/152/113
-f 114/153/114 118/158/118 119/159/119
-f 119/159/119 115/154/115 114/153/114
-f 115/154/115 119/159/119 120/160/120
-f 120/160/120 116/155/116 115/154/115
-f 50/156/50 55/161/55 121/162/121
-f 121/162/121 117/157/117 50/156/50
-f 117/157/117 121/162/121 122/163/122
-f 122/163/122 118/158/118 117/157/117
-f 118/158/118 122/163/122 123/164/123
-f 123/164/123 119/159/119 118/158/118
-f 119/159/119 123/164/123 124/165/124
-f 124/165/124 120/160/120 119/159/119
-f 55/161/55 60/166/60 125/167/125
-f 125/167/125 121/162/121 55/161/55
-f 121/162/121 125/167/125 126/168/126
-f 126/168/126 122/163/122 121/162/121
-f 122/163/122 126/168/126 127/169/127
-f 127/169/127 123/164/123 122/163/122
-f 123/164/123 127/169/127 128/170/128
-f 128/170/128 124/165/124 123/164/123
-f 60/166/60 65/171/65 129/172/129
-f 129/172/129 125/167/125 60/166/60
-f 125/167/125 129/172/129 130/173/130
-f 130/173/130 126/168/126 125/167/125
-f 126/168/126 130/173/130 131/174/131
-f 131/174/131 127/169/127 126/168/126
-f 127/169/127 131/174/131 132/175/132
-f 132/175/132 128/170/128 127/169/127
-f 65/176/65 70/181/70 133/182/133
-f 133/182/133 129/177/129 65/176/65
-f 129/177/129 133/182/133 134/183/134
-f 134/183/134 130/178/130 129/177/129
-f 130/178/130 134/183/134 135/184/135
-f 135/184/135 131/179/131 130/178/130
-f 131/179/131 135/184/135 136/185/136
-f 136/185/136 132/180/132 131/179/131
-f 70/181/70 75/186/75 137/187/137
-f 137/187/137 133/182/133 70/181/70
-f 133/182/133 137/187/137 138/188/138
-f 138/188/138 134/183/134 133/182/133
-f 134/183/134 138/188/138 139/189/139
-f 139/189/139 135/184/135 134/183/134
-f 135/184/135 139/189/139 140/190/140
-f 140/190/140 136/185/136 135/184/135
-f 75/186/75 80/191/80 141/192/141
-f 141/192/141 137/187/137 75/186/75
-f 137/187/137 141/192/141 142/193/142
-f 142/193/142 138/188/138 137/187/137
-f 138/188/138 142/193/142 143/194/143
-f 143/194/143 139/189/139 138/188/138
-f 139/189/139 143/194/143 144/195/144
-f 144/195/144 140/190/140 139/189/139
-f 80/191/80 5/196/5 81/197/81
-f 81/197/81 141/192/141 80/191/80
-f 141/192/141 81/197/81 82/198/82
-f 82/198/82 142/193/142 141/192/141
-f 142/193/142 82/198/82 83/199/83
-f 83/199/83 143/194/143 142/193/142
-f 143/194/143 83/199/83 84/200/84
-f 84/200/84 144/195/144 143/194/143
-f 84/201/84 88/206/88 149/207/149
-f 149/207/149 145/202/145 84/201/84
-f 145/202/145 149/207/149 150/208/150
-f 150/208/150 146/203/146 145/202/145
-f 146/203/146 150/208/150 151/209/151
-f 151/209/151 147/204/147 146/203/146
-f 147/204/147 151/209/151 152/210/152
-f 152/210/152 148/205/148 147/204/147
-f 88/206/88 92/211/92 153/212/153
-f 153/212/153 149/207/149 88/206/88
-f 149/207/149 153/212/153 154/213/154
-f 154/213/154 150/208/150 149/207/149
-f 150/208/150 154/213/154 155/214/155
-f 155/214/155 151/209/151 150/208/150
-f 151/209/151 155/214/155 156/215/156
-f 156/215/156 152/210/152 151/209/151
-f 92/211/92 96/216/96 157/217/157
-f 157/217/157 153/212/153 92/211/92
-f 153/212/153 157/217/157 158/218/158
-f 158/218/158 154/213/154 153/212/153
-f 154/213/154 158/218/158 159/219/159
-f 159/219/159 155/214/155 154/213/154
-f 155/214/155 159/219/159 160/220/160
-f 160/220/160 156/215/156 155/214/155
-f 96/216/96 100/221/100 161/222/161
-f 161/222/161 157/217/157 96/216/96
-f 157/217/157 161/222/161 162/223/162
-f 162/223/162 158/218/158 157/217/157
-f 158/218/158 162/223/162 163/224/163
-f 163/224/163 159/219/159 158/218/158
-f 159/219/159 163/224/163 164/225/164
-f 164/225/164 160/220/160 159/219/159
-f 100/226/100 104/231/104 165/232/165
-f 165/232/165 161/227/161 100/226/100
-f 161/227/161 165/232/165 166/233/166
-f 166/233/166 162/228/162 161/227/161
-f 162/228/162 166/233/166 167/234/167
-f 167/234/167 163/229/163 162/228/162
-f 163/229/163 167/234/167 168/235/168
-f 168/235/168 164/230/164 163/229/163
-f 104/231/104 108/236/108 169/237/169
-f 169/237/169 165/232/165 104/231/104
-f 165/232/165 169/237/169 170/238/170
-f 170/238/170 166/233/166 165/232/165
-f 166/233/166 170/238/170 171/239/171
-f 171/239/171 167/234/167 166/233/166
-f 167/234/167 171/239/171 172/240/172
-f 172/240/172 168/235/168 167/234/167
-f 108/236/108 112/241/112 173/242/173
-f 173/242/173 169/237/169 108/236/108
-f 169/237/169 173/242/173 174/243/174
-f 174/243/174 170/238/170 169/237/169
-f 170/238/170 174/243/174 175/244/175
-f 175/244/175 171/239/171 170/238/170
-f 171/239/171 175/244/175 176/245/176
-f 176/245/176 172/240/172 171/239/171
-f 112/241/112 116/246/116 177/247/177
-f 177/247/177 173/242/173 112/241/112
-f 173/242/173 177/247/177 178/248/178
-f 178/248/178 174/243/174 173/242/173
-f 174/243/174 178/248/178 179/249/179
-f 179/249/179 175/244/175 174/243/174
-f 175/244/175 179/249/179 180/250/180
-f 180/250/180 176/245/176 175/244/175
-f 116/251/116 120/256/120 181/257/181
-f 181/257/181 177/252/177 116/251/116
-f 177/252/177 181/257/181 182/258/182
-f 182/258/182 178/253/178 177/252/177
-f 178/253/178 182/258/182 183/259/183
-f 183/259/183 179/254/179 178/253/178
-f 179/254/179 183/259/183 184/260/184
-f 184/260/184 180/255/180 179/254/179
-f 120/256/120 124/261/124 185/262/185
-f 185/262/185 181/257/181 120/256/120
-f 181/257/181 185/262/185 186/263/186
-f 186/263/186 182/258/182 181/257/181
-f 182/258/182 186/263/186 187/264/187
-f 187/264/187 183/259/183 182/258/182
-f 183/259/183 187/264/187 188/265/188
-f 188/265/188 184/260/184 183/259/183
-f 124/261/124 128/266/128 189/267/189
-f 189/267/189 185/262/185 124/261/124
-f 185/262/185 189/267/189 190/268/190
-f 190/268/190 186/263/186 185/262/185
-f 186/263/186 190/268/190 191/269/191
-f 191/269/191 187/264/187 186/263/186
-f 187/264/187 191/269/191 192/270/192
-f 192/270/192 188/265/188 187/264/187
-f 128/266/128 132/271/132 193/272/193
-f 193/272/193 189/267/189 128/266/128
-f 189/267/189 193/272/193 194/273/194
-f 194/273/194 190/268/190 189/267/189
-f 190/268/190 194/273/194 195/274/195
-f 195/274/195 191/269/191 190/268/190
-f 191/269/191 195/274/195 196/275/196
-f 196/275/196 192/270/192 191/269/191
-f 132/276/132 136/281/136 197/282/197
-f 197/282/197 193/277/193 132/276/132
-f 193/277/193 197/282/197 198/283/198
-f 198/283/198 194/278/194 193/277/193
-f 194/278/194 198/283/198 199/284/199
-f 199/284/199 195/279/195 194/278/194
-f 195/279/195 199/284/199 200/285/200
-f 200/285/200 196/280/196 195/279/195
-f 136/281/136 140/286/140 201/287/201
-f 201/287/201 197/282/197 136/281/136
-f 197/282/197 201/287/201 202/288/202
-f 202/288/202 198/283/198 197/282/197
-f 198/283/198 202/288/202 203/289/203
-f 203/289/203 199/284/199 198/283/198
-f 199/284/199 203/289/203 204/290/204
-f 204/290/204 200/285/200 199/284/199
-f 140/286/140 144/291/144 205/292/205
-f 205/292/205 201/287/201 140/286/140
-f 201/287/201 205/292/205 206/293/206
-f 206/293/206 202/288/202 201/287/201
-f 202/288/202 206/293/206 207/294/207
-f 207/294/207 203/289/203 202/288/202
-f 203/289/203 207/294/207 208/295/208
-f 208/295/208 204/290/204 203/289/203
-f 144/291/144 84/296/84 145/297/145
-f 145/297/145 205/292/205 144/291/144
-f 205/292/205 145/297/145 146/298/146
-f 146/298/146 206/293/206 205/292/205
-f 206/293/206 146/298/146 147/299/147
-f 147/299/147 207/294/207 206/293/206
-f 207/294/207 147/299/147 148/300/148
-f 148/300/148 208/295/208 207/294/207
-f 148/301/148 152/306/152 213/307/213
-f 213/307/213 209/302/209 148/301/148
-f 209/302/209 213/307/213 214/308/214
-f 214/308/214 210/303/210 209/302/209
-f 210/303/210 214/308/214 215/309/215
-f 215/309/215 211/304/211 210/303/210
-f 211/304/211 215/309/215 212/310/212
-f 152/306/152 156/311/156 216/312/216
-f 216/312/216 213/307/213 152/306/152
-f 213/307/213 216/312/216 217/313/217
-f 217/313/217 214/308/214 213/307/213
-f 214/308/214 217/313/217 218/314/218
-f 218/314/218 215/309/215 214/308/214
-f 215/309/215 218/314/218 212/315/212
-f 156/311/156 160/316/160 219/317/219
-f 219/317/219 216/312/216 156/311/156
-f 216/312/216 219/317/219 220/318/220
-f 220/318/220 217/313/217 216/312/216
-f 217/313/217 220/318/220 221/319/221
-f 221/319/221 218/314/218 217/313/217
-f 218/314/218 221/319/221 212/320/212
-f 160/316/160 164/321/164 222/322/222
-f 222/322/222 219/317/219 160/316/160
-f 219/317/219 222/322/222 223/323/223
-f 223/323/223 220/318/220 219/317/219
-f 220/318/220 223/323/223 224/324/224
-f 224/324/224 221/319/221 220/318/220
-f 221/319/221 224/324/224 212/325/212
-f 164/326/164 168/331/168 225/332/225
-f 225/332/225 222/327/222 164/326/164
-f 222/327/222 225/332/225 226/333/226
-f 226/333/226 223/328/223 222/327/222
-f 223/328/223 226/333/226 227/334/227
-f 227/334/227 224/329/224 223/328/223
-f 224/329/224 227/334/227 212/335/212
-f 168/331/168 172/336/172 228/337/228
-f 228/337/228 225/332/225 168/331/168
-f 225/332/225 228/337/228 229/338/229
-f 229/338/229 226/333/226 225/332/225
-f 226/333/226 229/338/229 230/339/230
-f 230/339/230 227/334/227 226/333/226
-f 227/334/227 230/339/230 212/340/212
-f 172/336/172 176/341/176 231/342/231
-f 231/342/231 228/337/228 172/336/172
-f 228/337/228 231/342/231 232/343/232
-f 232/343/232 229/338/229 228/337/228
-f 229/338/229 232/343/232 233/344/233
-f 233/344/233 230/339/230 229/338/229
-f 230/339/230 233/344/233 212/345/212
-f 176/341/176 180/346/180 234/347/234
-f 234/347/234 231/342/231 176/341/176
-f 231/342/231 234/347/234 235/348/235
-f 235/348/235 232/343/232 231/342/231
-f 232/343/232 235/348/235 236/349/236
-f 236/349/236 233/344/233 232/343/232
-f 233/344/233 236/349/236 212/350/212
-f 180/351/180 184/356/184 237/357/237
-f 237/357/237 234/352/234 180/351/180
-f 234/352/234 237/357/237 238/358/238
-f 238/358/238 235/353/235 234/352/234
-f 235/353/235 238/358/238 239/359/239
-f 239/359/239 236/354/236 235/353/235
-f 236/354/236 239/359/239 212/360/212
-f 184/356/184 188/361/188 240/362/240
-f 240/362/240 237/357/237 184/356/184
-f 237/357/237 240/362/240 241/363/241
-f 241/363/241 238/358/238 237/357/237
-f 238/358/238 241/363/241 242/364/242
-f 242/364/242 239/359/239 238/358/238
-f 239/359/239 242/364/242 212/365/212
-f 188/361/188 192/366/192 243/367/243
-f 243/367/243 240/362/240 188/361/188
-f 240/362/240 243/367/243 244/368/244
-f 244/368/244 241/363/241 240/362/240
-f 241/363/241 244/368/244 245/369/245
-f 245/369/245 242/364/242 241/363/241
-f 242/364/242 245/369/245 212/370/212
-f 192/366/192 196/371/196 246/372/246
-f 246/372/246 243/367/243 192/366/192
-f 243/367/243 246/372/246 247/373/247
-f 247/373/247 244/368/244 243/367/243
-f 244/368/244 247/373/247 248/374/248
-f 248/374/248 245/369/245 244/368/244
-f 245/369/245 248/374/248 212/375/212
-f 196/376/196 200/381/200 249/382/249
-f 249/382/249 246/377/246 196/376/196
-f 246/377/246 249/382/249 250/383/250
-f 250/383/250 247/378/247 246/377/246
-f 247/378/247 250/383/250 251/384/251
-f 251/384/251 248/379/248 247/378/247
-f 248/379/248 251/384/251 212/385/212
-f 200/381/200 204/386/204 252/387/252
-f 252/387/252 249/382/249 200/381/200
-f 249/382/249 252/387/252 253/388/253
-f 253/388/253 250/383/250 249/382/249
-f 250/383/250 253/388/253 254/389/254
-f 254/389/254 251/384/251 250/383/250
-f 251/384/251 254/389/254 212/390/212
-f 204/386/204 208/391/208 255/392/255
-f 255/392/255 252/387/252 204/386/204
-f 252/387/252 255/392/255 256/393/256
-f 256/393/256 253/388/253 252/387/252
-f 253/388/253 256/393/256 257/394/257
-f 257/394/257 254/389/254 253/388/253
-f 254/389/254 257/394/257 212/395/212
-f 208/391/208 148/396/148 209/397/209
-f 209/397/209 255/392/255 208/391/208
-f 255/392/255 209/397/209 210/398/210
-f 210/398/210 256/393/256 255/392/255
-f 256/393/256 210/398/210 211/399/211
-f 211/399/211 257/394/257 256/393/256
-f 257/394/257 211/399/211 212/400/212
-f 258/401/258 263/406/263 264/407/264
-f 264/407/264 259/402/259 258/401/258
-f 259/402/259 264/407/264 265/408/265
-f 265/408/265 260/403/260 259/402/259
-f 260/403/260 265/408/265 266/409/266
-f 266/409/266 261/404/261 260/403/260
-f 261/404/261 266/409/266 267/410/267
-f 267/410/267 262/405/262 261/404/261
-f 263/406/263 268/411/268 269/412/269
-f 269/412/269 264/407/264 263/406/263
-f 264/407/264 269/412/269 270/413/270
-f 270/413/270 265/408/265 264/407/264
-f 265/408/265 270/413/270 271/414/271
-f 271/414/271 266/409/266 265/408/265
-f 266/409/266 271/414/271 272/415/272
-f 272/415/272 267/410/267 266/409/266
-f 268/411/268 273/416/273 274/417/274
-f 274/417/274 269/412/269 268/411/268
-f 269/412/269 274/417/274 275/418/275
-f 275/418/275 270/413/270 269/412/269
-f 270/413/270 275/418/275 276/419/276
-f 276/419/276 271/414/271 270/413/270
-f 271/414/271 276/419/276 277/420/277
-f 277/420/277 272/415/272 271/414/271
-f 273/416/273 278/421/278 279/422/279
-f 279/422/279 274/417/274 273/416/273
-f 274/417/274 279/422/279 280/423/280
-f 280/423/280 275/418/275 274/417/274
-f 275/418/275 280/423/280 281/424/281
-f 281/424/281 276/419/276 275/418/275
-f 276/419/276 281/424/281 282/425/282
-f 282/425/282 277/420/277 276/419/276
-f 278/426/278 283/431/283 284/432/284
-f 284/432/284 279/427/279 278/426/278
-f 279/427/279 284/432/284 285/433/285
-f 285/433/285 280/428/280 279/427/279
-f 280/428/280 285/433/285 286/434/286
-f 286/434/286 281/429/281 280/428/280
-f 281/429/281 286/434/286 287/435/287
-f 287/435/287 282/430/282 281/429/281
-f 283/431/283 288/436/288 289/437/289
-f 289/437/289 284/432/284 283/431/283
-f 284/432/284 289/437/289 290/438/290
-f 290/438/290 285/433/285 284/432/284
-f 285/433/285 290/438/290 291/439/291
-f 291/439/291 286/434/286 285/433/285
-f 286/434/286 291/439/291 292/440/292
-f 292/440/292 287/435/287 286/434/286
-f 288/436/288 293/441/293 294/442/294
-f 294/442/294 289/437/289 288/436/288
-f 289/437/289 294/442/294 295/443/295
-f 295/443/295 290/438/290 289/437/289
-f 290/438/290 295/443/295 296/444/296
-f 296/444/296 291/439/291 290/438/290
-f 291/439/291 296/444/296 297/445/297
-f 297/445/297 292/440/292 291/439/291
-f 293/441/293 258/446/258 259/447/259
-f 259/447/259 294/442/294 293/441/293
-f 294/442/294 259/447/259 260/448/260
-f 260/448/260 295/443/295 294/442/294
-f 295/443/295 260/448/260 261/449/261
-f 261/449/261 296/444/296 295/443/295
-f 296/444/296 261/449/261 262/450/262
-f 262/450/262 297/445/297 296/444/296
-f 262/451/262 267/456/267 302/457/302
-f 302/457/302 298/452/298 262/451/262
-f 298/452/298 302/457/302 303/458/303
-f 303/458/303 299/453/299 298/452/298
-f 299/453/299 303/458/303 304/459/304
-f 304/459/304 300/454/300 299/453/299
-f 300/454/300 304/459/304 305/460/305
-f 305/460/305 301/455/301 300/454/300
-f 267/456/267 272/461/272 306/462/306
-f 306/462/306 302/457/302 267/456/267
-f 302/457/302 306/462/306 307/463/307
-f 307/463/307 303/458/303 302/457/302
-f 303/458/303 307/463/307 308/464/308
-f 308/464/308 304/459/304 303/458/303
-f 304/459/304 308/464/308 309/465/309
-f 309/465/309 305/460/305 304/459/304
-f 272/461/272 277/466/277 310/467/310
-f 310/467/310 306/462/306 272/461/272
-f 306/462/306 310/467/310 311/468/311
-f 311/468/311 307/463/307 306/462/306
-f 307/463/307 311/468/311 312/469/312
-f 312/469/312 308/464/308 307/463/307
-f 308/464/308 312/469/312 313/470/313
-f 313/470/313 309/465/309 308/464/308
-f 277/466/277 282/471/282 314/472/314
-f 314/472/314 310/467/310 277/466/277
-f 310/467/310 314/472/314 315/473/315
-f 315/473/315 311/468/311 310/467/310
-f 311/468/311 315/473/315 316/474/316
-f 316/474/316 312/469/312 311/468/311
-f 312/469/312 316/474/316 317/475/317
-f 317/475/317 313/470/313 312/469/312
-f 282/476/282 287/481/287 318/482/318
-f 318/482/318 314/477/314 282/476/282
-f 314/477/314 318/482/318 319/483/319
-f 319/483/319 315/478/315 314/477/314
-f 315/478/315 319/483/319 320/484/320
-f 320/484/320 316/479/316 315/478/315
-f 316/479/316 320/484/320 321/485/321
-f 321/485/321 317/480/317 316/479/316
-f 287/481/287 292/486/292 322/487/322
-f 322/487/322 318/482/318 287/481/287
-f 318/482/318 322/487/322 323/488/323
-f 323/488/323 319/483/319 318/482/318
-f 319/483/319 323/488/323 324/489/324
-f 324/489/324 320/484/320 319/483/319
-f 320/484/320 324/489/324 325/490/325
-f 325/490/325 321/485/321 320/484/320
-f 292/486/292 297/491/297 326/492/326
-f 326/492/326 322/487/322 292/486/292
-f 322/487/322 326/492/326 327/493/327
-f 327/493/327 323/488/323 322/487/322
-f 323/488/323 327/493/327 328/494/328
-f 328/494/328 324/489/324 323/488/323
-f 324/489/324 328/494/328 329/495/329
-f 329/495/329 325/490/325 324/489/324
-f 297/491/297 262/496/262 298/497/298
-f 298/497/298 326/492/326 297/491/297
-f 326/492/326 298/497/298 299/498/299
-f 299/498/299 327/493/327 326/492/326
-f 327/493/327 299/498/299 300/499/300
-f 300/499/300 328/494/328 327/493/327
-f 328/494/328 300/499/300 301/500/301
-f 301/500/301 329/495/329 328/494/328
-f 330/501/330 335/506/335 336/507/336
-f 336/507/336 331/502/331 330/501/330
-f 331/502/331 336/507/336 337/508/337
-f 337/508/337 332/503/332 331/502/331
-f 332/503/332 337/508/337 338/509/338
-f 338/509/338 333/504/333 332/503/332
-f 333/504/333 338/509/338 339/510/339
-f 339/510/339 334/505/334 333/504/333
-f 335/506/335 340/511/340 341/512/341
-f 341/512/341 336/507/336 335/506/335
-f 336/507/336 341/512/341 342/513/342
-f 342/513/342 337/508/337 336/507/336
-f 337/508/337 342/513/342 343/514/343
-f 343/514/343 338/509/338 337/508/337
-f 338/509/338 343/514/343 344/515/344
-f 344/515/344 339/510/339 338/509/338
-f 340/511/340 345/516/345 346/517/346
-f 346/517/346 341/512/341 340/511/340
-f 341/512/341 346/517/346 347/518/347
-f 347/518/347 342/513/342 341/512/341
-f 342/513/342 347/518/347 348/519/348
-f 348/519/348 343/514/343 342/513/342
-f 343/514/343 348/519/348 349/520/349
-f 349/520/349 344/515/344 343/514/343
-f 345/516/345 350/521/350 351/522/351
-f 351/522/351 346/517/346 345/516/345
-f 346/517/346 351/522/351 352/523/352
-f 352/523/352 347/518/347 346/517/346
-f 347/518/347 352/523/352 353/524/353
-f 353/524/353 348/519/348 347/518/347
-f 348/519/348 353/524/353 354/525/354
-f 354/525/354 349/520/349 348/519/348
-f 350/526/350 355/531/355 356/532/356
-f 356/532/356 351/527/351 350/526/350
-f 351/527/351 356/532/356 357/533/357
-f 357/533/357 352/528/352 351/527/351
-f 352/528/352 357/533/357 358/534/358
-f 358/534/358 353/529/353 352/528/352
-f 353/529/353 358/534/358 359/535/359
-f 359/535/359 354/530/354 353/529/353
-f 355/531/355 360/536/360 361/537/361
-f 361/537/361 356/532/356 355/531/355
-f 356/532/356 361/537/361 362/538/362
-f 362/538/362 357/533/357 356/532/356
-f 357/533/357 362/538/362 363/539/363
-f 363/539/363 358/534/358 357/533/357
-f 358/534/358 363/539/363 364/540/364
-f 364/540/364 359/535/359 358/534/358
-f 360/536/360 365/541/365 366/542/366
-f 366/542/366 361/537/361 360/536/360
-f 361/537/361 366/542/366 367/543/367
-f 367/543/367 362/538/362 361/537/361
-f 362/538/362 367/543/367 368/544/368
-f 368/544/368 363/539/363 362/538/362
-f 363/539/363 368/544/368 369/545/369
-f 369/545/369 364/540/364 363/539/363
-f 365/541/365 330/546/330 331/547/331
-f 331/547/331 366/542/366 365/541/365
-f 366/542/366 331/547/331 332/548/332
-f 332/548/332 367/543/367 366/542/366
-f 367/543/367 332/548/332 333/549/333
-f 333/549/333 368/544/368 367/543/367
-f 368/544/368 333/549/333 334/550/334
-f 334/550/334 369/545/369 368/544/368
-f 334/551/334 339/556/339 374/557/374
-f 374/557/374 370/552/370 334/551/334
-f 370/552/370 374/557/374 375/558/375
-f 375/558/375 371/553/371 370/552/370
-f 371/553/371 375/558/375 376/559/376
-f 376/559/376 372/554/372 371/553/371
-f 372/554/372 376/559/376 377/560/377
-f 377/560/377 373/555/373 372/554/372
-f 339/556/339 344/561/344 378/562/378
-f 378/562/378 374/557/374 339/556/339
-f 374/557/374 378/562/378 379/563/379
-f 379/563/379 375/558/375 374/557/374
-f 375/558/375 379/563/379 380/564/380
-f 380/564/380 376/559/376 375/558/375
-f 376/559/376 380/564/380 381/565/381
-f 381/565/381 377/560/377 376/559/376
-f 344/561/344 349/566/349 382/567/382
-f 382/567/382 378/562/378 344/561/344
-f 378/562/378 382/567/382 383/568/383
-f 383/568/383 379/563/379 378/562/378
-f 379/563/379 383/568/383 384/569/384
-f 384/569/384 380/564/380 379/563/379
-f 380/564/380 384/569/384 385/570/385
-f 385/570/385 381/565/381 380/564/380
-f 349/566/349 354/571/354 386/572/386
-f 386/572/386 382/567/382 349/566/349
-f 382/567/382 386/572/386 387/573/387
-f 387/573/387 383/568/383 382/567/382
-f 383/568/383 387/573/387 388/574/388
-f 388/574/388 384/569/384 383/568/383
-f 384/569/384 388/574/388 389/575/389
-f 389/575/389 385/570/385 384/569/384
-f 354/576/354 359/581/359 390/582/390
-f 390/582/390 386/577/386 354/576/354
-f 386/577/386 390/582/390 391/583/391
-f 391/583/391 387/578/387 386/577/386
-f 387/578/387 391/583/391 392/584/392
-f 392/584/392 388/579/388 387/578/387
-f 388/579/388 392/584/392 393/585/393
-f 393/585/393 389/580/389 388/579/388
-f 359/581/359 364/586/364 394/587/394
-f 394/587/394 390/582/390 359/581/359
-f 390/582/390 394/587/394 395/588/395
-f 395/588/395 391/583/391 390/582/390
-f 391/583/391 395/588/395 396/589/396
-f 396/589/396 392/584/392 391/583/391
-f 392/584/392 396/589/396 397/590/397
-f 397/590/397 393/585/393 392/584/392
-f 364/586/364 369/591/369 398/592/398
-f 398/592/398 394/587/394 364/586/364
-f 394/587/394 398/592/398 399/593/399
-f 399/593/399 395/588/395 394/587/394
-f 395/588/395 399/593/399 400/594/400
-f 400/594/400 396/589/396 395/588/395
-f 396/589/396 400/594/400 401/595/401
-f 401/595/401 397/590/397 396/589/396
-f 369/591/369 334/596/334 370/597/370
-f 370/597/370 398/592/398 369/591/369
-f 398/592/398 370/597/370 371/598/371
-f 371/598/371 399/593/399 398/592/398
-f 399/593/399 371/598/371 372/599/372
-f 372/599/372 400/594/400 399/593/399
-f 400/594/400 372/599/372 373/600/373
-f 373/600/373 401/595/401 400/594/400
-f 407/607/407 403/602/403 402/601/402
-f 403/602/403 407/607/407 408/608/408
-f 408/608/408 404/603/404 403/602/403
-f 404/603/404 408/608/408 409/609/409
-f 409/609/409 405/604/405 404/603/404
-f 405/604/405 409/609/409 410/610/410
-f 410/610/410 406/605/406 405/604/405
-f 411/612/411 407/607/407 402/606/402
-f 407/607/407 411/612/411 412/613/412
-f 412/613/412 408/608/408 407/607/407
-f 408/608/408 412/613/412 413/614/413
-f 413/614/413 409/609/409 408/608/408
-f 409/609/409 413/614/413 414/615/414
-f 414/615/414 410/610/410 409/609/409
-f 415/617/415 411/612/411 402/611/402
-f 411/612/411 415/617/415 416/618/416
-f 416/618/416 412/613/412 411/612/411
-f 412/613/412 416/618/416 417/619/417
-f 417/619/417 413/614/413 412/613/412
-f 413/614/413 417/619/417 418/620/418
-f 418/620/418 414/615/414 413/614/413
-f 419/622/419 415/617/415 402/616/402
-f 415/617/415 419/622/419 420/623/420
-f 420/623/420 416/618/416 415/617/415
-f 416/618/416 420/623/420 421/624/421
-f 421/624/421 417/619/417 416/618/416
-f 417/619/417 421/624/421 422/625/422
-f 422/625/422 418/620/418 417/619/417
-f 423/632/423 419/627/419 402/626/402
-f 419/627/419 423/632/423 424/633/424
-f 424/633/424 420/628/420 419/627/419
-f 420/628/420 424/633/424 425/634/425
-f 425/634/425 421/629/421 420/628/420
-f 421/629/421 425/634/425 426/635/426
-f 426/635/426 422/630/422 421/629/421
-f 427/637/427 423/632/423 402/631/402
-f 423/632/423 427/637/427 428/638/428
-f 428/638/428 424/633/424 423/632/423
-f 424/633/424 428/638/428 429/639/429
-f 429/639/429 425/634/425 424/633/424
-f 425/634/425 429/639/429 430/640/430
-f 430/640/430 426/635/426 425/634/425
-f 431/642/431 427/637/427 402/636/402
-f 427/637/427 431/642/431 432/643/432
-f 432/643/432 428/638/428 427/637/427
-f 428/638/428 432/643/432 433/644/433
-f 433/644/433 429/639/429 428/638/428
-f 429/639/429 433/644/433 434/645/434
-f 434/645/434 430/640/430 429/639/429
-f 435/647/435 431/642/431 402/641/402
-f 431/642/431 435/647/435 436/648/436
-f 436/648/436 432/643/432 431/642/431
-f 432/643/432 436/648/436 437/649/437
-f 437/649/437 433/644/433 432/643/432
-f 433/644/433 437/649/437 438/650/438
-f 438/650/438 434/645/434 433/644/433
-f 439/657/439 435/652/435 402/651/402
-f 435/652/435 439/657/439 440/658/440
-f 440/658/440 436/653/436 435/652/435
-f 436/653/436 440/658/440 441/659/441
-f 441/659/441 437/654/437 436/653/436
-f 437/654/437 441/659/441 442/660/442
-f 442/660/442 438/655/438 437/654/437
-f 443/662/443 439/657/439 402/656/402
-f 439/657/439 443/662/443 444/663/444
-f 444/663/444 440/658/440 439/657/439
-f 440/658/440 444/663/444 445/664/445
-f 445/664/445 441/659/441 440/658/440
-f 441/659/441 445/664/445 446/665/446
-f 446/665/446 442/660/442 441/659/441
-f 447/667/447 443/662/443 402/661/402
-f 443/662/443 447/667/447 448/668/448
-f 448/668/448 444/663/444 443/662/443
-f 444/663/444 448/668/448 449/669/449
-f 449/669/449 445/664/445 444/663/444
-f 445/664/445 449/669/449 450/670/450
-f 450/670/450 446/665/446 445/664/445
-f 451/672/451 447/667/447 402/666/402
-f 447/667/447 451/672/451 452/673/452
-f 452/673/452 448/668/448 447/667/447
-f 448/668/448 452/673/452 453/674/453
-f 453/674/453 449/669/449 448/668/448
-f 449/669/449 453/674/453 454/675/454
-f 454/675/454 450/670/450 449/669/449
-f 455/682/455 451/677/451 402/676/402
-f 451/677/451 455/682/455 456/683/456
-f 456/683/456 452/678/452 451/677/451
-f 452/678/452 456/683/456 457/684/457
-f 457/684/457 453/679/453 452/678/452
-f 453/679/453 457/684/457 458/685/458
-f 458/685/458 454/680/454 453/679/453
-f 459/687/459 455/682/455 402/681/402
-f 455/682/455 459/687/459 460/688/460
-f 460/688/460 456/683/456 455/682/455
-f 456/683/456 460/688/460 461/689/461
-f 461/689/461 457/684/457 456/683/456
-f 457/684/457 461/689/461 462/690/462
-f 462/690/462 458/685/458 457/684/457
-f 463/692/463 459/687/459 402/686/402
-f 459/687/459 463/692/463 464/693/464
-f 464/693/464 460/688/460 459/687/459
-f 460/688/460 464/693/464 465/694/465
-f 465/694/465 461/689/461 460/688/460
-f 461/689/461 465/694/465 466/695/466
-f 466/695/466 462/690/462 461/689/461
-f 403/697/403 463/692/463 402/691/402
-f 463/692/463 403/697/403 404/698/404
-f 404/698/404 464/693/464 463/692/463
-f 464/693/464 404/698/404 405/699/405
-f 405/699/405 465/694/465 464/693/464
-f 465/694/465 405/699/405 406/700/406
-f 406/700/406 466/695/466 465/694/465
-f 406/701/406 410/706/410 471/707/471
-f 471/707/471 467/702/467 406/701/406
-f 467/702/467 471/707/471 472/708/472
-f 472/708/472 468/703/468 467/702/467
-f 468/703/468 472/708/472 473/709/473
-f 473/709/473 469/704/469 468/703/468
-f 469/704/469 473/709/473 474/710/474
-f 474/710/474 470/705/470 469/704/469
-f 410/706/410 414/711/414 475/712/475
-f 475/712/475 471/707/471 410/706/410
-f 471/707/471 475/712/475 476/713/476
-f 476/713/476 472/708/472 471/707/471
-f 472/708/472 476/713/476 477/714/477
-f 477/714/477 473/709/473 472/708/472
-f 473/709/473 477/714/477 478/715/478
-f 478/715/478 474/710/474 473/709/473
-f 414/711/414 418/716/418 479/717/479
-f 479/717/479 475/712/475 414/711/414
-f 475/712/475 479/717/479 480/718/480
-f 480/718/480 476/713/476 475/712/475
-f 476/713/476 480/718/480 481/719/481
-f 481/719/481 477/714/477 476/713/476
-f 477/714/477 481/719/481 482/720/482
-f 482/720/482 478/715/478 477/714/477
-f 418/716/418 422/721/422 483/722/483
-f 483/722/483 479/717/479 418/716/418
-f 479/717/479 483/722/483 484/723/484
-f 484/723/484 480/718/480 479/717/479
-f 480/718/480 484/723/484 485/724/485
-f 485/724/485 481/719/481 480/718/480
-f 481/719/481 485/724/485 486/725/486
-f 486/725/486 482/720/482 481/719/481
-f 422/726/422 426/731/426 487/732/487
-f 487/732/487 483/727/483 422/726/422
-f 483/727/483 487/732/487 488/733/488
-f 488/733/488 484/728/484 483/727/483
-f 484/728/484 488/733/488 489/734/489
-f 489/734/489 485/729/485 484/728/484
-f 485/729/485 489/734/489 490/735/490
-f 490/735/490 486/730/486 485/729/485
-f 426/731/426 430/736/430 491/737/491
-f 491/737/491 487/732/487 426/731/426
-f 487/732/487 491/737/491 492/738/492
-f 492/738/492 488/733/488 487/732/487
-f 488/733/488 492/738/492 493/739/493
-f 493/739/493 489/734/489 488/733/488
-f 489/734/489 493/739/493 494/740/494
-f 494/740/494 490/735/490 489/734/489
-f 430/736/430 434/741/434 495/742/495
-f 495/742/495 491/737/491 430/736/430
-f 491/737/491 495/742/495 496/743/496
-f 496/743/496 492/738/492 491/737/491
-f 492/738/492 496/743/496 497/744/497
-f 497/744/497 493/739/493 492/738/492
-f 493/739/493 497/744/497 498/745/498
-f 498/745/498 494/740/494 493/739/493
-f 434/741/434 438/746/438 499/747/499
-f 499/747/499 495/742/495 434/741/434
-f 495/742/495 499/747/499 500/748/500
-f 500/748/500 496/743/496 495/742/495
-f 496/743/496 500/748/500 501/749/501
-f 501/749/501 497/744/497 496/743/496
-f 497/744/497 501/749/501 502/750/502
-f 502/750/502 498/745/498 497/744/497
-f 438/751/438 442/756/442 503/757/503
-f 503/757/503 499/752/499 438/751/438
-f 499/752/499 503/757/503 504/758/504
-f 504/758/504 500/753/500 499/752/499
-f 500/753/500 504/758/504 505/759/505
-f 505/759/505 501/754/501 500/753/500
-f 501/754/501 505/759/505 506/760/506
-f 506/760/506 502/755/502 501/754/501
-f 442/756/442 446/761/446 507/762/507
-f 507/762/507 503/757/503 442/756/442
-f 503/757/503 507/762/507 508/763/508
-f 508/763/508 504/758/504 503/757/503
-f 504/758/504 508/763/508 509/764/509
-f 509/764/509 505/759/505 504/758/504
-f 505/759/505 509/764/509 510/765/510
-f 510/765/510 506/760/506 505/759/505
-f 446/761/446 450/766/450 511/767/511
-f 511/767/511 507/762/507 446/761/446
-f 507/762/507 511/767/511 512/768/512
-f 512/768/512 508/763/508 507/762/507
-f 508/763/508 512/768/512 513/769/513
-f 513/769/513 509/764/509 508/763/508
-f 509/764/509 513/769/513 514/770/514
-f 514/770/514 510/765/510 509/764/509
-f 450/766/450 454/771/454 515/772/515
-f 515/772/515 511/767/511 450/766/450
-f 511/767/511 515/772/515 516/773/516
-f 516/773/516 512/768/512 511/767/511
-f 512/768/512 516/773/516 517/774/517
-f 517/774/517 513/769/513 512/768/512
-f 513/769/513 517/774/517 518/775/518
-f 518/775/518 514/770/514 513/769/513
-f 454/776/454 458/781/458 519/782/519
-f 519/782/519 515/777/515 454/776/454
-f 515/777/515 519/782/519 520/783/520
-f 520/783/520 516/778/516 515/777/515
-f 516/778/516 520/783/520 521/784/521
-f 521/784/521 517/779/517 516/778/516
-f 517/779/517 521/784/521 522/785/522
-f 522/785/522 518/780/518 517/779/517
-f 458/781/458 462/786/462 523/787/523
-f 523/787/523 519/782/519 458/781/458
-f 519/782/519 523/787/523 524/788/524
-f 524/788/524 520/783/520 519/782/519
-f 520/783/520 524/788/524 525/789/525
-f 525/789/525 521/784/521 520/783/520
-f 521/784/521 525/789/525 526/790/526
-f 526/790/526 522/785/522 521/784/521
-f 462/786/462 466/791/466 527/792/527
-f 527/792/527 523/787/523 462/786/462
-f 523/787/523 527/792/527 528/793/528
-f 528/793/528 524/788/524 523/787/523
-f 524/788/524 528/793/528 529/794/529
-f 529/794/529 525/789/525 524/788/524
-f 525/789/525 529/794/529 530/795/530
-f 530/795/530 526/790/526 525/789/525
-f 466/791/466 406/796/406 467/797/467
-f 467/797/467 527/792/527 466/791/466
-f 527/792/527 467/797/467 468/798/468
-f 468/798/468 528/793/528 527/792/527
-f 528/793/528 468/798/468 469/799/469
-f 469/799/469 529/794/529 528/793/528
-f 529/794/529 469/799/469 470/800/470
-f 470/800/470 530/795/530 529/794/529
-# 992 faces
-
-g
diff --git a/WebCore/manual-tests/webgl/resources/utils3d.js b/WebCore/manual-tests/webgl/resources/utils3d.js
deleted file mode 100644
index 58f520f..0000000
--- a/WebCore/manual-tests/webgl/resources/utils3d.js
+++ /dev/null
@@ -1,530 +0,0 @@
-//
-// initWebGL
-//
-// Initialize the Canvas element with the passed name as a WebGL object and return the
-// WebGLRenderingContext.
-//
-// Load shaders with the passed names and create a program with them. Return this program
-// in the 'program' property of the returned context.
-//
-// For each string in the passed attribs array, bind an attrib with that name at that index.
-// Once the attribs are bound, link the program and then use it.
-//
-// Set the clear color to the passed array (4 values) and set the clear depth to the passed value.
-// Enable depth testing and blending with a blend func of (SRC_ALPHA, ONE_MINUS_SRC_ALPHA)
-//
-function initWebGL(canvasName, vshader, fshader, attribs, clearColor, clearDepth)
-{
- var canvas = document.getElementById(canvasName);
- var gl = canvas.getContext("webkit-3d");
-
- // create our shaders
- var vertexShader = loadShader(gl, vshader);
- var fragmentShader = loadShader(gl, fshader);
-
- if (!vertexShader || !fragmentShader)
- return null;
-
- // Create the program object
- gl.program = gl.createProgram();
-
- if (!gl.program)
- return null;
-
- // Attach our two shaders to the program
- gl.attachShader (gl.program, vertexShader);
- gl.attachShader (gl.program, fragmentShader);
-
- // Bind attributes
- for (var i in attribs)
- gl.bindAttribLocation (gl.program, i, attribs[i]);
-
- // Link the program
- gl.linkProgram(gl.program);
-
- // Check the link status
- var linked = gl.getProgramParameter(gl.program, gl.LINK_STATUS);
- if (!linked) {
- // something went wrong with the link
- var error = gl.getProgramInfoLog (gl.program);
- console.log("Error in program linking:"+error);
-
- gl.deleteProgram(gl.program);
- gl.deleteProgram(fragmentShader);
- gl.deleteProgram(vertexShader);
-
- return null;
- }
-
- gl.useProgram(gl.program);
-
- gl.clearColor (clearColor[0], clearColor[1], clearColor[2], clearColor[3]);
- gl.clearDepth (clearDepth);
-
- gl.enable(gl.DEPTH_TEST);
- gl.enable(gl.BLEND);
- gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
-
- return gl;
-}
-
-//
-// loadShader
-//
-// 'shaderId' is the id of a <script> element containing the shader source string.
-// Load this shader and return the WebGLShader object corresponding to it.
-//
-function loadShader(ctx, shaderId)
-{
- var shaderScript = document.getElementById(shaderId);
- if (!shaderScript) {
- console.log("*** Error: shader script '"+shaderId+"' not found");
- return null;
- }
-
- if (shaderScript.type == "x-shader/x-vertex")
- var shaderType = ctx.VERTEX_SHADER;
- else if (shaderScript.type == "x-shader/x-fragment")
- var shaderType = ctx.FRAGMENT_SHADER;
- else {
- console.log("*** Error: shader script '"+shaderId+"' of undefined type '"+shaderScript.type+"'");
- return null;
- }
-
- // Create the shader object
- var shader = ctx.createShader(shaderType);
- if (shader == null) {
- console.log("*** Error: unable to create shader '"+shaderId+"'");
- return null;
- }
-
- // Load the shader source
- ctx.shaderSource(shader, shaderScript.text);
-
- // Compile the shader
- ctx.compileShader(shader);
-
- // Check the compile status
- var compiled = ctx.getShaderParameter(shader, ctx.COMPILE_STATUS);
- if (!compiled) {
- // Something went wrong during compilation; get the error
- var error = ctx.getShaderInfoLog(shader);
- console.log("*** Error compiling shader '"+shaderId+"':"+error);
- ctx.deleteShader(shader);
- return null;
- }
-
- return shader;
-}
-
-//
-// makeBox
-//
-// Create a box with vertices, normals and texCoords. Create VBOs for each as well as the index array.
-// Return an object with the following properties:
-//
-// normalObject WebGLBuffer object for normals
-// texCoordObject WebGLBuffer object for texCoords
-// vertexObject WebGLBuffer object for vertices
-// indexObject WebGLBuffer object for indices
-// numIndices The number of indices in the indexObject
-//
-function makeBox(ctx)
-{
- // box
- // v6----- v5
- // /| /|
- // v1------v0|
- // | | | |
- // | |v7---|-|v4
- // |/ |/
- // v2------v3
- //
- // vertex coords array
- var vertices = new WebGLFloatArray(
- [ 1, 1, 1, -1, 1, 1, -1,-1, 1, 1,-1, 1, // v0-v1-v2-v3 front
- 1, 1, 1, 1,-1, 1, 1,-1,-1, 1, 1,-1, // v0-v3-v4-v5 right
- 1, 1, 1, 1, 1,-1, -1, 1,-1, -1, 1, 1, // v0-v5-v6-v1 top
- -1, 1, 1, -1, 1,-1, -1,-1,-1, -1,-1, 1, // v1-v6-v7-v2 left
- -1,-1,-1, 1,-1,-1, 1,-1, 1, -1,-1, 1, // v7-v4-v3-v2 bottom
- 1,-1,-1, -1,-1,-1, -1, 1,-1, 1, 1,-1 ] // v4-v7-v6-v5 back
- );
-
- // normal array
- var normals = new WebGLFloatArray(
- [ 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, // v0-v1-v2-v3 front
- 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, // v0-v3-v4-v5 right
- 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, // v0-v5-v6-v1 top
- -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, // v1-v6-v7-v2 left
- 0,-1, 0, 0,-1, 0, 0,-1, 0, 0,-1, 0, // v7-v4-v3-v2 bottom
- 0, 0,-1, 0, 0,-1, 0, 0,-1, 0, 0,-1 ] // v4-v7-v6-v5 back
- );
-
-
- // texCoord array
- var texCoords = new WebGLFloatArray(
- [ 1, 1, 0, 1, 0, 0, 1, 0, // v0-v1-v2-v3 front
- 0, 1, 0, 0, 1, 0, 1, 1, // v0-v3-v4-v5 right
- 1, 0, 1, 1, 0, 1, 0, 0, // v0-v5-v6-v1 top
- 1, 1, 0, 1, 0, 0, 1, 0, // v1-v6-v7-v2 left
- 0, 0, 1, 0, 1, 1, 0, 1, // v7-v4-v3-v2 bottom
- 0, 0, 1, 0, 1, 1, 0, 1 ] // v4-v7-v6-v5 back
- );
-
- // index array
- var indices = new WebGLUnsignedByteArray(
- [ 0, 1, 2, 0, 2, 3, // front
- 4, 5, 6, 4, 6, 7, // right
- 8, 9,10, 8,10,11, // top
- 12,13,14, 12,14,15, // left
- 16,17,18, 16,18,19, // bottom
- 20,21,22, 20,22,23 ] // back
- );
-
- var retval = { };
-
- retval.normalObject = ctx.createBuffer();
- ctx.bindBuffer(ctx.ARRAY_BUFFER, retval.normalObject);
- ctx.bufferData(ctx.ARRAY_BUFFER, normals, ctx.STATIC_DRAW);
-
- retval.texCoordObject = ctx.createBuffer();
- ctx.bindBuffer(ctx.ARRAY_BUFFER, retval.texCoordObject);
- ctx.bufferData(ctx.ARRAY_BUFFER, texCoords, ctx.STATIC_DRAW);
-
- retval.vertexObject = ctx.createBuffer();
- ctx.bindBuffer(ctx.ARRAY_BUFFER, retval.vertexObject);
- ctx.bufferData(ctx.ARRAY_BUFFER, vertices, ctx.STATIC_DRAW);
-
- ctx.bindBuffer(ctx.ARRAY_BUFFER, 0);
-
- retval.indexObject = ctx.createBuffer();
- ctx.bindBuffer(ctx.ELEMENT_ARRAY_BUFFER, retval.indexObject);
- ctx.bufferData(ctx.ELEMENT_ARRAY_BUFFER, indices, ctx.STATIC_DRAW);
- ctx.bindBuffer(ctx.ELEMENT_ARRAY_BUFFER, 0);
-
- retval.numIndices = indices.length;
-
- return retval;
-}
-
-//
-// makeSphere
-//
-// Create a sphere with the passed number of latitude and longitude bands and the passed radius.
-// Sphere has vertices, normals and texCoords. Create VBOs for each as well as the index array.
-// Return an object with the following properties:
-//
-// normalObject WebGLBuffer object for normals
-// texCoordObject WebGLBuffer object for texCoords
-// vertexObject WebGLBuffer object for vertices
-// indexObject WebGLBuffer object for indices
-// numIndices The number of indices in the indexObject
-//
-function makeSphere(ctx, radius, lats, longs)
-{
- var geometryData = [ ];
- var normalData = [ ];
- var texCoordData = [ ];
- var indexData = [ ];
-
- for (var latNumber = 0; latNumber <= lats; ++latNumber) {
- for (var longNumber = 0; longNumber <= longs; ++longNumber) {
- var theta = latNumber * Math.PI / lats;
- var phi = longNumber * 2 * Math.PI / longs;
- var sinTheta = Math.sin(theta);
- var sinPhi = Math.sin(phi);
- var cosTheta = Math.cos(theta);
- var cosPhi = Math.cos(phi);
-
- var x = cosPhi * sinTheta;
- var y = cosTheta;
- var z = sinPhi * sinTheta;
- var u = 1-(longNumber/longs);
- var v = latNumber/lats;
-
- normalData.push(x);
- normalData.push(y);
- normalData.push(z);
- texCoordData.push(u);
- texCoordData.push(v);
- geometryData.push(radius * x);
- geometryData.push(radius * y);
- geometryData.push(radius * z);
- }
- }
-
- longs += 1;
- for (var latNumber = 0; latNumber < lats; ++latNumber) {
- for (var longNumber = 0; longNumber < longs; ++longNumber) {
- var first = (latNumber * longs) + (longNumber % longs);
- var second = first + longs;
- indexData.push(first);
- indexData.push(second);
- indexData.push(first+1);
-
- indexData.push(second);
- indexData.push(second+1);
- indexData.push(first+1);
- }
- }
-
- var retval = { };
-
- retval.normalObject = ctx.createBuffer();
- ctx.bindBuffer(ctx.ARRAY_BUFFER, retval.normalObject);
- ctx.bufferData(ctx.ARRAY_BUFFER, new WebGLFloatArray(normalData), ctx.STATIC_DRAW);
-
- retval.texCoordObject = ctx.createBuffer();
- ctx.bindBuffer(ctx.ARRAY_BUFFER, retval.texCoordObject);
- ctx.bufferData(ctx.ARRAY_BUFFER, new WebGLFloatArray(texCoordData), ctx.STATIC_DRAW);
-
- retval.vertexObject = ctx.createBuffer();
- ctx.bindBuffer(ctx.ARRAY_BUFFER, retval.vertexObject);
- ctx.bufferData(ctx.ARRAY_BUFFER, new WebGLFloatArray(geometryData), ctx.STATIC_DRAW);
-
- retval.numIndices = indexData.length;
- retval.indexObject = ctx.createBuffer();
- ctx.bindBuffer(ctx.ELEMENT_ARRAY_BUFFER, retval.indexObject);
- ctx.bufferData(ctx.ELEMENT_ARRAY_BUFFER, new WebGLUnsignedShortArray(indexData), ctx.STREAM_DRAW);
-
- return retval;
-}
-
-//
-// loadObj
-//
-// Load a .obj file from the passed URL. Return an object with a 'loaded' property set to false.
-// When the object load is complete, the 'loaded' property becomes true and the following
-// properties are set:
-//
-// normalObject WebGLBuffer object for normals
-// texCoordObject WebGLBuffer object for texCoords
-// vertexObject WebGLBuffer object for vertices
-// indexObject WebGLBuffer object for indices
-// numIndices The number of indices in the indexObject
-//
-function loadObj(ctx, url)
-{
- var obj = { loaded : false };
- obj.ctx = ctx;
- var req = new XMLHttpRequest();
- req.obj = obj;
- req.onreadystatechange = function () { processLoadObj(req) };
- req.open("GET", url, true);
- req.send(null);
- return obj;
-}
-
-function processLoadObj(req)
-{
- console.log("req="+req)
- // only if req shows "complete"
- if (req.readyState == 4) {
- doLoadObj(req.obj, req.responseText);
- }
-}
-
-function doLoadObj(obj, text)
-{
- vertexArray = [ ];
- normalArray = [ ];
- textureArray = [ ];
- indexArray = [ ];
-
- var vertex = [ ];
- var normal = [ ];
- var texture = [ ];
- var facemap = { };
- var index = 0;
-
- var lines = text.split("\n");
- for (var lineIndex in lines) {
- var line = lines[lineIndex].replace(/[ \t]+/g, " ").replace(/\s\s*$/, "");
-
- // ignore comments
- if (line[0] == "#")
- continue;
-
- var array = line.split(" ");
- if (array[0] == "v") {
- // vertex
- vertex.push(parseFloat(array[1]));
- vertex.push(parseFloat(array[2]));
- vertex.push(parseFloat(array[3]));
- }
- else if (array[0] == "vt") {
- // normal
- texture.push(parseFloat(array[1]));
- texture.push(parseFloat(array[2]));
- }
- else if (array[0] == "vn") {
- // normal
- normal.push(parseFloat(array[1]));
- normal.push(parseFloat(array[2]));
- normal.push(parseFloat(array[3]));
- }
- else if (array[0] == "f") {
- // face
- if (array.length != 4) {
- console.log("*** Error: face '"+line+"' not handled");
- continue;
- }
-
- for (var i = 1; i < 4; ++i) {
- if (!(array[i] in facemap)) {
- // add a new entry to the map and arrays
- var f = array[i].split("/");
- var vtx, nor, tex;
-
- if (f.length == 1) {
- vtx = parseInt(f[0]) - 1;
- nor = vtx;
- tex = vtx;
- }
- else if (f.length = 3) {
- vtx = parseInt(f[0]) - 1;
- tex = parseInt(f[1]) - 1;
- nor = parseInt(f[2]) - 1;
- }
- else {
- console.log("*** Error: did not understand face '"+array[i]+"'");
- return null;
- }
-
- // do the vertices
- var x = 0;
- var y = 0;
- var z = 0;
- if (vtx * 3 + 2 < vertex.length) {
- x = vertex[vtx*3];
- y = vertex[vtx*3+1];
- z = vertex[vtx*3+2];
- }
- vertexArray.push(x);
- vertexArray.push(y);
- vertexArray.push(z);
-
- // do the textures
- x = 0;
- y = 0;
- if (tex * 2 + 1 < texture.length) {
- x = texture[tex*2];
- y = texture[tex*2+1];
- }
- textureArray.push(x);
- textureArray.push(y);
-
- // do the normals
- x = 0;
- y = 0;
- z = 1;
- if (nor * 3 + 2 < normal.length) {
- x = normal[nor*3];
- y = normal[nor*3+1];
- z = normal[nor*3+2];
- }
- normalArray.push(x);
- normalArray.push(y);
- normalArray.push(z);
-
- facemap[array[i]] = index++;
- }
-
- indexArray.push(facemap[array[i]]);
- }
- }
- }
-
- // set the VBOs
- obj.normalObject = obj.ctx.createBuffer();
- obj.ctx.bindBuffer(obj.ctx.ARRAY_BUFFER, obj.normalObject);
- obj.ctx.bufferData(obj.ctx.ARRAY_BUFFER, new WebGLFloatArray(normalArray), obj.ctx.STATIC_DRAW);
-
- obj.texCoordObject = obj.ctx.createBuffer();
- obj.ctx.bindBuffer(obj.ctx.ARRAY_BUFFER, obj.texCoordObject);
- obj.ctx.bufferData(obj.ctx.ARRAY_BUFFER, new WebGLFloatArray(textureArray), obj.ctx.STATIC_DRAW);
-
- obj.vertexObject = obj.ctx.createBuffer();
- obj.ctx.bindBuffer(obj.ctx.ARRAY_BUFFER, obj.vertexObject);
- obj.ctx.bufferData(obj.ctx.ARRAY_BUFFER, new WebGLFloatArray(vertexArray), obj.ctx.STATIC_DRAW);
-
- obj.numIndices = indexArray.length;
- obj.indexObject = obj.ctx.createBuffer();
- obj.ctx.bindBuffer(obj.ctx.ELEMENT_ARRAY_BUFFER, obj.indexObject);
- obj.ctx.bufferData(obj.ctx.ELEMENT_ARRAY_BUFFER, new WebGLUnsignedShortArray(indexArray), obj.ctx.STREAM_DRAW);
-
- obj.loaded = true;
-}
-
-//
-// loadImageTexture
-//
-// Load the image at the passed url, place it in a new WebGLTexture object and return the WebGLTexture.
-//
-function loadImageTexture(ctx, url)
-{
- var texture = ctx.createTexture();
- texture.image = new Image();
- texture.image.onload = function() { doLoadImageTexture(ctx, texture.image, texture) }
- texture.image.src = url;
- return texture;
-}
-
-function doLoadImageTexture(ctx, image, texture)
-{
- ctx.enable(ctx.TEXTURE_2D);
- ctx.bindTexture(ctx.TEXTURE_2D, texture);
- ctx.texImage2D(ctx.TEXTURE_2D, 0, image);
- ctx.texParameteri(ctx.TEXTURE_2D, ctx.TEXTURE_MAG_FILTER, ctx.LINEAR);
- ctx.texParameteri(ctx.TEXTURE_2D, ctx.TEXTURE_MIN_FILTER, ctx.LINEAR_MIPMAP_LINEAR);
- ctx.texParameteri(ctx.TEXTURE_2D, ctx.TEXTURE_WRAP_S, ctx.CLAMP_TO_EDGE);
- ctx.texParameteri(ctx.TEXTURE_2D, ctx.TEXTURE_WRAP_T, ctx.CLAMP_TO_EDGE);
- ctx.generateMipmap(ctx.TEXTURE_2D)
- ctx.bindTexture(ctx.TEXTURE_2D, 0);
-}
-
-//
-// Framerate object
-//
-// This object keeps track of framerate and displays it as the innerHTML text of the
-// HTML element with the passed id. Once created you call snapshot at the end
-// of every rendering cycle. Every 500ms the framerate is updated in the HTML element.
-//
-Framerate = function(id)
-{
- this.numFramerates = 10;
- this.framerateUpdateInterval = 500;
- this.id = id;
-
- this.renderTime = -1;
- this.framerates = [ ];
- self = this;
- var fr = function() { self.updateFramerate() }
- setInterval(fr, this.framerateUpdateInterval);
-}
-
-Framerate.prototype.updateFramerate = function()
-{
- var tot = 0;
- for (var i = 0; i < this.framerates.length; ++i)
- tot += this.framerates[i];
-
- var framerate = tot / this.framerates.length;
- framerate = Math.round(framerate);
- document.getElementById(this.id).innerHTML = "Framerate:"+framerate+"fps";
-}
-
-Framerate.prototype.snapshot = function()
-{
- if (this.renderTime < 0)
- this.renderTime = new Date().getTime();
- else {
- var newTime = new Date().getTime();
- var t = newTime - this.renderTime;
- var framerate = 1000/t;
- this.framerates.push(framerate);
- while (this.framerates.length > this.numFramerates)
- this.framerates.shift();
- this.renderTime = newTime;
- }
-}
diff --git a/WebCore/mathml/MathMLElement.cpp b/WebCore/mathml/MathMLElement.cpp
index 14febe5..b47f4a9 100644
--- a/WebCore/mathml/MathMLElement.cpp
+++ b/WebCore/mathml/MathMLElement.cpp
@@ -1,21 +1,26 @@
/*
- * Copyright (C) 2009 Alex Milowski (alex@milowski.com). 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; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
+ * Copyright (C) 2009 Alex Milowski (alex@milowski.com). 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 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"
diff --git a/WebCore/mathml/MathMLElement.h b/WebCore/mathml/MathMLElement.h
index b00af47..2fa322f 100644
--- a/WebCore/mathml/MathMLElement.h
+++ b/WebCore/mathml/MathMLElement.h
@@ -1,21 +1,26 @@
/*
- * Copyright (C) 2009 Alex Milowski (alex@milowski.com). 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; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
+ * Copyright (C) 2009 Alex Milowski (alex@milowski.com). 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 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 MathMLElement_h
diff --git a/WebCore/mathml/MathMLInlineContainerElement.cpp b/WebCore/mathml/MathMLInlineContainerElement.cpp
index 2bb02f6..019c4ce 100644
--- a/WebCore/mathml/MathMLInlineContainerElement.cpp
+++ b/WebCore/mathml/MathMLInlineContainerElement.cpp
@@ -1,21 +1,26 @@
/*
- * Copyright (C) 2009 Alex Milowski (alex@milowski.com). 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; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
+ * Copyright (C) 2009 Alex Milowski (alex@milowski.com). 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 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"
@@ -25,7 +30,7 @@
#include "MathMLInlineContainerElement.h"
#include "MathMLNames.h"
-#include "RenderObject.h"
+#include "RenderMathMLBlock.h"
namespace WebCore {
@@ -41,10 +46,12 @@ PassRefPtr<MathMLInlineContainerElement> MathMLInlineContainerElement::create(co
return new MathMLInlineContainerElement(tagName, document);
}
-RenderObject* MathMLInlineContainerElement::createRenderer(RenderArena *, RenderStyle* style)
+RenderObject* MathMLInlineContainerElement::createRenderer(RenderArena *arena, RenderStyle* style)
{
// FIXME: This method will contain the specialized renderers based on element name
- return RenderObject::createObject(this, style);
+ RenderObject* object = new (arena) RenderMathMLBlock(this);
+ object->setStyle(style);
+ return object;
}
diff --git a/WebCore/mathml/MathMLInlineContainerElement.h b/WebCore/mathml/MathMLInlineContainerElement.h
index 4529d3b..dc78dc4 100644
--- a/WebCore/mathml/MathMLInlineContainerElement.h
+++ b/WebCore/mathml/MathMLInlineContainerElement.h
@@ -1,21 +1,26 @@
/*
- * Copyright (C) 2009 Alex Milowski (alex@milowski.com). 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; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
+ * Copyright (C) 2009 Alex Milowski (alex@milowski.com). 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 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 MathMLInlineContainerElement_h
diff --git a/WebCore/mathml/MathMLMathElement.cpp b/WebCore/mathml/MathMLMathElement.cpp
index 8b083f4..bd3b797 100644
--- a/WebCore/mathml/MathMLMathElement.cpp
+++ b/WebCore/mathml/MathMLMathElement.cpp
@@ -1,21 +1,26 @@
/*
- * Copyright (C) 2009 Alex Milowski (alex@milowski.com). 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; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
+ * Copyright (C) 2009 Alex Milowski (alex@milowski.com). 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 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"
diff --git a/WebCore/mathml/MathMLMathElement.h b/WebCore/mathml/MathMLMathElement.h
index f363cd2..e784524 100644
--- a/WebCore/mathml/MathMLMathElement.h
+++ b/WebCore/mathml/MathMLMathElement.h
@@ -1,21 +1,26 @@
/*
- * Copyright (C) 2009 Alex Milowski (alex@milowski.com). 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; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
+ * Copyright (C) 2009 Alex Milowski (alex@milowski.com). 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 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 MathMLMathElement_h
diff --git a/WebCore/mathml/MathMLTextElement.cpp b/WebCore/mathml/MathMLTextElement.cpp
new file mode 100644
index 0000000..11d46c4
--- /dev/null
+++ b/WebCore/mathml/MathMLTextElement.cpp
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2009 Alex Milowski (alex@milowski.com). 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 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(MATHML)
+
+#include "MathMLTextElement.h"
+
+#include "MathMLNames.h"
+#include "RenderObject.h"
+
+namespace WebCore {
+
+using namespace MathMLNames;
+
+MathMLTextElement::MathMLTextElement(const QualifiedName& tagName, Document* document)
+ : MathMLElement(tagName, document)
+{
+}
+
+PassRefPtr<MathMLTextElement> MathMLTextElement::create(const QualifiedName& tagName, Document* document)
+{
+ return new MathMLTextElement(tagName, document);
+}
+
+RenderObject* MathMLTextElement::createRenderer(RenderArena* , RenderStyle* style)
+{
+ return RenderObject::createObject(this, style);
+}
+
+
+}
+
+#endif // ENABLE(MATHML)
+
diff --git a/WebCore/mathml/MathMLTextElement.h b/WebCore/mathml/MathMLTextElement.h
new file mode 100644
index 0000000..e647bfa
--- /dev/null
+++ b/WebCore/mathml/MathMLTextElement.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2009 Alex Milowski (alex@milowski.com). 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 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 MathMLTextElement_h
+#define MathMLTextElement_h
+
+#if ENABLE(MATHML)
+#include "MathMLElement.h"
+
+namespace WebCore {
+
+class MathMLTextElement : public MathMLElement {
+public:
+ static PassRefPtr<MathMLTextElement> create(const QualifiedName& tagName, Document*);
+
+ virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+
+protected:
+ MathMLTextElement(const QualifiedName& tagName, Document*);
+
+};
+
+}
+
+#endif // ENABLE(MATHML)
+#endif // MathMLTextElement_h
diff --git a/WebCore/mathml/RenderMathMLBlock.cpp b/WebCore/mathml/RenderMathMLBlock.cpp
new file mode 100644
index 0000000..249c136
--- /dev/null
+++ b/WebCore/mathml/RenderMathMLBlock.cpp
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2009 Alex Milowski (alex@milowski.com). 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 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(MATHML)
+
+#include "RenderMathMLBlock.h"
+
+#include "FontSelector.h"
+#include "MathMLNames.h"
+#include "RenderInline.h"
+#include "RenderText.h"
+
+namespace WebCore {
+
+using namespace MathMLNames;
+
+RenderMathMLBlock::RenderMathMLBlock(Node* container)
+ : RenderBlock(container)
+{
+}
+
+bool RenderMathMLBlock::isChildAllowed(RenderObject* child, RenderStyle*) const
+{
+ return child->node() && child->node()->nodeType() == Node::ELEMENT_NODE;
+}
+
+PassRefPtr<RenderStyle> RenderMathMLBlock::makeBlockStyle()
+{
+ RefPtr<RenderStyle> newStyle = RenderStyle::create();
+ newStyle->inheritFrom(style());
+ newStyle->setDisplay(BLOCK);
+ return newStyle;
+}
+
+int RenderMathMLBlock::nonOperatorHeight() const
+{
+ if (!isRenderMathMLOperator())
+ return offsetHeight();
+
+ return 0;
+}
+
+void RenderMathMLBlock::stretchToHeight(int height)
+{
+ for (RenderObject* current = firstChild(); current; current = current->nextSibling())
+ if (current->isRenderMathMLBlock()) {
+ RenderMathMLBlock* block = toRenderMathMLBlock(current);
+ block->stretchToHeight(height);
+ }
+}
+
+
+}
+
+#endif
diff --git a/WebCore/mathml/RenderMathMLBlock.h b/WebCore/mathml/RenderMathMLBlock.h
new file mode 100644
index 0000000..b274a69
--- /dev/null
+++ b/WebCore/mathml/RenderMathMLBlock.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 Alex Milowski (alex@milowski.com). 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 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 RenderMathMLBlock_h
+#define RenderMathMLBlock_h
+
+#if ENABLE(MATHML)
+
+#include "RenderBlock.h"
+
+namespace WebCore {
+
+class RenderMathMLBlock : public RenderBlock {
+public:
+ RenderMathMLBlock(Node* container);
+ virtual bool isChildAllowed(RenderObject*, RenderStyle*) const;
+
+ virtual bool isRenderMathMLBlock() const { return true; }
+ virtual bool isRenderMathMLOperator() const { return false; }
+ virtual bool isRenderMathMLRow() const { return false; }
+ virtual bool isRenderMathMLMath() const { return false; }
+ virtual bool hasBase() const { return false; }
+ virtual int nonOperatorHeight() const;
+ virtual void stretchToHeight(int height);
+
+protected:
+ virtual PassRefPtr<RenderStyle> makeBlockStyle();
+
+};
+
+inline RenderMathMLBlock* toRenderMathMLBlock(RenderObject* object)
+{
+ ASSERT(!object || object->isRenderMathMLBlock());
+ return static_cast<RenderMathMLBlock*>(object);
+}
+
+inline const RenderMathMLBlock* toRenderMathMLBlock(const RenderObject* object)
+{
+ ASSERT(!object || object->isRenderMathMLBlock());
+ return static_cast<const RenderMathMLBlock*>(object);
+}
+
+}
+
+
+#endif // ENABLE(MATHML)
+#endif // RenderMathMLBlock_h
diff --git a/WebCore/mathml/mathattrs.in b/WebCore/mathml/mathattrs.in
new file mode 100644
index 0000000..df2329a
--- /dev/null
+++ b/WebCore/mathml/mathattrs.in
@@ -0,0 +1,13 @@
+namespace="MathML"
+namespaceURI="http://www.w3.org/1998/Math/MathML"
+guardFactoryWith="ENABLE(MATHML)"
+attrsNullNamespace
+
+close
+denomalign
+linethickness
+mathsize
+numalign
+open
+separators
+stretchy
diff --git a/WebCore/mathml/mathtags.in b/WebCore/mathml/mathtags.in
index 8704dbf..c853fca 100644
--- a/WebCore/mathml/mathtags.in
+++ b/WebCore/mathml/mathtags.in
@@ -1,7 +1,6 @@
namespace="MathML"
namespaceURI="http://www.w3.org/1998/Math/MathML"
guardFactoryWith="ENABLE(MATHML)"
-exportStrings
math
mfrac interfaceName=MathMLInlineContainerElement
diff --git a/WebCore/notifications/Notification.cpp b/WebCore/notifications/Notification.cpp
index ecb5799..ed30800 100644
--- a/WebCore/notifications/Notification.cpp
+++ b/WebCore/notifications/Notification.cpp
@@ -38,7 +38,7 @@
#include "Document.h"
#include "EventNames.h"
-#include "WorkerContext.h"
+#include "WorkerContext.h"
namespace WebCore {
@@ -49,7 +49,8 @@ Notification::Notification(const String& url, ScriptExecutionContext* context, E
, m_presenter(provider)
{
ASSERT(m_presenter);
- if (m_presenter->checkPermission(context->securityOrigin()) != NotificationPresenter::PermissionAllowed) {
+ Document* document = context->isDocument() ? static_cast<Document*>(context) : 0;
+ if (m_presenter->checkPermission(context->url(), document) != NotificationPresenter::PermissionAllowed) {
ec = SECURITY_ERR;
return;
}
@@ -69,11 +70,12 @@ Notification::Notification(const NotificationContents& contents, ScriptExecution
, m_presenter(provider)
{
ASSERT(m_presenter);
- if (m_presenter->checkPermission(context->securityOrigin()) != NotificationPresenter::PermissionAllowed) {
+ Document* document = context->isDocument() ? static_cast<Document*>(context) : 0;
+ if (m_presenter->checkPermission(context->url(), document) != NotificationPresenter::PermissionAllowed) {
ec = SECURITY_ERR;
return;
}
-
+
KURL icon = context->completeURL(contents.icon());
if (!icon.isEmpty() && !icon.isValid()) {
ec = SYNTAX_ERR;
diff --git a/WebCore/notifications/Notification.idl b/WebCore/notifications/Notification.idl
index ec6a9c8..b17546a 100644
--- a/WebCore/notifications/Notification.idl
+++ b/WebCore/notifications/Notification.idl
@@ -32,7 +32,8 @@ module threads {
interface [
Conditional=NOTIFICATIONS,
- EventTarget
+ EventTarget,
+ OmitConstructor
] Notification {
void show();
void cancel();
diff --git a/WebCore/notifications/NotificationCenter.cpp b/WebCore/notifications/NotificationCenter.cpp
index 45d29cf..ad9fbec 100644
--- a/WebCore/notifications/NotificationCenter.cpp
+++ b/WebCore/notifications/NotificationCenter.cpp
@@ -40,16 +40,18 @@
namespace WebCore {
-NotificationCenter::NotificationCenter(ScriptExecutionContext* context, NotificationPresenter* presenter)
+NotificationCenter::NotificationCenter(ScriptExecutionContext* context, NotificationPresenter* presenter)
: ActiveDOMObject(context, this)
, m_scriptExecutionContext(context)
, m_notificationPresenter(presenter) {}
-int NotificationCenter::checkPermission()
+int NotificationCenter::checkPermission()
{
if (!presenter())
return NotificationPresenter::PermissionDenied;
- return m_notificationPresenter->checkPermission(m_scriptExecutionContext->securityOrigin());
+ return m_notificationPresenter->checkPermission(
+ m_scriptExecutionContext->url(),
+ m_scriptExecutionContext->isDocument() ? static_cast<Document*>(m_scriptExecutionContext) : 0);
}
void NotificationCenter::requestPermission(PassRefPtr<VoidCallback> callback)
diff --git a/WebCore/notifications/NotificationCenter.idl b/WebCore/notifications/NotificationCenter.idl
index 3f6e369..86420b8 100644
--- a/WebCore/notifications/NotificationCenter.idl
+++ b/WebCore/notifications/NotificationCenter.idl
@@ -31,7 +31,8 @@
module threads {
interface [
- Conditional=NOTIFICATIONS
+ Conditional=NOTIFICATIONS,
+ OmitConstructor
] NotificationCenter {
[V8Custom] Notification createHTMLNotification(in DOMString url) raises(Exception);
[V8Custom] Notification createNotification(in DOMString iconUrl, in DOMString title, in DOMString body) raises(Exception);
diff --git a/WebCore/notifications/NotificationPresenter.h b/WebCore/notifications/NotificationPresenter.h
index d70a3e9..3df03bb 100644
--- a/WebCore/notifications/NotificationPresenter.h
+++ b/WebCore/notifications/NotificationPresenter.h
@@ -38,39 +38,43 @@
namespace WebCore {
+ class Document;
class Notification;
+ class KURL;
class SecurityOrigin;
class String;
-
+
class NotificationPresenter {
public:
- enum Permission {
- PermissionAllowed, // User has allowed notifications
- PermissionNotAllowed, // User has not yet allowed
- PermissionDenied // User has explictly denied permission
+ enum Permission {
+ PermissionAllowed, // User has allowed notifications
+ PermissionNotAllowed, // User has not yet allowed
+ PermissionDenied // User has explicitly denied permission
};
virtual ~NotificationPresenter() {}
// Requests that a notification be shown.
- virtual bool show(Notification* object) = 0;
+ virtual bool show(Notification*) = 0;
// Requests that a notification that has already been shown be canceled.
- virtual void cancel(Notification* object) = 0;
+ virtual void cancel(Notification*) = 0;
- // Informs the presenter that a Notification object has been destroyed
+ // Informs the presenter that a Notification object has been destroyed
// (such as by a page transition). The presenter may continue showing
// the notification, but must not attempt to call the event handlers.
- virtual void notificationObjectDestroyed(Notification* object) = 0;
+ virtual void notificationObjectDestroyed(Notification*) = 0;
// Requests user permission to show desktop notifications from a particular
- // origin. The callback parameter should be run when the user has
+ // origin. The callback parameter should be run when the user has
// made a decision.
- virtual void requestPermission(SecurityOrigin* origin, PassRefPtr<VoidCallback> callback) = 0;
+ virtual void requestPermission(SecurityOrigin*, PassRefPtr<VoidCallback>) = 0;
- // Checks the current level of permission.
- virtual Permission checkPermission(SecurityOrigin* origin) = 0;
+ // Checks the current level of permission for the specified URL. If the
+ // URL is a document (as opposed to a worker or other ScriptExecutionContext),
+ // |document| will also be provided.
+ virtual Permission checkPermission(const KURL&, Document*) = 0;
};
} // namespace WebCore
diff --git a/WebCore/page/AbstractView.idl b/WebCore/page/AbstractView.idl
index 36865de..290bf48 100644
--- a/WebCore/page/AbstractView.idl
+++ b/WebCore/page/AbstractView.idl
@@ -28,7 +28,8 @@ module views {
// Introduced in DOM Level 2:
interface [
- ObjCCustomImplementation
+ ObjCCustomImplementation,
+ OmitConstructor
] AbstractView {
readonly attribute Document document;
readonly attribute Media media;
diff --git a/WebCore/page/BarInfo.cpp b/WebCore/page/BarInfo.cpp
index 0f6cad5..b6ab686 100644
--- a/WebCore/page/BarInfo.cpp
+++ b/WebCore/page/BarInfo.cpp
@@ -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
@@ -60,23 +60,25 @@ bool BarInfo::visible() const
{
if (!m_frame)
return false;
+ Page* page = m_frame->page();
+ if (!page)
+ return false;
switch (m_type) {
case Locationbar:
- return m_frame->page()->chrome()->toolbarsVisible();
- case Toolbar:
- return m_frame->page()->chrome()->toolbarsVisible();
case Personalbar:
- return m_frame->page()->chrome()->toolbarsVisible();
+ case Toolbar:
+ return page->chrome()->toolbarsVisible();
case Menubar:
- return m_frame->page()->chrome()->menubarVisible();
+ return page->chrome()->menubarVisible();
case Scrollbars:
- return m_frame->page()->chrome()->scrollbarsVisible();
+ return page->chrome()->scrollbarsVisible();
case Statusbar:
- return m_frame->page()->chrome()->statusbarVisible();
- default:
- return false;
+ return page->chrome()->statusbarVisible();
}
+
+ ASSERT_NOT_REACHED();
+ return false;
}
} // namespace WebCore
diff --git a/WebCore/page/BarInfo.idl b/WebCore/page/BarInfo.idl
index 42041c51..2089895 100644
--- a/WebCore/page/BarInfo.idl
+++ b/WebCore/page/BarInfo.idl
@@ -28,7 +28,7 @@
module window {
- interface BarInfo {
+ interface [OmitConstructor] BarInfo {
readonly attribute boolean visible;
};
diff --git a/WebCore/page/Chrome.h b/WebCore/page/Chrome.h
index 398548f..53dbb7a 100644
--- a/WebCore/page/Chrome.h
+++ b/WebCore/page/Chrome.h
@@ -138,7 +138,7 @@ namespace WebCore {
bool setCursor(PlatformCursorHandle);
-#if PLATFORM(MAC) && !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
+#if PLATFORM(MAC)
void focusNSView(NSView*);
#endif
diff --git a/WebCore/page/Console.cpp b/WebCore/page/Console.cpp
index b1b091a..2273a5e 100644
--- a/WebCore/page/Console.cpp
+++ b/WebCore/page/Console.cpp
@@ -30,6 +30,7 @@
#include "Console.h"
#include "CString.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "ConsoleMessage.h"
#include "Frame.h"
diff --git a/WebCore/page/Console.idl b/WebCore/page/Console.idl
index a31b605..b9c0a57 100644
--- a/WebCore/page/Console.idl
+++ b/WebCore/page/Console.idl
@@ -28,7 +28,7 @@
module window {
- interface Console {
+ interface [OmitConstructor] Console {
#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
readonly attribute [CustomGetter] Array profiles;
diff --git a/WebCore/page/ContextMenuController.cpp b/WebCore/page/ContextMenuController.cpp
index 726dee9..d384b02 100644
--- a/WebCore/page/ContextMenuController.cpp
+++ b/WebCore/page/ContextMenuController.cpp
@@ -31,7 +31,7 @@
#include "Chrome.h"
#include "ContextMenu.h"
#include "ContextMenuClient.h"
-#include "ContextMenuSelectionHandler.h"
+#include "ContextMenuProvider.h"
#include "Document.h"
#include "DocumentFragment.h"
#include "DocumentLoader.h"
@@ -67,7 +67,6 @@ ContextMenuController::ContextMenuController(Page* page, ContextMenuClient* clie
: m_page(page)
, m_client(client)
, m_contextMenu(0)
- , m_selectionHandler(0)
{
ASSERT_ARG(page, page);
ASSERT_ARG(client, client);
@@ -81,9 +80,9 @@ ContextMenuController::~ContextMenuController()
void ContextMenuController::clearContextMenu()
{
m_contextMenu.set(0);
- if (m_selectionHandler)
- m_selectionHandler->contextMenuCleared();
- m_selectionHandler = 0;
+ if (m_menuProvider)
+ m_menuProvider->contextMenuCleared();
+ m_menuProvider = 0;
}
void ContextMenuController::handleContextMenuEvent(Event* event)
@@ -95,19 +94,17 @@ void ContextMenuController::handleContextMenuEvent(Event* event)
showContextMenu(event);
}
-void ContextMenuController::showContextMenu(Event* event, Vector<ContextMenuItem>& items, PassRefPtr<ContextMenuSelectionHandler> selectionHandler)
+void ContextMenuController::showContextMenu(Event* event, PassRefPtr<ContextMenuProvider> menuProvider)
{
- m_selectionHandler = selectionHandler;
+ m_menuProvider = menuProvider;
m_contextMenu.set(createContextMenu(event));
if (!m_contextMenu) {
clearContextMenu();
return;
}
- for (size_t i = 0; i < items.size(); ++i) {
- ContextMenuItem& item = items[i];
- m_contextMenu->appendItem(item);
- }
+
+ m_menuProvider->populateContextMenu(m_contextMenu.get());
showContextMenu(event);
}
@@ -156,8 +153,8 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
}
if (item->action() >= ContextMenuItemBaseCustomTag) {
- ASSERT(m_selectionHandler);
- m_selectionHandler->contextMenuItemSelected(item);
+ ASSERT(m_menuProvider);
+ m_menuProvider->contextMenuItemSelected(item);
return;
}
diff --git a/WebCore/page/ContextMenuController.h b/WebCore/page/ContextMenuController.h
index d51bc70..833b909 100644
--- a/WebCore/page/ContextMenuController.h
+++ b/WebCore/page/ContextMenuController.h
@@ -30,14 +30,13 @@
#include <wtf/OwnPtr.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
-#include <wtf/Vector.h>
namespace WebCore {
class ContextMenu;
class ContextMenuClient;
class ContextMenuItem;
- class ContextMenuSelectionHandler;
+ class ContextMenuProvider;
class Event;
class Page;
@@ -52,7 +51,7 @@ namespace WebCore {
void clearContextMenu();
void handleContextMenuEvent(Event*);
- void showContextMenu(Event*, Vector<ContextMenuItem>&, PassRefPtr<ContextMenuSelectionHandler>);
+ void showContextMenu(Event*, PassRefPtr<ContextMenuProvider>);
void contextMenuItemSelected(ContextMenuItem*);
@@ -63,7 +62,7 @@ namespace WebCore {
Page* m_page;
ContextMenuClient* m_client;
OwnPtr<ContextMenu> m_contextMenu;
- RefPtr<ContextMenuSelectionHandler> m_selectionHandler;
+ RefPtr<ContextMenuProvider> m_menuProvider;
};
}
diff --git a/WebCore/page/ContextMenuSelectionHandler.h b/WebCore/page/ContextMenuProvider.h
index d5a6631..57598d1 100644
--- a/WebCore/page/ContextMenuSelectionHandler.h
+++ b/WebCore/page/ContextMenuProvider.h
@@ -28,24 +28,25 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ContextMenuSelectionHandler_h
-#define ContextMenuSelectionHandler_h
+#ifndef ContextMenuProvider_h
+#define ContextMenuProvider_h
#include <wtf/RefCounted.h>
namespace WebCore {
- class ContextMenuItem;
+class ContextMenu;
+class ContextMenuItem;
- class ContextMenuSelectionHandler : public RefCounted<ContextMenuSelectionHandler> {
- public:
- ContextMenuSelectionHandler() { }
- virtual ~ContextMenuSelectionHandler() { };
+class ContextMenuProvider : public RefCounted<ContextMenuProvider> {
+public:
+ virtual ~ContextMenuProvider() { };
- virtual void contextMenuItemSelected(ContextMenuItem*) = 0;
- virtual void contextMenuCleared() = 0;
- };
+ virtual void populateContextMenu(ContextMenu*) = 0;
+ virtual void contextMenuItemSelected(ContextMenuItem*) = 0;
+ virtual void contextMenuCleared() = 0;
+};
}
-#endif // ContextMenuSelectionHandler_h
+#endif // ContextMenuProvider_h
diff --git a/WebCore/page/Coordinates.idl b/WebCore/page/Coordinates.idl
index f847325..5a5a141 100644
--- a/WebCore/page/Coordinates.idl
+++ b/WebCore/page/Coordinates.idl
@@ -25,7 +25,7 @@
module core {
- interface Coordinates {
+ interface [OmitConstructor] Coordinates {
readonly attribute double latitude;
readonly attribute double longitude;
readonly attribute [Custom] double altitude;
diff --git a/WebCore/page/DOMSelection.idl b/WebCore/page/DOMSelection.idl
index be6c2b4..4d0c942 100644
--- a/WebCore/page/DOMSelection.idl
+++ b/WebCore/page/DOMSelection.idl
@@ -31,7 +31,7 @@ module window {
// This is based off of Mozilla's Selection interface
// https://developer.mozilla.org/En/DOM/Selection
- interface DOMSelection {
+ interface [OmitConstructor] DOMSelection {
readonly attribute Node anchorNode;
readonly attribute long anchorOffset;
readonly attribute Node focusNode;
diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp
index 757e32f..3eb2b8e 100644
--- a/WebCore/page/DOMWindow.cpp
+++ b/WebCore/page/DOMWindow.cpp
@@ -442,6 +442,10 @@ void DOMWindow::clear()
if (m_location)
m_location->disconnectFrame();
m_location = 0;
+
+ if (m_media)
+ m_media->disconnectFrame();
+ m_media = 0;
#if ENABLE(DOM_STORAGE)
if (m_sessionStorage)
@@ -639,6 +643,13 @@ NotificationCenter* DOMWindow::webkitNotifications() const
}
#endif
+#if ENABLE(INDEXED_DATABASE)
+IndexedDatabaseRequest* DOMWindow::indexedDB() const
+{
+ return 0;
+}
+#endif
+
void DOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message, MessagePort* port, const String& targetOrigin, DOMWindow* source, ExceptionCode& ec)
{
MessagePortArray ports;
@@ -1053,7 +1064,9 @@ Document* DOMWindow::document() const
PassRefPtr<Media> DOMWindow::media() const
{
- return Media::create(const_cast<DOMWindow*>(this));
+ if (!m_media)
+ m_media = Media::create(m_frame);
+ return m_media.get();
}
PassRefPtr<CSSStyleDeclaration> DOMWindow::getComputedStyle(Element* elt, const String&) const
@@ -1081,7 +1094,9 @@ PassRefPtr<WebKitPoint> DOMWindow::webkitConvertPointFromNodeToPage(Node* node,
{
if (!node || !p)
return 0;
-
+
+ m_frame->document()->updateLayoutIgnorePendingStylesheets();
+
FloatPoint pagePoint(p->x(), p->y());
pagePoint = node->convertToPage(pagePoint);
return WebKitPoint::create(pagePoint.x(), pagePoint.y());
@@ -1091,7 +1106,9 @@ PassRefPtr<WebKitPoint> DOMWindow::webkitConvertPointFromPageToNode(Node* node,
{
if (!node || !p)
return 0;
-
+
+ m_frame->document()->updateLayoutIgnorePendingStylesheets();
+
FloatPoint nodePoint(p->x(), p->y());
nodePoint = node->convertFromPage(nodePoint);
return WebKitPoint::create(nodePoint.x(), nodePoint.y());
@@ -1237,24 +1254,40 @@ void DOMWindow::resizeTo(float width, float height) const
page->chrome()->setWindowRect(fr);
}
-int DOMWindow::setTimeout(ScheduledAction* action, int timeout)
+int DOMWindow::setTimeout(ScheduledAction* action, int timeout, ExceptionCode& ec)
{
- return DOMTimer::install(scriptExecutionContext(), action, timeout, true);
+ ScriptExecutionContext* context = scriptExecutionContext();
+ if (!context) {
+ ec = INVALID_ACCESS_ERR;
+ return -1;
+ }
+ return DOMTimer::install(context, action, timeout, true);
}
void DOMWindow::clearTimeout(int timeoutId)
{
- DOMTimer::removeById(scriptExecutionContext(), timeoutId);
+ ScriptExecutionContext* context = scriptExecutionContext();
+ if (!context)
+ return;
+ DOMTimer::removeById(context, timeoutId);
}
-int DOMWindow::setInterval(ScheduledAction* action, int timeout)
+int DOMWindow::setInterval(ScheduledAction* action, int timeout, ExceptionCode& ec)
{
- return DOMTimer::install(scriptExecutionContext(), action, timeout, false);
+ ScriptExecutionContext* context = scriptExecutionContext();
+ if (!context) {
+ ec = INVALID_ACCESS_ERR;
+ return -1;
+ }
+ return DOMTimer::install(context, action, timeout, false);
}
void DOMWindow::clearInterval(int timeoutId)
{
- DOMTimer::removeById(scriptExecutionContext(), timeoutId);
+ ScriptExecutionContext* context = scriptExecutionContext();
+ if (!context)
+ return;
+ DOMTimer::removeById(context, timeoutId);
}
bool DOMWindow::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
diff --git a/WebCore/page/DOMWindow.h b/WebCore/page/DOMWindow.h
index 0aee619..dc1e68c 100644
--- a/WebCore/page/DOMWindow.h
+++ b/WebCore/page/DOMWindow.h
@@ -52,6 +52,7 @@ namespace WebCore {
class FloatRect;
class Frame;
class History;
+ class IndexedDatabaseRequest;
class InspectorTimelineAgent;
class Location;
class Media;
@@ -216,6 +217,10 @@ namespace WebCore {
NotificationCenter* webkitNotifications() const;
#endif
+#if ENABLE(INDEXED_DATABASE)
+ IndexedDatabaseRequest* indexedDB() const;
+#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&);
@@ -232,9 +237,9 @@ namespace WebCore {
void resizeTo(float width, float height) const;
// Timers
- int setTimeout(ScheduledAction*, int timeout);
+ int setTimeout(ScheduledAction*, int timeout, ExceptionCode&);
void clearTimeout(int timeoutId);
- int setInterval(ScheduledAction*, int timeout);
+ int setInterval(ScheduledAction*, int timeout, ExceptionCode&);
void clearInterval(int timeoutId);
// Events
@@ -345,6 +350,7 @@ namespace WebCore {
Console* optionalConsole() const { return m_console.get(); }
Navigator* optionalNavigator() const { return m_navigator.get(); }
Location* optionalLocation() const { return m_location.get(); }
+ Media* optionalMedia() const { return m_media.get(); }
#if ENABLE(DOM_STORAGE)
Storage* optionalSessionStorage() const { return m_sessionStorage.get(); }
Storage* optionalLocalStorage() const { return m_localStorage.get(); }
@@ -381,6 +387,7 @@ namespace WebCore {
mutable RefPtr<Console> m_console;
mutable RefPtr<Navigator> m_navigator;
mutable RefPtr<Location> m_location;
+ mutable RefPtr<Media> m_media;
#if ENABLE(DOM_STORAGE)
mutable RefPtr<Storage> m_sessionStorage;
mutable RefPtr<Storage> m_localStorage;
diff --git a/WebCore/page/DOMWindow.idl b/WebCore/page/DOMWindow.idl
index 71d7ca4..626d9c4 100644
--- a/WebCore/page/DOMWindow.idl
+++ b/WebCore/page/DOMWindow.idl
@@ -37,8 +37,9 @@ module window {
CustomMarkFunction,
CustomNativeConverter,
CustomPutFunction,
- ExtendsDOMGlobalObject,
EventTarget,
+ OmitConstructor,
+ ExtendsDOMGlobalObject,
GenerateNativeConverter,
LegacyParent=JSDOMWindowBase
] DOMWindow {
@@ -169,6 +170,9 @@ module window {
#if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
readonly attribute [EnabledAtRuntime] NotificationCenter webkitNotifications;
#endif
+#if defined(ENABLE_INDEXED_DATABASE) && ENABLE_INDEXED_DATABASE
+ readonly attribute [EnabledAtRuntime] IndexedDatabaseRequest indexedDB;
+#endif
#if defined(ENABLE_ORIENTATION_EVENTS) && ENABLE_ORIENTATION_EVENTS
// This is the interface orientation in degrees. Some examples are:
@@ -274,7 +278,6 @@ module window {
// attribute EventListener onbeforeprint;
// attribute EventListener onformchange;
// attribute EventListener onforminput;
- // attribute EventListener onpopstate;
// attribute EventListener onreadystatechange;
// attribute EventListener onredo;
// attribute EventListener onshow;
@@ -478,6 +481,7 @@ module window {
attribute FileConstructor File;
attribute FileListConstructor FileList;
+ attribute BlobConstructor Blob;
attribute NodeFilterConstructor NodeFilter;
attribute RangeConstructor Range;
@@ -544,32 +548,163 @@ module window {
#endif
#if defined(ENABLE_SVG) && ENABLE_SVG
+ // Expose all implemented SVG 1.1 interfaces, excluding the SVG MI interfaces:
+ // SVGAnimatedPathData, SVGAnimatedPoints, SVGExternalResourcesRequired,
+ // SVGFilterPrimitiveStandardAttributes, SVGFitToViewBox, SVGLangSpace, SVGLocatable
+ // SVGStylable, SVGTests, SVGTransformable, SVGURIReference, SVGZoomAndPan
+ attribute SVGAElementConstructor SVGAElement;
attribute SVGAngleConstructor SVGAngle;
+ attribute SVGAnimatedAngleConstructor SVGAnimatedAngle;
+ attribute SVGAnimatedBooleanConstructor SVGAnimatedBoolean;
+ attribute SVGAnimatedEnumerationConstructor SVGAnimatedEnumeration;
+ attribute SVGAnimatedIntegerConstructor SVGAnimatedInteger;
+ attribute SVGAnimatedLengthConstructor SVGAnimatedLength;
+ attribute SVGAnimatedLengthListConstructor SVGAnimatedLengthList;
+ attribute SVGAnimatedNumberConstructor SVGAnimatedNumber;
+ attribute SVGAnimatedNumberListConstructor SVGAnimatedNumberList;
+ attribute SVGAnimatedPreserveAspectRatioConstructor SVGAnimatedPreserveAspectRatio;
+ attribute SVGAnimatedRectConstructor SVGAnimatedRect;
+ attribute SVGAnimatedStringConstructor SVGAnimatedString;
+ attribute SVGAnimatedTransformListConstructor SVGAnimatedTransformList;
+ attribute SVGCircleElementConstructor SVGCircleElement;
+ attribute SVGClipPathElementConstructor SVGClipPathElement;
attribute SVGColorConstructor SVGColor;
+ attribute SVGCursorElementConstructor SVGCursorElement;
// attribute SVGCSSRuleConstructor SVGCSSRule;
+ attribute SVGDefsElementConstructor SVGDefsElement;
+ attribute SVGDescElementConstructor SVGDescElement;
+ attribute SVGDocumentConstructor SVGDocument;
+ attribute SVGElementConstructor SVGElement;
+ attribute SVGElementInstanceConstructor SVGElementInstance;
+ attribute SVGElementInstanceListConstructor SVGElementInstanceList;
+ attribute SVGEllipseElementConstructor SVGEllipseElement;
attribute SVGExceptionConstructor SVGException;
+ attribute SVGGElementConstructor SVGGElement;
attribute SVGGradientElementConstructor SVGGradientElement;
+ attribute SVGImageElementConstructor SVGImageElement;
attribute SVGLengthConstructor SVGLength;
+ attribute SVGLengthListConstructor SVGLengthList;
+ attribute SVGLinearGradientElementConstructor SVGLinearGradientElement;
+ attribute SVGLineElementConstructor SVGLineElement;
attribute SVGMarkerElementConstructor SVGMarkerElement;
+ attribute SVGMaskElementConstructor SVGMaskElement;
+ attribute SVGMatrixConstructor SVGMatrix;
+ attribute SVGMetadataElementConstructor SVGMetadataElement;
+ attribute SVGNumberConstructor SVGNumber;
+ attribute SVGNumberListConstructor SVGNumberList;
attribute SVGPaintConstructor SVGPaint;
+ attribute SVGPathElementConstructor SVGPathElement;
attribute SVGPathSegConstructor SVGPathSeg;
+ attribute SVGPathSegArcAbsConstructor SVGPathSegArcAbs;
+ attribute SVGPathSegArcRelConstructor SVGPathSegArcRel;
+ attribute SVGPathSegClosePathConstructor SVGPathSegClosePath;
+ attribute SVGPathSegCurvetoCubicAbsConstructor SVGPathSegCurvetoCubicAbs;
+ attribute SVGPathSegCurvetoCubicRelConstructor SVGPathSegCurvetoCubicRel;
+ attribute SVGPathSegCurvetoCubicSmoothAbsConstructor SVGPathSegCurvetoCubicSmoothAbs;
+ attribute SVGPathSegCurvetoCubicSmoothRelConstructor SVGPathSegCurvetoCubicSmoothRel;
+ attribute SVGPathSegCurvetoQuadraticAbsConstructor SVGPathSegCurvetoQuadraticAbs;
+ attribute SVGPathSegCurvetoQuadraticRelConstructor SVGPathSegCurvetoQuadraticRel;
+ attribute SVGPathSegCurvetoQuadraticSmoothAbsConstructor SVGPathSegCurvetoQuadraticSmoothAbs;
+ attribute SVGPathSegCurvetoQuadraticSmoothRelConstructor SVGPathSegCurvetoQuadraticSmoothRel;
+ attribute SVGPathSegLinetoAbsConstructor SVGPathSegLinetoAbs;
+ attribute SVGPathSegLinetoHorizontalAbsConstructor SVGPathSegLinetoHorizontalAbs;
+ attribute SVGPathSegLinetoHorizontalRelConstructor SVGPathSegLinetoHorizontalRel;
+ attribute SVGPathSegLinetoRelConstructor SVGPathSegLinetoRel;
+ attribute SVGPathSegLinetoVerticalAbsConstructor SVGPathSegLinetoVerticalAbs;
+ attribute SVGPathSegLinetoVerticalRelConstructor SVGPathSegLinetoVerticalRel;
+ attribute SVGPathSegListConstructor SVGPathSegList;
+ attribute SVGPathSegMovetoAbsConstructor SVGPathSegMovetoAbs;
+ attribute SVGPathSegMovetoRelConstructor SVGPathSegMovetoRel;
+ attribute SVGPatternElementConstructor SVGPatternElement;
+ attribute SVGPointConstructor SVGPoint;
+ attribute SVGPointListConstructor SVGPointList;
+ attribute SVGPolygonElementConstructor SVGPolygonElement;
+ attribute SVGPolylineElementConstructor SVGPolylineElement;
attribute SVGPreserveAspectRatioConstructor SVGPreserveAspectRatio;
+ attribute SVGRadialGradientElementConstructor SVGRadialGradientElement;
+ attribute SVGRectConstructor SVGRect;
+ attribute SVGRectElementConstructor SVGRectElement;
attribute SVGRenderingIntentConstructor SVGRenderingIntent;
+ attribute SVGScriptElementConstructor SVGScriptElement;
+ attribute SVGStopElementConstructor SVGStopElement;
+ attribute SVGStringListConstructor SVGStringList;
+ attribute SVGStyleElementConstructor SVGStyleElement;
+ attribute SVGSVGElementConstructor SVGSVGElement;
+ attribute SVGSwitchElementConstructor SVGSwitchElement;
+ attribute SVGSymbolElementConstructor SVGSymbolElement;
attribute SVGTextContentElementConstructor SVGTextContentElement;
+ attribute SVGTextElementConstructor SVGTextElement;
attribute SVGTextPathElementConstructor SVGTextPathElement;
+ attribute SVGTextPositioningElementConstructor SVGTextPositioningElement;
+ attribute SVGTitleElementConstructor SVGTitleElement;
attribute SVGTransformConstructor SVGTransform;
+ attribute SVGTransformListConstructor SVGTransformList;
+ attribute SVGTRefElementConstructor SVGTRefElement;
+ attribute SVGTSpanElementConstructor SVGTSpanElement;
attribute SVGUnitTypesConstructor SVGUnitTypes;
-// attribute SVGZoomAndPanConstructor SVGZoomAndPan;
+ attribute SVGUseElementConstructor SVGUseElement;
+ attribute SVGViewElementConstructor SVGViewElement;
+// attribute SVGViewSpecConstructor SVGViewSpec;
+ attribute SVGZoomEventConstructor SVGZoomEvent;
+
+#if defined(ENABLE_SVG_ANIMATION) && ENABLE_SVG_ANIMATION
+ attribute SVGAnimateColorElementConstructor SVGAnimateColorElement;
+ attribute SVGAnimateElementConstructor SVGAnimateElement;
+// attribute SVGAnimateMotionElementConstructor SVGAnimateMotionElement;
+ attribute SVGAnimateTransformElementConstructor SVGAnimateTransformElement;
+// attribute SVGMPathElementConstructor SVGMPathElement;
+ attribute SVGSetElementConstructor SVGSetElement;
+#endif
+
+#if ENABLE_SVG_FONTS && ENABLE_SVG_FONTS
+// attribute SVGAltGlyphDefElementConstructor SVGAltGlyphDefElement;
+ attribute SVGAltGlyphElementConstructor SVGAltGlyphElement;
+// attribute SVGAltGlyphItemElementConstructor SVGAltGlyphItemElement;
+// attribute SVGDefinitionSrcElementConstructor SVGDefinitionSrcElement;
+ attribute SVGFontElementConstructor SVGFontElement;
+ attribute SVGFontFaceElementConstructor SVGFontFaceElement;
+ attribute SVGFontFaceFormatElementConstructor SVGFontFaceFormatElement;
+ attribute SVGFontFaceNameElementConstructor SVGFontFaceNameElement;
+ attribute SVGFontFaceSrcElementConstructor SVGFontFaceSrcElement;
+ attribute SVGFontFaceUriElementConstructor SVGFontFaceUriElement;
+ attribute SVGGlyphElementConstructor SVGGlyphElement;
+// attribute SVGGlyphRefElementConstructor SVGGlyphRefElement;
+// attribute SVGHKernElementConstructor SVGHKernElement;
+ attribute SVGMissingGlyphElementConstructor SVGMissingGlyphElement;
+// attribute SVGVKernElementConstructor SVGVKernElement;
+#endif
+
+#if defined(ENABLE_SVG_FOREIGN_OBJECT) && ENABLE_SVG_FOREIGN_OBJECT
+ attribute SVGForeignObjectElementConstructor SVGForeignObjectElement;
+#endif
#if defined(ENABLE_FILTERS) && ENABLE_FILTERS
attribute SVGComponentTransferFunctionElementConstructor SVGComponentTransferFunctionElement;
attribute SVGFEBlendElementConstructor SVGFEBlendElement;
attribute SVGFEColorMatrixElementConstructor SVGFEColorMatrixElement;
+ attribute SVGFEComponentTransferElementConstructor SVGFEComponentTransferElement;
attribute SVGFECompositeElementConstructor SVGFECompositeElement;
// attribute SVGFEConvolveMatrixElementConstructor SVGFEConvolveMatrixElement;
+ attribute SVGFEDiffuseLightingElementConstructor SVGFEDiffuseLightingElement;
attribute SVGFEDisplacementMapElementConstructor SVGFEDisplacementMapElement;
+ attribute SVGFEDistantLightElementConstructor SVGFEDistantLightElement;
+ attribute SVGFEFloodElementConstructor SVGFEFloodElement;
+ attribute SVGFEFuncAElementConstructor SVGFEFuncAElement;
+ attribute SVGFEFuncBElementConstructor SVGFEFuncBElement;
+ attribute SVGFEFuncGElementConstructor SVGFEFuncGElement;
+ attribute SVGFEFuncRElementConstructor SVGFEFuncRElement;
+ attribute SVGFEGaussianBlurElementConstructor SVGFEGaussianBlurElement;
+ attribute SVGFEImageElementConstructor SVGFEImageElement;
+ attribute SVGFEMergeElementConstructor SVGFEMergeElement;
+ attribute SVGFEMergeNodeElementConstructor SVGFEMergeNodeElement;
attribute SVGFEMorphologyElementConstructor SVGFEMorphologyElement;
+ attribute SVGFEOffsetElementConstructor SVGFEOffsetElement;
+ attribute SVGFEPointLightElementConstructor SVGFEPointLightElement;
+ attribute SVGFESpecularLightingElementConstructor SVGFESpecularLightingElement;
+ attribute SVGFESpotLightElementConstructor SVGFESpotLightElement;
+ attribute SVGFETileElementConstructor SVGFETileElement;
attribute SVGFETurbulenceElementConstructor SVGFETurbulenceElement;
+ attribute SVGFilterElementConstructor SVGFilterElement;
#endif
#endif
diff --git a/WebCore/page/DragController.cpp b/WebCore/page/DragController.cpp
index 634595a..bde38bc 100644
--- a/WebCore/page/DragController.cpp
+++ b/WebCore/page/DragController.cpp
@@ -482,21 +482,6 @@ bool DragController::canProcessDrag(DragData* dragData)
return true;
}
-static DragOperation defaultOperationForDrag(DragOperation srcOpMask)
-{
- // This is designed to match IE's operation fallback for the case where
- // the page calls preventDefault() in a drag event but doesn't set dropEffect.
- if (srcOpMask & DragOperationCopy)
- return DragOperationCopy;
- if (srcOpMask & DragOperationMove || srcOpMask & DragOperationGeneric)
- return DragOperationMove;
- if (srcOpMask & DragOperationLink)
- return DragOperationLink;
-
- // FIXME: Does IE really return "generic" even if no operations were allowed by the source?
- return DragOperationGeneric;
-}
-
bool DragController::tryDHTMLDrag(DragData* dragData, DragOperation& operation)
{
ASSERT(dragData);
@@ -517,10 +502,8 @@ bool DragController::tryDHTMLDrag(DragData* dragData, DragOperation& operation)
return false;
}
- if (!clipboard->destinationOperation(operation)) {
- // The element accepted but they didn't pick an operation, so we pick one (to match IE).
- operation = defaultOperationForDrag(srcOpMask);
- } else if (!(srcOpMask & operation)) {
+ operation = clipboard->destinationOperation();
+ if (!(srcOpMask & operation)) {
// The element picked an operation which is not supported by the source
operation = DragOperationNone;
}
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index bdcd6aa..7d45285 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -29,6 +29,7 @@
#include "AXObjectCache.h"
#include "CachedImage.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "Cursor.h"
#include "Document.h"
@@ -80,10 +81,13 @@
#include "TouchEvent.h"
#endif
+<<<<<<< HEAD
#if defined(ANDROID_PLUGINS)
#include "WebViewCore.h"
#endif
+=======
+>>>>>>> webkit.org at r54127
namespace WebCore {
using namespace HTMLNames;
@@ -130,7 +134,7 @@ static inline void scrollAndAcceptEvent(float delta, ScrollDirection positiveDir
e.accept();
}
-#if !PLATFORM(MAC)
+#if !PLATFORM(MAC) || ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
inline bool EventHandler::eventLoopHandleMouseUp(const MouseEventWithHitTestResults&)
{
@@ -174,7 +178,7 @@ EventHandler::EventHandler(Frame* frame)
, m_mouseDownTimestamp(0)
, m_useLatchedWheelEventNode(false)
, m_widgetIsLatched(false)
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
, m_mouseDownView(nil)
, m_sendingEventToSubview(false)
, m_activationEventNumber(0)
@@ -702,6 +706,14 @@ void EventHandler::autoscrollTimerFired(Timer<EventHandler>*)
#if ENABLE(PAN_SCROLLING)
+void EventHandler::startPanScrolling(RenderObject* renderer)
+{
+ m_panScrollInProgress = true;
+ m_panScrollButtonPressed = true;
+ handleAutoscroll(renderer);
+ invalidateClick();
+}
+
void EventHandler::updatePanScrollState()
{
FrameView* view = m_frame->view();
@@ -1201,25 +1213,6 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
invalidateClick();
return true;
}
-
- if (mouseEvent.button() == MiddleButton && !mev.isOverLink()) {
- RenderObject* renderer = mev.targetNode()->renderer();
-
- while (renderer && (!renderer->isBox() || !toRenderBox(renderer)->canBeScrolledAndHasScrollableArea())) {
- if (!renderer->parent() && renderer->node() == renderer->document() && renderer->document()->ownerElement())
- renderer = renderer->document()->ownerElement()->renderer();
- else
- renderer = renderer->parent();
- }
-
- if (renderer) {
- m_panScrollInProgress = true;
- m_panScrollButtonPressed = true;
- handleAutoscroll(renderer);
- invalidateClick();
- return true;
- }
- }
#endif
m_clickCount = mouseEvent.clickCount();
@@ -1631,7 +1624,7 @@ void EventHandler::clearDragState()
m_dragTarget = 0;
m_capturingMouseEventsNode = 0;
m_shouldOnlyFireDragOverEvent = false;
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
m_sendingEventToSubview = false;
#endif
}
@@ -1804,7 +1797,7 @@ bool EventHandler::dispatchMouseEvent(const AtomicString& eventType, Node* targe
return swallowEvent;
}
-#if !PLATFORM(GTK) && !(PLATFORM(CHROMIUM) && PLATFORM(LINUX))
+#if !PLATFORM(GTK) && !(PLATFORM(CHROMIUM) && OS(LINUX))
bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&) const
{
return false;
@@ -2317,9 +2310,11 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event)
return !mouseDownMayStartSelect() && !m_mouseDownMayStartAutoscroll;
// We are starting a text/image/url drag, so the cursor should be an arrow
- if (FrameView* view = m_frame->view())
+ if (FrameView* view = m_frame->view()) {
+ // FIXME <rdar://7577595>: Custom cursors aren't supported during drag and drop (default to pointer).
view->setCursor(pointerCursor());
-
+ }
+
if (!dragHysteresisExceeded(event.event().pos()))
return true;
@@ -2358,7 +2353,7 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event)
if (m_mouseDownMayStartDrag) {
// gather values from DHTML element, if it set any
- dragState().m_dragClipboard->sourceOperation(srcOp);
+ srcOp = dragState().m_dragClipboard->sourceOperation();
// Yuck, a draggedImage:moveTo: message can be fired as a result of kicking off the
// drag with dragImage! Because of that dumb reentrancy, we may think we've not
@@ -2560,6 +2555,7 @@ void EventHandler::updateLastScrollbarUnderMouse(Scrollbar* scrollbar, bool setL
}
#if ENABLE(TOUCH_EVENTS)
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
// TODO(benm): On Android we return an int back to Java to signify whether the default actions
// for longpress/doubletap in the Browser should be prevented. I think that before upstreaming
@@ -2568,6 +2564,9 @@ int EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
#else
bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
#endif
+=======
+bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
+>>>>>>> webkit.org at r54127
{
RefPtr<TouchList> touches = TouchList::create();
RefPtr<TouchList> pressedTouches = TouchList::create();
@@ -2603,17 +2602,26 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
int adjustedPageX = lroundf(pagePoint.x() / m_frame->pageZoomFactor());
int adjustedPageY = lroundf(pagePoint.y() / m_frame->pageZoomFactor());
+<<<<<<< HEAD
if ((event.type() == TouchStart
#if PLATFORM(ANDROID)
|| event.type() == TouchDoubleTap
|| event.type() == TouchLongPress
#endif
) && !i) {
+=======
+ RefPtr<Touch> touch = Touch::create(doc->frame(), target, point.id(),
+ point.screenPos().x(), point.screenPos().y(),
+ adjustedPageX, adjustedPageY);
+
+ if (event.type() == TouchStart && !i) {
+>>>>>>> webkit.org at r54127
m_touchEventTarget = target;
m_firstTouchScreenPos = point.screenPos();
m_firstTouchPagePos = pagePoint;
}
+<<<<<<< HEAD
// ANDROID
// The touch event should act on m_touchEventTarget, not target
// TODO: Upstream this fix to webkit.org
@@ -2621,6 +2629,8 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
point.screenPos().x(), point.screenPos().y(),
adjustedPageX, adjustedPageY);
+=======
+>>>>>>> webkit.org at r54127
if (point.state() == PlatformTouchPoint::TouchReleased)
releasedTouches->append(touch);
else if (point.state() == PlatformTouchPoint::TouchCancelled)
@@ -2639,6 +2649,7 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
}
if (!m_touchEventTarget)
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
return 0;
#else
@@ -2652,6 +2663,11 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
bool longPressPrevented = false;
bool doubleTapPrevented = false;
#endif
+=======
+ return false;
+
+ bool defaultPrevented = false;
+>>>>>>> webkit.org at r54127
if (event.type() == TouchCancel) {
eventName = &eventNames().touchcancelEvent;
@@ -2662,9 +2678,13 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
m_firstTouchPagePos.x(), m_firstTouchPagePos.y(),
event.ctrlKey(), event.altKey(), event.shiftKey(),
event.metaKey());
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
cancelEv->setCreateTime(static_cast<DOMTimeStamp>(event.eventTime()));
#endif
+=======
+
+>>>>>>> webkit.org at r54127
ExceptionCode ec = 0;
m_touchEventTarget->dispatchEvent(cancelEv.get(), ec);
defaultPrevented |= cancelEv->defaultPrevented();
@@ -2679,6 +2699,7 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
m_firstTouchPagePos.x(), m_firstTouchPagePos.y(),
event.ctrlKey(), event.altKey(), event.shiftKey(),
event.metaKey());
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
endEv->setCreateTime(static_cast<DOMTimeStamp>(event.eventTime()));
#endif
@@ -2689,6 +2710,11 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
#else
defaultPrevented = endEv->defaultPrevented();
#endif
+=======
+ ExceptionCode ec = 0;
+ m_touchEventTarget->dispatchEvent(endEv.get(), ec);
+ defaultPrevented = endEv->defaultPrevented();
+>>>>>>> webkit.org at r54127
}
if (pressedTouches->length() > 0) {
// Add pressed touchpoints to touches and targetTouches
@@ -2698,6 +2724,7 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
targetTouches->append(pressedTouches->item(i));
}
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
if (event.type() == TouchLongPress) {
eventName = &eventNames().touchlongpressEvent;
@@ -2750,6 +2777,20 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
#endif
}
+=======
+ eventName = &eventNames().touchstartEvent;
+ RefPtr<TouchEvent> startEv =
+ TouchEvent::create(touches.get(), targetTouches.get(), pressedTouches.get(),
+ *eventName, m_touchEventTarget->document()->defaultView(),
+ m_firstTouchScreenPos.x(), m_firstTouchScreenPos.y(),
+ m_firstTouchPagePos.x(), m_firstTouchPagePos.y(),
+ event.ctrlKey(), event.altKey(), event.shiftKey(),
+ event.metaKey());
+ ExceptionCode ec = 0;
+ m_touchEventTarget->dispatchEvent(startEv.get(), ec);
+ defaultPrevented |= startEv->defaultPrevented();
+ }
+>>>>>>> webkit.org at r54127
if (movedTouches->length() > 0) {
eventName = &eventNames().touchmoveEvent;
RefPtr<TouchEvent> moveEv =
@@ -2759,9 +2800,12 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
m_firstTouchPagePos.x(), m_firstTouchPagePos.y(),
event.ctrlKey(), event.altKey(), event.shiftKey(),
event.metaKey());
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
moveEv->setCreateTime(static_cast<DOMTimeStamp>(event.eventTime()));
#endif
+=======
+>>>>>>> webkit.org at r54127
ExceptionCode ec = 0;
m_touchEventTarget->dispatchEvent(moveEv.get(), ec);
defaultPrevented |= moveEv->defaultPrevented();
@@ -2770,6 +2814,7 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
if (event.type() == TouchEnd || event.type() == TouchCancel)
m_touchEventTarget = 0;
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
// TODO (benm): We should be able to remove this prior to upstreaming once Java side refactorings to make
// preventDefault work better are complete.
@@ -2782,6 +2827,9 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
#else
return defaultPrevented;
#endif
+=======
+ return defaultPrevented;
+>>>>>>> webkit.org at r54127
}
#endif
diff --git a/WebCore/page/EventHandler.h b/WebCore/page/EventHandler.h
index 8ccd761..ead384c 100644
--- a/WebCore/page/EventHandler.h
+++ b/WebCore/page/EventHandler.h
@@ -98,6 +98,7 @@ public:
Node* mousePressNode() const;
void setMousePressNode(PassRefPtr<Node>);
+ void startPanScrolling(RenderObject*);
bool panScrollInProgress() { return m_panScrollInProgress; }
void setPanScrollInProgress(bool inProgress) { m_panScrollInProgress = inProgress; }
@@ -205,12 +206,17 @@ public:
#endif
#if ENABLE(TOUCH_EVENTS)
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
int handleTouchEvent(const PlatformTouchEvent&);
#else
bool handleTouchEvent(const PlatformTouchEvent&);
#endif
#endif
+=======
+ bool handleTouchEvent(const PlatformTouchEvent&);
+#endif
+>>>>>>> webkit.org at r54127
private:
#if ENABLE(DRAG_SUPPORT)
@@ -424,7 +430,10 @@ private:
IntPoint m_firstTouchScreenPos;
IntPoint m_firstTouchPagePos;
#endif
+<<<<<<< HEAD
+=======
+>>>>>>> webkit.org at r54127
};
} // namespace WebCore
diff --git a/WebCore/page/EventSource.cpp b/WebCore/page/EventSource.cpp
index 2c9a343..0c79998 100644
--- a/WebCore/page/EventSource.cpp
+++ b/WebCore/page/EventSource.cpp
@@ -57,6 +57,7 @@ EventSource::EventSource(const String& url, ScriptExecutionContext* context, Exc
: ActiveDOMObject(context, this)
, m_state(CONNECTING)
, m_reconnectTimer(this, &EventSource::reconnectTimerFired)
+ , m_discardTrailingNewline(false)
, m_failSilently(false)
, m_requestInFlight(false)
, m_reconnectDelay(defaultReconnectDelay)
@@ -210,21 +211,24 @@ void EventSource::parseEventStream()
{
unsigned int bufPos = 0;
unsigned int bufSize = m_receiveBuf.size();
- for (;;) {
+ while (bufPos < bufSize) {
+ if (m_discardTrailingNewline) {
+ if (m_receiveBuf[bufPos] == '\n')
+ bufPos++;
+ m_discardTrailingNewline = false;
+ }
+
int lineLength = -1;
int fieldLength = -1;
- int carriageReturn = 0;
for (unsigned int i = bufPos; lineLength < 0 && i < bufSize; i++) {
switch (m_receiveBuf[i]) {
case ':':
if (fieldLength < 0)
fieldLength = i - bufPos;
break;
+ case '\r':
+ m_discardTrailingNewline = true;
case '\n':
- if (i > bufPos && m_receiveBuf[i - 1] == '\r') {
- carriageReturn++;
- i--;
- }
lineLength = i - bufPos;
break;
}
@@ -234,7 +238,7 @@ void EventSource::parseEventStream()
break;
parseEventStreamLine(bufPos, fieldLength, lineLength);
- bufPos += lineLength + carriageReturn + 1;
+ bufPos += lineLength + 1;
}
if (bufPos == bufSize)
diff --git a/WebCore/page/EventSource.h b/WebCore/page/EventSource.h
index c7ff2c9..d0d45cb 100644
--- a/WebCore/page/EventSource.h
+++ b/WebCore/page/EventSource.h
@@ -114,6 +114,7 @@ namespace WebCore {
RefPtr<ThreadableLoader> m_loader;
Timer<EventSource> m_reconnectTimer;
Vector<UChar> m_receiveBuf;
+ bool m_discardTrailingNewline;
bool m_failSilently;
bool m_requestInFlight;
diff --git a/WebCore/page/EventSource.idl b/WebCore/page/EventSource.idl
index 561bd68..ec42556 100644
--- a/WebCore/page/EventSource.idl
+++ b/WebCore/page/EventSource.idl
@@ -33,6 +33,7 @@ module window {
interface [
Conditional=EVENTSOURCE,
+ CustomConstructor,
EventTarget,
NoStaticTables
] EventSource {
diff --git a/WebCore/page/FocusController.cpp b/WebCore/page/FocusController.cpp
index 5e78c7d..bdd3151 100644
--- a/WebCore/page/FocusController.cpp
+++ b/WebCore/page/FocusController.cpp
@@ -38,8 +38,8 @@
#include "EventNames.h"
#include "ExceptionCode.h"
#include "Frame.h"
-#include "FrameView.h"
#include "FrameTree.h"
+#include "FrameView.h"
#include "HTMLFrameOwnerElement.h"
#include "HTMLNames.h"
#include "KeyboardEvent.h"
@@ -72,14 +72,17 @@ FocusController::FocusController(Page* page)
: m_page(page)
, m_isActive(false)
, m_isFocused(false)
+ , m_isChangingFocusedFrame(false)
{
}
void FocusController::setFocusedFrame(PassRefPtr<Frame> frame)
{
- if (m_focusedFrame == frame)
+ if (m_focusedFrame == frame || m_isChangingFocusedFrame)
return;
+ m_isChangingFocusedFrame = true;
+
RefPtr<Frame> oldFrame = m_focusedFrame;
RefPtr<Frame> newFrame = frame;
@@ -95,6 +98,8 @@ void FocusController::setFocusedFrame(PassRefPtr<Frame> frame)
newFrame->selection()->setFocused(true);
newFrame->document()->dispatchWindowEvent(Event::create(eventNames().focusEvent, false, false));
}
+
+ m_isChangingFocusedFrame = false;
}
Frame* FocusController::focusedOrMainFrame()
diff --git a/WebCore/page/FocusController.h b/WebCore/page/FocusController.h
index d86408a..32d4060 100644
--- a/WebCore/page/FocusController.h
+++ b/WebCore/page/FocusController.h
@@ -33,36 +33,37 @@
namespace WebCore {
- class Frame;
- class KeyboardEvent;
- class Node;
- class Page;
+class Frame;
+class KeyboardEvent;
+class Node;
+class Page;
- class FocusController : public Noncopyable {
- public:
- FocusController(Page*);
+class FocusController : public Noncopyable {
+public:
+ FocusController(Page*);
- void setFocusedFrame(PassRefPtr<Frame>);
- Frame* focusedFrame() const { return m_focusedFrame.get(); }
- Frame* focusedOrMainFrame();
+ void setFocusedFrame(PassRefPtr<Frame>);
+ Frame* focusedFrame() const { return m_focusedFrame.get(); }
+ Frame* focusedOrMainFrame();
- bool setInitialFocus(FocusDirection, KeyboardEvent*);
- bool advanceFocus(FocusDirection, KeyboardEvent*, bool initialFocus = false);
+ bool setInitialFocus(FocusDirection, KeyboardEvent*);
+ bool advanceFocus(FocusDirection, KeyboardEvent*, bool initialFocus = false);
- bool setFocusedNode(Node*, PassRefPtr<Frame>);
+ bool setFocusedNode(Node*, PassRefPtr<Frame>);
- void setActive(bool);
- bool isActive() const { return m_isActive; }
+ void setActive(bool);
+ bool isActive() const { return m_isActive; }
- void setFocused(bool);
- bool isFocused() const { return m_isFocused; }
+ void setFocused(bool);
+ bool isFocused() const { return m_isFocused; }
- private:
- Page* m_page;
- RefPtr<Frame> m_focusedFrame;
- bool m_isActive;
- bool m_isFocused;
- };
+private:
+ Page* m_page;
+ RefPtr<Frame> m_focusedFrame;
+ bool m_isActive;
+ bool m_isFocused;
+ bool m_isChangingFocusedFrame;
+};
} // namespace WebCore
diff --git a/WebCore/page/Frame.cpp b/WebCore/page/Frame.cpp
index 7e81b3d..947cb06 100644
--- a/WebCore/page/Frame.cpp
+++ b/WebCore/page/Frame.cpp
@@ -36,6 +36,7 @@
#include "CSSProperty.h"
#include "CSSPropertyNames.h"
#include "CachedCSSStyleSheet.h"
+#include "Chrome.h"
#include "DOMWindow.h"
#include "DocLoader.h"
#include "DocumentType.h"
@@ -74,6 +75,7 @@
#include "TextIterator.h"
#include "TextResourceDecoder.h"
#include "UserContentURLPattern.h"
+#include "XMLNSNames.h"
#include "XMLNames.h"
#include "htmlediting.h"
#include "markup.h"
@@ -82,7 +84,7 @@
#include <wtf/RefCountedLeakCounter.h>
#include <wtf/StdLibExtras.h>
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
#import <Carbon/Carbon.h>
#endif
@@ -136,7 +138,6 @@ Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient*
, m_script(this)
, m_selectionGranularity(CharacterGranularity)
, m_selectionController(this)
- , m_caretBlinkTimer(this, &Frame::caretBlinkTimerFired)
, m_editor(this)
, m_eventHandler(this)
, m_animationController(this)
@@ -144,8 +145,6 @@ Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient*
#if ENABLE(ORIENTATION_EVENTS)
, m_orientation(0)
#endif
- , m_caretVisible(false)
- , m_caretPaint(true)
, m_highlightTextMatches(false)
, m_inViewSourceMode(false)
, m_needsReapplyStyles(false)
@@ -173,6 +172,7 @@ Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient*
MathMLNames::init();
#endif
+ XMLNSNames::init();
XMLNames::init();
if (!ownerElement)
@@ -419,7 +419,7 @@ static RegularExpression* createRegExpForLabels(const Vector<String>& labels)
return new RegularExpression(pattern, TextCaseInsensitive);
}
-String Frame::searchForLabelsAboveCell(RegularExpression* regExp, HTMLTableCellElement* cell)
+String Frame::searchForLabelsAboveCell(RegularExpression* regExp, HTMLTableCellElement* cell, size_t* resultDistanceFromStartOfCell)
{
RenderObject* cellRenderer = cell->renderer();
@@ -433,23 +433,30 @@ String Frame::searchForLabelsAboveCell(RegularExpression* regExp, HTMLTableCellE
if (aboveCell) {
// search within the above cell we found for a match
+ size_t lengthSearched = 0;
for (Node* n = aboveCell->firstChild(); n; n = n->traverseNextNode(aboveCell)) {
if (n->isTextNode() && n->renderer() && n->renderer()->style()->visibility() == VISIBLE) {
// For each text chunk, run the regexp
String nodeString = n->nodeValue();
int pos = regExp->searchRev(nodeString);
- if (pos >= 0)
+ if (pos >= 0) {
+ if (resultDistanceFromStartOfCell)
+ *resultDistanceFromStartOfCell = lengthSearched;
return nodeString.substring(pos, regExp->matchedLength());
+ }
+ lengthSearched += nodeString.length();
}
}
}
}
}
// Any reason in practice to search all cells in that are above cell?
+ if (resultDistanceFromStartOfCell)
+ *resultDistanceFromStartOfCell = notFound;
return String();
}
-String Frame::searchForLabelsBeforeElement(const Vector<String>& labels, Element* element)
+String Frame::searchForLabelsBeforeElement(const Vector<String>& labels, Element* element, size_t* resultDistance, bool* resultIsInCellAbove)
{
OwnPtr<RegularExpression> regExp(createRegExpForLabels(labels));
// We stop searching after we've seen this many chars
@@ -461,6 +468,11 @@ String Frame::searchForLabelsBeforeElement(const Vector<String>& labels, Element
HTMLTableCellElement* startingTableCell = 0;
bool searchedCellAbove = false;
+ if (resultDistance)
+ *resultDistance = notFound;
+ if (resultIsInCellAbove)
+ *resultIsInCellAbove = false;
+
// walk backwards in the node tree, until another element, or form, or end of tree
int unsigned lengthSearched = 0;
Node* n;
@@ -476,9 +488,12 @@ String Frame::searchForLabelsBeforeElement(const Vector<String>& labels, Element
} else if (n->hasTagName(tdTag) && !startingTableCell) {
startingTableCell = static_cast<HTMLTableCellElement*>(n);
} else if (n->hasTagName(trTag) && startingTableCell) {
- String result = searchForLabelsAboveCell(regExp.get(), startingTableCell);
- if (!result.isEmpty())
+ String result = searchForLabelsAboveCell(regExp.get(), startingTableCell, resultDistance);
+ if (!result.isEmpty()) {
+ if (resultIsInCellAbove)
+ *resultIsInCellAbove = true;
return result;
+ }
searchedCellAbove = true;
} else if (n->isTextNode() && n->renderer() && n->renderer()->style()->visibility() == VISIBLE) {
// For each text chunk, run the regexp
@@ -487,38 +502,48 @@ String Frame::searchForLabelsBeforeElement(const Vector<String>& labels, Element
if (lengthSearched + nodeString.length() > maxCharsSearched)
nodeString = nodeString.right(charsSearchedThreshold - lengthSearched);
int pos = regExp->searchRev(nodeString);
- if (pos >= 0)
+ if (pos >= 0) {
+ if (resultDistance)
+ *resultDistance = lengthSearched;
return nodeString.substring(pos, regExp->matchedLength());
+ }
lengthSearched += nodeString.length();
}
}
// If we started in a cell, but bailed because we found the start of the form or the
// previous element, we still might need to search the row above us for a label.
- if (startingTableCell && !searchedCellAbove)
- return searchForLabelsAboveCell(regExp.get(), startingTableCell);
+ if (startingTableCell && !searchedCellAbove) {
+ String result = searchForLabelsAboveCell(regExp.get(), startingTableCell, resultDistance);
+ if (!result.isEmpty()) {
+ if (resultIsInCellAbove)
+ *resultIsInCellAbove = true;
+ return result;
+ }
+ }
return String();
}
-String Frame::matchLabelsAgainstElement(const Vector<String>& labels, Element* element)
+static String matchLabelsAgainstString(const Vector<String>& labels, const String& stringToMatch)
{
- String name = element->getAttribute(nameAttr);
- if (name.isEmpty())
+ if (stringToMatch.isEmpty())
return String();
- // Make numbers and _'s in field names behave like word boundaries, e.g., "address2"
- replace(name, RegularExpression("\\d", TextCaseSensitive), " ");
- name.replace('_', ' ');
+ String mutableStringToMatch = stringToMatch;
+ // Make numbers and _'s in field names behave like word boundaries, e.g., "address2"
+ replace(mutableStringToMatch, RegularExpression("\\d", TextCaseSensitive), " ");
+ mutableStringToMatch.replace('_', ' ');
+
OwnPtr<RegularExpression> regExp(createRegExpForLabels(labels));
- // Use the largest match we can find in the whole name string
+ // Use the largest match we can find in the whole string
int pos;
int length;
int bestPos = -1;
int bestLength = -1;
int start = 0;
do {
- pos = regExp->match(name, start);
+ pos = regExp->match(mutableStringToMatch, start);
if (pos != -1) {
length = regExp->matchedLength();
if (length >= bestLength) {
@@ -528,11 +553,24 @@ String Frame::matchLabelsAgainstElement(const Vector<String>& labels, Element* e
start = pos + 1;
}
} while (pos != -1);
-
+
if (bestPos != -1)
- return name.substring(bestPos, bestLength);
+ return mutableStringToMatch.substring(bestPos, bestLength);
return String();
}
+
+String Frame::matchLabelsAgainstElement(const Vector<String>& labels, Element* element)
+{
+ // Match against the name element, then against the id element if no match is found for the name element.
+ // See 7538330 for one popular site that benefits from the id element check.
+ // FIXME: This code is mirrored in FrameMac.mm. It would be nice to make the Mac code call the platform-agnostic
+ // code, which would require converting the NSArray of NSStrings to a Vector of Strings somewhere along the way.
+ String resultFromNameAttribute = matchLabelsAgainstString(labels, element->getAttribute(nameAttr));
+ if (!resultFromNameAttribute.isEmpty())
+ return resultFromNameAttribute;
+
+ return matchLabelsAgainstString(labels, element->getAttribute(idAttr));
+}
const VisibleSelection& Frame::mark() const
{
@@ -560,31 +598,6 @@ void Frame::notifyRendererOfSelectionChange(bool userTriggered)
toRenderTextControl(renderer)->selectionChanged(userTriggered);
}
-void Frame::invalidateSelection()
-{
- selection()->setNeedsLayout();
- selectionLayoutChanged();
-}
-
-void Frame::setCaretVisible(bool flag)
-{
- if (m_caretVisible == flag)
- return;
- clearCaretRectIfNeeded();
- m_caretVisible = flag;
- selectionLayoutChanged();
-}
-
-void Frame::clearCaretRectIfNeeded()
-{
-#if ENABLE(TEXT_CARET)
- if (m_caretPaint) {
- m_caretPaint = false;
- selection()->invalidateCaretRect();
- }
-#endif
-}
-
// Helper function that tells whether a particular node is an element that has an entire
// Frame and FrameView, a <frame>, <iframe>, or <object>.
static bool isFrameElement(const Node *n)
@@ -637,87 +650,6 @@ void Frame::setFocusedNodeIfNeeded()
page()->focusController()->setFocusedNode(0, this);
}
-void Frame::selectionLayoutChanged()
-{
- bool caretRectChanged = selection()->recomputeCaretRect();
-
-#if ENABLE(TEXT_CARET)
- bool caretBrowsing = settings() && settings()->caretBrowsingEnabled();
- bool shouldBlink = m_caretVisible
- && selection()->isCaret() && (selection()->isContentEditable() || caretBrowsing);
-
- // If the caret moved, stop the blink timer so we can restart with a
- // black caret in the new location.
- if (caretRectChanged || !shouldBlink)
- m_caretBlinkTimer.stop();
-
- // Start blinking with a black caret. Be sure not to restart if we're
- // already blinking in the right location.
- if (shouldBlink && !m_caretBlinkTimer.isActive()) {
- if (double blinkInterval = page()->theme()->caretBlinkInterval())
- m_caretBlinkTimer.startRepeating(blinkInterval);
-
- if (!m_caretPaint) {
- m_caretPaint = true;
- selection()->invalidateCaretRect();
- }
- }
-#else
- if (!caretRectChanged)
- return;
-#endif
-
- RenderView* view = contentRenderer();
- if (!view)
- return;
-
- VisibleSelection selection = this->selection()->selection();
-
- if (!selection.isRange())
- view->clearSelection();
- else {
- // Use the rightmost candidate for the start of the selection, and the leftmost candidate for the end of the selection.
- // Example: foo <a>bar</a>. Imagine that a line wrap occurs after 'foo', and that 'bar' is selected. If we pass [foo, 3]
- // as the start of the selection, the selection painting code will think that content on the line containing 'foo' is selected
- // and will fill the gap before 'bar'.
- Position startPos = selection.start();
- if (startPos.downstream().isCandidate())
- startPos = startPos.downstream();
- Position endPos = selection.end();
- if (endPos.upstream().isCandidate())
- endPos = endPos.upstream();
-
- // We can get into a state where the selection endpoints map to the same VisiblePosition when a selection is deleted
- // because we don't yet notify the SelectionController of text removal.
- if (startPos.isNotNull() && endPos.isNotNull() && selection.visibleStart() != selection.visibleEnd()) {
- RenderObject *startRenderer = startPos.node()->renderer();
- RenderObject *endRenderer = endPos.node()->renderer();
- view->setSelection(startRenderer, startPos.deprecatedEditingOffset(), endRenderer, endPos.deprecatedEditingOffset());
- }
- }
-}
-
-void Frame::caretBlinkTimerFired(Timer<Frame>*)
-{
-#if ENABLE(TEXT_CARET)
- ASSERT(m_caretVisible);
- ASSERT(selection()->isCaret());
- bool caretPaint = m_caretPaint;
- if (selection()->isCaretBlinkingSuspended() && caretPaint)
- return;
- m_caretPaint = !caretPaint;
- selection()->invalidateCaretRect();
-#endif
-}
-
-void Frame::paintCaret(GraphicsContext* p, int tx, int ty, const IntRect& clipRect) const
-{
-#if ENABLE(TEXT_CARET)
- if (m_caretPaint && m_caretVisible)
- selection()->paintCaret(p, tx, ty, clipRect);
-#endif
-}
-
void Frame::paintDragCaret(GraphicsContext* p, int tx, int ty, const IntRect& clipRect) const
{
#if ENABLE(TEXT_CARET)
@@ -779,6 +711,13 @@ void Frame::setZoomFactor(float percent, bool isTextOnly)
}
#endif
+ if (!isTextOnly) {
+ // Update the scroll position when doing a full page zoom, so the content stays in relatively the same position.
+ IntPoint scrollPosition = view()->scrollPosition();
+ float percentDifference = (percent / m_zoomFactor);
+ view()->setScrollPosition(IntPoint(scrollPosition.x() * percentDifference, scrollPosition.y() * percentDifference));
+ }
+
m_zoomFactor = percent;
m_page->settings()->setZoomsTextOnly(isTextOnly);
@@ -922,12 +861,12 @@ bool Frame::isContentEditable() const
return m_doc->inDesignMode();
}
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
const short enableRomanKeyboardsOnly = -23;
#endif
void Frame::setUseSecureKeyboardEntry(bool enable)
{
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
if (enable == IsSecureEventInputEnabled())
return;
if (enable) {
@@ -1570,12 +1509,6 @@ unsigned Frame::markAllMatchesForText(const String& target, bool caseFlag, unsig
continue;
}
- // A non-collapsed result range can in some funky whitespace cases still not
- // advance the range's start position (4509328). Break to avoid infinite loop.
- VisiblePosition newStart = endVisiblePosition(resultRange.get(), DOWNSTREAM);
- if (newStart == startVisiblePosition(searchRange.get(), DOWNSTREAM))
- break;
-
// Only treat the result as a match if it is visible
if (editor()->insideVisibleArea(resultRange.get())) {
++matchCount;
@@ -1586,7 +1519,12 @@ unsigned Frame::markAllMatchesForText(const String& target, bool caseFlag, unsig
if (limit > 0 && matchCount >= limit)
break;
- setStart(searchRange.get(), newStart);
+ // Set the new start for the search range to be the end of the previous
+ // result range. There is no need to use a VisiblePosition here,
+ // since findPlainText will use a TextIterator to go over the visible
+ // text nodes.
+ searchRange->setStart(resultRange->endContainer(exception), resultRange->endOffset(exception), exception);
+
Node* shadowTreeRoot = searchRange->shadowTreeRootNode();
if (searchRange->collapsed(exception) && shadowTreeRoot)
searchRange->setEnd(shadowTreeRoot, shadowTreeRoot->childNodeCount(), exception);
diff --git a/WebCore/page/Frame.h b/WebCore/page/Frame.h
index ca9a6d4..33bb435 100644
--- a/WebCore/page/Frame.h
+++ b/WebCore/page/Frame.h
@@ -29,18 +29,14 @@
#define Frame_h
#include "AnimationController.h"
-#include "Document.h"
#include "DragImage.h"
-#include "EditAction.h"
#include "Editor.h"
#include "EventHandler.h"
#include "FrameLoader.h"
#include "FrameTree.h"
-#include "Range.h"
#include "ScriptController.h"
#include "ScrollBehavior.h"
#include "SelectionController.h"
-#include "TextGranularity.h"
#include "UserScriptTypes.h"
#if PLATFORM(WIN)
@@ -64,24 +60,8 @@ typedef struct HBITMAP__* HBITMAP;
namespace WebCore {
class CSSMutableStyleDeclaration;
- class Editor;
- class EventHandler;
- class FrameLoader;
- class RedirectScheduler;
- class FrameLoaderClient;
- class FrameTree;
- class FrameView;
- class HTMLFrameOwnerElement;
class HTMLTableCellElement;
class RegularExpression;
- class RenderPart;
- class ScriptController;
- class SelectionController;
- class Settings;
- class VisibleSelection;
- class Widget;
-
- template <typename T> class Timer;
class Frame : public RefCounted<Frame> {
public:
@@ -254,15 +234,9 @@ namespace WebCore {
bool shouldChangeSelection(const VisibleSelection&) const;
bool shouldDeleteSelection(const VisibleSelection&) const;
- void clearCaretRectIfNeeded();
void setFocusedNodeIfNeeded();
- void selectionLayoutChanged();
void notifyRendererOfSelectionChange(bool userTriggered);
- void invalidateSelection();
-
- void setCaretVisible(bool = true);
- void paintCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect) const;
void paintDragCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect) const;
bool isContentEditable() const; // if true, everything in frame is editable
@@ -284,14 +258,10 @@ namespace WebCore {
void setUseSecureKeyboardEntry(bool);
- private:
- void caretBlinkTimerFired(Timer<Frame>*);
-
- public:
SelectionController* dragCaretController() const;
- String searchForLabelsAboveCell(RegularExpression*, HTMLTableCellElement*);
- String searchForLabelsBeforeElement(const Vector<String>& labels, Element*);
+ String searchForLabelsAboveCell(RegularExpression*, HTMLTableCellElement*, size_t* resultDistanceFromStartOfCell);
+ String searchForLabelsBeforeElement(const Vector<String>& labels, Element*, size_t* resultDistance, bool* resultIsInCellAbove);
String matchLabelsAgainstElement(const Vector<String>& labels, Element*);
VisiblePosition visiblePositionForPoint(const IntPoint& framePoint);
@@ -302,8 +272,8 @@ namespace WebCore {
// === undecided, would like to consider moving to another class
public:
- NSString* searchForNSLabelsAboveCell(RegularExpression*, HTMLTableCellElement*);
- NSString* searchForLabelsBeforeElement(NSArray* labels, Element*);
+ NSString* searchForNSLabelsAboveCell(RegularExpression*, HTMLTableCellElement*, size_t* resultDistanceFromStartOfCell);
+ NSString* searchForLabelsBeforeElement(NSArray* labels, Element*, size_t* resultDistance, bool* resultIsInCellAbove);
NSString* matchLabelsAgainstElement(NSArray* labels, Element*);
#if ENABLE(DASHBOARD_SUPPORT)
@@ -357,7 +327,6 @@ namespace WebCore {
mutable SelectionController m_selectionController;
mutable VisibleSelection m_mark;
- Timer<Frame> m_caretBlinkTimer;
mutable Editor m_editor;
mutable EventHandler m_eventHandler;
mutable AnimationController m_animationController;
@@ -369,9 +338,6 @@ namespace WebCore {
#if ENABLE(ORIENTATION_EVENTS)
int m_orientation;
#endif
-
- bool m_caretVisible;
- bool m_caretPaint;
bool m_highlightTextMatches;
bool m_inViewSourceMode;
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index b533bad..33d6457 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -29,6 +29,7 @@
#include "AXObjectCache.h"
#include "CSSStyleSelector.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "DocLoader.h"
#include "EventHandler.h"
@@ -45,8 +46,8 @@
#include "HTMLNames.h"
#include "InspectorTimelineAgent.h"
#include "OverflowEvent.h"
+#include "RenderEmbeddedObject.h"
#include "RenderPart.h"
-#include "RenderPartObject.h"
#include "RenderScrollbar.h"
#include "RenderScrollbarPart.h"
#include "RenderTheme.h"
@@ -354,7 +355,7 @@ PassRefPtr<Scrollbar> FrameView::createScrollbar(ScrollbarOrientation orientatio
// Try the <body> element first as a scrollbar source.
Element* body = doc ? doc->body() : 0;
if (body && body->renderer() && body->renderer()->style()->hasPseudoStyle(SCROLLBAR))
- return RenderScrollbar::createCustomScrollbar(this, orientation, body->renderBox());
+ return RenderScrollbar::createCustomScrollbar(this, orientation, body->renderer()->enclosingBox());
// If the <body> didn't have a custom style, then the root element might.
Element* docElement = doc ? doc->documentElement() : 0;
@@ -452,7 +453,7 @@ void FrameView::updateCompositingLayers()
if (!view->usesCompositing())
return;
- view->compositor()->updateCompositingLayers();
+ view->compositor()->updateCompositingLayers(CompositingUpdateAfterLayoutOrStyleChange);
}
void FrameView::setNeedsOneShotDrawingSynchronization()
@@ -610,7 +611,8 @@ void FrameView::layout(bool allowSubtree)
}
if (!subtree) {
- RenderObject* rootRenderer = document->documentElement() ? document->documentElement()->renderer() : 0;
+ Node* documentElement = document->documentElement();
+ RenderObject* rootRenderer = documentElement ? documentElement->renderer() : 0;
Node* body = document->body();
if (body && body->renderer()) {
if (body->hasTagName(framesetTag)) {
@@ -618,16 +620,22 @@ void FrameView::layout(bool allowSubtree)
vMode = ScrollbarAlwaysOff;
hMode = ScrollbarAlwaysOff;
} else if (body->hasTagName(bodyTag)) {
- if (!m_firstLayout && m_size.height() != layoutHeight()
- && toRenderBox(body->renderer())->stretchesToViewHeight())
+ if (!m_firstLayout && m_size.height() != layoutHeight() && body->renderer()->enclosingBox()->stretchesToViewHeight())
body->renderer()->setChildNeedsLayout(true);
// It's sufficient to just check the X overflow,
// since it's illegal to have visible in only one direction.
RenderObject* o = rootRenderer->style()->overflowX() == OVISIBLE && document->documentElement()->hasTagName(htmlTag) ? body->renderer() : rootRenderer;
applyOverflowToViewport(o, hMode, vMode);
}
- } else if (rootRenderer)
+ } else if (rootRenderer) {
+#if ENABLE(SVG)
+ if (documentElement->isSVGElement()) {
+ if (!m_firstLayout && (m_size.width() != layoutWidth() || m_size.height() != layoutHeight()))
+ rootRenderer->setChildNeedsLayout(true);
+ }
+#endif
applyOverflowToViewport(rootRenderer, hMode, vMode);
+ }
#ifdef INSTRUMENT_LAYOUT_SCHEDULING
if (m_firstLayout && !document->ownerElement())
printf("Elapsed time before first layout: %d\n", document->elapsedTime());
@@ -672,8 +680,14 @@ void FrameView::layout(bool allowSubtree)
pauseScheduledEvents();
- if (subtree)
- root->view()->pushLayoutState(root);
+ bool disableLayoutState = false;
+ if (subtree) {
+ RenderView* view = root->view();
+ disableLayoutState = view->shouldDisableLayoutStateForSubtree(root);
+ view->pushLayoutState(root);
+ if (disableLayoutState)
+ view->disableLayoutState();
+ }
m_midLayout = true;
beginDeferredRepaints();
@@ -681,11 +695,16 @@ void FrameView::layout(bool allowSubtree)
endDeferredRepaints();
m_midLayout = false;
- if (subtree)
- root->view()->popLayoutState();
+ if (subtree) {
+ RenderView* view = root->view();
+ view->popLayoutState();
+ if (disableLayoutState)
+ view->enableLayoutState();
+ }
m_layoutRoot = 0;
- m_frame->invalidateSelection();
+ m_frame->selection()->setNeedsLayout();
+ m_frame->selection()->updateAppearance();
m_layoutSchedulingEnabled = true;
@@ -751,15 +770,15 @@ void FrameView::layout(bool allowSubtree)
m_nestedLayoutCount--;
}
-void FrameView::addWidgetToUpdate(RenderPartObject* object)
+void FrameView::addWidgetToUpdate(RenderEmbeddedObject* object)
{
if (!m_widgetUpdateSet)
- m_widgetUpdateSet.set(new HashSet<RenderPartObject*>);
+ m_widgetUpdateSet.set(new RenderEmbeddedObjectSet);
m_widgetUpdateSet->add(object);
}
-void FrameView::removeWidgetToUpdate(RenderPartObject* object)
+void FrameView::removeWidgetToUpdate(RenderEmbeddedObject* object)
{
if (!m_widgetUpdateSet)
return;
@@ -946,16 +965,18 @@ void FrameView::scrollPositionChanged()
{
frame()->eventHandler()->sendScrollEvent();
+ // For fixed position elements, update widget positions and compositing layers after scrolling,
+ // but only if we're not inside of layout.
+ // FIXME: we could skip this if we knew the page had no fixed position elements.
+ if (!m_nestedLayoutCount) {
+ if (RenderView* root = m_frame->contentRenderer()) {
+ root->updateWidgetPositions();
#if USE(ACCELERATED_COMPOSITING)
- // We need to update layer positions after scrolling to account for position:fixed layers.
- Document* document = m_frame->document();
- if (!document)
- return;
-
- RenderLayer* layer = document->renderer() ? document->renderer()->enclosingLayer() : 0;
- if (layer)
- layer->updateLayerPositions(RenderLayer::UpdateCompositingLayers);
+ if (root->usesCompositing())
+ root->compositor()->updateCompositingLayers(CompositingUpdateOnScroll);
#endif
+ }
+ }
}
HostWindow* FrameView::hostWindow() const
@@ -1360,11 +1381,11 @@ bool FrameView::updateWidgets()
if (m_nestedLayoutCount > 1 || !m_widgetUpdateSet || m_widgetUpdateSet->isEmpty())
return true;
- Vector<RenderPartObject*> objectVector;
+ Vector<RenderEmbeddedObject*> objectVector;
copyToVector(*m_widgetUpdateSet, objectVector);
size_t size = objectVector.size();
for (size_t i = 0; i < size; ++i) {
- RenderPartObject* object = objectVector[i];
+ RenderEmbeddedObject* object = objectVector[i];
object->updateWidget(false);
// updateWidget() can destroy the RenderPartObject, so we need to make sure it's
diff --git a/WebCore/page/FrameView.h b/WebCore/page/FrameView.h
index 11f8843..b27ffd8 100644
--- a/WebCore/page/FrameView.h
+++ b/WebCore/page/FrameView.h
@@ -45,7 +45,7 @@ class Node;
class PlatformMouseEvent;
class RenderLayer;
class RenderObject;
-class RenderPartObject;
+class RenderEmbeddedObject;
class ScheduledEvent;
class String;
@@ -90,7 +90,6 @@ public:
RenderObject* layoutRoot(bool onlyDuringLayout = false) const;
int layoutCount() const { return m_layoutCount; }
- // These two helper functions just pass through to the RenderView.
bool needsLayout() const;
void setNeedsLayout();
@@ -166,8 +165,8 @@ public:
bool wasScrolledByUser() const;
void setWasScrolledByUser(bool);
- void addWidgetToUpdate(RenderPartObject*);
- void removeWidgetToUpdate(RenderPartObject*);
+ void addWidgetToUpdate(RenderEmbeddedObject*);
+ void removeWidgetToUpdate(RenderEmbeddedObject*);
virtual void paintContents(GraphicsContext*, const IntRect& damageRect);
void setPaintBehavior(PaintBehavior);
@@ -257,7 +256,9 @@ private:
IntSize m_size;
IntSize m_margins;
- OwnPtr<HashSet<RenderPartObject*> > m_widgetUpdateSet;
+
+ typedef HashSet<RenderEmbeddedObject*> RenderEmbeddedObjectSet;
+ OwnPtr<RenderEmbeddedObjectSet> m_widgetUpdateSet;
RefPtr<Frame> m_frame;
bool m_doFullRepaint;
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index 237ceaf..0843e81 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -44,6 +44,14 @@
#include "PositionError.h"
#endif
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#include "Coordinates.h"
+#include "GeolocationController.h"
+#include "GeolocationError.h"
+#include "GeolocationPosition.h"
+#include "PositionError.h"
+#endif
+
namespace WebCore {
static const char permissionDeniedErrorMessage[] = "User denied Geolocation";
@@ -134,6 +142,7 @@ void Geolocation::GeoNotifier::timerFired(Timer<GeoNotifier>*)
m_errorCallback->handleEvent(m_fatalError.get());
// This will cause this notifier to be deleted.
m_geolocation->fatalErrorOccurred(this);
+<<<<<<< HEAD
return;
}
@@ -142,6 +151,8 @@ void Geolocation::GeoNotifier::timerFired(Timer<GeoNotifier>*)
// will continue to run.
m_useCachedPosition = false;
m_geolocation->requestUsesCachedPosition(this);
+=======
+>>>>>>> webkit.org at r54127
return;
}
@@ -200,8 +211,12 @@ void Geolocation::Watchers::getNotifiersVector(Vector<RefPtr<GeoNotifier> >& cop
}
Geolocation::Geolocation(Frame* frame)
+<<<<<<< HEAD
: EventListener(GeolocationEventListenerType)
, m_frame(frame)
+=======
+ : m_frame(frame)
+>>>>>>> webkit.org at r54127
#if !ENABLE(CLIENT_BASED_GEOLOCATION)
, m_service(GeolocationService::create(this))
#endif
@@ -224,6 +239,10 @@ Geolocation::~Geolocation()
m_frame->domWindow()->removeEventListener(eventNames().unloadEvent, this, false);
}
+Geolocation::~Geolocation()
+{
+}
+
void Geolocation::disconnectFrame()
{
stopUpdating();
@@ -280,6 +299,7 @@ PassRefPtr<Geolocation::GeoNotifier> Geolocation::startRequest(PassRefPtr<Positi
if (isDenied())
notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage));
else {
+<<<<<<< HEAD
if (haveSuitableCachedPosition(notifier->m_options.get()))
notifier->setUseCachedPosition();
else {
@@ -292,6 +312,16 @@ PassRefPtr<Geolocation::GeoNotifier> Geolocation::startRequest(PassRefPtr<Positi
} else
notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, "Failed to start Geolocation service"));
}
+=======
+ if (notifier->hasZeroTimeout() || startUpdating(notifier.get())) {
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ // Only start timer if we're not waiting for user permission.
+ if (!m_startRequestPermissionNotifier)
+#endif
+ notifier->startTimerIfNeeded();
+ } else
+ notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, "Failed to start Geolocation service"));
+>>>>>>> webkit.org at r54127
}
return notifier.release();
@@ -314,6 +344,7 @@ void Geolocation::requestTimedOut(GeoNotifier* notifier)
if (!hasListeners())
stopUpdating();
+<<<<<<< HEAD
}
void Geolocation::requestUsesCachedPosition(GeoNotifier* notifier)
@@ -375,6 +406,8 @@ bool Geolocation::haveSuitableCachedPosition(PositionOptions* options)
return false;
DOMTimeStamp currentTimeMillis = currentTime() * 1000.0;
return m_positionCache->cachedPosition()->timestamp() > currentTimeMillis - options->maximumAge();
+=======
+>>>>>>> webkit.org at r54127
}
void Geolocation::clearWatch(int watchId)
@@ -427,8 +460,15 @@ void Geolocation::setIsAllowed(bool allowed)
return;
}
#endif
+<<<<<<< HEAD
if (!isAllowed()) {
+=======
+
+ if (isAllowed())
+ makeSuccessCallbacks();
+ else {
+>>>>>>> webkit.org at r54127
RefPtr<PositionError> error = PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage);
error->setIsFatal(true);
handleError(error.get());
@@ -543,8 +583,11 @@ void Geolocation::requestPermission()
void Geolocation::positionChanged(PassRefPtr<Geoposition> newPosition)
{
m_currentPosition = newPosition;
+<<<<<<< HEAD
m_positionCache->setCachedPosition(m_currentPosition.get());
+=======
+>>>>>>> webkit.org at r54127
// Stop all currently running timers.
stopTimers();
@@ -611,9 +654,12 @@ void Geolocation::geolocationServiceErrorOccurred(GeolocationService* service)
{
ASSERT(service->lastError());
+<<<<<<< HEAD
// Note that we do not stop timers here. For one-shots, the request is
// cleared in handleError. For watchers, the spec requires that the timer is
// not cleared.
+=======
+>>>>>>> webkit.org at r54127
handleError(service->lastError());
}
@@ -661,6 +707,7 @@ void Geolocation::stopUpdating()
}
+<<<<<<< HEAD
bool Geolocation::operator==(const EventListener& listener)
{
if (listener.type() != GeolocationEventListenerType)
@@ -679,4 +726,6 @@ void Geolocation::handleEvent(ScriptExecutionContext*, Event* event)
m_watchers.clear();
}
+=======
+>>>>>>> webkit.org at r54127
} // namespace WebCore
diff --git a/WebCore/page/Geolocation.h b/WebCore/page/Geolocation.h
index 0db37e4..fc6365e 100644
--- a/WebCore/page/Geolocation.h
+++ b/WebCore/page/Geolocation.h
@@ -54,7 +54,11 @@ class GeolocationPosition;
class GeolocationError;
#endif
+<<<<<<< HEAD
class Geolocation : public EventListener
+=======
+class Geolocation : public RefCounted<Geolocation>
+>>>>>>> webkit.org at r54127
#if !ENABLE(CLIENT_BASED_GEOLOCATION)
, public GeolocationServiceClient
#endif
@@ -83,7 +87,11 @@ public:
bool shouldClearCache() const { return m_shouldClearCache; }
#if ENABLE(CLIENT_BASED_GEOLOCATION)
+<<<<<<< HEAD
void setPostion(GeolocationPosition*);
+=======
+ void setPosition(GeolocationPosition*);
+>>>>>>> webkit.org at r54127
void setError(GeolocationError*);
#endif
diff --git a/WebCore/page/Geolocation.idl b/WebCore/page/Geolocation.idl
index e125118..76056a3 100644
--- a/WebCore/page/Geolocation.idl
+++ b/WebCore/page/Geolocation.idl
@@ -25,7 +25,7 @@
module core {
- interface Geolocation {
+ interface [OmitConstructor] Geolocation {
readonly attribute Geoposition lastPosition;
[Custom] void getCurrentPosition(in PositionCallback successCallback, in PositionErrorCallback errorCallback, in PositionOptions options);
diff --git a/WebCore/page/GeolocationController.cpp b/WebCore/page/GeolocationController.cpp
index 968e854..bb082e5 100644
--- a/WebCore/page/GeolocationController.cpp
+++ b/WebCore/page/GeolocationController.cpp
@@ -40,6 +40,11 @@ GeolocationController::GeolocationController(Page* page, GeolocationControllerCl
GeolocationController::~GeolocationController()
{
+<<<<<<< HEAD
+=======
+ if (m_client)
+ m_client->geolocationDestroyed();
+>>>>>>> webkit.org at r54127
}
void GeolocationController::addObserver(Geolocation* observer)
@@ -48,7 +53,11 @@ void GeolocationController::addObserver(Geolocation* observer)
bool wasEmpty = m_observers.isEmpty();
m_observers.add(observer);
+<<<<<<< HEAD
if (wasEmpty)
+=======
+ if (wasEmpty && m_client)
+>>>>>>> webkit.org at r54127
m_client->startUpdating();
}
@@ -58,26 +67,50 @@ void GeolocationController::removeObserver(Geolocation* observer)
return;
m_observers.remove(observer);
+<<<<<<< HEAD
if (m_observers.isEmpty())
+=======
+ if (m_observers.isEmpty() && m_client)
+>>>>>>> webkit.org at r54127
m_client->stopUpdating();
}
void GeolocationController::positionChanged(GeolocationPosition* position)
{
+<<<<<<< HEAD
HashSet<RefPtr<Geolocation> >::const_iterator end = m_observers.end();
for (HashSet<RefPtr<Geolocation> >::const_iterator it = m_observers.begin(); it != end; ++it)
(*it)->setPosition(position);
+=======
+ Vector<RefPtr<Geolocation> > observersVector;
+ copyToVector(m_observers, observersVector);
+ for (size_t i = 0; i < observersVector.size(); ++i)
+ observersVector[i]->setPosition(position);
+>>>>>>> webkit.org at r54127
}
void GeolocationController::errorOccurred(GeolocationError* error)
{
+<<<<<<< HEAD
HashSet<RefPtr<Geolocation> >::const_iterator end = m_observers.end();
for (HashSet<RefPtr<Geolocation> >::const_iterator it = m_observers.begin(); it != end; ++it)
(*it)->setError(error);
+=======
+ Vector<RefPtr<Geolocation> > observersVector;
+ copyToVector(m_observers, observersVector);
+ for (size_t i = 0; i < observersVector.size(); ++i)
+ observersVector[i]->setError(error);
+>>>>>>> webkit.org at r54127
}
GeolocationPosition* GeolocationController::lastPosition()
{
+<<<<<<< HEAD
+=======
+ if (!m_client)
+ return 0;
+
+>>>>>>> webkit.org at r54127
return m_client->lastPosition();
}
diff --git a/WebCore/page/GeolocationControllerClient.h b/WebCore/page/GeolocationControllerClient.h
index 830c64b..01b1a27 100644
--- a/WebCore/page/GeolocationControllerClient.h
+++ b/WebCore/page/GeolocationControllerClient.h
@@ -32,6 +32,11 @@ class GeolocationPosition;
class GeolocationControllerClient {
public:
+<<<<<<< HEAD
+=======
+ virtual void geolocationDestroyed() = 0;
+
+>>>>>>> webkit.org at r54127
virtual void startUpdating() = 0;
virtual void stopUpdating() = 0;
virtual GeolocationPosition* lastPosition() = 0;
diff --git a/WebCore/page/GeolocationError.h b/WebCore/page/GeolocationError.h
index 9761ca6..5c3df15 100644
--- a/WebCore/page/GeolocationError.h
+++ b/WebCore/page/GeolocationError.h
@@ -30,6 +30,10 @@
#include "PlatformString.h"
#include <wtf/PassRefPtr.h>
+<<<<<<< HEAD
+=======
+#include <wtf/RefCounted.h>
+>>>>>>> webkit.org at r54127
#include <wtf/RefPtr.h>
namespace WebCore {
@@ -47,7 +51,15 @@ public:
const String& message() const { return m_message; }
private:
+<<<<<<< HEAD
GeolocationError(ErrorCode code, const String& message);
+=======
+ GeolocationError(ErrorCode code, const String& message)
+ : m_code(code)
+ , m_message(message)
+ {
+ }
+>>>>>>> webkit.org at r54127
ErrorCode m_code;
String m_message;
diff --git a/WebCore/page/GeolocationPosition.h b/WebCore/page/GeolocationPosition.h
index c31e9c4..91bd379 100644
--- a/WebCore/page/GeolocationPosition.h
+++ b/WebCore/page/GeolocationPosition.h
@@ -29,6 +29,10 @@
#if ENABLE(CLIENT_BASED_GEOLOCATION)
#include <wtf/PassRefPtr.h>
+<<<<<<< HEAD
+=======
+#include <wtf/RefCounted.h>
+>>>>>>> webkit.org at r54127
#include <wtf/RefPtr.h>
namespace WebCore {
diff --git a/WebCore/page/Geoposition.idl b/WebCore/page/Geoposition.idl
index 3ec8b0b..6fa12ff 100644
--- a/WebCore/page/Geoposition.idl
+++ b/WebCore/page/Geoposition.idl
@@ -25,7 +25,7 @@
module core {
- interface Geoposition {
+ interface [OmitConstructor] Geoposition {
readonly attribute Coordinates coords;
readonly attribute DOMTimeStamp timestamp;
};
diff --git a/WebCore/page/History.cpp b/WebCore/page/History.cpp
index ea9819e..78e8ea6 100644
--- a/WebCore/page/History.cpp
+++ b/WebCore/page/History.cpp
@@ -98,9 +98,8 @@ KURL History::urlForState(const String& urlString)
void History::stateObjectAdded(PassRefPtr<SerializedScriptValue> data, const String& title, const String& urlString, StateObjectType stateObjectType, ExceptionCode& ec)
{
- if (!m_frame)
+ if (!m_frame || !m_frame->page())
return;
- ASSERT(m_frame->page());
KURL fullURL = urlForState(urlString);
if (!fullURL.isValid()) {
@@ -113,13 +112,13 @@ void History::stateObjectAdded(PassRefPtr<SerializedScriptValue> data, const Str
else if (stateObjectType == StateObjectReplace)
m_frame->loader()->history()->replaceState(data, title, fullURL.string());
- if (!urlString.isEmpty()) {
+ if (!urlString.isEmpty())
m_frame->document()->updateURLForPushOrReplaceState(fullURL);
- if (stateObjectType == StateObjectPush)
- m_frame->loader()->client()->dispatchDidPushStateWithinPage();
- else if (stateObjectType == StateObjectReplace)
- m_frame->loader()->client()->dispatchDidReplaceStateWithinPage();
- }
+
+ if (stateObjectType == StateObjectPush)
+ m_frame->loader()->client()->dispatchDidPushStateWithinPage();
+ else if (stateObjectType == StateObjectReplace)
+ m_frame->loader()->client()->dispatchDidReplaceStateWithinPage();
}
} // namespace WebCore
diff --git a/WebCore/page/History.idl b/WebCore/page/History.idl
index 3790552..3fc2771 100644
--- a/WebCore/page/History.idl
+++ b/WebCore/page/History.idl
@@ -32,7 +32,8 @@ module window {
DelegatingGetOwnPropertySlot,
DelegatingPutFunction,
CustomDeleteProperty,
- CustomGetPropertyNames
+ CustomGetPropertyNames,
+ OmitConstructor
] History {
readonly attribute unsigned long length;
diff --git a/WebCore/page/Location.idl b/WebCore/page/Location.idl
index 7d680f2..b020267 100644
--- a/WebCore/page/Location.idl
+++ b/WebCore/page/Location.idl
@@ -38,7 +38,8 @@ module window {
CustomGetPropertyNames,
CustomDefineGetter,
DelegatingPrototypePutFunction,
- CustomPrototypeDefineGetter
+ CustomPrototypeDefineGetter,
+ OmitConstructor
] Location {
attribute [DoNotCheckDomainSecurityOnSet, CustomSetter, V8DisallowShadowing] DOMString href;
diff --git a/WebCore/page/Navigator.cpp b/WebCore/page/Navigator.cpp
index 8563a0e..bcc302f 100644
--- a/WebCore/page/Navigator.cpp
+++ b/WebCore/page/Navigator.cpp
@@ -23,6 +23,7 @@
#include "config.h"
#include "Navigator.h"
+#include "Chrome.h"
#include "CookieJar.h"
#if PLATFORM(ANDROID)
#include "Connection.h"
diff --git a/WebCore/page/Navigator.idl b/WebCore/page/Navigator.idl
index 168cf8c..215316f 100644
--- a/WebCore/page/Navigator.idl
+++ b/WebCore/page/Navigator.idl
@@ -20,7 +20,8 @@
module window {
interface [
- CustomMarkFunction
+ CustomMarkFunction,
+ OmitConstructor
] Navigator {
readonly attribute DOMString appCodeName;
readonly attribute DOMString appName;
@@ -45,7 +46,7 @@ module window {
#endif
#if defined(ENABLE_GEOLOCATION) && ENABLE_GEOLOCATION
- readonly attribute Geolocation geolocation;
+ readonly attribute [EnabledAtRuntime] Geolocation geolocation;
#endif
#if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE
diff --git a/WebCore/page/NavigatorBase.cpp b/WebCore/page/NavigatorBase.cpp
index 5b0c5d4..ca51a29 100644
--- a/WebCore/page/NavigatorBase.cpp
+++ b/WebCore/page/NavigatorBase.cpp
@@ -29,19 +29,19 @@
#include "NetworkStateNotifier.h"
#include "PlatformString.h"
-#if PLATFORM(LINUX)
+#if OS(LINUX)
#include "sys/utsname.h"
#include <wtf/StdLibExtras.h>
#endif
#ifndef WEBCORE_NAVIGATOR_PLATFORM
-#if PLATFORM(MAC) && (PLATFORM(PPC) || PLATFORM(PPC64))
+#if OS(MAC_OS_X) && (CPU(PPC) || CPU(PPC64))
#define WEBCORE_NAVIGATOR_PLATFORM "MacPPC"
-#elif PLATFORM(MAC) && (PLATFORM(X86) || PLATFORM(X86_64))
+#elif OS(MAC_OS_X) && (CPU(X86) || CPU(X86_64))
#define WEBCORE_NAVIGATOR_PLATFORM "MacIntel"
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
#define WEBCORE_NAVIGATOR_PLATFORM "Win32"
-#elif PLATFORM(SYMBIAN)
+#elif OS(SYMBIAN)
#define WEBCORE_NAVIGATOR_PLATFORM "Symbian"
#else
#define WEBCORE_NAVIGATOR_PLATFORM ""
@@ -85,7 +85,7 @@ String NavigatorBase::appVersion() const
String NavigatorBase::platform() const
{
-#if PLATFORM(LINUX)
+#if OS(LINUX)
if (String("") != WEBCORE_NAVIGATOR_PLATFORM)
return WEBCORE_NAVIGATOR_PLATFORM;
struct utsname osname;
diff --git a/WebCore/page/Page.cpp b/WebCore/page/Page.cpp
index 1a035a5..1704bfb 100644
--- a/WebCore/page/Page.cpp
+++ b/WebCore/page/Page.cpp
@@ -289,15 +289,8 @@ void Page::goBackOrForward(int distance)
void Page::goToItem(HistoryItem* item, FrameLoadType type)
{
-#if !ASSERT_DISABLED
- // If we're navigating to an item with history state for a Document other than the
- // current Document, the new Document had better be in the page cache.
- if (item->stateObject() && item->document() != m_mainFrame->document())
- ASSERT(item->document()->inPageCache());
-#endif
-
// Abort any current load unless we're navigating the current document to a new state object
- if (!item->stateObject() || item->document() != m_mainFrame->document()) {
+ if (!item->stateObject() || item->documentSequenceNumber() != m_mainFrame->loader()->history()->currentItem()->documentSequenceNumber()) {
// Define what to do with any open database connections. By default we stop them and terminate the database thread.
DatabasePolicy databasePolicy = DatabasePolicyStop;
@@ -318,7 +311,7 @@ void Page::goToItem(HistoryItem* item, FrameLoadType type)
int Page::getHistoryLength()
{
- return m_backForwardList->backListCount() + 1;
+ return m_backForwardList->backListCount() + 1 + m_backForwardList->forwardListCount();
}
void Page::setGlobalHistoryItem(HistoryItem* item)
@@ -485,6 +478,9 @@ const VisibleSelection& Page::selection() const
void Page::setDefersLoading(bool defers)
{
+ if (!m_settings->loadDeferringEnabled())
+ return;
+
if (defers == m_defersLoading)
return;
@@ -689,7 +685,7 @@ void Page::setDebugger(JSC::Debugger* debugger)
StorageNamespace* Page::sessionStorage(bool optionalCreate)
{
if (!m_sessionStorage && optionalCreate)
- m_sessionStorage = StorageNamespace::sessionStorageNamespace();
+ m_sessionStorage = StorageNamespace::sessionStorageNamespace(this);
return m_sessionStorage.get();
}
@@ -775,4 +771,16 @@ void Page::didStopPlugin(HaltablePlugin* obj)
m_pluginHalter->didStopPlugin(obj);
}
+#if !ASSERT_DISABLED
+void Page::checkFrameCountConsistency() const
+{
+ ASSERT(m_frameCount >= 0);
+
+ int frameCount = 0;
+ for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext())
+ ++frameCount;
+
+ ASSERT(m_frameCount + 1 == frameCount);
+}
+#endif
} // namespace WebCore
diff --git a/WebCore/page/Page.h b/WebCore/page/Page.h
index 40d96a7..1417c87 100644
--- a/WebCore/page/Page.h
+++ b/WebCore/page/Page.h
@@ -21,20 +21,17 @@
#ifndef Page_h
#define Page_h
-#include "BackForwardList.h"
-#include "Chrome.h"
-#include "ContextMenuController.h"
#include "FrameLoaderTypes.h"
-#include "LinkHash.h"
#include "PlatformString.h"
+#include <wtf/Forward.h>
#include <wtf/HashSet.h>
-#include <wtf/OwnPtr.h>
+#include <wtf/Noncopyable.h>
#if PLATFORM(MAC)
#include "SchedulePair.h"
#endif
-#if PLATFORM(WIN) || (PLATFORM(WX) && PLATFORM(WIN_OS)) || (PLATFORM(QT) && defined(Q_WS_WIN))
+#if PLATFORM(WIN) || (PLATFORM(WX) && OS(WINDOWS)) || (PLATFORM(QT) && defined(Q_WS_WIN))
typedef struct HINSTANCE__* HINSTANCE;
#endif
@@ -44,6 +41,7 @@ namespace JSC {
namespace WebCore {
+ class BackForwardList;
class Chrome;
class ChromeClient;
class ContextMenuClient;
@@ -57,6 +55,7 @@ namespace WebCore {
class GeolocationController;
class GeolocationControllerClient;
class HaltablePlugin;
+ class HistoryItem;
class InspectorClient;
class InspectorController;
class InspectorTimelineAgent;
@@ -81,6 +80,8 @@ namespace WebCore {
class NotificationPresenter;
#endif
+ typedef uint64_t LinkHash;
+
enum FindDirection { FindDirectionForward, FindDirectionBackward };
class Page : public Noncopyable {
@@ -131,8 +132,8 @@ namespace WebCore {
PageGroup* groupPtr() { return m_group; } // can return 0
void incrementFrameCount() { ++m_frameCount; }
- void decrementFrameCount() { --m_frameCount; }
- int frameCount() const { return m_frameCount; }
+ void decrementFrameCount() { ASSERT(m_frameCount); --m_frameCount; }
+ int frameCount() const { checkFrameCountConsistency(); return m_frameCount; }
Chrome* chrome() const { return m_chrome.get(); }
SelectionController* dragCaretController() const { return m_dragCaretController.get(); }
@@ -203,7 +204,7 @@ namespace WebCore {
void setDebugger(JSC::Debugger*);
JSC::Debugger* debugger() const { return m_debugger; }
-#if PLATFORM(WIN) || (PLATFORM(WX) && PLATFORM(WIN_OS)) || (PLATFORM(QT) && defined(Q_WS_WIN))
+#if PLATFORM(WIN) || (PLATFORM(WX) && OS(WINDOWS)) || (PLATFORM(QT) && defined(Q_WS_WIN))
// The global DLL or application instance used for all windows.
static void setInstanceHandle(HINSTANCE instanceHandle) { s_instanceHandle = instanceHandle; }
static HINSTANCE instanceHandle() { return s_instanceHandle; }
@@ -243,6 +244,12 @@ namespace WebCore {
private:
void initGroup();
+#if ASSERT_DISABLED
+ void checkFrameCountConsistency() const { }
+#else
+ void checkFrameCountConsistency() const;
+#endif
+
OwnPtr<Chrome> m_chrome;
OwnPtr<SelectionController> m_dragCaretController;
#if ENABLE(DRAG_SUPPORT)
diff --git a/WebCore/page/PageGroup.cpp b/WebCore/page/PageGroup.cpp
index 558c5cb..0ebbfba 100644
--- a/WebCore/page/PageGroup.cpp
+++ b/WebCore/page/PageGroup.cpp
@@ -26,6 +26,7 @@
#include "config.h"
#include "PageGroup.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
#include "Frame.h"
diff --git a/WebCore/page/PositionError.idl b/WebCore/page/PositionError.idl
index 91027df..1f28d95 100644
--- a/WebCore/page/PositionError.idl
+++ b/WebCore/page/PositionError.idl
@@ -25,9 +25,7 @@
module core {
- interface [
- GenerateConstructor
- ] PositionError {
+ interface PositionError {
readonly attribute unsigned short code;
readonly attribute DOMString message;
diff --git a/WebCore/page/Screen.idl b/WebCore/page/Screen.idl
index ca7d20d..cd181eb 100644
--- a/WebCore/page/Screen.idl
+++ b/WebCore/page/Screen.idl
@@ -29,7 +29,7 @@
module window {
- interface Screen {
+ interface [OmitConstructor] Screen {
readonly attribute unsigned long height;
readonly attribute unsigned long width;
readonly attribute unsigned long colorDepth;
diff --git a/WebCore/page/SecurityOrigin.cpp b/WebCore/page/SecurityOrigin.cpp
index f53dbf1..b2a1c89 100644
--- a/WebCore/page/SecurityOrigin.cpp
+++ b/WebCore/page/SecurityOrigin.cpp
@@ -65,22 +65,24 @@ static URLSchemesMap& localSchemes()
return localSchemes;
}
-static URLSchemesMap& noAccessSchemes()
+static URLSchemesMap& schemesWithUniqueOrigins()
{
- DEFINE_STATIC_LOCAL(URLSchemesMap, noAccessSchemes, ());
+ DEFINE_STATIC_LOCAL(URLSchemesMap, schemesWithUniqueOrigins, ());
- if (noAccessSchemes.isEmpty())
- noAccessSchemes.add("data");
+ // This is a willful violation of HTML5.
+ // See https://bugs.webkit.org/show_bug.cgi?id=11885
+ if (schemesWithUniqueOrigins.isEmpty())
+ schemesWithUniqueOrigins.add("data");
- return noAccessSchemes;
+ return schemesWithUniqueOrigins;
}
-SecurityOrigin::SecurityOrigin(const KURL& url)
- : m_protocol(url.protocol().isNull() ? "" : url.protocol().lower())
+SecurityOrigin::SecurityOrigin(const KURL& url, SandboxFlags sandboxFlags)
+ : m_sandboxFlags(sandboxFlags)
+ , m_protocol(url.protocol().isNull() ? "" : url.protocol().lower())
, m_host(url.host().isNull() ? "" : url.host().lower())
, m_port(url.port())
- , m_sandboxFlags(SandboxNone)
- , m_noAccess(false)
+ , m_isUnique(isSandboxed(SandboxOrigin) || shouldTreatURLSchemeAsNoAccess(m_protocol))
, m_universalAccess(false)
, m_domainWasSetInDOM(false)
{
@@ -88,10 +90,6 @@ SecurityOrigin::SecurityOrigin(const KURL& url)
if (m_protocol == "about" || m_protocol == "javascript")
m_protocol = "";
- // Some URLs are not allowed access to anything other than themselves.
- if (shouldTreatURLSchemeAsNoAccess(m_protocol))
- m_noAccess = true;
-
// document.domain starts as m_host, but can be set by the DOM.
m_domain = m_host;
@@ -100,7 +98,7 @@ SecurityOrigin::SecurityOrigin(const KURL& url)
if (m_canLoadLocalResources) {
// Directories should never be readable.
if (!url.hasPath() || url.path().endsWith("/"))
- m_noAccess = true;
+ m_isUnique = true;
}
if (isDefaultPortForProtocol(m_port, m_protocol))
@@ -108,12 +106,12 @@ SecurityOrigin::SecurityOrigin(const KURL& url)
}
SecurityOrigin::SecurityOrigin(const SecurityOrigin* other)
- : m_protocol(other->m_protocol.threadsafeCopy())
+ : m_sandboxFlags(other->m_sandboxFlags)
+ , m_protocol(other->m_protocol.threadsafeCopy())
, m_host(other->m_host.threadsafeCopy())
, m_domain(other->m_domain.threadsafeCopy())
, m_port(other->m_port)
- , m_sandboxFlags(other->m_sandboxFlags)
- , m_noAccess(other->m_noAccess)
+ , m_isUnique(other->m_isUnique)
, m_universalAccess(other->m_universalAccess)
, m_domainWasSetInDOM(other->m_domainWasSetInDOM)
, m_canLoadLocalResources(other->m_canLoadLocalResources)
@@ -125,11 +123,11 @@ bool SecurityOrigin::isEmpty() const
return m_protocol.isEmpty();
}
-PassRefPtr<SecurityOrigin> SecurityOrigin::create(const KURL& url)
+PassRefPtr<SecurityOrigin> SecurityOrigin::create(const KURL& url, SandboxFlags sandboxFlags)
{
if (!url.isValid())
- return adoptRef(new SecurityOrigin(KURL()));
- return adoptRef(new SecurityOrigin(url));
+ return adoptRef(new SecurityOrigin(KURL(), sandboxFlags));
+ return adoptRef(new SecurityOrigin(url, sandboxFlags));
}
PassRefPtr<SecurityOrigin> SecurityOrigin::createEmpty()
@@ -148,20 +146,45 @@ void SecurityOrigin::setDomainFromDOM(const String& newDomain)
m_domain = newDomain.lower();
}
+static HashSet<String>& schemesForbiddenFromDomainRelaxation()
+{
+ DEFINE_STATIC_LOCAL(HashSet<String>, schemes, ());
+ return schemes;
+}
+
+void SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(bool forbidden, const String& scheme)
+{
+ if (scheme.isEmpty())
+ return;
+
+ if (forbidden)
+ schemesForbiddenFromDomainRelaxation().add(scheme);
+ else
+ schemesForbiddenFromDomainRelaxation().remove(scheme);
+}
+
+bool SecurityOrigin::isDomainRelaxationForbiddenForURLScheme(const String& scheme)
+{
+ if (scheme.isEmpty())
+ return false;
+
+ return schemesForbiddenFromDomainRelaxation().contains(scheme);
+}
+
bool SecurityOrigin::canAccess(const SecurityOrigin* other) const
{
if (m_universalAccess)
return true;
- if (m_noAccess || other->m_noAccess || isSandboxed(SandboxOrigin) || other->isSandboxed(SandboxOrigin))
+ if (isUnique() || other->isUnique())
return false;
// Here are two cases where we should permit access:
//
- // 1) Neither document has set document.domain. In this case, we insist
+ // 1) Neither document has set document.domain. In this case, we insist
// that the scheme, host, and port of the URLs match.
//
- // 2) Both documents have set document.domain. In this case, we insist
+ // 2) Both documents have set document.domain. In this case, we insist
// that the documents have set document.domain to the same value and
// that the scheme of the URLs match.
//
@@ -194,11 +217,11 @@ bool SecurityOrigin::canRequest(const KURL& url) const
if (m_universalAccess)
return true;
- if (m_noAccess || isSandboxed(SandboxOrigin))
+ if (isUnique())
return false;
RefPtr<SecurityOrigin> targetOrigin = SecurityOrigin::create(url);
- if (targetOrigin->m_noAccess)
+ if (targetOrigin->isUnique())
return false;
// We call isSameSchemeHostPort here instead of canAccess because we want
@@ -221,11 +244,12 @@ bool SecurityOrigin::taintsCanvas(const KURL& url) const
if (canRequest(url))
return false;
- // This method exists because we treat data URLs as noAccess, contrary
- // to the current (9/19/2009) draft of the HTML5 specification. We still
- // want to let folks paint data URLs onto untainted canvases, so we special
- // case data URLs below. If we change to match HTML5 w.r.t. data URL
- // security, then we can remove this method in favor of !canRequest.
+ // This function exists because we treat data URLs as having a unique origin,
+ // contrary to the current (9/19/2009) draft of the HTML5 specification.
+ // We still want to let folks paint data URLs onto untainted canvases, so
+ // we special case data URLs below. If we change to match HTML5 w.r.t.
+ // data URL security, then we can remove this function in favor of
+ // !canRequest.
if (url.protocolIs("data"))
return false;
@@ -248,8 +272,8 @@ bool SecurityOrigin::canLoad(const KURL& url, const String& referrer, Document*
void SecurityOrigin::grantLoadLocalResources()
{
- // This method exists only to support backwards compatibility with older
- // versions of WebKit. Granting privileges to some, but not all, documents
+ // This function exists only to support backwards compatibility with older
+ // versions of WebKit. Granting privileges to some, but not all, documents
// in a SecurityOrigin is a security hazard because the documents without
// the privilege can obtain the privilege by injecting script into the
// documents that have been granted the privilege.
@@ -262,6 +286,15 @@ void SecurityOrigin::grantUniversalAccess()
m_universalAccess = true;
}
+void SecurityOrigin::setSandboxFlags(SandboxFlags flags)
+{
+ // Although you might think that we should set m_isUnique based on
+ // SandboxOrigin, that's not actually the right behavior. We're supposed to
+ // freeze the origin of a document when it is created, even if the sandbox
+ // flags change after that point in time.
+ m_sandboxFlags = flags;
+}
+
bool SecurityOrigin::isLocal() const
{
return shouldTreatURLSchemeAsLocal(m_protocol);
@@ -282,7 +315,7 @@ String SecurityOrigin::toString() const
if (isEmpty())
return "null";
- if (m_noAccess || isSandboxed(SandboxOrigin))
+ if (isUnique())
return "null";
if (m_protocol == "file")
@@ -440,12 +473,12 @@ bool SecurityOrigin::shouldTreatURLSchemeAsLocal(const String& scheme)
void SecurityOrigin::registerURLSchemeAsNoAccess(const String& scheme)
{
- noAccessSchemes().add(scheme);
+ schemesWithUniqueOrigins().add(scheme);
}
bool SecurityOrigin::shouldTreatURLSchemeAsNoAccess(const String& scheme)
{
- return noAccessSchemes().contains(scheme);
+ return schemesWithUniqueOrigins().contains(scheme);
}
bool SecurityOrigin::shouldHideReferrer(const KURL& url, const String& referrer)
diff --git a/WebCore/page/SecurityOrigin.h b/WebCore/page/SecurityOrigin.h
index af83f02..71681d7 100644
--- a/WebCore/page/SecurityOrigin.h
+++ b/WebCore/page/SecurityOrigin.h
@@ -40,159 +40,169 @@
namespace WebCore {
- typedef HashSet<String, CaseFoldingHash> URLSchemesMap;
-
- class Document;
- class KURL;
-
- class SecurityOrigin : public ThreadSafeShared<SecurityOrigin> {
- public:
- static PassRefPtr<SecurityOrigin> createFromDatabaseIdentifier(const String&);
- static PassRefPtr<SecurityOrigin> createFromString(const String&);
- static PassRefPtr<SecurityOrigin> create(const KURL&);
- static PassRefPtr<SecurityOrigin> createEmpty();
-
- // Create a deep copy of this SecurityOrigin. This method is useful
- // when marshalling a SecurityOrigin to another thread.
- PassRefPtr<SecurityOrigin> threadsafeCopy();
-
- // Set the domain property of this security origin to newDomain. This
- // function does not check whether newDomain is a suffix of the current
- // domain. The caller is responsible for validating newDomain.
- void setDomainFromDOM(const String& newDomain);
- bool domainWasSetInDOM() const { return m_domainWasSetInDOM; }
-
- String protocol() const { return m_protocol; }
- String host() const { return m_host; }
- String domain() const { return m_domain; }
- unsigned short port() const { return m_port; }
-
- // Returns true if this SecurityOrigin can script objects in the given
- // SecurityOrigin. For example, call this function before allowing
- // script from one security origin to read or write objects from
- // another SecurityOrigin.
- bool canAccess(const SecurityOrigin*) const;
-
- // Returns true if this SecurityOrigin can read content retrieved from
- // the given URL. For example, call this function before issuing
- // XMLHttpRequests.
- bool canRequest(const KURL&) const;
-
- // Returns true if drawing an image from this URL taints a canvas from
- // this security origin. For example, call this function before
- // drawing an image onto an HTML canvas element with the drawImage API.
- bool taintsCanvas(const KURL&) const;
-
- // Returns true for any non-local URL. If document parameter is supplied,
- // its local load policy dictates, otherwise if referrer is non-empty and
- // represents a local file, then the local load is allowed.
- static bool canLoad(const KURL&, const String& referrer, Document* document);
-
- // Returns true if this SecurityOrigin can load local resources, such
- // as images, iframes, and style sheets, and can link to local URLs.
- // For example, call this function before creating an iframe to a
- // file:// URL.
- //
- // Note: A SecurityOrigin might be allowed to load local resources
- // without being able to issue an XMLHttpRequest for a local URL.
- // To determine whether the SecurityOrigin can issue an
- // XMLHttpRequest for a URL, call canRequest(url).
- bool canLoadLocalResources() const { return m_canLoadLocalResources; }
-
- // Explicitly grant the ability to load local resources to this
- // SecurityOrigin.
- //
- // Note: This method exists only to support backwards compatibility
- // with older versions of WebKit.
- void grantLoadLocalResources();
-
- // Explicitly grant the ability to access very other SecurityOrigin.
- //
- // WARNING: This is an extremely powerful ability. Use with caution!
- void grantUniversalAccess();
-
- // Sandboxing status as determined by the frame.
- void setSandboxFlags(SandboxFlags flags) { m_sandboxFlags = flags; }
- bool isSandboxed(SandboxFlags mask) const { return m_sandboxFlags & mask; }
-
- bool canAccessDatabase() const { return !isSandboxed(SandboxOrigin); }
- bool canAccessStorage() const { return !isSandboxed(SandboxOrigin); }
-
- bool isSecureTransitionTo(const KURL&) const;
-
- // The local SecurityOrigin is the most privileged SecurityOrigin.
- // The local SecurityOrigin can script any document, navigate to local
- // resources, and can set arbitrary headers on XMLHttpRequests.
- bool isLocal() const;
-
- // The empty SecurityOrigin is the least privileged SecurityOrigin.
- bool isEmpty() const;
-
- // Convert this SecurityOrigin into a string. The string
- // representation of a SecurityOrigin is similar to a URL, except it
- // lacks a path component. The string representation does not encode
- // the value of the SecurityOrigin's domain property.
- //
- // When using the string value, it's important to remember that it
- // might be "null". This happens when this SecurityOrigin has
- // noAccess to other SecurityOrigins. For example, this SecurityOrigin
- // might have come from a data URL, the SecurityOrigin might be empty,
- // or we might have explicitly decided that we
- // shouldTreatURLSchemeAsNoAccess.
- String toString() const;
-
- // Serialize the security origin to a string that could be used as part of
- // file names. This format should be used in storage APIs only.
- String databaseIdentifier() const;
-
- // This method checks for equality between SecurityOrigins, not whether
- // one origin can access another. It is used for hash table keys.
- // For access checks, use canAccess().
- // FIXME: If this method is really only useful for hash table keys, it
- // should be refactored into SecurityOriginHash.
- bool equal(const SecurityOrigin*) const;
-
- // This method checks for equality, ignoring the value of document.domain
- // (and whether it was set) but considering the host. It is used for postMessage.
- bool isSameSchemeHostPort(const SecurityOrigin*) const;
-
- static void registerURLSchemeAsLocal(const String&);
- static void removeURLSchemeRegisteredAsLocal(const String&);
- static const URLSchemesMap& localURLSchemes();
- static bool shouldTreatURLAsLocal(const String&);
- static bool shouldTreatURLSchemeAsLocal(const String&);
-
- static bool shouldHideReferrer(const KURL&, const String& referrer);
-
- enum LocalLoadPolicy {
- AllowLocalLoadsForAll, // No restriction on local loads.
- AllowLocalLoadsForLocalAndSubstituteData,
- AllowLocalLoadsForLocalOnly,
- };
- static void setLocalLoadPolicy(LocalLoadPolicy);
- static bool restrictAccessToLocal();
- static bool allowSubstituteDataAccessToLocal();
-
- static void registerURLSchemeAsNoAccess(const String&);
- static bool shouldTreatURLSchemeAsNoAccess(const String&);
-
- static void whiteListAccessFromOrigin(const SecurityOrigin& sourceOrigin, const String& destinationProtocol, const String& destinationDomains, bool allowDestinationSubdomains);
- static void resetOriginAccessWhiteLists();
-
- private:
- explicit SecurityOrigin(const KURL&);
- explicit SecurityOrigin(const SecurityOrigin*);
-
- String m_protocol;
- String m_host;
- String m_domain;
- unsigned short m_port;
- SandboxFlags m_sandboxFlags;
- bool m_noAccess;
- bool m_universalAccess;
- bool m_domainWasSetInDOM;
- bool m_canLoadLocalResources;
+typedef HashSet<String, CaseFoldingHash> URLSchemesMap;
+
+class Document;
+class KURL;
+
+class SecurityOrigin : public ThreadSafeShared<SecurityOrigin> {
+public:
+ static PassRefPtr<SecurityOrigin> createFromDatabaseIdentifier(const String&);
+ static PassRefPtr<SecurityOrigin> createFromString(const String&);
+ static PassRefPtr<SecurityOrigin> create(const KURL&, SandboxFlags = SandboxNone);
+ static PassRefPtr<SecurityOrigin> createEmpty();
+
+ // Create a deep copy of this SecurityOrigin. This method is useful
+ // when marshalling a SecurityOrigin to another thread.
+ PassRefPtr<SecurityOrigin> threadsafeCopy();
+
+ // Set the domain property of this security origin to newDomain. This
+ // function does not check whether newDomain is a suffix of the current
+ // domain. The caller is responsible for validating newDomain.
+ void setDomainFromDOM(const String& newDomain);
+ bool domainWasSetInDOM() const { return m_domainWasSetInDOM; }
+
+ static void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const String&);
+ static bool isDomainRelaxationForbiddenForURLScheme(const String&);
+
+ String protocol() const { return m_protocol; }
+ String host() const { return m_host; }
+ String domain() const { return m_domain; }
+ unsigned short port() const { return m_port; }
+
+ // Returns true if this SecurityOrigin can script objects in the given
+ // SecurityOrigin. For example, call this function before allowing
+ // script from one security origin to read or write objects from
+ // another SecurityOrigin.
+ bool canAccess(const SecurityOrigin*) const;
+
+ // Returns true if this SecurityOrigin can read content retrieved from
+ // the given URL. For example, call this function before issuing
+ // XMLHttpRequests.
+ bool canRequest(const KURL&) const;
+
+ // Returns true if drawing an image from this URL taints a canvas from
+ // this security origin. For example, call this function before
+ // drawing an image onto an HTML canvas element with the drawImage API.
+ bool taintsCanvas(const KURL&) const;
+
+ // Returns true for any non-local URL. If document parameter is supplied,
+ // its local load policy dictates, otherwise if referrer is non-empty and
+ // represents a local file, then the local load is allowed.
+ static bool canLoad(const KURL&, const String& referrer, Document* document);
+
+ // Returns true if this SecurityOrigin can load local resources, such
+ // as images, iframes, and style sheets, and can link to local URLs.
+ // For example, call this function before creating an iframe to a
+ // file:// URL.
+ //
+ // Note: A SecurityOrigin might be allowed to load local resources
+ // without being able to issue an XMLHttpRequest for a local URL.
+ // To determine whether the SecurityOrigin can issue an
+ // XMLHttpRequest for a URL, call canRequest(url).
+ bool canLoadLocalResources() const { return m_canLoadLocalResources; }
+
+ // Explicitly grant the ability to load local resources to this
+ // SecurityOrigin.
+ //
+ // Note: This method exists only to support backwards compatibility
+ // with older versions of WebKit.
+ void grantLoadLocalResources();
+
+ // Explicitly grant the ability to access very other SecurityOrigin.
+ //
+ // WARNING: This is an extremely powerful ability. Use with caution!
+ void grantUniversalAccess();
+
+ void setSandboxFlags(SandboxFlags);
+ bool isSandboxed(SandboxFlags mask) const { return m_sandboxFlags & mask; }
+
+ bool canAccessDatabase() const { return !isUnique(); }
+ bool canAccessStorage() const { return !isUnique(); }
+ bool canAccessCookies() const { return !isUnique(); }
+
+ bool isSecureTransitionTo(const KURL&) const;
+
+ // The local SecurityOrigin is the most privileged SecurityOrigin.
+ // The local SecurityOrigin can script any document, navigate to local
+ // resources, and can set arbitrary headers on XMLHttpRequests.
+ bool isLocal() const;
+
+ // The empty SecurityOrigin is the least privileged SecurityOrigin.
+ bool isEmpty() const;
+
+ // The origin is a globally unique identifier assigned when the Document is
+ // created. http://www.whatwg.org/specs/web-apps/current-work/#sandboxOrigin
+ //
+ // There's a subtle difference between a unique origin and an origin that
+ // has the SandboxOrigin flag set. The latter implies the former, and, in
+ // addition, the SandboxOrigin flag is inherited by iframes.
+ bool isUnique() const { return m_isUnique; }
+
+ // Convert this SecurityOrigin into a string. The string
+ // representation of a SecurityOrigin is similar to a URL, except it
+ // lacks a path component. The string representation does not encode
+ // the value of the SecurityOrigin's domain property.
+ //
+ // When using the string value, it's important to remember that it might be
+ // "null". This happens when this SecurityOrigin is unique. For example,
+ // this SecurityOrigin might have come from a sandboxed iframe, the
+ // SecurityOrigin might be empty, or we might have explicitly decided that
+ // we shouldTreatURLSchemeAsNoAccess.
+ String toString() const;
+
+ // Serialize the security origin to a string that could be used as part of
+ // file names. This format should be used in storage APIs only.
+ String databaseIdentifier() const;
+
+ // This method checks for equality between SecurityOrigins, not whether
+ // one origin can access another. It is used for hash table keys.
+ // For access checks, use canAccess().
+ // FIXME: If this method is really only useful for hash table keys, it
+ // should be refactored into SecurityOriginHash.
+ bool equal(const SecurityOrigin*) const;
+
+ // This method checks for equality, ignoring the value of document.domain
+ // (and whether it was set) but considering the host. It is used for postMessage.
+ bool isSameSchemeHostPort(const SecurityOrigin*) const;
+
+ static void registerURLSchemeAsLocal(const String&);
+ static void removeURLSchemeRegisteredAsLocal(const String&);
+ static const URLSchemesMap& localURLSchemes();
+ static bool shouldTreatURLAsLocal(const String&);
+ static bool shouldTreatURLSchemeAsLocal(const String&);
+
+ static bool shouldHideReferrer(const KURL&, const String& referrer);
+
+ enum LocalLoadPolicy {
+ AllowLocalLoadsForAll, // No restriction on local loads.
+ AllowLocalLoadsForLocalAndSubstituteData,
+ AllowLocalLoadsForLocalOnly,
};
+ static void setLocalLoadPolicy(LocalLoadPolicy);
+ static bool restrictAccessToLocal();
+ static bool allowSubstituteDataAccessToLocal();
+
+ static void registerURLSchemeAsNoAccess(const String&);
+ static bool shouldTreatURLSchemeAsNoAccess(const String&);
+
+ static void whiteListAccessFromOrigin(const SecurityOrigin& sourceOrigin, const String& destinationProtocol, const String& destinationDomains, bool allowDestinationSubdomains);
+ static void resetOriginAccessWhiteLists();
+
+private:
+ SecurityOrigin(const KURL&, SandboxFlags);
+ explicit SecurityOrigin(const SecurityOrigin*);
+
+ SandboxFlags m_sandboxFlags;
+ String m_protocol;
+ String m_host;
+ String m_domain;
+ unsigned short m_port;
+ bool m_isUnique;
+ bool m_universalAccess;
+ bool m_domainWasSetInDOM;
+ bool m_canLoadLocalResources;
+};
} // namespace WebCore
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index b250e4d..e57fccf 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -26,6 +26,7 @@
#include "config.h"
#include "Settings.h"
+#include "BackForwardList.h"
#include "Frame.h"
#include "FrameTree.h"
#include "FrameView.h"
@@ -48,7 +49,7 @@ static void setNeedsReapplyStylesInAllFrames(Page* page)
bool Settings::gShouldPaintNativeControls = true;
#endif
-#if PLATFORM(WIN) || (PLATFORM(WIN_OS) && PLATFORM(WX))
+#if PLATFORM(WIN) || (OS(WINDOWS) && PLATFORM(WX))
bool Settings::gShouldUseHighResolutionTimers = true;
#endif
@@ -79,6 +80,7 @@ Settings::Settings(Page* page)
, m_loadsImagesAutomatically(false)
, m_privateBrowsingEnabled(false)
, m_caretBrowsingEnabled(false)
+ , m_areImagesEnabled(true)
, m_arePluginsEnabled(false)
, m_databasesEnabled(false)
, m_localStorageEnabled(false)
@@ -115,7 +117,7 @@ Settings::Settings(Page* page)
, m_usesEncodingDetector(false)
, m_allowScriptsToCloseWindows(false)
, m_editingBehavior(
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
// (PLATFORM(MAC) is always false in Chromium, hence the extra condition.)
EditingMacBehavior
#else
@@ -132,6 +134,7 @@ Settings::Settings(Page* page)
, m_experimentalNotificationsEnabled(false)
, m_webGLEnabled(false)
, m_geolocationEnabled(true)
+ , m_loadDeferringEnabled(true)
{
// A Frame may not have been created yet, so we initialize the AtomicString
// hash before trying to use it.
@@ -263,6 +266,11 @@ void Settings::setJavaEnabled(bool isJavaEnabled)
m_isJavaEnabled = isJavaEnabled;
}
+void Settings::setImagesEnabled(bool areImagesEnabled)
+{
+ m_areImagesEnabled = areImagesEnabled;
+}
+
void Settings::setPluginsEnabled(bool arePluginsEnabled)
{
m_arePluginsEnabled = arePluginsEnabled;
@@ -727,7 +735,7 @@ void Settings::setPluginAllowedRunTime(unsigned runTime)
m_page->pluginAllowedRunTimeChanged();
}
-#if PLATFORM(WIN) || (PLATFORM(WIN_OS) && PLATFORM(WX))
+#if PLATFORM(WIN) || (OS(WINDOWS) && PLATFORM(WX))
void Settings::setShouldUseHighResolutionTimers(bool shouldUseHighResolutionTimers)
{
gShouldUseHighResolutionTimers = shouldUseHighResolutionTimers;
@@ -744,4 +752,9 @@ void Settings::setGeolocationEnabled(bool enabled)
m_geolocationEnabled = enabled;
}
+void Settings::setLoadDeferringEnabled(bool enabled)
+{
+ m_loadDeferringEnabled = enabled;
+}
+
} // namespace WebCore
diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h
index fbb70b0..8a553de 100644
--- a/WebCore/page/Settings.h
+++ b/WebCore/page/Settings.h
@@ -117,6 +117,8 @@ namespace WebCore {
void setDefaultFixedFontSize(int);
int defaultFixedFontSize() const { return m_defaultFixedFontSize; }
+ // Unlike areImagesEnabled, this only suppresses the network load of
+ // the image URL. A cached image will still be rendered if requested.
void setLoadsImagesAutomatically(bool);
bool loadsImagesAutomatically() const { return m_loadsImagesAutomatically; }
@@ -139,6 +141,9 @@ namespace WebCore {
void setJavaEnabled(bool);
bool isJavaEnabled() const { return m_isJavaEnabled; }
+ void setImagesEnabled(bool);
+ bool areImagesEnabled() const { return m_areImagesEnabled; }
+
void setPluginsEnabled(bool);
bool arePluginsEnabled() const { return m_arePluginsEnabled; }
@@ -323,7 +328,7 @@ namespace WebCore {
void setExperimentalNotificationsEnabled(bool);
bool experimentalNotificationsEnabled() const { return m_experimentalNotificationsEnabled; }
-#if PLATFORM(WIN) || (PLATFORM(WIN_OS) && PLATFORM(WX))
+#if PLATFORM(WIN) || (OS(WINDOWS) && PLATFORM(WX))
static void setShouldUseHighResolutionTimers(bool);
static bool shouldUseHighResolutionTimers() { return gShouldUseHighResolutionTimers; }
#endif
@@ -337,6 +342,9 @@ namespace WebCore {
void setGeolocationEnabled(bool);
bool geolocationEnabled() const { return m_geolocationEnabled; }
+ void setLoadDeferringEnabled(bool);
+ bool loadDeferringEnabled() const { return m_loadDeferringEnabled; }
+
private:
Page* m_page;
@@ -400,6 +408,7 @@ namespace WebCore {
bool m_loadsImagesAutomatically : 1;
bool m_privateBrowsingEnabled : 1;
bool m_caretBrowsingEnabled : 1;
+ bool m_areImagesEnabled : 1;
bool m_arePluginsEnabled : 1;
bool m_databasesEnabled : 1;
bool m_localStorageEnabled : 1;
@@ -444,11 +453,12 @@ namespace WebCore {
bool m_experimentalNotificationsEnabled : 1;
bool m_webGLEnabled : 1;
bool m_geolocationEnabled : 1;
+ bool m_loadDeferringEnabled : 1;
#if USE(SAFARI_THEME)
static bool gShouldPaintNativeControls;
#endif
-#if PLATFORM(WIN) || (PLATFORM(WIN_OS) && PLATFORM(WX))
+#if PLATFORM(WIN) || (OS(WINDOWS) && PLATFORM(WX))
static bool gShouldUseHighResolutionTimers;
#endif
};
diff --git a/WebCore/page/WebKitPoint.idl b/WebCore/page/WebKitPoint.idl
index 1eefbc3..fd617b2 100644
--- a/WebCore/page/WebKitPoint.idl
+++ b/WebCore/page/WebKitPoint.idl
@@ -25,7 +25,7 @@
module window {
- interface WebKitPoint {
+ interface [CustomConstructor] WebKitPoint {
attribute float x;
attribute float y;
};
diff --git a/WebCore/page/WorkerNavigator.idl b/WebCore/page/WorkerNavigator.idl
index 195f0bc..ec75f8a 100644
--- a/WebCore/page/WorkerNavigator.idl
+++ b/WebCore/page/WorkerNavigator.idl
@@ -30,7 +30,8 @@ module threads {
interface [
Conditional=WORKERS,
- NoStaticTables
+ NoStaticTables,
+ OmitConstructor
] WorkerNavigator {
readonly attribute DOMString appName;
readonly attribute DOMString appVersion;
diff --git a/WebCore/page/XSSAuditor.cpp b/WebCore/page/XSSAuditor.cpp
index 72c2591..0129b52 100644
--- a/WebCore/page/XSSAuditor.cpp
+++ b/WebCore/page/XSSAuditor.cpp
@@ -105,7 +105,12 @@ bool XSSAuditor::canEvaluate(const String& code) const
if (!isEnabled())
return true;
- if (findInRequest(code, false, true)) {
+ FindTask task;
+ task.string = code;
+ task.decodeEntities = false;
+ task.allowRequestIfNoIllegalURICharacters = true;
+
+ if (findInRequest(task)) {
DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to execute a JavaScript script. Source code of script found within request.\n"));
m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage, 1, String());
return false;
@@ -118,7 +123,11 @@ bool XSSAuditor::canEvaluateJavaScriptURL(const String& code) const
if (!isEnabled())
return true;
- if (findInRequest(code, true, false, true)) {
+ FindTask task;
+ task.string = code;
+ task.decodeURLEscapeSequencesTwice = true;
+
+ if (findInRequest(task)) {
DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to execute a JavaScript script. Source code of script found within request.\n"));
m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage, 1, String());
return false;
@@ -131,7 +140,11 @@ bool XSSAuditor::canCreateInlineEventListener(const String&, const String& code)
if (!isEnabled())
return true;
- if (findInRequest(code, true, true)) {
+ FindTask task;
+ task.string = code;
+ task.allowRequestIfNoIllegalURICharacters = true;
+
+ if (findInRequest(task)) {
DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to execute a JavaScript script. Source code of script found within request.\n"));
m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage, 1, String());
return false;
@@ -147,7 +160,11 @@ bool XSSAuditor::canLoadExternalScriptFromSrc(const String& context, const Strin
if (isSameOriginResource(url))
return true;
- if (findInRequest(context + url)) {
+ FindTask task;
+ task.context = context;
+ task.string = url;
+
+ if (findInRequest(task)) {
DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to execute a JavaScript script. Source code of script found within request.\n"));
m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage, 1, String());
return false;
@@ -163,7 +180,11 @@ bool XSSAuditor::canLoadObject(const String& url) const
if (isSameOriginResource(url))
return true;
- if (findInRequest(url)) {
+ FindTask task;
+ task.string = url;
+ task.allowRequestIfNoIllegalURICharacters = true;
+
+ if (findInRequest(task)) {
String consoleMessage = String::format("Refused to load an object. URL found within request: \"%s\".\n", url.utf8().data());
m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage, 1, String());
return false;
@@ -179,7 +200,11 @@ bool XSSAuditor::canSetBaseElementURL(const String& url) const
if (isSameOriginResource(url))
return true;
- if (findInRequest(url)) {
+ FindTask task;
+ task.string = url;
+ task.allowRequestIfNoIllegalURICharacters = true;
+
+ if (findInRequest(task)) {
DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to load from document base URL. URL found within request.\n"));
m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage, 1, String());
return false;
@@ -265,20 +290,18 @@ bool XSSAuditor::isSameOriginResource(const String& url) const
return (m_frame->document()->url().host() == resourceURL.host() && resourceURL.query().isEmpty());
}
-bool XSSAuditor::findInRequest(const String& string, bool decodeEntities, bool allowRequestIfNoIllegalURICharacters,
- bool decodeURLEscapeSequencesTwice) const
+bool XSSAuditor::findInRequest(const FindTask& task) const
{
bool result = false;
Frame* parentFrame = m_frame->tree()->parent();
if (parentFrame && m_frame->document()->url() == blankURL())
- result = findInRequest(parentFrame, string, decodeEntities, allowRequestIfNoIllegalURICharacters, decodeURLEscapeSequencesTwice);
+ result = findInRequest(parentFrame, task);
if (!result)
- result = findInRequest(m_frame, string, decodeEntities, allowRequestIfNoIllegalURICharacters, decodeURLEscapeSequencesTwice);
+ result = findInRequest(m_frame, task);
return result;
}
-bool XSSAuditor::findInRequest(Frame* frame, const String& string, bool decodeEntities, bool allowRequestIfNoIllegalURICharacters,
- bool decodeURLEscapeSequencesTwice) const
+bool XSSAuditor::findInRequest(Frame* frame, const FindTask& task) const
{
ASSERT(frame->document());
@@ -287,17 +310,19 @@ bool XSSAuditor::findInRequest(Frame* frame, const String& string, bool decodeEn
return false;
}
- if (string.isEmpty())
+ if (task.string.isEmpty())
return false;
FormData* formDataObj = frame->loader()->documentLoader()->originalRequest().httpBody();
+ const bool hasFormData = formDataObj && !formDataObj->isEmpty();
String pageURL = frame->document()->url().string();
- if (!formDataObj && string.length() >= 2 * pageURL.length()) {
+ String canonicalizedString;
+ if (!hasFormData && task.string.length() > 2 * pageURL.length()) {
// Q: Why do we bother to do this check at all?
// A: Canonicalizing large inline scripts can be expensive. We want to
- // bail out before the call to canonicalize below, which could
- // result in an unneeded allocation and memcpy.
+ // reduce the size of the string before we call canonicalize below,
+ // since it could result in an unneeded allocation and memcpy.
//
// Q: Why do we multiply by two here?
// A: We attempt to detect reflected XSS even when the server
@@ -305,39 +330,32 @@ bool XSSAuditor::findInRequest(Frame* frame, const String& string, bool decodeEn
// attacker can do get the server to inflate his/her input by a
// factor of two by sending " characters, which the server
// transforms to \".
- return false;
- }
+ canonicalizedString = task.string.substring(0, 2 * pageURL.length());
+ } else
+ canonicalizedString = task.string;
if (frame->document()->url().protocolIs("data"))
return false;
- String canonicalizedString = canonicalize(string);
+ canonicalizedString = canonicalize(canonicalizedString);
if (canonicalizedString.isEmpty())
return false;
- if (string.length() < pageURL.length()) {
- // The string can actually fit inside the pageURL.
- String decodedPageURL = m_cache.canonicalizeURL(pageURL, frame->document()->decoder()->encoding(), decodeEntities, decodeURLEscapeSequencesTwice);
+ if (!task.context.isEmpty())
+ canonicalizedString = task.context + canonicalizedString;
- if (allowRequestIfNoIllegalURICharacters && (!formDataObj || formDataObj->isEmpty())
- && decodedPageURL.find(&isIllegalURICharacter, 0) == -1)
- return false; // Injection is impossible because the request does not contain any illegal URI characters.
+ String decodedPageURL = m_cache.canonicalizeURL(pageURL, frame->document()->decoder()->encoding(), task.decodeEntities, task.decodeURLEscapeSequencesTwice);
- if (decodedPageURL.find(canonicalizedString, 0, false) != -1)
- return true; // We've found the smoking gun.
- }
+ if (task.allowRequestIfNoIllegalURICharacters && !hasFormData && decodedPageURL.find(&isIllegalURICharacter, 0) == -1)
+ return false; // Injection is impossible because the request does not contain any illegal URI characters.
- if (formDataObj && !formDataObj->isEmpty()) {
- String formData = formDataObj->flattenToString();
- if (string.length() < formData.length()) {
- // Notice it is sufficient to compare the length of the string to
- // the url-encoded POST data because the length of the url-decoded
- // code is less than or equal to the length of the url-encoded
- // string.
- String decodedFormData = m_cache.canonicalizeURL(formData, frame->document()->decoder()->encoding(), decodeEntities, decodeURLEscapeSequencesTwice);
- if (decodedFormData.find(canonicalizedString, 0, false) != -1)
- return true; // We found the string in the POST data.
- }
+ if (decodedPageURL.find(canonicalizedString, 0, false) != -1)
+ return true; // We've found the string in the GET data.
+
+ if (hasFormData) {
+ String decodedFormData = m_cache.canonicalizeURL(formDataObj->flattenToString(), frame->document()->decoder()->encoding(), task.decodeEntities, task.decodeURLEscapeSequencesTwice);
+ if (decodedFormData.find(canonicalizedString, 0, false) != -1)
+ return true; // We found the string in the POST data.
}
return false;
diff --git a/WebCore/page/XSSAuditor.h b/WebCore/page/XSSAuditor.h
index b64665b..d976f52 100644
--- a/WebCore/page/XSSAuditor.h
+++ b/WebCore/page/XSSAuditor.h
@@ -120,16 +120,29 @@ namespace WebCore {
String m_cachedCanonicalizedURL;
};
+ struct FindTask {
+ FindTask()
+ : decodeEntities(true)
+ , allowRequestIfNoIllegalURICharacters(false)
+ , decodeURLEscapeSequencesTwice(false)
+ {
+ }
+
+ String context;
+ String string;
+ bool decodeEntities;
+ bool allowRequestIfNoIllegalURICharacters;
+ bool decodeURLEscapeSequencesTwice;
+ };
+
static String canonicalize(const String&);
static String decodeURL(const String& url, const TextEncoding& encoding, bool decodeEntities,
bool decodeURLEscapeSequencesTwice = false);
static String decodeHTMLEntities(const String&, bool leaveUndecodableEntitiesUntouched = true);
bool isSameOriginResource(const String& url) const;
- bool findInRequest(const String&, bool decodeEntities = true, bool allowRequestIfNoIllegalURICharacters = false,
- bool decodeURLEscapeSequencesTwice = false) const;
- bool findInRequest(Frame*, const String&, bool decodeEntities = true, bool allowRequestIfNoIllegalURICharacters = false,
- bool decodeURLEscapeSequencesTwice = false) const;
+ bool findInRequest(const FindTask&) const;
+ bool findInRequest(Frame*, const FindTask&) const;
// The frame to audit.
Frame* m_frame;
diff --git a/WebCore/page/animation/AnimationBase.cpp b/WebCore/page/animation/AnimationBase.cpp
index f1ee750..2a2ab4b 100644
--- a/WebCore/page/animation/AnimationBase.cpp
+++ b/WebCore/page/animation/AnimationBase.cpp
@@ -92,10 +92,17 @@ static inline Color blendFunc(const AnimationBase* anim, const Color& from, cons
if (progress == 1 && !to.isValid())
return Color();
- return Color(blendFunc(anim, from.red(), to.red(), progress),
- blendFunc(anim, from.green(), to.green(), progress),
- blendFunc(anim, from.blue(), to.blue(), progress),
- blendFunc(anim, from.alpha(), to.alpha(), progress));
+ // Contrary to the name, RGBA32 actually stores ARGB, so we can initialize Color directly from premultipliedARGBFromColor().
+ // Also, premultipliedARGBFromColor() bails on zero alpha, so special-case that.
+ Color premultFrom = from.alpha() ? premultipliedARGBFromColor(from) : 0;
+ Color premultTo = to.alpha() ? premultipliedARGBFromColor(to) : 0;
+
+ Color premultBlended(blendFunc(anim, premultFrom.red(), premultTo.red(), progress),
+ blendFunc(anim, premultFrom.green(), premultTo.green(), progress),
+ blendFunc(anim, premultFrom.blue(), premultTo.blue(), progress),
+ blendFunc(anim, premultFrom.alpha(), premultTo.alpha(), progress));
+
+ return Color(colorFromPremultipliedARGB(premultBlended.rgb()));
}
static inline Length blendFunc(const AnimationBase*, const Length& from, const Length& to, double progress)
@@ -407,7 +414,7 @@ public:
};
template <typename T>
-class FillLayerPropertyWrapperGetter : public FillLayerPropertyWrapperBase {
+class FillLayerPropertyWrapperGetter : public FillLayerPropertyWrapperBase, public Noncopyable {
public:
FillLayerPropertyWrapperGetter(T (FillLayer::*getter)() const)
: m_getter(getter)
@@ -863,7 +870,7 @@ void AnimationBase::updateStateMachine(AnimStateInput input, double param)
m_pauseTime = -1;
m_requestedStartTime = 0;
m_nextIterationDuration = -1;
- endAnimation(false);
+ endAnimation();
return;
}
@@ -875,7 +882,7 @@ void AnimationBase::updateStateMachine(AnimStateInput input, double param)
m_pauseTime = -1;
m_requestedStartTime = 0;
m_nextIterationDuration = -1;
- endAnimation(false);
+ endAnimation();
if (!paused())
updateStateMachine(AnimationStateInputStartAnimation, -1);
@@ -886,7 +893,7 @@ void AnimationBase::updateStateMachine(AnimStateInput input, double param)
if (m_animState == AnimationStateStartWaitStyleAvailable)
m_compAnim->animationController()->removeFromStyleAvailableWaitList(this);
m_animState = AnimationStateDone;
- endAnimation(true);
+ endAnimation();
return;
}
@@ -894,7 +901,7 @@ void AnimationBase::updateStateMachine(AnimStateInput input, double param)
if (m_animState == AnimationStateStartWaitResponse) {
// If we are in AnimationStateStartWaitResponse, the animation will get canceled before
// we get a response, so move to the next state.
- endAnimation(false);
+ endAnimation();
updateStateMachine(AnimationStateInputStartTimeSet, beginAnimationUpdateTime());
}
return;
@@ -903,7 +910,7 @@ void AnimationBase::updateStateMachine(AnimStateInput input, double param)
if (input == AnimationStateInputResumeOverride) {
if (m_animState == AnimationStateLooping || m_animState == AnimationStateEnding) {
// Start the animation
- startAnimation(m_startTime);
+ startAnimation(beginAnimationUpdateTime() - m_startTime);
}
return;
}
@@ -956,7 +963,12 @@ void AnimationBase::updateStateMachine(AnimStateInput input, double param)
updateStateMachine(AnimationStateInputStartTimeSet, beginAnimationUpdateTime());
}
else {
- bool started = startAnimation(0);
+ double timeOffset = 0;
+ // If the value for 'animation-delay' is negative then the animation appears to have started in the past.
+ if (m_animation->delay() < 0)
+ timeOffset = -m_animation->delay();
+ bool started = startAnimation(timeOffset);
+
m_compAnim->animationController()->addToStartTimeResponseWaitList(this, started);
m_fallbackAnimating = !started;
}
@@ -967,8 +979,12 @@ void AnimationBase::updateStateMachine(AnimStateInput input, double param)
if (input == AnimationStateInputStartTimeSet) {
ASSERT(param >= 0);
// We have a start time, set it, unless the startTime is already set
- if (m_startTime <= 0)
+ if (m_startTime <= 0) {
m_startTime = param;
+ // If the value for 'animation-delay' is negative then the animation appears to have started in the past.
+ if (m_animation->delay() < 0)
+ m_startTime += m_animation->delay();
+ }
// Decide whether to go into looping or ending state
goIntoEndingOrLoopingState();
@@ -980,7 +996,7 @@ void AnimationBase::updateStateMachine(AnimStateInput input, double param)
// We are pausing while waiting for a start response. Cancel the animation and wait. When
// we unpause, we will act as though the start timer just fired
m_pauseTime = -1;
- endAnimation(false);
+ pauseAnimation(beginAnimationUpdateTime() - m_startTime);
m_animState = AnimationStatePausedWaitResponse;
}
break;
@@ -997,7 +1013,7 @@ void AnimationBase::updateStateMachine(AnimStateInput input, double param)
} else {
// We are pausing while running. Cancel the animation and wait
m_pauseTime = beginAnimationUpdateTime();
- endAnimation(false);
+ pauseAnimation(beginAnimationUpdateTime() - m_startTime);
m_animState = AnimationStatePausedRun;
}
break;
@@ -1020,7 +1036,7 @@ void AnimationBase::updateStateMachine(AnimStateInput input, double param)
} else {
// We are pausing while running. Cancel the animation and wait
m_pauseTime = beginAnimationUpdateTime();
- endAnimation(false);
+ pauseAnimation(beginAnimationUpdateTime() - m_startTime);
m_animState = AnimationStatePausedRun;
}
// |this| may be deleted here
@@ -1072,7 +1088,7 @@ void AnimationBase::updateStateMachine(AnimStateInput input, double param)
updateStateMachine(AnimationStateInputStartTimeSet, beginAnimationUpdateTime());
m_fallbackAnimating = true;
} else {
- bool started = startAnimation(m_startTime);
+ bool started = startAnimation(beginAnimationUpdateTime() - m_startTime);
m_compAnim->animationController()->addToStartTimeResponseWaitList(this, started);
m_fallbackAnimating = !started;
}
diff --git a/WebCore/page/animation/AnimationBase.h b/WebCore/page/animation/AnimationBase.h
index 3482f65..c367e0a 100644
--- a/WebCore/page/animation/AnimationBase.h
+++ b/WebCore/page/animation/AnimationBase.h
@@ -186,8 +186,13 @@ protected:
virtual void onAnimationStart(double /*elapsedTime*/) { }
virtual void onAnimationIteration(double /*elapsedTime*/) { }
virtual void onAnimationEnd(double /*elapsedTime*/) { }
- virtual bool startAnimation(double /*beginTime*/) { return false; }
- virtual void endAnimation(bool /*reset*/) { }
+
+ // timeOffset is an offset from the current time when the animation should start. Negative values are OK.
+ // Return value indicates whether to expect an asynchronous notifyAnimationStarted() callback.
+ virtual bool startAnimation(double /*timeOffset*/) { return false; }
+ // timeOffset is the time at which the animation is being paused.
+ virtual void pauseAnimation(double /*timeOffset*/) { }
+ virtual void endAnimation() { }
void goIntoEndingOrLoopingState();
diff --git a/WebCore/page/animation/AnimationController.cpp b/WebCore/page/animation/AnimationController.cpp
index aa5de2c..422c154 100644
--- a/WebCore/page/animation/AnimationController.cpp
+++ b/WebCore/page/animation/AnimationController.cpp
@@ -484,7 +484,7 @@ PassRefPtr<RenderStyle> AnimationController::updateAnimations(RenderObject* rend
m_data->updateAnimationTimer();
if (blendedStyle != newStyle) {
- // If the animations/transitions change opacity or transform, we neeed to update
+ // If the animations/transitions change opacity or transform, we need to update
// the style to impose the stacking rules. Note that this is also
// done in CSSStyleSelector::adjustRenderStyle().
if (blendedStyle->hasAutoZIndex() && (blendedStyle->opacity() < 1.0f || blendedStyle->hasTransform()))
diff --git a/WebCore/page/animation/AnimationControllerPrivate.h b/WebCore/page/animation/AnimationControllerPrivate.h
index 7db3803..682dd75 100644
--- a/WebCore/page/animation/AnimationControllerPrivate.h
+++ b/WebCore/page/animation/AnimationControllerPrivate.h
@@ -49,7 +49,7 @@ class Node;
class RenderObject;
class RenderStyle;
-class AnimationControllerPrivate {
+class AnimationControllerPrivate : public Noncopyable {
public:
AnimationControllerPrivate(Frame*);
~AnimationControllerPrivate();
diff --git a/WebCore/page/animation/CompositeAnimation.cpp b/WebCore/page/animation/CompositeAnimation.cpp
index 8946d80..34f03c7 100644
--- a/WebCore/page/animation/CompositeAnimation.cpp
+++ b/WebCore/page/animation/CompositeAnimation.cpp
@@ -57,6 +57,7 @@ void CompositeAnimation::clearRenderer()
}
}
if (!m_keyframeAnimations.isEmpty()) {
+ m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
KeyframeAnimation* anim = it->second.get();
@@ -186,6 +187,8 @@ void CompositeAnimation::updateKeyframeAnimations(RenderObject* renderer, Render
if (m_keyframeAnimations.isEmpty() && !targetStyle->hasAnimations())
return;
+ m_keyframeAnimations.checkConsistency();
+
AnimationNameMap::const_iterator kfend = m_keyframeAnimations.end();
if (currentStyle && currentStyle->hasAnimations() && targetStyle->hasAnimations() && *(currentStyle->animations()) == *(targetStyle->animations())) {
@@ -262,6 +265,7 @@ PassRefPtr<RenderStyle> CompositeAnimation::animate(RenderObject* renderer, Rend
// We don't do any transitions if we don't have a currentStyle (on startup).
updateTransitions(renderer, currentStyle, targetStyle);
updateKeyframeAnimations(renderer, currentStyle, targetStyle);
+ m_keyframeAnimations.checkConsistency();
if (currentStyle) {
// Now that we have transition objects ready, let them know about the new goal state. We want them
@@ -295,6 +299,8 @@ PassRefPtr<RenderStyle> CompositeAnimation::getAnimatedStyle() const
implicitAnimation->getAnimatedStyle(resultStyle);
}
+ m_keyframeAnimations.checkConsistency();
+
for (Vector<AtomicStringImpl*>::const_iterator it = m_keyframeAnimationOrderMap.begin(); it != m_keyframeAnimationOrderMap.end(); ++it) {
RefPtr<KeyframeAnimation> keyframeAnimation = m_keyframeAnimations.get(*it);
if (keyframeAnimation)
@@ -315,6 +321,7 @@ void CompositeAnimation::setAnimating(bool animating)
}
}
if (!m_keyframeAnimations.isEmpty()) {
+ m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
KeyframeAnimation* anim = it->second.get();
@@ -341,6 +348,7 @@ double CompositeAnimation::timeToNextService() const
}
}
if (!m_keyframeAnimations.isEmpty()) {
+ m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
KeyframeAnimation* animation = it->second.get();
@@ -362,6 +370,7 @@ PassRefPtr<KeyframeAnimation> CompositeAnimation::getAnimationForProperty(int pr
// We want to send back the last animation with the property if there are multiples.
// So we need to iterate through all animations
if (!m_keyframeAnimations.isEmpty()) {
+ m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
RefPtr<KeyframeAnimation> anim = it->second;
@@ -381,6 +390,7 @@ void CompositeAnimation::suspendAnimations()
m_isSuspended = true;
if (!m_keyframeAnimations.isEmpty()) {
+ m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
if (KeyframeAnimation* anim = it->second.get())
@@ -405,6 +415,7 @@ void CompositeAnimation::resumeAnimations()
m_isSuspended = false;
if (!m_keyframeAnimations.isEmpty()) {
+ m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
KeyframeAnimation* anim = it->second.get();
@@ -450,6 +461,7 @@ void CompositeAnimation::resumeOverriddenImplicitAnimations(int property)
bool CompositeAnimation::isAnimatingProperty(int property, bool isRunningNow) const
{
if (!m_keyframeAnimations.isEmpty()) {
+ m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
KeyframeAnimation* anim = it->second.get();
@@ -474,6 +486,8 @@ bool CompositeAnimation::pauseAnimationAtTime(const AtomicString& name, double t
if (!name)
return false;
+ m_keyframeAnimations.checkConsistency();
+
RefPtr<KeyframeAnimation> keyframeAnim = m_keyframeAnimations.get(name.impl());
if (!keyframeAnim || !keyframeAnim->running())
return false;
@@ -509,6 +523,7 @@ unsigned CompositeAnimation::numberOfActiveAnimations() const
unsigned count = 0;
if (!m_keyframeAnimations.isEmpty()) {
+ m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
KeyframeAnimation* anim = it->second.get();
diff --git a/WebCore/page/animation/ImplicitAnimation.cpp b/WebCore/page/animation/ImplicitAnimation.cpp
index 50fc781..328fe0e 100644
--- a/WebCore/page/animation/ImplicitAnimation.cpp
+++ b/WebCore/page/animation/ImplicitAnimation.cpp
@@ -55,7 +55,7 @@ ImplicitAnimation::~ImplicitAnimation()
{
// // Make sure to tell the renderer that we are ending. This will make sure any accelerated animations are removed.
if (!postActive())
- endAnimation(true);
+ endAnimation();
}
bool ImplicitAnimation::shouldSendEventForListener(Document::ListenerType inListenerType) const
@@ -106,21 +106,21 @@ void ImplicitAnimation::getAnimatedStyle(RefPtr<RenderStyle>& animatedStyle)
blendProperties(this, m_animatingProperty, animatedStyle.get(), m_fromStyle.get(), m_toStyle.get(), progress(1, 0, 0));
}
-bool ImplicitAnimation::startAnimation(double beginTime)
+bool ImplicitAnimation::startAnimation(double timeOffset)
{
#if USE(ACCELERATED_COMPOSITING)
if (m_object && m_object->hasLayer()) {
RenderLayer* layer = toRenderBoxModelObject(m_object)->layer();
if (layer->isComposited())
- return layer->backing()->startTransition(beginTime, m_animatingProperty, m_fromStyle.get(), m_toStyle.get());
+ return layer->backing()->startTransition(timeOffset, m_animatingProperty, m_fromStyle.get(), m_toStyle.get());
}
#else
- UNUSED_PARAM(beginTime);
+ UNUSED_PARAM(timeOffset);
#endif
return false;
}
-void ImplicitAnimation::endAnimation(bool /*reset*/)
+void ImplicitAnimation::endAnimation()
{
#if USE(ACCELERATED_COMPOSITING)
if (m_object && m_object->hasLayer()) {
@@ -143,7 +143,7 @@ void ImplicitAnimation::onAnimationEnd(double elapsedTime)
keyframeAnim->setUnanimatedStyle(m_toStyle);
sendTransitionEvent(eventNames().webkitTransitionEndEvent, elapsedTime);
- endAnimation(true);
+ endAnimation();
}
bool ImplicitAnimation::sendTransitionEvent(const AtomicString& eventType, double elapsedTime)
@@ -161,7 +161,7 @@ bool ImplicitAnimation::sendTransitionEvent(const AtomicString& eventType, doubl
if (m_object->node() && m_object->node()->isElementNode())
element = static_cast<Element*>(m_object->node());
- ASSERT(!element || element->document() && !element->document()->inPageCache());
+ ASSERT(!element || (element->document() && !element->document()->inPageCache()));
if (!element)
return false;
diff --git a/WebCore/page/animation/ImplicitAnimation.h b/WebCore/page/animation/ImplicitAnimation.h
index 7e286d2..be5c197 100644
--- a/WebCore/page/animation/ImplicitAnimation.h
+++ b/WebCore/page/animation/ImplicitAnimation.h
@@ -47,8 +47,9 @@ public:
int animatingProperty() const { return m_animatingProperty; }
virtual void onAnimationEnd(double elapsedTime);
- virtual bool startAnimation(double beginTime);
- virtual void endAnimation(bool reset);
+ virtual bool startAnimation(double timeOffset);
+ virtual void pauseAnimation(double /*timeOffset*/) { }
+ virtual void endAnimation();
virtual void animate(CompositeAnimation*, RenderObject*, const RenderStyle* currentStyle, RenderStyle* targetStyle, RefPtr<RenderStyle>& animatedStyle);
virtual void getAnimatedStyle(RefPtr<RenderStyle>& animatedStyle);
diff --git a/WebCore/page/animation/KeyframeAnimation.cpp b/WebCore/page/animation/KeyframeAnimation.cpp
index 500bf6f..c5e3660 100644
--- a/WebCore/page/animation/KeyframeAnimation.cpp
+++ b/WebCore/page/animation/KeyframeAnimation.cpp
@@ -59,7 +59,7 @@ KeyframeAnimation::~KeyframeAnimation()
{
// Make sure to tell the renderer that we are ending. This will make sure any accelerated animations are removed.
if (!postActive())
- endAnimation(true);
+ endAnimation();
}
void KeyframeAnimation::getKeyframeAnimationInterval(const RenderStyle*& fromStyle, const RenderStyle*& toStyle, double& prog) const
@@ -192,40 +192,54 @@ bool KeyframeAnimation::hasAnimationForProperty(int property) const
return false;
}
-bool KeyframeAnimation::startAnimation(double beginTime)
+bool KeyframeAnimation::startAnimation(double timeOffset)
{
#if USE(ACCELERATED_COMPOSITING)
if (m_object && m_object->hasLayer()) {
RenderLayer* layer = toRenderBoxModelObject(m_object)->layer();
if (layer->isComposited())
- return layer->backing()->startAnimation(beginTime, m_animation.get(), m_keyframes);
+ return layer->backing()->startAnimation(timeOffset, m_animation.get(), m_keyframes);
}
#else
- UNUSED_PARAM(beginTime);
+ UNUSED_PARAM(timeOffset);
#endif
return false;
}
-void KeyframeAnimation::endAnimation(bool reset)
+void KeyframeAnimation::pauseAnimation(double timeOffset)
{
- if (m_object) {
+ if (!m_object)
+ return;
+
#if USE(ACCELERATED_COMPOSITING)
- if (m_object->hasLayer()) {
- RenderLayer* layer = toRenderBoxModelObject(m_object)->layer();
- if (layer->isComposited()) {
- if (reset)
- layer->backing()->animationFinished(m_keyframes.animationName());
- else
- layer->backing()->animationPaused(m_keyframes.animationName());
- }
- }
+ if (m_object->hasLayer()) {
+ RenderLayer* layer = toRenderBoxModelObject(m_object)->layer();
+ if (layer->isComposited())
+ layer->backing()->animationPaused(timeOffset, m_keyframes.animationName());
+ }
#else
- UNUSED_PARAM(reset);
+ UNUSED_PARAM(timeOffset);
#endif
- // Restore the original (unanimated) style
- if (!paused())
- setNeedsStyleRecalc(m_object->node());
+ // Restore the original (unanimated) style
+ if (!paused())
+ setNeedsStyleRecalc(m_object->node());
+}
+
+void KeyframeAnimation::endAnimation()
+{
+ if (!m_object)
+ return;
+
+#if USE(ACCELERATED_COMPOSITING)
+ if (m_object->hasLayer()) {
+ RenderLayer* layer = toRenderBoxModelObject(m_object)->layer();
+ if (layer->isComposited())
+ layer->backing()->animationFinished(m_keyframes.animationName());
}
+#endif
+ // Restore the original (unanimated) style
+ if (!paused())
+ setNeedsStyleRecalc(m_object->node());
}
bool KeyframeAnimation::shouldSendEventForListener(Document::ListenerType listenerType) const
@@ -246,7 +260,7 @@ void KeyframeAnimation::onAnimationIteration(double elapsedTime)
void KeyframeAnimation::onAnimationEnd(double elapsedTime)
{
sendAnimationEvent(eventNames().webkitAnimationEndEvent, elapsedTime);
- endAnimation(true);
+ endAnimation();
}
bool KeyframeAnimation::sendAnimationEvent(const AtomicString& eventType, double elapsedTime)
@@ -267,7 +281,7 @@ bool KeyframeAnimation::sendAnimationEvent(const AtomicString& eventType, double
if (m_object->node() && m_object->node()->isElementNode())
element = static_cast<Element*>(m_object->node());
- ASSERT(!element || element->document() && !element->document()->inPageCache());
+ ASSERT(!element || (element->document() && !element->document()->inPageCache()));
if (!element)
return false;
diff --git a/WebCore/page/animation/KeyframeAnimation.h b/WebCore/page/animation/KeyframeAnimation.h
index e3b8f53..fab0ae8 100644
--- a/WebCore/page/animation/KeyframeAnimation.h
+++ b/WebCore/page/animation/KeyframeAnimation.h
@@ -64,8 +64,9 @@ protected:
virtual void onAnimationStart(double elapsedTime);
virtual void onAnimationIteration(double elapsedTime);
virtual void onAnimationEnd(double elapsedTime);
- virtual bool startAnimation(double beginTime);
- virtual void endAnimation(bool reset);
+ virtual bool startAnimation(double timeOffset);
+ virtual void pauseAnimation(double timeOffset);
+ virtual void endAnimation();
virtual void overrideAnimations();
virtual void resumeOverriddenAnimations();
diff --git a/WebCore/page/chromium/DragControllerChromium.cpp b/WebCore/page/chromium/DragControllerChromium.cpp
index 18688fd..7b0958d 100644
--- a/WebCore/page/chromium/DragControllerChromium.cpp
+++ b/WebCore/page/chromium/DragControllerChromium.cpp
@@ -31,7 +31,7 @@
#include "SelectionController.h"
#include <wtf/RefPtr.h>
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include <windows.h>
#endif
@@ -57,7 +57,7 @@ DragOperation DragController::dragOperation(DragData* dragData)
bool DragController::isCopyKeyDown()
{
// FIXME: This should not be OS specific. Delegate to the embedder instead.
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
return ::GetAsyncKeyState(VK_CONTROL);
#else
return false;
diff --git a/WebCore/page/chromium/EventHandlerChromium.cpp b/WebCore/page/chromium/EventHandlerChromium.cpp
index ac76a29..ff161af 100644
--- a/WebCore/page/chromium/EventHandlerChromium.cpp
+++ b/WebCore/page/chromium/EventHandlerChromium.cpp
@@ -46,7 +46,7 @@
namespace WebCore {
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
const double EventHandler::TextDragDelay = 0.15;
#else
const double EventHandler::TextDragDelay = 0.0;
@@ -147,14 +147,14 @@ bool EventHandler::passWidgetMouseDownEventToWidget(RenderWidget* renderWidget)
unsigned EventHandler::accessKeyModifiers()
{
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
return PlatformKeyboardEvent::CtrlKey | PlatformKeyboardEvent::AltKey;
#else
return PlatformKeyboardEvent::AltKey;
#endif
}
-#if PLATFORM(LINUX)
+#if OS(LINUX)
// GTK+ must scroll horizontally if the mouse pointer is on top of the
// horizontal scrollbar while scrolling with the wheel.
// This code comes from gtk/EventHandlerGtk.cpp.
diff --git a/WebCore/page/chromium/FrameChromium.cpp b/WebCore/page/chromium/FrameChromium.cpp
index d79ae68..548e0fa 100644
--- a/WebCore/page/chromium/FrameChromium.cpp
+++ b/WebCore/page/chromium/FrameChromium.cpp
@@ -25,7 +25,6 @@
*/
#include "config.h"
-#include "FrameChromium.h"
#include "Document.h"
#include "FloatRect.h"
@@ -36,57 +35,6 @@ using std::min;
namespace WebCore {
-void computePageRectsForFrame(Frame* frame, const IntRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, Vector<IntRect>& pages, int& outPageHeight)
-{
- ASSERT(frame);
-
- pages.clear();
- outPageHeight = 0;
-
- if (!frame->document() || !frame->view() || !frame->document()->renderer())
- return;
-
- RenderView* root = toRenderView(frame->document()->renderer());
-
- if (!root) {
- LOG_ERROR("document to be printed has no renderer");
- return;
- }
-
- if (userScaleFactor <= 0) {
- LOG_ERROR("userScaleFactor has bad value %.2f", userScaleFactor);
- return;
- }
-
- float ratio = static_cast<float>(printRect.height()) / static_cast<float>(printRect.width());
-
- float pageWidth = static_cast<float>(root->rightLayoutOverflow());
- float pageHeight = pageWidth * ratio;
- outPageHeight = static_cast<int>(pageHeight); // this is the height of the page adjusted by margins
- pageHeight -= (headerHeight + footerHeight);
-
- if (pageHeight <= 0) {
- LOG_ERROR("pageHeight has bad value %.2f", pageHeight);
- return;
- }
-
- float currPageHeight = pageHeight / userScaleFactor;
- float docHeight = root->layer()->height();
- float currPageWidth = pageWidth / userScaleFactor;
-
-
- // always return at least one page, since empty files should print a blank page
- float printedPagesHeight = 0.0f;
- do {
- float proposedBottom = min(docHeight, printedPagesHeight + pageHeight);
- frame->view()->adjustPageHeight(&proposedBottom, printedPagesHeight, proposedBottom, printedPagesHeight);
- currPageHeight = max(1.0f, proposedBottom - printedPagesHeight);
-
- pages.append(IntRect(0, printedPagesHeight, currPageWidth, currPageHeight));
- printedPagesHeight += currPageHeight;
- } while (printedPagesHeight < docHeight);
-}
-
DragImageRef Frame::dragImageForSelection()
{
if (selection()->isRange())
diff --git a/WebCore/page/mac/ChromeMac.mm b/WebCore/page/mac/ChromeMac.mm
index 14c07de..d2ae39d 100644
--- a/WebCore/page/mac/ChromeMac.mm
+++ b/WebCore/page/mac/ChromeMac.mm
@@ -25,7 +25,6 @@
namespace WebCore {
-#if !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
void Chrome::focusNSView(NSView* view)
{
@@ -50,6 +49,4 @@ void Chrome::focusNSView(NSView* view)
END_BLOCK_OBJC_EXCEPTIONS;
}
-#endif
-
} // namespace WebCore
diff --git a/WebCore/page/mac/DragControllerMac.mm b/WebCore/page/mac/DragControllerMac.mm
index adf89fa..f080232 100644
--- a/WebCore/page/mac/DragControllerMac.mm
+++ b/WebCore/page/mac/DragControllerMac.mm
@@ -49,6 +49,11 @@ DragOperation DragController::dragOperation(DragData*)
return DragOperationNone;
}
+bool DragController::isCopyKeyDown()
+{
+ return false;
+}
+
#else
bool DragController::isCopyKeyDown()
diff --git a/WebCore/page/mac/EventHandlerMac.mm b/WebCore/page/mac/EventHandlerMac.mm
index 92895d9..91a2018 100644
--- a/WebCore/page/mac/EventHandlerMac.mm
+++ b/WebCore/page/mac/EventHandlerMac.mm
@@ -28,16 +28,18 @@
#include "AXObjectCache.h"
#include "BlockExceptions.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "ClipboardMac.h"
#include "DragController.h"
#include "EventNames.h"
#include "FocusController.h"
-#include "FrameLoader.h"
#include "Frame.h"
+#include "FrameLoader.h"
#include "FrameView.h"
#include "KeyboardEvent.h"
#include "MouseEventWithHitTestResults.h"
+#include "NotImplemented.h"
#include "Page.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformWheelEvent.h"
@@ -703,7 +705,7 @@ bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestR
return false;
}
-bool EventHandler::eventActivatedView(const PlatformMouseEvent& event) const
+bool EventHandler::eventActivatedView(const PlatformMouseEvent&) const
{
notImplemented();
return false;
diff --git a/WebCore/page/mac/FrameMac.mm b/WebCore/page/mac/FrameMac.mm
index fce5704..9e77387 100644
--- a/WebCore/page/mac/FrameMac.mm
+++ b/WebCore/page/mac/FrameMac.mm
@@ -143,7 +143,7 @@ static RegularExpression* regExpForLabels(NSArray* labels)
return result;
}
-NSString* Frame::searchForNSLabelsAboveCell(RegularExpression* regExp, HTMLTableCellElement* cell)
+NSString* Frame::searchForNSLabelsAboveCell(RegularExpression* regExp, HTMLTableCellElement* cell, size_t* resultDistanceFromStartOfCell)
{
RenderObject* cellRenderer = cell->renderer();
@@ -157,23 +157,30 @@ NSString* Frame::searchForNSLabelsAboveCell(RegularExpression* regExp, HTMLTable
if (aboveCell) {
// search within the above cell we found for a match
+ size_t lengthSearched = 0;
for (Node* n = aboveCell->firstChild(); n; n = n->traverseNextNode(aboveCell)) {
if (n->isTextNode() && n->renderer() && n->renderer()->style()->visibility() == VISIBLE) {
// For each text chunk, run the regexp
String nodeString = n->nodeValue();
int pos = regExp->searchRev(nodeString);
- if (pos >= 0)
+ if (pos >= 0) {
+ if (resultDistanceFromStartOfCell)
+ *resultDistanceFromStartOfCell = lengthSearched;
return nodeString.substring(pos, regExp->matchedLength());
+ }
+ lengthSearched += nodeString.length();
}
}
}
}
}
// Any reason in practice to search all cells in that are above cell?
+ if (resultDistanceFromStartOfCell)
+ *resultDistanceFromStartOfCell = notFound;
return nil;
}
-NSString* Frame::searchForLabelsBeforeElement(NSArray* labels, Element* element)
+NSString* Frame::searchForLabelsBeforeElement(NSArray* labels, Element* element, size_t* resultDistance, bool* resultIsInCellAbove)
{
RegularExpression* regExp = regExpForLabels(labels);
// We stop searching after we've seen this many chars
@@ -184,6 +191,11 @@ NSString* Frame::searchForLabelsBeforeElement(NSArray* labels, Element* element)
// If the starting element is within a table, the cell that contains it
HTMLTableCellElement* startingTableCell = 0;
bool searchedCellAbove = false;
+
+ if (resultDistance)
+ *resultDistance = notFound;
+ if (resultIsInCellAbove)
+ *resultIsInCellAbove = false;
// walk backwards in the node tree, until another element, or form, or end of tree
int unsigned lengthSearched = 0;
@@ -200,9 +212,12 @@ NSString* Frame::searchForLabelsBeforeElement(NSArray* labels, Element* element)
} else if (n->hasTagName(tdTag) && !startingTableCell) {
startingTableCell = static_cast<HTMLTableCellElement*>(n);
} else if (n->hasTagName(trTag) && startingTableCell) {
- NSString* result = searchForLabelsAboveCell(regExp, startingTableCell);
- if (result && [result length] > 0)
+ NSString* result = searchForLabelsAboveCell(regExp, startingTableCell, resultDistance);
+ if (result && [result length] > 0) {
+ if (resultIsInCellAbove)
+ *resultIsInCellAbove = true;
return result;
+ }
searchedCellAbove = true;
} else if (n->isTextNode() && n->renderer() && n->renderer()->style()->visibility() == VISIBLE) {
// For each text chunk, run the regexp
@@ -211,9 +226,11 @@ NSString* Frame::searchForLabelsBeforeElement(NSArray* labels, Element* element)
if (lengthSearched + nodeString.length() > maxCharsSearched)
nodeString = nodeString.right(charsSearchedThreshold - lengthSearched);
int pos = regExp->searchRev(nodeString);
- if (pos >= 0)
+ if (pos >= 0) {
+ if (resultDistance)
+ *resultDistance = lengthSearched;
return nodeString.substring(pos, regExp->matchedLength());
-
+ }
lengthSearched += nodeString.length();
}
}
@@ -221,33 +238,37 @@ NSString* Frame::searchForLabelsBeforeElement(NSArray* labels, Element* element)
// If we started in a cell, but bailed because we found the start of the form or the
// previous element, we still might need to search the row above us for a label.
if (startingTableCell && !searchedCellAbove) {
- NSString* result = searchForLabelsAboveCell(regExp, startingTableCell);
- if (result && [result length] > 0)
+ NSString* result = searchForLabelsAboveCell(regExp, startingTableCell, resultDistance);
+ if (result && [result length] > 0) {
+ if (resultIsInCellAbove)
+ *resultIsInCellAbove = true;
return result;
+ }
}
return nil;
}
-NSString* Frame::matchLabelsAgainstElement(NSArray* labels, Element* element)
+static NSString *matchLabelsAgainstString(NSArray *labels, const String& stringToMatch)
{
- String name = element->getAttribute(nameAttr);
- if (name.isEmpty())
+ if (stringToMatch.isEmpty())
return nil;
-
+
+ String mutableStringToMatch = stringToMatch;
+
// Make numbers and _'s in field names behave like word boundaries, e.g., "address2"
- replace(name, RegularExpression("\\d", TextCaseSensitive), " ");
- name.replace('_', ' ');
-
+ replace(mutableStringToMatch, RegularExpression("\\d", TextCaseSensitive), " ");
+ mutableStringToMatch.replace('_', ' ');
+
RegularExpression* regExp = regExpForLabels(labels);
- // Use the largest match we can find in the whole name string
+ // Use the largest match we can find in the whole string
int pos;
int length;
int bestPos = -1;
int bestLength = -1;
int start = 0;
do {
- pos = regExp->match(name, start);
+ pos = regExp->match(mutableStringToMatch, start);
if (pos != -1) {
length = regExp->matchedLength();
if (length >= bestLength) {
@@ -257,12 +278,25 @@ NSString* Frame::matchLabelsAgainstElement(NSArray* labels, Element* element)
start = pos + 1;
}
} while (pos != -1);
-
+
if (bestPos != -1)
- return name.substring(bestPos, bestLength);
+ return mutableStringToMatch.substring(bestPos, bestLength);
return nil;
}
+NSString* Frame::matchLabelsAgainstElement(NSArray* labels, Element* element)
+{
+ // Match against the name element, then against the id element if no match is found for the name element.
+ // See 7538330 for one popular site that benefits from the id element check.
+ // FIXME: This code is mirrored in Frame.cpp. It would be nice to make the Mac code call the platform-agnostic
+ // code, which would require converting the NSArray of NSStrings to a Vector of Strings somewhere along the way.
+ String resultFromNameAttribute = matchLabelsAgainstString(labels, element->getAttribute(nameAttr));
+ if (!resultFromNameAttribute.isEmpty())
+ return resultFromNameAttribute;
+
+ return matchLabelsAgainstString(labels, element->getAttribute(idAttr));
+}
+
NSImage* Frame::imageFromRect(NSRect rect) const
{
NSView* view = m_view->documentView();
diff --git a/WebCore/page/mac/WebCoreViewFactory.h b/WebCore/page/mac/WebCoreViewFactory.h
index 43f3f0a..fef856a 100644
--- a/WebCore/page/mac/WebCoreViewFactory.h
+++ b/WebCore/page/mac/WebCoreViewFactory.h
@@ -139,6 +139,8 @@
- (NSString *)AXCheckedCheckBoxActionVerb;
- (NSString *)AXUncheckedCheckBoxActionVerb;
- (NSString *)AXLinkActionVerb;
+- (NSString *)AXMenuListPopupActionVerb;
+- (NSString *)AXMenuListActionVerb;
- (NSString *)multipleFileUploadTextForNumberOfFiles:(unsigned)numberOfFiles;
// FTP Directory Related
diff --git a/WebCore/page/qt/DragControllerQt.cpp b/WebCore/page/qt/DragControllerQt.cpp
index e6c7682..33815b5 100644
--- a/WebCore/page/qt/DragControllerQt.cpp
+++ b/WebCore/page/qt/DragControllerQt.cpp
@@ -66,6 +66,7 @@ const IntSize& DragController::maxDragImageSize()
void DragController::cleanupAfterSystemDrag()
{
+ dragEnded();
}
}
diff --git a/WebCore/page/win/EventHandlerWin.cpp b/WebCore/page/win/EventHandlerWin.cpp
index 50e50fb..5511209 100644
--- a/WebCore/page/win/EventHandlerWin.cpp
+++ b/WebCore/page/win/EventHandlerWin.cpp
@@ -88,7 +88,7 @@ bool EventHandler::eventActivatedView(const PlatformMouseEvent& event) const
PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const
{
-#if PLATFORM(WINCE)
+#if OS(WINCE)
return 0;
#else
COMPtr<WCDataObject> dataObject;
diff --git a/WebCore/page/win/FrameCairoWin.cpp b/WebCore/page/win/FrameCairoWin.cpp
index f5b832e..3e1fe28 100644
--- a/WebCore/page/win/FrameCairoWin.cpp
+++ b/WebCore/page/win/FrameCairoWin.cpp
@@ -24,6 +24,7 @@
*/
#include "config.h"
+#include "Frame.h"
#include "FrameWin.h"
#include "EditorClient.h"
diff --git a/WebCore/page/win/FrameWin.h b/WebCore/page/win/FrameWin.h
index 2924291..9cf9683 100644
--- a/WebCore/page/win/FrameWin.h
+++ b/WebCore/page/win/FrameWin.h
@@ -26,13 +26,16 @@
#ifndef FrameWin_H
#define FrameWin_H
-#include "Frame.h"
+#include <wtf/Vector.h>
// Forward declared so we don't need wingdi.h.
typedef struct HBITMAP__* HBITMAP;
namespace WebCore {
+ class Frame;
+ class IntRect;
+
HBITMAP imageFromSelection(Frame* frame, bool forceWhiteText);
void computePageRectsForFrame(Frame*, const IntRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, Vector<IntRect>& pages, int& pageHeight);
diff --git a/WebCore/platform/ContextMenu.cpp b/WebCore/platform/ContextMenu.cpp
index 771798a..236279e 100644
--- a/WebCore/platform/ContextMenu.cpp
+++ b/WebCore/platform/ContextMenu.cpp
@@ -276,7 +276,9 @@ void ContextMenu::populate()
ContextMenuItem LookInDictionaryItem(ActionType, ContextMenuItemTagLookUpInDictionary,
contextMenuItemTagLookUpInDictionary());
#endif
+#if !PLATFORM(GTK)
ContextMenuItem SearchWebItem(ActionType, ContextMenuItemTagSearchWeb, contextMenuItemTagSearchWeb());
+#endif
ContextMenuItem CopyItem(ActionType, ContextMenuItemTagCopy, contextMenuItemTagCopy());
ContextMenuItem BackItem(ActionType, ContextMenuItemTagGoBack, contextMenuItemTagGoBack());
ContextMenuItem ForwardItem(ActionType, ContextMenuItemTagGoForward, contextMenuItemTagGoForward());
@@ -341,8 +343,10 @@ void ContextMenu::populate()
#if PLATFORM(MAC)
appendItem(SearchSpotlightItem);
#endif
+#if !PLATFORM(GTK)
appendItem(SearchWebItem);
appendItem(*separatorItem());
+#endif
#if PLATFORM(MAC)
appendItem(LookInDictionaryItem);
appendItem(*separatorItem());
@@ -445,8 +449,10 @@ void ContextMenu::populate()
#if PLATFORM(MAC)
appendItem(SearchSpotlightItem);
#endif
+#if !PLATFORM(GTK)
appendItem(SearchWebItem);
appendItem(*separatorItem());
+#endif
#if PLATFORM(MAC)
appendItem(LookInDictionaryItem);
@@ -466,10 +472,12 @@ void ContextMenu::populate()
if (!inPasswordField) {
appendItem(*separatorItem());
#ifndef BUILDING_ON_TIGER
+#if !PLATFORM(GTK)
ContextMenuItem SpellingAndGrammarMenuItem(SubmenuType, ContextMenuItemTagSpellingMenu,
contextMenuItemTagSpellingMenu());
createAndAppendSpellingAndGrammarSubMenu(m_hitTestResult, SpellingAndGrammarMenuItem);
appendItem(SpellingAndGrammarMenuItem);
+#endif
#else
ContextMenuItem SpellingMenuItem(SubmenuType, ContextMenuItemTagSpellingMenu,
contextMenuItemTagSpellingMenu());
@@ -486,10 +494,17 @@ void ContextMenu::populate()
createAndAppendTransformationsSubMenu(m_hitTestResult, transformationsMenuItem);
appendItem(transformationsMenuItem);
#endif
- ContextMenuItem FontMenuItem(SubmenuType, ContextMenuItemTagFontMenu,
- contextMenuItemTagFontMenu());
- createAndAppendFontSubMenu(m_hitTestResult, FontMenuItem);
- appendItem(FontMenuItem);
+#if PLATFORM(GTK)
+ bool shouldShowFontMenu = frame->editor()->canEditRichly();
+#else
+ bool shouldShowFontMenu = true;
+#endif
+ if (shouldShowFontMenu) {
+ ContextMenuItem FontMenuItem(SubmenuType, ContextMenuItemTagFontMenu,
+ contextMenuItemTagFontMenu());
+ createAndAppendFontSubMenu(m_hitTestResult, FontMenuItem);
+ appendItem(FontMenuItem);
+ }
#if PLATFORM(MAC)
ContextMenuItem SpeechMenuItem(SubmenuType, ContextMenuItemTagSpeechMenu, contextMenuItemTagSpeechMenu());
createAndAppendSpeechSubMenu(m_hitTestResult, SpeechMenuItem);
diff --git a/WebCore/platform/CrossThreadCopier.cpp b/WebCore/platform/CrossThreadCopier.cpp
index d02da6c..683ba54 100644
--- a/WebCore/platform/CrossThreadCopier.cpp
+++ b/WebCore/platform/CrossThreadCopier.cpp
@@ -32,6 +32,7 @@
#include "CrossThreadCopier.h"
+#include "KURL.h"
#include "PlatformString.h"
#include "ResourceError.h"
#include "ResourceRequest.h"
@@ -39,22 +40,27 @@
namespace WebCore {
-CrossThreadCopierBase<false, String>::Type CrossThreadCopierBase<false, String>::copy(const String& str)
+CrossThreadCopierBase<false, false, KURL>::Type CrossThreadCopierBase<false, false, KURL>::copy(const KURL& url)
+{
+ return url.copy();
+}
+
+CrossThreadCopierBase<false, false, String>::Type CrossThreadCopierBase<false, false, String>::copy(const String& str)
{
return str.crossThreadString();
}
-CrossThreadCopierBase<false, ResourceError>::Type CrossThreadCopierBase<false, ResourceError>::copy(const ResourceError& error)
+CrossThreadCopierBase<false, false, ResourceError>::Type CrossThreadCopierBase<false, false, ResourceError>::copy(const ResourceError& error)
{
return error.copy();
}
-CrossThreadCopierBase<false, ResourceRequest>::Type CrossThreadCopierBase<false, ResourceRequest>::copy(const ResourceRequest& request)
+CrossThreadCopierBase<false, false, ResourceRequest>::Type CrossThreadCopierBase<false, false, ResourceRequest>::copy(const ResourceRequest& request)
{
return request.copyData();
}
-CrossThreadCopierBase<false, ResourceResponse>::Type CrossThreadCopierBase<false, ResourceResponse>::copy(const ResourceResponse& response)
+CrossThreadCopierBase<false, false, ResourceResponse>::Type CrossThreadCopierBase<false, false, ResourceResponse>::copy(const ResourceResponse& response)
{
return response.copyData();
}
diff --git a/WebCore/platform/CrossThreadCopier.h b/WebCore/platform/CrossThreadCopier.h
index 2bdf57d..0a9aeeb 100644
--- a/WebCore/platform/CrossThreadCopier.h
+++ b/WebCore/platform/CrossThreadCopier.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -40,6 +40,7 @@
namespace WebCore {
+ class KURL;
class ResourceError;
class ResourceRequest;
class ResourceResponse;
@@ -56,29 +57,30 @@ namespace WebCore {
}
};
- template<bool isConvertibleToInteger, typename T> struct CrossThreadCopierBase;
+ template<bool isConvertibleToInteger, bool isThreadsafeShared, typename T> struct CrossThreadCopierBase;
// Integers get passed through without any changes.
- template<typename T> struct CrossThreadCopierBase<true, T> : public CrossThreadCopierPassThrough<T> {
+ template<typename T> struct CrossThreadCopierBase<true, false, T> : public CrossThreadCopierPassThrough<T> {
};
// Pointers get passed through without any significant changes.
- template<typename T> struct CrossThreadCopierBase<false, T*> : public CrossThreadCopierPassThrough<T*> {
+ template<typename T> struct CrossThreadCopierBase<false, false, T*> : public CrossThreadCopierPassThrough<T*> {
};
- template<> struct CrossThreadCopierBase<false, ThreadableLoaderOptions> : public CrossThreadCopierPassThrough<ThreadableLoaderOptions> {
+ template<> struct CrossThreadCopierBase<false, false, ThreadableLoaderOptions> : public CrossThreadCopierPassThrough<ThreadableLoaderOptions> {
};
// Custom copy methods.
- template<typename T> struct CrossThreadCopierBase<false, RefPtr<ThreadSafeShared<T> > > {
- typedef PassRefPtr<T> Type;
- static Type copy(const RefPtr<ThreadSafeShared<T> >& refPtr)
+ template<typename T> struct CrossThreadCopierBase<false, true, T> {
+ typedef typename WTF::RemoveTemplate<T, RefPtr>::Type RefCountedType;
+ typedef PassRefPtr<RefCountedType> Type;
+ static Type copy(const T& refPtr)
{
- return PassRefPtr<T>(static_cast<T*>(refPtr.get()));
+ return refPtr.get();
}
};
- template<typename T> struct CrossThreadCopierBase<false, PassOwnPtr<T> > {
+ template<typename T> struct CrossThreadCopierBase<false, false, PassOwnPtr<T> > {
typedef PassOwnPtr<T> Type;
static Type copy(const PassOwnPtr<T>& ownPtr)
{
@@ -86,7 +88,7 @@ namespace WebCore {
}
};
- template<typename T> struct CrossThreadCopierBase<false, std::auto_ptr<T> > {
+ template<typename T> struct CrossThreadCopierBase<false, false, std::auto_ptr<T> > {
typedef std::auto_ptr<T> Type;
static Type copy(const std::auto_ptr<T>& autoPtr)
{
@@ -94,27 +96,34 @@ namespace WebCore {
}
};
- template<> struct CrossThreadCopierBase<false, String> {
+ template<> struct CrossThreadCopierBase<false, false, KURL> {
+ typedef KURL Type;
+ static Type copy(const KURL&);
+ };
+
+ template<> struct CrossThreadCopierBase<false, false, String> {
typedef String Type;
static Type copy(const String&);
};
- template<> struct CrossThreadCopierBase<false, ResourceError> {
+ template<> struct CrossThreadCopierBase<false, false, ResourceError> {
typedef ResourceError Type;
static Type copy(const ResourceError&);
};
- template<> struct CrossThreadCopierBase<false, ResourceRequest> {
+ template<> struct CrossThreadCopierBase<false, false, ResourceRequest> {
typedef std::auto_ptr<CrossThreadResourceRequestData> Type;
static Type copy(const ResourceRequest&);
};
- template<> struct CrossThreadCopierBase<false, ResourceResponse> {
+ template<> struct CrossThreadCopierBase<false, false, ResourceResponse> {
typedef std::auto_ptr<CrossThreadResourceResponseData> Type;
static Type copy(const ResourceResponse&);
};
- template<typename T> struct CrossThreadCopier : public CrossThreadCopierBase<WTF::IsConvertibleToInteger<T>::value, T> {
+ template<typename T> struct CrossThreadCopier : public CrossThreadCopierBase<WTF::IsConvertibleToInteger<T>::value,
+ WTF::IsSubclassOfTemplate<typename WTF::RemoveTemplate<T, RefPtr>::Type, ThreadSafeShared>::value,
+ T> {
};
} // namespace WebCore
diff --git a/WebCore/platform/Cursor.h b/WebCore/platform/Cursor.h
index 2d041d2..ae8043e 100644
--- a/WebCore/platform/Cursor.h
+++ b/WebCore/platform/Cursor.h
@@ -56,6 +56,11 @@ class NSCursor;
class wxCursor;
#endif
+#if PLATFORM(WIN)
+typedef struct HICON__ *HICON;
+typedef HICON HCURSOR;
+#endif
+
namespace WebCore {
class Image;
@@ -65,7 +70,7 @@ namespace WebCore {
class SharedCursor : public RefCounted<SharedCursor> {
public:
static PassRefPtr<SharedCursor> create(HCURSOR nativeCursor) { return adoptRef(new SharedCursor(nativeCursor)); }
- ~SharedCursor() { DestroyIcon(m_nativeCursor); }
+ ~SharedCursor();
HCURSOR nativeCursor() const { return m_nativeCursor; }
private:
SharedCursor(HCURSOR nativeCursor) : m_nativeCursor(nativeCursor) { }
diff --git a/WebCore/platform/FileChooser.h b/WebCore/platform/FileChooser.h
index 1d4e970..0764a6a 100644
--- a/WebCore/platform/FileChooser.h
+++ b/WebCore/platform/FileChooser.h
@@ -42,6 +42,7 @@ class FileChooserClient {
public:
virtual void valueChanged() = 0;
virtual bool allowsMultipleFiles() = 0;
+ virtual String acceptTypes() = 0;
virtual ~FileChooserClient();
};
@@ -64,6 +65,8 @@ public:
void chooseFiles(const Vector<String>& paths);
bool allowsMultipleFiles() const { return m_client ? m_client->allowsMultipleFiles() : false; }
+ // Acceptable MIME types. It's an 'accept' attribute value of the corresponding INPUT element.
+ String acceptTypes() const { return m_client ? m_client->acceptTypes() : String(); }
private:
FileChooser(FileChooserClient*, const Vector<String>& initialFilenames);
diff --git a/WebCore/platform/FileSystem.h b/WebCore/platform/FileSystem.h
index 3220d51..c5395a9 100644
--- a/WebCore/platform/FileSystem.h
+++ b/WebCore/platform/FileSystem.h
@@ -54,7 +54,7 @@
typedef const struct __CFData* CFDataRef;
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// These are to avoid including <winbase.h> in a header for Chromium
typedef void *HANDLE;
// Assuming STRICT
@@ -67,7 +67,7 @@ namespace WebCore {
class CString;
// PlatformModule
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
typedef HMODULE PlatformModule;
#elif PLATFORM(QT)
#if defined(Q_WS_MAC)
@@ -84,7 +84,7 @@ typedef void* PlatformModule;
#endif
// PlatformModuleVersion
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
struct PlatformModuleVersion {
unsigned leastSig;
unsigned mostSig;
@@ -110,7 +110,7 @@ typedef unsigned PlatformModuleVersion;
#if PLATFORM(QT)
typedef QFile* PlatformFileHandle;
const PlatformFileHandle invalidPlatformFileHandle = 0;
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
typedef HANDLE PlatformFileHandle;
// FIXME: -1 is INVALID_HANDLE_VALUE, defined in <winbase.h>. Chromium tries to
// avoid using Windows headers in headers. We'd rather move this into the .cpp.
diff --git a/WebCore/platform/GeolocationService.cpp b/WebCore/platform/GeolocationService.cpp
index e60ef00..be9553b 100644
--- a/WebCore/platform/GeolocationService.cpp
+++ b/WebCore/platform/GeolocationService.cpp
@@ -34,7 +34,7 @@
namespace WebCore {
-#if !ENABLE(GEOLOCATION)
+#if !ENABLE(GEOLOCATION) || ENABLE(CLIENT_BASED_GEOLOCATION)
static GeolocationService* createGeolocationServiceNull(GeolocationServiceClient*)
{
return 0;
diff --git a/WebCore/platform/KURL.cpp b/WebCore/platform/KURL.cpp
index a8f7969..9783bd8 100644
--- a/WebCore/platform/KURL.cpp
+++ b/WebCore/platform/KURL.cpp
@@ -32,12 +32,16 @@
#include "CString.h"
#include "StringHash.h"
#include "TextEncoding.h"
+#include <wtf/HashMap.h>
#include <wtf/StdLibExtras.h>
#if USE(ICU_UNICODE)
#include <unicode/uidna.h>
#elif USE(QT4_UNICODE)
#include <QUrl>
+#elif USE(GLIB_UNICODE)
+#include <glib.h>
+#include <wtf/gtk/GOwnPtr.h>
#endif
#include <stdio.h>
@@ -214,6 +218,7 @@ static const unsigned char characterClassTable[256] = {
static int copyPathRemovingDots(char* dst, const char* src, int srcStart, int srcEnd);
static void encodeRelativeString(const String& rel, const TextEncoding&, CharBuffer& ouput);
static String substituteBackslashes(const String&);
+static bool isValidProtocol(const String&);
static inline bool isSchemeFirstChar(char c) { return characterClassTable[static_cast<unsigned char>(c)] & SchemeFirstChar; }
static inline bool isSchemeFirstChar(UChar c) { return c <= 0xff && (characterClassTable[c] & SchemeFirstChar); }
@@ -659,17 +664,22 @@ String KURL::path() const
return decodeURLEscapeSequences(m_string.substring(m_portEnd, m_pathEnd - m_portEnd));
}
-void KURL::setProtocol(const String& s)
+bool KURL::setProtocol(const String& s)
{
- // FIXME: Non-ASCII characters must be encoded and escaped to match parse() expectations,
- // and to avoid changing more than just the protocol.
+ // Firefox and IE remove everything after the first ':'.
+ int separatorPosition = s.find(':');
+ String newProtocol = s.substring(0, separatorPosition);
+
+ if (!isValidProtocol(newProtocol))
+ return false;
if (!m_isValid) {
- parse(s + ":" + m_string);
- return;
+ parse(newProtocol + ":" + m_string);
+ return true;
}
- parse(s + m_string.substring(m_schemeEnd));
+ parse(newProtocol + m_string.substring(m_schemeEnd));
+ return true;
}
void KURL::setHost(const String& s)
@@ -1404,6 +1414,19 @@ static void appendEncodedHostname(UCharBuffer& buffer, const UChar* str, unsigne
#elif USE(QT4_UNICODE)
QByteArray result = QUrl::toAce(String(str, strLen));
buffer.append(result.constData(), result.length());
+#elif USE(GLIB_UNICODE)
+ GOwnPtr<gchar> utf8Hostname;
+ GOwnPtr<GError> utf8Err;
+ utf8Hostname.set(g_utf16_to_utf8(str, strLen, 0, 0, &utf8Err.outPtr()));
+ if (utf8Err)
+ return;
+
+ GOwnPtr<gchar> encodedHostname;
+ encodedHostname.set(g_hostname_to_ascii(utf8Hostname.get()));
+ if (!encodedHostname)
+ return;
+
+ buffer.append(encodedHostname.get(), strlen(encodedHostname.get()));
#endif
}
@@ -1630,6 +1653,9 @@ bool protocolIsJavaScript(const String& url)
bool isValidProtocol(const String& protocol)
{
+ // RFC3986: ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
+ if (protocol.isEmpty())
+ return false;
if (!isSchemeFirstChar(protocol[0]))
return false;
unsigned protocolLength = protocol.length();
diff --git a/WebCore/platform/KURL.h b/WebCore/platform/KURL.h
index 647330d..6cd8f96 100644
--- a/WebCore/platform/KURL.h
+++ b/WebCore/platform/KURL.h
@@ -50,6 +50,10 @@ QT_END_NAMESPACE
#include "KURLGooglePrivate.h"
#endif
+#if USE(JSC)
+#include <runtime/UString.h>
+#endif
+
namespace WebCore {
class TextEncoding;
@@ -140,7 +144,7 @@ public:
bool protocolInHTTPFamily() const;
bool isLocalFile() const;
- void setProtocol(const String&);
+ bool setProtocol(const String&);
void setHost(const String&);
void removePort();
@@ -262,7 +266,6 @@ const KURL& blankURL();
bool protocolIs(const String& url, const char* protocol);
bool protocolIsJavaScript(const String& url);
-bool isValidProtocol(const String& protocol);
bool isDefaultPortForProtocol(unsigned short port, const String& protocol);
bool portAllowed(const KURL&); // Blacklist ports that should never be used for Web resources.
diff --git a/WebCore/platform/KURLGoogle.cpp b/WebCore/platform/KURLGoogle.cpp
index 76b5612..65ca346 100644
--- a/WebCore/platform/KURLGoogle.cpp
+++ b/WebCore/platform/KURLGoogle.cpp
@@ -44,6 +44,7 @@
#include "StringHash.h"
#include "NotImplemented.h"
#include "TextEncoding.h"
+#include <wtf/HashMap.h>
#include <wtf/Vector.h>
#include <wtf/StdLibExtras.h>
@@ -569,12 +570,13 @@ String KURL::path() const
return m_url.componentString(m_url.m_parsed.path);
}
-void KURL::setProtocol(const String& protocol)
+bool KURL::setProtocol(const String& protocol)
{
KURLGooglePrivate::Replacements replacements;
replacements.SetScheme(CharactersOrEmpty(protocol),
url_parse::Component(0, protocol.length()));
m_url.replaceComponents(replacements);
+ return true;
}
void KURL::setHost(const String& host)
@@ -733,18 +735,6 @@ bool protocolIsJavaScript(const String& url)
return protocolIs(url, "javascript");
}
-bool isValidProtocol(const String& protocol)
-{
- if (!isSchemeFirstChar(protocol[0]))
- return false;
- unsigned protocolLength = protocol.length();
- for (unsigned i = 1; i < protocolLength; i++) {
- if (!isSchemeChar(protocol[i]))
- return false;
- }
- return true;
-}
-
// We copied the KURL version here on Dec 4, 2009 while doing a WebKit
// merge.
//
diff --git a/WebCore/platform/KeyboardCodes.h b/WebCore/platform/KeyboardCodes.h
index 48582a8..04ee071 100644
--- a/WebCore/platform/KeyboardCodes.h
+++ b/WebCore/platform/KeyboardCodes.h
@@ -33,7 +33,7 @@
// FIXME: We should get rid of these Chromium-related ifdefs.
#if PLATFORM(CHROMIUM)
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include "KeyboardCodesWin.h"
#else
#include "KeyboardCodesPosix.h"
@@ -43,7 +43,7 @@
namespace WebCore {
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
// VK_LBUTTON (01) Left mouse button
// VK_RBUTTON (02) Right mouse button
// VK_CANCEL (03) Control-break processing
@@ -160,7 +160,7 @@ const int VK_DELETE = 0x2E;
// VK_HELP (2F) HELP key
const int VK_HELP = 0x2F;
-#endif // PLATFORM(WIN_OS)
+#endif // OS(WINDOWS)
// (30) 0 key
const int VK_0 = 0x30;
@@ -271,7 +271,7 @@ const int VK_Y = 0x59;
// (5A) Z key
const int VK_Z = 0x5A;
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
// VK_LWIN (5B) Left Windows key (Microsoft Natural keyboard)
const int VK_LWIN = 0x5B;
@@ -483,9 +483,9 @@ const int VK_MEDIA_LAUNCH_APP1 = 0xB6;
// VK_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key
const int VK_MEDIA_LAUNCH_APP2 = 0xB7;
-#endif // !PLATFORM(WIN_OS)
+#endif // !OS(WINDOWS)
-#if !PLATFORM(WIN_OS) || PLATFORM(WINCE)
+#if !OS(WINDOWS) || OS(WINCE)
// VK_OEM_1 (BA) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key
const int VK_OEM_1 = 0xBA;
@@ -523,9 +523,9 @@ const int VK_OEM_7 = 0xDE;
// VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard.
const int VK_OEM_8 = 0xDF;
-#endif // !PLATFORM(WIN_OS) || PLATFORM(WINCE)
+#endif // !OS(WINDOWS) || OS(WINCE)
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
// VK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
const int VK_OEM_102 = 0xE2;
@@ -565,7 +565,7 @@ const int VK_OEM_CLEAR = 0xFE;
const int VK_UNKNOWN = 0;
-#endif // PLATFORM(WIN_OS)
+#endif // OS(WINDOWS)
}
diff --git a/WebCore/platform/LinkHash.cpp b/WebCore/platform/LinkHash.cpp
index 878933a..c399aa2 100644
--- a/WebCore/platform/LinkHash.cpp
+++ b/WebCore/platform/LinkHash.cpp
@@ -81,7 +81,7 @@ static inline bool containsColonSlashSlash(const UChar* characters, unsigned len
static inline void cleanPath(Vector<UChar, 512>& path)
{
- // FIXME: Shold not do this in the query or anchor part.
+ // FIXME: Should not do this in the query or anchor part.
int pos;
while ((pos = findSlashDotDotSlash(path.data(), path.size())) != -1) {
int prev = reverseFind(path.data(), path.size(), '/', pos - 1);
@@ -92,7 +92,7 @@ static inline void cleanPath(Vector<UChar, 512>& path)
path.remove(prev, pos - prev + 3);
}
- // FIXME: Shold not do this in the query part.
+ // FIXME: Should not do this in the query part.
// Set refPos to -2 to mean "I haven't looked for the anchor yet".
// We don't want to waste a function call on the search for the the anchor
// in the vast majority of cases where there is no "//" in the path.
@@ -110,7 +110,7 @@ static inline void cleanPath(Vector<UChar, 512>& path)
pos += 2;
}
- // FIXME: Shold not do this in the query or anchor part.
+ // FIXME: Should not do this in the query or anchor part.
while ((pos = findSlashDotSlash(path.data(), path.size())) != -1)
path.remove(pos, 2);
}
diff --git a/WebCore/platform/LocalizedStrings.h b/WebCore/platform/LocalizedStrings.h
index f7a6fa6..6ca5773 100644
--- a/WebCore/platform/LocalizedStrings.h
+++ b/WebCore/platform/LocalizedStrings.h
@@ -124,6 +124,8 @@ namespace WebCore {
String AXTextFieldActionVerb();
String AXCheckedCheckBoxActionVerb();
String AXUncheckedCheckBoxActionVerb();
+ String AXMenuListActionVerb();
+ String AXMenuListPopupActionVerb();
String AXLinkActionVerb();
String multipleFileUploadText(unsigned numberOfFiles);
diff --git a/WebCore/platform/PlatformKeyboardEvent.h b/WebCore/platform/PlatformKeyboardEvent.h
index cbbb48d..2b94cce 100644
--- a/WebCore/platform/PlatformKeyboardEvent.h
+++ b/WebCore/platform/PlatformKeyboardEvent.h
@@ -130,6 +130,7 @@ namespace WebCore {
static bool currentCapsLockState();
#if PLATFORM(MAC)
+ PlatformKeyboardEvent();
PlatformKeyboardEvent(NSEvent*);
NSEvent* macEvent() const { return m_macEvent.get(); }
#endif
diff --git a/WebCore/platform/PlatformMouseEvent.h b/WebCore/platform/PlatformMouseEvent.h
index 99acc63..436a902 100644
--- a/WebCore/platform/PlatformMouseEvent.h
+++ b/WebCore/platform/PlatformMouseEvent.h
@@ -114,8 +114,13 @@ namespace WebCore {
PlatformMouseEvent(GdkEventMotion*);
#endif
-#if PLATFORM(MAC) && defined(__OBJC__)
+#if PLATFORM(MAC)
+#if defined(__OBJC__)
PlatformMouseEvent(NSEvent *, NSView *windowView);
+#endif
+ PlatformMouseEvent(int x, int y, int globalX, int globalY, MouseButton button, MouseEventType eventType,
+ int clickCount, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey, double timestamp,
+ unsigned modifierFlags, int eventNumber);
int eventNumber() const { return m_eventNumber; }
#endif
diff --git a/WebCore/platform/PlatformTouchEvent.h b/WebCore/platform/PlatformTouchEvent.h
index 854db3c..263dee0 100644
--- a/WebCore/platform/PlatformTouchEvent.h
+++ b/WebCore/platform/PlatformTouchEvent.h
@@ -42,10 +42,13 @@ enum TouchEventType {
, TouchMove
, TouchEnd
, TouchCancel
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
, TouchLongPress
, TouchDoubleTap
#endif
+=======
+>>>>>>> webkit.org at r54127
};
class PlatformTouchEvent {
@@ -60,8 +63,12 @@ public:
#if PLATFORM(QT)
PlatformTouchEvent(QTouchEvent*);
#elif PLATFORM(ANDROID)
+<<<<<<< HEAD
// TODO (benm): eventTime is new and needs to be upstream
PlatformTouchEvent(const IntPoint& windowPos, TouchEventType, PlatformTouchPoint::State, long eventTime);
+=======
+ PlatformTouchEvent(const IntPoint& windowPos, TouchEventType, PlatformTouchPoint::State);
+>>>>>>> webkit.org at r54127
#endif
TouchEventType type() const { return m_type; }
@@ -72,8 +79,11 @@ public:
bool shiftKey() const { return m_shiftKey; }
bool metaKey() const { return m_metaKey; }
+<<<<<<< HEAD
long eventTime() const { return m_eventTime; }
+=======
+>>>>>>> webkit.org at r54127
private:
TouchEventType m_type;
Vector<PlatformTouchPoint> m_touchPoints;
@@ -81,7 +91,10 @@ private:
bool m_altKey;
bool m_shiftKey;
bool m_metaKey;
+<<<<<<< HEAD
long m_eventTime;
+=======
+>>>>>>> webkit.org at r54127
};
}
diff --git a/WebCore/platform/PlatformWheelEvent.h b/WebCore/platform/PlatformWheelEvent.h
index 9a4a0cb..b8e0bb4 100644
--- a/WebCore/platform/PlatformWheelEvent.h
+++ b/WebCore/platform/PlatformWheelEvent.h
@@ -68,6 +68,20 @@ namespace WebCore {
class PlatformWheelEvent {
public:
+ PlatformWheelEvent()
+ : m_deltaX(0)
+ , m_deltaY(0)
+ , m_wheelTicksX(0)
+ , m_wheelTicksY(0)
+ , m_granularity(ScrollByPixelWheelEvent)
+ , m_isAccepted(false)
+ , m_shiftKey(false)
+ , m_ctrlKey(false)
+ , m_altKey(false)
+ , m_metaKey(false)
+ {
+ }
+
const IntPoint& pos() const { return m_position; } // PlatformWindow coordinates.
const IntPoint& globalPos() const { return m_globalPosition; } // Screen coordinates.
diff --git a/WebCore/platform/PopupMenu.h b/WebCore/platform/PopupMenu.h
index 2315f02..449d475 100644
--- a/WebCore/platform/PopupMenu.h
+++ b/WebCore/platform/PopupMenu.h
@@ -42,12 +42,13 @@ typedef struct HDC__* HDC;
typedef struct HBITMAP__* HBITMAP;
#elif PLATFORM(QT)
namespace WebCore {
- class QWebPopup;
+class QtAbstractWebPopup;
}
#elif PLATFORM(GTK)
typedef struct _GtkMenu GtkMenu;
typedef struct _GtkMenuItem GtkMenuItem;
typedef struct _GtkWidget GtkWidget;
+#include "GRefPtrGtk.h"
#include <wtf/HashMap.h>
#include <glib.h>
#elif PLATFORM(WX)
@@ -144,9 +145,7 @@ private:
RetainPtr<NSPopUpButtonCell> m_popup;
#elif PLATFORM(QT)
- void clear();
- void populate(const IntRect&);
- QWebPopup* m_popup;
+ QtAbstractWebPopup* m_popup;
#elif PLATFORM(WIN)
// ScrollBarClient
virtual void valueChanged(Scrollbar*);
@@ -175,7 +174,7 @@ private:
bool m_showPopup;
#elif PLATFORM(GTK)
IntPoint m_menuPosition;
- GtkMenu* m_popup;
+ GRefPtr<GtkMenu> m_popup;
HashMap<GtkWidget*, int> m_indexMap;
static void menuItemActivated(GtkMenuItem* item, PopupMenu*);
static void menuUnmapped(GtkWidget*, PopupMenu*);
diff --git a/WebCore/platform/PurgeableBuffer.h b/WebCore/platform/PurgeableBuffer.h
index c487eb9..94e58da 100644
--- a/WebCore/platform/PurgeableBuffer.h
+++ b/WebCore/platform/PurgeableBuffer.h
@@ -62,7 +62,7 @@ namespace WebCore {
mutable State m_state;
};
-#if !PLATFORM(DARWIN) || defined(BUILDING_ON_TIGER) || PLATFORM(QT) || PLATFORM(GTK)
+#if !OS(DARWIN) || defined(BUILDING_ON_TIGER) || PLATFORM(QT) || PLATFORM(GTK)
inline PurgeableBuffer* PurgeableBuffer::create(const char*, size_t) { return 0; }
inline PurgeableBuffer::~PurgeableBuffer() { }
inline const char* PurgeableBuffer::data() const { return 0; }
diff --git a/WebCore/platform/ScrollView.cpp b/WebCore/platform/ScrollView.cpp
index 19a1dca..c8230a6 100644
--- a/WebCore/platform/ScrollView.cpp
+++ b/WebCore/platform/ScrollView.cpp
@@ -429,9 +429,7 @@ void ScrollView::updateScrollbars(const IntSize& desiredOffset)
if (m_horizontalScrollbar) {
int clientWidth = visibleWidth();
m_horizontalScrollbar->setEnabled(contentsWidth() > clientWidth);
- int pageStep = (clientWidth - cAmountToKeepWhenPaging);
- if (pageStep < 0)
- pageStep = clientWidth;
+ int pageStep = max(clientWidth * cFractionToStepWhenPaging, 1.f);
IntRect oldRect(m_horizontalScrollbar->frameRect());
IntRect hBarRect = IntRect(0,
height() - m_horizontalScrollbar->height(),
@@ -453,7 +451,7 @@ void ScrollView::updateScrollbars(const IntSize& desiredOffset)
if (m_verticalScrollbar) {
int clientHeight = visibleHeight();
m_verticalScrollbar->setEnabled(contentsHeight() > clientHeight);
- int pageStep = (clientHeight - cAmountToKeepWhenPaging);
+ int pageStep = max(clientHeight * cFractionToStepWhenPaging, 1.f);
if (pageStep < 0)
pageStep = clientHeight;
IntRect oldRect(m_verticalScrollbar->frameRect());
@@ -517,7 +515,7 @@ void ScrollView::scrollContents(const IntSize& scrollDelta)
hostWindow()->repaint(panScrollIconDirtyRect, true);
}
- if (canBlitOnScroll() && !rootPreventsBlitting()) { // The main frame can just blit the WebView window
+ if (canBlitOnScroll()) { // The main frame can just blit the WebView window
// FIXME: Find a way to blit subframes without blitting overlapping content
hostWindow()->scroll(-scrollDelta, scrollViewRect, clipRect);
} else {
@@ -607,14 +605,6 @@ void ScrollView::setParent(ScrollView* parentView)
if (m_scrollbarsAvoidingResizer && parent())
parent()->adjustScrollbarsAvoidingResizerCount(-m_scrollbarsAvoidingResizer);
-#if PLATFORM(QT)
- if (m_widgetsPreventingBlitting && parent())
- parent()->adjustWidgetsPreventingBlittingCount(-m_widgetsPreventingBlitting);
-
- if (m_widgetsPreventingBlitting && parentView)
- parentView->adjustWidgetsPreventingBlittingCount(m_widgetsPreventingBlitting);
-#endif
-
Widget::setParent(parentView);
if (m_scrollbarsAvoidingResizer && parent())
@@ -677,7 +667,7 @@ void ScrollView::wheelEvent(PlatformWheelEvent& e)
if (e.granularity() == ScrollByPageWheelEvent) {
ASSERT(deltaX == 0);
bool negative = deltaY < 0;
- deltaY = max(0, visibleHeight() - cAmountToKeepWhenPaging);
+ deltaY = max(visibleHeight() * cFractionToStepWhenPaging, 1.f);
if (negative)
deltaY = -deltaY;
}
@@ -973,7 +963,7 @@ void ScrollView::platformDestroy()
#endif
-#if (!PLATFORM(WX) && !PLATFORM(GTK) && !PLATFORM(QT) && !PLATFORM(MAC)) || ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
+#if !PLATFORM(WX) && !PLATFORM(GTK) && !PLATFORM(QT) && !PLATFORM(MAC)
void ScrollView::platformAddChild(Widget*)
{
@@ -985,15 +975,15 @@ void ScrollView::platformRemoveChild(Widget*)
#endif
-#if !PLATFORM(MAC) || ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
+#if !PLATFORM(MAC)
-void ScrollView::platformSetScrollbarsSuppressed(bool repaintOnUnsuppress)
+void ScrollView::platformSetScrollbarsSuppressed(bool)
{
}
#endif
-#if (!PLATFORM(MAC) && !PLATFORM(WX)) || ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
+#if !PLATFORM(MAC) && !PLATFORM(WX)
void ScrollView::platformSetScrollbarModes()
{
diff --git a/WebCore/platform/ScrollView.h b/WebCore/platform/ScrollView.h
index ac0e42f..88c78ec 100644
--- a/WebCore/platform/ScrollView.h
+++ b/WebCore/platform/ScrollView.h
@@ -312,16 +312,6 @@ private:
NSScrollView<WebCoreFrameScrollView>* scrollView() const;
#endif
-#if PLATFORM(QT)
-public:
- void adjustWidgetsPreventingBlittingCount(int delta);
-private:
- bool rootPreventsBlitting() const { return root()->m_widgetsPreventingBlitting > 0; }
- unsigned m_widgetsPreventingBlitting;
-#else
- bool rootPreventsBlitting() const { return false; }
-#endif
-
#if PLATFORM(GTK)
public:
void setGtkAdjustments(GtkAdjustment* hadj, GtkAdjustment* vadj);
diff --git a/WebCore/platform/Scrollbar.cpp b/WebCore/platform/Scrollbar.cpp
index 4eb2c4a..95f198e 100644
--- a/WebCore/platform/Scrollbar.cpp
+++ b/WebCore/platform/Scrollbar.cpp
@@ -26,6 +26,8 @@
#include "config.h"
#include "Scrollbar.h"
+#include "AccessibilityScrollbar.h"
+#include "AXObjectCache.h"
#include "EventHandler.h"
#include "Frame.h"
#include "FrameView.h"
@@ -117,6 +119,18 @@ void Scrollbar::setSteps(int lineStep, int pageStep, int pixelsPerStep)
bool Scrollbar::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier)
{
+#if HAVE(ACCESSIBILITY)
+ if (AXObjectCache::accessibilityEnabled()) {
+ if (parent() && parent()->isFrameView()) {
+ Document* document = static_cast<FrameView*>(parent())->frame()->document();
+ AXObjectCache* cache = document->axObjectCache();
+ AccessibilityScrollbar* axObject = static_cast<AccessibilityScrollbar*>(cache->getOrCreate(ScrollBarRole));
+ axObject->setScrollbar(this);
+ cache->postNotification(axObject, document, AXObjectCache::AXValueChanged, true);
+ }
+ }
+#endif
+
float step = 0;
if ((direction == ScrollUp && m_orientation == VerticalScrollbar) || (direction == ScrollLeft && m_orientation == HorizontalScrollbar))
step = -1;
diff --git a/WebCore/platform/Scrollbar.h b/WebCore/platform/Scrollbar.h
index 67496f2..49907ba 100644
--- a/WebCore/platform/Scrollbar.h
+++ b/WebCore/platform/Scrollbar.h
@@ -40,9 +40,8 @@ class ScrollbarClient;
class ScrollbarTheme;
class PlatformMouseEvent;
-// These match the numbers we use over in WebKit (WebFrameView.m).
const int cScrollbarPixelsPerLineStep = 40;
-const int cAmountToKeepWhenPaging = 40;
+const float cFractionToStepWhenPaging = 0.875f;
class Scrollbar : public Widget {
protected:
diff --git a/WebCore/platform/ScrollbarThemeComposite.cpp b/WebCore/platform/ScrollbarThemeComposite.cpp
index 74bfae3..d28e1c3 100644
--- a/WebCore/platform/ScrollbarThemeComposite.cpp
+++ b/WebCore/platform/ScrollbarThemeComposite.cpp
@@ -26,6 +26,7 @@
#include "config.h"
#include "ScrollbarThemeComposite.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "Frame.h"
#include "FrameView.h"
diff --git a/WebCore/platform/SharedBuffer.cpp b/WebCore/platform/SharedBuffer.cpp
index 4a0d0f3..4a46c2c 100644
--- a/WebCore/platform/SharedBuffer.cpp
+++ b/WebCore/platform/SharedBuffer.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,30 +29,60 @@
#include "PurgeableBuffer.h"
+using namespace std;
+
namespace WebCore {
+static const unsigned segmentSize = 0x1000;
+static const unsigned segmentPositionMask = 0x0FFF;
+
+static inline unsigned segmentIndex(unsigned position)
+{
+ return position / segmentSize;
+}
+
+static inline unsigned offsetInSegment(unsigned position)
+{
+ return position & segmentPositionMask;
+}
+
+static inline char* allocateSegment()
+{
+ return static_cast<char*>(fastMalloc(segmentSize));
+}
+
+static inline void freeSegment(char* p)
+{
+ fastFree(p);
+}
+
SharedBuffer::SharedBuffer()
+ : m_size(0)
{
}
SharedBuffer::SharedBuffer(const char* data, int size)
+ : m_size(0)
{
- m_buffer.append(data, size);
+ append(data, size);
}
SharedBuffer::SharedBuffer(const unsigned char* data, int size)
+ : m_size(0)
{
- m_buffer.append(data, size);
+ append(reinterpret_cast<const char*>(data), size);
}
SharedBuffer::~SharedBuffer()
{
+ clear();
}
PassRefPtr<SharedBuffer> SharedBuffer::adoptVector(Vector<char>& vector)
{
RefPtr<SharedBuffer> buffer = create();
buffer->m_buffer.swap(vector);
+ buffer->m_size = buffer->m_buffer.size();
return buffer.release();
}
@@ -71,7 +102,7 @@ unsigned SharedBuffer::size() const
if (m_purgeableBuffer)
return m_purgeableBuffer->size();
- return m_buffer.size();
+ return m_size;
}
const char* SharedBuffer::data() const
@@ -82,29 +113,75 @@ const char* SharedBuffer::data() const
if (m_purgeableBuffer)
return m_purgeableBuffer->data();
- return m_buffer.data();
+ return buffer().data();
}
-void SharedBuffer::append(const char* data, int len)
+void SharedBuffer::append(const char* data, unsigned length)
{
ASSERT(!m_purgeableBuffer);
maybeTransferPlatformData();
- m_buffer.append(data, len);
+ unsigned positionInSegment = offsetInSegment(m_size - m_buffer.size());
+ m_size += length;
+
+ if (m_size <= segmentSize) {
+ // No need to use segments for small resource data
+ m_buffer.append(data, length);
+ return;
+ }
+
+ char* segment;
+ if (!positionInSegment) {
+ segment = allocateSegment();
+ m_segments.append(segment);
+ } else
+ segment = m_segments.last() + positionInSegment;
+
+ unsigned segmentFreeSpace = segmentSize - positionInSegment;
+ unsigned bytesToCopy = min(length, segmentFreeSpace);
+
+ for (;;) {
+ memcpy(segment, data, bytesToCopy);
+ if (static_cast<unsigned>(length) == bytesToCopy)
+ break;
+
+ length -= bytesToCopy;
+ data += bytesToCopy;
+ segment = allocateSegment();
+ m_segments.append(segment);
+ bytesToCopy = min(length, segmentSize);
+ }
}
void SharedBuffer::clear()
{
clearPlatformData();
+ for (unsigned i = 0; i < m_segments.size(); ++i)
+ freeSegment(m_segments[i]);
+
+ m_segments.clear();
+ m_size = 0;
+
m_buffer.clear();
m_purgeableBuffer.clear();
}
PassRefPtr<SharedBuffer> SharedBuffer::copy() const
{
- return SharedBuffer::create(data(), size());
+ RefPtr<SharedBuffer> clone(adoptRef(new SharedBuffer));
+ if (m_purgeableBuffer || hasPlatformData()) {
+ clone->append(data(), size());
+ return clone;
+ }
+
+ clone->m_size = m_size;
+ clone->m_buffer.reserveCapacity(m_size);
+ clone->m_buffer.append(m_buffer.data(), m_buffer.size());
+ for (unsigned i = 0; i < m_segments.size(); ++i)
+ clone->m_buffer.append(m_segments[i], segmentSize);
+ return clone;
}
PurgeableBuffer* SharedBuffer::releasePurgeableBuffer()
@@ -113,6 +190,54 @@ PurgeableBuffer* SharedBuffer::releasePurgeableBuffer()
return m_purgeableBuffer.release();
}
+const Vector<char>& SharedBuffer::buffer() const
+{
+ unsigned bufferSize = m_buffer.size();
+ if (m_size > bufferSize) {
+ m_buffer.resize(m_size);
+ char* destination = m_buffer.data() + bufferSize;
+ unsigned bytesLeft = m_size - bufferSize;
+ for (unsigned i = 0; i < m_segments.size(); ++i) {
+ unsigned bytesToCopy = min(bytesLeft, segmentSize);
+ memcpy(destination, m_segments[i], bytesToCopy);
+ destination += bytesToCopy;
+ bytesLeft -= bytesToCopy;
+ freeSegment(m_segments[i]);
+ }
+ m_segments.clear();
+ }
+ return m_buffer;
+}
+
+unsigned SharedBuffer::getSomeData(const char*& someData, unsigned position) const
+{
+ if (hasPlatformData() || m_purgeableBuffer) {
+ someData = data() + position;
+ return size() - position;
+ }
+
+ if (position >= m_size) {
+ someData = 0;
+ return 0;
+ }
+
+ unsigned consecutiveSize = m_buffer.size();
+ if (position < consecutiveSize) {
+ someData = m_buffer.data() + position;
+ return consecutiveSize - position;
+ }
+
+ position -= consecutiveSize;
+ unsigned segmentedSize = m_size - consecutiveSize;
+ unsigned segments = m_segments.size();
+ unsigned segment = segmentIndex(position);
+ ASSERT(segment < segments);
+
+ unsigned positionInSegment = offsetInSegment(position);
+ someData = m_segments[segment] + positionInSegment;
+ return segment == segments - 1 ? segmentedSize - position : segmentSize - positionInSegment;
+}
+
#if !PLATFORM(CF)
inline void SharedBuffer::clearPlatformData()
diff --git a/WebCore/platform/SharedBuffer.h b/WebCore/platform/SharedBuffer.h
index 256d490..4937c73 100644
--- a/WebCore/platform/SharedBuffer.h
+++ b/WebCore/platform/SharedBuffer.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -76,6 +77,7 @@ public:
static PassRefPtr<SharedBuffer> wrapCFData(CFDataRef);
#endif
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
virtual
#endif
@@ -83,12 +85,23 @@ public:
#if PLATFORM(ANDROID)
virtual
#endif
+=======
+ // Calling this function will force internal segmented buffers
+ // to be merged into a flat buffer. Use getSomeData() whenever possible
+ // for better performance.
+ const char* data() const;
+
+>>>>>>> webkit.org at r54127
unsigned size() const;
- const Vector<char> &buffer() { return m_buffer; }
- bool isEmpty() const { return size() == 0; }
+ // Calling this function will force internal segmented buffers
+ // to be merged into a flat buffer. Use getSomeData() whenever possible
+ // for better performance.
+ const Vector<char>& buffer() const;
- void append(const char*, int);
+ bool isEmpty() const { return !size(); }
+
+ void append(const char*, unsigned);
void clear();
const char* platformData() const;
unsigned platformDataSize() const;
@@ -99,7 +112,21 @@ public:
// Ensure this buffer has no other clients before calling this.
PurgeableBuffer* releasePurgeableBuffer();
-
+
+ // Return the number of consecutive bytes after "position". "data"
+ // points to the first byte.
+ // Return 0 when no more data left.
+ // When extracting all data with getSomeData(), the caller should
+ // repeat calling it until it returns 0.
+ // Usage:
+ // const char* segment;
+ // unsigned pos = 0;
+ // while (unsigned length = sharedBuffer->getSomeData(segment, pos)) {
+ // // Use the data. for example: decoder->decode(segment, length);
+ // pos += length;
+ // }
+ unsigned getSomeData(const char*& data, unsigned position = 0) const;
+
private:
SharedBuffer();
SharedBuffer(const char*, int);
@@ -109,7 +136,9 @@ private:
void maybeTransferPlatformData();
bool hasPlatformData() const;
- Vector<char> m_buffer;
+ unsigned m_size;
+ mutable Vector<char> m_buffer;
+ mutable Vector<char*> m_segments;
OwnPtr<PurgeableBuffer> m_purgeableBuffer;
#if PLATFORM(CF)
SharedBuffer(CFDataRef);
@@ -119,4 +148,4 @@ private:
}
-#endif
+#endif // SharedBuffer_h
diff --git a/WebCore/platform/ThemeTypes.h b/WebCore/platform/ThemeTypes.h
index 439a3b1..9c2366e 100644
--- a/WebCore/platform/ThemeTypes.h
+++ b/WebCore/platform/ThemeTypes.h
@@ -38,6 +38,7 @@ enum ControlState {
DefaultState = 1 << 6,
WindowInactiveState = 1 << 7,
IndeterminateState = 1 << 8,
+ SpinUpState = 1 << 9, // Sub-state for HoverState and PressedState.
AllStates = 0xffffffff
};
@@ -46,12 +47,12 @@ typedef unsigned ControlStates;
// Must follow CSSValueKeywords.in order
enum ControlPart {
NoControlPart, CheckboxPart, RadioPart, PushButtonPart, SquareButtonPart, ButtonPart,
- ButtonBevelPart, DefaultButtonPart, ListButtonPart, ListboxPart, ListItemPart,
+ ButtonBevelPart, DefaultButtonPart, InnerSpinButtonPart, ListButtonPart, ListboxPart, ListItemPart,
MediaFullscreenButtonPart, MediaMuteButtonPart, MediaPlayButtonPart, MediaSeekBackButtonPart,
MediaSeekForwardButtonPart, MediaRewindButtonPart, MediaReturnToRealtimeButtonPart, MediaToggleClosedCaptionsButtonPart,
MediaSliderPart, MediaSliderThumbPart, MediaVolumeSliderContainerPart, MediaVolumeSliderPart, MediaVolumeSliderThumbPart,
MediaControlsBackgroundPart, MediaCurrentTimePart, MediaTimeRemainingPart,
- MenulistPart, MenulistButtonPart, MenulistTextPart, MenulistTextFieldPart,
+ MenulistPart, MenulistButtonPart, MenulistTextPart, MenulistTextFieldPart, OuterSpinButtonPart,
SliderHorizontalPart, SliderVerticalPart, SliderThumbHorizontalPart,
SliderThumbVerticalPart, CaretPart, SearchFieldPart, SearchFieldDecorationPart,
SearchFieldResultsDecorationPart, SearchFieldResultsButtonPart,
diff --git a/WebCore/platform/ThreadGlobalData.cpp b/WebCore/platform/ThreadGlobalData.cpp
index 26a9728..5c3c294 100644
--- a/WebCore/platform/ThreadGlobalData.cpp
+++ b/WebCore/platform/ThreadGlobalData.cpp
@@ -48,24 +48,11 @@ using namespace WTF;
namespace WebCore {
-ThreadGlobalData& threadGlobalData()
-{
- // FIXME: Workers are not necessarily the only feature that make per-thread global data necessary.
- // We need to check for e.g. database objects manipulating strings on secondary threads.
#if ENABLE(WORKERS)
- // ThreadGlobalData is used on main thread before it could possibly be used on secondary ones, so there is no need for synchronization here.
- static ThreadSpecific<ThreadGlobalData>* threadGlobalData = new ThreadSpecific<ThreadGlobalData>;
- return **threadGlobalData;
+ThreadSpecific<ThreadGlobalData>* ThreadGlobalData::staticData;
#else
- static ThreadGlobalData* staticData;
- if (!staticData) {
- staticData = static_cast<ThreadGlobalData*>(fastMalloc(sizeof(ThreadGlobalData)));
- // ThreadGlobalData constructor indirectly uses staticData, so we need to set up the memory before invoking it.
- new (staticData) ThreadGlobalData;
- }
- return *staticData;
+ThreadGlobalData* ThreadGlobalData::staticData;
#endif
-}
ThreadGlobalData::ThreadGlobalData()
: m_emptyString(new StringImpl)
@@ -92,7 +79,6 @@ ThreadGlobalData::~ThreadGlobalData()
#if USE(ICU_UNICODE)
delete m_cachedConverterICU;
#endif
-
delete m_eventNames;
delete m_atomicStringTable;
delete m_threadTimers;
diff --git a/WebCore/platform/ThreadGlobalData.h b/WebCore/platform/ThreadGlobalData.h
index 68f5ec0..9f7865d 100644
--- a/WebCore/platform/ThreadGlobalData.h
+++ b/WebCore/platform/ThreadGlobalData.h
@@ -28,9 +28,16 @@
#define ThreadGlobalData_h
#include "StringHash.h"
+#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
#include <wtf/Noncopyable.h>
+#if ENABLE(WORKERS)
+#include <wtf/ThreadSpecific.h>
+#include <wtf/Threading.h>
+using WTF::ThreadSpecific;
+#endif
+
namespace WebCore {
class EventNames;
@@ -73,10 +80,35 @@ namespace WebCore {
#if PLATFORM(MAC)
TECConverterWrapper* m_cachedConverterTEC;
#endif
+
+#if ENABLE(WORKERS)
+ static ThreadSpecific<ThreadGlobalData>* staticData;
+#else
+ static ThreadGlobalData* staticData;
+#endif
+ friend ThreadGlobalData& threadGlobalData();
};
- ThreadGlobalData& threadGlobalData();
+inline ThreadGlobalData& threadGlobalData()
+{
+ // FIXME: Workers are not necessarily the only feature that make per-thread global data necessary.
+ // We need to check for e.g. database objects manipulating strings on secondary threads.
+#if ENABLE(WORKERS)
+ // ThreadGlobalData is used on main thread before it could possibly be used on secondary ones, so there is no need for synchronization here.
+ if (!ThreadGlobalData::staticData)
+ ThreadGlobalData::staticData = new ThreadSpecific<ThreadGlobalData>;
+ return **ThreadGlobalData::staticData;
+#else
+ if (!ThreadGlobalData::staticData) {
+ ThreadGlobalData::staticData = static_cast<ThreadGlobalData*>(fastMalloc(sizeof(ThreadGlobalData)));
+ // ThreadGlobalData constructor indirectly uses staticData, so we need to set up the memory before invoking it.
+ new (ThreadGlobalData::staticData) ThreadGlobalData;
+ }
+ return *ThreadGlobalData::staticData;
+#endif
+}
+
} // namespace WebCore
#endif // ThreadGlobalData_h
diff --git a/WebCore/platform/Timer.cpp b/WebCore/platform/Timer.cpp
index ea3effd..5f9fe27 100644
--- a/WebCore/platform/Timer.cpp
+++ b/WebCore/platform/Timer.cpp
@@ -196,13 +196,6 @@ void TimerBase::stop()
ASSERT(!inHeap());
}
-bool TimerBase::isActive() const
-{
- ASSERT(m_thread == currentThread());
-
- return m_nextFireTime;
-}
-
double TimerBase::nextFireInterval() const
{
ASSERT(isActive());
diff --git a/WebCore/platform/Timer.h b/WebCore/platform/Timer.h
index 9221df0..c4443da 100644
--- a/WebCore/platform/Timer.h
+++ b/WebCore/platform/Timer.h
@@ -101,6 +101,12 @@ private:
TimerFiredFunction m_function;
};
+inline bool TimerBase::isActive() const
+{
+ ASSERT(m_thread == currentThread());
+ return m_nextFireTime;
+}
+
}
#endif
diff --git a/WebCore/platform/TreeShared.h b/WebCore/platform/TreeShared.h
index a60ad0d..b844e5f 100644
--- a/WebCore/platform/TreeShared.h
+++ b/WebCore/platform/TreeShared.h
@@ -44,6 +44,7 @@ public:
virtual ~TreeShared()
{
ASSERT(isMainThread());
+ ASSERT(!m_refCount);
ASSERT(m_deletionHasBegun);
}
@@ -58,6 +59,7 @@ public:
void deref()
{
ASSERT(isMainThread());
+ ASSERT(m_refCount >= 0);
ASSERT(!m_deletionHasBegun);
ASSERT(!m_inRemovedLastRefFunction);
if (--m_refCount <= 0 && !m_parent) {
diff --git a/WebCore/platform/Widget.cpp b/WebCore/platform/Widget.cpp
index 6196548..1a8f7f8 100644
--- a/WebCore/platform/Widget.cpp
+++ b/WebCore/platform/Widget.cpp
@@ -105,7 +105,7 @@ IntPoint Widget::convertToContainingWindow(const IntPoint& localPoint) const
return convertFromRootToContainingWindow(this, localPoint);
}
-#if !PLATFORM(MAC) || ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
+#if !PLATFORM(MAC)
IntRect Widget::convertFromRootToContainingWindow(const Widget*, const IntRect& rect)
{
return rect;
@@ -127,7 +127,11 @@ IntPoint Widget::convertFromContainingWindowToRoot(const Widget*, const IntPoint
}
#endif
+<<<<<<< HEAD
#if (!PLATFORM(MAC) && !PLATFORM(GTK) && !PLATFORM(ANDROID)) || ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
+=======
+#if !PLATFORM(MAC) && !PLATFORM(GTK)
+>>>>>>> webkit.org at r54127
void Widget::releasePlatformWidget()
{
}
diff --git a/WebCore/platform/Widget.h b/WebCore/platform/Widget.h
index a449d58..803bf3b 100644
--- a/WebCore/platform/Widget.h
+++ b/WebCore/platform/Widget.h
@@ -168,6 +168,8 @@ public:
virtual bool isFrameView() const { return false; }
virtual bool isPluginView() const { return false; }
+ // FIXME: The Mac plug-in code should inherit from PluginView. When this happens PluginWidget and PluginView can become one class.
+ virtual bool isPluginWidget() const { return false; }
virtual bool isScrollbar() const { return false; }
void removeFromParent();
@@ -189,7 +191,7 @@ public:
virtual void frameRectsChanged() {}
-#if PLATFORM(MAC) && !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
+#if PLATFORM(MAC)
NSView* getOuterView() const;
static void beforeMouseDown(NSView*, Widget*);
@@ -226,7 +228,7 @@ private:
IntRect m_frame; // Not used when a native widget exists.
-#if PLATFORM(MAC) && !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
+#if PLATFORM(MAC)
WidgetPrivate* m_data;
#endif
#if PLATFORM(ANDROID)
diff --git a/WebCore/platform/android/PlatformBridge.h b/WebCore/platform/android/PlatformBridge.h
index cf9f561..644b504 100644
--- a/WebCore/platform/android/PlatformBridge.h
+++ b/WebCore/platform/android/PlatformBridge.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2009, The Android Open Source Project
+ * Copyright 2009, 2010, The Android Open Source Project
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -81,7 +81,10 @@ class NPObject;
namespace WebCore {
+<<<<<<< HEAD
class FrameView;
+=======
+>>>>>>> webkit.org at r54127
class Widget;
// An interface to the embedding layer, which has the ability to answer
@@ -105,6 +108,7 @@ public:
static bool cookiesEnabled();
// Plugin
static NPObject* pluginScriptableObject(Widget*);
+<<<<<<< HEAD
// Popups
static bool popupsAllowed(NPP);
@@ -127,6 +131,8 @@ public:
// Whether the WebView is paused.
static bool isWebViewPaused();
+=======
+>>>>>>> webkit.org at r54127
};
}
diff --git a/WebCore/platform/android/PlatformTouchEventAndroid.cpp b/WebCore/platform/android/PlatformTouchEventAndroid.cpp
index d2fcebb..1ff87c3 100644
--- a/WebCore/platform/android/PlatformTouchEventAndroid.cpp
+++ b/WebCore/platform/android/PlatformTouchEventAndroid.cpp
@@ -30,14 +30,21 @@
namespace WebCore {
+<<<<<<< HEAD
// TODO (benm): eventTime is new and needs to be upstream
PlatformTouchEvent::PlatformTouchEvent(const IntPoint& windowPos, TouchEventType type, PlatformTouchPoint::State state, long eventTime)
+=======
+PlatformTouchEvent::PlatformTouchEvent(const IntPoint& windowPos, TouchEventType type, PlatformTouchPoint::State state)
+>>>>>>> webkit.org at r54127
: m_type(type)
, m_ctrlKey(false)
, m_altKey(false)
, m_shiftKey(false)
, m_metaKey(false)
+<<<<<<< HEAD
, m_eventTime(eventTime)
+=======
+>>>>>>> webkit.org at r54127
{
m_touchPoints.append(PlatformTouchPoint(windowPos, state));
}
diff --git a/WebCore/platform/cf/BinaryPropertyList.cpp b/WebCore/platform/cf/BinaryPropertyList.cpp
index c0fda3d..f0facae 100644
--- a/WebCore/platform/cf/BinaryPropertyList.cpp
+++ b/WebCore/platform/cf/BinaryPropertyList.cpp
@@ -27,6 +27,7 @@
#include "BinaryPropertyList.h"
#include "StringHash.h"
+#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
#include <limits>
diff --git a/WebCore/platform/cf/SharedBufferCF.cpp b/WebCore/platform/cf/SharedBufferCF.cpp
index 26fc07f..33e25ae 100644
--- a/WebCore/platform/cf/SharedBufferCF.cpp
+++ b/WebCore/platform/cf/SharedBufferCF.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,7 +33,8 @@
namespace WebCore {
SharedBuffer::SharedBuffer(CFDataRef cfData)
- : m_cfData(cfData)
+ : m_size(0)
+ , m_cfData(cfData)
{
}
@@ -76,9 +77,9 @@ void SharedBuffer::maybeTransferPlatformData()
if (!m_cfData)
return;
- ASSERT(m_buffer.size() == 0);
+ ASSERT(!m_size);
- m_buffer.append((const char*)CFDataGetBytePtr(m_cfData.get()), CFDataGetLength(m_cfData.get()));
+ append((const char*)CFDataGetBytePtr(m_cfData.get()), CFDataGetLength(m_cfData.get()));
m_cfData = 0;
}
diff --git a/WebCore/platform/chromium/ChromiumBridge.h b/WebCore/platform/chromium/ChromiumBridge.h
index 3709f7c..92b4c13 100644
--- a/WebCore/platform/chromium/ChromiumBridge.h
+++ b/WebCore/platform/chromium/ChromiumBridge.h
@@ -43,7 +43,7 @@ typedef struct NPObject NPObject;
typedef struct _NPP NPP_t;
typedef NPP_t* NPP;
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
typedef struct HFONT__* HFONT;
#endif
@@ -87,6 +87,7 @@ namespace WebCore {
static String cookies(const KURL& url, const KURL& firstPartyForCookies);
static bool rawCookies(const KURL& url, const KURL& firstPartyForCookies, Vector<Cookie>*);
static void deleteCookie(const KURL& url, const String& cookieName);
+ static bool cookiesEnabled(const KURL& url, const KURL& firstPartyForCookies);
// DNS ----------------------------------------------------------------
static void prefetchDNS(const String& hostname);
@@ -105,10 +106,10 @@ namespace WebCore {
static KURL filePathToURL(const String&);
// Font ---------------------------------------------------------------
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
static bool ensureFontLoaded(HFONT font);
#endif
-#if PLATFORM(LINUX)
+#if OS(LINUX)
static String getFontFamilyForCharacters(const UChar*, size_t numCharacters);
#endif
@@ -187,7 +188,7 @@ namespace WebCore {
static double currentTime();
// Theming ------------------------------------------------------------
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
static void paintButton(
GraphicsContext*, int part, int state, int classicState, const IntRect&);
static void paintMenuList(
diff --git a/WebCore/platform/chromium/ChromiumDataObject.cpp b/WebCore/platform/chromium/ChromiumDataObject.cpp
index 683c2e6..df0849c 100644
--- a/WebCore/platform/chromium/ChromiumDataObject.cpp
+++ b/WebCore/platform/chromium/ChromiumDataObject.cpp
@@ -37,6 +37,7 @@ void ChromiumDataObject::clear()
{
url = KURL();
urlTitle = "";
+ downloadURL = KURL();
fileExtension = "";
filenames.clear();
plainText = "";
@@ -50,6 +51,7 @@ void ChromiumDataObject::clear()
bool ChromiumDataObject::hasData() const
{
return !url.isEmpty()
+ || !downloadURL.isEmpty()
|| !fileExtension.isEmpty()
|| !filenames.isEmpty()
|| !plainText.isEmpty()
@@ -60,6 +62,7 @@ bool ChromiumDataObject::hasData() const
ChromiumDataObject::ChromiumDataObject(const ChromiumDataObject& other)
: url(other.url)
, urlTitle(other.urlTitle)
+ , downloadURL(other.downloadURL)
, fileExtension(other.fileExtension)
, filenames(other.filenames)
, plainText(other.plainText)
diff --git a/WebCore/platform/chromium/ChromiumDataObject.h b/WebCore/platform/chromium/ChromiumDataObject.h
index 3e8675e..15eb911 100644
--- a/WebCore/platform/chromium/ChromiumDataObject.h
+++ b/WebCore/platform/chromium/ChromiumDataObject.h
@@ -59,6 +59,8 @@ namespace WebCore {
KURL url;
String urlTitle;
+ KURL downloadURL;
+
String fileExtension;
Vector<String> filenames;
diff --git a/WebCore/platform/chromium/ClipboardChromium.cpp b/WebCore/platform/chromium/ClipboardChromium.cpp
index 1a2caa4..32f7d50 100644
--- a/WebCore/platform/chromium/ClipboardChromium.cpp
+++ b/WebCore/platform/chromium/ClipboardChromium.cpp
@@ -53,7 +53,7 @@ using namespace HTMLNames;
// We provide the IE clipboard types (URL and Text), and the clipboard types specified in the WHATWG Web Applications 1.0 draft
// see http://www.whatwg.org/specs/web-apps/current-work/ Section 6.3.5.3
-enum ClipboardDataType { ClipboardDataTypeNone, ClipboardDataTypeURL, ClipboardDataTypeText };
+enum ClipboardDataType { ClipboardDataTypeNone, ClipboardDataTypeURL, ClipboardDataTypeText, ClipboardDataTypeDownloadURL };
static ClipboardDataType clipboardTypeFromMIMEType(const String& type)
{
@@ -64,6 +64,8 @@ static ClipboardDataType clipboardTypeFromMIMEType(const String& type)
return ClipboardDataTypeText;
if (cleanType == "url" || cleanType == "text/uri-list")
return ClipboardDataTypeURL;
+ if (cleanType == "downloadurl")
+ return ClipboardDataTypeDownloadURL;
return ClipboardDataTypeNone;
}
@@ -157,6 +159,14 @@ bool ClipboardChromium::setData(const String& type, const String& data)
return true;
}
+ if (winType == ClipboardDataTypeDownloadURL) {
+ KURL url = KURL(ParsedURLString, data);
+ if (url.isValid()) {
+ m_dataObject->downloadURL = url;
+ return true;
+ }
+ }
+
return false;
}
@@ -353,13 +363,13 @@ void ClipboardChromium::writeRange(Range* selectedRange, Frame* frame)
m_dataObject->textHtml = createMarkup(selectedRange, 0,
AnnotateForInterchange);
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
m_dataObject->textHtml = String("<meta charset='utf-8' id='webkit-interchange-charset'>") + m_dataObject->textHtml;
#endif
m_dataObject->htmlBaseUrl = frame->document()->url();
String str = frame->selectedText();
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
replaceNewlinesWithWindowsStyleNewlines(str);
#endif
replaceNBSPWithSpace(str);
diff --git a/WebCore/platform/chromium/ClipboardUtilitiesChromium.cpp b/WebCore/platform/chromium/ClipboardUtilitiesChromium.cpp
index 7efcb3c..5d9ed05 100644
--- a/WebCore/platform/chromium/ClipboardUtilitiesChromium.cpp
+++ b/WebCore/platform/chromium/ClipboardUtilitiesChromium.cpp
@@ -36,7 +36,7 @@
namespace WebCore {
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
void replaceNewlinesWithWindowsStyleNewlines(String& str)
{
static const UChar Newline = '\n';
diff --git a/WebCore/platform/chromium/ClipboardUtilitiesChromium.h b/WebCore/platform/chromium/ClipboardUtilitiesChromium.h
index c597089..23fd29c 100644
--- a/WebCore/platform/chromium/ClipboardUtilitiesChromium.h
+++ b/WebCore/platform/chromium/ClipboardUtilitiesChromium.h
@@ -33,7 +33,7 @@ namespace WebCore {
class KURL;
class String;
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
void replaceNewlinesWithWindowsStyleNewlines(String&);
#endif
void replaceNBSPWithSpace(String&);
diff --git a/WebCore/platform/chromium/DragDataChromium.cpp b/WebCore/platform/chromium/DragDataChromium.cpp
index 133ba24..9b67fc0 100644
--- a/WebCore/platform/chromium/DragDataChromium.cpp
+++ b/WebCore/platform/chromium/DragDataChromium.cpp
@@ -147,7 +147,7 @@ PassRefPtr<DocumentFragment> DragData::asFragment(Document* doc) const
if (!m_platformDragData->textHtml.isEmpty()) {
RefPtr<DocumentFragment> fragment = createFragmentFromMarkup(doc,
- m_platformDragData->textHtml, m_platformDragData->htmlBaseUrl);
+ m_platformDragData->textHtml, m_platformDragData->htmlBaseUrl, FragmentScriptingNotAllowed);
return fragment.release();
}
diff --git a/WebCore/platform/chromium/KeyCodeConversionGtk.cpp b/WebCore/platform/chromium/KeyCodeConversionGtk.cpp
index e3d5f61..a709f3e 100644
--- a/WebCore/platform/chromium/KeyCodeConversionGtk.cpp
+++ b/WebCore/platform/chromium/KeyCodeConversionGtk.cpp
@@ -72,6 +72,23 @@ int windowsKeyCodeForKeyEvent(unsigned keycode)
case GDK_KP_Divide:
return VKEY_DIVIDE; // (6F) Divide key
+ case GDK_KP_Page_Up:
+ return VKEY_PRIOR; // (21) PAGE UP key
+ case GDK_KP_Page_Down:
+ return VKEY_NEXT; // (22) PAGE DOWN key
+ case GDK_KP_End:
+ return VKEY_END; // (23) END key
+ case GDK_KP_Home:
+ return VKEY_HOME; // (24) HOME key
+ case GDK_KP_Left:
+ return VKEY_LEFT; // (25) LEFT ARROW key
+ case GDK_KP_Up:
+ return VKEY_UP; // (26) UP ARROW key
+ case GDK_KP_Right:
+ return VKEY_RIGHT; // (27) RIGHT ARROW key
+ case GDK_KP_Down:
+ return VKEY_DOWN; // (28) DOWN ARROW key
+
case GDK_BackSpace:
return VKEY_BACK; // (08) BACKSPACE key
case GDK_ISO_Left_Tab:
diff --git a/WebCore/platform/chromium/PasteboardChromium.cpp b/WebCore/platform/chromium/PasteboardChromium.cpp
index ce06e55..3b3aea6 100644
--- a/WebCore/platform/chromium/PasteboardChromium.cpp
+++ b/WebCore/platform/chromium/PasteboardChromium.cpp
@@ -82,13 +82,13 @@ void Pasteboard::setSelectionMode(bool selectionMode)
void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete, Frame* frame)
{
String html = createMarkup(selectedRange, 0, AnnotateForInterchange);
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
html = String("<meta charset='utf-8' id='webkit-interchange-charset'>") + html;
#endif
ExceptionCode ec = 0;
KURL url = selectedRange->startContainer(ec)->document()->url();
String plainText = frame->selectedText();
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
replaceNewlinesWithWindowsStyleNewlines(plainText);
#endif
replaceNBSPWithSpace(plainText);
@@ -98,7 +98,7 @@ void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete,
void Pasteboard::writePlainText(const String& text)
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
String plainText(text);
replaceNewlinesWithWindowsStyleNewlines(plainText);
ChromiumBridge::clipboardWritePlainText(plainText);
@@ -170,14 +170,14 @@ PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefP
String markup;
KURL srcURL;
ChromiumBridge::clipboardReadHTML(buffer, &markup, &srcURL);
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
DEFINE_STATIC_LOCAL(const String, forceUtf8String, ("<meta charset='utf-8' id='webkit-interchange-charset'>"));
if (markup.startsWith(forceUtf8String))
markup = markup.substring(forceUtf8String.length());
#endif
RefPtr<DocumentFragment> fragment =
- createFragmentFromMarkup(frame->document(), markup, srcURL);
+ createFragmentFromMarkup(frame->document(), markup, srcURL, FragmentScriptingNotAllowed);
if (fragment)
return fragment.release();
}
diff --git a/WebCore/platform/chromium/PlatformBridge.h b/WebCore/platform/chromium/PlatformBridge.h
new file mode 100644
index 0000000..ecb7b45
--- /dev/null
+++ b/WebCore/platform/chromium/PlatformBridge.h
@@ -0,0 +1,47 @@
+/*
+ * 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 PlatformBridge_h
+#define PlatformBridge_h
+
+#include "ChromiumBridge.h"
+
+namespace WebCore {
+
+// FIXME: A better name for ChromiumBridge is PlatformBridge. Android already
+// uses PlatformBridge so the code that is shared among the Android and Chromium
+// ports is gradually moving towards using PlatformBridge. Once the Android
+// unforking is done, we will change the name of ChromiumBridge to PlatformBridge
+// and merge the two classes into one that will be shared by both ports.
+typedef ChromiumBridge PlatformBridge;
+
+} // namespace WebCore
+
+#endif // PlatformBridge_h
diff --git a/WebCore/platform/chromium/PlatformKeyboardEventChromium.cpp b/WebCore/platform/chromium/PlatformKeyboardEventChromium.cpp
index ae55afe..74643f7 100644
--- a/WebCore/platform/chromium/PlatformKeyboardEventChromium.cpp
+++ b/WebCore/platform/chromium/PlatformKeyboardEventChromium.cpp
@@ -27,9 +27,9 @@
#include "config.h"
#include "PlatformKeyboardEvent.h"
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include <windows.h>
-#elif PLATFORM(DARWIN)
+#elif OS(DARWIN)
#import <Carbon/Carbon.h>
#else
#include "NotImplemented.h"
@@ -39,7 +39,7 @@ namespace WebCore {
void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool backwardCompatibilityMode)
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// No KeyDown events on Windows to disambiguate.
ASSERT_NOT_REACHED();
#else
@@ -56,7 +56,7 @@ void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool backwardCom
} else {
m_keyIdentifier = String();
m_windowsVirtualKeyCode = 0;
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
if (m_text.length() == 1 && (m_text[0U] >= 0xF700 && m_text[0U] <= 0xF7FF)) {
// According to NSEvents.h, OpenStep reserves the range 0xF700-0xF8FF for function keys. However, some actual private use characters
// happen to be in this range, e.g. the Apple logo (Option+Shift+K).
@@ -71,10 +71,10 @@ void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool backwardCom
bool PlatformKeyboardEvent::currentCapsLockState()
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// FIXME: Does this even work inside the sandbox?
return GetKeyState(VK_CAPITAL) & 1;
-#elif PLATFORM(DARWIN)
+#elif OS(DARWIN)
return GetCurrentKeyModifiers() & alphaLock;
#else
notImplemented();
diff --git a/WebCore/platform/chromium/PopupMenuChromium.cpp b/WebCore/platform/chromium/PopupMenuChromium.cpp
index 5abd364..cab7ced 100644
--- a/WebCore/platform/chromium/PopupMenuChromium.cpp
+++ b/WebCore/platform/chromium/PopupMenuChromium.cpp
@@ -32,6 +32,7 @@
#include "PopupMenuChromium.h"
#include "CharacterNames.h"
+#include "Chrome.h"
#include "ChromeClientChromium.h"
#include "Font.h"
#include "FontSelector.h"
@@ -610,17 +611,10 @@ bool PopupListBox::isInterestedInEventForKey(int keyCode)
static bool isCharacterTypeEvent(const PlatformKeyboardEvent& event)
{
// Check whether the event is a character-typed event or not.
- // In Windows, PlatformKeyboardEvent::Char (not RawKeyDown) type event
- // is considered as character type event. In Mac OS, KeyDown (not
- // KeyUp) is considered as character type event.
-#if PLATFORM(WIN_OS)
- if (event.type() == PlatformKeyboardEvent::Char)
- return true;
-#else
- if (event.type() == PlatformKeyboardEvent::KeyDown)
- return true;
-#endif
- return false;
+ // We use RawKeyDown/Char/KeyUp event scheme on all platforms,
+ // so PlatformKeyboardEvent::Char (not RawKeyDown) type event
+ // is considered as character type event.
+ return event.type() == PlatformKeyboardEvent::Char;
}
bool PopupListBox::handleKeyEvent(const PlatformKeyboardEvent& event)
@@ -744,13 +738,18 @@ void PopupListBox::typeAheadFind(const PlatformKeyboardEvent& event)
}
}
+ // Compute a case-folded copy of the prefix string before beginning the search for
+ // a matching element. This code uses foldCase to work around the fact that
+ // String::startWith does not fold non-ASCII characters. This code can be changed
+ // to use startWith once that is fixed.
+ String prefixWithCaseFolded(prefix.foldCase());
int itemCount = numItems();
int index = (max(0, m_selectedIndex) + searchStartOffset) % itemCount;
for (int i = 0; i < itemCount; i++, index = (index + 1) % itemCount) {
if (!isSelectableItem(index))
continue;
- if (stripLeadingWhiteSpace(m_items[index]->label).startsWith(prefix, false)) {
+ if (stripLeadingWhiteSpace(m_items[index]->label).foldCase().startsWith(prefixWithCaseFolded)) {
selectIndex(index);
return;
}
@@ -912,6 +911,10 @@ int PopupListBox::pointToRowIndex(const IntPoint& point)
void PopupListBox::acceptIndex(int index)
{
+ // Clear m_acceptedIndexOnAbandon once user accepts the selected index.
+ if (m_acceptedIndexOnAbandon >= 0)
+ m_acceptedIndexOnAbandon = -1;
+
if (index >= numItems())
return;
@@ -1134,7 +1137,7 @@ void PopupListBox::layout()
// Calculate scroll bar width.
int windowHeight = 0;
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
// Set the popup's window to contain all available items on Mac only, which
// uses native controls that manage their own scrolling. This allows hit
// testing to work when selecting items in popups that have more menu entries
@@ -1146,7 +1149,7 @@ void PopupListBox::layout()
for (int i = 0; i < m_visibleRows; ++i) {
int rowHeight = getRowHeight(i);
-#if !PLATFORM(DARWIN)
+#if !OS(DARWIN)
// Only clip the window height for non-Mac platforms.
if (windowHeight + rowHeight > kMaxHeight) {
m_visibleRows = i;
@@ -1224,7 +1227,7 @@ void PopupMenu::show(const IntRect& r, FrameView* v, int index)
{
if (!p.popup)
p.popup = PopupContainer::create(client(), dropDownSettings);
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
p.popup->showExternal(r, v, index);
#else
p.popup->show(r, v, index);
@@ -1234,7 +1237,7 @@ void PopupMenu::show(const IntRect& r, FrameView* v, int index)
void PopupMenu::hide()
{
if (p.popup)
- p.popup->hidePopup();
+ p.popup->hide();
}
void PopupMenu::updateFromElement()
diff --git a/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm b/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm
index b4ebaf6..e532d57 100644
--- a/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm
+++ b/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm
@@ -375,7 +375,7 @@ bool ScrollbarThemeChromiumMac::paint(Scrollbar* scrollbar, GraphicsContext* con
trackInfo.min = 0;
trackInfo.max = scrollbar->maximum();
trackInfo.value = scrollbar->currentPos();
- trackInfo.trackInfo.scrollbar.viewsize = scrollbar->pageStep();
+ trackInfo.trackInfo.scrollbar.viewsize = scrollbar->visibleSize();
trackInfo.attributes = 0;
if (scrollbar->orientation() == HorizontalScrollbar)
trackInfo.attributes |= kThemeTrackHorizontal;
diff --git a/WebCore/platform/graphics/BitmapImage.h b/WebCore/platform/graphics/BitmapImage.h
index 0031df6..485bb02 100644
--- a/WebCore/platform/graphics/BitmapImage.h
+++ b/WebCore/platform/graphics/BitmapImage.h
@@ -140,7 +140,7 @@ public:
virtual CGImageRef getCGImageRef();
#endif
-#if PLATFORM(WIN) || (PLATFORM(QT) && PLATFORM(WIN_OS))
+#if PLATFORM(WIN) || (PLATFORM(QT) && OS(WINDOWS))
static PassRefPtr<BitmapImage> create(HBITMAP);
#endif
#if PLATFORM(WIN)
@@ -173,7 +173,7 @@ protected:
#endif
virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator);
-#if PLATFORM(WX) || (PLATFORM(WINCE) && !PLATFORM(QT))
+#if PLATFORM(WX) || (OS(WINCE) && !PLATFORM(QT))
virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const TransformationMatrix& patternTransform,
const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect);
#endif
@@ -240,7 +240,7 @@ protected:
checkForSolidColor();
// WINCE PORT: checkForSolidColor() doesn't set m_checkedForSolidColor until
// it gets enough information to make final decision.
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
ASSERT(m_checkedForSolidColor);
#endif
}
diff --git a/WebCore/platform/graphics/FloatPoint.h b/WebCore/platform/graphics/FloatPoint.h
index 45a1e83..6b037ff 100644
--- a/WebCore/platform/graphics/FloatPoint.h
+++ b/WebCore/platform/graphics/FloatPoint.h
@@ -36,7 +36,7 @@
typedef struct CGPoint CGPoint;
#endif
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
#ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
typedef struct CGPoint NSPoint;
#else
@@ -85,7 +85,7 @@ public:
#endif
#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) \
- || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+ || (PLATFORM(CHROMIUM) && OS(DARWIN))
FloatPoint(const NSPoint&);
operator NSPoint() const;
#endif
diff --git a/WebCore/platform/graphics/FloatQuad.cpp b/WebCore/platform/graphics/FloatQuad.cpp
index 427230d..d1069fb 100644
--- a/WebCore/platform/graphics/FloatQuad.cpp
+++ b/WebCore/platform/graphics/FloatQuad.cpp
@@ -85,6 +85,12 @@ FloatRect FloatQuad::boundingBox() const
return FloatRect(left, top, right - left, bottom - top);
}
+bool FloatQuad::isRectilinear() const
+{
+ return (m_p1.x() == m_p2.x() && m_p2.y() == m_p3.y() && m_p3.x() == m_p4.x() && m_p4.y() == m_p1.y())
+ || (m_p1.y() == m_p2.y() && m_p2.x() == m_p3.x() && m_p3.y() == m_p4.y() && m_p4.x() == m_p1.x());
+}
+
bool FloatQuad::containsPoint(const FloatPoint& p) const
{
return isPointInTriangle(p, m_p1, m_p2, m_p3) || isPointInTriangle(p, m_p1, m_p3, m_p4);
diff --git a/WebCore/platform/graphics/FloatQuad.h b/WebCore/platform/graphics/FloatQuad.h
index 5982967..6cd86f6 100644
--- a/WebCore/platform/graphics/FloatQuad.h
+++ b/WebCore/platform/graphics/FloatQuad.h
@@ -74,6 +74,12 @@ public:
// "slanted" empty quads.
bool isEmpty() const { return boundingBox().isEmpty(); }
+ // Tests whether this quad can be losslessly represented by a FloatRect,
+ // that is, if two edges are parallel to the x-axis and the other two
+ // are parallel to the y-axis. If this method returns true, the
+ // corresponding FloatRect can be retrieved with boundingBox().
+ bool isRectilinear() const;
+
// Tests whether the given point is inside, or on an edge or corner of this quad.
bool containsPoint(const FloatPoint&) const;
diff --git a/WebCore/platform/graphics/FloatRect.h b/WebCore/platform/graphics/FloatRect.h
index 2dc854d..74a6293 100644
--- a/WebCore/platform/graphics/FloatRect.h
+++ b/WebCore/platform/graphics/FloatRect.h
@@ -33,7 +33,7 @@
typedef struct CGRect CGRect;
#endif
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
#ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
typedef struct CGRect NSRect;
#else
@@ -61,6 +61,10 @@ struct SkRect;
namespace WebCore {
+#if PLATFORM(OPENVG)
+class VGRect;
+#endif
+
class IntRect;
class FloatRect {
@@ -129,7 +133,7 @@ public:
#endif
#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) \
- || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+ || (PLATFORM(CHROMIUM) && OS(DARWIN))
FloatRect(const NSRect&);
operator NSRect() const;
#endif
@@ -154,6 +158,10 @@ public:
operator SkRect() const;
#endif
+#if PLATFORM(OPENVG)
+ operator VGRect() const;
+#endif
+
private:
FloatPoint m_location;
FloatSize m_size;
diff --git a/WebCore/platform/graphics/FloatSize.h b/WebCore/platform/graphics/FloatSize.h
index 5a84fd1..1bc3423 100644
--- a/WebCore/platform/graphics/FloatSize.h
+++ b/WebCore/platform/graphics/FloatSize.h
@@ -34,7 +34,7 @@
typedef struct CGSize CGSize;
#endif
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
#ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
typedef struct CGSize NSSize;
#else
@@ -80,7 +80,7 @@ public:
#endif
#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) \
- || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+ || (PLATFORM(CHROMIUM) && OS(DARWIN))
explicit FloatSize(const NSSize &); // don't do this implicitly since it's lossy
operator NSSize() const;
#endif
diff --git a/WebCore/platform/graphics/Font.cpp b/WebCore/platform/graphics/Font.cpp
index 88774cb..7d0e5a9 100644
--- a/WebCore/platform/graphics/Font.cpp
+++ b/WebCore/platform/graphics/Font.cpp
@@ -24,7 +24,6 @@
#include "config.h"
#include "Font.h"
-#include "CharacterNames.h"
#include "FloatRect.h"
#include "FontCache.h"
#include "FontFallbackList.h"
@@ -266,6 +265,22 @@ FontSelector* Font::fontSelector() const
return m_fontList ? m_fontList->fontSelector() : 0;
}
+String Font::normalizeSpaces(const String& string)
+{
+ unsigned length = string.length();
+ Vector<UChar, 256> buffer(length);
+ bool didReplacement = false;
+
+ for (unsigned i = 0; i < length; ++i) {
+ UChar originalCharacter = string[i];
+ buffer[i] = normalizeSpaces(originalCharacter);
+ if (buffer[i] != originalCharacter)
+ didReplacement = true;
+ }
+
+ return didReplacement ? String(buffer.data(), length) : string;
+}
+
static bool shouldUseFontSmoothing = true;
void Font::setShouldUseSmoothing(bool shouldUseSmoothing)
diff --git a/WebCore/platform/graphics/Font.h b/WebCore/platform/graphics/Font.h
index c067071..3c07be7 100644
--- a/WebCore/platform/graphics/Font.h
+++ b/WebCore/platform/graphics/Font.h
@@ -25,10 +25,13 @@
#ifndef Font_h
#define Font_h
+#include "CharacterNames.h"
#include "TextRun.h"
#include "FontDescription.h"
#include "SimpleFontData.h"
+#include "TypesettingFeatures.h"
#include <wtf/HashMap.h>
+#include <wtf/HashSet.h>
#include <wtf/MathExtras.h>
#if PLATFORM(QT)
@@ -96,6 +99,12 @@ public:
FontRenderingMode renderingMode() const { return m_fontDescription.renderingMode(); }
+ TypesettingFeatures typesettingFeatures() const
+ {
+ TextRenderingMode textRenderingMode = m_fontDescription.textRenderingMode();
+ return textRenderingMode == OptimizeLegibility || textRenderingMode == GeometricPrecision ? Kerning | Ligatures : 0;
+ }
+
FontFamily& firstFamily() { return m_fontDescription.firstFamily(); }
const FontFamily& family() const { return m_fontDescription.family(); }
@@ -175,6 +184,19 @@ public:
static bool treatAsSpace(UChar c) { return c == ' ' || c == '\t' || c == '\n' || c == 0x00A0; }
static bool treatAsZeroWidthSpace(UChar c) { return c < 0x20 || (c >= 0x7F && c < 0xA0) || c == 0x200e || c == 0x200f || (c >= 0x202a && c <= 0x202e) || c == 0xFFFC; }
+ static inline UChar normalizeSpaces(UChar character)
+ {
+ if (treatAsSpace(character))
+ return space;
+
+ if (treatAsZeroWidthSpace(character))
+ return zeroWidthSpace;
+
+ return character;
+ }
+
+ static String normalizeSpaces(const String&);
+
#if ENABLE(SVG_FONTS)
bool isSVGFont() const;
SVGFontElement* svgFont() const;
diff --git a/WebCore/platform/graphics/FontCache.cpp b/WebCore/platform/graphics/FontCache.cpp
index 06ea56b..2aa68f1 100644
--- a/WebCore/platform/graphics/FontCache.cpp
+++ b/WebCore/platform/graphics/FontCache.cpp
@@ -53,7 +53,7 @@ FontCache::FontCache()
{
}
-struct FontPlatformDataCacheKey {
+struct FontPlatformDataCacheKey : FastAllocBase {
FontPlatformDataCacheKey(const AtomicString& family = AtomicString(), unsigned size = 0, unsigned weight = 0, bool italic = false,
bool isPrinterFont = false, FontRenderingMode renderingMode = NormalRenderingMode)
: m_family(family)
@@ -139,7 +139,7 @@ static const AtomicString& alternateFamilyName(const AtomicString& familyName)
DEFINE_STATIC_LOCAL(AtomicString, courierNew, ("Courier New"));
if (equalIgnoringCase(familyName, courier))
return courierNew;
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
// On Windows, Courier New (truetype font) is always present and
// Courier is a bitmap font. So, we don't want to map Courier New to
// Courier.
@@ -163,7 +163,7 @@ static const AtomicString& alternateFamilyName(const AtomicString& familyName)
if (equalIgnoringCase(familyName, helvetica))
return arial;
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// On Windows, bitmap fonts are blocked altogether so that we have to
// alias MS Sans Serif (bitmap font) -> Microsoft Sans Serif (truetype font)
DEFINE_STATIC_LOCAL(AtomicString, msSans, ("MS Sans Serif"));
diff --git a/WebCore/platform/graphics/FontCache.h b/WebCore/platform/graphics/FontCache.h
index 4a6222b..9b41e38 100644
--- a/WebCore/platform/graphics/FontCache.h
+++ b/WebCore/platform/graphics/FontCache.h
@@ -64,7 +64,7 @@ public:
// Also implemented by the platform.
void platformInit();
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
#if defined(IMLANG_FONT_LINK) && (IMLANG_FONT_LINK == 2)
IMLangFontLink2* getFontLinkInterface();
#else
diff --git a/WebCore/platform/graphics/FontFastPath.cpp b/WebCore/platform/graphics/FontFastPath.cpp
index 5246593..428e85e 100644
--- a/WebCore/platform/graphics/FontFastPath.cpp
+++ b/WebCore/platform/graphics/FontFastPath.cpp
@@ -135,13 +135,7 @@ GlyphData Font::glyphDataForCharacter(UChar32 c, bool mirror, bool forceSmallCap
UChar codeUnits[2];
int codeUnitsLength;
if (c <= 0xFFFF) {
- UChar c16 = c;
- if (Font::treatAsSpace(c16))
- codeUnits[0] = ' ';
- else if (Font::treatAsZeroWidthSpace(c16))
- codeUnits[0] = zeroWidthSpace;
- else
- codeUnits[0] = c16;
+ codeUnits[0] = Font::normalizeSpaces(c);
codeUnitsLength = 1;
} else {
codeUnits[0] = U16_LEAD(c);
@@ -157,7 +151,7 @@ GlyphData Font::glyphDataForCharacter(UChar32 c, bool mirror, bool forceSmallCap
GlyphData data = fallbackPage && fallbackPage->fontDataForCharacter(c) ? fallbackPage->glyphDataForCharacter(c) : characterFontData->missingGlyphData();
// Cache it so we don't have to do system fallback again next time.
if (!useSmallCapsFont) {
-#if PLATFORM(WINCE)
+#if OS(WINCE)
// missingGlyphData returns a null character, which is not suitable for GDI to display.
// Also, sometimes we cannot map a font for the character on WINCE, but GDI can still
// display the character, probably because the font package is not installed correctly.
@@ -175,7 +169,7 @@ GlyphData Font::glyphDataForCharacter(UChar32 c, bool mirror, bool forceSmallCap
// FIXME: It would be nicer to use the missing glyph from the last resort font instead.
GlyphData data = primaryFont()->missingGlyphData();
if (!useSmallCapsFont) {
-#if PLATFORM(WINCE)
+#if OS(WINCE)
// See comment about WINCE GDI handling near setGlyphDataForCharacter above.
page->setGlyphDataForCharacter(c, c, data.fontData);
return page->glyphDataForCharacter(c);
@@ -251,8 +245,7 @@ bool Font::canUseGlyphCache(const TextRun& run) const
return false;
}
- TextRenderingMode textMode = m_fontDescription.textRenderingMode();
- if (textMode == OptimizeLegibility || textMode == GeometricPrecision)
+ if (typesettingFeatures())
return false;
return true;
diff --git a/WebCore/platform/graphics/GeneratedImage.cpp b/WebCore/platform/graphics/GeneratedImage.cpp
index eec7ffb..8395aff 100644
--- a/WebCore/platform/graphics/GeneratedImage.cpp
+++ b/WebCore/platform/graphics/GeneratedImage.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 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
@@ -10,17 +10,17 @@
* 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.
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -50,19 +50,24 @@ void GeneratedImage::draw(GraphicsContext* context, const FloatRect& dstRect, co
void GeneratedImage::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const TransformationMatrix& patternTransform,
const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator compositeOp, const FloatRect& destRect)
{
+ // Allow the generator to provide visually-equivalent tiling parameters for better performance.
+ IntSize adjustedSize = m_size;
+ FloatRect adjustedSrcRect = srcRect;
+ m_generator->adjustParametersForTiledDrawing(adjustedSize, adjustedSrcRect);
+
// Create a BitmapImage and call drawPattern on it.
- OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(m_size);
+ OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(adjustedSize);
ASSERT(imageBuffer.get());
-
+
// Fill with the gradient.
GraphicsContext* graphicsContext = imageBuffer->context();
- graphicsContext->fillRect(FloatRect(FloatPoint(), m_size), *m_generator.get());
-
+ graphicsContext->fillRect(FloatRect(FloatPoint(), adjustedSize), *m_generator.get());
+
// Grab the final image from the image buffer.
Image* bitmap = imageBuffer->image();
-
+
// Now just call drawTiled on that image.
- bitmap->drawPattern(context, srcRect, patternTransform, phase, styleColorSpace, compositeOp, destRect);
+ bitmap->drawPattern(context, adjustedSrcRect, patternTransform, phase, styleColorSpace, compositeOp, destRect);
}
}
diff --git a/WebCore/platform/graphics/Generator.h b/WebCore/platform/graphics/Generator.h
index a0af689..b64d051 100644
--- a/WebCore/platform/graphics/Generator.h
+++ b/WebCore/platform/graphics/Generator.h
@@ -38,6 +38,7 @@ public:
virtual ~Generator() {};
virtual void fill(GraphicsContext*, const FloatRect&) = 0;
+ virtual void adjustParametersForTiledDrawing(IntSize& /* size */, FloatRect& /* srcRect */) { }
};
} //namespace
diff --git a/WebCore/platform/graphics/GlyphBuffer.h b/WebCore/platform/graphics/GlyphBuffer.h
index 04491a7..edb804c 100644
--- a/WebCore/platform/graphics/GlyphBuffer.h
+++ b/WebCore/platform/graphics/GlyphBuffer.h
@@ -50,7 +50,7 @@ class SimpleFontData;
#if PLATFORM(CAIRO)
// FIXME: Why does Cairo use such a huge struct instead of just an offset into an array?
typedef cairo_glyph_t GlyphBufferGlyph;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
typedef wchar_t GlyphBufferGlyph;
#else
typedef Glyph GlyphBufferGlyph;
@@ -60,7 +60,7 @@ typedef Glyph GlyphBufferGlyph;
// can be passed directly to CGContextShowGlyphsWithAdvances in FontMac.mm
#if PLATFORM(CG)
typedef CGSize GlyphBufferAdvance;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
// There is no cross-platform code that uses the height of GlyphBufferAdvance,
// so we can save memory space on embedded devices by storing only the width
typedef float GlyphBufferAdvance;
@@ -124,7 +124,7 @@ public:
{
#if PLATFORM(CG)
return m_advances[index].width;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
return m_advances[index];
#else
return m_advances[index].width();
@@ -156,7 +156,7 @@ public:
#if PLATFORM(CG)
CGSize advance = { width, 0 };
m_advances.append(advance);
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
m_advances.append(width);
#else
m_advances.append(FloatSize(width, 0));
@@ -172,7 +172,7 @@ public:
#endif
}
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
void add(Glyph glyph, const SimpleFontData* font, GlyphBufferAdvance advance)
{
m_fontData.append(font);
diff --git a/WebCore/platform/graphics/Gradient.cpp b/WebCore/platform/graphics/Gradient.cpp
index 204a2b6..17d461f 100644
--- a/WebCore/platform/graphics/Gradient.cpp
+++ b/WebCore/platform/graphics/Gradient.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
* Copyright (C) 2007 Alp Toker <alp@atoker.com>
*
* Redistribution and use in source and binary forms, with or without
@@ -28,6 +28,8 @@
#include "Gradient.h"
#include "Color.h"
+#include "FloatRect.h"
+#include <wtf/UnusedParam.h>
namespace WebCore {
@@ -62,6 +64,28 @@ Gradient::~Gradient()
platformDestroy();
}
+void Gradient::adjustParametersForTiledDrawing(IntSize& size, FloatRect& srcRect)
+{
+ if (m_radial)
+ return;
+
+ if (srcRect.isEmpty())
+ return;
+
+ if (m_p0.x() == m_p1.x()) {
+ size.setWidth(1);
+ srcRect.setWidth(1);
+ srcRect.setX(0);
+ return;
+ }
+ if (m_p0.y() != m_p1.y())
+ return;
+
+ size.setHeight(1);
+ srcRect.setHeight(1);
+ srcRect.setY(0);
+}
+
void Gradient::addColorStop(float value, const Color& color)
{
float r;
@@ -81,6 +105,16 @@ static inline bool compareStops(const Gradient::ColorStop& a, const Gradient::Co
return a.stop < b.stop;
}
+void Gradient::sortStopsIfNecessary()
+{
+ if (m_stopsSorted)
+ return;
+
+ if (m_stops.size())
+ std::stable_sort(m_stops.begin(), m_stops.end(), compareStops);
+ m_stopsSorted = true;
+}
+
void Gradient::getColor(float value, float* r, float* g, float* b, float* a) const
{
ASSERT(value >= 0);
diff --git a/WebCore/platform/graphics/Gradient.h b/WebCore/platform/graphics/Gradient.h
index 011a2cd..b65550d 100644
--- a/WebCore/platform/graphics/Gradient.h
+++ b/WebCore/platform/graphics/Gradient.h
@@ -36,8 +36,15 @@
#include <wtf/Vector.h>
#if PLATFORM(CG)
+
+#ifdef BUILDING_ON_TIGER
typedef struct CGShading* CGShadingRef;
typedef CGShadingRef PlatformGradient;
+#else
+typedef struct CGGradient* CGGradientRef;
+typedef CGGradientRef PlatformGradient;
+#endif
+
#elif PLATFORM(QT)
QT_BEGIN_NAMESPACE
class QGradient;
@@ -79,7 +86,7 @@ namespace WebCore {
void getColor(float value, float* r, float* g, float* b, float* a) const;
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
const FloatPoint& p0() const { return m_p0; }
const FloatPoint& p1() const { return m_p1; }
float r0() const { return m_r0; }
@@ -105,7 +112,7 @@ namespace WebCore {
};
void setStopsSorted(bool s) { m_stopsSorted = s; }
-
+
void setSpreadMethod(GradientSpreadMethod);
GradientSpreadMethod spreadMethod() { return m_spreadMethod; }
void setGradientSpaceTransform(const TransformationMatrix& gradientSpaceTransformation);
@@ -113,8 +120,13 @@ namespace WebCore {
TransformationMatrix gradientSpaceTransform() { return m_gradientSpaceTransformation; }
virtual void fill(GraphicsContext*, const FloatRect&);
+ virtual void adjustParametersForTiledDrawing(IntSize& size, FloatRect& srcRect);
+
void setPlatformGradientSpaceTransform(const TransformationMatrix& gradientSpaceTransformation);
+#if PLATFORM(CG)
+ void paint(GraphicsContext*);
+#endif
private:
Gradient(const FloatPoint& p0, const FloatPoint& p1);
Gradient(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1);
@@ -123,6 +135,7 @@ namespace WebCore {
void platformDestroy();
int findStop(float value) const;
+ void sortStopsIfNecessary();
bool m_radial;
FloatPoint m_p0;
diff --git a/WebCore/platform/graphics/GraphicsContext.cpp b/WebCore/platform/graphics/GraphicsContext.cpp
index e80004f..eac8bcd 100644
--- a/WebCore/platform/graphics/GraphicsContext.cpp
+++ b/WebCore/platform/graphics/GraphicsContext.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -10,17 +10,17 @@
* 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.
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -328,7 +328,7 @@ void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const
drawImage(image, styleColorSpace, FloatRect(dest), srcRect, op, useLowQualityScale);
}
-#if !PLATFORM(WINCE) || PLATFORM(QT)
+#if !OS(WINCE) || PLATFORM(QT)
void GraphicsContext::drawText(const Font& font, const TextRun& run, const IntPoint& point, int from, int to)
{
if (paintingDisabled())
@@ -382,55 +382,6 @@ void GraphicsContext::drawHighlightForText(const Font& font, const TextRun& run,
fillRect(font.selectionRectForText(run, point, h, from, to), backgroundColor, colorSpace);
}
-void GraphicsContext::initFocusRing(int width, int offset)
-{
- if (paintingDisabled())
- return;
- clearFocusRing();
-
- m_common->m_focusRingWidth = width;
- m_common->m_focusRingOffset = offset;
-}
-
-void GraphicsContext::clearFocusRing()
-{
- m_common->m_focusRingRects.clear();
-}
-
-IntRect GraphicsContext::focusRingBoundingRect()
-{
- IntRect result = IntRect(0, 0, 0, 0);
-
- const Vector<IntRect>& rects = focusRingRects();
- unsigned rectCount = rects.size();
- for (unsigned i = 0; i < rectCount; i++)
- result.unite(rects[i]);
-
- return result;
-}
-
-void GraphicsContext::addFocusRingRect(const IntRect& rect)
-{
- if (paintingDisabled() || rect.isEmpty())
- return;
- m_common->m_focusRingRects.append(rect);
-}
-
-int GraphicsContext::focusRingWidth() const
-{
- return m_common->m_focusRingWidth;
-}
-
-int GraphicsContext::focusRingOffset() const
-{
- return m_common->m_focusRingOffset;
-}
-
-const Vector<IntRect>& GraphicsContext::focusRingRects() const
-{
- return m_common->m_focusRingRects;
-}
-
void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, bool useLowQualityScale)
{
if (paintingDisabled() || !image)
@@ -460,24 +411,35 @@ void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const
restore();
}
-void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const IntRect& rect, const IntPoint& srcPoint, const IntSize& tileSize, CompositeOperator op)
+void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const IntRect& rect, const IntPoint& srcPoint, const IntSize& tileSize, CompositeOperator op, bool useLowQualityScale)
{
if (paintingDisabled() || !image)
return;
-
+ if (useLowQualityScale) {
+ save();
+ setImageInterpolationQuality(InterpolationLow);
+ }
image->drawTiled(this, rect, srcPoint, tileSize, styleColorSpace, op);
+ if (useLowQualityScale)
+ restore();
}
-void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const IntRect& dest, const IntRect& srcRect, Image::TileRule hRule, Image::TileRule vRule, CompositeOperator op)
+void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const IntRect& dest, const IntRect& srcRect, Image::TileRule hRule, Image::TileRule vRule, CompositeOperator op, bool useLowQualityScale)
{
if (paintingDisabled() || !image)
return;
+ if (useLowQualityScale) {
+ save();
+ setImageInterpolationQuality(InterpolationLow);
+ }
if (hRule == Image::StretchTile && vRule == Image::StretchTile)
// Just do a scale.
- return drawImage(image, styleColorSpace, dest, srcRect, op);
-
- image->drawTiled(this, dest, srcRect, hRule, vRule, styleColorSpace, op);
+ drawImage(image, styleColorSpace, dest, srcRect, op);
+ else
+ image->drawTiled(this, dest, srcRect, hRule, vRule, styleColorSpace, op);
+ if (useLowQualityScale)
+ restore();
}
void GraphicsContext::addRoundedRectClip(const IntRect& rect, const IntSize& topLeft, const IntSize& topRight,
@@ -544,7 +506,11 @@ void GraphicsContext::setPlatformTextDrawingMode(int mode)
}
#endif
+<<<<<<< HEAD
#if !PLATFORM(QT) && !PLATFORM(CAIRO) && !(PLATFORM(SKIA) && !PLATFORM(ANDROID)) && !PLATFORM(HAIKU)
+=======
+#if !PLATFORM(QT) && !PLATFORM(CAIRO) && !PLATFORM(SKIA) && !PLATFORM(HAIKU) && !PLATFORM(OPENVG)
+>>>>>>> webkit.org at r54127
void GraphicsContext::setPlatformStrokeStyle(const StrokeStyle&)
{
}
diff --git a/WebCore/platform/graphics/GraphicsContext.h b/WebCore/platform/graphics/GraphicsContext.h
index ecf2101..063c490 100644
--- a/WebCore/platform/graphics/GraphicsContext.h
+++ b/WebCore/platform/graphics/GraphicsContext.h
@@ -41,6 +41,11 @@
typedef struct CGContext PlatformGraphicsContext;
#elif PLATFORM(CAIRO)
typedef struct _cairo PlatformGraphicsContext;
+#elif PLATFORM(OPENVG)
+namespace WebCore {
+class SurfaceOpenVG;
+}
+typedef class WebCore::SurfaceOpenVG PlatformGraphicsContext;
#elif PLATFORM(QT)
QT_BEGIN_NAMESPACE
class QPainter;
@@ -79,7 +84,7 @@ typedef class PlatformContextSkia PlatformGraphicsContext;
class BView;
typedef BView PlatformGraphicsContext;
struct pattern;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
typedef struct HDC__ PlatformGraphicsContext;
#else
typedef void PlatformGraphicsContext;
@@ -104,7 +109,7 @@ typedef unsigned char UInt8;
namespace WebCore {
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
class SharedBitmap;
class SimpleFontData;
class GlyphBuffer;
@@ -152,7 +157,7 @@ namespace WebCore {
GraphicsContext(PlatformGraphicsContext*);
~GraphicsContext();
-#if !PLATFORM(WINCE) || PLATFORM(QT)
+#if !OS(WINCE) || PLATFORM(QT)
PlatformGraphicsContext* platformContext() const;
#endif
@@ -255,10 +260,10 @@ namespace WebCore {
void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect = FloatRect(0, 0, -1, -1),
CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntPoint& srcPoint, const IntSize& tileSize,
- CompositeOperator = CompositeSourceOver);
+ CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntRect& srcRect,
Image::TileRule hRule = Image::StretchTile, Image::TileRule vRule = Image::StretchTile,
- CompositeOperator = CompositeSourceOver);
+ CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
void setImageInterpolationQuality(InterpolationQuality);
InterpolationQuality imageInterpolationQuality() const;
@@ -297,11 +302,8 @@ namespace WebCore {
bool getShadow(IntSize&, int&, Color&) const;
void clearShadow();
- void initFocusRing(int width, int offset);
- void addFocusRingRect(const IntRect&);
- void drawFocusRing(const Color&);
- void clearFocusRing();
- IntRect focusRingBoundingRect();
+ void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Color&);
+ void drawFocusRing(const Vector<Path>&, int width, int offset, const Color&);
void setLineCap(LineCap);
void setLineDash(const DashArray&, float dashOffset);
@@ -330,6 +332,7 @@ namespace WebCore {
void scale(const FloatSize&);
void rotate(float angleInRadians);
+ void translate(const FloatSize& size) { translate(size.width(), size.height()); }
void translate(float x, float y);
IntPoint origin();
@@ -338,7 +341,7 @@ namespace WebCore {
void concatCTM(const TransformationMatrix&);
TransformationMatrix getCTM() const;
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
void setBitmap(PassRefPtr<SharedBitmap>);
const TransformationMatrix& affineTransform() const;
TransformationMatrix& affineTransform();
@@ -396,7 +399,7 @@ namespace WebCore {
void drawWindowsBitmap(WindowsBitmap*, const IntPoint&);
#endif
-#if (PLATFORM(QT) && defined(Q_WS_WIN)) || (PLATFORM(WX) && PLATFORM(WIN_OS))
+#if (PLATFORM(QT) && defined(Q_WS_WIN)) || (PLATFORM(WX) && OS(WINDOWS))
HDC getWindowsContext(const IntRect&, bool supportAlphaBlend = true, bool mayCreateBitmap = true);
void releaseWindowsContext(HDC, const IntRect&, bool supportAlphaBlend = true, bool mayCreateBitmap = true);
bool shouldIncludeChildWindows() const { return false; }
@@ -446,10 +449,6 @@ namespace WebCore {
static void adjustLineToPixelBoundaries(FloatPoint& p1, FloatPoint& p2, float strokeWidth, const StrokeStyle&);
- int focusRingWidth() const;
- int focusRingOffset() const;
- const Vector<IntRect>& focusRingRects() const;
-
static GraphicsContextPrivate* createGraphicsContextPrivate();
static void destroyGraphicsContextPrivate(GraphicsContextPrivate*);
diff --git a/WebCore/platform/graphics/GraphicsContext3D.h b/WebCore/platform/graphics/GraphicsContext3D.h
index aad8dd4..d7406c9 100644
--- a/WebCore/platform/graphics/GraphicsContext3D.h
+++ b/WebCore/platform/graphics/GraphicsContext3D.h
@@ -33,7 +33,7 @@
#include <wtf/PassOwnPtr.h>
// FIXME: Find a better way to avoid the name confliction for NO_ERROR.
-#if PLATFORM(CHROMIUM) && PLATFORM(WIN_OS)
+#if PLATFORM(CHROMIUM) && OS(WINDOWS)
#undef NO_ERROR
#endif
@@ -65,9 +65,6 @@ namespace WebCore {
class WebGLShader;
class WebGLTexture;
class Image;
- class HTMLVideoElement;
- class ImageData;
- class WebKitCSSMatrix;
struct ActiveInfo {
String name;
@@ -385,7 +382,25 @@ namespace WebCore {
INVALID_FRAMEBUFFER_OPERATION = 0x0506
};
- static PassOwnPtr<GraphicsContext3D> create();
+ // Context creation attributes.
+ struct Attributes {
+ Attributes()
+ : alpha(true)
+ , depth(true)
+ , stencil(true)
+ , antialias(true)
+ , premultipliedAlpha(true)
+ {
+ }
+
+ bool alpha;
+ bool depth;
+ bool stencil;
+ bool antialias;
+ bool premultipliedAlpha;
+ };
+
+ static PassOwnPtr<GraphicsContext3D> create(Attributes attrs);
virtual ~GraphicsContext3D();
#if PLATFORM(MAC)
@@ -462,6 +477,8 @@ namespace WebCore {
void getBufferParameteriv(unsigned long target, unsigned long pname, int* value);
+ Attributes getContextAttributes();
+
unsigned long getError();
void getFloatv(unsigned long pname, float* value);
@@ -528,32 +545,14 @@ namespace WebCore {
// These next several functions return an error code (0 if no errors) rather than using an ExceptionCode.
// Currently they return -1 on any error.
- int texImage2D(unsigned target, unsigned level, unsigned internalformat,
- unsigned width, unsigned height, unsigned border,
- unsigned format, unsigned type, WebGLArray* pixels);
- int texImage2D(unsigned target, unsigned level, unsigned internalformat,
- unsigned width, unsigned height, unsigned border,
- unsigned format, unsigned type, ImageData* pixels);
- int texImage2D(unsigned target, unsigned level, Image* image,
- bool flipY, bool premultiplyAlpha);
- int texImage2D(unsigned target, unsigned level, HTMLVideoElement* video,
- bool flipY, bool premultiplyAlpha);
+ int texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, void* pixels);
+ int texImage2D(unsigned target, unsigned level, Image* image, bool flipY, bool premultiplyAlpha);
void texParameterf(unsigned target, unsigned pname, float param);
void texParameteri(unsigned target, unsigned pname, int param);
- int texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
- unsigned width, unsigned height,
- unsigned format, unsigned type, WebGLArray* pixels);
- int texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
- unsigned width, unsigned height,
- unsigned format, unsigned type, ImageData* pixels);
- int texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
- unsigned width, unsigned height, Image* image,
- bool flipY, bool premultiplyAlpha);
- int texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
- unsigned width, unsigned height, HTMLVideoElement* video,
- bool flipY, bool premultiplyAlpha);
+ int texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset, unsigned width, unsigned height, unsigned format, unsigned type, void* pixels);
+ int texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset, Image* image, bool flipY, bool premultiplyAlpha);
void uniform1f(long location, float x);
void uniform1fv(long location, float* v, int size);
@@ -623,11 +622,12 @@ namespace WebCore {
void synthesizeGLError(unsigned long error);
private:
- GraphicsContext3D();
+ GraphicsContext3D(Attributes attrs);
int m_currentWidth, m_currentHeight;
#if PLATFORM(MAC)
+ Attributes m_attrs;
Vector<Vector<float> > m_vertexArray;
CGLContextObj m_contextObj;
diff --git a/WebCore/platform/graphics/GraphicsContextPrivate.h b/WebCore/platform/graphics/GraphicsContextPrivate.h
index c532162..1980337 100644
--- a/WebCore/platform/graphics/GraphicsContextPrivate.h
+++ b/WebCore/platform/graphics/GraphicsContextPrivate.h
@@ -48,7 +48,7 @@ namespace WebCore {
, shadowBlur(0)
, shadowsIgnoreTransforms(false)
#if PLATFORM(CAIRO)
- , globalAlpha(1.0f)
+ , globalAlpha(1)
#endif
{
}
@@ -87,17 +87,12 @@ namespace WebCore {
class GraphicsContextPrivate : public Noncopyable {
public:
GraphicsContextPrivate()
- : m_focusRingWidth(0)
- , m_focusRingOffset(0)
- , m_updatingControlTints(false)
+ : m_updatingControlTints(false)
{
}
GraphicsContextState state;
Vector<GraphicsContextState> stack;
- Vector<IntRect> m_focusRingRects;
- int m_focusRingWidth;
- int m_focusRingOffset;
bool m_updatingControlTints;
};
diff --git a/WebCore/platform/graphics/GraphicsLayer.cpp b/WebCore/platform/graphics/GraphicsLayer.cpp
index e215097..2336d0b 100644
--- a/WebCore/platform/graphics/GraphicsLayer.cpp
+++ b/WebCore/platform/graphics/GraphicsLayer.cpp
@@ -72,6 +72,8 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
, m_contentsOrientation(CompositingCoordinatesTopDown)
, m_parent(0)
, m_maskLayer(0)
+ , m_replicaLayer(0)
+ , m_replicatedLayer(0)
, m_repaintCount(0)
{
}
@@ -214,6 +216,14 @@ void GraphicsLayer::removeFromParent()
}
}
+void GraphicsLayer::setReplicatedByLayer(GraphicsLayer* layer)
+{
+ if (layer)
+ layer->setReplicatedLayer(this);
+
+ m_replicaLayer = layer;
+}
+
void GraphicsLayer::setBackgroundColor(const Color& color)
{
m_backgroundColor = color;
@@ -454,14 +464,27 @@ void GraphicsLayer::dumpProperties(TextStream& ts, int indent) const
}
ts << ")\n";
- writeIndent(ts, indent + 1);
- ts << "(children " << m_children.size() << "\n";
+ if (m_replicaLayer) {
+ writeIndent(ts, indent + 1);
+ ts << "(replica layer " << m_replicaLayer << ")\n";
+ m_replicaLayer->dumpLayer(ts, indent+2);
+ }
+
+ if (m_replicatedLayer) {
+ writeIndent(ts, indent + 1);
+ ts << "(replicated layer " << m_replicatedLayer << ")\n";
+ }
- unsigned i;
- for (i = 0; i < m_children.size(); i++)
- m_children[i]->dumpLayer(ts, indent+2);
- writeIndent(ts, indent + 1);
- ts << ")\n";
+ if (m_children.size()) {
+ writeIndent(ts, indent + 1);
+ ts << "(children " << m_children.size() << "\n";
+
+ unsigned i;
+ for (i = 0; i < m_children.size(); i++)
+ m_children[i]->dumpLayer(ts, indent+2);
+ writeIndent(ts, indent + 1);
+ ts << ")\n";
+ }
}
} // namespace WebCore
diff --git a/WebCore/platform/graphics/GraphicsLayer.h b/WebCore/platform/graphics/GraphicsLayer.h
index 0456bad..844301e 100644
--- a/WebCore/platform/graphics/GraphicsLayer.h
+++ b/WebCore/platform/graphics/GraphicsLayer.h
@@ -59,6 +59,10 @@ class WKCACFLayer;
typedef WKCACFLayer PlatformLayer;
typedef void* NativeLayer;
}
+#elif PLATFORM(QT)
+class QGraphicsItem;
+typedef QGraphicsItem PlatformLayer;
+typedef QGraphicsItem* NativeLayer;
#else
typedef void* PlatformLayer;
typedef void* NativeLayer;
@@ -198,6 +202,16 @@ public:
GraphicsLayer* maskLayer() const { return m_maskLayer; }
virtual void setMaskLayer(GraphicsLayer* layer) { m_maskLayer = layer; }
+ // The given layer will replicate this layer and its children; the replica renders behind this layer.
+ virtual void setReplicatedByLayer(GraphicsLayer*);
+ // Whether this layer is being replicated by another layer.
+ bool isReplicated() const { return m_replicaLayer; }
+ // The layer that replicates this layer (if any).
+ GraphicsLayer* replicaLayer() const { return m_replicaLayer; }
+
+ const FloatPoint& replicatedLayerPosition() const { return m_replicatedLayerPosition; }
+ void setReplicatedLayerPosition(const FloatPoint& p) { m_replicatedLayerPosition = p; }
+
// Offset is origin of the renderer minus origin of the graphics layer (so either zero or negative).
IntSize offsetFromRenderer() const { return m_offsetFromRenderer; }
void setOffsetFromRenderer(const IntSize& offset) { m_offsetFromRenderer = offset; }
@@ -260,17 +274,17 @@ public:
// Return true if the animation is handled by the compositing system. If this returns
// false, the animation will be run by AnimationController.
- virtual bool addAnimation(const KeyframeValueList&, const IntSize& /*boxSize*/, const Animation*, const String& /*keyframesName*/, double /*beginTime*/) { return false; }
+ virtual bool addAnimation(const KeyframeValueList&, const IntSize& /*boxSize*/, const Animation*, const String& /*keyframesName*/, double /*timeOffset*/) { return false; }
virtual void removeAnimationsForProperty(AnimatedPropertyID) { }
virtual void removeAnimationsForKeyframes(const String& /* keyframesName */) { }
- virtual void pauseAnimation(const String& /* keyframesName */) { }
+ virtual void pauseAnimation(const String& /* keyframesName */, double /*timeOffset*/) { }
virtual void suspendAnimations(double time);
virtual void resumeAnimations();
// Layer contents
virtual void setContentsToImage(Image*) { }
- virtual void setContentsToVideo(PlatformLayer*) { }
+ virtual void setContentsToMedia(PlatformLayer*) { } // video or plug-in
virtual void setContentsBackgroundColor(const Color&) { }
#if ENABLE(3D_CANVAS)
@@ -279,6 +293,8 @@ public:
#endif
// Callback from the underlying graphics system to draw layer contents.
void paintGraphicsLayerContents(GraphicsContext&, const IntRect& clip);
+ // Callback from the underlying graphics system when the layer has been displayed
+ virtual void didDisplay(PlatformLayer*) { }
virtual PlatformLayer* platformLayer() const { return 0; }
@@ -327,6 +343,10 @@ protected:
virtual void setOpacityInternal(float) { }
+ // The layer being replicated.
+ GraphicsLayer* replicatedLayer() const { return m_replicatedLayer; }
+ virtual void setReplicatedLayer(GraphicsLayer* layer) { m_replicatedLayer = layer; }
+
GraphicsLayer(GraphicsLayerClient*);
void dumpProperties(TextStream&, int indent) const;
@@ -365,6 +385,11 @@ protected:
GraphicsLayer* m_maskLayer; // Reference to mask layer. We don't own this.
+ GraphicsLayer* m_replicaLayer; // A layer that replicates this layer. We only allow one, for now.
+ // The replica is not parented; this is the primary reference to it.
+ GraphicsLayer* m_replicatedLayer; // For a replica layer, a reference to the original layer.
+ FloatPoint m_replicatedLayerPosition; // For a replica layer, the position of the replica.
+
IntRect m_contentsRect;
int m_repaintCount;
diff --git a/WebCore/platform/graphics/Image.h b/WebCore/platform/graphics/Image.h
index f25169b..234104a 100644
--- a/WebCore/platform/graphics/Image.h
+++ b/WebCore/platform/graphics/Image.h
@@ -154,6 +154,7 @@ public:
#if PLATFORM(GTK)
virtual GdkPixbuf* getGdkPixbuf() { return 0; }
+ static PassRefPtr<Image> loadPlatformThemeIcon(const char* name, int size);
#endif
protected:
diff --git a/WebCore/platform/graphics/ImageSource.cpp b/WebCore/platform/graphics/ImageSource.cpp
index bf7ae21..c2366c1 100644
--- a/WebCore/platform/graphics/ImageSource.cpp
+++ b/WebCore/platform/graphics/ImageSource.cpp
@@ -35,12 +35,6 @@
#include "ImageDecoder.h"
#endif
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
-#ifndef IMAGE_DECODER_DOWN_SAMPLING_MAX_NUMBER_OF_PIXELS
-#define IMAGE_DECODER_DOWN_SAMPLING_MAX_NUMBER_OF_PIXELS (1024 * 1024)
-#endif
-#endif
-
namespace WebCore {
ImageSource::ImageSource()
@@ -81,6 +75,9 @@ void ImageSource::setData(SharedBuffer* data, bool allDataReceived)
if (!m_decoder) {
m_decoder = static_cast<NativeImageSourcePtr>(ImageDecoder::create(*data));
#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
+#ifndef IMAGE_DECODER_DOWN_SAMPLING_MAX_NUMBER_OF_PIXELS
+#define IMAGE_DECODER_DOWN_SAMPLING_MAX_NUMBER_OF_PIXELS (1024 * 1024)
+#endif
if (m_decoder)
m_decoder->setMaxNumPixels(IMAGE_DECODER_DOWN_SAMPLING_MAX_NUMBER_OF_PIXELS);
#endif
diff --git a/WebCore/platform/graphics/ImageSource.h b/WebCore/platform/graphics/ImageSource.h
index 083c7b0..cc40f5e 100644
--- a/WebCore/platform/graphics/ImageSource.h
+++ b/WebCore/platform/graphics/ImageSource.h
@@ -55,7 +55,7 @@ class NativeImageSkia;
#endif
#elif PLATFORM(HAIKU)
class BBitmap;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
#include "SharedBitmap.h"
#endif
@@ -105,7 +105,7 @@ typedef wxBitmap* NativeImagePtr;
typedef cairo_surface_t* NativeImagePtr;
#elif PLATFORM(HAIKU)
typedef BBitmap* NativeImagePtr;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
typedef RefPtr<SharedBitmap> NativeImagePtr;
#endif
#endif
diff --git a/WebCore/platform/graphics/IntRect.cpp b/WebCore/platform/graphics/IntRect.cpp
index 622e525..188b5f9 100644
--- a/WebCore/platform/graphics/IntRect.cpp
+++ b/WebCore/platform/graphics/IntRect.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -10,17 +10,17 @@
* 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.
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -104,4 +104,15 @@ void IntRect::scale(float s)
m_size.setHeight((int)(height() * s));
}
+IntRect unionRect(const Vector<IntRect>& rects)
+{
+ IntRect result;
+
+ size_t count = rects.size();
+ for (size_t i = 0; i < count; ++i)
+ result.unite(rects[i]);
+
+ return result;
}
+
+} // namespace WebCore
diff --git a/WebCore/platform/graphics/IntRect.h b/WebCore/platform/graphics/IntRect.h
index 97b21bc..e3633df 100644
--- a/WebCore/platform/graphics/IntRect.h
+++ b/WebCore/platform/graphics/IntRect.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -10,17 +10,17 @@
* 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.
+ * 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 IntRect_h
@@ -28,12 +28,13 @@
#include "IntPoint.h"
#include <wtf/Platform.h>
+#include <wtf/Vector.h>
#if PLATFORM(CG)
typedef struct CGRect CGRect;
#endif
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
#ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
typedef struct CGRect NSRect;
#else
@@ -162,7 +163,7 @@ public:
#endif
#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) \
- || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+ || (PLATFORM(CHROMIUM) && OS(DARWIN))
operator NSRect() const;
#endif
@@ -185,6 +186,8 @@ inline IntRect unionRect(const IntRect& a, const IntRect& b)
return c;
}
+IntRect unionRect(const Vector<IntRect>&);
+
inline bool operator==(const IntRect& a, const IntRect& b)
{
return a.location() == b.location() && a.size() == b.size();
@@ -200,7 +203,7 @@ IntRect enclosingIntRect(const CGRect&);
#endif
#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) \
- || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+ || (PLATFORM(CHROMIUM) && OS(DARWIN))
IntRect enclosingIntRect(const NSRect&);
#endif
diff --git a/WebCore/platform/graphics/IntSize.h b/WebCore/platform/graphics/IntSize.h
index b242784..13d9e22 100644
--- a/WebCore/platform/graphics/IntSize.h
+++ b/WebCore/platform/graphics/IntSize.h
@@ -69,7 +69,8 @@ public:
void setHeight(int height) { m_height = height; }
bool isEmpty() const { return m_width <= 0 || m_height <= 0; }
-
+ bool isZero() const { return !m_width && !m_height; }
+
void expand(int width, int height)
{
m_width += width;
diff --git a/WebCore/platform/graphics/MediaPlayer.cpp b/WebCore/platform/graphics/MediaPlayer.cpp
index 4c66c50..aed9c95 100644
--- a/WebCore/platform/graphics/MediaPlayer.cpp
+++ b/WebCore/platform/graphics/MediaPlayer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 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
@@ -39,7 +39,7 @@
#if PLATFORM(MAC)
#include "MediaPlayerPrivateQTKit.h"
-#elif PLATFORM(WINCE) && !PLATFORM(QT)
+#elif OS(WINCE) && !PLATFORM(QT)
#include "MediaPlayerPrivateWince.h"
#elif PLATFORM(WIN)
#include "MediaPlayerPrivateQuickTimeWin.h"
@@ -83,8 +83,6 @@ public:
virtual void seek(float) { }
virtual bool seeking() const { return false; }
- virtual void setEndTime(float) { }
-
virtual void setRate(float) { }
virtual void setPreservesPitch(bool) { }
virtual bool paused() const { return false; }
@@ -100,9 +98,6 @@ public:
virtual float maxTimeSeekable() const { return 0; }
virtual PassRefPtr<TimeRanges> buffered() const { return TimeRanges::create(); }
- virtual int dataRate() const { return 0; }
-
- virtual bool totalBytesKnown() const { return false; }
virtual unsigned totalBytes() const { return 0; }
virtual unsigned bytesLoaded() const { return 0; }
@@ -252,7 +247,8 @@ void MediaPlayer::load(const String& url, const ContentType& contentType)
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
m_private->setMediaPlayerProxy(m_playerProxy);
#endif
-
+ m_private->setAutobuffer(autobuffer());
+ m_private->setPreservesPitch(preservesPitch());
}
if (m_private)
@@ -261,6 +257,11 @@ void MediaPlayer::load(const String& url, const ContentType& contentType)
m_private.set(createNullMediaPlayer(this));
}
+bool MediaPlayer::hasAvailableVideoFrame() const
+{
+ return m_private->hasAvailableVideoFrame();
+}
+
bool MediaPlayer::canLoadPoster() const
{
return m_private->canLoadPoster();
@@ -412,16 +413,6 @@ void MediaPlayer::setPreservesPitch(bool preservesPitch)
m_private->setPreservesPitch(preservesPitch);
}
-int MediaPlayer::dataRate() const
-{
- return m_private->dataRate();
-}
-
-void MediaPlayer::setEndTime(float time)
-{
- m_private->setEndTime(time);
-}
-
PassRefPtr<TimeRanges> MediaPlayer::buffered()
{
return m_private->buffered();
@@ -437,16 +428,6 @@ unsigned MediaPlayer::bytesLoaded()
return m_private->bytesLoaded();
}
-bool MediaPlayer::totalBytesKnown()
-{
- return m_private->totalBytesKnown();
-}
-
-unsigned MediaPlayer::totalBytes()
-{
- return m_private->totalBytes();
-}
-
void MediaPlayer::setSize(const IntSize& size)
{
m_size = size;
diff --git a/WebCore/platform/graphics/MediaPlayer.h b/WebCore/platform/graphics/MediaPlayer.h
index ec8ac33..fa85cfd 100644
--- a/WebCore/platform/graphics/MediaPlayer.h
+++ b/WebCore/platform/graphics/MediaPlayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 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
@@ -163,8 +163,6 @@ public:
float startTime() const;
- void setEndTime(float time);
-
float rate() const;
void setRate(float);
@@ -175,8 +173,6 @@ public:
float maxTimeSeekable();
unsigned bytesLoaded();
- bool totalBytesKnown();
- unsigned totalBytes();
float volume() const;
void setVolume(float);
@@ -184,8 +180,6 @@ public:
bool hasClosedCaptions() const;
void setClosedCaptionsVisible(bool closedCaptionsVisible);
- int dataRate() const;
-
bool autobuffer() const;
void setAutobuffer(bool);
@@ -213,6 +207,8 @@ public:
MediaPlayerClient* mediaPlayerClient() const { return m_mediaPlayerClient; }
+ bool hasAvailableVideoFrame() const;
+
bool canLoadPoster() const;
void setPoster(const String&);
diff --git a/WebCore/platform/graphics/MediaPlayerPrivate.h b/WebCore/platform/graphics/MediaPlayerPrivate.h
index 03906bd..6cf12ba 100644
--- a/WebCore/platform/graphics/MediaPlayerPrivate.h
+++ b/WebCore/platform/graphics/MediaPlayerPrivate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 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
@@ -67,8 +67,6 @@ public:
virtual float startTime() const { return 0; }
- virtual void setEndTime(float) = 0;
-
virtual void setRate(float) = 0;
virtual void setPreservesPitch(bool) { }
@@ -85,10 +83,6 @@ public:
virtual float maxTimeSeekable() const = 0;
virtual PassRefPtr<TimeRanges> buffered() const = 0;
- virtual int dataRate() const = 0;
-
- virtual bool totalBytesKnown() const { return totalBytes() > 0; }
- virtual unsigned totalBytes() const = 0;
virtual unsigned bytesLoaded() const = 0;
virtual void setSize(const IntSize&) = 0;
@@ -99,6 +93,8 @@ public:
virtual void setAutobuffer(bool) { };
+ virtual bool hasAvailableVideoFrame() const { return readyState() >= MediaPlayer::HaveCurrentData; }
+
virtual bool canLoadPoster() const { return false; }
virtual void setPoster(const String&) { }
diff --git a/WebCore/platform/graphics/Path.h b/WebCore/platform/graphics/Path.h
index 6618fb7..79d6cc4 100644
--- a/WebCore/platform/graphics/Path.h
+++ b/WebCore/platform/graphics/Path.h
@@ -34,10 +34,7 @@
#if PLATFORM(CG)
typedef struct CGPath PlatformPath;
#elif PLATFORM(QT)
-#include <qglobal.h>
-QT_BEGIN_NAMESPACE
-class QPainterPath;
-QT_END_NAMESPACE
+#include <qpainterpath.h>
typedef QPainterPath PlatformPath;
#elif PLATFORM(WX) && USE(WXGC)
class wxGraphicsPath;
@@ -53,7 +50,7 @@ typedef SkPath PlatformPath;
#elif PLATFORM(HAIKU)
class BRegion;
typedef BRegion PlatformPath;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
namespace WebCore {
class PlatformPath;
}
@@ -61,6 +58,13 @@ namespace WebCore {
typedef void PlatformPath;
#endif
+#if PLATFORM(QT)
+/* QPainterPath is valued based */
+typedef PlatformPath PlatformPathPtr;
+#else
+typedef PlatformPath* PlatformPathPtr;
+#endif
+
namespace WebCore {
class FloatPoint;
@@ -131,7 +135,7 @@ namespace WebCore {
String debugString() const;
- PlatformPath* platformPath() const { return m_path; }
+ PlatformPathPtr platformPath() const { return m_path; }
static Path createRoundedRectangle(const FloatRect&, const FloatSize& roundingRadii);
static Path createRoundedRectangle(const FloatRect&, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius);
@@ -144,7 +148,7 @@ namespace WebCore {
void transform(const TransformationMatrix&);
private:
- PlatformPath* m_path;
+ PlatformPathPtr m_path;
};
}
diff --git a/WebCore/platform/graphics/Pattern.h b/WebCore/platform/graphics/Pattern.h
index aa0a357..f7f612a 100644
--- a/WebCore/platform/graphics/Pattern.h
+++ b/WebCore/platform/graphics/Pattern.h
@@ -56,7 +56,7 @@ typedef wxBrush* PlatformPatternPtr;
#elif PLATFORM(HAIKU)
#include <interface/GraphicsDefs.h>
typedef pattern* PlatformPatternPtr;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
typedef void* PlatformPatternPtr;
#endif
diff --git a/WebCore/platform/graphics/SimpleFontData.h b/WebCore/platform/graphics/SimpleFontData.h
index 387a5c7..09ed0fc 100644
--- a/WebCore/platform/graphics/SimpleFontData.h
+++ b/WebCore/platform/graphics/SimpleFontData.h
@@ -28,14 +28,14 @@
#include "FontPlatformData.h"
#include "GlyphPageTreeNode.h"
#include "GlyphWidthMap.h"
-#include "TextRenderingMode.h"
+#include "TypesettingFeatures.h"
#include <wtf/OwnPtr.h>
#if USE(ATSUI)
typedef struct OpaqueATSUStyle* ATSUStyle;
#endif
-#if PLATFORM(WIN) && !PLATFORM(WINCE)
+#if PLATFORM(WIN) && !OS(WINCE)
#include <usp10.h>
#endif
@@ -115,13 +115,13 @@ public:
virtual String description() const;
#endif
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
NSFont* getNSFont() const { return m_platformData.font(); }
#endif
#if USE(CORE_TEXT)
CTFontRef getCTFont() const;
- CFDictionaryRef getCFStringAttributes(TextRenderingMode) const;
+ CFDictionaryRef getCFStringAttributes(TypesettingFeatures) const;
#endif
#if USE(ATSUI)
@@ -140,7 +140,7 @@ public:
#if PLATFORM(WIN)
bool isSystemFont() const { return m_isSystemFont; }
-#if !PLATFORM(WINCE) // disable unused members to save space
+#if !OS(WINCE) // disable unused members to save space
SCRIPT_FONTPROPERTIES* scriptFontProperties() const;
SCRIPT_CACHE* scriptCache() const { return &m_scriptCache; }
#endif
@@ -162,7 +162,7 @@ private:
void commonInit();
-#if PLATFORM(WIN) && !PLATFORM(WINCE)
+#if PLATFORM(WIN) && !OS(WINCE)
void initGDIFont();
void platformCommonDestroy();
float widthForGDIGlyph(Glyph glyph) const;
@@ -211,8 +211,7 @@ private:
#if USE(ATSUI)
public:
- mutable ATSUStyle m_ATSUStyle;
- mutable bool m_ATSUStyleInitialized;
+ mutable HashMap<unsigned, ATSUStyle> m_ATSUStyleMap;
mutable bool m_ATSUMirrors;
mutable bool m_checkedShapesArabic;
mutable bool m_shapesArabic;
@@ -222,12 +221,12 @@ private:
#if USE(CORE_TEXT)
mutable RetainPtr<CTFontRef> m_CTFont;
- mutable RetainPtr<CFDictionaryRef> m_CFStringAttributes;
+ mutable HashMap<unsigned, RetainPtr<CFDictionaryRef> > m_CFStringAttributes;
#endif
#if PLATFORM(WIN)
bool m_isSystemFont;
-#if !PLATFORM(WINCE) // disable unused members to save space
+#if !OS(WINCE) // disable unused members to save space
mutable SCRIPT_CACHE m_scriptCache;
mutable SCRIPT_FONTPROPERTIES* m_scriptFontProperties;
#endif
diff --git a/WebCore/platform/graphics/TypesettingFeatures.h b/WebCore/platform/graphics/TypesettingFeatures.h
new file mode 100644
index 0000000..aa46beb
--- /dev/null
+++ b/WebCore/platform/graphics/TypesettingFeatures.h
@@ -0,0 +1,38 @@
+/*
+ * 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 TypesettingFeatures_h
+#define TypesettingFeatures_h
+
+namespace WebCore {
+ enum TypesettingFeature {
+ Kerning = 1 << 0,
+ Ligatures = 1 << 1,
+ };
+
+ typedef unsigned TypesettingFeatures;
+} // namespace WebCore
+
+#endif // TypesettingFeatures_h
diff --git a/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp b/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
index 14034fd..d866b6c 100644
--- a/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
+++ b/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
@@ -606,12 +606,16 @@ void GraphicsContext::clipPath(WindRule clipRule)
cairo_clip(cr);
}
-void GraphicsContext::drawFocusRing(const Color& color)
+void GraphicsContext::drawFocusRing(const Vector<Path>& paths, int width, int offset, const Color& color)
+{
+ // FIXME: implement
+}
+
+void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int width, int /* offset */, const Color& color)
{
if (paintingDisabled())
return;
- const Vector<IntRect>& rects = focusRingRects();
unsigned rectCount = rects.size();
cairo_t* cr = m_data->cr;
@@ -632,14 +636,14 @@ void GraphicsContext::drawFocusRing(const Color& color)
cairo_set_line_width(cr, 2.0f);
setPlatformStrokeStyle(DottedStroke);
#else
- int radius = (focusRingWidth() - 1) / 2;
+ int radius = (width - 1) / 2;
for (unsigned i = 0; i < rectCount; i++)
addPath(Path::createRoundedRectangle(rects[i], FloatSize(radius, radius)));
// Force the alpha to 50%. This matches what the Mac does with outline rings.
Color ringColor(color.red(), color.green(), color.blue(), 127);
setColor(cr, ringColor);
- cairo_set_line_width(cr, focusRingWidth());
+ cairo_set_line_width(cr, width);
setPlatformStrokeStyle(SolidStroke);
#endif
diff --git a/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h b/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h
index 54e1217..cedc684 100644
--- a/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h
+++ b/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h
@@ -33,8 +33,8 @@
#include <wtf/MathExtras.h>
#if PLATFORM(GTK)
-#include <gdk/gdk.h>
#include <pango/pango.h>
+typedef struct _GdkExposeEvent GdkExposeEvent;
#elif PLATFORM(WIN)
#include <cairo-win32.h>
#endif
diff --git a/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp b/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
index d991c80..124c7cf 100644
--- a/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
+++ b/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
@@ -132,7 +132,7 @@ void ImageBuffer::platformTransformColorSpace(const Vector<int>& lookUpTable)
pixelColor = Color(lookUpTable[pixelColor.red()],
lookUpTable[pixelColor.green()],
lookUpTable[pixelColor.blue()],
- lookUpTable[pixelColor.alpha()]);
+ pixelColor.alpha());
*pixel = premultipliedARGBFromColor(pixelColor);
}
}
diff --git a/WebCore/platform/graphics/cg/ColorCG.cpp b/WebCore/platform/graphics/cg/ColorCG.cpp
index 40aacc5..e514fa3 100644
--- a/WebCore/platform/graphics/cg/ColorCG.cpp
+++ b/WebCore/platform/graphics/cg/ColorCG.cpp
@@ -68,7 +68,7 @@ Color::Color(CGColorRef color)
m_color = makeRGBA(r * 255, g * 255, b * 255, a * 255);
}
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
CGColorRef createCGColor(const Color& c)
{
@@ -89,7 +89,7 @@ CGColorRef createCGColor(const Color& c)
return color;
}
-#endif // PLATFORM(WIN_OS)
+#endif // OS(WINDOWS)
}
diff --git a/WebCore/platform/graphics/cg/GradientCG.cpp b/WebCore/platform/graphics/cg/GradientCG.cpp
index 05a0aad..e9b5de7 100644
--- a/WebCore/platform/graphics/cg/GradientCG.cpp
+++ b/WebCore/platform/graphics/cg/GradientCG.cpp
@@ -36,10 +36,15 @@ namespace WebCore {
void Gradient::platformDestroy()
{
+#ifdef BUILDING_ON_TIGER
CGShadingRelease(m_gradient);
+#else
+ CGGradientRelease(m_gradient);
+#endif
m_gradient = 0;
}
+#ifdef BUILDING_ON_TIGER
static void gradientCallback(void* info, const CGFloat* in, CGFloat* out)
{
float r, g, b, a;
@@ -69,11 +74,55 @@ CGShadingRef Gradient::platformGradient()
return m_gradient;
}
+#else
+CGGradientRef Gradient::platformGradient()
+{
+ if (m_gradient)
+ return m_gradient;
+
+ static CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+
+ sortStopsIfNecessary();
+
+ const int cReservedStops = 3;
+ Vector<CGFloat, 4 * cReservedStops> colorComponents;
+ colorComponents.reserveCapacity(m_stops.size() * 4); // RGBA components per stop
+
+ Vector<CGFloat, cReservedStops> locations;
+ locations.reserveCapacity(m_stops.size());
+
+ for (size_t i = 0; i < m_stops.size(); ++i) {
+ colorComponents.uncheckedAppend(m_stops[i].red);
+ colorComponents.uncheckedAppend(m_stops[i].green);
+ colorComponents.uncheckedAppend(m_stops[i].blue);
+ colorComponents.uncheckedAppend(m_stops[i].alpha);
+
+ locations.uncheckedAppend(m_stops[i].stop);
+ }
+
+ m_gradient = CGGradientCreateWithColorComponents(colorSpace, colorComponents.data(), locations.data(), m_stops.size());
+
+ return m_gradient;
+}
+#endif
void Gradient::fill(GraphicsContext* context, const FloatRect& rect)
{
context->clip(rect);
+ paint(context);
+}
+
+void Gradient::paint(GraphicsContext* context)
+{
+#ifdef BUILDING_ON_TIGER
CGContextDrawShading(context->platformContext(), platformGradient());
+#else
+ CGGradientDrawingOptions extendOptions = kCGGradientDrawsBeforeStartLocation | kCGGradientDrawsAfterEndLocation;
+ if (m_radial)
+ CGContextDrawRadialGradient(context->platformContext(), platformGradient(), m_p0, m_r0, m_p1, m_r1, extendOptions);
+ else
+ CGContextDrawLinearGradient(context->platformContext(), platformGradient(), m_p0, m_p1, extendOptions);
+#endif
}
} //namespace
diff --git a/WebCore/platform/graphics/cg/GraphicsContextCG.cpp b/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
index 39f06a6..b11ba66 100644
--- a/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
+++ b/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
@@ -43,7 +43,15 @@
#include <wtf/OwnArrayPtr.h>
#include <wtf/RetainPtr.h>
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || PLATFORM(CHROMIUM)
+#include "WebCoreSystemInterface.h"
+#endif
+
+#if PLATFORM(WIN)
+#include <WebKitSystemInterface/WebKitSystemInterface.h>
+#endif
+
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
// Building on 10.6 or later: kCGInterpolationMedium is defined in the CGInterpolationQuality enum.
@@ -490,7 +498,7 @@ static inline bool calculateDrawingMode(const GraphicsContextState& state, CGPat
}
} else {
// Setting mode to kCGPathStroke even if shouldStroke is false. In that case, we return false and mode will not be used,
- // but the compiler will not compain about an uninitialized variable.
+ // but the compiler will not complain about an uninitialized variable.
mode = kCGPathStroke;
}
@@ -547,7 +555,7 @@ void GraphicsContext::fillPath()
else
CGContextClip(context);
CGContextConcatCTM(context, m_common->state.fillGradient->gradientSpaceTransform());
- CGContextDrawShading(context, m_common->state.fillGradient->platformGradient());
+ m_common->state.fillGradient->paint(this);
CGContextRestoreGState(context);
return;
}
@@ -572,7 +580,7 @@ void GraphicsContext::strokePath()
CGContextReplacePathWithStrokedPath(context);
CGContextClip(context);
CGContextConcatCTM(context, m_common->state.strokeGradient->gradientSpaceTransform());
- CGContextDrawShading(context, m_common->state.strokeGradient->platformGradient());
+ m_common->state.strokeGradient->paint(this);
CGContextRestoreGState(context);
return;
}
@@ -596,7 +604,7 @@ void GraphicsContext::fillRect(const FloatRect& rect)
CGContextSaveGState(context);
CGContextClipToRect(context, rect);
CGContextConcatCTM(context, m_common->state.fillGradient->gradientSpaceTransform());
- CGContextDrawShading(context, m_common->state.fillGradient->platformGradient());
+ m_common->state.fillGradient->paint(this);
CGContextRestoreGState(context);
return;
}
@@ -739,56 +747,55 @@ void GraphicsContext::endTransparencyLayer()
m_data->m_userToDeviceTransformKnownToBeIdentity = false;
}
-void GraphicsContext::setPlatformShadow(const IntSize& size, int blur, const Color& color, ColorSpace colorSpace)
+void GraphicsContext::setPlatformShadow(const IntSize& offset, int blur, const Color& color, ColorSpace colorSpace)
{
if (paintingDisabled())
return;
- CGFloat width = size.width();
- CGFloat height = size.height();
+ CGFloat xOffset = offset.width();
+ CGFloat yOffset = offset.height();
CGFloat blurRadius = blur;
CGContextRef context = platformContext();
if (!m_common->state.shadowsIgnoreTransforms) {
- CGAffineTransform transform = CGContextGetCTM(context);
+ CGAffineTransform userToBaseCTM = wkGetUserToBaseCTM(context);
- CGFloat A = transform.a * transform.a + transform.b * transform.b;
- CGFloat B = transform.a * transform.c + transform.b * transform.d;
+ CGFloat A = userToBaseCTM.a * userToBaseCTM.a + userToBaseCTM.b * userToBaseCTM.b;
+ CGFloat B = userToBaseCTM.a * userToBaseCTM.c + userToBaseCTM.b * userToBaseCTM.d;
CGFloat C = B;
- CGFloat D = transform.c * transform.c + transform.d * transform.d;
+ CGFloat D = userToBaseCTM.c * userToBaseCTM.c + userToBaseCTM.d * userToBaseCTM.d;
CGFloat smallEigenvalue = narrowPrecisionToCGFloat(sqrt(0.5 * ((A + D) - sqrt(4 * B * C + (A - D) * (A - D)))));
// Extreme "blur" values can make text drawing crash or take crazy long times, so clamp
blurRadius = min(blur * smallEigenvalue, narrowPrecisionToCGFloat(1000.0));
- CGSize sizeInDeviceSpace = CGSizeApplyAffineTransform(size, transform);
-
- width = sizeInDeviceSpace.width;
- height = sizeInDeviceSpace.height;
+ CGSize offsetInBaseSpace = CGSizeApplyAffineTransform(offset, userToBaseCTM);
+ xOffset = offsetInBaseSpace.width;
+ yOffset = offsetInBaseSpace.height;
}
// Work around <rdar://problem/5539388> by ensuring that the offsets will get truncated
// to the desired integer.
static const CGFloat extraShadowOffset = narrowPrecisionToCGFloat(1.0 / 128);
- if (width > 0)
- width += extraShadowOffset;
- else if (width < 0)
- width -= extraShadowOffset;
+ if (xOffset > 0)
+ xOffset += extraShadowOffset;
+ else if (xOffset < 0)
+ xOffset -= extraShadowOffset;
- if (height > 0)
- height += extraShadowOffset;
- else if (height < 0)
- height -= extraShadowOffset;
+ if (yOffset > 0)
+ yOffset += extraShadowOffset;
+ else if (yOffset < 0)
+ yOffset -= extraShadowOffset;
// Check for an invalid color, as this means that the color was not set for the shadow
// and we should therefore just use the default shadow color.
if (!color.isValid())
- CGContextSetShadow(context, CGSizeMake(width, height), blurRadius);
+ CGContextSetShadow(context, CGSizeMake(xOffset, yOffset), blurRadius);
else {
RetainPtr<CGColorRef> colorCG(AdoptCF, createCGColorWithColorSpace(color, colorSpace));
CGContextSetShadowWithColor(context,
- CGSizeMake(width, height),
+ CGSizeMake(xOffset, yOffset),
blurRadius,
colorCG.get());
}
@@ -838,7 +845,7 @@ void GraphicsContext::strokeRect(const FloatRect& r, float lineWidth)
CGContextAddRect(context, r);
CGContextReplacePathWithStrokedPath(context);
CGContextClip(context);
- CGContextDrawShading(context, m_common->state.strokeGradient->platformGradient());
+ m_common->state.strokeGradient->paint(this);
CGContextRestoreGState(context);
return;
}
diff --git a/WebCore/platform/graphics/cg/PatternCG.cpp b/WebCore/platform/graphics/cg/PatternCG.cpp
index 63628f4..26f402b 100644
--- a/WebCore/platform/graphics/cg/PatternCG.cpp
+++ b/WebCore/platform/graphics/cg/PatternCG.cpp
@@ -61,7 +61,7 @@ CGPatternRef Pattern::createPlatformPattern(const TransformationMatrix& userSpac
// If FLT_MAX should also be used for xStep or yStep, nothing is rendered. Using fractions of FLT_MAX also
// result in nothing being rendered.
- // INT_MAX is almost correct, but there seems to be some number wrapping occuring making the fill
+ // INT_MAX is almost correct, but there seems to be some number wrapping occurring making the fill
// pattern is not filled correctly.
// To make error of floating point less than 0.5, we use the half of the number of mantissa of float (1 << 22).
CGFloat xStep = m_repeatX ? tileRect.width() : (1 << 22);
diff --git a/WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp b/WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp
index 6bd7d7c..6432e17 100644
--- a/WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp
+++ b/WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp
@@ -32,11 +32,11 @@
#include "config.h"
#include "FontCustomPlatformData.h"
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include "Base64.h"
#include "ChromiumBridge.h"
#include "OpenTypeUtilities.h"
-#elif PLATFORM(LINUX)
+#elif OS(LINUX)
#include "SkStream.h"
#endif
@@ -45,9 +45,9 @@
#include "OpenTypeSanitizer.h"
#include "SharedBuffer.h"
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include <objbase.h>
-#elif PLATFORM(LINUX)
+#elif OS(LINUX)
#include <cstring>
#endif
@@ -55,10 +55,10 @@ namespace WebCore {
FontCustomPlatformData::~FontCustomPlatformData()
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
if (m_fontReference)
RemoveFontMemResourceEx(m_fontReference);
-#elif PLATFORM(LINUX)
+#elif OS(LINUX)
if (m_fontReference)
m_fontReference->unref();
#endif
@@ -66,7 +66,7 @@ FontCustomPlatformData::~FontCustomPlatformData()
FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontRenderingMode mode)
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
ASSERT(m_fontReference);
LOGFONT logFont;
@@ -99,7 +99,7 @@ FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, b
HFONT hfont = CreateFontIndirect(&logFont);
return FontPlatformData(hfont, size);
-#elif PLATFORM(LINUX)
+#elif OS(LINUX)
ASSERT(m_fontReference);
return FontPlatformData(m_fontReference, size, bold && !m_fontReference->isBold(), italic && !m_fontReference->isItalic());
#else
@@ -108,7 +108,7 @@ FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, b
#endif
}
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// Creates a unique and unpredictable font name, in order to avoid collisions and to
// not allow access from CSS.
static String createUniqueFontName()
@@ -123,7 +123,7 @@ static String createUniqueFontName()
}
#endif
-#if PLATFORM(LINUX)
+#if OS(LINUX)
class RemoteFontStream : public SkStream {
public:
explicit RemoteFontStream(PassRefPtr<SharedBuffer> buffer)
@@ -180,7 +180,7 @@ FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
buffer = transcodeBuffer.get();
#endif
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// Introduce the font to GDI. AddFontMemResourceEx should be used with care, because it will pollute the process's
// font namespace (Windows has no API for creating an HFONT from data without exposing the font to the
// entire process first).
@@ -189,9 +189,9 @@ FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
if (!fontReference)
return 0;
return new FontCustomPlatformData(fontReference, fontName);
-#elif PLATFORM(LINUX)
- RemoteFontStream stream(buffer);
- SkTypeface* typeface = SkTypeface::CreateFromStream(&stream);
+#elif OS(LINUX)
+ RemoteFontStream* stream = new RemoteFontStream(buffer);
+ SkTypeface* typeface = SkTypeface::CreateFromStream(stream);
if (!typeface)
return 0;
return new FontCustomPlatformData(typeface);
diff --git a/WebCore/platform/graphics/chromium/FontCustomPlatformData.h b/WebCore/platform/graphics/chromium/FontCustomPlatformData.h
index a42f1ec..e1fbd48 100644
--- a/WebCore/platform/graphics/chromium/FontCustomPlatformData.h
+++ b/WebCore/platform/graphics/chromium/FontCustomPlatformData.h
@@ -35,10 +35,10 @@
#include "FontRenderingMode.h"
#include <wtf/Noncopyable.h>
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include "PlatformString.h"
#include <windows.h>
-#elif PLATFORM(LINUX)
+#elif OS(LINUX)
#include "SkTypeface.h"
#endif
@@ -48,12 +48,12 @@ class FontPlatformData;
class SharedBuffer;
struct FontCustomPlatformData : Noncopyable {
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
FontCustomPlatformData(HANDLE fontReference, const String& name)
: m_fontReference(fontReference)
, m_name(name)
{}
-#elif PLATFORM(LINUX)
+#elif OS(LINUX)
explicit FontCustomPlatformData(SkTypeface* typeface)
: m_fontReference(typeface)
{}
@@ -64,10 +64,10 @@ struct FontCustomPlatformData : Noncopyable {
FontPlatformData fontPlatformData(int size, bool bold, bool italic,
FontRenderingMode = NormalRenderingMode);
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
HANDLE m_fontReference;
String m_name;
-#elif PLATFORM(LINUX)
+#elif OS(LINUX)
SkTypeface* m_fontReference;
#endif
};
diff --git a/WebCore/platform/graphics/chromium/FontLinux.cpp b/WebCore/platform/graphics/chromium/FontLinux.cpp
index a4526a8..e76eca8 100644
--- a/WebCore/platform/graphics/chromium/FontLinux.cpp
+++ b/WebCore/platform/graphics/chromium/FontLinux.cpp
@@ -312,7 +312,8 @@ public:
private:
const TextRun& getTextRun(const TextRun& originalRun)
{
- // Convert the |originalRun| to NFC normalized form if combining diacritical marks
+ // Normalize the text run in two ways:
+ // 1) Convert the |originalRun| to NFC normalized form if combining diacritical marks
// (U+0300..) are used in the run. This conversion is necessary since most OpenType
// fonts (e.g., Arial) don't have substitution rules for the diacritical marks in
// their GSUB tables.
@@ -321,9 +322,12 @@ private:
// the API returns FALSE (= not normalized) for complex runs that don't require NFC
// normalization (e.g., Arabic text). Unless the run contains the diacritical marks,
// Harfbuzz will do the same thing for us using the GSUB table.
+ // 2) Convert spacing characters into plain spaces, as some fonts will provide glyphs
+ // for characters like '\n' otherwise.
for (unsigned i = 0; i < originalRun.length(); ++i) {
- UBlockCode block = ::ublock_getCode(originalRun[i]);
- if (block == UBLOCK_COMBINING_DIACRITICAL_MARKS) {
+ UChar ch = originalRun[i];
+ UBlockCode block = ::ublock_getCode(ch);
+ if (block == UBLOCK_COMBINING_DIACRITICAL_MARKS || (Font::treatAsSpace(ch) && ch != ' ')) {
return getNormalizedTextRun(originalRun);
}
}
@@ -342,6 +346,11 @@ private:
normalizedString.extract(m_normalizedBuffer.get(), normalizedString.length() + 1, error);
ASSERT(U_SUCCESS(error));
+ for (unsigned i = 0; i < normalizedString.length(); ++i) {
+ if (Font::treatAsSpace(m_normalizedBuffer[i]))
+ m_normalizedBuffer[i] = ' ';
+ }
+
m_normalizedRun.set(new TextRun(originalRun));
m_normalizedRun->setText(m_normalizedBuffer.get(), normalizedString.length());
return *m_normalizedRun;
@@ -391,6 +400,8 @@ private:
m_item.attributes = new HB_GlyphAttributes[m_maxGlyphs];
m_item.advances = new HB_Fixed[m_maxGlyphs];
m_item.offsets = new HB_FixedPoint[m_maxGlyphs];
+ // HB_FixedPoint is a struct, so we must use memset to clear it.
+ memset(m_item.offsets, 0, m_maxGlyphs * sizeof(HB_FixedPoint));
m_glyphs16 = new uint16_t[m_maxGlyphs];
m_xPositions = new SkScalar[m_maxGlyphs];
@@ -427,18 +438,19 @@ private:
void setGlyphXPositions(bool isRTL)
{
- m_pixelWidth = 0;
- for (unsigned i = 0; i < m_item.num_glyphs; ++i) {
- int index;
- if (isRTL)
- index = m_item.num_glyphs - (i + 1);
- else
- index = i;
+ double position = 0;
+ for (int iter = 0; iter < m_item.num_glyphs; ++iter) {
+ // Glyphs are stored in logical order, but for layout purposes we always go left to right.
+ int i = isRTL ? m_item.num_glyphs - iter - 1 : iter;
m_glyphs16[i] = m_item.glyphs[i];
- m_xPositions[index] = m_offsetX + m_pixelWidth;
- m_pixelWidth += truncateFixedPointToInteger(m_item.advances[index]);
+ double offsetX = truncateFixedPointToInteger(m_item.offsets[i].x);
+ m_xPositions[i] = m_offsetX + position + offsetX;
+
+ double advance = truncateFixedPointToInteger(m_item.advances[i]);
+ position += advance;
}
+ m_pixelWidth = position;
m_offsetX += m_pixelWidth;
}
diff --git a/WebCore/platform/graphics/chromium/FontPlatformData.h b/WebCore/platform/graphics/chromium/FontPlatformData.h
index c6f1912..871fec8 100644
--- a/WebCore/platform/graphics/chromium/FontPlatformData.h
+++ b/WebCore/platform/graphics/chromium/FontPlatformData.h
@@ -31,9 +31,9 @@
#ifndef FontPlatformData_h
#define FontPlatformData_h
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include "FontPlatformDataChromiumWin.h"
-#elif defined(__linux__)
+#elif OS(LINUX)
#include "FontPlatformDataLinux.h"
#endif
diff --git a/WebCore/platform/graphics/chromium/HarfbuzzSkia.cpp b/WebCore/platform/graphics/chromium/HarfbuzzSkia.cpp
index 621d674..be3b0d0 100644
--- a/WebCore/platform/graphics/chromium/HarfbuzzSkia.cpp
+++ b/WebCore/platform/graphics/chromium/HarfbuzzSkia.cpp
@@ -30,7 +30,6 @@
#include "config.h"
-#include "Font.h"
#include "FontPlatformData.h"
#include "wtf/OwnArrayPtr.h"
@@ -42,7 +41,6 @@
extern "C" {
#include "harfbuzz-shaper.h"
-#include "harfbuzz-unicode.h"
}
// This file implements the callbacks which Harfbuzz requires by using Skia
@@ -67,29 +65,10 @@ static HB_Bool stringToGlyphs(HB_Font hbFont, const HB_UChar16* characters, hb_u
// HB_Glyph is 32-bit, but Skia outputs only 16-bit numbers. So our
// |glyphs| array needs to be converted.
- // Additionally, if the CSS white-space property is inhibiting line
- // breaking, we might find end-of-line charactors rendered via the complex
- // text path. Fonts don't provide glyphs for these code points so, if we
- // find one, we simulate the space glyph being interposed in this case.
- // Because the input is variable-length per code point, we walk the input
- // in step with the output.
- // FIXME: it seems that this logic is duplicated in CoreTextController and UniscribeController
- ssize_t indexOfNextCodePoint = 0;
- uint16_t spaceGlyphNumber = 0;
for (int i = numGlyphs - 1; i >= 0; --i) {
- const uint32_t currentCodePoint = utf16_to_code_point(characters, length, &indexOfNextCodePoint);
-
uint16_t value;
// We use a memcpy to avoid breaking strict aliasing rules.
memcpy(&value, reinterpret_cast<char*>(glyphs) + sizeof(uint16_t) * i, sizeof(uint16_t));
-
- if (!value && Font::treatAsSpace(currentCodePoint)) {
- static const uint16_t spaceUTF16 = ' ';
- if (!spaceGlyphNumber)
- paint.textToGlyphs(&spaceUTF16, sizeof(spaceUTF16), &spaceGlyphNumber);
- value = spaceGlyphNumber;
- }
-
glyphs[i] = value;
}
@@ -188,15 +167,16 @@ static void getGlyphMetrics(HB_Font hbFont, HB_Glyph glyph, HB_GlyphMetrics* met
SkRect bounds;
paint.getTextWidths(&glyph16, sizeof(glyph16), &width, &bounds);
- metrics->x = SkiaScalarToHarfbuzzFixed(width);
+ metrics->x = SkiaScalarToHarfbuzzFixed(bounds.fLeft);
+ metrics->y = SkiaScalarToHarfbuzzFixed(bounds.fTop);
+ metrics->width = SkiaScalarToHarfbuzzFixed(bounds.width());
+ metrics->height = SkiaScalarToHarfbuzzFixed(bounds.height());
+
+ metrics->xOffset = SkiaScalarToHarfbuzzFixed(width);
// We can't actually get the |y| correct because Skia doesn't export
// the vertical advance. However, nor we do ever render vertical text at
// the moment so it's unimportant.
- metrics->y = 0;
- metrics->width = SkiaScalarToHarfbuzzFixed(bounds.width());
- metrics->height = SkiaScalarToHarfbuzzFixed(bounds.height());
- metrics->xOffset = SkiaScalarToHarfbuzzFixed(bounds.fLeft);
- metrics->yOffset = SkiaScalarToHarfbuzzFixed(bounds.fTop);
+ metrics->yOffset = 0;
}
static HB_Fixed getFontMetric(HB_Font hbFont, HB_FontMetric metric)
diff --git a/WebCore/platform/graphics/chromium/TransparencyWin.cpp b/WebCore/platform/graphics/chromium/TransparencyWin.cpp
index 6dcd595..80df2ec 100644
--- a/WebCore/platform/graphics/chromium/TransparencyWin.cpp
+++ b/WebCore/platform/graphics/chromium/TransparencyWin.cpp
@@ -371,8 +371,11 @@ void TransparencyWin::initializeNewContext()
return;
m_drawContext = m_layerBuffer->context();
- if (needReferenceBitmap)
+ if (needReferenceBitmap) {
m_referenceBitmap = m_ownedBuffers->referenceBitmap();
+ if (!m_referenceBitmap || !m_referenceBitmap->getPixels())
+ return;
+ }
m_validLayer = true;
return;
}
diff --git a/WebCore/platform/graphics/filters/FEColorMatrix.cpp b/WebCore/platform/graphics/filters/FEColorMatrix.cpp
index f422157..bd19d14 100644
--- a/WebCore/platform/graphics/filters/FEColorMatrix.cpp
+++ b/WebCore/platform/graphics/filters/FEColorMatrix.cpp
@@ -184,6 +184,7 @@ void FEColorMatrix::apply(Filter* filter)
break;
case FECOLORMATRIX_TYPE_LUMINANCETOALPHA:
effectType<FECOLORMATRIX_TYPE_LUMINANCETOALPHA>(srcPixelArray, imageData, m_values);
+ setIsAlphaImage(true);
break;
}
diff --git a/WebCore/platform/graphics/filters/FEComponentTransfer.cpp b/WebCore/platform/graphics/filters/FEComponentTransfer.cpp
index 1d9cfff..f9aa011 100644
--- a/WebCore/platform/graphics/filters/FEComponentTransfer.cpp
+++ b/WebCore/platform/graphics/filters/FEComponentTransfer.cpp
@@ -3,6 +3,7 @@
2004, 2005 Rob Buis <buis@kde.org>
2005 Eric Seidel <eric@webkit.org>
2009 Dirk Schulze <krit@webkit.org>
+ Copyright (C) Research In Motion Limited 2010. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -140,7 +141,8 @@ static void linear(unsigned char* values, const ComponentTransferFunction& trans
static void gamma(unsigned char* values, const ComponentTransferFunction& transferFunction)
{
for (unsigned i = 0; i < 256; ++i) {
- double val = 255.0 * (transferFunction.amplitude * pow((i / 255.0), transferFunction.exponent) + transferFunction.offset);
+ double exponent = transferFunction.exponent; // RCVT doesn't like passing a double and a float to pow, so promote this to double
+ double val = 255.0 * (transferFunction.amplitude * pow((i / 255.0), exponent) + transferFunction.offset);
val = std::max(0.0, std::min(255.0, val));
values[i] = static_cast<unsigned char>(val);
}
diff --git a/WebCore/platform/graphics/filters/FEComponentTransfer.h b/WebCore/platform/graphics/filters/FEComponentTransfer.h
index 773aba7..ab84cf0 100644
--- a/WebCore/platform/graphics/filters/FEComponentTransfer.h
+++ b/WebCore/platform/graphics/filters/FEComponentTransfer.h
@@ -25,7 +25,6 @@
#if ENABLE(FILTERS)
#include "FilterEffect.h"
-#include "SVGFEDisplacementMap.h"
#include "Filter.h"
#include <wtf/Vector.h>
diff --git a/WebCore/platform/graphics/filters/FEComposite.cpp b/WebCore/platform/graphics/filters/FEComposite.cpp
index c540cb7..67d3d27 100644
--- a/WebCore/platform/graphics/filters/FEComposite.cpp
+++ b/WebCore/platform/graphics/filters/FEComposite.cpp
@@ -111,9 +111,7 @@ inline void arithmetic(const RefPtr<CanvasPixelArray>& srcPixelArrayA, CanvasPix
unsigned char i1 = srcPixelArrayA->get(pixelOffset + channel);
unsigned char i2 = srcPixelArrayB->get(pixelOffset + channel);
- unsigned char result = scaledK1 * i1 * i2 + k2 * i1 + k3 * i2 + scaledK4;
- if (channel == 3 && i1 == 0 && i2 == 0)
- result = 0;
+ double result = scaledK1 * i1 * i2 + k2 * i1 + k3 * i2 + scaledK4;
srcPixelArrayB->set(pixelOffset + channel, result);
}
}
diff --git a/WebCore/platform/graphics/gtk/ImageGtk.cpp b/WebCore/platform/graphics/gtk/ImageGtk.cpp
index 38da70d..c62d988 100644
--- a/WebCore/platform/graphics/gtk/ImageGtk.cpp
+++ b/WebCore/platform/graphics/gtk/ImageGtk.cpp
@@ -44,29 +44,30 @@ template <> void freeOwnedGPtr<GtkIconInfo>(GtkIconInfo* info)
namespace WebCore {
-static CString getIconFileNameOrFallback(const char* name, const char* fallback)
+static CString getThemeIconFileName(const char* name, int size)
{
- GOwnPtr<GtkIconInfo> info(gtk_icon_theme_lookup_icon(gtk_icon_theme_get_default(),
- name, 16, GTK_ICON_LOOKUP_NO_SVG));
- if (!info)
- return String::format("%s/webkit-1.0/images/%s.png", DATA_DIR, fallback).utf8();
+ GtkIconInfo* iconInfo = gtk_icon_theme_lookup_icon(gtk_icon_theme_get_default(),
+ name, size, GTK_ICON_LOOKUP_NO_SVG);
+ // Try to fallback on MISSING_IMAGE.
+ if (!iconInfo)
+ iconInfo = gtk_icon_theme_lookup_icon(gtk_icon_theme_get_default(),
+ GTK_STOCK_MISSING_IMAGE, size,
+ GTK_ICON_LOOKUP_NO_SVG);
+ if (iconInfo) {
+ GOwnPtr<GtkIconInfo> info(iconInfo);
+ return CString(gtk_icon_info_get_filename(info.get()));
+ }
- return CString(gtk_icon_info_get_filename(info.get()));
+ // No icon was found, this can happen if not GTK theme is set. In
+ // that case an empty Image will be created.
+ return CString();
}
-static PassRefPtr<SharedBuffer> loadResourceSharedBuffer(const char* name)
+static PassRefPtr<SharedBuffer> loadResourceSharedBuffer(CString name)
{
- CString fileName;
-
- // Find the path for the image
- if (strcmp("missingImage", name) == 0)
- fileName = getIconFileNameOrFallback(GTK_STOCK_MISSING_IMAGE, "missingImage");
- else
- fileName = String::format("%s/webkit-1.0/images/%s.png", DATA_DIR, name).utf8();
-
GOwnPtr<gchar> content;
gsize length;
- if (!g_file_get_contents(fileName.data(), &content.outPtr(), &length, 0))
+ if (!g_file_get_contents(name.data(), &content.outPtr(), &length, 0))
return SharedBuffer::create();
return SharedBuffer::create(content.get(), length);
@@ -80,14 +81,32 @@ void BitmapImage::invalidatePlatformData()
{
}
-PassRefPtr<Image> Image::loadPlatformResource(const char* name)
+PassRefPtr<Image> loadImageFromFile(CString fileName)
{
RefPtr<BitmapImage> img = BitmapImage::create();
- RefPtr<SharedBuffer> buffer = loadResourceSharedBuffer(name);
- img->setData(buffer.release(), true);
+ if (!fileName.isNull()) {
+ RefPtr<SharedBuffer> buffer = loadResourceSharedBuffer(fileName);
+ img->setData(buffer.release(), true);
+ }
return img.release();
}
+PassRefPtr<Image> Image::loadPlatformResource(const char* name)
+{
+ CString fileName;
+ if (!strcmp("missingImage", name))
+ fileName = getThemeIconFileName(GTK_STOCK_MISSING_IMAGE, 16);
+ if (fileName.isNull())
+ fileName = String::format("%s/webkit-1.0/images/%s.png", DATA_DIR, name).utf8();
+
+ return loadImageFromFile(fileName);
+}
+
+PassRefPtr<Image> Image::loadPlatformThemeIcon(const char* name, int size)
+{
+ return loadImageFromFile(getThemeIconFileName(name, size));
+}
+
static inline unsigned char* getCairoSurfacePixel(unsigned char* data, uint x, uint y, uint rowStride)
{
return data + (y * rowStride) + x * 4;
diff --git a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
index a023dae..41f90f0 100644
--- a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
+++ b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
@@ -29,6 +29,9 @@
#include "CString.h"
#include "DataSourceGStreamer.h"
+#include "Document.h"
+#include "Frame.h"
+#include "FrameView.h"
#include "GraphicsContext.h"
#include "IntRect.h"
#include "KURL.h"
@@ -36,6 +39,7 @@
#include "MediaPlayer.h"
#include "NotImplemented.h"
#include "ScrollView.h"
+#include "SecurityOrigin.h"
#include "TimeRanges.h"
#include "VideoSinkGStreamer.h"
#include "Widget.h"
@@ -46,6 +50,7 @@
#include <gst/video/video.h>
#include <limits>
#include <math.h>
+#include <webkit/webkitwebview.h>
#include <wtf/gtk/GOwnPtr.h>
using namespace std;
@@ -59,9 +64,24 @@ gboolean mediaPlayerPrivateMessageCallback(GstBus* bus, GstMessage* message, gpo
MediaPlayer::NetworkState error;
MediaPlayerPrivate* mp = reinterpret_cast<MediaPlayerPrivate*>(data);
gint percent = 0;
+ bool issueError = true;
+ bool attemptNextLocation = false;
+
+ if (message->structure) {
+ const gchar* messageTypeName = gst_structure_get_name(message->structure);
+
+ // Redirect messages are sent from elements, like qtdemux, to
+ // notify of the new location(s) of the media.
+ if (!g_strcmp0(messageTypeName, "redirect")) {
+ mp->mediaLocationChanged(message);
+ return true;
+ }
+ }
switch (GST_MESSAGE_TYPE(message)) {
case GST_MESSAGE_ERROR:
+ if (mp && mp->pipelineReset())
+ break;
gst_message_parse_error(message, &err.outPtr(), &debug.outPtr());
LOG_VERBOSE(Media, "Error: %d, %s", err->code, err->message);
@@ -72,13 +92,18 @@ gboolean mediaPlayerPrivateMessageCallback(GstBus* bus, GstMessage* message, gpo
|| err->code == GST_CORE_ERROR_MISSING_PLUGIN
|| err->code == GST_RESOURCE_ERROR_NOT_FOUND)
error = MediaPlayer::FormatError;
- else if (err->domain == GST_STREAM_ERROR)
+ else if (err->domain == GST_STREAM_ERROR) {
error = MediaPlayer::DecodeError;
- else if (err->domain == GST_RESOURCE_ERROR)
+ attemptNextLocation = true;
+ } else if (err->domain == GST_RESOURCE_ERROR)
error = MediaPlayer::NetworkError;
- if (mp)
- mp->loadingFailed(error);
+ if (mp) {
+ if (attemptNextLocation)
+ issueError = !mp->loadNextLocation();
+ if (issueError)
+ mp->loadingFailed(error);
+ }
break;
case GST_MESSAGE_EOS:
LOG_VERBOSE(Media, "End of Stream");
@@ -91,6 +116,10 @@ gboolean mediaPlayerPrivateMessageCallback(GstBus* bus, GstMessage* message, gpo
gst_message_parse_buffering(message, &percent);
LOG_VERBOSE(Media, "Buffering %d", percent);
break;
+ case GST_MESSAGE_DURATION:
+ LOG_VERBOSE(Media, "Duration changed");
+ mp->durationChanged();
+ break;
default:
LOG_VERBOSE(Media, "Unhandled GStreamer message type: %s",
GST_MESSAGE_TYPE_NAME(message));
@@ -99,6 +128,69 @@ gboolean mediaPlayerPrivateMessageCallback(GstBus* bus, GstMessage* message, gpo
return true;
}
+void mediaPlayerPrivateSourceChangedCallback(GObject *object, GParamSpec *pspec, gpointer data)
+{
+ MediaPlayerPrivate* mp = reinterpret_cast<MediaPlayerPrivate*>(data);
+ GstElement* element;
+
+ g_object_get(mp->m_playBin, "source", &element, NULL);
+ gst_object_replace((GstObject**) &mp->m_source, (GstObject*) element);
+
+ if (element) {
+ GParamSpec* pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(element), "cookies");
+
+ // First check if the source element has a cookies property
+ // of the format we expect
+ if (!pspec || pspec->value_type != G_TYPE_STRV)
+ return;
+
+ // Then get the cookies for the URI and set them
+ SoupSession* session = webkit_get_default_session();
+ SoupCookieJar* cookieJar = SOUP_COOKIE_JAR(soup_session_get_feature(session, SOUP_TYPE_COOKIE_JAR));
+
+ char* location;
+ g_object_get(element, "location", &location, NULL);
+
+ SoupURI* uri = soup_uri_new(location);
+ g_free(location);
+
+ // Let Apple web servers know we want to access their nice movie trailers.
+ if (g_str_equal(uri->host, "movies.apple.com"))
+ g_object_set(element, "user-agent", "Quicktime/7.2.0", NULL);
+
+ char* cookies = soup_cookie_jar_get_cookies(cookieJar, uri, FALSE);
+ soup_uri_free(uri);
+
+ char* cookiesStrv[] = {cookies, NULL};
+ g_object_set(element, "cookies", cookiesStrv, NULL);
+ g_free(cookies);
+
+ Frame* frame = mp->m_player->frameView() ? mp->m_player->frameView()->frame() : 0;
+ Document* document = frame ? frame->document() : 0;
+ if (document) {
+ GstStructure* extraHeaders = gst_structure_new("extra-headers",
+ "Referer", G_TYPE_STRING,
+ document->documentURI().utf8().data(), 0);
+ g_object_set(element, "extra-headers", extraHeaders, NULL);
+ gst_structure_free(extraHeaders);
+ }
+ }
+
+ gst_object_unref(element);
+}
+
+void mediaPlayerPrivateVolumeChangedCallback(GObject *element, GParamSpec *pspec, gpointer data)
+{
+ MediaPlayerPrivate* mp = reinterpret_cast<MediaPlayerPrivate*>(data);
+ mp->volumeChanged();
+}
+
+gboolean notifyVolumeIdleCallback(MediaPlayer* mp)
+{
+ mp->volumeChanged();
+ return FALSE;
+}
+
static float playbackPosition(GstElement* playbin)
{
@@ -114,8 +206,8 @@ static float playbackPosition(GstElement* playbin)
gint64 position;
gst_query_parse_position(query, 0, &position);
- // Position is available only if the pipeline is not in NULL or
- // READY state.
+ // Position is available only if the pipeline is not in GST_STATE_NULL or
+ // GST_STATE_READY state.
if (position != static_cast<gint64>(GST_CLOCK_TIME_NONE))
ret = static_cast<float>(position) / static_cast<float>(GST_SECOND);
@@ -126,6 +218,7 @@ static float playbackPosition(GstElement* playbin)
return ret;
}
+
void mediaPlayerPrivateRepaintCallback(WebKitVideoSink*, GstBuffer *buffer, MediaPlayerPrivate* playerPrivate)
{
g_return_if_fail(GST_IS_BUFFER(buffer));
@@ -146,7 +239,7 @@ void MediaPlayerPrivate::registerMediaEngine(MediaEngineRegistrar registrar)
static bool gstInitialized = false;
-static bool do_gst_init()
+static bool doGstInit()
{
// FIXME: We should pass the arguments from the command line
if (!gstInitialized) {
@@ -165,7 +258,7 @@ static bool do_gst_init()
bool MediaPlayerPrivate::isAvailable()
{
- if (!do_gst_init())
+ if (!doGstInit())
return false;
GstElementFactory* factory = gst_element_factory_find("playbin2");
@@ -180,6 +273,7 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
: m_player(player)
, m_playBin(0)
, m_videoSink(0)
+ , m_fpsSink(0)
, m_source(0)
, m_seekTime(0)
, m_changingRate(false)
@@ -190,19 +284,40 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
, m_isStreaming(false)
, m_size(IntSize())
, m_buffer(0)
+ , m_mediaLocations(0)
+ , m_mediaLocationCurrentIndex(0)
+ , m_resetPipeline(false)
, m_paused(true)
, m_seeking(false)
+ , m_playbackRate(1)
, m_errorOccured(false)
+ , m_volumeIdleId(-1)
+ , m_mediaDuration(0.0)
{
- do_gst_init();
+ doGstInit();
}
MediaPlayerPrivate::~MediaPlayerPrivate()
{
+ if (m_volumeIdleId) {
+ g_source_remove(m_volumeIdleId);
+ m_volumeIdleId = -1;
+ }
+
if (m_buffer)
gst_buffer_unref(m_buffer);
m_buffer = 0;
+ if (m_mediaLocations) {
+ gst_structure_free(m_mediaLocations);
+ m_mediaLocations = 0;
+ }
+
+ if (m_source) {
+ gst_object_unref(m_source);
+ m_source = 0;
+ }
+
if (m_playBin) {
gst_element_set_state(m_playBin, GST_STATE_NULL);
gst_object_unref(GST_OBJECT(m_playBin));
@@ -212,6 +327,11 @@ MediaPlayerPrivate::~MediaPlayerPrivate()
g_object_unref(m_videoSink);
m_videoSink = 0;
}
+
+ if (m_fpsSink) {
+ g_object_unref(m_fpsSink);
+ m_fpsSink = 0;
+ }
}
void MediaPlayerPrivate::load(const String& url)
@@ -230,28 +350,35 @@ void MediaPlayerPrivate::load(const String& url)
pause();
}
-void MediaPlayerPrivate::play()
+bool MediaPlayerPrivate::changePipelineState(GstState newState)
{
- GstState state;
+ ASSERT(newState == GST_STATE_PLAYING || newState == GST_STATE_PAUSED);
+
+ GstState currentState;
GstState pending;
- gst_element_get_state(m_playBin, &state, &pending, 0);
- if (state != GST_STATE_PLAYING && pending != GST_STATE_PLAYING) {
- LOG_VERBOSE(Media, "Play");
- gst_element_set_state(m_playBin, GST_STATE_PLAYING);
+ gst_element_get_state(m_playBin, &currentState, &pending, 0);
+ if (currentState != newState && pending != newState) {
+ GstStateChangeReturn ret = gst_element_set_state(m_playBin, newState);
+ GstState pausedOrPlaying = newState == GST_STATE_PLAYING ? GST_STATE_PAUSED : GST_STATE_PLAYING;
+ if (currentState != pausedOrPlaying && ret == GST_STATE_CHANGE_FAILURE) {
+ loadingFailed(MediaPlayer::Empty);
+ return false;
+ }
}
+ return true;
}
-void MediaPlayerPrivate::pause()
+void MediaPlayerPrivate::play()
{
- GstState state;
- GstState pending;
+ if (changePipelineState(GST_STATE_PLAYING))
+ LOG_VERBOSE(Media, "Play");
+}
- gst_element_get_state(m_playBin, &state, &pending, 0);
- if (state != GST_STATE_PAUSED && pending != GST_STATE_PAUSED) {
+void MediaPlayerPrivate::pause()
+{
+ if (changePipelineState(GST_STATE_PAUSED))
LOG_VERBOSE(Media, "Pause");
- gst_element_set_state(m_playBin, GST_STATE_PAUSED);
- }
}
float MediaPlayerPrivate::duration() const
@@ -262,6 +389,9 @@ float MediaPlayerPrivate::duration() const
if (m_errorOccured)
return 0.0;
+ if (m_mediaDuration)
+ return m_mediaDuration;
+
GstFormat timeFormat = GST_FORMAT_TIME;
gint64 timeLength = 0;
@@ -293,7 +423,9 @@ float MediaPlayerPrivate::currentTime() const
void MediaPlayerPrivate::seek(float time)
{
- GstClockTime sec = (GstClockTime)(time * GST_SECOND);
+ // Avoid useless seeking.
+ if (time == playbackPosition(m_playBin))
+ return;
if (!m_playBin)
return;
@@ -304,6 +436,7 @@ void MediaPlayerPrivate::seek(float time)
if (m_errorOccured)
return;
+ GstClockTime sec = (GstClockTime)(time * GST_SECOND);
LOG_VERBOSE(Media, "Seek: %" GST_TIME_FORMAT, GST_TIME_ARGS(sec));
if (!gst_element_seek(m_playBin, m_player->rate(),
GST_FORMAT_TIME,
@@ -317,11 +450,6 @@ void MediaPlayerPrivate::seek(float time)
}
}
-void MediaPlayerPrivate::setEndTime(float time)
-{
- notImplemented();
-}
-
void MediaPlayerPrivate::startEndPointTimerIfNeeded()
{
notImplemented();
@@ -384,7 +512,7 @@ bool MediaPlayerPrivate::hasVideo() const
{
gint currentVideo = -1;
if (m_playBin)
- g_object_get(G_OBJECT(m_playBin), "current-video", &currentVideo, NULL);
+ g_object_get(m_playBin, "current-video", &currentVideo, NULL);
return currentVideo > -1;
}
@@ -392,7 +520,7 @@ bool MediaPlayerPrivate::hasAudio() const
{
gint currentAudio = -1;
if (m_playBin)
- g_object_get(G_OBJECT(m_playBin), "current-audio", &currentAudio, NULL);
+ g_object_get(m_playBin, "current-audio", &currentAudio, NULL);
return currentAudio > -1;
}
@@ -401,11 +529,25 @@ void MediaPlayerPrivate::setVolume(float volume)
if (!m_playBin)
return;
- g_object_set(G_OBJECT(m_playBin), "volume", static_cast<double>(volume), NULL);
+ g_object_set(m_playBin, "volume", static_cast<double>(volume), NULL);
}
+void MediaPlayerPrivate::volumeChanged()
+{
+ if (m_volumeIdleId) {
+ g_source_remove(m_volumeIdleId);
+ m_volumeIdleId = -1;
+ }
+ m_volumeIdleId = g_idle_add((GSourceFunc) notifyVolumeIdleCallback, m_player);
+}
+
+
void MediaPlayerPrivate::setRate(float rate)
{
+ // Avoid useless playback rate update.
+ if (m_playbackRate == rate)
+ return;
+
GstState state;
GstState pending;
@@ -417,6 +559,7 @@ void MediaPlayerPrivate::setRate(float rate)
if (m_isStreaming)
return;
+ m_playbackRate = rate;
m_changingRate = true;
float currentPosition = playbackPosition(m_playBin) * GST_SECOND;
GstSeekFlags flags = (GstSeekFlags)(GST_SEEK_FLAG_FLUSH);
@@ -452,12 +595,6 @@ void MediaPlayerPrivate::setRate(float rate)
g_object_set(m_playBin, "mute", mute, NULL);
}
-int MediaPlayerPrivate::dataRate() const
-{
- notImplemented();
- return 1;
-}
-
MediaPlayer::NetworkState MediaPlayerPrivate::networkState() const
{
return m_networkState;
@@ -512,13 +649,7 @@ unsigned MediaPlayerPrivate::bytesLoaded() const
if (!dur)
return 0;*/
- return 1;//totalBytes() * maxTime / dur;
-}
-
-bool MediaPlayerPrivate::totalBytesKnown() const
-{
- LOG_VERBOSE(Media, "totalBytesKnown");
- return totalBytes() > 0;
+ return 1; // totalBytes() * maxTime / dur;
}
unsigned MediaPlayerPrivate::totalBytes() const
@@ -573,6 +704,8 @@ void MediaPlayerPrivate::updateStates()
gst_element_state_get_name(state),
gst_element_state_get_name(pending));
+ m_resetPipeline = state <= GST_STATE_READY;
+
if (state == GST_STATE_READY)
m_readyState = MediaPlayer::HaveNothing;
else if (state == GST_STATE_PAUSED)
@@ -581,6 +714,11 @@ void MediaPlayerPrivate::updateStates()
if (state == GST_STATE_PLAYING) {
m_readyState = MediaPlayer::HaveEnoughData;
m_paused = false;
+ if (!m_mediaDuration) {
+ float newDuration = duration();
+ if (!isinf(newDuration))
+ m_mediaDuration = newDuration;
+ }
} else
m_paused = true;
@@ -595,10 +733,6 @@ void MediaPlayerPrivate::updateStates()
}
m_networkState = MediaPlayer::Loaded;
-
- g_object_get(m_playBin, "source", &m_source, NULL);
- if (!m_source)
- LOG_VERBOSE(Media, "m_source is 0");
break;
case GST_STATE_CHANGE_ASYNC:
LOG_VERBOSE(Media, "Async: State: %s, pending: %s",
@@ -647,6 +781,105 @@ void MediaPlayerPrivate::updateStates()
}
}
+void MediaPlayerPrivate::mediaLocationChanged(GstMessage* message)
+{
+ if (m_mediaLocations)
+ gst_structure_free(m_mediaLocations);
+
+ if (message->structure) {
+ // This structure can contain:
+ // - both a new-location string and embedded locations structure
+ // - or only a new-location string.
+ m_mediaLocations = gst_structure_copy(message->structure);
+ const GValue* locations = gst_structure_get_value(m_mediaLocations, "locations");
+
+ if (locations)
+ m_mediaLocationCurrentIndex = gst_value_list_get_size(locations) -1;
+
+ loadNextLocation();
+ }
+}
+
+bool MediaPlayerPrivate::loadNextLocation()
+{
+ if (!m_mediaLocations)
+ return false;
+
+ const GValue* locations = gst_structure_get_value(m_mediaLocations, "locations");
+ const gchar* newLocation = 0;
+
+ if (!locations) {
+ // Fallback on new-location string.
+ newLocation = gst_structure_get_string(m_mediaLocations, "new-location");
+ if (!newLocation)
+ return false;
+ }
+
+ if (!newLocation) {
+ if (m_mediaLocationCurrentIndex < 0) {
+ m_mediaLocations = 0;
+ return false;
+ }
+
+ const GValue* location = gst_value_list_get_value(locations,
+ m_mediaLocationCurrentIndex);
+ const GstStructure* structure = gst_value_get_structure(location);
+
+ if (!structure) {
+ m_mediaLocationCurrentIndex--;
+ return false;
+ }
+
+ newLocation = gst_structure_get_string(structure, "new-location");
+ }
+
+ if (newLocation) {
+ // Found a candidate. new-location is not always an absolute url
+ // though. We need to take the base of the current url and
+ // append the value of new-location to it.
+
+ gchar* currentLocation = 0;
+ g_object_get(m_playBin, "uri", &currentLocation, NULL);
+
+ KURL currentUrl(KURL(), currentLocation);
+ g_free(currentLocation);
+
+ KURL newUrl;
+
+ if (gst_uri_is_valid(newLocation))
+ newUrl = KURL(KURL(), newLocation);
+ else
+ newUrl = KURL(KURL(), currentUrl.baseAsString() + newLocation);
+
+ RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(currentUrl);
+ if (securityOrigin->canRequest(newUrl)) {
+ LOG_VERBOSE(Media, "New media url: %s", newUrl.string().utf8().data());
+
+ // Reset player states.
+ m_networkState = MediaPlayer::Loading;
+ m_player->networkStateChanged();
+ m_readyState = MediaPlayer::HaveNothing;
+ m_player->readyStateChanged();
+
+ // Reset pipeline state.
+ m_resetPipeline = true;
+ gst_element_set_state(m_playBin, GST_STATE_READY);
+
+ GstState state;
+ gst_element_get_state(m_playBin, &state, 0, 0);
+ if (state <= GST_STATE_READY) {
+ // Set the new uri and start playing.
+ g_object_set(m_playBin, "uri", newUrl.string().utf8().data(), NULL);
+ gst_element_set_state(m_playBin, GST_STATE_PLAYING);
+ return true;
+ }
+ }
+ }
+ m_mediaLocationCurrentIndex--;
+ return false;
+
+}
+
void MediaPlayerPrivate::loadStateChanged()
{
updateStates();
@@ -663,14 +896,30 @@ void MediaPlayerPrivate::timeChanged()
m_player->timeChanged();
}
-void MediaPlayerPrivate::volumeChanged()
+void MediaPlayerPrivate::didEnd()
{
- m_player->volumeChanged();
+ // EOS was reached but in case of reverse playback the position is
+ // not always 0. So to not confuse the HTMLMediaElement we
+ // synchronize position and duration values.
+ float now = currentTime();
+ if (now > 0)
+ m_mediaDuration = now;
+ gst_element_set_state(m_playBin, GST_STATE_PAUSED);
+
+ timeChanged();
}
-void MediaPlayerPrivate::didEnd()
+void MediaPlayerPrivate::durationChanged()
{
- timeChanged();
+ // Reset cached media duration
+ m_mediaDuration = 0;
+
+ // And re-cache it if possible.
+ float newDuration = duration();
+ if (!isinf(newDuration))
+ m_mediaDuration = newDuration;
+
+ m_player->durationChanged();
}
void MediaPlayerPrivate::loadingFailed(MediaPlayer::NetworkState error)
@@ -711,7 +960,7 @@ void MediaPlayerPrivate::paint(GraphicsContext* context, const IntRect& rect)
return;
int width = 0, height = 0;
- GstCaps *caps = gst_buffer_get_caps(m_buffer);
+ GstCaps* caps = gst_buffer_get_caps(m_buffer);
GstVideoFormat format;
if (!gst_video_format_parse_caps(caps, &format, &width, &height)) {
@@ -751,7 +1000,7 @@ void MediaPlayerPrivate::paint(GraphicsContext* context, const IntRect& rect)
static HashSet<String> mimeTypeCache()
{
- do_gst_init();
+ doGstInit();
static HashSet<String> cache;
static bool typeListInitialized = false;
@@ -814,11 +1063,11 @@ static HashSet<String> mimeTypeCache()
if (G_VALUE_TYPE(layer) == GST_TYPE_INT_RANGE) {
gint minLayer = gst_value_get_int_range_min(layer);
gint maxLayer = gst_value_get_int_range_max(layer);
- if (minLayer <= 1 <= maxLayer)
+ if (minLayer <= 1 && 1 <= maxLayer)
cache.add(String("audio/mp1"));
- if (minLayer <= 2 <= maxLayer)
+ if (minLayer <= 2 && 2 <= maxLayer)
cache.add(String("audio/mp2"));
- if (minLayer <= 3 <= maxLayer)
+ if (minLayer <= 3 && 3 <= maxLayer)
cache.add(String("audio/mp3"));
}
}
@@ -887,13 +1136,29 @@ void MediaPlayerPrivate::createGSTPlayBin(String url)
g_signal_connect(bus, "message", G_CALLBACK(mediaPlayerPrivateMessageCallback), this);
gst_object_unref(bus);
- g_object_set(G_OBJECT(m_playBin), "uri", url.utf8().data(),
- "volume", static_cast<double>(m_player->volume()), NULL);
+ g_object_set(m_playBin, "uri", url.utf8().data(), NULL);
+
+ g_signal_connect(m_playBin, "notify::volume", G_CALLBACK(mediaPlayerPrivateVolumeChangedCallback), this);
+ g_signal_connect(m_playBin, "notify::source", G_CALLBACK(mediaPlayerPrivateSourceChangedCallback), this);
m_videoSink = webkit_video_sink_new();
g_object_ref_sink(m_videoSink);
- g_object_set(m_playBin, "video-sink", m_videoSink, NULL);
+
+ WTFLogChannel* channel = getChannelFromName("Media");
+ if (channel->state == WTFLogChannelOn) {
+ m_fpsSink = gst_element_factory_make("fpsdisplaysink", "sink");
+ if (g_object_class_find_property(G_OBJECT_GET_CLASS(m_fpsSink), "video-sink")) {
+ g_object_set(m_fpsSink, "video-sink", m_videoSink, NULL);
+ g_object_ref_sink(m_fpsSink);
+ g_object_set(m_playBin, "video-sink", m_fpsSink, NULL);
+ } else {
+ m_fpsSink = 0;
+ g_object_set(m_playBin, "video-sink", m_videoSink, NULL);
+ LOG(Media, "Can't display FPS statistics, you need gst-plugins-bad >= 0.10.18");
+ }
+ } else
+ g_object_set(m_playBin, "video-sink", m_videoSink, NULL);
g_signal_connect(m_videoSink, "repaint-requested", G_CALLBACK(mediaPlayerPrivateRepaintCallback), this);
}
diff --git a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h
index 6ab8edb..ec55b29 100644
--- a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h
+++ b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h
@@ -39,16 +39,19 @@ typedef struct _GstBus GstBus;
namespace WebCore {
- class GraphicsContext;
- class IntSize;
- class IntRect;
- class String;
+class GraphicsContext;
+class IntSize;
+class IntRect;
+class String;
- gboolean mediaPlayerPrivateMessageCallback(GstBus* bus, GstMessage* message, gpointer data);
+gboolean mediaPlayerPrivateMessageCallback(GstBus* bus, GstMessage* message, gpointer data);
+void mediaPlayerPrivateVolumeChangedCallback(GObject* element, GParamSpec* pspec, gpointer data);
+void mediaPlayerPrivateSourceChangedCallback(GObject* element, GParamSpec* pspec, gpointer data);
- class MediaPlayerPrivate : public MediaPlayerPrivateInterface {
+class MediaPlayerPrivate : public MediaPlayerPrivateInterface {
friend gboolean mediaPlayerPrivateMessageCallback(GstBus* bus, GstMessage* message, gpointer data);
- friend void mediaPlayerPrivateRepaintCallback(WebKitVideoSink*, GstBuffer *buffer, MediaPlayerPrivate* playerPrivate);
+ friend void mediaPlayerPrivateRepaintCallback(WebKitVideoSink*, GstBuffer* buffer, MediaPlayerPrivate* playerPrivate);
+ friend void mediaPlayerPrivateSourceChangedCallback(GObject* element, GParamSpec* pspec, gpointer data);
public:
static void registerMediaEngine(MediaEngineRegistrar);
@@ -60,6 +63,7 @@ namespace WebCore {
void load(const String &url);
void cancelLoad();
+ bool loadNextLocation();
void play();
void pause();
@@ -70,12 +74,10 @@ namespace WebCore {
float duration() const;
float currentTime() const;
void seek(float);
- void setEndTime(float);
void setRate(float);
void setVolume(float);
-
- int dataRate() const;
+ void volumeChanged();
MediaPlayer::NetworkState networkState() const;
MediaPlayer::ReadyState readyState() const;
@@ -83,17 +85,17 @@ namespace WebCore {
PassRefPtr<TimeRanges> buffered() const;
float maxTimeSeekable() const;
unsigned bytesLoaded() const;
- bool totalBytesKnown() const;
unsigned totalBytes() const;
void setVisible(bool);
void setSize(const IntSize&);
+ void mediaLocationChanged(GstMessage*);
void loadStateChanged();
void sizeChanged();
void timeChanged();
- void volumeChanged();
void didEnd();
+ void durationChanged();
void loadingFailed(MediaPlayer::NetworkState);
void repaint();
@@ -103,6 +105,8 @@ namespace WebCore {
bool supportsFullscreen() const;
+ bool pipelineReset() const { return m_resetPipeline; }
+
private:
MediaPlayerPrivate(MediaPlayer*);
static MediaPlayerPrivateInterface* create(MediaPlayer* player);
@@ -118,11 +122,13 @@ namespace WebCore {
void startEndPointTimerIfNeeded();
void createGSTPlayBin(String url);
+ bool changePipelineState(GstState state);
private:
MediaPlayer* m_player;
GstElement* m_playBin;
GstElement* m_videoSink;
+ GstElement* m_fpsSink;
GstElement* m_source;
GstClockTime m_seekTime;
bool m_changingRate;
@@ -134,10 +140,15 @@ namespace WebCore {
mutable bool m_isStreaming;
IntSize m_size;
GstBuffer* m_buffer;
-
+ GstStructure* m_mediaLocations;
+ gint m_mediaLocationCurrentIndex;
+ bool m_resetPipeline;
bool m_paused;
bool m_seeking;
+ float m_playbackRate;
bool m_errorOccured;
+ guint m_volumeIdleId;
+ gfloat m_mediaDuration;
};
}
diff --git a/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp b/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp
index 4728d56..6038c6a 100644
--- a/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp
+++ b/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp
@@ -204,12 +204,16 @@ void GraphicsContext::clip(const FloatRect& rect)
m_data->m_view->ConstrainClippingRegion(&region);
}
-void GraphicsContext::drawFocusRing(const Color& color)
+void GraphicsContext::drawFocusRing(const Vector<Path>& paths, int width, int offset, const Color& color)
+{
+ // FIXME: implement
+}
+
+void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int /* width */, int /* offset */, const Color& color)
{
if (paintingDisabled())
return;
- const Vector<IntRect>& rects = focusRingRects();
unsigned rectCount = rects.size();
// FIXME: maybe we should implement this with BShape?
diff --git a/WebCore/platform/graphics/mac/Canvas3DLayer.mm b/WebCore/platform/graphics/mac/Canvas3DLayer.mm
index 94819d4..59a7384 100644
--- a/WebCore/platform/graphics/mac/Canvas3DLayer.mm
+++ b/WebCore/platform/graphics/mac/Canvas3DLayer.mm
@@ -33,8 +33,9 @@
#import "GraphicsLayer.h"
#import <QuartzCore/QuartzCore.h>
#import <OpenGL/OpenGL.h>
+#import <wtf/FastMalloc.h>
#import <wtf/RetainPtr.h>
-#include <wtf/FastMalloc.h>
+#import <wtf/UnusedParam.h>
using namespace WebCore;
@@ -140,6 +141,13 @@ static void freeData(void *, const void *data, size_t /* size */)
return image;
}
+- (void)display
+{
+ [super display];
+ if (m_layerOwner)
+ m_layerOwner->didDisplay(self);
+}
+
@end
@implementation Canvas3DLayer(WebLayerAdditions)
diff --git a/WebCore/platform/graphics/mac/ComplexTextController.cpp b/WebCore/platform/graphics/mac/ComplexTextController.cpp
index 265b2c3..7d12b61 100644
--- a/WebCore/platform/graphics/mac/ComplexTextController.cpp
+++ b/WebCore/platform/graphics/mac/ComplexTextController.cpp
@@ -29,6 +29,13 @@
#include "Font.h"
#include "TextBreakIterator.h"
+#include <wtf/StdLibExtras.h>
+
+#if defined(BUILDING_ON_LEOPARD)
+// Undefined when compiling agains the 10.5 SDK.
+#define kCTVersionNumber10_6 0x00030000
+#endif
+
using namespace std;
namespace WebCore {
@@ -106,7 +113,7 @@ int ComplexTextController::offsetForPosition(int h, bool includePartialGlyphs)
else
hitGlyphEnd = max<CFIndex>(hitGlyphStart, j > 0 ? complexTextRun.indexAt(j - 1) : complexTextRun.stringLength());
- // FIXME: Instead of dividing the glyph's advance equially between the characters, this
+ // FIXME: Instead of dividing the glyph's advance equally between the characters, this
// could use the glyph's "ligature carets". However, there is no Core Text API to get the
// ligature carets.
CFIndex hitIndex = hitGlyphStart + (hitGlyphEnd - hitGlyphStart) * (m_run.ltr() ? x / adjustedAdvance : 1 - x / adjustedAdvance);
@@ -263,6 +270,62 @@ void ComplexTextController::collectComplexTextRuns()
collectComplexTextRunsForCharacters(&hyphen, 1, m_end - 1, m_font.glyphDataForCharacter(hyphen, false).fontData);
}
+#if USE(CORE_TEXT) && USE(ATSUI)
+static inline bool shouldUseATSUIAPI()
+{
+ enum TypeRenderingAPIToUse { UnInitialized, UseATSUI, UseCoreText };
+ DEFINE_STATIC_LOCAL(TypeRenderingAPIToUse, apiToUse, (UnInitialized));
+
+ if (UNLIKELY(apiToUse == UnInitialized)) {
+ if (&CTGetCoreTextVersion != 0 && CTGetCoreTextVersion() >= kCTVersionNumber10_6)
+ apiToUse = UseCoreText;
+ else
+ apiToUse = UseATSUI;
+ }
+
+ return apiToUse == UseATSUI;
+}
+#endif
+
+CFIndex ComplexTextController::ComplexTextRun::indexAt(size_t i) const
+{
+#if USE(CORE_TEXT) && USE(ATSUI)
+ return shouldUseATSUIAPI() ? m_atsuiIndices[i] : m_coreTextIndices[i];
+#elif USE(ATSUI)
+ return m_atsuiIndices[i];
+#elif USE(CORE_TEXT)
+ return m_coreTextIndices[i];
+#endif
+}
+
+void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp, unsigned length, unsigned stringLocation, const SimpleFontData* fontData)
+{
+#if USE(CORE_TEXT) && USE(ATSUI)
+ if (shouldUseATSUIAPI())
+ return collectComplexTextRunsForCharactersATSUI(cp, length, stringLocation, fontData);
+ return collectComplexTextRunsForCharactersCoreText(cp, length, stringLocation, fontData);
+#elif USE(ATSUI)
+ return collectComplexTextRunsForCharactersATSUI(cp, length, stringLocation, fontData);
+#elif USE(CORE_TEXT)
+ return collectComplexTextRunsForCharactersCoreText(cp, length, stringLocation, fontData);
+#endif
+}
+
+ComplexTextController::ComplexTextRun::ComplexTextRun(const SimpleFontData* fontData, const UChar* characters, unsigned stringLocation, size_t stringLength, bool ltr)
+ : m_fontData(fontData)
+ , m_characters(characters)
+ , m_stringLocation(stringLocation)
+ , m_stringLength(stringLength)
+{
+#if USE(CORE_TEXT) && USE(ATSUI)
+ shouldUseATSUIAPI() ? createTextRunFromFontDataATSUI(ltr) : createTextRunFromFontDataCoreText(ltr);
+#elif USE(ATSUI)
+ createTextRunFromFontDataATSUI(ltr);
+#elif USE(CORE_TEXT)
+ createTextRunFromFontDataCoreText(ltr);
+#endif
+}
+
void ComplexTextController::advance(unsigned offset, GlyphBuffer* glyphBuffer)
{
if (static_cast<int>(offset) > m_end)
diff --git a/WebCore/platform/graphics/mac/ComplexTextController.h b/WebCore/platform/graphics/mac/ComplexTextController.h
index 7a915e2..3fec18a 100644
--- a/WebCore/platform/graphics/mac/ComplexTextController.h
+++ b/WebCore/platform/graphics/mac/ComplexTextController.h
@@ -39,6 +39,11 @@ class Font;
class SimpleFontData;
class TextRun;
+// ComplexTextController is responsible for rendering and measuring glyphs for
+// complex scripts on OS X.
+// The underlying API can be selected at compile time based on USE(ATSUI) and
+// USE(CORE_TEXT). If both are defined then the Core Text APIs are used for
+// OS Versions >= 10.6, ATSUI is used otherwise.
class ComplexTextController {
public:
ComplexTextController(const Font*, const TextRun&, bool mayUseNaturalWritingDirection = false, HashSet<const SimpleFontData*>* fallbackFonts = 0);
@@ -65,7 +70,8 @@ private:
{
return adoptRef(new ComplexTextRun(ctRun, fontData, characters, stringLocation, stringLength));
}
-#elif USE(ATSUI)
+#endif
+#if USE(ATSUI)
static PassRefPtr<ComplexTextRun> create(ATSUTextLayout atsuTextLayout, const SimpleFontData* fontData, const UChar* characters, unsigned stringLocation, size_t stringLength, bool ltr, bool directionalOverride)
{
return adoptRef(new ComplexTextRun(atsuTextLayout, fontData, characters, stringLocation, stringLength, ltr, directionalOverride));
@@ -81,15 +87,18 @@ private:
const UChar* characters() const { return m_characters; }
unsigned stringLocation() const { return m_stringLocation; }
size_t stringLength() const { return m_stringLength; }
- CFIndex indexAt(size_t i) const { return m_indices[i]; }
+ ALWAYS_INLINE CFIndex indexAt(size_t i) const;
const CGGlyph* glyphs() const { return m_glyphs; }
const CGSize* advances() const { return m_advances; }
private:
#if USE(CORE_TEXT)
ComplexTextRun(CTRunRef, const SimpleFontData*, const UChar* characters, unsigned stringLocation, size_t stringLength);
-#elif USE(ATSUI)
+ void createTextRunFromFontDataCoreText(bool ltr);
+#endif
+#if USE(ATSUI)
ComplexTextRun(ATSUTextLayout, const SimpleFontData*, const UChar* characters, unsigned stringLocation, size_t stringLength, bool ltr, bool directionalOverride);
+ void createTextRunFromFontDataATSUI(bool ltr);
#endif
ComplexTextRun(const SimpleFontData*, const UChar* characters, unsigned stringLocation, size_t stringLength, bool ltr);
@@ -101,7 +110,7 @@ private:
#endif
#if USE(CORE_TEXT)
- RetainPtr<CTRunRef> m_CTRun;
+ RetainPtr<CTRunRef> m_coreTextRun;
#endif
unsigned m_glyphCount;
const SimpleFontData* m_fontData;
@@ -109,10 +118,11 @@ private:
unsigned m_stringLocation;
size_t m_stringLength;
#if USE(CORE_TEXT)
- RetainPtr<CFMutableDataRef> m_indicesData;
- const CFIndex* m_indices;
-#elif USE(ATSUI)
- Vector<CFIndex, 64> m_indices;
+ RetainPtr<CFMutableDataRef> m_coreTextIndicesData;
+ const CFIndex* m_coreTextIndices;
+#endif
+#if USE(ATSUI)
+ Vector<CFIndex, 64> m_atsuiIndices;
#endif
Vector<CGGlyph, 64> m_glyphsVector;
const CGGlyph* m_glyphs;
@@ -125,7 +135,12 @@ private:
};
void collectComplexTextRuns();
+
+ // collectComplexTextRunsForCharacters() is a stub function that calls through to the ATSUI or Core Text variants based
+ // on the API in use.
void collectComplexTextRunsForCharacters(const UChar*, unsigned length, unsigned stringLocation, const SimpleFontData*);
+ void collectComplexTextRunsForCharactersATSUI(const UChar*, unsigned length, unsigned stringLocation, const SimpleFontData*);
+ void collectComplexTextRunsForCharactersCoreText(const UChar*, unsigned length, unsigned stringLocation, const SimpleFontData*);
void adjustGlyphsAndAdvances();
const Font& m_font;
diff --git a/WebCore/platform/graphics/mac/ComplexTextControllerATSUI.cpp b/WebCore/platform/graphics/mac/ComplexTextControllerATSUI.cpp
index 78c588f..48aa174 100644
--- a/WebCore/platform/graphics/mac/ComplexTextControllerATSUI.cpp
+++ b/WebCore/platform/graphics/mac/ComplexTextControllerATSUI.cpp
@@ -45,7 +45,7 @@ OSStatus ComplexTextController::ComplexTextRun::overrideLayoutOperation(ATSULayo
ComplexTextRun* complexTextRun = reinterpret_cast<ComplexTextRun*>(refCon);
OSStatus status;
ItemCount count;
- ATSLayoutRecord *layoutRecords;
+ ATSLayoutRecord* layoutRecords;
status = ATSUDirectGetLayoutDataArrayPtrFromLineRef(atsuLineRef, kATSUDirectDataLayoutRecordATSLayoutRecordCurrent, true, reinterpret_cast<void**>(&layoutRecords), &count);
if (status != noErr) {
@@ -66,7 +66,7 @@ OSStatus ComplexTextController::ComplexTextRun::overrideLayoutOperation(ATSULayo
complexTextRun->m_glyphCount = count;
complexTextRun->m_glyphsVector.reserveCapacity(count);
complexTextRun->m_advancesVector.reserveCapacity(count);
- complexTextRun->m_indices.reserveCapacity(count);
+ complexTextRun->m_atsuiIndices.reserveCapacity(count);
bool atBeginning = true;
CGFloat lastX = 0;
@@ -77,7 +77,7 @@ OSStatus ComplexTextController::ComplexTextRun::overrideLayoutOperation(ATSULayo
continue;
}
complexTextRun->m_glyphsVector.uncheckedAppend(layoutRecords[j].glyphID);
- complexTextRun->m_indices.uncheckedAppend(layoutRecords[j].originalOffset / 2 + indexOffset);
+ complexTextRun->m_atsuiIndices.uncheckedAppend(layoutRecords[j].originalOffset / 2 + indexOffset);
CGFloat x = FixedToFloat(layoutRecords[j].realPos);
if (!atBeginning)
complexTextRun->m_advancesVector.uncheckedAppend(CGSizeMake(x - lastX, 0));
@@ -219,33 +219,29 @@ ComplexTextController::ComplexTextRun::ComplexTextRun(ATSUTextLayout atsuTextLay
status = ATSUDisposeTextLayout(atsuTextLayout);
}
-ComplexTextController::ComplexTextRun::ComplexTextRun(const SimpleFontData* fontData, const UChar* characters, unsigned stringLocation, size_t stringLength, bool ltr)
- : m_fontData(fontData)
- , m_characters(characters)
- , m_stringLocation(stringLocation)
- , m_stringLength(stringLength)
+void ComplexTextController::ComplexTextRun::createTextRunFromFontDataATSUI(bool ltr)
{
- m_indices.reserveCapacity(stringLength);
+ m_atsuiIndices.reserveCapacity(m_stringLength);
unsigned r = 0;
- while (r < stringLength) {
- m_indices.uncheckedAppend(r);
- if (U_IS_SURROGATE(characters[r])) {
- ASSERT(r + 1 < stringLength);
- ASSERT(U_IS_SURROGATE_LEAD(characters[r]));
- ASSERT(U_IS_TRAIL(characters[r + 1]));
+ while (r < m_stringLength) {
+ m_atsuiIndices.uncheckedAppend(r);
+ if (U_IS_SURROGATE(m_characters[r])) {
+ ASSERT(r + 1 < m_stringLength);
+ ASSERT(U_IS_SURROGATE_LEAD(m_characters[r]));
+ ASSERT(U_IS_TRAIL(m_characters[r + 1]));
r += 2;
} else
r++;
}
- m_glyphCount = m_indices.size();
+ m_glyphCount = m_atsuiIndices.size();
if (!ltr) {
for (unsigned r = 0, end = m_glyphCount - 1; r < m_glyphCount / 2; ++r, --end)
- std::swap(m_indices[r], m_indices[end]);
+ std::swap(m_atsuiIndices[r], m_atsuiIndices[end]);
}
m_glyphsVector.fill(0, m_glyphCount);
m_glyphs = m_glyphsVector.data();
- m_advancesVector.fill(CGSizeMake(fontData->widthForGlyph(0), 0), m_glyphCount);
+ m_advancesVector.fill(CGSizeMake(m_fontData->widthForGlyph(0), 0), m_glyphCount);
m_advances = m_advancesVector.data();
}
@@ -261,33 +257,37 @@ static bool fontHasMirroringInfo(ATSUFontID fontID)
return false;
}
-static void disableLigatures(const SimpleFontData* fontData, TextRenderingMode textMode)
+static void disableLigatures(const SimpleFontData* fontData, ATSUStyle atsuStyle, TypesettingFeatures typesettingFeatures)
{
// Don't be too aggressive: if the font doesn't contain 'a', then assume that any ligatures it contains are
// in characters that always go through ATSUI, and therefore allow them. Geeza Pro is an example.
// See bugzilla 5166.
- if (textMode == OptimizeLegibility || textMode == GeometricPrecision || fontData->platformData().allowsLigatures())
+ if ((typesettingFeatures & Ligatures) || fontData->platformData().allowsLigatures())
return;
ATSUFontFeatureType featureTypes[] = { kLigaturesType };
ATSUFontFeatureSelector featureSelectors[] = { kCommonLigaturesOffSelector };
- OSStatus status = ATSUSetFontFeatures(fontData->m_ATSUStyle, 1, featureTypes, featureSelectors);
+ OSStatus status = ATSUSetFontFeatures(atsuStyle, 1, featureTypes, featureSelectors);
if (status != noErr)
LOG_ERROR("ATSUSetFontFeatures failed (%d) -- ligatures remain enabled", static_cast<int>(status));
}
-static void initializeATSUStyle(const SimpleFontData* fontData, TextRenderingMode textMode)
+static ATSUStyle initializeATSUStyle(const SimpleFontData* fontData, TypesettingFeatures typesettingFeatures)
{
- if (fontData->m_ATSUStyleInitialized)
- return;
+ unsigned key = typesettingFeatures + 1;
+ pair<HashMap<unsigned, ATSUStyle>::iterator, bool> addResult = fontData->m_ATSUStyleMap.add(key, 0);
+ ATSUStyle& atsuStyle = addResult.first->second;
+ if (!addResult.second)
+ return atsuStyle;
ATSUFontID fontID = fontData->platformData().m_atsuFontID;
if (!fontID) {
LOG_ERROR("unable to get ATSUFontID for %p", fontData->platformData().font());
- return;
+ fontData->m_ATSUStyleMap.remove(addResult.first);
+ return 0;
}
- OSStatus status = ATSUCreateStyle(&fontData->m_ATSUStyle);
+ OSStatus status = ATSUCreateStyle(&atsuStyle);
if (status != noErr)
LOG_ERROR("ATSUCreateStyle failed (%d)", static_cast<int>(status));
@@ -299,19 +299,18 @@ static void initializeATSUStyle(const SimpleFontData* fontData, TextRenderingMod
ATSUAttributeTag styleTags[4] = { kATSUSizeTag, kATSUFontTag, kATSUFontMatrixTag, kATSUKerningInhibitFactorTag };
ATSUAttributeValuePtr styleValues[4] = { &fontSize, &fontID, &verticalFlip, &kerningInhibitFactor };
- bool allowKerning = textMode == OptimizeLegibility || textMode == GeometricPrecision;
- status = ATSUSetAttributes(fontData->m_ATSUStyle, allowKerning ? 3 : 4, styleTags, styleSizes, styleValues);
+ bool allowKerning = typesettingFeatures & Kerning;
+ status = ATSUSetAttributes(atsuStyle, allowKerning ? 3 : 4, styleTags, styleSizes, styleValues);
if (status != noErr)
LOG_ERROR("ATSUSetAttributes failed (%d)", static_cast<int>(status));
fontData->m_ATSUMirrors = fontHasMirroringInfo(fontID);
- disableLigatures(fontData, textMode);
-
- fontData->m_ATSUStyleInitialized = true;
+ disableLigatures(fontData, atsuStyle, typesettingFeatures);
+ return atsuStyle;
}
-void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp, unsigned length, unsigned stringLocation, const SimpleFontData* fontData)
+void ComplexTextController::collectComplexTextRunsForCharactersATSUI(const UChar* cp, unsigned length, unsigned stringLocation, const SimpleFontData* fontData)
{
if (!fontData) {
// Create a run of missing glyphs from the primary font.
@@ -322,13 +321,13 @@ void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp,
if (m_fallbackFonts && fontData != m_font.primaryFont())
m_fallbackFonts->add(fontData);
- initializeATSUStyle(fontData, m_font.fontDescription().textRenderingMode());
+ ATSUStyle atsuStyle = initializeATSUStyle(fontData, m_font.typesettingFeatures());
OSStatus status;
ATSUTextLayout atsuTextLayout;
UniCharCount runLength = length;
- status = ATSUCreateTextLayoutWithTextPtr(cp, 0, length, length, 1, &runLength, &fontData->m_ATSUStyle, &atsuTextLayout);
+ status = ATSUCreateTextLayoutWithTextPtr(cp, 0, length, length, 1, &runLength, &atsuStyle, &atsuTextLayout);
if (status != noErr) {
LOG_ERROR("ATSUCreateTextLayoutWithTextPtr failed with error %d", static_cast<int>(status));
return;
diff --git a/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.cpp b/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.cpp
index c9daf84..dd5e96a 100644
--- a/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.cpp
+++ b/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.cpp
@@ -29,35 +29,44 @@
#include "Font.h"
+#if defined(BUILDING_ON_LEOPARD)
+// The following symbols are SPI in 10.5.
+extern "C" {
+void CTRunGetAdvances(CTRunRef run, CFRange range, CGSize buffer[]);
+const CGSize* CTRunGetAdvancesPtr(CTRunRef run);
+extern const CFStringRef kCTTypesetterOptionForcedEmbeddingLevel;
+}
+#endif
+
namespace WebCore {
ComplexTextController::ComplexTextRun::ComplexTextRun(CTRunRef ctRun, const SimpleFontData* fontData, const UChar* characters, unsigned stringLocation, size_t stringLength)
- : m_CTRun(ctRun)
+ : m_coreTextRun(ctRun)
, m_fontData(fontData)
, m_characters(characters)
, m_stringLocation(stringLocation)
, m_stringLength(stringLength)
{
- m_glyphCount = CTRunGetGlyphCount(m_CTRun.get());
- m_indices = CTRunGetStringIndicesPtr(m_CTRun.get());
- if (!m_indices) {
- m_indicesData.adoptCF(CFDataCreateMutable(kCFAllocatorDefault, m_glyphCount * sizeof(CFIndex)));
- CFDataIncreaseLength(m_indicesData.get(), m_glyphCount * sizeof(CFIndex));
- m_indices = reinterpret_cast<const CFIndex*>(CFDataGetMutableBytePtr(m_indicesData.get()));
- CTRunGetStringIndices(m_CTRun.get(), CFRangeMake(0, 0), const_cast<CFIndex*>(m_indices));
+ m_glyphCount = CTRunGetGlyphCount(m_coreTextRun.get());
+ m_coreTextIndices = CTRunGetStringIndicesPtr(m_coreTextRun.get());
+ if (!m_coreTextIndices) {
+ m_coreTextIndicesData.adoptCF(CFDataCreateMutable(kCFAllocatorDefault, m_glyphCount * sizeof(CFIndex)));
+ CFDataIncreaseLength(m_coreTextIndicesData.get(), m_glyphCount * sizeof(CFIndex));
+ m_coreTextIndices = reinterpret_cast<const CFIndex*>(CFDataGetMutableBytePtr(m_coreTextIndicesData.get()));
+ CTRunGetStringIndices(m_coreTextRun.get(), CFRangeMake(0, 0), const_cast<CFIndex*>(m_coreTextIndices));
}
- m_glyphs = CTRunGetGlyphsPtr(m_CTRun.get());
+ m_glyphs = CTRunGetGlyphsPtr(m_coreTextRun.get());
if (!m_glyphs) {
m_glyphsVector.grow(m_glyphCount);
- CTRunGetGlyphs(m_CTRun.get(), CFRangeMake(0, 0), m_glyphsVector.data());
+ CTRunGetGlyphs(m_coreTextRun.get(), CFRangeMake(0, 0), m_glyphsVector.data());
m_glyphs = m_glyphsVector.data();
}
- m_advances = CTRunGetAdvancesPtr(m_CTRun.get());
+ m_advances = CTRunGetAdvancesPtr(m_coreTextRun.get());
if (!m_advances) {
m_advancesVector.grow(m_glyphCount);
- CTRunGetAdvances(m_CTRun.get(), CFRangeMake(0, 0), m_advancesVector.data());
+ CTRunGetAdvances(m_coreTextRun.get(), CFRangeMake(0, 0), m_advancesVector.data());
m_advances = m_advancesVector.data();
}
@@ -65,20 +74,16 @@ ComplexTextController::ComplexTextRun::ComplexTextRun(CTRunRef ctRun, const Simp
// Missing glyphs run constructor. Core Text will not generate a run of missing glyphs, instead falling back on
// glyphs from LastResort. We want to use the primary font's missing glyph in order to match the fast text code path.
-ComplexTextController::ComplexTextRun::ComplexTextRun(const SimpleFontData* fontData, const UChar* characters, unsigned stringLocation, size_t stringLength, bool ltr)
- : m_fontData(fontData)
- , m_characters(characters)
- , m_stringLocation(stringLocation)
- , m_stringLength(stringLength)
+void ComplexTextController::ComplexTextRun::createTextRunFromFontDataCoreText(bool ltr)
{
Vector<CFIndex, 16> indices;
unsigned r = 0;
- while (r < stringLength) {
+ while (r < m_stringLength) {
indices.append(r);
- if (U_IS_SURROGATE(characters[r])) {
- ASSERT(r + 1 < stringLength);
- ASSERT(U_IS_SURROGATE_LEAD(characters[r]));
- ASSERT(U_IS_TRAIL(characters[r + 1]));
+ if (U_IS_SURROGATE(m_characters[r])) {
+ ASSERT(r + 1 < m_stringLength);
+ ASSERT(U_IS_SURROGATE_LEAD(m_characters[r]));
+ ASSERT(U_IS_TRAIL(m_characters[r + 1]));
r += 2;
} else
r++;
@@ -88,9 +93,9 @@ ComplexTextController::ComplexTextRun::ComplexTextRun(const SimpleFontData* font
for (unsigned r = 0, end = m_glyphCount - 1; r < m_glyphCount / 2; ++r, --end)
std::swap(indices[r], indices[end]);
}
- m_indicesData.adoptCF(CFDataCreateMutable(kCFAllocatorDefault, m_glyphCount * sizeof(CFIndex)));
- CFDataAppendBytes(m_indicesData.get(), reinterpret_cast<const UInt8*>(indices.data()), m_glyphCount * sizeof(CFIndex));
- m_indices = reinterpret_cast<const CFIndex*>(CFDataGetBytePtr(m_indicesData.get()));
+ m_coreTextIndicesData.adoptCF(CFDataCreateMutable(kCFAllocatorDefault, m_glyphCount * sizeof(CFIndex)));
+ CFDataAppendBytes(m_coreTextIndicesData.get(), reinterpret_cast<const UInt8*>(indices.data()), m_glyphCount * sizeof(CFIndex));
+ m_coreTextIndices = reinterpret_cast<const CFIndex*>(CFDataGetBytePtr(m_coreTextIndicesData.get()));
// Synthesize a run of missing glyphs.
m_glyphsVector.fill(0, m_glyphCount);
@@ -99,7 +104,7 @@ ComplexTextController::ComplexTextRun::ComplexTextRun(const SimpleFontData* font
m_advances = m_advancesVector.data();
}
-void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp, unsigned length, unsigned stringLocation, const SimpleFontData* fontData)
+void ComplexTextController::collectComplexTextRunsForCharactersCoreText(const UChar* cp, unsigned length, unsigned stringLocation, const SimpleFontData* fontData)
{
if (!fontData) {
// Create a run of missing glyphs from the primary font.
@@ -112,7 +117,7 @@ void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp,
RetainPtr<CFStringRef> string(AdoptCF, CFStringCreateWithCharactersNoCopy(NULL, cp, length, kCFAllocatorNull));
- RetainPtr<CFAttributedStringRef> attributedString(AdoptCF, CFAttributedStringCreate(NULL, string.get(), fontData->getCFStringAttributes(m_font.fontDescription().textRenderingMode())));
+ RetainPtr<CFAttributedStringRef> attributedString(AdoptCF, CFAttributedStringCreate(NULL, string.get(), fontData->getCFStringAttributes(m_font.typesettingFeatures())));
RetainPtr<CTTypesetterRef> typesetter;
diff --git a/WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp b/WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp
index 41f63a9..5e5e1f4 100644
--- a/WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp
+++ b/WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp
@@ -29,28 +29,24 @@
#include "GraphicsContext3D.h"
-#include "CachedImage.h"
+#include "CanvasObject.h"
+#include "CString.h"
+#include "ImageBuffer.h"
+#include "NotImplemented.h"
#include "WebGLActiveInfo.h"
#include "WebGLArray.h"
#include "WebGLBuffer.h"
#include "WebGLFramebuffer.h"
#include "WebGLFloatArray.h"
#include "WebGLIntArray.h"
-#include "CanvasObject.h"
#include "WebGLProgram.h"
#include "WebGLRenderbuffer.h"
#include "WebGLShader.h"
#include "WebGLTexture.h"
#include "WebGLUnsignedByteArray.h"
-#include "CString.h"
-#include "HTMLCanvasElement.h"
-#include "HTMLImageElement.h"
-#include "ImageBuffer.h"
-#include "NotImplemented.h"
-#include "WebKitCSSMatrix.h"
-
#include <CoreGraphics/CGBitmapContext.h>
#include <OpenGL/CGLRenderers.h>
+#include <wtf/UnusedParam.h>
namespace WebCore {
@@ -79,18 +75,29 @@ static void setPixelFormat(Vector<CGLPixelFormatAttribute>& attribs, int colorBi
attribs.append(static_cast<CGLPixelFormatAttribute>(0));
}
-PassOwnPtr<GraphicsContext3D> GraphicsContext3D::create()
+PassOwnPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attrs)
{
- OwnPtr<GraphicsContext3D> context(new GraphicsContext3D());
+ OwnPtr<GraphicsContext3D> context(new GraphicsContext3D(attrs));
return context->m_contextObj ? context.release() : 0;
}
-GraphicsContext3D::GraphicsContext3D()
- : m_contextObj(0)
+GraphicsContext3D::GraphicsContext3D(GraphicsContext3D::Attributes attrs)
+ : m_attrs(attrs)
+ , m_contextObj(0)
, m_texture(0)
, m_fbo(0)
, m_depthBuffer(0)
{
+ // FIXME: we need to take into account the user's requested
+ // context creation attributes, in particular stencil and
+ // antialias, and determine which could and could not be honored
+ // based on the capabilities of the OpenGL implementation.
+ m_attrs.alpha = true;
+ m_attrs.depth = true;
+ m_attrs.stencil = false;
+ m_attrs.antialias = false;
+ m_attrs.premultipliedAlpha = true;
+
Vector<CGLPixelFormatAttribute> attribs;
CGLPixelFormatObj pixelFormatObj = 0;
GLint numPixelFormats = 0;
@@ -262,7 +269,7 @@ void GraphicsContext3D::bindBuffer(unsigned long target, WebGLBuffer* buffer)
void GraphicsContext3D::bindFramebuffer(unsigned long target, WebGLFramebuffer* buffer)
{
ensureContext(m_contextObj);
- ::glBindFramebufferEXT(target, buffer ? (GLuint) buffer->object() : m_fbo);
+ ::glBindFramebufferEXT(target, (buffer && buffer->object()) ? (GLuint) buffer->object() : m_fbo);
}
void GraphicsContext3D::bindRenderbuffer(unsigned long target, WebGLRenderbuffer* renderbuffer)
@@ -544,6 +551,11 @@ int GraphicsContext3D::getAttribLocation(WebGLProgram* program, const String& na
return ::glGetAttribLocation((GLuint) program->object(), name.utf8().data());
}
+GraphicsContext3D::Attributes GraphicsContext3D::getContextAttributes()
+{
+ return m_attrs;
+}
+
unsigned long GraphicsContext3D::getError()
{
if (m_syntheticErrors.size() > 0) {
@@ -1115,55 +1127,38 @@ long GraphicsContext3D::getVertexAttribOffset(unsigned long index, unsigned long
return reinterpret_cast<long>(pointer);
}
-// Assumes the texture you want to go into is bound
-static void imageToTexture(Image* image, unsigned target, unsigned level)
+// Returned pointer must be freed by fastFree()
+static bool imageToTexture(Image* image, GLubyte*& buffer, size_t& width, size_t& height)
{
if (!image)
- return;
+ return false;
CGImageRef textureImage = image->getCGImageRef();
if (!textureImage)
- return;
+ return false;
- size_t textureWidth = CGImageGetWidth(textureImage);
- size_t textureHeight = CGImageGetHeight(textureImage);
+ width = CGImageGetWidth(textureImage);
+ height = CGImageGetHeight(textureImage);
- GLubyte* textureData = (GLubyte*) fastMalloc(textureWidth * textureHeight * 4);
- if (!textureData)
- return;
+ buffer = (GLubyte*) fastMalloc(width * height * 4);
+ if (!buffer)
+ return false;
- CGContextRef textureContext = CGBitmapContextCreate(textureData, textureWidth, textureHeight, 8, textureWidth * 4,
+ CGContextRef textureContext = CGBitmapContextCreate(buffer, width, height, 8, width * 4,
CGImageGetColorSpace(textureImage), kCGImageAlphaPremultipliedLast);
CGContextSetBlendMode(textureContext, kCGBlendModeCopy);
- CGContextDrawImage(textureContext, CGRectMake(0, 0, (CGFloat)textureWidth, (CGFloat)textureHeight), textureImage);
+ CGContextDrawImage(textureContext, CGRectMake(0, 0, (CGFloat)width, (CGFloat)height), textureImage);
CGContextRelease(textureContext);
-
- ::glTexImage2D(target, level, GL_RGBA, textureWidth, textureHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, textureData);
- fastFree(textureData);
+ return true;
}
-int GraphicsContext3D::texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, WebGLArray* pixels)
+int GraphicsContext3D::texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, void* pixels)
{
// FIXME: Need to do bounds checking on the buffer here.
- ::glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels->baseAddress());
+ ::glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
return 0;
}
-int GraphicsContext3D::texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, ImageData* pixels)
-{
- // FIXME: need to implement this form
- UNUSED_PARAM(target);
- UNUSED_PARAM(level);
- UNUSED_PARAM(internalformat);
- UNUSED_PARAM(width);
- UNUSED_PARAM(height);
- UNUSED_PARAM(border);
- UNUSED_PARAM(format);
- UNUSED_PARAM(type);
- UNUSED_PARAM(pixels);
- return -1;
-}
-
int GraphicsContext3D::texImage2D(unsigned target, unsigned level, Image* image, bool flipY, bool premultiplyAlpha)
{
// FIXME: need to support flipY and premultiplyAlpha
@@ -1172,85 +1167,43 @@ int GraphicsContext3D::texImage2D(unsigned target, unsigned level, Image* image,
ASSERT(image);
ensureContext(m_contextObj);
- imageToTexture(image, target, level);
+ GLubyte* buffer;
+ size_t width;
+ size_t height;
+ if (!imageToTexture(image, buffer, width, height))
+ return -1;
+
+ ::glTexImage2D(target, level, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
+ fastFree(buffer);
return 0;
}
-
-int GraphicsContext3D::texImage2D(unsigned target, unsigned level, HTMLVideoElement* video, bool flipY, bool premultiplyAlpha)
-{
- // FIXME: need to implement this form
- UNUSED_PARAM(target);
- UNUSED_PARAM(level);
- UNUSED_PARAM(video);
-
- // FIXME: need to support flipY and premultiplyAlpha
- UNUSED_PARAM(flipY);
- UNUSED_PARAM(premultiplyAlpha);
- return -1;
-}
-
-int GraphicsContext3D::texSubImage2D(unsigned target, unsigned level, unsigned xoff, unsigned yoff, unsigned width, unsigned height, unsigned format, unsigned type, WebGLArray* pixels)
-{
- // FIXME: we will need to deal with PixelStore params when dealing with image buffers that differ from the subimage size
- UNUSED_PARAM(target);
- UNUSED_PARAM(level);
- UNUSED_PARAM(xoff);
- UNUSED_PARAM(yoff);
- UNUSED_PARAM(width);
- UNUSED_PARAM(height);
- UNUSED_PARAM(format);
- UNUSED_PARAM(type);
- UNUSED_PARAM(pixels);
- return -1;
-}
-
-int GraphicsContext3D::texSubImage2D(unsigned target, unsigned level, unsigned xoff, unsigned yoff, unsigned width, unsigned height, unsigned format, unsigned type, ImageData* pixels)
-{
- // FIXME: we will need to deal with PixelStore params when dealing with image buffers that differ from the subimage size
- UNUSED_PARAM(target);
- UNUSED_PARAM(level);
- UNUSED_PARAM(xoff);
- UNUSED_PARAM(yoff);
- UNUSED_PARAM(width);
- UNUSED_PARAM(height);
- UNUSED_PARAM(format);
- UNUSED_PARAM(type);
- UNUSED_PARAM(pixels);
- return -1;
-}
-
-int GraphicsContext3D::texSubImage2D(unsigned target, unsigned level, unsigned xoff, unsigned yoff, unsigned width, unsigned height, Image* image, bool flipY, bool premultiplyAlpha)
+
+int GraphicsContext3D::texSubImage2D(unsigned target, unsigned level, unsigned xoff, unsigned yoff, unsigned width, unsigned height, unsigned format, unsigned type, void* pixels)
{
// FIXME: we will need to deal with PixelStore params when dealing with image buffers that differ from the subimage size
- UNUSED_PARAM(target);
- UNUSED_PARAM(level);
- UNUSED_PARAM(xoff);
- UNUSED_PARAM(yoff);
- UNUSED_PARAM(width);
- UNUSED_PARAM(height);
- UNUSED_PARAM(image);
-
- // FIXME: need to support flipY and premultiplyAlpha
- UNUSED_PARAM(flipY);
- UNUSED_PARAM(premultiplyAlpha);
- return -1;
+ // FIXME: Need to do bounds checking on the buffer here.
+ ::glTexSubImage2D(target, level, xoff, yoff, width, height, format, type, pixels);
+ return 0;
}
-int GraphicsContext3D::texSubImage2D(unsigned target, unsigned level, unsigned xoff, unsigned yoff, unsigned width, unsigned height, HTMLVideoElement* video, bool flipY, bool premultiplyAlpha)
+int GraphicsContext3D::texSubImage2D(unsigned target, unsigned level, unsigned xoff, unsigned yoff, Image* image, bool flipY, bool premultiplyAlpha)
{
// FIXME: we will need to deal with PixelStore params when dealing with image buffers that differ from the subimage size
- UNUSED_PARAM(target);
- UNUSED_PARAM(level);
- UNUSED_PARAM(xoff);
- UNUSED_PARAM(yoff);
- UNUSED_PARAM(width);
- UNUSED_PARAM(height);
- UNUSED_PARAM(video);
-
- // FIXME: need to support flipY and premultiplyAlpha
+ // FIXME: need to support flipY and premultiplyAlpha
UNUSED_PARAM(flipY);
UNUSED_PARAM(premultiplyAlpha);
- return -1;
+ ASSERT(image);
+
+ ensureContext(m_contextObj);
+ GLubyte* buffer;
+ size_t width;
+ size_t height;
+ if (!imageToTexture(image, buffer, width, height))
+ return -1;
+
+ ::glTexSubImage2D(target, level, xoff, yoff, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
+ fastFree(buffer);
+ return 0;
}
unsigned GraphicsContext3D::createBuffer()
diff --git a/WebCore/platform/graphics/mac/GraphicsContextMac.mm b/WebCore/platform/graphics/mac/GraphicsContextMac.mm
index 6c9b872..5f111f6 100644
--- a/WebCore/platform/graphics/mac/GraphicsContextMac.mm
+++ b/WebCore/platform/graphics/mac/GraphicsContextMac.mm
@@ -26,7 +26,7 @@
#import "config.h"
#import "GraphicsContext.h"
-#import "../cg/GraphicsContextPlatformPrivateCG.h"
+#import "GraphicsContextPlatformPrivateCG.h"
#import <AppKit/AppKit.h>
#import <wtf/StdLibExtras.h>
@@ -43,33 +43,55 @@ namespace WebCore {
// calls in this file are all exception-safe, so we don't block
// exceptions for those.
-void GraphicsContext::drawFocusRing(const Color& color)
+static void drawFocusRingToContext(CGContextRef context, RetainPtr<CGPathRef> focusRingPath, RetainPtr<CGColorRef> colorRef, int radius)
+{
+#ifdef BUILDING_ON_TIGER
+ CGContextBeginTransparencyLayer(context, 0);
+#endif
+ CGContextBeginPath(context);
+ CGContextAddPath(context, focusRingPath.get());
+ wkDrawFocusRing(context, colorRef.get(), radius);
+#ifdef BUILDING_ON_TIGER
+ CGContextEndTransparencyLayer(context);
+#endif
+}
+
+void GraphicsContext::drawFocusRing(const Vector<Path>& paths, int width, int offset, const Color& color)
+{
+ if (paintingDisabled())
+ return;
+
+ int radius = (width - 1) / 2;
+ offset += radius;
+ RetainPtr<CGColorRef> colorRef;
+ if (color.isValid())
+ colorRef.adoptCF(createCGColor(color));
+
+ RetainPtr<CGMutablePathRef> focusRingPath(AdoptCF, CGPathCreateMutable());
+ unsigned pathCount = paths.size();
+ for (unsigned i = 0; i < pathCount; i++)
+ CGPathAddPath(focusRingPath.get(), 0, paths[i].platformPath());
+
+ drawFocusRingToContext(platformContext(), focusRingPath, colorRef, radius);
+}
+
+void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int width, int offset, const Color& color)
{
if (paintingDisabled())
return;
- int radius = (focusRingWidth() - 1) / 2;
- int offset = radius + focusRingOffset();
+ int radius = (width - 1) / 2;
+ offset += radius;
RetainPtr<CGColorRef> colorRef;
if (color.isValid())
colorRef.adoptCF(createCGColor(color));
RetainPtr<CGMutablePathRef> focusRingPath(AdoptCF, CGPathCreateMutable());
- const Vector<IntRect>& rects = focusRingRects();
unsigned rectCount = rects.size();
for (unsigned i = 0; i < rectCount; i++)
CGPathAddRect(focusRingPath.get(), 0, CGRectInset(rects[i], -offset, -offset));
- CGContextRef context = platformContext();
-#ifdef BUILDING_ON_TIGER
- CGContextBeginTransparencyLayer(context, NULL);
-#endif
- CGContextBeginPath(context);
- CGContextAddPath(context, focusRingPath.get());
- wkDrawFocusRing(context, colorRef.get(), radius);
-#ifdef BUILDING_ON_TIGER
- CGContextEndTransparencyLayer(context);
-#endif
+ drawFocusRingToContext(platformContext(), focusRingPath, colorRef, radius);
}
#ifdef BUILDING_ON_TIGER // Post-Tiger's setCompositeOperation() is defined in GraphicsContextCG.cpp.
diff --git a/WebCore/platform/graphics/mac/GraphicsLayerCA.h b/WebCore/platform/graphics/mac/GraphicsLayerCA.h
index 8024091..5362562 100644
--- a/WebCore/platform/graphics/mac/GraphicsLayerCA.h
+++ b/WebCore/platform/graphics/mac/GraphicsLayerCA.h
@@ -30,16 +30,16 @@
#include "GraphicsLayer.h"
#include "StringHash.h"
+#include "WebLayer.h"
+#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
#include <wtf/RetainPtr.h>
@class CABasicAnimation;
@class CAKeyframeAnimation;
-@class CALayer;
@class CAMediaTimingFunction;
@class CAPropertyAnimation;
@class WebAnimationDelegate;
-@class WebLayer;
namespace WebCore {
@@ -64,6 +64,7 @@ public:
virtual void removeFromParent();
virtual void setMaskLayer(GraphicsLayer*);
+ virtual void setReplicatedLayer(GraphicsLayer*);
virtual void setPosition(const FloatPoint&);
virtual void setAnchorPoint(const FloatPoint3D&);
@@ -98,13 +99,13 @@ public:
virtual void suspendAnimations(double time);
virtual void resumeAnimations();
- virtual bool addAnimation(const KeyframeValueList&, const IntSize& boxSize, const Animation*, const String& keyframesName, double beginTime);
+ virtual bool addAnimation(const KeyframeValueList&, const IntSize& boxSize, const Animation*, const String& keyframesName, double timeOffset);
virtual void removeAnimationsForProperty(AnimatedPropertyID);
virtual void removeAnimationsForKeyframes(const String& keyframesName);
- virtual void pauseAnimation(const String& keyframesName);
+ virtual void pauseAnimation(const String& keyframesName, double timeOffset);
virtual void setContentsToImage(Image*);
- virtual void setContentsToVideo(PlatformLayer*);
+ virtual void setContentsToMedia(PlatformLayer*);
#if ENABLE(3D_CANVAS)
virtual void setContentsToGraphicsContext3D(const GraphicsContext3D*);
#endif
@@ -116,8 +117,9 @@ public:
virtual void setGeometryOrientation(CompositingCoordinatesOrientation);
+ virtual void didDisplay(PlatformLayer*);
+
void recursiveCommitChanges();
- void commitLayerChanges();
virtual void syncCompositingState();
@@ -127,13 +129,20 @@ protected:
private:
void updateOpacityOnLayer();
- WebLayer* primaryLayer() const { return m_transformLayer.get() ? m_transformLayer.get() : m_layer.get(); }
- WebLayer* hostLayerForSublayers() const;
- WebLayer* layerForSuperlayer() const;
+ CALayer* primaryLayer() const { return m_structuralLayer.get() ? m_structuralLayer.get() : m_layer.get(); }
+ CALayer* hostLayerForSublayers() const;
+ CALayer* layerForSuperlayer() const;
CALayer* animatedLayer(AnimatedPropertyID property) const;
- bool createAnimationFromKeyframes(const KeyframeValueList&, const Animation*, const String& keyframesName, double beginTime);
- bool createTransformAnimationsFromKeyframes(const KeyframeValueList&, const Animation*, const String& keyframesName, double beginTime, const IntSize& boxSize);
+ typedef String CloneID; // Identifier for a given clone, based on original/replica branching down the tree.
+ static bool isReplicatedRootClone(const CloneID& cloneID) { return cloneID[0U] & 1; }
+
+ typedef HashMap<CloneID, RetainPtr<CALayer> > LayerMap;
+ LayerMap* primaryLayerClones() const { return m_structuralLayer.get() ? m_structuralLayerClones.get() : m_layerClones.get(); }
+ LayerMap* animatedLayerClones(AnimatedPropertyID property) const;
+
+ bool createAnimationFromKeyframes(const KeyframeValueList&, const Animation*, const String& keyframesName, double timeOffset);
+ bool createTransformAnimationsFromKeyframes(const KeyframeValueList&, const Animation*, const String& keyframesName, double timeOffset, const IntSize& boxSize);
// Return autoreleased animation (use RetainPtr?)
CABasicAnimation* createBasicAnimation(const Animation*, AnimatedPropertyID, bool additive);
@@ -153,6 +162,9 @@ private:
return m_runningKeyframeAnimations.find(keyframesName) != m_runningKeyframeAnimations.end();
}
+ void commitLayerChangesBeforeSublayers();
+ void commitLayerChangesAfterSublayers();
+
bool requiresTiledLayer(const FloatSize&) const;
void swapFromOrToTiledLayer(bool useTiledLayer);
@@ -161,8 +173,75 @@ private:
void setupContentsLayer(CALayer*);
CALayer* contentsLayer() const { return m_contentsLayer.get(); }
+
+ virtual void setReplicatedByLayer(GraphicsLayer*);
+
+ // Used to track the path down the tree for replica layers.
+ struct ReplicaState {
+ static const size_t maxReplicaDepth = 16;
+ enum ReplicaBranchType { ChildBranch = 0, ReplicaBranch = 1 };
+ ReplicaState(ReplicaBranchType firstBranch)
+ : m_replicaDepth(0)
+ {
+ push(firstBranch);
+ }
+
+ // Called as we walk down the tree to build replicas.
+ void push(ReplicaBranchType branchType)
+ {
+ m_replicaBranches.append(branchType);
+ if (branchType == ReplicaBranch)
+ ++m_replicaDepth;
+ }
+
+ void setBranchType(ReplicaBranchType branchType)
+ {
+ ASSERT(!m_replicaBranches.isEmpty());
+
+ if (m_replicaBranches.last() != branchType) {
+ if (branchType == ReplicaBranch)
+ ++m_replicaDepth;
+ else
+ --m_replicaDepth;
+ }
+
+ m_replicaBranches.last() = branchType;
+ }
+
+ void pop()
+ {
+ if (m_replicaBranches.last() == ReplicaBranch)
+ --m_replicaDepth;
+ m_replicaBranches.removeLast();
+ }
+
+ size_t depth() const { return m_replicaBranches.size(); }
+ size_t replicaDepth() const { return m_replicaDepth; }
+
+ CloneID cloneID() const;
+
+ private:
+ Vector<ReplicaBranchType> m_replicaBranches;
+ size_t m_replicaDepth;
+ };
+ CALayer *replicatedLayerRoot(ReplicaState&);
+
+ enum CloneLevel { RootCloneLevel, IntermediateCloneLevel };
+ CALayer *fetchCloneLayers(GraphicsLayer* replicaRoot, ReplicaState&, CloneLevel);
+
+ CALayer *cloneLayer(CALayer *, CloneLevel);
+ CALayer *findOrMakeClone(CloneID, CALayer *, LayerMap*, CloneLevel);
+
+ void ensureCloneLayers(CloneID index, CALayer *& primaryLayer, CALayer *& structuralLayer, CALayer *& contentsLayer, CloneLevel);
+
+ bool hasCloneLayers() const { return m_layerClones; }
+ void removeCloneLayers();
+ FloatPoint positionForCloneRootLayer() const;
+
+ void propagateLayerChangeToReplicas();
// All these "update" methods will be called inside a BEGIN_BLOCK_OBJC_EXCEPTIONS/END_BLOCK_OBJC_EXCEPTIONS block.
+ void updateLayerNames();
void updateSublayerList();
void updateLayerPosition();
void updateLayerSize();
@@ -172,25 +251,38 @@ private:
void updateMasksToBounds();
void updateContentsOpaque();
void updateBackfaceVisibility();
- void updateLayerPreserves3D();
+ void updateStructuralLayer();
void updateLayerDrawsContent();
void updateLayerBackgroundColor();
void updateContentsImage();
- void updateContentsVideo();
+ void updateContentsMediaLayer();
#if ENABLE(3D_CANVAS)
void updateContentsGraphicsContext3D();
#endif
void updateContentsRect();
void updateGeometryOrientation();
void updateMaskLayer();
+ void updateReplicatedLayers();
void updateLayerAnimations();
+
+ enum StructuralLayerPurpose {
+ NoStructuralLayer = 0,
+ StructuralLayerForPreserves3D,
+ StructuralLayerForReplicaFlattening
+ };
+ void ensureStructuralLayer(StructuralLayerPurpose);
+ StructuralLayerPurpose structuralLayerPurpose() const;
- void setAnimationOnLayer(CAPropertyAnimation*, AnimatedPropertyID, int index, double beginTime);
- bool removeAnimationFromLayer(AnimatedPropertyID, int index);
- void pauseAnimationOnLayer(AnimatedPropertyID, int index);
+ void setAnimationOnLayer(CAPropertyAnimation*, AnimatedPropertyID, const String& keyframesName, int index, double timeOffset);
+ bool removeAnimationFromLayer(AnimatedPropertyID, const String& keyframesName, int index);
+ void pauseAnimationOnLayer(AnimatedPropertyID, const String& keyframesName, int index, double timeOffset);
+ enum MoveOrCopy { Move, Copy };
+ void moveOrCopyAnimationsForProperty(MoveOrCopy, AnimatedPropertyID property, CALayer * fromLayer, CALayer * toLayer);
+ static void moveOrCopyAllAnimationsForProperty(MoveOrCopy operation, AnimatedPropertyID property, const String& keyframesName, CALayer * fromLayer, CALayer * toLayer);
+
enum LayerChange {
NoChange = 0,
NameChanged = 1 << 1,
@@ -210,27 +302,34 @@ private:
AnimationChanged = 1 << 15,
DirtyRectsChanged = 1 << 16,
ContentsImageChanged = 1 << 17,
- ContentsVideoChanged = 1 << 18,
+ ContentsMediaLayerChanged = 1 << 18,
#if ENABLE(3D_CANVAS)
ContentsGraphicsContext3DChanged = 1 << 19,
#endif
ContentsRectChanged = 1 << 20,
GeometryOrientationChanged = 1 << 21,
- MaskLayerChanged = 1 << 22
+ MaskLayerChanged = 1 << 22,
+ ReplicatedLayerChanged = 1 << 23
};
typedef unsigned LayerChangeFlags;
void noteLayerPropertyChanged(LayerChangeFlags flags);
+ void noteSublayersChanged();
void repaintLayerDirtyRects();
- RetainPtr<WebLayer> m_layer;
- RetainPtr<WebLayer> m_transformLayer;
- RetainPtr<CALayer> m_contentsLayer;
+ RetainPtr<WebLayer> m_layer; // The main layer
+ RetainPtr<CALayer> m_structuralLayer; // A layer used for structural reasons, like preserves-3d or replica-flattening. Is the parent of m_layer.
+ RetainPtr<CALayer> m_contentsLayer; // A layer used for inner content, like image and video
+
+ // References to clones of our layers, for replicated layers.
+ OwnPtr<LayerMap> m_layerClones;
+ OwnPtr<LayerMap> m_structuralLayerClones;
+ OwnPtr<LayerMap> m_contentsLayerClones;
enum ContentsLayerPurpose {
NoContentsLayer = 0,
ContentsLayerForImage,
- ContentsLayerForVideo
+ ContentsLayerForMedia
#if ENABLE(3D_CANVAS)
,ContentsLayerForGraphicsLayer3D
#endif
@@ -244,19 +343,19 @@ private:
RetainPtr<CGImageRef> m_pendingContentsImage;
struct LayerAnimation {
- LayerAnimation(CAPropertyAnimation* caAnim, const String& keyframesName, AnimatedPropertyID property, int index, double beginTime)
+ LayerAnimation(CAPropertyAnimation* caAnim, const String& keyframesName, AnimatedPropertyID property, int index, double timeOffset)
: m_animation(caAnim)
, m_keyframesName(keyframesName)
, m_property(property)
, m_index(index)
- , m_beginTime(beginTime)
+ , m_timeOffset(timeOffset)
{ }
RetainPtr<CAPropertyAnimation*> m_animation;
String m_keyframesName;
AnimatedPropertyID m_property;
int m_index;
- double m_beginTime;
+ double m_timeOffset;
};
Vector<LayerAnimation> m_uncomittedAnimations;
@@ -267,8 +366,16 @@ private:
HashSet<AnimatedProperty> m_transitionPropertiesToRemove;
- enum { Remove, Pause };
- typedef int AnimationProcessingAction;
+ enum Action { Remove, Pause };
+ struct AnimationProcessingAction {
+ AnimationProcessingAction(Action action = Remove, double timeOffset = 0)
+ : action(action)
+ , timeOffset(timeOffset)
+ {
+ }
+ Action action;
+ double timeOffset; // only used for pause
+ };
typedef HashMap<String, AnimationProcessingAction> AnimationsToProcessMap;
AnimationsToProcessMap m_keyframeAnimationsToProcess;
diff --git a/WebCore/platform/graphics/mac/GraphicsLayerCA.mm b/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
index dea6bfc..22e39f5 100644
--- a/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
+++ b/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
@@ -42,6 +42,7 @@
#import <QuartzCore/QuartzCore.h>
#import "RotateTransformOperation.h"
#import "ScaleTransformOperation.h"
+#import "StringBuilder.h"
#import "SystemTime.h"
#import "TranslateTransformOperation.h"
#import "WebLayer.h"
@@ -86,6 +87,10 @@ static double mediaTimeToCurrentTime(CFTimeInterval t)
} // namespace WebCore
+@interface CALayer(Private)
+- (void)setContentsChanged;
+@end
+
@interface WebAnimationDelegate : NSObject {
WebCore::GraphicsLayerCA* m_graphicsLayer;
}
@@ -246,12 +251,20 @@ static String propertyIdToString(AnimatedPropertyID property)
return "";
}
-static String animationIdentifier(AnimatedPropertyID property, int index)
+static String animationIdentifier(AnimatedPropertyID property, const String& keyframesName, int index)
{
- String animationId = propertyIdToString(property);
- animationId.append("_");
- animationId.append(String::number(index));
- return animationId;
+ StringBuilder builder;
+
+ builder.append(propertyIdToString(property));
+ builder.append("_");
+
+ if (!keyframesName.isEmpty()) {
+ builder.append(keyframesName);
+ builder.append("_");
+ }
+ builder.append("_");
+ builder.append(String::number(index));
+ return builder.toString();
}
#if !HAVE_MODERN_QUARTZCORE
@@ -392,9 +405,17 @@ GraphicsLayerCA::~GraphicsLayerCA()
[layer setLayerOwner:nil];
}
+ if (m_contentsLayer) {
+ if ([m_contentsLayer.get() respondsToSelector:@selector(setLayerOwner:)])
+ [(id)m_contentsLayer.get() setLayerOwner:nil];
+ }
+
// animationDidStart: can fire after this, so we need to clear out the layer on the delegate.
[m_animationDelegate.get() setLayer:0];
+ // Release the clone layers inside the exception-handling block.
+ removeCloneLayers();
+
END_BLOCK_OBJC_EXCEPTIONS
}
@@ -414,7 +435,7 @@ bool GraphicsLayerCA::setChildren(const Vector<GraphicsLayer*>& children)
{
bool childrenChanged = GraphicsLayer::setChildren(children);
if (childrenChanged)
- noteLayerPropertyChanged(ChildrenChanged);
+ noteSublayersChanged();
return childrenChanged;
}
@@ -422,31 +443,31 @@ bool GraphicsLayerCA::setChildren(const Vector<GraphicsLayer*>& children)
void GraphicsLayerCA::addChild(GraphicsLayer* childLayer)
{
GraphicsLayer::addChild(childLayer);
- noteLayerPropertyChanged(ChildrenChanged);
+ noteSublayersChanged();
}
void GraphicsLayerCA::addChildAtIndex(GraphicsLayer* childLayer, int index)
{
GraphicsLayer::addChildAtIndex(childLayer, index);
- noteLayerPropertyChanged(ChildrenChanged);
+ noteSublayersChanged();
}
void GraphicsLayerCA::addChildBelow(GraphicsLayer* childLayer, GraphicsLayer* sibling)
{
GraphicsLayer::addChildBelow(childLayer, sibling);
- noteLayerPropertyChanged(ChildrenChanged);
+ noteSublayersChanged();
}
void GraphicsLayerCA::addChildAbove(GraphicsLayer* childLayer, GraphicsLayer* sibling)
{
GraphicsLayer::addChildAbove(childLayer, sibling);
- noteLayerPropertyChanged(ChildrenChanged);
+ noteSublayersChanged();
}
bool GraphicsLayerCA::replaceChild(GraphicsLayer* oldChild, GraphicsLayer* newChild)
{
if (GraphicsLayer::replaceChild(oldChild, newChild)) {
- noteLayerPropertyChanged(ChildrenChanged);
+ noteSublayersChanged();
return true;
}
return false;
@@ -455,7 +476,7 @@ bool GraphicsLayerCA::replaceChild(GraphicsLayer* oldChild, GraphicsLayer* newCh
void GraphicsLayerCA::removeFromParent()
{
if (m_parent)
- static_cast<GraphicsLayerCA*>(m_parent)->noteLayerPropertyChanged(ChildrenChanged);
+ static_cast<GraphicsLayerCA*>(m_parent)->noteSublayersChanged();
GraphicsLayer::removeFromParent();
}
@@ -466,6 +487,30 @@ void GraphicsLayerCA::setMaskLayer(GraphicsLayer* layer)
GraphicsLayer::setMaskLayer(layer);
noteLayerPropertyChanged(MaskLayerChanged);
+
+ propagateLayerChangeToReplicas();
+
+ if (m_replicatedLayer)
+ static_cast<GraphicsLayerCA*>(m_replicatedLayer)->propagateLayerChangeToReplicas();
+}
+
+void GraphicsLayerCA::setReplicatedLayer(GraphicsLayer* layer)
+{
+ if (layer == m_replicatedLayer)
+ return;
+
+ GraphicsLayer::setReplicatedLayer(layer);
+ noteLayerPropertyChanged(ReplicatedLayerChanged);
+}
+
+void GraphicsLayerCA::setReplicatedByLayer(GraphicsLayer* layer)
+{
+ if (layer == m_replicaLayer)
+ return;
+
+ GraphicsLayer::setReplicatedByLayer(layer);
+ noteSublayersChanged();
+ noteLayerPropertyChanged(ReplicatedLayerChanged);
}
void GraphicsLayerCA::setPosition(const FloatPoint& point)
@@ -513,22 +558,41 @@ void GraphicsLayerCA::setChildrenTransform(const TransformationMatrix& t)
noteLayerPropertyChanged(ChildrenTransformChanged);
}
-static void moveAnimation(AnimatedPropertyID property, CALayer* fromLayer, CALayer* toLayer)
+void GraphicsLayerCA::moveOrCopyAllAnimationsForProperty(MoveOrCopy operation, AnimatedPropertyID property, const String& keyframesName, CALayer *fromLayer, CALayer *toLayer)
{
for (int index = 0; ; ++index) {
- String animName = animationIdentifier(property, index);
+ String animName = animationIdentifier(property, keyframesName, index);
CAAnimation* anim = [fromLayer animationForKey:animName];
if (!anim)
break;
- [anim retain];
- [fromLayer removeAnimationForKey:animName];
- [toLayer addAnimation:anim forKey:animName];
- [anim release];
+ switch (operation) {
+ case Move:
+ [anim retain];
+ [fromLayer removeAnimationForKey:animName];
+ [toLayer addAnimation:anim forKey:animName];
+ [anim release];
+ break;
+
+ case Copy:
+ [toLayer addAnimation:anim forKey:animName];
+ break;
+ }
}
}
+void GraphicsLayerCA::moveOrCopyAnimationsForProperty(MoveOrCopy operation, AnimatedPropertyID property, CALayer *fromLayer, CALayer *toLayer)
+{
+ // Move transitions for this property.
+ moveOrCopyAllAnimationsForProperty(operation, property, "", fromLayer, toLayer);
+
+ // Look for running animations affecting this property.
+ KeyframeAnimationsMap::const_iterator end = m_runningKeyframeAnimations.end();
+ for (KeyframeAnimationsMap::const_iterator it = m_runningKeyframeAnimations.begin(); it != end; ++it)
+ moveOrCopyAllAnimationsForProperty(operation, property, it->first, fromLayer, toLayer);
+}
+
void GraphicsLayerCA::setPreserves3D(bool preserves3D)
{
if (preserves3D == m_preserves3D)
@@ -643,7 +707,7 @@ void GraphicsLayerCA::setContentsRect(const IntRect& rect)
noteLayerPropertyChanged(ContentsRectChanged);
}
-bool GraphicsLayerCA::addAnimation(const KeyframeValueList& valueList, const IntSize& boxSize, const Animation* anim, const String& keyframesName, double beginTime)
+bool GraphicsLayerCA::addAnimation(const KeyframeValueList& valueList, const IntSize& boxSize, const Animation* anim, const String& keyframesName, double timeOffset)
{
if (forceSoftwareAnimation() || !anim || anim->isEmptyOrZeroDuration() || valueList.size() < 2)
return false;
@@ -657,9 +721,9 @@ bool GraphicsLayerCA::addAnimation(const KeyframeValueList& valueList, const Int
bool createdAnimations = false;
if (valueList.property() == AnimatedPropertyWebkitTransform)
- createdAnimations = createTransformAnimationsFromKeyframes(valueList, anim, keyframesName, beginTime, boxSize);
+ createdAnimations = createTransformAnimationsFromKeyframes(valueList, anim, keyframesName, timeOffset, boxSize);
else
- createdAnimations = createAnimationFromKeyframes(valueList, anim, keyframesName, beginTime);
+ createdAnimations = createAnimationFromKeyframes(valueList, anim, keyframesName, timeOffset);
if (createdAnimations)
noteLayerPropertyChanged(AnimationChanged);
@@ -681,22 +745,23 @@ void GraphicsLayerCA::removeAnimationsForKeyframes(const String& animationName)
if (!animationIsRunning(animationName))
return;
- m_keyframeAnimationsToProcess.add(animationName, Remove);
+ m_keyframeAnimationsToProcess.add(animationName, AnimationProcessingAction(Remove));
noteLayerPropertyChanged(AnimationChanged);
}
-void GraphicsLayerCA::pauseAnimation(const String& keyframesName)
+void GraphicsLayerCA::pauseAnimation(const String& keyframesName, double timeOffset)
{
if (!animationIsRunning(keyframesName))
return;
AnimationsToProcessMap::iterator it = m_keyframeAnimationsToProcess.find(keyframesName);
if (it != m_keyframeAnimationsToProcess.end()) {
+ AnimationProcessingAction& processingInfo = it->second;
// If an animation is scheduled to be removed, don't change the remove to a pause.
- if (it->second != Remove)
- it->second = Pause;
+ if (processingInfo.action != Remove)
+ processingInfo.action = Pause;
} else
- m_keyframeAnimationsToProcess.add(keyframesName, Pause);
+ m_keyframeAnimationsToProcess.add(keyframesName, AnimationProcessingAction(Pause, timeOffset));
noteLayerPropertyChanged(AnimationChanged);
}
@@ -716,26 +781,27 @@ void GraphicsLayerCA::setContentsToImage(Image* image)
}
m_contentsLayerPurpose = ContentsLayerForImage;
if (!m_contentsLayer)
- noteLayerPropertyChanged(ChildrenChanged);
+ noteSublayersChanged();
} else {
m_pendingContentsImage = 0;
m_contentsLayerPurpose = NoContentsLayer;
if (m_contentsLayer)
- noteLayerPropertyChanged(ChildrenChanged);
+ noteSublayersChanged();
}
noteLayerPropertyChanged(ContentsImageChanged);
}
-void GraphicsLayerCA::setContentsToVideo(PlatformLayer* videoLayer)
+void GraphicsLayerCA::setContentsToMedia(PlatformLayer* mediaLayer)
{
- if (videoLayer != m_contentsLayer.get())
- noteLayerPropertyChanged(ChildrenChanged);
+ if (mediaLayer == m_contentsLayer)
+ return;
- m_contentsLayer = videoLayer;
- noteLayerPropertyChanged(ContentsVideoChanged);
+ m_contentsLayer = mediaLayer;
+ m_contentsLayerPurpose = mediaLayer ? ContentsLayerForMedia : NoContentsLayer;
- m_contentsLayerPurpose = videoLayer ? ContentsLayerForVideo : NoContentsLayer;
+ noteSublayersChanged();
+ noteLayerPropertyChanged(ContentsMediaLayerChanged);
}
void GraphicsLayerCA::setGeometryOrientation(CompositingCoordinatesOrientation orientation)
@@ -760,6 +826,35 @@ void GraphicsLayerCA::setGeometryOrientation(CompositingCoordinatesOrientation o
#endif
}
+void GraphicsLayerCA::didDisplay(PlatformLayer* layer)
+{
+ CALayer* sourceLayer;
+ LayerMap* layerCloneMap;
+
+ if (layer == m_layer) {
+ sourceLayer = m_layer.get();
+ layerCloneMap = m_layerClones.get();
+ } else if (layer == m_contentsLayer) {
+ sourceLayer = m_contentsLayer.get();
+ layerCloneMap = m_contentsLayerClones.get();
+ } else
+ return;
+
+ if (layerCloneMap) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ CALayer *currClone = it->second.get();
+ if (!currClone)
+ continue;
+
+ if ([currClone contents] != [sourceLayer contents])
+ [currClone setContents:[sourceLayer contents]];
+ else
+ [currClone setContentsChanged];
+ }
+ }
+}
+
void GraphicsLayerCA::syncCompositingState()
{
recursiveCommitChanges();
@@ -767,10 +862,10 @@ void GraphicsLayerCA::syncCompositingState()
void GraphicsLayerCA::recursiveCommitChanges()
{
- commitLayerChanges();
+ commitLayerChangesBeforeSublayers();
if (m_maskLayer)
- static_cast<GraphicsLayerCA*>(m_maskLayer)->commitLayerChanges();
+ static_cast<GraphicsLayerCA*>(m_maskLayer)->commitLayerChangesBeforeSublayers();
const Vector<GraphicsLayer*>& childLayers = children();
size_t numChildren = childLayers.size();
@@ -778,9 +873,17 @@ void GraphicsLayerCA::recursiveCommitChanges()
GraphicsLayerCA* curChild = static_cast<GraphicsLayerCA*>(childLayers[i]);
curChild->recursiveCommitChanges();
}
+
+ if (m_replicaLayer)
+ static_cast<GraphicsLayerCA*>(m_replicaLayer)->recursiveCommitChanges();
+
+ if (m_maskLayer)
+ static_cast<GraphicsLayerCA*>(m_maskLayer)->commitLayerChangesAfterSublayers();
+
+ commitLayerChangesAfterSublayers();
}
-void GraphicsLayerCA::commitLayerChanges()
+void GraphicsLayerCA::commitLayerChangesBeforeSublayers()
{
if (!m_uncommittedChanges)
return;
@@ -788,20 +891,17 @@ void GraphicsLayerCA::commitLayerChanges()
BEGIN_BLOCK_OBJC_EXCEPTIONS
// Need to handle Preserves3DChanged first, because it affects which layers subsequent properties are applied to
- if (m_uncommittedChanges & Preserves3DChanged)
- updateLayerPreserves3D();
+ if (m_uncommittedChanges & (Preserves3DChanged | ReplicatedLayerChanged))
+ updateStructuralLayer();
- if (m_uncommittedChanges & NameChanged) {
- if (m_transformLayer)
- [m_transformLayer.get() setName:("Transform layer " + name())];
- [m_layer.get() setName:name()];
- }
+ if (m_uncommittedChanges & NameChanged)
+ updateLayerNames();
if (m_uncommittedChanges & ContentsImageChanged) // Needs to happen before ChildrenChanged
updateContentsImage();
- if (m_uncommittedChanges & ContentsVideoChanged) // Needs to happen before ChildrenChanged
- updateContentsVideo();
+ if (m_uncommittedChanges & ContentsMediaLayerChanged) // Needs to happen before ChildrenChanged
+ updateContentsMediaLayer();
#if ENABLE(3D_CANVAS)
if (m_uncommittedChanges & ContentsGraphicsContext3DChanged) // Needs to happen before ChildrenChanged
@@ -859,40 +959,72 @@ void GraphicsLayerCA::commitLayerChanges()
if (m_uncommittedChanges & MaskLayerChanged)
updateMaskLayer();
+ END_BLOCK_OBJC_EXCEPTIONS
+}
+
+void GraphicsLayerCA::commitLayerChangesAfterSublayers()
+{
+ if (!m_uncommittedChanges)
+ return;
+
+ BEGIN_BLOCK_OBJC_EXCEPTIONS
+
+ if (m_uncommittedChanges & ReplicatedLayerChanged)
+ updateReplicatedLayers();
+
m_uncommittedChanges = NoChange;
END_BLOCK_OBJC_EXCEPTIONS
}
+void GraphicsLayerCA::updateLayerNames()
+{
+ switch (structuralLayerPurpose()) {
+ case StructuralLayerForPreserves3D:
+ [m_structuralLayer.get() setName:("Transform layer " + name())];
+ break;
+ case StructuralLayerForReplicaFlattening:
+ [m_structuralLayer.get() setName:("Replica flattening layer " + name())];
+ break;
+ case NoStructuralLayer:
+ break;
+ }
+ [m_layer.get() setName:name()];
+}
+
void GraphicsLayerCA::updateSublayerList()
{
NSMutableArray* newSublayers = nil;
- if (m_transformLayer) {
- // Add the primary layer first. Even if we have negative z-order children, the primary layer always comes behind.
- newSublayers = [[NSMutableArray alloc] initWithObjects:m_layer.get(), nil];
- } else if (m_contentsLayer) {
- // FIXME: add the contents layer in the correct order with negative z-order children.
- // This does not cause visible rendering issues because currently contents layers are only used
- // for replaced elements that don't have children.
- newSublayers = [[NSMutableArray alloc] initWithObjects:m_contentsLayer.get(), nil];
- }
-
const Vector<GraphicsLayer*>& childLayers = children();
- size_t numChildren = childLayers.size();
- for (size_t i = 0; i < numChildren; ++i) {
- GraphicsLayerCA* curChild = static_cast<GraphicsLayerCA*>(childLayers[i]);
-
- CALayer* childLayer = curChild->layerForSuperlayer();
- if (!newSublayers)
- newSublayers = [[NSMutableArray alloc] initWithObjects:childLayer, nil];
- else
+
+ if (m_structuralLayer || m_contentsLayer || childLayers.size() > 0) {
+ newSublayers = [[NSMutableArray alloc] init];
+
+ if (m_structuralLayer) {
+ // Add the replica layer first.
+ if (m_replicaLayer)
+ [newSublayers addObject:static_cast<GraphicsLayerCA*>(m_replicaLayer)->primaryLayer()];
+ // Add the primary layer. Even if we have negative z-order children, the primary layer always comes behind.
+ [newSublayers addObject:m_layer.get()];
+ } else if (m_contentsLayer) {
+ // FIXME: add the contents layer in the correct order with negative z-order children.
+ // This does not cause visible rendering issues because currently contents layers are only used
+ // for replaced elements that don't have children.
+ [newSublayers addObject:m_contentsLayer.get()];
+ }
+
+ size_t numChildren = childLayers.size();
+ for (size_t i = 0; i < numChildren; ++i) {
+ GraphicsLayerCA* curChild = static_cast<GraphicsLayerCA*>(childLayers[i]);
+ CALayer *childLayer = curChild->layerForSuperlayer();
[newSublayers addObject:childLayer];
- }
+ }
- [newSublayers makeObjectsPerformSelector:@selector(removeFromSuperlayer)];
+ [newSublayers makeObjectsPerformSelector:@selector(removeFromSuperlayer)];
+ }
- if (m_transformLayer) {
- safeSetSublayers(m_transformLayer.get(), newSublayers);
+ if (m_structuralLayer) {
+ safeSetSublayers(m_structuralLayer.get(), newSublayers);
if (m_contentsLayer) {
// If we have a transform layer, then the contents layer is parented in the
@@ -913,16 +1045,43 @@ void GraphicsLayerCA::updateLayerPosition()
m_position.y() + m_anchorPoint.y() * m_size.height());
[primaryLayer() setPosition:posPoint];
+
+ if (LayerMap* layerCloneMap = primaryLayerClones()) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ CGPoint clonePosition = posPoint;
+ if (m_replicaLayer && isReplicatedRootClone(it->first)) {
+ // Maintain the special-case position for the root of a clone subtree,
+ // which we set up in replicatedLayerRoot().
+ clonePosition = positionForCloneRootLayer();
+ }
+ CALayer *currLayer = it->second.get();
+ [currLayer setPosition:clonePosition];
+ }
+ }
}
void GraphicsLayerCA::updateLayerSize()
{
CGRect rect = CGRectMake(0, 0, m_size.width(), m_size.height());
- if (m_transformLayer) {
- [m_transformLayer.get() setBounds:rect];
+ if (m_structuralLayer) {
+ [m_structuralLayer.get() setBounds:rect];
+
+ if (LayerMap* layerCloneMap = m_structuralLayerClones.get()) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it)
+ [it->second.get() setBounds:rect];
+ }
+
// The anchor of the contents layer is always at 0.5, 0.5, so the position is center-relative.
CGPoint centerPoint = CGPointMake(m_size.width() / 2.0f, m_size.height() / 2.0f);
[m_layer.get() setPosition:centerPoint];
+
+ if (LayerMap* layerCloneMap = m_layerClones.get()) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it)
+ [it->second.get() setPosition:centerPoint];
+ }
}
bool needTiledLayer = requiresTiledLayer(m_size);
@@ -930,6 +1089,11 @@ void GraphicsLayerCA::updateLayerSize()
swapFromOrToTiledLayer(needTiledLayer);
[m_layer.get() setBounds:rect];
+ if (LayerMap* layerCloneMap = m_layerClones.get()) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it)
+ [it->second.get() setBounds:rect];
+ }
// Contents transform may depend on height.
updateContentsTransform();
@@ -947,6 +1111,18 @@ void GraphicsLayerCA::updateAnchorPoint()
#if HAVE_MODERN_QUARTZCORE
[primaryLayer() setAnchorPointZ:m_anchorPoint.z()];
#endif
+
+ if (LayerMap* layerCloneMap = primaryLayerClones()) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ CALayer *currLayer = it->second.get();
+ [currLayer setAnchorPoint:FloatPoint(m_anchorPoint.x(), m_anchorPoint.y())];
+#if HAVE_MODERN_QUARTZCORE
+ [currLayer setAnchorPointZ:m_anchorPoint.z()];
+#endif
+ }
+ }
+
updateLayerPosition();
}
@@ -955,6 +1131,19 @@ void GraphicsLayerCA::updateTransform()
CATransform3D transform;
copyTransform(transform, m_transform);
[primaryLayer() setTransform:transform];
+
+ if (LayerMap* layerCloneMap = primaryLayerClones()) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ CALayer *currLayer = it->second.get();
+ if (m_replicaLayer && isReplicatedRootClone(it->first)) {
+ // Maintain the special-case transform for the root of a clone subtree,
+ // which we set up in replicatedLayerRoot().
+ [currLayer setTransform:CATransform3DIdentity];
+ } else
+ [currLayer setTransform:transform];
+ }
+ }
}
void GraphicsLayerCA::updateChildrenTransform()
@@ -962,85 +1151,157 @@ void GraphicsLayerCA::updateChildrenTransform()
CATransform3D transform;
copyTransform(transform, m_childrenTransform);
[primaryLayer() setSublayerTransform:transform];
+
+ if (LayerMap* layerCloneMap = primaryLayerClones()) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ CALayer *currLayer = it->second.get();
+ [currLayer setSublayerTransform:transform];
+ }
+ }
}
void GraphicsLayerCA::updateMasksToBounds()
{
[m_layer.get() setMasksToBounds:m_masksToBounds];
+
+ if (LayerMap* layerCloneMap = m_layerClones.get()) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ CALayer *currLayer = it->second.get();
+ [currLayer setMasksToBounds:m_masksToBounds];
+ }
+ }
+
updateDebugIndicators();
}
void GraphicsLayerCA::updateContentsOpaque()
{
[m_layer.get() setOpaque:m_contentsOpaque];
+
+ if (LayerMap* layerCloneMap = m_layerClones.get()) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ CALayer *currLayer = it->second.get();
+ [currLayer setOpaque:m_contentsOpaque];
+ }
+ }
}
void GraphicsLayerCA::updateBackfaceVisibility()
{
[m_layer.get() setDoubleSided:m_backfaceVisibility];
+
+ if (LayerMap* layerCloneMap = m_layerClones.get()) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ CALayer *currLayer = it->second.get();
+ [currLayer setDoubleSided:m_backfaceVisibility];
+ }
+ }
}
-void GraphicsLayerCA::updateLayerPreserves3D()
+void GraphicsLayerCA::updateStructuralLayer()
{
- Class transformLayerClass = NSClassFromString(@"CATransformLayer");
- if (!transformLayerClass)
- return;
+ ensureStructuralLayer(structuralLayerPurpose());
+}
- if (m_preserves3D && !m_transformLayer) {
- // Create the transform layer.
- m_transformLayer.adoptNS([[transformLayerClass alloc] init]);
+void GraphicsLayerCA::ensureStructuralLayer(StructuralLayerPurpose purpose)
+{
+ if (purpose == NoStructuralLayer) {
+ if (m_structuralLayer) {
+ // Replace the transformLayer in the parent with this layer.
+ [m_layer.get() removeFromSuperlayer];
+ [[m_structuralLayer.get() superlayer] replaceSublayer:m_structuralLayer.get() with:m_layer.get()];
- // Turn off default animations.
- [m_transformLayer.get() setStyle:[NSDictionary dictionaryWithObject:nullActionsDictionary() forKey:@"actions"]];
+ moveOrCopyAnimationsForProperty(Move, AnimatedPropertyWebkitTransform, m_structuralLayer.get(), m_layer.get());
+ moveOrCopyAnimationsForProperty(Move, AnimatedPropertyOpacity, m_structuralLayer.get(), m_layer.get());
-#ifndef NDEBUG
- [m_transformLayer.get() setName:[NSString stringWithFormat:@"Transform Layer CATransformLayer(%p) GraphicsLayer(%p)", m_transformLayer.get(), this]];
-#endif
- // Copy the position from this layer.
- updateLayerPosition();
- updateLayerSize();
- updateAnchorPoint();
- updateTransform();
- updateChildrenTransform();
-
- CGPoint point = CGPointMake(m_size.width() / 2.0f, m_size.height() / 2.0f);
- [m_layer.get() setPosition:point];
+ // Release the structural layer.
+ m_structuralLayer = 0;
- [m_layer.get() setAnchorPoint:CGPointMake(0.5f, 0.5f)];
- [m_layer.get() setTransform:CATransform3DIdentity];
-
- // Set the old layer to opacity of 1. Further down we will set the opacity on the transform layer.
- [m_layer.get() setOpacity:1];
+ // Update the properties of m_layer now that we no loner have a structural layer.
+ updateLayerPosition();
+ updateLayerSize();
+ updateAnchorPoint();
+ updateTransform();
+ updateChildrenTransform();
- // Move this layer to be a child of the transform layer.
- [[m_layer.get() superlayer] replaceSublayer:m_layer.get() with:m_transformLayer.get()];
- [m_transformLayer.get() addSublayer:m_layer.get()];
+ updateSublayerList();
+ updateOpacityOnLayer();
+ }
+ return;
+ }
+
+ bool structuralLayerChanged = false;
+
+ if (purpose == StructuralLayerForPreserves3D) {
+ Class transformLayerClass = NSClassFromString(@"CATransformLayer");
+ if (!transformLayerClass)
+ return;
- moveAnimation(AnimatedPropertyWebkitTransform, m_layer.get(), m_transformLayer.get());
+ if (m_structuralLayer && ![m_structuralLayer.get() isKindOfClass:transformLayerClass])
+ m_structuralLayer = 0;
- updateSublayerList();
- } else if (!m_preserves3D && m_transformLayer) {
- // Relace the transformLayer in the parent with this layer.
- [m_layer.get() removeFromSuperlayer];
- [[m_transformLayer.get() superlayer] replaceSublayer:m_transformLayer.get() with:m_layer.get()];
-
- moveAnimation(AnimatedPropertyWebkitTransform, m_transformLayer.get(), m_layer.get());
-
- // Release the transform layer.
- m_transformLayer = 0;
-
- updateLayerPosition();
- updateLayerSize();
- updateAnchorPoint();
- updateTransform();
- updateChildrenTransform();
+ if (!m_structuralLayer) {
+ m_structuralLayer.adoptNS([[transformLayerClass alloc] init]);
+ structuralLayerChanged = true;
+ }
+ } else {
+ if (m_structuralLayer && ![m_structuralLayer.get() isMemberOfClass:[CALayer self]])
+ m_structuralLayer = 0;
- updateSublayerList();
+ if (!m_structuralLayer) {
+ m_structuralLayer.adoptNS([[CALayer alloc] init]);
+ structuralLayerChanged = true;
+ }
}
+
+ if (!structuralLayerChanged)
+ return;
+
+ // Turn off default animations.
+ [m_structuralLayer.get() setStyle:[NSDictionary dictionaryWithObject:nullActionsDictionary() forKey:@"actions"]];
+
+ updateLayerNames();
+ // Update the properties of the structural layer.
+ updateLayerPosition();
+ updateLayerSize();
+ updateAnchorPoint();
+ updateTransform();
+ updateChildrenTransform();
+
+ // Set properties of m_layer to their default values, since these are expressed on on the structural layer.
+ CGPoint point = CGPointMake(m_size.width() / 2.0f, m_size.height() / 2.0f);
+ [m_layer.get() setPosition:point];
+ [m_layer.get() setAnchorPoint:CGPointMake(0.5f, 0.5f)];
+ [m_layer.get() setTransform:CATransform3DIdentity];
+ [m_layer.get() setOpacity:1];
+
+ // Move this layer to be a child of the transform layer.
+ [[m_layer.get() superlayer] replaceSublayer:m_layer.get() with:m_structuralLayer.get()];
+ [m_structuralLayer.get() addSublayer:m_layer.get()];
+
+ moveOrCopyAnimationsForProperty(Move, AnimatedPropertyWebkitTransform, m_layer.get(), m_structuralLayer.get());
+ moveOrCopyAnimationsForProperty(Move, AnimatedPropertyOpacity, m_layer.get(), m_structuralLayer.get());
+
+ updateSublayerList();
updateOpacityOnLayer();
}
+GraphicsLayerCA::StructuralLayerPurpose GraphicsLayerCA::structuralLayerPurpose() const
+{
+ if (preserves3D())
+ return StructuralLayerForPreserves3D;
+
+ if (isReplicated())
+ return StructuralLayerForReplicaFlattening;
+
+ return NoStructuralLayer;
+}
+
void GraphicsLayerCA::updateLayerDrawsContent()
{
bool needTiledLayer = requiresTiledLayer(m_size);
@@ -1087,6 +1348,12 @@ void GraphicsLayerCA::updateContentsImage()
#endif
[m_contentsLayer.get() setContents:(id)m_pendingContentsImage.get()];
m_pendingContentsImage = 0;
+
+ if (m_contentsLayerClones) {
+ LayerMap::const_iterator end = m_contentsLayerClones->end();
+ for (LayerMap::const_iterator it = m_contentsLayerClones->begin(); it != end; ++it)
+ [it->second.get() setContents:[m_contentsLayer.get() contents]];
+ }
updateContentsRect();
} else {
@@ -1096,7 +1363,7 @@ void GraphicsLayerCA::updateContentsImage()
}
}
-void GraphicsLayerCA::updateContentsVideo()
+void GraphicsLayerCA::updateContentsMediaLayer()
{
// Video layer was set as m_contentsLayer, and will get parented in updateSublayerList().
if (m_contentsLayer) {
@@ -1131,6 +1398,15 @@ void GraphicsLayerCA::updateContentsRect()
[m_contentsLayer.get() setPosition:point];
[m_contentsLayer.get() setBounds:rect];
+
+ if (m_contentsLayerClones) {
+ LayerMap::const_iterator end = m_contentsLayerClones->end();
+ for (LayerMap::const_iterator it = m_contentsLayerClones->begin(); it != end; ++it) {
+ CALayer *currLayer = it->second.get();
+ [currLayer setPosition:point];
+ [currLayer setBounds:rect];
+ }
+ }
}
void GraphicsLayerCA::updateGeometryOrientation()
@@ -1152,8 +1428,74 @@ void GraphicsLayerCA::updateGeometryOrientation()
void GraphicsLayerCA::updateMaskLayer()
{
- CALayer* maskCALayer = m_maskLayer ? m_maskLayer->platformLayer() : 0;
+ CALayer *maskCALayer = m_maskLayer ? m_maskLayer->platformLayer() : 0;
[m_layer.get() setMask:maskCALayer];
+
+ LayerMap* maskLayerCloneMap = m_maskLayer ? static_cast<GraphicsLayerCA*>(m_maskLayer)->primaryLayerClones() : 0;
+
+ if (LayerMap* layerCloneMap = m_layerClones.get()) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ CALayer *currLayer = it->second.get();
+
+ CALayer *maskClone = maskLayerCloneMap ? maskLayerCloneMap->get(it->first).get() : 0;
+ [currLayer setMask:maskClone];
+ }
+ }
+}
+
+void GraphicsLayerCA::updateReplicatedLayers()
+{
+ // Clone the descendants of the replicated layer, and parent under us.
+ ReplicaState replicaState(ReplicaState::ReplicaBranch);
+
+ CALayer *replicaRoot = replicatedLayerRoot(replicaState);
+ if (!replicaRoot)
+ return;
+
+ if (m_structuralLayer)
+ [m_structuralLayer.get() insertSublayer:replicaRoot atIndex:0];
+ else
+ [m_layer.get() insertSublayer:replicaRoot atIndex:0];
+}
+
+// For now, this assumes that layers only ever have one replica, so replicaIndices contains only 0 and 1.
+GraphicsLayerCA::CloneID GraphicsLayerCA::ReplicaState::cloneID() const
+{
+ size_t depth = m_replicaBranches.size();
+
+ const size_t bitsPerUChar = sizeof(UChar) * 8;
+ size_t vectorSize = (depth + bitsPerUChar - 1) / bitsPerUChar;
+
+ Vector<UChar> result(vectorSize);
+ result.fill(0);
+
+ // Create a string from the bit sequence which we can use to identify the clone.
+ // Note that the string may contain embedded nulls, but that's OK.
+ for (size_t i = 0; i < depth; ++i) {
+ UChar& currChar = result[i / bitsPerUChar];
+ currChar = (currChar << 1) | m_replicaBranches[i];
+ }
+
+ return String::adopt(result);
+}
+
+CALayer *GraphicsLayerCA::replicatedLayerRoot(ReplicaState& replicaState)
+{
+ // Limit replica nesting, to avoid 2^N explosion of replica layers.
+ if (!m_replicatedLayer || replicaState.replicaDepth() == ReplicaState::maxReplicaDepth)
+ return nil;
+
+ GraphicsLayerCA* replicatedLayer = static_cast<GraphicsLayerCA*>(m_replicatedLayer);
+
+ CALayer *clonedLayerRoot = replicatedLayer->fetchCloneLayers(this, replicaState, RootCloneLevel);
+ FloatPoint cloneRootPosition = replicatedLayer->positionForCloneRootLayer();
+
+ // Replica root has no offset or transform
+ [clonedLayerRoot setPosition:cloneRootPosition];
+ [clonedLayerRoot setTransform:CATransform3DIdentity];
+
+ return clonedLayerRoot;
}
void GraphicsLayerCA::updateLayerAnimations()
@@ -1163,10 +1505,8 @@ void GraphicsLayerCA::updateLayerAnimations()
for (HashSet<AnimatedProperty>::const_iterator it = m_transitionPropertiesToRemove.begin(); it != end; ++it) {
AnimatedPropertyID currProperty = static_cast<AnimatedPropertyID>(*it);
// Remove all animations with this property in the key.
- // We can't tell if this property is animating via a transition or animation here, but
- // that's OK because the style system never sends both transitions and animations for the same property.
for (int index = 0; ; ++index) {
- if (!removeAnimationFromLayer(currProperty, index))
+ if (!removeAnimationFromLayer(currProperty, "", index))
break;
}
}
@@ -1182,21 +1522,21 @@ void GraphicsLayerCA::updateLayerAnimations()
if (animationIt == m_runningKeyframeAnimations.end())
continue;
- AnimationProcessingAction action = it->second;
+ const AnimationProcessingAction& processingInfo = it->second;
const Vector<AnimationPair>& animations = animationIt->second;
for (size_t i = 0; i < animations.size(); ++i) {
const AnimationPair& currPair = animations[i];
- switch (action) {
+ switch (processingInfo.action) {
case Remove:
- removeAnimationFromLayer(static_cast<AnimatedPropertyID>(currPair.first), currPair.second);
+ removeAnimationFromLayer(static_cast<AnimatedPropertyID>(currPair.first), currKeyframeName, currPair.second);
break;
case Pause:
- pauseAnimationOnLayer(static_cast<AnimatedPropertyID>(currPair.first), currPair.second);
+ pauseAnimationOnLayer(static_cast<AnimatedPropertyID>(currPair.first), currKeyframeName, currPair.second, processingInfo.timeOffset);
break;
}
}
- if (action == Remove)
+ if (processingInfo.action == Remove)
m_runningKeyframeAnimations.remove(currKeyframeName);
}
@@ -1207,7 +1547,7 @@ void GraphicsLayerCA::updateLayerAnimations()
if ((numAnimations = m_uncomittedAnimations.size())) {
for (size_t i = 0; i < numAnimations; ++i) {
const LayerAnimation& pendingAnimation = m_uncomittedAnimations[i];
- setAnimationOnLayer(pendingAnimation.m_animation.get(), pendingAnimation.m_property, pendingAnimation.m_index, pendingAnimation.m_beginTime);
+ setAnimationOnLayer(pendingAnimation.m_animation.get(), pendingAnimation.m_property, pendingAnimation.m_keyframesName, pendingAnimation.m_index, pendingAnimation.m_timeOffset);
if (!pendingAnimation.m_keyframesName.isEmpty()) {
// If this is a keyframe anim, we have to remember the association of keyframes name to property/index pairs,
@@ -1229,19 +1569,28 @@ void GraphicsLayerCA::updateLayerAnimations()
}
}
-void GraphicsLayerCA::setAnimationOnLayer(CAPropertyAnimation* caAnim, AnimatedPropertyID property, int index, double beginTime)
+void GraphicsLayerCA::setAnimationOnLayer(CAPropertyAnimation* caAnim, AnimatedPropertyID property, const String& keyframesName, int index, double timeOffset)
{
PlatformLayer* layer = animatedLayer(property);
- if (beginTime) {
- NSTimeInterval time = [layer convertTime:currentTimeToMediaTime(beginTime) fromLayer:nil];
- [caAnim setBeginTime:time];
- }
+ [caAnim setTimeOffset:timeOffset];
- String animationName = animationIdentifier(property, index);
+ String animationName = animationIdentifier(property, keyframesName, index);
[layer removeAnimationForKey:animationName];
[layer addAnimation:caAnim forKey:animationName];
+
+ if (LayerMap* layerCloneMap = animatedLayerClones(property)) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ // Skip immediate replicas, since they move with the original.
+ if (m_replicaLayer && isReplicatedRootClone(it->first))
+ continue;
+ CALayer *currLayer = it->second.get();
+ [currLayer removeAnimationForKey:animationName];
+ [currLayer addAnimation:caAnim forKey:animationName];
+ }
+ }
}
// Workaround for <rdar://problem/7311367>
@@ -1259,18 +1608,29 @@ static void bug7311367Workaround(CALayer* transformLayer, const TransformationMa
[transformLayer setTransform:caTransform];
}
-bool GraphicsLayerCA::removeAnimationFromLayer(AnimatedPropertyID property, int index)
+bool GraphicsLayerCA::removeAnimationFromLayer(AnimatedPropertyID property, const String& keyframesName, int index)
{
PlatformLayer* layer = animatedLayer(property);
- String animationName = animationIdentifier(property, index);
+ String animationName = animationIdentifier(property, keyframesName, index);
if (![layer animationForKey:animationName])
return false;
[layer removeAnimationForKey:animationName];
-
- bug7311367Workaround(m_transformLayer.get(), m_transform);
+ bug7311367Workaround(m_structuralLayer.get(), m_transform);
+
+ if (LayerMap* layerCloneMap = animatedLayerClones(property)) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ // Skip immediate replicas, since they move with the original.
+ if (m_replicaLayer && isReplicatedRootClone(it->first))
+ continue;
+
+ CALayer *currLayer = it->second.get();
+ [currLayer removeAnimationForKey:animationName];
+ }
+ }
return true;
}
@@ -1290,11 +1650,11 @@ static void copyAnimationProperties(CAPropertyAnimation* from, CAPropertyAnimati
#endif
}
-void GraphicsLayerCA::pauseAnimationOnLayer(AnimatedPropertyID property, int index)
+void GraphicsLayerCA::pauseAnimationOnLayer(AnimatedPropertyID property, const String& keyframesName, int index, double timeOffset)
{
PlatformLayer* layer = animatedLayer(property);
- String animationName = animationIdentifier(property, index);
+ String animationName = animationIdentifier(property, keyframesName, index);
CAAnimation* caAnim = [layer animationForKey:animationName];
if (!caAnim)
@@ -1319,10 +1679,23 @@ void GraphicsLayerCA::pauseAnimationOnLayer(AnimatedPropertyID property, int ind
pausedAnim = newAnim;
}
- double t = [layer convertTime:currentTimeToMediaTime(currentTime()) fromLayer:nil];
+ // pausedAnim has the beginTime of caAnim already.
[pausedAnim setSpeed:0];
- [pausedAnim setTimeOffset:t - [caAnim beginTime]];
+ [pausedAnim setTimeOffset:timeOffset];
+
[layer addAnimation:pausedAnim forKey:animationName]; // This will replace the running animation.
+
+ // Pause the animations on the clones too.
+ if (LayerMap* layerCloneMap = animatedLayerClones(property)) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ // Skip immediate replicas, since they move with the original.
+ if (m_replicaLayer && isReplicatedRootClone(it->first))
+ continue;
+ CALayer *currLayer = it->second.get();
+ [currLayer addAnimation:pausedAnim forKey:animationName];
+ }
+ }
}
#if ENABLE(3D_CANVAS)
@@ -1337,7 +1710,7 @@ void GraphicsLayerCA::setContentsToGraphicsContext3D(const GraphicsContext3D* gr
m_platformGraphicsContext3D = context;
m_platformTexture = texture;
- noteLayerPropertyChanged(ChildrenChanged);
+ noteSublayersChanged();
BEGIN_BLOCK_OBJC_EXCEPTIONS
@@ -1346,9 +1719,11 @@ void GraphicsLayerCA::setContentsToGraphicsContext3D(const GraphicsContext3D* gr
m_contentsLayer.adoptNS([[Canvas3DLayer alloc] initWithContext:static_cast<CGLContextObj>(m_platformGraphicsContext3D) texture:static_cast<GLuint>(m_platformTexture)]);
#ifndef NDEBUG
[m_contentsLayer.get() setName:@"3D Layer"];
-#endif
+#endif
+ [m_contentsLayer.get() setLayerOwner:this];
} else {
// remove the inner layer
+ [m_contentsLayer.get() setLayerOwner:0];
m_contentsLayer = 0;
}
@@ -1370,7 +1745,7 @@ void GraphicsLayerCA::repaintLayerDirtyRects()
m_dirtyRects.clear();
}
-bool GraphicsLayerCA::createAnimationFromKeyframes(const KeyframeValueList& valueList, const Animation* animation, const String& keyframesName, double beginTime)
+bool GraphicsLayerCA::createAnimationFromKeyframes(const KeyframeValueList& valueList, const Animation* animation, const String& keyframesName, double timeOffset)
{
ASSERT(valueList.property() != AnimatedPropertyWebkitTransform);
@@ -1396,14 +1771,14 @@ bool GraphicsLayerCA::createAnimationFromKeyframes(const KeyframeValueList& valu
if (!valuesOK)
return false;
- m_uncomittedAnimations.append(LayerAnimation(caAnimation, keyframesName, valueList.property(), animationIndex, beginTime));
+ m_uncomittedAnimations.append(LayerAnimation(caAnimation, keyframesName, valueList.property(), animationIndex, timeOffset));
END_BLOCK_OBJC_EXCEPTIONS;
return true;
}
-bool GraphicsLayerCA::createTransformAnimationsFromKeyframes(const KeyframeValueList& valueList, const Animation* animation, const String& keyframesName, double beginTime, const IntSize& boxSize)
+bool GraphicsLayerCA::createTransformAnimationsFromKeyframes(const KeyframeValueList& valueList, const Animation* animation, const String& keyframesName, double timeOffset, const IntSize& boxSize)
{
ASSERT(valueList.property() == AnimatedPropertyWebkitTransform);
@@ -1450,7 +1825,7 @@ bool GraphicsLayerCA::createTransformAnimationsFromKeyframes(const KeyframeValue
if (!validMatrices)
break;
- m_uncomittedAnimations.append(LayerAnimation(caAnimation, keyframesName, valueList.property(), animationIndex, beginTime));
+ m_uncomittedAnimations.append(LayerAnimation(caAnimation, keyframesName, valueList.property(), animationIndex, timeOffset));
}
END_BLOCK_OBJC_EXCEPTIONS;
@@ -1663,25 +2038,42 @@ void GraphicsLayerCA::suspendAnimations(double time)
double t = currentTimeToMediaTime(time ? time : currentTime());
[primaryLayer() setSpeed:0];
[primaryLayer() setTimeOffset:t];
+
+ // Suspend the animations on the clones too.
+ if (LayerMap* layerCloneMap = primaryLayerClones()) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ CALayer *currLayer = it->second.get();
+ [currLayer setSpeed:0 ];
+ [currLayer setTimeOffset:t];
+ }
+ }
}
void GraphicsLayerCA::resumeAnimations()
{
[primaryLayer() setSpeed:1];
[primaryLayer() setTimeOffset:0];
+
+ // Resume the animations on the clones too.
+ if (LayerMap* layerCloneMap = primaryLayerClones()) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ CALayer *currLayer = it->second.get();
+ [currLayer setSpeed:1];
+ [currLayer setTimeOffset:0];
+ }
+ }
}
-WebLayer* GraphicsLayerCA::hostLayerForSublayers() const
+CALayer* GraphicsLayerCA::hostLayerForSublayers() const
{
- return m_transformLayer ? m_transformLayer.get() : m_layer.get();
+ return m_structuralLayer.get() ? m_structuralLayer.get() : m_layer.get();
}
-WebLayer* GraphicsLayerCA::layerForSuperlayer() const
+CALayer* GraphicsLayerCA::layerForSuperlayer() const
{
- if (m_transformLayer)
- return m_transformLayer.get();
-
- return m_layer.get();
+ return m_structuralLayer ? m_structuralLayer.get() : m_layer.get();
}
CALayer* GraphicsLayerCA::animatedLayer(AnimatedPropertyID property) const
@@ -1689,6 +2081,11 @@ CALayer* GraphicsLayerCA::animatedLayer(AnimatedPropertyID property) const
return (property == AnimatedPropertyBackgroundColor) ? m_contentsLayer.get() : primaryLayer();
}
+GraphicsLayerCA::LayerMap* GraphicsLayerCA::animatedLayerClones(AnimatedPropertyID property) const
+{
+ return (property == AnimatedPropertyBackgroundColor) ? m_contentsLayerClones.get() : primaryLayerClones();
+}
+
PlatformLayer* GraphicsLayerCA::platformLayer() const
{
return primaryLayer();
@@ -1790,9 +2187,9 @@ void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer)
#endif
// move over animations
- moveAnimation(AnimatedPropertyWebkitTransform, oldLayer.get(), m_layer.get());
- moveAnimation(AnimatedPropertyOpacity, oldLayer.get(), m_layer.get());
- moveAnimation(AnimatedPropertyBackgroundColor, oldLayer.get(), m_layer.get());
+ moveOrCopyAnimationsForProperty(Move, AnimatedPropertyWebkitTransform, oldLayer.get(), m_layer.get());
+ moveOrCopyAnimationsForProperty(Move, AnimatedPropertyOpacity, oldLayer.get(), m_layer.get());
+ moveOrCopyAnimationsForProperty(Move, AnimatedPropertyBackgroundColor, oldLayer.get(), m_layer.get());
// need to tell new layer to draw itself
setNeedsDisplay();
@@ -1847,9 +2244,232 @@ void GraphicsLayerCA::setupContentsLayer(CALayer* contentsLayer)
}
}
+CALayer *GraphicsLayerCA::findOrMakeClone(CloneID cloneID, CALayer *sourceLayer, LayerMap* clones, CloneLevel cloneLevel)
+{
+ if (!sourceLayer)
+ return 0;
+
+ CALayer *resultLayer;
+
+ // Add with a dummy value to get an iterator for the insertion position, and a boolean that tells
+ // us whether there's an item there. This technique avoids two hash lookups.
+ RetainPtr<CALayer> dummy;
+ pair<LayerMap::iterator, bool> addResult = clones->add(cloneID, dummy);
+ if (!addResult.second) {
+ // Value was not added, so it exists already.
+ resultLayer = addResult.first->second.get();
+ } else {
+ resultLayer = cloneLayer(sourceLayer, cloneLevel);
+#ifndef NDEBUG
+ [resultLayer setName:[NSString stringWithFormat:@"Clone %d of layer %@", cloneID[0U], sourceLayer]];
+#endif
+ addResult.first->second = resultLayer;
+ }
+
+ return resultLayer;
+}
+
+void GraphicsLayerCA::ensureCloneLayers(CloneID cloneID, CALayer *& primaryLayer, CALayer *& structuralLayer, CALayer *& contentsLayer, CloneLevel cloneLevel)
+{
+ structuralLayer = nil;
+ contentsLayer = nil;
+
+ if (!m_layerClones)
+ m_layerClones = new LayerMap;
+
+ if (!m_structuralLayerClones && m_structuralLayer)
+ m_structuralLayerClones = new LayerMap;
+
+ if (!m_contentsLayerClones && m_contentsLayer)
+ m_contentsLayerClones = new LayerMap;
+
+ primaryLayer = findOrMakeClone(cloneID, m_layer.get(), m_layerClones.get(), cloneLevel);
+ structuralLayer = findOrMakeClone(cloneID, m_structuralLayer.get(), m_structuralLayerClones.get(), cloneLevel);
+ contentsLayer = findOrMakeClone(cloneID, m_contentsLayer.get(), m_contentsLayerClones.get(), cloneLevel);
+}
+
+void GraphicsLayerCA::removeCloneLayers()
+{
+ m_layerClones = 0;
+ m_structuralLayerClones = 0;
+ m_contentsLayerClones = 0;
+}
+
+FloatPoint GraphicsLayerCA::positionForCloneRootLayer() const
+{
+ // This can get called during a sync when we've just removed the m_replicaLayer.
+ if (!m_replicaLayer)
+ return FloatPoint();
+
+ FloatPoint replicaPosition = m_replicaLayer->replicatedLayerPosition();
+ return FloatPoint(replicaPosition.x() + m_anchorPoint.x() * m_size.width(),
+ replicaPosition.y() + m_anchorPoint.y() * m_size.height());
+}
+
+void GraphicsLayerCA::propagateLayerChangeToReplicas()
+{
+ for (GraphicsLayer* currLayer = this; currLayer; currLayer = currLayer->parent()) {
+ GraphicsLayerCA* currLayerCA = static_cast<GraphicsLayerCA*>(currLayer);
+ if (!currLayerCA->hasCloneLayers())
+ break;
+
+ if (currLayerCA->replicaLayer())
+ static_cast<GraphicsLayerCA*>(currLayerCA->replicaLayer())->noteLayerPropertyChanged(ReplicatedLayerChanged);
+ }
+}
+
+CALayer *GraphicsLayerCA::fetchCloneLayers(GraphicsLayer* replicaRoot, ReplicaState& replicaState, CloneLevel cloneLevel)
+{
+ CALayer *primaryLayer;
+ CALayer *structuralLayer;
+ CALayer *contentsLayer;
+ ensureCloneLayers(replicaState.cloneID(), primaryLayer, structuralLayer, contentsLayer, cloneLevel);
+
+ if (m_maskLayer) {
+ CALayer *maskClone = static_cast<GraphicsLayerCA*>(m_maskLayer)->fetchCloneLayers(replicaRoot, replicaState, IntermediateCloneLevel);
+ [primaryLayer setMask:maskClone];
+ }
+
+ if (m_replicatedLayer) {
+ // We are a replica being asked for clones of our layers.
+ CALayer *replicaRoot = replicatedLayerRoot(replicaState);
+ if (!replicaRoot)
+ return nil;
+
+ if (structuralLayer) {
+ [structuralLayer insertSublayer:replicaRoot atIndex:0];
+ return structuralLayer;
+ }
+
+ [primaryLayer insertSublayer:replicaRoot atIndex:0];
+ return primaryLayer;
+ }
+
+ const Vector<GraphicsLayer*>& childLayers = children();
+ NSMutableArray* clonalSublayers = nil;
+
+ CALayer *replicaLayer = nil;
+ if (m_replicaLayer && m_replicaLayer != replicaRoot) {
+ // We have nested replicas. Ask the replica layer for a clone of its contents.
+ replicaState.setBranchType(ReplicaState::ReplicaBranch);
+ replicaLayer = static_cast<GraphicsLayerCA*>(m_replicaLayer)->fetchCloneLayers(replicaRoot, replicaState, RootCloneLevel);
+ replicaState.setBranchType(ReplicaState::ChildBranch);
+ }
+
+ if (replicaLayer || structuralLayer || contentsLayer || childLayers.size() > 0) {
+ clonalSublayers = [[NSMutableArray alloc] init];
+
+ if (structuralLayer) {
+ // Replicas render behind the actual layer content.
+ if (replicaLayer)
+ [clonalSublayers addObject:replicaLayer];
+
+ // Add the primary layer next. Even if we have negative z-order children, the primary layer always comes behind.
+ [clonalSublayers addObject:primaryLayer];
+ } else if (contentsLayer) {
+ // FIXME: add the contents layer in the correct order with negative z-order children.
+ // This does not cause visible rendering issues because currently contents layers are only used
+ // for replaced elements that don't have children.
+ [clonalSublayers addObject:contentsLayer];
+ }
+
+ replicaState.push(ReplicaState::ChildBranch);
+
+ size_t numChildren = childLayers.size();
+ for (size_t i = 0; i < numChildren; ++i) {
+ GraphicsLayerCA* curChild = static_cast<GraphicsLayerCA*>(childLayers[i]);
+
+ CALayer *childLayer = curChild->fetchCloneLayers(replicaRoot, replicaState, IntermediateCloneLevel);
+ if (childLayer)
+ [clonalSublayers addObject:childLayer];
+ }
+
+ replicaState.pop();
+
+ [clonalSublayers makeObjectsPerformSelector:@selector(removeFromSuperlayer)];
+ }
+
+ CALayer *result;
+ if (structuralLayer) {
+ [structuralLayer setSublayers:clonalSublayers];
+
+ if (contentsLayer) {
+ // If we have a transform layer, then the contents layer is parented in the
+ // primary layer (which is itself a child of the transform layer).
+ [primaryLayer setSublayers:nil];
+ [primaryLayer addSublayer:contentsLayer];
+ }
+
+ result = structuralLayer;
+ } else {
+ [primaryLayer setSublayers:clonalSublayers];
+ result = primaryLayer;
+ }
+
+ [clonalSublayers release];
+ return result;
+}
+
+CALayer *GraphicsLayerCA::cloneLayer(CALayer *layer, CloneLevel cloneLevel)
+{
+ static Class transformLayerClass = NSClassFromString(@"CATransformLayer");
+ CALayer *newLayer = nil;
+ if ([layer isKindOfClass:transformLayerClass])
+ newLayer = [transformLayerClass layer];
+ else
+ newLayer = [CALayer layer];
+
+ [newLayer setStyle:[NSDictionary dictionaryWithObject:nullActionsDictionary() forKey:@"actions"]];
+
+ [newLayer setPosition:[layer position]];
+ [newLayer setBounds:[layer bounds]];
+ [newLayer setAnchorPoint:[layer anchorPoint]];
+#if HAVE_MODERN_QUARTZCORE
+ [newLayer setAnchorPointZ:[layer anchorPointZ]];
+#endif
+ [newLayer setTransform:[layer transform]];
+ [newLayer setSublayerTransform:[layer sublayerTransform]];
+ [newLayer setContents:[layer contents]];
+ [newLayer setMasksToBounds:[layer masksToBounds]];
+ [newLayer setDoubleSided:[layer isDoubleSided]];
+ [newLayer setOpaque:[layer isOpaque]];
+ [newLayer setBackgroundColor:[layer backgroundColor]];
+
+ if (cloneLevel == IntermediateCloneLevel) {
+ [newLayer setOpacity:[layer opacity]];
+ moveOrCopyAnimationsForProperty(Copy, AnimatedPropertyWebkitTransform, layer, newLayer);
+ moveOrCopyAnimationsForProperty(Copy, AnimatedPropertyOpacity, layer, newLayer);
+ }
+
+ if (showDebugBorders()) {
+ setLayerBorderColor(newLayer, Color(255, 122, 251));
+ [newLayer setBorderWidth:2];
+ }
+
+ return newLayer;
+}
+
void GraphicsLayerCA::setOpacityInternal(float accumulatedOpacity)
{
- [(preserves3D() ? m_layer.get() : primaryLayer()) setOpacity:accumulatedOpacity];
+ LayerMap* layerCloneMap = 0;
+
+ if (preserves3D()) {
+ [m_layer.get() setOpacity:accumulatedOpacity];
+ layerCloneMap = m_layerClones.get();
+ } else {
+ [primaryLayer() setOpacity:accumulatedOpacity];
+ layerCloneMap = primaryLayerClones();
+ }
+
+ if (layerCloneMap) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ if (m_replicaLayer && isReplicatedRootClone(it->first))
+ continue;
+ CALayer *currLayer = it->second.get();
+ [currLayer setOpacity:m_opacity];
+ }
+ }
}
void GraphicsLayerCA::updateOpacityOnLayer()
@@ -1860,9 +2480,27 @@ void GraphicsLayerCA::updateOpacityOnLayer()
distributeOpacity(parent() ? parent()->accumulatedOpacity() : 1);
#else
[primaryLayer() setOpacity:m_opacity];
+
+ if (LayerMap* layerCloneMap = primaryLayerClones()) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ if (m_replicaLayer && isReplicatedRootClone(it->first))
+ continue;
+
+ CALayer *currLayer = it->second.get();
+ [currLayer setOpacity:m_opacity];
+ }
+
+ }
#endif
}
+void GraphicsLayerCA::noteSublayersChanged()
+{
+ noteLayerPropertyChanged(ChildrenChanged);
+ propagateLayerChangeToReplicas();
+}
+
void GraphicsLayerCA::noteLayerPropertyChanged(LayerChangeFlags flags)
{
if (!m_uncommittedChanges && m_client)
diff --git a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
index 7aaf95d..e9f64be 100644
--- a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
+++ b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 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
@@ -104,22 +104,19 @@ private:
bool hasClosedCaptions() const;
void setClosedCaptionsVisible(bool);
- void setEndTime(float time);
-
- int dataRate() const;
-
MediaPlayer::NetworkState networkState() const { return m_networkState; }
MediaPlayer::ReadyState readyState() const { return m_readyState; }
PassRefPtr<TimeRanges> buffered() const;
float maxTimeSeekable() const;
unsigned bytesLoaded() const;
- bool totalBytesKnown() const;
unsigned totalBytes() const;
void setVisible(bool);
void setSize(const IntSize&);
+ virtual bool hasAvailableVideoFrame() const;
+
void paint(GraphicsContext*, const IntRect&);
void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
@@ -176,18 +173,19 @@ private:
Timer<MediaPlayerPrivate> m_seekTimer;
MediaPlayer::NetworkState m_networkState;
MediaPlayer::ReadyState m_readyState;
- bool m_startedPlaying;
- bool m_isStreaming;
- bool m_visible;
IntRect m_rect;
FloatSize m_scaleFactor;
unsigned m_enabledTrackCount;
unsigned m_totalTrackCount;
- bool m_hasUnsupportedTracks;
float m_reportedDuration;
float m_cachedDuration;
float m_timeToRestore;
RetainPtr<QTMovieLayer> m_qtVideoLayer;
+ bool m_startedPlaying;
+ bool m_isStreaming;
+ bool m_visible;
+ bool m_hasUnsupportedTracks;
+ bool m_videoFrameHasDrawn;
#if DRAW_FRAME_RATE
int m_frameCountWhilePlaying;
double m_timeStartedPlaying;
diff --git a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
index dfb5958..dd87bb5 100644
--- a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
+++ b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 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
@@ -204,17 +204,18 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
, m_seekTimer(this, &MediaPlayerPrivate::seekTimerFired)
, m_networkState(MediaPlayer::Empty)
, m_readyState(MediaPlayer::HaveNothing)
- , m_startedPlaying(false)
- , m_isStreaming(false)
- , m_visible(false)
, m_rect()
, m_scaleFactor(1, 1)
, m_enabledTrackCount(0)
, m_totalTrackCount(0)
+ , m_reportedDuration(-1)
+ , m_cachedDuration(-1)
+ , m_timeToRestore(-1)
+ , m_startedPlaying(false)
+ , m_isStreaming(false)
+ , m_visible(false)
, m_hasUnsupportedTracks(false)
- , m_reportedDuration(-1.0f)
- , m_cachedDuration(-1.0f)
- , m_timeToRestore(-1.0f)
+ , m_videoFrameHasDrawn(false)
#if DRAW_FRAME_RATE
, m_frameCountWhilePlaying(0)
, m_timeStartedPlaying(0)
@@ -449,7 +450,7 @@ void MediaPlayerPrivate::createQTMovieLayer()
// later via acceleratedRenderingStateChanged().
GraphicsLayer* videoGraphicsLayer = m_player->mediaPlayerClient()->mediaPlayerGraphicsLayer(m_player);
if (videoGraphicsLayer)
- videoGraphicsLayer->setContentsToVideo((PlatformLayer *)m_qtVideoLayer.get());
+ videoGraphicsLayer->setContentsToMedia(m_qtVideoLayer.get());
}
#endif
}
@@ -498,6 +499,9 @@ MediaPlayerPrivate::MediaRenderingMode MediaPlayerPrivate::preferredRenderingMod
void MediaPlayerPrivate::setUpVideoRendering()
{
+ if (!isReadyForRendering())
+ return;
+
MediaRenderingMode currentMode = currentRenderingMode();
MediaRenderingMode preferredMode = preferredRenderingMode();
if (currentMode == preferredMode && currentMode != MediaRenderingNone)
@@ -556,6 +560,7 @@ void MediaPlayerPrivate::load(const String& url)
m_player->readyStateChanged();
}
cancelSeek();
+ m_videoFrameHasDrawn = false;
[m_objcObserver.get() setDelayCallbacks:YES];
@@ -651,7 +656,7 @@ void MediaPlayerPrivate::doSeek()
[m_qtMovie.get() setRate:0];
[m_qtMovie.get() setCurrentTime:qttime];
- // restore playback only if not at end, othewise QTMovie will loop
+ // restore playback only if not at end, otherwise QTMovie will loop
float timeAfterSeek = currentTime();
if (oldRate && timeAfterSeek < duration())
[m_qtMovie.get() setRate:oldRate];
@@ -687,10 +692,6 @@ void MediaPlayerPrivate::seekTimerFired(Timer<MediaPlayerPrivate>*)
}
}
-void MediaPlayerPrivate::setEndTime(float)
-{
-}
-
bool MediaPlayerPrivate::paused() const
{
if (!metaDataAvailable())
@@ -765,7 +766,7 @@ void MediaPlayerPrivate::setClosedCaptionsVisible(bool closedCaptionsVisible)
#if USE(ACCELERATED_COMPOSITING) && (!defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD))
if (closedCaptionsVisible && m_qtVideoLayer) {
- // Captions will be rendered upsided down unless we flag the movie as flipped (again). See <rdar://7408440>.
+ // Captions will be rendered upside down unless we flag the movie as flipped (again). See <rdar://7408440>.
[m_qtVideoLayer.get() setGeometryFlipped:YES];
}
#endif
@@ -796,13 +797,6 @@ void MediaPlayerPrivate::setPreservesPitch(bool preservesPitch)
createQTMovie([movieAttributes valueForKey:QTMovieURLAttribute], movieAttributes);
}
-int MediaPlayerPrivate::dataRate() const
-{
- if (!metaDataAvailable())
- return 0;
- return wkQTMovieDataRate(m_qtMovie.get());
-}
-
PassRefPtr<TimeRanges> MediaPlayerPrivate::buffered() const
{
RefPtr<TimeRanges> timeRanges = TimeRanges::create();
@@ -839,11 +833,6 @@ unsigned MediaPlayerPrivate::bytesLoaded() const
return totalBytes() * maxTimeLoaded() / dur;
}
-bool MediaPlayerPrivate::totalBytesKnown() const
-{
- return totalBytes() > 0;
-}
-
unsigned MediaPlayerPrivate::totalBytes() const
{
if (!metaDataAvailable())
@@ -981,7 +970,7 @@ void MediaPlayerPrivate::updateStates()
}
}
- if (isReadyForRendering() && !hasSetUpVideoRendering())
+ if (!hasSetUpVideoRendering())
setUpVideoRendering();
if (seeking())
@@ -1056,8 +1045,11 @@ void MediaPlayerPrivate::didEnd()
// Hang onto the current time and use it as duration from now on since QuickTime is telling us we
// are at the end. Do this because QuickTime sometimes reports one time for duration and stops
- // playback at another time, which causes problems in HTMLMediaElement.
- m_cachedDuration = currentTime();
+ // playback at another time, which causes problems in HTMLMediaElement. QTKit's 'ended' event
+ // fires when playing in reverse so don't update duration when at time zero!
+ float now = currentTime();
+ if (now > 0)
+ m_cachedDuration = now;
updateStates();
m_player->timeChanged();
@@ -1078,14 +1070,27 @@ void MediaPlayerPrivate::setVisible(bool b)
{
if (m_visible != b) {
m_visible = b;
- if (b) {
- if (m_readyState >= MediaPlayer::HaveMetadata)
- setUpVideoRendering();
- } else
+ if (b)
+ setUpVideoRendering();
+ else
tearDownVideoRendering();
}
}
+bool MediaPlayerPrivate::hasAvailableVideoFrame() const
+{
+ // When using a QTMovieLayer return true as soon as the movie reaches QTMovieLoadStatePlayable
+ // because although we don't *know* when the first frame has decoded, by the time we get and
+ // process the notification a frame should have propagated the VisualContext and been set on
+ // the layer.
+ if (currentRenderingMode() == MediaRenderingMovieLayer)
+ return m_readyState >= MediaPlayer::HaveCurrentData;
+
+ // When using the software renderer QuickTime signals that a frame is available so we might as well
+ // wait until we know that a frame has been drawn.
+ return m_videoFrameHasDrawn;
+}
+
void MediaPlayerPrivate::repaint()
{
if (m_hasUnsupportedTracks)
@@ -1100,6 +1105,7 @@ void MediaPlayerPrivate::repaint()
m_timeStartedPlaying = [NSDate timeIntervalSinceReferenceDate];
}
#endif
+ m_videoFrameHasDrawn = true;
m_player->repaint();
}
@@ -1404,7 +1410,7 @@ void MediaPlayerPrivate::acceleratedRenderingStateChanged()
if (currentRenderingMode() == MediaRenderingMovieLayer) {
GraphicsLayer* videoGraphicsLayer = m_player->mediaPlayerClient()->mediaPlayerGraphicsLayer(m_player);
if (videoGraphicsLayer)
- videoGraphicsLayer->setContentsToVideo((PlatformLayer *)m_qtVideoLayer.get());
+ videoGraphicsLayer->setContentsToMedia(m_qtVideoLayer.get());
}
}
#endif
diff --git a/WebCore/platform/graphics/mac/SimpleFontDataMac.mm b/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
index 97a7251..ef7c58f 100644
--- a/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
+++ b/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
@@ -55,8 +55,7 @@ using namespace std;
namespace WebCore {
const float smallCapsFontSizeMultiplier = 0.7f;
-const float contextDPI = 72.0f;
-static inline float scaleEmToUnits(float x, unsigned unitsPerEm) { return x * (contextDPI / (contextDPI * unitsPerEm)); }
+static inline float scaleEmToUnits(float x, unsigned unitsPerEm) { return x / unitsPerEm; }
static bool initFontData(SimpleFontData* fontData)
{
@@ -149,7 +148,6 @@ void SimpleFontData::platformInit()
m_styleGroup = 0;
#endif
#if USE(ATSUI)
- m_ATSUStyleInitialized = false;
m_ATSUMirrors = false;
m_checkedShapesArabic = false;
m_shapesArabic = false;
@@ -318,8 +316,9 @@ void SimpleFontData::platformDestroy()
wkReleaseStyleGroup(m_styleGroup);
#endif
#if USE(ATSUI)
- if (m_ATSUStyleInitialized)
- ATSUDisposeStyle(m_ATSUStyle);
+ HashMap<unsigned, ATSUStyle>::iterator end = m_ATSUStyleMap.end();
+ for (HashMap<unsigned, ATSUStyle>::iterator it = m_ATSUStyleMap.begin(); it != end; ++it)
+ ATSUDisposeStyle(it->second);
#endif
}
@@ -445,13 +444,15 @@ CTFontRef SimpleFontData::getCTFont() const
return m_CTFont.get();
}
-CFDictionaryRef SimpleFontData::getCFStringAttributes(TextRenderingMode textMode) const
+CFDictionaryRef SimpleFontData::getCFStringAttributes(TypesettingFeatures typesettingFeatures) const
{
- if (m_CFStringAttributes)
- return m_CFStringAttributes.get();
+ unsigned key = typesettingFeatures + 1;
+ pair<HashMap<unsigned, RetainPtr<CFDictionaryRef> >::iterator, bool> addResult = m_CFStringAttributes.add(key, RetainPtr<CFDictionaryRef>());
+ RetainPtr<CFDictionaryRef>& attributesDictionary = addResult.first->second;
+ if (!addResult.second)
+ return attributesDictionary.get();
- bool allowKerning = textMode == OptimizeLegibility || textMode == GeometricPrecision;
- bool allowLigatures = platformData().allowsLigatures() || allowKerning;
+ bool allowLigatures = platformData().allowsLigatures() || (typesettingFeatures & Ligatures);
static const int ligaturesNotAllowedValue = 0;
static CFNumberRef ligaturesNotAllowed = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &ligaturesNotAllowedValue);
@@ -459,25 +460,25 @@ CFDictionaryRef SimpleFontData::getCFStringAttributes(TextRenderingMode textMode
static const int ligaturesAllowedValue = 1;
static CFNumberRef ligaturesAllowed = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &ligaturesAllowedValue);
- if (!allowKerning) {
+ if (!(typesettingFeatures & Kerning)) {
static const float kerningAdjustmentValue = 0;
static CFNumberRef kerningAdjustment = CFNumberCreate(kCFAllocatorDefault, kCFNumberFloatType, &kerningAdjustmentValue);
static const void* keysWithKerningDisabled[] = { kCTFontAttributeName, kCTKernAttributeName, kCTLigatureAttributeName };
const void* valuesWithKerningDisabled[] = { getCTFont(), kerningAdjustment, allowLigatures
? ligaturesAllowed : ligaturesNotAllowed };
- m_CFStringAttributes.adoptCF(CFDictionaryCreate(NULL, keysWithKerningDisabled, valuesWithKerningDisabled,
+ attributesDictionary.adoptCF(CFDictionaryCreate(NULL, keysWithKerningDisabled, valuesWithKerningDisabled,
sizeof(keysWithKerningDisabled) / sizeof(*keysWithKerningDisabled),
&kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
} else {
// By omitting the kCTKernAttributeName attribute, we get Core Text's standard kerning.
static const void* keysWithKerningEnabled[] = { kCTFontAttributeName, kCTLigatureAttributeName };
const void* valuesWithKerningEnabled[] = { getCTFont(), allowLigatures ? ligaturesAllowed : ligaturesNotAllowed };
- m_CFStringAttributes.adoptCF(CFDictionaryCreate(NULL, keysWithKerningEnabled, valuesWithKerningEnabled,
+ attributesDictionary.adoptCF(CFDictionaryCreate(NULL, keysWithKerningEnabled, valuesWithKerningEnabled,
sizeof(keysWithKerningEnabled) / sizeof(*keysWithKerningEnabled),
&kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
}
- return m_CFStringAttributes.get();
+ return attributesDictionary.get();
}
#endif
diff --git a/WebCore/platform/graphics/mac/WebLayer.mm b/WebCore/platform/graphics/mac/WebLayer.mm
index 56b28e6..641d421 100644
--- a/WebCore/platform/graphics/mac/WebLayer.mm
+++ b/WebCore/platform/graphics/mac/WebLayer.mm
@@ -153,6 +153,13 @@ using namespace WebCore;
}
}
+- (void)display
+{
+ [super display];
+ if (m_layerOwner)
+ m_layerOwner->didDisplay(self);
+}
+
- (void)drawInContext:(CGContextRef)context
{
[WebLayer drawContents:m_layerOwner ofLayer:self intoContext:context];
diff --git a/WebCore/platform/graphics/mac/WebTiledLayer.mm b/WebCore/platform/graphics/mac/WebTiledLayer.mm
index a1f5693..97ba233 100644
--- a/WebCore/platform/graphics/mac/WebTiledLayer.mm
+++ b/WebCore/platform/graphics/mac/WebTiledLayer.mm
@@ -92,6 +92,13 @@ using namespace WebCore;
}
}
+- (void)display
+{
+ [super display];
+ if (m_layerOwner)
+ m_layerOwner->didDisplay(self);
+}
+
- (void)drawInContext:(CGContextRef)ctx
{
[WebLayer drawContents:m_layerOwner ofLayer:self intoContext:ctx];
diff --git a/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp b/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp
index 3a60160..12ae09d 100644
--- a/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp
+++ b/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp
@@ -401,7 +401,7 @@ static size_t renameFontInternal(SharedBuffer* fontData, const String& fontName,
return nameTableSize;
}
-#if PLATFORM(WINCE)
+#if OS(WINCE)
// AddFontMemResourceEx does not exist on WinCE, so we must handle the font data manually
// This function just renames the font and overwrites the old font data with the new
bool renameFont(SharedBuffer* fontData, const String& fontName)
diff --git a/WebCore/platform/graphics/opentype/OpenTypeUtilities.h b/WebCore/platform/graphics/opentype/OpenTypeUtilities.h
index 4c75314..0ef1b2b 100644
--- a/WebCore/platform/graphics/opentype/OpenTypeUtilities.h
+++ b/WebCore/platform/graphics/opentype/OpenTypeUtilities.h
@@ -36,7 +36,7 @@ struct BigEndianUShort;
struct EOTPrefix;
class SharedBuffer;
-#if PLATFORM(WINCE)
+#if OS(WINCE)
typedef unsigned __int8 UInt8;
#endif
diff --git a/WebCore/platform/graphics/openvg/EGLDisplayOpenVG.cpp b/WebCore/platform/graphics/openvg/EGLDisplayOpenVG.cpp
new file mode 100644
index 0000000..3c7eaf2
--- /dev/null
+++ b/WebCore/platform/graphics/openvg/EGLDisplayOpenVG.cpp
@@ -0,0 +1,431 @@
+/*
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "EGLDisplayOpenVG.h"
+
+#include "EGLUtils.h"
+#include "IntSize.h"
+#include "SurfaceOpenVG.h"
+
+#include <wtf/Assertions.h>
+#include <wtf/StdLibExtras.h>
+
+namespace WebCore {
+
+// Need to typedef this, otherwise DEFINE_STATIC_LOCAL() doesn't swallow it.
+typedef HashMap<EGLDisplay, EGLDisplayOpenVG*> EGLDisplayManagerMap;
+
+// File-static variables.
+static EGLDisplayManagerMap& displayManagers()
+{
+ DEFINE_STATIC_LOCAL(EGLDisplayManagerMap, managers, ());
+ return managers;
+}
+
+static EGLDisplayOpenVG* s_current = 0;
+
+// Static class members.
+
+SurfaceOpenVG* EGLDisplayOpenVG::currentSurface()
+{
+ EGLDisplayManagerMap& managers = displayManagers();
+ EGLDisplay currentDisplay = eglGetCurrentDisplay();
+
+ if (currentDisplay == EGL_NO_DISPLAY || !managers.contains(currentDisplay))
+ return 0;
+
+ EGLDisplayOpenVG* displayManager = managers.get(currentDisplay);
+ EGLSurface currentSurface = eglGetCurrentSurface(EGL_DRAW);
+
+ if (currentSurface == EGL_NO_SURFACE || !displayManager->m_platformSurfaces.contains(currentSurface))
+ return 0;
+
+ return displayManager->m_platformSurfaces.get(currentSurface);
+}
+
+void EGLDisplayOpenVG::registerPlatformSurface(SurfaceOpenVG* platformSurface)
+{
+ EGLDisplayOpenVG* displayManager = EGLDisplayOpenVG::forDisplay(platformSurface->eglDisplay());
+ displayManager->m_platformSurfaces.set(platformSurface->eglSurface(), platformSurface);
+}
+
+void EGLDisplayOpenVG::unregisterPlatformSurface(SurfaceOpenVG* platformSurface)
+{
+ EGLDisplayOpenVG* displayManager = EGLDisplayOpenVG::forDisplay(platformSurface->eglDisplay());
+ displayManager->m_platformSurfaces.remove(platformSurface->eglSurface());
+}
+
+void EGLDisplayOpenVG::setCurrentDisplay(const EGLDisplay& display)
+{
+ s_current = EGLDisplayOpenVG::forDisplay(display);
+}
+
+EGLDisplayOpenVG* EGLDisplayOpenVG::current()
+{
+ if (!s_current) {
+ EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+ eglInitialize(display, 0, 0);
+ ASSERT_EGL_NO_ERROR();
+
+ s_current = EGLDisplayOpenVG::forDisplay(display);
+ }
+ return s_current;
+}
+
+EGLDisplayOpenVG* EGLDisplayOpenVG::forDisplay(const EGLDisplay& display)
+{
+ EGLDisplayManagerMap& managers = displayManagers();
+
+ if (!managers.contains(display))
+ managers.set(display, new EGLDisplayOpenVG(display));
+
+ return managers.get(display);
+}
+
+
+// Object/instance members.
+
+EGLDisplayOpenVG::EGLDisplayOpenVG(const EGLDisplay& display)
+ : m_display(display)
+ , m_sharedPlatformSurface(0)
+ , m_pbufferConfigId(0)
+ , m_windowConfigId(0)
+{
+ eglBindAPI(EGL_OPENVG_API);
+ ASSERT_EGL_NO_ERROR();
+}
+
+EGLDisplayOpenVG::~EGLDisplayOpenVG()
+{
+ eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+ ASSERT_EGL_NO_ERROR();
+
+ delete m_sharedPlatformSurface;
+
+ HashMap<EGLSurface, EGLint>::const_iterator end = m_surfaceConfigIds.end();
+ for (HashMap<EGLSurface, EGLint>::const_iterator it = m_surfaceConfigIds.begin(); it != end; ++it)
+ destroySurface((*it).first);
+
+ eglTerminate(m_display);
+ ASSERT_EGL_NO_ERROR();
+}
+
+void EGLDisplayOpenVG::setDefaultPbufferConfig(const EGLConfig& config)
+{
+ EGLint configId;
+ EGLBoolean success = eglGetConfigAttrib(m_display, config, EGL_CONFIG_ID, &configId);
+ ASSERT(success == EGL_TRUE);
+ ASSERT(configId != EGL_BAD_ATTRIBUTE);
+
+ m_pbufferConfigId = configId;
+}
+
+EGLConfig EGLDisplayOpenVG::defaultPbufferConfig()
+{
+ EGLConfig config;
+ EGLint numConfigs;
+
+ // Hopefully the client will have set the pbuffer config of its choice
+ // by now - if not, use a 32-bit generic one as default.
+ if (!m_pbufferConfigId) {
+ static const EGLint configAttribs[] = {
+ EGL_RED_SIZE, 8,
+ EGL_GREEN_SIZE, 8,
+ EGL_BLUE_SIZE, 8,
+ EGL_ALPHA_SIZE, 8,
+ EGL_ALPHA_MASK_SIZE, 1,
+ EGL_LUMINANCE_SIZE, EGL_DONT_CARE,
+ EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
+ EGL_RENDERABLE_TYPE, EGL_OPENVG_BIT,
+ EGL_NONE
+ };
+ eglChooseConfig(m_display, configAttribs, &config, 1, &numConfigs);
+ } else {
+ const EGLint configAttribs[] = {
+ EGL_CONFIG_ID, m_pbufferConfigId,
+ EGL_NONE
+ };
+ eglChooseConfig(m_display, configAttribs, &config, 1, &numConfigs);
+ }
+
+ ASSERT_EGL_NO_ERROR();
+ ASSERT(numConfigs == 1);
+ return config;
+}
+
+void EGLDisplayOpenVG::setDefaultWindowConfig(const EGLConfig& config)
+{
+ EGLint configId;
+ EGLBoolean success = eglGetConfigAttrib(m_display, config, EGL_CONFIG_ID, &configId);
+ ASSERT(success == EGL_TRUE);
+ ASSERT(configId != EGL_BAD_ATTRIBUTE);
+
+ m_windowConfigId = configId;
+}
+
+EGLConfig EGLDisplayOpenVG::defaultWindowConfig()
+{
+ EGLConfig config;
+ EGLint numConfigs;
+
+ // Hopefully the client will have set the window config of its choice
+ // by now - if not, use a 32-bit generic one as default.
+ if (!m_windowConfigId) {
+ static const EGLint configAttribs[] = {
+ EGL_RED_SIZE, 8,
+ EGL_GREEN_SIZE, 8,
+ EGL_BLUE_SIZE, 8,
+ EGL_ALPHA_SIZE, 8,
+ EGL_ALPHA_MASK_SIZE, 1,
+ EGL_LUMINANCE_SIZE, EGL_DONT_CARE,
+ EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
+ EGL_RENDERABLE_TYPE, EGL_OPENVG_BIT,
+ EGL_NONE
+ };
+ eglChooseConfig(m_display, configAttribs, &config, 1, &numConfigs);
+ } else {
+ const EGLint configAttribs[] = {
+ EGL_CONFIG_ID, m_windowConfigId,
+ EGL_NONE
+ };
+ eglChooseConfig(m_display, configAttribs, &config, 1, &numConfigs);
+ }
+
+ ASSERT_EGL_NO_ERROR();
+ ASSERT(numConfigs == 1);
+ return config;
+}
+
+SurfaceOpenVG* EGLDisplayOpenVG::sharedPlatformSurface()
+{
+ if (!m_sharedPlatformSurface) {
+ // The shared surface doesn't need to be drawn on, it just exists so
+ // that we can always make the shared context current (which in turn is
+ // the owner of long-living resources such as images, paths and fonts).
+ // We'll just make the shared surface as small as possible: 1x1 pixel.
+ EGLConfig config = defaultPbufferConfig();
+ EGLSurface surface = createPbufferSurface(IntSize(1, 1), config);
+
+ EGLContext context = eglCreateContext(m_display, config, EGL_NO_CONTEXT, 0);
+ ASSERT_EGL_NO_ERROR();
+ m_contexts.set(m_surfaceConfigIds.get(surface), context);
+
+ m_sharedPlatformSurface = new SurfaceOpenVG;
+ m_sharedPlatformSurface->m_eglDisplay = m_display;
+ m_sharedPlatformSurface->m_eglSurface = surface;
+ m_sharedPlatformSurface->m_eglContext = context;
+ m_platformSurfaces.set(surface, m_sharedPlatformSurface); // a.k.a. registerPlatformSurface()
+ }
+ return m_sharedPlatformSurface;
+}
+
+EGLSurface EGLDisplayOpenVG::createPbufferSurface(const IntSize& size, const EGLConfig& config, EGLint* errorCode)
+{
+ const EGLint attribList[] = {
+ EGL_WIDTH, size.width(),
+ EGL_HEIGHT, size.height(),
+ EGL_NONE
+ };
+ EGLSurface surface = eglCreatePbufferSurface(m_display, config, attribList);
+
+ if (errorCode)
+ *errorCode = eglGetError();
+ else
+ ASSERT_EGL_NO_ERROR();
+
+ if (surface == EGL_NO_SURFACE)
+ return EGL_NO_SURFACE;
+
+ EGLint surfaceConfigId;
+ EGLBoolean success = eglGetConfigAttrib(m_display, config, EGL_CONFIG_ID, &surfaceConfigId);
+ ASSERT(success == EGL_TRUE);
+ ASSERT(surfaceConfigId != EGL_BAD_ATTRIBUTE);
+
+ ASSERT(!m_surfaceConfigIds.contains(surface));
+ m_surfaceConfigIds.set(surface, surfaceConfigId);
+ return surface;
+}
+
+EGLSurface EGLDisplayOpenVG::surfaceForWindow(EGLNativeWindowType wId, const EGLConfig& config)
+{
+ if (m_windowSurfaces.contains(wId))
+ return m_windowSurfaces.get(wId);
+
+ EGLSurface surface = eglCreateWindowSurface(m_display, config, wId, 0);
+ ASSERT_EGL_NO_ERROR();
+
+ EGLint surfaceConfigId;
+ EGLBoolean success = eglGetConfigAttrib(m_display, config, EGL_CONFIG_ID, &surfaceConfigId);
+ ASSERT(success == EGL_TRUE);
+ ASSERT(surfaceConfigId != EGL_BAD_ATTRIBUTE);
+
+ ASSERT(!m_surfaceConfigIds.contains(surface));
+ m_surfaceConfigIds.set(surface, surfaceConfigId);
+ return surface;
+}
+
+bool EGLDisplayOpenVG::surfacesCompatible(const EGLSurface& surface, const EGLSurface& otherSurface)
+{
+ if (surface == EGL_NO_SURFACE || otherSurface == EGL_NO_SURFACE)
+ return false;
+
+ // Currently, we assume that all surfaces known to this object are
+ // context-compatible to each other (which is reasonable to assume,
+ // otherwise eglCreateContext() would fail with EGL_BAD_MATCH for shared
+ // context compatibility anyways.
+ return m_surfaceConfigIds.contains(surface) && m_surfaceConfigIds.contains(otherSurface);
+}
+
+void EGLDisplayOpenVG::destroySurface(const EGLSurface& surface)
+{
+ ASSERT(surface != EGL_NO_SURFACE);
+
+ if (eglGetCurrentSurface(EGL_DRAW) == surface) {
+ eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+ ASSERT_EGL_NO_ERROR();
+ }
+
+ // Destroy the context associated to the surface, if we already created one.
+ if (m_surfaceConfigIds.contains(surface)) {
+ EGLint surfaceConfigId = m_surfaceConfigIds.take(surface); // take = get and remove
+ bool isContextReferenced = false;
+
+ if (m_compatibleConfigIds.contains(surfaceConfigId))
+ surfaceConfigId = m_compatibleConfigIds.get(surfaceConfigId);
+
+ HashMap<EGLSurface, EGLint>::iterator end = m_surfaceConfigIds.end();
+
+ // ...but only if there's no other surfaces associated to that context.
+ for (HashMap<EGLSurface, EGLint>::iterator it = m_surfaceConfigIds.begin(); it != end; ++it) {
+ if ((*it).second == surfaceConfigId) {
+ isContextReferenced = true;
+ break;
+ }
+ }
+ if (!isContextReferenced && m_contexts.contains(surfaceConfigId)) {
+ EGLContext context = m_contexts.take(surfaceConfigId);
+ eglDestroyContext(m_display, context);
+ ASSERT_EGL_NO_ERROR();
+ }
+ }
+
+ m_platformSurfaces.remove(surface);
+
+ HashMap<EGLNativeWindowType, EGLSurface>::iterator end = m_windowSurfaces.end();
+ for (HashMap<EGLNativeWindowType, EGLSurface>::iterator it = m_windowSurfaces.begin(); it != end; ++it) {
+ if ((*it).second == surface) {
+ m_windowSurfaces.remove(it);
+ break;
+ }
+ }
+
+ eglDestroySurface(m_display, surface);
+ ASSERT_EGL_NO_ERROR();
+}
+
+EGLContext EGLDisplayOpenVG::contextForSurface(const EGLSurface& surface)
+{
+ ASSERT(surface != EGL_NO_SURFACE);
+
+ if (m_platformSurfaces.contains(surface))
+ return m_platformSurfaces.get(surface)->eglContext();
+
+ eglBindAPI(EGL_OPENVG_API);
+ ASSERT_EGL_NO_ERROR();
+
+ EGLint surfaceConfigId;
+
+ if (m_surfaceConfigIds.contains(surface))
+ surfaceConfigId = m_surfaceConfigIds.get(surface);
+ else {
+ // Retrieve the same EGL config for context creation that was used to
+ // create the the EGL surface.
+ EGLBoolean success = eglQuerySurface(m_display, surface, EGL_CONFIG_ID, &surfaceConfigId);
+ ASSERT(success == EGL_TRUE);
+ ASSERT(surfaceConfigId != EGL_BAD_ATTRIBUTE);
+
+ m_surfaceConfigIds.set(surface, surfaceConfigId);
+ }
+
+ if (m_compatibleConfigIds.contains(surfaceConfigId))
+ surfaceConfigId = m_compatibleConfigIds.get(surfaceConfigId);
+
+ if (m_contexts.contains(surfaceConfigId))
+ return m_contexts.get(surfaceConfigId);
+
+ if (!m_sharedPlatformSurface) // shared context has not been created yet
+ sharedPlatformSurface(); // creates the shared surface & context
+
+ EGLDisplay currentDisplay = eglGetCurrentDisplay();
+ EGLSurface currentReadSurface = eglGetCurrentSurface(EGL_READ);
+ EGLSurface currentDrawSurface = eglGetCurrentSurface(EGL_DRAW);
+ EGLContext currentContext = eglGetCurrentContext();
+
+ // Before creating a new context, let's try whether an existing one
+ // is compatible with the surface. EGL doesn't give us a different way
+ // to check context/surface compatibility than trying it out, so let's
+ // do just that.
+ HashMap<EGLint, EGLContext>::iterator end = m_contexts.end();
+
+ for (HashMap<EGLint, EGLContext>::iterator it = m_contexts.begin(); it != end; ++it) {
+ eglMakeCurrent(m_display, surface, surface, (*it).second);
+ if (eglGetError() == EGL_SUCCESS) {
+ // Restore previous surface/context.
+ if (currentContext != EGL_NO_CONTEXT) {
+ eglMakeCurrent(currentDisplay, currentReadSurface, currentDrawSurface, currentContext);
+ ASSERT_EGL_NO_ERROR();
+ }
+ // Cool, surface is compatible to one of our existing contexts.
+ m_compatibleConfigIds.set(surfaceConfigId, (*it).first);
+ return (*it).second;
+ }
+ }
+ // Restore previous surface/context.
+ if (currentContext != EGL_NO_CONTEXT) {
+ eglMakeCurrent(currentDisplay, currentReadSurface, currentDrawSurface, currentContext);
+ ASSERT_EGL_NO_ERROR();
+ }
+
+ EGLConfig config;
+ EGLint numConfigs;
+
+ const EGLint configAttribs[] = {
+ EGL_CONFIG_ID, surfaceConfigId,
+ EGL_NONE
+ };
+
+ eglChooseConfig(m_display, configAttribs, &config, 1, &numConfigs);
+ ASSERT_EGL_NO_ERROR();
+ ASSERT(numConfigs == 1);
+
+ // We share all of the images and paths amongst the different contexts,
+ // so that they can be used in all of them. Resources that are created
+ // while m_sharedPlatformSurface->context() is current will be
+ // accessible from all other contexts, but are not restricted to the
+ // lifetime of those contexts.
+ EGLContext context = eglCreateContext(m_display, config, m_sharedPlatformSurface->eglContext(), 0);
+ ASSERT_EGL_NO_ERROR();
+
+ ASSERT(!m_contexts.contains(surfaceConfigId));
+ m_contexts.set(surfaceConfigId, context);
+ return context;
+}
+
+}
diff --git a/WebCore/platform/graphics/openvg/EGLDisplayOpenVG.h b/WebCore/platform/graphics/openvg/EGLDisplayOpenVG.h
new file mode 100644
index 0000000..fd8353d
--- /dev/null
+++ b/WebCore/platform/graphics/openvg/EGLDisplayOpenVG.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef EGLDisplayOpenVG_h
+#define EGLDisplayOpenVG_h
+
+#include <egl.h>
+#include <wtf/HashMap.h>
+
+namespace WebCore {
+
+class IntSize;
+class SurfaceOpenVG;
+
+class EGLDisplayOpenVG {
+public:
+ friend class SurfaceOpenVG;
+
+ static SurfaceOpenVG* currentSurface();
+ static void setCurrentDisplay(const EGLDisplay&);
+ static EGLDisplayOpenVG* current();
+ static EGLDisplayOpenVG* forDisplay(const EGLDisplay&);
+
+ void setDefaultPbufferConfig(const EGLConfig&);
+ EGLConfig defaultPbufferConfig();
+ void setDefaultWindowConfig(const EGLConfig&);
+ EGLConfig defaultWindowConfig();
+
+ EGLDisplay display() const { return m_display; }
+ SurfaceOpenVG* sharedPlatformSurface();
+
+ /** Creates a pbuffer surface using the given config. If no surface
+ * could be created, EGL_NO_SURFACE is returned and errors can be
+ * checked with the value that is written to the errorCode parameter
+ * If no surface could be created and errorCode is zero, this method
+ * will trigger an assertion by itself. */
+ EGLSurface createPbufferSurface(const IntSize&, const EGLConfig&, EGLint* errorCode = 0);
+
+ EGLSurface surfaceForWindow(EGLNativeWindowType, const EGLConfig&);
+
+ bool surfacesCompatible(const EGLSurface&, const EGLSurface&);
+
+ /** Destroy the surface and its corresponding context (unless another
+ * surface is still using the same context, in which case the context
+ * is not destroyed). */
+ void destroySurface(const EGLSurface&);
+
+ /** Return the context corresponding to the surface.
+ * If no corresponding context exists, one is created automatically. */
+ EGLContext contextForSurface(const EGLSurface&);
+
+private:
+ static void registerPlatformSurface(SurfaceOpenVG*);
+ static void unregisterPlatformSurface(SurfaceOpenVG*);
+
+ EGLDisplayOpenVG(const EGLDisplay& display);
+ ~EGLDisplayOpenVG();
+
+ EGLDisplay m_display;
+ SurfaceOpenVG* m_sharedPlatformSurface;
+ EGLint m_pbufferConfigId;
+ EGLint m_windowConfigId;
+
+ HashMap<EGLSurface, SurfaceOpenVG*> m_platformSurfaces;
+ HashMap<EGLNativeWindowType, EGLSurface> m_windowSurfaces;
+ HashMap<EGLSurface, EGLint> m_surfaceConfigIds;
+ HashMap<EGLint, EGLint> m_compatibleConfigIds;
+ HashMap<EGLint, EGLContext> m_contexts;
+};
+
+}
+
+#endif
diff --git a/WebCore/platform/graphics/openvg/EGLUtils.h b/WebCore/platform/graphics/openvg/EGLUtils.h
new file mode 100644
index 0000000..6f5d793
--- /dev/null
+++ b/WebCore/platform/graphics/openvg/EGLUtils.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef EGLUtils_h
+#define EGLUtils_h
+
+#include <egl.h>
+#include <wtf/Assertions.h>
+
+static inline const char* toEGLErrorConstant(EGLint error)
+{
+ switch (error) {
+ case EGL_NOT_INITIALIZED:
+ return "EGL_NOT_INITIALIZED";
+ case EGL_BAD_ACCESS:
+ return "EGL_BAD_ACCESS";
+ case EGL_BAD_ALLOC:
+ return "EGL_BAD_ALLOC";
+ case EGL_BAD_ATTRIBUTE:
+ return "EGL_BAD_ATTRIBUTE";
+ case EGL_BAD_CONTEXT:
+ return "EGL_BAD_CONTEXT";
+ case EGL_BAD_CONFIG:
+ return "EGL_BAD_CONFIG";
+ case EGL_BAD_CURRENT_SURFACE:
+ return "EGL_BAD_CURRENT_SURFACE";
+ case EGL_BAD_DISPLAY:
+ return "EGL_BAD_DISPLAY";
+ case EGL_BAD_SURFACE:
+ return "EGL_BAD_SURFACE";
+ case EGL_BAD_MATCH:
+ return "EGL_BAD_MATCH";
+ case EGL_BAD_PARAMETER:
+ return "EGL_BAD_PARAMETER";
+ case EGL_BAD_NATIVE_PIXMAP:
+ return "EGL_BAD_NATIVE_PIXMAP";
+ case EGL_BAD_NATIVE_WINDOW:
+ return "EGL_BAD_NATIVE_WINDOW";
+ case EGL_CONTEXT_LOST:
+ return "EGL_CONTEXT_LOST";
+ default:
+ return "UNKNOWN_ERROR";
+ }
+}
+
+#if ASSERT_DISABLED
+#define ASSERT_EGL_NO_ERROR() ((void)0)
+#else
+#define ASSERT_EGL_NO_ERROR() do { \
+ EGLint eglErrorCode = eglGetError(); \
+ ASSERT_WITH_MESSAGE(eglErrorCode == EGL_SUCCESS, "Found %s", toEGLErrorConstant(eglErrorCode)); \
+} while (0)
+#endif
+
+#endif
diff --git a/WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp b/WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp
new file mode 100644
index 0000000..5ed892c
--- /dev/null
+++ b/WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp
@@ -0,0 +1,566 @@
+/*
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "GraphicsContext.h"
+
+#include "GraphicsContextPrivate.h"
+#include "NotImplemented.h"
+#include "PainterOpenVG.h"
+#include "SurfaceOpenVG.h"
+#include "TransformationMatrix.h"
+
+#include <wtf/Assertions.h>
+#include <wtf/MathExtras.h>
+#include <wtf/UnusedParam.h>
+#include <wtf/Vector.h>
+
+#if PLATFORM(EGL)
+#include "EGLDisplayOpenVG.h"
+#include "EGLUtils.h"
+#include <egl.h>
+#endif
+
+namespace WebCore {
+
+// typedef'ing doesn't work, let's inherit from PainterOpenVG instead
+class GraphicsContextPlatformPrivate : public PainterOpenVG {
+public:
+ GraphicsContextPlatformPrivate(SurfaceOpenVG* surface)
+ : PainterOpenVG(surface)
+ {
+ }
+};
+
+GraphicsContext::GraphicsContext(SurfaceOpenVG* surface)
+ : m_common(createGraphicsContextPrivate())
+ , m_data(surface ? new GraphicsContextPlatformPrivate(surface) : 0)
+{
+ setPaintingDisabled(!surface);
+}
+
+GraphicsContext::~GraphicsContext()
+{
+ destroyGraphicsContextPrivate(m_common);
+ delete m_data;
+}
+
+PlatformGraphicsContext* GraphicsContext::platformContext() const
+{
+ if (paintingDisabled())
+ return 0;
+
+ return m_data->baseSurface();
+}
+
+TransformationMatrix GraphicsContext::getCTM() const
+{
+ if (paintingDisabled())
+ return TransformationMatrix();
+
+ return m_data->transformationMatrix();
+}
+
+void GraphicsContext::savePlatformState()
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->save();
+}
+
+void GraphicsContext::restorePlatformState()
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->restore();
+}
+
+void GraphicsContext::drawRect(const IntRect& rect)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->drawRect(rect);
+}
+
+void GraphicsContext::drawLine(const IntPoint& from, const IntPoint& to)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->drawLine(from, to);
+}
+
+/**
+ * Draw the largest ellipse that fits into the given rectangle.
+ */
+void GraphicsContext::drawEllipse(const IntRect& rect)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->drawEllipse(rect);
+}
+
+void GraphicsContext::strokeArc(const IntRect& rect, int startAngle, int angleSpan)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->drawArc(rect, startAngle, angleSpan, VG_STROKE_PATH);
+}
+
+void GraphicsContext::drawConvexPolygon(size_t numPoints, const FloatPoint* points, bool shouldAntialias)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->drawPolygon(numPoints, points);
+
+ UNUSED_PARAM(shouldAntialias); // FIXME
+}
+
+void GraphicsContext::fillPath()
+{
+ if (paintingDisabled())
+ return;
+
+ notImplemented();
+}
+
+void GraphicsContext::strokePath()
+{
+ if (paintingDisabled())
+ return;
+
+ notImplemented();
+}
+
+void GraphicsContext::fillRect(const FloatRect& rect)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->drawRect(rect, VG_FILL_PATH);
+}
+
+void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorSpace colorSpace)
+{
+ if (paintingDisabled())
+ return;
+
+ Color oldColor = m_data->fillColor();
+ m_data->setFillColor(color);
+ m_data->drawRect(rect, VG_FILL_PATH);
+ m_data->setFillColor(oldColor);
+
+ UNUSED_PARAM(colorSpace); // FIXME
+}
+
+void GraphicsContext::fillRoundedRect(const IntRect& rect, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, const Color& color, ColorSpace colorSpace)
+{
+ if (paintingDisabled())
+ return;
+
+ Color oldColor = m_data->fillColor();
+ m_data->setFillColor(color);
+ m_data->drawRoundedRect(rect, topLeft, topRight, bottomLeft, bottomRight, VG_FILL_PATH);
+ m_data->setFillColor(oldColor);
+
+ UNUSED_PARAM(colorSpace); // FIXME
+}
+
+void GraphicsContext::beginPath()
+{
+ if (paintingDisabled())
+ return;
+
+ notImplemented();
+}
+
+void GraphicsContext::addPath(const Path& path)
+{
+ if (paintingDisabled())
+ return;
+
+ notImplemented();
+}
+
+void GraphicsContext::clip(const FloatRect& rect)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->intersectClipRect(rect);
+}
+
+void GraphicsContext::clipPath(WindRule clipRule)
+{
+ if (paintingDisabled())
+ return;
+
+ notImplemented();
+ UNUSED_PARAM(clipRule);
+}
+
+void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int width, int offset, const Color& color)
+{
+ if (paintingDisabled())
+ return;
+
+ if (rects.isEmpty())
+ return;
+
+ // FIXME: We just unite all focus ring rects into one for now.
+ // We should outline the edge of the full region.
+ offset += (width - 1) / 2;
+ IntRect finalFocusRect;
+
+ for (unsigned i = 0; i < rects.size(); i++) {
+ IntRect focusRect = rects[i];
+ focusRect.inflate(offset);
+ finalFocusRect.unite(focusRect);
+ }
+
+ StrokeStyle oldStyle = m_data->strokeStyle();
+ Color oldStrokeColor = m_data->strokeColor();
+ m_data->setStrokeStyle(DashedStroke);
+ m_data->setStrokeColor(color);
+ strokeRect(FloatRect(finalFocusRect), 1.f);
+ m_data->setStrokeStyle(oldStyle);
+ m_data->setStrokeColor(oldStrokeColor);
+}
+
+void GraphicsContext::drawLineForText(const IntPoint& origin, int width, bool printing)
+{
+ if (paintingDisabled())
+ return;
+
+ if (width <= 0)
+ return;
+
+ StrokeStyle oldStyle = m_data->strokeStyle();
+ m_data->setStrokeStyle(SolidStroke);
+ drawLine(origin, origin + IntSize(width, 0));
+ m_data->setStrokeStyle(oldStyle);
+
+ UNUSED_PARAM(printing);
+}
+
+void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint& origin, int width, bool grammar)
+{
+ if (paintingDisabled())
+ return;
+
+ notImplemented();
+ UNUSED_PARAM(origin);
+ UNUSED_PARAM(width);
+ UNUSED_PARAM(grammar);
+}
+
+FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& rect)
+{
+ if (paintingDisabled())
+ return FloatRect();
+
+ return FloatRect(enclosingIntRect(m_data->transformationMatrix().mapRect(rect)));
+}
+
+void GraphicsContext::setPlatformShadow(const IntSize& size, int blur, const Color& color, ColorSpace colorSpace)
+{
+ if (paintingDisabled())
+ return;
+
+ notImplemented();
+ UNUSED_PARAM(size);
+ UNUSED_PARAM(blur);
+ UNUSED_PARAM(color);
+ UNUSED_PARAM(colorSpace);
+}
+
+void GraphicsContext::clearPlatformShadow()
+{
+ if (paintingDisabled())
+ return;
+
+ notImplemented();
+}
+
+void GraphicsContext::beginTransparencyLayer(float opacity)
+{
+ if (paintingDisabled())
+ return;
+
+ notImplemented();
+ UNUSED_PARAM(opacity);
+}
+
+void GraphicsContext::endTransparencyLayer()
+{
+ if (paintingDisabled())
+ return;
+
+ notImplemented();
+}
+
+void GraphicsContext::clearRect(const FloatRect& rect)
+{
+ if (paintingDisabled())
+ return;
+
+ CompositeOperator op = m_data->compositeOperation();
+ m_data->setCompositeOperation(CompositeClear);
+ m_data->drawRect(rect, VG_FILL_PATH);
+ m_data->setCompositeOperation(op);
+}
+
+void GraphicsContext::strokeRect(const FloatRect& rect)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->drawRect(rect, VG_STROKE_PATH);
+}
+
+void GraphicsContext::strokeRect(const FloatRect& rect, float lineWidth)
+{
+ if (paintingDisabled())
+ return;
+
+ float oldThickness = m_data->strokeThickness();
+ m_data->setStrokeThickness(lineWidth);
+ m_data->drawRect(rect, VG_STROKE_PATH);
+ m_data->setStrokeThickness(oldThickness);
+}
+
+void GraphicsContext::setLineCap(LineCap lc)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->setLineCap(lc);
+}
+
+void GraphicsContext::setLineDash(const DashArray& dashes, float dashOffset)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->setLineDash(dashes, dashOffset);
+}
+
+void GraphicsContext::setLineJoin(LineJoin lj)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->setLineJoin(lj);
+}
+
+void GraphicsContext::setMiterLimit(float limit)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->setMiterLimit(limit);
+}
+
+void GraphicsContext::setAlpha(float opacity)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->setOpacity(opacity);
+}
+
+void GraphicsContext::setCompositeOperation(CompositeOperator op)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->setCompositeOperation(op);
+}
+
+void GraphicsContext::clip(const Path& path)
+{
+ if (paintingDisabled())
+ return;
+
+ notImplemented();
+ UNUSED_PARAM(path);
+}
+
+void GraphicsContext::canvasClip(const Path& path)
+{
+ clip(path);
+}
+
+void GraphicsContext::clipOut(const Path& path)
+{
+ if (paintingDisabled())
+ return;
+
+ notImplemented();
+ UNUSED_PARAM(path);
+}
+
+void GraphicsContext::scale(const FloatSize& scaleFactors)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->scale(scaleFactors);
+}
+
+void GraphicsContext::rotate(float radians)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->rotate(radians);
+}
+
+void GraphicsContext::translate(float dx, float dy)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->translate(dx, dy);
+}
+
+IntPoint GraphicsContext::origin()
+{
+ if (paintingDisabled())
+ return IntPoint();
+
+ TransformationMatrix matrix = m_data->transformationMatrix();
+ return IntPoint(roundf(matrix.m41()), roundf(matrix.m42()));
+}
+
+void GraphicsContext::clipOut(const IntRect& rect)
+{
+ if (paintingDisabled())
+ return;
+
+ notImplemented();
+ UNUSED_PARAM(rect);
+}
+
+void GraphicsContext::clipOutEllipseInRect(const IntRect& rect)
+{
+ if (paintingDisabled())
+ return;
+
+ notImplemented();
+ UNUSED_PARAM(rect);
+}
+
+void GraphicsContext::clipToImageBuffer(const FloatRect& rect, const ImageBuffer* imageBuffer)
+{
+ if (paintingDisabled())
+ return;
+
+ notImplemented();
+ UNUSED_PARAM(rect);
+ UNUSED_PARAM(imageBuffer);
+}
+
+void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness)
+{
+ if (paintingDisabled())
+ return;
+
+ notImplemented();
+ UNUSED_PARAM(rect);
+ UNUSED_PARAM(thickness);
+}
+
+void GraphicsContext::concatCTM(const TransformationMatrix& transform)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->concatTransformationMatrix(transform);
+}
+
+void GraphicsContext::setURLForRect(const KURL& link, const IntRect& destRect)
+{
+ notImplemented();
+ UNUSED_PARAM(link);
+ UNUSED_PARAM(destRect);
+}
+
+void GraphicsContext::setPlatformStrokeColor(const Color& color, ColorSpace colorSpace)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->setStrokeColor(color);
+
+ UNUSED_PARAM(colorSpace); // FIXME
+}
+
+void GraphicsContext::setPlatformStrokeStyle(const StrokeStyle& strokeStyle)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->setStrokeStyle(strokeStyle);
+}
+
+void GraphicsContext::setPlatformStrokeThickness(float thickness)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->setStrokeThickness(thickness);
+}
+
+void GraphicsContext::setPlatformFillColor(const Color& color, ColorSpace colorSpace)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->setFillColor(color);
+
+ UNUSED_PARAM(colorSpace); // FIXME
+}
+
+void GraphicsContext::setPlatformShouldAntialias(bool enable)
+{
+ if (paintingDisabled())
+ return;
+
+ m_data->setAntialiasingEnabled(enable);
+}
+
+void GraphicsContext::setImageInterpolationQuality(InterpolationQuality)
+{
+ notImplemented();
+}
+
+InterpolationQuality GraphicsContext::imageInterpolationQuality() const
+{
+ notImplemented();
+ return InterpolationDefault;
+}
+
+}
diff --git a/WebCore/platform/graphics/openvg/PainterOpenVG.cpp b/WebCore/platform/graphics/openvg/PainterOpenVG.cpp
new file mode 100644
index 0000000..3b7cf85
--- /dev/null
+++ b/WebCore/platform/graphics/openvg/PainterOpenVG.cpp
@@ -0,0 +1,957 @@
+/*
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "PainterOpenVG.h"
+
+#include "Color.h"
+#include "DashArray.h"
+#include "FloatPoint.h"
+#include "FloatQuad.h"
+#include "FloatRect.h"
+#include "IntRect.h"
+#include "IntSize.h"
+#include "NotImplemented.h"
+#include "SurfaceOpenVG.h"
+#include "TransformationMatrix.h"
+#include "VGUtils.h"
+
+#if PLATFORM(EGL)
+#include "EGLUtils.h"
+#endif
+
+#include <vgu.h>
+
+#include <wtf/Assertions.h>
+#include <wtf/MathExtras.h>
+
+namespace WebCore {
+
+static bool isNonRotatedAffineTransformation(const TransformationMatrix& matrix)
+{
+ return matrix.m12() <= FLT_EPSILON && matrix.m13() <= FLT_EPSILON && matrix.m14() <= FLT_EPSILON
+ && matrix.m21() <= FLT_EPSILON && matrix.m23() <= FLT_EPSILON && matrix.m24() <= FLT_EPSILON
+ && matrix.m31() <= FLT_EPSILON && matrix.m32() <= FLT_EPSILON && matrix.m34() <= FLT_EPSILON
+ && matrix.m44() >= 1 - FLT_EPSILON;
+}
+
+static VGCapStyle toVGCapStyle(LineCap lineCap)
+{
+ switch (lineCap) {
+ case RoundCap:
+ return VG_CAP_ROUND;
+ case SquareCap:
+ return VG_CAP_SQUARE;
+ case ButtCap:
+ default:
+ return VG_CAP_BUTT;
+ }
+}
+
+static VGJoinStyle toVGJoinStyle(LineJoin lineJoin)
+{
+ switch (lineJoin) {
+ case RoundJoin:
+ return VG_JOIN_ROUND;
+ case BevelJoin:
+ return VG_JOIN_BEVEL;
+ case MiterJoin:
+ default:
+ return VG_JOIN_MITER;
+ }
+}
+
+static VGFillRule toVGFillRule(WindRule fillRule)
+{
+ return fillRule == RULE_EVENODD ? VG_EVEN_ODD : VG_NON_ZERO;
+}
+
+static VGuint colorToVGColor(const Color& color)
+{
+ VGuint vgColor = color.red();
+ vgColor = (vgColor << 8) | color.green();
+ vgColor = (vgColor << 8) | color.blue();
+ vgColor = (vgColor << 8) | color.alpha();
+ return vgColor;
+}
+
+static void setVGSolidColor(VGPaintMode paintMode, const Color& color)
+{
+ VGPaint paint = vgCreatePaint();
+ vgSetParameteri(paint, VG_PAINT_TYPE, VG_PAINT_TYPE_COLOR);
+ vgSetColor(paint, colorToVGColor(color));
+ vgSetPaint(paint, paintMode);
+ vgDestroyPaint(paint);
+ ASSERT_VG_NO_ERROR();
+}
+
+
+struct PlatformPainterState {
+ TransformationMatrix surfaceTransformationMatrix;
+ CompositeOperator compositeOperation;
+ float opacity;
+
+ bool scissoringEnabled;
+ FloatRect scissorRect;
+
+ Color fillColor;
+ StrokeStyle strokeStyle;
+ Color strokeColor;
+ float strokeThickness;
+ LineCap strokeLineCap;
+ LineJoin strokeLineJoin;
+ float strokeMiterLimit;
+ DashArray strokeDashArray;
+ float strokeDashOffset;
+
+ bool antialiasingEnabled;
+
+ PlatformPainterState()
+ : compositeOperation(CompositeSourceOver)
+ , opacity(1.0)
+ , scissoringEnabled(false)
+ , fillColor(Color::black)
+ , strokeStyle(NoStroke)
+ , strokeThickness(0.0)
+ , strokeLineCap(ButtCap)
+ , strokeLineJoin(MiterJoin)
+ , strokeMiterLimit(4.0)
+ , strokeDashOffset(0.0)
+ , antialiasingEnabled(true)
+ {
+ }
+
+ PlatformPainterState(const PlatformPainterState& state)
+ {
+ surfaceTransformationMatrix = state.surfaceTransformationMatrix;
+
+ scissoringEnabled = state.scissoringEnabled;
+ scissorRect = state.scissorRect;
+ copyPaintState(&state);
+ }
+
+ void copyPaintState(const PlatformPainterState* other)
+ {
+ compositeOperation = other->compositeOperation;
+ opacity = other->opacity;
+
+ fillColor = other->fillColor;
+ strokeStyle = other->strokeStyle;
+ strokeColor = other->strokeColor;
+ strokeThickness = other->strokeThickness;
+ strokeLineCap = other->strokeLineCap;
+ strokeLineJoin = other->strokeLineJoin;
+ strokeMiterLimit = other->strokeMiterLimit;
+ strokeDashArray = other->strokeDashArray;
+ strokeDashOffset = other->strokeDashOffset;
+
+ antialiasingEnabled = other->antialiasingEnabled;
+ }
+
+ void applyState(PainterOpenVG* painter)
+ {
+ ASSERT(painter);
+
+ setVGSolidColor(VG_FILL_PATH, fillColor);
+ setVGSolidColor(VG_STROKE_PATH, strokeColor);
+
+ vgSetf(VG_STROKE_LINE_WIDTH, strokeThickness);
+ vgSeti(VG_STROKE_CAP_STYLE, toVGCapStyle(strokeLineCap));
+ vgSeti(VG_STROKE_JOIN_STYLE, toVGJoinStyle(strokeLineJoin));
+ vgSetf(VG_STROKE_MITER_LIMIT, strokeMiterLimit);
+
+ if (antialiasingEnabled)
+ vgSeti(VG_RENDERING_QUALITY, VG_RENDERING_QUALITY_FASTER);
+ else
+ vgSeti(VG_RENDERING_QUALITY, VG_RENDERING_QUALITY_NONANTIALIASED);
+
+ applyBlending(painter);
+ applyStrokeStyle();
+
+ applyTransformationMatrix(painter);
+ applyScissorRect();
+ }
+
+ void applyBlending(PainterOpenVG* painter)
+ {
+ VGBlendMode blendMode = VG_BLEND_SRC_OVER;
+
+ switch (compositeOperation) {
+ case CompositeClear: {
+ // Clear means "set to fully transparent regardless of SRC".
+ // We implement that by multiplying DST with white color
+ // (= no changes) and an alpha of 1.0 - opacity, so the destination
+ // pixels will be fully transparent when opacity == 1.0 and
+ // unchanged when opacity == 0.0.
+ blendMode = VG_BLEND_DST_IN;
+ const VGfloat values[] = { 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0 - opacity };
+ vgSetfv(VG_COLOR_TRANSFORM_VALUES, 8, values);
+ vgSeti(VG_COLOR_TRANSFORM, VG_TRUE);
+ ASSERT_VG_NO_ERROR();
+ break;
+ }
+ case CompositeCopy:
+ blendMode = VG_BLEND_SRC;
+ break;
+ case CompositeSourceOver:
+ blendMode = VG_BLEND_SRC_OVER;
+ break;
+ case CompositeSourceIn:
+ blendMode = VG_BLEND_SRC_IN;
+ break;
+ case CompositeSourceOut:
+ notImplemented();
+ break;
+ case CompositeSourceAtop:
+ notImplemented();
+ break;
+ case CompositeDestinationOver:
+ blendMode = VG_BLEND_DST_OVER;
+ break;
+ case CompositeDestinationIn:
+ blendMode = VG_BLEND_DST_IN;
+ break;
+ case CompositeDestinationOut:
+ notImplemented();
+ break;
+ case CompositeDestinationAtop:
+ notImplemented();
+ break;
+ case CompositeXOR:
+ notImplemented();
+ break;
+ case CompositePlusDarker:
+ blendMode = VG_BLEND_DARKEN;
+ break;
+ case CompositeHighlight:
+ notImplemented();
+ break;
+ case CompositePlusLighter:
+ blendMode = VG_BLEND_LIGHTEN;
+ break;
+ }
+
+ if (compositeOperation != CompositeClear) {
+ if (opacity >= (1.0 - FLT_EPSILON))
+ vgSeti(VG_COLOR_TRANSFORM, VG_FALSE);
+ else if (blendMode == VG_BLEND_SRC) {
+ blendMode = VG_BLEND_SRC_OVER;
+ VGfloat values[] = { 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, opacity };
+ vgSetfv(VG_COLOR_TRANSFORM_VALUES, 8, values);
+ vgSeti(VG_COLOR_TRANSFORM, VG_TRUE);
+ } else {
+ VGfloat values[] = { 1.0, 1.0, 1.0, opacity, 0.0, 0.0, 0.0, 0.0 };
+ vgSetfv(VG_COLOR_TRANSFORM_VALUES, 8, values);
+ vgSeti(VG_COLOR_TRANSFORM, VG_TRUE);
+ }
+ ASSERT_VG_NO_ERROR();
+ }
+
+ vgSeti(VG_BLEND_MODE, blendMode);
+ ASSERT_VG_NO_ERROR();
+ }
+
+ void applyTransformationMatrix(PainterOpenVG* painter)
+ {
+ // There are *five* separate transforms that can be applied to OpenVG as of 1.1
+ // but it is not clear that we need to set them separately. Instead we set them
+ // all right here and let this be a call to essentially set the world transformation!
+ VGMatrix vgMatrix(surfaceTransformationMatrix);
+ const VGfloat* vgFloatArray = vgMatrix.toVGfloat();
+
+ vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE);
+ vgLoadMatrix(vgFloatArray);
+ ASSERT_VG_NO_ERROR();
+
+ vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE);
+ vgLoadMatrix(vgFloatArray);
+ ASSERT_VG_NO_ERROR();
+
+#ifdef OPENVG_VERSION_1_1
+ vgSeti(VG_MATRIX_MODE, VG_MATRIX_GLYPH_USER_TO_SURFACE);
+ vgLoadMatrix(vgFloatArray);
+ ASSERT_VG_NO_ERROR();
+#endif
+ }
+
+ void applyScissorRect()
+ {
+ if (scissoringEnabled) {
+ vgSeti(VG_SCISSORING, VG_TRUE);
+ vgSetfv(VG_SCISSOR_RECTS, 4, VGRect(scissorRect).toVGfloat());
+ } else
+ vgSeti(VG_SCISSORING, VG_FALSE);
+
+ ASSERT_VG_NO_ERROR();
+ }
+
+ void applyStrokeStyle()
+ {
+ if (strokeStyle == DottedStroke) {
+ VGfloat vgFloatArray[2] = { 1.0, 1.0 };
+ vgSetfv(VG_STROKE_DASH_PATTERN, 2, vgFloatArray);
+ vgSetf(VG_STROKE_DASH_PHASE, 0.0);
+ } else if (strokeStyle == DashedStroke) {
+ if (!strokeDashArray.size()) {
+ VGfloat vgFloatArray[2] = { 4.0, 3.0 };
+ vgSetfv(VG_STROKE_DASH_PATTERN, 2, vgFloatArray);
+ } else {
+ Vector<VGfloat> vgFloatArray(strokeDashArray.size());
+ for (int i = 0; i < strokeDashArray.size(); ++i)
+ vgFloatArray[i] = strokeDashArray[i];
+
+ vgSetfv(VG_STROKE_DASH_PATTERN, vgFloatArray.size(), vgFloatArray.data());
+ }
+ vgSetf(VG_STROKE_DASH_PHASE, strokeDashOffset);
+ } else {
+ vgSetfv(VG_STROKE_DASH_PATTERN, 0, 0);
+ vgSetf(VG_STROKE_DASH_PHASE, 0.0);
+ }
+
+ ASSERT_VG_NO_ERROR();
+ }
+
+ inline bool strokeDisabled() const
+ {
+ return (compositeOperation == CompositeSourceOver
+ && (strokeStyle == NoStroke || !strokeColor.alpha()));
+ }
+
+ inline bool fillDisabled() const
+ {
+ return (compositeOperation == CompositeSourceOver && !fillColor.alpha());
+ }
+};
+
+
+PainterOpenVG::PainterOpenVG()
+ : m_state(0)
+ , m_surface(0)
+{
+}
+
+PainterOpenVG::PainterOpenVG(SurfaceOpenVG* surface)
+ : m_state(0)
+ , m_surface(0)
+{
+ ASSERT(surface);
+ begin(surface);
+}
+
+PainterOpenVG::~PainterOpenVG()
+{
+ end();
+}
+
+void PainterOpenVG::begin(SurfaceOpenVG* surface)
+{
+ if (surface == m_surface)
+ return;
+
+ ASSERT(surface);
+ ASSERT(!m_state);
+
+ m_surface = surface;
+
+ m_stateStack.append(new PlatformPainterState());
+ m_state = m_stateStack.last();
+
+ m_surface->setActivePainter(this);
+ m_surface->makeCurrent();
+}
+
+void PainterOpenVG::end()
+{
+ if (!m_surface)
+ return;
+
+ m_surface->setActivePainter(0);
+ m_surface = 0;
+
+ destroyPainterStates();
+}
+
+void PainterOpenVG::destroyPainterStates()
+{
+ PlatformPainterState* state = 0;
+ while (!m_stateStack.isEmpty()) {
+ state = m_stateStack.last();
+ m_stateStack.removeLast();
+ delete state;
+ }
+ m_state = 0;
+}
+
+// Called by friend SurfaceOpenVG, private otherwise.
+void PainterOpenVG::applyState()
+{
+ ASSERT(m_state);
+ m_state->applyState(this);
+}
+
+/**
+ * Copy the current back buffer image onto the surface.
+ *
+ * Call this method when all painting operations have been completed,
+ * otherwise the surface won't visibly change.
+ */
+void PainterOpenVG::blitToSurface()
+{
+ ASSERT(m_state); // implies m_surface
+ m_surface->flush();
+}
+
+TransformationMatrix PainterOpenVG::transformationMatrix() const
+{
+ ASSERT(m_state);
+ return m_state->surfaceTransformationMatrix;
+}
+
+void PainterOpenVG::concatTransformationMatrix(const TransformationMatrix& matrix)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ // We do the multiplication ourself using WebCore's TransformationMatrix rather than
+ // offloading this to VG via vgMultMatrix to keep things simple and so we can maintain
+ // state ourselves.
+ m_state->surfaceTransformationMatrix.multLeft(matrix);
+ m_state->applyTransformationMatrix(this);
+}
+
+void PainterOpenVG::setTransformationMatrix(const TransformationMatrix& matrix)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ m_state->surfaceTransformationMatrix = matrix;
+ m_state->applyTransformationMatrix(this);
+}
+
+CompositeOperator PainterOpenVG::compositeOperation() const
+{
+ ASSERT(m_state);
+ return m_state->compositeOperation;
+}
+
+void PainterOpenVG::setCompositeOperation(CompositeOperator op)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ m_state->compositeOperation = op;
+ m_state->applyBlending(this);
+}
+
+float PainterOpenVG::opacity() const
+{
+ ASSERT(m_state);
+ return m_state->opacity;
+}
+
+void PainterOpenVG::setOpacity(float opacity)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ m_state->opacity = opacity;
+ m_state->applyBlending(this);
+}
+
+float PainterOpenVG::strokeThickness() const
+{
+ ASSERT(m_state);
+ return m_state->strokeThickness;
+}
+
+void PainterOpenVG::setStrokeThickness(float thickness)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ m_state->strokeThickness = thickness;
+ vgSetf(VG_STROKE_LINE_WIDTH, thickness);
+ ASSERT_VG_NO_ERROR();
+}
+
+StrokeStyle PainterOpenVG::strokeStyle() const
+{
+ ASSERT(m_state);
+ return m_state->strokeStyle;
+}
+
+void PainterOpenVG::setStrokeStyle(const StrokeStyle& style)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ m_state->strokeStyle = style;
+ m_state->applyStrokeStyle();
+}
+
+void PainterOpenVG::setLineDash(const DashArray& dashArray, float dashOffset)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ m_state->strokeDashArray = dashArray;
+ m_state->strokeDashOffset = dashOffset;
+ m_state->applyStrokeStyle();
+}
+
+void PainterOpenVG::setLineCap(LineCap lineCap)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ m_state->strokeLineCap = lineCap;
+ vgSeti(VG_STROKE_CAP_STYLE, toVGCapStyle(lineCap));
+ ASSERT_VG_NO_ERROR();
+}
+
+void PainterOpenVG::setLineJoin(LineJoin lineJoin)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ m_state->strokeLineJoin = lineJoin;
+ vgSeti(VG_STROKE_JOIN_STYLE, toVGJoinStyle(lineJoin));
+ ASSERT_VG_NO_ERROR();
+}
+
+void PainterOpenVG::setMiterLimit(float miterLimit)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ m_state->strokeMiterLimit = miterLimit;
+ vgSetf(VG_STROKE_MITER_LIMIT, miterLimit);
+ ASSERT_VG_NO_ERROR();
+}
+
+Color PainterOpenVG::strokeColor() const
+{
+ ASSERT(m_state);
+ return m_state->strokeColor;
+}
+
+void PainterOpenVG::setStrokeColor(const Color& color)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ m_state->strokeColor = color;
+ setVGSolidColor(VG_STROKE_PATH, color);
+}
+
+Color PainterOpenVG::fillColor() const
+{
+ ASSERT(m_state);
+ return m_state->fillColor;
+}
+
+void PainterOpenVG::setFillColor(const Color& color)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ m_state->fillColor = color;
+ setVGSolidColor(VG_FILL_PATH, color);
+}
+
+bool PainterOpenVG::antialiasingEnabled() const
+{
+ ASSERT(m_state);
+ return m_state->antialiasingEnabled;
+}
+
+void PainterOpenVG::setAntialiasingEnabled(bool enabled)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ m_state->antialiasingEnabled = enabled;
+
+ if (enabled)
+ vgSeti(VG_RENDERING_QUALITY, VG_RENDERING_QUALITY_FASTER);
+ else
+ vgSeti(VG_RENDERING_QUALITY, VG_RENDERING_QUALITY_NONANTIALIASED);
+}
+
+void PainterOpenVG::scale(const FloatSize& scaleFactors)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ TransformationMatrix matrix = m_state->surfaceTransformationMatrix;
+ matrix.scaleNonUniform(scaleFactors.width(), scaleFactors.height());
+ setTransformationMatrix(matrix);
+}
+
+void PainterOpenVG::rotate(float radians)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ TransformationMatrix matrix = m_state->surfaceTransformationMatrix;
+ matrix.rotate(rad2deg(radians));
+ setTransformationMatrix(matrix);
+}
+
+void PainterOpenVG::translate(float dx, float dy)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ TransformationMatrix matrix = m_state->surfaceTransformationMatrix;
+ matrix.translate(dx, dy);
+ setTransformationMatrix(matrix);
+}
+
+void PainterOpenVG::intersectScissorRect(const FloatRect& rect)
+{
+ // Scissor rectangles are defined by float values, but e.g. painting
+ // something red to a float-clipped rectangle and then painting something
+ // white to the same rectangle will leave some red remnants as it is
+ // rendered to full pixels in between. Also, some OpenVG implementations
+ // are likely to clip to integer coordinates anyways because of the above
+ // effect. So considering the above (and confirming through tests) the
+ // visual result is better if we clip to the enclosing integer rectangle
+ // rather than the exact float rectangle for scissoring.
+ if (m_state->scissoringEnabled)
+ m_state->scissorRect.intersect(FloatRect(enclosingIntRect(rect)));
+ else {
+ m_state->scissoringEnabled = true;
+ m_state->scissorRect = FloatRect(enclosingIntRect(rect));
+ }
+
+ m_state->applyScissorRect();
+}
+
+void PainterOpenVG::intersectClipRect(const FloatRect& rect)
+{
+ ASSERT(m_state);
+ m_surface->makeCurrent();
+
+ if (m_state->surfaceTransformationMatrix.isIdentity()) {
+ // No transformation required, skip all the complex stuff.
+ intersectScissorRect(rect);
+ return;
+ }
+
+ // Check if the actual destination rectangle is still rectilinear (can be
+ // represented as FloatRect) so we could apply scissoring instead of
+ // (potentially more expensive) path clipping. Note that scissoring is not
+ // subject to transformations, so we need to do the transformation to
+ // surface coordinates by ourselves.
+ FloatQuad effectiveScissorQuad =
+ m_state->surfaceTransformationMatrix.mapQuad(FloatQuad(rect));
+
+ if (effectiveScissorQuad.isRectilinear())
+ intersectScissorRect(effectiveScissorQuad.boundingBox());
+ else {
+ // The transformed scissorRect cannot be represented as FloatRect
+ // anymore, so we need to perform masking instead. Not yet implemented.
+ notImplemented();
+ }
+}
+
+void PainterOpenVG::drawRect(const FloatRect& rect, VGbitfield specifiedPaintModes)
+{
+ ASSERT(m_state);
+
+ VGbitfield paintModes = 0;
+ if (!m_state->strokeDisabled())
+ paintModes |= VG_STROKE_PATH;
+ if (!m_state->fillDisabled())
+ paintModes |= VG_FILL_PATH;
+
+ paintModes &= specifiedPaintModes;
+
+ if (!paintModes)
+ return;
+
+ m_surface->makeCurrent();
+
+ VGPath path = vgCreatePath(
+ VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F,
+ 1.0 /* scale */, 0.0 /* bias */,
+ 5 /* expected number of segments */,
+ 5 /* expected number of total coordinates */,
+ VG_PATH_CAPABILITY_APPEND_TO);
+ ASSERT_VG_NO_ERROR();
+
+ if (vguRect(path, rect.x(), rect.y(), rect.width(), rect.height()) == VGU_NO_ERROR) {
+ vgDrawPath(path, paintModes);
+ ASSERT_VG_NO_ERROR();
+ }
+
+ vgDestroyPath(path);
+ ASSERT_VG_NO_ERROR();
+}
+
+void PainterOpenVG::drawRoundedRect(const FloatRect& rect, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, VGbitfield specifiedPaintModes)
+{
+ ASSERT(m_state);
+
+ VGbitfield paintModes = 0;
+ if (!m_state->strokeDisabled())
+ paintModes |= VG_STROKE_PATH;
+ if (!m_state->fillDisabled())
+ paintModes |= VG_FILL_PATH;
+
+ paintModes &= specifiedPaintModes;
+
+ if (!paintModes)
+ return;
+
+ m_surface->makeCurrent();
+
+ VGPath path = vgCreatePath(
+ VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F,
+ 1.0 /* scale */, 0.0 /* bias */,
+ 10 /* expected number of segments */,
+ 25 /* expected number of total coordinates */,
+ VG_PATH_CAPABILITY_APPEND_TO);
+ ASSERT_VG_NO_ERROR();
+
+ // clamp corner arc sizes
+ FloatSize clampedTopLeft = FloatSize(topLeft).shrunkTo(rect.size()).expandedTo(FloatSize());
+ FloatSize clampedTopRight = FloatSize(topRight).shrunkTo(rect.size()).expandedTo(FloatSize());
+ FloatSize clampedBottomLeft = FloatSize(bottomLeft).shrunkTo(rect.size()).expandedTo(FloatSize());
+ FloatSize clampedBottomRight = FloatSize(bottomRight).shrunkTo(rect.size()).expandedTo(FloatSize());
+
+ // As OpenVG's coordinate system is flipped in comparison to WebKit's,
+ // we have to specify the opposite value for the "clockwise" value.
+ static const VGubyte pathSegments[] = {
+ VG_MOVE_TO_ABS,
+ VG_HLINE_TO_REL,
+ VG_SCCWARC_TO_REL,
+ VG_VLINE_TO_REL,
+ VG_SCCWARC_TO_REL,
+ VG_HLINE_TO_REL,
+ VG_SCCWARC_TO_REL,
+ VG_VLINE_TO_REL,
+ VG_SCCWARC_TO_REL,
+ VG_CLOSE_PATH
+ };
+ // Also, the rounded rectangle path proceeds from the top to the bottom,
+ // requiring height distances and clamped radius sizes to be flipped.
+ const VGfloat pathData[] = {
+ rect.x() + clampedTopLeft.width(), rect.y(),
+ rect.width() - clampedTopLeft.width() - clampedTopRight.width(),
+ clampedTopRight.width(), clampedTopRight.height(), 0, clampedTopRight.width(), clampedTopRight.height(),
+ rect.height() - clampedTopRight.height() - clampedBottomRight.height(),
+ clampedBottomRight.width(), clampedBottomRight.height(), 0, -clampedBottomRight.width(), clampedBottomRight.height(),
+ -(rect.width() - clampedBottomLeft.width() - clampedBottomRight.width()),
+ clampedBottomLeft.width(), clampedBottomLeft.height(), 0, -clampedBottomLeft.width(), -clampedBottomLeft.height(),
+ -(rect.height() - clampedTopLeft.height() - clampedBottomLeft.height()),
+ clampedTopLeft.width(), clampedTopLeft.height(), 0, clampedTopLeft.width(), -clampedTopLeft.height(),
+ };
+
+ vgAppendPathData(path, 10, pathSegments, pathData);
+ vgDrawPath(path, paintModes);
+ vgDestroyPath(path);
+ ASSERT_VG_NO_ERROR();
+}
+
+void PainterOpenVG::drawLine(const IntPoint& from, const IntPoint& to)
+{
+ ASSERT(m_state);
+
+ if (m_state->strokeDisabled())
+ return;
+
+ m_surface->makeCurrent();
+
+ VGPath path = vgCreatePath(
+ VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F,
+ 1.0 /* scale */, 0.0 /* bias */,
+ 2 /* expected number of segments */,
+ 4 /* expected number of total coordinates */,
+ VG_PATH_CAPABILITY_APPEND_TO);
+ ASSERT_VG_NO_ERROR();
+
+ VGUErrorCode errorCode;
+
+ // Try to align lines to pixels, centering them between pixels for odd thickness values.
+ if (fmod(m_state->strokeThickness + 0.5, 2.0) < 1.0)
+ errorCode = vguLine(path, from.x(), from.y(), to.x(), to.y());
+ else if ((to.y() - from.y()) > (to.x() - from.x())) // more vertical than horizontal
+ errorCode = vguLine(path, from.x() + 0.5, from.y(), to.x() + 0.5, to.y());
+ else
+ errorCode = vguLine(path, from.x(), from.y() + 0.5, to.x(), to.y() + 0.5);
+
+ if (errorCode == VGU_NO_ERROR) {
+ vgDrawPath(path, VG_STROKE_PATH);
+ ASSERT_VG_NO_ERROR();
+ }
+
+ vgDestroyPath(path);
+ ASSERT_VG_NO_ERROR();
+}
+
+void PainterOpenVG::drawArc(const IntRect& rect, int startAngle, int angleSpan, VGbitfield specifiedPaintModes)
+{
+ ASSERT(m_state);
+
+ VGbitfield paintModes = 0;
+ if (!m_state->strokeDisabled())
+ paintModes |= VG_STROKE_PATH;
+ if (!m_state->fillDisabled())
+ paintModes |= VG_FILL_PATH;
+
+ paintModes &= specifiedPaintModes;
+
+ if (!paintModes)
+ return;
+
+ m_surface->makeCurrent();
+
+ VGPath path = vgCreatePath(
+ VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F,
+ 1.0 /* scale */, 0.0 /* bias */,
+ 2 /* expected number of segments */,
+ 4 /* expected number of total coordinates */,
+ VG_PATH_CAPABILITY_APPEND_TO);
+ ASSERT_VG_NO_ERROR();
+
+ if (vguArc(path, rect.x() + rect.width() / 2.0, rect.y() + rect.height() / 2.0, rect.width(), rect.height(), -startAngle, -angleSpan, VGU_ARC_OPEN) == VGU_NO_ERROR) {
+ vgDrawPath(path, VG_STROKE_PATH);
+ ASSERT_VG_NO_ERROR();
+ }
+
+ vgDestroyPath(path);
+ ASSERT_VG_NO_ERROR();
+}
+
+void PainterOpenVG::drawEllipse(const IntRect& rect, VGbitfield specifiedPaintModes)
+{
+ ASSERT(m_state);
+
+ VGbitfield paintModes = 0;
+ if (!m_state->strokeDisabled())
+ paintModes |= VG_STROKE_PATH;
+ if (!m_state->fillDisabled())
+ paintModes |= VG_FILL_PATH;
+
+ paintModes &= specifiedPaintModes;
+
+ if (!paintModes)
+ return;
+
+ m_surface->makeCurrent();
+
+ VGPath path = vgCreatePath(
+ VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F,
+ 1.0 /* scale */, 0.0 /* bias */,
+ 4 /* expected number of segments */,
+ 12 /* expected number of total coordinates */,
+ VG_PATH_CAPABILITY_APPEND_TO);
+ ASSERT_VG_NO_ERROR();
+
+ if (vguEllipse(path, rect.x() + rect.width() / 2.0, rect.y() + rect.height() / 2.0, rect.width(), rect.height()) == VGU_NO_ERROR) {
+ vgDrawPath(path, paintModes);
+ ASSERT_VG_NO_ERROR();
+ }
+
+ vgDestroyPath(path);
+ ASSERT_VG_NO_ERROR();
+}
+
+void PainterOpenVG::drawPolygon(size_t numPoints, const FloatPoint* points, VGbitfield specifiedPaintModes)
+{
+ ASSERT(m_state);
+
+ VGbitfield paintModes = 0;
+ if (!m_state->strokeDisabled())
+ paintModes |= VG_STROKE_PATH;
+ if (!m_state->fillDisabled())
+ paintModes |= VG_FILL_PATH;
+
+ paintModes &= specifiedPaintModes;
+
+ if (!paintModes)
+ return;
+
+ m_surface->makeCurrent();
+
+ // Path segments: all points + "close path".
+ const VGint numSegments = numPoints + 1;
+ const VGint numCoordinates = numPoints * 2;
+
+ VGPath path = vgCreatePath(
+ VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F,
+ 1.0 /* scale */, 0.0 /* bias */,
+ numSegments /* expected number of segments */,
+ numCoordinates /* expected number of total coordinates */,
+ VG_PATH_CAPABILITY_APPEND_TO);
+ ASSERT_VG_NO_ERROR();
+
+ Vector<VGfloat> vgPoints(numCoordinates);
+ for (int i = 0; i < numPoints; ++i) {
+ vgPoints[i*2] = points[i].x();
+ vgPoints[i*2 + 1] = points[i].y();
+ }
+
+ if (vguPolygon(path, vgPoints.data(), numPoints, VG_TRUE /* closed */) == VGU_NO_ERROR) {
+ vgDrawPath(path, paintModes);
+ ASSERT_VG_NO_ERROR();
+ }
+
+ vgDestroyPath(path);
+ ASSERT_VG_NO_ERROR();
+}
+
+void PainterOpenVG::save(PainterOpenVG::SaveMode saveMode)
+{
+ ASSERT(m_state);
+
+ // If the underlying context/surface was switched away by someone without
+ // telling us, it might not correspond to the one assigned to this painter.
+ // Switch back so we can save the state properly. (Should happen rarely.)
+ // Use DontSaveOrApplyPainterState mode in order to avoid recursion.
+ m_surface->makeCurrent(SurfaceOpenVG::DontSaveOrApplyPainterState);
+
+ if (saveMode == PainterOpenVG::CreateNewState) {
+ PlatformPainterState* state = new PlatformPainterState(*m_state);
+ m_stateStack.append(state);
+ m_state = m_stateStack.last();
+ } else { // if (saveMode == PainterOpenVG::CreateNewStateWithPaintStateOnly) {
+ PlatformPainterState* state = new PlatformPainterState();
+ state->copyPaintState(m_state);
+ m_stateStack.append(state);
+ m_state = m_stateStack.last();
+ }
+}
+
+void PainterOpenVG::restore()
+{
+ ASSERT(m_stateStack.size() >= 2);
+ m_surface->makeCurrent(SurfaceOpenVG::DontApplyPainterState);
+
+ PlatformPainterState* state = m_stateStack.last();
+ m_stateStack.removeLast();
+ delete state;
+
+ m_state = m_stateStack.last();
+ m_state->applyState(this);
+}
+
+}
diff --git a/WebCore/platform/graphics/openvg/PainterOpenVG.h b/WebCore/platform/graphics/openvg/PainterOpenVG.h
new file mode 100644
index 0000000..6936eee
--- /dev/null
+++ b/WebCore/platform/graphics/openvg/PainterOpenVG.h
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef PainterOpenVG_h
+#define PainterOpenVG_h
+
+#include "Color.h"
+#include "GraphicsContext.h"
+
+#include <openvg.h>
+
+#include <wtf/Noncopyable.h>
+#include <wtf/Platform.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class FloatPoint;
+class FloatRect;
+class IntRect;
+class IntSize;
+class SurfaceOpenVG;
+class TransformationMatrix;
+
+struct PlatformPainterState;
+
+class PainterOpenVG : public Noncopyable {
+public:
+ friend class SurfaceOpenVG;
+ friend struct PlatformPainterState;
+
+ enum SaveMode {
+ CreateNewState,
+ CreateNewStateWithPaintStateOnly // internal usage only, do not use outside PainterOpenVG
+ };
+
+ PainterOpenVG();
+ PainterOpenVG(SurfaceOpenVG*);
+ ~PainterOpenVG();
+
+ void begin(SurfaceOpenVG*);
+ void end();
+
+ TransformationMatrix transformationMatrix() const;
+ void setTransformationMatrix(const TransformationMatrix&);
+ void concatTransformationMatrix(const TransformationMatrix&);
+
+ CompositeOperator compositeOperation() const;
+ void setCompositeOperation(CompositeOperator);
+ float opacity() const;
+ void setOpacity(float);
+
+ float strokeThickness() const;
+ void setStrokeThickness(float);
+ StrokeStyle strokeStyle() const;
+ void setStrokeStyle(const StrokeStyle&);
+
+ void setLineDash(const DashArray&, float dashOffset);
+ void setLineCap(LineCap);
+ void setLineJoin(LineJoin);
+ void setMiterLimit(float);
+
+ Color strokeColor() const;
+ void setStrokeColor(const Color&);
+
+ Color fillColor() const;
+ void setFillColor(const Color&);
+
+ bool antialiasingEnabled() const;
+ void setAntialiasingEnabled(bool);
+
+ void drawRect(const FloatRect&, VGbitfield paintModes = (VG_STROKE_PATH | VG_FILL_PATH));
+ void drawRoundedRect(const FloatRect&, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, VGbitfield paintModes = (VG_STROKE_PATH | VG_FILL_PATH));
+ void drawLine(const IntPoint& from, const IntPoint& to);
+ void drawArc(const IntRect& ellipseBounds, int startAngle, int angleSpan, VGbitfield paintModes = (VG_STROKE_PATH | VG_FILL_PATH));
+ void drawEllipse(const IntRect& bounds, VGbitfield paintModes = (VG_STROKE_PATH | VG_FILL_PATH));
+ void drawPolygon(size_t numPoints, const FloatPoint* points, VGbitfield paintModes = (VG_STROKE_PATH | VG_FILL_PATH));
+
+ void scale(const FloatSize& scaleFactors);
+ void rotate(float radians);
+ void translate(float dx, float dy);
+
+ void intersectClipRect(const FloatRect&);
+
+ void save(PainterOpenVG::SaveMode saveMode = CreateNewState);
+ void restore();
+
+ SurfaceOpenVG* surface() { return m_surface; }
+ void blitToSurface();
+
+private:
+ void destroyPainterStates();
+ void applyState();
+
+ void intersectScissorRect(const FloatRect&);
+
+private:
+ Vector<PlatformPainterState*> m_stateStack;
+ PlatformPainterState* m_state;
+ SurfaceOpenVG* m_surface;
+};
+
+}
+
+#endif
diff --git a/WebCore/platform/graphics/openvg/SurfaceOpenVG.cpp b/WebCore/platform/graphics/openvg/SurfaceOpenVG.cpp
new file mode 100644
index 0000000..9539f2c
--- /dev/null
+++ b/WebCore/platform/graphics/openvg/SurfaceOpenVG.cpp
@@ -0,0 +1,243 @@
+/*
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "SurfaceOpenVG.h"
+
+#include "IntSize.h"
+#include "PainterOpenVG.h"
+
+#if PLATFORM(EGL)
+#include "EGLDisplayOpenVG.h"
+#include "EGLUtils.h"
+#endif
+
+#include <wtf/Assertions.h>
+
+namespace WebCore {
+
+PainterOpenVG* SurfaceOpenVG::s_currentPainter = 0;
+
+SurfaceOpenVG* SurfaceOpenVG::currentSurface()
+{
+#if PLATFORM(EGL)
+ return EGLDisplayOpenVG::currentSurface();
+#else
+ ASSERT_NOT_REACHED();
+ return 0;
+#endif
+}
+
+#if PLATFORM(EGL)
+SurfaceOpenVG::SurfaceOpenVG(const IntSize& size, const EGLDisplay& display, EGLConfig* confPtr, EGLint* errorCode)
+ : m_activePainter(0)
+ , m_eglDisplay(display)
+ , m_eglSurface(EGL_NO_SURFACE)
+ , m_eglContext(EGL_NO_CONTEXT)
+{
+ ASSERT(m_eglDisplay != EGL_NO_DISPLAY);
+
+ EGLDisplayOpenVG* displayManager = EGLDisplayOpenVG::forDisplay(m_eglDisplay);
+ EGLConfig config = confPtr ? (*confPtr) : displayManager->defaultPbufferConfig();
+ m_eglSurface = displayManager->createPbufferSurface(size, config, errorCode);
+
+ if (m_eglSurface == EGL_NO_SURFACE)
+ return;
+
+ m_eglContext = displayManager->contextForSurface(m_eglSurface);
+ EGLDisplayOpenVG::registerPlatformSurface(this);
+}
+
+SurfaceOpenVG::SurfaceOpenVG(EGLNativeWindowType window, const EGLDisplay& display, EGLConfig* confPtr)
+ : m_activePainter(0)
+ , m_eglDisplay(display)
+ , m_eglSurface(EGL_NO_SURFACE)
+ , m_eglContext(EGL_NO_CONTEXT)
+{
+ ASSERT(m_eglDisplay != EGL_NO_DISPLAY);
+
+ EGLDisplayOpenVG* displayManager = EGLDisplayOpenVG::forDisplay(m_eglDisplay);
+ EGLConfig config = confPtr ? (*confPtr) : displayManager->defaultWindowConfig();
+ m_eglSurface = displayManager->surfaceForWindow(window, config);
+ ASSERT(m_eglSurface != EGL_NO_SURFACE);
+
+ m_eglContext = displayManager->contextForSurface(m_eglSurface);
+ EGLDisplayOpenVG::registerPlatformSurface(this);
+}
+
+// Constructor only accessible to EGLDisplayOpenVG for shared context
+// initialization. The parameter types might define to void* like in the
+// window surface constructor, so it can't be overloaded with all the required
+// arguments and EGLDisplayOpenVG basically implements the constructor
+// by itself.
+SurfaceOpenVG::SurfaceOpenVG()
+ : m_activePainter(0)
+ , m_eglDisplay(EGL_NO_DISPLAY)
+ , m_eglSurface(EGL_NO_SURFACE)
+ , m_eglContext(EGL_NO_CONTEXT)
+{
+}
+#endif
+
+SurfaceOpenVG::~SurfaceOpenVG()
+{
+ if (!isValid())
+ return;
+
+ if (m_activePainter && this == m_activePainter->baseSurface())
+ m_activePainter->end();
+
+#if PLATFORM(EGL)
+ EGLDisplayOpenVG::forDisplay(m_eglDisplay)->destroySurface(m_eglSurface);
+ EGLDisplayOpenVG::unregisterPlatformSurface(this);
+#else
+ ASSERT_NOT_REACHED();
+#endif
+}
+
+bool SurfaceOpenVG::isValid() const
+{
+#if PLATFORM(EGL)
+ return (m_eglSurface != EGL_NO_SURFACE);
+#else
+ ASSERT_NOT_REACHED();
+ return false;
+#endif
+}
+
+int SurfaceOpenVG::width() const
+{
+#if PLATFORM(EGL)
+ ASSERT(m_eglSurface != EGL_NO_SURFACE);
+
+ EGLint width;
+ eglQuerySurface(m_eglDisplay, m_eglSurface, EGL_WIDTH, &width);
+ ASSERT_EGL_NO_ERROR();
+ return width;
+#else
+ ASSERT_NOT_REACHED();
+ return 0;
+#endif
+}
+
+int SurfaceOpenVG::height() const
+{
+#if PLATFORM(EGL)
+ ASSERT(m_eglSurface != EGL_NO_SURFACE);
+
+ EGLint height;
+ eglQuerySurface(m_eglDisplay, m_eglSurface, EGL_HEIGHT, &height);
+ ASSERT_EGL_NO_ERROR();
+ return height;
+#else
+ ASSERT_NOT_REACHED();
+ return 0;
+#endif
+}
+
+SurfaceOpenVG* SurfaceOpenVG::sharedSurface() const
+{
+#if PLATFORM(EGL)
+ ASSERT(m_eglSurface != EGL_NO_SURFACE);
+ return EGLDisplayOpenVG::forDisplay(m_eglDisplay)->sharedPlatformSurface();
+#else
+ ASSERT_NOT_REACHED();
+ return 0;
+#endif
+}
+
+void SurfaceOpenVG::makeCurrent(MakeCurrentMode mode)
+{
+#if PLATFORM(EGL)
+ ASSERT(m_eglSurface != EGL_NO_SURFACE);
+
+ eglBindAPI(EGL_OPENVG_API);
+ ASSERT_EGL_NO_ERROR();
+ EGLSurface currentSurface = eglGetCurrentSurface(EGL_DRAW);
+ ASSERT_EGL_NO_ERROR();
+
+ if (currentSurface != m_eglSurface) {
+ eglMakeCurrent(m_eglDisplay, m_eglSurface, m_eglSurface, m_eglContext);
+ ASSERT_EGL_NO_ERROR();
+ s_currentPainter = 0;
+ }
+#endif
+
+ if (m_activePainter && mode == ApplyPainterStateOnSurfaceSwitch
+ && s_currentPainter != m_activePainter) {
+ m_activePainter->applyState();
+ s_currentPainter = m_activePainter;
+ }
+}
+
+void SurfaceOpenVG::makeCompatibleCurrent()
+{
+#if PLATFORM(EGL)
+ ASSERT(m_eglSurface != EGL_NO_SURFACE);
+
+ eglBindAPI(EGL_OPENVG_API);
+ ASSERT_EGL_NO_ERROR();
+ EGLSurface currentSurface = eglGetCurrentSurface(EGL_DRAW);
+ ASSERT_EGL_NO_ERROR();
+
+ if (currentSurface == m_eglSurface) {
+ if (m_activePainter && s_currentPainter != m_activePainter) {
+ m_activePainter->applyState();
+ s_currentPainter = m_activePainter;
+ }
+ } else if (!EGLDisplayOpenVG::forDisplay(m_eglDisplay)->surfacesCompatible(currentSurface, m_eglSurface)) {
+ eglMakeCurrent(m_eglDisplay, m_eglSurface, m_eglSurface, m_eglContext);
+ ASSERT_EGL_NO_ERROR();
+ s_currentPainter = 0;
+ }
+ // else: surfaces compatible, no need to switch contexts
+#endif
+}
+
+void SurfaceOpenVG::flush()
+{
+#if PLATFORM(EGL)
+ ASSERT(m_eglSurface != EGL_NO_SURFACE);
+
+ eglSwapBuffers(m_eglDisplay, m_eglSurface);
+ ASSERT_EGL_NO_ERROR();
+#endif
+}
+
+void SurfaceOpenVG::setActivePainter(PainterOpenVG* painter)
+{
+ ASSERT(isValid());
+
+ // If painter is non-zero, we want to make sure there was no previous painter set.
+ ASSERT(!painter || !m_activePainter);
+
+ // Make sure a disabled painter isn't marked as global current painter anymore.
+ if (!painter && s_currentPainter == m_activePainter)
+ s_currentPainter = 0;
+
+ m_activePainter = painter;
+}
+
+PainterOpenVG* SurfaceOpenVG::activePainter()
+{
+ ASSERT(isValid());
+ return m_activePainter;
+}
+
+}
diff --git a/WebCore/platform/graphics/openvg/SurfaceOpenVG.h b/WebCore/platform/graphics/openvg/SurfaceOpenVG.h
new file mode 100644
index 0000000..dc288dd
--- /dev/null
+++ b/WebCore/platform/graphics/openvg/SurfaceOpenVG.h
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef SurfaceOpenVG_h
+#define SurfaceOpenVG_h
+
+#if PLATFORM(EGL)
+#include <egl.h>
+#endif
+
+#include <wtf/Noncopyable.h>
+#include <wtf/Platform.h>
+
+namespace WebCore {
+
+#if PLATFORM(EGL)
+class EGLDisplayOpenVG;
+#endif
+class PainterOpenVG;
+class IntSize;
+
+/**
+ * SurfaceOpenVG provides the functionality of surfaces and contexts that are
+ * underlying the OpenVG implementation. In the vast majority of cases, that
+ * underlying technology is EGL, but OpenVG doesn't depend on EGL per se.
+ * Wrapping surface/context functionality into a separate class avoids lots
+ * of #ifdefs and should make it easy to add different surface/context
+ * implementations than EGL.
+ */
+class SurfaceOpenVG : public Noncopyable {
+public:
+ enum MakeCurrentMode {
+ ApplyPainterStateOnSurfaceSwitch,
+ DontApplyPainterState,
+ };
+
+ static SurfaceOpenVG* currentSurface();
+
+#if PLATFORM(EGL)
+ friend class EGLDisplayOpenVG;
+
+ /**
+ * Create a new EGL pbuffer surface with the specified size and config on
+ * the given display. If config is not specified, the display's default
+ * pbuffer config is used.
+ *
+ * This constructor will trigger an assertion if creation of the surface
+ * fails, unless you pledge to manually process the error code by passing
+ * a non-zero pointer as errorCode parameter. The error code returned by
+ * eglGetError() will be written to that variable.
+ */
+ SurfaceOpenVG(const IntSize& size, const EGLDisplay& display, EGLConfig* config = 0, EGLint* errorCode = 0);
+
+ /**
+ * Create a new EGL window surface with the specified native window handle
+ * and config on the given display. If config is not specified, the
+ * display's default window config is used.
+ */
+ SurfaceOpenVG(EGLNativeWindowType window, const EGLDisplay& display, EGLConfig* config = 0);
+
+ EGLDisplay eglDisplay() const { return m_eglDisplay; }
+ EGLSurface eglSurface() const { return m_eglSurface; }
+ EGLContext eglContext() const { return m_eglContext; }
+#endif
+
+ ~SurfaceOpenVG();
+
+ /**
+ * If a surface is invalid (could not be created), all method calls will
+ * crash horribly.
+ */
+ bool isValid() const;
+
+ int width() const;
+ int height() const;
+
+ SurfaceOpenVG* sharedSurface() const;
+
+ /**
+ * Make the associated GL/EGL context the current one, so that subsequent
+ * OpenVG commands apply to it.
+ */
+ void makeCurrent(MakeCurrentMode mode = ApplyPainterStateOnSurfaceSwitch);
+
+ /**
+ * Make a surface/context combination current that is "compatible"
+ * (i.e. can access its shared resources) to the given one. If no
+ * surface/context is current, the given one is made current.
+ *
+ * This method is meant to avoid context changes if they're not
+ * necessary, particularly tailored for the case where something
+ * compatible to the shared surface is requested while actual painting
+ * happens on another surface.
+ */
+ void makeCompatibleCurrent();
+
+ /**
+ * Empty the OpenVG pipeline and make sure all the performed paint
+ * operations show up on the surface as actual drawn pixels.
+ */
+ void flush();
+
+ void setActivePainter(PainterOpenVG*);
+ PainterOpenVG* activePainter();
+
+private:
+ PainterOpenVG* m_activePainter;
+ static PainterOpenVG* s_currentPainter; // global currently active painter
+
+#if PLATFORM(EGL)
+ SurfaceOpenVG(); // for EGLDisplayOpenVG
+
+ EGLDisplay m_eglDisplay;
+ EGLSurface m_eglSurface;
+ EGLContext m_eglContext;
+#endif
+};
+
+}
+
+#endif
diff --git a/WebCore/platform/graphics/openvg/VGUtils.cpp b/WebCore/platform/graphics/openvg/VGUtils.cpp
new file mode 100644
index 0000000..72ba5b2
--- /dev/null
+++ b/WebCore/platform/graphics/openvg/VGUtils.cpp
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) Research In Motion Limited 2009. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "VGUtils.h"
+
+#include "FloatRect.h"
+#include "TransformationMatrix.h"
+
+namespace WebCore {
+
+VGMatrix::VGMatrix(const VGfloat data[9])
+{
+ m_data[0] = data[0];
+ m_data[1] = data[1];
+ m_data[2] = data[2];
+ m_data[3] = data[3];
+ m_data[4] = data[4];
+ m_data[5] = data[5];
+ m_data[6] = data[6];
+ m_data[7] = data[7];
+ m_data[8] = data[8];
+}
+
+VGMatrix::VGMatrix(const TransformationMatrix& matrix)
+{
+ m_data[0] = matrix.m11();
+ m_data[1] = matrix.m12();
+ m_data[2] = matrix.m14();
+ m_data[3] = matrix.m21();
+ m_data[4] = matrix.m22();
+ m_data[5] = matrix.m24();
+ m_data[6] = matrix.m41();
+ m_data[7] = matrix.m42();
+ m_data[8] = matrix.m44();
+}
+
+VGMatrix::operator TransformationMatrix() const
+{
+ TransformationMatrix matrix;
+ matrix.setM11(m_data[0]);
+ matrix.setM12(m_data[1]);
+ matrix.setM14(m_data[2]);
+ matrix.setM21(m_data[3]);
+ matrix.setM22(m_data[4]);
+ matrix.setM24(m_data[5]);
+ matrix.setM41(m_data[6]);
+ matrix.setM42(m_data[7]);
+ matrix.setM44(m_data[8]);
+ return matrix;
+}
+
+TransformationMatrix::operator VGMatrix() const
+{
+ return VGMatrix(*this);
+}
+
+VGRect::VGRect(const VGfloat data[4])
+{
+ m_data[0] = data[0];
+ m_data[1] = data[1];
+ m_data[2] = data[2];
+ m_data[3] = data[3];
+}
+
+VGRect::VGRect(const FloatRect& rect)
+{
+ m_data[0] = rect.x();
+ m_data[1] = rect.y();
+ m_data[2] = rect.width();
+ m_data[3] = rect.height();
+}
+
+VGRect::operator FloatRect() const
+{
+ return FloatRect(m_data[0], m_data[1], m_data[2], m_data[3]);
+}
+
+FloatRect::operator VGRect() const
+{
+ return VGRect(*this);
+}
+
+}
diff --git a/WebCore/platform/graphics/openvg/VGUtils.h b/WebCore/platform/graphics/openvg/VGUtils.h
new file mode 100644
index 0000000..083c15a
--- /dev/null
+++ b/WebCore/platform/graphics/openvg/VGUtils.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef VGUtils_h
+#define VGUtils_h
+
+#include <openvg.h>
+#include <wtf/Assertions.h>
+
+static inline const char* toVGErrorConstant(VGErrorCode error)
+{
+ switch (error) {
+ case VG_BAD_HANDLE_ERROR:
+ return "VG_BAD_HANDLE_ERROR";
+ case VG_ILLEGAL_ARGUMENT_ERROR:
+ return "VG_ILLEGAL_ARGUMENT_ERROR";
+ case VG_OUT_OF_MEMORY_ERROR:
+ return "VG_OUT_OF_MEMORY_ERROR";
+ case VG_PATH_CAPABILITY_ERROR:
+ return "VG_PATH_CAPABILITY_ERROR";
+ case VG_UNSUPPORTED_IMAGE_FORMAT_ERROR:
+ return "VG_UNSUPPORTED_IMAGE_FORMAT_ERROR";
+ case VG_UNSUPPORTED_PATH_FORMAT_ERROR:
+ return "VG_UNSUPPORTED_PATH_FORMAT_ERROR";
+ case VG_IMAGE_IN_USE_ERROR:
+ return "VG_IMAGE_IN_USE_ERROR";
+ case VG_NO_CONTEXT_ERROR:
+ return "VG_NO_CONTEXT_ERROR";
+ default:
+ return "UNKNOWN_ERROR";
+ }
+}
+
+#if ASSERT_DISABLED
+#define ASSERT_VG_NO_ERROR() ((void)0)
+#else
+#define ASSERT_VG_NO_ERROR() do { \
+ VGErrorCode vgErrorCode = vgGetError(); \
+ ASSERT_WITH_MESSAGE(vgErrorCode == VG_NO_ERROR, "Found %s", toVGErrorConstant(vgErrorCode)); \
+} while (0)
+#endif
+
+
+namespace WebCore {
+
+class FloatRect;
+class TransformationMatrix;
+
+class VGMatrix {
+public:
+ VGMatrix(const VGfloat data[9]);
+ VGMatrix(const TransformationMatrix&);
+ const VGfloat* toVGfloat() const { return m_data; }
+ operator TransformationMatrix() const;
+private:
+ VGfloat m_data[9];
+};
+
+class VGRect {
+public:
+ VGRect(const VGfloat data[4]);
+ VGRect(const FloatRect&);
+ const VGfloat* toVGfloat() const { return m_data; }
+ operator FloatRect() const;
+private:
+ VGfloat m_data[4];
+};
+
+}
+
+#endif
diff --git a/WebCore/platform/graphics/qt/FontCacheQt.cpp b/WebCore/platform/graphics/qt/FontCacheQt.cpp
index 82fb709..83df0f3 100644
--- a/WebCore/platform/graphics/qt/FontCacheQt.cpp
+++ b/WebCore/platform/graphics/qt/FontCacheQt.cpp
@@ -56,7 +56,7 @@ FontPlatformData* FontCache::getSimilarFontPlatformData(const Font& font)
FontPlatformData* FontCache::getLastResortFallbackFont(const FontDescription& fontDescription)
{
- const AtomicString fallbackFamily = QFont(fontDescription.family().family()).lastResortFont();
+ const AtomicString fallbackFamily = QFont(fontDescription.family().family()).lastResortFamily();
return new FontPlatformData(fontDescription, fallbackFamily);
}
diff --git a/WebCore/platform/graphics/qt/FontPlatformData.h b/WebCore/platform/graphics/qt/FontPlatformData.h
index 4a3f8bc..9355142 100644
--- a/WebCore/platform/graphics/qt/FontPlatformData.h
+++ b/WebCore/platform/graphics/qt/FontPlatformData.h
@@ -31,7 +31,7 @@
namespace WebCore {
class String;
-class FontPlatformDataPrivate {
+class FontPlatformDataPrivate : public Noncopyable {
public:
FontPlatformDataPrivate()
: refCount(1)
diff --git a/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp b/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp
index 2cc2fc6..0a1075f 100644
--- a/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp
+++ b/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp
@@ -49,17 +49,6 @@ FontPlatformData::FontPlatformData(const FontPlatformData &other) : m_data(other
FontPlatformData::FontPlatformData(const FontDescription& description, const AtomicString& familyName, int wordSpacing, int letterSpacing)
: m_data(new FontPlatformDataPrivate())
{
- QString familyNames(familyName);
- if (!familyName.isEmpty())
- familyNames += QLatin1Char(',');
-
- const FontFamily* family = &description.family();
- while (family) {
- familyNames += family->family();
- family = family->next();
- if (family)
- familyNames += QLatin1Char(',');
- }
QFont& font = m_data->font;
font.setFamily(familyName);
font.setPixelSize(qRound(description.computedSize()));
diff --git a/WebCore/platform/graphics/qt/FontQt.cpp b/WebCore/platform/graphics/qt/FontQt.cpp
index 1e44626..0196ab2 100644
--- a/WebCore/platform/graphics/qt/FontQt.cpp
+++ b/WebCore/platform/graphics/qt/FontQt.cpp
@@ -44,24 +44,11 @@
namespace WebCore {
-static const QString qstring(const TextRun& run)
+static const QString fromRawDataWithoutRef(const String& string)
{
- // We don't detach
- return QString::fromRawData(reinterpret_cast<const QChar*>(run.characters()), run.length());
-}
-
-static const QString fixSpacing(const QString &string)
-{
- //Only detach if we're actually changing something
- QString possiblyDetached = string;
- for (int i = 0; i < string.length(); ++i) {
- const QChar c = string.at(i);
- if (c.unicode() != 0x20 && Font::treatAsSpace(c.unicode()))
- possiblyDetached[i] = 0x20; // detach
- else if (c.unicode() != 0x200c && Font::treatAsZeroWidthSpace(c.unicode()))
- possiblyDetached[i] = 0x200c; // detach
- }
- return possiblyDetached;
+ // We don't detach. This assumes the WebCore string data will stay valid for the
+ // lifetime of the QString we pass back, since we don't ref the WebCore string.
+ return QString::fromRawData(reinterpret_cast<const QChar*>(string.characters()), string.length());
}
static QTextLine setupLayout(QTextLayout* layout, const TextRun& style)
@@ -110,7 +97,8 @@ void Font::drawComplexText(GraphicsContext* ctx, const TextRun& run, const Float
p->setPen(QPen(QColor(ctx->strokeColor()), ctx->strokeThickness()));
}
- const QString string = fixSpacing(qstring(run));
+ String sanitized = Font::normalizeSpaces(String(run.characters(), run.length()));
+ QString string = fromRawDataWithoutRef(sanitized);
// text shadow
IntSize shadowSize;
@@ -185,7 +173,10 @@ float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFon
{
if (!run.length())
return 0;
- const QString string = fixSpacing(qstring(run));
+
+ String sanitized = Font::normalizeSpaces(String(run.characters(), run.length()));
+ QString string = fromRawDataWithoutRef(sanitized);
+
QTextLayout layout(string, font());
QTextLine line = setupLayout(&layout, run);
int w = int(line.naturalTextWidth());
@@ -198,7 +189,9 @@ float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFon
int Font::offsetForPositionForComplexText(const TextRun& run, int position, bool) const
{
- const QString string = fixSpacing(qstring(run));
+ String sanitized = Font::normalizeSpaces(String(run.characters(), run.length()));
+ QString string = fromRawDataWithoutRef(sanitized);
+
QTextLayout layout(string, font());
QTextLine line = setupLayout(&layout, run);
return line.xToCursor(position);
@@ -206,7 +199,9 @@ int Font::offsetForPositionForComplexText(const TextRun& run, int position, bool
FloatRect Font::selectionRectForComplexText(const TextRun& run, const IntPoint& pt, int h, int from, int to) const
{
- const QString string = fixSpacing(qstring(run));
+ String sanitized = Font::normalizeSpaces(String(run.characters(), run.length()));
+ QString string = fromRawDataWithoutRef(sanitized);
+
QTextLayout layout(string, font());
QTextLine line = setupLayout(&layout, run);
diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index a095476..b78a6e8 100644
--- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -166,7 +166,7 @@ static inline Qt::FillRule toQtFillRule(WindRule rule)
return Qt::OddEvenFill;
}
-struct TransparencyLayer {
+struct TransparencyLayer : FastAllocBase {
TransparencyLayer(const QPainter* p, const QRect &rect)
: pixmap(rect.width(), rect.height())
{
@@ -198,7 +198,7 @@ private:
TransparencyLayer & operator=(const TransparencyLayer &) { return *this; }
};
-class GraphicsContextPlatformPrivate {
+class GraphicsContextPlatformPrivate : public Noncopyable {
public:
GraphicsContextPlatformPrivate(QPainter* painter);
~GraphicsContextPlatformPrivate();
@@ -618,14 +618,14 @@ QPen GraphicsContext::pen()
return p->pen();
}
-static void inline drawFilledShadowPath(GraphicsContext* context, QPainter* p, const QPainterPath *path)
+static void inline drawFilledShadowPath(GraphicsContext* context, QPainter* p, const QPainterPath& path)
{
IntSize shadowSize;
int shadowBlur;
Color shadowColor;
if (context->getShadow(shadowSize, shadowBlur, shadowColor)) {
p->translate(shadowSize.width(), shadowSize.height());
- p->fillPath(*path, QBrush(shadowColor));
+ p->fillPath(path, QBrush(shadowColor));
p->translate(-shadowSize.width(), -shadowSize.height());
}
}
@@ -640,7 +640,7 @@ void GraphicsContext::fillPath()
path.setFillRule(toQtFillRule(fillRule()));
if (m_common->state.fillPattern || m_common->state.fillGradient || fillColor().alpha()) {
- drawFilledShadowPath(this, p, &path);
+ drawFilledShadowPath(this, p, path);
if (m_common->state.fillPattern) {
TransformationMatrix affine;
p->fillPath(path, QBrush(m_common->state.fillPattern->createPlatformPattern(affine)));
@@ -751,7 +751,7 @@ void GraphicsContext::fillRoundedRect(const IntRect& rect, const IntSize& topLef
Path path = Path::createRoundedRectangle(rect, topLeft, topRight, bottomLeft, bottomRight);
QPainter* p = m_data->p();
drawFilledShadowPath(this, p, path.platformPath());
- p->fillPath(*path.platformPath(), QColor(color));
+ p->fillPath(path.platformPath(), QColor(color));
}
void GraphicsContext::beginPath()
@@ -762,7 +762,7 @@ void GraphicsContext::beginPath()
void GraphicsContext::addPath(const Path& path)
{
QPainterPath newPath = m_data->currentPath;
- newPath.addPath(*(path.platformPath()));
+ newPath.addPath(path.platformPath());
m_data->currentPath = newPath;
}
@@ -795,17 +795,21 @@ void GraphicsContext::clipPath(WindRule clipRule)
p->setClipPath(newPath);
}
+void GraphicsContext::drawFocusRing(const Vector<Path>& paths, int width, int offset, const Color& color)
+{
+ // FIXME: implement
+}
+
/**
* Focus ring handling is not handled here. Qt style in
* RenderTheme handles drawing focus on widgets which
* need it.
*/
-void GraphicsContext::drawFocusRing(const Color& color)
+void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int /* width */, int /* offset */, const Color& color)
{
if (paintingDisabled())
return;
- const Vector<IntRect>& rects = focusRingRects();
unsigned rectCount = rects.size();
if (!rects.size())
@@ -1031,7 +1035,7 @@ void GraphicsContext::clip(const Path& path)
if (paintingDisabled())
return;
- m_data->p()->setClipPath(*path.platformPath(), Qt::IntersectClip);
+ m_data->p()->setClipPath(path.platformPath(), Qt::IntersectClip);
}
void GraphicsContext::canvasClip(const Path& path)
@@ -1045,7 +1049,7 @@ void GraphicsContext::clipOut(const Path& path)
return;
QPainter* p = m_data->p();
- QPainterPath clippedOut = *path.platformPath();
+ QPainterPath clippedOut = path.platformPath();
QPainterPath newClip;
newClip.setFillRule(Qt::OddEvenFill);
if (p->hasClipping()) {
@@ -1054,7 +1058,7 @@ void GraphicsContext::clipOut(const Path& path)
p->setClipPath(newClip, Qt::IntersectClip);
} else {
newClip.addRect(p->window());
- newClip.addPath(clippedOut & newClip);
+ newClip.addPath(clippedOut.intersected(newClip));
p->setClipPath(newClip);
}
}
@@ -1293,7 +1297,7 @@ HDC GraphicsContext::getWindowsContext(const IntRect& dstRect, bool supportAlpha
memset(bmpInfo.bmBits, 0, bufferSize);
}
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
// Make sure we can do world transforms.
SetGraphicsMode(bitmapDC, GM_ADVANCED);
diff --git a/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp b/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
new file mode 100644
index 0000000..5712eee
--- /dev/null
+++ b/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
@@ -0,0 +1,1118 @@
+/*
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+#include "GraphicsLayerQt.h"
+
+#include "CurrentTime.h"
+#include "FloatRect.h"
+#include "GraphicsContext.h"
+#include "Image.h"
+#include "RefCounted.h"
+#include "TranslateTransformOperation.h"
+#include "UnitBezier.h"
+#include <QtCore/qabstractanimation.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qset.h>
+#include <QtCore/qtimer.h>
+#include <QtGui/qbitmap.h>
+#include <QtGui/qcolor.h>
+#include <QtGui/qgraphicseffect.h>
+#include <QtGui/qgraphicsitem.h>
+#include <QtGui/qgraphicsscene.h>
+#include <QtGui/qmatrix4x4.h>
+#include <QtGui/qpainter.h>
+#include <QtGui/qpalette.h>
+#include <QtGui/qpixmap.h>
+#include <QtGui/qstyleoption.h>
+
+namespace WebCore {
+
+class GraphicsLayerQtImpl : public QGraphicsObject {
+ Q_OBJECT
+
+public:
+ // this set of flags help us defer which properties of the layer have been
+ // modified by the compositor, so we can know what to look for in the next flush
+ enum ChangeMask {
+ NoChanges = 0,
+ ChildrenChange = (1L << 1),
+ MaskLayerChange = (1L << 2),
+ PositionChange = (1L << 3),
+ AnchorPointChange = (1L << 4),
+ SizeChange = (1L << 5),
+ TransformChange = (1L << 6),
+ ContentChange = (1L << 7),
+ GeometryOrientationChange = (1L << 8),
+ ContentsOrientationChange = (1L << 9),
+ OpacityChange = (1L << 10),
+ ContentsRectChange = (1L << 11),
+ Preserves3DChange = (1L << 12),
+ MasksToBoundsChange = (1L << 13),
+ DrawsContentChange = (1L << 14),
+ ContentsOpaqueChange = (1L << 15),
+ BackfaceVisibilityChange = (1L << 16),
+ ChildrenTransformChange = (1L << 17),
+ DisplayChange = (1L << 18),
+ BackgroundColorChange = (1L << 19),
+ ParentChange = (1L << 20),
+ DistributesOpacityChange = (1L << 21)
+ };
+
+ // the compositor lets us special-case images and colors, so we try to do so
+ enum StaticContentType { HTMLContentType, PixmapContentType, ColorContentType};
+
+ GraphicsLayerQtImpl(GraphicsLayerQt* newLayer);
+ virtual ~GraphicsLayerQtImpl();
+
+ // reimps from QGraphicsItem
+ virtual QPainterPath opaqueArea() const;
+ virtual QRectF boundingRect() const;
+ virtual void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*);
+
+ // we manage transforms ourselves because transform-origin acts differently in webkit and in Qt
+ void setBaseTransform(const QTransform&);
+ void drawContents(QPainter*, const QRectF&, bool mask = false);
+
+ // let the compositor-API tell us which properties were changed
+ void notifyChange(ChangeMask);
+
+ // called when the compositor is ready for us to show the changes on screen
+ // this is called indirectly from ChromeClientQt::setNeedsOneShotDrawingSynchronization
+ // (meaning the sync would happen together with the next draw)
+ // or ChromeClientQt::scheduleCompositingLayerSync (meaning the sync will happen ASAP)
+ void flushChanges(bool recursive = true);
+
+public slots:
+ // we need to notify the client (aka the layer compositor) when the animation actually starts
+ void notifyAnimationStarted();
+
+public:
+ GraphicsLayerQt* m_layer;
+
+ QTransform m_baseTransfom;
+ bool m_transformAnimationRunning;
+ bool m_opacityAnimationRunning;
+
+ struct ContentData {
+ QPixmap pixmap;
+ QRegion regionToUpdate;
+ bool updateAll;
+ QColor contentsBackgroundColor;
+ QColor backgroundColor;
+ StaticContentType contentType;
+ float opacity;
+ ContentData()
+ : updateAll(false)
+ , contentType(HTMLContentType)
+ , opacity(1.f)
+ {
+ }
+
+ };
+
+ ContentData m_pendingContent;
+ ContentData m_currentContent;
+
+ int m_changeMask;
+
+ QSizeF m_size;
+ QList<QWeakPointer<QAbstractAnimation> > m_animations;
+ QTimer m_suspendTimer;
+
+ struct State {
+ GraphicsLayer* maskLayer;
+ FloatPoint pos;
+ FloatPoint3D anchorPoint;
+ FloatSize size;
+ TransformationMatrix transform;
+ TransformationMatrix childrenTransform;
+ Color backgroundColor;
+ Color currentColor;
+ GraphicsLayer::CompositingCoordinatesOrientation geoOrientation;
+ GraphicsLayer::CompositingCoordinatesOrientation contentsOrientation;
+ float opacity;
+ QRect contentsRect;
+
+ bool preserves3D: 1;
+ bool masksToBounds: 1;
+ bool drawsContent: 1;
+ bool contentsOpaque: 1;
+ bool backfaceVisibility: 1;
+ bool distributeOpacity: 1;
+ bool align: 2;
+ State(): maskLayer(0), opacity(1), preserves3D(false), masksToBounds(false),
+ drawsContent(false), contentsOpaque(false), backfaceVisibility(false),
+ distributeOpacity(false)
+ {
+ }
+ } m_state;
+};
+
+GraphicsLayerQtImpl::GraphicsLayerQtImpl(GraphicsLayerQt* newLayer)
+ : QGraphicsObject(0)
+ , m_layer(newLayer)
+ , m_transformAnimationRunning(false)
+ , m_changeMask(NoChanges)
+{
+ // better to calculate the exposed rect in QGraphicsView than over-render in WebCore
+ // FIXME: test different approaches
+ setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true);
+
+ // we use graphics-view for compositing, not for interactivity
+ setAcceptedMouseButtons(Qt::NoButton);
+ setEnabled(false);
+
+ // we'll set the cache when we know what's going on
+ setCacheMode(NoCache);
+}
+
+GraphicsLayerQtImpl::~GraphicsLayerQtImpl()
+{
+ // the compositor manages item lifecycle - we don't want the graphics-view
+ // system to automatically delete our items
+
+ const QList<QGraphicsItem*> children = childItems();
+ for (QList<QGraphicsItem*>::const_iterator it = children.begin(); it != children.end(); ++it) {
+ if (QGraphicsItem* item = *it) {
+ if (scene())
+ scene()->removeItem(item);
+ item->setParentItem(0);
+ }
+ }
+
+ // we do, however, own the animations...
+ for (QList<QWeakPointer<QAbstractAnimation> >::iterator it = m_animations.begin(); it != m_animations.end(); ++it)
+ if (QAbstractAnimation* anim = it->data())
+ delete anim;
+}
+
+void GraphicsLayerQtImpl::setBaseTransform(const QTransform& transform)
+{
+ if (!m_layer)
+ return;
+ // webkit has relative-to-size originPoint, graphics-view has a pixel originPoint
+ // here we convert
+ QPointF originTranslate(
+ m_layer->anchorPoint().x() * m_layer->size().width(), m_layer->anchorPoint().y() * m_layer->size().height());
+
+ resetTransform();
+
+ // we have to manage this ourselves because QGraphicsView's transformOrigin is incomplete
+ translate(originTranslate.x(), originTranslate.y());
+ setTransform(transform, true);
+ translate(-originTranslate.x(), -originTranslate.y());
+ m_baseTransfom = transform;
+}
+
+QPainterPath GraphicsLayerQtImpl::opaqueArea() const
+{
+ QPainterPath painterPath;
+ // we try out best to return the opaque area, maybe it will help graphics-view render less items
+ if (m_currentContent.backgroundColor.isValid() && m_currentContent.backgroundColor.alpha() == 0xff)
+ painterPath.addRect(boundingRect());
+ else {
+ if (m_state.contentsOpaque
+ || (m_currentContent.contentType == ColorContentType && m_currentContent.contentsBackgroundColor.alpha() == 0xff)
+ || (m_currentContent.contentType == PixmapContentType && !m_currentContent.pixmap.hasAlpha())) {
+
+ painterPath.addRect(m_state.contentsRect);
+ }
+ }
+ return painterPath;
+}
+
+QRectF GraphicsLayerQtImpl::boundingRect() const
+{
+ return QRectF(QPointF(0, 0), QSizeF(m_size));
+}
+
+void GraphicsLayerQtImpl::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
+{
+ if (m_state.maskLayer && m_state.maskLayer->platformLayer()) {
+ // FIXME: see if this is better done somewhere else
+ GraphicsLayerQtImpl* otherMask = static_cast<GraphicsLayerQtImpl*>(m_state.maskLayer->platformLayer());
+ otherMask->flushChanges(true);
+
+ // CSS3 mask and QGraphicsOpacityEffect are the same thing! we just need to convert...
+ // The conversion is as fast as we can make it - we render the layer once and send it to the QGraphicsOpacityEffect
+ if (!graphicsEffect()) {
+ QPixmap mask(QSize(m_state.maskLayer->size().width(), m_state.maskLayer->size().height()));
+ mask.fill(Qt::transparent);
+ {
+ QPainter p(&mask);
+ p.setRenderHints(painter->renderHints(), true);
+ p.setCompositionMode(QPainter::CompositionMode_Source);
+ static_cast<GraphicsLayerQtImpl*>(m_state.maskLayer->platformLayer())->drawContents(&p, option->exposedRect, true);
+ }
+ QGraphicsOpacityEffect* opacityEffect = new QGraphicsOpacityEffect(this);
+ opacityEffect->setOpacity(1);
+ opacityEffect->setOpacityMask(QBrush(mask));
+ setGraphicsEffect(opacityEffect);
+ }
+ }
+ drawContents(painter, option->exposedRect);
+}
+
+void GraphicsLayerQtImpl::drawContents(QPainter* painter, const QRectF& r, bool mask)
+{
+ QRect rect = r.toAlignedRect();
+
+ if (m_currentContent.contentType != HTMLContentType && !m_state.contentsRect.isEmpty())
+ rect = rect.intersected(m_state.contentsRect);
+
+ if (m_currentContent.backgroundColor.isValid())
+ painter->fillRect(r, QColor(m_currentContent.backgroundColor));
+
+ if (!rect.isEmpty()) {
+ switch (m_currentContent.contentType) {
+ case PixmapContentType:
+ // we have to scale the image to the contentsRect
+ // FIXME: a better way would probably be drawPixmap with a src/target rect
+ painter->drawPixmap(rect.topLeft(), m_currentContent.pixmap.scaled(m_state.contentsRect.size()), r);
+ break;
+ case ColorContentType:
+ painter->fillRect(rect, m_currentContent.contentsBackgroundColor);
+ break;
+ default:
+ if (m_state.drawsContent) {
+ // this is the "expensive" bit. we try to minimize calls to this
+ // neck of the woods by proper caching
+ GraphicsContext gc(painter);
+ m_layer->paintGraphicsLayerContents(gc, rect);
+ }
+ break;
+ }
+ }
+}
+
+void GraphicsLayerQtImpl::notifyChange(ChangeMask changeMask)
+{
+ if (!this)
+ return;
+
+ m_changeMask |= changeMask;
+
+ if (m_layer->client())
+ m_layer->client()->notifySyncRequired(m_layer);
+}
+
+void GraphicsLayerQtImpl::flushChanges(bool recursive)
+{
+ // this is the bulk of the work. understanding what the compositor is trying to achieve,
+ // what graphics-view can do, and trying to find a sane common-grounds
+ if (!m_layer || m_changeMask == NoChanges)
+ goto afterLayerChanges;
+
+ if (m_currentContent.contentType == HTMLContentType && (m_changeMask & ParentChange)) {
+ // the WebCore compositor manages item ownership. We have to make sure
+ // graphics-view doesn't try to snatch that ownership...
+ if (!m_layer->parent() && !parentItem())
+ setParentItem(0);
+ else if (m_layer && m_layer->parent() && m_layer->parent()->nativeLayer() != parentItem())
+ setParentItem(m_layer->parent()->nativeLayer());
+ }
+
+ if (m_changeMask & ChildrenChange) {
+ // we basically do an XOR operation on the list of current children
+ // and the list of wanted children, and remove/add
+ QSet<QGraphicsItem*> newChildren;
+ const Vector<GraphicsLayer*> newChildrenVector = (m_layer->children());
+ newChildren.reserve(newChildrenVector.size());
+
+ for (size_t i = 0; i < newChildrenVector.size(); ++i)
+ newChildren.insert(newChildrenVector[i]->platformLayer());
+
+ const QSet<QGraphicsItem*> currentChildren = childItems().toSet();
+ const QSet<QGraphicsItem*> childrenToAdd = newChildren - currentChildren;
+ const QSet<QGraphicsItem*> childrenToRemove = currentChildren - newChildren;
+ for (QSet<QGraphicsItem*>::const_iterator it = childrenToAdd.begin(); it != childrenToAdd.end(); ++it) {
+ if (QGraphicsItem* w = *it)
+ w->setParentItem(this);
+ }
+ for (QSet<QGraphicsItem*>::const_iterator it = childrenToRemove.begin(); it != childrenToRemove.end(); ++it) {
+ if (QGraphicsItem* w = *it)
+ w->setParentItem(0);
+ }
+
+ // children are ordered by z-value, let graphics-view know.
+ for (size_t i = 0; i < newChildrenVector.size(); ++i)
+ if (newChildrenVector[i]->platformLayer())
+ newChildrenVector[i]->platformLayer()->setZValue(i);
+ }
+
+ if (m_changeMask & MaskLayerChange) {
+ // we can't paint here, because we don't know if the mask layer
+ // itself is ready... we'll have to wait till this layer tries to paint
+ setGraphicsEffect(0);
+ if (m_layer->maskLayer())
+ setFlag(ItemClipsChildrenToShape, true);
+ else
+ setFlag(ItemClipsChildrenToShape, m_layer->masksToBounds());
+ update();
+ }
+
+ if ((m_changeMask & PositionChange) && (m_layer->position() != m_state.pos))
+ setPos(m_layer->position().x(), m_layer->position().y());
+
+ if (m_changeMask & SizeChange) {
+ if (m_layer->size() != m_state.size) {
+ prepareGeometryChange();
+ m_size = QSizeF(m_layer->size().width(), m_layer->size().height());
+ }
+ }
+
+ if (m_changeMask & (TransformChange | AnchorPointChange | SizeChange)) {
+ // since we convert a percentage-based origin-point to a pixel-based one,
+ // the anchor-point, transform and size from WebCore all affect the one
+ // that we give Qt
+ if (m_state.transform != m_layer->transform() || m_state.anchorPoint != m_layer->anchorPoint() || m_state.size != m_layer->size())
+ setBaseTransform(QTransform(m_layer->transform()));
+ }
+
+ if (m_changeMask & (ContentChange | DrawsContentChange)) {
+ switch (m_pendingContent.contentType) {
+ case PixmapContentType:
+ // we need cache even for images, because they need to be resized
+ // to the contents rect. maybe this can be optimized though
+ setCacheMode(m_transformAnimationRunning ? ItemCoordinateCache : DeviceCoordinateCache);
+ update();
+ setFlag(ItemHasNoContents, false);
+ break;
+
+ case ColorContentType:
+ // no point in caching a solid-color rectangle
+ setCacheMode(QGraphicsItem::NoCache);
+ if (m_pendingContent.contentType != m_currentContent.contentType || m_pendingContent.contentsBackgroundColor != m_currentContent.contentsBackgroundColor)
+ update();
+ m_state.drawsContent = false;
+ setFlag(ItemHasNoContents, false);
+ break;
+
+ case HTMLContentType:
+ if (m_pendingContent.contentType != m_currentContent.contentType)
+ update();
+ if (!m_state.drawsContent && m_layer->drawsContent())
+ update();
+ if (m_layer->drawsContent())
+ setCacheMode(m_transformAnimationRunning ? ItemCoordinateCache : DeviceCoordinateCache);
+ else
+ setCacheMode(NoCache);
+
+ setFlag(ItemHasNoContents, !m_layer->drawsContent());
+ break;
+ }
+ }
+
+ if ((m_changeMask & OpacityChange) && m_state.opacity != m_layer->opacity())
+ setOpacity(m_layer->opacity());
+
+ if (m_changeMask & ContentsRectChange) {
+ const QRect rect(m_layer->contentsRect());
+ if (m_state.contentsRect != rect) {
+ m_state.contentsRect = rect;
+ update();
+ }
+ }
+
+ if ((m_changeMask & MasksToBoundsChange)
+ && m_state.masksToBounds != m_layer->masksToBounds()) {
+
+ setFlag(QGraphicsItem::ItemClipsToShape, m_layer->masksToBounds());
+ setFlag(QGraphicsItem::ItemClipsChildrenToShape, m_layer->masksToBounds());
+ }
+
+ if ((m_changeMask & ContentsOpaqueChange) && m_state.contentsOpaque != m_layer->contentsOpaque())
+ prepareGeometryChange();
+
+ if (m_changeMask & DisplayChange)
+ update(m_pendingContent.regionToUpdate.boundingRect());
+
+ if ((m_changeMask & BackgroundColorChange) && (m_pendingContent.backgroundColor != m_currentContent.backgroundColor))
+ update();
+
+ // FIXME: the following flags are currently not handled, as they don't have a clear test or are in low priority
+ // GeometryOrientationChange, ContentsOrientationChange, BackfaceVisibilityChange, ChildrenTransformChange
+
+ m_state.maskLayer = m_layer->maskLayer();
+ m_state.pos = m_layer->position();
+ m_state.anchorPoint = m_layer->anchorPoint();
+ m_state.size = m_layer->size();
+ m_state.transform = m_layer->transform();
+ m_state.geoOrientation = m_layer->geometryOrientation();
+ m_state.contentsOrientation =m_layer->contentsOrientation();
+ m_state.opacity = m_layer->opacity();
+ m_state.contentsRect = m_layer->contentsRect();
+ m_state.preserves3D = m_layer->preserves3D();
+ m_state.masksToBounds = m_layer->masksToBounds();
+ m_state.drawsContent = m_layer->drawsContent();
+ m_state.contentsOpaque = m_layer->contentsOpaque();
+ m_state.backfaceVisibility = m_layer->backfaceVisibility();
+ m_currentContent.pixmap = m_pendingContent.pixmap;
+ m_currentContent.contentType = m_pendingContent.contentType;
+ m_currentContent.backgroundColor = m_pendingContent.backgroundColor;
+ m_currentContent.regionToUpdate |= m_pendingContent.regionToUpdate;
+ m_currentContent.contentsBackgroundColor = m_pendingContent.contentsBackgroundColor;
+ m_pendingContent.regionToUpdate = QRegion();
+ m_changeMask = NoChanges;
+
+
+afterLayerChanges:
+ if (!recursive)
+ return;
+
+ const QList<QGraphicsItem*> children = childItems();
+
+ for (QList<QGraphicsItem*>::const_iterator it = children.begin(); it != children.end(); ++it) {
+ if (QGraphicsItem* item = *it)
+ if (GraphicsLayerQtImpl* layer = qobject_cast<GraphicsLayerQtImpl*>(item->toGraphicsObject()))
+ layer->flushChanges(true);
+ }
+}
+
+void GraphicsLayerQtImpl::notifyAnimationStarted()
+{
+ // WebCore notifies javascript when the animation starts
+ // here we're letting it know
+ m_layer->client()->notifyAnimationStarted(m_layer, WTF::currentTime());
+}
+
+GraphicsLayerQt::GraphicsLayerQt(GraphicsLayerClient* client)
+ : GraphicsLayer(client)
+ , m_impl(PassOwnPtr<GraphicsLayerQtImpl>(new GraphicsLayerQtImpl(this)))
+{
+}
+
+GraphicsLayerQt::~GraphicsLayerQt()
+{
+}
+
+// this is the hook for WebCore compositor to know that Qt implements compositing with GraphicsLayerQt
+PassOwnPtr<GraphicsLayer> GraphicsLayer::create(GraphicsLayerClient* client)
+{
+ return new GraphicsLayerQt(client);
+}
+
+// reimp from GraphicsLayer.h: Qt is top-down
+GraphicsLayer::CompositingCoordinatesOrientation GraphicsLayer::compositingCoordinatesOrientation()
+{
+ return CompositingCoordinatesTopDown;
+}
+
+// reimp from GraphicsLayer.h: we'll need to update the whole display, and we can't count on the current size because it might change
+void GraphicsLayerQt::setNeedsDisplay()
+{
+ m_impl->m_pendingContent.regionToUpdate = QRegion(QRect(QPoint(0, 0), QSize(size().width(), size().height())));
+ m_impl->notifyChange(GraphicsLayerQtImpl::DisplayChange);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setNeedsDisplayInRect(const FloatRect& r)
+{
+ m_impl->m_pendingContent.regionToUpdate|= QRectF(r).toAlignedRect();
+ m_impl->notifyChange(GraphicsLayerQtImpl::DisplayChange);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setName(const String& name)
+{
+ m_impl->setObjectName(name);
+ GraphicsLayer::setName(name);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setParent(GraphicsLayer* layer)
+{
+ m_impl->notifyChange(GraphicsLayerQtImpl::ParentChange);
+ GraphicsLayer::setParent(layer);
+}
+
+// reimp from GraphicsLayer.h
+bool GraphicsLayerQt::setChildren(const Vector<GraphicsLayer*>& children)
+{
+ m_impl->notifyChange(GraphicsLayerQtImpl::ChildrenChange);
+ return GraphicsLayer::setChildren(children);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::addChild(GraphicsLayer* layer)
+{
+ m_impl->notifyChange(GraphicsLayerQtImpl::ChildrenChange);
+ GraphicsLayer::addChild(layer);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::addChildAtIndex(GraphicsLayer* layer, int index)
+{
+ GraphicsLayer::addChildAtIndex(layer, index);
+ m_impl->notifyChange(GraphicsLayerQtImpl::ChildrenChange);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::addChildAbove(GraphicsLayer* layer, GraphicsLayer* sibling)
+{
+ GraphicsLayer::addChildAbove(layer, sibling);
+ m_impl->notifyChange(GraphicsLayerQtImpl::ChildrenChange);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::addChildBelow(GraphicsLayer* layer, GraphicsLayer* sibling)
+{
+
+ GraphicsLayer::addChildBelow(layer, sibling);
+ m_impl->notifyChange(GraphicsLayerQtImpl::ChildrenChange);
+}
+
+// reimp from GraphicsLayer.h
+bool GraphicsLayerQt::replaceChild(GraphicsLayer* oldChild, GraphicsLayer* newChild)
+{
+ if (GraphicsLayer::replaceChild(oldChild, newChild)) {
+ m_impl->notifyChange(GraphicsLayerQtImpl::ChildrenChange);
+ return true;
+ }
+
+ return false;
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::removeFromParent()
+{
+ if (parent())
+ m_impl->notifyChange(GraphicsLayerQtImpl::ParentChange);
+ GraphicsLayer::removeFromParent();
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setMaskLayer(GraphicsLayer* layer)
+{
+ GraphicsLayer::setMaskLayer(layer);
+ m_impl->notifyChange(GraphicsLayerQtImpl::MaskLayerChange);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setPosition(const FloatPoint& p)
+{
+ if (position() != p)
+ m_impl->notifyChange(GraphicsLayerQtImpl::PositionChange);
+ GraphicsLayer::setPosition(p);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setAnchorPoint(const FloatPoint3D& p)
+{
+ if (anchorPoint() != p)
+ m_impl->notifyChange(GraphicsLayerQtImpl::AnchorPointChange);
+ GraphicsLayer::setAnchorPoint(p);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setSize(const FloatSize& size)
+{
+ if (this->size() != size)
+ m_impl->notifyChange(GraphicsLayerQtImpl::SizeChange);
+ GraphicsLayer::setSize(size);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setTransform(const TransformationMatrix& t)
+{
+ if (!m_impl->m_transformAnimationRunning && transform() != t)
+ m_impl->notifyChange(GraphicsLayerQtImpl::TransformChange);
+ GraphicsLayer::setTransform(t);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setChildrenTransform(const TransformationMatrix& t)
+{
+ GraphicsLayer::setChildrenTransform(t);
+ m_impl->notifyChange(GraphicsLayerQtImpl::ChildrenTransformChange);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setPreserves3D(bool b)
+{
+ if (b != preserves3D());
+ m_impl->notifyChange(GraphicsLayerQtImpl::Preserves3DChange);
+ GraphicsLayer::setPreserves3D(b);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setMasksToBounds(bool b)
+{
+ GraphicsLayer::setMasksToBounds(b);
+ m_impl->notifyChange(GraphicsLayerQtImpl::MasksToBoundsChange);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setDrawsContent(bool b)
+{
+ m_impl->notifyChange(GraphicsLayerQtImpl::DrawsContentChange);
+ GraphicsLayer::setDrawsContent(b);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setBackgroundColor(const Color& c)
+{
+ m_impl->notifyChange(GraphicsLayerQtImpl::BackgroundColorChange);
+ m_impl->m_pendingContent.backgroundColor = c;
+ GraphicsLayer::setBackgroundColor(c);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::clearBackgroundColor()
+{
+ m_impl->m_pendingContent.backgroundColor = QColor();
+ m_impl->notifyChange(GraphicsLayerQtImpl::BackgroundColorChange);
+ GraphicsLayer::clearBackgroundColor();
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setContentsOpaque(bool b)
+{
+ m_impl->notifyChange(GraphicsLayerQtImpl::ContentsOpaqueChange);
+ GraphicsLayer::setContentsOpaque(b);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setBackfaceVisibility(bool b)
+{
+ m_impl->notifyChange(GraphicsLayerQtImpl::BackfaceVisibilityChange);
+ GraphicsLayer::setBackfaceVisibility(b);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setOpacity(float o)
+{
+ if (!m_impl->m_opacityAnimationRunning && opacity() != o)
+ m_impl->notifyChange(GraphicsLayerQtImpl::OpacityChange);
+ GraphicsLayer::setOpacity(o);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setContentsRect(const IntRect& r)
+{
+ m_impl->notifyChange(GraphicsLayerQtImpl::ContentsRectChange);
+ GraphicsLayer::setContentsRect(r);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setContentsToImage(Image* image)
+{
+ m_impl->notifyChange(GraphicsLayerQtImpl::ContentChange);
+ m_impl->m_pendingContent.contentType = GraphicsLayerQtImpl::HTMLContentType;
+ GraphicsLayer::setContentsToImage(image);
+ if (image) {
+ QPixmap* pxm = image->nativeImageForCurrentFrame();
+ if (pxm) {
+ m_impl->m_pendingContent.pixmap = *pxm;
+ m_impl->m_pendingContent.contentType = GraphicsLayerQtImpl::PixmapContentType;
+ return;
+ }
+ }
+ m_impl->m_pendingContent.pixmap = QPixmap();
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setContentsBackgroundColor(const Color& color)
+{
+ m_impl->notifyChange(GraphicsLayerQtImpl::ContentChange);
+ m_impl->m_pendingContent.contentType = GraphicsLayerQtImpl::ColorContentType;
+ m_impl->m_pendingContent.contentsBackgroundColor = QColor(color);
+ GraphicsLayer::setContentsBackgroundColor(color);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setGeometryOrientation(CompositingCoordinatesOrientation orientation)
+{
+ m_impl->notifyChange(GraphicsLayerQtImpl::GeometryOrientationChange);
+ GraphicsLayer::setGeometryOrientation(orientation);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::setContentsOrientation(CompositingCoordinatesOrientation orientation)
+{
+ m_impl->notifyChange(GraphicsLayerQtImpl::ContentsOrientationChange);
+ GraphicsLayer::setContentsOrientation(orientation);
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::distributeOpacity(float o)
+{
+ m_impl->notifyChange(GraphicsLayerQtImpl::OpacityChange);
+ m_impl->m_state.distributeOpacity = true;
+}
+
+// reimp from GraphicsLayer.h
+float GraphicsLayerQt::accumulatedOpacity() const
+{
+ return m_impl->effectiveOpacity();
+}
+
+// reimp from GraphicsLayer.h
+void GraphicsLayerQt::syncCompositingState()
+{
+ m_impl->flushChanges();
+ GraphicsLayer::syncCompositingState();
+}
+
+// reimp from GraphicsLayer.h
+NativeLayer GraphicsLayerQt::nativeLayer() const
+{
+ return m_impl.get();
+}
+
+// reimp from GraphicsLayer.h
+PlatformLayer* GraphicsLayerQt::platformLayer() const
+{
+ return m_impl.get();
+}
+
+// now we start dealing with WebCore animations translated to Qt animations
+
+template <typename T>
+struct KeyframeValueQt {
+ TimingFunction timingFunction;
+ T value;
+};
+
+// we copy this from the AnimationBase.cpp
+static inline double solveEpsilon(double duration)
+{
+ return 1.0 / (200.0 * duration);
+}
+
+static inline double solveCubicBezierFunction(qreal p1x, qreal p1y, qreal p2x, qreal p2y, double t, double duration)
+{
+ UnitBezier bezier(p1x, p1y, p2x, p2y);
+ return bezier.solve(t, solveEpsilon(duration));
+}
+
+// we want the timing function to be as close as possible to what the web-developer intended, so we're using the same function used by WebCore when compositing is disabled
+// Using easing-curves would probably work for some of the cases, but wouldn't really buy us anything as we'd have to convert the bezier function back to an easing curve
+static inline qreal applyTimingFunction(const TimingFunction& timingFunction, qreal progress, int duration)
+{
+ if (timingFunction.type() == LinearTimingFunction)
+ return progress;
+ if (timingFunction.type() == CubicBezierTimingFunction) {
+ return solveCubicBezierFunction(timingFunction.x1(),
+ timingFunction.y1(),
+ timingFunction.x2(),
+ timingFunction.y2(),
+ double(progress), double(duration) / 1000);
+ }
+ return progress;
+}
+
+// helper functions to safely get a value out of WebCore's AnimationValue*
+static void webkitAnimationToQtAnimationValue(const AnimationValue* animationValue, TransformOperations& transformOperations)
+{
+ transformOperations = TransformOperations();
+ if (!animationValue)
+ return;
+
+ const TransformOperations* ops = static_cast<const TransformAnimationValue*>(animationValue)->value();
+
+ if (ops)
+ transformOperations = *ops;
+}
+
+static void webkitAnimationToQtAnimationValue(const AnimationValue* animationValue, qreal& realValue)
+{
+ realValue = animationValue ? static_cast<const FloatAnimationValue*>(animationValue)->value() : 0;
+}
+
+// we put a bit of the functionality in a base class to allow casting and to save some code size
+class AnimationQtBase : public QAbstractAnimation {
+public:
+ AnimationQtBase(GraphicsLayerQtImpl* layer, const KeyframeValueList& values, const IntSize& boxSize, const Animation* anim, const QString & name)
+ : QAbstractAnimation(0)
+ , m_layer(layer)
+ , m_boxSize(boxSize)
+ , m_duration(anim->duration() * 1000)
+ , m_isAlternate(anim->direction() == Animation::AnimationDirectionAlternate)
+ , m_webkitPropertyID(values.property())
+ , m_keyframesName(name)
+ {
+ }
+
+ virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
+ {
+ QAbstractAnimation::updateState(newState, oldState);
+
+ // for some reason I have do this asynchronously - or the animation won't work
+ if (newState == Running && oldState == Stopped)
+ QTimer::singleShot(0, m_layer.data(), SLOT(notifyAnimationStarted()));
+ }
+
+ virtual int duration() const { return m_duration; }
+
+ QWeakPointer<GraphicsLayerQtImpl> m_layer;
+ IntSize m_boxSize;
+ int m_duration;
+ bool m_isAlternate;
+ AnimatedPropertyID m_webkitPropertyID;
+ QString m_keyframesName;
+};
+
+// we'd rather have a templatized QAbstractAnimation than QPropertyAnimation / QVariantAnimation;
+// Since we know the types that we're dealing with, the QObject/QProperty/QVariant abstraction
+// buys us very little in this case, for too much overhead
+template <typename T>
+class AnimationQt : public AnimationQtBase {
+
+public:
+ AnimationQt(GraphicsLayerQtImpl* layer, const KeyframeValueList& values, const IntSize& boxSize, const Animation* anim, const QString & name)
+ :AnimationQtBase(layer, values, boxSize, anim, name)
+ {
+ // copying those WebCore structures is not trivial, we have to do it like this
+ for (size_t i = 0; i < values.size(); ++i) {
+ const AnimationValue* animationValue = values.at(i);
+ KeyframeValueQt<T> keyframeValue;
+ if (animationValue->timingFunction())
+ keyframeValue.timingFunction = *animationValue->timingFunction();
+ webkitAnimationToQtAnimationValue(animationValue, keyframeValue.value);
+ m_keyframeValues[animationValue->keyTime()] = keyframeValue;
+ }
+ }
+
+protected:
+
+ // this is the part that differs between animated properties
+ virtual void applyFrame(const T& fromValue, const T& toValue, qreal progress) = 0;
+
+ virtual void updateCurrentTime(int currentTime)
+ {
+ if (!m_layer)
+ return;
+
+ qreal progress = qreal(currentLoopTime()) / duration();
+
+ if (m_isAlternate && currentLoop()%2)
+ progress = 1-progress;
+
+ if (m_keyframeValues.isEmpty())
+ return;
+
+ // we find the current from-to keyframes in our little map
+ typename QMap<qreal, KeyframeValueQt<T> >::iterator it = m_keyframeValues.find(progress);
+
+ // we didn't find an exact match, we try the closest match (lower bound)
+ if (it == m_keyframeValues.end())
+ it = m_keyframeValues.lowerBound(progress)-1;
+
+ // we didn't find any match - we use the first keyframe
+ if (it == m_keyframeValues.end())
+ it = m_keyframeValues.begin();
+
+ typename QMap<qreal, KeyframeValueQt<T> >::iterator it2 = it+1;
+ if (it2 == m_keyframeValues.end())
+ it2 = m_keyframeValues.begin();
+ const KeyframeValueQt<T>& fromKeyframe = it.value();
+ const KeyframeValueQt<T>& toKeyframe = it2.value();
+
+ const TimingFunction& timingFunc = fromKeyframe.timingFunction;
+ const T& fromValue = fromKeyframe.value;
+ const T& toValue = toKeyframe.value;
+
+ // now we have a source keyframe, origin keyframe and a timing function
+ // we can now process the progress and apply the frame
+ qreal normalizedProgress = (it.key() == it2.key()) ? 0 : (progress - it.key()) / (it2.key() - it.key());
+ normalizedProgress = applyTimingFunction(timingFunc, normalizedProgress, duration() / 1000);
+ applyFrame(fromValue, toValue, normalizedProgress);
+ }
+
+ QMap<qreal, KeyframeValueQt<T> > m_keyframeValues;
+};
+
+class TransformAnimationQt : public AnimationQt<TransformOperations> {
+public:
+ TransformAnimationQt(GraphicsLayerQtImpl* layer, const KeyframeValueList& values, const IntSize& boxSize, const Animation* anim, const QString & name)
+ : AnimationQt<TransformOperations>(layer, values, boxSize, anim, name)
+ {
+ }
+
+ ~TransformAnimationQt()
+ {
+ // this came up during the compositing/animation LayoutTests
+ // when the animation dies, the transform has to go back to default
+ if (m_layer)
+ m_layer.data()->setBaseTransform(QTransform(m_layer.data()->m_layer->transform()));
+ }
+
+ // the idea is that we let WebCore manage the transform-operations
+ // and Qt just manages the animation heartbeat and the bottom-line QTransform
+ // we get the performance not by using QTransform instead of TransformationMatrix, but by proper caching of
+ // items that are expensive for WebCore to render. We want the rest to be as close to WebCore's idea as possible.
+ virtual void applyFrame(const TransformOperations& sourceOperations, const TransformOperations& targetOperations, qreal progress)
+ {
+ TransformationMatrix transformMatrix;
+
+ // this looks simple but is really tricky to get right. Use caution.
+ for (size_t i = 0; i < targetOperations.size(); ++i)
+ targetOperations.operations()[i]->blend(sourceOperations.at(i), progress)->apply(transformMatrix, m_boxSize);
+
+ m_layer.data()->setBaseTransform(QTransform(transformMatrix));
+ }
+
+ virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
+ {
+ AnimationQtBase::updateState(newState, oldState);
+ if (!m_layer)
+ return;
+ m_layer.data()->flushChanges(true);
+
+ // to increase FPS, we use a less accurate caching mechanism while animation is going on
+ // this is a UX choice that should probably be customizable
+ if (newState == QAbstractAnimation::Running) {
+ m_layer.data()->m_transformAnimationRunning = true;
+ if (m_layer.data()->cacheMode() == QGraphicsItem::DeviceCoordinateCache)
+ m_layer.data()->setCacheMode(QGraphicsItem::ItemCoordinateCache);
+ } else {
+ m_layer.data()->m_transformAnimationRunning = false;
+ if (m_layer.data()->cacheMode() == QGraphicsItem::ItemCoordinateCache)
+ m_layer.data()->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
+ }
+ }
+};
+
+class OpacityAnimationQt : public AnimationQt<qreal> {
+public:
+ OpacityAnimationQt(GraphicsLayerQtImpl* layer, const KeyframeValueList& values, const IntSize& boxSize, const Animation* anim, const QString & name)
+ : AnimationQt<qreal>(layer, values, boxSize, anim, name)
+ {
+ }
+
+ virtual void applyFrame(const qreal& fromValue, const qreal& toValue, qreal progress)
+ {
+ m_layer.data()->setOpacity(qMin<qreal>(qMax<qreal>(fromValue + (toValue-fromValue)*progress, 0), 1));
+ }
+
+ virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
+ {
+ QAbstractAnimation::updateState(newState, oldState);
+ if (m_layer)
+ m_layer.data()->m_opacityAnimationRunning = (newState == QAbstractAnimation::Running);
+ }
+};
+
+bool GraphicsLayerQt::addAnimation(const KeyframeValueList& values, const IntSize& boxSize, const Animation* anim, const String& keyframesName, double timeOffset)
+{
+ if (!anim->duration() || !anim->iterationCount())
+ return false;
+
+ QAbstractAnimation* newAnim;
+
+ switch (values.property()) {
+ case AnimatedPropertyOpacity:
+ newAnim = new OpacityAnimationQt(m_impl.get(), values, boxSize, anim, keyframesName);
+ break;
+ case AnimatedPropertyWebkitTransform:
+ newAnim = new TransformAnimationQt(m_impl.get(), values, boxSize, anim, keyframesName);
+ break;
+ default:
+ return false;
+ }
+
+ // we make sure WebCore::Animation and QAnimation are on the same terms
+ newAnim->setLoopCount(anim->iterationCount());
+ m_impl->m_animations.append(QWeakPointer<QAbstractAnimation>(newAnim));
+ QObject::connect(&m_impl->m_suspendTimer, SIGNAL(timeout()), newAnim, SLOT(resume()));
+ timeOffset += anim->delay();
+
+ // flush now or flicker...
+ m_impl->flushChanges(false);
+
+ if (timeOffset)
+ QTimer::singleShot(timeOffset * 1000, newAnim, SLOT(start()));
+ else
+ newAnim->start();
+
+ QObject::connect(newAnim, SIGNAL(finished()), newAnim, SLOT(deleteLater()));
+
+ return true;
+}
+
+void GraphicsLayerQt::removeAnimationsForProperty(AnimatedPropertyID id)
+{
+ for (QList<QWeakPointer<QAbstractAnimation> >::iterator it = m_impl->m_animations.begin(); it != m_impl->m_animations.end(); ++it) {
+ if (*it) {
+ AnimationQtBase* anim = static_cast<AnimationQtBase*>(it->data());
+ if (anim && anim->m_webkitPropertyID == id) {
+ delete anim;
+ it = m_impl->m_animations.erase(it);
+ --it;
+ }
+ }
+ }
+}
+
+void GraphicsLayerQt::removeAnimationsForKeyframes(const String& name)
+{
+ for (QList<QWeakPointer<QAbstractAnimation> >::iterator it = m_impl->m_animations.begin(); it != m_impl->m_animations.end(); ++it) {
+ if (*it) {
+ AnimationQtBase* anim = static_cast<AnimationQtBase*>((*it).data());
+ if (anim && anim->m_keyframesName == QString(name)) {
+ (*it).data()->deleteLater();
+ it = m_impl->m_animations.erase(it);
+ --it;
+ }
+ }
+ }
+}
+
+void GraphicsLayerQt::pauseAnimation(const String& name, double timeOffset)
+{
+ for (QList<QWeakPointer<QAbstractAnimation> >::iterator it = m_impl->m_animations.begin(); it != m_impl->m_animations.end(); ++it) {
+ if (*it) {
+ AnimationQtBase* anim = static_cast<AnimationQtBase*>((*it).data());
+ if (anim && anim->m_keyframesName == QString(name))
+ QTimer::singleShot(timeOffset * 1000, anim, SLOT(pause()));
+ }
+ }
+}
+
+void GraphicsLayerQt::suspendAnimations(double time)
+{
+ if (m_impl->m_suspendTimer.isActive()) {
+ m_impl->m_suspendTimer.stop();
+ m_impl->m_suspendTimer.start(time * 1000);
+ } else {
+ for (QList<QWeakPointer<QAbstractAnimation> >::iterator it = m_impl->m_animations.begin(); it != m_impl->m_animations.end(); ++it) {
+ QAbstractAnimation* anim = it->data();
+ if (anim)
+ anim->pause();
+ }
+ }
+}
+
+void GraphicsLayerQt::resumeAnimations()
+{
+ if (m_impl->m_suspendTimer.isActive()) {
+ m_impl->m_suspendTimer.stop();
+ for (QList<QWeakPointer<QAbstractAnimation> >::iterator it = m_impl->m_animations.begin(); it != m_impl->m_animations.end(); ++it) {
+ QAbstractAnimation* anim = (*it).data();
+ if (anim)
+ anim->resume();
+ }
+ }
+}
+
+}
+
+#include <GraphicsLayerQt.moc>
diff --git a/WebCore/platform/graphics/qt/GraphicsLayerQt.h b/WebCore/platform/graphics/qt/GraphicsLayerQt.h
new file mode 100644
index 0000000..3a53bd9
--- /dev/null
+++ b/WebCore/platform/graphics/qt/GraphicsLayerQt.h
@@ -0,0 +1,85 @@
+/*
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef GraphicsLayerQt_h
+#define GraphicsLayerQt_h
+
+#include "GraphicsLayer.h"
+#include "GraphicsLayerClient.h"
+
+namespace WebCore {
+
+class GraphicsLayerQtImpl;
+
+class GraphicsLayerQt : public GraphicsLayer {
+ friend class GraphicsLayerQtImpl;
+
+public:
+ GraphicsLayerQt(GraphicsLayerClient*);
+ virtual ~GraphicsLayerQt();
+
+ // reimps from GraphicsLayer.h
+ virtual NativeLayer nativeLayer() const;
+ virtual PlatformLayer* platformLayer() const;
+ virtual void setNeedsDisplay();
+ virtual void setNeedsDisplayInRect(const FloatRect&);
+ virtual void setParent(GraphicsLayer* layer);
+ virtual void setName(const String& name);
+ virtual bool setChildren(const Vector<GraphicsLayer*>&);
+ virtual void addChild(GraphicsLayer*);
+ virtual void addChildAtIndex(GraphicsLayer*, int index);
+ virtual void addChildAbove(GraphicsLayer* layer, GraphicsLayer* sibling);
+ virtual void addChildBelow(GraphicsLayer* layer, GraphicsLayer* sibling);
+ virtual bool replaceChild(GraphicsLayer* oldChild, GraphicsLayer* newChild);
+ virtual void removeFromParent();
+ virtual void setMaskLayer(GraphicsLayer* layer);
+ virtual void setPosition(const FloatPoint& p);
+ virtual void setAnchorPoint(const FloatPoint3D& p);
+ virtual void setSize(const FloatSize& size);
+ virtual void setTransform(const TransformationMatrix& t);
+ virtual void setChildrenTransform(const TransformationMatrix& t);
+ virtual void setPreserves3D(bool b);
+ virtual void setMasksToBounds(bool b);
+ virtual void setDrawsContent(bool b);
+ virtual void setBackgroundColor(const Color&);
+ virtual void clearBackgroundColor();
+ virtual void setContentsOpaque(bool b);
+ virtual void setBackfaceVisibility(bool b);
+ virtual void setOpacity(float opacity);
+ virtual void setContentsRect(const IntRect& r);
+ virtual bool addAnimation(const KeyframeValueList&, const IntSize& boxSize, const Animation*, const String& keyframesName, double timeOffset);
+ virtual void removeAnimationsForProperty(AnimatedPropertyID);
+ virtual void removeAnimationsForKeyframes(const String& keyframesName);
+ virtual void pauseAnimation(const String& keyframesName, double timeOffset);
+ virtual void suspendAnimations(double time);
+ virtual void resumeAnimations();
+ virtual void setContentsToImage(Image*);
+ virtual void setContentsBackgroundColor(const Color&);
+ virtual void setGeometryOrientation(CompositingCoordinatesOrientation orientation);
+ virtual void setContentsOrientation(CompositingCoordinatesOrientation orientation);
+ virtual void distributeOpacity(float);
+ virtual float accumulatedOpacity() const;
+ virtual void syncCompositingState();
+
+private:
+ OwnPtr<GraphicsLayerQtImpl> m_impl;
+};
+
+}
+#endif // GraphicsLayerQt_h
diff --git a/WebCore/platform/graphics/qt/ImageBufferQt.cpp b/WebCore/platform/graphics/qt/ImageBufferQt.cpp
index 5255428..d831566 100644
--- a/WebCore/platform/graphics/qt/ImageBufferQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageBufferQt.cpp
@@ -114,7 +114,7 @@ void ImageBuffer::platformTransformColorSpace(const Vector<int>& lookUpTable)
value = qRgba(lookUpTable[qRed(value)],
lookUpTable[qGreen(value)],
lookUpTable[qBlue(value)],
- lookUpTable[qAlpha(value)]);
+ qAlpha(value));
image.setPixel(x, y, value);
}
}
diff --git a/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
index b6823dd..234f78b 100644
--- a/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
@@ -47,16 +47,12 @@ ImageDecoder* ImageDecoder::create(const SharedBuffer& data)
}
ImageDecoderQt::ImageDecoderQt()
- : m_buffer(0)
- , m_reader(0)
- , m_repetitionCount(cAnimationNone)
+ : m_repetitionCount(cAnimationNone)
{
}
ImageDecoderQt::~ImageDecoderQt()
{
- delete m_reader;
- delete m_buffer;
}
void ImageDecoderQt::setData(SharedBuffer* data, bool allDataReceived)
@@ -77,10 +73,16 @@ void ImageDecoderQt::setData(SharedBuffer* data, bool allDataReceived)
// Attempt to load the data
QByteArray imageData = QByteArray::fromRawData(m_data->data(), m_data->size());
- m_buffer = new QBuffer;
+ m_buffer.set(new QBuffer);
m_buffer->setData(imageData);
m_buffer->open(QBuffer::ReadOnly);
- m_reader = new QImageReader(m_buffer, m_format);
+ m_reader.set(new QImageReader(m_buffer.get(), m_format));
+
+ // This will force the JPEG decoder to use JDCT_IFAST
+ m_reader->setQuality(49);
+
+ // QImageReader only allows retrieving the format before reading the image
+ m_format = m_reader->format();
}
bool ImageDecoderQt::isSizeAvailable()
@@ -158,7 +160,6 @@ void ImageDecoderQt::internalDecodeSize()
if (size.isEmpty())
return failRead();
- m_format = m_reader->format();
setSize(size.width(), size.height());
}
@@ -178,10 +179,8 @@ void ImageDecoderQt::internalReadImage(size_t frameIndex)
if (m_frameBufferCache[i].status() != RGBA32Buffer::FrameComplete)
return;
- delete m_reader;
- delete m_buffer;
- m_buffer = 0;
- m_reader = 0;
+ m_reader.clear();
+ m_buffer.clear();
}
void ImageDecoderQt::internalHandleCurrentImage(size_t frameIndex)
@@ -229,10 +228,8 @@ void ImageDecoderQt::forceLoadEverything()
void ImageDecoderQt::failRead()
{
setFailed();
- delete m_reader;
- delete m_buffer;
- m_reader = 0;
- m_buffer = 0;
+ m_reader.clear();
+ m_buffer.clear();
}
}
diff --git a/WebCore/platform/graphics/qt/ImageDecoderQt.h b/WebCore/platform/graphics/qt/ImageDecoderQt.h
index d11b938..be9a9b0 100644
--- a/WebCore/platform/graphics/qt/ImageDecoderQt.h
+++ b/WebCore/platform/graphics/qt/ImageDecoderQt.h
@@ -33,6 +33,7 @@
#include <QtCore/QList>
#include <QtCore/QHash>
#include <QtCore/QBuffer>
+#include <wtf/OwnPtr.h>
namespace WebCore {
@@ -66,8 +67,8 @@ private:
private:
QByteArray m_format;
- QBuffer* m_buffer;
- QImageReader* m_reader;
+ OwnPtr<QBuffer> m_buffer;
+ OwnPtr<QImageReader> m_reader;
mutable int m_repetitionCount;
};
diff --git a/WebCore/platform/graphics/qt/ImageQt.cpp b/WebCore/platform/graphics/qt/ImageQt.cpp
index 9a82911..fea1448 100644
--- a/WebCore/platform/graphics/qt/ImageQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageQt.cpp
@@ -213,7 +213,7 @@ void BitmapImage::checkForSolidColor()
m_solidColor = QColor::fromRgba(framePixmap->toImage().pixel(0, 0));
}
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
PassRefPtr<BitmapImage> BitmapImage::create(HBITMAP hBitmap)
{
return BitmapImage::create(new QPixmap(QPixmap::fromWinHBITMAP(hBitmap)));
diff --git a/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp b/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
index f446755..3274db5 100644
--- a/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
+++ b/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
@@ -38,14 +38,16 @@
#include <QUrl>
#include <QEvent>
-#include <audiooutput.h>
-#include <mediaobject.h>
-#include <videowidget.h>
+#include <phonon/path.h>
+#include <phonon/audiooutput.h>
+#include <phonon/mediaobject.h>
+#include <phonon/videowidget.h>
using namespace Phonon;
#define LOG_MEDIAOBJECT() (LOG(Media, "%s", debugMediaObject(this, *m_mediaObject).constData()))
+#if !LOG_DISABLED
static QByteArray debugMediaObject(WebCore::MediaPlayerPrivate* mediaPlayer, const MediaObject& mediaObject)
{
QByteArray byteArray;
@@ -73,6 +75,7 @@ static QByteArray debugMediaObject(WebCore::MediaPlayerPrivate* mediaPlayer, con
return byteArray;
}
+#endif
using namespace WTF;
@@ -89,9 +92,7 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
{
// Hint to Phonon to disable overlay painting
m_videoWidget->setAttribute(Qt::WA_DontShowOnScreen);
-#if QT_VERSION < 0x040500
m_videoWidget->setAttribute(Qt::WA_QuitOnClose, false);
-#endif
createPath(m_mediaObject, m_videoWidget);
createPath(m_mediaObject, m_audioOutput);
@@ -256,11 +257,6 @@ float MediaPlayerPrivate::currentTime() const
return currentTime;
}
-void MediaPlayerPrivate::setEndTime(float)
-{
- notImplemented();
-}
-
PassRefPtr<TimeRanges> MediaPlayerPrivate::buffered() const
{
notImplemented();
@@ -279,12 +275,6 @@ unsigned MediaPlayerPrivate::bytesLoaded() const
return 0;
}
-bool MediaPlayerPrivate::totalBytesKnown() const
-{
- //notImplemented();
- return false;
-}
-
unsigned MediaPlayerPrivate::totalBytes() const
{
//notImplemented();
@@ -308,14 +298,6 @@ void MediaPlayerPrivate::setMuted(bool muted)
m_audioOutput->setMuted(muted);
}
-
-int MediaPlayerPrivate::dataRate() const
-{
- // This is not used at the moment
- return 0;
-}
-
-
MediaPlayer::NetworkState MediaPlayerPrivate::networkState() const
{
const QMetaObject* metaObj = this->metaObject();
@@ -502,7 +484,7 @@ void MediaPlayerPrivate::aboutToFinish()
void MediaPlayerPrivate::totalTimeChanged(qint64 totalTime)
{
- LOG(Media, "MediaPlayerPrivatePhonon::totalTimeChanged(%d)", totalTime);
+ LOG(Media, "MediaPlayerPrivatePhonon::totalTimeChanged(%lld)", totalTime);
LOG_MEDIAOBJECT();
}
diff --git a/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h b/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h
index e1193b6..e7630a1 100644
--- a/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h
+++ b/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h
@@ -94,21 +94,17 @@ namespace WebCore {
float duration() const;
float currentTime() const;
void seek(float);
- void setEndTime(float);
void setRate(float);
void setVolume(float);
void setMuted(bool);
- int dataRate() const;
-
MediaPlayer::NetworkState networkState() const;
MediaPlayer::ReadyState readyState() const;
PassRefPtr<TimeRanges> buffered() const;
float maxTimeSeekable() const;
unsigned bytesLoaded() const;
- bool totalBytesKnown() const;
unsigned totalBytes() const;
void setVisible(bool);
diff --git a/WebCore/platform/graphics/qt/PathQt.cpp b/WebCore/platform/graphics/qt/PathQt.cpp
index e5cecc8..4716d32 100644
--- a/WebCore/platform/graphics/qt/PathQt.cpp
+++ b/WebCore/platform/graphics/qt/PathQt.cpp
@@ -51,38 +51,32 @@
namespace WebCore {
Path::Path()
- : m_path(new QPainterPath())
{
}
Path::~Path()
{
- delete m_path;
}
Path::Path(const Path& other)
- : m_path(new QPainterPath(*other.platformPath()))
+ : m_path(other.m_path)
{
}
Path& Path::operator=(const Path& other)
{
- if (&other != this) {
- delete m_path;
- m_path = new QPainterPath(*other.platformPath());
- }
-
+ m_path = other.m_path;
return *this;
}
bool Path::contains(const FloatPoint& point, WindRule rule) const
{
- Qt::FillRule savedRule = m_path->fillRule();
- m_path->setFillRule(rule == RULE_EVENODD ? Qt::OddEvenFill : Qt::WindingFill);
+ Qt::FillRule savedRule = m_path.fillRule();
+ const_cast<QPainterPath*>(&m_path)->setFillRule(rule == RULE_EVENODD ? Qt::OddEvenFill : Qt::WindingFill);
- bool contains = m_path->contains(point);
+ bool contains = m_path.contains(point);
- m_path->setFillRule(savedRule);
+ const_cast<QPainterPath*>(&m_path)->setFillRule(savedRule);
return contains;
}
@@ -105,19 +99,19 @@ bool Path::strokeContains(StrokeStyleApplier* applier, const FloatPoint& point)
stroke.setDashPattern(pen.dashPattern());
stroke.setDashOffset(pen.dashOffset());
- return (stroke.createStroke(*platformPath())).contains(point);
+ return stroke.createStroke(m_path).contains(point);
}
void Path::translate(const FloatSize& size)
{
QTransform matrix;
matrix.translate(size.width(), size.height());
- *m_path = (*m_path) * matrix;
+ m_path = m_path * matrix;
}
FloatRect Path::boundingRect() const
{
- return m_path->boundingRect();
+ return m_path.boundingRect();
}
FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier)
@@ -138,35 +132,35 @@ FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier)
stroke.setDashPattern(pen.dashPattern());
stroke.setDashOffset(pen.dashOffset());
}
- return (stroke.createStroke(*platformPath())).boundingRect();
+ return stroke.createStroke(m_path).boundingRect();
}
void Path::moveTo(const FloatPoint& point)
{
- m_path->moveTo(point);
+ m_path.moveTo(point);
}
void Path::addLineTo(const FloatPoint& p)
{
- m_path->lineTo(p);
+ m_path.lineTo(p);
}
void Path::addQuadCurveTo(const FloatPoint& cp, const FloatPoint& p)
{
- m_path->quadTo(cp, p);
+ m_path.quadTo(cp, p);
}
void Path::addBezierCurveTo(const FloatPoint& cp1, const FloatPoint& cp2, const FloatPoint& p)
{
- m_path->cubicTo(cp1, cp2, p);
+ m_path.cubicTo(cp1, cp2, p);
}
void Path::addArcTo(const FloatPoint& p1, const FloatPoint& p2, float radius)
{
- FloatPoint p0(m_path->currentPosition());
+ FloatPoint p0(m_path.currentPosition());
if ((p1.x() == p0.x() && p1.y() == p0.y()) || (p1.x() == p2.x() && p1.y() == p2.y()) || radius == 0.f) {
- m_path->lineTo(p1);
+ m_path.lineTo(p1);
return;
}
@@ -178,7 +172,7 @@ void Path::addArcTo(const FloatPoint& p1, const FloatPoint& p2, float radius)
double cos_phi = (p1p0.x() * p1p2.x() + p1p0.y() * p1p2.y()) / (p1p0_length * p1p2_length);
// all points on a line logic
if (cos_phi == -1) {
- m_path->lineTo(p1);
+ m_path.lineTo(p1);
return;
}
if (cos_phi == 1) {
@@ -186,7 +180,7 @@ void Path::addArcTo(const FloatPoint& p1, const FloatPoint& p2, float radius)
unsigned int max_length = 65535;
double factor_max = max_length / p1p0_length;
FloatPoint ep((p0.x() + factor_max * p1p0.x()), (p0.y() + factor_max * p1p0.y()));
- m_path->lineTo(ep);
+ m_path.lineTo(ep);
return;
}
@@ -226,14 +220,14 @@ void Path::addArcTo(const FloatPoint& p1, const FloatPoint& p2, float radius)
if ((sa < ea) && ((ea - sa) > piDouble))
anticlockwise = true;
- m_path->lineTo(t_p1p0);
+ m_path.lineTo(t_p1p0);
addArc(p, radius, sa, ea, anticlockwise);
}
void Path::closeSubpath()
{
- m_path->closeSubpath();
+ m_path.closeSubpath();
}
#define DEGREES(t) ((t) * 180.0 / M_PI)
@@ -275,32 +269,32 @@ void Path::addArc(const FloatPoint& p, float r, float sar, float ear, bool antic
span += ea - sa;
}
- m_path->moveTo(QPointF(xc + radius * cos(sar),
+ m_path.moveTo(QPointF(xc + radius * cos(sar),
yc - radius * sin(sar)));
- m_path->arcTo(xs, ys, width, height, sa, span);
+ m_path.arcTo(xs, ys, width, height, sa, span);
}
void Path::addRect(const FloatRect& r)
{
- m_path->addRect(r.x(), r.y(), r.width(), r.height());
+ m_path.addRect(r.x(), r.y(), r.width(), r.height());
}
void Path::addEllipse(const FloatRect& r)
{
- m_path->addEllipse(r.x(), r.y(), r.width(), r.height());
+ m_path.addEllipse(r.x(), r.y(), r.width(), r.height());
}
void Path::clear()
{
- *m_path = QPainterPath();
+ m_path = QPainterPath();
}
bool Path::isEmpty() const
{
// Don't use QPainterPath::isEmpty(), as that also returns true if there's only
// one initial MoveTo element in the path.
- return !m_path->elementCount();
+ return !m_path.elementCount();
}
bool Path::hasCurrentPoint() const
@@ -311,8 +305,8 @@ bool Path::hasCurrentPoint() const
String Path::debugString() const
{
QString ret;
- for (int i = 0; i < m_path->elementCount(); ++i) {
- const QPainterPath::Element &cur = m_path->elementAt(i);
+ for (int i = 0; i < m_path.elementCount(); ++i) {
+ const QPainterPath::Element &cur = m_path.elementAt(i);
switch (cur.type) {
case QPainterPath::MoveToElement:
@@ -323,8 +317,8 @@ String Path::debugString() const
break;
case QPainterPath::CurveToElement:
{
- const QPainterPath::Element &c1 = m_path->elementAt(i + 1);
- const QPainterPath::Element &c2 = m_path->elementAt(i + 2);
+ const QPainterPath::Element &c1 = m_path.elementAt(i + 1);
+ const QPainterPath::Element &c2 = m_path.elementAt(i + 2);
Q_ASSERT(c1.type == QPainterPath::CurveToDataElement);
Q_ASSERT(c2.type == QPainterPath::CurveToDataElement);
@@ -348,8 +342,8 @@ void Path::apply(void* info, PathApplierFunction function) const
PathElement pelement;
FloatPoint points[3];
pelement.points = points;
- for (int i = 0; i < m_path->elementCount(); ++i) {
- const QPainterPath::Element& cur = m_path->elementAt(i);
+ for (int i = 0; i < m_path.elementCount(); ++i) {
+ const QPainterPath::Element& cur = m_path.elementAt(i);
switch (cur.type) {
case QPainterPath::MoveToElement:
@@ -364,8 +358,8 @@ void Path::apply(void* info, PathApplierFunction function) const
break;
case QPainterPath::CurveToElement:
{
- const QPainterPath::Element& c1 = m_path->elementAt(i + 1);
- const QPainterPath::Element& c2 = m_path->elementAt(i + 2);
+ const QPainterPath::Element& c1 = m_path.elementAt(i + 1);
+ const QPainterPath::Element& c2 = m_path.elementAt(i + 2);
Q_ASSERT(c1.type == QPainterPath::CurveToDataElement);
Q_ASSERT(c2.type == QPainterPath::CurveToDataElement);
@@ -387,12 +381,7 @@ void Path::apply(void* info, PathApplierFunction function) const
void Path::transform(const TransformationMatrix& transform)
{
- if (m_path) {
- QTransform mat = transform;
- QPainterPath temp = mat.map(*m_path);
- delete m_path;
- m_path = new QPainterPath(temp);
- }
+ m_path = QTransform(transform).map(m_path);
}
}
diff --git a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
index f1536a6..985442c 100644
--- a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
@@ -86,7 +86,10 @@ inline float square(float n)
// Ideally, all of these would be fixed in the graphics layer and we would not
// have to do any checking. You can uncomment the ENSURE_VALUE_SAFETY_FOR_SKIA
// flag to check the graphics layer.
-#define ENSURE_VALUE_SAFETY_FOR_SKIA
+
+// Disabling these checks (20/01/2010), since we think we've fixed all the Skia
+// bugs. Leaving the code in for now, so we can revert easily if necessary.
+// #define ENSURE_VALUE_SAFETY_FOR_SKIA
static bool isCoordinateSkiaSafe(float coord)
{
@@ -431,7 +434,7 @@ void GraphicsContext::clipToImageBuffer(const FloatRect& rect,
if (paintingDisabled())
return;
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
platformContext()->beginLayerClippedToImage(rect, imageBuffer);
#endif
}
@@ -498,12 +501,16 @@ void GraphicsContext::drawEllipse(const IntRect& elipseRect)
}
}
-void GraphicsContext::drawFocusRing(const Color& color)
+void GraphicsContext::drawFocusRing(const Vector<Path>& paths, int width, int offset, const Color& color)
+{
+ // FIXME: implement
+}
+
+void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int /* width */, int /* offset */, const Color& color)
{
if (paintingDisabled())
return;
- const Vector<IntRect>& rects = focusRingRects();
unsigned rectCount = rects.size();
if (!rectCount)
return;
diff --git a/WebCore/platform/graphics/skia/ImageBufferSkia.cpp b/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
index c36f1ce..4ea3d7a 100644
--- a/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
+++ b/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
@@ -66,7 +66,7 @@ ImageBuffer::ImageBuffer(const IntSize& size, ImageColorSpace imageColorSpace, b
m_data.m_platformContext.setCanvas(&m_data.m_canvas);
m_context.set(new GraphicsContext(&m_data.m_platformContext));
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
m_context->platformContext()->setDrawingToImageBuffer(true);
#endif
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
index dfffa0d..92a1870 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
@@ -89,7 +89,7 @@ struct PlatformContextSkia::State {
// color to produce a new output color.
SkColor applyAlpha(SkColor) const;
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
// If non-empty, the current State is clipped to this image.
SkBitmap m_imageBufferClip;
// If m_imageBufferClip is non-empty, this is the region the image is clipped to.
@@ -143,7 +143,7 @@ PlatformContextSkia::State::State(const State& other)
, m_lineJoin(other.m_lineJoin)
, m_dash(other.m_dash)
, m_textDrawingMode(other.m_textDrawingMode)
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
, m_imageBufferClip(other.m_imageBufferClip)
, m_clip(other.m_clip)
#endif
@@ -180,7 +180,7 @@ SkColor PlatformContextSkia::State::applyAlpha(SkColor c) const
// Danger: canvas can be NULL.
PlatformContextSkia::PlatformContextSkia(skia::PlatformCanvas* canvas)
: m_canvas(canvas)
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
, m_drawingToImageBuffer(false)
#endif
{
@@ -197,7 +197,7 @@ void PlatformContextSkia::setCanvas(skia::PlatformCanvas* canvas)
m_canvas = canvas;
}
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
void PlatformContextSkia::setDrawingToImageBuffer(bool value)
{
m_drawingToImageBuffer = value;
@@ -214,7 +214,7 @@ void PlatformContextSkia::save()
m_stateStack.append(*m_state);
m_state = &m_stateStack.last();
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
// The clip image only needs to be applied once. Reset the image so that we
// don't attempt to clip multiple times.
m_state->m_imageBufferClip.reset();
@@ -224,7 +224,7 @@ void PlatformContextSkia::save()
canvas()->save();
}
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
void PlatformContextSkia::beginLayerClippedToImage(const WebCore::FloatRect& rect,
const WebCore::ImageBuffer* imageBuffer)
{
@@ -234,7 +234,8 @@ void PlatformContextSkia::beginLayerClippedToImage(const WebCore::FloatRect& rec
m_state->m_clip = rect;
SkRect bounds = { SkFloatToScalar(rect.x()), SkFloatToScalar(rect.y()),
SkFloatToScalar(rect.right()), SkFloatToScalar(rect.bottom()) };
-
+
+ canvas()->clipRect(bounds);
canvas()->saveLayerAlpha(&bounds, 255,
static_cast<SkCanvas::SaveFlags>(SkCanvas::kHasAlphaLayer_SaveFlag | SkCanvas::kFullColorLayer_SaveFlag));
// Copy off the image as |imageBuffer| may be deleted before restore is invoked.
@@ -271,7 +272,7 @@ void PlatformContextSkia::clipPathAntiAliased(const SkPath& clipPath)
void PlatformContextSkia::restore()
{
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
if (!m_state->m_imageBufferClip.empty()) {
applyClipFromImage(m_state->m_clip, m_state->m_imageBufferClip);
canvas()->restore();
@@ -574,7 +575,7 @@ bool PlatformContextSkia::isPrinting()
return m_canvas->getTopPlatformDevice().IsVectorial();
}
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
void PlatformContextSkia::applyClipFromImage(const WebCore::FloatRect& rect, const SkBitmap& imageBuffer)
{
// NOTE: this assumes the image mask contains opaque black for the portions that are to be shown, as such we
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.h b/WebCore/platform/graphics/skia/PlatformContextSkia.h
index 53590bf..e445262 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.h
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.h
@@ -71,7 +71,7 @@ public:
// to the constructor.
void setCanvas(skia::PlatformCanvas*);
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// If false we're rendering to a GraphicsContext for a web page, if false
// we're not (as is the case when rendering to a canvas object).
// If this is true the contents have not been marked up with the magic
@@ -88,7 +88,7 @@ public:
// |rect|. This layer is implicitly restored when the next restore is
// invoked.
// NOTE: |imageBuffer| may be deleted before the |restore| is invoked.
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
void beginLayerClippedToImage(const WebCore::FloatRect&,
const WebCore::ImageBuffer*);
#endif
@@ -168,7 +168,7 @@ public:
bool isPrinting();
private:
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
// Used when restoring and the state has an image clip. Only shows the pixels in
// m_canvas that are also in imageBuffer.
void applyClipFromImage(const WebCore::FloatRect&, const SkBitmap&);
@@ -191,7 +191,7 @@ private:
// Current path in global coordinates.
SkPath m_path;
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
bool m_drawingToImageBuffer;
#endif
};
diff --git a/WebCore/platform/graphics/transforms/TransformationMatrix.h b/WebCore/platform/graphics/transforms/TransformationMatrix.h
index 802ad3c..9e724d5 100644
--- a/WebCore/platform/graphics/transforms/TransformationMatrix.h
+++ b/WebCore/platform/graphics/transforms/TransformationMatrix.h
@@ -35,6 +35,8 @@
#include <CoreGraphics/CGAffineTransform.h>
#elif PLATFORM(CAIRO)
#include <cairo.h>
+#elif PLATFORM(OPENVG)
+#include "VGUtils.h"
#elif PLATFORM(QT)
#include <QTransform>
#elif PLATFORM(SKIA)
@@ -43,6 +45,14 @@
#include <wx/graphics.h>
#endif
+#if PLATFORM(WIN) || (PLATFORM(QT) && OS(WINDOWS)) || (PLATFORM(WX) && OS(WINDOWS))
+#if COMPILER(MINGW)
+typedef struct _XFORM XFORM;
+#else
+typedef struct tagXFORM XFORM;
+#endif
+#endif
+
namespace WebCore {
class IntRect;
@@ -299,6 +309,8 @@ public:
operator CGAffineTransform() const;
#elif PLATFORM(CAIRO)
operator cairo_matrix_t() const;
+#elif PLATFORM(OPENVG)
+ operator VGMatrix() const;
#elif PLATFORM(QT)
operator QTransform() const;
#elif PLATFORM(SKIA)
@@ -307,31 +319,31 @@ public:
operator wxGraphicsMatrix() const;
#endif
-#if PLATFORM(WIN)
+#if PLATFORM(WIN) || (PLATFORM(QT) && OS(WINDOWS)) || (PLATFORM(WX) && OS(WINDOWS))
operator XFORM() const;
#endif
+ bool isIdentityOrTranslation() const
+ {
+ return m_matrix[0][0] == 1 && m_matrix[0][1] == 0 && m_matrix[0][2] == 0 && m_matrix[0][3] == 0
+ && m_matrix[1][0] == 0 && m_matrix[1][1] == 1 && m_matrix[1][2] == 0 && m_matrix[1][3] == 0
+ && m_matrix[2][0] == 0 && m_matrix[2][1] == 0 && m_matrix[2][2] == 1 && m_matrix[2][3] == 0
+ && m_matrix[3][3] == 1;
+ }
+
private:
// multiply passed 2D point by matrix (assume z=0)
void multVecMatrix(double x, double y, double& dstX, double& dstY) const;
-
+
// multiply passed 3D point by matrix
void multVecMatrix(double x, double y, double z, double& dstX, double& dstY, double& dstZ) const;
-
+
void setMatrix(const Matrix4 m)
{
if (m && m != m_matrix)
memcpy(m_matrix, m, sizeof(Matrix4));
}
-
- bool isIdentityOrTranslation() const
- {
- return m_matrix[0][0] == 1 && m_matrix[0][1] == 0 && m_matrix[0][2] == 0 && m_matrix[0][3] == 0 &&
- m_matrix[1][0] == 0 && m_matrix[1][1] == 1 && m_matrix[1][2] == 0 && m_matrix[1][3] == 0 &&
- m_matrix[2][0] == 0 && m_matrix[2][1] == 0 && m_matrix[2][2] == 1 && m_matrix[2][3] == 0 &&
- m_matrix[3][3] == 1;
- }
-
+
Matrix4 m_matrix;
};
diff --git a/WebCore/platform/graphics/win/FontCGWin.cpp b/WebCore/platform/graphics/win/FontCGWin.cpp
index e901669..653b573 100644
--- a/WebCore/platform/graphics/win/FontCGWin.cpp
+++ b/WebCore/platform/graphics/win/FontCGWin.cpp
@@ -322,7 +322,8 @@ void Font::drawGlyphs(GraphicsContext* graphicsContext, const SimpleFontData* fo
}
if (font->platformData().useGDI()) {
- if (!shouldUseFontSmoothing || (graphicsContext->textDrawingMode() & cTextStroke)) {
+ static bool canCreateCGFontWithLOGFONT = wkCanCreateCGFontWithLOGFONT();
+ if (!shouldUseFontSmoothing || !canCreateCGFontWithLOGFONT && (graphicsContext->textDrawingMode() & cTextStroke)) {
drawGDIGlyphs(graphicsContext, font, glyphBuffer, from, numGlyphs, point);
return;
}
diff --git a/WebCore/platform/graphics/win/FontCacheWin.cpp b/WebCore/platform/graphics/win/FontCacheWin.cpp
index 8663623..5e61ef3 100644
--- a/WebCore/platform/graphics/win/FontCacheWin.cpp
+++ b/WebCore/platform/graphics/win/FontCacheWin.cpp
@@ -399,7 +399,7 @@ static int CALLBACK matchImprovingEnumProc(CONST LOGFONT* candidate, CONST TEXTM
return 1;
}
-static HFONT createGDIFont(const AtomicString& family, LONG desiredWeight, bool desiredItalic, int size)
+static HFONT createGDIFont(const AtomicString& family, LONG desiredWeight, bool desiredItalic, int size, bool synthesizeItalic)
{
HDC hdc = GetDC(0);
@@ -433,6 +433,9 @@ static HFONT createGDIFont(const AtomicString& family, LONG desiredWeight, bool
matchData.m_chosen.lfQuality = DEFAULT_QUALITY;
matchData.m_chosen.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
+ if (desiredItalic && !matchData.m_chosen.lfItalic && synthesizeItalic)
+ matchData.m_chosen.lfItalic = 1;
+
HFONT result = CreateFontIndirect(&matchData.m_chosen);
if (!result)
return 0;
@@ -514,8 +517,14 @@ FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontD
// This masks rounding errors related to the HFONT metrics being different from the CGFont metrics.
// FIXME: We will eventually want subpixel precision for GDI mode, but the scaled rendering doesn't
// look as nice. That may be solvable though.
+#if PLATFORM(CG)
+ bool canCreateCGFontWithLOGFONT = wkCanCreateCGFontWithLOGFONT();
+#else
+ bool canCreateCGFontWithLOGFONT = true;
+#endif
LONG weight = adjustedGDIFontWeight(toGDIFontWeight(fontDescription.weight()), family);
- HFONT hfont = createGDIFont(family, weight, fontDescription.italic(), fontDescription.computedPixelSize() * (useGDI ? 1 : 32));
+ HFONT hfont = createGDIFont(family, weight, fontDescription.italic(),
+ fontDescription.computedPixelSize() * (useGDI ? 1 : 32), useGDI && canCreateCGFontWithLOGFONT);
if (!hfont)
return 0;
diff --git a/WebCore/platform/graphics/win/FontCustomPlatformData.cpp b/WebCore/platform/graphics/win/FontCustomPlatformData.cpp
index 24db173..b2d1b32 100644
--- a/WebCore/platform/graphics/win/FontCustomPlatformData.cpp
+++ b/WebCore/platform/graphics/win/FontCustomPlatformData.cpp
@@ -61,7 +61,7 @@ FontCustomPlatformData::~FontCustomPlatformData()
FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontRenderingMode renderingMode)
{
- ASSERT(m_cgFont);
+ ASSERT(wkCanCreateCGFontWithLOGFONT() || m_cgFont);
ASSERT(m_fontReference);
ASSERT(T2embedLibrary());
@@ -87,6 +87,12 @@ FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, b
logFont.lfWeight = bold ? 700 : 400;
HFONT hfont = CreateFontIndirect(&logFont);
+
+ if (wkCanCreateCGFontWithLOGFONT()) {
+ RetainPtr<CGFontRef> cgFont(AdoptCF, CGFontCreateWithPlatformFont(&logFont));
+ return FontPlatformData(hfont, cgFont.get(), size, bold, italic, renderingMode == AlternateRenderingMode);
+ }
+
wkSetFontPlatformInfo(m_cgFont, &logFont, free);
return FontPlatformData(hfont, m_cgFont, size, bold, italic, renderingMode == AlternateRenderingMode);
}
@@ -190,12 +196,15 @@ FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
ASSERT_ARG(buffer, buffer);
ASSERT(T2embedLibrary());
- // Get CG to create the font.
- CGDataProviderDirectAccessCallbacks callbacks = { &getData, &releaseData, &getBytesWithOffset, NULL };
- RetainPtr<CGDataProviderRef> dataProvider(AdoptCF, CGDataProviderCreateDirectAccess(buffer, buffer->size(), &callbacks));
- CGFontRef cgFont = CGFontCreateWithDataProvider(dataProvider.get());
- if (!cgFont)
- return 0;
+ RetainPtr<CGFontRef> cgFont;
+ if (!wkCanCreateCGFontWithLOGFONT()) {
+ // Get CG to create the font.
+ CGDataProviderDirectAccessCallbacks callbacks = { &getData, &releaseData, &getBytesWithOffset, NULL };
+ RetainPtr<CGDataProviderRef> dataProvider(AdoptCF, CGDataProviderCreateDirectAccess(buffer, buffer->size(), &callbacks));
+ cgFont.adoptCF(CGFontCreateWithDataProvider(dataProvider.get()));
+ if (!cgFont)
+ return 0;
+ }
// Introduce the font to GDI. AddFontMemResourceEx cannot be used, because it will pollute the process's
// font namespace (Windows has no API for creating an HFONT from data without exposing the font to the
@@ -210,10 +219,8 @@ FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
size_t overlayDst;
size_t overlaySrc;
size_t overlayLength;
- if (!getEOTHeader(buffer, eotHeader, overlayDst, overlaySrc, overlayLength)) {
- CGFontRelease(cgFont);
+ if (!getEOTHeader(buffer, eotHeader, overlayDst, overlaySrc, overlayLength))
return 0;
- }
HANDLE fontReference;
ULONG privStatus;
@@ -225,13 +232,11 @@ FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
fontName = String();
else {
fontReference = renameAndActivateFont(buffer, fontName);
- if (!fontReference) {
- CGFontRelease(cgFont);
+ if (!fontReference)
return 0;
- }
}
- return new FontCustomPlatformData(cgFont, fontReference, fontName);
+ return new FontCustomPlatformData(cgFont.releaseRef(), fontReference, fontName);
}
}
diff --git a/WebCore/platform/graphics/win/FontDatabase.cpp b/WebCore/platform/graphics/win/FontDatabase.cpp
index d0773ea..22ad4a6 100644
--- a/WebCore/platform/graphics/win/FontDatabase.cpp
+++ b/WebCore/platform/graphics/win/FontDatabase.cpp
@@ -188,6 +188,9 @@ void populateFontDatabase()
return;
initialized = true;
+ if (wkCanCreateCGFontWithLOGFONT())
+ return;
+
RetainPtr<CFPropertyListRef> propertyList = readFontPlist();
RetainPtr<CFArrayRef> lastFilenamesFromRegistry;
if (propertyList && CFGetTypeID(propertyList.get()) == CFDictionaryGetTypeID()) {
diff --git a/WebCore/platform/graphics/win/FontPlatformDataCGWin.cpp b/WebCore/platform/graphics/win/FontPlatformDataCGWin.cpp
index a92e367..d605cf9 100644
--- a/WebCore/platform/graphics/win/FontPlatformDataCGWin.cpp
+++ b/WebCore/platform/graphics/win/FontPlatformDataCGWin.cpp
@@ -109,6 +109,13 @@ static CFStringRef getPostScriptName(CFStringRef faceName, HDC dc)
void FontPlatformData::platformDataInit(HFONT font, float size, HDC hdc, WCHAR* faceName)
{
+ if (wkCanCreateCGFontWithLOGFONT()) {
+ LOGFONT logfont;
+ GetObject(font, sizeof(logfont), &logfont);
+ m_cgFont.adoptCF(CGFontCreateWithPlatformFont(&logfont));
+ return;
+ }
+
// Try the face name first. Windows may end up localizing this name, and CG doesn't know about
// the localization. If the create fails, we'll try the PostScript name.
RetainPtr<CFStringRef> fullName(AdoptCF, CFStringCreateWithCharacters(NULL, (const UniChar*)faceName, wcslen(faceName)));
diff --git a/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp b/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
index 137b914..47a51de 100644
--- a/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
+++ b/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
@@ -124,17 +124,21 @@ void GraphicsContext::drawWindowsBitmap(WindowsBitmap* image, const IntPoint& po
CGContextDrawImage(m_data->m_cgContext.get(), CGRectMake(point.x(), point.y(), image->size().width(), image->size().height()), cgImage.get());
}
-void GraphicsContext::drawFocusRing(const Color& color)
+void GraphicsContext::drawFocusRing(const Vector<Path>& paths, int width, int offset, const Color& color)
+{
+ // FIXME: implement
+}
+
+void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int width, int offset, const Color& color)
{
if (paintingDisabled())
return;
- float radius = (focusRingWidth() - 1) / 2.0f;
- int offset = radius + focusRingOffset();
+ float radius = (width - 1) / 2.0f;
+ offset += radius;
CGColorRef colorRef = color.isValid() ? createCGColor(color) : 0;
CGMutablePathRef focusRingPath = CGPathCreateMutable();
- const Vector<IntRect>& rects = focusRingRects();
unsigned rectCount = rects.size();
for (unsigned i = 0; i < rectCount; i++)
CGPathAddRect(focusRingPath, 0, CGRectInset(rects[i], -offset, -offset));
diff --git a/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp b/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp
index 61ae76c..43d92fb 100644
--- a/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp
+++ b/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp
@@ -40,21 +40,26 @@ static cairo_t* createCairoContextWithHDC(HDC hdc, bool hasAlpha)
{
// Put the HDC In advanced mode so it will honor affine transforms.
SetGraphicsMode(hdc, GM_ADVANCED);
-
+
+ cairo_surface_t* surface = 0;
+
HBITMAP bitmap = static_cast<HBITMAP>(GetCurrentObject(hdc, OBJ_BITMAP));
BITMAP info;
- GetObject(bitmap, sizeof(info), &info);
- ASSERT(info.bmBitsPixel == 32);
+ if (!GetObject(bitmap, sizeof(info), &info))
+ surface = cairo_win32_surface_create(hdc);
+ else {
+ ASSERT(info.bmBitsPixel == 32);
- cairo_surface_t* image = cairo_image_surface_create_for_data((unsigned char*)info.bmBits,
+ surface = cairo_image_surface_create_for_data((unsigned char*)info.bmBits,
CAIRO_FORMAT_ARGB32,
info.bmWidth,
info.bmHeight,
info.bmWidthBytes);
+ }
- cairo_t* context = cairo_create(image);
- cairo_surface_destroy(image);
+ cairo_t* context = cairo_create(surface);
+ cairo_surface_destroy(surface);
return context;
}
diff --git a/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp b/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
index 22faeb8..5ec90b8 100644
--- a/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
+++ b/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
@@ -36,6 +36,7 @@
#include "PlatformString.h"
#include "SystemTime.h"
#include "WKCACFLayer.h"
+#include <QuartzCoreInterface/QuartzCoreInterface.h>
#include <wtf/CurrentTime.h>
#include <wtf/StringExtras.h>
@@ -123,7 +124,7 @@ GraphicsLayerCACF::GraphicsLayerCACF(GraphicsLayerClient* client)
, m_contentsLayerPurpose(NoContentsLayer)
, m_contentsLayerHasBackgroundColor(false)
{
- m_layer = WKCACFLayer::create(kCACFLayer, this);
+ m_layer = WKCACFLayer::create(WKCACFLayer::Layer, this);
updateDebugIndicators();
}
@@ -536,7 +537,7 @@ void GraphicsLayerCACF::updateLayerPreserves3D()
{
if (m_preserves3D && !m_transformLayer) {
// Create the transform layer.
- m_transformLayer = WKCACFLayer::create(kCACFTransformLayer, this);
+ m_transformLayer = WKCACFLayer::create(WKCACFLayer::TransformLayer, this);
#ifndef NDEBUG
m_transformLayer->setName(String().format("Transform Layer CATransformLayer(%p) GraphicsLayer(%p)", m_transformLayer.get(), this));
@@ -552,7 +553,7 @@ void GraphicsLayerCACF::updateLayerPreserves3D()
m_layer->setPosition(point);
m_layer->setAnchorPoint(CGPointMake(0.5f, 0.5f));
- m_layer->setTransform(CATransform3DIdentity);
+ m_layer->setTransform(wkqcCATransform3DIdentity());
// Set the old layer to opacity of 1. Further down we will set the opacity on the transform layer.
m_layer->setOpacity(1);
@@ -609,7 +610,7 @@ void GraphicsLayerCACF::updateContentsImage()
{
if (m_pendingContentsImage) {
if (!m_contentsLayer.get()) {
- RefPtr<WKCACFLayer> imageLayer = WKCACFLayer::create(kCACFLayer, this);
+ RefPtr<WKCACFLayer> imageLayer = WKCACFLayer::create(WKCACFLayer::Layer, this);
#ifndef NDEBUG
imageLayer->setName("Image Layer");
#endif
@@ -620,7 +621,7 @@ void GraphicsLayerCACF::updateContentsImage()
// FIXME: maybe only do trilinear if the image is being scaled down,
// but then what if the layer size changes?
- m_contentsLayer->setMinificationFilter(kCACFFilterTrilinear);
+ m_contentsLayer->setMinificationFilter(WKCACFLayer::Trilinear);
m_contentsLayer->setContents(m_pendingContentsImage.get());
m_pendingContentsImage = 0;
diff --git a/WebCore/platform/graphics/win/IconWin.cpp b/WebCore/platform/graphics/win/IconWin.cpp
index d71ca00..56b46de 100644
--- a/WebCore/platform/graphics/win/IconWin.cpp
+++ b/WebCore/platform/graphics/win/IconWin.cpp
@@ -27,7 +27,7 @@
#include <tchar.h>
#include <windows.h>
-#if PLATFORM(WINCE)
+#if OS(WINCE)
// SHGFI_SHELLICONSIZE is not available on WINCE
#define SHGFI_SHELLICONSIZE 0
#endif
@@ -63,7 +63,7 @@ PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames)
return adoptRef(new Icon(sfi.hIcon));
}
-#if PLATFORM(WINCE)
+#if OS(WINCE)
return 0;
#else
TCHAR buffer[MAX_PATH];
@@ -86,7 +86,7 @@ void Icon::paint(GraphicsContext* context, const IntRect& r)
if (context->paintingDisabled())
return;
-#if PLATFORM(WINCE)
+#if OS(WINCE)
context->drawIcon(m_hIcon, r, DI_NORMAL);
#else
HDC hdc = context->getWindowsContext(r);
diff --git a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp
index a5beea1..b2fe069 100644
--- a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp
+++ b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009 Apple, Inc. All rights reserved.
+ * Copyright (C) 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
@@ -35,10 +35,16 @@
#include "StringHash.h"
#include "TimeRanges.h"
#include "Timer.h"
+#include <wtf/CurrentTime.h>
#include <wtf/HashSet.h>
#include <wtf/MathExtras.h>
#include <wtf/StdLibExtras.h>
+#if USE(ACCELERATED_COMPOSITING)
+#include "GraphicsLayerCACF.h"
+#include "WKCACFLayer.h"
+#endif
+
#if DRAW_FRAME_RATE
#include "Font.h"
#include "FrameView.h"
@@ -67,7 +73,6 @@ void MediaPlayerPrivate::registerMediaEngine(MediaEngineRegistrar registrar)
MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
: m_player(player)
, m_seekTo(-1)
- , m_endTime(numeric_limits<float>::infinity())
, m_seekTimer(this, &MediaPlayerPrivate::seekTimerFired)
, m_networkState(MediaPlayer::Empty)
, m_readyState(MediaPlayer::HaveNothing)
@@ -76,6 +81,8 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
, m_hasUnsupportedTracks(false)
, m_startedPlaying(false)
, m_isStreaming(false)
+ , m_visible(false)
+ , m_newFrameAvailable(false)
#if DRAW_FRAME_RATE
, m_frameCountWhilePlaying(0)
, m_timeStartedPlaying(0)
@@ -86,6 +93,19 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
MediaPlayerPrivate::~MediaPlayerPrivate()
{
+ tearDownVideoRendering();
+}
+
+bool MediaPlayerPrivate::supportsFullscreen() const
+{
+ return true;
+}
+
+PlatformMedia MediaPlayerPrivate::platformMedia() const
+{
+ PlatformMedia p;
+ p.qtMovie = reinterpret_cast<QTMovie*>(m_qtMovie.get());
+ return p;
}
class TaskTimer : TimerBase {
@@ -178,7 +198,7 @@ void MediaPlayerPrivate::pause()
return;
m_startedPlaying = false;
#if DRAW_FRAME_RATE
- m_timeStoppedPlaying = GetTickCount();
+ m_timeStoppedPlaying = WTF::currentTime();
#endif
m_qtMovie->pause();
}
@@ -194,7 +214,7 @@ float MediaPlayerPrivate::currentTime() const
{
if (!m_qtMovie)
return 0;
- return min(m_qtMovie->currentTime(), m_endTime);
+ return m_qtMovie->currentTime();
}
void MediaPlayerPrivate::seek(float time)
@@ -222,7 +242,7 @@ void MediaPlayerPrivate::doSeek()
m_qtMovie->setCurrentTime(m_seekTo);
float timeAfterSeek = currentTime();
// restore playback only if not at end, othewise QTMovie will loop
- if (oldRate && timeAfterSeek < duration() && timeAfterSeek < m_endTime)
+ if (oldRate && timeAfterSeek < duration())
m_qtMovie->setRate(oldRate);
cancelSeek();
}
@@ -254,11 +274,6 @@ void MediaPlayerPrivate::seekTimerFired(Timer<MediaPlayerPrivate>*)
}
}
-void MediaPlayerPrivate::setEndTime(float time)
-{
- m_endTime = time;
-}
-
bool MediaPlayerPrivate::paused() const
{
if (!m_qtMovie)
@@ -332,12 +347,6 @@ void MediaPlayerPrivate::setClosedCaptionsVisible(bool visible)
m_qtMovie->setClosedCaptionsVisible(visible);
}
-int MediaPlayerPrivate::dataRate() const
-{
- // This is not used at the moment
- return 0;
-}
-
PassRefPtr<TimeRanges> MediaPlayerPrivate::buffered() const
{
RefPtr<TimeRanges> timeRanges = TimeRanges::create();
@@ -372,11 +381,6 @@ unsigned MediaPlayerPrivate::bytesLoaded() const
return totalBytes() * maxTime / dur;
}
-bool MediaPlayerPrivate::totalBytesKnown() const
-{
- return totalBytes() > 0;
-}
-
unsigned MediaPlayerPrivate::totalBytes() const
{
if (!m_qtMovie)
@@ -389,9 +393,11 @@ void MediaPlayerPrivate::cancelLoad()
if (m_networkState < MediaPlayer::Loading || m_networkState == MediaPlayer::Loaded)
return;
+ tearDownVideoRendering();
+
// Cancel the load by destroying the movie.
m_qtMovie.clear();
-
+
updateStates();
}
@@ -454,6 +460,9 @@ void MediaPlayerPrivate::updateStates()
}
}
+ if (isReadyForRendering() && !hasSetUpVideoRendering())
+ setUpVideoRendering();
+
if (seeking())
m_readyState = MediaPlayer::HaveNothing;
@@ -463,6 +472,11 @@ void MediaPlayerPrivate::updateStates()
m_player->readyStateChanged();
}
+bool MediaPlayerPrivate::isReadyForRendering() const
+{
+ return m_readyState >= MediaPlayer::HaveMetadata && m_player->visible();
+}
+
void MediaPlayerPrivate::sawUnsupportedTracks()
{
m_qtMovie->setDisabled(true);
@@ -477,7 +491,7 @@ void MediaPlayerPrivate::didEnd()
m_startedPlaying = false;
#if DRAW_FRAME_RATE
- m_timeStoppedPlaying = GetTickCount();
+ m_timeStoppedPlaying = WTF::currentTime();
#endif
updateStates();
m_player->timeChanged();
@@ -485,20 +499,32 @@ void MediaPlayerPrivate::didEnd()
void MediaPlayerPrivate::setSize(const IntSize& size)
{
- if (m_hasUnsupportedTracks || !m_qtMovie)
+ if (m_hasUnsupportedTracks || !m_qtMovie || m_size == size)
return;
+ m_size = size;
m_qtMovie->setSize(size.width(), size.height());
}
-void MediaPlayerPrivate::setVisible(bool b)
+void MediaPlayerPrivate::setVisible(bool visible)
{
- if (m_hasUnsupportedTracks || !m_qtMovie)
+ if (m_hasUnsupportedTracks || !m_qtMovie || m_visible == visible)
return;
- m_qtMovie->setVisible(b);
+
+ m_qtMovie->setVisible(visible);
+ m_visible = visible;
+ if (m_visible) {
+ if (isReadyForRendering())
+ setUpVideoRendering();
+ } else
+ tearDownVideoRendering();
}
void MediaPlayerPrivate::paint(GraphicsContext* p, const IntRect& r)
{
+#if USE(ACCELERATED_COMPOSITING)
+ if (m_qtVideoLayer)
+ return;
+#endif
if (p->paintingDisabled() || !m_qtMovie || m_hasUnsupportedTracks)
return;
@@ -529,28 +555,50 @@ void MediaPlayerPrivate::paint(GraphicsContext* p, const IntRect& r)
else
p->releaseWindowsContext(hdc, r);
+ paintCompleted(*p, r);
+}
+
+void MediaPlayerPrivate::paintCompleted(GraphicsContext& context, const IntRect& rect)
+{
+ m_newFrameAvailable = false;
+
#if DRAW_FRAME_RATE
if (m_frameCountWhilePlaying > 10) {
- Frame* frame = m_player->frameView() ? m_player->frameView()->frame() : NULL;
- Document* document = frame ? frame->document() : NULL;
- RenderObject* renderer = document ? document->renderer() : NULL;
- RenderStyle* styleToUse = renderer ? renderer->style() : NULL;
- if (styleToUse) {
- double frameRate = (m_frameCountWhilePlaying - 1) / (0.001 * ( m_startedPlaying ? (GetTickCount() - m_timeStartedPlaying) :
- (m_timeStoppedPlaying - m_timeStartedPlaying) ));
- String text = String::format("%1.2f", frameRate);
- TextRun textRun(text.characters(), text.length());
- const Color color(255, 0, 0);
- p->save();
- p->translate(r.x(), r.y() + r.height());
- p->setFont(styleToUse->font());
- p->setStrokeColor(color);
- p->setStrokeStyle(SolidStroke);
- p->setStrokeThickness(1.0f);
- p->setFillColor(color);
- p->drawText(textRun, IntPoint(2, -3));
- p->restore();
- }
+ double interval = m_startedPlaying ? WTF::currentTime() - m_timeStartedPlaying : m_timeStoppedPlaying - m_timeStartedPlaying;
+ double frameRate = (m_frameCountWhilePlaying - 1) / interval;
+ CGContextRef cgContext = context.platformContext();
+ CGRect drawRect = rect;
+
+ char text[8];
+ _snprintf(text, sizeof(text), "%1.2f", frameRate);
+
+ static const int fontSize = 25;
+ static const int fontCharWidth = 12;
+ static const int boxHeight = 25;
+ static const int boxBorderWidth = 4;
+ drawRect.size.width = boxBorderWidth * 2 + fontCharWidth * strlen(text);
+ drawRect.size.height = boxHeight;
+
+ CGContextSaveGState(cgContext);
+#if USE(ACCELERATED_COMPOSITING)
+ if (m_qtVideoLayer)
+ CGContextScaleCTM(cgContext, 1, -1);
+ CGContextTranslateCTM(cgContext, rect.width() - drawRect.size.width, m_qtVideoLayer ? -rect.height() : 0);
+#else
+ CGContextTranslateCTM(cgContext, rect.width() - drawRect.size.width, 0);
+#endif
+ static const CGFloat backgroundColor[4] = { 0.98, 0.98, 0.82, 0.8 };
+ CGContextSetFillColor(cgContext, backgroundColor);
+ CGContextFillRect(cgContext, drawRect);
+
+ static const CGFloat textColor[4] = { 0, 0, 0, 1 };
+ CGContextSetFillColor(cgContext, textColor);
+ CGContextSetTextMatrix(cgContext, CGAffineTransformMakeScale(1, -1));
+ CGContextSelectFont(cgContext, "Helvetica", fontSize, kCGEncodingMacRoman);
+
+ CGContextShowTextAtPoint(cgContext, drawRect.origin.x + boxBorderWidth, drawRect.origin.y + boxHeight - boxBorderWidth, text, strlen(text));
+
+ CGContextRestoreGState(cgContext);
}
#endif
}
@@ -630,13 +678,21 @@ void MediaPlayerPrivate::movieNewImageAvailable(QTMovieWin* movie)
#if DRAW_FRAME_RATE
if (m_startedPlaying) {
m_frameCountWhilePlaying++;
- // to eliminate preroll costs from our calculation,
- // our frame rate calculation excludes the first frame drawn after playback starts
- if (1==m_frameCountWhilePlaying)
- m_timeStartedPlaying = GetTickCount();
+ // To eliminate preroll costs from our calculation, our frame rate calculation excludes
+ // the first frame drawn after playback starts.
+ if (m_frameCountWhilePlaying == 1)
+ m_timeStartedPlaying = WTF::currentTime();
}
#endif
- m_player->repaint();
+
+ m_newFrameAvailable = true;
+
+#if USE(ACCELERATED_COMPOSITING)
+ if (m_qtVideoLayer)
+ m_qtVideoLayer->platformLayer()->setNeedsDisplay();
+ else
+#endif
+ m_player->repaint();
}
bool MediaPlayerPrivate::hasSingleSecurityOrigin() const
@@ -646,6 +702,171 @@ bool MediaPlayerPrivate::hasSingleSecurityOrigin() const
return true;
}
+MediaPlayerPrivate::MediaRenderingMode MediaPlayerPrivate::currentRenderingMode() const
+{
+ if (!m_qtMovie)
+ return MediaRenderingNone;
+
+#if USE(ACCELERATED_COMPOSITING)
+ if (m_qtVideoLayer)
+ return MediaRenderingMovieLayer;
+#endif
+
+ return MediaRenderingSoftwareRenderer;
+}
+
+MediaPlayerPrivate::MediaRenderingMode MediaPlayerPrivate::preferredRenderingMode() const
+{
+ if (!m_player->frameView() || !m_qtMovie)
+ return MediaRenderingNone;
+
+#if USE(ACCELERATED_COMPOSITING)
+ if (supportsAcceleratedRendering() && m_player->mediaPlayerClient()->mediaPlayerRenderingCanBeAccelerated(m_player))
+ return MediaRenderingMovieLayer;
+#endif
+
+ return MediaRenderingSoftwareRenderer;
+}
+
+void MediaPlayerPrivate::setUpVideoRendering()
+{
+ MediaRenderingMode currentMode = currentRenderingMode();
+ MediaRenderingMode preferredMode = preferredRenderingMode();
+
+#if !USE(ACCELERATED_COMPOSITING)
+ ASSERT(preferredMode != MediaRenderingMovieLayer);
+#endif
+
+ if (currentMode == preferredMode && currentMode != MediaRenderingNone)
+ return;
+
+ if (currentMode != MediaRenderingNone)
+ tearDownVideoRendering();
+
+ if (preferredMode == MediaRenderingMovieLayer)
+ createLayerForMovie();
+}
+
+void MediaPlayerPrivate::tearDownVideoRendering()
+{
+#if USE(ACCELERATED_COMPOSITING)
+ if (m_qtVideoLayer)
+ destroyLayerForMovie();
+#endif
+}
+
+bool MediaPlayerPrivate::hasSetUpVideoRendering() const
+{
+#if USE(ACCELERATED_COMPOSITING)
+ return m_qtVideoLayer || currentRenderingMode() != MediaRenderingMovieLayer;
+#else
+ return true;
+#endif
+}
+
+#if USE(ACCELERATED_COMPOSITING)
+
+// Up-call from compositing layer drawing callback.
+void MediaPlayerPrivate::paintContents(const GraphicsLayer*, GraphicsContext& context, GraphicsLayerPaintingPhase, const IntRect&)
+{
+ if (m_hasUnsupportedTracks)
+ return;
+
+ ASSERT(supportsAcceleratedRendering());
+
+ // No reason to replace the current layer image unless we have something new to show.
+ if (!m_newFrameAvailable)
+ return;
+
+ static CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+ void* buffer;
+ unsigned bitsPerPixel;
+ unsigned rowBytes;
+ unsigned width;
+ unsigned height;
+
+ m_qtMovie->getCurrentFrameInfo(buffer, bitsPerPixel, rowBytes, width, height);
+ if (!buffer)
+ return ;
+
+ RetainPtr<CFDataRef> data(AdoptCF, CFDataCreateWithBytesNoCopy(0, static_cast<UInt8*>(buffer), rowBytes * height, kCFAllocatorNull));
+ RetainPtr<CGDataProviderRef> provider(AdoptCF, CGDataProviderCreateWithCFData(data.get()));
+ RetainPtr<CGImageRef> frameImage(AdoptCF, CGImageCreate(width, height, 8, bitsPerPixel, rowBytes, colorSpace,
+ kCGBitmapByteOrder32Little | kCGImageAlphaFirst, provider.get(), 0, false, kCGRenderingIntentDefault));
+ if (!frameImage)
+ return;
+
+ IntRect rect(0, 0, m_size.width(), m_size.height());
+ CGContextDrawImage(context.platformContext(), rect, frameImage.get());
+ paintCompleted(context, rect);
+}
+#endif
+
+void MediaPlayerPrivate::createLayerForMovie()
+{
+#if USE(ACCELERATED_COMPOSITING)
+ ASSERT(supportsAcceleratedRendering());
+
+ if (!m_qtMovie || m_qtVideoLayer)
+ return;
+
+ // Do nothing if the parent layer hasn't been set up yet.
+ GraphicsLayer* videoGraphicsLayer = m_player->mediaPlayerClient()->mediaPlayerGraphicsLayer(m_player);
+ if (!videoGraphicsLayer)
+ return;
+
+ // Create a GraphicsLayer that won't be inserted directly into the render tree, but will used
+ // as a wrapper for a WKCACFLayer which gets inserted as the content layer of the video
+ // renderer's GraphicsLayer.
+ m_qtVideoLayer.set(new GraphicsLayerCACF(this));
+ if (!m_qtVideoLayer)
+ return;
+
+ // Mark the layer as drawing itself, anchored in the top left, and bottom-up.
+ m_qtVideoLayer->setDrawsContent(true);
+ m_qtVideoLayer->setAnchorPoint(FloatPoint3D());
+ m_qtVideoLayer->setContentsOrientation(GraphicsLayer::CompositingCoordinatesBottomUp);
+#ifndef NDEBUG
+ m_qtVideoLayer->setName("Video layer");
+#endif
+
+ // Hang the video layer from the render layer.
+ videoGraphicsLayer->setContentsToMedia(m_qtVideoLayer->platformLayer());
+#endif
+}
+
+void MediaPlayerPrivate::destroyLayerForMovie()
+{
+#if USE(ACCELERATED_COMPOSITING)
+ if (!m_qtVideoLayer)
+ return;
+ m_qtVideoLayer = 0;
+#endif
+}
+
+#if USE(ACCELERATED_COMPOSITING)
+bool MediaPlayerPrivate::supportsAcceleratedRendering() const
+{
+ return isReadyForRendering();
+}
+
+void MediaPlayerPrivate::acceleratedRenderingStateChanged()
+{
+ // Set up or change the rendering path if necessary.
+ setUpVideoRendering();
+}
+
+void MediaPlayerPrivate::notifySyncRequired(const GraphicsLayer*)
+{
+ GraphicsLayerCACF* videoGraphicsLayer = static_cast<GraphicsLayerCACF*>(m_player->mediaPlayerClient()->mediaPlayerGraphicsLayer(m_player));
+ if (videoGraphicsLayer)
+ videoGraphicsLayer->notifySyncRequired();
+ }
+
+
+#endif
+
+
}
#endif
diff --git a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h
index 2bccbbf..d58f44f 100644
--- a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h
+++ b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 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
@@ -32,11 +32,18 @@
#include "Timer.h"
#include <QTMovieWin.h>
#include <wtf/OwnPtr.h>
+#include <wtf/RetainPtr.h>
+
+#if USE(ACCELERATED_COMPOSITING)
+#include "GraphicsLayerClient.h"
+#endif
#ifndef DRAW_FRAME_RATE
#define DRAW_FRAME_RATE 0
#endif
+typedef struct CGImage *CGImageRef;
+
namespace WebCore {
class GraphicsContext;
@@ -44,15 +51,32 @@ class IntSize;
class IntRect;
class String;
-class MediaPlayerPrivate : public MediaPlayerPrivateInterface, public QTMovieWinClient {
+class MediaPlayerPrivate : public MediaPlayerPrivateInterface, public QTMovieWinClient
+#if USE(ACCELERATED_COMPOSITING)
+ , public GraphicsLayerClient
+#endif
+{
public:
static void registerMediaEngine(MediaEngineRegistrar);
~MediaPlayerPrivate();
private:
+
+#if USE(ACCELERATED_COMPOSITING)
+ // GraphicsLayerClient methods
+ virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& inClip);
+ virtual void notifyAnimationStarted(const GraphicsLayer*, double time) { }
+ virtual void notifySyncRequired(const GraphicsLayer*);
+ virtual bool showDebugBorders() const { return false; }
+ virtual bool showRepaintCounter() const { return false; }
+#endif
+
MediaPlayerPrivate(MediaPlayer*);
+ virtual bool supportsFullscreen() const;
+ virtual PlatformMedia platformMedia() const;
+
IntSize naturalSize() const;
bool hasVideo() const;
bool hasAudio() const;
@@ -69,21 +93,17 @@ private:
float duration() const;
float currentTime() const;
void seek(float time);
- void setEndTime(float);
void setRate(float);
void setVolume(float);
void setPreservesPitch(bool);
- int dataRate() const;
-
MediaPlayer::NetworkState networkState() const { return m_networkState; }
MediaPlayer::ReadyState readyState() const { return m_readyState; }
PassRefPtr<TimeRanges> buffered() const;
float maxTimeSeekable() const;
unsigned bytesLoaded() const;
- bool totalBytesKnown() const;
unsigned totalBytes() const;
void setVisible(bool);
@@ -93,7 +113,8 @@ private:
void didEnd();
void paint(GraphicsContext*, const IntRect&);
-
+ void paintCompleted(GraphicsContext&, const IntRect&);
+
bool hasSingleSecurityOrigin() const;
bool hasClosedCaptions() const;
@@ -117,11 +138,31 @@ private:
static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs);
static bool isAvailable();
+#if USE(ACCELERATED_COMPOSITING)
+ virtual bool supportsAcceleratedRendering() const;
+ virtual void acceleratedRenderingStateChanged();
+#endif
+
+ enum MediaRenderingMode { MediaRenderingNone, MediaRenderingSoftwareRenderer, MediaRenderingMovieLayer };
+ MediaRenderingMode currentRenderingMode() const;
+ MediaRenderingMode preferredRenderingMode() const;
+ bool isReadyForRendering() const;
+
+ void setUpVideoRendering();
+ void tearDownVideoRendering();
+ bool hasSetUpVideoRendering() const;
+
+ void createLayerForMovie();
+ void destroyLayerForMovie();
+
MediaPlayer* m_player;
OwnPtr<QTMovieWin> m_qtMovie;
+#if USE(ACCELERATED_COMPOSITING)
+ OwnPtr<GraphicsLayer> m_qtVideoLayer;
+#endif
float m_seekTo;
- float m_endTime;
Timer<MediaPlayerPrivate> m_seekTimer;
+ IntSize m_size;
MediaPlayer::NetworkState m_networkState;
MediaPlayer::ReadyState m_readyState;
unsigned m_enabledTrackCount;
@@ -129,10 +170,12 @@ private:
bool m_hasUnsupportedTracks;
bool m_startedPlaying;
bool m_isStreaming;
+ bool m_visible;
+ bool m_newFrameAvailable;
#if DRAW_FRAME_RATE
- int m_frameCountWhilePlaying;
- int m_timeStartedPlaying;
- int m_timeStoppedPlaying;
+ double m_frameCountWhilePlaying;
+ double m_timeStartedPlaying;
+ double m_timeStoppedPlaying;
#endif
};
diff --git a/WebCore/platform/graphics/win/QTMovieWin.cpp b/WebCore/platform/graphics/win/QTMovieWin.cpp
index 2d4c2ea..8fd6c71 100644
--- a/WebCore/platform/graphics/win/QTMovieWin.cpp
+++ b/WebCore/platform/graphics/win/QTMovieWin.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009 Apple, Inc. All rights reserved.
+ * Copyright (C) 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
@@ -24,18 +24,15 @@
*/
#include "config.h"
-#include <windows.h>
-
#include "QTMovieWin.h"
// Put Movies.h first so build failures here point clearly to QuickTime
#include <Movies.h>
-#include <QuickTimeComponents.h>
-#include <GXMath.h>
-#include <QTML.h>
#include "QTMovieWinTimer.h"
-
+#include <GXMath.h>
+#include <QTML.h>
+#include <QuickTimeComponents.h>
#include <wtf/Assertions.h>
#include <wtf/HashSet.h>
#include <wtf/Noncopyable.h>
@@ -50,6 +47,7 @@ static const long subTitleTrackType = 'sbtl';
static const long mpeg4ObjectDescriptionTrackType = 'odsm';
static const long mpeg4SceneDescriptionTrackType = 'sdsm';
static const long closedCaptionDisplayPropertyID = 'disp';
+static LPCTSTR fullscreenQTMovieWinPointerProp = TEXT("fullscreenQTMovieWinPointer");
// Resizing GWorlds is slow, give them a minimum size so size of small
// videos can be animated smoothly
@@ -130,6 +128,11 @@ public:
#if !ASSERT_DISABLED
bool m_scaleCached;
#endif
+ WindowPtr m_fullscreenWindow;
+ GWorldPtr m_fullscreenOrigGWorld;
+ Rect m_fullscreenRect;
+ QTMovieWinFullscreenClient* m_fullscreenClient;
+ char* m_fullscreenRestoreState;
};
QTMovieWinPrivate::QTMovieWinPrivate()
@@ -159,11 +162,19 @@ QTMovieWinPrivate::QTMovieWinPrivate()
#if !ASSERT_DISABLED
, m_scaleCached(false)
#endif
+ , m_fullscreenWindow(0)
+ , m_fullscreenOrigGWorld(0)
+ , m_fullscreenClient(0)
+ , m_fullscreenRestoreState(0)
{
+ Rect rect = { 0, 0, 0, 0 };
+ m_fullscreenRect = rect;
}
QTMovieWinPrivate::~QTMovieWinPrivate()
{
+ ASSERT(!m_fullscreenWindow);
+
endTask();
if (m_gWorld)
deleteGWorld();
@@ -359,7 +370,7 @@ void QTMovieWinPrivate::createGWorld()
bounds.left = 0;
bounds.right = m_gWorldWidth;
bounds.bottom = m_gWorldHeight;
- OSErr err = QTNewGWorld(&m_gWorld, k32BGRAPixelFormat, &bounds, NULL, NULL, NULL);
+ OSErr err = QTNewGWorld(&m_gWorld, k32BGRAPixelFormat, &bounds, 0, 0, 0);
if (err)
return;
GetMovieGWorld(m_movie, &m_savedGWorld, 0);
@@ -597,6 +608,24 @@ void QTMovieWin::setVisible(bool b)
m_private->updateGWorld();
}
+void QTMovieWin::getCurrentFrameInfo(void*& buffer, unsigned& bitsPerPixel, unsigned& rowBytes, unsigned& width, unsigned& height)
+{
+ if (!m_private->m_gWorld) {
+ buffer = 0;
+ bitsPerPixel = 0;
+ rowBytes = 0;
+ width = 0;
+ height = 0;
+ return;
+ }
+ PixMapHandle offscreenPixMap = GetGWorldPixMap(m_private->m_gWorld);
+ buffer = (*offscreenPixMap)->baseAddr;
+ bitsPerPixel = (*offscreenPixMap)->pixelSize;
+ rowBytes = (*offscreenPixMap)->rowBytes & 0x3FFF;
+ width = m_private->m_width;
+ height = m_private->m_height;
+}
+
void QTMovieWin::paint(HDC hdc, int x, int y)
{
if (!m_private->m_gWorld)
@@ -729,7 +758,7 @@ void QTMovieWin::load(CFURLRef url, bool preservesPitch)
moviePropCount++;
ASSERT(moviePropCount <= sizeof(movieProps)/sizeof(movieProps[0]));
- m_private->m_loadError = NewMovieFromProperties(moviePropCount, movieProps, 0, NULL, &m_private->m_movie);
+ m_private->m_loadError = NewMovieFromProperties(moviePropCount, movieProps, 0, 0, &m_private->m_movie);
end:
m_private->startTask();
@@ -953,7 +982,7 @@ static void initializeSupportedTypes()
continue;
if (!(infoCD.componentFlags & hasMovieImportMIMEList))
continue;
- QTAtomContainer mimeList = NULL;
+ QTAtomContainer mimeList = 0;
err = MovieImportGetMIMETypeList((ComponentInstance)comp, &mimeList);
if (err || !mimeList)
continue;
@@ -962,7 +991,7 @@ static void initializeSupportedTypes()
QTLockContainer(mimeList);
int typeCount = QTCountChildrenOfType(mimeList, kParentAtomIsContainer, kMimeInfoMimeTypeTag);
for (int typeIndex = 1; typeIndex <= typeCount; typeIndex++) {
- QTAtom mimeTag = QTFindChildByIndex(mimeList, 0, kMimeInfoMimeTypeTag, typeIndex, NULL);
+ QTAtom mimeTag = QTFindChildByIndex(mimeList, 0, kMimeInfoMimeTypeTag, typeIndex, 0);
if (!mimeTag)
continue;
char* atomData;
@@ -980,7 +1009,7 @@ static void initializeSupportedTypes()
if (strncmp(typeBuffer, "audio/", 6) && strncmp(typeBuffer, "video/", 6))
continue;
- CFStringRef cfMimeType = CFStringCreateWithCString(NULL, typeBuffer, kCFStringEncodingUTF8);
+ CFStringRef cfMimeType = CFStringCreateWithCString(0, typeBuffer, kCFStringEncodingUTF8);
if (!cfMimeType)
continue;
@@ -1040,7 +1069,7 @@ bool QTMovieWin::initializeQuickTime()
if (!initialized) {
initialized = true;
// Initialize and check QuickTime version
- OSErr result = InitializeQTML(0);
+ OSErr result = InitializeQTML(kInitializeQTMLEnableDoubleBufferedSurface);
if (result == noErr)
result = Gestalt(gestaltQuickTime, &quickTimeVersion);
if (result != noErr) {
@@ -1058,15 +1087,80 @@ bool QTMovieWin::initializeQuickTime()
return initializationSucceeded;
}
+LRESULT QTMovieWin::fullscreenWndProc(HWND wnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ QTMovieWin* movie = static_cast<QTMovieWin*>(GetProp(wnd, fullscreenQTMovieWinPointerProp));
+
+ if (message == WM_DESTROY)
+ RemoveProp(wnd, fullscreenQTMovieWinPointerProp);
+
+ if (!movie)
+ return DefWindowProc(wnd, message, wParam, lParam);
+
+ return movie->m_private->m_fullscreenClient->fullscreenClientWndProc(wnd, message, wParam, lParam);
+}
+
+HWND QTMovieWin::enterFullscreen(QTMovieWinFullscreenClient* client)
+{
+ m_private->m_fullscreenClient = client;
+
+ BeginFullScreen(&m_private->m_fullscreenRestoreState, 0, 0, 0, &m_private->m_fullscreenWindow, 0, fullScreenAllowEvents);
+ QTMLSetWindowWndProc(m_private->m_fullscreenWindow, fullscreenWndProc);
+ CreatePortAssociation(GetPortNativeWindow(m_private->m_fullscreenWindow), 0, 0);
+
+ GetMovieBox(m_private->m_movie, &m_private->m_fullscreenRect);
+ GetMovieGWorld(m_private->m_movie, &m_private->m_fullscreenOrigGWorld, 0);
+ SetMovieGWorld(m_private->m_movie, reinterpret_cast<CGrafPtr>(m_private->m_fullscreenWindow), GetGWorldDevice(reinterpret_cast<CGrafPtr>(m_private->m_fullscreenWindow)));
+
+ // Set the size of the box to preserve aspect ratio
+ Rect rect = m_private->m_fullscreenWindow->portRect;
+
+ float movieRatio = static_cast<float>(m_private->m_width) / m_private->m_height;
+ int windowWidth = rect.right - rect.left;
+ int windowHeight = rect.bottom - rect.top;
+ float windowRatio = static_cast<float>(windowWidth) / windowHeight;
+ int actualWidth = (windowRatio > movieRatio) ? (windowHeight * movieRatio) : windowWidth;
+ int actualHeight = (windowRatio < movieRatio) ? (windowWidth / movieRatio) : windowHeight;
+ int offsetX = (windowWidth - actualWidth) / 2;
+ int offsetY = (windowHeight - actualHeight) / 2;
+
+ rect.left = offsetX;
+ rect.right = offsetX + actualWidth;
+ rect.top = offsetY;
+ rect.bottom = offsetY + actualHeight;
+
+ SetMovieBox(m_private->m_movie, &rect);
+ ShowHideTaskBar(true);
+
+ // Set the 'this' pointer on the HWND
+ HWND wnd = static_cast<HWND>(GetPortNativeWindow(m_private->m_fullscreenWindow));
+ SetProp(wnd, fullscreenQTMovieWinPointerProp, static_cast<HANDLE>(this));
+
+ return wnd;
+}
+
+void QTMovieWin::exitFullscreen()
+{
+ if (!m_private->m_fullscreenWindow)
+ return;
+
+ HWND wnd = static_cast<HWND>(GetPortNativeWindow(m_private->m_fullscreenWindow));
+ DestroyPortAssociation(reinterpret_cast<CGrafPtr>(m_private->m_fullscreenWindow));
+ SetMovieGWorld(m_private->m_movie, m_private->m_fullscreenOrigGWorld, 0);
+ EndFullScreen(m_private->m_fullscreenRestoreState, 0L);
+ SetMovieBox(m_private->m_movie, &m_private->m_fullscreenRect);
+ m_private->m_fullscreenWindow = 0;
+}
+
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason) {
- case DLL_PROCESS_ATTACH:
- return TRUE;
- case DLL_PROCESS_DETACH:
- case DLL_THREAD_ATTACH:
- case DLL_THREAD_DETACH:
- return FALSE;
+ case DLL_PROCESS_ATTACH:
+ return TRUE;
+ case DLL_PROCESS_DETACH:
+ case DLL_THREAD_ATTACH:
+ case DLL_THREAD_DETACH:
+ return FALSE;
}
ASSERT_NOT_REACHED();
return FALSE;
diff --git a/WebCore/platform/graphics/win/QTMovieWin.h b/WebCore/platform/graphics/win/QTMovieWin.h
index 778f9aa..d2a7ed0 100644
--- a/WebCore/platform/graphics/win/QTMovieWin.h
+++ b/WebCore/platform/graphics/win/QTMovieWin.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009 Apple, Inc. All rights reserved.
+ * Copyright (C) 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
@@ -27,6 +27,7 @@
#define QTMovieWin_h
#include <Unicode.h>
+#include <windows.h>
#ifdef QTMOVIEWIN_EXPORTS
#define QTMOVIEWIN_API __declspec(dllexport)
@@ -45,6 +46,11 @@ public:
virtual void movieNewImageAvailable(QTMovieWin*) = 0;
};
+class QTMovieWinFullscreenClient {
+public:
+ virtual LRESULT fullscreenClientWndProc(HWND, UINT message, WPARAM, LPARAM) = 0;
+};
+
enum {
QTMovieLoadStateError = -1L,
QTMovieLoadStateLoaded = 2000L,
@@ -91,6 +97,7 @@ public:
void setVisible(bool);
void paint(HDC, int x, int y);
+ void getCurrentFrameInfo(void*& buffer, unsigned& bitsPerPixel, unsigned& rowBytes, unsigned& width, unsigned& height);
void disableUnsupportedTracks(unsigned& enabledTrackCount, unsigned& totalTrackCount);
void setDisabled(bool);
@@ -104,8 +111,13 @@ public:
static unsigned countSupportedTypes();
static void getSupportedType(unsigned index, const UChar*& str, unsigned& len);
+ // Returns the full-screen window created
+ HWND enterFullscreen(QTMovieWinFullscreenClient*);
+ void exitFullscreen();
+
private:
void load(CFURLRef, bool preservesPitch);
+ static LRESULT fullscreenWndProc(HWND, UINT message, WPARAM, LPARAM);
QTMovieWinPrivate* m_private;
bool m_disabled;
diff --git a/WebCore/platform/graphics/win/TransformationMatrixWin.cpp b/WebCore/platform/graphics/win/TransformationMatrixWin.cpp
index 38dbfbf..47806a2 100644
--- a/WebCore/platform/graphics/win/TransformationMatrixWin.cpp
+++ b/WebCore/platform/graphics/win/TransformationMatrixWin.cpp
@@ -26,6 +26,8 @@
#include "config.h"
#include "TransformationMatrix.h"
+#include <windows.h>
+
namespace WebCore {
TransformationMatrix::operator XFORM() const
diff --git a/WebCore/platform/graphics/win/WKCACFLayer.cpp b/WebCore/platform/graphics/win/WKCACFLayer.cpp
index 21e010d..ad1fc85 100644
--- a/WebCore/platform/graphics/win/WKCACFLayer.cpp
+++ b/WebCore/platform/graphics/win/WKCACFLayer.cpp
@@ -30,12 +30,19 @@
#include "WKCACFLayer.h"
#include "WKCACFContextFlusher.h"
+#include "WKCACFLayerRenderer.h"
#include <stdio.h>
#include <QuartzCore/CACFContext.h>
#include <QuartzCore/CARender.h>
+#include <QuartzCoreInterface/QuartzCoreInterface.h>
-#pragma comment(lib, "QuartzCore")
+#ifdef DEBUG_ALL
+#pragma comment(lib, "QuartzCore_debug")
+#else
+#pragma comment(lib, "QuartzCore")
+#endif
+#pragma comment(lib, "QuartzCoreInterface")
namespace WebCore {
@@ -47,11 +54,135 @@ static void displayInContext(CACFLayerRef layer, CGContextRef context)
WKCACFLayer::layer(layer)->display(context);
}
+#define STATIC_CACF_STRING(name) \
+ static CFStringRef name() \
+ { \
+ static CFStringRef name = wkqcCFStringRef(wkqc##name); \
+ return name; \
+ }
+
+STATIC_CACF_STRING(kCACFLayer)
+STATIC_CACF_STRING(kCACFTransformLayer)
+STATIC_CACF_STRING(kCACFGravityCenter)
+STATIC_CACF_STRING(kCACFGravityTop)
+STATIC_CACF_STRING(kCACFGravityBottom)
+STATIC_CACF_STRING(kCACFGravityLeft)
+STATIC_CACF_STRING(kCACFGravityRight)
+STATIC_CACF_STRING(kCACFGravityTopLeft)
+STATIC_CACF_STRING(kCACFGravityTopRight)
+STATIC_CACF_STRING(kCACFGravityBottomLeft)
+STATIC_CACF_STRING(kCACFGravityBottomRight)
+STATIC_CACF_STRING(kCACFGravityResize)
+STATIC_CACF_STRING(kCACFGravityResizeAspect)
+STATIC_CACF_STRING(kCACFGravityResizeAspectFill)
+STATIC_CACF_STRING(kCACFFilterLinear)
+STATIC_CACF_STRING(kCACFFilterNearest)
+STATIC_CACF_STRING(kCACFFilterTrilinear)
+STATIC_CACF_STRING(kCACFFilterLanczos)
+
+static CFStringRef toCACFLayerType(WKCACFLayer::LayerType type)
+{
+ switch (type) {
+ case WKCACFLayer::Layer: return kCACFLayer();
+ case WKCACFLayer::TransformLayer: return kCACFTransformLayer();
+ default: return 0;
+ }
+}
+
+static CFStringRef toCACFContentsGravityType(WKCACFLayer::ContentsGravityType type)
+{
+ switch (type) {
+ case WKCACFLayer::Center: return kCACFGravityCenter();
+ case WKCACFLayer::Top: return kCACFGravityTop();
+ case WKCACFLayer::Bottom: return kCACFGravityBottom();
+ case WKCACFLayer::Left: return kCACFGravityLeft();
+ case WKCACFLayer::Right: return kCACFGravityRight();
+ case WKCACFLayer::TopLeft: return kCACFGravityTopLeft();
+ case WKCACFLayer::TopRight: return kCACFGravityTopRight();
+ case WKCACFLayer::BottomLeft: return kCACFGravityBottomLeft();
+ case WKCACFLayer::BottomRight: return kCACFGravityBottomRight();
+ case WKCACFLayer::Resize: return kCACFGravityResize();
+ case WKCACFLayer::ResizeAspect: return kCACFGravityResizeAspect();
+ case WKCACFLayer::ResizeAspectFill: return kCACFGravityResizeAspectFill();
+ default: return 0;
+ }
+}
+
+static WKCACFLayer::ContentsGravityType fromCACFContentsGravityType(CFStringRef string)
+{
+ if (CFEqual(string, kCACFGravityTop()))
+ return WKCACFLayer::Top;
+
+ if (CFEqual(string, kCACFGravityBottom()))
+ return WKCACFLayer::Bottom;
+
+ if (CFEqual(string, kCACFGravityLeft()))
+ return WKCACFLayer::Left;
+
+ if (CFEqual(string, kCACFGravityRight()))
+ return WKCACFLayer::Right;
+
+ if (CFEqual(string, kCACFGravityTopLeft()))
+ return WKCACFLayer::TopLeft;
+
+ if (CFEqual(string, kCACFGravityTopRight()))
+ return WKCACFLayer::TopRight;
+
+ if (CFEqual(string, kCACFGravityBottomLeft()))
+ return WKCACFLayer::BottomLeft;
+
+ if (CFEqual(string, kCACFGravityBottomRight()))
+ return WKCACFLayer::BottomRight;
+
+ if (CFEqual(string, kCACFGravityResize()))
+ return WKCACFLayer::Resize;
+
+ if (CFEqual(string, kCACFGravityResizeAspect()))
+ return WKCACFLayer::ResizeAspect;
+
+ if (CFEqual(string, kCACFGravityResizeAspectFill()))
+ return WKCACFLayer::ResizeAspectFill;
+
+ return WKCACFLayer::Center;
+}
+
+static CFStringRef toCACFFilterType(WKCACFLayer::FilterType type)
+{
+ switch (type) {
+ case WKCACFLayer::Linear: return kCACFFilterLinear();
+ case WKCACFLayer::Nearest: return kCACFFilterNearest();
+ case WKCACFLayer::Trilinear: return kCACFFilterTrilinear();
+ case WKCACFLayer::Lanczos: return kCACFFilterLanczos();
+ default: return 0;
+ }
+}
+
+static WKCACFLayer::FilterType fromCACFFilterType(CFStringRef string)
+{
+ if (CFEqual(string, kCACFFilterNearest()))
+ return WKCACFLayer::Nearest;
+
+ if (CFEqual(string, kCACFFilterTrilinear()))
+ return WKCACFLayer::Trilinear;
+
+ if (CFEqual(string, kCACFFilterLanczos()))
+ return WKCACFLayer::Lanczos;
+
+ return WKCACFLayer::Linear;
+}
+
+PassRefPtr<WKCACFLayer> WKCACFLayer::create(LayerType type, GraphicsLayerCACF* owner)
+{
+ if (!WKCACFLayerRenderer::acceleratedCompositingAvailable())
+ return 0;
+ return adoptRef(new WKCACFLayer(type, owner));
+}
+
// FIXME: It might be good to have a way of ensuring that all WKCACFLayers eventually
// get destroyed in debug builds. A static counter could accomplish this pretty easily.
-WKCACFLayer::WKCACFLayer(CFStringRef className, GraphicsLayerCACF* owner)
- : m_layer(AdoptCF, CACFLayerCreate(className))
+WKCACFLayer::WKCACFLayer(LayerType type, GraphicsLayerCACF* owner)
+ : m_layer(AdoptCF, CACFLayerCreate(toCACFLayerType(type)))
, m_needsDisplayOnBoundsChange(false)
, m_owner(owner)
{
@@ -291,6 +422,39 @@ void WKCACFLayer::setFrame(const CGRect& rect)
setNeedsDisplay();
}
+void WKCACFLayer::setContentsGravity(ContentsGravityType type)
+{
+ CACFLayerSetContentsGravity(layer(), toCACFContentsGravityType(type));
+ setNeedsCommit();
+}
+
+WKCACFLayer::ContentsGravityType WKCACFLayer::contentsGravity() const
+{
+ return fromCACFContentsGravityType(CACFLayerGetContentsGravity(layer()));
+}
+
+void WKCACFLayer::setMagnificationFilter(FilterType type)
+{
+ CACFLayerSetMagnificationFilter(layer(), toCACFFilterType(type));
+ setNeedsCommit();
+}
+
+WKCACFLayer::FilterType WKCACFLayer::magnificationFilter() const
+{
+ return fromCACFFilterType(CACFLayerGetMagnificationFilter(layer()));
+}
+
+void WKCACFLayer::setMinificationFilter(FilterType type)
+{
+ CACFLayerSetMinificationFilter(layer(), toCACFFilterType(type));
+ setNeedsCommit();
+}
+
+WKCACFLayer::FilterType WKCACFLayer::minificationFilter() const
+{
+ return fromCACFFilterType(CACFLayerGetMinificationFilter(layer()));
+}
+
WKCACFLayer* WKCACFLayer::rootLayer() const
{
WKCACFLayer* layer = const_cast<WKCACFLayer*>(this);
diff --git a/WebCore/platform/graphics/win/WKCACFLayer.h b/WebCore/platform/graphics/win/WKCACFLayer.h
index 6655f7a..6892c6e 100644
--- a/WebCore/platform/graphics/win/WKCACFLayer.h
+++ b/WebCore/platform/graphics/win/WKCACFLayer.h
@@ -50,7 +50,12 @@ class WKCACFTimingFunction;
class WKCACFLayer : public RefCounted<WKCACFLayer> {
public:
- static PassRefPtr<WKCACFLayer> create(CFStringRef className, GraphicsLayerCACF* owner = 0) { return adoptRef(new WKCACFLayer(className, owner)); }
+ enum LayerType { Layer, TransformLayer };
+ enum FilterType { Linear, Nearest, Trilinear, Lanczos };
+ enum ContentsGravityType { Center, Top, Bottom, Left, Right, TopLeft, TopRight,
+ BottomLeft, BottomRight, Resize, ResizeAspect, ResizeAspectFill };
+
+ static PassRefPtr<WKCACFLayer> create(LayerType, GraphicsLayerCACF* owner = 0);
static WKCACFLayer* layer(CACFLayerRef layer) { return static_cast<WKCACFLayer*>(CACFLayerGetUserData(layer)); }
~WKCACFLayer();
@@ -142,8 +147,8 @@ public:
void setContentsRect(const CGRect& contentsRect) { CACFLayerSetContentsRect(layer(), contentsRect); setNeedsCommit(); }
CGRect contentsRect() const { return CACFLayerGetContentsRect(layer()); }
- void setContentsGravity(CFStringRef str) { CACFLayerSetContentsGravity(layer(), str); setNeedsCommit(); }
- CFStringRef contentsGravity() const { return CACFLayerGetContentsGravity(layer()); }
+ void setContentsGravity(ContentsGravityType);
+ ContentsGravityType contentsGravity() const;
void setDoubleSided(bool b) { CACFLayerSetDoubleSided(layer(), b); setNeedsCommit(); }
bool doubleSided() const { return CACFLayerIsDoubleSided(layer()); }
@@ -163,11 +168,11 @@ public:
void setMasksToBounds(bool b) { CACFLayerSetMasksToBounds(layer(), b); }
bool masksToBounds() const { return CACFLayerGetMasksToBounds(layer()); }
- void setMagnificationFilter(const String& string) { CACFLayerSetMagnificationFilter(layer(), RetainPtr<CFStringRef>(AdoptCF, string.createCFString()).get()); }
- String magnificationFilter() const { return CACFLayerGetMagnificationFilter(layer()); }
+ void setMagnificationFilter(FilterType);
+ FilterType magnificationFilter() const;
- void setMinificationFilter(const String& string) { CACFLayerSetMinificationFilter(layer(), RetainPtr<CFStringRef>(AdoptCF, string.createCFString()).get()); }
- String minificationFilter() const { return CACFLayerGetMinificationFilter(layer()); }
+ void setMinificationFilter(FilterType);
+ FilterType minificationFilter() const;
void setMinificationFilterBias(float bias) { CACFLayerSetMinificationFilterBias(layer(), bias); }
float minificationFilterBias() const { return CACFLayerGetMinificationFilterBias(layer()); }
@@ -218,9 +223,9 @@ public:
void setGeometryFlipped(bool flipped) { CACFLayerSetGeometryFlipped(layer(), flipped); setNeedsCommit(); }
bool geometryFlipped() const { return CACFLayerIsGeometryFlipped(layer()); }
- WKCACFLayer(CFStringRef className, GraphicsLayerCACF* owner);
-
private:
+ WKCACFLayer(LayerType, GraphicsLayerCACF* owner);
+
void setNeedsCommit();
CACFLayerRef layer() const { return m_layer.get(); }
size_t numSublayers() const
diff --git a/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp b/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp
index 9fbd0fc..3bbd4f8 100644
--- a/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp
+++ b/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp
@@ -34,15 +34,20 @@
#include <CoreGraphics/CGSRegion.h>
#include <QuartzCore/CACFContext.h>
#include <QuartzCore/CARenderOGL.h>
+#include <QuartzCoreInterface/QuartzCoreInterface.h>
#include <wtf/HashMap.h>
#include <wtf/OwnArrayPtr.h>
+#include <wtf/StdLibExtras.h>
#include <d3d9.h>
#include <d3dx9.h>
-#include <dxerr9.h>
-#pragma comment(lib, "d3d9")
-#pragma comment(lib, "d3dx9")
-#pragma comment(lib, "QuartzCore")
+#pragma comment(lib, "d3d9")
+#pragma comment(lib, "d3dx9")
+#ifdef DEBUG_ALL
+#pragma comment(lib, "QuartzCore_debug")
+#else
+#pragma comment(lib, "QuartzCore")
+#endif
static IDirect3D9* s_d3d = 0;
static IDirect3D9* d3d()
@@ -90,29 +95,29 @@ static D3DPRESENT_PARAMETERS initialPresentationParameters()
return parameters;
}
-bool WKCACFLayerRenderer::acceleratedCompositingAvailable()
-{
- static bool available;
- static bool tested;
-
- if (tested)
- return available;
-
- tested = true;
- HMODULE library = LoadLibrary(TEXT("d3d9.dll"));
- if (!library)
- return false;
-
- FreeLibrary(library);
- library = LoadLibrary(TEXT("QuartzCore.dll"));
- if (!library)
- return false;
-
- FreeLibrary(library);
- available = true;
- return available;
-}
-
+bool WKCACFLayerRenderer::acceleratedCompositingAvailable()
+{
+ static bool available;
+ static bool tested;
+
+ if (tested)
+ return available;
+
+ tested = true;
+ HMODULE library = LoadLibrary(TEXT("d3d9.dll"));
+ if (!library)
+ return false;
+
+ FreeLibrary(library);
+ library = LoadLibrary(TEXT("QuartzCore.dll"));
+ if (!library)
+ return false;
+
+ FreeLibrary(library);
+ available = true;
+ return available;
+}
+
void WKCACFLayerRenderer::didFlushContext(CACFContextRef context)
{
WKCACFLayerRenderer* window = windowsForContexts().get(context);
@@ -135,8 +140,7 @@ WKCACFLayerRenderer::WKCACFLayerRenderer()
, m_renderer(0)
, m_hostWindow(0)
, m_renderTimer(this, &WKCACFLayerRenderer::renderTimerFired)
- , m_scrollFrameWidth(1) // Default to 1 to avoid 0 size frames
- , m_scrollFrameHeight(1) // Default to 1 to avoid 0 size frames
+ , m_scrollFrame(0, 0, 1, 1) // Default to 1 to avoid 0 size frames
{
}
@@ -145,19 +149,15 @@ WKCACFLayerRenderer::~WKCACFLayerRenderer()
destroyRenderer();
}
-void WKCACFLayerRenderer::setScrollFrame(int width, int height, int scrollX, int scrollY)
+void WKCACFLayerRenderer::setScrollFrame(const IntRect& scrollFrame)
{
- m_scrollFrameWidth = width;
- m_scrollFrameHeight = height;
-
- CGRect contentsRect = CGRectMake(scrollX, scrollY, width, height);
- m_scrollLayer->setFrame(contentsRect);
+ m_scrollFrame = scrollFrame;
+ CGRect frameBounds = bounds();
+ m_scrollLayer->setBounds(CGRectMake(0, 0, m_scrollFrame.width(), m_scrollFrame.height()));
+ m_scrollLayer->setPosition(CGPointMake(0, frameBounds.size.height));
- if (m_rootChildLayer) {
- contentsRect.origin.x = 0;
- contentsRect.origin.y = 0;
- m_rootChildLayer->setFrame(contentsRect);
- }
+ if (m_rootChildLayer)
+ m_rootChildLayer->setPosition(CGPointMake(m_scrollFrame.x(), m_scrollFrame.height() + m_scrollFrame.y()));
}
void WKCACFLayerRenderer::setRootContents(CGImageRef image)
@@ -177,7 +177,8 @@ void WKCACFLayerRenderer::setRootChildLayer(WebCore::PlatformLayer* layer)
m_scrollLayer->addSublayer(layer);
// Set the frame
- layer->setFrame(CGRectMake(0, 0, m_scrollFrameWidth, m_scrollFrameHeight));
+ layer->setAnchorPoint(CGPointMake(0, 1));
+ setScrollFrame(m_scrollFrame);
}
m_rootChildLayer = layer;
@@ -225,14 +226,15 @@ void WKCACFLayerRenderer::createRenderer()
windowsForContexts().set(m_context.get(), this);
m_renderContext = static_cast<CARenderContext*>(CACFContextGetRenderContext(m_context.get()));
- m_renderer = CARenderOGLNew(&kCARenderDX9Callbacks, m_d3dDevice.get(), 0);
+ m_renderer = CARenderOGLNew(wkqcCARenderOGLCallbacks(wkqckCARenderDX9Callbacks), m_d3dDevice.get(), 0);
// Create the root hierarchy
- m_rootLayer = WKCACFLayer::create(kCACFLayer);
- m_scrollLayer = WKCACFLayer::create(kCACFLayer);
+ m_rootLayer = WKCACFLayer::create(WKCACFLayer::Layer);
+ m_scrollLayer = WKCACFLayer::create(WKCACFLayer::Layer);
m_rootLayer->addSublayer(m_scrollLayer);
m_scrollLayer->setMasksToBounds(true);
+ m_scrollLayer->setAnchorPoint(CGPointMake(0, 1));
#ifndef NDEBUG
CGColorRef debugColor = createCGColor(Color(255, 0, 0, 204));
@@ -240,14 +242,9 @@ void WKCACFLayerRenderer::createRenderer()
CGColorRelease(debugColor);
#endif
- if (IsWindow(m_hostWindow)) {
+ if (IsWindow(m_hostWindow))
m_rootLayer->setFrame(bounds());
- // For now this will include the scroll bars. Later in the setScrollFrame
- // we will fix it
- m_scrollLayer->setFrame(bounds());
- }
-
if (m_context)
m_rootLayer->becomeRootLayerForContext(m_context.get());
}
@@ -284,6 +281,7 @@ void WKCACFLayerRenderer::resize()
if (m_rootLayer) {
m_rootLayer->setFrame(bounds());
WKCACFContextFlusher::shared().flushAllContexts();
+ setScrollFrame(m_scrollFrame);
}
}
diff --git a/WebCore/platform/graphics/win/WKCACFLayerRenderer.h b/WebCore/platform/graphics/win/WKCACFLayerRenderer.h
index 12cde48..cb9f04f 100644
--- a/WebCore/platform/graphics/win/WKCACFLayerRenderer.h
+++ b/WebCore/platform/graphics/win/WKCACFLayerRenderer.h
@@ -58,7 +58,7 @@ public:
static bool acceleratedCompositingAvailable();
static void didFlushContext(CACFContextRef);
- void setScrollFrame(int width, int height, int scrollX, int scrollY);
+ void setScrollFrame(const IntRect&);
void setRootContents(CGImageRef);
void setRootChildLayer(WebCore::PlatformLayer* layer);
void setNeedsDisplay();
@@ -96,7 +96,7 @@ private:
CARenderOGLContext* m_renderer;
HWND m_hostWindow;
Timer<WKCACFLayerRenderer> m_renderTimer;
- int m_scrollFrameWidth, m_scrollFrameHeight;
+ IntRect m_scrollFrame;
};
}
diff --git a/WebCore/platform/graphics/wince/GraphicsContextWince.cpp b/WebCore/platform/graphics/wince/GraphicsContextWince.cpp
index f22e6c9..0e387f5 100644
--- a/WebCore/platform/graphics/wince/GraphicsContextWince.cpp
+++ b/WebCore/platform/graphics/wince/GraphicsContextWince.cpp
@@ -1002,7 +1002,12 @@ void GraphicsContext::clipOut(const IntRect& rect)
ExcludeClipRect(m_data->m_dc, trRect.x(), trRect.y(), trRect.right(), trRect.bottom());
}
-void GraphicsContext::drawFocusRing(const Color& color)
+void GraphicsContext::drawFocusRing(const Vector<Path>& paths, int width, int offset, const Color& color)
+{
+ // FIXME: implement
+}
+
+void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int width, int offset, const Color& color)
{
if (!m_data->m_opacity || paintingDisabled())
return;
@@ -1011,10 +1016,9 @@ void GraphicsContext::drawFocusRing(const Color& color)
if (!m_data->m_dc)
return;
- int radius = (focusRingWidth() - 1) / 2;
- int offset = radius + focusRingOffset();
+ int radius = (width - 1) / 2;
+ offset += radius;
- const Vector<IntRect>& rects = focusRingRects();
unsigned rectCount = rects.size();
IntRect finalFocusRect;
for (unsigned i = 0; i < rectCount; i++) {
diff --git a/WebCore/platform/graphics/wince/MediaPlayerPrivateWince.h b/WebCore/platform/graphics/wince/MediaPlayerPrivateWince.h
index 2d6c358..a657e3e 100644
--- a/WebCore/platform/graphics/wince/MediaPlayerPrivateWince.h
+++ b/WebCore/platform/graphics/wince/MediaPlayerPrivateWince.h
@@ -61,20 +61,16 @@ namespace WebCore {
float duration() const;
float currentTime() const;
void seek(float time);
- void setEndTime(float);
void setRate(float);
void setVolume(float);
- int dataRate() const;
-
MediaPlayer::NetworkState networkState() const { return m_networkState; }
MediaPlayer::ReadyState readyState() const { return m_readyState; }
PassRefPtr<TimeRanges> buffered() const;
float maxTimeSeekable() const;
unsigned bytesLoaded() const;
- bool totalBytesKnown() const;
unsigned totalBytes() const;
void setVisible(bool);
diff --git a/WebCore/platform/graphics/wx/GraphicsContextWx.cpp b/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
index 9c05ce5..839bc59 100644
--- a/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
+++ b/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
@@ -270,7 +270,12 @@ void GraphicsContext::fillRoundedRect(const IntRect& rect, const IntSize& topLef
notImplemented();
}
-void GraphicsContext::drawFocusRing(const Color& color)
+void GraphicsContext::drawFocusRing(const Vector<Path>& paths, int width, int offset, const Color& color)
+{
+ // FIXME: implement
+}
+
+void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int width, int offset, const Color& color)
{
if (paintingDisabled())
return;
@@ -566,7 +571,7 @@ void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness
notImplemented();
}
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
HDC GraphicsContext::getWindowsContext(const IntRect& dstRect, bool supportAlphaBlend, bool mayCreateBitmap)
{
if (dstRect.isEmpty())
diff --git a/WebCore/platform/gtk/ContextMenuItemGtk.cpp b/WebCore/platform/gtk/ContextMenuItemGtk.cpp
index aaec206..b2fa853 100644
--- a/WebCore/platform/gtk/ContextMenuItemGtk.cpp
+++ b/WebCore/platform/gtk/ContextMenuItemGtk.cpp
@@ -59,7 +59,7 @@ static const char* gtkStockIDFromContextMenuAction(const ContextMenuAction& acti
case ContextMenuItemTagSelectAll:
return GTK_STOCK_SELECT_ALL;
case ContextMenuItemTagSpellingGuess:
- return GTK_STOCK_INFO;
+ return NULL;
case ContextMenuItemTagIgnoreSpelling:
return GTK_STOCK_NO;
case ContextMenuItemTagLearnSpelling:
@@ -117,6 +117,12 @@ ContextMenuItem::ContextMenuItem(GtkMenuItem* item)
m_platformDescription.checked = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(item));
} else
m_platformDescription.type = ActionType;
+#if GTK_CHECK_VERSION (2, 16, 0)
+ m_platformDescription.title = String::fromUTF8(gtk_menu_item_get_label(GTK_MENU_ITEM(item)));
+#else
+ GtkWidget* label = gtk_bin_get_child(GTK_BIN(item));
+ m_platformDescription.title = String::fromUTF8(gtk_label_get_label(GTK_LABEL(label)));
+#endif
m_platformDescription.action = *static_cast<ContextMenuAction*>(g_object_get_data(G_OBJECT(item), WEBKIT_CONTEXT_MENU_ACTION));
@@ -205,13 +211,12 @@ void ContextMenuItem::setAction(ContextMenuAction action)
String ContextMenuItem::title() const
{
- notImplemented();
- return String();
+ return m_platformDescription.title;
}
-void ContextMenuItem::setTitle(const String&)
+void ContextMenuItem::setTitle(const String& title)
{
- notImplemented();
+ m_platformDescription.title = title;
}
PlatformMenuDescription ContextMenuItem::platformSubMenu() const
diff --git a/WebCore/platform/gtk/DataObjectGtk.cpp b/WebCore/platform/gtk/DataObjectGtk.cpp
new file mode 100644
index 0000000..900fe8e
--- /dev/null
+++ b/WebCore/platform/gtk/DataObjectGtk.cpp
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2009, Martin Robinson
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#include "DataObjectGtk.h"
+
+#include "markup.h"
+#include <gtk/gtk.h>
+
+namespace WebCore {
+
+String DataObjectGtk::text()
+{
+ if (m_range)
+ return m_range->text();
+ return m_text;
+}
+
+String DataObjectGtk::markup()
+{
+ if (m_range)
+ createMarkup(m_range.get(), 0, AnnotateForInterchange);
+ return m_markup;
+}
+
+void DataObjectGtk::setText(const String& newText)
+{
+ m_range = 0;
+ m_text = newText;
+}
+
+void DataObjectGtk::setMarkup(const String& newMarkup)
+{
+ m_range = 0;
+ m_markup = newMarkup;
+}
+
+Vector<String> DataObjectGtk::files()
+{
+ Vector<KURL> uris(uriList());
+ Vector<String> files;
+
+ for (size_t i = 0; i < uris.size(); i++) {
+ KURL& uri = uris[0];
+ if (!uri.isValid() || !uri.isLocalFile())
+ continue;
+
+ files.append(uri.string());
+ }
+
+ return files;
+}
+
+String DataObjectGtk::url()
+{
+ Vector<KURL> uris(uriList());
+ for (size_t i = 0; i < uris.size(); i++) {
+ KURL& uri = uris[0];
+ if (uri.isValid())
+ return uri;
+ }
+
+ return String();
+}
+
+String DataObjectGtk::urlLabel()
+{
+ if (hasText())
+ return text();
+
+ if (hasURL())
+ return url();
+
+ return String();
+}
+
+bool DataObjectGtk::hasURL()
+{
+ return !url().isEmpty();
+}
+
+void DataObjectGtk::clear()
+{
+ m_text = "";
+ m_markup = "";
+ m_uriList.clear();
+ m_image = 0;
+ m_range = 0;
+}
+
+DataObjectGtk* DataObjectGtk::forClipboard(GtkClipboard* clipboard)
+{
+ static HashMap<GtkClipboard*, RefPtr<DataObjectGtk> > objectMap;
+
+ if (!objectMap.contains(clipboard)) {
+ RefPtr<DataObjectGtk> dataObject = DataObjectGtk::create();
+ objectMap.set(clipboard, dataObject);
+ return dataObject.get();
+ }
+
+ HashMap<GtkClipboard*, RefPtr<DataObjectGtk> >::iterator it = objectMap.find(clipboard);
+ return it->second.get();
+}
+
+}
diff --git a/WebCore/platform/gtk/DataObjectGtk.h b/WebCore/platform/gtk/DataObjectGtk.h
new file mode 100644
index 0000000..f1a2647
--- /dev/null
+++ b/WebCore/platform/gtk/DataObjectGtk.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2009, Martin Robinson
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef DataObjectGtk_h
+#define DataObjectGtk_h
+
+#include "CString.h"
+#include "FileList.h"
+#include "KURL.h"
+#include "Range.h"
+#include "StringHash.h"
+#include <wtf/RefCounted.h>
+#include <wtf/gtk/GRefPtr.h>
+
+typedef struct _GdkPixbuf GdkPixbuf;
+typedef struct _GdkDragContext GdkDragContext;
+typedef struct _GtkClipboard GtkClipboard;
+
+namespace WebCore {
+
+class DataObjectGtk : public RefCounted<DataObjectGtk> {
+public:
+ static PassRefPtr<DataObjectGtk> create()
+ {
+ return adoptRef(new DataObjectGtk());
+ }
+
+ Vector<KURL> uriList() { return m_uriList; }
+ GdkPixbuf* image() { return m_image.get(); }
+ void setRange(PassRefPtr<Range> newRange) { m_range = newRange; }
+ void setURIList(const Vector<KURL>& newURIList) { m_uriList = newURIList; }
+ void setImage(GdkPixbuf* newImage) { m_image = newImage; }
+ void setDragContext(GdkDragContext* newDragContext) { m_dragContext = newDragContext; }
+ bool hasText() { return m_range || !m_text.isEmpty(); }
+ bool hasMarkup() { return m_range || !m_markup.isEmpty(); }
+ bool hasURIList() { return !m_uriList.isEmpty(); }
+ bool hasImage() { return m_image; }
+ GdkDragContext* dragContext() { return m_dragContext.get(); }
+
+ String text();
+ String markup();
+ Vector<String> files();
+ void setText(const String& newText);
+ void setMarkup(const String& newMarkup);
+ bool hasURL();
+ String url();
+ String urlLabel();
+ void clear();
+
+ static DataObjectGtk* forClipboard(GtkClipboard*);
+
+private:
+ String m_text;
+ String m_markup;
+ Vector<KURL> m_uriList;
+ GRefPtr<GdkPixbuf> m_image;
+ GRefPtr<GdkDragContext> m_dragContext;
+ RefPtr<Range> m_range;
+};
+
+}
+
+#endif // DataObjectGtk_h
diff --git a/WebCore/platform/gtk/FileSystemGtk.cpp b/WebCore/platform/gtk/FileSystemGtk.cpp
index fcdc863..b8bbd60 100644
--- a/WebCore/platform/gtk/FileSystemGtk.cpp
+++ b/WebCore/platform/gtk/FileSystemGtk.cpp
@@ -42,7 +42,7 @@ String filenameToString(const char* filename)
if (!filename)
return String();
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
return String::fromUTF8(filename);
#else
gchar* escapedString = g_uri_escape_string(filename, "/:", false);
@@ -54,7 +54,7 @@ String filenameToString(const char* filename)
char* filenameFromString(const String& string)
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
return g_strdup(string.utf8().data());
#else
return g_uri_unescape_string(string.utf8().data(), 0);
@@ -64,7 +64,7 @@ char* filenameFromString(const String& string)
// Converts a string to something suitable to be displayed to the user.
String filenameForDisplay(const String& string)
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
return string;
#else
gchar* filename = filenameFromString(string);
diff --git a/WebCore/platform/gtk/GRefPtrGtk.cpp b/WebCore/platform/gtk/GRefPtrGtk.cpp
new file mode 100644
index 0000000..6647b99
--- /dev/null
+++ b/WebCore/platform/gtk/GRefPtrGtk.cpp
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2009 Martin Robinson
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#include "GRefPtrGtk.h"
+
+#include <glib.h>
+#include <gtk/gtk.h>
+
+namespace WTF {
+
+template <> GtkTargetList* refGPtr(GtkTargetList* ptr)
+{
+ if (ptr)
+ gtk_target_list_ref(ptr);
+ return ptr;
+}
+
+template <> void derefGPtr(GtkTargetList* ptr)
+{
+ if (ptr)
+ gtk_target_list_unref(ptr);
+}
+
+template <> GdkCursor* refGPtr(GdkCursor* ptr)
+{
+ if (ptr)
+ gdk_cursor_ref(ptr);
+ return ptr;
+}
+
+template <> void derefGPtr(GdkCursor* ptr)
+{
+ if (ptr)
+ gdk_cursor_unref(ptr);
+}
+
+}
diff --git a/WebCore/platform/gtk/GRefPtrGtk.h b/WebCore/platform/gtk/GRefPtrGtk.h
new file mode 100644
index 0000000..77941f5
--- /dev/null
+++ b/WebCore/platform/gtk/GRefPtrGtk.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2009 Martin Robinson
+ *
+ * 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 GRefPtrGtk_h
+#define GRefPtrGtk_h
+
+#include "GRefPtr.h"
+
+typedef struct _GtkTargetList GtkTargetList;
+typedef struct _GdkCursor GdkCursor;
+
+namespace WTF {
+
+template <> GtkTargetList* refGPtr(GtkTargetList* ptr);
+template <> void derefGPtr(GtkTargetList* ptr);
+
+template <> GdkCursor* refGPtr(GdkCursor* ptr);
+template <> void derefGPtr(GdkCursor* ptr);
+
+}
+
+#endif
diff --git a/WebCore/platform/gtk/KeyEventGtk.cpp b/WebCore/platform/gtk/KeyEventGtk.cpp
index 11ea956..e00ea43 100644
--- a/WebCore/platform/gtk/KeyEventGtk.cpp
+++ b/WebCore/platform/gtk/KeyEventGtk.cpp
@@ -181,6 +181,23 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode)
case GDK_KP_Divide:
return VK_DIVIDE; // (6F) Divide key
+ case GDK_KP_Page_Up:
+ return VK_PRIOR; // (21) PAGE UP key
+ case GDK_KP_Page_Down:
+ return VK_NEXT; // (22) PAGE DOWN key
+ case GDK_KP_End:
+ return VK_END; // (23) END key
+ case GDK_KP_Home:
+ return VK_HOME; // (24) HOME key
+ case GDK_KP_Left:
+ return VK_LEFT; // (25) LEFT ARROW key
+ case GDK_KP_Up:
+ return VK_UP; // (26) UP ARROW key
+ case GDK_KP_Right:
+ return VK_RIGHT; // (27) RIGHT ARROW key
+ case GDK_KP_Down:
+ return VK_DOWN; // (28) DOWN ARROW key
+
case GDK_BackSpace:
return VK_BACK; // (08) BACKSPACE key
case GDK_ISO_Left_Tab:
diff --git a/WebCore/platform/gtk/LocalizedStringsGtk.cpp b/WebCore/platform/gtk/LocalizedStringsGtk.cpp
index 5809e47..e0ec3ab 100644
--- a/WebCore/platform/gtk/LocalizedStringsGtk.cpp
+++ b/WebCore/platform/gtk/LocalizedStringsGtk.cpp
@@ -38,6 +38,7 @@
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
+#include <math.h>
namespace WebCore {
@@ -325,6 +326,16 @@ String AXLinkActionVerb()
return String::fromUTF8(_("jump"));
}
+String AXMenuListPopupActionVerb()
+{
+ return String();
+}
+
+String AXMenuListActionVerb()
+{
+ return String();
+}
+
String multipleFileUploadText(unsigned numberOfFiles)
{
// FIXME: If this file gets localized, this should really be localized as one string with a wildcard for the number.
diff --git a/WebCore/platform/gtk/PasteboardGtk.cpp b/WebCore/platform/gtk/PasteboardGtk.cpp
index ee95a38..0b4d356 100644
--- a/WebCore/platform/gtk/PasteboardGtk.cpp
+++ b/WebCore/platform/gtk/PasteboardGtk.cpp
@@ -171,7 +171,7 @@ PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefP
gtk_selection_data_free(data);
if (!html.isEmpty()) {
- RefPtr<DocumentFragment> fragment = createFragmentFromMarkup(frame->document(), html, "");
+ RefPtr<DocumentFragment> fragment = createFragmentFromMarkup(frame->document(), html, "", FragmentScriptingNotAllowed);
if (fragment)
return fragment.release();
}
diff --git a/WebCore/platform/gtk/PasteboardHelper.h b/WebCore/platform/gtk/PasteboardHelper.h
index e589f24..fff9a9b 100644
--- a/WebCore/platform/gtk/PasteboardHelper.h
+++ b/WebCore/platform/gtk/PasteboardHelper.h
@@ -30,7 +30,8 @@
#include "Frame.h"
-#include <gtk/gtk.h>
+typedef struct _GtkClipboard GtkClipboard;
+typedef struct _GtkTargetList GtkTargetList;
namespace WebCore {
diff --git a/WebCore/platform/gtk/PlatformScreenGtk.cpp b/WebCore/platform/gtk/PlatformScreenGtk.cpp
index a6ff954..92ccff4 100644
--- a/WebCore/platform/gtk/PlatformScreenGtk.cpp
+++ b/WebCore/platform/gtk/PlatformScreenGtk.cpp
@@ -56,7 +56,11 @@ static GdkVisual* getVisual(Widget* widget)
if (!GTK_WIDGET_REALIZED(container)) {
GtkWidget* toplevel = gtk_widget_get_toplevel(container);
+#if GTK_CHECK_VERSION(2, 18, 0)
+ if (gtk_widget_is_toplevel(toplevel))
+#else
if (GTK_WIDGET_TOPLEVEL(toplevel))
+#endif
container = toplevel;
else
return 0;
@@ -94,7 +98,11 @@ FloatRect screenRect(Widget* widget)
return FloatRect();
GtkWidget* container = gtk_widget_get_toplevel(GTK_WIDGET(widget->root()->hostWindow()->platformPageClient()));
+#if GTK_CHECK_VERSION(2, 18, 0)
+ if (!gtk_widget_is_toplevel(container))
+#else
if (!GTK_WIDGET_TOPLEVEL(container))
+#endif
return FloatRect();
GdkScreen* screen = gtk_widget_has_screen(container) ? gtk_widget_get_screen(container) : gdk_screen_get_default();
diff --git a/WebCore/platform/gtk/PopupMenuGtk.cpp b/WebCore/platform/gtk/PopupMenuGtk.cpp
index 3f6b02a..0363ac4 100644
--- a/WebCore/platform/gtk/PopupMenuGtk.cpp
+++ b/WebCore/platform/gtk/PopupMenuGtk.cpp
@@ -35,16 +35,14 @@ namespace WebCore {
PopupMenu::PopupMenu(PopupMenuClient* client)
: m_popupClient(client)
- , m_popup(0)
{
}
PopupMenu::~PopupMenu()
{
if (m_popup) {
- g_signal_handlers_disconnect_matched(m_popup, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+ g_signal_handlers_disconnect_matched(m_popup.get(), G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
hide();
- g_object_unref(m_popup);
}
}
@@ -54,10 +52,9 @@ void PopupMenu::show(const IntRect& rect, FrameView* view, int index)
if (!m_popup) {
m_popup = GTK_MENU(gtk_menu_new());
- g_object_ref_sink(G_OBJECT(m_popup));
- g_signal_connect(m_popup, "unmap", G_CALLBACK(menuUnmapped), this);
+ g_signal_connect(m_popup.get(), "unmap", G_CALLBACK(menuUnmapped), this);
} else
- gtk_container_foreach(GTK_CONTAINER(m_popup), reinterpret_cast<GtkCallback>(menuRemoveItem), this);
+ gtk_container_foreach(GTK_CONTAINER(m_popup.get()), reinterpret_cast<GtkCallback>(menuRemoveItem), this);
int x, y;
gdk_window_get_origin(GTK_WIDGET(view->hostWindow()->platformPageClient())->window, &x, &y);
@@ -78,20 +75,20 @@ void PopupMenu::show(const IntRect& rect, FrameView* view, int index)
// FIXME: Apply the PopupMenuStyle from client()->itemStyle(i)
gtk_widget_set_sensitive(item, client()->itemIsEnabled(i));
- gtk_menu_shell_append(GTK_MENU_SHELL(m_popup), item);
+ gtk_menu_shell_append(GTK_MENU_SHELL(m_popup.get()), item);
gtk_widget_show(item);
}
- gtk_menu_set_active(m_popup, index);
+ gtk_menu_set_active(m_popup.get(), index);
// The size calls are directly copied from gtkcombobox.c which is LGPL
GtkRequisition requisition;
- gtk_widget_set_size_request(GTK_WIDGET(m_popup), -1, -1);
- gtk_widget_size_request(GTK_WIDGET(m_popup), &requisition);
- gtk_widget_set_size_request(GTK_WIDGET(m_popup), MAX(rect.width(), requisition.width), -1);
+ gtk_widget_set_size_request(GTK_WIDGET(m_popup.get()), -1, -1);
+ gtk_widget_size_request(GTK_WIDGET(m_popup.get()), &requisition);
+ gtk_widget_set_size_request(GTK_WIDGET(m_popup.get()), std::max(rect.width(), requisition.width), -1);
- GList* children = GTK_MENU_SHELL(m_popup)->children;
+ GList* children = GTK_MENU_SHELL(m_popup.get())->children;
if (size)
for (int i = 0; i < size; i++) {
if (i > index)
@@ -103,18 +100,17 @@ void PopupMenu::show(const IntRect& rect, FrameView* view, int index)
m_menuPosition.setY(m_menuPosition.y() - itemRequisition.height);
children = g_list_next(children);
- }
- else
- // Center vertically the empty popup in the combo box area
- m_menuPosition.setY(m_menuPosition.y() - rect.height() / 2);
+ } else
+ // Center vertically the empty popup in the combo box area
+ m_menuPosition.setY(m_menuPosition.y() - rect.height() / 2);
- gtk_menu_popup(m_popup, NULL, NULL, reinterpret_cast<GtkMenuPositionFunc>(menuPositionFunction), this, 0, gtk_get_current_event_time());
+ gtk_menu_popup(m_popup.get(), 0, 0, reinterpret_cast<GtkMenuPositionFunc>(menuPositionFunction), this, 0, gtk_get_current_event_time());
}
void PopupMenu::hide()
{
ASSERT(m_popup);
- gtk_menu_popdown(m_popup);
+ gtk_menu_popdown(m_popup.get());
}
void PopupMenu::updateFromElement()
@@ -150,7 +146,7 @@ void PopupMenu::menuPositionFunction(GtkMenu*, gint* x, gint* y, gboolean* pushI
void PopupMenu::menuRemoveItem(GtkWidget* widget, PopupMenu* that)
{
ASSERT(that->m_popup);
- gtk_container_remove(GTK_CONTAINER(that->m_popup), widget);
+ gtk_container_remove(GTK_CONTAINER(that->m_popup.get()), widget);
}
}
diff --git a/WebCore/platform/gtk/RenderThemeGtk.cpp b/WebCore/platform/gtk/RenderThemeGtk.cpp
index 4842d68..0c157cf 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.cpp
+++ b/WebCore/platform/gtk/RenderThemeGtk.cpp
@@ -24,17 +24,87 @@
#include "config.h"
#include "RenderThemeGtk.h"
-#include "TransformationMatrix.h"
+#include "CString.h"
+#include "GOwnPtr.h"
#include "GraphicsContext.h"
+#include "HTMLMediaElement.h"
+#include "HTMLNames.h"
#include "NotImplemented.h"
#include "RenderBox.h"
#include "RenderObject.h"
+#include "TransformationMatrix.h"
+#include "UserAgentStyleSheets.h"
#include "gtkdrawing.h"
#include <gdk/gdk.h>
+#include <gtk/gtk.h>
namespace WebCore {
+using namespace HTMLNames;
+
+#if ENABLE(VIDEO)
+static HTMLMediaElement* getMediaElementFromRenderObject(RenderObject* o)
+{
+ Node* node = o->node();
+ Node* mediaNode = node ? node->shadowAncestorNode() : 0;
+ if (!mediaNode || (!mediaNode->hasTagName(videoTag) && !mediaNode->hasTagName(audioTag)))
+ return 0;
+
+ return static_cast<HTMLMediaElement*>(mediaNode);
+}
+
+static gchar* getIconNameForTextDirection(const char* baseName)
+{
+ GString* nameWithDirection = g_string_new(baseName);
+ GtkTextDirection textDirection = gtk_widget_get_default_direction();
+
+ if (textDirection == GTK_TEXT_DIR_RTL)
+ g_string_append(nameWithDirection, "-rtl");
+ else if (textDirection == GTK_TEXT_DIR_LTR)
+ g_string_append(nameWithDirection, "-ltr");
+
+ return g_string_free(nameWithDirection, FALSE);
+}
+
+void RenderThemeGtk::initMediaStyling(GtkStyle* style, bool force)
+{
+ static bool stylingInitialized = false;
+
+ if (!stylingInitialized || force) {
+ m_panelColor = style->bg[GTK_STATE_NORMAL];
+ m_sliderColor = style->bg[GTK_STATE_ACTIVE];
+ m_sliderThumbColor = style->bg[GTK_STATE_SELECTED];
+
+ // Names of these icons can vary because of text direction.
+ gchar* playButtonIconName = getIconNameForTextDirection("gtk-media-play");
+ gchar* seekBackButtonIconName = getIconNameForTextDirection("gtk-media-rewind");
+ gchar* seekForwardButtonIconName = getIconNameForTextDirection("gtk-media-forward");
+
+ m_fullscreenButton.clear();
+ m_muteButton.clear();
+ m_unmuteButton.clear();
+ m_playButton.clear();
+ m_pauseButton.clear();
+ m_seekBackButton.clear();
+ m_seekForwardButton.clear();
+
+ m_fullscreenButton = Image::loadPlatformThemeIcon("gtk-fullscreen", m_mediaIconSize);
+ m_muteButton = Image::loadPlatformThemeIcon("audio-volume-muted", m_mediaIconSize);
+ m_unmuteButton = Image::loadPlatformThemeIcon("audio-volume-high", m_mediaIconSize);
+ m_playButton = Image::loadPlatformThemeIcon(reinterpret_cast<const char*>(playButtonIconName), m_mediaIconSize);
+ m_pauseButton = Image::loadPlatformThemeIcon("gtk-media-pause", m_mediaIconSize).releaseRef();
+ m_seekBackButton = Image::loadPlatformThemeIcon(reinterpret_cast<const char*>(seekBackButtonIconName), m_mediaIconSize);
+ m_seekForwardButton = Image::loadPlatformThemeIcon(reinterpret_cast<const char*>(seekForwardButtonIconName), m_mediaIconSize);
+
+ g_free(playButtonIconName);
+ g_free(seekBackButtonIconName);
+ g_free(seekForwardButtonIconName);
+ stylingInitialized = true;
+ }
+}
+#endif
+
PassRefPtr<RenderTheme> RenderThemeGtk::create()
{
return adoptRef(new RenderThemeGtk());
@@ -53,11 +123,34 @@ RenderThemeGtk::RenderThemeGtk()
, m_gtkContainer(0)
, m_gtkEntry(0)
, m_gtkTreeView(0)
-{
- if (!mozGtkRefCount)
+ , m_panelColor(Color::white)
+ , m_sliderColor(Color::white)
+ , m_sliderThumbColor(Color::white)
+ , m_mediaIconSize(16)
+ , m_mediaSliderHeight(14)
+ , m_mediaSliderThumbWidth(12)
+ , m_mediaSliderThumbHeight(12)
+ , m_fullscreenButton(0)
+ , m_muteButton(0)
+ , m_unmuteButton(0)
+ , m_playButton(0)
+ , m_pauseButton(0)
+ , m_seekBackButton(0)
+ , m_seekForwardButton(0)
+ , m_partsTable(adoptGRef(g_hash_table_new_full(0, 0, 0, g_free)))
+{
+ if (!mozGtkRefCount) {
moz_gtk_init();
+ // Use the theme parts for the default drawable.
+ moz_gtk_use_theme_parts(partsForDrawable(0));
+ }
+
++mozGtkRefCount;
+
+#if ENABLE(VIDEO)
+ initMediaStyling(gtk_rc_get_style(GTK_WIDGET(gtkContainer())), false);
+#endif
}
RenderThemeGtk::~RenderThemeGtk()
@@ -66,22 +159,54 @@ RenderThemeGtk::~RenderThemeGtk()
if (!mozGtkRefCount)
moz_gtk_shutdown();
+
+ m_fullscreenButton.clear();
+ m_muteButton.clear();
+ m_unmuteButton.clear();
+ m_playButton.clear();
+ m_pauseButton.clear();
+ m_seekBackButton.clear();
+ m_seekForwardButton.clear();
+
+ GList* values = g_hash_table_get_values(m_partsTable.get());
+ for (guint i = 0; i < g_list_length(values); i++)
+ moz_gtk_destroy_theme_parts_widgets(
+ static_cast<GtkThemeParts*>(g_list_nth_data(values, i)));
+}
+
+GtkThemeParts* RenderThemeGtk::partsForDrawable(GdkDrawable* drawable) const
+{
+ // A null drawable represents the default screen colormap.
+ GdkColormap* colormap = 0;
+ if (!drawable)
+ colormap = gdk_screen_get_default_colormap(gdk_screen_get_default());
+ else
+ colormap = gdk_drawable_get_colormap(drawable);
+
+ GtkThemeParts* parts = static_cast<GtkThemeParts*>(g_hash_table_lookup(m_partsTable.get(), colormap));
+ if (!parts) {
+ parts = g_new0(GtkThemeParts, 1);
+ parts->colormap = colormap;
+ g_hash_table_insert(m_partsTable.get(), colormap, parts);
+ }
+
+ return parts;
}
static bool supportsFocus(ControlPart appearance)
{
switch (appearance) {
- case PushButtonPart:
- case ButtonPart:
- case TextFieldPart:
- case TextAreaPart:
- case SearchFieldPart:
- case MenulistPart:
- case RadioPart:
- case CheckboxPart:
- return true;
- default:
- return false;
+ case PushButtonPart:
+ case ButtonPart:
+ case TextFieldPart:
+ case TextAreaPart:
+ case SearchFieldPart:
+ case MenulistPart:
+ case RadioPart:
+ case CheckboxPart:
+ return true;
+ default:
+ return false;
}
}
@@ -101,8 +226,8 @@ int RenderThemeGtk::baselinePosition(const RenderObject* o) const
return 0;
// FIXME: This strategy is possibly incorrect for the GTK+ port.
- if (o->style()->appearance() == CheckboxPart ||
- o->style()->appearance() == RadioPart) {
+ if (o->style()->appearance() == CheckboxPart
+ || o->style()->appearance() == RadioPart) {
const RenderBox* box = toRenderBox(o);
return box->marginTop() + box->height() - 2;
}
@@ -122,7 +247,7 @@ static GtkTextDirection gtkTextDirection(TextDirection direction)
}
}
-static void adjustMozStyle(RenderStyle* style, GtkThemeWidgetType type)
+static void adjustMozillaStyle(const RenderThemeGtk* theme, RenderStyle* style, GtkThemeWidgetType type)
{
gint left, top, right, bottom;
GtkTextDirection direction = gtkTextDirection(style->direction());
@@ -141,7 +266,7 @@ static void adjustMozStyle(RenderStyle* style, GtkThemeWidgetType type)
style->setPaddingBottom(Length(ypadding + bottom, Fixed));
}
-static void setMozState(RenderTheme* theme, GtkWidgetState* state, RenderObject* o)
+static void setMozillaState(const RenderTheme* theme, GtkWidgetState* state, RenderObject* o)
{
state->active = theme->isPressed(o);
state->focused = theme->isFocused(o);
@@ -153,7 +278,7 @@ static void setMozState(RenderTheme* theme, GtkWidgetState* state, RenderObject*
state->depressed = false;
}
-static bool paintMozWidget(RenderTheme* theme, GtkThemeWidgetType type, RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
+static bool paintMozillaGtkWidget(const RenderThemeGtk* theme, GtkThemeWidgetType type, RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
{
// No GdkWindow to render to, so return true to fall back
if (!i.context->gdkDrawable())
@@ -164,22 +289,22 @@ static bool paintMozWidget(RenderTheme* theme, GtkThemeWidgetType type, RenderOb
return false;
GtkWidgetState mozState;
- setMozState(theme, &mozState, o);
+ setMozillaState(theme, &mozState, o);
int flags;
// We might want to make setting flags the caller's job at some point rather than doing it here.
switch (type) {
- case MOZ_GTK_BUTTON:
- flags = GTK_RELIEF_NORMAL;
- break;
- case MOZ_GTK_CHECKBUTTON:
- case MOZ_GTK_RADIOBUTTON:
- flags = theme->isChecked(o);
- break;
- default:
- flags = 0;
- break;
+ case MOZ_GTK_BUTTON:
+ flags = GTK_RELIEF_NORMAL;
+ break;
+ case MOZ_GTK_CHECKBUTTON:
+ case MOZ_GTK_RADIOBUTTON:
+ flags = theme->isChecked(o);
+ break;
+ default:
+ flags = 0;
+ break;
}
TransformationMatrix ctm = i.context->getCTM();
@@ -189,7 +314,7 @@ static bool paintMozWidget(RenderTheme* theme, GtkThemeWidgetType type, RenderOb
GtkTextDirection direction = gtkTextDirection(o->style()->direction());
// Find the clip rectangle
- cairo_t *cr = i.context->platformContext();
+ cairo_t* cr = i.context->platformContext();
double clipX1, clipX2, clipY1, clipY2;
cairo_clip_extents(cr, &clipX1, &clipY1, &clipX2, &clipY2);
@@ -202,6 +327,9 @@ static bool paintMozWidget(RenderTheme* theme, GtkThemeWidgetType type, RenderOb
gdk_rectangle_intersect(&gdkRect, &gdkClipRect, &gdkClipRect);
+ // Since the theme renderer is going to be drawing onto this GdkDrawable,
+ // select the appropriate widgets for the drawable depth.
+ moz_gtk_use_theme_parts(theme->partsForDrawable(i.context->gdkDrawable()));
return moz_gtk_widget_paint(type, i.context->gdkDrawable(), &gdkRect, &gdkClipRect, &mozState, flags, direction) != MOZ_GTK_SUCCESS;
}
@@ -215,31 +343,31 @@ static void setButtonPadding(RenderStyle* style)
style->setPaddingBottom(Length(padding / 2, Fixed));
}
-static void setToggleSize(RenderStyle* style, ControlPart appearance)
+static void setToggleSize(const RenderThemeGtk* theme, RenderStyle* style, ControlPart appearance)
{
// The width and height are both specified, so we shouldn't change them.
if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
return;
- // FIXME: This is probably not correct use of indicator_size and indicator_spacing.
- gint indicator_size, indicator_spacing;
+ // FIXME: This is probably not correct use of indicatorSize and indicatorSpacing.
+ gint indicatorSize, indicatorSpacing;
switch (appearance) {
- case CheckboxPart:
- if (moz_gtk_checkbox_get_metrics(&indicator_size, &indicator_spacing) != MOZ_GTK_SUCCESS)
- return;
- break;
- case RadioPart:
- if (moz_gtk_radio_get_metrics(&indicator_size, &indicator_spacing) != MOZ_GTK_SUCCESS)
- return;
- break;
- default:
+ case CheckboxPart:
+ if (moz_gtk_checkbox_get_metrics(&indicatorSize, &indicatorSpacing) != MOZ_GTK_SUCCESS)
return;
+ break;
+ case RadioPart:
+ if (moz_gtk_radio_get_metrics(&indicatorSize, &indicatorSpacing) != MOZ_GTK_SUCCESS)
+ return;
+ break;
+ default:
+ return;
}
// Other ports hard-code this to 13, but GTK+ users tend to demand the native look.
// It could be made a configuration option values other than 13 actually break site compatibility.
- int length = indicator_size + indicator_spacing;
+ int length = indicatorSize + indicatorSpacing;
if (style->width().isIntrinsicOrAuto())
style->setWidth(Length(length, Fixed));
@@ -249,22 +377,22 @@ static void setToggleSize(RenderStyle* style, ControlPart appearance)
void RenderThemeGtk::setCheckboxSize(RenderStyle* style) const
{
- setToggleSize(style, RadioPart);
+ setToggleSize(this, style, RadioPart);
}
bool RenderThemeGtk::paintCheckbox(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
{
- return paintMozWidget(this, MOZ_GTK_CHECKBUTTON, o, i, rect);
+ return paintMozillaGtkWidget(this, MOZ_GTK_CHECKBUTTON, o, i, rect);
}
void RenderThemeGtk::setRadioSize(RenderStyle* style) const
{
- setToggleSize(style, RadioPart);
+ setToggleSize(this, style, RadioPart);
}
bool RenderThemeGtk::paintRadio(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
{
- return paintMozWidget(this, MOZ_GTK_RADIOBUTTON, o, i, rect);
+ return paintMozillaGtkWidget(this, MOZ_GTK_RADIOBUTTON, o, i, rect);
}
void RenderThemeGtk::adjustButtonStyle(CSSStyleSelector* selector, RenderStyle* style, WebCore::Element* e) const
@@ -285,7 +413,7 @@ void RenderThemeGtk::adjustButtonStyle(CSSStyleSelector* selector, RenderStyle*
bool RenderThemeGtk::paintButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
{
- return paintMozWidget(this, MOZ_GTK_BUTTON, o, i, rect);
+ return paintMozillaGtkWidget(this, MOZ_GTK_BUTTON, o, i, rect);
}
void RenderThemeGtk::adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, WebCore::Element* e) const
@@ -294,12 +422,12 @@ void RenderThemeGtk::adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle
style->resetPadding();
style->setHeight(Length(Auto));
style->setWhiteSpace(PRE);
- adjustMozStyle(style, MOZ_GTK_DROPDOWN);
+ adjustMozillaStyle(this, style, MOZ_GTK_DROPDOWN);
}
bool RenderThemeGtk::paintMenuList(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
{
- return paintMozWidget(this, MOZ_GTK_DROPDOWN, o, i, rect);
+ return paintMozillaGtkWidget(this, MOZ_GTK_DROPDOWN, o, i, rect);
}
void RenderThemeGtk::adjustTextFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
@@ -308,12 +436,12 @@ void RenderThemeGtk::adjustTextFieldStyle(CSSStyleSelector* selector, RenderStyl
style->resetPadding();
style->setHeight(Length(Auto));
style->setWhiteSpace(PRE);
- adjustMozStyle(style, MOZ_GTK_ENTRY);
+ adjustMozillaStyle(this, style, MOZ_GTK_ENTRY);
}
bool RenderThemeGtk::paintTextField(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
{
- return paintMozWidget(this, MOZ_GTK_ENTRY, o, i, rect);
+ return paintMozillaGtkWidget(this, MOZ_GTK_ENTRY, o, i, rect);
}
bool RenderThemeGtk::paintTextArea(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
@@ -328,7 +456,7 @@ void RenderThemeGtk::adjustSearchFieldResultsButtonStyle(CSSStyleSelector* selec
bool RenderThemeGtk::paintSearchFieldResultsButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
{
- return paintMozWidget(this, MOZ_GTK_DROPDOWN_ARROW, o, i, rect);
+ return paintMozillaGtkWidget(this, MOZ_GTK_DROPDOWN_ARROW, o, i, rect);
}
void RenderThemeGtk::adjustSearchFieldResultsDecorationStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
@@ -344,7 +472,7 @@ void RenderThemeGtk::adjustSearchFieldResultsDecorationStyle(CSSStyleSelector* s
bool RenderThemeGtk::paintSearchFieldResultsDecoration(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
{
- return paintMozWidget(this, MOZ_GTK_CHECKMENUITEM, o, i, rect);
+ return paintMozillaGtkWidget(this, MOZ_GTK_CHECKMENUITEM, o, i, rect);
}
void RenderThemeGtk::adjustSearchFieldCancelButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
@@ -360,7 +488,7 @@ void RenderThemeGtk::adjustSearchFieldCancelButtonStyle(CSSStyleSelector* select
bool RenderThemeGtk::paintSearchFieldCancelButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
{
- return paintMozWidget(this, MOZ_GTK_CHECKMENUITEM, o, i, rect);
+ return paintMozillaGtkWidget(this, MOZ_GTK_CHECKMENUITEM, o, i, rect);
}
void RenderThemeGtk::adjustSearchFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
@@ -373,6 +501,16 @@ bool RenderThemeGtk::paintSearchField(RenderObject* o, const RenderObject::Paint
return paintTextField(o, i, rect);
}
+void RenderThemeGtk::adjustSliderThumbSize(RenderObject* o) const
+{
+#if ENABLE(VIDEO)
+ if (o->style()->appearance() == MediaSliderThumbPart) {
+ o->style()->setWidth(Length(m_mediaSliderThumbWidth, Fixed));
+ o->style()->setHeight(Length(m_mediaSliderThumbHeight, Fixed));
+ }
+#endif
+}
+
Color RenderThemeGtk::platformActiveSelectionBackgroundColor() const
{
GtkWidget* widget = gtkEntry();
@@ -455,6 +593,7 @@ GtkContainer* RenderThemeGtk::gtkContainer() const
m_gtkWindow = gtk_window_new(GTK_WINDOW_POPUP);
m_gtkContainer = GTK_CONTAINER(gtk_fixed_new());
+ g_signal_connect(m_gtkWindow, "style-set", G_CALLBACK(gtkStyleSetCallback), const_cast<RenderThemeGtk*>(this));
gtk_container_add(GTK_CONTAINER(m_gtkWindow), GTK_WIDGET(m_gtkContainer));
gtk_widget_realize(m_gtkWindow);
@@ -487,4 +626,78 @@ GtkWidget* RenderThemeGtk::gtkTreeView() const
return m_gtkTreeView;
}
+void RenderThemeGtk::platformColorsDidChange()
+{
+#if ENABLE(VIDEO)
+ initMediaStyling(gtk_rc_get_style(GTK_WIDGET(gtkContainer())), true);
+#endif
+ RenderTheme::platformColorsDidChange();
+}
+
+#if ENABLE(VIDEO)
+String RenderThemeGtk::extraMediaControlsStyleSheet()
+{
+ return String(mediaControlsGtkUserAgentStyleSheet, sizeof(mediaControlsGtkUserAgentStyleSheet));
+}
+
+static inline bool paintMediaButton(GraphicsContext* context, const IntRect& r, Image* image, Color panelColor, int mediaIconSize)
+{
+ context->fillRect(FloatRect(r), panelColor, DeviceColorSpace);
+ context->drawImage(image, DeviceColorSpace,
+ IntRect(r.x() + (r.width() - mediaIconSize) / 2,
+ r.y() + (r.height() - mediaIconSize) / 2,
+ mediaIconSize, mediaIconSize));
+
+ return false;
+}
+
+bool RenderThemeGtk::paintMediaFullscreenButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
+{
+ return paintMediaButton(paintInfo.context, r, m_fullscreenButton.get(), m_panelColor, m_mediaIconSize);
+}
+
+bool RenderThemeGtk::paintMediaMuteButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
+{
+ HTMLMediaElement* mediaElement = getMediaElementFromRenderObject(o);
+ if (!mediaElement)
+ return false;
+
+ return paintMediaButton(paintInfo.context, r, mediaElement->muted() ? m_unmuteButton.get() : m_muteButton.get(), m_panelColor, m_mediaIconSize);
+}
+
+bool RenderThemeGtk::paintMediaPlayButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
+{
+ HTMLMediaElement* mediaElement = getMediaElementFromRenderObject(o);
+ if (!mediaElement)
+ return false;
+
+ return paintMediaButton(paintInfo.context, r, mediaElement->canPlay() ? m_playButton.get() : m_pauseButton.get(), m_panelColor, m_mediaIconSize);
+}
+
+bool RenderThemeGtk::paintMediaSeekBackButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
+{
+ return paintMediaButton(paintInfo.context, r, m_seekBackButton.get(), m_panelColor, m_mediaIconSize);
+}
+
+bool RenderThemeGtk::paintMediaSeekForwardButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
+{
+ return paintMediaButton(paintInfo.context, r, m_seekForwardButton.get(), m_panelColor, m_mediaIconSize);
+}
+
+bool RenderThemeGtk::paintMediaSliderTrack(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
+{
+ paintInfo.context->fillRect(FloatRect(r), m_panelColor, DeviceColorSpace);
+ paintInfo.context->fillRect(FloatRect(IntRect(r.x(), r.y() + (r.height() - m_mediaSliderHeight) / 2,
+ r.width(), m_mediaSliderHeight)), m_sliderColor, DeviceColorSpace);
+ return false;
+}
+
+bool RenderThemeGtk::paintMediaSliderThumb(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
+{
+ // Make the thumb nicer with rounded corners.
+ paintInfo.context->fillRoundedRect(r, IntSize(3, 3), IntSize(3, 3), IntSize(3, 3), IntSize(3, 3), m_sliderThumbColor, DeviceColorSpace);
+ return false;
+}
+#endif
+
}
diff --git a/WebCore/platform/gtk/RenderThemeGtk.h b/WebCore/platform/gtk/RenderThemeGtk.h
index 13daaa2..e9185a5 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.h
+++ b/WebCore/platform/gtk/RenderThemeGtk.h
@@ -25,12 +25,19 @@
*
*/
-#ifndef RenderThemeGdk_h
-#define RenderThemeGdk_h
+#ifndef RenderThemeGtk_h
+#define RenderThemeGtk_h
+#include "GRefPtr.h"
#include "RenderTheme.h"
-#include <gtk/gtk.h>
+typedef struct _GtkWidget GtkWidget;
+typedef struct _GtkStyle GtkStyle;
+typedef struct _GtkContainer GtkContainer;
+typedef struct _GdkRectangle GdkRectangle;
+typedef struct _GdkDrawable GdkDrawable;
+typedef struct _GtkBorder GtkBorder;
+typedef struct _GtkThemeParts GtkThemeParts;
namespace WebCore {
@@ -73,9 +80,17 @@ public:
virtual double caretBlinkInterval() const;
+ virtual void platformColorsDidChange();
+
// System fonts.
virtual void systemFont(int propId, FontDescription&) const;
+#if ENABLE(VIDEO)
+ virtual String extraMediaControlsStyleSheet();
+#endif
+
+ GtkThemeParts* partsForDrawable(GdkDrawable*) const;
+
protected:
virtual bool paintCheckbox(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r);
virtual void setCheckboxSize(RenderStyle* style) const;
@@ -106,6 +121,18 @@ protected:
virtual void adjustSearchFieldCancelButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldCancelButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+ virtual void adjustSliderThumbSize(RenderObject*) const;
+
+#if ENABLE(VIDEO)
+ virtual void initMediaStyling(GtkStyle* style, bool force);
+ virtual bool paintMediaFullscreenButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+ virtual bool paintMediaPlayButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+ virtual bool paintMediaMuteButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+ virtual bool paintMediaSeekBackButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+ virtual bool paintMediaSeekForwardButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+ virtual bool paintMediaSliderTrack(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+ virtual bool paintMediaSliderThumb(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+#endif
private:
/*
@@ -120,13 +147,32 @@ private:
*/
GtkContainer* gtkContainer() const;
-private:
mutable GtkWidget* m_gtkWindow;
mutable GtkContainer* m_gtkContainer;
mutable GtkWidget* m_gtkEntry;
mutable GtkWidget* m_gtkTreeView;
+
+ mutable Color m_panelColor;
+ mutable Color m_sliderColor;
+ mutable Color m_sliderThumbColor;
+
+ const int m_mediaIconSize;
+ const int m_mediaSliderHeight;
+ const int m_mediaSliderThumbWidth;
+ const int m_mediaSliderThumbHeight;
+
+ RefPtr<Image> m_fullscreenButton;
+ RefPtr<Image> m_muteButton;
+ RefPtr<Image> m_unmuteButton;
+ RefPtr<Image> m_playButton;
+ RefPtr<Image> m_pauseButton;
+ RefPtr<Image> m_seekBackButton;
+ RefPtr<Image> m_seekForwardButton;
+ Page* m_page;
+ GRefPtr<GHashTable> m_partsTable;
+
};
}
-#endif
+#endif // RenderThemeGtk_h
diff --git a/WebCore/platform/gtk/ScrollViewGtk.cpp b/WebCore/platform/gtk/ScrollViewGtk.cpp
index a1ed8c3..a7e7e15 100644
--- a/WebCore/platform/gtk/ScrollViewGtk.cpp
+++ b/WebCore/platform/gtk/ScrollViewGtk.cpp
@@ -101,7 +101,6 @@ void ScrollView::setGtkAdjustments(GtkAdjustment* hadj, GtkAdjustment* vadj)
/* reconsider having a scrollbar */
setHasVerticalScrollbar(false);
setHasHorizontalScrollbar(false);
- updateScrollbars(m_scrollOffset);
}
void ScrollView::platformAddChild(Widget* child)
diff --git a/WebCore/platform/gtk/ScrollbarGtk.cpp b/WebCore/platform/gtk/ScrollbarGtk.cpp
index d7f6d26..00c6ea0 100644
--- a/WebCore/platform/gtk/ScrollbarGtk.cpp
+++ b/WebCore/platform/gtk/ScrollbarGtk.cpp
@@ -23,7 +23,6 @@
#include "GraphicsContext.h"
#include "FrameView.h"
#include "ScrollbarTheme.h"
-#include "gtkdrawing.h"
#include <gtk/gtk.h>
diff --git a/WebCore/platform/gtk/ScrollbarThemeGtk.h b/WebCore/platform/gtk/ScrollbarThemeGtk.h
index 21ccb43..618da35 100644
--- a/WebCore/platform/gtk/ScrollbarThemeGtk.h
+++ b/WebCore/platform/gtk/ScrollbarThemeGtk.h
@@ -28,6 +28,11 @@
#include "ScrollbarTheme.h"
+typedef struct _GtkWidget GtkWidget;
+typedef struct _GtkStyle GtkStyle;
+typedef struct _GtkContainer GtkContainer;
+typedef struct _GtkBorder GtkBorder;
+
namespace WebCore {
class ScrollbarThemeGtk : public ScrollbarTheme {
diff --git a/WebCore/platform/gtk/gtk2drawing.c b/WebCore/platform/gtk/gtk2drawing.c
index 1f62c96..6a8af57 100644
--- a/WebCore/platform/gtk/gtk2drawing.c
+++ b/WebCore/platform/gtk/gtk2drawing.c
@@ -44,68 +44,29 @@
* Adapted from the gtkdrawing.c, and gtk+2.0 source.
*/
-#include <gtk/gtk.h>
#include <gdk/gdkprivate.h>
-#include <string.h>
#include "gtkdrawing.h"
#include "Assertions.h"
#include <math.h>
+#include <string.h>
#define XTHICKNESS(style) (style->xthickness)
#define YTHICKNESS(style) (style->ythickness)
#define WINDOW_IS_MAPPED(window) ((window) && GDK_IS_WINDOW(window) && gdk_window_is_visible(window))
-static GtkWidget* gProtoWindow;
-static GtkWidget* gProtoLayout;
-static GtkWidget* gButtonWidget;
-static GtkWidget* gToggleButtonWidget;
-static GtkWidget* gButtonArrowWidget;
-static GtkWidget* gCheckboxWidget;
-static GtkWidget* gRadiobuttonWidget;
-static GtkWidget* gHorizScrollbarWidget;
-static GtkWidget* gVertScrollbarWidget;
-static GtkWidget* gSpinWidget;
-static GtkWidget* gHScaleWidget;
-static GtkWidget* gVScaleWidget;
-static GtkWidget* gEntryWidget;
-static GtkWidget* gComboBoxWidget;
-static GtkWidget* gComboBoxButtonWidget;
-static GtkWidget* gComboBoxArrowWidget;
-static GtkWidget* gComboBoxSeparatorWidget;
-static GtkWidget* gComboBoxEntryWidget;
-static GtkWidget* gComboBoxEntryTextareaWidget;
-static GtkWidget* gComboBoxEntryButtonWidget;
-static GtkWidget* gComboBoxEntryArrowWidget;
-static GtkWidget* gHandleBoxWidget;
-static GtkWidget* gToolbarWidget;
-static GtkWidget* gFrameWidget;
-static GtkWidget* gStatusbarWidget;
-static GtkWidget* gProgressWidget;
-static GtkWidget* gTabWidget;
-static GtkWidget* gTooltipWidget;
-static GtkWidget* gMenuBarWidget;
-static GtkWidget* gMenuBarItemWidget;
-static GtkWidget* gMenuPopupWidget;
-static GtkWidget* gMenuItemWidget;
-static GtkWidget* gImageMenuItemWidget;
-static GtkWidget* gCheckMenuItemWidget;
-static GtkWidget* gTreeViewWidget;
-static GtkTreeViewColumn* gMiddleTreeViewColumn;
-static GtkWidget* gTreeHeaderCellWidget;
-static GtkWidget* gTreeHeaderSortArrowWidget;
-static GtkWidget* gExpanderWidget;
-static GtkWidget* gToolbarSeparatorWidget;
-static GtkWidget* gMenuSeparatorWidget;
-static GtkWidget* gHPanedWidget;
-static GtkWidget* gVPanedWidget;
-static GtkWidget* gScrolledWindowWidget;
-
+static GtkThemeParts *gParts = NULL;
static style_prop_t style_prop_func;
static gboolean have_arrow_scaling;
static gboolean is_initialized;
+void
+moz_gtk_use_theme_parts(GtkThemeParts* parts)
+{
+ gParts = parts;
+}
+
/* Because we have such an unconventional way of drawing widgets, signal to the GTK theme engine
that they are drawing for Mozilla instead of a conventional GTK app so they can do any specific
things they may want to do. */
@@ -125,10 +86,14 @@ moz_gtk_enable_style_props(style_prop_t styleGetProp)
static gint
ensure_window_widget()
{
- if (!gProtoWindow) {
- gProtoWindow = gtk_window_new(GTK_WINDOW_POPUP);
- gtk_widget_realize(gProtoWindow);
- moz_gtk_set_widget_name(gProtoWindow);
+ if (!gParts->protoWindow) {
+ gParts->protoWindow = gtk_window_new(GTK_WINDOW_POPUP);
+
+ if (gParts->colormap)
+ gtk_widget_set_colormap(gParts->protoWindow, gParts->colormap);
+
+ gtk_widget_realize(gParts->protoWindow);
+ moz_gtk_set_widget_name(gParts->protoWindow);
}
return MOZ_GTK_SUCCESS;
}
@@ -137,12 +102,12 @@ static gint
setup_widget_prototype(GtkWidget* widget)
{
ensure_window_widget();
- if (!gProtoLayout) {
- gProtoLayout = gtk_fixed_new();
- gtk_container_add(GTK_CONTAINER(gProtoWindow), gProtoLayout);
+ if (!gParts->protoLayout) {
+ gParts->protoLayout = gtk_fixed_new();
+ gtk_container_add(GTK_CONTAINER(gParts->protoWindow), gParts->protoLayout);
}
- gtk_container_add(GTK_CONTAINER(gProtoLayout), widget);
+ gtk_container_add(GTK_CONTAINER(gParts->protoLayout), widget);
gtk_widget_realize(widget);
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", GINT_TO_POINTER(TRUE));
return MOZ_GTK_SUCCESS;
@@ -151,9 +116,9 @@ setup_widget_prototype(GtkWidget* widget)
static gint
ensure_button_widget()
{
- if (!gButtonWidget) {
- gButtonWidget = gtk_button_new_with_label("M");
- setup_widget_prototype(gButtonWidget);
+ if (!gParts->buttonWidget) {
+ gParts->buttonWidget = gtk_button_new_with_label("M");
+ setup_widget_prototype(gParts->buttonWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -161,9 +126,9 @@ ensure_button_widget()
static gint
ensure_hpaned_widget()
{
- if (!gHPanedWidget) {
- gHPanedWidget = gtk_hpaned_new();
- setup_widget_prototype(gHPanedWidget);
+ if (!gParts->hpanedWidget) {
+ gParts->hpanedWidget = gtk_hpaned_new();
+ setup_widget_prototype(gParts->hpanedWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -171,9 +136,9 @@ ensure_hpaned_widget()
static gint
ensure_vpaned_widget()
{
- if (!gVPanedWidget) {
- gVPanedWidget = gtk_vpaned_new();
- setup_widget_prototype(gVPanedWidget);
+ if (!gParts->vpanedWidget) {
+ gParts->vpanedWidget = gtk_vpaned_new();
+ setup_widget_prototype(gParts->vpanedWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -181,11 +146,11 @@ ensure_vpaned_widget()
static gint
ensure_toggle_button_widget()
{
- if (!gToggleButtonWidget) {
- gToggleButtonWidget = gtk_toggle_button_new();
- setup_widget_prototype(gToggleButtonWidget);
+ if (!gParts->toggleButtonWidget) {
+ gParts->toggleButtonWidget = gtk_toggle_button_new();
+ setup_widget_prototype(gParts->toggleButtonWidget);
/* toggle button must be set active to get the right style on hover. */
- GTK_TOGGLE_BUTTON(gToggleButtonWidget)->active = TRUE;
+ GTK_TOGGLE_BUTTON(gParts->toggleButtonWidget)->active = TRUE;
}
return MOZ_GTK_SUCCESS;
}
@@ -193,12 +158,12 @@ ensure_toggle_button_widget()
static gint
ensure_button_arrow_widget()
{
- if (!gButtonArrowWidget) {
+ if (!gParts->buttonArrowWidget) {
ensure_toggle_button_widget();
- gButtonArrowWidget = gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_OUT);
- gtk_container_add(GTK_CONTAINER(gToggleButtonWidget), gButtonArrowWidget);
- gtk_widget_realize(gButtonArrowWidget);
+ gParts->buttonArrowWidget = gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_OUT);
+ gtk_container_add(GTK_CONTAINER(gParts->toggleButtonWidget), gParts->buttonArrowWidget);
+ gtk_widget_realize(gParts->buttonArrowWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -206,9 +171,9 @@ ensure_button_arrow_widget()
static gint
ensure_checkbox_widget()
{
- if (!gCheckboxWidget) {
- gCheckboxWidget = gtk_check_button_new_with_label("M");
- setup_widget_prototype(gCheckboxWidget);
+ if (!gParts->checkboxWidget) {
+ gParts->checkboxWidget = gtk_check_button_new_with_label("M");
+ setup_widget_prototype(gParts->checkboxWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -216,9 +181,9 @@ ensure_checkbox_widget()
static gint
ensure_radiobutton_widget()
{
- if (!gRadiobuttonWidget) {
- gRadiobuttonWidget = gtk_radio_button_new_with_label(NULL, "M");
- setup_widget_prototype(gRadiobuttonWidget);
+ if (!gParts->radiobuttonWidget) {
+ gParts->radiobuttonWidget = gtk_radio_button_new_with_label(NULL, "M");
+ setup_widget_prototype(gParts->radiobuttonWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -226,13 +191,13 @@ ensure_radiobutton_widget()
static gint
ensure_scrollbar_widget()
{
- if (!gVertScrollbarWidget) {
- gVertScrollbarWidget = gtk_vscrollbar_new(NULL);
- setup_widget_prototype(gVertScrollbarWidget);
+ if (!gParts->vertScrollbarWidget) {
+ gParts->vertScrollbarWidget = gtk_vscrollbar_new(NULL);
+ setup_widget_prototype(gParts->vertScrollbarWidget);
}
- if (!gHorizScrollbarWidget) {
- gHorizScrollbarWidget = gtk_hscrollbar_new(NULL);
- setup_widget_prototype(gHorizScrollbarWidget);
+ if (!gParts->horizScrollbarWidget) {
+ gParts->horizScrollbarWidget = gtk_hscrollbar_new(NULL);
+ setup_widget_prototype(gParts->horizScrollbarWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -240,9 +205,9 @@ ensure_scrollbar_widget()
static gint
ensure_spin_widget()
{
- if (!gSpinWidget) {
- gSpinWidget = gtk_spin_button_new(NULL, 1, 0);
- setup_widget_prototype(gSpinWidget);
+ if (!gParts->spinWidget) {
+ gParts->spinWidget = gtk_spin_button_new(NULL, 1, 0);
+ setup_widget_prototype(gParts->spinWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -250,13 +215,13 @@ ensure_spin_widget()
static gint
ensure_scale_widget()
{
- if (!gHScaleWidget) {
- gHScaleWidget = gtk_hscale_new(NULL);
- setup_widget_prototype(gHScaleWidget);
+ if (!gParts->hScaleWidget) {
+ gParts->hScaleWidget = gtk_hscale_new(NULL);
+ setup_widget_prototype(gParts->hScaleWidget);
}
- if (!gVScaleWidget) {
- gVScaleWidget = gtk_vscale_new(NULL);
- setup_widget_prototype(gVScaleWidget);
+ if (!gParts->vScaleWidget) {
+ gParts->vScaleWidget = gtk_vscale_new(NULL);
+ setup_widget_prototype(gParts->vScaleWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -264,9 +229,9 @@ ensure_scale_widget()
static gint
ensure_entry_widget()
{
- if (!gEntryWidget) {
- gEntryWidget = gtk_entry_new();
- setup_widget_prototype(gEntryWidget);
+ if (!gParts->entryWidget) {
+ gParts->entryWidget = gtk_entry_new();
+ setup_widget_prototype(gParts->entryWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -279,15 +244,15 @@ ensure_entry_widget()
* g_object_add_weak_pointer().
* Note that if we don't find the inner widgets (which shouldn't happen), we
* fallback to use generic "non-inner" widgets, and they don't need that kind
- * of weak pointer since they are explicit children of gProtoWindow and as
+ * of weak pointer since they are explicit children of gParts->protoWindow and as
* such GTK holds a strong reference to them. */
static void
moz_gtk_get_combo_box_inner_button(GtkWidget *widget, gpointer client_data)
{
if (GTK_IS_TOGGLE_BUTTON(widget)) {
- gComboBoxButtonWidget = widget;
+ gParts->comboBoxButtonWidget = widget;
g_object_add_weak_pointer(G_OBJECT(widget),
- (gpointer) &gComboBoxButtonWidget);
+ (gpointer) &gParts->comboBoxButtonWidget);
gtk_widget_realize(widget);
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
@@ -298,13 +263,13 @@ moz_gtk_get_combo_box_button_inner_widgets(GtkWidget *widget,
gpointer client_data)
{
if (GTK_IS_SEPARATOR(widget)) {
- gComboBoxSeparatorWidget = widget;
+ gParts->comboBoxSeparatorWidget = widget;
g_object_add_weak_pointer(G_OBJECT(widget),
- (gpointer) &gComboBoxSeparatorWidget);
+ (gpointer) &gParts->comboBoxSeparatorWidget);
} else if (GTK_IS_ARROW(widget)) {
- gComboBoxArrowWidget = widget;
+ gParts->comboBoxArrowWidget = widget;
g_object_add_weak_pointer(G_OBJECT(widget),
- (gpointer) &gComboBoxArrowWidget);
+ (gpointer) &gParts->comboBoxArrowWidget);
} else
return;
gtk_widget_realize(widget);
@@ -316,23 +281,23 @@ ensure_combo_box_widgets()
{
GtkWidget* buttonChild;
- if (gComboBoxButtonWidget && gComboBoxArrowWidget)
+ if (gParts->comboBoxButtonWidget && gParts->comboBoxArrowWidget)
return MOZ_GTK_SUCCESS;
/* Create a ComboBox if needed */
- if (!gComboBoxWidget) {
- gComboBoxWidget = gtk_combo_box_new();
- setup_widget_prototype(gComboBoxWidget);
+ if (!gParts->comboBoxWidget) {
+ gParts->comboBoxWidget = gtk_combo_box_new();
+ setup_widget_prototype(gParts->comboBoxWidget);
}
/* Get its inner Button */
- gtk_container_forall(GTK_CONTAINER(gComboBoxWidget),
+ gtk_container_forall(GTK_CONTAINER(gParts->comboBoxWidget),
moz_gtk_get_combo_box_inner_button,
NULL);
- if (gComboBoxButtonWidget) {
+ if (gParts->comboBoxButtonWidget) {
/* Get the widgets inside the Button */
- buttonChild = GTK_BIN(gComboBoxButtonWidget)->child;
+ buttonChild = GTK_BIN(gParts->comboBoxButtonWidget)->child;
if (GTK_IS_HBOX(buttonChild)) {
/* appears-as-list = FALSE, cell-view = TRUE; the button
* contains an hbox. This hbox is there because the ComboBox
@@ -344,11 +309,11 @@ ensure_combo_box_widgets()
} else if(GTK_IS_ARROW(buttonChild)) {
/* appears-as-list = TRUE, or cell-view = FALSE;
* the button only contains an arrow */
- gComboBoxArrowWidget = buttonChild;
+ gParts->comboBoxArrowWidget = buttonChild;
g_object_add_weak_pointer(G_OBJECT(buttonChild), (gpointer)
- &gComboBoxArrowWidget);
- gtk_widget_realize(gComboBoxArrowWidget);
- g_object_set_data(G_OBJECT(gComboBoxArrowWidget),
+ &gParts->comboBoxArrowWidget);
+ gtk_widget_realize(gParts->comboBoxArrowWidget);
+ g_object_set_data(G_OBJECT(gParts->comboBoxArrowWidget),
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
} else {
@@ -356,18 +321,18 @@ ensure_combo_box_widgets()
* use a generic toggle button as last resort fallback to avoid
* crashing. */
ensure_toggle_button_widget();
- gComboBoxButtonWidget = gToggleButtonWidget;
+ gParts->comboBoxButtonWidget = gParts->toggleButtonWidget;
}
- if (!gComboBoxArrowWidget) {
+ if (!gParts->comboBoxArrowWidget) {
/* Shouldn't be reached with current internal gtk implementation;
- * we gButtonArrowWidget as last resort fallback to avoid
+ * we gParts->buttonArrowWidget as last resort fallback to avoid
* crashing. */
ensure_button_arrow_widget();
- gComboBoxArrowWidget = gButtonArrowWidget;
+ gParts->comboBoxArrowWidget = gParts->buttonArrowWidget;
}
- /* We don't test the validity of gComboBoxSeparatorWidget since there
+ /* We don't test the validity of gParts->comboBoxSeparatorWidget since there
* is none when "appears-as-list" = TRUE or "cell-view" = FALSE; if it
* is invalid we just won't paint it. */
@@ -382,20 +347,20 @@ ensure_combo_box_widgets()
* g_object_add_weak_pointer().
* Note that if we don't find the inner widgets (which shouldn't happen), we
* fallback to use generic "non-inner" widgets, and they don't need that kind
- * of weak pointer since they are explicit children of gProtoWindow and as
+ * of weak pointer since they are explicit children of gParts->protoWindow and as
* such GTK holds a strong reference to them. */
static void
moz_gtk_get_combo_box_entry_inner_widgets(GtkWidget *widget,
gpointer client_data)
{
if (GTK_IS_TOGGLE_BUTTON(widget)) {
- gComboBoxEntryButtonWidget = widget;
+ gParts->comboBoxEntryButtonWidget = widget;
g_object_add_weak_pointer(G_OBJECT(widget),
- (gpointer) &gComboBoxEntryButtonWidget);
+ (gpointer) &gParts->comboBoxEntryButtonWidget);
} else if (GTK_IS_ENTRY(widget)) {
- gComboBoxEntryTextareaWidget = widget;
+ gParts->comboBoxEntryTextareaWidget = widget;
g_object_add_weak_pointer(G_OBJECT(widget),
- (gpointer) &gComboBoxEntryTextareaWidget);
+ (gpointer) &gParts->comboBoxEntryTextareaWidget);
} else
return;
gtk_widget_realize(widget);
@@ -406,9 +371,9 @@ static void
moz_gtk_get_combo_box_entry_arrow(GtkWidget *widget, gpointer client_data)
{
if (GTK_IS_ARROW(widget)) {
- gComboBoxEntryArrowWidget = widget;
+ gParts->comboBoxEntryArrowWidget = widget;
g_object_add_weak_pointer(G_OBJECT(widget),
- (gpointer) &gComboBoxEntryArrowWidget);
+ (gpointer) &gParts->comboBoxEntryArrowWidget);
gtk_widget_realize(widget);
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
@@ -419,30 +384,30 @@ ensure_combo_box_entry_widgets()
{
GtkWidget* buttonChild;
- if (gComboBoxEntryTextareaWidget &&
- gComboBoxEntryButtonWidget &&
- gComboBoxEntryArrowWidget)
+ if (gParts->comboBoxEntryTextareaWidget &&
+ gParts->comboBoxEntryButtonWidget &&
+ gParts->comboBoxEntryArrowWidget)
return MOZ_GTK_SUCCESS;
/* Create a ComboBoxEntry if needed */
- if (!gComboBoxEntryWidget) {
- gComboBoxEntryWidget = gtk_combo_box_entry_new();
- setup_widget_prototype(gComboBoxEntryWidget);
+ if (!gParts->comboBoxEntryWidget) {
+ gParts->comboBoxEntryWidget = gtk_combo_box_entry_new();
+ setup_widget_prototype(gParts->comboBoxEntryWidget);
}
/* Get its inner Entry and Button */
- gtk_container_forall(GTK_CONTAINER(gComboBoxEntryWidget),
+ gtk_container_forall(GTK_CONTAINER(gParts->comboBoxEntryWidget),
moz_gtk_get_combo_box_entry_inner_widgets,
NULL);
- if (!gComboBoxEntryTextareaWidget) {
+ if (!gParts->comboBoxEntryTextareaWidget) {
ensure_entry_widget();
- gComboBoxEntryTextareaWidget = gEntryWidget;
+ gParts->comboBoxEntryTextareaWidget = gParts->entryWidget;
}
- if (gComboBoxEntryButtonWidget) {
+ if (gParts->comboBoxEntryButtonWidget) {
/* Get the Arrow inside the Button */
- buttonChild = GTK_BIN(gComboBoxEntryButtonWidget)->child;
+ buttonChild = GTK_BIN(gParts->comboBoxEntryButtonWidget)->child;
if (GTK_IS_HBOX(buttonChild)) {
/* appears-as-list = FALSE, cell-view = TRUE; the button
* contains an hbox. This hbox is there because ComboBoxEntry
@@ -457,11 +422,11 @@ ensure_combo_box_entry_widgets()
} else if(GTK_IS_ARROW(buttonChild)) {
/* appears-as-list = TRUE, or cell-view = FALSE;
* the button only contains an arrow */
- gComboBoxEntryArrowWidget = buttonChild;
+ gParts->comboBoxEntryArrowWidget = buttonChild;
g_object_add_weak_pointer(G_OBJECT(buttonChild), (gpointer)
- &gComboBoxEntryArrowWidget);
- gtk_widget_realize(gComboBoxEntryArrowWidget);
- g_object_set_data(G_OBJECT(gComboBoxEntryArrowWidget),
+ &gParts->comboBoxEntryArrowWidget);
+ gtk_widget_realize(gParts->comboBoxEntryArrowWidget);
+ g_object_set_data(G_OBJECT(gParts->comboBoxEntryArrowWidget),
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
} else {
@@ -469,15 +434,15 @@ ensure_combo_box_entry_widgets()
* we use a generic toggle button as last resort fallback to avoid
* crashing. */
ensure_toggle_button_widget();
- gComboBoxEntryButtonWidget = gToggleButtonWidget;
+ gParts->comboBoxEntryButtonWidget = gParts->toggleButtonWidget;
}
- if (!gComboBoxEntryArrowWidget) {
+ if (!gParts->comboBoxEntryArrowWidget) {
/* Shouldn't be reached with current internal gtk implementation;
- * we gButtonArrowWidget as last resort fallback to avoid
+ * we gParts->buttonArrowWidget as last resort fallback to avoid
* crashing. */
ensure_button_arrow_widget();
- gComboBoxEntryArrowWidget = gButtonArrowWidget;
+ gParts->comboBoxEntryArrowWidget = gParts->buttonArrowWidget;
}
return MOZ_GTK_SUCCESS;
@@ -487,9 +452,9 @@ ensure_combo_box_entry_widgets()
static gint
ensure_handlebox_widget()
{
- if (!gHandleBoxWidget) {
- gHandleBoxWidget = gtk_handle_box_new();
- setup_widget_prototype(gHandleBoxWidget);
+ if (!gParts->handleBoxWidget) {
+ gParts->handleBoxWidget = gtk_handle_box_new();
+ setup_widget_prototype(gParts->handleBoxWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -497,12 +462,12 @@ ensure_handlebox_widget()
static gint
ensure_toolbar_widget()
{
- if (!gToolbarWidget) {
+ if (!gParts->toolbarWidget) {
ensure_handlebox_widget();
- gToolbarWidget = gtk_toolbar_new();
- gtk_container_add(GTK_CONTAINER(gHandleBoxWidget), gToolbarWidget);
- gtk_widget_realize(gToolbarWidget);
- g_object_set_data(G_OBJECT(gToolbarWidget), "transparent-bg-hint", GINT_TO_POINTER(TRUE));
+ gParts->toolbarWidget = gtk_toolbar_new();
+ gtk_container_add(GTK_CONTAINER(gParts->handleBoxWidget), gParts->toolbarWidget);
+ gtk_widget_realize(gParts->toolbarWidget);
+ g_object_set_data(G_OBJECT(gParts->toolbarWidget), "transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
return MOZ_GTK_SUCCESS;
}
@@ -510,10 +475,10 @@ ensure_toolbar_widget()
static gint
ensure_toolbar_separator_widget()
{
- if (!gToolbarSeparatorWidget) {
+ if (!gParts->toolbarSeparatorWidget) {
ensure_toolbar_widget();
- gToolbarSeparatorWidget = GTK_WIDGET(gtk_separator_tool_item_new());
- setup_widget_prototype(gToolbarSeparatorWidget);
+ gParts->toolbarSeparatorWidget = GTK_WIDGET(gtk_separator_tool_item_new());
+ setup_widget_prototype(gParts->toolbarSeparatorWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -521,10 +486,10 @@ ensure_toolbar_separator_widget()
static gint
ensure_tooltip_widget()
{
- if (!gTooltipWidget) {
- gTooltipWidget = gtk_window_new(GTK_WINDOW_POPUP);
- gtk_widget_realize(gTooltipWidget);
- moz_gtk_set_widget_name(gTooltipWidget);
+ if (!gParts->tooltipWidget) {
+ gParts->tooltipWidget = gtk_window_new(GTK_WINDOW_POPUP);
+ gtk_widget_realize(gParts->tooltipWidget);
+ moz_gtk_set_widget_name(gParts->tooltipWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -532,9 +497,9 @@ ensure_tooltip_widget()
static gint
ensure_tab_widget()
{
- if (!gTabWidget) {
- gTabWidget = gtk_notebook_new();
- setup_widget_prototype(gTabWidget);
+ if (!gParts->tabWidget) {
+ gParts->tabWidget = gtk_notebook_new();
+ setup_widget_prototype(gParts->tabWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -542,9 +507,9 @@ ensure_tab_widget()
static gint
ensure_progress_widget()
{
- if (!gProgressWidget) {
- gProgressWidget = gtk_progress_bar_new();
- setup_widget_prototype(gProgressWidget);
+ if (!gParts->progresWidget) {
+ gParts->progresWidget = gtk_progress_bar_new();
+ setup_widget_prototype(gParts->progresWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -552,9 +517,9 @@ ensure_progress_widget()
static gint
ensure_statusbar_widget()
{
- if (!gStatusbarWidget) {
- gStatusbarWidget = gtk_statusbar_new();
- setup_widget_prototype(gStatusbarWidget);
+ if (!gParts->statusbarWidget) {
+ gParts->statusbarWidget = gtk_statusbar_new();
+ setup_widget_prototype(gParts->statusbarWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -562,11 +527,11 @@ ensure_statusbar_widget()
static gint
ensure_frame_widget()
{
- if (!gFrameWidget) {
+ if (!gParts->frameWidget) {
ensure_statusbar_widget();
- gFrameWidget = gtk_frame_new(NULL);
- gtk_container_add(GTK_CONTAINER(gStatusbarWidget), gFrameWidget);
- gtk_widget_realize(gFrameWidget);
+ gParts->frameWidget = gtk_frame_new(NULL);
+ gtk_container_add(GTK_CONTAINER(gParts->statusbarWidget), gParts->frameWidget);
+ gtk_widget_realize(gParts->frameWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -574,9 +539,9 @@ ensure_frame_widget()
static gint
ensure_menu_bar_widget()
{
- if (!gMenuBarWidget) {
- gMenuBarWidget = gtk_menu_bar_new();
- setup_widget_prototype(gMenuBarWidget);
+ if (!gParts->menuBarWidget) {
+ gParts->menuBarWidget = gtk_menu_bar_new();
+ setup_widget_prototype(gParts->menuBarWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -584,13 +549,13 @@ ensure_menu_bar_widget()
static gint
ensure_menu_bar_item_widget()
{
- if (!gMenuBarItemWidget) {
+ if (!gParts->menuBarItemWidget) {
ensure_menu_bar_widget();
- gMenuBarItemWidget = gtk_menu_item_new();
- gtk_menu_shell_append(GTK_MENU_SHELL(gMenuBarWidget),
- gMenuBarItemWidget);
- gtk_widget_realize(gMenuBarItemWidget);
- g_object_set_data(G_OBJECT(gMenuBarItemWidget),
+ gParts->menuBarItemWidget = gtk_menu_item_new();
+ gtk_menu_shell_append(GTK_MENU_SHELL(gParts->menuBarWidget),
+ gParts->menuBarItemWidget);
+ gtk_widget_realize(gParts->menuBarItemWidget);
+ g_object_set_data(G_OBJECT(gParts->menuBarItemWidget),
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
return MOZ_GTK_SUCCESS;
@@ -599,13 +564,13 @@ ensure_menu_bar_item_widget()
static gint
ensure_menu_popup_widget()
{
- if (!gMenuPopupWidget) {
+ if (!gParts->menuPopupWidget) {
ensure_menu_bar_item_widget();
- gMenuPopupWidget = gtk_menu_new();
- gtk_menu_item_set_submenu(GTK_MENU_ITEM(gMenuBarItemWidget),
- gMenuPopupWidget);
- gtk_widget_realize(gMenuPopupWidget);
- g_object_set_data(G_OBJECT(gMenuPopupWidget),
+ gParts->menuPopupWidget = gtk_menu_new();
+ gtk_menu_item_set_submenu(GTK_MENU_ITEM(gParts->menuBarItemWidget),
+ gParts->menuPopupWidget);
+ gtk_widget_realize(gParts->menuPopupWidget);
+ g_object_set_data(G_OBJECT(gParts->menuPopupWidget),
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
return MOZ_GTK_SUCCESS;
@@ -614,13 +579,13 @@ ensure_menu_popup_widget()
static gint
ensure_menu_item_widget()
{
- if (!gMenuItemWidget) {
+ if (!gParts->menuItemWidget) {
ensure_menu_popup_widget();
- gMenuItemWidget = gtk_menu_item_new_with_label("M");
- gtk_menu_shell_append(GTK_MENU_SHELL(gMenuPopupWidget),
- gMenuItemWidget);
- gtk_widget_realize(gMenuItemWidget);
- g_object_set_data(G_OBJECT(gMenuItemWidget),
+ gParts->menuItemWidget = gtk_menu_item_new_with_label("M");
+ gtk_menu_shell_append(GTK_MENU_SHELL(gParts->menuPopupWidget),
+ gParts->menuItemWidget);
+ gtk_widget_realize(gParts->menuItemWidget);
+ g_object_set_data(G_OBJECT(gParts->menuItemWidget),
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
return MOZ_GTK_SUCCESS;
@@ -629,13 +594,13 @@ ensure_menu_item_widget()
static gint
ensure_image_menu_item_widget()
{
- if (!gImageMenuItemWidget) {
+ if (!gParts->imageMenuItemWidget) {
ensure_menu_popup_widget();
- gImageMenuItemWidget = gtk_image_menu_item_new();
- gtk_menu_shell_append(GTK_MENU_SHELL(gMenuPopupWidget),
- gImageMenuItemWidget);
- gtk_widget_realize(gImageMenuItemWidget);
- g_object_set_data(G_OBJECT(gImageMenuItemWidget),
+ gParts->imageMenuItemWidget = gtk_image_menu_item_new();
+ gtk_menu_shell_append(GTK_MENU_SHELL(gParts->menuPopupWidget),
+ gParts->imageMenuItemWidget);
+ gtk_widget_realize(gParts->imageMenuItemWidget);
+ g_object_set_data(G_OBJECT(gParts->imageMenuItemWidget),
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
return MOZ_GTK_SUCCESS;
@@ -644,13 +609,13 @@ ensure_image_menu_item_widget()
static gint
ensure_menu_separator_widget()
{
- if (!gMenuSeparatorWidget) {
+ if (!gParts->menuSeparatorWidget) {
ensure_menu_popup_widget();
- gMenuSeparatorWidget = gtk_separator_menu_item_new();
- gtk_menu_shell_append(GTK_MENU_SHELL(gMenuPopupWidget),
- gMenuSeparatorWidget);
- gtk_widget_realize(gMenuSeparatorWidget);
- g_object_set_data(G_OBJECT(gMenuSeparatorWidget),
+ gParts->menuSeparatorWidget = gtk_separator_menu_item_new();
+ gtk_menu_shell_append(GTK_MENU_SHELL(gParts->menuPopupWidget),
+ gParts->menuSeparatorWidget);
+ gtk_widget_realize(gParts->menuSeparatorWidget);
+ g_object_set_data(G_OBJECT(gParts->menuSeparatorWidget),
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
return MOZ_GTK_SUCCESS;
@@ -659,13 +624,13 @@ ensure_menu_separator_widget()
static gint
ensure_check_menu_item_widget()
{
- if (!gCheckMenuItemWidget) {
+ if (!gParts->checkMenuItemWidget) {
ensure_menu_popup_widget();
- gCheckMenuItemWidget = gtk_check_menu_item_new_with_label("M");
- gtk_menu_shell_append(GTK_MENU_SHELL(gMenuPopupWidget),
- gCheckMenuItemWidget);
- gtk_widget_realize(gCheckMenuItemWidget);
- g_object_set_data(G_OBJECT(gCheckMenuItemWidget),
+ gParts->checkMenuItemWidget = gtk_check_menu_item_new_with_label("M");
+ gtk_menu_shell_append(GTK_MENU_SHELL(gParts->menuPopupWidget),
+ gParts->checkMenuItemWidget);
+ gtk_widget_realize(gParts->checkMenuItemWidget);
+ g_object_set_data(G_OBJECT(gParts->checkMenuItemWidget),
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
return MOZ_GTK_SUCCESS;
@@ -674,9 +639,9 @@ ensure_check_menu_item_widget()
static gint
ensure_tree_view_widget()
{
- if (!gTreeViewWidget) {
- gTreeViewWidget = gtk_tree_view_new();
- setup_widget_prototype(gTreeViewWidget);
+ if (!gParts->treeViewWidget) {
+ gParts->treeViewWidget = gtk_tree_view_new();
+ setup_widget_prototype(gParts->treeViewWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -684,7 +649,7 @@ ensure_tree_view_widget()
static gint
ensure_tree_header_cell_widget()
{
- if(!gTreeHeaderCellWidget) {
+ if(!gParts->treeHeaderCellWidget) {
/*
* Some GTK engines paint the first and last cell
* of a TreeView header with a highlight.
@@ -706,23 +671,23 @@ ensure_tree_header_cell_widget()
/* Create and append our three columns */
firstTreeViewColumn = gtk_tree_view_column_new();
gtk_tree_view_column_set_title(firstTreeViewColumn, "M");
- gtk_tree_view_append_column(GTK_TREE_VIEW(gTreeViewWidget), firstTreeViewColumn);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(gParts->treeViewWidget), firstTreeViewColumn);
- gMiddleTreeViewColumn = gtk_tree_view_column_new();
- gtk_tree_view_column_set_title(gMiddleTreeViewColumn, "M");
- gtk_tree_view_append_column(GTK_TREE_VIEW(gTreeViewWidget),
- gMiddleTreeViewColumn);
+ gParts->middleTreeViewColumn = gtk_tree_view_column_new();
+ gtk_tree_view_column_set_title(gParts->middleTreeViewColumn, "M");
+ gtk_tree_view_append_column(GTK_TREE_VIEW(gParts->treeViewWidget),
+ gParts->middleTreeViewColumn);
lastTreeViewColumn = gtk_tree_view_column_new();
gtk_tree_view_column_set_title(lastTreeViewColumn, "M");
- gtk_tree_view_append_column(GTK_TREE_VIEW(gTreeViewWidget), lastTreeViewColumn);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(gParts->treeViewWidget), lastTreeViewColumn);
/* Use the middle column's header for our button */
- gTreeHeaderCellWidget = gMiddleTreeViewColumn->button;
- gTreeHeaderSortArrowWidget = gMiddleTreeViewColumn->arrow;
- g_object_set_data(G_OBJECT(gTreeHeaderCellWidget),
+ gParts->treeHeaderCellWidget = gParts->middleTreeViewColumn->button;
+ gParts->treeHeaderSortArrowWidget = gParts->middleTreeViewColumn->arrow;
+ g_object_set_data(G_OBJECT(gParts->treeHeaderCellWidget),
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
- g_object_set_data(G_OBJECT(gTreeHeaderSortArrowWidget),
+ g_object_set_data(G_OBJECT(gParts->treeHeaderSortArrowWidget),
"transparent-bg-hint", GINT_TO_POINTER(TRUE));
}
return MOZ_GTK_SUCCESS;
@@ -731,9 +696,9 @@ ensure_tree_header_cell_widget()
static gint
ensure_expander_widget()
{
- if (!gExpanderWidget) {
- gExpanderWidget = gtk_expander_new("M");
- setup_widget_prototype(gExpanderWidget);
+ if (!gParts->expanderWidget) {
+ gParts->expanderWidget = gtk_expander_new("M");
+ setup_widget_prototype(gParts->expanderWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -741,9 +706,9 @@ ensure_expander_widget()
static gint
ensure_scrolled_window_widget()
{
- if (!gScrolledWindowWidget) {
- gScrolledWindowWidget = gtk_scrolled_window_new(NULL, NULL);
- setup_widget_prototype(gScrolledWindowWidget);
+ if (!gParts->scrolledWindowWidget) {
+ gParts->scrolledWindowWidget = gtk_scrolled_window_new(NULL, NULL);
+ setup_widget_prototype(gParts->scrolledWindowWidget);
}
return MOZ_GTK_SUCCESS;
}
@@ -898,7 +863,7 @@ moz_gtk_checkbox_get_metrics(gint* indicator_size, gint* indicator_spacing)
{
ensure_checkbox_widget();
- gtk_widget_style_get (gCheckboxWidget,
+ gtk_widget_style_get (gParts->checkboxWidget,
"indicator_size", indicator_size,
"indicator_spacing", indicator_spacing,
NULL);
@@ -911,7 +876,7 @@ moz_gtk_radio_get_metrics(gint* indicator_size, gint* indicator_spacing)
{
ensure_radiobutton_widget();
- gtk_widget_style_get (gRadiobuttonWidget,
+ gtk_widget_style_get (gParts->radiobuttonWidget,
"indicator_size", indicator_size,
"indicator_spacing", indicator_spacing,
NULL);
@@ -937,10 +902,10 @@ moz_gtk_splitter_get_metrics(gint orientation, gint* size)
{
if (orientation == GTK_ORIENTATION_HORIZONTAL) {
ensure_hpaned_widget();
- gtk_widget_style_get(gHPanedWidget, "handle_size", size, NULL);
+ gtk_widget_style_get(gParts->hpanedWidget, "handle_size", size, NULL);
} else {
ensure_vpaned_widget();
- gtk_widget_style_get(gVPanedWidget, "handle_size", size, NULL);
+ gtk_widget_style_get(gParts->vpanedWidget, "handle_size", size, NULL);
}
return MOZ_GTK_SUCCESS;
}
@@ -979,10 +944,10 @@ moz_gtk_toggle_paint(GdkDrawable* drawable, GdkRectangle* rect,
if (isradio) {
moz_gtk_radio_get_metrics(&indicator_size, &indicator_spacing);
- w = gRadiobuttonWidget;
+ w = gParts->radiobuttonWidget;
} else {
moz_gtk_checkbox_get_metrics(&indicator_size, &indicator_spacing);
- w = gCheckboxWidget;
+ w = gParts->checkboxWidget;
}
// "GetMinimumWidgetSize was ignored"
@@ -1014,11 +979,11 @@ moz_gtk_toggle_paint(GdkDrawable* drawable, GdkRectangle* rect,
if (isradio) {
gtk_paint_option(style, drawable, state_type, shadow_type, cliprect,
- gRadiobuttonWidget, "radiobutton", x, y,
+ gParts->radiobuttonWidget, "radiobutton", x, y,
width, height);
if (state->focused) {
gtk_paint_focus(style, drawable, GTK_STATE_ACTIVE, cliprect,
- gRadiobuttonWidget, "radiobutton", focus_x, focus_y,
+ gParts->radiobuttonWidget, "radiobutton", focus_x, focus_y,
focus_width, focus_height);
}
}
@@ -1028,17 +993,17 @@ moz_gtk_toggle_paint(GdkDrawable* drawable, GdkRectangle* rect,
* must also be changed for the state to be drawn.
*/
if (inconsistent) {
- gtk_toggle_button_set_inconsistent(GTK_TOGGLE_BUTTON(gCheckboxWidget), TRUE);
+ gtk_toggle_button_set_inconsistent(GTK_TOGGLE_BUTTON(gParts->checkboxWidget), TRUE);
shadow_type = GTK_SHADOW_ETCHED_IN;
} else {
- gtk_toggle_button_set_inconsistent(GTK_TOGGLE_BUTTON(gCheckboxWidget), FALSE);
+ gtk_toggle_button_set_inconsistent(GTK_TOGGLE_BUTTON(gParts->checkboxWidget), FALSE);
}
gtk_paint_check(style, drawable, state_type, shadow_type, cliprect,
- gCheckboxWidget, "checkbutton", x, y, width, height);
+ gParts->checkboxWidget, "checkbutton", x, y, width, height);
if (state->focused) {
gtk_paint_focus(style, drawable, GTK_STATE_ACTIVE, cliprect,
- gCheckboxWidget, "checkbutton", focus_x, focus_y,
+ gParts->checkboxWidget, "checkbutton", focus_x, focus_y,
focus_width, focus_height);
}
}
@@ -1130,9 +1095,9 @@ moz_gtk_scrollbar_button_paint(GdkDrawable* drawable, GdkRectangle* rect,
ensure_scrollbar_widget();
if (flags & MOZ_GTK_STEPPER_VERTICAL)
- scrollbar = gVertScrollbarWidget;
+ scrollbar = gParts->vertScrollbarWidget;
else
- scrollbar = gHorizScrollbarWidget;
+ scrollbar = gParts->horizScrollbarWidget;
gtk_widget_set_direction(scrollbar, direction);
@@ -1216,9 +1181,9 @@ moz_gtk_scrollbar_trough_paint(GtkThemeWidgetType widget,
ensure_scrollbar_widget();
if (widget == MOZ_GTK_SCROLLBAR_TRACK_HORIZONTAL)
- scrollbar = GTK_SCROLLBAR(gHorizScrollbarWidget);
+ scrollbar = GTK_SCROLLBAR(gParts->horizScrollbarWidget);
else
- scrollbar = GTK_SCROLLBAR(gVertScrollbarWidget);
+ scrollbar = GTK_SCROLLBAR(gParts->vertScrollbarWidget);
gtk_widget_set_direction(GTK_WIDGET(scrollbar), direction);
@@ -1259,9 +1224,9 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWidgetType widget,
ensure_scrollbar_widget();
if (widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL)
- scrollbar = GTK_SCROLLBAR(gHorizScrollbarWidget);
+ scrollbar = GTK_SCROLLBAR(gParts->horizScrollbarWidget);
else
- scrollbar = GTK_SCROLLBAR(gVertScrollbarWidget);
+ scrollbar = GTK_SCROLLBAR(gParts->vertScrollbarWidget);
gtk_widget_set_direction(GTK_WIDGET(scrollbar), direction);
@@ -1322,12 +1287,12 @@ moz_gtk_spin_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStyle* style;
ensure_spin_widget();
- gtk_widget_set_direction(gSpinWidget, direction);
- style = gSpinWidget->style;
+ gtk_widget_set_direction(gParts->spinWidget, direction);
+ style = gParts->spinWidget->style;
TSOffsetStyleGCs(style, rect->x, rect->y);
gtk_paint_box(style, drawable, GTK_STATE_NORMAL, GTK_SHADOW_IN, NULL,
- gSpinWidget, "spinbutton",
+ gParts->spinWidget, "spinbutton",
rect->x, rect->y, rect->width, rect->height);
return MOZ_GTK_SUCCESS;
}
@@ -1344,11 +1309,11 @@ moz_gtk_spin_updown_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStyle* style;
ensure_spin_widget();
- style = gSpinWidget->style;
- gtk_widget_set_direction(gSpinWidget, direction);
+ style = gParts->spinWidget->style;
+ gtk_widget_set_direction(gParts->spinWidget, direction);
TSOffsetStyleGCs(style, rect->x, rect->y);
- gtk_paint_box(style, drawable, state_type, shadow_type, NULL, gSpinWidget,
+ gtk_paint_box(style, drawable, state_type, shadow_type, NULL, gParts->spinWidget,
isDown ? "spinbutton_down" : "spinbutton_up",
rect->x, rect->y, rect->width, rect->height);
@@ -1360,7 +1325,7 @@ moz_gtk_spin_updown_paint(GdkDrawable* drawable, GdkRectangle* rect,
arrow_rect.y += isDown ? -1 : 1;
gtk_paint_arrow(style, drawable, state_type, shadow_type, NULL,
- gSpinWidget, "spinbutton",
+ gParts->spinWidget, "spinbutton",
isDown ? GTK_ARROW_DOWN : GTK_ARROW_UP, TRUE,
arrow_rect.x, arrow_rect.y,
arrow_rect.width, arrow_rect.height);
@@ -1379,7 +1344,7 @@ moz_gtk_scale_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkWidget* widget;
ensure_scale_widget();
- widget = ((flags == GTK_ORIENTATION_HORIZONTAL) ? gHScaleWidget : gVScaleWidget);
+ widget = ((flags == GTK_ORIENTATION_HORIZONTAL) ? gParts->hScaleWidget : gParts->vScaleWidget);
gtk_widget_set_direction(widget, direction);
style = widget->style;
@@ -1420,7 +1385,7 @@ moz_gtk_scale_thumb_paint(GdkDrawable* drawable, GdkRectangle* rect,
gint thumb_width, thumb_height, x, y;
ensure_scale_widget();
- widget = ((flags == GTK_ORIENTATION_HORIZONTAL) ? gHScaleWidget : gVScaleWidget);
+ widget = ((flags == GTK_ORIENTATION_HORIZONTAL) ? gParts->hScaleWidget : gParts->vScaleWidget);
gtk_widget_set_direction(widget, direction);
style = widget->style;
@@ -1455,14 +1420,14 @@ moz_gtk_gripper_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStyle* style;
ensure_handlebox_widget();
- gtk_widget_set_direction(gHandleBoxWidget, direction);
+ gtk_widget_set_direction(gParts->handleBoxWidget, direction);
- style = gHandleBoxWidget->style;
- shadow_type = GTK_HANDLE_BOX(gHandleBoxWidget)->shadow_type;
+ style = gParts->handleBoxWidget->style;
+ shadow_type = GTK_HANDLE_BOX(gParts->handleBoxWidget)->shadow_type;
TSOffsetStyleGCs(style, rect->x, rect->y);
gtk_paint_box(style, drawable, state_type, shadow_type, cliprect,
- gHandleBoxWidget, "handlebox_bin", rect->x, rect->y,
+ gParts->handleBoxWidget, "handlebox_bin", rect->x, rect->y,
rect->width, rect->height);
return MOZ_GTK_SUCCESS;
@@ -1475,8 +1440,8 @@ moz_gtk_hpaned_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStateType hpaned_state = ConvertGtkState(state);
ensure_hpaned_widget();
- gtk_paint_handle(gHPanedWidget->style, drawable, hpaned_state,
- GTK_SHADOW_NONE, cliprect, gHPanedWidget, "paned",
+ gtk_paint_handle(gParts->hpanedWidget->style, drawable, hpaned_state,
+ GTK_SHADOW_NONE, cliprect, gParts->hpanedWidget, "paned",
rect->x, rect->y, rect->width, rect->height,
GTK_ORIENTATION_VERTICAL);
@@ -1490,8 +1455,8 @@ moz_gtk_vpaned_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStateType vpaned_state = ConvertGtkState(state);
ensure_vpaned_widget();
- gtk_paint_handle(gVPanedWidget->style, drawable, vpaned_state,
- GTK_SHADOW_NONE, cliprect, gVPanedWidget, "paned",
+ gtk_paint_handle(gParts->vpanedWidget->style, drawable, vpaned_state,
+ GTK_SHADOW_NONE, cliprect, gParts->vpanedWidget, "paned",
rect->x, rect->y, rect->width, rect->height,
GTK_ORIENTATION_HORIZONTAL);
@@ -1509,7 +1474,7 @@ moz_gtk_caret_paint(GdkDrawable* drawable, GdkRectangle* rect,
}
ensure_entry_widget();
- gtk_draw_insertion_cursor(gEntryWidget, drawable, cliprect,
+ gtk_draw_insertion_cursor(gParts->entryWidget, drawable, cliprect,
&location, TRUE, direction, FALSE);
return MOZ_GTK_SUCCESS;
@@ -1629,8 +1594,8 @@ moz_gtk_treeview_paint(GdkDrawable* drawable, GdkRectangle* rect,
ensure_tree_view_widget();
ensure_scrolled_window_widget();
- gtk_widget_set_direction(gTreeViewWidget, direction);
- gtk_widget_set_direction(gScrolledWindowWidget, direction);
+ gtk_widget_set_direction(gParts->treeViewWidget, direction);
+ gtk_widget_set_direction(gParts->scrolledWindowWidget, direction);
/* only handle disabled and normal states, otherwise the whole background
* area will be painted differently with other states */
@@ -1639,24 +1604,24 @@ moz_gtk_treeview_paint(GdkDrawable* drawable, GdkRectangle* rect,
/* In GTK the treeview sets the background of the window
* which contains the cells to the treeview base color.
* If we don't set it here the background color will not be correct.*/
- gtk_widget_modify_bg(gTreeViewWidget, state_type,
- &gTreeViewWidget->style->base[state_type]);
+ gtk_widget_modify_bg(gParts->treeViewWidget, state_type,
+ &gParts->treeViewWidget->style->base[state_type]);
- style = gScrolledWindowWidget->style;
+ style = gParts->scrolledWindowWidget->style;
xthickness = XTHICKNESS(style);
ythickness = YTHICKNESS(style);
- TSOffsetStyleGCs(gTreeViewWidget->style, rect->x, rect->y);
+ TSOffsetStyleGCs(gParts->treeViewWidget->style, rect->x, rect->y);
TSOffsetStyleGCs(style, rect->x, rect->y);
- gtk_paint_flat_box(gTreeViewWidget->style, drawable, state_type,
- GTK_SHADOW_NONE, cliprect, gTreeViewWidget, "treeview",
+ gtk_paint_flat_box(gParts->treeViewWidget->style, drawable, state_type,
+ GTK_SHADOW_NONE, cliprect, gParts->treeViewWidget, "treeview",
rect->x + xthickness, rect->y + ythickness,
rect->width - 2 * xthickness,
rect->height - 2 * ythickness);
gtk_paint_shadow(style, drawable, GTK_STATE_NORMAL, GTK_SHADOW_IN,
- cliprect, gScrolledWindowWidget, "scrolled_window",
+ cliprect, gParts->scrolledWindowWidget, "scrolled_window",
rect->x, rect->y, rect->width, rect->height);
return MOZ_GTK_SUCCESS;
@@ -1667,11 +1632,11 @@ moz_gtk_tree_header_cell_paint(GdkDrawable* drawable, GdkRectangle* rect,
GdkRectangle* cliprect, GtkWidgetState* state,
gboolean isSorted, GtkTextDirection direction)
{
- gtk_tree_view_column_set_sort_indicator(gMiddleTreeViewColumn,
+ gtk_tree_view_column_set_sort_indicator(gParts->middleTreeViewColumn,
isSorted);
moz_gtk_button_paint(drawable, rect, cliprect, state, GTK_RELIEF_NORMAL,
- gTreeHeaderCellWidget, direction);
+ gParts->treeHeaderCellWidget, direction);
return MOZ_GTK_SUCCESS;
}
@@ -1688,7 +1653,7 @@ moz_gtk_tree_header_sort_arrow_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStyle* style;
ensure_tree_header_cell_widget();
- gtk_widget_set_direction(gTreeHeaderSortArrowWidget, direction);
+ gtk_widget_set_direction(gParts->treeHeaderSortArrowWidget, direction);
/* hard code these values */
arrow_rect.width = 11;
@@ -1696,11 +1661,11 @@ moz_gtk_tree_header_sort_arrow_paint(GdkDrawable* drawable, GdkRectangle* rect,
arrow_rect.x = rect->x + (rect->width - arrow_rect.width) / 2;
arrow_rect.y = rect->y + (rect->height - arrow_rect.height) / 2;
- style = gTreeHeaderSortArrowWidget->style;
+ style = gParts->treeHeaderSortArrowWidget->style;
TSOffsetStyleGCs(style, arrow_rect.x, arrow_rect.y);
gtk_paint_arrow(style, drawable, state_type, shadow_type, cliprect,
- gTreeHeaderSortArrowWidget, "arrow", arrow_type, TRUE,
+ gParts->treeHeaderSortArrowWidget, "arrow", arrow_type, TRUE,
arrow_rect.x, arrow_rect.y,
arrow_rect.width, arrow_rect.height);
@@ -1717,16 +1682,16 @@ moz_gtk_treeview_expander_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStateType state_type;
ensure_tree_view_widget();
- gtk_widget_set_direction(gTreeViewWidget, direction);
+ gtk_widget_set_direction(gParts->treeViewWidget, direction);
- style = gTreeViewWidget->style;
+ style = gParts->treeViewWidget->style;
/* Because the frame we get is of the entire treeview, we can't get the precise
* event state of one expander, thus rendering hover and active feedback useless. */
state_type = state->disabled ? GTK_STATE_INSENSITIVE : GTK_STATE_NORMAL;
TSOffsetStyleGCs(style, rect->x, rect->y);
- gtk_paint_expander(style, drawable, state_type, cliprect, gTreeViewWidget, "treeview",
+ gtk_paint_expander(style, drawable, state_type, cliprect, gParts->treeViewWidget, "treeview",
rect->x + rect->width / 2, rect->y + rect->height / 2, expander_state);
return MOZ_GTK_SUCCESS;
@@ -1742,12 +1707,12 @@ moz_gtk_expander_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStateType state_type = ConvertGtkState(state);
ensure_expander_widget();
- gtk_widget_set_direction(gExpanderWidget, direction);
+ gtk_widget_set_direction(gParts->expanderWidget, direction);
- style = gExpanderWidget->style;
+ style = gParts->expanderWidget->style;
TSOffsetStyleGCs(style, rect->x, rect->y);
- gtk_paint_expander(style, drawable, state_type, cliprect, gExpanderWidget, "expander",
+ gtk_paint_expander(style, drawable, state_type, cliprect, gParts->expanderWidget, "expander",
rect->x + rect->width / 2, rect->y + rect->height / 2, expander_state);
return MOZ_GTK_SUCCESS;
@@ -1759,7 +1724,7 @@ moz_gtk_combo_box_paint(GdkDrawable* drawable, GdkRectangle* rect,
gboolean ishtml, GtkTextDirection direction)
{
GdkRectangle arrow_rect, real_arrow_rect;
- gint arrow_size, separator_width;
+ gint /* arrow_size, */ separator_width;
gboolean wide_separators;
GtkStateType state_type = ConvertGtkState(state);
GtkShadowType shadow_type = state->active ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
@@ -1768,42 +1733,42 @@ moz_gtk_combo_box_paint(GdkDrawable* drawable, GdkRectangle* rect,
ensure_combo_box_widgets();
- /* Also sets the direction on gComboBoxButtonWidget, which is then
+ /* Also sets the direction on gParts->comboBoxButtonWidget, which is then
* inherited by the separator and arrow */
moz_gtk_button_paint(drawable, rect, cliprect, state, GTK_RELIEF_NORMAL,
- gComboBoxButtonWidget, direction);
+ gParts->comboBoxButtonWidget, direction);
- calculate_button_inner_rect(gComboBoxButtonWidget,
+ calculate_button_inner_rect(gParts->comboBoxButtonWidget,
rect, &arrow_rect, direction, ishtml);
/* Now arrow_rect contains the inner rect ; we want to correct the width
* to what the arrow needs (see gtk_combo_box_size_allocate) */
- gtk_widget_size_request(gComboBoxArrowWidget, &arrow_req);
+ gtk_widget_size_request(gParts->comboBoxArrowWidget, &arrow_req);
if (direction == GTK_TEXT_DIR_LTR)
arrow_rect.x += arrow_rect.width - arrow_req.width;
arrow_rect.width = arrow_req.width;
- calculate_arrow_rect(gComboBoxArrowWidget,
+ calculate_arrow_rect(gParts->comboBoxArrowWidget,
&arrow_rect, &real_arrow_rect, direction);
- style = gComboBoxArrowWidget->style;
+ style = gParts->comboBoxArrowWidget->style;
TSOffsetStyleGCs(style, rect->x, rect->y);
- gtk_widget_size_allocate(gComboBoxWidget, rect);
+ gtk_widget_size_allocate(gParts->comboBoxWidget, rect);
gtk_paint_arrow(style, drawable, state_type, shadow_type, cliprect,
- gComboBoxArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE,
+ gParts->comboBoxArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE,
real_arrow_rect.x, real_arrow_rect.y,
real_arrow_rect.width, real_arrow_rect.height);
/* If there is no separator in the theme, there's nothing left to do. */
- if (!gComboBoxSeparatorWidget)
+ if (!gParts->comboBoxSeparatorWidget)
return MOZ_GTK_SUCCESS;
- style = gComboBoxSeparatorWidget->style;
+ style = gParts->comboBoxSeparatorWidget->style;
TSOffsetStyleGCs(style, rect->x, rect->y);
- gtk_widget_style_get(gComboBoxSeparatorWidget,
+ gtk_widget_style_get(gParts->comboBoxSeparatorWidget,
"wide-separators", &wide_separators,
"separator-width", &separator_width,
NULL);
@@ -1816,7 +1781,7 @@ moz_gtk_combo_box_paint(GdkDrawable* drawable, GdkRectangle* rect,
gtk_paint_box(style, drawable,
GTK_STATE_NORMAL, GTK_SHADOW_ETCHED_OUT,
- cliprect, gComboBoxSeparatorWidget, "vseparator",
+ cliprect, gParts->comboBoxSeparatorWidget, "vseparator",
arrow_rect.x, arrow_rect.y,
separator_width, arrow_rect.height);
} else {
@@ -1826,7 +1791,7 @@ moz_gtk_combo_box_paint(GdkDrawable* drawable, GdkRectangle* rect,
arrow_rect.x += arrow_rect.width;
gtk_paint_vline(style, drawable, GTK_STATE_NORMAL, cliprect,
- gComboBoxSeparatorWidget, "vseparator",
+ gParts->comboBoxSeparatorWidget, "vseparator",
arrow_rect.y, arrow_rect.y + arrow_rect.height,
arrow_rect.x);
}
@@ -1844,14 +1809,14 @@ moz_gtk_downarrow_paint(GdkDrawable* drawable, GdkRectangle* rect,
GdkRectangle arrow_rect;
ensure_button_arrow_widget();
- style = gButtonArrowWidget->style;
+ style = gParts->buttonArrowWidget->style;
- calculate_arrow_rect(gButtonArrowWidget, rect, &arrow_rect,
+ calculate_arrow_rect(gParts->buttonArrowWidget, rect, &arrow_rect,
GTK_TEXT_DIR_LTR);
TSOffsetStyleGCs(style, arrow_rect.x, arrow_rect.y);
gtk_paint_arrow(style, drawable, state_type, shadow_type, cliprect,
- gButtonArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE,
+ gParts->buttonArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE,
arrow_rect.x, arrow_rect.y, arrow_rect.width, arrow_rect.height);
return MOZ_GTK_SUCCESS;
@@ -1875,19 +1840,19 @@ moz_gtk_combo_box_entry_button_paint(GdkDrawable* drawable, GdkRectangle* rect,
if (input_focus) {
/* Some themes draw a complementary focus ring for the dropdown button
* when the dropdown entry has focus */
- GTK_WIDGET_SET_FLAGS(gComboBoxEntryTextareaWidget, GTK_HAS_FOCUS);
+ GTK_WIDGET_SET_FLAGS(gParts->comboBoxEntryTextareaWidget, GTK_HAS_FOCUS);
}
moz_gtk_button_paint(drawable, rect, cliprect, state, GTK_RELIEF_NORMAL,
- gComboBoxEntryButtonWidget, direction);
+ gParts->comboBoxEntryButtonWidget, direction);
if (input_focus)
- GTK_WIDGET_UNSET_FLAGS(gComboBoxEntryTextareaWidget, GTK_HAS_FOCUS);
+ GTK_WIDGET_UNSET_FLAGS(gParts->comboBoxEntryTextareaWidget, GTK_HAS_FOCUS);
- calculate_button_inner_rect(gComboBoxEntryButtonWidget,
+ calculate_button_inner_rect(gParts->comboBoxEntryButtonWidget,
rect, &arrow_rect, direction, FALSE);
if (state_type == GTK_STATE_ACTIVE) {
- gtk_widget_style_get(gComboBoxEntryButtonWidget,
+ gtk_widget_style_get(gParts->comboBoxEntryButtonWidget,
"child-displacement-x", &x_displacement,
"child-displacement-y", &y_displacement,
NULL);
@@ -1895,14 +1860,14 @@ moz_gtk_combo_box_entry_button_paint(GdkDrawable* drawable, GdkRectangle* rect,
arrow_rect.y += y_displacement;
}
- calculate_arrow_rect(gComboBoxEntryArrowWidget,
+ calculate_arrow_rect(gParts->comboBoxEntryArrowWidget,
&arrow_rect, &real_arrow_rect, direction);
- style = gComboBoxEntryArrowWidget->style;
+ style = gParts->comboBoxEntryArrowWidget->style;
TSOffsetStyleGCs(style, real_arrow_rect.x, real_arrow_rect.y);
gtk_paint_arrow(style, drawable, state_type, shadow_type, cliprect,
- gComboBoxEntryArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE,
+ gParts->comboBoxEntryArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE,
real_arrow_rect.x, real_arrow_rect.y,
real_arrow_rect.width, real_arrow_rect.height);
@@ -1922,10 +1887,10 @@ moz_gtk_container_paint(GdkDrawable* drawable, GdkRectangle* rect,
if (isradio) {
ensure_radiobutton_widget();
- widget = gRadiobuttonWidget;
+ widget = gParts->radiobuttonWidget;
} else {
ensure_checkbox_widget();
- widget = gCheckboxWidget;
+ widget = gParts->checkboxWidget;
}
gtk_widget_set_direction(widget, direction);
@@ -1973,10 +1938,10 @@ moz_gtk_toggle_label_paint(GdkDrawable* drawable, GdkRectangle* rect,
if (isradio) {
ensure_radiobutton_widget();
- widget = gRadiobuttonWidget;
+ widget = gParts->radiobuttonWidget;
} else {
ensure_checkbox_widget();
- widget = gCheckboxWidget;
+ widget = gParts->checkboxWidget;
}
gtk_widget_set_direction(widget, direction);
@@ -2005,9 +1970,9 @@ moz_gtk_toolbar_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkShadowType shadow_type;
ensure_toolbar_widget();
- gtk_widget_set_direction(gToolbarWidget, direction);
+ gtk_widget_set_direction(gParts->toolbarWidget, direction);
- style = gToolbarWidget->style;
+ style = gParts->toolbarWidget->style;
TSOffsetStyleGCs(style, rect->x, rect->y);
@@ -2016,10 +1981,10 @@ moz_gtk_toolbar_paint(GdkDrawable* drawable, GdkRectangle* rect,
cliprect, rect->x, rect->y,
rect->width, rect->height);
- gtk_widget_style_get(gToolbarWidget, "shadow-type", &shadow_type, NULL);
+ gtk_widget_style_get(gParts->toolbarWidget, "shadow-type", &shadow_type, NULL);
gtk_paint_box (style, drawable, GTK_STATE_NORMAL, shadow_type,
- cliprect, gToolbarWidget, "toolbar",
+ cliprect, gParts->toolbarWidget, "toolbar",
rect->x, rect->y, rect->width, rect->height);
return MOZ_GTK_SUCCESS;
@@ -2040,11 +2005,11 @@ moz_gtk_toolbar_separator_paint(GdkDrawable* drawable, GdkRectangle* rect,
const double end_fraction = 0.8;
ensure_toolbar_separator_widget();
- gtk_widget_set_direction(gToolbarSeparatorWidget, direction);
+ gtk_widget_set_direction(gParts->toolbarSeparatorWidget, direction);
- style = gToolbarSeparatorWidget->style;
+ style = gParts->toolbarSeparatorWidget->style;
- gtk_widget_style_get(gToolbarWidget,
+ gtk_widget_style_get(gParts->toolbarWidget,
"wide-separators", &wide_separators,
"separator-width", &separator_width,
NULL);
@@ -2057,7 +2022,7 @@ moz_gtk_toolbar_separator_paint(GdkDrawable* drawable, GdkRectangle* rect,
gtk_paint_box(style, drawable,
GTK_STATE_NORMAL, GTK_SHADOW_ETCHED_OUT,
- cliprect, gToolbarWidget, "vseparator",
+ cliprect, gParts->toolbarWidget, "vseparator",
rect->x + (rect->width - separator_width) / 2,
rect->y + rect->height * start_fraction,
separator_width,
@@ -2070,7 +2035,7 @@ moz_gtk_toolbar_separator_paint(GdkDrawable* drawable, GdkRectangle* rect,
paint_width = rect->width;
gtk_paint_vline(style, drawable,
- GTK_STATE_NORMAL, cliprect, gToolbarSeparatorWidget,
+ GTK_STATE_NORMAL, cliprect, gParts->toolbarSeparatorWidget,
"toolbar",
rect->y + rect->height * start_fraction,
rect->y + rect->height * end_fraction,
@@ -2087,16 +2052,16 @@ moz_gtk_tooltip_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStyle* style;
ensure_tooltip_widget();
- gtk_widget_set_direction(gTooltipWidget, direction);
+ gtk_widget_set_direction(gParts->tooltipWidget, direction);
style = gtk_rc_get_style_by_paths(gtk_settings_get_default(),
"gtk-tooltips", "GtkWindow",
GTK_TYPE_WINDOW);
- style = gtk_style_attach(style, gTooltipWidget->window);
+ style = gtk_style_attach(style, gParts->tooltipWidget->window);
TSOffsetStyleGCs(style, rect->x, rect->y);
gtk_paint_flat_box(style, drawable, GTK_STATE_NORMAL, GTK_SHADOW_OUT,
- cliprect, gTooltipWidget, "tooltip",
+ cliprect, gParts->tooltipWidget, "tooltip",
rect->x, rect->y, rect->width, rect->height);
return MOZ_GTK_SUCCESS;
@@ -2111,13 +2076,13 @@ moz_gtk_resizer_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStateType state_type = ConvertGtkState(state);
ensure_window_widget();
- gtk_widget_set_direction(gProtoWindow, direction);
+ gtk_widget_set_direction(gParts->protoWindow, direction);
- style = gProtoWindow->style;
+ style = gParts->protoWindow->style;
TSOffsetStyleGCs(style, rect->x, rect->y);
- gtk_paint_resize_grip(style, drawable, state_type, cliprect, gProtoWindow,
+ gtk_paint_resize_grip(style, drawable, state_type, cliprect, gParts->protoWindow,
NULL, (direction == GTK_TEXT_DIR_LTR) ?
GDK_WINDOW_EDGE_SOUTH_EAST :
GDK_WINDOW_EDGE_SOUTH_WEST,
@@ -2133,15 +2098,15 @@ moz_gtk_frame_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkShadowType shadow_type;
ensure_frame_widget();
- gtk_widget_set_direction(gFrameWidget, direction);
+ gtk_widget_set_direction(gParts->frameWidget, direction);
- style = gFrameWidget->style;
+ style = gParts->frameWidget->style;
- gtk_widget_style_get(gStatusbarWidget, "shadow-type", &shadow_type, NULL);
+ gtk_widget_style_get(gParts->statusbarWidget, "shadow-type", &shadow_type, NULL);
TSOffsetStyleGCs(style, rect->x, rect->y);
gtk_paint_shadow(style, drawable, GTK_STATE_NORMAL, shadow_type,
- cliprect, gFrameWidget, "frame", rect->x, rect->y,
+ cliprect, gParts->frameWidget, "frame", rect->x, rect->y,
rect->width, rect->height);
return MOZ_GTK_SUCCESS;
@@ -2154,13 +2119,13 @@ moz_gtk_progressbar_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStyle* style;
ensure_progress_widget();
- gtk_widget_set_direction(gProgressWidget, direction);
+ gtk_widget_set_direction(gParts->progresWidget, direction);
- style = gProgressWidget->style;
+ style = gParts->progresWidget->style;
TSOffsetStyleGCs(style, rect->x, rect->y);
gtk_paint_box(style, drawable, GTK_STATE_NORMAL, GTK_SHADOW_IN,
- cliprect, gProgressWidget, "trough", rect->x, rect->y,
+ cliprect, gParts->progresWidget, "trough", rect->x, rect->y,
rect->width, rect->height);
return MOZ_GTK_SUCCESS;
@@ -2173,13 +2138,13 @@ moz_gtk_progress_chunk_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStyle* style;
ensure_progress_widget();
- gtk_widget_set_direction(gProgressWidget, direction);
+ gtk_widget_set_direction(gParts->progresWidget, direction);
- style = gProgressWidget->style;
+ style = gParts->progresWidget->style;
TSOffsetStyleGCs(style, rect->x, rect->y);
gtk_paint_box(style, drawable, GTK_STATE_PRELIGHT, GTK_SHADOW_OUT,
- cliprect, gProgressWidget, "bar", rect->x, rect->y,
+ cliprect, gParts->progresWidget, "bar", rect->x, rect->y,
rect->width, rect->height);
return MOZ_GTK_SUCCESS;
@@ -2189,10 +2154,10 @@ gint
moz_gtk_get_tab_thickness(void)
{
ensure_tab_widget();
- if (YTHICKNESS(gTabWidget->style) < 2)
+ if (YTHICKNESS(gParts->tabWidget->style) < 2)
return 2; /* some themes don't set ythickness correctly */
- return YTHICKNESS(gTabWidget->style);
+ return YTHICKNESS(gParts->tabWidget->style);
}
static gint
@@ -2208,15 +2173,15 @@ moz_gtk_tab_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStyle* style;
ensure_tab_widget();
- gtk_widget_set_direction(gTabWidget, direction);
+ gtk_widget_set_direction(gParts->tabWidget, direction);
- style = gTabWidget->style;
+ style = gParts->tabWidget->style;
TSOffsetStyleGCs(style, rect->x, rect->y);
if ((flags & MOZ_GTK_TAB_SELECTED) == 0) {
/* Only draw the tab */
gtk_paint_extension(style, drawable, GTK_STATE_ACTIVE, GTK_SHADOW_OUT,
- cliprect, gTabWidget, "tab",
+ cliprect, gParts->tabWidget, "tab",
rect->x, rect->y, rect->width, rect->height,
(flags & MOZ_GTK_TAB_BOTTOM) ?
GTK_POS_TOP : GTK_POS_BOTTOM );
@@ -2283,7 +2248,7 @@ moz_gtk_tab_paint(GdkDrawable* drawable, GdkRectangle* rect,
/* Draw the tab */
gtk_paint_extension(style, drawable, GTK_STATE_NORMAL,
- GTK_SHADOW_OUT, cliprect, gTabWidget, "tab",
+ GTK_SHADOW_OUT, cliprect, gParts->tabWidget, "tab",
rect->x, rect->y + gap_voffset, rect->width,
rect->height - gap_voffset, GTK_POS_TOP);
@@ -2296,7 +2261,7 @@ moz_gtk_tab_paint(GdkDrawable* drawable, GdkRectangle* rect,
- gap_height,
rect->width, gap_height);
gtk_paint_box_gap(style, drawable, GTK_STATE_NORMAL, GTK_SHADOW_OUT,
- cliprect, gTabWidget, "notebook",
+ cliprect, gParts->tabWidget, "notebook",
rect->x - gap_loffset,
rect->y + gap_voffset - 3 * gap_height,
rect->width + gap_loffset + gap_roffset,
@@ -2308,7 +2273,7 @@ moz_gtk_tab_paint(GdkDrawable* drawable, GdkRectangle* rect,
/* Draw the tab */
gtk_paint_extension(style, drawable, GTK_STATE_NORMAL,
- GTK_SHADOW_OUT, cliprect, gTabWidget, "tab",
+ GTK_SHADOW_OUT, cliprect, gParts->tabWidget, "tab",
rect->x, rect->y, rect->width,
rect->height - gap_voffset, GTK_POS_BOTTOM);
@@ -2321,7 +2286,7 @@ moz_gtk_tab_paint(GdkDrawable* drawable, GdkRectangle* rect,
- gap_voffset,
rect->width, gap_height);
gtk_paint_box_gap(style, drawable, GTK_STATE_NORMAL, GTK_SHADOW_OUT,
- cliprect, gTabWidget, "notebook",
+ cliprect, gParts->tabWidget, "notebook",
rect->x - gap_loffset,
rect->y + rect->height - gap_voffset,
rect->width + gap_loffset + gap_roffset,
@@ -2345,13 +2310,13 @@ moz_gtk_tabpanels_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStyle* style;
ensure_tab_widget();
- gtk_widget_set_direction(gTabWidget, direction);
+ gtk_widget_set_direction(gParts->tabWidget, direction);
- style = gTabWidget->style;
+ style = gParts->tabWidget->style;
TSOffsetStyleGCs(style, rect->x, rect->y);
gtk_paint_box_gap(style, drawable, GTK_STATE_NORMAL, GTK_SHADOW_OUT,
- cliprect, gTabWidget, "notebook", rect->x, rect->y,
+ cliprect, gParts->tabWidget, "notebook", rect->x, rect->y,
rect->width, rect->height,
GTK_POS_TOP, -10, 0);
@@ -2373,7 +2338,7 @@ moz_gtk_tab_scroll_arrow_paint(GdkDrawable* drawable, GdkRectangle* rect,
ensure_tab_widget();
- style = gTabWidget->style;
+ style = gParts->tabWidget->style;
TSOffsetStyleGCs(style, rect->x, rect->y);
if (direction == GTK_TEXT_DIR_RTL) {
@@ -2382,7 +2347,7 @@ moz_gtk_tab_scroll_arrow_paint(GdkDrawable* drawable, GdkRectangle* rect,
}
gtk_paint_arrow(style, drawable, state_type, shadow_type, NULL,
- gTabWidget, "notebook", arrow_type, TRUE,
+ gParts->tabWidget, "notebook", arrow_type, TRUE,
x, y, arrow_size, arrow_size);
return MOZ_GTK_SUCCESS;
@@ -2395,11 +2360,11 @@ moz_gtk_menu_bar_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStyle* style;
GtkShadowType shadow_type;
ensure_menu_bar_widget();
- gtk_widget_set_direction(gMenuBarWidget, direction);
+ gtk_widget_set_direction(gParts->menuBarWidget, direction);
- gtk_widget_style_get(gMenuBarWidget, "shadow-type", &shadow_type, NULL);
+ gtk_widget_style_get(gParts->menuBarWidget, "shadow-type", &shadow_type, NULL);
- style = gMenuBarWidget->style;
+ style = gParts->menuBarWidget->style;
TSOffsetStyleGCs(style, rect->x, rect->y);
gtk_style_apply_default_background(style, drawable, TRUE, GTK_STATE_NORMAL,
@@ -2407,7 +2372,7 @@ moz_gtk_menu_bar_paint(GdkDrawable* drawable, GdkRectangle* rect,
rect->width, rect->height);
gtk_paint_box(style, drawable, GTK_STATE_NORMAL, shadow_type,
- cliprect, gMenuBarWidget, "menubar", rect->x, rect->y,
+ cliprect, gParts->menuBarWidget, "menubar", rect->x, rect->y,
rect->width, rect->height);
return MOZ_GTK_SUCCESS;
}
@@ -2418,16 +2383,16 @@ moz_gtk_menu_popup_paint(GdkDrawable* drawable, GdkRectangle* rect,
{
GtkStyle* style;
ensure_menu_popup_widget();
- gtk_widget_set_direction(gMenuPopupWidget, direction);
+ gtk_widget_set_direction(gParts->menuPopupWidget, direction);
- style = gMenuPopupWidget->style;
+ style = gParts->menuPopupWidget->style;
TSOffsetStyleGCs(style, rect->x, rect->y);
gtk_style_apply_default_background(style, drawable, TRUE, GTK_STATE_NORMAL,
cliprect, rect->x, rect->y,
rect->width, rect->height);
gtk_paint_box(style, drawable, GTK_STATE_NORMAL, GTK_SHADOW_OUT,
- cliprect, gMenuPopupWidget, "menu",
+ cliprect, gParts->menuPopupWidget, "menu",
rect->x, rect->y, rect->width, rect->height);
return MOZ_GTK_SUCCESS;
@@ -2444,11 +2409,11 @@ moz_gtk_menu_separator_paint(GdkDrawable* drawable, GdkRectangle* rect,
gint paint_height;
ensure_menu_separator_widget();
- gtk_widget_set_direction(gMenuSeparatorWidget, direction);
+ gtk_widget_set_direction(gParts->menuSeparatorWidget, direction);
- style = gMenuSeparatorWidget->style;
+ style = gParts->menuSeparatorWidget->style;
- gtk_widget_style_get(gMenuSeparatorWidget,
+ gtk_widget_style_get(gParts->menuSeparatorWidget,
"wide-separators", &wide_separators,
"separator-height", &separator_height,
"horizontal-padding", &horizontal_padding,
@@ -2462,7 +2427,7 @@ moz_gtk_menu_separator_paint(GdkDrawable* drawable, GdkRectangle* rect,
gtk_paint_box(style, drawable,
GTK_STATE_NORMAL, GTK_SHADOW_ETCHED_OUT,
- cliprect, gMenuSeparatorWidget, "hseparator",
+ cliprect, gParts->menuSeparatorWidget, "hseparator",
rect->x + horizontal_padding + style->xthickness,
rect->y + (rect->height - separator_height - style->ythickness) / 2,
rect->width - 2 * (horizontal_padding + style->xthickness),
@@ -2473,7 +2438,7 @@ moz_gtk_menu_separator_paint(GdkDrawable* drawable, GdkRectangle* rect,
paint_height = rect->height;
gtk_paint_hline(style, drawable,
- GTK_STATE_NORMAL, cliprect, gMenuSeparatorWidget,
+ GTK_STATE_NORMAL, cliprect, gParts->menuSeparatorWidget,
"menuitem",
rect->x + horizontal_padding + style->xthickness,
rect->x + rect->width - horizontal_padding - style->xthickness - 1,
@@ -2495,10 +2460,10 @@ moz_gtk_menu_item_paint(GdkDrawable* drawable, GdkRectangle* rect,
if (state->inHover && !state->disabled) {
if (flags & MOZ_TOPLEVEL_MENU_ITEM) {
ensure_menu_bar_item_widget();
- item_widget = gMenuBarItemWidget;
+ item_widget = gParts->menuBarItemWidget;
} else {
ensure_menu_item_widget();
- item_widget = gMenuItemWidget;
+ item_widget = gParts->menuItemWidget;
}
gtk_widget_set_direction(item_widget, direction);
@@ -2525,14 +2490,14 @@ moz_gtk_menu_arrow_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStateType state_type = ConvertGtkState(state);
ensure_menu_item_widget();
- gtk_widget_set_direction(gMenuItemWidget, direction);
+ gtk_widget_set_direction(gParts->menuItemWidget, direction);
- style = gMenuItemWidget->style;
+ style = gParts->menuItemWidget->style;
TSOffsetStyleGCs(style, rect->x, rect->y);
gtk_paint_arrow(style, drawable, state_type,
(state_type == GTK_STATE_PRELIGHT) ? GTK_SHADOW_IN : GTK_SHADOW_OUT,
- cliprect, gMenuItemWidget, "menuitem",
+ cliprect, gParts->menuItemWidget, "menuitem",
(direction == GTK_TEXT_DIR_LTR) ? GTK_ARROW_RIGHT : GTK_ARROW_LEFT,
TRUE, rect->x, rect->y, rect->width, rect->height);
@@ -2555,17 +2520,17 @@ moz_gtk_check_menu_item_paint(GdkDrawable* drawable, GdkRectangle* rect,
moz_gtk_menu_item_paint(drawable, rect, cliprect, state, FALSE, direction);
ensure_check_menu_item_widget();
- gtk_widget_set_direction(gCheckMenuItemWidget, direction);
+ gtk_widget_set_direction(gParts->checkMenuItemWidget, direction);
- gtk_widget_style_get (gCheckMenuItemWidget,
+ gtk_widget_style_get (gParts->checkMenuItemWidget,
"indicator-size", &indicator_size,
NULL);
- if (checked || GTK_CHECK_MENU_ITEM(gCheckMenuItemWidget)->always_show_toggle) {
- style = gCheckMenuItemWidget->style;
+ if (checked || GTK_CHECK_MENU_ITEM(gParts->checkMenuItemWidget)->always_show_toggle) {
+ style = gParts->checkMenuItemWidget->style;
- offset = GTK_CONTAINER(gCheckMenuItemWidget)->border_width +
- gCheckMenuItemWidget->style->xthickness + 2;
+ offset = GTK_CONTAINER(gParts->checkMenuItemWidget)->border_width +
+ gParts->checkMenuItemWidget->style->xthickness + 2;
/* while normally this "3" would be the horizontal-padding style value, passing it to Gecko
as the value of menuitem padding causes problems with dropdowns (bug 406129), so in the menu.css
@@ -2575,16 +2540,16 @@ moz_gtk_check_menu_item_paint(GdkDrawable* drawable, GdkRectangle* rect,
y = rect->y + (rect->height - indicator_size) / 2;
TSOffsetStyleGCs(style, x, y);
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gCheckMenuItemWidget),
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gParts->checkMenuItemWidget),
checked);
if (isradio) {
gtk_paint_option(style, drawable, state_type, shadow_type, cliprect,
- gCheckMenuItemWidget, "option",
+ gParts->checkMenuItemWidget, "option",
x, y, indicator_size, indicator_size);
} else {
gtk_paint_check(style, drawable, state_type, shadow_type, cliprect,
- gCheckMenuItemWidget, "check",
+ gParts->checkMenuItemWidget, "check",
x, y, indicator_size, indicator_size);
}
}
@@ -2599,9 +2564,9 @@ moz_gtk_window_paint(GdkDrawable* drawable, GdkRectangle* rect,
GtkStyle* style;
ensure_window_widget();
- gtk_widget_set_direction(gProtoWindow, direction);
+ gtk_widget_set_direction(gParts->protoWindow, direction);
- style = gProtoWindow->style;
+ style = gParts->protoWindow->style;
TSOffsetStyleGCs(style, rect->x, rect->y);
gtk_style_apply_default_background(style, drawable, TRUE,
@@ -2626,32 +2591,32 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
gint focus_width, focus_pad;
ensure_button_widget();
- *left = *top = *right = *bottom = GTK_CONTAINER(gButtonWidget)->border_width;
+ *left = *top = *right = *bottom = GTK_CONTAINER(gParts->buttonWidget)->border_width;
/* Don't add this padding in HTML, otherwise the buttons will
become too big and stuff the layout. */
if (!inhtml) {
- moz_gtk_widget_get_focus(gButtonWidget, &interior_focus, &focus_width, &focus_pad);
- moz_gtk_button_get_inner_border(gButtonWidget, &inner_border);
+ moz_gtk_widget_get_focus(gParts->buttonWidget, &interior_focus, &focus_width, &focus_pad);
+ moz_gtk_button_get_inner_border(gParts->buttonWidget, &inner_border);
*left += focus_width + focus_pad + inner_border.left;
*right += focus_width + focus_pad + inner_border.right;
*top += focus_width + focus_pad + inner_border.top;
*bottom += focus_width + focus_pad + inner_border.bottom;
}
- *left += gButtonWidget->style->xthickness;
- *right += gButtonWidget->style->xthickness;
- *top += gButtonWidget->style->ythickness;
- *bottom += gButtonWidget->style->ythickness;
+ *left += gParts->buttonWidget->style->xthickness;
+ *right += gParts->buttonWidget->style->xthickness;
+ *top += gParts->buttonWidget->style->ythickness;
+ *bottom += gParts->buttonWidget->style->ythickness;
return MOZ_GTK_SUCCESS;
}
case MOZ_GTK_ENTRY:
ensure_entry_widget();
- w = gEntryWidget;
+ w = gParts->entryWidget;
break;
case MOZ_GTK_TREEVIEW:
ensure_tree_view_widget();
- w = gTreeViewWidget;
+ w = gParts->treeViewWidget;
break;
case MOZ_GTK_TREE_HEADER_CELL:
{
@@ -2666,32 +2631,32 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
gint focus_width, focus_pad;
ensure_tree_header_cell_widget();
- *left = *top = *right = *bottom = GTK_CONTAINER(gTreeHeaderCellWidget)->border_width;
+ *left = *top = *right = *bottom = GTK_CONTAINER(gParts->treeHeaderCellWidget)->border_width;
- moz_gtk_widget_get_focus(gTreeHeaderCellWidget, &interior_focus, &focus_width, &focus_pad);
- moz_gtk_button_get_inner_border(gTreeHeaderCellWidget, &inner_border);
+ moz_gtk_widget_get_focus(gParts->treeHeaderCellWidget, &interior_focus, &focus_width, &focus_pad);
+ moz_gtk_button_get_inner_border(gParts->treeHeaderCellWidget, &inner_border);
*left += focus_width + focus_pad + inner_border.left;
*right += focus_width + focus_pad + inner_border.right;
*top += focus_width + focus_pad + inner_border.top;
*bottom += focus_width + focus_pad + inner_border.bottom;
- *left += gTreeHeaderCellWidget->style->xthickness;
- *right += gTreeHeaderCellWidget->style->xthickness;
- *top += gTreeHeaderCellWidget->style->ythickness;
- *bottom += gTreeHeaderCellWidget->style->ythickness;
+ *left += gParts->treeHeaderCellWidget->style->xthickness;
+ *right += gParts->treeHeaderCellWidget->style->xthickness;
+ *top += gParts->treeHeaderCellWidget->style->ythickness;
+ *bottom += gParts->treeHeaderCellWidget->style->ythickness;
return MOZ_GTK_SUCCESS;
}
case MOZ_GTK_TREE_HEADER_SORTARROW:
ensure_tree_header_cell_widget();
- w = gTreeHeaderSortArrowWidget;
+ w = gParts->treeHeaderSortArrowWidget;
break;
case MOZ_GTK_DROPDOWN_ENTRY:
ensure_combo_box_entry_widgets();
- w = gComboBoxEntryTextareaWidget;
+ w = gParts->comboBoxEntryTextareaWidget;
break;
case MOZ_GTK_DROPDOWN_ARROW:
ensure_combo_box_entry_widgets();
- w = gComboBoxEntryButtonWidget;
+ w = gParts->comboBoxEntryButtonWidget;
break;
case MOZ_GTK_DROPDOWN:
{
@@ -2704,34 +2669,34 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
ensure_combo_box_widgets();
- *left = GTK_CONTAINER(gComboBoxButtonWidget)->border_width;
+ *left = GTK_CONTAINER(gParts->comboBoxButtonWidget)->border_width;
if (!inhtml) {
- moz_gtk_widget_get_focus(gComboBoxButtonWidget,
+ moz_gtk_widget_get_focus(gParts->comboBoxButtonWidget,
&ignored_interior_focus,
&focus_width, &focus_pad);
*left += focus_width + focus_pad;
}
- *top = *left + gComboBoxButtonWidget->style->ythickness;
- *left += gComboBoxButtonWidget->style->xthickness;
+ *top = *left + gParts->comboBoxButtonWidget->style->ythickness;
+ *left += gParts->comboBoxButtonWidget->style->xthickness;
*right = *left; *bottom = *top;
/* If there is no separator, don't try to count its width. */
separator_width = 0;
- if (gComboBoxSeparatorWidget) {
- gtk_widget_style_get(gComboBoxSeparatorWidget,
+ if (gParts->comboBoxSeparatorWidget) {
+ gtk_widget_style_get(gParts->comboBoxSeparatorWidget,
"wide-separators", &wide_separators,
"separator-width", &separator_width,
NULL);
if (!wide_separators)
separator_width =
- XTHICKNESS(gComboBoxSeparatorWidget->style);
+ XTHICKNESS(gParts->comboBoxSeparatorWidget->style);
}
- gtk_widget_size_request(gComboBoxArrowWidget, &arrow_req);
+ gtk_widget_size_request(gParts->comboBoxArrowWidget, &arrow_req);
if (direction == GTK_TEXT_DIR_RTL)
*left += separator_width + arrow_req.width;
@@ -2742,29 +2707,29 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
}
case MOZ_GTK_TABPANELS:
ensure_tab_widget();
- w = gTabWidget;
+ w = gParts->tabWidget;
break;
case MOZ_GTK_PROGRESSBAR:
ensure_progress_widget();
- w = gProgressWidget;
+ w = gParts->progresWidget;
break;
case MOZ_GTK_SPINBUTTON_ENTRY:
case MOZ_GTK_SPINBUTTON_UP:
case MOZ_GTK_SPINBUTTON_DOWN:
ensure_spin_widget();
- w = gSpinWidget;
+ w = gParts->spinWidget;
break;
case MOZ_GTK_SCALE_HORIZONTAL:
ensure_scale_widget();
- w = gHScaleWidget;
+ w = gParts->hScaleWidget;
break;
case MOZ_GTK_SCALE_VERTICAL:
ensure_scale_widget();
- w = gVScaleWidget;
+ w = gParts->vScaleWidget;
break;
case MOZ_GTK_FRAME:
ensure_frame_widget();
- w = gFrameWidget;
+ w = gParts->frameWidget;
break;
case MOZ_GTK_CHECKBUTTON_LABEL:
case MOZ_GTK_RADIOBUTTON_LABEL:
@@ -2776,12 +2741,12 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
(focus_width + focus_pad). */
if (widget == MOZ_GTK_CHECKBUTTON_LABEL) {
ensure_checkbox_widget();
- moz_gtk_widget_get_focus(gCheckboxWidget, &interior_focus,
+ moz_gtk_widget_get_focus(gParts->checkboxWidget, &interior_focus,
&focus_width, &focus_pad);
}
else {
ensure_radiobutton_widget();
- moz_gtk_widget_get_focus(gRadiobuttonWidget, &interior_focus,
+ moz_gtk_widget_get_focus(gParts->radiobuttonWidget, &interior_focus,
&focus_width, &focus_pad);
}
@@ -2803,14 +2768,14 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
of (focus_width + focus_pad). */
if (widget == MOZ_GTK_CHECKBUTTON_CONTAINER) {
ensure_checkbox_widget();
- moz_gtk_widget_get_focus(gCheckboxWidget, &interior_focus,
+ moz_gtk_widget_get_focus(gParts->checkboxWidget, &interior_focus,
&focus_width, &focus_pad);
- w = gCheckboxWidget;
+ w = gParts->checkboxWidget;
} else {
ensure_radiobutton_widget();
- moz_gtk_widget_get_focus(gRadiobuttonWidget, &interior_focus,
+ moz_gtk_widget_get_focus(gParts->radiobuttonWidget, &interior_focus,
&focus_width, &focus_pad);
- w = gRadiobuttonWidget;
+ w = gParts->radiobuttonWidget;
}
*left = *top = *right = *bottom = GTK_CONTAINER(w)->border_width;
@@ -2826,21 +2791,21 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
}
case MOZ_GTK_MENUPOPUP:
ensure_menu_popup_widget();
- w = gMenuPopupWidget;
+ w = gParts->menuPopupWidget;
break;
case MOZ_GTK_MENUITEM:
ensure_menu_item_widget();
ensure_menu_bar_item_widget();
- w = gMenuItemWidget;
+ w = gParts->menuItemWidget;
break;
case MOZ_GTK_CHECKMENUITEM:
case MOZ_GTK_RADIOMENUITEM:
ensure_check_menu_item_widget();
- w = gCheckMenuItemWidget;
+ w = gParts->checkMenuItemWidget;
break;
case MOZ_GTK_TAB:
ensure_tab_widget();
- w = gTabWidget;
+ w = gParts->tabWidget;
break;
/* These widgets have no borders, since they are not containers. */
case MOZ_GTK_SPLITTER_HORIZONTAL:
@@ -2895,7 +2860,7 @@ moz_gtk_get_combo_box_entry_button_size(gint* width, gint* height)
GtkRequisition requisition;
ensure_combo_box_entry_widgets();
- gtk_widget_size_request(gComboBoxEntryButtonWidget, &requisition);
+ gtk_widget_size_request(gParts->comboBoxEntryButtonWidget, &requisition);
*width = requisition.width;
*height = requisition.height;
@@ -2908,7 +2873,7 @@ moz_gtk_get_tab_scroll_arrow_size(gint* width, gint* height)
gint arrow_size;
ensure_tab_widget();
- gtk_widget_style_get(gTabWidget,
+ gtk_widget_style_get(gParts->tabWidget,
"scroll-arrow-hlength", &arrow_size,
NULL);
@@ -2923,7 +2888,7 @@ moz_gtk_get_downarrow_size(gint* width, gint* height)
GtkRequisition requisition;
ensure_button_arrow_widget();
- gtk_widget_size_request(gButtonArrowWidget, &requisition);
+ gtk_widget_size_request(gParts->buttonArrowWidget, &requisition);
*width = requisition.width;
*height = requisition.height;
@@ -2939,9 +2904,9 @@ moz_gtk_get_toolbar_separator_width(gint* size)
ensure_toolbar_widget();
- style = gToolbarWidget->style;
+ style = gParts->toolbarWidget->style;
- gtk_widget_style_get(gToolbarWidget,
+ gtk_widget_style_get(gParts->toolbarWidget,
"space-size", size,
"wide-separators", &wide_separators,
"separator-width", &separator_width,
@@ -2957,7 +2922,7 @@ gint
moz_gtk_get_expander_size(gint* size)
{
ensure_expander_widget();
- gtk_widget_style_get(gExpanderWidget,
+ gtk_widget_style_get(gParts->expanderWidget,
"expander-size", size,
NULL);
@@ -2968,7 +2933,7 @@ gint
moz_gtk_get_treeview_expander_size(gint* size)
{
ensure_tree_view_widget();
- gtk_widget_style_get(gTreeViewWidget,
+ gtk_widget_style_get(gParts->treeViewWidget,
"expander-size", size,
NULL);
@@ -2983,15 +2948,15 @@ moz_gtk_get_menu_separator_height(gint *size)
ensure_menu_separator_widget();
- gtk_widget_style_get(gMenuSeparatorWidget,
+ gtk_widget_style_get(gParts->menuSeparatorWidget,
"wide-separators", &wide_separators,
"separator-height", &separator_height,
NULL);
if (wide_separators)
- *size = separator_height + gMenuSeparatorWidget->style->ythickness;
+ *size = separator_height + gParts->menuSeparatorWidget->style->ythickness;
else
- *size = gMenuSeparatorWidget->style->ythickness * 2;
+ *size = gParts->menuSeparatorWidget->style->ythickness * 2;
return MOZ_GTK_SUCCESS;
}
@@ -3002,7 +2967,7 @@ moz_gtk_get_scalethumb_metrics(GtkOrientation orient, gint* thumb_length, gint*
GtkWidget* widget;
ensure_scale_widget();
- widget = ((orient == GTK_ORIENTATION_HORIZONTAL) ? gHScaleWidget : gVScaleWidget);
+ widget = ((orient == GTK_ORIENTATION_HORIZONTAL) ? gParts->hScaleWidget : gParts->vScaleWidget);
gtk_widget_style_get (widget,
"slider_length", thumb_length,
@@ -3017,7 +2982,7 @@ moz_gtk_get_scrollbar_metrics(MozGtkScrollbarMetrics *metrics)
{
ensure_scrollbar_widget();
- gtk_widget_style_get (gHorizScrollbarWidget,
+ gtk_widget_style_get (gParts->horizScrollbarWidget,
"slider_width", &metrics->slider_width,
"trough_border", &metrics->trough_border,
"stepper_size", &metrics->stepper_size,
@@ -3025,7 +2990,7 @@ moz_gtk_get_scrollbar_metrics(MozGtkScrollbarMetrics *metrics)
NULL);
metrics->min_slider_size =
- GTK_RANGE(gHorizScrollbarWidget)->min_slider_size;
+ GTK_RANGE(gParts->horizScrollbarWidget)->min_slider_size;
return MOZ_GTK_SUCCESS;
}
@@ -3037,7 +3002,7 @@ moz_gtk_images_in_menus()
GtkSettings* settings;
ensure_image_menu_item_widget();
- settings = gtk_widget_get_settings(gImageMenuItemWidget);
+ settings = gtk_widget_get_settings(gParts->imageMenuItemWidget);
g_object_get(settings, "gtk-menu-images", &result, NULL);
return result;
@@ -3055,11 +3020,11 @@ moz_gtk_widget_paint(GtkThemeWidgetType widget, GdkDrawable* drawable,
ensure_toggle_button_widget();
return moz_gtk_button_paint(drawable, rect, cliprect, state,
(GtkReliefStyle) flags,
- gToggleButtonWidget, direction);
+ gParts->toggleButtonWidget, direction);
}
ensure_button_widget();
return moz_gtk_button_paint(drawable, rect, cliprect, state,
- (GtkReliefStyle) flags, gButtonWidget,
+ (GtkReliefStyle) flags, gParts->buttonWidget,
direction);
break;
case MOZ_GTK_CHECKBUTTON:
@@ -3107,7 +3072,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType widget, GdkDrawable* drawable,
case MOZ_GTK_SPINBUTTON_ENTRY:
ensure_spin_widget();
return moz_gtk_entry_paint(drawable, rect, cliprect, state,
- gSpinWidget, direction);
+ gParts->spinWidget, direction);
break;
case MOZ_GTK_GRIPPER:
return moz_gtk_gripper_paint(drawable, rect, cliprect, state,
@@ -3138,7 +3103,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType widget, GdkDrawable* drawable,
case MOZ_GTK_ENTRY:
ensure_entry_widget();
return moz_gtk_entry_paint(drawable, rect, cliprect, state,
- gEntryWidget, direction);
+ gParts->entryWidget, direction);
break;
case MOZ_GTK_ENTRY_CARET:
return moz_gtk_caret_paint(drawable, rect, cliprect, direction);
@@ -3154,7 +3119,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType widget, GdkDrawable* drawable,
case MOZ_GTK_DROPDOWN_ENTRY:
ensure_combo_box_entry_widgets();
return moz_gtk_entry_paint(drawable, rect, cliprect, state,
- gComboBoxEntryTextareaWidget, direction);
+ gParts->comboBoxEntryTextareaWidget, direction);
break;
case MOZ_GTK_CHECKBUTTON_CONTAINER:
case MOZ_GTK_RADIOBUTTON_CONTAINER:
@@ -3252,65 +3217,13 @@ GtkWidget* moz_gtk_get_scrollbar_widget(void)
if (!is_initialized)
return NULL;
ensure_scrollbar_widget();
- return gHorizScrollbarWidget;
+ return gParts->horizScrollbarWidget;
}
gint
moz_gtk_shutdown()
{
GtkWidgetClass *entry_class;
-
- if (gTooltipWidget)
- gtk_widget_destroy(gTooltipWidget);
- /* This will destroy all of our widgets */
- if (gProtoWindow)
- gtk_widget_destroy(gProtoWindow);
-
- gProtoWindow = NULL;
- gProtoLayout = NULL;
- gButtonWidget = NULL;
- gToggleButtonWidget = NULL;
- gButtonArrowWidget = NULL;
- gCheckboxWidget = NULL;
- gRadiobuttonWidget = NULL;
- gHorizScrollbarWidget = NULL;
- gVertScrollbarWidget = NULL;
- gSpinWidget = NULL;
- gHScaleWidget = NULL;
- gVScaleWidget = NULL;
- gEntryWidget = NULL;
- gComboBoxWidget = NULL;
- gComboBoxButtonWidget = NULL;
- gComboBoxSeparatorWidget = NULL;
- gComboBoxArrowWidget = NULL;
- gComboBoxEntryWidget = NULL;
- gComboBoxEntryButtonWidget = NULL;
- gComboBoxEntryArrowWidget = NULL;
- gComboBoxEntryTextareaWidget = NULL;
- gHandleBoxWidget = NULL;
- gToolbarWidget = NULL;
- gStatusbarWidget = NULL;
- gFrameWidget = NULL;
- gProgressWidget = NULL;
- gTabWidget = NULL;
- gTooltipWidget = NULL;
- gMenuBarWidget = NULL;
- gMenuBarItemWidget = NULL;
- gMenuPopupWidget = NULL;
- gMenuItemWidget = NULL;
- gImageMenuItemWidget = NULL;
- gCheckMenuItemWidget = NULL;
- gTreeViewWidget = NULL;
- gMiddleTreeViewColumn = NULL;
- gTreeHeaderCellWidget = NULL;
- gTreeHeaderSortArrowWidget = NULL;
- gExpanderWidget = NULL;
- gToolbarSeparatorWidget = NULL;
- gMenuSeparatorWidget = NULL;
- gHPanedWidget = NULL;
- gVPanedWidget = NULL;
- gScrolledWindowWidget = NULL;
-
entry_class = g_type_class_peek(GTK_TYPE_ENTRY);
g_type_class_unref(entry_class);
@@ -3318,3 +3231,19 @@ moz_gtk_shutdown()
return MOZ_GTK_SUCCESS;
}
+
+void moz_gtk_destroy_theme_parts_widgets(GtkThemeParts* parts)
+{
+ if (!parts)
+ return;
+
+ if (parts->tooltipWidget) {
+ gtk_widget_destroy(parts->tooltipWidget);
+ parts->tooltipWidget = NULL;
+ }
+
+ if (parts->protoWindow) {
+ gtk_widget_destroy(parts->protoWindow);
+ parts->protoWindow = NULL;
+ }
+}
diff --git a/WebCore/platform/gtk/gtkdrawing.h b/WebCore/platform/gtk/gtkdrawing.h
index 1a33bfb..1e9023f 100644
--- a/WebCore/platform/gtk/gtkdrawing.h
+++ b/WebCore/platform/gtk/gtkdrawing.h
@@ -48,7 +48,6 @@
#ifndef _GTK_DRAWING_H_
#define _GTK_DRAWING_H_
-#include <gdk/gdk.h>
#include <gtk/gtk.h>
#ifdef __cplusplus
@@ -78,6 +77,54 @@ typedef struct {
gint min_slider_size;
} MozGtkScrollbarMetrics;
+typedef struct _GtkThemeParts {
+ GdkColormap* colormap;
+ GtkWidget* protoWindow;
+ GtkWidget* protoLayout;
+ GtkWidget* buttonWidget;
+ GtkWidget* toggleButtonWidget;
+ GtkWidget* buttonArrowWidget;
+ GtkWidget* checkboxWidget;
+ GtkWidget* radiobuttonWidget;
+ GtkWidget* horizScrollbarWidget;
+ GtkWidget* vertScrollbarWidget;
+ GtkWidget* spinWidget;
+ GtkWidget* hScaleWidget;
+ GtkWidget* vScaleWidget;
+ GtkWidget* entryWidget;
+ GtkWidget* comboBoxWidget;
+ GtkWidget* comboBoxButtonWidget;
+ GtkWidget* comboBoxArrowWidget;
+ GtkWidget* comboBoxSeparatorWidget;
+ GtkWidget* comboBoxEntryWidget;
+ GtkWidget* comboBoxEntryTextareaWidget;
+ GtkWidget* comboBoxEntryButtonWidget;
+ GtkWidget* comboBoxEntryArrowWidget;
+ GtkWidget* handleBoxWidget;
+ GtkWidget* toolbarWidget;
+ GtkWidget* frameWidget;
+ GtkWidget* statusbarWidget;
+ GtkWidget* progresWidget;
+ GtkWidget* tabWidget;
+ GtkWidget* tooltipWidget;
+ GtkWidget* menuBarWidget;
+ GtkWidget* menuBarItemWidget;
+ GtkWidget* menuPopupWidget;
+ GtkWidget* menuItemWidget;
+ GtkWidget* imageMenuItemWidget;
+ GtkWidget* checkMenuItemWidget;
+ GtkWidget* treeViewWidget;
+ GtkTreeViewColumn* middleTreeViewColumn;
+ GtkWidget* treeHeaderCellWidget;
+ GtkWidget* treeHeaderSortArrowWidget;
+ GtkWidget* expanderWidget;
+ GtkWidget* toolbarSeparatorWidget;
+ GtkWidget* menuSeparatorWidget;
+ GtkWidget* hpanedWidget;
+ GtkWidget* vpanedWidget;
+ GtkWidget* scrolledWindowWidget;
+} GtkThemeParts;
+
typedef enum {
MOZ_GTK_STEPPER_DOWN = 1 << 0,
MOZ_GTK_STEPPER_BOTTOM = 1 << 1,
@@ -226,6 +273,14 @@ typedef enum {
gint moz_gtk_init();
/**
+ * Instruct the drawing library to do all rendering based on
+ * the given collection of theme parts. If any members of the
+ * GtkThemeParts struct are NULL, they will be created lazily.
+ */
+void
+moz_gtk_use_theme_parts(GtkThemeParts* parts);
+
+/**
* Enable GTK+ 1.2.9+ theme enhancements. You must provide a pointer
* to the GTK+ 1.2.9+ function "gtk_style_get_prop_experimental".
* styleGetProp: pointer to gtk_style_get_prop_experimental
@@ -242,6 +297,11 @@ gint moz_gtk_enable_style_props(style_prop_t styleGetProp);
*/
gint moz_gtk_shutdown();
+/**
+ * Destroy the widgets in the given GtkThemeParts, which should
+ * be destroyed before the GtkThemeParts can be freed.
+ */
+void moz_gtk_destroy_theme_parts_widgets(GtkThemeParts* parts);
/*** Widget drawing ***/
/**
diff --git a/WebCore/platform/haiku/LocalizedStringsHaiku.cpp b/WebCore/platform/haiku/LocalizedStringsHaiku.cpp
index 9bb4c3e..3b94bcb 100644
--- a/WebCore/platform/haiku/LocalizedStringsHaiku.cpp
+++ b/WebCore/platform/haiku/LocalizedStringsHaiku.cpp
@@ -292,6 +292,16 @@ String AXHeadingText()
return String();
}
+String AXMenuListPopupActionVerb()
+{
+ return String();
+}
+
+String AXMenuListActionVerb()
+{
+ return String();
+}
+
String imageTitle(const String& filename, const IntSize& size)
{
return String(filename);
diff --git a/WebCore/platform/haiku/SharedBufferHaiku.cpp b/WebCore/platform/haiku/SharedBufferHaiku.cpp
index 113cd2e..abe9e2d 100644
--- a/WebCore/platform/haiku/SharedBufferHaiku.cpp
+++ b/WebCore/platform/haiku/SharedBufferHaiku.cpp
@@ -47,6 +47,7 @@ PassRefPtr<SharedBuffer> SharedBuffer::createWithContentsOfFile(const String& fi
result->m_buffer.resize(size);
if (result->m_buffer.size() != size)
return 0;
+ result->m_size = size;
file.Read(result->m_buffer.data(), result->m_buffer.size());
return result.release();
diff --git a/WebCore/platform/image-decoders/ImageDecoder.cpp b/WebCore/platform/image-decoders/ImageDecoder.cpp
index a16b940..62f6bec 100644
--- a/WebCore/platform/image-decoders/ImageDecoder.cpp
+++ b/WebCore/platform/image-decoders/ImageDecoder.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2008-2009 Torch Mobile, Inc.
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -22,9 +23,8 @@
#include "ImageDecoder.h"
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
#include <algorithm>
-#endif
+#include <cmath>
#include "BMPImageDecoder.h"
#include "GIFImageDecoder.h"
@@ -32,19 +32,36 @@
#include "JPEGImageDecoder.h"
#include "PNGImageDecoder.h"
#include "SharedBuffer.h"
-#include "XBMImageDecoder.h"
+
+using namespace std;
namespace WebCore {
+static unsigned copyFromSharedBuffer(char* buffer, unsigned bufferLength, const SharedBuffer& sharedBuffer, unsigned offset)
+{
+ unsigned bytesExtracted = 0;
+ const char* moreData;
+ while (unsigned moreDataLength = sharedBuffer.getSomeData(moreData, offset)) {
+ unsigned bytesToCopy = min(bufferLength - bytesExtracted, moreDataLength);
+ memcpy(buffer + bytesExtracted, moreData, bytesToCopy);
+ bytesExtracted += bytesToCopy;
+ if (bytesExtracted == bufferLength)
+ break;
+ offset += bytesToCopy;
+ }
+ return bytesExtracted;
+}
+
ImageDecoder* ImageDecoder::create(const SharedBuffer& data)
{
// We need at least 4 bytes to figure out what kind of image we're dealing with.
- int length = data.size();
- if (length < 4)
+ static const unsigned maxMarkerLength = 4;
+ char contents[maxMarkerLength];
+ unsigned length = copyFromSharedBuffer(contents, maxMarkerLength, data, 0);
+ if (length < maxMarkerLength)
return 0;
- const unsigned char* uContents = (const unsigned char*)data.data();
- const char* contents = data.data();
+ const unsigned char* uContents = reinterpret_cast<const unsigned char*>(contents);
// GIFs begin with GIF8(7 or 9).
if (strncmp(contents, "GIF8", 4) == 0)
@@ -73,10 +90,6 @@ ImageDecoder* ImageDecoder::create(const SharedBuffer& data)
!memcmp(contents, "\000\000\002\000", 4))
return new ICOImageDecoder();
- // XBMs require 8 bytes of info.
- if (length >= 8 && strncmp(contents, "#define ", 8) == 0)
- return new XBMImageDecoder();
-
// Give up. We don't know what the heck this is.
return 0;
}
@@ -170,8 +183,6 @@ int RGBA32Buffer::height() const
#endif
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
-
namespace {
enum MatchType {
@@ -196,6 +207,9 @@ inline void fillScaledValues(Vector<int>& scaledValues, double scaleRate, int le
template <MatchType type> int getScaledValue(const Vector<int>& scaledValues, int valueToMatch, int searchStart)
{
+ if (scaledValues.isEmpty())
+ return valueToMatch;
+
const int* dataStart = scaledValues.data();
const int* dataEnd = dataStart + scaledValues.size();
const int* matched = std::lower_bound(dataStart + searchStart, dataEnd, valueToMatch);
@@ -214,18 +228,19 @@ template <MatchType type> int getScaledValue(const Vector<int>& scaledValues, in
void ImageDecoder::prepareScaleDataIfNecessary()
{
- int width = m_size.width();
- int height = m_size.height();
+ int width = size().width();
+ int height = size().height();
int numPixels = height * width;
- if (m_maxNumPixels <= 0 || numPixels <= m_maxNumPixels) {
+ if (m_maxNumPixels > 0 && numPixels > m_maxNumPixels) {
+ m_scaled = true;
+ double scale = sqrt(m_maxNumPixels / (double)numPixels);
+ fillScaledValues(m_scaledColumns, scale, width);
+ fillScaledValues(m_scaledRows, scale, height);
+ } else if (m_scaled) {
m_scaled = false;
- return;
+ m_scaledColumns.clear();
+ m_scaledRows.clear();
}
-
- m_scaled = true;
- double scale = sqrt(m_maxNumPixels / (double)numPixels);
- fillScaledValues(m_scaledColumns, scale, width);
- fillScaledValues(m_scaledRows, scale, height);
}
int ImageDecoder::upperBoundScaledX(int origX, int searchStart)
@@ -238,11 +253,19 @@ int ImageDecoder::lowerBoundScaledX(int origX, int searchStart)
return getScaledValue<LowerBound>(m_scaledColumns, origX, searchStart);
}
+int ImageDecoder::upperBoundScaledY(int origY, int searchStart)
+{
+ return getScaledValue<UpperBound>(m_scaledRows, origY, searchStart);
+}
+
+int ImageDecoder::lowerBoundScaledY(int origY, int searchStart)
+{
+ return getScaledValue<LowerBound>(m_scaledRows, origY, searchStart);
+}
+
int ImageDecoder::scaledY(int origY, int searchStart)
{
return getScaledValue<Exact>(m_scaledRows, origY, searchStart);
}
-#endif // ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
-
}
diff --git a/WebCore/platform/image-decoders/ImageDecoder.h b/WebCore/platform/image-decoders/ImageDecoder.h
index 535efa1..3ca7abf 100644
--- a/WebCore/platform/image-decoders/ImageDecoder.h
+++ b/WebCore/platform/image-decoders/ImageDecoder.h
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2008-2009 Torch Mobile, Inc.
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
* Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
@@ -203,12 +204,11 @@ namespace WebCore {
// biggest size that decoded images can have. Image decoders will deflate those
// images that are bigger than m_maxNumPixels. (Not supported by all image decoders yet)
ImageDecoder()
- : m_failed(false)
+ : m_scaled(false)
+ , m_failed(false)
, m_sizeAvailable(false)
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
+ , m_isAllDataReceived(false)
, m_maxNumPixels(-1)
- , m_scaled(false)
-#endif
{
}
@@ -223,7 +223,12 @@ namespace WebCore {
virtual String filenameExtension() const = 0;
// All specific decoder plugins must do something with the data they are given.
- virtual void setData(SharedBuffer* data, bool allDataReceived) { m_data = data; }
+ bool isAllDataReceived() const { return m_isAllDataReceived; }
+ virtual void setData(SharedBuffer* data, bool allDataReceived)
+ {
+ m_data = data;
+ m_isAllDataReceived = allDataReceived;
+ }
// Whether or not the size information has been decoded yet. This default
// implementation just returns true if the size has been set and we have not
@@ -237,11 +242,14 @@ namespace WebCore {
// Returns the size of the image.
virtual IntSize size() const
{
- // Requesting the size of an invalid bitmap is meaningless.
- ASSERT(!m_failed);
return m_size;
}
+ IntSize scaledSize() const
+ {
+ return m_scaled ? IntSize(m_scaledColumns.size(), m_scaledRows.size()) : size();
+ }
+
// Returns the size of frame |index|. This will only differ from size()
// for formats where different frames are different sizes (namely ICO,
// where each frame represents a different icon within the master file).
@@ -300,20 +308,17 @@ namespace WebCore {
#endif
protected:
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
void prepareScaleDataIfNecessary();
int upperBoundScaledX(int origX, int searchStart = 0);
int lowerBoundScaledX(int origX, int searchStart = 0);
+ int upperBoundScaledY(int origY, int searchStart = 0);
+ int lowerBoundScaledY(int origY, int searchStart = 0);
int scaledY(int origY, int searchStart = 0);
-#endif
RefPtr<SharedBuffer> m_data; // The encoded data.
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
- int m_maxNumPixels;
Vector<int> m_scaledColumns;
Vector<int> m_scaledRows;
bool m_scaled;
-#endif
Vector<RGBA32Buffer> m_frameBufferCache;
bool m_failed;
@@ -331,6 +336,8 @@ namespace WebCore {
IntSize m_size;
bool m_sizeAvailable;
+ bool m_isAllDataReceived;
+ int m_maxNumPixels;
};
} // namespace WebCore
diff --git a/WebCore/platform/image-decoders/bmp/BMPImageReader.h b/WebCore/platform/image-decoders/bmp/BMPImageReader.h
index 1271172..3536e3b 100644
--- a/WebCore/platform/image-decoders/bmp/BMPImageReader.h
+++ b/WebCore/platform/image-decoders/bmp/BMPImageReader.h
@@ -46,7 +46,7 @@ namespace WebCore {
{
uint16_t result;
memcpy(&result, &data->data()[offset], 2);
- #if PLATFORM(BIG_ENDIAN)
+ #if CPU(BIG_ENDIAN)
result = ((result & 0xff) << 8) | ((result & 0xff00) >> 8);
#endif
return result;
@@ -56,7 +56,7 @@ namespace WebCore {
{
uint32_t result;
memcpy(&result, &data->data()[offset], 4);
- #if PLATFORM(BIG_ENDIAN)
+ #if CPU(BIG_ENDIAN)
result = ((result & 0xff) << 24) | ((result & 0xff00) << 8) |
((result & 0xff0000) >> 8) | ((result & 0xff000000) >> 24);
#endif
@@ -202,7 +202,7 @@ namespace WebCore {
// won't read it.
uint32_t pixel;
memcpy(&pixel, &m_data->data()[m_decodedOffset + offset], 3);
- #if PLATFORM(BIG_ENDIAN)
+ #if CPU(BIG_ENDIAN)
pixel = ((pixel & 0xff00) << 8) | ((pixel & 0xff0000) >> 8) |
((pixel & 0xff000000) >> 24);
#endif
diff --git a/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp b/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp
index 87036c9..1124bd2 100644
--- a/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp
+++ b/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp
@@ -29,70 +29,15 @@
namespace WebCore {
-class GIFImageDecoderPrivate {
-public:
- GIFImageDecoderPrivate(GIFImageDecoder* decoder = 0)
- : m_reader(decoder)
- , m_readOffset(0)
- {
- }
-
- ~GIFImageDecoderPrivate()
- {
- m_reader.close();
- }
-
- bool decode(SharedBuffer* data,
- GIFImageDecoder::GIFQuery query = GIFImageDecoder::GIFFullQuery,
- unsigned int haltFrame = -1)
- {
- return m_reader.read((const unsigned char*)data->data() + m_readOffset, data->size() - m_readOffset,
- query,
- haltFrame);
- }
-
- unsigned frameCount() const { return m_reader.images_count; }
- int repetitionCount() const { return m_reader.loop_count; }
-
- void setReadOffset(unsigned o) { m_readOffset = o; }
-
- bool isTransparent() const { return m_reader.frame_reader->is_transparent; }
-
- void getColorMap(unsigned char*& map, unsigned& size) const
- {
- if (m_reader.frame_reader->is_local_colormap_defined) {
- map = m_reader.frame_reader->local_colormap;
- size = (unsigned)m_reader.frame_reader->local_colormap_size;
- } else {
- map = m_reader.global_colormap;
- size = m_reader.global_colormap_size;
- }
- }
-
- unsigned frameXOffset() const { return m_reader.frame_reader->x_offset; }
- unsigned frameYOffset() const { return m_reader.frame_reader->y_offset; }
- unsigned frameWidth() const { return m_reader.frame_reader->width; }
- unsigned frameHeight() const { return m_reader.frame_reader->height; }
-
- int transparentPixel() const { return m_reader.frame_reader->tpixel; }
-
- unsigned duration() const { return m_reader.frame_reader->delay_time; }
-
-private:
- GIFImageReader m_reader;
- unsigned m_readOffset;
-};
-
GIFImageDecoder::GIFImageDecoder()
: m_frameCountValid(true)
, m_repetitionCount(cAnimationLoopOnce)
- , m_reader(0)
+ , m_readOffset(0)
{
}
GIFImageDecoder::~GIFImageDecoder()
{
- delete m_reader;
}
// Take the data and store it.
@@ -109,7 +54,7 @@ void GIFImageDecoder::setData(SharedBuffer* data, bool allDataReceived)
// Create the GIF reader.
if (!m_reader && !m_failed)
- m_reader = new GIFImageDecoderPrivate(this);
+ m_reader.set(new GIFImageReader(this));
}
// Whether or not the size information has been decoded yet.
@@ -132,13 +77,13 @@ size_t GIFImageDecoder::frameCount()
// slowly. Might be interesting to try to clone our existing read session to preserve
// state, but for now we just crawl all the data. Note that this is no worse than what
// ImageIO does on Mac right now (it also crawls all the data again).
- GIFImageDecoderPrivate reader;
+ GIFImageReader reader(0);
// This function may fail, but we want to keep any partial data it may
// have decoded, so don't mark it is invalid. If there is an overflow
// or some serious error, m_failed will have gotten set for us.
- reader.decode(m_data.get(), GIFFrameCountQuery);
+ reader.read((const unsigned char*)m_data->data(), m_data->size(), GIFFrameCountQuery, static_cast<unsigned>(-1));
m_frameCountValid = true;
- m_frameBufferCache.resize(reader.frameCount());
+ m_frameBufferCache.resize(reader.images_count);
}
return m_frameBufferCache.size();
@@ -161,7 +106,7 @@ int GIFImageDecoder::repetitionCount() const
// cAnimationLoopOnce (-1) when its current incarnation hasn't actually
// seen a loop count yet; in this case we return our previously-cached
// value.
- const int repetitionCount = m_reader->repetitionCount();
+ const int repetitionCount = m_reader->loop_count;
if (repetitionCount != cLoopCountNotSeen)
m_repetitionCount = repetitionCount;
}
@@ -235,43 +180,48 @@ void GIFImageDecoder::decode(GIFQuery query, unsigned haltAtFrame)
if (m_failed)
return;
- m_failed = !m_reader->decode(m_data.get(), query, haltAtFrame);
+ m_failed = !m_reader->read((const unsigned char*)m_data->data() + m_readOffset, m_data->size() - m_readOffset, query, haltAtFrame);
- if (m_failed) {
- delete m_reader;
- m_reader = 0;
- }
+ if (m_failed)
+ m_reader.clear();
}
// Callbacks from the GIF reader.
bool GIFImageDecoder::sizeNowAvailable(unsigned width, unsigned height)
{
- return setSize(width, height);
+ if (!setSize(width, height))
+ return false;
+ prepareScaleDataIfNecessary();
+ return true;
}
void GIFImageDecoder::decodingHalted(unsigned bytesLeft)
{
- m_reader->setReadOffset(m_data->size() - bytesLeft);
+ m_readOffset = m_data->size() - bytesLeft;
}
bool GIFImageDecoder::initFrameBuffer(unsigned frameIndex)
{
// Initialize the frame rect in our buffer.
- IntRect frameRect(m_reader->frameXOffset(), m_reader->frameYOffset(),
- m_reader->frameWidth(), m_reader->frameHeight());
+ const GIFFrameReader* frameReader = m_reader->frame_reader;
+ IntRect frameRect(frameReader->x_offset, frameReader->y_offset, frameReader->width, frameReader->height);
// Make sure the frameRect doesn't extend past the bottom-right of the buffer.
if (frameRect.right() > size().width())
- frameRect.setWidth(size().width() - m_reader->frameXOffset());
+ frameRect.setWidth(size().width() - frameReader->x_offset);
if (frameRect.bottom() > size().height())
- frameRect.setHeight(size().height() - m_reader->frameYOffset());
+ frameRect.setHeight(size().height() - frameReader->y_offset);
RGBA32Buffer* const buffer = &m_frameBufferCache[frameIndex];
- buffer->setRect(frameRect);
-
+ int left = upperBoundScaledX(frameRect.x());
+ int right = lowerBoundScaledX(frameRect.right(), left);
+ int top = upperBoundScaledY(frameRect.y());
+ int bottom = lowerBoundScaledY(frameRect.bottom(), top);
+ buffer->setRect(IntRect(left, top, right - left, bottom - top));
+
if (frameIndex == 0) {
// This is the first frame, so we're not relying on any previous data.
- if (!buffer->setSize(size().width(), size().height())) {
+ if (!buffer->setSize(scaledSize().width(), scaledSize().height())) {
m_failed = true;
return false;
}
@@ -302,11 +252,12 @@ bool GIFImageDecoder::initFrameBuffer(unsigned frameIndex)
// We want to clear the previous frame to transparent, without
// affecting pixels in the image outside of the frame.
const IntRect& prevRect = prevBuffer->rect();
+ const IntSize& bufferSize = scaledSize();
if ((frameIndex == 0)
- || prevRect.contains(IntRect(IntPoint(), size()))) {
+ || prevRect.contains(IntRect(IntPoint(), bufferSize))) {
// Clearing the first frame, or a frame the size of the whole
// image, results in a completely empty image.
- if (!buffer->setSize(size().width(), size().height())) {
+ if (!buffer->setSize(bufferSize.width(), bufferSize.height())) {
m_failed = true;
return false;
}
@@ -331,44 +282,51 @@ bool GIFImageDecoder::initFrameBuffer(unsigned frameIndex)
return true;
}
-void GIFImageDecoder::haveDecodedRow(unsigned frameIndex,
+bool GIFImageDecoder::haveDecodedRow(unsigned frameIndex,
unsigned char* rowBuffer,
unsigned char* rowEnd,
unsigned rowNumber,
unsigned repeatCount,
bool writeTransparentPixels)
{
+ const GIFFrameReader* frameReader = m_reader->frame_reader;
// The pixel data and coordinates supplied to us are relative to the frame's
// origin within the entire image size, i.e.
- // (m_reader->frameXOffset(), m_reader->frameYOffset()).
- int x = m_reader->frameXOffset();
- const int y = m_reader->frameYOffset() + rowNumber;
-
- // Sanity-check the arguments.
- if ((rowBuffer == 0) || (y >= size().height()))
- return;
+ // (frameReader->x_offset, frameReader->y_offset). There is no guarantee
+ // that (rowEnd - rowBuffer) == (size().width() - frameReader->x_offset), so
+ // we must ensure we don't run off the end of either the source data or the
+ // row's X-coordinates.
+ int xBegin = upperBoundScaledX(frameReader->x_offset);
+ int yBegin = upperBoundScaledY(frameReader->y_offset + rowNumber);
+ int xEnd = lowerBoundScaledX(std::min(xBegin + static_cast<int>(rowEnd - rowBuffer), size().width()) - 1, xBegin + 1) + 1;
+ int yEnd = lowerBoundScaledY(std::min(yBegin + static_cast<int>(repeatCount), size().height()) - 1, yBegin + 1) + 1;
+ if (!rowBuffer || (xBegin < 0) || (yBegin < 0) || (xEnd <= xBegin) || (yEnd <= yBegin))
+ return true;
// Get the colormap.
+ const unsigned char* colorMap;
unsigned colorMapSize;
- unsigned char* colorMap;
- m_reader->getColorMap(colorMap, colorMapSize);
+ if (frameReader->is_local_colormap_defined) {
+ colorMap = frameReader->local_colormap;
+ colorMapSize = (unsigned)frameReader->local_colormap_size;
+ } else {
+ colorMap = m_reader->global_colormap;
+ colorMapSize = m_reader->global_colormap_size;
+ }
if (!colorMap)
- return;
+ return true;
// Initialize the frame if necessary.
RGBA32Buffer& buffer = m_frameBufferCache[frameIndex];
if ((buffer.status() == RGBA32Buffer::FrameEmpty) && !initFrameBuffer(frameIndex))
- return;
+ return false;
- // Write one row's worth of data into the frame. There is no guarantee that
- // (rowEnd - rowBuffer) == (size().width() - m_reader->frameXOffset()), so
- // we must ensure we don't run off the end of either the source data or the
- // row's X-coordinates.
- for (unsigned char* sourceAddr = rowBuffer; (sourceAddr != rowEnd) && (x < size().width()); ++sourceAddr, ++x) {
- const unsigned char sourceValue = *sourceAddr;
- if ((!m_reader->isTransparent() || (sourceValue != m_reader->transparentPixel())) && (sourceValue < colorMapSize)) {
+ // Write one row's worth of data into the frame.
+ for (int x = xBegin; x < xEnd; ++x) {
+ const unsigned char sourceValue = *(rowBuffer + (m_scaled ? m_scaledColumns[x] : x) - frameReader->x_offset);
+ if ((!frameReader->is_transparent || (sourceValue != frameReader->tpixel)) && (sourceValue < colorMapSize)) {
const size_t colorIndex = static_cast<size_t>(sourceValue) * 3;
- buffer.setRGBA(x, y, colorMap[colorIndex], colorMap[colorIndex + 1], colorMap[colorIndex + 2], 255);
+ buffer.setRGBA(x, yBegin, colorMap[colorIndex], colorMap[colorIndex + 1], colorMap[colorIndex + 2], 255);
} else {
m_currentBufferSawAlpha = true;
// We may or may not need to write transparent pixels to the buffer.
@@ -379,13 +337,15 @@ void GIFImageDecoder::haveDecodedRow(unsigned frameIndex,
// beyond the first, or the initial passes will "show through" the
// later ones.
if (writeTransparentPixels)
- buffer.setRGBA(x, y, 0, 0, 0, 0);
+ buffer.setRGBA(x, yBegin, 0, 0, 0, 0);
}
}
// Tell the frame to copy the row data if need be.
if (repeatCount > 1)
- buffer.copyRowNTimes(m_reader->frameXOffset(), x, y, std::min(y + static_cast<int>(repeatCount), size().height()));
+ buffer.copyRowNTimes(xBegin, xEnd, yBegin, yEnd);
+
+ return true;
}
void GIFImageDecoder::frameComplete(unsigned frameIndex, unsigned frameDuration, RGBA32Buffer::FrameDisposalMethod disposalMethod)
@@ -403,7 +363,7 @@ void GIFImageDecoder::frameComplete(unsigned frameIndex, unsigned frameDuration,
if (!m_currentBufferSawAlpha) {
// The whole frame was non-transparent, so it's possible that the entire
// resulting buffer was non-transparent, and we can setHasAlpha(false).
- if (buffer.rect().contains(IntRect(IntPoint(), size())))
+ if (buffer.rect().contains(IntRect(IntPoint(), scaledSize())))
buffer.setHasAlpha(false);
else if (frameIndex > 0) {
// Tricky case. This frame does not have alpha only if everywhere
@@ -437,9 +397,8 @@ void GIFImageDecoder::frameComplete(unsigned frameIndex, unsigned frameDuration,
void GIFImageDecoder::gifComplete()
{
if (m_reader)
- m_repetitionCount = m_reader->repetitionCount();
- delete m_reader;
- m_reader = 0;
+ m_repetitionCount = m_reader->loop_count;
+ m_reader.clear();
}
} // namespace WebCore
diff --git a/WebCore/platform/image-decoders/gif/GIFImageDecoder.h b/WebCore/platform/image-decoders/gif/GIFImageDecoder.h
index 5227ea3..011ca96 100644
--- a/WebCore/platform/image-decoders/gif/GIFImageDecoder.h
+++ b/WebCore/platform/image-decoders/gif/GIFImageDecoder.h
@@ -27,10 +27,11 @@
#define GIFImageDecoder_h
#include "ImageDecoder.h"
+#include <wtf/OwnPtr.h>
-namespace WebCore {
+class GIFImageReader;
- class GIFImageDecoderPrivate;
+namespace WebCore {
// This class decodes the GIF image format.
class GIFImageDecoder : public ImageDecoder {
@@ -66,7 +67,7 @@ namespace WebCore {
// Callbacks from the GIF reader.
bool sizeNowAvailable(unsigned width, unsigned height);
void decodingHalted(unsigned bytesLeft);
- void haveDecodedRow(unsigned frameIndex, unsigned char* rowBuffer, unsigned char* rowEnd, unsigned rowNumber,
+ bool haveDecodedRow(unsigned frameIndex, unsigned char* rowBuffer, unsigned char* rowEnd, unsigned rowNumber,
unsigned repeatCount, bool writeTransparentPixels);
void frameComplete(unsigned frameIndex, unsigned frameDuration, RGBA32Buffer::FrameDisposalMethod disposalMethod);
void gifComplete();
@@ -80,7 +81,8 @@ namespace WebCore {
bool m_frameCountValid;
bool m_currentBufferSawAlpha;
mutable int m_repetitionCount;
- GIFImageDecoderPrivate* m_reader;
+ OwnPtr<GIFImageReader> m_reader;
+ unsigned m_readOffset;
};
} // namespace WebCore
diff --git a/WebCore/platform/image-decoders/gif/GIFImageReader.cpp b/WebCore/platform/image-decoders/gif/GIFImageReader.cpp
index 002f67a..ffb1310 100644
--- a/WebCore/platform/image-decoders/gif/GIFImageReader.cpp
+++ b/WebCore/platform/image-decoders/gif/GIFImageReader.cpp
@@ -104,7 +104,7 @@ using WebCore::GIFImageDecoder;
//******************************************************************************
// Send the data to the display front-end.
-void GIFImageReader::output_row()
+bool GIFImageReader::output_row()
{
GIFFrameReader* gs = frame_reader;
@@ -154,13 +154,14 @@ void GIFImageReader::output_row()
/* Protect against too much image data */
if ((unsigned)drow_start >= gs->height)
- return;
+ return true;
// CALLBACK: Let the client know we have decoded a row.
- if (clientptr && frame_reader)
- clientptr->haveDecodedRow(images_count - 1, frame_reader->rowbuf, frame_reader->rowend,
- drow_start, drow_end - drow_start + 1,
- gs->progressive_display && gs->interlaced && gs->ipass > 1);
+ if (clientptr && frame_reader &&
+ !clientptr->haveDecodedRow(images_count - 1, frame_reader->rowbuf, frame_reader->rowend,
+ drow_start, drow_end - drow_start + 1,
+ gs->progressive_display && gs->interlaced && gs->ipass > 1))
+ return false;
gs->rowp = gs->rowbuf;
@@ -207,15 +208,17 @@ void GIFImageReader::output_row()
}
} while (gs->irow > (gs->height - 1));
}
+
+ return true;
}
//******************************************************************************
/* Perform Lempel-Ziv-Welch decoding */
-int GIFImageReader::do_lzw(const unsigned char *q)
+bool GIFImageReader::do_lzw(const unsigned char *q)
{
GIFFrameReader* gs = frame_reader;
if (!gs)
- return 0;
+ return true;
int code;
int incode;
@@ -249,11 +252,12 @@ int GIFImageReader::do_lzw(const unsigned char *q)
unsigned rows_remaining = gs->rows_remaining;
if (rowp == rowend)
- return 0;
+ return true;
#define OUTPUT_ROW \
PR_BEGIN_MACRO \
- output_row(); \
+ if (!output_row()) \
+ return false; \
rows_remaining--; \
rowp = frame_reader->rowp; \
if (!rows_remaining) \
@@ -286,9 +290,7 @@ int GIFImageReader::do_lzw(const unsigned char *q)
/* Check for explicit end-of-stream code */
if (code == (clear_code + 1)) {
/* end-of-stream should only appear after all image data */
- if (rows_remaining != 0)
- return -1;
- return 0;
+ return rows_remaining == 0;
}
if (oldcode == -1) {
@@ -306,13 +308,13 @@ int GIFImageReader::do_lzw(const unsigned char *q)
code = oldcode;
if (stackp == stack + MAX_BITS)
- return -1;
+ return false;
}
while (code >= clear_code)
{
if (code >= MAX_BITS || code == prefix[code])
- return -1;
+ return false;
// Even though suffix[] only holds characters through suffix[avail - 1],
// allowing code >= avail here lets us be more tolerant of malformed
@@ -322,7 +324,7 @@ int GIFImageReader::do_lzw(const unsigned char *q)
code = prefix[code];
if (stackp == stack + MAX_BITS)
- return -1;
+ return false;
}
*stackp++ = firstchar = suffix[code];
@@ -369,7 +371,7 @@ int GIFImageReader::do_lzw(const unsigned char *q)
gs->rowp = rowp;
gs->rows_remaining = rows_remaining;
- return 0;
+ return true;
}
@@ -438,7 +440,7 @@ bool GIFImageReader::read(const unsigned char *buf, unsigned len,
switch (state)
{
case gif_lzw:
- if (do_lzw(q) < 0) {
+ if (!do_lzw(q)) {
state = gif_error;
break;
}
diff --git a/WebCore/platform/image-decoders/gif/GIFImageReader.h b/WebCore/platform/image-decoders/gif/GIFImageReader.h
index f0d127f..14c2fb4 100644
--- a/WebCore/platform/image-decoders/gif/GIFImageReader.h
+++ b/WebCore/platform/image-decoders/gif/GIFImageReader.h
@@ -208,8 +208,8 @@ struct GIFImageReader {
WebCore::GIFImageDecoder::GIFQuery query = WebCore::GIFImageDecoder::GIFFullQuery, unsigned haltAtFrame = -1);
private:
- void output_row();
- int do_lzw(const unsigned char *q);
+ bool output_row();
+ bool do_lzw(const unsigned char *q);
};
#endif
diff --git a/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp b/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
index 410ef60..2a2636a 100644
--- a/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
+++ b/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
@@ -39,10 +39,9 @@
#include "config.h"
#include "JPEGImageDecoder.h"
-#include <assert.h>
#include <stdio.h> // Needed by jpeglib.h for FILE.
-#if PLATFORM(WINCE)
+#if OS(WINCE)
// Remove warning: 'FAR' macro redefinition
#undef FAR
@@ -271,7 +270,7 @@ public:
return true; /* I/O suspension */
/* If we've completed image output ... */
- assert(m_info.output_scanline == m_info.output_height);
+ ASSERT(m_info.output_scanline == m_info.output_height);
m_state = JPEG_DONE;
}
}
@@ -401,12 +400,11 @@ void term_source (j_decompress_ptr jd)
}
JPEGImageDecoder::JPEGImageDecoder()
-: m_reader(0)
-{}
+{
+}
JPEGImageDecoder::~JPEGImageDecoder()
{
- delete m_reader;
}
// Take the data and store it.
@@ -420,7 +418,7 @@ void JPEGImageDecoder::setData(SharedBuffer* data, bool allDataReceived)
// Create the JPEG reader.
if (!m_reader && !m_failed)
- m_reader = new JPEGImageReader(this);
+ m_reader.set(new JPEGImageReader(this));
}
// Whether or not the size information has been decoded yet.
@@ -432,6 +430,14 @@ bool JPEGImageDecoder::isSizeAvailable()
return ImageDecoder::isSizeAvailable();
}
+bool JPEGImageDecoder::setSize(unsigned width, unsigned height)
+{
+ if (!ImageDecoder::setSize(width, height))
+ return false;
+ prepareScaleDataIfNecessary();
+ return true;
+}
+
RGBA32Buffer* JPEGImageDecoder::frameBufferAtIndex(size_t index)
{
if (index)
@@ -455,82 +461,8 @@ void JPEGImageDecoder::decode(bool sizeOnly)
m_failed = !m_reader->decode(m_data->buffer(), sizeOnly);
- if (m_failed || (!m_frameBufferCache.isEmpty() && m_frameBufferCache[0].status() == RGBA32Buffer::FrameComplete)) {
- delete m_reader;
- m_reader = 0;
- }
-}
-
-static void convertCMYKToRGBA(RGBA32Buffer& dest, int destY, JSAMPROW src, JDIMENSION srcWidth
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
- , bool scaled, const Vector<int>& scaledColumns
-#endif
- )
-{
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
- if (scaled) {
- int numColumns = scaledColumns.size();
- for (int x = 0; x < numColumns; ++x) {
- JSAMPLE* jsample = src + scaledColumns[x] * 3;
- unsigned c = jsample[0];
- unsigned m = jsample[1];
- unsigned y = jsample[2];
- unsigned k = jsample[3];
- dest.setRGBA(x, destY, c * k / 255, m * k / 255, y * k / 255, 0xFF);
- }
- return;
- }
-#endif
- for (JDIMENSION x = 0; x < srcWidth; ++x) {
- unsigned c = *src++;
- unsigned m = *src++;
- unsigned y = *src++;
- unsigned k = *src++;
-
- // Source is 'Inverted CMYK', output is RGB.
- // See: http://www.easyrgb.com/math.php?MATH=M12#text12
- // Or: http://www.ilkeratalay.com/colorspacesfaq.php#rgb
-
- // From CMYK to CMY
- // C = C * ( 1 - K ) + K
- // M = M * ( 1 - K ) + K
- // Y = Y * ( 1 - K ) + K
-
- // From Inverted CMYK to CMY is thus:
- // C = (1-iC) * (1 - (1-iK)) + (1-iK) => 1 - iC*iK
- // Same for M and Y
-
- // Convert from CMY (0..1) to RGB (0..1)
- // R = 1 - C => 1 - (1 - iC*iK) => iC*iK
- // G = 1 - M => 1 - (1 - iM*iK) => iM*iK
- // B = 1 - Y => 1 - (1 - iY*iK) => iY*iK
-
- dest.setRGBA(x, destY, c * k / 255, m * k / 255, y * k / 255, 0xFF);
- }
-}
-
-static void convertRGBToRGBA(RGBA32Buffer& dest, int destY, JSAMPROW src, JDIMENSION srcWidth
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
- , bool scaled, const Vector<int>& scaledColumns
-#endif
- )
-{
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
- if (scaled) {
- int numColumns = scaledColumns.size();
- for (int x = 0; x < numColumns; ++x) {
- JSAMPLE* jsample = src + scaledColumns[x] * 3;
- dest.setRGBA(x, destY, jsample[0], jsample[1], jsample[2], 0xFF);
- }
- return;
- }
-#endif
- for (JDIMENSION x = 0; x < srcWidth; ++x) {
- unsigned r = *src++;
- unsigned g = *src++;
- unsigned b = *src++;
- dest.setRGBA(x, destY, r, g, b, 0xFF);
- }
+ if (m_failed || (!m_frameBufferCache.isEmpty() && m_frameBufferCache[0].status() == RGBA32Buffer::FrameComplete))
+ m_reader.clear();
}
bool JPEGImageDecoder::outputScanlines()
@@ -541,17 +473,7 @@ bool JPEGImageDecoder::outputScanlines()
// Initialize the framebuffer if needed.
RGBA32Buffer& buffer = m_frameBufferCache[0];
if (buffer.status() == RGBA32Buffer::FrameEmpty) {
- int bufferWidth = size().width();
- int bufferHeight = size().height();
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
- // Let's resize our buffer now to the correct width/height.
- if (m_scaled) {
- bufferWidth = m_scaledColumns.size();
- bufferHeight = m_scaledRows.size();
- }
-#endif
-
- if (!buffer.setSize(bufferWidth, bufferHeight)) {
+ if (!buffer.setSize(scaledSize().width(), scaledSize().height())) {
m_failed = true;
return false;
}
@@ -573,27 +495,32 @@ bool JPEGImageDecoder::outputScanlines()
if (jpeg_read_scanlines(info, samples, 1) != 1)
return false;
- int destY = sourceY;
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
- if (m_scaled) {
- destY = scaledY(sourceY);
- if (destY < 0)
- continue;
+ int destY = scaledY(sourceY);
+ if (destY < 0)
+ continue;
+ int width = m_scaled ? m_scaledColumns.size() : info->output_width;
+ for (int x = 0; x < width; ++x) {
+ JSAMPLE* jsample = *samples + (m_scaled ? m_scaledColumns[x] : x) * ((info->out_color_space == JCS_RGB) ? 3 : 4);
+ if (info->out_color_space == JCS_RGB)
+ buffer.setRGBA(x, destY, jsample[0], jsample[1], jsample[2], 0xFF);
+ else if (info->out_color_space == JCS_CMYK) {
+ // Source is 'Inverted CMYK', output is RGB.
+ // See: http://www.easyrgb.com/math.php?MATH=M12#text12
+ // Or: http://www.ilkeratalay.com/colorspacesfaq.php#rgb
+ // From CMYK to CMY:
+ // X = X * (1 - K ) + K [for X = C, M, or Y]
+ // Thus, from Inverted CMYK to CMY is:
+ // X = (1-iX) * (1 - (1-iK)) + (1-iK) => 1 - iX*iK
+ // From CMY (0..1) to RGB (0..1):
+ // R = 1 - C => 1 - (1 - iC*iK) => iC*iK [G and B similar]
+ unsigned k = jsample[3];
+ buffer.setRGBA(x, destY, jsample[0] * k / 255, jsample[1] * k / 255, jsample[2] * k / 255, 0xFF);
+ } else {
+ ASSERT_NOT_REACHED();
+ m_failed = true;
+ return false;
+ }
}
- if (info->out_color_space == JCS_RGB)
- convertRGBToRGBA(buffer, destY, *samples, info->output_width, m_scaled, m_scaledColumns);
- else if (info->out_color_space == JCS_CMYK)
- convertCMYKToRGBA(buffer, destY, *samples, info->output_width, m_scaled, m_scaledColumns);
- else
- return false;
-#else
- if (info->out_color_space == JCS_RGB)
- convertRGBToRGBA(buffer, destY, *samples, info->output_width);
- else if (info->out_color_space == JCS_CMYK)
- convertCMYKToRGBA(buffer, destY, *samples, info->output_width);
- else
- return false;
-#endif
}
return true;
diff --git a/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h b/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h
index 4a822d7..d8bfd70 100644
--- a/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h
+++ b/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h
@@ -28,6 +28,7 @@
#define JPEGImageDecoder_h
#include "ImageDecoder.h"
+#include <wtf/OwnPtr.h>
namespace WebCore {
@@ -47,29 +48,19 @@ namespace WebCore {
// Whether or not the size information has been decoded yet.
virtual bool isSizeAvailable();
+ virtual bool setSize(unsigned width, unsigned height);
+
virtual RGBA32Buffer* frameBufferAtIndex(size_t index);
virtual bool supportsAlpha() const { return false; }
void decode(bool sizeOnly = false);
- JPEGImageReader* reader() { return m_reader; }
-
bool outputScanlines();
void jpegComplete();
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
- bool setSize(int width, int height)
- {
- if (!ImageDecoder::setSize(width, height))
- return false;
- prepareScaleDataIfNecessary();
- return true;
- }
-#endif
-
private:
- JPEGImageReader* m_reader;
+ OwnPtr<JPEGImageReader> m_reader;
};
} // namespace WebCore
diff --git a/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp b/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
index ad79fc8..35c8af0 100644
--- a/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
+++ b/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2006 Apple Computer, Inc.
* Copyright (C) 2007-2009 Torch Mobile, Inc.
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
*
* Portions are Copyright (C) 2001 mozilla.org
*
@@ -39,7 +40,6 @@
#include "config.h"
#include "PNGImageDecoder.h"
#include "png.h"
-#include "assert.h"
namespace WebCore {
@@ -76,6 +76,8 @@ public:
, m_decodingSizeOnly(false)
, m_interlaceBuffer(0)
, m_hasAlpha(0)
+ , m_hasFinishedDecoding(false)
+ , m_currentBufferSize(0)
{
m_png = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, decodingFailed, decodingWarning);
m_info = png_create_info_struct(m_png);
@@ -93,9 +95,14 @@ public:
delete []m_interlaceBuffer;
m_interlaceBuffer = 0;
m_readOffset = 0;
+ m_hasFinishedDecoding = false;
}
- void decode(const Vector<char>& data, bool sizeOnly)
+ unsigned currentBufferSize() const { return m_currentBufferSize; }
+
+ void setComplete() { m_hasFinishedDecoding = true; }
+
+ void decode(const SharedBuffer& data, bool sizeOnly)
{
m_decodingSizeOnly = sizeOnly;
@@ -105,13 +112,17 @@ public:
return;
}
- // Go ahead and assume we consumed all the data. If we consume less, the
- // callback will adjust our read offset accordingly. Do not attempt to adjust the
- // offset after png_process_data returns.
- unsigned offset = m_readOffset;
- unsigned remaining = data.size() - m_readOffset;
- m_readOffset = data.size();
- png_process_data(m_png, m_info, (png_bytep)(data.data()) + offset, remaining);
+ PNGImageDecoder* decoder = static_cast<PNGImageDecoder*>(png_get_progressive_ptr(m_png));
+ const char* segment;
+ while (unsigned segmentLength = data.getSomeData(segment, m_readOffset)) {
+ m_readOffset += segmentLength;
+ m_currentBufferSize = m_readOffset;
+ png_process_data(m_png, m_info, reinterpret_cast<png_bytep>(const_cast<char*>(segment)), segmentLength);
+ if ((sizeOnly && decoder->isSizeAvailable()) || m_hasFinishedDecoding)
+ return;
+ }
+ if (!m_hasFinishedDecoding && decoder->isAllDataReceived())
+ decoder->pngComplete();
}
bool decodingSizeOnly() const { return m_decodingSizeOnly; }
@@ -134,16 +145,16 @@ private:
png_infop m_info;
png_bytep m_interlaceBuffer;
bool m_hasAlpha;
+ bool m_hasFinishedDecoding;
+ unsigned m_currentBufferSize;
};
PNGImageDecoder::PNGImageDecoder()
- : m_reader(0)
{
}
PNGImageDecoder::~PNGImageDecoder()
{
- delete m_reader;
}
// Take the data and store it.
@@ -157,7 +168,7 @@ void PNGImageDecoder::setData(SharedBuffer* data, bool allDataReceived)
// Create the PNG reader.
if (!m_reader && !m_failed)
- m_reader = new PNGImageReader(this);
+ m_reader.set(new PNGImageReader(this));
}
// Whether or not the size information has been decoded yet.
@@ -190,12 +201,10 @@ void PNGImageDecoder::decode(bool sizeOnly)
if (m_failed)
return;
- m_reader->decode(m_data->buffer(), sizeOnly);
+ m_reader->decode(*m_data, sizeOnly);
- if (m_failed || (!m_frameBufferCache.isEmpty() && m_frameBufferCache[0].status() == RGBA32Buffer::FrameComplete)) {
- delete m_reader;
- m_reader = 0;
- }
+ if (m_failed || (!m_frameBufferCache.isEmpty() && m_frameBufferCache[0].status() == RGBA32Buffer::FrameComplete))
+ m_reader.clear();
}
void decodingFailed(png_structp png, png_const_charp errorMsg)
@@ -224,8 +233,8 @@ void PNGImageDecoder::decodingFailed()
void PNGImageDecoder::headerAvailable()
{
- png_structp png = reader()->pngPtr();
- png_infop info = reader()->infoPtr();
+ png_structp png = m_reader->pngPtr();
+ png_infop info = m_reader->infoPtr();
png_uint_32 width = png->width;
png_uint_32 height = png->height;
@@ -243,9 +252,7 @@ void PNGImageDecoder::headerAvailable()
longjmp(png->jmpbuf, 1);
return;
}
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
prepareScaleDataIfNecessary();
-#endif
}
int bitDepth, colorType, interlaceType, compressionType, filterType, channels;
@@ -292,13 +299,13 @@ void PNGImageDecoder::headerAvailable()
// Update our info now
png_read_update_info(png, info);
channels = png_get_channels(png, info);
- assert(channels == 3 || channels == 4);
+ ASSERT(channels == 3 || channels == 4);
- reader()->setHasAlpha(channels == 4);
+ m_reader->setHasAlpha(channels == 4);
- if (reader()->decodingSizeOnly()) {
+ if (m_reader->decodingSizeOnly()) {
// If we only needed the size, halt the reader.
- reader()->setReadOffset(m_data->size() - png->buffer_size);
+ m_reader->setReadOffset(m_reader->currentBufferSize() - png->buffer_size);
png->buffer_size = 0;
}
}
@@ -317,16 +324,9 @@ void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex,
// Initialize the framebuffer if needed.
RGBA32Buffer& buffer = m_frameBufferCache[0];
if (buffer.status() == RGBA32Buffer::FrameEmpty) {
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
- int width = m_scaled ? m_scaledColumns.size() : size().width();
- int height = m_scaled ? m_scaledRows.size() : size().height();
-#else
- int width = size().width();
- int height = size().height();
-#endif
- if (!buffer.setSize(width, height)) {
- static_cast<PNGImageDecoder*>(png_get_progressive_ptr(reader()->pngPtr()))->decodingFailed();
- longjmp(reader()->pngPtr()->jmpbuf, 1);
+ if (!buffer.setSize(scaledSize().width(), scaledSize().height())) {
+ static_cast<PNGImageDecoder*>(png_get_progressive_ptr(m_reader->pngPtr()))->decodingFailed();
+ longjmp(m_reader->pngPtr()->jmpbuf, 1);
return;
}
buffer.setStatus(RGBA32Buffer::FramePartial);
@@ -335,8 +335,8 @@ void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex,
// For PNGs, the frame always fills the entire image.
buffer.setRect(IntRect(IntPoint(), size()));
- if (reader()->pngPtr()->interlaced)
- reader()->createInterlaceBuffer((reader()->hasAlpha() ? 4 : 3) * size().width() * size().height());
+ if (m_reader->pngPtr()->interlaced)
+ m_reader->createInterlaceBuffer((m_reader->hasAlpha() ? 4 : 3) * size().width() * size().height());
}
if (rowBuffer == 0)
@@ -370,11 +370,11 @@ void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex,
* old row and the new row.
*/
- png_structp png = reader()->pngPtr();
- bool hasAlpha = reader()->hasAlpha();
+ png_structp png = m_reader->pngPtr();
+ bool hasAlpha = m_reader->hasAlpha();
unsigned colorChannels = hasAlpha ? 4 : 3;
png_bytep row;
- png_bytep interlaceBuffer = reader()->interlaceBuffer();
+ png_bytep interlaceBuffer = m_reader->interlaceBuffer();
if (interlaceBuffer) {
row = interlaceBuffer + (rowIndex * colorChannels * size().width());
png_progressive_combine_row(png, row, rowBuffer);
@@ -383,33 +383,15 @@ void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex,
row = rowBuffer;
// Copy the data into our buffer.
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
- if (m_scaled) {
- int destY = scaledY(rowIndex);
- if (destY < 0)
- return;
- int columns = m_scaledColumns.size();
- bool sawAlpha = buffer.hasAlpha();
- for (int x = 0; x < columns; ++x) {
- png_bytep pixel = row + m_scaledColumns[x] * 4;
- unsigned alpha = pixel[3];
- buffer.setRGBA(x, destY, pixel[0], pixel[1], pixel[2], alpha);
- if (!sawAlpha && alpha < 255) {
- sawAlpha = true;
- buffer.setHasAlpha(true);
- }
- }
+ int width = scaledSize().width();
+ int destY = scaledY(rowIndex);
+ if (destY < 0)
return;
- }
-#endif
- int width = size().width();
bool sawAlpha = buffer.hasAlpha();
for (int x = 0; x < width; x++) {
- unsigned red = *row++;
- unsigned green = *row++;
- unsigned blue = *row++;
- unsigned alpha = (hasAlpha ? *row++ : 255);
- buffer.setRGBA(x, rowIndex, red, green, blue, alpha);
+ png_bytep pixel = row + (m_scaled ? m_scaledColumns[x] : x) * colorChannels;
+ unsigned alpha = hasAlpha ? pixel[3] : 255;
+ buffer.setRGBA(x, destY, pixel[0], pixel[1], pixel[2], alpha);
if (!sawAlpha && alpha < 255) {
sawAlpha = true;
buffer.setHasAlpha(true);
@@ -424,6 +406,8 @@ void pngComplete(png_structp png, png_infop info)
void PNGImageDecoder::pngComplete()
{
+ m_reader->setComplete();
+
if (m_frameBufferCache.isEmpty())
return;
diff --git a/WebCore/platform/image-decoders/png/PNGImageDecoder.h b/WebCore/platform/image-decoders/png/PNGImageDecoder.h
index 3c0535b..07a0b3a 100644
--- a/WebCore/platform/image-decoders/png/PNGImageDecoder.h
+++ b/WebCore/platform/image-decoders/png/PNGImageDecoder.h
@@ -27,6 +27,7 @@
#define PNGImageDecoder_h
#include "ImageDecoder.h"
+#include <wtf/OwnPtr.h>
namespace WebCore {
@@ -50,8 +51,6 @@ namespace WebCore {
void decode(bool sizeOnly = false);
- PNGImageReader* reader() { return m_reader; }
-
// Callbacks from libpng
void decodingFailed();
void headerAvailable();
@@ -59,7 +58,7 @@ namespace WebCore {
void pngComplete();
private:
- PNGImageReader* m_reader;
+ OwnPtr<PNGImageReader> m_reader;
};
} // namespace WebCore
diff --git a/WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp b/WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp
index 5e9b527..d3218cd 100644
--- a/WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp
+++ b/WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp
@@ -83,11 +83,8 @@ bool RGBA32Buffer::setSize(int newWidth, int newHeight)
m_size = IntSize(newWidth, newHeight);
m_image = QImage(newWidth, newHeight, QImage::Format_ARGB32_Premultiplied);
- if (m_image.isNull()) {
- // Allocation failure, maybe the bitmap was too big.
- setStatus(FrameComplete);
+ if (m_image.isNull())
return false;
- }
// Zero the image.
zeroFill();
diff --git a/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp b/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp
index 96342fa..543eca8 100644
--- a/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp
+++ b/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp
@@ -70,11 +70,8 @@ bool RGBA32Buffer::setSize(int newWidth, int newHeight)
// otherwise.
ASSERT(width() == 0 && height() == 0);
m_bitmap.setConfig(SkBitmap::kARGB_8888_Config, newWidth, newHeight);
- if (!m_bitmap.allocPixels()) {
- // Allocation failure, maybe the bitmap was too big.
- setStatus(FrameComplete);
+ if (!m_bitmap.allocPixels())
return false;
- }
// Zero the image.
zeroFill();
diff --git a/WebCore/platform/image-decoders/xbm/XBMImageDecoder.cpp b/WebCore/platform/image-decoders/xbm/XBMImageDecoder.cpp
deleted file mode 100644
index 332bc72..0000000
--- a/WebCore/platform/image-decoders/xbm/XBMImageDecoder.cpp
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "XBMImageDecoder.h"
-
-#include "ASCIICType.h"
-
-#include <algorithm>
-#include <cstdio>
-
-namespace WebCore {
-
-XBMImageDecoder::XBMImageDecoder()
- : m_decodeOffset(0)
- , m_allDataReceived(false)
- , m_decodedHeader(false)
- , m_dataType(Unknown)
- , m_bitsDecoded(0)
-{
-}
-
-void XBMImageDecoder::setData(SharedBuffer* data, bool allDataReceived)
-{
- ImageDecoder::setData(data, allDataReceived);
- m_xbmString = data->buffer();
- m_xbmString.append('\0');
-
- m_allDataReceived = allDataReceived;
-}
-
-bool XBMImageDecoder::isSizeAvailable()
-{
- if (!ImageDecoder::isSizeAvailable() && !m_failed)
- decode(true);
-
- return ImageDecoder::isSizeAvailable();
-}
-
-RGBA32Buffer* XBMImageDecoder::frameBufferAtIndex(size_t index)
-{
- if (index)
- return 0;
-
- if (m_frameBufferCache.isEmpty())
- m_frameBufferCache.resize(1);
-
- // Attempt to get the size if we don't have it yet.
- if (!ImageDecoder::isSizeAvailable())
- decode(true);
-
- // Initialize the framebuffer if needed.
- RGBA32Buffer& buffer = m_frameBufferCache[0];
- if (!failed() && ImageDecoder::isSizeAvailable()
- && (buffer.status() == RGBA32Buffer::FrameEmpty)) {
- if (!buffer.setSize(size().width(), size().height())) {
- m_failed = true;
- return 0;
- }
- buffer.setStatus(RGBA32Buffer::FramePartial);
-
- // For XBMs, the frame always fills the entire image.
- buffer.setRect(IntRect(IntPoint(), size()));
- }
-
- // Keep trying to decode until we've got the entire image.
- if (buffer.status() == RGBA32Buffer::FramePartial)
- decode(false);
-
- return &buffer;
-}
-
-bool XBMImageDecoder::decodeHeader()
-{
- ASSERT(m_decodeOffset <= m_xbmString.size());
- ASSERT(!m_decodedHeader);
-
- const char* input = m_xbmString.data();
-
- // At least 2 "#define <string> <unsigned>" sequences are required. These
- // specify the width and height of the image.
- int width, height;
- if (!ImageDecoder::isSizeAvailable()) {
- int count;
- if (sscanf(&input[m_decodeOffset], "#define %*s %i #define %*s %i%n",
- &width, &height, &count) != 2)
- return false;
-
- // The width and height need to follow some rules.
- if (width < 0 || width > maxDimension || height < 0 || height > maxDimension) {
- // If this happens, decoding should not continue.
- setFailed();
- return false;
- }
-
- if (!setSize(width, height)) {
- setFailed();
- return false;
- }
- m_decodeOffset += count;
- ASSERT(m_decodeOffset <= m_xbmString.size());
- }
-
- ASSERT(ImageDecoder::isSizeAvailable());
-
- // Now we're looking for something that tells us that we've seen all of the
- // "#define <string> <unsigned>" sequences that we're going to. Mozilla
- // just looks for " char " or " short ". We'll do the same.
- if (m_dataType == Unknown) {
- const char* x11hint = " char ";
- const char* x11HintLocation = strstr(&input[m_decodeOffset], x11hint);
- if (x11HintLocation) {
- m_dataType = X11;
- m_decodeOffset += ((x11HintLocation - &input[m_decodeOffset]) + strlen(x11hint));
- } else {
- const char* x10hint = " short ";
- const char* x10HintLocation = strstr(&input[m_decodeOffset], x10hint);
- if (x10HintLocation) {
- m_dataType = X10;
- m_decodeOffset += ((x10HintLocation - &input[m_decodeOffset]) + strlen(x10hint));
- } else
- return false;
- }
- ASSERT(m_decodeOffset <= m_xbmString.size());
- }
-
- // Find the start of the data. Again, we do what mozilla does and just
- // look for a '{' in the input.
- const char* found = strchr(&input[m_decodeOffset], '{');
- if (!found)
- return false;
-
- // Advance to character after the '{'
- m_decodeOffset += ((found - &input[m_decodeOffset]) + 1);
- ASSERT(m_decodeOffset <= m_xbmString.size());
- m_decodedHeader = true;
-
- return true;
-}
-
-// The data in an XBM file is provided as an array of either "char" or "short"
-// values. These values are decoded one at a time using strtoul() and the bits
-// are used to set the alpha value for the image.
-//
-// The value for the color is always set to RGB(0,0,0), the alpha value takes
-// care of whether or not the pixel shows up.
-//
-// Since the data may arrive in chunks, and many prefixes of valid numbers are
-// themselves valid numbers, this code needs to check to make sure that the
-// value is not truncated. This is done by consuming space after the value
-// read until a ',' or a '}' occurs. In a valid XBM, one of these characters
-// will occur after each value.
-//
-// The checks after strtoul are based on Mozilla's nsXBMDecoder.cpp.
-bool XBMImageDecoder::decodeDatum(uint16_t* result)
-{
- const char* input = m_xbmString.data();
- char* endPtr;
- const uint16_t value = strtoul(&input[m_decodeOffset], &endPtr, 0);
-
- // End of input or couldn't decode anything, can't go any further.
- if (endPtr == &input[m_decodeOffset] || !*endPtr)
- return false;
-
- // Possibly a hex value truncated at "0x". Need more data.
- if (value == 0 && (*endPtr == 'x' || *endPtr == 'X'))
- return false;
-
- // Skip whitespace
- while (*endPtr && isASCIISpace(*endPtr))
- ++endPtr;
-
- // Out of input, don't know what comes next.
- if (!*endPtr)
- return false;
-
- // If the next non-whitespace character is not one of these, it's an error.
- // Every valid entry in the data array needs to be followed by ',' or '}'.
- if (*endPtr != ',' && *endPtr != '}') {
- setFailed();
- return false;
- }
-
- // At this point we have a value.
- *result = value;
-
- // Skip over the decoded value plus the delimiter (',' or '}').
- m_decodeOffset += ((endPtr - &input[m_decodeOffset]) + 1);
- ASSERT(m_decodeOffset <= m_xbmString.size());
-
- return true;
-}
-
-bool XBMImageDecoder::decodeData()
-{
- ASSERT(m_decodeOffset <= m_xbmString.size());
- ASSERT(m_decodedHeader && !m_frameBufferCache.isEmpty());
-
- RGBA32Buffer& frame = m_frameBufferCache[0];
-
- ASSERT(frame.status() == RGBA32Buffer::FramePartial);
-
- const int bitsPerRow = size().width();
-
- ASSERT(m_dataType != Unknown);
-
- while (m_bitsDecoded < (size().width() * size().height())) {
- uint16_t value;
- if (!decodeDatum(&value))
- return false;
-
- int x = m_bitsDecoded % bitsPerRow;
- const int y = m_bitsDecoded / bitsPerRow;
-
- // How many bits will be written?
- const int bits = std::min(bitsPerRow - x, (m_dataType == X11) ? 8 : 16);
-
- // Only the alpha channel matters here, so the color values are always
- // set to 0.
- for (int i = 0; i < bits; ++i)
- frame.setRGBA(x++, y, 0, 0, 0, value & (1 << i) ? 255 : 0);
-
- m_bitsDecoded += bits;
- }
-
- frame.setStatus(RGBA32Buffer::FrameComplete);
-
- return true;
-}
-
-// Decode as much as we can of the XBM file.
-void XBMImageDecoder::decode(bool sizeOnly)
-{
- if (failed())
- return;
-
- bool decodeResult = false;
-
- if (!m_decodedHeader)
- decodeResult = decodeHeader();
-
- if (m_decodedHeader && !sizeOnly)
- decodeResult = decodeData();
-
- // The header or the data could not be decoded, but there is no more
- // data: decoding has failed.
- if (!decodeResult && m_allDataReceived)
- setFailed();
-}
-
-} // namespace WebCore
diff --git a/WebCore/platform/image-decoders/xbm/XBMImageDecoder.h b/WebCore/platform/image-decoders/xbm/XBMImageDecoder.h
deleted file mode 100644
index 00f62ce..0000000
--- a/WebCore/platform/image-decoders/xbm/XBMImageDecoder.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef XBMImageDecoder_h
-#define XBMImageDecoder_h
-
-#include "ImageDecoder.h"
-
-namespace WebCore {
-
- // This class decodes the XBM image format.
- class XBMImageDecoder : public ImageDecoder {
- public:
- XBMImageDecoder();
- virtual ~XBMImageDecoder() {}
-
- virtual String filenameExtension() const { return "xbm"; }
-
- virtual void setData(SharedBuffer* data, bool allDataReceived);
- // Whether or not the size information has been decoded yet.
- virtual bool isSizeAvailable();
- virtual RGBA32Buffer* frameBufferAtIndex(size_t index);
-
- private:
- // Restricts image size to something "reasonable".
- // This protects agains ridiculously large XBMs and prevents bad things
- // like overflow of m_bitsDecoded.
- static const int maxDimension = 65535;
-
- // In X10, an array of type "short" is used to declare the image bits,
- // but in X11, the type is "char".
- enum DataType {
- Unknown,
- X10,
- X11,
- };
-
- bool decodeHeader();
- bool decodeDatum(uint16_t* result);
- bool decodeData();
- void decode(bool sizeOnly);
-
- // FIXME: Copying all the XBM data just so we can NULL-terminate, just
- // so we can use sscanf() and friends, is lame. The decoder should be
- // rewritten to operate on m_data directly.
- Vector<char> m_xbmString; // Null-terminated copy of the XBM data.
- size_t m_decodeOffset; // The current offset in m_xbmString for decoding.
- bool m_allDataReceived;
- bool m_decodedHeader;
- enum DataType m_dataType;
- int m_bitsDecoded;
- };
-
-} // namespace WebCore
-
-#endif
diff --git a/WebCore/platform/image-decoders/zlib/adler32.c b/WebCore/platform/image-decoders/zlib/adler32.c
deleted file mode 100644
index 3c2e944..0000000
--- a/WebCore/platform/image-decoders/zlib/adler32.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995-2004 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: adler32.c,v 3.6 2005/08/04 19:14:14 tor%cs.brown.edu Exp $ */
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-#define BASE 65521UL /* largest prime smaller than 65536 */
-#define NMAX 5552
-/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
-
-#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;}
-#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
-#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
-#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
-#define DO16(buf) DO8(buf,0); DO8(buf,8);
-
-/* use NO_DIVIDE if your processor does not do division in hardware */
-#ifdef NO_DIVIDE
-# define MOD(a) \
- do { \
- if (a >= (BASE << 16)) a -= (BASE << 16); \
- if (a >= (BASE << 15)) a -= (BASE << 15); \
- if (a >= (BASE << 14)) a -= (BASE << 14); \
- if (a >= (BASE << 13)) a -= (BASE << 13); \
- if (a >= (BASE << 12)) a -= (BASE << 12); \
- if (a >= (BASE << 11)) a -= (BASE << 11); \
- if (a >= (BASE << 10)) a -= (BASE << 10); \
- if (a >= (BASE << 9)) a -= (BASE << 9); \
- if (a >= (BASE << 8)) a -= (BASE << 8); \
- if (a >= (BASE << 7)) a -= (BASE << 7); \
- if (a >= (BASE << 6)) a -= (BASE << 6); \
- if (a >= (BASE << 5)) a -= (BASE << 5); \
- if (a >= (BASE << 4)) a -= (BASE << 4); \
- if (a >= (BASE << 3)) a -= (BASE << 3); \
- if (a >= (BASE << 2)) a -= (BASE << 2); \
- if (a >= (BASE << 1)) a -= (BASE << 1); \
- if (a >= BASE) a -= BASE; \
- } while (0)
-# define MOD4(a) \
- do { \
- if (a >= (BASE << 4)) a -= (BASE << 4); \
- if (a >= (BASE << 3)) a -= (BASE << 3); \
- if (a >= (BASE << 2)) a -= (BASE << 2); \
- if (a >= (BASE << 1)) a -= (BASE << 1); \
- if (a >= BASE) a -= BASE; \
- } while (0)
-#else
-# define MOD(a) a %= BASE
-# define MOD4(a) a %= BASE
-#endif
-
-/* ========================================================================= */
-uLong ZEXPORT adler32(adler, buf, len)
- uLong adler;
- const Bytef *buf;
- uInt len;
-{
- unsigned long sum2;
- unsigned n;
-
- /* split Adler-32 into component sums */
- sum2 = (adler >> 16) & 0xffff;
- adler &= 0xffff;
-
- /* in case user likes doing a byte at a time, keep it fast */
- if (len == 1) {
- adler += buf[0];
- if (adler >= BASE)
- adler -= BASE;
- sum2 += adler;
- if (sum2 >= BASE)
- sum2 -= BASE;
- return adler | (sum2 << 16);
- }
-
- /* initial Adler-32 value (deferred check for len == 1 speed) */
- if (buf == Z_NULL)
- return 1L;
-
- /* in case short lengths are provided, keep it somewhat fast */
- if (len < 16) {
- while (len--) {
- adler += *buf++;
- sum2 += adler;
- }
- if (adler >= BASE)
- adler -= BASE;
- MOD4(sum2); /* only added so many BASE's */
- return adler | (sum2 << 16);
- }
-
- /* do length NMAX blocks -- requires just one modulo operation */
- while (len >= NMAX) {
- len -= NMAX;
- n = NMAX / 16; /* NMAX is divisible by 16 */
- do {
- DO16(buf); /* 16 sums unrolled */
- buf += 16;
- } while (--n);
- MOD(adler);
- MOD(sum2);
- }
-
- /* do remaining bytes (less than NMAX, still just one modulo) */
- if (len) { /* avoid modulos if none remaining */
- while (len >= 16) {
- len -= 16;
- DO16(buf);
- buf += 16;
- }
- while (len--) {
- adler += *buf++;
- sum2 += adler;
- }
- MOD(adler);
- MOD(sum2);
- }
-
- /* return recombined sums */
- return adler | (sum2 << 16);
-}
-
-/* ========================================================================= */
-uLong ZEXPORT adler32_combine(adler1, adler2, len2)
- uLong adler1;
- uLong adler2;
- z_off_t len2;
-{
- unsigned long sum1;
- unsigned long sum2;
- unsigned rem;
-
- /* the derivation of this formula is left as an exercise for the reader */
- rem = (unsigned)(len2 % BASE);
- sum1 = adler1 & 0xffff;
- sum2 = rem * sum1;
- MOD(sum2);
- sum1 += (adler2 & 0xffff) + BASE - 1;
- sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
- if (sum1 > BASE) sum1 -= BASE;
- if (sum1 > BASE) sum1 -= BASE;
- if (sum2 > (BASE << 1)) sum2 -= (BASE << 1);
- if (sum2 > BASE) sum2 -= BASE;
- return sum1 | (sum2 << 16);
-}
diff --git a/WebCore/platform/image-decoders/zlib/compress.c b/WebCore/platform/image-decoders/zlib/compress.c
deleted file mode 100644
index 825cbbc..0000000
--- a/WebCore/platform/image-decoders/zlib/compress.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* compress.c -- compress a memory buffer
- * Copyright (C) 1995-2003 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: compress.c,v 3.6 2005/08/04 19:14:14 tor%cs.brown.edu Exp $ */
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-/* ===========================================================================
- Compresses the source buffer into the destination buffer. The level
- parameter has the same meaning as in deflateInit. sourceLen is the byte
- length of the source buffer. Upon entry, destLen is the total size of the
- destination buffer, which must be at least 0.1% larger than sourceLen plus
- 12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
-
- compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_BUF_ERROR if there was not enough room in the output buffer,
- Z_STREAM_ERROR if the level parameter is invalid.
-*/
-int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
- Bytef *dest;
- uLongf *destLen;
- const Bytef *source;
- uLong sourceLen;
- int level;
-{
- z_stream stream;
- int err;
-
- stream.next_in = (Bytef*)source;
- stream.avail_in = (uInt)sourceLen;
-#ifdef MAXSEG_64K
- /* Check for source > 64K on 16-bit machine: */
- if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
-#endif
- stream.next_out = dest;
- stream.avail_out = (uInt)*destLen;
- if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
-
- stream.zalloc = (alloc_func)0;
- stream.zfree = (free_func)0;
- stream.opaque = (voidpf)0;
-
- err = deflateInit(&stream, level);
- if (err != Z_OK) return err;
-
- err = deflate(&stream, Z_FINISH);
- if (err != Z_STREAM_END) {
- deflateEnd(&stream);
- return err == Z_OK ? Z_BUF_ERROR : err;
- }
- *destLen = stream.total_out;
-
- err = deflateEnd(&stream);
- return err;
-}
-
-/* ===========================================================================
- */
-int ZEXPORT compress (dest, destLen, source, sourceLen)
- Bytef *dest;
- uLongf *destLen;
- const Bytef *source;
- uLong sourceLen;
-{
- return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
-}
-
-/* ===========================================================================
- If the default memLevel or windowBits for deflateInit() is changed, then
- this function needs to be updated.
- */
-uLong ZEXPORT compressBound (sourceLen)
- uLong sourceLen;
-{
- return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11;
-}
diff --git a/WebCore/platform/image-decoders/zlib/crc32.c b/WebCore/platform/image-decoders/zlib/crc32.c
deleted file mode 100644
index 495863b..0000000
--- a/WebCore/platform/image-decoders/zlib/crc32.c
+++ /dev/null
@@ -1,423 +0,0 @@
-/* crc32.c -- compute the CRC-32 of a data stream
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Thanks to Rodney Brown <rbrown64@csc.com.au> for his contribution of faster
- * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing
- * tables for updating the shift register in one step with three exclusive-ors
- * instead of four steps with four exclusive-ors. This results in about a
- * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3.
- */
-
-/* @(#) $Id: crc32.c,v 3.6 2005/08/04 19:14:14 tor%cs.brown.edu Exp $ */
-
-/*
- Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore
- protection on the static variables used to control the first-use generation
- of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should
- first call get_crc_table() to initialize the tables before allowing more than
- one thread to use crc32().
- */
-
-#ifdef MAKECRCH
-# include <stdio.h>
-# ifndef DYNAMIC_CRC_TABLE
-# define DYNAMIC_CRC_TABLE
-# endif /* !DYNAMIC_CRC_TABLE */
-#endif /* MAKECRCH */
-
-#include "zutil.h" /* for STDC and FAR definitions */
-
-#define local static
-
-/* Find a four-byte integer type for crc32_little() and crc32_big(). */
-#ifndef NOBYFOUR
-# ifdef STDC /* need ANSI C limits.h to determine sizes */
-# include <limits.h>
-# define BYFOUR
-# if (UINT_MAX == 0xffffffffUL)
- typedef unsigned int u4;
-# else
-# if (ULONG_MAX == 0xffffffffUL)
- typedef unsigned long u4;
-# else
-# if (USHRT_MAX == 0xffffffffUL)
- typedef unsigned short u4;
-# else
-# undef BYFOUR /* can't find a four-byte integer type! */
-# endif
-# endif
-# endif
-# endif /* STDC */
-#endif /* !NOBYFOUR */
-
-/* Definitions for doing the crc four data bytes at a time. */
-#ifdef BYFOUR
-# define REV(w) (((w)>>24)+(((w)>>8)&0xff00)+ \
- (((w)&0xff00)<<8)+(((w)&0xff)<<24))
- local unsigned long crc32_little OF((unsigned long,
- const unsigned char FAR *, unsigned));
- local unsigned long crc32_big OF((unsigned long,
- const unsigned char FAR *, unsigned));
-# define TBLS 8
-#else
-# define TBLS 1
-#endif /* BYFOUR */
-
-/* Local functions for crc concatenation */
-local unsigned long gf2_matrix_times OF((unsigned long *mat,
- unsigned long vec));
-local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat));
-
-#ifdef DYNAMIC_CRC_TABLE
-
-local volatile int crc_table_empty = 1;
-local unsigned long FAR crc_table[TBLS][256];
-local void make_crc_table OF((void));
-#ifdef MAKECRCH
- local void write_table OF((FILE *, const unsigned long FAR *));
-#endif /* MAKECRCH */
-/*
- Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
- x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
-
- Polynomials over GF(2) are represented in binary, one bit per coefficient,
- with the lowest powers in the most significant bit. Then adding polynomials
- is just exclusive-or, and multiplying a polynomial by x is a right shift by
- one. If we call the above polynomial p, and represent a byte as the
- polynomial q, also with the lowest power in the most significant bit (so the
- byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
- where a mod b means the remainder after dividing a by b.
-
- This calculation is done using the shift-register method of multiplying and
- taking the remainder. The register is initialized to zero, and for each
- incoming bit, x^32 is added mod p to the register if the bit is a one (where
- x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
- x (which is shifting right by one and adding x^32 mod p if the bit shifted
- out is a one). We start with the highest power (least significant bit) of
- q and repeat for all eight bits of q.
-
- The first table is simply the CRC of all possible eight bit values. This is
- all the information needed to generate CRCs on data a byte at a time for all
- combinations of CRC register values and incoming bytes. The remaining tables
- allow for word-at-a-time CRC calculation for both big-endian and little-
- endian machines, where a word is four bytes.
-*/
-local void make_crc_table()
-{
- unsigned long c;
- int n, k;
- unsigned long poly; /* polynomial exclusive-or pattern */
- /* terms of polynomial defining this crc (except x^32): */
- static volatile int first = 1; /* flag to limit concurrent making */
- static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
-
- /* See if another task is already doing this (not thread-safe, but better
- than nothing -- significantly reduces duration of vulnerability in
- case the advice about DYNAMIC_CRC_TABLE is ignored) */
- if (first) {
- first = 0;
-
- /* make exclusive-or pattern from polynomial (0xedb88320UL) */
- poly = 0UL;
- for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++)
- poly |= 1UL << (31 - p[n]);
-
- /* generate a crc for every 8-bit value */
- for (n = 0; n < 256; n++) {
- c = (unsigned long)n;
- for (k = 0; k < 8; k++)
- c = c & 1 ? poly ^ (c >> 1) : c >> 1;
- crc_table[0][n] = c;
- }
-
-#ifdef BYFOUR
- /* generate crc for each value followed by one, two, and three zeros,
- and then the byte reversal of those as well as the first table */
- for (n = 0; n < 256; n++) {
- c = crc_table[0][n];
- crc_table[4][n] = REV(c);
- for (k = 1; k < 4; k++) {
- c = crc_table[0][c & 0xff] ^ (c >> 8);
- crc_table[k][n] = c;
- crc_table[k + 4][n] = REV(c);
- }
- }
-#endif /* BYFOUR */
-
- crc_table_empty = 0;
- }
- else { /* not first */
- /* wait for the other guy to finish (not efficient, but rare) */
- while (crc_table_empty)
- ;
- }
-
-#ifdef MAKECRCH
- /* write out CRC tables to crc32.h */
- {
- FILE *out;
-
- out = fopen("crc32.h", "w");
- if (out == NULL) return;
- fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n");
- fprintf(out, " * Generated automatically by crc32.c\n */\n\n");
- fprintf(out, "local const unsigned long FAR ");
- fprintf(out, "crc_table[TBLS][256] =\n{\n {\n");
- write_table(out, crc_table[0]);
-# ifdef BYFOUR
- fprintf(out, "#ifdef BYFOUR\n");
- for (k = 1; k < 8; k++) {
- fprintf(out, " },\n {\n");
- write_table(out, crc_table[k]);
- }
- fprintf(out, "#endif\n");
-# endif /* BYFOUR */
- fprintf(out, " }\n};\n");
- fclose(out);
- }
-#endif /* MAKECRCH */
-}
-
-#ifdef MAKECRCH
-local void write_table(out, table)
- FILE *out;
- const unsigned long FAR *table;
-{
- int n;
-
- for (n = 0; n < 256; n++)
- fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ", table[n],
- n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", "));
-}
-#endif /* MAKECRCH */
-
-#else /* !DYNAMIC_CRC_TABLE */
-/* ========================================================================
- * Tables of CRC-32s of all single-byte values, made by make_crc_table().
- */
-#include "crc32.h"
-#endif /* DYNAMIC_CRC_TABLE */
-
-/* =========================================================================
- * This function can be used by asm versions of crc32()
- */
-const unsigned long FAR * ZEXPORT get_crc_table()
-{
-#ifdef DYNAMIC_CRC_TABLE
- if (crc_table_empty)
- make_crc_table();
-#endif /* DYNAMIC_CRC_TABLE */
- return (const unsigned long FAR *)crc_table;
-}
-
-/* ========================================================================= */
-#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
-#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
-
-/* ========================================================================= */
-unsigned long ZEXPORT crc32(crc, buf, len)
- unsigned long crc;
- const unsigned char FAR *buf;
- unsigned len;
-{
- if (buf == Z_NULL) return 0UL;
-
-#ifdef DYNAMIC_CRC_TABLE
- if (crc_table_empty)
- make_crc_table();
-#endif /* DYNAMIC_CRC_TABLE */
-
-#ifdef BYFOUR
- if (sizeof(void *) == sizeof(ptrdiff_t)) {
- u4 endian;
-
- endian = 1;
- if (*((unsigned char *)(&endian)))
- return crc32_little(crc, buf, len);
- else
- return crc32_big(crc, buf, len);
- }
-#endif /* BYFOUR */
- crc = crc ^ 0xffffffffUL;
- while (len >= 8) {
- DO8;
- len -= 8;
- }
- if (len) do {
- DO1;
- } while (--len);
- return crc ^ 0xffffffffUL;
-}
-
-#ifdef BYFOUR
-
-/* ========================================================================= */
-#define DOLIT4 c ^= *buf4++; \
- c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
- crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24]
-#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4
-
-/* ========================================================================= */
-local unsigned long crc32_little(crc, buf, len)
- unsigned long crc;
- const unsigned char FAR *buf;
- unsigned len;
-{
- register u4 c;
- register const u4 FAR *buf4;
-
- c = (u4)crc;
- c = ~c;
- while (len && ((ptrdiff_t)buf & 3)) {
- c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
- len--;
- }
-
- buf4 = (const u4 FAR *)(const void FAR *)buf;
- while (len >= 32) {
- DOLIT32;
- len -= 32;
- }
- while (len >= 4) {
- DOLIT4;
- len -= 4;
- }
- buf = (const unsigned char FAR *)buf4;
-
- if (len) do {
- c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
- } while (--len);
- c = ~c;
- return (unsigned long)c;
-}
-
-/* ========================================================================= */
-#define DOBIG4 c ^= *++buf4; \
- c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
- crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
-#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
-
-/* ========================================================================= */
-local unsigned long crc32_big(crc, buf, len)
- unsigned long crc;
- const unsigned char FAR *buf;
- unsigned len;
-{
- register u4 c;
- register const u4 FAR *buf4;
-
- c = REV((u4)crc);
- c = ~c;
- while (len && ((ptrdiff_t)buf & 3)) {
- c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
- len--;
- }
-
- buf4 = (const u4 FAR *)(const void FAR *)buf;
- buf4--;
- while (len >= 32) {
- DOBIG32;
- len -= 32;
- }
- while (len >= 4) {
- DOBIG4;
- len -= 4;
- }
- buf4++;
- buf = (const unsigned char FAR *)buf4;
-
- if (len) do {
- c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
- } while (--len);
- c = ~c;
- return (unsigned long)(REV(c));
-}
-
-#endif /* BYFOUR */
-
-#define GF2_DIM 32 /* dimension of GF(2) vectors (length of CRC) */
-
-/* ========================================================================= */
-local unsigned long gf2_matrix_times(mat, vec)
- unsigned long *mat;
- unsigned long vec;
-{
- unsigned long sum;
-
- sum = 0;
- while (vec) {
- if (vec & 1)
- sum ^= *mat;
- vec >>= 1;
- mat++;
- }
- return sum;
-}
-
-/* ========================================================================= */
-local void gf2_matrix_square(square, mat)
- unsigned long *square;
- unsigned long *mat;
-{
- int n;
-
- for (n = 0; n < GF2_DIM; n++)
- square[n] = gf2_matrix_times(mat, mat[n]);
-}
-
-/* ========================================================================= */
-uLong ZEXPORT crc32_combine(crc1, crc2, len2)
- uLong crc1;
- uLong crc2;
- z_off_t len2;
-{
- int n;
- unsigned long row;
- unsigned long even[GF2_DIM]; /* even-power-of-two zeros operator */
- unsigned long odd[GF2_DIM]; /* odd-power-of-two zeros operator */
-
- /* degenerate case */
- if (len2 == 0)
- return crc1;
-
- /* put operator for one zero bit in odd */
- odd[0] = 0xedb88320L; /* CRC-32 polynomial */
- row = 1;
- for (n = 1; n < GF2_DIM; n++) {
- odd[n] = row;
- row <<= 1;
- }
-
- /* put operator for two zero bits in even */
- gf2_matrix_square(even, odd);
-
- /* put operator for four zero bits in odd */
- gf2_matrix_square(odd, even);
-
- /* apply len2 zeros to crc1 (first square will put the operator for one
- zero byte, eight zero bits, in even) */
- do {
- /* apply zeros operator for this bit of len2 */
- gf2_matrix_square(even, odd);
- if (len2 & 1)
- crc1 = gf2_matrix_times(even, crc1);
- len2 >>= 1;
-
- /* if no more bits set, then done */
- if (len2 == 0)
- break;
-
- /* another iteration of the loop with odd and even swapped */
- gf2_matrix_square(odd, even);
- if (len2 & 1)
- crc1 = gf2_matrix_times(odd, crc1);
- len2 >>= 1;
-
- /* if no more bits set, then done */
- } while (len2 != 0);
-
- /* return combined crc */
- crc1 ^= crc2;
- return crc1;
-}
diff --git a/WebCore/platform/image-decoders/zlib/crc32.h b/WebCore/platform/image-decoders/zlib/crc32.h
deleted file mode 100644
index 8053b61..0000000
--- a/WebCore/platform/image-decoders/zlib/crc32.h
+++ /dev/null
@@ -1,441 +0,0 @@
-/* crc32.h -- tables for rapid CRC calculation
- * Generated automatically by crc32.c
- */
-
-local const unsigned long FAR crc_table[TBLS][256] =
-{
- {
- 0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
- 0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL,
- 0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL,
- 0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL,
- 0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL,
- 0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL,
- 0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL,
- 0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL,
- 0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL,
- 0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL,
- 0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL,
- 0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL,
- 0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL,
- 0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL,
- 0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL,
- 0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL,
- 0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL,
- 0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL,
- 0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL,
- 0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL,
- 0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL,
- 0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL,
- 0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL,
- 0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL,
- 0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL,
- 0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL,
- 0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL,
- 0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL,
- 0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL,
- 0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL,
- 0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL,
- 0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL,
- 0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL,
- 0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL,
- 0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL,
- 0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL,
- 0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL,
- 0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL,
- 0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL,
- 0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL,
- 0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL,
- 0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL,
- 0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL,
- 0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL,
- 0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL,
- 0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL,
- 0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL,
- 0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL,
- 0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL,
- 0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL,
- 0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL,
- 0x2d02ef8dUL
-#ifdef BYFOUR
- },
- {
- 0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL,
- 0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL,
- 0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL,
- 0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL,
- 0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL,
- 0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL,
- 0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL,
- 0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL,
- 0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL,
- 0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL,
- 0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL,
- 0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL,
- 0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL,
- 0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL,
- 0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL,
- 0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL,
- 0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL,
- 0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL,
- 0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL,
- 0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL,
- 0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL,
- 0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL,
- 0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL,
- 0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL,
- 0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL,
- 0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL,
- 0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL,
- 0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL,
- 0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL,
- 0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL,
- 0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL,
- 0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL,
- 0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL,
- 0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL,
- 0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL,
- 0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL,
- 0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL,
- 0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL,
- 0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL,
- 0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL,
- 0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL,
- 0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL,
- 0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL,
- 0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL,
- 0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL,
- 0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL,
- 0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL,
- 0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL,
- 0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL,
- 0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL,
- 0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL,
- 0x9324fd72UL
- },
- {
- 0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL,
- 0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL,
- 0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL,
- 0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL,
- 0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL,
- 0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL,
- 0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL,
- 0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL,
- 0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL,
- 0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL,
- 0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL,
- 0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL,
- 0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL,
- 0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL,
- 0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL,
- 0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL,
- 0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL,
- 0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL,
- 0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL,
- 0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL,
- 0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL,
- 0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL,
- 0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL,
- 0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL,
- 0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL,
- 0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL,
- 0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL,
- 0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL,
- 0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL,
- 0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL,
- 0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL,
- 0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL,
- 0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL,
- 0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL,
- 0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL,
- 0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL,
- 0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL,
- 0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL,
- 0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL,
- 0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL,
- 0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL,
- 0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL,
- 0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL,
- 0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL,
- 0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL,
- 0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL,
- 0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL,
- 0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL,
- 0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL,
- 0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL,
- 0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL,
- 0xbe9834edUL
- },
- {
- 0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL,
- 0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL,
- 0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL,
- 0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL,
- 0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL,
- 0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL,
- 0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL,
- 0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL,
- 0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL,
- 0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL,
- 0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL,
- 0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL,
- 0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL,
- 0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL,
- 0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL,
- 0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL,
- 0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL,
- 0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL,
- 0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL,
- 0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL,
- 0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL,
- 0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL,
- 0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL,
- 0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL,
- 0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL,
- 0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL,
- 0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL,
- 0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL,
- 0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL,
- 0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL,
- 0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL,
- 0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL,
- 0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL,
- 0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL,
- 0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL,
- 0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL,
- 0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL,
- 0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL,
- 0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL,
- 0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL,
- 0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL,
- 0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL,
- 0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL,
- 0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL,
- 0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL,
- 0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL,
- 0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL,
- 0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL,
- 0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL,
- 0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL,
- 0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL,
- 0xde0506f1UL
- },
- {
- 0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL,
- 0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL,
- 0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL,
- 0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL,
- 0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL,
- 0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL,
- 0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL,
- 0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL,
- 0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL,
- 0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL,
- 0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL,
- 0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL,
- 0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL,
- 0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL,
- 0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL,
- 0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL,
- 0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL,
- 0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL,
- 0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL,
- 0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL,
- 0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL,
- 0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL,
- 0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL,
- 0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL,
- 0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL,
- 0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL,
- 0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL,
- 0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL,
- 0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL,
- 0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL,
- 0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL,
- 0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL,
- 0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL,
- 0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL,
- 0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL,
- 0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL,
- 0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL,
- 0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL,
- 0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL,
- 0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL,
- 0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL,
- 0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL,
- 0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL,
- 0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL,
- 0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL,
- 0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL,
- 0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL,
- 0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL,
- 0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL,
- 0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL,
- 0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL,
- 0x8def022dUL
- },
- {
- 0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL,
- 0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL,
- 0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL,
- 0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL,
- 0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL,
- 0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL,
- 0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL,
- 0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL,
- 0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL,
- 0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL,
- 0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL,
- 0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL,
- 0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL,
- 0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL,
- 0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL,
- 0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL,
- 0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL,
- 0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL,
- 0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL,
- 0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL,
- 0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL,
- 0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL,
- 0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL,
- 0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL,
- 0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL,
- 0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL,
- 0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL,
- 0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL,
- 0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL,
- 0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL,
- 0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL,
- 0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL,
- 0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL,
- 0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL,
- 0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL,
- 0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL,
- 0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL,
- 0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL,
- 0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL,
- 0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL,
- 0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL,
- 0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL,
- 0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL,
- 0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL,
- 0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL,
- 0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL,
- 0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL,
- 0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL,
- 0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL,
- 0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL,
- 0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL,
- 0x72fd2493UL
- },
- {
- 0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL,
- 0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL,
- 0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL,
- 0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL,
- 0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL,
- 0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL,
- 0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL,
- 0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL,
- 0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL,
- 0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL,
- 0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL,
- 0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL,
- 0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL,
- 0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL,
- 0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL,
- 0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL,
- 0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL,
- 0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL,
- 0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL,
- 0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL,
- 0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL,
- 0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL,
- 0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL,
- 0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL,
- 0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL,
- 0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL,
- 0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL,
- 0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL,
- 0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL,
- 0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL,
- 0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL,
- 0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL,
- 0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL,
- 0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL,
- 0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL,
- 0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL,
- 0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL,
- 0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL,
- 0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL,
- 0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL,
- 0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL,
- 0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL,
- 0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL,
- 0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL,
- 0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL,
- 0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL,
- 0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL,
- 0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL,
- 0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL,
- 0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL,
- 0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL,
- 0xed3498beUL
- },
- {
- 0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL,
- 0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL,
- 0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL,
- 0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL,
- 0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL,
- 0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL,
- 0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL,
- 0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL,
- 0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL,
- 0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL,
- 0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL,
- 0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL,
- 0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL,
- 0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL,
- 0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL,
- 0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL,
- 0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL,
- 0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL,
- 0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL,
- 0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL,
- 0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL,
- 0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL,
- 0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL,
- 0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL,
- 0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL,
- 0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL,
- 0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL,
- 0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL,
- 0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL,
- 0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL,
- 0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL,
- 0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL,
- 0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL,
- 0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL,
- 0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL,
- 0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL,
- 0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL,
- 0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL,
- 0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL,
- 0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL,
- 0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL,
- 0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL,
- 0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL,
- 0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL,
- 0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL,
- 0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL,
- 0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL,
- 0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL,
- 0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL,
- 0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL,
- 0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL,
- 0xf10605deUL
-#endif
- }
-};
diff --git a/WebCore/platform/image-decoders/zlib/deflate.c b/WebCore/platform/image-decoders/zlib/deflate.c
deleted file mode 100644
index 46a51fe..0000000
--- a/WebCore/platform/image-decoders/zlib/deflate.c
+++ /dev/null
@@ -1,1736 +0,0 @@
-/* deflate.c -- compress data using the deflation algorithm
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * ALGORITHM
- *
- * The "deflation" process depends on being able to identify portions
- * of the input text which are identical to earlier input (within a
- * sliding window trailing behind the input currently being processed).
- *
- * The most straightforward technique turns out to be the fastest for
- * most input files: try all possible matches and select the longest.
- * The key feature of this algorithm is that insertions into the string
- * dictionary are very simple and thus fast, and deletions are avoided
- * completely. Insertions are performed at each input character, whereas
- * string matches are performed only when the previous match ends. So it
- * is preferable to spend more time in matches to allow very fast string
- * insertions and avoid deletions. The matching algorithm for small
- * strings is inspired from that of Rabin & Karp. A brute force approach
- * is used to find longer strings when a small match has been found.
- * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze
- * (by Leonid Broukhis).
- * A previous version of this file used a more sophisticated algorithm
- * (by Fiala and Greene) which is guaranteed to run in linear amortized
- * time, but has a larger average cost, uses more memory and is patented.
- * However the F&G algorithm may be faster for some highly redundant
- * files if the parameter max_chain_length (described below) is too large.
- *
- * ACKNOWLEDGEMENTS
- *
- * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and
- * I found it in 'freeze' written by Leonid Broukhis.
- * Thanks to many people for bug reports and testing.
- *
- * REFERENCES
- *
- * Deutsch, L.P.,"DEFLATE Compressed Data Format Specification".
- * Available in http://www.ietf.org/rfc/rfc1951.txt
- *
- * A description of the Rabin and Karp algorithm is given in the book
- * "Algorithms" by R. Sedgewick, Addison-Wesley, p252.
- *
- * Fiala,E.R., and Greene,D.H.
- * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595
- *
- */
-
-/* @(#) $Id: deflate.c,v 3.6 2005/08/04 19:14:14 tor%cs.brown.edu Exp $ */
-
-#include "deflate.h"
-
-const char deflate_copyright[] =
- " deflate 1.2.3 Copyright 1995-2005 Jean-loup Gailly ";
-/*
- If you use the zlib library in a product, an acknowledgment is welcome
- in the documentation of your product. If for some reason you cannot
- include such an acknowledgment, I would appreciate that you keep this
- copyright string in the executable of your product.
- */
-
-/* ===========================================================================
- * Function prototypes.
- */
-typedef enum {
- need_more, /* block not completed, need more input or more output */
- block_done, /* block flush performed */
- finish_started, /* finish started, need only more output at next deflate */
- finish_done /* finish done, accept no more input or output */
-} block_state;
-
-typedef block_state (*compress_func) OF((deflate_state *s, int flush));
-/* Compression function. Returns the block state after the call. */
-
-local void fill_window OF((deflate_state *s));
-local block_state deflate_stored OF((deflate_state *s, int flush));
-local block_state deflate_fast OF((deflate_state *s, int flush));
-#ifndef FASTEST
-local block_state deflate_slow OF((deflate_state *s, int flush));
-#endif
-local void lm_init OF((deflate_state *s));
-local void putShortMSB OF((deflate_state *s, uInt b));
-local void flush_pending OF((z_streamp strm));
-local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
-#ifndef FASTEST
-#ifdef ASMV
- void match_init OF((void)); /* asm code initialization */
- uInt longest_match OF((deflate_state *s, IPos cur_match));
-#else
-local uInt longest_match OF((deflate_state *s, IPos cur_match));
-#endif
-#endif
-local uInt longest_match_fast OF((deflate_state *s, IPos cur_match));
-
-#ifdef DEBUG
-local void check_match OF((deflate_state *s, IPos start, IPos match,
- int length));
-#endif
-
-/* ===========================================================================
- * Local data
- */
-
-#define NIL 0
-/* Tail of hash chains */
-
-#ifndef TOO_FAR
-# define TOO_FAR 4096
-#endif
-/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
-
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
-/* Values for max_lazy_match, good_match and max_chain_length, depending on
- * the desired pack level (0..9). The values given below have been tuned to
- * exclude worst case performance for pathological files. Better values may be
- * found for specific files.
- */
-typedef struct config_s {
- ush good_length; /* reduce lazy search above this match length */
- ush max_lazy; /* do not perform lazy search above this match length */
- ush nice_length; /* quit search above this match length */
- ush max_chain;
- compress_func func;
-} config;
-
-#ifdef FASTEST
-local const config configuration_table[2] = {
-/* good lazy nice chain */
-/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */
-/* 1 */ {4, 4, 8, 4, deflate_fast}}; /* max speed, no lazy matches */
-#else
-local const config configuration_table[10] = {
-/* good lazy nice chain */
-/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */
-/* 1 */ {4, 4, 8, 4, deflate_fast}, /* max speed, no lazy matches */
-/* 2 */ {4, 5, 16, 8, deflate_fast},
-/* 3 */ {4, 6, 32, 32, deflate_fast},
-
-/* 4 */ {4, 4, 16, 16, deflate_slow}, /* lazy matches */
-/* 5 */ {8, 16, 32, 32, deflate_slow},
-/* 6 */ {8, 16, 128, 128, deflate_slow},
-/* 7 */ {8, 32, 128, 256, deflate_slow},
-/* 8 */ {32, 128, 258, 1024, deflate_slow},
-/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* max compression */
-#endif
-
-/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4
- * For deflate_fast() (levels <= 3) good is ignored and lazy has a different
- * meaning.
- */
-
-#define EQUAL 0
-/* result of memcmp for equal strings */
-
-#ifndef NO_DUMMY_DECL
-struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
-#endif
-
-/* ===========================================================================
- * Update a hash value with the given input byte
- * IN assertion: all calls to to UPDATE_HASH are made with consecutive
- * input characters, so that a running hash key can be computed from the
- * previous key instead of complete recalculation each time.
- */
-#define UPDATE_HASH(s,h,c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
-
-
-/* ===========================================================================
- * Insert string str in the dictionary and set match_head to the previous head
- * of the hash chain (the most recent string with same hash key). Return
- * the previous length of the hash chain.
- * If this file is compiled with -DFASTEST, the compression level is forced
- * to 1, and no hash chains are maintained.
- * IN assertion: all calls to to INSERT_STRING are made with consecutive
- * input characters and the first MIN_MATCH bytes of str are valid
- * (except for the last MIN_MATCH-1 bytes of the input file).
- */
-#ifdef FASTEST
-#define INSERT_STRING(s, str, match_head) \
- (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
- match_head = s->head[s->ins_h], \
- s->head[s->ins_h] = (Pos)(str))
-#else
-#define INSERT_STRING(s, str, match_head) \
- (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
- match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \
- s->head[s->ins_h] = (Pos)(str))
-#endif
-
-/* ===========================================================================
- * Initialize the hash table (avoiding 64K overflow for 16 bit systems).
- * prev[] will be initialized on the fly.
- */
-#define CLEAR_HASH(s) \
- s->head[s->hash_size-1] = NIL; \
- zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
-
-/* ========================================================================= */
-int ZEXPORT deflateInit_(strm, level, version, stream_size)
- z_streamp strm;
- int level;
- const char *version;
- int stream_size;
-{
- return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
- Z_DEFAULT_STRATEGY, version, stream_size);
- /* To do: ignore strm->next_in if we use it as window */
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
- version, stream_size)
- z_streamp strm;
- int level;
- int method;
- int windowBits;
- int memLevel;
- int strategy;
- const char *version;
- int stream_size;
-{
- deflate_state *s;
- int wrap = 1;
- static const char my_version[] = ZLIB_VERSION;
-
- ushf *overlay;
- /* We overlay pending_buf and d_buf+l_buf. This works since the average
- * output size for (length,distance) codes is <= 24 bits.
- */
-
- if (version == Z_NULL || version[0] != my_version[0] ||
- stream_size != sizeof(z_stream)) {
- return Z_VERSION_ERROR;
- }
- if (strm == Z_NULL) return Z_STREAM_ERROR;
-
- strm->msg = Z_NULL;
- if (strm->zalloc == (alloc_func)0) {
- strm->zalloc = zcalloc;
- strm->opaque = (voidpf)0;
- }
- if (strm->zfree == (free_func)0) strm->zfree = zcfree;
-
-#ifdef FASTEST
- if (level != 0) level = 1;
-#else
- if (level == Z_DEFAULT_COMPRESSION) level = 6;
-#endif
-
- if (windowBits < 0) { /* suppress zlib wrapper */
- wrap = 0;
- windowBits = -windowBits;
- }
-#ifdef GZIP
- else if (windowBits > 15) {
- wrap = 2; /* write gzip wrapper instead */
- windowBits -= 16;
- }
-#endif
- if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
- windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
- strategy < 0 || strategy > Z_FIXED) {
- return Z_STREAM_ERROR;
- }
- if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */
- s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));
- if (s == Z_NULL) return Z_MEM_ERROR;
- strm->state = (struct internal_state FAR *)s;
- s->strm = strm;
-
- s->wrap = wrap;
- s->gzhead = Z_NULL;
- s->w_bits = windowBits;
- s->w_size = 1 << s->w_bits;
- s->w_mask = s->w_size - 1;
-
- s->hash_bits = memLevel + 7;
- s->hash_size = 1 << s->hash_bits;
- s->hash_mask = s->hash_size - 1;
- s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH);
-
- s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));
- s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos));
- s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos));
-
- s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
-
- overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
- s->pending_buf = (uchf *) overlay;
- s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);
-
- if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
- s->pending_buf == Z_NULL) {
- s->status = FINISH_STATE;
- strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
- deflateEnd (strm);
- return Z_MEM_ERROR;
- }
- s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
- s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
-
- s->level = level;
- s->strategy = strategy;
- s->method = (Byte)method;
-
- return deflateReset(strm);
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
- z_streamp strm;
- const Bytef *dictionary;
- uInt dictLength;
-{
- deflate_state *s;
- uInt length = dictLength;
- uInt n;
- IPos hash_head = 0;
-
- if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL ||
- strm->state->wrap == 2 ||
- (strm->state->wrap == 1 && strm->state->status != INIT_STATE))
- return Z_STREAM_ERROR;
-
- s = strm->state;
- if (s->wrap)
- strm->adler = adler32(strm->adler, dictionary, dictLength);
-
- if (length < MIN_MATCH) return Z_OK;
- if (length > MAX_DIST(s)) {
- length = MAX_DIST(s);
- dictionary += dictLength - length; /* use the tail of the dictionary */
- }
- zmemcpy(s->window, dictionary, length);
- s->strstart = length;
- s->block_start = (long)length;
-
- /* Insert all strings in the hash table (except for the last two bytes).
- * s->lookahead stays null, so s->ins_h will be recomputed at the next
- * call of fill_window.
- */
- s->ins_h = s->window[0];
- UPDATE_HASH(s, s->ins_h, s->window[1]);
- for (n = 0; n <= length - MIN_MATCH; n++) {
- INSERT_STRING(s, n, hash_head);
- }
- if (hash_head) hash_head = 0; /* to make compiler happy */
- return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateReset (strm)
- z_streamp strm;
-{
- deflate_state *s;
-
- if (strm == Z_NULL || strm->state == Z_NULL ||
- strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) {
- return Z_STREAM_ERROR;
- }
-
- strm->total_in = strm->total_out = 0;
- strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */
- strm->data_type = Z_UNKNOWN;
-
- s = (deflate_state *)strm->state;
- s->pending = 0;
- s->pending_out = s->pending_buf;
-
- if (s->wrap < 0) {
- s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */
- }
- s->status = s->wrap ? INIT_STATE : BUSY_STATE;
- strm->adler =
-#ifdef GZIP
- s->wrap == 2 ? crc32(0L, Z_NULL, 0) :
-#endif
- adler32(0L, Z_NULL, 0);
- s->last_flush = Z_NO_FLUSH;
-
- _tr_init(s);
- lm_init(s);
-
- return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateSetHeader (strm, head)
- z_streamp strm;
- gz_headerp head;
-{
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- if (strm->state->wrap != 2) return Z_STREAM_ERROR;
- strm->state->gzhead = head;
- return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflatePrime (strm, bits, value)
- z_streamp strm;
- int bits;
- int value;
-{
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- strm->state->bi_valid = bits;
- strm->state->bi_buf = (ush)(value & ((1 << bits) - 1));
- return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateParams(strm, level, strategy)
- z_streamp strm;
- int level;
- int strategy;
-{
- deflate_state *s;
- compress_func func;
- int err = Z_OK;
-
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- s = strm->state;
-
-#ifdef FASTEST
- if (level != 0) level = 1;
-#else
- if (level == Z_DEFAULT_COMPRESSION) level = 6;
-#endif
- if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) {
- return Z_STREAM_ERROR;
- }
- func = configuration_table[s->level].func;
-
- if (func != configuration_table[level].func && strm->total_in != 0) {
- /* Flush the last buffer: */
- err = deflate(strm, Z_PARTIAL_FLUSH);
- }
- if (s->level != level) {
- s->level = level;
- s->max_lazy_match = configuration_table[level].max_lazy;
- s->good_match = configuration_table[level].good_length;
- s->nice_match = configuration_table[level].nice_length;
- s->max_chain_length = configuration_table[level].max_chain;
- }
- s->strategy = strategy;
- return err;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
- z_streamp strm;
- int good_length;
- int max_lazy;
- int nice_length;
- int max_chain;
-{
- deflate_state *s;
-
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- s = strm->state;
- s->good_match = good_length;
- s->max_lazy_match = max_lazy;
- s->nice_match = nice_length;
- s->max_chain_length = max_chain;
- return Z_OK;
-}
-
-/* =========================================================================
- * For the default windowBits of 15 and memLevel of 8, this function returns
- * a close to exact, as well as small, upper bound on the compressed size.
- * They are coded as constants here for a reason--if the #define's are
- * changed, then this function needs to be changed as well. The return
- * value for 15 and 8 only works for those exact settings.
- *
- * For any setting other than those defaults for windowBits and memLevel,
- * the value returned is a conservative worst case for the maximum expansion
- * resulting from using fixed blocks instead of stored blocks, which deflate
- * can emit on compressed data for some combinations of the parameters.
- *
- * This function could be more sophisticated to provide closer upper bounds
- * for every combination of windowBits and memLevel, as well as wrap.
- * But even the conservative upper bound of about 14% expansion does not
- * seem onerous for output buffer allocation.
- */
-uLong ZEXPORT deflateBound(strm, sourceLen)
- z_streamp strm;
- uLong sourceLen;
-{
- deflate_state *s;
- uLong destLen;
-
- /* conservative upper bound */
- destLen = sourceLen +
- ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 11;
-
- /* if can't get parameters, return conservative bound */
- if (strm == Z_NULL || strm->state == Z_NULL)
- return destLen;
-
- /* if not default parameters, return conservative bound */
- s = strm->state;
- if (s->w_bits != 15 || s->hash_bits != 8 + 7)
- return destLen;
-
- /* default settings: return tight bound for that case */
- return compressBound(sourceLen);
-}
-
-/* =========================================================================
- * Put a short in the pending buffer. The 16-bit value is put in MSB order.
- * IN assertion: the stream state is correct and there is enough room in
- * pending_buf.
- */
-local void putShortMSB (s, b)
- deflate_state *s;
- uInt b;
-{
- put_byte(s, (Byte)(b >> 8));
- put_byte(s, (Byte)(b & 0xff));
-}
-
-/* =========================================================================
- * Flush as much pending output as possible. All deflate() output goes
- * through this function so some applications may wish to modify it
- * to avoid allocating a large strm->next_out buffer and copying into it.
- * (See also read_buf()).
- */
-local void flush_pending(strm)
- z_streamp strm;
-{
- unsigned len = strm->state->pending;
-
- if (len > strm->avail_out) len = strm->avail_out;
- if (len == 0) return;
-
- zmemcpy(strm->next_out, strm->state->pending_out, len);
- strm->next_out += len;
- strm->state->pending_out += len;
- strm->total_out += len;
- strm->avail_out -= len;
- strm->state->pending -= len;
- if (strm->state->pending == 0) {
- strm->state->pending_out = strm->state->pending_buf;
- }
-}
-
-/* ========================================================================= */
-int ZEXPORT deflate (strm, flush)
- z_streamp strm;
- int flush;
-{
- int old_flush; /* value of flush param for previous deflate call */
- deflate_state *s;
-
- if (strm == Z_NULL || strm->state == Z_NULL ||
- flush > Z_FINISH || flush < 0) {
- return Z_STREAM_ERROR;
- }
- s = strm->state;
-
- if (strm->next_out == Z_NULL ||
- (strm->next_in == Z_NULL && strm->avail_in != 0) ||
- (s->status == FINISH_STATE && flush != Z_FINISH)) {
- ERR_RETURN(strm, Z_STREAM_ERROR);
- }
- if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);
-
- s->strm = strm; /* just in case */
- old_flush = s->last_flush;
- s->last_flush = flush;
-
- /* Write the header */
- if (s->status == INIT_STATE) {
-#ifdef GZIP
- if (s->wrap == 2) {
- strm->adler = crc32(0L, Z_NULL, 0);
- put_byte(s, 31);
- put_byte(s, 139);
- put_byte(s, 8);
- if (s->gzhead == NULL) {
- put_byte(s, 0);
- put_byte(s, 0);
- put_byte(s, 0);
- put_byte(s, 0);
- put_byte(s, 0);
- put_byte(s, s->level == 9 ? 2 :
- (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
- 4 : 0));
- put_byte(s, OS_CODE);
- s->status = BUSY_STATE;
- }
- else {
- put_byte(s, (s->gzhead->text ? 1 : 0) +
- (s->gzhead->hcrc ? 2 : 0) +
- (s->gzhead->extra == Z_NULL ? 0 : 4) +
- (s->gzhead->name == Z_NULL ? 0 : 8) +
- (s->gzhead->comment == Z_NULL ? 0 : 16)
- );
- put_byte(s, (Byte)(s->gzhead->time & 0xff));
- put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff));
- put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff));
- put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff));
- put_byte(s, s->level == 9 ? 2 :
- (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
- 4 : 0));
- put_byte(s, s->gzhead->os & 0xff);
- if (s->gzhead->extra != NULL) {
- put_byte(s, s->gzhead->extra_len & 0xff);
- put_byte(s, (s->gzhead->extra_len >> 8) & 0xff);
- }
- if (s->gzhead->hcrc)
- strm->adler = crc32(strm->adler, s->pending_buf,
- s->pending);
- s->gzindex = 0;
- s->status = EXTRA_STATE;
- }
- }
- else
-#endif
- {
- uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
- uInt level_flags;
-
- if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)
- level_flags = 0;
- else if (s->level < 6)
- level_flags = 1;
- else if (s->level == 6)
- level_flags = 2;
- else
- level_flags = 3;
- header |= (level_flags << 6);
- if (s->strstart != 0) header |= PRESET_DICT;
- header += 31 - (header % 31);
-
- s->status = BUSY_STATE;
- putShortMSB(s, header);
-
- /* Save the adler32 of the preset dictionary: */
- if (s->strstart != 0) {
- putShortMSB(s, (uInt)(strm->adler >> 16));
- putShortMSB(s, (uInt)(strm->adler & 0xffff));
- }
- strm->adler = adler32(0L, Z_NULL, 0);
- }
- }
-#ifdef GZIP
- if (s->status == EXTRA_STATE) {
- if (s->gzhead->extra != NULL) {
- uInt beg = s->pending; /* start of bytes to update crc */
-
- while (s->gzindex < (s->gzhead->extra_len & 0xffff)) {
- if (s->pending == s->pending_buf_size) {
- if (s->gzhead->hcrc && s->pending > beg)
- strm->adler = crc32(strm->adler, s->pending_buf + beg,
- s->pending - beg);
- flush_pending(strm);
- beg = s->pending;
- if (s->pending == s->pending_buf_size)
- break;
- }
- put_byte(s, s->gzhead->extra[s->gzindex]);
- s->gzindex++;
- }
- if (s->gzhead->hcrc && s->pending > beg)
- strm->adler = crc32(strm->adler, s->pending_buf + beg,
- s->pending - beg);
- if (s->gzindex == s->gzhead->extra_len) {
- s->gzindex = 0;
- s->status = NAME_STATE;
- }
- }
- else
- s->status = NAME_STATE;
- }
- if (s->status == NAME_STATE) {
- if (s->gzhead->name != NULL) {
- uInt beg = s->pending; /* start of bytes to update crc */
- int val;
-
- do {
- if (s->pending == s->pending_buf_size) {
- if (s->gzhead->hcrc && s->pending > beg)
- strm->adler = crc32(strm->adler, s->pending_buf + beg,
- s->pending - beg);
- flush_pending(strm);
- beg = s->pending;
- if (s->pending == s->pending_buf_size) {
- val = 1;
- break;
- }
- }
- val = s->gzhead->name[s->gzindex++];
- put_byte(s, val);
- } while (val != 0);
- if (s->gzhead->hcrc && s->pending > beg)
- strm->adler = crc32(strm->adler, s->pending_buf + beg,
- s->pending - beg);
- if (val == 0) {
- s->gzindex = 0;
- s->status = COMMENT_STATE;
- }
- }
- else
- s->status = COMMENT_STATE;
- }
- if (s->status == COMMENT_STATE) {
- if (s->gzhead->comment != NULL) {
- uInt beg = s->pending; /* start of bytes to update crc */
- int val;
-
- do {
- if (s->pending == s->pending_buf_size) {
- if (s->gzhead->hcrc && s->pending > beg)
- strm->adler = crc32(strm->adler, s->pending_buf + beg,
- s->pending - beg);
- flush_pending(strm);
- beg = s->pending;
- if (s->pending == s->pending_buf_size) {
- val = 1;
- break;
- }
- }
- val = s->gzhead->comment[s->gzindex++];
- put_byte(s, val);
- } while (val != 0);
- if (s->gzhead->hcrc && s->pending > beg)
- strm->adler = crc32(strm->adler, s->pending_buf + beg,
- s->pending - beg);
- if (val == 0)
- s->status = HCRC_STATE;
- }
- else
- s->status = HCRC_STATE;
- }
- if (s->status == HCRC_STATE) {
- if (s->gzhead->hcrc) {
- if (s->pending + 2 > s->pending_buf_size)
- flush_pending(strm);
- if (s->pending + 2 <= s->pending_buf_size) {
- put_byte(s, (Byte)(strm->adler & 0xff));
- put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
- strm->adler = crc32(0L, Z_NULL, 0);
- s->status = BUSY_STATE;
- }
- }
- else
- s->status = BUSY_STATE;
- }
-#endif
-
- /* Flush as much pending output as possible */
- if (s->pending != 0) {
- flush_pending(strm);
- if (strm->avail_out == 0) {
- /* Since avail_out is 0, deflate will be called again with
- * more output space, but possibly with both pending and
- * avail_in equal to zero. There won't be anything to do,
- * but this is not an error situation so make sure we
- * return OK instead of BUF_ERROR at next call of deflate:
- */
- s->last_flush = -1;
- return Z_OK;
- }
-
- /* Make sure there is something to do and avoid duplicate consecutive
- * flushes. For repeated and useless calls with Z_FINISH, we keep
- * returning Z_STREAM_END instead of Z_BUF_ERROR.
- */
- } else if (strm->avail_in == 0 && flush <= old_flush &&
- flush != Z_FINISH) {
- ERR_RETURN(strm, Z_BUF_ERROR);
- }
-
- /* User must not provide more input after the first FINISH: */
- if (s->status == FINISH_STATE && strm->avail_in != 0) {
- ERR_RETURN(strm, Z_BUF_ERROR);
- }
-
- /* Start a new block or continue the current one.
- */
- if (strm->avail_in != 0 || s->lookahead != 0 ||
- (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
- block_state bstate;
-
- bstate = (*(configuration_table[s->level].func))(s, flush);
-
- if (bstate == finish_started || bstate == finish_done) {
- s->status = FINISH_STATE;
- }
- if (bstate == need_more || bstate == finish_started) {
- if (strm->avail_out == 0) {
- s->last_flush = -1; /* avoid BUF_ERROR next call, see above */
- }
- return Z_OK;
- /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
- * of deflate should use the same flush parameter to make sure
- * that the flush is complete. So we don't have to output an
- * empty block here, this will be done at next call. This also
- * ensures that for a very small output buffer, we emit at most
- * one empty block.
- */
- }
- if (bstate == block_done) {
- if (flush == Z_PARTIAL_FLUSH) {
- _tr_align(s);
- } else { /* FULL_FLUSH or SYNC_FLUSH */
- _tr_stored_block(s, (char*)0, 0L, 0);
- /* For a full flush, this empty block will be recognized
- * as a special marker by inflate_sync().
- */
- if (flush == Z_FULL_FLUSH) {
- CLEAR_HASH(s); /* forget history */
- }
- }
- flush_pending(strm);
- if (strm->avail_out == 0) {
- s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */
- return Z_OK;
- }
- }
- }
- Assert(strm->avail_out > 0, "bug2");
-
- if (flush != Z_FINISH) return Z_OK;
- if (s->wrap <= 0) return Z_STREAM_END;
-
- /* Write the trailer */
-#ifdef GZIP
- if (s->wrap == 2) {
- put_byte(s, (Byte)(strm->adler & 0xff));
- put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
- put_byte(s, (Byte)((strm->adler >> 16) & 0xff));
- put_byte(s, (Byte)((strm->adler >> 24) & 0xff));
- put_byte(s, (Byte)(strm->total_in & 0xff));
- put_byte(s, (Byte)((strm->total_in >> 8) & 0xff));
- put_byte(s, (Byte)((strm->total_in >> 16) & 0xff));
- put_byte(s, (Byte)((strm->total_in >> 24) & 0xff));
- }
- else
-#endif
- {
- putShortMSB(s, (uInt)(strm->adler >> 16));
- putShortMSB(s, (uInt)(strm->adler & 0xffff));
- }
- flush_pending(strm);
- /* If avail_out is zero, the application will call deflate again
- * to flush the rest.
- */
- if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */
- return s->pending != 0 ? Z_OK : Z_STREAM_END;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateEnd (strm)
- z_streamp strm;
-{
- int status;
-
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-
- status = strm->state->status;
- if (status != INIT_STATE &&
- status != EXTRA_STATE &&
- status != NAME_STATE &&
- status != COMMENT_STATE &&
- status != HCRC_STATE &&
- status != BUSY_STATE &&
- status != FINISH_STATE) {
- return Z_STREAM_ERROR;
- }
-
- /* Deallocate in reverse order of allocations: */
- TRY_FREE(strm, strm->state->pending_buf);
- TRY_FREE(strm, strm->state->head);
- TRY_FREE(strm, strm->state->prev);
- TRY_FREE(strm, strm->state->window);
-
- ZFREE(strm, strm->state);
- strm->state = Z_NULL;
-
- return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
-}
-
-/* =========================================================================
- * Copy the source state to the destination state.
- * To simplify the source, this is not supported for 16-bit MSDOS (which
- * doesn't have enough memory anyway to duplicate compression states).
- */
-int ZEXPORT deflateCopy (dest, source)
- z_streamp dest;
- z_streamp source;
-{
-#ifdef MAXSEG_64K
- return Z_STREAM_ERROR;
-#else
- deflate_state *ds;
- deflate_state *ss;
- ushf *overlay;
-
-
- if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {
- return Z_STREAM_ERROR;
- }
-
- ss = source->state;
-
- zmemcpy(dest, source, sizeof(z_stream));
-
- ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
- if (ds == Z_NULL) return Z_MEM_ERROR;
- dest->state = (struct internal_state FAR *) ds;
- zmemcpy(ds, ss, sizeof(deflate_state));
- ds->strm = dest;
-
- ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
- ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos));
- ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos));
- overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
- ds->pending_buf = (uchf *) overlay;
-
- if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
- ds->pending_buf == Z_NULL) {
- deflateEnd (dest);
- return Z_MEM_ERROR;
- }
- /* following zmemcpy do not work for 16-bit MSDOS */
- zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
- zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
- zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
- zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
-
- ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
- ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
- ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;
-
- ds->l_desc.dyn_tree = ds->dyn_ltree;
- ds->d_desc.dyn_tree = ds->dyn_dtree;
- ds->bl_desc.dyn_tree = ds->bl_tree;
-
- return Z_OK;
-#endif /* MAXSEG_64K */
-}
-
-/* ===========================================================================
- * Read a new buffer from the current input stream, update the adler32
- * and total number of bytes read. All deflate() input goes through
- * this function so some applications may wish to modify it to avoid
- * allocating a large strm->next_in buffer and copying from it.
- * (See also flush_pending()).
- */
-local int read_buf(strm, buf, size)
- z_streamp strm;
- Bytef *buf;
- unsigned size;
-{
- unsigned len = strm->avail_in;
-
- if (len > size) len = size;
- if (len == 0) return 0;
-
- strm->avail_in -= len;
-
- if (strm->state->wrap == 1) {
- strm->adler = adler32(strm->adler, strm->next_in, len);
- }
-#ifdef GZIP
- else if (strm->state->wrap == 2) {
- strm->adler = crc32(strm->adler, strm->next_in, len);
- }
-#endif
- zmemcpy(buf, strm->next_in, len);
- strm->next_in += len;
- strm->total_in += len;
-
- return (int)len;
-}
-
-/* ===========================================================================
- * Initialize the "longest match" routines for a new zlib stream
- */
-local void lm_init (s)
- deflate_state *s;
-{
- s->window_size = (ulg)2L*s->w_size;
-
- CLEAR_HASH(s);
-
- /* Set the default configuration parameters:
- */
- s->max_lazy_match = configuration_table[s->level].max_lazy;
- s->good_match = configuration_table[s->level].good_length;
- s->nice_match = configuration_table[s->level].nice_length;
- s->max_chain_length = configuration_table[s->level].max_chain;
-
- s->strstart = 0;
- s->block_start = 0L;
- s->lookahead = 0;
- s->match_length = s->prev_length = MIN_MATCH-1;
- s->match_available = 0;
- s->ins_h = 0;
-#ifndef FASTEST
-#ifdef ASMV
- match_init(); /* initialize the asm code */
-#endif
-#endif
-}
-
-#ifndef FASTEST
-/* ===========================================================================
- * Set match_start to the longest match starting at the given string and
- * return its length. Matches shorter or equal to prev_length are discarded,
- * in which case the result is equal to prev_length and match_start is
- * garbage.
- * IN assertions: cur_match is the head of the hash chain for the current
- * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
- * OUT assertion: the match length is not greater than s->lookahead.
- */
-#ifndef ASMV
-/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
- * match.S. The code will be functionally equivalent.
- */
-local uInt longest_match(s, cur_match)
- deflate_state *s;
- IPos cur_match; /* current match */
-{
- unsigned chain_length = s->max_chain_length;/* max hash chain length */
- register Bytef *scan = s->window + s->strstart; /* current string */
- register Bytef *match; /* matched string */
- register int len; /* length of current match */
- int best_len = s->prev_length; /* best match length so far */
- int nice_match = s->nice_match; /* stop if match long enough */
- IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
- s->strstart - (IPos)MAX_DIST(s) : NIL;
- /* Stop when cur_match becomes <= limit. To simplify the code,
- * we prevent matches with the string of window index 0.
- */
- Posf *prev = s->prev;
- uInt wmask = s->w_mask;
-
-#ifdef UNALIGNED_OK
- /* Compare two bytes at a time. Note: this is not always beneficial.
- * Try with and without -DUNALIGNED_OK to check.
- */
- register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
- register ush scan_start = *(ushf*)scan;
- register ush scan_end = *(ushf*)(scan+best_len-1);
-#else
- register Bytef *strend = s->window + s->strstart + MAX_MATCH;
- register Byte scan_end1 = scan[best_len-1];
- register Byte scan_end = scan[best_len];
-#endif
-
- /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
- * It is easy to get rid of this optimization if necessary.
- */
- Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
- /* Do not waste too much time if we already have a good match: */
- if (s->prev_length >= s->good_match) {
- chain_length >>= 2;
- }
- /* Do not look for matches beyond the end of the input. This is necessary
- * to make deflate deterministic.
- */
- if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
- Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
- do {
- Assert(cur_match < s->strstart, "no future");
- match = s->window + cur_match;
-
- /* Skip to next match if the match length cannot increase
- * or if the match length is less than 2. Note that the checks below
- * for insufficient lookahead only occur occasionally for performance
- * reasons. Therefore uninitialized memory will be accessed, and
- * conditional jumps will be made that depend on those values.
- * However the length of the match is limited to the lookahead, so
- * the output of deflate is not affected by the uninitialized values.
- */
-#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)
- /* This code assumes sizeof(unsigned short) == 2. Do not use
- * UNALIGNED_OK if your compiler uses a different size.
- */
- if (*(ushf*)(match+best_len-1) != scan_end ||
- *(ushf*)match != scan_start) continue;
-
- /* It is not necessary to compare scan[2] and match[2] since they are
- * always equal when the other bytes match, given that the hash keys
- * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at
- * strstart+3, +5, ... up to strstart+257. We check for insufficient
- * lookahead only every 4th comparison; the 128th check will be made
- * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is
- * necessary to put more guard bytes at the end of the window, or
- * to check more often for insufficient lookahead.
- */
- Assert(scan[2] == match[2], "scan[2]?");
- scan++, match++;
- do {
- } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
- *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
- *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
- *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
- scan < strend);
- /* The funny "do {}" generates better code on most compilers */
-
- /* Here, scan <= window+strstart+257 */
- Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
- if (*scan == *match) scan++;
-
- len = (MAX_MATCH - 1) - (int)(strend-scan);
- scan = strend - (MAX_MATCH-1);
-
-#else /* UNALIGNED_OK */
-
- if (match[best_len] != scan_end ||
- match[best_len-1] != scan_end1 ||
- *match != *scan ||
- *++match != scan[1]) continue;
-
- /* The check at best_len-1 can be removed because it will be made
- * again later. (This heuristic is not always a win.)
- * It is not necessary to compare scan[2] and match[2] since they
- * are always equal when the other bytes match, given that
- * the hash keys are equal and that HASH_BITS >= 8.
- */
- scan += 2, match++;
- Assert(*scan == *match, "match[2]?");
-
- /* We check for insufficient lookahead only every 8th comparison;
- * the 256th check will be made at strstart+258.
- */
- do {
- } while (*++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- scan < strend);
-
- Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
- len = MAX_MATCH - (int)(strend - scan);
- scan = strend - MAX_MATCH;
-
-#endif /* UNALIGNED_OK */
-
- if (len > best_len) {
- s->match_start = cur_match;
- best_len = len;
- if (len >= nice_match) break;
-#ifdef UNALIGNED_OK
- scan_end = *(ushf*)(scan+best_len-1);
-#else
- scan_end1 = scan[best_len-1];
- scan_end = scan[best_len];
-#endif
- }
- } while ((cur_match = prev[cur_match & wmask]) > limit
- && --chain_length != 0);
-
- if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
- return s->lookahead;
-}
-#endif /* ASMV */
-#endif /* FASTEST */
-
-/* ---------------------------------------------------------------------------
- * Optimized version for level == 1 or strategy == Z_RLE only
- */
-local uInt longest_match_fast(s, cur_match)
- deflate_state *s;
- IPos cur_match; /* current match */
-{
- register Bytef *scan = s->window + s->strstart; /* current string */
- register Bytef *match; /* matched string */
- register int len; /* length of current match */
- register Bytef *strend = s->window + s->strstart + MAX_MATCH;
-
- /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
- * It is easy to get rid of this optimization if necessary.
- */
- Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
- Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
- Assert(cur_match < s->strstart, "no future");
-
- match = s->window + cur_match;
-
- /* Return failure if the match length is less than 2:
- */
- if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1;
-
- /* The check at best_len-1 can be removed because it will be made
- * again later. (This heuristic is not always a win.)
- * It is not necessary to compare scan[2] and match[2] since they
- * are always equal when the other bytes match, given that
- * the hash keys are equal and that HASH_BITS >= 8.
- */
- scan += 2, match += 2;
- Assert(*scan == *match, "match[2]?");
-
- /* We check for insufficient lookahead only every 8th comparison;
- * the 256th check will be made at strstart+258.
- */
- do {
- } while (*++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- scan < strend);
-
- Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
- len = MAX_MATCH - (int)(strend - scan);
-
- if (len < MIN_MATCH) return MIN_MATCH - 1;
-
- s->match_start = cur_match;
- return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
-}
-
-#ifdef DEBUG
-/* ===========================================================================
- * Check that the match at match_start is indeed a match.
- */
-local void check_match(s, start, match, length)
- deflate_state *s;
- IPos start, match;
- int length;
-{
- /* check that the match is indeed a match */
- if (zmemcmp(s->window + match,
- s->window + start, length) != EQUAL) {
- fprintf(stderr, " start %u, match %u, length %d\n",
- start, match, length);
- do {
- fprintf(stderr, "%c%c", s->window[match++], s->window[start++]);
- } while (--length != 0);
- z_error("invalid match");
- }
- if (z_verbose > 1) {
- fprintf(stderr,"\\[%d,%d]", start-match, length);
- do { putc(s->window[start++], stderr); } while (--length != 0);
- }
-}
-#else
-# define check_match(s, start, match, length)
-#endif /* DEBUG */
-
-/* ===========================================================================
- * Fill the window when the lookahead becomes insufficient.
- * Updates strstart and lookahead.
- *
- * IN assertion: lookahead < MIN_LOOKAHEAD
- * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
- * At least one byte has been read, or avail_in == 0; reads are
- * performed for at least two bytes (required for the zip translate_eol
- * option -- not supported here).
- */
-local void fill_window(s)
- deflate_state *s;
-{
- register unsigned n, m;
- register Posf *p;
- unsigned more; /* Amount of free space at the end of the window. */
- uInt wsize = s->w_size;
-
- do {
- more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
-
- /* Deal with !@#$% 64K limit: */
- if (sizeof(int) <= 2) {
- if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
- more = wsize;
-
- } else if (more == (unsigned)(-1)) {
- /* Very unlikely, but possible on 16 bit machine if
- * strstart == 0 && lookahead == 1 (input done a byte at time)
- */
- more--;
- }
- }
-
- /* If the window is almost full and there is insufficient lookahead,
- * move the upper half to the lower one to make room in the upper half.
- */
- if (s->strstart >= wsize+MAX_DIST(s)) {
-
- zmemcpy(s->window, s->window+wsize, (unsigned)wsize);
- s->match_start -= wsize;
- s->strstart -= wsize; /* we now have strstart >= MAX_DIST */
- s->block_start -= (long) wsize;
-
- /* Slide the hash table (could be avoided with 32 bit values
- at the expense of memory usage). We slide even when level == 0
- to keep the hash table consistent if we switch back to level > 0
- later. (Using level 0 permanently is not an optimal usage of
- zlib, so we don't care about this pathological case.)
- */
- /* %%% avoid this when Z_RLE */
- n = s->hash_size;
- p = &s->head[n];
- do {
- m = *--p;
- *p = (Pos)(m >= wsize ? m-wsize : NIL);
- } while (--n);
-
- n = wsize;
-#ifndef FASTEST
- p = &s->prev[n];
- do {
- m = *--p;
- *p = (Pos)(m >= wsize ? m-wsize : NIL);
- /* If n is not on any hash chain, prev[n] is garbage but
- * its value will never be used.
- */
- } while (--n);
-#endif
- more += wsize;
- }
- if (s->strm->avail_in == 0) return;
-
- /* If there was no sliding:
- * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
- * more == window_size - lookahead - strstart
- * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
- * => more >= window_size - 2*WSIZE + 2
- * In the BIG_MEM or MMAP case (not yet supported),
- * window_size == input_size + MIN_LOOKAHEAD &&
- * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
- * Otherwise, window_size == 2*WSIZE so more >= 2.
- * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
- */
- Assert(more >= 2, "more < 2");
-
- n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
- s->lookahead += n;
-
- /* Initialize the hash value now that we have some input: */
- if (s->lookahead >= MIN_MATCH) {
- s->ins_h = s->window[s->strstart];
- UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
-#if MIN_MATCH != 3
- Call UPDATE_HASH() MIN_MATCH-3 more times
-#endif
- }
- /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
- * but this is not important since only literal bytes will be emitted.
- */
-
- } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
-}
-
-/* ===========================================================================
- * Flush the current block, with given end-of-file flag.
- * IN assertion: strstart is set to the end of the current match.
- */
-#define FLUSH_BLOCK_ONLY(s, eof) { \
- _tr_flush_block(s, (s->block_start >= 0L ? \
- (charf *)&s->window[(unsigned)s->block_start] : \
- (charf *)Z_NULL), \
- (ulg)((long)s->strstart - s->block_start), \
- (eof)); \
- s->block_start = s->strstart; \
- flush_pending(s->strm); \
- Tracev((stderr,"[FLUSH]")); \
-}
-
-/* Same but force premature exit if necessary. */
-#define FLUSH_BLOCK(s, eof) { \
- FLUSH_BLOCK_ONLY(s, eof); \
- if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
-}
-
-/* ===========================================================================
- * Copy without compression as much as possible from the input stream, return
- * the current block state.
- * This function does not insert new strings in the dictionary since
- * uncompressible data is probably not useful. This function is used
- * only for the level=0 compression option.
- * NOTE: this function should be optimized to avoid extra copying from
- * window to pending_buf.
- */
-local block_state deflate_stored(s, flush)
- deflate_state *s;
- int flush;
-{
- /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
- * to pending_buf_size, and each stored block has a 5 byte header:
- */
- ulg max_block_size = 0xffff;
- ulg max_start;
-
- if (max_block_size > s->pending_buf_size - 5) {
- max_block_size = s->pending_buf_size - 5;
- }
-
- /* Copy as much as possible from input to output: */
- for (;;) {
- /* Fill the window as much as possible: */
- if (s->lookahead <= 1) {
-
- Assert(s->strstart < s->w_size+MAX_DIST(s) ||
- s->block_start >= (long)s->w_size, "slide too late");
-
- fill_window(s);
- if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
-
- if (s->lookahead == 0) break; /* flush the current block */
- }
- Assert(s->block_start >= 0L, "block gone");
-
- s->strstart += s->lookahead;
- s->lookahead = 0;
-
- /* Emit a stored block if pending_buf will be full: */
- max_start = s->block_start + max_block_size;
- if (s->strstart == 0 || (ulg)s->strstart >= max_start) {
- /* strstart == 0 is possible when wraparound on 16-bit machine */
- s->lookahead = (uInt)(s->strstart - max_start);
- s->strstart = (uInt)max_start;
- FLUSH_BLOCK(s, 0);
- }
- /* Flush if we may have to slide, otherwise block_start may become
- * negative and the data will be gone:
- */
- if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) {
- FLUSH_BLOCK(s, 0);
- }
- }
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
-}
-
-/* ===========================================================================
- * Compress as much as possible from the input stream, return the current
- * block state.
- * This function does not perform lazy evaluation of matches and inserts
- * new strings in the dictionary only for unmatched strings or for short
- * matches. It is used only for the fast compression options.
- */
-local block_state deflate_fast(s, flush)
- deflate_state *s;
- int flush;
-{
- IPos hash_head = NIL; /* head of the hash chain */
- int bflush; /* set if current block must be flushed */
-
- for (;;) {
- /* Make sure that we always have enough lookahead, except
- * at the end of the input file. We need MAX_MATCH bytes
- * for the next match, plus MIN_MATCH bytes to insert the
- * string following the next match.
- */
- if (s->lookahead < MIN_LOOKAHEAD) {
- fill_window(s);
- if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
- return need_more;
- }
- if (s->lookahead == 0) break; /* flush the current block */
- }
-
- /* Insert the string window[strstart .. strstart+2] in the
- * dictionary, and set hash_head to the head of the hash chain:
- */
- if (s->lookahead >= MIN_MATCH) {
- INSERT_STRING(s, s->strstart, hash_head);
- }
-
- /* Find the longest match, discarding those <= prev_length.
- * At this point we have always match_length < MIN_MATCH
- */
- if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) {
- /* To simplify the code, we prevent matches with the string
- * of window index 0 (in particular we have to avoid a match
- * of the string with itself at the start of the input file).
- */
-#ifdef FASTEST
- if ((s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) ||
- (s->strategy == Z_RLE && s->strstart - hash_head == 1)) {
- s->match_length = longest_match_fast (s, hash_head);
- }
-#else
- if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) {
- s->match_length = longest_match (s, hash_head);
- } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
- s->match_length = longest_match_fast (s, hash_head);
- }
-#endif
- /* longest_match() or longest_match_fast() sets match_start */
- }
- if (s->match_length >= MIN_MATCH) {
- check_match(s, s->strstart, s->match_start, s->match_length);
-
- _tr_tally_dist(s, s->strstart - s->match_start,
- s->match_length - MIN_MATCH, bflush);
-
- s->lookahead -= s->match_length;
-
- /* Insert new strings in the hash table only if the match length
- * is not too large. This saves time but degrades compression.
- */
-#ifndef FASTEST
- if (s->match_length <= s->max_insert_length &&
- s->lookahead >= MIN_MATCH) {
- s->match_length--; /* string at strstart already in table */
- do {
- s->strstart++;
- INSERT_STRING(s, s->strstart, hash_head);
- /* strstart never exceeds WSIZE-MAX_MATCH, so there are
- * always MIN_MATCH bytes ahead.
- */
- } while (--s->match_length != 0);
- s->strstart++;
- } else
-#endif
- {
- s->strstart += s->match_length;
- s->match_length = 0;
- s->ins_h = s->window[s->strstart];
- UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
-#if MIN_MATCH != 3
- Call UPDATE_HASH() MIN_MATCH-3 more times
-#endif
- /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
- * matter since it will be recomputed at next deflate call.
- */
- }
- } else {
- /* No match, output a literal byte */
- Tracevv((stderr,"%c", s->window[s->strstart]));
- _tr_tally_lit (s, s->window[s->strstart], bflush);
- s->lookahead--;
- s->strstart++;
- }
- if (bflush) FLUSH_BLOCK(s, 0);
- }
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
-}
-
-#ifndef FASTEST
-/* ===========================================================================
- * Same as above, but achieves better compression. We use a lazy
- * evaluation for matches: a match is finally adopted only if there is
- * no better match at the next window position.
- */
-local block_state deflate_slow(s, flush)
- deflate_state *s;
- int flush;
-{
- IPos hash_head = NIL; /* head of hash chain */
- int bflush; /* set if current block must be flushed */
-
- /* Process the input block. */
- for (;;) {
- /* Make sure that we always have enough lookahead, except
- * at the end of the input file. We need MAX_MATCH bytes
- * for the next match, plus MIN_MATCH bytes to insert the
- * string following the next match.
- */
- if (s->lookahead < MIN_LOOKAHEAD) {
- fill_window(s);
- if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
- return need_more;
- }
- if (s->lookahead == 0) break; /* flush the current block */
- }
-
- /* Insert the string window[strstart .. strstart+2] in the
- * dictionary, and set hash_head to the head of the hash chain:
- */
- if (s->lookahead >= MIN_MATCH) {
- INSERT_STRING(s, s->strstart, hash_head);
- }
-
- /* Find the longest match, discarding those <= prev_length.
- */
- s->prev_length = s->match_length, s->prev_match = s->match_start;
- s->match_length = MIN_MATCH-1;
-
- if (hash_head != NIL && s->prev_length < s->max_lazy_match &&
- s->strstart - hash_head <= MAX_DIST(s)) {
- /* To simplify the code, we prevent matches with the string
- * of window index 0 (in particular we have to avoid a match
- * of the string with itself at the start of the input file).
- */
- if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) {
- s->match_length = longest_match (s, hash_head);
- } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
- s->match_length = longest_match_fast (s, hash_head);
- }
- /* longest_match() or longest_match_fast() sets match_start */
-
- if (s->match_length <= 5 && (s->strategy == Z_FILTERED
-#if TOO_FAR <= 32767
- || (s->match_length == MIN_MATCH &&
- s->strstart - s->match_start > TOO_FAR)
-#endif
- )) {
-
- /* If prev_match is also MIN_MATCH, match_start is garbage
- * but we will ignore the current match anyway.
- */
- s->match_length = MIN_MATCH-1;
- }
- }
- /* If there was a match at the previous step and the current
- * match is not better, output the previous match:
- */
- if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) {
- uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
- /* Do not insert strings in hash table beyond this. */
-
- check_match(s, s->strstart-1, s->prev_match, s->prev_length);
-
- _tr_tally_dist(s, s->strstart -1 - s->prev_match,
- s->prev_length - MIN_MATCH, bflush);
-
- /* Insert in hash table all strings up to the end of the match.
- * strstart-1 and strstart are already inserted. If there is not
- * enough lookahead, the last two strings are not inserted in
- * the hash table.
- */
- s->lookahead -= s->prev_length-1;
- s->prev_length -= 2;
- do {
- if (++s->strstart <= max_insert) {
- INSERT_STRING(s, s->strstart, hash_head);
- }
- } while (--s->prev_length != 0);
- s->match_available = 0;
- s->match_length = MIN_MATCH-1;
- s->strstart++;
-
- if (bflush) FLUSH_BLOCK(s, 0);
-
- } else if (s->match_available) {
- /* If there was no match at the previous position, output a
- * single literal. If there was a match but the current match
- * is longer, truncate the previous match to a single literal.
- */
- Tracevv((stderr,"%c", s->window[s->strstart-1]));
- _tr_tally_lit(s, s->window[s->strstart-1], bflush);
- if (bflush) {
- FLUSH_BLOCK_ONLY(s, 0);
- }
- s->strstart++;
- s->lookahead--;
- if (s->strm->avail_out == 0) return need_more;
- } else {
- /* There is no previous match to compare with, wait for
- * the next step to decide.
- */
- s->match_available = 1;
- s->strstart++;
- s->lookahead--;
- }
- }
- Assert (flush != Z_NO_FLUSH, "no flush?");
- if (s->match_available) {
- Tracevv((stderr,"%c", s->window[s->strstart-1]));
- _tr_tally_lit(s, s->window[s->strstart-1], bflush);
- s->match_available = 0;
- }
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
-}
-#endif /* FASTEST */
-
-#if 0
-/* ===========================================================================
- * For Z_RLE, simply look for runs of bytes, generate matches only of distance
- * one. Do not maintain a hash table. (It will be regenerated if this run of
- * deflate switches away from Z_RLE.)
- */
-local block_state deflate_rle(s, flush)
- deflate_state *s;
- int flush;
-{
- int bflush; /* set if current block must be flushed */
- uInt run; /* length of run */
- uInt max; /* maximum length of run */
- uInt prev; /* byte at distance one to match */
- Bytef *scan; /* scan for end of run */
-
- for (;;) {
- /* Make sure that we always have enough lookahead, except
- * at the end of the input file. We need MAX_MATCH bytes
- * for the longest encodable run.
- */
- if (s->lookahead < MAX_MATCH) {
- fill_window(s);
- if (s->lookahead < MAX_MATCH && flush == Z_NO_FLUSH) {
- return need_more;
- }
- if (s->lookahead == 0) break; /* flush the current block */
- }
-
- /* See how many times the previous byte repeats */
- run = 0;
- if (s->strstart > 0) { /* if there is a previous byte, that is */
- max = s->lookahead < MAX_MATCH ? s->lookahead : MAX_MATCH;
- scan = s->window + s->strstart - 1;
- prev = *scan++;
- do {
- if (*scan++ != prev)
- break;
- } while (++run < max);
- }
-
- /* Emit match if have run of MIN_MATCH or longer, else emit literal */
- if (run >= MIN_MATCH) {
- check_match(s, s->strstart, s->strstart - 1, run);
- _tr_tally_dist(s, 1, run - MIN_MATCH, bflush);
- s->lookahead -= run;
- s->strstart += run;
- } else {
- /* No match, output a literal byte */
- Tracevv((stderr,"%c", s->window[s->strstart]));
- _tr_tally_lit (s, s->window[s->strstart], bflush);
- s->lookahead--;
- s->strstart++;
- }
- if (bflush) FLUSH_BLOCK(s, 0);
- }
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
-}
-#endif
diff --git a/WebCore/platform/image-decoders/zlib/deflate.h b/WebCore/platform/image-decoders/zlib/deflate.h
deleted file mode 100644
index 942fe26..0000000
--- a/WebCore/platform/image-decoders/zlib/deflate.h
+++ /dev/null
@@ -1,331 +0,0 @@
-/* deflate.h -- internal compression state
- * Copyright (C) 1995-2004 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/* @(#) $Id: deflate.h,v 3.6 2005/08/04 19:14:14 tor%cs.brown.edu Exp $ */
-
-#ifndef DEFLATE_H
-#define DEFLATE_H
-
-#include "zutil.h"
-
-/* define NO_GZIP when compiling if you want to disable gzip header and
- trailer creation by deflate(). NO_GZIP would be used to avoid linking in
- the crc code when it is not needed. For shared libraries, gzip encoding
- should be left enabled. */
-#ifndef NO_GZIP
-# define GZIP
-#endif
-
-/* ===========================================================================
- * Internal compression state.
- */
-
-#define LENGTH_CODES 29
-/* number of length codes, not counting the special END_BLOCK code */
-
-#define LITERALS 256
-/* number of literal bytes 0..255 */
-
-#define L_CODES (LITERALS+1+LENGTH_CODES)
-/* number of Literal or Length codes, including the END_BLOCK code */
-
-#define D_CODES 30
-/* number of distance codes */
-
-#define BL_CODES 19
-/* number of codes used to transfer the bit lengths */
-
-#define HEAP_SIZE (2*L_CODES+1)
-/* maximum heap size */
-
-#define MAX_BITS 15
-/* All codes must not exceed MAX_BITS bits */
-
-#define INIT_STATE 42
-#define EXTRA_STATE 69
-#define NAME_STATE 73
-#define COMMENT_STATE 91
-#define HCRC_STATE 103
-#define BUSY_STATE 113
-#define FINISH_STATE 666
-/* Stream status */
-
-
-/* Data structure describing a single value and its code string. */
-typedef struct ct_data_s {
- union {
- ush freq; /* frequency count */
- ush code; /* bit string */
- } fc;
- union {
- ush dad; /* father node in Huffman tree */
- ush len; /* length of bit string */
- } dl;
-} FAR ct_data;
-
-#define Freq fc.freq
-#define Code fc.code
-#define Dad dl.dad
-#define Len dl.len
-
-typedef struct static_tree_desc_s static_tree_desc;
-
-typedef struct tree_desc_s {
- ct_data *dyn_tree; /* the dynamic tree */
- int max_code; /* largest code with non zero frequency */
- static_tree_desc *stat_desc; /* the corresponding static tree */
-} FAR tree_desc;
-
-typedef ush Pos;
-typedef Pos FAR Posf;
-typedef unsigned IPos;
-
-/* A Pos is an index in the character window. We use short instead of int to
- * save space in the various tables. IPos is used only for parameter passing.
- */
-
-typedef struct internal_state {
- z_streamp strm; /* pointer back to this zlib stream */
- int status; /* as the name implies */
- Bytef *pending_buf; /* output still pending */
- ulg pending_buf_size; /* size of pending_buf */
- Bytef *pending_out; /* next pending byte to output to the stream */
- uInt pending; /* nb of bytes in the pending buffer */
- int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
- gz_headerp gzhead; /* gzip header information to write */
- uInt gzindex; /* where in extra, name, or comment */
- Byte method; /* STORED (for zip only) or DEFLATED */
- int last_flush; /* value of flush param for previous deflate call */
-
- /* used by deflate.c: */
-
- uInt w_size; /* LZ77 window size (32K by default) */
- uInt w_bits; /* log2(w_size) (8..16) */
- uInt w_mask; /* w_size - 1 */
-
- Bytef *window;
- /* Sliding window. Input bytes are read into the second half of the window,
- * and move to the first half later to keep a dictionary of at least wSize
- * bytes. With this organization, matches are limited to a distance of
- * wSize-MAX_MATCH bytes, but this ensures that IO is always
- * performed with a length multiple of the block size. Also, it limits
- * the window size to 64K, which is quite useful on MSDOS.
- * To do: use the user input buffer as sliding window.
- */
-
- ulg window_size;
- /* Actual size of window: 2*wSize, except when the user input buffer
- * is directly used as sliding window.
- */
-
- Posf *prev;
- /* Link to older string with same hash index. To limit the size of this
- * array to 64K, this link is maintained only for the last 32K strings.
- * An index in this array is thus a window index modulo 32K.
- */
-
- Posf *head; /* Heads of the hash chains or NIL. */
-
- uInt ins_h; /* hash index of string to be inserted */
- uInt hash_size; /* number of elements in hash table */
- uInt hash_bits; /* log2(hash_size) */
- uInt hash_mask; /* hash_size-1 */
-
- uInt hash_shift;
- /* Number of bits by which ins_h must be shifted at each input
- * step. It must be such that after MIN_MATCH steps, the oldest
- * byte no longer takes part in the hash key, that is:
- * hash_shift * MIN_MATCH >= hash_bits
- */
-
- long block_start;
- /* Window position at the beginning of the current output block. Gets
- * negative when the window is moved backwards.
- */
-
- uInt match_length; /* length of best match */
- IPos prev_match; /* previous match */
- int match_available; /* set if previous match exists */
- uInt strstart; /* start of string to insert */
- uInt match_start; /* start of matching string */
- uInt lookahead; /* number of valid bytes ahead in window */
-
- uInt prev_length;
- /* Length of the best match at previous step. Matches not greater than this
- * are discarded. This is used in the lazy match evaluation.
- */
-
- uInt max_chain_length;
- /* To speed up deflation, hash chains are never searched beyond this
- * length. A higher limit improves compression ratio but degrades the
- * speed.
- */
-
- uInt max_lazy_match;
- /* Attempt to find a better match only when the current match is strictly
- * smaller than this value. This mechanism is used only for compression
- * levels >= 4.
- */
-# define max_insert_length max_lazy_match
- /* Insert new strings in the hash table only if the match length is not
- * greater than this length. This saves time but degrades compression.
- * max_insert_length is used only for compression levels <= 3.
- */
-
- int level; /* compression level (1..9) */
- int strategy; /* favor or force Huffman coding*/
-
- uInt good_match;
- /* Use a faster search when the previous match is longer than this */
-
- int nice_match; /* Stop searching when current match exceeds this */
-
- /* used by trees.c: */
- /* Didn't use ct_data typedef below to supress compiler warning */
- struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */
- struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
- struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */
-
- struct tree_desc_s l_desc; /* desc. for literal tree */
- struct tree_desc_s d_desc; /* desc. for distance tree */
- struct tree_desc_s bl_desc; /* desc. for bit length tree */
-
- ush bl_count[MAX_BITS+1];
- /* number of codes at each bit length for an optimal tree */
-
- int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */
- int heap_len; /* number of elements in the heap */
- int heap_max; /* element of largest frequency */
- /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
- * The same heap array is used to build all trees.
- */
-
- uch depth[2*L_CODES+1];
- /* Depth of each subtree used as tie breaker for trees of equal frequency
- */
-
- uchf *l_buf; /* buffer for literals or lengths */
-
- uInt lit_bufsize;
- /* Size of match buffer for literals/lengths. There are 4 reasons for
- * limiting lit_bufsize to 64K:
- * - frequencies can be kept in 16 bit counters
- * - if compression is not successful for the first block, all input
- * data is still in the window so we can still emit a stored block even
- * when input comes from standard input. (This can also be done for
- * all blocks if lit_bufsize is not greater than 32K.)
- * - if compression is not successful for a file smaller than 64K, we can
- * even emit a stored file instead of a stored block (saving 5 bytes).
- * This is applicable only for zip (not gzip or zlib).
- * - creating new Huffman trees less frequently may not provide fast
- * adaptation to changes in the input data statistics. (Take for
- * example a binary file with poorly compressible code followed by
- * a highly compressible string table.) Smaller buffer sizes give
- * fast adaptation but have of course the overhead of transmitting
- * trees more frequently.
- * - I can't count above 4
- */
-
- uInt last_lit; /* running index in l_buf */
-
- ushf *d_buf;
- /* Buffer for distances. To simplify the code, d_buf and l_buf have
- * the same number of elements. To use different lengths, an extra flag
- * array would be necessary.
- */
-
- ulg opt_len; /* bit length of current block with optimal trees */
- ulg static_len; /* bit length of current block with static trees */
- uInt matches; /* number of string matches in current block */
- int last_eob_len; /* bit length of EOB code for last block */
-
-#ifdef DEBUG
- ulg compressed_len; /* total bit length of compressed file mod 2^32 */
- ulg bits_sent; /* bit length of compressed data sent mod 2^32 */
-#endif
-
- ush bi_buf;
- /* Output buffer. bits are inserted starting at the bottom (least
- * significant bits).
- */
- int bi_valid;
- /* Number of valid bits in bi_buf. All bits above the last valid bit
- * are always zero.
- */
-
-} FAR deflate_state;
-
-/* Output a byte on the stream.
- * IN assertion: there is enough room in pending_buf.
- */
-#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
-
-
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
-#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD)
-/* In order to simplify the code, particularly on 16 bit machines, match
- * distances are limited to MAX_DIST instead of WSIZE.
- */
-
- /* in trees.c */
-void _tr_init OF((deflate_state *s));
-int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
-void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len,
- int eof));
-void _tr_align OF((deflate_state *s));
-void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
- int eof));
-
-#define d_code(dist) \
- ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
-/* Mapping from a distance to a distance code. dist is the distance - 1 and
- * must not have side effects. _dist_code[256] and _dist_code[257] are never
- * used.
- */
-
-#ifndef DEBUG
-/* Inline versions of _tr_tally for speed: */
-
-#if defined(GEN_TREES_H) || !defined(STDC)
- extern uch _length_code[];
- extern uch _dist_code[];
-#else
- extern const uch _length_code[];
- extern const uch _dist_code[];
-#endif
-
-# define _tr_tally_lit(s, c, flush) \
- { uch cc = (c); \
- s->d_buf[s->last_lit] = 0; \
- s->l_buf[s->last_lit++] = cc; \
- s->dyn_ltree[cc].Freq++; \
- flush = (s->last_lit == s->lit_bufsize-1); \
- }
-# define _tr_tally_dist(s, distance, length, flush) \
- { uch len = (length); \
- ush dist = (distance); \
- s->d_buf[s->last_lit] = dist; \
- s->l_buf[s->last_lit++] = len; \
- dist--; \
- s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
- s->dyn_dtree[d_code(dist)].Freq++; \
- flush = (s->last_lit == s->lit_bufsize-1); \
- }
-#else
-# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
-# define _tr_tally_dist(s, distance, length, flush) \
- flush = _tr_tally(s, distance, length)
-#endif
-
-#endif /* DEFLATE_H */
diff --git a/WebCore/platform/image-decoders/zlib/gzio.c b/WebCore/platform/image-decoders/zlib/gzio.c
deleted file mode 100644
index 2c0c1d7..0000000
--- a/WebCore/platform/image-decoders/zlib/gzio.c
+++ /dev/null
@@ -1,1026 +0,0 @@
-/* gzio.c -- IO on .gz files
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Compile this file with -DNO_GZCOMPRESS to avoid the compression code.
- */
-
-/* @(#) $Id: gzio.c,v 3.7 2005/08/04 19:14:14 tor%cs.brown.edu Exp $ */
-
-#include <stdio.h>
-
-#include "zutil.h"
-
-#ifdef NO_DEFLATE /* for compatibility with old definition */
-# define NO_GZCOMPRESS
-#endif
-
-#ifndef NO_DUMMY_DECL
-struct internal_state {int dummy;}; /* for buggy compilers */
-#endif
-
-#ifndef Z_BUFSIZE
-# ifdef MAXSEG_64K
-# define Z_BUFSIZE 4096 /* minimize memory usage for 16-bit DOS */
-# else
-# define Z_BUFSIZE 16384
-# endif
-#endif
-#ifndef Z_PRINTF_BUFSIZE
-# define Z_PRINTF_BUFSIZE 4096
-#endif
-
-#ifdef __MVS__
-# pragma map (fdopen , "\174\174FDOPEN")
- FILE *fdopen(int, const char *);
-#endif
-
-#ifndef STDC
-extern voidp malloc OF((uInt size));
-extern void free OF((voidpf ptr));
-#endif
-
-#define ALLOC(size) malloc(size)
-#define TRYFREE(p) {if (p) free(p);}
-
-static int const gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */
-
-/* gzip flag byte */
-#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
-#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */
-#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
-#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
-#define COMMENT 0x10 /* bit 4 set: file comment present */
-#define RESERVED 0xE0 /* bits 5..7: reserved */
-
-typedef struct gz_stream {
- z_stream stream;
- int z_err; /* error code for last stream operation */
- int z_eof; /* set if end of input file */
- FILE *file; /* .gz file */
- Byte *inbuf; /* input buffer */
- Byte *outbuf; /* output buffer */
- uLong crc; /* crc32 of uncompressed data */
- char *msg; /* error message */
- char *path; /* path name for debugging only */
- int transparent; /* 1 if input file is not a .gz file */
- char mode; /* 'w' or 'r' */
- z_off_t start; /* start of compressed data in file (header skipped) */
- z_off_t in; /* bytes into deflate or inflate */
- z_off_t out; /* bytes out of deflate or inflate */
- int back; /* one character push-back */
- int last; /* true if push-back is last character */
-} gz_stream;
-
-
-local gzFile gz_open OF((const char *path, const char *mode, int fd));
-local int do_flush OF((gzFile file, int flush));
-local int get_byte OF((gz_stream *s));
-local void check_header OF((gz_stream *s));
-local int destroy OF((gz_stream *s));
-local void putLong OF((FILE *file, uLong x));
-local uLong getLong OF((gz_stream *s));
-
-/* ===========================================================================
- Opens a gzip (.gz) file for reading or writing. The mode parameter
- is as in fopen ("rb" or "wb"). The file is given either by file descriptor
- or path name (if fd == -1).
- gz_open returns NULL if the file could not be opened or if there was
- insufficient memory to allocate the (de)compression state; errno
- can be checked to distinguish the two cases (if errno is zero, the
- zlib error is Z_MEM_ERROR).
-*/
-local gzFile gz_open (path, mode, fd)
- const char *path;
- const char *mode;
- int fd;
-{
- int err;
- int level = Z_DEFAULT_COMPRESSION; /* compression level */
- int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */
- char *p = (char*)mode;
- gz_stream *s;
- char fmode[80]; /* copy of mode, without the compression level */
- char *m = fmode;
-
- if (!path || !mode) return Z_NULL;
-
- s = (gz_stream *)ALLOC(sizeof(gz_stream));
- if (!s) return Z_NULL;
-
- s->stream.zalloc = (alloc_func)0;
- s->stream.zfree = (free_func)0;
- s->stream.opaque = (voidpf)0;
- s->stream.next_in = s->inbuf = Z_NULL;
- s->stream.next_out = s->outbuf = Z_NULL;
- s->stream.avail_in = s->stream.avail_out = 0;
- s->file = NULL;
- s->z_err = Z_OK;
- s->z_eof = 0;
- s->in = 0;
- s->out = 0;
- s->back = EOF;
- s->crc = crc32(0L, Z_NULL, 0);
- s->msg = NULL;
- s->transparent = 0;
-
- s->path = (char*)ALLOC(strlen(path)+1);
- if (s->path == NULL) {
- return destroy(s), (gzFile)Z_NULL;
- }
- strcpy(s->path, path); /* do this early for debugging */
-
- s->mode = '\0';
- do {
- if (*p == 'r') s->mode = 'r';
- if (*p == 'w' || *p == 'a') s->mode = 'w';
- if (*p >= '0' && *p <= '9') {
- level = *p - '0';
- } else if (*p == 'f') {
- strategy = Z_FILTERED;
- } else if (*p == 'h') {
- strategy = Z_HUFFMAN_ONLY;
- } else if (*p == 'R') {
- strategy = Z_RLE;
- } else {
- *m++ = *p; /* copy the mode */
- }
- } while (*p++ && m != fmode + sizeof(fmode));
- if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL;
-
- if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
- err = Z_STREAM_ERROR;
-#else
- err = deflateInit2(&(s->stream), level,
- Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy);
- /* windowBits is passed < 0 to suppress zlib header */
-
- s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
-#endif
- if (err != Z_OK || s->outbuf == Z_NULL) {
- return destroy(s), (gzFile)Z_NULL;
- }
- } else {
- s->stream.next_in = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE);
-
- err = inflateInit2(&(s->stream), -MAX_WBITS);
- /* windowBits is passed < 0 to tell that there is no zlib header.
- * Note that in this case inflate *requires* an extra "dummy" byte
- * after the compressed stream in order to complete decompression and
- * return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are
- * present after the compressed stream.
- */
- if (err != Z_OK || s->inbuf == Z_NULL) {
- return destroy(s), (gzFile)Z_NULL;
- }
- }
- s->stream.avail_out = Z_BUFSIZE;
-
- errno = 0;
- s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode);
-
- if (s->file == NULL) {
- return destroy(s), (gzFile)Z_NULL;
- }
- if (s->mode == 'w') {
- /* Write a very simple .gz header:
- */
- fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1],
- Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE);
- s->start = 10L;
- /* We use 10L instead of ftell(s->file) to because ftell causes an
- * fflush on some systems. This version of the library doesn't use
- * start anyway in write mode, so this initialization is not
- * necessary.
- */
- } else {
- check_header(s); /* skip the .gz header */
- s->start = ftell(s->file) - s->stream.avail_in;
- }
-
- return (gzFile)s;
-}
-
-/* ===========================================================================
- Opens a gzip (.gz) file for reading or writing.
-*/
-gzFile ZEXPORT gzopen (path, mode)
- const char *path;
- const char *mode;
-{
- return gz_open (path, mode, -1);
-}
-
-/* ===========================================================================
- Associate a gzFile with the file descriptor fd. fd is not dup'ed here
- to mimic the behavio(u)r of fdopen.
-*/
-gzFile ZEXPORT gzdopen (fd, mode)
- int fd;
- const char *mode;
-{
- char name[46]; /* allow for up to 128-bit integers */
-
- if (fd < 0) return (gzFile)Z_NULL;
- sprintf(name, "<fd:%d>", fd); /* for debugging */
-
- return gz_open (name, mode, fd);
-}
-
-/* ===========================================================================
- * Update the compression level and strategy
- */
-int ZEXPORT gzsetparams (file, level, strategy)
- gzFile file;
- int level;
- int strategy;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
- /* Make room to allow flushing */
- if (s->stream.avail_out == 0) {
-
- s->stream.next_out = s->outbuf;
- if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
- s->z_err = Z_ERRNO;
- }
- s->stream.avail_out = Z_BUFSIZE;
- }
-
- return deflateParams (&(s->stream), level, strategy);
-}
-
-/* ===========================================================================
- Read a byte from a gz_stream; update next_in and avail_in. Return EOF
- for end of file.
- IN assertion: the stream s has been sucessfully opened for reading.
-*/
-local int get_byte(s)
- gz_stream *s;
-{
- if (s->z_eof) return EOF;
- if (s->stream.avail_in == 0) {
- errno = 0;
- s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file);
- if (s->stream.avail_in == 0) {
- s->z_eof = 1;
- if (ferror(s->file)) s->z_err = Z_ERRNO;
- return EOF;
- }
- s->stream.next_in = s->inbuf;
- }
- s->stream.avail_in--;
- return *(s->stream.next_in)++;
-}
-
-/* ===========================================================================
- Check the gzip header of a gz_stream opened for reading. Set the stream
- mode to transparent if the gzip magic header is not present; set s->err
- to Z_DATA_ERROR if the magic header is present but the rest of the header
- is incorrect.
- IN assertion: the stream s has already been created sucessfully;
- s->stream.avail_in is zero for the first time, but may be non-zero
- for concatenated .gz files.
-*/
-local void check_header(s)
- gz_stream *s;
-{
- int method; /* method byte */
- int flags; /* flags byte */
- uInt len;
- int c;
-
- /* Assure two bytes in the buffer so we can peek ahead -- handle case
- where first byte of header is at the end of the buffer after the last
- gzip segment */
- len = s->stream.avail_in;
- if (len < 2) {
- if (len) s->inbuf[0] = s->stream.next_in[0];
- errno = 0;
- len = (uInt)fread(s->inbuf + len, 1, Z_BUFSIZE >> len, s->file);
- if (len == 0 && ferror(s->file)) s->z_err = Z_ERRNO;
- s->stream.avail_in += len;
- s->stream.next_in = s->inbuf;
- if (s->stream.avail_in < 2) {
- s->transparent = s->stream.avail_in;
- return;
- }
- }
-
- /* Peek ahead to check the gzip magic header */
- if (s->stream.next_in[0] != gz_magic[0] ||
- s->stream.next_in[1] != gz_magic[1]) {
- s->transparent = 1;
- return;
- }
- s->stream.avail_in -= 2;
- s->stream.next_in += 2;
-
- /* Check the rest of the gzip header */
- method = get_byte(s);
- flags = get_byte(s);
- if (method != Z_DEFLATED || (flags & RESERVED) != 0) {
- s->z_err = Z_DATA_ERROR;
- return;
- }
-
- /* Discard time, xflags and OS code: */
- for (len = 0; len < 6; len++) (void)get_byte(s);
-
- if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */
- len = (uInt)get_byte(s);
- len += ((uInt)get_byte(s))<<8;
- /* len is garbage if EOF but the loop below will quit anyway */
- while (len-- != 0 && get_byte(s) != EOF) ;
- }
- if ((flags & ORIG_NAME) != 0) { /* skip the original file name */
- while ((c = get_byte(s)) != 0 && c != EOF) ;
- }
- if ((flags & COMMENT) != 0) { /* skip the .gz file comment */
- while ((c = get_byte(s)) != 0 && c != EOF) ;
- }
- if ((flags & HEAD_CRC) != 0) { /* skip the header crc */
- for (len = 0; len < 2; len++) (void)get_byte(s);
- }
- s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK;
-}
-
- /* ===========================================================================
- * Cleanup then free the given gz_stream. Return a zlib error code.
- Try freeing in the reverse order of allocations.
- */
-local int destroy (s)
- gz_stream *s;
-{
- int err = Z_OK;
-
- if (!s) return Z_STREAM_ERROR;
-
- TRYFREE(s->msg);
-
- if (s->stream.state != NULL) {
- if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
- err = Z_STREAM_ERROR;
-#else
- err = deflateEnd(&(s->stream));
-#endif
- } else if (s->mode == 'r') {
- err = inflateEnd(&(s->stream));
- }
- }
- if (s->file != NULL && fclose(s->file)) {
-#ifdef ESPIPE
- if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */
-#endif
- err = Z_ERRNO;
- }
- if (s->z_err < 0) err = s->z_err;
-
- TRYFREE(s->inbuf);
- TRYFREE(s->outbuf);
- TRYFREE(s->path);
- TRYFREE(s);
- return err;
-}
-
-/* ===========================================================================
- Reads the given number of uncompressed bytes from the compressed file.
- gzread returns the number of bytes actually read (0 for end of file).
-*/
-int ZEXPORT gzread (file, buf, len)
- gzFile file;
- voidp buf;
- unsigned len;
-{
- gz_stream *s = (gz_stream*)file;
- Bytef *start = (Bytef*)buf; /* starting point for crc computation */
- Byte *next_out; /* == stream.next_out but not forced far (for MSDOS) */
-
- if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR;
-
- if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1;
- if (s->z_err == Z_STREAM_END) return 0; /* EOF */
-
- next_out = (Byte*)buf;
- s->stream.next_out = (Bytef*)buf;
- s->stream.avail_out = len;
-
- if (s->stream.avail_out && s->back != EOF) {
- *next_out++ = s->back;
- s->stream.next_out++;
- s->stream.avail_out--;
- s->back = EOF;
- s->out++;
- start++;
- if (s->last) {
- s->z_err = Z_STREAM_END;
- return 1;
- }
- }
-
- while (s->stream.avail_out != 0) {
-
- if (s->transparent) {
- /* Copy first the lookahead bytes: */
- uInt n = s->stream.avail_in;
- if (n > s->stream.avail_out) n = s->stream.avail_out;
- if (n > 0) {
- zmemcpy(s->stream.next_out, s->stream.next_in, n);
- next_out += n;
- s->stream.next_out = next_out;
- s->stream.next_in += n;
- s->stream.avail_out -= n;
- s->stream.avail_in -= n;
- }
- if (s->stream.avail_out > 0) {
- s->stream.avail_out -=
- (uInt)fread(next_out, 1, s->stream.avail_out, s->file);
- }
- len -= s->stream.avail_out;
- s->in += len;
- s->out += len;
- if (len == 0) s->z_eof = 1;
- return (int)len;
- }
- if (s->stream.avail_in == 0 && !s->z_eof) {
-
- errno = 0;
- s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file);
- if (s->stream.avail_in == 0) {
- s->z_eof = 1;
- if (ferror(s->file)) {
- s->z_err = Z_ERRNO;
- break;
- }
- }
- s->stream.next_in = s->inbuf;
- }
- s->in += s->stream.avail_in;
- s->out += s->stream.avail_out;
- s->z_err = inflate(&(s->stream), Z_NO_FLUSH);
- s->in -= s->stream.avail_in;
- s->out -= s->stream.avail_out;
-
- if (s->z_err == Z_STREAM_END) {
- /* Check CRC and original size */
- s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
- start = s->stream.next_out;
-
- if (getLong(s) != s->crc) {
- s->z_err = Z_DATA_ERROR;
- } else {
- (void)getLong(s);
- /* The uncompressed length returned by above getlong() may be
- * different from s->out in case of concatenated .gz files.
- * Check for such files:
- */
- check_header(s);
- if (s->z_err == Z_OK) {
- inflateReset(&(s->stream));
- s->crc = crc32(0L, Z_NULL, 0);
- }
- }
- }
- if (s->z_err != Z_OK || s->z_eof) break;
- }
- s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
-
- if (len == s->stream.avail_out &&
- (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO))
- return -1;
- return (int)(len - s->stream.avail_out);
-}
-
-
-/* ===========================================================================
- Reads one byte from the compressed file. gzgetc returns this byte
- or -1 in case of end of file or error.
-*/
-int ZEXPORT gzgetc(file)
- gzFile file;
-{
- unsigned char c;
-
- return gzread(file, &c, 1) == 1 ? c : -1;
-}
-
-
-/* ===========================================================================
- Push one byte back onto the stream.
-*/
-int ZEXPORT gzungetc(c, file)
- int c;
- gzFile file;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL || s->mode != 'r' || c == EOF || s->back != EOF) return EOF;
- s->back = c;
- s->out--;
- s->last = (s->z_err == Z_STREAM_END);
- if (s->last) s->z_err = Z_OK;
- s->z_eof = 0;
- return c;
-}
-
-
-/* ===========================================================================
- Reads bytes from the compressed file until len-1 characters are
- read, or a newline character is read and transferred to buf, or an
- end-of-file condition is encountered. The string is then terminated
- with a null character.
- gzgets returns buf, or Z_NULL in case of error.
-
- The current implementation is not optimized at all.
-*/
-char * ZEXPORT gzgets(file, buf, len)
- gzFile file;
- char *buf;
- int len;
-{
- char *b = buf;
- if (buf == Z_NULL || len <= 0) return Z_NULL;
-
- while (--len > 0 && gzread(file, buf, 1) == 1 && *buf++ != '\n') ;
- *buf = '\0';
- return b == buf && len > 0 ? Z_NULL : b;
-}
-
-
-#ifndef NO_GZCOMPRESS
-/* ===========================================================================
- Writes the given number of uncompressed bytes into the compressed file.
- gzwrite returns the number of bytes actually written (0 in case of error).
-*/
-int ZEXPORT gzwrite (file, buf, len)
- gzFile file;
- voidpc buf;
- unsigned len;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
- s->stream.next_in = (Bytef*)buf;
- s->stream.avail_in = len;
-
- while (s->stream.avail_in != 0) {
-
- if (s->stream.avail_out == 0) {
-
- s->stream.next_out = s->outbuf;
- if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
- s->z_err = Z_ERRNO;
- break;
- }
- s->stream.avail_out = Z_BUFSIZE;
- }
- s->in += s->stream.avail_in;
- s->out += s->stream.avail_out;
- s->z_err = deflate(&(s->stream), Z_NO_FLUSH);
- s->in -= s->stream.avail_in;
- s->out -= s->stream.avail_out;
- if (s->z_err != Z_OK) break;
- }
- s->crc = crc32(s->crc, (const Bytef *)buf, len);
-
- return (int)(len - s->stream.avail_in);
-}
-
-
-/* ===========================================================================
- Converts, formats, and writes the args to the compressed file under
- control of the format string, as in fprintf. gzprintf returns the number of
- uncompressed bytes actually written (0 in case of error).
-*/
-#ifdef STDC
-#include <stdarg.h>
-
-int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...)
-{
- char buf[Z_PRINTF_BUFSIZE];
- va_list va;
- int len;
-
- buf[sizeof(buf) - 1] = 0;
- va_start(va, format);
-#ifdef NO_vsnprintf
-# ifdef HAS_vsprintf_void
- (void)vsprintf(buf, format, va);
- va_end(va);
- for (len = 0; len < sizeof(buf); len++)
- if (buf[len] == 0) break;
-# else
- len = vsprintf(buf, format, va);
- va_end(va);
-# endif
-#else
-# ifdef HAS_vsnprintf_void
- (void)vsnprintf(buf, sizeof(buf), format, va);
- va_end(va);
- len = strlen(buf);
-# else
- len = vsnprintf(buf, sizeof(buf), format, va);
- va_end(va);
-# endif
-#endif
- if (len <= 0 || len >= (int)sizeof(buf) || buf[sizeof(buf) - 1] != 0)
- return 0;
- return gzwrite(file, buf, (unsigned)len);
-}
-#else /* not ANSI C */
-
-int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
- a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
- gzFile file;
- const char *format;
- int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
- a11, a12, a13, a14, a15, a16, a17, a18, a19, a20;
-{
- char buf[Z_PRINTF_BUFSIZE];
- int len;
-
- buf[sizeof(buf) - 1] = 0;
-#ifdef NO_snprintf
-# ifdef HAS_sprintf_void
- sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,
- a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
- for (len = 0; len < sizeof(buf); len++)
- if (buf[len] == 0) break;
-# else
- len = sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,
- a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-# endif
-#else
-# ifdef HAS_snprintf_void
- snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8,
- a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
- len = strlen(buf);
-# else
- len = snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8,
- a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-# endif
-#endif
- if (len <= 0 || len >= sizeof(buf) || buf[sizeof(buf) - 1] != 0)
- return 0;
- return gzwrite(file, buf, len);
-}
-#endif
-
-/* ===========================================================================
- Writes c, converted to an unsigned char, into the compressed file.
- gzputc returns the value that was written, or -1 in case of error.
-*/
-int ZEXPORT gzputc(file, c)
- gzFile file;
- int c;
-{
- unsigned char cc = (unsigned char) c; /* required for big endian systems */
-
- return gzwrite(file, &cc, 1) == 1 ? (int)cc : -1;
-}
-
-
-/* ===========================================================================
- Writes the given null-terminated string to the compressed file, excluding
- the terminating null character.
- gzputs returns the number of characters written, or -1 in case of error.
-*/
-int ZEXPORT gzputs(file, s)
- gzFile file;
- const char *s;
-{
- return gzwrite(file, (char*)s, (unsigned)strlen(s));
-}
-
-
-/* ===========================================================================
- Flushes all pending output into the compressed file. The parameter
- flush is as in the deflate() function.
-*/
-local int do_flush (file, flush)
- gzFile file;
- int flush;
-{
- uInt len;
- int done = 0;
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
- s->stream.avail_in = 0; /* should be zero already anyway */
-
- for (;;) {
- len = Z_BUFSIZE - s->stream.avail_out;
-
- if (len != 0) {
- if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) {
- s->z_err = Z_ERRNO;
- return Z_ERRNO;
- }
- s->stream.next_out = s->outbuf;
- s->stream.avail_out = Z_BUFSIZE;
- }
- if (done) break;
- s->out += s->stream.avail_out;
- s->z_err = deflate(&(s->stream), flush);
- s->out -= s->stream.avail_out;
-
- /* Ignore the second of two consecutive flushes: */
- if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK;
-
- /* deflate has finished flushing only when it hasn't used up
- * all the available space in the output buffer:
- */
- done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END);
-
- if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break;
- }
- return s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
-}
-
-int ZEXPORT gzflush (file, flush)
- gzFile file;
- int flush;
-{
- gz_stream *s = (gz_stream*)file;
- int err = do_flush (file, flush);
-
- if (err) return err;
- fflush(s->file);
- return s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
-}
-#endif /* NO_GZCOMPRESS */
-
-/* ===========================================================================
- Sets the starting position for the next gzread or gzwrite on the given
- compressed file. The offset represents a number of bytes in the
- gzseek returns the resulting offset location as measured in bytes from
- the beginning of the uncompressed stream, or -1 in case of error.
- SEEK_END is not implemented, returns error.
- In this version of the library, gzseek can be extremely slow.
-*/
-z_off_t ZEXPORT gzseek (file, offset, whence)
- gzFile file;
- z_off_t offset;
- int whence;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL || whence == SEEK_END ||
- s->z_err == Z_ERRNO || s->z_err == Z_DATA_ERROR) {
- return -1L;
- }
-
- if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
- return -1L;
-#else
- if (whence == SEEK_SET) {
- offset -= s->in;
- }
- if (offset < 0) return -1L;
-
- /* At this point, offset is the number of zero bytes to write. */
- if (s->inbuf == Z_NULL) {
- s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */
- if (s->inbuf == Z_NULL) return -1L;
- zmemzero(s->inbuf, Z_BUFSIZE);
- }
- while (offset > 0) {
- uInt size = Z_BUFSIZE;
- if (offset < Z_BUFSIZE) size = (uInt)offset;
-
- size = gzwrite(file, s->inbuf, size);
- if (size == 0) return -1L;
-
- offset -= size;
- }
- return s->in;
-#endif
- }
- /* Rest of function is for reading only */
-
- /* compute absolute position */
- if (whence == SEEK_CUR) {
- offset += s->out;
- }
- if (offset < 0) return -1L;
-
- if (s->transparent) {
- /* map to fseek */
- s->back = EOF;
- s->stream.avail_in = 0;
- s->stream.next_in = s->inbuf;
- if (fseek(s->file, offset, SEEK_SET) < 0) return -1L;
-
- s->in = s->out = offset;
- return offset;
- }
-
- /* For a negative seek, rewind and use positive seek */
- if (offset >= s->out) {
- offset -= s->out;
- } else if (gzrewind(file) < 0) {
- return -1L;
- }
- /* offset is now the number of bytes to skip. */
-
- if (offset != 0 && s->outbuf == Z_NULL) {
- s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
- if (s->outbuf == Z_NULL) return -1L;
- }
- if (offset && s->back != EOF) {
- s->back = EOF;
- s->out++;
- offset--;
- if (s->last) s->z_err = Z_STREAM_END;
- }
- while (offset > 0) {
- int size = Z_BUFSIZE;
- if (offset < Z_BUFSIZE) size = (int)offset;
-
- size = gzread(file, s->outbuf, (uInt)size);
- if (size <= 0) return -1L;
- offset -= size;
- }
- return s->out;
-}
-
-/* ===========================================================================
- Rewinds input file.
-*/
-int ZEXPORT gzrewind (file)
- gzFile file;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL || s->mode != 'r') return -1;
-
- s->z_err = Z_OK;
- s->z_eof = 0;
- s->back = EOF;
- s->stream.avail_in = 0;
- s->stream.next_in = s->inbuf;
- s->crc = crc32(0L, Z_NULL, 0);
- if (!s->transparent) (void)inflateReset(&s->stream);
- s->in = 0;
- s->out = 0;
- return fseek(s->file, s->start, SEEK_SET);
-}
-
-/* ===========================================================================
- Returns the starting position for the next gzread or gzwrite on the
- given compressed file. This position represents a number of bytes in the
- uncompressed data stream.
-*/
-z_off_t ZEXPORT gztell (file)
- gzFile file;
-{
- return gzseek(file, 0L, SEEK_CUR);
-}
-
-/* ===========================================================================
- Returns 1 when EOF has previously been detected reading the given
- input stream, otherwise zero.
-*/
-int ZEXPORT gzeof (file)
- gzFile file;
-{
- gz_stream *s = (gz_stream*)file;
-
- /* With concatenated compressed files that can have embedded
- * crc trailers, z_eof is no longer the only/best indicator of EOF
- * on a gz_stream. Handle end-of-stream error explicitly here.
- */
- if (s == NULL || s->mode != 'r') return 0;
- if (s->z_eof) return 1;
- return s->z_err == Z_STREAM_END;
-}
-
-/* ===========================================================================
- Returns 1 if reading and doing so transparently, otherwise zero.
-*/
-int ZEXPORT gzdirect (file)
- gzFile file;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL || s->mode != 'r') return 0;
- return s->transparent;
-}
-
-/* ===========================================================================
- Outputs a long in LSB order to the given file
-*/
-local void putLong (file, x)
- FILE *file;
- uLong x;
-{
- int n;
- for (n = 0; n < 4; n++) {
- fputc((int)(x & 0xff), file);
- x >>= 8;
- }
-}
-
-/* ===========================================================================
- Reads a long in LSB order from the given gz_stream. Sets z_err in case
- of error.
-*/
-local uLong getLong (s)
- gz_stream *s;
-{
- uLong x = (uLong)get_byte(s);
- int c;
-
- x += ((uLong)get_byte(s))<<8;
- x += ((uLong)get_byte(s))<<16;
- c = get_byte(s);
- if (c == EOF) s->z_err = Z_DATA_ERROR;
- x += ((uLong)c)<<24;
- return x;
-}
-
-/* ===========================================================================
- Flushes all pending output if necessary, closes the compressed file
- and deallocates all the (de)compression state.
-*/
-int ZEXPORT gzclose (file)
- gzFile file;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL) return Z_STREAM_ERROR;
-
- if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
- return Z_STREAM_ERROR;
-#else
- if (do_flush (file, Z_FINISH) != Z_OK)
- return destroy((gz_stream*)file);
-
- putLong (s->file, s->crc);
- putLong (s->file, (uLong)(s->in & 0xffffffff));
-#endif
- }
- return destroy((gz_stream*)file);
-}
-
-#ifdef STDC
-# define zstrerror(errnum) strerror(errnum)
-#else
-# define zstrerror(errnum) ""
-#endif
-
-/* ===========================================================================
- Returns the error message for the last error which occurred on the
- given compressed file. errnum is set to zlib error number. If an
- error occurred in the file system and not in the compression library,
- errnum is set to Z_ERRNO and the application may consult errno
- to get the exact error code.
-*/
-const char * ZEXPORT gzerror (file, errnum)
- gzFile file;
- int *errnum;
-{
- char *m;
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL) {
- *errnum = Z_STREAM_ERROR;
- return (const char*)ERR_MSG(Z_STREAM_ERROR);
- }
- *errnum = s->z_err;
- if (*errnum == Z_OK) return (const char*)"";
-
- m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg);
-
- if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err);
-
- TRYFREE(s->msg);
- s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3);
- if (s->msg == Z_NULL) return (const char*)ERR_MSG(Z_MEM_ERROR);
- strcpy(s->msg, s->path);
- strcat(s->msg, ": ");
- strcat(s->msg, m);
- return (const char*)s->msg;
-}
-
-/* ===========================================================================
- Clear the error and end-of-file flags, and do the same for the real file.
-*/
-void ZEXPORT gzclearerr (file)
- gzFile file;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL) return;
- if (s->z_err != Z_STREAM_END) s->z_err = Z_OK;
- s->z_eof = 0;
- clearerr(s->file);
-}
diff --git a/WebCore/platform/image-decoders/zlib/infback.c b/WebCore/platform/image-decoders/zlib/infback.c
deleted file mode 100644
index 455dbc9..0000000
--- a/WebCore/platform/image-decoders/zlib/infback.c
+++ /dev/null
@@ -1,623 +0,0 @@
-/* infback.c -- inflate using a call-back interface
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- This code is largely copied from inflate.c. Normally either infback.o or
- inflate.o would be linked into an application--not both. The interface
- with inffast.c is retained so that optimized assembler-coded versions of
- inflate_fast() can be used with either inflate.c or infback.c.
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-/* function prototypes */
-local void fixedtables OF((struct inflate_state FAR *state));
-
-/*
- strm provides memory allocation functions in zalloc and zfree, or
- Z_NULL to use the library memory allocation functions.
-
- windowBits is in the range 8..15, and window is a user-supplied
- window and output buffer that is 2**windowBits bytes.
- */
-int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size)
-z_streamp strm;
-int windowBits;
-unsigned char FAR *window;
-const char *version;
-int stream_size;
-{
- struct inflate_state FAR *state;
-
- if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
- stream_size != (int)(sizeof(z_stream)))
- return Z_VERSION_ERROR;
- if (strm == Z_NULL || window == Z_NULL ||
- windowBits < 8 || windowBits > 15)
- return Z_STREAM_ERROR;
- strm->msg = Z_NULL; /* in case we return an error */
- if (strm->zalloc == (alloc_func)0) {
- strm->zalloc = zcalloc;
- strm->opaque = (voidpf)0;
- }
- if (strm->zfree == (free_func)0) strm->zfree = zcfree;
- state = (struct inflate_state FAR *)ZALLOC(strm, 1,
- sizeof(struct inflate_state));
- if (state == Z_NULL) return Z_MEM_ERROR;
- Tracev((stderr, "inflate: allocated\n"));
- strm->state = (struct internal_state FAR *)state;
- state->dmax = 32768U;
- state->wbits = windowBits;
- state->wsize = 1U << windowBits;
- state->window = window;
- state->write = 0;
- state->whave = 0;
- return Z_OK;
-}
-
-/*
- Return state with length and distance decoding tables and index sizes set to
- fixed code decoding. Normally this returns fixed tables from inffixed.h.
- If BUILDFIXED is defined, then instead this routine builds the tables the
- first time it's called, and returns those tables the first time and
- thereafter. This reduces the size of the code by about 2K bytes, in
- exchange for a little execution time. However, BUILDFIXED should not be
- used for threaded applications, since the rewriting of the tables and virgin
- may not be thread-safe.
- */
-local void fixedtables(state)
-struct inflate_state FAR *state;
-{
-#ifdef BUILDFIXED
- static int virgin = 1;
- static code *lenfix, *distfix;
- static code fixed[544];
-
- /* build fixed huffman tables if first call (may not be thread safe) */
- if (virgin) {
- unsigned sym, bits;
- static code *next;
-
- /* literal/length table */
- sym = 0;
- while (sym < 144) state->lens[sym++] = 8;
- while (sym < 256) state->lens[sym++] = 9;
- while (sym < 280) state->lens[sym++] = 7;
- while (sym < 288) state->lens[sym++] = 8;
- next = fixed;
- lenfix = next;
- bits = 9;
- inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
-
- /* distance table */
- sym = 0;
- while (sym < 32) state->lens[sym++] = 5;
- distfix = next;
- bits = 5;
- inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
-
- /* do this just once */
- virgin = 0;
- }
-#else /* !BUILDFIXED */
-# include "inffixed.h"
-#endif /* BUILDFIXED */
- state->lencode = lenfix;
- state->lenbits = 9;
- state->distcode = distfix;
- state->distbits = 5;
-}
-
-/* Macros for inflateBack(): */
-
-/* Load returned state from inflate_fast() */
-#define LOAD() \
- do { \
- put = strm->next_out; \
- left = strm->avail_out; \
- next = strm->next_in; \
- have = strm->avail_in; \
- hold = state->hold; \
- bits = state->bits; \
- } while (0)
-
-/* Set state from registers for inflate_fast() */
-#define RESTORE() \
- do { \
- strm->next_out = put; \
- strm->avail_out = left; \
- strm->next_in = next; \
- strm->avail_in = have; \
- state->hold = hold; \
- state->bits = bits; \
- } while (0)
-
-/* Clear the input bit accumulator */
-#define INITBITS() \
- do { \
- hold = 0; \
- bits = 0; \
- } while (0)
-
-/* Assure that some input is available. If input is requested, but denied,
- then return a Z_BUF_ERROR from inflateBack(). */
-#define PULL() \
- do { \
- if (have == 0) { \
- have = in(in_desc, &next); \
- if (have == 0) { \
- next = Z_NULL; \
- ret = Z_BUF_ERROR; \
- goto inf_leave; \
- } \
- } \
- } while (0)
-
-/* Get a byte of input into the bit accumulator, or return from inflateBack()
- with an error if there is no input available. */
-#define PULLBYTE() \
- do { \
- PULL(); \
- have--; \
- hold += (unsigned long)(*next++) << bits; \
- bits += 8; \
- } while (0)
-
-/* Assure that there are at least n bits in the bit accumulator. If there is
- not enough available input to do that, then return from inflateBack() with
- an error. */
-#define NEEDBITS(n) \
- do { \
- while (bits < (unsigned)(n)) \
- PULLBYTE(); \
- } while (0)
-
-/* Return the low n bits of the bit accumulator (n < 16) */
-#define BITS(n) \
- ((unsigned)hold & ((1U << (n)) - 1))
-
-/* Remove n bits from the bit accumulator */
-#define DROPBITS(n) \
- do { \
- hold >>= (n); \
- bits -= (unsigned)(n); \
- } while (0)
-
-/* Remove zero to seven bits as needed to go to a byte boundary */
-#define BYTEBITS() \
- do { \
- hold >>= bits & 7; \
- bits -= bits & 7; \
- } while (0)
-
-/* Assure that some output space is available, by writing out the window
- if it's full. If the write fails, return from inflateBack() with a
- Z_BUF_ERROR. */
-#define ROOM() \
- do { \
- if (left == 0) { \
- put = state->window; \
- left = state->wsize; \
- state->whave = left; \
- if (out(out_desc, put, left)) { \
- ret = Z_BUF_ERROR; \
- goto inf_leave; \
- } \
- } \
- } while (0)
-
-/*
- strm provides the memory allocation functions and window buffer on input,
- and provides information on the unused input on return. For Z_DATA_ERROR
- returns, strm will also provide an error message.
-
- in() and out() are the call-back input and output functions. When
- inflateBack() needs more input, it calls in(). When inflateBack() has
- filled the window with output, or when it completes with data in the
- window, it calls out() to write out the data. The application must not
- change the provided input until in() is called again or inflateBack()
- returns. The application must not change the window/output buffer until
- inflateBack() returns.
-
- in() and out() are called with a descriptor parameter provided in the
- inflateBack() call. This parameter can be a structure that provides the
- information required to do the read or write, as well as accumulated
- information on the input and output such as totals and check values.
-
- in() should return zero on failure. out() should return non-zero on
- failure. If either in() or out() fails, than inflateBack() returns a
- Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it
- was in() or out() that caused in the error. Otherwise, inflateBack()
- returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format
- error, or Z_MEM_ERROR if it could not allocate memory for the state.
- inflateBack() can also return Z_STREAM_ERROR if the input parameters
- are not correct, i.e. strm is Z_NULL or the state was not initialized.
- */
-int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc)
-z_streamp strm;
-in_func in;
-void FAR *in_desc;
-out_func out;
-void FAR *out_desc;
-{
- struct inflate_state FAR *state;
- unsigned char FAR *next; /* next input */
- unsigned char FAR *put; /* next output */
- unsigned have, left; /* available input and output */
- unsigned long hold; /* bit buffer */
- unsigned bits; /* bits in bit buffer */
- unsigned copy; /* number of stored or match bytes to copy */
- unsigned char FAR *from; /* where to copy match bytes from */
- code this; /* current decoding table entry */
- code last; /* parent table entry */
- unsigned len; /* length to copy for repeats, bits to drop */
- int ret; /* return code */
- static const unsigned short order[19] = /* permutation of code lengths */
- {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
- /* Check that the strm exists and that the state was initialized */
- if (strm == Z_NULL || strm->state == Z_NULL)
- return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
-
- /* Reset the state */
- strm->msg = Z_NULL;
- state->mode = TYPE;
- state->last = 0;
- state->whave = 0;
- next = strm->next_in;
- have = next != Z_NULL ? strm->avail_in : 0;
- hold = 0;
- bits = 0;
- put = state->window;
- left = state->wsize;
-
- /* Inflate until end of block marked as last */
- for (;;)
- switch (state->mode) {
- case TYPE:
- /* determine and dispatch block type */
- if (state->last) {
- BYTEBITS();
- state->mode = DONE;
- break;
- }
- NEEDBITS(3);
- state->last = BITS(1);
- DROPBITS(1);
- switch (BITS(2)) {
- case 0: /* stored block */
- Tracev((stderr, "inflate: stored block%s\n",
- state->last ? " (last)" : ""));
- state->mode = STORED;
- break;
- case 1: /* fixed block */
- fixedtables(state);
- Tracev((stderr, "inflate: fixed codes block%s\n",
- state->last ? " (last)" : ""));
- state->mode = LEN; /* decode codes */
- break;
- case 2: /* dynamic block */
- Tracev((stderr, "inflate: dynamic codes block%s\n",
- state->last ? " (last)" : ""));
- state->mode = TABLE;
- break;
- case 3:
- strm->msg = (char *)"invalid block type";
- state->mode = BAD;
- }
- DROPBITS(2);
- break;
-
- case STORED:
- /* get and verify stored block length */
- BYTEBITS(); /* go to byte boundary */
- NEEDBITS(32);
- if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
- strm->msg = (char *)"invalid stored block lengths";
- state->mode = BAD;
- break;
- }
- state->length = (unsigned)hold & 0xffff;
- Tracev((stderr, "inflate: stored length %u\n",
- state->length));
- INITBITS();
-
- /* copy stored block from input to output */
- while (state->length != 0) {
- copy = state->length;
- PULL();
- ROOM();
- if (copy > have) copy = have;
- if (copy > left) copy = left;
- zmemcpy(put, next, copy);
- have -= copy;
- next += copy;
- left -= copy;
- put += copy;
- state->length -= copy;
- }
- Tracev((stderr, "inflate: stored end\n"));
- state->mode = TYPE;
- break;
-
- case TABLE:
- /* get dynamic table entries descriptor */
- NEEDBITS(14);
- state->nlen = BITS(5) + 257;
- DROPBITS(5);
- state->ndist = BITS(5) + 1;
- DROPBITS(5);
- state->ncode = BITS(4) + 4;
- DROPBITS(4);
-#ifndef PKZIP_BUG_WORKAROUND
- if (state->nlen > 286 || state->ndist > 30) {
- strm->msg = (char *)"too many length or distance symbols";
- state->mode = BAD;
- break;
- }
-#endif
- Tracev((stderr, "inflate: table sizes ok\n"));
-
- /* get code length code lengths (not a typo) */
- state->have = 0;
- while (state->have < state->ncode) {
- NEEDBITS(3);
- state->lens[order[state->have++]] = (unsigned short)BITS(3);
- DROPBITS(3);
- }
- while (state->have < 19)
- state->lens[order[state->have++]] = 0;
- state->next = state->codes;
- state->lencode = (code const FAR *)(state->next);
- state->lenbits = 7;
- ret = inflate_table(CODES, state->lens, 19, &(state->next),
- &(state->lenbits), state->work);
- if (ret) {
- strm->msg = (char *)"invalid code lengths set";
- state->mode = BAD;
- break;
- }
- Tracev((stderr, "inflate: code lengths ok\n"));
-
- /* get length and distance code code lengths */
- state->have = 0;
- while (state->have < state->nlen + state->ndist) {
- for (;;) {
- this = state->lencode[BITS(state->lenbits)];
- if ((unsigned)(this.bits) <= bits) break;
- PULLBYTE();
- }
- if (this.val < 16) {
- NEEDBITS(this.bits);
- DROPBITS(this.bits);
- state->lens[state->have++] = this.val;
- }
- else {
- if (this.val == 16) {
- NEEDBITS(this.bits + 2);
- DROPBITS(this.bits);
- if (state->have == 0) {
- strm->msg = (char *)"invalid bit length repeat";
- state->mode = BAD;
- break;
- }
- len = (unsigned)(state->lens[state->have - 1]);
- copy = 3 + BITS(2);
- DROPBITS(2);
- }
- else if (this.val == 17) {
- NEEDBITS(this.bits + 3);
- DROPBITS(this.bits);
- len = 0;
- copy = 3 + BITS(3);
- DROPBITS(3);
- }
- else {
- NEEDBITS(this.bits + 7);
- DROPBITS(this.bits);
- len = 0;
- copy = 11 + BITS(7);
- DROPBITS(7);
- }
- if (state->have + copy > state->nlen + state->ndist) {
- strm->msg = (char *)"invalid bit length repeat";
- state->mode = BAD;
- break;
- }
- while (copy--)
- state->lens[state->have++] = (unsigned short)len;
- }
- }
-
- /* handle error breaks in while */
- if (state->mode == BAD) break;
-
- /* build code tables */
- state->next = state->codes;
- state->lencode = (code const FAR *)(state->next);
- state->lenbits = 9;
- ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
- &(state->lenbits), state->work);
- if (ret) {
- strm->msg = (char *)"invalid literal/lengths set";
- state->mode = BAD;
- break;
- }
- state->distcode = (code const FAR *)(state->next);
- state->distbits = 6;
- ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
- &(state->next), &(state->distbits), state->work);
- if (ret) {
- strm->msg = (char *)"invalid distances set";
- state->mode = BAD;
- break;
- }
- Tracev((stderr, "inflate: codes ok\n"));
- state->mode = LEN;
-
- case LEN:
- /* use inflate_fast() if we have enough input and output */
- if (have >= 6 && left >= 258) {
- RESTORE();
- if (state->whave < state->wsize)
- state->whave = state->wsize - left;
- inflate_fast(strm, state->wsize);
- LOAD();
- break;
- }
-
- /* get a literal, length, or end-of-block code */
- for (;;) {
- this = state->lencode[BITS(state->lenbits)];
- if ((unsigned)(this.bits) <= bits) break;
- PULLBYTE();
- }
- if (this.op && (this.op & 0xf0) == 0) {
- last = this;
- for (;;) {
- this = state->lencode[last.val +
- (BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + this.bits) <= bits) break;
- PULLBYTE();
- }
- DROPBITS(last.bits);
- }
- DROPBITS(this.bits);
- state->length = (unsigned)this.val;
-
- /* process literal */
- if (this.op == 0) {
- Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
- "inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", this.val));
- ROOM();
- *put++ = (unsigned char)(state->length);
- left--;
- state->mode = LEN;
- break;
- }
-
- /* process end of block */
- if (this.op & 32) {
- Tracevv((stderr, "inflate: end of block\n"));
- state->mode = TYPE;
- break;
- }
-
- /* invalid code */
- if (this.op & 64) {
- strm->msg = (char *)"invalid literal/length code";
- state->mode = BAD;
- break;
- }
-
- /* length code -- get extra bits, if any */
- state->extra = (unsigned)(this.op) & 15;
- if (state->extra != 0) {
- NEEDBITS(state->extra);
- state->length += BITS(state->extra);
- DROPBITS(state->extra);
- }
- Tracevv((stderr, "inflate: length %u\n", state->length));
-
- /* get distance code */
- for (;;) {
- this = state->distcode[BITS(state->distbits)];
- if ((unsigned)(this.bits) <= bits) break;
- PULLBYTE();
- }
- if ((this.op & 0xf0) == 0) {
- last = this;
- for (;;) {
- this = state->distcode[last.val +
- (BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + this.bits) <= bits) break;
- PULLBYTE();
- }
- DROPBITS(last.bits);
- }
- DROPBITS(this.bits);
- if (this.op & 64) {
- strm->msg = (char *)"invalid distance code";
- state->mode = BAD;
- break;
- }
- state->offset = (unsigned)this.val;
-
- /* get distance extra bits, if any */
- state->extra = (unsigned)(this.op) & 15;
- if (state->extra != 0) {
- NEEDBITS(state->extra);
- state->offset += BITS(state->extra);
- DROPBITS(state->extra);
- }
- if (state->offset > state->wsize - (state->whave < state->wsize ?
- left : 0)) {
- strm->msg = (char *)"invalid distance too far back";
- state->mode = BAD;
- break;
- }
- Tracevv((stderr, "inflate: distance %u\n", state->offset));
-
- /* copy match from window to output */
- do {
- ROOM();
- copy = state->wsize - state->offset;
- if (copy < left) {
- from = put + copy;
- copy = left - copy;
- }
- else {
- from = put - state->offset;
- copy = left;
- }
- if (copy > state->length) copy = state->length;
- state->length -= copy;
- left -= copy;
- do {
- *put++ = *from++;
- } while (--copy);
- } while (state->length != 0);
- break;
-
- case DONE:
- /* inflate stream terminated properly -- write leftover output */
- ret = Z_STREAM_END;
- if (left < state->wsize) {
- if (out(out_desc, state->window, state->wsize - left))
- ret = Z_BUF_ERROR;
- }
- goto inf_leave;
-
- case BAD:
- ret = Z_DATA_ERROR;
- goto inf_leave;
-
- default: /* can't happen, but makes compilers happy */
- ret = Z_STREAM_ERROR;
- goto inf_leave;
- }
-
- /* Return unused input */
- inf_leave:
- strm->next_in = next;
- strm->avail_in = have;
- return ret;
-}
-
-int ZEXPORT inflateBackEnd(strm)
-z_streamp strm;
-{
- if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
- return Z_STREAM_ERROR;
- ZFREE(strm, strm->state);
- strm->state = Z_NULL;
- Tracev((stderr, "inflate: end\n"));
- return Z_OK;
-}
diff --git a/WebCore/platform/image-decoders/zlib/inffast.c b/WebCore/platform/image-decoders/zlib/inffast.c
deleted file mode 100644
index bbee92e..0000000
--- a/WebCore/platform/image-decoders/zlib/inffast.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/* inffast.c -- fast decoding
- * Copyright (C) 1995-2004 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-#ifndef ASMINF
-
-/* Allow machine dependent optimization for post-increment or pre-increment.
- Based on testing to date,
- Pre-increment preferred for:
- - PowerPC G3 (Adler)
- - MIPS R5000 (Randers-Pehrson)
- Post-increment preferred for:
- - none
- No measurable difference:
- - Pentium III (Anderson)
- - M68060 (Nikl)
- */
-#ifdef POSTINC
-# define OFF 0
-# define PUP(a) *(a)++
-#else
-# define OFF 1
-# define PUP(a) *++(a)
-#endif
-
-/*
- Decode literal, length, and distance codes and write out the resulting
- literal and match bytes until either not enough input or output is
- available, an end-of-block is encountered, or a data error is encountered.
- When large enough input and output buffers are supplied to inflate(), for
- example, a 16K input buffer and a 64K output buffer, more than 95% of the
- inflate execution time is spent in this routine.
-
- Entry assumptions:
-
- state->mode == LEN
- strm->avail_in >= 6
- strm->avail_out >= 258
- start >= strm->avail_out
- state->bits < 8
-
- On return, state->mode is one of:
-
- LEN -- ran out of enough output space or enough available input
- TYPE -- reached end of block code, inflate() to interpret next block
- BAD -- error in block data
-
- Notes:
-
- - The maximum input bits used by a length/distance pair is 15 bits for the
- length code, 5 bits for the length extra, 15 bits for the distance code,
- and 13 bits for the distance extra. This totals 48 bits, or six bytes.
- Therefore if strm->avail_in >= 6, then there is enough input to avoid
- checking for available input while decoding.
-
- - The maximum bytes that a single length/distance pair can output is 258
- bytes, which is the maximum length that can be coded. inflate_fast()
- requires strm->avail_out >= 258 for each loop to avoid checking for
- output space.
- */
-void inflate_fast(strm, start)
-z_streamp strm;
-unsigned start; /* inflate()'s starting value for strm->avail_out */
-{
- struct inflate_state FAR *state;
- unsigned char FAR *in; /* local strm->next_in */
- unsigned char FAR *last; /* while in < last, enough input available */
- unsigned char FAR *out; /* local strm->next_out */
- unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
- unsigned char FAR *end; /* while out < end, enough space available */
-#ifdef INFLATE_STRICT
- unsigned dmax; /* maximum distance from zlib header */
-#endif
- unsigned wsize; /* window size or zero if not using window */
- unsigned whave; /* valid bytes in the window */
- unsigned write; /* window write index */
- unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */
- unsigned long hold; /* local strm->hold */
- unsigned bits; /* local strm->bits */
- code const FAR *lcode; /* local strm->lencode */
- code const FAR *dcode; /* local strm->distcode */
- unsigned lmask; /* mask for first level of length codes */
- unsigned dmask; /* mask for first level of distance codes */
- code this; /* retrieved table entry */
- unsigned op; /* code bits, operation, extra bits, or */
- /* window position, window bytes to copy */
- unsigned len; /* match length, unused bytes */
- unsigned dist; /* match distance */
- unsigned char FAR *from; /* where to copy match from */
-
- /* copy state to local variables */
- state = (struct inflate_state FAR *)strm->state;
- in = strm->next_in - OFF;
- last = in + (strm->avail_in - 5);
- out = strm->next_out - OFF;
- beg = out - (start - strm->avail_out);
- end = out + (strm->avail_out - 257);
-#ifdef INFLATE_STRICT
- dmax = state->dmax;
-#endif
- wsize = state->wsize;
- whave = state->whave;
- write = state->write;
- window = state->window;
- hold = state->hold;
- bits = state->bits;
- lcode = state->lencode;
- dcode = state->distcode;
- lmask = (1U << state->lenbits) - 1;
- dmask = (1U << state->distbits) - 1;
-
- /* decode literals and length/distances until end-of-block or not enough
- input data or output space */
- do {
- if (bits < 15) {
- hold += (unsigned long)(PUP(in)) << bits;
- bits += 8;
- hold += (unsigned long)(PUP(in)) << bits;
- bits += 8;
- }
- this = lcode[hold & lmask];
- dolen:
- op = (unsigned)(this.bits);
- hold >>= op;
- bits -= op;
- op = (unsigned)(this.op);
- if (op == 0) { /* literal */
- Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
- "inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", this.val));
- PUP(out) = (unsigned char)(this.val);
- }
- else if (op & 16) { /* length base */
- len = (unsigned)(this.val);
- op &= 15; /* number of extra bits */
- if (op) {
- if (bits < op) {
- hold += (unsigned long)(PUP(in)) << bits;
- bits += 8;
- }
- len += (unsigned)hold & ((1U << op) - 1);
- hold >>= op;
- bits -= op;
- }
- Tracevv((stderr, "inflate: length %u\n", len));
- if (bits < 15) {
- hold += (unsigned long)(PUP(in)) << bits;
- bits += 8;
- hold += (unsigned long)(PUP(in)) << bits;
- bits += 8;
- }
- this = dcode[hold & dmask];
- dodist:
- op = (unsigned)(this.bits);
- hold >>= op;
- bits -= op;
- op = (unsigned)(this.op);
- if (op & 16) { /* distance base */
- dist = (unsigned)(this.val);
- op &= 15; /* number of extra bits */
- if (bits < op) {
- hold += (unsigned long)(PUP(in)) << bits;
- bits += 8;
- if (bits < op) {
- hold += (unsigned long)(PUP(in)) << bits;
- bits += 8;
- }
- }
- dist += (unsigned)hold & ((1U << op) - 1);
-#ifdef INFLATE_STRICT
- if (dist > dmax) {
- strm->msg = (char *)"invalid distance too far back";
- state->mode = BAD;
- break;
- }
-#endif
- hold >>= op;
- bits -= op;
- Tracevv((stderr, "inflate: distance %u\n", dist));
- op = (unsigned)(out - beg); /* max distance in output */
- if (dist > op) { /* see if copy from window */
- op = dist - op; /* distance back in window */
- if (op > whave) {
- strm->msg = (char *)"invalid distance too far back";
- state->mode = BAD;
- break;
- }
- from = window - OFF;
- if (write == 0) { /* very common case */
- from += wsize - op;
- if (op < len) { /* some from window */
- len -= op;
- do {
- PUP(out) = PUP(from);
- } while (--op);
- from = out - dist; /* rest from output */
- }
- }
- else if (write < op) { /* wrap around window */
- from += wsize + write - op;
- op -= write;
- if (op < len) { /* some from end of window */
- len -= op;
- do {
- PUP(out) = PUP(from);
- } while (--op);
- from = window - OFF;
- if (write < len) { /* some from start of window */
- op = write;
- len -= op;
- do {
- PUP(out) = PUP(from);
- } while (--op);
- from = out - dist; /* rest from output */
- }
- }
- }
- else { /* contiguous in window */
- from += write - op;
- if (op < len) { /* some from window */
- len -= op;
- do {
- PUP(out) = PUP(from);
- } while (--op);
- from = out - dist; /* rest from output */
- }
- }
- while (len > 2) {
- PUP(out) = PUP(from);
- PUP(out) = PUP(from);
- PUP(out) = PUP(from);
- len -= 3;
- }
- if (len) {
- PUP(out) = PUP(from);
- if (len > 1)
- PUP(out) = PUP(from);
- }
- }
- else {
- from = out - dist; /* copy direct from output */
- do { /* minimum length is three */
- PUP(out) = PUP(from);
- PUP(out) = PUP(from);
- PUP(out) = PUP(from);
- len -= 3;
- } while (len > 2);
- if (len) {
- PUP(out) = PUP(from);
- if (len > 1)
- PUP(out) = PUP(from);
- }
- }
- }
- else if ((op & 64) == 0) { /* 2nd level distance code */
- this = dcode[this.val + (hold & ((1U << op) - 1))];
- goto dodist;
- }
- else {
- strm->msg = (char *)"invalid distance code";
- state->mode = BAD;
- break;
- }
- }
- else if ((op & 64) == 0) { /* 2nd level length code */
- this = lcode[this.val + (hold & ((1U << op) - 1))];
- goto dolen;
- }
- else if (op & 32) { /* end-of-block */
- Tracevv((stderr, "inflate: end of block\n"));
- state->mode = TYPE;
- break;
- }
- else {
- strm->msg = (char *)"invalid literal/length code";
- state->mode = BAD;
- break;
- }
- } while (in < last && out < end);
-
- /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
- len = bits >> 3;
- in -= len;
- bits -= len << 3;
- hold &= (1U << bits) - 1;
-
- /* update state and return */
- strm->next_in = in + OFF;
- strm->next_out = out + OFF;
- strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
- strm->avail_out = (unsigned)(out < end ?
- 257 + (end - out) : 257 - (out - end));
- state->hold = hold;
- state->bits = bits;
- return;
-}
-
-/*
- inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
- - Using bit fields for code structure
- - Different op definition to avoid & for extra bits (do & for table bits)
- - Three separate decoding do-loops for direct, window, and write == 0
- - Special case for distance > 1 copies to do overlapped load and store copy
- - Explicit branch predictions (based on measured branch probabilities)
- - Deferring match copy and interspersed it with decoding subsequent codes
- - Swapping literal/length else
- - Swapping window/direct else
- - Larger unrolled copy loops (three is about right)
- - Moving len -= 3 statement into middle of loop
- */
-
-#endif /* !ASMINF */
diff --git a/WebCore/platform/image-decoders/zlib/inffast.h b/WebCore/platform/image-decoders/zlib/inffast.h
deleted file mode 100644
index 1e88d2d..0000000
--- a/WebCore/platform/image-decoders/zlib/inffast.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* inffast.h -- header to use inffast.c
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-void inflate_fast OF((z_streamp strm, unsigned start));
diff --git a/WebCore/platform/image-decoders/zlib/inffixed.h b/WebCore/platform/image-decoders/zlib/inffixed.h
deleted file mode 100644
index 75ed4b5..0000000
--- a/WebCore/platform/image-decoders/zlib/inffixed.h
+++ /dev/null
@@ -1,94 +0,0 @@
- /* inffixed.h -- table for decoding fixed codes
- * Generated automatically by makefixed().
- */
-
- /* WARNING: this file should *not* be used by applications. It
- is part of the implementation of the compression library and
- is subject to change. Applications should only use zlib.h.
- */
-
- static const code lenfix[512] = {
- {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48},
- {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128},
- {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59},
- {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176},
- {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20},
- {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100},
- {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8},
- {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216},
- {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76},
- {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114},
- {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},
- {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148},
- {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42},
- {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86},
- {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15},
- {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236},
- {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62},
- {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
- {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31},
- {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162},
- {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25},
- {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105},
- {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4},
- {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202},
- {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69},
- {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125},
- {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13},
- {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195},
- {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35},
- {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91},
- {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19},
- {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246},
- {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55},
- {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135},
- {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99},
- {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190},
- {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16},
- {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96},
- {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6},
- {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209},
- {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},
- {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116},
- {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4},
- {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153},
- {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44},
- {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82},
- {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11},
- {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
- {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58},
- {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138},
- {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51},
- {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173},
- {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30},
- {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110},
- {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0},
- {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195},
- {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65},
- {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121},
- {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},
- {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258},
- {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37},
- {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93},
- {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23},
- {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251},
- {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51},
- {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
- {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67},
- {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183},
- {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23},
- {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103},
- {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9},
- {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223},
- {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79},
- {0,9,255}
- };
-
- static const code distfix[32] = {
- {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025},
- {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193},
- {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385},
- {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577},
- {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073},
- {22,5,193},{64,5,0}
- };
diff --git a/WebCore/platform/image-decoders/zlib/inflate.c b/WebCore/platform/image-decoders/zlib/inflate.c
deleted file mode 100644
index 792fdee..0000000
--- a/WebCore/platform/image-decoders/zlib/inflate.c
+++ /dev/null
@@ -1,1368 +0,0 @@
-/* inflate.c -- zlib decompression
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * Change history:
- *
- * 1.2.beta0 24 Nov 2002
- * - First version -- complete rewrite of inflate to simplify code, avoid
- * creation of window when not needed, minimize use of window when it is
- * needed, make inffast.c even faster, implement gzip decoding, and to
- * improve code readability and style over the previous zlib inflate code
- *
- * 1.2.beta1 25 Nov 2002
- * - Use pointers for available input and output checking in inffast.c
- * - Remove input and output counters in inffast.c
- * - Change inffast.c entry and loop from avail_in >= 7 to >= 6
- * - Remove unnecessary second byte pull from length extra in inffast.c
- * - Unroll direct copy to three copies per loop in inffast.c
- *
- * 1.2.beta2 4 Dec 2002
- * - Change external routine names to reduce potential conflicts
- * - Correct filename to inffixed.h for fixed tables in inflate.c
- * - Make hbuf[] unsigned char to match parameter type in inflate.c
- * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset)
- * to avoid negation problem on Alphas (64 bit) in inflate.c
- *
- * 1.2.beta3 22 Dec 2002
- * - Add comments on state->bits assertion in inffast.c
- * - Add comments on op field in inftrees.h
- * - Fix bug in reuse of allocated window after inflateReset()
- * - Remove bit fields--back to byte structure for speed
- * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths
- * - Change post-increments to pre-increments in inflate_fast(), PPC biased?
- * - Add compile time option, POSTINC, to use post-increments instead (Intel?)
- * - Make MATCH copy in inflate() much faster for when inflate_fast() not used
- * - Use local copies of stream next and avail values, as well as local bit
- * buffer and bit count in inflate()--for speed when inflate_fast() not used
- *
- * 1.2.beta4 1 Jan 2003
- * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings
- * - Move a comment on output buffer sizes from inffast.c to inflate.c
- * - Add comments in inffast.c to introduce the inflate_fast() routine
- * - Rearrange window copies in inflate_fast() for speed and simplification
- * - Unroll last copy for window match in inflate_fast()
- * - Use local copies of window variables in inflate_fast() for speed
- * - Pull out common write == 0 case for speed in inflate_fast()
- * - Make op and len in inflate_fast() unsigned for consistency
- * - Add FAR to lcode and dcode declarations in inflate_fast()
- * - Simplified bad distance check in inflate_fast()
- * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new
- * source file infback.c to provide a call-back interface to inflate for
- * programs like gzip and unzip -- uses window as output buffer to avoid
- * window copying
- *
- * 1.2.beta5 1 Jan 2003
- * - Improved inflateBack() interface to allow the caller to provide initial
- * input in strm.
- * - Fixed stored blocks bug in inflateBack()
- *
- * 1.2.beta6 4 Jan 2003
- * - Added comments in inffast.c on effectiveness of POSTINC
- * - Typecasting all around to reduce compiler warnings
- * - Changed loops from while (1) or do {} while (1) to for (;;), again to
- * make compilers happy
- * - Changed type of window in inflateBackInit() to unsigned char *
- *
- * 1.2.beta7 27 Jan 2003
- * - Changed many types to unsigned or unsigned short to avoid warnings
- * - Added inflateCopy() function
- *
- * 1.2.0 9 Mar 2003
- * - Changed inflateBack() interface to provide separate opaque descriptors
- * for the in() and out() functions
- * - Changed inflateBack() argument and in_func typedef to swap the length
- * and buffer address return values for the input function
- * - Check next_in and next_out for Z_NULL on entry to inflate()
- *
- * The history for versions after 1.2.0 are in ChangeLog in zlib distribution.
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-#ifdef MAKEFIXED
-# ifndef BUILDFIXED
-# define BUILDFIXED
-# endif
-#endif
-
-/* function prototypes */
-local void fixedtables OF((struct inflate_state FAR *state));
-local int updatewindow OF((z_streamp strm, unsigned out));
-#ifdef BUILDFIXED
- void makefixed OF((void));
-#endif
-local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
- unsigned len));
-
-int ZEXPORT inflateReset(strm)
-z_streamp strm;
-{
- struct inflate_state FAR *state;
-
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
- strm->total_in = strm->total_out = state->total = 0;
- strm->msg = Z_NULL;
- strm->adler = 1; /* to support ill-conceived Java test suite */
- state->mode = HEAD;
- state->last = 0;
- state->havedict = 0;
- state->dmax = 32768U;
- state->head = Z_NULL;
- state->wsize = 0;
- state->whave = 0;
- state->write = 0;
- state->hold = 0;
- state->bits = 0;
- state->lencode = state->distcode = state->next = state->codes;
- Tracev((stderr, "inflate: reset\n"));
- return Z_OK;
-}
-
-int ZEXPORT inflatePrime(strm, bits, value)
-z_streamp strm;
-int bits;
-int value;
-{
- struct inflate_state FAR *state;
-
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
- if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
- value &= (1L << bits) - 1;
- state->hold += value << state->bits;
- state->bits += bits;
- return Z_OK;
-}
-
-int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
-z_streamp strm;
-int windowBits;
-const char *version;
-int stream_size;
-{
- struct inflate_state FAR *state;
-
- if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
- stream_size != (int)(sizeof(z_stream)))
- return Z_VERSION_ERROR;
- if (strm == Z_NULL) return Z_STREAM_ERROR;
- strm->msg = Z_NULL; /* in case we return an error */
- if (strm->zalloc == (alloc_func)0) {
- strm->zalloc = zcalloc;
- strm->opaque = (voidpf)0;
- }
- if (strm->zfree == (free_func)0) strm->zfree = zcfree;
- state = (struct inflate_state FAR *)
- ZALLOC(strm, 1, sizeof(struct inflate_state));
- if (state == Z_NULL) return Z_MEM_ERROR;
- Tracev((stderr, "inflate: allocated\n"));
- strm->state = (struct internal_state FAR *)state;
- if (windowBits < 0) {
- state->wrap = 0;
- windowBits = -windowBits;
- }
- else {
- state->wrap = (windowBits >> 4) + 1;
-#ifdef GUNZIP
- if (windowBits < 48) windowBits &= 15;
-#endif
- }
- if (windowBits < 8 || windowBits > 15) {
- ZFREE(strm, state);
- strm->state = Z_NULL;
- return Z_STREAM_ERROR;
- }
- state->wbits = (unsigned)windowBits;
- state->window = Z_NULL;
- return inflateReset(strm);
-}
-
-int ZEXPORT inflateInit_(strm, version, stream_size)
-z_streamp strm;
-const char *version;
-int stream_size;
-{
- return inflateInit2_(strm, DEF_WBITS, version, stream_size);
-}
-
-/*
- Return state with length and distance decoding tables and index sizes set to
- fixed code decoding. Normally this returns fixed tables from inffixed.h.
- If BUILDFIXED is defined, then instead this routine builds the tables the
- first time it's called, and returns those tables the first time and
- thereafter. This reduces the size of the code by about 2K bytes, in
- exchange for a little execution time. However, BUILDFIXED should not be
- used for threaded applications, since the rewriting of the tables and virgin
- may not be thread-safe.
- */
-local void fixedtables(state)
-struct inflate_state FAR *state;
-{
-#ifdef BUILDFIXED
- static int virgin = 1;
- static code *lenfix, *distfix;
- static code fixed[544];
-
- /* build fixed huffman tables if first call (may not be thread safe) */
- if (virgin) {
- unsigned sym, bits;
- static code *next;
-
- /* literal/length table */
- sym = 0;
- while (sym < 144) state->lens[sym++] = 8;
- while (sym < 256) state->lens[sym++] = 9;
- while (sym < 280) state->lens[sym++] = 7;
- while (sym < 288) state->lens[sym++] = 8;
- next = fixed;
- lenfix = next;
- bits = 9;
- inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
-
- /* distance table */
- sym = 0;
- while (sym < 32) state->lens[sym++] = 5;
- distfix = next;
- bits = 5;
- inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
-
- /* do this just once */
- virgin = 0;
- }
-#else /* !BUILDFIXED */
-# include "inffixed.h"
-#endif /* BUILDFIXED */
- state->lencode = lenfix;
- state->lenbits = 9;
- state->distcode = distfix;
- state->distbits = 5;
-}
-
-#ifdef MAKEFIXED
-#include <stdio.h>
-
-/*
- Write out the inffixed.h that is #include'd above. Defining MAKEFIXED also
- defines BUILDFIXED, so the tables are built on the fly. makefixed() writes
- those tables to stdout, which would be piped to inffixed.h. A small program
- can simply call makefixed to do this:
-
- void makefixed(void);
-
- int main(void)
- {
- makefixed();
- return 0;
- }
-
- Then that can be linked with zlib built with MAKEFIXED defined and run:
-
- a.out > inffixed.h
- */
-void makefixed()
-{
- unsigned low, size;
- struct inflate_state state;
-
- fixedtables(&state);
- puts(" /* inffixed.h -- table for decoding fixed codes");
- puts(" * Generated automatically by makefixed().");
- puts(" */");
- puts("");
- puts(" /* WARNING: this file should *not* be used by applications.");
- puts(" It is part of the implementation of this library and is");
- puts(" subject to change. Applications should only use zlib.h.");
- puts(" */");
- puts("");
- size = 1U << 9;
- printf(" static const code lenfix[%u] = {", size);
- low = 0;
- for (;;) {
- if ((low % 7) == 0) printf("\n ");
- printf("{%u,%u,%d}", state.lencode[low].op, state.lencode[low].bits,
- state.lencode[low].val);
- if (++low == size) break;
- putchar(',');
- }
- puts("\n };");
- size = 1U << 5;
- printf("\n static const code distfix[%u] = {", size);
- low = 0;
- for (;;) {
- if ((low % 6) == 0) printf("\n ");
- printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits,
- state.distcode[low].val);
- if (++low == size) break;
- putchar(',');
- }
- puts("\n };");
-}
-#endif /* MAKEFIXED */
-
-/*
- Update the window with the last wsize (normally 32K) bytes written before
- returning. If window does not exist yet, create it. This is only called
- when a window is already in use, or when output has been written during this
- inflate call, but the end of the deflate stream has not been reached yet.
- It is also called to create a window for dictionary data when a dictionary
- is loaded.
-
- Providing output buffers larger than 32K to inflate() should provide a speed
- advantage, since only the last 32K of output is copied to the sliding window
- upon return from inflate(), and since all distances after the first 32K of
- output will fall in the output data, making match copies simpler and faster.
- The advantage may be dependent on the size of the processor's data caches.
- */
-local int updatewindow(strm, out)
-z_streamp strm;
-unsigned out;
-{
- struct inflate_state FAR *state;
- unsigned copy, dist;
-
- state = (struct inflate_state FAR *)strm->state;
-
- /* if it hasn't been done already, allocate space for the window */
- if (state->window == Z_NULL) {
- state->window = (unsigned char FAR *)
- ZALLOC(strm, 1U << state->wbits,
- sizeof(unsigned char));
- if (state->window == Z_NULL) return 1;
- }
-
- /* if window not in use yet, initialize */
- if (state->wsize == 0) {
- state->wsize = 1U << state->wbits;
- state->write = 0;
- state->whave = 0;
- }
-
- /* copy state->wsize or less output bytes into the circular window */
- copy = out - strm->avail_out;
- if (copy >= state->wsize) {
- zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
- state->write = 0;
- state->whave = state->wsize;
- }
- else {
- dist = state->wsize - state->write;
- if (dist > copy) dist = copy;
- zmemcpy(state->window + state->write, strm->next_out - copy, dist);
- copy -= dist;
- if (copy) {
- zmemcpy(state->window, strm->next_out - copy, copy);
- state->write = copy;
- state->whave = state->wsize;
- }
- else {
- state->write += dist;
- if (state->write == state->wsize) state->write = 0;
- if (state->whave < state->wsize) state->whave += dist;
- }
- }
- return 0;
-}
-
-/* Macros for inflate(): */
-
-/* check function to use adler32() for zlib or crc32() for gzip */
-#ifdef GUNZIP
-# define UPDATE(check, buf, len) \
- (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
-#else
-# define UPDATE(check, buf, len) adler32(check, buf, len)
-#endif
-
-/* check macros for header crc */
-#ifdef GUNZIP
-# define CRC2(check, word) \
- do { \
- hbuf[0] = (unsigned char)(word); \
- hbuf[1] = (unsigned char)((word) >> 8); \
- check = crc32(check, hbuf, 2); \
- } while (0)
-
-# define CRC4(check, word) \
- do { \
- hbuf[0] = (unsigned char)(word); \
- hbuf[1] = (unsigned char)((word) >> 8); \
- hbuf[2] = (unsigned char)((word) >> 16); \
- hbuf[3] = (unsigned char)((word) >> 24); \
- check = crc32(check, hbuf, 4); \
- } while (0)
-#endif
-
-/* Load registers with state in inflate() for speed */
-#define LOAD() \
- do { \
- put = strm->next_out; \
- left = strm->avail_out; \
- next = strm->next_in; \
- have = strm->avail_in; \
- hold = state->hold; \
- bits = state->bits; \
- } while (0)
-
-/* Restore state from registers in inflate() */
-#define RESTORE() \
- do { \
- strm->next_out = put; \
- strm->avail_out = left; \
- strm->next_in = next; \
- strm->avail_in = have; \
- state->hold = hold; \
- state->bits = bits; \
- } while (0)
-
-/* Clear the input bit accumulator */
-#define INITBITS() \
- do { \
- hold = 0; \
- bits = 0; \
- } while (0)
-
-/* Get a byte of input into the bit accumulator, or return from inflate()
- if there is no input available. */
-#define PULLBYTE() \
- do { \
- if (have == 0) goto inf_leave; \
- have--; \
- hold += (unsigned long)(*next++) << bits; \
- bits += 8; \
- } while (0)
-
-/* Assure that there are at least n bits in the bit accumulator. If there is
- not enough available input to do that, then return from inflate(). */
-#define NEEDBITS(n) \
- do { \
- while (bits < (unsigned)(n)) \
- PULLBYTE(); \
- } while (0)
-
-/* Return the low n bits of the bit accumulator (n < 16) */
-#define BITS(n) \
- ((unsigned)hold & ((1U << (n)) - 1))
-
-/* Remove n bits from the bit accumulator */
-#define DROPBITS(n) \
- do { \
- hold >>= (n); \
- bits -= (unsigned)(n); \
- } while (0)
-
-/* Remove zero to seven bits as needed to go to a byte boundary */
-#define BYTEBITS() \
- do { \
- hold >>= bits & 7; \
- bits -= bits & 7; \
- } while (0)
-
-/* Reverse the bytes in a 32-bit value */
-#define REVERSE(q) \
- ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
- (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
-
-/*
- inflate() uses a state machine to process as much input data and generate as
- much output data as possible before returning. The state machine is
- structured roughly as follows:
-
- for (;;) switch (state) {
- ...
- case STATEn:
- if (not enough input data or output space to make progress)
- return;
- ... make progress ...
- state = STATEm;
- break;
- ...
- }
-
- so when inflate() is called again, the same case is attempted again, and
- if the appropriate resources are provided, the machine proceeds to the
- next state. The NEEDBITS() macro is usually the way the state evaluates
- whether it can proceed or should return. NEEDBITS() does the return if
- the requested bits are not available. The typical use of the BITS macros
- is:
-
- NEEDBITS(n);
- ... do something with BITS(n) ...
- DROPBITS(n);
-
- where NEEDBITS(n) either returns from inflate() if there isn't enough
- input left to load n bits into the accumulator, or it continues. BITS(n)
- gives the low n bits in the accumulator. When done, DROPBITS(n) drops
- the low n bits off the accumulator. INITBITS() clears the accumulator
- and sets the number of available bits to zero. BYTEBITS() discards just
- enough bits to put the accumulator on a byte boundary. After BYTEBITS()
- and a NEEDBITS(8), then BITS(8) would return the next byte in the stream.
-
- NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return
- if there is no input available. The decoding of variable length codes uses
- PULLBYTE() directly in order to pull just enough bytes to decode the next
- code, and no more.
-
- Some states loop until they get enough input, making sure that enough
- state information is maintained to continue the loop where it left off
- if NEEDBITS() returns in the loop. For example, want, need, and keep
- would all have to actually be part of the saved state in case NEEDBITS()
- returns:
-
- case STATEw:
- while (want < need) {
- NEEDBITS(n);
- keep[want++] = BITS(n);
- DROPBITS(n);
- }
- state = STATEx;
- case STATEx:
-
- As shown above, if the next state is also the next case, then the break
- is omitted.
-
- A state may also return if there is not enough output space available to
- complete that state. Those states are copying stored data, writing a
- literal byte, and copying a matching string.
-
- When returning, a "goto inf_leave" is used to update the total counters,
- update the check value, and determine whether any progress has been made
- during that inflate() call in order to return the proper return code.
- Progress is defined as a change in either strm->avail_in or strm->avail_out.
- When there is a window, goto inf_leave will update the window with the last
- output written. If a goto inf_leave occurs in the middle of decompression
- and there is no window currently, goto inf_leave will create one and copy
- output to the window for the next call of inflate().
-
- In this implementation, the flush parameter of inflate() only affects the
- return code (per zlib.h). inflate() always writes as much as possible to
- strm->next_out, given the space available and the provided input--the effect
- documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers
- the allocation of and copying into a sliding window until necessary, which
- provides the effect documented in zlib.h for Z_FINISH when the entire input
- stream available. So the only thing the flush parameter actually does is:
- when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it
- will return Z_BUF_ERROR if it has not reached the end of the stream.
- */
-
-int ZEXPORT inflate(strm, flush)
-z_streamp strm;
-int flush;
-{
- struct inflate_state FAR *state;
- unsigned char FAR *next; /* next input */
- unsigned char FAR *put; /* next output */
- unsigned have, left; /* available input and output */
- unsigned long hold; /* bit buffer */
- unsigned bits; /* bits in bit buffer */
- unsigned in, out; /* save starting available input and output */
- unsigned copy; /* number of stored or match bytes to copy */
- unsigned char FAR *from; /* where to copy match bytes from */
- code this; /* current decoding table entry */
- code last; /* parent table entry */
- unsigned len; /* length to copy for repeats, bits to drop */
- int ret; /* return code */
-#ifdef GUNZIP
- unsigned char hbuf[4]; /* buffer for gzip header crc calculation */
-#endif
- static const unsigned short order[19] = /* permutation of code lengths */
- {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
- if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL ||
- (strm->next_in == Z_NULL && strm->avail_in != 0))
- return Z_STREAM_ERROR;
-
- state = (struct inflate_state FAR *)strm->state;
- if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */
- LOAD();
- in = have;
- out = left;
- ret = Z_OK;
- for (;;)
- switch (state->mode) {
- case HEAD:
- if (state->wrap == 0) {
- state->mode = TYPEDO;
- break;
- }
- NEEDBITS(16);
-#ifdef GUNZIP
- if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */
- state->check = crc32(0L, Z_NULL, 0);
- CRC2(state->check, hold);
- INITBITS();
- state->mode = FLAGS;
- break;
- }
- state->flags = 0; /* expect zlib header */
- if (state->head != Z_NULL)
- state->head->done = -1;
- if (!(state->wrap & 1) || /* check if zlib header allowed */
-#else
- if (
-#endif
- ((BITS(8) << 8) + (hold >> 8)) % 31) {
- strm->msg = (char *)"incorrect header check";
- state->mode = BAD;
- break;
- }
- if (BITS(4) != Z_DEFLATED) {
- strm->msg = (char *)"unknown compression method";
- state->mode = BAD;
- break;
- }
- DROPBITS(4);
- len = BITS(4) + 8;
- if (len > state->wbits) {
- strm->msg = (char *)"invalid window size";
- state->mode = BAD;
- break;
- }
- state->dmax = 1U << len;
- Tracev((stderr, "inflate: zlib header ok\n"));
- strm->adler = state->check = adler32(0L, Z_NULL, 0);
- state->mode = hold & 0x200 ? DICTID : TYPE;
- INITBITS();
- break;
-#ifdef GUNZIP
- case FLAGS:
- NEEDBITS(16);
- state->flags = (int)(hold);
- if ((state->flags & 0xff) != Z_DEFLATED) {
- strm->msg = (char *)"unknown compression method";
- state->mode = BAD;
- break;
- }
- if (state->flags & 0xe000) {
- strm->msg = (char *)"unknown header flags set";
- state->mode = BAD;
- break;
- }
- if (state->head != Z_NULL)
- state->head->text = (int)((hold >> 8) & 1);
- if (state->flags & 0x0200) CRC2(state->check, hold);
- INITBITS();
- state->mode = TIME;
- case TIME:
- NEEDBITS(32);
- if (state->head != Z_NULL)
- state->head->time = hold;
- if (state->flags & 0x0200) CRC4(state->check, hold);
- INITBITS();
- state->mode = OS;
- case OS:
- NEEDBITS(16);
- if (state->head != Z_NULL) {
- state->head->xflags = (int)(hold & 0xff);
- state->head->os = (int)(hold >> 8);
- }
- if (state->flags & 0x0200) CRC2(state->check, hold);
- INITBITS();
- state->mode = EXLEN;
- case EXLEN:
- if (state->flags & 0x0400) {
- NEEDBITS(16);
- state->length = (unsigned)(hold);
- if (state->head != Z_NULL)
- state->head->extra_len = (unsigned)hold;
- if (state->flags & 0x0200) CRC2(state->check, hold);
- INITBITS();
- }
- else if (state->head != Z_NULL)
- state->head->extra = Z_NULL;
- state->mode = EXTRA;
- case EXTRA:
- if (state->flags & 0x0400) {
- copy = state->length;
- if (copy > have) copy = have;
- if (copy) {
- if (state->head != Z_NULL &&
- state->head->extra != Z_NULL) {
- len = state->head->extra_len - state->length;
- zmemcpy(state->head->extra + len, next,
- len + copy > state->head->extra_max ?
- state->head->extra_max - len : copy);
- }
- if (state->flags & 0x0200)
- state->check = crc32(state->check, next, copy);
- have -= copy;
- next += copy;
- state->length -= copy;
- }
- if (state->length) goto inf_leave;
- }
- state->length = 0;
- state->mode = NAME;
- case NAME:
- if (state->flags & 0x0800) {
- if (have == 0) goto inf_leave;
- copy = 0;
- do {
- len = (unsigned)(next[copy++]);
- if (state->head != Z_NULL &&
- state->head->name != Z_NULL &&
- state->length < state->head->name_max)
- state->head->name[state->length++] = len;
- } while (len && copy < have);
- if (state->flags & 0x0200)
- state->check = crc32(state->check, next, copy);
- have -= copy;
- next += copy;
- if (len) goto inf_leave;
- }
- else if (state->head != Z_NULL)
- state->head->name = Z_NULL;
- state->length = 0;
- state->mode = COMMENT;
- case COMMENT:
- if (state->flags & 0x1000) {
- if (have == 0) goto inf_leave;
- copy = 0;
- do {
- len = (unsigned)(next[copy++]);
- if (state->head != Z_NULL &&
- state->head->comment != Z_NULL &&
- state->length < state->head->comm_max)
- state->head->comment[state->length++] = len;
- } while (len && copy < have);
- if (state->flags & 0x0200)
- state->check = crc32(state->check, next, copy);
- have -= copy;
- next += copy;
- if (len) goto inf_leave;
- }
- else if (state->head != Z_NULL)
- state->head->comment = Z_NULL;
- state->mode = HCRC;
- case HCRC:
- if (state->flags & 0x0200) {
- NEEDBITS(16);
- if (hold != (state->check & 0xffff)) {
- strm->msg = (char *)"header crc mismatch";
- state->mode = BAD;
- break;
- }
- INITBITS();
- }
- if (state->head != Z_NULL) {
- state->head->hcrc = (int)((state->flags >> 9) & 1);
- state->head->done = 1;
- }
- strm->adler = state->check = crc32(0L, Z_NULL, 0);
- state->mode = TYPE;
- break;
-#endif
- case DICTID:
- NEEDBITS(32);
- strm->adler = state->check = REVERSE(hold);
- INITBITS();
- state->mode = DICT;
- case DICT:
- if (state->havedict == 0) {
- RESTORE();
- return Z_NEED_DICT;
- }
- strm->adler = state->check = adler32(0L, Z_NULL, 0);
- state->mode = TYPE;
- case TYPE:
- if (flush == Z_BLOCK) goto inf_leave;
- case TYPEDO:
- if (state->last) {
- BYTEBITS();
- state->mode = CHECK;
- break;
- }
- NEEDBITS(3);
- state->last = BITS(1);
- DROPBITS(1);
- switch (BITS(2)) {
- case 0: /* stored block */
- Tracev((stderr, "inflate: stored block%s\n",
- state->last ? " (last)" : ""));
- state->mode = STORED;
- break;
- case 1: /* fixed block */
- fixedtables(state);
- Tracev((stderr, "inflate: fixed codes block%s\n",
- state->last ? " (last)" : ""));
- state->mode = LEN; /* decode codes */
- break;
- case 2: /* dynamic block */
- Tracev((stderr, "inflate: dynamic codes block%s\n",
- state->last ? " (last)" : ""));
- state->mode = TABLE;
- break;
- case 3:
- strm->msg = (char *)"invalid block type";
- state->mode = BAD;
- }
- DROPBITS(2);
- break;
- case STORED:
- BYTEBITS(); /* go to byte boundary */
- NEEDBITS(32);
- if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
- strm->msg = (char *)"invalid stored block lengths";
- state->mode = BAD;
- break;
- }
- state->length = (unsigned)hold & 0xffff;
- Tracev((stderr, "inflate: stored length %u\n",
- state->length));
- INITBITS();
- state->mode = COPY;
- case COPY:
- copy = state->length;
- if (copy) {
- if (copy > have) copy = have;
- if (copy > left) copy = left;
- if (copy == 0) goto inf_leave;
- zmemcpy(put, next, copy);
- have -= copy;
- next += copy;
- left -= copy;
- put += copy;
- state->length -= copy;
- break;
- }
- Tracev((stderr, "inflate: stored end\n"));
- state->mode = TYPE;
- break;
- case TABLE:
- NEEDBITS(14);
- state->nlen = BITS(5) + 257;
- DROPBITS(5);
- state->ndist = BITS(5) + 1;
- DROPBITS(5);
- state->ncode = BITS(4) + 4;
- DROPBITS(4);
-#ifndef PKZIP_BUG_WORKAROUND
- if (state->nlen > 286 || state->ndist > 30) {
- strm->msg = (char *)"too many length or distance symbols";
- state->mode = BAD;
- break;
- }
-#endif
- Tracev((stderr, "inflate: table sizes ok\n"));
- state->have = 0;
- state->mode = LENLENS;
- case LENLENS:
- while (state->have < state->ncode) {
- NEEDBITS(3);
- state->lens[order[state->have++]] = (unsigned short)BITS(3);
- DROPBITS(3);
- }
- while (state->have < 19)
- state->lens[order[state->have++]] = 0;
- state->next = state->codes;
- state->lencode = (code const FAR *)(state->next);
- state->lenbits = 7;
- ret = inflate_table(CODES, state->lens, 19, &(state->next),
- &(state->lenbits), state->work);
- if (ret) {
- strm->msg = (char *)"invalid code lengths set";
- state->mode = BAD;
- break;
- }
- Tracev((stderr, "inflate: code lengths ok\n"));
- state->have = 0;
- state->mode = CODELENS;
- case CODELENS:
- while (state->have < state->nlen + state->ndist) {
- for (;;) {
- this = state->lencode[BITS(state->lenbits)];
- if ((unsigned)(this.bits) <= bits) break;
- PULLBYTE();
- }
- if (this.val < 16) {
- NEEDBITS(this.bits);
- DROPBITS(this.bits);
- state->lens[state->have++] = this.val;
- }
- else {
- if (this.val == 16) {
- NEEDBITS(this.bits + 2);
- DROPBITS(this.bits);
- if (state->have == 0) {
- strm->msg = (char *)"invalid bit length repeat";
- state->mode = BAD;
- break;
- }
- len = state->lens[state->have - 1];
- copy = 3 + BITS(2);
- DROPBITS(2);
- }
- else if (this.val == 17) {
- NEEDBITS(this.bits + 3);
- DROPBITS(this.bits);
- len = 0;
- copy = 3 + BITS(3);
- DROPBITS(3);
- }
- else {
- NEEDBITS(this.bits + 7);
- DROPBITS(this.bits);
- len = 0;
- copy = 11 + BITS(7);
- DROPBITS(7);
- }
- if (state->have + copy > state->nlen + state->ndist) {
- strm->msg = (char *)"invalid bit length repeat";
- state->mode = BAD;
- break;
- }
- while (copy--)
- state->lens[state->have++] = (unsigned short)len;
- }
- }
-
- /* handle error breaks in while */
- if (state->mode == BAD) break;
-
- /* build code tables */
- state->next = state->codes;
- state->lencode = (code const FAR *)(state->next);
- state->lenbits = 9;
- ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
- &(state->lenbits), state->work);
- if (ret) {
- strm->msg = (char *)"invalid literal/lengths set";
- state->mode = BAD;
- break;
- }
- state->distcode = (code const FAR *)(state->next);
- state->distbits = 6;
- ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
- &(state->next), &(state->distbits), state->work);
- if (ret) {
- strm->msg = (char *)"invalid distances set";
- state->mode = BAD;
- break;
- }
- Tracev((stderr, "inflate: codes ok\n"));
- state->mode = LEN;
- case LEN:
- if (have >= 6 && left >= 258) {
- RESTORE();
- inflate_fast(strm, out);
- LOAD();
- break;
- }
- for (;;) {
- this = state->lencode[BITS(state->lenbits)];
- if ((unsigned)(this.bits) <= bits) break;
- PULLBYTE();
- }
- if (this.op && (this.op & 0xf0) == 0) {
- last = this;
- for (;;) {
- this = state->lencode[last.val +
- (BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + this.bits) <= bits) break;
- PULLBYTE();
- }
- DROPBITS(last.bits);
- }
- DROPBITS(this.bits);
- state->length = (unsigned)this.val;
- if ((int)(this.op) == 0) {
- Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
- "inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", this.val));
- state->mode = LIT;
- break;
- }
- if (this.op & 32) {
- Tracevv((stderr, "inflate: end of block\n"));
- state->mode = TYPE;
- break;
- }
- if (this.op & 64) {
- strm->msg = (char *)"invalid literal/length code";
- state->mode = BAD;
- break;
- }
- state->extra = (unsigned)(this.op) & 15;
- state->mode = LENEXT;
- case LENEXT:
- if (state->extra) {
- NEEDBITS(state->extra);
- state->length += BITS(state->extra);
- DROPBITS(state->extra);
- }
- Tracevv((stderr, "inflate: length %u\n", state->length));
- state->mode = DIST;
- case DIST:
- for (;;) {
- this = state->distcode[BITS(state->distbits)];
- if ((unsigned)(this.bits) <= bits) break;
- PULLBYTE();
- }
- if ((this.op & 0xf0) == 0) {
- last = this;
- for (;;) {
- this = state->distcode[last.val +
- (BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + this.bits) <= bits) break;
- PULLBYTE();
- }
- DROPBITS(last.bits);
- }
- DROPBITS(this.bits);
- if (this.op & 64) {
- strm->msg = (char *)"invalid distance code";
- state->mode = BAD;
- break;
- }
- state->offset = (unsigned)this.val;
- state->extra = (unsigned)(this.op) & 15;
- state->mode = DISTEXT;
- case DISTEXT:
- if (state->extra) {
- NEEDBITS(state->extra);
- state->offset += BITS(state->extra);
- DROPBITS(state->extra);
- }
-#ifdef INFLATE_STRICT
- if (state->offset > state->dmax) {
- strm->msg = (char *)"invalid distance too far back";
- state->mode = BAD;
- break;
- }
-#endif
- if (state->offset > state->whave + out - left) {
- strm->msg = (char *)"invalid distance too far back";
- state->mode = BAD;
- break;
- }
- Tracevv((stderr, "inflate: distance %u\n", state->offset));
- state->mode = MATCH;
- case MATCH:
- if (left == 0) goto inf_leave;
- copy = out - left;
- if (state->offset > copy) { /* copy from window */
- copy = state->offset - copy;
- if (copy > state->write) {
- copy -= state->write;
- from = state->window + (state->wsize - copy);
- }
- else
- from = state->window + (state->write - copy);
- if (copy > state->length) copy = state->length;
- }
- else { /* copy from output */
- from = put - state->offset;
- copy = state->length;
- }
- if (copy > left) copy = left;
- left -= copy;
- state->length -= copy;
- do {
- *put++ = *from++;
- } while (--copy);
- if (state->length == 0) state->mode = LEN;
- break;
- case LIT:
- if (left == 0) goto inf_leave;
- *put++ = (unsigned char)(state->length);
- left--;
- state->mode = LEN;
- break;
- case CHECK:
- if (state->wrap) {
- NEEDBITS(32);
- out -= left;
- strm->total_out += out;
- state->total += out;
- if (out)
- strm->adler = state->check =
- UPDATE(state->check, put - out, out);
- out = left;
- if ((
-#ifdef GUNZIP
- state->flags ? hold :
-#endif
- REVERSE(hold)) != state->check) {
- strm->msg = (char *)"incorrect data check";
- state->mode = BAD;
- break;
- }
- INITBITS();
- Tracev((stderr, "inflate: check matches trailer\n"));
- }
-#ifdef GUNZIP
- state->mode = LENGTH;
- case LENGTH:
- if (state->wrap && state->flags) {
- NEEDBITS(32);
- if (hold != (state->total & 0xffffffffUL)) {
- strm->msg = (char *)"incorrect length check";
- state->mode = BAD;
- break;
- }
- INITBITS();
- Tracev((stderr, "inflate: length matches trailer\n"));
- }
-#endif
- state->mode = DONE;
- case DONE:
- ret = Z_STREAM_END;
- goto inf_leave;
- case BAD:
- ret = Z_DATA_ERROR;
- goto inf_leave;
- case MEM:
- return Z_MEM_ERROR;
- case SYNC:
- default:
- return Z_STREAM_ERROR;
- }
-
- /*
- Return from inflate(), updating the total counts and the check value.
- If there was no progress during the inflate() call, return a buffer
- error. Call updatewindow() to create and/or update the window state.
- Note: a memory error from inflate() is non-recoverable.
- */
- inf_leave:
- RESTORE();
- if (state->wsize || (state->mode < CHECK && out != strm->avail_out))
- if (updatewindow(strm, out)) {
- state->mode = MEM;
- return Z_MEM_ERROR;
- }
- in -= strm->avail_in;
- out -= strm->avail_out;
- strm->total_in += in;
- strm->total_out += out;
- state->total += out;
- if (state->wrap && out)
- strm->adler = state->check =
- UPDATE(state->check, strm->next_out - out, out);
- strm->data_type = state->bits + (state->last ? 64 : 0) +
- (state->mode == TYPE ? 128 : 0);
- if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
- ret = Z_BUF_ERROR;
- return ret;
-}
-
-int ZEXPORT inflateEnd(strm)
-z_streamp strm;
-{
- struct inflate_state FAR *state;
- if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
- return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
- if (state->window != Z_NULL) ZFREE(strm, state->window);
- ZFREE(strm, strm->state);
- strm->state = Z_NULL;
- Tracev((stderr, "inflate: end\n"));
- return Z_OK;
-}
-
-int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
-z_streamp strm;
-const Bytef *dictionary;
-uInt dictLength;
-{
- struct inflate_state FAR *state;
- unsigned long id;
-
- /* check state */
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
- if (state->wrap != 0 && state->mode != DICT)
- return Z_STREAM_ERROR;
-
- /* check for correct dictionary id */
- if (state->mode == DICT) {
- id = adler32(0L, Z_NULL, 0);
- id = adler32(id, dictionary, dictLength);
- if (id != state->check)
- return Z_DATA_ERROR;
- }
-
- /* copy dictionary to window */
- if (updatewindow(strm, strm->avail_out)) {
- state->mode = MEM;
- return Z_MEM_ERROR;
- }
- if (dictLength > state->wsize) {
- zmemcpy(state->window, dictionary + dictLength - state->wsize,
- state->wsize);
- state->whave = state->wsize;
- }
- else {
- zmemcpy(state->window + state->wsize - dictLength, dictionary,
- dictLength);
- state->whave = dictLength;
- }
- state->havedict = 1;
- Tracev((stderr, "inflate: dictionary set\n"));
- return Z_OK;
-}
-
-int ZEXPORT inflateGetHeader(strm, head)
-z_streamp strm;
-gz_headerp head;
-{
- struct inflate_state FAR *state;
-
- /* check state */
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
- if ((state->wrap & 2) == 0) return Z_STREAM_ERROR;
-
- /* save header structure */
- state->head = head;
- head->done = 0;
- return Z_OK;
-}
-
-/*
- Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found
- or when out of input. When called, *have is the number of pattern bytes
- found in order so far, in 0..3. On return *have is updated to the new
- state. If on return *have equals four, then the pattern was found and the
- return value is how many bytes were read including the last byte of the
- pattern. If *have is less than four, then the pattern has not been found
- yet and the return value is len. In the latter case, syncsearch() can be
- called again with more data and the *have state. *have is initialized to
- zero for the first call.
- */
-local unsigned syncsearch(have, buf, len)
-unsigned FAR *have;
-unsigned char FAR *buf;
-unsigned len;
-{
- unsigned got;
- unsigned next;
-
- got = *have;
- next = 0;
- while (next < len && got < 4) {
- if ((int)(buf[next]) == (got < 2 ? 0 : 0xff))
- got++;
- else if (buf[next])
- got = 0;
- else
- got = 4 - got;
- next++;
- }
- *have = got;
- return next;
-}
-
-int ZEXPORT inflateSync(strm)
-z_streamp strm;
-{
- unsigned len; /* number of bytes to look at or looked at */
- unsigned long in, out; /* temporary to save total_in and total_out */
- unsigned char buf[4]; /* to restore bit buffer to byte string */
- struct inflate_state FAR *state;
-
- /* check parameters */
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
- if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR;
-
- /* if first time, start search in bit buffer */
- if (state->mode != SYNC) {
- state->mode = SYNC;
- state->hold <<= state->bits & 7;
- state->bits -= state->bits & 7;
- len = 0;
- while (state->bits >= 8) {
- buf[len++] = (unsigned char)(state->hold);
- state->hold >>= 8;
- state->bits -= 8;
- }
- state->have = 0;
- syncsearch(&(state->have), buf, len);
- }
-
- /* search available input */
- len = syncsearch(&(state->have), strm->next_in, strm->avail_in);
- strm->avail_in -= len;
- strm->next_in += len;
- strm->total_in += len;
-
- /* return no joy or set up to restart inflate() on a new block */
- if (state->have != 4) return Z_DATA_ERROR;
- in = strm->total_in; out = strm->total_out;
- inflateReset(strm);
- strm->total_in = in; strm->total_out = out;
- state->mode = TYPE;
- return Z_OK;
-}
-
-/*
- Returns true if inflate is currently at the end of a block generated by
- Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
- implementation to provide an additional safety check. PPP uses
- Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored
- block. When decompressing, PPP checks that at the end of input packet,
- inflate is waiting for these length bytes.
- */
-int ZEXPORT inflateSyncPoint(strm)
-z_streamp strm;
-{
- struct inflate_state FAR *state;
-
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
- return state->mode == STORED && state->bits == 0;
-}
-
-int ZEXPORT inflateCopy(dest, source)
-z_streamp dest;
-z_streamp source;
-{
- struct inflate_state FAR *state;
- struct inflate_state FAR *copy;
- unsigned char FAR *window;
- unsigned wsize;
-
- /* check input */
- if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL ||
- source->zalloc == (alloc_func)0 || source->zfree == (free_func)0)
- return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)source->state;
-
- /* allocate space */
- copy = (struct inflate_state FAR *)
- ZALLOC(source, 1, sizeof(struct inflate_state));
- if (copy == Z_NULL) return Z_MEM_ERROR;
- window = Z_NULL;
- if (state->window != Z_NULL) {
- window = (unsigned char FAR *)
- ZALLOC(source, 1U << state->wbits, sizeof(unsigned char));
- if (window == Z_NULL) {
- ZFREE(source, copy);
- return Z_MEM_ERROR;
- }
- }
-
- /* copy state */
- zmemcpy(dest, source, sizeof(z_stream));
- zmemcpy(copy, state, sizeof(struct inflate_state));
- if (state->lencode >= state->codes &&
- state->lencode <= state->codes + ENOUGH - 1) {
- copy->lencode = copy->codes + (state->lencode - state->codes);
- copy->distcode = copy->codes + (state->distcode - state->codes);
- }
- copy->next = copy->codes + (state->next - state->codes);
- if (window != Z_NULL) {
- wsize = 1U << state->wbits;
- zmemcpy(window, state->window, wsize);
- }
- copy->window = window;
- dest->state = (struct internal_state FAR *)copy;
- return Z_OK;
-}
diff --git a/WebCore/platform/image-decoders/zlib/inflate.h b/WebCore/platform/image-decoders/zlib/inflate.h
deleted file mode 100644
index 07bd3e7..0000000
--- a/WebCore/platform/image-decoders/zlib/inflate.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* inflate.h -- internal inflate state definition
- * Copyright (C) 1995-2004 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/* define NO_GZIP when compiling if you want to disable gzip header and
- trailer decoding by inflate(). NO_GZIP would be used to avoid linking in
- the crc code when it is not needed. For shared libraries, gzip decoding
- should be left enabled. */
-#ifndef NO_GZIP
-# define GUNZIP
-#endif
-
-/* Possible inflate modes between inflate() calls */
-typedef enum {
- HEAD, /* i: waiting for magic header */
- FLAGS, /* i: waiting for method and flags (gzip) */
- TIME, /* i: waiting for modification time (gzip) */
- OS, /* i: waiting for extra flags and operating system (gzip) */
- EXLEN, /* i: waiting for extra length (gzip) */
- EXTRA, /* i: waiting for extra bytes (gzip) */
- NAME, /* i: waiting for end of file name (gzip) */
- COMMENT, /* i: waiting for end of comment (gzip) */
- HCRC, /* i: waiting for header crc (gzip) */
- DICTID, /* i: waiting for dictionary check value */
- DICT, /* waiting for inflateSetDictionary() call */
- TYPE, /* i: waiting for type bits, including last-flag bit */
- TYPEDO, /* i: same, but skip check to exit inflate on new block */
- STORED, /* i: waiting for stored size (length and complement) */
- COPY, /* i/o: waiting for input or output to copy stored block */
- TABLE, /* i: waiting for dynamic block table lengths */
- LENLENS, /* i: waiting for code length code lengths */
- CODELENS, /* i: waiting for length/lit and distance code lengths */
- LEN, /* i: waiting for length/lit code */
- LENEXT, /* i: waiting for length extra bits */
- DIST, /* i: waiting for distance code */
- DISTEXT, /* i: waiting for distance extra bits */
- MATCH, /* o: waiting for output space to copy string */
- LIT, /* o: waiting for output space to write literal */
- CHECK, /* i: waiting for 32-bit check value */
- LENGTH, /* i: waiting for 32-bit length (gzip) */
- DONE, /* finished check, done -- remain here until reset */
- BAD, /* got a data error -- remain here until reset */
- MEM, /* got an inflate() memory error -- remain here until reset */
- SYNC /* looking for synchronization bytes to restart inflate() */
-} inflate_mode;
-
-/*
- State transitions between above modes -
-
- (most modes can go to the BAD or MEM mode -- not shown for clarity)
-
- Process header:
- HEAD -> (gzip) or (zlib)
- (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME
- NAME -> COMMENT -> HCRC -> TYPE
- (zlib) -> DICTID or TYPE
- DICTID -> DICT -> TYPE
- Read deflate blocks:
- TYPE -> STORED or TABLE or LEN or CHECK
- STORED -> COPY -> TYPE
- TABLE -> LENLENS -> CODELENS -> LEN
- Read deflate codes:
- LEN -> LENEXT or LIT or TYPE
- LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
- LIT -> LEN
- Process trailer:
- CHECK -> LENGTH -> DONE
- */
-
-/* state maintained between inflate() calls. Approximately 7K bytes. */
-struct inflate_state {
- inflate_mode mode; /* current inflate mode */
- int last; /* true if processing last block */
- int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
- int havedict; /* true if dictionary provided */
- int flags; /* gzip header method and flags (0 if zlib) */
- unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */
- unsigned long check; /* protected copy of check value */
- unsigned long total; /* protected copy of output count */
- gz_headerp head; /* where to save gzip header information */
- /* sliding window */
- unsigned wbits; /* log base 2 of requested window size */
- unsigned wsize; /* window size or zero if not using window */
- unsigned whave; /* valid bytes in the window */
- unsigned write; /* window write index */
- unsigned char FAR *window; /* allocated sliding window, if needed */
- /* bit accumulator */
- unsigned long hold; /* input bit accumulator */
- unsigned bits; /* number of bits in "in" */
- /* for string and stored block copying */
- unsigned length; /* literal or length of data to copy */
- unsigned offset; /* distance back to copy string from */
- /* for table and code decoding */
- unsigned extra; /* extra bits needed */
- /* fixed and dynamic code tables */
- code const FAR *lencode; /* starting table for length/literal codes */
- code const FAR *distcode; /* starting table for distance codes */
- unsigned lenbits; /* index bits for lencode */
- unsigned distbits; /* index bits for distcode */
- /* dynamic table building */
- unsigned ncode; /* number of code length code lengths */
- unsigned nlen; /* number of length code lengths */
- unsigned ndist; /* number of distance code lengths */
- unsigned have; /* number of code lengths in lens[] */
- code FAR *next; /* next available space in codes[] */
- unsigned short lens[320]; /* temporary storage for code lengths */
- unsigned short work[288]; /* work area for code table building */
- code codes[ENOUGH]; /* space for code tables */
-};
diff --git a/WebCore/platform/image-decoders/zlib/inftrees.c b/WebCore/platform/image-decoders/zlib/inftrees.c
deleted file mode 100644
index 8a9c13f..0000000
--- a/WebCore/platform/image-decoders/zlib/inftrees.c
+++ /dev/null
@@ -1,329 +0,0 @@
-/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-
-#define MAXBITS 15
-
-const char inflate_copyright[] =
- " inflate 1.2.3 Copyright 1995-2005 Mark Adler ";
-/*
- If you use the zlib library in a product, an acknowledgment is welcome
- in the documentation of your product. If for some reason you cannot
- include such an acknowledgment, I would appreciate that you keep this
- copyright string in the executable of your product.
- */
-
-/*
- Build a set of tables to decode the provided canonical Huffman code.
- The code lengths are lens[0..codes-1]. The result starts at *table,
- whose indices are 0..2^bits-1. work is a writable array of at least
- lens shorts, which is used as a work area. type is the type of code
- to be generated, CODES, LENS, or DISTS. On return, zero is success,
- -1 is an invalid code, and +1 means that ENOUGH isn't enough. table
- on return points to the next available entry's address. bits is the
- requested root table index bits, and on return it is the actual root
- table index bits. It will differ if the request is greater than the
- longest code or if it is less than the shortest code.
- */
-int inflate_table(type, lens, codes, table, bits, work)
-codetype type;
-unsigned short FAR *lens;
-unsigned codes;
-code FAR * FAR *table;
-unsigned FAR *bits;
-unsigned short FAR *work;
-{
- unsigned len; /* a code's length in bits */
- unsigned sym; /* index of code symbols */
- unsigned min, max; /* minimum and maximum code lengths */
- unsigned root; /* number of index bits for root table */
- unsigned curr; /* number of index bits for current table */
- unsigned drop; /* code bits to drop for sub-table */
- int left; /* number of prefix codes available */
- unsigned used; /* code entries in table used */
- unsigned huff; /* Huffman code */
- unsigned incr; /* for incrementing code, index */
- unsigned fill; /* index for replicating entries */
- unsigned low; /* low bits for current root entry */
- unsigned mask; /* mask for low root bits */
- code this; /* table entry for duplication */
- code FAR *next; /* next available space in table */
- const unsigned short FAR *base; /* base value table to use */
- const unsigned short FAR *extra; /* extra bits table to use */
- int end; /* use base and extra for symbol > end */
- unsigned short count[MAXBITS+1]; /* number of codes of each length */
- unsigned short offs[MAXBITS+1]; /* offsets in table for each length */
- static const unsigned short lbase[31] = { /* Length codes 257..285 base */
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
- 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
- static const unsigned short lext[31] = { /* Length codes 257..285 extra */
- 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
- 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 201, 196};
- static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
- 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
- 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
- 8193, 12289, 16385, 24577, 0, 0};
- static const unsigned short dext[32] = { /* Distance codes 0..29 extra */
- 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
- 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
- 28, 28, 29, 29, 64, 64};
-
- /*
- Process a set of code lengths to create a canonical Huffman code. The
- code lengths are lens[0..codes-1]. Each length corresponds to the
- symbols 0..codes-1. The Huffman code is generated by first sorting the
- symbols by length from short to long, and retaining the symbol order
- for codes with equal lengths. Then the code starts with all zero bits
- for the first code of the shortest length, and the codes are integer
- increments for the same length, and zeros are appended as the length
- increases. For the deflate format, these bits are stored backwards
- from their more natural integer increment ordering, and so when the
- decoding tables are built in the large loop below, the integer codes
- are incremented backwards.
-
- This routine assumes, but does not check, that all of the entries in
- lens[] are in the range 0..MAXBITS. The caller must assure this.
- 1..MAXBITS is interpreted as that code length. zero means that that
- symbol does not occur in this code.
-
- The codes are sorted by computing a count of codes for each length,
- creating from that a table of starting indices for each length in the
- sorted table, and then entering the symbols in order in the sorted
- table. The sorted table is work[], with that space being provided by
- the caller.
-
- The length counts are used for other purposes as well, i.e. finding
- the minimum and maximum length codes, determining if there are any
- codes at all, checking for a valid set of lengths, and looking ahead
- at length counts to determine sub-table sizes when building the
- decoding tables.
- */
-
- /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
- for (len = 0; len <= MAXBITS; len++)
- count[len] = 0;
- for (sym = 0; sym < codes; sym++)
- count[lens[sym]]++;
-
- /* bound code lengths, force root to be within code lengths */
- root = *bits;
- for (max = MAXBITS; max >= 1; max--)
- if (count[max] != 0) break;
- if (root > max) root = max;
- if (max == 0) { /* no symbols to code at all */
- this.op = (unsigned char)64; /* invalid code marker */
- this.bits = (unsigned char)1;
- this.val = (unsigned short)0;
- *(*table)++ = this; /* make a table to force an error */
- *(*table)++ = this;
- *bits = 1;
- return 0; /* no symbols, but wait for decoding to report error */
- }
- for (min = 1; min <= MAXBITS; min++)
- if (count[min] != 0) break;
- if (root < min) root = min;
-
- /* check for an over-subscribed or incomplete set of lengths */
- left = 1;
- for (len = 1; len <= MAXBITS; len++) {
- left <<= 1;
- left -= count[len];
- if (left < 0) return -1; /* over-subscribed */
- }
- if (left > 0 && (type == CODES || max != 1))
- return -1; /* incomplete set */
-
- /* generate offsets into symbol table for each length for sorting */
- offs[1] = 0;
- for (len = 1; len < MAXBITS; len++)
- offs[len + 1] = offs[len] + count[len];
-
- /* sort symbols by length, by symbol order within each length */
- for (sym = 0; sym < codes; sym++)
- if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
-
- /*
- Create and fill in decoding tables. In this loop, the table being
- filled is at next and has curr index bits. The code being used is huff
- with length len. That code is converted to an index by dropping drop
- bits off of the bottom. For codes where len is less than drop + curr,
- those top drop + curr - len bits are incremented through all values to
- fill the table with replicated entries.
-
- root is the number of index bits for the root table. When len exceeds
- root, sub-tables are created pointed to by the root entry with an index
- of the low root bits of huff. This is saved in low to check for when a
- new sub-table should be started. drop is zero when the root table is
- being filled, and drop is root when sub-tables are being filled.
-
- When a new sub-table is needed, it is necessary to look ahead in the
- code lengths to determine what size sub-table is needed. The length
- counts are used for this, and so count[] is decremented as codes are
- entered in the tables.
-
- used keeps track of how many table entries have been allocated from the
- provided *table space. It is checked when a LENS table is being made
- against the space in *table, ENOUGH, minus the maximum space needed by
- the worst case distance code, MAXD. This should never happen, but the
- sufficiency of ENOUGH has not been proven exhaustively, hence the check.
- This assumes that when type == LENS, bits == 9.
-
- sym increments through all symbols, and the loop terminates when
- all codes of length max, i.e. all codes, have been processed. This
- routine permits incomplete codes, so another loop after this one fills
- in the rest of the decoding tables with invalid code markers.
- */
-
- /* set up for code type */
- switch (type) {
- case CODES:
- base = extra = work; /* dummy value--not used */
- end = 19;
- break;
- case LENS:
- base = lbase;
- base -= 257;
- extra = lext;
- extra -= 257;
- end = 256;
- break;
- default: /* DISTS */
- base = dbase;
- extra = dext;
- end = -1;
- }
-
- /* initialize state for loop */
- huff = 0; /* starting code */
- sym = 0; /* starting code symbol */
- len = min; /* starting code length */
- next = *table; /* current table to fill in */
- curr = root; /* current table index bits */
- drop = 0; /* current bits to drop from code for index */
- low = (unsigned)(-1); /* trigger new sub-table when len > root */
- used = 1U << root; /* use root table entries */
- mask = used - 1; /* mask for comparing low */
-
- /* check available table space */
- if (type == LENS && used >= ENOUGH - MAXD)
- return 1;
-
- /* process all codes and make table entries */
- for (;;) {
- /* create table entry */
- this.bits = (unsigned char)(len - drop);
- if ((int)(work[sym]) < end) {
- this.op = (unsigned char)0;
- this.val = work[sym];
- }
- else if ((int)(work[sym]) > end) {
- this.op = (unsigned char)(extra[work[sym]]);
- this.val = base[work[sym]];
- }
- else {
- this.op = (unsigned char)(32 + 64); /* end of block */
- this.val = 0;
- }
-
- /* replicate for those indices with low len bits equal to huff */
- incr = 1U << (len - drop);
- fill = 1U << curr;
- min = fill; /* save offset to next table */
- do {
- fill -= incr;
- next[(huff >> drop) + fill] = this;
- } while (fill != 0);
-
- /* backwards increment the len-bit code huff */
- incr = 1U << (len - 1);
- while (huff & incr)
- incr >>= 1;
- if (incr != 0) {
- huff &= incr - 1;
- huff += incr;
- }
- else
- huff = 0;
-
- /* go to next symbol, update count, len */
- sym++;
- if (--(count[len]) == 0) {
- if (len == max) break;
- len = lens[work[sym]];
- }
-
- /* create new sub-table if needed */
- if (len > root && (huff & mask) != low) {
- /* if first time, transition to sub-tables */
- if (drop == 0)
- drop = root;
-
- /* increment past last table */
- next += min; /* here min is 1 << curr */
-
- /* determine length of next table */
- curr = len - drop;
- left = (int)(1 << curr);
- while (curr + drop < max) {
- left -= count[curr + drop];
- if (left <= 0) break;
- curr++;
- left <<= 1;
- }
-
- /* check for enough space */
- used += 1U << curr;
- if (type == LENS && used >= ENOUGH - MAXD)
- return 1;
-
- /* point entry in root table to sub-table */
- low = huff & mask;
- (*table)[low].op = (unsigned char)curr;
- (*table)[low].bits = (unsigned char)root;
- (*table)[low].val = (unsigned short)(next - *table);
- }
- }
-
- /*
- Fill in rest of table for incomplete codes. This loop is similar to the
- loop above in incrementing huff for table indices. It is assumed that
- len is equal to curr + drop, so there is no loop needed to increment
- through high index bits. When the current sub-table is filled, the loop
- drops back to the root table to fill in any remaining entries there.
- */
- this.op = (unsigned char)64; /* invalid code marker */
- this.bits = (unsigned char)(len - drop);
- this.val = (unsigned short)0;
- while (huff != 0) {
- /* when done with sub-table, drop back to root table */
- if (drop != 0 && (huff & mask) != low) {
- drop = 0;
- len = root;
- next = *table;
- this.bits = (unsigned char)len;
- }
-
- /* put invalid code marker in table */
- next[huff >> drop] = this;
-
- /* backwards increment the len-bit code huff */
- incr = 1U << (len - 1);
- while (huff & incr)
- incr >>= 1;
- if (incr != 0) {
- huff &= incr - 1;
- huff += incr;
- }
- else
- huff = 0;
- }
-
- /* set return parameters */
- *table += used;
- *bits = root;
- return 0;
-}
diff --git a/WebCore/platform/image-decoders/zlib/inftrees.h b/WebCore/platform/image-decoders/zlib/inftrees.h
deleted file mode 100644
index b1104c8..0000000
--- a/WebCore/platform/image-decoders/zlib/inftrees.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* inftrees.h -- header to use inftrees.c
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/* Structure for decoding tables. Each entry provides either the
- information needed to do the operation requested by the code that
- indexed that table entry, or it provides a pointer to another
- table that indexes more bits of the code. op indicates whether
- the entry is a pointer to another table, a literal, a length or
- distance, an end-of-block, or an invalid code. For a table
- pointer, the low four bits of op is the number of index bits of
- that table. For a length or distance, the low four bits of op
- is the number of extra bits to get after the code. bits is
- the number of bits in this code or part of the code to drop off
- of the bit buffer. val is the actual byte to output in the case
- of a literal, the base length or distance, or the offset from
- the current table to the next table. Each entry is four bytes. */
-typedef struct {
- unsigned char op; /* operation, extra bits, table bits */
- unsigned char bits; /* bits in this part of the code */
- unsigned short val; /* offset in table or code value */
-} code;
-
-/* op values as set by inflate_table():
- 00000000 - literal
- 0000tttt - table link, tttt != 0 is the number of table index bits
- 0001eeee - length or distance, eeee is the number of extra bits
- 01100000 - end of block
- 01000000 - invalid code
- */
-
-/* Maximum size of dynamic tree. The maximum found in a long but non-
- exhaustive search was 1444 code structures (852 for length/literals
- and 592 for distances, the latter actually the result of an
- exhaustive search). The true maximum is not known, but the value
- below is more than safe. */
-#define ENOUGH 2048
-#define MAXD 592
-
-/* Type of code to build for inftable() */
-typedef enum {
- CODES,
- LENS,
- DISTS
-} codetype;
-
-extern int inflate_table OF((codetype type, unsigned short FAR *lens,
- unsigned codes, code FAR * FAR *table,
- unsigned FAR *bits, unsigned short FAR *work));
diff --git a/WebCore/platform/image-decoders/zlib/mozzconf.h b/WebCore/platform/image-decoders/zlib/mozzconf.h
deleted file mode 100644
index 118185c..0000000
--- a/WebCore/platform/image-decoders/zlib/mozzconf.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the mozilla zlib configuration.
- *
- * The Initial Developer of the Original Code is IBM Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef MOZZCONF_H
-#define MOZZCONF_H
-
-#if defined(XP_WIN) && defined(ZLIB_DLL) && !defined(MOZ_ENABLE_LIBXUL)
-#undef ZLIB_DLL
-#endif
-
-#ifdef HAVE_VISIBILITY_ATTRIBUTE
-#define ZEXTERN __attribute__((visibility ("default"))) extern
-#endif
-
-/* Exported Symbols */
-#define zlibVersion MOZ_Z_zlibVersion
-#define deflate MOZ_Z_deflate
-#define deflateEnd MOZ_Z_deflateEnd
-#define inflate MOZ_Z_inflate
-#define inflateEnd MOZ_Z_inflateEnd
-#define deflateSetDictionary MOZ_Z_deflateSetDictionary
-#define deflateCopy MOZ_Z_deflateCopy
-#define deflateReset MOZ_Z_deflateReset
-#define deflateParams MOZ_Z_deflateParams
-#define deflateBound MOZ_Z_deflateBound
-#define deflatePrime MOZ_Z_deflatePrime
-#define inflateSetDictionary MOZ_Z_inflateSetDictionary
-#define inflateSync MOZ_Z_inflateSync
-#define inflateCopy MOZ_Z_inflateCopy
-#define inflateReset MOZ_Z_inflateReset
-#define inflateBack MOZ_Z_inflateBack
-#define inflateBackEnd MOZ_Z_inflateBackEnd
-#define zlibCompileFlags MOZ_Z_zlibCompileFlags
-#define compress MOZ_Z_compress
-#define compress2 MOZ_Z_compress2
-#define compressBound MOZ_Z_compressBound
-#define uncompress MOZ_Z_uncompress
-#define gzopen MOZ_Z_gzopen
-#define gzdopen MOZ_Z_gzdopen
-#define gzsetparams MOZ_Z_gzsetparams
-#define gzread MOZ_Z_gzread
-#define gzwrite MOZ_Z_gzwrite
-#define gzprintf MOZ_Z_gzprintf
-#define gzputs MOZ_Z_gzputs
-#define gzgets MOZ_Z_gzgets
-#define gzputc MOZ_Z_gzputc
-#define gzgetc MOZ_Z_gzgetc
-#define gzungetc MOZ_Z_gzungetc
-#define gzflush MOZ_Z_gzflush
-#define gzseek MOZ_Z_gzseek
-#define gzrewind MOZ_Z_gzrewind
-#define gztell MOZ_Z_gztell
-#define gzeof MOZ_Z_gzeof
-#define gzclose MOZ_Z_gzclose
-#define gzerror MOZ_Z_gzerror
-#define gzclearerr MOZ_Z_gzclearerr
-#define adler32 MOZ_Z_adler32
-#define crc32 MOZ_Z_crc32
-#define deflateInit_ MOZ_Z_deflateInit_
-#define deflateInit2_ MOZ_Z_deflateInit2_
-#define inflateInit_ MOZ_Z_inflateInit_
-#define inflateInit2_ MOZ_Z_inflateInit2_
-#define inflateBackInit_ MOZ_Z_inflateBackInit_
-#define inflateSyncPoint MOZ_Z_inflateSyncPoint
-#define get_crc_table MOZ_Z_get_crc_table
-#define zError MOZ_Z_zError
-
-/* Extra global symbols */
-#define _dist_code MOZ_Z__dist_code
-#define _length_code MOZ_Z__length_code
-#define _tr_align MOZ_Z__tr_align
-#define _tr_flush_block MOZ_Z__tr_flush_block
-#define _tr_init MOZ_Z__tr_init
-#define _tr_stored_block MOZ_Z__tr_stored_block
-#define _tr_tally MOZ_Z__tr_tally
-#define deflate_copyright MOZ_Z_deflate_copyright
-#define inflate_copyright MOZ_Z_inflate_copyright
-#define inflate_fast MOZ_Z_inflate_fast
-#define inflate_table MOZ_Z_inflate_table
-#define z_errmsg MOZ_Z_z_errmsg
-#define zcalloc MOZ_Z_zcalloc
-#define zcfree MOZ_Z_zcfree
-#define alloc_func MOZ_Z_alloc_func
-#define free_func MOZ_Z_free_func
-#define in_func MOZ_Z_in_func
-#define out_func MOZ_Z_out_func
-
-/* New as of libpng-1.2.3 */
-#define adler32_combine MOZ_Z_adler32_combine
-#define crc32_combine MOZ_Z_crc32_combine
-#define deflateSetHeader MOZ_Z_deflateSetHeader
-#define deflateTune MOZ_Z_deflateTune
-#define gzdirect MOZ_Z_gzdirect
-#define inflatePrime MOZ_Z_inflatePrime
-#define inflateGetHeader MOZ_Z_inflateGetHeader
-
-#endif
diff --git a/WebCore/platform/image-decoders/zlib/trees.c b/WebCore/platform/image-decoders/zlib/trees.c
deleted file mode 100644
index 0cbfae2..0000000
--- a/WebCore/platform/image-decoders/zlib/trees.c
+++ /dev/null
@@ -1,1219 +0,0 @@
-/* trees.c -- output deflated data using Huffman coding
- * Copyright (C) 1995-2005 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * ALGORITHM
- *
- * The "deflation" process uses several Huffman trees. The more
- * common source values are represented by shorter bit sequences.
- *
- * Each code tree is stored in a compressed form which is itself
- * a Huffman encoding of the lengths of all the code strings (in
- * ascending order by source values). The actual code strings are
- * reconstructed from the lengths in the inflate process, as described
- * in the deflate specification.
- *
- * REFERENCES
- *
- * Deutsch, L.P.,"'Deflate' Compressed Data Format Specification".
- * Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc
- *
- * Storer, James A.
- * Data Compression: Methods and Theory, pp. 49-50.
- * Computer Science Press, 1988. ISBN 0-7167-8156-5.
- *
- * Sedgewick, R.
- * Algorithms, p290.
- * Addison-Wesley, 1983. ISBN 0-201-06672-6.
- */
-
-/* @(#) $Id: trees.c,v 3.6 2005/08/04 19:14:14 tor%cs.brown.edu Exp $ */
-
-/* #define GEN_TREES_H */
-
-#include "deflate.h"
-
-#ifdef DEBUG
-# include <ctype.h>
-#endif
-
-/* ===========================================================================
- * Constants
- */
-
-#define MAX_BL_BITS 7
-/* Bit length codes must not exceed MAX_BL_BITS bits */
-
-#define END_BLOCK 256
-/* end of block literal code */
-
-#define REP_3_6 16
-/* repeat previous bit length 3-6 times (2 bits of repeat count) */
-
-#define REPZ_3_10 17
-/* repeat a zero length 3-10 times (3 bits of repeat count) */
-
-#define REPZ_11_138 18
-/* repeat a zero length 11-138 times (7 bits of repeat count) */
-
-local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
- = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};
-
-local const int extra_dbits[D_CODES] /* extra bits for each distance code */
- = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
-
-local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
- = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7};
-
-local const uch bl_order[BL_CODES]
- = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};
-/* The lengths of the bit length codes are sent in order of decreasing
- * probability, to avoid transmitting the lengths for unused bit length codes.
- */
-
-#define Buf_size (8 * 2*sizeof(char))
-/* Number of bits used within bi_buf. (bi_buf might be implemented on
- * more than 16 bits on some systems.)
- */
-
-/* ===========================================================================
- * Local data. These are initialized only once.
- */
-
-#define DIST_CODE_LEN 512 /* see definition of array dist_code below */
-
-#if defined(GEN_TREES_H) || !defined(STDC)
-/* non ANSI compilers may not accept trees.h */
-
-local ct_data static_ltree[L_CODES+2];
-/* The static literal tree. Since the bit lengths are imposed, there is no
- * need for the L_CODES extra codes used during heap construction. However
- * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
- * below).
- */
-
-local ct_data static_dtree[D_CODES];
-/* The static distance tree. (Actually a trivial tree since all codes use
- * 5 bits.)
- */
-
-uch _dist_code[DIST_CODE_LEN];
-/* Distance codes. The first 256 values correspond to the distances
- * 3 .. 258, the last 256 values correspond to the top 8 bits of
- * the 15 bit distances.
- */
-
-uch _length_code[MAX_MATCH-MIN_MATCH+1];
-/* length code for each normalized match length (0 == MIN_MATCH) */
-
-local int base_length[LENGTH_CODES];
-/* First normalized length for each code (0 = MIN_MATCH) */
-
-local int base_dist[D_CODES];
-/* First normalized distance for each code (0 = distance of 1) */
-
-#else
-# include "trees.h"
-#endif /* GEN_TREES_H */
-
-struct static_tree_desc_s {
- const ct_data *static_tree; /* static tree or NULL */
- const intf *extra_bits; /* extra bits for each code or NULL */
- int extra_base; /* base index for extra_bits */
- int elems; /* max number of elements in the tree */
- int max_length; /* max bit length for the codes */
-};
-
-local static_tree_desc static_l_desc =
-{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};
-
-local static_tree_desc static_d_desc =
-{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS};
-
-local static_tree_desc static_bl_desc =
-{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS};
-
-/* ===========================================================================
- * Local (static) routines in this file.
- */
-
-local void tr_static_init OF((void));
-local void init_block OF((deflate_state *s));
-local void pqdownheap OF((deflate_state *s, ct_data *tree, int k));
-local void gen_bitlen OF((deflate_state *s, tree_desc *desc));
-local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count));
-local void build_tree OF((deflate_state *s, tree_desc *desc));
-local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code));
-local void send_tree OF((deflate_state *s, ct_data *tree, int max_code));
-local int build_bl_tree OF((deflate_state *s));
-local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
- int blcodes));
-local void compress_block OF((deflate_state *s, ct_data *ltree,
- ct_data *dtree));
-local void set_data_type OF((deflate_state *s));
-local unsigned bi_reverse OF((unsigned value, int length));
-local void bi_windup OF((deflate_state *s));
-local void bi_flush OF((deflate_state *s));
-local void copy_block OF((deflate_state *s, charf *buf, unsigned len,
- int header));
-
-#ifdef GEN_TREES_H
-local void gen_trees_header OF((void));
-#endif
-
-#ifndef DEBUG
-# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
- /* Send a code of the given tree. c and tree must not have side effects */
-
-#else /* DEBUG */
-# define send_code(s, c, tree) \
- { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
- send_bits(s, tree[c].Code, tree[c].Len); }
-#endif
-
-/* ===========================================================================
- * Output a short LSB first on the stream.
- * IN assertion: there is enough room in pendingBuf.
- */
-#define put_short(s, w) { \
- put_byte(s, (uch)((w) & 0xff)); \
- put_byte(s, (uch)((ush)(w) >> 8)); \
-}
-
-/* ===========================================================================
- * Send a value on a given number of bits.
- * IN assertion: length <= 16 and value fits in length bits.
- */
-#ifdef DEBUG
-local void send_bits OF((deflate_state *s, int value, int length));
-
-local void send_bits(s, value, length)
- deflate_state *s;
- int value; /* value to send */
- int length; /* number of bits */
-{
- Tracevv((stderr," l %2d v %4x ", length, value));
- Assert(length > 0 && length <= 15, "invalid length");
- s->bits_sent += (ulg)length;
-
- /* If not enough room in bi_buf, use (valid) bits from bi_buf and
- * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))
- * unused bits in value.
- */
- if (s->bi_valid > (int)Buf_size - length) {
- s->bi_buf |= (value << s->bi_valid);
- put_short(s, s->bi_buf);
- s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
- s->bi_valid += length - Buf_size;
- } else {
- s->bi_buf |= value << s->bi_valid;
- s->bi_valid += length;
- }
-}
-#else /* !DEBUG */
-
-#define send_bits(s, value, length) \
-{ int len = length;\
- if (s->bi_valid > (int)Buf_size - len) {\
- int val = value;\
- s->bi_buf |= (val << s->bi_valid);\
- put_short(s, s->bi_buf);\
- s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
- s->bi_valid += len - Buf_size;\
- } else {\
- s->bi_buf |= (value) << s->bi_valid;\
- s->bi_valid += len;\
- }\
-}
-#endif /* DEBUG */
-
-
-/* the arguments must not have side effects */
-
-/* ===========================================================================
- * Initialize the various 'constant' tables.
- */
-local void tr_static_init()
-{
-#if defined(GEN_TREES_H) || !defined(STDC)
- static int static_init_done = 0;
- int n; /* iterates over tree elements */
- int bits; /* bit counter */
- int length; /* length value */
- int code; /* code value */
- int dist; /* distance index */
- ush bl_count[MAX_BITS+1];
- /* number of codes at each bit length for an optimal tree */
-
- if (static_init_done) return;
-
- /* For some embedded targets, global variables are not initialized: */
- static_l_desc.static_tree = static_ltree;
- static_l_desc.extra_bits = extra_lbits;
- static_d_desc.static_tree = static_dtree;
- static_d_desc.extra_bits = extra_dbits;
- static_bl_desc.extra_bits = extra_blbits;
-
- /* Initialize the mapping length (0..255) -> length code (0..28) */
- length = 0;
- for (code = 0; code < LENGTH_CODES-1; code++) {
- base_length[code] = length;
- for (n = 0; n < (1<<extra_lbits[code]); n++) {
- _length_code[length++] = (uch)code;
- }
- }
- Assert (length == 256, "tr_static_init: length != 256");
- /* Note that the length 255 (match length 258) can be represented
- * in two different ways: code 284 + 5 bits or code 285, so we
- * overwrite length_code[255] to use the best encoding:
- */
- _length_code[length-1] = (uch)code;
-
- /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
- dist = 0;
- for (code = 0 ; code < 16; code++) {
- base_dist[code] = dist;
- for (n = 0; n < (1<<extra_dbits[code]); n++) {
- _dist_code[dist++] = (uch)code;
- }
- }
- Assert (dist == 256, "tr_static_init: dist != 256");
- dist >>= 7; /* from now on, all distances are divided by 128 */
- for ( ; code < D_CODES; code++) {
- base_dist[code] = dist << 7;
- for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {
- _dist_code[256 + dist++] = (uch)code;
- }
- }
- Assert (dist == 256, "tr_static_init: 256+dist != 512");
-
- /* Construct the codes of the static literal tree */
- for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
- n = 0;
- while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++;
- while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++;
- while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++;
- while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++;
- /* Codes 286 and 287 do not exist, but we must include them in the
- * tree construction to get a canonical Huffman tree (longest code
- * all ones)
- */
- gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count);
-
- /* The static distance tree is trivial: */
- for (n = 0; n < D_CODES; n++) {
- static_dtree[n].Len = 5;
- static_dtree[n].Code = bi_reverse((unsigned)n, 5);
- }
- static_init_done = 1;
-
-# ifdef GEN_TREES_H
- gen_trees_header();
-# endif
-#endif /* defined(GEN_TREES_H) || !defined(STDC) */
-}
-
-/* ===========================================================================
- * Genererate the file trees.h describing the static trees.
- */
-#ifdef GEN_TREES_H
-# ifndef DEBUG
-# include <stdio.h>
-# endif
-
-# define SEPARATOR(i, last, width) \
- ((i) == (last)? "\n};\n\n" : \
- ((i) % (width) == (width)-1 ? ",\n" : ", "))
-
-void gen_trees_header()
-{
- FILE *header = fopen("trees.h", "w");
- int i;
-
- Assert (header != NULL, "Can't open trees.h");
- fprintf(header,
- "/* header created automatically with -DGEN_TREES_H */\n\n");
-
- fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n");
- for (i = 0; i < L_CODES+2; i++) {
- fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code,
- static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5));
- }
-
- fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n");
- for (i = 0; i < D_CODES; i++) {
- fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code,
- static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5));
- }
-
- fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n");
- for (i = 0; i < DIST_CODE_LEN; i++) {
- fprintf(header, "%2u%s", _dist_code[i],
- SEPARATOR(i, DIST_CODE_LEN-1, 20));
- }
-
- fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
- for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) {
- fprintf(header, "%2u%s", _length_code[i],
- SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20));
- }
-
- fprintf(header, "local const int base_length[LENGTH_CODES] = {\n");
- for (i = 0; i < LENGTH_CODES; i++) {
- fprintf(header, "%1u%s", base_length[i],
- SEPARATOR(i, LENGTH_CODES-1, 20));
- }
-
- fprintf(header, "local const int base_dist[D_CODES] = {\n");
- for (i = 0; i < D_CODES; i++) {
- fprintf(header, "%5u%s", base_dist[i],
- SEPARATOR(i, D_CODES-1, 10));
- }
-
- fclose(header);
-}
-#endif /* GEN_TREES_H */
-
-/* ===========================================================================
- * Initialize the tree data structures for a new zlib stream.
- */
-void _tr_init(s)
- deflate_state *s;
-{
- tr_static_init();
-
- s->l_desc.dyn_tree = s->dyn_ltree;
- s->l_desc.stat_desc = &static_l_desc;
-
- s->d_desc.dyn_tree = s->dyn_dtree;
- s->d_desc.stat_desc = &static_d_desc;
-
- s->bl_desc.dyn_tree = s->bl_tree;
- s->bl_desc.stat_desc = &static_bl_desc;
-
- s->bi_buf = 0;
- s->bi_valid = 0;
- s->last_eob_len = 8; /* enough lookahead for inflate */
-#ifdef DEBUG
- s->compressed_len = 0L;
- s->bits_sent = 0L;
-#endif
-
- /* Initialize the first block of the first file: */
- init_block(s);
-}
-
-/* ===========================================================================
- * Initialize a new block.
- */
-local void init_block(s)
- deflate_state *s;
-{
- int n; /* iterates over tree elements */
-
- /* Initialize the trees. */
- for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0;
- for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0;
- for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
-
- s->dyn_ltree[END_BLOCK].Freq = 1;
- s->opt_len = s->static_len = 0L;
- s->last_lit = s->matches = 0;
-}
-
-#define SMALLEST 1
-/* Index within the heap array of least frequent node in the Huffman tree */
-
-
-/* ===========================================================================
- * Remove the smallest element from the heap and recreate the heap with
- * one less element. Updates heap and heap_len.
- */
-#define pqremove(s, tree, top) \
-{\
- top = s->heap[SMALLEST]; \
- s->heap[SMALLEST] = s->heap[s->heap_len--]; \
- pqdownheap(s, tree, SMALLEST); \
-}
-
-/* ===========================================================================
- * Compares to subtrees, using the tree depth as tie breaker when
- * the subtrees have equal frequency. This minimizes the worst case length.
- */
-#define smaller(tree, n, m, depth) \
- (tree[n].Freq < tree[m].Freq || \
- (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
-
-/* ===========================================================================
- * Restore the heap property by moving down the tree starting at node k,
- * exchanging a node with the smallest of its two sons if necessary, stopping
- * when the heap property is re-established (each father smaller than its
- * two sons).
- */
-local void pqdownheap(s, tree, k)
- deflate_state *s;
- ct_data *tree; /* the tree to restore */
- int k; /* node to move down */
-{
- int v = s->heap[k];
- int j = k << 1; /* left son of k */
- while (j <= s->heap_len) {
- /* Set j to the smallest of the two sons: */
- if (j < s->heap_len &&
- smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
- j++;
- }
- /* Exit if v is smaller than both sons */
- if (smaller(tree, v, s->heap[j], s->depth)) break;
-
- /* Exchange v with the smallest son */
- s->heap[k] = s->heap[j]; k = j;
-
- /* And continue down the tree, setting j to the left son of k */
- j <<= 1;
- }
- s->heap[k] = v;
-}
-
-/* ===========================================================================
- * Compute the optimal bit lengths for a tree and update the total bit length
- * for the current block.
- * IN assertion: the fields freq and dad are set, heap[heap_max] and
- * above are the tree nodes sorted by increasing frequency.
- * OUT assertions: the field len is set to the optimal bit length, the
- * array bl_count contains the frequencies for each bit length.
- * The length opt_len is updated; static_len is also updated if stree is
- * not null.
- */
-local void gen_bitlen(s, desc)
- deflate_state *s;
- tree_desc *desc; /* the tree descriptor */
-{
- ct_data *tree = desc->dyn_tree;
- int max_code = desc->max_code;
- const ct_data *stree = desc->stat_desc->static_tree;
- const intf *extra = desc->stat_desc->extra_bits;
- int base = desc->stat_desc->extra_base;
- int max_length = desc->stat_desc->max_length;
- int h; /* heap index */
- int n, m; /* iterate over the tree elements */
- int bits; /* bit length */
- int xbits; /* extra bits */
- ush f; /* frequency */
- int overflow = 0; /* number of elements with bit length too large */
-
- for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
-
- /* In a first pass, compute the optimal bit lengths (which may
- * overflow in the case of the bit length tree).
- */
- tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
-
- for (h = s->heap_max+1; h < HEAP_SIZE; h++) {
- n = s->heap[h];
- bits = tree[tree[n].Dad].Len + 1;
- if (bits > max_length) bits = max_length, overflow++;
- tree[n].Len = (ush)bits;
- /* We overwrite tree[n].Dad which is no longer needed */
-
- if (n > max_code) continue; /* not a leaf node */
-
- s->bl_count[bits]++;
- xbits = 0;
- if (n >= base) xbits = extra[n-base];
- f = tree[n].Freq;
- s->opt_len += (ulg)f * (bits + xbits);
- if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits);
- }
- if (overflow == 0) return;
-
- Trace((stderr,"\nbit length overflow\n"));
- /* This happens for example on obj2 and pic of the Calgary corpus */
-
- /* Find the first bit length which could increase: */
- do {
- bits = max_length-1;
- while (s->bl_count[bits] == 0) bits--;
- s->bl_count[bits]--; /* move one leaf down the tree */
- s->bl_count[bits+1] += 2; /* move one overflow item as its brother */
- s->bl_count[max_length]--;
- /* The brother of the overflow item also moves one step up,
- * but this does not affect bl_count[max_length]
- */
- overflow -= 2;
- } while (overflow > 0);
-
- /* Now recompute all bit lengths, scanning in increasing frequency.
- * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
- * lengths instead of fixing only the wrong ones. This idea is taken
- * from 'ar' written by Haruhiko Okumura.)
- */
- for (bits = max_length; bits != 0; bits--) {
- n = s->bl_count[bits];
- while (n != 0) {
- m = s->heap[--h];
- if (m > max_code) continue;
- if ((unsigned) tree[m].Len != (unsigned) bits) {
- Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
- s->opt_len += ((long)bits - (long)tree[m].Len)
- *(long)tree[m].Freq;
- tree[m].Len = (ush)bits;
- }
- n--;
- }
- }
-}
-
-/* ===========================================================================
- * Generate the codes for a given tree and bit counts (which need not be
- * optimal).
- * IN assertion: the array bl_count contains the bit length statistics for
- * the given tree and the field len is set for all tree elements.
- * OUT assertion: the field code is set for all tree elements of non
- * zero code length.
- */
-local void gen_codes (tree, max_code, bl_count)
- ct_data *tree; /* the tree to decorate */
- int max_code; /* largest code with non zero frequency */
- ushf *bl_count; /* number of codes at each bit length */
-{
- ush next_code[MAX_BITS+1]; /* next code value for each bit length */
- ush code = 0; /* running code value */
- int bits; /* bit index */
- int n; /* code index */
-
- /* The distribution counts are first used to generate the code values
- * without bit reversal.
- */
- for (bits = 1; bits <= MAX_BITS; bits++) {
- next_code[bits] = code = (code + bl_count[bits-1]) << 1;
- }
- /* Check that the bit counts in bl_count are consistent. The last code
- * must be all ones.
- */
- Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
- "inconsistent bit counts");
- Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
-
- for (n = 0; n <= max_code; n++) {
- int len = tree[n].Len;
- if (len == 0) continue;
- /* Now reverse the bits */
- tree[n].Code = bi_reverse(next_code[len]++, len);
-
- Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
- n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
- }
-}
-
-/* ===========================================================================
- * Construct one Huffman tree and assigns the code bit strings and lengths.
- * Update the total bit length for the current block.
- * IN assertion: the field freq is set for all tree elements.
- * OUT assertions: the fields len and code are set to the optimal bit length
- * and corresponding code. The length opt_len is updated; static_len is
- * also updated if stree is not null. The field max_code is set.
- */
-local void build_tree(s, desc)
- deflate_state *s;
- tree_desc *desc; /* the tree descriptor */
-{
- ct_data *tree = desc->dyn_tree;
- const ct_data *stree = desc->stat_desc->static_tree;
- int elems = desc->stat_desc->elems;
- int n, m; /* iterate over heap elements */
- int max_code = -1; /* largest code with non zero frequency */
- int node; /* new node being created */
-
- /* Construct the initial heap, with least frequent element in
- * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
- * heap[0] is not used.
- */
- s->heap_len = 0, s->heap_max = HEAP_SIZE;
-
- for (n = 0; n < elems; n++) {
- if (tree[n].Freq != 0) {
- s->heap[++(s->heap_len)] = max_code = n;
- s->depth[n] = 0;
- } else {
- tree[n].Len = 0;
- }
- }
-
- /* The pkzip format requires that at least one distance code exists,
- * and that at least one bit should be sent even if there is only one
- * possible code. So to avoid special checks later on we force at least
- * two codes of non zero frequency.
- */
- while (s->heap_len < 2) {
- node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
- tree[node].Freq = 1;
- s->depth[node] = 0;
- s->opt_len--; if (stree) s->static_len -= stree[node].Len;
- /* node is 0 or 1 so it does not have extra bits */
- }
- desc->max_code = max_code;
-
- /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
- * establish sub-heaps of increasing lengths:
- */
- for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);
-
- /* Construct the Huffman tree by repeatedly combining the least two
- * frequent nodes.
- */
- node = elems; /* next internal node of the tree */
- do {
- pqremove(s, tree, n); /* n = node of least frequency */
- m = s->heap[SMALLEST]; /* m = node of next least frequency */
-
- s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
- s->heap[--(s->heap_max)] = m;
-
- /* Create a new node father of n and m */
- tree[node].Freq = tree[n].Freq + tree[m].Freq;
- s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ?
- s->depth[n] : s->depth[m]) + 1);
- tree[n].Dad = tree[m].Dad = (ush)node;
-#ifdef DUMP_BL_TREE
- if (tree == s->bl_tree) {
- fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)",
- node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
- }
-#endif
- /* and insert the new node in the heap */
- s->heap[SMALLEST] = node++;
- pqdownheap(s, tree, SMALLEST);
-
- } while (s->heap_len >= 2);
-
- s->heap[--(s->heap_max)] = s->heap[SMALLEST];
-
- /* At this point, the fields freq and dad are set. We can now
- * generate the bit lengths.
- */
- gen_bitlen(s, (tree_desc *)desc);
-
- /* The field len is now set, we can generate the bit codes */
- gen_codes ((ct_data *)tree, max_code, s->bl_count);
-}
-
-/* ===========================================================================
- * Scan a literal or distance tree to determine the frequencies of the codes
- * in the bit length tree.
- */
-local void scan_tree (s, tree, max_code)
- deflate_state *s;
- ct_data *tree; /* the tree to be scanned */
- int max_code; /* and its largest code of non zero frequency */
-{
- int n; /* iterates over all tree elements */
- int prevlen = -1; /* last emitted length */
- int curlen; /* length of current code */
- int nextlen = tree[0].Len; /* length of next code */
- int count = 0; /* repeat count of the current code */
- int max_count = 7; /* max repeat count */
- int min_count = 4; /* min repeat count */
-
- if (nextlen == 0) max_count = 138, min_count = 3;
- tree[max_code+1].Len = (ush)0xffff; /* guard */
-
- for (n = 0; n <= max_code; n++) {
- curlen = nextlen; nextlen = tree[n+1].Len;
- if (++count < max_count && curlen == nextlen) {
- continue;
- } else if (count < min_count) {
- s->bl_tree[curlen].Freq += count;
- } else if (curlen != 0) {
- if (curlen != prevlen) s->bl_tree[curlen].Freq++;
- s->bl_tree[REP_3_6].Freq++;
- } else if (count <= 10) {
- s->bl_tree[REPZ_3_10].Freq++;
- } else {
- s->bl_tree[REPZ_11_138].Freq++;
- }
- count = 0; prevlen = curlen;
- if (nextlen == 0) {
- max_count = 138, min_count = 3;
- } else if (curlen == nextlen) {
- max_count = 6, min_count = 3;
- } else {
- max_count = 7, min_count = 4;
- }
- }
-}
-
-/* ===========================================================================
- * Send a literal or distance tree in compressed form, using the codes in
- * bl_tree.
- */
-local void send_tree (s, tree, max_code)
- deflate_state *s;
- ct_data *tree; /* the tree to be scanned */
- int max_code; /* and its largest code of non zero frequency */
-{
- int n; /* iterates over all tree elements */
- int prevlen = -1; /* last emitted length */
- int curlen; /* length of current code */
- int nextlen = tree[0].Len; /* length of next code */
- int count = 0; /* repeat count of the current code */
- int max_count = 7; /* max repeat count */
- int min_count = 4; /* min repeat count */
-
- /* tree[max_code+1].Len = -1; */ /* guard already set */
- if (nextlen == 0) max_count = 138, min_count = 3;
-
- for (n = 0; n <= max_code; n++) {
- curlen = nextlen; nextlen = tree[n+1].Len;
- if (++count < max_count && curlen == nextlen) {
- continue;
- } else if (count < min_count) {
- do { send_code(s, curlen, s->bl_tree); } while (--count != 0);
-
- } else if (curlen != 0) {
- if (curlen != prevlen) {
- send_code(s, curlen, s->bl_tree); count--;
- }
- Assert(count >= 3 && count <= 6, " 3_6?");
- send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2);
-
- } else if (count <= 10) {
- send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3);
-
- } else {
- send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7);
- }
- count = 0; prevlen = curlen;
- if (nextlen == 0) {
- max_count = 138, min_count = 3;
- } else if (curlen == nextlen) {
- max_count = 6, min_count = 3;
- } else {
- max_count = 7, min_count = 4;
- }
- }
-}
-
-/* ===========================================================================
- * Construct the Huffman tree for the bit lengths and return the index in
- * bl_order of the last bit length code to send.
- */
-local int build_bl_tree(s)
- deflate_state *s;
-{
- int max_blindex; /* index of last bit length code of non zero freq */
-
- /* Determine the bit length frequencies for literal and distance trees */
- scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);
- scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);
-
- /* Build the bit length tree: */
- build_tree(s, (tree_desc *)(&(s->bl_desc)));
- /* opt_len now includes the length of the tree representations, except
- * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
- */
-
- /* Determine the number of bit length codes to send. The pkzip format
- * requires that at least 4 bit length codes be sent. (appnote.txt says
- * 3 but the actual value used is 4.)
- */
- for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
- if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
- }
- /* Update opt_len to include the bit length tree and counts */
- s->opt_len += 3*(max_blindex+1) + 5+5+4;
- Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
- s->opt_len, s->static_len));
-
- return max_blindex;
-}
-
-/* ===========================================================================
- * Send the header for a block using dynamic Huffman trees: the counts, the
- * lengths of the bit length codes, the literal tree and the distance tree.
- * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
- */
-local void send_all_trees(s, lcodes, dcodes, blcodes)
- deflate_state *s;
- int lcodes, dcodes, blcodes; /* number of codes for each tree */
-{
- int rank; /* index in bl_order */
-
- Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
- Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
- "too many codes");
- Tracev((stderr, "\nbl counts: "));
- send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */
- send_bits(s, dcodes-1, 5);
- send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */
- for (rank = 0; rank < blcodes; rank++) {
- Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
- send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);
- }
- Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
-
- send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */
- Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
-
- send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */
- Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
-}
-
-/* ===========================================================================
- * Send a stored block
- */
-void _tr_stored_block(s, buf, stored_len, eof)
- deflate_state *s;
- charf *buf; /* input block */
- ulg stored_len; /* length of input block */
- int eof; /* true if this is the last block for a file */
-{
- send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */
-#ifdef DEBUG
- s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
- s->compressed_len += (stored_len + 4) << 3;
-#endif
- copy_block(s, buf, (unsigned)stored_len, 1); /* with header */
-}
-
-/* ===========================================================================
- * Send one empty static block to give enough lookahead for inflate.
- * This takes 10 bits, of which 7 may remain in the bit buffer.
- * The current inflate code requires 9 bits of lookahead. If the
- * last two codes for the previous block (real code plus EOB) were coded
- * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode
- * the last real code. In this case we send two empty static blocks instead
- * of one. (There are no problems if the previous block is stored or fixed.)
- * To simplify the code, we assume the worst case of last real code encoded
- * on one bit only.
- */
-void _tr_align(s)
- deflate_state *s;
-{
- send_bits(s, STATIC_TREES<<1, 3);
- send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
- s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
-#endif
- bi_flush(s);
- /* Of the 10 bits for the empty block, we have already sent
- * (10 - bi_valid) bits. The lookahead for the last real code (before
- * the EOB of the previous block) was thus at least one plus the length
- * of the EOB plus what we have just sent of the empty static block.
- */
- if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
- send_bits(s, STATIC_TREES<<1, 3);
- send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
- s->compressed_len += 10L;
-#endif
- bi_flush(s);
- }
- s->last_eob_len = 7;
-}
-
-/* ===========================================================================
- * Determine the best encoding for the current block: dynamic trees, static
- * trees or store, and output the encoded block to the zip file.
- */
-void _tr_flush_block(s, buf, stored_len, eof)
- deflate_state *s;
- charf *buf; /* input block, or NULL if too old */
- ulg stored_len; /* length of input block */
- int eof; /* true if this is the last block for a file */
-{
- ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
- int max_blindex = 0; /* index of last bit length code of non zero freq */
-
- /* Build the Huffman trees unless a stored block is forced */
- if (s->level > 0) {
-
- /* Check if the file is binary or text */
- if (stored_len > 0 && s->strm->data_type == Z_UNKNOWN)
- set_data_type(s);
-
- /* Construct the literal and distance trees */
- build_tree(s, (tree_desc *)(&(s->l_desc)));
- Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
- s->static_len));
-
- build_tree(s, (tree_desc *)(&(s->d_desc)));
- Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
- s->static_len));
- /* At this point, opt_len and static_len are the total bit lengths of
- * the compressed block data, excluding the tree representations.
- */
-
- /* Build the bit length tree for the above two trees, and get the index
- * in bl_order of the last bit length code to send.
- */
- max_blindex = build_bl_tree(s);
-
- /* Determine the best encoding. Compute the block lengths in bytes. */
- opt_lenb = (s->opt_len+3+7)>>3;
- static_lenb = (s->static_len+3+7)>>3;
-
- Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
- opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
- s->last_lit));
-
- if (static_lenb <= opt_lenb) opt_lenb = static_lenb;
-
- } else {
- Assert(buf != (char*)0, "lost buf");
- opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
- }
-
-#ifdef FORCE_STORED
- if (buf != (char*)0) { /* force stored block */
-#else
- if (stored_len+4 <= opt_lenb && buf != (char*)0) {
- /* 4: two words for the lengths */
-#endif
- /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
- * Otherwise we can't have processed more than WSIZE input bytes since
- * the last block flush, because compression would have been
- * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
- * transform a block into a stored block.
- */
- _tr_stored_block(s, buf, stored_len, eof);
-
-#ifdef FORCE_STATIC
- } else if (static_lenb >= 0) { /* force static trees */
-#else
- } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) {
-#endif
- send_bits(s, (STATIC_TREES<<1)+eof, 3);
- compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
-#ifdef DEBUG
- s->compressed_len += 3 + s->static_len;
-#endif
- } else {
- send_bits(s, (DYN_TREES<<1)+eof, 3);
- send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
- max_blindex+1);
- compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
-#ifdef DEBUG
- s->compressed_len += 3 + s->opt_len;
-#endif
- }
- Assert (s->compressed_len == s->bits_sent, "bad compressed size");
- /* The above check is made mod 2^32, for files larger than 512 MB
- * and uLong implemented on 32 bits.
- */
- init_block(s);
-
- if (eof) {
- bi_windup(s);
-#ifdef DEBUG
- s->compressed_len += 7; /* align on byte boundary */
-#endif
- }
- Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
- s->compressed_len-7*eof));
-}
-
-/* ===========================================================================
- * Save the match info and tally the frequency counts. Return true if
- * the current block must be flushed.
- */
-int _tr_tally (s, dist, lc)
- deflate_state *s;
- unsigned dist; /* distance of matched string */
- unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
-{
- s->d_buf[s->last_lit] = (ush)dist;
- s->l_buf[s->last_lit++] = (uch)lc;
- if (dist == 0) {
- /* lc is the unmatched char */
- s->dyn_ltree[lc].Freq++;
- } else {
- s->matches++;
- /* Here, lc is the match length - MIN_MATCH */
- dist--; /* dist = match distance - 1 */
- Assert((ush)dist < (ush)MAX_DIST(s) &&
- (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
- (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
-
- s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++;
- s->dyn_dtree[d_code(dist)].Freq++;
- }
-
-#ifdef TRUNCATE_BLOCK
- /* Try to guess if it is profitable to stop the current block here */
- if ((s->last_lit & 0x1fff) == 0 && s->level > 2) {
- /* Compute an upper bound for the compressed length */
- ulg out_length = (ulg)s->last_lit*8L;
- ulg in_length = (ulg)((long)s->strstart - s->block_start);
- int dcode;
- for (dcode = 0; dcode < D_CODES; dcode++) {
- out_length += (ulg)s->dyn_dtree[dcode].Freq *
- (5L+extra_dbits[dcode]);
- }
- out_length >>= 3;
- Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
- s->last_lit, in_length, out_length,
- 100L - out_length*100L/in_length));
- if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1;
- }
-#endif
- return (s->last_lit == s->lit_bufsize-1);
- /* We avoid equality with lit_bufsize because of wraparound at 64K
- * on 16 bit machines and because stored blocks are restricted to
- * 64K-1 bytes.
- */
-}
-
-/* ===========================================================================
- * Send the block data compressed using the given Huffman trees
- */
-local void compress_block(s, ltree, dtree)
- deflate_state *s;
- ct_data *ltree; /* literal tree */
- ct_data *dtree; /* distance tree */
-{
- unsigned dist; /* distance of matched string */
- int lc; /* match length or unmatched char (if dist == 0) */
- unsigned lx = 0; /* running index in l_buf */
- unsigned code; /* the code to send */
- int extra; /* number of extra bits to send */
-
- if (s->last_lit != 0) do {
- dist = s->d_buf[lx];
- lc = s->l_buf[lx++];
- if (dist == 0) {
- send_code(s, lc, ltree); /* send a literal byte */
- Tracecv(isgraph(lc), (stderr," '%c' ", lc));
- } else {
- /* Here, lc is the match length - MIN_MATCH */
- code = _length_code[lc];
- send_code(s, code+LITERALS+1, ltree); /* send the length code */
- extra = extra_lbits[code];
- if (extra != 0) {
- lc -= base_length[code];
- send_bits(s, lc, extra); /* send the extra length bits */
- }
- dist--; /* dist is now the match distance - 1 */
- code = d_code(dist);
- Assert (code < D_CODES, "bad d_code");
-
- send_code(s, code, dtree); /* send the distance code */
- extra = extra_dbits[code];
- if (extra != 0) {
- dist -= base_dist[code];
- send_bits(s, dist, extra); /* send the extra distance bits */
- }
- } /* literal or match pair ? */
-
- /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
- Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
- "pendingBuf overflow");
-
- } while (lx < s->last_lit);
-
- send_code(s, END_BLOCK, ltree);
- s->last_eob_len = ltree[END_BLOCK].Len;
-}
-
-/* ===========================================================================
- * Set the data type to BINARY or TEXT, using a crude approximation:
- * set it to Z_TEXT if all symbols are either printable characters (33 to 255)
- * or white spaces (9 to 13, or 32); or set it to Z_BINARY otherwise.
- * IN assertion: the fields Freq of dyn_ltree are set.
- */
-local void set_data_type(s)
- deflate_state *s;
-{
- int n;
-
- for (n = 0; n < 9; n++)
- if (s->dyn_ltree[n].Freq != 0)
- break;
- if (n == 9)
- for (n = 14; n < 32; n++)
- if (s->dyn_ltree[n].Freq != 0)
- break;
- s->strm->data_type = (n == 32) ? Z_TEXT : Z_BINARY;
-}
-
-/* ===========================================================================
- * Reverse the first len bits of a code, using straightforward code (a faster
- * method would use a table)
- * IN assertion: 1 <= len <= 15
- */
-local unsigned bi_reverse(code, len)
- unsigned code; /* the value to invert */
- int len; /* its bit length */
-{
- register unsigned res = 0;
- do {
- res |= code & 1;
- code >>= 1, res <<= 1;
- } while (--len > 0);
- return res >> 1;
-}
-
-/* ===========================================================================
- * Flush the bit buffer, keeping at most 7 bits in it.
- */
-local void bi_flush(s)
- deflate_state *s;
-{
- if (s->bi_valid == 16) {
- put_short(s, s->bi_buf);
- s->bi_buf = 0;
- s->bi_valid = 0;
- } else if (s->bi_valid >= 8) {
- put_byte(s, (Byte)s->bi_buf);
- s->bi_buf >>= 8;
- s->bi_valid -= 8;
- }
-}
-
-/* ===========================================================================
- * Flush the bit buffer and align the output on a byte boundary
- */
-local void bi_windup(s)
- deflate_state *s;
-{
- if (s->bi_valid > 8) {
- put_short(s, s->bi_buf);
- } else if (s->bi_valid > 0) {
- put_byte(s, (Byte)s->bi_buf);
- }
- s->bi_buf = 0;
- s->bi_valid = 0;
-#ifdef DEBUG
- s->bits_sent = (s->bits_sent+7) & ~7;
-#endif
-}
-
-/* ===========================================================================
- * Copy a stored block, storing first the length and its
- * one's complement if requested.
- */
-local void copy_block(s, buf, len, header)
- deflate_state *s;
- charf *buf; /* the input data */
- unsigned len; /* its length */
- int header; /* true if block header must be written */
-{
- bi_windup(s); /* align on byte boundary */
- s->last_eob_len = 8; /* enough lookahead for inflate */
-
- if (header) {
- put_short(s, (ush)len);
- put_short(s, (ush)~len);
-#ifdef DEBUG
- s->bits_sent += 2*16;
-#endif
- }
-#ifdef DEBUG
- s->bits_sent += (ulg)len<<3;
-#endif
- while (len--) {
- put_byte(s, *buf++);
- }
-}
diff --git a/WebCore/platform/image-decoders/zlib/trees.h b/WebCore/platform/image-decoders/zlib/trees.h
deleted file mode 100644
index 72facf9..0000000
--- a/WebCore/platform/image-decoders/zlib/trees.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* header created automatically with -DGEN_TREES_H */
-
-local const ct_data static_ltree[L_CODES+2] = {
-{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}},
-{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}},
-{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}},
-{{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}},
-{{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}},
-{{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}},
-{{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}},
-{{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}},
-{{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}},
-{{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}},
-{{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}},
-{{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}},
-{{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}},
-{{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}},
-{{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}},
-{{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}},
-{{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}},
-{{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}},
-{{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}},
-{{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}},
-{{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}},
-{{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}},
-{{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}},
-{{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}},
-{{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}},
-{{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}},
-{{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}},
-{{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}},
-{{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}},
-{{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}},
-{{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}},
-{{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}},
-{{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}},
-{{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}},
-{{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}},
-{{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}},
-{{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}},
-{{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}},
-{{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}},
-{{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}},
-{{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}},
-{{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}},
-{{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}},
-{{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}},
-{{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}},
-{{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}},
-{{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}},
-{{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}},
-{{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}},
-{{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}},
-{{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}},
-{{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}},
-{{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}},
-{{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}},
-{{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}},
-{{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}},
-{{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}},
-{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}}
-};
-
-local const ct_data static_dtree[D_CODES] = {
-{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}},
-{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}},
-{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}},
-{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}},
-{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}},
-{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}
-};
-
-const uch _dist_code[DIST_CODE_LEN] = {
- 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8,
- 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10,
-10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
-11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
-12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13,
-13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17,
-18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
-23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
-};
-
-const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12,
-13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
-17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
-19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22,
-22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
-23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28
-};
-
-local const int base_length[LENGTH_CODES] = {
-0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
-64, 80, 96, 112, 128, 160, 192, 224, 0
-};
-
-local const int base_dist[D_CODES] = {
- 0, 1, 2, 3, 4, 6, 8, 12, 16, 24,
- 32, 48, 64, 96, 128, 192, 256, 384, 512, 768,
- 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576
-};
-
diff --git a/WebCore/platform/image-decoders/zlib/uncompr.c b/WebCore/platform/image-decoders/zlib/uncompr.c
deleted file mode 100644
index c3d7716..0000000
--- a/WebCore/platform/image-decoders/zlib/uncompr.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* uncompr.c -- decompress a memory buffer
- * Copyright (C) 1995-2003 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: uncompr.c,v 3.6 2005/08/04 19:14:14 tor%cs.brown.edu Exp $ */
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-/* ===========================================================================
- Decompresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be large enough to hold the
- entire uncompressed data. (The size of the uncompressed data must have
- been saved previously by the compressor and transmitted to the decompressor
- by some mechanism outside the scope of this compression library.)
- Upon exit, destLen is the actual size of the compressed buffer.
- This function can be used to decompress a whole file at once if the
- input file is mmap'ed.
-
- uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_BUF_ERROR if there was not enough room in the output
- buffer, or Z_DATA_ERROR if the input data was corrupted.
-*/
-int ZEXPORT uncompress (dest, destLen, source, sourceLen)
- Bytef *dest;
- uLongf *destLen;
- const Bytef *source;
- uLong sourceLen;
-{
- z_stream stream;
- int err;
-
- stream.next_in = (Bytef*)source;
- stream.avail_in = (uInt)sourceLen;
- /* Check for source > 64K on 16-bit machine: */
- if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
-
- stream.next_out = dest;
- stream.avail_out = (uInt)*destLen;
- if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
-
- stream.zalloc = (alloc_func)0;
- stream.zfree = (free_func)0;
-
- err = inflateInit(&stream);
- if (err != Z_OK) return err;
-
- err = inflate(&stream, Z_FINISH);
- if (err != Z_STREAM_END) {
- inflateEnd(&stream);
- if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0))
- return Z_DATA_ERROR;
- return err;
- }
- *destLen = stream.total_out;
-
- err = inflateEnd(&stream);
- return err;
-}
diff --git a/WebCore/platform/image-decoders/zlib/zconf.h b/WebCore/platform/image-decoders/zlib/zconf.h
deleted file mode 100644
index b0e17bb..0000000
--- a/WebCore/platform/image-decoders/zlib/zconf.h
+++ /dev/null
@@ -1,335 +0,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: zconf.h,v 3.9 2005/08/04 19:14:14 tor%cs.brown.edu Exp $ */
-
-#ifndef ZCONF_H
-#define ZCONF_H
-
-/* This include does prefixing as below, but with an updated set of names */
-#include "mozzconf.h"
-
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- */
-#ifdef Z_PREFIX
-# define deflateInit_ z_deflateInit_
-# define deflate z_deflate
-# define deflateEnd z_deflateEnd
-# define inflateInit_ z_inflateInit_
-# define inflate z_inflate
-# define inflateEnd z_inflateEnd
-# define deflateInit2_ z_deflateInit2_
-# define deflateSetDictionary z_deflateSetDictionary
-# define deflateCopy z_deflateCopy
-# define deflateReset z_deflateReset
-# define deflateParams z_deflateParams
-# define deflateBound z_deflateBound
-# define deflatePrime z_deflatePrime
-# define inflateInit2_ z_inflateInit2_
-# define inflateSetDictionary z_inflateSetDictionary
-# define inflateSync z_inflateSync
-# define inflateSyncPoint z_inflateSyncPoint
-# define inflateCopy z_inflateCopy
-# define inflateReset z_inflateReset
-# define inflateBack z_inflateBack
-# define inflateBackEnd z_inflateBackEnd
-# define compress z_compress
-# define compress2 z_compress2
-# define compressBound z_compressBound
-# define uncompress z_uncompress
-# define adler32 z_adler32
-# define crc32 z_crc32
-# define get_crc_table z_get_crc_table
-# define zError z_zError
-
-# define alloc_func z_alloc_func
-# define free_func z_free_func
-# define in_func z_in_func
-# define out_func z_out_func
-# define Byte z_Byte
-# define uInt z_uInt
-# define uLong z_uLong
-# define Bytef z_Bytef
-# define charf z_charf
-# define intf z_intf
-# define uIntf z_uIntf
-# define uLongf z_uLongf
-# define voidpf z_voidpf
-# define voidp z_voidp
-#endif
-
-#if defined(__MSDOS__) && !defined(MSDOS)
-# define MSDOS
-#endif
-#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
-# define OS2
-#endif
-#if defined(_WINDOWS) && !defined(WINDOWS)
-# define WINDOWS
-#endif
-#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
-# ifndef WIN32
-# define WIN32
-# endif
-#endif
-#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
-# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
-# ifndef SYS16BIT
-# define SYS16BIT
-# endif
-# endif
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#ifdef SYS16BIT
-# define MAXSEG_64K
-#endif
-#ifdef MSDOS
-# define UNALIGNED_OK
-#endif
-
-#ifdef __STDC_VERSION__
-# ifndef STDC
-# define STDC
-# endif
-# if __STDC_VERSION__ >= 199901L
-# ifndef STDC99
-# define STDC99
-# endif
-# endif
-#endif
-#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
-# define STDC
-#endif
-#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
-# define STDC
-#endif
-#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
-# define STDC
-#endif
-#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
-# define STDC
-#endif
-
-#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
-# define STDC
-#endif
-
-#ifndef STDC
-# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-# define const /* note: need a more gentle solution here */
-# endif
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-# define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-# ifdef MAXSEG_64K
-# define MAX_MEM_LEVEL 8
-# else
-# define MAX_MEM_LEVEL 9
-# endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-# define MAX_WBITS 15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
- (1 << (windowBits+2)) + (1 << (memLevel+9))
- that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
- make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
- The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
- /* Type declarations */
-
-#ifndef OF /* function prototypes */
-# ifdef STDC
-# define OF(args) args
-# else
-# define OF(args) ()
-# endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#ifdef SYS16BIT
-# if defined(M_I86SM) || defined(M_I86MM)
- /* MSC small or medium model */
-# define SMALL_MEDIUM
-# ifdef _MSC_VER
-# define FAR _far
-# else
-# define FAR far
-# endif
-# endif
-# if (defined(__SMALL__) || defined(__MEDIUM__))
- /* Turbo C small or medium model */
-# define SMALL_MEDIUM
-# ifdef __BORLANDC__
-# define FAR _far
-# else
-# define FAR far
-# endif
-# endif
-#endif
-
-#if defined(WINDOWS) || defined(WIN32)
- /* If building or using zlib as a DLL, define ZLIB_DLL.
- * This is not mandatory, but it offers a little performance increase.
- */
-# ifdef ZLIB_DLL
-# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
-# ifdef ZLIB_INTERNAL
-# define ZEXTERN extern __declspec(dllexport)
-# else
-# define ZEXTERN extern __declspec(dllimport)
-# endif
-# endif
-# endif /* ZLIB_DLL */
- /* If building or using zlib with the WINAPI/WINAPIV calling convention,
- * define ZLIB_WINAPI.
- * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
- */
-# ifdef ZLIB_WINAPI
-# ifdef FAR
-# undef FAR
-# endif
-# include <windows.h>
- /* No need for _export, use ZLIB.DEF instead. */
- /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-# define ZEXPORT WINAPI
-# ifdef WIN32
-# define ZEXPORTVA WINAPIV
-# else
-# define ZEXPORTVA FAR CDECL
-# endif
-# endif
-#endif
-
-#if defined (__BEOS__)
-# ifdef ZLIB_DLL
-# ifdef ZLIB_INTERNAL
-# define ZEXPORT __declspec(dllexport)
-# define ZEXPORTVA __declspec(dllexport)
-# else
-# define ZEXPORT __declspec(dllimport)
-# define ZEXPORTVA __declspec(dllimport)
-# endif
-# endif
-#endif
-
-#ifndef ZEXTERN
-# define ZEXTERN extern
-#endif
-#ifndef ZEXPORT
-# define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-# define ZEXPORTVA
-#endif
-
-#ifndef FAR
-# define FAR
-#endif
-
-#if !defined(__MACTYPES__)
-typedef unsigned char Byte; /* 8 bits */
-#endif
-typedef unsigned int uInt; /* 16 bits or more */
-typedef unsigned long uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
- /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-# define Bytef Byte FAR
-#else
- typedef Byte FAR Bytef;
-#endif
-typedef char FAR charf;
-typedef int FAR intf;
-typedef uInt FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
- typedef void const *voidpc;
- typedef void FAR *voidpf;
- typedef void *voidp;
-#else
- typedef Byte const *voidpc;
- typedef Byte FAR *voidpf;
- typedef Byte *voidp;
-#endif
-
-#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
-# include <sys/types.h> /* for off_t */
-# include <unistd.h> /* for SEEK_* and off_t */
-# ifdef VMS
-# include <unixio.h> /* for off_t */
-# endif
-# define z_off_t off_t
-#endif
-#ifndef SEEK_SET
-# define SEEK_SET 0 /* Seek from beginning of file. */
-# define SEEK_CUR 1 /* Seek from current position. */
-# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
-#endif
-#ifndef z_off_t
-# define z_off_t long
-#endif
-
-#if defined(__OS400__)
-# define NO_vsnprintf
-#endif
-
-#if defined(__MVS__)
-# define NO_vsnprintf
-# ifdef FAR
-# undef FAR
-# endif
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
-# pragma map(deflateInit_,"DEIN")
-# pragma map(deflateInit2_,"DEIN2")
-# pragma map(deflateEnd,"DEEND")
-# pragma map(deflateBound,"DEBND")
-# pragma map(inflateInit_,"ININ")
-# pragma map(inflateInit2_,"ININ2")
-# pragma map(inflateEnd,"INEND")
-# pragma map(inflateSync,"INSY")
-# pragma map(inflateSetDictionary,"INSEDI")
-# pragma map(compressBound,"CMBND")
-# pragma map(inflate_table,"INTABL")
-# pragma map(inflate_fast,"INFA")
-# pragma map(inflate_copyright,"INCOPY")
-#endif
-
-#endif /* ZCONF_H */
diff --git a/WebCore/platform/image-decoders/zlib/zlib.h b/WebCore/platform/image-decoders/zlib/zlib.h
deleted file mode 100644
index 0228179..0000000
--- a/WebCore/platform/image-decoders/zlib/zlib.h
+++ /dev/null
@@ -1,1357 +0,0 @@
-/* zlib.h -- interface of the 'zlib' general purpose compression library
- version 1.2.3, July 18th, 2005
-
- Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Jean-loup Gailly Mark Adler
- jloup@gzip.org madler@alumni.caltech.edu
-
-
- The data format used by the zlib library is described by RFCs (Request for
- Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
- (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
-*/
-
-#ifndef ZLIB_H
-#define ZLIB_H
-
-#include "zconf.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define ZLIB_VERSION "1.2.3"
-#define ZLIB_VERNUM 0x1230
-
-/*
- The 'zlib' compression library provides in-memory compression and
- decompression functions, including integrity checks of the uncompressed
- data. This version of the library supports only one compression method
- (deflation) but other algorithms will be added later and will have the same
- stream interface.
-
- Compression can be done in a single step if the buffers are large
- enough (for example if an input file is mmap'ed), or can be done by
- repeated calls of the compression function. In the latter case, the
- application must provide more input and/or consume the output
- (providing more output space) before each call.
-
- The compressed data format used by default by the in-memory functions is
- the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
- around a deflate stream, which is itself documented in RFC 1951.
-
- The library also supports reading and writing files in gzip (.gz) format
- with an interface similar to that of stdio using the functions that start
- with "gz". The gzip format is different from the zlib format. gzip is a
- gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
-
- This library can optionally read and write gzip streams in memory as well.
-
- The zlib format was designed to be compact and fast for use in memory
- and on communications channels. The gzip format was designed for single-
- file compression on file systems, has a larger header than zlib to maintain
- directory information, and uses a different, slower check method than zlib.
-
- The library does not install any signal handler. The decoder checks
- the consistency of the compressed data, so the library should never
- crash even in case of corrupted input.
-*/
-
-typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
-typedef void (*free_func) OF((voidpf opaque, voidpf address));
-
-struct internal_state;
-
-typedef struct z_stream_s {
- Bytef *next_in; /* next input byte */
- uInt avail_in; /* number of bytes available at next_in */
- uLong total_in; /* total nb of input bytes read so far */
-
- Bytef *next_out; /* next output byte should be put there */
- uInt avail_out; /* remaining free space at next_out */
- uLong total_out; /* total nb of bytes output so far */
-
- char *msg; /* last error message, NULL if no error */
- struct internal_state FAR *state; /* not visible by applications */
-
- alloc_func zalloc; /* used to allocate the internal state */
- free_func zfree; /* used to free the internal state */
- voidpf opaque; /* private data object passed to zalloc and zfree */
-
- int data_type; /* best guess about the data type: binary or text */
- uLong adler; /* adler32 value of the uncompressed data */
- uLong reserved; /* reserved for future use */
-} z_stream;
-
-typedef z_stream FAR *z_streamp;
-
-/*
- gzip header information passed to and from zlib routines. See RFC 1952
- for more details on the meanings of these fields.
-*/
-typedef struct gz_header_s {
- int text; /* true if compressed data believed to be text */
- uLong time; /* modification time */
- int xflags; /* extra flags (not used when writing a gzip file) */
- int os; /* operating system */
- Bytef *extra; /* pointer to extra field or Z_NULL if none */
- uInt extra_len; /* extra field length (valid if extra != Z_NULL) */
- uInt extra_max; /* space at extra (only when reading header) */
- Bytef *name; /* pointer to zero-terminated file name or Z_NULL */
- uInt name_max; /* space at name (only when reading header) */
- Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */
- uInt comm_max; /* space at comment (only when reading header) */
- int hcrc; /* true if there was or will be a header crc */
- int done; /* true when done reading gzip header (not used
- when writing a gzip file) */
-} gz_header;
-
-typedef gz_header FAR *gz_headerp;
-
-/*
- The application must update next_in and avail_in when avail_in has
- dropped to zero. It must update next_out and avail_out when avail_out
- has dropped to zero. The application must initialize zalloc, zfree and
- opaque before calling the init function. All other fields are set by the
- compression library and must not be updated by the application.
-
- The opaque value provided by the application will be passed as the first
- parameter for calls of zalloc and zfree. This can be useful for custom
- memory management. The compression library attaches no meaning to the
- opaque value.
-
- zalloc must return Z_NULL if there is not enough memory for the object.
- If zlib is used in a multi-threaded application, zalloc and zfree must be
- thread safe.
-
- On 16-bit systems, the functions zalloc and zfree must be able to allocate
- exactly 65536 bytes, but will not be required to allocate more than this
- if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
- pointers returned by zalloc for objects of exactly 65536 bytes *must*
- have their offset normalized to zero. The default allocation function
- provided by this library ensures this (see zutil.c). To reduce memory
- requirements and avoid any allocation of 64K objects, at the expense of
- compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-
- The fields total_in and total_out can be used for statistics or
- progress reports. After compression, total_in holds the total size of
- the uncompressed data and may be saved for use in the decompressor
- (particularly if the decompressor wants to decompress everything in
- a single step).
-*/
-
- /* constants */
-
-#define Z_NO_FLUSH 0
-#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
-#define Z_SYNC_FLUSH 2
-#define Z_FULL_FLUSH 3
-#define Z_FINISH 4
-#define Z_BLOCK 5
-/* Allowed flush values; see deflate() and inflate() below for details */
-
-#define Z_OK 0
-#define Z_STREAM_END 1
-#define Z_NEED_DICT 2
-#define Z_ERRNO (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR (-3)
-#define Z_MEM_ERROR (-4)
-#define Z_BUF_ERROR (-5)
-#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION 0
-#define Z_BEST_SPEED 1
-#define Z_BEST_COMPRESSION 9
-#define Z_DEFAULT_COMPRESSION (-1)
-/* compression levels */
-
-#define Z_FILTERED 1
-#define Z_HUFFMAN_ONLY 2
-#define Z_RLE 3
-#define Z_FIXED 4
-#define Z_DEFAULT_STRATEGY 0
-/* compression strategy; see deflateInit2() below for details */
-
-#define Z_BINARY 0
-#define Z_TEXT 1
-#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */
-#define Z_UNKNOWN 2
-/* Possible values of the data_type field (though see inflate()) */
-
-#define Z_DEFLATED 8
-/* The deflate compression method (the only one supported in this version) */
-
-#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
-
-#define zlib_version zlibVersion()
-/* for compatibility with versions < 1.0.2 */
-
- /* basic functions */
-
-ZEXTERN const char * ZEXPORT zlibVersion OF((void));
-/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
- If the first character differs, the library code actually used is
- not compatible with the zlib.h header file used by the application.
- This check is automatically made by deflateInit and inflateInit.
- */
-
-/*
-ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
-
- Initializes the internal stream state for compression. The fields
- zalloc, zfree and opaque must be initialized before by the caller.
- If zalloc and zfree are set to Z_NULL, deflateInit updates them to
- use default allocation functions.
-
- The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
- 1 gives best speed, 9 gives best compression, 0 gives no compression at
- all (the input data is simply copied a block at a time).
- Z_DEFAULT_COMPRESSION requests a default compromise between speed and
- compression (currently equivalent to level 6).
-
- deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_STREAM_ERROR if level is not a valid compression level,
- Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
- with the version assumed by the caller (ZLIB_VERSION).
- msg is set to null if there is no error message. deflateInit does not
- perform any compression: this will be done by deflate().
-*/
-
-
-ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
-/*
- deflate compresses as much data as possible, and stops when the input
- buffer becomes empty or the output buffer becomes full. It may introduce some
- output latency (reading input without producing any output) except when
- forced to flush.
-
- The detailed semantics are as follows. deflate performs one or both of the
- following actions:
-
- - Compress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
- enough room in the output buffer), next_in and avail_in are updated and
- processing will resume at this point for the next call of deflate().
-
- - Provide more output starting at next_out and update next_out and avail_out
- accordingly. This action is forced if the parameter flush is non zero.
- Forcing flush frequently degrades the compression ratio, so this parameter
- should be set only when necessary (in interactive applications).
- Some output may be provided even if flush is not set.
-
- Before the call of deflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating avail_in or avail_out accordingly; avail_out
- should never be zero before the call. The application can consume the
- compressed output when it wants, for example when the output buffer is full
- (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
- and with zero avail_out, it must be called again after making room in the
- output buffer because there might be more output pending.
-
- Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
- decide how much data to accumualte before producing output, in order to
- maximize compression.
-
- If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
- flushed to the output buffer and the output is aligned on a byte boundary, so
- that the decompressor can get all input data available so far. (In particular
- avail_in is zero after the call if enough output space has been provided
- before the call.) Flushing may degrade compression for some compression
- algorithms and so it should be used only when necessary.
-
- If flush is set to Z_FULL_FLUSH, all output is flushed as with
- Z_SYNC_FLUSH, and the compression state is reset so that decompression can
- restart from this point if previous compressed data has been damaged or if
- random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
- compression.
-
- If deflate returns with avail_out == 0, this function must be called again
- with the same value of the flush parameter and more output space (updated
- avail_out), until the flush is complete (deflate returns with non-zero
- avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
- avail_out is greater than six to avoid repeated flush markers due to
- avail_out == 0 on return.
-
- If the parameter flush is set to Z_FINISH, pending input is processed,
- pending output is flushed and deflate returns with Z_STREAM_END if there
- was enough output space; if deflate returns with Z_OK, this function must be
- called again with Z_FINISH and more output space (updated avail_out) but no
- more input data, until it returns with Z_STREAM_END or an error. After
- deflate has returned Z_STREAM_END, the only possible operations on the
- stream are deflateReset or deflateEnd.
-
- Z_FINISH can be used immediately after deflateInit if all the compression
- is to be done in a single step. In this case, avail_out must be at least
- the value returned by deflateBound (see below). If deflate does not return
- Z_STREAM_END, then it must be called again as described above.
-
- deflate() sets strm->adler to the adler32 checksum of all input read
- so far (that is, total_in bytes).
-
- deflate() may update strm->data_type if it can make a good guess about
- the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
- binary. This field is only for information purposes and does not affect
- the compression algorithm in any manner.
-
- deflate() returns Z_OK if some progress has been made (more input
- processed or more output produced), Z_STREAM_END if all input has been
- consumed and all output has been produced (only when flush is set to
- Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
- if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
- (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
- fatal, and deflate() can be called again with more input and more output
- space to continue compressing.
-*/
-
-
-ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
-/*
- All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
-
- deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
- stream state was inconsistent, Z_DATA_ERROR if the stream was freed
- prematurely (some input or output was discarded). In the error case,
- msg may be set but then points to a static string (which must not be
- deallocated).
-*/
-
-
-/*
-ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
-
- Initializes the internal stream state for decompression. The fields
- next_in, avail_in, zalloc, zfree and opaque must be initialized before by
- the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
- value depends on the compression method), inflateInit determines the
- compression method from the zlib header and allocates all data structures
- accordingly; otherwise the allocation will be deferred to the first call of
- inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to
- use default allocation functions.
-
- inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
- version assumed by the caller. msg is set to null if there is no error
- message. inflateInit does not perform any decompression apart from reading
- the zlib header if present: this will be done by inflate(). (So next_in and
- avail_in may be modified, but next_out and avail_out are unchanged.)
-*/
-
-
-ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
-/*
- inflate decompresses as much data as possible, and stops when the input
- buffer becomes empty or the output buffer becomes full. It may introduce
- some output latency (reading input without producing any output) except when
- forced to flush.
-
- The detailed semantics are as follows. inflate performs one or both of the
- following actions:
-
- - Decompress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
- enough room in the output buffer), next_in is updated and processing
- will resume at this point for the next call of inflate().
-
- - Provide more output starting at next_out and update next_out and avail_out
- accordingly. inflate() provides as much output as possible, until there
- is no more input data or no more space in the output buffer (see below
- about the flush parameter).
-
- Before the call of inflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating the next_* and avail_* values accordingly.
- The application can consume the uncompressed output when it wants, for
- example when the output buffer is full (avail_out == 0), or after each
- call of inflate(). If inflate returns Z_OK and with zero avail_out, it
- must be called again after making room in the output buffer because there
- might be more output pending.
-
- The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH,
- Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much
- output as possible to the output buffer. Z_BLOCK requests that inflate() stop
- if and when it gets to the next deflate block boundary. When decoding the
- zlib or gzip format, this will cause inflate() to return immediately after
- the header and before the first block. When doing a raw inflate, inflate()
- will go ahead and process the first block, and will return when it gets to
- the end of that block, or when it runs out of data.
-
- The Z_BLOCK option assists in appending to or combining deflate streams.
- Also to assist in this, on return inflate() will set strm->data_type to the
- number of unused bits in the last byte taken from strm->next_in, plus 64
- if inflate() is currently decoding the last block in the deflate stream,
- plus 128 if inflate() returned immediately after decoding an end-of-block
- code or decoding the complete header up to just before the first byte of the
- deflate stream. The end-of-block will not be indicated until all of the
- uncompressed data from that block has been written to strm->next_out. The
- number of unused bits may in general be greater than seven, except when
- bit 7 of data_type is set, in which case the number of unused bits will be
- less than eight.
-
- inflate() should normally be called until it returns Z_STREAM_END or an
- error. However if all decompression is to be performed in a single step
- (a single call of inflate), the parameter flush should be set to
- Z_FINISH. In this case all pending input is processed and all pending
- output is flushed; avail_out must be large enough to hold all the
- uncompressed data. (The size of the uncompressed data may have been saved
- by the compressor for this purpose.) The next operation on this stream must
- be inflateEnd to deallocate the decompression state. The use of Z_FINISH
- is never required, but can be used to inform inflate that a faster approach
- may be used for the single inflate() call.
-
- In this implementation, inflate() always flushes as much output as
- possible to the output buffer, and always uses the faster approach on the
- first call. So the only effect of the flush parameter in this implementation
- is on the return value of inflate(), as noted below, or when it returns early
- because Z_BLOCK is used.
-
- If a preset dictionary is needed after this call (see inflateSetDictionary
- below), inflate sets strm->adler to the adler32 checksum of the dictionary
- chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
- strm->adler to the adler32 checksum of all output produced so far (that is,
- total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
- below. At the end of the stream, inflate() checks that its computed adler32
- checksum is equal to that saved by the compressor and returns Z_STREAM_END
- only if the checksum is correct.
-
- inflate() will decompress and check either zlib-wrapped or gzip-wrapped
- deflate data. The header type is detected automatically. Any information
- contained in the gzip header is not retained, so applications that need that
- information should instead use raw inflate, see inflateInit2() below, or
- inflateBack() and perform their own processing of the gzip header and
- trailer.
-
- inflate() returns Z_OK if some progress has been made (more input processed
- or more output produced), Z_STREAM_END if the end of the compressed data has
- been reached and all uncompressed output has been produced, Z_NEED_DICT if a
- preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
- corrupted (input stream not conforming to the zlib format or incorrect check
- value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
- if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,
- Z_BUF_ERROR if no progress is possible or if there was not enough room in the
- output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
- inflate() can be called again with more input and more output space to
- continue decompressing. If Z_DATA_ERROR is returned, the application may then
- call inflateSync() to look for a good compression block if a partial recovery
- of the data is desired.
-*/
-
-
-ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
-/*
- All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
-
- inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
- was inconsistent. In the error case, msg may be set but then points to a
- static string (which must not be deallocated).
-*/
-
- /* Advanced functions */
-
-/*
- The following functions are needed only in some special applications.
-*/
-
-/*
-ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
- int level,
- int method,
- int windowBits,
- int memLevel,
- int strategy));
-
- This is another version of deflateInit with more compression options. The
- fields next_in, zalloc, zfree and opaque must be initialized before by
- the caller.
-
- The method parameter is the compression method. It must be Z_DEFLATED in
- this version of the library.
-
- The windowBits parameter is the base two logarithm of the window size
- (the size of the history buffer). It should be in the range 8..15 for this
- version of the library. Larger values of this parameter result in better
- compression at the expense of memory usage. The default value is 15 if
- deflateInit is used instead.
-
- windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
- determines the window size. deflate() will then generate raw deflate data
- with no zlib header or trailer, and will not compute an adler32 check value.
-
- windowBits can also be greater than 15 for optional gzip encoding. Add
- 16 to windowBits to write a simple gzip header and trailer around the
- compressed data instead of a zlib wrapper. The gzip header will have no
- file name, no extra data, no comment, no modification time (set to zero),
- no header crc, and the operating system will be set to 255 (unknown). If a
- gzip stream is being written, strm->adler is a crc32 instead of an adler32.
-
- The memLevel parameter specifies how much memory should be allocated
- for the internal compression state. memLevel=1 uses minimum memory but
- is slow and reduces compression ratio; memLevel=9 uses maximum memory
- for optimal speed. The default value is 8. See zconf.h for total memory
- usage as a function of windowBits and memLevel.
-
- The strategy parameter is used to tune the compression algorithm. Use the
- value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
- filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
- string match), or Z_RLE to limit match distances to one (run-length
- encoding). Filtered data consists mostly of small values with a somewhat
- random distribution. In this case, the compression algorithm is tuned to
- compress them better. The effect of Z_FILTERED is to force more Huffman
- coding and less string matching; it is somewhat intermediate between
- Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as
- Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy
- parameter only affects the compression ratio but not the correctness of the
- compressed output even if it is not set appropriately. Z_FIXED prevents the
- use of dynamic Huffman codes, allowing for a simpler decoder for special
- applications.
-
- deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
- method). msg is set to null if there is no error message. deflateInit2 does
- not perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
- const Bytef *dictionary,
- uInt dictLength));
-/*
- Initializes the compression dictionary from the given byte sequence
- without producing any compressed output. This function must be called
- immediately after deflateInit, deflateInit2 or deflateReset, before any
- call of deflate. The compressor and decompressor must use exactly the same
- dictionary (see inflateSetDictionary).
-
- The dictionary should consist of strings (byte sequences) that are likely
- to be encountered later in the data to be compressed, with the most commonly
- used strings preferably put towards the end of the dictionary. Using a
- dictionary is most useful when the data to be compressed is short and can be
- predicted with good accuracy; the data can then be compressed better than
- with the default empty dictionary.
-
- Depending on the size of the compression data structures selected by
- deflateInit or deflateInit2, a part of the dictionary may in effect be
- discarded, for example if the dictionary is larger than the window size in
- deflate or deflate2. Thus the strings most likely to be useful should be
- put at the end of the dictionary, not at the front. In addition, the
- current implementation of deflate will use at most the window size minus
- 262 bytes of the provided dictionary.
-
- Upon return of this function, strm->adler is set to the adler32 value
- of the dictionary; the decompressor may later use this value to determine
- which dictionary has been used by the compressor. (The adler32 value
- applies to the whole dictionary even if only a subset of the dictionary is
- actually used by the compressor.) If a raw deflate was requested, then the
- adler32 value is not computed and strm->adler is not set.
-
- deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
- parameter is invalid (such as NULL dictionary) or the stream state is
- inconsistent (for example if deflate has already been called for this stream
- or if the compression method is bsort). deflateSetDictionary does not
- perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
- z_streamp source));
-/*
- Sets the destination stream as a complete copy of the source stream.
-
- This function can be useful when several compression strategies will be
- tried, for example when there are several ways of pre-processing the input
- data with a filter. The streams that will be discarded should then be freed
- by calling deflateEnd. Note that deflateCopy duplicates the internal
- compression state which can be quite large, so this strategy is slow and
- can consume lots of memory.
-
- deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
- (such as zalloc being NULL). msg is left unchanged in both source and
- destination.
-*/
-
-ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
-/*
- This function is equivalent to deflateEnd followed by deflateInit,
- but does not free and reallocate all the internal compression state.
- The stream will keep the same compression level and any other attributes
- that may have been set by deflateInit2.
-
- deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
- int level,
- int strategy));
-/*
- Dynamically update the compression level and compression strategy. The
- interpretation of level and strategy is as in deflateInit2. This can be
- used to switch between compression and straight copy of the input data, or
- to switch to a different kind of input data requiring a different
- strategy. If the compression level is changed, the input available so far
- is compressed with the old level (and may be flushed); the new level will
- take effect only at the next call of deflate().
-
- Before the call of deflateParams, the stream state must be set as for
- a call of deflate(), since the currently available input may have to
- be compressed and flushed. In particular, strm->avail_out must be non-zero.
-
- deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
- stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
- if strm->avail_out was zero.
-*/
-
-ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
- int good_length,
- int max_lazy,
- int nice_length,
- int max_chain));
-/*
- Fine tune deflate's internal compression parameters. This should only be
- used by someone who understands the algorithm used by zlib's deflate for
- searching for the best matching string, and even then only by the most
- fanatic optimizer trying to squeeze out the last compressed bit for their
- specific input data. Read the deflate.c source code for the meaning of the
- max_lazy, good_length, nice_length, and max_chain parameters.
-
- deflateTune() can be called after deflateInit() or deflateInit2(), and
- returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
- */
-
-ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
- uLong sourceLen));
-/*
- deflateBound() returns an upper bound on the compressed size after
- deflation of sourceLen bytes. It must be called after deflateInit()
- or deflateInit2(). This would be used to allocate an output buffer
- for deflation in a single pass, and so would be called before deflate().
-*/
-
-ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
- int bits,
- int value));
-/*
- deflatePrime() inserts bits in the deflate output stream. The intent
- is that this function is used to start off the deflate output with the
- bits leftover from a previous deflate stream when appending to it. As such,
- this function can only be used for raw deflate, and must be used before the
- first deflate() call after a deflateInit2() or deflateReset(). bits must be
- less than or equal to 16, and that many of the least significant bits of
- value will be inserted in the output.
-
- deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent.
-*/
-
-ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
- gz_headerp head));
-/*
- deflateSetHeader() provides gzip header information for when a gzip
- stream is requested by deflateInit2(). deflateSetHeader() may be called
- after deflateInit2() or deflateReset() and before the first call of
- deflate(). The text, time, os, extra field, name, and comment information
- in the provided gz_header structure are written to the gzip header (xflag is
- ignored -- the extra flags are set according to the compression level). The
- caller must assure that, if not Z_NULL, name and comment are terminated with
- a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
- available there. If hcrc is true, a gzip header crc is included. Note that
- the current versions of the command-line version of gzip (up through version
- 1.3.x) do not support header crc's, and will report that it is a "multi-part
- gzip file" and give up.
-
- If deflateSetHeader is not used, the default gzip header has text false,
- the time set to zero, and os set to 255, with no extra, name, or comment
- fields. The gzip header is returned to the default state by deflateReset().
-
- deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
- int windowBits));
-
- This is another version of inflateInit with an extra parameter. The
- fields next_in, avail_in, zalloc, zfree and opaque must be initialized
- before by the caller.
-
- The windowBits parameter is the base two logarithm of the maximum window
- size (the size of the history buffer). It should be in the range 8..15 for
- this version of the library. The default value is 15 if inflateInit is used
- instead. windowBits must be greater than or equal to the windowBits value
- provided to deflateInit2() while compressing, or it must be equal to 15 if
- deflateInit2() was not used. If a compressed stream with a larger window
- size is given as input, inflate() will return with the error code
- Z_DATA_ERROR instead of trying to allocate a larger window.
-
- windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
- determines the window size. inflate() will then process raw deflate data,
- not looking for a zlib or gzip header, not generating a check value, and not
- looking for any check values for comparison at the end of the stream. This
- is for use with other formats that use the deflate compressed data format
- such as zip. Those formats provide their own check values. If a custom
- format is developed using the raw deflate format for compressed data, it is
- recommended that a check value such as an adler32 or a crc32 be applied to
- the uncompressed data as is done in the zlib, gzip, and zip formats. For
- most applications, the zlib format should be used as is. Note that comments
- above on the use in deflateInit2() applies to the magnitude of windowBits.
-
- windowBits can also be greater than 15 for optional gzip decoding. Add
- 32 to windowBits to enable zlib and gzip decoding with automatic header
- detection, or add 16 to decode only the gzip format (the zlib format will
- return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is
- a crc32 instead of an adler32.
-
- inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg
- is set to null if there is no error message. inflateInit2 does not perform
- any decompression apart from reading the zlib header if present: this will
- be done by inflate(). (So next_in and avail_in may be modified, but next_out
- and avail_out are unchanged.)
-*/
-
-ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
- const Bytef *dictionary,
- uInt dictLength));
-/*
- Initializes the decompression dictionary from the given uncompressed byte
- sequence. This function must be called immediately after a call of inflate,
- if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
- can be determined from the adler32 value returned by that call of inflate.
- The compressor and decompressor must use exactly the same dictionary (see
- deflateSetDictionary). For raw inflate, this function can be called
- immediately after inflateInit2() or inflateReset() and before any call of
- inflate() to set the dictionary. The application must insure that the
- dictionary that was used for compression is provided.
-
- inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
- parameter is invalid (such as NULL dictionary) or the stream state is
- inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
- expected one (incorrect adler32 value). inflateSetDictionary does not
- perform any decompression: this will be done by subsequent calls of
- inflate().
-*/
-
-ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
-/*
- Skips invalid compressed data until a full flush point (see above the
- description of deflate with Z_FULL_FLUSH) can be found, or until all
- available input is skipped. No output is provided.
-
- inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
- if no more input was provided, Z_DATA_ERROR if no flush point has been found,
- or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
- case, the application may save the current current value of total_in which
- indicates where valid compressed data was found. In the error case, the
- application may repeatedly call inflateSync, providing more input each time,
- until success or end of the input data.
-*/
-
-ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
- z_streamp source));
-/*
- Sets the destination stream as a complete copy of the source stream.
-
- This function can be useful when randomly accessing a large stream. The
- first pass through the stream can periodically record the inflate state,
- allowing restarting inflate at those points when randomly accessing the
- stream.
-
- inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
- (such as zalloc being NULL). msg is left unchanged in both source and
- destination.
-*/
-
-ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
-/*
- This function is equivalent to inflateEnd followed by inflateInit,
- but does not free and reallocate all the internal decompression state.
- The stream will keep attributes that may have been set by inflateInit2.
-
- inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
- int bits,
- int value));
-/*
- This function inserts bits in the inflate input stream. The intent is
- that this function is used to start inflating at a bit position in the
- middle of a byte. The provided bits will be used before any bytes are used
- from next_in. This function should only be used with raw inflate, and
- should be used before the first inflate() call after inflateInit2() or
- inflateReset(). bits must be less than or equal to 16, and that many of the
- least significant bits of value will be inserted in the input.
-
- inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent.
-*/
-
-ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
- gz_headerp head));
-/*
- inflateGetHeader() requests that gzip header information be stored in the
- provided gz_header structure. inflateGetHeader() may be called after
- inflateInit2() or inflateReset(), and before the first call of inflate().
- As inflate() processes the gzip stream, head->done is zero until the header
- is completed, at which time head->done is set to one. If a zlib stream is
- being decoded, then head->done is set to -1 to indicate that there will be
- no gzip header information forthcoming. Note that Z_BLOCK can be used to
- force inflate() to return immediately after header processing is complete
- and before any actual data is decompressed.
-
- The text, time, xflags, and os fields are filled in with the gzip header
- contents. hcrc is set to true if there is a header CRC. (The header CRC
- was valid if done is set to one.) If extra is not Z_NULL, then extra_max
- contains the maximum number of bytes to write to extra. Once done is true,
- extra_len contains the actual extra field length, and extra contains the
- extra field, or that field truncated if extra_max is less than extra_len.
- If name is not Z_NULL, then up to name_max characters are written there,
- terminated with a zero unless the length is greater than name_max. If
- comment is not Z_NULL, then up to comm_max characters are written there,
- terminated with a zero unless the length is greater than comm_max. When
- any of extra, name, or comment are not Z_NULL and the respective field is
- not present in the header, then that field is set to Z_NULL to signal its
- absence. This allows the use of deflateSetHeader() with the returned
- structure to duplicate the header. However if those fields are set to
- allocated memory, then the application will need to save those pointers
- elsewhere so that they can be eventually freed.
-
- If inflateGetHeader is not used, then the header information is simply
- discarded. The header is always checked for validity, including the header
- CRC if present. inflateReset() will reset the process to discard the header
- information. The application would need to call inflateGetHeader() again to
- retrieve the header from the next gzip stream.
-
- inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
- unsigned char FAR *window));
-
- Initialize the internal stream state for decompression using inflateBack()
- calls. The fields zalloc, zfree and opaque in strm must be initialized
- before the call. If zalloc and zfree are Z_NULL, then the default library-
- derived memory allocation routines are used. windowBits is the base two
- logarithm of the window size, in the range 8..15. window is a caller
- supplied buffer of that size. Except for special applications where it is
- assured that deflate was used with small window sizes, windowBits must be 15
- and a 32K byte window must be supplied to be able to decompress general
- deflate streams.
-
- See inflateBack() for the usage of these routines.
-
- inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
- the paramaters are invalid, Z_MEM_ERROR if the internal state could not
- be allocated, or Z_VERSION_ERROR if the version of the library does not
- match the version of the header file.
-*/
-
-typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
-typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
-
-ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
- in_func in, void FAR *in_desc,
- out_func out, void FAR *out_desc));
-/*
- inflateBack() does a raw inflate with a single call using a call-back
- interface for input and output. This is more efficient than inflate() for
- file i/o applications in that it avoids copying between the output and the
- sliding window by simply making the window itself the output buffer. This
- function trusts the application to not change the output buffer passed by
- the output function, at least until inflateBack() returns.
-
- inflateBackInit() must be called first to allocate the internal state
- and to initialize the state with the user-provided window buffer.
- inflateBack() may then be used multiple times to inflate a complete, raw
- deflate stream with each call. inflateBackEnd() is then called to free
- the allocated state.
-
- A raw deflate stream is one with no zlib or gzip header or trailer.
- This routine would normally be used in a utility that reads zip or gzip
- files and writes out uncompressed files. The utility would decode the
- header and process the trailer on its own, hence this routine expects
- only the raw deflate stream to decompress. This is different from the
- normal behavior of inflate(), which expects either a zlib or gzip header and
- trailer around the deflate stream.
-
- inflateBack() uses two subroutines supplied by the caller that are then
- called by inflateBack() for input and output. inflateBack() calls those
- routines until it reads a complete deflate stream and writes out all of the
- uncompressed data, or until it encounters an error. The function's
- parameters and return types are defined above in the in_func and out_func
- typedefs. inflateBack() will call in(in_desc, &buf) which should return the
- number of bytes of provided input, and a pointer to that input in buf. If
- there is no input available, in() must return zero--buf is ignored in that
- case--and inflateBack() will return a buffer error. inflateBack() will call
- out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out()
- should return zero on success, or non-zero on failure. If out() returns
- non-zero, inflateBack() will return with an error. Neither in() nor out()
- are permitted to change the contents of the window provided to
- inflateBackInit(), which is also the buffer that out() uses to write from.
- The length written by out() will be at most the window size. Any non-zero
- amount of input may be provided by in().
-
- For convenience, inflateBack() can be provided input on the first call by
- setting strm->next_in and strm->avail_in. If that input is exhausted, then
- in() will be called. Therefore strm->next_in must be initialized before
- calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called
- immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in
- must also be initialized, and then if strm->avail_in is not zero, input will
- initially be taken from strm->next_in[0 .. strm->avail_in - 1].
-
- The in_desc and out_desc parameters of inflateBack() is passed as the
- first parameter of in() and out() respectively when they are called. These
- descriptors can be optionally used to pass any information that the caller-
- supplied in() and out() functions need to do their job.
-
- On return, inflateBack() will set strm->next_in and strm->avail_in to
- pass back any unused input that was provided by the last in() call. The
- return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
- if in() or out() returned an error, Z_DATA_ERROR if there was a format
- error in the deflate stream (in which case strm->msg is set to indicate the
- nature of the error), or Z_STREAM_ERROR if the stream was not properly
- initialized. In the case of Z_BUF_ERROR, an input or output error can be
- distinguished using strm->next_in which will be Z_NULL only if in() returned
- an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to
- out() returning non-zero. (in() will always be called before out(), so
- strm->next_in is assured to be defined if out() returns non-zero.) Note
- that inflateBack() cannot return Z_OK.
-*/
-
-ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
-/*
- All memory allocated by inflateBackInit() is freed.
-
- inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
- state was inconsistent.
-*/
-
-ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
-/* Return flags indicating compile-time options.
-
- Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
- 1.0: size of uInt
- 3.2: size of uLong
- 5.4: size of voidpf (pointer)
- 7.6: size of z_off_t
-
- Compiler, assembler, and debug options:
- 8: DEBUG
- 9: ASMV or ASMINF -- use ASM code
- 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
- 11: 0 (reserved)
-
- One-time table building (smaller code, but not thread-safe if true):
- 12: BUILDFIXED -- build static block decoding tables when needed
- 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
- 14,15: 0 (reserved)
-
- Library content (indicates missing functionality):
- 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
- deflate code when not needed)
- 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
- and decode gzip streams (to avoid linking crc code)
- 18-19: 0 (reserved)
-
- Operation variations (changes in library functionality):
- 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
- 21: FASTEST -- deflate algorithm with only one, lowest compression level
- 22,23: 0 (reserved)
-
- The sprintf variant used by gzprintf (zero is best):
- 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
- 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
- 26: 0 = returns value, 1 = void -- 1 means inferred string length returned
-
- Remainder:
- 27-31: 0 (reserved)
- */
-
-
- /* utility functions */
-
-/*
- The following utility functions are implemented on top of the
- basic stream-oriented functions. To simplify the interface, some
- default options are assumed (compression level and memory usage,
- standard memory allocation functions). The source code of these
- utility functions can easily be modified if you need special options.
-*/
-
-ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen));
-/*
- Compresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be at least the value returned
- by compressBound(sourceLen). Upon exit, destLen is the actual size of the
- compressed buffer.
- This function can be used to compress a whole file at once if the
- input file is mmap'ed.
- compress returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_BUF_ERROR if there was not enough room in the output
- buffer.
-*/
-
-ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen,
- int level));
-/*
- Compresses the source buffer into the destination buffer. The level
- parameter has the same meaning as in deflateInit. sourceLen is the byte
- length of the source buffer. Upon entry, destLen is the total size of the
- destination buffer, which must be at least the value returned by
- compressBound(sourceLen). Upon exit, destLen is the actual size of the
- compressed buffer.
-
- compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_BUF_ERROR if there was not enough room in the output buffer,
- Z_STREAM_ERROR if the level parameter is invalid.
-*/
-
-ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
-/*
- compressBound() returns an upper bound on the compressed size after
- compress() or compress2() on sourceLen bytes. It would be used before
- a compress() or compress2() call to allocate the destination buffer.
-*/
-
-ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen));
-/*
- Decompresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be large enough to hold the
- entire uncompressed data. (The size of the uncompressed data must have
- been saved previously by the compressor and transmitted to the decompressor
- by some mechanism outside the scope of this compression library.)
- Upon exit, destLen is the actual size of the compressed buffer.
- This function can be used to decompress a whole file at once if the
- input file is mmap'ed.
-
- uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_BUF_ERROR if there was not enough room in the output
- buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
-*/
-
-
-typedef voidp gzFile;
-
-ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
-/*
- Opens a gzip (.gz) file for reading or writing. The mode parameter
- is as in fopen ("rb" or "wb") but can also include a compression level
- ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
- Huffman only compression as in "wb1h", or 'R' for run-length encoding
- as in "wb1R". (See the description of deflateInit2 for more information
- about the strategy parameter.)
-
- gzopen can be used to read a file which is not in gzip format; in this
- case gzread will directly read from the file without decompression.
-
- gzopen returns NULL if the file could not be opened or if there was
- insufficient memory to allocate the (de)compression state; errno
- can be checked to distinguish the two cases (if errno is zero, the
- zlib error is Z_MEM_ERROR). */
-
-ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
-/*
- gzdopen() associates a gzFile with the file descriptor fd. File
- descriptors are obtained from calls like open, dup, creat, pipe or
- fileno (in the file has been previously opened with fopen).
- The mode parameter is as in gzopen.
- The next call of gzclose on the returned gzFile will also close the
- file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
- descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
- gzdopen returns NULL if there was insufficient memory to allocate
- the (de)compression state.
-*/
-
-ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
-/*
- Dynamically update the compression level or strategy. See the description
- of deflateInit2 for the meaning of these parameters.
- gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
- opened for writing.
-*/
-
-ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
-/*
- Reads the given number of uncompressed bytes from the compressed file.
- If the input file was not in gzip format, gzread copies the given number
- of bytes into the buffer.
- gzread returns the number of uncompressed bytes actually read (0 for
- end of file, -1 for error). */
-
-ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
- voidpc buf, unsigned len));
-/*
- Writes the given number of uncompressed bytes into the compressed file.
- gzwrite returns the number of uncompressed bytes actually written
- (0 in case of error).
-*/
-
-ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
-/*
- Converts, formats, and writes the args to the compressed file under
- control of the format string, as in fprintf. gzprintf returns the number of
- uncompressed bytes actually written (0 in case of error). The number of
- uncompressed bytes written is limited to 4095. The caller should assure that
- this limit is not exceeded. If it is exceeded, then gzprintf() will return
- return an error (0) with nothing written. In this case, there may also be a
- buffer overflow with unpredictable consequences, which is possible only if
- zlib was compiled with the insecure functions sprintf() or vsprintf()
- because the secure snprintf() or vsnprintf() functions were not available.
-*/
-
-ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
-/*
- Writes the given null-terminated string to the compressed file, excluding
- the terminating null character.
- gzputs returns the number of characters written, or -1 in case of error.
-*/
-
-ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
-/*
- Reads bytes from the compressed file until len-1 characters are read, or
- a newline character is read and transferred to buf, or an end-of-file
- condition is encountered. The string is then terminated with a null
- character.
- gzgets returns buf, or Z_NULL in case of error.
-*/
-
-ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
-/*
- Writes c, converted to an unsigned char, into the compressed file.
- gzputc returns the value that was written, or -1 in case of error.
-*/
-
-ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
-/*
- Reads one byte from the compressed file. gzgetc returns this byte
- or -1 in case of end of file or error.
-*/
-
-ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
-/*
- Push one character back onto the stream to be read again later.
- Only one character of push-back is allowed. gzungetc() returns the
- character pushed, or -1 on failure. gzungetc() will fail if a
- character has been pushed but not read yet, or if c is -1. The pushed
- character will be discarded if the stream is repositioned with gzseek()
- or gzrewind().
-*/
-
-ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
-/*
- Flushes all pending output into the compressed file. The parameter
- flush is as in the deflate() function. The return value is the zlib
- error number (see function gzerror below). gzflush returns Z_OK if
- the flush parameter is Z_FINISH and all output could be flushed.
- gzflush should be called only when strictly necessary because it can
- degrade compression.
-*/
-
-ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
- z_off_t offset, int whence));
-/*
- Sets the starting position for the next gzread or gzwrite on the
- given compressed file. The offset represents a number of bytes in the
- uncompressed data stream. The whence parameter is defined as in lseek(2);
- the value SEEK_END is not supported.
- If the file is opened for reading, this function is emulated but can be
- extremely slow. If the file is opened for writing, only forward seeks are
- supported; gzseek then compresses a sequence of zeroes up to the new
- starting position.
-
- gzseek returns the resulting offset location as measured in bytes from
- the beginning of the uncompressed stream, or -1 in case of error, in
- particular if the file is opened for writing and the new starting position
- would be before the current position.
-*/
-
-ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
-/*
- Rewinds the given file. This function is supported only for reading.
-
- gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
-*/
-
-ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
-/*
- Returns the starting position for the next gzread or gzwrite on the
- given compressed file. This position represents a number of bytes in the
- uncompressed data stream.
-
- gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
-*/
-
-ZEXTERN int ZEXPORT gzeof OF((gzFile file));
-/*
- Returns 1 when EOF has previously been detected reading the given
- input stream, otherwise zero.
-*/
-
-ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
-/*
- Returns 1 if file is being read directly without decompression, otherwise
- zero.
-*/
-
-ZEXTERN int ZEXPORT gzclose OF((gzFile file));
-/*
- Flushes all pending output if necessary, closes the compressed file
- and deallocates all the (de)compression state. The return value is the zlib
- error number (see function gzerror below).
-*/
-
-ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
-/*
- Returns the error message for the last error which occurred on the
- given compressed file. errnum is set to zlib error number. If an
- error occurred in the file system and not in the compression library,
- errnum is set to Z_ERRNO and the application may consult errno
- to get the exact error code.
-*/
-
-ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
-/*
- Clears the error and end-of-file flags for file. This is analogous to the
- clearerr() function in stdio. This is useful for continuing to read a gzip
- file that is being written concurrently.
-*/
-
- /* checksum functions */
-
-/*
- These functions are not related to compression but are exported
- anyway because they might be useful in applications using the
- compression library.
-*/
-
-ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
-/*
- Update a running Adler-32 checksum with the bytes buf[0..len-1] and
- return the updated checksum. If buf is NULL, this function returns
- the required initial value for the checksum.
- An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
- much faster. Usage example:
-
- uLong adler = adler32(0L, Z_NULL, 0);
-
- while (read_buffer(buffer, length) != EOF) {
- adler = adler32(adler, buffer, length);
- }
- if (adler != original_adler) error();
-*/
-
-ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
- z_off_t len2));
-/*
- Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
- and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
- each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of
- seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
-*/
-
-ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
-/*
- Update a running CRC-32 with the bytes buf[0..len-1] and return the
- updated CRC-32. If buf is NULL, this function returns the required initial
- value for the for the crc. Pre- and post-conditioning (one's complement) is
- performed within this function so it shouldn't be done by the application.
- Usage example:
-
- uLong crc = crc32(0L, Z_NULL, 0);
-
- while (read_buffer(buffer, length) != EOF) {
- crc = crc32(crc, buffer, length);
- }
- if (crc != original_crc) error();
-*/
-
-ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
-
-/*
- Combine two CRC-32 check values into one. For two sequences of bytes,
- seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
- calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
- check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
- len2.
-*/
-
-
- /* various hacks, don't look :) */
-
-/* deflateInit and inflateInit are macros to allow checking the zlib version
- * and the compiler's view of z_stream:
- */
-ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
- const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
- const char *version, int stream_size));
-ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
- int windowBits, int memLevel,
- int strategy, const char *version,
- int stream_size));
-ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
- const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
- unsigned char FAR *window,
- const char *version,
- int stream_size));
-#define deflateInit(strm, level) \
- deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit(strm) \
- inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
-#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
- deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
- (strategy), ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit2(strm, windowBits) \
- inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
-#define inflateBackInit(strm, windowBits, window) \
- inflateBackInit_((strm), (windowBits), (window), \
- ZLIB_VERSION, sizeof(z_stream))
-
-
-#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
- struct internal_state {int dummy;}; /* hack for buggy compilers */
-#endif
-
-ZEXTERN const char * ZEXPORT zError OF((int));
-ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));
-ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ZLIB_H */
diff --git a/WebCore/platform/image-decoders/zlib/zutil.c b/WebCore/platform/image-decoders/zlib/zutil.c
deleted file mode 100644
index 4a51340..0000000
--- a/WebCore/platform/image-decoders/zlib/zutil.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: zutil.c,v 3.11 2005/08/04 19:14:14 tor%cs.brown.edu Exp $ */
-
-#include "zutil.h"
-
-#ifndef NO_DUMMY_DECL
-struct internal_state {int dummy;}; /* for buggy compilers */
-#endif
-
-const char * const z_errmsg[10] = {
-"need dictionary", /* Z_NEED_DICT 2 */
-"stream end", /* Z_STREAM_END 1 */
-"", /* Z_OK 0 */
-"file error", /* Z_ERRNO (-1) */
-"stream error", /* Z_STREAM_ERROR (-2) */
-"data error", /* Z_DATA_ERROR (-3) */
-"insufficient memory", /* Z_MEM_ERROR (-4) */
-"buffer error", /* Z_BUF_ERROR (-5) */
-"incompatible version",/* Z_VERSION_ERROR (-6) */
-""};
-
-
-const char * ZEXPORT zlibVersion()
-{
- return ZLIB_VERSION;
-}
-
-uLong ZEXPORT zlibCompileFlags()
-{
- uLong flags;
-
- flags = 0;
- switch (sizeof(uInt)) {
- case 2: break;
- case 4: flags += 1; break;
- case 8: flags += 2; break;
- default: flags += 3;
- }
- switch (sizeof(uLong)) {
- case 2: break;
- case 4: flags += 1 << 2; break;
- case 8: flags += 2 << 2; break;
- default: flags += 3 << 2;
- }
- switch (sizeof(voidpf)) {
- case 2: break;
- case 4: flags += 1 << 4; break;
- case 8: flags += 2 << 4; break;
- default: flags += 3 << 4;
- }
- switch (sizeof(z_off_t)) {
- case 2: break;
- case 4: flags += 1 << 6; break;
- case 8: flags += 2 << 6; break;
- default: flags += 3 << 6;
- }
-#ifdef DEBUG
- flags += 1 << 8;
-#endif
-#if defined(ASMV) || defined(ASMINF)
- flags += 1 << 9;
-#endif
-#ifdef ZLIB_WINAPI
- flags += 1 << 10;
-#endif
-#ifdef BUILDFIXED
- flags += 1 << 12;
-#endif
-#ifdef DYNAMIC_CRC_TABLE
- flags += 1 << 13;
-#endif
-#ifdef NO_GZCOMPRESS
- flags += 1L << 16;
-#endif
-#ifdef NO_GZIP
- flags += 1L << 17;
-#endif
-#ifdef PKZIP_BUG_WORKAROUND
- flags += 1L << 20;
-#endif
-#ifdef FASTEST
- flags += 1L << 21;
-#endif
-#ifdef STDC
-# ifdef NO_vsnprintf
- flags += 1L << 25;
-# ifdef HAS_vsprintf_void
- flags += 1L << 26;
-# endif
-# else
-# ifdef HAS_vsnprintf_void
- flags += 1L << 26;
-# endif
-# endif
-#else
- flags += 1L << 24;
-# ifdef NO_snprintf
- flags += 1L << 25;
-# ifdef HAS_sprintf_void
- flags += 1L << 26;
-# endif
-# else
-# ifdef HAS_snprintf_void
- flags += 1L << 26;
-# endif
-# endif
-#endif
- return flags;
-}
-
-#ifdef DEBUG
-
-# ifndef verbose
-# define verbose 0
-# endif
-int z_verbose = verbose;
-
-void z_error (m)
- char *m;
-{
- fprintf(stderr, "%s\n", m);
- exit(1);
-}
-#endif
-
-/* exported to allow conversion of error code to string for compress() and
- * uncompress()
- */
-const char * ZEXPORT zError(err)
- int err;
-{
- return ERR_MSG(err);
-}
-
-#if defined(_WIN32_WCE)
- /* The Microsoft C Run-Time Library for Windows CE doesn't have
- * errno. We define it as a global variable to simplify porting.
- * Its value is always 0 and should not be used.
- */
- int errno = 0;
-#endif
-
-#ifndef HAVE_MEMCPY
-
-void zmemcpy(dest, source, len)
- Bytef* dest;
- const Bytef* source;
- uInt len;
-{
- if (len == 0) return;
- do {
- *dest++ = *source++; /* ??? to be unrolled */
- } while (--len != 0);
-}
-
-int zmemcmp(s1, s2, len)
- const Bytef* s1;
- const Bytef* s2;
- uInt len;
-{
- uInt j;
-
- for (j = 0; j < len; j++) {
- if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;
- }
- return 0;
-}
-
-void zmemzero(dest, len)
- Bytef* dest;
- uInt len;
-{
- if (len == 0) return;
- do {
- *dest++ = 0; /* ??? to be unrolled */
- } while (--len != 0);
-}
-#endif
-
-
-#ifdef SYS16BIT
-
-#ifdef __TURBOC__
-/* Turbo C in 16-bit mode */
-
-# define MY_ZCALLOC
-
-/* Turbo C malloc() does not allow dynamic allocation of 64K bytes
- * and farmalloc(64K) returns a pointer with an offset of 8, so we
- * must fix the pointer. Warning: the pointer must be put back to its
- * original form in order to free it, use zcfree().
- */
-
-#define MAX_PTR 10
-/* 10*64K = 640K */
-
-local int next_ptr = 0;
-
-typedef struct ptr_table_s {
- voidpf org_ptr;
- voidpf new_ptr;
-} ptr_table;
-
-local ptr_table table[MAX_PTR];
-/* This table is used to remember the original form of pointers
- * to large buffers (64K). Such pointers are normalized with a zero offset.
- * Since MSDOS is not a preemptive multitasking OS, this table is not
- * protected from concurrent access. This hack doesn't work anyway on
- * a protected system like OS/2. Use Microsoft C instead.
- */
-
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
-{
- voidpf buf = opaque; /* just to make some compilers happy */
- ulg bsize = (ulg)items*size;
-
- /* If we allocate less than 65520 bytes, we assume that farmalloc
- * will return a usable pointer which doesn't have to be normalized.
- */
- if (bsize < 65520L) {
- buf = farmalloc(bsize);
- if (*(ush*)&buf != 0) return buf;
- } else {
- buf = farmalloc(bsize + 16L);
- }
- if (buf == NULL || next_ptr >= MAX_PTR) return NULL;
- table[next_ptr].org_ptr = buf;
-
- /* Normalize the pointer to seg:0 */
- *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;
- *(ush*)&buf = 0;
- table[next_ptr++].new_ptr = buf;
- return buf;
-}
-
-void zcfree (voidpf opaque, voidpf ptr)
-{
- int n;
- if (*(ush*)&ptr != 0) { /* object < 64K */
- farfree(ptr);
- return;
- }
- /* Find the original pointer */
- for (n = 0; n < next_ptr; n++) {
- if (ptr != table[n].new_ptr) continue;
-
- farfree(table[n].org_ptr);
- while (++n < next_ptr) {
- table[n-1] = table[n];
- }
- next_ptr--;
- return;
- }
- ptr = opaque; /* just to make some compilers happy */
- Assert(0, "zcfree: ptr not found");
-}
-
-#endif /* __TURBOC__ */
-
-
-#ifdef M_I86
-/* Microsoft C in 16-bit mode */
-
-# define MY_ZCALLOC
-
-#if (!defined(_MSC_VER) || (_MSC_VER <= 600))
-# define _halloc halloc
-# define _hfree hfree
-#endif
-
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
-{
- if (opaque) opaque = 0; /* to make compiler happy */
- return _halloc((long)items, size);
-}
-
-void zcfree (voidpf opaque, voidpf ptr)
-{
- if (opaque) opaque = 0; /* to make compiler happy */
- _hfree(ptr);
-}
-
-#endif /* M_I86 */
-
-#endif /* SYS16BIT */
-
-
-#ifndef MY_ZCALLOC /* Any system without a special alloc function */
-
-#ifndef STDC
-extern voidp malloc OF((uInt size));
-extern voidp calloc OF((uInt items, uInt size));
-extern void free OF((voidpf ptr));
-#endif
-
-voidpf zcalloc (opaque, items, size)
- voidpf opaque;
- unsigned items;
- unsigned size;
-{
- if (opaque) items += size - size; /* make compiler happy */
- return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
- (voidpf)calloc(items, size);
-}
-
-void zcfree (opaque, ptr)
- voidpf opaque;
- voidpf ptr;
-{
- free(ptr);
- if (opaque) return; /* make compiler happy */
-}
-
-#endif /* MY_ZCALLOC */
diff --git a/WebCore/platform/image-decoders/zlib/zutil.h b/WebCore/platform/image-decoders/zlib/zutil.h
deleted file mode 100644
index 8b26cef..0000000
--- a/WebCore/platform/image-decoders/zlib/zutil.h
+++ /dev/null
@@ -1,269 +0,0 @@
-/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/* @(#) $Id: zutil.h,v 3.10 2005/08/04 19:14:14 tor%cs.brown.edu Exp $ */
-
-#ifndef ZUTIL_H
-#define ZUTIL_H
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-#ifdef STDC
-# ifndef _WIN32_WCE
-# include <stddef.h>
-# endif
-# include <string.h>
-# include <stdlib.h>
-#endif
-#ifdef NO_ERRNO_H
-# ifdef _WIN32_WCE
- /* The Microsoft C Run-Time Library for Windows CE doesn't have
- * errno. We define it as a global variable to simplify porting.
- * Its value is always 0 and should not be used. We rename it to
- * avoid conflict with other libraries that use the same workaround.
- */
-# define errno z_errno
-# endif
- extern int errno;
-#else
-# ifndef _WIN32_WCE
-# include <errno.h>
-# endif
-#endif
-
-#ifndef local
-# define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-typedef unsigned char uch;
-typedef uch FAR uchf;
-typedef unsigned short ush;
-typedef ush FAR ushf;
-typedef unsigned long ulg;
-
-extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
-/* (size given to avoid silly warnings with Visual C++) */
-
-#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
-
-#define ERR_RETURN(strm,err) \
- return (strm->msg = (char*)ERR_MSG(err), (err))
-/* To be used only when the state is known to be valid */
-
- /* common constants */
-
-#ifndef DEF_WBITS
-# define DEF_WBITS MAX_WBITS
-#endif
-/* default windowBits for decompression. MAX_WBITS is for compression only */
-
-#if MAX_MEM_LEVEL >= 8
-# define DEF_MEM_LEVEL 8
-#else
-# define DEF_MEM_LEVEL MAX_MEM_LEVEL
-#endif
-/* default memLevel */
-
-#define STORED_BLOCK 0
-#define STATIC_TREES 1
-#define DYN_TREES 2
-/* The three kinds of block type */
-
-#define MIN_MATCH 3
-#define MAX_MATCH 258
-/* The minimum and maximum match lengths */
-
-#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
-
- /* target dependencies */
-
-#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
-# define OS_CODE 0x00
-# if defined(__TURBOC__) || defined(__BORLANDC__)
-# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
- /* Allow compilation with ANSI keywords only enabled */
- void _Cdecl farfree( void *block );
- void *_Cdecl farmalloc( unsigned long nbytes );
-# else
-# include <alloc.h>
-# endif
-# else /* MSC or DJGPP */
-# include <malloc.h>
-# endif
-#endif
-
-#ifdef AMIGA
-# define OS_CODE 0x01
-#endif
-
-#if defined(VAXC) || defined(VMS)
-# define OS_CODE 0x02
-# define F_OPEN(name, mode) \
- fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
-#endif
-
-#if defined(ATARI) || defined(atarist)
-# define OS_CODE 0x05
-#endif
-
-#ifdef OS2
-# define OS_CODE 0x06
-# ifdef M_I86
- #include <malloc.h>
-# endif
-#endif
-
-#if defined(MACOS) || defined(TARGET_OS_MAC)
-# define OS_CODE 0x07
-# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-# include <unix.h> /* for fdopen */
-# else
-# ifndef fdopen
-# define fdopen(fd,mode) NULL /* No fdopen() */
-# endif
-# endif
-#endif
-
-#ifdef TOPS20
-# define OS_CODE 0x0a
-#endif
-
-#ifdef WIN32
-# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */
-# define OS_CODE 0x0b
-# endif
-#endif
-
-#ifdef __50SERIES /* Prime/PRIMOS */
-# define OS_CODE 0x0f
-#endif
-
-#if defined(_BEOS_) || defined(RISCOS)
-# define fdopen(fd,mode) NULL /* No fdopen() */
-#endif
-
-#if (defined(_MSC_VER) && (_MSC_VER > 600))
-# if defined(_WIN32_WCE)
-# define fdopen(fd,mode) NULL /* No fdopen() */
-# ifndef _PTRDIFF_T_DEFINED
- typedef int ptrdiff_t;
-# define _PTRDIFF_T_DEFINED
-# endif
-# else
-# define fdopen(fd,type) _fdopen(fd,type)
-# endif
-#endif
-
- /* common defaults */
-
-#ifndef OS_CODE
-# define OS_CODE 0x03 /* assume Unix */
-#endif
-
-#ifndef F_OPEN
-# define F_OPEN(name, mode) fopen((name), (mode))
-#endif
-
- /* functions */
-
-#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
-# ifndef HAVE_VSNPRINTF
-# define HAVE_VSNPRINTF
-# endif
-#endif
-#if defined(__CYGWIN__)
-# ifndef HAVE_VSNPRINTF
-# define HAVE_VSNPRINTF
-# endif
-#endif
-#ifndef HAVE_VSNPRINTF
-# ifdef MSDOS
- /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
- but for now we just assume it doesn't. */
-# define NO_vsnprintf
-# endif
-# ifdef __TURBOC__
-# define NO_vsnprintf
-# endif
-# ifdef WIN32
- /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
-# if !defined(vsnprintf) && !defined(NO_vsnprintf)
-# define vsnprintf _vsnprintf
-# endif
-# endif
-# ifdef __SASC
-# define NO_vsnprintf
-# endif
-#endif
-#ifdef VMS
-# define NO_vsnprintf
-#endif
-
-#if defined(pyr)
-# define NO_MEMCPY
-#endif
-#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
- /* Use our own functions for small and medium model with MSC <= 5.0.
- * You may have to use the same strategy for Borland C (untested).
- * The __SC__ check is for Symantec.
- */
-# define NO_MEMCPY
-#endif
-#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
-# define HAVE_MEMCPY
-#endif
-#ifdef HAVE_MEMCPY
-# ifdef SMALL_MEDIUM /* MSDOS small or medium model */
-# define zmemcpy _fmemcpy
-# define zmemcmp _fmemcmp
-# define zmemzero(dest, len) _fmemset(dest, 0, len)
-# else
-# define zmemcpy memcpy
-# define zmemcmp memcmp
-# define zmemzero(dest, len) memset(dest, 0, len)
-# endif
-#else
- extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
- extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
- extern void zmemzero OF((Bytef* dest, uInt len));
-#endif
-
-/* Diagnostic functions */
-#ifdef DEBUG
-# include <stdio.h>
- extern int z_verbose;
- extern void z_error OF((char *m));
-# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
-# define Trace(x) {if (z_verbose>=0) fprintf x ;}
-# define Tracev(x) {if (z_verbose>0) fprintf x ;}
-# define Tracevv(x) {if (z_verbose>1) fprintf x ;}
-# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
-# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
-#else
-# define Assert(cond,msg)
-# define Trace(x)
-# define Tracev(x)
-# define Tracevv(x)
-# define Tracec(c,x)
-# define Tracecv(c,x)
-#endif
-
-
-voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
-void zcfree OF((voidpf opaque, voidpf ptr));
-
-#define ZALLOC(strm, items, size) \
- (*((strm)->zalloc))((strm)->opaque, (items), (size))
-#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
-#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
-
-#endif /* ZUTIL_H */
diff --git a/WebCore/platform/mac/GeolocationServiceMac.mm b/WebCore/platform/mac/GeolocationServiceMac.mm
index 1093e69..9c781ad 100644
--- a/WebCore/platform/mac/GeolocationServiceMac.mm
+++ b/WebCore/platform/mac/GeolocationServiceMac.mm
@@ -25,7 +25,7 @@
#import "config.h"
-#if ENABLE(GEOLOCATION)
+#if ENABLE(GEOLOCATION) && !ENABLE(CLIENT_BASED_GEOLOCATION)
#import "GeolocationServiceMac.h"
diff --git a/WebCore/platform/mac/KeyEventMac.mm b/WebCore/platform/mac/KeyEventMac.mm
index b6c3b21..2e1579b 100644
--- a/WebCore/platform/mac/KeyEventMac.mm
+++ b/WebCore/platform/mac/KeyEventMac.mm
@@ -368,6 +368,9 @@ static bool isKeypadEvent(NSEvent* event)
return false;
}
+ if ([event modifierFlags] & NSNumericPadKeyMask)
+ return true;
+
switch ([event keyCode]) {
case 71: // Clear
case 81: // =
@@ -808,6 +811,19 @@ static inline String unmodifiedTextFromEvent(NSEvent* event)
return [event charactersIgnoringModifiers];
}
+PlatformKeyboardEvent::PlatformKeyboardEvent()
+ : m_type(KeyDown)
+ , m_autoRepeat(false)
+ , m_windowsVirtualKeyCode(0)
+ , m_nativeVirtualKeyCode(0)
+ , m_isKeypad(false)
+ , m_shiftKey(false)
+ , m_ctrlKey(false)
+ , m_altKey(false)
+ , m_metaKey(false)
+{
+}
+
PlatformKeyboardEvent::PlatformKeyboardEvent(NSEvent *event)
: m_type(isKeyUpEvent(event) ? PlatformKeyboardEvent::KeyUp : PlatformKeyboardEvent::KeyDown)
, m_text(textFromEvent(event))
diff --git a/WebCore/platform/mac/LocalizedStringsMac.mm b/WebCore/platform/mac/LocalizedStringsMac.mm
index c438d6b..55fdd21 100644
--- a/WebCore/platform/mac/LocalizedStringsMac.mm
+++ b/WebCore/platform/mac/LocalizedStringsMac.mm
@@ -683,6 +683,23 @@ String AXLinkActionVerb()
return String();
}
+String AXMenuListPopupActionVerb()
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+ return [[WebCoreViewFactory sharedFactory] AXMenuListPopupActionVerb];
+ END_BLOCK_OBJC_EXCEPTIONS;
+ return String();
+}
+
+String AXMenuListActionVerb()
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+ return [[WebCoreViewFactory sharedFactory] AXMenuListActionVerb];
+ END_BLOCK_OBJC_EXCEPTIONS;
+ return String();
+}
+
+
String multipleFileUploadText(unsigned numberOfFiles)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
diff --git a/WebCore/platform/mac/PasteboardMac.mm b/WebCore/platform/mac/PasteboardMac.mm
index f048791..8aa7f2c 100644
--- a/WebCore/platform/mac/PasteboardMac.mm
+++ b/WebCore/platform/mac/PasteboardMac.mm
@@ -136,7 +136,7 @@ static NSAttributedString *stripAttachmentCharacters(NSAttributedString *string)
void Pasteboard::writeSelection(NSPasteboard* pasteboard, Range* selectedRange, bool canSmartCopyOrDelete, Frame* frame)
{
if (!WebArchivePboardType)
- Pasteboard::generalPasteboard(); // Initialises pasteboard types
+ Pasteboard::generalPasteboard(); // Initializes pasteboard types.
ASSERT(selectedRange);
NSAttributedString *attributedString = [[[NSAttributedString alloc] _initWithDOMRange:kit(selectedRange)] autorelease];
@@ -206,7 +206,7 @@ void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete,
void Pasteboard::writePlainText(const String& text)
{
if (!WebArchivePboardType)
- Pasteboard::generalPasteboard(); // Initialises pasteboard types
+ Pasteboard::generalPasteboard(); // Initializes pasteboard types.
NSArray *types = [NSArray arrayWithObject:NSStringPboardType];
NSPasteboard *pasteboard = m_pasteboard.get();
@@ -218,7 +218,7 @@ void Pasteboard::writePlainText(const String& text)
void Pasteboard::writeURL(NSPasteboard* pasteboard, NSArray* types, const KURL& url, const String& titleStr, Frame* frame)
{
if (!WebArchivePboardType)
- Pasteboard::generalPasteboard(); // Initialises pasteboard types
+ Pasteboard::generalPasteboard(); // Initializes pasteboard types.
if (!types) {
types = writableTypesForURL();
@@ -372,7 +372,7 @@ PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefP
}
}
if ([HTMLString length] != 0) {
- RefPtr<DocumentFragment> fragment = createFragmentFromMarkup(frame->document(), HTMLString, "");
+ RefPtr<DocumentFragment> fragment = createFragmentFromMarkup(frame->document(), HTMLString, "", FragmentScriptingNotAllowed);
if (fragment)
return fragment.release();
}
diff --git a/WebCore/platform/mac/PlatformMouseEventMac.mm b/WebCore/platform/mac/PlatformMouseEventMac.mm
index 74f694e..5b84b4f 100644
--- a/WebCore/platform/mac/PlatformMouseEventMac.mm
+++ b/WebCore/platform/mac/PlatformMouseEventMac.mm
@@ -158,4 +158,22 @@ PlatformMouseEvent::PlatformMouseEvent(NSEvent* event, NSView *windowView)
{
}
+PlatformMouseEvent::PlatformMouseEvent(int x, int y, int globalX, int globalY, MouseButton button, MouseEventType eventType,
+ int clickCount, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey, double timestamp,
+ unsigned modifierFlags, int eventNumber)
+ : m_position(IntPoint(x, y))
+ , m_globalPosition(IntPoint(globalX, globalY))
+ , m_button(button)
+ , m_eventType(eventType)
+ , m_clickCount(clickCount)
+ , m_shiftKey(shiftKey)
+ , m_ctrlKey(ctrlKey)
+ , m_altKey(altKey)
+ , m_metaKey(metaKey)
+ , m_timestamp(timestamp)
+ , m_modifierFlags(modifierFlags)
+ , m_eventNumber(eventNumber)
+{
+}
+
}
diff --git a/WebCore/platform/mac/PopupMenuMac.mm b/WebCore/platform/mac/PopupMenuMac.mm
index dfb0fff..22f1e5b 100644
--- a/WebCore/platform/mac/PopupMenuMac.mm
+++ b/WebCore/platform/mac/PopupMenuMac.mm
@@ -20,6 +20,7 @@
#import "config.h"
#import "PopupMenu.h"
+#import "Chrome.h"
#import "ChromeClient.h"
#import "EventHandler.h"
#import "Frame.h"
@@ -80,8 +81,14 @@ void PopupMenu::populate()
else {
PopupMenuStyle style = client()->itemStyle(i);
NSMutableDictionary* attributes = [[NSMutableDictionary alloc] init];
- if (style.font() != Font())
- [attributes setObject:style.font().primaryFont()->getNSFont() forKey:NSFontAttributeName];
+ if (style.font() != Font()) {
+ NSFont *font = style.font().primaryFont()->getNSFont();
+ if (!font) {
+ CGFloat size = style.font().primaryFont()->platformData().size();
+ font = style.font().weight() < FontWeightBold ? [NSFont systemFontOfSize:size] : [NSFont boldSystemFontOfSize:size];
+ }
+ [attributes setObject:font forKey:NSFontAttributeName];
+ }
// FIXME: Add support for styling the foreground and background colors.
// FIXME: Find a way to customize text color when an item is highlighted.
NSAttributedString* string = [[NSAttributedString alloc] initWithString:client()->itemText(i) attributes:attributes];
@@ -99,6 +106,8 @@ void PopupMenu::populate()
[[m_popup.get() menu] setMenuChangedMessagesEnabled:messagesEnabled];
}
+#if !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
+
void PopupMenu::show(const IntRect& r, FrameView* v, int index)
{
populate();
@@ -179,6 +188,14 @@ void PopupMenu::show(const IntRect& r, FrameView* v, int index)
[event release];
}
+#else
+
+void PopupMenu::show(const IntRect&, FrameView*, int)
+{
+}
+
+#endif
+
void PopupMenu::hide()
{
[m_popup.get() dismissPopUp];
diff --git a/WebCore/platform/mac/RuntimeApplicationChecks.h b/WebCore/platform/mac/RuntimeApplicationChecks.h
index f9c7079..24b8ae1 100644
--- a/WebCore/platform/mac/RuntimeApplicationChecks.h
+++ b/WebCore/platform/mac/RuntimeApplicationChecks.h
@@ -31,6 +31,7 @@ namespace WebCore {
bool applicationIsAppleMail();
bool applicationIsSafari();
bool applicationIsMicrosoftMessenger();
+bool applicationIsAdobeInstaller();
} // namespace WebCore
diff --git a/WebCore/platform/mac/RuntimeApplicationChecks.mm b/WebCore/platform/mac/RuntimeApplicationChecks.mm
index a3c4aa5..bcc1dc9 100644
--- a/WebCore/platform/mac/RuntimeApplicationChecks.mm
+++ b/WebCore/platform/mac/RuntimeApplicationChecks.mm
@@ -47,4 +47,10 @@ bool applicationIsMicrosoftMessenger()
return isMicrosoftMessenger;
}
+bool applicationIsAdobeInstaller()
+{
+ static bool isAdobeInstaller = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.adobe.Installers.Setup"];
+ return isAdobeInstaller;
+}
+
} // namespace WebCore
diff --git a/WebCore/platform/mac/ScrollViewMac.mm b/WebCore/platform/mac/ScrollViewMac.mm
index f31b301..7ef5dc4 100644
--- a/WebCore/platform/mac/ScrollViewMac.mm
+++ b/WebCore/platform/mac/ScrollViewMac.mm
@@ -57,8 +57,6 @@ NSView *ScrollView::documentView() const
return nil;
}
-#if !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
-
void ScrollView::platformAddChild(Widget* child)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -109,13 +107,12 @@ bool ScrollView::platformCanBlitOnScroll() const
IntRect ScrollView::platformVisibleContentRect(bool includeScrollbars) const
{
- BEGIN_BLOCK_OBJC_EXCEPTIONS;
- if (includeScrollbars) {
- if (NSView* documentView = this->documentView())
- return enclosingIntRect([documentView visibleRect]);
- }
- return enclosingIntRect([scrollView() documentVisibleRect]);
- END_BLOCK_OBJC_EXCEPTIONS;
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+ IntRect result = enclosingIntRect([scrollView() documentVisibleRect]);
+ if (includeScrollbars)
+ result.setSize(IntSize([scrollView() frame].size));
+ return result;
+ END_BLOCK_OBJC_EXCEPTIONS;
return IntRect();
}
@@ -205,6 +202,4 @@ bool ScrollView::platformIsOffscreen() const
return ![platformWidget() window] || ![[platformWidget() window] isVisible];
}
-#endif // !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
-
} // namespace WebCore
diff --git a/WebCore/platform/mac/ScrollbarThemeMac.mm b/WebCore/platform/mac/ScrollbarThemeMac.mm
index b4b8f62..067f28f 100644
--- a/WebCore/platform/mac/ScrollbarThemeMac.mm
+++ b/WebCore/platform/mac/ScrollbarThemeMac.mm
@@ -362,7 +362,7 @@ bool ScrollbarThemeMac::paint(Scrollbar* scrollbar, GraphicsContext* context, co
trackInfo.min = 0;
trackInfo.max = scrollbar->maximum();
trackInfo.value = scrollbar->currentPos();
- trackInfo.trackInfo.scrollbar.viewsize = scrollbar->pageStep();
+ trackInfo.trackInfo.scrollbar.viewsize = scrollbar->visibleSize();
trackInfo.attributes = 0;
if (scrollbar->orientation() == HorizontalScrollbar)
trackInfo.attributes |= kThemeTrackHorizontal;
diff --git a/WebCore/platform/mac/ThemeMac.mm b/WebCore/platform/mac/ThemeMac.mm
index a95fee4..2812607 100644
--- a/WebCore/platform/mac/ThemeMac.mm
+++ b/WebCore/platform/mac/ThemeMac.mm
@@ -355,7 +355,7 @@ static void setupButtonCell(NSButtonCell *&buttonCell, ControlPart part, Control
} else if ([buttonCell bezelStyle] != NSRoundedBezelStyle)
[buttonCell setBezelStyle:NSRoundedBezelStyle];
- setControlSize(buttonCell, buttonSizes(), zoomedRect.size(), zoomFactor);
+ setControlSize(buttonCell, sizes, zoomedRect.size(), zoomFactor);
// Update the various states we respond to.
updateStates(buttonCell, states);
diff --git a/WebCore/platform/mac/WebCoreObjCExtras.mm b/WebCore/platform/mac/WebCoreObjCExtras.mm
index cb8d504..4fc757c 100644
--- a/WebCore/platform/mac/WebCoreObjCExtras.mm
+++ b/WebCore/platform/mac/WebCoreObjCExtras.mm
@@ -72,8 +72,13 @@ bool WebCoreObjCScheduleDeallocateOnMainThread(Class cls, id object)
{
ASSERT([object isKindOfClass:cls]);
+#if USE(WEB_THREAD)
+ if (isMainThread())
+ return false;
+#else
if (pthread_main_np() != 0)
return false;
+#endif
ClassAndIdPair* pair = new ClassAndIdPair(cls, object);
callOnMainThread(deallocCallback, pair);
diff --git a/WebCore/platform/mac/WebCoreSystemInterface.h b/WebCore/platform/mac/WebCoreSystemInterface.h
index 917ab0b..e7521dc 100644
--- a/WebCore/platform/mac/WebCoreSystemInterface.h
+++ b/WebCore/platform/mac/WebCoreSystemInterface.h
@@ -48,6 +48,7 @@ typedef struct _NSRect NSRect;
@class NSFont;
@class NSImage;
@class NSMenu;
+@class NSMutableArray;
@class NSMutableURLRequest;
@class NSString;
@class NSTextFieldCell;
@@ -66,6 +67,7 @@ typedef struct NSEvent NSEvent;
typedef struct NSFont NSFont;
typedef struct NSImage NSImage;
typedef struct NSMenu NSMenu;
+typedef struct NSMutableArray NSMutableArray;
typedef struct NSMutableURLRequest NSMutableURLRequest;
typedef struct NSURLRequest NSURLRequest;
typedef struct NSString NSString;
@@ -134,6 +136,7 @@ extern void (*wkSetNSURLConnectionDefersCallbacks)(NSURLConnection *, BOOL);
extern void (*wkSetNSURLRequestShouldContentSniff)(NSMutableURLRequest *, BOOL);
extern void (*wkSetPatternBaseCTM)(CGContextRef, CGAffineTransform);
extern void (*wkSetPatternPhaseInUserSpace)(CGContextRef, CGPoint);
+extern CGAffineTransform (*wkGetUserToBaseCTM)(CGContextRef);
extern void (*wkSetUpFontCache)();
extern void (*wkSignalCFReadStreamEnd)(CFReadStreamRef stream);
extern void (*wkSignalCFReadStreamError)(CFReadStreamRef stream, CFStreamError *error);
@@ -166,6 +169,12 @@ extern BOOL (*wkSupportsMultipartXMixedReplace)(NSMutableURLRequest *);
extern BOOL (*wkUseSharedMediaUI)();
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+extern NSMutableArray *(*wkNoteOpenPanelFiles)(NSArray *);
+#else
+extern void* wkNoteOpenPanelFiles;
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/WebCore/platform/mac/WebCoreSystemInterface.mm b/WebCore/platform/mac/WebCoreSystemInterface.mm
index 3a9c011..f3e0e77 100644
--- a/WebCore/platform/mac/WebCoreSystemInterface.mm
+++ b/WebCore/platform/mac/WebCoreSystemInterface.mm
@@ -66,6 +66,7 @@ void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
void (*wkSetDragImage)(NSImage*, NSPoint offset);
void (*wkSetPatternBaseCTM)(CGContextRef, CGAffineTransform);
void (*wkSetPatternPhaseInUserSpace)(CGContextRef, CGPoint point);
+CGAffineTransform (*wkGetUserToBaseCTM)(CGContextRef);
void (*wkSetUpFontCache)();
void (*wkSignalCFReadStreamEnd)(CFReadStreamRef stream);
void (*wkSignalCFReadStreamHasBytes)(CFReadStreamRef stream);
@@ -106,3 +107,9 @@ void (*wkReleaseStyleGroup)(void* group);
ATSUFontID (*wkGetNSFontATSUFontId)(NSFont*);
BOOL (*wkSupportsMultipartXMixedReplace)(NSMutableURLRequest *);
#endif
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+NSMutableArray *(*wkNoteOpenPanelFiles)(NSArray *);
+#else
+void* wkNoteOpenPanelFiles;
+#endif
diff --git a/WebCore/platform/mac/WidgetMac.mm b/WebCore/platform/mac/WidgetMac.mm
index ebb47dc..e473053 100644
--- a/WebCore/platform/mac/WidgetMac.mm
+++ b/WebCore/platform/mac/WidgetMac.mm
@@ -31,12 +31,14 @@
#endif
#import "BlockExceptions.h"
+#import "Chrome.h"
#import "Cursor.h"
#import "Document.h"
#import "Font.h"
#import "FoundationExtras.h"
#import "Frame.h"
#import "GraphicsContext.h"
+#import "NotImplemented.h"
#import "Page.h"
#import "PlatformMouseEvent.h"
#import "ScrollView.h"
@@ -44,8 +46,6 @@
#import "WebCoreView.h"
#import <wtf/RetainPtr.h>
-#if !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
-
@interface NSWindow (WebWindowDetails)
- (BOOL)_needsToResetDragMargins;
- (void)_setNeedsToResetDragMargins:(BOOL)needs;
@@ -56,12 +56,8 @@
- (void)webPlugInSetIsSelected:(BOOL)isSelected;
@end
-#endif
-
namespace WebCore {
-#if !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
-
class WidgetPrivate {
public:
bool mustStayInWindow;
@@ -163,6 +159,9 @@ void Widget::setFrameRect(const IntRect& rect)
BEGIN_BLOCK_OBJC_EXCEPTIONS;
NSView *v = getOuterView();
+ if (!v)
+ return;
+
NSRect f = rect;
if (!NSEqualRects(f, [v frame])) {
[v setFrame:f];
@@ -198,7 +197,7 @@ void Widget::paint(GraphicsContext* p, const IntRect& r)
END_BLOCK_OBJC_EXCEPTIONS;
} else {
// This is the case of drawing into a bitmap context other than a window backing store. It gets hit beneath
- // -cacheDisplayInRect:toBitmapImageRep:.
+ // -cacheDisplayInRect:toBitmapImageRep:, and when painting into compositing layers.
// Transparent subframes are in fact implemented with scroll views that return YES from -drawsBackground (whenever the WebView
// itself is in drawsBackground mode). In the normal drawing code path, the scroll views are never asked to draw the background,
@@ -347,54 +346,5 @@ void Widget::retainPlatformWidget()
HardRetain(m_widget);
}
-#else // ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
-
-Widget::Widget(PlatformWidget widget)
-{
- init(widget);
-}
-
-Widget::~Widget()
-{
- ASSERT(!parent());
-}
-
-void Widget::show()
-{
-}
-
-void Widget::hide()
-{
-}
-
-void Widget::setCursor(const Cursor&)
-{
- notImplemented();
-}
-
-void Widget::paint(GraphicsContext*, const IntRect&)
-{
-}
-
-void Widget::setFocus()
-{
-}
-
-void Widget::setIsSelected(bool)
-{
-}
-
-IntRect Widget::frameRect() const
-{
- return m_frame;
-}
-
-void Widget::setFrameRect(const IntRect& rect)
-{
- m_frame = rect;
-}
-
-#endif
-
} // namespace WebCore
diff --git a/WebCore/platform/network/CredentialStorage.cpp b/WebCore/platform/network/CredentialStorage.cpp
index a401751..2c78e3c 100644
--- a/WebCore/platform/network/CredentialStorage.cpp
+++ b/WebCore/platform/network/CredentialStorage.cpp
@@ -31,7 +31,8 @@
#include "KURL.h"
#include "ProtectionSpaceHash.h"
#include "StringHash.h"
-
+#include <wtf/HashMap.h>
+#include <wtf/HashSet.h>
#include <wtf/StdLibExtras.h>
namespace WebCore {
diff --git a/WebCore/platform/network/NetworkStateNotifier.h b/WebCore/platform/network/NetworkStateNotifier.h
index d0463d4..77235b8 100644
--- a/WebCore/platform/network/NetworkStateNotifier.h
+++ b/WebCore/platform/network/NetworkStateNotifier.h
@@ -51,16 +51,28 @@ typedef const struct __SCDynamicStore * SCDynamicStoreRef;
namespace WebCore {
+#if (PLATFORM(QT) && ENABLE(QT_BEARER))
+class NetworkStateNotifierPrivate;
+#endif
+
class NetworkStateNotifier : public Noncopyable {
public:
NetworkStateNotifier();
void setNetworkStateChangedFunction(void (*)());
bool onLine() const { return m_isOnLine; }
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
Connection::ConnectionType type() const { return m_type; }
#endif
+=======
+
+#if (PLATFORM(QT) && ENABLE(QT_BEARER))
+ void setNetworkAccessAllowed(bool);
+#endif
+
+>>>>>>> webkit.org at r54127
private:
bool m_isOnLine;
#if PLATFORM(ANDROID)
@@ -93,11 +105,18 @@ private:
#elif PLATFORM(ANDROID)
public:
void networkStateChange(bool online);
+<<<<<<< HEAD
void networkTypeChange(Connection::ConnectionType type);
+=======
+
+#elif PLATFORM(QT) && ENABLE(QT_BEARER)
+ friend class NetworkStateNotifierPrivate;
+ NetworkStateNotifierPrivate* p;
+>>>>>>> webkit.org at r54127
#endif
};
-#if !PLATFORM(MAC) && !PLATFORM(WIN) && !PLATFORM(CHROMIUM)
+#if !PLATFORM(MAC) && !PLATFORM(WIN) && !PLATFORM(CHROMIUM) && !(PLATFORM(QT) && ENABLE(QT_BEARER))
inline NetworkStateNotifier::NetworkStateNotifier()
: m_isOnLine(true)
diff --git a/WebCore/platform/network/ProtectionSpaceHash.h b/WebCore/platform/network/ProtectionSpaceHash.h
index f8c84e8..08716b5 100644
--- a/WebCore/platform/network/ProtectionSpaceHash.h
+++ b/WebCore/platform/network/ProtectionSpaceHash.h
@@ -27,6 +27,7 @@
#define ProtectionSpaceHash_h
#include "ProtectionSpace.h"
+#include <wtf/HashTraits.h>
namespace WebCore {
diff --git a/WebCore/platform/network/ResourceRequestBase.cpp b/WebCore/platform/network/ResourceRequestBase.cpp
index 41afb92..adf635c 100644
--- a/WebCore/platform/network/ResourceRequestBase.cpp
+++ b/WebCore/platform/network/ResourceRequestBase.cpp
@@ -390,7 +390,11 @@ void ResourceRequestBase::updateResourceRequest() const
m_resourceRequestUpdated = true;
}
+<<<<<<< HEAD
#if !PLATFORM(MAC) && !USE(CFNETWORK) && !USE(SOUP) && !PLATFORM(CHROMIUM) && !PLATFORM(ANDROID)
+=======
+#if !PLATFORM(MAC) && !USE(CFNETWORK) && !USE(SOUP) && !PLATFORM(CHROMIUM) && !PLATFORM(ANDROID) && !PLATFORM(QT)
+>>>>>>> webkit.org at r54127
unsigned initializeMaximumHTTPConnectionCountPerHost()
{
// This is used by the loader to control the number of issued parallel load requests.
diff --git a/WebCore/platform/network/ResourceRequestBase.h b/WebCore/platform/network/ResourceRequestBase.h
index 931a9de..adf8327 100644
--- a/WebCore/platform/network/ResourceRequestBase.h
+++ b/WebCore/platform/network/ResourceRequestBase.h
@@ -50,7 +50,7 @@ namespace WebCore {
struct CrossThreadResourceRequestData;
// Do not use this type directly. Use ResourceRequest instead.
- class ResourceRequestBase {
+ class ResourceRequestBase : public FastAllocBase {
public:
// The type of this ResourceRequest, based on how the resource will be used.
enum TargetType {
diff --git a/WebCore/platform/network/ResourceResponseBase.h b/WebCore/platform/network/ResourceResponseBase.h
index e06c6f8..bf197a7 100644
--- a/WebCore/platform/network/ResourceResponseBase.h
+++ b/WebCore/platform/network/ResourceResponseBase.h
@@ -38,7 +38,7 @@ class ResourceResponse;
struct CrossThreadResourceResponseData;
// Do not use this class directly, use the class ResponseResponse instead
-class ResourceResponseBase {
+class ResourceResponseBase : public FastAllocBase {
public:
static std::auto_ptr<ResourceResponse> adopt(std::auto_ptr<CrossThreadResourceResponseData>);
@@ -151,7 +151,7 @@ private:
inline bool operator==(const ResourceResponse& a, const ResourceResponse& b) { return ResourceResponseBase::compare(a, b); }
inline bool operator!=(const ResourceResponse& a, const ResourceResponse& b) { return !(a == b); }
-struct CrossThreadResourceResponseData {
+struct CrossThreadResourceResponseData : Noncopyable {
KURL m_url;
String m_mimeType;
long long m_expectedContentLength;
diff --git a/WebCore/platform/network/android/NetworkStateNotifierAndroid.cpp b/WebCore/platform/network/android/NetworkStateNotifierAndroid.cpp
index 3ade2ed..177ba75 100644
--- a/WebCore/platform/network/android/NetworkStateNotifierAndroid.cpp
+++ b/WebCore/platform/network/android/NetworkStateNotifierAndroid.cpp
@@ -39,6 +39,7 @@ void NetworkStateNotifier::networkStateChange(bool online)
m_networkStateChangedFunction();
}
+<<<<<<< HEAD
void NetworkStateNotifier::networkTypeChange(Connection::ConnectionType type)
{
if (m_type == type)
@@ -50,4 +51,6 @@ void NetworkStateNotifier::networkTypeChange(Connection::ConnectionType type)
m_networkStateChangedFunction();
}
+=======
+>>>>>>> webkit.org at r54127
}
diff --git a/WebCore/platform/network/cf/DNSCFNet.cpp b/WebCore/platform/network/cf/DNSCFNet.cpp
index 6311baf..c17b59f 100644
--- a/WebCore/platform/network/cf/DNSCFNet.cpp
+++ b/WebCore/platform/network/cf/DNSCFNet.cpp
@@ -29,6 +29,7 @@
#include "StringHash.h"
#include "Timer.h"
+#include <wtf/HashSet.h>
#include <wtf/RetainPtr.h>
#include <wtf/StdLibExtras.h>
diff --git a/WebCore/platform/network/chromium/CookieJarChromium.cpp b/WebCore/platform/network/chromium/CookieJarChromium.cpp
index 279d9b0..35f1c3f 100644
--- a/WebCore/platform/network/chromium/CookieJarChromium.cpp
+++ b/WebCore/platform/network/chromium/CookieJarChromium.cpp
@@ -47,10 +47,9 @@ String cookies(const Document* document, const KURL& url)
return ChromiumBridge::cookies(url, document->firstPartyForCookies());
}
-bool cookiesEnabled(const Document*)
+bool cookiesEnabled(const Document* document)
{
- // FIXME: For now just assume cookies are always on.
- return true;
+ return ChromiumBridge::cookiesEnabled(document->cookieURL(), document->firstPartyForCookies());
}
bool getRawCookies(const Document* document, const KURL& url, Vector<Cookie>& rawCookies)
diff --git a/WebCore/platform/network/chromium/ResourceRequest.h b/WebCore/platform/network/chromium/ResourceRequest.h
index 176f923..8ef0c5e 100644
--- a/WebCore/platform/network/chromium/ResourceRequest.h
+++ b/WebCore/platform/network/chromium/ResourceRequest.h
@@ -28,7 +28,6 @@
#ifndef ResourceRequest_h
#define ResourceRequest_h
-#include "CString.h"
#include "ResourceRequestBase.h"
namespace WebCore {
@@ -45,15 +44,6 @@ namespace WebCore {
{
}
- ResourceRequest(const KURL& url, const CString& securityInfo)
- : ResourceRequestBase(url, UseProtocolCachePolicy)
- , m_requestorID(0)
- , m_requestorProcessID(0)
- , m_appCacheHostID(0)
- , m_securityInfo(securityInfo)
- {
- }
-
ResourceRequest(const KURL& url)
: ResourceRequestBase(url, UseProtocolCachePolicy)
, m_requestorID(0)
@@ -94,15 +84,6 @@ namespace WebCore {
int appCacheHostID() const { return m_appCacheHostID; }
void setAppCacheHostID(int id) { m_appCacheHostID = id; }
- // Opaque buffer that describes the security state (including SSL
- // connection state) for the resource that should be reported when the
- // resource has been loaded. This is used to simulate secure
- // connection for request (typically when showing error page, so the
- // error page has the errors of the page that actually failed). Empty
- // string if not a secure connection.
- CString securityInfo() const { return m_securityInfo; }
- void setSecurityInfo(const CString& value) { m_securityInfo = value; }
-
private:
friend class ResourceRequestBase;
@@ -112,7 +93,6 @@ namespace WebCore {
int m_requestorID;
int m_requestorProcessID;
int m_appCacheHostID;
- CString m_securityInfo;
};
} // namespace WebCore
diff --git a/WebCore/platform/network/chromium/ResourceResponse.h b/WebCore/platform/network/chromium/ResourceResponse.h
index 0c2b5d9..1b9de04 100644
--- a/WebCore/platform/network/chromium/ResourceResponse.h
+++ b/WebCore/platform/network/chromium/ResourceResponse.h
@@ -38,6 +38,7 @@ namespace WebCore {
ResourceResponse()
: m_isContentFiltered(false)
, m_appCacheID(0)
+ , m_wasFetchedViaSPDY(false)
{
}
@@ -45,6 +46,7 @@ namespace WebCore {
: ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename)
, m_isContentFiltered(false)
, m_appCacheID(0)
+ , m_wasFetchedViaSPDY(false)
{
}
@@ -72,6 +74,12 @@ namespace WebCore {
m_appCacheManifestURL = url;
}
+ bool wasFetchedViaSPDY() const { return m_wasFetchedViaSPDY; }
+ void setWasFetchedViaSPDY(bool value)
+ {
+ m_wasFetchedViaSPDY = value;
+ }
+
private:
friend class ResourceResponseBase;
@@ -96,6 +104,8 @@ namespace WebCore {
// The manifest url of the appcache this response was retrieved from, if any.
// Note: only valid for main resource responses.
KURL m_appCacheManifestURL;
+
+ bool m_wasFetchedViaSPDY;
};
} // namespace WebCore
diff --git a/WebCore/platform/network/curl/ResourceHandleCurl.cpp b/WebCore/platform/network/curl/ResourceHandleCurl.cpp
index 5464e07..81ac1a3 100644
--- a/WebCore/platform/network/curl/ResourceHandleCurl.cpp
+++ b/WebCore/platform/network/curl/ResourceHandleCurl.cpp
@@ -156,7 +156,7 @@ void ResourceHandle::setDefersLoading(bool defers)
if (d->m_defersLoading == defers)
return;
-#if LIBCURL_VERSION_NUM > 0x071800
+#if LIBCURL_VERSION_NUM > 0x071200
if (!d->m_handle)
d->m_defersLoading = defers;
else if (defers) {
@@ -179,9 +179,7 @@ void ResourceHandle::setDefersLoading(bool defers)
}
#else
d->m_defersLoading = defers;
-#ifndef NDEBUG
- printf("Deferred loading is implemented if libcURL version is above 7.18.0");
-#endif
+ LOG_ERROR("Deferred loading is implemented if libcURL version is above 7.18.0");
#endif
}
diff --git a/WebCore/platform/network/curl/ResourceHandleManager.cpp b/WebCore/platform/network/curl/ResourceHandleManager.cpp
index a006a14..bcae67f 100644
--- a/WebCore/platform/network/curl/ResourceHandleManager.cpp
+++ b/WebCore/platform/network/curl/ResourceHandleManager.cpp
@@ -49,7 +49,7 @@
#include <wtf/Threading.h>
#include <wtf/Vector.h>
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
#include <sys/param.h>
#define MAX_PATH MAXPATHLEN
#endif
@@ -702,7 +702,7 @@ void ResourceHandleManager::initializeHandle(ResourceHandle* job)
d->m_handle = curl_easy_init();
-#if LIBCURL_VERSION_NUM > 0x071800
+#if LIBCURL_VERSION_NUM > 0x071200
if (d->m_defersLoading) {
CURLcode error = curl_easy_pause(d->m_handle, CURLPAUSE_ALL);
// If we did not pause the handle, we would ASSERT in the
diff --git a/WebCore/platform/network/mac/ResourceHandleMac.mm b/WebCore/platform/network/mac/ResourceHandleMac.mm
index 360425e..923a631 100644
--- a/WebCore/platform/network/mac/ResourceHandleMac.mm
+++ b/WebCore/platform/network/mac/ResourceHandleMac.mm
@@ -610,10 +610,15 @@ void ResourceHandle::receivedCancellation(const AuthenticationChallenge& challen
// See <rdar://problem/5380697> . This is a workaround for a behavior change in CFNetwork where willSendRequest gets called more often.
if (!redirectResponse)
return newRequest;
-
- LOG(Network, "Handle %p delegate connection:%p willSendRequest:%@ redirectResponse:%p", m_handle, connection, [newRequest description], redirectResponse);
- if (redirectResponse && [redirectResponse isKindOfClass:[NSHTTPURLResponse class]] && [(NSHTTPURLResponse *)redirectResponse statusCode] == 307) {
+#if !LOG_DISABLED
+ if ([redirectResponse isKindOfClass:[NSHTTPURLResponse class]])
+ LOG(Network, "Handle %p delegate connection:%p willSendRequest:%@ redirectResponse:%d, Location:<%@>", m_handle, connection, [newRequest description], static_cast<int>([(id)redirectResponse statusCode]), [[(id)redirectResponse allHeaderFields] objectForKey:@"Location"]);
+ else
+ LOG(Network, "Handle %p delegate connection:%p willSendRequest:%@ redirectResponse:non-HTTP", m_handle, connection, [newRequest description]);
+#endif
+
+ if ([redirectResponse isKindOfClass:[NSHTTPURLResponse class]] && [(NSHTTPURLResponse *)redirectResponse statusCode] == 307) {
String originalMethod = m_handle->request().httpMethod();
if (!equalIgnoringCase(originalMethod, String([newRequest HTTPMethod]))) {
NSMutableURLRequest *mutableRequest = [newRequest mutableCopy];
diff --git a/WebCore/platform/network/qt/NetworkStateNotifierPrivate.h b/WebCore/platform/network/qt/NetworkStateNotifierPrivate.h
new file mode 100644
index 0000000..536b06a
--- /dev/null
+++ b/WebCore/platform/network/qt/NetworkStateNotifierPrivate.h
@@ -0,0 +1,51 @@
+/*
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef NetworkStateNotifierPrivate_h
+#define NetworkStateNotifierPrivate_h
+
+#include <QObject>
+
+namespace QtMobility {
+class QNetworkConfigurationManager;
+}
+
+namespace WebCore {
+
+class NetworkStateNotifier;
+
+class NetworkStateNotifierPrivate : public QObject {
+ Q_OBJECT
+public:
+ NetworkStateNotifierPrivate(NetworkStateNotifier* notifier);
+ ~NetworkStateNotifierPrivate();
+public slots:
+ void onlineStateChanged(bool);
+ void networkAccessPermissionChanged(bool);
+
+public:
+ QtMobility::QNetworkConfigurationManager* m_configurationManager;
+ bool m_online;
+ bool m_networkAccessAllowed;
+ NetworkStateNotifier* m_notifier;
+};
+
+} // namespace WebCore
+
+#endif
diff --git a/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp b/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp
new file mode 100644
index 0000000..e694264
--- /dev/null
+++ b/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp
@@ -0,0 +1,90 @@
+/*
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+#include "NetworkStateNotifier.h"
+
+#include "NetworkStateNotifierPrivate.h"
+#include "qnetworkconfigmanager.h"
+
+using namespace QtMobility;
+
+namespace WebCore {
+
+NetworkStateNotifierPrivate::NetworkStateNotifierPrivate(NetworkStateNotifier* notifier)
+ : m_configurationManager(new QNetworkConfigurationManager())
+ , m_online(m_configurationManager->isOnline())
+ , m_networkAccessAllowed(true)
+ , m_notifier(notifier)
+{
+ Q_ASSERT(notifier);
+ connect(m_configurationManager, SIGNAL(onlineStateChanged(bool)), this, SLOT(onlineStateChanged(bool)));
+}
+
+void NetworkStateNotifierPrivate::onlineStateChanged(bool isOnline)
+{
+ if (m_online == isOnline)
+ return;
+
+ m_online = isOnline;
+ if (m_networkAccessAllowed)
+ m_notifier->updateState();
+}
+
+void NetworkStateNotifierPrivate::networkAccessPermissionChanged(bool isAllowed)
+{
+ if (isAllowed == m_networkAccessAllowed)
+ return;
+
+ m_networkAccessAllowed = isAllowed;
+ if (m_online)
+ m_notifier->updateState();
+}
+
+NetworkStateNotifierPrivate::~NetworkStateNotifierPrivate()
+{
+ delete m_configurationManager;
+}
+
+void NetworkStateNotifier::updateState()
+{
+ if (m_isOnLine == (p->m_online && p->m_networkAccessAllowed))
+ return;
+
+ m_isOnLine = p->m_online && p->m_networkAccessAllowed;
+ if (m_networkStateChangedFunction)
+ m_networkStateChangedFunction();
+}
+
+NetworkStateNotifier::NetworkStateNotifier()
+ : m_isOnLine(true)
+ , m_networkStateChangedFunction(0)
+{
+ p = new NetworkStateNotifierPrivate(this);
+ m_isOnLine = p->m_online && p->m_networkAccessAllowed;
+}
+
+void NetworkStateNotifier::setNetworkAccessAllowed(bool isAllowed)
+{
+ p->networkAccessPermissionChanged(isAllowed);
+}
+
+} // namespace WebCore
+
+#include "moc_NetworkStateNotifierPrivate.cpp"
diff --git a/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
index f7bbb9d..559ef84 100644
--- a/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
+++ b/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
@@ -38,6 +38,16 @@
#include <QDebug>
#include <QCoreApplication>
+// What type of connection should be used for the signals of the
+// QNetworkReply? This depends on if Qt has a bugfix for this or not.
+// It is fixed in Qt 4.6.1. See https://bugs.webkit.org/show_bug.cgi?id=32113
+#if QT_VERSION > QT_VERSION_CHECK(4, 6, 0)
+#define SIGNAL_CONN Qt::DirectConnection
+#else
+#define SIGNAL_CONN Qt::QueuedConnection
+#endif
+
+
namespace WebCore {
// Take a deep copy of the FormDataElement
@@ -320,6 +330,8 @@ void QNetworkReplyHandler::sendResponseIfNeeded()
QUrl redirection = m_reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl();
if (redirection.isValid()) {
+ m_redirected = true;
+
QUrl newUrl = m_reply->url().resolved(redirection);
ResourceRequest newRequest = m_resourceHandle->request();
newRequest.setURL(newUrl);
@@ -334,7 +346,9 @@ void QNetworkReplyHandler::sendResponseIfNeeded()
newRequest.clearHTTPReferrer();
client->willSendRequest(m_resourceHandle, newRequest, response);
- m_redirected = true;
+ if (!m_resourceHandle) // network error did cancel the request
+ return;
+
m_request = newRequest.toNetworkRequest(m_resourceHandle->getInternal()->m_frame);
return;
}
@@ -369,6 +383,18 @@ void QNetworkReplyHandler::forwardData()
}
}
+void QNetworkReplyHandler::uploadProgress(qint64 bytesSent, qint64 bytesTotal)
+{
+ if (!m_resourceHandle)
+ return;
+
+ ResourceHandleClient* client = m_resourceHandle->client();
+ if (!client)
+ return;
+
+ client->didSendData(m_resourceHandle, bytesSent, bytesTotal);
+}
+
void QNetworkReplyHandler::start()
{
m_shouldStart = false;
@@ -427,18 +453,25 @@ void QNetworkReplyHandler::start()
m_reply->setParent(this);
connect(m_reply, SIGNAL(finished()),
- this, SLOT(finish()), Qt::QueuedConnection);
+ this, SLOT(finish()), SIGNAL_CONN);
// For http(s) we know that the headers are complete upon metaDataChanged() emission, so we
// can send the response as early as possible
if (scheme == QLatin1String("http") || scheme == QLatin1String("https"))
connect(m_reply, SIGNAL(metaDataChanged()),
- this, SLOT(sendResponseIfNeeded()), Qt::QueuedConnection);
+ this, SLOT(sendResponseIfNeeded()), SIGNAL_CONN);
connect(m_reply, SIGNAL(readyRead()),
- this, SLOT(forwardData()), Qt::QueuedConnection);
+ this, SLOT(forwardData()), SIGNAL_CONN);
+
+ if (m_resourceHandle->request().reportUploadProgress()) {
+ connect(m_reply, SIGNAL(uploadProgress(qint64, qint64)),
+ this, SLOT(uploadProgress(qint64, qint64)), SIGNAL_CONN);
+ }
+
+ // Make this a direct function call once we require 4.6.1+.
connect(this, SIGNAL(processQueuedItems()),
- this, SLOT(sendQueuedItems()), Qt::QueuedConnection);
+ this, SLOT(sendQueuedItems()), SIGNAL_CONN);
}
void QNetworkReplyHandler::resetState()
diff --git a/WebCore/platform/network/qt/QNetworkReplyHandler.h b/WebCore/platform/network/qt/QNetworkReplyHandler.h
index 2171083..eb5ae3c 100644
--- a/WebCore/platform/network/qt/QNetworkReplyHandler.h
+++ b/WebCore/platform/network/qt/QNetworkReplyHandler.h
@@ -62,6 +62,7 @@ private slots:
void sendResponseIfNeeded();
void forwardData();
void sendQueuedItems();
+ void uploadProgress(qint64 bytesSent, qint64 bytesTotal);
private:
void start();
diff --git a/WebCore/platform/network/qt/ResourceRequestQt.cpp b/WebCore/platform/network/qt/ResourceRequestQt.cpp
index 752abfe..341e6ae 100644
--- a/WebCore/platform/network/qt/ResourceRequestQt.cpp
+++ b/WebCore/platform/network/qt/ResourceRequestQt.cpp
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -27,6 +27,20 @@
namespace WebCore {
+// Currently Qt allows three connections per host on symbian and six
+// for everyone else. The limit can be found in qhttpnetworkconnection.cpp.
+// To achieve the best result we want WebKit to schedule the jobs so we
+// are using the limit as found in Qt. To allow Qt to fill its queue
+// and prepare jobs we will schedule two more downloads.
+unsigned initializeMaximumHTTPConnectionCountPerHost()
+{
+#ifdef Q_OS_SYMBIAN
+ return 3 + 2;
+#else
+ return 6 + 2;
+#endif
+}
+
QNetworkRequest ResourceRequest::toNetworkRequest(QObject* originatingFrame) const
{
QNetworkRequest request;
diff --git a/WebCore/platform/network/qt/SocketStreamHandle.h b/WebCore/platform/network/qt/SocketStreamHandle.h
index 64139e5..5c55749 100644
--- a/WebCore/platform/network/qt/SocketStreamHandle.h
+++ b/WebCore/platform/network/qt/SocketStreamHandle.h
@@ -1,4 +1,5 @@
/*
+ * Copyright (C) 2010 Nokia Inc. All rights reserved.
* Copyright (C) 2009 Apple Inc. All rights reserved.
* Copyright (C) 2009 Google Inc. All rights reserved.
*
@@ -42,6 +43,7 @@ namespace WebCore {
class AuthenticationChallenge;
class Credential;
class SocketStreamHandleClient;
+ class SocketStreamHandlePrivate;
class SocketStreamHandle : public RefCounted<SocketStreamHandle>, public SocketStreamHandleBase {
public:
@@ -61,6 +63,8 @@ namespace WebCore {
void receivedCredential(const AuthenticationChallenge&, const Credential&);
void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&);
void receivedCancellation(const AuthenticationChallenge&);
+ SocketStreamHandlePrivate* m_p;
+ friend class SocketStreamHandlePrivate;
};
} // namespace WebCore
diff --git a/WebCore/platform/network/qt/SocketStreamHandlePrivate.h b/WebCore/platform/network/qt/SocketStreamHandlePrivate.h
new file mode 100644
index 0000000..9433d3f
--- /dev/null
+++ b/WebCore/platform/network/qt/SocketStreamHandlePrivate.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2010 Nokia 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 SocketStreamHandlePrivate_h
+#define SocketStreamHandlePrivate_h
+
+#include "SocketStreamHandleBase.h"
+
+#include <QSslSocket>
+#include <QTcpSocket>
+
+namespace WebCore {
+
+class AuthenticationChallenge;
+class Credential;
+class SocketStreamHandleClient;
+class SocketStreamHandlePrivate;
+
+class SocketStreamHandlePrivate : public QObject {
+ Q_OBJECT
+public:
+ SocketStreamHandlePrivate(SocketStreamHandle*, const KURL&);
+ ~SocketStreamHandlePrivate();
+
+public slots:
+ void socketConnected();
+ void socketReadyRead();
+ int send(const char* data, int len);
+ void close();
+ void socketSentdata();
+ void socketClosed();
+ void socketError(QAbstractSocket::SocketError);
+ void socketClosedCallback();
+ void socketErrorCallback(int);
+ void socketSslErrors(const QList<QSslError>&);
+public:
+ QTcpSocket* m_socket;
+ SocketStreamHandle* m_streamHandle;
+};
+
+}
+
+#endif
diff --git a/WebCore/platform/network/qt/SocketStreamHandleQt.cpp b/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
new file mode 100644
index 0000000..d61d901
--- /dev/null
+++ b/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2010 Nokia Inc. All rights reserved.
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SocketStreamHandle.h"
+
+#include "KURL.h"
+#include "Logging.h"
+#include "NotImplemented.h"
+#include "SocketStreamHandleClient.h"
+#include "SocketStreamHandlePrivate.h"
+
+namespace WebCore {
+
+SocketStreamHandlePrivate::SocketStreamHandlePrivate(SocketStreamHandle* streamHandle, const KURL& url) : QObject()
+{
+ m_streamHandle = streamHandle;
+ m_socket = 0;
+ bool isSecure = url.protocolIs("wss");
+ if (isSecure)
+ m_socket = new QSslSocket(this);
+ else
+ m_socket = new QTcpSocket(this);
+ connect(m_socket, SIGNAL(connected()), this, SLOT(socketConnected()));
+ connect(m_socket, SIGNAL(readyRead()), this, SLOT(socketReadyRead()));
+ connect(m_socket, SIGNAL(disconnected()), this, SLOT(socketClosed()));
+ connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(socketError(QAbstractSocket::SocketError)));
+ if (isSecure)
+ connect(m_socket, SIGNAL(sslErrors(const QList<QSslError>&)), this, SLOT(socketSslErrors(const QList<QSslError>&)));
+
+ unsigned int port = url.hasPort() ? url.port() : (isSecure ? 443 : 80);
+
+ QString host = url.host();
+ if (isSecure)
+ static_cast<QSslSocket*>(m_socket)->connectToHostEncrypted(host, port);
+ else
+ m_socket->connectToHost(host, port);
+}
+
+SocketStreamHandlePrivate::~SocketStreamHandlePrivate()
+{
+ Q_ASSERT(!(m_socket && m_socket->state() == QAbstractSocket::ConnectedState));
+}
+
+void SocketStreamHandlePrivate::socketConnected()
+{
+ if (m_streamHandle && m_streamHandle->client()) {
+ m_streamHandle->m_state = SocketStreamHandleBase::Open;
+ m_streamHandle->client()->didOpen(m_streamHandle);
+ }
+}
+
+void SocketStreamHandlePrivate::socketReadyRead()
+{
+ if (m_streamHandle && m_streamHandle->client()) {
+ QByteArray data = m_socket->read(m_socket->bytesAvailable());
+ m_streamHandle->client()->didReceiveData(m_streamHandle, data.constData(), data.size());
+ }
+}
+
+int SocketStreamHandlePrivate::send(const char* data, int len)
+{
+ if (m_socket->state() != QAbstractSocket::ConnectedState)
+ return 0;
+ quint64 sentSize = m_socket->write(data, len);
+ QMetaObject::invokeMethod(this, "socketSentData", Qt::QueuedConnection);
+ return sentSize;
+}
+
+void SocketStreamHandlePrivate::close()
+{
+ if (m_socket && m_socket->state() == QAbstractSocket::ConnectedState)
+ m_socket->close();
+}
+
+void SocketStreamHandlePrivate::socketSentdata()
+{
+ if (m_streamHandle)
+ m_streamHandle->sendPendingData();
+}
+
+void SocketStreamHandlePrivate::socketClosed()
+{
+ QMetaObject::invokeMethod(this, "socketClosedCallback", Qt::QueuedConnection);
+}
+
+void SocketStreamHandlePrivate::socketError(QAbstractSocket::SocketError error)
+{
+ QMetaObject::invokeMethod(this, "socketErrorCallback", Qt::QueuedConnection, Q_ARG(int, error));
+}
+
+void SocketStreamHandlePrivate::socketClosedCallback()
+{
+ if (m_streamHandle && m_streamHandle->client()) {
+ SocketStreamHandle* streamHandle = m_streamHandle;
+ m_streamHandle = 0;
+ // This following call deletes _this_. Nothing should be after it.
+ streamHandle->client()->didClose(streamHandle);
+ }
+}
+
+void SocketStreamHandlePrivate::socketErrorCallback(int error)
+{
+ // FIXME - in the future, we might not want to treat all errors as fatal.
+ if (m_streamHandle && m_streamHandle->client()) {
+ SocketStreamHandle* streamHandle = m_streamHandle;
+ m_streamHandle = 0;
+ // This following call deletes _this_. Nothing should be after it.
+ streamHandle->client()->didClose(streamHandle);
+ }
+}
+
+void SocketStreamHandlePrivate::socketSslErrors(const QList<QSslError>&)
+{
+ // FIXME: based on http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-68#page-15
+ // we should abort on certificate errors.
+ // We don't abort while this is still work in progress.
+ static_cast<QSslSocket*>(m_socket)->ignoreSslErrors();
+}
+SocketStreamHandle::SocketStreamHandle(const KURL& url, SocketStreamHandleClient* client)
+ : SocketStreamHandleBase(url, client)
+{
+ LOG(Network, "SocketStreamHandle %p new client %p", this, m_client);
+ m_p = new SocketStreamHandlePrivate(this, url);
+}
+
+SocketStreamHandle::~SocketStreamHandle()
+{
+ LOG(Network, "SocketStreamHandle %p delete", this);
+ setClient(0);
+ delete m_p;
+}
+
+int SocketStreamHandle::platformSend(const char* data, int len)
+{
+ LOG(Network, "SocketStreamHandle %p platformSend", this);
+ return m_p->send(data, len);
+}
+
+void SocketStreamHandle::platformClose()
+{
+ LOG(Network, "SocketStreamHandle %p platformClose", this);
+ m_p->close();
+}
+
+void SocketStreamHandle::didReceiveAuthenticationChallenge(const AuthenticationChallenge&)
+{
+ notImplemented();
+}
+
+void SocketStreamHandle::receivedCredential(const AuthenticationChallenge&, const Credential&)
+{
+ notImplemented();
+}
+
+void SocketStreamHandle::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&)
+{
+ notImplemented();
+}
+
+void SocketStreamHandle::receivedCancellation(const AuthenticationChallenge&)
+{
+ notImplemented();
+}
+
+} // namespace WebCore
+
+#include "moc_SocketStreamHandlePrivate.cpp"
diff --git a/WebCore/platform/network/soup/ResourceHandleSoup.cpp b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
index 6367a3e..da16f4a 100644
--- a/WebCore/platform/network/soup/ResourceHandleSoup.cpp
+++ b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
@@ -548,12 +548,6 @@ static bool startHttp(ResourceHandle* handle)
// balanced by a deref() in finishedCallback, which should always run
handle->ref();
- // FIXME: For now, we cannot accept content encoded in anything
- // other than identity, so force servers to do it our way. When
- // libsoup gets proper Content-Encoding support we will want to
- // use it here instead.
- soup_message_headers_replace(d->m_msg->request_headers, "Accept-Encoding", "identity");
-
// Balanced in ResourceHandleInternal's destructor; we need to
// keep our own ref, because after queueing the message, the
// session owns the initial reference.
@@ -882,7 +876,7 @@ static bool startGio(ResourceHandle* handle, KURL url)
url.setQuery(String());
url.removePort();
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
// we avoid the escaping for local files, because
// g_filename_from_uri (used internally by GFile) has problems
// decoding strings with arbitrary percent signs
diff --git a/WebCore/platform/qt/DragDataQt.cpp b/WebCore/platform/qt/DragDataQt.cpp
index b0611e6..09a797f 100644
--- a/WebCore/platform/qt/DragDataQt.cpp
+++ b/WebCore/platform/qt/DragDataQt.cpp
@@ -134,7 +134,7 @@ String DragData::asURL(String*) const
PassRefPtr<DocumentFragment> DragData::asFragment(Document* doc) const
{
if (m_platformDragData && m_platformDragData->hasHtml())
- return createFragmentFromMarkup(doc, m_platformDragData->html(), "");
+ return createFragmentFromMarkup(doc, m_platformDragData->html(), "", FragmentScriptingNotAllowed);
return 0;
}
diff --git a/WebCore/platform/qt/KURLQt.cpp b/WebCore/platform/qt/KURLQt.cpp
index 0763fe0..3bb3db2 100644
--- a/WebCore/platform/qt/KURLQt.cpp
+++ b/WebCore/platform/qt/KURLQt.cpp
@@ -86,7 +86,8 @@ KURL::operator QUrl() const
#else
// Qt 4.5 or later
// No need for special encoding
- QByteArray ba = m_string.utf8().data();
+ QString str = QString::fromRawData(reinterpret_cast<const QChar*>(m_string.characters()), m_string.length());
+ QByteArray ba = str.toUtf8();
#endif
QUrl url = QUrl::fromEncoded(ba);
@@ -95,8 +96,10 @@ KURL::operator QUrl() const
String KURL::fileSystemPath() const
{
- notImplemented();
- return String();
+ if (!isValid() || !protocolIs("file"))
+ return String();
+
+ return String(path());
}
}
diff --git a/WebCore/platform/qt/Localizations.cpp b/WebCore/platform/qt/Localizations.cpp
index 1768502..c919193 100644
--- a/WebCore/platform/qt/Localizations.cpp
+++ b/WebCore/platform/qt/Localizations.cpp
@@ -32,6 +32,7 @@
#include "LocalizedStrings.h"
#include "NotImplemented.h"
#include "PlatformString.h"
+#include <wtf/MathExtras.h>
#include <QCoreApplication>
#include <QLocale>
@@ -340,6 +341,16 @@ String AXLinkActionVerb()
return String();
}
+String AXMenuListPopupActionVerb()
+{
+ return String();
+}
+
+String AXMenuListActionVerb()
+{
+ return String();
+}
+
String multipleFileUploadText(unsigned)
{
return String();
diff --git a/WebCore/platform/qt/PasteboardQt.cpp b/WebCore/platform/qt/PasteboardQt.cpp
index 209a573..44c9eec 100644
--- a/WebCore/platform/qt/PasteboardQt.cpp
+++ b/WebCore/platform/qt/PasteboardQt.cpp
@@ -103,7 +103,7 @@ PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefP
if (mimeData->hasHtml()) {
QString html = mimeData->html();
if (!html.isEmpty()) {
- RefPtr<DocumentFragment> fragment = createFragmentFromMarkup(frame->document(), html, "");
+ RefPtr<DocumentFragment> fragment = createFragmentFromMarkup(frame->document(), html, "", FragmentScriptingNotAllowed);
if (fragment)
return fragment.release();
}
diff --git a/WebCore/platform/qt/PlatformKeyboardEventQt.cpp b/WebCore/platform/qt/PlatformKeyboardEventQt.cpp
index f78c7d7..12200f4 100644
--- a/WebCore/platform/qt/PlatformKeyboardEventQt.cpp
+++ b/WebCore/platform/qt/PlatformKeyboardEventQt.cpp
@@ -171,6 +171,22 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad = false
return VK_DECIMAL; // (6E) Decimal key
case Qt::Key_Slash:
return VK_DIVIDE; // (6F) Divide key
+ case Qt::Key_PageUp:
+ return VK_PRIOR; // (21) PAGE UP key
+ case Qt::Key_PageDown:
+ return VK_NEXT; // (22) PAGE DOWN key
+ case Qt::Key_End:
+ return VK_END; // (23) END key
+ case Qt::Key_Home:
+ return VK_HOME; // (24) HOME key
+ case Qt::Key_Left:
+ return VK_LEFT; // (25) LEFT ARROW key
+ case Qt::Key_Up:
+ return VK_UP; // (26) UP ARROW key
+ case Qt::Key_Right:
+ return VK_RIGHT; // (27) RIGHT ARROW key
+ case Qt::Key_Down:
+ return VK_DOWN; // (28) DOWN ARROW key
default:
return 0;
}
diff --git a/WebCore/platform/qt/PlatformTouchEventQt.cpp b/WebCore/platform/qt/PlatformTouchEventQt.cpp
new file mode 100644
index 0000000..338e9d4
--- /dev/null
+++ b/WebCore/platform/qt/PlatformTouchEventQt.cpp
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the WebKit project.
+ *
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "config.h"
+#include "PlatformTouchEvent.h"
+
+#if ENABLE(TOUCH_EVENTS)
+
+namespace WebCore {
+
+PlatformTouchEvent::PlatformTouchEvent(QTouchEvent* event)
+{
+ switch (event->type()) {
+ case QEvent::TouchBegin: m_type = TouchStart; break;
+ case QEvent::TouchUpdate: m_type = TouchMove; break;
+ case QEvent::TouchEnd: m_type = TouchEnd; break;
+ }
+ const QList<QTouchEvent::TouchPoint>& points = event->touchPoints();
+ for (int i = 0; i < points.count(); ++i)
+ m_touchPoints.append(PlatformTouchPoint(points.at(i)));
+
+ m_ctrlKey = (event->modifiers() & Qt::ControlModifier);
+ m_altKey = (event->modifiers() & Qt::AltModifier);
+ m_shiftKey = (event->modifiers() & Qt::ShiftModifier);
+ m_metaKey = (event->modifiers() & Qt::MetaModifier);
+}
+
+}
+
+#endif
diff --git a/WebCore/platform/qt/PlatformTouchPointQt.cpp b/WebCore/platform/qt/PlatformTouchPointQt.cpp
new file mode 100644
index 0000000..1788cef
--- /dev/null
+++ b/WebCore/platform/qt/PlatformTouchPointQt.cpp
@@ -0,0 +1,45 @@
+/*
+ * This file is part of the WebKit project.
+ *
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "config.h"
+#include "PlatformTouchPoint.h"
+
+#if ENABLE(TOUCH_EVENTS)
+
+namespace WebCore {
+
+PlatformTouchPoint::PlatformTouchPoint(const QTouchEvent::TouchPoint& point)
+{
+ m_id = point.id();
+ switch (point.state()) {
+ case Qt::TouchPointReleased: m_state = TouchReleased; break;
+ case Qt::TouchPointMoved: m_state = TouchMoved; break;
+ case Qt::TouchPointPressed: m_state = TouchPressed; break;
+ case Qt::TouchPointStationary: m_state = TouchStationary; break;
+ }
+ m_screenPos = point.screenPos().toPoint();
+ m_pos = point.pos().toPoint();
+}
+
+}
+
+#endif
diff --git a/WebCore/platform/qt/PopupMenuQt.cpp b/WebCore/platform/qt/PopupMenuQt.cpp
index f6ec4f7..315b891 100644
--- a/WebCore/platform/qt/PopupMenuQt.cpp
+++ b/WebCore/platform/qt/PopupMenuQt.cpp
@@ -1,7 +1,7 @@
/*
* This file is part of the popup menu implementation for <select> elements in WebCore.
*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2008, 2009, 2010 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (C) 2006 Apple Computer, Inc.
* Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
* Coypright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
@@ -26,28 +26,19 @@
#include "config.h"
#include "PopupMenu.h"
-#include "Frame.h"
+#include "Chrome.h"
+#include "ChromeClientQt.h"
#include "FrameView.h"
-#include "HostWindow.h"
#include "PopupMenuClient.h"
#include "QWebPageClient.h"
-#include "QWebPopup.h"
-
-#include <QAction>
-#include <QDebug>
-#include <QListWidget>
-#include <QListWidgetItem>
-#include <QMenu>
-#include <QPoint>
-#include <QStandardItemModel>
-#include <QWidgetAction>
+#include "QtAbstractWebPopup.h"
namespace WebCore {
PopupMenu::PopupMenu(PopupMenuClient* client)
: m_popupClient(client)
+ , m_popup(0)
{
- m_popup = new QWebPopup(client);
}
PopupMenu::~PopupMenu()
@@ -55,52 +46,30 @@ PopupMenu::~PopupMenu()
delete m_popup;
}
-void PopupMenu::clear()
+void PopupMenu::show(const IntRect& rect, FrameView* view, int index)
{
- m_popup->clear();
-}
+ ChromeClientQt* chromeClient = static_cast<ChromeClientQt*>(
+ view->frame()->page()->chrome()->client());
+ ASSERT(chromeClient);
-void PopupMenu::populate(const IntRect&)
-{
- clear();
- Q_ASSERT(client());
-
- QStandardItemModel* model = qobject_cast<QStandardItemModel*>(m_popup->model());
- Q_ASSERT(model);
-
- int size = client()->listSize();
- for (int i = 0; i < size; i++) {
- if (client()->itemIsSeparator(i))
- m_popup->insertSeparator(i);
- else {
- m_popup->insertItem(i, client()->itemText(i));
-
- if (model && !client()->itemIsEnabled(i))
- model->item(i)->setEnabled(false);
-
- if (client()->itemIsSelected(i))
- m_popup->setCurrentIndex(i);
- }
- }
-}
+ if (!m_popup)
+ m_popup = chromeClient->createSelectPopup();
+
+ m_popup->m_popupClient = m_popupClient;
+ m_popup->m_currentIndex = index;
+ m_popup->m_pageClient = chromeClient->platformPageClient();
+
+ QRect geometry(rect);
+ geometry.moveTopLeft(view->contentsToWindow(rect.topLeft()));
+ m_popup->m_geometry = geometry;
+
+ m_popup->show();
-void PopupMenu::show(const IntRect& r, FrameView* v, int index)
-{
- QWebPageClient* client = v->hostWindow()->platformPageClient();
- populate(r);
- QRect rect = r;
- rect.moveTopLeft(v->contentsToWindow(r.topLeft()));
- rect.setHeight(m_popup->sizeHint().height());
-
- m_popup->setParent(client->ownerWidget());
- m_popup->setGeometry(rect);
- m_popup->setCurrentIndex(index);
- m_popup->exec();
}
void PopupMenu::hide()
{
- m_popup->hidePopup();
+ m_popup->hide();
}
void PopupMenu::updateFromElement()
diff --git a/WebCore/platform/qt/QWebPageClient.h b/WebCore/platform/qt/QWebPageClient.h
index b510736..6d47c29 100644
--- a/WebCore/platform/qt/QWebPageClient.h
+++ b/WebCore/platform/qt/QWebPageClient.h
@@ -29,8 +29,14 @@
#ifndef QT_NO_CURSOR
#include <QCursor>
#endif
+
#include <QRect>
+QT_BEGIN_NAMESPACE
+class QGraphicsItem;
+class QStyle;
+QT_END_NAMESPACE
+
class QWebPageClient {
public:
virtual ~QWebPageClient() { }
@@ -39,6 +45,16 @@ public:
virtual void update(const QRect&) = 0;
virtual void setInputMethodEnabled(bool enable) = 0;
virtual bool inputMethodEnabled() const = 0;
+#if USE(ACCELERATED_COMPOSITING)
+ // this gets called when we start/stop compositing.
+ virtual void setRootGraphicsLayer(QGraphicsItem* layer) {}
+
+ // this gets called when the compositor wants us to sync the layers
+ // if scheduleSync is true, we schedule a sync ourselves. otherwise,
+ // we wait for the next update and sync the layers then.
+ virtual void markForSync(bool scheduleSync = false) {}
+#endif
+
#if QT_VERSION >= 0x040600
virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable) = 0;
#endif
@@ -67,6 +83,8 @@ public:
virtual QObject* pluginParent() const = 0;
+ virtual QStyle* style() const = 0;
+
protected:
#ifndef QT_NO_CURSOR
virtual QCursor cursor() const = 0;
diff --git a/WebCore/platform/qt/QWebPopup.cpp b/WebCore/platform/qt/QWebPopup.cpp
deleted file mode 100644
index d077079..0000000
--- a/WebCore/platform/qt/QWebPopup.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- *
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-#include "config.h"
-#include "QWebPopup.h"
-#include "PopupMenuStyle.h"
-
-#include <QAbstractItemView>
-#include <QApplication>
-#include <QInputContext>
-#include <QMouseEvent>
-
-namespace WebCore {
-
-QWebPopup::QWebPopup(PopupMenuClient* client)
- : m_client(client)
- , m_popupVisible(false)
-{
- Q_ASSERT(m_client);
-
- setFont(m_client->menuStyle().font().font());
- connect(this, SIGNAL(activated(int)),
- SLOT(activeChanged(int)), Qt::QueuedConnection);
-}
-
-
-void QWebPopup::exec()
-{
- QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton,
- Qt::LeftButton, Qt::NoModifier);
- QCoreApplication::sendEvent(this, &event);
-}
-
-void QWebPopup::showPopup()
-{
- QComboBox::showPopup();
- m_popupVisible = true;
-}
-
-void QWebPopup::hidePopup()
-{
- QWidget* activeFocus = QApplication::focusWidget();
- if (activeFocus && activeFocus == view()
- && activeFocus->testAttribute(Qt::WA_InputMethodEnabled)) {
- QInputContext* qic = activeFocus->inputContext();
- if (qic) {
- qic->reset();
- qic->setFocusWidget(0);
- }
- }
-
- QComboBox::hidePopup();
- if (!m_popupVisible)
- return;
-
- m_popupVisible = false;
- m_client->popupDidHide();
-}
-
-void QWebPopup::activeChanged(int index)
-{
- if (index < 0)
- return;
-
- m_client->valueChanged(index);
-}
-
-} // namespace WebCore
-
-#include "moc_QWebPopup.cpp"
diff --git a/WebCore/platform/qt/QtAbstractWebPopup.cpp b/WebCore/platform/qt/QtAbstractWebPopup.cpp
new file mode 100644
index 0000000..f64287d
--- /dev/null
+++ b/WebCore/platform/qt/QtAbstractWebPopup.cpp
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#include "config.h"
+#include "QtAbstractWebPopup.h"
+
+#include "PopupMenuClient.h"
+
+
+namespace WebCore {
+
+QtAbstractWebPopup::QtAbstractWebPopup()
+ : m_popupClient(0)
+ , m_pageClient(0)
+ , m_currentIndex(-1)
+{
+}
+
+QtAbstractWebPopup::~QtAbstractWebPopup()
+{
+}
+
+void QtAbstractWebPopup::popupDidHide()
+{
+ Q_ASSERT(m_popupClient);
+ m_popupClient->popupDidHide();
+}
+
+void QtAbstractWebPopup::valueChanged(int index)
+{
+ Q_ASSERT(m_popupClient);
+ m_popupClient->valueChanged(index);
+}
+
+QtAbstractWebPopup::ItemType QtAbstractWebPopup::itemType(int idx) const
+{
+ if (m_popupClient->itemIsSeparator(idx))
+ return Separator;
+ if (m_popupClient->itemIsLabel(idx))
+ return Group;
+ return Option;
+}
+
+} // namespace WebCore
diff --git a/WebCore/platform/qt/QtAbstractWebPopup.h b/WebCore/platform/qt/QtAbstractWebPopup.h
new file mode 100644
index 0000000..93b4122
--- /dev/null
+++ b/WebCore/platform/qt/QtAbstractWebPopup.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#ifndef QtAbstractWebPopup_h
+#define QtAbstractWebPopup_h
+
+#include "PopupMenuClient.h"
+
+#include <QFont>
+#include <QList>
+#include <QRect>
+#include <QWidget>
+
+class QWebPageClient;
+
+namespace WebCore {
+
+class QtAbstractWebPopup {
+public:
+ enum ItemType { Option, Group, Separator };
+
+ ItemType itemType(int) const;
+ QString itemText(int idx) const { return m_popupClient->itemText(idx); }
+ QString itemToolTip(int idx) const { return m_popupClient->itemToolTip(idx); }
+ bool itemIsEnabled(int idx) const { return m_popupClient->itemIsEnabled(idx); }
+ int itemCount() const { return m_popupClient->listSize(); }
+
+ QWebPageClient* pageClient() const { return m_pageClient; }
+ QRect geometry() const { return m_geometry; }
+ int currentIndex() const { return m_currentIndex; }
+
+ QtAbstractWebPopup();
+ virtual ~QtAbstractWebPopup();
+
+ virtual void show() = 0;
+ virtual void hide() = 0;
+
+ void popupDidHide();
+ void valueChanged(int index);
+
+ QFont font() { return m_popupClient->menuStyle().font().font(); }
+
+private:
+ friend class PopupMenu;
+ PopupMenuClient* m_popupClient;
+ QWebPageClient* m_pageClient;
+ int m_currentIndex;
+ QRect m_geometry;
+};
+
+}
+
+#endif // QtAbstractWebPopup_h
diff --git a/WebCore/platform/qt/RenderThemeQt.cpp b/WebCore/platform/qt/RenderThemeQt.cpp
index 501a28b..83e3746 100644
--- a/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/WebCore/platform/qt/RenderThemeQt.cpp
@@ -32,6 +32,7 @@
#include "CSSStyleSelector.h"
#include "CSSStyleSheet.h"
+#include "Chrome.h"
#include "ChromeClientQt.h"
#include "Color.h"
#include "Document.h"
@@ -42,10 +43,12 @@
#include "HTMLNames.h"
#include "NotImplemented.h"
#include "Page.h"
+#include "QWebPageClient.h"
#include "RenderBox.h"
+#include "RenderSlider.h"
#include "RenderTheme.h"
+#include "ScrollbarThemeQt.h"
#include "UserAgentStyleSheets.h"
-#include "QWebPageClient.h"
#include "qwebpage.h"
#include <QApplication>
@@ -58,6 +61,7 @@
#include <QStyleFactory>
#include <QStyleOptionButton>
#include <QStyleOptionFrameV2>
+#include <QStyleOptionSlider>
#include <QWidget>
@@ -66,17 +70,17 @@ namespace WebCore {
using namespace HTMLNames;
-StylePainter::StylePainter(const RenderObject::PaintInfo& paintInfo)
+StylePainter::StylePainter(RenderThemeQt* theme, const RenderObject::PaintInfo& paintInfo)
{
- init(paintInfo.context ? paintInfo.context : 0);
+ init(paintInfo.context ? paintInfo.context : 0, theme->qStyle());
}
-StylePainter::StylePainter(GraphicsContext* context)
+StylePainter::StylePainter(ScrollbarThemeQt* theme, GraphicsContext* context)
{
- init(context);
+ init(context, theme->style());
}
-void StylePainter::init(GraphicsContext* context)
+void StylePainter::init(GraphicsContext* context, QStyle* themeStyle)
{
painter = static_cast<QPainter*>(context->platformContext());
widget = 0;
@@ -85,7 +89,7 @@ void StylePainter::init(GraphicsContext* context)
dev = painter->device();
if (dev && dev->devType() == QInternal::Widget)
widget = static_cast<QWidget*>(dev);
- style = (widget ? widget->style() : QApplication::style());
+ style = themeStyle;
if (painter) {
// the styles often assume being called with a pristine painter where no brush is set,
@@ -157,13 +161,10 @@ QStyle* RenderThemeQt::fallbackStyle()
QStyle* RenderThemeQt::qStyle() const
{
if (m_page) {
- ChromeClientQt* client = static_cast<ChromeClientQt*>(m_page->chrome()->client());
-
- if (!client->m_webPage)
- return QApplication::style();
+ QWebPageClient* pageClient = m_page->chrome()->client()->platformPageClient();
- if (QWidget* view = client->m_webPage->view())
- return view->style();
+ if (pageClient)
+ return pageClient->style();
}
return QApplication::style();
@@ -394,8 +395,13 @@ void RenderThemeQt::adjustButtonStyle(CSSStyleSelector* selector, RenderStyle* s
// Ditch the border.
style->resetBorder();
- // Height is locked to auto.
- style->setHeight(Length(Auto));
+#ifdef Q_WS_MAC
+ if (style->appearance() == PushButtonPart) {
+ // The Mac ports ignore the specified height for <input type="button"> elements
+ // unless a border and/or background CSS property is also specified.
+ style->setHeight(Length(Auto));
+ }
+#endif
// White-space is locked to pre
style->setWhiteSpace(PRE);
@@ -465,7 +471,7 @@ void RenderThemeQt::setButtonPadding(RenderStyle* style) const
bool RenderThemeQt::paintButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
{
- StylePainter p(i);
+ StylePainter p(this, i);
if (!p.isValid())
return true;
@@ -476,7 +482,7 @@ bool RenderThemeQt::paintButton(RenderObject* o, const RenderObject::PaintInfo&
option.rect = r;
option.state |= QStyle::State_Small;
- ControlPart appearance = applyTheme(option, o);
+ ControlPart appearance = initializeCommonQStyleOptions(option, o);
if (appearance == PushButtonPart || appearance == ButtonPart) {
option.rect = inflateButtonRect(option.rect, qStyle());
p.drawControl(QStyle::CE_PushButton, option);
@@ -498,7 +504,7 @@ void RenderThemeQt::adjustTextFieldStyle(CSSStyleSelector*, RenderStyle* style,
bool RenderThemeQt::paintTextField(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
{
- StylePainter p(i);
+ StylePainter p(this, i);
if (!p.isValid())
return true;
@@ -512,7 +518,7 @@ bool RenderThemeQt::paintTextField(RenderObject* o, const RenderObject::PaintInf
panel.features = QStyleOptionFrameV2::None;
// Get the correct theme data for a text field
- ControlPart appearance = applyTheme(panel, o);
+ ControlPart appearance = initializeCommonQStyleOptions(panel, o);
if (appearance != TextFieldPart
&& appearance != SearchFieldPart
&& appearance != TextAreaPart
@@ -567,14 +573,14 @@ void RenderThemeQt::setPopupPadding(RenderStyle* style) const
bool RenderThemeQt::paintMenuList(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
{
- StylePainter p(i);
+ StylePainter p(this, i);
if (!p.isValid())
return true;
QStyleOptionComboBox opt;
if (p.widget)
opt.initFrom(p.widget);
- applyTheme(opt, o);
+ initializeCommonQStyleOptions(opt, o);
const QPoint topLeft = r.topLeft();
p.painter->translate(topLeft);
@@ -607,14 +613,14 @@ void RenderThemeQt::adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle* st
bool RenderThemeQt::paintMenuListButton(RenderObject* o, const RenderObject::PaintInfo& i,
const IntRect& r)
{
- StylePainter p(i);
+ StylePainter p(this, i);
if (!p.isValid())
return true;
QStyleOptionComboBox option;
if (p.widget)
option.initFrom(p.widget);
- applyTheme(option, o);
+ initializeCommonQStyleOptions(option, o);
option.rect = r;
// for drawing the combo box arrow, rely only on the fallback style
@@ -628,22 +634,73 @@ bool RenderThemeQt::paintMenuListButton(RenderObject* o, const RenderObject::Pai
bool RenderThemeQt::paintSliderTrack(RenderObject* o, const RenderObject::PaintInfo& pi,
const IntRect& r)
{
- notImplemented();
- return RenderTheme::paintSliderTrack(o, pi, r);
+ StylePainter p(this, pi);
+ if (!p.isValid())
+ return true;
+
+ QStyleOptionSlider option;
+ if (p.widget)
+ option.initFrom(p.widget);
+ ControlPart appearance = initializeCommonQStyleOptions(option, o);
+
+ RenderSlider* renderSlider = toRenderSlider(o);
+ IntRect thumbRect = renderSlider->thumbRect();
+
+ option.rect = r;
+
+ int value;
+ if (appearance == SliderVerticalPart) {
+ option.maximum = r.height() - thumbRect.height();
+ value = thumbRect.y();
+ } else {
+ option.maximum = r.width() - thumbRect.width();
+ value = thumbRect.x();
+ }
+
+ value = QStyle::sliderValueFromPosition(0, option.maximum, value, option.maximum);
+
+ option.sliderValue = value;
+ option.sliderPosition = value;
+ if (appearance == SliderVerticalPart)
+ option.orientation = Qt::Vertical;
+
+ if (renderSlider->inDragMode()) {
+ option.activeSubControls = QStyle::SC_SliderHandle;
+ option.state |= QStyle::State_Sunken;
+ }
+
+ const QPoint topLeft = r.topLeft();
+ p.painter->translate(topLeft);
+ option.rect.moveTo(QPoint(0, 0));
+ option.rect.setSize(r.size());
+
+ p.drawComplexControl(QStyle::CC_Slider, option);
+ p.painter->translate(-topLeft);
+
+ return false;
+}
+
+void RenderThemeQt::adjustSliderTrackStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
+{
+ style->setBoxShadow(0);
}
bool RenderThemeQt::paintSliderThumb(RenderObject* o, const RenderObject::PaintInfo& pi,
const IntRect& r)
{
- notImplemented();
- return RenderTheme::paintSliderThumb(o, pi, r);
+ // We've already painted it in paintSliderTrack(), no need to do anything here.
+ return false;
+}
+
+void RenderThemeQt::adjustSliderThumbStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
+{
+ style->setBoxShadow(0);
}
bool RenderThemeQt::paintSearchField(RenderObject* o, const RenderObject::PaintInfo& pi,
const IntRect& r)
{
- paintTextField(o, pi, r);
- return false;
+ return true;
}
void RenderThemeQt::adjustSearchFieldStyle(CSSStyleSelector* selector, RenderStyle* style,
@@ -706,13 +763,32 @@ bool RenderThemeQt::supportsFocus(ControlPart appearance) const
case MenulistPart:
case RadioPart:
case CheckboxPart:
+ case SliderHorizontalPart:
+ case SliderVerticalPart:
return true;
default: // No for all others...
return false;
}
}
-ControlPart RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) const
+void RenderThemeQt::setPaletteFromPageClientIfExists(QPalette& palette) const
+{
+ // If the webview has a custom palette, use it
+ if (!m_page)
+ return;
+ Chrome* chrome = m_page->chrome();
+ if (!chrome)
+ return;
+ ChromeClient* chromeClient = chrome->client();
+ if (!chromeClient)
+ return;
+ QWebPageClient* pageClient = chromeClient->platformPageClient();
+ if (!pageClient)
+ return;
+ palette = pageClient->palette();
+}
+
+ControlPart RenderThemeQt::initializeCommonQStyleOptions(QStyleOption& option, RenderObject* o) const
{
// Default bits: no focus, no mouse over
option.state &= ~(QStyle::State_HasFocus | QStyle::State_MouseOver);
@@ -724,19 +800,24 @@ ControlPart RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) con
// Readonly is supported on textfields.
option.state |= QStyle::State_ReadOnly;
- if (supportsFocus(o->style()->appearance()) && isFocused(o)) {
- option.state |= QStyle::State_HasFocus;
- option.state |= QStyle::State_KeyboardFocusChange;
- }
+ option.direction = Qt::LeftToRight;
if (isHovered(o))
option.state |= QStyle::State_MouseOver;
- option.direction = Qt::LeftToRight;
- if (o->style() && o->style()->direction() == WebCore::RTL)
- option.direction = Qt::RightToLeft;
+ setPaletteFromPageClientIfExists(option.palette);
+ RenderStyle* style = o->style();
+ if (!style)
+ return NoControlPart;
- ControlPart result = o->style()->appearance();
+ ControlPart result = style->appearance();
+ if (supportsFocus(result) && isFocused(o)) {
+ option.state |= QStyle::State_HasFocus;
+ option.state |= QStyle::State_KeyboardFocusChange;
+ }
+
+ if (style->direction() == WebCore::RTL)
+ option.direction = Qt::RightToLeft;
switch (result) {
case PushButtonPart:
@@ -753,18 +834,9 @@ ControlPart RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) con
option.state |= QStyle::State_Raised;
break;
}
- }
-
- if (result == RadioPart || result == CheckboxPart)
+ case RadioPart:
+ case CheckboxPart:
option.state |= (isChecked(o) ? QStyle::State_On : QStyle::State_Off);
-
- // If the owner widget has a custom palette, use it
- Page* page = o->document()->page();
- if (page) {
- ChromeClient* client = page->chrome()->client();
- QWebPageClient* pageClient = client->platformPageClient();
- if (pageClient)
- option.palette = pageClient->palette();
}
return result;
@@ -833,7 +905,7 @@ bool RenderThemeQt::paintMediaMuteButton(RenderObject* o, const RenderObject::Pa
if (!mediaElement)
return false;
- StylePainter p(paintInfo);
+ StylePainter p(this, paintInfo);
if (!p.isValid())
return true;
@@ -862,7 +934,7 @@ bool RenderThemeQt::paintMediaPlayButton(RenderObject* o, const RenderObject::Pa
if (!mediaElement)
return false;
- StylePainter p(paintInfo);
+ StylePainter p(this, paintInfo);
if (!p.isValid())
return true;
@@ -901,7 +973,7 @@ bool RenderThemeQt::paintMediaSliderTrack(RenderObject* o, const RenderObject::P
if (!mediaElement)
return false;
- StylePainter p(paintInfo);
+ StylePainter p(this, paintInfo);
if (!p.isValid())
return true;
@@ -909,16 +981,6 @@ bool RenderThemeQt::paintMediaSliderTrack(RenderObject* o, const RenderObject::P
paintMediaBackground(p.painter, r);
- if (MediaPlayer* player = mediaElement->player()) {
- if (player->totalBytesKnown()) {
- float percentLoaded = static_cast<float>(player->bytesLoaded()) / player->totalBytes();
-
- WorldMatrixTransformer transformer(p.painter, o, r);
- p.painter->setBrush(getMediaControlForegroundColor());
- p.painter->drawRect(0, 37, 100 * percentLoaded, 26);
- }
- }
-
return false;
}
@@ -928,7 +990,7 @@ bool RenderThemeQt::paintMediaSliderThumb(RenderObject* o, const RenderObject::P
if (!mediaElement)
return false;
- StylePainter p(paintInfo);
+ StylePainter p(this, paintInfo);
if (!p.isValid())
return true;
@@ -944,13 +1006,26 @@ bool RenderThemeQt::paintMediaSliderThumb(RenderObject* o, const RenderObject::P
void RenderThemeQt::adjustSliderThumbSize(RenderObject* o) const
{
- if (o->style()->appearance() == MediaSliderThumbPart) {
+ ControlPart part = o->style()->appearance();
+
+ if (part == MediaSliderThumbPart) {
RenderStyle* parentStyle = o->parent()->style();
Q_ASSERT(parentStyle);
int parentHeight = parentStyle->height().value();
o->style()->setWidth(Length(parentHeight / 3, Fixed));
o->style()->setHeight(Length(parentHeight, Fixed));
+ } else if (part == SliderThumbHorizontalPart || part == SliderThumbVerticalPart) {
+ QStyleOptionSlider option;
+ if (part == SliderThumbVerticalPart)
+ option.orientation = Qt::Vertical;
+
+ QStyle* style = qStyle();
+
+ int width = style->pixelMetric(QStyle::PM_SliderLength, &option);
+ int height = style->pixelMetric(QStyle::PM_SliderThickness, &option);
+ o->style()->setWidth(Length(width, Fixed));
+ o->style()->setHeight(Length(height, Fixed));
}
}
diff --git a/WebCore/platform/qt/RenderThemeQt.h b/WebCore/platform/qt/RenderThemeQt.h
index 617c875..e6bab7e 100644
--- a/WebCore/platform/qt/RenderThemeQt.h
+++ b/WebCore/platform/qt/RenderThemeQt.h
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*
*/
-#ifndef RenderThemeQt_H
-#define RenderThemeQt_H
+#ifndef RenderThemeQt_h
+#define RenderThemeQt_h
#include "RenderTheme.h"
@@ -35,6 +35,7 @@ namespace WebCore {
class RenderStyle;
class HTMLMediaElement;
+class ScrollbarThemeQt;
class RenderThemeQt : public RenderTheme {
private:
@@ -75,6 +76,8 @@ public:
virtual String extraMediaControlsStyleSheet();
#endif
+ QStyle* qStyle() const;
+
protected:
virtual bool paintCheckbox(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r);
virtual void setCheckboxSize(RenderStyle*) const;
@@ -99,7 +102,10 @@ protected:
virtual void adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
virtual bool paintSliderTrack(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+ virtual void adjustSliderTrackStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+
virtual bool paintSliderThumb(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+ virtual void adjustSliderThumbStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
virtual bool paintSearchField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
virtual void adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
@@ -132,12 +138,13 @@ private:
private:
bool supportsFocus(ControlPart) const;
- ControlPart applyTheme(QStyleOption&, RenderObject*) const;
+ ControlPart initializeCommonQStyleOptions(QStyleOption&, RenderObject*) const;
void setButtonPadding(RenderStyle*) const;
void setPopupPadding(RenderStyle*) const;
- QStyle* qStyle() const;
+ void setPaletteFromPageClientIfExists(QPalette&) const;
+
QStyle* fallbackStyle();
Page* m_page;
@@ -152,8 +159,8 @@ private:
class StylePainter {
public:
- explicit StylePainter(const RenderObject::PaintInfo& paintInfo);
- explicit StylePainter(GraphicsContext* context);
+ explicit StylePainter(RenderThemeQt*, const RenderObject::PaintInfo&);
+ explicit StylePainter(ScrollbarThemeQt*, GraphicsContext*);
~StylePainter();
bool isValid() const { return painter && style; }
@@ -170,7 +177,7 @@ public:
{ style->drawComplexControl(cc, &opt, painter, widget); }
private:
- void init(GraphicsContext* context);
+ void init(GraphicsContext* context, QStyle*);
QBrush oldBrush;
bool oldAntialiasing;
@@ -180,4 +187,4 @@ private:
}
-#endif
+#endif // RenderThemeQt_h
diff --git a/WebCore/platform/qt/ScrollViewQt.cpp b/WebCore/platform/qt/ScrollViewQt.cpp
index ccbd751..17ad253 100644
--- a/WebCore/platform/qt/ScrollViewQt.cpp
+++ b/WebCore/platform/qt/ScrollViewQt.cpp
@@ -36,32 +36,19 @@ namespace WebCore {
void ScrollView::platformInit()
{
- m_widgetsPreventingBlitting = 0;
}
void ScrollView::platformDestroy()
{
}
-// Windowed plugins are using native windows and are thus preventing
-// us from doing any kind of scrolling optimization.
-
-void ScrollView::adjustWidgetsPreventingBlittingCount(int delta)
-{
- m_widgetsPreventingBlitting += delta;
- if (parent())
- parent()->adjustWidgetsPreventingBlittingCount(delta);
-}
-
void ScrollView::platformAddChild(Widget*)
{
- adjustWidgetsPreventingBlittingCount(1);
}
void ScrollView::platformRemoveChild(Widget* child)
{
child->hide();
- adjustWidgetsPreventingBlittingCount(-1);
}
}
diff --git a/WebCore/platform/qt/ScrollbarThemeQt.cpp b/WebCore/platform/qt/ScrollbarThemeQt.cpp
index 561e55f..c0c80ba 100644
--- a/WebCore/platform/qt/ScrollbarThemeQt.cpp
+++ b/WebCore/platform/qt/ScrollbarThemeQt.cpp
@@ -140,14 +140,14 @@ bool ScrollbarThemeQt::paint(Scrollbar* scrollbar, GraphicsContext* graphicsCont
return false;
}
- StylePainter p(graphicsContext);
+ StylePainter p(this, graphicsContext);
if (!p.isValid())
return true;
p.painter->save();
QStyleOptionSlider* opt = styleOptionSlider(scrollbar, p.widget);
- p.painter->setClipRect(opt->rect.intersected(damageRect));
+ p.painter->setClipRect(opt->rect.intersected(damageRect), Qt::IntersectClip);
#ifdef Q_WS_MAC
p.drawComplexControl(QStyle::CC_ScrollBar, *opt);
@@ -172,14 +172,14 @@ ScrollbarPart ScrollbarThemeQt::hitTest(Scrollbar* scrollbar, const PlatformMous
QStyleOptionSlider* opt = styleOptionSlider(scrollbar);
const QPoint pos = scrollbar->convertFromContainingWindow(evt.pos());
opt->rect.moveTo(QPoint(0, 0));
- QStyle::SubControl sc = QApplication::style()->hitTestComplexControl(QStyle::CC_ScrollBar, opt, pos, 0);
+ QStyle::SubControl sc = style()->hitTestComplexControl(QStyle::CC_ScrollBar, opt, pos, 0);
return scrollbarPart(sc);
}
bool ScrollbarThemeQt::shouldCenterOnThumb(Scrollbar*, const PlatformMouseEvent& evt)
{
// Middle click centers slider thumb (if supported)
- return QApplication::style()->styleHint(QStyle::SH_ScrollBar_MiddleClickAbsolutePosition) && evt.button() == MiddleButton;
+ return style()->styleHint(QStyle::SH_ScrollBar_MiddleClickAbsolutePosition) && evt.button() == MiddleButton;
}
void ScrollbarThemeQt::invalidatePart(Scrollbar* scrollbar, ScrollbarPart)
@@ -190,13 +190,12 @@ void ScrollbarThemeQt::invalidatePart(Scrollbar* scrollbar, ScrollbarPart)
int ScrollbarThemeQt::scrollbarThickness(ScrollbarControlSize controlSize)
{
- QStyle* s = QApplication::style();
QStyleOptionSlider o;
o.orientation = Qt::Vertical;
o.state &= ~QStyle::State_Horizontal;
if (controlSize != RegularScrollbar)
o.state |= QStyle::State_Mini;
- return s->pixelMetric(QStyle::PM_ScrollBarExtent, &o, 0);
+ return style()->pixelMetric(QStyle::PM_ScrollBarExtent, &o, 0);
}
int ScrollbarThemeQt::thumbPosition(Scrollbar* scrollbar)
@@ -209,21 +208,21 @@ int ScrollbarThemeQt::thumbPosition(Scrollbar* scrollbar)
int ScrollbarThemeQt::thumbLength(Scrollbar* scrollbar)
{
QStyleOptionSlider* opt = styleOptionSlider(scrollbar);
- IntRect thumb = QApplication::style()->subControlRect(QStyle::CC_ScrollBar, opt, QStyle::SC_ScrollBarSlider, 0);
+ IntRect thumb = style()->subControlRect(QStyle::CC_ScrollBar, opt, QStyle::SC_ScrollBarSlider, 0);
return scrollbar->orientation() == HorizontalScrollbar ? thumb.width() : thumb.height();
}
int ScrollbarThemeQt::trackPosition(Scrollbar* scrollbar)
{
QStyleOptionSlider* opt = styleOptionSlider(scrollbar);
- IntRect track = QApplication::style()->subControlRect(QStyle::CC_ScrollBar, opt, QStyle::SC_ScrollBarGroove, 0);
+ IntRect track = style()->subControlRect(QStyle::CC_ScrollBar, opt, QStyle::SC_ScrollBarGroove, 0);
return scrollbar->orientation() == HorizontalScrollbar ? track.x() - scrollbar->x() : track.y() - scrollbar->y();
}
int ScrollbarThemeQt::trackLength(Scrollbar* scrollbar)
{
QStyleOptionSlider* opt = styleOptionSlider(scrollbar);
- IntRect track = QApplication::style()->subControlRect(QStyle::CC_ScrollBar, opt, QStyle::SC_ScrollBarGroove, 0);
+ IntRect track = style()->subControlRect(QStyle::CC_ScrollBar, opt, QStyle::SC_ScrollBarGroove, 0);
return scrollbar->orientation() == HorizontalScrollbar ? track.width() : track.height();
}
@@ -235,9 +234,9 @@ void ScrollbarThemeQt::paintScrollCorner(ScrollView* scrollView, GraphicsContext
}
#if QT_VERSION < 0x040500
- context->fillRect(rect, QApplication::palette().color(QPalette::Normal, QPalette::Window));
+ context->fillRect(rect, QApplication::palette().color(QPalette::Normal, QPalette::Window), DeviceColorSpace);
#else
- StylePainter p(context);
+ StylePainter p(this, context);
if (!p.isValid())
return;
@@ -247,5 +246,10 @@ void ScrollbarThemeQt::paintScrollCorner(ScrollView* scrollView, GraphicsContext
#endif
}
+QStyle* ScrollbarThemeQt::style() const
+{
+ return QApplication::style();
+}
+
}
diff --git a/WebCore/platform/qt/ScrollbarThemeQt.h b/WebCore/platform/qt/ScrollbarThemeQt.h
index 6ca44ea..cf4882d 100644
--- a/WebCore/platform/qt/ScrollbarThemeQt.h
+++ b/WebCore/platform/qt/ScrollbarThemeQt.h
@@ -28,6 +28,12 @@
#include "ScrollbarTheme.h"
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+class QStyle;
+QT_END_NAMESPACE
+
namespace WebCore {
class ScrollbarThemeQt : public ScrollbarTheme {
@@ -49,6 +55,8 @@ public:
virtual int trackLength(Scrollbar*);
virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar);
+
+ QStyle* style() const;
};
}
diff --git a/WebCore/platform/qt/SharedBufferQt.cpp b/WebCore/platform/qt/SharedBufferQt.cpp
index 8d62226..029d9d6 100644
--- a/WebCore/platform/qt/SharedBufferQt.cpp
+++ b/WebCore/platform/qt/SharedBufferQt.cpp
@@ -45,6 +45,8 @@ PassRefPtr<SharedBuffer> SharedBuffer::createWithContentsOfFile(const String& fi
if (result->m_buffer.size() != file.size())
return 0;
+ result->m_size = result->m_buffer.size();
+
file.read(result->m_buffer.data(), result->m_buffer.size());
return result.release();
}
diff --git a/WebCore/platform/sql/SQLiteDatabase.cpp b/WebCore/platform/sql/SQLiteDatabase.cpp
index 9a4e32a..d170db5 100644
--- a/WebCore/platform/sql/SQLiteDatabase.cpp
+++ b/WebCore/platform/sql/SQLiteDatabase.cpp
@@ -320,7 +320,7 @@ int SQLiteDatabase::authorizerFunction(void* userData, int actionCode, const cha
case SQLITE_DROP_VTABLE:
return auth->dropVTable(parameter1, parameter2);
case SQLITE_FUNCTION:
- return auth->allowFunction(parameter1);
+ return auth->allowFunction(parameter2);
#endif
default:
ASSERT_NOT_REACHED();
diff --git a/WebCore/platform/text/AtomicString.cpp b/WebCore/platform/text/AtomicString.cpp
index 17d7832..64c03cb 100644
--- a/WebCore/platform/text/AtomicString.cpp
+++ b/WebCore/platform/text/AtomicString.cpp
@@ -103,7 +103,9 @@ static inline bool equal(StringImpl* string, const UChar* characters, unsigned l
if (string->length() != length)
return false;
-#if PLATFORM(ARM) || PLATFORM(SH4)
+ // 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)
const UChar* stringCharacters = string->characters();
for (unsigned i = 0; i != length; ++i) {
if (*stringCharacters++ != *characters++)
@@ -250,7 +252,7 @@ PassRefPtr<StringImpl> AtomicString::add(const JSC::Identifier& identifier)
if (!length)
return StringImpl::empty();
- HashAndCharacters buffer = { string->computedHash(), string->data(), length };
+ HashAndCharacters buffer = { string->existingHash(), string->data(), length };
pair<HashSet<StringImpl*>::iterator, bool> addResult = stringTable().add<HashAndCharacters, HashAndCharactersTranslator>(buffer);
if (!addResult.second)
return *addResult.first;
@@ -284,7 +286,7 @@ AtomicStringImpl* AtomicString::find(const JSC::Identifier& identifier)
if (!length)
return static_cast<AtomicStringImpl*>(StringImpl::empty());
- HashAndCharacters buffer = { string->computedHash(), string->data(), length };
+ HashAndCharacters buffer = { string->existingHash(), string->data(), length };
HashSet<StringImpl*>::iterator iterator = stringTable().find<HashAndCharacters, HashAndCharactersTranslator>(buffer);
if (iterator == stringTable().end())
return 0;
@@ -302,6 +304,8 @@ DEFINE_GLOBAL(AtomicString, emptyAtom, "")
DEFINE_GLOBAL(AtomicString, textAtom, "#text")
DEFINE_GLOBAL(AtomicString, commentAtom, "#comment")
DEFINE_GLOBAL(AtomicString, starAtom, "*")
+DEFINE_GLOBAL(AtomicString, xmlAtom, "xml")
+DEFINE_GLOBAL(AtomicString, xmlnsAtom, "xmlns")
void AtomicString::init()
{
@@ -316,6 +320,8 @@ void AtomicString::init()
new ((void*)&textAtom) AtomicString("#text");
new ((void*)&commentAtom) AtomicString("#comment");
new ((void*)&starAtom) AtomicString("*");
+ new ((void*)&xmlAtom) AtomicString("xml");
+ new ((void*)&xmlnsAtom) AtomicString("xmlns");
initialized = true;
}
diff --git a/WebCore/platform/text/AtomicString.h b/WebCore/platform/text/AtomicString.h
index 47d07c5..64a8bfe 100644
--- a/WebCore/platform/text/AtomicString.h
+++ b/WebCore/platform/text/AtomicString.h
@@ -156,6 +156,8 @@ inline bool equalIgnoringCase(const String& a, const AtomicString& b) { return e
extern const AtomicString textAtom;
extern const AtomicString commentAtom;
extern const AtomicString starAtom;
+ extern const AtomicString xmlAtom;
+ extern const AtomicString xmlnsAtom;
#endif
} // namespace WebCore
diff --git a/WebCore/platform/text/CharacterNames.h b/WebCore/platform/text/CharacterNames.h
index cd09447..ebaa1f1 100644
--- a/WebCore/platform/text/CharacterNames.h
+++ b/WebCore/platform/text/CharacterNames.h
@@ -37,6 +37,7 @@ namespace WebCore {
const UChar blackSquare = 0x25A0;
const UChar bullet = 0x2022;
+ const UChar ethiopicPrefaceColon = 0x1366;
const UChar hebrewPunctuationGeresh = 0x05F3;
const UChar hebrewPunctuationGershayim = 0x05F4;
const UChar horizontalEllipsis = 0x2026;
@@ -59,6 +60,7 @@ namespace WebCore {
const UChar rightToLeftMark = 0x200F;
const UChar rightToLeftOverride = 0x202E;
const UChar softHyphen = 0x00AD;
+ const UChar space = 0x0020;
const UChar whiteBullet = 0x25E6;
const UChar zeroWidthSpace = 0x200B;
diff --git a/WebCore/platform/text/PlatformString.h b/WebCore/platform/text/PlatformString.h
index 247536a..8a379be 100644
--- a/WebCore/platform/text/PlatformString.h
+++ b/WebCore/platform/text/PlatformString.h
@@ -31,16 +31,6 @@
#include <objc/objc.h>
#endif
-#if USE(JSC)
-#include <runtime/Identifier.h>
-#else
-// runtime/Identifier.h brings in a variety of wtf headers. We explicitly
-// include them in the case of non-JSC builds to keep things consistent.
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/OwnPtr.h>
-#endif
-
#if PLATFORM(CF)
typedef const struct __CFString * CFStringRef;
#endif
@@ -60,6 +50,13 @@ class wxString;
class BString;
#endif
+#if USE(JSC)
+namespace JSC {
+class Identifier;
+class UString;
+}
+#endif
+
namespace WebCore {
class CString;
diff --git a/WebCore/platform/text/String.cpp b/WebCore/platform/text/String.cpp
index 24659a4..04b04ab 100644
--- a/WebCore/platform/text/String.cpp
+++ b/WebCore/platform/text/String.cpp
@@ -37,6 +37,8 @@
#include <wtf/unicode/UTF8.h>
#if USE(JSC)
+#include <runtime/Identifier.h>
+
using JSC::Identifier;
using JSC::UString;
#endif
@@ -352,7 +354,7 @@ String String::format(const char *format, ...)
return buffer;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
va_list args;
va_start(args, format);
@@ -444,7 +446,7 @@ String String::number(unsigned long n)
String String::number(long long n)
{
-#if PLATFORM(WIN_OS) && !PLATFORM(QT)
+#if OS(WINDOWS) && !PLATFORM(QT)
return String::format("%I64i", n);
#else
return String::format("%lli", n);
@@ -453,7 +455,7 @@ String String::number(long long n)
String String::number(unsigned long long n)
{
-#if PLATFORM(WIN_OS) && !PLATFORM(QT)
+#if OS(WINDOWS) && !PLATFORM(QT)
return String::format("%I64u", n);
#else
return String::format("%llu", n);
diff --git a/WebCore/platform/text/StringBuilder.cpp b/WebCore/platform/text/StringBuilder.cpp
index c21e366..3e34981 100644
--- a/WebCore/platform/text/StringBuilder.cpp
+++ b/WebCore/platform/text/StringBuilder.cpp
@@ -95,4 +95,17 @@ String StringBuilder::toString() const
return result;
}
+void StringBuilder::clear()
+{
+ m_totalLength = UINT_MAX;
+ m_strings.clear();
+}
+
+unsigned StringBuilder::length() const
+{
+ if (m_totalLength == UINT_MAX)
+ return 0;
+ return m_totalLength;
+}
+
}
diff --git a/WebCore/platform/text/StringBuilder.h b/WebCore/platform/text/StringBuilder.h
index 8d76b9c..7f72fbf 100644
--- a/WebCore/platform/text/StringBuilder.h
+++ b/WebCore/platform/text/StringBuilder.h
@@ -42,6 +42,9 @@ namespace WebCore {
void append(const String&);
void append(UChar);
void append(char);
+
+ void clear();
+ unsigned length() const;
String toString() const;
diff --git a/WebCore/platform/text/StringHash.h b/WebCore/platform/text/StringHash.h
index 21a478e..e6c548a 100644
--- a/WebCore/platform/text/StringHash.h
+++ b/WebCore/platform/text/StringHash.h
@@ -24,8 +24,8 @@
#include "AtomicString.h"
#include "PlatformString.h"
-#include <wtf/HashFunctions.h>
#include <wtf/HashTraits.h>
+#include <wtf/StringHashFunctions.h>
#include <wtf/unicode/Unicode.h>
namespace WebCore {
@@ -52,7 +52,9 @@ namespace WebCore {
if (aLength != bLength)
return false;
-#if PLATFORM(ARM) || PLATFORM(SH4)
+ // 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)
const UChar* aChars = a->characters();
const UChar* bChars = b->characters();
for (unsigned i = 0; i != aLength; ++i) {
diff --git a/WebCore/platform/text/StringImpl.cpp b/WebCore/platform/text/StringImpl.cpp
index 5cf4ced..3b61a0b 100644
--- a/WebCore/platform/text/StringImpl.cpp
+++ b/WebCore/platform/text/StringImpl.cpp
@@ -34,6 +34,7 @@
#include "TextBreakIterator.h"
#include "TextEncoding.h"
#include "ThreadGlobalData.h"
+#include <runtime/UString.h>
#include <wtf/dtoa.h>
#include <wtf/Assertions.h>
#include <wtf/Threading.h>
@@ -979,7 +980,7 @@ JSC::UString StringImpl::ustring()
{
SharedUChar* sharedBuffer = this->sharedBuffer();
if (sharedBuffer)
- return JSC::UString::Rep::create(const_cast<UChar*>(m_data), m_length, sharedBuffer);
+ return JSC::UString::Rep::create(sharedBuffer, const_cast<UChar*>(m_data), m_length);
return JSC::UString(m_data, m_length);
}
diff --git a/WebCore/platform/text/StringImpl.h b/WebCore/platform/text/StringImpl.h
index 5155fa5..f7a9d06 100644
--- a/WebCore/platform/text/StringImpl.h
+++ b/WebCore/platform/text/StringImpl.h
@@ -27,16 +27,12 @@
#include <wtf/ASCIICType.h>
#include <wtf/CrossThreadRefCounted.h>
#include <wtf/OwnFastMallocPtr.h>
-#include <wtf/PassRefPtr.h>
#include <wtf/PtrAndFlags.h>
#include <wtf/RefCounted.h>
+#include <wtf/StringHashFunctions.h>
#include <wtf/Vector.h>
#include <wtf/unicode/Unicode.h>
-#if USE(JSC)
-#include <runtime/UString.h>
-#endif
-
#if PLATFORM(CF)
typedef const struct __CFString * CFStringRef;
#endif
@@ -45,6 +41,10 @@ typedef const struct __CFString * CFStringRef;
@class NSString;
#endif
+namespace JSC {
+class UString;
+}
+
namespace WebCore {
class StringBuffer;
@@ -103,8 +103,8 @@ public:
unsigned hash() { if (m_hash == 0) m_hash = computeHash(m_data, m_length); return m_hash; }
unsigned existingHash() const { ASSERT(m_hash); return m_hash; }
- static unsigned computeHash(const UChar*, unsigned len);
- static unsigned computeHash(const char*);
+ inline static unsigned computeHash(const UChar* data, unsigned length) { return WTF::stringHash(data, length); }
+ inline static unsigned computeHash(const char* data) { return WTF::stringHash(data); }
// Returns a StringImpl suitable for use on another thread.
PassRefPtr<StringImpl> crossThreadString();
@@ -214,91 +214,6 @@ inline bool equalIgnoringCase(const char* a, const UChar* b, unsigned length) {
bool equalIgnoringNullity(StringImpl*, StringImpl*);
-// Golden ratio - arbitrary start value to avoid mapping all 0's to all 0's
-// or anything like that.
-const unsigned phi = 0x9e3779b9U;
-
-// Paul Hsieh's SuperFastHash
-// http://www.azillionmonkeys.com/qed/hash.html
-inline unsigned StringImpl::computeHash(const UChar* data, unsigned length)
-{
- unsigned hash = phi;
-
- // Main loop.
- for (unsigned pairCount = length >> 1; pairCount; pairCount--) {
- hash += data[0];
- unsigned tmp = (data[1] << 11) ^ hash;
- hash = (hash << 16) ^ tmp;
- data += 2;
- hash += hash >> 11;
- }
-
- // Handle end case.
- if (length & 1) {
- hash += data[0];
- hash ^= hash << 11;
- hash += hash >> 17;
- }
-
- // Force "avalanching" of final 127 bits.
- hash ^= hash << 3;
- hash += hash >> 5;
- hash ^= hash << 2;
- hash += hash >> 15;
- hash ^= hash << 10;
-
- // This avoids ever returning a hash code of 0, since that is used to
- // signal "hash not computed yet", using a value that is likely to be
- // effectively the same as 0 when the low bits are masked.
- hash |= !hash << 31;
-
- return hash;
-}
-
-// Paul Hsieh's SuperFastHash
-// http://www.azillionmonkeys.com/qed/hash.html
-inline unsigned StringImpl::computeHash(const char* data)
-{
- // This hash is designed to work on 16-bit chunks at a time. But since the normal case
- // (above) is to hash UTF-16 characters, we just treat the 8-bit chars as if they
- // were 16-bit chunks, which should give matching results
-
- unsigned hash = phi;
-
- // Main loop
- for (;;) {
- unsigned char b0 = data[0];
- if (!b0)
- break;
- unsigned char b1 = data[1];
- if (!b1) {
- hash += b0;
- hash ^= hash << 11;
- hash += hash >> 17;
- break;
- }
- hash += b0;
- unsigned tmp = (b1 << 11) ^ hash;
- hash = (hash << 16) ^ tmp;
- data += 2;
- hash += hash >> 11;
- }
-
- // Force "avalanching" of final 127 bits.
- hash ^= hash << 3;
- hash += hash >> 5;
- hash ^= hash << 2;
- hash += hash >> 15;
- hash ^= hash << 10;
-
- // This avoids ever returning a hash code of 0, since that is used to
- // signal "hash not computed yet", using a value that is likely to be
- // effectively the same as 0 when the low bits are masked.
- hash |= !hash << 31;
-
- return hash;
-}
-
static inline bool isSpaceOrNewline(UChar c)
{
// Use isASCIISpace() for basic Latin-1.
diff --git a/WebCore/platform/text/TextCodecICU.cpp b/WebCore/platform/text/TextCodecICU.cpp
index 7ebce2c..a8a817f 100644
--- a/WebCore/platform/text/TextCodecICU.cpp
+++ b/WebCore/platform/text/TextCodecICU.cpp
@@ -87,7 +87,7 @@ void TextCodecICU::registerExtendedEncodingNames(EncodingNameRegistrar registrar
const char* name = ucnv_getAvailableName(i);
UErrorCode error = U_ZERO_ERROR;
// Try MIME before trying IANA to pick up commonly used names like
- // 'EUC-JP' instead of horrendeously long names like
+ // 'EUC-JP' instead of horrendously long names like
// 'Extended_UNIX_Code_Packed_Format_for_Japanese'.
const char* standardName = ucnv_getStandardName(name, "MIME", &error);
if (!U_SUCCESS(error) || !standardName) {
diff --git a/WebCore/platform/text/TextEncoding.cpp b/WebCore/platform/text/TextEncoding.cpp
index ec9a8b0..4a30d62 100644
--- a/WebCore/platform/text/TextEncoding.cpp
+++ b/WebCore/platform/text/TextEncoding.cpp
@@ -129,7 +129,7 @@ CString TextEncoding::encode(const UChar* characters, size_t length, Unencodable
UTF16Normalized.set(g_utf8_to_utf16(UTF8Normalized.get(), -1, 0, &UTF16Length, 0));
return newTextCodec(*this)->encode(UTF16Normalized.get(), UTF16Length, handling);
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
// normalization will be done by Windows CE API
OwnPtr<TextCodec> textCodec = newTextCodec(*this);
return textCodec.get() ? textCodec->encode(characters, length, handling) : CString();
diff --git a/WebCore/platform/text/TextEncodingDetectorICU.cpp b/WebCore/platform/text/TextEncodingDetectorICU.cpp
index fcb2aa9..c0d11de 100644
--- a/WebCore/platform/text/TextEncodingDetectorICU.cpp
+++ b/WebCore/platform/text/TextEncodingDetectorICU.cpp
@@ -69,7 +69,7 @@ bool detectTextEncoding(const char* data, size_t len,
// "the context" (parent-encoding, referrer encoding, etc).
// 2. 'Emulate' Firefox/IE's non-Universal detectors (e.g.
// Chinese, Japanese, Russian, Korean and Hebrew) by picking the
- // encoding with a highest confidence among the detetctor-specific
+ // encoding with a highest confidence among the detector-specific
// limited set of candidate encodings.
// Below is a partial implementation of the first part of what's outlined
// above.
diff --git a/WebCore/platform/text/TextEncodingRegistry.cpp b/WebCore/platform/text/TextEncodingRegistry.cpp
index a4be520..00ad2c9 100644
--- a/WebCore/platform/text/TextEncodingRegistry.cpp
+++ b/WebCore/platform/text/TextEncodingRegistry.cpp
@@ -51,7 +51,7 @@
#if USE(GLIB_UNICODE)
#include "gtk/TextCodecGtk.h"
#endif
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
#include "TextCodecWince.h"
#endif
@@ -230,7 +230,7 @@ static void buildBaseTextCodecMaps()
TextCodecGtk::registerBaseCodecs(addToTextCodecMap);
#endif
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
TextCodecWince::registerBaseEncodingNames(addToTextEncodingNameMap);
TextCodecWince::registerBaseCodecs(addToTextCodecMap);
#endif
@@ -258,7 +258,7 @@ static void extendTextCodecMaps()
TextCodecGtk::registerExtendedCodecs(addToTextCodecMap);
#endif
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
TextCodecWince::registerExtendedEncodingNames(addToTextEncodingNameMap);
TextCodecWince::registerExtendedCodecs(addToTextCodecMap);
#endif
diff --git a/WebCore/platform/text/TextStream.cpp b/WebCore/platform/text/TextStream.cpp
index eb4bae7..baaa8b9 100644
--- a/WebCore/platform/text/TextStream.cpp
+++ b/WebCore/platform/text/TextStream.cpp
@@ -90,6 +90,13 @@ TextStream& TextStream::operator<<(const char* string)
return *this;
}
+TextStream& TextStream::operator<<(void* p)
+{
+ char buffer[printBufferSize];
+ snprintf(buffer, sizeof(buffer) - 1, "%p", p);
+ return *this << buffer;
+}
+
TextStream& TextStream::operator<<(const String& string)
{
append(m_text, string);
@@ -101,7 +108,7 @@ String TextStream::release()
return String::adopt(m_text);
}
-#if PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC)
+#if OS(WINDOWS) && PLATFORM(X86_64) && COMPILER(MSVC)
TextStream& TextStream::operator<<(__int64 i)
{
char buffer[printBufferSize];
diff --git a/WebCore/platform/text/TextStream.h b/WebCore/platform/text/TextStream.h
index 71034f3..dfaa048 100644
--- a/WebCore/platform/text/TextStream.h
+++ b/WebCore/platform/text/TextStream.h
@@ -43,8 +43,9 @@ public:
TextStream& operator<<(float);
TextStream& operator<<(double);
TextStream& operator<<(const char*);
+ TextStream& operator<<(void*);
TextStream& operator<<(const String&);
-#if PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC)
+#if OS(WINDOWS) && PLATFORM(X86_64) && COMPILER(MSVC)
TextStream& operator<<(unsigned __int64);
TextStream& operator<<(__int64);
#endif
diff --git a/WebCore/platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp b/WebCore/platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp
index 4e2aceb..9adb999 100644
--- a/WebCore/platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp
+++ b/WebCore/platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp
@@ -22,18 +22,29 @@
#include "config.h"
#include "TextBreakIteratorInternalICU.h"
+#include "CString.h"
+#include "Language.h"
+#include "PlatformString.h"
+#include <wtf/StdLibExtras.h>
+
namespace WebCore {
+static const char* UILanguage()
+{
+ // Chrome's UI language can be different from the OS UI language on Windows.
+ // We want to return Chrome's UI language here.
+ DEFINE_STATIC_LOCAL(CString, locale, (defaultLanguage().latin1()));
+ return locale.data();
+}
+
const char* currentSearchLocaleID()
{
- // FIXME: Should use system locale.
- return "";
+ return UILanguage();
}
const char* currentTextBreakLocaleID()
{
- // FIXME: Should use system locale.
- return "en_us";
+ return UILanguage();
}
} // namespace WebCore
diff --git a/WebCore/platform/text/qt/TextCodecQt.cpp b/WebCore/platform/text/qt/TextCodecQt.cpp
index b3f75cc..21e6e12 100644
--- a/WebCore/platform/text/qt/TextCodecQt.cpp
+++ b/WebCore/platform/text/qt/TextCodecQt.cpp
@@ -97,7 +97,7 @@ String TextCodecQt::decode(const char* bytes, size_t length, bool flush, bool /*
// We chop input buffer to smaller buffers to avoid excessive memory consumption
// when the input buffer is big. This helps reduce peak memory consumption in
// mobile devices where system RAM is limited.
-#if PLATFORM(SYMBIAN)
+#if OS(SYMBIAN)
static const int MaxInputChunkSize = 32 * 1024;
#else
static const int MaxInputChunkSize = 1024 * 1024;
diff --git a/WebCore/platform/text/wince/TextBreakIteratorWince.cpp b/WebCore/platform/text/wince/TextBreakIteratorWince.cpp
index 26a5be2..7f46e4f 100644
--- a/WebCore/platform/text/wince/TextBreakIteratorWince.cpp
+++ b/WebCore/platform/text/wince/TextBreakIteratorWince.cpp
@@ -23,6 +23,7 @@
#include "TextBreakIterator.h"
#include "PlatformString.h"
+#include <wtf/StdLibExtras.h>
#include <wtf/unicode/Unicode.h>
using namespace WTF::Unicode;
@@ -308,4 +309,4 @@ TextBreakIterator* cursorMovementIterator(const UChar* string, int length)
return characterBreakIterator(string, length);
}
-}
+} // namespace WebCore
diff --git a/WebCore/platform/win/ClipboardUtilitiesWin.cpp b/WebCore/platform/win/ClipboardUtilitiesWin.cpp
index 0358b7a..f22fcdc 100644
--- a/WebCore/platform/win/ClipboardUtilitiesWin.cpp
+++ b/WebCore/platform/win/ClipboardUtilitiesWin.cpp
@@ -415,7 +415,7 @@ PassRefPtr<DocumentFragment> fragmentFromCF_HTML(Document* doc, const String& cf
unsigned fragmentEnd = cf_html.reverseFind('<', tagEnd);
String markup = cf_html.substring(fragmentStart, fragmentEnd - fragmentStart).stripWhiteSpace();
- return createFragmentFromMarkup(doc, markup, srcURL);
+ return createFragmentFromMarkup(doc, markup, srcURL, FragmentScriptingNotAllowed);
}
@@ -443,7 +443,7 @@ PassRefPtr<DocumentFragment> fragmentFromHTML(Document* doc, IDataObject* data)
html = String(data);
GlobalUnlock(store.hGlobal);
ReleaseStgMedium(&store);
- return createFragmentFromMarkup(doc, html, srcURL);
+ return createFragmentFromMarkup(doc, html, srcURL, FragmentScriptingNotAllowed);
}
return 0;
diff --git a/WebCore/platform/win/ClipboardWin.cpp b/WebCore/platform/win/ClipboardWin.cpp
index b75ce46..f83927d 100644
--- a/WebCore/platform/win/ClipboardWin.cpp
+++ b/WebCore/platform/win/ClipboardWin.cpp
@@ -534,7 +534,7 @@ bool ClipboardWin::setData(const String& type, const String& data)
return false;
}
-static void addMimeTypesForFormat(HashSet<String>& results, FORMATETC& format)
+static void addMimeTypesForFormat(HashSet<String>& results, const FORMATETC& format)
{
// URL and Text are provided for compatibility with IE's model
if (format.cfFormat == urlFormat()->cfFormat || format.cfFormat == urlWFormat()->cfFormat) {
@@ -560,7 +560,7 @@ HashSet<String> ClipboardWin::types() const
COMPtr<IEnumFORMATETC> itr;
- if (FAILED(m_dataObject->EnumFormatEtc(0, &itr)))
+ if (FAILED(m_dataObject->EnumFormatEtc(DATADIR_GET, &itr)))
return results;
if (!itr)
@@ -568,7 +568,8 @@ HashSet<String> ClipboardWin::types() const
FORMATETC data;
- while (SUCCEEDED(itr->Next(1, &data, 0))) {
+ // IEnumFORMATETC::Next returns S_FALSE if there are no more items.
+ while (itr->Next(1, &data, 0) == S_OK) {
addMimeTypesForFormat(results, data);
}
@@ -781,7 +782,7 @@ bool ClipboardWin::hasData()
return false;
COMPtr<IEnumFORMATETC> itr;
- if (FAILED(m_dataObject->EnumFormatEtc(0, &itr)))
+ if (FAILED(m_dataObject->EnumFormatEtc(DATADIR_GET, &itr)))
return false;
if (!itr)
@@ -789,7 +790,8 @@ bool ClipboardWin::hasData()
FORMATETC data;
- if (SUCCEEDED(itr->Next(1, &data, 0))) {
+ // IEnumFORMATETC::Next returns S_FALSE if there are no more items.
+ if (itr->Next(1, &data, 0) == S_OK) {
// There is at least one item in the IDataObject
return true;
}
diff --git a/WebCore/platform/win/CursorWin.cpp b/WebCore/platform/win/CursorWin.cpp
index 5afb1ae9..48cf10b 100644
--- a/WebCore/platform/win/CursorWin.cpp
+++ b/WebCore/platform/win/CursorWin.cpp
@@ -408,4 +408,9 @@ const Cursor& grabbingCursor()
return pointerCursor();
}
+SharedCursor::~SharedCursor()
+{
+ DestroyIcon(m_nativeCursor);
+}
+
}
diff --git a/WebCore/platform/win/EventLoopWin.cpp b/WebCore/platform/win/EventLoopWin.cpp
index aae107d..ece320f 100644
--- a/WebCore/platform/win/EventLoopWin.cpp
+++ b/WebCore/platform/win/EventLoopWin.cpp
@@ -26,6 +26,8 @@
#include "config.h"
#include "EventLoop.h"
+#include <windows.h>
+
namespace WebCore {
void EventLoop::cycle()
diff --git a/WebCore/platform/win/FileSystemWin.cpp b/WebCore/platform/win/FileSystemWin.cpp
index a676f87..0592298 100644
--- a/WebCore/platform/win/FileSystemWin.cpp
+++ b/WebCore/platform/win/FileSystemWin.cpp
@@ -33,6 +33,7 @@
#include "CString.h"
#include "NotImplemented.h"
#include "PlatformString.h"
+#include <wtf/HashMap.h>
#include <windows.h>
#include <winbase.h>
diff --git a/WebCore/platform/win/PlatformMouseEventWin.cpp b/WebCore/platform/win/PlatformMouseEventWin.cpp
index dc4dd2f..8b542f9 100644
--- a/WebCore/platform/win/PlatformMouseEventWin.cpp
+++ b/WebCore/platform/win/PlatformMouseEventWin.cpp
@@ -65,7 +65,7 @@ static MouseEventType messageToEventType(UINT message)
case WM_MBUTTONUP:
return MouseEventReleased;
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
case WM_MOUSELEAVE:
#endif
case WM_MOUSEMOVE:
@@ -108,7 +108,7 @@ PlatformMouseEvent::PlatformMouseEvent(HWND hWnd, UINT message, WPARAM wParam, L
m_button = MiddleButton;
break;
case WM_MOUSEMOVE:
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
case WM_MOUSELEAVE:
#endif
if (wParam & MK_LBUTTON)
diff --git a/WebCore/platform/win/PlatformScreenWin.cpp b/WebCore/platform/win/PlatformScreenWin.cpp
index 6e0f861..4af9e17 100644
--- a/WebCore/platform/win/PlatformScreenWin.cpp
+++ b/WebCore/platform/win/PlatformScreenWin.cpp
@@ -27,6 +27,7 @@
#include "config.h"
#include "PlatformScreen.h"
+#include "HostWindow.h"
#include "IntRect.h"
#include "FloatRect.h"
#include "Frame.h"
@@ -53,7 +54,7 @@ static DEVMODE deviceInfoForWidget(Widget* widget)
DEVMODE deviceInfo;
deviceInfo.dmSize = sizeof(DEVMODE);
deviceInfo.dmDriverExtra = 0;
-#if PLATFORM(WINCE)
+#if OS(WINCE)
if (!EnumDisplaySettings(0, ENUM_CURRENT_SETTINGS, &deviceInfo))
deviceInfo.dmBitsPerPel = 16;
#else
@@ -79,7 +80,7 @@ int screenDepthPerComponent(Widget* widget)
bool screenIsMonochrome(Widget* widget)
{
-#if PLATFORM(WINCE)
+#if OS(WINCE)
// EnumDisplaySettings doesn't set dmColor in DEVMODE.
return false;
#else
diff --git a/WebCore/platform/win/PopupMenuWin.cpp b/WebCore/platform/win/PopupMenuWin.cpp
index 7d8c8d5..4ba5e30 100644
--- a/WebCore/platform/win/PopupMenuWin.cpp
+++ b/WebCore/platform/win/PopupMenuWin.cpp
@@ -30,6 +30,7 @@
#include "FrameView.h"
#include "GraphicsContext.h"
#include "HTMLNames.h"
+#include "HostWindow.h"
#include "Page.h"
#include "PlatformMouseEvent.h"
#include "PlatformScreen.h"
@@ -41,7 +42,7 @@
#include <tchar.h>
#include <windows.h>
#include <windowsx.h>
-#if PLATFORM(WINCE)
+#if OS(WINCE)
#include <ResDefCE.h>
#define MAKEPOINTS(l) (*((POINTS FAR *)&(l)))
#endif
@@ -151,7 +152,7 @@ void PopupMenu::show(const IntRect& r, FrameView* view, int index)
// Determine whether we should animate our popups
// Note: Must use 'BOOL' and 'FALSE' instead of 'bool' and 'false' to avoid stack corruption with SystemParametersInfo
BOOL shouldAnimate = FALSE;
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
::SystemParametersInfo(SPI_GETCOMBOBOXANIMATION, 0, &shouldAnimate, 0);
if (shouldAnimate) {
@@ -279,7 +280,6 @@ void PopupMenu::hide()
::PostMessage(m_popup, WM_NULL, 0, 0);
}
-const int endOfLinePadding = 2;
void PopupMenu::calculatePositionAndSize(const IntRect& r, FrameView* v)
{
// r is in absolute document coordinates, but we want to be in screen coordinates
@@ -325,9 +325,7 @@ void PopupMenu::calculatePositionAndSize(const IntRect& r, FrameView* v)
popupWidth += ScrollbarTheme::nativeTheme()->scrollbarThickness(SmallScrollbar);
// Add padding to align the popup text with the <select> text
- // Note: We can't add paddingRight() because that value includes the width
- // of the dropdown button, so we must use our own endOfLinePadding constant.
- popupWidth += max(0, endOfLinePadding - client()->clientInsetRight()) + max(0, client()->clientPaddingLeft() - client()->clientInsetLeft());
+ popupWidth += max(0, client()->clientPaddingRight() - client()->clientInsetRight()) + max(0, client()->clientPaddingLeft() - client()->clientInsetLeft());
// Leave room for the border
popupWidth += 2 * popupWindowBorderWidth;
@@ -578,7 +576,7 @@ void PopupMenu::paint(const IntRect& damageRect, HDC hdc)
}
}
if (!m_bmp) {
-#if PLATFORM(WINCE)
+#if OS(WINCE)
BitmapInfo bitmapInfo(true, clientRect().width(), clientRect().height());
#else
BitmapInfo bitmapInfo = BitmapInfo::createBottomUp(clientRect().size());
@@ -713,7 +711,7 @@ void PopupMenu::registerClass()
if (haveRegisteredWindowClass)
return;
-#if PLATFORM(WINCE)
+#if OS(WINCE)
WNDCLASS wcex;
#else
WNDCLASSEX wcex;
@@ -734,7 +732,7 @@ void PopupMenu::registerClass()
haveRegisteredWindowClass = true;
-#if PLATFORM(WINCE)
+#if OS(WINCE)
RegisterClass(&wcex);
#else
RegisterClassEx(&wcex);
@@ -744,7 +742,7 @@ void PopupMenu::registerClass()
LRESULT CALLBACK PopupMenu::PopupMenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
-#if PLATFORM(WINCE)
+#if OS(WINCE)
LONG longPtr = GetWindowLong(hWnd, 0);
#else
LONG_PTR longPtr = GetWindowLongPtr(hWnd, 0);
@@ -757,7 +755,7 @@ LRESULT CALLBACK PopupMenu::PopupMenuWndProc(HWND hWnd, UINT message, WPARAM wPa
LPCREATESTRUCT createStruct = reinterpret_cast<LPCREATESTRUCT>(lParam);
// Associate the PopupMenu with the window.
-#if PLATFORM(WINCE)
+#if OS(WINCE)
::SetWindowLong(hWnd, 0, (LONG)createStruct->lpCreateParams);
#else
::SetWindowLongPtr(hWnd, 0, (LONG_PTR)createStruct->lpCreateParams);
@@ -891,7 +889,7 @@ LRESULT PopupMenu::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam
}
BOOL shouldHotTrack = FALSE;
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
::SystemParametersInfo(SPI_GETHOTTRACKING, 0, &shouldHotTrack, 0);
#endif
@@ -988,7 +986,7 @@ LRESULT PopupMenu::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam
lResult = 0;
break;
}
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
case WM_PRINTCLIENT:
paint(clientRect(), (HDC)wParam);
break;
diff --git a/WebCore/platform/win/SharedBufferWin.cpp b/WebCore/platform/win/SharedBufferWin.cpp
index 1839c99..a95d590 100644
--- a/WebCore/platform/win/SharedBufferWin.cpp
+++ b/WebCore/platform/win/SharedBufferWin.cpp
@@ -57,6 +57,8 @@ PassRefPtr<SharedBuffer> SharedBuffer::createWithContentsOfFile(const String& fi
goto exit;
}
+ result->m_size = result->m_buffer.size();
+
if (fread(result->m_buffer.data(), 1, fileStat.st_size, fileDescriptor) != fileStat.st_size)
LOG_ERROR("Failed to fully read contents of file %s - errno(%i)", filePath.ascii().data(), errno);
diff --git a/WebCore/platform/win/SystemInfo.cpp b/WebCore/platform/win/SystemInfo.cpp
index ba20ddd..f010769 100644
--- a/WebCore/platform/win/SystemInfo.cpp
+++ b/WebCore/platform/win/SystemInfo.cpp
@@ -26,6 +26,8 @@
#include "config.h"
#include "SystemInfo.h"
+#include <windows.h>
+
namespace WebCore {
bool isRunningOnVistaOrLater()
diff --git a/WebCore/platform/win/SystemTimeWin.cpp b/WebCore/platform/win/SystemTimeWin.cpp
index 6ab4c27..8c25c32 100644
--- a/WebCore/platform/win/SystemTimeWin.cpp
+++ b/WebCore/platform/win/SystemTimeWin.cpp
@@ -37,7 +37,7 @@ namespace WebCore {
float userIdleTime()
{
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
LASTINPUTINFO lastInputInfo = {0};
lastInputInfo.cbSize = sizeof(LASTINPUTINFO);
if (::GetLastInputInfo(&lastInputInfo))
diff --git a/WebCore/platform/win/WidgetWin.cpp b/WebCore/platform/win/WidgetWin.cpp
index 2272027..74a22f6 100644
--- a/WebCore/platform/win/WidgetWin.cpp
+++ b/WebCore/platform/win/WidgetWin.cpp
@@ -26,6 +26,7 @@
#include "config.h"
#include "Widget.h"
+#include "Chrome.h"
#include "Cursor.h"
#include "Document.h"
#include "Element.h"
diff --git a/WebCore/platform/wince/MIMETypeRegistryWince.cpp b/WebCore/platform/wince/MIMETypeRegistryWince.cpp
index 2ecde48..b6ead9b 100644
--- a/WebCore/platform/wince/MIMETypeRegistryWince.cpp
+++ b/WebCore/platform/wince/MIMETypeRegistryWince.cpp
@@ -27,6 +27,7 @@
#include "config.h"
#include "MIMETypeRegistry.h"
+#include <wtf/HashMap.h>
#include <windows.h>
#include <winreg.h>
diff --git a/WebCore/platform/wince/SearchPopupMenuWince.cpp b/WebCore/platform/wince/SearchPopupMenuWince.cpp
index ca11292..756b7cf 100644
--- a/WebCore/platform/wince/SearchPopupMenuWince.cpp
+++ b/WebCore/platform/wince/SearchPopupMenuWince.cpp
@@ -21,6 +21,7 @@
#include "SearchPopupMenu.h"
#include "AtomicString.h"
+#include "NotImplemented.h"
namespace WebCore {
diff --git a/WebCore/platform/wince/SharedTimerWince.cpp b/WebCore/platform/wince/SharedTimerWince.cpp
index ca2f104..a620a10 100644
--- a/WebCore/platform/wince/SharedTimerWince.cpp
+++ b/WebCore/platform/wince/SharedTimerWince.cpp
@@ -85,7 +85,7 @@ static void initializeOffScreenTimerWindow()
RegisterClass(&wcex);
timerWindowHandle = CreateWindow(kTimerWindowClassName, 0, 0,
- CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, 0, Page::instanceHandle(), 0);
+ CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0, 0, Page::instanceHandle(), 0);
}
void setSharedTimerFiredFunction(void (*f)())
diff --git a/WebCore/platform/wx/ContextMenuWx.cpp b/WebCore/platform/wx/ContextMenuWx.cpp
index 6f1bc9c..b20d29e 100644
--- a/WebCore/platform/wx/ContextMenuWx.cpp
+++ b/WebCore/platform/wx/ContextMenuWx.cpp
@@ -30,6 +30,8 @@
#include "PlatformMenuDescription.h"
#include "wx/menu.h"
+#include <wtf/HashMap.h>
+
using namespace WebCore;
typedef WTF::HashMap<int, ContextMenuAction> ItemActionMap;
diff --git a/WebCore/platform/wx/FileSystemWx.cpp b/WebCore/platform/wx/FileSystemWx.cpp
index 1ee87ae..50ac2ec 100644
--- a/WebCore/platform/wx/FileSystemWx.cpp
+++ b/WebCore/platform/wx/FileSystemWx.cpp
@@ -42,7 +42,7 @@
#include <wx/filefn.h>
#include <wx/filename.h>
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
#include <CoreFoundation/CoreFoundation.h>
#endif
@@ -127,9 +127,9 @@ int writeToFile(PlatformFileHandle, const char* data, int length)
bool unloadModule(PlatformModule mod)
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
return ::FreeLibrary(mod);
-#elif PLATFORM(DARWIN)
+#elif OS(DARWIN)
CFRelease(mod);
return true;
#else
diff --git a/WebCore/platform/wx/LocalizedStringsWx.cpp b/WebCore/platform/wx/LocalizedStringsWx.cpp
index 6a389f2..8573482 100644
--- a/WebCore/platform/wx/LocalizedStringsWx.cpp
+++ b/WebCore/platform/wx/LocalizedStringsWx.cpp
@@ -324,6 +324,16 @@ String AXDefinitionListDefinitionText()
return String();
}
+String AXMenuListPopupActionVerb()
+{
+ return String();
+}
+
+String AXMenuListActionVerb()
+{
+ return String();
+}
+
String validationMessageValueMissingText()
{
notImplemented();
diff --git a/WebCore/platform/wx/RenderThemeWx.cpp b/WebCore/platform/wx/RenderThemeWx.cpp
index c66ff87..c4d8c35 100644
--- a/WebCore/platform/wx/RenderThemeWx.cpp
+++ b/WebCore/platform/wx/RenderThemeWx.cpp
@@ -267,7 +267,11 @@ bool RenderThemeWx::paintButton(RenderObject* o, const RenderObject::PaintInfo&
IntRect rect = r;
-#if USE(WXGC)
+// On Mac, wxGraphicsContext and wxDC share the same native implementation,
+// and so transformations are available.
+// On Win and Linux, however, this is not true and transforms are lost,
+// so we need to restore them here.
+#if USE(WXGC) && !defined(__WXMAC__)
double xtrans = 0;
double ytrans = 0;
@@ -294,7 +298,7 @@ bool RenderThemeWx::paintButton(RenderObject* o, const RenderObject::PaintInfo&
if (isChecked(o))
flags |= wxCONTROL_CHECKED;
#if wxCHECK_VERSION(2,9,1)
- wxRendererNative::Get().DrawRadioBitmap(window, *dc, r, flags);
+ wxRendererNative::Get().DrawRadioBitmap(window, *dc, rect, flags);
#elif wxCHECK_VERSION(2,9,0)
wxRendererNative::Get().DrawRadioButton(window, *dc, rect, flags);
#else
diff --git a/WebCore/platform/wx/ScrollViewWx.cpp b/WebCore/platform/wx/ScrollViewWx.cpp
index f556894..35acf68 100644
--- a/WebCore/platform/wx/ScrollViewWx.cpp
+++ b/WebCore/platform/wx/ScrollViewWx.cpp
@@ -96,15 +96,15 @@ public:
}
else if (scrollType == wxEVT_SCROLLWIN_PAGEUP) {
if (horiz)
- pos.x -= m_scrollView->visibleWidth() - cAmountToKeepWhenPaging;
+ pos.x -= m_scrollView->visibleWidth() * cFractionToStepWhenPaging;
else
- pos.y -= m_scrollView->visibleHeight() - cAmountToKeepWhenPaging;
+ pos.y -= m_scrollView->visibleHeight() * cFractionToStepWhenPaging;
}
else if (scrollType == wxEVT_SCROLLWIN_PAGEDOWN) {
if (horiz)
- pos.x += m_scrollView->visibleWidth() - cAmountToKeepWhenPaging;
+ pos.x += m_scrollView->visibleWidth() * cFractionToStepWhenPaging;
else
- pos.y += m_scrollView->visibleHeight() - cAmountToKeepWhenPaging;
+ pos.y += m_scrollView->visibleHeight() * cFractionToStepWhenPaging;
}
else
return e.Skip();
diff --git a/WebCore/plugins/MimeType.idl b/WebCore/plugins/MimeType.idl
index 71fcca2..9d84eeb 100644
--- a/WebCore/plugins/MimeType.idl
+++ b/WebCore/plugins/MimeType.idl
@@ -20,9 +20,7 @@
module window {
- interface [
- GenerateConstructor
- ] MimeType {
+ interface MimeType {
readonly attribute DOMString type;
readonly attribute DOMString suffixes;
readonly attribute DOMString description;
diff --git a/WebCore/plugins/MimeTypeArray.idl b/WebCore/plugins/MimeTypeArray.idl
index 5316d56..ecbdc29 100644
--- a/WebCore/plugins/MimeTypeArray.idl
+++ b/WebCore/plugins/MimeTypeArray.idl
@@ -21,7 +21,6 @@
module window {
interface [
- GenerateConstructor,
HasNameGetter,
HasIndexGetter
] MimeTypeArray {
diff --git a/WebCore/plugins/Plugin.idl b/WebCore/plugins/Plugin.idl
index 8ecef36..b418989 100644
--- a/WebCore/plugins/Plugin.idl
+++ b/WebCore/plugins/Plugin.idl
@@ -21,7 +21,6 @@
module window {
interface [
- GenerateConstructor,
HasNameGetter,
HasIndexGetter
] Plugin {
diff --git a/WebCore/plugins/PluginArray.idl b/WebCore/plugins/PluginArray.idl
index 4a55c56..d4c10ac 100644
--- a/WebCore/plugins/PluginArray.idl
+++ b/WebCore/plugins/PluginArray.idl
@@ -21,7 +21,6 @@
module window {
interface [
- GenerateConstructor,
HasNameGetter,
HasIndexGetter
] PluginArray {
diff --git a/WebCore/plugins/PluginDatabase.cpp b/WebCore/plugins/PluginDatabase.cpp
index dcd7208..96e8aba 100644
--- a/WebCore/plugins/PluginDatabase.cpp
+++ b/WebCore/plugins/PluginDatabase.cpp
@@ -325,7 +325,7 @@ void PluginDatabase::clear()
m_preferredPlugins.clear();
}
-#if (!PLATFORM(WINCE)) && (!PLATFORM(SYMBIAN)) && (!PLATFORM(WIN_OS) || !ENABLE(NETSCAPE_PLUGIN_API))
+#if (!OS(WINCE)) && (!OS(SYMBIAN)) && (!OS(WINDOWS) || !ENABLE(NETSCAPE_PLUGIN_API))
// For Safari/Win the following three methods are implemented
// in PluginDatabaseWin.cpp, but if we can use WebCore constructs
// for the logic we should perhaps move it here under XP_WIN?
@@ -438,6 +438,6 @@ void PluginDatabase::getPluginPathsInDirectories(HashSet<String>& paths) const
}
}
-#endif // !PLATFORM(SYMBIAN) && !PLATFORM(WIN_OS)
+#endif // !OS(SYMBIAN) && !OS(WINDOWS)
}
diff --git a/WebCore/plugins/PluginDatabase.h b/WebCore/plugins/PluginDatabase.h
index 90214ca..54530a7 100644
--- a/WebCore/plugins/PluginDatabase.h
+++ b/WebCore/plugins/PluginDatabase.h
@@ -89,6 +89,8 @@ namespace WebCore {
static Vector<String> defaultPluginDirectories();
Vector<String> pluginDirectories() const { return m_pluginDirectories; }
+ String MIMETypeForExtension(const String& extension) const;
+
private:
void getPluginPathsInDirectories(HashSet<String>&) const;
void getDeletedPlugins(PluginSet&) const;
@@ -97,8 +99,6 @@ namespace WebCore {
bool add(PassRefPtr<PluginPackage>);
void remove(PluginPackage*);
- String MIMETypeForExtension(const String& extension) const;
-
Vector<String> m_pluginDirectories;
HashSet<String> m_registeredMIMETypes;
PluginSet m_plugins;
diff --git a/WebCore/plugins/PluginPackage.cpp b/WebCore/plugins/PluginPackage.cpp
index 06aedd9..9c12663 100644
--- a/WebCore/plugins/PluginPackage.cpp
+++ b/WebCore/plugins/PluginPackage.cpp
@@ -119,7 +119,7 @@ PluginPackage::PluginPackage(const String& path, const time_t& lastModified)
m_parentDirectory = m_path.left(m_path.length() - m_fileName.length() - 1);
}
-#if !PLATFORM(SYMBIAN)
+#if !OS(SYMBIAN)
void PluginPackage::unload()
{
if (!m_isLoaded)
@@ -132,7 +132,7 @@ void PluginPackage::unload()
unloadWithoutShutdown();
}
-#endif //!PLATFORM(SYMBIAN)
+#endif // !OS(SYMBIAN)
void PluginPackage::unloadWithoutShutdown()
{
@@ -204,7 +204,7 @@ void PluginPackage::determineQuirks(const String& mimeType)
}
#endif
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
void PluginPackage::determineModuleVersionFromDescription()
{
// It's a bit lame to detect the plugin version by parsing it
@@ -332,7 +332,7 @@ int PluginPackage::compareFileVersion(const PlatformModuleVersion& compareVersio
// return -1, 0, or 1 if plug-in version is less than, equal to, or greater than
// the passed version
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
if (m_moduleVersion.mostSig != compareVersion.mostSig)
return m_moduleVersion.mostSig > compareVersion.mostSig ? 1 : -1;
if (m_moduleVersion.leastSig != compareVersion.leastSig)
diff --git a/WebCore/plugins/PluginPackage.h b/WebCore/plugins/PluginPackage.h
index d409ab6..a3937f1 100644
--- a/WebCore/plugins/PluginPackage.h
+++ b/WebCore/plugins/PluginPackage.h
@@ -36,7 +36,7 @@
#include <wtf/HashMap.h>
#include <wtf/RefCounted.h>
-#if PLATFORM(SYMBIAN)
+#if OS(SYMBIAN)
class QPluginLoader;
class NPInterface;
#endif
@@ -75,17 +75,17 @@ namespace WebCore {
int compare(const PluginPackage&) const;
PluginQuirkSet quirks() const { return m_quirks; }
const PlatformModuleVersion& version() const { return m_moduleVersion; }
-#if PLATFORM(SYMBIAN)
+#if OS(SYMBIAN)
NPInterface* npInterface() const { return m_npInterface; }
-#endif // PLATFORM(SYMBIAN)
+#endif // OS(SYMBIAN)
private:
PluginPackage(const String& path, const time_t& lastModified);
-#if PLATFORM(SYMBIAN)
+#if OS(SYMBIAN)
NPInterface* m_npInterface;
QPluginLoader* m_pluginLoader;
-#endif // PLATFORM(SYMBIAN)
+#endif // OS(SYMBIAN)
bool fetchInfo();
bool isPluginBlacklisted();
void determineQuirks(const String& mimeType);
diff --git a/WebCore/plugins/PluginView.cpp b/WebCore/plugins/PluginView.cpp
index 7b143e5..ebdf4d4 100644
--- a/WebCore/plugins/PluginView.cpp
+++ b/WebCore/plugins/PluginView.cpp
@@ -28,6 +28,10 @@
#include "PluginView.h"
#include "Bridge.h"
+<<<<<<< HEAD
+=======
+#include "Chrome.h"
+>>>>>>> webkit.org at r54127
#include "Document.h"
#include "DocumentLoader.h"
#include "Element.h"
@@ -46,7 +50,7 @@
#include "Page.h"
#include "FocusController.h"
#include "PlatformMouseEvent.h"
-#if PLATFORM(WIN_OS) && ENABLE(NETSCAPE_PLUGIN_API)
+#if OS(WINDOWS) && ENABLE(NETSCAPE_PLUGIN_API)
#include "PluginMessageThrottlerWin.h"
#endif
#include "PluginPackage.h"
@@ -61,6 +65,7 @@
#include "RenderObject.h"
#include "npruntime_impl.h"
#include "Settings.h"
+<<<<<<< HEAD
#include <wtf/ASCIICType.h>
#if defined(ANDROID_PLUGINS)
@@ -72,6 +77,8 @@
#include "JSDOMBinding.h"
#include "c_instance.h"
#include "runtime_root.h"
+=======
+>>>>>>> webkit.org at r54127
#include <runtime/JSLock.h>
#include <runtime/JSValue.h>
@@ -131,7 +138,7 @@ void PluginView::setFrameRect(const IntRect& rect)
updatePluginWidget();
-#if PLATFORM(WIN_OS) || PLATFORM(SYMBIAN)
+#if OS(WINDOWS) || OS(SYMBIAN)
// On Windows and Symbian, always call plugin to change geometry.
setNPWindowRect(rect);
#elif defined(XP_UNIX)
@@ -151,10 +158,14 @@ void PluginView::handleEvent(Event* event)
if (!m_plugin || m_isWindowed)
return;
+ // Protect the plug-in from deletion while dispatching the event.
+ RefPtr<PluginView> protect(this);
+
if (event->isMouseEvent())
handleMouseEvent(static_cast<MouseEvent*>(event));
else if (event->isKeyboardEvent())
handleKeyboardEvent(static_cast<KeyboardEvent*>(event));
+<<<<<<< HEAD
#if defined(ANDROID_PLUGINS)
else if (event->isTouchEvent())
handleTouchEvent(static_cast<TouchEvent*>(event));
@@ -164,6 +175,9 @@ void PluginView::handleEvent(Event* event)
handleFocusEvent(true);
#endif
#if defined(Q_WS_X11) && ENABLE(NETSCAPE_PLUGIN_API)
+=======
+#if defined(XP_UNIX) && ENABLE(NETSCAPE_PLUGIN_API)
+>>>>>>> webkit.org at r54127
else if (event->type() == eventNames().DOMFocusOutEvent)
handleFocusOutEvent();
else if (event->type() == eventNames().DOMFocusInEvent)
@@ -333,7 +347,7 @@ void PluginView::stop()
#ifdef XP_WIN
// Unsubclass the window
if (m_isWindowed) {
-#if PLATFORM(WINCE)
+#if OS(WINCE)
WNDPROC currentWndProc = (WNDPROC)GetWindowLong(platformPluginWidget(), GWL_WNDPROC);
if (currentWndProc == PluginViewWndProc)
@@ -854,6 +868,7 @@ PluginView::PluginView(Frame* parentFrame, const IntSize& size, PluginPackage* p
, m_requestTimer(this, &PluginView::requestTimerFired)
, m_invalidateTimer(this, &PluginView::invalidateTimerFired)
, m_popPopupsStateTimer(this, &PluginView::popPopupsStateTimerFired)
+ , m_mode(loadManually ? NP_FULL : NP_EMBED)
, m_paramNames(0)
, m_paramValues(0)
, m_mimeType(mimeType)
@@ -865,17 +880,17 @@ PluginView::PluginView(Frame* parentFrame, const IntSize& size, PluginPackage* p
, m_isTransparent(false)
, m_haveInitialized(false)
, m_isWaitingToStart(false)
-#if defined(XP_UNIX) || defined(Q_WS_X11)
+#if defined(XP_UNIX)
, m_needsXEmbed(false)
#endif
-#if PLATFORM(WIN_OS) && ENABLE(NETSCAPE_PLUGIN_API)
+#if OS(WINDOWS) && ENABLE(NETSCAPE_PLUGIN_API)
, m_pluginWndProc(0)
, m_lastMessage(0)
, m_isCallingPluginWndProc(false)
, m_wmPrintHDC(0)
, m_haveUpdatedPluginWidget(false)
#endif
-#if (PLATFORM(QT) && PLATFORM(WIN_OS)) || defined(XP_MACOSX)
+#if (PLATFORM(QT) && OS(WINDOWS)) || defined(XP_MACOSX)
, m_window(0)
#endif
#if defined(XP_MACOSX)
@@ -884,7 +899,7 @@ PluginView::PluginView(Frame* parentFrame, const IntSize& size, PluginPackage* p
, m_contextRef(0)
, m_fakeWindow(0)
#endif
-#if defined(Q_WS_X11) && ENABLE(NETSCAPE_PLUGIN_API)
+#if defined(XP_UNIX) && ENABLE(NETSCAPE_PLUGIN_API)
, m_hasPendingGeometryChange(true)
, m_drawable(0)
, m_visual(0)
@@ -917,8 +932,6 @@ PluginView::PluginView(Frame* parentFrame, const IntSize& size, PluginPackage* p
memset(&m_npCgContext, 0, sizeof(m_npCgContext));
#endif
- m_mode = m_loadManually ? NP_FULL : NP_EMBED;
-
resize(size);
}
@@ -1292,7 +1305,7 @@ static const char* MozillaUserAgent = "Mozilla/5.0 ("
"Windows; U; Windows NT 5.1;"
#elif defined(XP_UNIX)
// The Gtk port uses X11 plugins in Mac.
-#if PLATFORM(DARWIN) && PLATFORM(GTK)
+#if OS(DARWIN) && PLATFORM(GTK)
"X11; U; Intel Mac OS X;"
#else
"X11; U; Linux i686;"
diff --git a/WebCore/plugins/PluginView.h b/WebCore/plugins/PluginView.h
index 0ce9c7c..286ba03 100644
--- a/WebCore/plugins/PluginView.h
+++ b/WebCore/plugins/PluginView.h
@@ -47,11 +47,15 @@
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
+<<<<<<< HEAD
#ifdef PLUGIN_SCHEDULE_TIMER
#include "PluginTimer.h"
#endif
#if PLATFORM(WIN_OS) && (PLATFORM(QT) || PLATFORM(WX))
+=======
+#if OS(WINDOWS) && (PLATFORM(QT) || PLATFORM(WX))
+>>>>>>> webkit.org at r54127
typedef struct HWND__* HWND;
typedef HWND PlatformPluginWidget;
#elif defined(ANDROID_PLUGINS)
@@ -83,7 +87,7 @@ namespace WebCore {
class TouchEvent;
#endif
class KURL;
-#if PLATFORM(WIN_OS) && ENABLE(NETSCAPE_PLUGIN_API)
+#if OS(WINDOWS) && ENABLE(NETSCAPE_PLUGIN_API)
class PluginMessageThrottlerWin;
#endif
class PluginPackage;
@@ -210,7 +214,7 @@ namespace WebCore {
const String& mimeType() const { return m_mimeType; }
const KURL& url() const { return m_url; }
-#if PLATFORM(WIN_OS) && ENABLE(NETSCAPE_PLUGIN_API)
+#if OS(WINDOWS) && ENABLE(NETSCAPE_PLUGIN_API)
static LRESULT CALLBACK PluginViewWndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
WNDPROC pluginWndProc() const { return m_pluginWndProc; }
@@ -260,7 +264,7 @@ namespace WebCore {
void invalidateWindowlessPluginRect(const IntRect&);
-#if PLATFORM(WIN_OS) && ENABLE(NETSCAPE_PLUGIN_API)
+#if OS(WINDOWS) && ENABLE(NETSCAPE_PLUGIN_API)
void paintWindowedPluginIntoContext(GraphicsContext*, const IntRect&);
static HDC WINAPI hookedBeginPaint(HWND, PAINTSTRUCT*);
static BOOL WINAPI hookedEndPaint(HWND, const PAINTSTRUCT*);
@@ -293,12 +297,12 @@ namespace WebCore {
void handleKeyboardEvent(KeyboardEvent*);
void handleMouseEvent(MouseEvent*);
-#if defined(Q_WS_X11) && ENABLE(NETSCAPE_PLUGIN_API)
+#if defined(XP_UNIX) && ENABLE(NETSCAPE_PLUGIN_API)
void handleFocusInEvent();
void handleFocusOutEvent();
#endif
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
void paintIntoTransformedContext(HDC);
PassRefPtr<Image> snapshot();
#endif
@@ -337,11 +341,11 @@ namespace WebCore {
bool m_haveInitialized;
bool m_isWaitingToStart;
-#if defined(XP_UNIX) || defined(Q_WS_X11)
+#if defined(XP_UNIX)
bool m_needsXEmbed;
#endif
-#if PLATFORM(WIN_OS) && ENABLE(NETSCAPE_PLUGIN_API)
+#if OS(WINDOWS) && ENABLE(NETSCAPE_PLUGIN_API)
OwnPtr<PluginMessageThrottlerWin> m_messageThrottler;
WNDPROC m_pluginWndProc;
unsigned m_lastMessage;
@@ -350,11 +354,15 @@ namespace WebCore {
bool m_haveUpdatedPluginWidget;
#endif
+<<<<<<< HEAD
#ifdef PLUGIN_SCHEDULE_TIMER
PluginTimerList m_timerList;
#endif
#if ((PLATFORM(QT) || PLATFORM(WX)) && PLATFORM(WIN_OS)) || defined(XP_MACOSX)
+=======
+#if ((PLATFORM(QT) || PLATFORM(WX)) && OS(WINDOWS)) || defined(XP_MACOSX)
+>>>>>>> webkit.org at r54127
// On Mac OSX and Qt/Windows the plugin does not have its own native widget,
// but is using the containing window as its reference for positioning/painting.
PlatformPluginWidget m_window;
@@ -373,7 +381,11 @@ public:
private:
+<<<<<<< HEAD
#if defined(XP_UNIX) || defined(Q_WS_X11) || PLATFORM(SYMBIAN) || defined(ANDROID_PLUGINS)
+=======
+#if defined(XP_UNIX) || PLATFORM(SYMBIAN)
+>>>>>>> webkit.org at r54127
void setNPWindowIfNeeded();
#elif defined(XP_MACOSX)
NP_CGContext m_npCgContext;
@@ -389,7 +401,7 @@ private:
Point globalMousePosForPlugin() const;
#endif
-#if defined(Q_WS_X11) && ENABLE(NETSCAPE_PLUGIN_API)
+#if defined(XP_UNIX) && ENABLE(NETSCAPE_PLUGIN_API)
bool m_hasPendingGeometryChange;
Pixmap m_drawable;
Visual* m_visual;
diff --git a/WebCore/plugins/PluginWidget.h b/WebCore/plugins/PluginWidget.h
new file mode 100644
index 0000000..7a76fc1
--- /dev/null
+++ b/WebCore/plugins/PluginWidget.h
@@ -0,0 +1,55 @@
+/*
+ * 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 PluginWidget_h
+#define PluginWidget_h
+
+#include "Widget.h"
+#include "GraphicsLayer.h"
+
+namespace WebCore {
+
+class PluginWidget : public Widget {
+
+public:
+ PluginWidget(PlatformWidget widget = 0) : Widget(widget) { }
+#if USE(ACCELERATED_COMPOSITING)
+ PlatformLayer* platformLayer() const;
+#endif
+
+private:
+ virtual void invalidateRect(const IntRect&);
+ virtual bool isPluginWidget() const { return true; }
+};
+
+#if USE(ACCELERATED_COMPOSITING) && !PLATFORM(MAC)
+inline PlatformLayer* PluginWidget::platformLayer() const
+{
+ return 0;
+}
+#endif
+
+} // namespace WebCore
+
+#endif // PluginWidget_h
diff --git a/WebCore/plugins/gtk/PluginViewGtk.cpp b/WebCore/plugins/gtk/PluginViewGtk.cpp
index 3e7e3ee..8f4b2d5 100644
--- a/WebCore/plugins/gtk/PluginViewGtk.cpp
+++ b/WebCore/plugins/gtk/PluginViewGtk.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
* Copyright (C) 2008 Collabora Ltd. All rights reserved.
+ * Copyright (C) 2009, 2010 Kakai, Inc. <brian@kakai.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -37,12 +38,14 @@
#include "Frame.h"
#include "FrameView.h"
#include "GraphicsContext.h"
-#include "Image.h"
#include "HTMLNames.h"
#include "HTMLPlugInElement.h"
+#include "HostWindow.h"
+#include "Image.h"
#include "KeyboardEvent.h"
#include "MouseEvent.h"
#include "Page.h"
+#include "PlatformKeyboardEvent.h"
#include "PlatformMouseEvent.h"
#include "PluginDebug.h"
#include "PluginMainThreadScheduler.h"
@@ -61,6 +64,10 @@
#if defined(XP_UNIX)
#include "gtk2xtbin.h"
+#define Bool int // this got undefined somewhere
+#define Status int // ditto
+#include <X11/extensions/Xrender.h>
+#include <cairo/cairo-xlib.h>
#include <gdk/gdkx.h>
#elif defined(GDK_WINDOWING_WIN32)
#include "PluginMessageThrottlerWin.h"
@@ -98,9 +105,18 @@ bool PluginView::dispatchNPEvent(NPEvent& event)
return accepted;
}
+#if defined(XP_UNIX)
+static Window getRootWindow(Frame* parentFrame)
+{
+ GtkWidget* parentWidget = parentFrame->view()->hostWindow()->platformPageClient();
+ GdkScreen* gscreen = gtk_widget_get_screen(parentWidget);
+ return GDK_WINDOW_XWINDOW(gdk_screen_get_root_window(gscreen));
+}
+#endif
+
void PluginView::updatePluginWidget()
{
- if (!parent() || !m_isWindowed)
+ if (!parent())
return;
ASSERT(parent()->isFrameView());
@@ -115,6 +131,29 @@ void PluginView::updatePluginWidget()
if (platformPluginWidget() && (m_windowRect != oldWindowRect || m_clipRect != oldClipRect))
setNPWindowIfNeeded();
+
+#if defined(XP_UNIX)
+ if (!m_isWindowed && m_windowRect.size() != oldWindowRect.size()) {
+ if (m_drawable)
+ XFreePixmap(GDK_DISPLAY(), m_drawable);
+
+ m_drawable = XCreatePixmap(GDK_DISPLAY(), getRootWindow(m_parentFrame),
+ m_windowRect.width(), m_windowRect.height(),
+ ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth);
+ XSync(GDK_DISPLAY(), False); // make sure that the server knows about the Drawable
+ }
+
+ // do not call setNPWindowIfNeeded() immediately, will be called on paint()
+ m_hasPendingGeometryChange = true;
+#endif
+
+ // In order to move/resize the plugin window at the same time as the
+ // rest of frame during e.g. scrolling, we set the window geometry
+ // in the paint() function, but as paint() isn't called when the
+ // plugin window is outside the frame which can be caused by a
+ // scroll, we need to move/resize immediately.
+ if (!m_windowRect.intersects(frameView->frameRect()))
+ setNPWindowIfNeeded();
}
void PluginView::setFocus()
@@ -160,43 +199,293 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
if (m_isWindowed)
return;
- NPEvent npEvent;
- /* Need to synthesize Xevents here */
+#if defined(XP_UNIX)
+ if (!m_drawable)
+ return;
- m_npWindow.type = NPWindowTypeDrawable;
+ const bool syncX = m_pluginDisplay && m_pluginDisplay != GDK_DISPLAY();
+
+ IntRect exposedRect(rect);
+ exposedRect.intersect(frameRect());
+ exposedRect.move(-frameRect().x(), -frameRect().y());
+
+ Window dummyW;
+ int dummyI;
+ unsigned int dummyUI, actualDepth = 0;
+ XGetGeometry(GDK_DISPLAY(), m_drawable, &dummyW, &dummyI, &dummyI,
+ &dummyUI, &dummyUI, &dummyUI, &actualDepth);
+
+ const unsigned int drawableDepth = ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth;
+ ASSERT(drawableDepth == actualDepth);
+
+ cairo_surface_t* drawableSurface = cairo_xlib_surface_create(GDK_DISPLAY(),
+ m_drawable,
+ m_visual,
+ m_windowRect.width(),
+ m_windowRect.height());
+
+ if (m_isTransparent && drawableDepth != 32) {
+ // Attempt to fake it when we don't have an alpha channel on our
+ // pixmap. If that's not possible, at least clear the window to
+ // avoid drawing artifacts.
+ GtkWidget* widget = m_parentFrame->view()->hostWindow()->platformPageClient();
+ GdkDrawable* gdkBackingStore = 0;
+ gint xoff = 0, yoff = 0;
+
+ gdk_window_get_internal_paint_info(widget->window, &gdkBackingStore, &xoff, &yoff);
+
+ GC gc = XDefaultGC(GDK_DISPLAY(), gdk_screen_get_number(gdk_screen_get_default()));
+ if (gdkBackingStore) {
+ XCopyArea(GDK_DISPLAY(), GDK_DRAWABLE_XID(gdkBackingStore), m_drawable, gc,
+ m_windowRect.x() + exposedRect.x() - xoff,
+ m_windowRect.y() + exposedRect.y() - yoff,
+ exposedRect.width(), exposedRect.height(),
+ exposedRect.x(), exposedRect.y());
+ } else {
+ // no valid backing store; clear to the background color
+ XFillRectangle(GDK_DISPLAY(), m_drawable, gc,
+ exposedRect.x(), exposedRect.y(),
+ exposedRect.width(), exposedRect.height());
+ }
+ } else if (m_isTransparent) {
+ // If we have a 32 bit drawable and the plugin wants transparency,
+ // we'll clear the exposed area to transparent first. Otherwise,
+ // we'd end up with junk in there from the last paint, or, worse,
+ // uninitialized data.
+ cairo_t* crFill = cairo_create(drawableSurface);
+
+ cairo_set_operator(crFill, CAIRO_OPERATOR_SOURCE);
+ cairo_pattern_t* fill = cairo_pattern_create_rgba(0., 0., 0., 0.);
+ cairo_set_source(crFill, fill);
+
+ cairo_rectangle(crFill, exposedRect.x(), exposedRect.y(),
+ exposedRect.width(), exposedRect.height());
+ cairo_clip(crFill);
+ cairo_paint(crFill);
+
+ cairo_destroy(crFill);
+ cairo_pattern_destroy(fill);
+ }
- ASSERT(parent()->isFrameView());
+ XEvent xevent;
+ memset(&xevent, 0, sizeof(XEvent));
+ XGraphicsExposeEvent& exposeEvent = xevent.xgraphicsexpose;
+ exposeEvent.type = GraphicsExpose;
+ exposeEvent.display = GDK_DISPLAY();
+ exposeEvent.drawable = m_drawable;
+ exposeEvent.x = exposedRect.x();
+ exposeEvent.y = exposedRect.y();
+ exposeEvent.width = exposedRect.x() + exposedRect.width(); // flash bug? it thinks width is the right in transparent mode
+ exposeEvent.height = exposedRect.y() + exposedRect.height(); // flash bug? it thinks height is the bottom in transparent mode
- if (!dispatchNPEvent(npEvent))
- LOG(Events, "PluginView::paint(): Paint event not accepted");
+ dispatchNPEvent(xevent);
+
+ if (syncX)
+ XSync(m_pluginDisplay, False); // sync changes by plugin
+
+ cairo_t* cr = context->platformContext();
+ cairo_save(cr);
+
+ cairo_set_source_surface(cr, drawableSurface, frameRect().x(), frameRect().y());
+
+ cairo_rectangle(cr,
+ frameRect().x() + exposedRect.x(), frameRect().y() + exposedRect.y(),
+ exposedRect.width(), exposedRect.height());
+ cairo_clip(cr);
+
+ if (m_isTransparent)
+ cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
+ else
+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+ cairo_paint(cr);
+
+ cairo_restore(cr);
+ cairo_surface_destroy(drawableSurface);
+#endif // defined(XP_UNIX)
}
void PluginView::handleKeyboardEvent(KeyboardEvent* event)
{
- NPEvent npEvent;
-
- /* FIXME: Synthesize an XEvent to pass through */
-
JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
- if (!dispatchNPEvent(npEvent))
+
+ if (m_isWindowed)
+ return;
+
+ if (event->type() != eventNames().keydownEvent && event->type() != eventNames().keyupEvent)
+ return;
+
+ NPEvent xEvent;
+#if defined(XP_UNIX)
+ GdkEventKey* gdkEvent = event->keyEvent()->gdkEventKey();
+
+ xEvent.type = (event->type() == eventNames().keydownEvent) ? 2 : 3; // KeyPress/Release get unset somewhere
+ xEvent.xkey.root = getRootWindow(m_parentFrame);
+ xEvent.xkey.subwindow = 0; // we have no child window
+ xEvent.xkey.time = event->timeStamp();
+ xEvent.xkey.state = gdkEvent->state; // GdkModifierType mirrors xlib state masks
+ xEvent.xkey.keycode = gdkEvent->hardware_keycode;
+ xEvent.xkey.same_screen = true;
+
+ // NOTE: As the XEvents sent to the plug-in are synthesized and there is not a native window
+ // corresponding to the plug-in rectangle, some of the members of the XEvent structures are not
+ // set to their normal Xserver values. e.g. Key events don't have a position.
+ // source: https://developer.mozilla.org/en/NPEvent
+ xEvent.xkey.x = 0;
+ xEvent.xkey.y = 0;
+ xEvent.xkey.x_root = 0;
+ xEvent.xkey.y_root = 0;
+#endif
+
+ if (!dispatchNPEvent(xEvent))
event->setDefaultHandled();
}
-void PluginView::handleMouseEvent(MouseEvent* event)
+#if defined(XP_UNIX)
+static unsigned int inputEventState(MouseEvent* event)
{
- NPEvent npEvent;
+ unsigned int state = 0;
+ if (event->ctrlKey())
+ state |= ControlMask;
+ if (event->shiftKey())
+ state |= ShiftMask;
+ if (event->altKey())
+ state |= Mod1Mask;
+ if (event->metaKey())
+ state |= Mod4Mask;
+ return state;
+}
- if (!m_isWindowed)
- return;
+void PluginView::initXEvent(XEvent* xEvent)
+{
+ memset(xEvent, 0, sizeof(XEvent));
+
+ xEvent->xany.serial = 0; // we are unaware of the last request processed by X Server
+ xEvent->xany.send_event = false;
+ xEvent->xany.display = GDK_DISPLAY();
+ // NOTE: event->xany.window doesn't always correspond to the .window property of other XEvent's
+ // but does in the case of KeyPress, KeyRelease, ButtonPress, ButtonRelease, and MotionNotify
+ // events; thus, this is right:
+ GtkWidget* widget = m_parentFrame->view()->hostWindow()->platformPageClient();
+ xEvent->xany.window = widget ? GDK_WINDOW_XWINDOW(widget->window) : 0;
+}
+
+static void setXButtonEventSpecificFields(XEvent* xEvent, MouseEvent* event, const IntPoint& postZoomPos, Frame* parentFrame)
+{
+ XButtonEvent& xbutton = xEvent->xbutton;
+ xbutton.type = event->type() == eventNames().mousedownEvent ? ButtonPress : ButtonRelease;
+ xbutton.root = getRootWindow(parentFrame);
+ xbutton.subwindow = 0;
+ xbutton.time = event->timeStamp();
+ xbutton.x = postZoomPos.x();
+ xbutton.y = postZoomPos.y();
+ xbutton.x_root = event->screenX();
+ xbutton.y_root = event->screenY();
+ xbutton.state = inputEventState(event);
+ switch (event->button()) {
+ case MiddleButton:
+ xbutton.button = Button2;
+ break;
+ case RightButton:
+ xbutton.button = Button3;
+ break;
+ case LeftButton:
+ default:
+ xbutton.button = Button1;
+ break;
+ }
+ xbutton.same_screen = true;
+}
+
+static void setXMotionEventSpecificFields(XEvent* xEvent, MouseEvent* event, const IntPoint& postZoomPos, Frame* parentFrame)
+{
+ XMotionEvent& xmotion = xEvent->xmotion;
+ xmotion.type = MotionNotify;
+ xmotion.root = getRootWindow(parentFrame);
+ xmotion.subwindow = 0;
+ xmotion.time = event->timeStamp();
+ xmotion.x = postZoomPos.x();
+ xmotion.y = postZoomPos.y();
+ xmotion.x_root = event->screenX();
+ xmotion.y_root = event->screenY();
+ xmotion.state = inputEventState(event);
+ xmotion.is_hint = NotifyNormal;
+ xmotion.same_screen = true;
+}
- /* FIXME: Synthesize an XEvent to pass through */
- IntPoint p = static_cast<FrameView*>(parent())->contentsToWindow(IntPoint(event->pageX(), event->pageY()));
+static void setXCrossingEventSpecificFields(XEvent* xEvent, MouseEvent* event, const IntPoint& postZoomPos, Frame* parentFrame)
+{
+ XCrossingEvent& xcrossing = xEvent->xcrossing;
+ xcrossing.type = event->type() == eventNames().mouseoverEvent ? EnterNotify : LeaveNotify;
+ xcrossing.root = getRootWindow(parentFrame);
+ xcrossing.subwindow = 0;
+ xcrossing.time = event->timeStamp();
+ xcrossing.x = postZoomPos.y();
+ xcrossing.y = postZoomPos.x();
+ xcrossing.x_root = event->screenX();
+ xcrossing.y_root = event->screenY();
+ xcrossing.state = inputEventState(event);
+ xcrossing.mode = NotifyNormal;
+ xcrossing.detail = NotifyDetailNone;
+ xcrossing.same_screen = true;
+ xcrossing.focus = false;
+}
+#endif
+void PluginView::handleMouseEvent(MouseEvent* event)
+{
JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
- if (!dispatchNPEvent(npEvent))
+
+ if (m_isWindowed)
+ return;
+
+ NPEvent xEvent;
+#if defined(XP_UNIX)
+ initXEvent(&xEvent);
+
+ IntPoint postZoomPos = roundedIntPoint(m_element->renderer()->absoluteToLocal(event->absoluteLocation()));
+
+ if (event->type() == eventNames().mousedownEvent || event->type() == eventNames().mouseupEvent)
+ setXButtonEventSpecificFields(&xEvent, event, postZoomPos, m_parentFrame);
+ else if (event->type() == eventNames().mousemoveEvent)
+ setXMotionEventSpecificFields(&xEvent, event, postZoomPos, m_parentFrame);
+ else if (event->type() == eventNames().mouseoutEvent || event->type() == eventNames().mouseoverEvent)
+ setXCrossingEventSpecificFields(&xEvent, event, postZoomPos, m_parentFrame);
+ else
+ return;
+#endif
+
+ if (!dispatchNPEvent(xEvent))
event->setDefaultHandled();
}
+#if defined(XP_UNIX)
+void PluginView::handleFocusInEvent()
+{
+ XEvent npEvent;
+ initXEvent(&npEvent);
+
+ XFocusChangeEvent& event = npEvent.xfocus;
+ event.type = 9; // FocusIn gets unset somewhere
+ event.mode = NotifyNormal;
+ event.detail = NotifyDetailNone;
+
+ dispatchNPEvent(npEvent);
+}
+
+void PluginView::handleFocusOutEvent()
+{
+ XEvent npEvent;
+ initXEvent(&npEvent);
+
+ XFocusChangeEvent& event = npEvent.xfocus;
+ event.type = 10; // FocusOut gets unset somewhere
+ event.mode = NotifyNormal;
+ event.detail = NotifyDetailNone;
+
+ dispatchNPEvent(npEvent);
+}
+#endif
+
void PluginView::setParent(ScrollView* parent)
{
Widget::setParent(parent);
@@ -207,7 +496,8 @@ void PluginView::setParent(ScrollView* parent)
void PluginView::setNPWindowRect(const IntRect&)
{
- setNPWindowIfNeeded();
+ if (!m_isWindowed)
+ setNPWindowIfNeeded();
}
void PluginView::setNPWindowIfNeeded()
@@ -215,24 +505,59 @@ void PluginView::setNPWindowIfNeeded()
if (!m_isStarted || !parent() || !m_plugin->pluginFuncs()->setwindow)
return;
- m_npWindow.x = m_windowRect.x();
- m_npWindow.y = m_windowRect.y();
- m_npWindow.width = m_windowRect.width();
- m_npWindow.height = m_windowRect.height();
+ // If the plugin didn't load sucessfully, no point in calling setwindow
+ if (m_status != PluginStatusLoadedSuccessfully)
+ return;
+
+ // On Unix, only call plugin's setwindow if it's full-page or windowed
+ if (m_mode != NP_FULL && m_mode != NP_EMBED)
+ return;
- m_npWindow.clipRect.left = m_clipRect.x();
- m_npWindow.clipRect.top = m_clipRect.y();
- m_npWindow.clipRect.right = m_clipRect.width();
- m_npWindow.clipRect.bottom = m_clipRect.height();
+ // Check if the platformPluginWidget still exists
+ if (m_isWindowed && !platformPluginWidget())
+ return;
- GtkAllocation allocation = { m_windowRect.x(), m_windowRect.y(), m_windowRect.width(), m_windowRect.height() };
- gtk_widget_size_allocate(platformPluginWidget(), &allocation);
#if defined(XP_UNIX)
- if (!m_needsXEmbed) {
- gtk_xtbin_set_position(GTK_XTBIN(platformPluginWidget()), m_windowRect.x(), m_windowRect.y());
- gtk_xtbin_resize(platformPluginWidget(), m_windowRect.width(), m_windowRect.height());
- }
+ if (!m_hasPendingGeometryChange)
+ return;
+ m_hasPendingGeometryChange = false;
+#endif
+
+ if (m_isWindowed) {
+ m_npWindow.x = m_windowRect.x();
+ m_npWindow.y = m_windowRect.y();
+ m_npWindow.width = m_windowRect.width();
+ m_npWindow.height = m_windowRect.height();
+
+ m_npWindow.clipRect.left = m_clipRect.x();
+ m_npWindow.clipRect.top = m_clipRect.y();
+ m_npWindow.clipRect.right = m_clipRect.width();
+ m_npWindow.clipRect.bottom = m_clipRect.height();
+
+ GtkAllocation allocation = { m_windowRect.x(), m_windowRect.y(), m_windowRect.width(), m_windowRect.height() };
+ gtk_widget_size_allocate(platformPluginWidget(), &allocation);
+#if defined(XP_UNIX)
+ if (!m_needsXEmbed) {
+ gtk_xtbin_set_position(GTK_XTBIN(platformPluginWidget()), m_windowRect.x(), m_windowRect.y());
+ gtk_xtbin_resize(platformPluginWidget(), m_windowRect.width(), m_windowRect.height());
+ }
#endif
+ } else {
+ m_npWindow.x = 0;
+ m_npWindow.y = 0;
+
+ m_npWindow.clipRect.left = 0;
+ m_npWindow.clipRect.top = 0;
+ m_npWindow.clipRect.right = 0;
+ m_npWindow.clipRect.bottom = 0;
+ }
+
+ // FLASH WORKAROUND: Only set initially. Multiple calls to
+ // setNPWindow() cause the plugin to crash in windowed mode.
+ if (!m_isWindowed || m_npWindow.width == (unsigned int)-1 || m_npWindow.height == (unsigned int)-1) {
+ m_npWindow.width = m_windowRect.width();
+ m_npWindow.height = m_windowRect.height();
+ }
PluginView::setCurrentPluginView(this);
JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
@@ -311,6 +636,14 @@ NPError PluginView::getValueStatic(NPNVariable variable, void* value)
*static_cast<NPBool*>(value) = true;
return NPERR_NO_ERROR;
+ case NPNVSupportsWindowless:
+#if defined(XP_UNIX)
+ *static_cast<NPBool*>(value) = true;
+#else
+ *static_cast<NPBool*>(value) = false;
+#endif
+ return NPERR_NO_ERROR;
+
default:
return NPERR_GENERIC_ERROR;
}
@@ -414,7 +747,7 @@ void PluginView::invalidateRect(NPRect* rect)
}
IntRect r(rect->left, rect->top, rect->right - rect->left, rect->bottom - rect->top);
- invalidateRect(r);
+ invalidateWindowlessPluginRect(r);
}
void PluginView::invalidateRegion(NPRegion)
@@ -431,12 +764,64 @@ void PluginView::forceRedraw()
gtk_widget_queue_draw(m_parentFrame->view()->hostWindow()->platformPageClient());
}
+static Display* getPluginDisplay()
+{
+ // The plugin toolkit might have a different X connection open. Since we're
+ // a gdk/gtk app, we'll (probably?) have the same X connection as any gdk-based
+ // plugins, so we can return that. We might want to add other implementations here
+ // later.
+
+#if defined(XP_UNIX)
+ return GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
+#else
+ return 0;
+#endif
+}
+
static gboolean
-plug_removed_cb(GtkSocket *socket, gpointer)
+plug_removed_cb(GtkSocket* socket, gpointer)
{
return TRUE;
}
+#if defined(XP_UNIX)
+static void getVisualAndColormap(int depth, Visual** visual, Colormap* colormap)
+{
+ *visual = 0;
+ *colormap = 0;
+
+ int rmaj, rmin;
+ if (depth == 32 && (!XRenderQueryVersion(GDK_DISPLAY(), &rmaj, &rmin) || (rmaj == 0 && rmin < 5)))
+ return;
+
+ XVisualInfo templ;
+ templ.screen = gdk_screen_get_number(gdk_screen_get_default());
+ templ.depth = depth;
+ templ.c_class = TrueColor;
+ int nVisuals;
+ XVisualInfo* visualInfo = XGetVisualInfo(GDK_DISPLAY(), VisualScreenMask | VisualDepthMask | VisualClassMask, &templ, &nVisuals);
+
+ if (!nVisuals)
+ return;
+
+ if (depth == 32) {
+ for (int idx = 0; idx < nVisuals; ++idx) {
+ XRenderPictFormat* format = XRenderFindVisualFormat(GDK_DISPLAY(), visualInfo[idx].visual);
+ if (format->type == PictTypeDirect && format->direct.alphaMask) {
+ *visual = visualInfo[idx].visual;
+ break;
+ }
+ }
+ } else
+ *visual = visualInfo[0].visual;
+
+ XFree(visualInfo);
+
+ if (*visual)
+ *colormap = XCreateColormap(GDK_DISPLAY(), GDK_ROOT_WINDOW(), *visual, AllocNone);
+}
+#endif
+
bool PluginView::platformStart()
{
ASSERT(m_isStarted);
@@ -451,26 +836,33 @@ bool PluginView::platformStart()
PluginView::setCurrentPluginView(0);
}
+ if (m_isWindowed) {
#if defined(XP_UNIX)
- if (m_needsXEmbed) {
+ if (m_needsXEmbed) {
+ setPlatformWidget(gtk_socket_new());
+ gtk_container_add(GTK_CONTAINER(m_parentFrame->view()->hostWindow()->platformPageClient()), platformPluginWidget());
+ g_signal_connect(platformPluginWidget(), "plug_removed", G_CALLBACK(plug_removed_cb), NULL);
+ } else
+ setPlatformWidget(gtk_xtbin_new(m_parentFrame->view()->hostWindow()->platformPageClient()->window, 0));
+#else
setPlatformWidget(gtk_socket_new());
gtk_container_add(GTK_CONTAINER(m_parentFrame->view()->hostWindow()->platformPageClient()), platformPluginWidget());
- g_signal_connect(platformPluginWidget(), "plug_removed", G_CALLBACK(plug_removed_cb), NULL);
- } else if (m_isWindowed)
- setPlatformWidget(gtk_xtbin_new(m_parentFrame->view()->hostWindow()->platformPageClient()->window, 0));
-#else
- setPlatformWidget(gtk_socket_new());
- gtk_container_add(GTK_CONTAINER(m_parentFrame->view()->hostWindow()->platformPageClient()), platformPluginWidget());
#endif
+ } else {
+ setPlatformWidget(0);
+ m_pluginDisplay = getPluginDisplay();
+ }
+
show();
- if (m_isWindowed) {
- m_npWindow.type = NPWindowTypeWindow;
#if defined(XP_UNIX)
- NPSetWindowCallbackStruct *ws = new NPSetWindowCallbackStruct();
-
+ NPSetWindowCallbackStruct* ws = new NPSetWindowCallbackStruct();
ws->type = 0;
+#endif
+ if (m_isWindowed) {
+ m_npWindow.type = NPWindowTypeWindow;
+#if defined(XP_UNIX)
if (m_needsXEmbed) {
gtk_widget_realize(platformPluginWidget());
m_npWindow.window = (void*)gtk_socket_get_id(GTK_SOCKET(platformPluginWidget()));
@@ -486,25 +878,63 @@ bool PluginView::platformStart()
ws->colormap = GTK_XTBIN(platformPluginWidget())->xtclient.xtcolormap;
}
XFlush (ws->display);
-
- m_npWindow.ws_info = ws;
#elif defined(GDK_WINDOWING_WIN32)
m_npWindow.window = (void*)GDK_WINDOW_HWND(platformPluginWidget()->window);
#endif
} else {
m_npWindow.type = NPWindowTypeDrawable;
- m_npWindow.window = 0;
+ m_npWindow.window = 0; // Not used?
+
+#if defined(XP_UNIX)
+ GdkScreen* gscreen = gdk_screen_get_default();
+ GdkVisual* gvisual = gdk_screen_get_system_visual(gscreen);
+
+ if (gvisual->depth == 32 || !m_plugin->quirks().contains(PluginQuirkRequiresDefaultScreenDepth)) {
+ getVisualAndColormap(32, &m_visual, &m_colormap);
+ ws->depth = 32;
+ }
+
+ if (!m_visual) {
+ getVisualAndColormap(gvisual->depth, &m_visual, &m_colormap);
+ ws->depth = gvisual->depth;
+ }
+
+ ws->display = GDK_DISPLAY();
+ ws->visual = m_visual;
+ ws->colormap = m_colormap;
+
+ m_npWindow.x = 0;
+ m_npWindow.y = 0;
+ m_npWindow.width = -1;
+ m_npWindow.height = -1;
+#else
+ notImplemented();
+ m_status = PluginStatusCanNotLoadPlugin;
+ return false;
+#endif
}
+#if defined(XP_UNIX)
+ m_npWindow.ws_info = ws;
+#endif
+
// TODO remove in favor of null events, like mac port?
- if (!(m_plugin->quirks().contains(PluginQuirkDeferFirstSetWindowCall)))
+ if (!(m_plugin->quirks().contains(PluginQuirkDeferFirstSetWindowCall))) {
updatePluginWidget(); // was: setNPWindowIfNeeded(), but this doesn't produce 0x0 rects at first go
+ setNPWindowIfNeeded();
+ }
return true;
}
void PluginView::platformDestroy()
{
+#if defined(XP_UNIX)
+ if (m_drawable) {
+ XFreePixmap(GDK_DISPLAY(), m_drawable);
+ m_drawable = 0;
+ }
+#endif
}
void PluginView::halt()
diff --git a/WebCore/plugins/mac/PluginViewMac.cpp b/WebCore/plugins/mac/PluginViewMac.cpp
index 816efa0..d415d8f 100644
--- a/WebCore/plugins/mac/PluginViewMac.cpp
+++ b/WebCore/plugins/mac/PluginViewMac.cpp
@@ -43,6 +43,7 @@
#include "Frame.h"
#include "FrameView.h"
#include "GraphicsContext.h"
+#include "HostWindow.h"
#include "HTMLNames.h"
#include "HTMLPlugInElement.h"
#include "Image.h"
diff --git a/WebCore/plugins/mac/PluginWidgetMac.mm b/WebCore/plugins/mac/PluginWidgetMac.mm
new file mode 100644
index 0000000..f407928
--- /dev/null
+++ b/WebCore/plugins/mac/PluginWidgetMac.mm
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "PluginWidget.h"
+
+#if USE(ACCELERATED_COMPOSITING)
+@interface NSView (WebKitSecretsWebCoreKnowsAbout)
+- (CALayer *)pluginLayer;
+@end
+#endif
+namespace WebCore {
+
+void PluginWidget::invalidateRect(const IntRect& rect)
+{
+ [platformWidget() setNeedsDisplayInRect:rect];
+}
+
+#if USE(ACCELERATED_COMPOSITING)
+PlatformLayer* PluginWidget::platformLayer() const
+{
+ if (![platformWidget() respondsToSelector:@selector(pluginLayer)])
+ return 0;
+
+ return [platformWidget() pluginLayer];
+}
+#endif
+} // namespace WebCore
diff --git a/WebCore/plugins/qt/PluginDataQt.cpp b/WebCore/plugins/qt/PluginDataQt.cpp
index a836937..188365a 100644
--- a/WebCore/plugins/qt/PluginDataQt.cpp
+++ b/WebCore/plugins/qt/PluginDataQt.cpp
@@ -24,6 +24,7 @@
#include "PluginDatabase.h"
#include "PluginPackage.h"
+#include "Chrome.h"
#include "ChromeClientQt.h"
#include "Page.h"
#include <qwebpage.h>
diff --git a/WebCore/plugins/qt/PluginViewQt.cpp b/WebCore/plugins/qt/PluginViewQt.cpp
index bda76ce..49c0000 100644
--- a/WebCore/plugins/qt/PluginViewQt.cpp
+++ b/WebCore/plugins/qt/PluginViewQt.cpp
@@ -42,6 +42,7 @@
#include "GraphicsContext.h"
#include "HTMLNames.h"
#include "HTMLPlugInElement.h"
+#include "HostWindow.h"
#include "Image.h"
#include "JSDOMBinding.h"
#include "KeyboardEvent.h"
@@ -127,6 +128,10 @@ void PluginView::updatePluginWidget()
// scroll, we need to move/resize immediately.
if (!m_windowRect.intersects(frameView->frameRect()))
setNPWindowIfNeeded();
+
+ // Make sure we get repainted afterwards. This is necessary for downward
+ // scrolling to move the plugin widget properly.
+ invalidate();
}
void PluginView::setFocus()
@@ -529,18 +534,16 @@ NPError PluginView::handlePostReadFile(Vector<char>& buffer, uint32 len, const c
if (filename.startsWith("file:///"))
filename = filename.substring(8);
- if (!fileExists(filename))
+ long long size;
+ if (!getFileSize(filename, size))
return NPERR_FILE_NOT_FOUND;
- // FIXME - read the file data into buffer
FILE* fileHandle = fopen((filename.utf8()).data(), "r");
-
if (!fileHandle)
return NPERR_FILE_NOT_FOUND;
- //buffer.resize();
-
- int bytesRead = fread(buffer.data(), 1, 0, fileHandle);
+ buffer.resize(size);
+ int bytesRead = fread(buffer.data(), 1, size, fileHandle);
fclose(fileHandle);
@@ -646,7 +649,8 @@ NPError PluginView::getValue(NPNVariable variable, void* value)
void PluginView::invalidateRect(const IntRect& rect)
{
if (m_isWindowed) {
- platformWidget()->update(rect);
+ if (platformWidget())
+ platformWidget()->update(rect);
return;
}
diff --git a/WebCore/plugins/symbian/PluginViewSymbian.cpp b/WebCore/plugins/symbian/PluginViewSymbian.cpp
index 44702fd..4a93e45 100644
--- a/WebCore/plugins/symbian/PluginViewSymbian.cpp
+++ b/WebCore/plugins/symbian/PluginViewSymbian.cpp
@@ -32,6 +32,7 @@
#include "GraphicsContext.h"
#include "HTMLNames.h"
#include "HTMLPlugInElement.h"
+#include "HostWindow.h"
#include "Image.h"
#include "JSDOMBinding.h"
#include "KeyboardEvent.h"
@@ -280,8 +281,6 @@ void PluginView::setNPWindowIfNeeded()
m_npWindow.width = m_windowRect.width();
m_npWindow.height = m_windowRect.height();
- if (m_npWindow.x < 0 || m_npWindow.y < 0 || m_npWindow.width <= 0 || m_npWindow.height <= 0)
- return;
PluginView::setCurrentPluginView(this);
JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
diff --git a/WebCore/plugins/win/PluginDatabaseWin.cpp b/WebCore/plugins/win/PluginDatabaseWin.cpp
index 634b2a1..71bcdb5 100644
--- a/WebCore/plugins/win/PluginDatabaseWin.cpp
+++ b/WebCore/plugins/win/PluginDatabaseWin.cpp
@@ -38,7 +38,7 @@
#define _countof(x) (sizeof(x)/sizeof(x[0]))
#endif
-#if PLATFORM(WINCE)
+#if OS(WINCE)
// WINCE doesn't support Registry Key Access Rights. The parameter should always be 0
#define KEY_ENUMERATE_SUB_KEYS 0
@@ -252,7 +252,7 @@ static inline void addMozillaPluginDirectories(Vector<String>& directories)
static inline void addWindowsMediaPlayerPluginDirectory(Vector<String>& directories)
{
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
// The new WMP Firefox plugin is installed in \PFiles\Plugins if it can't find any Firefox installs
WCHAR pluginDirectoryStr[_MAX_PATH + 1];
DWORD pluginDirectorySize = ::ExpandEnvironmentStringsW(TEXT("%SYSTEMDRIVE%\\PFiles\\Plugins"), pluginDirectoryStr, _countof(pluginDirectoryStr));
@@ -355,7 +355,7 @@ exit:
static inline void addMacromediaPluginDirectories(Vector<String>& directories)
{
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
WCHAR systemDirectoryStr[MAX_PATH];
if (GetSystemDirectory(systemDirectoryStr, _countof(systemDirectoryStr)) == 0)
diff --git a/WebCore/plugins/win/PluginPackageWin.cpp b/WebCore/plugins/win/PluginPackageWin.cpp
index dc9ec17..233b10c 100644
--- a/WebCore/plugins/win/PluginPackageWin.cpp
+++ b/WebCore/plugins/win/PluginPackageWin.cpp
@@ -234,7 +234,7 @@ bool PluginPackage::load()
m_loadCount++;
return true;
} else {
-#if PLATFORM(WINCE)
+#if OS(WINCE)
m_module = ::LoadLibraryW(m_path.charactersWithNullTermination());
#else
WCHAR currentPath[MAX_PATH];
@@ -267,7 +267,7 @@ bool PluginPackage::load()
NP_InitializeFuncPtr NP_Initialize = 0;
NPError npErr;
-#if PLATFORM(WINCE)
+#if OS(WINCE)
NP_Initialize = (NP_InitializeFuncPtr)GetProcAddress(m_module, L"NP_Initialize");
NP_GetEntryPoints = (NP_GetEntryPointsFuncPtr)GetProcAddress(m_module, L"NP_GetEntryPoints");
m_NPP_Shutdown = (NPP_ShutdownProcPtr)GetProcAddress(m_module, L"NP_Shutdown");
diff --git a/WebCore/plugins/win/PluginViewWin.cpp b/WebCore/plugins/win/PluginViewWin.cpp
index 37f1fc8..2ade663 100644
--- a/WebCore/plugins/win/PluginViewWin.cpp
+++ b/WebCore/plugins/win/PluginViewWin.cpp
@@ -44,6 +44,7 @@
#include "Frame.h"
#include "FrameView.h"
#include "GraphicsContext.h"
+#include "HostWindow.h"
#include "Image.h"
#include "HTMLNames.h"
#include "HTMLPlugInElement.h"
@@ -71,13 +72,17 @@
#include <runtime/JSValue.h>
#include <wtf/ASCIICType.h>
-#if PLATFORM(WINCE)
+#if OS(WINCE)
#undef LOG_NPERROR
#define LOG_NPERROR(x)
#undef LOG_PLUGIN_NET_ERROR
#define LOG_PLUGIN_NET_ERROR()
#endif
+#if PLATFORM(CAIRO)
+#include <cairo-win32.h>
+#endif
+
#if PLATFORM(QT)
#include "QWebPageClient.h"
#include <QWidget>
@@ -93,7 +98,9 @@ static inline HWND windowHandleForPageClient(PlatformPageClient client)
#if PLATFORM(QT)
if (!client)
return 0;
- return client->ownerWidget()->winId();
+ if (QWidget* pluginParent = qobject_cast<QWidget*>(client->pluginParent()))
+ return pluginParent->winId();
+ return 0;
#elif PLATFORM(WX)
if (!client)
return 0;
@@ -119,7 +126,7 @@ using namespace HTMLNames;
const LPCWSTR kWebPluginViewdowClassName = L"WebPluginView";
const LPCWSTR kWebPluginViewProperty = L"WebPluginViewProperty";
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
// The code used to hook BeginPaint/EndPaint originally came from
// <http://www.fengyuan.com/article/wmprint.html>.
// Copyright (C) 2000 by Feng Yuan (www.fengyuan.com).
@@ -133,7 +140,7 @@ static BYTE* endPaint;
typedef HDC (WINAPI *PtrBeginPaint)(HWND, PAINTSTRUCT*);
typedef BOOL (WINAPI *PtrEndPaint)(HWND, const PAINTSTRUCT*);
-#if PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC)
+#if OS(WINDOWS) && PLATFORM(X86_64) && COMPILER(MSVC)
extern "C" HDC __stdcall _HBeginPaint(HWND hWnd, LPPAINTSTRUCT lpPaint);
extern "C" BOOL __stdcall _HEndPaint(HWND hWnd, const PAINTSTRUCT* lpPaint);
#endif
@@ -287,7 +294,7 @@ static bool registerPluginView()
ASSERT(Page::instanceHandle());
-#if PLATFORM(WINCE)
+#if OS(WINCE)
WNDCLASS wcex = { 0 };
#else
WNDCLASSEX wcex;
@@ -296,7 +303,7 @@ static bool registerPluginView()
#endif
wcex.style = CS_DBLCLKS;
-#if PLATFORM(WINCE)
+#if OS(WINCE)
wcex.style |= CS_PARENTDC;
#endif
wcex.lpfnWndProc = DefWindowProc;
@@ -309,7 +316,7 @@ static bool registerPluginView()
wcex.lpszMenuName = 0;
wcex.lpszClassName = kWebPluginViewdowClassName;
-#if PLATFORM(WINCE)
+#if OS(WINCE)
return !!RegisterClass(&wcex);
#else
return !!RegisterClassEx(&wcex);
@@ -385,7 +392,7 @@ PluginView::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
m_popPopupsStateTimer.startOneShot(0);
}
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
if (message == WM_PRINTCLIENT) {
// Most (all?) windowed plugins don't respond to WM_PRINTCLIENT, so we
// change the message to WM_PAINT and rely on our hooked versions of
@@ -416,7 +423,7 @@ void PluginView::updatePluginWidget()
IntRect oldWindowRect = m_windowRect;
IntRect oldClipRect = m_clipRect;
-#if PLATFORM(WINCE)
+#if OS(WINCE)
m_windowRect = frameView->contentsToWindow(frameRect());
#else
m_windowRect = IntRect(frameView->contentsToWindow(frameRect().location()), frameRect().size());
@@ -519,7 +526,7 @@ void PluginView::paintIntoTransformedContext(HDC hdc)
WINDOWPOS windowpos = { 0 };
-#if PLATFORM(WINCE)
+#if OS(WINCE)
IntRect r = static_cast<FrameView*>(parent())->contentsToWindow(frameRect());
windowpos.x = r.x();
@@ -556,7 +563,7 @@ void PluginView::paintIntoTransformedContext(HDC hdc)
void PluginView::paintWindowedPluginIntoContext(GraphicsContext* context, const IntRect& rect)
{
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
ASSERT(m_isWindowed);
ASSERT(context->shouldIncludeChildWindows());
@@ -565,14 +572,22 @@ void PluginView::paintWindowedPluginIntoContext(GraphicsContext* context, const
HDC hdc = context->getWindowsContext(frameRect(), false);
+#if PLATFORM(CAIRO)
+ // Must flush drawings up to this point to the backing metafile, otherwise the
+ // plugin region will be overwritten with any clear regions specified in the
+ // cairo-controlled portions of the rendering.
+ PlatformGraphicsContext* ctx = context->platformContext();
+ cairo_show_page(ctx);
+#endif
+
XFORM originalTransform;
GetWorldTransform(hdc, &originalTransform);
// The plugin expects the DC to be in client coordinates, so we translate
// the DC to make that so.
- XFORM transform = originalTransform;
- transform.eDx = locationInWindow.x();
- transform.eDy = locationInWindow.y();
+ TransformationMatrix ctm = context->getCTM();
+ ctm.translate(locationInWindow.x(), locationInWindow.y());
+ XFORM transform = static_cast<XFORM>(ctm);
SetWorldTransform(hdc, &transform);
@@ -596,7 +611,7 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
return;
if (m_isWindowed) {
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
if (context->shouldIncludeChildWindows())
paintWindowedPluginIntoContext(context, rect);
#endif
@@ -611,7 +626,7 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
// of the window and the plugin expects that the passed in DC has window coordinates.
// In the Qt port we always draw in an offscreen buffer and therefore need to preserve
// the translation set in getWindowsContext.
-#if !PLATFORM(QT) && !PLATFORM(WINCE)
+#if !PLATFORM(QT) && !OS(WINCE)
if (!context->inTransparencyLayer()) {
XFORM transform;
GetWorldTransform(hdc, &transform);
@@ -645,7 +660,7 @@ void PluginView::handleKeyboardEvent(KeyboardEvent* event)
event->setDefaultHandled();
}
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
extern HCURSOR lastSetCursor;
extern bool ignoreNextSetCursor;
#endif
@@ -713,7 +728,7 @@ void PluginView::handleMouseEvent(MouseEvent* event)
if (!dispatchNPEvent(npEvent))
event->setDefaultHandled();
-#if !PLATFORM(QT) && !PLATFORM(WX) && !PLATFORM(WINCE)
+#if !PLATFORM(QT) && !PLATFORM(WX) && !OS(WINCE)
// Currently, Widget::setCursor is always called after this function in EventHandler.cpp
// and since we don't want that we set ignoreNextSetCursor to true here to prevent that.
ignoreNextSetCursor = true;
@@ -725,7 +740,7 @@ void PluginView::setParent(ScrollView* parent)
{
Widget::setParent(parent);
-#if PLATFORM(WINCE)
+#if OS(WINCE)
if (parent) {
init();
if (parent->isVisible())
@@ -770,7 +785,7 @@ void PluginView::setNPWindowRect(const IntRect& rect)
if (!m_isStarted)
return;
-#if PLATFORM(WINCE)
+#if OS(WINCE)
IntRect r = static_cast<FrameView*>(parent())->contentsToWindow(rect);
m_npWindow.x = r.x();
m_npWindow.y = r.y();
@@ -805,7 +820,7 @@ void PluginView::setNPWindowRect(const IntRect& rect)
ASSERT(platformPluginWidget());
-#if PLATFORM(WINCE)
+#if OS(WINCE)
if (!m_pluginWndProc) {
WNDPROC currentWndProc = (WNDPROC)GetWindowLong(platformPluginWidget(), GWL_WNDPROC);
if (currentWndProc != PluginViewWndProc)
@@ -986,7 +1001,7 @@ bool PluginView::platformStart()
if (m_isWindowed) {
registerPluginView();
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
setUpOffscreenPaintingHooks(hookedBeginPaint, hookedEndPaint);
#endif
@@ -998,7 +1013,7 @@ bool PluginView::platformStart()
HWND window = ::CreateWindowEx(0, kWebPluginViewdowClassName, 0, flags,
0, 0, 0, 0, parentWindowHandle, 0, Page::instanceHandle(), 0);
-#if PLATFORM(WIN_OS) && (PLATFORM(QT) || PLATFORM(WX))
+#if OS(WINDOWS) && (PLATFORM(QT) || PLATFORM(WX))
m_window = window;
#else
setPlatformWidget(window);
@@ -1006,9 +1021,9 @@ bool PluginView::platformStart()
// Calling SetWindowLongPtrA here makes the window proc ASCII, which is required by at least
// the Shockwave Director plug-in.
-#if PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC)
+#if OS(WINDOWS) && PLATFORM(X86_64) && COMPILER(MSVC)
::SetWindowLongPtrA(platformPluginWidget(), GWLP_WNDPROC, (LONG_PTR)DefWindowProcA);
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
::SetWindowLong(platformPluginWidget(), GWL_WNDPROC, (LONG)DefWindowProc);
#else
::SetWindowLongPtrA(platformPluginWidget(), GWL_WNDPROC, (LONG)DefWindowProcA);
diff --git a/WebCore/rendering/AutoTableLayout.cpp b/WebCore/rendering/AutoTableLayout.cpp
index 0e001c7..2a4958a 100644
--- a/WebCore/rendering/AutoTableLayout.cpp
+++ b/WebCore/rendering/AutoTableLayout.cpp
@@ -382,7 +382,7 @@ int AutoTableLayout::calcEffectiveWidth()
float spanMax = max(maxWidth, cMaxWidth);
tMaxWidth = max(tMaxWidth, spanMax * 100 * percentScaleFactor / w.rawValue());
- // all non percent columns in the span get percent vlaues to sum up correctly.
+ // all non percent columns in the span get percent values to sum up correctly.
int percentMissing = w.rawValue() - totalPercent;
float totalWidth = 0;
for (unsigned int pos = col; pos < lastCol; pos++) {
@@ -668,8 +668,8 @@ void AutoTableLayout::layout()
}
}
- // if we have overallocated, reduce every cell according to the difference between desired width and minwidth
- // this seems to produce to the pixel exaxt results with IE. Wonder is some of this also holds for width distributing.
+ // If we have overallocated, reduce every cell according to the difference between desired width and minwidth
+ // this seems to produce to the pixel exact results with IE. Wonder is some of this also holds for width distributing.
if (available < 0) {
// Need to reduce cells with the following prioritization:
// (1) Auto
diff --git a/WebCore/rendering/CounterNode.cpp b/WebCore/rendering/CounterNode.cpp
index 95a3748..c164c81 100644
--- a/WebCore/rendering/CounterNode.cpp
+++ b/WebCore/rendering/CounterNode.cpp
@@ -22,20 +22,14 @@
#include "config.h"
#include "CounterNode.h"
+#include "RenderCounter.h"
#include "RenderObject.h"
#include <stdio.h>
-// FIXME: There's currently no strategy for getting the counter tree updated when new
-// elements with counter-reset and counter-increment styles are added to the render tree.
-// Also, the code can't handle changes where an existing node needs to change into a
-// "reset" node, or from a "reset" node back to not a "reset" node. As of this writing,
-// at least some of these problems manifest as failures in the t1204-increment and
-// t1204-reset tests in the CSS 2.1 test suite.
-
namespace WebCore {
-CounterNode::CounterNode(RenderObject* o, bool isReset, int value)
- : m_isReset(isReset)
+CounterNode::CounterNode(RenderObject* o, bool hasResetType, int value)
+ : m_hasResetType(hasResetType)
, m_value(value)
, m_countInParent(0)
, m_renderer(o)
@@ -52,18 +46,14 @@ CounterNode* CounterNode::nextInPreOrderAfterChildren(const CounterNode* stayWit
if (this == stayWithin)
return 0;
- CounterNode* next = m_nextSibling;
- if (next)
- return next;
- next = m_parent;
- while (next && !next->m_nextSibling) {
- if (next == stayWithin)
+ const CounterNode* current = this;
+ CounterNode* next;
+ while (!(next = current->m_nextSibling)) {
+ current = current->m_parent;
+ if (!current || current == stayWithin)
return 0;
- next = next->m_parent;
}
- if (next)
- return next->m_nextSibling;
- return 0;
+ return next;
}
CounterNode* CounterNode::nextInPreOrder(const CounterNode* stayWithin) const
@@ -100,14 +90,13 @@ CounterNode* CounterNode::previousInPreOrder() const
int CounterNode::computeCountInParent() const
{
- int increment = m_isReset ? 0 : m_value;
+ int increment = actsAsReset() ? 0 : m_value;
if (m_previousSibling)
return m_previousSibling->m_countInParent + increment;
ASSERT(m_parent->m_firstChild == this);
return m_parent->m_value + increment;
}
-
void CounterNode::resetRenderer(const AtomicString& identifier) const
{
if (!m_renderer || m_renderer->documentBeingDestroyed())
@@ -145,6 +134,11 @@ void CounterNode::insertAfter(CounterNode* newChild, CounterNode* refChild, cons
ASSERT(!newChild->m_nextSibling);
ASSERT(!refChild || refChild->m_parent == this);
+ if (newChild->m_hasResetType) {
+ while (m_lastChild != refChild)
+ RenderCounter::destroyCounterNode(m_lastChild->renderer(), identifier);
+ }
+
CounterNode* next;
if (refChild) {
@@ -155,21 +149,57 @@ void CounterNode::insertAfter(CounterNode* newChild, CounterNode* refChild, cons
m_firstChild = newChild;
}
- if (next) {
- ASSERT(next->m_previousSibling == refChild);
- next->m_previousSibling = newChild;
- } else {
- ASSERT(m_lastChild == refChild);
- m_lastChild = newChild;
- }
-
newChild->m_parent = this;
newChild->m_previousSibling = refChild;
- newChild->m_nextSibling = next;
- newChild->m_countInParent = newChild->computeCountInParent();
+ if (!newChild->m_firstChild || newChild->m_hasResetType) {
+ newChild->m_nextSibling = next;
+ if (next) {
+ ASSERT(next->m_previousSibling == refChild);
+ next->m_previousSibling = newChild;
+ } else {
+ ASSERT(m_lastChild == refChild);
+ m_lastChild = newChild;
+ }
+
+ newChild->m_countInParent = newChild->computeCountInParent();
+ newChild->resetRenderers(identifier);
+ if (next)
+ next->recount(identifier);
+ return;
+ }
+
+ // The code below handles the case when a formerly root increment counter is loosing its root position
+ // and therefore its children become next siblings.
+ CounterNode* last = newChild->m_lastChild;
+ CounterNode* first = newChild->m_firstChild;
+
+ newChild->m_nextSibling = first;
+ first->m_previousSibling = newChild;
+ // The case when the original next sibling of the inserted node becomes a child of
+ // one of the former children of the inserted node is not handled as it is believed
+ // to be impossible since:
+ // 1. if the increment counter node lost it's root position as a result of another
+ // counter node being created, it will be inserted as the last child so next is null.
+ // 2. if the increment counter node lost it's root position as a result of a renderer being
+ // inserted into the document's render tree, all its former children counters are attached
+ // to children of the inserted renderer and hence cannot be in scope for counter nodes
+ // attached to renderers that were already in the document's render tree.
+ last->m_nextSibling = next;
if (next)
- next->recount(identifier);
+ next->m_previousSibling = last;
+ else
+ m_lastChild = last;
+ for (next = first; ; next = next->m_nextSibling) {
+ next->m_parent = this;
+ if (last == next)
+ break;
+ }
+ newChild->m_firstChild = 0;
+ newChild->m_lastChild = 0;
+ newChild->m_countInParent = newChild->computeCountInParent();
+ newChild->resetRenderer(identifier);
+ first->recount(identifier);
}
void CounterNode::removeChild(CounterNode* oldChild, const AtomicString& identifier)
@@ -216,7 +246,7 @@ static void showTreeAndMark(const CounterNode* node)
for (const CounterNode* parent = current; parent && parent != root; parent = parent->parent())
fwrite(" ", 1, 2, stderr);
fprintf(stderr, "%p %s: %d %d P:%p PS:%p NS:%p R:%p\n",
- current, current->isReset() ? "reset____" : "increment", current->value(),
+ current, current->actsAsReset() ? "reset____" : "increment", current->value(),
current->countInParent(), current->parent(), current->previousSibling(),
current->nextSibling(), current->renderer());
}
diff --git a/WebCore/rendering/CounterNode.h b/WebCore/rendering/CounterNode.h
index 8081dc6..15f2eb8 100644
--- a/WebCore/rendering/CounterNode.h
+++ b/WebCore/rendering/CounterNode.h
@@ -42,7 +42,8 @@ class CounterNode : public Noncopyable {
public:
CounterNode(RenderObject*, bool isReset, int value);
- bool isReset() const { return m_isReset; }
+ bool actsAsReset() const { return m_hasResetType || !m_parent; }
+ bool hasResetType() const { return m_hasResetType; }
int value() const { return m_value; }
int countInParent() const { return m_countInParent; }
RenderObject* renderer() const { return m_renderer; }
@@ -58,15 +59,24 @@ public:
CounterNode* nextInPreOrderAfterChildren(const CounterNode* stayWithin = 0) const;
void insertAfter(CounterNode* newChild, CounterNode* beforeChild, const AtomicString& identifier);
+
+ // identifier must match the identifier of this counter.
void removeChild(CounterNode*, const AtomicString& identifier);
private:
int computeCountInParent() const;
void recount(const AtomicString& identifier);
+
+ // Invalidates the text in the renderer of this counter, if any.
+ // identifier must match the identifier of this counter.
void resetRenderer(const AtomicString& identifier) const;
+
+ // Invalidates the text in the renderer of this counter, if any,
+ // and in the renderers of all descendants of this counter, if any.
+ // identifier must match the identifier of this counter.
void resetRenderers(const AtomicString& identifier) const;
- bool m_isReset;
+ bool m_hasResetType;
int m_value;
int m_countInParent;
RenderObject* m_renderer;
diff --git a/WebCore/rendering/EllipsisBox.cpp b/WebCore/rendering/EllipsisBox.cpp
index bea9d73..6ec3195 100644
--- a/WebCore/rendering/EllipsisBox.cpp
+++ b/WebCore/rendering/EllipsisBox.cpp
@@ -23,6 +23,7 @@
#include "Document.h"
#include "GraphicsContext.h"
#include "HitTestResult.h"
+#include "RootInlineBox.h"
namespace WebCore {
@@ -40,9 +41,22 @@ void EllipsisBox::paint(RenderObject::PaintInfo& paintInfo, int tx, int ty)
setShadow = true;
}
+ if (selectionState() != RenderObject::SelectionNone) {
+ paintSelection(context, tx, ty, style, style->font());
+
+ // Select the correct color for painting the text.
+ Color foreground = paintInfo.forceBlackText ? Color::black : renderer()->selectionForegroundColor();
+ if (foreground.isValid() && foreground != textColor)
+ context->setFillColor(foreground, style->colorSpace());
+ }
+
const String& str = m_str;
context->drawText(style->font(), TextRun(str.characters(), str.length(), false, 0, 0, false, style->visuallyOrdered()), IntPoint(m_x + tx, m_y + ty + style->font().ascent()));
+ // Restore the regular fill color.
+ if (textColor != context->fillColor())
+ context->setFillColor(textColor, style->colorSpace());
+
if (setShadow)
context->clearShadow();
@@ -54,6 +68,35 @@ void EllipsisBox::paint(RenderObject::PaintInfo& paintInfo, int tx, int ty)
}
}
+IntRect EllipsisBox::selectionRect(int tx, int ty)
+{
+ RenderStyle* style = m_renderer->style(m_firstLine);
+ const Font& f = style->font();
+ return enclosingIntRect(f.selectionRectForText(TextRun(m_str.characters(), m_str.length(), false, 0, 0, false, style->visuallyOrdered()),
+ IntPoint(m_x + tx, m_y + ty + root()->selectionTop()), root()->selectionHeight()));
+}
+
+void EllipsisBox::paintSelection(GraphicsContext* context, int tx, int ty, RenderStyle* style, const Font& font)
+{
+ Color textColor = style->color();
+ Color c = m_renderer->selectionBackgroundColor();
+ if (!c.isValid() || !c.alpha())
+ return;
+
+ // If the text color ends up being the same as the selection background, invert the selection
+ // background.
+ if (textColor == c)
+ c = Color(0xff - c.red(), 0xff - c.green(), 0xff - c.blue());
+
+ context->save();
+ int y = root()->selectionTop();
+ int h = root()->selectionHeight();
+ context->clip(IntRect(m_x + tx, y + ty, m_width, h));
+ context->drawHighlightForText(font, TextRun(m_str.characters(), m_str.length(), false, 0, 0, false, style->visuallyOrdered()),
+ IntPoint(m_x + tx, m_y + ty + y), h, c, style->colorSpace());
+ context->restore();
+}
+
bool EllipsisBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty)
{
tx += m_x;
diff --git a/WebCore/rendering/EllipsisBox.h b/WebCore/rendering/EllipsisBox.h
index a228d7a..087fc72 100644
--- a/WebCore/rendering/EllipsisBox.h
+++ b/WebCore/rendering/EllipsisBox.h
@@ -35,18 +35,24 @@ public:
, m_height(height)
, m_str(ellipsisStr)
, m_markupBox(markupBox)
+ , m_selectionState(RenderObject::SelectionNone)
{
}
virtual void paint(RenderObject::PaintInfo&, int tx, int ty);
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty);
+ void setSelectionState(RenderObject::SelectionState s) { m_selectionState = s; }
+ IntRect selectionRect(int tx, int ty);
private:
virtual int height() const { return m_height; }
+ virtual RenderObject::SelectionState selectionState() { return m_selectionState; }
+ void paintSelection(GraphicsContext*, int tx, int ty, RenderStyle*, const Font&);
int m_height;
AtomicString m_str;
InlineBox* m_markupBox;
+ RenderObject::SelectionState m_selectionState;
};
} // namespace WebCore
diff --git a/WebCore/rendering/InlineFlowBox.cpp b/WebCore/rendering/InlineFlowBox.cpp
index 2bd1683..34eec30 100644
--- a/WebCore/rendering/InlineFlowBox.cpp
+++ b/WebCore/rendering/InlineFlowBox.cpp
@@ -429,7 +429,7 @@ void InlineFlowBox::computeLogicalBoxHeights(int& maxPositionTop, int& maxPositi
}
lineHeight = baseline + baselineToBottom;
} else if (parentLineHeight.isPercent()) {
- lineHeight = parentLineHeight.calcMinValue(curr->renderer()->style()->fontSize(), true);
+ lineHeight = parentLineHeight.calcMinValue(curr->renderer()->style()->fontSize());
baseline = 0;
for (size_t i = 0; i < usedFonts.size(); ++i) {
int halfLeading = (lineHeight - usedFonts[i]->ascent() - usedFonts[i]->descent()) / 2;
@@ -532,9 +532,6 @@ void InlineFlowBox::computeVerticalOverflow(int lineTop, int lineBottom, bool st
// Any spillage outside of the line top and bottom is not considered overflow. We just ignore this, since it only happens
// from the "your ascent/descent don't affect the line" quirk.
- // FIXME: Technically this means there can be repaint errors in the case where a line box has a shadow or background that spills
- // outside of the block. We should consider making any line box that has anything to render just stop respecting the quirk or making
- // boxes that render something set visual overflow.
int topOverflow = max(y(), lineTop);
int bottomOverflow = min(y() + boxHeight, lineBottom);
@@ -735,13 +732,24 @@ void InlineFlowBox::paintBoxDecorations(RenderObject::PaintInfo& paintInfo, int
if (!renderer()->shouldPaintWithinRoot(paintInfo) || renderer()->style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseForeground)
return;
- // Move x/y to our coordinates.
- tx += m_x;
- ty += m_y;
-
+ int x = m_x;
+ int y = m_y;
int w = width();
int h = height();
+ // Constrain our background/border painting to the line top and bottom if necessary.
+ bool strictMode = renderer()->document()->inStrictMode();
+ if (!hasTextChildren() && !strictMode) {
+ RootInlineBox* rootBox = root();
+ int bottom = min(rootBox->lineBottom(), y + h);
+ y = max(rootBox->lineTop(), y);
+ h = bottom - y;
+ }
+
+ // Move x/y to our coordinates.
+ tx += x;
+ ty += y;
+
GraphicsContext* context = paintInfo.context;
// You can use p::first-line to specify a background. If so, the root line boxes for
@@ -800,13 +808,24 @@ void InlineFlowBox::paintMask(RenderObject::PaintInfo& paintInfo, int tx, int ty
if (!renderer()->shouldPaintWithinRoot(paintInfo) || renderer()->style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask)
return;
- // Move x/y to our coordinates.
- tx += m_x;
- ty += m_y;
-
+ int x = m_x;
+ int y = m_y;
int w = width();
int h = height();
+ // Constrain our background/border painting to the line top and bottom if necessary.
+ bool strictMode = renderer()->document()->inStrictMode();
+ if (!hasTextChildren() && !strictMode) {
+ RootInlineBox* rootBox = root();
+ int bottom = min(rootBox->lineBottom(), y + h);
+ y = max(rootBox->lineTop(), y);
+ h = bottom - y;
+ }
+
+ // Move x/y to our coordinates.
+ tx += x;
+ ty += y;
+
const NinePieceImage& maskNinePieceImage = renderer()->style()->maskBoxImage();
StyleImage* maskBoxImage = renderer()->style()->maskBoxImage().image();
diff --git a/WebCore/rendering/InlineTextBox.cpp b/WebCore/rendering/InlineTextBox.cpp
index 31e6967..b7e6de2 100644
--- a/WebCore/rendering/InlineTextBox.cpp
+++ b/WebCore/rendering/InlineTextBox.cpp
@@ -23,9 +23,11 @@
#include "config.h"
#include "InlineTextBox.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
#include "Editor.h"
+#include "EllipsisBox.h"
#include "Frame.h"
#include "GraphicsContext.h"
#include "HitTestResult.h"
@@ -81,6 +83,23 @@ RenderObject::SelectionState InlineTextBox::selectionState()
else if (state == RenderObject::SelectionBoth)
state = RenderObject::SelectionNone;
}
+
+ // If there are ellipsis following, make sure their selection is updated.
+ if (m_truncation != cNoTruncation && root()->ellipsisBox()) {
+ EllipsisBox* ellipsis = root()->ellipsisBox();
+ if (state != RenderObject::SelectionNone) {
+ int start, end;
+ selectionStartEnd(start, end);
+ // The ellipsis should be considered to be selected if the end of
+ // the selection is past the beginning of the truncation and the
+ // beginning of the selection is before or at the beginning of the
+ // truncation.
+ ellipsis->setSelectionState(end >= m_truncation && start <= m_truncation ?
+ RenderObject::SelectionInside : RenderObject::SelectionNone);
+ } else
+ ellipsis->setSelectionState(RenderObject::SelectionNone);
+ }
+
return state;
}
@@ -89,7 +108,7 @@ IntRect InlineTextBox::selectionRect(int tx, int ty, int startPos, int endPos)
int sPos = max(startPos - m_start, 0);
int ePos = min(endPos - m_start, (int)m_len);
- if (sPos >= ePos)
+ if (sPos > ePos)
return IntRect();
RenderText* textObj = textRenderer();
@@ -254,7 +273,7 @@ bool InlineTextBox::nodeAtPoint(const HitTestRequest&, HitTestResult& result, in
return false;
}
-static void paintTextWithShadows(GraphicsContext* context, const Font& font, const TextRun& textRun, int startOffset, int endOffset, const IntPoint& textOrigin, int x, int y, int w, int h, ShadowData* shadow, bool stroked)
+static void paintTextWithShadows(GraphicsContext* context, const Font& font, const TextRun& textRun, int startOffset, int endOffset, int truncationPoint, const IntPoint& textOrigin, int x, int y, int w, int h, ShadowData* shadow, bool stroked)
{
Color fillColor = context->fillColor();
ColorSpace fillColorSpace = context->fillColorSpace();
@@ -289,8 +308,8 @@ static void paintTextWithShadows(GraphicsContext* context, const Font& font, con
else {
if (endOffset > 0)
context->drawText(font, textRun, textOrigin + extraOffset, 0, endOffset);
- if (startOffset < textRun.length())
- context->drawText(font, textRun, textOrigin + extraOffset, startOffset);
+ if (startOffset < truncationPoint)
+ context->drawText(font, textRun, textOrigin + extraOffset, startOffset, truncationPoint);
}
if (!shadow)
@@ -460,6 +479,13 @@ void InlineTextBox::paint(RenderObject::PaintInfo& paintInfo, int tx, int ty)
if (paintSelectedTextOnly || paintSelectedTextSeparately)
selectionStartEnd(sPos, ePos);
+ int length = m_len;
+ if (m_truncation != cNoTruncation) {
+ sPos = min<int>(sPos, m_truncation);
+ ePos = min<int>(ePos, m_truncation);
+ length = m_truncation;
+ }
+
if (!paintSelectedTextOnly) {
// For stroked painting, we have to change the text drawing mode. It's probably dangerous to leave that mutated as a side
// effect, so only when we know we're stroking, do a save/restore.
@@ -469,9 +495,9 @@ void InlineTextBox::paint(RenderObject::PaintInfo& paintInfo, int tx, int ty)
updateGraphicsContext(context, textFillColor, textStrokeColor, textStrokeWidth, styleToUse->colorSpace());
if (!paintSelectedTextSeparately || ePos <= sPos) {
// FIXME: Truncate right-to-left text correctly.
- paintTextWithShadows(context, font, textRun, 0, m_truncation == cNoTruncation ? m_len : m_truncation, textOrigin, m_x + tx, m_y + ty, width(), height(), textShadow, textStrokeWidth > 0);
+ paintTextWithShadows(context, font, textRun, 0, length, length, textOrigin, m_x + tx, m_y + ty, width(), height(), textShadow, textStrokeWidth > 0);
} else
- paintTextWithShadows(context, font, textRun, ePos, sPos, textOrigin, m_x + tx, m_y + ty, width(), height(), textShadow, textStrokeWidth > 0);
+ paintTextWithShadows(context, font, textRun, ePos, sPos, length, textOrigin, m_x + tx, m_y + ty, width(), height(), textShadow, textStrokeWidth > 0);
if (textStrokeWidth > 0)
context->restore();
@@ -483,7 +509,7 @@ void InlineTextBox::paint(RenderObject::PaintInfo& paintInfo, int tx, int ty)
context->save();
updateGraphicsContext(context, selectionFillColor, selectionStrokeColor, selectionStrokeWidth, styleToUse->colorSpace());
- paintTextWithShadows(context, font, textRun, sPos, ePos, textOrigin, m_x + tx, m_y + ty, width(), height(), selectionShadow, selectionStrokeWidth > 0);
+ paintTextWithShadows(context, font, textRun, sPos, ePos, length, textOrigin, m_x + tx, m_y + ty, width(), height(), selectionShadow, selectionStrokeWidth > 0);
if (selectionStrokeWidth > 0)
context->restore();
@@ -565,8 +591,11 @@ void InlineTextBox::paintSelection(GraphicsContext* context, int tx, int ty, Ren
updateGraphicsContext(context, c, c, 0, style->colorSpace()); // Don't draw text at all!
int y = selectionTop();
int h = selectionHeight();
+ // If the text is truncated, let the thing being painted in the truncation
+ // draw its own highlight.
+ int length = m_truncation != cNoTruncation ? m_truncation : m_len;
context->clip(IntRect(m_x + tx, y + ty, m_width, h));
- context->drawHighlightForText(font, TextRun(textRenderer()->text()->characters() + m_start, m_len, textRenderer()->allowTabs(), textPos(), m_toAdd,
+ context->drawHighlightForText(font, TextRun(textRenderer()->text()->characters() + m_start, length, textRenderer()->allowTabs(), textPos(), m_toAdd,
direction() == RTL, m_dirOverride || style->visuallyOrdered()),
IntPoint(m_x + tx, y + ty), h, c, style->colorSpace(), sPos, ePos);
context->restore();
diff --git a/WebCore/rendering/InlineTextBox.h b/WebCore/rendering/InlineTextBox.h
index 80af2e3..0a83ddd 100644
--- a/WebCore/rendering/InlineTextBox.h
+++ b/WebCore/rendering/InlineTextBox.h
@@ -62,6 +62,8 @@ public:
void setFallbackFonts(const HashSet<const SimpleFontData*>&);
void takeFallbackFonts(Vector<const SimpleFontData*>&);
+ unsigned short truncation() { return m_truncation; }
+
private:
virtual int selectionTop();
virtual int selectionHeight();
diff --git a/WebCore/rendering/RenderArena.cpp b/WebCore/rendering/RenderArena.cpp
index 3ab4dff..41f33de 100644
--- a/WebCore/rendering/RenderArena.cpp
+++ b/WebCore/rendering/RenderArena.cpp
@@ -114,7 +114,7 @@ void RenderArena::free(size_t size, void* ptr)
// Use standard free so that memory debugging tools work.
RenderArenaDebugHeader* header = static_cast<RenderArenaDebugHeader*>(ptr) - 1;
ASSERT(header->signature == signature);
- ASSERT(header->size == size);
+ ASSERT_UNUSED(size, header->size == size);
ASSERT(header->arena == this);
header->signature = signatureDead;
::free(header);
diff --git a/WebCore/rendering/RenderBR.cpp b/WebCore/rendering/RenderBR.cpp
index 012a433..340d6b7 100644
--- a/WebCore/rendering/RenderBR.cpp
+++ b/WebCore/rendering/RenderBR.cpp
@@ -62,7 +62,7 @@ int RenderBR::lineHeight(bool firstLine, bool /*isRootLineBox*/) const
return s->font().lineSpacing();
}
if (lh.isPercent())
- return lh.calcMinValue(s->fontSize(), true);
+ return lh.calcMinValue(s->fontSize());
return lh.value();
}
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index 4d60569..bffade7 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -2,7 +2,7 @@
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2007 David Smith (catfish.man@gmail.com)
- * 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
@@ -415,6 +415,31 @@ void RenderBlock::moveChildTo(RenderObject* to, RenderObjectChildList* toChildLi
toChildList->insertChildNode(to, children()->removeChildNode(this, child, false), beforeChild, false);
}
+void RenderBlock::moveAllChildrenTo(RenderObject* to, RenderObjectChildList* toChildList)
+{
+ RenderObject* nextChild = children()->firstChild();
+ while (nextChild) {
+ RenderObject* child = nextChild;
+ nextChild = child->nextSibling();
+ toChildList->appendChildNode(to, children()->removeChildNode(this, child, false), false);
+ }
+}
+
+void RenderBlock::moveAllChildrenTo(RenderObject* to, RenderObjectChildList* toChildList, RenderObject* beforeChild)
+{
+ ASSERT(!beforeChild || to == beforeChild->parent());
+ if (!beforeChild) {
+ moveAllChildrenTo(to, toChildList);
+ return;
+ }
+ RenderObject* nextChild = children()->firstChild();
+ while (nextChild) {
+ RenderObject* child = nextChild;
+ nextChild = child->nextSibling();
+ toChildList->insertChildNode(to, children()->removeChildNode(this, child, false), beforeChild, false);
+ }
+}
+
void RenderBlock::makeChildrenNonInline(RenderObject *insertionPoint)
{
// makeChildrenNonInline takes a block whose children are *all* inline and it
@@ -521,20 +546,12 @@ void RenderBlock::removeChild(RenderObject* oldChild)
// Take all the children out of the |next| block and put them in
// the |prev| block.
prev->setNeedsLayoutAndPrefWidthsRecalc();
- RenderObject* o = next->firstChild();
-
RenderBlock* nextBlock = toRenderBlock(next);
RenderBlock* prevBlock = toRenderBlock(prev);
- while (o) {
- RenderObject* no = o;
- o = no->nextSibling();
- nextBlock->moveChildTo(prevBlock, prevBlock->children(), no);
- }
-
+ nextBlock->moveAllChildrenTo(prevBlock, prevBlock->children());
+ // Delete the now-empty block's lines and nuke it.
nextBlock->deleteLineBoxTree();
-
- // Nuke the now-empty block.
- next->destroy();
+ nextBlock->destroy();
}
RenderBox::removeChild(oldChild);
@@ -547,17 +564,15 @@ void RenderBlock::removeChild(RenderObject* oldChild)
setNeedsLayoutAndPrefWidthsRecalc();
RenderBlock* anonBlock = toRenderBlock(children()->removeChildNode(this, child, false));
setChildrenInline(true);
- RenderObject* o = anonBlock->firstChild();
- while (o) {
- RenderObject* no = o;
- o = no->nextSibling();
- anonBlock->moveChildTo(this, children(), no);
- }
-
+ anonBlock->moveAllChildrenTo(this, children());
// Delete the now-empty block's lines and nuke it.
anonBlock->deleteLineBoxTree();
anonBlock->destroy();
}
+
+ // If this was our last child be sure to clear out our line boxes.
+ if (childrenInline() && !firstChild())
+ lineBoxes()->deleteLineBoxes(renderArena());
}
bool RenderBlock::isSelfCollapsingBlock() const
@@ -1698,7 +1713,7 @@ void RenderBlock::paintCaret(PaintInfo& paintInfo, int tx, int ty, CaretType typ
offsetForContents(tx, ty);
if (type == CursorCaret)
- document()->frame()->paintCaret(paintInfo.context, tx, ty, paintInfo.rect);
+ document()->frame()->selection()->paintCaret(paintInfo.context, tx, ty, paintInfo.rect);
else
document()->frame()->paintDragCaret(paintInfo.context, tx, ty, paintInfo.rect);
}
@@ -1965,8 +1980,11 @@ void RenderBlock::paintSelection(PaintInfo& paintInfo, int tx, int ty)
IntRect gapRectsBounds = fillSelectionGaps(this, tx, ty, tx, ty, lastTop, lastLeft, lastRight, &paintInfo);
if (!gapRectsBounds.isEmpty()) {
if (RenderLayer* layer = enclosingLayer()) {
- IntSize offset = hasLayer() ? IntSize() : offsetFromAncestorContainer(layer->renderer());
- gapRectsBounds.move(offset - IntSize(tx, ty));
+ gapRectsBounds.move(IntSize(-tx, -ty));
+ if (!hasLayer()) {
+ FloatRect localBounds(gapRectsBounds);
+ gapRectsBounds = localToContainerQuad(localBounds, layer->renderer()).enclosingBoundingBox();
+ }
layer->addBlockSelectionGapsBounds(gapRectsBounds);
}
}
@@ -2655,6 +2673,9 @@ int RenderBlock::lowestPosition(bool includeOverflowInterior, bool includeSelf)
if (!includeOverflowInterior && (hasOverflowClip() || hasControlClip()))
return bottom;
+
+ if (!firstChild() && (!width() || !height()))
+ return bottom;
if (!hasColumns()) {
// FIXME: Come up with a way to use the layer tree to avoid visiting all the kids.
@@ -2747,6 +2768,9 @@ int RenderBlock::rightmostPosition(bool includeOverflowInterior, bool includeSel
if (!includeOverflowInterior && (hasOverflowClip() || hasControlClip()))
return right;
+ if (!firstChild() && (!width() || !height()))
+ return right;
+
if (!hasColumns()) {
// FIXME: Come up with a way to use the layer tree to avoid visiting all the kids.
// For now, we have to descend into all the children, since we may have a huge abs div inside
@@ -2841,6 +2865,9 @@ int RenderBlock::leftmostPosition(bool includeOverflowInterior, bool includeSelf
if (!includeOverflowInterior && (hasOverflowClip() || hasControlClip()))
return left;
+ if (!firstChild() && (!width() || !height()))
+ return left;
+
if (!hasColumns()) {
// FIXME: Come up with a way to use the layer tree to avoid visiting all the kids.
// For now, we have to descend into all the children, since we may have a huge abs div inside
@@ -2938,7 +2965,7 @@ RenderBlock::rightBottom()
return bottom;
}
-void RenderBlock::markLinesDirtyInVerticalRange(int top, int bottom)
+void RenderBlock::markLinesDirtyInVerticalRange(int top, int bottom, RootInlineBox* highest)
{
if (top >= bottom)
return;
@@ -2950,7 +2977,7 @@ void RenderBlock::markLinesDirtyInVerticalRange(int top, int bottom)
lowestDirtyLine = lowestDirtyLine->prevRootBox();
}
- while (afterLowest && afterLowest->blockHeight() >= top) {
+ while (afterLowest && afterLowest != highest && afterLowest->blockHeight() >= top) {
afterLowest->markDirty();
afterLowest = afterLowest->prevRootBox();
}
@@ -3214,18 +3241,35 @@ int RenderBlock::getClearDelta(RenderBox* child, int yPos)
}
// We also clear floats if we are too big to sit on the same line as a float (and wish to avoid floats by default).
- // FIXME: Note that the remaining space checks aren't quite accurate, since you should be able to clear only some floats (the minimum # needed
- // to fit) and not all (we should be using nextFloatBottomBelow and looping).
int result = clearSet ? max(0, bottom - yPos) : 0;
if (!result && child->avoidsFloats()) {
- int oldYPos = child->y();
- int oldWidth = child->width();
- child->setY(yPos);
- child->calcWidth();
- if (child->width() > lineWidth(yPos, false) && child->minPrefWidth() <= availableWidth())
- result = max(0, floatBottom() - yPos);
- child->setY(oldYPos);
- child->setWidth(oldWidth);
+ int availableWidth = this->availableWidth();
+ if (child->minPrefWidth() > availableWidth)
+ return 0;
+
+ int y = yPos;
+ while (true) {
+ int widthAtY = lineWidth(y, false);
+ if (widthAtY == availableWidth)
+ return y - yPos;
+
+ int oldChildY = child->y();
+ int oldChildWidth = child->width();
+ child->setY(y);
+ child->calcWidth();
+ int childWidthAtY = child->width();
+ child->setY(oldChildY);
+ child->setWidth(oldChildWidth);
+
+ if (childWidthAtY <= widthAtY)
+ return y - yPos;
+
+ y = nextFloatBottomBelow(y);
+ ASSERT(y >= yPos);
+ if (y < yPos)
+ break;
+ }
+ ASSERT_NOT_REACHED();
}
return result;
}
@@ -5018,7 +5062,7 @@ IntRect RenderBlock::localCaretRect(InlineBox* inlineBox, int caretOffset, int*
return IntRect(x, y, caretWidth, height);
}
-void RenderBlock::addFocusRingRects(GraphicsContext* graphicsContext, int tx, int ty)
+void RenderBlock::addFocusRingRects(Vector<IntRect>& rects, int tx, int ty)
{
// For blocks inside inlines, we go ahead and include margins so that we run right up to the
// inline boxes above and below us (thus getting merged with them to form a single irregular
@@ -5030,16 +5074,19 @@ void RenderBlock::addFocusRingRects(GraphicsContext* graphicsContext, int tx, in
bool prevInlineHasLineBox = toRenderInline(inlineContinuation()->node()->renderer())->firstLineBox();
int topMargin = prevInlineHasLineBox ? collapsedMarginTop() : 0;
int bottomMargin = nextInlineHasLineBox ? collapsedMarginBottom() : 0;
- graphicsContext->addFocusRingRect(IntRect(tx, ty - topMargin,
- width(), height() + topMargin + bottomMargin));
- } else
- graphicsContext->addFocusRingRect(IntRect(tx, ty, width(), height()));
+ IntRect rect(tx, ty - topMargin, width(), height() + topMargin + bottomMargin);
+ if (!rect.isEmpty())
+ rects.append(rect);
+ } else if (width() && height())
+ rects.append(IntRect(tx, ty, width(), height()));
if (!hasOverflowClip() && !hasControlClip()) {
for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) {
int top = max(curr->lineTop(), curr->y());
int bottom = min(curr->lineBottom(), curr->y() + curr->height());
- graphicsContext->addFocusRingRect(IntRect(tx + curr->x(), ty + top, curr->width(), bottom - top));
+ IntRect rect(tx + curr->x(), ty + top, curr->width(), bottom - top);
+ if (!rect.isEmpty())
+ rects.append(rect);
}
for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
@@ -5051,13 +5098,13 @@ void RenderBlock::addFocusRingRects(GraphicsContext* graphicsContext, int tx, in
pos = curr->localToAbsolute();
else
pos = FloatPoint(tx + box->x(), ty + box->y());
- box->addFocusRingRects(graphicsContext, pos.x(), pos.y());
+ box->addFocusRingRects(rects, pos.x(), pos.y());
}
}
}
if (inlineContinuation())
- inlineContinuation()->addFocusRingRects(graphicsContext,
+ inlineContinuation()->addFocusRingRects(rects,
tx - x() + inlineContinuation()->containingBlock()->x(),
ty - y() + inlineContinuation()->containingBlock()->y());
}
diff --git a/WebCore/rendering/RenderBlock.h b/WebCore/rendering/RenderBlock.h
index 985074d..884695a 100644
--- a/WebCore/rendering/RenderBlock.h
+++ b/WebCore/rendering/RenderBlock.h
@@ -2,7 +2,7 @@
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2007 David Smith (catfish.man@gmail.com)
- * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 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
@@ -34,7 +34,6 @@ namespace WebCore {
class InlineIterator;
class RenderInline;
-class RootInlineBox;
struct BidiRun;
@@ -142,6 +141,8 @@ public:
protected:
void moveChildTo(RenderObject* to, RenderObjectChildList* toChildList, RenderObject* child);
void moveChildTo(RenderObject* to, RenderObjectChildList* toChildList, RenderObject* beforeChild, RenderObject* child);
+ void moveAllChildrenTo(RenderObject* to, RenderObjectChildList* toChildList);
+ void moveAllChildrenTo(RenderObject* to, RenderObjectChildList* toChildList, RenderObject* beforeChild);
int maxTopPosMargin() const { return m_maxMargin ? m_maxMargin->m_topPos : MaxMargin::topPosDefault(this); }
int maxTopNegMargin() const { return m_maxMargin ? m_maxMargin->m_topNeg : MaxMargin::topNegDefault(this); }
@@ -363,12 +364,12 @@ private:
virtual IntRect localCaretRect(InlineBox*, int caretOffset, int* extraWidthToEndOfLine = 0);
- virtual void addFocusRingRects(GraphicsContext*, int tx, int ty);
+ virtual void addFocusRingRects(Vector<IntRect>&, int tx, int ty);
void adjustPointToColumnContents(IntPoint&) const;
void adjustForBorderFit(int x, int& left, int& right) const; // Helper function for borderFitAdjust
- void markLinesDirtyInVerticalRange(int top, int bottom);
+ void markLinesDirtyInVerticalRange(int top, int bottom, RootInlineBox* highest = 0);
void newLine(EClear);
@@ -528,6 +529,10 @@ private:
RenderLineBoxList m_lineBoxes; // All of the root line boxes created for this block flow. For example, <div>Hello<br>world.</div> will have two total lines for the <div>.
mutable int m_lineHeight;
+
+ // RenderRubyBase objects need to be able to split and merge, moving their children around
+ // (calling moveChildTo, moveAllChildrenTo, and makeChildrenNonInline).
+ friend class RenderRubyBase;
};
inline RenderBlock* toRenderBlock(RenderObject* object)
diff --git a/WebCore/rendering/RenderBlockLineLayout.cpp b/WebCore/rendering/RenderBlockLineLayout.cpp
index e0d712c..c76d963 100644
--- a/WebCore/rendering/RenderBlockLineLayout.cpp
+++ b/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2000 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009 Apple Inc. All right reserved.
+ * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All right 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,6 +30,7 @@
#include "RenderInline.h"
#include "RenderListMarker.h"
#include "RenderView.h"
+#include "TrailingFloatsRootInlineBox.h"
#include "break_lines.h"
#include <wtf/AlwaysInline.h>
#include <wtf/RefCountedLeakCounter.h>
@@ -830,7 +832,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
// Figure out if we should clear out our line boxes.
// FIXME: Handle resize eventually!
- bool fullLayout = !firstLineBox() || !firstChild() || selfNeedsLayout() || relayoutChildren;
+ bool fullLayout = !firstLineBox() || selfNeedsLayout() || relayoutChildren;
if (fullLayout)
lineBoxes()->deleteLineBoxes(renderArena());
@@ -882,6 +884,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
bool endOfInline = false;
RenderObject* o = bidiFirst(this, 0, false);
Vector<FloatWithRect> floats;
+ bool hasInlineChild = false;
while (o) {
if (o->isReplaced() || o->isFloating() || o->isPositioned()) {
RenderBox* box = toRenderBox(o);
@@ -909,6 +912,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
o->layoutIfNeeded();
}
} else if (o->isText() || (o->isRenderInline() && !endOfInline)) {
+ hasInlineChild = true;
if (fullLayout || o->selfNeedsLayout())
dirtyLineBoxesForRenderer(o, fullLayout);
o->setNeedsLayout(false);
@@ -988,7 +992,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
bool previousLineBrokeCleanly = true;
RootInlineBox* startLine = determineStartPosition(firstLine, fullLayout, previousLineBrokeCleanly, resolver, floats, floatIndex);
- if (fullLayout && !selfNeedsLayout()) {
+ if (fullLayout && hasInlineChild && !selfNeedsLayout()) {
setNeedsLayout(true, false); // Mark ourselves as needing a full layout. This way we'll repaint like
// we're supposed to.
RenderView* v = view();
@@ -1229,6 +1233,16 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
// In case we have a float on the last line, it might not be positioned up to now.
// This has to be done before adding in the bottom border/padding, or the float will
// include the padding incorrectly. -dwh
+ if (checkForFloatsFromLastLine) {
+ int bottomVisualOverflow = lastRootBox()->bottomVisualOverflow();
+ int bottomLayoutOverflow = lastRootBox()->bottomLayoutOverflow();
+ TrailingFloatsRootInlineBox* trailingFloatsLineBox = new (renderArena()) TrailingFloatsRootInlineBox(this);
+ m_lineBoxes.appendLineBox(trailingFloatsLineBox);
+ trailingFloatsLineBox->setConstructed();
+ trailingFloatsLineBox->verticallyAlignBoxes(height());
+ trailingFloatsLineBox->setVerticalOverflowPositions(height(), bottomLayoutOverflow, height(), bottomVisualOverflow, 0);
+ trailingFloatsLineBox->setBlockHeight(height());
+ }
if (lastFloat) {
for (FloatingObject* f = m_floatingObjects->last(); f != lastFloat; f = m_floatingObjects->prev()) {
}
@@ -1291,7 +1305,7 @@ RootInlineBox* RenderBlock::determineStartPosition(bool& firstLine, bool& fullLa
if (floats[floatIndex].rect.size() != newSize) {
int floatTop = floats[floatIndex].rect.y();
curr->markDirty();
- markLinesDirtyInVerticalRange(curr->blockHeight(), floatTop + max(floats[floatIndex].rect.height(), newSize.height()));
+ markLinesDirtyInVerticalRange(curr->blockHeight(), floatTop + max(floats[floatIndex].rect.height(), newSize.height()), curr);
floats[floatIndex].rect.setSize(newSize);
dirtiedByFloat = true;
}
@@ -1908,6 +1922,10 @@ InlineIterator RenderBlock::findNextLineBreak(InlineBidiResolver& resolver, bool
int wordSpacing = o->style()->wordSpacing();
int lastSpaceWordSpacing = 0;
+ // Non-zero only when kerning is enabled, in which case we measure words with their trailing
+ // space, then subtract its width.
+ int wordTrailingSpaceWidth = f.typesettingFeatures() & Kerning ? f.spaceWidth() + wordSpacing : 0;
+
int wrapW = tmpW + inlineWidth(o, !appliedStartWidth, true);
int charWidth = 0;
bool breakNBSP = autoWrap && o->style()->nbspMode() == SPACE;
@@ -2002,7 +2020,11 @@ InlineIterator RenderBlock::findNextLineBreak(InlineBidiResolver& resolver, bool
}
}
- int additionalTmpW = textWidth(t, lastSpace, pos - lastSpace, f, w + tmpW, isFixedPitch, collapseWhiteSpace) + lastSpaceWordSpacing;
+ int additionalTmpW;
+ if (wordTrailingSpaceWidth && currentCharacterIsSpace)
+ additionalTmpW = textWidth(t, lastSpace, pos + 1 - lastSpace, f, w + tmpW, isFixedPitch, collapseWhiteSpace) - wordTrailingSpaceWidth + lastSpaceWordSpacing;
+ else
+ additionalTmpW = textWidth(t, lastSpace, pos - lastSpace, f, w + tmpW, isFixedPitch, collapseWhiteSpace) + lastSpaceWordSpacing;
tmpW += additionalTmpW;
if (!appliedStartWidth) {
tmpW += inlineWidth(o, true, false);
@@ -2034,7 +2056,7 @@ InlineIterator RenderBlock::findNextLineBreak(InlineBidiResolver& resolver, bool
}
}
if (lineWasTooWide || w + tmpW > width) {
- if (lBreak.obj && shouldPreserveNewline(lBreak.obj) && lBreak.obj->isText() && !toRenderText(lBreak.obj)->isWordBreak() && toRenderText(lBreak.obj)->characters()[lBreak.pos] == '\n') {
+ if (lBreak.obj && shouldPreserveNewline(lBreak.obj) && lBreak.obj->isText() && toRenderText(lBreak.obj)->textLength() && !toRenderText(lBreak.obj)->isWordBreak() && toRenderText(lBreak.obj)->characters()[lBreak.pos] == '\n') {
if (!stoppedIgnoringSpaces && pos > 0) {
// We need to stop right before the newline and then start up again.
addMidpoint(lineMidpointState, InlineIterator(0, o, pos - 1)); // Stop
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index a7c2e63..60230d4 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -26,6 +26,7 @@
#include "RenderBox.h"
#include "CachedImage.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
#include "FrameView.h"
@@ -335,12 +336,12 @@ IntRect RenderBox::outlineBoundsForRepaint(RenderBoxModelObject* repaintContaine
return box;
}
-void RenderBox::addFocusRingRects(GraphicsContext* graphicsContext, int tx, int ty)
+void RenderBox::addFocusRingRects(Vector<IntRect>& rects, int tx, int ty)
{
- graphicsContext->addFocusRingRect(IntRect(tx, ty, width(), height()));
+ if (width() && height())
+ rects.append(IntRect(tx, ty, width(), height()));
}
-
IntRect RenderBox::reflectionBox() const
{
IntRect result;
@@ -568,13 +569,14 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
{
const FillLayer* bgLayer = style()->backgroundLayers();
Color bgColor = style()->backgroundColor();
+ RenderObject* bodyObject = 0;
if (!style()->hasBackground() && node() && node()->hasTagName(HTMLNames::htmlTag)) {
// Locate the <body> element using the DOM. This is easier than trying
// to crawl around a render tree with potential :before/:after content and
// anonymous blocks created by inline <body> tags etc. We can locate the <body>
// render object very easily via the DOM.
HTMLElement* body = document()->body();
- RenderObject* bodyObject = (body && body->hasLocalName(bodyTag)) ? body->renderer() : 0;
+ bodyObject = (body && body->hasLocalName(bodyTag)) ? body->renderer() : 0;
if (bodyObject) {
bgLayer = bodyObject->style()->backgroundLayers();
bgColor = bodyObject->style()->backgroundColor();
@@ -602,7 +604,7 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
int bw = max(w + marginLeft() + marginRight() + borderLeft() + borderRight(), rw);
int bh = max(h + marginTop() + marginBottom() + borderTop() + borderBottom(), rh);
- paintFillLayers(paintInfo, bgColor, bgLayer, bx, by, bw, bh);
+ paintFillLayers(paintInfo, bgColor, bgLayer, bx, by, bw, bh, CompositeSourceOver, bodyObject);
if (style()->hasBorder() && style()->display() != INLINE)
paintBorder(paintInfo.context, tx, ty, w, h, style());
@@ -670,9 +672,25 @@ void RenderBox::paintMaskImages(const PaintInfo& paintInfo, int tx, int ty, int
bool compositedMask = hasLayer() && layer()->hasCompositedMask();
CompositeOperator compositeOp = CompositeSourceOver;
+ bool allMaskImagesLoaded = true;
+
if (!compositedMask) {
StyleImage* maskBoxImage = style()->maskBoxImage().image();
- if (maskBoxImage && style()->maskLayers()->hasImage()) {
+ const FillLayer* maskLayers = style()->maskLayers();
+
+ // Don't render a masked element until all the mask images have loaded, to prevent a flash of unmasked content.
+ if (maskBoxImage)
+ allMaskImagesLoaded &= maskBoxImage->isLoaded();
+
+ if (maskLayers)
+ allMaskImagesLoaded &= maskLayers->imagesAreLoaded();
+
+ // Before all images have loaded, just use an empty transparency layer as the mask.
+ if (!allMaskImagesLoaded)
+ pushTransparencyLayer = true;
+
+ if (maskBoxImage && maskLayers->hasImage()) {
+ // We have a mask-box-image and mask-image, so need to composite them together before using the result as a mask.
pushTransparencyLayer = true;
} else {
// We have to use an extra image buffer to hold the mask. Multiple mask images need
@@ -682,7 +700,7 @@ void RenderBox::paintMaskImages(const PaintInfo& paintInfo, int tx, int ty, int
// and composite that buffer as the mask.
// We have to check that the mask images to be rendered contain at least one image that can be actually used in rendering
// before pushing the transparency layer.
- for (const FillLayer* fillLayer = style()->maskLayers()->next(); fillLayer; fillLayer = fillLayer->next()) {
+ for (const FillLayer* fillLayer = maskLayers->next(); fillLayer; fillLayer = fillLayer->next()) {
if (fillLayer->hasImage() && fillLayer->image()->canRender(style()->effectiveZoom())) {
pushTransparencyLayer = true;
// We found one image that can be used in rendering, exit the loop
@@ -699,8 +717,10 @@ void RenderBox::paintMaskImages(const PaintInfo& paintInfo, int tx, int ty, int
}
}
- paintFillLayers(paintInfo, Color(), style()->maskLayers(), tx, ty, w, h, compositeOp);
- paintNinePieceImage(paintInfo.context, tx, ty, w, h, style(), style()->maskBoxImage(), compositeOp);
+ if (allMaskImagesLoaded) {
+ paintFillLayers(paintInfo, Color(), style()->maskLayers(), tx, ty, w, h, compositeOp);
+ paintNinePieceImage(paintInfo.context, tx, ty, w, h, style(), style()->maskBoxImage(), compositeOp);
+ }
if (pushTransparencyLayer)
paintInfo.context->endTransparencyLayer();
@@ -725,18 +745,18 @@ IntRect RenderBox::maskClipRect()
return result;
}
-void RenderBox::paintFillLayers(const PaintInfo& paintInfo, const Color& c, const FillLayer* fillLayer, int tx, int ty, int width, int height, CompositeOperator op)
+void RenderBox::paintFillLayers(const PaintInfo& paintInfo, const Color& c, const FillLayer* fillLayer, int tx, int ty, int width, int height, CompositeOperator op, RenderObject* backgroundObject)
{
if (!fillLayer)
return;
- paintFillLayers(paintInfo, c, fillLayer->next(), tx, ty, width, height, op);
- paintFillLayer(paintInfo, c, fillLayer, tx, ty, width, height, op);
+ paintFillLayers(paintInfo, c, fillLayer->next(), tx, ty, width, height, op, backgroundObject);
+ paintFillLayer(paintInfo, c, fillLayer, tx, ty, width, height, op, backgroundObject);
}
-void RenderBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, const FillLayer* fillLayer, int tx, int ty, int width, int height, CompositeOperator op)
+void RenderBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, const FillLayer* fillLayer, int tx, int ty, int width, int height, CompositeOperator op, RenderObject* backgroundObject)
{
- paintFillLayerExtended(paintInfo, c, fillLayer, tx, ty, width, height, 0, op);
+ paintFillLayerExtended(paintInfo, c, fillLayer, tx, ty, width, height, 0, op, backgroundObject);
}
void RenderBox::imageChanged(WrappedImagePtr image, const IntRect*)
@@ -946,18 +966,20 @@ void RenderBox::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool
}
}
- if (style()->position() == FixedPosition)
- fixed = true;
-
bool containerSkipped;
RenderObject* o = container(repaintContainer, &containerSkipped);
if (!o)
return;
+ bool isFixedPos = style()->position() == FixedPosition;
bool hasTransform = hasLayer() && layer()->transform();
- if (hasTransform)
- fixed = false; // Elements with transforms act as a containing block for fixed position descendants
-
+ if (hasTransform) {
+ // If this box has a transform, it acts as a fixed position container for fixed descendants,
+ // and may itself also be fixed position. So propagate 'fixed' up only if this box is fixed position.
+ fixed &= isFixedPos;
+ } else
+ fixed |= isFixedPos;
+
IntSize containerOffset = offsetFromContainer(o);
bool preserve3D = useTransforms && (o->style()->preserves3D() || style()->preserves3D());
@@ -984,12 +1006,14 @@ void RenderBox::mapAbsoluteToLocalPoint(bool fixed, bool useTransforms, Transfor
// We don't expect absoluteToLocal() to be called during layout (yet)
ASSERT(!view() || !view()->layoutStateEnabled());
- if (style()->position() == FixedPosition)
- fixed = true;
-
+ bool isFixedPos = style()->position() == FixedPosition;
bool hasTransform = hasLayer() && layer()->transform();
- if (hasTransform)
- fixed = false; // Elements with transforms act as a containing block for fixed position descendants
+ if (hasTransform) {
+ // If this box has a transform, it acts as a fixed position container for fixed descendants,
+ // and may itself also be fixed position. So propagate 'fixed' up only if this box is fixed position.
+ fixed &= isFixedPos;
+ } else
+ fixed |= isFixedPos;
RenderObject* o = container();
if (!o)
@@ -1968,7 +1992,7 @@ void RenderBox::calcAbsoluteHorizontalValues(Length width, const RenderBoxModelO
int& widthValue, int& marginLeftValue, int& marginRightValue, int& xPos)
{
// 'left' and 'right' cannot both be 'auto' because one would of been
- // converted to the static postion already
+ // converted to the static position already
ASSERT(!(left.isAuto() && right.isAuto()));
int leftValue = 0;
@@ -2002,7 +2026,7 @@ void RenderBox::calcAbsoluteHorizontalValues(Length width, const RenderBoxModelO
if (marginLeft.isAuto() && marginRight.isAuto()) {
// Both margins auto, solve for equality
if (availableSpace >= 0) {
- marginLeftValue = availableSpace / 2; // split the diference
+ marginLeftValue = availableSpace / 2; // split the difference
marginRightValue = availableSpace - marginLeftValue; // account for odd valued differences
} else {
// see FIXME 1
@@ -2287,7 +2311,7 @@ void RenderBox::calcAbsoluteVerticalValues(Length h, const RenderBoxModelObject*
if (marginTop.isAuto() && marginBottom.isAuto()) {
// Both margins auto, solve for equality
// NOTE: This may result in negative values.
- marginTopValue = availableSpace / 2; // split the diference
+ marginTopValue = availableSpace / 2; // split the difference
marginBottomValue = availableSpace - marginTopValue; // account for odd valued differences
} else if (marginTop.isAuto()) {
// Solve for top margin
@@ -2365,7 +2389,7 @@ void RenderBox::calcAbsoluteVerticalValues(Length h, const RenderBoxModelObject*
void RenderBox::calcAbsoluteHorizontalReplaced()
{
// The following is based off of the W3C Working Draft from April 11, 2006 of
- // CSS 2.1: Section 10.3.8 "Absolutly positioned, replaced elements"
+ // CSS 2.1: Section 10.3.8 "Absolutely positioned, replaced elements"
// <http://www.w3.org/TR/2005/WD-CSS21-20050613/visudet.html#abs-replaced-width>
// (block-style-comments in this function correspond to text from the spec and
// the numbers correspond to numbers in spec)
@@ -2456,7 +2480,7 @@ void RenderBox::calcAbsoluteHorizontalReplaced()
int difference = availableSpace - (leftValue + rightValue);
if (difference > 0) {
- m_marginLeft = difference / 2; // split the diference
+ m_marginLeft = difference / 2; // split the difference
m_marginRight = difference - m_marginLeft; // account for odd valued differences
} else {
// see FIXME 1
@@ -2543,7 +2567,7 @@ void RenderBox::calcAbsoluteHorizontalReplaced()
void RenderBox::calcAbsoluteVerticalReplaced()
{
// The following is based off of the W3C Working Draft from April 11, 2006 of
- // CSS 2.1: Section 10.6.5 "Absolutly positioned, replaced elements"
+ // CSS 2.1: Section 10.6.5 "Absolutely positioned, replaced elements"
// <http://www.w3.org/TR/2005/WD-CSS21-20050613/visudet.html#abs-replaced-height>
// (block-style-comments in this function correspond to text from the spec and
// the numbers correspond to numbers in spec)
@@ -2607,7 +2631,7 @@ void RenderBox::calcAbsoluteVerticalReplaced()
int bottomValue = 0;
if (marginTop.isAuto() && marginBottom.isAuto()) {
- // 'top' and 'bottom' cannot be 'auto' due to step 2 and 3 combinded.
+ // 'top' and 'bottom' cannot be 'auto' due to step 2 and 3 combined.
ASSERT(!(top.isAuto() || bottom.isAuto()));
topValue = top.calcValue(containerHeight);
diff --git a/WebCore/rendering/RenderBox.h b/WebCore/rendering/RenderBox.h
index c579123..11c65e8 100644
--- a/WebCore/rendering/RenderBox.h
+++ b/WebCore/rendering/RenderBox.h
@@ -74,7 +74,7 @@ public:
// Bounds of the outline box in absolute coords. Respects transforms
virtual IntRect outlineBoundsForRepaint(RenderBoxModelObject* /*repaintContainer*/) const;
- virtual void addFocusRingRects(GraphicsContext*, int tx, int ty);
+ virtual void addFocusRingRects(Vector<IntRect>&, int tx, int ty);
// Use this with caution! No type checking is done!
RenderBox* previousSiblingBox() const;
@@ -305,8 +305,8 @@ protected:
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
virtual void updateBoxModelInfoFromStyle();
- void paintFillLayer(const PaintInfo&, const Color&, const FillLayer*, int tx, int ty, int width, int height, CompositeOperator = CompositeSourceOver);
- void paintFillLayers(const PaintInfo&, const Color&, const FillLayer*, int tx, int ty, int width, int height, CompositeOperator = CompositeSourceOver);
+ void paintFillLayer(const PaintInfo&, const Color&, const FillLayer*, int tx, int ty, int width, int height, CompositeOperator op, RenderObject* backgroundObject);
+ void paintFillLayers(const PaintInfo&, const Color&, const FillLayer*, int tx, int ty, int width, int height, CompositeOperator = CompositeSourceOver, RenderObject* backgroundObject = 0);
void paintMaskImages(const PaintInfo&, int tx, int ty, int width, int height);
diff --git a/WebCore/rendering/RenderBoxModelObject.cpp b/WebCore/rendering/RenderBoxModelObject.cpp
index 98960e0..f2cd9bd 100644
--- a/WebCore/rendering/RenderBoxModelObject.cpp
+++ b/WebCore/rendering/RenderBoxModelObject.cpp
@@ -33,6 +33,7 @@
#include "RenderInline.h"
#include "RenderLayer.h"
#include "RenderView.h"
+#include <wtf/CurrentTime.h>
using namespace std;
@@ -44,6 +45,140 @@ bool RenderBoxModelObject::s_wasFloating = false;
bool RenderBoxModelObject::s_hadLayer = false;
bool RenderBoxModelObject::s_layerWasSelfPainting = false;
+static const double cInterpolationCutoff = 800. * 800.;
+static const double cLowQualityTimeThreshold = 0.500; // 500 ms
+
+class RenderBoxModelScaleData : public Noncopyable {
+public:
+ RenderBoxModelScaleData(RenderBoxModelObject* object, const IntSize& size, const TransformationMatrix& transform, double time, bool lowQualityScale)
+ : m_size(size)
+ , m_transform(transform)
+ , m_lastPaintTime(time)
+ , m_lowQualityScale(lowQualityScale)
+ , m_highQualityRepaintTimer(object, &RenderBoxModelObject::highQualityRepaintTimerFired)
+ {
+ }
+
+ ~RenderBoxModelScaleData()
+ {
+ m_highQualityRepaintTimer.stop();
+ }
+
+ Timer<RenderBoxModelObject>& hiqhQualityRepaintTimer() { return m_highQualityRepaintTimer; }
+
+ const IntSize& size() const { return m_size; }
+ void setSize(const IntSize& s) { m_size = s; }
+ double lastPaintTime() const { return m_lastPaintTime; }
+ void setLastPaintTime(double t) { m_lastPaintTime = t; }
+ bool useLowQualityScale() const { return m_lowQualityScale; }
+ const TransformationMatrix& transform() const { return m_transform; }
+ void setTransform(const TransformationMatrix& transform) { m_transform = transform; }
+ void setUseLowQualityScale(bool b)
+ {
+ m_highQualityRepaintTimer.stop();
+ m_lowQualityScale = b;
+ if (b)
+ m_highQualityRepaintTimer.startOneShot(cLowQualityTimeThreshold);
+ }
+
+private:
+ IntSize m_size;
+ TransformationMatrix m_transform;
+ double m_lastPaintTime;
+ bool m_lowQualityScale;
+ Timer<RenderBoxModelObject> m_highQualityRepaintTimer;
+};
+
+class RenderBoxModelScaleObserver {
+public:
+ static bool shouldPaintBackgroundAtLowQuality(GraphicsContext*, RenderBoxModelObject*, Image*, const IntSize&);
+
+ static void boxModelObjectDestroyed(RenderBoxModelObject* object)
+ {
+ if (gBoxModelObjects) {
+ RenderBoxModelScaleData* data = gBoxModelObjects->take(object);
+ delete data;
+ if (!gBoxModelObjects->size()) {
+ delete gBoxModelObjects;
+ gBoxModelObjects = 0;
+ }
+ }
+ }
+
+ static void highQualityRepaintTimerFired(RenderBoxModelObject* object)
+ {
+ RenderBoxModelScaleObserver::boxModelObjectDestroyed(object);
+ object->repaint();
+ }
+
+ static HashMap<RenderBoxModelObject*, RenderBoxModelScaleData*>* gBoxModelObjects;
+};
+
+bool RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality(GraphicsContext* context, RenderBoxModelObject* object, Image* image, const IntSize& size)
+{
+ // If the image is not a bitmap image, then none of this is relevant and we just paint at high
+ // quality.
+ if (!image->isBitmapImage())
+ return false;
+
+ // Make sure to use the unzoomed image size, since if a full page zoom is in effect, the image
+ // is actually being scaled.
+ IntSize imageSize(image->width(), image->height());
+
+ // Look ourselves up in the hashtable.
+ RenderBoxModelScaleData* data = 0;
+ if (gBoxModelObjects)
+ data = gBoxModelObjects->get(object);
+
+ const TransformationMatrix& currentTransform = context->getCTM();
+ bool contextIsScaled = !currentTransform.isIdentityOrTranslation();
+ if (!contextIsScaled && imageSize == size) {
+ // There is no scale in effect. If we had a scale in effect before, we can just delete this data.
+ if (data) {
+ gBoxModelObjects->remove(object);
+ delete data;
+ }
+ return false;
+ }
+
+ // There is no need to hash scaled images that always use low quality mode when the page demands it. This is the iChat case.
+ if (object->document()->page()->inLowQualityImageInterpolationMode()) {
+ double totalPixels = static_cast<double>(image->width()) * static_cast<double>(image->height());
+ if (totalPixels > cInterpolationCutoff)
+ return true;
+ }
+
+ // If there is no data yet, we will paint the first scale at high quality and record the paint time in case a second scale happens
+ // very soon.
+ if (!data) {
+ data = new RenderBoxModelScaleData(object, size, currentTransform, currentTime(), false);
+ if (!gBoxModelObjects)
+ gBoxModelObjects = new HashMap<RenderBoxModelObject*, RenderBoxModelScaleData*>;
+ gBoxModelObjects->set(object, data);
+ return false;
+ }
+
+ // We are scaled, but we painted already at this size, so just keep using whatever mode we last painted with.
+ if ((!contextIsScaled || data->transform() == currentTransform) && data->size() == size)
+ return data->useLowQualityScale();
+
+ // We have data and our size just changed. If this change happened quickly, go into low quality mode and then set a repaint
+ // timer to paint in high quality mode. Otherwise it is ok to just paint in high quality mode.
+ double newTime = currentTime();
+ data->setUseLowQualityScale(newTime - data->lastPaintTime() < cLowQualityTimeThreshold);
+ data->setLastPaintTime(newTime);
+ data->setTransform(currentTransform);
+ data->setSize(size);
+ return data->useLowQualityScale();
+}
+
+HashMap<RenderBoxModelObject*, RenderBoxModelScaleData*>* RenderBoxModelScaleObserver::gBoxModelObjects = 0;
+
+void RenderBoxModelObject::highQualityRepaintTimerFired(Timer<RenderBoxModelObject>*)
+{
+ RenderBoxModelScaleObserver::highQualityRepaintTimerFired(this);
+}
+
RenderBoxModelObject::RenderBoxModelObject(Node* node)
: RenderObject(node)
, m_layer(0)
@@ -55,6 +190,7 @@ RenderBoxModelObject::~RenderBoxModelObject()
// Our layer should have been destroyed and cleared by now
ASSERT(!hasLayer());
ASSERT(!m_layer);
+ RenderBoxModelScaleObserver::boxModelObjectDestroyed(this);
}
void RenderBoxModelObject::destroyLayer()
@@ -304,9 +440,12 @@ int RenderBoxModelObject::paddingRight(bool) const
}
-void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, const Color& c, const FillLayer* bgLayer, int tx, int ty, int w, int h, InlineFlowBox* box, CompositeOperator op)
+void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, const Color& c, const FillLayer* bgLayer, int tx, int ty, int w, int h, InlineFlowBox* box, CompositeOperator op, RenderObject* backgroundObject)
{
GraphicsContext* context = paintInfo.context;
+ if (context->paintingDisabled())
+ return;
+
bool includeLeftEdge = box ? box->includeLeftEdge() : true;
bool includeRightEdge = box ? box->includeRightEdge() : true;
int bLeft = includeLeftEdge ? borderLeft() : 0;
@@ -463,21 +602,10 @@ void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, co
if (!destRect.isEmpty()) {
phase += destRect.location() - destOrigin;
CompositeOperator compositeOp = op == CompositeSourceOver ? bgLayer->composite() : op;
- RenderObject* clientForBackgroundImage = this;
- // Check if this is the root element painting a background layer propagated from <body>,
- // and pass the body's renderer as the client in that case.
- if (isRoot && !style()->hasBackground()) {
- ASSERT(node()->hasTagName(htmlTag));
- HTMLElement* body = document()->body();
- ASSERT(body);
- ASSERT(body->hasLocalName(bodyTag));
- ASSERT(body->renderer());
- if (body) {
- if (RenderObject* bodyRenderer = body->renderer())
- clientForBackgroundImage = bodyRenderer;
- }
- }
- context->drawTiledImage(bg->image(clientForBackgroundImage, tileSize), style()->colorSpace(), destRect, phase, tileSize, compositeOp);
+ RenderObject* clientForBackgroundImage = backgroundObject ? backgroundObject : this;
+ Image* image = bg->image(clientForBackgroundImage, tileSize);
+ bool useLowQualityScaling = RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality(context, this, image, destRect.size());
+ context->drawTiledImage(image, style()->colorSpace(), destRect, phase, tileSize, compositeOp, useLowQualityScaling);
}
}
@@ -557,6 +685,17 @@ void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* fil
// Determine the background positioning area and set destRect to the background painting area.
// destRect will be adjusted later if the background is non-repeating.
bool fixedAttachment = fillLayer->attachment() == FixedBackgroundAttachment;
+
+#if ENABLE(FAST_MOBILE_SCROLLING)
+ if (view()->frameView() && view()->frameView()->canBlitOnScroll()) {
+ // As a side effect of an optimization to blit on scroll, we do not honor the CSS
+ // property "background-attachment: fixed" because it may result in rendering
+ // artifacts. Note, these artifacts only appear if we are blitting on scroll of
+ // a page that has fixed background images.
+ fixedAttachment = false;
+ }
+#endif
+
if (!fixedAttachment) {
destRect = IntRect(tx, ty, w, h);
diff --git a/WebCore/rendering/RenderBoxModelObject.h b/WebCore/rendering/RenderBoxModelObject.h
index c9a4a0a..db7538d 100644
--- a/WebCore/rendering/RenderBoxModelObject.h
+++ b/WebCore/rendering/RenderBoxModelObject.h
@@ -90,7 +90,7 @@ public:
void paintBorder(GraphicsContext*, int tx, int ty, int w, int h, const RenderStyle*, bool begin = true, bool end = true);
bool paintNinePieceImage(GraphicsContext*, int tx, int ty, int w, int h, const RenderStyle*, const NinePieceImage&, CompositeOperator = CompositeSourceOver);
void paintBoxShadow(GraphicsContext*, int tx, int ty, int w, int h, const RenderStyle*, ShadowStyle, bool begin = true, bool end = true);
- void paintFillLayerExtended(const PaintInfo&, const Color&, const FillLayer*, int tx, int ty, int width, int height, InlineFlowBox* = 0, CompositeOperator = CompositeSourceOver);
+ void paintFillLayerExtended(const PaintInfo&, const Color&, const FillLayer*, int tx, int ty, int width, int height, InlineFlowBox* = 0, CompositeOperator = CompositeSourceOver, RenderObject* backgroundObject = 0);
// The difference between this inline's baseline position and the line's baseline position.
int verticalPosition(bool firstLine) const;
@@ -98,6 +98,8 @@ public:
// Called by RenderObject::destroy() (and RenderWidget::destroy()) and is the only way layers should ever be destroyed
void destroyLayer();
+ void highQualityRepaintTimerFired(Timer<RenderBoxModelObject>*);
+
protected:
void calculateBackgroundImageGeometry(const FillLayer*, int tx, int ty, int w, int h, IntRect& destRect, IntPoint& phase, IntSize& tileSize);
diff --git a/WebCore/rendering/RenderCounter.cpp b/WebCore/rendering/RenderCounter.cpp
index b0aefc5..46bf9f4 100644
--- a/WebCore/rendering/RenderCounter.cpp
+++ b/WebCore/rendering/RenderCounter.cpp
@@ -38,7 +38,7 @@ using namespace HTMLNames;
typedef HashMap<RefPtr<AtomicStringImpl>, CounterNode*> CounterMap;
typedef HashMap<const RenderObject*, CounterMap*> CounterMaps;
-static CounterNode* makeCounterNode(RenderObject*, const AtomicString& counterName, bool alwaysCreateCounter);
+static CounterNode* makeCounterNode(RenderObject*, const AtomicString& identifier, bool alwaysCreateCounter);
static CounterMaps& counterMaps()
{
@@ -53,7 +53,7 @@ static inline RenderObject* previousSiblingOrParent(RenderObject* object)
return object->parent();
}
-static bool planCounter(RenderObject* object, const AtomicString& counterName, bool& isReset, int& value)
+static bool planCounter(RenderObject* object, const AtomicString& identifier, bool& isReset, int& value)
{
ASSERT(object);
@@ -66,7 +66,7 @@ static bool planCounter(RenderObject* object, const AtomicString& counterName, b
ASSERT(style);
if (const CounterDirectiveMap* directivesMap = style->counterDirectives()) {
- CounterDirectives directives = directivesMap->get(counterName.impl());
+ CounterDirectives directives = directivesMap->get(identifier.impl());
if (directives.m_reset) {
value = directives.m_resetValue;
if (directives.m_increment)
@@ -81,7 +81,7 @@ static bool planCounter(RenderObject* object, const AtomicString& counterName, b
}
}
- if (counterName == "list-item") {
+ if (identifier == "list-item") {
if (object->isListItem()) {
if (toRenderListItem(object)->hasExplicitValue()) {
value = toRenderListItem(object)->explicitValue();
@@ -142,7 +142,7 @@ static bool findPlaceForCounter(RenderObject* counterOwner, const AtomicString&
if (currentCounter) {
// We have a suitable counter on the EndSearchRenderer.
if (previousSibling) { // But we already found another counter that we come after.
- if (currentCounter->isReset()) {
+ if (currentCounter->actsAsReset()) {
// We found a reset counter that is on a renderer that is a sibling of ours or a parent.
if (isReset && currentRenderer->parent() == counterOwner->parent()) {
// We are also a reset counter and the previous reset was on a sibling renderer
@@ -171,7 +171,7 @@ static bool findPlaceForCounter(RenderObject* counterOwner, const AtomicString&
// In this case we follow pretty much the same logic as above but no ASSERTs about
// previousSibling, and when we are a sibling of the end counter we must set previousSibling
// to currentCounter.
- if (currentCounter->isReset()) {
+ if (currentCounter->actsAsReset()) {
if (isReset && currentRenderer->parent() == counterOwner->parent()) {
parent = currentCounter->parent();
previousSibling = currentCounter;
@@ -201,7 +201,7 @@ static bool findPlaceForCounter(RenderObject* counterOwner, const AtomicString&
if (previousSibling) {
// Since we had a suitable previous counter before, we should only consider this one as our
// previousSibling if it is a reset counter and hence the current previousSibling is its child.
- if (currentCounter->isReset()) {
+ if (currentCounter->actsAsReset()) {
previousSibling = currentCounter;
// We are no longer interested in previous siblings of the currentRenderer or their children
// as counters they may have attached cannot be the previous sibling of the counter we are placing.
@@ -226,31 +226,25 @@ static bool findPlaceForCounter(RenderObject* counterOwner, const AtomicString&
return false;
}
-static CounterNode* makeCounterNode(RenderObject* object, const AtomicString& counterName, bool alwaysCreateCounter)
+static CounterNode* makeCounterNode(RenderObject* object, const AtomicString& identifier, bool alwaysCreateCounter)
{
ASSERT(object);
if (object->m_hasCounterNodeMap)
if (CounterMap* nodeMap = counterMaps().get(object))
- if (CounterNode* node = nodeMap->get(counterName.impl()))
+ if (CounterNode* node = nodeMap->get(identifier.impl()))
return node;
bool isReset = false;
int value = 0;
- if (!planCounter(object, counterName, isReset, value) && !alwaysCreateCounter)
+ if (!planCounter(object, identifier, isReset, value) && !alwaysCreateCounter)
return 0;
CounterNode* newParent = 0;
CounterNode* newPreviousSibling = 0;
- CounterNode* newNode;
- if (findPlaceForCounter(object, counterName, isReset, newParent, newPreviousSibling)) {
- newNode = new CounterNode(object, isReset, value);
- newParent->insertAfter(newNode, newPreviousSibling, counterName);
- } else {
- // Make a reset node for counters that aren't inside an existing reset node.
- newNode = new CounterNode(object, true, value);
- }
-
+ CounterNode* newNode = new CounterNode(object, isReset, value);
+ if (findPlaceForCounter(object, identifier, isReset, newParent, newPreviousSibling))
+ newParent->insertAfter(newNode, newPreviousSibling, identifier);
CounterMap* nodeMap;
if (object->m_hasCounterNodeMap)
nodeMap = counterMaps().get(object);
@@ -259,8 +253,30 @@ static CounterNode* makeCounterNode(RenderObject* object, const AtomicString& co
counterMaps().set(object, nodeMap);
object->m_hasCounterNodeMap = true;
}
- nodeMap->set(counterName.impl(), newNode);
-
+ nodeMap->set(identifier.impl(), newNode);
+ if (newNode->parent() || !object->nextInPreOrder(object->parent()))
+ return newNode;
+ // Checking if some nodes that were previously counter tree root nodes
+ // should become children of this node now.
+ CounterMaps& maps = counterMaps();
+ RenderObject* stayWithin = object->parent();
+ for (RenderObject* currentRenderer = object->nextInPreOrder(stayWithin); currentRenderer; currentRenderer = currentRenderer->nextInPreOrder(stayWithin)) {
+ if (!currentRenderer->m_hasCounterNodeMap)
+ continue;
+ CounterNode* currentCounter = maps.get(currentRenderer)->get(identifier.impl());
+ if (!currentCounter)
+ continue;
+ if (currentCounter->parent()) {
+ ASSERT(newNode->firstChild());
+ if (currentRenderer->lastChild())
+ currentRenderer = currentRenderer->lastChild();
+ continue;
+ }
+ if (stayWithin != currentRenderer->parent() || !currentCounter->hasResetType())
+ newNode->insertAfter(currentCounter, newNode->lastChild(), identifier);
+ if (currentRenderer->lastChild())
+ currentRenderer = currentRenderer->lastChild();
+ }
return newNode;
}
@@ -290,12 +306,12 @@ PassRefPtr<StringImpl> RenderCounter::originalText() const
m_counterNode = makeCounterNode(parent(), m_counter.identifier(), true);
CounterNode* child = m_counterNode;
- int value = child->isReset() ? child->value() : child->countInParent();
+ int value = child->actsAsReset() ? child->value() : child->countInParent();
String text = listMarkerText(m_counter.listStyle(), value);
if (!m_counter.separator().isNull()) {
- if (!child->isReset())
+ if (!child->actsAsReset())
child = child->parent();
while (CounterNode* parent = child->parent()) {
text = listMarkerText(m_counter.listStyle(), child->countInParent())
@@ -321,7 +337,7 @@ void RenderCounter::invalidate(const AtomicString& identifier)
setNeedsLayoutAndPrefWidthsRecalc();
}
-static void destroyCounterNodeChildren(const AtomicString& identifier, CounterNode* node)
+static void destroyCounterNodeWithoutMapRemoval(const AtomicString& identifier, CounterNode* node)
{
CounterNode* previous;
for (CounterNode* child = node->lastDescendant(); child && child != node; child = previous) {
@@ -336,27 +352,132 @@ static void destroyCounterNodeChildren(const AtomicString& identifier, CounterNo
}
delete child;
}
+ RenderObject* renderer = node->renderer();
+ if (!renderer->documentBeingDestroyed()) {
+ if (RenderObjectChildList* children = renderer->virtualChildren())
+ children->invalidateCounters(renderer, identifier);
+ }
+ if (CounterNode* parent = node->parent())
+ parent->removeChild(node, identifier);
+ delete node;
}
-void RenderCounter::destroyCounterNodes(RenderObject* object)
+void RenderCounter::destroyCounterNodes(RenderObject* renderer)
{
CounterMaps& maps = counterMaps();
- CounterMap* map = maps.get(object);
- if (!map)
+ CounterMaps::iterator mapsIterator = maps.find(renderer);
+ if (mapsIterator == maps.end())
return;
- maps.remove(object);
-
+ CounterMap* map = mapsIterator->second;
CounterMap::const_iterator end = map->end();
for (CounterMap::const_iterator it = map->begin(); it != end; ++it) {
- CounterNode* node = it->second;
AtomicString identifier(it->first.get());
- destroyCounterNodeChildren(identifier, node);
- if (CounterNode* parent = node->parent())
- parent->removeChild(node, identifier);
- delete node;
+ destroyCounterNodeWithoutMapRemoval(identifier, it->second);
}
-
+ maps.remove(mapsIterator);
delete map;
+ renderer->m_hasCounterNodeMap = false;
+}
+
+void RenderCounter::destroyCounterNode(RenderObject* renderer, const AtomicString& identifier)
+{
+ CounterMap* map = counterMaps().get(renderer);
+ if (!map)
+ return;
+ CounterMap::iterator mapIterator = map->find(identifier.impl());
+ if (mapIterator == map->end())
+ return;
+ destroyCounterNodeWithoutMapRemoval(identifier, mapIterator->second);
+ map->remove(mapIterator);
+ // We do not delete "map" here even if empty because we expect to reuse
+ // it soon. In order for a renderer to lose all its counters permanently,
+ // a style change for the renderer involving removal of all counter
+ // directives must occur, in which case, RenderCounter::destroyCounterNodes()
+ // must be called.
+ // The destruction of the Renderer (possibly caused by the removal of its
+ // associated DOM node) is the other case that leads to the permanent
+ // destruction of all counters attached to a Renderer. In this case
+ // RenderCounter::destroyCounterNodes() must be and is now called, too.
+ // RenderCounter::destroyCounterNodes() handles destruction of the counter
+ // map associated with a renderer, so there is no risk in leaking the map.
+}
+
+static void updateCounters(RenderObject* renderer)
+{
+ ASSERT(renderer->style());
+ const CounterDirectiveMap* directiveMap = renderer->style()->counterDirectives();
+ if (!directiveMap)
+ return;
+ CounterDirectiveMap::const_iterator end = directiveMap->end();
+ if (!renderer->m_hasCounterNodeMap) {
+ for (CounterDirectiveMap::const_iterator it = directiveMap->begin(); it != end; ++it)
+ makeCounterNode(renderer, AtomicString(it->first.get()), false);
+ return;
+ }
+ CounterMap* counterMap = counterMaps().get(renderer);
+ ASSERT(counterMap);
+ for (CounterDirectiveMap::const_iterator it = directiveMap->begin(); it != end; ++it) {
+ CounterNode* node = counterMap->get(it->first.get());
+ if (!node) {
+ makeCounterNode(renderer, AtomicString(it->first.get()), false);
+ continue;
+ }
+ CounterNode* newParent = 0;
+ CounterNode* newPreviousSibling;
+ findPlaceForCounter(renderer, AtomicString(it->first.get()), node->hasResetType(), newParent, newPreviousSibling);
+ CounterNode* parent = node->parent();
+ if (newParent == parent && newPreviousSibling == node->previousSibling())
+ continue;
+ if (parent)
+ parent->removeChild(node, it->first.get());
+ newParent->insertAfter(node, newPreviousSibling, it->first.get());
+ }
+}
+
+void RenderCounter::rendererSubtreeAttached(RenderObject* renderer)
+{
+ for (RenderObject* descendant = renderer; descendant; descendant = descendant->nextInPreOrder(renderer))
+ updateCounters(descendant);
+}
+
+void RenderCounter::rendererStyleChanged(RenderObject* renderer, const RenderStyle* oldStyle, const RenderStyle* newStyle)
+{
+ const CounterDirectiveMap* newCounterDirectives;
+ const CounterDirectiveMap* oldCounterDirectives;
+ if (oldStyle && (oldCounterDirectives = oldStyle->counterDirectives())) {
+ if (newStyle && (newCounterDirectives = newStyle->counterDirectives())) {
+ CounterDirectiveMap::const_iterator newMapEnd = newCounterDirectives->end();
+ CounterDirectiveMap::const_iterator oldMapEnd = oldCounterDirectives->end();
+ for (CounterDirectiveMap::const_iterator it = newCounterDirectives->begin(); it != newMapEnd; ++it) {
+ CounterDirectiveMap::const_iterator oldMapIt = oldCounterDirectives->find(it->first);
+ if (oldMapIt != oldMapEnd) {
+ if (oldMapIt->second == it->second)
+ continue;
+ RenderCounter::destroyCounterNode(renderer, it->first.get());
+ }
+ // We must create this node here, because the changed node may be a node with no display such as
+ // as those created by the increment or reset directives and the re-layout that will happen will
+ // not catch the change if the node had no children.
+ makeCounterNode(renderer, it->first.get(), false);
+ }
+ // Destroying old counters that do not exist in the new counterDirective map.
+ for (CounterDirectiveMap::const_iterator it = oldCounterDirectives->begin(); it !=oldMapEnd; ++it) {
+ if (!newCounterDirectives->contains(it->first))
+ RenderCounter::destroyCounterNode(renderer, it->first.get());
+ }
+ } else {
+ if (renderer->m_hasCounterNodeMap)
+ RenderCounter::destroyCounterNodes(renderer);
+ }
+ } else if (newStyle && (newCounterDirectives = newStyle->counterDirectives())) {
+ CounterDirectiveMap::const_iterator newMapEnd = newCounterDirectives->end();
+ for (CounterDirectiveMap::const_iterator it = newCounterDirectives->begin(); it != newMapEnd; ++it) {
+ // We must create this node here, because the added node may be a node with no display such as
+ // as those created by the increment or reset directives and the re-layout that will happen will
+ // not catch the change if the node had no children.
+ makeCounterNode(renderer, it->first.get(), false);
+ }
+ }
}
} // namespace WebCore
diff --git a/WebCore/rendering/RenderCounter.h b/WebCore/rendering/RenderCounter.h
index 356f1bd..10ba1dc 100644
--- a/WebCore/rendering/RenderCounter.h
+++ b/WebCore/rendering/RenderCounter.h
@@ -40,6 +40,9 @@ public:
void invalidate(const AtomicString& identifier);
static void destroyCounterNodes(RenderObject*);
+ static void destroyCounterNode(RenderObject*, const AtomicString& identifier);
+ static void rendererSubtreeAttached(RenderObject*);
+ static void rendererStyleChanged(RenderObject*, const RenderStyle* oldStyle, const RenderStyle* newStyle);
private:
virtual const char* renderName() const;
diff --git a/WebCore/rendering/RenderEmbeddedObject.cpp b/WebCore/rendering/RenderEmbeddedObject.cpp
new file mode 100644
index 0000000..db32808
--- /dev/null
+++ b/WebCore/rendering/RenderEmbeddedObject.cpp
@@ -0,0 +1,352 @@
+/*
+ * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
+ * (C) 2000 Simon Hausmann <hausmann@kde.org>
+ * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
+ * 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
+ * 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 "RenderEmbeddedObject.h"
+
+#include "Frame.h"
+#include "FrameLoaderClient.h"
+#include "HTMLEmbedElement.h"
+#include "HTMLIFrameElement.h"
+#include "HTMLNames.h"
+#include "HTMLObjectElement.h"
+#include "HTMLParamElement.h"
+#include "MIMETypeRegistry.h"
+#include "Page.h"
+#include "PluginWidget.h"
+#include "RenderView.h"
+#include "RenderWidgetProtector.h"
+#include "Text.h"
+
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+#include "HTMLVideoElement.h"
+#endif
+
+#if USE(ACCELERATED_COMPOSITING)
+#include "PluginWidget.h"
+#endif
+
+namespace WebCore {
+
+using namespace HTMLNames;
+
+RenderEmbeddedObject::RenderEmbeddedObject(Element* element)
+ : RenderPartObject(element)
+{
+ view()->frameView()->setIsVisuallyNonEmpty();
+}
+
+RenderEmbeddedObject::~RenderEmbeddedObject()
+{
+ if (frameView())
+ frameView()->removeWidgetToUpdate(this);
+}
+
+#if USE(ACCELERATED_COMPOSITING)
+bool RenderEmbeddedObject::requiresLayer() const
+{
+ if (RenderPartObject::requiresLayer())
+ return true;
+
+ return allowsAcceleratedCompositing();
+}
+
+bool RenderEmbeddedObject::allowsAcceleratedCompositing() const
+{
+ return widget() && widget()->isPluginWidget() && static_cast<PluginWidget*>(widget())->platformLayer();
+}
+#endif
+
+static bool isURLAllowed(Document* doc, const String& url)
+{
+ if (doc->frame()->page()->frameCount() >= 200)
+ return false;
+
+ // We allow one level of self-reference because some sites depend on that.
+ // But we don't allow more than one.
+ KURL completeURL = doc->completeURL(url);
+ bool foundSelfReference = false;
+ for (Frame* frame = doc->frame(); frame; frame = frame->tree()->parent()) {
+ if (equalIgnoringFragmentIdentifier(frame->loader()->url(), completeURL)) {
+ if (foundSelfReference)
+ return false;
+ foundSelfReference = true;
+ }
+ }
+ return true;
+}
+
+typedef HashMap<String, String, CaseFoldingHash> ClassIdToTypeMap;
+
+static ClassIdToTypeMap* createClassIdToTypeMap()
+{
+ ClassIdToTypeMap* map = new ClassIdToTypeMap;
+ map->add("clsid:D27CDB6E-AE6D-11CF-96B8-444553540000", "application/x-shockwave-flash");
+ map->add("clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA", "audio/x-pn-realaudio-plugin");
+ map->add("clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B", "video/quicktime");
+ map->add("clsid:166B1BCA-3F9C-11CF-8075-444553540000", "application/x-director");
+ map->add("clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6", "application/x-mplayer2");
+ map->add("clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95", "application/x-mplayer2");
+ return map;
+}
+
+static String serviceTypeForClassId(const String& classId)
+{
+ // Return early if classId is empty (since we won't do anything below).
+ // Furthermore, if classId is null, calling get() below will crash.
+ if (classId.isEmpty())
+ return String();
+
+ static ClassIdToTypeMap* map = createClassIdToTypeMap();
+ return map->get(classId);
+}
+
+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
+ // require "src" attribute).
+ int srcIndex = -1, dataIndex = -1;
+ for (unsigned int i = 0; i < paramNames->size(); ++i) {
+ if (equalIgnoringCase((*paramNames)[i], "src"))
+ srcIndex = i;
+ else if (equalIgnoringCase((*paramNames)[i], "data"))
+ dataIndex = i;
+ }
+
+ if (srcIndex == -1 && dataIndex != -1) {
+ paramNames->append("src");
+ paramValues->append((*paramValues)[dataIndex]);
+ }
+}
+
+void RenderEmbeddedObject::updateWidget(bool onlyCreateNonNetscapePlugins)
+{
+ String url;
+ String serviceType;
+ Vector<String> paramNames;
+ Vector<String> paramValues;
+ Frame* frame = frameView()->frame();
+
+ // The calls to FrameLoader::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());
+
+ objectElement->setNeedWidgetUpdate(false);
+ if (!objectElement->isFinishedParsingChildren())
+ return;
+
+ // 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;
+ }
+
+ 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();
+ int pos = serviceType.find(";");
+ if (pos != -1)
+ serviceType = serviceType.left(pos);
+ }
+ if (!embed && !name.isEmpty()) {
+ uniqueParamNames.add(name.impl());
+ paramNames.append(p->name());
+ paramValues.append(p->value());
+ }
+ }
+ 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());
+ }
+ }
+ }
+
+ 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 (!isURLAllowed(document(), url))
+ 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;
+ }
+
+ if (onlyCreateNonNetscapePlugins) {
+ KURL completedURL;
+ if (!url.isEmpty())
+ completedURL = frame->loader()->completeURL(url);
+
+ if (frame->loader()->client()->objectContentType(completedURL, serviceType) == ObjectContentNetscapePlugin)
+ return;
+ }
+
+ bool success = objectElement->dispatchBeforeLoadEvent(url) && frame->loader()->requestObject(this, url, objectElement->getAttribute(nameAttr), serviceType, paramNames, paramValues);
+ if (!success && m_hasFallbackContent)
+ objectElement->renderFallbackContent();
+
+ } else if (node()->hasTagName(embedTag)) {
+ HTMLEmbedElement* embedElement = static_cast<HTMLEmbedElement*>(node());
+ embedElement->setNeedWidgetUpdate(false);
+ url = embedElement->url();
+ serviceType = embedElement->serviceType();
+
+ if (url.isEmpty() && serviceType.isEmpty())
+ return;
+ if (!isURLAllowed(document(), url))
+ return;
+
+ // 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());
+ }
+ }
+
+ if (onlyCreateNonNetscapePlugins) {
+ KURL completedURL;
+ if (!url.isEmpty())
+ completedURL = frame->loader()->completeURL(url);
+
+ if (frame->loader()->client()->objectContentType(completedURL, serviceType) == ObjectContentNetscapePlugin)
+ return;
+ }
+
+ if (embedElement->dispatchBeforeLoadEvent(url))
+ frame->loader()->requestObject(this, url, embedElement->getAttribute(nameAttr), serviceType, paramNames, paramValues);
+ }
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ else if (node()->hasTagName(videoTag) || node()->hasTagName(audioTag)) {
+ HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(node());
+
+ mediaElement->setNeedWidgetUpdate(false);
+ if (node()->hasTagName(videoTag)) {
+ HTMLVideoElement* vid = static_cast<HTMLVideoElement*>(node());
+ String poster = vid->poster();
+ if (!poster.isEmpty()) {
+ paramNames.append("_media_element_poster_");
+ paramValues.append(poster);
+ }
+ }
+
+ url = mediaElement->initialURL();
+ if (!url.isEmpty()) {
+ paramNames.append("_media_element_src_");
+ paramValues.append(url);
+ }
+
+ serviceType = "application/x-media-element-proxy-plugin";
+
+ if (mediaElement->dispatchBeforeLoadEvent(url))
+ frame->loader()->requestObject(this, url, nullAtom, serviceType, paramNames, paramValues);
+ }
+#endif
+}
+
+void RenderEmbeddedObject::layout()
+{
+ ASSERT(needsLayout());
+
+ calcWidth();
+ calcHeight();
+
+ RenderPart::layout();
+
+ m_overflow.clear();
+ addShadowOverflow();
+
+ if (!widget() && frameView())
+ frameView()->addWidgetToUpdate(this);
+
+ setNeedsLayout(false);
+}
+
+}
diff --git a/WebCore/rendering/RenderEmbeddedObject.h b/WebCore/rendering/RenderEmbeddedObject.h
new file mode 100644
index 0000000..bdaea92
--- /dev/null
+++ b/WebCore/rendering/RenderEmbeddedObject.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
+ * (C) 2000 Simon Hausmann <hausmann@kde.org>
+ * 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
+ * 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 RenderEmbeddedObject_h
+#define RenderEmbeddedObject_h
+
+#include "RenderPartObject.h"
+
+namespace WebCore {
+
+// Renderer for embeds and objects.
+class RenderEmbeddedObject : public RenderPartObject {
+public:
+ RenderEmbeddedObject(Element*);
+ virtual ~RenderEmbeddedObject();
+
+ void updateWidget(bool onlyCreateNonNetscapePlugins);
+
+#if USE(ACCELERATED_COMPOSITING)
+ virtual bool allowsAcceleratedCompositing() const;
+#endif
+
+private:
+ virtual const char* renderName() const { return "RenderEmbeddedObject"; }
+ virtual bool isEmbeddedObject() const { return true; }
+
+#if USE(ACCELERATED_COMPOSITING)
+ virtual bool requiresLayer() const;
+#endif
+
+ virtual void layout();
+};
+
+inline RenderEmbeddedObject* toRenderEmbeddedObject(RenderObject* object)
+{
+ ASSERT(!object || !strcmp(object->renderName(), "RenderEmbeddedObject"));
+ return static_cast<RenderEmbeddedObject*>(object);
+}
+
+// This will catch anyone doing an unnecessary cast.
+void toRenderEmbeddedObject(const RenderEmbeddedObject*);
+
+} // namespace WebCore
+
+#endif // RenderEmbeddedObject_h
diff --git a/WebCore/rendering/RenderFileUploadControl.cpp b/WebCore/rendering/RenderFileUploadControl.cpp
index 37ee8fb..59cbacf 100644
--- a/WebCore/rendering/RenderFileUploadControl.cpp
+++ b/WebCore/rendering/RenderFileUploadControl.cpp
@@ -21,6 +21,7 @@
#include "config.h"
#include "RenderFileUploadControl.h"
+#include "Chrome.h"
#include "FileList.h"
#include "Frame.h"
#include "FrameView.h"
@@ -108,6 +109,11 @@ bool RenderFileUploadControl::allowsMultipleFiles()
return !input->getAttribute(multipleAttr).isNull();
}
+String RenderFileUploadControl::acceptTypes()
+{
+ return static_cast<HTMLInputElement*>(node())->accept();
+}
+
void RenderFileUploadControl::click()
{
Frame* frame = node()->document()->frame();
diff --git a/WebCore/rendering/RenderFileUploadControl.h b/WebCore/rendering/RenderFileUploadControl.h
index 72ba308..dcdce4d 100644
--- a/WebCore/rendering/RenderFileUploadControl.h
+++ b/WebCore/rendering/RenderFileUploadControl.h
@@ -49,6 +49,7 @@ public:
String fileTextValue() const;
bool allowsMultipleFiles();
+ String acceptTypes();
private:
virtual const char* renderName() const { return "RenderFileUploadControl"; }
diff --git a/WebCore/rendering/RenderForeignObject.cpp b/WebCore/rendering/RenderForeignObject.cpp
index b15d55c..6597554 100644
--- a/WebCore/rendering/RenderForeignObject.cpp
+++ b/WebCore/rendering/RenderForeignObject.cpp
@@ -84,12 +84,14 @@ FloatRect RenderForeignObject::repaintRectInLocalCoordinates() const
void RenderForeignObject::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& rect, bool fixed)
{
rect = localToParentTransform().mapRect(rect);
+ style()->svgStyle()->inflateForShadow(rect);
RenderBlock::computeRectForRepaint(repaintContainer, rect, fixed);
}
-TransformationMatrix RenderForeignObject::localToParentTransform() const
+const TransformationMatrix& RenderForeignObject::localToParentTransform() const
{
- return localTransform() * translationForAttributes();
+ m_localToParentTransform = localTransform() * translationForAttributes();
+ return m_localToParentTransform;
}
void RenderForeignObject::layout()
@@ -118,6 +120,11 @@ bool RenderForeignObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, int
return false;
}
+void RenderForeignObject::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed , bool useTransforms, TransformState& transformState) const
+{
+ SVGRenderBase::mapLocalToContainer(this, repaintContainer, fixed, useTransforms, transformState);
+}
+
} // namespace WebCore
#endif // ENABLE(SVG) && ENABLE(SVG_FOREIGN_OBJECT)
diff --git a/WebCore/rendering/RenderForeignObject.h b/WebCore/rendering/RenderForeignObject.h
index e014f22..8cb9a55 100644
--- a/WebCore/rendering/RenderForeignObject.h
+++ b/WebCore/rendering/RenderForeignObject.h
@@ -38,25 +38,29 @@ public:
virtual void paint(PaintInfo&, int parentX, int parentY);
- virtual TransformationMatrix localToParentTransform() const;
+ virtual const TransformationMatrix& localToParentTransform() const;
virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed = false);
virtual bool requiresLayer() const { return false; }
virtual void layout();
virtual FloatRect objectBoundingBox() const;
+ virtual FloatRect strokeBoundingBox() const { return borderBoxRect(); }
virtual FloatRect repaintRectInLocalCoordinates() const;
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 bool isSVGForeignObject() const { return true; }
+ virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed , bool useTransforms, TransformState& transformState) const;
+
private:
TransformationMatrix translationForAttributes() const;
virtual TransformationMatrix localTransform() const { return m_localTransform; }
TransformationMatrix m_localTransform;
+ mutable TransformationMatrix m_localToParentTransform;
};
} // namespace WebCore
diff --git a/WebCore/rendering/RenderImage.cpp b/WebCore/rendering/RenderImage.cpp
index d06ca1f..881d0b4 100644
--- a/WebCore/rendering/RenderImage.cpp
+++ b/WebCore/rendering/RenderImage.cpp
@@ -4,7 +4,7 @@
* (C) 2000 Dirk Mueller (mueller@kde.org)
* (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com)
* (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
- * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2003, 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
@@ -26,14 +26,19 @@
#include "config.h"
#include "RenderImage.h"
+#include "Frame.h"
#include "GraphicsContext.h"
+#include "HTMLAreaElement.h"
+#include "HTMLCollection.h"
#include "HTMLImageElement.h"
#include "HTMLInputElement.h"
#include "HTMLMapElement.h"
#include "HTMLNames.h"
#include "HitTestResult.h"
#include "Page.h"
+#include "RenderTheme.h"
#include "RenderView.h"
+#include "SelectionController.h"
#include <wtf/CurrentTime.h>
#include <wtf/UnusedParam.h>
@@ -430,20 +435,77 @@ void RenderImage::paintReplaced(PaintInfo& paintInfo, int tx, int ty)
#endif
IntSize contentSize(cWidth, cHeight);
- bool useLowQualityScaling = RenderImageScaleObserver::shouldImagePaintAtLowQuality(this, contentSize);
IntRect rect(IntPoint(tx + leftBorder + leftPad, ty + topBorder + topPad), contentSize);
- HTMLImageElement* imageElt = (node() && node()->hasTagName(imgTag)) ? static_cast<HTMLImageElement*>(node()) : 0;
- CompositeOperator compositeOperator = imageElt ? imageElt->compositeOperator() : CompositeSourceOver;
- context->drawImage(image(cWidth, cHeight), style()->colorSpace(), rect, compositeOperator, useLowQualityScaling);
+ paintIntoRect(context, rect);
}
}
+void RenderImage::paint(PaintInfo& paintInfo, int tx, int ty)
+{
+ RenderReplaced::paint(paintInfo, tx, ty);
+
+ if (paintInfo.phase == PaintPhaseOutline)
+ paintFocusRings(paintInfo, style());
+}
+
+void RenderImage::paintFocusRings(PaintInfo& paintInfo, const RenderStyle* style)
+{
+ // Don't draw focus rings if printing.
+ if (document()->printing() || !document()->frame()->selection()->isFocusedAndActive())
+ return;
+
+ if (paintInfo.context->paintingDisabled() && !paintInfo.context->updatingControlTints())
+ return;
+
+ HTMLMapElement* mapElement = imageMap();
+ if (!mapElement)
+ return;
+
+ Document* document = mapElement->document();
+ if (!document)
+ return;
+
+ Node* focusedNode = document->focusedNode();
+ if (!focusedNode)
+ return;
+
+ RefPtr<HTMLCollection> areas = mapElement->areas();
+ unsigned numAreas = areas->length();
+
+ // FIXME: Clip the paths to the image bounding box.
+ for (unsigned k = 0; k < numAreas; ++k) {
+ HTMLAreaElement* areaElement = static_cast<HTMLAreaElement*>(areas->item(k));
+ if (focusedNode != areaElement)
+ continue;
+
+ Vector<Path> focusRingPaths;
+ focusRingPaths.append(areaElement->getPath(this));
+ paintInfo.context->drawFocusRing(focusRingPaths, style->outlineWidth(), style->outlineOffset(), style->outlineColor());
+ break;
+ }
+}
+
+void RenderImage::paintIntoRect(GraphicsContext* context, const IntRect& rect)
+{
+ if (!hasImage() || errorOccurred() || rect.width() <= 0 || rect.height() <= 0)
+ return;
+
+ Image* img = 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 = RenderImageScaleObserver::shouldImagePaintAtLowQuality(this, rect.size());
+ context->drawImage(image(rect.width(), rect.height()), style()->colorSpace(), rect, compositeOperator, useLowQualityScaling);
+}
+
int RenderImage::minimumReplacedHeight() const
{
return errorOccurred() ? intrinsicSize().height() : 0;
}
-HTMLMapElement* RenderImage::imageMap()
+HTMLMapElement* RenderImage::imageMap() const
{
HTMLImageElement* i = node() && node()->hasTagName(imgTag) ? static_cast<HTMLImageElement*>(node()) : 0;
return i ? i->document()->getImageMap(i->getAttribute(usemapAttr)) : 0;
diff --git a/WebCore/rendering/RenderImage.h b/WebCore/rendering/RenderImage.h
index 2224412..bc5e2d8 100644
--- a/WebCore/rendering/RenderImage.h
+++ b/WebCore/rendering/RenderImage.h
@@ -3,7 +3,7 @@
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com)
* (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
- * Copyright (C) 2004, 2005, 2006, 2007, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 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
@@ -43,7 +43,7 @@ public:
void setCachedImage(CachedImage*);
CachedImage* cachedImage() const { return m_cachedImage.get(); }
- HTMLMapElement* imageMap();
+ HTMLMapElement* imageMap() const;
void resetAnimation();
@@ -57,6 +57,13 @@ protected:
virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
+ virtual void paintIntoRect(GraphicsContext*, const IntRect&);
+ void paintFocusRings(PaintInfo&, const RenderStyle*);
+ virtual void paint(PaintInfo&, int tx, int ty);
+
+ bool isWidthSpecified() const;
+ bool isHeightSpecified() const;
+
private:
virtual const char* renderName() const { return "RenderImage"; }
@@ -87,9 +94,6 @@ private:
int calcAspectRatioWidth() const;
int calcAspectRatioHeight() const;
- bool isWidthSpecified() const;
- bool isHeightSpecified() const;
-
protected:
// The image we are rendering.
CachedResourceHandle<CachedImage> m_cachedImage;
diff --git a/WebCore/rendering/RenderInline.cpp b/WebCore/rendering/RenderInline.cpp
index 2f9a247..9571751 100644
--- a/WebCore/rendering/RenderInline.cpp
+++ b/WebCore/rendering/RenderInline.cpp
@@ -23,6 +23,7 @@
#include "config.h"
#include "RenderInline.h"
+#include "Chrome.h"
#include "FloatQuad.h"
#include "GraphicsContext.h"
#include "HitTestResult.h"
@@ -931,13 +932,15 @@ void RenderInline::imageChanged(WrappedImagePtr, const IntRect*)
repaint();
}
-void RenderInline::addFocusRingRects(GraphicsContext* graphicsContext, int tx, int ty)
+void RenderInline::addFocusRingRects(Vector<IntRect>& rects, int tx, int ty)
{
for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
RootInlineBox* root = curr->root();
int top = max(root->lineTop(), curr->y());
int bottom = min(root->lineBottom(), curr->y() + curr->height());
- graphicsContext->addFocusRingRect(IntRect(tx + curr->x(), ty + top, curr->width(), bottom - top));
+ IntRect rect(tx + curr->x(), ty + top, curr->width(), bottom - top);
+ if (!rect.isEmpty())
+ rects.append(rect);
}
for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
@@ -948,17 +951,17 @@ void RenderInline::addFocusRingRects(GraphicsContext* graphicsContext, int tx, i
pos = curr->localToAbsolute();
else if (curr->isBox())
pos.move(toRenderBox(curr)->x(), toRenderBox(curr)->y());
- curr->addFocusRingRects(graphicsContext, pos.x(), pos.y());
+ curr->addFocusRingRects(rects, pos.x(), pos.y());
}
}
if (continuation()) {
if (continuation()->isInline())
- continuation()->addFocusRingRects(graphicsContext,
+ continuation()->addFocusRingRects(rects,
tx - containingBlock()->x() + continuation()->containingBlock()->x(),
ty - containingBlock()->y() + continuation()->containingBlock()->y());
else
- continuation()->addFocusRingRects(graphicsContext,
+ continuation()->addFocusRingRects(rects,
tx - containingBlock()->x() + toRenderBox(continuation())->x(),
ty - containingBlock()->y() + toRenderBox(continuation())->y());
}
@@ -975,13 +978,12 @@ void RenderInline::paintOutline(GraphicsContext* graphicsContext, int tx, int ty
if (!oc.isValid())
oc = style()->color();
- graphicsContext->initFocusRing(ow, style()->outlineOffset());
- addFocusRingRects(graphicsContext, tx, ty);
+ Vector<IntRect> focusRingRects;
+ addFocusRingRects(focusRingRects, tx, ty);
if (style()->outlineStyleIsAuto())
- graphicsContext->drawFocusRing(oc);
+ graphicsContext->drawFocusRing(focusRingRects, ow, style()->outlineOffset(), oc);
else
- addPDFURLRect(graphicsContext, graphicsContext->focusRingBoundingRect());
- graphicsContext->clearFocusRing();
+ addPDFURLRect(graphicsContext, unionRect(focusRingRects));
}
if (style()->outlineStyleIsAuto() || style()->outlineStyle() == BNONE)
diff --git a/WebCore/rendering/RenderInline.h b/WebCore/rendering/RenderInline.h
index 8e9715c..d35aa85 100644
--- a/WebCore/rendering/RenderInline.h
+++ b/WebCore/rendering/RenderInline.h
@@ -65,7 +65,7 @@ public:
IntSize relativePositionedInlineOffset(const RenderBox* child) const;
- virtual void addFocusRingRects(GraphicsContext*, int tx, int ty);
+ virtual void addFocusRingRects(Vector<IntRect>&, int tx, int ty);
void paintOutline(GraphicsContext*, int tx, int ty);
int verticalPositionFromCache(bool firstLine) const;
diff --git a/WebCore/rendering/RenderLayer.cpp b/WebCore/rendering/RenderLayer.cpp
index 7e0fee9..38e5f44 100644
--- a/WebCore/rendering/RenderLayer.cpp
+++ b/WebCore/rendering/RenderLayer.cpp
@@ -73,11 +73,13 @@
#include "RenderScrollbar.h"
#include "RenderScrollbarPart.h"
#include "RenderTheme.h"
+#include "RenderTreeAsText.h"
#include "RenderView.h"
#include "ScaleTransformOperation.h"
#include "Scrollbar.h"
#include "ScrollbarTheme.h"
#include "SelectionController.h"
+#include "TextStream.h"
#include "TransformationMatrix.h"
#include "TransformState.h"
#include "TranslateTransformOperation.h"
@@ -657,6 +659,12 @@ static inline bool isPositionedContainer(RenderLayer* layer)
return o->isRenderView() || o->isPositioned() || o->isRelPositioned() || layer->hasTransform();
}
+static inline bool isFixedPositionedContainer(RenderLayer* layer)
+{
+ RenderObject* o = layer->renderer();
+ return o->isRenderView() || layer->hasTransform();
+}
+
RenderLayer* RenderLayer::enclosingPositionedAncestor() const
{
RenderLayer* curr = parent();
@@ -826,7 +834,7 @@ void RenderLayer::beginTransparencyLayers(GraphicsContext* p, const RenderLayer*
p->clip(clipRect);
p->beginTransparencyLayer(renderer()->opacity());
#ifdef REVEAL_TRANSPARENCY_LAYERS
- p->setFillColor(Color(0.0f, 0.0f, 0.5f, 0.2f));
+ p->setFillColor(Color(0.0f, 0.0f, 0.5f, 0.2f), DeviceColorSpace);
p->fillRect(clipRect);
#endif
}
@@ -986,9 +994,10 @@ RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, int& xPos, i
{
if (ancestorLayer == this)
return;
-
- if (renderer()->style()->position() == FixedPosition) {
- // Add in the offset of the view. We can obtain this by calling
+
+ EPosition position = renderer()->style()->position();
+ if (position == FixedPosition && (!ancestorLayer || ancestorLayer == renderer()->view()->layer())) {
+ // If the fixed layer's container is the root, just add in the offset of the view. We can obtain this by calling
// localToAbsolute() on the RenderView.
FloatPoint absPos = renderer()->localToAbsolute(FloatPoint(), true);
xPos += absPos.x();
@@ -996,9 +1005,43 @@ RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, int& xPos, i
return;
}
+ if (position == FixedPosition) {
+ // For a fixed layers, we need to walk up to the root to see if there's a fixed position container
+ // (e.g. a transformed layer). It's an error to call convertToLayerCoords() across a layer with a transform,
+ // so we should always find the ancestor at or before we find the fixed position container.
+ RenderLayer* fixedPositionContainerLayer = 0;
+ bool foundAncestor = false;
+ for (RenderLayer* currLayer = parent(); currLayer; currLayer = currLayer->parent()) {
+ if (currLayer == ancestorLayer)
+ foundAncestor = true;
+
+ if (isFixedPositionedContainer(currLayer)) {
+ fixedPositionContainerLayer = currLayer;
+ ASSERT(foundAncestor);
+ break;
+ }
+ }
+
+ ASSERT(fixedPositionContainerLayer); // We should have hit the RenderView's layer at least.
+
+ if (fixedPositionContainerLayer != ancestorLayer) {
+ int fixedContainerX = 0;
+ int fixedContainerY = 0;
+ convertToLayerCoords(fixedPositionContainerLayer, fixedContainerX, fixedContainerY);
+
+ int ancestorX = 0;
+ int ancestorY = 0;
+ ancestorLayer->convertToLayerCoords(fixedPositionContainerLayer, ancestorX, ancestorY);
+
+ xPos += (fixedContainerX - ancestorX);
+ yPos += (fixedContainerY - ancestorY);
+ return;
+ }
+ }
+
RenderLayer* parentLayer;
- if (renderer()->style()->position() == AbsolutePosition) {
- // Do what enclosingPositionedAncestor() does, but check for ancestorLayer along the way
+ if (position == AbsolutePosition || position == FixedPosition) {
+ // Do what enclosingPositionedAncestor() does, but check for ancestorLayer along the way.
parentLayer = parent();
bool foundAncestorFirst = false;
while (parentLayer) {
@@ -1114,7 +1157,7 @@ void RenderLayer::scrollByRecursively(int xDelta, int yDelta)
frame->eventHandler()->updateAutoscrollRenderer();
}
} else if (renderer()->view()->frameView()) {
- // If we are here, we were called on a renderer that can be programatically scrolled, but doesn't
+ // If we are here, we were called on a renderer that can be programmatically scrolled, but doesn't
// have an overflow clip. Which means that it is a document node that can be scrolled.
renderer()->view()->frameView()->scrollBy(IntSize(xDelta, yDelta));
// FIXME: If we didn't scroll the whole way, do we want to try looking at the frames ownerElement?
@@ -1198,7 +1241,7 @@ void RenderLayer::scrollToOffset(int x, int y, bool updateScrollbars, bool repai
// The caret rect needs to be invalidated after scrolling
Frame* frame = renderer()->document()->frame();
if (frame)
- frame->invalidateSelection();
+ frame->selection()->setNeedsLayout();
// Just schedule a full repaint of our object.
if (repaint)
@@ -1701,6 +1744,11 @@ IntSize RenderLayer::offsetFromResizeCorner(const IntPoint& absolutePoint) const
return localPoint - bottomRight;
}
+bool RenderLayer::hasOverflowControls() const
+{
+ return m_hBar || m_vBar || m_scrollCorner || renderer()->style()->resize() != RESIZE_NONE;
+}
+
void RenderLayer::positionOverflowControls(int tx, int ty)
{
if (!m_hBar && !m_vBar && (!renderer()->hasOverflowClip() || renderer()->style()->resize() == RESIZE_NONE))
@@ -1886,16 +1934,22 @@ RenderLayer::updateScrollInfoAfterLayout()
// Set up the range (and page step/line step).
if (m_hBar) {
int clientWidth = box->clientWidth();
- int pageStep = (clientWidth - cAmountToKeepWhenPaging);
- if (pageStep < 0) pageStep = clientWidth;
+ int pageStep = max(clientWidth * cFractionToStepWhenPaging, 1.f);
m_hBar->setSteps(cScrollbarPixelsPerLineStep, pageStep);
m_hBar->setProportion(clientWidth, m_scrollWidth);
+ // Explicitly set the horizontal scroll value. This ensures that when a
+ // right-to-left scrollable area's width (or content width) changes, the
+ // top right corner of the content doesn't shift with respect to the top
+ // right corner of the area. Conceptually, right-to-left areas have
+ // their origin at the top-right, but RenderLayer is top-left oriented,
+ // so this is needed to keep everything working (see how scrollXOffset()
+ // differs from scrollYOffset() to get an idea of why the horizontal and
+ // vertical scrollbars need to be treated differently).
m_hBar->setValue(scrollXOffset());
}
if (m_vBar) {
int clientHeight = box->clientHeight();
- int pageStep = (clientHeight - cAmountToKeepWhenPaging);
- if (pageStep < 0) pageStep = clientHeight;
+ int pageStep = max(clientHeight * cFractionToStepWhenPaging, 1.f);
m_vBar->setSteps(cScrollbarPixelsPerLineStep, pageStep);
m_vBar->setProportion(clientHeight, m_scrollHeight);
}
@@ -2228,7 +2282,7 @@ void RenderLayer::paintLayer(RenderLayer* rootLayer, GraphicsContext* p,
// If this layer's renderer is a child of the paintingRoot, we render unconditionally, which
// is done by passing a nil paintingRoot down to our renderer (as if no paintingRoot was ever set).
// Else, our renderer tree may or may not contain the painting root, so we pass that root along
- // so it will be tested against as we decend through the renderers.
+ // so it will be tested against as we descend through the renderers.
RenderObject* paintingRootForRenderer = 0;
if (paintingRoot && !renderer()->isDescendantOf(paintingRoot))
paintingRootForRenderer = paintingRoot;
@@ -2351,15 +2405,10 @@ bool RenderLayer::hitTest(const HitTestRequest& request, HitTestResult& result)
}
}
- // Now determine if the result is inside an anchor; make sure an image map wins if
- // it already set URLElement and only use the innermost.
+ // Now determine if the result is inside an anchor - if the urlElement isn't already set.
Node* node = result.innerNode();
- while (node) {
- // for imagemaps, URLElement is the associated area element not the image itself
- if (node->isLink() && !result.URLElement() && !node->hasTagName(imgTag))
- result.setURLElement(static_cast<Element*>(node));
- node = node->eventParentNode();
- }
+ if (node && !result.URLElement())
+ result.setURLElement(static_cast<Element*>(node->enclosingLinkEventParentOrSelf()));
// Next set up the correct :hover/:active state along the new chain.
updateHoverActiveState(request, result);
@@ -2603,7 +2652,7 @@ RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, RenderLayer* cont
// Next we want to see if the mouse pos is inside the child RenderObjects of the layer.
if (fgRect.contains(hitTestPoint) && isSelfPaintingLayer()) {
- // Hit test with a temporary HitTestResult, because we onlyl want to commit to 'result' if we know we're frontmost.
+ // Hit test with a temporary HitTestResult, because we only want to commit to 'result' if we know we're frontmost.
HitTestResult tempResult(result.point());
if (hitTestContents(request, tempResult, layerBounds, hitTestPoint, HitTestDescendants) &&
isHitCandidate(this, false, zOffsetForContentsPtr, unflattenedTransformState.get())) {
@@ -3238,7 +3287,7 @@ void RenderLayer::updateCompositingAndLayerListsIfNeeded()
#if USE(ACCELERATED_COMPOSITING)
if (compositor()->inCompositingMode()) {
if ((isStackingContext() && m_zOrderListsDirty) || m_normalFlowListDirty)
- compositor()->updateCompositingLayers(this);
+ compositor()->updateCompositingLayers(CompositingUpdateOnPaitingOrHitTest, this);
return;
}
#endif
@@ -3299,7 +3348,7 @@ void RenderLayer::repaintIncludingNonCompositingDescendants(RenderBoxModelObject
bool RenderLayer::shouldBeNormalFlowOnly() const
{
- return (renderer()->hasOverflowClip() || renderer()->hasReflection() || renderer()->hasMask() || renderer()->isVideo()) &&
+ return (renderer()->hasOverflowClip() || renderer()->hasReflection() || renderer()->hasMask() || renderer()->isVideo() || renderer()->isEmbeddedObject()) &&
!renderer()->isPositioned() &&
!renderer()->isRelPositioned() &&
!renderer()->hasTransform() &&
@@ -3308,7 +3357,7 @@ bool RenderLayer::shouldBeNormalFlowOnly() const
bool RenderLayer::isSelfPaintingLayer() const
{
- return !isNormalFlowOnly() || renderer()->hasReflection() || renderer()->hasMask() || renderer()->isTableRow() || renderer()->isVideo();
+ return !isNormalFlowOnly() || renderer()->hasReflection() || renderer()->hasMask() || renderer()->isTableRow() || renderer()->isVideo() || renderer()->isEmbeddedObject();
}
void RenderLayer::styleChanged(StyleDifference diff, const RenderStyle*)
@@ -3322,7 +3371,7 @@ void RenderLayer::styleChanged(StyleDifference diff, const RenderStyle*)
dirtyStackingContextZOrderLists();
}
- if (renderer()->style()->overflowX() == OMARQUEE && renderer()->style()->marqueeBehavior() != MNONE) {
+ if (renderer()->style()->overflowX() == OMARQUEE && renderer()->style()->marqueeBehavior() != MNONE && renderer()->isBox()) {
if (!m_marquee)
m_marquee = new RenderMarquee(this);
m_marquee->updateMarqueeStyle();
@@ -3456,3 +3505,16 @@ void RenderLayer::updateReflectionStyle()
}
} // namespace WebCore
+
+#ifndef NDEBUG
+void showLayerTree(const WebCore::RenderLayer* layer)
+{
+ if (!layer)
+ return;
+
+ if (WebCore::Frame* frame = layer->renderer()->document()->frame()) {
+ WebCore::String output = externalRepresentation(frame, WebCore::RenderAsTextShowAllLayers | WebCore::RenderAsTextShowLayerNesting | WebCore::RenderAsTextShowCompositedLayers);
+ fprintf(stderr, "%s\n", output.utf8().data());
+ }
+}
+#endif
diff --git a/WebCore/rendering/RenderLayer.h b/WebCore/rendering/RenderLayer.h
index af64fc4..3cdad3a 100644
--- a/WebCore/rendering/RenderLayer.h
+++ b/WebCore/rendering/RenderLayer.h
@@ -205,6 +205,7 @@ public:
void beginTransparencyLayers(GraphicsContext*, const RenderLayer* rootLayer, PaintBehavior);
bool hasReflection() const { return renderer()->hasReflection(); }
+ bool isReflection() const { return renderer()->isReplica(); }
RenderReplica* reflection() const { return m_reflection; }
RenderLayer* reflectionLayer() const;
@@ -262,6 +263,7 @@ public:
int verticalScrollbarWidth() const;
int horizontalScrollbarHeight() const;
+ bool hasOverflowControls() const;
void positionOverflowControls(int tx, int ty);
bool isPointInResizeControl(const IntPoint& absolutePoint) const;
bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint);
@@ -662,4 +664,9 @@ private:
} // namespace WebCore
+#ifndef NDEBUG
+// Outside the WebCore namespace for ease of invocation from gdb.
+void showLayerTree(const WebCore::RenderLayer* layer);
+#endif
+
#endif // RenderLayer_h
diff --git a/WebCore/rendering/RenderLayerBacking.cpp b/WebCore/rendering/RenderLayerBacking.cpp
index 35aa7e1..3f60557 100644
--- a/WebCore/rendering/RenderLayerBacking.cpp
+++ b/WebCore/rendering/RenderLayerBacking.cpp
@@ -41,9 +41,11 @@
#include "HTMLNames.h"
#include "InspectorTimelineAgent.h"
#include "KeyframeList.h"
+#include "PluginWidget.h"
#include "RenderBox.h"
#include "RenderImage.h"
#include "RenderLayerCompositor.h"
+#include "RenderEmbeddedObject.h"
#include "RenderVideo.h"
#include "RenderView.h"
#include "Settings.h"
@@ -57,12 +59,22 @@ namespace WebCore {
using namespace HTMLNames;
static bool hasBorderOutlineOrShadow(const RenderStyle*);
-static bool hasBoxDecorations(const RenderStyle*);
-static bool hasBoxDecorationsWithBackgroundImage(const RenderStyle*);
+static bool hasBoxDecorationsOrBackground(const RenderStyle*);
+static bool hasBoxDecorationsOrBackgroundImage(const RenderStyle*);
+
+static inline bool is3DCanvas(RenderObject* renderer)
+{
+#if ENABLE(3D_CANVAS)
+ if (renderer->isCanvas())
+ return static_cast<HTMLCanvasElement*>(renderer->node())->is3D();
+#else
+ UNUSED_PARAM(renderer);
+#endif
+ return false;
+}
RenderLayerBacking::RenderLayerBacking(RenderLayer* layer)
: m_owningLayer(layer)
- , m_hasDirectlyCompositedContent(false)
, m_artificiallyInflatedBounds(false)
{
createGraphicsLayer();
@@ -86,11 +98,13 @@ void RenderLayerBacking::createGraphicsLayer()
m_graphicsLayer->setName("Document Node");
else {
if (renderer()->node()->isHTMLElement() && renderer()->node()->hasID())
- m_graphicsLayer->setName(renderer()->renderName() + String(" ") + static_cast<HTMLElement*>(renderer()->node())->getAttribute(idAttr));
+ m_graphicsLayer->setName(renderer()->renderName() + String(" ") + static_cast<HTMLElement*>(renderer()->node())->getIDAttribute());
else
m_graphicsLayer->setName(renderer()->renderName());
}
- } else
+ } else if (m_owningLayer->isReflection())
+ m_graphicsLayer->setName("Reflection");
+ else
m_graphicsLayer->setName("Anonymous Node");
#endif // NDEBUG
@@ -186,30 +200,31 @@ bool RenderLayerBacking::updateGraphicsLayerConfiguration()
if (updateMaskLayer(m_owningLayer->renderer()->hasMask()))
m_graphicsLayer->setMaskLayer(m_maskLayer.get());
- m_hasDirectlyCompositedContent = false;
- if (canUseDirectCompositing()) {
- if (renderer()->isImage()) {
- updateImageContents();
- m_hasDirectlyCompositedContent = true;
- m_graphicsLayer->setDrawsContent(false);
- }
-#if ENABLE(3D_CANVAS)
- else if (renderer()->isCanvas()) {
- HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(renderer()->node());
- if (canvas->is3D()) {
- WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(canvas->renderingContext());
- if (context->graphicsContext3D()->platformGraphicsContext3D())
- m_graphicsLayer->setContentsToGraphicsContext3D(context->graphicsContext3D());
- }
+ if (m_owningLayer->hasReflection()) {
+ if (m_owningLayer->reflectionLayer()->backing()) {
+ GraphicsLayer* reflectionLayer = m_owningLayer->reflectionLayer()->backing()->graphicsLayer();
+ m_graphicsLayer->setReplicatedByLayer(reflectionLayer);
}
-#endif
+ } else
+ m_graphicsLayer->setReplicatedByLayer(0);
+
+ if (isDirectlyCompositedImage())
+ updateImageContents();
- if (rendererHasBackground())
- m_graphicsLayer->setBackgroundColor(rendererBackgroundColor());
- else
- m_graphicsLayer->clearBackgroundColor();
+ if (renderer()->isEmbeddedObject() && toRenderEmbeddedObject(renderer())->allowsAcceleratedCompositing()) {
+ PluginWidget* pluginWidget = static_cast<PluginWidget*>(toRenderEmbeddedObject(renderer())->widget());
+ m_graphicsLayer->setContentsToMedia(pluginWidget->platformLayer());
}
+#if ENABLE(3D_CANVAS)
+ if (is3DCanvas(renderer())) {
+ HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(renderer()->node());
+ WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(canvas->renderingContext());
+ if (context->graphicsContext3D()->platformGraphicsContext3D())
+ m_graphicsLayer->setContentsToGraphicsContext3D(context->graphicsContext3D());
+ }
+#endif
+
return layerConfigChanged;
}
@@ -229,7 +244,7 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
updateLayerOpacity(renderer()->style());
RenderStyle* style = renderer()->style();
- m_graphicsLayer->setPreserves3D(style->transformStyle3D() == TransformStyle3DPreserve3D);
+ m_graphicsLayer->setPreserves3D(style->transformStyle3D() == TransformStyle3DPreserve3D && !renderer()->hasReflection());
m_graphicsLayer->setBackfaceVisibility(style->backfaceVisibility() == BackfaceVisibilityVisible);
RenderLayer* compAncestor = m_owningLayer->ancestorCompositingLayer();
@@ -350,9 +365,19 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
m_foregroundLayer->setOffsetFromRenderer(foregroundOffset);
}
+ if (m_owningLayer->reflectionLayer() && m_owningLayer->reflectionLayer()->isComposited()) {
+ RenderLayerBacking* reflectionBacking = m_owningLayer->reflectionLayer()->backing();
+ reflectionBacking->updateGraphicsLayerGeometry();
+
+ // The reflection layer has the bounds of m_owningLayer->reflectionLayer(),
+ // but the reflected layer is the bounds of this layer, so we need to position it appropriately.
+ FloatRect layerBounds = compositedBounds();
+ FloatRect reflectionLayerBounds = reflectionBacking->compositedBounds();
+ reflectionBacking->graphicsLayer()->setReplicatedLayerPosition(FloatPoint() + (layerBounds.location() - reflectionLayerBounds.location()));
+ }
+
m_graphicsLayer->setContentsRect(contentsBox());
- if (!m_hasDirectlyCompositedContent)
- m_graphicsLayer->setDrawsContent(!isSimpleContainerCompositingLayer() && !paintingGoesToWindow() && !m_artificiallyInflatedBounds);
+ m_graphicsLayer->setDrawsContent(containsPaintedContent());
}
void RenderLayerBacking::updateInternalHierarchy()
@@ -498,12 +523,12 @@ static bool hasBorderOutlineOrShadow(const RenderStyle* style)
return style->hasBorder() || style->hasBorderRadius() || style->hasOutline() || style->hasAppearance() || style->boxShadow();
}
-static bool hasBoxDecorations(const RenderStyle* style)
+static bool hasBoxDecorationsOrBackground(const RenderStyle* style)
{
return hasBorderOutlineOrShadow(style) || style->hasBackground();
}
-static bool hasBoxDecorationsWithBackgroundImage(const RenderStyle* style)
+static bool hasBoxDecorationsOrBackgroundImage(const RenderStyle* style)
{
return hasBorderOutlineOrShadow(style) || style->hasBackgroundImage();
}
@@ -563,7 +588,7 @@ bool RenderLayerBacking::isSimpleContainerCompositingLayer() const
// Reject anything that has a border, a border-radius or outline,
// or any background (color or image).
// FIXME: we could optimize layers for simple backgrounds.
- if (hasBoxDecorations(style))
+ if (hasBoxDecorationsOrBackground(style))
return false;
// If we have got this far and the renderer has no children, then we're ok.
@@ -580,7 +605,7 @@ bool RenderLayerBacking::isSimpleContainerCompositingLayer() const
// Reject anything that has a border, a border-radius or outline,
// or is not a simple background (no background, or solid color).
- if (hasBoxDecorationsWithBackgroundImage(style))
+ if (hasBoxDecorationsOrBackgroundImage(style))
return false;
// Now look at the body's renderer.
@@ -591,7 +616,7 @@ bool RenderLayerBacking::isSimpleContainerCompositingLayer() const
style = bodyObject->style();
- if (hasBoxDecorationsWithBackgroundImage(style))
+ if (hasBoxDecorationsOrBackgroundImage(style))
return false;
// Ceck to see if all the body's children are compositing layers.
@@ -608,9 +633,11 @@ bool RenderLayerBacking::isSimpleContainerCompositingLayer() const
return true;
}
+// Conservative test for having no rendered children.
bool RenderLayerBacking::hasNonCompositingContent() const
{
- // Conservative test for having no rendered children.
+ if (m_owningLayer->hasOverflowControls())
+ return true;
// Some HTML can cause whitespace text nodes to have renderers, like:
// <div>
@@ -627,7 +654,6 @@ bool RenderLayerBacking::hasNonCompositingContent() const
}
}
- // FIXME: test for overflow controls.
if (m_owningLayer->isStackingContext()) {
// Use the m_hasCompositingDescendant bit to optimize?
if (Vector<RenderLayer*>* negZOrderList = m_owningLayer->negZOrderList()) {
@@ -661,51 +687,43 @@ bool RenderLayerBacking::hasNonCompositingContent() const
return false;
}
-// A layer can use direct compositing if the render layer's object is a replaced object and has no children.
-// This allows the GraphicsLayer to display the RenderLayer contents directly; it's used for images.
-bool RenderLayerBacking::canUseDirectCompositing() const
+bool RenderLayerBacking::containsPaintedContent() const
{
- RenderObject* renderObject = renderer();
-
- // Canvas3D is always direct composited
-#if ENABLE(3D_CANVAS)
- if (renderer()->isCanvas()) {
- HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(renderer()->node());
- return canvas->is3D();
- }
-#endif
-
- // Reject anything that isn't an image
- if (!renderObject->isImage() && !renderObject->isVideo())
+ if (isSimpleContainerCompositingLayer() || paintingGoesToWindow() || m_artificiallyInflatedBounds || m_owningLayer->isReflection())
return false;
-
- if (renderObject->hasMask() || renderObject->hasReflection())
+
+ if (isDirectlyCompositedImage())
return false;
- // Video can use an inner layer even if it has box decorations; we draw those into another layer.
- if (renderObject->isVideo())
- return true;
-
- // Reject anything that would require the image to be drawn via the GraphicsContext,
- // like border, shadows etc. Solid background color is OK.
- return !hasBoxDecorationsWithBackgroundImage(renderObject->style());
+ // FIXME: we could optimize cases where the image, video or canvas is known to fill the border box entirely,
+ // and set background color on the layer in that case, instead of allocating backing store and painting.
+ if (renderer()->isVideo() || is3DCanvas(renderer()))
+ return hasBoxDecorationsOrBackground(renderer()->style());
+
+ return true;
}
-
+
+// An image can be directly compositing if it's the sole content of the layer, and has no box decorations
+// that require painting. Direct compositing saves backing store.
+bool RenderLayerBacking::isDirectlyCompositedImage() const
+{
+ RenderObject* renderObject = renderer();
+ return renderObject->isImage() && !hasBoxDecorationsOrBackground(renderObject->style());
+}
+
void RenderLayerBacking::rendererContentChanged()
{
- if (canUseDirectCompositing()) {
- if (renderer()->isImage())
- updateImageContents();
- else {
+ if (isDirectlyCompositedImage()) {
+ updateImageContents();
+ return;
+ }
+
#if ENABLE(3D_CANVAS)
- if (renderer()->isCanvas()) {
- HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(renderer()->node());
- if (canvas->is3D())
- m_graphicsLayer->setGraphicsContext3DNeedsDisplay();
- }
-#endif
- }
+ if (is3DCanvas(renderer())) {
+ m_graphicsLayer->setGraphicsContext3DNeedsDisplay();
+ return;
}
+#endif
}
void RenderLayerBacking::updateImageContents()
@@ -864,14 +882,6 @@ void RenderLayerBacking::paintIntoLayer(RenderLayer* rootLayer, GraphicsContext*
m_owningLayer->updateLayerListsIfNeeded();
- // Paint the reflection first if we have one.
- if (m_owningLayer->hasReflection()) {
- // Mark that we are now inside replica painting.
- m_owningLayer->setPaintingInsideReflection(true);
- m_owningLayer->reflectionLayer()->paintLayer(rootLayer, context, paintDirtyRect, paintBehavior, paintingRoot, 0, RenderLayer::PaintLayerPaintingReflection);
- m_owningLayer->setPaintingInsideReflection(false);
- }
-
// Calculate the clip rects we should use.
IntRect layerBounds, damageRect, clipRectToApply, outlineRect;
m_owningLayer->calculateRects(rootLayer, paintDirtyRect, layerBounds, damageRect, clipRectToApply, outlineRect);
@@ -1062,7 +1072,7 @@ bool RenderLayerBacking::showRepaintCounter() const
return compositor() ? compositor()->showRepaintCounter() : false;
}
-bool RenderLayerBacking::startAnimation(double beginTime, const Animation* anim, const KeyframeList& keyframes)
+bool RenderLayerBacking::startAnimation(double timeOffset, const Animation* anim, const KeyframeList& keyframes)
{
bool hasOpacity = keyframes.containsProperty(CSSPropertyOpacity);
bool hasTransform = keyframes.containsProperty(CSSPropertyWebkitTransform);
@@ -1093,10 +1103,10 @@ bool RenderLayerBacking::startAnimation(double beginTime, const Animation* anim,
bool didAnimateTransform = !hasTransform;
bool didAnimateOpacity = !hasOpacity;
- if (hasTransform && m_graphicsLayer->addAnimation(transformVector, toRenderBox(renderer())->borderBoxRect().size(), anim, keyframes.animationName(), beginTime))
+ if (hasTransform && m_graphicsLayer->addAnimation(transformVector, toRenderBox(renderer())->borderBoxRect().size(), anim, keyframes.animationName(), timeOffset))
didAnimateTransform = true;
- if (hasOpacity && m_graphicsLayer->addAnimation(opacityVector, IntSize(), anim, keyframes.animationName(), beginTime))
+ if (hasOpacity && m_graphicsLayer->addAnimation(opacityVector, IntSize(), anim, keyframes.animationName(), timeOffset))
didAnimateOpacity = true;
bool runningAcceleratedAnimation = didAnimateTransform && didAnimateOpacity;
@@ -1106,7 +1116,7 @@ bool RenderLayerBacking::startAnimation(double beginTime, const Animation* anim,
return runningAcceleratedAnimation;
}
-bool RenderLayerBacking::startTransition(double beginTime, int property, const RenderStyle* fromStyle, const RenderStyle* toStyle)
+bool RenderLayerBacking::startTransition(double timeOffset, int property, const RenderStyle* fromStyle, const RenderStyle* toStyle)
{
bool didAnimate = false;
ASSERT(property != cAnimateAll);
@@ -1118,7 +1128,7 @@ bool RenderLayerBacking::startTransition(double beginTime, int property, const R
opacityVector.insert(new FloatAnimationValue(0, compositingOpacity(fromStyle->opacity())));
opacityVector.insert(new FloatAnimationValue(1, compositingOpacity(toStyle->opacity())));
// The boxSize param is only used for transform animations (which can only run on RenderBoxes), so we pass an empty size here.
- if (m_graphicsLayer->addAnimation(opacityVector, IntSize(), opacityAnim, String(), beginTime)) {
+ if (m_graphicsLayer->addAnimation(opacityVector, IntSize(), opacityAnim, String(), timeOffset)) {
// To ensure that the correct opacity is visible when the animation ends, also set the final opacity.
updateLayerOpacity(toStyle);
didAnimate = true;
@@ -1132,7 +1142,7 @@ bool RenderLayerBacking::startTransition(double beginTime, int property, const R
KeyframeValueList transformVector(AnimatedPropertyWebkitTransform);
transformVector.insert(new TransformAnimationValue(0, &fromStyle->transform()));
transformVector.insert(new TransformAnimationValue(1, &toStyle->transform()));
- if (m_graphicsLayer->addAnimation(transformVector, toRenderBox(renderer())->borderBoxRect().size(), transformAnim, String(), beginTime)) {
+ if (m_graphicsLayer->addAnimation(transformVector, toRenderBox(renderer())->borderBoxRect().size(), transformAnim, String(), timeOffset)) {
// To ensure that the correct transform is visible when the animation ends, also set the final opacity.
updateLayerTransform(toStyle);
didAnimate = true;
@@ -1162,9 +1172,9 @@ void RenderLayerBacking::animationFinished(const String& animationName)
m_graphicsLayer->removeAnimationsForKeyframes(animationName);
}
-void RenderLayerBacking::animationPaused(const String& animationName)
+void RenderLayerBacking::animationPaused(double timeOffset, const String& animationName)
{
- m_graphicsLayer->pauseAnimation(animationName);
+ m_graphicsLayer->pauseAnimation(animationName, timeOffset);
}
void RenderLayerBacking::transitionFinished(int property)
diff --git a/WebCore/rendering/RenderLayerBacking.h b/WebCore/rendering/RenderLayerBacking.h
index 2bbb37f..7aea926 100644
--- a/WebCore/rendering/RenderLayerBacking.h
+++ b/WebCore/rendering/RenderLayerBacking.h
@@ -97,10 +97,10 @@ public:
void rendererContentChanged();
// Interface to start, finish, suspend and resume animations and transitions
- bool startAnimation(double beginTime, const Animation* anim, const KeyframeList& keyframes);
- bool startTransition(double beginTime, int property, const RenderStyle* fromStyle, const RenderStyle* toStyle);
+ bool startAnimation(double timeOffset, const Animation* anim, const KeyframeList& keyframes);
+ bool startTransition(double timeOffset, int property, const RenderStyle* fromStyle, const RenderStyle* toStyle);
void animationFinished(const String& name);
- void animationPaused(const String& name);
+ void animationPaused(double timeOffset, const String& name);
void transitionFinished(int property);
void suspendAnimations(double time = 0);
@@ -149,12 +149,12 @@ private:
// Return the opacity value that this layer should use for compositing.
float compositingOpacity(float rendererOpacity) const;
- // Returns true if this RenderLayer only has content that can be rendered directly
- // by the compositing layer, without drawing (e.g. solid background color).
+ // Returns true if this compositing layer has no visible content.
bool isSimpleContainerCompositingLayer() const;
- // Returns true if we can optimize the RenderLayer to draw the replaced content
- // directly into a compositing buffer
- bool canUseDirectCompositing() const;
+ // Returns true if this layer has content that needs to be rendered by painting into the backing store.
+ bool containsPaintedContent() const;
+ // Returns true if the RenderLayer just contains an image that we can composite directly.
+ bool isDirectlyCompositedImage() const;
void updateImageContents();
bool rendererHasBackground() const;
@@ -179,7 +179,6 @@ private:
IntRect m_compositedBounds;
- bool m_hasDirectlyCompositedContent;
bool m_artificiallyInflatedBounds; // bounds had to be made non-zero to make transform-origin work
};
diff --git a/WebCore/rendering/RenderLayerCompositor.cpp b/WebCore/rendering/RenderLayerCompositor.cpp
index 8ce59cb..2730114 100644
--- a/WebCore/rendering/RenderLayerCompositor.cpp
+++ b/WebCore/rendering/RenderLayerCompositor.cpp
@@ -29,6 +29,7 @@
#include "RenderLayerCompositor.h"
#include "AnimationController.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "CSSPropertyNames.h"
#include "Frame.h"
@@ -37,7 +38,9 @@
#include "HitTestResult.h"
#include "HTMLCanvasElement.h"
#include "Page.h"
+#include "RenderEmbeddedObject.h"
#include "RenderLayerBacking.h"
+#include "RenderReplica.h"
#include "RenderVideo.h"
#include "RenderView.h"
#include "Settings.h"
@@ -58,6 +61,8 @@ bool WebCoreHas3DRendering = true;
namespace WebCore {
+using namespace HTMLNames;
+
struct CompositingState {
CompositingState(RenderLayer* compAncestor)
: m_compositingAncestor(compAncestor)
@@ -147,16 +152,30 @@ void RenderLayerCompositor::scheduleSync()
page->chrome()->client()->scheduleCompositingLayerSync();
}
-void RenderLayerCompositor::updateCompositingLayers(RenderLayer* updateRoot)
+void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType updateType, RenderLayer* updateRoot)
{
- // When m_compositingConsultsOverlap is true, then layer positions affect compositing,
- // so we can only bail here when we're not looking at overlap.
- if (!m_compositingLayersNeedRebuild && !m_compositingConsultsOverlap)
+ bool checkForHierarchyUpdate = false;
+ bool needGeometryUpdate = false;
+
+ switch (updateType) {
+ case CompositingUpdateAfterLayoutOrStyleChange:
+ case CompositingUpdateOnPaitingOrHitTest:
+ checkForHierarchyUpdate = true;
+ break;
+ case CompositingUpdateOnScroll:
+ if (m_compositingConsultsOverlap)
+ checkForHierarchyUpdate = true; // Overlap can change with scrolling, so need to check for hierarchy updates.
+
+ needGeometryUpdate = true;
+ break;
+ }
+
+ if (!checkForHierarchyUpdate && !needGeometryUpdate)
return;
ASSERT(inCompositingMode());
- bool needLayerRebuild = m_compositingLayersNeedRebuild;
+ bool needHierarchyUpdate = m_compositingLayersNeedRebuild;
if (!updateRoot) {
// Only clear the flag if we're updating the entire hierarchy.
m_compositingLayersNeedRebuild = false;
@@ -169,24 +188,22 @@ void RenderLayerCompositor::updateCompositingLayers(RenderLayer* updateRoot)
double startTime = WTF::currentTime();
#endif
- // Go through the layers in presentation order, so that we can compute which
- // RLs need compositing layers.
- // FIXME: we could maybe do this in one pass, but the parenting logic would be more
- // complex.
- {
+ if (checkForHierarchyUpdate) {
+ // Go through the layers in presentation order, so that we can compute which RenderLayers need compositing layers.
+ // FIXME: we could maybe do this and the hierarchy udpate in one pass, but the parenting logic would be more complex.
CompositingState compState(updateRoot);
- bool layersChanged;
+ bool layersChanged = false;
if (m_compositingConsultsOverlap) {
OverlapMap overlapTestRequestMap;
computeCompositingRequirements(updateRoot, &overlapTestRequestMap, compState, layersChanged);
} else
computeCompositingRequirements(updateRoot, 0, compState, layersChanged);
- needLayerRebuild |= layersChanged;
+ needHierarchyUpdate |= layersChanged;
}
- if (needLayerRebuild) {
- // Now updated and parent the compositing layers.
+ if (needHierarchyUpdate) {
+ // Update the hierarchy of the compositing layers.
CompositingState compState(updateRoot);
Vector<GraphicsLayer*> childList;
rebuildCompositingLayerTree(updateRoot, compState, childList);
@@ -194,8 +211,9 @@ void RenderLayerCompositor::updateCompositingLayers(RenderLayer* updateRoot)
// Host the document layer in the RenderView's root layer.
if (updateRoot == rootRenderLayer() && !childList.isEmpty())
m_rootPlatformLayer->setChildren(childList);
- } else {
- // We just need to do a geometry update.
+ } else if (needGeometryUpdate) {
+ // We just need to do a geometry update. This is only used for position:fixed scrolling;
+ // most of the time, geometry is updated via RenderLayer::styleChanged().
updateLayerTreeGeometry(updateRoot);
}
@@ -233,6 +251,17 @@ bool RenderLayerCompositor::updateBacking(RenderLayer* layer, CompositingChangeR
}
} else {
if (layer->backing()) {
+ // If we're removing backing on a reflection, clear the source GraphicsLayer's pointer to
+ // its replica GraphicsLayer. In practice this should never happen because reflectee and reflection
+ // are both either composited, or not composited.
+ if (layer->isReflection()) {
+ RenderLayer* sourceLayer = toRenderBoxModelObject(layer->renderer()->parent())->layer();
+ if (RenderLayerBacking* backing = sourceLayer->backing()) {
+ ASSERT(backing->graphicsLayer()->replicaLayer() == layer->backing()->graphicsLayer());
+ backing->graphicsLayer()->setReplicatedByLayer(0);
+ }
+ }
+
layer->clearBacking();
layerChanged = true;
@@ -533,6 +562,9 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, O
addToOverlapMap(*overlapMap, layer, absBounds, haveComputedBounds);
}
+ if (layer->reflectionLayer())
+ layer->reflectionLayer()->setMustOverlapCompositedLayers(needsToBeComposited(layer));
+
// Subsequent layers in the parent stacking context also need to composite.
if (childState.m_subtreeIsCompositing)
compositingState.m_subtreeIsCompositing = true;
@@ -549,6 +581,9 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, O
// Update backing now, so that we can use isComposited() reliably during tree traversal in rebuildCompositingLayerTree().
if (updateBacking(layer, CompositingChangeRepaintNow))
layersChanged = true;
+
+ if (layer->reflectionLayer() && updateLayerCompositingState(layer->reflectionLayer(), CompositingChangeRepaintNow))
+ layersChanged = true;
}
void RenderLayerCompositor::setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer)
@@ -595,9 +630,7 @@ void RenderLayerCompositor::parentInRootLayer(RenderLayer* layer)
#if ENABLE(VIDEO)
bool RenderLayerCompositor::canAccelerateVideoRendering(RenderVideo* o) const
{
- // FIXME: ideally we need to look at all ancestors for mask or video. But for now,
- // just bail on the obvious cases.
- if (o->hasReflection() || !m_hasAcceleratedCompositing)
+ if (!m_hasAcceleratedCompositing)
return false;
return o->supportsAcceleratedRendering();
@@ -615,6 +648,12 @@ void RenderLayerCompositor::rebuildCompositingLayerTree(RenderLayer* layer, cons
// The compositing state of all our children has been updated already, so now
// we can compute and cache the composited bounds for this layer.
layerBacking->updateCompositedBounds();
+
+ if (RenderLayer* reflection = layer->reflectionLayer()) {
+ if (reflection->backing())
+ reflection->backing()->updateCompositedBounds();
+ }
+
layerBacking->updateGraphicsLayerConfiguration();
layerBacking->updateGraphicsLayerGeometry();
@@ -688,8 +727,10 @@ void RenderLayerCompositor::updateLayerTreeGeometry(RenderLayer* layer)
// we can compute and cache the composited bounds for this layer.
layerBacking->updateCompositedBounds();
- if (layer->reflectionLayer())
- layer->reflectionLayer()->backing()->updateCompositedBounds();
+ if (RenderLayer* reflection = layer->reflectionLayer()) {
+ if (reflection->backing())
+ reflection->backing()->updateCompositedBounds();
+ }
layerBacking->updateGraphicsLayerConfiguration();
layerBacking->updateGraphicsLayerGeometry();
@@ -730,12 +771,21 @@ void RenderLayerCompositor::updateCompositingDescendantGeometry(RenderLayer* com
if (layer != compositingAncestor) {
if (RenderLayerBacking* layerBacking = layer->backing()) {
layerBacking->updateCompositedBounds();
+
+ if (RenderLayer* reflection = layer->reflectionLayer()) {
+ if (reflection->backing())
+ reflection->backing()->updateCompositedBounds();
+ }
+
layerBacking->updateGraphicsLayerGeometry();
if (updateDepth == RenderLayerBacking::CompositingChildren)
return;
}
}
+ if (layer->reflectionLayer())
+ updateCompositingDescendantGeometry(compositingAncestor, layer->reflectionLayer(), updateDepth);
+
if (!layer->hasCompositingDescendant())
return;
@@ -884,9 +934,16 @@ bool RenderLayerCompositor::needsToBeComposited(const RenderLayer* layer) const
// Use needsToBeComposited() to determine if a RL actually needs a compositing layer.
// static
bool RenderLayerCompositor::requiresCompositingLayer(const RenderLayer* layer) const
-{
+{
+ RenderObject* renderer = layer->renderer();
+ // The compositing state of a reflection should match that of its reflected layer.
+ if (layer->isReflection()) {
+ renderer = renderer->parent(); // The RenderReplica's parent is the object being reflected.
+ layer = toRenderBoxModelObject(renderer)->layer();
+ }
// The root layer always has a compositing layer, but it may not have backing.
return (inCompositingMode() && layer->isRootLayer()) ||
+<<<<<<< HEAD
requiresCompositingForTransform(layer->renderer()) ||
requiresCompositingForVideo(layer->renderer()) ||
requiresCompositingForCanvas(layer->renderer()) ||
@@ -895,8 +952,15 @@ bool RenderLayerCompositor::requiresCompositingLayer(const RenderLayer* layer) c
(layer->renderer()->isPositioned() &&
layer->renderer()->style()->position() == FixedPosition) ||
#endif
+=======
+ requiresCompositingForTransform(renderer) ||
+ requiresCompositingForVideo(renderer) ||
+ requiresCompositingForCanvas(renderer) ||
+ requiresCompositingForPlugin(renderer) ||
+ renderer->style()->backfaceVisibility() == BackfaceVisibilityHidden ||
+>>>>>>> webkit.org at r54127
clipsCompositingDescendants(layer) ||
- requiresCompositingForAnimation(layer->renderer());
+ requiresCompositingForAnimation(renderer);
}
// Return true if the given layer has some ancestor in the RenderLayer hierarchy that clips,
@@ -959,6 +1023,8 @@ bool RenderLayerCompositor::requiresCompositingForVideo(RenderObject* renderer)
RenderVideo* video = toRenderVideo(renderer);
return canAccelerateVideoRendering(video);
}
+#else
+ UNUSED_PARAM(renderer);
#endif
return false;
}
@@ -976,6 +1042,11 @@ bool RenderLayerCompositor::requiresCompositingForCanvas(RenderObject* renderer)
return false;
}
+bool RenderLayerCompositor::requiresCompositingForPlugin(RenderObject* renderer) const
+{
+ return renderer->isEmbeddedObject() && toRenderEmbeddedObject(renderer)->allowsAcceleratedCompositing();
+}
+
bool RenderLayerCompositor::requiresCompositingForAnimation(RenderObject* renderer) const
{
if (AnimationController* animController = renderer->animation()) {
@@ -987,7 +1058,7 @@ bool RenderLayerCompositor::requiresCompositingForAnimation(RenderObject* render
bool RenderLayerCompositor::requiresCompositingWhenDescendantsAreCompositing(RenderObject* renderer) const
{
- return renderer->hasTransform() || renderer->isTransparent() || renderer->hasMask();
+ return renderer->hasTransform() || renderer->isTransparent() || renderer->hasMask() || renderer->hasReflection();
}
// If an element has negative z-index children, those children render in front of the
diff --git a/WebCore/rendering/RenderLayerCompositor.h b/WebCore/rendering/RenderLayerCompositor.h
index 73683f3..5f1a178 100644
--- a/WebCore/rendering/RenderLayerCompositor.h
+++ b/WebCore/rendering/RenderLayerCompositor.h
@@ -38,6 +38,12 @@ class GraphicsLayer;
class RenderVideo;
#endif
+enum CompositingUpdateType {
+ CompositingUpdateAfterLayoutOrStyleChange,
+ CompositingUpdateOnPaitingOrHitTest,
+ CompositingUpdateOnScroll
+};
+
// RenderLayerCompositor manages the hierarchy of
// composited RenderLayers. It determines which RenderLayers
// become compositing, and creates and maintains a hierarchy of
@@ -47,7 +53,6 @@ class RenderVideo;
class RenderLayerCompositor {
public:
-
RenderLayerCompositor(RenderView*);
~RenderLayerCompositor();
@@ -80,7 +85,7 @@ public:
void scheduleSync();
// Rebuild the tree of compositing layers
- void updateCompositingLayers(RenderLayer* updateRoot = 0);
+ void updateCompositingLayers(CompositingUpdateType = CompositingUpdateAfterLayoutOrStyleChange, RenderLayer* updateRoot = 0);
// Update the compositing state of the given layer. Returns true if that state changed.
enum CompositingChangeRepaint { CompositingChangeRepaintNow, CompositingChangeWillRepaintLater };
@@ -173,6 +178,7 @@ private:
bool requiresCompositingForTransform(RenderObject*) const;
bool requiresCompositingForVideo(RenderObject*) const;
bool requiresCompositingForCanvas(RenderObject*) const;
+ bool requiresCompositingForPlugin(RenderObject*) const;
bool requiresCompositingWhenDescendantsAreCompositing(RenderObject*) const;
private:
diff --git a/WebCore/rendering/RenderListItem.cpp b/WebCore/rendering/RenderListItem.cpp
index 539b8c7..54a7dd2 100644
--- a/WebCore/rendering/RenderListItem.cpp
+++ b/WebCore/rendering/RenderListItem.cpp
@@ -1,7 +1,7 @@
/**
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
- * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
* Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
*
* This library is free software; you can redistribute it and/or
@@ -51,8 +51,8 @@ void RenderListItem::styleDidChange(StyleDifference diff, const RenderStyle* old
{
RenderBlock::styleDidChange(diff, oldStyle);
- if (style()->listStyleType() != LNONE ||
- (style()->listStyleImage() && !style()->listStyleImage()->errorOccurred())) {
+ if (style()->listStyleType() != NoneListStyle
+ || (style()->listStyleImage() && !style()->listStyleImage()->errorOccurred())) {
RefPtr<RenderStyle> newStyle = RenderStyle::create();
// The marker always inherits from the list item, regardless of where it might end
// up (e.g., in some deeply nested line box). See CSS3 spec.
@@ -75,11 +75,16 @@ void RenderListItem::destroy()
RenderBlock::destroy();
}
+static bool isList(Node* node)
+{
+ return (node->hasTagName(ulTag) || node->hasTagName(olTag));
+}
+
static Node* enclosingList(Node* node)
{
Node* parent = node->parentNode();
for (Node* n = parent; n; n = n->parentNode())
- if (n->hasTagName(ulTag) || n->hasTagName(olTag))
+ if (isList(n))
return n;
// If there's no actual <ul> or <ol> list element, then our parent acts as
// our list for purposes of determining what other list items should be
@@ -87,22 +92,38 @@ static Node* enclosingList(Node* node)
return parent;
}
+static Node* enclosingList(const RenderObject* renderer)
+{
+ Node* node = renderer->node();
+ if (node)
+ return enclosingList(node);
+
+ renderer = renderer->parent();
+ while (renderer && !renderer->node())
+ renderer = renderer->parent();
+
+ node = renderer->node();
+ if (isList(node))
+ return node;
+
+ return enclosingList(node);
+}
+
static RenderListItem* previousListItem(Node* list, const RenderListItem* item)
{
- for (Node* node = item->node()->traversePreviousNode(); node != list; node = node->traversePreviousNode()) {
- RenderObject* renderer = node->renderer();
- if (!renderer || !renderer->isListItem())
+ for (RenderObject* renderer = item->previousInPreOrder(); renderer != list->renderer(); renderer = renderer->previousInPreOrder()) {
+ if (!renderer->isListItem())
continue;
- Node* otherList = enclosingList(node);
+ Node* otherList = enclosingList(renderer);
// This item is part of our current list, so it's what we're looking for.
if (list == otherList)
return toRenderListItem(renderer);
// We found ourself inside another list; lets skip the rest of it.
- // Use traverseNextNode() here because the other list itself may actually
+ // Use nextInPreOrder() here because the other list itself may actually
// be a list item itself. We need to examine it, so we do this to counteract
- // the traversePreviousNode() that will be done by the loop.
+ // the previousInPreOrder() that will be done by the loop.
if (otherList)
- node = otherList->traverseNextNode();
+ renderer = otherList->renderer()->nextInPreOrder();
}
return 0;
}
@@ -111,7 +132,7 @@ inline int RenderListItem::calcValue() const
{
if (m_hasExplicitValue)
return m_explicitValue;
- Node* list = enclosingList(node());
+ Node* list = enclosingList(this);
// FIXME: This recurses to a possible depth of the length of the list.
// That's not good -- we need to change this to an iterative algorithm.
if (RenderListItem* previousItem = previousListItem(list, this))
@@ -322,6 +343,8 @@ void RenderListItem::explicitValueChanged()
void RenderListItem::setExplicitValue(int value)
{
+ ASSERT(node());
+
if (m_hasExplicitValue && m_explicitValue == value)
return;
m_explicitValue = value;
@@ -332,6 +355,8 @@ void RenderListItem::setExplicitValue(int value)
void RenderListItem::clearExplicitValue()
{
+ ASSERT(node());
+
if (!m_hasExplicitValue)
return;
m_hasExplicitValue = false;
diff --git a/WebCore/rendering/RenderListMarker.cpp b/WebCore/rendering/RenderListMarker.cpp
index eab4404..f67bc0f 100644
--- a/WebCore/rendering/RenderListMarker.cpp
+++ b/WebCore/rendering/RenderListMarker.cpp
@@ -3,6 +3,7 @@
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
+ * Copyright (C) 2010 Daniel Bates (dbates@intudata.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -97,6 +98,11 @@ static String toAlphabetic(int number, const UChar* alphabet, int alphabetSize)
return String(&letters[lettersSize - length], length);
}
+template <size_t size> static inline String toAlphabetic(int number, const UChar(&alphabet)[size])
+{
+ return toAlphabetic(number, alphabet, size);
+}
+
static int toHebrewUnder1000(int number, UChar letters[5])
{
// FIXME: CSS3 mentions various refinements not implemented here.
@@ -337,58 +343,128 @@ static String toCJKIdeographic(int number, const UChar table[16])
return String(characters, length);
}
+static UChar listMarkerSuffix(EListStyleType type)
+{
+ // Note, the following switch statement has been explicitly
+ // grouped by list-style-type suffix.
+ switch (type) {
+ case NoneListStyle:
+ case Disc:
+ case Circle:
+ case Square:
+ ASSERT_NOT_REACHED();
+ return ' ';
+ case Afar:
+ case Amharic:
+ case AmharicAbegede:
+ case Ethiopic:
+ case EthiopicAbegede:
+ case EthiopicAbegedeAmEt:
+ case EthiopicAbegedeGez:
+ case EthiopicAbegedeTiEr:
+ case EthiopicAbegedeTiEt:
+ case EthiopicHalehameAaEr:
+ case EthiopicHalehameAaEt:
+ case EthiopicHalehameAmEt:
+ case EthiopicHalehameGez:
+ case EthiopicHalehameOmEt:
+ case EthiopicHalehameSidEt:
+ case EthiopicHalehameSoEt:
+ case EthiopicHalehameTiEr:
+ case EthiopicHalehameTiEt:
+ case EthiopicHalehameTig:
+ case Oromo:
+ case Sidama:
+ case Somali:
+ case Tigre:
+ case TigrinyaEr:
+ case TigrinyaErAbegede:
+ case TigrinyaEt:
+ case TigrinyaEtAbegede:
+ return ethiopicPrefaceColon;
+ case Armenian:
+ case CJKIdeographic:
+ case CjkEarthlyBranch:
+ case CjkHeavenlyStem:
+ case DecimalLeadingZero:
+ case DecimalListStyle:
+ case Georgian:
+ case Hangul:
+ case HangulConsonant:
+ case Hebrew:
+ case Hiragana:
+ case HiraganaIroha:
+ case Katakana:
+ case KatakanaIroha:
+ case LowerAlpha:
+ case LowerGreek:
+ case LowerLatin:
+ case LowerNorwegian:
+ case LowerRoman:
+ case UpperAlpha:
+ case UpperGreek:
+ case UpperLatin:
+ case UpperNorwegian:
+ case UpperRoman:
+ return '.';
+ }
+
+ ASSERT_NOT_REACHED();
+ return '.';
+}
+
String listMarkerText(EListStyleType type, int value)
{
switch (type) {
- case LNONE:
+ case NoneListStyle:
return "";
// We use the same characters for text security.
// See RenderText::setInternalString.
- case CIRCLE:
+ case Circle:
return String(&whiteBullet, 1);
- case DISC:
+ case Disc:
return String(&bullet, 1);
- case SQUARE:
+ case Square:
// The CSS 2.1 test suite uses U+25EE BLACK MEDIUM SMALL SQUARE
// instead, but I think this looks better.
return String(&blackSquare, 1);
- case LDECIMAL:
+ case DecimalListStyle:
return String::number(value);
- case DECIMAL_LEADING_ZERO:
+ case DecimalLeadingZero:
if (value < -9 || value > 9)
return String::number(value);
if (value < 0)
return "-0" + String::number(-value); // -01 to -09
return "0" + String::number(value); // 00 to 09
- case LOWER_ALPHA:
- case LOWER_LATIN: {
+ case LowerAlpha:
+ case LowerLatin: {
static const UChar lowerLatinAlphabet[26] = {
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
};
- return toAlphabetic(value, lowerLatinAlphabet, 26);
+ return toAlphabetic(value, lowerLatinAlphabet);
}
- case UPPER_ALPHA:
- case UPPER_LATIN: {
+ case UpperAlpha:
+ case UpperLatin: {
static const UChar upperLatinAlphabet[26] = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
};
- return toAlphabetic(value, upperLatinAlphabet, 26);
+ return toAlphabetic(value, upperLatinAlphabet);
}
- case LOWER_GREEK: {
+ case LowerGreek: {
static const UChar lowerGreekAlphabet[24] = {
0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8,
0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0,
0x03C1, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9
};
- return toAlphabetic(value, lowerGreekAlphabet, 24);
+ return toAlphabetic(value, lowerGreekAlphabet);
}
- case HIRAGANA: {
+ case Hiragana: {
// FIXME: This table comes from the CSS3 draft, and is probably
// incorrect, given the comments in that draft.
static const UChar hiraganaAlphabet[48] = {
@@ -399,9 +475,9 @@ String listMarkerText(EListStyleType type, int value)
0x3080, 0x3081, 0x3082, 0x3084, 0x3086, 0x3088, 0x3089, 0x308A,
0x308B, 0x308C, 0x308D, 0x308F, 0x3090, 0x3091, 0x3092, 0x3093
};
- return toAlphabetic(value, hiraganaAlphabet, 48);
+ return toAlphabetic(value, hiraganaAlphabet);
}
- case HIRAGANA_IROHA: {
+ case HiraganaIroha: {
// FIXME: This table comes from the CSS3 draft, and is probably
// incorrect, given the comments in that draft.
static const UChar hiraganaIrohaAlphabet[47] = {
@@ -412,9 +488,9 @@ String listMarkerText(EListStyleType type, int value)
0x3053, 0x3048, 0x3066, 0x3042, 0x3055, 0x304D, 0x3086, 0x3081,
0x307F, 0x3057, 0x3091, 0x3072, 0x3082, 0x305B, 0x3059
};
- return toAlphabetic(value, hiraganaIrohaAlphabet, 47);
+ return toAlphabetic(value, hiraganaIrohaAlphabet);
}
- case KATAKANA: {
+ case Katakana: {
// FIXME: This table comes from the CSS3 draft, and is probably
// incorrect, given the comments in that draft.
static const UChar katakanaAlphabet[48] = {
@@ -425,9 +501,9 @@ String listMarkerText(EListStyleType type, int value)
0x30E0, 0x30E1, 0x30E2, 0x30E4, 0x30E6, 0x30E8, 0x30E9, 0x30EA,
0x30EB, 0x30EC, 0x30ED, 0x30EF, 0x30F0, 0x30F1, 0x30F2, 0x30F3
};
- return toAlphabetic(value, katakanaAlphabet, 48);
+ return toAlphabetic(value, katakanaAlphabet);
}
- case KATAKANA_IROHA: {
+ case KatakanaIroha: {
// FIXME: This table comes from the CSS3 draft, and is probably
// incorrect, given the comments in that draft.
static const UChar katakanaIrohaAlphabet[47] = {
@@ -438,10 +514,187 @@ String listMarkerText(EListStyleType type, int value)
0x30B3, 0x30A8, 0x30C6, 0x30A2, 0x30B5, 0x30AD, 0x30E6, 0x30E1,
0x30DF, 0x30B7, 0x30F1, 0x30D2, 0x30E2, 0x30BB, 0x30B9
};
- return toAlphabetic(value, katakanaIrohaAlphabet, 47);
+ return toAlphabetic(value, katakanaIrohaAlphabet);
}
- case CJK_IDEOGRAPHIC: {
+ case Afar:
+ case EthiopicHalehameAaEt:
+ case EthiopicHalehameAaEr: {
+ static const UChar ethiopicHalehameAaErAlphabet[18] = {
+ 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1260, 0x1270, 0x1290,
+ 0x12A0, 0x12A8, 0x12C8, 0x12D0, 0x12E8, 0x12F0, 0x1308, 0x1338, 0x1348
+ };
+ return toAlphabetic(value, ethiopicHalehameAaErAlphabet);
+ }
+ case Amharic:
+ case EthiopicHalehameAmEt: {
+ static const UChar ethiopicHalehameAmEtAlphabet[33] = {
+ 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 0x1238, 0x1240,
+ 0x1260, 0x1270, 0x1278, 0x1280, 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12B8,
+ 0x12C8, 0x12D0, 0x12D8, 0x12E0, 0x12E8, 0x12F0, 0x1300, 0x1308, 0x1320,
+ 0x1328, 0x1330, 0x1338, 0x1340, 0x1348, 0x1350
+ };
+ return toAlphabetic(value, ethiopicHalehameAmEtAlphabet);
+ }
+ case AmharicAbegede:
+ case EthiopicAbegedeAmEt: {
+ static const UChar ethiopicAbegedeAmEtAlphabet[33] = {
+ 0x12A0, 0x1260, 0x1308, 0x12F0, 0x1300, 0x1200, 0x12C8, 0x12D8, 0x12E0,
+ 0x1210, 0x1320, 0x1328, 0x12E8, 0x12A8, 0x12B8, 0x1208, 0x1218, 0x1290,
+ 0x1298, 0x1220, 0x12D0, 0x1348, 0x1338, 0x1240, 0x1228, 0x1230, 0x1238,
+ 0x1270, 0x1278, 0x1280, 0x1340, 0x1330, 0x1350
+ };
+ return toAlphabetic(value, ethiopicAbegedeAmEtAlphabet);
+ }
+ case CjkEarthlyBranch: {
+ static const UChar cjkEarthlyBranchAlphabet[12] = {
+ 0x5B50, 0x4E11, 0x5BC5, 0x536F, 0x8FB0, 0x5DF3, 0x5348, 0x672A, 0x7533,
+ 0x9149, 0x620C, 0x4EA5
+ };
+ return toAlphabetic(value, cjkEarthlyBranchAlphabet);
+ }
+ case CjkHeavenlyStem: {
+ static const UChar cjkHeavenlyStemAlphabet[10] = {
+ 0x7532, 0x4E59, 0x4E19, 0x4E01, 0x620A, 0x5DF1, 0x5E9A, 0x8F9B, 0x58EC,
+ 0x7678
+ };
+ return toAlphabetic(value, cjkHeavenlyStemAlphabet);
+ }
+ case Ethiopic:
+ case EthiopicHalehameGez: {
+ static const UChar ethiopicHalehameGezAlphabet[26] = {
+ 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 0x1240, 0x1260,
+ 0x1270, 0x1280, 0x1290, 0x12A0, 0x12A8, 0x12C8, 0x12D0, 0x12D8, 0x12E8,
+ 0x12F0, 0x1308, 0x1320, 0x1330, 0x1338, 0x1340, 0x1348, 0x1350
+ };
+ return toAlphabetic(value, ethiopicHalehameGezAlphabet);
+ }
+ case EthiopicAbegede:
+ case EthiopicAbegedeGez: {
+ static const UChar ethiopicAbegedeGezAlphabet[26] = {
+ 0x12A0, 0x1260, 0x1308, 0x12F0, 0x1200, 0x12C8, 0x12D8, 0x1210, 0x1320,
+ 0x12E8, 0x12A8, 0x1208, 0x1218, 0x1290, 0x1220, 0x12D0, 0x1348, 0x1338,
+ 0x1240, 0x1228, 0x1230, 0x1270, 0x1280, 0x1340, 0x1330, 0x1350
+ };
+ return toAlphabetic(value, ethiopicAbegedeGezAlphabet);
+ }
+ case HangulConsonant: {
+ static const UChar hangulConsonantAlphabet[14] = {
+ 0x3131, 0x3134, 0x3137, 0x3139, 0x3141, 0x3142, 0x3145, 0x3147, 0x3148,
+ 0x314A, 0x314B, 0x314C, 0x314D, 0x314E
+ };
+ return toAlphabetic(value, hangulConsonantAlphabet);
+ }
+ case Hangul: {
+ static const UChar hangulAlphabet[14] = {
+ 0xAC00, 0xB098, 0xB2E4, 0xB77C, 0xB9C8, 0xBC14, 0xC0AC, 0xC544, 0xC790,
+ 0xCC28, 0xCE74, 0xD0C0, 0xD30C, 0xD558
+ };
+ return toAlphabetic(value, hangulAlphabet);
+ }
+ case Oromo:
+ case EthiopicHalehameOmEt: {
+ static const UChar ethiopicHalehameOmEtAlphabet[25] = {
+ 0x1200, 0x1208, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260, 0x1270,
+ 0x1278, 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12C8, 0x12E8, 0x12F0, 0x12F8,
+ 0x1300, 0x1308, 0x1320, 0x1328, 0x1338, 0x1330, 0x1348
+ };
+ return toAlphabetic(value, ethiopicHalehameOmEtAlphabet);
+ }
+ case Sidama:
+ case EthiopicHalehameSidEt: {
+ static const UChar ethiopicHalehameSidEtAlphabet[26] = {
+ 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260,
+ 0x1270, 0x1278, 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12C8, 0x12E8, 0x12F0,
+ 0x12F8, 0x1300, 0x1308, 0x1320, 0x1328, 0x1338, 0x1330, 0x1348
+ };
+ return toAlphabetic(value, ethiopicHalehameSidEtAlphabet);
+ }
+ case Somali:
+ case EthiopicHalehameSoEt: {
+ static const UChar ethiopicHalehameSoEtAlphabet[22] = {
+ 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260,
+ 0x1270, 0x1290, 0x12A0, 0x12A8, 0x12B8, 0x12C8, 0x12D0, 0x12E8, 0x12F0,
+ 0x1300, 0x1308, 0x1338, 0x1348
+ };
+ return toAlphabetic(value, ethiopicHalehameSoEtAlphabet);
+ }
+ case Tigre:
+ case EthiopicHalehameTig: {
+ static const UChar ethiopicHalehameTigAlphabet[27] = {
+ 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260,
+ 0x1270, 0x1278, 0x1290, 0x12A0, 0x12A8, 0x12C8, 0x12D0, 0x12D8, 0x12E8,
+ 0x12F0, 0x1300, 0x1308, 0x1320, 0x1328, 0x1338, 0x1330, 0x1348, 0x1350
+ };
+ return toAlphabetic(value, ethiopicHalehameTigAlphabet);
+ }
+ case TigrinyaEr:
+ case EthiopicHalehameTiEr: {
+ static const UChar ethiopicHalehameTiErAlphabet[31] = {
+ 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1250,
+ 0x1260, 0x1270, 0x1278, 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12B8, 0x12C8,
+ 0x12D0, 0x12D8, 0x12E0, 0x12E8, 0x12F0, 0x1300, 0x1308, 0x1320, 0x1328,
+ 0x1330, 0x1338, 0x1348, 0x1350
+ };
+ return toAlphabetic(value, ethiopicHalehameTiErAlphabet);
+ }
+ case TigrinyaErAbegede:
+ case EthiopicAbegedeTiEr: {
+ static const UChar ethiopicAbegedeTiErAlphabet[31] = {
+ 0x12A0, 0x1260, 0x1308, 0x12F0, 0x1300, 0x1200, 0x12C8, 0x12D8, 0x12E0,
+ 0x1210, 0x1320, 0x1328, 0x12E8, 0x12A8, 0x12B8, 0x1208, 0x1218, 0x1290,
+ 0x1298, 0x12D0, 0x1348, 0x1338, 0x1240, 0x1250, 0x1228, 0x1230, 0x1238,
+ 0x1270, 0x1278, 0x1330, 0x1350
+ };
+ return toAlphabetic(value, ethiopicAbegedeTiErAlphabet);
+ }
+ case TigrinyaEt:
+ case EthiopicHalehameTiEt: {
+ static const UChar ethiopicHalehameTiEtAlphabet[34] = {
+ 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 0x1238, 0x1240,
+ 0x1250, 0x1260, 0x1270, 0x1278, 0x1280, 0x1290, 0x1298, 0x12A0, 0x12A8,
+ 0x12B8, 0x12C8, 0x12D0, 0x12D8, 0x12E0, 0x12E8, 0x12F0, 0x1300, 0x1308,
+ 0x1320, 0x1328, 0x1330, 0x1338, 0x1340, 0x1348, 0x1350
+ };
+ return toAlphabetic(value, ethiopicHalehameTiEtAlphabet);
+ }
+ case TigrinyaEtAbegede:
+ case EthiopicAbegedeTiEt: {
+ static const UChar ethiopicAbegedeTiEtAlphabet[34] = {
+ 0x12A0, 0x1260, 0x1308, 0x12F0, 0x1300, 0x1200, 0x12C8, 0x12D8, 0x12E0,
+ 0x1210, 0x1320, 0x1328, 0x12E8, 0x12A8, 0x12B8, 0x1208, 0x1218, 0x1290,
+ 0x1298, 0x1220, 0x12D0, 0x1348, 0x1338, 0x1240, 0x1250, 0x1228, 0x1230,
+ 0x1238, 0x1270, 0x1278, 0x1280, 0x1340, 0x1330, 0x1350
+ };
+ return toAlphabetic(value, ethiopicAbegedeTiEtAlphabet);
+ }
+ case UpperGreek: {
+ static const UChar upperGreekAlphabet[24] = {
+ 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399,
+ 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, 0x03A0, 0x03A1, 0x03A3,
+ 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9
+ };
+ return toAlphabetic(value, upperGreekAlphabet);
+ }
+ case LowerNorwegian: {
+ static const UChar lowerNorwegianAlphabet[29] = {
+ 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069,
+ 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F, 0x0070, 0x0071, 0x0072,
+ 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x00E6,
+ 0x00F8, 0x00E5
+ };
+ return toAlphabetic(value, lowerNorwegianAlphabet);
+ }
+ case UpperNorwegian: {
+ static const UChar upperNorwegianAlphabet[29] = {
+ 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049,
+ 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, 0x0051, 0x0052,
+ 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x00C6,
+ 0x00D8, 0x00C5
+ };
+ return toAlphabetic(value, upperNorwegianAlphabet);
+ }
+ case CJKIdeographic: {
static const UChar traditionalChineseInformalTable[16] = {
0x842C, 0x5104, 0x5146,
0x5341, 0x767E, 0x5343,
@@ -451,19 +704,19 @@ String listMarkerText(EListStyleType type, int value)
return toCJKIdeographic(value, traditionalChineseInformalTable);
}
- case LOWER_ROMAN:
+ case LowerRoman:
return toRoman(value, false);
- case UPPER_ROMAN:
+ case UpperRoman:
return toRoman(value, true);
- case ARMENIAN:
+ case Armenian:
// CSS3 says "armenian" means "lower-armenian".
// But the CSS2.1 test suite contains uppercase test results for "armenian",
// so we'll match the test suite.
return toArmenian(value, true);
- case GEORGIAN:
+ case Georgian:
return toGeorgian(value);
- case HEBREW:
+ case Hebrew:
return toHebrew(value);
}
@@ -519,6 +772,15 @@ bool RenderListMarker::isImage() const
return m_image && !m_image->errorOccurred();
}
+IntRect RenderListMarker::localSelectionRect()
+{
+ InlineBox* box = inlineBoxWrapper();
+ if (!box)
+ return IntRect();
+ RootInlineBox* root = box->root();
+ return IntRect(x(), root->selectionTop() - y(), width(), root->selectionHeight());
+}
+
void RenderListMarker::paint(PaintInfo& paintInfo, int tx, int ty)
{
if (paintInfo.phase != PaintPhaseForeground)
@@ -547,8 +809,9 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int tx, int ty)
#endif
context->drawImage(m_image->image(this, marker.size()), style()->colorSpace(), marker.location());
if (selectionState() != SelectionNone) {
- // FIXME: selectionRect() is in absolute, not painting coordinates.
- context->fillRect(selectionRect(), selectionBackgroundColor(), style()->colorSpace());
+ IntRect selRect = localSelectionRect();
+ selRect.move(tx, ty);
+ context->fillRect(selRect, selectionBackgroundColor(), style()->colorSpace());
}
return;
}
@@ -560,8 +823,9 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int tx, int ty)
#endif
if (selectionState() != SelectionNone) {
- // FIXME: selectionRect() is in absolute, not painting coordinates.
- context->fillRect(selectionRect(), selectionBackgroundColor(), style()->colorSpace());
+ IntRect selRect = localSelectionRect();
+ selRect.move(tx, ty);
+ context->fillRect(selRect, selectionBackgroundColor(), style()->colorSpace());
}
const Color color(style()->color());
@@ -570,36 +834,71 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int tx, int ty)
context->setStrokeThickness(1.0f);
context->setFillColor(color, style()->colorSpace());
- switch (style()->listStyleType()) {
- case DISC:
+ EListStyleType type = style()->listStyleType();
+ switch (type) {
+ case Disc:
context->drawEllipse(marker);
return;
- case CIRCLE:
+ case Circle:
context->setFillColor(Color::transparent, DeviceColorSpace);
context->drawEllipse(marker);
return;
- case SQUARE:
+ case Square:
context->drawRect(marker);
return;
- case LNONE:
+ case NoneListStyle:
return;
- case ARMENIAN:
- case CJK_IDEOGRAPHIC:
- case DECIMAL_LEADING_ZERO:
- case GEORGIAN:
- case HEBREW:
- case HIRAGANA:
- case HIRAGANA_IROHA:
- case KATAKANA:
- case KATAKANA_IROHA:
- case LDECIMAL:
- case LOWER_ALPHA:
- case LOWER_GREEK:
- case LOWER_LATIN:
- case LOWER_ROMAN:
- case UPPER_ALPHA:
- case UPPER_LATIN:
- case UPPER_ROMAN:
+ case Afar:
+ case Amharic:
+ case AmharicAbegede:
+ case Armenian:
+ case CJKIdeographic:
+ case CjkEarthlyBranch:
+ case CjkHeavenlyStem:
+ case DecimalLeadingZero:
+ case DecimalListStyle:
+ case Ethiopic:
+ case EthiopicAbegede:
+ case EthiopicAbegedeAmEt:
+ case EthiopicAbegedeGez:
+ case EthiopicAbegedeTiEr:
+ case EthiopicAbegedeTiEt:
+ case EthiopicHalehameAaEr:
+ case EthiopicHalehameAaEt:
+ case EthiopicHalehameAmEt:
+ case EthiopicHalehameGez:
+ case EthiopicHalehameOmEt:
+ case EthiopicHalehameSidEt:
+ case EthiopicHalehameSoEt:
+ case EthiopicHalehameTiEr:
+ case EthiopicHalehameTiEt:
+ case EthiopicHalehameTig:
+ case Georgian:
+ case Hangul:
+ case HangulConsonant:
+ case Hebrew:
+ case Hiragana:
+ case HiraganaIroha:
+ case Katakana:
+ case KatakanaIroha:
+ case LowerAlpha:
+ case LowerGreek:
+ case LowerLatin:
+ case LowerNorwegian:
+ case LowerRoman:
+ case Oromo:
+ case Sidama:
+ case Somali:
+ case Tigre:
+ case TigrinyaEr:
+ case TigrinyaErAbegede:
+ case TigrinyaEt:
+ case TigrinyaEtAbegede:
+ case UpperAlpha:
+ case UpperGreek:
+ case UpperLatin:
+ case UpperNorwegian:
+ case UpperRoman:
break;
}
if (m_text.isEmpty())
@@ -620,16 +919,17 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int tx, int ty)
}
const Font& font = style()->font();
+ const UChar suffix = listMarkerSuffix(type);
if (style()->direction() == LTR) {
int width = font.width(textRun);
context->drawText(style()->font(), textRun, marker.location());
- const UChar periodSpace[2] = { '.', ' ' };
- context->drawText(style()->font(), TextRun(periodSpace, 2), marker.location() + IntSize(width, 0));
+ UChar suffixSpace[2] = { suffix, ' ' };
+ context->drawText(style()->font(), TextRun(suffixSpace, 2), marker.location() + IntSize(width, 0));
} else {
- const UChar spacePeriod[2] = { ' ', '.' };
- TextRun spacePeriodRun(spacePeriod, 2);
- int width = font.width(spacePeriodRun);
- context->drawText(style()->font(), spacePeriodRun, marker.location());
+ UChar spaceSuffix[2] = { ' ', suffix };
+ TextRun spaceSuffixRun(spaceSuffix, 2);
+ int width = font.width(spaceSuffixRun);
+ context->drawText(style()->font(), spaceSuffixRun, marker.location());
context->drawText(style()->font(), textRun, marker.location() + IntSize(width, 0));
}
}
@@ -693,39 +993,73 @@ void RenderListMarker::calcPrefWidths()
int width = 0;
EListStyleType type = style()->listStyleType();
switch (type) {
- case LNONE:
+ case NoneListStyle:
break;
- case CIRCLE:
- case DISC:
- case SQUARE:
+ case Circle:
+ case Disc:
+ case Square:
m_text = listMarkerText(type, 0); // value is ignored for these types
width = (font.ascent() * 2 / 3 + 1) / 2 + 2;
break;
- case ARMENIAN:
- case CJK_IDEOGRAPHIC:
- case DECIMAL_LEADING_ZERO:
- case GEORGIAN:
- case HEBREW:
- case HIRAGANA:
- case HIRAGANA_IROHA:
- case KATAKANA:
- case KATAKANA_IROHA:
- case LDECIMAL:
- case LOWER_ALPHA:
- case LOWER_GREEK:
- case LOWER_LATIN:
- case LOWER_ROMAN:
- case UPPER_ALPHA:
- case UPPER_LATIN:
- case UPPER_ROMAN:
+ case Afar:
+ case Amharic:
+ case AmharicAbegede:
+ case Armenian:
+ case CJKIdeographic:
+ case CjkEarthlyBranch:
+ case CjkHeavenlyStem:
+ case DecimalLeadingZero:
+ case DecimalListStyle:
+ case Ethiopic:
+ case EthiopicAbegede:
+ case EthiopicAbegedeAmEt:
+ case EthiopicAbegedeGez:
+ case EthiopicAbegedeTiEr:
+ case EthiopicAbegedeTiEt:
+ case EthiopicHalehameAaEr:
+ case EthiopicHalehameAaEt:
+ case EthiopicHalehameAmEt:
+ case EthiopicHalehameGez:
+ case EthiopicHalehameOmEt:
+ case EthiopicHalehameSidEt:
+ case EthiopicHalehameSoEt:
+ case EthiopicHalehameTiEr:
+ case EthiopicHalehameTiEt:
+ case EthiopicHalehameTig:
+ case Georgian:
+ case Hangul:
+ case HangulConsonant:
+ case Hebrew:
+ case Hiragana:
+ case HiraganaIroha:
+ case Katakana:
+ case KatakanaIroha:
+ case LowerAlpha:
+ case LowerGreek:
+ case LowerLatin:
+ case LowerNorwegian:
+ case LowerRoman:
+ case Oromo:
+ case Sidama:
+ case Somali:
+ case Tigre:
+ case TigrinyaEr:
+ case TigrinyaErAbegede:
+ case TigrinyaEt:
+ case TigrinyaEtAbegede:
+ case UpperAlpha:
+ case UpperGreek:
+ case UpperLatin:
+ case UpperNorwegian:
+ case UpperRoman:
m_text = listMarkerText(type, m_listItem->value());
if (m_text.isEmpty())
width = 0;
else {
int itemWidth = font.width(m_text);
- const UChar periodSpace[2] = { '.', ' ' };
- int periodSpaceWidth = font.width(TextRun(periodSpace, 2));
- width = itemWidth + periodSpaceWidth;
+ UChar suffixSpace[2] = { listMarkerSuffix(type), ' ' };
+ int suffixSpaceWidth = font.width(TextRun(suffixSpace, 2));
+ width = itemWidth + suffixSpaceWidth;
}
break;
}
@@ -752,9 +1086,9 @@ void RenderListMarker::updateMargins()
else
marginLeft = cMarkerPadding;
} else switch (style()->listStyleType()) {
- case DISC:
- case CIRCLE:
- case SQUARE:
+ case Disc:
+ case Circle:
+ case Square:
if (style()->direction() == LTR) {
marginLeft = -1;
marginRight = font.ascent() - minPrefWidth() + 1;
@@ -773,12 +1107,12 @@ void RenderListMarker::updateMargins()
else {
int offset = font.ascent() * 2 / 3;
switch (style()->listStyleType()) {
- case DISC:
- case CIRCLE:
- case SQUARE:
+ case Disc:
+ case Circle:
+ case Square:
marginLeft = -offset - cMarkerPadding - 1;
break;
- case LNONE:
+ case NoneListStyle:
break;
default:
marginLeft = m_text.isEmpty() ? 0 : -minPrefWidth() - offset / 2;
@@ -790,12 +1124,12 @@ void RenderListMarker::updateMargins()
else {
int offset = font.ascent() * 2 / 3;
switch (style()->listStyleType()) {
- case DISC:
- case CIRCLE:
- case SQUARE:
+ case Disc:
+ case Circle:
+ case Square:
marginLeft = offset + cMarkerPadding + 1 - minPrefWidth();
break;
- case LNONE:
+ case NoneListStyle:
break;
default:
marginLeft = m_text.isEmpty() ? 0 : offset / 2;
@@ -835,42 +1169,77 @@ IntRect RenderListMarker::getRelativeMarkerRect()
if (isImage())
return IntRect(x(), y(), m_image->imageSize(this, style()->effectiveZoom()).width(), m_image->imageSize(this, style()->effectiveZoom()).height());
- switch (style()->listStyleType()) {
- case DISC:
- case CIRCLE:
- case SQUARE: {
+ EListStyleType type = style()->listStyleType();
+ switch (type) {
+ case Disc:
+ case Circle:
+ case Square: {
// FIXME: Are these particular rounding rules necessary?
const Font& font = style()->font();
int ascent = font.ascent();
int bulletWidth = (ascent * 2 / 3 + 1) / 2;
return IntRect(x() + 1, y() + 3 * (ascent - ascent * 2 / 3) / 2, bulletWidth, bulletWidth);
}
- case LNONE:
+ case NoneListStyle:
return IntRect();
- case ARMENIAN:
- case CJK_IDEOGRAPHIC:
- case DECIMAL_LEADING_ZERO:
- case GEORGIAN:
- case HEBREW:
- case HIRAGANA:
- case HIRAGANA_IROHA:
- case KATAKANA:
- case KATAKANA_IROHA:
- case LDECIMAL:
- case LOWER_ALPHA:
- case LOWER_GREEK:
- case LOWER_LATIN:
- case LOWER_ROMAN:
- case UPPER_ALPHA:
- case UPPER_LATIN:
- case UPPER_ROMAN:
+ case Afar:
+ case Amharic:
+ case AmharicAbegede:
+ case Armenian:
+ case CJKIdeographic:
+ case CjkEarthlyBranch:
+ case CjkHeavenlyStem:
+ case DecimalLeadingZero:
+ case DecimalListStyle:
+ case Ethiopic:
+ case EthiopicAbegede:
+ case EthiopicAbegedeAmEt:
+ case EthiopicAbegedeGez:
+ case EthiopicAbegedeTiEr:
+ case EthiopicAbegedeTiEt:
+ case EthiopicHalehameAaEr:
+ case EthiopicHalehameAaEt:
+ case EthiopicHalehameAmEt:
+ case EthiopicHalehameGez:
+ case EthiopicHalehameOmEt:
+ case EthiopicHalehameSidEt:
+ case EthiopicHalehameSoEt:
+ case EthiopicHalehameTiEr:
+ case EthiopicHalehameTiEt:
+ case EthiopicHalehameTig:
+ case Georgian:
+ case Hangul:
+ case HangulConsonant:
+ case Hebrew:
+ case Hiragana:
+ case HiraganaIroha:
+ case Katakana:
+ case KatakanaIroha:
+ case LowerAlpha:
+ case LowerGreek:
+ case LowerLatin:
+ case LowerNorwegian:
+ case LowerRoman:
+ case Oromo:
+ case Sidama:
+ case Somali:
+ case Tigre:
+ case TigrinyaEr:
+ case TigrinyaErAbegede:
+ case TigrinyaEt:
+ case TigrinyaEtAbegede:
+ case UpperAlpha:
+ case UpperGreek:
+ case UpperLatin:
+ case UpperNorwegian:
+ case UpperRoman:
if (m_text.isEmpty())
return IntRect();
const Font& font = style()->font();
int itemWidth = font.width(m_text);
- const UChar periodSpace[2] = { '.', ' ' };
- int periodSpaceWidth = font.width(TextRun(periodSpace, 2));
- return IntRect(x(), y() + font.ascent(), itemWidth + periodSpaceWidth, font.height());
+ UChar suffixSpace[2] = { listMarkerSuffix(type), ' ' };
+ int suffixSpaceWidth = font.width(TextRun(suffixSpace, 2));
+ return IntRect(x(), y() + font.ascent(), itemWidth + suffixSpaceWidth, font.height());
}
return IntRect();
diff --git a/WebCore/rendering/RenderListMarker.h b/WebCore/rendering/RenderListMarker.h
index 5b46278..971877b 100644
--- a/WebCore/rendering/RenderListMarker.h
+++ b/WebCore/rendering/RenderListMarker.h
@@ -73,6 +73,7 @@ private:
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
IntRect getRelativeMarkerRect();
+ IntRect localSelectionRect();
String m_text;
RefPtr<StyleImage> m_image;
diff --git a/WebCore/rendering/RenderMedia.cpp b/WebCore/rendering/RenderMedia.cpp
index 2ff50df..8acebfb 100644
--- a/WebCore/rendering/RenderMedia.cpp
+++ b/WebCore/rendering/RenderMedia.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 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
@@ -45,32 +45,30 @@ using namespace HTMLNames;
static const double cTimeUpdateRepeatDelay = 0.2;
static const double cOpacityAnimationRepeatDelay = 0.05;
-// FIXME get this from style
-static const double cOpacityAnimationDurationFadeIn = 0.1;
-static const double cOpacityAnimationDurationFadeOut = 0.3;
RenderMedia::RenderMedia(HTMLMediaElement* video)
- : RenderReplaced(video)
+ : RenderImage(video)
, m_timeUpdateTimer(this, &RenderMedia::timeUpdateTimerFired)
, m_opacityAnimationTimer(this, &RenderMedia::opacityAnimationTimerFired)
, m_mouseOver(false)
, m_opacityAnimationStartTime(0)
- , m_opacityAnimationDuration(cOpacityAnimationDurationFadeIn)
+ , m_opacityAnimationDuration(0)
, m_opacityAnimationFrom(0)
, m_opacityAnimationTo(1.0f)
{
}
RenderMedia::RenderMedia(HTMLMediaElement* video, const IntSize& intrinsicSize)
- : RenderReplaced(video, intrinsicSize)
+ : RenderImage(video)
, m_timeUpdateTimer(this, &RenderMedia::timeUpdateTimerFired)
, m_opacityAnimationTimer(this, &RenderMedia::opacityAnimationTimerFired)
, m_mouseOver(false)
, m_opacityAnimationStartTime(0)
- , m_opacityAnimationDuration(cOpacityAnimationDurationFadeIn)
+ , m_opacityAnimationDuration(0)
, m_opacityAnimationFrom(0)
, m_opacityAnimationTo(1.0f)
{
+ setIntrinsicSize(intrinsicSize);
}
RenderMedia::~RenderMedia()
@@ -89,7 +87,7 @@ void RenderMedia::destroy()
m_controlsShadowRoot->detach();
m_controlsShadowRoot = 0;
}
- RenderReplaced::destroy();
+ RenderImage::destroy();
}
HTMLMediaElement* RenderMedia::mediaElement() const
@@ -104,7 +102,7 @@ MediaPlayer* RenderMedia::player() const
void RenderMedia::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
- RenderReplaced::styleDidChange(diff, oldStyle);
+ RenderImage::styleDidChange(diff, oldStyle);
if (m_controlsShadowRoot) {
if (m_panel)
@@ -146,7 +144,7 @@ void RenderMedia::layout()
{
IntSize oldSize = contentBoxRect().size();
- RenderReplaced::layout();
+ RenderImage::layout();
RenderBox* controlsRenderer = m_controlsShadowRoot ? m_controlsShadowRoot->renderBox() : 0;
if (!controlsRenderer)
@@ -452,9 +450,9 @@ void RenderMedia::updateControlVisibility()
}
if (animateFrom < animateTo)
- m_opacityAnimationDuration = cOpacityAnimationDurationFadeIn;
+ m_opacityAnimationDuration = m_panel->renderer()->theme()->mediaControlsFadeInDuration();
else
- m_opacityAnimationDuration = cOpacityAnimationDurationFadeOut;
+ m_opacityAnimationDuration = m_panel->renderer()->theme()->mediaControlsFadeOutDuration();
m_opacityAnimationFrom = animateFrom;
m_opacityAnimationTo = animateTo;
@@ -573,7 +571,7 @@ void RenderMedia::forwardEvent(Event* event)
int RenderMedia::lowestPosition(bool includeOverflowInterior, bool includeSelf) const
{
- int bottom = RenderReplaced::lowestPosition(includeOverflowInterior, includeSelf);
+ int bottom = RenderImage::lowestPosition(includeOverflowInterior, includeSelf);
if (!m_controlsShadowRoot || !m_controlsShadowRoot->renderer())
return bottom;
@@ -582,7 +580,7 @@ int RenderMedia::lowestPosition(bool includeOverflowInterior, bool includeSelf)
int RenderMedia::rightmostPosition(bool includeOverflowInterior, bool includeSelf) const
{
- int right = RenderReplaced::rightmostPosition(includeOverflowInterior, includeSelf);
+ int right = RenderImage::rightmostPosition(includeOverflowInterior, includeSelf);
if (!m_controlsShadowRoot || !m_controlsShadowRoot->renderer())
return right;
@@ -591,7 +589,7 @@ int RenderMedia::rightmostPosition(bool includeOverflowInterior, bool includeSel
int RenderMedia::leftmostPosition(bool includeOverflowInterior, bool includeSelf) const
{
- int left = RenderReplaced::leftmostPosition(includeOverflowInterior, includeSelf);
+ int left = RenderImage::leftmostPosition(includeOverflowInterior, includeSelf);
if (!m_controlsShadowRoot || !m_controlsShadowRoot->renderer())
return left;
diff --git a/WebCore/rendering/RenderMedia.h b/WebCore/rendering/RenderMedia.h
index 066b83d..0d24c4c 100644
--- a/WebCore/rendering/RenderMedia.h
+++ b/WebCore/rendering/RenderMedia.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 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
@@ -28,7 +28,7 @@
#if ENABLE(VIDEO)
-#include "RenderReplaced.h"
+#include "RenderImage.h"
#include "Timer.h"
namespace WebCore {
@@ -51,12 +51,12 @@ class MediaControlVolumeSliderContainerElement;
class MediaControlElement;
class MediaPlayer;
-class RenderMedia : public RenderReplaced {
+class RenderMedia : public RenderImage {
public:
RenderMedia(HTMLMediaElement*);
RenderMedia(HTMLMediaElement*, const IntSize& intrinsicSize);
virtual ~RenderMedia();
-
+
const RenderObjectChildList* children() const { return &m_children; }
RenderObjectChildList* children() { return &m_children; }
@@ -83,6 +83,7 @@ private:
virtual const char* renderName() const { return "RenderMedia"; }
virtual bool isMedia() const { return true; }
+ virtual bool isImage() const { return false; }
virtual int lowestPosition(bool includeOverflowInterior = true, bool includeSelf = true) const;
virtual int rightmostPosition(bool includeOverflowInterior = true, bool includeSelf = true) const;
diff --git a/WebCore/rendering/RenderMenuList.cpp b/WebCore/rendering/RenderMenuList.cpp
index cbbc7cb..05a9873 100644
--- a/WebCore/rendering/RenderMenuList.cpp
+++ b/WebCore/rendering/RenderMenuList.cpp
@@ -1,7 +1,7 @@
/*
* This file is part of the select element renderer in WebCore.
*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
* 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
*
* This library is free software; you can redistribute it and/or
@@ -24,6 +24,7 @@
#include "config.h"
#include "RenderMenuList.h"
+#include "AXObjectCache.h"
#include "CSSStyleSelector.h"
#include "Frame.h"
#include "FrameView.h"
@@ -50,6 +51,7 @@ RenderMenuList::RenderMenuList(Element* element)
, m_innerBlock(0)
, m_optionsChanged(true)
, m_optionsWidth(0)
+ , m_lastSelectedIndex(-1)
, m_popup(0)
, m_popupIsVisible(false)
{
@@ -306,10 +308,25 @@ void RenderMenuList::valueChanged(unsigned listIndex, bool fireOnChange)
select->setSelectedIndexByUser(select->listToOptionIndex(listIndex), true, fireOnChange);
}
+void RenderMenuList::didSetSelectedIndex()
+{
+ int index = selectedIndex();
+ if (m_lastSelectedIndex == index)
+ return;
+
+ m_lastSelectedIndex = index;
+
+ if (AXObjectCache::accessibilityEnabled())
+ document()->axObjectCache()->postNotification(this, AXObjectCache::AXMenuListValueChanged, true, PostSynchronously);
+}
+
String RenderMenuList::itemText(unsigned listIndex) const
{
SelectElement* select = toSelectElement(static_cast<Element*>(node()));
- Element* element = select->listItems()[listIndex];
+ const Vector<Element*>& listItems = select->listItems();
+ if (listIndex >= listItems.size())
+ return String();
+ Element* element = listItems[listIndex];
if (OptionGroupElement* optionGroupElement = toOptionGroupElement(element))
return optionGroupElement->groupLabelText();
else if (OptionElement* optionElement = toOptionElement(element))
@@ -320,14 +337,20 @@ String RenderMenuList::itemText(unsigned listIndex) const
String RenderMenuList::itemToolTip(unsigned listIndex) const
{
SelectElement* select = toSelectElement(static_cast<Element*>(node()));
- Element* element = select->listItems()[listIndex];
+ const Vector<Element*>& listItems = select->listItems();
+ if (listIndex >= listItems.size())
+ return String();
+ Element* element = listItems[listIndex];
return element->title();
}
bool RenderMenuList::itemIsEnabled(unsigned listIndex) const
{
SelectElement* select = toSelectElement(static_cast<Element*>(node()));
- Element* element = select->listItems()[listIndex];
+ const Vector<Element*>& listItems = select->listItems();
+ if (listIndex >= listItems.size())
+ return false;
+ Element* element = listItems[listIndex];
if (!isOptionElement(element))
return false;
@@ -345,7 +368,18 @@ bool RenderMenuList::itemIsEnabled(unsigned listIndex) const
PopupMenuStyle RenderMenuList::itemStyle(unsigned listIndex) const
{
SelectElement* select = toSelectElement(static_cast<Element*>(node()));
- Element* element = select->listItems()[listIndex];
+ const Vector<Element*>& listItems = select->listItems();
+ if (listIndex >= listItems.size()) {
+ // If we are making an out of bounds access, then we want to use the style
+ // of a different option element (index 0). However, if there isn't an option element
+ // before at index 0, we fall back to the menu's style.
+ if (!listIndex)
+ return menuStyle();
+
+ // Try to retrieve the style of an option element we know exists (index 0).
+ listIndex = 0;
+ }
+ Element* element = listItems[listIndex];
RenderStyle* style = element->renderStyle() ? element->renderStyle() : element->computedStyle();
return style ? PopupMenuStyle(style->color(), itemBackgroundColor(listIndex), style->font(), style->visibility() == VISIBLE, style->textIndent(), style->direction()) : menuStyle();
@@ -354,7 +388,10 @@ PopupMenuStyle RenderMenuList::itemStyle(unsigned listIndex) const
Color RenderMenuList::itemBackgroundColor(unsigned listIndex) const
{
SelectElement* select = toSelectElement(static_cast<Element*>(node()));
- Element* element = select->listItems()[listIndex];
+ const Vector<Element*>& listItems = select->listItems();
+ if (listIndex >= listItems.size())
+ return style()->backgroundColor();
+ Element* element = listItems[listIndex];
Color backgroundColor;
if (element->renderStyle())
@@ -374,7 +411,6 @@ Color RenderMenuList::itemBackgroundColor(unsigned listIndex) const
PopupMenuStyle RenderMenuList::menuStyle() const
{
-
RenderStyle* s = m_innerBlock ? m_innerBlock->style() : style();
return PopupMenuStyle(s->color(), s->backgroundColor(), s->font(), s->visibility() == VISIBLE, s->textIndent(), s->direction());
}
@@ -410,8 +446,19 @@ int RenderMenuList::clientPaddingLeft() const
return paddingLeft();
}
+const int endOfLinePadding = 2;
int RenderMenuList::clientPaddingRight() const
{
+ if (style()->appearance() == MenulistPart || style()->appearance() == MenulistButtonPart) {
+ // For these appearance values, the theme applies padding to leave room for the
+ // drop-down button. But leaving room for the button inside the popup menu itself
+ // looks strange, so we return a small default padding to avoid having a large empty
+ // space appear on the side of the popup menu.
+ return endOfLinePadding;
+ }
+
+ // If the appearance isn't MenulistPart, then the select is styled (non-native), so
+ // we want to return the user specified padding.
return paddingRight();
}
@@ -435,21 +482,30 @@ void RenderMenuList::popupDidHide()
bool RenderMenuList::itemIsSeparator(unsigned listIndex) const
{
SelectElement* select = toSelectElement(static_cast<Element*>(node()));
- Element* element = select->listItems()[listIndex];
+ const Vector<Element*>& listItems = select->listItems();
+ if (listIndex >= listItems.size())
+ return false;
+ Element* element = listItems[listIndex];
return element->hasTagName(hrTag);
}
bool RenderMenuList::itemIsLabel(unsigned listIndex) const
{
SelectElement* select = toSelectElement(static_cast<Element*>(node()));
- Element* element = select->listItems()[listIndex];
+ const Vector<Element*>& listItems = select->listItems();
+ if (listIndex >= listItems.size())
+ return false;
+ Element* element = listItems[listIndex];
return isOptionGroupElement(element);
}
bool RenderMenuList::itemIsSelected(unsigned listIndex) const
{
SelectElement* select = toSelectElement(static_cast<Element*>(node()));
- Element* element = select->listItems()[listIndex];
+ const Vector<Element*>& listItems = select->listItems();
+ if (listIndex >= listItems.size())
+ return false;
+ Element* element = listItems[listIndex];
if (OptionElement* optionElement = toOptionElement(element))
return optionElement->selected();
return false;
diff --git a/WebCore/rendering/RenderMenuList.h b/WebCore/rendering/RenderMenuList.h
index 2d617c1..a5aa041 100644
--- a/WebCore/rendering/RenderMenuList.h
+++ b/WebCore/rendering/RenderMenuList.h
@@ -1,7 +1,7 @@
/*
* This file is part of the select element renderer in WebCore.
*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 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
@@ -49,6 +49,8 @@ public:
void setOptionsChanged(bool changed) { m_optionsChanged = changed; }
+ void didSetSelectedIndex();
+
String text() const;
private:
@@ -110,6 +112,8 @@ private:
bool m_optionsChanged;
int m_optionsWidth;
+ int m_lastSelectedIndex;
+
RefPtr<PopupMenu> m_popup;
bool m_popupIsVisible;
};
diff --git a/WebCore/rendering/RenderObject.cpp b/WebCore/rendering/RenderObject.cpp
index 712519b..0368490 100644
--- a/WebCore/rendering/RenderObject.cpp
+++ b/WebCore/rendering/RenderObject.cpp
@@ -28,6 +28,7 @@
#include "RenderObject.h"
#include "AXObjectCache.h"
+#include "Chrome.h"
#include "CSSStyleSelector.h"
#include "FloatQuad.h"
#include "Frame.h"
@@ -67,6 +68,10 @@
#include "WMLNames.h"
#endif
+#if ENABLE(SVG)
+#include "SVGRenderSupport.h"
+#endif
+
using namespace std;
namespace WebCore {
@@ -307,7 +312,7 @@ void RenderObject::addChild(RenderObject* newChild, RenderObject* beforeChild)
// Just add it...
children->insertChildNode(this, newChild, beforeChild);
}
-
+ RenderCounter::rendererSubtreeAttached(newChild);
if (newChild->isText() && newChild->style()->textTransform() == CAPITALIZE) {
RefPtr<StringImpl> textToTransform = toRenderText(newChild)->originalText();
if (textToTransform)
@@ -366,19 +371,14 @@ RenderObject* RenderObject::nextInPreOrderAfterChildren(RenderObject* stayWithin
if (this == stayWithin)
return 0;
- RenderObject* o;
- if (!(o = nextSibling())) {
- o = parent();
- while (o && !o->nextSibling()) {
- if (o == stayWithin)
- return 0;
- o = o->parent();
- }
- if (o)
- o = o->nextSibling();
+ const RenderObject* current = this;
+ RenderObject* next;
+ while (!(next = current->nextSibling())) {
+ current = current->parent();
+ if (!current || current == stayWithin)
+ return 0;
}
-
- return o;
+ return next;
}
RenderObject* RenderObject::previousInPreOrder() const
@@ -1011,13 +1011,12 @@ void RenderObject::paintOutline(GraphicsContext* graphicsContext, int tx, int ty
if (style->outlineStyleIsAuto() || hasOutlineAnnotation()) {
if (!theme()->supportsFocusRing(style)) {
// Only paint the focus ring by hand if the theme isn't able to draw the focus ring.
- graphicsContext->initFocusRing(ow, offset);
- addFocusRingRects(graphicsContext, tx, ty);
+ Vector<IntRect> focusRingRects;
+ addFocusRingRects(focusRingRects, tx, ty);
if (style->outlineStyleIsAuto())
- graphicsContext->drawFocusRing(oc);
+ graphicsContext->drawFocusRing(focusRingRects, ow, offset, oc);
else
- addPDFURLRect(graphicsContext, graphicsContext->focusRingBoundingRect());
- graphicsContext->clearFocusRing();
+ addPDFURLRect(graphicsContext, unionRect(focusRingRects));
}
}
@@ -1075,6 +1074,23 @@ IntRect RenderObject::absoluteBoundingBoxRect(bool useTransforms)
return result;
}
+void RenderObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads)
+{
+ Vector<IntRect> rects;
+ // FIXME: addFocusRingRects() needs to be passed this transform-unaware
+ // localToAbsolute() offset here because RenderInline::addFocusRingRects()
+ // implicitly assumes that. This doesn't work correctly with transformed
+ // descendants.
+ FloatPoint absolutePoint = localToAbsolute();
+ addFocusRingRects(rects, absolutePoint.x(), absolutePoint.y());
+ size_t count = rects.size();
+ for (size_t i = 0; i < count; ++i) {
+ IntRect rect = rects[i];
+ rect.move(-absolutePoint.x(), -absolutePoint.y());
+ quads.append(localToAbsoluteQuad(FloatQuad(rect)));
+ }
+}
+
void RenderObject::addAbsoluteRectForLayer(IntRect& result)
{
if (hasLayer())
@@ -1637,8 +1653,20 @@ void RenderObject::styleWillChange(StyleDifference diff, const RenderStyle* newS
if (view()->frameView()) {
// FIXME: A better solution would be to only invalidate the fixed regions when scrolling. It's overkill to
// prevent the entire view from blitting on a scroll.
- bool newStyleSlowScroll = newStyle && (newStyle->position() == FixedPosition || newStyle->hasFixedBackgroundImage());
- bool oldStyleSlowScroll = m_style && (m_style->position() == FixedPosition || m_style->hasFixedBackgroundImage());
+
+ bool shouldBlitOnFixedBackgroundImage = false;
+#if ENABLE(FAST_MOBILE_SCROLLING)
+ // On low-powered/mobile devices, preventing blitting on a scroll can cause noticeable delays
+ // when scrolling a page with a fixed background image. As an optimization, assuming there are
+ // no fixed positoned elements on the page, we can acclerate scrolling (via blitting) if we
+ // ignore the CSS property "background-attachment: fixed".
+ shouldBlitOnFixedBackgroundImage = true;
+#endif
+
+ bool newStyleSlowScroll = newStyle && (newStyle->position() == FixedPosition
+ || (!shouldBlitOnFixedBackgroundImage && newStyle->hasFixedBackgroundImage()));
+ bool oldStyleSlowScroll = m_style && (m_style->position() == FixedPosition
+ || (!shouldBlitOnFixedBackgroundImage && m_style->hasFixedBackgroundImage()));
if (oldStyleSlowScroll != newStyleSlowScroll) {
if (oldStyleSlowScroll)
view()->frameView()->removeSlowRepaintObject();
@@ -1648,7 +1676,7 @@ void RenderObject::styleWillChange(StyleDifference diff, const RenderStyle* newS
}
}
-void RenderObject::styleDidChange(StyleDifference diff, const RenderStyle*)
+void RenderObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
if (s_affectsParentBlock)
handleDynamicFloatPositionChange();
@@ -1656,9 +1684,10 @@ void RenderObject::styleDidChange(StyleDifference diff, const RenderStyle*)
if (!m_parent)
return;
- if (diff == StyleDifferenceLayout)
+ if (diff == StyleDifferenceLayout) {
+ RenderCounter::rendererStyleChanged(this, oldStyle, m_style.get());
setNeedsLayoutAndPrefWidthsRecalc();
- else if (diff == StyleDifferenceLayoutPositionedMovementOnly)
+ } else if (diff == StyleDifferenceLayoutPositionedMovementOnly)
setNeedsPositionedMovementLayout();
// Don't check for repaint here; we need to wait until the layer has been
@@ -1912,7 +1941,7 @@ void RenderObject::destroy()
// If this renderer is being autoscrolled, stop the autoscroll timer
- // FIXME: RenderObject::destroy should not get called with a renderar whose document
+ // FIXME: RenderObject::destroy should not get called with a renderer whose document
// has a null frame, so we assert this. However, we don't want release builds to crash which is why we
// check that the frame is not null.
ASSERT(document()->frame());
@@ -2474,6 +2503,11 @@ VisiblePosition RenderObject::createVisiblePosition(const Position& position)
}
#if ENABLE(SVG)
+const SVGRenderBase* RenderObject::toSVGRenderBase() const
+{
+ ASSERT_NOT_REACHED();
+ return 0;
+}
FloatRect RenderObject::objectBoundingBox() const
{
@@ -2491,14 +2525,14 @@ FloatRect RenderObject::repaintRectInLocalCoordinates() const
TransformationMatrix RenderObject::localTransform() const
{
- return TransformationMatrix();
+ static const TransformationMatrix identity;
+ return identity;
}
-TransformationMatrix RenderObject::localToParentTransform() const
+const TransformationMatrix& RenderObject::localToParentTransform() const
{
- // FIXME: This double virtual call indirection is temporary until I can land the
- // rest of the of the localToParentTransform() support for SVG.
- return localTransform();
+ static const TransformationMatrix identity;
+ return identity;
}
TransformationMatrix RenderObject::absoluteTransform() const
diff --git a/WebCore/rendering/RenderObject.h b/WebCore/rendering/RenderObject.h
index d40ae6d..03ba1e6 100644
--- a/WebCore/rendering/RenderObject.h
+++ b/WebCore/rendering/RenderObject.h
@@ -52,6 +52,9 @@ class RenderLayer;
class RenderTheme;
class TransformState;
class VisiblePosition;
+#if ENABLE(SVG)
+class SVGRenderBase;
+#endif
/*
* The painting of a layer occurs in three distinct phases. Each phase involves
@@ -260,6 +263,7 @@ public:
virtual bool isBlockFlow() const { return false; }
virtual bool isBoxModelObject() const { return false; }
virtual bool isCounter() const { return false; }
+ virtual bool isEmbeddedObject() const { return false; }
virtual bool isFieldset() const { return false; }
virtual bool isFileUploadControl() const { return false; }
virtual bool isFrame() const { return false; }
@@ -277,6 +281,7 @@ public:
virtual bool isRenderInline() const { return false; }
virtual bool isRenderPart() const { return false; }
virtual bool isRenderView() const { return false; }
+ virtual bool isReplica() const { return false; }
virtual bool isRuby() const { return false; }
virtual bool isRubyBase() const { return false; }
virtual bool isRubyRun() const { return false; }
@@ -310,6 +315,10 @@ public:
bool cellWidthChanged() const { return m_cellWidthChanged; }
void setCellWidthChanged(bool b = true) { m_cellWidthChanged = b; }
+#if ENABLE(MATHML)
+ virtual bool isRenderMathMLBlock() const { return false; }
+#endif // ENABLE(MATHML)
+
#if ENABLE(SVG)
// FIXME: Until all SVG renders can be subclasses of RenderSVGModelObject we have
// to add SVG renderer methods to RenderObject with an ASSERT_NOT_REACHED() default implementation.
@@ -321,6 +330,8 @@ public:
virtual bool isSVGImage() const { return false; }
virtual bool isSVGForeignObject() const { return false; }
+ virtual const SVGRenderBase* toSVGRenderBase() const;
+
// 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().
// NOTE: Markers are not specifically ignored here by SVG 1.1 spec, but we ignore them
@@ -340,7 +351,7 @@ public:
// Returns the full transform mapping from local coordinates to local coords for the parent SVG renderer
// This includes any viewport transforms and x/y offsets as well as the transform="" value off the element.
- virtual TransformationMatrix localToParentTransform() const;
+ virtual const TransformationMatrix& localToParentTransform() const;
// Walks up the parent chain to create a transform which maps from local to document coords
// NOTE: This method is deprecated! It doesn't respect scroll offsets or repaint containers.
@@ -565,6 +576,8 @@ public:
// Build an array of quads in absolute coords for line boxes
virtual void absoluteQuads(Vector<FloatQuad>&) { }
+ void absoluteFocusRingQuads(Vector<FloatQuad>&);
+
// the rect that will be painted if this object is passed as the paintingRoot
IntRect paintingRootRect(IntRect& topLevelRect);
@@ -750,7 +763,7 @@ public:
bool shouldUseTransformFromContainer(const RenderObject* container) const;
void getTransformFromContainer(const RenderObject* container, const IntSize& offsetInContainer, TransformationMatrix&) const;
- virtual void addFocusRingRects(GraphicsContext*, int /*tx*/, int /*ty*/) { };
+ virtual void addFocusRingRects(Vector<IntRect>&, int /*tx*/, int /*ty*/) { };
IntRect absoluteOutlineBounds() const
{
diff --git a/WebCore/rendering/RenderPart.cpp b/WebCore/rendering/RenderPart.cpp
index cb56c0c..5c4a6ec 100644
--- a/WebCore/rendering/RenderPart.cpp
+++ b/WebCore/rendering/RenderPart.cpp
@@ -31,6 +31,7 @@ namespace WebCore {
RenderPart::RenderPart(Element* node)
: RenderWidget(node)
+ , m_hasFallbackContent(false)
{
// init RenderObject attributes
setInline(false);
diff --git a/WebCore/rendering/RenderPart.h b/WebCore/rendering/RenderPart.h
index 08abf99..8303543 100644
--- a/WebCore/rendering/RenderPart.h
+++ b/WebCore/rendering/RenderPart.h
@@ -27,6 +27,10 @@
namespace WebCore {
+// Renderer for frames via RenderPartObject, and plug-ins via RenderEmbeddedObject.
+
+// FIXME: This class is subclassed in RenderPartObject for iframes, which is in turn
+// subclassed in RenderEmbeddedObject for object and embed. This class itself could be removed.
class RenderPart : public RenderWidget {
public:
RenderPart(Element*);
diff --git a/WebCore/rendering/RenderPartObject.cpp b/WebCore/rendering/RenderPartObject.cpp
index 8e9118e..09573c8 100644
--- a/WebCore/rendering/RenderPartObject.cpp
+++ b/WebCore/rendering/RenderPartObject.cpp
@@ -48,271 +48,6 @@ using namespace HTMLNames;
RenderPartObject::RenderPartObject(Element* element)
: RenderPart(element)
{
- // init RenderObject attributes
- setInline(true);
- m_hasFallbackContent = false;
-
- if (element->hasTagName(embedTag) || element->hasTagName(objectTag))
- view()->frameView()->setIsVisuallyNonEmpty();
-}
-
-RenderPartObject::~RenderPartObject()
-{
- if (frameView())
- frameView()->removeWidgetToUpdate(this);
-}
-
-static bool isURLAllowed(Document* doc, const String& url)
-{
- if (doc->frame()->page()->frameCount() >= 200)
- return false;
-
- // We allow one level of self-reference because some sites depend on that.
- // But we don't allow more than one.
- KURL completeURL = doc->completeURL(url);
- bool foundSelfReference = false;
- for (Frame* frame = doc->frame(); frame; frame = frame->tree()->parent()) {
- if (equalIgnoringFragmentIdentifier(frame->loader()->url(), completeURL)) {
- if (foundSelfReference)
- return false;
- foundSelfReference = true;
- }
- }
- return true;
-}
-
-typedef HashMap<String, String, CaseFoldingHash> ClassIdToTypeMap;
-
-static ClassIdToTypeMap* createClassIdToTypeMap()
-{
- ClassIdToTypeMap* map = new ClassIdToTypeMap;
- map->add("clsid:D27CDB6E-AE6D-11CF-96B8-444553540000", "application/x-shockwave-flash");
- map->add("clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA", "audio/x-pn-realaudio-plugin");
- map->add("clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B", "video/quicktime");
- map->add("clsid:166B1BCA-3F9C-11CF-8075-444553540000", "application/x-director");
- map->add("clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6", "application/x-mplayer2");
- map->add("clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95", "application/x-mplayer2");
- return map;
-}
-
-static String serviceTypeForClassId(const String& classId)
-{
- // Return early if classId is empty (since we won't do anything below).
- // Furthermore, if classId is null, calling get() below will crash.
- if (classId.isEmpty())
- return String();
-
- static ClassIdToTypeMap* map = createClassIdToTypeMap();
- return map->get(classId);
-}
-
-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
- // require "src" attribute).
- int srcIndex = -1, dataIndex = -1;
- for (unsigned int i = 0; i < paramNames->size(); ++i) {
- if (equalIgnoringCase((*paramNames)[i], "src"))
- srcIndex = i;
- else if (equalIgnoringCase((*paramNames)[i], "data"))
- dataIndex = i;
- }
-
- if (srcIndex == -1 && dataIndex != -1) {
- paramNames->append("src");
- paramValues->append((*paramValues)[dataIndex]);
- }
-}
-
-void RenderPartObject::updateWidget(bool onlyCreateNonNetscapePlugins)
-{
- String url;
- String serviceType;
- Vector<String> paramNames;
- Vector<String> paramValues;
- Frame* frame = frameView()->frame();
-
- // The calls to FrameLoader::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* o = static_cast<HTMLObjectElement*>(node());
-
- o->setNeedWidgetUpdate(false);
- if (!o->isFinishedParsingChildren())
- return;
-
- // Check for a child EMBED tag.
- HTMLEmbedElement* embed = 0;
- for (Node* child = o->firstChild(); child; ) {
- if (child->hasTagName(embedTag)) {
- embed = static_cast<HTMLEmbedElement*>(child);
- break;
- } else if (child->hasTagName(objectTag))
- child = child->nextSibling(); // Don't descend into nested OBJECT tags
- else
- child = child->traverseNextNode(o); // 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 = (HTMLElement *)embed;
- url = embed->url();
- serviceType = embed->serviceType();
- } else
- embedOrObject = (HTMLElement *)o;
-
- // If there was no URL or type defined in EMBED, try the OBJECT tag.
- if (url.isEmpty())
- url = o->url();
- if (serviceType.isEmpty())
- serviceType = o->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 = o->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();
- int pos = serviceType.find(";");
- if (pos != -1)
- serviceType = serviceType.left(pos);
- }
- if (!embed && !name.isEmpty()) {
- uniqueParamNames.add(name.impl());
- paramNames.append(p->name());
- paramValues.append(p->value());
- }
- }
- 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());
- }
- }
- }
-
- 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(o->classId());
-
- if (!isURLAllowed(document(), url))
- return;
-
- // Find out if we support fallback content.
- m_hasFallbackContent = false;
- for (Node *child = o->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;
- }
-
- if (onlyCreateNonNetscapePlugins) {
- KURL completedURL;
- if (!url.isEmpty())
- completedURL = frame->loader()->completeURL(url);
-
- if (frame->loader()->client()->objectContentType(completedURL, serviceType) == ObjectContentNetscapePlugin)
- return;
- }
-
- bool success = o->dispatchBeforeLoadEvent(url) &&
- frame->loader()->requestObject(this, url, o->getAttribute(nameAttr), serviceType, paramNames, paramValues);
- if (!success && m_hasFallbackContent)
- o->renderFallbackContent();
- } else if (node()->hasTagName(embedTag)) {
- HTMLEmbedElement *o = static_cast<HTMLEmbedElement*>(node());
- o->setNeedWidgetUpdate(false);
- url = o->url();
- serviceType = o->serviceType();
-
- if (url.isEmpty() && serviceType.isEmpty())
- return;
- if (!isURLAllowed(document(), url))
- return;
-
- // add all attributes set on the embed object
- NamedNodeMap* a = o->attributes();
- if (a) {
- for (unsigned i = 0; i < a->length(); ++i) {
- Attribute* it = a->attributeItem(i);
- paramNames.append(it->name().localName().string());
- paramValues.append(it->value().string());
- }
- }
-
- if (onlyCreateNonNetscapePlugins) {
- KURL completedURL;
- if (!url.isEmpty())
- completedURL = frame->loader()->completeURL(url);
-
- if (frame->loader()->client()->objectContentType(completedURL, serviceType) == ObjectContentNetscapePlugin)
- return;
-
- }
-
- if (o->dispatchBeforeLoadEvent(url))
- frame->loader()->requestObject(this, url, o->getAttribute(nameAttr), serviceType, paramNames, paramValues);
- }
-#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
- else if (node()->hasTagName(videoTag) || node()->hasTagName(audioTag)) {
- HTMLMediaElement* o = static_cast<HTMLMediaElement*>(node());
-
- o->setNeedWidgetUpdate(false);
- if (node()->hasTagName(videoTag)) {
- HTMLVideoElement* vid = static_cast<HTMLVideoElement*>(node());
- String poster = vid->poster();
- if (!poster.isEmpty()) {
- paramNames.append("_media_element_poster_");
- paramValues.append(poster);
- }
- }
-
- url = o->initialURL();
- if (!url.isEmpty()) {
- paramNames.append("_media_element_src_");
- paramValues.append(url);
- }
-
- serviceType = "application/x-media-element-proxy-plugin";
-
- if (o->dispatchBeforeLoadEvent(url))
- frame->loader()->requestObject(this, url, nullAtom, serviceType, paramNames, paramValues);
- }
-#endif
}
void RenderPartObject::layout()
@@ -401,9 +136,6 @@ void RenderPartObject::layout()
m_overflow.clear();
addShadowOverflow();
- if (!widget() && frameView())
- frameView()->addWidgetToUpdate(this);
-
setNeedsLayout(false);
}
diff --git a/WebCore/rendering/RenderPartObject.h b/WebCore/rendering/RenderPartObject.h
index 092395d..7160ea3 100644
--- a/WebCore/rendering/RenderPartObject.h
+++ b/WebCore/rendering/RenderPartObject.h
@@ -27,12 +27,10 @@
namespace WebCore {
+// Renderer for iframes. Is subclassed in RenderEmbeddedObject for object and embed.
class RenderPartObject : public RenderPart {
public:
RenderPartObject(Element*);
- virtual ~RenderPartObject();
-
- void updateWidget(bool onlyCreateNonNetscapePlugins);
private:
virtual const char* renderName() const { return "RenderPartObject"; }
diff --git a/WebCore/rendering/RenderPath.cpp b/WebCore/rendering/RenderPath.cpp
index 4a7662f..f497dcf 100644
--- a/WebCore/rendering/RenderPath.cpp
+++ b/WebCore/rendering/RenderPath.cpp
@@ -3,6 +3,7 @@
2004, 2005, 2008 Rob Buis <buis@kde.org>
2005, 2007 Eric Seidel <eric@webkit.org>
2009 Google, Inc.
+ 2009 Dirk Schulze <krit@webkit.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -68,7 +69,7 @@ RenderPath::RenderPath(SVGStyledTransformableElement* node)
{
}
-TransformationMatrix RenderPath::localToParentTransform() const
+const TransformationMatrix& RenderPath::localToParentTransform() const
{
return m_localTransform;
}
@@ -112,6 +113,34 @@ FloatRect RenderPath::objectBoundingBox() const
return m_cachedLocalFillBBox;
}
+FloatRect RenderPath::strokeBoundingBox() const
+{
+ if (m_path.isEmpty())
+ return FloatRect();
+
+ if (!m_cachedLocalStrokeBBox.isEmpty())
+ return m_cachedLocalStrokeBBox;
+
+ m_cachedLocalStrokeBBox = objectBoundingBox();
+ if (style()->svgStyle()->hasStroke()) {
+ BoundingRectStrokeStyleApplier strokeStyle(this, style());
+ m_cachedLocalStrokeBBox.unite(m_path.strokeBoundingRect(&strokeStyle));
+ }
+
+ return m_cachedLocalStrokeBBox;
+}
+
+FloatRect RenderPath::markerBoundingBox() const
+{
+ if (m_path.isEmpty())
+ return FloatRect();
+
+ if (m_cachedLocalMarkerBBox.isEmpty())
+ calculateMarkerBoundsIfNeeded();
+
+ return m_cachedLocalMarkerBBox;
+}
+
FloatRect RenderPath::repaintRectInLocalCoordinates() const
{
if (m_path.isEmpty())
@@ -121,16 +150,25 @@ FloatRect RenderPath::repaintRectInLocalCoordinates() const
if (!m_cachedLocalRepaintRect.isEmpty())
return m_cachedLocalRepaintRect;
- if (!style()->svgStyle()->hasStroke())
- m_cachedLocalRepaintRect = objectBoundingBox();
+ // FIXME: We need to be careful here. We assume that there is no filter,
+ // clipper, marker or masker if the rects are empty.
+ FloatRect rect = filterBoundingBoxForRenderer(this);
+ if (!rect.isEmpty())
+ m_cachedLocalRepaintRect = rect;
else {
- BoundingRectStrokeStyleApplier strokeStyle(this, style());
- m_cachedLocalRepaintRect = m_path.strokeBoundingRect(&strokeStyle);
+ m_cachedLocalRepaintRect = strokeBoundingBox();
+ m_cachedLocalRepaintRect.unite(markerBoundingBox());
}
- // Markers and filters can paint outside of the stroke path
- m_cachedLocalRepaintRect.unite(m_markerBounds);
- m_cachedLocalRepaintRect.unite(filterBoundingBoxForRenderer(this));
+ rect = clipperBoundingBoxForRenderer(this);
+ if (!rect.isEmpty())
+ m_cachedLocalRepaintRect.intersect(rect);
+
+ rect = maskerBoundingBoxForRenderer(this);
+ if (!rect.isEmpty())
+ m_cachedLocalRepaintRect.intersect(rect);
+
+ style()->svgStyle()->inflateForShadow(m_cachedLocalRepaintRect);
return m_cachedLocalRepaintRect;
}
@@ -139,12 +177,9 @@ void RenderPath::setPath(const Path& newPath)
{
m_path = newPath;
m_cachedLocalRepaintRect = FloatRect();
+ m_cachedLocalStrokeBBox = FloatRect();
m_cachedLocalFillBBox = FloatRect();
-}
-
-const Path& RenderPath::path() const
-{
- return m_path;
+ m_cachedLocalMarkerBBox = FloatRect();
}
void RenderPath::layout()
@@ -180,39 +215,48 @@ void RenderPath::paint(PaintInfo& paintInfo, int, int)
{
if (paintInfo.context->paintingDisabled() || style()->visibility() == HIDDEN || m_path.isEmpty())
return;
-
- paintInfo.context->save();
- paintInfo.context->concatCTM(localToParentTransform());
-
- SVGResourceFilter* filter = 0;
FloatRect boundingBox = repaintRectInLocalCoordinates();
- if (paintInfo.phase == PaintPhaseForeground) {
- PaintInfo savedInfo(paintInfo);
+ FloatRect nonLocalBoundingBox = m_localTransform.mapRect(boundingBox);
+ // FIXME: The empty rect check is to deal with incorrect initial clip in renderSubtreeToImage
+ // unfortunately fixing that problem is fairly complex unless we were willing to just futz the
+ // rect to something "close enough"
+ if (!nonLocalBoundingBox.intersects(paintInfo.rect) && !paintInfo.rect.isEmpty())
+ return;
+
+ PaintInfo childPaintInfo(paintInfo);
+ childPaintInfo.context->save();
+ applyTransformToPaintInfo(childPaintInfo, m_localTransform);
+ SVGResourceFilter* filter = 0;
- prepareToRenderSVGContent(this, paintInfo, boundingBox, filter);
- if (style()->svgStyle()->shapeRendering() == SR_CRISPEDGES)
- paintInfo.context->setShouldAntialias(false);
- fillAndStrokePath(m_path, paintInfo.context, style(), this);
+ if (childPaintInfo.phase == PaintPhaseForeground) {
+ PaintInfo savedInfo(childPaintInfo);
- if (static_cast<SVGStyledElement*>(node())->supportsMarkers())
- m_markerBounds = drawMarkersIfNeeded(paintInfo.context, paintInfo.rect, m_path);
+ if (prepareToRenderSVGContent(this, childPaintInfo, boundingBox, filter)) {
+ if (style()->svgStyle()->shapeRendering() == SR_CRISPEDGES)
+ childPaintInfo.context->setShouldAntialias(false);
+ fillAndStrokePath(m_path, childPaintInfo.context, style(), this);
- finishRenderSVGContent(this, paintInfo, filter, savedInfo.context);
+ if (static_cast<SVGStyledElement*>(node())->supportsMarkers())
+ m_markerLayoutInfo.drawMarkers(childPaintInfo);
+ }
+ finishRenderSVGContent(this, childPaintInfo, filter, savedInfo.context);
}
- if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) && style()->outlineWidth())
- paintOutline(paintInfo.context, static_cast<int>(boundingBox.x()), static_cast<int>(boundingBox.y()),
+ if ((childPaintInfo.phase == PaintPhaseOutline || childPaintInfo.phase == PaintPhaseSelfOutline) && style()->outlineWidth())
+ paintOutline(childPaintInfo.context, static_cast<int>(boundingBox.x()), static_cast<int>(boundingBox.y()),
static_cast<int>(boundingBox.width()), static_cast<int>(boundingBox.height()), style());
- paintInfo.context->restore();
+ childPaintInfo.context->restore();
}
// This method is called from inside paintOutline() since we call paintOutline()
// while transformed to our coord system, return local coords
-void RenderPath::addFocusRingRects(GraphicsContext* graphicsContext, int, int)
+void RenderPath::addFocusRingRects(Vector<IntRect>& rects, int, int)
{
- graphicsContext->addFocusRingRect(enclosingIntRect(repaintRectInLocalCoordinates()));
+ IntRect rect = enclosingIntRect(repaintRectInLocalCoordinates());
+ if (!rect.isEmpty())
+ rects.append(rect);
}
bool RenderPath::nodeAtFloatPoint(const HitTestRequest&, HitTestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction)
@@ -221,7 +265,7 @@ bool RenderPath::nodeAtFloatPoint(const HitTestRequest&, HitTestResult& result,
if (hitTestAction != HitTestForeground)
return false;
- FloatPoint localPoint = localToParentTransform().inverse().mapPoint(pointInParent);
+ FloatPoint localPoint = m_localTransform.inverse().mapPoint(pointInParent);
PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_PATH_HITTESTING, style()->pointerEvents());
@@ -237,143 +281,27 @@ bool RenderPath::nodeAtFloatPoint(const HitTestRequest&, HitTestResult& result,
return false;
}
-enum MarkerType {
- Start,
- Mid,
- End
-};
-
-struct MarkerData {
- FloatPoint origin;
- FloatPoint subpathStart;
- double strokeWidth;
- FloatPoint inslopePoints[2];
- FloatPoint outslopePoints[2];
- MarkerType type;
- SVGResourceMarker* marker;
-};
-
-struct DrawMarkersData {
- DrawMarkersData(GraphicsContext*, SVGResourceMarker* startMarker, SVGResourceMarker* midMarker, double strokeWidth);
- GraphicsContext* context;
- int elementIndex;
- MarkerData previousMarkerData;
- SVGResourceMarker* midMarker;
-};
-
-DrawMarkersData::DrawMarkersData(GraphicsContext* c, SVGResourceMarker *start, SVGResourceMarker *mid, double strokeWidth)
- : context(c)
- , elementIndex(0)
- , midMarker(mid)
-{
- previousMarkerData.origin = FloatPoint();
- previousMarkerData.subpathStart = FloatPoint();
- previousMarkerData.strokeWidth = strokeWidth;
- previousMarkerData.marker = start;
- previousMarkerData.type = Start;
-}
-
-static void drawMarkerWithData(GraphicsContext* context, MarkerData &data)
-{
- if (!data.marker)
- return;
-
- FloatPoint inslopeChange = data.inslopePoints[1] - FloatSize(data.inslopePoints[0].x(), data.inslopePoints[0].y());
- FloatPoint outslopeChange = data.outslopePoints[1] - FloatSize(data.outslopePoints[0].x(), data.outslopePoints[0].y());
-
- double inslope = rad2deg(atan2(inslopeChange.y(), inslopeChange.x()));
- double outslope = rad2deg(atan2(outslopeChange.y(), outslopeChange.x()));
-
- double angle = 0.0;
- switch (data.type) {
- case Start:
- angle = outslope;
- break;
- case Mid:
- angle = (inslope + outslope) / 2;
- break;
- case End:
- angle = inslope;
- }
-
- data.marker->draw(context, FloatRect(), data.origin.x(), data.origin.y(), data.strokeWidth, angle);
-}
-
-static inline void updateMarkerDataForElement(MarkerData& previousMarkerData, const PathElement* element)
-{
- FloatPoint* points = element->points;
-
- switch (element->type) {
- case PathElementAddQuadCurveToPoint:
- // TODO
- previousMarkerData.origin = points[1];
- break;
- case PathElementAddCurveToPoint:
- previousMarkerData.inslopePoints[0] = points[1];
- previousMarkerData.inslopePoints[1] = points[2];
- previousMarkerData.origin = points[2];
- break;
- case PathElementMoveToPoint:
- previousMarkerData.subpathStart = points[0];
- case PathElementAddLineToPoint:
- previousMarkerData.inslopePoints[0] = previousMarkerData.origin;
- previousMarkerData.inslopePoints[1] = points[0];
- previousMarkerData.origin = points[0];
- break;
- case PathElementCloseSubpath:
- previousMarkerData.inslopePoints[0] = previousMarkerData.origin;
- previousMarkerData.inslopePoints[1] = points[0];
- previousMarkerData.origin = previousMarkerData.subpathStart;
- previousMarkerData.subpathStart = FloatPoint();
- }
-}
-
-static void drawStartAndMidMarkers(void* info, const PathElement* element)
-{
- DrawMarkersData& data = *reinterpret_cast<DrawMarkersData*>(info);
-
- int elementIndex = data.elementIndex;
- MarkerData& previousMarkerData = data.previousMarkerData;
-
- FloatPoint* points = element->points;
-
- // First update the outslope for the previous element
- previousMarkerData.outslopePoints[0] = previousMarkerData.origin;
- previousMarkerData.outslopePoints[1] = points[0];
-
- // Draw the marker for the previous element
- if (elementIndex != 0)
- drawMarkerWithData(data.context, previousMarkerData);
-
- // Update our marker data for this element
- updateMarkerDataForElement(previousMarkerData, element);
-
- if (elementIndex == 1) {
- // After drawing the start marker, switch to drawing mid markers
- previousMarkerData.marker = data.midMarker;
- previousMarkerData.type = Mid;
- }
-
- data.elementIndex++;
-}
-
-FloatRect RenderPath::drawMarkersIfNeeded(GraphicsContext* context, const FloatRect&, const Path& path) const
+void RenderPath::calculateMarkerBoundsIfNeeded() const
{
Document* doc = document();
SVGElement* svgElement = static_cast<SVGElement*>(node());
- ASSERT(svgElement && svgElement->document() && svgElement->isStyled());
+ ASSERT(svgElement && svgElement->document());
+ if (!svgElement->isStyled())
+ return;
SVGStyledElement* styledElement = static_cast<SVGStyledElement*>(svgElement);
- const SVGRenderStyle* svgStyle = style()->svgStyle();
+ if (!styledElement->supportsMarkers())
+ return;
+ const SVGRenderStyle* svgStyle = style()->svgStyle();
AtomicString startMarkerId(svgStyle->startMarker());
AtomicString midMarkerId(svgStyle->midMarker());
AtomicString endMarkerId(svgStyle->endMarker());
- SVGResourceMarker* startMarker = getMarkerById(doc, startMarkerId);
- SVGResourceMarker* midMarker = getMarkerById(doc, midMarkerId);
- SVGResourceMarker* endMarker = getMarkerById(doc, endMarkerId);
+ SVGResourceMarker* startMarker = getMarkerById(doc, startMarkerId, this);
+ SVGResourceMarker* midMarker = getMarkerById(doc, midMarkerId, this);
+ SVGResourceMarker* endMarker = getMarkerById(doc, endMarkerId, this);
if (!startMarker && !startMarkerId.isEmpty())
svgElement->document()->accessSVGExtensions()->addPendingResource(startMarkerId, styledElement);
@@ -391,32 +319,10 @@ FloatRect RenderPath::drawMarkersIfNeeded(GraphicsContext* context, const FloatR
endMarker->addClient(styledElement);
if (!startMarker && !midMarker && !endMarker)
- return FloatRect();
-
- double strokeWidth = SVGRenderStyle::cssPrimitiveToLength(this, svgStyle->strokeWidth(), 1.0f);
- DrawMarkersData data(context, startMarker, midMarker, strokeWidth);
-
- path.apply(&data, drawStartAndMidMarkers);
-
- data.previousMarkerData.marker = endMarker;
- data.previousMarkerData.type = End;
- drawMarkerWithData(context, data.previousMarkerData);
-
- // We know the marker boundaries, only after they're drawn!
- // Otherwhise we'd need to do all the marker calculation twice
- // once here (through paint()) and once in absoluteClippedOverflowRect().
- FloatRect bounds;
-
- if (startMarker)
- bounds.unite(startMarker->cachedBounds());
-
- if (midMarker)
- bounds.unite(midMarker->cachedBounds());
-
- if (endMarker)
- bounds.unite(endMarker->cachedBounds());
+ return;
- return bounds;
+ float strokeWidth = SVGRenderStyle::cssPrimitiveToLength(this, svgStyle->strokeWidth(), 1.0f);
+ m_cachedLocalMarkerBBox = m_markerLayoutInfo.calculateBoundaries(startMarker, midMarker, endMarker, strokeWidth, m_path);
}
}
diff --git a/WebCore/rendering/RenderPath.h b/WebCore/rendering/RenderPath.h
index 2ff179e..be4c2dc 100644
--- a/WebCore/rendering/RenderPath.h
+++ b/WebCore/rendering/RenderPath.h
@@ -25,9 +25,9 @@
#define RenderPath_h
#if ENABLE(SVG)
-
#include "FloatRect.h"
#include "RenderSVGModelObject.h"
+#include "SVGMarkerLayoutInfo.h"
#include "TransformationMatrix.h"
namespace WebCore {
@@ -40,7 +40,7 @@ class RenderPath : public RenderSVGModelObject {
public:
RenderPath(SVGStyledTransformableElement*);
- const Path& path() const;
+ const Path& path() const { return m_path; }
private:
// Hit-detection seperated for the fill and the stroke
@@ -48,9 +48,11 @@ private:
bool strokeContains(const FloatPoint&, bool requiresStroke = true) const;
virtual FloatRect objectBoundingBox() const;
+ virtual FloatRect strokeBoundingBox() const;
+ virtual FloatRect markerBoundingBox() const;
virtual FloatRect repaintRectInLocalCoordinates() const;
- virtual TransformationMatrix localToParentTransform() const;
+ virtual const TransformationMatrix& localToParentTransform() const;
void setPath(const Path&);
@@ -59,19 +61,21 @@ private:
virtual void layout();
virtual void paint(PaintInfo&, int parentX, int parentY);
- virtual void addFocusRingRects(GraphicsContext*, int tx, int ty);
+ virtual void addFocusRingRects(Vector<IntRect>&, int tx, int ty);
virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
- FloatRect drawMarkersIfNeeded(GraphicsContext*, const FloatRect&, const Path&) const;
+ void calculateMarkerBoundsIfNeeded() const;
private:
virtual TransformationMatrix localTransform() const;
mutable Path m_path;
mutable FloatRect m_cachedLocalFillBBox;
+ mutable FloatRect m_cachedLocalStrokeBBox;
mutable FloatRect m_cachedLocalRepaintRect;
- FloatRect m_markerBounds;
+ mutable FloatRect m_cachedLocalMarkerBBox;
+ mutable SVGMarkerLayoutInfo m_markerLayoutInfo;
TransformationMatrix m_localTransform;
};
@@ -94,5 +98,3 @@ void toRenderPath(const RenderPath*);
#endif // ENABLE(SVG)
#endif
-
-// vim:ts=4:noet
diff --git a/WebCore/rendering/RenderReplaced.h b/WebCore/rendering/RenderReplaced.h
index 0ba6b8a..bcf565d 100644
--- a/WebCore/rendering/RenderReplaced.h
+++ b/WebCore/rendering/RenderReplaced.h
@@ -46,6 +46,7 @@ protected:
void setIntrinsicSize(const IntSize&);
virtual void intrinsicSizeChanged();
+ virtual void paint(PaintInfo&, int tx, int ty);
bool shouldPaint(PaintInfo&, int& tx, int& ty);
void adjustOverflowForBoxShadowAndReflect();
IntRect localSelectionRect(bool checkWhetherSelected = true) const;
@@ -62,7 +63,6 @@ private:
virtual int minimumReplacedHeight() const { return 0; }
- virtual void paint(PaintInfo&, int tx, int ty);
virtual void paintReplaced(PaintInfo&, int /*tx*/, int /*ty*/) { }
virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer);
diff --git a/WebCore/rendering/RenderReplica.h b/WebCore/rendering/RenderReplica.h
index d5db3b7..48c64e4 100644
--- a/WebCore/rendering/RenderReplica.h
+++ b/WebCore/rendering/RenderReplica.h
@@ -46,6 +46,10 @@ public:
virtual void calcPrefWidths();
virtual void paint(PaintInfo&, int tx, int ty);
+
+private:
+ virtual bool isReplica() const { return true; }
+
};
} // namespace WebCore
diff --git a/WebCore/rendering/RenderRuby.h b/WebCore/rendering/RenderRuby.h
index a74150c..49a84d8 100644
--- a/WebCore/rendering/RenderRuby.h
+++ b/WebCore/rendering/RenderRuby.h
@@ -54,13 +54,15 @@ public:
RenderRubyAsInline(Node*);
virtual ~RenderRubyAsInline();
- virtual const char* renderName() const { return "RenderRuby (inline)"; }
-
- virtual bool isRuby() const { return true; }
-
virtual bool isChildAllowed(RenderObject*, RenderStyle*) const;
virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0);
virtual void removeChild(RenderObject* child);
+
+private:
+ virtual bool isRuby() const { return true; }
+ virtual const char* renderName() const { return "RenderRuby (inline)"; }
+ virtual bool createsAnonymousWrapper() const { return true; }
+ virtual void removeLeftoverAnonymousBlock(RenderBlock*) { ASSERT_NOT_REACHED(); }
};
// <ruby> when used as 'display:block' or 'display:inline-block'
@@ -69,13 +71,15 @@ public:
RenderRubyAsBlock(Node*);
virtual ~RenderRubyAsBlock();
- virtual const char* renderName() const { return "RenderRuby (block)"; }
-
- virtual bool isRuby() const { return true; }
-
virtual bool isChildAllowed(RenderObject*, RenderStyle*) const;
virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0);
virtual void removeChild(RenderObject* child);
+
+private:
+ virtual bool isRuby() const { return true; }
+ virtual const char* renderName() const { return "RenderRuby (block)"; }
+ virtual bool createsAnonymousWrapper() const { return true; }
+ virtual void removeLeftoverAnonymousBlock(RenderBlock*) { ASSERT_NOT_REACHED(); }
};
} // namespace WebCore
diff --git a/WebCore/rendering/RenderRubyBase.cpp b/WebCore/rendering/RenderRubyBase.cpp
index 5cb25f4..41ac4e3 100644
--- a/WebCore/rendering/RenderRubyBase.cpp
+++ b/WebCore/rendering/RenderRubyBase.cpp
@@ -48,39 +48,139 @@ bool RenderRubyBase::isChildAllowed(RenderObject* child, RenderStyle*) const
return child->isInline();
}
-void RenderRubyBase::splitToLeft(RenderBlock* leftBase, RenderObject* beforeChild)
+bool RenderRubyBase::hasOnlyWrappedInlineChildren(RenderObject* beforeChild) const
{
- // This function removes all children that are before (!) beforeChild
- // and appends them to leftBase.
- ASSERT(leftBase);
+ // Tests whether all children in the base before beforeChild are either floated/positioned,
+ // or inline objects wrapped in anonymous blocks.
+ // Note that beforeChild may be 0, in which case all children are looked at.
+ for (RenderObject* child = firstChild(); child != beforeChild; child = child->nextSibling()) {
+ if (!child->isFloatingOrPositioned() && !(child->isAnonymousBlock() && child->childrenInline()))
+ return false;
+ }
+ return true;
+}
+void RenderRubyBase::moveChildren(RenderRubyBase* toBase, RenderObject* fromBeforeChild)
+{
+ // This function removes all children that are before (!) beforeChild
+ // and appends them to toBase.
+ ASSERT(toBase);
+
// First make sure that beforeChild (if set) is indeed a direct child of this.
- // Fallback: climb up the tree to make sure. This may result in somewhat incorrect rendering.
- // FIXME: Can this happen? Is there a better/more correct way to solve this?
- ASSERT(!beforeChild || beforeChild->parent() == this);
- while (beforeChild && beforeChild->parent() != this)
- beforeChild = beforeChild->parent();
-
- RenderObject* child = firstChild();
- while (child != beforeChild) {
- RenderObject* nextChild = child->nextSibling();
- moveChildTo(leftBase, leftBase->children(), child);
- child = nextChild;
+ // Inline children might be wrapped in an anonymous block if there's a continuation.
+ // Theoretically, in ruby bases, this can happen with only the first such a child,
+ // so it should be OK to just climb the tree.
+ while (fromBeforeChild && fromBeforeChild->parent() != this)
+ fromBeforeChild = fromBeforeChild->parent();
+
+ if (childrenInline())
+ moveInlineChildren(toBase, fromBeforeChild);
+ else
+ moveBlockChildren(toBase, fromBeforeChild);
+
+ setNeedsLayoutAndPrefWidthsRecalc();
+ toBase->setNeedsLayoutAndPrefWidthsRecalc();
+}
+
+void RenderRubyBase::moveInlineChildren(RenderRubyBase* toBase, RenderObject* fromBeforeChild)
+{
+ RenderBlock* toBlock;
+
+ if (toBase->childrenInline()) {
+ // The standard and easy case: move the children into the target base
+ toBlock = toBase;
+ } else {
+ // We need to wrap the inline objects into an anonymous block.
+ // If toBase has a suitable block, we re-use it, otherwise create a new one.
+ RenderObject* lastChild = toBase->lastChild();
+ if (lastChild && lastChild->isAnonymousBlock() && lastChild->childrenInline())
+ toBlock = toRenderBlock(lastChild);
+ else {
+ toBlock = toBase->createAnonymousBlock();
+ toBase->children()->appendChildNode(toBase, toBlock);
+ }
}
+ // Move our inline children into the target block we determined above.
+ for (RenderObject* child = firstChild(); child != fromBeforeChild; child = firstChild())
+ moveChildTo(toBlock, toBlock->children(), child);
}
-void RenderRubyBase::mergeWithRight(RenderBlock* rightBase)
+void RenderRubyBase::moveBlockChildren(RenderRubyBase* toBase, RenderObject* fromBeforeChild)
{
- // This function removes all children and prepends (!) them to rightBase.
- ASSERT(rightBase);
-
- RenderObject* firstPos = rightBase->firstChild();
- RenderObject* child = lastChild();
- while (child) {
- moveChildTo(rightBase, rightBase->children(), firstPos, child);
- firstPos = child;
- child = lastChild();
+ if (toBase->childrenInline()) {
+ // First check whether we move only wrapped inline objects.
+ if (hasOnlyWrappedInlineChildren(fromBeforeChild)) {
+ // The reason why the base is in block flow must be after beforeChild.
+ // We therefore can extract the inline objects and move them to toBase.
+ for (RenderObject* child = firstChild(); child != fromBeforeChild; child = firstChild()) {
+ if (child->isAnonymousBlock()) {
+ RenderBlock* anonBlock = toRenderBlock(child);
+ ASSERT(anonBlock->childrenInline());
+ ASSERT(!anonBlock->inlineContinuation());
+ anonBlock->moveAllChildrenTo(toBase, toBase->children());
+ anonBlock->deleteLineBoxTree();
+ anonBlock->destroy();
+ } else {
+ ASSERT(child->isFloatingOrPositioned());
+ moveChildTo(toBase, toBase->children(), child);
+ }
+ }
+ } else {
+ // Moving block children -> have to set toBase as block flow
+ toBase->makeChildrenNonInline();
+ // Move children, potentially collapsing anonymous block wrappers.
+ mergeBlockChildren(toBase, fromBeforeChild);
+
+ // Now we need to check if the leftover children are all inline.
+ // If so, make this base inline again.
+ if (hasOnlyWrappedInlineChildren()) {
+ RenderObject* next = 0;
+ for (RenderObject* child = firstChild(); child; child = next) {
+ next = child->nextSibling();
+ if (child->isFloatingOrPositioned())
+ continue;
+ ASSERT(child->isAnonymousBlock());
+
+ RenderBlock* anonBlock = toRenderBlock(child);
+ ASSERT(anonBlock->childrenInline());
+ ASSERT(!anonBlock->inlineContinuation());
+ // Move inline children out of anonymous block.
+ anonBlock->moveAllChildrenTo(this, children(), anonBlock);
+ anonBlock->deleteLineBoxTree();
+ anonBlock->destroy();
+ }
+ setChildrenInline(true);
+ }
+ }
+ } else
+ mergeBlockChildren(toBase, fromBeforeChild);
+}
+
+void RenderRubyBase::mergeBlockChildren(RenderRubyBase* toBase, RenderObject* fromBeforeChild)
+{
+ // This function removes all children that are before fromBeforeChild and appends them to toBase.
+ ASSERT(!childrenInline());
+ ASSERT(toBase);
+ ASSERT(!toBase->childrenInline());
+
+ // Quick check whether we have anything to do, to simplify the following code.
+ if (fromBeforeChild != firstChild())
+ return;
+
+ // If an anonymous block would be put next to another such block, then merge those.
+ RenderObject* firstChildHere = firstChild();
+ RenderObject* lastChildThere = toBase->lastChild();
+ if (firstChildHere && firstChildHere->isAnonymousBlock() && firstChildHere->childrenInline()
+ && lastChildThere && lastChildThere->isAnonymousBlock() && lastChildThere->childrenInline()) {
+ RenderBlock* anonBlockHere = toRenderBlock(firstChildHere);
+ RenderBlock* anonBlockThere = toRenderBlock(lastChildThere);
+ anonBlockHere->moveAllChildrenTo(anonBlockThere, anonBlockThere->children());
+ anonBlockHere->deleteLineBoxTree();
+ anonBlockHere->destroy();
}
+ // Move all remaining children normally.
+ for (RenderObject* child = firstChild(); child != fromBeforeChild; child = firstChild())
+ moveChildTo(toBase, toBase->children(), child);
}
} // namespace WebCore
diff --git a/WebCore/rendering/RenderRubyBase.h b/WebCore/rendering/RenderRubyBase.h
index 57baf99..c029bd5 100644
--- a/WebCore/rendering/RenderRubyBase.h
+++ b/WebCore/rendering/RenderRubyBase.h
@@ -46,8 +46,16 @@ public:
virtual bool isChildAllowed(RenderObject*, RenderStyle*) const;
- void splitToLeft(RenderBlock* leftBase, RenderObject* beforeChild);
- void mergeWithRight(RenderBlock* rightBase);
+private:
+ bool hasOnlyWrappedInlineChildren(RenderObject* beforeChild = 0) const;
+
+ void moveChildren(RenderRubyBase* toBase, RenderObject* fromBeforeChild = 0);
+ void moveInlineChildren(RenderRubyBase* toBase, RenderObject* fromBeforeChild = 0);
+ void moveBlockChildren(RenderRubyBase* toBase, RenderObject* fromBeforeChild = 0);
+ void mergeBlockChildren(RenderRubyBase* toBase, RenderObject* fromBeforeChild = 0);
+
+ // Allow RenderRubyRun to manipulate the children within ruby bases.
+ friend class RenderRubyRun;
};
} // namespace WebCore
diff --git a/WebCore/rendering/RenderRubyRun.cpp b/WebCore/rendering/RenderRubyRun.cpp
index 8578c55..a3e6281 100644
--- a/WebCore/rendering/RenderRubyRun.cpp
+++ b/WebCore/rendering/RenderRubyRun.cpp
@@ -148,7 +148,7 @@ void RenderRubyRun::addChild(RenderObject* child, RenderObject* beforeChild)
RenderRubyRun* newRun = staticCreateRubyRun(ruby);
ruby->addChild(newRun, this);
newRun->addChild(child);
- rubyBaseSafe()->splitToLeft(newRun->rubyBaseSafe(), beforeChild);
+ rubyBaseSafe()->moveChildren(newRun->rubyBaseSafe(), beforeChild);
}
} else {
// child is not a text -> insert it into the base
@@ -170,7 +170,11 @@ void RenderRubyRun::removeChild(RenderObject* child)
// Ruby run without a base can happen only at the first run.
RenderRubyRun* rightRun = static_cast<RenderRubyRun*>(rightNeighbour);
ASSERT(rightRun->hasRubyBase());
- base->mergeWithRight(rightRun->rubyBaseSafe());
+ RenderRubyBase* rightBase = rightRun->rubyBaseSafe();
+ // Collect all children in a single base, then swap the bases.
+ rightBase->moveChildren(base);
+ moveChildTo(rightRun, rightRun->children(), base);
+ rightRun->moveChildTo(this, children(), rightBase);
// The now empty ruby base will be removed below.
}
}
diff --git a/WebCore/rendering/RenderRubyRun.h b/WebCore/rendering/RenderRubyRun.h
index 361dfe5..222ddb6 100644
--- a/WebCore/rendering/RenderRubyRun.h
+++ b/WebCore/rendering/RenderRubyRun.h
@@ -48,10 +48,6 @@ public:
virtual void destroy();
- virtual const char* renderName() const { return "RenderRubyRun (anonymous)"; }
-
- virtual bool isRubyRun() const { return true; }
-
bool hasRubyText() const;
bool hasRubyBase() const;
bool isEmpty() const;
@@ -70,8 +66,13 @@ public:
protected:
RenderRubyBase* createRubyBase() const;
-
+
private:
+ virtual bool isRubyRun() const { return true; }
+ virtual const char* renderName() const { return "RenderRubyRun (anonymous)"; }
+ virtual bool createsAnonymousWrapper() const { return true; }
+ virtual void removeLeftoverAnonymousBlock(RenderBlock*) { }
+
bool m_beingDestroyed;
};
diff --git a/WebCore/rendering/RenderSVGBlock.h b/WebCore/rendering/RenderSVGBlock.h
index a4ececb..0b0d107 100644
--- a/WebCore/rendering/RenderSVGBlock.h
+++ b/WebCore/rendering/RenderSVGBlock.h
@@ -35,6 +35,8 @@ class RenderSVGBlock : public RenderBlock, protected SVGRenderBase {
public:
RenderSVGBlock(SVGElement*);
+ virtual const SVGRenderBase* toSVGRenderBase() const { return this; }
+
private:
virtual void setStyle(PassRefPtr<RenderStyle>);
};
diff --git a/WebCore/rendering/RenderSVGContainer.cpp b/WebCore/rendering/RenderSVGContainer.cpp
index d7aec99..6d1b965 100644
--- a/WebCore/rendering/RenderSVGContainer.cpp
+++ b/WebCore/rendering/RenderSVGContainer.cpp
@@ -3,6 +3,7 @@
2004, 2005, 2007, 2008 Rob Buis <buis@kde.org>
2007 Eric Seidel <eric@webkit.org>
Copyright (C) 2009 Google, Inc. All rights reserved.
+ 2009 Dirk Schulze <krit@webkit.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -25,14 +26,11 @@
#if ENABLE(SVG)
#include "RenderSVGContainer.h"
-#include "AXObjectCache.h"
-#include "FloatQuad.h"
#include "GraphicsContext.h"
#include "RenderView.h"
#include "SVGRenderSupport.h"
#include "SVGResourceFilter.h"
#include "SVGStyledElement.h"
-#include "SVGURIReference.h"
namespace WebCore {
@@ -62,17 +60,7 @@ void RenderSVGContainer::layout()
LayoutRepainter repainter(*this, checkForRepaintDuringLayout() || selfWillPaint());
calculateLocalTransform(); // Allow RenderSVGTransformableContainer to update its transform
- for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
- // Only force our kids to layout if we're being asked to relayout as a result of a parent changing
- // FIXME: We should be able to skip relayout of non-relative kids when only bounds size has changed
- // that's a possible future optimization using LayoutState
- // http://bugs.webkit.org/show_bug.cgi?id=15391
- if (selfNeedsLayout())
- child->setNeedsLayout(true);
-
- child->layoutIfNeeded();
- ASSERT(!child->needsLayout());
- }
+ layoutChildren(this, selfNeedsLayout());
repainter.repaintAfterLayout();
setNeedsLayout(false);
@@ -82,7 +70,7 @@ bool RenderSVGContainer::selfWillPaint() const
{
#if ENABLE(FILTERS)
const SVGRenderStyle* svgStyle = style()->svgStyle();
- SVGResourceFilter* filter = getFilterById(document(), svgStyle->filter());
+ SVGResourceFilter* filter = getFilterById(document(), svgStyle->filter(), this);
if (filter)
return true;
#endif
@@ -94,7 +82,7 @@ void RenderSVGContainer::paint(PaintInfo& paintInfo, int, int)
if (paintInfo.context->paintingDisabled() || !drawsContents())
return;
- // Spec: groups w/o children still may render filter content.
+ // Spec: groups w/o children still may render filter content.
if (!firstChild() && !selfWillPaint())
return;
@@ -109,12 +97,16 @@ void RenderSVGContainer::paint(PaintInfo& paintInfo, int, int)
SVGResourceFilter* filter = 0;
FloatRect boundingBox = repaintRectInLocalCoordinates();
+
+ bool continueRendering = true;
if (childPaintInfo.phase == PaintPhaseForeground)
- prepareToRenderSVGContent(this, childPaintInfo, boundingBox, filter);
+ continueRendering = prepareToRenderSVGContent(this, childPaintInfo, boundingBox, filter);
- childPaintInfo.paintingRoot = paintingRootForChildren(childPaintInfo);
- for (RenderObject* child = firstChild(); child; child = child->nextSibling())
- child->paint(childPaintInfo, 0, 0);
+ if (continueRendering) {
+ childPaintInfo.paintingRoot = paintingRootForChildren(childPaintInfo);
+ for (RenderObject* child = firstChild(); child; child = child->nextSibling())
+ child->paint(childPaintInfo, 0, 0);
+ }
if (paintInfo.phase == PaintPhaseForeground)
finishRenderSVGContent(this, childPaintInfo, filter, paintInfo.context);
@@ -132,10 +124,11 @@ void RenderSVGContainer::paint(PaintInfo& paintInfo, int, int)
}
// addFocusRingRects is called from paintOutline and needs to be in the same coordinates as the paintOuline call
-void RenderSVGContainer::addFocusRingRects(GraphicsContext* graphicsContext, int, int)
+void RenderSVGContainer::addFocusRingRects(Vector<IntRect>& rects, int, int)
{
IntRect paintRectInParent = enclosingIntRect(localToParentTransform().mapRect(repaintRectInLocalCoordinates()));
- graphicsContext->addFocusRingRect(paintRectInParent);
+ if (!paintRectInParent.isEmpty())
+ rects.append(paintRectInParent);
}
FloatRect RenderSVGContainer::objectBoundingBox() const
@@ -143,14 +136,30 @@ FloatRect RenderSVGContainer::objectBoundingBox() const
return computeContainerBoundingBox(this, false);
}
+FloatRect RenderSVGContainer::strokeBoundingBox() const
+{
+ return computeContainerBoundingBox(this, true);
+}
+
// RenderSVGContainer is used for <g> elements which do not themselves have a
// width or height, so we union all of our child rects as our repaint rect.
FloatRect RenderSVGContainer::repaintRectInLocalCoordinates() const
{
FloatRect repaintRect = computeContainerBoundingBox(this, true);
- // A filter on this container can paint outside of the union of the child repaint rects
- repaintRect.unite(filterBoundingBoxForRenderer(this));
+ FloatRect rect = filterBoundingBoxForRenderer(this);
+ if (!rect.isEmpty())
+ repaintRect = rect;
+
+ rect = clipperBoundingBoxForRenderer(this);
+ if (!rect.isEmpty())
+ repaintRect.intersect(rect);
+
+ rect = maskerBoundingBoxForRenderer(this);
+ if (!rect.isEmpty())
+ repaintRect.intersect(rect);
+
+ style()->svgStyle()->inflateForShadow(repaintRect);
return repaintRect;
}
@@ -178,5 +187,3 @@ bool RenderSVGContainer::nodeAtFloatPoint(const HitTestRequest& request, HitTest
}
#endif // ENABLE(SVG)
-
-// vim:ts=4:noet
diff --git a/WebCore/rendering/RenderSVGContainer.h b/WebCore/rendering/RenderSVGContainer.h
index f2195e3..f681e50 100644
--- a/WebCore/rendering/RenderSVGContainer.h
+++ b/WebCore/rendering/RenderSVGContainer.h
@@ -42,10 +42,9 @@ public:
void setDrawsContents(bool);
bool drawsContents() const;
-protected:
virtual void paint(PaintInfo&, int parentX, int parentY);
-private:
+protected:
virtual RenderObjectChildList* virtualChildren() { return children(); }
virtual const RenderObjectChildList* virtualChildren() const { return children(); }
@@ -54,9 +53,10 @@ private:
virtual void layout();
- virtual void addFocusRingRects(GraphicsContext*, int tx, int ty);
+ virtual void addFocusRingRects(Vector<IntRect>&, int tx, int ty);
virtual FloatRect objectBoundingBox() const;
+ virtual FloatRect strokeBoundingBox() const;
virtual FloatRect repaintRectInLocalCoordinates() const;
virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
@@ -71,6 +71,7 @@ private:
bool selfWillPaint() const;
+private:
RenderObjectChildList m_children;
bool m_drawsContents : 1;
};
@@ -78,14 +79,14 @@ private:
inline RenderSVGContainer* toRenderSVGContainer(RenderObject* object)
{
// Note: isSVGContainer is also true for RenderSVGViewportContainer, which is not derived from this.
- ASSERT(!object || object->isSVGContainer() && strcmp(object->renderName(), "RenderSVGViewportContainer"));
+ ASSERT(!object || (object->isSVGContainer() && strcmp(object->renderName(), "RenderSVGViewportContainer")));
return static_cast<RenderSVGContainer*>(object);
}
inline const RenderSVGContainer* toRenderSVGContainer(const RenderObject* object)
{
// Note: isSVGContainer is also true for RenderSVGViewportContainer, which is not derived from this.
- ASSERT(!object || object->isSVGContainer() && strcmp(object->renderName(), "RenderSVGViewportContainer"));
+ ASSERT(!object || (object->isSVGContainer() && strcmp(object->renderName(), "RenderSVGViewportContainer")));
return static_cast<const RenderSVGContainer*>(object);
}
diff --git a/WebCore/rendering/RenderSVGGradientStop.cpp b/WebCore/rendering/RenderSVGGradientStop.cpp
index b81e7f4..66391c8 100644
--- a/WebCore/rendering/RenderSVGGradientStop.cpp
+++ b/WebCore/rendering/RenderSVGGradientStop.cpp
@@ -49,7 +49,7 @@ void RenderSVGGradientStop::styleDidChange(StyleDifference diff, const RenderSty
// <stop> elements should only be allowed to make renderers under gradient elements
// but I can imagine a few cases we might not be catching, so let's not crash if our parent isn't a gradient.
if (SVGGradientElement* gradient = gradientElement()) {
- if (SVGResource* resource = gradient->canvasResource())
+ if (SVGResource* resource = gradient->canvasResource(this))
resource->invalidate();
}
}
diff --git a/WebCore/rendering/RenderSVGHiddenContainer.cpp b/WebCore/rendering/RenderSVGHiddenContainer.cpp
index d4b39d3..bb0a15d 100644
--- a/WebCore/rendering/RenderSVGHiddenContainer.cpp
+++ b/WebCore/rendering/RenderSVGHiddenContainer.cpp
@@ -38,17 +38,7 @@ RenderSVGHiddenContainer::RenderSVGHiddenContainer(SVGStyledElement* element)
void RenderSVGHiddenContainer::layout()
{
ASSERT(needsLayout());
-
- // Layout our kids to prevent a kid from being marked as needing layout
- // then never being asked to layout.
- for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
- if (selfNeedsLayout())
- child->setNeedsLayout(true);
-
- child->layoutIfNeeded();
- ASSERT(!child->needsLayout());
- }
-
+ layoutChildren(this, selfNeedsLayout());
setNeedsLayout(false);
}
diff --git a/WebCore/rendering/RenderSVGImage.cpp b/WebCore/rendering/RenderSVGImage.cpp
index 41a1a10..c8fb132 100644
--- a/WebCore/rendering/RenderSVGImage.cpp
+++ b/WebCore/rendering/RenderSVGImage.cpp
@@ -4,6 +4,7 @@
Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org>
Copyright (C) 2009, Google, Inc.
+ Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -47,81 +48,6 @@ RenderSVGImage::RenderSVGImage(SVGImageElement* impl)
{
}
-void RenderSVGImage::adjustRectsForAspectRatio(FloatRect& destRect, FloatRect& srcRect, SVGPreserveAspectRatio* aspectRatio)
-{
- float origDestWidth = destRect.width();
- float origDestHeight = destRect.height();
- if (aspectRatio->meetOrSlice() == SVGPreserveAspectRatio::SVG_MEETORSLICE_MEET) {
- float widthToHeightMultiplier = srcRect.height() / srcRect.width();
- if (origDestHeight > (origDestWidth * widthToHeightMultiplier)) {
- destRect.setHeight(origDestWidth * widthToHeightMultiplier);
- switch (aspectRatio->align()) {
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMID:
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID:
- destRect.setY(destRect.y() + origDestHeight / 2.0f - destRect.height() / 2.0f);
- break;
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMAX:
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX:
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMAX:
- destRect.setY(destRect.y() + origDestHeight - destRect.height());
- break;
- }
- }
- if (origDestWidth > (origDestHeight / widthToHeightMultiplier)) {
- destRect.setWidth(origDestHeight / widthToHeightMultiplier);
- switch (aspectRatio->align()) {
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMIN:
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX:
- destRect.setX(destRect.x() + origDestWidth / 2.0f - destRect.width() / 2.0f);
- break;
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMIN:
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID:
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMAX:
- destRect.setX(destRect.x() + origDestWidth - destRect.width());
- break;
- }
- }
- } else if (aspectRatio->meetOrSlice() == SVGPreserveAspectRatio::SVG_MEETORSLICE_SLICE) {
- float widthToHeightMultiplier = srcRect.height() / srcRect.width();
- // if the destination height is less than the height of the image we'll be drawing
- if (origDestHeight < (origDestWidth * widthToHeightMultiplier)) {
- float destToSrcMultiplier = srcRect.width() / destRect.width();
- srcRect.setHeight(destRect.height() * destToSrcMultiplier);
- switch (aspectRatio->align()) {
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMID:
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID:
- srcRect.setY(destRect.y() + image()->height() / 2.0f - srcRect.height() / 2.0f);
- break;
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMAX:
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX:
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMAX:
- srcRect.setY(destRect.y() + image()->height() - srcRect.height());
- break;
- }
- }
- // if the destination width is less than the width of the image we'll be drawing
- if (origDestWidth < (origDestHeight / widthToHeightMultiplier)) {
- float destToSrcMultiplier = srcRect.height() / destRect.height();
- srcRect.setWidth(destRect.width() * destToSrcMultiplier);
- switch (aspectRatio->align()) {
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMIN:
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX:
- srcRect.setX(destRect.x() + image()->width() / 2.0f - srcRect.width() / 2.0f);
- break;
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMIN:
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID:
- case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMAX:
- srcRect.setX(destRect.x() + image()->width() - srcRect.width());
- break;
- }
- }
- }
-}
-
void RenderSVGImage::layout()
{
ASSERT(needsLayout());
@@ -138,6 +64,7 @@ void RenderSVGImage::layout()
calcHeight();
m_localBounds = FloatRect(image->x().value(image), image->y().value(image), image->width().value(image), image->height().value(image));
+ m_cachedLocalRepaintRect = FloatRect();
repainter.repaintAfterLayout();
@@ -157,16 +84,16 @@ void RenderSVGImage::paint(PaintInfo& paintInfo, int, int)
PaintInfo savedInfo(paintInfo);
- prepareToRenderSVGContent(this, paintInfo, m_localBounds, filter);
+ if (prepareToRenderSVGContent(this, paintInfo, m_localBounds, filter)) {
+ FloatRect destRect = m_localBounds;
+ FloatRect srcRect(0, 0, image()->width(), image()->height());
- FloatRect destRect = m_localBounds;
- FloatRect srcRect(0, 0, image()->width(), image()->height());
+ SVGImageElement* imageElt = static_cast<SVGImageElement*>(node());
+ if (imageElt->preserveAspectRatio().align() != SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_NONE)
+ imageElt->preserveAspectRatio().transformRect(destRect, srcRect);
- SVGImageElement* imageElt = static_cast<SVGImageElement*>(node());
- if (imageElt->preserveAspectRatio()->align() != SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_NONE)
- adjustRectsForAspectRatio(destRect, srcRect, imageElt->preserveAspectRatio());
-
- paintInfo.context->drawImage(image(), DeviceColorSpace, destRect, srcRect);
+ paintInfo.context->drawImage(image(), DeviceColorSpace, destRect, srcRect);
+ }
finishRenderSVGContent(this, paintInfo, filter, savedInfo.context);
}
@@ -212,12 +139,29 @@ FloatRect RenderSVGImage::objectBoundingBox() const
FloatRect RenderSVGImage::repaintRectInLocalCoordinates() const
{
- FloatRect repaintRect = m_localBounds;
+ // If we already have a cached repaint rect, return that
+ if (!m_cachedLocalRepaintRect.isEmpty())
+ return m_cachedLocalRepaintRect;
+
+ m_cachedLocalRepaintRect = m_localBounds;
+
+ // FIXME: We need to be careful here. We assume that there is no filter,
+ // clipper or masker if the rects are empty.
+ FloatRect rect = filterBoundingBoxForRenderer(this);
+ if (!rect.isEmpty())
+ m_cachedLocalRepaintRect = rect;
+
+ rect = clipperBoundingBoxForRenderer(this);
+ if (!rect.isEmpty())
+ m_cachedLocalRepaintRect.intersect(rect);
+
+ rect = maskerBoundingBoxForRenderer(this);
+ if (!rect.isEmpty())
+ m_cachedLocalRepaintRect.intersect(rect);
- // Filters can paint outside the image content
- repaintRect.unite(filterBoundingBoxForRenderer(this));
+ style()->svgStyle()->inflateForShadow(m_cachedLocalRepaintRect);
- return repaintRect;
+ return m_cachedLocalRepaintRect;
}
void RenderSVGImage::imageChanged(WrappedImagePtr image, const IntRect* rect)
@@ -233,6 +177,7 @@ IntRect RenderSVGImage::clippedOverflowRectForRepaint(RenderBoxModelObject* repa
void RenderSVGImage::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed)
{
+ style()->svgStyle()->inflateForShadow(repaintRect);
SVGRenderBase::computeRectForRepaint(this, repaintContainer, repaintRect, fixed);
}
@@ -241,11 +186,12 @@ void RenderSVGImage::mapLocalToContainer(RenderBoxModelObject* repaintContainer,
SVGRenderBase::mapLocalToContainer(this, repaintContainer, fixed, useTransforms, transformState);
}
-void RenderSVGImage::addFocusRingRects(GraphicsContext* graphicsContext, int, int)
+void RenderSVGImage::addFocusRingRects(Vector<IntRect>& rects, int, int)
{
// this is called from paint() after the localTransform has already been applied
IntRect contentRect = enclosingIntRect(repaintRectInLocalCoordinates());
- graphicsContext->addFocusRingRect(contentRect);
+ if (!contentRect.isEmpty())
+ rects.append(contentRect);
}
void RenderSVGImage::absoluteRects(Vector<IntRect>& rects, int, int)
diff --git a/WebCore/rendering/RenderSVGImage.h b/WebCore/rendering/RenderSVGImage.h
index ef11719..0558aed 100644
--- a/WebCore/rendering/RenderSVGImage.h
+++ b/WebCore/rendering/RenderSVGImage.h
@@ -24,28 +24,29 @@
#define RenderSVGImage_h
#if ENABLE(SVG)
-
-#include "TransformationMatrix.h"
#include "FloatRect.h"
#include "RenderImage.h"
+#include "SVGPreserveAspectRatio.h"
#include "SVGRenderSupport.h"
+#include "TransformationMatrix.h"
namespace WebCore {
class SVGImageElement;
- class SVGPreserveAspectRatio;
class RenderSVGImage : public RenderImage, SVGRenderBase {
public:
RenderSVGImage(SVGImageElement*);
private:
+ virtual const SVGRenderBase* toSVGRenderBase() const { return this; }
virtual const char* renderName() const { return "RenderSVGImage"; }
virtual bool isSVGImage() const { return true; }
- virtual TransformationMatrix localToParentTransform() const { return m_localTransform; }
+ virtual const TransformationMatrix& localToParentTransform() const { return m_localTransform; }
virtual FloatRect objectBoundingBox() const;
+ virtual FloatRect strokeBoundingBox() const { return m_localBounds; }
virtual FloatRect repaintRectInLocalCoordinates() const;
virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer);
@@ -55,10 +56,9 @@ namespace WebCore {
virtual void absoluteRects(Vector<IntRect>&, int tx, int ty);
virtual void absoluteQuads(Vector<FloatQuad>&);
- virtual void addFocusRingRects(GraphicsContext*, int tx, int ty);
+ virtual void addFocusRingRects(Vector<IntRect>&, int tx, int ty);
virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
- void adjustRectsForAspectRatio(FloatRect& destRect, FloatRect& srcRect, SVGPreserveAspectRatio*);
virtual void layout();
virtual void paint(PaintInfo&, int parentX, int parentY);
@@ -72,6 +72,7 @@ namespace WebCore {
TransformationMatrix m_localTransform;
FloatRect m_localBounds;
+ mutable FloatRect m_cachedLocalRepaintRect;
};
} // namespace WebCore
diff --git a/WebCore/rendering/RenderSVGInline.h b/WebCore/rendering/RenderSVGInline.h
index 9f9f3f5..53fd4b7 100644
--- a/WebCore/rendering/RenderSVGInline.h
+++ b/WebCore/rendering/RenderSVGInline.h
@@ -27,6 +27,8 @@
#if ENABLE(SVG)
#include "RenderInline.h"
+#include "SVGRenderSupport.h"
+
namespace WebCore {
class RenderSVGInline : public RenderInline {
@@ -38,6 +40,9 @@ public:
// These are shared between RenderSVGTSpan and RenderSVGTextPath
virtual void absoluteRects(Vector<IntRect>& rects, int tx, int ty);
virtual void absoluteQuads(Vector<FloatQuad>&);
+
+ virtual FloatRect objectBoundingBox() const { return FloatRect(); }
+ virtual FloatRect repaintRectInLocalCoordinates() const { return FloatRect(); }
private:
virtual InlineFlowBox* createInlineFlowBox();
diff --git a/WebCore/rendering/RenderSVGModelObject.cpp b/WebCore/rendering/RenderSVGModelObject.cpp
index 3fab5a6..7a76fbd 100644
--- a/WebCore/rendering/RenderSVGModelObject.cpp
+++ b/WebCore/rendering/RenderSVGModelObject.cpp
@@ -56,6 +56,7 @@ IntRect RenderSVGModelObject::clippedOverflowRectForRepaint(RenderBoxModelObject
void RenderSVGModelObject::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed)
{
+ style()->svgStyle()->inflateForShadow(repaintRect);
SVGRenderBase::computeRectForRepaint(this, repaintContainer, repaintRect, fixed);
}
diff --git a/WebCore/rendering/RenderSVGModelObject.h b/WebCore/rendering/RenderSVGModelObject.h
index 0aa13ad..4c50734 100644
--- a/WebCore/rendering/RenderSVGModelObject.h
+++ b/WebCore/rendering/RenderSVGModelObject.h
@@ -49,6 +49,8 @@ class RenderSVGModelObject : public RenderObject, protected SVGRenderBase {
public:
RenderSVGModelObject(SVGStyledElement*);
+ virtual const SVGRenderBase* toSVGRenderBase() const { return this; }
+
virtual bool requiresLayer() const { return false; }
virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer);
diff --git a/WebCore/rendering/RenderSVGRoot.cpp b/WebCore/rendering/RenderSVGRoot.cpp
index 0a39bf4..4a3bbcc 100644
--- a/WebCore/rendering/RenderSVGRoot.cpp
+++ b/WebCore/rendering/RenderSVGRoot.cpp
@@ -86,23 +86,20 @@ void RenderSVGRoot::layout()
LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && selfNeedsLayout());
+ int oldWidth = width();
calcWidth();
+
+ int oldHeight = height();
calcHeight();
SVGSVGElement* svg = static_cast<SVGSVGElement*>(node());
setWidth(static_cast<int>(width() * svg->currentScale()));
setHeight(static_cast<int>(height() * svg->currentScale()));
-
calcViewport();
-
- for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
- if (selfNeedsLayout()) // either bounds or transform changed, force kids to relayout
- child->setNeedsLayout(true, false);
-
- child->layoutIfNeeded();
- ASSERT(!child->needsLayout());
- }
+ // RenderSVGRoot needs to take special care to propagate window size changes to the children,
+ // if the outermost <svg> is using relative x/y/width/height values. Hence the additonal parameters.
+ layoutChildren(this, selfNeedsLayout() || (svg->hasRelativeValues() && (width() != oldWidth || height() != oldHeight)));
repainter.repaintAfterLayout();
view()->enableLayoutState();
@@ -113,7 +110,7 @@ bool RenderSVGRoot::selfWillPaint() const
{
#if ENABLE(FILTERS)
const SVGRenderStyle* svgStyle = style()->svgStyle();
- SVGResourceFilter* filter = getFilterById(document(), svgStyle->filter());
+ SVGResourceFilter* filter = getFilterById(document(), svgStyle->filter(), this);
if (filter)
return true;
#endif
@@ -153,10 +150,13 @@ void RenderSVGRoot::paint(PaintInfo& paintInfo, int parentX, int parentY)
SVGResourceFilter* filter = 0;
FloatRect boundingBox = repaintRectInLocalCoordinates();
+
+ bool continueRendering = true;
if (childPaintInfo.phase == PaintPhaseForeground)
- prepareToRenderSVGContent(this, childPaintInfo, boundingBox, filter);
+ continueRendering = prepareToRenderSVGContent(this, childPaintInfo, boundingBox, filter);
- RenderBox::paint(childPaintInfo, 0, 0);
+ if (continueRendering)
+ RenderBox::paint(childPaintInfo, 0, 0);
if (childPaintInfo.phase == PaintPhaseForeground)
finishRenderSVGContent(this, childPaintInfo, filter, paintInfo.context);
@@ -224,14 +224,15 @@ TransformationMatrix RenderSVGRoot::localToRepaintContainerTransform(const IntPo
return localToParentTransform() * parentToContainer;
}
-TransformationMatrix RenderSVGRoot::localToParentTransform() const
+const TransformationMatrix& RenderSVGRoot::localToParentTransform() const
{
IntSize parentToBorderBoxOffset = parentOriginToBorderBox();
TransformationMatrix borderBoxOriginToParentOrigin;
borderBoxOriginToParentOrigin.translate(parentToBorderBoxOffset.width(), parentToBorderBoxOffset.height());
- return localToBorderBoxTransform() * borderBoxOriginToParentOrigin;
+ m_localToParentTransform = localToBorderBoxTransform() * borderBoxOriginToParentOrigin;
+ return m_localToParentTransform;
}
// FIXME: This method should be removed as soon as callers to RenderBox::absoluteTransform() can be removed.
@@ -249,7 +250,9 @@ FloatRect RenderSVGRoot::objectBoundingBox() const
FloatRect RenderSVGRoot::repaintRectInLocalCoordinates() const
{
// FIXME: This does not include the border but it should!
- return computeContainerBoundingBox(this, true);
+ FloatRect repaintRect = computeContainerBoundingBox(this, true);
+ style()->svgStyle()->inflateForShadow(repaintRect);
+ return repaintRect;
}
TransformationMatrix RenderSVGRoot::localTransform() const
@@ -259,8 +262,10 @@ TransformationMatrix RenderSVGRoot::localTransform() const
void RenderSVGRoot::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed)
{
- // Apply our local transforms (except for x/y translation) and call RenderBox's method to handle all the normal CSS Box model bits
+ // Apply our local transforms (except for x/y translation), then our shadow,
+ // and then call RenderBox's method to handle all the normal CSS Box model bits
repaintRect = localToBorderBoxTransform().mapRect(repaintRect);
+ style()->svgStyle()->inflateForShadow(repaintRect);
RenderBox::computeRectForRepaint(repaintContainer, repaintRect, fixed);
}
@@ -310,5 +315,3 @@ bool RenderSVGRoot::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
}
#endif // ENABLE(SVG)
-
-// vim:ts=4:noet
diff --git a/WebCore/rendering/RenderSVGRoot.h b/WebCore/rendering/RenderSVGRoot.h
index 08c3058..b2f8f7c 100644
--- a/WebCore/rendering/RenderSVGRoot.h
+++ b/WebCore/rendering/RenderSVGRoot.h
@@ -54,12 +54,13 @@ private:
virtual void layout();
virtual void paint(PaintInfo&, int parentX, int parentY);
- virtual TransformationMatrix localToParentTransform() const;
+ virtual const TransformationMatrix& localToParentTransform() const;
bool fillContains(const FloatPoint&) const;
bool strokeContains(const FloatPoint&) const;
virtual FloatRect objectBoundingBox() const;
+ virtual FloatRect strokeBoundingBox() const { return computeContainerBoundingBox(this, true); }
virtual FloatRect repaintRectInLocalCoordinates() const;
// FIXME: Both of these overrides should be removed.
@@ -84,6 +85,7 @@ private:
RenderObjectChildList m_children;
FloatSize m_viewportSize;
+ mutable TransformationMatrix m_localToParentTransform;
};
inline RenderSVGRoot* toRenderSVGRoot(RenderObject* object)
diff --git a/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp b/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp
new file mode 100644
index 0000000..9d3d26f
--- /dev/null
+++ b/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp
@@ -0,0 +1,101 @@
+/*
+ Copyright (C) Research In Motion Limited 2010. All rights reserved.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint 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 "RenderSVGShadowTreeRootContainer.h"
+
+#include "MouseEvent.h"
+#include "SVGShadowTreeElements.h"
+#include "SVGUseElement.h"
+
+namespace WebCore {
+
+RenderSVGShadowTreeRootContainer::RenderSVGShadowTreeRootContainer(SVGUseElement* node)
+ : RenderSVGTransformableContainer(node)
+ , m_recreateTree(false)
+{
+}
+
+RenderSVGShadowTreeRootContainer::~RenderSVGShadowTreeRootContainer()
+{
+ if (m_shadowRoot && m_shadowRoot->attached())
+ m_shadowRoot->detach();
+}
+
+void RenderSVGShadowTreeRootContainer::updateStyle(Node::StyleChange change)
+{
+ if (m_shadowRoot && m_shadowRoot->attached())
+ m_shadowRoot->recalcStyle(change);
+}
+
+void RenderSVGShadowTreeRootContainer::updateFromElement()
+{
+ bool hadExistingTree = m_shadowRoot;
+
+ SVGUseElement* useElement = static_cast<SVGUseElement*>(node());
+ if (!m_shadowRoot) {
+ ASSERT(!m_recreateTree);
+ m_shadowRoot = new SVGShadowTreeRootElement(document(), useElement);
+ useElement->buildPendingResource();
+ }
+
+ ASSERT(m_shadowRoot->shadowParentNode() == useElement);
+
+ bool shouldRecreateTree = m_recreateTree;
+ if (m_recreateTree) {
+ ASSERT(hadExistingTree);
+
+ if (m_shadowRoot->attached())
+ m_shadowRoot->detach();
+
+ m_shadowRoot->removeAllChildren();
+ m_recreateTree = false;
+ }
+
+ // Only rebuild the shadow tree, if we a) never had a tree or b) we were specifically asked to do so
+ // If the use element is a pending resource, and a) or b) is true, do nothing, and wait for the use
+ // element to be asked to buildPendingResource(), this will call us again, with m_recreateTrue=true.
+ if ((shouldRecreateTree || !hadExistingTree) && !useElement->isPendingResource()) {
+ useElement->buildShadowAndInstanceTree(m_shadowRoot.get());
+
+ // Attach shadow root element
+ m_shadowRoot->attachElement(style(), renderArena());
+
+ // Attach subtree, as if it was a regular non-shadow tree
+ for (Node* child = m_shadowRoot->firstChild(); child; child = child->nextSibling())
+ child->attach();
+ }
+
+ ASSERT(!m_recreateTree);
+ RenderSVGTransformableContainer::updateFromElement();
+}
+
+void RenderSVGShadowTreeRootContainer::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
+{
+ RenderSVGTransformableContainer::styleDidChange(diff, oldStyle);
+
+ if (RenderObject* shadowRootRenderer = m_shadowRoot ? m_shadowRoot->renderer() : 0)
+ shadowRootRenderer->setStyle(style());
+}
+
+}
+
+#endif
diff --git a/WebCore/rendering/RenderSVGShadowTreeRootContainer.h b/WebCore/rendering/RenderSVGShadowTreeRootContainer.h
new file mode 100644
index 0000000..01cd427
--- /dev/null
+++ b/WebCore/rendering/RenderSVGShadowTreeRootContainer.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) Research In Motion Limited 2010. All rights reserved.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint 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 RenderSVGShadowTreeRootContainer_h
+#define RenderSVGShadowTreeRootContainer_h
+
+#if ENABLE(SVG)
+#include "RenderSVGTransformableContainer.h"
+
+namespace WebCore {
+
+class SVGUseElement;
+class SVGShadowTreeRootElement;
+
+class RenderSVGShadowTreeRootContainer : public RenderSVGTransformableContainer {
+public:
+ RenderSVGShadowTreeRootContainer(SVGUseElement*);
+ virtual ~RenderSVGShadowTreeRootContainer();
+
+ void markShadowTreeForRecreation() { m_recreateTree = true; }
+ void updateStyle(Node::StyleChange);
+ virtual void updateFromElement();
+
+private:
+ virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
+
+ bool m_recreateTree;
+ RefPtr<SVGShadowTreeRootElement> m_shadowRoot;
+};
+
+}
+
+#endif
+#endif
diff --git a/WebCore/rendering/RenderSVGText.cpp b/WebCore/rendering/RenderSVGText.cpp
index 3919d7f..0cf0332 100644
--- a/WebCore/rendering/RenderSVGText.cpp
+++ b/WebCore/rendering/RenderSVGText.cpp
@@ -6,6 +6,7 @@
* 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
* 2007 Nikolas Zimmermann <zimmermann@kde.org>
* 2008 Rob Buis <buis@kde.org>
+ * 2009 Dirk Schulze <krit@webkit.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -58,6 +59,7 @@ IntRect RenderSVGText::clippedOverflowRectForRepaint(RenderBoxModelObject* repai
void RenderSVGText::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed)
{
+ style()->svgStyle()->inflateForShadow(repaintRect);
SVGRenderBase::computeRectForRepaint(this, repaintContainer, repaintRect, fixed);
}
@@ -184,7 +186,7 @@ FloatRect RenderSVGText::objectBoundingBox() const
return boundingBox;
}
-FloatRect RenderSVGText::repaintRectInLocalCoordinates() const
+FloatRect RenderSVGText::strokeBoundingBox() const
{
FloatRect repaintRect = objectBoundingBox();
@@ -205,7 +207,28 @@ FloatRect RenderSVGText::repaintRectInLocalCoordinates() const
repaintRect.inflate(strokeWidth);
}
- repaintRect.unite(filterBoundingBoxForRenderer(this));
+ return repaintRect;
+}
+
+FloatRect RenderSVGText::repaintRectInLocalCoordinates() const
+{
+ FloatRect repaintRect = strokeBoundingBox();
+
+ // FIXME: We need to be careful here. We assume that there is no filter,
+ // clipper or masker if the rects are empty.
+ FloatRect rect = filterBoundingBoxForRenderer(this);
+ if (!rect.isEmpty())
+ repaintRect = rect;
+
+ rect = clipperBoundingBoxForRenderer(this);
+ if (!rect.isEmpty())
+ repaintRect.intersect(rect);
+
+ rect = maskerBoundingBoxForRenderer(this);
+ if (!rect.isEmpty())
+ repaintRect.intersect(rect);
+
+ style()->svgStyle()->inflateForShadow(repaintRect);
return repaintRect;
}
diff --git a/WebCore/rendering/RenderSVGText.h b/WebCore/rendering/RenderSVGText.h
index 9a2770b..d001d1c 100644
--- a/WebCore/rendering/RenderSVGText.h
+++ b/WebCore/rendering/RenderSVGText.h
@@ -40,9 +40,11 @@ public:
private:
virtual const char* renderName() const { return "RenderSVGText"; }
+ virtual const SVGRenderBase* toSVGRenderBase() const { return this; }
+
virtual bool isSVGText() const { return true; }
- virtual TransformationMatrix localToParentTransform() const { return m_localTransform; }
+ virtual const TransformationMatrix& localToParentTransform() const { return m_localTransform; }
virtual void paint(PaintInfo&, int tx, int ty);
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
@@ -60,6 +62,7 @@ private:
virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&) const;
virtual FloatRect objectBoundingBox() const;
+ virtual FloatRect strokeBoundingBox() const;
virtual FloatRect repaintRectInLocalCoordinates() const;
// FIXME: This can be removed when localTransform() is removed from RenderObject
diff --git a/WebCore/rendering/RenderSVGTransformableContainer.cpp b/WebCore/rendering/RenderSVGTransformableContainer.cpp
index 2324eee..050e1bd 100644
--- a/WebCore/rendering/RenderSVGTransformableContainer.cpp
+++ b/WebCore/rendering/RenderSVGTransformableContainer.cpp
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+ Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
2004, 2005, 2006 Rob Buis <buis@kde.org>
2009 Google, Inc.
@@ -20,12 +20,12 @@
*/
#include "config.h"
-#if ENABLE(SVG)
+#if ENABLE(SVG)
#include "RenderSVGTransformableContainer.h"
+#include "SVGShadowTreeElements.h"
#include "SVGStyledTransformableElement.h"
-#include "SVGTransformList.h"
namespace WebCore {
@@ -34,7 +34,7 @@ RenderSVGTransformableContainer::RenderSVGTransformableContainer(SVGStyledTransf
{
}
-TransformationMatrix RenderSVGTransformableContainer::localToParentTransform() const
+const TransformationMatrix& RenderSVGTransformableContainer::localToParentTransform() const
{
return m_localTransform;
}
@@ -47,6 +47,14 @@ TransformationMatrix RenderSVGTransformableContainer::localTransform() const
void RenderSVGTransformableContainer::calculateLocalTransform()
{
m_localTransform = static_cast<SVGStyledTransformableElement*>(node())->animatedLocalTransform();
+ if (!node()->hasTagName(SVGNames::gTag) || !static_cast<SVGGElement*>(node())->isShadowTreeContainerElement())
+ return;
+
+ FloatSize translation = static_cast<SVGShadowTreeContainerElement*>(node())->containerTranslation();
+ if (translation.width() == 0 && translation.height() == 0)
+ return;
+
+ m_localTransform.translateRight(translation.width(), translation.height());
}
}
diff --git a/WebCore/rendering/RenderSVGTransformableContainer.h b/WebCore/rendering/RenderSVGTransformableContainer.h
index c929761..43e4001 100644
--- a/WebCore/rendering/RenderSVGTransformableContainer.h
+++ b/WebCore/rendering/RenderSVGTransformableContainer.h
@@ -31,7 +31,7 @@ namespace WebCore {
public:
RenderSVGTransformableContainer(SVGStyledTransformableElement*);
- virtual TransformationMatrix localToParentTransform() const;
+ virtual const TransformationMatrix& localToParentTransform() const;
private:
virtual void calculateLocalTransform();
diff --git a/WebCore/rendering/RenderSVGViewportContainer.cpp b/WebCore/rendering/RenderSVGViewportContainer.cpp
index a432ef3..b46e8c2 100644
--- a/WebCore/rendering/RenderSVGViewportContainer.cpp
+++ b/WebCore/rendering/RenderSVGViewportContainer.cpp
@@ -38,17 +38,27 @@ RenderSVGViewportContainer::RenderSVGViewportContainer(SVGStyledElement* node)
{
}
-void RenderSVGViewportContainer::paint(PaintInfo& paintInfo, int parentX, int parentY)
+FloatRect RenderSVGViewportContainer::markerBoundaries(const TransformationMatrix& markerTransformation) const
{
- // FIXME: The if statement here evaluates to false. isEmpty() is exactly the same
- // as what is on the right side, so it's basically !isEmpty && isEmpty. So this
- // function does nothing.
+ FloatRect coordinates = repaintRectInLocalCoordinates();
- // A value of zero disables rendering of the element.
- if (!m_viewport.isEmpty() && (m_viewport.width() <= 0. || m_viewport.height() <= 0.))
- return;
+ // Map repaint rect into parent coordinate space, in which the marker boundaries have to be evaluated
+ coordinates = localToParentTransform().mapRect(coordinates);
- RenderSVGContainer::paint(paintInfo, parentX, parentY);
+ return markerTransformation.mapRect(coordinates);
+}
+
+TransformationMatrix RenderSVGViewportContainer::markerContentTransformation(const TransformationMatrix& contentTransformation, const FloatPoint& origin, float strokeWidth) const
+{
+ // The 'origin' coordinate maps to SVGs refX/refY, given in coordinates relative to the viewport established by the marker
+ FloatPoint mappedOrigin = viewportTransform().mapPoint(origin);
+
+ TransformationMatrix transformation = contentTransformation;
+ if (strokeWidth != -1)
+ transformation.scaleNonUniform(strokeWidth, strokeWidth);
+
+ transformation.translate(-mappedOrigin.x(), -mappedOrigin.y());
+ return transformation;
}
void RenderSVGViewportContainer::applyViewportClip(PaintInfo& paintInfo)
@@ -95,11 +105,12 @@ TransformationMatrix RenderSVGViewportContainer::viewportTransform() const
return TransformationMatrix();
}
-TransformationMatrix RenderSVGViewportContainer::localToParentTransform() const
+const TransformationMatrix& RenderSVGViewportContainer::localToParentTransform() const
{
TransformationMatrix viewportTranslation;
viewportTranslation.translate(m_viewport.x(), m_viewport.y());
- return viewportTransform() * viewportTranslation;
+ m_localToParentTransform = viewportTransform() * viewportTranslation;
+ return m_localToParentTransform;
// If this class were ever given a localTransform(), then the above would read:
// return viewportTransform() * localTransform() * viewportTranslation;
}
@@ -125,5 +136,3 @@ bool RenderSVGViewportContainer::pointIsInsideViewportClip(const FloatPoint& poi
}
#endif // ENABLE(SVG)
-
-// vim:ts=4:noet
diff --git a/WebCore/rendering/RenderSVGViewportContainer.h b/WebCore/rendering/RenderSVGViewportContainer.h
index b8b30b5..ee08b60 100644
--- a/WebCore/rendering/RenderSVGViewportContainer.h
+++ b/WebCore/rendering/RenderSVGViewportContainer.h
@@ -24,7 +24,6 @@
#define RenderSVGViewportContainer_h
#if ENABLE(SVG)
-
#include "RenderSVGContainer.h"
namespace WebCore {
@@ -35,16 +34,19 @@ class RenderSVGViewportContainer : public RenderSVGContainer {
public:
RenderSVGViewportContainer(SVGStyledElement*);
- // FIXME: This is only public for SVGResourceMarker::draw, likely the callsite should be changed.
- TransformationMatrix viewportTransform() const;
+ // Calculates marker boundaries, mapped to the target element's coordinate space
+ FloatRect markerBoundaries(const TransformationMatrix& markerTransformation) const;
- virtual void paint(PaintInfo&, int parentX, int parentY);
+ // Generates a transformation matrix usable to render marker content. Handles scaling the marker content
+ // acording to SVGs markerUnits="strokeWidth" concept, when a strokeWidth value != -1 is passed in.
+ TransformationMatrix markerContentTransformation(const TransformationMatrix& contentTransformation, const FloatPoint& origin, float strokeWidth = -1) const;
private:
virtual bool isSVGContainer() const { return true; }
virtual const char* renderName() const { return "RenderSVGViewportContainer"; }
- virtual TransformationMatrix localToParentTransform() const;
+ TransformationMatrix viewportTransform() const;
+ virtual const TransformationMatrix& localToParentTransform() const;
// FIXME: This override should be removed once callers of RenderBox::absoluteTransform() can be removed.
virtual TransformationMatrix absoluteTransform() const;
@@ -55,6 +57,7 @@ private:
virtual bool pointIsInsideViewportClip(const FloatPoint& pointInParent);
FloatRect m_viewport;
+ mutable TransformationMatrix m_localToParentTransform;
};
inline RenderSVGViewportContainer* toRenderSVGViewportContainer(RenderObject* object)
@@ -70,5 +73,3 @@ void toRenderSVGViewportContainer(const RenderSVGViewportContainer*);
#endif // ENABLE(SVG)
#endif // RenderSVGViewportContainer_h
-
-// vim:ts=4:noet
diff --git a/WebCore/rendering/RenderTableCell.cpp b/WebCore/rendering/RenderTableCell.cpp
index 4e7036e..2395527 100644
--- a/WebCore/rendering/RenderTableCell.cpp
+++ b/WebCore/rendering/RenderTableCell.cpp
@@ -237,7 +237,7 @@ void RenderTableCell::computeRectForRepaint(RenderBoxModelObject* repaintContain
return;
r.setY(r.y());
RenderView* v = view();
- if ((!v || !v->layoutStateEnabled()) && parent())
+ if ((!v || !v->layoutStateEnabled() || repaintContainer) && parent())
r.move(-parentBox()->x(), -parentBox()->y()); // Rows are in the same coordinate space, so don't add their offset in.
RenderBlock::computeRectForRepaint(repaintContainer, r, fixed);
}
@@ -845,7 +845,7 @@ void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, int tx, i
paintInfo.context->save();
paintInfo.context->clip(clipRect);
}
- paintFillLayers(paintInfo, c, bgLayer, tx, ty, w, h);
+ paintFillLayers(paintInfo, c, bgLayer, tx, ty, w, h, CompositeSourceOver, backgroundObject);
if (shouldClip)
paintInfo.context->restore();
}
diff --git a/WebCore/rendering/RenderTableCell.h b/WebCore/rendering/RenderTableCell.h
index f285198..0f8580d 100644
--- a/WebCore/rendering/RenderTableCell.h
+++ b/WebCore/rendering/RenderTableCell.h
@@ -106,6 +106,8 @@ public:
virtual void setOverrideSize(int);
+ bool hasVisibleOverflow() const { return m_overflow; }
+
protected:
virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
diff --git a/WebCore/rendering/RenderTableSection.cpp b/WebCore/rendering/RenderTableSection.cpp
index b627afe..a2457e1 100644
--- a/WebCore/rendering/RenderTableSection.cpp
+++ b/WebCore/rendering/RenderTableSection.cpp
@@ -733,12 +733,11 @@ int RenderTableSection::layoutRows(int toAdd)
if (r < totalRows - 1 && cell == cellAt(r + 1, c).cell)
continue;
addOverflowFromChild(cell);
+ m_hasOverflowingCell |= cell->hasVisibleOverflow();
}
}
- m_hasOverflowingCell = m_overflow;
-
- statePusher.pop();
+ statePusher.pop();
return height();
}
diff --git a/WebCore/rendering/RenderText.cpp b/WebCore/rendering/RenderText.cpp
index 95aa277..2e696a9 100644
--- a/WebCore/rendering/RenderText.cpp
+++ b/WebCore/rendering/RenderText.cpp
@@ -25,7 +25,9 @@
#include "config.h"
#include "RenderText.h"
+#include "AXObjectCache.h"
#include "CharacterNames.h"
+#include "EllipsisBox.h"
#include "FloatQuad.h"
#include "FrameView.h"
#include "InlineTextBox.h"
@@ -286,7 +288,7 @@ void RenderText::absoluteQuadsForRange(Vector<FloatQuad>& quads, unsigned start,
} else {
unsigned realEnd = min(box->end() + 1, end);
IntRect r = box->selectionRect(0, 0, start, realEnd);
- if (!r.isEmpty()) {
+ if (r.height()) {
if (!useSelectionHeight) {
// change the height and y position because selectionRect uses selection-specific values
r.setHeight(box->height());
@@ -338,7 +340,7 @@ VisiblePosition RenderText::positionForPoint(const IntPoint& point)
// at the y coordinate of the last line or below
// and the x coordinate is to the right of the last text box right edge
offset = lastTextBox()->offsetForPosition(point.x());
- return createVisiblePosition(offset + lastTextBox()->start(), DOWNSTREAM);
+ return createVisiblePosition(offset + lastTextBox()->start(), VP_UPSTREAM_IF_POSSIBLE);
}
InlineTextBox* lastBoxAbove = 0;
@@ -1014,6 +1016,10 @@ void RenderText::setText(PassRefPtr<StringImpl> text, bool force)
setTextInternal(text);
setNeedsLayoutAndPrefWidthsRecalc();
m_knownNotToUseFallbackFonts = false;
+
+ AXObjectCache* axObjectCache = document()->axObjectCache();
+ if (axObjectCache->accessibilityEnabled())
+ axObjectCache->contentChanged(this);
}
int RenderText::lineHeight(bool firstLine, bool) const
@@ -1060,8 +1066,15 @@ void RenderText::positionLineBox(InlineBox* box)
if (!s->len()) {
// We want the box to be destroyed.
s->remove();
+ if (m_firstTextBox == s)
+ m_firstTextBox = s->nextTextBox();
+ else
+ s->prevTextBox()->setNextLineBox(s->nextTextBox());
+ if (m_lastTextBox == s)
+ m_lastTextBox = s->prevTextBox();
+ else
+ s->nextTextBox()->setPreviousLineBox(s->prevTextBox());
s->destroy(renderArena());
- m_firstTextBox = m_lastTextBox = 0;
return;
}
@@ -1164,9 +1177,25 @@ IntRect RenderText::selectionRectForRepaint(RenderBoxModelObject* repaintContain
return IntRect();
IntRect rect;
- for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox())
+ for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) {
rect.unite(box->selectionRect(0, 0, startPos, endPos));
+ // Check if there are ellipsis which fall within the selection.
+ unsigned short truncation = box->truncation();
+ if (truncation != cNoTruncation) {
+ if (EllipsisBox* ellipsis = box->root()->ellipsisBox()) {
+ int ePos = min<int>(endPos - box->start(), box->len());
+ int sPos = max<int>(startPos - box->start(), 0);
+ // The ellipsis should be considered to be selected if the end of
+ // the selection is past the beginning of the truncation and the
+ // beginning of the selection is before or at the beginning of the
+ // truncation.
+ if (ePos >= truncation && sPos <= truncation)
+ rect.unite(ellipsis->selectionRect(0, 0));
+ }
+ }
+ }
+
if (clipToVisibleContent)
computeRectForRepaint(repaintContainer, rect);
else {
@@ -1362,7 +1391,7 @@ void RenderText::checkConsistency() const
#ifdef CHECK_CONSISTENCY
const InlineTextBox* prev = 0;
for (const InlineTextBox* child = m_firstTextBox; child != 0; child = child->nextTextBox()) {
- ASSERT(child->object() == this);
+ ASSERT(child->renderer() == this);
ASSERT(child->prevTextBox() == prev);
prev = child;
}
diff --git a/WebCore/rendering/RenderTextControl.cpp b/WebCore/rendering/RenderTextControl.cpp
index b258597..c0ba070 100644
--- a/WebCore/rendering/RenderTextControl.cpp
+++ b/WebCore/rendering/RenderTextControl.cpp
@@ -195,7 +195,7 @@ void RenderTextControl::setInnerTextValue(const String& innerTextValue)
ASSERT(!ec);
}
- // We set m_lastChangeWasUserEdit to false since this change was not explicty made by the user (say, via typing on the keyboard), see <rdar://problem/5359921>.
+ // We set m_lastChangeWasUserEdit to false since this change was not explicitly made by the user (say, via typing on the keyboard), see <rdar://problem/5359921>.
m_lastChangeWasUserEdit = false;
}
@@ -505,9 +505,10 @@ void RenderTextControl::selectionChanged(bool userTriggered)
}
}
-void RenderTextControl::addFocusRingRects(GraphicsContext* graphicsContext, int tx, int ty)
+void RenderTextControl::addFocusRingRects(Vector<IntRect>& rects, int tx, int ty)
{
- graphicsContext->addFocusRingRect(IntRect(tx, ty, width(), height()));
+ if (width() && height())
+ rects.append(IntRect(tx, ty, width(), height()));
}
HTMLElement* RenderTextControl::innerTextElement() const
diff --git a/WebCore/rendering/RenderTextControl.h b/WebCore/rendering/RenderTextControl.h
index 394eb9c..d1f3749 100644
--- a/WebCore/rendering/RenderTextControl.h
+++ b/WebCore/rendering/RenderTextControl.h
@@ -99,7 +99,7 @@ private:
virtual bool avoidsFloats() const { return true; }
void setInnerTextStyle(PassRefPtr<RenderStyle>);
- virtual void addFocusRingRects(GraphicsContext*, int tx, int ty);
+ virtual void addFocusRingRects(Vector<IntRect>&, int tx, int ty);
virtual bool canBeProgramaticallyScrolled(bool) const { return true; }
diff --git a/WebCore/rendering/RenderTextControlSingleLine.cpp b/WebCore/rendering/RenderTextControlSingleLine.cpp
index 56d4363..b68f004 100644
--- a/WebCore/rendering/RenderTextControlSingleLine.cpp
+++ b/WebCore/rendering/RenderTextControlSingleLine.cpp
@@ -472,8 +472,12 @@ void RenderTextControlSingleLine::updateFromElement()
ExceptionCode ec = 0;
innerTextElement()->setInnerText(static_cast<Element*>(node())->getAttribute(placeholderAttr), ec);
ASSERT(!ec);
- } else
- setInnerTextValue(inputElement()->value());
+ } else {
+ if (!inputElement()->suggestedValue().isNull())
+ setInnerTextValue(inputElement()->suggestedValue());
+ else
+ setInnerTextValue(inputElement()->value());
+ }
if (m_searchPopupIsVisible)
m_searchPopup->updateFromElement();
diff --git a/WebCore/rendering/RenderTheme.cpp b/WebCore/rendering/RenderTheme.cpp
index f6afb77..af92465 100644
--- a/WebCore/rendering/RenderTheme.cpp
+++ b/WebCore/rendering/RenderTheme.cpp
@@ -87,6 +87,8 @@ void RenderTheme::adjustStyle(CSSStyleSelector* selector, RenderStyle* style, El
switch (part) {
case ListButtonPart:
case CheckboxPart:
+ case InnerSpinButtonPart:
+ case OuterSpinButtonPart:
case RadioPart:
case PushButtonPart:
case SquareButtonPart:
@@ -176,6 +178,10 @@ void RenderTheme::adjustStyle(CSSStyleSelector* selector, RenderStyle* style, El
case DefaultButtonPart:
case ButtonPart:
return adjustButtonStyle(selector, style, e);
+ case InnerSpinButtonPart:
+ return adjustInnerSpinButtonStyle(selector, style, e);
+ case OuterSpinButtonPart:
+ return adjustOuterSpinButtonStyle(selector, style, e);
#endif
case TextFieldPart:
return adjustTextFieldStyle(selector, style, e);
@@ -236,6 +242,8 @@ bool RenderTheme::paint(RenderObject* o, const RenderObject::PaintInfo& paintInf
case ListButtonPart:
case DefaultButtonPart:
case ButtonPart:
+ case InnerSpinButtonPart:
+ case OuterSpinButtonPart:
m_theme->paint(part, controlStatesForRenderer(o), const_cast<GraphicsContext*>(paintInfo.context), r, o->style()->effectiveZoom(), o->view()->frameView());
return false;
default:
@@ -256,6 +264,10 @@ bool RenderTheme::paint(RenderObject* o, const RenderObject::PaintInfo& paintInf
case DefaultButtonPart:
case ButtonPart:
return paintButton(o, paintInfo, r);
+ case InnerSpinButtonPart:
+ return paintInnerSpinButton(o, paintInfo, r);
+ case OuterSpinButtonPart:
+ return paintOuterSpinButton(o, paintInfo, r);
#endif
case MenulistPart:
return paintMenuList(o, paintInfo, r);
@@ -589,7 +601,7 @@ bool RenderTheme::supportsFocusRing(const RenderStyle* style) const
bool RenderTheme::stateChanged(RenderObject* o, ControlState state) const
{
- // Default implementation assumes the controls dont respond to changes in :hover state
+ // Default implementation assumes the controls don't respond to changes in :hover state
if (state == HoverState && !supportsHover(o->style()))
return false;
@@ -766,6 +778,14 @@ void RenderTheme::adjustButtonStyle(CSSStyleSelector*, RenderStyle* style, Eleme
setButtonSize(style);
}
+void RenderTheme::adjustInnerSpinButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const
+{
+}
+
+void RenderTheme::adjustOuterSpinButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const
+{
+}
+
#endif
void RenderTheme::adjustTextFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const
diff --git a/WebCore/rendering/RenderTheme.h b/WebCore/rendering/RenderTheme.h
index ee359d7..a7c6e13 100644
--- a/WebCore/rendering/RenderTheme.h
+++ b/WebCore/rendering/RenderTheme.h
@@ -173,6 +173,8 @@ public:
// Media controls
virtual bool hitTestMediaControlPart(RenderObject*, const IntPoint& absPoint);
virtual bool shouldRenderMediaControlPart(ControlPart, Element*);
+ virtual double mediaControlsFadeInDuration() { return 0.1; }
+ virtual double mediaControlsFadeOutDuration() { return 0.3; }
#endif
protected:
@@ -203,6 +205,11 @@ protected:
virtual void adjustButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
virtual bool paintButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
virtual void setButtonSize(RenderStyle*) const { }
+
+ virtual void adjustInnerSpinButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual bool paintInnerSpinButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
+ virtual void adjustOuterSpinButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual bool paintOuterSpinButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
#endif
virtual void adjustTextFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
diff --git a/WebCore/rendering/RenderThemeChromiumLinux.cpp b/WebCore/rendering/RenderThemeChromiumLinux.cpp
index 4b09174..f972a12 100644
--- a/WebCore/rendering/RenderThemeChromiumLinux.cpp
+++ b/WebCore/rendering/RenderThemeChromiumLinux.cpp
@@ -35,6 +35,14 @@ namespace WebCore {
unsigned RenderThemeChromiumLinux::m_thumbInactiveColor = 0xf0ebe5;
unsigned RenderThemeChromiumLinux::m_thumbActiveColor = 0xfaf8f5;
unsigned RenderThemeChromiumLinux::m_trackColor = 0xe3ddd8;
+unsigned RenderThemeChromiumLinux::m_activeSelectionBackgroundColor =
+ 0xff1e90ff;
+unsigned RenderThemeChromiumLinux::m_activeSelectionForegroundColor =
+ Color::black;
+unsigned RenderThemeChromiumLinux::m_inactiveSelectionBackgroundColor =
+ 0xffc8c8c8;
+unsigned RenderThemeChromiumLinux::m_inactiveSelectionForegroundColor =
+ 0xff323232;
PassRefPtr<RenderTheme> RenderThemeChromiumLinux::create()
{
@@ -96,6 +104,26 @@ Color RenderThemeChromiumLinux::inactiveListBoxSelectionForegroundColor() const
return Color(0x32, 0x32, 0x32);
}
+Color RenderThemeChromiumLinux::platformActiveSelectionBackgroundColor() const
+{
+ return m_activeSelectionBackgroundColor;
+}
+
+Color RenderThemeChromiumLinux::platformInactiveSelectionBackgroundColor() const
+{
+ return m_inactiveSelectionBackgroundColor;
+}
+
+Color RenderThemeChromiumLinux::platformActiveSelectionForegroundColor() const
+{
+ return m_activeSelectionForegroundColor;
+}
+
+Color RenderThemeChromiumLinux::platformInactiveSelectionForegroundColor() const
+{
+ return m_inactiveSelectionForegroundColor;
+}
+
void RenderThemeChromiumLinux::adjustSliderThumbSize(RenderObject* o) const
{
// These sizes match the sizes in Chromium Win.
@@ -126,6 +154,18 @@ double RenderThemeChromiumLinux::caretBlinkIntervalInternal() const
return m_caretBlinkInterval;
}
+void RenderThemeChromiumLinux::setSelectionColors(
+ unsigned activeBackgroundColor,
+ unsigned activeForegroundColor,
+ unsigned inactiveBackgroundColor,
+ unsigned inactiveForegroundColor)
+{
+ m_activeSelectionBackgroundColor = activeBackgroundColor;
+ m_activeSelectionForegroundColor = activeForegroundColor;
+ m_inactiveSelectionBackgroundColor = inactiveBackgroundColor;
+ m_inactiveSelectionForegroundColor = inactiveForegroundColor;
+}
+
void RenderThemeChromiumLinux::setScrollbarColors(
SkColor inactiveColor, SkColor activeColor, SkColor trackColor)
{
diff --git a/WebCore/rendering/RenderThemeChromiumLinux.h b/WebCore/rendering/RenderThemeChromiumLinux.h
index 8736b0d..90b043d 100644
--- a/WebCore/rendering/RenderThemeChromiumLinux.h
+++ b/WebCore/rendering/RenderThemeChromiumLinux.h
@@ -49,11 +49,21 @@ namespace WebCore {
virtual Color inactiveListBoxSelectionBackgroundColor() const;
virtual Color inactiveListBoxSelectionForegroundColor() const;
+ virtual Color platformActiveSelectionBackgroundColor() const;
+ virtual Color platformInactiveSelectionBackgroundColor() const;
+ virtual Color platformActiveSelectionForegroundColor() const;
+ virtual Color platformInactiveSelectionForegroundColor() const;
+
virtual void adjustSliderThumbSize(RenderObject*) const;
void setCaretBlinkInterval(double interval);
virtual double caretBlinkIntervalInternal() const;
+ static void setSelectionColors(unsigned activeBackgroundColor,
+ unsigned activeForegroundColor,
+ unsigned inactiveBackgroundColor,
+ unsigned inactiveForegroundColor);
+
static void setScrollbarColors(unsigned inactive_color,
unsigned active_color,
unsigned track_color);
@@ -70,6 +80,11 @@ namespace WebCore {
double m_caretBlinkInterval;
+ static unsigned m_activeSelectionBackgroundColor;
+ static unsigned m_activeSelectionForegroundColor;
+ static unsigned m_inactiveSelectionBackgroundColor;
+ static unsigned m_inactiveSelectionForegroundColor;
+
static unsigned m_thumbInactiveColor;
static unsigned m_thumbActiveColor;
static unsigned m_trackColor;
diff --git a/WebCore/rendering/RenderThemeChromiumSkia.cpp b/WebCore/rendering/RenderThemeChromiumSkia.cpp
index 016a264..7d3bcec 100644
--- a/WebCore/rendering/RenderThemeChromiumSkia.cpp
+++ b/WebCore/rendering/RenderThemeChromiumSkia.cpp
@@ -217,6 +217,22 @@ int RenderThemeChromiumSkia::minimumMenuListSize(RenderStyle* style) const
return 0;
}
+// These are the default dimensions of radio buttons and checkboxes.
+static const int widgetStandardWidth = 13;
+static const int widgetStandardHeight = 13;
+
+// Return a rectangle that has the same center point as |original|, but with a
+// size capped at |width| by |height|.
+IntRect center(const IntRect& original, int width, int height)
+{
+ width = std::min(original.width(), width);
+ height = std::min(original.height(), height);
+ int x = original.x() + (original.width() - width) / 2;
+ int y = original.y() + (original.height() - height) / 2;
+
+ return IntRect(x, y, width, height);
+}
+
bool RenderThemeChromiumSkia::paintCheckbox(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
{
static Image* const checkedImage = Image::loadPlatformResource("linuxCheckboxOn").releaseRef();
@@ -231,7 +247,7 @@ bool RenderThemeChromiumSkia::paintCheckbox(RenderObject* o, const RenderObject:
else
image = this->isChecked(o) ? disabledCheckedImage : disabledUncheckedImage;
- i.context->drawImage(image, o->style()->colorSpace(), rect);
+ i.context->drawImage(image, o->style()->colorSpace(), center(rect, widgetStandardHeight, widgetStandardWidth));
return false;
}
@@ -246,7 +262,7 @@ void RenderThemeChromiumSkia::setCheckboxSize(RenderStyle* style) const
// querying the theme gives you a larger size that accounts for the higher
// DPI. Until our entire engine honors a DPI setting other than 96, we
// can't rely on the theme's metrics.
- const IntSize size(13, 13);
+ const IntSize size(widgetStandardHeight, widgetStandardWidth);
setSizeIfAuto(style, size);
}
@@ -263,7 +279,7 @@ bool RenderThemeChromiumSkia::paintRadio(RenderObject* o, const RenderObject::Pa
else
image = this->isChecked(o) ? disabledCheckedImage : disabledUncheckedImage;
- i.context->drawImage(image, o->style()->colorSpace(), rect);
+ i.context->drawImage(image, o->style()->colorSpace(), center(rect, widgetStandardHeight, widgetStandardWidth));
return false;
}
diff --git a/WebCore/rendering/RenderThemeMac.mm b/WebCore/rendering/RenderThemeMac.mm
index 6304947..ddb538b 100644
--- a/WebCore/rendering/RenderThemeMac.mm
+++ b/WebCore/rendering/RenderThemeMac.mm
@@ -1434,13 +1434,10 @@ static int mediaControllerTheme()
controllerTheme = MediaControllerThemeClassic;
- if (!wkMediaControllerThemeAvailable(MediaControllerThemeQuickTime))
- return controllerTheme;
-
Boolean validKey;
Boolean useQTMediaUIPref = CFPreferencesGetAppBooleanValue(CFSTR("UseQuickTimeMediaUI"), CFSTR("com.apple.WebCore"), &validKey);
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+#if !defined(BUILDING_ON_TIGER)
if (validKey && !useQTMediaUIPref)
return controllerTheme;
#else
diff --git a/WebCore/rendering/RenderThemeWince.cpp b/WebCore/rendering/RenderThemeWince.cpp
index fb89678..c4aaaad 100644
--- a/WebCore/rendering/RenderThemeWince.cpp
+++ b/WebCore/rendering/RenderThemeWince.cpp
@@ -28,6 +28,7 @@
#include "CSSValueKeywords.h"
#include "Document.h"
#include "GraphicsContext.h"
+#include "NotImplemented.h"
#if ENABLE(VIDEO)
#include "HTMLMediaElement.h"
#endif
@@ -377,12 +378,12 @@ bool RenderThemeWince::paintSearchFieldCancelButton(RenderObject* o, const Rende
IntRect cancelBounds(IntPoint(x, y), cancelSize);
paintInfo.context->save();
paintInfo.context->addRoundedRectClip(cancelBounds, cancelRadius, cancelRadius, cancelRadius, cancelRadius);
- paintInfo.context->fillRect(cancelBounds, buttonColor);
+ paintInfo.context->fillRect(cancelBounds, buttonColor, DeviceColorSpace);
// Draw the 'x'
IntSize xSize(3, 3);
IntRect xBounds(cancelBounds.location() + IntSize(3, 3), xSize);
- paintInfo.context->setStrokeColor(Color::white);
+ paintInfo.context->setStrokeColor(Color::white, DeviceColorSpace);
paintInfo.context->drawLine(xBounds.location(), xBounds.location() + xBounds.size());
paintInfo.context->drawLine(IntPoint(xBounds.right(), xBounds.y()), IntPoint(xBounds.x(), xBounds.bottom()));
@@ -489,11 +490,11 @@ bool RenderThemeWince::paintSliderTrack(RenderObject* o, const RenderObject::Pai
bool rc = RenderTheme::paintSliderTrack(o, i, r);
IntPoint left = IntPoint(r.x() + 2, (r.y() + r.bottom()) / 2);
i.context->save();
- i.context->setStrokeColor(Color::gray);
- i.context->setFillColor(Color::gray);
+ i.context->setStrokeColor(Color::gray, DeviceColorSpace);
+ i.context->setFillColor(Color::gray, DeviceColorSpace);
i.context->fillRect(r);
#if ENABLE(VIDEO)
- HTMLMediaElement *mediaElement = mediaElementParent(o->node());
+ HTMLMediaElement* mediaElement = mediaElementParent(o->node());
if (mediaElement) {
i.context->setStrokeColor(Color(0, 0xff, 0));
IntPoint right = IntPoint(left.x() + mediaElement->percentLoaded() * (r.right() - r.x() - 4), (r.y() + r.bottom()) / 2);
@@ -501,7 +502,7 @@ bool RenderThemeWince::paintSliderTrack(RenderObject* o, const RenderObject::Pai
left = right;
}
#endif
- i.context->setStrokeColor(Color::black);
+ i.context->setStrokeColor(Color::black, DeviceColorSpace);
i.context->drawLine(left, IntPoint(r.right() - 2, left.y()));
i.context->restore();
return rc;
@@ -511,10 +512,10 @@ bool RenderThemeWince::paintSliderThumb(RenderObject* o, const RenderObject::Pai
{
bool rc = RenderTheme::paintSliderThumb(o, i, r);
i.context->save();
- i.context->setStrokeColor(Color::black);
- i.context->setFillColor(Color::black);
+ i.context->setStrokeColor(Color::black, DeviceColorSpace);
+ i.context->setFillColor(Color::black, DeviceColorSpace);
#if ENABLE(VIDEO)
- HTMLMediaElement *mediaElement = mediaElementParent(o->node());
+ HTMLMediaElement* mediaElement = mediaElementParent(o->node());
if (mediaElement) {
float pt = (mediaElement->currentTime() - mediaElement->startTime()) / mediaElement->duration();
FloatRect intRect = r;
@@ -574,7 +575,7 @@ bool RenderThemeWince::paintMediaFullscreenButton(RenderObject* o, const RenderO
bool RenderThemeWince::paintMediaMuteButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
{
bool rc = paintButton(o, paintInfo, r);
- HTMLMediaElement *mediaElement = mediaElementParent(o->node());
+ HTMLMediaElement* mediaElement = mediaElementParent(o->node());
bool muted = !mediaElement || mediaElement->muted();
FloatRect imRect = r;
imRect.inflate(-2);
@@ -604,7 +605,7 @@ bool RenderThemeWince::paintMediaPlayButton(RenderObject* o, const RenderObject:
paintInfo.context->save();
paintInfo.context->setStrokeColor(Color::black);
paintInfo.context->setFillColor(Color::black);
- HTMLMediaElement *mediaElement = mediaElementParent(o->node());
+ HTMLMediaElement* mediaElement = mediaElementParent(o->node());
bool paused = !mediaElement || mediaElement->paused();
if (paused) {
float width = imRect.width();
diff --git a/WebCore/rendering/RenderTreeAsText.cpp b/WebCore/rendering/RenderTreeAsText.cpp
index a6f5144..ca4d9d1 100644
--- a/WebCore/rendering/RenderTreeAsText.cpp
+++ b/WebCore/rendering/RenderTreeAsText.cpp
@@ -45,6 +45,7 @@
#include "RenderWidget.h"
#include "SelectionController.h"
#include "TextStream.h"
+#include <wtf/UnusedParam.h>
#include <wtf/Vector.h>
#if ENABLE(SVG)
@@ -57,6 +58,10 @@
#include "SVGRenderTreeAsText.h"
#endif
+#if USE(ACCELERATED_COMPOSITING)
+#include "RenderLayerBacking.h"
+#endif
+
#if PLATFORM(QT)
#include <QWidget>
#endif
@@ -65,7 +70,7 @@ namespace WebCore {
using namespace HTMLNames;
-static void writeLayers(TextStream&, const RenderLayer* rootLayer, RenderLayer*, const IntRect& paintDirtyRect, int indent = 0);
+static void writeLayers(TextStream&, const RenderLayer* rootLayer, RenderLayer*, const IntRect& paintDirtyRect, int indent = 0, RenderAsTextBehavior behavior = RenderAsTextBehaviorNormal);
#if !ENABLE(SVG)
static TextStream &operator<<(TextStream& ts, const IntRect& r)
@@ -444,9 +449,15 @@ void write(TextStream& ts, const RenderObject& o, int indent)
}
}
+enum LayerPaintPhase {
+ LayerPaintPhaseAll = 0,
+ LayerPaintPhaseBackground = -1,
+ LayerPaintPhaseForeground = 1
+};
+
static void write(TextStream& ts, RenderLayer& l,
const IntRect& layerBounds, const IntRect& backgroundClipRect, const IntRect& clipRect, const IntRect& outlineClipRect,
- int layerType = 0, int indent = 0)
+ LayerPaintPhase paintPhase = LayerPaintPhaseAll, int indent = 0, RenderAsTextBehavior behavior = RenderAsTextBehaviorNormal)
{
writeIndent(ts, indent);
@@ -472,19 +483,28 @@ static void write(TextStream& ts, RenderLayer& l,
ts << " scrollHeight " << l.scrollHeight();
}
- if (layerType == -1)
+ if (paintPhase == LayerPaintPhaseBackground)
ts << " layerType: background only";
- else if (layerType == 1)
+ else if (paintPhase == LayerPaintPhaseForeground)
ts << " layerType: foreground only";
-
+
+#if USE(ACCELERATED_COMPOSITING)
+ if (behavior & RenderAsTextShowCompositedLayers) {
+ if (l.isComposited())
+ ts << " (composited, bounds " << l.backing()->compositedBounds() << ")";
+ }
+#else
+ UNUSED_PARAM(behavior);
+#endif
+
ts << "\n";
- if (layerType != -1)
+ if (paintPhase != LayerPaintPhaseBackground)
write(ts, *l.renderer(), indent + 1);
}
static void writeLayers(TextStream& ts, const RenderLayer* rootLayer, RenderLayer* l,
- const IntRect& paintDirtyRect, int indent)
+ const IntRect& paintDirtyRect, int indent, RenderAsTextBehavior behavior)
{
// Calculate the clip rects we should use.
IntRect layerBounds, damageRect, clipRectToApply, outlineRect;
@@ -494,29 +514,46 @@ static void writeLayers(TextStream& ts, const RenderLayer* rootLayer, RenderLaye
l->updateZOrderLists();
l->updateNormalFlowList();
- bool shouldPaint = l->intersectsDamageRect(layerBounds, damageRect, rootLayer);
+ bool shouldPaint = (behavior & RenderAsTextShowAllLayers) ? true : l->intersectsDamageRect(layerBounds, damageRect, rootLayer);
Vector<RenderLayer*>* negList = l->negZOrderList();
- if (shouldPaint && negList && negList->size() > 0)
- write(ts, *l, layerBounds, damageRect, clipRectToApply, outlineRect, -1, indent);
+ bool paintsBackgroundSeparately = negList && negList->size() > 0;
+ if (shouldPaint && paintsBackgroundSeparately)
+ write(ts, *l, layerBounds, damageRect, clipRectToApply, outlineRect, LayerPaintPhaseBackground, indent, behavior);
if (negList) {
+ int currIndent = indent;
+ if (behavior & RenderAsTextShowLayerNesting) {
+ writeIndent(ts, indent);
+ ts << " negative z-order list(" << negList->size() << ")\n";
+ ++currIndent;
+ }
for (unsigned i = 0; i != negList->size(); ++i)
- writeLayers(ts, rootLayer, negList->at(i), paintDirtyRect, indent);
+ writeLayers(ts, rootLayer, negList->at(i), paintDirtyRect, currIndent, behavior);
}
if (shouldPaint)
- write(ts, *l, layerBounds, damageRect, clipRectToApply, outlineRect, negList && negList->size() > 0, indent);
-
- Vector<RenderLayer*>* normalFlowList = l->normalFlowList();
- if (normalFlowList) {
+ write(ts, *l, layerBounds, damageRect, clipRectToApply, outlineRect, paintsBackgroundSeparately ? LayerPaintPhaseForeground : LayerPaintPhaseAll, indent, behavior);
+
+ if (Vector<RenderLayer*>* normalFlowList = l->normalFlowList()) {
+ int currIndent = indent;
+ if (behavior & RenderAsTextShowLayerNesting) {
+ writeIndent(ts, indent);
+ ts << " normal flow list(" << normalFlowList->size() << ")\n";
+ ++currIndent;
+ }
for (unsigned i = 0; i != normalFlowList->size(); ++i)
- writeLayers(ts, rootLayer, normalFlowList->at(i), paintDirtyRect, indent);
+ writeLayers(ts, rootLayer, normalFlowList->at(i), paintDirtyRect, currIndent, behavior);
}
- Vector<RenderLayer*>* posList = l->posZOrderList();
- if (posList) {
+ if (Vector<RenderLayer*>* posList = l->posZOrderList()) {
+ int currIndent = indent;
+ if (behavior & RenderAsTextShowLayerNesting) {
+ writeIndent(ts, indent);
+ ts << " positive z-order list(" << posList->size() << ")\n";
+ ++currIndent;
+ }
for (unsigned i = 0; i != posList->size(); ++i)
- writeLayers(ts, rootLayer, posList->at(i), paintDirtyRect, indent);
+ writeLayers(ts, rootLayer, posList->at(i), paintDirtyRect, currIndent, behavior);
}
}
@@ -562,7 +599,7 @@ static void writeSelection(TextStream& ts, const RenderObject* o)
<< "selection end: position " << selection.end().deprecatedEditingOffset() << " of " << nodePosition(selection.end().node()) << "\n";
}
-String externalRepresentation(Frame* frame)
+String externalRepresentation(Frame* frame, RenderAsTextBehavior behavior)
{
frame->document()->updateLayout();
@@ -576,7 +613,7 @@ String externalRepresentation(Frame* frame)
#endif
if (o->hasLayer()) {
RenderLayer* l = toRenderBox(o)->layer();
- writeLayers(ts, l, l, IntRect(l->x(), l->y(), l->width(), l->height()));
+ writeLayers(ts, l, l, IntRect(l->x(), l->y(), l->width(), l->height()), 0, behavior);
writeSelection(ts, o);
}
return ts.release();
diff --git a/WebCore/rendering/RenderTreeAsText.h b/WebCore/rendering/RenderTreeAsText.h
index b00f7c9..13525e7 100644
--- a/WebCore/rendering/RenderTreeAsText.h
+++ b/WebCore/rendering/RenderTreeAsText.h
@@ -34,7 +34,15 @@ class RenderObject;
class String;
class TextStream;
-String externalRepresentation(Frame*);
+enum RenderAsTextBehaviorFlags {
+ RenderAsTextBehaviorNormal = 0,
+ RenderAsTextShowAllLayers = 1 << 0, // Dump all layers, not just those that would paint.
+ RenderAsTextShowLayerNesting = 1 << 1, // Annotate the layer lists.
+ RenderAsTextShowCompositedLayers = 1 << 2 // Show which layers are composited.
+};
+typedef unsigned RenderAsTextBehavior;
+
+String externalRepresentation(Frame*, RenderAsTextBehavior = RenderAsTextBehaviorNormal);
void write(TextStream&, const RenderObject&, int indent = 0);
// Helper function shared with SVGRenderTreeAsText
diff --git a/WebCore/rendering/RenderVideo.cpp b/WebCore/rendering/RenderVideo.cpp
index 246d0c0..d2a9620 100644
--- a/WebCore/rendering/RenderVideo.cpp
+++ b/WebCore/rendering/RenderVideo.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 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
@@ -34,6 +34,7 @@
#include "HTMLNames.h"
#include "HTMLVideoElement.h"
#include "MediaPlayer.h"
+#include "RenderView.h"
#if USE(ACCELERATED_COMPOSITING)
#include "RenderLayer.h"
@@ -49,18 +50,25 @@ using namespace HTMLNames;
static const int cDefaultWidth = 300;
static const int cDefaultHeight = 150;
-RenderVideo::RenderVideo(HTMLMediaElement* video)
+RenderVideo::RenderVideo(HTMLVideoElement* video)
: RenderMedia(video)
{
if (video->player())
setIntrinsicSize(video->player()->naturalSize());
else {
- // Video in standalone media documents should not use the default 300x150
- // size since they also have audio thrown at them. By setting the intrinsic
- // size to 300x1 the video will resize itself in these cases, and audio will
- // have the correct height (it needs to be > 0 for controls to render properly).
- if (video->ownerDocument() && video->ownerDocument()->isMediaDocument())
+ // When the natural size of the video is unavailable, we use the provided
+ // width and height attributes of the video element as the intrinsic size until
+ // better values become available. If these attributes are not set, we fall back
+ // to a default video size (300x150).
+ if (video->hasAttribute(widthAttr) && video->hasAttribute(heightAttr))
+ setIntrinsicSize(IntSize(video->width(), video->height()));
+ else if (video->ownerDocument() && video->ownerDocument()->isMediaDocument()) {
+ // Video in standalone media documents should not use the default 300x150
+ // size since they also have audio thrown at them. By setting the intrinsic
+ // size to 300x1 the video will resize itself in these cases, and audio will
+ // have the correct height (it needs to be > 0 for controls to render properly).
setIntrinsicSize(IntSize(cDefaultWidth, 1));
+ }
else
setIntrinsicSize(IntSize(cDefaultWidth, cDefaultHeight));
}
@@ -73,7 +81,15 @@ RenderVideo::~RenderVideo()
p->setFrameView(0);
}
}
-
+
+void RenderVideo::intrinsicSizeChanged()
+{
+ if (videoElement()->shouldDisplayPosterImage())
+ RenderVideo::intrinsicSizeChanged();
+ videoSizeChanged();
+}
+
+
void RenderVideo::videoSizeChanged()
{
if (!player())
@@ -86,41 +102,72 @@ void RenderVideo::videoSizeChanged()
}
}
-IntRect RenderVideo::videoBox() const
+void RenderVideo::imageChanged(WrappedImagePtr newImage, const IntRect* rect)
{
+ RenderImage::imageChanged(newImage, rect);
+
+ // Cache the image intrinsic size so we can continue to use it to draw the image correctly
+ // even after we know the video intrisic size but aren't able to draw video frames yet
+ // (we don't want to scale the poster to the video size).
+ if (videoElement()->shouldDisplayPosterImage())
+ m_cachedImageSize = intrinsicSize();
+}
+
+IntRect RenderVideo::videoBox() const
+{
+ if (m_cachedImageSize.isEmpty() && videoElement()->shouldDisplayPosterImage())
+ return IntRect();
+
+ IntSize elementSize;
+ if (videoElement()->shouldDisplayPosterImage())
+ elementSize = m_cachedImageSize;
+ else
+ elementSize = intrinsicSize();
+
IntRect contentRect = contentBoxRect();
-
- if (intrinsicSize().isEmpty() || contentRect.isEmpty())
+ if (elementSize.isEmpty() || contentRect.isEmpty())
return IntRect();
- IntRect resultRect = contentRect;
- int ratio = contentRect.width() * intrinsicSize().height() - contentRect.height() * intrinsicSize().width();
+ IntRect renderBox = contentRect;
+ int ratio = renderBox.width() * elementSize.height() - renderBox.height() * elementSize.width();
if (ratio > 0) {
- int newWidth = contentRect.height() * intrinsicSize().width() / intrinsicSize().height();
+ int newWidth = renderBox.height() * elementSize.width() / elementSize.height();
// Just fill the whole area if the difference is one pixel or less (in both sides)
- if (resultRect.width() - newWidth > 2)
- resultRect.setWidth(newWidth);
- resultRect.move((contentRect.width() - resultRect.width()) / 2, 0);
+ if (renderBox.width() - newWidth > 2)
+ renderBox.setWidth(newWidth);
+ renderBox.move((contentRect.width() - renderBox.width()) / 2, 0);
} else if (ratio < 0) {
- int newHeight = contentRect.width() * intrinsicSize().height() / intrinsicSize().width();
- if (resultRect.height() - newHeight > 2)
- resultRect.setHeight(newHeight);
- resultRect.move(0, (contentRect.height() - resultRect.height()) / 2);
+ int newHeight = renderBox.width() * elementSize.height() / elementSize.width();
+ if (renderBox.height() - newHeight > 2)
+ renderBox.setHeight(newHeight);
+ renderBox.move(0, (contentRect.height() - renderBox.height()) / 2);
}
- return resultRect;
+
+ return renderBox;
}
void RenderVideo::paintReplaced(PaintInfo& paintInfo, int tx, int ty)
{
MediaPlayer* mediaPlayer = player();
- if (!mediaPlayer)
+ bool displayingPoster = videoElement()->shouldDisplayPosterImage();
+
+ if (displayingPoster && document()->printing() && !view()->printImages())
return;
- updatePlayer();
+
+ if (!displayingPoster) {
+ if (!mediaPlayer)
+ return;
+ updatePlayer();
+ }
+
IntRect rect = videoBox();
if (rect.isEmpty())
return;
rect.move(tx, ty);
- mediaPlayer->paint(paintInfo.context, rect);
+ if (displayingPoster)
+ paintIntoRect(paintInfo.context, rect);
+ else
+ mediaPlayer->paint(paintInfo.context, rect);
}
void RenderVideo::layout()
@@ -129,6 +176,12 @@ void RenderVideo::layout()
updatePlayer();
}
+HTMLVideoElement* RenderVideo::videoElement() const
+{
+ ASSERT(node()->hasTagName(videoTag));
+ return static_cast<HTMLVideoElement*>(node());
+}
+
void RenderVideo::updateFromElement()
{
RenderMedia::updateFromElement();
@@ -140,7 +193,7 @@ void RenderVideo::updatePlayer()
MediaPlayer* mediaPlayer = player();
if (!mediaPlayer)
return;
- if (!mediaElement()->inActiveDocument()) {
+ if (!videoElement()->inActiveDocument()) {
mediaPlayer->setVisible(false);
return;
}
@@ -155,40 +208,6 @@ void RenderVideo::updatePlayer()
mediaPlayer->setVisible(true);
}
-bool RenderVideo::isWidthSpecified() const
-{
- switch (style()->width().type()) {
- case Fixed:
- case Percent:
- return true;
- case Auto:
- case Relative: // FIXME: Shouldn't this case return true? It doesn't for images.
- case Static:
- case Intrinsic:
- case MinIntrinsic:
- return false;
- }
- ASSERT(false);
- return false;
-}
-
-bool RenderVideo::isHeightSpecified() const
-{
- switch (style()->height().type()) {
- case Fixed:
- case Percent:
- return true;
- case Auto:
- case Relative: // FIXME: Shouldn't this case return true? It doesn't for images.
- case Static:
- case Intrinsic:
- case MinIntrinsic:
- return false;
- }
- ASSERT(false);
- return false;
-}
-
int RenderVideo::calcReplacedWidth(bool includeMaxWidth) const
{
int width;
@@ -235,24 +254,9 @@ int RenderVideo::calcAspectRatioHeight() const
return RenderBox::calcReplacedWidth() * intrinsicHeight / intrinsicWidth;
}
-void RenderVideo::calcPrefWidths()
+int RenderVideo::minimumReplacedHeight() const
{
- ASSERT(prefWidthsDirty());
-
- int paddingAndBorders = paddingLeft() + paddingRight() + borderLeft() + borderRight();
- m_maxPrefWidth = calcReplacedWidth(false) + paddingAndBorders;
-
- if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength)
- m_maxPrefWidth = min(m_maxPrefWidth, style()->maxWidth().value() + (style()->boxSizing() == CONTENT_BOX ? paddingAndBorders : 0));
-
- if (style()->width().isPercent() || style()->height().isPercent() ||
- style()->maxWidth().isPercent() || style()->maxHeight().isPercent() ||
- style()->minWidth().isPercent() || style()->minHeight().isPercent())
- m_minPrefWidth = 0;
- else
- m_minPrefWidth = m_maxPrefWidth;
-
- setPrefWidthsDirty(false);
+ return 0;
}
#if USE(ACCELERATED_COMPOSITING)
diff --git a/WebCore/rendering/RenderVideo.h b/WebCore/rendering/RenderVideo.h
index 79e5b4e..3ca5328 100644
--- a/WebCore/rendering/RenderVideo.h
+++ b/WebCore/rendering/RenderVideo.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -33,13 +33,14 @@
namespace WebCore {
class HTMLMediaElement;
+class HTMLVideoElement;
#if USE(ACCELERATED_COMPOSITING)
class GraphicsLayer;
#endif
class RenderVideo : public RenderMedia {
public:
- RenderVideo(HTMLMediaElement*);
+ RenderVideo(HTMLVideoElement*);
virtual ~RenderVideo();
void videoSizeChanged();
@@ -53,8 +54,10 @@ public:
private:
virtual void updateFromElement();
+ inline HTMLVideoElement* videoElement() const;
- virtual void intrinsicSizeChanged() { videoSizeChanged(); }
+ virtual void intrinsicSizeChanged();
+ virtual void imageChanged(WrappedImagePtr, const IntRect*);
virtual const char* renderName() const { return "RenderVideo"; }
@@ -67,16 +70,14 @@ private:
virtual int calcReplacedWidth(bool includeMaxWidth = true) const;
virtual int calcReplacedHeight() const;
-
- virtual void calcPrefWidths();
+ virtual int minimumReplacedHeight() const;
int calcAspectRatioWidth() const;
int calcAspectRatioHeight() const;
- bool isWidthSpecified() const;
- bool isHeightSpecified() const;
-
void updatePlayer();
+
+ IntSize m_cachedImageSize;
};
inline RenderVideo* toRenderVideo(RenderObject* object)
diff --git a/WebCore/rendering/RenderView.cpp b/WebCore/rendering/RenderView.cpp
index 753afe4..502563e 100644
--- a/WebCore/rendering/RenderView.cpp
+++ b/WebCore/rendering/RenderView.cpp
@@ -664,6 +664,17 @@ void RenderView::pushLayoutState(RenderObject* root)
m_layoutState = new (renderArena()) LayoutState(root);
}
+bool RenderView::shouldDisableLayoutStateForSubtree(RenderObject* renderer) const
+{
+ RenderObject* o = renderer;
+ while (o) {
+ if (o->hasColumns() || o->hasTransform() || o->hasReflection())
+ return true;
+ o = o->container();
+ }
+ return false;
+}
+
void RenderView::updateHitTestResult(HitTestResult& result, const IntPoint& point)
{
if (result.innerNode())
diff --git a/WebCore/rendering/RenderView.h b/WebCore/rendering/RenderView.h
index 37b3f01..c287579 100644
--- a/WebCore/rendering/RenderView.h
+++ b/WebCore/rendering/RenderView.h
@@ -140,6 +140,8 @@ public:
state->destroy(renderArena());
}
+ bool shouldDisableLayoutStateForSubtree(RenderObject*) const;
+
// Returns true if layoutState should be used for its cached offset and clip.
bool layoutStateEnabled() const { return m_layoutStateDisableCount == 0 && m_layoutState; }
LayoutState* layoutState() const { return m_layoutState; }
diff --git a/WebCore/rendering/RenderWidget.cpp b/WebCore/rendering/RenderWidget.cpp
index 8b7e899..f6f6da8 100644
--- a/WebCore/rendering/RenderWidget.cpp
+++ b/WebCore/rendering/RenderWidget.cpp
@@ -252,18 +252,27 @@ void RenderWidget::paint(PaintInfo& paintInfo, int tx, int ty)
}
if (m_widget) {
- // Move the widget if necessary. We normally move and resize widgets during layout, but sometimes
- // widgets can move without layout occurring (most notably when you scroll a document that
- // contains fixed positioned elements).
- m_widget->move(tx + borderLeft() + paddingLeft(), ty + borderTop() + paddingTop());
-
// Tell the widget to paint now. This is the only time the widget is allowed
// to paint itself. That way it will composite properly with z-indexed layers.
if (m_substituteImage)
paintInfo.context->drawImage(m_substituteImage.get(), style()->colorSpace(), m_widget->frameRect());
- else
- m_widget->paint(paintInfo.context, paintInfo.rect);
+ else {
+ IntPoint widgetLocation = m_widget->frameRect().location();
+ IntPoint paintLocation(tx + borderLeft() + paddingLeft(), ty + borderTop() + paddingTop());
+ IntRect paintRect = paintInfo.rect;
+
+ IntSize paintOffset = paintLocation - widgetLocation;
+ // When painting widgets into compositing layers, tx and ty are relative to the enclosing compositing layer,
+ // not the root. In this case, shift the CTM and adjust the paintRect to be root-relative to fix plug-in drawing.
+ if (!paintOffset.isZero()) {
+ paintInfo.context->translate(paintOffset);
+ paintRect.move(-paintOffset);
+ }
+ m_widget->paint(paintInfo.context, paintRect);
+ if (!paintOffset.isZero())
+ paintInfo.context->translate(-paintOffset);
+ }
if (m_widget->isFrameView() && paintInfo.overlapTestRequests && !static_cast<FrameView*>(m_widget.get())->useSlowRepaintsIfNotOverlapped()) {
ASSERT(!paintInfo.overlapTestRequests->contains(this));
paintInfo.overlapTestRequests->set(this, m_widget->frameRect());
diff --git a/WebCore/rendering/RootInlineBox.cpp b/WebCore/rendering/RootInlineBox.cpp
index c8e072e..23316f7 100644
--- a/WebCore/rendering/RootInlineBox.cpp
+++ b/WebCore/rendering/RootInlineBox.cpp
@@ -21,6 +21,7 @@
#include "RootInlineBox.h"
#include "BidiResolver.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
#include "EllipsisBox.h"
diff --git a/WebCore/rendering/SVGCharacterLayoutInfo.h b/WebCore/rendering/SVGCharacterLayoutInfo.h
index b5b4f3e..fb29110 100644
--- a/WebCore/rendering/SVGCharacterLayoutInfo.h
+++ b/WebCore/rendering/SVGCharacterLayoutInfo.h
@@ -298,8 +298,10 @@ struct SVGTextChunkWalkerBase {
virtual void start(InlineBox*) = 0;
virtual void end(InlineBox*) = 0;
+ virtual bool setupBackground(InlineBox*) = 0;
virtual bool setupFill(InlineBox*) = 0;
virtual bool setupStroke(InlineBox*) = 0;
+ virtual bool setupForeground(InlineBox*) = 0;
};
template<typename CallbackClass>
@@ -315,21 +317,27 @@ public:
typedef void (CallbackClass::*SVGTextChunkStartCallback)(InlineBox* box);
typedef void (CallbackClass::*SVGTextChunkEndCallback)(InlineBox* box);
+ typedef bool (CallbackClass::*SVGTextChunkSetupBackgroundCallback)(InlineBox* box);
typedef bool (CallbackClass::*SVGTextChunkSetupFillCallback)(InlineBox* box);
typedef bool (CallbackClass::*SVGTextChunkSetupStrokeCallback)(InlineBox* box);
+ typedef bool (CallbackClass::*SVGTextChunkSetupForegroundCallback)(InlineBox* box);
SVGTextChunkWalker(CallbackClass* object,
SVGTextChunkWalkerCallback walker,
SVGTextChunkStartCallback start = 0,
SVGTextChunkEndCallback end = 0,
+ SVGTextChunkSetupBackgroundCallback background = 0,
SVGTextChunkSetupFillCallback fill = 0,
- SVGTextChunkSetupStrokeCallback stroke = 0)
+ SVGTextChunkSetupStrokeCallback stroke = 0,
+ SVGTextChunkSetupForegroundCallback foreground = 0)
: m_object(object)
, m_walkerCallback(walker)
, m_startCallback(start)
, m_endCallback(end)
+ , m_setupBackgroundCallback(background)
, m_setupFillCallback(fill)
, m_setupStrokeCallback(stroke)
+ , m_setupForegroundCallback(foreground)
{
ASSERT(object);
ASSERT(walker);
@@ -358,6 +366,15 @@ public:
ASSERT_NOT_REACHED();
}
+ virtual bool setupBackground(InlineBox* box)
+ {
+ if (m_setupBackgroundCallback)
+ return (*m_object.*m_setupBackgroundCallback)(box);
+
+ ASSERT_NOT_REACHED();
+ return false;
+ }
+
virtual bool setupFill(InlineBox* box)
{
if (m_setupFillCallback)
@@ -376,13 +393,24 @@ public:
return false;
}
+ virtual bool setupForeground(InlineBox* box)
+ {
+ if (m_setupForegroundCallback)
+ return (*m_object.*m_setupForegroundCallback)(box);
+
+ ASSERT_NOT_REACHED();
+ return false;
+ }
+
private:
CallbackClass* m_object;
SVGTextChunkWalkerCallback m_walkerCallback;
SVGTextChunkStartCallback m_startCallback;
SVGTextChunkEndCallback m_endCallback;
+ SVGTextChunkSetupBackgroundCallback m_setupBackgroundCallback;
SVGTextChunkSetupFillCallback m_setupFillCallback;
SVGTextChunkSetupStrokeCallback m_setupStrokeCallback;
+ SVGTextChunkSetupForegroundCallback m_setupForegroundCallback;
};
struct SVGTextChunkLayoutInfo {
diff --git a/WebCore/rendering/SVGInlineTextBox.cpp b/WebCore/rendering/SVGInlineTextBox.cpp
index cf8464e..2f56e68 100644
--- a/WebCore/rendering/SVGInlineTextBox.cpp
+++ b/WebCore/rendering/SVGInlineTextBox.cpp
@@ -324,7 +324,7 @@ IntRect SVGInlineTextBox::selectionRect(int, int, int startPos, int endPos)
return enclosingIntRect(walkerCallback.selectionRect());
}
-void SVGInlineTextBox::paintCharacters(RenderObject::PaintInfo& paintInfo, int tx, int ty, const SVGChar& svgChar, const UChar* chars, int length, SVGPaintServer* activePaintServer)
+void SVGInlineTextBox::paintCharacters(RenderObject::PaintInfo& paintInfo, int tx, int ty, const SVGChar& svgChar, const UChar* chars, int length, SVGTextPaintInfo& textPaintInfo)
{
if (renderer()->style()->visibility() != VISIBLE || paintInfo.phase == PaintPhaseOutline)
return;
@@ -356,7 +356,7 @@ void SVGInlineTextBox::paintCharacters(RenderObject::PaintInfo& paintInfo, int t
// 1. Paint backgrounds behind text if needed. Examples of such backgrounds include selection
// and marked text.
- if (paintInfo.phase != PaintPhaseSelection && !isPrinting) {
+ if (paintInfo.phase != PaintPhaseSelection && !isPrinting && textPaintInfo.subphase == SVGTextPaintSubphaseBackground) {
#if PLATFORM(MAC)
// Custom highlighters go behind everything else.
if (styleToUse->highlight() != nullAtom && !paintInfo.context->paintingDisabled())
@@ -376,29 +376,35 @@ void SVGInlineTextBox::paintCharacters(RenderObject::PaintInfo& paintInfo, int t
}
}
- // Set a text shadow if we have one.
- // FIXME: Support multiple shadow effects. Need more from the CG API before
- // we can do this.
- bool setShadow = false;
- if (styleToUse->textShadow()) {
- paintInfo.context->setShadow(IntSize(styleToUse->textShadow()->x, styleToUse->textShadow()->y),
- styleToUse->textShadow()->blur, styleToUse->textShadow()->color,
- styleToUse->colorSpace());
- setShadow = true;
- }
+ if (textPaintInfo.subphase == SVGTextPaintSubphaseGlyphFill || textPaintInfo.subphase == SVGTextPaintSubphaseGlyphStroke) {
+ // Set a text shadow if we have one.
+ // FIXME: Support multiple shadow effects. Need more from the CG API before
+ // we can do this.
+ bool setShadow = false;
+ if (styleToUse->textShadow()) {
+ paintInfo.context->setShadow(IntSize(styleToUse->textShadow()->x, styleToUse->textShadow()->y),
+ styleToUse->textShadow()->blur, styleToUse->textShadow()->color,
+ styleToUse->colorSpace());
+ setShadow = true;
+ }
- IntPoint origin((int) svgChar.x, (int) svgChar.y);
- TextRun run = svgTextRunForInlineTextBox(chars, length, styleToUse, this, svgChar.x);
+ IntPoint origin((int) svgChar.x, (int) svgChar.y);
+ TextRun run = svgTextRunForInlineTextBox(chars, length, styleToUse, this, svgChar.x);
#if ENABLE(SVG_FONTS)
- // SVG Fonts need access to the paint server used to draw the current text chunk.
- // They need to be able to call renderPath() on a SVGPaintServer object.
- run.setActivePaintServer(activePaintServer);
+ // SVG Fonts need access to the paint server used to draw the current text chunk.
+ // They need to be able to call renderPath() on a SVGPaintServer object.
+ ASSERT(textPaintInfo.activePaintServer);
+ run.setActivePaintServer(textPaintInfo.activePaintServer);
#endif
- paintInfo.context->drawText(font, run, origin);
+ paintInfo.context->drawText(font, run, origin);
- if (paintInfo.phase != PaintPhaseSelection) {
+ if (setShadow)
+ paintInfo.context->clearShadow();
+ }
+
+ if (paintInfo.phase != PaintPhaseSelection && textPaintInfo.subphase == SVGTextPaintSubphaseForeground) {
paintDocumentMarkers(paintInfo.context, tx, ty, styleToUse, font, false);
if (useCustomUnderlines) {
@@ -428,9 +434,6 @@ void SVGInlineTextBox::paintCharacters(RenderObject::PaintInfo& paintInfo, int t
}
- if (setShadow)
- paintInfo.context->clearShadow();
-
if (!ctm.isIdentity())
paintInfo.context->concatCTM(ctm.inverse());
}
diff --git a/WebCore/rendering/SVGInlineTextBox.h b/WebCore/rendering/SVGInlineTextBox.h
index ad39aab..eea6744 100644
--- a/WebCore/rendering/SVGInlineTextBox.h
+++ b/WebCore/rendering/SVGInlineTextBox.h
@@ -32,6 +32,20 @@ namespace WebCore {
struct SVGChar;
struct SVGTextDecorationInfo;
+ enum SVGTextPaintSubphase {
+ SVGTextPaintSubphaseBackground,
+ SVGTextPaintSubphaseGlyphFill,
+ SVGTextPaintSubphaseGlyphStroke,
+ SVGTextPaintSubphaseForeground
+ };
+
+ struct SVGTextPaintInfo {
+ SVGTextPaintInfo() : activePaintServer(0), subphase(SVGTextPaintSubphaseBackground) {}
+
+ SVGPaintServer* activePaintServer;
+ SVGTextPaintSubphase subphase;
+ };
+
class SVGInlineTextBox : public InlineTextBox {
public:
SVGInlineTextBox(RenderObject* obj);
@@ -49,7 +63,7 @@ namespace WebCore {
virtual IntRect selectionRect(int absx, int absy, int startPos, int endPos);
// SVGs custom paint text method
- void paintCharacters(RenderObject::PaintInfo&, int tx, int ty, const SVGChar&, const UChar* chars, int length, SVGPaintServer*);
+ void paintCharacters(RenderObject::PaintInfo&, int tx, int ty, const SVGChar&, const UChar* chars, int length, SVGTextPaintInfo&);
// SVGs custom paint selection method
void paintSelection(int boxStartOffset, const SVGChar&, const UChar*, int length, GraphicsContext*, RenderStyle*, const Font&);
diff --git a/WebCore/rendering/SVGMarkerData.h b/WebCore/rendering/SVGMarkerData.h
new file mode 100644
index 0000000..5ff2993
--- /dev/null
+++ b/WebCore/rendering/SVGMarkerData.h
@@ -0,0 +1,134 @@
+/*
+ Copyright (C) Research In Motion Limited 2010. All rights reserved.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint 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 SVGMarkerData_h
+#define SVGMarkerData_h
+
+#if ENABLE(SVG)
+#include "FloatConversion.h"
+#include "Path.h"
+#include <wtf/MathExtras.h>
+
+namespace WebCore {
+
+class SVGResourceMarker;
+
+class SVGMarkerData {
+public:
+ enum Type {
+ Unknown = 0,
+ Start,
+ Mid,
+ End
+ };
+
+ SVGMarkerData(const Type& type = Unknown, SVGResourceMarker* marker = 0)
+ : m_type(type)
+ , m_marker(marker)
+ {
+ }
+
+ FloatPoint origin() const { return m_origin; }
+ SVGResourceMarker* marker() const { return m_marker; }
+
+ float currentAngle() const
+ {
+ FloatSize inslopeChange = m_inslopePoints[1] - m_inslopePoints[0];
+ FloatSize outslopeChange = m_outslopePoints[1] - m_outslopePoints[0];
+
+ double inslope = rad2deg(atan2(inslopeChange.height(), inslopeChange.width()));
+ double outslope = rad2deg(atan2(outslopeChange.height(), outslopeChange.width()));
+
+ double angle = 0;
+ switch (m_type) {
+ case Start:
+ angle = outslope;
+ break;
+ case Mid:
+ angle = (inslope + outslope) / 2;
+ break;
+ case End:
+ angle = inslope;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ break;
+ }
+
+ return narrowPrecisionToFloat(angle);
+ }
+
+ void updateTypeAndMarker(const Type& type, SVGResourceMarker* marker)
+ {
+ m_type = type;
+ m_marker = marker;
+ }
+
+ void updateOutslope(const FloatPoint& point)
+ {
+ m_outslopePoints[0] = m_origin;
+ m_outslopePoints[1] = point;
+ }
+
+ void updateMarkerDataForPathElement(const PathElement* element)
+ {
+ FloatPoint* points = element->points;
+
+ switch (element->type) {
+ case PathElementAddQuadCurveToPoint:
+ // FIXME: https://bugs.webkit.org/show_bug.cgi?id=33115 (PathElementAddQuadCurveToPoint not handled for <marker>)
+ m_origin = points[1];
+ break;
+ case PathElementAddCurveToPoint:
+ m_inslopePoints[0] = points[1];
+ m_inslopePoints[1] = points[2];
+ m_origin = points[2];
+ break;
+ case PathElementMoveToPoint:
+ m_subpathStart = points[0];
+ case PathElementAddLineToPoint:
+ updateInslope(points[0]);
+ m_origin = points[0];
+ break;
+ case PathElementCloseSubpath:
+ updateInslope(points[0]);
+ m_origin = m_subpathStart;
+ m_subpathStart = FloatPoint();
+ }
+ }
+
+private:
+ void updateInslope(const FloatPoint& point)
+ {
+ m_inslopePoints[0] = m_origin;
+ m_inslopePoints[1] = point;
+ }
+
+ Type m_type;
+ SVGResourceMarker* m_marker;
+ FloatPoint m_origin;
+ FloatPoint m_subpathStart;
+ FloatPoint m_inslopePoints[2];
+ FloatPoint m_outslopePoints[2];
+};
+
+}
+
+#endif // ENABLE(SVG)
+#endif // SVGMarkerData_h
diff --git a/WebCore/rendering/SVGMarkerLayoutInfo.cpp b/WebCore/rendering/SVGMarkerLayoutInfo.cpp
new file mode 100644
index 0000000..3fe513f
--- /dev/null
+++ b/WebCore/rendering/SVGMarkerLayoutInfo.cpp
@@ -0,0 +1,124 @@
+/*
+ Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
+ 2004, 2005, 2008 Rob Buis <buis@kde.org>
+ 2005, 2007 Eric Seidel <eric@webkit.org>
+ 2009 Google, Inc.
+
+ 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
+ aint 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 "SVGMarkerLayoutInfo.h"
+
+#include "RenderSVGViewportContainer.h"
+#include "SVGResourceMarker.h"
+
+namespace WebCore {
+
+SVGMarkerLayoutInfo::SVGMarkerLayoutInfo()
+ : m_midMarker(0)
+ , m_elementIndex(0)
+ , m_strokeWidth(0)
+{
+}
+
+SVGMarkerLayoutInfo::~SVGMarkerLayoutInfo()
+{
+}
+
+static inline void processStartAndMidMarkers(void* infoPtr, const PathElement* element)
+{
+ SVGMarkerLayoutInfo& info = *reinterpret_cast<SVGMarkerLayoutInfo*>(infoPtr);
+ SVGMarkerData& markerData = info.markerData();
+ int& elementIndex = info.elementIndex();
+
+ // First update the outslope for the previous element
+ markerData.updateOutslope(element->points[0]);
+
+ // Draw the marker for the previous element
+ SVGResourceMarker* marker = markerData.marker();
+ if (elementIndex > 0 && marker)
+ info.addLayoutedMarker(marker, markerData.origin(), markerData.currentAngle());
+
+ // Update our marker data for this element
+ markerData.updateMarkerDataForPathElement(element);
+
+ // After drawing the start marker, switch to drawing mid markers
+ if (elementIndex == 1)
+ markerData.updateTypeAndMarker(SVGMarkerData::Mid, info.midMarker());
+
+ ++elementIndex;
+}
+
+FloatRect SVGMarkerLayoutInfo::calculateBoundaries(SVGResourceMarker* startMarker, SVGResourceMarker* midMarker, SVGResourceMarker* endMarker, float strokeWidth, const Path& path)
+{
+ m_layout.clear();
+ m_midMarker = midMarker;
+ m_strokeWidth = strokeWidth;
+ m_elementIndex = 0;
+ m_markerData = SVGMarkerData(SVGMarkerData::Start, startMarker);
+ path.apply(this, processStartAndMidMarkers);
+
+ if (endMarker) {
+ m_markerData.updateTypeAndMarker(SVGMarkerData::End, endMarker);
+ addLayoutedMarker(endMarker, m_markerData.origin(), m_markerData.currentAngle());
+ }
+
+ if (m_layout.isEmpty())
+ return FloatRect();
+
+ Vector<MarkerLayout>::iterator it = m_layout.begin();
+ Vector<MarkerLayout>::iterator end = m_layout.end();
+
+ FloatRect bounds;
+ for (; it != end; ++it) {
+ MarkerLayout& layout = *it;
+
+ RenderSVGViewportContainer* markerContent = layout.marker->renderer();
+ ASSERT(markerContent);
+
+ bounds.unite(markerContent->markerBoundaries(layout.matrix));
+ }
+
+ return bounds;
+}
+
+void SVGMarkerLayoutInfo::drawMarkers(RenderObject::PaintInfo& paintInfo)
+{
+ if (m_layout.isEmpty())
+ return;
+
+ Vector<MarkerLayout>::iterator it = m_layout.begin();
+ Vector<MarkerLayout>::iterator end = m_layout.end();
+
+ for (; it != end; ++it) {
+ MarkerLayout& layout = *it;
+ layout.marker->draw(paintInfo, layout.matrix);
+ }
+}
+
+void SVGMarkerLayoutInfo::addLayoutedMarker(SVGResourceMarker* marker, const FloatPoint& origin, float angle)
+{
+ ASSERT(marker);
+ m_layout.append(MarkerLayout(marker, marker->markerTransformation(origin, angle, m_strokeWidth)));
+}
+
+}
+
+#endif // ENABLE(SVG)
diff --git a/WebCore/rendering/SVGMarkerLayoutInfo.h b/WebCore/rendering/SVGMarkerLayoutInfo.h
new file mode 100644
index 0000000..1dfeee9
--- /dev/null
+++ b/WebCore/rendering/SVGMarkerLayoutInfo.h
@@ -0,0 +1,74 @@
+/*
+ Copyright (C) Research In Motion Limited 2010. All rights reserved.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint 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 SVGMarkerLayoutInfo_h
+#define SVGMarkerLayoutInfo_h
+
+#if ENABLE(SVG)
+#include "RenderObject.h"
+#include "SVGMarkerData.h"
+#include <wtf/Noncopyable.h>
+
+namespace WebCore {
+
+class Path;
+class SVGResourceMarker;
+
+struct MarkerLayout {
+ MarkerLayout(SVGResourceMarker* markerObj = 0, TransformationMatrix matrixObj = TransformationMatrix())
+ : marker(markerObj)
+ , matrix(matrixObj)
+ {
+ ASSERT(marker);
+ }
+
+ SVGResourceMarker* marker;
+ TransformationMatrix matrix;
+};
+
+class SVGMarkerLayoutInfo : public Noncopyable {
+public:
+ SVGMarkerLayoutInfo();
+ ~SVGMarkerLayoutInfo();
+
+ FloatRect calculateBoundaries(SVGResourceMarker* startMarker, SVGResourceMarker* midMarker, SVGResourceMarker* endMarker, float strokeWidth, const Path&);
+ void drawMarkers(RenderObject::PaintInfo&);
+
+ // Used by static inline helper functions in SVGMarkerLayoutInfo.cpp
+ SVGMarkerData& markerData() { return m_markerData; }
+ SVGResourceMarker* midMarker() const { return m_midMarker; }
+ int& elementIndex() { return m_elementIndex; }
+ void addLayoutedMarker(SVGResourceMarker*, const FloatPoint& origin, float angle);
+
+private:
+ SVGResourceMarker* m_midMarker;
+
+ // Used while layouting markers
+ int m_elementIndex;
+ SVGMarkerData m_markerData;
+ float m_strokeWidth;
+
+ // Holds the final computed result
+ Vector<MarkerLayout> m_layout;
+};
+
+}
+
+#endif // ENABLE(SVG)
+#endif // SVGMarkerLayoutInfo_h
diff --git a/WebCore/rendering/SVGRenderSupport.cpp b/WebCore/rendering/SVGRenderSupport.cpp
index a594410..86cbf32 100644
--- a/WebCore/rendering/SVGRenderSupport.cpp
+++ b/WebCore/rendering/SVGRenderSupport.cpp
@@ -2,7 +2,8 @@
* Copyright (C) 2007, 2008 Rob Buis <buis@kde.org>
* (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
* (C) 2007 Eric Seidel <eric@webkit.org>
- * Copyright (C) 2009 Google, Inc. All rights reserved.
+ * (C) 2009 Google, Inc. All rights reserved.
+ * (C) 2009 Dirk Schulze <krit@webkit.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -41,6 +42,10 @@
namespace WebCore {
+SVGRenderBase::~SVGRenderBase()
+{
+}
+
IntRect SVGRenderBase::clippedOverflowRectForRepaint(RenderObject* object, RenderBoxModelObject* repaintContainer)
{
// Return early for any cases where we don't actually paint
@@ -64,12 +69,12 @@ void SVGRenderBase::computeRectForRepaint(RenderObject* object, RenderBoxModelOb
void SVGRenderBase::mapLocalToContainer(const RenderObject* object, RenderBoxModelObject* repaintContainer, bool fixed , bool useTransforms, TransformState& transformState)
{
ASSERT(!fixed); // We should have no fixed content in the SVG rendering tree.
- ASSERT(useTransforms); // mapping a point through SVG w/o respecting trasnforms is useless.
+ ASSERT(useTransforms); // Mapping a point through SVG w/o respecting transforms is useless.
transformState.applyTransform(object->localToParentTransform());
object->parent()->mapLocalToContainer(repaintContainer, fixed, useTransforms, transformState);
}
-void SVGRenderBase::prepareToRenderSVGContent(RenderObject* object, RenderObject::PaintInfo& paintInfo, const FloatRect& boundingBox, SVGResourceFilter*& filter, SVGResourceFilter* rootFilter)
+bool SVGRenderBase::prepareToRenderSVGContent(RenderObject* object, RenderObject::PaintInfo& paintInfo, const FloatRect& repaintRect, SVGResourceFilter*& filter, SVGResourceFilter* rootFilter)
{
#if !ENABLE(FILTERS)
UNUSED_PARAM(filter);
@@ -90,18 +95,12 @@ void SVGRenderBase::prepareToRenderSVGContent(RenderObject* object, RenderObject
// Setup transparency layers before setting up filters!
float opacity = style->opacity();
if (opacity < 1.0f) {
- paintInfo.context->clip(enclosingIntRect(boundingBox));
+ paintInfo.context->clip(repaintRect);
paintInfo.context->beginTransparencyLayer(opacity);
}
if (ShadowData* shadow = svgStyle->shadow()) {
- int xShift = shadow->x < 0 ? shadow->x : 0;
- int yShift = shadow->y < 0 ? shadow->y :0;
- int widthShift = shadow->x < 0 ? 0 : shadow->x;
- int heightShift = shadow->y < 0 ? 0 : shadow->y;
- FloatRect shadowRect = FloatRect(boundingBox.x() + xShift, boundingBox.y() + yShift,
- boundingBox.width() + widthShift, boundingBox.height() + heightShift);
- paintInfo.context->clip(enclosingIntRect(shadowRect));
+ paintInfo.context->clip(repaintRect);
paintInfo.context->setShadow(IntSize(shadow->x, shadow->y), shadow->blur, shadow->color, style->colorSpace());
paintInfo.context->beginTransparencyLayer(1.0f);
}
@@ -116,7 +115,7 @@ void SVGRenderBase::prepareToRenderSVGContent(RenderObject* object, RenderObject
Document* document = object->document();
#if ENABLE(FILTERS)
- SVGResourceFilter* newFilter = getFilterById(document, filterId);
+ SVGResourceFilter* newFilter = getFilterById(document, filterId, object);
if (newFilter == rootFilter) {
// Catch <text filter="url(#foo)">Test<tspan filter="url(#foo)">123</tspan></text>.
// The filter is NOT meant to be applied twice in that case!
@@ -126,28 +125,32 @@ void SVGRenderBase::prepareToRenderSVGContent(RenderObject* object, RenderObject
filter = newFilter;
#endif
- SVGResourceClipper* clipper = getClipperById(document, clipperId);
- SVGResourceMasker* masker = getMaskerById(document, maskerId);
+ SVGResourceClipper* clipper = getClipperById(document, clipperId, object);
+ SVGResourceMasker* masker = getMaskerById(document, maskerId, object);
+
+ if (masker) {
+ masker->addClient(styledElement);
+ if (!masker->applyMask(paintInfo.context, object))
+ return false;
+ } else if (!maskerId.isEmpty())
+ svgElement->document()->accessSVGExtensions()->addPendingResource(maskerId, styledElement);
+
+ if (clipper) {
+ clipper->addClient(styledElement);
+ clipper->applyClip(paintInfo.context, object->objectBoundingBox());
+ } else if (!clipperId.isEmpty())
+ svgElement->document()->accessSVGExtensions()->addPendingResource(clipperId, styledElement);
#if ENABLE(FILTERS)
if (filter) {
filter->addClient(styledElement);
- filter->prepareFilter(paintInfo.context, object);
+ if (!filter->prepareFilter(paintInfo.context, object))
+ return false;
} else if (!filterId.isEmpty())
svgElement->document()->accessSVGExtensions()->addPendingResource(filterId, styledElement);
#endif
- if (clipper) {
- clipper->addClient(styledElement);
- clipper->applyClip(paintInfo.context, boundingBox);
- } else if (!clipperId.isEmpty())
- svgElement->document()->accessSVGExtensions()->addPendingResource(clipperId, styledElement);
-
- if (masker) {
- masker->addClient(styledElement);
- masker->applyMask(paintInfo.context, boundingBox);
- } else if (!maskerId.isEmpty())
- svgElement->document()->accessSVGExtensions()->addPendingResource(maskerId, styledElement);
+ return true;
}
void SVGRenderBase::finishRenderSVGContent(RenderObject* object, RenderObject::PaintInfo& paintInfo, SVGResourceFilter*& filter, GraphicsContext* savedContext)
@@ -232,18 +235,59 @@ FloatRect SVGRenderBase::computeContainerBoundingBox(const RenderObject* contain
return boundingBox;
}
-FloatRect SVGRenderBase::filterBoundingBoxForRenderer(const RenderObject* object)
+void SVGRenderBase::layoutChildren(RenderObject* start, bool selfNeedsLayout)
+{
+ for (RenderObject* child = start->firstChild(); child; child = child->nextSibling()) {
+ // Only force our kids to layout if we're being asked to relayout as a result of a parent changing
+ // FIXME: We should be able to skip relayout of non-relative kids when only bounds size has changed
+ // that's a possible future optimization using LayoutState
+ // http://bugs.webkit.org/show_bug.cgi?id=15391
+ bool needsLayout = selfNeedsLayout;
+ if (!needsLayout) {
+ if (SVGElement* element = child->node()->isSVGElement() ? static_cast<SVGElement*>(child->node()) : 0) {
+ if (element->isStyled())
+ needsLayout = static_cast<SVGStyledElement*>(element)->hasRelativeValues();
+ }
+ }
+
+ if (needsLayout)
+ child->setNeedsLayout(true, false);
+
+ child->layoutIfNeeded();
+ ASSERT(!child->needsLayout());
+ }
+}
+
+FloatRect SVGRenderBase::filterBoundingBoxForRenderer(const RenderObject* object) const
{
#if ENABLE(FILTERS)
- SVGResourceFilter* filter = getFilterById(object->document(), object->style()->svgStyle()->filter());
+ SVGResourceFilter* filter = getFilterById(object->document(), object->style()->svgStyle()->filter(), object);
if (filter)
- return filter->filterBoundingBox();
+ return filter->filterBoundingBox(object->objectBoundingBox());
#else
UNUSED_PARAM(object);
#endif
return FloatRect();
}
+FloatRect SVGRenderBase::clipperBoundingBoxForRenderer(const RenderObject* object) const
+{
+ SVGResourceClipper* clipper = getClipperById(object->document(), object->style()->svgStyle()->clipPath(), object);
+ if (clipper)
+ return clipper->clipperBoundingBox(object->objectBoundingBox());
+
+ return FloatRect();
+}
+
+FloatRect SVGRenderBase::maskerBoundingBoxForRenderer(const RenderObject* object) const
+{
+ SVGResourceMasker* masker = getMaskerById(object->document(), object->style()->svgStyle()->maskElement(), object);
+ if (masker)
+ return masker->maskerBoundingBox(object->objectBoundingBox());
+
+ return FloatRect();
+}
+
void applyTransformToPaintInfo(RenderObject::PaintInfo& paintInfo, const TransformationMatrix& localToAncestorTransform)
{
if (localToAncestorTransform.isIdentity())
diff --git a/WebCore/rendering/SVGRenderSupport.h b/WebCore/rendering/SVGRenderSupport.h
index da2bf59..0804ede 100644
--- a/WebCore/rendering/SVGRenderSupport.h
+++ b/WebCore/rendering/SVGRenderSupport.h
@@ -38,12 +38,27 @@ namespace WebCore {
// all SVG renderers inherit from RenderSVGModelObject.
class SVGRenderBase {
public:
+ virtual ~SVGRenderBase();
+
+ virtual const SVGRenderBase* toSVGRenderBase() const { return this; }
+
// FIXME: These are only public for SVGRootInlineBox.
// It's unclear if these should be exposed or not. SVGRootInlineBox may
// pass the wrong RenderObject* and boundingBox to these functions.
- static void prepareToRenderSVGContent(RenderObject*, RenderObject::PaintInfo&, const FloatRect& boundingBox, SVGResourceFilter*&, SVGResourceFilter* rootFilter = 0);
+ static bool prepareToRenderSVGContent(RenderObject*, RenderObject::PaintInfo&, const FloatRect& boundingBox, SVGResourceFilter*&, SVGResourceFilter* rootFilter = 0);
static void finishRenderSVGContent(RenderObject*, RenderObject::PaintInfo&, SVGResourceFilter*&, GraphicsContext* savedContext);
+ // Layout all children of the passed render object
+ static void layoutChildren(RenderObject*, bool selfNeedsLayout);
+
+ virtual FloatRect strokeBoundingBox() const { return FloatRect(); }
+ virtual FloatRect markerBoundingBox() const { return FloatRect(); }
+
+ // returns the bounding box of filter, clipper, marker and masker (or the empty rect if no filter) in local coordinates
+ FloatRect filterBoundingBoxForRenderer(const RenderObject*) const;
+ FloatRect clipperBoundingBoxForRenderer(const RenderObject*) const;
+ FloatRect maskerBoundingBoxForRenderer(const RenderObject*) const;
+
protected:
static IntRect clippedOverflowRectForRepaint(RenderObject*, RenderBoxModelObject* repaintContainer);
static void computeRectForRepaint(RenderObject*, RenderBoxModelObject* repaintContainer, IntRect&, bool fixed);
@@ -53,9 +68,6 @@ namespace WebCore {
// Used to share the "walk all the children" logic between objectBoundingBox
// and repaintRectInLocalCoordinates in RenderSVGRoot and RenderSVGContainer
static FloatRect computeContainerBoundingBox(const RenderObject* container, bool includeAllPaintedContent);
-
- // returns the filter bounding box (or the empty rect if no filter) in local coordinates
- static FloatRect filterBoundingBoxForRenderer(const RenderObject*);
};
// FIXME: This should move to RenderObject or PaintInfo
diff --git a/WebCore/rendering/SVGRenderTreeAsText.cpp b/WebCore/rendering/SVGRenderTreeAsText.cpp
index 28e506a..bd6a465 100644
--- a/WebCore/rendering/SVGRenderTreeAsText.cpp
+++ b/WebCore/rendering/SVGRenderTreeAsText.cpp
@@ -521,11 +521,11 @@ void writeRenderResources(TextStream& ts, Node* parent)
continue;
SVGStyledElement* styled = static_cast<SVGStyledElement*>(svgElement);
- RefPtr<SVGResource> resource(styled->canvasResource());
+ RefPtr<SVGResource> resource(styled->canvasResource(node->renderer()));
if (!resource)
continue;
- String elementId = svgElement->getAttribute(HTMLNames::idAttr);
+ String elementId = svgElement->getAttribute(svgElement->idAttributeName());
// FIXME: These names are lies!
if (resource->isPaintServer()) {
RefPtr<SVGPaintServer> paintServer = WTF::static_pointer_cast<SVGPaintServer>(resource);
diff --git a/WebCore/rendering/SVGRootInlineBox.cpp b/WebCore/rendering/SVGRootInlineBox.cpp
index 5829742..92e7654 100644
--- a/WebCore/rendering/SVGRootInlineBox.cpp
+++ b/WebCore/rendering/SVGRootInlineBox.cpp
@@ -429,6 +429,12 @@ struct SVGRootInlineBoxPaintWalker {
m_paintInfo.rect = m_savedInfo.rect;
}
+ bool chunkSetupBackgroundCallback(InlineBox* /*box*/)
+ {
+ m_textPaintInfo.subphase = SVGTextPaintSubphaseBackground;
+ return true;
+ }
+
bool chunkSetupFillCallback(InlineBox* box)
{
InlineFlowBox* flowBox = box->parent();
@@ -440,6 +446,7 @@ struct SVGRootInlineBoxPaintWalker {
ASSERT(!m_strokePaintServer);
teardownFillPaintServer();
+ m_textPaintInfo.subphase = SVGTextPaintSubphaseGlyphFill;
m_fillPaintServer = SVGPaintServer::fillPaintServer(object->style(), object);
if (m_fillPaintServer) {
m_fillPaintServer->setup(m_paintInfo.context, object, ApplyToFillTargetType, true);
@@ -462,6 +469,7 @@ struct SVGRootInlineBoxPaintWalker {
teardownFillPaintServer();
teardownStrokePaintServer();
+ m_textPaintInfo.subphase = SVGTextPaintSubphaseGlyphStroke;
m_strokePaintServer = SVGPaintServer::strokePaintServer(object->style(), object);
if (m_strokePaintServer) {
@@ -473,6 +481,32 @@ struct SVGRootInlineBoxPaintWalker {
return false;
}
+ bool chunkSetupForegroundCallback(InlineBox* /*box*/)
+ {
+ teardownFillPaintServer();
+ teardownStrokePaintServer();
+
+ m_textPaintInfo.subphase = SVGTextPaintSubphaseForeground;
+
+ return true;
+ }
+
+ SVGPaintServer* activePaintServer() const
+ {
+ switch (m_textPaintInfo.subphase) {
+ case SVGTextPaintSubphaseGlyphFill:
+ ASSERT(m_fillPaintServer);
+ return m_fillPaintServer;
+ case SVGTextPaintSubphaseGlyphStroke:
+ ASSERT(m_strokePaintServer);
+ return m_strokePaintServer;
+ case SVGTextPaintSubphaseBackground:
+ case SVGTextPaintSubphaseForeground:
+ default:
+ return 0;
+ }
+ }
+
void chunkPortionCallback(SVGInlineTextBox* textBox, int startOffset, const TransformationMatrix& chunkCtm,
const Vector<SVGChar>::iterator& start, const Vector<SVGChar>::iterator& end)
{
@@ -523,12 +557,8 @@ struct SVGRootInlineBoxPaintWalker {
textBox->paintDecoration(OVERLINE, m_paintInfo.context, decorationOrigin.x(), decorationOrigin.y(), textWidth, *it, info);
// Paint text
- SVGPaintServer* activePaintServer = m_fillPaintServer;
- if (!activePaintServer)
- activePaintServer = m_strokePaintServer;
-
- ASSERT(activePaintServer);
- textBox->paintCharacters(m_paintInfo, m_tx, m_ty, *it, stringStart, stringLength, activePaintServer);
+ m_textPaintInfo.activePaintServer = activePaintServer();
+ textBox->paintCharacters(m_paintInfo, m_tx, m_ty, *it, stringStart, stringLength, m_textPaintInfo);
// Paint decorations, that have to be drawn afterwards
if (textDecorations & LINE_THROUGH && textWidth != 0.0f)
@@ -561,6 +591,8 @@ private:
int m_tx;
int m_ty;
+
+ SVGTextPaintInfo m_textPaintInfo;
};
void SVGRootInlineBox::paint(RenderObject::PaintInfo& paintInfo, int tx, int ty)
@@ -575,18 +607,20 @@ void SVGRootInlineBox::paint(RenderObject::PaintInfo& paintInfo, int tx, int ty)
FloatRect boundingBox(tx + x(), ty + y(), width(), height());
// Initialize text rendering
- SVGRenderBase::prepareToRenderSVGContent(renderer(), paintInfo, boundingBox, filter);
-
- // Render text, chunk-by-chunk
- SVGRootInlineBoxPaintWalker walkerCallback(this, filter, paintInfo, tx, ty);
- SVGTextChunkWalker<SVGRootInlineBoxPaintWalker> walker(&walkerCallback,
- &SVGRootInlineBoxPaintWalker::chunkPortionCallback,
- &SVGRootInlineBoxPaintWalker::chunkStartCallback,
- &SVGRootInlineBoxPaintWalker::chunkEndCallback,
- &SVGRootInlineBoxPaintWalker::chunkSetupFillCallback,
- &SVGRootInlineBoxPaintWalker::chunkSetupStrokeCallback);
-
- walkTextChunks(&walker);
+ if (SVGRenderBase::prepareToRenderSVGContent(renderer(), paintInfo, boundingBox, filter)) {
+ // Render text, chunk-by-chunk
+ SVGRootInlineBoxPaintWalker walkerCallback(this, filter, paintInfo, tx, ty);
+ SVGTextChunkWalker<SVGRootInlineBoxPaintWalker> walker(&walkerCallback,
+ &SVGRootInlineBoxPaintWalker::chunkPortionCallback,
+ &SVGRootInlineBoxPaintWalker::chunkStartCallback,
+ &SVGRootInlineBoxPaintWalker::chunkEndCallback,
+ &SVGRootInlineBoxPaintWalker::chunkSetupBackgroundCallback,
+ &SVGRootInlineBoxPaintWalker::chunkSetupFillCallback,
+ &SVGRootInlineBoxPaintWalker::chunkSetupStrokeCallback,
+ &SVGRootInlineBoxPaintWalker::chunkSetupForegroundCallback);
+
+ walkTextChunks(&walker);
+ }
// Finalize text rendering
SVGRenderBase::finishRenderSVGContent(renderer(), paintInfo, filter, savedInfo.context);
@@ -1388,7 +1422,7 @@ void SVGRootInlineBox::buildTextChunks(Vector<SVGChar>& svgChars, InlineFlowBox*
} else
ASSERT(!info.chunk.boxes.isEmpty());
- // Walk string to find out new chunk positions, if existant
+ // Walk string to find out new chunk positions, if existent
for (unsigned i = 0; i < length; ++i) {
ASSERT(info.it != svgChars.end());
@@ -1680,11 +1714,18 @@ void SVGRootInlineBox::walkTextChunks(SVGTextChunkWalkerBase* walker, const SVGI
if (textBox)
(*walker)(rangeTextBox, range.startOffset, curChunk.ctm, itCharBegin, itCharEnd);
else {
+ if (walker->setupBackground(range.box))
+ (*walker)(rangeTextBox, range.startOffset, curChunk.ctm, itCharBegin, itCharEnd);
+
if (walker->setupFill(range.box))
(*walker)(rangeTextBox, range.startOffset, curChunk.ctm, itCharBegin, itCharEnd);
if (walker->setupStroke(range.box))
(*walker)(rangeTextBox, range.startOffset, curChunk.ctm, itCharBegin, itCharEnd);
+
+ if (walker->setupForeground(range.box))
+ (*walker)(rangeTextBox, range.startOffset, curChunk.ctm, itCharBegin, itCharEnd);
+
}
chunkOffset += length;
diff --git a/WebCore/rendering/SVGRootInlineBox.h b/WebCore/rendering/SVGRootInlineBox.h
index 65bade0..d2dab98 100644
--- a/WebCore/rendering/SVGRootInlineBox.h
+++ b/WebCore/rendering/SVGRootInlineBox.h
@@ -28,6 +28,7 @@
#if ENABLE(SVG)
#include "RootInlineBox.h"
#include "SVGCharacterLayoutInfo.h"
+#include "SVGRenderSupport.h"
namespace WebCore {
@@ -43,13 +44,14 @@ struct LastGlyphInfo {
bool isValid;
};
-class SVGRootInlineBox : public RootInlineBox {
+class SVGRootInlineBox : public RootInlineBox, SVGRenderBase {
public:
SVGRootInlineBox(RenderObject* obj)
: RootInlineBox(obj)
, m_height(0)
{
}
+ virtual const SVGRenderBase* toSVGRenderBase() const { return this; }
virtual bool isSVGRootInlineBox() { return true; }
@@ -63,6 +65,9 @@ public:
virtual void computePerCharacterLayoutInformation();
+ virtual FloatRect objectBoundingBox() const { return FloatRect(); }
+ virtual FloatRect repaintRectInLocalCoordinates() const { return FloatRect(); }
+
// Used by SVGInlineTextBox
const Vector<SVGTextChunk>& svgTextChunks() const;
diff --git a/WebCore/rendering/SVGShadowTreeElements.cpp b/WebCore/rendering/SVGShadowTreeElements.cpp
new file mode 100644
index 0000000..d9ce640
--- /dev/null
+++ b/WebCore/rendering/SVGShadowTreeElements.cpp
@@ -0,0 +1,80 @@
+/*
+ Copyright (C) Research In Motion Limited 2010. All rights reserved.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint 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 "SVGShadowTreeElements.h"
+
+#include "Document.h"
+#include "FloatSize.h"
+#include "RenderObject.h"
+#include "SVGNames.h"
+
+namespace WebCore {
+
+// SVGShadowTreeContainerElement
+SVGShadowTreeContainerElement::SVGShadowTreeContainerElement(Document* document)
+ : SVGGElement(SVGNames::gTag, document)
+{
+}
+
+SVGShadowTreeContainerElement::~SVGShadowTreeContainerElement()
+{
+}
+
+FloatSize SVGShadowTreeContainerElement::containerTranslation() const
+{
+ return FloatSize(m_xOffset.value(this), m_yOffset.value(this));
+}
+
+// SVGShadowTreeRootElement
+SVGShadowTreeRootElement::SVGShadowTreeRootElement(Document* document, Node* shadowParent)
+ : SVGShadowTreeContainerElement(document)
+ , m_shadowParent(shadowParent)
+{
+ setInDocument(true);
+}
+
+SVGShadowTreeRootElement::~SVGShadowTreeRootElement()
+{
+}
+
+void SVGShadowTreeRootElement::attachElement(PassRefPtr<RenderStyle> style, RenderArena* arena)
+{
+ ASSERT(m_shadowParent);
+
+ // Create the renderer with the specified style
+ RenderObject* renderer = createRenderer(arena, style.get());
+ if (renderer) {
+ setRenderer(renderer);
+ renderer->setStyle(style);
+ }
+
+ // Set these explicitly since this normally happens during an attach()
+ setAttached();
+
+ // Add the renderer to the render tree
+ if (renderer)
+ m_shadowParent->renderer()->addChild(renderer);
+}
+
+}
+
+#endif
diff --git a/WebCore/rendering/SVGShadowTreeElements.h b/WebCore/rendering/SVGShadowTreeElements.h
new file mode 100644
index 0000000..ed42e89
--- /dev/null
+++ b/WebCore/rendering/SVGShadowTreeElements.h
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) Research In Motion Limited 2010. All rights reserved.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint 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 SVGShadowTreeElements_h
+#define SVGShadowTreeElements_h
+
+#if ENABLE(SVG)
+#include "SVGGElement.h"
+#include "SVGLength.h"
+
+namespace WebCore {
+
+class FloatSize;
+
+class SVGShadowTreeContainerElement : public SVGGElement {
+public:
+ SVGShadowTreeContainerElement(Document*);
+ virtual ~SVGShadowTreeContainerElement();
+
+ virtual bool isShadowTreeContainerElement() const { return true; }
+
+ FloatSize containerTranslation() const;
+ void setContainerOffset(const SVGLength& x, const SVGLength& y)
+ {
+ m_xOffset = x;
+ m_yOffset = y;
+ }
+
+private:
+ SVGLength m_xOffset;
+ SVGLength m_yOffset;
+};
+
+class SVGShadowTreeRootElement : public SVGShadowTreeContainerElement {
+public:
+ SVGShadowTreeRootElement(Document*, Node* shadowParent);
+ virtual ~SVGShadowTreeRootElement();
+
+ virtual bool isShadowNode() const { return m_shadowParent; }
+ virtual Node* shadowParentNode() { return m_shadowParent; }
+
+ void attachElement(PassRefPtr<RenderStyle>, RenderArena*);
+
+private:
+ Node* m_shadowParent;
+};
+
+}
+
+#endif
+#endif
diff --git a/WebCore/rendering/TrailingFloatsRootInlineBox.h b/WebCore/rendering/TrailingFloatsRootInlineBox.h
new file mode 100644
index 0000000..68bf637
--- /dev/null
+++ b/WebCore/rendering/TrailingFloatsRootInlineBox.h
@@ -0,0 +1,48 @@
+/*
+ * 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 TrailingFloatsRootInlineBox_h
+#define TrailingFloatsRootInlineBox_h
+
+#include "RootInlineBox.h"
+
+namespace WebCore {
+
+class TrailingFloatsRootInlineBox : public RootInlineBox {
+public:
+ TrailingFloatsRootInlineBox(RenderObject* object) : RootInlineBox(object)
+ {
+#if ENABLE(SVG)
+ setHasVirtualHeight();
+#endif
+ }
+
+private:
+ virtual int virtualHeight() const { return 0; }
+};
+
+} // namespace WebCore
+
+#endif // TrailingFloatsRootInlineBox_h
diff --git a/WebCore/rendering/TransformState.cpp b/WebCore/rendering/TransformState.cpp
index a9e68f4..700831b 100644
--- a/WebCore/rendering/TransformState.cpp
+++ b/WebCore/rendering/TransformState.cpp
@@ -115,7 +115,7 @@ void TransformState::flattenWithTransform(const TransformationMatrix& t)
}
// We could throw away m_accumulatedTransform if we wanted to here, but that
- // would cause thrash when traversing hierarachies with alternating
+ // would cause thrash when traversing hierarchies with alternating
// preserve-3d and flat elements.
if (m_accumulatedTransform)
m_accumulatedTransform->makeIdentity();
diff --git a/WebCore/rendering/break_lines.cpp b/WebCore/rendering/break_lines.cpp
index be460c8..bbd86eb 100644
--- a/WebCore/rendering/break_lines.cpp
+++ b/WebCore/rendering/break_lines.cpp
@@ -1,21 +1,26 @@
/*
- * Copyright (C) 2005, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 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
- * 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.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -44,17 +49,37 @@ static inline bool isBreakableSpace(UChar ch, bool treatNoBreakSpaceAsBreak)
}
}
-static inline bool shouldBreakAfter(UChar ch)
+// This differs from the Unicode algorithm only in that Unicode does not break
+// between a question mark and a vertical line (U+007C).
+static const unsigned char internetExplorerLineBreaksAfterQuestionMarkTable[0x80] = {
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, // \t
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, // ! " ' ) , . /
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, // : ; ?
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, // ]
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1 // }
+};
+
+static const size_t internetExplorerLineBreaksAfterQuestionMarkTableSize = sizeof(internetExplorerLineBreaksAfterQuestionMarkTable) / sizeof(*internetExplorerLineBreaksAfterQuestionMarkTable);
+
+static inline bool shouldBreakAfter(UChar ch, UChar nextCh)
{
- // Match WinIE's breaking strategy, which is to always allow breaks after hyphens and question marks.
- // FIXME: it appears that IE behavior is more complex, see <http://bugs.webkit.org/show_bug.cgi?id=17475>.
switch (ch) {
- case '-':
+ // For a question mark preceding a non-ASCII characters, defer to the Unicode algorithm by returning false.
+ // For ASCII characters, use a lookup table for enhanced speed and for compatibility with Internet Explorer.
case '?':
+<<<<<<< HEAD
#ifdef ANDROID_LAYOUT
// as '/' is used in uri which is always long, we would like to break it
case '/':
#endif
+=======
+ return nextCh < internetExplorerLineBreaksAfterQuestionMarkTableSize && internetExplorerLineBreaksAfterQuestionMarkTable[nextCh];
+ // Internet Explorer always allows breaking after a hyphen.
+ case '-':
+>>>>>>> webkit.org at r54127
case softHyphen:
// FIXME: cases for ideographicComma and ideographicFullStop are a workaround for an issue in Unicode 5.0
// which is likely to be resolved in Unicode 5.1 <http://bugs.webkit.org/show_bug.cgi?id=17411>.
@@ -92,7 +117,7 @@ int nextBreakablePosition(const UChar* str, int pos, int len, bool treatNoBreakS
for (int i = pos; i < len; i++) {
UChar ch = str[i];
- if (isBreakableSpace(ch, treatNoBreakSpaceAsBreak) || shouldBreakAfter(lastCh))
+ if (isBreakableSpace(ch, treatNoBreakSpaceAsBreak) || shouldBreakAfter(lastCh, ch))
return i;
if (needsLineBreakIterator(ch) || needsLineBreakIterator(lastCh)) {
diff --git a/WebCore/rendering/style/FillLayer.cpp b/WebCore/rendering/style/FillLayer.cpp
index ec910c9..597e919 100644
--- a/WebCore/rendering/style/FillLayer.cpp
+++ b/WebCore/rendering/style/FillLayer.cpp
@@ -270,4 +270,15 @@ bool FillLayer::containsImage(StyleImage* s) const
return false;
}
+bool FillLayer::imagesAreLoaded() const
+{
+ const FillLayer* curr;
+ for (curr = this; curr; curr = curr->next()) {
+ if (curr->m_image && !curr->m_image->isLoaded())
+ return false;
+ }
+
+ return true;
+}
+
} // namespace WebCore
diff --git a/WebCore/rendering/style/FillLayer.h b/WebCore/rendering/style/FillLayer.h
index 9c615b4..cef6b19 100644
--- a/WebCore/rendering/style/FillLayer.h
+++ b/WebCore/rendering/style/FillLayer.h
@@ -126,6 +126,7 @@ public:
}
bool containsImage(StyleImage*) const;
+ bool imagesAreLoaded() const;
bool hasImage() const
{
diff --git a/WebCore/rendering/style/RenderStyle.cpp b/WebCore/rendering/style/RenderStyle.cpp
index 59d40b4..0952557 100644
--- a/WebCore/rendering/style/RenderStyle.cpp
+++ b/WebCore/rendering/style/RenderStyle.cpp
@@ -702,7 +702,7 @@ void RenderStyle::addBindingURI(StringImpl* uri)
void RenderStyle::setTextShadow(ShadowData* val, bool add)
{
- ASSERT(!val || !val->spread && val->style == Normal);
+ ASSERT(!val || (!val->spread && val->style == Normal));
StyleRareInheritedData* rareData = rareInheritedData.access();
if (!add) {
diff --git a/WebCore/rendering/style/RenderStyle.h b/WebCore/rendering/style/RenderStyle.h
index a72b66d..c59d953 100644
--- a/WebCore/rendering/style/RenderStyle.h
+++ b/WebCore/rendering/style/RenderStyle.h
@@ -89,7 +89,11 @@
#include "BindingURI.h"
#endif
+#if COMPILER(WINSCW)
+#define compareEqual(t, u) ((t) == (u))
+#else
template<typename T, typename U> inline bool compareEqual(const T& t, const U& u) { return t == static_cast<T>(u); }
+#endif
#define SET_VAR(group, variable, value) \
if (!compareEqual(group->variable, value)) \
@@ -179,7 +183,7 @@ protected:
unsigned _empty_cells : 1; // EEmptyCell
unsigned _caption_side : 2; // ECaptionSide
- unsigned _list_style_type : 5 ; // EListStyleType
+ unsigned _list_style_type : 6; // EListStyleType
unsigned _list_style_position : 1; // EListStylePosition
unsigned _visibility : 2; // EVisibility
unsigned _text_align : 3; // ETextAlign
@@ -190,37 +194,38 @@ protected:
bool _border_collapse : 1 ;
unsigned _white_space : 3; // EWhiteSpace
unsigned _box_direction : 1; // EBoxDirection (CSS3 box_direction property, flexible box layout module)
- // 32 bits
+ // 33 bits
// non CSS2 inherited
bool _visuallyOrdered : 1;
bool _htmlHacks : 1;
bool _force_backgrounds_to_white : 1;
unsigned _pointerEvents : 4; // EPointerEvents
- // 39 bits
+ // 40 bits
} inherited_flags;
// don't inherit
struct NonInheritedFlags {
bool operator==(const NonInheritedFlags& other) const
{
- return (_effectiveDisplay == other._effectiveDisplay) &&
- (_originalDisplay == other._originalDisplay) &&
- (_overflowX == other._overflowX) &&
- (_overflowY == other._overflowY) &&
- (_vertical_align == other._vertical_align) &&
- (_clear == other._clear) &&
- (_position == other._position) &&
- (_floating == other._floating) &&
- (_table_layout == other._table_layout) &&
- (_page_break_before == other._page_break_before) &&
- (_page_break_after == other._page_break_after) &&
- (_styleType == other._styleType) &&
- (_affectedByHover == other._affectedByHover) &&
- (_affectedByActive == other._affectedByActive) &&
- (_affectedByDrag == other._affectedByDrag) &&
- (_pseudoBits == other._pseudoBits) &&
- (_unicodeBidi == other._unicodeBidi);
+ return _effectiveDisplay == other._effectiveDisplay
+ && _originalDisplay == other._originalDisplay
+ && _overflowX == other._overflowX
+ && _overflowY == other._overflowY
+ && _vertical_align == other._vertical_align
+ && _clear == other._clear
+ && _position == other._position
+ && _floating == other._floating
+ && _table_layout == other._table_layout
+ && _page_break_before == other._page_break_before
+ && _page_break_after == other._page_break_after
+ && _page_break_inside == other._page_break_inside
+ && _styleType == other._styleType
+ && _affectedByHover == other._affectedByHover
+ && _affectedByActive == other._affectedByActive
+ && _affectedByDrag == other._affectedByDrag
+ && _pseudoBits == other._pseudoBits
+ && _unicodeBidi == other._unicodeBidi;
}
bool operator!=(const NonInheritedFlags& other) const { return !(*this == other); }
@@ -237,6 +242,7 @@ protected:
unsigned _page_break_before : 2; // EPageBreak
unsigned _page_break_after : 2; // EPageBreak
+ unsigned _page_break_inside : 2; // EPageBreak
unsigned _styleType : 5; // PseudoId
bool _affectedByHover : 1;
@@ -244,7 +250,7 @@ protected:
bool _affectedByDrag : 1;
unsigned _pseudoBits : 7;
unsigned _unicodeBidi : 2; // EUnicodeBidi
- // 48 bits
+ // 50 bits
} noninherited_flags;
// !END SYNC!
@@ -280,6 +286,7 @@ protected:
noninherited_flags._table_layout = initialTableLayout();
noninherited_flags._page_break_before = initialPageBreak();
noninherited_flags._page_break_after = initialPageBreak();
+ noninherited_flags._page_break_inside = initialPageBreak();
noninherited_flags._styleType = NOPSEUDO;
noninherited_flags._affectedByHover = false;
noninherited_flags._affectedByActive = false;
@@ -460,7 +467,7 @@ public:
return font().lineSpacing();
if (lh.isPercent())
- return lh.calcMinValue(fontSize(), true);
+ return lh.calcMinValue(fontSize());
return lh.value();
}
@@ -581,7 +588,7 @@ public:
short widows() const { return inherited->widows; }
short orphans() const { return inherited->orphans; }
- EPageBreak pageBreakInside() const { return static_cast<EPageBreak>(inherited->page_break_inside); }
+ EPageBreak pageBreakInside() const { return static_cast<EPageBreak>(noninherited_flags._page_break_inside); }
EPageBreak pageBreakBefore() const { return static_cast<EPageBreak>(noninherited_flags._page_break_before); }
EPageBreak pageBreakAfter() const { return static_cast<EPageBreak>(noninherited_flags._page_break_after); }
@@ -921,7 +928,7 @@ public:
void setWidows(short w) { SET_VAR(inherited, widows, w); }
void setOrphans(short o) { SET_VAR(inherited, orphans, o); }
- void setPageBreakInside(EPageBreak b) { SET_VAR(inherited, page_break_inside, b); }
+ void setPageBreakInside(EPageBreak b) { noninherited_flags._page_break_inside = b; }
void setPageBreakBefore(EPageBreak b) { noninherited_flags._page_break_before = b; }
void setPageBreakAfter(EPageBreak b) { noninherited_flags._page_break_after = b; }
@@ -1114,7 +1121,7 @@ public:
static EEmptyCell initialEmptyCells() { return SHOW; }
static EFloat initialFloating() { return FNONE; }
static EListStylePosition initialListStylePosition() { return OUTSIDE; }
- static EListStyleType initialListStyleType() { return DISC; }
+ static EListStyleType initialListStyleType() { return Disc; }
static EOverflow initialOverflowX() { return OVISIBLE; }
static EOverflow initialOverflowY() { return OVISIBLE; }
static EPageBreak initialPageBreak() { return PBAUTO; }
diff --git a/WebCore/rendering/style/RenderStyleConstants.h b/WebCore/rendering/style/RenderStyleConstants.h
index 92cd3d5..d2c80ca 100644
--- a/WebCore/rendering/style/RenderStyleConstants.h
+++ b/WebCore/rendering/style/RenderStyleConstants.h
@@ -73,7 +73,7 @@ enum PseudoId {
MEDIA_CONTROLS_SEEK_BACK_BUTTON, MEDIA_CONTROLS_SEEK_FORWARD_BUTTON, MEDIA_CONTROLS_FULLSCREEN_BUTTON, MEDIA_CONTROLS_REWIND_BUTTON,
MEDIA_CONTROLS_RETURN_TO_REALTIME_BUTTON, MEDIA_CONTROLS_TOGGLE_CLOSED_CAPTIONS_BUTTON,
MEDIA_CONTROLS_STATUS_DISPLAY, SCROLLBAR_THUMB, SCROLLBAR_BUTTON, SCROLLBAR_TRACK, SCROLLBAR_TRACK_PIECE, SCROLLBAR_CORNER, RESIZER,
- INPUT_LIST_BUTTON,
+ INPUT_LIST_BUTTON, INNER_SPIN_BUTTON, OUTER_SPIN_BUTTON,
FIRST_INTERNAL_PSEUDOID = FILE_UPLOAD_BUTTON
};
@@ -203,12 +203,63 @@ enum EResize {
RESIZE_NONE, RESIZE_BOTH, RESIZE_HORIZONTAL, RESIZE_VERTICAL
};
+// The order of this enum must match the order of the list style types in CSSValueKeywords.in.
enum EListStyleType {
- DISC, CIRCLE, SQUARE, LDECIMAL, DECIMAL_LEADING_ZERO,
- LOWER_ROMAN, UPPER_ROMAN, LOWER_GREEK,
- LOWER_ALPHA, LOWER_LATIN, UPPER_ALPHA, UPPER_LATIN,
- HEBREW, ARMENIAN, GEORGIAN, CJK_IDEOGRAPHIC,
- HIRAGANA, KATAKANA, HIRAGANA_IROHA, KATAKANA_IROHA, LNONE
+ Disc,
+ Circle,
+ Square,
+ DecimalListStyle,
+ DecimalLeadingZero,
+ LowerRoman,
+ UpperRoman,
+ LowerGreek,
+ LowerAlpha,
+ LowerLatin,
+ UpperAlpha,
+ UpperLatin,
+ Afar,
+ EthiopicHalehameAaEt,
+ EthiopicHalehameAaEr,
+ Amharic,
+ EthiopicHalehameAmEt,
+ AmharicAbegede,
+ EthiopicAbegedeAmEt,
+ CjkEarthlyBranch,
+ CjkHeavenlyStem,
+ Ethiopic,
+ EthiopicHalehameGez,
+ EthiopicAbegede,
+ EthiopicAbegedeGez,
+ HangulConsonant,
+ Hangul,
+ LowerNorwegian,
+ Oromo,
+ EthiopicHalehameOmEt,
+ Sidama,
+ EthiopicHalehameSidEt,
+ Somali,
+ EthiopicHalehameSoEt,
+ Tigre,
+ EthiopicHalehameTig,
+ TigrinyaEr,
+ EthiopicHalehameTiEr,
+ TigrinyaErAbegede,
+ EthiopicAbegedeTiEr,
+ TigrinyaEt,
+ EthiopicHalehameTiEt,
+ TigrinyaEtAbegede,
+ EthiopicAbegedeTiEt,
+ UpperGreek,
+ UpperNorwegian,
+ Hebrew,
+ Armenian,
+ Georgian,
+ CJKIdeographic,
+ Hiragana,
+ Katakana,
+ HiraganaIroha,
+ KatakanaIroha,
+ NoneListStyle
};
enum StyleContentType {
diff --git a/WebCore/rendering/style/SVGRenderStyle.cpp b/WebCore/rendering/style/SVGRenderStyle.cpp
index 728738b..7958088 100644
--- a/WebCore/rendering/style/SVGRenderStyle.cpp
+++ b/WebCore/rendering/style/SVGRenderStyle.cpp
@@ -30,11 +30,14 @@
#include "CSSPrimitiveValue.h"
#include "CSSValueList.h"
+#include "IntRect.h"
#include "NodeRenderStyle.h"
#include "RenderObject.h"
#include "RenderStyle.h"
#include "SVGStyledElement.h"
+using namespace std;
+
namespace WebCore {
SVGRenderStyle::SVGRenderStyle()
@@ -141,6 +144,56 @@ float SVGRenderStyle::cssPrimitiveToLength(const RenderObject* item, CSSValue* v
return primitive->computeLengthFloat(const_cast<RenderStyle*>(item->style()), item->document()->documentElement()->renderStyle());
}
+
+static void getSVGShadowExtent(ShadowData* shadow, int& top, int& right, int& bottom, int& left)
+{
+ top = 0;
+ right = 0;
+ bottom = 0;
+ left = 0;
+
+ int 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;
+
+ int shadowTop;
+ int shadowRight;
+ int shadowBottom;
+ int shadowLeft;
+ getSVGShadowExtent(svgShadow, shadowTop, shadowRight, shadowBottom, shadowLeft);
+
+ int overflowLeft = repaintRect.x() + shadowLeft;
+ int overflowRight = repaintRect.right() + shadowRight;
+ int overflowTop = repaintRect.y() + shadowTop;
+ int overflowBottom = repaintRect.bottom() + shadowBottom;
+
+ repaintRect.setX(overflowLeft);
+ repaintRect.setY(overflowTop);
+ repaintRect.setWidth(overflowRight - overflowLeft);
+ repaintRect.setHeight(overflowBottom - overflowTop);
+}
+
}
#endif // ENABLE(SVG)
diff --git a/WebCore/rendering/style/SVGRenderStyle.h b/WebCore/rendering/style/SVGRenderStyle.h
index c65be97..c7f85db 100644
--- a/WebCore/rendering/style/SVGRenderStyle.h
+++ b/WebCore/rendering/style/SVGRenderStyle.h
@@ -34,176 +34,182 @@
namespace WebCore {
- class RenderObject;
- class RenderStyle;
-
- class SVGRenderStyle : public RefCounted<SVGRenderStyle> {
- public:
- static PassRefPtr<SVGRenderStyle> create() { return adoptRef(new SVGRenderStyle); }
- PassRefPtr<SVGRenderStyle> copy() const { return adoptRef(new SVGRenderStyle(*this));}
- ~SVGRenderStyle();
+class FloatRect;
+class IntRect;
+class RenderObject;
+class RenderStyle;
+
+class SVGRenderStyle : public RefCounted<SVGRenderStyle> {
+public:
+ static PassRefPtr<SVGRenderStyle> create() { return adoptRef(new SVGRenderStyle); }
+ PassRefPtr<SVGRenderStyle> copy() const { return adoptRef(new SVGRenderStyle(*this));}
+ ~SVGRenderStyle();
+
+ bool inheritedNotEqual(const SVGRenderStyle*) const;
+ void inheritFrom(const SVGRenderStyle*);
+
+ // FIXME: These functions should move to ShadowData.
+ void inflateForShadow(IntRect&) const;
+ void inflateForShadow(FloatRect&) const;
+
+ bool operator==(const SVGRenderStyle&) const;
+ bool operator!=(const SVGRenderStyle& o) const { return !(*this == o); }
+
+ // SVG CSS Properties
+ SVG_RS_DEFINE_ATTRIBUTE(EAlignmentBaseline, AlignmentBaseline, alignmentBaseline, AB_AUTO)
+ SVG_RS_DEFINE_ATTRIBUTE(EDominantBaseline, DominantBaseline, dominantBaseline, DB_AUTO)
+ SVG_RS_DEFINE_ATTRIBUTE(EBaselineShift, BaselineShift, baselineShift, BS_BASELINE)
+
+ SVG_RS_DEFINE_ATTRIBUTE_INHERITED(LineCap, CapStyle, capStyle, ButtCap)
+ SVG_RS_DEFINE_ATTRIBUTE_INHERITED(WindRule, ClipRule, clipRule, RULE_NONZERO)
+ SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EColorInterpolation, ColorInterpolation, colorInterpolation, CI_SRGB)
+ SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EColorInterpolation, ColorInterpolationFilters, colorInterpolationFilters, CI_LINEARRGB)
+ SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EColorRendering, ColorRendering, colorRendering, CR_AUTO)
+ SVG_RS_DEFINE_ATTRIBUTE_INHERITED(WindRule, FillRule, fillRule, RULE_NONZERO)
+ SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EImageRendering, ImageRendering, imageRendering, IR_AUTO)
+ SVG_RS_DEFINE_ATTRIBUTE_INHERITED(LineJoin, JoinStyle, joinStyle, MiterJoin)
+ SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EShapeRendering, ShapeRendering, shapeRendering, SR_AUTO)
+ SVG_RS_DEFINE_ATTRIBUTE_INHERITED(ETextAnchor, TextAnchor, textAnchor, TA_START)
+ SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EWritingMode, WritingMode, writingMode, WM_LRTB)
+ SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EGlyphOrientation, GlyphOrientationHorizontal, glyphOrientationHorizontal, GO_0DEG)
+ SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EGlyphOrientation, GlyphOrientationVertical, glyphOrientationVertical, GO_AUTO)
+
+ // SVG CSS Properties (using DataRef's)
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, fill, opacity, FillOpacity, fillOpacity, 1.0f)
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(SVGPaint, fill, paint, FillPaint, fillPaint, SVGPaint::defaultFill())
+
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, stroke, opacity, StrokeOpacity, strokeOpacity, 1.0f)
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(SVGPaint, stroke, paint, StrokePaint, strokePaint, SVGPaint::defaultStroke())
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValueList, stroke, dashArray, StrokeDashArray, strokeDashArray, 0)
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, stroke, miterLimit, StrokeMiterLimit, strokeMiterLimit, 4.0f)
+
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, stroke, width, StrokeWidth, strokeWidth, 0)
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, stroke, dashOffset, StrokeDashOffset, strokeDashOffset, 0);
+
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, text, kerning, Kerning, kerning, 0)
+
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, stops, opacity, StopOpacity, stopOpacity, 1.0f)
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, stops, color, StopColor, stopColor, Color(0, 0, 0))
+
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, clip, clipPath, ClipPath, clipPath, String())
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, mask, maskElement, MaskElement, maskElement, String())
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, markers, startMarker, StartMarker, startMarker, String())
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, markers, midMarker, MidMarker, midMarker, String())
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, markers, endMarker, EndMarker, endMarker, String())
+
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, misc, filter, Filter, filter, String())
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, misc, floodOpacity, FloodOpacity, floodOpacity, 1.0f)
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, misc, floodColor, FloodColor, floodColor, Color(0, 0, 0))
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, misc, lightingColor, LightingColor, lightingColor, Color(255, 255, 255))
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, misc, baselineShiftValue, BaselineShiftValue, baselineShiftValue, 0)
+
+ SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_OWNPTR(ShadowData, shadowSVG, shadow, Shadow, shadow, 0)
+
+ // convenience
+ bool hasStroke() const { return (strokePaint()->paintType() != SVGPaint::SVG_PAINTTYPE_NONE); }
+ bool hasFill() const { return (fillPaint()->paintType() != SVGPaint::SVG_PAINTTYPE_NONE); }
+
+ static float cssPrimitiveToLength(const RenderObject*, CSSValue*, float defaultValue = 0.0f);
+
+protected:
+ // inherit
+ struct InheritedFlags {
+ bool operator==(const InheritedFlags& other) const
+ {
+ return (_colorRendering == other._colorRendering)
+ && (_imageRendering == other._imageRendering)
+ && (_shapeRendering == other._shapeRendering)
+ && (_clipRule == other._clipRule)
+ && (_fillRule == other._fillRule)
+ && (_capStyle == other._capStyle)
+ && (_joinStyle == other._joinStyle)
+ && (_textAnchor == other._textAnchor)
+ && (_colorInterpolation == other._colorInterpolation)
+ && (_colorInterpolationFilters == other._colorInterpolationFilters)
+ && (_writingMode == other._writingMode)
+ && (_glyphOrientationHorizontal == other._glyphOrientationHorizontal)
+ && (_glyphOrientationVertical == other._glyphOrientationVertical);
+ }
- bool inheritedNotEqual(const SVGRenderStyle*) const;
- void inheritFrom(const SVGRenderStyle*);
-
- bool operator==(const SVGRenderStyle&) const;
- bool operator!=(const SVGRenderStyle& o) const { return !(*this == o); }
-
- // SVG CSS Properties
- SVG_RS_DEFINE_ATTRIBUTE(EAlignmentBaseline, AlignmentBaseline, alignmentBaseline, AB_AUTO)
- SVG_RS_DEFINE_ATTRIBUTE(EDominantBaseline, DominantBaseline, dominantBaseline, DB_AUTO)
- SVG_RS_DEFINE_ATTRIBUTE(EBaselineShift, BaselineShift, baselineShift, BS_BASELINE)
-
- SVG_RS_DEFINE_ATTRIBUTE_INHERITED(LineCap, CapStyle, capStyle, ButtCap)
- SVG_RS_DEFINE_ATTRIBUTE_INHERITED(WindRule, ClipRule, clipRule, RULE_NONZERO)
- SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EColorInterpolation, ColorInterpolation, colorInterpolation, CI_SRGB)
- SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EColorInterpolation, ColorInterpolationFilters, colorInterpolationFilters, CI_LINEARRGB)
- SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EColorRendering, ColorRendering, colorRendering, CR_AUTO)
- SVG_RS_DEFINE_ATTRIBUTE_INHERITED(WindRule, FillRule, fillRule, RULE_NONZERO)
- SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EImageRendering, ImageRendering, imageRendering, IR_AUTO)
- SVG_RS_DEFINE_ATTRIBUTE_INHERITED(LineJoin, JoinStyle, joinStyle, MiterJoin)
- SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EShapeRendering, ShapeRendering, shapeRendering, SR_AUTO)
- SVG_RS_DEFINE_ATTRIBUTE_INHERITED(ETextAnchor, TextAnchor, textAnchor, TA_START)
- SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EWritingMode, WritingMode, writingMode, WM_LRTB)
- SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EGlyphOrientation, GlyphOrientationHorizontal, glyphOrientationHorizontal, GO_0DEG)
- SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EGlyphOrientation, GlyphOrientationVertical, glyphOrientationVertical, GO_AUTO)
-
- // SVG CSS Properties (using DataRef's)
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, fill, opacity, FillOpacity, fillOpacity, 1.0f)
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(SVGPaint, fill, paint, FillPaint, fillPaint, SVGPaint::defaultFill())
-
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, stroke, opacity, StrokeOpacity, strokeOpacity, 1.0f)
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(SVGPaint, stroke, paint, StrokePaint, strokePaint, SVGPaint::defaultStroke())
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValueList, stroke, dashArray, StrokeDashArray, strokeDashArray, 0)
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, stroke, miterLimit, StrokeMiterLimit, strokeMiterLimit, 4.0f)
-
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, stroke, width, StrokeWidth, strokeWidth, 0)
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, stroke, dashOffset, StrokeDashOffset, strokeDashOffset, 0);
-
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, text, kerning, Kerning, kerning, 0)
-
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, stops, opacity, StopOpacity, stopOpacity, 1.0f)
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, stops, color, StopColor, stopColor, Color(0, 0, 0))
-
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, clip, clipPath, ClipPath, clipPath, String())
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, mask, maskElement, MaskElement, maskElement, String())
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, markers, startMarker, StartMarker, startMarker, String())
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, markers, midMarker, MidMarker, midMarker, String())
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, markers, endMarker, EndMarker, endMarker, String())
-
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, misc, filter, Filter, filter, String())
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, misc, floodOpacity, FloodOpacity, floodOpacity, 1.0f)
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, misc, floodColor, FloodColor, floodColor, Color(0, 0, 0))
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, misc, lightingColor, LightingColor, lightingColor, Color(255, 255, 255))
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, misc, baselineShiftValue, BaselineShiftValue, baselineShiftValue, 0)
-
- SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_OWNPTR(ShadowData, shadowSVG, shadow, Shadow, shadow, 0)
-
- // convenience
- bool hasStroke() const { return (strokePaint()->paintType() != SVGPaint::SVG_PAINTTYPE_NONE); }
- bool hasFill() const { return (fillPaint()->paintType() != SVGPaint::SVG_PAINTTYPE_NONE); }
-
- static float cssPrimitiveToLength(const RenderObject*, CSSValue*, float defaultValue = 0.0f);
-
- protected:
- // inherit
- struct InheritedFlags {
- bool operator==(const InheritedFlags& other) const
- {
- return (_colorRendering == other._colorRendering) &&
- (_imageRendering == other._imageRendering) &&
- (_shapeRendering == other._shapeRendering) &&
- (_clipRule == other._clipRule) &&
- (_fillRule == other._fillRule) &&
- (_capStyle == other._capStyle) &&
- (_joinStyle == other._joinStyle) &&
- (_textAnchor == other._textAnchor) &&
- (_colorInterpolation == other._colorInterpolation) &&
- (_colorInterpolationFilters == other._colorInterpolationFilters) &&
- (_writingMode == other._writingMode) &&
- (_glyphOrientationHorizontal == other._glyphOrientationHorizontal) &&
- (_glyphOrientationVertical == other._glyphOrientationVertical);
- }
-
- bool operator!=(const InheritedFlags& other) const
- {
- return !(*this == other);
- }
-
- unsigned _colorRendering : 2; // EColorRendering
- unsigned _imageRendering : 2; // EImageRendering
- unsigned _shapeRendering : 2; // EShapeRendering
- unsigned _clipRule : 1; // WindRule
- unsigned _fillRule : 1; // WindRule
- unsigned _capStyle : 2; // LineCap
- unsigned _joinStyle : 2; // LineJoin
- unsigned _textAnchor : 2; // ETextAnchor
- unsigned _colorInterpolation : 2; // EColorInterpolation
- unsigned _colorInterpolationFilters : 2; // EColorInterpolation
- unsigned _writingMode : 3; // EWritingMode
- unsigned _glyphOrientationHorizontal : 3; // EGlyphOrientation
- unsigned _glyphOrientationVertical : 3; // EGlyphOrientation
- } svg_inherited_flags;
-
- // don't inherit
- struct NonInheritedFlags {
- // 32 bit non-inherited, don't add to the struct, or the operator will break.
- bool operator==(const NonInheritedFlags &other) const { return _niflags == other._niflags; }
- bool operator!=(const NonInheritedFlags &other) const { return _niflags != other._niflags; }
-
- union {
- struct {
- unsigned _alignmentBaseline : 4; // EAlignmentBaseline
- unsigned _dominantBaseline : 4; // EDominantBaseline
- unsigned _baselineShift : 2; // EBaselineShift
- // 22 bits unused
- } f;
- uint32_t _niflags;
- };
- } svg_noninherited_flags;
-
- // inherited attributes
- DataRef<StyleFillData> fill;
- DataRef<StyleStrokeData> stroke;
- DataRef<StyleMarkerData> markers;
- DataRef<StyleTextData> text;
-
- // non-inherited attributes
- DataRef<StyleStopData> stops;
- DataRef<StyleClipData> clip;
- DataRef<StyleMaskData> mask;
- DataRef<StyleMiscData> misc;
- DataRef<StyleShadowSVGData> shadowSVG;
-
- private:
- enum CreateDefaultType { CreateDefault };
-
- SVGRenderStyle();
- SVGRenderStyle(const SVGRenderStyle&);
- SVGRenderStyle(CreateDefaultType); // Used to create the default style.
-
- void setBitDefaults()
+ bool operator!=(const InheritedFlags& other) const
{
- svg_inherited_flags._clipRule = initialClipRule();
- svg_inherited_flags._colorRendering = initialColorRendering();
- svg_inherited_flags._fillRule = initialFillRule();
- svg_inherited_flags._imageRendering = initialImageRendering();
- svg_inherited_flags._shapeRendering = initialShapeRendering();
- svg_inherited_flags._textAnchor = initialTextAnchor();
- svg_inherited_flags._capStyle = initialCapStyle();
- svg_inherited_flags._joinStyle = initialJoinStyle();
- svg_inherited_flags._colorInterpolation = initialColorInterpolation();
- svg_inherited_flags._colorInterpolationFilters = initialColorInterpolationFilters();
- svg_inherited_flags._writingMode = initialWritingMode();
- svg_inherited_flags._glyphOrientationHorizontal = initialGlyphOrientationHorizontal();
- svg_inherited_flags._glyphOrientationVertical = initialGlyphOrientationVertical();
-
- svg_noninherited_flags._niflags = 0;
- svg_noninherited_flags.f._alignmentBaseline = initialAlignmentBaseline();
- svg_noninherited_flags.f._dominantBaseline = initialDominantBaseline();
- svg_noninherited_flags.f._baselineShift = initialBaselineShift();
+ return !(*this == other);
}
- };
+
+ unsigned _colorRendering : 2; // EColorRendering
+ unsigned _imageRendering : 2; // EImageRendering
+ unsigned _shapeRendering : 2; // EShapeRendering
+ unsigned _clipRule : 1; // WindRule
+ unsigned _fillRule : 1; // WindRule
+ unsigned _capStyle : 2; // LineCap
+ unsigned _joinStyle : 2; // LineJoin
+ unsigned _textAnchor : 2; // ETextAnchor
+ unsigned _colorInterpolation : 2; // EColorInterpolation
+ unsigned _colorInterpolationFilters : 2; // EColorInterpolation
+ unsigned _writingMode : 3; // EWritingMode
+ unsigned _glyphOrientationHorizontal : 3; // EGlyphOrientation
+ unsigned _glyphOrientationVertical : 3; // EGlyphOrientation
+ } svg_inherited_flags;
+
+ // don't inherit
+ struct NonInheritedFlags {
+ // 32 bit non-inherited, don't add to the struct, or the operator will break.
+ bool operator==(const NonInheritedFlags &other) const { return _niflags == other._niflags; }
+ bool operator!=(const NonInheritedFlags &other) const { return _niflags != other._niflags; }
+
+ union {
+ struct {
+ unsigned _alignmentBaseline : 4; // EAlignmentBaseline
+ unsigned _dominantBaseline : 4; // EDominantBaseline
+ unsigned _baselineShift : 2; // EBaselineShift
+ // 22 bits unused
+ } f;
+ uint32_t _niflags;
+ };
+ } svg_noninherited_flags;
+
+ // inherited attributes
+ DataRef<StyleFillData> fill;
+ DataRef<StyleStrokeData> stroke;
+ DataRef<StyleMarkerData> markers;
+ DataRef<StyleTextData> text;
+
+ // non-inherited attributes
+ DataRef<StyleStopData> stops;
+ DataRef<StyleClipData> clip;
+ DataRef<StyleMaskData> mask;
+ DataRef<StyleMiscData> misc;
+ DataRef<StyleShadowSVGData> shadowSVG;
+
+private:
+ enum CreateDefaultType { CreateDefault };
+
+ SVGRenderStyle();
+ SVGRenderStyle(const SVGRenderStyle&);
+ SVGRenderStyle(CreateDefaultType); // Used to create the default style.
+
+ void setBitDefaults()
+ {
+ svg_inherited_flags._clipRule = initialClipRule();
+ svg_inherited_flags._colorRendering = initialColorRendering();
+ svg_inherited_flags._fillRule = initialFillRule();
+ svg_inherited_flags._imageRendering = initialImageRendering();
+ svg_inherited_flags._shapeRendering = initialShapeRendering();
+ svg_inherited_flags._textAnchor = initialTextAnchor();
+ svg_inherited_flags._capStyle = initialCapStyle();
+ svg_inherited_flags._joinStyle = initialJoinStyle();
+ svg_inherited_flags._colorInterpolation = initialColorInterpolation();
+ svg_inherited_flags._colorInterpolationFilters = initialColorInterpolationFilters();
+ svg_inherited_flags._writingMode = initialWritingMode();
+ svg_inherited_flags._glyphOrientationHorizontal = initialGlyphOrientationHorizontal();
+ svg_inherited_flags._glyphOrientationVertical = initialGlyphOrientationVertical();
+
+ svg_noninherited_flags._niflags = 0;
+ svg_noninherited_flags.f._alignmentBaseline = initialAlignmentBaseline();
+ svg_noninherited_flags.f._dominantBaseline = initialDominantBaseline();
+ svg_noninherited_flags.f._baselineShift = initialBaselineShift();
+ }
+};
} // namespace WebCore
diff --git a/WebCore/rendering/style/StyleInheritedData.cpp b/WebCore/rendering/style/StyleInheritedData.cpp
index f59c0c2..c73497f 100644
--- a/WebCore/rendering/style/StyleInheritedData.cpp
+++ b/WebCore/rendering/style/StyleInheritedData.cpp
@@ -37,7 +37,6 @@ StyleInheritedData::StyleInheritedData()
, vertical_border_spacing(RenderStyle::initialVerticalBorderSpacing())
, widows(RenderStyle::initialWidows())
, orphans(RenderStyle::initialOrphans())
- , page_break_inside(RenderStyle::initialPageBreak())
{
}
@@ -58,7 +57,6 @@ StyleInheritedData::StyleInheritedData(const StyleInheritedData& o)
, vertical_border_spacing(o.vertical_border_spacing)
, widows(o.widows)
, orphans(o.orphans)
- , page_break_inside(o.page_break_inside)
{
}
@@ -84,8 +82,7 @@ bool StyleInheritedData::operator==(const StyleInheritedData& o) const
horizontal_border_spacing == o.horizontal_border_spacing &&
vertical_border_spacing == o.vertical_border_spacing &&
widows == o.widows &&
- orphans == o.orphans &&
- page_break_inside == o.page_break_inside;
+ orphans == o.orphans;
}
} // namespace WebCore
diff --git a/WebCore/rendering/style/StyleInheritedData.h b/WebCore/rendering/style/StyleInheritedData.h
index 548ca72..3b30b8f 100644
--- a/WebCore/rendering/style/StyleInheritedData.h
+++ b/WebCore/rendering/style/StyleInheritedData.h
@@ -68,7 +68,6 @@ public:
// Paged media properties.
short widows;
short orphans;
- unsigned page_break_inside : 2; // EPageBreak
private:
StyleInheritedData();
diff --git a/WebCore/storage/Database.cpp b/WebCore/storage/Database.cpp
index 29dec26..648492f 100644
--- a/WebCore/storage/Database.cpp
+++ b/WebCore/storage/Database.cpp
@@ -53,8 +53,8 @@
#include "SQLResultSet.h"
#include "SQLTransactionClient.h"
#include "SQLTransactionCoordinator.h"
-#include <wtf/MainThread.h>
-#endif
+
+#endif // ENABLE(DATABASE)
#if USE(JSC)
#include "JSDOMWindow.h"
@@ -73,6 +73,18 @@ const String& Database::databaseInfoTableName()
#if ENABLE(DATABASE)
+static bool isDatabaseAvailable = false;
+
+void Database::setIsAvailable(bool available)
+{
+ isDatabaseAvailable = available;
+}
+
+bool Database::isAvailable()
+{
+ return isDatabaseAvailable;
+}
+
static Mutex& guidMutex()
{
// Note: We don't have to use AtomicallyInitializedStatic here because
@@ -120,37 +132,41 @@ static const String& databaseVersionKey()
static int guidForOriginAndName(const String& origin, const String& name);
-PassRefPtr<Database> Database::openDatabase(Document* document, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize, ExceptionCode& e)
+PassRefPtr<Database> Database::openDatabase(ScriptExecutionContext* context, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize, ExceptionCode& e)
{
- if (!DatabaseTracker::tracker().canEstablishDatabase(document, name, displayName, estimatedSize)) {
+ if (!DatabaseTracker::tracker().canEstablishDatabase(context, name, displayName, estimatedSize)) {
// FIXME: There should be an exception raised here in addition to returning a null Database object. The question has been raised with the WHATWG.
- LOG(StorageAPI, "Database %s for origin %s not allowed to be established", name.ascii().data(), document->securityOrigin()->toString().ascii().data());
+ LOG(StorageAPI, "Database %s for origin %s not allowed to be established", name.ascii().data(), context->securityOrigin()->toString().ascii().data());
return 0;
}
- RefPtr<Database> database = adoptRef(new Database(document, name, expectedVersion, displayName, estimatedSize));
+ RefPtr<Database> database = adoptRef(new Database(context, name, expectedVersion, displayName, estimatedSize));
if (!database->openAndVerifyVersion(e)) {
- LOG(StorageAPI, "Failed to open and verify version (expected %s) of database %s", expectedVersion.ascii().data(), database->databaseDebugName().ascii().data());
- return 0;
+ LOG(StorageAPI, "Failed to open and verify version (expected %s) of database %s", expectedVersion.ascii().data(), database->databaseDebugName().ascii().data());
+ context->removeOpenDatabase(database.get());
+ DatabaseTracker::tracker().removeOpenDatabase(database.get());
+ return 0;
}
- DatabaseTracker::tracker().setDatabaseDetails(document->securityOrigin(), name, displayName, estimatedSize);
-
- document->setHasOpenDatabases();
+ DatabaseTracker::tracker().setDatabaseDetails(context->securityOrigin(), name, displayName, estimatedSize);
+ context->setHasOpenDatabases();
#if ENABLE(INSPECTOR)
- if (Page* page = document->frame()->page())
- page->inspectorController()->didOpenDatabase(database.get(), document->securityOrigin()->host(), name, expectedVersion);
+ if (context->isDocument()) {
+ Document* document = static_cast<Document*>(context);
+ if (Page* page = document->page())
+ page->inspectorController()->didOpenDatabase(database.get(), context->securityOrigin()->host(), name, expectedVersion);
+ }
#endif
return database;
}
-Database::Database(Document* document, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize)
+Database::Database(ScriptExecutionContext* context, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize)
: m_transactionInProgress(false)
, m_isTransactionQueueEnabled(true)
- , m_document(document)
+ , m_scriptExecutionContext(context)
, m_name(name.crossThreadString())
, m_guid(0)
, m_expectedVersion(expectedVersion.crossThreadString())
@@ -160,16 +176,15 @@ Database::Database(Document* document, const String& name, const String& expecte
, m_stopped(false)
, m_opened(false)
{
- ASSERT(document);
- m_mainThreadSecurityOrigin = document->securityOrigin();
+ ASSERT(m_scriptExecutionContext.get());
+ m_mainThreadSecurityOrigin = m_scriptExecutionContext->securityOrigin();
m_databaseThreadSecurityOrigin = m_mainThreadSecurityOrigin->threadsafeCopy();
-
if (m_name.isNull())
m_name = "";
ScriptController::initializeThreading();
- m_guid = guidForOriginAndName(m_mainThreadSecurityOrigin->toString(), name);
+ m_guid = guidForOriginAndName(securityOrigin()->toString(), name);
{
MutexLocker locker(guidMutex());
@@ -183,34 +198,40 @@ Database::Database(Document* document, const String& name, const String& expecte
hashSet->add(this);
}
- ASSERT(m_document->databaseThread());
-
- m_filename = DatabaseTracker::tracker().fullPathForDatabase(m_mainThreadSecurityOrigin.get(), m_name);
+ ASSERT(m_scriptExecutionContext->databaseThread());
+ m_filename = DatabaseTracker::tracker().fullPathForDatabase(securityOrigin(), m_name);
DatabaseTracker::tracker().addOpenDatabase(this);
- m_document->addOpenDatabase(this);
+ context->addOpenDatabase(this);
}
-static void derefDocument(void* document)
-{
- static_cast<Document*>(document)->deref();
-}
+class DerefContextTask : public ScriptExecutionContext::Task {
+public:
+ static PassOwnPtr<DerefContextTask> create()
+ {
+ return new DerefContextTask();
+ }
-Database::~Database()
-{
- if (m_document->databaseThread())
- m_document->databaseThread()->unscheduleDatabaseTasks(this);
+ virtual void performTask(ScriptExecutionContext* context)
+ {
+ context->deref();
+ }
- DatabaseTracker::tracker().removeOpenDatabase(this);
- m_document->removeOpenDatabase(this);
+ virtual bool isCleanupTask() const { return true; }
+};
- // Deref m_document on the main thread.
- callOnMainThread(derefDocument, m_document.release().releaseRef());
+Database::~Database()
+{
+ // The reference to the ScriptExecutionContext needs to be cleared on the JavaScript thread. If we're on that thread already, we can just let the RefPtr's destruction do the dereffing.
+ if (!m_scriptExecutionContext->isContextThread()) {
+ m_scriptExecutionContext->postTask(DerefContextTask::create());
+ m_scriptExecutionContext.release().releaseRef();
+ }
}
bool Database::openAndVerifyVersion(ExceptionCode& e)
{
- if (!m_document->databaseThread())
+ if (!m_scriptExecutionContext->databaseThread())
return false;
m_databaseAuthorizer = DatabaseAuthorizer::create();
@@ -218,7 +239,7 @@ bool Database::openAndVerifyVersion(ExceptionCode& e)
DatabaseTaskSynchronizer synchronizer;
OwnPtr<DatabaseOpenTask> task = DatabaseOpenTask::create(this, &synchronizer, e, success);
- m_document->databaseThread()->scheduleImmediateTask(task.release());
+ m_scriptExecutionContext->databaseThread()->scheduleImmediateTask(task.release());
synchronizer.waitForTaskCompletion();
return success;
@@ -313,49 +334,80 @@ bool Database::versionMatchesExpected() const
void Database::markAsDeletedAndClose()
{
- if (m_deleted || !m_document->databaseThread())
+ if (m_deleted || !m_scriptExecutionContext->databaseThread())
return;
LOG(StorageAPI, "Marking %s (%p) as deleted", stringIdentifier().ascii().data(), this);
m_deleted = true;
- if (m_document->databaseThread()->terminationRequested()) {
+ if (m_scriptExecutionContext->databaseThread()->terminationRequested()) {
LOG(StorageAPI, "Database handle %p is on a terminated DatabaseThread, cannot be marked for normal closure\n", this);
return;
}
- m_document->databaseThread()->unscheduleDatabaseTasks(this);
+ m_scriptExecutionContext->databaseThread()->unscheduleDatabaseTasks(this);
DatabaseTaskSynchronizer synchronizer;
OwnPtr<DatabaseCloseTask> task = DatabaseCloseTask::create(this, &synchronizer);
- m_document->databaseThread()->scheduleImmediateTask(task.release());
+ m_scriptExecutionContext->databaseThread()->scheduleImmediateTask(task.release());
synchronizer.waitForTaskCompletion();
}
+class ContextRemoveOpenDatabaseTask : public ScriptExecutionContext::Task {
+public:
+ static PassOwnPtr<ContextRemoveOpenDatabaseTask> create(PassRefPtr<Database> database)
+ {
+ return new ContextRemoveOpenDatabaseTask(database);
+ }
+
+ virtual void performTask(ScriptExecutionContext* context)
+ {
+ context->removeOpenDatabase(m_database.get());
+ DatabaseTracker::tracker().removeOpenDatabase(m_database.get());
+ }
+
+ virtual bool isCleanupTask() const { return true; }
+
+private:
+ ContextRemoveOpenDatabaseTask(PassRefPtr<Database> database)
+ : m_database(database)
+ {
+ }
+
+ RefPtr<Database> m_database;
+};
+
void Database::close()
{
- if (m_opened) {
- ASSERT(m_document->databaseThread());
- ASSERT(currentThread() == document()->databaseThread()->getThreadID());
- m_sqliteDatabase.close();
- m_document->databaseThread()->recordDatabaseClosed(this);
- m_opened = false;
-
- {
- MutexLocker locker(guidMutex());
-
- HashSet<Database*>* hashSet = guidToDatabaseMap().get(m_guid);
- ASSERT(hashSet);
- ASSERT(hashSet->contains(this));
- hashSet->remove(this);
- if (hashSet->isEmpty()) {
- guidToDatabaseMap().remove(m_guid);
- delete hashSet;
- guidToVersionMap().remove(m_guid);
- }
+ RefPtr<Database> protect = this;
+
+ if (!m_opened)
+ return;
+
+ ASSERT(m_scriptExecutionContext->databaseThread());
+ ASSERT(currentThread() == m_scriptExecutionContext->databaseThread()->getThreadID());
+ m_sqliteDatabase.close();
+ // Must ref() before calling databaseThread()->recordDatabaseClosed().
+ m_scriptExecutionContext->databaseThread()->recordDatabaseClosed(this);
+ m_opened = false;
+
+ {
+ MutexLocker locker(guidMutex());
+
+ HashSet<Database*>* hashSet = guidToDatabaseMap().get(m_guid);
+ ASSERT(hashSet);
+ ASSERT(hashSet->contains(this));
+ hashSet->remove(this);
+ if (hashSet->isEmpty()) {
+ guidToDatabaseMap().remove(m_guid);
+ delete hashSet;
+ guidToVersionMap().remove(m_guid);
}
}
+
+ m_scriptExecutionContext->databaseThread()->unscheduleDatabaseTasks(this);
+ m_scriptExecutionContext->postTask(ContextRemoveOpenDatabaseTask::create(this));
}
void Database::stop()
@@ -451,10 +503,6 @@ bool Database::performOpenAndVerify(ExceptionCode& e)
return false;
}
- m_opened = true;
- if (m_document->databaseThread())
- m_document->databaseThread()->recordDatabaseOpen(this);
-
ASSERT(m_databaseAuthorizer);
m_sqliteDatabase.setAuthorizer(m_databaseAuthorizer);
m_sqliteDatabase.setBusyTimeout(maxSqliteBusyWaitTime);
@@ -475,6 +523,8 @@ bool Database::performOpenAndVerify(ExceptionCode& e)
if (!m_sqliteDatabase.executeCommand("CREATE TABLE " + databaseInfoTableName() + " (key TEXT NOT NULL ON CONFLICT FAIL UNIQUE ON CONFLICT REPLACE,value TEXT NOT NULL ON CONFLICT FAIL);")) {
LOG_ERROR("Unable to create table %s in database %s", databaseInfoTableName().ascii().data(), databaseDebugName().ascii().data());
e = INVALID_STATE_ERR;
+ // Close the handle to the database file.
+ m_sqliteDatabase.close();
return false;
}
}
@@ -482,6 +532,8 @@ bool Database::performOpenAndVerify(ExceptionCode& e)
if (!getVersionFromDatabase(currentVersion)) {
LOG_ERROR("Failed to get current version from database %s", databaseDebugName().ascii().data());
e = INVALID_STATE_ERR;
+ // Close the handle to the database file.
+ m_sqliteDatabase.close();
return false;
}
if (currentVersion.length()) {
@@ -491,6 +543,8 @@ bool Database::performOpenAndVerify(ExceptionCode& e)
if (!setVersionInDatabase(m_expectedVersion)) {
LOG_ERROR("Failed to set version %s in database %s", m_expectedVersion.ascii().data(), databaseDebugName().ascii().data());
e = INVALID_STATE_ERR;
+ // Close the handle to the database file.
+ m_sqliteDatabase.close();
return false;
}
currentVersion = m_expectedVersion;
@@ -511,9 +565,17 @@ bool Database::performOpenAndVerify(ExceptionCode& e)
LOG(StorageAPI, "page expects version %s from database %s, which actually has version name %s - openDatabase() call will fail", m_expectedVersion.ascii().data(),
databaseDebugName().ascii().data(), currentVersion.ascii().data());
e = INVALID_STATE_ERR;
+ // Close the handle to the database file.
+ m_sqliteDatabase.close();
return false;
}
+ // All checks passed and we still have a handle to this database file.
+ // Make sure DatabaseThread closes it when DatabaseThread goes away.
+ m_opened = true;
+ if (m_scriptExecutionContext->databaseThread())
+ m_scriptExecutionContext->databaseThread()->recordDatabaseOpen(this);
+
return true;
}
@@ -546,32 +608,52 @@ void Database::scheduleTransaction()
m_transactionQueue.removeFirst();
}
- if (transaction && m_document->databaseThread()) {
+ if (transaction && m_scriptExecutionContext->databaseThread()) {
OwnPtr<DatabaseTransactionTask> task = DatabaseTransactionTask::create(transaction);
LOG(StorageAPI, "Scheduling DatabaseTransactionTask %p for transaction %p\n", task.get(), task->transaction());
m_transactionInProgress = true;
- m_document->databaseThread()->scheduleTask(task.release());
+ m_scriptExecutionContext->databaseThread()->scheduleTask(task.release());
} else
m_transactionInProgress = false;
}
void Database::scheduleTransactionStep(SQLTransaction* transaction, bool immediately)
{
- if (!m_document->databaseThread())
+ if (!m_scriptExecutionContext->databaseThread())
return;
OwnPtr<DatabaseTransactionTask> task = DatabaseTransactionTask::create(transaction);
LOG(StorageAPI, "Scheduling DatabaseTransactionTask %p for the transaction step\n", task.get());
if (immediately)
- m_document->databaseThread()->scheduleImmediateTask(task.release());
+ m_scriptExecutionContext->databaseThread()->scheduleImmediateTask(task.release());
else
- m_document->databaseThread()->scheduleTask(task.release());
+ m_scriptExecutionContext->databaseThread()->scheduleTask(task.release());
}
+class DeliverPendingCallbackTask : public ScriptExecutionContext::Task {
+public:
+ static PassOwnPtr<DeliverPendingCallbackTask> create(PassRefPtr<SQLTransaction> transaction)
+ {
+ return new DeliverPendingCallbackTask(transaction);
+ }
+
+ virtual void performTask(ScriptExecutionContext*)
+ {
+ m_transaction->performPendingCallback();
+ }
+
+private:
+ DeliverPendingCallbackTask(PassRefPtr<SQLTransaction> transaction)
+ : m_transaction(transaction)
+ {
+ }
+
+ RefPtr<SQLTransaction> m_transaction;
+};
+
void Database::scheduleTransactionCallback(SQLTransaction* transaction)
{
- transaction->ref();
- callOnMainThread(deliverPendingCallback, transaction);
+ m_scriptExecutionContext->postTask(DeliverPendingCallbackTask::create(transaction));
}
Vector<String> Database::performGetTableNames()
@@ -605,12 +687,12 @@ Vector<String> Database::performGetTableNames()
SQLTransactionClient* Database::transactionClient() const
{
- return m_document->databaseThread()->transactionClient();
+ return m_scriptExecutionContext->databaseThread()->transactionClient();
}
SQLTransactionCoordinator* Database::transactionCoordinator() const
{
- return m_document->databaseThread()->transactionCoordinator();
+ return m_scriptExecutionContext->databaseThread()->transactionCoordinator();
}
String Database::version() const
@@ -621,25 +703,18 @@ String Database::version() const
return guidToVersionMap().get(m_guid).threadsafeCopy();
}
-void Database::deliverPendingCallback(void* context)
-{
- SQLTransaction* transaction = static_cast<SQLTransaction*>(context);
- transaction->performPendingCallback();
- transaction->deref(); // Was ref'd in scheduleTransactionCallback().
-}
-
Vector<String> Database::tableNames()
{
// FIXME: Not using threadsafeCopy on these strings looks ok since threads take strict turns
// in dealing with them. However, if the code changes, this may not be true anymore.
Vector<String> result;
- if (!m_document->databaseThread())
+ if (!m_scriptExecutionContext->databaseThread())
return result;
DatabaseTaskSynchronizer synchronizer;
OwnPtr<DatabaseTableNamesTask> task = DatabaseTableNamesTask::create(this, &synchronizer, result);
- m_document->databaseThread()->scheduleImmediateTask(task.release());
+ m_scriptExecutionContext->databaseThread()->scheduleImmediateTask(task.release());
synchronizer.waitForTaskCompletion();
return result;
@@ -655,9 +730,9 @@ void Database::setExpectedVersion(const String& version)
SecurityOrigin* Database::securityOrigin() const
{
- if (isMainThread())
+ if (scriptExecutionContext()->isContextThread())
return m_mainThreadSecurityOrigin.get();
- if (currentThread() == document()->databaseThread()->getThreadID())
+ if (currentThread() == m_scriptExecutionContext->databaseThread()->getThreadID())
return m_databaseThreadSecurityOrigin.get();
return 0;
}
@@ -685,6 +760,6 @@ String Database::fileName() const
return m_filename.threadsafeCopy();
}
-#endif
+#endif // ENABLE(DATABASE)
-}
+} // namespace WebCore
diff --git a/WebCore/storage/Database.h b/WebCore/storage/Database.h
index 61c9b66..0d7f33c 100644
--- a/WebCore/storage/Database.h
+++ b/WebCore/storage/Database.h
@@ -52,7 +52,7 @@ namespace WebCore {
class DatabaseAuthorizer;
class DatabaseThread;
-class Document;
+class ScriptExecutionContext;
class SQLResultSet;
class SQLTransactionCallback;
class SQLTransactionClient;
@@ -67,10 +67,13 @@ class Database : public ThreadSafeShared<Database> {
friend class SQLStatement;
friend class SQLTransaction;
public:
+ static void setIsAvailable(bool);
+ static bool isAvailable();
+
~Database();
// Direct support for the DOM API
- static PassRefPtr<Database> openDatabase(Document* document, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize, ExceptionCode&);
+ static PassRefPtr<Database> openDatabase(ScriptExecutionContext* context, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize, ExceptionCode&);
String version() const;
void changeVersion(const String& oldVersion, const String& newVersion,
PassRefPtr<SQLTransactionCallback> callback, PassRefPtr<SQLTransactionErrorCallback> errorCallback,
@@ -87,7 +90,7 @@ public:
Vector<String> tableNames();
- Document* document() const { return m_document.get(); }
+ ScriptExecutionContext* scriptExecutionContext() const { return m_scriptExecutionContext.get(); }
SecurityOrigin* securityOrigin() const;
String stringIdentifier() const;
String displayName() const;
@@ -123,8 +126,9 @@ public:
SQLTransactionCoordinator* transactionCoordinator() const;
private:
- Database(Document* document, const String& name, const String& expectedVersion,
- const String& displayName, unsigned long estimatedSize);
+ Database(ScriptExecutionContext* context, const String& name,
+ const String& expectedVersion, const String& displayName,
+ unsigned long estimatedSize);
bool openAndVerifyVersion(ExceptionCode&);
@@ -139,7 +143,7 @@ private:
static void deliverPendingCallback(void*);
- RefPtr<Document> m_document;
+ RefPtr<ScriptExecutionContext> m_scriptExecutionContext;
RefPtr<SecurityOrigin> m_mainThreadSecurityOrigin;
RefPtr<SecurityOrigin> m_databaseThreadSecurityOrigin;
String m_name;
diff --git a/WebCore/storage/Database.idl b/WebCore/storage/Database.idl
index 6ca9c95..c8a537c 100644
--- a/WebCore/storage/Database.idl
+++ b/WebCore/storage/Database.idl
@@ -29,7 +29,8 @@
module storage {
interface [
- Conditional=DATABASE
+ Conditional=DATABASE,
+ OmitConstructor
] Database {
readonly attribute DOMString version;
[Custom] void changeVersion(in DOMString oldVersion, in DOMString newVersion, in SQLTransactionCallback callback, in SQLTransactionErrorCallback errorCallback, in VoidCallback successCallback);
diff --git a/WebCore/storage/DatabaseAuthorizer.cpp b/WebCore/storage/DatabaseAuthorizer.cpp
index 93f9106..d87d4d9 100644
--- a/WebCore/storage/DatabaseAuthorizer.cpp
+++ b/WebCore/storage/DatabaseAuthorizer.cpp
@@ -38,6 +38,7 @@ DatabaseAuthorizer::DatabaseAuthorizer()
: m_securityEnabled(false)
{
reset();
+ addWhitelistedFunctions();
}
void DatabaseAuthorizer::reset()
@@ -47,6 +48,69 @@ void DatabaseAuthorizer::reset()
m_readOnly = false;
}
+void DatabaseAuthorizer::addWhitelistedFunctions()
+{
+ // SQLite functions used to help implement some operations
+ // ALTER TABLE helpers
+ m_whitelistedFunctions.add("sqlite_rename_table");
+ m_whitelistedFunctions.add("sqlite_rename_trigger");
+ // GLOB helpers
+ m_whitelistedFunctions.add("glob");
+
+ // SQLite core functions
+ m_whitelistedFunctions.add("abs");
+ m_whitelistedFunctions.add("changes");
+ m_whitelistedFunctions.add("coalesce");
+ m_whitelistedFunctions.add("glob");
+ m_whitelistedFunctions.add("ifnull");
+ m_whitelistedFunctions.add("hex");
+ m_whitelistedFunctions.add("last_insert_rowid");
+ m_whitelistedFunctions.add("length");
+ m_whitelistedFunctions.add("like");
+ m_whitelistedFunctions.add("lower");
+ m_whitelistedFunctions.add("ltrim");
+ m_whitelistedFunctions.add("max");
+ m_whitelistedFunctions.add("min");
+ m_whitelistedFunctions.add("nullif");
+ m_whitelistedFunctions.add("quote");
+ m_whitelistedFunctions.add("replace");
+ m_whitelistedFunctions.add("round");
+ m_whitelistedFunctions.add("rtrim");
+ m_whitelistedFunctions.add("soundex");
+ m_whitelistedFunctions.add("sqlite_source_id");
+ m_whitelistedFunctions.add("sqlite_version");
+ m_whitelistedFunctions.add("substr");
+ m_whitelistedFunctions.add("total_changes");
+ m_whitelistedFunctions.add("trim");
+ m_whitelistedFunctions.add("typeof");
+ m_whitelistedFunctions.add("upper");
+ m_whitelistedFunctions.add("zeroblob");
+
+ // SQLite date and time functions
+ m_whitelistedFunctions.add("date");
+ m_whitelistedFunctions.add("time");
+ m_whitelistedFunctions.add("datetime");
+ m_whitelistedFunctions.add("julianday");
+ m_whitelistedFunctions.add("strftime");
+
+ // SQLite aggregate functions
+ // max() and min() are already in the list
+ m_whitelistedFunctions.add("avg");
+ m_whitelistedFunctions.add("count");
+ m_whitelistedFunctions.add("group_concat");
+ m_whitelistedFunctions.add("sum");
+ m_whitelistedFunctions.add("total");
+
+ // SQLite FTS functions
+ m_whitelistedFunctions.add("snippet");
+ m_whitelistedFunctions.add("offsets");
+ m_whitelistedFunctions.add("optimize");
+
+ // SQLite ICU functions
+ // like(), lower() and upper() are already in the list
+ m_whitelistedFunctions.add("regexp");
+}
+
int DatabaseAuthorizer::createTable(const String& tableName)
{
if (m_readOnly && m_securityEnabled)
@@ -278,11 +342,11 @@ int DatabaseAuthorizer::allowDetach(const String&)
return m_securityEnabled ? SQLAuthDeny : SQLAuthAllow;
}
-int DatabaseAuthorizer::allowFunction(const String&)
+int DatabaseAuthorizer::allowFunction(const String& functionName)
{
- // FIXME: Are there any of these we need to prevent? One might guess current_date, current_time, current_timestamp because
- // they would violate the "sandbox environment" part of 4.11.3, but scripts can generate the local client side information via
- // javascript directly, anyways. Are there any other built-ins we need to be worried about?
+ if (m_securityEnabled && !m_whitelistedFunctions.contains(functionName))
+ return SQLAuthDeny;
+
return SQLAuthAllow;
}
diff --git a/WebCore/storage/DatabaseAuthorizer.h b/WebCore/storage/DatabaseAuthorizer.h
index 248b659..037409e 100644
--- a/WebCore/storage/DatabaseAuthorizer.h
+++ b/WebCore/storage/DatabaseAuthorizer.h
@@ -28,6 +28,8 @@
#ifndef DatabaseAuthorizer_h
#define DatabaseAuthorizer_h
+#include "StringHash.h"
+#include <wtf/HashSet.h>
#include <wtf/PassRefPtr.h>
#include <wtf/Threading.h>
@@ -94,12 +96,15 @@ public:
private:
DatabaseAuthorizer();
+ void addWhitelistedFunctions();
int denyBasedOnTableName(const String&);
bool m_securityEnabled : 1;
bool m_lastActionWasInsert : 1;
bool m_lastActionChangedDatabase : 1;
bool m_readOnly : 1;
+
+ HashSet<String, CaseFoldingHash> m_whitelistedFunctions;
};
} // namespace WebCore
diff --git a/WebCore/storage/DatabaseTask.h b/WebCore/storage/DatabaseTask.h
index 97a23c7..998e373 100644
--- a/WebCore/storage/DatabaseTask.h
+++ b/WebCore/storage/DatabaseTask.h
@@ -50,16 +50,15 @@ class VersionChangeCallback;
// Can be used to wait until DatabaseTask is completed.
// Has to be passed into DatabaseTask::create to be associated with the task.
class DatabaseTaskSynchronizer : public Noncopyable {
- friend class DatabaseTask;
public:
DatabaseTaskSynchronizer();
// Called from main thread to wait until task is completed.
void waitForTaskCompletion();
-private:
// Called by the task.
void taskCompleted();
+private:
bool m_taskCompleted;
Mutex m_synchronousMutex;
diff --git a/WebCore/storage/DatabaseThread.cpp b/WebCore/storage/DatabaseThread.cpp
index 12e9251..ec4c6d1 100644
--- a/WebCore/storage/DatabaseThread.cpp
+++ b/WebCore/storage/DatabaseThread.cpp
@@ -44,6 +44,7 @@ DatabaseThread::DatabaseThread()
: m_threadID(0)
, m_transactionClient(new SQLTransactionClient())
, m_transactionCoordinator(new SQLTransactionCoordinator())
+ , m_cleanupSync(0)
{
m_selfRef = this;
}
@@ -51,6 +52,7 @@ DatabaseThread::DatabaseThread()
DatabaseThread::~DatabaseThread()
{
// FIXME: Any cleanup required here? Since the thread deletes itself after running its detached course, I don't think so. Lets be sure.
+ ASSERT(terminationRequested());
}
bool DatabaseThread::start()
@@ -65,8 +67,10 @@ bool DatabaseThread::start()
return m_threadID;
}
-void DatabaseThread::requestTermination()
+void DatabaseThread::requestTermination(DatabaseTaskSynchronizer *cleanupSync)
{
+ ASSERT(!m_cleanupSync);
+ m_cleanupSync = cleanupSync;
LOG(StorageAPI, "DatabaseThread %p was asked to terminate\n", this);
m_queue.kill();
}
@@ -115,9 +119,14 @@ void* DatabaseThread::databaseThread()
// Detach the thread so its resources are no longer of any concern to anyone else
detachThread(m_threadID);
+ DatabaseTaskSynchronizer* cleanupSync = m_cleanupSync;
+
// Clear the self refptr, possibly resulting in deletion
m_selfRef = 0;
+ if (cleanupSync) // Someone wanted to know when we were done cleaning up.
+ cleanupSync->taskCompleted();
+
return 0;
}
@@ -162,6 +171,5 @@ void DatabaseThread::unscheduleDatabaseTasks(Database* database)
SameDatabasePredicate predicate(database);
m_queue.removeIf(predicate);
}
-
} // namespace WebCore
#endif
diff --git a/WebCore/storage/DatabaseThread.h b/WebCore/storage/DatabaseThread.h
index 269a633..3702619 100644
--- a/WebCore/storage/DatabaseThread.h
+++ b/WebCore/storage/DatabaseThread.h
@@ -43,6 +43,7 @@ namespace WebCore {
class Database;
class DatabaseTask;
+class DatabaseTaskSynchronizer;
class Document;
class SQLTransactionClient;
class SQLTransactionCoordinator;
@@ -53,7 +54,7 @@ public:
~DatabaseThread();
bool start();
- void requestTermination();
+ void requestTermination(DatabaseTaskSynchronizer* cleanupSync);
bool terminationRequested() const;
void scheduleTask(PassOwnPtr<DatabaseTask>);
@@ -85,6 +86,7 @@ private:
OwnPtr<SQLTransactionClient> m_transactionClient;
OwnPtr<SQLTransactionCoordinator> m_transactionCoordinator;
+ DatabaseTaskSynchronizer* m_cleanupSync;
};
} // namespace WebCore
diff --git a/WebCore/storage/DatabaseTracker.cpp b/WebCore/storage/DatabaseTracker.cpp
index c0c4242..bed83a7 100644
--- a/WebCore/storage/DatabaseTracker.cpp
+++ b/WebCore/storage/DatabaseTracker.cpp
@@ -31,14 +31,15 @@
#if ENABLE(DATABASE)
+#include "Chrome.h"
#include "ChromeClient.h"
#include "Database.h"
#include "DatabaseThread.h"
#include "DatabaseTrackerClient.h"
-#include "Document.h"
#include "Logging.h"
#include "OriginQuotaManager.h"
#include "Page.h"
+#include "ScriptExecutionContext.h"
#include "SecurityOrigin.h"
#include "SecurityOriginHash.h"
#include "SQLiteFileSystem.h"
@@ -119,7 +120,7 @@ void DatabaseTracker::openTrackerDatabase(bool createIfDoesNotExist)
}
}
-bool DatabaseTracker::canEstablishDatabase(Document* document, const String& name, const String& displayName, unsigned long estimatedSize)
+bool DatabaseTracker::canEstablishDatabase(ScriptExecutionContext* context, const String& name, const String& displayName, unsigned long estimatedSize)
{
ASSERT(currentThread() == m_thread);
@@ -127,9 +128,9 @@ bool DatabaseTracker::canEstablishDatabase(Document* document, const String& nam
// can run on the database thread later.
populateOrigins();
- SecurityOrigin* origin = document->securityOrigin();
+ SecurityOrigin* origin = context->securityOrigin();
- // Since we're imminently opening a database within this Document's origin, make sure this origin is being tracked by the QuotaTracker
+ // Since we're imminently opening a database within this context's origin, make sure this origin is being tracked by the QuotaTracker
// by fetching it's current usage now
unsigned long long usage = usageForOrigin(origin);
@@ -146,12 +147,9 @@ bool DatabaseTracker::canEstablishDatabase(Document* document, const String& nam
// Give the chrome client a chance to increase the quota.
// Temporarily make the details of the proposed database available, so the client can get at them.
- Page* page = document->page();
- if (!page)
- return false;
pair<SecurityOrigin*, DatabaseDetails> details(origin, DatabaseDetails(name, displayName, estimatedSize, 0));
m_proposedDatabase = &details;
- page->chrome()->client()->exceededDatabaseQuota(document->frame(), name);
+ context->databaseExceededQuota(name);
m_proposedDatabase = 0;
// If the database will fit now, allow its creation.
@@ -185,7 +183,7 @@ bool DatabaseTracker::hasEntryForDatabase(SecurityOrigin* origin, const String&
unsigned long long DatabaseTracker::getMaxSizeForDatabase(const Database* database)
{
- ASSERT(currentThread() == database->document()->databaseThread()->getThreadID());
+ ASSERT(currentThread() == database->scriptExecutionContext()->databaseThread()->getThreadID());
// The maximum size for a database is the full quota for its origin, minus the current usage within the origin,
// plus the current usage of the given database
Locker<OriginQuotaManager> locker(originQuotaManager());
diff --git a/WebCore/storage/DatabaseTracker.h b/WebCore/storage/DatabaseTracker.h
index c87b26a..38a3418 100644
--- a/WebCore/storage/DatabaseTracker.h
+++ b/WebCore/storage/DatabaseTracker.h
@@ -37,6 +37,7 @@
#include "DatabaseDetails.h"
#include "SQLiteDatabase.h"
#include "StringHash.h"
+#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
#include <wtf/OwnPtr.h>
#endif // !PLATFORM(CHROMIUM)
@@ -44,7 +45,7 @@
namespace WebCore {
class Database;
-class Document;
+class ScriptExecutionContext;
class SecurityOrigin;
#if !PLATFORM(CHROMIUM)
@@ -58,8 +59,11 @@ struct SecurityOriginTraits;
class DatabaseTracker : public Noncopyable {
public:
static DatabaseTracker& tracker();
+ // FIXME: Due to workers having multiple threads in a single process sharing
+ // a DatabaseTracker, this singleton will have to be synchronized or moved
+ // to TLS.
- bool canEstablishDatabase(Document*, const String& name, const String& displayName, unsigned long estimatedSize);
+ bool canEstablishDatabase(ScriptExecutionContext*, const String& name, const String& displayName, unsigned long estimatedSize);
void setDatabaseDetails(SecurityOrigin*, const String& name, const String& displayName, unsigned long estimatedSize);
String fullPathForDatabase(SecurityOrigin*, const String& name, bool createIfDoesNotExist = true);
diff --git a/WebCore/storage/IDBDatabaseError.h b/WebCore/storage/IDBDatabaseError.h
new file mode 100644
index 0000000..e8fd2dd
--- /dev/null
+++ b/WebCore/storage/IDBDatabaseError.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 IDBDatabaseError_h
+#define IDBDatabaseError_h
+
+#include "PlatformString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class IDBDatabaseError : public RefCounted<IDBDatabaseError> {
+public:
+ static PassRefPtr<IDBDatabaseError> create()
+ {
+ return adoptRef(new IDBDatabaseError());
+ }
+ ~IDBDatabaseError() { }
+
+ unsigned short code() const { return m_code; }
+ void setCode(unsigned short value) { m_code = value; }
+ String message() const { return m_message; }
+ void setMessage(const String& value) { m_message = value; }
+
+private:
+ IDBDatabaseError() { }
+
+ unsigned short m_code;
+ String m_message;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // IDBDatabaseError_h
+
diff --git a/WebCore/storage/IDBDatabaseError.idl b/WebCore/storage/IDBDatabaseError.idl
new file mode 100644
index 0000000..6c6019c
--- /dev/null
+++ b/WebCore/storage/IDBDatabaseError.idl
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+module storage {
+
+ interface [
+ Conditional=INDEXED_DATABASE
+ ] IDBDatabaseError {
+ attribute unsigned short code;
+ attribute DOMString message;
+ };
+
+}
diff --git a/WebCore/storage/IDBDatabaseException.h b/WebCore/storage/IDBDatabaseException.h
new file mode 100644
index 0000000..d94a7f9
--- /dev/null
+++ b/WebCore/storage/IDBDatabaseException.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 IDBDatabaseException_h
+#define IDBDatabaseException_h
+
+#include "PlatformString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class IDBDatabaseException : public RefCounted<IDBDatabaseException> {
+public:
+ static PassRefPtr<IDBDatabaseException> create()
+ {
+ return adoptRef(new IDBDatabaseException());
+ }
+ ~IDBDatabaseException() { }
+
+ unsigned short code() const { return m_code; }
+ void setCode(unsigned short value) { m_code = value; }
+ String message() const { return m_message; }
+ void setMessage(const String& value) { m_message = value; }
+
+private:
+ IDBDatabaseException() { }
+
+ unsigned short m_code;
+ String m_message;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // IDBDatabaseException_h
+
diff --git a/WebCore/storage/IDBDatabaseException.idl b/WebCore/storage/IDBDatabaseException.idl
new file mode 100644
index 0000000..898e5f9
--- /dev/null
+++ b/WebCore/storage/IDBDatabaseException.idl
@@ -0,0 +1,48 @@
+/*
+ * 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.
+ */
+module storage {
+
+ interface [
+ Conditional=INDEXED_DATABASE
+ ] IDBDatabaseException {
+ const unsigned short UNKNOWN_ERR = 0;
+ const unsigned short NON_TRANSIENT_ERR = 1;
+ const unsigned short NOT_FOUND_ERR = 2;
+ const unsigned short CONSTRAINT_ERR = 3;
+ const unsigned short DATA_ERR = 4;
+ const unsigned short NOT_ALLOWED_ERR = 5;
+ const unsigned short SERIAL_ERR = 11;
+ const unsigned short RECOVERABLE_ERR = 21;
+ const unsigned short TRANSIENT_ERR = 31;
+ const unsigned short TIMEOUT_ERR = 32;
+ const unsigned short DEADLOCK_ERR = 33;
+ attribute unsigned short code;
+ attribute DOMString message;
+ };
+
+}
diff --git a/WebCore/storage/IDBRequest.cpp b/WebCore/storage/IDBRequest.cpp
new file mode 100644
index 0000000..1a20499
--- /dev/null
+++ b/WebCore/storage/IDBRequest.cpp
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "config.h"
+#include "IDBRequest.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "IDBDatabaseError.h"
+#include "SerializedScriptValue.h"
+
+namespace WebCore {
+
+IDBRequest::IDBRequest(ScriptExecutionContext* context)
+ : ActiveDOMObject(context, this)
+{
+}
+
+IDBRequest::~IDBRequest()
+{
+}
+
+void IDBRequest::abort()
+{
+}
+
+EventTargetData* IDBRequest::eventTargetData()
+{
+ return 0;
+}
+
+EventTargetData* IDBRequest::ensureEventTargetData()
+{
+ return 0;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
diff --git a/WebCore/storage/IDBRequest.h b/WebCore/storage/IDBRequest.h
new file mode 100644
index 0000000..5f00aa8
--- /dev/null
+++ b/WebCore/storage/IDBRequest.h
@@ -0,0 +1,88 @@
+/*
+ * 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 IDBRequest_h
+#define IDBRequest_h
+
+#include "ActiveDOMObject.h"
+#include "EventTarget.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class IDBDatabaseError;
+class SerializedScriptValue;
+
+class IDBRequest : public RefCounted<IDBRequest>, public ActiveDOMObject, public EventTarget {
+public:
+ static PassRefPtr<IDBRequest> create(ScriptExecutionContext* context)
+ {
+ return adoptRef(new IDBRequest(context));
+ }
+ ~IDBRequest();
+
+ void abort();
+ unsigned short readyState() const { return m_readyState; }
+ IDBDatabaseError* error() const { return m_error.get(); }
+ SerializedScriptValue* result() const { return m_result.get(); }
+
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(success);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
+
+ using RefCounted<IDBRequest>::ref;
+ using RefCounted<IDBRequest>::deref;
+
+ // EventTarget interface
+ virtual ScriptExecutionContext* scriptExecutionContext() const { return ActiveDOMObject::scriptExecutionContext(); }
+ virtual IDBRequest* toIDBRequest() { return this; }
+
+private:
+ explicit IDBRequest(ScriptExecutionContext* context);
+
+ // EventTarget interface
+ virtual void refEventTarget() { ref(); }
+ virtual void derefEventTarget() { deref(); }
+ virtual EventTargetData* eventTargetData();
+ virtual EventTargetData* ensureEventTargetData();
+
+ unsigned short m_readyState;
+ RefPtr<IDBDatabaseError> m_error;
+ RefPtr<SerializedScriptValue> m_result;
+
+ EventTargetData m_eventTargetData;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // IDBRequest_h
+
diff --git a/WebCore/storage/IDBRequest.idl b/WebCore/storage/IDBRequest.idl
new file mode 100644
index 0000000..b34184c
--- /dev/null
+++ b/WebCore/storage/IDBRequest.idl
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ */
+module storage {
+
+ interface [
+ Conditional=INDEXED_DATABASE,
+ EventTarget
+ ] IDBRequest {
+ void abort();
+ const unsigned short INITIAL = 0;
+ const unsigned short LOADING = 1;
+ const unsigned short DONE = 2;
+ readonly attribute unsigned short readyState;
+ readonly attribute IDBDatabaseError error;
+ readonly attribute [CustomGetter] any result;
+ attribute EventListener onsuccess;
+ attribute EventListener onerror;
+ };
+
+}
diff --git a/WebCore/storage/IndexedDatabaseRequest.cpp b/WebCore/storage/IndexedDatabaseRequest.cpp
new file mode 100644
index 0000000..827493b
--- /dev/null
+++ b/WebCore/storage/IndexedDatabaseRequest.cpp
@@ -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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "config.h"
+#include "IndexedDatabaseRequest.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "ExceptionCode.h"
+#include "IDBRequest.h"
+
+namespace WebCore {
+
+IndexedDatabaseRequest::IndexedDatabaseRequest()
+{
+}
+
+IndexedDatabaseRequest::~IndexedDatabaseRequest()
+{
+}
+
+void IndexedDatabaseRequest::open(const String& name, const String& description, bool modifyDatabase, ExceptionCode& exception)
+{
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
diff --git a/WebCore/storage/IndexedDatabaseRequest.h b/WebCore/storage/IndexedDatabaseRequest.h
new file mode 100644
index 0000000..74aada3
--- /dev/null
+++ b/WebCore/storage/IndexedDatabaseRequest.h
@@ -0,0 +1,65 @@
+/*
+ * 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 IndexedDatabaseRequest_h
+#define IndexedDatabaseRequest_h
+
+#include "ExceptionCode.h"
+#include "PlatformString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class IDBRequest;
+
+class IndexedDatabaseRequest : public RefCounted<IndexedDatabaseRequest> {
+public:
+ static PassRefPtr<IndexedDatabaseRequest> create()
+ {
+ return adoptRef(new IndexedDatabaseRequest());
+ }
+ ~IndexedDatabaseRequest();
+
+ IDBRequest* request() const { return m_request.get(); }
+ void open(const String& name, const String& description, bool modifyDatabase, ExceptionCode&);
+
+private:
+ IndexedDatabaseRequest();
+
+ PassRefPtr<IDBRequest> m_request;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // IndexedDatabaseRequest_h
+
diff --git a/WebCore/storage/IndexedDatabaseRequest.idl b/WebCore/storage/IndexedDatabaseRequest.idl
new file mode 100644
index 0000000..b1fc7da
--- /dev/null
+++ b/WebCore/storage/IndexedDatabaseRequest.idl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 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.
+ */
+module storage {
+
+ interface [
+ Conditional=INDEXED_DATABASE
+ ] IndexedDatabaseRequest {
+ readonly attribute IDBRequest request;
+ [Custom] void open(in DOMString name, in DOMString description, in optional boolean modifyDatabase)
+ raises(IDBDatabaseException);
+ };
+
+}
diff --git a/WebCore/storage/SQLError.idl b/WebCore/storage/SQLError.idl
index d889c5b..503fe6f 100644
--- a/WebCore/storage/SQLError.idl
+++ b/WebCore/storage/SQLError.idl
@@ -29,7 +29,8 @@
module storage {
interface [
- Conditional=DATABASE
+ Conditional=DATABASE,
+ OmitConstructor
] SQLError {
readonly attribute unsigned long code;
readonly attribute DOMString message;
diff --git a/WebCore/storage/SQLResultSet.idl b/WebCore/storage/SQLResultSet.idl
index 1db07cd..c98fff6 100644
--- a/WebCore/storage/SQLResultSet.idl
+++ b/WebCore/storage/SQLResultSet.idl
@@ -29,7 +29,8 @@
module storage {
interface [
- Conditional=DATABASE
+ Conditional=DATABASE,
+ OmitConstructor
] SQLResultSet {
readonly attribute SQLResultSetRowList rows;
diff --git a/WebCore/storage/SQLResultSetRowList.idl b/WebCore/storage/SQLResultSetRowList.idl
index 6a477e9..7ae7a9c 100644
--- a/WebCore/storage/SQLResultSetRowList.idl
+++ b/WebCore/storage/SQLResultSetRowList.idl
@@ -29,7 +29,8 @@
module storage {
interface [
- Conditional=DATABASE
+ Conditional=DATABASE,
+ OmitConstructor
] SQLResultSetRowList {
readonly attribute unsigned long length;
[Custom] DOMObject item(in unsigned long index);
diff --git a/WebCore/storage/SQLTransaction.cpp b/WebCore/storage/SQLTransaction.cpp
index 165685b..de615ca 100644
--- a/WebCore/storage/SQLTransaction.cpp
+++ b/WebCore/storage/SQLTransaction.cpp
@@ -35,11 +35,11 @@
#include "Database.h"
#include "DatabaseAuthorizer.h"
#include "DatabaseDetails.h"
-#include "Document.h"
#include "ExceptionCode.h"
#include "Logging.h"
#include "Page.h"
#include "PlatformString.h"
+#include "ScriptExecutionContext.h"
#include "Settings.h"
#include "SQLError.h"
#include "SQLiteTransaction.h"
@@ -94,8 +94,7 @@ void SQLTransaction::executeSQL(const String& sqlStatement, const Vector<SQLValu
bool readOnlyMode = m_readOnly;
if (!readOnlyMode) {
- Page* page = m_database->document()->page();
- if (!page || page->settings()->privateBrowsingEnabled())
+ if (m_database->scriptExecutionContext()->isDatabaseReadOnly())
readOnlyMode = true;
}
diff --git a/WebCore/storage/SQLTransaction.idl b/WebCore/storage/SQLTransaction.idl
index 5d4885c..7d694e8 100644
--- a/WebCore/storage/SQLTransaction.idl
+++ b/WebCore/storage/SQLTransaction.idl
@@ -29,7 +29,8 @@
module storage {
interface [
- Conditional=DATABASE
+ Conditional=DATABASE,
+ OmitConstructor
] SQLTransaction {
[Custom] void executeSql(in DOMString sqlStatement, in ObjectArray arguments, in SQLStatementCallback callback, in SQLStatementErrorCallback errorCallback);
};
diff --git a/WebCore/storage/SQLTransactionClient.cpp b/WebCore/storage/SQLTransactionClient.cpp
index 5918bd8..6064c99 100644
--- a/WebCore/storage/SQLTransactionClient.cpp
+++ b/WebCore/storage/SQLTransactionClient.cpp
@@ -31,6 +31,9 @@
#include "config.h"
#include "SQLTransactionClient.h"
+#if ENABLE(DATABASE)
+
+#include "Chrome.h"
#include "ChromeClient.h"
#include "Database.h"
#include "DatabaseThread.h"
@@ -44,7 +47,7 @@ namespace WebCore {
void SQLTransactionClient::didCommitTransaction(SQLTransaction* transaction)
{
- ASSERT(currentThread() == transaction->database()->document()->databaseThread()->getThreadID());
+ ASSERT(currentThread() == transaction->database()->scriptExecutionContext()->databaseThread()->getThreadID());
Database* database = transaction->database();
DatabaseTracker::tracker().scheduleNotifyDatabaseChanged(
database->securityOrigin(), database->stringIdentifier());
@@ -52,7 +55,7 @@ void SQLTransactionClient::didCommitTransaction(SQLTransaction* transaction)
void SQLTransactionClient::didExecuteStatement(SQLTransaction* transaction)
{
- ASSERT(currentThread() == transaction->database()->document()->databaseThread()->getThreadID());
+ ASSERT(currentThread() == transaction->database()->scriptExecutionContext()->databaseThread()->getThreadID());
OriginQuotaManager& manager(DatabaseTracker::tracker().originQuotaManager());
Locker<OriginQuotaManager> locker(manager);
manager.markDatabase(transaction->database());
@@ -60,15 +63,15 @@ void SQLTransactionClient::didExecuteStatement(SQLTransaction* transaction)
bool SQLTransactionClient::didExceedQuota(SQLTransaction* transaction)
{
- ASSERT(isMainThread());
+ ASSERT(transaction->database()->scriptExecutionContext()->isContextThread());
Database* database = transaction->database();
- Page* page = database->document()->page();
- ASSERT(page);
unsigned long long currentQuota = DatabaseTracker::tracker().quotaForOrigin(database->securityOrigin());
- page->chrome()->client()->exceededDatabaseQuota(database->document()->frame(), database->stringIdentifier());
+ database->scriptExecutionContext()->databaseExceededQuota(database->stringIdentifier());
unsigned long long newQuota = DatabaseTracker::tracker().quotaForOrigin(database->securityOrigin());
return (newQuota > currentQuota);
}
}
+
+#endif // ENABLE(DATABASE)
diff --git a/WebCore/storage/SQLTransactionClient.h b/WebCore/storage/SQLTransactionClient.h
index e822594..801647b 100644
--- a/WebCore/storage/SQLTransactionClient.h
+++ b/WebCore/storage/SQLTransactionClient.h
@@ -31,6 +31,8 @@
#ifndef SQLTransactionClient_h
#define SQLTransactionClient_h
+#if ENABLE(DATABASE)
+
#include <wtf/Noncopyable.h>
namespace WebCore {
@@ -47,4 +49,6 @@ namespace WebCore {
};
}
+#endif // ENABLE(DATABASE)
+
#endif // SQLTransactionClient_h
diff --git a/WebCore/storage/SQLTransactionCoordinator.cpp b/WebCore/storage/SQLTransactionCoordinator.cpp
index 30b0c4a..efdcd1d 100644
--- a/WebCore/storage/SQLTransactionCoordinator.cpp
+++ b/WebCore/storage/SQLTransactionCoordinator.cpp
@@ -31,6 +31,8 @@
#include "config.h"
#include "SQLTransactionCoordinator.h"
+#if ENABLE(DATABASE)
+
#include "CString.h"
#include "Database.h"
#include "SQLTransaction.h"
@@ -111,4 +113,6 @@ void SQLTransactionCoordinator::shutdown()
m_coordinationInfoMap.clear();
}
-}
+} // namespace WebCore
+
+#endif // ENABLE(DATABASE)
diff --git a/WebCore/storage/SQLTransactionCoordinator.h b/WebCore/storage/SQLTransactionCoordinator.h
index ae5674b..a51084f 100644
--- a/WebCore/storage/SQLTransactionCoordinator.h
+++ b/WebCore/storage/SQLTransactionCoordinator.h
@@ -31,6 +31,8 @@
#ifndef SQLTransactionCoordinator_h
#define SQLTransactionCoordinator_h
+#if ENABLE(DATABASE)
+
#include "CString.h"
#include "StringHash.h"
#include <wtf/Deque.h>
@@ -62,4 +64,6 @@ namespace WebCore {
};
}
+#endif // ENABLE(DATABASE)
+
#endif // SQLTransactionCoordinator_h
diff --git a/WebCore/storage/Storage.idl b/WebCore/storage/Storage.idl
index 7127efd..ffd1af1 100644
--- a/WebCore/storage/Storage.idl
+++ b/WebCore/storage/Storage.idl
@@ -26,7 +26,6 @@
module storage {
interface [
- GenerateConstructor,
HasNameGetter,
CustomDeleteProperty,
CustomGetPropertyNames,
diff --git a/WebCore/storage/StorageArea.h b/WebCore/storage/StorageArea.h
index a64d44a..6081240 100644
--- a/WebCore/storage/StorageArea.h
+++ b/WebCore/storage/StorageArea.h
@@ -50,9 +50,9 @@ namespace WebCore {
virtual unsigned length() const = 0;
virtual String key(unsigned index) const = 0;
virtual String getItem(const String& key) const = 0;
- virtual void setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame) = 0;
- virtual void removeItem(const String& key, Frame* sourceFrame) = 0;
- virtual void clear(Frame* sourceFrame) = 0;
+ virtual String setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame) = 0;
+ virtual String removeItem(const String& key, Frame* sourceFrame) = 0;
+ virtual bool clear(Frame* sourceFrame) = 0;
virtual bool contains(const String& key) const = 0;
};
diff --git a/WebCore/storage/StorageAreaImpl.cpp b/WebCore/storage/StorageAreaImpl.cpp
index 8c2a29c..aa04781 100644
--- a/WebCore/storage/StorageAreaImpl.cpp
+++ b/WebCore/storage/StorageAreaImpl.cpp
@@ -128,7 +128,7 @@ String StorageAreaImpl::getItem(const String& key) const
return m_storageMap->getItem(key);
}
-void StorageAreaImpl::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame)
+String StorageAreaImpl::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame)
{
ASSERT(!m_isShutdown);
ASSERT(!value.isNull());
@@ -136,7 +136,7 @@ void StorageAreaImpl::setItem(const String& key, const String& value, ExceptionC
if (privateBrowsingEnabled(frame)) {
ec = QUOTA_EXCEEDED_ERR;
- return;
+ return String();
}
String oldValue;
@@ -147,24 +147,25 @@ void StorageAreaImpl::setItem(const String& key, const String& value, ExceptionC
if (quotaException) {
ec = QUOTA_EXCEEDED_ERR;
- return;
+ return oldValue;
}
if (oldValue == value)
- return;
+ return oldValue;
if (m_storageAreaSync)
m_storageAreaSync->scheduleItemForSync(key, value);
StorageEventDispatcher::dispatch(key, oldValue, value, m_storageType, m_securityOrigin.get(), frame);
+ return oldValue;
}
-void StorageAreaImpl::removeItem(const String& key, Frame* frame)
+String StorageAreaImpl::removeItem(const String& key, Frame* frame)
{
ASSERT(!m_isShutdown);
blockUntilImportComplete();
if (privateBrowsingEnabled(frame))
- return;
+ return String();
String oldValue;
RefPtr<StorageMap> newMap = m_storageMap->removeItem(key, oldValue);
@@ -172,23 +173,24 @@ void StorageAreaImpl::removeItem(const String& key, Frame* frame)
m_storageMap = newMap.release();
if (oldValue.isNull())
- return;
+ return oldValue;
if (m_storageAreaSync)
m_storageAreaSync->scheduleItemForSync(key, String());
StorageEventDispatcher::dispatch(key, oldValue, String(), m_storageType, m_securityOrigin.get(), frame);
+ return oldValue;
}
-void StorageAreaImpl::clear(Frame* frame)
+bool StorageAreaImpl::clear(Frame* frame)
{
ASSERT(!m_isShutdown);
blockUntilImportComplete();
if (privateBrowsingEnabled(frame))
- return;
+ return false;
if (!m_storageMap->length())
- return;
+ return false;
unsigned quota = m_storageMap->quota();
m_storageMap = StorageMap::create(quota);
@@ -196,6 +198,7 @@ void StorageAreaImpl::clear(Frame* frame)
if (m_storageAreaSync)
m_storageAreaSync->scheduleClear();
StorageEventDispatcher::dispatch(String(), String(), String(), m_storageType, m_securityOrigin.get(), frame);
+ return true;
}
bool StorageAreaImpl::contains(const String& key) const
diff --git a/WebCore/storage/StorageAreaImpl.h b/WebCore/storage/StorageAreaImpl.h
index 0b2d34d..60d72cb 100644
--- a/WebCore/storage/StorageAreaImpl.h
+++ b/WebCore/storage/StorageAreaImpl.h
@@ -48,9 +48,9 @@ namespace WebCore {
virtual unsigned length() const;
virtual String key(unsigned index) const;
virtual String getItem(const String& key) const;
- virtual void setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame);
- virtual void removeItem(const String& key, Frame* sourceFrame);
- virtual void clear(Frame* sourceFrame);
+ virtual String setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame);
+ virtual String removeItem(const String& key, Frame* sourceFrame);
+ virtual bool clear(Frame* sourceFrame);
virtual bool contains(const String& key) const;
PassRefPtr<StorageAreaImpl> copy();
diff --git a/WebCore/storage/StorageEvent.cpp b/WebCore/storage/StorageEvent.cpp
index 13ccfe9..126aca0 100644
--- a/WebCore/storage/StorageEvent.cpp
+++ b/WebCore/storage/StorageEvent.cpp
@@ -47,7 +47,7 @@ PassRefPtr<StorageEvent> StorageEvent::create(const AtomicString& type, const St
}
StorageEvent::StorageEvent(const AtomicString& type, const String& key, const String& oldValue, const String& newValue, const String& uri, Storage* storageArea)
- : Event(type, false, true)
+ : Event(type, false, false)
, m_key(key)
, m_oldValue(oldValue)
, m_newValue(newValue)
diff --git a/WebCore/storage/StorageEvent.idl b/WebCore/storage/StorageEvent.idl
index 7c87561..3e77eda 100644
--- a/WebCore/storage/StorageEvent.idl
+++ b/WebCore/storage/StorageEvent.idl
@@ -26,10 +26,9 @@
module storage {
interface [
- GenerateConstructor,
Conditional=DOM_STORAGE
] StorageEvent : Event {
- readonly attribute DOMString key;
+ readonly attribute [ConvertNullStringTo=Null] DOMString key;
readonly attribute [ConvertNullStringTo=Null] DOMString oldValue;
readonly attribute [ConvertNullStringTo=Null] DOMString newValue;
readonly attribute DOMString uri;
diff --git a/WebCore/storage/StorageEventDispatcher.cpp b/WebCore/storage/StorageEventDispatcher.cpp
index 9763e07..dc0295b 100644
--- a/WebCore/storage/StorageEventDispatcher.cpp
+++ b/WebCore/storage/StorageEventDispatcher.cpp
@@ -50,25 +50,25 @@ void StorageEventDispatcher::dispatch(const String& key, const String& oldValue,
if (storageType == SessionStorage) {
// Send events only to our page.
for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
- if (frame->document()->securityOrigin()->equal(securityOrigin))
+ if (sourceFrame != frame && frame->document()->securityOrigin()->equal(securityOrigin))
frames.append(frame);
}
for (unsigned i = 0; i < frames.size(); ++i)
- frames[i]->document()->dispatchWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), frames[i]->domWindow()->sessionStorage()));
+ frames[i]->document()->enqueueStorageEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), frames[i]->domWindow()->sessionStorage()));
} else {
// Send events to every page.
const HashSet<Page*>& pages = page->group().pages();
HashSet<Page*>::const_iterator end = pages.end();
for (HashSet<Page*>::const_iterator it = pages.begin(); it != end; ++it) {
for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
- if (frame->document()->securityOrigin()->equal(securityOrigin))
+ if (sourceFrame != frame && frame->document()->securityOrigin()->equal(securityOrigin))
frames.append(frame);
}
}
for (unsigned i = 0; i < frames.size(); ++i)
- frames[i]->document()->dispatchWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), frames[i]->domWindow()->localStorage()));
+ frames[i]->document()->enqueueStorageEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), frames[i]->domWindow()->localStorage()));
}
}
diff --git a/WebCore/storage/StorageMap.cpp b/WebCore/storage/StorageMap.cpp
index bb08671..790fde2 100644
--- a/WebCore/storage/StorageMap.cpp
+++ b/WebCore/storage/StorageMap.cpp
@@ -47,6 +47,7 @@ PassRefPtr<StorageMap> StorageMap::copy()
{
RefPtr<StorageMap> newMap = create(m_quotaSize);
newMap->m_map = m_map;
+ newMap->m_currentLength = m_currentLength;
return newMap.release();
}
diff --git a/WebCore/storage/StorageNamespace.cpp b/WebCore/storage/StorageNamespace.cpp
index 6b8caeb..b54ba16 100644
--- a/WebCore/storage/StorageNamespace.cpp
+++ b/WebCore/storage/StorageNamespace.cpp
@@ -41,7 +41,8 @@ PassRefPtr<StorageNamespace> StorageNamespace::localStorageNamespace(const Strin
return StorageNamespaceImpl::localStorageNamespace(path, quota);
}
-PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace()
+// The page argument is only used by the Chromium port.
+PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace(Page*)
{
return StorageNamespaceImpl::sessionStorageNamespace();
}
diff --git a/WebCore/storage/StorageNamespace.h b/WebCore/storage/StorageNamespace.h
index 0ac5f86..e84e5a6 100644
--- a/WebCore/storage/StorageNamespace.h
+++ b/WebCore/storage/StorageNamespace.h
@@ -35,21 +35,22 @@
namespace WebCore {
- class SecurityOrigin;
- class StorageArea;
-
- // This interface is required for Chromium since these actions need to be proxied between processes.
- class StorageNamespace : public RefCounted<StorageNamespace> {
- public:
- static PassRefPtr<StorageNamespace> localStorageNamespace(const String& path, unsigned quota);
- static PassRefPtr<StorageNamespace> sessionStorageNamespace();
-
- virtual ~StorageNamespace() { }
- virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>) = 0;
- virtual PassRefPtr<StorageNamespace> copy() = 0;
- virtual void close() = 0;
- virtual void unlock() = 0;
- };
+class Page;
+class SecurityOrigin;
+class StorageArea;
+
+// This interface is required for Chromium since these actions need to be proxied between processes.
+class StorageNamespace : public RefCounted<StorageNamespace> {
+public:
+ static PassRefPtr<StorageNamespace> localStorageNamespace(const String& path, unsigned quota);
+ static PassRefPtr<StorageNamespace> sessionStorageNamespace(Page*);
+
+ virtual ~StorageNamespace() { }
+ virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>) = 0;
+ virtual PassRefPtr<StorageNamespace> copy() = 0;
+ virtual void close() = 0;
+ virtual void unlock() = 0;
+};
} // namespace WebCore
diff --git a/WebCore/storage/chromium/DatabaseTrackerChromium.cpp b/WebCore/storage/chromium/DatabaseTrackerChromium.cpp
index e4b8178..e18706b 100644
--- a/WebCore/storage/chromium/DatabaseTrackerChromium.cpp
+++ b/WebCore/storage/chromium/DatabaseTrackerChromium.cpp
@@ -35,11 +35,12 @@
#include "Database.h"
#include "DatabaseObserver.h"
#include "DatabaseThread.h"
-#include "Document.h"
#include "QuotaTracker.h"
+#include "ScriptExecutionContext.h"
#include "SecurityOrigin.h"
#include "SQLiteFileSystem.h"
#include <wtf/HashSet.h>
+#include <wtf/MainThread.h>
#include <wtf/StdLibExtras.h>
namespace WebCore {
@@ -55,7 +56,7 @@ DatabaseTracker::DatabaseTracker()
SQLiteFileSystem::registerSQLiteVFS();
}
-bool DatabaseTracker::canEstablishDatabase(Document*, const String&, const String&, unsigned long)
+bool DatabaseTracker::canEstablishDatabase(ScriptExecutionContext*, const String&, const String&, unsigned long)
{
// In Chromium, a database can always be established (even though we might not
// be able to write anything to it if the quota for this origin was exceeded)
@@ -74,21 +75,44 @@ String DatabaseTracker::fullPathForDatabase(SecurityOrigin* origin, const String
void DatabaseTracker::addOpenDatabase(Database* database)
{
- ASSERT(isMainThread());
+ ASSERT(database->scriptExecutionContext()->isContextThread());
DatabaseObserver::databaseOpened(database);
}
+class TrackerRemoveOpenDatabaseTask : public ScriptExecutionContext::Task {
+public:
+ static PassOwnPtr<TrackerRemoveOpenDatabaseTask> create(PassRefPtr<Database> database)
+ {
+ return new TrackerRemoveOpenDatabaseTask(database);
+ }
+
+ virtual void performTask(ScriptExecutionContext* context)
+ {
+ DatabaseTracker::tracker().removeOpenDatabase(m_database.get());
+ }
+
+private:
+ TrackerRemoveOpenDatabaseTask(PassRefPtr<Database> database)
+ : m_database(database)
+ {
+ }
+
+ RefPtr<Database> m_database;
+};
+
void DatabaseTracker::removeOpenDatabase(Database* database)
{
- // FIXME: once we know how to use this information, figure out
- // how to get this method called on the main thread
- //ASSERT(isMainThread());
- //DatabaseObserver::databaseClosed(database);
+ if (!database->scriptExecutionContext()->isContextThread()) {
+ database->scriptExecutionContext()->postTask(TrackerRemoveOpenDatabaseTask::create(database));
+ return;
+ }
+
+ DatabaseObserver::databaseClosed(database);
}
unsigned long long DatabaseTracker::getMaxSizeForDatabase(const Database* database)
{
- ASSERT(currentThread() == database->document()->databaseThread()->getThreadID());
+ ASSERT(currentThread() == database->scriptExecutionContext()->databaseThread()->getThreadID());
unsigned long long spaceAvailable = 0;
unsigned long long databaseSize = 0;
QuotaTracker::instance().getDatabaseSizeAndSpaceAvailableToOrigin(
diff --git a/WebCore/storage/chromium/SQLTransactionClientChromium.cpp b/WebCore/storage/chromium/SQLTransactionClientChromium.cpp
index 46d73ba..a10ca3e 100644
--- a/WebCore/storage/chromium/SQLTransactionClientChromium.cpp
+++ b/WebCore/storage/chromium/SQLTransactionClientChromium.cpp
@@ -38,20 +38,34 @@
#include "SQLTransaction.h"
#include <wtf/MainThread.h>
-static void notifyDatabaseChanged(void* context) {
- WebCore::Database* database = static_cast<WebCore::Database*>(context);
- WebCore::DatabaseObserver::databaseModified(database);
- database->deref(); // ref()'d in didCommitTransaction()
-}
-
namespace WebCore {
+class NotifyDatabaseChangedTask : public ScriptExecutionContext::Task {
+public:
+ static PassOwnPtr<NotifyDatabaseChangedTask> create(Database *database)
+ {
+ return new NotifyDatabaseChangedTask(database);
+ }
+
+ virtual void performTask(ScriptExecutionContext*)
+ {
+ WebCore::DatabaseObserver::databaseModified(m_database.get());
+ }
+
+private:
+ NotifyDatabaseChangedTask(PassRefPtr<Database> database)
+ : m_database(database)
+ {
+ }
+
+ RefPtr<Database> m_database;
+};
+
void SQLTransactionClient::didCommitTransaction(SQLTransaction* transaction)
{
- ASSERT(currentThread() == transaction->database()->document()->databaseThread()->getThreadID());
+ ASSERT(currentThread() == transaction->database()->scriptExecutionContext()->databaseThread()->getThreadID());
if (!transaction->isReadOnly()) {
- transaction->database()->ref(); // deref()'d in notifyDatabaseChanged()
- callOnMainThread(notifyDatabaseChanged, transaction->database());
+ transaction->database()->scriptExecutionContext()->postTask(NotifyDatabaseChangedTask::create(transaction->database()));
}
}
@@ -59,14 +73,14 @@ void SQLTransactionClient::didExecuteStatement(SQLTransaction* transaction)
{
// This method is called after executing every statement that changes the DB.
// Chromium doesn't need to do anything at that point.
- ASSERT(currentThread() == transaction->database()->document()->databaseThread()->getThreadID());
+ ASSERT(currentThread() == transaction->database()->scriptExecutionContext()->databaseThread()->getThreadID());
}
-bool SQLTransactionClient::didExceedQuota(SQLTransaction*)
+bool SQLTransactionClient::didExceedQuota(SQLTransaction* transaction)
{
// Chromium does not allow users to manually change the quota for an origin (for now, at least).
// Don't do anything.
- ASSERT(isMainThread());
+ ASSERT(transaction->database()->scriptExecutionContext()->isContextThread());
return false;
}
diff --git a/WebCore/svg/ElementTimeControl.idl b/WebCore/svg/ElementTimeControl.idl
index e8ca615..4ac01c4 100644
--- a/WebCore/svg/ElementTimeControl.idl
+++ b/WebCore/svg/ElementTimeControl.idl
@@ -26,7 +26,7 @@
module svg {
- interface [Conditional=SVG, ObjCProtocol] ElementTimeControl {
+ interface [Conditional=SVG, ObjCProtocol, OmitConstructor] ElementTimeControl {
void beginElement();
void beginElementAt(in float offset);
void endElement();
diff --git a/WebCore/svg/SVGAElement.cpp b/WebCore/svg/SVGAElement.cpp
index d0d3613..b344a4e 100644
--- a/WebCore/svg/SVGAElement.cpp
+++ b/WebCore/svg/SVGAElement.cpp
@@ -51,9 +51,6 @@ SVGAElement::SVGAElement(const QualifiedName& tagName, Document *doc)
, SVGTests()
, SVGLangSpace()
, SVGExternalResourcesRequired()
- , m_target(this, SVGNames::targetAttr)
- , m_href(this, XLinkNames::hrefAttr)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
{
}
@@ -98,6 +95,25 @@ void SVGAElement::svgAttributeChanged(const QualifiedName& attrName)
}
}
+void SVGAElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledTransformableElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeTarget();
+ synchronizeHref();
+ synchronizeExternalResourcesRequired();
+ return;
+ }
+
+ if (attrName == SVGNames::targetAttr)
+ synchronizeTarget();
+ else if (SVGURIReference::isKnownAttribute(attrName))
+ synchronizeHref();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+}
+
RenderObject* SVGAElement::createRenderer(RenderArena* arena, RenderStyle*)
{
if (static_cast<SVGElement*>(parent())->isTextContent())
diff --git a/WebCore/svg/SVGAElement.h b/WebCore/svg/SVGAElement.h
index a3e59c5..36046d3 100644
--- a/WebCore/svg/SVGAElement.h
+++ b/WebCore/svg/SVGAElement.h
@@ -46,6 +46,7 @@ namespace WebCore {
virtual void parseMappedAttribute(MappedAttribute*);
virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
@@ -59,15 +60,13 @@ namespace WebCore {
virtual bool childShouldCreateRenderer(Node*) const;
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGAElement, SVGNames::aTagString, SVGNames::targetAttrString, String, Target, target)
+ DECLARE_ANIMATED_PROPERTY(SVGAElement, SVGNames::targetAttr, String, Target, target)
// SVGURIReference
- ANIMATED_PROPERTY_DECLARATIONS(SVGAElement, SVGURIReferenceIdentifier, XLinkNames::hrefAttrString, String, Href, href)
+ DECLARE_ANIMATED_PROPERTY(SVGAElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGAElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGAElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGAllInOne.cpp b/WebCore/svg/SVGAllInOne.cpp
index 6606243..067adf2 100644
--- a/WebCore/svg/SVGAllInOne.cpp
+++ b/WebCore/svg/SVGAllInOne.cpp
@@ -30,11 +30,11 @@
#include "SVGAltGlyphElement.cpp"
#include "SVGAngle.cpp"
#include "SVGAnimateColorElement.cpp"
+#include "SVGAnimatedPathData.cpp"
+#include "SVGAnimatedPoints.cpp"
#include "SVGAnimateElement.cpp"
#include "SVGAnimateMotionElement.cpp"
#include "SVGAnimateTransformElement.cpp"
-#include "SVGAnimatedPathData.cpp"
-#include "SVGAnimatedPoints.cpp"
#include "SVGAnimationElement.cpp"
#include "SVGCircleElement.cpp"
#include "SVGClipPathElement.cpp"
@@ -80,13 +80,16 @@
#include "SVGFont.cpp"
#include "SVGFontData.cpp"
#include "SVGFontElement.cpp"
+#include "SVGFontFaceElement.cpp"
#include "SVGFontFaceFormatElement.cpp"
#include "SVGFontFaceNameElement.cpp"
#include "SVGFontFaceSrcElement.cpp"
#include "SVGFontFaceUriElement.cpp"
#include "SVGForeignObjectElement.cpp"
#include "SVGGElement.cpp"
+#include "SVGGlyphElement.cpp"
#include "SVGGradientElement.cpp"
+#include "SVGHKernElement.cpp"
#include "SVGImageElement.cpp"
#include "SVGImageLoader.cpp"
#include "SVGLangSpace.cpp"
@@ -97,6 +100,7 @@
#include "SVGLocatable.cpp"
#include "SVGMPathElement.cpp"
#include "SVGMarkerElement.cpp"
+#include "SVGMaskElement.cpp"
#include "SVGMetadataElement.cpp"
#include "SVGMissingGlyphElement.cpp"
#include "SVGNumberList.cpp"
@@ -128,6 +132,8 @@
#include "SVGStopElement.cpp"
#include "SVGStringList.cpp"
#include "SVGStylable.cpp"
+#include "SVGStyleElement.cpp"
+#include "SVGStyledElement.cpp"
#include "SVGStyledLocatableElement.cpp"
#include "SVGStyledTransformableElement.cpp"
#include "SVGSwitchElement.cpp"
@@ -141,13 +147,12 @@
#include "SVGTextPositioningElement.cpp"
#include "SVGTitleElement.cpp"
#include "SVGTransform.cpp"
+#include "SVGTransformable.cpp"
#include "SVGTransformDistance.cpp"
#include "SVGTransformList.cpp"
-#include "SVGTransformable.cpp"
#include "SVGURIReference.cpp"
#include "SVGUseElement.cpp"
#include "SVGViewElement.cpp"
#include "SVGViewSpec.cpp"
#include "SVGZoomAndPan.cpp"
#include "SVGZoomEvent.cpp"
-#include "SynchronizablePropertyController.cpp"
diff --git a/WebCore/svg/SVGAltGlyphElement.cpp b/WebCore/svg/SVGAltGlyphElement.cpp
index f13edf5..8371867 100644
--- a/WebCore/svg/SVGAltGlyphElement.cpp
+++ b/WebCore/svg/SVGAltGlyphElement.cpp
@@ -35,7 +35,6 @@ namespace WebCore {
SVGAltGlyphElement::SVGAltGlyphElement(const QualifiedName& tagName, Document* doc)
: SVGTextPositioningElement(tagName, doc)
- , m_href(this, XLinkNames::hrefAttr)
{
}
@@ -43,6 +42,14 @@ SVGAltGlyphElement::~SVGAltGlyphElement()
{
}
+void SVGAltGlyphElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGTextPositioningElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName() || SVGURIReference::isKnownAttribute(attrName))
+ synchronizeHref();
+}
+
void SVGAltGlyphElement::setGlyphRef(const AtomicString&, ExceptionCode& ec)
{
ec = NO_MODIFICATION_ALLOWED_ERR;
diff --git a/WebCore/svg/SVGAltGlyphElement.h b/WebCore/svg/SVGAltGlyphElement.h
index b571880..a28bbad 100644
--- a/WebCore/svg/SVGAltGlyphElement.h
+++ b/WebCore/svg/SVGAltGlyphElement.h
@@ -36,7 +36,9 @@ namespace WebCore {
public:
SVGAltGlyphElement(const QualifiedName&, Document*);
virtual ~SVGAltGlyphElement();
-
+
+ virtual void synchronizeProperty(const QualifiedName&);
+
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
bool childShouldCreateRenderer(Node*) const;
@@ -49,7 +51,7 @@ namespace WebCore {
private:
// SVGURIReference
- ANIMATED_PROPERTY_DECLARATIONS(SVGAltGlyphElement, SVGURIReferenceIdentifier, XLinkNames::hrefAttrString, String, Href, href)
+ DECLARE_ANIMATED_PROPERTY(SVGAltGlyphElement, XLinkNames::hrefAttr, String, Href, href)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGAngle.h b/WebCore/svg/SVGAngle.h
index 13b9fd4..3d0bdeb 100644
--- a/WebCore/svg/SVGAngle.h
+++ b/WebCore/svg/SVGAngle.h
@@ -27,16 +27,11 @@
namespace WebCore {
- class SVGStyledElement;
-
- class SVGAngle : public RefCounted<SVGAngle> {
+ class SVGAngle {
public:
- static PassRefPtr<SVGAngle> create()
- {
- return adoptRef(new SVGAngle);
- }
+ SVGAngle();
virtual ~SVGAngle();
-
+
enum SVGAngleType {
SVG_ANGLETYPE_UNKNOWN = 0,
SVG_ANGLETYPE_UNSPECIFIED = 1,
@@ -59,12 +54,7 @@ namespace WebCore {
void newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits);
void convertToSpecifiedUnits(unsigned short unitType);
- // Throughout SVG 1.1 'SVGAngle' is only used for 'SVGMarkerElement' (orient-angle)
- const QualifiedName& associatedAttributeName() const { return SVGNames::orientAttr; }
-
private:
- SVGAngle();
-
SVGAngleType m_unitType;
float m_value;
float m_valueInSpecifiedUnits;
diff --git a/WebCore/svg/SVGAngle.idl b/WebCore/svg/SVGAngle.idl
index 1a05646..023fb39 100644
--- a/WebCore/svg/SVGAngle.idl
+++ b/WebCore/svg/SVGAngle.idl
@@ -22,7 +22,7 @@
module svg {
- interface [Conditional=SVG, GenerateConstructor] SVGAngle {
+ interface [Conditional=SVG, PODType=SVGAngle] SVGAngle {
// Angle Unit Types
const unsigned short SVG_ANGLETYPE_UNKNOWN = 0;
const unsigned short SVG_ANGLETYPE_UNSPECIFIED = 1;
diff --git a/WebCore/svg/SVGAnimateMotionElement.cpp b/WebCore/svg/SVGAnimateMotionElement.cpp
index 44bf5fb..bd6de49 100644
--- a/WebCore/svg/SVGAnimateMotionElement.cpp
+++ b/WebCore/svg/SVGAnimateMotionElement.cpp
@@ -215,9 +215,9 @@ void SVGAnimateMotionElement::applyResultsToTarget()
targetElement->renderer()->setNeedsLayout(true);
// ...except in case where we have additional instances in <use> trees.
- HashSet<SVGElementInstance*> instances = targetElement->instancesForElement();
- HashSet<SVGElementInstance*>::iterator end = instances.end();
- for (HashSet<SVGElementInstance*>::iterator it = instances.begin(); it != end; ++it) {
+ const HashSet<SVGElementInstance*>& instances = targetElement->instancesForElement();
+ const HashSet<SVGElementInstance*>::const_iterator end = instances.end();
+ for (HashSet<SVGElementInstance*>::const_iterator it = instances.begin(); it != end; ++it) {
SVGElement* shadowTreeElement = (*it)->shadowTreeElement();
ASSERT(shadowTreeElement);
TransformationMatrix* transform = shadowTreeElement->supplementalTransform();
diff --git a/WebCore/svg/SVGAnimateTransformElement.cpp b/WebCore/svg/SVGAnimateTransformElement.cpp
index 3ebba06..ac6eac9 100644
--- a/WebCore/svg/SVGAnimateTransformElement.cpp
+++ b/WebCore/svg/SVGAnimateTransformElement.cpp
@@ -163,16 +163,16 @@ void SVGAnimateTransformElement::applyResultsToTarget()
targetElement->renderer()->setNeedsLayout(true);
// ...except in case where we have additional instances in <use> trees.
- HashSet<SVGElementInstance*> instances = targetElement->instancesForElement();
+ const HashSet<SVGElementInstance*>& instances = targetElement->instancesForElement();
RefPtr<SVGTransformList> transformList = transformListFor(targetElement);
- HashSet<SVGElementInstance*>::iterator end = instances.end();
- for (HashSet<SVGElementInstance*>::iterator it = instances.begin(); it != end; ++it) {
+ const HashSet<SVGElementInstance*>::const_iterator end = instances.end();
+ for (HashSet<SVGElementInstance*>::const_iterator it = instances.begin(); it != end; ++it) {
SVGElement* shadowTreeElement = (*it)->shadowTreeElement();
ASSERT(shadowTreeElement);
if (shadowTreeElement->isStyledTransformable())
- static_cast<SVGStyledTransformableElement*>(shadowTreeElement)->setTransform(transformList.get());
+ static_cast<SVGStyledTransformableElement*>(shadowTreeElement)->setTransformBaseValue(transformList.get());
else if (shadowTreeElement->hasTagName(SVGNames::textTag))
- static_cast<SVGTextElement*>(shadowTreeElement)->setTransform(transformList.get());
+ static_cast<SVGTextElement*>(shadowTreeElement)->setTransformBaseValue(transformList.get());
if (shadowTreeElement->renderer())
shadowTreeElement->renderer()->setNeedsLayout(true);
}
diff --git a/WebCore/svg/SVGAnimatedPathData.idl b/WebCore/svg/SVGAnimatedPathData.idl
index 46ec7b1..63a5209 100644
--- a/WebCore/svg/SVGAnimatedPathData.idl
+++ b/WebCore/svg/SVGAnimatedPathData.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG, ObjCProtocol] SVGAnimatedPathData {
+ interface [Conditional=SVG, ObjCProtocol, OmitConstructor] SVGAnimatedPathData {
readonly attribute SVGPathSegList pathSegList;
readonly attribute SVGPathSegList normalizedPathSegList;
readonly attribute SVGPathSegList animatedPathSegList;
diff --git a/WebCore/svg/SVGAnimatedPoints.idl b/WebCore/svg/SVGAnimatedPoints.idl
index 877f684..056b139 100644
--- a/WebCore/svg/SVGAnimatedPoints.idl
+++ b/WebCore/svg/SVGAnimatedPoints.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG, ObjCProtocol] SVGAnimatedPoints {
+ interface [Conditional=SVG, ObjCProtocol, OmitConstructor] SVGAnimatedPoints {
readonly attribute SVGPointList points;
readonly attribute SVGPointList animatedPoints;
};
diff --git a/WebCore/svg/SVGAnimatedProperty.h b/WebCore/svg/SVGAnimatedProperty.h
index 984046f..0e3ceda 100644
--- a/WebCore/svg/SVGAnimatedProperty.h
+++ b/WebCore/svg/SVGAnimatedProperty.h
@@ -1,6 +1,6 @@
/*
Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
- Copyright (C) Research In Motion Limited 2009. All rights reserved.
+ Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -22,493 +22,196 @@
#define SVGAnimatedProperty_h
#if ENABLE(SVG)
+#include "SVGAnimatedPropertySynchronizer.h"
+#include "SVGAnimatedPropertyTraits.h"
#include "SVGAnimatedTemplate.h"
-#include "SVGDocumentExtensions.h"
-#include "SynchronizableTypeWrapper.h"
namespace WebCore {
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- class SVGAnimatedProperty;
-
- template<typename OwnerType, typename OwnerElement, typename AnimatedType, typename DecoratedType, const char* TagName, const char* PropertyName>
- class SVGAnimatedPropertyTearOff : public SVGAnimatedTemplate<DecoratedType> {
- public:
- typedef SVGAnimatedPropertyTearOff<OwnerType, OwnerElement, AnimatedType, DecoratedType, TagName, PropertyName> Self;
- typedef SVGAnimatedProperty<OwnerType, AnimatedType, TagName, PropertyName> Creator;
+template<typename AnimatedType>
+class SVGAnimatedProperty;
- static PassRefPtr<Self> create(const Creator& creator, const OwnerElement* owner, const QualifiedName& attributeName)
- {
- return adoptRef(new Self(creator, owner, attributeName));
- }
+template<typename AnimatedType>
+class SVGAnimatedPropertyTearOff : public SVGAnimatedTemplate<AnimatedType> {
+public:
+ typedef typename SVGAnimatedPropertyTraits<AnimatedType>::PassType PassType;
+ typedef typename SVGAnimatedPropertyTraits<AnimatedType>::ReturnType ReturnType;
- virtual DecoratedType baseVal() const;
- virtual void setBaseVal(DecoratedType);
+ typedef SVGAnimatedPropertyTearOff<AnimatedType> Self;
+ typedef SVGAnimatedProperty<AnimatedType> Creator;
- virtual DecoratedType animVal() const;
- virtual void setAnimVal(DecoratedType);
-
- private:
- SVGAnimatedPropertyTearOff(const Creator&, const OwnerElement*, const QualifiedName& attributeName);
-
- Creator& m_creator;
- RefPtr<OwnerElement> m_ownerElement;
- };
-
- // Helper templates mapping owner types to owner elements (for SVG*Element OwnerType is equal to OwnerElement, for non-SVG*Element derived types, they're different)
- template<typename OwnerType, bool isDerivedFromSVGElement>
- struct GetOwnerElementForType;
-
- template<typename OwnerType>
- struct IsDerivedFromSVGElement;
-
- // Helper template used for synchronizing SVG <-> XML properties
- template<typename OwnerType, typename DecoratedType, bool isDerivedFromSVGElement>
- struct PropertySynchronizer;
-
- // Abstract base class
- class SVGAnimatedPropertyBase : public Noncopyable {
- public:
- virtual ~SVGAnimatedPropertyBase() { }
- virtual void synchronize() const = 0;
- virtual void startAnimation() const = 0;
- virtual void stopAnimation() = 0;
- };
-
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- class SVGAnimatedProperty : public SVGAnimatedPropertyBase {
- public:
- typedef OwnerTypeArg OwnerType;
- typedef AnimatedTypeArg AnimatedType;
-
- typedef typename SVGAnimatedTypeValue<AnimatedType>::StorableType StorableType;
- typedef typename SVGAnimatedTypeValue<AnimatedType>::DecoratedType DecoratedType;
-
- typedef GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value> OwnerElementForType;
- typedef typename OwnerElementForType::OwnerElement OwnerElement;
- typedef SVGAnimatedPropertyTearOff<OwnerType, OwnerElement, AnimatedType, DecoratedType, TagName, PropertyName> TearOff;
-
- // attributeName & attributeIdentifier may differ. For SVGMarkerElement, there are two exposed SVG animatable
- // properties: orientType & orientAngle, though only one DOM attribute "orient", handle these cases!
- SVGAnimatedProperty(const OwnerType*, const QualifiedName& attributeName);
- SVGAnimatedProperty(const OwnerType*, const QualifiedName& attributeName, const AtomicString& attributeIdentifier);
-
- // "Forwarding constructors" for primitive type assignment with more than one argument
- template<typename T1>
- SVGAnimatedProperty(const OwnerType*, const QualifiedName& attributeName,
- const T1&);
-
- template<typename T1>
- SVGAnimatedProperty(const OwnerType*, const QualifiedName& attributeName, const AtomicString& attributeIdentifier,
- const T1&);
-
- template<typename T1, typename T2>
- SVGAnimatedProperty(const OwnerType*, const QualifiedName& attributeName,
- const T1&, const T2&);
-
- template<typename T1, typename T2>
- SVGAnimatedProperty(const OwnerType*, const QualifiedName& attributeName, const AtomicString& attributeIdentifier,
- const T1&, const T2&);
-
- template<typename T1, typename T2, typename T3>
- SVGAnimatedProperty(const OwnerType*, const QualifiedName& attributeName,
- const T1&, const T2&, const T3&);
-
- template<typename T1, typename T2, typename T3>
- SVGAnimatedProperty(const OwnerType*, const QualifiedName& attributeName, const AtomicString& attributeIdentifier,
- const T1&, const T2&, const T3&);
-
- DecoratedType value() const;
- void setValue(DecoratedType);
-
- DecoratedType baseValue() const;
- void setBaseValue(DecoratedType);
-
- // Tear offs only used by bindings, never in internal code
- PassRefPtr<TearOff> animatedTearOff() const;
-
- void registerProperty();
- virtual void synchronize() const;
-
- void startAnimation() const;
- void stopAnimation();
-
- private:
- const OwnerElement* ownerElement() const;
-
- private:
- // We're a member variable on stack, living in OwnerType, NO need to ref here.
- const OwnerType* m_ownerType;
-
- const QualifiedName& m_attributeName;
- const AtomicString& m_attributeIdentifier;
-
- mutable SynchronizableTypeWrapper<StorableType> m_value;
-
-#ifndef NDEBUG
- bool m_registered;
-#endif
- };
-
- // SVGAnimatedPropertyTearOff implementation
- template<typename OwnerType, typename OwnerElement, typename AnimatedType, typename DecoratedType, const char* TagName, const char* PropertyName>
- SVGAnimatedPropertyTearOff<OwnerType, OwnerElement, AnimatedType, DecoratedType, TagName, PropertyName>::SVGAnimatedPropertyTearOff(const Creator& creator,
- const OwnerElement* owner,
- const QualifiedName& attributeName)
- : SVGAnimatedTemplate<DecoratedType>(attributeName)
- , m_creator(const_cast<Creator&>(creator))
- , m_ownerElement(const_cast<OwnerElement*>(owner))
+ static PassRefPtr<Self> create(Creator& creator, SVGElement* contextElement)
{
- ASSERT(m_ownerElement);
+ return adoptRef(new Self(creator, contextElement));
}
- template<typename OwnerType, typename OwnerElement, typename AnimatedType, typename DecoratedType, const char* TagName, const char* PropertyName>
- DecoratedType SVGAnimatedPropertyTearOff<OwnerType, OwnerElement, AnimatedType, DecoratedType, TagName, PropertyName>::baseVal() const
+ virtual void setBaseVal(PassType type)
{
- return m_creator.baseValue();
+ m_creator.setBaseValue(type);
+ m_contextElement->setSynchronizedSVGAttributes(false);
}
- template<typename OwnerType, typename OwnerElement, typename AnimatedType, typename DecoratedType, const char* TagName, const char* PropertyName>
- void SVGAnimatedPropertyTearOff<OwnerType, OwnerElement, AnimatedType, DecoratedType, TagName, PropertyName>::setBaseVal(DecoratedType newBaseVal)
+ virtual void setAnimVal(PassType type)
{
- m_creator.setBaseValue(newBaseVal);
+ m_creator.setValue(type);
+ m_contextElement->setSynchronizedSVGAttributes(false);
}
- template<typename OwnerType, typename OwnerElement, typename AnimatedType, typename DecoratedType, const char* TagName, const char* PropertyName>
- DecoratedType SVGAnimatedPropertyTearOff<OwnerType, OwnerElement, AnimatedType, DecoratedType, TagName, PropertyName>::animVal() const
- {
- return m_creator.value();
- }
+ virtual ReturnType baseVal() const { return m_creator.baseValue(); }
+ virtual ReturnType animVal() const { return m_creator.value(); }
+ virtual const QualifiedName& associatedAttributeName() const { return m_creator.associatedAttributeName(); }
- template<typename OwnerType, typename OwnerElement, typename AnimatedType, typename DecoratedType, const char* TagName, const char* PropertyName>
- void SVGAnimatedPropertyTearOff<OwnerType, OwnerElement, AnimatedType, DecoratedType, TagName, PropertyName>::setAnimVal(DecoratedType newAnimVal)
+private:
+ SVGAnimatedPropertyTearOff(Creator& creator, SVGElement* contextElement)
+ : m_creator(creator)
+ , m_contextElement(contextElement)
{
- m_creator.setValue(newAnimVal);
+ m_creator.setShouldSynchronize(true);
}
- // SVGAnimatedProperty implementation
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::SVGAnimatedProperty(const OwnerType* owner,
- const QualifiedName& attributeName)
- : m_ownerType(owner)
- , m_attributeName(attributeName)
- , m_attributeIdentifier(attributeName.localName())
- , m_value()
-#ifndef NDEBUG
- , m_registered(false)
-#endif
+ virtual ~SVGAnimatedPropertyTearOff()
{
- ASSERT(m_ownerType);
- registerProperty();
+ m_creator.setShouldSynchronize(false);
}
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::SVGAnimatedProperty(const OwnerType* owner,
- const QualifiedName& attributeName,
- const AtomicString& attributeIdentifier)
- : m_ownerType(owner)
- , m_attributeName(attributeName)
- , m_attributeIdentifier(attributeIdentifier)
- , m_value()
-#ifndef NDEBUG
- , m_registered(false)
-#endif
- {
- ASSERT(m_ownerType);
- registerProperty();
- }
-
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- template<typename T1>
- SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::SVGAnimatedProperty(const OwnerType* owner,
- const QualifiedName& attributeName,
- const T1& arg1)
- : m_ownerType(owner)
- , m_attributeName(attributeName)
- , m_attributeIdentifier(attributeName.localName())
- , m_value(arg1)
-#ifndef NDEBUG
- , m_registered(false)
-#endif
- {
- ASSERT(m_ownerType);
- registerProperty();
- }
-
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- template<typename T1>
- SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::SVGAnimatedProperty(const OwnerType* owner,
- const QualifiedName& attributeName,
- const AtomicString& attributeIdentifier,
- const T1& arg1)
- : m_ownerType(owner)
- , m_attributeName(attributeName)
- , m_attributeIdentifier(attributeIdentifier)
- , m_value(arg1)
-#ifndef NDEBUG
- , m_registered(false)
-#endif
- {
- ASSERT(m_ownerType);
- registerProperty();
- }
-
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- template<typename T1, typename T2>
- SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::SVGAnimatedProperty(const OwnerType* owner,
- const QualifiedName& attributeName,
- const T1& arg1,
- const T2& arg2)
- : m_ownerType(owner)
- , m_attributeName(attributeName)
- , m_attributeIdentifier(attributeName.localName())
- , m_value(arg1, arg2)
-#ifndef NDEBUG
- , m_registered(false)
-#endif
- {
- ASSERT(m_ownerType);
- registerProperty();
- }
-
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- template<typename T1, typename T2>
- SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::SVGAnimatedProperty(const OwnerType* owner,
- const QualifiedName& attributeName,
- const AtomicString& attributeIdentifier,
- const T1& arg1,
- const T2& arg2)
- : m_ownerType(owner)
- , m_attributeName(attributeName)
- , m_attributeIdentifier(attributeIdentifier)
- , m_value(arg1, arg2)
-#ifndef NDEBUG
- , m_registered(false)
-#endif
- {
- ASSERT(m_ownerType);
- registerProperty();
- }
-
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- template<typename T1, typename T2, typename T3>
- SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::SVGAnimatedProperty(const OwnerType* owner,
- const QualifiedName& attributeName,
- const T1& arg1,
- const T2& arg2,
- const T3& arg3)
- : m_ownerType(owner)
- , m_attributeName(attributeName)
- , m_attributeIdentifier(attributeName.localName())
- , m_value(arg1, arg2, arg3)
-#ifndef NDEBUG
- , m_registered(false)
-#endif
- {
- ASSERT(m_ownerType);
- registerProperty();
- }
-
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- template<typename T1, typename T2, typename T3>
- SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::SVGAnimatedProperty(const OwnerType* owner,
- const QualifiedName& attributeName,
- const AtomicString& attributeIdentifier,
- const T1& arg1,
- const T2& arg2,
- const T3& arg3)
- : m_ownerType(owner)
- , m_attributeName(attributeName)
- , m_attributeIdentifier(attributeIdentifier)
- , m_value(arg1, arg2, arg3)
-#ifndef NDEBUG
- , m_registered(false)
-#endif
- {
- ASSERT(m_ownerType);
- registerProperty();
- }
-
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- typename SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::DecoratedType
- SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::value() const
- {
- ASSERT(m_registered);
- return m_value;
- }
-
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- void SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::setValue(typename SVGAnimatedProperty::DecoratedType newValue)
- {
- ASSERT(m_registered);
- m_value = newValue;
- ownerElement()->setSynchronizedSVGAttributes(false);
- }
+ Creator& m_creator;
+ RefPtr<SVGElement> m_contextElement;
+};
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- typename SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::DecoratedType
- SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::baseValue() const
- {
- ASSERT(m_registered);
- const OwnerElement* ownerElement = this->ownerElement();
- SVGDocumentExtensions* extensions = ownerElement->accessDocumentSVGExtensions();
- if (extensions && extensions->hasBaseValue<DecoratedType>(ownerElement, m_attributeIdentifier))
- return extensions->baseValue<DecoratedType>(ownerElement, m_attributeIdentifier);
+template<typename AnimatedType>
+class SVGAnimatedProperty {
+public:
+ virtual ~SVGAnimatedProperty() { }
- return m_value;
- }
+ typedef typename SVGAnimatedPropertyTraits<AnimatedType>::PassType PassType;
+ typedef typename SVGAnimatedPropertyTraits<AnimatedType>::ReturnType ReturnType;
+ typedef typename SVGAnimatedPropertyTraits<AnimatedType>::StoredType StoredType;
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- void SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::setBaseValue(typename SVGAnimatedProperty::DecoratedType newValue)
+ SVGAnimatedProperty()
+ : m_value(SVGAnimatedPropertyTraits<AnimatedType>::null())
+ , m_shouldSynchronize(false)
{
- ASSERT(m_registered);
- const OwnerElement* ownerElement = this->ownerElement();
- SVGDocumentExtensions* extensions = ownerElement->accessDocumentSVGExtensions();
- if (extensions && extensions->hasBaseValue<DecoratedType>(ownerElement, m_attributeIdentifier)) {
- extensions->setBaseValue<DecoratedType>(ownerElement, m_attributeIdentifier, newValue);
- return;
- }
-
- // Only update stored property, if not animating
- m_value = newValue;
- ownerElement->setSynchronizedSVGAttributes(false);
}
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- PassRefPtr<typename SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::TearOff>
- SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::animatedTearOff() const
+ template<typename ConstructorParameterOne>
+ SVGAnimatedProperty(const ConstructorParameterOne& value1)
+ : m_value(value1)
+ , m_shouldSynchronize(false)
{
- ASSERT(m_registered);
- return lookupOrCreateWrapper<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName, TearOff, OwnerElement>(*this, ownerElement(), m_attributeName, m_attributeIdentifier);
}
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- void SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::registerProperty()
+ template<typename ConstructorParameterOne, typename ConstructorParameterTwo>
+ SVGAnimatedProperty(const ConstructorParameterOne& value1, const ConstructorParameterTwo& value2)
+ : m_value(value1, value2)
+ , m_shouldSynchronize(false)
{
- ASSERT(!m_registered);
- ownerElement()->propertyController().registerProperty(m_attributeName, this);
-
-#ifndef NDEBUG
- m_registered = true;
-#endif
}
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- void SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::synchronize() const
- {
- ASSERT(m_registered);
- if (!m_value.needsSynchronization())
- return;
+ ReturnType value() const { return SVGAnimatedPropertyTraits<AnimatedType>::toReturnType(m_value); }
+ ReturnType baseValue() const { return SVGAnimatedPropertyTraits<AnimatedType>::toReturnType(m_value); }
- PropertySynchronizer<OwnerElement, DecoratedType, IsDerivedFromSVGElement<OwnerType>::value>::synchronize(ownerElement(), m_attributeName, baseValue());
- m_value.setSynchronized();
- }
+ void setValue(PassType type) { m_value = type; }
+ void setBaseValue(PassType type) { m_value = type; }
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- void SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::startAnimation() const
- {
- ASSERT(m_registered);
- const OwnerElement* ownerElement = this->ownerElement();
- if (SVGDocumentExtensions* extensions = ownerElement->accessDocumentSVGExtensions()) {
- ASSERT(!extensions->hasBaseValue<DecoratedType>(ownerElement, m_attributeIdentifier));
- extensions->setBaseValue<DecoratedType>(ownerElement, m_attributeIdentifier, m_value);
- }
- }
-
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- void SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::stopAnimation()
- {
- ASSERT(m_registered);
- const OwnerElement* ownerElement = this->ownerElement();
- if (SVGDocumentExtensions* extensions = ownerElement->accessDocumentSVGExtensions()) {
- ASSERT(extensions->hasBaseValue<DecoratedType>(ownerElement, m_attributeIdentifier));
- setValue(extensions->baseValue<DecoratedType>(ownerElement, m_attributeIdentifier));
- extensions->removeBaseValue<DecoratedType>(ownerElement, m_attributeIdentifier);
- }
- }
+ bool shouldSynchronize() const { return m_shouldSynchronize; }
+ void setShouldSynchronize(bool value) { m_shouldSynchronize = value; }
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
- const typename SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::OwnerElement*
- SVGAnimatedProperty<OwnerTypeArg, AnimatedTypeArg, TagName, PropertyName>::ownerElement() const
- {
- return OwnerElementForType::ownerElement(m_ownerType);
- }
+ virtual const QualifiedName& associatedAttributeName() const = 0;
- // GetOwnerElementForType implementation
- template<typename OwnerType>
- struct GetOwnerElementForType<OwnerType, true> : Noncopyable {
- typedef OwnerType OwnerElement;
-
- static const OwnerElement* ownerElement(const OwnerType* type)
- {
- return type;
- }
- };
-
- template<typename OwnerType>
- struct GetOwnerElementForType<OwnerType, false> : Noncopyable {
- typedef SVGElement OwnerElement;
-
- static const OwnerElement* ownerElement(const OwnerType* type)
- {
- const OwnerElement* context = type->contextElement();
- ASSERT(context);
- return context;
- }
- };
-
- // IsDerivedFromSVGElement implementation
- template<typename OwnerType>
- struct IsDerivedFromSVGElement : Noncopyable {
- static const bool value = true;
- };
-
- class SVGViewSpec;
- template<>
- struct IsDerivedFromSVGElement<SVGViewSpec> : Noncopyable {
- static const bool value = false;
- };
-
- // PropertySynchronizer implementation
- template<typename OwnerElement, typename DecoratedType>
- struct PropertySynchronizer<OwnerElement, DecoratedType, true> : Noncopyable {
- static void synchronize(const OwnerElement* ownerElement, const QualifiedName& attributeName, DecoratedType baseValue)
- {
- AtomicString value(SVGAnimatedTypeValue<DecoratedType>::toString(baseValue));
-
- NamedNodeMap* namedAttrMap = ownerElement->attributes(false);
- Attribute* old = namedAttrMap->getAttributeItem(attributeName);
- if (old && value.isNull())
- namedAttrMap->removeAttribute(old->name());
- else if (!old && !value.isNull())
- namedAttrMap->addAttribute(const_cast<OwnerElement*>(ownerElement)->createAttribute(attributeName, value));
- else if (old && !value.isNull())
- old->setValue(value);
- }
- };
-
- template<typename OwnerElement, typename DecoratedType>
- struct PropertySynchronizer<OwnerElement, DecoratedType, false> : Noncopyable {
- static void synchronize(const OwnerElement*, const QualifiedName&, DecoratedType)
- {
- // no-op, for types not inheriting from Element, thus nothing to synchronize
- }
- };
-
- // Helper macro used to register animated properties within SVG* classes
- #define ANIMATED_PROPERTY_DECLARATIONS(OwnerType, ElementTag, AttributeTag, AnimatedType, UpperProperty, LowerProperty) \
- private: \
- typedef SVGAnimatedProperty<OwnerType, AnimatedType, ElementTag, AttributeTag> SVGAnimatedProperty##UpperProperty; \
- typedef SVGAnimatedTypeValue<AnimatedType>::DecoratedType DecoratedTypeFor##UpperProperty; \
- SVGAnimatedProperty##UpperProperty m_##LowerProperty; \
- public: \
- DecoratedTypeFor##UpperProperty LowerProperty() const { return m_##LowerProperty.value(); } \
- void set##UpperProperty(DecoratedTypeFor##UpperProperty type) { m_##LowerProperty.setValue(type); } \
- DecoratedTypeFor##UpperProperty LowerProperty##BaseValue() const { return m_##LowerProperty.baseValue(); } \
- void set##UpperProperty##BaseValue(DecoratedTypeFor##UpperProperty type) { m_##LowerProperty.setBaseValue(type); } \
- PassRefPtr<SVGAnimatedProperty##UpperProperty::TearOff> LowerProperty##Animated() const { return m_##LowerProperty.animatedTearOff(); }
+protected:
+ StoredType m_value;
+ bool m_shouldSynchronize;
+};
};
+// Helper macro used within DECLARE_ANIMATED_PROPERTY below
+#define DEFINE_ANIMATED_PROPERTY(OwnerType, DOMAttribute, AnimatedType, UpperProperty) \
+class SVGAnimatedProperty##UpperProperty : public SVGAnimatedProperty<AnimatedType> { \
+public: \
+ SVGAnimatedProperty##UpperProperty() \
+ : SVGAnimatedProperty<AnimatedType>() \
+ { \
+ } \
+ \
+ template<typename ConstructorParameterOne> \
+ SVGAnimatedProperty##UpperProperty(const ConstructorParameterOne& value1) \
+ : SVGAnimatedProperty<AnimatedType>(value1) \
+ { \
+ } \
+ \
+ template<typename ConstructorParameterOne, typename ConstructorParameterTwo> \
+ SVGAnimatedProperty##UpperProperty(const ConstructorParameterOne& value1, const ConstructorParameterTwo& value2) \
+ : SVGAnimatedProperty<AnimatedType>(value1, value2) \
+ { \
+ } \
+ \
+ void synchronize(SVGElement* contextElement) \
+ { \
+ ASSERT(m_shouldSynchronize); \
+ AtomicString value(SVGAnimatedPropertyTraits<AnimatedType>::toString(baseValue())); \
+ SVGAnimatedPropertySynchronizer<IsDerivedFromSVGElement<OwnerType>::value>::synchronize(contextElement, DOMAttribute, value); \
+ } \
+ \
+ virtual const QualifiedName& associatedAttributeName() const \
+ { \
+ return DOMAttribute; \
+ } \
+}
+
+// Helper macro shared by DECLARE_ANIMATED_PROPERTY / DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS
+#define DECLARE_ANIMATED_PROPERTY_SHARED(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, AnimatedType, UpperProperty, LowerProperty) \
+private: \
+ typedef SVGAnimatedPropertyTearOff<AnimatedType> SVGAnimatedPropertyTearOff##UpperProperty; \
+ DEFINE_ANIMATED_PROPERTY(OwnerType, DOMAttribute, AnimatedType, UpperProperty); \
+ SVGAnimatedProperty##UpperProperty m_##LowerProperty; \
+ \
+public: \
+ SVGAnimatedPropertyTraits<AnimatedType>::ReturnType LowerProperty() const \
+ { \
+ return m_##LowerProperty.value(); \
+ } \
+ \
+ SVGAnimatedPropertyTraits<AnimatedType>::ReturnType LowerProperty##BaseValue() const \
+ { \
+ return m_##LowerProperty.baseValue(); \
+ } \
+ \
+ void set##UpperProperty(SVGAnimatedPropertyTraits<AnimatedType>::PassType type) \
+ { \
+ m_##LowerProperty.setValue(type); \
+ SVGElement* contextElement = GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value>::ownerElement(this); \
+ contextElement->setSynchronizedSVGAttributes(false); \
+ } \
+ \
+ void set##UpperProperty##BaseValue(SVGAnimatedPropertyTraits<AnimatedType>::PassType type) \
+ { \
+ m_##LowerProperty.setBaseValue(type); \
+ SVGElement* contextElement = GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value>::ownerElement(this); \
+ contextElement->setSynchronizedSVGAttributes(false); \
+ } \
+ \
+ void synchronize##UpperProperty() \
+ { \
+ if (!m_##LowerProperty.shouldSynchronize()) \
+ return; \
+ SVGElement* contextElement = GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value>::ownerElement(this); \
+ m_##LowerProperty.synchronize(contextElement); \
+ } \
+ \
+ PassRefPtr<SVGAnimatedPropertyTearOff##UpperProperty> LowerProperty##Animated() \
+ { \
+ SVGElement* contextElement = GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value>::ownerElement(this); \
+ return lookupOrCreateWrapper<AnimatedType, SVGAnimatedPropertyTearOff##UpperProperty>(contextElement, m_##LowerProperty, DOMAttribute); \
+ }
+
+// Used for SVG DOM properties that map exactly to one XML DOM attribute
+#define DECLARE_ANIMATED_PROPERTY(OwnerType, DOMAttribute, AnimatedType, UpperProperty, LowerProperty) \
+DECLARE_ANIMATED_PROPERTY_SHARED(OwnerType, DOMAttribute, DOMAttribute.localName(), AnimatedType, UpperProperty, LowerProperty)
+
+// Used for the rare case multiple SVG DOM properties that map to the same XML dom attribute
+#define DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, AnimatedType, UpperProperty, LowerProperty) \
+DECLARE_ANIMATED_PROPERTY_SHARED(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, AnimatedType, UpperProperty, LowerProperty)
+
#endif
#endif
diff --git a/WebCore/svg/SVGAnimatedPropertySynchronizer.h b/WebCore/svg/SVGAnimatedPropertySynchronizer.h
new file mode 100644
index 0000000..ddd0493
--- /dev/null
+++ b/WebCore/svg/SVGAnimatedPropertySynchronizer.h
@@ -0,0 +1,96 @@
+/*
+ Copyright (C) Research In Motion Limited 2010. All rights reserved.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedPropertySynchronizer_h
+#define SVGAnimatedPropertySynchronizer_h
+
+#include "SVGAnimatedPropertyTraits.h"
+
+#if ENABLE(SVG)
+namespace WebCore {
+
+class SVGElement;
+
+// GetOwnerElementForType implementation
+template<typename OwnerType, bool isDerivedFromSVGElement>
+struct GetOwnerElementForType;
+
+template<typename OwnerType>
+struct GetOwnerElementForType<OwnerType, true> : public Noncopyable {
+ static SVGElement* ownerElement(OwnerType* type)
+ {
+ return type;
+ }
+};
+
+template<typename OwnerType>
+struct GetOwnerElementForType<OwnerType, false> : public Noncopyable {
+ static SVGElement* ownerElement(OwnerType* type)
+ {
+ SVGElement* context = type->contextElement();
+ ASSERT(context);
+ return context;
+ }
+};
+
+// IsDerivedFromSVGElement implementation
+template<typename OwnerType>
+struct IsDerivedFromSVGElement : public Noncopyable {
+ static const bool value = true;
+};
+
+class SVGViewSpec;
+template<>
+struct IsDerivedFromSVGElement<SVGViewSpec> : public Noncopyable {
+ static const bool value = false;
+};
+
+// Helper template used for synchronizing SVG <-> XML properties
+template<bool isDerivedFromSVGElement>
+struct SVGAnimatedPropertySynchronizer {
+ static void synchronize(SVGElement*, const QualifiedName&, const AtomicString&);
+};
+
+template<>
+struct SVGAnimatedPropertySynchronizer<true> {
+ static void synchronize(SVGElement* ownerElement, const QualifiedName& attrName, const AtomicString& value)
+ {
+ NamedNodeMap* namedAttrMap = ownerElement->attributes(false);
+ Attribute* old = namedAttrMap->getAttributeItem(attrName);
+ if (old && value.isNull())
+ namedAttrMap->removeAttribute(old->name());
+ else if (!old && !value.isNull())
+ namedAttrMap->addAttribute(ownerElement->createAttribute(attrName, value));
+ else if (old && !value.isNull())
+ old->setValue(value);
+ }
+};
+
+template<>
+struct SVGAnimatedPropertySynchronizer<false> {
+ static void synchronize(SVGElement*, const QualifiedName&, const AtomicString&)
+ {
+ // no-op, for types not inheriting from Element, thus nothing to synchronize
+ }
+};
+
+};
+
+#endif
+#endif
diff --git a/WebCore/svg/SVGAnimatedPropertyTraits.h b/WebCore/svg/SVGAnimatedPropertyTraits.h
new file mode 100644
index 0000000..4e34dbe
--- /dev/null
+++ b/WebCore/svg/SVGAnimatedPropertyTraits.h
@@ -0,0 +1,186 @@
+/*
+ Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@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.
+*/
+
+#ifndef SVGAnimatedPropertyTraits_h
+#define SVGAnimatedPropertyTraits_h
+
+#if ENABLE(SVG)
+#include "FloatRect.h"
+#include "PlatformString.h"
+#include "SVGAngle.h"
+#include "SVGLength.h"
+#include "SVGLengthList.h"
+#include "SVGNumberList.h"
+#include "SVGPreserveAspectRatio.h"
+#include "SVGTransformList.h"
+
+namespace WebCore {
+
+template<typename Type>
+struct SVGAnimatedPropertyTraits : public Noncopyable { };
+
+// SVGAnimatedAngle
+template<>
+struct SVGAnimatedPropertyTraits<SVGAngle> : public Noncopyable {
+ typedef const SVGAngle& PassType;
+ typedef SVGAngle ReturnType;
+ typedef SVGAngle StoredType;
+
+ static ReturnType null() { return SVGAngle(); }
+ static ReturnType toReturnType(const StoredType& type) { return type; }
+ static String toString(PassType type) { return type.valueAsString(); }
+};
+
+// SVGAnimatedBoolean
+template<>
+struct SVGAnimatedPropertyTraits<bool> : public Noncopyable {
+ typedef const bool& PassType;
+ typedef bool ReturnType;
+ typedef bool StoredType;
+
+ static ReturnType null() { return false; }
+ static ReturnType toReturnType(const StoredType& type) { return type; }
+ static String toString(PassType type) { return type ? "true" : "false"; }
+};
+
+// SVGAnimatedEnumeration
+template<>
+struct SVGAnimatedPropertyTraits<int> : public Noncopyable {
+ typedef const int& PassType;
+ typedef int ReturnType;
+ typedef int StoredType;
+
+ static ReturnType null() { return 0; }
+ static ReturnType toReturnType(const StoredType& type) { return type; }
+ static String toString(PassType type) { return String::number(type); }
+};
+
+// SVGAnimatedInteger
+template<>
+struct SVGAnimatedPropertyTraits<long> : public Noncopyable {
+ typedef const long& PassType;
+ typedef long ReturnType;
+ typedef long StoredType;
+
+ static ReturnType null() { return 0l; }
+ static ReturnType toReturnType(const StoredType& type) { return type; }
+ static String toString(PassType type) { return String::number(type); }
+};
+
+// SVGAnimatedLength
+template<>
+struct SVGAnimatedPropertyTraits<SVGLength> : public Noncopyable {
+ typedef const SVGLength& PassType;
+ typedef SVGLength ReturnType;
+ typedef SVGLength StoredType;
+
+ static ReturnType null() { return SVGLength(); }
+ static ReturnType toReturnType(const StoredType& type) { return type; }
+ static String toString(PassType type) { return type.valueAsString(); }
+};
+
+// SVGAnimatedLengthList
+template<>
+struct SVGAnimatedPropertyTraits<SVGLengthList*> : public Noncopyable {
+ typedef SVGLengthList* PassType;
+ typedef SVGLengthList* ReturnType;
+ typedef RefPtr<SVGLengthList> StoredType;
+
+ static ReturnType null() { return 0; }
+ static ReturnType toReturnType(const StoredType& type) { return type.get(); }
+ static String toString(PassType type) { return type ? type->valueAsString() : String(); }
+};
+
+// SVGAnimatedNumber
+template<>
+struct SVGAnimatedPropertyTraits<float> : public Noncopyable {
+ typedef const float& PassType;
+ typedef float ReturnType;
+ typedef float StoredType;
+
+ static ReturnType null() { return 0.0f; }
+ static ReturnType toReturnType(const StoredType& type) { return type; }
+ static String toString(PassType type) { return String::number(type); }
+};
+
+// SVGAnimatedNumberList
+template<>
+struct SVGAnimatedPropertyTraits<SVGNumberList*> : public Noncopyable {
+ typedef SVGNumberList* PassType;
+ typedef SVGNumberList* ReturnType;
+ typedef RefPtr<SVGNumberList> StoredType;
+
+ static ReturnType null() { return 0; }
+ static ReturnType toReturnType(const StoredType& type) { return type.get(); }
+ static String toString(PassType type) { return type ? type->valueAsString() : String(); }
+};
+
+// SVGAnimatedPreserveAspectRatio
+template<>
+struct SVGAnimatedPropertyTraits<SVGPreserveAspectRatio> : public Noncopyable {
+ typedef const SVGPreserveAspectRatio& PassType;
+ typedef SVGPreserveAspectRatio ReturnType;
+ typedef SVGPreserveAspectRatio StoredType;
+
+ static ReturnType null() { return SVGPreserveAspectRatio(); }
+ static ReturnType toReturnType(const StoredType& type) { return type; }
+ static String toString(PassType type) { return type.valueAsString(); }
+};
+
+// SVGAnimatedRect
+template<>
+struct SVGAnimatedPropertyTraits<FloatRect> : public Noncopyable {
+ typedef const FloatRect& PassType;
+ typedef FloatRect ReturnType;
+ typedef FloatRect StoredType;
+
+ static ReturnType null() { return FloatRect(); }
+ static ReturnType toReturnType(const StoredType& type) { return type; }
+ static String toString(PassType type) { return String::format("%f %f %f %f", type.x(), type.y(), type.width(), type.height()); }
+};
+
+// SVGAnimatedString
+template<>
+struct SVGAnimatedPropertyTraits<String> : public Noncopyable {
+ typedef const String& PassType;
+ typedef String ReturnType;
+ typedef String StoredType;
+
+ static ReturnType null() { return String(); }
+ static ReturnType toReturnType(const StoredType& type) { return type; }
+ static String toString(PassType type) { return type; }
+};
+
+// SVGAnimatedTransformList
+template<>
+struct SVGAnimatedPropertyTraits<SVGTransformList*> : public Noncopyable {
+ typedef SVGTransformList* PassType;
+ typedef SVGTransformList* ReturnType;
+ typedef RefPtr<SVGTransformList> StoredType;
+
+ static ReturnType null() { return 0; }
+ static ReturnType toReturnType(const StoredType& type) { return type.get(); }
+ static String toString(PassType type) { return type ? type->valueAsString() : String(); }
+};
+
+}
+
+#endif
+#endif
diff --git a/WebCore/svg/SVGAnimatedTemplate.h b/WebCore/svg/SVGAnimatedTemplate.h
index d65fe0b..589d724 100644
--- a/WebCore/svg/SVGAnimatedTemplate.h
+++ b/WebCore/svg/SVGAnimatedTemplate.h
@@ -22,9 +22,7 @@
#define SVGAnimatedTemplate_h
#if ENABLE(SVG)
-#include "AtomicString.h"
-#include "FloatRect.h"
-#include "SVGLength.h"
+#include "SVGAnimatedPropertyTraits.h"
#include <wtf/HashMap.h>
namespace WebCore {
@@ -101,18 +99,23 @@ namespace WebCore {
}
};
- template<typename BareType>
- class SVGAnimatedTemplate : public RefCounted<SVGAnimatedTemplate<BareType> > {
+ template<typename AnimatedType>
+ class SVGAnimatedTemplate : public RefCounted<SVGAnimatedTemplate<AnimatedType> > {
public:
+ typedef typename SVGAnimatedPropertyTraits<AnimatedType>::PassType PassType;
+ typedef typename SVGAnimatedPropertyTraits<AnimatedType>::ReturnType ReturnType;
+
virtual ~SVGAnimatedTemplate() { forgetWrapper(this); }
- virtual BareType baseVal() const = 0;
- virtual void setBaseVal(BareType) = 0;
+ virtual ReturnType baseVal() const = 0;
+ virtual void setBaseVal(PassType) = 0;
+
+ virtual ReturnType animVal() const = 0;
+ virtual void setAnimVal(PassType) = 0;
- virtual BareType animVal() const = 0;
- virtual void setAnimVal(BareType) = 0;
+ virtual const QualifiedName& associatedAttributeName() const = 0;
- typedef HashMap<SVGAnimatedTypeWrapperKey, SVGAnimatedTemplate<BareType>*, SVGAnimatedTypeWrapperKeyHash, SVGAnimatedTypeWrapperKeyHashTraits > ElementToWrapperMap;
+ typedef HashMap<SVGAnimatedTypeWrapperKey, SVGAnimatedTemplate<AnimatedType>*, SVGAnimatedTypeWrapperKeyHash, SVGAnimatedTypeWrapperKeyHashTraits > ElementToWrapperMap;
typedef typename ElementToWrapperMap::const_iterator ElementToWrapperMapIterator;
static ElementToWrapperMap* wrapperCache()
@@ -121,7 +124,7 @@ namespace WebCore {
return s_wrapperCache;
}
- static void forgetWrapper(SVGAnimatedTemplate<BareType>* wrapper)
+ static void forgetWrapper(SVGAnimatedTemplate<AnimatedType>* wrapper)
{
ElementToWrapperMap* cache = wrapperCache();
ElementToWrapperMapIterator itr = cache->begin();
@@ -133,113 +136,27 @@ namespace WebCore {
}
}
}
-
- const QualifiedName& associatedAttributeName() const { return m_associatedAttributeName; }
-
- protected:
- SVGAnimatedTemplate(const QualifiedName& attributeName)
- : m_associatedAttributeName(attributeName)
- {
- }
-
- private:
- const QualifiedName& m_associatedAttributeName;
};
- template<typename OwnerTypeArg, typename AnimatedTypeArg, const char* TagName, const char* PropertyName>
+ template<typename AnimatedType>
class SVGAnimatedProperty;
- template<typename OwnerType, typename AnimatedType, const char* TagName, const char* PropertyName, typename Type, typename OwnerElement>
- PassRefPtr<Type> lookupOrCreateWrapper(const SVGAnimatedProperty<OwnerType, AnimatedType, TagName, PropertyName>& creator,
- const OwnerElement* element, const QualifiedName& attrName, const AtomicString& attrIdentifier)
+ template<typename AnimatedType, typename AnimatedTearOff>
+ PassRefPtr<AnimatedTearOff> lookupOrCreateWrapper(SVGElement* element, SVGAnimatedProperty<AnimatedType>& creator, const QualifiedName& attrName)
{
- SVGAnimatedTypeWrapperKey key(element, attrIdentifier);
- RefPtr<Type> wrapper = static_cast<Type*>(Type::wrapperCache()->get(key));
+ SVGAnimatedTypeWrapperKey key(element, attrName.localName());
+ RefPtr<AnimatedTearOff> wrapper = static_cast<AnimatedTearOff*>(AnimatedTearOff::wrapperCache()->get(key));
if (!wrapper) {
- wrapper = Type::create(creator, element, attrName);
- element->propertyController().setPropertyNeedsSynchronization(attrName);
- Type::wrapperCache()->set(key, wrapper.get());
+ wrapper = AnimatedTearOff::create(creator, element);
+ AnimatedTearOff::wrapperCache()->set(key, wrapper.get());
}
return wrapper.release();
}
- // Default implementation for pointer types
- template<typename Type>
- struct SVGAnimatedTypeValue : Noncopyable {
- typedef RefPtr<Type> StorableType;
- typedef Type* DecoratedType;
-
- static Type null() { return 0; }
- static String toString(Type type) { return type ? type->valueAsString() : String(); }
- };
-
- template<>
- struct SVGAnimatedTypeValue<bool> : Noncopyable {
- typedef bool StorableType;
- typedef bool DecoratedType;
-
- static bool null() { return false; }
- static String toString(bool type) { return type ? "true" : "false"; }
- };
-
- template<>
- struct SVGAnimatedTypeValue<int> : Noncopyable {
- typedef int StorableType;
- typedef int DecoratedType;
-
- static int null() { return 0; }
- static String toString(int type) { return String::number(type); }
- };
-
- template<>
- struct SVGAnimatedTypeValue<long> : Noncopyable {
- typedef long StorableType;
- typedef long DecoratedType;
-
- static long null() { return 0l; }
- static String toString(long type) { return String::number(type); }
- };
-
- template<>
- struct SVGAnimatedTypeValue<SVGLength> : Noncopyable {
- typedef SVGLength StorableType;
- typedef SVGLength DecoratedType;
-
- static SVGLength null() { return SVGLength(); }
- static String toString(const SVGLength& type) { return type.valueAsString(); }
- };
-
- template<>
- struct SVGAnimatedTypeValue<float> : Noncopyable {
- typedef float StorableType;
- typedef float DecoratedType;
-
- static float null() { return 0.0f; }
- static String toString(float type) { return String::number(type); }
- };
-
- template<>
- struct SVGAnimatedTypeValue<FloatRect> : Noncopyable {
- typedef FloatRect StorableType;
- typedef FloatRect DecoratedType;
-
- static FloatRect null() { return FloatRect(); }
- static String toString(const FloatRect& type) { return String::format("%f %f %f %f", type.x(), type.y(), type.width(), type.height()); }
- };
-
- template<>
- struct SVGAnimatedTypeValue<String> : Noncopyable {
- typedef String StorableType;
- typedef String DecoratedType;
-
- static String null() { return String(); }
- static String toString(const String& type) { return type; }
- };
-
// Common type definitions, to ease IDL generation.
- typedef SVGAnimatedTemplate<SVGAngle*> SVGAnimatedAngle;
+ typedef SVGAnimatedTemplate<SVGAngle> SVGAnimatedAngle;
typedef SVGAnimatedTemplate<bool> SVGAnimatedBoolean;
typedef SVGAnimatedTemplate<int> SVGAnimatedEnumeration;
typedef SVGAnimatedTemplate<long> SVGAnimatedInteger;
@@ -247,12 +164,12 @@ namespace WebCore {
typedef SVGAnimatedTemplate<SVGLengthList*> SVGAnimatedLengthList;
typedef SVGAnimatedTemplate<float> SVGAnimatedNumber;
typedef SVGAnimatedTemplate<SVGNumberList*> SVGAnimatedNumberList;
- typedef SVGAnimatedTemplate<SVGPreserveAspectRatio*> SVGAnimatedPreserveAspectRatio;
+ typedef SVGAnimatedTemplate<SVGPreserveAspectRatio> SVGAnimatedPreserveAspectRatio;
typedef SVGAnimatedTemplate<FloatRect> SVGAnimatedRect;
typedef SVGAnimatedTemplate<String> SVGAnimatedString;
typedef SVGAnimatedTemplate<SVGTransformList*> SVGAnimatedTransformList;
}
-#endif // ENABLE(SVG)
-#endif // SVGAnimatedTemplate_h
+#endif
+#endif
diff --git a/WebCore/svg/SVGAnimationElement.cpp b/WebCore/svg/SVGAnimationElement.cpp
index ce3670d..39abbfc 100644
--- a/WebCore/svg/SVGAnimationElement.cpp
+++ b/WebCore/svg/SVGAnimationElement.cpp
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+ Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
Copyright (C) 2007 Eric Seidel <eric@webkit.org>
Copyright (C) 2008 Apple Inc. All rights reserved.
@@ -51,7 +51,6 @@ SVGAnimationElement::SVGAnimationElement(const QualifiedName& tagName, Document*
: SVGSMILElement(tagName, doc)
, SVGTests()
, SVGExternalResourcesRequired()
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
, m_animationValid(false)
{
}
@@ -59,7 +58,7 @@ SVGAnimationElement::SVGAnimationElement(const QualifiedName& tagName, Document*
SVGAnimationElement::~SVGAnimationElement()
{
}
-
+
static void parseKeyTimes(const String& parse, Vector<float>& result, bool verifyOrder)
{
result.clear();
@@ -141,6 +140,14 @@ void SVGAnimationElement::attributeChanged(Attribute* attr, bool preserveDecls)
SVGSMILElement::attributeChanged(attr, preserveDecls);
}
+void SVGAnimationElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGSMILElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName() || SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+}
+
float SVGAnimationElement::getStartTime() const
{
return narrowPrecisionToFloat(intervalBegin().value());
@@ -309,9 +316,9 @@ void SVGAnimationElement::setTargetAttributeAnimatedValue(const String& value)
static_cast<SVGStyledElement*>(target)->setInstanceUpdatesBlocked(false);
// If the target element is used in an <use> instance tree, update that as well.
- HashSet<SVGElementInstance*> instances = target->instancesForElement();
- HashSet<SVGElementInstance*>::iterator end = instances.end();
- for (HashSet<SVGElementInstance*>::iterator it = instances.begin(); it != end; ++it) {
+ const HashSet<SVGElementInstance*>& instances = target->instancesForElement();
+ const HashSet<SVGElementInstance*>::const_iterator end = instances.end();
+ for (HashSet<SVGElementInstance*>::const_iterator it = instances.begin(); it != end; ++it) {
SVGElement* shadowTreeElement = (*it)->shadowTreeElement();
ASSERT(shadowTreeElement);
if (isCSS)
diff --git a/WebCore/svg/SVGAnimationElement.h b/WebCore/svg/SVGAnimationElement.h
index b0b091b..27cec88 100644
--- a/WebCore/svg/SVGAnimationElement.h
+++ b/WebCore/svg/SVGAnimationElement.h
@@ -46,9 +46,10 @@ namespace WebCore {
public:
SVGAnimationElement(const QualifiedName&, Document*);
virtual ~SVGAnimationElement();
-
+
virtual void parseMappedAttribute(MappedAttribute*);
virtual void attributeChanged(Attribute*, bool preserveDecls);
+ virtual void synchronizeProperty(const QualifiedName&);
// SVGAnimationElement
float getStartTime() const;
@@ -106,9 +107,7 @@ namespace WebCore {
protected:
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGAnimationElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGAnimationElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
bool m_animationValid;
diff --git a/WebCore/svg/SVGAnimationElement.idl b/WebCore/svg/SVGAnimationElement.idl
index afa3cbb..e221545 100644
--- a/WebCore/svg/SVGAnimationElement.idl
+++ b/WebCore/svg/SVGAnimationElement.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG_ANIMATION] SVGAnimationElement : SVGElement,
+ interface [Conditional=SVG_ANIMATION, OmitConstructor] SVGAnimationElement : SVGElement,
SVGTests,
SVGExternalResourcesRequired,
ElementTimeControl {
diff --git a/WebCore/svg/SVGCircleElement.cpp b/WebCore/svg/SVGCircleElement.cpp
index d96842a..10da742 100644
--- a/WebCore/svg/SVGCircleElement.cpp
+++ b/WebCore/svg/SVGCircleElement.cpp
@@ -36,10 +36,9 @@ SVGCircleElement::SVGCircleElement(const QualifiedName& tagName, Document* doc)
, SVGTests()
, SVGLangSpace()
, SVGExternalResourcesRequired()
- , m_cx(this, SVGNames::cxAttr, LengthModeWidth)
- , m_cy(this, SVGNames::cyAttr, LengthModeHeight)
- , m_r(this, SVGNames::rAttr, LengthModeOther)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
+ , m_cx(LengthModeWidth)
+ , m_cy(LengthModeHeight)
+ , m_r(LengthModeOther)
{
}
@@ -84,6 +83,28 @@ void SVGCircleElement::svgAttributeChanged(const QualifiedName& attrName)
renderer()->setNeedsLayout(true);
}
+void SVGCircleElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledTransformableElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeCx();
+ synchronizeCy();
+ synchronizeR();
+ synchronizeExternalResourcesRequired();
+ return;
+ }
+
+ if (attrName == SVGNames::cxAttr)
+ synchronizeCx();
+ else if (attrName == SVGNames::cyAttr)
+ synchronizeCy();
+ else if (attrName == SVGNames::rAttr)
+ synchronizeR();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+}
+
Path SVGCircleElement::toPathData() const
{
return Path::createCircle(FloatPoint(cx().value(this), cy().value(this)), r().value(this));
diff --git a/WebCore/svg/SVGCircleElement.h b/WebCore/svg/SVGCircleElement.h
index 69b015d..027918c 100644
--- a/WebCore/svg/SVGCircleElement.h
+++ b/WebCore/svg/SVGCircleElement.h
@@ -41,6 +41,7 @@ namespace WebCore {
virtual void parseMappedAttribute(MappedAttribute*);
virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual Path toPathData() const;
@@ -48,14 +49,12 @@ namespace WebCore {
virtual bool hasRelativeValues() const;
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGCircleElement, SVGNames::circleTagString, SVGNames::cxAttrString, SVGLength, Cx, cx)
- ANIMATED_PROPERTY_DECLARATIONS(SVGCircleElement, SVGNames::circleTagString, SVGNames::cyAttrString, SVGLength, Cy, cy)
- ANIMATED_PROPERTY_DECLARATIONS(SVGCircleElement, SVGNames::circleTagString, SVGNames::rAttrString, SVGLength, R, r)
+ DECLARE_ANIMATED_PROPERTY(SVGCircleElement, SVGNames::cxAttr, SVGLength, Cx, cx)
+ DECLARE_ANIMATED_PROPERTY(SVGCircleElement, SVGNames::cyAttr, SVGLength, Cy, cy)
+ DECLARE_ANIMATED_PROPERTY(SVGCircleElement, SVGNames::rAttr, SVGLength, R, r)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGCircleElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGCircleElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGClipPathElement.cpp b/WebCore/svg/SVGClipPathElement.cpp
index d5df29c..0fa12ff 100644
--- a/WebCore/svg/SVGClipPathElement.cpp
+++ b/WebCore/svg/SVGClipPathElement.cpp
@@ -26,6 +26,7 @@
#include "CSSStyleSelector.h"
#include "Document.h"
#include "MappedAttribute.h"
+#include "RenderSVGHiddenContainer.h"
#include "SVGNames.h"
#include "SVGTransformList.h"
#include "SVGUnitTypes.h"
@@ -37,8 +38,7 @@ SVGClipPathElement::SVGClipPathElement(const QualifiedName& tagName, Document* d
, SVGTests()
, SVGLangSpace()
, SVGExternalResourcesRequired()
- , m_clipPathUnits(this, SVGNames::clipPathUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
+ , m_clipPathUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
{
}
@@ -79,6 +79,22 @@ void SVGClipPathElement::svgAttributeChanged(const QualifiedName& attrName)
m_clipper->invalidate();
}
+void SVGClipPathElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledTransformableElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeClipPathUnits();
+ synchronizeExternalResourcesRequired();
+ return;
+ }
+
+ if (attrName == SVGNames::clipPathUnitsAttr)
+ synchronizeClipPathUnits();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+}
+
void SVGClipPathElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
{
SVGStyledTransformableElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
@@ -89,7 +105,12 @@ void SVGClipPathElement::childrenChanged(bool changedByParser, Node* beforeChang
m_clipper->invalidate();
}
-SVGResource* SVGClipPathElement::canvasResource()
+RenderObject* SVGClipPathElement::createRenderer(RenderArena* arena, RenderStyle*)
+{
+ return new (arena) RenderSVGHiddenContainer(this);
+}
+
+SVGResource* SVGClipPathElement::canvasResource(const RenderObject*)
{
if (!m_clipper)
m_clipper = SVGResourceClipper::create();
@@ -98,17 +119,17 @@ SVGResource* SVGClipPathElement::canvasResource()
bool bbox = clipPathUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
- RefPtr<RenderStyle> clipPathStyle = styleForRenderer(); // FIXME: Manual style resolution is a hack
- for (Node* n = firstChild(); n; n = n->nextSibling()) {
- if (n->isSVGElement() && static_cast<SVGElement*>(n)->isStyledTransformable()) {
- SVGStyledTransformableElement* styled = static_cast<SVGStyledTransformableElement*>(n);
- RefPtr<RenderStyle> pathStyle = document()->styleSelector()->styleForElement(styled, clipPathStyle.get());
- if (pathStyle->display() != NONE) {
- Path pathData = styled->toClipPath();
- if (!pathData.isEmpty())
- m_clipper->addClipData(pathData, pathStyle->svgStyle()->clipRule(), bbox);
- }
- }
+ for (Node* node = firstChild(); node; node = node->nextSibling()) {
+ if (!node->isSVGElement() || !static_cast<SVGElement*>(node)->isStyledTransformable())
+ continue;
+ SVGStyledTransformableElement* styled = static_cast<SVGStyledTransformableElement*>(node);
+ RenderStyle* style = styled->renderer() ? styled->renderer()->style() : 0;
+ if (!style || style->display() == NONE)
+ continue;
+ Path pathData = styled->toClipPath();
+ if (pathData.isEmpty())
+ continue;
+ m_clipper->addClipData(pathData, style->svgStyle()->clipRule(), bbox);
}
if (m_clipper->clipData().isEmpty()) {
Path pathData;
diff --git a/WebCore/svg/SVGClipPathElement.h b/WebCore/svg/SVGClipPathElement.h
index 6079159..cf7ff2b 100644
--- a/WebCore/svg/SVGClipPathElement.h
+++ b/WebCore/svg/SVGClipPathElement.h
@@ -22,6 +22,7 @@
#define SVGClipPathElement_h
#if ENABLE(SVG)
+#include "RenderObject.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
#include "SVGResourceClipper.h"
@@ -39,21 +40,20 @@ namespace WebCore {
virtual ~SVGClipPathElement();
virtual bool isValid() const { return SVGTests::isValid(); }
- virtual bool rendererIsNeeded(RenderStyle*) { return false; }
virtual void parseMappedAttribute(MappedAttribute*);
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 SVGResource* canvasResource();
+ virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+ virtual SVGResource* canvasResource(const RenderObject*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGClipPathElement, SVGNames::clipPathTagString, SVGNames::clipPathUnitsAttrString, int, ClipPathUnits, clipPathUnits)
+ DECLARE_ANIMATED_PROPERTY(SVGClipPathElement, SVGNames::clipPathUnitsAttr, int, ClipPathUnits, clipPathUnits)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGClipPathElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGClipPathElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
RefPtr<SVGResourceClipper> m_clipper;
};
diff --git a/WebCore/svg/SVGColor.idl b/WebCore/svg/SVGColor.idl
index 43bcb70..32a2683 100644
--- a/WebCore/svg/SVGColor.idl
+++ b/WebCore/svg/SVGColor.idl
@@ -21,7 +21,7 @@
module svg {
- interface [Conditional=SVG, GenerateConstructor] SVGColor : css::CSSValue {
+ interface [Conditional=SVG] SVGColor : css::CSSValue {
// Color Types
const unsigned short SVG_COLORTYPE_UNKNOWN = 0;
const unsigned short SVG_COLORTYPE_RGBCOLOR = 1;
diff --git a/WebCore/svg/SVGComponentTransferFunctionElement.cpp b/WebCore/svg/SVGComponentTransferFunctionElement.cpp
index bb08ebb..f61b2ea 100644
--- a/WebCore/svg/SVGComponentTransferFunctionElement.cpp
+++ b/WebCore/svg/SVGComponentTransferFunctionElement.cpp
@@ -30,17 +30,13 @@
namespace WebCore {
-char SVGComponentTransferFunctionElementIdentifier[] = "SVGComponentTransferFunctionElement";
-
SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(const QualifiedName& tagName, Document* doc)
: SVGElement(tagName, doc)
- , m_type(this, SVGNames::typeAttr, FECOMPONENTTRANSFER_TYPE_UNKNOWN)
- , m_tableValues(this, SVGNames::tableValuesAttr, SVGNumberList::create(SVGNames::tableValuesAttr))
- , m_slope(this, SVGNames::slopeAttr, 1.0f)
- , m_intercept(this, SVGNames::interceptAttr)
- , m_amplitude(this, SVGNames::amplitudeAttr, 1.0f)
- , m_exponent(this, SVGNames::exponentAttr, 1.0f)
- , m_offset(this, SVGNames::offsetAttr)
+ , m_type(FECOMPONENTTRANSFER_TYPE_UNKNOWN)
+ , m_tableValues(SVGNumberList::create(SVGNames::tableValuesAttr))
+ , m_slope(1.0f)
+ , m_amplitude(1.0f)
+ , m_exponent(1.0f)
{
}
@@ -51,8 +47,7 @@ SVGComponentTransferFunctionElement::~SVGComponentTransferFunctionElement()
void SVGComponentTransferFunctionElement::parseMappedAttribute(MappedAttribute* attr)
{
const String& value = attr->value();
- if (attr->name() == SVGNames::typeAttr)
- {
+ if (attr->name() == SVGNames::typeAttr) {
if (value == "identity")
setTypeBaseValue(FECOMPONENTTRANSFER_TYPE_IDENTITY);
else if (value == "table")
@@ -80,6 +75,37 @@ void SVGComponentTransferFunctionElement::parseMappedAttribute(MappedAttribute*
SVGElement::parseMappedAttribute(attr);
}
+void SVGComponentTransferFunctionElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeType();
+ synchronizeTableValues();
+ synchronizeSlope();
+ synchronizeIntercept();
+ synchronizeAmplitude();
+ synchronizeExponent();
+ synchronizeOffset();
+ return;
+ }
+
+ if (attrName == SVGNames::typeAttr)
+ synchronizeType();
+ else if (attrName == SVGNames::tableValuesAttr)
+ synchronizeTableValues();
+ else if (attrName == SVGNames::slopeAttr)
+ synchronizeSlope();
+ else if (attrName == SVGNames::interceptAttr)
+ synchronizeIntercept();
+ else if (attrName == SVGNames::amplitudeAttr)
+ synchronizeAmplitude();
+ else if (attrName == SVGNames::exponentAttr)
+ synchronizeExponent();
+ else if (attrName == SVGNames::offsetAttr)
+ synchronizeOffset();
+}
+
ComponentTransferFunction SVGComponentTransferFunctionElement::transferFunction() const
{
ComponentTransferFunction func;
@@ -100,6 +126,4 @@ ComponentTransferFunction SVGComponentTransferFunctionElement::transferFunction(
}
-// vim:ts=4:noet
#endif // ENABLE(SVG)
-
diff --git a/WebCore/svg/SVGComponentTransferFunctionElement.h b/WebCore/svg/SVGComponentTransferFunctionElement.h
index c955df5..9862a99 100644
--- a/WebCore/svg/SVGComponentTransferFunctionElement.h
+++ b/WebCore/svg/SVGComponentTransferFunctionElement.h
@@ -29,25 +29,24 @@
namespace WebCore {
- extern char SVGComponentTransferFunctionElementIdentifier[];
-
class SVGComponentTransferFunctionElement : public SVGElement {
public:
SVGComponentTransferFunctionElement(const QualifiedName&, Document*);
virtual ~SVGComponentTransferFunctionElement();
- virtual void parseMappedAttribute(MappedAttribute* attr);
+ virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
ComponentTransferFunction transferFunction() const;
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGComponentTransferFunctionElement, SVGComponentTransferFunctionElementIdentifier, SVGNames::typeAttrString, int, Type, type)
- ANIMATED_PROPERTY_DECLARATIONS(SVGComponentTransferFunctionElement, SVGComponentTransferFunctionElementIdentifier, SVGNames::tableValuesAttrString, SVGNumberList, TableValues, tableValues)
- ANIMATED_PROPERTY_DECLARATIONS(SVGComponentTransferFunctionElement, SVGComponentTransferFunctionElementIdentifier, SVGNames::slopeAttrString, float, Slope, slope)
- ANIMATED_PROPERTY_DECLARATIONS(SVGComponentTransferFunctionElement, SVGComponentTransferFunctionElementIdentifier, SVGNames::interceptAttrString, float, Intercept, intercept)
- ANIMATED_PROPERTY_DECLARATIONS(SVGComponentTransferFunctionElement, SVGComponentTransferFunctionElementIdentifier, SVGNames::amplitudeAttrString, float, Amplitude, amplitude)
- ANIMATED_PROPERTY_DECLARATIONS(SVGComponentTransferFunctionElement, SVGComponentTransferFunctionElementIdentifier, SVGNames::exponentAttrString, float, Exponent, exponent)
- ANIMATED_PROPERTY_DECLARATIONS(SVGComponentTransferFunctionElement, SVGComponentTransferFunctionElementIdentifier, SVGNames::offsetAttrString, float, Offset, offset)
+ DECLARE_ANIMATED_PROPERTY(SVGComponentTransferFunctionElement, SVGNames::typeAttr, int, Type, type)
+ DECLARE_ANIMATED_PROPERTY(SVGComponentTransferFunctionElement, SVGNames::tableValuesAttr, SVGNumberList*, TableValues, tableValues)
+ DECLARE_ANIMATED_PROPERTY(SVGComponentTransferFunctionElement, SVGNames::slopeAttr, float, Slope, slope)
+ DECLARE_ANIMATED_PROPERTY(SVGComponentTransferFunctionElement, SVGNames::interceptAttr, float, Intercept, intercept)
+ DECLARE_ANIMATED_PROPERTY(SVGComponentTransferFunctionElement, SVGNames::amplitudeAttr, float, Amplitude, amplitude)
+ DECLARE_ANIMATED_PROPERTY(SVGComponentTransferFunctionElement, SVGNames::exponentAttr, float, Exponent, exponent)
+ DECLARE_ANIMATED_PROPERTY(SVGComponentTransferFunctionElement, SVGNames::offsetAttr, float, Offset, offset)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGComponentTransferFunctionElement.idl b/WebCore/svg/SVGComponentTransferFunctionElement.idl
index 0868175..950f77d 100644
--- a/WebCore/svg/SVGComponentTransferFunctionElement.idl
+++ b/WebCore/svg/SVGComponentTransferFunctionElement.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG&FILTERS, GenerateConstructor] SVGComponentTransferFunctionElement : SVGElement {
+ interface [Conditional=SVG&FILTERS] SVGComponentTransferFunctionElement : SVGElement {
// Component Transfer Types
const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0;
const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1;
diff --git a/WebCore/svg/SVGCursorElement.cpp b/WebCore/svg/SVGCursorElement.cpp
index f5aa615..e904516 100644
--- a/WebCore/svg/SVGCursorElement.cpp
+++ b/WebCore/svg/SVGCursorElement.cpp
@@ -36,10 +36,8 @@ SVGCursorElement::SVGCursorElement(const QualifiedName& tagName, Document* doc)
, SVGTests()
, SVGExternalResourcesRequired()
, SVGURIReference()
- , m_x(this, SVGNames::xAttr, LengthModeWidth)
- , m_y(this, SVGNames::yAttr, LengthModeHeight)
- , m_href(this, XLinkNames::hrefAttr)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
+ , m_x(LengthModeWidth)
+ , m_y(LengthModeHeight)
{
}
@@ -96,6 +94,28 @@ void SVGCursorElement::svgAttributeChanged(const QualifiedName& attrName)
}
}
+void SVGCursorElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeX();
+ synchronizeY();
+ synchronizeExternalResourcesRequired();
+ synchronizeHref();
+ return;
+ }
+
+ if (attrName == SVGNames::xAttr)
+ synchronizeX();
+ else if (attrName == SVGNames::yAttr)
+ synchronizeY();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+ else if (SVGURIReference::isKnownAttribute(attrName))
+ synchronizeHref();
+}
+
void SVGCursorElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
{
SVGElement::addSubresourceAttributeURLs(urls);
diff --git a/WebCore/svg/SVGCursorElement.h b/WebCore/svg/SVGCursorElement.h
index ee919a4..0978124 100644
--- a/WebCore/svg/SVGCursorElement.h
+++ b/WebCore/svg/SVGCursorElement.h
@@ -45,20 +45,19 @@ namespace WebCore {
virtual void parseMappedAttribute(MappedAttribute*);
virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGCursorElement, SVGNames::cursorTagString, SVGNames::xAttrString, SVGLength, X, x)
- ANIMATED_PROPERTY_DECLARATIONS(SVGCursorElement, SVGNames::cursorTagString, SVGNames::yAttrString, SVGLength, Y, y)
+ DECLARE_ANIMATED_PROPERTY(SVGCursorElement, SVGNames::xAttr, SVGLength, X, x)
+ DECLARE_ANIMATED_PROPERTY(SVGCursorElement, SVGNames::yAttr, SVGLength, Y, y)
// SVGURIReference
- ANIMATED_PROPERTY_DECLARATIONS(SVGCursorElement, SVGURIReferenceIdentifier, XLinkNames::hrefAttrString, String, Href, href)
+ DECLARE_ANIMATED_PROPERTY(SVGCursorElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGCursorElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGCursorElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
HashSet<SVGElement*> m_clients;
};
diff --git a/WebCore/svg/SVGDefsElement.cpp b/WebCore/svg/SVGDefsElement.cpp
index 051edeb..e7bf51d 100644
--- a/WebCore/svg/SVGDefsElement.cpp
+++ b/WebCore/svg/SVGDefsElement.cpp
@@ -32,7 +32,6 @@ SVGDefsElement::SVGDefsElement(const QualifiedName& tagName, Document* doc)
, SVGTests()
, SVGLangSpace()
, SVGExternalResourcesRequired()
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
{
}
@@ -50,6 +49,14 @@ RenderObject* SVGDefsElement::createRenderer(RenderArena* arena, RenderStyle*)
return new (arena) RenderSVGHiddenContainer(this);
}
+void SVGDefsElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledTransformableElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName() || SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+}
+
}
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGDefsElement.h b/WebCore/svg/SVGDefsElement.h
index 4bb206e..cb62d45 100644
--- a/WebCore/svg/SVGDefsElement.h
+++ b/WebCore/svg/SVGDefsElement.h
@@ -40,12 +40,11 @@ namespace WebCore {
virtual bool isValid() const;
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+ virtual void synchronizeProperty(const QualifiedName&);
private:
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGDefsElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGDefsElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGDocument.cpp b/WebCore/svg/SVGDocument.cpp
index fe8ab80..2264a11 100644
--- a/WebCore/svg/SVGDocument.cpp
+++ b/WebCore/svg/SVGDocument.cpp
@@ -36,7 +36,7 @@
namespace WebCore {
SVGDocument::SVGDocument(Frame* frame)
- : Document(frame, false)
+ : Document(frame, false, false)
{
}
diff --git a/WebCore/svg/SVGDocumentExtensions.h b/WebCore/svg/SVGDocumentExtensions.h
index b66e2dc..050e6f6 100644
--- a/WebCore/svg/SVGDocumentExtensions.h
+++ b/WebCore/svg/SVGDocumentExtensions.h
@@ -31,15 +31,11 @@
#include "StringHash.h"
#include "StringImpl.h"
-#include "SVGAnimatedTemplate.h"
namespace WebCore {
class Document;
-class EventListener;
-class Node;
class String;
-class SVGElementInstance;
class SVGStyledElement;
class SVGSMILElement;
class SVGSVGElement;
@@ -68,13 +64,6 @@ private:
SVGDocumentExtensions(const SVGDocumentExtensions&);
SVGDocumentExtensions& operator=(const SVGDocumentExtensions&);
- template<typename ValueType>
- HashMap<const SVGElement*, HashMap<StringImpl*, ValueType>*>* baseValueMap() const
- {
- static HashMap<const SVGElement*, HashMap<StringImpl*, ValueType>*>* s_baseValueMap = new HashMap<const SVGElement*, HashMap<StringImpl*, ValueType>*>();
- return s_baseValueMap;
- }
-
public:
// This HashMap contains a list of pending resources. Pending resources, are such
// which are referenced by any object in the SVG document, but do NOT exist yet.
@@ -82,52 +71,9 @@ public:
void addPendingResource(const AtomicString& id, SVGStyledElement*);
bool isPendingResource(const AtomicString& id) const;
std::auto_ptr<HashSet<SVGStyledElement*> > removePendingResource(const AtomicString& id);
-
- // Used by the ANIMATED_PROPERTY_* macros
- template<typename ValueType>
- ValueType baseValue(const SVGElement* element, const AtomicString& propertyName) const
- {
- HashMap<StringImpl*, ValueType>* propertyMap = baseValueMap<ValueType>()->get(element);
- if (propertyMap)
- return propertyMap->get(propertyName.impl());
-
- return SVGAnimatedTypeValue<ValueType>::null();
- }
-
- template<typename ValueType>
- void setBaseValue(const SVGElement* element, const AtomicString& propertyName, ValueType newValue)
- {
- HashMap<StringImpl*, ValueType>* propertyMap = baseValueMap<ValueType>()->get(element);
- if (!propertyMap) {
- propertyMap = new HashMap<StringImpl*, ValueType>();
- baseValueMap<ValueType>()->set(element, propertyMap);
- }
-
- propertyMap->set(propertyName.impl(), newValue);
- }
-
- template<typename ValueType>
- void removeBaseValue(const SVGElement* element, const AtomicString& propertyName)
- {
- HashMap<StringImpl*, ValueType>* propertyMap = baseValueMap<ValueType>()->get(element);
- if (!propertyMap)
- return;
-
- propertyMap->remove(propertyName.impl());
- }
-
- template<typename ValueType>
- bool hasBaseValue(const SVGElement* element, const AtomicString& propertyName) const
- {
- HashMap<StringImpl*, ValueType>* propertyMap = baseValueMap<ValueType>()->get(element);
- if (propertyMap)
- return propertyMap->contains(propertyName.impl());
-
- return false;
- }
};
}
-#endif // ENABLE(SVG)
+#endif
#endif
diff --git a/WebCore/svg/SVGElement.cpp b/WebCore/svg/SVGElement.cpp
index 27e8c04..19c5f3b 100644
--- a/WebCore/svg/SVGElement.cpp
+++ b/WebCore/svg/SVGElement.cpp
@@ -38,8 +38,8 @@
#include "RegisteredEventListener.h"
#include "RenderObject.h"
#include "SVGCursorElement.h"
-#include "SVGDocumentExtensions.h"
#include "SVGElementInstance.h"
+#include "SVGElementRareData.h"
#include "SVGNames.h"
#include "SVGResource.h"
#include "SVGSVGElement.h"
@@ -54,9 +54,6 @@ using namespace HTMLNames;
SVGElement::SVGElement(const QualifiedName& tagName, Document* document)
: StyledElement(tagName, document, CreateElementZeroRefCount)
- , m_shadowParent(0)
- , m_cursorElement(0)
- , m_cursorImageValue(0)
{
}
@@ -67,10 +64,40 @@ PassRefPtr<SVGElement> SVGElement::create(const QualifiedName& tagName, Document
SVGElement::~SVGElement()
{
- if (m_cursorElement)
- m_cursorElement->removeClient(this);
- if (m_cursorImageValue)
- m_cursorImageValue->removeReferencedElement(this);
+ if (!hasRareSVGData())
+ ASSERT(!SVGElementRareData::rareDataMap().contains(this));
+ else {
+ SVGElementRareData::SVGElementRareDataMap& rareDataMap = SVGElementRareData::rareDataMap();
+ SVGElementRareData::SVGElementRareDataMap::iterator it = rareDataMap.find(this);
+ ASSERT(it != rareDataMap.end());
+
+ SVGElementRareData* rareData = it->second;
+ if (SVGCursorElement* cursorElement = rareData->cursorElement())
+ cursorElement->removeClient(this);
+ if (CSSCursorImageValue* cursorImageValue = rareData->cursorImageValue())
+ cursorImageValue->removeReferencedElement(this);
+
+ delete rareData;
+ rareDataMap.remove(it);
+ }
+}
+
+SVGElementRareData* SVGElement::rareSVGData() const
+{
+ ASSERT(hasRareSVGData());
+ return SVGElementRareData::rareDataFromMap(this);
+}
+
+SVGElementRareData* SVGElement::ensureRareSVGData()
+{
+ if (hasRareSVGData())
+ return rareSVGData();
+
+ ASSERT(!SVGElementRareData::rareDataMap().contains(this));
+ SVGElementRareData* data = new SVGElementRareData;
+ SVGElementRareData::rareDataMap().set(this, data);
+ m_hasRareSVGData = true;
+ return data;
}
bool SVGElement::isSupported(StringImpl* feature, StringImpl* version) const
@@ -118,7 +145,6 @@ SVGElement* SVGElement::viewportElement() const
SVGDocumentExtensions* SVGElement::accessDocumentSVGExtensions() const
{
-
// This function is provided for use by SVGAnimatedProperty to avoid
// global inclusion of Document.h in SVG code.
return document() ? document()->accessSVGExtensions() : 0;
@@ -127,20 +153,41 @@ SVGDocumentExtensions* SVGElement::accessDocumentSVGExtensions() const
void SVGElement::mapInstanceToElement(SVGElementInstance* instance)
{
ASSERT(instance);
- ASSERT(!m_elementInstances.contains(instance));
- m_elementInstances.add(instance);
+
+ HashSet<SVGElementInstance*>& instances = ensureRareSVGData()->elementInstances();
+ ASSERT(!instances.contains(instance));
+
+ instances.add(instance);
}
void SVGElement::removeInstanceMapping(SVGElementInstance* instance)
{
ASSERT(instance);
- ASSERT(m_elementInstances.contains(instance));
- m_elementInstances.remove(instance);
+ ASSERT(hasRareSVGData());
+
+ HashSet<SVGElementInstance*>& instances = rareSVGData()->elementInstances();
+ ASSERT(instances.contains(instance));
+
+ instances.remove(instance);
}
-HashSet<SVGElementInstance*> SVGElement::instancesForElement() const
+const HashSet<SVGElementInstance*>& SVGElement::instancesForElement() const
{
- return m_elementInstances;
+ if (!hasRareSVGData()) {
+ DEFINE_STATIC_LOCAL(HashSet<SVGElementInstance*>, emptyInstances, ());
+ return emptyInstances;
+ }
+ return rareSVGData()->elementInstances();
+}
+
+void SVGElement::setCursorElement(SVGCursorElement* cursorElement)
+{
+ ensureRareSVGData()->setCursorElement(cursorElement);
+}
+
+void SVGElement::setCursorImageValue(CSSCursorImageValue* cursorImageValue)
+{
+ ensureRareSVGData()->setCursorImageValue(cursorImageValue);
}
void SVGElement::parseMappedAttribute(MappedAttribute* attr)
@@ -234,7 +281,7 @@ void SVGElement::insertedIntoDocument()
StyledElement::insertedIntoDocument();
SVGDocumentExtensions* extensions = document()->accessSVGExtensions();
- String resourceId = SVGURIReference::getTarget(getAttribute(idAttr));
+ String resourceId = SVGURIReference::getTarget(getAttribute(idAttributeName()));
if (extensions->isPendingResource(resourceId)) {
std::auto_ptr<HashSet<SVGStyledElement*> > clients(extensions->removePendingResource(resourceId));
if (clients->isEmpty())
@@ -260,7 +307,7 @@ void SVGElement::attributeChanged(Attribute* attr, bool preserveDecls)
svgAttributeChanged(attr->name());
}
-void SVGElement::updateAnimatedSVGAttribute(const String& name) const
+void SVGElement::updateAnimatedSVGAttribute(const QualifiedName& name) const
{
ASSERT(!m_areSVGAttributesValid);
@@ -269,23 +316,20 @@ void SVGElement::updateAnimatedSVGAttribute(const String& name) const
m_synchronizingSVGAttributes = true;
- if (name.isEmpty()) {
- m_propertyController.synchronizeAllProperties();
- setSynchronizedSVGAttributes(true);
- } else
- m_propertyController.synchronizeProperty(name);
+ const_cast<SVGElement*>(this)->synchronizeProperty(name);
+ if (name == anyQName())
+ m_areSVGAttributesValid = true;
m_synchronizingSVGAttributes = false;
}
-void SVGElement::setSynchronizedSVGAttributes(bool value) const
-{
- m_areSVGAttributesValid = value;
-}
-
ContainerNode* SVGElement::eventParentNode()
{
- return m_shadowParent ? m_shadowParent : StyledElement::eventParentNode();
+ if (Node* shadowParent = shadowParentNode()) {
+ ASSERT(shadowParent->isContainerNode());
+ return static_cast<ContainerNode*>(shadowParent);
+ }
+ return StyledElement::eventParentNode();
}
}
diff --git a/WebCore/svg/SVGElement.h b/WebCore/svg/SVGElement.h
index b247a74..679c265 100644
--- a/WebCore/svg/SVGElement.h
+++ b/WebCore/svg/SVGElement.h
@@ -23,17 +23,16 @@
#define SVGElement_h
#if ENABLE(SVG)
+#include "SVGDocumentExtensions.h"
#include "StyledElement.h"
-#include "SVGAnimatedProperty.h"
-#include "SynchronizablePropertyController.h"
namespace WebCore {
class CSSCursorImageValue;
class Document;
class SVGCursorElement;
- class SVGDocumentExtensions;
class SVGElementInstance;
+ class SVGElementRareData;
class SVGSVGElement;
class TransformationMatrix;
@@ -60,8 +59,6 @@ namespace WebCore {
virtual bool isGradientStop() const { return false; }
virtual bool isTextContent() const { return false; }
- void setShadowParentNode(ContainerNode* node) { m_shadowParent = node; }
-
// For SVGTests
virtual bool isValid() const { return true; }
@@ -69,19 +66,18 @@ namespace WebCore {
virtual bool childShouldCreateRenderer(Node*) const;
virtual void svgAttributeChanged(const QualifiedName&) { }
+ virtual void synchronizeProperty(const QualifiedName&) { }
void sendSVGLoadEventIfPossible(bool sendParentLoadEvents = false);
virtual TransformationMatrix* supplementalTransform() { return 0; }
- virtual void setSynchronizedSVGAttributes(bool) const;
+ void setSynchronizedSVGAttributes(bool value) { m_areSVGAttributesValid = value; }
- HashSet<SVGElementInstance*> instancesForElement() const;
+ const HashSet<SVGElementInstance*>& instancesForElement() const;
- void setCursorElement(SVGCursorElement* cursorElement) { m_cursorElement = cursorElement; }
- void setCursorImageValue(CSSCursorImageValue* cursorImageValue) { m_cursorImageValue = cursorImageValue; }
-
- SynchronizablePropertyController& propertyController() const { return m_propertyController; }
+ void setCursorElement(SVGCursorElement*);
+ void setCursorImageValue(CSSCursorImageValue*);
protected:
SVGElement(const QualifiedName&, Document*);
@@ -89,36 +85,30 @@ namespace WebCore {
virtual void finishParsingChildren();
virtual void insertedIntoDocument();
virtual void attributeChanged(Attribute*, bool preserveDecls = false);
- virtual void updateAnimatedSVGAttribute(const String&) const;
+ virtual void updateAnimatedSVGAttribute(const QualifiedName&) const;
+
+ SVGElementRareData* rareSVGData() const;
+ SVGElementRareData* ensureRareSVGData();
private:
friend class SVGElementInstance;
virtual bool isSVGElement() const { return true; }
-
virtual bool isSupported(StringImpl* feature, StringImpl* version) const;
-
- virtual bool isShadowNode() const { return m_shadowParent; }
- virtual Node* shadowParentNode() { return m_shadowParent; }
- virtual ContainerNode* eventParentNode();
+ virtual ContainerNode* eventParentNode();
virtual void buildPendingResource() { }
void mapInstanceToElement(SVGElementInstance*);
void removeInstanceMapping(SVGElementInstance*);
virtual bool haveLoadedRequiredResources();
-
- ContainerNode* m_shadowParent;
- mutable SynchronizablePropertyController m_propertyController;
-
- SVGCursorElement* m_cursorElement;
- CSSCursorImageValue* m_cursorImageValue;
-
- HashSet<SVGElementInstance*> m_elementInstances;
};
-} // namespace WebCore
+}
+
+// This file needs to be included after the SVGElement declaration
+#include "SVGAnimatedProperty.h"
-#endif // ENABLE(SVG)
-#endif // SVGElement_h
+#endif
+#endif
diff --git a/WebCore/svg/SVGElementInstance.cpp b/WebCore/svg/SVGElementInstance.cpp
index 46e8221..ca0a70c 100644
--- a/WebCore/svg/SVGElementInstance.cpp
+++ b/WebCore/svg/SVGElementInstance.cpp
@@ -1,5 +1,6 @@
/*
Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
+ Copyright (C) Research In Motion Limited 2010. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -33,26 +34,14 @@
#include <wtf/RefCountedLeakCounter.h>
-#if USE(JSC)
-#include "GCController.h"
-#endif
-
namespace WebCore {
#ifndef NDEBUG
static WTF::RefCountedLeakCounter instanceCounter("WebCoreSVGElementInstance");
#endif
-static EventTargetData& dummyEventTargetData()
-{
- DEFINE_STATIC_LOCAL(EventTargetData, dummyEventTargetData, ());
- dummyEventTargetData.eventListenerMap.clear();
- return dummyEventTargetData;
-}
-
SVGElementInstance::SVGElementInstance(SVGUseElement* useElement, PassRefPtr<SVGElement> originalElement)
- : m_needsUpdate(false)
- , m_useElement(useElement)
+ : m_useElement(useElement)
, m_element(originalElement)
, m_previousSibling(0)
, m_nextSibling(0)
@@ -93,20 +82,6 @@ void SVGElementInstance::setShadowTreeElement(SVGElement* element)
m_shadowTreeElement = element;
}
-void SVGElementInstance::forgetWrapper()
-{
-#if USE(JSC)
- // FIXME: This is fragile, as discussed with Sam. Need to find a better solution.
- // Think about the case where JS explicitely holds "var root = useElement.instanceRoot;".
- // We still have to recreate this wrapper somehow. The gc collection below, won't catch it.
-
- // If the use shadow tree has been rebuilt, just the JSSVGElementInstance objects
- // are still holding RefPtrs of SVGElementInstance objects, which prevent us to
- // be deleted (and the shadow tree is not destructed as well). Force JS GC.
- gcController().garbageCollectNow();
-#endif
-}
-
void SVGElementInstance::appendChild(PassRefPtr<SVGElementInstance> child)
{
appendChildToContainer<SVGElementInstance, SVGElementInstance>(child.get(), this);
@@ -117,52 +92,39 @@ void SVGElementInstance::invalidateAllInstancesOfElement(SVGElement* element)
if (!element)
return;
- HashSet<SVGElementInstance*> set = element->instancesForElement();
+ if (element->isStyled() && static_cast<SVGStyledElement*>(element)->instanceUpdatesBlocked())
+ return;
+
+ const HashSet<SVGElementInstance*>& set = element->instancesForElement();
if (set.isEmpty())
return;
- // Find all use elements referencing the instances - ask them _once_ to rebuild.
- HashSet<SVGElementInstance*>::const_iterator it = set.begin();
+ // Mark all use elements referencing 'element' for rebuilding
const HashSet<SVGElementInstance*>::const_iterator end = set.end();
-
- for (; it != end; ++it)
- (*it)->setNeedsUpdate(true);
-}
-
-void SVGElementInstance::setNeedsUpdate(bool value)
-{
- m_needsUpdate = value;
-
- if (m_needsUpdate)
- correspondingUseElement()->setNeedsStyleRecalc();
+ for (HashSet<SVGElementInstance*>::const_iterator it = set.begin(); it != end; ++it) {
+ ASSERT((*it)->correspondingElement() == element);
+ (*it)->correspondingUseElement()->invalidateShadowTree();
+ }
}
ScriptExecutionContext* SVGElementInstance::scriptExecutionContext() const
{
- if (SVGElement* element = correspondingElement())
- return element->document();
- return 0;
+ return m_element->document();
}
bool SVGElementInstance::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
{
- if (!correspondingElement())
- return false;
- return correspondingElement()->addEventListener(eventType, listener, useCapture);
+ return m_element->addEventListener(eventType, listener, useCapture);
}
bool SVGElementInstance::removeEventListener(const AtomicString& eventType, EventListener* listener, bool useCapture)
{
- if (!correspondingElement())
- return false;
- return correspondingElement()->removeEventListener(eventType, listener, useCapture);
+ return m_element->removeEventListener(eventType, listener, useCapture);
}
void SVGElementInstance::removeAllEventListeners()
{
- if (!correspondingElement())
- return;
- correspondingElement()->removeAllEventListeners();
+ m_element->removeAllEventListeners();
}
bool SVGElementInstance::dispatchEvent(PassRefPtr<Event> prpEvent)
@@ -182,14 +144,17 @@ bool SVGElementInstance::dispatchEvent(PassRefPtr<Event> prpEvent)
EventTargetData* SVGElementInstance::eventTargetData()
{
- return correspondingElement() ? correspondingElement()->eventTargetData() : 0;
+ return m_element->eventTargetData();
}
EventTargetData* SVGElementInstance::ensureEventTargetData()
{
- return &dummyEventTargetData(); // return something, so we don't crash
+ // Avoid crashing - return a default dummy value
+ DEFINE_STATIC_LOCAL(EventTargetData, dummyEventTargetData, ());
+ dummyEventTargetData.eventListenerMap.clear();
+ return &dummyEventTargetData;
}
-} // namespace WebCore
+}
-#endif // ENABLE(SVG)
+#endif
diff --git a/WebCore/svg/SVGElementInstance.h b/WebCore/svg/SVGElementInstance.h
index 3cdc761..58152be 100644
--- a/WebCore/svg/SVGElementInstance.h
+++ b/WebCore/svg/SVGElementInstance.h
@@ -46,9 +46,6 @@ namespace WebCore {
virtual ~SVGElementInstance();
- bool needsUpdate() const { return m_needsUpdate; }
- void setNeedsUpdate(bool);
-
virtual ScriptExecutionContext* scriptExecutionContext() const;
virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture);
@@ -129,7 +126,6 @@ namespace WebCore {
void appendChild(PassRefPtr<SVGElementInstance> child);
void setShadowTreeElement(SVGElement*);
- void forgetWrapper();
template<class GenericNode, class GenericNodeContainer>
friend void appendChildToContainer(GenericNode* child, GenericNodeContainer* container);
@@ -153,8 +149,6 @@ namespace WebCore {
virtual EventTargetData* eventTargetData();
virtual EventTargetData* ensureEventTargetData();
- bool m_needsUpdate : 1;
-
SVGUseElement* m_useElement;
RefPtr<SVGElement> m_element;
RefPtr<SVGElement> m_shadowTreeElement;
diff --git a/WebCore/svg/SVGElementRareData.h b/WebCore/svg/SVGElementRareData.h
new file mode 100644
index 0000000..4e7f671
--- /dev/null
+++ b/WebCore/svg/SVGElementRareData.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef SVGElementRareData_h
+#define SVGElementRareData_h
+
+#include <wtf/HashSet.h>
+#include <wtf/Noncopyable.h>
+#include <wtf/StdLibExtras.h>
+
+namespace WebCore {
+
+class CSSCursorImageValue;
+class SVGCursorElement;
+class SVGElement;
+class SVGElementInstance;
+
+class SVGElementRareData : public Noncopyable {
+public:
+ SVGElementRareData()
+ : m_cursorElement(0)
+ , m_cursorImageValue(0)
+ , m_instancesUpdatesBlocked(false)
+ {
+ }
+
+ typedef HashMap<const SVGElement*, SVGElementRareData*> SVGElementRareDataMap;
+
+ static SVGElementRareDataMap& rareDataMap()
+ {
+ DEFINE_STATIC_LOCAL(SVGElementRareDataMap, rareDataMap, ());
+ return rareDataMap;
+ }
+
+ static SVGElementRareData* rareDataFromMap(const SVGElement* element)
+ {
+ return rareDataMap().get(element);
+ }
+
+ HashSet<SVGElementInstance*>& elementInstances() { return m_elementInstances; }
+ const HashSet<SVGElementInstance*>& elementInstances() const { return m_elementInstances; }
+
+ bool instanceUpdatesBlocked() const { return m_instancesUpdatesBlocked; }
+ void setInstanceUpdatesBlocked(bool value) { m_instancesUpdatesBlocked = value; }
+
+ SVGCursorElement* cursorElement() const { return m_cursorElement; }
+ void setCursorElement(SVGCursorElement* cursorElement) { m_cursorElement = cursorElement; }
+
+ CSSCursorImageValue* cursorImageValue() const { return m_cursorImageValue; }
+ void setCursorImageValue(CSSCursorImageValue* cursorImageValue) { m_cursorImageValue = cursorImageValue; }
+
+private:
+ HashSet<SVGElementInstance*> m_elementInstances;
+ SVGCursorElement* m_cursorElement;
+ CSSCursorImageValue* m_cursorImageValue;
+ bool m_instancesUpdatesBlocked : 1;
+};
+
+}
+
+#endif
diff --git a/WebCore/svg/SVGEllipseElement.cpp b/WebCore/svg/SVGEllipseElement.cpp
index 3946fb9..a7400fa 100644
--- a/WebCore/svg/SVGEllipseElement.cpp
+++ b/WebCore/svg/SVGEllipseElement.cpp
@@ -36,11 +36,10 @@ SVGEllipseElement::SVGEllipseElement(const QualifiedName& tagName, Document* doc
, SVGTests()
, SVGLangSpace()
, SVGExternalResourcesRequired()
- , m_cx(this, SVGNames::cxAttr, LengthModeWidth)
- , m_cy(this, SVGNames::cyAttr, LengthModeHeight)
- , m_rx(this, SVGNames::rxAttr, LengthModeWidth)
- , m_ry(this, SVGNames::ryAttr, LengthModeHeight)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
+ , m_cx(LengthModeWidth)
+ , m_cy(LengthModeHeight)
+ , m_rx(LengthModeWidth)
+ , m_ry(LengthModeHeight)
{
}
@@ -89,6 +88,31 @@ void SVGEllipseElement::svgAttributeChanged(const QualifiedName& attrName)
renderer()->setNeedsLayout(true);
}
+void SVGEllipseElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledTransformableElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeCx();
+ synchronizeCy();
+ synchronizeRx();
+ synchronizeRy();
+ synchronizeExternalResourcesRequired();
+ return;
+ }
+
+ if (attrName == SVGNames::cxAttr)
+ synchronizeCx();
+ else if (attrName == SVGNames::cyAttr)
+ synchronizeCy();
+ else if (attrName == SVGNames::rxAttr)
+ synchronizeRx();
+ else if (attrName == SVGNames::ryAttr)
+ synchronizeRy();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+}
+
Path SVGEllipseElement::toPathData() const
{
return Path::createEllipse(FloatPoint(cx().value(this), cy().value(this)),
diff --git a/WebCore/svg/SVGEllipseElement.h b/WebCore/svg/SVGEllipseElement.h
index 5b54fd5..adaa0d2 100644
--- a/WebCore/svg/SVGEllipseElement.h
+++ b/WebCore/svg/SVGEllipseElement.h
@@ -41,6 +41,7 @@ namespace WebCore {
virtual void parseMappedAttribute(MappedAttribute*);
virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual Path toPathData() const;
@@ -48,15 +49,13 @@ namespace WebCore {
virtual bool hasRelativeValues() const;
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGEllipseElement, SVGNames::ellipseTagString, SVGNames::cxAttrString, SVGLength, Cx, cx)
- ANIMATED_PROPERTY_DECLARATIONS(SVGEllipseElement, SVGNames::ellipseTagString, SVGNames::cyAttrString, SVGLength, Cy, cy)
- ANIMATED_PROPERTY_DECLARATIONS(SVGEllipseElement, SVGNames::ellipseTagString, SVGNames::rxAttrString, SVGLength, Rx, rx)
- ANIMATED_PROPERTY_DECLARATIONS(SVGEllipseElement, SVGNames::ellipseTagString, SVGNames::ryAttrString, SVGLength, Ry, ry)
+ DECLARE_ANIMATED_PROPERTY(SVGEllipseElement, SVGNames::cxAttr, SVGLength, Cx, cx)
+ DECLARE_ANIMATED_PROPERTY(SVGEllipseElement, SVGNames::cyAttr, SVGLength, Cy, cy)
+ DECLARE_ANIMATED_PROPERTY(SVGEllipseElement, SVGNames::rxAttr, SVGLength, Rx, rx)
+ DECLARE_ANIMATED_PROPERTY(SVGEllipseElement, SVGNames::ryAttr, SVGLength, Ry, ry)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGEllipseElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGEllipseElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGException.idl b/WebCore/svg/SVGException.idl
index 233f653..db565ff 100644
--- a/WebCore/svg/SVGException.idl
+++ b/WebCore/svg/SVGException.idl
@@ -21,8 +21,7 @@
module svg {
interface [
- Conditional=SVG,
- GenerateConstructor
+ Conditional=SVG
] SVGException {
readonly attribute unsigned short code;
diff --git a/WebCore/svg/SVGExternalResourcesRequired.cpp b/WebCore/svg/SVGExternalResourcesRequired.cpp
index b6b62d1..99bc5eb 100644
--- a/WebCore/svg/SVGExternalResourcesRequired.cpp
+++ b/WebCore/svg/SVGExternalResourcesRequired.cpp
@@ -30,8 +30,6 @@
namespace WebCore {
-char SVGExternalResourcesRequiredIdentifier[] = "SVGExternalResourcesRequired";
-
SVGExternalResourcesRequired::SVGExternalResourcesRequired()
{
}
diff --git a/WebCore/svg/SVGExternalResourcesRequired.h b/WebCore/svg/SVGExternalResourcesRequired.h
index f088c82..b2a741d 100644
--- a/WebCore/svg/SVGExternalResourcesRequired.h
+++ b/WebCore/svg/SVGExternalResourcesRequired.h
@@ -27,7 +27,6 @@
namespace WebCore {
- extern char SVGExternalResourcesRequiredIdentifier[];
class MappedAttribute;
// Notes on a SVG 1.1 spec discrepancy:
@@ -44,7 +43,7 @@ namespace WebCore {
bool isKnownAttribute(const QualifiedName&);
protected:
- virtual void setExternalResourcesRequiredBaseValue(SVGAnimatedTypeValue<bool>::DecoratedType type) = 0;
+ virtual void setExternalResourcesRequiredBaseValue(SVGAnimatedPropertyTraits<bool>::PassType) = 0;
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGExternalResourcesRequired.idl b/WebCore/svg/SVGExternalResourcesRequired.idl
index 6600939..c1a0352 100644
--- a/WebCore/svg/SVGExternalResourcesRequired.idl
+++ b/WebCore/svg/SVGExternalResourcesRequired.idl
@@ -26,7 +26,7 @@
module svg {
- interface [Conditional=SVG, ObjCProtocol] SVGExternalResourcesRequired {
+ interface [Conditional=SVG, ObjCProtocol, OmitConstructor] SVGExternalResourcesRequired {
readonly attribute SVGAnimatedBoolean externalResourcesRequired;
};
diff --git a/WebCore/svg/SVGFEBlendElement.cpp b/WebCore/svg/SVGFEBlendElement.cpp
index 03c5795..46c412c 100644
--- a/WebCore/svg/SVGFEBlendElement.cpp
+++ b/WebCore/svg/SVGFEBlendElement.cpp
@@ -30,9 +30,7 @@ namespace WebCore {
SVGFEBlendElement::SVGFEBlendElement(const QualifiedName& tagName, Document* doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , m_in1(this, SVGNames::inAttr)
- , m_in2(this, SVGNames::in2Attr)
- , m_mode(this, SVGNames::modeAttr, FEBLEND_MODE_NORMAL)
+ , m_mode(FEBLEND_MODE_NORMAL)
{
}
@@ -62,6 +60,25 @@ void SVGFEBlendElement::parseMappedAttribute(MappedAttribute* attr)
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
+void SVGFEBlendElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeMode();
+ synchronizeIn1();
+ synchronizeIn2();
+ return;
+ }
+
+ if (attrName == SVGNames::modeAttr)
+ synchronizeMode();
+ else if (attrName == SVGNames::inAttr)
+ synchronizeIn1();
+ else if (attrName == SVGNames::in2Attr)
+ synchronizeIn2();
+}
+
bool SVGFEBlendElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
diff --git a/WebCore/svg/SVGFEBlendElement.h b/WebCore/svg/SVGFEBlendElement.h
index c32eabd..7e32244 100644
--- a/WebCore/svg/SVGFEBlendElement.h
+++ b/WebCore/svg/SVGFEBlendElement.h
@@ -32,12 +32,13 @@ namespace WebCore {
virtual ~SVGFEBlendElement();
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool build(SVGResourceFilter*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEBlendElement, SVGNames::feBlendTagString, SVGNames::inAttrString, String, In1, in1)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEBlendElement, SVGNames::feBlendTagString, SVGNames::in2AttrString, String, In2, in2)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEBlendElement, SVGNames::feBlendTagString, SVGNames::modeAttrString, int, Mode, mode)
+ 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)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEBlendElement.idl b/WebCore/svg/SVGFEBlendElement.idl
index 4c1a18b..bb6d86d 100644
--- a/WebCore/svg/SVGFEBlendElement.idl
+++ b/WebCore/svg/SVGFEBlendElement.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG&FILTERS, GenerateConstructor] SVGFEBlendElement : SVGElement,
+ interface [Conditional=SVG&FILTERS] SVGFEBlendElement : SVGElement,
SVGFilterPrimitiveStandardAttributes {
// Blend Mode Types
const unsigned short SVG_FEBLEND_MODE_UNKNOWN = 0;
diff --git a/WebCore/svg/SVGFEColorMatrixElement.cpp b/WebCore/svg/SVGFEColorMatrixElement.cpp
index 88a0d66..e27ad86 100644
--- a/WebCore/svg/SVGFEColorMatrixElement.cpp
+++ b/WebCore/svg/SVGFEColorMatrixElement.cpp
@@ -32,9 +32,8 @@ namespace WebCore {
SVGFEColorMatrixElement::SVGFEColorMatrixElement(const QualifiedName& tagName, Document* doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , m_in1(this, SVGNames::inAttr)
- , m_type(this, SVGNames::typeAttr, FECOLORMATRIX_TYPE_UNKNOWN)
- , m_values(this, SVGNames::valuesAttr, SVGNumberList::create(SVGNames::valuesAttr))
+ , m_type(FECOLORMATRIX_TYPE_UNKNOWN)
+ , m_values(SVGNumberList::create(SVGNames::valuesAttr))
{
}
@@ -63,6 +62,25 @@ void SVGFEColorMatrixElement::parseMappedAttribute(MappedAttribute* attr)
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
+void SVGFEColorMatrixElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeType();
+ synchronizeIn1();
+ synchronizeValues();
+ return;
+ }
+
+ if (attrName == SVGNames::typeAttr)
+ synchronizeType();
+ else if (attrName == SVGNames::inAttr)
+ synchronizeIn1();
+ else if (attrName == SVGNames::valuesAttr)
+ synchronizeValues();
+}
+
bool SVGFEColorMatrixElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
diff --git a/WebCore/svg/SVGFEColorMatrixElement.h b/WebCore/svg/SVGFEColorMatrixElement.h
index f3329e4..811494d 100644
--- a/WebCore/svg/SVGFEColorMatrixElement.h
+++ b/WebCore/svg/SVGFEColorMatrixElement.h
@@ -34,12 +34,13 @@ namespace WebCore {
virtual ~SVGFEColorMatrixElement();
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool build(SVGResourceFilter*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEColorMatrixElement, SVGNames::feColorMatrixTagString, SVGNames::inAttrString, String, In1, in1)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEColorMatrixElement, SVGNames::feColorMatrixTagString, SVGNames::typeAttrString, int, Type, type)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEColorMatrixElement, SVGNames::feColorMatrixTagString, SVGNames::valuesAttrString, SVGNumberList, Values, values)
+ 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)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEColorMatrixElement.idl b/WebCore/svg/SVGFEColorMatrixElement.idl
index c116fe7..d704906 100644
--- a/WebCore/svg/SVGFEColorMatrixElement.idl
+++ b/WebCore/svg/SVGFEColorMatrixElement.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG&FILTERS, GenerateConstructor] SVGFEColorMatrixElement : SVGElement,
+ interface [Conditional=SVG&FILTERS] SVGFEColorMatrixElement : SVGElement,
SVGFilterPrimitiveStandardAttributes {
// Color Matrix Types
const unsigned short SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
diff --git a/WebCore/svg/SVGFEComponentTransferElement.cpp b/WebCore/svg/SVGFEComponentTransferElement.cpp
index f1df08c..4cda9c9 100644
--- a/WebCore/svg/SVGFEComponentTransferElement.cpp
+++ b/WebCore/svg/SVGFEComponentTransferElement.cpp
@@ -37,7 +37,6 @@ namespace WebCore {
SVGFEComponentTransferElement::SVGFEComponentTransferElement(const QualifiedName& tagName, Document* doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , m_in1(this, SVGNames::inAttr)
{
}
@@ -54,6 +53,14 @@ void SVGFEComponentTransferElement::parseMappedAttribute(MappedAttribute* attr)
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
+void SVGFEComponentTransferElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
+
+ if (attrName == anyQName() || attrName == SVGNames::inAttr)
+ synchronizeIn1();
+}
+
bool SVGFEComponentTransferElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
diff --git a/WebCore/svg/SVGFEComponentTransferElement.h b/WebCore/svg/SVGFEComponentTransferElement.h
index 46d6d9d..b1d9373 100644
--- a/WebCore/svg/SVGFEComponentTransferElement.h
+++ b/WebCore/svg/SVGFEComponentTransferElement.h
@@ -33,10 +33,11 @@ namespace WebCore {
virtual ~SVGFEComponentTransferElement();
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool build(SVGResourceFilter*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEComponentTransferElement, SVGNames::feComponentTransferTagString, SVGNames::inAttrString, String, In1, in1)
+ DECLARE_ANIMATED_PROPERTY(SVGFEComponentTransferElement, SVGNames::inAttr, String, In1, in1)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFECompositeElement.cpp b/WebCore/svg/SVGFECompositeElement.cpp
index a2dd05a..734c2fe 100644
--- a/WebCore/svg/SVGFECompositeElement.cpp
+++ b/WebCore/svg/SVGFECompositeElement.cpp
@@ -31,13 +31,7 @@ namespace WebCore {
SVGFECompositeElement::SVGFECompositeElement(const QualifiedName& tagName, Document* doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , m_in1(this, SVGNames::inAttr)
- , m_in2(this, SVGNames::in2Attr)
- , m__operator(this, SVGNames::operatorAttr, FECOMPOSITE_OPERATOR_OVER)
- , m_k1(this, SVGNames::k1Attr)
- , m_k2(this, SVGNames::k2Attr)
- , m_k3(this, SVGNames::k3Attr)
- , m_k4(this, SVGNames::k4Attr)
+ , m__operator(FECOMPOSITE_OPERATOR_OVER)
{
}
@@ -61,8 +55,7 @@ void SVGFECompositeElement::parseMappedAttribute(MappedAttribute *attr)
set_operatorBaseValue(FECOMPOSITE_OPERATOR_XOR);
else if (value == "arithmetic")
set_operatorBaseValue(FECOMPOSITE_OPERATOR_ARITHMETIC);
- }
- else if (attr->name() == SVGNames::inAttr)
+ } else if (attr->name() == SVGNames::inAttr)
setIn1BaseValue(value);
else if (attr->name() == SVGNames::in2Attr)
setIn2BaseValue(value);
@@ -78,6 +71,37 @@ void SVGFECompositeElement::parseMappedAttribute(MappedAttribute *attr)
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
+void SVGFECompositeElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronize_operator();
+ synchronizeIn1();
+ synchronizeIn2();
+ synchronizeK1();
+ synchronizeK2();
+ synchronizeK3();
+ synchronizeK4();
+ return;
+ }
+
+ if (attrName == SVGNames::operatorAttr)
+ synchronize_operator();
+ else if (attrName == SVGNames::inAttr)
+ synchronizeIn1();
+ else if (attrName == SVGNames::in2Attr)
+ synchronizeIn2();
+ else if (attrName == SVGNames::k1Attr)
+ synchronizeK1();
+ else if (attrName == SVGNames::k2Attr)
+ synchronizeK2();
+ else if (attrName == SVGNames::k3Attr)
+ synchronizeK3();
+ else if (attrName == SVGNames::k4Attr)
+ synchronizeK4();
+}
+
bool SVGFECompositeElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
diff --git a/WebCore/svg/SVGFECompositeElement.h b/WebCore/svg/SVGFECompositeElement.h
index 1bb6b05..c9fecc8 100644
--- a/WebCore/svg/SVGFECompositeElement.h
+++ b/WebCore/svg/SVGFECompositeElement.h
@@ -33,16 +33,17 @@ namespace WebCore {
virtual ~SVGFECompositeElement();
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool build(SVGResourceFilter*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFECompositeElement, SVGNames::feCompositeTagString, SVGNames::inAttrString, String, In1, in1)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFECompositeElement, SVGNames::feCompositeTagString, SVGNames::in2AttrString, String, In2, in2)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFECompositeElement, SVGNames::feCompositeTagString, SVGNames::operatorAttrString, int, _operator, _operator)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFECompositeElement, SVGNames::feCompositeTagString, SVGNames::k1AttrString, float, K1, k1)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFECompositeElement, SVGNames::feCompositeTagString, SVGNames::k2AttrString, float, K2, k2)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFECompositeElement, SVGNames::feCompositeTagString, SVGNames::k3AttrString, float, K3, k3)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFECompositeElement, SVGNames::feCompositeTagString, SVGNames::k4AttrString, float, K4, k4)
+ 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)
+ DECLARE_ANIMATED_PROPERTY(SVGFECompositeElement, SVGNames::k1Attr, float, K1, k1)
+ DECLARE_ANIMATED_PROPERTY(SVGFECompositeElement, SVGNames::k2Attr, float, K2, k2)
+ DECLARE_ANIMATED_PROPERTY(SVGFECompositeElement, SVGNames::k3Attr, float, K3, k3)
+ DECLARE_ANIMATED_PROPERTY(SVGFECompositeElement, SVGNames::k4Attr, float, K4, k4)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFECompositeElement.idl b/WebCore/svg/SVGFECompositeElement.idl
index d317997..d3adb25 100644
--- a/WebCore/svg/SVGFECompositeElement.idl
+++ b/WebCore/svg/SVGFECompositeElement.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG&FILTERS, GenerateConstructor] SVGFECompositeElement : SVGElement,
+ interface [Conditional=SVG&FILTERS] SVGFECompositeElement : SVGElement,
SVGFilterPrimitiveStandardAttributes {
// Composite Operators
const unsigned short SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0;
diff --git a/WebCore/svg/SVGFEDiffuseLightingElement.cpp b/WebCore/svg/SVGFEDiffuseLightingElement.cpp
index ed6e353..a3db66d 100644
--- a/WebCore/svg/SVGFEDiffuseLightingElement.cpp
+++ b/WebCore/svg/SVGFEDiffuseLightingElement.cpp
@@ -40,11 +40,8 @@ char SVGKernelUnitLengthYIdentifier[] = "SVGKernelUnitLengthY";
SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement(const QualifiedName& tagName, Document* doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , m_in1(this, SVGNames::inAttr)
- , m_diffuseConstant(this, SVGNames::diffuseConstantAttr, 1.0f)
- , m_surfaceScale(this, SVGNames::surfaceScaleAttr, 1.0f)
- , m_kernelUnitLengthX(this, SVGNames::kernelUnitLengthAttr)
- , m_kernelUnitLengthY(this, SVGNames::kernelUnitLengthAttr)
+ , m_diffuseConstant(1.0f)
+ , m_surfaceScale(1.0f)
{
}
@@ -71,6 +68,31 @@ void SVGFEDiffuseLightingElement::parseMappedAttribute(MappedAttribute *attr)
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
+void SVGFEDiffuseLightingElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeIn1();
+ synchronizeSurfaceScale();
+ synchronizeDiffuseConstant();
+ synchronizeKernelUnitLengthX();
+ synchronizeKernelUnitLengthY();
+ return;
+ }
+
+ if (attrName == SVGNames::inAttr)
+ synchronizeIn1();
+ else if (attrName == SVGNames::surfaceScaleAttr)
+ synchronizeSurfaceScale();
+ else if (attrName == SVGNames::diffuseConstantAttr)
+ synchronizeDiffuseConstant();
+ else if (attrName == SVGNames::kernelUnitLengthAttr) {
+ synchronizeKernelUnitLengthX();
+ synchronizeKernelUnitLengthY();
+ }
+}
+
bool SVGFEDiffuseLightingElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
diff --git a/WebCore/svg/SVGFEDiffuseLightingElement.h b/WebCore/svg/SVGFEDiffuseLightingElement.h
index ed117a4..2e1b8cf 100644
--- a/WebCore/svg/SVGFEDiffuseLightingElement.h
+++ b/WebCore/svg/SVGFEDiffuseLightingElement.h
@@ -40,14 +40,15 @@ namespace WebCore {
virtual ~SVGFEDiffuseLightingElement();
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool build(SVGResourceFilter*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEDiffuseLightingElement, SVGNames::feDiffuseLightingTagString, SVGNames::inAttrString, String, In1, in1)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEDiffuseLightingElement, SVGNames::feDiffuseLightingTagString, SVGNames::diffuseConstantAttrString, float, DiffuseConstant, diffuseConstant)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEDiffuseLightingElement, SVGNames::feDiffuseLightingTagString, SVGNames::surfaceScaleAttrString, float, SurfaceScale, surfaceScale)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEDiffuseLightingElement, SVGNames::feDiffuseLightingTagString, SVGKernelUnitLengthXIdentifier, float, KernelUnitLengthX, kernelUnitLengthX)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEDiffuseLightingElement, SVGNames::feDiffuseLightingTagString, SVGKernelUnitLengthYIdentifier, float, KernelUnitLengthY, kernelUnitLengthY)
+ 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)
+ DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFEDiffuseLightingElement, SVGNames::kernelUnitLengthAttr, SVGKernelUnitLengthXIdentifier, float, KernelUnitLengthX, kernelUnitLengthX)
+ DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFEDiffuseLightingElement, SVGNames::kernelUnitLengthAttr, SVGKernelUnitLengthYIdentifier, float, KernelUnitLengthY, kernelUnitLengthY)
PassRefPtr<LightSource> findLights() const;
};
diff --git a/WebCore/svg/SVGFEDisplacementMapElement.cpp b/WebCore/svg/SVGFEDisplacementMapElement.cpp
index adf02fe..b4fcb92 100644
--- a/WebCore/svg/SVGFEDisplacementMapElement.cpp
+++ b/WebCore/svg/SVGFEDisplacementMapElement.cpp
@@ -29,11 +29,8 @@ namespace WebCore {
SVGFEDisplacementMapElement::SVGFEDisplacementMapElement(const QualifiedName& tagName, Document* doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , m_in1(this, SVGNames::inAttr)
- , m_in2(this, SVGNames::in2Attr)
- , m_xChannelSelector(this, SVGNames::xChannelSelectorAttr, CHANNEL_A)
- , m_yChannelSelector(this, SVGNames::yChannelSelectorAttr, CHANNEL_A)
- , m_scale(this, SVGNames::scaleAttr)
+ , m_xChannelSelector(CHANNEL_A)
+ , m_yChannelSelector(CHANNEL_A)
{
}
@@ -72,6 +69,31 @@ void SVGFEDisplacementMapElement::parseMappedAttribute(MappedAttribute* attr)
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
+void SVGFEDisplacementMapElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeXChannelSelector();
+ synchronizeYChannelSelector();
+ synchronizeIn1();
+ synchronizeIn2();
+ synchronizeScale();
+ return;
+ }
+
+ if (attrName == SVGNames::xChannelSelectorAttr)
+ synchronizeXChannelSelector();
+ else if (attrName == SVGNames::yChannelSelectorAttr)
+ synchronizeYChannelSelector();
+ else if (attrName == SVGNames::inAttr)
+ synchronizeIn1();
+ else if (attrName == SVGNames::in2Attr)
+ synchronizeIn2();
+ else if (attrName == SVGNames::scaleAttr)
+ synchronizeScale();
+}
+
bool SVGFEDisplacementMapElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
diff --git a/WebCore/svg/SVGFEDisplacementMapElement.h b/WebCore/svg/SVGFEDisplacementMapElement.h
index 48e6930..95c6672 100644
--- a/WebCore/svg/SVGFEDisplacementMapElement.h
+++ b/WebCore/svg/SVGFEDisplacementMapElement.h
@@ -34,14 +34,15 @@ namespace WebCore {
static ChannelSelectorType stringToChannel(const String&);
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool build(SVGResourceFilter*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEDisplacementMapElement, SVGNames::feDisplacementMapTagString, SVGNames::inAttrString, String, In1, in1)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEDisplacementMapElement, SVGNames::feDisplacementMapTagString, SVGNames::in2AttrString, String, In2, in2)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEDisplacementMapElement, SVGNames::feDisplacementMapTagString, SVGNames::xChannelSelectorAttrString, int, XChannelSelector, xChannelSelector)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEDisplacementMapElement, SVGNames::feDisplacementMapTagString, SVGNames::yChannelSelectorAttrString, int, YChannelSelector, yChannelSelector)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEDisplacementMapElement, SVGNames::feDisplacementMapTagString, SVGNames::scaleAttrString, float, Scale, scale)
+ 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)
+ DECLARE_ANIMATED_PROPERTY(SVGFEDisplacementMapElement, SVGNames::yChannelSelectorAttr, int, YChannelSelector, yChannelSelector)
+ DECLARE_ANIMATED_PROPERTY(SVGFEDisplacementMapElement, SVGNames::scaleAttr, float, Scale, scale)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEDisplacementMapElement.idl b/WebCore/svg/SVGFEDisplacementMapElement.idl
index 4fde219..b003e8f 100644
--- a/WebCore/svg/SVGFEDisplacementMapElement.idl
+++ b/WebCore/svg/SVGFEDisplacementMapElement.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG&FILTERS, GenerateConstructor] SVGFEDisplacementMapElement : SVGElement,
+ interface [Conditional=SVG&FILTERS] SVGFEDisplacementMapElement : SVGElement,
SVGFilterPrimitiveStandardAttributes {
// Channel Selectors
const unsigned short SVG_CHANNEL_UNKNOWN = 0;
diff --git a/WebCore/svg/SVGFEFloodElement.idl b/WebCore/svg/SVGFEFloodElement.idl
index b3c3180..59b9751 100644
--- a/WebCore/svg/SVGFEFloodElement.idl
+++ b/WebCore/svg/SVGFEFloodElement.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG&FILTERS, GenerateConstructor] SVGFEFloodElement : SVGElement,
+ interface [Conditional=SVG&FILTERS] SVGFEFloodElement : SVGElement,
SVGFilterPrimitiveStandardAttributes {
};
}
diff --git a/WebCore/svg/SVGFEGaussianBlurElement.cpp b/WebCore/svg/SVGFEGaussianBlurElement.cpp
index b2970b3..fd49fe7 100644
--- a/WebCore/svg/SVGFEGaussianBlurElement.cpp
+++ b/WebCore/svg/SVGFEGaussianBlurElement.cpp
@@ -35,9 +35,6 @@ char SVGStdDeviationYAttrIdentifier[] = "SVGStdDeviationYAttr";
SVGFEGaussianBlurElement::SVGFEGaussianBlurElement(const QualifiedName& tagName, Document* doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , m_in1(this, SVGNames::inAttr)
- , m_stdDeviationX(this, SVGNames::stdDeviationAttr)
- , m_stdDeviationY(this, SVGNames::stdDeviationAttr)
{
}
@@ -65,6 +62,24 @@ void SVGFEGaussianBlurElement::parseMappedAttribute(MappedAttribute* attr)
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
+void SVGFEGaussianBlurElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeStdDeviationX();
+ synchronizeStdDeviationY();
+ synchronizeIn1();
+ return;
+ }
+
+ if (attrName == SVGNames::stdDeviationAttr) {
+ synchronizeStdDeviationX();
+ synchronizeStdDeviationY();
+ } else if (attrName == SVGNames::inAttr)
+ synchronizeIn1();
+}
+
bool SVGFEGaussianBlurElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
diff --git a/WebCore/svg/SVGFEGaussianBlurElement.h b/WebCore/svg/SVGFEGaussianBlurElement.h
index 9a5c058..a03b9df 100644
--- a/WebCore/svg/SVGFEGaussianBlurElement.h
+++ b/WebCore/svg/SVGFEGaussianBlurElement.h
@@ -38,12 +38,13 @@ namespace WebCore {
void setStdDeviation(float stdDeviationX, float stdDeviationY);
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool build(SVGResourceFilter*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEGaussianBlurElement, SVGNames::feGaussianBlurTagString, SVGNames::inAttrString, String, In1, in1)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEGaussianBlurElement, SVGNames::feGaussianBlurTagString, SVGStdDeviationXAttrIdentifier, float, StdDeviationX, stdDeviationX)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEGaussianBlurElement, SVGNames::feGaussianBlurTagString, SVGStdDeviationYAttrIdentifier, float, StdDeviationY, stdDeviationY)
+ 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)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEImageElement.cpp b/WebCore/svg/SVGFEImageElement.cpp
index 52531ee..7be972c 100644
--- a/WebCore/svg/SVGFEImageElement.cpp
+++ b/WebCore/svg/SVGFEImageElement.cpp
@@ -1,6 +1,7 @@
/*
Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
2004, 2005 Rob Buis <buis@kde.org>
+ 2010 Dirk Schulze <krit@webkit.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -31,6 +32,7 @@
#include "SVGLength.h"
#include "SVGNames.h"
#include "SVGPreserveAspectRatio.h"
+#include "SVGRenderSupport.h"
#include "SVGResourceFilter.h"
namespace WebCore {
@@ -40,9 +42,6 @@ SVGFEImageElement::SVGFEImageElement(const QualifiedName& tagName, Document* doc
, SVGURIReference()
, SVGLangSpace()
, SVGExternalResourcesRequired()
- , m_preserveAspectRatio(this, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())
- , m_href(this, XLinkNames::hrefAttr)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
{
}
@@ -52,23 +51,31 @@ SVGFEImageElement::~SVGFEImageElement()
m_cachedImage->removeClient(this);
}
+void SVGFEImageElement::requestImageResource()
+{
+ if (m_cachedImage) {
+ m_cachedImage->removeClient(this);
+ m_cachedImage = 0;
+ }
+
+ Element* hrefElement = document()->getElementById(SVGURIReference::getTarget(href()));
+ if (hrefElement && hrefElement->isSVGElement() && hrefElement->renderer())
+ return;
+
+ m_cachedImage = ownerDocument()->docLoader()->requestImage(href());
+
+ if (m_cachedImage)
+ m_cachedImage->addClient(this);
+}
+
void SVGFEImageElement::parseMappedAttribute(MappedAttribute* attr)
{
const String& value = attr->value();
- if (attr->name() == SVGNames::preserveAspectRatioAttr) {
- const UChar* c = value.characters();
- const UChar* end = c + value.length();
- preserveAspectRatioBaseValue()->parsePreserveAspectRatio(c, end);
- } else {
+ if (attr->name() == SVGNames::preserveAspectRatioAttr)
+ SVGPreserveAspectRatio::parsePreserveAspectRatio(this, value);
+ else {
if (SVGURIReference::parseMappedAttribute(attr)) {
- if (!href().startsWith("#")) {
- // FIXME: this code needs to special-case url fragments and later look them up using getElementById instead of loading them here
- if (m_cachedImage)
- m_cachedImage->removeClient(this);
- m_cachedImage = ownerDocument()->docLoader()->requestImage(href());
- if (m_cachedImage)
- m_cachedImage->addClient(this);
- }
+ requestImageResource();
return;
}
if (SVGLangSpace::parseMappedAttribute(attr))
@@ -80,16 +87,48 @@ void SVGFEImageElement::parseMappedAttribute(MappedAttribute* attr)
}
}
+void SVGFEImageElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizePreserveAspectRatio();
+ synchronizeHref();
+ synchronizeExternalResourcesRequired();
+ return;
+ }
+
+ if (attrName == SVGNames::preserveAspectRatioAttr)
+ synchronizePreserveAspectRatio();
+ else if (SVGURIReference::isKnownAttribute(attrName))
+ synchronizeHref();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+}
+
void SVGFEImageElement::notifyFinished(CachedResource*)
{
+ SVGStyledElement::invalidateResourcesInAncestorChain();
}
bool SVGFEImageElement::build(SVGResourceFilter* filterResource)
{
- if (!m_cachedImage)
- return false;
+ if (!m_cachedImage && !m_targetImage) {
+ Element* hrefElement = document()->getElementById(SVGURIReference::getTarget(href()));
+ if (!hrefElement || !hrefElement->isSVGElement())
+ return false;
+
+ RenderObject* renderer = hrefElement->renderer();
+ if (!renderer)
+ return false;
+
+ IntRect targetRect = enclosingIntRect(renderer->objectBoundingBox());
+ m_targetImage = ImageBuffer::create(targetRect.size(), LinearRGB);
+
+ renderSubtreeToImage(m_targetImage.get(), renderer);
+ }
- RefPtr<FilterEffect> effect = FEImage::create(m_cachedImage.get());
+ RefPtr<FilterEffect> effect = FEImage::create(m_targetImage ? m_targetImage->image() : m_cachedImage->image(), preserveAspectRatio());
filterResource->addFilterEffect(this, effect.release());
return true;
diff --git a/WebCore/svg/SVGFEImageElement.h b/WebCore/svg/SVGFEImageElement.h
index 7c6d89b..72cd949 100644
--- a/WebCore/svg/SVGFEImageElement.h
+++ b/WebCore/svg/SVGFEImageElement.h
@@ -23,12 +23,13 @@
#if ENABLE(SVG) && ENABLE(FILTERS)
#include "CachedResourceHandle.h"
-#include "SVGFilterPrimitiveStandardAttributes.h"
-#include "SVGURIReference.h"
-#include "SVGLangSpace.h"
+#include "ImageBuffer.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGFEImage.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+#include "SVGLangSpace.h"
#include "SVGPreserveAspectRatio.h"
+#include "SVGURIReference.h"
namespace WebCore {
@@ -42,23 +43,25 @@ namespace WebCore {
virtual ~SVGFEImageElement();
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual void notifyFinished(CachedResource*);
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
virtual bool build(SVGResourceFilter*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEImageElement, SVGNames::feImageTagString, SVGNames::preserveAspectRatioAttrString, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
+ void requestImageResource();
+
+ DECLARE_ANIMATED_PROPERTY(SVGFEImageElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
// SVGURIReference
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEImageElement, SVGURIReferenceIdentifier, XLinkNames::hrefAttrString, String, Href, href)
+ DECLARE_ANIMATED_PROPERTY(SVGFEImageElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEImageElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGFEImageElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
CachedResourceHandle<CachedImage> m_cachedImage;
+ OwnPtr<ImageBuffer> m_targetImage;
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEImageElement.idl b/WebCore/svg/SVGFEImageElement.idl
index 23b9c86..0ebe53e 100644
--- a/WebCore/svg/SVGFEImageElement.idl
+++ b/WebCore/svg/SVGFEImageElement.idl
@@ -26,10 +26,11 @@
module svg {
interface [Conditional=SVG&FILTERS] SVGFEImageElement : SVGElement,
- SVGURIReference,
- SVGLangSpace,
- SVGExternalResourcesRequired,
- SVGFilterPrimitiveStandardAttributes {
+ SVGURIReference,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGFilterPrimitiveStandardAttributes {
+ readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
};
}
diff --git a/WebCore/svg/SVGFELightElement.cpp b/WebCore/svg/SVGFELightElement.cpp
index bb954eb..dc711cf 100644
--- a/WebCore/svg/SVGFELightElement.cpp
+++ b/WebCore/svg/SVGFELightElement.cpp
@@ -29,20 +29,9 @@
namespace WebCore {
-char SVGFELightElementIdentifier[] = "SVGFELightElement";
-
SVGFELightElement::SVGFELightElement(const QualifiedName& tagName, Document* doc)
: SVGElement(tagName, doc)
- , m_azimuth(this, SVGNames::azimuthAttr)
- , m_elevation(this, SVGNames::elevationAttr)
- , m_x(this, SVGNames::xAttr)
- , m_y(this, SVGNames::yAttr)
- , m_z(this, SVGNames::zAttr)
- , m_pointsAtX(this, SVGNames::pointsAtXAttr)
- , m_pointsAtY(this, SVGNames::pointsAtYAttr)
- , m_pointsAtZ(this, SVGNames::pointsAtZAttr)
- , m_specularExponent(this, SVGNames::specularExponentAttr, 1.0f)
- , m_limitingConeAngle(this, SVGNames::limitingConeAngleAttr)
+ , m_specularExponent(1.0f)
{
}
@@ -77,8 +66,46 @@ void SVGFELightElement::parseMappedAttribute(MappedAttribute* attr)
SVGElement::parseMappedAttribute(attr);
}
+void SVGFELightElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeAzimuth();
+ synchronizeElevation();
+ synchronizeX();
+ synchronizeY();
+ synchronizeZ();
+ synchronizePointsAtX();
+ synchronizePointsAtY();
+ synchronizePointsAtZ();
+ synchronizeSpecularExponent();
+ synchronizeLimitingConeAngle();
+ return;
+ }
+
+ if (attrName == SVGNames::azimuthAttr)
+ synchronizeAzimuth();
+ else if (attrName == SVGNames::elevationAttr)
+ synchronizeElevation();
+ else if (attrName == SVGNames::xAttr)
+ synchronizeX();
+ else if (attrName == SVGNames::yAttr)
+ synchronizeY();
+ else if (attrName == SVGNames::zAttr)
+ synchronizeZ();
+ else if (attrName == SVGNames::pointsAtXAttr)
+ synchronizePointsAtX();
+ else if (attrName == SVGNames::pointsAtYAttr)
+ synchronizePointsAtY();
+ else if (attrName == SVGNames::pointsAtZAttr)
+ synchronizePointsAtZ();
+ else if (attrName == SVGNames::specularExponentAttr)
+ synchronizeSpecularExponent();
+ else if (attrName == SVGNames::limitingConeAngleAttr)
+ synchronizeLimitingConeAngle();
}
-#endif // ENABLE(SVG)
+}
-// vim:ts=4:noet
+#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGFELightElement.h b/WebCore/svg/SVGFELightElement.h
index 705eeaa..4e9c389 100644
--- a/WebCore/svg/SVGFELightElement.h
+++ b/WebCore/svg/SVGFELightElement.h
@@ -29,8 +29,6 @@
namespace WebCore {
- extern char SVGFELightElementIdentifier[];
-
class SVGFELightElement : public SVGElement {
public:
SVGFELightElement(const QualifiedName&, Document*);
@@ -38,18 +36,19 @@ namespace WebCore {
virtual PassRefPtr<LightSource> lightSource() const = 0;
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFELightElement, SVGFELightElementIdentifier, SVGNames::azimuthAttrString, float, Azimuth, azimuth)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFELightElement, SVGFELightElementIdentifier, SVGNames::elevationAttrString, float, Elevation, elevation)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFELightElement, SVGFELightElementIdentifier, SVGNames::xAttrString, float, X, x)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFELightElement, SVGFELightElementIdentifier, SVGNames::yAttrString, float, Y, y)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFELightElement, SVGFELightElementIdentifier, SVGNames::zAttrString, float, Z, z)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFELightElement, SVGFELightElementIdentifier, SVGNames::pointsAtXAttrString, float, PointsAtX, pointsAtX)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFELightElement, SVGFELightElementIdentifier, SVGNames::pointsAtYAttrString, float, PointsAtY, pointsAtY)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFELightElement, SVGFELightElementIdentifier, SVGNames::pointsAtZAttrString, float, PointsAtZ, pointsAtZ)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFELightElement, SVGFELightElementIdentifier, SVGNames::specularExponentAttrString, float, SpecularExponent, specularExponent)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFELightElement, SVGFELightElementIdentifier, SVGNames::limitingConeAngleAttrString, float, LimitingConeAngle, limitingConeAngle)
+ 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)
+ DECLARE_ANIMATED_PROPERTY(SVGFELightElement, SVGNames::yAttr, float, Y, y)
+ DECLARE_ANIMATED_PROPERTY(SVGFELightElement, SVGNames::zAttr, float, Z, z)
+ DECLARE_ANIMATED_PROPERTY(SVGFELightElement, SVGNames::pointsAtXAttr, float, PointsAtX, pointsAtX)
+ DECLARE_ANIMATED_PROPERTY(SVGFELightElement, SVGNames::pointsAtYAttr, float, PointsAtY, pointsAtY)
+ DECLARE_ANIMATED_PROPERTY(SVGFELightElement, SVGNames::pointsAtZAttr, float, PointsAtZ, pointsAtZ)
+ DECLARE_ANIMATED_PROPERTY(SVGFELightElement, SVGNames::specularExponentAttr, float, SpecularExponent, specularExponent)
+ DECLARE_ANIMATED_PROPERTY(SVGFELightElement, SVGNames::limitingConeAngleAttr, float, LimitingConeAngle, limitingConeAngle)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEMergeElement.cpp b/WebCore/svg/SVGFEMergeElement.cpp
index 6c703ca..078de22 100644
--- a/WebCore/svg/SVGFEMergeElement.cpp
+++ b/WebCore/svg/SVGFEMergeElement.cpp
@@ -39,7 +39,7 @@ SVGFEMergeElement::~SVGFEMergeElement()
bool SVGFEMergeElement::build(SVGResourceFilter* filterResource)
{
- Vector<FilterEffect*> mergeInputs;
+ Vector<RefPtr<FilterEffect> > mergeInputs;
for (Node* n = firstChild(); n != 0; n = n->nextSibling()) {
if (n->hasTagName(SVGNames::feMergeNodeTag)) {
FilterEffect* mergeEffect = filterResource->builder()->getEffectById(static_cast<SVGFEMergeNodeElement*>(n)->in1());
diff --git a/WebCore/svg/SVGFEMergeNodeElement.cpp b/WebCore/svg/SVGFEMergeNodeElement.cpp
index 4161de8..9551d29 100644
--- a/WebCore/svg/SVGFEMergeNodeElement.cpp
+++ b/WebCore/svg/SVGFEMergeNodeElement.cpp
@@ -29,7 +29,6 @@ namespace WebCore {
SVGFEMergeNodeElement::SVGFEMergeNodeElement(const QualifiedName& tagName, Document* doc)
: SVGElement(tagName, doc)
- , m_in1(this, SVGNames::inAttr)
{
}
@@ -46,6 +45,14 @@ void SVGFEMergeNodeElement::parseMappedAttribute(MappedAttribute* attr)
SVGElement::parseMappedAttribute(attr);
}
+void SVGFEMergeNodeElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName() || attrName == SVGNames::inAttr)
+ synchronizeIn1();
+}
+
}
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGFEMergeNodeElement.h b/WebCore/svg/SVGFEMergeNodeElement.h
index cdec8d2..5ccfe94 100644
--- a/WebCore/svg/SVGFEMergeNodeElement.h
+++ b/WebCore/svg/SVGFEMergeNodeElement.h
@@ -33,9 +33,10 @@ namespace WebCore {
virtual ~SVGFEMergeNodeElement();
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEMergeNodeElement, SVGNames::feMergeNodeTagString, SVGNames::inAttrString, String, In1, in1)
+ DECLARE_ANIMATED_PROPERTY(SVGFEMergeNodeElement, SVGNames::inAttr, String, In1, in1)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEMorphologyElement.cpp b/WebCore/svg/SVGFEMorphologyElement.cpp
index 4a06188..1f37c08 100644
--- a/WebCore/svg/SVGFEMorphologyElement.cpp
+++ b/WebCore/svg/SVGFEMorphologyElement.cpp
@@ -34,10 +34,7 @@ char SVGRadiusYAttrIdentifier[] = "SVGRadiusYAttr";
SVGFEMorphologyElement::SVGFEMorphologyElement(const QualifiedName& tagName, Document* document)
: SVGFilterPrimitiveStandardAttributes(tagName, document)
- , m_in1(this, SVGNames::inAttr)
- , m__operator(this, SVGNames::operatorAttr, FEMORPHOLOGY_OPERATOR_ERODE)
- , m_radiusX(this, SVGNames::radiusAttr)
- , m_radiusY(this, SVGNames::radiusAttr)
+ , m__operator(FEMORPHOLOGY_OPERATOR_ERODE)
{
}
@@ -70,6 +67,28 @@ void SVGFEMorphologyElement::parseMappedAttribute(MappedAttribute* attr)
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
+void SVGFEMorphologyElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronize_operator();
+ synchronizeIn1();
+ synchronizeRadiusX();
+ synchronizeRadiusY();
+ return;
+ }
+
+ if (attrName == SVGNames::operatorAttr)
+ synchronize_operator();
+ else if (attrName == SVGNames::inAttr)
+ synchronizeIn1();
+ else if (attrName == SVGNames::radiusAttr) {
+ synchronizeRadiusX();
+ synchronizeRadiusY();
+ }
+}
+
bool SVGFEMorphologyElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
diff --git a/WebCore/svg/SVGFEMorphologyElement.h b/WebCore/svg/SVGFEMorphologyElement.h
index 6c1aec1..c7e3f6f 100644
--- a/WebCore/svg/SVGFEMorphologyElement.h
+++ b/WebCore/svg/SVGFEMorphologyElement.h
@@ -37,13 +37,14 @@ namespace WebCore {
void setRadius(float radiusX, float radiusY);
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool build(SVGResourceFilter*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEMorphologyElement, SVGNames::feMorphologyTagString, SVGNames::inAttrString, String, In1, in1)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEMorphologyElement, SVGNames::feMorphologyTagString, SVGNames::operatorAttrString, int, _operator, _operator)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEMorphologyElement, SVGNames::feMorphologyTagString, SVGRadiusXAttrIdentifier, float, RadiusX, radiusX)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEMorphologyElement, SVGNames::feMorphologyTagString, SVGRadiusYAttrIdentifier, float, RadiusY, radiusY)
+ 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)
+ DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFEMorphologyElement, SVGNames::radiusAttr, SVGRadiusYAttrIdentifier, float, RadiusY, radiusY)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEMorphologyElement.idl b/WebCore/svg/SVGFEMorphologyElement.idl
index cce0e36..ffd2289 100644
--- a/WebCore/svg/SVGFEMorphologyElement.idl
+++ b/WebCore/svg/SVGFEMorphologyElement.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG&FILTERS, GenerateConstructor] SVGFEMorphologyElement : SVGElement,
+ interface [Conditional=SVG&FILTERS] SVGFEMorphologyElement : SVGElement,
SVGFilterPrimitiveStandardAttributes {
// Morphology Operators
const unsigned short SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
diff --git a/WebCore/svg/SVGFEOffsetElement.cpp b/WebCore/svg/SVGFEOffsetElement.cpp
index 95cbc8d..28955c0 100644
--- a/WebCore/svg/SVGFEOffsetElement.cpp
+++ b/WebCore/svg/SVGFEOffsetElement.cpp
@@ -31,9 +31,6 @@ namespace WebCore {
SVGFEOffsetElement::SVGFEOffsetElement(const QualifiedName& tagName, Document* doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , m_in1(this, SVGNames::inAttr)
- , m_dx(this, SVGNames::dxAttr)
- , m_dy(this, SVGNames::dyAttr)
{
}
@@ -54,6 +51,25 @@ void SVGFEOffsetElement::parseMappedAttribute(MappedAttribute* attr)
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
+void SVGFEOffsetElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeDx();
+ synchronizeDy();
+ synchronizeIn1();
+ return;
+ }
+
+ if (attrName == SVGNames::dxAttr)
+ synchronizeDx();
+ else if (attrName == SVGNames::dyAttr)
+ synchronizeDy();
+ else if (attrName == SVGNames::inAttr)
+ synchronizeIn1();
+}
+
bool SVGFEOffsetElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
diff --git a/WebCore/svg/SVGFEOffsetElement.h b/WebCore/svg/SVGFEOffsetElement.h
index ae07ed8..df61a9c 100644
--- a/WebCore/svg/SVGFEOffsetElement.h
+++ b/WebCore/svg/SVGFEOffsetElement.h
@@ -33,12 +33,13 @@ namespace WebCore {
virtual ~SVGFEOffsetElement();
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool build(SVGResourceFilter*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEOffsetElement, SVGNames::feOffsetTagString, SVGNames::inAttrString, String, In1, in1)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEOffsetElement, SVGNames::feOffsetTagString, SVGNames::dxAttrString, float, Dx, dx)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFEOffsetElement, SVGNames::feOffsetTagString, SVGNames::dyAttrString, float, Dy, dy)
+ 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)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFESpecularLightingElement.cpp b/WebCore/svg/SVGFESpecularLightingElement.cpp
index 90e9cb3..0602103 100644
--- a/WebCore/svg/SVGFESpecularLightingElement.cpp
+++ b/WebCore/svg/SVGFESpecularLightingElement.cpp
@@ -36,12 +36,9 @@ namespace WebCore {
SVGFESpecularLightingElement::SVGFESpecularLightingElement(const QualifiedName& tagName, Document* doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , m_in1(this, SVGNames::inAttr)
- , m_specularConstant(this, SVGNames::specularConstantAttr, 1.0f)
- , m_specularExponent(this, SVGNames::specularExponentAttr, 1.0f)
- , m_surfaceScale(this, SVGNames::surfaceScaleAttr, 1.0f)
- , m_kernelUnitLengthX(this, SVGNames::kernelUnitLengthAttr)
- , m_kernelUnitLengthY(this, SVGNames::kernelUnitLengthAttr)
+ , m_specularConstant(1.0f)
+ , m_specularExponent(1.0f)
+ , m_surfaceScale(1.0f)
{
}
@@ -70,6 +67,34 @@ void SVGFESpecularLightingElement::parseMappedAttribute(MappedAttribute* attr)
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
+void SVGFESpecularLightingElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeIn1();
+ synchronizeSurfaceScale();
+ synchronizeSpecularConstant();
+ synchronizeSpecularExponent();
+ synchronizeKernelUnitLengthX();
+ synchronizeKernelUnitLengthY();
+ return;
+ }
+
+ if (attrName == SVGNames::inAttr)
+ synchronizeIn1();
+ else if (attrName == SVGNames::surfaceScaleAttr)
+ synchronizeSurfaceScale();
+ else if (attrName == SVGNames::specularConstantAttr)
+ synchronizeSpecularConstant();
+ else if (attrName == SVGNames::specularExponentAttr)
+ synchronizeSpecularExponent();
+ else if (attrName == SVGNames::kernelUnitLengthAttr) {
+ synchronizeKernelUnitLengthX();
+ synchronizeKernelUnitLengthY();
+ }
+}
+
PassRefPtr<LightSource> SVGFESpecularLightingElement::findLights() const
{
for (Node* n = firstChild(); n; n = n->nextSibling()) {
diff --git a/WebCore/svg/SVGFESpecularLightingElement.h b/WebCore/svg/SVGFESpecularLightingElement.h
index b3771fe..fe56980 100644
--- a/WebCore/svg/SVGFESpecularLightingElement.h
+++ b/WebCore/svg/SVGFESpecularLightingElement.h
@@ -31,23 +31,22 @@ namespace WebCore {
extern char SVGKernelUnitLengthXIdentifier[];
extern char SVGKernelUnitLengthYIdentifier[];
- class SVGColor;
-
class SVGFESpecularLightingElement : public SVGFilterPrimitiveStandardAttributes {
public:
SVGFESpecularLightingElement(const QualifiedName&, Document*);
virtual ~SVGFESpecularLightingElement();
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool build(SVGResourceFilter*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFESpecularLightingElement, SVGNames::feSpecularLightingTagString, SVGNames::inAttrString, String, In1, in1)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFESpecularLightingElement, SVGNames::feSpecularLightingTagString, SVGNames::specularConstantAttrString, float, SpecularConstant, specularConstant)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFESpecularLightingElement, SVGNames::feSpecularLightingTagString, SVGNames::specularExponentAttrString, float, SpecularExponent, specularExponent)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFESpecularLightingElement, SVGNames::feSpecularLightingTagString, SVGNames::surfaceScaleAttrString, float, SurfaceScale, surfaceScale)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFESpecularLightingElement, SVGNames::feSpecularLightingTagString, SVGKernelUnitLengthXIdentifier, float, KernelUnitLengthX, kernelUnitLengthX)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFESpecularLightingElement, SVGNames::feSpecularLightingTagString, SVGKernelUnitLengthYIdentifier, float, KernelUnitLengthY, kernelUnitLengthY)
+ 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)
+ DECLARE_ANIMATED_PROPERTY(SVGFESpecularLightingElement, SVGNames::surfaceScaleAttr, float, SurfaceScale, surfaceScale)
+ DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFESpecularLightingElement, SVGNames::kernelUnitLengthAttr, SVGKernelUnitLengthXIdentifier, float, KernelUnitLengthX, kernelUnitLengthX)
+ DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFESpecularLightingElement, SVGNames::kernelUnitLengthAttr, SVGKernelUnitLengthYIdentifier, float, KernelUnitLengthY, kernelUnitLengthY)
PassRefPtr<LightSource> findLights() const;
};
diff --git a/WebCore/svg/SVGFETileElement.cpp b/WebCore/svg/SVGFETileElement.cpp
index 8894d4b..94c8e74 100644
--- a/WebCore/svg/SVGFETileElement.cpp
+++ b/WebCore/svg/SVGFETileElement.cpp
@@ -32,7 +32,6 @@ namespace WebCore {
SVGFETileElement::SVGFETileElement(const QualifiedName& tagName, Document* doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , m_in1(this, SVGNames::inAttr)
{
}
@@ -49,6 +48,14 @@ void SVGFETileElement::parseMappedAttribute(MappedAttribute* attr)
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
+void SVGFETileElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
+
+ if (attrName == anyQName() || attrName == SVGNames::inAttr)
+ synchronizeIn1();
+}
+
bool SVGFETileElement::build(SVGResourceFilter* filterResource)
{
FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
diff --git a/WebCore/svg/SVGFETileElement.h b/WebCore/svg/SVGFETileElement.h
index 142a797..2c86abd 100644
--- a/WebCore/svg/SVGFETileElement.h
+++ b/WebCore/svg/SVGFETileElement.h
@@ -33,10 +33,11 @@ namespace WebCore {
virtual ~SVGFETileElement();
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool build(SVGResourceFilter*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFETileElement, SVGNames::feTileTagString, SVGNames::inAttrString, String, In1, in1)
+ DECLARE_ANIMATED_PROPERTY(SVGFETileElement, SVGNames::inAttr, String, In1, in1)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFETurbulenceElement.cpp b/WebCore/svg/SVGFETurbulenceElement.cpp
index 57114a3..622971c 100644
--- a/WebCore/svg/SVGFETurbulenceElement.cpp
+++ b/WebCore/svg/SVGFETurbulenceElement.cpp
@@ -34,12 +34,9 @@ char SVGBaseFrequencyYIdentifier[] = "SVGBaseFrequencyY";
SVGFETurbulenceElement::SVGFETurbulenceElement(const QualifiedName& tagName, Document* doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , m_baseFrequencyX(this, SVGNames::baseFrequencyAttr)
- , m_baseFrequencyY(this, SVGNames::baseFrequencyAttr)
- , m_numOctaves(this, SVGNames::numOctavesAttr, 1)
- , m_seed(this, SVGNames::seedAttr)
- , m_stitchTiles(this, SVGNames::stitchTilesAttr, SVG_STITCHTYPE_NOSTITCH)
- , m_type(this, SVGNames::typeAttr, FETURBULENCE_TYPE_TURBULENCE)
+ , m_numOctaves(1)
+ , m_stitchTiles(SVG_STITCHTYPE_NOSTITCH)
+ , m_type(FETURBULENCE_TYPE_TURBULENCE)
{
}
@@ -74,6 +71,33 @@ void SVGFETurbulenceElement::parseMappedAttribute(MappedAttribute* attr)
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
+void SVGFETurbulenceElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeType();
+ synchronizeStitchTiles();
+ synchronizeBaseFrequencyX();
+ synchronizeBaseFrequencyY();
+ synchronizeSeed();
+ synchronizeNumOctaves();
+ return;
+ }
+
+ if (attrName == SVGNames::typeAttr)
+ synchronizeType();
+ else if (attrName == SVGNames::stitchTilesAttr)
+ synchronizeStitchTiles();
+ else if (attrName == SVGNames::baseFrequencyAttr) {
+ synchronizeBaseFrequencyX();
+ synchronizeBaseFrequencyY();
+ } else if (attrName == SVGNames::seedAttr)
+ synchronizeSeed();
+ else if (attrName == SVGNames::numOctavesAttr)
+ synchronizeNumOctaves();
+}
+
bool SVGFETurbulenceElement::build(SVGResourceFilter* filterResource)
{
RefPtr<FilterEffect> effect = FETurbulence::create(static_cast<TurbulanceType>(type()), baseFrequencyX(),
diff --git a/WebCore/svg/SVGFETurbulenceElement.h b/WebCore/svg/SVGFETurbulenceElement.h
index f024f57..464ce25 100644
--- a/WebCore/svg/SVGFETurbulenceElement.h
+++ b/WebCore/svg/SVGFETurbulenceElement.h
@@ -42,15 +42,16 @@ namespace WebCore {
virtual ~SVGFETurbulenceElement();
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool build(SVGResourceFilter*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFETurbulenceElement, SVGNames::feTurbulenceTagString, SVGBaseFrequencyXIdentifier, float, BaseFrequencyX, baseFrequencyX)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFETurbulenceElement, SVGNames::feTurbulenceTagString, SVGBaseFrequencyYIdentifier, float, BaseFrequencyY, baseFrequencyY)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFETurbulenceElement, SVGNames::feTurbulenceTagString, SVGNames::numOctavesAttrString, long, NumOctaves, numOctaves)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFETurbulenceElement, SVGNames::feTurbulenceTagString, SVGNames::seedAttrString, float, Seed, seed)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFETurbulenceElement, SVGNames::feTurbulenceTagString, SVGNames::stitchTilesAttrString, int, StitchTiles, stitchTiles)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFETurbulenceElement, SVGNames::feTurbulenceTagString, SVGNames::typeAttrString, int, Type, type)
+ 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)
+ DECLARE_ANIMATED_PROPERTY(SVGFETurbulenceElement, SVGNames::seedAttr, float, Seed, seed)
+ DECLARE_ANIMATED_PROPERTY(SVGFETurbulenceElement, SVGNames::stitchTilesAttr, int, StitchTiles, stitchTiles)
+ DECLARE_ANIMATED_PROPERTY(SVGFETurbulenceElement, SVGNames::typeAttr, int, Type, type)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFETurbulenceElement.idl b/WebCore/svg/SVGFETurbulenceElement.idl
index 9cec66c..934eddf 100644
--- a/WebCore/svg/SVGFETurbulenceElement.idl
+++ b/WebCore/svg/SVGFETurbulenceElement.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG&FILTERS, GenerateConstructor] SVGFETurbulenceElement : SVGElement,
+ interface [Conditional=SVG&FILTERS] SVGFETurbulenceElement : SVGElement,
SVGFilterPrimitiveStandardAttributes {
// Turbulence Types
const unsigned short SVG_TURBULENCE_TYPE_UNKNOWN = 0;
diff --git a/WebCore/svg/SVGFilterElement.cpp b/WebCore/svg/SVGFilterElement.cpp
index bb14448..60375fb 100644
--- a/WebCore/svg/SVGFilterElement.cpp
+++ b/WebCore/svg/SVGFilterElement.cpp
@@ -47,16 +47,12 @@ SVGFilterElement::SVGFilterElement(const QualifiedName& tagName, Document* doc)
, SVGURIReference()
, SVGLangSpace()
, SVGExternalResourcesRequired()
- , m_filterUnits(this, SVGNames::filterUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
- , m_primitiveUnits(this, SVGNames::primitiveUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
- , m_x(this, SVGNames::xAttr, LengthModeWidth, "-10%")
- , m_y(this, SVGNames::yAttr, LengthModeHeight, "-10%")
- , m_width(this, SVGNames::widthAttr, LengthModeWidth, "120%")
- , m_height(this, SVGNames::heightAttr, LengthModeHeight, "120%")
- , m_filterResX(this, SVGNames::filterResAttr)
- , m_filterResY(this, SVGNames::filterResAttr)
- , m_href(this, XLinkNames::hrefAttr)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
+ , m_filterUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
+ , m_primitiveUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
+ , m_x(LengthModeWidth, "-10%")
+ , m_y(LengthModeHeight, "-10%")
+ , m_width(LengthModeWidth, "120%")
+ , m_height(LengthModeHeight, "120%")
{
// Spec: If the x/y attribute is not specified, the effect is as if a value of "-10%" were specified.
// Spec: If the width/height attribute is not specified, the effect is as if a value of "120%" were specified.
@@ -109,6 +105,62 @@ void SVGFilterElement::parseMappedAttribute(MappedAttribute* attr)
}
}
+void SVGFilterElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeX();
+ synchronizeY();
+ synchronizeWidth();
+ synchronizeHeight();
+ synchronizeFilterUnits();
+ synchronizePrimitiveUnits();
+ synchronizeFilterResX();
+ synchronizeFilterResY();
+ synchronizeExternalResourcesRequired();
+ synchronizeHref();
+ return;
+ }
+
+ if (attrName == SVGNames::xAttr)
+ synchronizeX();
+ else if (attrName == SVGNames::yAttr)
+ synchronizeY();
+ else if (attrName == SVGNames::widthAttr)
+ synchronizeWidth();
+ else if (attrName == SVGNames::heightAttr)
+ synchronizeHeight();
+ else if (attrName == SVGNames::filterUnitsAttr)
+ synchronizeFilterUnits();
+ else if (attrName == SVGNames::primitiveUnitsAttr)
+ synchronizePrimitiveUnits();
+ else if (attrName == SVGNames::filterResAttr) {
+ synchronizeFilterResX();
+ synchronizeFilterResY();
+ } else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+ else if (SVGURIReference::isKnownAttribute(attrName))
+ synchronizeHref();
+}
+
+FloatRect SVGFilterElement::filterBoundingBox(const FloatRect& objectBoundingBox) const
+{
+ FloatRect filterBBox;
+ if (filterUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
+ filterBBox = FloatRect(x().valueAsPercentage() * objectBoundingBox.width() + objectBoundingBox.x(),
+ y().valueAsPercentage() * objectBoundingBox.height() + objectBoundingBox.y(),
+ width().valueAsPercentage() * objectBoundingBox.width(),
+ height().valueAsPercentage() * objectBoundingBox.height());
+ else
+ filterBBox = FloatRect(x().value(this),
+ y().value(this),
+ width().value(this),
+ height().value(this));
+
+ return filterBBox;
+}
+
void SVGFilterElement::buildFilter(const FloatRect& targetRect) const
{
bool filterBBoxMode = filterUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
@@ -160,7 +212,7 @@ void SVGFilterElement::buildFilter(const FloatRect& targetRect) const
}
}
-SVGResource* SVGFilterElement::canvasResource()
+SVGResource* SVGFilterElement::canvasResource(const RenderObject*)
{
if (!attached())
return 0;
diff --git a/WebCore/svg/SVGFilterElement.h b/WebCore/svg/SVGFilterElement.h
index 836c689..c89352b 100644
--- a/WebCore/svg/SVGFilterElement.h
+++ b/WebCore/svg/SVGFilterElement.h
@@ -23,6 +23,7 @@
#define SVGFilterElement_h
#if ENABLE(SVG) && ENABLE(FILTERS)
+#include "RenderObject.h"
#include "SVGResourceFilter.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
@@ -34,6 +35,8 @@ namespace WebCore {
extern char SVGFilterResXIdentifier[];
extern char SVGFilterResYIdentifier[];
+ class SVGResourceFilter;
+
class SVGFilterElement : public SVGStyledElement,
public SVGURIReference,
public SVGLangSpace,
@@ -42,35 +45,35 @@ namespace WebCore {
SVGFilterElement(const QualifiedName&, Document*);
virtual ~SVGFilterElement();
- virtual SVGResource* canvasResource();
+ virtual SVGResource* canvasResource(const RenderObject*);
void setFilterRes(unsigned long filterResX, unsigned long filterResY) const;
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, SVGNames::filterTagString, SVGNames::filterUnitsAttrString, int, FilterUnits, filterUnits)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, SVGNames::filterTagString, SVGNames::primitiveUnitsAttrString, int, PrimitiveUnits, primitiveUnits)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, SVGNames::filterTagString, SVGNames::xAttrString, SVGLength, X, x)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, SVGNames::filterTagString, SVGNames::yAttrString, SVGLength, Y, y)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, SVGNames::filterTagString, SVGNames::widthAttrString, SVGLength, Width, width)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, SVGNames::filterTagString, SVGNames::heightAttrString, SVGLength, Height, height)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, SVGNames::filterTagString, SVGFilterResXIdentifier, long, FilterResX, filterResX)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, SVGNames::filterTagString, SVGFilterResYIdentifier, long, FilterResY, filterResY)
+ DECLARE_ANIMATED_PROPERTY(SVGFilterElement, SVGNames::filterUnitsAttr, int, FilterUnits, filterUnits)
+ DECLARE_ANIMATED_PROPERTY(SVGFilterElement, SVGNames::primitiveUnitsAttr, int, PrimitiveUnits, primitiveUnits)
+ DECLARE_ANIMATED_PROPERTY(SVGFilterElement, SVGNames::xAttr, SVGLength, X, x)
+ DECLARE_ANIMATED_PROPERTY(SVGFilterElement, SVGNames::yAttr, SVGLength, Y, y)
+ DECLARE_ANIMATED_PROPERTY(SVGFilterElement, SVGNames::widthAttr, SVGLength, Width, width)
+ DECLARE_ANIMATED_PROPERTY(SVGFilterElement, SVGNames::heightAttr, SVGLength, Height, height)
+ DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFilterElement, SVGNames::filterResAttr, SVGFilterResXIdentifier, long, FilterResX, filterResX)
+ DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFilterElement, SVGNames::filterResAttr, SVGFilterResYIdentifier, long, FilterResY, filterResY)
// SVGURIReference
- ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, SVGURIReferenceIdentifier, XLinkNames::hrefAttrString, String, Href, href)
+ DECLARE_ANIMATED_PROPERTY(SVGFilterElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGFilterElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
mutable RefPtr<SVGResourceFilter> m_filter;
private:
friend class SVGResourceFilter;
+ FloatRect filterBoundingBox(const FloatRect&) const;
void buildFilter(const FloatRect& targetRect) const;
};
diff --git a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
index 08559b4..0a95522 100644
--- a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
+++ b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
@@ -33,15 +33,12 @@
namespace WebCore {
-char SVGFilterPrimitiveStandardAttributesIdentifierIdentifier[] = "SVGFilterPrimitiveStandardAttributesIdentifier";
-
SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes(const QualifiedName& tagName, Document* doc)
: SVGStyledElement(tagName, doc)
- , m_x(this, SVGNames::xAttr, LengthModeWidth, "0%")
- , m_y(this, SVGNames::yAttr, LengthModeHeight, "0%")
- , m_width(this, SVGNames::widthAttr, LengthModeWidth, "100%")
- , m_height(this, SVGNames::heightAttr, LengthModeHeight, "100%")
- , m_result(this, SVGNames::resultAttr)
+ , m_x(LengthModeWidth, "0%")
+ , m_y(LengthModeHeight, "0%")
+ , m_width(LengthModeWidth, "100%")
+ , m_height(LengthModeHeight, "100%")
{
// Spec: If the x/y attribute is not specified, the effect is as if a value of "0%" were specified.
// Spec: If the width/height attribute is not specified, the effect is as if a value of "100%" were specified.
@@ -68,6 +65,31 @@ void SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(MappedAttribute*
return SVGStyledElement::parseMappedAttribute(attr);
}
+void SVGFilterPrimitiveStandardAttributes::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeX();
+ synchronizeY();
+ synchronizeWidth();
+ synchronizeHeight();
+ synchronizeResult();
+ return;
+ }
+
+ if (attrName == SVGNames::xAttr)
+ synchronizeX();
+ else if (attrName == SVGNames::yAttr)
+ synchronizeY();
+ else if (attrName == SVGNames::widthAttr)
+ synchronizeWidth();
+ else if (attrName == SVGNames::heightAttr)
+ synchronizeHeight();
+ else if (attrName == SVGNames::resultAttr)
+ synchronizeResult();
+}
+
void SVGFilterPrimitiveStandardAttributes::setStandardAttributes(SVGResourceFilter* resourceFilter, FilterEffect* filterEffect) const
{
ASSERT(filterEffect);
diff --git a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
index cb8ec1c..fb8e5f2 100644
--- a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
+++ b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
@@ -29,8 +29,6 @@
namespace WebCore {
- extern char SVGFilterPrimitiveStandardAttributesIdentifier[];
-
class SVGResourceFilter;
class SVGFilterPrimitiveStandardAttributes : public SVGStyledElement {
@@ -41,6 +39,7 @@ namespace WebCore {
virtual bool isFilterEffect() const { return true; }
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool build(SVGResourceFilter*) = 0;
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
@@ -50,11 +49,11 @@ namespace WebCore {
void setStandardAttributes(SVGResourceFilter*, FilterEffect*) const;
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGFilterPrimitiveStandardAttributes, SVGFilterPrimitiveStandardAttributesIdentifier, SVGNames::xAttrString, SVGLength, X, x)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFilterPrimitiveStandardAttributes, SVGFilterPrimitiveStandardAttributesIdentifier, SVGNames::yAttrString, SVGLength, Y, y)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFilterPrimitiveStandardAttributes, SVGFilterPrimitiveStandardAttributesIdentifier, SVGNames::widthAttrString, SVGLength, Width, width)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFilterPrimitiveStandardAttributes, SVGFilterPrimitiveStandardAttributesIdentifier, SVGNames::heightAttrString, SVGLength, Height, height)
- ANIMATED_PROPERTY_DECLARATIONS(SVGFilterPrimitiveStandardAttributes, SVGFilterPrimitiveStandardAttributesIdentifier, SVGNames::resultAttrString, String, Result, result)
+ 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)
+ DECLARE_ANIMATED_PROPERTY(SVGFilterPrimitiveStandardAttributes, SVGNames::heightAttr, SVGLength, Height, height)
+ DECLARE_ANIMATED_PROPERTY(SVGFilterPrimitiveStandardAttributes, SVGNames::resultAttr, String, Result, result)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFitToViewBox.cpp b/WebCore/svg/SVGFitToViewBox.cpp
index c566a8f..80dead6 100644
--- a/WebCore/svg/SVGFitToViewBox.cpp
+++ b/WebCore/svg/SVGFitToViewBox.cpp
@@ -35,8 +35,6 @@
namespace WebCore {
-char SVGFitToViewBoxIdentifier[] = "SVGFitToViewBox";
-
SVGFitToViewBox::SVGFitToViewBox()
{
}
@@ -77,13 +75,12 @@ bool SVGFitToViewBox::parseViewBox(Document* doc, const UChar*& c, const UChar*
return true;
}
-TransformationMatrix SVGFitToViewBox::viewBoxToViewTransform(const FloatRect& viewBoxRect, SVGPreserveAspectRatio* preserveAspectRatio, float viewWidth, float viewHeight)
+TransformationMatrix SVGFitToViewBox::viewBoxToViewTransform(const FloatRect& viewBoxRect, const SVGPreserveAspectRatio& preserveAspectRatio, float viewWidth, float viewHeight)
{
- ASSERT(preserveAspectRatio);
if (!viewBoxRect.width() || !viewBoxRect.height())
return TransformationMatrix();
- return preserveAspectRatio->getCTM(viewBoxRect.x(), viewBoxRect.y(), viewBoxRect.width(), viewBoxRect.height(), 0, 0, viewWidth, viewHeight);
+ return preserveAspectRatio.getCTM(viewBoxRect.x(), viewBoxRect.y(), viewBoxRect.width(), viewBoxRect.height(), 0, 0, viewWidth, viewHeight);
}
bool SVGFitToViewBox::parseMappedAttribute(Document* document, MappedAttribute* attr)
@@ -96,9 +93,7 @@ bool SVGFitToViewBox::parseMappedAttribute(Document* document, MappedAttribute*
setViewBoxBaseValue(FloatRect(x, y, w, h));
return true;
} else if (attr->name() == SVGNames::preserveAspectRatioAttr) {
- const UChar* c = attr->value().characters();
- const UChar* end = c + attr->value().length();
- preserveAspectRatioBaseValue()->parsePreserveAspectRatio(c, end);
+ SVGPreserveAspectRatio::parsePreserveAspectRatio(this, attr->value());
return true;
}
diff --git a/WebCore/svg/SVGFitToViewBox.h b/WebCore/svg/SVGFitToViewBox.h
index 503a0ef..20fb7c1 100644
--- a/WebCore/svg/SVGFitToViewBox.h
+++ b/WebCore/svg/SVGFitToViewBox.h
@@ -27,8 +27,6 @@
namespace WebCore {
- extern char SVGFitToViewBoxIdentifier[];
-
class TransformationMatrix;
class SVGFitToViewBox {
@@ -37,16 +35,13 @@ namespace WebCore {
virtual ~SVGFitToViewBox();
bool parseViewBox(Document*, const UChar*& start, const UChar* end, float& x, float& y, float& w, float& h, bool validate = true);
- static TransformationMatrix viewBoxToViewTransform(const FloatRect& viewBoxRect, SVGPreserveAspectRatio*, float viewWidth, float viewHeight);
+ static TransformationMatrix viewBoxToViewTransform(const FloatRect& viewBoxRect, const SVGPreserveAspectRatio&, float viewWidth, float viewHeight);
bool parseMappedAttribute(Document*, MappedAttribute*);
bool isKnownAttribute(const QualifiedName&);
- protected:
- virtual SVGAnimatedTypeValue<FloatRect>::DecoratedType viewBoxBaseValue() const = 0;
- virtual void setViewBoxBaseValue(SVGAnimatedTypeValue<FloatRect>::DecoratedType type) = 0;
-
- virtual SVGAnimatedTypeValue<SVGPreserveAspectRatio>::DecoratedType preserveAspectRatioBaseValue() const = 0;
+ virtual void setViewBoxBaseValue(SVGAnimatedPropertyTraits<FloatRect>::PassType) = 0;
+ virtual void setPreserveAspectRatioBaseValue(SVGAnimatedPropertyTraits<SVGPreserveAspectRatio>::PassType) = 0;
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFitToViewBox.idl b/WebCore/svg/SVGFitToViewBox.idl
index a747fc8..d456cf8 100644
--- a/WebCore/svg/SVGFitToViewBox.idl
+++ b/WebCore/svg/SVGFitToViewBox.idl
@@ -26,7 +26,7 @@
module svg {
- interface [Conditional=SVG, ObjCProtocol] SVGFitToViewBox {
+ interface [Conditional=SVG, ObjCProtocol, OmitConstructor] SVGFitToViewBox {
readonly attribute SVGAnimatedRect viewBox;
readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
};
diff --git a/WebCore/svg/SVGFont.cpp b/WebCore/svg/SVGFont.cpp
index 7e3cec0..d978328 100644
--- a/WebCore/svg/SVGFont.cpp
+++ b/WebCore/svg/SVGFont.cpp
@@ -243,7 +243,8 @@ struct SVGTextRunWalker {
// Should hold true for SVG text, otherwhise sth. is wrong
ASSERT(to - from == run.length());
- Vector<SVGGlyphIdentifier::ArabicForm> chars(charactersWithArabicForm(String(run.data(from), run.length()), run.rtl()));
+ const String text = Font::normalizeSpaces(String(run.data(from), run.length()));
+ Vector<SVGGlyphIdentifier::ArabicForm> chars(charactersWithArabicForm(text, run.rtl()));
SVGGlyphIdentifier identifier;
bool foundGlyph = false;
@@ -270,7 +271,8 @@ struct SVGTextRunWalker {
// extended to the n-th next character (where n is 'characterLookupRange'), to check for any possible ligature.
characterLookupRange = endOfScanRange - i;
- String lookupString(run.data(i), characterLookupRange);
+ String lookupString = Font::normalizeSpaces(String(run.data(i), characterLookupRange));
+
Vector<SVGGlyphIdentifier> glyphs;
if (haveAltGlyph)
glyphs.append(altGlyphIdentifier);
diff --git a/WebCore/svg/SVGFontElement.cpp b/WebCore/svg/SVGFontElement.cpp
index 7d62b8c..91d222c 100644
--- a/WebCore/svg/SVGFontElement.cpp
+++ b/WebCore/svg/SVGFontElement.cpp
@@ -40,7 +40,6 @@ using namespace SVGNames;
SVGFontElement::SVGFontElement(const QualifiedName& tagName, Document* doc)
: SVGStyledElement(tagName, doc)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
, m_isGlyphCacheValid(false)
{
}
@@ -49,6 +48,14 @@ SVGFontElement::~SVGFontElement()
{
}
+void SVGFontElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName() || SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+}
+
void SVGFontElement::invalidateGlyphCache()
{
if (m_isGlyphCacheValid) {
diff --git a/WebCore/svg/SVGFontElement.h b/WebCore/svg/SVGFontElement.h
index 1fc5136..90641a8 100644
--- a/WebCore/svg/SVGFontElement.h
+++ b/WebCore/svg/SVGFontElement.h
@@ -37,6 +37,7 @@ namespace WebCore {
SVGFontElement(const QualifiedName&, Document*);
virtual ~SVGFontElement();
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
void invalidateGlyphCache();
@@ -49,9 +50,7 @@ namespace WebCore {
private:
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGFontElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGFontElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
void ensureGlyphCache() const;
diff --git a/WebCore/svg/SVGFontFaceElement.cpp b/WebCore/svg/SVGFontFaceElement.cpp
index aa0b6d8..25b3aea 100644
--- a/WebCore/svg/SVGFontFaceElement.cpp
+++ b/WebCore/svg/SVGFontFaceElement.cpp
@@ -62,13 +62,6 @@ SVGFontFaceElement::~SVGFontFaceElement()
removeFromMappedElementSheet();
}
-static void mapAttributeToCSSProperty(HashMap<AtomicStringImpl*, int>* propertyNameToIdMap, const QualifiedName& attrName)
-{
- int propertyId = cssPropertyID(attrName.localName());
- ASSERT(propertyId > 0);
- propertyNameToIdMap->set(attrName.localName().impl(), propertyId);
-}
-
static int cssPropertyIdForSVGAttributeName(const QualifiedName& attrName)
{
if (!attrName.namespaceURI().isNull())
@@ -282,7 +275,7 @@ void SVGFontFaceElement::rebuildFontFace()
srcElement = static_cast<SVGFontFaceSrcElement*>(child);
}
- bool describesParentFont = parentNode()->hasTagName(fontTag);
+ bool describesParentFont = parentNode()->hasTagName(SVGNames::fontTag);
RefPtr<CSSValueList> list;
if (describesParentFont) {
diff --git a/WebCore/svg/SVGFontFaceUriElement.cpp b/WebCore/svg/SVGFontFaceUriElement.cpp
index 096f0c2..bfcda70 100644
--- a/WebCore/svg/SVGFontFaceUriElement.cpp
+++ b/WebCore/svg/SVGFontFaceUriElement.cpp
@@ -91,9 +91,11 @@ void SVGFontFaceUriElement::loadFont()
if (!href.isNull()) {
DocLoader* docLoader = document()->docLoader();
m_cachedFont = docLoader->requestFont(href);
- m_cachedFont->setSVGFont(true);
- m_cachedFont->addClient(this);
- m_cachedFont->beginLoadIfNeeded(docLoader);
+ if (m_cachedFont) {
+ m_cachedFont->setSVGFont(true);
+ m_cachedFont->addClient(this);
+ m_cachedFont->beginLoadIfNeeded(docLoader);
+ }
} else
m_cachedFont = 0;
}
diff --git a/WebCore/svg/SVGForeignObjectElement.cpp b/WebCore/svg/SVGForeignObjectElement.cpp
index 1e75741..e9118ef 100644
--- a/WebCore/svg/SVGForeignObjectElement.cpp
+++ b/WebCore/svg/SVGForeignObjectElement.cpp
@@ -39,12 +39,10 @@ SVGForeignObjectElement::SVGForeignObjectElement(const QualifiedName& tagName, D
, SVGTests()
, SVGLangSpace()
, SVGExternalResourcesRequired()
- , m_x(this, SVGNames::xAttr, LengthModeWidth)
- , m_y(this, SVGNames::yAttr, LengthModeHeight)
- , m_width(this, SVGNames::widthAttr, LengthModeWidth)
- , m_height(this, SVGNames::heightAttr, LengthModeHeight)
- , m_href(this, XLinkNames::hrefAttr)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
+ , m_x(LengthModeWidth)
+ , m_y(LengthModeHeight)
+ , m_width(LengthModeWidth)
+ , m_height(LengthModeHeight)
{
}
@@ -153,6 +151,34 @@ void SVGForeignObjectElement::svgAttributeChanged(const QualifiedName& attrName)
renderer()->setNeedsLayout(true);
}
+void SVGForeignObjectElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledTransformableElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeX();
+ synchronizeY();
+ synchronizeWidth();
+ synchronizeHeight();
+ synchronizeExternalResourcesRequired();
+ synchronizeHref();
+ return;
+ }
+
+ if (attrName == SVGNames::xAttr)
+ synchronizeX();
+ else if (attrName == SVGNames::yAttr)
+ synchronizeY();
+ else if (attrName == SVGNames::widthAttr)
+ synchronizeWidth();
+ else if (attrName == SVGNames::heightAttr)
+ synchronizeHeight();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+ else if (SVGURIReference::isKnownAttribute(attrName))
+ synchronizeHref();
+}
+
RenderObject* SVGForeignObjectElement::createRenderer(RenderArena* arena, RenderStyle*)
{
return new (arena) RenderForeignObject(this);
diff --git a/WebCore/svg/SVGForeignObjectElement.h b/WebCore/svg/SVGForeignObjectElement.h
index 1848e2b..fe36a20 100644
--- a/WebCore/svg/SVGForeignObjectElement.h
+++ b/WebCore/svg/SVGForeignObjectElement.h
@@ -42,23 +42,22 @@ namespace WebCore {
virtual bool isValid() const { return SVGTests::isValid(); }
virtual void parseMappedAttribute(MappedAttribute*);
virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
bool childShouldCreateRenderer(Node*) const;
virtual RenderObject* createRenderer(RenderArena* arena, RenderStyle* style);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGForeignObjectElement, SVGNames::foreignObjectTagString, SVGNames::xAttrString, SVGLength, X, x)
- ANIMATED_PROPERTY_DECLARATIONS(SVGForeignObjectElement, SVGNames::foreignObjectTagString, SVGNames::yAttrString, SVGLength, Y, y)
- ANIMATED_PROPERTY_DECLARATIONS(SVGForeignObjectElement, SVGNames::foreignObjectTagString, SVGNames::widthAttrString, SVGLength, Width, width)
- ANIMATED_PROPERTY_DECLARATIONS(SVGForeignObjectElement, SVGNames::foreignObjectTagString, SVGNames::heightAttrString, SVGLength, Height, height)
+ DECLARE_ANIMATED_PROPERTY(SVGForeignObjectElement, SVGNames::xAttr, SVGLength, X, x)
+ DECLARE_ANIMATED_PROPERTY(SVGForeignObjectElement, SVGNames::yAttr, SVGLength, Y, y)
+ DECLARE_ANIMATED_PROPERTY(SVGForeignObjectElement, SVGNames::widthAttr, SVGLength, Width, width)
+ DECLARE_ANIMATED_PROPERTY(SVGForeignObjectElement, SVGNames::heightAttr, SVGLength, Height, height)
// SVGURIReference
- ANIMATED_PROPERTY_DECLARATIONS(SVGForeignObjectElement, SVGURIReferenceIdentifier, XLinkNames::hrefAttrString, String, Href, href)
+ DECLARE_ANIMATED_PROPERTY(SVGForeignObjectElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGForeignObjectElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGForeignObjectElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGGElement.cpp b/WebCore/svg/SVGGElement.cpp
index ef46af4..0fd329f 100644
--- a/WebCore/svg/SVGGElement.cpp
+++ b/WebCore/svg/SVGGElement.cpp
@@ -32,7 +32,6 @@ SVGGElement::SVGGElement(const QualifiedName& tagName, Document* doc)
, SVGTests()
, SVGLangSpace()
, SVGExternalResourcesRequired()
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
{
}
@@ -66,6 +65,14 @@ void SVGGElement::svgAttributeChanged(const QualifiedName& attrName)
renderer()->setNeedsLayout(true);
}
+void SVGGElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledTransformableElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName() || SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+}
+
void SVGGElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
{
SVGStyledTransformableElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
diff --git a/WebCore/svg/SVGGElement.h b/WebCore/svg/SVGGElement.h
index 9cfb5a3..3e0dd8e 100644
--- a/WebCore/svg/SVGGElement.h
+++ b/WebCore/svg/SVGGElement.h
@@ -37,22 +37,19 @@ namespace WebCore {
SVGGElement(const QualifiedName&, Document*);
virtual ~SVGGElement();
+ virtual bool isShadowTreeContainerElement() const { return false; }
virtual bool isValid() const { return SVGTests::isValid(); }
virtual void parseMappedAttribute(MappedAttribute*);
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*);
private:
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGGElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
-
- friend class SVGUseElement;
- TransformationMatrix localMatrix() const;
+ DECLARE_ANIMATED_PROPERTY(SVGGElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGGlyphElement.cpp b/WebCore/svg/SVGGlyphElement.cpp
index 7be0181..2d15569 100644
--- a/WebCore/svg/SVGGlyphElement.cpp
+++ b/WebCore/svg/SVGGlyphElement.cpp
@@ -49,7 +49,7 @@ SVGGlyphElement::~SVGGlyphElement()
void SVGGlyphElement::invalidateGlyphCache()
{
Node* fontNode = parentNode();
- if (fontNode && fontNode->hasTagName(fontTag)) {
+ if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) {
if (SVGFontElement* element = static_cast<SVGFontElement*>(fontNode))
element->invalidateGlyphCache();
}
@@ -167,7 +167,7 @@ SVGGlyphIdentifier SVGGlyphElement::buildGlyphIdentifier() const
identifier.orientation = parseOrientation(getAttribute(orientationAttr));
identifier.arabicForm = parseArabicForm(getAttribute(arabic_formAttr));
- String language = getAttribute(langAttr);
+ String language = getAttribute(SVGNames::langAttr);
if (!language.isEmpty())
identifier.languages = parseDelimitedString(language, ',');
diff --git a/WebCore/svg/SVGGradientElement.cpp b/WebCore/svg/SVGGradientElement.cpp
index b4fe21d..f573265 100644
--- a/WebCore/svg/SVGGradientElement.cpp
+++ b/WebCore/svg/SVGGradientElement.cpp
@@ -37,17 +37,12 @@
namespace WebCore {
-char SVGGradientElementIdentifier[] = "SVGGradientElement";
-
SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document* doc)
: SVGStyledElement(tagName, doc)
, SVGURIReference()
, SVGExternalResourcesRequired()
- , m_spreadMethod(this, SVGNames::spreadMethodAttr)
- , m_gradientUnits(this, SVGNames::gradientUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
- , m_gradientTransform(this, SVGNames::gradientTransformAttr, SVGTransformList::create(SVGNames::gradientTransformAttr))
- , m_href(this, XLinkNames::hrefAttr)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
+ , m_gradientUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
+ , m_gradientTransform(SVGTransformList::create(SVGNames::gradientTransformAttr))
{
}
@@ -101,6 +96,31 @@ void SVGGradientElement::svgAttributeChanged(const QualifiedName& attrName)
m_resource->invalidate();
}
+void SVGGradientElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeGradientUnits();
+ synchronizeGradientTransform();
+ synchronizeSpreadMethod();
+ synchronizeExternalResourcesRequired();
+ synchronizeHref();
+ return;
+ }
+
+ if (attrName == SVGNames::gradientUnitsAttr)
+ synchronizeGradientUnits();
+ else if (attrName == SVGNames::gradientTransformAttr)
+ synchronizeGradientTransform();
+ else if (attrName == SVGNames::spreadMethodAttr)
+ synchronizeSpreadMethod();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+ else if (SVGURIReference::isKnownAttribute(attrName))
+ synchronizeHref();
+}
+
void SVGGradientElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
{
SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
@@ -114,7 +134,7 @@ RenderObject* SVGGradientElement::createRenderer(RenderArena* arena, RenderStyle
return new (arena) RenderSVGHiddenContainer(this);
}
-SVGResource* SVGGradientElement::canvasResource()
+SVGResource* SVGGradientElement::canvasResource(const RenderObject*)
{
if (!m_resource) {
if (gradientType() == LinearGradientPaintServer)
diff --git a/WebCore/svg/SVGGradientElement.h b/WebCore/svg/SVGGradientElement.h
index 8413597..122e1d9 100644
--- a/WebCore/svg/SVGGradientElement.h
+++ b/WebCore/svg/SVGGradientElement.h
@@ -22,6 +22,7 @@
#define SVGGradientElement_h
#if ENABLE(SVG)
+#include "RenderObject.h"
#include "SVGPaintServerGradient.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGStyledElement.h"
@@ -30,8 +31,6 @@
namespace WebCore {
- extern char SVGGradientElementIdentifier[];
-
class SVGGradientElement : public SVGStyledElement,
public SVGURIReference,
public SVGExternalResourcesRequired {
@@ -41,11 +40,12 @@ namespace WebCore {
virtual void parseMappedAttribute(MappedAttribute*);
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 SVGResource* canvasResource();
+ virtual SVGResource* canvasResource(const RenderObject*);
protected:
friend class SVGPaintServerGradient;
@@ -59,17 +59,15 @@ namespace WebCore {
mutable RefPtr<SVGPaintServerGradient> m_resource;
protected:
- ANIMATED_PROPERTY_DECLARATIONS(SVGGradientElement, SVGGradientElementIdentifier, SVGNames::spreadMethodAttrString, int, SpreadMethod, spreadMethod)
- ANIMATED_PROPERTY_DECLARATIONS(SVGGradientElement, SVGGradientElementIdentifier, SVGNames::gradientUnitsAttrString, int, GradientUnits, gradientUnits)
- ANIMATED_PROPERTY_DECLARATIONS(SVGGradientElement, SVGGradientElementIdentifier, SVGNames::gradientTransformAttrString, SVGTransformList, GradientTransform, gradientTransform)
+ 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)
// SVGURIReference
- ANIMATED_PROPERTY_DECLARATIONS(SVGGradientElement, SVGURIReferenceIdentifier, XLinkNames::hrefAttrString, String, Href, href)
+ DECLARE_ANIMATED_PROPERTY(SVGGradientElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGGradientElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGGradientElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGGradientElement.idl b/WebCore/svg/SVGGradientElement.idl
index 8b09d82..7485780 100644
--- a/WebCore/svg/SVGGradientElement.idl
+++ b/WebCore/svg/SVGGradientElement.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG, GenerateConstructor] SVGGradientElement : SVGElement,
+ interface [Conditional=SVG] SVGGradientElement : SVGElement,
SVGURIReference,
SVGExternalResourcesRequired,
SVGStylable
diff --git a/WebCore/svg/SVGHKernElement.cpp b/WebCore/svg/SVGHKernElement.cpp
index f232fdc..0ee3e76 100644
--- a/WebCore/svg/SVGHKernElement.cpp
+++ b/WebCore/svg/SVGHKernElement.cpp
@@ -48,7 +48,7 @@ SVGHKernElement::~SVGHKernElement()
void SVGHKernElement::insertedIntoDocument()
{
Node* fontNode = parentNode();
- if (fontNode && fontNode->hasTagName(fontTag)) {
+ if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) {
if (SVGFontElement* element = static_cast<SVGFontElement*>(fontNode))
element->invalidateGlyphCache();
}
@@ -57,7 +57,7 @@ void SVGHKernElement::insertedIntoDocument()
void SVGHKernElement::removedFromDocument()
{
Node* fontNode = parentNode();
- if (fontNode && fontNode->hasTagName(fontTag)) {
+ if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) {
if (SVGFontElement* element = static_cast<SVGFontElement*>(fontNode))
element->invalidateGlyphCache();
}
diff --git a/WebCore/svg/SVGImageElement.cpp b/WebCore/svg/SVGImageElement.cpp
index e29846c..4055533 100644
--- a/WebCore/svg/SVGImageElement.cpp
+++ b/WebCore/svg/SVGImageElement.cpp
@@ -41,13 +41,10 @@ SVGImageElement::SVGImageElement(const QualifiedName& tagName, Document* doc)
, SVGLangSpace()
, SVGExternalResourcesRequired()
, SVGURIReference()
- , m_x(this, SVGNames::xAttr, LengthModeWidth)
- , m_y(this, SVGNames::yAttr, LengthModeHeight)
- , m_width(this, SVGNames::widthAttr, LengthModeWidth)
- , m_height(this, SVGNames::heightAttr, LengthModeHeight)
- , m_preserveAspectRatio(this, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())
- , m_href(this, XLinkNames::hrefAttr)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
+ , m_x(LengthModeWidth)
+ , m_y(LengthModeHeight)
+ , m_width(LengthModeWidth)
+ , m_height(LengthModeHeight)
, m_imageLoader(this)
{
}
@@ -62,11 +59,9 @@ void SVGImageElement::parseMappedAttribute(MappedAttribute *attr)
setXBaseValue(SVGLength(LengthModeWidth, attr->value()));
else if (attr->name() == SVGNames::yAttr)
setYBaseValue(SVGLength(LengthModeHeight, attr->value()));
- else if (attr->name() == SVGNames::preserveAspectRatioAttr) {
- const UChar* c = attr->value().characters();
- const UChar* end = c + attr->value().length();
- preserveAspectRatioBaseValue()->parsePreserveAspectRatio(c, end);
- } else if (attr->name() == SVGNames::widthAttr) {
+ else if (attr->name() == SVGNames::preserveAspectRatioAttr)
+ SVGPreserveAspectRatio::parsePreserveAspectRatio(this, attr->value());
+ else if (attr->name() == SVGNames::widthAttr) {
setWidthBaseValue(SVGLength(LengthModeWidth, attr->value()));
addCSSProperty(attr, CSSPropertyWidth, attr->value());
if (widthBaseValue().value(this) < 0.0)
@@ -110,6 +105,37 @@ void SVGImageElement::svgAttributeChanged(const QualifiedName& attrName)
}
}
+void SVGImageElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledTransformableElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeX();
+ synchronizeY();
+ synchronizeWidth();
+ synchronizeHeight();
+ synchronizePreserveAspectRatio();
+ synchronizeExternalResourcesRequired();
+ synchronizeHref();
+ return;
+ }
+
+ if (attrName == SVGNames::xAttr)
+ synchronizeX();
+ else if (attrName == SVGNames::yAttr)
+ synchronizeY();
+ else if (attrName == SVGNames::widthAttr)
+ synchronizeWidth();
+ else if (attrName == SVGNames::heightAttr)
+ synchronizeHeight();
+ else if (attrName == SVGNames::preserveAspectRatioAttr)
+ synchronizePreserveAspectRatio();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+ else if (SVGURIReference::isKnownAttribute(attrName))
+ synchronizeHref();
+}
+
bool SVGImageElement::hasRelativeValues() const
{
return (x().isRelative() || width().isRelative() ||
diff --git a/WebCore/svg/SVGImageElement.h b/WebCore/svg/SVGImageElement.h
index 1bdcdba..3fa0e3f 100644
--- a/WebCore/svg/SVGImageElement.h
+++ b/WebCore/svg/SVGImageElement.h
@@ -47,6 +47,7 @@ namespace WebCore {
virtual void parseMappedAttribute(MappedAttribute*);
virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual void attach();
virtual void insertedIntoDocument();
@@ -61,19 +62,17 @@ namespace WebCore {
virtual bool hasRelativeValues() const;
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGImageElement, SVGNames::imageTagString, SVGNames::xAttrString, SVGLength, X, x)
- ANIMATED_PROPERTY_DECLARATIONS(SVGImageElement, SVGNames::imageTagString, SVGNames::yAttrString, SVGLength, Y, y)
- ANIMATED_PROPERTY_DECLARATIONS(SVGImageElement, SVGNames::imageTagString, SVGNames::widthAttrString, SVGLength, Width, width)
- ANIMATED_PROPERTY_DECLARATIONS(SVGImageElement, SVGNames::imageTagString, SVGNames::heightAttrString, SVGLength, Height, height)
- ANIMATED_PROPERTY_DECLARATIONS(SVGImageElement, SVGNames::imageTagString, SVGNames::preserveAspectRatioAttrString, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
+ DECLARE_ANIMATED_PROPERTY(SVGImageElement, SVGNames::xAttr, SVGLength, X, x)
+ DECLARE_ANIMATED_PROPERTY(SVGImageElement, SVGNames::yAttr, SVGLength, Y, y)
+ DECLARE_ANIMATED_PROPERTY(SVGImageElement, SVGNames::widthAttr, SVGLength, Width, width)
+ DECLARE_ANIMATED_PROPERTY(SVGImageElement, SVGNames::heightAttr, SVGLength, Height, height)
+ DECLARE_ANIMATED_PROPERTY(SVGImageElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
// SVGURIReference
- ANIMATED_PROPERTY_DECLARATIONS(SVGImageElement, SVGURIReferenceIdentifier, XLinkNames::hrefAttrString, String, Href, href)
+ DECLARE_ANIMATED_PROPERTY(SVGImageElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGImageElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGImageElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
SVGImageLoader m_imageLoader;
};
diff --git a/WebCore/svg/SVGLangSpace.idl b/WebCore/svg/SVGLangSpace.idl
index a10867e..277e514 100644
--- a/WebCore/svg/SVGLangSpace.idl
+++ b/WebCore/svg/SVGLangSpace.idl
@@ -26,7 +26,7 @@
module svg {
- interface [Conditional=SVG, ObjCProtocol] SVGLangSpace {
+ interface [Conditional=SVG, ObjCProtocol, OmitConstructor] SVGLangSpace {
attribute core::DOMString xmllang
/*setter raises(DOMException)*/;
attribute core::DOMString xmlspace
diff --git a/WebCore/svg/SVGLength.idl b/WebCore/svg/SVGLength.idl
index 3938a2c..a349c47 100644
--- a/WebCore/svg/SVGLength.idl
+++ b/WebCore/svg/SVGLength.idl
@@ -22,7 +22,7 @@
module svg {
- interface [Conditional=SVG, GenerateConstructor, PODType=SVGLength] SVGLength {
+ interface [Conditional=SVG, PODType=SVGLength] SVGLength {
// Length Unit Types
const unsigned short SVG_LENGTHTYPE_UNKNOWN = 0;
const unsigned short SVG_LENGTHTYPE_NUMBER = 1;
diff --git a/WebCore/svg/SVGLineElement.cpp b/WebCore/svg/SVGLineElement.cpp
index a359698..6c8a16b 100644
--- a/WebCore/svg/SVGLineElement.cpp
+++ b/WebCore/svg/SVGLineElement.cpp
@@ -36,11 +36,10 @@ SVGLineElement::SVGLineElement(const QualifiedName& tagName, Document* doc)
, SVGTests()
, SVGLangSpace()
, SVGExternalResourcesRequired()
- , m_x1(this, SVGNames::x1Attr, LengthModeWidth)
- , m_y1(this, SVGNames::y1Attr, LengthModeHeight)
- , m_x2(this, SVGNames::x2Attr, LengthModeWidth)
- , m_y2(this, SVGNames::y2Attr, LengthModeHeight)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
+ , m_x1(LengthModeWidth)
+ , m_y1(LengthModeHeight)
+ , m_x2(LengthModeWidth)
+ , m_y2(LengthModeHeight)
{
}
@@ -85,6 +84,31 @@ void SVGLineElement::svgAttributeChanged(const QualifiedName& attrName)
renderer()->setNeedsLayout(true);
}
+void SVGLineElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledTransformableElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeX1();
+ synchronizeY1();
+ synchronizeX2();
+ synchronizeY2();
+ synchronizeExternalResourcesRequired();
+ return;
+ }
+
+ if (attrName == SVGNames::x1Attr)
+ synchronizeX1();
+ else if (attrName == SVGNames::y1Attr)
+ synchronizeY1();
+ else if (attrName == SVGNames::x2Attr)
+ synchronizeX2();
+ else if (attrName == SVGNames::y2Attr)
+ synchronizeY2();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+}
+
Path SVGLineElement::toPathData() const
{
return Path::createLine(FloatPoint(x1().value(this), y1().value(this)),
diff --git a/WebCore/svg/SVGLineElement.h b/WebCore/svg/SVGLineElement.h
index a24e009..c5ecafa 100644
--- a/WebCore/svg/SVGLineElement.h
+++ b/WebCore/svg/SVGLineElement.h
@@ -43,6 +43,7 @@ namespace WebCore {
virtual void parseMappedAttribute(MappedAttribute*);
virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual Path toPathData() const;
@@ -52,15 +53,13 @@ namespace WebCore {
virtual bool hasRelativeValues() const;
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGLineElement, SVGNames::lineTagString, SVGNames::x1AttrString, SVGLength, X1, x1)
- ANIMATED_PROPERTY_DECLARATIONS(SVGLineElement, SVGNames::lineTagString, SVGNames::y1AttrString, SVGLength, Y1, y1)
- ANIMATED_PROPERTY_DECLARATIONS(SVGLineElement, SVGNames::lineTagString, SVGNames::x2AttrString, SVGLength, X2, x2)
- ANIMATED_PROPERTY_DECLARATIONS(SVGLineElement, SVGNames::lineTagString, SVGNames::y2AttrString, SVGLength, Y2, y2)
+ DECLARE_ANIMATED_PROPERTY(SVGLineElement, SVGNames::x1Attr, SVGLength, X1, x1)
+ DECLARE_ANIMATED_PROPERTY(SVGLineElement, SVGNames::y1Attr, SVGLength, Y1, y1)
+ DECLARE_ANIMATED_PROPERTY(SVGLineElement, SVGNames::x2Attr, SVGLength, X2, x2)
+ DECLARE_ANIMATED_PROPERTY(SVGLineElement, SVGNames::y2Attr, SVGLength, Y2, y2)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGLineElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGLineElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGLinearGradientElement.cpp b/WebCore/svg/SVGLinearGradientElement.cpp
index f5c8cee..665a1da 100644
--- a/WebCore/svg/SVGLinearGradientElement.cpp
+++ b/WebCore/svg/SVGLinearGradientElement.cpp
@@ -40,10 +40,10 @@ namespace WebCore {
SVGLinearGradientElement::SVGLinearGradientElement(const QualifiedName& tagName, Document* doc)
: SVGGradientElement(tagName, doc)
- , m_x1(this, SVGNames::x1Attr, LengthModeWidth)
- , m_y1(this, SVGNames::y1Attr, LengthModeHeight)
- , m_x2(this, SVGNames::x2Attr, LengthModeWidth, "100%")
- , m_y2(this, SVGNames::y2Attr, LengthModeHeight)
+ , m_x1(LengthModeWidth)
+ , m_y1(LengthModeHeight)
+ , m_x2(LengthModeWidth, "100%")
+ , m_y2(LengthModeHeight)
{
// Spec: If the x2 attribute is not specified, the effect is as if a value of "100%" were specified.
}
@@ -78,6 +78,28 @@ void SVGLinearGradientElement::svgAttributeChanged(const QualifiedName& attrName
m_resource->invalidate();
}
+void SVGLinearGradientElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGGradientElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeX1();
+ synchronizeY1();
+ synchronizeX2();
+ synchronizeY2();
+ return;
+ }
+
+ if (attrName == SVGNames::x1Attr)
+ synchronizeX1();
+ else if (attrName == SVGNames::y1Attr)
+ synchronizeY1();
+ else if (attrName == SVGNames::x2Attr)
+ synchronizeX2();
+ else if (attrName == SVGNames::y2Attr)
+ synchronizeY2();
+}
+
void SVGLinearGradientElement::buildGradient() const
{
LinearGradientAttributes attributes = collectGradientProperties();
diff --git a/WebCore/svg/SVGLinearGradientElement.h b/WebCore/svg/SVGLinearGradientElement.h
index 492c366..0308c0e 100644
--- a/WebCore/svg/SVGLinearGradientElement.h
+++ b/WebCore/svg/SVGLinearGradientElement.h
@@ -36,6 +36,7 @@ namespace WebCore {
virtual void parseMappedAttribute(MappedAttribute*);
virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
protected:
virtual void buildGradient() const;
@@ -44,10 +45,10 @@ namespace WebCore {
LinearGradientAttributes collectGradientProperties() const;
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGLinearGradientElement, SVGNames::linearGradientTagString, SVGNames::x1AttrString, SVGLength, X1, x1)
- ANIMATED_PROPERTY_DECLARATIONS(SVGLinearGradientElement, SVGNames::linearGradientTagString, SVGNames::y1AttrString, SVGLength, Y1, y1)
- ANIMATED_PROPERTY_DECLARATIONS(SVGLinearGradientElement, SVGNames::linearGradientTagString, SVGNames::x2AttrString, SVGLength, X2, x2)
- ANIMATED_PROPERTY_DECLARATIONS(SVGLinearGradientElement, SVGNames::linearGradientTagString, SVGNames::y2AttrString, SVGLength, Y2, y2)
+ DECLARE_ANIMATED_PROPERTY(SVGLinearGradientElement, SVGNames::x1Attr, SVGLength, X1, x1)
+ DECLARE_ANIMATED_PROPERTY(SVGLinearGradientElement, SVGNames::y1Attr, SVGLength, Y1, y1)
+ DECLARE_ANIMATED_PROPERTY(SVGLinearGradientElement, SVGNames::x2Attr, SVGLength, X2, x2)
+ DECLARE_ANIMATED_PROPERTY(SVGLinearGradientElement, SVGNames::y2Attr, SVGLength, Y2, y2)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGList.h b/WebCore/svg/SVGList.h
index 8fb3bc1..e1249e2 100644
--- a/WebCore/svg/SVGList.h
+++ b/WebCore/svg/SVGList.h
@@ -176,7 +176,7 @@ namespace WebCore {
// Updating facilities, used by JSSVGPODTypeWrapperCreatorForList
Item value() const { return m_item; }
- void setValue(Item newItem) { m_item = newItem; }
+ void setValue(const Item& newItem) { m_item = newItem; }
private:
SVGPODListItem() : m_item() { }
diff --git a/WebCore/svg/SVGLocatable.idl b/WebCore/svg/SVGLocatable.idl
index b051286..72db8f4 100644
--- a/WebCore/svg/SVGLocatable.idl
+++ b/WebCore/svg/SVGLocatable.idl
@@ -26,7 +26,7 @@
module svg {
- interface [Conditional=SVG, ObjCProtocol] SVGLocatable {
+ interface [Conditional=SVG, ObjCProtocol, OmitConstructor] SVGLocatable {
readonly attribute SVGElement nearestViewportElement;
readonly attribute SVGElement farthestViewportElement;
diff --git a/WebCore/svg/SVGMPathElement.cpp b/WebCore/svg/SVGMPathElement.cpp
index b8c862a..dfe7e99 100644
--- a/WebCore/svg/SVGMPathElement.cpp
+++ b/WebCore/svg/SVGMPathElement.cpp
@@ -31,8 +31,6 @@ namespace WebCore {
SVGMPathElement::SVGMPathElement(const QualifiedName& qname, Document* doc)
: SVGElement(qname, doc)
- , m_href(this, XLinkNames::hrefAttr)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
{
}
@@ -47,6 +45,22 @@ void SVGMPathElement::parseMappedAttribute(MappedAttribute* attr)
SVGElement::parseMappedAttribute(attr);
}
+void SVGMPathElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeExternalResourcesRequired();
+ synchronizeHref();
+ return;
+ }
+
+ if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+ else if (SVGURIReference::isKnownAttribute(attrName))
+ synchronizeHref();
+}
+
SVGPathElement* SVGMPathElement::pathElement()
{
Element* target = document()->getElementById(getTarget(href()));
diff --git a/WebCore/svg/SVGMPathElement.h b/WebCore/svg/SVGMPathElement.h
index ded6cdf..50a7dd1 100644
--- a/WebCore/svg/SVGMPathElement.h
+++ b/WebCore/svg/SVGMPathElement.h
@@ -36,17 +36,16 @@ namespace WebCore {
virtual ~SVGMPathElement();
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
SVGPathElement* pathElement();
private:
// SVGURIReference
- ANIMATED_PROPERTY_DECLARATIONS(SVGMPathElement, SVGURIReferenceIdentifier, XLinkNames::hrefAttrString, String, Href, href)
+ DECLARE_ANIMATED_PROPERTY(SVGMPathElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGMPathElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGMPathElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGMarkerElement.cpp b/WebCore/svg/SVGMarkerElement.cpp
index 2e96926..ca57fa6 100644
--- a/WebCore/svg/SVGMarkerElement.cpp
+++ b/WebCore/svg/SVGMarkerElement.cpp
@@ -26,7 +26,6 @@
#include "MappedAttribute.h"
#include "PlatformString.h"
#include "RenderSVGViewportContainer.h"
-#include "SVGAngle.h"
#include "SVGFitToViewBox.h"
#include "SVGLength.h"
#include "SVGNames.h"
@@ -43,27 +42,18 @@ SVGMarkerElement::SVGMarkerElement(const QualifiedName& tagName, Document* doc)
, SVGLangSpace()
, SVGExternalResourcesRequired()
, SVGFitToViewBox()
- , m_refX(this, SVGNames::refXAttr, LengthModeWidth)
- , m_refY(this, SVGNames::refYAttr, LengthModeHeight)
- , m_markerWidth(this, SVGNames::markerWidthAttr, LengthModeWidth, "3")
- , m_markerHeight(this, SVGNames::markerHeightAttr, LengthModeHeight, "3")
- , m_markerUnits(this, SVGNames::markerUnitsAttr, SVG_MARKERUNITS_STROKEWIDTH)
- , m_orientType(this, SVGNames::orientAttr, SVG_MARKER_ORIENT_ANGLE)
- , m_orientAngle(this, SVGNames::orientAttr, SVGAngle::create())
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
- , m_viewBox(this, SVGNames::viewBoxAttr)
- , m_preserveAspectRatio(this, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())
+ , m_refX(LengthModeWidth)
+ , m_refY(LengthModeHeight)
+ , m_markerWidth(LengthModeWidth, "3")
+ , m_markerHeight(LengthModeHeight, "3")
+ , m_markerUnits(SVG_MARKERUNITS_STROKEWIDTH)
+ , m_orientType(SVG_MARKER_ORIENT_ANGLE)
{
// Spec: If the markerWidth/markerHeight attribute is not specified, the effect is as if a value of "3" were specified.
}
SVGMarkerElement::~SVGMarkerElement()
{
- // Call detach() here because if we wait until ~Node() calls it, we crash during
- // RenderSVGViewportContainer destruction, as the renderer assumes that the element
- // is still fully constructed. See <https://bugs.webkit.org/show_bug.cgi?id=21293>.
- if (renderer())
- detach();
}
TransformationMatrix SVGMarkerElement::viewBoxToViewTransform(float viewWidth, float viewHeight) const
@@ -87,16 +77,16 @@ void SVGMarkerElement::parseMappedAttribute(MappedAttribute* attr)
else if (attr->name() == SVGNames::markerHeightAttr)
setMarkerHeightBaseValue(SVGLength(LengthModeHeight, attr->value()));
else if (attr->name() == SVGNames::orientAttr) {
- RefPtr<SVGAngle> angle = SVGAngle::create();
+ SVGAngle angle;
if (attr->value() == "auto")
setOrientTypeBaseValue(SVG_MARKER_ORIENT_AUTO);
else {
- angle->setValueAsString(attr->value());
+ angle.setValueAsString(attr->value());
setOrientTypeBaseValue(SVG_MARKER_ORIENT_ANGLE);
}
- setOrientAngleBaseValue(angle.get());
+ setOrientAngleBaseValue(angle);
} else {
if (SVGLangSpace::parseMappedAttribute(attr))
return;
@@ -130,6 +120,45 @@ void SVGMarkerElement::svgAttributeChanged(const QualifiedName& attrName)
}
}
+void SVGMarkerElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeMarkerUnits();
+ synchronizeRefX();
+ synchronizeRefY();
+ synchronizeMarkerWidth();
+ synchronizeMarkerHeight();
+ synchronizeOrientAngle();
+ synchronizeOrientType();
+ synchronizeExternalResourcesRequired();
+ synchronizeViewBox();
+ synchronizePreserveAspectRatio();
+ return;
+ }
+
+ if (attrName == SVGNames::markerUnitsAttr)
+ synchronizeMarkerUnits();
+ else if (attrName == SVGNames::refXAttr)
+ synchronizeRefX();
+ else if (attrName == SVGNames::refYAttr)
+ synchronizeRefY();
+ else if (attrName == SVGNames::markerWidthAttr)
+ synchronizeMarkerWidth();
+ else if (attrName == SVGNames::markerHeightAttr)
+ synchronizeMarkerHeight();
+ else if (attrName == SVGNames::orientAttr) {
+ synchronizeOrientAngle();
+ synchronizeOrientType();
+ } else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+ else if (SVGFitToViewBox::isKnownAttribute(attrName)) {
+ synchronizeViewBox();
+ synchronizePreserveAspectRatio();
+ }
+}
+
void SVGMarkerElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
{
SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
@@ -146,9 +175,7 @@ void SVGMarkerElement::childrenChanged(bool changedByParser, Node* beforeChange,
void SVGMarkerElement::setOrientToAuto()
{
setOrientTypeBaseValue(SVG_MARKER_ORIENT_AUTO);
-
- RefPtr<SVGAngle> angle = SVGAngle::create();
- setOrientAngleBaseValue(angle.get());
+ setOrientAngleBaseValue(SVGAngle());
if (!m_marker)
return;
@@ -159,10 +186,10 @@ void SVGMarkerElement::setOrientToAuto()
m_marker->invalidate();
}
-void SVGMarkerElement::setOrientToAngle(PassRefPtr<SVGAngle> angle)
+void SVGMarkerElement::setOrientToAngle(const SVGAngle& angle)
{
setOrientTypeBaseValue(SVG_MARKER_ORIENT_ANGLE);
- setOrientAngleBaseValue(angle.get());
+ setOrientAngleBaseValue(angle);
if (!m_marker)
return;
@@ -173,20 +200,20 @@ void SVGMarkerElement::setOrientToAngle(PassRefPtr<SVGAngle> angle)
m_marker->invalidate();
}
-SVGResource* SVGMarkerElement::canvasResource()
+SVGResource* SVGMarkerElement::canvasResource(const RenderObject*)
{
if (!m_marker)
m_marker = SVGResourceMarker::create();
- m_marker->setMarker(toRenderSVGViewportContainer(renderer()));
+ ASSERT(renderer());
+ m_marker->setRenderer(toRenderSVGViewportContainer(renderer()));
- if (orientType() == SVG_MARKER_ORIENT_ANGLE) {
- if (orientAngle())
- m_marker->setAngle(orientAngle()->value());
- } else
+ if (orientType() == SVG_MARKER_ORIENT_ANGLE)
+ m_marker->setAngle(orientAngle().value());
+ else
m_marker->setAutoAngle();
- m_marker->setRef(refX().value(this), refY().value(this));
+ m_marker->setReferencePoint(FloatPoint(refX().value(this), refY().value(this)));
m_marker->setUseStrokeWidth(markerUnits() == SVG_MARKERUNITS_STROKEWIDTH);
return m_marker.get();
diff --git a/WebCore/svg/SVGMarkerElement.h b/WebCore/svg/SVGMarkerElement.h
index 7e08a96..8a25cba 100644
--- a/WebCore/svg/SVGMarkerElement.h
+++ b/WebCore/svg/SVGMarkerElement.h
@@ -22,7 +22,7 @@
#define SVGMarkerElement_h
#if ENABLE(SVG)
-
+#include "RenderObject.h"
#include "SVGAngle.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGFitToViewBox.h"
@@ -33,7 +33,6 @@
namespace WebCore {
class Document;
- class SVGAngle;
extern char SVGOrientTypeAttrIdentifier[];
extern char SVGOrientAngleAttrIdentifier[];
@@ -61,32 +60,31 @@ namespace WebCore {
TransformationMatrix viewBoxToViewTransform(float viewWidth, float viewHeight) const;
void setOrientToAuto();
- void setOrientToAngle(PassRefPtr<SVGAngle>);
+ void setOrientToAngle(const SVGAngle&);
virtual void parseMappedAttribute(MappedAttribute*);
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 SVGResource* canvasResource();
+ virtual SVGResource* canvasResource(const RenderObject*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGMarkerElement, SVGNames::markerTagString, SVGNames::refXAttrString, SVGLength, RefX, refX)
- ANIMATED_PROPERTY_DECLARATIONS(SVGMarkerElement, SVGNames::markerTagString, SVGNames::refYAttrString, SVGLength, RefY, refY)
- ANIMATED_PROPERTY_DECLARATIONS(SVGMarkerElement, SVGNames::markerTagString, SVGNames::markerWidthAttrString, SVGLength, MarkerWidth, markerWidth)
- ANIMATED_PROPERTY_DECLARATIONS(SVGMarkerElement, SVGNames::markerTagString, SVGNames::markerHeightAttrString, SVGLength, MarkerHeight, markerHeight)
- ANIMATED_PROPERTY_DECLARATIONS(SVGMarkerElement, SVGNames::markerTagString, SVGNames::markerUnitsAttrString, int, MarkerUnits, markerUnits)
- ANIMATED_PROPERTY_DECLARATIONS(SVGMarkerElement, SVGNames::markerTagString, SVGOrientTypeAttrIdentifier, int, OrientType, orientType)
- ANIMATED_PROPERTY_DECLARATIONS(SVGMarkerElement, SVGNames::markerTagString, SVGOrientAngleAttrIdentifier, SVGAngle, OrientAngle, orientAngle)
+ DECLARE_ANIMATED_PROPERTY(SVGMarkerElement, SVGNames::refXAttr, SVGLength, RefX, refX)
+ DECLARE_ANIMATED_PROPERTY(SVGMarkerElement, SVGNames::refYAttr, SVGLength, RefY, refY)
+ DECLARE_ANIMATED_PROPERTY(SVGMarkerElement, SVGNames::markerWidthAttr, SVGLength, MarkerWidth, markerWidth)
+ DECLARE_ANIMATED_PROPERTY(SVGMarkerElement, SVGNames::markerHeightAttr, SVGLength, MarkerHeight, markerHeight)
+ DECLARE_ANIMATED_PROPERTY(SVGMarkerElement, SVGNames::markerUnitsAttr, int, MarkerUnits, markerUnits)
+ DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGMarkerElement, SVGNames::orientAttr, SVGOrientTypeAttrIdentifier, int, OrientType, orientType)
+ DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGMarkerElement, SVGNames::orientAttr, SVGOrientAngleAttrIdentifier, SVGAngle, OrientAngle, orientAngle)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGMarkerElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGMarkerElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
// SVGFitToViewBox
- ANIMATED_PROPERTY_DECLARATIONS(SVGMarkerElement, SVGFitToViewBoxIdentifier, SVGNames::viewBoxAttrString, FloatRect, ViewBox, viewBox)
- ANIMATED_PROPERTY_DECLARATIONS(SVGMarkerElement, SVGFitToViewBoxIdentifier, SVGNames::preserveAspectRatioAttrString, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
+ DECLARE_ANIMATED_PROPERTY(SVGMarkerElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
+ DECLARE_ANIMATED_PROPERTY(SVGMarkerElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
RefPtr<SVGResourceMarker> m_marker;
};
diff --git a/WebCore/svg/SVGMarkerElement.idl b/WebCore/svg/SVGMarkerElement.idl
index 2f6c45e..c715d70 100644
--- a/WebCore/svg/SVGMarkerElement.idl
+++ b/WebCore/svg/SVGMarkerElement.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG, GenerateConstructor] SVGMarkerElement : SVGElement,
+ interface [Conditional=SVG] SVGMarkerElement : SVGElement,
SVGLangSpace,
SVGExternalResourcesRequired,
SVGStylable,
diff --git a/WebCore/svg/SVGMaskElement.cpp b/WebCore/svg/SVGMaskElement.cpp
index e131d34..75f3dcd 100644
--- a/WebCore/svg/SVGMaskElement.cpp
+++ b/WebCore/svg/SVGMaskElement.cpp
@@ -25,10 +25,14 @@
#if ENABLE(SVG)
#include "SVGMaskElement.h"
+#include "CanvasPixelArray.h"
#include "CSSStyleSelector.h"
#include "GraphicsContext.h"
+#include "Image.h"
#include "ImageBuffer.h"
+#include "ImageData.h"
#include "MappedAttribute.h"
+#include "RenderObject.h"
#include "RenderSVGContainer.h"
#include "SVGLength.h"
#include "SVGNames.h"
@@ -37,6 +41,7 @@
#include <math.h>
#include <wtf/MathExtras.h>
#include <wtf/OwnPtr.h>
+#include <wtf/Vector.h>
using namespace std;
@@ -48,14 +53,12 @@ SVGMaskElement::SVGMaskElement(const QualifiedName& tagName, Document* doc)
, SVGTests()
, SVGLangSpace()
, SVGExternalResourcesRequired()
- , m_maskUnits(this, SVGNames::maskUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
- , m_maskContentUnits(this, SVGNames::maskContentUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
- , m_x(this, SVGNames::xAttr, LengthModeWidth, "-10%")
- , m_y(this, SVGNames::yAttr, LengthModeHeight, "-10%")
- , m_width(this, SVGNames::widthAttr, LengthModeWidth, "120%")
- , m_height(this, SVGNames::heightAttr, LengthModeHeight, "120%")
- , m_href(this, XLinkNames::hrefAttr)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
+ , m_maskUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
+ , m_maskContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
+ , m_x(LengthModeWidth, "-10%")
+ , m_y(LengthModeHeight, "-10%")
+ , m_width(LengthModeWidth, "120%")
+ , m_height(LengthModeHeight, "120%")
{
// Spec: If the x/y attribute is not specified, the effect is as if a value of "-10%" were specified.
// Spec: If the width/height attribute is not specified, the effect is as if a value of "120%" were specified.
@@ -102,7 +105,7 @@ void SVGMaskElement::svgAttributeChanged(const QualifiedName& attrName)
{
SVGStyledElement::svgAttributeChanged(attrName);
- if (!m_masker)
+ if (m_masker.isEmpty())
return;
if (attrName == SVGNames::maskUnitsAttr || attrName == SVGNames::maskContentUnitsAttr ||
@@ -113,90 +116,151 @@ void SVGMaskElement::svgAttributeChanged(const QualifiedName& attrName)
SVGLangSpace::isKnownAttribute(attrName) ||
SVGExternalResourcesRequired::isKnownAttribute(attrName) ||
SVGStyledElement::isKnownAttribute(attrName))
- m_masker->invalidate();
+ for (HashMap<const RenderObject*, RefPtr<SVGResourceMasker> >::iterator it = m_masker.begin(); it != m_masker.end(); ++it)
+ it->second->invalidate();
+}
+
+void SVGMaskElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeMaskUnits();
+ synchronizeMaskContentUnits();
+ synchronizeX();
+ synchronizeY();
+ synchronizeExternalResourcesRequired();
+ synchronizeHref();
+ return;
+ }
+
+ if (attrName == SVGNames::maskUnitsAttr)
+ synchronizeMaskUnits();
+ else if (attrName == SVGNames::maskContentUnitsAttr)
+ synchronizeMaskContentUnits();
+ else if (attrName == SVGNames::xAttr)
+ synchronizeX();
+ else if (attrName == SVGNames::yAttr)
+ synchronizeY();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+ else if (SVGURIReference::isKnownAttribute(attrName))
+ synchronizeHref();
}
void SVGMaskElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
{
SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
- if (!m_masker)
+ if (m_masker.isEmpty())
return;
- m_masker->invalidate();
+ for (HashMap<const RenderObject*, RefPtr<SVGResourceMasker> >::iterator it = m_masker.begin(); it != m_masker.end(); ++it)
+ it->second->invalidate();
}
-PassOwnPtr<ImageBuffer> SVGMaskElement::drawMaskerContent(const FloatRect& targetRect, FloatRect& maskDestRect) const
-{
- // Determine specified mask size
+FloatRect SVGMaskElement::maskBoundingBox(const FloatRect& objectBoundingBox) const
+{
+ FloatRect maskBBox;
if (maskUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
- maskDestRect = FloatRect(x().valueAsPercentage() * targetRect.width(),
- y().valueAsPercentage() * targetRect.height(),
- width().valueAsPercentage() * targetRect.width(),
- height().valueAsPercentage() * targetRect.height());
+ maskBBox = FloatRect(x().valueAsPercentage() * objectBoundingBox.width() + objectBoundingBox.x(),
+ y().valueAsPercentage() * objectBoundingBox.height() + objectBoundingBox.y(),
+ width().valueAsPercentage() * objectBoundingBox.width(),
+ height().valueAsPercentage() * objectBoundingBox.height());
else
- maskDestRect = FloatRect(x().value(this),
- y().value(this),
- width().value(this),
- height().value(this));
+ maskBBox = FloatRect(x().value(this),
+ y().value(this),
+ width().value(this),
+ height().value(this));
+
+ return maskBBox;
+}
+
+PassOwnPtr<ImageBuffer> SVGMaskElement::drawMaskerContent(const RenderObject* object, FloatRect& maskDestRect, bool& emptyMask) const
+{
+ FloatRect objectBoundingBox = object->objectBoundingBox();
+
+ // Mask rect clipped with clippingBoundingBox and filterBoundingBox as long as they are present.
+ maskDestRect = object->repaintRectInLocalCoordinates();
+ if (maskDestRect.isEmpty()) {
+ emptyMask = true;
+ return 0;
+ }
+
+ // Calculate the smallest rect for the mask ImageBuffer.
+ FloatRect repaintRect;
+ Vector<RenderObject*> rendererList;
+ for (Node* node = firstChild(); node; node = node->nextSibling()) {
+ if (!node->isSVGElement() || !static_cast<SVGElement*>(node)->isStyled() || !node->renderer())
+ continue;
+
+ rendererList.append(node->renderer());
+ repaintRect.unite(node->renderer()->localToParentTransform().mapRect(node->renderer()->repaintRectInLocalCoordinates()));
+ }
- IntSize imageSize(lroundf(maskDestRect.width()), lroundf(maskDestRect.height()));
- clampImageBufferSizeToViewport(document()->view(), imageSize);
+ TransformationMatrix contextTransform;
+ // We need to scale repaintRect for objectBoundingBox to get the drawing area.
+ if (maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
+ contextTransform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height());
+ FloatPoint contextAdjustment = repaintRect.location();
+ repaintRect = contextTransform.mapRect(repaintRect);
+ repaintRect.move(objectBoundingBox.x(), objectBoundingBox.y());
+ contextTransform.translate(-contextAdjustment.x(), -contextAdjustment.y());
+ }
+ repaintRect.intersect(maskDestRect);
+ maskDestRect = repaintRect;
+ IntRect maskImageRect = enclosingIntRect(maskDestRect);
- if (imageSize.width() < static_cast<int>(maskDestRect.width()))
- maskDestRect.setWidth(imageSize.width());
+ maskImageRect.setLocation(IntPoint());
- if (imageSize.height() < static_cast<int>(maskDestRect.height()))
- maskDestRect.setHeight(imageSize.height());
+ // Don't create ImageBuffers with image size of 0
+ if (!maskImageRect.width() || !maskImageRect.height()) {
+ emptyMask = true;
+ return 0;
+ }
// FIXME: This changes color space to linearRGB, the default color space
// for masking operations in SVG. We need a switch for the other color-space
// attribute values sRGB, inherit and auto.
- OwnPtr<ImageBuffer> maskImage = ImageBuffer::create(imageSize, LinearRGB);
+ OwnPtr<ImageBuffer> maskImage = ImageBuffer::create(maskImageRect.size(), LinearRGB);
if (!maskImage)
return 0;
- FloatPoint maskContextLocation = maskDestRect.location();
- if (maskUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
- maskDestRect.move(targetRect.x(), targetRect.y());
- if (maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
- maskContextLocation.move(targetRect.x(), targetRect.y());
- } else {
- if (maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
- maskContextLocation.move(-targetRect.x(), -targetRect.y());
- }
-
GraphicsContext* maskImageContext = maskImage->context();
ASSERT(maskImageContext);
maskImageContext->save();
- maskImageContext->translate(-maskContextLocation.x(), -maskContextLocation.y());
- if (maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
- maskImageContext->save();
- maskImageContext->scale(FloatSize(targetRect.width(), targetRect.height()));
- }
+ if (maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
+ maskImageContext->translate(-maskDestRect.x(), -maskDestRect.y());
+ maskImageContext->concatCTM(contextTransform);
- // Render subtree into ImageBuffer
- for (Node* n = firstChild(); n; n = n->nextSibling()) {
- SVGElement* elem = 0;
- if (n->isSVGElement())
- elem = static_cast<SVGElement*>(n);
- if (!elem || !elem->isStyled())
- continue;
+ // draw the content into the ImageBuffer
+ Vector<RenderObject*>::iterator end = rendererList.end();
+ for (Vector<RenderObject*>::iterator it = rendererList.begin(); it != end; it++)
+ renderSubtreeToImage(maskImage.get(), *it);
+
+
+ maskImageContext->restore();
+
+ // create the luminance mask
+ RefPtr<ImageData> imageData(maskImage->getUnmultipliedImageData(maskImageRect));
+ CanvasPixelArray* srcPixelArray(imageData->data());
- SVGStyledElement* e = static_cast<SVGStyledElement*>(elem);
- RenderObject* item = e->renderer();
- if (!item)
+ for (unsigned pixelOffset = 0; pixelOffset < srcPixelArray->length(); pixelOffset += 4) {
+ unsigned char a = srcPixelArray->get(pixelOffset + 3);
+ if (!a)
continue;
+ unsigned char r = srcPixelArray->get(pixelOffset);
+ unsigned char g = srcPixelArray->get(pixelOffset + 1);
+ unsigned char b = srcPixelArray->get(pixelOffset + 2);
- renderSubtreeToImage(maskImage.get(), item);
+ double luma = (r * 0.2125 + g * 0.7154 + b * 0.0721) * ((double)a / 255.0);
+ srcPixelArray->set(pixelOffset + 3, luma);
}
- if (maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
- maskImageContext->restore();
+ maskImage->putUnmultipliedImageData(imageData.get(), maskImageRect, IntPoint());
- maskImageContext->restore();
return maskImage.release();
}
@@ -207,11 +271,18 @@ RenderObject* SVGMaskElement::createRenderer(RenderArena* arena, RenderStyle*)
return maskContainer;
}
-SVGResource* SVGMaskElement::canvasResource()
+SVGResource* SVGMaskElement::canvasResource(const RenderObject* object)
{
- if (!m_masker)
- m_masker = SVGResourceMasker::create(this);
- return m_masker.get();
+ ASSERT(object);
+
+ if (m_masker.contains(object))
+ return m_masker.get(object).get();
+
+ RefPtr<SVGResourceMasker> masker = SVGResourceMasker::create(this);
+ SVGResourceMasker* maskerPtr = masker.get();
+ m_masker.set(object, masker.release());
+
+ return maskerPtr;
}
}
diff --git a/WebCore/svg/SVGMaskElement.h b/WebCore/svg/SVGMaskElement.h
index 362c730..3abc08b 100644
--- a/WebCore/svg/SVGMaskElement.h
+++ b/WebCore/svg/SVGMaskElement.h
@@ -21,17 +21,20 @@
#define SVGMaskElement_h
#if ENABLE(SVG)
+#include "RenderObject.h"
#include "SVGResourceMasker.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
#include "SVGStyledLocatableElement.h"
#include "SVGTests.h"
#include "SVGURIReference.h"
+#include <wtf/HashMap.h>
#include <wtf/PassOwnPtr.h>
namespace WebCore {
class SVGLength;
+ class SVGResourceMasker;
class SVGMaskElement : public SVGStyledLocatableElement,
public SVGURIReference,
@@ -43,32 +46,32 @@ namespace WebCore {
virtual ~SVGMaskElement();
virtual bool isValid() const { return SVGTests::isValid(); }
+ FloatRect maskBoundingBox(const FloatRect&) const;
virtual void parseMappedAttribute(MappedAttribute*);
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 SVGResource* canvasResource();
+ virtual SVGResource* canvasResource(const RenderObject*);
- PassOwnPtr<ImageBuffer> drawMaskerContent(const FloatRect& targetRect, FloatRect& maskRect) const;
+ PassOwnPtr<ImageBuffer> drawMaskerContent(const RenderObject*, FloatRect& maskRect, bool& emptyMask) const;
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGNames::maskTagString, SVGNames::maskUnitsAttrString, int, MaskUnits, maskUnits)
- ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGNames::maskTagString, SVGNames::maskContentUnitsAttrString, int, MaskContentUnits, maskContentUnits)
- ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGNames::maskTagString, SVGNames::xAttrString, SVGLength, X, x)
- ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGNames::maskTagString, SVGNames::yAttrString, SVGLength, Y, y)
- ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGNames::maskTagString, SVGNames::widthAttrString, SVGLength, Width, width)
- ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGNames::maskTagString, SVGNames::heightAttrString, SVGLength, Height, height)
+ DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::maskUnitsAttr, int, MaskUnits, maskUnits)
+ DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::maskContentUnitsAttr, int, MaskContentUnits, maskContentUnits)
+ DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::xAttr, SVGLength, X, x)
+ DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::yAttr, SVGLength, Y, y)
+ DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::widthAttr, SVGLength, Width, width)
+ DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::heightAttr, SVGLength, Height, height)
// SVGURIReference
- ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGURIReferenceIdentifier, XLinkNames::hrefAttrString, String, Href, href)
+ DECLARE_ANIMATED_PROPERTY(SVGMaskElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
- RefPtr<SVGResourceMasker> m_masker;
+ HashMap<const RenderObject*, RefPtr<SVGResourceMasker> > m_masker;
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGNumberList.cpp b/WebCore/svg/SVGNumberList.cpp
index c73e397..11aebde 100644
--- a/WebCore/svg/SVGNumberList.cpp
+++ b/WebCore/svg/SVGNumberList.cpp
@@ -28,7 +28,7 @@
namespace WebCore {
SVGNumberList::SVGNumberList(const QualifiedName& attributeName)
- : SVGList<float>(attributeName)
+ : SVGPODList<float>(attributeName)
{
}
diff --git a/WebCore/svg/SVGNumberList.h b/WebCore/svg/SVGNumberList.h
index 29de27e..329968b 100644
--- a/WebCore/svg/SVGNumberList.h
+++ b/WebCore/svg/SVGNumberList.h
@@ -29,7 +29,7 @@ namespace WebCore {
class String;
- class SVGNumberList : public SVGList<float> {
+ class SVGNumberList : public SVGPODList<float> {
public:
static PassRefPtr<SVGNumberList> create(const QualifiedName& attributeName) { return adoptRef(new SVGNumberList(attributeName)); }
virtual ~SVGNumberList();
diff --git a/WebCore/svg/SVGPaint.idl b/WebCore/svg/SVGPaint.idl
index 7799aa3..392ae33 100644
--- a/WebCore/svg/SVGPaint.idl
+++ b/WebCore/svg/SVGPaint.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG, GenerateConstructor] SVGPaint : SVGColor {
+ interface [Conditional=SVG] SVGPaint : SVGColor {
// SVGPaintType
const unsigned short SVG_PAINTTYPE_UNKNOWN = 0;
const unsigned short SVG_PAINTTYPE_RGBCOLOR = 1;
diff --git a/WebCore/svg/SVGPathElement.cpp b/WebCore/svg/SVGPathElement.cpp
index d53fbb2..f6e7867 100644
--- a/WebCore/svg/SVGPathElement.cpp
+++ b/WebCore/svg/SVGPathElement.cpp
@@ -47,8 +47,6 @@ SVGPathElement::SVGPathElement(const QualifiedName& tagName, Document* doc)
, SVGTests()
, SVGLangSpace()
, SVGExternalResourcesRequired()
- , m_pathLength(this, SVGNames::pathLengthAttr, 0.0f)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
{
}
@@ -206,6 +204,22 @@ void SVGPathElement::svgAttributeChanged(const QualifiedName& attrName)
renderer()->setNeedsLayout(true);
}
+void SVGPathElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledTransformableElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizePathLength();
+ synchronizeExternalResourcesRequired();
+ return;
+ }
+
+ if (attrName == SVGNames::pathLengthAttr)
+ synchronizePathLength();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+}
+
SVGPathSegList* SVGPathElement::pathSegList() const
{
if (!m_pathSegList)
diff --git a/WebCore/svg/SVGPathElement.h b/WebCore/svg/SVGPathElement.h
index 266bfdd..e46ed92 100644
--- a/WebCore/svg/SVGPathElement.h
+++ b/WebCore/svg/SVGPathElement.h
@@ -92,6 +92,7 @@ namespace WebCore {
virtual void parseMappedAttribute(MappedAttribute*);
virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual Path toPathData() const;
@@ -100,12 +101,10 @@ namespace WebCore {
private:
mutable RefPtr<SVGPathSegList> m_pathSegList;
- ANIMATED_PROPERTY_DECLARATIONS(SVGPathElement, SVGNames::pathTagString, SVGNames::pathLengthAttrString, float, PathLength, pathLength)
+ DECLARE_ANIMATED_PROPERTY(SVGPathElement, SVGNames::pathLengthAttr, float, PathLength, pathLength)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGPathElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGPathElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSeg.idl b/WebCore/svg/SVGPathSeg.idl
index 6754d2a..afabb41 100644
--- a/WebCore/svg/SVGPathSeg.idl
+++ b/WebCore/svg/SVGPathSeg.idl
@@ -26,7 +26,7 @@
module svg {
- interface [Conditional=SVG, CustomToJS, GenerateConstructor, Polymorphic] SVGPathSeg {
+ interface [Conditional=SVG, CustomToJS, Polymorphic] SVGPathSeg {
// Path Segment Types
const unsigned short PATHSEG_UNKNOWN = 0;
const unsigned short PATHSEG_CLOSEPATH = 1;
diff --git a/WebCore/svg/SVGPatternElement.cpp b/WebCore/svg/SVGPatternElement.cpp
index a10c2c2..b3c040b 100644
--- a/WebCore/svg/SVGPatternElement.cpp
+++ b/WebCore/svg/SVGPatternElement.cpp
@@ -55,17 +55,13 @@ SVGPatternElement::SVGPatternElement(const QualifiedName& tagName, Document* doc
, SVGLangSpace()
, SVGExternalResourcesRequired()
, SVGFitToViewBox()
- , m_x(this, SVGNames::xAttr, LengthModeWidth)
- , m_y(this, SVGNames::yAttr, LengthModeHeight)
- , m_width(this, SVGNames::widthAttr, LengthModeWidth)
- , m_height(this, SVGNames::heightAttr, LengthModeHeight)
- , m_patternUnits(this, SVGNames::patternUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
- , m_patternContentUnits(this, SVGNames::patternContentUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
- , m_patternTransform(this, SVGNames::patternTransformAttr, SVGTransformList::create(SVGNames::patternTransformAttr))
- , m_href(this, XLinkNames::hrefAttr)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
- , m_viewBox(this, SVGNames::viewBoxAttr)
- , m_preserveAspectRatio(this, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())
+ , m_x(LengthModeWidth)
+ , m_y(LengthModeHeight)
+ , m_width(LengthModeWidth)
+ , m_height(LengthModeHeight)
+ , m_patternUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
+ , m_patternContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
+ , m_patternTransform(SVGTransformList::create(SVGNames::patternTransformAttr))
{
}
@@ -138,6 +134,48 @@ void SVGPatternElement::svgAttributeChanged(const QualifiedName& attrName)
m_resource->invalidate();
}
+void SVGPatternElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizePatternUnits();
+ synchronizePatternContentUnits();
+ synchronizePatternTransform();
+ synchronizeX();
+ synchronizeY();
+ synchronizeWidth();
+ synchronizeHeight();
+ synchronizeExternalResourcesRequired();
+ synchronizeViewBox();
+ synchronizePreserveAspectRatio();
+ synchronizeHref();
+ return;
+ }
+
+ if (attrName == SVGNames::patternUnitsAttr)
+ synchronizePatternUnits();
+ else if (attrName == SVGNames::patternContentUnitsAttr)
+ synchronizePatternContentUnits();
+ else if (attrName == SVGNames::patternTransformAttr)
+ synchronizePatternTransform();
+ else if (attrName == SVGNames::xAttr)
+ synchronizeX();
+ else if (attrName == SVGNames::yAttr)
+ synchronizeY();
+ else if (attrName == SVGNames::widthAttr)
+ synchronizeWidth();
+ else if (attrName == SVGNames::heightAttr)
+ synchronizeHeight();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+ else if (SVGFitToViewBox::isKnownAttribute(attrName)) {
+ synchronizeViewBox();
+ synchronizePreserveAspectRatio();
+ } else if (SVGURIReference::isKnownAttribute(attrName))
+ synchronizeHref();
+}
+
void SVGPatternElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
{
SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
@@ -263,7 +301,7 @@ RenderObject* SVGPatternElement::createRenderer(RenderArena* arena, RenderStyle*
return patternContainer;
}
-SVGResource* SVGPatternElement::canvasResource()
+SVGResource* SVGPatternElement::canvasResource(const RenderObject*)
{
if (!m_resource)
m_resource = SVGPaintServerPattern::create(this);
diff --git a/WebCore/svg/SVGPatternElement.h b/WebCore/svg/SVGPatternElement.h
index 6a679af..fffbbca 100644
--- a/WebCore/svg/SVGPatternElement.h
+++ b/WebCore/svg/SVGPatternElement.h
@@ -22,6 +22,7 @@
#define SVGPatternElement_h
#if ENABLE(SVG)
+#include "RenderObject.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGFitToViewBox.h"
#include "SVGLangSpace.h"
@@ -51,31 +52,30 @@ namespace WebCore {
virtual void parseMappedAttribute(MappedAttribute*);
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 SVGResource* canvasResource();
+ virtual SVGResource* canvasResource(const RenderObject*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGNames::patternTagString, SVGNames::xAttrString, SVGLength, X, x)
- ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGNames::patternTagString, SVGNames::yAttrString, SVGLength, Y, y)
- ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGNames::patternTagString, SVGNames::widthAttrString, SVGLength, Width, width)
- ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGNames::patternTagString, SVGNames::heightAttrString, SVGLength, Height, height)
- ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGNames::patternTagString, SVGNames::patternUnitsAttrString, int, PatternUnits, patternUnits)
- ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGNames::patternTagString, SVGNames::patternContentUnitsAttrString, int, PatternContentUnits, patternContentUnits)
- ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGNames::patternTagString, SVGNames::patternTransformAttrString, SVGTransformList, PatternTransform, patternTransform)
+ DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::xAttr, SVGLength, X, x)
+ DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::yAttr, SVGLength, Y, y)
+ DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::widthAttr, SVGLength, Width, width)
+ DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::heightAttr, SVGLength, Height, height)
+ DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::patternUnitsAttr, int, PatternUnits, patternUnits)
+ DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::patternContentUnitsAttr, int, PatternContentUnits, patternContentUnits)
+ DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::patternTransformAttr, SVGTransformList*, PatternTransform, patternTransform)
// SVGURIReference
- ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGURIReferenceIdentifier, XLinkNames::hrefAttrString, String, Href, href)
+ DECLARE_ANIMATED_PROPERTY(SVGPatternElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
// SVGPatternElement
- ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGFitToViewBoxIdentifier, SVGNames::viewBoxAttrString, FloatRect, ViewBox, viewBox)
- ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGFitToViewBoxIdentifier, SVGNames::preserveAspectRatioAttrString, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
+ DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
+ DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
mutable RefPtr<SVGPaintServerPattern> m_resource;
diff --git a/WebCore/svg/SVGPointList.idl b/WebCore/svg/SVGPointList.idl
index cf82dff..24b1042 100644
--- a/WebCore/svg/SVGPointList.idl
+++ b/WebCore/svg/SVGPointList.idl
@@ -28,19 +28,19 @@ module svg {
interface [Conditional=SVG] SVGPointList {
readonly attribute unsigned long numberOfItems;
- [JSCCustom] void clear()
+ void clear()
raises(DOMException);
- [JSCCustom] SVGPoint initialize(in SVGPoint item)
+ SVGPoint initialize(in SVGPoint item)
raises(DOMException, SVGException);
- [JSCCustom] SVGPoint getItem(in unsigned long index)
+ SVGPoint getItem(in unsigned long index)
raises(DOMException);
- [JSCCustom] SVGPoint insertItemBefore(in SVGPoint item, in unsigned long index)
+ SVGPoint insertItemBefore(in SVGPoint item, in unsigned long index)
raises(DOMException, SVGException);
- [JSCCustom] SVGPoint replaceItem(in SVGPoint item, in unsigned long index)
+ SVGPoint replaceItem(in SVGPoint item, in unsigned long index)
raises(DOMException, SVGException);
- [JSCCustom] SVGPoint removeItem(in unsigned long index)
+ SVGPoint removeItem(in unsigned long index)
raises(DOMException);
- [JSCCustom] SVGPoint appendItem(in SVGPoint item)
+ SVGPoint appendItem(in SVGPoint item)
raises(DOMException, SVGException);
};
diff --git a/WebCore/svg/SVGPolyElement.cpp b/WebCore/svg/SVGPolyElement.cpp
index 61725b5..800bdfa 100644
--- a/WebCore/svg/SVGPolyElement.cpp
+++ b/WebCore/svg/SVGPolyElement.cpp
@@ -27,7 +27,6 @@
#include "FloatPoint.h"
#include "MappedAttribute.h"
#include "RenderPath.h"
-#include "SVGAnimatedProperty.h"
#include "SVGNames.h"
#include "SVGParserUtilities.h"
#include "SVGPointList.h"
@@ -40,7 +39,6 @@ SVGPolyElement::SVGPolyElement(const QualifiedName& tagName, Document* doc)
, SVGLangSpace()
, SVGExternalResourcesRequired()
, SVGAnimatedPoints()
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
{
}
@@ -88,41 +86,35 @@ void SVGPolyElement::svgAttributeChanged(const QualifiedName& attrName)
{
SVGStyledTransformableElement::svgAttributeChanged(attrName);
- if (!renderer())
- return;
-
- if (attrName == SVGNames::pointsAttr) {
+ // The points property is not a regular SVGAnimatedProperty, still we use the same SVG<->XML DOM synchronization framework.
+ if (attrName == SVGNames::pointsAttr)
setSynchronizedSVGAttributes(false);
- renderer()->setNeedsLayout(true);
+
+ if (!renderer())
return;
- }
- if (SVGTests::isKnownAttribute(attrName) ||
- SVGLangSpace::isKnownAttribute(attrName) ||
- SVGExternalResourcesRequired::isKnownAttribute(attrName) ||
- SVGStyledTransformableElement::isKnownAttribute(attrName))
+ if (attrName == SVGNames::pointsAttr
+ || SVGTests::isKnownAttribute(attrName)
+ || SVGLangSpace::isKnownAttribute(attrName)
+ || SVGExternalResourcesRequired::isKnownAttribute(attrName)
+ || SVGStyledTransformableElement::isKnownAttribute(attrName))
renderer()->setNeedsLayout(true);
}
-// Custom SVG<->XML synchronization logic, as SVGPoly*Element doesn't use animated
-// properties for this, but a special solution: SVGAnimatedPoints inheritance.
-void SVGPolyElement::updateAnimatedSVGAttribute(const String& name) const
+void SVGPolyElement::synchronizeProperty(const QualifiedName& attrName)
{
- ASSERT(!m_areSVGAttributesValid);
-
- if (m_synchronizingSVGAttributes)
- return;
-
- if (name == SVGNames::pointsAttr.localName()) {
- m_synchronizingSVGAttributes = true;
+ SVGStyledTransformableElement::synchronizeProperty(attrName);
- PropertySynchronizer<SVGPolyElement, SVGPointList*, true>::synchronize(this, SVGNames::pointsAttr, m_points.get());
- setSynchronizedSVGAttributes(true);
- m_synchronizingSVGAttributes = false;
+ if (attrName == anyQName()) {
+ synchronizeExternalResourcesRequired();
+ SVGAnimatedPropertySynchronizer<true>::synchronize(this, SVGNames::pointsAttr, points()->valueAsString());
return;
}
- SVGStyledTransformableElement::updateAnimatedSVGAttribute(name);
+ if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+ else if (attrName == SVGNames::pointsAttr)
+ SVGAnimatedPropertySynchronizer<true>::synchronize(this, attrName, points()->valueAsString());
}
}
diff --git a/WebCore/svg/SVGPolyElement.h b/WebCore/svg/SVGPolyElement.h
index 2ffd150..b881ca2 100644
--- a/WebCore/svg/SVGPolyElement.h
+++ b/WebCore/svg/SVGPolyElement.h
@@ -46,17 +46,14 @@ namespace WebCore {
virtual void parseMappedAttribute(MappedAttribute*);
virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
virtual bool supportsMarkers() const { return true; }
- virtual void updateAnimatedSVGAttribute(const String&) const;
-
private:
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGPolyElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGPolyElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
mutable RefPtr<SVGPointList> m_points;
};
diff --git a/WebCore/svg/SVGPreserveAspectRatio.cpp b/WebCore/svg/SVGPreserveAspectRatio.cpp
index e6452c3..be07a26 100644
--- a/WebCore/svg/SVGPreserveAspectRatio.cpp
+++ b/WebCore/svg/SVGPreserveAspectRatio.cpp
@@ -1,6 +1,7 @@
/*
Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
+ 2010 Dirk Schulze <krit@webkit.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -60,11 +61,12 @@ unsigned short SVGPreserveAspectRatio::meetOrSlice() const
return m_meetOrSlice;
}
-bool SVGPreserveAspectRatio::parsePreserveAspectRatio(const UChar*& currParam, const UChar* end, bool validate)
+SVGPreserveAspectRatio SVGPreserveAspectRatio::parsePreserveAspectRatio(const UChar*& currParam, const UChar* end, bool validate, bool& result)
{
- SVGPreserveAspectRatioType align = SVG_PRESERVEASPECTRATIO_NONE;
- SVGMeetOrSliceType meetOrSlice = SVG_MEETORSLICE_MEET;
- bool ret = false;
+ SVGPreserveAspectRatio aspectRatio;
+ aspectRatio.m_align = SVG_PRESERVEASPECTRATIO_NONE;
+ aspectRatio.m_meetOrSlice = SVG_MEETORSLICE_MEET;
+ result = false;
if (!skipOptionalSpaces(currParam, end))
goto bail_out;
@@ -90,25 +92,25 @@ bool SVGPreserveAspectRatio::parsePreserveAspectRatio(const UChar*& currParam, c
if (currParam[3] == 'n') {
if (currParam[6] == 'i') {
if (currParam[7] == 'n')
- align = SVG_PRESERVEASPECTRATIO_XMINYMIN;
+ aspectRatio.m_align = SVG_PRESERVEASPECTRATIO_XMINYMIN;
else if (currParam[7] == 'd')
- align = SVG_PRESERVEASPECTRATIO_XMINYMID;
+ aspectRatio.m_align = SVG_PRESERVEASPECTRATIO_XMINYMID;
else
goto bail_out;
} else if (currParam[6] == 'a' && currParam[7] == 'x')
- align = SVG_PRESERVEASPECTRATIO_XMINYMAX;
+ aspectRatio.m_align = SVG_PRESERVEASPECTRATIO_XMINYMAX;
else
goto bail_out;
} else if (currParam[3] == 'd') {
if (currParam[6] == 'i') {
if (currParam[7] == 'n')
- align = SVG_PRESERVEASPECTRATIO_XMIDYMIN;
+ aspectRatio.m_align = SVG_PRESERVEASPECTRATIO_XMIDYMIN;
else if (currParam[7] == 'd')
- align = SVG_PRESERVEASPECTRATIO_XMIDYMID;
+ aspectRatio.m_align = SVG_PRESERVEASPECTRATIO_XMIDYMID;
else
goto bail_out;
} else if (currParam[6] == 'a' && currParam[7] == 'x')
- align = SVG_PRESERVEASPECTRATIO_XMIDYMAX;
+ aspectRatio.m_align = SVG_PRESERVEASPECTRATIO_XMIDYMAX;
else
goto bail_out;
} else
@@ -116,13 +118,13 @@ bool SVGPreserveAspectRatio::parsePreserveAspectRatio(const UChar*& currParam, c
} else if (currParam[2] == 'a' && currParam[3] == 'x') {
if (currParam[6] == 'i') {
if (currParam[7] == 'n')
- align = SVG_PRESERVEASPECTRATIO_XMAXYMIN;
+ aspectRatio.m_align = SVG_PRESERVEASPECTRATIO_XMAXYMIN;
else if (currParam[7] == 'd')
- align = SVG_PRESERVEASPECTRATIO_XMAXYMID;
+ aspectRatio.m_align = SVG_PRESERVEASPECTRATIO_XMAXYMID;
else
goto bail_out;
} else if (currParam[6] == 'a' && currParam[7] == 'x')
- align = SVG_PRESERVEASPECTRATIO_XMAXYMAX;
+ aspectRatio.m_align = SVG_PRESERVEASPECTRATIO_XMAXYMAX;
else
goto bail_out;
} else
@@ -141,31 +143,102 @@ bool SVGPreserveAspectRatio::parsePreserveAspectRatio(const UChar*& currParam, c
if (!skipString(currParam, end, "slice"))
goto bail_out;
skipOptionalSpaces(currParam, end);
- if (align != SVG_PRESERVEASPECTRATIO_NONE)
- meetOrSlice = SVG_MEETORSLICE_SLICE;
+ if (aspectRatio.m_align != SVG_PRESERVEASPECTRATIO_NONE)
+ aspectRatio.m_meetOrSlice = SVG_MEETORSLICE_SLICE;
}
}
if (end != currParam && validate) {
bail_out:
// FIXME: Should the two values be set to UNKNOWN instead?
- align = SVG_PRESERVEASPECTRATIO_NONE;
- meetOrSlice = SVG_MEETORSLICE_MEET;
+ aspectRatio.m_align = SVG_PRESERVEASPECTRATIO_NONE;
+ aspectRatio.m_meetOrSlice = SVG_MEETORSLICE_MEET;
} else
- ret = true;
+ result = true;
- if (m_align == align && m_meetOrSlice == meetOrSlice)
- return ret;
+ return aspectRatio;
+}
- m_align = align;
- m_meetOrSlice = meetOrSlice;
- return ret;
+void SVGPreserveAspectRatio::transformRect(FloatRect& destRect, FloatRect& srcRect)
+{
+ FloatSize imageSize = srcRect.size();
+ float origDestWidth = destRect.width();
+ float origDestHeight = destRect.height();
+ if (meetOrSlice() == SVGPreserveAspectRatio::SVG_MEETORSLICE_MEET) {
+ float widthToHeightMultiplier = srcRect.height() / srcRect.width();
+ if (origDestHeight > (origDestWidth * widthToHeightMultiplier)) {
+ destRect.setHeight(origDestWidth * widthToHeightMultiplier);
+ switch (align()) {
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMID:
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID:
+ destRect.setY(destRect.y() + origDestHeight / 2.0f - destRect.height() / 2.0f);
+ break;
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMAX:
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX:
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMAX:
+ destRect.setY(destRect.y() + origDestHeight - destRect.height());
+ break;
+ }
+ }
+ if (origDestWidth > (origDestHeight / widthToHeightMultiplier)) {
+ destRect.setWidth(origDestHeight / widthToHeightMultiplier);
+ switch (align()) {
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMIN:
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX:
+ destRect.setX(destRect.x() + origDestWidth / 2.0f - destRect.width() / 2.0f);
+ break;
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMIN:
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID:
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMAX:
+ destRect.setX(destRect.x() + origDestWidth - destRect.width());
+ break;
+ }
+ }
+ } else if (meetOrSlice() == SVGPreserveAspectRatio::SVG_MEETORSLICE_SLICE) {
+ float widthToHeightMultiplier = srcRect.height() / srcRect.width();
+ // if the destination height is less than the height of the image we'll be drawing
+ if (origDestHeight < (origDestWidth * widthToHeightMultiplier)) {
+ float destToSrcMultiplier = srcRect.width() / destRect.width();
+ srcRect.setHeight(destRect.height() * destToSrcMultiplier);
+ switch (align()) {
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMID:
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID:
+ srcRect.setY(destRect.y() + imageSize.height() / 2.0f - srcRect.height() / 2.0f);
+ break;
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMAX:
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX:
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMAX:
+ srcRect.setY(destRect.y() + imageSize.height() - srcRect.height());
+ break;
+ }
+ }
+ // if the destination width is less than the width of the image we'll be drawing
+ if (origDestWidth < (origDestHeight / widthToHeightMultiplier)) {
+ float destToSrcMultiplier = srcRect.height() / destRect.height();
+ srcRect.setWidth(destRect.width() * destToSrcMultiplier);
+ switch (align()) {
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMIN:
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX:
+ srcRect.setX(destRect.x() + imageSize.width() / 2.0f - srcRect.width() / 2.0f);
+ break;
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMIN:
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID:
+ case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMAX:
+ srcRect.setX(destRect.x() + imageSize.width() - srcRect.width());
+ break;
+ }
+ }
+ }
}
TransformationMatrix SVGPreserveAspectRatio::getCTM(double logicX, double logicY,
double logicWidth, double logicHeight,
double /*physX*/, double /*physY*/,
- double physWidth, double physHeight)
+ double physWidth, double physHeight) const
{
TransformationMatrix temp;
diff --git a/WebCore/svg/SVGPreserveAspectRatio.h b/WebCore/svg/SVGPreserveAspectRatio.h
index 18a89dd..2be053c 100644
--- a/WebCore/svg/SVGPreserveAspectRatio.h
+++ b/WebCore/svg/SVGPreserveAspectRatio.h
@@ -22,21 +22,17 @@
#define SVGPreserveAspectRatio_h
#if ENABLE(SVG)
+#include "FloatRect.h"
#include "PlatformString.h"
#include "SVGNames.h"
-#include <wtf/RefCounted.h>
-
namespace WebCore {
class String;
class TransformationMatrix;
- class SVGStyledElement;
- class SVGPreserveAspectRatio : public RefCounted<SVGPreserveAspectRatio> {
+ class SVGPreserveAspectRatio {
public:
- static PassRefPtr<SVGPreserveAspectRatio> create() { return adoptRef(new SVGPreserveAspectRatio); }
-
enum SVGPreserveAspectRatioType {
SVG_PRESERVEASPECTRATIO_UNKNOWN = 0,
SVG_PRESERVEASPECTRATIO_NONE = 1,
@@ -57,6 +53,7 @@ namespace WebCore {
SVG_MEETORSLICE_SLICE = 2
};
+ SVGPreserveAspectRatio();
virtual ~SVGPreserveAspectRatio();
void setAlign(unsigned short);
@@ -64,21 +61,30 @@ namespace WebCore {
void setMeetOrSlice(unsigned short);
unsigned short meetOrSlice() const;
+
+ void transformRect(FloatRect& destRect, FloatRect& srcRect);
TransformationMatrix getCTM(double logicX, double logicY,
double logicWidth, double logicHeight,
double physX, double physY,
- double physWidth, double physHeight);
+ double physWidth, double physHeight) const;
- // Helper
- bool parsePreserveAspectRatio(const UChar*& currParam, const UChar* end, bool validate = true);
- String valueAsString() const;
+ template<class Consumer>
+ static bool parsePreserveAspectRatio(Consumer* consumer, const String& value, bool validate = true)
+ {
+ bool result = false;
+ const UChar* begin = value.characters();
+ const UChar* end = begin + value.length();
+ consumer->setPreserveAspectRatioBaseValue(parsePreserveAspectRatio(begin, end, validate, result));
+ return result;
+ }
- const QualifiedName& associatedAttributeName() const { return SVGNames::preserveAspectRatioAttr; }
+ // It's recommended to use the method above, only SVGViewSpec needs this parsing method
+ static SVGPreserveAspectRatio parsePreserveAspectRatio(const UChar*& currParam, const UChar* end, bool validate, bool& result);
+
+ String valueAsString() const;
private:
- SVGPreserveAspectRatio();
-
unsigned short m_align;
unsigned short m_meetOrSlice;
};
@@ -87,4 +93,3 @@ namespace WebCore {
#endif // ENABLE(SVG)
#endif // SVGPreserveAspectRatio_h
-
diff --git a/WebCore/svg/SVGPreserveAspectRatio.idl b/WebCore/svg/SVGPreserveAspectRatio.idl
index 066353e..b21daba 100644
--- a/WebCore/svg/SVGPreserveAspectRatio.idl
+++ b/WebCore/svg/SVGPreserveAspectRatio.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG, GenerateConstructor] SVGPreserveAspectRatio {
+ interface [Conditional=SVG, PODType=SVGPreserveAspectRatio] SVGPreserveAspectRatio {
// Alignment Types
const unsigned short SVG_PRESERVEASPECTRATIO_UNKNOWN = 0;
const unsigned short SVG_PRESERVEASPECTRATIO_NONE = 1;
diff --git a/WebCore/svg/SVGRadialGradientElement.cpp b/WebCore/svg/SVGRadialGradientElement.cpp
index 270de6f..b153c0f 100644
--- a/WebCore/svg/SVGRadialGradientElement.cpp
+++ b/WebCore/svg/SVGRadialGradientElement.cpp
@@ -42,11 +42,11 @@ namespace WebCore {
SVGRadialGradientElement::SVGRadialGradientElement(const QualifiedName& tagName, Document* doc)
: SVGGradientElement(tagName, doc)
- , m_cx(this, SVGNames::cxAttr, LengthModeWidth, "50%")
- , m_cy(this, SVGNames::cyAttr, LengthModeHeight, "50%")
- , m_r(this, SVGNames::rAttr, LengthModeOther, "50%")
- , m_fx(this, SVGNames::fxAttr, LengthModeWidth)
- , m_fy(this, SVGNames::fyAttr, LengthModeHeight)
+ , m_cx(LengthModeWidth, "50%")
+ , m_cy(LengthModeHeight, "50%")
+ , m_r(LengthModeOther, "50%")
+ , m_fx(LengthModeWidth)
+ , m_fy(LengthModeHeight)
{
// Spec: If the cx/cy/r attribute is not specified, the effect is as if a value of "50%" were specified.
}
@@ -86,6 +86,31 @@ void SVGRadialGradientElement::svgAttributeChanged(const QualifiedName& attrName
m_resource->invalidate();
}
+void SVGRadialGradientElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGGradientElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeCx();
+ synchronizeCy();
+ synchronizeFx();
+ synchronizeFy();
+ synchronizeR();
+ return;
+ }
+
+ if (attrName == SVGNames::cxAttr)
+ synchronizeCx();
+ else if (attrName == SVGNames::cyAttr)
+ synchronizeCy();
+ else if (attrName == SVGNames::fxAttr)
+ synchronizeFx();
+ else if (attrName == SVGNames::fyAttr)
+ synchronizeFy();
+ else if (attrName == SVGNames::rAttr)
+ synchronizeR();
+}
+
void SVGRadialGradientElement::buildGradient() const
{
RadialGradientAttributes attributes = collectGradientProperties();
@@ -108,29 +133,17 @@ void SVGRadialGradientElement::buildGradient() const
FloatPoint adjustedFocalPoint = focalPoint;
float dfx = focalPoint.x() - centerPoint.x();
float dfy = focalPoint.y() - centerPoint.y();
+ float rMax = 0.99f * radius;
// Spec: If (fx, fy) lies outside the circle defined by (cx, cy) and
// r, set (fx, fy) to the point of intersection of the line through
// (fx, fy) and the circle.
- if (sqrt(dfx * dfx + dfy * dfy) >= radius) {
- float angle = atan2f(dfx, dfy);
-
- // The maximum deviation of 0.2% is needed on Cairo, since Cairo
- // is working with fixed point numbers.
-#if PLATFORM(CAIRO)
- if (focalPoint.x() < centerPoint.x())
- dfx = cosf(angle) * radius + 0.002f;
- else
- dfx = cosf(angle) * radius - 0.002f;
- if (focalPoint.y() < centerPoint.y())
- dfy = sinf(angle) * radius + 0.002f;
- else
- dfy = sinf(angle) * radius - 0.002f;
-#else
- dfx = cosf(angle) * radius;
- dfy = sinf(angle) * radius;
-#endif
+ // We scale the radius by 0.99 to match the behavior of FireFox.
+ if (sqrt(dfx * dfx + dfy * dfy) > rMax) {
+ float angle = atan2f(dfy, dfx);
+ dfx = cosf(angle) * rMax;
+ dfy = sinf(angle) * rMax;
adjustedFocalPoint = FloatPoint(dfx + centerPoint.x(), dfy + centerPoint.y());
}
diff --git a/WebCore/svg/SVGRadialGradientElement.h b/WebCore/svg/SVGRadialGradientElement.h
index 61f56f5..180948f 100644
--- a/WebCore/svg/SVGRadialGradientElement.h
+++ b/WebCore/svg/SVGRadialGradientElement.h
@@ -36,6 +36,7 @@ namespace WebCore {
virtual void parseMappedAttribute(MappedAttribute*);
virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
protected:
virtual void buildGradient() const;
@@ -44,11 +45,11 @@ namespace WebCore {
RadialGradientAttributes collectGradientProperties() const;
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGRadialGradientElement, SVGNames::radialGradientTagString, SVGNames::cxAttrString, SVGLength, Cx, cx)
- ANIMATED_PROPERTY_DECLARATIONS(SVGRadialGradientElement, SVGNames::radialGradientTagString, SVGNames::cyAttrString, SVGLength, Cy, cy)
- ANIMATED_PROPERTY_DECLARATIONS(SVGRadialGradientElement, SVGNames::radialGradientTagString, SVGNames::rAttrString, SVGLength, R, r)
- ANIMATED_PROPERTY_DECLARATIONS(SVGRadialGradientElement, SVGNames::radialGradientTagString, SVGNames::fxAttrString, SVGLength, Fx, fx)
- ANIMATED_PROPERTY_DECLARATIONS(SVGRadialGradientElement, SVGNames::radialGradientTagString, SVGNames::fyAttrString, SVGLength, Fy, fy)
+ DECLARE_ANIMATED_PROPERTY(SVGRadialGradientElement, SVGNames::cxAttr, SVGLength, Cx, cx)
+ DECLARE_ANIMATED_PROPERTY(SVGRadialGradientElement, SVGNames::cyAttr, SVGLength, Cy, cy)
+ DECLARE_ANIMATED_PROPERTY(SVGRadialGradientElement, SVGNames::rAttr, SVGLength, R, r)
+ DECLARE_ANIMATED_PROPERTY(SVGRadialGradientElement, SVGNames::fxAttr, SVGLength, Fx, fx)
+ DECLARE_ANIMATED_PROPERTY(SVGRadialGradientElement, SVGNames::fyAttr, SVGLength, Fy, fy)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGRectElement.cpp b/WebCore/svg/SVGRectElement.cpp
index f9b04c8..014c42f 100644
--- a/WebCore/svg/SVGRectElement.cpp
+++ b/WebCore/svg/SVGRectElement.cpp
@@ -35,13 +35,12 @@ SVGRectElement::SVGRectElement(const QualifiedName& tagName, Document *doc)
, SVGTests()
, SVGLangSpace()
, SVGExternalResourcesRequired()
- , m_x(this, SVGNames::xAttr, LengthModeWidth)
- , m_y(this, SVGNames::yAttr, LengthModeHeight)
- , m_width(this, SVGNames::widthAttr, LengthModeWidth)
- , m_height(this, SVGNames::heightAttr, LengthModeHeight)
- , m_rx(this, SVGNames::rxAttr, LengthModeWidth)
- , m_ry(this, SVGNames::ryAttr, LengthModeHeight)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
+ , m_x(LengthModeWidth)
+ , m_y(LengthModeHeight)
+ , m_width(LengthModeWidth)
+ , m_height(LengthModeHeight)
+ , m_rx(LengthModeWidth)
+ , m_ry(LengthModeHeight)
{
}
@@ -99,6 +98,37 @@ void SVGRectElement::svgAttributeChanged(const QualifiedName& attrName)
renderer()->setNeedsLayout(true);
}
+void SVGRectElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledTransformableElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeX();
+ synchronizeY();
+ synchronizeWidth();
+ synchronizeHeight();
+ synchronizeRx();
+ synchronizeRy();
+ synchronizeExternalResourcesRequired();
+ return;
+ }
+
+ if (attrName == SVGNames::xAttr)
+ synchronizeX();
+ else if (attrName == SVGNames::yAttr)
+ synchronizeY();
+ else if (attrName == SVGNames::widthAttr)
+ synchronizeWidth();
+ else if (attrName == SVGNames::heightAttr)
+ synchronizeHeight();
+ else if (attrName == SVGNames::rxAttr)
+ synchronizeRx();
+ else if (attrName == SVGNames::ryAttr)
+ synchronizeRy();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+}
+
Path SVGRectElement::toPathData() const
{
FloatRect rect(x().value(this), y().value(this), width().value(this), height().value(this));
diff --git a/WebCore/svg/SVGRectElement.h b/WebCore/svg/SVGRectElement.h
index a4d859e..df382f9 100644
--- a/WebCore/svg/SVGRectElement.h
+++ b/WebCore/svg/SVGRectElement.h
@@ -41,6 +41,7 @@ namespace WebCore {
virtual void parseMappedAttribute(MappedAttribute*);
virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual Path toPathData() const;
@@ -48,17 +49,15 @@ namespace WebCore {
virtual bool hasRelativeValues() const;
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGRectElement, SVGNames::rectTagString, SVGNames::xAttrString, SVGLength, X, x)
- ANIMATED_PROPERTY_DECLARATIONS(SVGRectElement, SVGNames::rectTagString, SVGNames::yAttrString, SVGLength, Y, y)
- ANIMATED_PROPERTY_DECLARATIONS(SVGRectElement, SVGNames::rectTagString, SVGNames::widthAttrString, SVGLength, Width, width)
- ANIMATED_PROPERTY_DECLARATIONS(SVGRectElement, SVGNames::rectTagString, SVGNames::heightAttrString, SVGLength, Height, height)
- ANIMATED_PROPERTY_DECLARATIONS(SVGRectElement, SVGNames::rectTagString, SVGNames::rxAttrString, SVGLength, Rx, rx)
- ANIMATED_PROPERTY_DECLARATIONS(SVGRectElement, SVGNames::rectTagString, SVGNames::ryAttrString, SVGLength, Ry, ry)
+ DECLARE_ANIMATED_PROPERTY(SVGRectElement, SVGNames::xAttr, SVGLength, X, x)
+ DECLARE_ANIMATED_PROPERTY(SVGRectElement, SVGNames::yAttr, SVGLength, Y, y)
+ DECLARE_ANIMATED_PROPERTY(SVGRectElement, SVGNames::widthAttr, SVGLength, Width, width)
+ DECLARE_ANIMATED_PROPERTY(SVGRectElement, SVGNames::heightAttr, SVGLength, Height, height)
+ DECLARE_ANIMATED_PROPERTY(SVGRectElement, SVGNames::rxAttr, SVGLength, Rx, rx)
+ DECLARE_ANIMATED_PROPERTY(SVGRectElement, SVGNames::ryAttr, SVGLength, Ry, ry)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGRectElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGRectElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGRenderingIntent.idl b/WebCore/svg/SVGRenderingIntent.idl
index fc21549..ff2f6ce 100644
--- a/WebCore/svg/SVGRenderingIntent.idl
+++ b/WebCore/svg/SVGRenderingIntent.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG, GenerateConstructor] SVGRenderingIntent {
+ interface [Conditional=SVG] SVGRenderingIntent {
// Rendering Intent Types
const unsigned short RENDERING_INTENT_UNKNOWN = 0;
const unsigned short RENDERING_INTENT_AUTO = 1;
diff --git a/WebCore/svg/SVGSVGElement.cpp b/WebCore/svg/SVGSVGElement.cpp
index 2d5008b..eed8b54 100644
--- a/WebCore/svg/SVGSVGElement.cpp
+++ b/WebCore/svg/SVGSVGElement.cpp
@@ -63,15 +63,13 @@ SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document* doc)
, SVGExternalResourcesRequired()
, SVGFitToViewBox()
, SVGZoomAndPan()
- , m_x(this, SVGNames::xAttr, LengthModeWidth)
- , m_y(this, SVGNames::yAttr, LengthModeHeight)
- , m_width(this, SVGNames::widthAttr, LengthModeWidth, "100%")
- , m_height(this, SVGNames::heightAttr, LengthModeHeight, "100%")
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
- , m_viewBox(this, SVGNames::viewBoxAttr)
- , m_preserveAspectRatio(this, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())
+ , m_x(LengthModeWidth)
+ , m_y(LengthModeHeight)
+ , m_width(LengthModeWidth, "100%")
+ , m_height(LengthModeHeight, "100%")
, m_useCurrentView(false)
, m_timeContainer(SMILTimeContainer::create(this))
+ , m_scale(1)
, m_viewSpec(0)
, m_containerSize(300, 150)
, m_hasSetContainerSize(false)
@@ -85,12 +83,6 @@ SVGSVGElement::~SVGSVGElement()
// There are cases where removedFromDocument() is not called.
// see ContainerNode::removeAllChildren, called by its destructor.
document()->accessSVGExtensions()->removeTimeContainer(this);
-
- // Call detach() here because if we wait until ~Node() calls it, we crash during
- // RenderSVGViewportContainer destruction, as the renderer assumes that the element
- // is still fully constructed. See <https://bugs.webkit.org/show_bug.cgi?id=21293>.
- if (renderer())
- detach();
}
const AtomicString& SVGSVGElement::contentScriptType() const
@@ -195,15 +187,22 @@ SVGViewSpec* SVGSVGElement::currentView() const
float SVGSVGElement::currentScale() const
{
- if (document() && document()->frame())
- return document()->frame()->zoomFactor();
- return 1.0f;
+ if (document() && parentNode() == document())
+ return document()->frame() ? document()->frame()->zoomFactor() : 1;
+ return m_scale;
}
void SVGSVGElement::setCurrentScale(float scale)
{
- if (document() && document()->frame())
- document()->frame()->setZoomFactor(scale, true);
+ if (document() && parentNode() == document()) {
+ if (document()->frame())
+ document()->frame()->setZoomFactor(scale, true);
+ return;
+ }
+
+ m_scale = scale;
+ if (renderer())
+ renderer()->setNeedsLayout(true);
}
FloatPoint SVGSVGElement::currentTranslate() const
@@ -310,6 +309,37 @@ void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName)
renderer()->setNeedsLayout(true);
}
+void SVGSVGElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeX();
+ synchronizeY();
+ synchronizeWidth();
+ synchronizeHeight();
+ synchronizeExternalResourcesRequired();
+ synchronizeViewBox();
+ synchronizePreserveAspectRatio();
+ return;
+ }
+
+ if (attrName == SVGNames::xAttr)
+ synchronizeX();
+ else if (attrName == SVGNames::yAttr)
+ synchronizeY();
+ else if (attrName == SVGNames::widthAttr)
+ synchronizeWidth();
+ else if (attrName == SVGNames::heightAttr)
+ synchronizeHeight();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+ else if (SVGFitToViewBox::isKnownAttribute(attrName)) {
+ synchronizeViewBox();
+ synchronizePreserveAspectRatio();
+ }
+}
+
unsigned SVGSVGElement::suspendRedraw(unsigned /* maxWaitMilliseconds */)
{
// FIXME: Implement me (see bug 11275)
@@ -374,9 +404,9 @@ SVGLength SVGSVGElement::createSVGLength()
return SVGLength();
}
-PassRefPtr<SVGAngle> SVGSVGElement::createSVGAngle()
+SVGAngle SVGSVGElement::createSVGAngle()
{
- return SVGAngle::create();
+ return SVGAngle();
}
FloatPoint SVGSVGElement::createSVGPoint()
@@ -531,13 +561,14 @@ void SVGSVGElement::inheritViewAttributes(SVGViewElement* viewElement)
currentView()->setViewBox(viewElement->viewBox());
else
currentView()->setViewBox(viewBox());
- if (viewElement->hasAttribute(SVGNames::preserveAspectRatioAttr)) {
- currentView()->preserveAspectRatio()->setAlign(viewElement->preserveAspectRatio()->align());
- currentView()->preserveAspectRatio()->setMeetOrSlice(viewElement->preserveAspectRatio()->meetOrSlice());
- } else {
- currentView()->preserveAspectRatio()->setAlign(preserveAspectRatio()->align());
- currentView()->preserveAspectRatio()->setMeetOrSlice(preserveAspectRatio()->meetOrSlice());
- }
+
+ SVGPreserveAspectRatio aspectRatio;
+ if (viewElement->hasAttribute(SVGNames::preserveAspectRatioAttr))
+ aspectRatio = viewElement->preserveAspectRatioBaseValue();
+ else
+ aspectRatio = preserveAspectRatioBaseValue();
+ currentView()->setPreserveAspectRatioBaseValue(aspectRatio);
+
if (viewElement->hasAttribute(SVGNames::zoomAndPanAttr))
currentView()->setZoomAndPan(viewElement->zoomAndPan());
renderer()->setNeedsLayout(true);
diff --git a/WebCore/svg/SVGSVGElement.h b/WebCore/svg/SVGSVGElement.h
index f30e8f6..3d6f109 100644
--- a/WebCore/svg/SVGSVGElement.h
+++ b/WebCore/svg/SVGSVGElement.h
@@ -105,7 +105,7 @@ namespace WebCore {
static float createSVGNumber();
static SVGLength createSVGLength();
- static PassRefPtr<SVGAngle> createSVGAngle();
+ static SVGAngle createSVGAngle();
static FloatPoint createSVGPoint();
static TransformationMatrix createSVGMatrix();
static FloatRect createSVGRect();
@@ -125,33 +125,27 @@ namespace WebCore {
virtual void removedFromDocument();
virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
TransformationMatrix viewBoxToViewTransform(float viewWidth, float viewHeight) const;
void inheritViewAttributes(SVGViewElement*);
- protected:
- friend class RenderSVGRoot;
- friend class RenderSVGViewportContainer;
-
- virtual bool hasRelativeValues() const;
-
bool isOutermostSVG() const;
+ virtual bool hasRelativeValues() const;
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGSVGElement, SVGNames::svgTagString, SVGNames::xAttrString, SVGLength, X, x)
- ANIMATED_PROPERTY_DECLARATIONS(SVGSVGElement, SVGNames::svgTagString, SVGNames::yAttrString, SVGLength, Y, y)
- ANIMATED_PROPERTY_DECLARATIONS(SVGSVGElement, SVGNames::svgTagString, SVGNames::widthAttrString, SVGLength, Width, width)
- ANIMATED_PROPERTY_DECLARATIONS(SVGSVGElement, SVGNames::svgTagString, SVGNames::heightAttrString, SVGLength, Height, height)
+ DECLARE_ANIMATED_PROPERTY(SVGSVGElement, SVGNames::xAttr, SVGLength, X, x)
+ DECLARE_ANIMATED_PROPERTY(SVGSVGElement, SVGNames::yAttr, SVGLength, Y, y)
+ DECLARE_ANIMATED_PROPERTY(SVGSVGElement, SVGNames::widthAttr, SVGLength, Width, width)
+ DECLARE_ANIMATED_PROPERTY(SVGSVGElement, SVGNames::heightAttr, SVGLength, Height, height)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGSVGElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGSVGElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
// SVGFitToViewBox
- ANIMATED_PROPERTY_DECLARATIONS(SVGSVGElement, SVGFitToViewBoxIdentifier, SVGNames::viewBoxAttrString, FloatRect, ViewBox, viewBox)
- ANIMATED_PROPERTY_DECLARATIONS(SVGSVGElement, SVGFitToViewBoxIdentifier, SVGNames::preserveAspectRatioAttrString, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
+ DECLARE_ANIMATED_PROPERTY(SVGSVGElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
+ DECLARE_ANIMATED_PROPERTY(SVGSVGElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
virtual void documentWillBecomeInactive();
virtual void documentDidBecomeActive();
@@ -159,6 +153,7 @@ namespace WebCore {
bool m_useCurrentView;
RefPtr<SMILTimeContainer> m_timeContainer;
FloatPoint m_translation;
+ float m_scale;
mutable OwnPtr<SVGViewSpec> m_viewSpec;
IntSize m_containerSize;
bool m_hasSetContainerSize;
diff --git a/WebCore/svg/SVGScriptElement.cpp b/WebCore/svg/SVGScriptElement.cpp
index 7be72dc..299ab8d 100644
--- a/WebCore/svg/SVGScriptElement.cpp
+++ b/WebCore/svg/SVGScriptElement.cpp
@@ -35,8 +35,6 @@ SVGScriptElement::SVGScriptElement(const QualifiedName& tagName, Document* doc,
: SVGElement(tagName, doc)
, SVGURIReference()
, SVGExternalResourcesRequired()
- , m_href(this, XLinkNames::hrefAttr)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
, m_data(this, this)
{
m_data.setCreatedByParser(createdByParser);
@@ -86,6 +84,22 @@ void SVGScriptElement::svgAttributeChanged(const QualifiedName& attrName)
}
}
+void SVGScriptElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeExternalResourcesRequired();
+ synchronizeHref();
+ return;
+ }
+
+ if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+ else if (SVGURIReference::isKnownAttribute(attrName))
+ synchronizeHref();
+}
+
void SVGScriptElement::insertedIntoDocument()
{
SVGElement::insertedIntoDocument();
diff --git a/WebCore/svg/SVGScriptElement.h b/WebCore/svg/SVGScriptElement.h
index 699c535..396907c 100644
--- a/WebCore/svg/SVGScriptElement.h
+++ b/WebCore/svg/SVGScriptElement.h
@@ -45,6 +45,7 @@ namespace WebCore {
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool isURLAttribute(Attribute*) const;
virtual void finishParsingChildren();
@@ -71,12 +72,10 @@ namespace WebCore {
private:
// SVGURIReference
- ANIMATED_PROPERTY_DECLARATIONS(SVGScriptElement, SVGURIReferenceIdentifier, XLinkNames::hrefAttrString, String, Href, href)
+ DECLARE_ANIMATED_PROPERTY(SVGScriptElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGScriptElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGScriptElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
private:
ScriptElementData m_data;
diff --git a/WebCore/svg/SVGStopElement.cpp b/WebCore/svg/SVGStopElement.cpp
index 0549031..3c97827 100644
--- a/WebCore/svg/SVGStopElement.cpp
+++ b/WebCore/svg/SVGStopElement.cpp
@@ -33,7 +33,7 @@ namespace WebCore {
SVGStopElement::SVGStopElement(const QualifiedName& tagName, Document* doc)
: SVGStyledElement(tagName, doc)
- , m_offset(this, SVGNames::offsetAttr, 0.0f)
+ , m_offset(0.0f)
{
}
@@ -55,6 +55,14 @@ void SVGStopElement::parseMappedAttribute(MappedAttribute* attr)
SVGStyledElement::parseMappedAttribute(attr);
}
+void SVGStopElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName() || attrName == SVGNames::offsetAttr)
+ synchronizeOffset();
+}
+
RenderObject* SVGStopElement::createRenderer(RenderArena* arena, RenderStyle*)
{
return new (arena) RenderSVGGradientStop(this);
diff --git a/WebCore/svg/SVGStopElement.h b/WebCore/svg/SVGStopElement.h
index 5d14a40..23c09bb 100644
--- a/WebCore/svg/SVGStopElement.h
+++ b/WebCore/svg/SVGStopElement.h
@@ -32,6 +32,8 @@ namespace WebCore {
SVGStopElement(const QualifiedName&, Document*);
virtual ~SVGStopElement();
+ virtual void synchronizeProperty(const QualifiedName&);
+
private:
virtual bool isGradientStop() const { return true; }
@@ -39,7 +41,7 @@ namespace WebCore {
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- ANIMATED_PROPERTY_DECLARATIONS(SVGStopElement, SVGNames::stopTagString, SVGNames::offsetAttrString, float, Offset, offset)
+ DECLARE_ANIMATED_PROPERTY(SVGStopElement, SVGNames::offsetAttr, float, Offset, offset)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGStylable.idl b/WebCore/svg/SVGStylable.idl
index 731d818..2da2b77 100644
--- a/WebCore/svg/SVGStylable.idl
+++ b/WebCore/svg/SVGStylable.idl
@@ -27,7 +27,7 @@
module svg {
- interface [Conditional=SVG, ObjCProtocol] SVGStylable {
+ interface [Conditional=SVG, ObjCProtocol, OmitConstructor] SVGStylable {
readonly attribute SVGAnimatedString className;
readonly attribute css::CSSStyleDeclaration style;
diff --git a/WebCore/svg/SVGStyleElement.cpp b/WebCore/svg/SVGStyleElement.cpp
index 0a2195a..2a21670 100644
--- a/WebCore/svg/SVGStyleElement.cpp
+++ b/WebCore/svg/SVGStyleElement.cpp
@@ -46,40 +46,40 @@ SVGStyleElement::SVGStyleElement(const QualifiedName& tagName, Document* doc, bo
const AtomicString& SVGStyleElement::type() const
{
DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/css"));
- const AtomicString& n = getAttribute(typeAttr);
+ const AtomicString& n = getAttribute(SVGNames::typeAttr);
return n.isNull() ? defaultValue : n;
}
void SVGStyleElement::setType(const AtomicString& type, ExceptionCode& ec)
{
- setAttribute(typeAttr, type, ec);
+ setAttribute(SVGNames::typeAttr, type, ec);
}
const AtomicString& SVGStyleElement::media() const
{
DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("all"));
- const AtomicString& n = getAttribute(mediaAttr);
+ const AtomicString& n = getAttribute(SVGNames::mediaAttr);
return n.isNull() ? defaultValue : n;
}
void SVGStyleElement::setMedia(const AtomicString& media, ExceptionCode& ec)
{
- setAttribute(mediaAttr, media, ec);
+ setAttribute(SVGNames::mediaAttr, media, ec);
}
String SVGStyleElement::title() const
{
- return getAttribute(titleAttr);
+ return getAttribute(SVGNames::titleAttr);
}
void SVGStyleElement::setTitle(const AtomicString& title, ExceptionCode& ec)
{
- setAttribute(titleAttr, title, ec);
+ setAttribute(SVGNames::titleAttr, title, ec);
}
void SVGStyleElement::parseMappedAttribute(MappedAttribute* attr)
{
- if (attr->name() == titleAttr && m_sheet)
+ if (attr->name() == SVGNames::titleAttr && m_sheet)
m_sheet->setTitle(attr->value());
else {
if (SVGLangSpace::parseMappedAttribute(attr))
diff --git a/WebCore/svg/SVGStyledElement.cpp b/WebCore/svg/SVGStyledElement.cpp
index 6960519..4228a4c 100644
--- a/WebCore/svg/SVGStyledElement.cpp
+++ b/WebCore/svg/SVGStyledElement.cpp
@@ -34,9 +34,12 @@
#include "RenderObject.h"
#include "SVGElement.h"
#include "SVGElementInstance.h"
+#include "SVGElementRareData.h"
#include "SVGNames.h"
#include "SVGRenderStyle.h"
-#include "SVGResource.h"
+#include "SVGResourceClipper.h"
+#include "SVGResourceFilter.h"
+#include "SVGResourceMasker.h"
#include "SVGSVGElement.h"
#include <wtf/Assertions.h>
@@ -44,12 +47,15 @@ namespace WebCore {
using namespace SVGNames;
-char SVGStyledElementIdentifier[] = "SVGStyledElement";
-static HashSet<const SVGStyledElement*>* gElementsWithInstanceUpdatesBlocked = 0;
+void mapAttributeToCSSProperty(HashMap<AtomicStringImpl*, int>* propertyNameToIdMap, const QualifiedName& attrName)
+{
+ int propertyId = cssPropertyID(attrName.localName());
+ ASSERT(propertyId > 0);
+ propertyNameToIdMap->set(attrName.localName().impl(), propertyId);
+}
SVGStyledElement::SVGStyledElement(const QualifiedName& tagName, Document* doc)
: SVGElement(tagName, doc)
- , m_className(this, HTMLNames::classAttr)
{
}
@@ -71,13 +77,6 @@ bool SVGStyledElement::rendererIsNeeded(RenderStyle* style)
return false;
}
-static void mapAttributeToCSSProperty(HashMap<AtomicStringImpl*, int>* propertyNameToIdMap, const QualifiedName& attrName)
-{
- int propertyId = cssPropertyID(attrName.localName());
- ASSERT(propertyId > 0);
- propertyNameToIdMap->set(attrName.localName().impl(), propertyId);
-}
-
int SVGStyledElement::cssPropertyIdForSVGAttributeName(const QualifiedName& attrName)
{
if (!attrName.namespaceURI().isNull())
@@ -92,13 +91,13 @@ int SVGStyledElement::cssPropertyIdForSVGAttributeName(const QualifiedName& attr
mapAttributeToCSSProperty(propertyNameToIdMap, clipAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, clip_pathAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, clip_ruleAttr);
- mapAttributeToCSSProperty(propertyNameToIdMap, colorAttr);
+ mapAttributeToCSSProperty(propertyNameToIdMap, SVGNames::colorAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, color_interpolationAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, color_interpolation_filtersAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, color_profileAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, color_renderingAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, cursorAttr);
- mapAttributeToCSSProperty(propertyNameToIdMap, directionAttr);
+ mapAttributeToCSSProperty(propertyNameToIdMap, SVGNames::directionAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, displayAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, dominant_baselineAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, enable_backgroundAttr);
@@ -176,7 +175,7 @@ void SVGStyledElement::parseMappedAttribute(MappedAttribute* attr)
// style updates (instead of StyledElement::parseMappedAttribute). We don't
// tell StyledElement about the change to avoid parsing the class list twice
if (attrName.matches(HTMLNames::classAttr))
- setClassName(attr->value());
+ setClassNameBaseValue(attr->value());
else
// id is handled by StyledElement which SVGElement inherits from
SVGElement::parseMappedAttribute(attr);
@@ -189,7 +188,7 @@ bool SVGStyledElement::isKnownAttribute(const QualifiedName& attrName)
if (propId > 0)
return true;
- return (attrName == HTMLNames::idAttr || attrName == HTMLNames::styleAttr);
+ return (attrName == idAttributeName() || attrName == HTMLNames::styleAttr);
}
void SVGStyledElement::svgAttributeChanged(const QualifiedName& attrName)
@@ -202,10 +201,48 @@ void SVGStyledElement::svgAttributeChanged(const QualifiedName& attrName)
// If we're the child of a resource element, be sure to invalidate it.
invalidateResourcesInAncestorChain();
+ // If the element is using resources, invalidate them.
+ invalidateResources();
+
// Invalidate all SVGElementInstances associated with us
SVGElementInstance::invalidateAllInstancesOfElement(this);
}
+void SVGStyledElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName() || attrName.matches(HTMLNames::classAttr))
+ synchronizeClassName();
+}
+
+void SVGStyledElement::invalidateResources()
+{
+ RenderObject* object = renderer();
+ if (!object)
+ return;
+
+ const SVGRenderStyle* svgStyle = object->style()->svgStyle();
+ Document* document = this->document();
+
+ if (document->parsing())
+ return;
+
+#if ENABLE(FILTERS)
+ SVGResourceFilter* filter = getFilterById(document, svgStyle->filter(), object);
+ if (filter)
+ filter->invalidate();
+#endif
+
+ SVGResourceMasker* masker = getMaskerById(document, svgStyle->maskElement(), object);
+ if (masker)
+ masker->invalidate();
+
+ SVGResourceClipper* clipper = getClipperById(document, svgStyle->clipPath(), object);
+ if (clipper)
+ clipper->invalidate();
+}
+
void SVGStyledElement::invalidateResourcesInAncestorChain() const
{
Node* node = parentNode();
@@ -215,7 +252,7 @@ void SVGStyledElement::invalidateResourcesInAncestorChain() const
SVGElement* element = static_cast<SVGElement*>(node);
if (SVGStyledElement* styledElement = static_cast<SVGStyledElement*>(element->isStyled() ? element : 0)) {
- if (SVGResource* resource = styledElement->canvasResource())
+ if (SVGResource* resource = styledElement->canvasResource(node->renderer()))
resource->invalidate();
}
@@ -226,8 +263,6 @@ void SVGStyledElement::invalidateResourcesInAncestorChain() const
void SVGStyledElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
{
SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
- if (document()->parsing())
- return;
// Invalidate all SVGElementInstances associated with us
SVGElementInstance::invalidateAllInstancesOfElement(this);
@@ -271,19 +306,17 @@ void SVGStyledElement::detach()
SVGElement::detach();
}
-void SVGStyledElement::setInstanceUpdatesBlocked(bool blockUpdates)
+bool SVGStyledElement::instanceUpdatesBlocked() const
{
- if (blockUpdates) {
- if (!gElementsWithInstanceUpdatesBlocked)
- gElementsWithInstanceUpdatesBlocked = new HashSet<const SVGStyledElement*>;
- gElementsWithInstanceUpdatesBlocked->add(this);
- } else {
- ASSERT(gElementsWithInstanceUpdatesBlocked);
- ASSERT(gElementsWithInstanceUpdatesBlocked->contains(this));
- gElementsWithInstanceUpdatesBlocked->remove(this);
- }
+ return hasRareSVGData() && rareSVGData()->instanceUpdatesBlocked();
}
-
+
+void SVGStyledElement::setInstanceUpdatesBlocked(bool value)
+{
+ if (hasRareSVGData())
+ rareSVGData()->setInstanceUpdatesBlocked(value);
+}
+
}
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGStyledElement.h b/WebCore/svg/SVGStyledElement.h
index 9cc21c5..9f76c68 100644
--- a/WebCore/svg/SVGStyledElement.h
+++ b/WebCore/svg/SVGStyledElement.h
@@ -28,15 +28,17 @@
namespace WebCore {
- extern char SVGStyledElementIdentifier[];
class SVGResource;
+ void mapAttributeToCSSProperty(HashMap<AtomicStringImpl*, int>* propertyNameToIdMap, const QualifiedName& attrName);
+
class SVGStyledElement : public SVGElement,
public SVGStylable {
public:
SVGStyledElement(const QualifiedName&, Document*);
virtual ~SVGStyledElement();
-
+
+ virtual bool hasRelativeValues() const { return false; }
virtual bool isStyled() const { return true; }
virtual bool supportsMarkers() const { return false; }
@@ -46,30 +48,31 @@ namespace WebCore {
bool isKnownAttribute(const QualifiedName&);
virtual bool rendererIsNeeded(RenderStyle*);
- virtual SVGResource* canvasResource() { return 0; }
-
+ virtual SVGResource* canvasResource(const RenderObject*) { return 0; }
+
virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
virtual void parseMappedAttribute(MappedAttribute*);
-
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);
// Centralized place to force a manual style resolution. Hacky but needed for now.
PassRefPtr<RenderStyle> resolveStyle(RenderStyle* parentStyle);
- void invalidateResourcesInAncestorChain() const;
+ void invalidateResourcesInAncestorChain() const;
+ void invalidateResources();
+
virtual void detach();
-
+
+ bool instanceUpdatesBlocked() const;
void setInstanceUpdatesBlocked(bool);
-
- protected:
- virtual bool hasRelativeValues() const { return true; }
-
+
+ protected:
static int cssPropertyIdForSVGAttributeName(const QualifiedName&);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGStyledElement, SVGStyledElementIdentifier, HTMLNames::classAttrString, String, ClassName, className)
+ DECLARE_ANIMATED_PROPERTY(SVGStyledElement, HTMLNames::classAttr, String, ClassName, className)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGStyledTransformableElement.cpp b/WebCore/svg/SVGStyledTransformableElement.cpp
index 4e97c83..6815914 100644
--- a/WebCore/svg/SVGStyledTransformableElement.cpp
+++ b/WebCore/svg/SVGStyledTransformableElement.cpp
@@ -33,12 +33,10 @@
namespace WebCore {
-char SVGStyledTransformableElementIdentifier[] = "SVGStyledTransformableElement";
-
SVGStyledTransformableElement::SVGStyledTransformableElement(const QualifiedName& tagName, Document* doc)
: SVGStyledLocatableElement(tagName, doc)
, SVGTransformable()
- , m_transform(this, SVGNames::transformAttr, SVGTransformList::create(SVGNames::transformAttr))
+ , m_transform(SVGTransformList::create(SVGNames::transformAttr))
{
}
@@ -70,20 +68,24 @@ TransformationMatrix* SVGStyledTransformableElement::supplementalTransform()
void SVGStyledTransformableElement::parseMappedAttribute(MappedAttribute* attr)
{
- if (attr->name() == SVGNames::transformAttr) {
+ if (SVGTransformable::isKnownAttribute(attr->name())) {
SVGTransformList* localTransforms = transformBaseValue();
-
- ExceptionCode ec = 0;
- localTransforms->clear(ec);
-
- if (!SVGTransformable::parseTransformAttribute(localTransforms, attr->value()))
+ if (!SVGTransformable::parseTransformAttribute(localTransforms, attr->value())) {
+ ExceptionCode ec = 0;
localTransforms->clear(ec);
- else
- setTransformBaseValue(localTransforms);
- } else
+ }
+ } else
SVGStyledLocatableElement::parseMappedAttribute(attr);
}
+void SVGStyledTransformableElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledLocatableElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName() || SVGTransformable::isKnownAttribute(attrName))
+ synchronizeTransform();
+}
+
bool SVGStyledTransformableElement::isKnownAttribute(const QualifiedName& attrName)
{
return SVGTransformable::isKnownAttribute(attrName) ||
diff --git a/WebCore/svg/SVGStyledTransformableElement.h b/WebCore/svg/SVGStyledTransformableElement.h
index 3145e6f..b6ab6dd 100644
--- a/WebCore/svg/SVGStyledTransformableElement.h
+++ b/WebCore/svg/SVGStyledTransformableElement.h
@@ -28,8 +28,6 @@
namespace WebCore {
- extern char SVGStyledTransformableElementIdentifier[];
-
class TransformationMatrix;
class SVGStyledTransformableElement : public SVGStyledLocatableElement,
@@ -51,6 +49,7 @@ namespace WebCore {
virtual FloatRect getBBox() const;
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
bool isKnownAttribute(const QualifiedName&);
// "base class" methods for all the elements which render as paths
@@ -59,8 +58,7 @@ namespace WebCore {
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
protected:
- ANIMATED_PROPERTY_DECLARATIONS(SVGStyledTransformableElement, SVGStyledTransformableElementIdentifier,
- SVGNames::transformAttrString, SVGTransformList, Transform, transform)
+ DECLARE_ANIMATED_PROPERTY(SVGStyledTransformableElement, SVGNames::transformAttr, SVGTransformList*, Transform, transform)
private:
// Used by <animateMotion>
diff --git a/WebCore/svg/SVGSwitchElement.cpp b/WebCore/svg/SVGSwitchElement.cpp
index 6d0f5d1..3268b9a 100644
--- a/WebCore/svg/SVGSwitchElement.cpp
+++ b/WebCore/svg/SVGSwitchElement.cpp
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+ Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
2004, 2005, 2006 Rob Buis <buis@kde.org>
This library is free software; you can redistribute it and/or
@@ -32,7 +32,6 @@ SVGSwitchElement::SVGSwitchElement(const QualifiedName& tagName, Document* doc)
, SVGTests()
, SVGLangSpace()
, SVGExternalResourcesRequired()
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
{
}
@@ -58,8 +57,14 @@ RenderObject* SVGSwitchElement::createRenderer(RenderArena* arena, RenderStyle*)
return new (arena) RenderSVGTransformableContainer(this);
}
+void SVGSwitchElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledTransformableElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName() || SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
}
-// vim:ts=4:noet
-#endif // ENABLE(SVG)
+}
+#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGSwitchElement.h b/WebCore/svg/SVGSwitchElement.h
index f5e9a0d..4d6491a 100644
--- a/WebCore/svg/SVGSwitchElement.h
+++ b/WebCore/svg/SVGSwitchElement.h
@@ -41,12 +41,11 @@ namespace WebCore {
virtual bool childShouldCreateRenderer(Node*) const;
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+ virtual void synchronizeProperty(const QualifiedName&);
private:
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGSwitchElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGSwitchElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGSymbolElement.cpp b/WebCore/svg/SVGSymbolElement.cpp
index 6f3a644..c7edae1 100644
--- a/WebCore/svg/SVGSymbolElement.cpp
+++ b/WebCore/svg/SVGSymbolElement.cpp
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+ Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
2004, 2005, 2006 Rob Buis <buis@kde.org>
This library is free software; you can redistribute it and/or
@@ -32,9 +32,6 @@ SVGSymbolElement::SVGSymbolElement(const QualifiedName& tagName, Document* doc)
, SVGLangSpace()
, SVGExternalResourcesRequired()
, SVGFitToViewBox()
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
- , m_viewBox(this, SVGNames::viewBoxAttr)
- , m_preserveAspectRatio(this, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())
{
}
@@ -54,8 +51,31 @@ void SVGSymbolElement::parseMappedAttribute(MappedAttribute* attr)
SVGStyledElement::parseMappedAttribute(attr);
}
+void SVGSymbolElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizePreserveAspectRatio();
+ synchronizeViewBox();
+ synchronizeExternalResourcesRequired();
+ synchronizeViewBox();
+ synchronizePreserveAspectRatio();
+ return;
+ }
+
+ if (attrName == SVGNames::preserveAspectRatioAttr)
+ synchronizePreserveAspectRatio();
+ else if (attrName == SVGNames::viewBoxAttr)
+ synchronizeViewBox();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+ else if (SVGFitToViewBox::isKnownAttribute(attrName)) {
+ synchronizeViewBox();
+ synchronizePreserveAspectRatio();
+ }
}
-// vim:ts=4:noet
-#endif // ENABLE(SVG)
+}
+#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGSymbolElement.h b/WebCore/svg/SVGSymbolElement.h
index 5c68202..907bf0f 100644
--- a/WebCore/svg/SVGSymbolElement.h
+++ b/WebCore/svg/SVGSymbolElement.h
@@ -38,19 +38,16 @@ namespace WebCore {
virtual ~SVGSymbolElement();
virtual void parseMappedAttribute(MappedAttribute*);
- virtual bool shouldAttachChild(Element*) const { return false; }
-
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
private:
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGSymbolElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGSymbolElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
// SVGFitToViewBox
- ANIMATED_PROPERTY_DECLARATIONS(SVGSymbolElement, SVGFitToViewBoxIdentifier, SVGNames::viewBoxAttrString, FloatRect, ViewBox, viewBox)
- ANIMATED_PROPERTY_DECLARATIONS(SVGSymbolElement, SVGFitToViewBoxIdentifier, SVGNames::preserveAspectRatioAttrString, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
+ DECLARE_ANIMATED_PROPERTY(SVGSymbolElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
+ DECLARE_ANIMATED_PROPERTY(SVGSymbolElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGTRefElement.cpp b/WebCore/svg/SVGTRefElement.cpp
index 1f32e90..06ae896 100644
--- a/WebCore/svg/SVGTRefElement.cpp
+++ b/WebCore/svg/SVGTRefElement.cpp
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+ Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
2004, 2005, 2006 Rob Buis <buis@kde.org>
This library is free software; you can redistribute it and/or
@@ -19,6 +19,7 @@
*/
#include "config.h"
+
#if ENABLE(SVG)
#include "SVGTRefElement.h"
@@ -33,7 +34,6 @@ namespace WebCore {
SVGTRefElement::SVGTRefElement(const QualifiedName& tagName, Document* doc)
: SVGTextPositioningElement(tagName, doc)
, SVGURIReference()
- , m_href(this, XLinkNames::hrefAttr)
{
}
@@ -61,6 +61,25 @@ void SVGTRefElement::parseMappedAttribute(MappedAttribute* attr)
SVGTextPositioningElement::parseMappedAttribute(attr);
}
+void SVGTRefElement::svgAttributeChanged(const QualifiedName& attrName)
+{
+ SVGTextPositioningElement::svgAttributeChanged(attrName);
+
+ if (!renderer())
+ return;
+
+ if (SVGURIReference::isKnownAttribute(attrName))
+ renderer()->setNeedsLayout(true);
+}
+
+void SVGTRefElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGTextPositioningElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName() || SVGURIReference::isKnownAttribute(attrName))
+ synchronizeHref();
+}
+
bool SVGTRefElement::childShouldCreateRenderer(Node* child) const
{
if (child->isTextNode() || child->hasTagName(SVGNames::tspanTag) ||
@@ -76,6 +95,4 @@ RenderObject* SVGTRefElement::createRenderer(RenderArena* arena, RenderStyle*)
}
-// vim:ts=4:noet
#endif // ENABLE(SVG)
-
diff --git a/WebCore/svg/SVGTRefElement.h b/WebCore/svg/SVGTRefElement.h
index 71d40a0..ff6eac0 100644
--- a/WebCore/svg/SVGTRefElement.h
+++ b/WebCore/svg/SVGTRefElement.h
@@ -34,6 +34,8 @@ namespace WebCore {
virtual ~SVGTRefElement();
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
bool childShouldCreateRenderer(Node*) const;
@@ -42,7 +44,7 @@ namespace WebCore {
void updateReferencedText();
// SVGURIReference
- ANIMATED_PROPERTY_DECLARATIONS(SVGTRefElement, SVGURIReferenceIdentifier, XLinkNames::hrefAttrString, String, Href, href)
+ DECLARE_ANIMATED_PROPERTY(SVGTRefElement, XLinkNames::hrefAttr, String, Href, href)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGTests.idl b/WebCore/svg/SVGTests.idl
index fe20a04..8a5f7c2 100644
--- a/WebCore/svg/SVGTests.idl
+++ b/WebCore/svg/SVGTests.idl
@@ -26,7 +26,7 @@
module svg {
- interface [Conditional=SVG, ObjCProtocol] SVGTests {
+ interface [Conditional=SVG, ObjCProtocol, OmitConstructor] SVGTests {
readonly attribute SVGStringList requiredFeatures;
readonly attribute SVGStringList requiredExtensions;
readonly attribute SVGStringList systemLanguage;
diff --git a/WebCore/svg/SVGTextContentElement.cpp b/WebCore/svg/SVGTextContentElement.cpp
index 9334304..167d241 100644
--- a/WebCore/svg/SVGTextContentElement.cpp
+++ b/WebCore/svg/SVGTextContentElement.cpp
@@ -43,16 +43,13 @@
namespace WebCore {
-char SVGTextContentElementIdentifier[] = "SVGTextContentElement";
-
SVGTextContentElement::SVGTextContentElement(const QualifiedName& tagName, Document* doc)
: SVGStyledElement(tagName, doc)
, SVGTests()
, SVGLangSpace()
, SVGExternalResourcesRequired()
- , m_textLength(this, SVGNames::textLengthAttr, LengthModeOther)
- , m_lengthAdjust(this, SVGNames::lengthAdjustAttr, LENGTHADJUST_SPACING)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
+ , m_textLength(LengthModeOther)
+ , m_lengthAdjust(LENGTHADJUST_SPACING)
{
}
@@ -517,6 +514,25 @@ void SVGTextContentElement::parseMappedAttribute(MappedAttribute* attr)
}
}
+void SVGTextContentElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeLengthAdjust();
+ synchronizeTextLength();
+ synchronizeExternalResourcesRequired();
+ return;
+ }
+
+ if (attrName == SVGNames::lengthAdjustAttr)
+ synchronizeLengthAdjust();
+ else if (attrName == SVGNames::textLengthAttr)
+ synchronizeTextLength();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+}
+
bool SVGTextContentElement::isKnownAttribute(const QualifiedName& attrName)
{
return (attrName.matches(SVGNames::lengthAdjustAttr) ||
diff --git a/WebCore/svg/SVGTextContentElement.h b/WebCore/svg/SVGTextContentElement.h
index 9b2c938..7dff3d5 100644
--- a/WebCore/svg/SVGTextContentElement.h
+++ b/WebCore/svg/SVGTextContentElement.h
@@ -29,8 +29,6 @@
namespace WebCore {
- extern char SVGTextContentElementIdentifier[];
-
class SVGLength;
class SVGTextContentElement : public SVGStyledElement,
@@ -61,17 +59,16 @@ namespace WebCore {
void selectSubString(unsigned charnum, unsigned nchars, ExceptionCode&) const;
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
bool isKnownAttribute(const QualifiedName&);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGTextContentElement, SVGTextContentElementIdentifier, SVGNames::textLengthAttrString, SVGLength, TextLength, textLength)
- ANIMATED_PROPERTY_DECLARATIONS(SVGTextContentElement, SVGTextContentElementIdentifier, SVGNames::lengthAdjustAttrString, int, LengthAdjust, lengthAdjust)
+ DECLARE_ANIMATED_PROPERTY(SVGTextContentElement, SVGNames::textLengthAttr, SVGLength, TextLength, textLength)
+ DECLARE_ANIMATED_PROPERTY(SVGTextContentElement, SVGNames::lengthAdjustAttr, int, LengthAdjust, lengthAdjust)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGTextContentElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGTextContentElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGTextContentElement.idl b/WebCore/svg/SVGTextContentElement.idl
index 394b398..9cf1748 100644
--- a/WebCore/svg/SVGTextContentElement.idl
+++ b/WebCore/svg/SVGTextContentElement.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG, GenerateConstructor] SVGTextContentElement : SVGElement,
+ interface [Conditional=SVG] SVGTextContentElement : SVGElement,
SVGTests,
SVGLangSpace,
SVGExternalResourcesRequired,
diff --git a/WebCore/svg/SVGTextElement.cpp b/WebCore/svg/SVGTextElement.cpp
index c1481cf..7de34fe 100644
--- a/WebCore/svg/SVGTextElement.cpp
+++ b/WebCore/svg/SVGTextElement.cpp
@@ -37,7 +37,7 @@ namespace WebCore {
SVGTextElement::SVGTextElement(const QualifiedName& tagName, Document* doc)
: SVGTextPositioningElement(tagName, doc)
, SVGTransformable()
- , m_transform(this, SVGNames::transformAttr, SVGTransformList::create(SVGNames::transformAttr))
+ , m_transform(SVGTransformList::create(SVGNames::transformAttr))
{
}
@@ -47,18 +47,11 @@ SVGTextElement::~SVGTextElement()
void SVGTextElement::parseMappedAttribute(MappedAttribute* attr)
{
- if (attr->name() == SVGNames::transformAttr) {
+ if (SVGTransformable::isKnownAttribute(attr->name())) {
SVGTransformList* localTransforms = transformBaseValue();
-
- ExceptionCode ec = 0;
- localTransforms->clear(ec);
-
- if (!SVGTransformable::parseTransformAttribute(localTransforms, attr->value()))
+ if (!SVGTransformable::parseTransformAttribute(localTransforms, attr->value())) {
+ ExceptionCode ec = 0;
localTransforms->clear(ec);
- else {
- setTransformBaseValue(localTransforms);
- if (renderer())
- renderer()->setNeedsLayout(true); // should be in setTransformBaseValue
}
} else
SVGTextPositioningElement::parseMappedAttribute(attr);
@@ -124,10 +117,28 @@ void SVGTextElement::svgAttributeChanged(const QualifiedName& attrName)
if (!renderer())
return;
- if (SVGTextPositioningElement::isKnownAttribute(attrName))
+ if (SVGTransformable::isKnownAttribute(attrName))
renderer()->setNeedsLayout(true);
}
+void SVGTextElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGTextPositioningElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName() || SVGTransformable::isKnownAttribute(attrName))
+ synchronizeTransform();
+}
+
+void SVGTextElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
+{
+ SVGTextPositioningElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+
+ if (!renderer())
+ return;
+
+ renderer()->setNeedsLayout(true);
+}
+
}
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGTextElement.h b/WebCore/svg/SVGTextElement.h
index 400aa47..217964a 100644
--- a/WebCore/svg/SVGTextElement.h
+++ b/WebCore/svg/SVGTextElement.h
@@ -48,9 +48,11 @@ namespace WebCore {
virtual bool childShouldCreateRenderer(Node*) const;
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:
- ANIMATED_PROPERTY_DECLARATIONS(SVGTextElement, SVGNames::textTagString, SVGNames::transformAttrString, SVGTransformList, Transform, transform)
+ DECLARE_ANIMATED_PROPERTY(SVGTextElement, SVGNames::transformAttr, SVGTransformList*, Transform, transform)
// Used by <animateMotion>
OwnPtr<TransformationMatrix> m_supplementalTransform;
diff --git a/WebCore/svg/SVGTextPathElement.cpp b/WebCore/svg/SVGTextPathElement.cpp
index 8a01ad9..eec6fc8 100644
--- a/WebCore/svg/SVGTextPathElement.cpp
+++ b/WebCore/svg/SVGTextPathElement.cpp
@@ -36,10 +36,9 @@ namespace WebCore {
SVGTextPathElement::SVGTextPathElement(const QualifiedName& tagName, Document* doc)
: SVGTextContentElement(tagName, doc)
, SVGURIReference()
- , m_startOffset(this, SVGNames::startOffsetAttr, LengthModeOther)
- , m_method(this, SVGNames::methodAttr, SVG_TEXTPATH_METHODTYPE_ALIGN)
- , m_spacing(this, SVGNames::spacingAttr, SVG_TEXTPATH_SPACINGTYPE_EXACT)
- , m_href(this, XLinkNames::hrefAttr)
+ , m_startOffset(LengthModeOther)
+ , m_method(SVG_TEXTPATH_METHODTYPE_ALIGN)
+ , m_spacing(SVG_TEXTPATH_SPACINGTYPE_EXACT)
{
}
@@ -70,6 +69,28 @@ void SVGTextPathElement::parseMappedAttribute(MappedAttribute* attr)
}
}
+void SVGTextPathElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGTextContentElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeStartOffset();
+ synchronizeMethod();
+ synchronizeSpacing();
+ synchronizeHref();
+ return;
+ }
+
+ if (attrName == SVGNames::startOffsetAttr)
+ synchronizeStartOffset();
+ else if (attrName == SVGNames::methodAttr)
+ synchronizeMethod();
+ else if (attrName == SVGNames::spacingAttr)
+ synchronizeSpacing();
+ else if (SVGURIReference::isKnownAttribute(attrName))
+ synchronizeHref();
+}
+
RenderObject* SVGTextPathElement::createRenderer(RenderArena* arena, RenderStyle*)
{
return new (arena) RenderSVGTextPath(this);
@@ -102,5 +123,3 @@ void SVGTextPathElement::insertedIntoDocument()
}
#endif // ENABLE(SVG)
-
-// vim:ts=4:noet
diff --git a/WebCore/svg/SVGTextPathElement.h b/WebCore/svg/SVGTextPathElement.h
index 1bfcc8b..ff09ed2 100644
--- a/WebCore/svg/SVGTextPathElement.h
+++ b/WebCore/svg/SVGTextPathElement.h
@@ -57,18 +57,19 @@ namespace WebCore {
virtual void insertedIntoDocument();
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
bool childShouldCreateRenderer(Node*) const;
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGTextPathElement, SVGNames::textPathTagString, SVGNames::startOffsetAttrString, SVGLength, StartOffset, startOffset)
- ANIMATED_PROPERTY_DECLARATIONS(SVGTextPathElement, SVGNames::textPathTagString, SVGNames::methodAttrString, int, Method, method)
- ANIMATED_PROPERTY_DECLARATIONS(SVGTextPathElement, SVGNames::textPathTagString, SVGNames::spacingAttrString, int, Spacing, spacing)
+ DECLARE_ANIMATED_PROPERTY(SVGTextPathElement, SVGNames::startOffsetAttr, SVGLength, StartOffset, startOffset)
+ DECLARE_ANIMATED_PROPERTY(SVGTextPathElement, SVGNames::methodAttr, int, Method, method)
+ DECLARE_ANIMATED_PROPERTY(SVGTextPathElement, SVGNames::spacingAttr, int, Spacing, spacing)
// SVGURIReference
- ANIMATED_PROPERTY_DECLARATIONS(SVGTextPathElement, SVGURIReferenceIdentifier, XLinkNames::hrefAttrString, String, Href, href)
+ DECLARE_ANIMATED_PROPERTY(SVGTextPathElement, XLinkNames::hrefAttr, String, Href, href)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGTextPathElement.idl b/WebCore/svg/SVGTextPathElement.idl
index 0183def..511f792 100644
--- a/WebCore/svg/SVGTextPathElement.idl
+++ b/WebCore/svg/SVGTextPathElement.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG, GenerateConstructor] SVGTextPathElement : SVGTextContentElement,
+ interface [Conditional=SVG] SVGTextPathElement : SVGTextContentElement,
SVGURIReference {
// textPath Method Types
const unsigned short TEXTPATH_METHODTYPE_UNKNOWN = 0;
diff --git a/WebCore/svg/SVGTextPositioningElement.cpp b/WebCore/svg/SVGTextPositioningElement.cpp
index fd7c8aa..dd99b49 100644
--- a/WebCore/svg/SVGTextPositioningElement.cpp
+++ b/WebCore/svg/SVGTextPositioningElement.cpp
@@ -24,21 +24,20 @@
#include "SVGTextPositioningElement.h"
#include "MappedAttribute.h"
+#include "RenderObject.h"
#include "SVGLengthList.h"
#include "SVGNames.h"
#include "SVGNumberList.h"
namespace WebCore {
-char SVGTextPositioningElementIdentifier[] = "SVGTextPositioningElement";
-
SVGTextPositioningElement::SVGTextPositioningElement(const QualifiedName& tagName, Document* doc)
: SVGTextContentElement(tagName, doc)
- , m_x(this, SVGNames::xAttr, SVGLengthList::create(SVGNames::xAttr))
- , m_y(this, SVGNames::yAttr, SVGLengthList::create(SVGNames::yAttr))
- , m_dx(this, SVGNames::dxAttr, SVGLengthList::create(SVGNames::dxAttr))
- , m_dy(this, SVGNames::dyAttr, SVGLengthList::create(SVGNames::dyAttr))
- , m_rotate(this, SVGNames::rotateAttr, SVGNumberList::create(SVGNames::rotateAttr))
+ , m_x(SVGLengthList::create(SVGNames::xAttr))
+ , m_y(SVGLengthList::create(SVGNames::yAttr))
+ , m_dx(SVGLengthList::create(SVGNames::dxAttr))
+ , m_dy(SVGLengthList::create(SVGNames::dyAttr))
+ , m_rotate(SVGNumberList::create(SVGNames::rotateAttr))
{
}
@@ -62,6 +61,42 @@ void SVGTextPositioningElement::parseMappedAttribute(MappedAttribute* attr)
SVGTextContentElement::parseMappedAttribute(attr);
}
+void SVGTextPositioningElement::svgAttributeChanged(const QualifiedName& attrName)
+{
+ SVGTextContentElement::svgAttributeChanged(attrName);
+
+ if (!renderer())
+ return;
+
+ if (isKnownAttribute(attrName))
+ renderer()->setNeedsLayout(true);
+}
+
+void SVGTextPositioningElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGTextContentElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeX();
+ synchronizeY();
+ synchronizeDx();
+ synchronizeDy();
+ synchronizeRotate();
+ return;
+ }
+
+ if (attrName == SVGNames::xAttr)
+ synchronizeX();
+ else if (attrName == SVGNames::yAttr)
+ synchronizeY();
+ else if (attrName == SVGNames::dxAttr)
+ synchronizeDx();
+ else if (attrName == SVGNames::dyAttr)
+ synchronizeDy();
+ else if (attrName == SVGNames::rotateAttr)
+ synchronizeRotate();
+}
+
bool SVGTextPositioningElement::isKnownAttribute(const QualifiedName& attrName)
{
return (attrName.matches(SVGNames::xAttr) ||
diff --git a/WebCore/svg/SVGTextPositioningElement.h b/WebCore/svg/SVGTextPositioningElement.h
index 2b07d09..71e8900 100644
--- a/WebCore/svg/SVGTextPositioningElement.h
+++ b/WebCore/svg/SVGTextPositioningElement.h
@@ -28,23 +28,23 @@
namespace WebCore {
- extern char SVGTextPositioningElementIdentifier[];
-
class SVGTextPositioningElement : public SVGTextContentElement {
public:
SVGTextPositioningElement(const QualifiedName&, Document*);
virtual ~SVGTextPositioningElement();
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
bool isKnownAttribute(const QualifiedName&);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGTextPositioningElement, SVGTextPositioningElementIdentifier, SVGNames::xAttrString, SVGLengthList, X, x)
- ANIMATED_PROPERTY_DECLARATIONS(SVGTextPositioningElement, SVGTextPositioningElementIdentifier, SVGNames::yAttrString, SVGLengthList, Y, y)
- ANIMATED_PROPERTY_DECLARATIONS(SVGTextPositioningElement, SVGTextPositioningElementIdentifier, SVGNames::dxAttrString, SVGLengthList, Dx, dx)
- ANIMATED_PROPERTY_DECLARATIONS(SVGTextPositioningElement, SVGTextPositioningElementIdentifier, SVGNames::dyAttrString, SVGLengthList, Dy, dy)
- ANIMATED_PROPERTY_DECLARATIONS(SVGTextPositioningElement, SVGTextPositioningElementIdentifier, SVGNames::rotateAttrString, SVGNumberList, Rotate, rotate)
+ DECLARE_ANIMATED_PROPERTY(SVGTextPositioningElement, SVGNames::xAttr, SVGLengthList*, X, x)
+ DECLARE_ANIMATED_PROPERTY(SVGTextPositioningElement, SVGNames::yAttr, SVGLengthList*, Y, y)
+ DECLARE_ANIMATED_PROPERTY(SVGTextPositioningElement, SVGNames::dxAttr, SVGLengthList*, Dx, dx)
+ DECLARE_ANIMATED_PROPERTY(SVGTextPositioningElement, SVGNames::dyAttr, SVGLengthList*, Dy, dy)
+ DECLARE_ANIMATED_PROPERTY(SVGTextPositioningElement, SVGNames::rotateAttr, SVGNumberList*, Rotate, rotate)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGTransform.h b/WebCore/svg/SVGTransform.h
index 1e15468..aad7a60 100644
--- a/WebCore/svg/SVGTransform.h
+++ b/WebCore/svg/SVGTransform.h
@@ -54,7 +54,6 @@ namespace WebCore {
float angle() const;
FloatPoint rotationCenter() const;
-// void setMatrix(const TransformationMatrix&);
void setMatrix(TransformationMatrix);
void setTranslate(float tx, float ty);
@@ -69,9 +68,6 @@ namespace WebCore {
bool isValid();
- // Throughout SVG 1.1 'SVGTransform' is only used for the 'transform' attribute
- const QualifiedName& associatedAttributeName() const { return SVGNames::transformAttr; }
-
private:
SVGTransformType m_type;
float m_angle;
@@ -93,5 +89,3 @@ namespace WebCore {
#endif // ENABLE(SVG)
#endif
-
-// vim:ts=4:noet
diff --git a/WebCore/svg/SVGTransform.idl b/WebCore/svg/SVGTransform.idl
index 0fd3a1e..fc153a7 100644
--- a/WebCore/svg/SVGTransform.idl
+++ b/WebCore/svg/SVGTransform.idl
@@ -21,7 +21,7 @@
module svg {
- interface [Conditional=SVG, GenerateConstructor, PODType=SVGTransform] SVGTransform {
+ interface [Conditional=SVG, PODType=SVGTransform] SVGTransform {
// Transform Types
const unsigned short SVG_TRANSFORM_UNKNOWN = 0;
const unsigned short SVG_TRANSFORM_MATRIX = 1;
diff --git a/WebCore/svg/SVGTransformList.idl b/WebCore/svg/SVGTransformList.idl
index 8c9c86e..d03351a 100644
--- a/WebCore/svg/SVGTransformList.idl
+++ b/WebCore/svg/SVGTransformList.idl
@@ -29,19 +29,19 @@ module svg {
interface [Conditional=SVG] SVGTransformList {
readonly attribute unsigned long numberOfItems;
- [JSCCustom] void clear()
+ void clear()
raises(DOMException);
- [JSCCustom] SVGTransform initialize(in SVGTransform item)
+ SVGTransform initialize(in SVGTransform item)
raises(DOMException, SVGException);
- [JSCCustom] SVGTransform getItem(in unsigned long index)
+ SVGTransform getItem(in unsigned long index)
raises(DOMException);
- [JSCCustom] SVGTransform insertItemBefore(in SVGTransform item, in unsigned long index)
+ SVGTransform insertItemBefore(in SVGTransform item, in unsigned long index)
raises(DOMException, SVGException);
- [JSCCustom] SVGTransform replaceItem(in SVGTransform item, in unsigned long index)
+ SVGTransform replaceItem(in SVGTransform item, in unsigned long index)
raises(DOMException, SVGException);
- [JSCCustom] SVGTransform removeItem(in unsigned long index)
+ SVGTransform removeItem(in unsigned long index)
raises(DOMException);
- [JSCCustom] SVGTransform appendItem(in SVGTransform item)
+ SVGTransform appendItem(in SVGTransform item)
raises(DOMException, SVGException);
SVGTransform createSVGTransformFromMatrix(in SVGMatrix matrix);
SVGTransform consolidate();
diff --git a/WebCore/svg/SVGTransformable.cpp b/WebCore/svg/SVGTransformable.cpp
index 17344ea..78afbc8 100644
--- a/WebCore/svg/SVGTransformable.cpp
+++ b/WebCore/svg/SVGTransformable.cpp
@@ -190,18 +190,23 @@ static inline bool parseAndSkipType(const UChar*& currTransform, const UChar* en
bool SVGTransformable::parseTransformAttribute(SVGTransformList* list, const AtomicString& transform)
{
const UChar* start = transform.characters();
- const UChar* end = start + transform.length();
- return parseTransformAttribute(list, start, end);
+ return parseTransformAttribute(list, start, start + transform.length());
}
-bool SVGTransformable::parseTransformAttribute(SVGTransformList* list, const UChar*& currTransform, const UChar* end)
+bool SVGTransformable::parseTransformAttribute(SVGTransformList* list, const UChar*& currTransform, const UChar* end, TransformParsingMode mode)
{
+ ExceptionCode ec = 0;
+ if (mode == ClearList) {
+ list->clear(ec);
+ ASSERT(!ec);
+ }
+
bool delimParsed = false;
while (currTransform < end) {
delimParsed = false;
unsigned short type = SVGTransform::SVG_TRANSFORM_UNKNOWN;
skipOptionalSpaces(currTransform, end);
-
+
if (!parseAndSkipType(currTransform, end, type))
return false;
@@ -209,12 +214,11 @@ bool SVGTransformable::parseTransformAttribute(SVGTransformList* list, const UCh
if (!parseTransformValue(type, currTransform, end, t))
return false;
- ExceptionCode ec = 0;
list->appendItem(t, ec);
skipOptionalSpaces(currTransform, end);
if (currTransform < end && *currTransform == ',') {
delimParsed = true;
- currTransform++;
+ ++currTransform;
}
skipOptionalSpaces(currTransform, end);
}
diff --git a/WebCore/svg/SVGTransformable.h b/WebCore/svg/SVGTransformable.h
index 1e87b78..a74eff7 100644
--- a/WebCore/svg/SVGTransformable.h
+++ b/WebCore/svg/SVGTransformable.h
@@ -38,8 +38,13 @@ namespace WebCore {
SVGTransformable();
virtual ~SVGTransformable();
+ enum TransformParsingMode {
+ ClearList,
+ DoNotClearList
+ };
+
static bool parseTransformAttribute(SVGTransformList*, const AtomicString& transform);
- static bool parseTransformAttribute(SVGTransformList*, const UChar*& ptr, const UChar* end);
+ static bool parseTransformAttribute(SVGTransformList*, const UChar*& ptr, const UChar* end, TransformParsingMode mode = ClearList);
static bool parseTransformValue(unsigned type, const UChar*& ptr, const UChar* end, SVGTransform&);
TransformationMatrix getCTM(const SVGElement*) const;
diff --git a/WebCore/svg/SVGTransformable.idl b/WebCore/svg/SVGTransformable.idl
index 02a4336..13a4520 100644
--- a/WebCore/svg/SVGTransformable.idl
+++ b/WebCore/svg/SVGTransformable.idl
@@ -26,7 +26,7 @@
module svg {
- interface [Conditional=SVG, ObjCProtocol] SVGTransformable : SVGLocatable {
+ interface [Conditional=SVG, ObjCProtocol, OmitConstructor] SVGTransformable : SVGLocatable {
readonly attribute SVGAnimatedTransformList transform;
};
diff --git a/WebCore/svg/SVGURIReference.cpp b/WebCore/svg/SVGURIReference.cpp
index 24febc3..5fe71ab 100644
--- a/WebCore/svg/SVGURIReference.cpp
+++ b/WebCore/svg/SVGURIReference.cpp
@@ -27,8 +27,6 @@
namespace WebCore {
-char SVGURIReferenceIdentifier[] = "SVGURIReference";
-
SVGURIReference::SVGURIReference()
{
}
diff --git a/WebCore/svg/SVGURIReference.h b/WebCore/svg/SVGURIReference.h
index 7f91b72..ea09f2e 100644
--- a/WebCore/svg/SVGURIReference.h
+++ b/WebCore/svg/SVGURIReference.h
@@ -27,7 +27,6 @@
namespace WebCore {
- extern char SVGURIReferenceIdentifier[];
class MappedAttribute;
class SVGURIReference {
@@ -41,7 +40,7 @@ namespace WebCore {
static String getTarget(const String& url);
protected:
- virtual void setHrefBaseValue(SVGAnimatedTypeValue<String>::DecoratedType type) = 0;
+ virtual void setHrefBaseValue(SVGAnimatedPropertyTraits<String>::PassType) = 0;
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGURIReference.idl b/WebCore/svg/SVGURIReference.idl
index 72bd9c8..4981eb1 100644
--- a/WebCore/svg/SVGURIReference.idl
+++ b/WebCore/svg/SVGURIReference.idl
@@ -26,7 +26,7 @@
module svg {
- interface [Conditional=SVG, ObjCProtocol] SVGURIReference {
+ interface [Conditional=SVG, ObjCProtocol, OmitConstructor] SVGURIReference {
readonly attribute SVGAnimatedString href;
};
diff --git a/WebCore/svg/SVGUnitTypes.idl b/WebCore/svg/SVGUnitTypes.idl
index 0c3791e..9095e7a 100644
--- a/WebCore/svg/SVGUnitTypes.idl
+++ b/WebCore/svg/SVGUnitTypes.idl
@@ -25,7 +25,7 @@
module svg {
- interface [Conditional=SVG, GenerateConstructor] SVGUnitTypes {
+ interface [Conditional=SVG] SVGUnitTypes {
// Unit Types
const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0;
const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE = 1;
diff --git a/WebCore/svg/SVGUseElement.cpp b/WebCore/svg/SVGUseElement.cpp
index a566992..2ce1bd1 100644
--- a/WebCore/svg/SVGUseElement.cpp
+++ b/WebCore/svg/SVGUseElement.cpp
@@ -1,7 +1,7 @@
/*
Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
- Copyright (C) Research In Motion Limited 2009. All rights reserved.
+ Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -33,12 +33,13 @@
#include "MappedAttribute.h"
#include "NodeRenderStyle.h"
#include "RegisteredEventListener.h"
-#include "RenderSVGTransformableContainer.h"
+#include "RenderSVGShadowTreeRootContainer.h"
#include "SVGElementInstance.h"
#include "SVGElementInstanceList.h"
#include "SVGGElement.h"
#include "SVGLength.h"
#include "SVGPreserveAspectRatio.h"
+#include "SVGShadowTreeElements.h"
#include "SVGSMILElement.h"
#include "SVGSVGElement.h"
#include "SVGSymbolElement.h"
@@ -59,12 +60,12 @@ SVGUseElement::SVGUseElement(const QualifiedName& tagName, Document* doc)
, SVGLangSpace()
, SVGExternalResourcesRequired()
, SVGURIReference()
- , m_x(this, SVGNames::xAttr, LengthModeWidth)
- , m_y(this, SVGNames::yAttr, LengthModeHeight)
- , m_width(this, SVGNames::widthAttr, LengthModeWidth)
- , m_height(this, SVGNames::heightAttr, LengthModeHeight)
- , m_href(this, XLinkNames::hrefAttr)
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
+ , m_x(LengthModeWidth)
+ , m_y(LengthModeHeight)
+ , m_width(LengthModeWidth)
+ , m_height(LengthModeHeight)
+ , m_isPendingResource(false)
+ , m_needsShadowTreeRecreation(false)
{
}
@@ -74,6 +75,13 @@ SVGUseElement::~SVGUseElement()
SVGElementInstance* SVGUseElement::instanceRoot() const
{
+ // If there is no element instance tree, force immediate SVGElementInstance tree
+ // creation by asking the document to invoke our recalcStyle function - as we can't
+ // wait for the lazy creation to happen if e.g. JS wants to access the instanceRoot
+ // object right after creating the element on-the-fly
+ if (!m_targetElementInstance)
+ document()->updateLayoutIgnorePendingStylesheets();
+
return m_targetElementInstance.get();
}
@@ -112,14 +120,15 @@ void SVGUseElement::parseMappedAttribute(MappedAttribute* attr)
void SVGUseElement::insertedIntoDocument()
{
+ // This functions exists to assure assumptions made in the code regarding SVGElementInstance creation/destruction are satisfied.
SVGElement::insertedIntoDocument();
- buildPendingResource();
+ ASSERT(!m_targetElementInstance);
+ ASSERT(!m_isPendingResource);
}
void SVGUseElement::removedFromDocument()
{
m_targetElementInstance = 0;
- m_shadowTreeRootElement = 0;
SVGElement::removedFromDocument();
}
@@ -127,87 +136,198 @@ void SVGUseElement::svgAttributeChanged(const QualifiedName& attrName)
{
SVGStyledTransformableElement::svgAttributeChanged(attrName);
- if (!attached())
+ if (!renderer())
return;
- if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr ||
- attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr ||
- SVGTests::isKnownAttribute(attrName) ||
- SVGLangSpace::isKnownAttribute(attrName) ||
- SVGExternalResourcesRequired::isKnownAttribute(attrName) ||
- SVGURIReference::isKnownAttribute(attrName) ||
- SVGStyledTransformableElement::isKnownAttribute(attrName)) {
- buildPendingResource();
-
- if (m_shadowTreeRootElement)
- m_shadowTreeRootElement->setNeedsStyleRecalc();
+ if (SVGURIReference::isKnownAttribute(attrName)) {
+ if (m_isPendingResource) {
+ document()->accessSVGExtensions()->removePendingResource(m_resourceId);
+ m_resourceId = String();
+ m_isPendingResource = false;
+ }
+
+ invalidateShadowTree();
+ return;
+ }
+
+ if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr) {
+ updateContainerOffsets();
+ return;
+ }
+
+ if (attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) {
+ updateContainerSizes();
+ return;
+ }
+
+ // Be very careful here, if svgAttributeChanged() has been called because a SVG CSS property changed, we do NOT want to reclone the tree!
+ if (SVGStyledElement::isKnownAttribute(attrName)) {
+ setNeedsStyleRecalc();
+ return;
+ }
+
+ if (SVGTests::isKnownAttribute(attrName)
+ || SVGLangSpace::isKnownAttribute(attrName)
+ || SVGExternalResourcesRequired::isKnownAttribute(attrName)
+ || SVGStyledTransformableElement::isKnownAttribute(attrName)) {
+ invalidateShadowTree();
}
}
-void SVGUseElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
+void SVGUseElement::synchronizeProperty(const QualifiedName& attrName)
{
- SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+ SVGStyledTransformableElement::synchronizeProperty(attrName);
- if (!attached())
+ if (attrName == anyQName()) {
+ synchronizeX();
+ synchronizeY();
+ synchronizeWidth();
+ synchronizeHeight();
+ synchronizeExternalResourcesRequired();
+ synchronizeHref();
return;
+ }
- buildPendingResource();
+ if (attrName == SVGNames::xAttr)
+ synchronizeX();
+ else if (attrName == SVGNames::yAttr)
+ synchronizeY();
+ else if (attrName == SVGNames::widthAttr)
+ synchronizeWidth();
+ else if (attrName == SVGNames::heightAttr)
+ synchronizeHeight();
+ else if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+ else if (SVGURIReference::isKnownAttribute(attrName))
+ synchronizeHref();
+}
- if (m_shadowTreeRootElement)
- m_shadowTreeRootElement->setNeedsStyleRecalc();
+static void updateContainerSize(SVGUseElement* useElement, SVGElementInstance* targetInstance)
+{
+ // Depth-first used to write the method in early exit style, no particular other reason.
+ for (SVGElementInstance* instance = targetInstance->firstChild(); instance; instance = instance->nextSibling())
+ updateContainerSize(useElement, instance);
+
+ SVGElement* correspondingElement = targetInstance->correspondingElement();
+ ASSERT(correspondingElement);
+
+ bool isSymbolTag = correspondingElement->hasTagName(SVGNames::symbolTag);
+ if (!correspondingElement->hasTagName(SVGNames::svgTag) && !isSymbolTag)
+ return;
+
+ SVGElement* shadowTreeElement = targetInstance->shadowTreeElement();
+ ASSERT(shadowTreeElement);
+ ASSERT(shadowTreeElement->hasTagName(SVGNames::svgTag));
+
+ // Spec (<use> on <symbol>): This generated 'svg' will always have explicit values for attributes width and height.
+ // If attributes width and/or 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.
+
+ // Spec (<use> on <svg>): If attributes width and/or height are provided on the 'use' element, then these
+ // values will override the corresponding attributes on the 'svg' in the generated tree.
+
+ if (useElement->hasAttribute(SVGNames::widthAttr))
+ shadowTreeElement->setAttribute(SVGNames::widthAttr, useElement->getAttribute(SVGNames::widthAttr));
+ else if (isSymbolTag && shadowTreeElement->hasAttribute(SVGNames::widthAttr))
+ shadowTreeElement->setAttribute(SVGNames::widthAttr, "100%");
+
+ if (useElement->hasAttribute(SVGNames::heightAttr))
+ shadowTreeElement->setAttribute(SVGNames::heightAttr, useElement->getAttribute(SVGNames::heightAttr));
+ else if (isSymbolTag && shadowTreeElement->hasAttribute(SVGNames::heightAttr))
+ shadowTreeElement->setAttribute(SVGNames::heightAttr, "100%");
+}
+
+void SVGUseElement::updateContainerSizes()
+{
+ if (!m_targetElementInstance)
+ return;
+
+ // Update whole subtree, scanning for shadow container elements, that correspond to <svg>/<symbol> tags
+ updateContainerSize(this, m_targetElementInstance.get());
+
+ if (renderer())
+ renderer()->setNeedsLayout(true);
}
-
-static bool shadowTreeContainsChangedNodes(SVGElementInstance* target)
+
+static void updateContainerOffset(SVGElementInstance* targetInstance)
{
- if (!target) // when use is referencing an non-existing element, there will be no Instance tree built
- return false;
+ // Depth-first used to write the method in early exit style, no particular other reason.
+ for (SVGElementInstance* instance = targetInstance->firstChild(); instance; instance = instance->nextSibling())
+ updateContainerOffset(instance);
- if (target->needsUpdate())
- return true;
+ SVGElement* correspondingElement = targetInstance->correspondingElement();
+ ASSERT(correspondingElement);
- for (SVGElementInstance* instance = target->firstChild(); instance; instance = instance->nextSibling())
- if (shadowTreeContainsChangedNodes(instance))
- return true;
+ if (!correspondingElement->hasTagName(SVGNames::useTag))
+ return;
- return false;
+ SVGElement* shadowTreeElement = targetInstance->shadowTreeElement();
+ ASSERT(shadowTreeElement);
+ ASSERT(shadowTreeElement->hasTagName(SVGNames::gTag));
+
+ if (!static_cast<SVGGElement*>(shadowTreeElement)->isShadowTreeContainerElement())
+ return;
+
+ // Spec: An additional transformation translate(x,y) is appended to the end
+ // (i.e., right-side) of the transform attribute on the generated 'g', where x
+ // and y represent the values of the x and y attributes on the 'use' element.
+ SVGUseElement* useElement = static_cast<SVGUseElement*>(correspondingElement);
+ SVGShadowTreeContainerElement* containerElement = static_cast<SVGShadowTreeContainerElement*>(shadowTreeElement);
+ containerElement->setContainerOffset(useElement->x(), useElement->y());
}
-void SVGUseElement::recalcStyle(StyleChange change)
+void SVGUseElement::updateContainerOffsets()
{
- if (attached() && needsStyleRecalc() && shadowTreeContainsChangedNodes(m_targetElementInstance.get())) {
- buildPendingResource();
+ if (!m_targetElementInstance)
+ return;
+
+ // Update root container offset (not reachable through instance tree)
+ SVGElement* shadowRoot = m_targetElementInstance->shadowTreeElement();
+ ASSERT(shadowRoot);
- if (m_shadowTreeRootElement)
- m_shadowTreeRootElement->setNeedsStyleRecalc();
+ Node* parentNode = shadowRoot->parentNode();
+ ASSERT(parentNode);
+ ASSERT(parentNode->isSVGElement());
+ ASSERT(parentNode->hasTagName(SVGNames::gTag));
+ ASSERT(static_cast<SVGGElement*>(parentNode)->isShadowTreeContainerElement());
+
+ SVGShadowTreeContainerElement* containerElement = static_cast<SVGShadowTreeContainerElement*>(parentNode);
+ containerElement->setContainerOffset(x(), y());
+
+ // Update whole subtree, scanning for shadow container elements, marking a cloned use subtree
+ updateContainerOffset(m_targetElementInstance.get());
+
+ if (renderer())
+ renderer()->setNeedsLayout(true);
+}
+
+void SVGUseElement::recalcStyle(StyleChange change)
+{
+ // Eventually mark shadow root element needing style recalc
+ if (needsStyleRecalc() && m_targetElementInstance) {
+ if (SVGElement* shadowRoot = m_targetElementInstance->shadowTreeElement())
+ shadowRoot->setNeedsStyleRecalc();
}
- SVGStyledElement::recalcStyle(change);
+ SVGStyledTransformableElement::recalcStyle(change);
+
+ bool needsStyleUpdate = !m_needsShadowTreeRecreation;
+ if (m_needsShadowTreeRecreation) {
+ static_cast<RenderSVGShadowTreeRootContainer*>(renderer())->markShadowTreeForRecreation();
+ m_needsShadowTreeRecreation = false;
+ }
- // The shadow tree root element is NOT a direct child element of us.
- // So we have to take care it receives style updates, manually.
- if (!m_shadowTreeRootElement || !m_shadowTreeRootElement->attached())
+ RenderSVGShadowTreeRootContainer* shadowRoot = static_cast<RenderSVGShadowTreeRootContainer*>(renderer());
+ if (!shadowRoot)
return;
- // Mimic Element::recalcStyle(). The main difference is that we don't call attach() on the
- // shadow tree root element, but call attachShadowTree() here. Calling attach() will crash
- // as the shadow tree root element has no (direct) parent node. Yes, shadow trees are tricky.
- if (change >= Inherit || m_shadowTreeRootElement->needsStyleRecalc()) {
- RefPtr<RenderStyle> newStyle = document()->styleSelector()->styleForElement(m_shadowTreeRootElement.get());
- StyleChange ch = Node::diff(m_shadowTreeRootElement->renderStyle(), newStyle.get());
- if (ch == Detach) {
- ASSERT(m_shadowTreeRootElement->attached());
- m_shadowTreeRootElement->detach();
- attachShadowTree();
-
- // attach recalulates the style for all children. No need to do it twice.
- m_shadowTreeRootElement->setNeedsStyleRecalc(NoStyleChange);
- m_shadowTreeRootElement->setChildNeedsStyleRecalc(false);
- return;
- }
- }
+ shadowRoot->updateFromElement();
- // Only change==Detach needs special treatment, for anything else recalcStyle() works.
- m_shadowTreeRootElement->recalcStyle(change);
+ if (!needsStyleUpdate)
+ return;
+
+ shadowRoot->updateStyle(change);
}
#ifdef DUMP_INSTANCE_TREE
@@ -216,26 +336,30 @@ void dumpInstanceTree(unsigned int& depth, String& text, SVGElementInstance* tar
SVGElement* element = targetInstance->correspondingElement();
ASSERT(element);
+ SVGElement* shadowTreeElement = targetInstance->shadowTreeElement();
+ ASSERT(shadowTreeElement);
+
String elementId = element->getIDAttribute();
String elementNodeName = element->nodeName();
+ String shadowTreeElementNodeName = shadowTreeElement->nodeName();
String parentNodeName = element->parentNode() ? element->parentNode()->nodeName() : "null";
String firstChildNodeName = element->firstChild() ? element->firstChild()->nodeName() : "null";
for (unsigned int i = 0; i < depth; ++i)
text += " ";
- text += String::format("SVGElementInstance this=%p, (parentNode=%s, firstChild=%s, correspondingElement=%s (%p), shadowTreeElement=%p, id=%s)\n",
- targetInstance, parentNodeName.latin1().data(), firstChildNodeName.latin1().data(), elementNodeName.latin1().data(),
- element, targetInstance->shadowTreeElement(), elementId.latin1().data());
+ text += String::format("SVGElementInstance this=%p, (parentNode=%s (%p), firstChild=%s (%p), correspondingElement=%s (%p), shadowTreeElement=%s (%p), id=%s)\n",
+ targetInstance, parentNodeName.latin1().data(), element->parentNode(), firstChildNodeName.latin1().data(), element->firstChild(),
+ elementNodeName.latin1().data(), element, shadowTreeElementNodeName.latin1().data(), shadowTreeElement, elementId.latin1().data());
for (unsigned int i = 0; i < depth; ++i)
text += " ";
- HashSet<SVGElementInstance*> elementInstances = element->instancesForElement();
+ const HashSet<SVGElementInstance*>& elementInstances = element->instancesForElement();
text += String::format("Corresponding element is associated with %i instance(s):\n", elementInstances.size());
- HashSet<SVGElementInstance*>::iterator end = elementInstances.end();
- for (HashSet<SVGElementInstance*>::iterator it = elementInstances.begin(); it != end; ++it) {
+ const HashSet<SVGElementInstance*>::const_iterator end = elementInstances.end();
+ for (HashSet<SVGElementInstance*>::const_iterator it = elementInstances.begin(); it != end; ++it) {
for (unsigned int i = 0; i < depth; ++i)
text += " ";
@@ -282,16 +406,36 @@ static bool subtreeContainsDisallowedElement(Node* start)
void SVGUseElement::buildPendingResource()
{
+ // If we're called the first time (during shadow tree root creation from RenderSVGShadowTreeRootContainer)
+ // we either determine that our target is available or not - then we add ourselves to the pending resource list
+ // Once the pending resource appears, it will call buildPendingResource(), so we're called a second time.
String id = SVGURIReference::getTarget(href());
Element* targetElement = document()->getElementById(id);
+ ASSERT(!m_targetElementInstance);
if (!targetElement) {
- // TODO: We want to deregister as pending resource, if our href() changed!
- // TODO: Move to svgAttributeChanged, once we're fixing use & the new dynamic update concept.
+ if (m_isPendingResource)
+ return;
+
+ m_isPendingResource = true;
+ m_resourceId = id;
document()->accessSVGExtensions()->addPendingResource(id, this);
return;
}
+ if (m_isPendingResource) {
+ ASSERT(!m_targetElementInstance);
+ m_isPendingResource = false;
+ invalidateShadowTree();
+ }
+}
+
+void SVGUseElement::buildShadowAndInstanceTree(SVGShadowTreeRootElement* shadowRoot)
+{
+ String id = SVGURIReference::getTarget(href());
+ Element* targetElement = document()->getElementById(id);
+ ASSERT(targetElement);
+
// Do not build the shadow/instance tree for <use> elements living in a shadow tree.
// The will be expanded soon anyway - see expandUseElementsInShadowTree().
Node* parent = parentNode();
@@ -306,17 +450,13 @@ void SVGUseElement::buildPendingResource()
if (targetElement && targetElement->isSVGElement())
target = static_cast<SVGElement*>(targetElement);
- if (m_targetElementInstance) {
- m_targetElementInstance->forgetWrapper();
+ if (m_targetElementInstance)
m_targetElementInstance = 0;
- }
// Do not allow self-referencing.
// 'target' may be null, if it's a non SVG namespaced element.
- if (!target || target == this) {
- m_shadowTreeRootElement = 0;
+ if (!target || target == this)
return;
- }
// Why a seperated instance/shadow tree? SVG demands it:
// The instance tree is accesable from JavaScript, and has to
@@ -338,45 +478,44 @@ void SVGUseElement::buildPendingResource()
// Non-appearing <use> content is easier to debug, then half-appearing content.
if (foundProblem) {
m_targetElementInstance = 0;
- m_shadowTreeRootElement = 0;
return;
}
// Assure instance tree building was successfull
ASSERT(m_targetElementInstance);
+ ASSERT(!m_targetElementInstance->shadowTreeElement());
ASSERT(m_targetElementInstance->correspondingUseElement() == this);
-
- // Setup shadow tree root node
- m_shadowTreeRootElement = new SVGGElement(SVGNames::gTag, document());
- m_shadowTreeRootElement->setInDocument();
- m_shadowTreeRootElement->setShadowParentNode(this);
-
- // Spec: An additional transformation translate(x,y) is appended to the end
- // (i.e., right-side) of the transform attribute on the generated 'g', where x
- // and y represent the values of the x and y attributes on the 'use' element.
- if (x().value(this) != 0.0 || y().value(this) != 0.0) {
- String transformString = String::format("translate(%f, %f)", x().value(this), y().value(this));
- m_shadowTreeRootElement->setAttribute(SVGNames::transformAttr, transformString);
- }
+ ASSERT(m_targetElementInstance->correspondingElement() == target);
// Build shadow tree from instance tree
// This also handles the special cases: <use> on <symbol>, <use> on <svg>.
- buildShadowTree(target, m_targetElementInstance.get());
+ buildShadowTree(shadowRoot, target, m_targetElementInstance.get());
#if ENABLE(SVG) && ENABLE(SVG_USE)
// Expand all <use> elements in the shadow tree.
// Expand means: replace the actual <use> element by what it references.
- expandUseElementsInShadowTree(m_shadowTreeRootElement.get());
+ expandUseElementsInShadowTree(shadowRoot, shadowRoot);
// Expand all <symbol> elements in the shadow tree.
// Expand means: replace the actual <symbol> element by the <svg> element.
- expandSymbolElementsInShadowTree(m_shadowTreeRootElement.get());
-
+ expandSymbolElementsInShadowTree(shadowRoot, shadowRoot);
#endif
// Now that the shadow tree is completly expanded, we can associate
// shadow tree elements <-> instances in the instance tree.
- associateInstancesWithShadowTreeElements(m_shadowTreeRootElement->firstChild(), m_targetElementInstance.get());
+ associateInstancesWithShadowTreeElements(shadowRoot->firstChild(), m_targetElementInstance.get());
+
+ // If no shadow tree element is present, this means that the reference root
+ // element was removed, as it is disallowed (ie. <use> on <foreignObject>)
+ // Do NOT leave an inconsistent instance tree around, instead destruct it.
+ if (!m_targetElementInstance->shadowTreeElement()) {
+ shadowRoot->removeAllChildren();
+ m_targetElementInstance = 0;
+ return;
+ }
+
+ // Consistency checks - this is assumed in updateContainerOffset().
+ ASSERT(m_targetElementInstance->shadowTreeElement()->parentNode() == shadowRoot);
// Eventually dump instance tree
#ifdef DUMP_INSTANCE_TREE
@@ -393,8 +532,8 @@ void SVGUseElement::buildPendingResource()
PassRefPtr<XMLSerializer> serializer = XMLSerializer::create();
- String markup = serializer->serializeToString(m_shadowTreeRootElement.get(), ec);
- ASSERT(ec == 0);
+ String markup = serializer->serializeToString(shadowRoot, ec);
+ ASSERT(!ec);
fprintf(stderr, "Dumping <use> shadow tree markup:\n%s\n", markup.latin1().data());
#endif
@@ -402,30 +541,34 @@ void SVGUseElement::buildPendingResource()
// Transfer event listeners assigned to the referenced element to our shadow tree elements.
transferEventListenersToShadowTree(m_targetElementInstance.get());
- // The DOM side is setup properly. Now we have to attach the root shadow
- // tree element manually - using attach() won't work for "shadow nodes".
- attachShadowTree();
+ // Update container offset/size
+ updateContainerOffsets();
+ updateContainerSizes();
}
RenderObject* SVGUseElement::createRenderer(RenderArena* arena, RenderStyle*)
{
- return new (arena) RenderSVGTransformableContainer(this);
+ return new (arena) RenderSVGShadowTreeRootContainer(this);
+}
+
+static void updateFromElementCallback(Node* node)
+{
+ if (RenderObject* renderer = node->renderer())
+ renderer->updateFromElement();
}
void SVGUseElement::attach()
{
SVGStyledTransformableElement::attach();
- // If we're a pending resource, this doesn't have any effect.
- attachShadowTree();
+ if (renderer())
+ queuePostAttachCallback(updateFromElementCallback, this);
}
void SVGUseElement::detach()
{
SVGStyledTransformableElement::detach();
-
- if (m_shadowTreeRootElement)
- m_shadowTreeRootElement->detach();
+ m_targetElementInstance = 0;
}
static bool isDirectReference(Node* n)
@@ -441,13 +584,10 @@ static bool isDirectReference(Node* n)
Path SVGUseElement::toClipPath() const
{
- if (!m_shadowTreeRootElement)
- const_cast<SVGUseElement*>(this)->buildPendingResource();
-
- if (!m_shadowTreeRootElement)
+ Node* n = m_targetElementInstance ? m_targetElementInstance->shadowTreeElement() : 0;
+ if (!n)
return Path();
- Node* n = m_shadowTreeRootElement->firstChild();
if (n->isSVGElement() && static_cast<SVGElement*>(n)->isStyledTransformable()) {
if (!isDirectReference(n))
// Spec: Indirect references are an error (14.3.5)
@@ -481,11 +621,12 @@ void SVGUseElement::buildInstanceTree(SVGElement* target, SVGElementInstance* ta
continue;
// Create SVGElementInstance object, for both container/non-container nodes.
- RefPtr<SVGElementInstance> instancePtr = SVGElementInstance::create(this, element);
- targetInstance->appendChild(instancePtr.get());
+ RefPtr<SVGElementInstance> instance = SVGElementInstance::create(this, element);
+ SVGElementInstance* instancePtr = instance.get();
+ targetInstance->appendChild(instance.release());
// Enter recursion, appending new instance tree nodes to the "instance" object.
- buildInstanceTree(element, instancePtr.get(), foundProblem);
+ buildInstanceTree(element, instancePtr, foundProblem);
}
// Spec: If the referenced object is itself a 'use', or if there are 'use' subelements within the referenced
@@ -526,22 +667,11 @@ void SVGUseElement::handleDeepUseReferencing(SVGUseElement* use, SVGElementInsta
// Create an instance object, even if we're dealing with a cycle
RefPtr<SVGElementInstance> newInstance = SVGElementInstance::create(this, target);
- targetInstance->appendChild(newInstance);
+ SVGElementInstance* newInstancePtr = newInstance.get();
+ targetInstance->appendChild(newInstance.release());
// Eventually enter recursion to build SVGElementInstance objects for the sub-tree children
- buildInstanceTree(target, newInstance.get(), foundProblem);
-}
-
-void SVGUseElement::alterShadowTreeForSVGTag(SVGElement* target)
-{
- String widthString = String::number(width().value(this));
- String heightString = String::number(height().value(this));
-
- if (hasAttribute(SVGNames::widthAttr))
- target->setAttribute(SVGNames::widthAttr, widthString);
-
- if (hasAttribute(SVGNames::heightAttr))
- target->setAttribute(SVGNames::heightAttr, heightString);
+ buildInstanceTree(target, newInstancePtr, foundProblem);
}
void SVGUseElement::removeDisallowedElementsFromSubtree(Node* subtree)
@@ -560,7 +690,7 @@ void SVGUseElement::removeDisallowedElementsFromSubtree(Node* subtree)
}
}
-void SVGUseElement::buildShadowTree(SVGElement* target, SVGElementInstance* targetInstance)
+void SVGUseElement::buildShadowTree(SVGShadowTreeRootElement* shadowRoot, SVGElement* target, SVGElementInstance* targetInstance)
{
// For instance <use> on <foreignObject> (direct case).
if (isDisallowedElement(target))
@@ -582,16 +712,12 @@ void SVGUseElement::buildShadowTree(SVGElement* target, SVGElementInstance* targ
ASSERT(newChildPtr);
ExceptionCode ec = 0;
- m_shadowTreeRootElement->appendChild(newChild.release(), ec);
- ASSERT(ec == 0);
-
- // Handle use referencing <svg> special case
- if (target->hasTagName(SVGNames::svgTag))
- alterShadowTreeForSVGTag(newChildPtr);
+ shadowRoot->appendChild(newChild.release(), ec);
+ ASSERT(!ec);
}
#if ENABLE(SVG) && ENABLE(SVG_USE)
-void SVGUseElement::expandUseElementsInShadowTree(Node* element)
+void SVGUseElement::expandUseElementsInShadowTree(SVGShadowTreeRootElement* shadowRoot, Node* element)
{
// Why expand the <use> elements in the shadow tree here, and not just
// do this directly in buildShadowTree, if we encounter a <use> element?
@@ -612,28 +738,14 @@ void SVGUseElement::expandUseElementsInShadowTree(Node* element)
// Don't ASSERT(target) here, it may be "pending", too.
if (target) {
// Setup sub-shadow tree root node
- RefPtr<SVGElement> cloneParent = new SVGGElement(SVGNames::gTag, document());
+ RefPtr<SVGShadowTreeContainerElement> cloneParent = new SVGShadowTreeContainerElement(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.
transferUseAttributesToReplacedElement(use, cloneParent.get());
- // Spec: An additional transformation translate(x,y) is appended to the end
- // (i.e., right-side) of the transform attribute on the generated 'g', where x
- // and y represent the values of the x and y attributes on the 'use' element.
- if (use->x().value(this) != 0.0 || use->y().value(this) != 0.0) {
- if (!cloneParent->hasAttribute(SVGNames::transformAttr)) {
- String transformString = String::format("translate(%f, %f)", use->x().value(this), use->y().value(this));
- cloneParent->setAttribute(SVGNames::transformAttr, transformString);
- } else {
- String transformString = String::format(" translate(%f, %f)", use->x().value(this), use->y().value(this));
- const AtomicString& transformAttribute = cloneParent->getAttribute(SVGNames::transformAttr);
- cloneParent->setAttribute(SVGNames::transformAttr, transformAttribute + transformString);
- }
- }
-
ExceptionCode ec = 0;
-
+
// For instance <use> on <foreignObject> (direct case).
if (isDisallowedElement(target)) {
// We still have to setup the <use> replacment (<g>). Otherwhise
@@ -641,7 +753,7 @@ void SVGUseElement::expandUseElementsInShadowTree(Node* element)
// Replace <use> with referenced content.
ASSERT(use->parentNode());
use->parentNode()->replaceChild(cloneParent.release(), use, ec);
- ASSERT(ec == 0);
+ ASSERT(!ec);
return;
}
@@ -661,28 +773,24 @@ void SVGUseElement::expandUseElementsInShadowTree(Node* element)
ASSERT(newChildPtr);
cloneParent->appendChild(newChild.release(), ec);
- ASSERT(ec == 0);
+ ASSERT(!ec);
// Replace <use> with referenced content.
ASSERT(use->parentNode());
use->parentNode()->replaceChild(cloneParent.release(), use, ec);
- ASSERT(ec == 0);
-
- // Handle use referencing <svg> special case
- if (target->hasTagName(SVGNames::svgTag))
- alterShadowTreeForSVGTag(newChildPtr);
+ ASSERT(!ec);
// Immediately stop here, and restart expanding.
- expandUseElementsInShadowTree(m_shadowTreeRootElement.get());
+ expandUseElementsInShadowTree(shadowRoot, shadowRoot);
return;
}
}
for (RefPtr<Node> child = element->firstChild(); child; child = child->nextSibling())
- expandUseElementsInShadowTree(child.get());
+ expandUseElementsInShadowTree(shadowRoot, child.get());
}
-void SVGUseElement::expandSymbolElementsInShadowTree(Node* element)
+void SVGUseElement::expandSymbolElementsInShadowTree(SVGShadowTreeRootElement* shadowRoot, Node* element)
{
if (element->hasTagName(SVGNames::symbolTag)) {
// Spec: The referenced 'symbol' and its contents are deep-cloned into the generated tree,
@@ -696,20 +804,12 @@ void SVGUseElement::expandSymbolElementsInShadowTree(Node* element)
// Transfer all attributes from <symbol> to the new <svg> element
svgElement->attributes()->setAttributes(*element->attributes());
- // Explicitly re-set width/height values
- String widthString = String::number(width().value(this));
- String heightString = String::number(height().value(this));
-
- svgElement->setAttribute(SVGNames::widthAttr, hasAttribute(SVGNames::widthAttr) ? widthString : "100%");
- svgElement->setAttribute(SVGNames::heightAttr, hasAttribute(SVGNames::heightAttr) ? heightString : "100%");
-
- ExceptionCode ec = 0;
-
// Only clone symbol children, and add them to the new <svg> element
+ ExceptionCode ec = 0;
for (Node* child = element->firstChild(); child; child = child->nextSibling()) {
RefPtr<Node> newChild = child->cloneNode(true);
svgElement->appendChild(newChild.release(), ec);
- ASSERT(ec == 0);
+ ASSERT(!ec);
}
// We don't walk the target tree element-by-element, and clone each element,
@@ -723,43 +823,19 @@ void SVGUseElement::expandSymbolElementsInShadowTree(Node* element)
// Replace <symbol> with <svg>.
ASSERT(element->parentNode());
element->parentNode()->replaceChild(svgElement.release(), element, ec);
- ASSERT(ec == 0);
+ ASSERT(!ec);
// Immediately stop here, and restart expanding.
- expandSymbolElementsInShadowTree(m_shadowTreeRootElement.get());
+ expandSymbolElementsInShadowTree(shadowRoot, shadowRoot);
return;
}
for (RefPtr<Node> child = element->firstChild(); child; child = child->nextSibling())
- expandSymbolElementsInShadowTree(child.get());
+ expandSymbolElementsInShadowTree(shadowRoot, child.get());
}
#endif
-
-void SVGUseElement::attachShadowTree()
-{
- if (!m_shadowTreeRootElement || m_shadowTreeRootElement->attached() || !document()->shouldCreateRenderers() || !attached() || !renderer())
- return;
- // Inspired by RenderTextControl::createSubtreeIfNeeded().
- if (renderer()->canHaveChildren() && childShouldCreateRenderer(m_shadowTreeRootElement.get())) {
- RefPtr<RenderStyle> style = m_shadowTreeRootElement->styleForRenderer();
-
- if (m_shadowTreeRootElement->rendererIsNeeded(style.get())) {
- m_shadowTreeRootElement->setRenderer(m_shadowTreeRootElement->createRenderer(document()->renderArena(), style.get()));
- if (RenderObject* shadowRenderer = m_shadowTreeRootElement->renderer()) {
- shadowRenderer->setStyle(style.release());
- renderer()->addChild(shadowRenderer, m_shadowTreeRootElement->nextRenderer());
- m_shadowTreeRootElement->setAttached();
- }
- }
-
- // This will take care of attaching all shadow tree child nodes.
- for (Node* child = m_shadowTreeRootElement->firstChild(); child; child = child->nextSibling())
- child->attach();
- }
-}
-
void SVGUseElement::transferEventListenersToShadowTree(SVGElementInstance* target)
{
if (!target)
@@ -830,6 +906,11 @@ void SVGUseElement::associateInstancesWithShadowTreeElements(Node* target, SVGEl
SVGElementInstance* SVGUseElement::instanceForShadowTreeElement(Node* element) const
{
+ if (!m_targetElementInstance) {
+ ASSERT(!inDocument());
+ return 0;
+ }
+
return instanceForShadowTreeElement(element, m_targetElementInstance.get());
}
@@ -847,14 +928,19 @@ SVGElementInstance* SVGUseElement::instanceForShadowTreeElement(Node* element, S
return instance;
for (SVGElementInstance* current = instance->firstChild(); current; current = current->nextSibling()) {
- SVGElementInstance* search = instanceForShadowTreeElement(element, current);
- if (search)
+ if (SVGElementInstance* search = instanceForShadowTreeElement(element, current))
return search;
}
return 0;
}
+void SVGUseElement::invalidateShadowTree()
+{
+ m_needsShadowTreeRecreation = true;
+ setNeedsStyleRecalc();
+}
+
void SVGUseElement::transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to) const
{
ASSERT(from);
@@ -865,19 +951,24 @@ void SVGUseElement::transferUseAttributesToReplacedElement(SVGElement* from, SVG
ExceptionCode ec = 0;
to->removeAttribute(SVGNames::xAttr, ec);
- ASSERT(ec == 0);
+ ASSERT(!ec);
to->removeAttribute(SVGNames::yAttr, ec);
- ASSERT(ec == 0);
+ ASSERT(!ec);
to->removeAttribute(SVGNames::widthAttr, ec);
- ASSERT(ec == 0);
+ ASSERT(!ec);
to->removeAttribute(SVGNames::heightAttr, ec);
- ASSERT(ec == 0);
+ ASSERT(!ec);
to->removeAttribute(XLinkNames::hrefAttr, ec);
- ASSERT(ec == 0);
+ ASSERT(!ec);
+}
+
+bool SVGUseElement::hasRelativeValues() const
+{
+ return x().isRelative() || y().isRelative() || width().isRelative() || height().isRelative();
}
}
diff --git a/WebCore/svg/SVGUseElement.h b/WebCore/svg/SVGUseElement.h
index 45ca783..6fb3925 100644
--- a/WebCore/svg/SVGUseElement.h
+++ b/WebCore/svg/SVGUseElement.h
@@ -32,6 +32,7 @@ namespace WebCore {
class SVGElementInstance;
class SVGLength;
+ class SVGShadowTreeRootElement;
class SVGUseElement : public SVGStyledTransformableElement,
public SVGTests,
@@ -52,11 +53,10 @@ namespace WebCore {
virtual void buildPendingResource();
virtual void parseMappedAttribute(MappedAttribute*);
- virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
-
virtual void svgAttributeChanged(const QualifiedName&);
- virtual void recalcStyle(StyleChange = NoChange);
+ virtual void synchronizeProperty(const QualifiedName&);
+ virtual void recalcStyle(StyleChange = NoChange);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual void attach();
virtual void detach();
@@ -65,20 +65,26 @@ namespace WebCore {
static void removeDisallowedElementsFromSubtree(Node* element);
SVGElementInstance* instanceForShadowTreeElement(Node* element) const;
+ void invalidateShadowTree();
+
+ private:
+ friend class RenderSVGShadowTreeRootContainer;
+ bool isPendingResource() const { return m_isPendingResource; }
+ void buildShadowAndInstanceTree(SVGShadowTreeRootElement*);
private:
- ANIMATED_PROPERTY_DECLARATIONS(SVGUseElement, SVGNames::useTagString, SVGNames::xAttrString, SVGLength, X, x)
- ANIMATED_PROPERTY_DECLARATIONS(SVGUseElement, SVGNames::useTagString, SVGNames::yAttrString, SVGLength, Y, y)
- ANIMATED_PROPERTY_DECLARATIONS(SVGUseElement, SVGNames::useTagString, SVGNames::widthAttrString, SVGLength, Width, width)
- ANIMATED_PROPERTY_DECLARATIONS(SVGUseElement, SVGNames::useTagString, SVGNames::heightAttrString, SVGLength, Height, height)
+ virtual bool hasRelativeValues() const;
+
+ DECLARE_ANIMATED_PROPERTY(SVGUseElement, SVGNames::xAttr, SVGLength, X, x)
+ DECLARE_ANIMATED_PROPERTY(SVGUseElement, SVGNames::yAttr, SVGLength, Y, y)
+ DECLARE_ANIMATED_PROPERTY(SVGUseElement, SVGNames::widthAttr, SVGLength, Width, width)
+ DECLARE_ANIMATED_PROPERTY(SVGUseElement, SVGNames::heightAttr, SVGLength, Height, height)
// SVGURIReference
- ANIMATED_PROPERTY_DECLARATIONS(SVGUseElement, SVGURIReferenceIdentifier, XLinkNames::hrefAttrString, String, Href, href)
+ DECLARE_ANIMATED_PROPERTY(SVGUseElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGUseElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGUseElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
private:
// Instance tree handling
@@ -86,18 +92,13 @@ namespace WebCore {
void handleDeepUseReferencing(SVGUseElement* use, SVGElementInstance* targetInstance, bool& foundCycle);
// Shadow tree handling
- PassRefPtr<SVGSVGElement> buildShadowTreeForSymbolTag(SVGElement* target, SVGElementInstance* targetInstance);
- void alterShadowTreeForSVGTag(SVGElement* target);
-
- void buildShadowTree(SVGElement* target, SVGElementInstance* targetInstance);
+ void buildShadowTree(SVGShadowTreeRootElement*, SVGElement* target, SVGElementInstance* targetInstance);
#if ENABLE(SVG) && ENABLE(SVG_USE)
- void expandUseElementsInShadowTree(Node* element);
- void expandSymbolElementsInShadowTree(Node* element);
+ void expandUseElementsInShadowTree(SVGShadowTreeRootElement*, Node* element);
+ void expandSymbolElementsInShadowTree(SVGShadowTreeRootElement*, Node* element);
#endif
- void attachShadowTree();
-
// "Tree connector"
void associateInstancesWithShadowTreeElements(Node* target, SVGElementInstance* targetInstance);
SVGElementInstance* instanceForShadowTreeElement(Node* element, SVGElementInstance* instance) const;
@@ -105,11 +106,16 @@ namespace WebCore {
void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to) const;
void transferEventListenersToShadowTree(SVGElementInstance* target);
- RefPtr<SVGElement> m_shadowTreeRootElement;
+ void updateContainerOffsets();
+ void updateContainerSizes();
+
+ bool m_isPendingResource;
+ bool m_needsShadowTreeRecreation;
+ String m_resourceId;
RefPtr<SVGElementInstance> m_targetElementInstance;
};
-} // namespace WebCore
+}
-#endif // ENABLE(SVG)
+#endif
#endif
diff --git a/WebCore/svg/SVGViewElement.cpp b/WebCore/svg/SVGViewElement.cpp
index 0fe6a90..aba7283 100644
--- a/WebCore/svg/SVGViewElement.cpp
+++ b/WebCore/svg/SVGViewElement.cpp
@@ -38,9 +38,6 @@ SVGViewElement::SVGViewElement(const QualifiedName& tagName, Document* doc)
, SVGExternalResourcesRequired()
, SVGFitToViewBox()
, SVGZoomAndPan()
- , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false)
- , m_viewBox(this, SVGNames::viewBoxAttr)
- , m_preserveAspectRatio(this, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())
{
}
@@ -70,6 +67,25 @@ void SVGViewElement::parseMappedAttribute(MappedAttribute* attr)
}
}
+void SVGViewElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName()) {
+ synchronizeExternalResourcesRequired();
+ synchronizeViewBox();
+ synchronizePreserveAspectRatio();
+ return;
+ }
+
+ if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
+ synchronizeExternalResourcesRequired();
+ else if (SVGFitToViewBox::isKnownAttribute(attrName)) {
+ synchronizeViewBox();
+ synchronizePreserveAspectRatio();
+ }
+}
+
}
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGViewElement.h b/WebCore/svg/SVGViewElement.h
index 33d0ae3..f913fcd 100644
--- a/WebCore/svg/SVGViewElement.h
+++ b/WebCore/svg/SVGViewElement.h
@@ -39,6 +39,7 @@ namespace WebCore {
virtual ~SVGViewElement();
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
SVGStringList* viewTarget() const;
@@ -46,13 +47,11 @@ namespace WebCore {
private:
// SVGExternalResourcesRequired
- ANIMATED_PROPERTY_DECLARATIONS(SVGViewElement, SVGExternalResourcesRequiredIdentifier,
- SVGNames::externalResourcesRequiredAttrString, bool,
- ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_PROPERTY(SVGViewElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
// SVGFitToViewBox
- ANIMATED_PROPERTY_DECLARATIONS(SVGViewElement, SVGFitToViewBoxIdentifier, SVGNames::viewBoxAttrString, FloatRect, ViewBox, viewBox)
- ANIMATED_PROPERTY_DECLARATIONS(SVGViewElement, SVGFitToViewBoxIdentifier, SVGNames::preserveAspectRatioAttrString, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
+ DECLARE_ANIMATED_PROPERTY(SVGViewElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
+ DECLARE_ANIMATED_PROPERTY(SVGViewElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
mutable RefPtr<SVGStringList> m_viewTarget;
};
diff --git a/WebCore/svg/SVGViewSpec.cpp b/WebCore/svg/SVGViewSpec.cpp
index e6ded33..608bdbf 100644
--- a/WebCore/svg/SVGViewSpec.cpp
+++ b/WebCore/svg/SVGViewSpec.cpp
@@ -35,8 +35,6 @@ SVGViewSpec::SVGViewSpec(const SVGSVGElement* contextElement)
: SVGFitToViewBox()
, SVGZoomAndPan()
, m_contextElement(contextElement)
- , m_viewBox(this, SVGNames::viewBoxAttr)
- , m_preserveAspectRatio(this, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())
, m_transform(SVGTransformList::create(SVGNames::transformAttr))
{
}
@@ -62,9 +60,7 @@ void SVGViewSpec::setViewBoxString(const String& viewBox)
void SVGViewSpec::setPreserveAspectRatioString(const String& preserve)
{
- const UChar* c = preserve.characters();
- const UChar* end = c + preserve.length();
- preserveAspectRatioBaseValue()->parsePreserveAspectRatio(c, end);
+ SVGPreserveAspectRatio::parsePreserveAspectRatio(this, preserve);
}
void SVGViewSpec::setViewTargetString(const String& viewTargetString)
@@ -141,7 +137,9 @@ bool SVGViewSpec::parseViewSpec(const String& viewSpec)
if (currViewSpec >= end || *currViewSpec != '(')
return false;
currViewSpec++;
- if (!preserveAspectRatioBaseValue()->parsePreserveAspectRatio(currViewSpec, end, false))
+ bool result = false;
+ setPreserveAspectRatioBaseValue(SVGPreserveAspectRatio::parsePreserveAspectRatio(currViewSpec, end, false, result));
+ if (!result)
return false;
if (currViewSpec >= end || *currViewSpec != ')')
return false;
@@ -152,7 +150,7 @@ bool SVGViewSpec::parseViewSpec(const String& viewSpec)
if (currViewSpec >= end || *currViewSpec != '(')
return false;
currViewSpec++;
- SVGTransformable::parseTransformAttribute(m_transform.get(), currViewSpec, end);
+ SVGTransformable::parseTransformAttribute(m_transform.get(), currViewSpec, end, SVGTransformable::DoNotClearList);
if (currViewSpec >= end || *currViewSpec != ')')
return false;
currViewSpec++;
diff --git a/WebCore/svg/SVGViewSpec.h b/WebCore/svg/SVGViewSpec.h
index 5f963af..12358dc 100644
--- a/WebCore/svg/SVGViewSpec.h
+++ b/WebCore/svg/SVGViewSpec.h
@@ -52,14 +52,14 @@ namespace WebCore {
String viewTargetString() const { return m_viewTargetString; }
SVGElement* viewTarget() const;
- const SVGSVGElement* contextElement() const { return m_contextElement; }
+ SVGSVGElement* contextElement() const { return const_cast<SVGSVGElement*>(m_contextElement); }
private:
const SVGSVGElement* m_contextElement;
// SVGFitToViewBox
- ANIMATED_PROPERTY_DECLARATIONS(SVGViewSpec, SVGFitToViewBoxIdentifier, SVGNames::viewBoxAttrString, FloatRect, ViewBox, viewBox)
- ANIMATED_PROPERTY_DECLARATIONS(SVGViewSpec, SVGFitToViewBoxIdentifier, SVGNames::preserveAspectRatioAttrString, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
+ DECLARE_ANIMATED_PROPERTY(SVGViewSpec, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
+ DECLARE_ANIMATED_PROPERTY(SVGViewSpec, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
mutable RefPtr<SVGTransformList> m_transform;
String m_viewTargetString;
diff --git a/WebCore/svg/SVGZoomAndPan.idl b/WebCore/svg/SVGZoomAndPan.idl
index 6d69583..bd738f3 100644
--- a/WebCore/svg/SVGZoomAndPan.idl
+++ b/WebCore/svg/SVGZoomAndPan.idl
@@ -26,7 +26,7 @@
module svg {
- interface [Conditional=SVG, GenerateConstructor, ObjCProtocol] SVGZoomAndPan {
+ interface [Conditional=SVG, ObjCProtocol] SVGZoomAndPan {
// Zoom and Pan Types
const unsigned short SVG_ZOOMANDPAN_UNKNOWN = 0;
const unsigned short SVG_ZOOMANDPAN_DISABLE = 1;
diff --git a/WebCore/svg/SynchronizablePropertyController.cpp b/WebCore/svg/SynchronizablePropertyController.cpp
deleted file mode 100644
index be8ab78..0000000
--- a/WebCore/svg/SynchronizablePropertyController.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- Copyright (C) Research In Motion Limited 2009. All rights reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#include "config.h"
-
-#if ENABLE(SVG)
-#include "SynchronizablePropertyController.h"
-
-#include "NamedNodeMap.h"
-#include "Node.h"
-#include "SVGAnimatedProperty.h"
-
-namespace WebCore {
-
-void SynchronizableProperties::addProperty(SVGAnimatedPropertyBase* base)
-{
- m_bases.add(base);
-}
-
-void SynchronizableProperties::synchronize()
-{
- ASSERT(!m_bases.isEmpty());
- if (m_shouldSynchronize) {
- BaseSet::iterator it = m_bases.begin();
- BaseSet::iterator end = m_bases.end();
-
- for (; it != end; ++it) {
- SVGAnimatedPropertyBase* base = *it;
- ASSERT(base);
- base->synchronize();
- }
- }
-}
-
-void SynchronizableProperties::startAnimation()
-{
- ASSERT(!m_bases.isEmpty());
- BaseSet::iterator it = m_bases.begin();
- BaseSet::iterator end = m_bases.end();
-
- for (; it != end; ++it) {
- SVGAnimatedPropertyBase* base = *it;
- ASSERT(base);
- base->startAnimation();
- }
-}
-
-void SynchronizableProperties::stopAnimation()
-{
- ASSERT(!m_bases.isEmpty());
- BaseSet::iterator it = m_bases.begin();
- BaseSet::iterator end = m_bases.end();
-
- for (; it != end; ++it) {
- SVGAnimatedPropertyBase* base = *it;
- ASSERT(base);
- base->stopAnimation();
- }
-}
-
-SynchronizablePropertyController::SynchronizablePropertyController()
-{
-}
-
-void SynchronizablePropertyController::registerProperty(const QualifiedName& attrName, SVGAnimatedPropertyBase* base)
-{
- // 'attrName' is ambigious. For instance in SVGMarkerElement both 'orientType' / 'orientAngle'
- // SVG DOM objects are synchronized with the 'orient' attribute. This why we need a HashSet.
- PropertyMap::iterator it = m_map.find(attrName.localName());
- if (it == m_map.end()) {
- SynchronizableProperties properties;
- properties.addProperty(base);
- m_map.set(attrName.localName(), properties);
- return;
- }
-
- it->second.addProperty(base);
-}
-
-void SynchronizablePropertyController::setPropertyNeedsSynchronization(const QualifiedName& attrName)
-{
- PropertyMap::iterator itProp = m_map.find(attrName.localName());
- ASSERT(itProp != m_map.end());
-
- itProp->second.setNeedsSynchronization();
-}
-
-void SynchronizablePropertyController::synchronizeProperty(const String& name)
-{
- PropertyMap::iterator itProp = m_map.find(name);
- if (itProp == m_map.end())
- return;
-
- itProp->second.synchronize();
-}
-
-void SynchronizablePropertyController::synchronizeAllProperties()
-{
- if (m_map.isEmpty())
- return;
-
- PropertyMap::iterator itProp = m_map.begin();
- PropertyMap::iterator endProp = m_map.end();
-
- for (; itProp != endProp; ++itProp)
- itProp->second.synchronize();
-}
-
-void SynchronizablePropertyController::startAnimation(const String& name)
-{
- PropertyMap::iterator itProp = m_map.find(name);
- if (itProp == m_map.end())
- return;
-
- itProp->second.startAnimation();
-}
-
-void SynchronizablePropertyController::stopAnimation(const String& name)
-{
- PropertyMap::iterator itProp = m_map.find(name);
- if (itProp == m_map.end())
- return;
-
- itProp->second.stopAnimation();
-}
-
-}
-
-#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SynchronizablePropertyController.h b/WebCore/svg/SynchronizablePropertyController.h
deleted file mode 100644
index 1ec5026..0000000
--- a/WebCore/svg/SynchronizablePropertyController.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- Copyright (C) Research In Motion Limited 2009. All rights reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#ifndef SynchronizablePropertyController_h
-#define SynchronizablePropertyController_h
-
-#if ENABLE(SVG)
-#include "StringHash.h"
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/Noncopyable.h>
-
-namespace WebCore {
-
-class QualifiedName;
-class SVGAnimatedPropertyBase;
-
-class SynchronizableProperties {
-public:
- SynchronizableProperties()
- : m_shouldSynchronize(false)
- {
- }
-
- void setNeedsSynchronization()
- {
- m_shouldSynchronize = true;
- }
-
- void addProperty(SVGAnimatedPropertyBase*);
- void synchronize();
- void startAnimation();
- void stopAnimation();
-
-private:
- typedef HashSet<SVGAnimatedPropertyBase*> BaseSet;
-
- BaseSet m_bases;
- bool m_shouldSynchronize;
-};
-
-// Helper class used exclusively by SVGElement to keep track of all animatable properties within a SVGElement,
-// and wheter they are supposed to be synchronized or not (depending wheter AnimatedPropertyTearOff's have been created)
-class SynchronizablePropertyController : public Noncopyable {
-public:
- void registerProperty(const QualifiedName&, SVGAnimatedPropertyBase*);
- void setPropertyNeedsSynchronization(const QualifiedName&);
-
- void synchronizeProperty(const String&);
- void synchronizeAllProperties();
-
- void startAnimation(const String&);
- void stopAnimation(const String&);
-
-private:
- friend class SVGElement;
- SynchronizablePropertyController();
-
-private:
- typedef HashMap<String, SynchronizableProperties> PropertyMap;
-
- PropertyMap m_map;
-};
-
-};
-
-#endif // ENABLE(SVG)
-#endif // SynchronizablePropertyController_h
diff --git a/WebCore/svg/SynchronizableTypeWrapper.h b/WebCore/svg/SynchronizableTypeWrapper.h
deleted file mode 100644
index 12f8426..0000000
--- a/WebCore/svg/SynchronizableTypeWrapper.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- Copyright (C) 2008 Nikolas Zimmermann <zimmermann@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.
-*/
-
-#ifndef SynchronizableTypeWrapper_h
-#define SynchronizableTypeWrapper_h
-
-#if ENABLE(SVG)
-#include <wtf/Noncopyable.h>
-
-namespace WebCore {
-
- template<typename StoredType>
- class SynchronizableTypeWrapperBase : public Noncopyable {
- protected:
- SynchronizableTypeWrapperBase();
-
- template<typename AssignableType>
- void assign(AssignableType type);
-
- bool needsSynchronization() const;
- void setSynchronized();
-
- protected:
- StoredType m_value;
- bool m_needsSynchronization;
- };
-
- template<typename StoredType>
- class SynchronizableTypeWrapper : private SynchronizableTypeWrapperBase<StoredType> {
- public:
- typedef SynchronizableTypeWrapperBase<StoredType> Base;
- SynchronizableTypeWrapper();
-
- // "Forwarding constructors" for primitive type assignment with more than one argument, for exampe SVGLength
- template<typename T1> SynchronizableTypeWrapper(const T1&);
- template<typename T1, typename T2> SynchronizableTypeWrapper(const T1&, const T2&);
- template<typename T1, typename T2, typename T3> SynchronizableTypeWrapper(const T1&, const T2&, const T3&);
-
- SynchronizableTypeWrapper& operator=(const StoredType&);
- operator StoredType() const;
-
- using Base::needsSynchronization;
- using Base::setSynchronized;
-
- private:
- using Base::m_value;
- };
-
- template<typename StoredPointerType>
- class SynchronizableTypeWrapper<RefPtr<StoredPointerType> > : private SynchronizableTypeWrapperBase<RefPtr<StoredPointerType> > {
- public:
- typedef SynchronizableTypeWrapperBase<RefPtr<StoredPointerType> > Base;
- SynchronizableTypeWrapper();
- SynchronizableTypeWrapper(const PassRefPtr<StoredPointerType>&);
-
- SynchronizableTypeWrapper& operator=(StoredPointerType*);
- operator StoredPointerType*() const;
-
- using Base::needsSynchronization;
- using Base::setSynchronized;
-
- private:
- using Base::m_value;
- };
-
- // SynchronizableTypeWrapperBase implementation
- template<typename StoredType>
- inline SynchronizableTypeWrapperBase<StoredType>::SynchronizableTypeWrapperBase()
- : m_value()
- , m_needsSynchronization(false)
- {
- }
-
- template<typename StoredType> template<typename AssignableType>
- inline void SynchronizableTypeWrapperBase<StoredType>::assign(AssignableType type)
- {
- m_value = type;
- m_needsSynchronization = true;
- }
-
- template<typename StoredType>
- inline bool SynchronizableTypeWrapperBase<StoredType>::needsSynchronization() const
- {
- return m_needsSynchronization;
- }
-
- template<typename StoredType>
- inline void SynchronizableTypeWrapperBase<StoredType>::setSynchronized()
- {
- m_needsSynchronization = false;
- }
-
- // SynchronizableTypeWrapper implementation for primitive types
- template<typename StoredType>
- inline SynchronizableTypeWrapper<StoredType>::SynchronizableTypeWrapper()
- : Base()
- {
- }
-
- template<typename StoredType> template<typename T1>
- inline SynchronizableTypeWrapper<StoredType>::SynchronizableTypeWrapper(const T1& arg1)
- : Base()
- {
- m_value = StoredType(arg1);
- }
-
- template<typename StoredType> template<typename T1, typename T2>
- inline SynchronizableTypeWrapper<StoredType>::SynchronizableTypeWrapper(const T1& arg1, const T2& arg2)
- : Base()
- {
- m_value = StoredType(arg1, arg2);
- }
-
- template<typename StoredType> template<typename T1, typename T2, typename T3>
- inline SynchronizableTypeWrapper<StoredType>::SynchronizableTypeWrapper(const T1& arg1, const T2& arg2, const T3& arg3)
- : Base()
- {
- m_value = StoredType(arg1, arg2, arg3);
- }
-
- template<typename StoredType>
- inline SynchronizableTypeWrapper<StoredType>& SynchronizableTypeWrapper<StoredType>::operator=(const StoredType& other)
- {
- Base::assign(other);
- return (*this);
- }
-
- template<typename StoredType>
- inline SynchronizableTypeWrapper<StoredType>::operator StoredType() const
- {
- return m_value;
- }
-
- // SynchronizableTypeWrapper implementation for refcounted types
- template<typename StoredPointerType>
- inline SynchronizableTypeWrapper<RefPtr<StoredPointerType> >::SynchronizableTypeWrapper()
- : Base()
- {
- }
-
- template<typename StoredPointerType>
- inline SynchronizableTypeWrapper<RefPtr<StoredPointerType> >::SynchronizableTypeWrapper(const PassRefPtr<StoredPointerType>& type)
- : Base()
- {
- Base::m_value = type;
- }
-
- template<typename StoredPointerType>
- inline SynchronizableTypeWrapper<RefPtr<StoredPointerType> >& SynchronizableTypeWrapper<RefPtr<StoredPointerType> >::operator=(StoredPointerType* other)
- {
- Base::assign(other);
- return (*this);
- }
-
- template<typename StoredPointerType>
- inline SynchronizableTypeWrapper<RefPtr<StoredPointerType> >::operator StoredPointerType*() const
- {
- return Base::m_value.get();
- }
-
-};
-
-#endif
-#endif
diff --git a/WebCore/svg/animation/SMILTimeContainer.h b/WebCore/svg/animation/SMILTimeContainer.h
index a6a61c0..e11cc6f 100644
--- a/WebCore/svg/animation/SMILTimeContainer.h
+++ b/WebCore/svg/animation/SMILTimeContainer.h
@@ -32,6 +32,7 @@
#include "SMILTime.h"
#include "StringHash.h"
#include "Timer.h"
+#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
diff --git a/WebCore/svg/graphics/SVGImage.cpp b/WebCore/svg/graphics/SVGImage.cpp
index 5f050a4..348df4f 100644
--- a/WebCore/svg/graphics/SVGImage.cpp
+++ b/WebCore/svg/graphics/SVGImage.cpp
@@ -30,6 +30,7 @@
#include "CachedPage.h"
#include "DocumentLoader.h"
+#include "FileChooser.h"
#include "FloatRect.h"
#include "Frame.h"
#include "FrameLoader.h"
@@ -54,7 +55,7 @@
namespace WebCore {
-class SVGImageChromeClient : public EmptyChromeClient {
+class SVGImageChromeClient : public EmptyChromeClient, public Noncopyable {
public:
SVGImageChromeClient(SVGImage* image)
: m_image(image)
@@ -192,7 +193,7 @@ void SVGImage::draw(GraphicsContext* context, const FloatRect& dstRect, const Fl
if (view->needsLayout())
view->layout();
- view->paint(context, enclosingIntRect(srcRect));
+ view->paint(context, IntRect(0, 0, view->width(), view->height()));
if (compositeOp != CompositeSourceOver)
context->endTransparencyLayer();
@@ -267,6 +268,11 @@ bool SVGImage::dataChanged(bool allDataReceived)
return m_page;
}
+String SVGImage::filenameExtension() const
+{
+ return "svg";
+}
+
}
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/graphics/SVGImage.h b/WebCore/svg/graphics/SVGImage.h
index 10f39ba..a0414fe 100644
--- a/WebCore/svg/graphics/SVGImage.h
+++ b/WebCore/svg/graphics/SVGImage.h
@@ -47,6 +47,8 @@ namespace WebCore {
private:
virtual ~SVGImage();
+ virtual String filenameExtension() const;
+
virtual void setContainerSize(const IntSize&);
virtual bool usesContainerSize() const;
virtual bool hasRelativeWidth() const;
diff --git a/WebCore/svg/graphics/SVGPaintServer.cpp b/WebCore/svg/graphics/SVGPaintServer.cpp
index 6b81f72..9d84b0e 100644
--- a/WebCore/svg/graphics/SVGPaintServer.cpp
+++ b/WebCore/svg/graphics/SVGPaintServer.cpp
@@ -57,9 +57,9 @@ TextStream& operator<<(TextStream& ts, const SVGPaintServer& paintServer)
return paintServer.externalRepresentation(ts);
}
-SVGPaintServer* getPaintServerById(Document* document, const AtomicString& id)
+SVGPaintServer* getPaintServerById(Document* document, const AtomicString& id, const RenderObject* object)
{
- SVGResource* resource = getResourceById(document, id);
+ SVGResource* resource = getResourceById(document, id, object);
if (resource && resource->isPaintServer())
return static_cast<SVGPaintServer*>(resource);
@@ -85,7 +85,7 @@ SVGPaintServer* SVGPaintServer::fillPaintServer(const RenderStyle* style, const
if (paintType == SVGPaint::SVG_PAINTTYPE_URI ||
paintType == SVGPaint::SVG_PAINTTYPE_URI_RGBCOLOR) {
AtomicString id(SVGURIReference::getTarget(fill->uri()));
- fillPaintServer = getPaintServerById(item->document(), id);
+ fillPaintServer = getPaintServerById(item->document(), id, item);
SVGElement* svgElement = static_cast<SVGElement*>(item->node());
ASSERT(svgElement && svgElement->document() && svgElement->isStyled());
@@ -126,7 +126,7 @@ SVGPaintServer* SVGPaintServer::strokePaintServer(const RenderStyle* style, cons
if (paintType == SVGPaint::SVG_PAINTTYPE_URI ||
paintType == SVGPaint::SVG_PAINTTYPE_URI_RGBCOLOR) {
AtomicString id(SVGURIReference::getTarget(stroke->uri()));
- strokePaintServer = getPaintServerById(item->document(), id);
+ strokePaintServer = getPaintServerById(item->document(), id, item);
SVGElement* svgElement = static_cast<SVGElement*>(item->node());
ASSERT(svgElement && svgElement->document() && svgElement->isStyled());
diff --git a/WebCore/svg/graphics/SVGPaintServer.h b/WebCore/svg/graphics/SVGPaintServer.h
index 244243c..6e8997c 100644
--- a/WebCore/svg/graphics/SVGPaintServer.h
+++ b/WebCore/svg/graphics/SVGPaintServer.h
@@ -29,6 +29,7 @@
#if ENABLE(SVG)
#include "DashArray.h"
+#include "RenderObject.h"
#include "SVGResource.h"
#if PLATFORM(CG)
@@ -82,7 +83,7 @@ namespace WebCore {
TextStream& operator<<(TextStream&, const SVGPaintServer&);
- SVGPaintServer* getPaintServerById(Document*, const AtomicString&);
+ SVGPaintServer* getPaintServerById(Document*, const AtomicString&, const RenderObject*);
void applyStrokeStyleToContext(GraphicsContext*, RenderStyle*, const RenderObject*);
DashArray dashArrayFromRenderingStyle(const RenderStyle* style, RenderStyle* rootStyle);
diff --git a/WebCore/svg/graphics/SVGPaintServerGradient.cpp b/WebCore/svg/graphics/SVGPaintServerGradient.cpp
index 74e3c22..6c58a82 100644
--- a/WebCore/svg/graphics/SVGPaintServerGradient.cpp
+++ b/WebCore/svg/graphics/SVGPaintServerGradient.cpp
@@ -193,7 +193,7 @@ bool SVGPaintServerGradient::setup(GraphicsContext*& context, const RenderObject
bool isFilled = (type & ApplyToFillTargetType) && style->hasFill();
bool isStroked = (type & ApplyToStrokeTargetType) && style->hasStroke();
- ASSERT(isFilled && !isStroked || !isFilled && isStroked);
+ ASSERT((isFilled && !isStroked) || (!isFilled && isStroked));
context->save();
diff --git a/WebCore/svg/graphics/SVGPaintServerPattern.cpp b/WebCore/svg/graphics/SVGPaintServerPattern.cpp
index 289c40c..28706ba 100644
--- a/WebCore/svg/graphics/SVGPaintServerPattern.cpp
+++ b/WebCore/svg/graphics/SVGPaintServerPattern.cpp
@@ -103,7 +103,7 @@ bool SVGPaintServerPattern::setup(GraphicsContext*& context, const RenderObject*
bool isFilled = (type & ApplyToFillTargetType) && style->hasFill();
bool isStroked = (type & ApplyToStrokeTargetType) && style->hasStroke();
- ASSERT(isFilled && !isStroked || !isFilled && isStroked);
+ ASSERT((isFilled && !isStroked) || (!isFilled && isStroked));
m_ownerElement->buildPattern(targetRect);
if (!tile())
diff --git a/WebCore/svg/graphics/SVGResource.cpp b/WebCore/svg/graphics/SVGResource.cpp
index 514b70d..a071996 100644
--- a/WebCore/svg/graphics/SVGResource.cpp
+++ b/WebCore/svg/graphics/SVGResource.cpp
@@ -31,61 +31,30 @@
#include "RenderPath.h"
#include "SVGElement.h"
#include "SVGStyledElement.h"
+#include <wtf/HashSet.h>
#include <wtf/StdLibExtras.h>
namespace WebCore {
-SVGResource::SVGResource()
+typedef HashSet<SVGResource*> ResourceSet;
+
+static ResourceSet& resourceSet()
{
+ DEFINE_STATIC_LOCAL(ResourceSet, set, ());
+ return set;
}
-struct ResourceSet : Noncopyable {
- ResourceSet()
- {
- for (int i = 0; i < _ResourceTypeCount; i++)
- resources[i] = 0;
- }
- SVGResource* resources[_ResourceTypeCount];
-};
-
-typedef HashMap<SVGStyledElement*, ResourceSet*> ResourceClientMap;
-
-static ResourceClientMap& clientMap()
+SVGResource::SVGResource()
{
- DEFINE_STATIC_LOCAL(ResourceClientMap, map, ());
- return map;
+ ASSERT(!resourceSet().contains(this));
+ resourceSet().add(this);
}
+
SVGResource::~SVGResource()
{
- int type = -1;
- HashSet<SVGStyledElement*>::iterator itr = m_clients.begin();
-
- for (; type < 0 && itr != m_clients.end(); ++itr) {
- ResourceSet* target = clientMap().get(*itr);
- if (!target)
- continue;
-
- for (int i = 0; i < _ResourceTypeCount; i++) {
- if (target->resources[i] != this)
- continue;
- type = i;
- target->resources[i] = 0;
- break;
- }
- }
-
- if (type < 0)
- return;
-
- for (; itr != m_clients.end(); ++itr) {
- ResourceSet* target = clientMap().get(*itr);
- if (!target)
- continue;
-
- if (target->resources[type] == this)
- target->resources[type] = 0;
- }
+ ASSERT(resourceSet().contains(this));
+ resourceSet().remove(this);
}
void SVGResource::invalidate()
@@ -120,20 +89,15 @@ void SVGResource::invalidateClients(HashSet<SVGStyledElement*> clients)
void SVGResource::removeClient(SVGStyledElement* item)
{
- ResourceClientMap::iterator resourcePtr = clientMap().find(item);
- if (resourcePtr == clientMap().end())
- return;
-
- ResourceSet* set = resourcePtr->second;
- ASSERT(set);
-
- clientMap().remove(resourcePtr);
-
- for (int i = 0; i < _ResourceTypeCount; i++)
- if (set->resources[i])
- set->resources[i]->m_clients.remove(item);
-
- delete set;
+ ResourceSet::iterator it = resourceSet().begin();
+ ResourceSet::iterator end = resourceSet().end();
+
+ for (; it != end; ++it) {
+ SVGResource* resource = *it;
+ if (!resource->m_clients.contains(item))
+ continue;
+ resource->m_clients.remove(item);
+ }
}
void SVGResource::addClient(SVGStyledElement* item)
@@ -142,17 +106,6 @@ void SVGResource::addClient(SVGStyledElement* item)
return;
m_clients.add(item);
-
- ResourceSet* target = clientMap().get(item);
- if (!target)
- target = new ResourceSet;
-
- SVGResourceType type = resourceType();
- if (SVGResource* oldResource = target->resources[type])
- oldResource->m_clients.remove(item);
-
- target->resources[type] = this;
- clientMap().set(item, target);
}
TextStream& SVGResource::externalRepresentation(TextStream& ts) const
@@ -160,7 +113,7 @@ TextStream& SVGResource::externalRepresentation(TextStream& ts) const
return ts;
}
-SVGResource* getResourceById(Document* document, const AtomicString& id)
+SVGResource* getResourceById(Document* document, const AtomicString& id, const RenderObject* object)
{
if (id.isEmpty())
return 0;
@@ -171,7 +124,7 @@ SVGResource* getResourceById(Document* document, const AtomicString& id)
svgElement = static_cast<SVGElement*>(element);
if (svgElement && svgElement->isStyled())
- return static_cast<SVGStyledElement*>(svgElement)->canvasResource();
+ return static_cast<SVGStyledElement*>(svgElement)->canvasResource(object);
return 0;
}
diff --git a/WebCore/svg/graphics/SVGResource.h b/WebCore/svg/graphics/SVGResource.h
index 7ee98f6..8f303b5 100644
--- a/WebCore/svg/graphics/SVGResource.h
+++ b/WebCore/svg/graphics/SVGResource.h
@@ -28,6 +28,7 @@
#if ENABLE(SVG)
#include "PlatformString.h"
+#include "RenderObject.h"
#include "StringHash.h"
#include <wtf/HashMap.h>
@@ -91,7 +92,7 @@ namespace WebCore {
HashSet<SVGStyledElement*> m_clients;
};
- SVGResource* getResourceById(Document*, const AtomicString&);
+ SVGResource* getResourceById(Document*, const AtomicString&, const RenderObject*);
TextStream& operator<<(TextStream&, const SVGResource&);
diff --git a/WebCore/svg/graphics/SVGResourceClipper.cpp b/WebCore/svg/graphics/SVGResourceClipper.cpp
index 5998afb..c0fccaf 100644
--- a/WebCore/svg/graphics/SVGResourceClipper.cpp
+++ b/WebCore/svg/graphics/SVGResourceClipper.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
+ * (C) 2009 Dirk Schulze <krit@webkit.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,9 +29,9 @@
#if ENABLE(SVG)
#include "SVGResourceClipper.h"
-#include "TransformationMatrix.h"
#include "GraphicsContext.h"
#include "SVGRenderTreeAsText.h"
+#include "TransformationMatrix.h"
#if PLATFORM(CG)
#include <ApplicationServices/ApplicationServices.h>
@@ -50,6 +51,36 @@ SVGResourceClipper::~SVGResourceClipper()
void SVGResourceClipper::resetClipData()
{
m_clipData.clear();
+ m_clipperBoundingBox = FloatRect();
+}
+
+void SVGResourceClipper::invalidate()
+{
+ SVGResource::invalidate();
+ resetClipData();
+}
+
+FloatRect SVGResourceClipper::clipperBoundingBox(const FloatRect& objectBoundingBox)
+{
+ // FIXME: We need a different calculation for other clip content than paths.
+ if (!m_clipperBoundingBox.isEmpty())
+ return m_clipperBoundingBox;
+
+ if (m_clipData.clipData().isEmpty())
+ return FloatRect();
+
+ for (unsigned x = 0; x < m_clipData.clipData().size(); x++) {
+ ClipData clipData = m_clipData.clipData()[x];
+
+ FloatRect clipPathRect = clipData.path.boundingRect();
+ if (clipData.bboxUnits) {
+ clipPathRect.scale(objectBoundingBox.width(), objectBoundingBox.height());
+ clipPathRect.move(objectBoundingBox.x(), objectBoundingBox.y());
+ }
+ m_clipperBoundingBox.unite(clipPathRect);
+ }
+
+ return m_clipperBoundingBox;
}
void SVGResourceClipper::applyClip(GraphicsContext* context, const FloatRect& boundingBox) const
@@ -125,9 +156,9 @@ TextStream& operator<<(TextStream& ts, const ClipData& d)
return ts;
}
-SVGResourceClipper* getClipperById(Document* document, const AtomicString& id)
+SVGResourceClipper* getClipperById(Document* document, const AtomicString& id, const RenderObject* object)
{
- SVGResource* resource = getResourceById(document, id);
+ SVGResource* resource = getResourceById(document, id, object);
if (resource && resource->isClipper())
return static_cast<SVGResourceClipper*>(resource);
diff --git a/WebCore/svg/graphics/SVGResourceClipper.h b/WebCore/svg/graphics/SVGResourceClipper.h
index 98c295f..df5562d 100644
--- a/WebCore/svg/graphics/SVGResourceClipper.h
+++ b/WebCore/svg/graphics/SVGResourceClipper.h
@@ -27,9 +27,10 @@
#define SVGResourceClipper_h
#if ENABLE(SVG)
-
-#include "SVGResource.h"
+#include "FloatRect.h"
#include "Path.h"
+#include "RenderObject.h"
+#include "SVGResource.h"
namespace WebCore {
@@ -65,7 +66,9 @@ namespace WebCore {
public:
static PassRefPtr<SVGResourceClipper> create() { return adoptRef(new SVGResourceClipper); }
virtual ~SVGResourceClipper();
-
+
+ virtual void invalidate();
+
void resetClipData();
void addClipData(const Path&, WindRule, bool bboxUnits);
@@ -76,15 +79,17 @@ namespace WebCore {
// To be implemented by the specific rendering devices
void applyClip(GraphicsContext*, const FloatRect& boundingBox) const;
+ FloatRect clipperBoundingBox(const FloatRect& oob);
private:
SVGResourceClipper();
ClipDataList m_clipData;
+ FloatRect m_clipperBoundingBox;
};
TextStream& operator<<(TextStream&, WindRule);
TextStream& operator<<(TextStream&, const ClipData&);
- SVGResourceClipper* getClipperById(Document*, const AtomicString&);
+ SVGResourceClipper* getClipperById(Document*, const AtomicString&, const RenderObject*);
} // namespace WebCore
diff --git a/WebCore/svg/graphics/SVGResourceFilter.cpp b/WebCore/svg/graphics/SVGResourceFilter.cpp
index fcf0e40..72ae203 100644
--- a/WebCore/svg/graphics/SVGResourceFilter.cpp
+++ b/WebCore/svg/graphics/SVGResourceFilter.cpp
@@ -32,6 +32,7 @@
#include "SVGFilter.h"
#include "SVGFilterBuilder.h"
#include "SVGFilterElement.h"
+#include "SVGRenderSupport.h"
#include "SVGRenderTreeAsText.h"
#include "SVGFilterPrimitiveStandardAttributes.h"
@@ -52,17 +53,21 @@ SVGResourceFilter::SVGResourceFilter(const SVGFilterElement* ownerElement)
, m_savedContext(0)
, m_sourceGraphicBuffer(0)
{
- m_filterBuilder.set(new SVGFilterBuilder());
+ m_filterBuilder.set(new SVGFilterBuilder());
}
SVGResourceFilter::~SVGResourceFilter()
{
}
-static inline bool shouldProcessFilter(SVGResourceFilter* filter)
+FloatRect SVGResourceFilter::filterBoundingBox(const FloatRect& obb) const
{
- return (!filter->scaleX() || !filter->scaleY() || !filter->filterBoundingBox().width()
- || !filter->filterBoundingBox().height());
+ return m_ownerElement->filterBoundingBox(obb);
+}
+
+static inline bool shouldProcessFilter(SVGResourceFilter* filter, const FloatRect& filterRect)
+{
+ return (!filter->scaleX() || !filter->scaleY() || !filterRect.width() || !filterRect.height());
}
void SVGResourceFilter::addFilterEffect(SVGFilterPrimitiveStandardAttributes* effectAttributes, PassRefPtr<FilterEffect> effect)
@@ -86,16 +91,21 @@ bool SVGResourceFilter::fitsInMaximumImageSize(const FloatSize& size)
return matchesFilterSize;
}
-void SVGResourceFilter::prepareFilter(GraphicsContext*& context, const RenderObject* object)
+bool SVGResourceFilter::prepareFilter(GraphicsContext*& context, const RenderObject* object)
{
- FloatRect targetRect = object->objectBoundingBox();
- m_ownerElement->buildFilter(targetRect);
+ m_ownerElement->buildFilter(object->objectBoundingBox());
+ const SVGRenderBase* renderer = object->toSVGRenderBase();
+ if (!renderer)
+ return false;
- if (shouldProcessFilter(this))
- return;
+ FloatRect paintRect = renderer->strokeBoundingBox();
+ paintRect.unite(renderer->markerBoundingBox());
+
+ if (shouldProcessFilter(this, m_filterBBox))
+ return false;
// clip sourceImage to filterRegion
- FloatRect clippedSourceRect = targetRect;
+ FloatRect clippedSourceRect = paintRect;
clippedSourceRect.intersect(m_filterBBox);
// scale filter size to filterRes
@@ -110,7 +120,7 @@ void SVGResourceFilter::prepareFilter(GraphicsContext*& context, const RenderObj
fitsInMaximumImageSize(tempSourceRect.size());
// prepare Filters
- m_filter = SVGFilter::create(targetRect, m_filterBBox, m_effectBBoxMode);
+ m_filter = SVGFilter::create(paintRect, m_filterBBox, m_effectBBoxMode);
m_filter->setFilterResolution(FloatSize(m_scaleX, m_scaleY));
FilterEffect* lastEffect = m_filterBuilder->lastEffect();
@@ -122,7 +132,8 @@ void SVGResourceFilter::prepareFilter(GraphicsContext*& context, const RenderObj
m_filter->setFilterResolution(FloatSize(m_scaleX, m_scaleY));
lastEffect->calculateEffectRect(m_filter.get());
}
- }
+ } else
+ return false;
clippedSourceRect.scale(m_scaleX, m_scaleY);
@@ -132,23 +143,21 @@ void SVGResourceFilter::prepareFilter(GraphicsContext*& context, const RenderObj
OwnPtr<ImageBuffer> sourceGraphic(ImageBuffer::create(bufferRect.size(), LinearRGB));
if (!sourceGraphic.get())
- return;
+ return false;
GraphicsContext* sourceGraphicContext = sourceGraphic->context();
+ sourceGraphicContext->translate(-clippedSourceRect.x(), -clippedSourceRect.y());
sourceGraphicContext->scale(FloatSize(m_scaleX, m_scaleY));
- sourceGraphicContext->translate(-targetRect.x(), -targetRect.y());
- sourceGraphicContext->clearRect(FloatRect(FloatPoint(), targetRect.size()));
+ sourceGraphicContext->clearRect(FloatRect(FloatPoint(), paintRect.size()));
m_sourceGraphicBuffer.set(sourceGraphic.release());
m_savedContext = context;
context = sourceGraphicContext;
+ return true;
}
void SVGResourceFilter::applyFilter(GraphicsContext*& context, const RenderObject* object)
{
- if (shouldProcessFilter(this))
- return;
-
if (!m_savedContext)
return;
@@ -204,9 +213,9 @@ TextStream& SVGResourceFilter::externalRepresentation(TextStream& ts) const
return ts;
}
-SVGResourceFilter* getFilterById(Document* document, const AtomicString& id)
+SVGResourceFilter* getFilterById(Document* document, const AtomicString& id, const RenderObject* object)
{
- SVGResource* resource = getResourceById(document, id);
+ SVGResource* resource = getResourceById(document, id, object);
if (resource && resource->isFilter())
return static_cast<SVGResourceFilter*>(resource);
diff --git a/WebCore/svg/graphics/SVGResourceFilter.h b/WebCore/svg/graphics/SVGResourceFilter.h
index ffd926d..ee8627c 100644
--- a/WebCore/svg/graphics/SVGResourceFilter.h
+++ b/WebCore/svg/graphics/SVGResourceFilter.h
@@ -68,10 +68,10 @@ public:
float scaleX() const { return m_scaleX; }
float scaleY() const { return m_scaleY; }
- FloatRect filterBoundingBox() { return m_filterBBox; }
+ FloatRect filterBoundingBox(const FloatRect& obb) const;
void setFilterBoundingBox(const FloatRect& rect) { m_filterBBox = rect; }
- void prepareFilter(GraphicsContext*&, const RenderObject*);
+ bool prepareFilter(GraphicsContext*&, const RenderObject*);
void applyFilter(GraphicsContext*&, const RenderObject*);
bool fitsInMaximumImageSize(const FloatSize&);
@@ -103,7 +103,7 @@ private:
RefPtr<Filter> m_filter;
};
-SVGResourceFilter* getFilterById(Document*, const AtomicString&);
+SVGResourceFilter* getFilterById(Document*, const AtomicString&, const RenderObject*);
} // namespace WebCore
diff --git a/WebCore/svg/graphics/SVGResourceMarker.cpp b/WebCore/svg/graphics/SVGResourceMarker.cpp
index 112e4d6..955c048 100644
--- a/WebCore/svg/graphics/SVGResourceMarker.cpp
+++ b/WebCore/svg/graphics/SVGResourceMarker.cpp
@@ -38,10 +38,8 @@ namespace WebCore {
SVGResourceMarker::SVGResourceMarker()
: SVGResource()
- , m_refX(0.0)
- , m_refY(0.0)
, m_angle(-1) // just like using setAutoAngle()
- , m_marker(0)
+ , m_renderer(0)
, m_useStrokeWidth(true)
{
}
@@ -50,20 +48,20 @@ SVGResourceMarker::~SVGResourceMarker()
{
}
-void SVGResourceMarker::setMarker(RenderSVGViewportContainer* marker)
+TransformationMatrix SVGResourceMarker::markerTransformation(const FloatPoint& origin, float angle, float strokeWidth) const
{
- m_marker = marker;
-}
+ ASSERT(m_renderer);
-void SVGResourceMarker::setRef(double refX, double refY)
-{
- m_refX = refX;
- m_refY = refY;
+ TransformationMatrix transform;
+ transform.translate(origin.x(), origin.y());
+ transform.rotate(m_angle == -1 ? angle : m_angle);
+ transform = m_renderer->markerContentTransformation(transform, m_referencePoint, m_useStrokeWidth ? strokeWidth : -1);
+ return transform;
}
-void SVGResourceMarker::draw(GraphicsContext* context, const FloatRect& rect, double x, double y, double strokeWidth, double angle)
+void SVGResourceMarker::draw(RenderObject::PaintInfo& paintInfo, const TransformationMatrix& transform)
{
- if (!m_marker)
+ if (!m_renderer)
return;
DEFINE_STATIC_LOCAL(HashSet<SVGResourceMarker*>, currentlyDrawingMarkers, ());
@@ -73,45 +71,18 @@ void SVGResourceMarker::draw(GraphicsContext* context, const FloatRect& rect, do
return;
currentlyDrawingMarkers.add(this);
-
- TransformationMatrix transform;
- transform.translate(x, y);
- transform.rotate(m_angle > -1 ? m_angle : angle);
-
- // refX and refY are given in coordinates relative to the viewport established by the marker, yet they affect
- // the translation performed on the viewport itself.
- TransformationMatrix viewportTransform;
- if (m_useStrokeWidth)
- viewportTransform.scaleNonUniform(strokeWidth, strokeWidth);
- viewportTransform *= m_marker->viewportTransform();
- double refX, refY;
- viewportTransform.map(m_refX, m_refY, refX, refY);
- transform.translate(-refX, -refY);
-
- if (m_useStrokeWidth)
- transform.scaleNonUniform(strokeWidth, strokeWidth);
-
- // FIXME: PaintInfo should be passed into this method instead of being created here
- // FIXME: bounding box fractions are lost
- RenderObject::PaintInfo info(context, enclosingIntRect(rect), PaintPhaseForeground, 0, 0, 0);
-
- context->save();
- context->concatCTM(transform);
- m_marker->setDrawsContents(true);
- m_marker->paint(info, 0, 0);
- m_marker->setDrawsContents(false);
- context->restore();
-
- m_cachedBounds = transform.mapRect(m_marker->absoluteClippedOverflowRect());
+ ASSERT(!m_renderer->drawsContents());
+ RenderObject::PaintInfo info(paintInfo);
+ info.context->save();
+ applyTransformToPaintInfo(info, transform);
+ m_renderer->setDrawsContents(true);
+ m_renderer->paint(info, 0, 0);
+ m_renderer->setDrawsContents(false);
+ info.context->restore();
currentlyDrawingMarkers.remove(this);
}
-FloatRect SVGResourceMarker::cachedBounds() const
-{
- return m_cachedBounds;
-}
-
TextStream& SVGResourceMarker::externalRepresentation(TextStream& ts) const
{
ts << "[type=MARKER]"
@@ -122,13 +93,13 @@ TextStream& SVGResourceMarker::externalRepresentation(TextStream& ts) const
else
ts << angle() << "]";
- ts << " [ref x=" << refX() << " y=" << refY() << "]";
+ ts << " [ref x=" << m_referencePoint.x() << " y=" << m_referencePoint.y() << "]";
return ts;
}
-SVGResourceMarker* getMarkerById(Document* document, const AtomicString& id)
+SVGResourceMarker* getMarkerById(Document* document, const AtomicString& id, const RenderObject* object)
{
- SVGResource* resource = getResourceById(document, id);
+ SVGResource* resource = getResourceById(document, id, object);
if (resource && resource->isMarker())
return static_cast<SVGResourceMarker*>(resource);
diff --git a/WebCore/svg/graphics/SVGResourceMarker.h b/WebCore/svg/graphics/SVGResourceMarker.h
index bb4039c..5c98d2f 100644
--- a/WebCore/svg/graphics/SVGResourceMarker.h
+++ b/WebCore/svg/graphics/SVGResourceMarker.h
@@ -27,25 +27,26 @@
#define SVGResourceMarker_h
#if ENABLE(SVG)
-
+#include "FloatPoint.h"
#include "FloatRect.h"
+#include "RenderObject.h"
#include "SVGResource.h"
namespace WebCore {
- class GraphicsContext;
class RenderSVGViewportContainer;
+ class TransformationMatrix;
class SVGResourceMarker : public SVGResource {
public:
static PassRefPtr<SVGResourceMarker> create() { return adoptRef(new SVGResourceMarker); }
virtual ~SVGResourceMarker();
- void setMarker(RenderSVGViewportContainer*);
+ RenderSVGViewportContainer* renderer() const { return m_renderer; }
+ void setRenderer(RenderSVGViewportContainer* marker) { m_renderer = marker; }
- void setRef(double refX, double refY);
- double refX() const { return m_refX; }
- double refY() const { return m_refY; }
+ void setReferencePoint(const FloatPoint& point) { m_referencePoint = point; }
+ FloatPoint referencePoint() const { return m_referencePoint; }
void setAngle(float angle) { m_angle = angle; }
void setAutoAngle() { m_angle = -1; }
@@ -54,22 +55,22 @@ namespace WebCore {
void setUseStrokeWidth(bool useStrokeWidth = true) { m_useStrokeWidth = useStrokeWidth; }
bool useStrokeWidth() const { return m_useStrokeWidth; }
- FloatRect cachedBounds() const;
- void draw(GraphicsContext*, const FloatRect&, double x, double y, double strokeWidth = 1, double angle = 0);
-
+ TransformationMatrix markerTransformation(const FloatPoint& origin, float angle, float strokeWidth) const;
+ void draw(RenderObject::PaintInfo&, const TransformationMatrix&);
+
virtual SVGResourceType resourceType() const { return MarkerResourceType; }
virtual TextStream& externalRepresentation(TextStream&) const;
private:
SVGResourceMarker();
- double m_refX, m_refY;
- FloatRect m_cachedBounds;
+
+ FloatPoint m_referencePoint;
float m_angle;
- RenderSVGViewportContainer* m_marker;
+ RenderSVGViewportContainer* m_renderer;
bool m_useStrokeWidth;
};
- SVGResourceMarker* getMarkerById(Document*, const AtomicString&);
+ SVGResourceMarker* getMarkerById(Document*, const AtomicString&, const RenderObject*);
} // namespace WebCore
diff --git a/WebCore/svg/graphics/SVGResourceMasker.cpp b/WebCore/svg/graphics/SVGResourceMasker.cpp
index 97467c1..18bc71a 100644
--- a/WebCore/svg/graphics/SVGResourceMasker.cpp
+++ b/WebCore/svg/graphics/SVGResourceMasker.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
+ * 2009 Dirk Schulze <krit@webkit.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -33,13 +34,12 @@
#include "ImageBuffer.h"
#include "ImageData.h"
#include "GraphicsContext.h"
+#include "RenderObject.h"
#include "SVGMaskElement.h"
#include "SVGRenderSupport.h"
#include "SVGRenderStyle.h"
#include "TextStream.h"
-#include <wtf/ByteArray.h>
-
using namespace std;
namespace WebCore {
@@ -47,6 +47,7 @@ namespace WebCore {
SVGResourceMasker::SVGResourceMasker(const SVGMaskElement* ownerElement)
: SVGResource()
, m_ownerElement(ownerElement)
+ , m_emptyMask(false)
{
}
@@ -58,44 +59,24 @@ void SVGResourceMasker::invalidate()
{
SVGResource::invalidate();
m_mask.clear();
+ m_emptyMask = false;
}
-void SVGResourceMasker::applyMask(GraphicsContext* context, const FloatRect& boundingBox)
+FloatRect SVGResourceMasker::maskerBoundingBox(const FloatRect& objectBoundingBox) const
{
- if (!m_mask)
- m_mask = m_ownerElement->drawMaskerContent(boundingBox, m_maskRect);
-
- if (!m_mask)
- return;
-
- IntSize imageSize(m_mask->size());
- IntRect intImageRect(0, 0, imageSize.width(), imageSize.height());
-
- // Create new ImageBuffer to apply luminance
- OwnPtr<ImageBuffer> luminancedImage = ImageBuffer::create(imageSize);
- if (!luminancedImage)
- return;
-
- PassRefPtr<CanvasPixelArray> srcPixelArray(m_mask->getUnmultipliedImageData(intImageRect)->data());
- PassRefPtr<ImageData> destImageData(luminancedImage->getUnmultipliedImageData(intImageRect));
-
- for (unsigned pixelOffset = 0; pixelOffset < srcPixelArray->length(); pixelOffset++) {
- unsigned pixelByteOffset = pixelOffset * 4;
-
- unsigned char r = 0, g = 0, b = 0, a = 0;
- srcPixelArray->get(pixelByteOffset, r);
- srcPixelArray->get(pixelByteOffset + 1, g);
- srcPixelArray->get(pixelByteOffset + 2, b);
- srcPixelArray->get(pixelByteOffset + 3, a);
-
- double luma = (r * 0.2125 + g * 0.7154 + b * 0.0721) * ((double)a / 255.0);
+ return m_ownerElement->maskBoundingBox(objectBoundingBox);
+}
- destImageData->data()->set(pixelByteOffset + 3, luma);
- }
+bool SVGResourceMasker::applyMask(GraphicsContext* context, const RenderObject* object)
+{
+ if (!m_mask && !m_emptyMask)
+ m_mask = m_ownerElement->drawMaskerContent(object, m_maskRect, m_emptyMask);
- luminancedImage->putUnmultipliedImageData(destImageData.get(), intImageRect, IntPoint(0, 0));
+ if (!m_mask)
+ return false;
- context->clipToImageBuffer(m_maskRect, luminancedImage.get());
+ context->clipToImageBuffer(m_maskRect, m_mask.get());
+ return true;
}
TextStream& SVGResourceMasker::externalRepresentation(TextStream& ts) const
@@ -104,9 +85,9 @@ TextStream& SVGResourceMasker::externalRepresentation(TextStream& ts) const
return ts;
}
-SVGResourceMasker* getMaskerById(Document* document, const AtomicString& id)
+SVGResourceMasker* getMaskerById(Document* document, const AtomicString& id, const RenderObject* object)
{
- SVGResource* resource = getResourceById(document, id);
+ SVGResource* resource = getResourceById(document, id, object);
if (resource && resource->isMasker())
return static_cast<SVGResourceMasker*>(resource);
diff --git a/WebCore/svg/graphics/SVGResourceMasker.h b/WebCore/svg/graphics/SVGResourceMasker.h
index f945f56..27364c2 100644
--- a/WebCore/svg/graphics/SVGResourceMasker.h
+++ b/WebCore/svg/graphics/SVGResourceMasker.h
@@ -29,6 +29,8 @@
#if ENABLE(SVG)
#include "GraphicsContext.h"
+#include "RenderObject.h"
+#include "SVGMaskElement.h"
#include "SVGResource.h"
#include <memory>
@@ -52,8 +54,8 @@ namespace WebCore {
virtual SVGResourceType resourceType() const { return MaskerResourceType; }
virtual TextStream& externalRepresentation(TextStream&) const;
- // To be implemented by the specific rendering devices
- void applyMask(GraphicsContext*, const FloatRect& boundingBox);
+ FloatRect maskerBoundingBox(const FloatRect&) const;
+ bool applyMask(GraphicsContext*, const RenderObject*);
private:
SVGResourceMasker(const SVGMaskElement*);
@@ -62,9 +64,10 @@ namespace WebCore {
OwnPtr<ImageBuffer> m_mask;
FloatRect m_maskRect;
+ bool m_emptyMask;
};
- SVGResourceMasker* getMaskerById(Document*, const AtomicString&);
+ SVGResourceMasker* getMaskerById(Document*, const AtomicString&, const RenderObject* object);
} // namespace WebCore
diff --git a/WebCore/svg/graphics/filters/SVGFEImage.cpp b/WebCore/svg/graphics/filters/SVGFEImage.cpp
index e82328a..331de4f 100644
--- a/WebCore/svg/graphics/filters/SVGFEImage.cpp
+++ b/WebCore/svg/graphics/filters/SVGFEImage.cpp
@@ -2,6 +2,7 @@
Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
2004, 2005 Rob Buis <buis@kde.org>
2005 Eric Seidel <eric@webkit.org>
+ 2010 Dirk Schulze <krit@webkit.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -23,50 +24,42 @@
#if ENABLE(SVG) && ENABLE(FILTERS)
#include "SVGFEImage.h"
-#include "SVGRenderTreeAsText.h"
+
#include "Filter.h"
+#include "GraphicsContext.h"
+#include "SVGPreserveAspectRatio.h"
+#include "SVGRenderTreeAsText.h"
+#include "TransformationMatrix.h"
namespace WebCore {
-FEImage::FEImage(CachedImage* cachedImage)
+FEImage::FEImage(RefPtr<Image> image, SVGPreserveAspectRatio preserveAspectRatio)
: FilterEffect()
- , m_cachedImage(cachedImage)
+ , m_image(image)
+ , m_preserveAspectRatio(preserveAspectRatio)
{
- m_cachedImage->addClient(this);
}
-PassRefPtr<FEImage> FEImage::create(CachedImage* cachedImage)
+PassRefPtr<FEImage> FEImage::create(RefPtr<Image> image, SVGPreserveAspectRatio preserveAspectRatio)
{
- return adoptRef(new FEImage(cachedImage));
+ return adoptRef(new FEImage(image, preserveAspectRatio));
}
-FEImage::~FEImage()
-{
- if (m_cachedImage)
- m_cachedImage->removeClient(this);
-}
-
-CachedImage* FEImage::cachedImage() const
+void FEImage::apply(Filter*)
{
- return m_cachedImage.get();
-}
+ if (!m_image.get())
+ return;
-void FEImage::setCachedImage(CachedImage* image)
-{
- if (m_cachedImage == image)
+ GraphicsContext* filterContext = getEffectContext();
+ if (!filterContext)
return;
-
- if (m_cachedImage)
- m_cachedImage->removeClient(this);
- m_cachedImage = image;
+ FloatRect srcRect(FloatPoint(), m_image->size());
+ FloatRect destRect(FloatPoint(), subRegion().size());
- if (m_cachedImage)
- m_cachedImage->addClient(this);
-}
+ m_preserveAspectRatio.transformRect(destRect, srcRect);
-void FEImage::apply(Filter*)
-{
+ filterContext->drawImage(m_image.get(), DeviceColorSpace, destRect, srcRect);
}
void FEImage::dump()
diff --git a/WebCore/svg/graphics/filters/SVGFEImage.h b/WebCore/svg/graphics/filters/SVGFEImage.h
index f29d266..0883aad 100644
--- a/WebCore/svg/graphics/filters/SVGFEImage.h
+++ b/WebCore/svg/graphics/filters/SVGFEImage.h
@@ -2,6 +2,7 @@
Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
2004, 2005 Rob Buis <buis@kde.org>
2005 Eric Seidel <eric@webkit.org>
+ 2010 Dirk Schulze <krit@webkit.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -23,33 +24,26 @@
#define SVGFEImage_h
#if ENABLE(SVG) && ENABLE(FILTERS)
-#include "CachedImage.h"
-#include "CachedResourceClient.h"
-#include "CachedResourceHandle.h"
+#include "Image.h"
#include "FilterEffect.h"
#include "Filter.h"
+#include "SVGPreserveAspectRatio.h"
namespace WebCore {
- class FEImage : public FilterEffect
- , public CachedResourceClient {
+ class FEImage : public FilterEffect {
public:
- static PassRefPtr<FEImage> create(CachedImage*);
- virtual ~FEImage();
-
- // FIXME: We need to support <svg> (RenderObject*) as well as image data.
-
- CachedImage* cachedImage() const;
- void setCachedImage(CachedImage*);
+ static PassRefPtr<FEImage> create(RefPtr<Image>, SVGPreserveAspectRatio);
void apply(Filter*);
void dump();
TextStream& externalRepresentation(TextStream& ts) const;
private:
- FEImage(CachedImage*);
+ FEImage(RefPtr<Image>, SVGPreserveAspectRatio);
- CachedResourceHandle<CachedImage> m_cachedImage;
+ RefPtr<Image> m_image;
+ SVGPreserveAspectRatio m_preserveAspectRatio;
};
} // namespace WebCore
diff --git a/WebCore/svg/graphics/filters/SVGFEMerge.cpp b/WebCore/svg/graphics/filters/SVGFEMerge.cpp
index 3f9ad38..6ea0fb9 100644
--- a/WebCore/svg/graphics/filters/SVGFEMerge.cpp
+++ b/WebCore/svg/graphics/filters/SVGFEMerge.cpp
@@ -30,23 +30,23 @@
namespace WebCore {
-FEMerge::FEMerge(const Vector<FilterEffect*>& mergeInputs)
+FEMerge::FEMerge(const Vector<RefPtr<FilterEffect> >& mergeInputs)
: FilterEffect()
, m_mergeInputs(mergeInputs)
{
}
-PassRefPtr<FEMerge> FEMerge::create(const Vector<FilterEffect*>& mergeInputs)
+PassRefPtr<FEMerge> FEMerge::create(const Vector<RefPtr<FilterEffect> >& mergeInputs)
{
return adoptRef(new FEMerge(mergeInputs));
}
-const Vector<FilterEffect*>& FEMerge::mergeInputs() const
+const Vector<RefPtr<FilterEffect> >& FEMerge::mergeInputs() const
{
return m_mergeInputs;
}
-void FEMerge::setMergeInputs(const Vector<FilterEffect*>& mergeInputs)
+void FEMerge::setMergeInputs(const Vector<RefPtr<FilterEffect> >& mergeInputs)
{
m_mergeInputs = mergeInputs;
}
diff --git a/WebCore/svg/graphics/filters/SVGFEMerge.h b/WebCore/svg/graphics/filters/SVGFEMerge.h
index 02fbfac..7653be3 100644
--- a/WebCore/svg/graphics/filters/SVGFEMerge.h
+++ b/WebCore/svg/graphics/filters/SVGFEMerge.h
@@ -31,10 +31,10 @@ namespace WebCore {
class FEMerge : public FilterEffect {
public:
- static PassRefPtr<FEMerge> create(const Vector<FilterEffect*>&);
+ static PassRefPtr<FEMerge> create(const Vector<RefPtr<FilterEffect> >&);
- const Vector<FilterEffect*>& mergeInputs() const;
- void setMergeInputs(const Vector<FilterEffect*>& mergeInputs);
+ const Vector<RefPtr<FilterEffect> >& mergeInputs() const;
+ void setMergeInputs(const Vector<RefPtr<FilterEffect> >& mergeInputs);
virtual FloatRect uniteChildEffectSubregions(Filter*);
void apply(Filter*);
@@ -42,9 +42,9 @@ namespace WebCore {
TextStream& externalRepresentation(TextStream& ts) const;
private:
- FEMerge(const Vector<FilterEffect*>&);
+ FEMerge(const Vector<RefPtr<FilterEffect> >&);
- Vector<FilterEffect*> m_mergeInputs;
+ Vector<RefPtr<FilterEffect> > m_mergeInputs;
};
} // namespace WebCore
diff --git a/WebCore/svg/graphics/filters/SVGFEMorphology.cpp b/WebCore/svg/graphics/filters/SVGFEMorphology.cpp
index 20d109a..987350d 100644
--- a/WebCore/svg/graphics/filters/SVGFEMorphology.cpp
+++ b/WebCore/svg/graphics/filters/SVGFEMorphology.cpp
@@ -90,6 +90,8 @@ void FEMorphology::apply(Filter* filter)
if (!getEffectContext())
return;
+ setIsAlphaImage(m_in->isAlphaImage());
+
if (!m_radiusX || !m_radiusY)
return;
diff --git a/WebCore/svg/graphics/filters/SVGFEOffset.cpp b/WebCore/svg/graphics/filters/SVGFEOffset.cpp
index 9fd50ed..0066c3e 100644
--- a/WebCore/svg/graphics/filters/SVGFEOffset.cpp
+++ b/WebCore/svg/graphics/filters/SVGFEOffset.cpp
@@ -74,6 +74,8 @@ void FEOffset::apply(Filter* filter)
if (!filterContext)
return;
+ setIsAlphaImage(m_in->isAlphaImage());
+
FloatRect sourceImageRect = filter->sourceImageRect();
sourceImageRect.scale(filter->filterResolution().width(), filter->filterResolution().height());
diff --git a/WebCore/svg/graphics/filters/SVGFETile.cpp b/WebCore/svg/graphics/filters/SVGFETile.cpp
index e97f68f..42da34d 100644
--- a/WebCore/svg/graphics/filters/SVGFETile.cpp
+++ b/WebCore/svg/graphics/filters/SVGFETile.cpp
@@ -58,6 +58,8 @@ void FETile::apply(Filter* filter)
if (!filterContext)
return;
+ setIsAlphaImage(m_in->isAlphaImage());
+
IntRect tileRect = enclosingIntRect(m_in->scaledSubRegion());
// Source input needs more attention. It has the size of the filterRegion but gives the
diff --git a/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp b/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp
index 67668d6..fc6924a 100644
--- a/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp
+++ b/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp
@@ -42,14 +42,14 @@ SVGFilterBuilder::SVGFilterBuilder()
void SVGFilterBuilder::add(const AtomicString& id, RefPtr<FilterEffect> effect)
{
if (id.isEmpty()) {
- m_lastEffect = effect.get();
+ m_lastEffect = effect;
return;
}
if (m_builtinEffects.contains(id))
return;
- m_lastEffect = effect.get();
+ m_lastEffect = effect;
m_namedEffects.set(id, m_lastEffect);
}
diff --git a/WebCore/svg/svgattrs.in b/WebCore/svg/svgattrs.in
index 1ab5b06..6081039 100644
--- a/WebCore/svg/svgattrs.in
+++ b/WebCore/svg/svgattrs.in
@@ -2,7 +2,6 @@ namespace="SVG"
namespaceURI="http://www.w3.org/2000/svg"
guardFactoryWith="ENABLE(SVG)"
attrsNullNamespace
-exportStrings
accent-height
accumulate
diff --git a/WebCore/svg/svgtags.in b/WebCore/svg/svgtags.in
index ca1ea89..adc05f2 100644
--- a/WebCore/svg/svgtags.in
+++ b/WebCore/svg/svgtags.in
@@ -1,7 +1,6 @@
namespace="SVG"
namespaceURI="http://www.w3.org/2000/svg"
guardFactoryWith="ENABLE(SVG)"
-exportStrings
a createWithNew
#if ENABLE_SVG_FONTS
diff --git a/WebCore/svg/xlinkattrs.in b/WebCore/svg/xlinkattrs.in
index 2e48903..6e7fef1 100644
--- a/WebCore/svg/xlinkattrs.in
+++ b/WebCore/svg/xlinkattrs.in
@@ -1,6 +1,5 @@
namespace="XLink"
namespaceURI="http://www.w3.org/1999/xlink"
-exportStrings
actuate
arcrole
diff --git a/WebCore/webcore-base.bkl b/WebCore/webcore-base.bkl
index 3be4727..e69de29 100644
--- a/WebCore/webcore-base.bkl
+++ b/WebCore/webcore-base.bkl
@@ -1,139 +0,0 @@
-<?xml version="1.0" ?>
-<!--
-Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.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.
-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.
-
-wxWebCore port Bakefile project file.
--->
-
-<makefile>
- <include file="../WebKit/wx/wxwk-settings.bkl" />
- <include file="WebCoreSources.bkl" />
-
- <set var="WEBCORE_BASE_SOURCES">
- $(WEBCORE_SOURCES_ACCESSIBILITY)
- $(WEBCORE_SOURCES_BMP)
- $(WEBCORE_SOURCES_BRIDGE)
- $(WEBCORE_SOURCES_CSS)
- $(WEBCORE_SOURCES_DERIVEDSOURCES)
- $(WEBCORE_SOURCES_DOM)
- $(WEBCORE_SOURCES_EDITING)
- $(WEBCORE_SOURCES_GIF)
- $(WEBCORE_SOURCES_HTML)
- $(WEBCORE_SOURCES_ICO)
- $(WEBCORE_SOURCES_ICON)
- $(WEBCORE_SOURCES_INSPECTOR)
- $(WEBCORE_SOURCES_JS)
- $(WEBCORE_SOURCES_LOADER)
- $(WEBCORE_SOURCES_PAGE)
- $(WEBCORE_SOURCES_HISTORY)
- $(WEBCORE_SOURCES_PLATFORM)
- $(WEBCORE_SOURCES_PLUGINS)
- $(WEBCORE_SOURCES_RENDERING)
- $(WEBCORE_SOURCES_STORAGE)
- $(WEBCORE_SOURCES_XBM)
- $(WEBCORE_SOURCES_XML)
- $(WEBCORE_SOURCES_ZLIB)
- $(WEBCORE_SOURCES_PNG)
- $(WEBCORE_SOURCES_JPEG)
- </set>
-
- <template id="webcore_base" template="xml2,iconv,xslt,icu,jscore,curl,sqlite3">
- <include>$(SRCDIR)</include>
- <include>$(SRCDIR)/accessibility</include>
- <include>$(SRCDIR)/bindings/js</include>
- <include>$(SRCDIR)/bridge</include>
- <include>$(SRCDIR)/bridge/c</include>
- <include>$(SRCDIR)/bridge/jni</include>
- <include>$(SRCDIR)/css</include>
- <include>$(SRCDIR)/DerivedSources/WebCore</include>
- <include>$(SRCDIR)/dom</include>
- <include>$(SRCDIR)/editing</include>
- <include>$(SRCDIR)/history</include>
- <include>$(SRCDIR)/html</include>
- <include>$(SRCDIR)/inspector</include>
- <include>$(SRCDIR)/loader</include>
- <include>$(SRCDIR)/loader/gdk</include>
- <include>$(SRCDIR)/loader/appcache</include>
- <include>$(SRCDIR)/loader/archive</include>
- <include>$(SRCDIR)/loader/icon</include>
- <include>$(SRCDIR)/page</include>
- <include>$(SRCDIR)/page/animation</include>
- <include>$(SRCDIR)/platform</include>
- <include>$(SRCDIR)/platform/animation</include>
- <include>$(SRCDIR)/platform/graphics</include>
- <include>$(SRCDIR)/platform/graphics/transforms</include>
- <include>$(SRCDIR)/platform/image-decoders</include>
- <include>$(SRCDIR)/platform/image-decoders/bmp</include>
- <include>$(SRCDIR)/platform/image-decoders/gif</include>
- <include>$(SRCDIR)/platform/image-decoders/ico</include>
- <include>$(SRCDIR)/platform/image-decoders/jpeg</include>
- <include>$(SRCDIR)/platform/image-decoders/png</include>
- <include>$(SRCDIR)/platform/image-decoders/xbm</include>
- <include>$(SRCDIR)/platform/image-decoders/zlib</include>
- <include>$(SRCDIR)/platform/network</include>
- <include>$(SRCDIR)/platform/network/curl</include>
- <include>$(SRCDIR)/platform/sql</include>
- <include>$(SRCDIR)/platform/text</include>
- <include>$(SRCDIR)/plugins</include>
- <include>$(SRCDIR)/rendering</include>
- <include>$(SRCDIR)/rendering/style</include>
- <include>$(SRCDIR)/storage</include>
- <include>$(SRCDIR)/workers</include>
- <include>$(SRCDIR)/xml</include>
- <include>$(WK_ROOT)</include>
- <include>$(WK_ROOT)/JavaScriptCore</include>
- <include>$(WK_ROOT)/JavaScriptCore/assembler</include>
- <include>$(WK_ROOT)/JavaScriptCore/ForwardingHeaders</include>
- <include>$(WK_ROOT)/JavaScriptCore/bindings</include>
- <include>$(WK_ROOT)/JavaScriptCore/bytecompiler</include>
- <include>$(WK_ROOT)/JavaScriptCore/bytecode</include>
- <include>$(WK_ROOT)/JavaScriptCore/debugger</include>
- <include>$(WK_ROOT)/JavaScriptCore/jit</include>
- <include>$(WK_ROOT)/JavaScriptCore/parser</include>
- <include>$(WK_ROOT)/JavaScriptCore/pcre</include>
- <include>$(WK_ROOT)/JavaScriptCore/profiler</include>
- <include>$(WK_ROOT)/JavaScriptCore/runtime</include>
- <include>$(WK_ROOT)/JavaScriptCore/interpreter</include>
- <include>$(WK_ROOT)/JavaScriptCore/wtf</include>
-
- <sources>$(WEBCORE_BASE_SOURCES)</sources>
-
- <define>ENABLE_XSLT=1</define>
-
- <if cond="FORMAT=='gnu'">
- <!-- FIXME: we need proper configure checks -->
- <define>HAVE_FUNC_ISNAN</define>
- </if>
-
- <if cond="PLATFORM_WIN32=='1'">
- <include>win32</include>
- <define>HAVE_SYS_TIMEB_H=1</define>
- <define>HAVE_FLOAT_H=1</define>
- <define>HAVE_FUNC__FINITE=1</define>
- </if>
- </template>
-</makefile>
diff --git a/WebCore/webcore-wx.bkl b/WebCore/webcore-wx.bkl
index 35ea9d4..e69de29 100644
--- a/WebCore/webcore-wx.bkl
+++ b/WebCore/webcore-wx.bkl
@@ -1,148 +0,0 @@
-<?xml version="1.0" ?>
-<!--
-Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.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.
-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.
-
-wxWebCore port Bakefile project file.
--->
-
-
-
-<makefile>
- <include file="webcore-base.bkl"/>
-
- <template id="webcore-wx" template="wxwk_build_settings,webcore_base,curl,gtk,pthreads">
- <pic>on</pic>
- <threading>multi</threading>
-
- <include>$(SRCDIR)/platform/graphics/wx</include>
- <include>$(SRCDIR)/platform/wx</include>
- <include>$(SRCDIR)/platform/wx/wxcode</include>
- <include>$(SRCDIR)/page/wx</include>
- <include>$(WK_ROOT)/WebKitLibraries</include>
-
- <sources>
- bindings/js/ScriptControllerWx.cpp
-
- editing/wx/EditorWx.cpp
-
- page/wx/DragControllerWx.cpp
- page/wx/EventHandlerWx.cpp
-
- platform/graphics/wx/TransformationMatrixWx.cpp
- platform/graphics/wx/ColorWx.cpp
- platform/graphics/wx/FloatRectWx.cpp
- platform/graphics/wx/GradientWx.cpp
- platform/graphics/wx/GraphicsContextWx.cpp
- platform/graphics/wx/ImageBufferWx.cpp
- platform/graphics/wx/ImageWx.cpp
- platform/graphics/wx/IntPointWx.cpp
- platform/graphics/wx/IntRectWx.cpp
- platform/graphics/wx/PathWx.cpp
- platform/graphics/wx/PenWx.cpp
-
- platform/image-decoders/wx/ImageDecoderWx.cpp
-
- platform/wx/TemporaryLinkStubs.cpp
- platform/wx/ClipboardWx.cpp
- platform/wx/CursorWx.cpp
- platform/wx/DragDataWx.cpp
- platform/wx/DragImageWx.cpp
- platform/wx/EventLoopWx.cpp
- platform/wx/FileSystemWx.cpp
- platform/wx/PopupMenuWx.cpp
- platform/graphics/wx/FontCacheWx.cpp
- platform/graphics/wx/FontPlatformDataWx.cpp
- platform/graphics/wx/FontWx.cpp
- platform/graphics/wx/GlyphMapWx.cpp
- platform/graphics/wx/SimpleFontDataWx.cpp
- platform/wx/KeyboardEventWx.cpp
- platform/wx/LocalizedStringsWx.cpp
- platform/wx/LoggingWx.cpp
- platform/wx/MimeTypeRegistryWx.cpp
- platform/wx/MouseEventWx.cpp
- platform/wx/MouseWheelEventWx.cpp
- platform/wx/PasteboardWx.cpp
- platform/wx/RenderThemeWx.cpp
- platform/wx/ScreenWx.cpp
- platform/wx/ScrollViewWx.cpp
- platform/wx/SoundWx.cpp
- platform/text/wx/StringWx.cpp
- platform/wx/WidgetWx.cpp
- platform/wx/ContextMenuWx.cpp
- platform/wx/ContextMenuItemWx.cpp
-
- <!-- files from other ports we currently rely on -->
- platform/network/curl/CookieJarCurl.cpp
- platform/network/curl/FormDataStreamCurl.cpp
- platform/network/curl/ResourceHandleCurl.cpp
- platform/network/curl/ResourceHandleManager.cpp
-
- plugins/PluginDataNone.cpp
- plugins/PluginPackageNone.cpp
- plugins/PluginViewNone.cpp
- </sources>
-
- <!-- platform-dependent source files -->
- <set var="EXT_SOURCES">
- <if cond="WX_PORT=='gtk2'">
- platform/wx/wxcode/gtk/fontprops.cpp
- platform/wx/wxcode/gtk/non-kerned-drawing.cpp
- platform/wx/wxcode/gtk/scrollbar_render.cpp
- platform/wx/SharedTimerWx.cpp
- </if>
- <if cond="PLATFORM_OS=='mac'">
- platform/mac/PurgeableBufferMac.cpp
- platform/wx/wxcode/mac/carbon/fontprops.cpp
- platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp
- platform/wx/wxcode/mac/carbon/scrollbar_render.cpp
- platform/wx/SharedTimerWx.cpp
- </if>
- <if cond="WX_PORT=='msw'">
- platform/wx/wxcode/win/fontprops.cpp
- platform/wx/wxcode/win/non-kerned-drawing.cpp
- platform/wx/wxcode/win/scrollbar_render.cpp
- <!-- grab the windows port's SharedTimer implementation -->
- platform/win/SharedTimerWin.cpp
- page/win/PageWin.cpp
- </if>
- </set>
-
- <sources>
- $(EXT_SOURCES)
- </sources>
-
- </template>
-
- <lib id="wx-webcore-static" template="webcore-wx,wx-lib">
- <libname>webcore-wx</libname>
- <if cond="PLATFORM_WIN32=='1'">
- <define>WXUSINGDLL=1</define>
- </if>
- </lib>
-
-</makefile>
-
diff --git a/WebCore/platform/network/qt/SocketStreamHandleSoup.cpp b/WebCore/websockets/ThreadableWebSocketChannel.cpp
index 6aa33fc..28b9263 100644
--- a/WebCore/platform/network/qt/SocketStreamHandleSoup.cpp
+++ b/WebCore/websockets/ThreadableWebSocketChannel.cpp
@@ -29,60 +29,46 @@
*/
#include "config.h"
-#include "SocketStreamHandle.h"
-#include "KURL.h"
-#include "Logging.h"
-#include "NotImplemented.h"
-#include "SocketStreamHandleClient.h"
+#if ENABLE(WEB_SOCKETS)
-namespace WebCore {
+#include "ThreadableWebSocketChannel.h"
-SocketStreamHandle::SocketStreamHandle(const KURL& url, SocketStreamHandleClient* client)
- : SocketStreamHandleBase(url, client)
-{
- LOG(Network, "SocketStreamHandle %p new client %p", this, m_client);
- notImplemented();
-}
+#include "PlatformString.h"
+#include "ScriptExecutionContext.h"
+#include "ThreadableWebSocketChannelClientWrapper.h"
+#include "WebSocketChannel.h"
+#include "WebSocketChannelClient.h"
+#include "WorkerContext.h"
+#include "WorkerRunLoop.h"
+#include "WorkerThread.h"
+#include "WorkerThreadableWebSocketChannel.h"
-SocketStreamHandle::~SocketStreamHandle()
-{
- LOG(Network, "SocketStreamHandle %p delete", this);
- setClient(0);
- notImplemented();
-}
+#include <wtf/PassRefPtr.h>
-int SocketStreamHandle::platformSend(const char*, int)
-{
- LOG(Network, "SocketStreamHandle %p platformSend", this);
- notImplemented();
- return 0;
-}
+namespace WebCore {
-void SocketStreamHandle::platformClose()
-{
- LOG(Network, "SocketStreamHandle %p platformClose", this);
- notImplemented();
-}
+static const char webSocketChannelMode[] = "webSocketChannelMode";
-void SocketStreamHandle::didReceiveAuthenticationChallenge(const AuthenticationChallenge&)
+PassRefPtr<ThreadableWebSocketChannel> ThreadableWebSocketChannel::create(ScriptExecutionContext* context, WebSocketChannelClient* client, const KURL& url, const String& protocol)
{
- notImplemented();
-}
+ ASSERT(context);
+ ASSERT(client);
-void SocketStreamHandle::receivedCredential(const AuthenticationChallenge&, const Credential&)
-{
- notImplemented();
-}
+#if ENABLE(WORKERS)
+ if (context->isWorkerContext()) {
+ WorkerContext* workerContext = static_cast<WorkerContext*>(context);
+ WorkerRunLoop& runLoop = workerContext->thread()->runLoop();
+ String mode = webSocketChannelMode;
+ mode.append(String::number(runLoop.createUniqueId()));
+ return WorkerThreadableWebSocketChannel::create(workerContext, client, mode, url, protocol);
+ }
+#endif // ENABLE(WORKERS)
-void SocketStreamHandle::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&)
-{
- notImplemented();
+ ASSERT(context->isDocument());
+ return WebSocketChannel::create(context, client, url, protocol);
}
-void SocketStreamHandle::receivedCancellation(const AuthenticationChallenge&)
-{
- notImplemented();
-}
+} // namespace WebCore
-} // namespace WebCore
+#endif // ENABLE(WEB_SOCKETS)
diff --git a/WebCore/websockets/ThreadableWebSocketChannel.h b/WebCore/websockets/ThreadableWebSocketChannel.h
new file mode 100644
index 0000000..74ea4b4
--- /dev/null
+++ b/WebCore/websockets/ThreadableWebSocketChannel.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ThreadableWebSocketChannel_h
+#define ThreadableWebSocketChannel_h
+
+#if ENABLE(WEB_SOCKETS)
+
+#include <wtf/Noncopyable.h>
+#include <wtf/PassRefPtr.h>
+
+namespace WebCore {
+
+class KURL;
+class ScriptExecutionContext;
+class String;
+class WebSocketChannelClient;
+
+class ThreadableWebSocketChannel : public Noncopyable {
+public:
+ static PassRefPtr<ThreadableWebSocketChannel> create(ScriptExecutionContext*, WebSocketChannelClient*, const KURL&, const String& protocol);
+
+ virtual void connect() = 0;
+ virtual bool send(const String& message) = 0;
+ virtual unsigned long bufferedAmount() const = 0;
+ virtual void close() = 0;
+ virtual void disconnect() = 0; // Will suppress didClose().
+
+ void ref() { refThreadableWebSocketChannel(); }
+ void deref() { derefThreadableWebSocketChannel(); }
+
+protected:
+ virtual ~ThreadableWebSocketChannel() { }
+ virtual void refThreadableWebSocketChannel() = 0;
+ virtual void derefThreadableWebSocketChannel() = 0;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_SOCKETS)
+
+#endif // ThreadableWebSocketChannel_h
diff --git a/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.h b/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.h
new file mode 100644
index 0000000..8bf51fa
--- /dev/null
+++ b/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.h
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ThreadableWebSocketChannelClientWrapper_h
+#define ThreadableWebSocketChannelClientWrapper_h
+
+#if ENABLE(WEB_SOCKETS)
+
+#include "WebSocketChannelClient.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/Threading.h>
+
+namespace WebCore {
+
+class String;
+
+class ThreadableWebSocketChannelClientWrapper : public ThreadSafeShared<ThreadableWebSocketChannelClientWrapper> {
+public:
+ static PassRefPtr<ThreadableWebSocketChannelClientWrapper> create(WebSocketChannelClient* client)
+ {
+ return adoptRef(new ThreadableWebSocketChannelClientWrapper(client));
+ }
+
+ void clearSyncMethodDone()
+ {
+ m_syncMethodDone = false;
+ }
+ void setSyncMethodDone()
+ {
+ m_syncMethodDone = true;
+ }
+
+ bool syncMethodDone() const
+ {
+ return m_syncMethodDone;
+ }
+
+ bool sent() const
+ {
+ return m_sent;
+ }
+ void setSent(bool sent)
+ {
+ m_sent = sent;
+ m_syncMethodDone = true;
+ }
+
+ unsigned long bufferedAmount() const
+ {
+ return m_bufferedAmount;
+ }
+ void setBufferedAmount(unsigned long bufferedAmount)
+ {
+ m_bufferedAmount = bufferedAmount;
+ m_syncMethodDone = true;
+ }
+
+ void clearClient()
+ {
+ m_client = 0;
+ }
+
+ void didConnect()
+ {
+ if (m_client)
+ m_client->didConnect();
+ }
+
+ void didReceiveMessage(const String& msg)
+ {
+ if (m_client)
+ m_client->didReceiveMessage(msg);
+ }
+
+ void didClose()
+ {
+ if (m_client)
+ m_client->didClose();
+ }
+
+protected:
+ ThreadableWebSocketChannelClientWrapper(WebSocketChannelClient* client)
+ : m_client(client)
+ , m_syncMethodDone(false)
+ , m_sent(false)
+ , m_bufferedAmount(0)
+ {
+ }
+
+ WebSocketChannelClient* m_client;
+ bool m_syncMethodDone;
+ bool m_sent;
+ unsigned long m_bufferedAmount;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_SOCKETS)
+
+#endif // ThreadableWebSocketChannelClientWrapper_h
diff --git a/WebCore/websockets/WebSocket.cpp b/WebCore/websockets/WebSocket.cpp
index ee78174..0435490 100644
--- a/WebCore/websockets/WebSocket.cpp
+++ b/WebCore/websockets/WebSocket.cpp
@@ -43,12 +43,14 @@
#include "Logging.h"
#include "MessageEvent.h"
#include "ScriptExecutionContext.h"
+#include "StringBuilder.h"
+#include "ThreadableWebSocketChannel.h"
#include "WebSocketChannel.h"
#include <wtf/StdLibExtras.h>
namespace WebCore {
-static bool isValidProtocolString(const WebCore::String& protocol)
+static bool isValidProtocolString(const String& protocol)
{
if (protocol.isNull())
return true;
@@ -62,6 +64,20 @@ static bool isValidProtocolString(const WebCore::String& protocol)
return true;
}
+static String encodeProtocolString(const String& protocol)
+{
+ StringBuilder builder;
+ for (size_t i = 0; i < protocol.length(); i++) {
+ if (protocol[i] < 0x20 || protocol[i] > 0x7E)
+ builder.append(String::format("\\u%04X", protocol[i]));
+ else if (protocol[i] == 0x5c)
+ builder.append("\\\\");
+ else
+ builder.append(protocol[i]);
+ }
+ return builder.toString();
+}
+
#if USE(V8)
static bool webSocketsAvailable = false;
@@ -101,32 +117,39 @@ void WebSocket::connect(const KURL& url, const String& protocol, ExceptionCode&
m_url = url;
m_protocol = protocol;
+ if (!m_url.isValid()) {
+ scriptExecutionContext()->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Invalid url for WebSocket " + url.string(), 0, scriptExecutionContext()->securityOrigin()->toString());
+ m_state = CLOSED;
+ ec = SYNTAX_ERR;
+ return;
+ }
+
if (!m_url.protocolIs("ws") && !m_url.protocolIs("wss")) {
- LOG(Network, "Wrong url scheme for WebSocket %s", url.string().utf8().data());
+ scriptExecutionContext()->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Wrong url scheme for WebSocket " + url.string(), 0, scriptExecutionContext()->securityOrigin()->toString());
m_state = CLOSED;
ec = SYNTAX_ERR;
return;
}
if (m_url.hasFragmentIdentifier()) {
- LOG(Network, "URL has fragment component %s", url.string().utf8().data());
+ scriptExecutionContext()->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "URL has fragment component " + url.string(), 0, scriptExecutionContext()->securityOrigin()->toString());
m_state = CLOSED;
ec = SYNTAX_ERR;
return;
}
if (!isValidProtocolString(m_protocol)) {
- LOG(Network, "Wrong protocol for WebSocket %s", m_protocol.utf8().data());
+ scriptExecutionContext()->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Wrong protocol for WebSocket '" + encodeProtocolString(m_protocol) + "'", 0, scriptExecutionContext()->securityOrigin()->toString());
m_state = CLOSED;
ec = SYNTAX_ERR;
return;
}
if (!portAllowed(url)) {
- LOG(Network, "WebSocket port %d blocked", url.port());
+ scriptExecutionContext()->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, String::format("WebSocket port %d blocked", url.port()), 0, scriptExecutionContext()->securityOrigin()->toString());
m_state = CLOSED;
ec = SECURITY_ERR;
return;
}
- m_channel = WebSocketChannel::create(scriptExecutionContext(), this, m_url, m_protocol);
+ m_channel = ThreadableWebSocketChannel::create(scriptExecutionContext(), this, m_url, m_protocol);
m_channel->connect();
}
@@ -192,7 +215,6 @@ void WebSocket::didReceiveMessage(const String& msg)
if (m_state != OPEN || !scriptExecutionContext())
return;
RefPtr<MessageEvent> evt = MessageEvent::create();
- // FIXME: origin, lastEventId, source, messagePort.
evt->initMessageEvent(eventNames().messageEvent, false, false, SerializedScriptValue::create(msg), "", "", 0, 0);
dispatchEvent(evt);
}
diff --git a/WebCore/websockets/WebSocket.h b/WebCore/websockets/WebSocket.h
index 9ecbed7..18e2b25 100644
--- a/WebCore/websockets/WebSocket.h
+++ b/WebCore/websockets/WebSocket.h
@@ -46,7 +46,7 @@
namespace WebCore {
class String;
- class WebSocketChannel;
+ class ThreadableWebSocketChannel;
class WebSocket : public RefCounted<WebSocket>, public EventTarget, public ActiveDOMObject, public WebSocketChannelClient {
public:
@@ -83,20 +83,12 @@ namespace WebCore {
virtual ScriptExecutionContext* scriptExecutionContext() const;
- // ActiveDOMObject
- // virtual bool hasPendingActivity() const;
- // virtual void contextDestroyed();
- // virtual bool canSuspend() const;
- // virtual void suspend();
- // virtual void resume();
- // virtual void stop();
-
using RefCounted<WebSocket>::ref;
using RefCounted<WebSocket>::deref;
// WebSocketChannelClient
virtual void didConnect();
- virtual void didReceiveMessage(const String& msg);
+ virtual void didReceiveMessage(const String& message);
virtual void didClose();
private:
@@ -111,7 +103,7 @@ namespace WebCore {
void dispatchMessageEvent(Event*);
void dispatchCloseEvent(Event*);
- RefPtr<WebSocketChannel> m_channel;
+ RefPtr<ThreadableWebSocketChannel> m_channel;
State m_state;
KURL m_url;
@@ -119,8 +111,8 @@ namespace WebCore {
EventTargetData m_eventTargetData;
};
-} // namespace WebCore
+} // namespace WebCore
-#endif // ENABLE(WEB_SOCKETS)
+#endif // ENABLE(WEB_SOCKETS)
-#endif // WebSocket_h
+#endif // WebSocket_h
diff --git a/WebCore/websockets/WebSocket.idl b/WebCore/websockets/WebSocket.idl
index c662940..c9552d9 100644
--- a/WebCore/websockets/WebSocket.idl
+++ b/WebCore/websockets/WebSocket.idl
@@ -32,6 +32,7 @@ module websockets {
interface [
Conditional=WEB_SOCKETS,
+ CustomConstructor,
EventTarget,
NoStaticTables
] WebSocket {
diff --git a/WebCore/websockets/WebSocketChannel.cpp b/WebCore/websockets/WebSocketChannel.cpp
index a222b4d..5c0f4c3 100644
--- a/WebCore/websockets/WebSocketChannel.cpp
+++ b/WebCore/websockets/WebSocketChannel.cpp
@@ -118,7 +118,7 @@ void WebSocketChannel::didOpen(SocketStreamHandle* handle)
ASSERT(handle == m_handle);
const CString& handshakeMessage = m_handshake.clientHandshakeMessage();
if (!handle->send(handshakeMessage.data(), handshakeMessage.length())) {
- LOG(Network, "Error in sending handshake message.");
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Error sending handshake message.", 0, m_handshake.clientOrigin());
handle->close();
}
}
@@ -150,7 +150,7 @@ void WebSocketChannel::didReceiveData(SocketStreamHandle* handle, const char* da
handle->close();
return;
}
- if (m_handshake.mode() != WebSocketHandshake::Connected) {
+ if (m_handshake.mode() == WebSocketHandshake::Incomplete) {
int headerLength = m_handshake.readServerHandshake(m_buffer, m_bufferSize);
if (headerLength <= 0)
return;
@@ -179,6 +179,8 @@ void WebSocketChannel::didReceiveData(SocketStreamHandle* handle, const char* da
return;
LOG(Network, "remaining in read buf %ul", m_bufferSize);
}
+ if (m_handshake.mode() != WebSocketHandshake::Connected)
+ return;
const char* nextFrame = m_buffer;
const char* p = m_buffer;
@@ -246,7 +248,7 @@ bool WebSocketChannel::appendToBuffer(const char* data, int len)
m_bufferSize += len;
return true;
}
- LOG(Network, "Too long WebSocket frame %d", m_bufferSize + len);
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, String::format("WebSocket frame (at %d bytes) is too long.", m_bufferSize + len), 0, m_handshake.clientOrigin());
return false;
}
diff --git a/WebCore/websockets/WebSocketChannel.h b/WebCore/websockets/WebSocketChannel.h
index 14b1e8c..7ec826c 100644
--- a/WebCore/websockets/WebSocketChannel.h
+++ b/WebCore/websockets/WebSocketChannel.h
@@ -34,6 +34,7 @@
#if ENABLE(WEB_SOCKETS)
#include "SocketStreamHandleClient.h"
+#include "ThreadableWebSocketChannel.h"
#include "WebSocketHandshake.h"
#include <wtf/RefCounted.h>
@@ -45,16 +46,16 @@ namespace WebCore {
class SocketStreamError;
class WebSocketChannelClient;
- class WebSocketChannel : public RefCounted<WebSocketChannel>, public SocketStreamHandleClient {
+ class WebSocketChannel : public RefCounted<WebSocketChannel>, public SocketStreamHandleClient, public ThreadableWebSocketChannel {
public:
static PassRefPtr<WebSocketChannel> create(ScriptExecutionContext* context, WebSocketChannelClient* client, const KURL& url, const String& protocol) { return adoptRef(new WebSocketChannel(context, client, url, protocol)); }
virtual ~WebSocketChannel();
- void connect();
- bool send(const String& msg);
- unsigned long bufferedAmount() const;
- void close();
- void disconnect(); // Will suppress didClose().
+ virtual void connect();
+ virtual bool send(const String& message);
+ virtual unsigned long bufferedAmount() const;
+ virtual void close();
+ virtual void disconnect(); // Will suppress didClose().
virtual void didOpen(SocketStreamHandle*);
virtual void didClose(SocketStreamHandle*);
@@ -63,8 +64,15 @@ namespace WebCore {
virtual void didReceiveAuthenticationChallenge(SocketStreamHandle*, const AuthenticationChallenge&);
virtual void didCancelAuthenticationChallenge(SocketStreamHandle*, const AuthenticationChallenge&);
+ using RefCounted<WebSocketChannel>::ref;
+ using RefCounted<WebSocketChannel>::deref;
+
+ protected:
+ virtual void refThreadableWebSocketChannel() { ref(); }
+ virtual void derefThreadableWebSocketChannel() { deref(); }
+
private:
- WebSocketChannel(ScriptExecutionContext*, WebSocketChannelClient*, const KURL&, const String&);
+ WebSocketChannel(ScriptExecutionContext*, WebSocketChannelClient*, const KURL&, const String& protocol);
bool appendToBuffer(const char* data, int len);
void skipBuffer(int len);
@@ -78,8 +86,8 @@ namespace WebCore {
unsigned long m_unhandledBufferSize;
};
-} // namespace WebCore
+} // namespace WebCore
-#endif // ENABLE(WEB_SOCKETS)
+#endif // ENABLE(WEB_SOCKETS)
-#endif // WebSocketChannel_h
+#endif // WebSocketChannel_h
diff --git a/WebCore/websockets/WebSocketChannelClient.h b/WebCore/websockets/WebSocketChannelClient.h
index 463cada..163070f 100644
--- a/WebCore/websockets/WebSocketChannelClient.h
+++ b/WebCore/websockets/WebSocketChannelClient.h
@@ -46,8 +46,8 @@ namespace WebCore {
WebSocketChannelClient() { }
};
-} // namespace WebCore
+} // namespace WebCore
-#endif // ENABLE(WEB_SOCKETS)
+#endif // ENABLE(WEB_SOCKETS)
-#endif // WebSocketChannelClient_h
+#endif // WebSocketChannelClient_h
diff --git a/WebCore/websockets/WebSocketHandshake.cpp b/WebCore/websockets/WebSocketHandshake.cpp
index d1da443..883f84b 100644
--- a/WebCore/websockets/WebSocketHandshake.cpp
+++ b/WebCore/websockets/WebSocketHandshake.cpp
@@ -76,9 +76,14 @@ static String extractResponseCode(const char* header, int len)
static String resourceName(const KURL& url)
{
- if (url.query().isNull())
- return url.path();
- return url.path() + "?" + url.query();
+ String name = url.path();
+ if (name.isEmpty())
+ name = "/";
+ if (!url.query().isNull())
+ name += "?" + url.query();
+ ASSERT(!name.isEmpty());
+ ASSERT(!name.contains(' '));
+ return name;
}
WebSocketHandshake::WebSocketHandshake(const KURL& url, const String& protocol, ScriptExecutionContext* context)
@@ -216,19 +221,22 @@ int WebSocketHandshake::readServerHandshake(const char* header, size_t len)
else {
const String& code = extractResponseCode(header, len);
if (code.isNull()) {
- LOG(Network, "short server handshake: %s", header);
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Short server handshake: " + String(header, len), 0, clientOrigin());
return -1;
}
if (code.isEmpty()) {
- LOG(Network, "no response code found: %s", header);
+ m_mode = Failed;
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "No response code found: " + String(header, len), 0, clientOrigin());
return len;
}
LOG(Network, "response code: %s", code.utf8().data());
if (code == "401") {
- LOG(Network, "Authentication required");
+ m_mode = Failed;
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Authentication required, but not implemented yet.", 0, clientOrigin());
return len;
} else {
- LOG(Network, "Mismatch server handshake: %s", header);
+ m_mode = Failed;
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Unexpected response code:" + code, 0, clientOrigin());
return len;
}
}
@@ -237,19 +245,25 @@ int WebSocketHandshake::readServerHandshake(const char* header, size_t len)
if (m_mode == Normal) {
size_t headerSize = end - p;
- if (headerSize < sizeof(webSocketUpgradeHeader) - 1)
+ if (headerSize < sizeof(webSocketUpgradeHeader) - 1) {
+ m_mode = Incomplete;
return 0;
+ }
if (memcmp(p, webSocketUpgradeHeader, sizeof(webSocketUpgradeHeader) - 1)) {
- LOG(Network, "Bad upgrade header: %s", p);
+ m_mode = Failed;
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Bad Upgrade header: " + String(p, end - p), 0, clientOrigin());
return p - header + sizeof(webSocketUpgradeHeader) - 1;
}
p += sizeof(webSocketUpgradeHeader) - 1;
headerSize = end - p;
- if (headerSize < sizeof(webSocketConnectionHeader) - 1)
+ if (headerSize < sizeof(webSocketConnectionHeader) - 1) {
+ m_mode = Incomplete;
return -1;
+ }
if (memcmp(p, webSocketConnectionHeader, sizeof(webSocketConnectionHeader) - 1)) {
- LOG(Network, "Bad connection header: %s", p);
+ m_mode = Failed;
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Bad Connection header: " + String(p, end - p), 0, clientOrigin());
return p - header + sizeof(webSocketConnectionHeader) - 1;
}
p += sizeof(webSocketConnectionHeader) - 1;
@@ -257,6 +271,7 @@ int WebSocketHandshake::readServerHandshake(const char* header, size_t len)
if (!strnstr(p, "\r\n\r\n", end - p)) {
// Just hasn't been received fully yet.
+ m_mode = Incomplete;
return -1;
}
HTTPHeaderMap headers;
@@ -340,7 +355,8 @@ void WebSocketHandshake::setServerSetCookie2(const String& setCookie2)
KURL WebSocketHandshake::httpURLForAuthenticationAndCookies() const
{
KURL url = m_url.copy();
- url.setProtocol(m_secure ? "https" : "http");
+ bool couldSetProtocol = url.setProtocol(m_secure ? "https" : "http");
+ ASSERT_UNUSED(couldSetProtocol, couldSetProtocol);
return url;
}
@@ -358,13 +374,13 @@ const char* WebSocketHandshake::readHTTPHeaders(const char* start, const char* e
if (name.isEmpty()) {
if (p + 1 < end && *(p + 1) == '\n')
return p + 2;
- LOG(Network, "CR doesn't follow LF p=%p end=%p", p, end);
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "CR doesn't follow LF at " + String(p, end - p), 0, clientOrigin());
return 0;
}
- LOG(Network, "Unexpected CR in name");
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Unexpected CR in name at " + String(p, end - p), 0, clientOrigin());
return 0;
case '\n':
- LOG(Network, "Unexpected LF in name");
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Unexpected LF in name at " + String(p, end - p), 0, clientOrigin());
return 0;
case ':':
break;
@@ -388,7 +404,7 @@ const char* WebSocketHandshake::readHTTPHeaders(const char* start, const char* e
case '\r':
break;
case '\n':
- LOG(Network, "Unexpected LF in value");
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Unexpected LF in value at " + String(p, end - p), 0, clientOrigin());
return 0;
default:
value.append(*p);
@@ -399,7 +415,7 @@ const char* WebSocketHandshake::readHTTPHeaders(const char* start, const char* e
}
}
if (p >= end || *p != '\n') {
- LOG(Network, "CR doesn't follow LF after value p=%p end=%p", p, end);
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "CR doesn't follow LF after value at " + String(p, end - p), 0, clientOrigin());
return 0;
}
AtomicString nameStr(String::fromUTF8(name.data(), name.size()));
@@ -441,19 +457,25 @@ void WebSocketHandshake::checkResponseHeaders()
{
ASSERT(m_mode == Normal);
m_mode = Failed;
- if (m_wsOrigin.isNull() || m_wsLocation.isNull())
+ if (m_wsOrigin.isNull()) {
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Error during WebSocket handshake: 'websocket-origin' header is missing", 0, clientOrigin());
return;
+ }
+ if (m_wsLocation.isNull()) {
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Error during WebSocket handshake: 'websocket-location' header is missing", 0, clientOrigin());
+ return;
+ }
if (clientOrigin() != m_wsOrigin) {
- LOG(Network, "Mismatch origin: %s != %s", clientOrigin().utf8().data(), m_wsOrigin.utf8().data());
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Error during WebSocket handshake: origin mismatch: " + clientOrigin() + " != " + m_wsOrigin, 0, clientOrigin());
return;
}
if (clientLocation() != m_wsLocation) {
- LOG(Network, "Mismatch location: %s != %s", clientLocation().utf8().data(), m_wsLocation.utf8().data());
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Error during WebSocket handshake: location mismatch: " + clientLocation() + " != " + m_wsLocation, 0, clientOrigin());
return;
}
if (!m_clientProtocol.isEmpty() && m_clientProtocol != m_wsProtocol) {
- LOG(Network, "Mismatch protocol: %s != %s", m_clientProtocol.utf8().data(), m_wsProtocol.utf8().data());
+ m_context->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Error during WebSocket handshake: protocol mismatch: " + m_clientProtocol + " != " + m_wsProtocol, 0, clientOrigin());
return;
}
m_mode = Connected;
diff --git a/WebCore/websockets/WebSocketHandshake.h b/WebCore/websockets/WebSocketHandshake.h
index d5dbe68..bda320a 100644
--- a/WebCore/websockets/WebSocketHandshake.h
+++ b/WebCore/websockets/WebSocketHandshake.h
@@ -106,8 +106,8 @@ namespace WebCore {
String m_setCookie2;
};
-} // namespace WebCore
+} // namespace WebCore
-#endif // ENABLE(WEB_SOCKETS)
+#endif // ENABLE(WEB_SOCKETS)
-#endif // WebSocketHandshake_h
+#endif // WebSocketHandshake_h
diff --git a/WebCore/websockets/WorkerThreadableWebSocketChannel.cpp b/WebCore/websockets/WorkerThreadableWebSocketChannel.cpp
new file mode 100644
index 0000000..8db81b7
--- /dev/null
+++ b/WebCore/websockets/WorkerThreadableWebSocketChannel.cpp
@@ -0,0 +1,362 @@
+/*
+ * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(WEB_SOCKETS) && ENABLE(WORKERS)
+
+#include "WorkerThreadableWebSocketChannel.h"
+
+#include "GenericWorkerTask.h"
+#include "PlatformString.h"
+#include "ScriptExecutionContext.h"
+#include "ThreadableWebSocketChannelClientWrapper.h"
+#include "WebSocketChannel.h"
+#include "WebSocketChannelClient.h"
+#include "WorkerContext.h"
+#include "WorkerLoaderProxy.h"
+#include "WorkerRunLoop.h"
+#include "WorkerThread.h"
+
+#include <wtf/PassRefPtr.h>
+
+namespace WebCore {
+
+WorkerThreadableWebSocketChannel::WorkerThreadableWebSocketChannel(WorkerContext* context, WebSocketChannelClient* client, const String& taskMode, const KURL& url, const String& protocol)
+ : m_workerContext(context)
+ , m_workerClientWrapper(ThreadableWebSocketChannelClientWrapper::create(client))
+ , m_bridge(new Bridge(m_workerClientWrapper, m_workerContext, taskMode, url, protocol))
+{
+}
+
+WorkerThreadableWebSocketChannel::~WorkerThreadableWebSocketChannel()
+{
+ if (m_bridge)
+ m_bridge->disconnect();
+}
+
+void WorkerThreadableWebSocketChannel::connect()
+{
+ if (m_bridge)
+ m_bridge->connect();
+}
+
+bool WorkerThreadableWebSocketChannel::send(const String& message)
+{
+ if (!m_bridge)
+ return false;
+ return m_bridge->send(message);
+}
+
+unsigned long WorkerThreadableWebSocketChannel::bufferedAmount() const
+{
+ if (!m_bridge)
+ return 0;
+ return m_bridge->bufferedAmount();
+}
+
+void WorkerThreadableWebSocketChannel::close()
+{
+ if (!m_bridge)
+ m_bridge->close();
+}
+
+void WorkerThreadableWebSocketChannel::disconnect()
+{
+ m_bridge->disconnect();
+ m_bridge.clear();
+}
+
+WorkerThreadableWebSocketChannel::Peer::Peer(RefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, WorkerLoaderProxy& loaderProxy, ScriptExecutionContext* context, const String& taskMode, const KURL& url, const String& protocol)
+ : m_workerClientWrapper(clientWrapper)
+ , m_loaderProxy(loaderProxy)
+ , m_mainWebSocketChannel(WebSocketChannel::create(context, this, url, protocol))
+ , m_taskMode(taskMode)
+{
+ ASSERT(isMainThread());
+}
+
+WorkerThreadableWebSocketChannel::Peer::~Peer()
+{
+ ASSERT(isMainThread());
+ if (m_mainWebSocketChannel)
+ m_mainWebSocketChannel->disconnect();
+}
+
+void WorkerThreadableWebSocketChannel::Peer::connect()
+{
+ ASSERT(isMainThread());
+ if (!m_mainWebSocketChannel)
+ return;
+ m_mainWebSocketChannel->connect();
+}
+
+static void workerContextDidSend(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, bool sent)
+{
+ ASSERT_UNUSED(context, context->isWorkerContext());
+ workerClientWrapper->setSent(sent);
+}
+
+void WorkerThreadableWebSocketChannel::Peer::send(const String& message)
+{
+ ASSERT(isMainThread());
+ if (!m_mainWebSocketChannel || !m_workerClientWrapper)
+ return;
+ bool sent = m_mainWebSocketChannel->send(message);
+ m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidSend, m_workerClientWrapper, sent), m_taskMode);
+}
+
+static void workerContextDidGetBufferedAmount(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, unsigned long bufferedAmount)
+{
+ ASSERT_UNUSED(context, context->isWorkerContext());
+ workerClientWrapper->setBufferedAmount(bufferedAmount);
+}
+
+void WorkerThreadableWebSocketChannel::Peer::bufferedAmount()
+{
+ ASSERT(isMainThread());
+ if (!m_mainWebSocketChannel || !m_workerClientWrapper)
+ return;
+ unsigned long bufferedAmount = m_mainWebSocketChannel->bufferedAmount();
+ m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidGetBufferedAmount, m_workerClientWrapper, bufferedAmount), m_taskMode);
+}
+
+void WorkerThreadableWebSocketChannel::Peer::close()
+{
+ ASSERT(isMainThread());
+ if (!m_mainWebSocketChannel)
+ return;
+ m_mainWebSocketChannel->close();
+ m_mainWebSocketChannel = 0;
+}
+
+void WorkerThreadableWebSocketChannel::Peer::disconnect()
+{
+ ASSERT(isMainThread());
+ if (!m_mainWebSocketChannel)
+ return;
+ m_mainWebSocketChannel->disconnect();
+ m_mainWebSocketChannel = 0;
+}
+
+static void workerContextDidConnect(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
+{
+ ASSERT_UNUSED(context, context->isWorkerContext());
+ workerClientWrapper->didConnect();
+}
+
+void WorkerThreadableWebSocketChannel::Peer::didConnect()
+{
+ ASSERT(isMainThread());
+ m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidConnect, m_workerClientWrapper), m_taskMode);
+}
+
+static void workerContextDidReceiveMessage(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, const String& message)
+{
+ ASSERT_UNUSED(context, context->isWorkerContext());
+ workerClientWrapper->didReceiveMessage(message);
+}
+
+void WorkerThreadableWebSocketChannel::Peer::didReceiveMessage(const String& message)
+{
+ ASSERT(isMainThread());
+ m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidReceiveMessage, m_workerClientWrapper, message), m_taskMode);
+}
+
+static void workerContextDidClose(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
+{
+ ASSERT_UNUSED(context, context->isWorkerContext());
+ workerClientWrapper->didClose();
+}
+
+void WorkerThreadableWebSocketChannel::Peer::didClose()
+{
+ ASSERT(isMainThread());
+ m_mainWebSocketChannel = 0;
+ m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidClose, m_workerClientWrapper), m_taskMode);
+}
+
+void WorkerThreadableWebSocketChannel::Bridge::setWebSocketChannel(ScriptExecutionContext* context, Bridge* thisPtr, Peer* peer, RefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
+{
+ ASSERT_UNUSED(context, context->isWorkerContext());
+ thisPtr->m_peer = peer;
+ workerClientWrapper->setSyncMethodDone();
+}
+
+void WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel(ScriptExecutionContext* context, Bridge* thisPtr, RefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, const String& taskMode, const KURL& url, const String& protocol)
+{
+ ASSERT(isMainThread());
+ ASSERT_UNUSED(context, context->isDocument());
+
+ Peer* peer = Peer::create(clientWrapper, thisPtr->m_loaderProxy, context, taskMode, url, protocol);
+ thisPtr->m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&Bridge::setWebSocketChannel, thisPtr, peer, clientWrapper), taskMode);
+}
+
+WorkerThreadableWebSocketChannel::Bridge::Bridge(PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, PassRefPtr<WorkerContext> workerContext, const String& taskMode, const KURL& url, const String& protocol)
+ : m_workerClientWrapper(workerClientWrapper)
+ , m_workerContext(workerContext)
+ , m_loaderProxy(m_workerContext->thread()->workerLoaderProxy())
+ , m_taskMode(taskMode)
+ , m_peer(0)
+{
+ ASSERT(m_workerClientWrapper.get());
+ setMethodNotCompleted();
+ m_loaderProxy.postTaskToLoader(createCallbackTask(&Bridge::mainThreadCreateWebSocketChannel, this, m_workerClientWrapper, m_taskMode, url, protocol));
+ waitForMethodCompletion();
+ ASSERT(m_peer);
+}
+
+WorkerThreadableWebSocketChannel::Bridge::~Bridge()
+{
+ disconnect();
+}
+
+void WorkerThreadableWebSocketChannel::mainThreadConnect(ScriptExecutionContext* context, Peer* peer)
+{
+ ASSERT(isMainThread());
+ ASSERT_UNUSED(context, context->isDocument());
+ ASSERT(peer);
+
+ peer->connect();
+}
+
+void WorkerThreadableWebSocketChannel::Bridge::connect()
+{
+ ASSERT(m_workerClientWrapper);
+ ASSERT(m_peer);
+ m_loaderProxy.postTaskToLoader(createCallbackTask(&WorkerThreadableWebSocketChannel::mainThreadConnect, m_peer));
+}
+
+void WorkerThreadableWebSocketChannel::mainThreadSend(ScriptExecutionContext* context, Peer* peer, const String& message)
+{
+ ASSERT(isMainThread());
+ ASSERT_UNUSED(context, context->isDocument());
+ ASSERT(peer);
+
+ peer->send(message);
+}
+
+bool WorkerThreadableWebSocketChannel::Bridge::send(const String& message)
+{
+ if (!m_workerClientWrapper)
+ return false;
+ ASSERT(m_peer);
+ setMethodNotCompleted();
+ m_loaderProxy.postTaskToLoader(createCallbackTask(&WorkerThreadableWebSocketChannel::mainThreadSend, m_peer, message));
+ waitForMethodCompletion();
+ ThreadableWebSocketChannelClientWrapper* clientWrapper = m_workerClientWrapper.get();
+ return clientWrapper && clientWrapper->sent();
+}
+
+void WorkerThreadableWebSocketChannel::mainThreadBufferedAmount(ScriptExecutionContext* context, Peer* peer)
+{
+ ASSERT(isMainThread());
+ ASSERT_UNUSED(context, context->isDocument());
+ ASSERT(peer);
+
+ peer->bufferedAmount();
+}
+
+unsigned long WorkerThreadableWebSocketChannel::Bridge::bufferedAmount()
+{
+ if (!m_workerClientWrapper)
+ return 0;
+ ASSERT(m_peer);
+ setMethodNotCompleted();
+ m_loaderProxy.postTaskToLoader(createCallbackTask(&WorkerThreadableWebSocketChannel::mainThreadBufferedAmount, m_peer));
+ waitForMethodCompletion();
+ ThreadableWebSocketChannelClientWrapper* clientWrapper = m_workerClientWrapper.get();
+ if (clientWrapper)
+ return clientWrapper->bufferedAmount();
+ return 0;
+}
+
+void WorkerThreadableWebSocketChannel::mainThreadClose(ScriptExecutionContext* context, Peer* peer)
+{
+ ASSERT(isMainThread());
+ ASSERT_UNUSED(context, context->isDocument());
+ ASSERT(peer);
+
+ peer->close();
+}
+
+void WorkerThreadableWebSocketChannel::Bridge::close()
+{
+ ASSERT(m_peer);
+ m_loaderProxy.postTaskToLoader(createCallbackTask(&WorkerThreadableWebSocketChannel::mainThreadClose, m_peer));
+}
+
+void WorkerThreadableWebSocketChannel::mainThreadDestroy(ScriptExecutionContext* context, Peer* peer)
+{
+ ASSERT(isMainThread());
+ ASSERT_UNUSED(context, context->isDocument());
+ ASSERT(peer);
+
+ delete peer;
+}
+
+void WorkerThreadableWebSocketChannel::Bridge::disconnect()
+{
+ clearClientWrapper();
+ if (m_peer) {
+ Peer* peer = m_peer;
+ m_peer = 0;
+ m_loaderProxy.postTaskToLoader(createCallbackTask(&mainThreadDestroy, peer));
+ }
+ m_workerContext = 0;
+}
+
+void WorkerThreadableWebSocketChannel::Bridge::clearClientWrapper()
+{
+ m_workerClientWrapper->clearClient();
+}
+
+void WorkerThreadableWebSocketChannel::Bridge::setMethodNotCompleted()
+{
+ ASSERT(m_workerClientWrapper);
+ m_workerClientWrapper->clearSyncMethodDone();
+}
+
+void WorkerThreadableWebSocketChannel::Bridge::waitForMethodCompletion()
+{
+ if (!m_workerContext)
+ return;
+ WorkerRunLoop& runLoop = m_workerContext->thread()->runLoop();
+ MessageQueueWaitResult result = MessageQueueMessageReceived;
+ ThreadableWebSocketChannelClientWrapper* clientWrapper = m_workerClientWrapper.get();
+ while (clientWrapper && !clientWrapper->syncMethodDone() && result != MessageQueueTerminated) {
+ result = runLoop.runInMode(m_workerContext.get(), m_taskMode);
+ clientWrapper = m_workerClientWrapper.get();
+ }
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_SOCKETS)
diff --git a/WebCore/websockets/WorkerThreadableWebSocketChannel.h b/WebCore/websockets/WorkerThreadableWebSocketChannel.h
new file mode 100644
index 0000000..1106f43
--- /dev/null
+++ b/WebCore/websockets/WorkerThreadableWebSocketChannel.h
@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WorkerThreadableWebSocketChannel_h
+#define WorkerThreadableWebSocketChannel_h
+
+#if ENABLE(WEB_SOCKETS) && ENABLE(WORKERS)
+
+#include "PlatformString.h"
+#include "ThreadableWebSocketChannel.h"
+#include "WebSocketChannelClient.h"
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+#include <wtf/Threading.h>
+
+namespace WebCore {
+
+class KURL;
+class ScriptExecutionContext;
+class ThreadableWebSocketChannelClientWrapper;
+class WorkerContext;
+class WorkerLoaderProxy;
+class WorkerRunLoop;
+
+class WorkerThreadableWebSocketChannel : public RefCounted<WorkerThreadableWebSocketChannel>, public ThreadableWebSocketChannel {
+public:
+ static PassRefPtr<ThreadableWebSocketChannel> create(WorkerContext* workerContext, WebSocketChannelClient* client, const String& taskMode, const KURL& url, const String& protocol)
+ {
+ return adoptRef(new WorkerThreadableWebSocketChannel(workerContext, client, taskMode, url, protocol));
+ }
+ virtual ~WorkerThreadableWebSocketChannel();
+
+ virtual void connect();
+ virtual bool send(const String& message);
+ virtual unsigned long bufferedAmount() const;
+ virtual void close();
+ virtual void disconnect(); // Will suppress didClose().
+
+ using RefCounted<WorkerThreadableWebSocketChannel>::ref;
+ using RefCounted<WorkerThreadableWebSocketChannel>::deref;
+
+protected:
+ virtual void refThreadableWebSocketChannel() { ref(); }
+ virtual void derefThreadableWebSocketChannel() { deref(); }
+
+private:
+ // Generated by the bridge. The Peer and its bridge should have identical
+ // lifetimes.
+ class Peer : public WebSocketChannelClient, public Noncopyable {
+ public:
+ static Peer* create(RefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, WorkerLoaderProxy& loaderProxy, ScriptExecutionContext* context, const String& taskMode, const KURL& url, const String& protocol)
+ {
+ return new Peer(clientWrapper, loaderProxy, context, taskMode, url, protocol);
+ }
+ ~Peer();
+
+ void connect();
+ void send(const String& message);
+ void bufferedAmount();
+ void close();
+ void disconnect();
+
+ virtual void didConnect();
+ virtual void didReceiveMessage(const String& message);
+ virtual void didClose();
+
+ private:
+ Peer(RefPtr<ThreadableWebSocketChannelClientWrapper>, WorkerLoaderProxy&, ScriptExecutionContext*, const String& taskMode, const KURL&, const String& protocol);
+
+ RefPtr<ThreadableWebSocketChannelClientWrapper> m_workerClientWrapper;
+ WorkerLoaderProxy& m_loaderProxy;
+ RefPtr<ThreadableWebSocketChannel> m_mainWebSocketChannel;
+ String m_taskMode;
+ };
+
+ // Bridge for Peer. Running on the worker thread.
+ class Bridge : public RefCounted<Bridge> {
+ public:
+ Bridge(PassRefPtr<ThreadableWebSocketChannelClientWrapper>, PassRefPtr<WorkerContext>, const String& taskMode, const KURL&, const String& protocol);
+ ~Bridge();
+ void connect();
+ bool send(const String& message);
+ unsigned long bufferedAmount();
+ void close();
+ void disconnect();
+
+ using RefCounted<Bridge>::ref;
+ using RefCounted<Bridge>::deref;
+
+ private:
+ static void setWebSocketChannel(ScriptExecutionContext*, Bridge* thisPtr, Peer*, RefPtr<ThreadableWebSocketChannelClientWrapper>);
+
+ // Executed on the main thread to create a Peer for this bridge.
+ static void mainThreadCreateWebSocketChannel(ScriptExecutionContext*, Bridge* thisPtr, RefPtr<ThreadableWebSocketChannelClientWrapper>, const String& taskMode, const KURL&, const String& protocol);
+
+ // Executed on the worker context's thread.
+ void clearClientWrapper();
+
+ void setMethodNotCompleted();
+ void waitForMethodCompletion();
+
+ RefPtr<ThreadableWebSocketChannelClientWrapper> m_workerClientWrapper;
+ RefPtr<WorkerContext> m_workerContext;
+ WorkerLoaderProxy& m_loaderProxy;
+ String m_taskMode;
+ Peer* m_peer;
+ };
+
+ WorkerThreadableWebSocketChannel(WorkerContext*, WebSocketChannelClient*, const String& taskMode, const KURL&, const String& protocol);
+
+ static void mainThreadConnect(ScriptExecutionContext*, Peer*);
+ static void mainThreadSend(ScriptExecutionContext*, Peer*, const String& message);
+ static void mainThreadBufferedAmount(ScriptExecutionContext*, Peer*);
+ static void mainThreadClose(ScriptExecutionContext*, Peer*);
+ static void mainThreadDestroy(ScriptExecutionContext*, Peer*);
+
+ RefPtr<WorkerContext> m_workerContext;
+ RefPtr<ThreadableWebSocketChannelClientWrapper> m_workerClientWrapper;
+ RefPtr<Bridge> m_bridge;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_SOCKETS)
+
+#endif // WorkerThreadableWebSocketChannel_h
diff --git a/WebCore/wml/WMLCardElement.cpp b/WebCore/wml/WMLCardElement.cpp
index 818b818..45752cd 100644
--- a/WebCore/wml/WMLCardElement.cpp
+++ b/WebCore/wml/WMLCardElement.cpp
@@ -136,7 +136,7 @@ void WMLCardElement::handleIntrinsicEventIfNeeded()
// Calculate the entry method of current card
WMLIntrinsicEventType eventType = WMLIntrinsicEventUnknown;
- switch (loader->loadType()) {
+ switch (loader->policyChecker()->loadType()) {
case FrameLoadTypeReload:
break;
case FrameLoadTypeBack:
diff --git a/WebCore/wml/WMLDocument.cpp b/WebCore/wml/WMLDocument.cpp
index ef0bfc8..44f4e2b 100644
--- a/WebCore/wml/WMLDocument.cpp
+++ b/WebCore/wml/WMLDocument.cpp
@@ -23,6 +23,7 @@
#if ENABLE(WML)
#include "WMLDocument.h"
+#include "BackForwardList.h"
#include "Frame.h"
#include "Page.h"
#include "Tokenizer.h"
@@ -34,7 +35,7 @@
namespace WebCore {
WMLDocument::WMLDocument(Frame* frame)
- : Document(frame, false)
+ : Document(frame, false, false)
, m_activeCard(0)
{
clearXMLVersion();
diff --git a/WebCore/wml/WMLElement.cpp b/WebCore/wml/WMLElement.cpp
index 50b0fe4..3004aba 100644
--- a/WebCore/wml/WMLElement.cpp
+++ b/WebCore/wml/WMLElement.cpp
@@ -60,7 +60,7 @@ bool WMLElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry&
void WMLElement::parseMappedAttribute(MappedAttribute* attr)
{
- if (attr->name() == HTMLNames::idAttr
+ if (attr->name() == idAttributeName()
|| attr->name() == HTMLNames::classAttr
|| attr->name() == HTMLNames::styleAttr)
return StyledElement::parseMappedAttribute(attr);
diff --git a/WebCore/wml/WMLInputElement.cpp b/WebCore/wml/WMLInputElement.cpp
index eb31502..560fd09 100644
--- a/WebCore/wml/WMLInputElement.cpp
+++ b/WebCore/wml/WMLInputElement.cpp
@@ -123,6 +123,11 @@ const AtomicString& WMLInputElement::formControlName() const
return m_data.name();
}
+const String& WMLInputElement::suggestedValue() const
+{
+ return m_data.suggestedValue();
+}
+
String WMLInputElement::value() const
{
String value = m_data.value();
@@ -132,7 +137,7 @@ String WMLInputElement::value() const
return value;
}
-void WMLInputElement::setValue(const String& value)
+void WMLInputElement::setValue(const String& value, bool sendChangeEvent)
{
setFormControlValueMatchesRenderer(false);
m_data.setValue(constrainValue(value));
@@ -151,6 +156,13 @@ void WMLInputElement::setValue(const String& value)
InputElement::notifyFormStateChanged(this);
}
+void WMLInputElement::setValueForUser(const String& value)
+{
+ /* InputElement class defines pure virtual function 'setValueForUser', which
+ will be useful only in HTMLInputElement. Do nothing in 'WMLInputElement'.
+ */
+}
+
void WMLInputElement::setValueFromRenderer(const String& value)
{
InputElement::setValueFromRenderer(m_data, this, this, value);
diff --git a/WebCore/wml/WMLInputElement.h b/WebCore/wml/WMLInputElement.h
index 98ea13a..217d9c7 100644
--- a/WebCore/wml/WMLInputElement.h
+++ b/WebCore/wml/WMLInputElement.h
@@ -56,8 +56,10 @@ public:
virtual int size() const;
virtual const AtomicString& formControlType() const;
virtual const AtomicString& formControlName() const;
+ virtual const String& suggestedValue() const;
virtual String value() const;
- virtual void setValue(const String&);
+ virtual void setValue(const String&, bool sendChangeEvent = false);
+ virtual void setValueForUser(const String&);
virtual void setValueFromRenderer(const String&);
virtual bool saveFormControlState(String& value) const;
diff --git a/WebCore/wml/WMLPageState.cpp b/WebCore/wml/WMLPageState.cpp
index 3e1863d..4cf3e34 100644
--- a/WebCore/wml/WMLPageState.cpp
+++ b/WebCore/wml/WMLPageState.cpp
@@ -24,6 +24,7 @@
#if ENABLE(WML)
#include "WMLPageState.h"
+#include "BackForwardList.h"
#include "CString.h"
#include "Document.h"
#include "Frame.h"
diff --git a/WebCore/wml/WMLPageState.h b/WebCore/wml/WMLPageState.h
index a5d8b23..ed1ce8e 100644
--- a/WebCore/wml/WMLPageState.h
+++ b/WebCore/wml/WMLPageState.h
@@ -25,6 +25,7 @@
#if ENABLE(WML)
#include "StringHash.h"
+#include <wtf/HashMap.h>
namespace WebCore {
diff --git a/WebCore/wml/WMLSelectElement.cpp b/WebCore/wml/WMLSelectElement.cpp
index 03ca05a..e6041f4 100644
--- a/WebCore/wml/WMLSelectElement.cpp
+++ b/WebCore/wml/WMLSelectElement.cpp
@@ -83,7 +83,6 @@ void WMLSelectElement::selectAll()
void WMLSelectElement::recalcStyle(StyleChange change)
{
- SelectElement::recalcStyle(m_data, this);
WMLFormControlElement::recalcStyle(change);
}
diff --git a/WebCore/workers/AbstractWorker.idl b/WebCore/workers/AbstractWorker.idl
index 00b8fbb..e5a51d6 100644
--- a/WebCore/workers/AbstractWorker.idl
+++ b/WebCore/workers/AbstractWorker.idl
@@ -33,8 +33,7 @@ module threads {
interface [
Conditional=WORKERS,
CustomToJS,
- EventTarget,
- GenerateConstructor
+ EventTarget
] AbstractWorker {
attribute EventListener onerror;
diff --git a/WebCore/workers/DedicatedWorkerContext.idl b/WebCore/workers/DedicatedWorkerContext.idl
index f421b9a..8b73a06 100644
--- a/WebCore/workers/DedicatedWorkerContext.idl
+++ b/WebCore/workers/DedicatedWorkerContext.idl
@@ -35,7 +35,8 @@ module threads {
ExtendsDOMGlobalObject,
IsWorkerContext,
GenerateNativeConverter,
- NoStaticTables
+ NoStaticTables,
+ OmitConstructor
] DedicatedWorkerContext : WorkerContext {
#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
diff --git a/WebCore/workers/SharedWorker.idl b/WebCore/workers/SharedWorker.idl
index 09475f7..c04f7cf 100644
--- a/WebCore/workers/SharedWorker.idl
+++ b/WebCore/workers/SharedWorker.idl
@@ -32,6 +32,7 @@ module threads {
interface [
Conditional=SHARED_WORKERS,
+ CustomConstructor,
CustomMarkFunction,
GenerateNativeConverter,
GenerateToJS
diff --git a/WebCore/workers/SharedWorkerContext.idl b/WebCore/workers/SharedWorkerContext.idl
index a48e5bd..9d01f4f 100644
--- a/WebCore/workers/SharedWorkerContext.idl
+++ b/WebCore/workers/SharedWorkerContext.idl
@@ -35,7 +35,8 @@ module threads {
ExtendsDOMGlobalObject,
IsWorkerContext,
GenerateNativeConverter,
- NoStaticTables
+ NoStaticTables,
+ OmitConstructor
] SharedWorkerContext : WorkerContext {
readonly attribute DOMString name;
diff --git a/WebCore/workers/Worker.idl b/WebCore/workers/Worker.idl
index 0382739..54d406d 100644
--- a/WebCore/workers/Worker.idl
+++ b/WebCore/workers/Worker.idl
@@ -28,6 +28,7 @@ module threads {
interface [
Conditional=WORKERS,
+ CustomConstructor,
GenerateNativeConverter,
GenerateToJS
] Worker : AbstractWorker {
diff --git a/WebCore/workers/WorkerContext.cpp b/WebCore/workers/WorkerContext.cpp
index e823278..0ec24e6 100644
--- a/WebCore/workers/WorkerContext.cpp
+++ b/WebCore/workers/WorkerContext.cpp
@@ -32,6 +32,7 @@
#include "WorkerContext.h"
#include "ActiveDOMObject.h"
+#include "Database.h"
#include "DOMTimer.h"
#include "DOMWindow.h"
#include "Event.h"
@@ -254,6 +255,27 @@ NotificationCenter* WorkerContext::webkitNotifications() const
}
#endif
+#if ENABLE(DATABASE)
+PassRefPtr<Database> WorkerContext::openDatabase(const String& name, const String& version, const String& displayName, unsigned long estimatedSize, ExceptionCode& ec)
+{
+ if (!securityOrigin()->canAccessDatabase()) {
+ ec = SECURITY_ERR;
+ return 0;
+ }
+
+ ASSERT(Database::isAvailable());
+ if (!Database::isAvailable())
+ return 0;
+
+ return Database::openDatabase(this, name, version, displayName, estimatedSize, ec);
+}
+#endif
+
+bool WorkerContext::isContextThread() const
+{
+ return currentThread() == thread()->threadID();
+}
+
EventTargetData* WorkerContext::eventTargetData()
{
return &m_eventTargetData;
diff --git a/WebCore/workers/WorkerContext.h b/WebCore/workers/WorkerContext.h
index f37d42c..a795947 100644
--- a/WebCore/workers/WorkerContext.h
+++ b/WebCore/workers/WorkerContext.h
@@ -30,11 +30,13 @@
#if ENABLE(WORKERS)
#include "AtomicStringHash.h"
+#include "Database.h"
#include "EventListener.h"
#include "EventNames.h"
#include "EventTarget.h"
#include "ScriptExecutionContext.h"
#include "WorkerScriptController.h"
+#include <wtf/Assertions.h>
#include <wtf/OwnPtr.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
@@ -42,6 +44,7 @@
namespace WebCore {
+ class Database;
class NotificationCenter;
class ScheduledAction;
class WorkerLocation;
@@ -65,9 +68,9 @@ namespace WebCore {
virtual String userAgent(const KURL&) const;
WorkerScriptController* script() { return m_script.get(); }
- void clearScript() { return m_script.clear(); }
+ void clearScript() { m_script.clear(); }
- WorkerThread* thread() { return m_thread; }
+ WorkerThread* thread() const { return m_thread; }
bool hasPendingActivity() const;
@@ -101,6 +104,17 @@ namespace WebCore {
NotificationCenter* webkitNotifications() const;
#endif
+#if ENABLE(DATABASE)
+ // HTML 5 client-side database
+ PassRefPtr<Database> openDatabase(const String& name, const String& version, const String& displayName, unsigned long estimatedSize, ExceptionCode&);
+ // Not implemented yet.
+ virtual bool isDatabaseReadOnly() const { return false; }
+ // Not implemented yet.
+ virtual void databaseExceededQuota(const String&) { }
+#endif
+ virtual bool isContextThread() const;
+
+
// These methods are used for GC marking. See JSWorkerContext::markChildren(MarkStack&) in
// JSWorkerContextCustom.cpp.
WorkerNavigator* optionalNavigator() const { return m_navigator.get(); }
diff --git a/WebCore/workers/WorkerContext.idl b/WebCore/workers/WorkerContext.idl
index 0a5817c..bce4f53 100644
--- a/WebCore/workers/WorkerContext.idl
+++ b/WebCore/workers/WorkerContext.idl
@@ -34,7 +34,8 @@ module threads {
ExtendsDOMGlobalObject,
IsWorkerContext,
LegacyParent=JSWorkerContextBase,
- NoStaticTables
+ NoStaticTables,
+ OmitConstructor
] WorkerContext {
// WorkerGlobalScope
@@ -86,6 +87,9 @@ module threads {
attribute [JSCCustomGetter] EventSourceConstructor EventSource;
#endif
attribute [JSCCustomGetter] XMLHttpRequestConstructor XMLHttpRequest;
+#if defined(ENABLE_WEB_SOCKETS) && ENABLE_WEB_SOCKETS
+ attribute [JSCCustomGetter,EnabledAtRuntime] WebSocketConstructor WebSocket; // Usable with the new operator
+#endif
};
}
diff --git a/WebCore/workers/WorkerLocation.idl b/WebCore/workers/WorkerLocation.idl
index 5551f18..429d522 100644
--- a/WebCore/workers/WorkerLocation.idl
+++ b/WebCore/workers/WorkerLocation.idl
@@ -30,7 +30,6 @@ module threads {
interface [
Conditional=WORKERS,
- GenerateConstructor,
NoStaticTables
] WorkerLocation {
readonly attribute DOMString href;
diff --git a/WebCore/workers/WorkerRunLoop.cpp b/WebCore/workers/WorkerRunLoop.cpp
index 445fa65..83f243f 100644
--- a/WebCore/workers/WorkerRunLoop.cpp
+++ b/WebCore/workers/WorkerRunLoop.cpp
@@ -152,9 +152,7 @@ MessageQueueWaitResult WorkerRunLoop::runInMode(WorkerContext* context, const Mo
MessageQueueWaitResult result;
OwnPtr<WorkerRunLoop::Task> task = m_messageQueue.waitForMessageFilteredWithTimeout(result, predicate, absoluteTime);
- // If the context is closing, don't dispatch any further tasks (per section 4.1.1 of the Web Workers spec).
- if (context->isClosing())
- return result;
+ // If the context is closing, don't execute any further JavaScript tasks (per section 4.1.1 of the Web Workers spec). However, there may be implementation cleanup tasks in the queue, so keep running through it.
switch (result) {
case MessageQueueTerminated:
@@ -165,7 +163,8 @@ MessageQueueWaitResult WorkerRunLoop::runInMode(WorkerContext* context, const Mo
break;
case MessageQueueTimeout:
- m_sharedTimer->fire();
+ if (!context->isClosing())
+ m_sharedTimer->fire();
break;
}
@@ -194,7 +193,9 @@ PassOwnPtr<WorkerRunLoop::Task> WorkerRunLoop::Task::create(PassOwnPtr<ScriptExe
void WorkerRunLoop::Task::performTask(ScriptExecutionContext* context)
{
- m_task->performTask(context);
+ WorkerContext* workerContext = static_cast<WorkerContext *>(context);
+ if (!workerContext->isClosing() || m_task->isCleanupTask())
+ m_task->performTask(context);
}
WorkerRunLoop::Task::Task(PassOwnPtr<ScriptExecutionContext::Task> task, const String& mode)
diff --git a/WebCore/workers/WorkerThread.cpp b/WebCore/workers/WorkerThread.cpp
index 467157b..fbeb95b 100644
--- a/WebCore/workers/WorkerThread.cpp
+++ b/WebCore/workers/WorkerThread.cpp
@@ -30,6 +30,7 @@
#include "WorkerThread.h"
+#include "DatabaseTask.h"
#include "DedicatedWorkerContext.h"
#include "KURL.h"
#include "PlatformString.h"
@@ -135,9 +136,8 @@ void* WorkerThread::workerThread()
ThreadIdentifier threadID = m_threadID;
- m_workerContext->stopActiveDOMObjects();
- m_workerContext->clearScript();
ASSERT(m_workerContext->hasOneRef());
+
// The below assignment will destroy the context, which will in turn notify messaging proxy.
// We cannot let any objects survive past thread exit, because no other thread will run GC or otherwise destroy them.
m_workerContext = 0;
@@ -154,17 +154,70 @@ void WorkerThread::runEventLoop()
m_runLoop.run(m_workerContext.get());
}
+class WorkerThreadShutdownFinishTask : public ScriptExecutionContext::Task {
+public:
+ static PassOwnPtr<WorkerThreadShutdownFinishTask> create()
+ {
+ return new WorkerThreadShutdownFinishTask();
+ }
+
+ virtual void performTask(ScriptExecutionContext *context)
+ {
+ ASSERT(context->isWorkerContext());
+ WorkerContext* workerContext = static_cast<WorkerContext*>(context);
+ workerContext->thread()->runLoop().terminate();
+ }
+
+ virtual bool isCleanupTask() const { return true; }
+};
+
+class WorkerThreadShutdownStartTask : public ScriptExecutionContext::Task {
+public:
+ static PassOwnPtr<WorkerThreadShutdownStartTask> create()
+ {
+ return new WorkerThreadShutdownStartTask();
+ }
+
+ virtual void performTask(ScriptExecutionContext *context)
+ {
+ ASSERT(context->isWorkerContext());
+ WorkerContext* workerContext = static_cast<WorkerContext*>(context);
+
+ // We currently ignore any DatabasePolicy used for the document's
+ // databases; if it's actually used anywhere, this should be revisited.
+ DatabaseTaskSynchronizer cleanupSync;
+ workerContext->stopDatabases(&cleanupSync);
+
+ workerContext->stopActiveDOMObjects();
+ workerContext->clearScript();
+
+ // We wait for the database thread to clean up all its stuff so that we
+ // can do more stringent leak checks as we exit.
+ cleanupSync.waitForTaskCompletion();
+
+ // Stick a shutdown command at the end of the queue, so that we deal
+ // with all the cleanup tasks the databases post first.
+ workerContext->postTask(WorkerThreadShutdownFinishTask::create());
+ }
+
+ virtual bool isCleanupTask() const { return true; }
+};
+
void WorkerThread::stop()
{
// Mutex protection is necessary because stop() can be called before the context is fully created.
MutexLocker lock(m_threadCreationMutex);
// Ensure that tasks are being handled by thread event loop. If script execution weren't forbidden, a while(1) loop in JS could keep the thread alive forever.
- if (m_workerContext)
+ if (m_workerContext) {
m_workerContext->script()->forbidExecution();
// FIXME: Rudely killing the thread won't work when we allow nested workers, because they will try to post notifications of their destruction.
- m_runLoop.terminate();
+ // This can likely use the same mechanism as used for databases above.
+
+ m_runLoop.postTask(WorkerThreadShutdownStartTask::create());
+ } else
+ m_runLoop.terminate();
}
} // namespace WebCore
diff --git a/WebCore/wscript b/WebCore/wscript
index 1ad8e90..19cc392 100644
--- a/WebCore/wscript
+++ b/WebCore/wscript
@@ -36,6 +36,7 @@ if build_port == "wx":
# wxTimer on Windows has a bug that causes it to eat crashes in callbacks
# so we need to use the Win port's implementation until the wx bug fix is
# widely available (it was fixed in 2.8.10).
+ 'platform/graphics/win/TransformationMatrixWin.cpp',
'platform/win/SharedTimerWin.cpp',
# Use the Windows plugin architecture
'page/win/PageWin.cpp',
@@ -122,6 +123,8 @@ def build(bld):
if os.path.isdir(fullpath) and not item == "os-win32" and not item == 'icu':
wk_includes.append(fullpath)
+ wk_includes.append(os.path.join(jscore_dir, 'wtf', 'unicode'))
+ wk_includes.append(os.path.join(jscore_dir, 'wtf', 'unicode', 'icu'))
wk_includes += common_includes + full_dirs
cxxflags = []
diff --git a/WebCore/xml/DOMParser.idl b/WebCore/xml/DOMParser.idl
index 9caaa21..90a8b52 100644
--- a/WebCore/xml/DOMParser.idl
+++ b/WebCore/xml/DOMParser.idl
@@ -18,7 +18,7 @@
*/
module xpath {
- interface [GenerateConstructor, CanBeConstructed] DOMParser {
+ interface [CanBeConstructed] DOMParser {
Document parseFromString(in DOMString str, in DOMString contentType);
};
}
diff --git a/WebCore/xml/XMLHttpRequest.cpp b/WebCore/xml/XMLHttpRequest.cpp
index f1a7969..32818df 100644
--- a/WebCore/xml/XMLHttpRequest.cpp
+++ b/WebCore/xml/XMLHttpRequest.cpp
@@ -22,6 +22,7 @@
#include "config.h"
#include "XMLHttpRequest.h"
+#include "Blob.h"
#include "Cache.h"
#include "CString.h"
#include "CrossOriginAccessControl.h"
@@ -31,7 +32,6 @@
#include "EventException.h"
#include "EventListener.h"
#include "EventNames.h"
-#include "File.h"
#include "HTTPParsers.h"
#include "InspectorTimelineAgent.h"
#include "ResourceError.h"
@@ -435,7 +435,7 @@ void XMLHttpRequest::send(const String& body, ExceptionCode& ec)
createRequest(ec);
}
-void XMLHttpRequest::send(File* body, ExceptionCode& ec)
+void XMLHttpRequest::send(Blob* body, ExceptionCode& ec)
{
if (!initSend(ec))
return;
diff --git a/WebCore/xml/XMLHttpRequest.h b/WebCore/xml/XMLHttpRequest.h
index 69019a5..2cea5c6 100644
--- a/WebCore/xml/XMLHttpRequest.h
+++ b/WebCore/xml/XMLHttpRequest.h
@@ -33,8 +33,8 @@
namespace WebCore {
+class Blob;
class Document;
-class File;
class ResourceRequest;
class TextResourceDecoder;
class ThreadableLoader;
@@ -72,7 +72,7 @@ public:
void send(ExceptionCode&);
void send(Document*, ExceptionCode&);
void send(const String&, ExceptionCode&);
- void send(File*, ExceptionCode&);
+ void send(Blob*, ExceptionCode&);
void abort();
void setRequestHeader(const AtomicString& name, const String& value, ExceptionCode&);
void overrideMimeType(const String& override);
diff --git a/WebCore/xml/XMLHttpRequest.idl b/WebCore/xml/XMLHttpRequest.idl
index 89d9c7f..70cd58a 100644
--- a/WebCore/xml/XMLHttpRequest.idl
+++ b/WebCore/xml/XMLHttpRequest.idl
@@ -29,6 +29,7 @@
module xml {
interface [
+ CustomConstructor,
CustomMarkFunction,
EventTarget,
NoStaticTables
diff --git a/WebCore/xml/XMLHttpRequestException.idl b/WebCore/xml/XMLHttpRequestException.idl
index 380e426..7121468 100644
--- a/WebCore/xml/XMLHttpRequestException.idl
+++ b/WebCore/xml/XMLHttpRequestException.idl
@@ -29,7 +29,6 @@
module xml {
interface [
- GenerateConstructor,
NoStaticTables
] XMLHttpRequestException {
diff --git a/WebCore/xml/XMLHttpRequestProgressEvent.idl b/WebCore/xml/XMLHttpRequestProgressEvent.idl
index 549308b..bc5055a 100644
--- a/WebCore/xml/XMLHttpRequestProgressEvent.idl
+++ b/WebCore/xml/XMLHttpRequestProgressEvent.idl
@@ -26,7 +26,6 @@
module events {
interface [
- GenerateConstructor,
NoStaticTables
// We should also inherit from LSProgressEvent when the idl is added.
] XMLHttpRequestProgressEvent : ProgressEvent {
diff --git a/WebCore/xml/XMLHttpRequestUpload.idl b/WebCore/xml/XMLHttpRequestUpload.idl
index 901b47c..ce392f3 100644
--- a/WebCore/xml/XMLHttpRequestUpload.idl
+++ b/WebCore/xml/XMLHttpRequestUpload.idl
@@ -31,7 +31,6 @@ module xml {
interface [
CustomMarkFunction,
EventTarget,
- GenerateConstructor,
NoStaticTables
] XMLHttpRequestUpload {
// From XMLHttpRequestEventTarget
diff --git a/WebCore/xml/XMLSerializer.idl b/WebCore/xml/XMLSerializer.idl
index 6dcc3a4..8c59446 100644
--- a/WebCore/xml/XMLSerializer.idl
+++ b/WebCore/xml/XMLSerializer.idl
@@ -20,7 +20,7 @@
module xpath {
- interface [GenerateConstructor, CanBeConstructed] XMLSerializer {
+ interface [CanBeConstructed] XMLSerializer {
DOMString serializeToString(in Node node)
raises(DOMException);
};
diff --git a/WebCore/xml/XPathEvaluator.idl b/WebCore/xml/XPathEvaluator.idl
index da6155b..c075b01 100644
--- a/WebCore/xml/XPathEvaluator.idl
+++ b/WebCore/xml/XPathEvaluator.idl
@@ -18,7 +18,7 @@
*/
module xpath {
- interface [GenerateConstructor, CanBeConstructed, Conditional=XPATH] XPathEvaluator {
+ interface [CanBeConstructed, Conditional=XPATH] XPathEvaluator {
XPathExpression createExpression(in DOMString expression,
in XPathNSResolver resolver)
raises(core::DOMException);
diff --git a/WebCore/xml/XPathException.idl b/WebCore/xml/XPathException.idl
index c3c95e3..d5a9af6 100644
--- a/WebCore/xml/XPathException.idl
+++ b/WebCore/xml/XPathException.idl
@@ -29,7 +29,6 @@
module xpath {
interface [
- GenerateConstructor,
Conditional=XPATH
] XPathException {
diff --git a/WebCore/xml/XPathExpression.idl b/WebCore/xml/XPathExpression.idl
index c1fc15e..6b6ceeb 100644
--- a/WebCore/xml/XPathExpression.idl
+++ b/WebCore/xml/XPathExpression.idl
@@ -22,8 +22,7 @@ module xpath {
interface [
- Conditional=XPATH,
- GenerateConstructor
+ Conditional=XPATH
] XPathExpression {
[OldStyleObjC] XPathResult evaluate(in Node contextNode,
in unsigned short type,
diff --git a/WebCore/xml/XPathNSResolver.idl b/WebCore/xml/XPathNSResolver.idl
index 48c0113..4e996c2 100644
--- a/WebCore/xml/XPathNSResolver.idl
+++ b/WebCore/xml/XPathNSResolver.idl
@@ -20,7 +20,7 @@
module xpath {
- interface [ObjCProtocol, Conditional=XPATH] XPathNSResolver {
+ interface [ObjCProtocol, Conditional=XPATH, OmitConstructor] XPathNSResolver {
[ConvertNullStringTo=Null] DOMString lookupNamespaceURI(in DOMString prefix);
};
diff --git a/WebCore/xml/XPathResult.idl b/WebCore/xml/XPathResult.idl
index bc36c3e..ebbff42 100644
--- a/WebCore/xml/XPathResult.idl
+++ b/WebCore/xml/XPathResult.idl
@@ -19,7 +19,7 @@
module xpath {
- interface [GenerateConstructor, Conditional=XPATH] XPathResult {
+ interface [Conditional=XPATH] XPathResult {
const unsigned short ANY_TYPE = 0;
const unsigned short NUMBER_TYPE = 1;
const unsigned short STRING_TYPE = 2;
diff --git a/WebCore/xml/XPathStep.cpp b/WebCore/xml/XPathStep.cpp
index e5f2048..6e60952 100644
--- a/WebCore/xml/XPathStep.cpp
+++ b/WebCore/xml/XPathStep.cpp
@@ -34,6 +34,7 @@
#include "Document.h"
#include "Element.h"
#include "NamedNodeMap.h"
+#include "XMLNSNames.h"
#include "XPathParser.h"
#include "XPathUtil.h"
@@ -173,7 +174,7 @@ static inline bool nodeMatchesBasicTest(Node* node, Step::Axis axis, const Step:
ASSERT(node->isAttributeNode());
// In XPath land, namespace nodes are not accessible on the attribute axis.
- if (node->namespaceURI() == "http://www.w3.org/2000/xmlns/")
+ if (node->namespaceURI() == XMLNSNames::xmlnsNamespaceURI)
return false;
if (name == starAtom)
@@ -335,7 +336,7 @@ void Step::nodesInAxis(Node* context, NodeSet& nodes) const
// Avoid lazily creating attribute nodes for attributes that we do not need anyway.
if (m_nodeTest.kind() == NodeTest::NameTest && m_nodeTest.data() != starAtom) {
RefPtr<Node> n = static_cast<Element*>(context)->getAttributeNodeNS(m_nodeTest.namespaceURI(), m_nodeTest.data());
- if (n && n->namespaceURI() != "http://www.w3.org/2000/xmlns/") { // In XPath land, namespace nodes are not accessible on the attribute axis.
+ if (n && n->namespaceURI() != XMLNSNames::xmlnsNamespaceURI) { // In XPath land, namespace nodes are not accessible on the attribute axis.
if (nodeMatches(n.get(), AttributeAxis, m_nodeTest)) // Still need to check merged predicates.
nodes.append(n.release());
}
diff --git a/WebCore/xml/XSLImportRule.cpp b/WebCore/xml/XSLImportRule.cpp
index b697c0d..c0f6363 100644
--- a/WebCore/xml/XSLImportRule.cpp
+++ b/WebCore/xml/XSLImportRule.cpp
@@ -52,13 +52,13 @@ XSLStyleSheet* XSLImportRule::parentStyleSheet() const
return (parent() && parent()->isXSLStyleSheet()) ? static_cast<XSLStyleSheet*>(parent()) : 0;
}
-void XSLImportRule::setXSLStyleSheet(const String& url, const String& sheet)
+void XSLImportRule::setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet)
{
if (m_styleSheet)
m_styleSheet->setParent(0);
-
- m_styleSheet = XSLStyleSheet::create(this, url);
-
+
+ m_styleSheet = XSLStyleSheet::create(this, href, baseURL);
+
XSLStyleSheet* parent = parentStyleSheet();
if (parent)
m_styleSheet->setParentStyleSheet(parent);
@@ -87,14 +87,14 @@ void XSLImportRule::loadSheet()
String absHref = m_strHref;
XSLStyleSheet* parentSheet = parentStyleSheet();
- if (!parentSheet->href().isNull())
+ if (!parentSheet->putativeBaseURL().isNull())
// use parent styleheet's URL as the base URL
- absHref = KURL(KURL(ParsedURLString, parentSheet->href()), m_strHref).string();
+ absHref = KURL(parentSheet->putativeBaseURL(), m_strHref).string();
// Check for a cycle in our import chain. If we encounter a stylesheet
// in our parent chain with the same URL, then just bail.
for (parent = this->parent(); parent; parent = parent->parent()) {
- if (parent->isXSLStyleSheet() && absHref == static_cast<XSLStyleSheet*>(parent)->href())
+ if (parent->isXSLStyleSheet() && absHref == static_cast<XSLStyleSheet*>(parent)->putativeBaseURL().string())
return;
}
diff --git a/WebCore/xml/XSLImportRule.h b/WebCore/xml/XSLImportRule.h
index fc7a7f8..f3a9318 100644
--- a/WebCore/xml/XSLImportRule.h
+++ b/WebCore/xml/XSLImportRule.h
@@ -57,7 +57,7 @@ private:
virtual bool isImportRule() { return true; }
// from CachedResourceClient
- virtual void setXSLStyleSheet(const String& url, const String& sheet);
+ virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet);
String m_strHref;
RefPtr<XSLStyleSheet> m_styleSheet;
diff --git a/WebCore/xml/XSLStyleSheet.h b/WebCore/xml/XSLStyleSheet.h
index c9729bb..b3861a0 100644
--- a/WebCore/xml/XSLStyleSheet.h
+++ b/WebCore/xml/XSLStyleSheet.h
@@ -43,18 +43,18 @@ class XSLImportRule;
class XSLStyleSheet : public StyleSheet {
public:
#if !USE(QXMLQUERY)
- static PassRefPtr<XSLStyleSheet> create(XSLImportRule* parentImport, const String& href)
+ static PassRefPtr<XSLStyleSheet> create(XSLImportRule* parentImport, const String& href, const KURL& baseURL)
{
- return adoptRef(new XSLStyleSheet(parentImport, href));
+ return adoptRef(new XSLStyleSheet(parentImport, href, baseURL));
}
#endif
- static PassRefPtr<XSLStyleSheet> create(Node* parentNode, const String& href)
+ static PassRefPtr<XSLStyleSheet> create(Node* parentNode, const String& href, const KURL& baseURL)
{
- return adoptRef(new XSLStyleSheet(parentNode, href, false));
+ return adoptRef(new XSLStyleSheet(parentNode, href, baseURL, false));
}
- static PassRefPtr<XSLStyleSheet> createEmbedded(Node* parentNode, const String& href)
+ static PassRefPtr<XSLStyleSheet> createEmbedded(Node* parentNode, const String& href, const KURL& baseURL)
{
- return adoptRef(new XSLStyleSheet(parentNode, href, true));
+ return adoptRef(new XSLStyleSheet(parentNode, href, baseURL, true));
}
virtual ~XSLStyleSheet();
@@ -90,9 +90,9 @@ public:
bool processed() const { return m_processed; }
private:
- XSLStyleSheet(Node* parentNode, const String& href, bool embedded);
+ XSLStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, bool embedded);
#if !USE(QXMLQUERY)
- XSLStyleSheet(XSLImportRule* parentImport, const String& href);
+ XSLStyleSheet(XSLImportRule* parentImport, const String& href, const KURL& baseURL);
#endif
Document* m_ownerDocument;
diff --git a/WebCore/xml/XSLStyleSheetLibxslt.cpp b/WebCore/xml/XSLStyleSheetLibxslt.cpp
index 2ae8b82..4122aa1 100644
--- a/WebCore/xml/XSLStyleSheetLibxslt.cpp
+++ b/WebCore/xml/XSLStyleSheetLibxslt.cpp
@@ -55,8 +55,8 @@ SOFT_LINK(libxslt, xsltLoadStylesheetPI, xsltStylesheetPtr, (xmlDocPtr doc), (do
namespace WebCore {
-XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& href)
- : StyleSheet(parentRule, href)
+XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& href, const KURL& baseURL)
+ : StyleSheet(parentRule, href, baseURL)
, m_ownerDocument(0)
, m_embedded(false)
, m_processed(false) // Child sheets get marked as processed when the libxslt engine has finally seen them.
@@ -66,8 +66,8 @@ XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& href)
{
}
-XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, bool embedded)
- : StyleSheet(parentNode, href)
+XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, bool embedded)
+ : StyleSheet(parentNode, href, baseURL)
, m_ownerDocument(parentNode->document())
, m_embedded(embedded)
, m_processed(true) // The root sheet starts off processed.
@@ -168,7 +168,7 @@ bool XSLStyleSheet::parseString(const String& string, bool)
}
m_stylesheetDoc = xmlCtxtReadMemory(ctxt, buffer, size,
- href().utf8().data(),
+ putativeBaseURL().string().utf8().data(),
BOMHighByte == 0xFF ? "UTF-16LE" : "UTF-16BE",
XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_NOWARNING | XML_PARSE_NOCDATA);
xmlFreeParserCtxt(ctxt);
@@ -192,7 +192,7 @@ void XSLStyleSheet::loadChildSheets()
if (m_embedded) {
// We have to locate (by ID) the appropriate embedded stylesheet element, so that we can walk the
// import/include list.
- xmlAttrPtr idNode = xmlGetID(document(), (const xmlChar*)(href().utf8().data()));
+ xmlAttrPtr idNode = xmlGetID(document(), (const xmlChar*)(putativeBaseURL().string().utf8().data()));
if (!idNode)
return;
stylesheetRoot = idNode->parent;
diff --git a/WebCore/xml/XSLStyleSheetQt.cpp b/WebCore/xml/XSLStyleSheetQt.cpp
index 6d27e20..4151be4 100644
--- a/WebCore/xml/XSLStyleSheetQt.cpp
+++ b/WebCore/xml/XSLStyleSheetQt.cpp
@@ -33,8 +33,8 @@
namespace WebCore {
-XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, bool embedded)
- : StyleSheet(parentNode, href)
+XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, bool embedded)
+ : StyleSheet(parentNode, href, baseURL)
, m_ownerDocument(parentNode->document())
, m_embedded(embedded)
{
diff --git a/WebCore/xml/XSLTProcessor.idl b/WebCore/xml/XSLTProcessor.idl
index 0a6ff93..28bd878 100644
--- a/WebCore/xml/XSLTProcessor.idl
+++ b/WebCore/xml/XSLTProcessor.idl
@@ -33,7 +33,8 @@ module xml {
// http://bugs.webkit.org/show_bug.cgi?id=5446
interface [
- Conditional=XSLT
+ Conditional=XSLT,
+ CustomConstructor
] XSLTProcessor {
[Custom] void importStylesheet(in Node stylesheet);
diff --git a/WebCore/xml/XSLTProcessorLibxslt.cpp b/WebCore/xml/XSLTProcessorLibxslt.cpp
index 200c56b..ded5c68 100644
--- a/WebCore/xml/XSLTProcessorLibxslt.cpp
+++ b/WebCore/xml/XSLTProcessorLibxslt.cpp
@@ -226,7 +226,8 @@ static xsltStylesheetPtr xsltStylesheetPointer(RefPtr<XSLStyleSheet>& cachedStyl
{
if (!cachedStylesheet && stylesheetRootNode) {
cachedStylesheet = XSLStyleSheet::create(stylesheetRootNode->parent() ? stylesheetRootNode->parent() : stylesheetRootNode,
- stylesheetRootNode->document()->url().string());
+ stylesheetRootNode->document()->url().string(),
+ stylesheetRootNode->document()->url()); // FIXME: Should we use baseURL here?
cachedStylesheet->parseString(createMarkup(stylesheetRootNode));
}
diff --git a/WebCore/xml/XSLTProcessorQt.cpp b/WebCore/xml/XSLTProcessorQt.cpp
index 50ee427..9ac3f5d 100644
--- a/WebCore/xml/XSLTProcessorQt.cpp
+++ b/WebCore/xml/XSLTProcessorQt.cpp
@@ -36,6 +36,7 @@
#include <wtf/Vector.h>
#include <qabstractmessagehandler.h>
+#include <qabstracturiresolver.h>
#include <qbuffer.h>
#include <qsourcelocation.h>
#include <qxmlquery.h>
@@ -87,6 +88,31 @@ void XSLTMessageHandler::handleMessage(QtMsgType type, const QString& descriptio
sourceLocation.line(), sourceLocation.uri().toString());
}
+class XSLTUriResolver : public QAbstractUriResolver {
+
+public:
+ XSLTUriResolver(Document* document);
+ virtual QUrl resolve(const QUrl& relative, const QUrl& baseURI) const;
+
+private:
+ Document* m_document;
+};
+
+XSLTUriResolver::XSLTUriResolver(Document* document)
+ : QAbstractUriResolver()
+ , m_document(document)
+{
+}
+
+QUrl XSLTUriResolver::resolve(const QUrl& relative, const QUrl& baseURI) const
+{
+ QUrl url = baseURI.resolved(relative);
+
+ if (!m_document->frame() || !m_document->securityOrigin()->canRequest(url))
+ return QUrl();
+ return url;
+}
+
bool XSLTProcessor::transformToString(Node* sourceNode, String&, String& resultString, String&)
{
bool success = false;
@@ -94,7 +120,9 @@ bool XSLTProcessor::transformToString(Node* sourceNode, String&, String& resultS
RefPtr<XSLStyleSheet> stylesheet = m_stylesheet;
if (!stylesheet && m_stylesheetRootNode) {
Node* node = m_stylesheetRootNode.get();
- stylesheet = XSLStyleSheet::create(node->parent() ? node->parent() : node, node->document()->url().string());
+ stylesheet = XSLStyleSheet::create(node->parent() ? node->parent() : node,
+ node->document()->url().string(),
+ node->document()->url()); // FIXME: Should we use baseURL here?
stylesheet->parseString(createMarkup(node));
}
@@ -107,6 +135,7 @@ bool XSLTProcessor::transformToString(Node* sourceNode, String&, String& resultS
QXmlQuery query(QXmlQuery::XSLT20);
XSLTMessageHandler messageHandler(ownerDocument.get());
+ XSLTUriResolver uriResolver(ownerDocument.get());
query.setMessageHandler(&messageHandler);
XSLTProcessor::ParameterMap::iterator end = m_parameters.end();
@@ -132,6 +161,9 @@ bool XSLTProcessor::transformToString(Node* sourceNode, String&, String& resultS
query.setFocus(&inputBuffer);
query.setQuery(&styleSheetBuffer, QUrl(stylesheet->href()));
+
+ query.setUriResolver(&uriResolver);
+
success = query.evaluateTo(&outputBuffer);
outputBuffer.reset();
resultString = QString::fromUtf8(outputBuffer.readAll()).trimmed();
diff --git a/WebCore/xml/xmlnsattrs.in b/WebCore/xml/xmlnsattrs.in
new file mode 100644
index 0000000..7ac415a
--- /dev/null
+++ b/WebCore/xml/xmlnsattrs.in
@@ -0,0 +1,4 @@
+namespace="XMLNS"
+namespaceURI="http://www.w3.org/2000/xmlns/"
+
+xmlns
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 90a6a28..1b7118f 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,76 @@
+2010-01-29 Mark Rowe <mrowe@apple.com>
+
+ Sort Xcode projects.
+
+ * WebKit.xcodeproj/project.pbxproj:
+
+2010-01-19 Dan Bernstein <mitz@apple.com>
+
+ Redo DumpRenderTree build fix without making WebTypesInternal.h a private header
+
+ * WebKit.xcodeproj/project.pbxproj:
+
+2010-01-19 Simon Fraser <simon.fraser@apple.com>
+
+ Build fix, no review.
+
+ Fix build of DumpRenderTree by making the header WebTypesInternal.h Private
+ in WebKit.
+
+ * WebKit.xcodeproj/project.pbxproj:
+
+2010-01-19 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: The child <option> elements of a non-multiple <select> are not
+ exposed
+
+ https://bugs.webkit.org/show_bug.cgi?id=33773
+ <rdar://problem/7550556>
+
+ Reviewed by Alice Liu.
+
+ * English.lproj/Localizable.strings:
+ Add new localized strings.
+
+2010-01-13 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33610
+ <rdar://problem/7288546> Silverlight full screen performance problem seen on Snow Leopard.
+
+ * WebKit.xcodeproj/project.pbxproj: Link the project against OpenGL.
+
+2009-12-25 Darin Adler <darin@apple.com>
+
+ * StringsNotToBeLocalized.txt: Updated for recent changes.
+
+2009-12-18 Dan Bernstein <mitz@apple.com>
+
+ Updated localizable strings after r52368
+
+ * English.lproj/Localizable.strings:
+
+2009-12-18 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Add Mac WebKit side of the client based geolocation provider.
+
+ * WebKit.xcodeproj/project.pbxproj:
+
+2009-12-16 Mark Rowe <mrowe@apple.com>
+
+ Build fix. Disable debug variants of WebKit frameworks.
+
+ * WebKit.xcodeproj/project.pbxproj:
+
+2009-12-16 John Sullivan <sullivan@apple.com>
+
+ Brought this file up to date, sans review.
+
+ * StringsNotToBeLocalized.txt:
+
2009-11-30 Mark Rowe <mrowe@apple.com>
Use the correct path to Info.plist to avoid creating an empty file at the top of the WebKit directory.
diff --git a/WebKit/English.lproj/Localizable.strings b/WebKit/English.lproj/Localizable.strings
index fb857f5..42c1386 100644
--- a/WebKit/English.lproj/Localizable.strings
+++ b/WebKit/English.lproj/Localizable.strings
Binary files differ
diff --git a/WebKit/StringsNotToBeLocalized.txt b/WebKit/StringsNotToBeLocalized.txt
index 90b29be..b39a1b0 100644
--- a/WebKit/StringsNotToBeLocalized.txt
+++ b/WebKit/StringsNotToBeLocalized.txt
@@ -15,6 +15,7 @@
"%.2lu/%.2lu/%.10lu-%.10lu.cache"
"%.2u/%.2u/%.10u-%.10u.cache"
"%0.fpx"
+"%02d:%02d"
"%20"
"%2d) "
"%4u"
@@ -32,10 +33,12 @@
"%@://%@/%@"
"%@://%@:%d"
"%d"
+"%d:%02d:%02d"
"%d_%d"
"%d_%d_%d"
"%dpx"
"%ld"
+"%u"
"&ie=UTF-8&oe=UTF-8"
"(%.0f, %.0f)"
"+"
@@ -135,6 +138,7 @@
"Content-Encoding"
"Content-Length"
"Content-Type"
+"ControlsPanel"
"CurrentTimeDisplay"
"D"
"DCMDictionaryServiceWindowShow"
@@ -163,6 +167,7 @@
"HIDictionaryWindowShow"
"HTTP "
"Helvetica"
+"HideClosedCaptionsButton"
"HostedNetscapePluginStream"
"IDNScriptWhiteList"
"IDNScriptWhiteList.txt"
@@ -184,6 +189,7 @@
"InsertNewline"
"InsertTab"
"Intel"
+"JSDOMWindowShell"
"JavaScript"
"JavaScriptFreeSize"
"JavaScriptHeapSize"
@@ -259,6 +265,7 @@
"SeekBackButton"
"SeekForwardButton"
"SelectAll"
+"ShowClosedCaptionsButton"
"Slider"
"SliderThumb"
"StatusDisplay"
@@ -380,6 +387,7 @@
"WebMainResource"
"WebModalDialogPretendWindow"
"WebMutableURLRequest"
+"WebNavigationData"
"WebNodeHighlightPointer"
"WebNodeHighlightWindowClass"
"WebNotification"
@@ -424,8 +432,10 @@
"WebScriptErrorDomain"
"WebScriptErrorLineNumber"
"WebScriptObject"
+"WebScriptWorld"
"WebScrollBar"
"WebSecurityOrigin"
+"WebSerializedJSValue"
"WebSiteURLToIconURLKey"
"WebSubframeArchives"
"WebSubresources"
@@ -466,12 +476,15 @@
"\n--------------------------------------------\n"
"\r"
"\xFF\xD8\xFF\xE0"
-"_isUsingAcceleratedCompositing"
+"_WebViewDidStartAcceleratedCompositing"
"_top"
"a"
"ab"
"about:"
"actions"
+"allowedFileTypes"
+"allowsMultipleSelection"
+"allowsOtherFileTypes"
"anchorPoint"
"applewebdata"
"applewebdata://%@"
@@ -492,8 +505,12 @@
"bounds"
"bundlePath"
"c"
+"canChooseDirectories"
+"canChooseFiles"
+"canCreateDirectories"
"canGoBack"
"canGoForward"
+"canSelectHiddenExtension"
"com.RealNetworks.RealOne Player"
"com.adiumX.adiumX"
"com.adobe.Acrobat"
@@ -599,6 +616,7 @@
"info.colloquy"
"insertText:"
"inspectorStartsAttached"
+"isExtensionHidden"
"isLoading"
"isindex"
"javascript:"
@@ -623,6 +641,7 @@
"mimeType"
"missingImage"
"name: %@\npath: %@\nmimeTypes:\n%@\npluginDescription:%@"
+"nameFieldLabel"
"net.hmdt-web.Shiira"
"nullPlugin"
"nullplugin"
@@ -641,11 +660,14 @@
"pluginHostPath"
"pluginspage"
"position"
+"privateBrowsingEnabled"
"public.url"
"public.url-name"
"r"
"r+b"
"redirectURLs"
+"requiredFileType"
+"resolvesAliases"
"rgb(%.0f,%.0f,%.0f)"
"rgba(%.0f,%.0f,%.0f,%f)"
"s"
@@ -653,6 +675,7 @@
"searchCancelPressed"
"searchMagnifier"
"searchMagnifierResults"
+"showsHiddenFiles"
"sourceURL"
"src"
"sub"
@@ -677,9 +700,11 @@
"textAreaResizeCorner"
"tiff"
"transform"
+"treatsFilePackagesAsDirectories"
"txt"
"u"
"uk.co.opencommunity.vienna2"
+"useProxiedOpenPanel"
"userAgent"
"userInfo"
"utf-16"
@@ -710,6 +735,11 @@ WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm:" OK\n"
WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm:": "
WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm:"identity"
WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm:"localization"
+WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm:"extensions"
+WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm:"filenames"
+WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm:"message"
+WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm:"prompt"
+WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm:"title"
WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm:" OK\n"
WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm:": "
WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm:"identity"
@@ -743,7 +773,9 @@ WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm:"width"
WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"Menlo"
WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"Monaco"
WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"Web Inspector 2"
+WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"false"
WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"inspector"
+WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"true"
WebKit/mac/WebView/WebHTMLView.mm:"'%@'"
WebKit/mac/WebView/WebHTMLView.mm:"Version:"
WebKit/mac/WebView/WebHTMLView.mm:"applet"
@@ -768,6 +800,8 @@ WebKit/mac/WebView/WebHTMLView.mm:"super"
WebKit/mac/WebView/WebHTMLView.mm:"transparent"
WebKit/mac/WebView/WebHTMLView.mm:"underline"
WebKit/mac/WebView/WebHTMLView.mm:"white"
+WebKit/mac/WebView/WebJSPDFDoc.mm
+WebKit/mac/WebView/WebPDFDocumentExtras.mm
WebKit/mac/WebView/WebPreferenceKeysPrivate.h
WebKit/mac/WebView/WebPreferences.mm:"Apple Chancery"
WebKit/mac/WebView/WebPreferences.mm:"Courier"
@@ -775,6 +809,7 @@ WebKit/mac/WebView/WebPreferences.mm:"ISO-8859-1"
WebKit/mac/WebView/WebPreferences.mm:"Identifier"
WebKit/mac/WebView/WebPreferences.mm:"Papyrus"
WebKit/mac/WebView/WebPreferences.mm:"Values"
+WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm:"maxValue"
WebKit/mac/WebView/WebView.mm:"At least one WebView is still open."
WebKit/mac/WebView/WebView.mm:"At least one WebView was closed with fast teardown."
WebKit/mac/WebView/WebView.mm:"Preferences"
@@ -786,7 +821,6 @@ WebKit/mac/WebView/WebView.mm:"frame"
WebKit/mac/WebView/WebView.mm:"return "
WebKit/win/AccessibleBase.cpp:"Alt+"
WebKit/win/AccessibleBase.cpp:"Ctrl+"
-WebKit/win/AccessibleBase.cpp:"Description: "
WebKit/win/AccessibleBase.cpp:"Shift+"
WebKit/win/AccessibleBase.cpp:"Win+"
WebKit/win/ProgIDMacros.h:"OpenSource"
@@ -797,7 +831,9 @@ WebKit/win/WebCache.cpp:"style sheets"
WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"Courier New"
WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"Web Inspector "
WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"Web Inspector"
+WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"false"
WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"inspector"
+WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"true"
WebKit/win/WebDatabaseManager.cpp:"Databases"
WebKit/win/WebHistoryItem.cpp:"title"
WebKit/win/WebPreferenceKeysPrivate.h
diff --git a/WebKit/WebKit.xcodeproj/project.pbxproj b/WebKit/WebKit.xcodeproj/project.pbxproj
index de8c687..f6f4a9e 100644
--- a/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/WebKit/WebKit.xcodeproj/project.pbxproj
@@ -15,6 +15,7 @@
0A2D87FE107AF52B00CDDEE3 /* WebPluginHalterClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0A2D87FC107AF52B00CDDEE3 /* WebPluginHalterClient.mm */; };
0AB752370FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AB752350FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.h */; };
0AB752380FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0AB752360FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.mm */; };
+ 0ACE917310FE47E30096A45F /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0ACE917210FE47E30096A45F /* OpenGL.framework */; };
0AEBFF630F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AEBFF610F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
0AEBFF640F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0AEBFF620F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.mm */; };
0FD3B0F21076C3E900039B96 /* WebVideoFullscreenController.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD3B0EE1076C3E900039B96 /* WebVideoFullscreenController.h */; };
@@ -332,6 +333,11 @@
BC2E464E0FD8A96800A9D9DE /* WebViewData.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC2E464C0FD8A96800A9D9DE /* WebViewData.mm */; };
BC542C420FD7766F00D8AB5D /* WebDelegateImplementationCaching.h in Headers */ = {isa = PBXBuildFile; fileRef = BC542C400FD7766F00D8AB5D /* WebDelegateImplementationCaching.h */; };
BC542C430FD7766F00D8AB5D /* WebDelegateImplementationCaching.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC542C410FD7766F00D8AB5D /* WebDelegateImplementationCaching.mm */; };
+ BC7F884B10C8775A00D6133D /* WebGeolocationControllerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7F884910C8775A00D6133D /* WebGeolocationControllerClient.h */; };
+ BC7F884C10C8775A00D6133D /* WebGeolocationControllerClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC7F884A10C8775A00D6133D /* WebGeolocationControllerClient.mm */; };
+ BC7F889E10C9D30C00D6133D /* WebGeolocationPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7F889C10C9D30C00D6133D /* WebGeolocationPosition.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ BC7F889F10C9D30C00D6133D /* WebGeolocationPosition.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC7F889D10C9D30C00D6133D /* WebGeolocationPosition.mm */; };
+ BC7F88A510C9D88B00D6133D /* WebGeolocationPositionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7F88A410C9D88B00D6133D /* WebGeolocationPositionInternal.h */; };
BC97E7E210963D260010D361 /* WebViewEventHandling.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC97E7E110963D260010D361 /* WebViewEventHandling.mm */; };
C0167BF80D7F5DD00028696E /* WebScriptDebugger.h in Headers */ = {isa = PBXBuildFile; fileRef = C0167BF60D7F5DD00028696E /* WebScriptDebugger.h */; };
C0167BF90D7F5DD00028696E /* WebScriptDebugger.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0167BF70D7F5DD00028696E /* WebScriptDebugger.mm */; };
@@ -361,6 +367,7 @@
0A2D87FC107AF52B00CDDEE3 /* WebPluginHalterClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPluginHalterClient.mm; sourceTree = "<group>"; };
0AB752350FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNetscapeContainerCheckContextInfo.h; sourceTree = "<group>"; };
0AB752360FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNetscapeContainerCheckContextInfo.mm; sourceTree = "<group>"; };
+ 0ACE917210FE47E30096A45F /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
0AEBFF610F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = WebNetscapeContainerCheckPrivate.h; sourceTree = "<group>"; };
0AEBFF620F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNetscapeContainerCheckPrivate.mm; sourceTree = "<group>"; };
0FD3B0EE1076C3E900039B96 /* WebVideoFullscreenController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVideoFullscreenController.h; sourceTree = "<group>"; };
@@ -610,6 +617,11 @@
BC2E464C0FD8A96800A9D9DE /* WebViewData.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebViewData.mm; sourceTree = "<group>"; };
BC542C400FD7766F00D8AB5D /* WebDelegateImplementationCaching.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebDelegateImplementationCaching.h; sourceTree = "<group>"; };
BC542C410FD7766F00D8AB5D /* WebDelegateImplementationCaching.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDelegateImplementationCaching.mm; sourceTree = "<group>"; };
+ BC7F884910C8775A00D6133D /* WebGeolocationControllerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGeolocationControllerClient.h; sourceTree = "<group>"; };
+ BC7F884A10C8775A00D6133D /* WebGeolocationControllerClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebGeolocationControllerClient.mm; sourceTree = "<group>"; };
+ BC7F889C10C9D30C00D6133D /* WebGeolocationPosition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGeolocationPosition.h; sourceTree = "<group>"; };
+ BC7F889D10C9D30C00D6133D /* WebGeolocationPosition.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebGeolocationPosition.mm; sourceTree = "<group>"; };
+ BC7F88A410C9D88B00D6133D /* WebGeolocationPositionInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGeolocationPositionInternal.h; sourceTree = "<group>"; };
BC97E7E110963D260010D361 /* WebViewEventHandling.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebViewEventHandling.mm; sourceTree = "<group>"; };
BE4FBECB0653DF47005EDE15 /* WebEditingDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebEditingDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
BE6DC39904C62C4E004D0EF6 /* WebNSURLExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSURLExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
@@ -714,6 +726,7 @@
9398112A0824BF01008DF038 /* Cocoa.framework in Frameworks */,
9398112B0824BF01008DF038 /* JavaScriptCore.framework in Frameworks */,
9398112E0824BF01008DF038 /* libicucore.dylib in Frameworks */,
+ 0ACE917310FE47E30096A45F /* OpenGL.framework in Frameworks */,
1A20D08B0ED384F20043FA9F /* QuartzCore.framework in Frameworks */,
9398112F0824BF01008DF038 /* Security.framework in Frameworks */,
9398112C0824BF01008DF038 /* WebCore.framework in Frameworks */,
@@ -766,6 +779,7 @@
F5C2869502846DCD018635CA /* Cocoa.framework */,
F738C9E903FAD3DF0321FBE0 /* JavaScriptCore.framework */,
93D623DD051E791F002F47DD /* libicucore.dylib */,
+ 0ACE917210FE47E30096A45F /* OpenGL.framework */,
1A20D08A0ED384F20043FA9F /* QuartzCore.framework */,
830E81E005853AC000AD0891 /* Security.framework */,
F738C9EA03FAD3DF0321FBE0 /* WebCore.framework */,
@@ -1115,9 +1129,12 @@
51A8B52F04282B5900CA2D3A /* WebFrameView.mm */,
51A8B53204282BD200CA2D3A /* WebFrameViewInternal.h */,
93C6F14507920B93002449CD /* WebFrameViewPrivate.h */,
+ BC7F889C10C9D30C00D6133D /* WebGeolocationPosition.h */,
+ BC7F889D10C9D30C00D6133D /* WebGeolocationPosition.mm */,
+ BC7F88A410C9D88B00D6133D /* WebGeolocationPositionInternal.h */,
5158F6EE106D862A00AF457C /* WebHistoryDelegate.h */,
- 5185F62710712B97007AA393 /* WebNavigationData.mm */,
5185F62510712B80007AA393 /* WebNavigationData.h */,
+ 5185F62710712B97007AA393 /* WebNavigationData.mm */,
51443F9A0429392B00CA2D3A /* WebPolicyDelegate.h */,
51443F9B0429392B00CA2D3A /* WebPolicyDelegate.mm */,
51443F9C0429392B00CA2D3A /* WebPolicyDelegatePrivate.h */,
@@ -1140,8 +1157,8 @@
C0B1F7E510AC8E3100C925D9 /* WebScriptWorld.h */,
C0B1F7E610AC8E3100C925D9 /* WebScriptWorld.mm */,
C0B1F7E710AC8E3100C925D9 /* WebScriptWorldInternal.h */,
- BC26C6A410B7447A00B687ED /* WebSerializedJSValue.mm */,
BC26C69D10B743F400B687ED /* WebSerializedJSValue.h */,
+ BC26C6A410B7447A00B687ED /* WebSerializedJSValue.mm */,
936A2DE90FD2D08400D312DB /* WebTextCompletionController.h */,
936A2DE70FD2D08000D312DB /* WebTextCompletionController.mm */,
F834AAD50E64B1C700E2737C /* WebTextIterator.h */,
@@ -1156,9 +1173,9 @@
51A8B57A042834F700CA2D3A /* WebView.mm */,
BC2E464B0FD8A96800A9D9DE /* WebViewData.h */,
BC2E464C0FD8A96800A9D9DE /* WebViewData.mm */,
+ BC97E7E110963D260010D361 /* WebViewEventHandling.mm */,
930D02BB06275F640076701E /* WebViewInternal.h */,
51A8B57D0428353A00CA2D3A /* WebViewPrivate.h */,
- BC97E7E110963D260010D361 /* WebViewEventHandling.mm */,
0FD3B0F61076C3F700039B96 /* WebWindowAnimation.h */,
0FD3B0F71076C3F700039B96 /* WebWindowAnimation.m */,
);
@@ -1200,8 +1217,6 @@
F5B36B400281DE87018635CB /* WebCoreSupport */ = {
isa = PBXGroup;
children = (
- 59C77F4A105471E700506104 /* WebGeolocationMockPrivate.h */,
- 59C77F3310545F7E00506104 /* WebGeolocationMock.mm */,
B68049710FFBCEC1009F7F62 /* WebApplicationCache.h */,
B68049720FFBCEC1009F7F62 /* WebApplicationCache.mm */,
51CBFCAC0D10E6C5002DBF51 /* WebCachedFramePlatformData.h */,
@@ -1215,6 +1230,10 @@
4BF99F8F0AE050BC00815C2B /* WebEditorClient.mm */,
931633EA0AEDFF930062B92D /* WebFrameLoaderClient.h */,
931633EE0AEDFFAE0062B92D /* WebFrameLoaderClient.mm */,
+ BC7F884910C8775A00D6133D /* WebGeolocationControllerClient.h */,
+ BC7F884A10C8775A00D6133D /* WebGeolocationControllerClient.mm */,
+ 59C77F3310545F7E00506104 /* WebGeolocationMock.mm */,
+ 59C77F4A105471E700506104 /* WebGeolocationMockPrivate.h */,
51494CD40C7EBDE0004178C5 /* WebIconDatabaseClient.h */,
51494CD50C7EBDE0004178C5 /* WebIconDatabaseClient.mm */,
9CE1F8A302A5C6F30ECA2ACD /* WebImageRendererFactory.m */,
@@ -1388,12 +1407,18 @@
939810530824BF01008DF038 /* WebFrame.h in Headers */,
9398109C0824BF01008DF038 /* WebFrameInternal.h in Headers */,
9398105B0824BF01008DF038 /* WebFrameLoadDelegate.h in Headers */,
+ C0B88E8B10A08F3D00FBB3F5 /* WebFrameLoadDelegatePrivate.h in Headers */,
931633EB0AEDFF930062B92D /* WebFrameLoaderClient.h in Headers */,
939810540824BF01008DF038 /* WebFramePrivate.h in Headers */,
9398106E0824BF01008DF038 /* WebFrameView.h in Headers */,
9398106F0824BF01008DF038 /* WebFrameViewInternal.h in Headers */,
939810AF0824BF01008DF038 /* WebFrameViewPrivate.h in Headers */,
+ BC7F884B10C8775A00D6133D /* WebGeolocationControllerClient.h in Headers */,
+ 59C77F4B105471E700506104 /* WebGeolocationMockPrivate.h in Headers */,
+ BC7F889E10C9D30C00D6133D /* WebGeolocationPosition.h in Headers */,
+ BC7F88A510C9D88B00D6133D /* WebGeolocationPositionInternal.h in Headers */,
939810120824BF01008DF038 /* WebHistory.h in Headers */,
+ 5158F6EF106D862A00AF457C /* WebHistoryDelegate.h in Headers */,
93FDE9330D79CAF30074F029 /* WebHistoryInternal.h in Headers */,
939810130824BF01008DF038 /* WebHistoryItem.h in Headers */,
939810630824BF01008DF038 /* WebHistoryItemInternal.h in Headers */,
@@ -1418,6 +1443,7 @@
7A8FF0D11075024A00A80A08 /* WebInspectorPrivate.h in Headers */,
939810A00824BF01008DF038 /* WebJavaPlugIn.h in Headers */,
939810420824BF01008DF038 /* WebJavaScriptTextInputPanel.h in Headers */,
+ 37D1DCA81065928C0068F7EF /* WebJSPDFDoc.h in Headers */,
939810850824BF01008DF038 /* WebKeyGenerator.h in Headers */,
9398101B0824BF01008DF038 /* WebKit.h in Headers */,
9398101C0824BF01008DF038 /* WebKitErrors.h in Headers */,
@@ -1436,6 +1462,7 @@
9398107A0824BF01008DF038 /* WebKitSystemBits.h in Headers */,
1C0D40870AC1C8F40009C113 /* WebKitVersionChecks.h in Headers */,
939810790824BF01008DF038 /* WebLocalizableStrings.h in Headers */,
+ 5185F62610712B80007AA393 /* WebNavigationData.h in Headers */,
0AB752370FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.h in Headers */,
0AEBFF630F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.h in Headers */,
226E9E6A09D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.h in Headers */,
@@ -1467,6 +1494,7 @@
939810340824BF01008DF038 /* WebNullPluginView.h in Headers */,
9398102A0824BF01008DF038 /* WebPanelAuthenticationHandler.h in Headers */,
A7D3C5BC0B5773C5002CA450 /* WebPasteboardHelper.h in Headers */,
+ 37B6FB4E1063530C000FDB3B /* WebPDFDocumentExtras.h in Headers */,
939810A50824BF01008DF038 /* WebPDFRepresentation.h in Headers */,
939810A40824BF01008DF038 /* WebPDFView.h in Headers */,
939810350824BF01008DF038 /* WebPlugin.h in Headers */,
@@ -1475,6 +1503,7 @@
939810B00824BF01008DF038 /* WebPluginContainerPrivate.h in Headers */,
939810370824BF01008DF038 /* WebPluginController.h in Headers */,
939810380824BF01008DF038 /* WebPluginDatabase.h in Headers */,
+ 0A2D87FD107AF52B00CDDEE3 /* WebPluginHalterClient.h in Headers */,
939810390824BF01008DF038 /* WebPluginPackage.h in Headers */,
225F881509F97E8A00423A40 /* WebPluginPrivate.h in Headers */,
1A77B02E0EE7730500C8A1F9 /* WebPluginRequest.h in Headers */,
@@ -1494,8 +1523,11 @@
939810890824BF01008DF038 /* WebResourcePrivate.h in Headers */,
7E6FEF0808985A7200C44C3F /* WebScriptDebugDelegate.h in Headers */,
C0167BF80D7F5DD00028696E /* WebScriptDebugger.h in Headers */,
+ C0B1F7E810AC8E3100C925D9 /* WebScriptWorld.h in Headers */,
+ C0B1F7EA10AC8E3100C925D9 /* WebScriptWorldInternal.h in Headers */,
51079D180CED11B00077247D /* WebSecurityOriginInternal.h in Headers */,
51079D190CED11B00077247D /* WebSecurityOriginPrivate.h in Headers */,
+ BC26C69E10B743F400B687ED /* WebSerializedJSValue.h in Headers */,
939810270824BF01008DF038 /* WebStringTruncator.h in Headers */,
93EB178F09F88D510091F8FF /* WebSystemInterface.h in Headers */,
936A2DEA0FD2D08400D312DB /* WebTextCompletionController.h in Headers */,
@@ -1505,25 +1537,15 @@
939810750824BF01008DF038 /* WebUIDelegate.h in Headers */,
939810830824BF01008DF038 /* WebUIDelegatePrivate.h in Headers */,
939810150824BF01008DF038 /* WebURLsWithTitles.h in Headers */,
+ 0FD3B0F21076C3E900039B96 /* WebVideoFullscreenController.h in Headers */,
+ 0FD3B0F41076C3E900039B96 /* WebVideoFullscreenHUDWindowController.h in Headers */,
939810700824BF01008DF038 /* WebView.h in Headers */,
BC2E464D0FD8A96800A9D9DE /* WebViewData.h in Headers */,
939810460824BF01008DF038 /* WebViewFactory.h in Headers */,
9398109B0824BF01008DF038 /* WebViewInternal.h in Headers */,
939810710824BF01008DF038 /* WebViewPrivate.h in Headers */,
- 41F4484F10338E8C0030E55E /* WebWorkersPrivate.h in Headers */,
- 59C77F4B105471E700506104 /* WebGeolocationMockPrivate.h in Headers */,
- 37B6FB4E1063530C000FDB3B /* WebPDFDocumentExtras.h in Headers */,
- 37D1DCA81065928C0068F7EF /* WebJSPDFDoc.h in Headers */,
- 5158F6EF106D862A00AF457C /* WebHistoryDelegate.h in Headers */,
- 5185F62610712B80007AA393 /* WebNavigationData.h in Headers */,
- 0FD3B0F21076C3E900039B96 /* WebVideoFullscreenController.h in Headers */,
- 0FD3B0F41076C3E900039B96 /* WebVideoFullscreenHUDWindowController.h in Headers */,
0FD3B0F81076C3F700039B96 /* WebWindowAnimation.h in Headers */,
- 0A2D87FD107AF52B00CDDEE3 /* WebPluginHalterClient.h in Headers */,
- C0B1F7E810AC8E3100C925D9 /* WebScriptWorld.h in Headers */,
- C0B1F7EA10AC8E3100C925D9 /* WebScriptWorldInternal.h in Headers */,
- C0B88E8B10A08F3D00FBB3F5 /* WebFrameLoadDelegatePrivate.h in Headers */,
- BC26C69E10B743F400B687ED /* WebSerializedJSValue.h in Headers */,
+ 41F4484F10338E8C0030E55E /* WebWorkersPrivate.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1775,6 +1797,9 @@
939810F20824BF01008DF038 /* WebFrame.mm in Sources */,
931633EF0AEDFFAE0062B92D /* WebFrameLoaderClient.mm in Sources */,
939811060824BF01008DF038 /* WebFrameView.mm in Sources */,
+ BC7F884C10C8775A00D6133D /* WebGeolocationControllerClient.mm in Sources */,
+ 59C77F3510545F7E00506104 /* WebGeolocationMock.mm in Sources */,
+ BC7F889F10C9D30C00D6133D /* WebGeolocationPosition.mm in Sources */,
939811130824BF01008DF038 /* WebHistory.mm in Sources */,
939810BD0824BF01008DF038 /* WebHistoryItem.mm in Sources */,
1AAF5FC00EDE3A92008D883D /* WebHostedNetscapePluginView.mm in Sources */,
@@ -1788,6 +1813,7 @@
06693DDD0BFBA85200216072 /* WebInspectorClient.mm in Sources */,
1C7B0C660EB2464D00A28502 /* WebInspectorClientCF.cpp in Sources */,
939810E40824BF01008DF038 /* WebJavaScriptTextInputPanel.m in Sources */,
+ 37D1DCA91065928C0068F7EF /* WebJSPDFDoc.mm in Sources */,
939811170824BF01008DF038 /* WebKeyGenerator.m in Sources */,
939811030824BF01008DF038 /* WebKitErrors.m in Sources */,
939810C30824BF01008DF038 /* WebKitLogging.m in Sources */,
@@ -1799,6 +1825,7 @@
9398110E0824BF01008DF038 /* WebKitSystemBits.m in Sources */,
1C0D40880AC1C8F40009C113 /* WebKitVersionChecks.m in Sources */,
9398110D0824BF01008DF038 /* WebLocalizableStrings.m in Sources */,
+ 5185F62810712B97007AA393 /* WebNavigationData.mm in Sources */,
0AB752380FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.mm in Sources */,
0AEBFF640F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.mm in Sources */,
226E9E6B09D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.c in Sources */,
@@ -1829,11 +1856,13 @@
939810D90824BF01008DF038 /* WebNullPluginView.mm in Sources */,
939810D00824BF01008DF038 /* WebPanelAuthenticationHandler.m in Sources */,
A7D3C5BD0B5773C5002CA450 /* WebPasteboardHelper.mm in Sources */,
+ 37B6FB4F1063530C000FDB3B /* WebPDFDocumentExtras.mm in Sources */,
9398111F0824BF01008DF038 /* WebPDFRepresentation.mm in Sources */,
9398111E0824BF01008DF038 /* WebPDFView.mm in Sources */,
939811260824BF01008DF038 /* WebPluginContainerCheck.mm in Sources */,
939810DA0824BF01008DF038 /* WebPluginController.mm in Sources */,
939810DB0824BF01008DF038 /* WebPluginDatabase.mm in Sources */,
+ 0A2D87FE107AF52B00CDDEE3 /* WebPluginHalterClient.mm in Sources */,
939810DC0824BF01008DF038 /* WebPluginPackage.m in Sources */,
1A77B02F0EE7730500C8A1F9 /* WebPluginRequest.m in Sources */,
224100F90918190100D2D266 /* WebPluginsPrivate.m in Sources */,
@@ -1843,28 +1872,23 @@
9398111A0824BF01008DF038 /* WebResource.mm in Sources */,
7E6FEF0908985A7200C44C3F /* WebScriptDebugDelegate.mm in Sources */,
C0167BF90D7F5DD00028696E /* WebScriptDebugger.mm in Sources */,
+ C0B1F7E910AC8E3100C925D9 /* WebScriptWorld.mm in Sources */,
51079D170CED11B00077247D /* WebSecurityOrigin.mm in Sources */,
+ BC26C6A510B7447A00B687ED /* WebSerializedJSValue.mm in Sources */,
939810CC0824BF01008DF038 /* WebStringTruncator.mm in Sources */,
93EB178D09F88D460091F8FF /* WebSystemInterface.m in Sources */,
936A2DE80FD2D08000D312DB /* WebTextCompletionController.mm in Sources */,
1A74A28F0F4F75400082E228 /* WebTextInputWindowController.m in Sources */,
F834AAD80E64B1C700E2737C /* WebTextIterator.mm in Sources */,
939810BE0824BF01008DF038 /* WebURLsWithTitles.m in Sources */,
+ 0FD3B0F31076C3E900039B96 /* WebVideoFullscreenController.mm in Sources */,
+ 0FD3B0F51076C3E900039B96 /* WebVideoFullscreenHUDWindowController.mm in Sources */,
939811070824BF01008DF038 /* WebView.mm in Sources */,
BC2E464E0FD8A96800A9D9DE /* WebViewData.mm in Sources */,
+ BC97E7E210963D260010D361 /* WebViewEventHandling.mm in Sources */,
939810E80824BF01008DF038 /* WebViewFactory.mm in Sources */,
- 41F4485010338E8C0030E55E /* WebWorkersPrivate.mm in Sources */,
- 59C77F3510545F7E00506104 /* WebGeolocationMock.mm in Sources */,
- 37B6FB4F1063530C000FDB3B /* WebPDFDocumentExtras.mm in Sources */,
- 37D1DCA91065928C0068F7EF /* WebJSPDFDoc.mm in Sources */,
- 5185F62810712B97007AA393 /* WebNavigationData.mm in Sources */,
- 0FD3B0F31076C3E900039B96 /* WebVideoFullscreenController.mm in Sources */,
- 0FD3B0F51076C3E900039B96 /* WebVideoFullscreenHUDWindowController.mm in Sources */,
0FD3B0F91076C3F700039B96 /* WebWindowAnimation.m in Sources */,
- 0A2D87FE107AF52B00CDDEE3 /* WebPluginHalterClient.mm in Sources */,
- BC97E7E210963D260010D361 /* WebViewEventHandling.mm in Sources */,
- C0B1F7E910AC8E3100C925D9 /* WebScriptWorld.mm in Sources */,
- BC26C6A510B7447A00B687ED /* WebSerializedJSValue.mm in Sources */,
+ 41F4485010338E8C0030E55E /* WebWorkersPrivate.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1931,10 +1955,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 1C904FD20BA9DD0F0081E9D0 /* WebKit.xcconfig */;
buildSettings = {
- BUILD_VARIANTS = (
- normal,
- debug,
- );
+ BUILD_VARIANTS = normal;
OTHER_LDFLAGS = (
"$(OTHER_LDFLAGS)",
"-lWebKitSystemInterface",
diff --git a/WebKit/cf/ChangeLog b/WebKit/cf/ChangeLog
index 1d061fb..1f59dec 100644
--- a/WebKit/cf/ChangeLog
+++ b/WebKit/cf/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-07 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33057
+ REGRESSION(r49365): typeof(xhr.responseText) != "string" in Windows
+
+ <rdar://problem/7296920> REGRESSION: WebKit fails to start PeaceKeeper benchmark
+
+ * WebCoreSupport/WebInspectorClientCF.cpp: Define JS_EXPORTCLASS. I'm not sure why this
+ isn't done in JSC globally for all possible clients, but keeping the current design for now.
+
2009-12-03 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
Reviewed by Timothy Hatcher.
diff --git a/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp b/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
index cb47205..0d66b83 100644
--- a/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
+++ b/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
@@ -43,8 +43,10 @@
#else
#define JS_EXPORTDATA __declspec(dllimport)
#endif
+#define JS_EXPORTCLASS JS_EXPORTDATA
#else
#define JS_EXPORTDATA
+#define JS_EXPORTCLASS
#endif
#include "WebInspectorClient.h"
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 97b361a..24fa84d 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,1358 @@
+<<<<<<< HEAD
+=======
+2010-01-31 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ [Chromium] Fix a bug that a selected word is not recognized as a
+ spell-check source.
+ https://bugs.webkit.org/show_bug.cgi?id=33660
+
+ * src/ContextMenuClientImpl.cpp:
+ (WebKit::isASingleWord): Use wordBreakIterator(), and correctly check
+ the return value of textBreakNext().
+
+2010-01-29 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ A first step towards the Indexed Database API
+ https://bugs.webkit.org/show_bug.cgi?id=34342
+
+ Add runtime enable support for Indexed Database API.
+
+ * features.gypi:
+ * public/WebRuntimeFeatures.h:
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableIndexedDatabase):
+ (WebKit::WebRuntimeFeatures::isIndexedDatabaseEnabled):
+
+2010-01-29 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Add API methods for loading inspector utility scripts.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34326
+
+ * public/WebDevToolsAgentClient.h:
+ (WebKit::WebDevToolsAgentClient::injectedScriptSource):
+ (WebKit::WebDevToolsAgentClient::injectedScriptDispatcherSource):
+
+2010-01-29 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add FrameLoaderClient::allowImages method to allow the client to
+ overrule image loading policy on a per frame basis.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34225
+
+ * public/WebFrameClient.h:
+ (WebKit::WebFrameClient::allowImages):
+ * public/WebSettings.h:
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::allowImages):
+ * src/FrameLoaderClientImpl.h:
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::setImagesEnabled):
+ * src/WebSettingsImpl.h:
+
+2010-01-28 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ StorageNamespaceProxy::copy() should be a no-op
+ https://bugs.webkit.org/show_bug.cgi?id=34298
+
+ The comment in the code should make clear why.
+
+ * public/WebViewClient.h:
+ * src/StorageNamespaceProxy.cpp:
+ (WebCore::StorageNamespaceProxy::copy):
+
+2010-01-28 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ ApplicationCache events should be deferred until after Document onload has fired.
+ https://bugs.webkit.org/show_bug.cgi?id=29690
+
+ * src/ApplicationCacheHost.cpp:
+ (WebCore::ApplicationCacheHost::ApplicationCacheHost): Initialize m_isDeferringEvents to true.
+ (WebCore::ApplicationCacheHost::notifyDOMApplicationCache): Depending, defer or raise the event.
+ (WebCore::ApplicationCacheHost::stopDeferringEvents): Raise any deferred events and reset the flag.
+
+2010-01-27 Aaron Boodman <aa@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Send full URL and application id of requesting context to Chromium
+ when checking notification permissions.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34238
+
+ * public/WebDocument.h:
+ * src/WebDocument.cpp:
+ (WebKit::WebDocument::applicationID):
+ Implement applicationID() method.
+
+ * public/WebNotificationPresenter.h:
+ * src/NotificationPresenterImpl.cpp:
+ (WebKit::NotificationPresenterImpl::checkPermission):
+ * src/NotificationPresenterImpl.h:
+ Send applicationID and full URL through to Chromium.
+
+2010-01-27 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Expose HistoryItem::documentSequenceNumber
+ https://bugs.webkit.org/show_bug.cgi?id=34243
+
+ * public/WebHistoryItem.h:
+ * src/WebHistoryItem.cpp:
+ (WebKit::WebHistoryItem::documentSequenceNumber):
+ (WebKit::WebHistoryItem::setDocumentSequenceNumber):
+
+2010-01-26 Darin Fisher <darin@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add methods to support running a nested modal loop outside of WebKit.
+ https://bugs.webkit.org/show_bug.cgi?id=34199
+
+ * public/WebView.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebView::willEnterModalLoop): Create PageGroupLoadDeferrer
+ (WebKit::WebView::didExitModalLoop): Destroy PageGroupLoadDeferrer
+
+2010-01-27 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Adding missing WebMutationEvent.cpp file to fix build bustage.
+ https://bugs.webkit.org/show_bug.cgi?id=33882
+
+ * public/WebMutationEvent.h: Remove unnecessary constructor.
+ * src/WebEvent.cpp: Remove unnecessary include of WebMutationEvent.h.
+ * src/WebMutationEvent.cpp: Added.
+
+2010-01-27 Jay Campan <jcampan@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Adding EventListeners to the chromium API.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33882
+
+ * WebKit.gyp:
+ * public/WebEvent.h: Added.
+ * public/WebEventListener.h: Added.
+ * public/WebMutationEvent.h: Added.
+ * public/WebNode.h:
+ * public/WebString.h:
+ (WebKit::operator==):
+ (WebKit::operator!=):
+ * src/EventListenerWrapper.cpp: Added.
+ * src/EventListenerWrapper.h: Added.
+ * src/WebEvent.cpp: Added.
+ * src/WebEventListener.cpp: Added.
+ * src/WebEventListenerPrivate.cpp: Added.
+ * src/WebEventListenerPrivate.h: Added.
+ * src/WebNode.cpp:
+ (WebKit::WebNode::addEventListener):
+ (WebKit::WebNode::removeEventListener):
+ * src/WebString.cpp:
+ (WebKit::WebString::equals):
+
+2010-01-26 Yaar Schnitman <yaar@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Add KeyboardTest to WebKit API tests
+ https://bugs.webkit.org/show_bug.cgi?id=34178
+
+ * WebKit.gyp:
+ * tests/KeyboardTest.cpp: Added.
+
+2010-01-22 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Make storage events match the spec.
+ https://bugs.webkit.org/show_bug.cgi?id=30546
+
+ Update the storageEvent algorithm to match the change in WebCore.
+
+ * src/StorageAreaProxy.cpp:
+ (WebCore::StorageAreaProxy::storageEvent):
+
+2010-01-22 Elliot Glaysher <erg@chromium.org>
+
+ Reviewed by David Levin.
+
+ Chromium: theme selection colors to match gtk theme
+ Add functions to RenderThemeChromiumLinux to change the selection color
+ according to the current GTK+ theme.
+
+ Since the change is to the Chromium WebKit API layer, testing is done
+ in Chromium's test shell (see Chromium side of this patch:
+ http://codereview.chromium.org/554004)
+
+ https://bugs.webkit.org/show_bug.cgi?id=33921
+
+ * public/WebView.h: Adds interface to change the selection colors
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setSelectionColors): Implements new interface.
+ * src/WebViewImpl.h:
+
+2010-01-22 Steve VanDeBogart <vandebo@chromium.org>
+
+ Reviewed by David Levin.
+
+ Middle clicking the main scroll bars should not trigger a paste event
+ in Linux chromium.
+ https://bugs.webkit.org/show_bug.cgi?id=33062
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::mouseUp):
+
+2010-01-22 Albert J. Wong <ajwong@chromium.org>
+
+ Not reviewed. backout.
+
+ Backout r53705.
+ Causes ui_tests to timeout, and browser_tests to fail with
+ TestConnectToBadPort and WindowOpenInvalidExtension.
+
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage):
+ (WebKit::FrameLoaderClientImpl::postProgressStartedNotification):
+ (WebKit::FrameLoaderClientImpl::postProgressFinishedNotification):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ * src/WebViewImpl.h:
+
+2010-01-22 Peter Kasting <pkasting@google.com>
+
+ Not reviewed, backout.
+
+ Back out r52673, which caused several regressions.
+ https://bugs.webkit.org/show_bug.cgi?id=32533
+
+ * src/AutocompletePopupMenuClient.cpp:
+ (WebKit::AutocompletePopupMenuClient::initialize):
+ (WebKit::AutocompletePopupMenuClient::popupDidHide):
+ (WebKit::AutocompletePopupMenuClient::setTextFromItem):
+ * src/AutocompletePopupMenuClient.h:
+
+2010-01-21 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ The Chromium WebKit API needs to expose storage event related data
+ https://bugs.webkit.org/show_bug.cgi?id=33985
+
+ setItem and removeItem on WebStorageArea need to expose what the previous
+ value was for the key being modified. Clear needs to return whether it
+ actually cleared anything.
+
+ * public/WebStorageArea.h:
+ (WebKit::WebStorageArea::setItem):
+ (WebKit::WebStorageArea::removeItem):
+ (WebKit::WebStorageArea::clear):
+ * src/StorageAreaProxy.cpp:
+ (WebCore::StorageAreaProxy::StorageAreaProxy):
+ (WebCore::StorageAreaProxy::setItem):
+ (WebCore::StorageAreaProxy::removeItem):
+ (WebCore::StorageAreaProxy::clear):
+ (WebCore::StorageAreaProxy::storageEvent):
+ * src/StorageAreaProxy.h:
+ * src/StorageNamespaceProxy.cpp:
+ (WebCore::StorageNamespace::localStorageNamespace):
+ (WebCore::StorageNamespace::sessionStorageNamespace):
+ (WebCore::StorageNamespaceProxy::StorageNamespaceProxy):
+ (WebCore::StorageNamespaceProxy::copy):
+ (WebCore::StorageNamespaceProxy::storageArea):
+ * src/StorageNamespaceProxy.h:
+ * src/WebStorageAreaImpl.cpp:
+ (WebKit::WebStorageAreaImpl::setItem):
+ (WebKit::WebStorageAreaImpl::removeItem):
+ (WebKit::WebStorageAreaImpl::clear):
+ * src/WebStorageAreaImpl.h:
+
+2010-01-21 Darin Fisher <darin@chromium.org>
+
+ Reviewed by David Levin.
+
+ [Chromium] spurious WebViewClient::didStopLoading if changing
+ location.hash while a subframe is still loading
+
+ https://bugs.webkit.org/show_bug.cgi?id=33884
+
+ This is a refinement of http://trac.webkit.org/changeset/51548
+
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage):
+ (WebKit::FrameLoaderClientImpl::postProgressStartedNotification):
+ (WebKit::FrameLoaderClientImpl::postProgressFinishedNotification):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::didStartLoading):
+ (WebKit::WebViewImpl::didStopLoading):
+ * src/WebViewImpl.h:
+
+2010-01-21 Adam Barth <abarth@webkit.org>
+
+ Unreviewed. Added a blank line requested by the great an powerful
+ fishd.
+
+ * public/WebFrameClient.h:
+
+2010-01-21 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [chromium] Add allowPlugins callback to allow per-site enabling of plugins
+ https://bugs.webkit.org/show_bug.cgi?id=33974
+
+ Forward the new allowPlugins callback to WebKitClient so that it can
+ make the policy decision.
+
+ * public/WebFrameClient.h:
+ (WebKit::WebFrameClient::allowPlugins):
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::allowJavaScript):
+ (WebKit::FrameLoaderClientImpl::allowPlugins):
+ * src/FrameLoaderClientImpl.h:
+
+2010-01-21 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Bumps the refcount when WebNode::toElement/toConstElement are called.
+ https://bugs.webkit.org/show_bug.cgi?id=33977
+
+ Ensures that when a wrapper around a WebNode is create via the
+ toElement() or toConstElement() calls that the refcount on the WebNode
+ is increased, by forcing a call to WebNode::assign(). This is needed
+ so that the following code:
+ {
+ WebNode n = someNode();
+ WebElement e = n.toElement<WebElement>();
+ }
+ does not decrease the overall refcount on the Node that someNode()
+ returns.
+
+ This caused crashes in the 'Save page as..' feature.
+
+ * public/WebNode.h:
+ (WebKit::WebNode::toElement):
+ (WebKit::WebNode::toConstElement):
+
+2010-01-21 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Adds WebKit::WebDataSource::applicationCacheHost() to the API.
+ https://bugs.webkit.org/show_bug.cgi?id=33880
+
+ * WebKit.gyp:
+ * public/WebDataSource.h:
+ * src/ApplicationCacheHost.cpp:
+ * src/ApplicationCacheHostInternal.h: Copied from WebKit/chromium/src/ApplicationCacheHost.cpp.
+ (WebCore::ApplicationCacheHostInternal::notifyEventListener):
+ (WebCore::ApplicationCacheHostInternal::toWebApplicationCacheHost):
+ * src/WebDataSourceImpl.cpp:
+ (WebKit::WebDataSourceImpl::applicationCacheHost):
+ * src/WebDataSourceImpl.h:
+
+2010-01-21 Eric Uhrhane <ericu@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Add changes missing from r53595, without which Chromium has no database.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33966
+
+ No new tests - fixes database layout tests in Chromium.
+
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableDatabase):
+ (WebKit::WebRuntimeFeatures::isDatabaseEnabled):
+
+2010-01-21 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Oliver Hunt.
+
+ [Chromium] Implement texSubImage2D taking WebGLArray
+ https://bugs.webkit.org/show_bug.cgi?id=33932
+
+ * src/GraphicsContext3D.cpp:
+ (WebCore::GraphicsContext3D::texSubImage2D):
+
+2010-01-20 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [V8] Support SerializedScriptValue.
+ https://bugs.webkit.org/show_bug.cgi?id=32920
+ http://crbug.com/30620
+
+ Updated uses of SerializedScriptValue:
+ * src/PlatformMessagePortChannel.cpp:
+ (WebCore::PlatformMessagePortChannel::postMessageToRemote):
+ (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
+ * src/WebWorkerBase.cpp:
+ (WebKit::WebWorkerBase::postMessageToWorkerObject):
+ * src/WebWorkerClientImpl.cpp:
+ (WebKit::WebWorkerClientImpl::postMessageToWorkerContext):
+ (WebKit::WebWorkerClientImpl::postMessageToWorkerObjectTask):
+ * src/WebWorkerImpl.cpp:
+ (WebKit::WebWorkerImpl::postMessageToWorkerContextTask):
+
+2010-01-20 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] computePageRectsForFrame seems to be unnecessary
+ https://bugs.webkit.org/show_bug.cgi?id=33881
+
+ * src/WebFrameImpl.cpp: Stop including FrameChromium.h
+
+2010-01-19 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Chromium build fix.
+
+ * public/WebAccessibilityRole.h:
+ (WebKit::):
+ Correct enum names.
+
+ * src/LocalizedStrings.cpp:
+ (WebCore::AXMenuListPopupActionVerb):
+ Stubbed.
+ (WebCore::AXMenuListActionVerb):
+ Stubbed.
+
+2010-01-19 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Chromium build fix.
+
+ * public/WebAccessibilityRole.h:
+ (WebKit::):
+
+ * src/AssertMatchingEnums.cpp:
+
+2010-01-18 Jonathan Dixon <joth@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for enabling navigator.geolocation at runtime in the V8 bindings.
+ Adds the [EnabledAtRuntime] modifier to the navigator IDL.
+ https://bugs.webkit.org/show_bug.cgi?id=33467
+
+ * public/WebRuntimeFeatures.h:
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableGeolocation):
+ (WebKit::WebRuntimeFeatures::isGeolocationEnabled):
+
+2010-01-17 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ [Chromium] Remove an old runFileChooser() method.
+ https://bugs.webkit.org/show_bug.cgi?id=33778
+
+ Chromium code switched to new runFileChooser() introduced by
+ r53269. The old one is not needed anymore.
+
+ * public/WebViewClient.h:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::runOpenPanel):
+
+2010-01-15 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r53344.
+ http://trac.webkit.org/changeset/53344
+ https://bugs.webkit.org/show_bug.cgi?id=32920
+
+ Broke the Chromium Mac builder.
+
+ * src/PlatformMessagePortChannel.cpp:
+ (WebCore::PlatformMessagePortChannel::postMessageToRemote):
+ (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
+ * src/WebWorkerBase.cpp:
+ (WebKit::WebWorkerBase::postMessageToWorkerObject):
+ * src/WebWorkerClientImpl.cpp:
+ (WebKit::WebWorkerClientImpl::postMessageToWorkerContext):
+ (WebKit::WebWorkerClientImpl::postMessageToWorkerObjectTask):
+ * src/WebWorkerImpl.cpp:
+ (WebKit::WebWorkerImpl::postMessageToWorkerContextTask):
+
+2010-01-15 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by David Levin.
+
+ [V8] Support SerializedScriptValue.
+ https://bugs.webkit.org/show_bug.cgi?id=32920
+ http://crbug.com/30620
+
+ Updated uses of SerializedScriptValue:
+ * src/PlatformMessagePortChannel.cpp:
+ (WebCore::PlatformMessagePortChannel::postMessageToRemote):
+ (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
+ * src/WebWorkerBase.cpp:
+ (WebKit::WebWorkerBase::postMessageToWorkerObject):
+ * src/WebWorkerClientImpl.cpp:
+ (WebKit::WebWorkerClientImpl::postMessageToWorkerContext):
+ (WebKit::WebWorkerClientImpl::postMessageToWorkerObjectTask):
+ * src/WebWorkerImpl.cpp:
+ (WebKit::WebWorkerImpl::postMessageToWorkerContextTask):
+
+2010-01-14 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ [Chromium] Forgot to adopt a ref counted object in StorageNamespaceProxy
+ https://bugs.webkit.org/show_bug.cgi?id=33704
+
+ * src/StorageNamespaceProxy.cpp:
+ (WebCore::StorageNamespace::localStorageNamespace):
+ (WebCore::StorageNamespace::sessionStorageNamespace):
+
+2010-01-14 Marcus Bulach <bulach@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Adds WebKit::WebSecurityOrigin::createFromDatabaseIdentifier.
+ https://bugs.webkit.org/show_bug.cgi?id=33648
+
+ * public/WebSecurityOrigin.h:
+ * src/WebSecurityOrigin.cpp:
+ (WebKit::WebSecurityOrigin::createFromDatabaseIdentifier):
+
+2010-01-14 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Drag and Drop source/destination code needs cleanup.
+ <https://bugs.webkit.org/show_bug.cgi?id=33691>.
+
+ Update to new way of calling sourceOperation.
+
+ * src/DragClientImpl.cpp:
+ (WebKit::DragClientImpl::startDrag):
+
+2010-01-14 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Remove references to V8DOMWrapper::convertToNative*().
+
+ https://bugs.webkit.org/show_bug.cgi?id=33677
+
+ * src/WebBindings.cpp:
+ (WebKit::getDragDataImpl):
+ (WebKit::getRangeImpl):
+
+2010-01-14 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Introduce WebFileChooserParams to convey parameters for
+ WebViewClient::runFileChooser(), and add new parameters to it.
+ https://bugs.webkit.org/show_bug.cgi?id=32473
+
+ The new parameters are
+ - selected file names
+ - "accept" attribute value
+
+ * WebKit.gyp: Add WebFileChooserParams.h
+ * public/WebFileChooserParams.h: Added.
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::runFileChooser):
+ Add runFileChooser() with WebFileChooserParams, and mark the old one deprecated.
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::runOpenPanel):
+ Call the new runFileChooser() first, then call the old
+ runFileChooser() if the new one failed.
+
+2010-01-13 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Oliver Hunt.
+
+ Need to implement WebGLContextAttributes
+ https://bugs.webkit.org/show_bug.cgi?id=31169
+
+ Added the WebGLContextAttributes class and custom JavaScript
+ bindings to accept a native object as the second argument to
+ getContext("experimental-webgl") per the WebGL specification.
+ Added GraphicsContext3D::Attributes struct to isolate DOM and
+ graphics layers. Added getContextAttributes() to
+ WebGLRenderingContext. Added test case ensuring that context
+ attributes can be passed down and returned. Tested in Safari and
+ Chromium. The attributes will be hooked up to the creation of the
+ OpenGL context in bug 33416.
+
+ * src/GraphicsContext3D.cpp:
+ (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
+ (WebCore::GraphicsContext3DInternal::getContextAttributes):
+ (WebCore::GraphicsContext3D::create):
+ (WebCore::GraphicsContext3D::GraphicsContext3D):
+ (WebCore::GraphicsContext3D::getContextAttributes):
+
+2010-01-13 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: selected, selectable, extended selectable, and multiple
+ selectable states are not reported
+
+ https://bugs.webkit.org/show_bug.cgi?id=33574
+ <rdar://problem/7536826>
+
+ Reviewed by Darin Adler.
+
+ * public/WebAccessibilityObject.h:
+ Update for WebCore::AccessibilityObject function rename.
+
+ * src/WebAccessibilityObject.cpp:
+ (WebKit::WebAccessibilityObject::isMultiSelectable):
+ Ditto.
+
+2010-01-13 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Move getSessionStorageNamespace from WebKitClient to WebViewClient
+ https://bugs.webkit.org/show_bug.cgi?id=33492
+
+ * public/WebKitClient.h:
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::createSessionStorageNamespace):
+ * src/StorageNamespaceProxy.cpp:
+ (WebCore::StorageNamespace::sessionStorageNamespace):
+
+2010-01-13 Jeremy Orlow <jorlow@chromium.org>
+
+ No reviewer. More or less a build fix. My 53180 broke some
+ stuff on the Chromium port so I'm reverting.
+
+ * public/WebKitClient.h:
+ * public/WebViewClient.h:
+ * src/StorageNamespaceProxy.cpp:
+ (WebCore::StorageNamespace::sessionStorageNamespace):
+
+2010-01-11 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Move getSessionStorageNamespace from WebKitClient to WebViewClient
+ https://bugs.webkit.org/show_bug.cgi?id=33492
+
+ * public/WebKitClient.h:
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::getSessionStorageNamespace):
+ * src/StorageNamespaceProxy.cpp:
+ (WebCore::StorageNamespace::sessionStorageNamespace):
+
+2010-01-11 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Re-work webkit_unit_tests so that WebKit is initialized only once
+ https://bugs.webkit.org/show_bug.cgi?id=33504
+
+ * WebKit.gyp:
+ * tests/KURLTest.cpp:
+ (ComponentCase::TEST):
+ * tests/RunAllTests.cpp: Added.
+ (main):
+ * tests/WebKitTest.h: Removed.
+
+2010-01-09 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ ScriptController::isEnabled needs to be renamed
+ https://bugs.webkit.org/show_bug.cgi?id=32063
+
+ Rename ScriptController::isEnabled to
+ ScriptController::canExecuteScripts.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::bindToWindowObject):
+
+2010-01-08 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33417
+
+ Cleans up style errors exposed by the patch for bug #33198.
+
+ No functionality was changed. So, no new tests.
+
+ * src/GraphicsContext3D.cpp:
+
+2010-01-08 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Upstream webkit unit tests from the chromium repository
+ https://bugs.webkit.org/show_bug.cgi?id=33351
+
+ This adds one such test (for KURL) and sets up the test framework.
+
+ Switch WebKit to build a static library on all platforms. Add a
+ webkit_unit_tests executable target that runs the unit tests and also
+ ensures that we don't have any missing symbols (a function that WebKit
+ as a shared library used to serve).
+
+ Changes chromium_src_dir to ../../WebKit/chromium to match how
+ WebCore.gyp defines that variable.
+
+ * WebKit.gyp:
+ * public/WebKitClient.h:
+ (WebKit::WebKitClient::getPluginList): Remove bogus trailing semi-colon.
+ (WebKit::WebKitClient::decrementStatsCounter): Remove bogus trailing semi-colon.
+ (WebKit::WebKitClient::incrementStatsCounter): Remove bogus trailing semi-colon.
+ (WebKit::WebKitClient::traceEventBegin): Remove bogus trailing semi-colon.
+ (WebKit::WebKitClient::traceEventEnd): Remove bogus trailing semi-colon.
+ (WebKit::WebKitClient::histogramCounts): Remove bogus trailing semi-colon.
+ * tests: Added.
+ * tests/KURLTest.cpp: Added.
+ * tests/WebKitTest.h: Added.
+
+2010-01-07 Mike Belshe <mbelshe@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix Spdy casing to match style guide.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33326
+
+ * public/WebURLResponse.h:
+ * src/WebURLResponse.cpp:
+ (WebKit::WebURLResponse::wasFetchedViaSPDY):
+ (WebKit::WebURLResponse::setWasFetchedViaSPDY):
+
+2010-01-07 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32987
+
+ Added ENABLE_XHTMLMP flag. Disabled by default.
+
+ * features.gypi:
+
+2010-01-07 Adam Barth <abarth@webkit.org>
+
+ No review, rolling out r52847.
+ http://trac.webkit.org/changeset/52847
+ https://bugs.webkit.org/show_bug.cgi?id=33232
+
+ Might have caused a perf regression.
+
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::detachedFromParent3):
+
+2010-01-06 Mike Belshe <mike@belshe.com>
+
+ Add a flag to the ResourceResponse for tracking if a request was
+ fetched via SPDY. This is plumbed through so that we can inform
+ a webpage via JavaScript if it was fecthed via the experimental
+ SPDY protocol.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33186
+
+ * public/WebURLResponse.h:
+ * src/WebURLResponse.cpp:
+ (WebKit::WebURLResponse::wasFetchedViaSpdy):
+ (WebKit::WebURLResponse::setWasFetchedViaSpdy):
+
+2010-01-06 Darin Fisher <darin@chromium.org>
+
+ Fix release build bustage.
+
+ * src/WebKit.cpp: Need to include Logging.h
+
+2010-01-05 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [Chromium] Expose more APIs to eliminate WebCore usage in Chromium.
+ https://bugs.webkit.org/show_bug.cgi?id=33249
+
+ * WebKit.gyp:
+ * public/WebFrame.h:
+ * public/WebGlyphCache.h: Added.
+ * public/WebKit.h:
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrame::instanceCount):
+ (WebKit::WebFrameImpl::WebFrameImpl):
+ (WebKit::WebFrameImpl::~WebFrameImpl):
+ * src/WebFrameImpl.h:
+ * src/WebGlyphCache.cpp: Added.
+ (WebKit::WebGlyphCache::pageCount):
+ * src/WebKit.cpp:
+ (WebKit::enableLogChannel):
+
+2010-01-05 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [v8] Move V8DOMWindowShell to ScriptController
+ https://bugs.webkit.org/show_bug.cgi?id=33232
+
+ Update FrameLoaderClientImpl.cpp to call clearForClose on
+ ScriptController instead of on V8Proxy.
+
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::detachedFromParent3):
+
+2010-01-05 Rachel Petterson <rlp@google.com>
+
+ Reviewed by Adam Barth.
+
+ Matches the texImage2D and texSubImage2D functions to their
+ declarations. Elminates uncessary versions of those functions.
+ https://bugs.webkit.org/show_bug.cgi?id=31562
+ Also bug: https://bugs.webkit.org/show_bug.cgi?id=31493
+
+ * src/GraphicsContext3D.cpp:
+ (WebCore::GraphicsContext3D::texImage2D):
+ (WebCore::GraphicsContext3D::texSubImage2D):
+
+2010-01-04 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Fisher.
+
+ Reorganize, document and rename OS() platform macros.
+ https://bugs.webkit.org/show_bug.cgi?id=33198
+
+ Adapt to name changes.
+
+ * src/ChromiumBridge.cpp:
+ * src/EditorClientImpl.cpp:
+ (WebKit::EditorClientImpl::isSelectTrailingWhitespaceEnabled):
+ (WebKit::):
+ (WebKit::EditorClientImpl::handleEditingKeyboardEvent):
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::createPlugin):
+ * src/GraphicsContext3D.cpp:
+ (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
+ (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal):
+ (WebCore::GraphicsContext3DInternal::makeContextCurrent):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::selectionAsText):
+ (WebKit::WebFrameImpl::printPage):
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::handleMouseEvent):
+ (WebKit::WebPluginContainerImpl::handleKeyboardEvent):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::mouseDown):
+ (WebKit::WebViewImpl::mouseContextMenu):
+ (WebKit::WebViewImpl::mouseUp):
+ (WebKit::WebViewImpl::keyEvent):
+ (WebKit::WebViewImpl::sendContextMenuEvent):
+ (WebKit::WebViewImpl::setScrollbarColors):
+ (WebKit::WebViewImpl::navigationPolicyFromMouseEvent):
+
+2010-01-04 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [Chromium] Expose more DOM methods to support LayoutTests
+ https://bugs.webkit.org/show_bug.cgi?id=33185
+
+ * public/WebDocument.h: Adds documentElement method.
+ * public/WebElement.h: Adds innerText method.
+ * public/WebFrame.h: Adds renderTreeAsText and counterValueForElementById
+ methods, and fixes a few whitespace issues.
+ * src/WebDocument.cpp:
+ (WebKit::WebDocument::documentElement):
+ * src/WebElement.cpp:
+ (WebKit::WebElement::innerText):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::clearName):
+ (WebKit::WebFrameImpl::renderTreeAsText):
+ (WebKit::WebFrameImpl::counterValueForElementById):
+ * src/WebFrameImpl.h:
+
+2010-01-04 Darin Fisher <darin@chromium.org>
+
+ Fix Chromium build bustage.
+
+ * src/WebAnimationControllerImpl.h:
+
+2010-01-04 Yaar Schnitman <yaar@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Adding WebAnimationController to chromium's WebKit API.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32870
+
+ * WebKit.gyp:
+ * public/WebAnimationController.h: Added.
+ (WebKit::WebAnimationController::~WebAnimationController):
+ * public/WebFrame.h:
+ * src/WebAnimationControllerImpl.cpp: Added.
+ (WebKit::WebAnimationControllerImpl::WebAnimationControllerImpl):
+ (WebKit::WebAnimationControllerImpl::pauseAnimationAtTime):
+ (WebKit::WebAnimationControllerImpl::pauseTransitionAtTime):
+ (WebKit::WebAnimationControllerImpl::numberOfActiveAnimations):
+ * src/WebAnimationControllerImpl.h: Added.
+ (WebKit::WebAnimationControllerImpl::~WebAnimationControllerImpl):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::animationController):
+ (WebKit::WebFrameImpl::WebFrameImpl):
+ * src/WebFrameImpl.h:
+
+2010-01-04 Jay Campan <jcampan@google.com>
+
+ Reviewed by Darin Fisher
+
+ Adding more DOM API methods. They are needed for the upcoming
+ translate feature.
+
+ * public/WebElement.h:
+ * public/WebNode.h:
+ * src/WebElement.cpp:
+ (WebKit::WebElement::tagName):
+ (WebKit::WebElement::setAttribute):
+ * src/WebNode.cpp:
+ (WebKit::WebNode::setNodeValue):
+
+2010-01-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [Chromium] Implement CookieJarChromium::cookiesEnabled
+ https://bugs.webkit.org/show_bug.cgi?id=33123
+
+ Call out to the webKitClient() to see if cookies are enabled. Also
+ remove some straggling references to policyURL!
+
+ * public/WebKitClient.h:
+ (WebKit::WebKitClient::setCookies):
+ (WebKit::WebKitClient::cookies):
+ (WebKit::WebKitClient::rawCookies):
+ (WebKit::WebKitClient::cookiesEnabled):
+ * src/ChromiumBridge.cpp:
+ (WebCore::ChromiumBridge::cookiesEnabled):
+
+2010-01-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [Chromium] Remove evaluateInNewContext (it's useless)
+ https://bugs.webkit.org/show_bug.cgi?id=33068
+
+ This function has no clients and makes life complicated. Isolated
+ worlds won out over NewContext and there's not really any going back
+ now.
+
+ * public/WebFrame.h:
+ * src/FrameLoaderClientImpl.h:
+ * src/WebFrameImpl.cpp:
+ * src/WebFrameImpl.h:
+
+2009-12-30 Darin Fisher <darin@chromium.org>
+
+ Reviewed by David Levin.
+
+ [Chromium] Delete ResourceRequest::securityInfo
+ https://bugs.webkit.org/show_bug.cgi?id=26847
+
+ * src/WebWorkerBase.cpp:
+ (WebKit::WebWorkerBase::initializeLoader):
+
+2009-12-30 Albert J. Wong <ajwong@chromium.org>
+
+ Not reviewed. Trivial Chromium build fix.
+
+ Add static_cast<unsigned>() to fix signed/unsigned comparison warning.
+
+ * src/AutocompletePopupMenuClient.cpp:
+ (WebKit::AutocompletePopupMenuClient::selectionChanged):
+
+2009-12-30 Zelidrag Hornung <zelidrag@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Autocomplete in Chromium now offers suggestions within the input element as a user
+ a) types text that produces some autocomplete suggestions, and
+ b) scrolls through suggested values in the menu
+ The suggested value is rendered but not exposed through JS unti the
+ user makes the final selection.
+
+ No new tests since this new functionality (autocomplete suggestions)
+ is intentionally hidden from everything else than renderer.
+
+ * src/AutocompletePopupMenuClient.cpp:
+ (WebKit::AutocompletePopupMenuClient::initialize):
+ (WebKit::AutocompletePopupMenuClient::setInitialAutocompleteValue):
+ (WebKit::AutocompletePopupMenuClient::selectionChanged):
+ (WebKit::AutocompletePopupMenuClient::popupDidHide):
+ (WebKit::AutocompletePopupMenuClient::setTextFromItem):
+ (WebKit::AutocompletePopupMenuClient::resetLastFieldValue):
+ * src/AutocompletePopupMenuClient.h:
+
+
+2009-12-28 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fixed isKeypadEvent behavior for chromium/Mac to correctly report
+ keyLocation as DOM_KEY_LOCATION_NUMPAD for numeric pad key events.
+ https://bugs.webkit.org/show_bug.cgi?id=28247
+
+ Test: fast/events/keydown-numpad-keys.html
+
+ * src/mac/WebInputEventFactory.mm:
+ (WebKit::isKeypadEvent):
+
+2009-12-22 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Eric Seidel.
+
+ [Chromium] Garbage in transparent regions of images uploaded as textures
+ https://bugs.webkit.org/show_bug.cgi?id=32888
+
+ Test: fast/canvas/webgl/bug-32888.html (works in Safari / DumpRenderTree)
+
+ * src/GraphicsContext3D.cpp:
+ (WebCore::GraphicsContext3D::texImage2D):
+
+2009-12-22 Adam Langley <agl@google.com>
+
+ Build fix: not reviewed.
+
+ r52504 (https://bugs.webkit.org/show_bug.cgi?id=32845) broke the
+ Chromium build on Windows and Mac due to a misplaced #endif. The
+ buildbot didn't find the problem because it runs on Linux.
+
+ Have verified this patch with the author of the above.
+
+ * src/GraphicsContext3D.cpp:
+
+2009-12-22 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Eric Seidel.
+
+ [Chromium] WebGL crashes intermittently on Linux
+ https://bugs.webkit.org/show_bug.cgi?id=32845
+
+ The dlclose'ing of libGL.so.1 and dlopen'ing of it each time a
+ GraphicsContext3D was created was occasionally causing it to be
+ re-mapped at a different base address. Since GLEW is not
+ re-initialized every time, primarily for performance reasons, its
+ cached function pointers were pointing to garbage. Stopped closing
+ and re-opening libGL.so.1 each time; now it is loaded lazily, when
+ the first 3D context is created. Also reused the X display
+ connection since the GLX routines' correctness might hinge upon it
+ not resulting in a change of GL implementation.
+
+ * src/GraphicsContext3D.cpp:
+ (WebCore::GraphicsContext3DInternal::GLConnection::chooseFBConfig):
+ (WebCore::GraphicsContext3DInternal::GLConnection::createNewContext):
+ (WebCore::GraphicsContext3DInternal::GLConnection::createPbuffer):
+ (WebCore::GraphicsContext3DInternal::GLConnection::destroyPbuffer):
+ (WebCore::GraphicsContext3DInternal::GLConnection::makeCurrent):
+ (WebCore::GraphicsContext3DInternal::GLConnection::destroyContext):
+ (WebCore::GraphicsContext3DInternal::GLConnection::getCurrentContext):
+ (WebCore::GraphicsContext3DInternal::GLConnection::GLConnection):
+ (WebCore::GraphicsContext3DInternal::GLConnection::tryLoad):
+ (WebCore::GraphicsContext3DInternal::GLConnection::create):
+ (WebCore::GraphicsContext3DInternal::GLConnection::~GLConnection):
+ (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
+ (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal):
+ (WebCore::GraphicsContext3DInternal::makeContextCurrent):
+
+2009-12-22 Yaar Schnitman <yaar@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ autoComplete and getElementById methods for WebKit API
+
+ https://bugs.webkit.org/show_bug.cgi?id=32866
+
+ * public/WebDocument.h:
+ * public/WebInputElement.h:
+ * src/WebDocument.cpp:
+ (WebKit::WebDocument::getElementById):
+ * src/WebInputElement.cpp:
+ (WebKit::WebInputElement::autoComplete):
+
+2009-12-18 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Eliminate redundant data copy in GraphicsContext3D readback
+ https://bugs.webkit.org/show_bug.cgi?id=32763
+
+ Eliminated useless creation of a CGBitmapContext and from there a
+ CGImage. Now create CGImage directly from data. Also changed
+ readPixels parameters and CGImage alpha info to try to avoid byte
+ swapping, and disabled interpolation when drawing the GL content.
+ Some test cases run twice as fast with these changes, though more
+ work is needed to achieve desired performance.
+
+ No test case; performance optimization only. Ran WebGL demos from
+ Khronos site to verify changes.
+
+ * src/GraphicsContext3D.cpp:
+ (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
+ (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal):
+ (WebCore::GraphicsContext3DInternal::reshape):
+ (WebCore::GraphicsContext3DInternal::beginPaint):
+
+2009-12-18 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Adam Barth.
+
+ Chromium build fix
+ https://bugs.webkit.org/show_bug.cgi?id=32756
+
+ * public/WebAccessibilityRole.h:
+ (WebKit::):
+ * src/AssertMatchingEnums.cpp:
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ Chromium build fix
+
+ * src/ChromiumBridge.cpp:
+ * src/WebPluginContainerImpl.cpp:
+ * src/WebViewImpl.cpp:
+ Added #includes.
+
+2009-12-17 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r52291.
+ http://trac.webkit.org/changeset/52291
+ https://bugs.webkit.org/show_bug.cgi?id=32618
+
+ Darin Fisher points out that this will likely break
+ the SSL security indicator in Chromium. Rolling out for now.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+
+2009-12-17 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Disable memory cache client calls so that a new identifier isn't created
+ for the same resource on reload.
+
+ With the calls enabled, duplicate entries for cached resources are created
+ in the Web Inspector. Safari for Windows disables the calls near the point of the
+ Frame instance creation, and we just follow this for Chromium.
+ https://bugs.webkit.org/show_bug.cgi?id=32618
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+
+2009-12-17 Yaar Schnitman <yaar@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Added WebPageSerializer to WebKit API and enriched the WebNode hierarchy to support
+ downstream unit-testing of serialization.
+
+ WebPageSerializer was adapted from Chromium's dom_serializer, originally authored by Johnny Ding.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31737
+
+ * WebKit.gyp:
+ * public/WebDocument.h: Added.
+ (WebKit::WebDocument::WebDocument):
+ (WebKit::WebDocument::operator=):
+ (WebKit::WebDocument::assign):
+ * public/WebElement.h:
+ * public/WebFormElement.h:
+ (WebKit::WebFormElement::operator=):
+ * public/WebFrame.h:
+ * public/WebNode.h:
+ (WebKit::WebNode::):
+ (WebKit::WebNode::toConstElement):
+ * public/WebNodeCollection.h: Added.
+ (WebKit::WebNodeCollection::~WebNodeCollection):
+ (WebKit::WebNodeCollection::WebNodeCollection):
+ (WebKit::WebNodeCollection::operator=):
+ * public/WebNodeList.h: Added.
+ (WebKit::WebNodeList::~WebNodeList):
+ (WebKit::WebNodeList::WebNodeList):
+ (WebKit::WebNodeList::operator=):
+ * public/WebPageSerializer.h: Added.
+ * public/WebPageSerializerClient.h: Added.
+ (WebKit::WebPageSerializerClient::):
+ (WebKit::WebPageSerializerClient::WebPageSerializerClient):
+ (WebKit::WebPageSerializerClient::~WebPageSerializerClient):
+ * public/WebString.h:
+ * public/WebView.h:
+ * src/AssertMatchingEnums.cpp:
+ * src/DOMUtilitiesPrivate.cpp:
+ (WebKit::elementHasLegalLinkAttribute):
+ * src/DOMUtilitiesPrivate.h:
+ * src/WebDocument.cpp: Added.
+ (WebKit::WebDocument::WebDocument):
+ (WebKit::WebDocument::operator=):
+ (WebKit::WebDocument::operator WTF::PassRefPtr<Document>):
+ (WebKit::WebDocument::frame):
+ (WebKit::WebDocument::isHTMLDocument):
+ (WebKit::WebDocument::baseURL):
+ (WebKit::WebDocument::body):
+ (WebKit::WebDocument::head):
+ (WebKit::WebDocument::all):
+ (WebKit::WebDocument::completeURL):
+ * src/WebElement.cpp:
+ (WebKit::WebElement::hasTagName):
+ (WebKit::WebElement::hasAttribute):
+ (WebKit::WebElement::getAttribute):
+ * src/WebEntities.cpp: Added.
+ (WebKit::populateMap):
+ (WebKit::):
+ (WebKit::WebEntities::WebEntities):
+ (WebKit::WebEntities::entityNameByCode):
+ (WebKit::WebEntities::convertEntitiesInString):
+ * src/WebEntities.h: Added.
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrame::fromFrameOwnerElement):
+ (WebKit::WebFrameImpl::encoding):
+ (WebKit::WebFrameImpl::document):
+ (WebKit::WebFrameImpl::fromFrameOwnerElement):
+ * src/WebFrameImpl.h:
+ * src/WebNode.cpp:
+ (WebKit::WebNode::nodeType):
+ (WebKit::WebNode::nodeValue):
+ (WebKit::WebNode::document):
+ (WebKit::WebNode::firstChild):
+ (WebKit::WebNode::lastChild):
+ (WebKit::WebNode::previousSibling):
+ (WebKit::WebNode::nextSibling):
+ (WebKit::WebNode::hasChildNodes):
+ (WebKit::WebNode::childNodes):
+ (WebKit::WebNode::createMarkup):
+ (WebKit::WebNode::isTextNode):
+ (WebKit::WebNode::isElementNode):
+ * src/WebNodeCollection.cpp: Added.
+ (WebKit::WebNodeCollection::reset):
+ (WebKit::WebNodeCollection::assign):
+ (WebKit::WebNodeCollection::WebNodeCollection):
+ (WebKit::WebNodeCollection::length):
+ (WebKit::WebNodeCollection::nextItem):
+ (WebKit::WebNodeCollection::firstItem):
+ * src/WebNodeList.cpp: Added.
+ (WebKit::WebNodeList::reset):
+ (WebKit::WebNodeList::assign):
+ (WebKit::WebNodeList::WebNodeList):
+ (WebKit::WebNodeList::length):
+ (WebKit::WebNodeList::item):
+ * src/WebPageSerializer.cpp: Added.
+ (WebKit::WebPageSerializer::serialize):
+ (WebKit::WebPageSerializer::generateMetaCharsetDeclaration):
+ (WebKit::WebPageSerializer::generateMarkOfTheWebDeclaration):
+ (WebKit::WebPageSerializer::generateBaseTagDeclaration):
+ * src/WebPageSerializerImpl.cpp: Added.
+ (WebKit::WebPageSerializerImpl::SerializeDomParam::SerializeDomParam):
+ (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag):
+ (WebKit::WebPageSerializerImpl::postActionAfterSerializeOpenTag):
+ (WebKit::WebPageSerializerImpl::preActionBeforeSerializeEndTag):
+ (WebKit::WebPageSerializerImpl::postActionAfterSerializeEndTag):
+ (WebKit::WebPageSerializerImpl::saveHTMLContentToBuffer):
+ (WebKit::WebPageSerializerImpl::openTagToString):
+ (WebKit::WebPageSerializerImpl::endTagToString):
+ (WebKit::WebPageSerializerImpl::buildContentForNode):
+ (WebKit::WebPageSerializerImpl::WebPageSerializerImpl):
+ (WebKit::WebPageSerializerImpl::collectTargetFrames):
+ (WebKit::WebPageSerializerImpl::serialize):
+ * src/WebPageSerializerImpl.h: Added.
+ * src/WebString.cpp:
+ (WebKit::WebString::WebString):
+ (WebKit::WebString::operator=):
+ * src/WebViewImpl.cpp:
+
+2009-12-17 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by David Levin.
+
+ Provide explicit implementation of 'non-template' WebVector<T>::operator=
+
+ https://bugs.webkit.org/show_bug.cgi?id=32363
+
+ * public/WebVector.h:
+
+2009-12-16 Fumitoshi Ukai <ukai@chromium.org>
+
+ Unreviewed, build fix.
+
+ [Chromium] Add EditableTextRole to catch up with
+ http://trac.webkit.org/changeset/52233
+
+ * public/WebAccessibilityRole.h:
+ (WebKit::): Added WebAccessibilityRoleEditableText
+ * src/AssertMatchingEnums.cpp: Added matching compile assert.
+
+2009-12-15 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Don't allow default framebuffer to be mutated
+ https://bugs.webkit.org/show_bug.cgi?id=32391
+
+ * src/GraphicsContext3D.cpp:
+ (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
+ (WebCore::GraphicsContext3DInternal::reshape):
+ (WebCore::GraphicsContext3DInternal::beginPaint):
+ (WebCore::GraphicsContext3DInternal::bindFramebuffer):
+ (WebCore::GraphicsContext3D::bindFramebuffer):
+
+2009-12-15 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, build fix.
+
+ [Chromium] Add TreeGridRole to catch up with
+ http://trac.webkit.org/changeset/52159.
+
+ * public/WebAccessibilityRole.h:
+ (WebKit::): Added WebAccessibilityRoleTreeGrid.
+ * src/AssertMatchingEnums.cpp: Added matching compile assert.
+
+2009-12-15 Jian Li <jianli@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Bug 31090 - [Chromium] Add DownloadURL format to Chromium clipboard.
+ https://bugs.webkit.org/show_bug.cgi?id=31090
+
+ The proposal to whatwg can be found here:
+ http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-August/022118.html
+
+ * public/WebDragData.h:
+ * src/WebDragData.cpp:
+ (WebKit::WebDragData::downloadURL):
+ (WebKit::WebDragData::setDownloadURL):
+
+2009-12-14 Evan Stade <estade@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32347
+ Chromium: Context menu launched by menu key has funky behavior
+
+ Make the context menu's position depend on the selection only when an
+ editable field has focus. Also, don't send multiple context menu events
+ for a single keypress.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::keyEvent):
+ (WebKit::WebViewImpl::sendContextMenuEvent):
+
+>>>>>>> webkit.org at r54127
2009-12-13 Sam Weinig <sam@webkit.org>
Reviewed by Dan Bernstein.
@@ -13,6 +1368,54 @@
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::WebViewImpl):
+<<<<<<< HEAD
+=======
+2009-12-13 Charles Reis <creis@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Refactor some security code out of V8 bindings
+ https://bugs.webkit.org/show_bug.cgi?id=32326
+
+ * src/WebBindings.cpp:
+ (WebKit::getDragDataImpl):
+
+2009-12-11 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Expose shouldHideReferrer() in WebSecurityPolicy.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32398
+
+ * public/WebSecurityPolicy.h: Add shouldHideReferrer().
+ * src/WebSecurityPolicy.cpp:
+ (WebKit:: WebSecurityPolicy::shouldHideReferrer): Added.
+
+2009-12-11 Avi Drissman <avi@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Tickmarks in the scrollbar are not cleared for non-main frames
+ https://bugs.webkit.org/show_bug.cgi?id=32385
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::stopFinding):
+
+2009-12-11 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Remove obsolete message handling methods from WebDevTools* interfaces
+
+ https://bugs.webkit.org/show_bug.cgi?id=32320
+
+ * public/WebDevToolsAgent.h:
+ * public/WebDevToolsAgentClient.h:
+ * public/WebDevToolsFrontend.h:
+ * public/WebDevToolsFrontendClient.h:
+
+>>>>>>> webkit.org at r54127
2009-12-10 Mike Belshe <mike@belshe.com>
Unreviewed, build fix for chromium.
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index c41bf5b..3b5a17f 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -33,33 +33,23 @@
'features.gypi',
],
'variables': {
+ 'webkit_target_type': 'static_library',
'conditions': [
# Location of the chromium src directory and target type is different
# if webkit is built inside chromium or as standalone project.
['inside_chromium_build==0', {
# Webkit is being built outside of the full chromium project.
# e.g. via build-webkit --chromium
- 'chromium_src_dir': '.',
- # FIXME: To enable shared_library in linux all code (including
- # dependencies) must be complied with -fPIC flag. That is
- # pending on changes in gyp.
- 'webkit_target_type': 'shared_library',
+ 'chromium_src_dir': '../../WebKit/chromium',
},{
# WebKit is checked out in src/chromium/third_party/WebKit
'chromium_src_dir': '../../../..',
- 'webkit_target_type': 'static_library',
}],
# We can't turn on warnings on Windows and Linux until we upstream the
# WebKit API.
['OS=="mac"', {
'chromium_code': 1,
}],
- # FIXME: To enable shared_library in linux all code (including
- # dependencies) must be complied with -fPIC flag. That is
- # pending on changes in gyp.
- ['OS=="linux" or OS=="freebsd"', {
- 'webkit_target_type': 'static_library',
- }],
],
},
'targets': [
@@ -86,6 +76,7 @@
'public/WebAccessibilityCache.h',
'public/WebAccessibilityObject.h',
'public/WebAccessibilityRole.h',
+ 'public/WebAnimationController.h',
'public/WebApplicationCacheHost.h',
'public/WebApplicationCacheHostClient.h',
'public/WebBindings.h',
@@ -112,15 +103,20 @@
'public/WebDevToolsFrontend.h',
'public/WebDevToolsFrontendClient.h',
'public/WebDevToolsMessageData.h',
+ 'public/WebDocument.h',
'public/WebDragData.h',
'public/WebEditingAction.h',
'public/WebElement.h',
+ 'public/WebEvent.h',
+ 'public/WebEventListener.h',
'public/WebFileChooserCompletion.h',
+ 'public/WebFileChooserParams.h',
'public/WebFindOptions.h',
'public/WebFrame.h',
'public/WebFrameClient.h',
'public/WebFontCache.h',
'public/WebFormElement.h',
+ 'public/WebGlyphCache.h',
'public/WebHistoryItem.h',
'public/WebHTTPBody.h',
'public/WebImage.h',
@@ -136,12 +132,17 @@
'public/WebMessagePortChannel.h',
'public/WebMessagePortChannelClient.h',
'public/WebMimeRegistry.h',
+ 'public/WebMutationEvent.h',
'public/WebNavigationType.h',
'public/WebNode.h',
+ 'public/WebNodeCollection.h',
+ 'public/WebNodeList.h',
'public/WebNonCopyable.h',
'public/WebNotification.h',
'public/WebNotificationPresenter.h',
'public/WebNotificationPermissionCallback.h',
+ 'public/WebPageSerializer.h',
+ 'public/WebPageSerializerClient.h',
'public/WebPasswordAutocompleteListener.h',
'public/WebPasswordFormData.h',
'public/WebPlugin.h',
@@ -192,6 +193,7 @@
'public/win/WebScreenInfoFactory.h',
'public/win/WebScreenInfoFactory.h',
'src/ApplicationCacheHost.cpp',
+ 'src/ApplicationCacheHostInternal.h',
'src/AssertMatchingEnums.cpp',
'src/AutocompletePopupMenuClient.cpp',
'src/AutocompletePopupMenuClient.h',
@@ -211,6 +213,8 @@
'src/DragClientImpl.h',
'src/EditorClientImpl.cpp',
'src/EditorClientImpl.h',
+ 'src/EventListenerWrapper.cpp',
+ 'src/EventListenerWrapper.h',
'src/FrameLoaderClientImpl.cpp',
'src/FrameLoaderClientImpl.h',
'src/gtk/WebFontInfo.cpp',
@@ -243,6 +247,8 @@
'src/WebAccessibilityCacheImpl.cpp',
'src/WebAccessibilityCacheImpl.h',
'src/WebAccessibilityObject.cpp',
+ 'src/WebAnimationControllerImpl.cpp',
+ 'src/WebAnimationControllerImpl.h',
'src/WebBindings.cpp',
'src/WebCache.cpp',
'src/WebColor.cpp',
@@ -253,14 +259,22 @@
'src/WebDatabase.cpp',
'src/WebDataSourceImpl.cpp',
'src/WebDataSourceImpl.h',
+ 'src/WebDocument.cpp',
'src/WebDragData.cpp',
'src/WebElement.cpp',
+ 'src/WebEntities.cpp',
+ 'src/WebEntities.h',
+ 'src/WebEvent.cpp',
+ 'src/WebEventListener.cpp',
+ 'src/WebEventListenerPrivate.cpp',
+ 'src/WebEventListenerPrivate.h',
'src/WebFileChooserCompletionImpl.cpp',
'src/WebFileChooserCompletionImpl.h',
'src/WebFontCache.cpp',
'src/WebFormElement.cpp',
'src/WebFrameImpl.cpp',
'src/WebFrameImpl.h',
+ 'src/WebGlyphCache.cpp',
'src/WebHistoryItem.cpp',
'src/WebHTTPBody.cpp',
'src/WebImageCG.cpp',
@@ -272,8 +286,14 @@
'src/WebKit.cpp',
'src/WebMediaPlayerClientImpl.cpp',
'src/WebMediaPlayerClientImpl.h',
+ 'src/WebMutationEvent.cpp',
'src/WebNode.cpp',
+ 'src/WebNodeCollection.cpp',
+ 'src/WebNodeList.cpp',
'src/WebNotification.cpp',
+ 'src/WebPageSerializer.cpp',
+ 'src/WebPageSerializerImpl.cpp',
+ 'src/WebPageSerializerImpl.h',
'src/WebPasswordFormData.cpp',
'src/WebPasswordFormUtils.cpp',
'src/WebPasswordFormUtils.h',
@@ -393,6 +413,27 @@
}],
],
},
+ {
+ 'target_name': 'webkit_unit_tests',
+ 'type': 'executable',
+ 'msvs_guid': '7CEFE800-8403-418A-AD6A-2D52C6FC3EAD',
+ 'dependencies': [
+ 'webkit',
+ '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
+ '<(chromium_src_dir)/testing/gtest.gyp:gtest',
+ '<(chromium_src_dir)/base/base.gyp:base',
+ '<(chromium_src_dir)/base/base.gyp:base_i18n',
+ ],
+ 'include_dirs': [
+ 'public',
+ 'src',
+ ],
+ 'sources': [
+ 'tests/KeyboardTest.cpp',
+ 'tests/KURLTest.cpp',
+ 'tests/RunAllTests.cpp',
+ ],
+ },
], # targets
}
diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi
index 8dd0d0d..da2386b 100644
--- a/WebKit/chromium/features.gypi
+++ b/WebKit/chromium/features.gypi
@@ -50,9 +50,11 @@
'ENABLE_JAVASCRIPT_DEBUGGER=0',
'ENABLE_JSC_MULTIPLE_THREADS=0',
'ENABLE_ICONDATABASE=0',
+ 'ENABLE_INDEXED_DATABASE=1',
'ENABLE_NOTIFICATIONS=1',
'ENABLE_OPENTYPE_SANITIZER=1',
'ENABLE_ORIENTATION_EVENTS=0',
+ 'ENABLE_XHTMLMP=0',
'ENABLE_XSLT=1',
'ENABLE_XPATH=1',
'ENABLE_SHARED_WORKERS=1',
diff --git a/WebKit/chromium/public/WebAccessibilityObject.h b/WebKit/chromium/public/WebAccessibilityObject.h
index d32c548..f46c0d8 100644
--- a/WebKit/chromium/public/WebAccessibilityObject.h
+++ b/WebKit/chromium/public/WebAccessibilityObject.h
@@ -85,7 +85,7 @@ public:
bool isEnabled() const;
bool isHovered() const;
bool isIndeterminate() const;
- bool isMultiSelect() const;
+ bool isMultiSelectable() const;
bool isOffScreen() const;
bool isPasswordField() const;
bool isPressed() const;
diff --git a/WebKit/chromium/public/WebAccessibilityRole.h b/WebKit/chromium/public/WebAccessibilityRole.h
index e836c56..ec041e0 100644
--- a/WebKit/chromium/public/WebAccessibilityRole.h
+++ b/WebKit/chromium/public/WebAccessibilityRole.h
@@ -106,8 +106,14 @@ enum WebAccessibilityRole {
WebAccessibilityRoleTabList,
WebAccessibilityRoleTabPanel,
WebAccessibilityRoleTreeRole,
+ WebAccessibilityRoleTreeGrid,
WebAccessibilityRoleTreeItemRole,
WebAccessibilityRoleDirectory,
+ WebAccessibilityRoleEditableText,
+
+ WebAccessibilityRoleListItem,
+ WebAccessibilityRoleMenuListPopup,
+ WebAccessibilityRoleMenuListOption,
WebAccessibilityRoleLandmarkApplication,
WebAccessibilityRoleLandmarkBanner,
diff --git a/WebKit/chromium/public/WebAnimationController.h b/WebKit/chromium/public/WebAnimationController.h
new file mode 100644
index 0000000..d727d70
--- /dev/null
+++ b/WebKit/chromium/public/WebAnimationController.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebAnimationController_h
+#define WebAnimationController_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebElement;
+class WebString;
+class WebURL;
+
+// WebAnimationController can be used to control animations in a frame. It is
+// owned by a WebFrame and its life span is bound to that WebFrame.
+class WebAnimationController {
+public:
+ WEBKIT_API virtual bool pauseAnimationAtTime(WebElement&,
+ const WebString& animationName,
+ double time) = 0;
+ WEBKIT_API virtual bool pauseTransitionAtTime(WebElement&,
+ const WebString& propertyName,
+ double time) = 0;
+
+ WEBKIT_API virtual unsigned numberOfActiveAnimations() const = 0;
+protected:
+ ~WebAnimationController() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebDataSource.h b/WebKit/chromium/public/WebDataSource.h
index 3a83341..1aa7a98 100644
--- a/WebKit/chromium/public/WebDataSource.h
+++ b/WebKit/chromium/public/WebDataSource.h
@@ -36,6 +36,7 @@
namespace WebKit {
+class WebApplicationCacheHost;
class WebString;
class WebURL;
class WebURLRequest;
@@ -91,6 +92,9 @@ public:
virtual ExtraData* extraData() const = 0;
virtual void setExtraData(ExtraData*) = 0;
+ // The application cache host associated with this datasource.
+ virtual WebApplicationCacheHost* applicationCacheHost() = 0;
+
protected:
~WebDataSource() { }
};
diff --git a/WebKit/chromium/public/WebDevToolsAgent.h b/WebKit/chromium/public/WebDevToolsAgent.h
index 9c27628..e3b5186 100644
--- a/WebKit/chromium/public/WebDevToolsAgent.h
+++ b/WebKit/chromium/public/WebDevToolsAgent.h
@@ -55,12 +55,6 @@ public:
virtual void didNavigate() = 0;
- // TODO(32320): remove this method from API.
- virtual void dispatchMessageFromFrontend(const WebString& className,
- const WebString& methodName,
- const WebString& param1,
- const WebString& param2,
- const WebString& param3) = 0;
virtual void dispatchMessageFromFrontend(const WebDevToolsMessageData&) = 0;
virtual void inspectElementAt(const WebPoint&) = 0;
@@ -79,12 +73,6 @@ public:
// Asynchronously request debugger to pause immediately.
WEBKIT_API static void debuggerPauseScript();
- // TODO(32320): remove this method from API.
- WEBKIT_API static bool dispatchMessageFromFrontendOnIOThread(const WebString& className,
- const WebString& methodName,
- const WebString& param1,
- const WebString& param2,
- const WebString& param3);
WEBKIT_API static bool dispatchMessageFromFrontendOnIOThread(const WebDevToolsMessageData&);
typedef void (*MessageLoopDispatchHandler)();
diff --git a/WebKit/chromium/public/WebDevToolsAgentClient.h b/WebKit/chromium/public/WebDevToolsAgentClient.h
index ec51654..d78a6f1 100644
--- a/WebKit/chromium/public/WebDevToolsAgentClient.h
+++ b/WebKit/chromium/public/WebDevToolsAgentClient.h
@@ -31,6 +31,7 @@
#ifndef WebDevToolsAgentClient_h
#define WebDevToolsAgentClient_h
+#include "WebCString.h"
#include "WebCommon.h"
namespace WebKit {
@@ -39,12 +40,6 @@ struct WebDevToolsMessageData;
class WebDevToolsAgentClient {
public:
- // TODO(32320): remove this method from API.
- virtual void sendMessageToFrontend(const WebString& className,
- const WebString& methodName,
- const WebString& param1,
- const WebString& param2,
- const WebString& param3) {}
virtual void sendMessageToFrontend(const WebDevToolsMessageData&) { }
// Invalidates widget which leads to the repaint.
@@ -56,14 +51,11 @@ public:
// Notifies host upon runtime feature being enabled/disabled.
virtual void runtimeFeatureStateChanged(const WebString& feature, bool enabled) { }
- // TODO(32320): remove this method from API.
- WEBKIT_API static void sendMessageToFrontendOnIOThread(const WebString& className,
- const WebString& methodName,
- const WebString& param1,
- const WebString& param2,
- const WebString& param3);
WEBKIT_API static void sendMessageToFrontendOnIOThread(const WebDevToolsMessageData&);
+ virtual WebCString injectedScriptSource() { return WebCString(); }
+ virtual WebCString injectedScriptDispatcherSource() { return WebCString(); }
+
protected:
~WebDevToolsAgentClient() { }
};
diff --git a/WebKit/chromium/public/WebDevToolsFrontend.h b/WebKit/chromium/public/WebDevToolsFrontend.h
index b7d7189..d95f35a 100644
--- a/WebKit/chromium/public/WebDevToolsFrontend.h
+++ b/WebKit/chromium/public/WebDevToolsFrontend.h
@@ -50,11 +50,6 @@ public:
virtual ~WebDevToolsFrontend() {}
- virtual void dispatchMessageFromAgent(const WebString& className,
- const WebString& methodName,
- const WebString& param1,
- const WebString& param2,
- const WebString& param3) = 0;
virtual void dispatchMessageFromAgent(const WebDevToolsMessageData&) = 0;
};
diff --git a/WebKit/chromium/public/WebDevToolsFrontendClient.h b/WebKit/chromium/public/WebDevToolsFrontendClient.h
index 2f74a8c..6200709 100644
--- a/WebKit/chromium/public/WebDevToolsFrontendClient.h
+++ b/WebKit/chromium/public/WebDevToolsFrontendClient.h
@@ -40,11 +40,6 @@ class WebDevToolsFrontendClient {
public:
WebDevToolsFrontendClient() {}
- virtual void sendMessageToAgent(const WebString& className,
- const WebString& methodName,
- const WebString& param1,
- const WebString& param2,
- const WebString& param3) {};
virtual void sendMessageToAgent(const WebDevToolsMessageData&) {};
virtual void sendDebuggerCommandToAgent(const WebString& command) {};
virtual void sendDebuggerPauseScript() {}
diff --git a/WebKit/chromium/public/WebDocument.h b/WebKit/chromium/public/WebDocument.h
new file mode 100644
index 0000000..e158c41
--- /dev/null
+++ b/WebKit/chromium/public/WebDocument.h
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebDocument_h
+#define WebDocument_h
+
+#include "WebNode.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Document; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+class WebElement;
+class WebFrame;
+class WebNodeCollection;
+class WebString;
+class WebURL;
+
+// Provides readonly access to some properties of a DOM document.
+class WebDocument : public WebNode {
+public:
+ WebDocument() { }
+ WebDocument(const WebDocument& e) : WebNode(e) { }
+
+ WebDocument& operator=(const WebDocument& e)
+ {
+ WebNode::assign(e);
+ return *this;
+ }
+ void assign(const WebDocument& e) { WebNode::assign(e); }
+
+ // Returns the frame the document belongs to or 0 if the document is frameless.
+ WEBKIT_API WebFrame* frame() const;
+ WEBKIT_API bool isHTMLDocument() const;
+ WEBKIT_API WebURL baseURL() const;
+ WEBKIT_API WebElement documentElement() const;
+ WEBKIT_API WebElement body() const;
+ WEBKIT_API WebElement head();
+ WEBKIT_API WebNodeCollection all();
+ WEBKIT_API WebURL completeURL(const WebString&) const;
+ WEBKIT_API WebElement getElementById(const WebString& id) const;
+ WEBKIT_API WebString applicationID() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebDocument(const WTF::PassRefPtr<WebCore::Document>&);
+ WebDocument& operator=(const WTF::PassRefPtr<WebCore::Document>&);
+ operator WTF::PassRefPtr<WebCore::Document>() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebDragData.h b/WebKit/chromium/public/WebDragData.h
index f7a165d..01582a9 100644
--- a/WebKit/chromium/public/WebDragData.h
+++ b/WebKit/chromium/public/WebDragData.h
@@ -72,6 +72,9 @@ public:
WEBKIT_API WebString urlTitle() const;
WEBKIT_API void setURLTitle(const WebString&);
+ WEBKIT_API WebURL downloadURL() const;
+ WEBKIT_API void setDownloadURL(const WebURL&);
+
WEBKIT_API WebString fileExtension() const;
WEBKIT_API void setFileExtension(const WebString&);
diff --git a/WebKit/chromium/public/WebElement.h b/WebKit/chromium/public/WebElement.h
index d7a2cbf..20f6c9a 100644
--- a/WebKit/chromium/public/WebElement.h
+++ b/WebKit/chromium/public/WebElement.h
@@ -39,15 +39,21 @@ namespace WTF { template <typename T> class PassRefPtr; }
#endif
namespace WebKit {
-
- // Provides readonly access to some properties of a DOM element node.
+ // Provides access to some properties of a DOM element node.
class WebElement : public WebNode {
public:
WebElement() : WebNode() { }
WebElement(const WebElement& e) : WebNode(e) { }
WebElement& operator=(const WebElement& e) { WebNode::assign(e); return *this; }
- WEBKIT_API void assign(const WebElement& e) { WebNode::assign(e); }
+ void assign(const WebElement& e) { WebNode::assign(e); }
+
+ WEBKIT_API WebString tagName() const;
+ WEBKIT_API bool hasTagName(const WebString&) const;
+ WEBKIT_API bool hasAttribute(const WebString&) const;
+ WEBKIT_API WebString getAttribute(const WebString&) const;
+ WEBKIT_API bool setAttribute(const WebString& name, const WebString& value);
+ WEBKIT_API WebString innerText() const;
#if WEBKIT_IMPLEMENTATION
WebElement(const WTF::PassRefPtr<WebCore::Element>&);
diff --git a/WebKit/chromium/public/WebEvent.h b/WebKit/chromium/public/WebEvent.h
new file mode 100644
index 0000000..b0964d1
--- /dev/null
+++ b/WebKit/chromium/public/WebEvent.h
@@ -0,0 +1,116 @@
+/*
+ * 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 WebEvent_h
+#define WebEvent_h
+
+#include "WebCommon.h"
+#include "WebNode.h"
+#include "WebString.h"
+
+namespace WebCore { class Event; }
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+class WebEvent {
+public:
+ enum PhaseType {
+ CapturingPhase = 1,
+ AtTarget = 2,
+ BubblingPhase = 3
+ };
+
+ WebEvent() : m_private(0) { }
+ WebEvent(const WebEvent& e) : m_private(0) { assign(e); }
+ WebEvent& operator=(const WebEvent& e)
+ {
+ assign(e);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebEvent&);
+
+ bool isNull() const { return !m_private; }
+
+ WEBKIT_API WebString type() const;
+ WEBKIT_API WebNode target() const;
+ WEBKIT_API WebNode currentTarget() const;
+
+ WEBKIT_API PhaseType eventPhase() const;
+ WEBKIT_API bool bubbles() const;
+ WEBKIT_API bool cancelable() const;
+
+ WEBKIT_API bool isUIEvent() const;
+ WEBKIT_API bool isMouseEvent() const;
+ WEBKIT_API bool isMutationEvent() const;
+ WEBKIT_API bool isKeyboardEvent() const;
+ WEBKIT_API bool isTextEvent() const;
+ WEBKIT_API bool isCompositionEvent() const;
+ WEBKIT_API bool isDragEvent() const;
+ WEBKIT_API bool isClipboardEvent() const;
+ WEBKIT_API bool isMessageEvent() const;
+ WEBKIT_API bool isWheelEvent() const;
+ WEBKIT_API bool isBeforeTextInsertedEvent() const;
+ WEBKIT_API bool isOverflowEvent() const;
+ WEBKIT_API bool isPageTransitionEvent() const;
+ WEBKIT_API bool isPopStateEvent() const;
+ WEBKIT_API bool isProgressEvent() const;
+ WEBKIT_API bool isXMLHttpRequestProgressEvent() const;
+ WEBKIT_API bool isWebKitAnimationEvent() const;
+ WEBKIT_API bool isWebKitTransitionEvent() const;
+ WEBKIT_API bool isBeforeLoadEvent() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebEvent(const WTF::PassRefPtr<WebCore::Event>&);
+#endif
+
+protected:
+ typedef WebCore::Event WebEventPrivate;
+ void assign(WebEventPrivate*);
+ WebEventPrivate* m_private;
+
+ template<typename T> T* unwrap()
+ {
+ return static_cast<T*>(m_private);
+ }
+
+ template<typename T> const T* constUnwrap() const
+ {
+ return static_cast<const T*>(m_private);
+ }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebEventListener.h b/WebKit/chromium/public/WebEventListener.h
new file mode 100644
index 0000000..52de1cd
--- /dev/null
+++ b/WebKit/chromium/public/WebEventListener.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:
+ *
+ * * 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 WebEventListener_h
+#define WebEventListener_h
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Node; }
+#endif
+
+namespace WebKit {
+
+class EventListenerWrapper;
+class WebEvent;
+class WebEventListenerPrivate;
+class WebNode;
+class WebString;
+
+class WebEventListener {
+public:
+ WebEventListener();
+ virtual ~WebEventListener();
+
+ // Called when an event is received.
+ virtual void handleEvent(const WebEvent&) = 0;
+
+#if WEBKIT_IMPLEMENTATION
+ void notifyEventListenerDeleted(EventListenerWrapper*);
+ EventListenerWrapper* createEventListenerWrapper(const WebString& eventType, bool useCapture, WebCore::Node* node);
+ EventListenerWrapper* getEventListenerWrapper(const WebString& eventType, bool useCapture, WebCore::Node* node);
+#endif
+
+private:
+ WebEventListenerPrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFileChooserParams.h b/WebKit/chromium/public/WebFileChooserParams.h
new file mode 100644
index 0000000..6359f14
--- /dev/null
+++ b/WebKit/chromium/public/WebFileChooserParams.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:
+ *
+ * * 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 WebFileChooserParams_h
+#define WebFileChooserParams_h
+
+#include "WebFileChooserCompletion.h"
+#include "WebString.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+struct WebFileChooserParams {
+ // If |multiSelect| is true, the dialog allow to select multiple files.
+ bool multiSelect;
+ // |title| is a title of a file chooser dialog. It can be an empty string.
+ WebString title;
+ // |initialValue| is a filename which the dialog should select by default.
+ // It can be an empty string.
+ WebString initialValue;
+ // |acceptTypes| has a comma-separated MIME types such as "audio/*,text/plain".
+ // The dialog may restrict selectable files to the specified MIME types.
+ // This value comes from an 'accept' attribute value of an INPUT element.
+ // So it might be a wrong formatted string.
+ WebString acceptTypes;
+ // |selectedFiles| has filenames which a file upload control already select.
+ // A WebViewClient implementation may ask a user to select
+ // - removing a file from the selected files,
+ // - appending other files, or
+ // - replacing with other files
+ // before opening a file chooser dialog.
+ WebVector<WebString> selectedFiles;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFormElement.h b/WebKit/chromium/public/WebFormElement.h
index 27a1edb..b07bff9 100644
--- a/WebKit/chromium/public/WebFormElement.h
+++ b/WebKit/chromium/public/WebFormElement.h
@@ -50,7 +50,11 @@ namespace WebKit {
WebFormElement() : WebElement() { }
WebFormElement(const WebFormElement& e) : WebElement(e) { }
- WebElement& operator=(const WebFormElement& e) { WebElement::assign(e); return *this; }
+ WebFormElement& operator=(const WebFormElement& e)
+ {
+ WebElement::assign(e);
+ return *this;
+ }
WEBKIT_API void assign(const WebFormElement& e) { WebElement::assign(e); }
#if WEBKIT_IMPLEMENTATION
diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h
index 44b57aa..4197c23 100644
--- a/WebKit/chromium/public/WebFrame.h
+++ b/WebKit/chromium/public/WebFrame.h
@@ -45,8 +45,11 @@ template <class T> class Local;
namespace WebKit {
+class WebAnimationController;
class WebData;
class WebDataSource;
+class WebDocument;
+class WebElement;
class WebFormElement;
class WebHistoryItem;
class WebInputElement;
@@ -66,6 +69,9 @@ template <typename T> class WebVector;
class WebFrame {
public:
+ // Returns the number of live WebFrame objects, used for leak checking.
+ WEBKIT_API static int instanceCount();
+
// The two functions below retrieve the WebFrame instances relating the
// currently executing JavaScript. Since JavaScript can make function
// calls across frames, though, we need to be more precise.
@@ -85,11 +91,16 @@ public:
WEBKIT_API static WebFrame* frameForEnteredContext();
WEBKIT_API static WebFrame* frameForCurrentContext();
+ // Returns the frame inside a given frame or iframe element. Returns 0 if
+ // the given element is not a frame, iframe or if the frame is empty.
+ WEBKIT_API static WebFrame* fromFrameOwnerElement(const WebElement&);
+
// Basic properties ---------------------------------------------------
// The name of this frame.
virtual WebString name() const = 0;
+ virtual void clearName() = 0;
// The url of the document loaded in this frame. This is equivalent to
// dataSource()->request().url().
@@ -103,6 +114,9 @@ public:
// the document loaded in this frame.
virtual WebURL openSearchDescriptionURL() const = 0;
+ // Return the frame's encoding.
+ virtual WebString encoding() const = 0;
+
// Geometry -----------------------------------------------------------
@@ -164,8 +178,12 @@ public:
// Content ------------------------------------------------------------
+ virtual WebDocument document() const = 0;
+
virtual void forms(WebVector<WebFormElement>&) const = 0;
+ virtual WebAnimationController* animationController() = 0;
+
// Scripting ----------------------------------------------------------
@@ -186,17 +204,6 @@ public:
// Executes script in the context of the current page.
virtual void executeScript(const WebScriptSource&) = 0;
- // Executes script in a new context associated with the frame. The
- // script gets its own global scope and its own prototypes for
- // intrinsic JS objects (String, Array, and so-on). It shares the
- // wrappers for all DOM nodes and DOM constructors. extensionGroup is
- // an embedder-provided specifier that controls which v8 extensions are
- // loaded into the new context - see WebKit::registerExtension for the
- // corresponding specifier.
- virtual void executeScriptInNewContext(const WebScriptSource* sources,
- unsigned numSources,
- int extensionGroup) = 0;
-
// Executes JavaScript in a new world associated with the web frame.
// The script gets its own global scope and its own prototypes for
// intrinsic JavaScript objects (String, Array, and so-on). It also
@@ -428,6 +435,7 @@ public:
// of matches found during the scoping effort.
virtual void resetMatchCount() = 0;
+
// Password autocompletion ---------------------------------------------
// Registers a listener for the specified user name input element. The
@@ -438,12 +446,14 @@ public:
WebInputElement,
WebPasswordAutocompleteListener*) = 0;
+
// Utility -------------------------------------------------------------
// Given a relative URL, returns an absolute URL by resolving the URL
// relative to the base URL of the frame's document. This uses the
// same algorithm that WebKit uses to resolve hyperlinks found in a
// HTML document.
+ // Deprecated. Use document().completeURL() instead.
virtual WebURL completeURL(const WebString&) const = 0;
// Returns the contents of this frame as a string. If the text is
@@ -460,6 +470,14 @@ public:
// from the DOM.
virtual WebString contentAsMarkup() const = 0;
+ // Returns a text representation of the render tree. This method is used
+ // to support layout tests.
+ virtual WebString renderTreeAsText() const = 0;
+
+ // Returns the counter value for the specified element. This method is
+ // used to support layout tests.
+ virtual WebString counterValueForElementById(const WebString& id) const = 0;
+
protected:
~WebFrame() { }
};
diff --git a/WebKit/chromium/public/WebFrameClient.h b/WebKit/chromium/public/WebFrameClient.h
index 297eb62..4078151 100644
--- a/WebKit/chromium/public/WebFrameClient.h
+++ b/WebKit/chromium/public/WebFrameClient.h
@@ -80,6 +80,12 @@ public:
// This frame is about to be closed.
virtual void willClose(WebFrame*) { }
+ // Controls whether plugins are allowed for this frame.
+ virtual bool allowPlugins(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; }
+
+ // Controls whether images are allowed for this frame.
+ virtual bool allowImages(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; }
+
// Load commands -------------------------------------------------------
diff --git a/WebKit/chromium/public/WebGlyphCache.h b/WebKit/chromium/public/WebGlyphCache.h
new file mode 100644
index 0000000..661767d
--- /dev/null
+++ b/WebKit/chromium/public/WebGlyphCache.h
@@ -0,0 +1,51 @@
+/*
+ * 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 WebGlyphCache_h
+#define WebGlyphCache_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+// An interface to query WebKit's glyph cache (which maps unicode characters to
+// glyphs in particular fonts).
+class WebGlyphCache {
+public:
+ // Returns the number of pages in the glyph cache.
+ WEBKIT_API static size_t pageCount();
+
+private:
+ WebGlyphCache(); // Not intended to be instanced.
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebHistoryItem.h b/WebKit/chromium/public/WebHistoryItem.h
index f15a62c..e248a61 100644
--- a/WebKit/chromium/public/WebHistoryItem.h
+++ b/WebKit/chromium/public/WebHistoryItem.h
@@ -105,6 +105,9 @@ public:
WEBKIT_API WebVector<WebString> documentState() const;
WEBKIT_API void setDocumentState(const WebVector<WebString>&);
+ WEBKIT_API long long documentSequenceNumber() const;
+ WEBKIT_API void setDocumentSequenceNumber(long long);
+
WEBKIT_API WebString httpContentType() const;
WEBKIT_API void setHTTPContentType(const WebString&);
diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h
index 75e44b9..226624a 100644
--- a/WebKit/chromium/public/WebInputElement.h
+++ b/WebKit/chromium/public/WebInputElement.h
@@ -82,6 +82,7 @@ namespace WebKit {
Week
};
+ WEBKIT_API bool autoComplete() const;
WEBKIT_API bool isEnabledFormControl() const;
WEBKIT_API InputType inputType() const;
WEBKIT_API WebString formControlType() const;
diff --git a/WebKit/chromium/public/WebKit.h b/WebKit/chromium/public/WebKit.h
index b9e6407..732cac6 100644
--- a/WebKit/chromium/public/WebKit.h
+++ b/WebKit/chromium/public/WebKit.h
@@ -55,6 +55,9 @@ WEBKIT_API WebKitClient* webKitClient();
WEBKIT_API void setLayoutTestMode(bool);
WEBKIT_API bool layoutTestMode();
+// Enables the named log channel. See WebCore/platform/Logging.h for details.
+WEBKIT_API void enableLogChannel(const char*);
+
// Purge the plugin list cache. If |reloadPages| is true, any pages
// containing plugins will be reloaded after refreshing the plugin list.
WEBKIT_API void resetPluginCache(bool reloadPages);
diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h
index 2a00a9a..fe6c801 100644
--- a/WebKit/chromium/public/WebKitClient.h
+++ b/WebKit/chromium/public/WebKitClient.h
@@ -89,6 +89,7 @@ public:
virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) { return 0; }
// Return a new SessionStorage namespace.
+ // THIS IS DEPRECATED. WebViewClient::getSessionStorageNamespace() is the new way to access this.
virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; }
// Called when storage events fire.
@@ -178,10 +179,11 @@ public:
// Network -------------------------------------------------------------
virtual void setCookies(
- const WebURL& url, const WebURL& policyURL, const WebString& cookies) { }
- virtual WebString cookies(const WebURL& url, const WebURL& policyURL) { return WebString(); }
- virtual bool rawCookies(const WebURL& url, const WebURL& policyURL, WebVector<WebCookie>*) { return false; }
+ const WebURL& url, const WebURL& firstPartyForCookies, const WebString& cookies) { }
+ virtual WebString cookies(const WebURL& url, const WebURL& firstPartyForCookies) { return WebString(); }
+ virtual bool rawCookies(const WebURL& url, const WebURL& firstPartyForCookies, WebVector<WebCookie>*) { return false; }
virtual void deleteCookie(const WebURL& url, const WebString& cookieName) { }
+ virtual bool cookiesEnabled(const WebURL& url, const WebURL& firstPartyForCookies) { return true; }
// A suggestion to prefetch IP information for the given hostname.
virtual void prefetchHostName(const WebString&) { }
@@ -200,23 +202,23 @@ public:
// If refresh is true, then cached information should not be used to
// satisfy this call.
- virtual void getPluginList(bool refresh, WebPluginListBuilder*) { };
+ virtual void getPluginList(bool refresh, WebPluginListBuilder*) { }
// Profiling -----------------------------------------------------------
- virtual void decrementStatsCounter(const char* name) { };
- virtual void incrementStatsCounter(const char* name) { };
+ virtual void decrementStatsCounter(const char* name) { }
+ virtual void incrementStatsCounter(const char* name) { }
// An event is identified by the pair (name, id). The extra parameter
// specifies additional data to log with the event.
- virtual void traceEventBegin(const char* name, void* id, const char* extra) { };
- virtual void traceEventEnd(const char* name, void* id, const char* extra) { };
+ virtual void traceEventBegin(const char* name, void* id, const char* extra) { }
+ virtual void traceEventEnd(const char* name, void* id, const char* extra) { }
// Generic callback for reporting histogram data. Range is identified by the min, max pair.
// By default, histogram is exponential, so that min=1, max=1000000, bucketCount=50 would do. Setting
// linear to true would require bucket count to cover whole min-max range.
- virtual void histogramCounts(const WebString& name, int sample, int min, int max, int bucketCount, bool linear) { };
+ virtual void histogramCounts(const WebString& name, int sample, int min, int max, int bucketCount, bool linear) { }
// Resources -----------------------------------------------------------
diff --git a/WebKit/chromium/public/WebMutationEvent.h b/WebKit/chromium/public/WebMutationEvent.h
new file mode 100644
index 0000000..75eb9c4
--- /dev/null
+++ b/WebKit/chromium/public/WebMutationEvent.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 WebMutationEvent_h
+#define WebMutationEvent_h
+
+#include "WebEvent.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Event; }
+#endif
+
+namespace WebKit {
+
+class WebMutationEvent : public WebEvent {
+public:
+ enum AttrChangeType {
+ Modification = 1,
+ Addition = 2,
+ Removal = 3
+ };
+
+ WEBKIT_API WebNode relatedNode() const;
+ WEBKIT_API WebString prevValue() const;
+ WEBKIT_API WebString newValue() const;
+ WEBKIT_API WebString attrName() const;
+ WEBKIT_API AttrChangeType attrChange() const;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebNode.h b/WebKit/chromium/public/WebNode.h
index 03afa90..4d2a0e9 100644
--- a/WebKit/chromium/public/WebNode.h
+++ b/WebKit/chromium/public/WebNode.h
@@ -40,9 +40,13 @@ namespace WTF { template <typename T> class PassRefPtr; }
#endif
namespace WebKit {
+class WebDocument;
+class WebEventListener;
+class WebEventListenerPrivate;
class WebFrame;
+class WebNodeList;
-// Provides readonly access to some properties of a DOM node.
+// Provides access to some properties of a DOM node.
class WebNode {
public:
virtual ~WebNode() { reset(); }
@@ -66,14 +70,52 @@ public:
operator WTF::PassRefPtr<WebCore::Node>() const;
#endif
+ enum NodeType {
+ ElementNode = 1,
+ AttributeNode,
+ TextNode,
+ CDataSectionNode,
+ EntityReferenceNode,
+ EntityNode,
+ ProcessingInstructionsNode,
+ CommentNode,
+ DocumentNode,
+ DocumentTypeNode,
+ DocumentFragmentNode,
+ NotationNode,
+ XPathNamespaceNode
+ };
+ WEBKIT_API NodeType nodeType() const;
WEBKIT_API WebNode parentNode() const;
WEBKIT_API WebString nodeName() const;
+ WEBKIT_API WebString nodeValue() const;
+ WEBKIT_API bool setNodeValue(const WebString&);
+ // Deprecated. Use document().frame() instead.
WEBKIT_API WebFrame* frame() const;
+ WEBKIT_API WebDocument document() const;
+ WEBKIT_API WebNode firstChild() const;
+ WEBKIT_API WebNode lastChild() const;
+ WEBKIT_API WebNode previousSibling() const;
+ WEBKIT_API WebNode nextSibling() const;
+ WEBKIT_API bool hasChildNodes() const;
+ WEBKIT_API WebNodeList childNodes();
+ WEBKIT_API WebString createMarkup() const;
+ WEBKIT_API bool isTextNode() const;
+ WEBKIT_API bool isElementNode() const;
+ WEBKIT_API void addEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture);
+ WEBKIT_API void removeEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture);
template<typename T> T toElement()
{
T res;
- res.m_private = m_private;
+ res.WebNode::assign(*this);
+ return res;
+ }
+
+ template<typename T> const T toConstElement() const
+ {
+ T res;
+ res.WebNode::assign(*this);
return res;
}
diff --git a/WebKit/chromium/public/WebNodeCollection.h b/WebKit/chromium/public/WebNodeCollection.h
new file mode 100644
index 0000000..fee4f44
--- /dev/null
+++ b/WebKit/chromium/public/WebNodeCollection.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebNodeCollection_h
+#define WebNodeCollection_h
+
+#include "WebCommon.h"
+
+namespace WebCore { class HTMLCollection; }
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+class WebNode;
+
+// Provides readonly access to some properties of a DOM node.
+class WebNodeCollection {
+public:
+ ~WebNodeCollection() { reset(); }
+
+ WebNodeCollection() : m_private(0) { }
+ WebNodeCollection(const WebNodeCollection& n) : m_private(0) { assign(n); }
+ WebNodeCollection& operator=(const WebNodeCollection& n)
+ {
+ assign(n);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebNodeCollection&);
+
+ WEBKIT_API unsigned length() const;
+ WEBKIT_API WebNode nextItem() const;
+ WEBKIT_API WebNode firstItem() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebNodeCollection(const WTF::PassRefPtr<WebCore::HTMLCollection>&);
+#endif
+
+private:
+ void assign(WebCore::HTMLCollection*);
+ WebCore::HTMLCollection* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebNodeList.h b/WebKit/chromium/public/WebNodeList.h
new file mode 100644
index 0000000..23efab0
--- /dev/null
+++ b/WebKit/chromium/public/WebNodeList.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebNodeList_h
+#define WebNodeList_h
+
+#include "WebCommon.h"
+
+namespace WebCore { class NodeList; }
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+class WebNode;
+
+// Provides readonly access to some properties of a DOM node.
+class WebNodeList {
+public:
+ ~WebNodeList() { reset(); }
+
+ WebNodeList() : m_private(0) { }
+ WebNodeList(const WebNodeList& n) : m_private(0) { assign(n); }
+ WebNodeList& operator=(const WebNodeList& n)
+ {
+ assign(n);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebNodeList&);
+
+ WEBKIT_API unsigned length() const;
+ WEBKIT_API WebNode item(size_t) const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebNodeList(const WTF::PassRefPtr<WebCore::NodeList>&);
+#endif
+
+private:
+ void assign(WebCore::NodeList*);
+ WebCore::NodeList* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebNotificationPresenter.h b/WebKit/chromium/public/WebNotificationPresenter.h
index 653b142..a3764aa 100644
--- a/WebKit/chromium/public/WebNotificationPresenter.h
+++ b/WebKit/chromium/public/WebNotificationPresenter.h
@@ -35,8 +35,10 @@
namespace WebKit {
+class WebDocument;
class WebNotification;
class WebNotificationPermissionCallback;
+class WebURL;
// Provides the services to show desktop notifications to the user.
class WebNotificationPresenter {
@@ -57,8 +59,9 @@ public:
// being destroyed. Does _not_ remove the notification if being shown, but detaches it from receiving events.
virtual void objectDestroyed(const WebNotification&) = 0;
- // Checks the permission level of a given origin.
- virtual Permission checkPermission(const WebString& origin) = 0;
+ // Checks the permission level for the given URL. If the URL is being displayed in a document
+ // (as opposed to a worker or other ScriptExecutionContext), |document| will also be provided.
+ virtual Permission checkPermission(const WebURL& url, WebDocument* document) = 0;
// Requests permission for a given origin. This operation is asynchronous and the callback provided
// will be invoked when the permission decision is made. Callback pointer must remain
diff --git a/WebKit/chromium/public/WebPageSerializer.h b/WebKit/chromium/public/WebPageSerializer.h
new file mode 100644
index 0000000..94f7994
--- /dev/null
+++ b/WebKit/chromium/public/WebPageSerializer.h
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebPageSerializer_h
+#define WebPageSerializer_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+class WebFrame;
+class WebPageSerializerClient;
+class WebString;
+class WebURL;
+template <typename T> class WebVector;
+
+// Get html data by serializing all frames of current page with lists
+// which contain all resource links that have local copy.
+class WebPageSerializer {
+public:
+ // This function will find out all frames and serialize them to HTML data.
+ // We have a data buffer to temporary saving generated html data. We will
+ // sequentially call WebPageSeriazlierClient once the data buffer is full.
+ //
+ // Return false means no available frame has been serialized, otherwise
+ // return true.
+ //
+ // The parameter frame specifies which frame need to be serialized.
+ // The parameter recursive specifies whether we need to
+ // serialize all sub frames of the specified frame or not.
+ // The parameter client specifies the pointer of interface
+ // WebPageSerializerClient providing a sink interface to receive the
+ // individual chunks of data to be saved.
+ // The parameter links contain original URLs of all saved links.
+ // The parameter localPaths contain corresponding local file paths of all
+ // saved links, which matched with vector:links one by one.
+ // The parameter localDirectoryName is relative path of directory which
+ // contain all saved auxiliary files included all sub frames and resources.
+ WEBKIT_API static bool serialize(WebFrame* frame,
+ bool recursive,
+ WebPageSerializerClient* client,
+ const WebVector<WebURL>& links,
+ const WebVector<WebString>& localPaths,
+ const WebString& localDirectoryName);
+
+ // FIXME: The following are here for unit testing purposes. Consider
+ // changing the unit tests instead.
+
+ // Generate the META for charset declaration.
+ WEBKIT_API static WebString generateMetaCharsetDeclaration(const WebString& charset);
+ // Generate the MOTW declaration.
+ WEBKIT_API static WebString generateMarkOfTheWebDeclaration(const WebURL& url);
+ // Generate the default base tag declaration.
+ WEBKIT_API static WebString generateBaseTagDeclaration(const WebString& baseTarget);
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebPageSerializerClient.h b/WebKit/chromium/public/WebPageSerializerClient.h
new file mode 100644
index 0000000..c30ddbc
--- /dev/null
+++ b/WebKit/chromium/public/WebPageSerializerClient.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebPageSerializerClient_h
+#define WebPageSerializerClient_h
+
+namespace WebKit {
+class WebCString;
+class WebURL;
+
+// This class is used for providing sink interface that can be used to receive
+// the individual chunks of data to be saved.
+class WebPageSerializerClient {
+public:
+ // This enum indicates This sink interface can receive the individual chunks
+ // of serialized data to be saved, so we use values of following enum
+ // definition to indicate the serialization status of serializing all html
+ // content. If current frame is not complete serialized, call
+ // didSerializeDataForFrame with URL of current frame, data, data length and
+ // flag CurrentFrameIsNotFinished.
+ // If current frame is complete serialized, call didSerializeDataForFrame
+ // with URL of current frame, data, data length and flag
+ // CurrentFrameIsFinished.
+ // If all frames of page are complete serialized, call
+ // didSerializeDataForFrame with empty URL, empty data, 0 and flag
+ // AllFramesAreFinished.
+ enum PageSerializationStatus {
+ CurrentFrameIsNotFinished,
+ CurrentFrameIsFinished,
+ AllFramesAreFinished,
+ };
+
+ // Receive the individual chunks of serialized and encoded data to be saved.
+ // The parameter frameURL specifies what frame the data belongs. The
+ // parameter data contains the available data for saving. The parameter
+ // status indicates the status of data serialization.
+ virtual void didSerializeDataForFrame(const WebURL& frameURL,
+ const WebCString& data,
+ PageSerializationStatus status) = 0;
+ WebPageSerializerClient() { }
+
+protected:
+ virtual ~WebPageSerializerClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebRuntimeFeatures.h b/WebKit/chromium/public/WebRuntimeFeatures.h
index eb6b2da..04f88c9 100644
--- a/WebKit/chromium/public/WebRuntimeFeatures.h
+++ b/WebKit/chromium/public/WebRuntimeFeatures.h
@@ -62,6 +62,12 @@ public:
WEBKIT_API static void enableApplicationCache(bool);
WEBKIT_API static bool isApplicationCacheEnabled();
+ WEBKIT_API static void enableGeolocation(bool);
+ WEBKIT_API static bool isGeolocationEnabled();
+
+ WEBKIT_API static void enableIndexedDatabase(bool);
+ WEBKIT_API static bool isIndexedDatabaseEnabled();
+
private:
WebRuntimeFeatures();
};
diff --git a/WebKit/chromium/public/WebSecurityOrigin.h b/WebKit/chromium/public/WebSecurityOrigin.h
index d04fbc6..7b04aac 100644
--- a/WebKit/chromium/public/WebSecurityOrigin.h
+++ b/WebKit/chromium/public/WebSecurityOrigin.h
@@ -55,6 +55,8 @@ public:
return *this;
}
+ WEBKIT_API static WebSecurityOrigin* createFromDatabaseIdentifier(const WebString& databaseIdentifier);
+
WEBKIT_API void reset();
WEBKIT_API void assign(const WebSecurityOrigin&);
diff --git a/WebKit/chromium/public/WebSecurityPolicy.h b/WebKit/chromium/public/WebSecurityPolicy.h
index 47dfe87..8e1ee52 100644
--- a/WebKit/chromium/public/WebSecurityPolicy.h
+++ b/WebKit/chromium/public/WebSecurityPolicy.h
@@ -55,6 +55,10 @@ public:
const WebURL& sourceOrigin, const WebString& destinationProtocol,
const WebString& destinationHost, bool allowDestinationSubdomains);
WEBKIT_API static void resetOriginAccessWhiteLists();
+
+ // Returns whether the url should be allowed to see the referrer
+ // based on their respective protocols.
+ WEBKIT_API static bool shouldHideReferrer(const WebURL& url, const WebString& referrer);
private:
WebSecurityPolicy();
diff --git a/WebKit/chromium/public/WebSettings.h b/WebKit/chromium/public/WebSettings.h
index da36806..d75ccde 100644
--- a/WebKit/chromium/public/WebSettings.h
+++ b/WebKit/chromium/public/WebSettings.h
@@ -58,6 +58,7 @@ public:
virtual void setWebSecurityEnabled(bool) = 0;
virtual void setJavaScriptCanOpenWindowsAutomatically(bool) = 0;
virtual void setLoadsImagesAutomatically(bool) = 0;
+ virtual void setImagesEnabled(bool) = 0;
virtual void setPluginsEnabled(bool) = 0;
virtual void setDOMPasteAllowed(bool) = 0;
virtual void setDeveloperExtrasEnabled(bool) = 0;
diff --git a/WebKit/chromium/public/WebStorageArea.h b/WebKit/chromium/public/WebStorageArea.h
index 71dc7a5..302e10c 100644
--- a/WebKit/chromium/public/WebStorageArea.h
+++ b/WebKit/chromium/public/WebStorageArea.h
@@ -32,10 +32,10 @@
#define WebStorageArea_h
#include "WebCommon.h"
+#include "WebString.h"
namespace WebKit {
-class WebString;
class WebURL;
// In WebCore, there's one distinct StorageArea per origin per StorageNamespace. This
@@ -60,14 +60,41 @@ public:
// Set the value that corresponds to a specific key. QuotaException is set if we've
// the StorageArea would have exceeded its quota. The value is NOT set when there's
// an exception. url is the url that should be used if a storage event fires.
- virtual void setItem(const WebString& key, const WebString& value, const WebURL& url, bool& quotaException) = 0;
+ // FIXME: The following is a hack to keep Chromium compiling until the other half is landed. Remove soon.
+ virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, bool& quotaException) // Deprecated.
+ {
+ WebString oldValue;
+ setItem(key, newValue, url, quotaException, oldValue);
+ }
+ virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, bool& quotaException, WebString& oldValue)
+ {
+ setItem(key, newValue, url, quotaException);
+ }
// Remove the value associated with a particular key. url is the url that should be used
// if a storage event fires.
- virtual void removeItem(const WebString& key, const WebURL& url) = 0;
+ // FIXME: The following is a hack to keep Chromium compiling until the other half is landed. Remove soon.
+ virtual void removeItem(const WebString& key, const WebURL& url) // Deprecated.
+ {
+ WebString oldValue;
+ removeItem(key, url, oldValue);
+ }
+ virtual void removeItem(const WebString& key, const WebURL& url, WebString& oldValue)
+ {
+ removeItem(key, url);
+ }
// Clear all key/value pairs. url is the url that should be used if a storage event fires.
- virtual void clear(const WebURL& url) = 0;
+ // FIXME: The following is a hack to keep Chromium compiling until the other half is landed. Remove soon.
+ virtual void clear(const WebURL& url) // Deprecated.
+ {
+ bool somethingCleared;
+ clear(url, somethingCleared);
+ }
+ virtual void clear(const WebURL& url, bool& somethingCleared)
+ {
+ clear(url);
+ }
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebString.h b/WebKit/chromium/public/WebString.h
index d9b66b2..d2cf9ea 100644
--- a/WebKit/chromium/public/WebString.h
+++ b/WebKit/chromium/public/WebString.h
@@ -76,6 +76,8 @@ public:
WEBKIT_API void assign(const WebString&);
WEBKIT_API void assign(const WebUChar* data, size_t len);
+ WEBKIT_API bool equals(const WebString& s) const;
+
WEBKIT_API size_t length() const;
WEBKIT_API const WebUChar* data() const;
@@ -87,6 +89,18 @@ public:
WEBKIT_API static WebString fromUTF8(const char* data, size_t length);
WEBKIT_API static WebString fromUTF8(const char* data);
+ template <int N> WebString(const char (&data)[N])
+ : m_private(0)
+ {
+ assign(fromUTF8(data, N - 1));
+ }
+
+ template <int N> WebString& operator=(const char (&data)[N])
+ {
+ assign(fromUTF8(data, N - 1));
+ return *this;
+ }
+
#if WEBKIT_IMPLEMENTATION
WebString(const WebCore::String&);
WebString& operator=(const WebCore::String&);
@@ -96,6 +110,7 @@ public:
WebString& operator=(const WebCore::AtomicString&);
operator WebCore::AtomicString() const;
#else
+
WebString(const string16& s) : m_private(0)
{
assign(s.data(), s.length());
@@ -150,6 +165,16 @@ private:
WebStringPrivate* m_private;
};
+inline bool operator==(const WebString& a, const WebString& b)
+{
+ return a.equals(b);
+}
+
+inline bool operator!=(const WebString& a, const WebString& b)
+{
+ return !(a == b);
+}
+
} // namespace WebKit
#endif
diff --git a/WebKit/chromium/public/WebURLResponse.h b/WebKit/chromium/public/WebURLResponse.h
index cdac83c..1dac069 100644
--- a/WebKit/chromium/public/WebURLResponse.h
+++ b/WebKit/chromium/public/WebURLResponse.h
@@ -118,6 +118,11 @@ public:
const WebCore::ResourceResponse& toResourceResponse() const;
#endif
+ // Flag whether this request was loaded via the SPDY protocol or not.
+ // SPDY is an experimental web protocol, see http://dev.chromium.org/spdy
+ WEBKIT_API bool wasFetchedViaSPDY() const;
+ WEBKIT_API void setWasFetchedViaSPDY(bool);
+
protected:
void assign(WebURLResponsePrivate*);
diff --git a/WebKit/chromium/public/WebVector.h b/WebKit/chromium/public/WebVector.h
index d1f99b4..0520895 100644
--- a/WebKit/chromium/public/WebVector.h
+++ b/WebKit/chromium/public/WebVector.h
@@ -84,6 +84,13 @@ public:
initializeFrom(other.size() ? &other[0] : 0, other.size());
}
+ WebVector& operator=(const WebVector& other)
+ {
+ if (this != &other)
+ assign(other);
+ return *this;
+ }
+
template <typename C>
WebVector<T>& operator=(const C& other)
{
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
index 5e1f15d..aba556c 100644
--- a/WebKit/chromium/public/WebView.h
+++ b/WebKit/chromium/public/WebView.h
@@ -251,11 +251,25 @@ public:
WEBKIT_API static void resetVisitedLinkState();
- // Scrollbar colors ----------------------------------------------------
+ // Custom colors -------------------------------------------------------
+
virtual void setScrollbarColors(unsigned inactiveColor,
unsigned activeColor,
unsigned trackColor) = 0;
+ virtual void setSelectionColors(unsigned activeBackgroundColor,
+ unsigned activeForegroundColor,
+ unsigned inactiveBackgroundColor,
+ unsigned inactiveForegroundColor) = 0;
+
+
+ // Modal dialog support ------------------------------------------------
+
+ // Call these methods before and after running a nested, modal event loop
+ // to suspend script callbacks and resource loads.
+ WEBKIT_API static void willEnterModalLoop();
+ WEBKIT_API static void didExitModalLoop();
+
protected:
~WebView() {}
};
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index 2e2f953..964d382 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -34,6 +34,7 @@
#include "WebDragOperation.h"
#include "WebEditingAction.h"
#include "WebFileChooserCompletion.h"
+#include "WebFileChooserParams.h"
#include "WebString.h"
#include "WebTextAffinity.h"
#include "WebTextDirection.h"
@@ -48,6 +49,7 @@ class WebFrame;
class WebNode;
class WebNotificationPresenter;
class WebRange;
+class WebStorageNamespace;
class WebURL;
class WebView;
class WebWidget;
@@ -63,7 +65,9 @@ class WebViewClient : virtual public WebWidgetClient {
public:
// Factory methods -----------------------------------------------------
- // Create a new related WebView.
+ // Create a new related WebView. This method must clone its session storage
+ // so any subsequent calls to createSessionStorageNamespace conform to the
+ // WebStorage specification.
virtual WebView* createView(WebFrame* creator) { return 0; }
// Create a new WebPopupMenu. In the second form, the client is
@@ -71,6 +75,8 @@ public:
virtual WebWidget* createPopupMenu(bool activatable) { return 0; }
virtual WebWidget* createPopupMenu(const WebPopupMenuInfo&) { return 0; }
+ // Create a session storage namespace object associated with this WebView.
+ virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; }
// Misc ----------------------------------------------------------------
@@ -161,9 +167,8 @@ public:
// dialog is closed, it should call the WebFileChooserCompletion to
// pass the results of the dialog. Returns false if
// WebFileChooseCompletion will never be called.
- virtual bool runFileChooser(
- bool multiSelect, const WebString& title,
- const WebString& initialValue, WebFileChooserCompletion*) { return false; }
+ virtual bool runFileChooser(const WebFileChooserParams&,
+ WebFileChooserCompletion*) { return false; }
// Displays a modal alert dialog containing the given message. Returns
// once the user dismisses the dialog.
diff --git a/WebKit/chromium/src/ApplicationCacheHost.cpp b/WebKit/chromium/src/ApplicationCacheHost.cpp
index ef8f860..5fa4a66 100644
--- a/WebKit/chromium/src/ApplicationCacheHost.cpp
+++ b/WebKit/chromium/src/ApplicationCacheHost.cpp
@@ -33,14 +33,11 @@
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+#include "ApplicationCacheHostInternal.h"
#include "DocumentLoader.h"
#include "DOMApplicationCache.h"
#include "Frame.h"
#include "Settings.h"
-#include "WebApplicationCacheHost.h"
-#include "WebApplicationCacheHostClient.h"
-#include "WebKit.h"
-#include "WebKitClient.h"
#include "WebURL.h"
#include "WebURLError.h"
#include "WebURLResponse.h"
@@ -51,27 +48,6 @@ using namespace WebKit;
namespace WebCore {
-// ApplicationCacheHostInternal -----------------------------------------------
-
-class ApplicationCacheHostInternal : public WebApplicationCacheHostClient {
-public:
- ApplicationCacheHostInternal(ApplicationCacheHost* host)
- : m_innerHost(host)
- {
- m_outerHost.set(WebKit::webKitClient()->createApplicationCacheHost(this));
- }
-
- virtual void notifyEventListener(WebApplicationCacheHost::EventID eventID)
- {
- m_innerHost->notifyDOMApplicationCache(
- static_cast<ApplicationCacheHost::EventID>(eventID));
- }
-
- ApplicationCacheHost* m_innerHost;
- OwnPtr<WebApplicationCacheHost> m_outerHost;
-};
-
-// ApplicationCacheHost -------------------------------------------------------
// We provide a custom implementation of this class that calls out to the
// embedding application instead of using WebCore's built in appcache system.
// This file replaces webcore/appcache/ApplicationCacheHost.cpp in our build.
@@ -79,6 +55,7 @@ public:
ApplicationCacheHost::ApplicationCacheHost(DocumentLoader* documentLoader)
: m_domApplicationCache(0)
, m_documentLoader(documentLoader)
+ , m_defersEvents(true)
{
ASSERT(m_documentLoader);
}
@@ -220,15 +197,32 @@ void ApplicationCacheHost::setDOMApplicationCache(DOMApplicationCache* domApplic
void ApplicationCacheHost::notifyDOMApplicationCache(EventID id)
{
+ if (m_defersEvents) {
+ m_deferredEvents.append(id);
+ return;
+ }
if (m_domApplicationCache) {
ExceptionCode ec = 0;
- m_domApplicationCache->dispatchEvent(
- Event::create(DOMApplicationCache::toEventType(id), false, false),
- ec);
+ m_domApplicationCache->dispatchEvent(Event::create(DOMApplicationCache::toEventType(id), false, false), ec);
ASSERT(!ec);
}
}
+void ApplicationCacheHost::stopDeferringEvents()
+{
+ RefPtr<DocumentLoader> protect(documentLoader());
+ for (unsigned i = 0; i < m_deferredEvents.size(); ++i) {
+ EventID id = m_deferredEvents[i];
+ if (m_domApplicationCache) {
+ ExceptionCode ec = 0;
+ m_domApplicationCache->dispatchEvent(Event::create(DOMApplicationCache::toEventType(id), false, false), ec);
+ ASSERT(!ec);
+ }
+ }
+ m_deferredEvents.clear();
+ m_defersEvents = false;
+}
+
ApplicationCacheHost::Status ApplicationCacheHost::status() const
{
return m_internal ? static_cast<Status>(m_internal->m_outerHost->status()) : UNCACHED;
diff --git a/WebKit/chromium/src/ApplicationCacheHostInternal.h b/WebKit/chromium/src/ApplicationCacheHostInternal.h
new file mode 100644
index 0000000..3e52c1b
--- /dev/null
+++ b/WebKit/chromium/src/ApplicationCacheHostInternal.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.
+ */
+
+#include "config.h"
+#include "ApplicationCacheHost.h"
+
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+
+#include "WebApplicationCacheHostClient.h"
+#include "WebKit.h"
+#include "WebKitClient.h"
+
+namespace WebCore {
+
+class ApplicationCacheHostInternal : public WebKit::WebApplicationCacheHostClient {
+public:
+ ApplicationCacheHostInternal(ApplicationCacheHost* host)
+ : m_innerHost(host)
+ {
+ m_outerHost.set(WebKit::webKitClient()->createApplicationCacheHost(this));
+ }
+
+ virtual void notifyEventListener(WebKit::WebApplicationCacheHost::EventID eventID)
+ {
+ m_innerHost->notifyDOMApplicationCache(static_cast<ApplicationCacheHost::EventID>(eventID));
+ }
+
+ static WebKit::WebApplicationCacheHost* toWebApplicationCacheHost(ApplicationCacheHost* innerHost)
+ {
+ if (innerHost && innerHost->m_internal.get())
+ return innerHost->m_internal->m_outerHost.get();
+ return 0;
+ }
+
+private:
+ friend class ApplicationCacheHost;
+ ApplicationCacheHost* m_innerHost;
+ OwnPtr<WebKit::WebApplicationCacheHost> m_outerHost;
+};
+
+}
+
+#endif // ENABLE(OFFLINE_WEB_APPLICATIONS)
diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp
index 35e2057..1d2948f 100644
--- a/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -116,6 +116,8 @@ COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleWebArea, WebAreaRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleHeading, HeadingRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleListBox, ListBoxRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleListBoxOption, ListBoxOptionRole);
+COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleMenuListOption, MenuListOptionRole);
+COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleMenuListPopup, MenuListPopupRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTableHeaderContainer, TableHeaderContainerRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDefinitionListTerm, DefinitionListTermRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDefinitionListDefinition, DefinitionListDefinitionRole);
@@ -126,8 +128,11 @@ COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTab, TabRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTabList, TabListRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTabPanel, TabPanelRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTreeRole, TreeRole);
+COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTreeGrid, TreeGridRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTreeItemRole, TreeItemRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDirectory, DirectoryRole);
+COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleEditableText, EditableTextRole);
+COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleListItem, ListItemRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkApplication, LandmarkApplicationRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkBanner, LandmarkBannerRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkComplementary, LandmarkComplementaryRole);
@@ -245,6 +250,20 @@ COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Month, HTMLInputElement::MONTH);
COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Time, HTMLInputElement::TIME);
COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Week, HTMLInputElement::WEEK);
+COMPILE_ASSERT_MATCHING_ENUM(WebNode::ElementNode, Node::ELEMENT_NODE);
+COMPILE_ASSERT_MATCHING_ENUM(WebNode::AttributeNode, Node::ATTRIBUTE_NODE);
+COMPILE_ASSERT_MATCHING_ENUM(WebNode::TextNode, Node::TEXT_NODE);
+COMPILE_ASSERT_MATCHING_ENUM(WebNode::CDataSectionNode, Node::CDATA_SECTION_NODE);
+COMPILE_ASSERT_MATCHING_ENUM(WebNode::EntityReferenceNode, Node::ENTITY_REFERENCE_NODE);
+COMPILE_ASSERT_MATCHING_ENUM(WebNode::EntityNode, Node::ENTITY_NODE);
+COMPILE_ASSERT_MATCHING_ENUM(WebNode::ProcessingInstructionsNode, Node::PROCESSING_INSTRUCTION_NODE);
+COMPILE_ASSERT_MATCHING_ENUM(WebNode::CommentNode, Node::COMMENT_NODE);
+COMPILE_ASSERT_MATCHING_ENUM(WebNode::DocumentNode, Node::DOCUMENT_NODE);
+COMPILE_ASSERT_MATCHING_ENUM(WebNode::DocumentTypeNode, Node::DOCUMENT_TYPE_NODE);
+COMPILE_ASSERT_MATCHING_ENUM(WebNode::DocumentFragmentNode, Node::DOCUMENT_FRAGMENT_NODE);
+COMPILE_ASSERT_MATCHING_ENUM(WebNode::NotationNode, Node::NOTATION_NODE);
+COMPILE_ASSERT_MATCHING_ENUM(WebNode::XPathNamespaceNode, Node::XPATH_NAMESPACE_NODE);
+
#if ENABLE(VIDEO)
COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Empty, MediaPlayer::Empty);
COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Idle, MediaPlayer::Idle);
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index 4e20124..9079094 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -560,22 +560,20 @@ void ChromeClientImpl::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> fileCh
if (!client)
return;
- bool multipleFiles = fileChooser->allowsMultipleFiles();
-
- WebString suggestion;
- if (fileChooser->filenames().size() > 0)
- suggestion = fileChooser->filenames()[0];
-
+ WebFileChooserParams params;
+ params.multiSelect = fileChooser->allowsMultipleFiles();
+ params.acceptTypes = fileChooser->acceptTypes();
+ params.selectedFiles = fileChooser->filenames();
+ if (params.selectedFiles.size() > 0)
+ params.initialValue = params.selectedFiles[0];
WebFileChooserCompletionImpl* chooserCompletion =
new WebFileChooserCompletionImpl(fileChooser);
- bool ok = client->runFileChooser(multipleFiles,
- WebString(),
- suggestion,
- chooserCompletion);
- if (!ok) {
- // Choosing failed, so do callback with an empty list.
- chooserCompletion->didChooseFile(WebVector<WebString>());
- }
+
+ if (client->runFileChooser(params, chooserCompletion))
+ return;
+
+ // Choosing failed, so do callback with an empty list.
+ chooserCompletion->didChooseFile(WebVector<WebString>());
}
void ChromeClientImpl::popupOpened(PopupContainer* popupContainer,
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index 93d92ba..0fd0825 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -33,6 +33,7 @@
#include <googleurl/src/url_util.h>
+#include "Chrome.h"
#include "ChromeClientImpl.h"
#include "WebClipboard.h"
#include "WebCookie.h"
@@ -54,13 +55,13 @@
#include "WebViewImpl.h"
#include "WebWorkerClientImpl.h"
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include "WebRect.h"
#include "WebSandboxSupport.h"
#include "WebThemeEngine.h"
#endif
-#if PLATFORM(LINUX)
+#if OS(LINUX)
#include "WebSandboxSupport.h"
#include "WebFontInfo.h"
#endif
@@ -212,6 +213,12 @@ void ChromiumBridge::deleteCookie(const KURL& url, const String& cookieName)
webKitClient()->deleteCookie(url, cookieName);
}
+bool ChromiumBridge::cookiesEnabled(const KURL& url,
+ const KURL& firstPartyForCookies)
+{
+ return webKitClient()->cookiesEnabled(url, firstPartyForCookies);
+}
+
// DNS ------------------------------------------------------------------------
void ChromiumBridge::prefetchDNS(const String& hostname)
@@ -278,7 +285,7 @@ KURL ChromiumBridge::filePathToURL(const String& path)
// Font -----------------------------------------------------------------------
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
bool ChromiumBridge::ensureFontLoaded(HFONT font)
{
WebSandboxSupport* ss = webKitClient()->sandboxSupport();
@@ -289,7 +296,7 @@ bool ChromiumBridge::ensureFontLoaded(HFONT font)
}
#endif
-#if PLATFORM(LINUX)
+#if OS(LINUX)
String ChromiumBridge::getFontFamilyForCharacters(const UChar* characters, size_t numCharacters)
{
if (webKitClient()->sandboxSupport())
@@ -473,7 +480,7 @@ double ChromiumBridge::currentTime()
// Theming --------------------------------------------------------------------
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
void ChromiumBridge::paintButton(
GraphicsContext* gc, int part, int state, int classicState,
diff --git a/WebKit/chromium/src/ContextMenuClientImpl.cpp b/WebKit/chromium/src/ContextMenuClientImpl.cpp
index f23919e..72b861f 100644
--- a/WebKit/chromium/src/ContextMenuClientImpl.cpp
+++ b/WebKit/chromium/src/ContextMenuClientImpl.cpp
@@ -79,11 +79,11 @@ static WebURL urlFromFrame(Frame* frame)
return WebURL();
}
-// Helper function to determine whether text is a single word or a sentence.
+// Helper function to determine whether text is a single word.
static bool isASingleWord(const String& text)
{
- TextBreakIterator* it = characterBreakIterator(text.characters(), text.length());
- return it && textBreakNext(it) == TextBreakDone;
+ TextBreakIterator* it = wordBreakIterator(text.characters(), text.length());
+ return it && textBreakNext(it) == static_cast<int>(text.length());
}
// Helper function to get misspelled word on which context menu
diff --git a/WebKit/chromium/src/DOMUtilitiesPrivate.cpp b/WebKit/chromium/src/DOMUtilitiesPrivate.cpp
index ffdd85d..4081db6 100644
--- a/WebKit/chromium/src/DOMUtilitiesPrivate.cpp
+++ b/WebKit/chromium/src/DOMUtilitiesPrivate.cpp
@@ -84,4 +84,53 @@ String nameOfInputElement(HTMLInputElement* element)
return WebInputElement(element).nameForAutofill();
}
+bool elementHasLegalLinkAttribute(const Element* element,
+ const QualifiedName& attrName)
+{
+ if (attrName == HTMLNames::srcAttr) {
+ // Check src attribute.
+ if (element->hasTagName(HTMLNames::imgTag)
+ || element->hasTagName(HTMLNames::scriptTag)
+ || element->hasTagName(HTMLNames::iframeTag)
+ || element->hasTagName(HTMLNames::frameTag))
+ return true;
+ if (element->hasTagName(HTMLNames::inputTag)) {
+ const HTMLInputElement* input =
+ static_cast<const HTMLInputElement*>(element);
+ if (input->inputType() == HTMLInputElement::IMAGE)
+ return true;
+ }
+ } else if (attrName == HTMLNames::hrefAttr) {
+ // Check href attribute.
+ if (element->hasTagName(HTMLNames::linkTag)
+ || element->hasTagName(HTMLNames::aTag)
+ || element->hasTagName(HTMLNames::areaTag))
+ return true;
+ } else if (attrName == HTMLNames::actionAttr) {
+ if (element->hasTagName(HTMLNames::formTag))
+ return true;
+ } else if (attrName == HTMLNames::backgroundAttr) {
+ if (element->hasTagName(HTMLNames::bodyTag)
+ || element->hasTagName(HTMLNames::tableTag)
+ || element->hasTagName(HTMLNames::trTag)
+ || element->hasTagName(HTMLNames::tdTag))
+ return true;
+ } else if (attrName == HTMLNames::citeAttr) {
+ if (element->hasTagName(HTMLNames::blockquoteTag)
+ || element->hasTagName(HTMLNames::qTag)
+ || element->hasTagName(HTMLNames::delTag)
+ || element->hasTagName(HTMLNames::insTag))
+ return true;
+ } else if (attrName == HTMLNames::classidAttr
+ || attrName == HTMLNames::dataAttr) {
+ if (element->hasTagName(HTMLNames::objectTag))
+ return true;
+ } else if (attrName == HTMLNames::codebaseAttr) {
+ if (element->hasTagName(HTMLNames::objectTag)
+ || element->hasTagName(HTMLNames::appletTag))
+ return true;
+ }
+ return false;
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/DOMUtilitiesPrivate.h b/WebKit/chromium/src/DOMUtilitiesPrivate.h
index c02bf84..253ab3f 100644
--- a/WebKit/chromium/src/DOMUtilitiesPrivate.h
+++ b/WebKit/chromium/src/DOMUtilitiesPrivate.h
@@ -32,11 +32,13 @@
#define DOMUtilitiesPrivate_h
namespace WebCore {
+class Element;
class HTMLInputElement;
class HTMLLinkElement;
class HTMLMetaElement;
class HTMLOptionElement;
class Node;
+class QualifiedName;
class String;
}
@@ -53,6 +55,16 @@ WebCore::HTMLOptionElement* toHTMLOptionElement(WebCore::Node*);
// FIXME: Deprecate. Use WebInputElement::nameForAutofill instead.
WebCore::String nameOfInputElement(WebCore::HTMLInputElement*);
+// For img, script, iframe, frame element, when attribute name is src,
+// for link, a, area element, when attribute name is href,
+// for form element, when attribute name is action,
+// for input, type=image, when attribute name is src,
+// for body, table, tr, td, when attribute name is background,
+// for blockquote, q, del, ins, when attribute name is cite,
+// we can consider the attribute value has legal link.
+bool elementHasLegalLinkAttribute(const WebCore::Element* element,
+ const WebCore::QualifiedName& attrName);
+
} // namespace WebKit
#endif
diff --git a/WebKit/chromium/src/DragClientImpl.cpp b/WebKit/chromium/src/DragClientImpl.cpp
index 5d8a9c3..671e7ca 100644
--- a/WebKit/chromium/src/DragClientImpl.cpp
+++ b/WebKit/chromium/src/DragClientImpl.cpp
@@ -79,9 +79,7 @@ void DragClientImpl::startDrag(DragImageRef dragImage,
WebDragData dragData = static_cast<ClipboardChromium*>(clipboard)->dataObject();
- DragOperation dragOperationMask;
- if (!clipboard->sourceOperation(dragOperationMask))
- dragOperationMask = DragOperationEvery;
+ DragOperation dragOperationMask = clipboard->sourceOperation();
m_webView->startDragging(
eventPos, dragData, static_cast<WebDragOperationsMask>(dragOperationMask));
diff --git a/WebKit/chromium/src/EditorClientImpl.cpp b/WebKit/chromium/src/EditorClientImpl.cpp
index 5db8ff7..e035e6a 100644
--- a/WebKit/chromium/src/EditorClientImpl.cpp
+++ b/WebKit/chromium/src/EditorClientImpl.cpp
@@ -105,7 +105,7 @@ bool EditorClientImpl::isSelectTrailingWhitespaceEnabled()
{
if (m_webView->client())
return m_webView->client()->isSelectTrailingWhitespaceEnabled();
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
return true;
#else
return false;
@@ -357,7 +357,7 @@ static const unsigned CtrlKey = 1 << 0;
static const unsigned AltKey = 1 << 1;
static const unsigned ShiftKey = 1 << 2;
static const unsigned MetaKey = 1 << 3;
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
// Aliases for the generic key defintions to make kbd shortcuts definitions more
// readable on OS X.
static const unsigned OptionKey = AltKey;
@@ -387,7 +387,7 @@ struct KeyPressEntry {
static const KeyDownEntry keyDownEntries[] = {
{ VKEY_LEFT, 0, "MoveLeft" },
{ VKEY_LEFT, ShiftKey, "MoveLeftAndModifySelection" },
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
{ VKEY_LEFT, OptionKey, "MoveWordLeft" },
{ VKEY_LEFT, OptionKey | ShiftKey,
"MoveWordLeftAndModifySelection" },
@@ -398,7 +398,7 @@ static const KeyDownEntry keyDownEntries[] = {
#endif
{ VKEY_RIGHT, 0, "MoveRight" },
{ VKEY_RIGHT, ShiftKey, "MoveRightAndModifySelection" },
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
{ VKEY_RIGHT, OptionKey, "MoveWordRight" },
{ VKEY_RIGHT, OptionKey | ShiftKey,
"MoveWordRightAndModifySelection" },
@@ -418,12 +418,12 @@ static const KeyDownEntry keyDownEntries[] = {
{ VKEY_HOME, 0, "MoveToBeginningOfLine" },
{ VKEY_HOME, ShiftKey,
"MoveToBeginningOfLineAndModifySelection" },
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
{ VKEY_LEFT, CommandKey, "MoveToBeginningOfLine" },
{ VKEY_LEFT, CommandKey | ShiftKey,
"MoveToBeginningOfLineAndModifySelection" },
#endif
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
{ VKEY_UP, CommandKey, "MoveToBeginningOfDocument" },
{ VKEY_UP, CommandKey | ShiftKey,
"MoveToBeginningOfDocumentAndModifySelection" },
@@ -434,7 +434,7 @@ static const KeyDownEntry keyDownEntries[] = {
#endif
{ VKEY_END, 0, "MoveToEndOfLine" },
{ VKEY_END, ShiftKey, "MoveToEndOfLineAndModifySelection" },
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
{ VKEY_DOWN, CommandKey, "MoveToEndOfDocument" },
{ VKEY_DOWN, CommandKey | ShiftKey,
"MoveToEndOfDocumentAndModifySelection" },
@@ -443,7 +443,7 @@ static const KeyDownEntry keyDownEntries[] = {
{ VKEY_END, CtrlKey | ShiftKey,
"MoveToEndOfDocumentAndModifySelection" },
#endif
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
{ VKEY_RIGHT, CommandKey, "MoveToEndOfLine" },
{ VKEY_RIGHT, CommandKey | ShiftKey,
"MoveToEndOfLineAndModifySelection" },
@@ -451,7 +451,7 @@ static const KeyDownEntry keyDownEntries[] = {
{ VKEY_BACK, 0, "DeleteBackward" },
{ VKEY_BACK, ShiftKey, "DeleteBackward" },
{ VKEY_DELETE, 0, "DeleteForward" },
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
{ VKEY_BACK, OptionKey, "DeleteWordBackward" },
{ VKEY_DELETE, OptionKey, "DeleteWordForward" },
#else
@@ -473,7 +473,7 @@ static const KeyDownEntry keyDownEntries[] = {
{ VKEY_INSERT, CtrlKey, "Copy" },
{ VKEY_INSERT, ShiftKey, "Paste" },
{ VKEY_DELETE, ShiftKey, "Cut" },
-#if !PLATFORM(DARWIN)
+#if !OS(DARWIN)
// On OS X, we pipe these back to the browser, so that it can do menu item
// blinking.
{ 'C', CtrlKey, "Copy" },
@@ -600,13 +600,13 @@ bool EditorClientImpl::handleEditingKeyboardEvent(KeyboardEvent* evt)
// unexpected behaviour
if (ch < ' ')
return false;
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
// Don't insert ASCII character if ctrl w/o alt or meta is on.
// On Mac, we should ignore events when meta is on (Command-<x>).
if (ch < 0x80) {
if (evt->keyEvent()->ctrlKey() && !evt->keyEvent()->altKey())
return false;
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
if (evt->keyEvent()->metaKey())
return false;
#endif
diff --git a/WebKit/chromium/src/EventListenerWrapper.cpp b/WebKit/chromium/src/EventListenerWrapper.cpp
new file mode 100644
index 0000000..f2d2979
--- /dev/null
+++ b/WebKit/chromium/src/EventListenerWrapper.cpp
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "EventListenerWrapper.h"
+
+#include "Event.h"
+#include "EventListener.h"
+
+#include "WebEvent.h"
+#include "WebEventListener.h"
+
+namespace WebKit {
+
+EventListenerWrapper::EventListenerWrapper(WebEventListener* webEventListener)
+ : EventListener(EventListener::JSEventListenerType)
+ , m_webEventListener(webEventListener)
+{
+}
+
+EventListenerWrapper::~EventListenerWrapper()
+{
+ if (m_webEventListener)
+ m_webEventListener->notifyEventListenerDeleted(this);
+}
+
+bool EventListenerWrapper::operator==(const EventListener& listener)
+{
+ return this == &listener;
+}
+
+void EventListenerWrapper::handleEvent(ScriptExecutionContext* context, Event* event)
+{
+ if (!m_webEventListener)
+ return;
+ WebEvent webEvent(event);
+ m_webEventListener->handleEvent(webEvent);
+}
+
+void EventListenerWrapper::webEventListenerDeleted()
+{
+ m_webEventListener = 0;
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/EventListenerWrapper.h b/WebKit/chromium/src/EventListenerWrapper.h
new file mode 100644
index 0000000..2a0cbbb
--- /dev/null
+++ b/WebKit/chromium/src/EventListenerWrapper.h
@@ -0,0 +1,62 @@
+/*
+ * 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 EventListenerWrapper_h
+#define EventListenerWrapper_h
+
+#include "EventListener.h"
+
+namespace WebCore {
+class ScriptExecutionContext;
+}
+
+using namespace WebCore;
+
+namespace WebKit {
+
+class WebEventListener;
+
+class EventListenerWrapper : public EventListener {
+public:
+ EventListenerWrapper(WebEventListener*);
+ ~EventListenerWrapper();
+
+ virtual bool operator==(const EventListener&);
+ virtual void handleEvent(ScriptExecutionContext*, Event*);
+
+ void webEventListenerDeleted();
+
+private:
+ WebEventListener* m_webEventListener;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index 3ca8e8d..b984308 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -164,6 +164,22 @@ bool FrameLoaderClientImpl::allowJavaScript(bool enabledPerSettings)
return enabledPerSettings;
}
+bool FrameLoaderClientImpl::allowPlugins(bool enabledPerSettings)
+{
+ if (m_webFrame->client())
+ return m_webFrame->client()->allowPlugins(m_webFrame, enabledPerSettings);
+
+ return enabledPerSettings;
+}
+
+bool FrameLoaderClientImpl::allowImages(bool enabledPerSettings)
+{
+ if (m_webFrame->client())
+ return m_webFrame->client()->allowImages(m_webFrame, enabledPerSettings);
+
+ return enabledPerSettings;
+}
+
bool FrameLoaderClientImpl::hasWebView() const
{
return m_webFrame->viewImpl();
@@ -1325,7 +1341,7 @@ PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin(
const String& mimeType,
bool loadManually)
{
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
// WebCore asks us to make a plugin even if we don't have a
// registered handler, with a comment saying it's so we can display
// the broken plugin icon. In Chromium, we normally register a
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.h b/WebKit/chromium/src/FrameLoaderClientImpl.h
index 4ddfe5f..901600c 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.h
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.h
@@ -66,7 +66,7 @@ public:
virtual void didCreateScriptContextForFrame();
virtual void didDestroyScriptContextForFrame();
- // A context untied to a frame was created (through evaluateInNewContext).
+ // A context untied to a frame was created (through evaluateInIsolatedWorld).
// This context is not tied to the lifetime of its frame, and is destroyed
// in garbage collection.
virtual void didCreateIsolatedScriptContext();
@@ -192,6 +192,8 @@ public:
virtual void registerForIconNotification(bool listen = true);
virtual void didChangeScrollOffset();
virtual bool allowJavaScript(bool enabledPerSettings);
+ virtual bool allowPlugins(bool enabledPerSettings);
+ virtual bool allowImages(bool enabledPerSettings);
private:
void makeDocumentView();
diff --git a/WebKit/chromium/src/GraphicsContext3D.cpp b/WebKit/chromium/src/GraphicsContext3D.cpp
index c9ba5a1..7fe31b0 100644
--- a/WebKit/chromium/src/GraphicsContext3D.cpp
+++ b/WebKit/chromium/src/GraphicsContext3D.cpp
@@ -56,7 +56,7 @@
#include <stdio.h>
#include <wtf/FastMalloc.h>
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include <windows.h>
#endif
@@ -76,11 +76,11 @@
#include "NativeImageSkia.h"
#endif
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
#define USE_TEXTURE_RECTANGLE_FOR_FRAMEBUFFER
#endif
-#if PLATFORM(LINUX)
+#if OS(LINUX)
#include <dlfcn.h>
#include "GL/glxew.h"
#endif
@@ -98,7 +98,7 @@ namespace WebCore {
class GraphicsContext3DInternal {
public:
- GraphicsContext3DInternal();
+ GraphicsContext3DInternal(GraphicsContext3D::Attributes attrs);
~GraphicsContext3DInternal();
bool makeContextCurrent();
@@ -116,12 +116,15 @@ public:
void activeTexture(unsigned long texture);
void bindBuffer(unsigned long target,
WebGLBuffer* buffer);
+ void bindFramebuffer(unsigned long target,
+ WebGLFramebuffer* framebuffer);
void bindTexture(unsigned long target,
WebGLTexture* texture);
void bufferDataImpl(unsigned long target, int size, const void* data, unsigned long usage);
void disableVertexAttribArray(unsigned long index);
void enableVertexAttribArray(unsigned long index);
unsigned long getError();
+ GraphicsContext3D::Attributes getContextAttributes();
void vertexAttribPointer(unsigned long indx, int size, int type, bool normalized,
unsigned long stride, unsigned long offset);
void viewportImpl(long x, long y, unsigned long width, unsigned long height);
@@ -129,11 +132,16 @@ public:
void synthesizeGLError(unsigned long error);
private:
+ GraphicsContext3D::Attributes m_attrs;
+
unsigned int m_texture;
unsigned int m_fbo;
unsigned int m_depthBuffer;
unsigned int m_cachedWidth, m_cachedHeight;
+ // For tracking which FBO is bound
+ unsigned int m_boundFBO;
+
#ifdef FLIP_FRAMEBUFFER_VERTICALLY
unsigned char* m_scanline;
void flipVertically(unsigned char* framebuffer,
@@ -176,7 +184,8 @@ private:
SkBitmap* m_resizingBitmap;
#endif
-#if PLATFORM(WIN_OS)
+ static bool s_initializedGLEW;
+#if OS(WINDOWS)
HWND m_canvasWindow;
HDC m_canvasDC;
HGLRC m_contextObj;
@@ -184,30 +193,170 @@ private:
CGLPBufferObj m_pbuffer;
CGLContextObj m_contextObj;
unsigned char* m_renderOutput;
- CGContextRef m_cgContext;
-#elif PLATFORM(LINUX)
- Display* m_display;
+#elif OS(LINUX)
GLXContext m_contextObj;
GLXPbuffer m_pbuffer;
+
// In order to avoid problems caused by linking against libGL, we
// dynamically look up all the symbols we need.
// http://code.google.com/p/chromium/issues/detail?id=16800
- void* m_libGL;
- PFNGLXCHOOSEFBCONFIGPROC m_glXChooseFBConfig;
- PFNGLXCREATENEWCONTEXTPROC m_glXCreateNewContext;
- PFNGLXCREATEPBUFFERPROC m_glXCreatePbuffer;
- PFNGLXDESTROYPBUFFERPROC m_glXDestroyPbuffer;
- typedef Bool (* PFNGLXMAKECURRENTPROC)(Display* dpy, GLXDrawable drawable, GLXContext ctx);
- PFNGLXMAKECURRENTPROC m_glXMakeCurrent;
- typedef void (* PFNGLXDESTROYCONTEXTPROC)(Display* dpy, GLXContext ctx);
- PFNGLXDESTROYCONTEXTPROC m_glXDestroyContext;
- typedef GLXContext (* PFNGLXGETCURRENTCONTEXTPROC)(void);
- PFNGLXGETCURRENTCONTEXTPROC m_glXGetCurrentContext;
+ class GLConnection {
+ public:
+ ~GLConnection();
+
+ static GLConnection* create();
+
+ GLXFBConfig* chooseFBConfig(int screen, const int *attrib_list, int *nelements)
+ {
+ return m_glXChooseFBConfig(m_display, screen, attrib_list, nelements);
+ }
+
+ GLXContext createNewContext(GLXFBConfig config, int renderType, GLXContext shareList, Bool direct)
+ {
+ return m_glXCreateNewContext(m_display, config, renderType, shareList, direct);
+ }
+
+ GLXPbuffer createPbuffer(GLXFBConfig config, const int *attribList)
+ {
+ return m_glXCreatePbuffer(m_display, config, attribList);
+ }
+
+ void destroyPbuffer(GLXPbuffer pbuf)
+ {
+ m_glXDestroyPbuffer(m_display, pbuf);
+ }
+
+ Bool makeCurrent(GLXDrawable drawable, GLXContext ctx)
+ {
+ return m_glXMakeCurrent(m_display, drawable, ctx);
+ }
+
+ void destroyContext(GLXContext ctx)
+ {
+ m_glXDestroyContext(m_display, ctx);
+ }
+
+ GLXContext getCurrentContext()
+ {
+ return m_glXGetCurrentContext();
+ }
+
+ private:
+ Display* m_display;
+ void* m_libGL;
+ PFNGLXCHOOSEFBCONFIGPROC m_glXChooseFBConfig;
+ PFNGLXCREATENEWCONTEXTPROC m_glXCreateNewContext;
+ PFNGLXCREATEPBUFFERPROC m_glXCreatePbuffer;
+ PFNGLXDESTROYPBUFFERPROC m_glXDestroyPbuffer;
+ typedef Bool (* PFNGLXMAKECURRENTPROC)(Display* dpy, GLXDrawable drawable, GLXContext ctx);
+ PFNGLXMAKECURRENTPROC m_glXMakeCurrent;
+ typedef void (* PFNGLXDESTROYCONTEXTPROC)(Display* dpy, GLXContext ctx);
+ PFNGLXDESTROYCONTEXTPROC m_glXDestroyContext;
+ typedef GLXContext (* PFNGLXGETCURRENTCONTEXTPROC)(void);
+ PFNGLXGETCURRENTCONTEXTPROC m_glXGetCurrentContext;
+
+ GLConnection(Display* display,
+ void* libGL,
+ PFNGLXCHOOSEFBCONFIGPROC chooseFBConfig,
+ PFNGLXCREATENEWCONTEXTPROC createNewContext,
+ PFNGLXCREATEPBUFFERPROC createPbuffer,
+ PFNGLXDESTROYPBUFFERPROC destroyPbuffer,
+ PFNGLXMAKECURRENTPROC makeCurrent,
+ PFNGLXDESTROYCONTEXTPROC destroyContext,
+ PFNGLXGETCURRENTCONTEXTPROC getCurrentContext)
+ : m_libGL(libGL)
+ , m_display(display)
+ , m_glXChooseFBConfig(chooseFBConfig)
+ , m_glXCreateNewContext(createNewContext)
+ , m_glXCreatePbuffer(createPbuffer)
+ , m_glXDestroyPbuffer(destroyPbuffer)
+ , m_glXMakeCurrent(makeCurrent)
+ , m_glXDestroyContext(destroyContext)
+ , m_glXGetCurrentContext(getCurrentContext)
+ {
+ }
+
+ static void* tryLoad(const char* libName)
+ {
+ // We use RTLD_GLOBAL semantics so that GLEW initialization works;
+ // GLEW expects to be able to open the current process's handle
+ // and do dlsym's of GL entry points from there.
+ return dlopen(libName, RTLD_LAZY | RTLD_GLOBAL);
+ }
+ };
+
+ static GLConnection* s_gl;
#else
#error Must port GraphicsContext3D to your platform
#endif
};
+bool GraphicsContext3DInternal::s_initializedGLEW = false;
+
+#if OS(LINUX)
+GraphicsContext3DInternal::GLConnection* GraphicsContext3DInternal::s_gl = 0;
+
+GraphicsContext3DInternal::GLConnection* GraphicsContext3DInternal::GLConnection::create()
+{
+ Display* dpy = XOpenDisplay(0);
+ if (!dpy) {
+ printf("GraphicsContext3D: error opening X display\n");
+ return 0;
+ }
+
+ void* libGL = 0;
+ const char* libNames[] = {
+ "/usr/lib/libGL.so.1",
+ "/usr/lib32/libGL.so.1",
+ "/usr/lib64/libGL.so.1",
+ };
+ for (int i = 0; i < sizeof(libNames) / sizeof(const char*); i++) {
+ libGL = tryLoad(libNames[i]);
+ if (libGL)
+ break;
+ }
+ if (!libGL) {
+ printf("GraphicsContext3D: error opening libGL.so.1\n");
+ printf("GraphicsContext3D: tried:\n");
+ for (int i = 0; i < sizeof(libNames) / sizeof(const char*); i++)
+ printf(" %s\n", libNames[i]);
+ return 0;
+ }
+
+ PFNGLXCHOOSEFBCONFIGPROC chooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC) dlsym(libGL, "glXChooseFBConfig");
+ PFNGLXCREATENEWCONTEXTPROC createNewContext = (PFNGLXCREATENEWCONTEXTPROC) dlsym(libGL, "glXCreateNewContext");
+ PFNGLXCREATEPBUFFERPROC createPbuffer = (PFNGLXCREATEPBUFFERPROC) dlsym(libGL, "glXCreatePbuffer");
+ PFNGLXDESTROYPBUFFERPROC destroyPbuffer = (PFNGLXDESTROYPBUFFERPROC) dlsym(libGL, "glXDestroyPbuffer");
+ PFNGLXMAKECURRENTPROC makeCurrent = (PFNGLXMAKECURRENTPROC) dlsym(libGL, "glXMakeCurrent");
+ PFNGLXDESTROYCONTEXTPROC destroyContext = (PFNGLXDESTROYCONTEXTPROC) dlsym(libGL, "glXDestroyContext");
+ PFNGLXGETCURRENTCONTEXTPROC getCurrentContext = (PFNGLXGETCURRENTCONTEXTPROC) dlsym(libGL, "glXGetCurrentContext");
+ if (!chooseFBConfig || !createNewContext || !createPbuffer
+ || !destroyPbuffer || !makeCurrent || !destroyContext
+ || !getCurrentContext) {
+ XCloseDisplay(dpy);
+ dlclose(libGL);
+ printf("GraphicsContext3D: error looking up bootstrapping entry points\n");
+ return 0;
+ }
+ return new GLConnection(dpy,
+ libGL,
+ chooseFBConfig,
+ createNewContext,
+ createPbuffer,
+ destroyPbuffer,
+ makeCurrent,
+ destroyContext,
+ getCurrentContext);
+}
+
+GraphicsContext3DInternal::GLConnection::~GLConnection()
+{
+ XCloseDisplay(m_display);
+ dlclose(m_libGL);
+}
+
+#endif // OS(LINUX)
+
GraphicsContext3DInternal::VertexAttribPointerState::VertexAttribPointerState()
: enabled(false)
, buffer(0)
@@ -220,20 +369,12 @@ GraphicsContext3DInternal::VertexAttribPointerState::VertexAttribPointerState()
{
}
-#if PLATFORM(LINUX)
-static void* tryLoad(const char* libName)
-{
- // We use RTLD_GLOBAL semantics so that GLEW initialization works;
- // GLEW expects to be able to open the current process's handle
- // and do dlsym's of GL entry points from there.
- return dlopen(libName, RTLD_LAZY | RTLD_GLOBAL);
-}
-#endif
-
-GraphicsContext3DInternal::GraphicsContext3DInternal()
- : m_texture(0)
+GraphicsContext3DInternal::GraphicsContext3DInternal(GraphicsContext3D::Attributes attrs)
+ : m_attrs(attrs)
+ , m_texture(0)
, m_fbo(0)
, m_depthBuffer(0)
+ , m_boundFBO(0)
#ifdef FLIP_FRAMEBUFFER_VERTICALLY
, m_scanline(0)
#endif
@@ -241,7 +382,7 @@ GraphicsContext3DInternal::GraphicsContext3DInternal()
#if PLATFORM(SKIA)
, m_resizingBitmap(0)
#endif
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
, m_canvasWindow(0)
, m_canvasDC(0)
, m_contextObj(0)
@@ -249,23 +390,24 @@ GraphicsContext3DInternal::GraphicsContext3DInternal()
, m_pbuffer(0)
, m_contextObj(0)
, m_renderOutput(0)
- , m_cgContext(0)
-#elif PLATFORM(LINUX)
- , m_display(0)
+#elif OS(LINUX)
, m_contextObj(0)
, m_pbuffer(0)
- , m_glXChooseFBConfig(0)
- , m_glXCreateNewContext(0)
- , m_glXCreatePbuffer(0)
- , m_glXDestroyPbuffer(0)
- , m_glXMakeCurrent(0)
- , m_glXDestroyContext(0)
- , m_glXGetCurrentContext(0)
#else
#error Must port to your platform
#endif
{
-#if PLATFORM(WIN_OS)
+ // FIXME: we need to take into account the user's requested
+ // context creation attributes, in particular stencil and
+ // antialias, and determine which could and could not be honored
+ // based on the capabilities of the OpenGL implementation.
+ m_attrs.alpha = true;
+ m_attrs.depth = true;
+ m_attrs.stencil = false;
+ m_attrs.antialias = false;
+ m_attrs.premultipliedAlpha = true;
+
+#if OS(WINDOWS)
WNDCLASS wc;
if (!GetClassInfo(GetModuleHandle(0), L"CANVASGL", &wc)) {
ZeroMemory(&wc, sizeof(WNDCLASS));
@@ -377,43 +519,13 @@ GraphicsContext3DInternal::GraphicsContext3DInternal()
}
m_pbuffer = pbuffer;
m_contextObj = context;
-#elif PLATFORM(LINUX)
- m_display = XOpenDisplay(0);
- if (!m_display) {
- printf("GraphicsContext3D: error opening X display\n");
- return;
+#elif OS(LINUX)
+ if (!s_gl) {
+ s_gl = GLConnection::create();
+ if (!s_gl)
+ return;
}
- const char* libNames[] = {
- "/usr/lib/libGL.so.1",
- "/usr/lib32/libGL.so.1",
- "/usr/lib64/libGL.so.1",
- };
- for (int i = 0; i < sizeof(libNames) / sizeof(const char*); i++) {
- m_libGL = tryLoad(libNames[i]);
- if (m_libGL)
- break;
- }
- if (!m_libGL) {
- printf("GraphicsContext3D: error opening libGL.so.1\n");
- printf("GraphicsContext3D: tried:");
- for (int i = 0; i < sizeof(libNames) / sizeof(const char*); i++)
- printf(" %s", libNames[i]);
- return;
- }
- m_glXChooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC) dlsym(m_libGL, "glXChooseFBConfig");
- m_glXCreateNewContext = (PFNGLXCREATENEWCONTEXTPROC) dlsym(m_libGL, "glXCreateNewContext");
- m_glXCreatePbuffer = (PFNGLXCREATEPBUFFERPROC) dlsym(m_libGL, "glXCreatePbuffer");
- m_glXDestroyPbuffer = (PFNGLXDESTROYPBUFFERPROC) dlsym(m_libGL, "glXDestroyPbuffer");
- m_glXMakeCurrent = (PFNGLXMAKECURRENTPROC) dlsym(m_libGL, "glXMakeCurrent");
- m_glXDestroyContext = (PFNGLXDESTROYCONTEXTPROC) dlsym(m_libGL, "glXDestroyContext");
- m_glXGetCurrentContext = (PFNGLXGETCURRENTCONTEXTPROC) dlsym(m_libGL, "glXGetCurrentContext");
- if (!m_glXChooseFBConfig || !m_glXCreateNewContext || !m_glXCreatePbuffer
- || !m_glXDestroyPbuffer || !m_glXMakeCurrent || !m_glXDestroyContext
- || !m_glXGetCurrentContext) {
- printf("GraphicsContext3D: error looking up bootstrapping entry points\n");
- return;
- }
int configAttrs[] = {
GLX_DRAWABLE_TYPE,
GLX_PBUFFER_BIT,
@@ -424,7 +536,7 @@ GraphicsContext3DInternal::GraphicsContext3DInternal()
0
};
int nelements = 0;
- GLXFBConfig* config = m_glXChooseFBConfig(m_display, 0, configAttrs, &nelements);
+ GLXFBConfig* config = s_gl->chooseFBConfig(0, configAttrs, &nelements);
if (!config) {
printf("GraphicsContext3D: glXChooseFBConfig failed\n");
return;
@@ -434,7 +546,7 @@ GraphicsContext3DInternal::GraphicsContext3DInternal()
XFree(config);
return;
}
- GLXContext context = m_glXCreateNewContext(m_display, config[0], GLX_RGBA_TYPE, 0, True);
+ GLXContext context = s_gl->createNewContext(config[0], GLX_RGBA_TYPE, 0, True);
if (!context) {
printf("GraphicsContext3D: glXCreateNewContext failed\n");
XFree(config);
@@ -447,13 +559,13 @@ GraphicsContext3DInternal::GraphicsContext3DInternal()
1,
0
};
- GLXPbuffer pbuffer = m_glXCreatePbuffer(m_display, config[0], pbufferAttrs);
+ GLXPbuffer pbuffer = s_gl->createPbuffer(config[0], pbufferAttrs);
XFree(config);
if (!pbuffer) {
printf("GraphicsContext3D: glxCreatePbuffer failed\n");
return;
}
- if (!m_glXMakeCurrent(m_display, pbuffer, context)) {
+ if (!s_gl->makeCurrent(pbuffer, context)) {
printf("GraphicsContext3D: glXMakeCurrent failed\n");
return;
}
@@ -463,8 +575,7 @@ GraphicsContext3DInternal::GraphicsContext3DInternal()
#error Must port to your platform
#endif
- static bool initializedGLEW = false;
- if (!initializedGLEW) {
+ if (!s_initializedGLEW) {
// Initialize GLEW and check for GL 2.0 support by the drivers.
GLenum glewInitResult = glewInit();
if (glewInitResult != GLEW_OK) {
@@ -475,7 +586,7 @@ GraphicsContext3DInternal::GraphicsContext3DInternal()
printf("GraphicsContext3D: OpenGL 2.0 not supported\n");
return;
}
- initializedGLEW = true;
+ s_initializedGLEW = true;
}
}
@@ -495,7 +606,7 @@ GraphicsContext3DInternal::~GraphicsContext3DInternal()
if (m_resizingBitmap)
delete m_resizingBitmap;
#endif
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
wglMakeCurrent(0, 0);
wglDeleteContext(m_contextObj);
ReleaseDC(m_canvasWindow, m_canvasDC);
@@ -504,16 +615,12 @@ GraphicsContext3DInternal::~GraphicsContext3DInternal()
CGLSetCurrentContext(0);
CGLDestroyContext(m_contextObj);
CGLDestroyPBuffer(m_pbuffer);
- if (m_cgContext)
- CGContextRelease(m_cgContext);
if (m_renderOutput)
delete[] m_renderOutput;
-#elif PLATFORM(LINUX)
- m_glXMakeCurrent(m_display, 0, 0);
- m_glXDestroyContext(m_display, m_contextObj);
- m_glXDestroyPbuffer(m_display, m_pbuffer);
- XCloseDisplay(m_display);
- dlclose(m_libGL);
+#elif OS(LINUX)
+ s_gl->makeCurrent(0, 0);
+ s_gl->destroyContext(m_contextObj);
+ s_gl->destroyPbuffer(m_pbuffer);
#else
#error Must port to your platform
#endif
@@ -522,7 +629,7 @@ GraphicsContext3DInternal::~GraphicsContext3DInternal()
bool GraphicsContext3DInternal::makeContextCurrent()
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
if (wglGetCurrentContext() != m_contextObj)
if (wglMakeCurrent(m_canvasDC, m_contextObj))
return true;
@@ -530,9 +637,9 @@ bool GraphicsContext3DInternal::makeContextCurrent()
if (CGLGetCurrentContext() != m_contextObj)
if (CGLSetCurrentContext(m_contextObj) == kCGLNoError)
return true;
-#elif PLATFORM(LINUX)
- if (m_glXGetCurrentContext() != m_contextObj)
- if (m_glXMakeCurrent(m_display, m_pbuffer, m_contextObj))
+#elif OS(LINUX)
+ if (s_gl->getCurrentContext() != m_contextObj)
+ if (s_gl->makeCurrent(m_pbuffer, m_contextObj))
return true;
#else
#error Must port to your platform
@@ -594,6 +701,7 @@ void GraphicsContext3DInternal::reshape(int width, int height)
glBindTexture(target, 0);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
+ m_boundFBO = m_fbo;
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, m_depthBuffer);
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, width, height);
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0);
@@ -623,20 +731,12 @@ void GraphicsContext3DInternal::reshape(int width, int height)
#if PLATFORM(CG)
// Need to reallocate the client-side backing store.
// FIXME: make this more efficient.
- if (m_cgContext) {
- CGContextRelease(m_cgContext);
- m_cgContext = 0;
- }
if (m_renderOutput) {
delete[] m_renderOutput;
m_renderOutput = 0;
}
int rowBytes = width * 4;
m_renderOutput = new unsigned char[height * rowBytes];
- CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
- m_cgContext = CGBitmapContextCreate(m_renderOutput, width, height, 8, rowBytes,
- colorSpace, kCGImageAlphaPremultipliedLast);
- CGColorSpaceRelease(colorSpace);
#endif // PLATFORM(CG)
}
@@ -681,6 +781,9 @@ void GraphicsContext3DInternal::beginPaint(WebGLRenderingContext* context)
HTMLCanvasElement* canvas = context->canvas();
ImageBuffer* imageBuffer = canvas->buffer();
unsigned char* pixels = 0;
+ bool mustRestoreFBO = (m_boundFBO != m_fbo);
+ if (mustRestoreFBO)
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
#if PLATFORM(SKIA)
const SkBitmap* canvasBitmap = imageBuffer->context()->platformContext()->bitmap();
const SkBitmap* readbackBitmap = 0;
@@ -721,15 +824,16 @@ void GraphicsContext3DInternal::beginPaint(WebGLRenderingContext* context)
glReadPixels(0, 0, m_cachedWidth, m_cachedHeight, GL_BGRA, GL_UNSIGNED_BYTE, pixels);
#elif PLATFORM(CG)
if (m_renderOutput) {
- ASSERT(CGBitmapContextGetWidth(m_cgContext) == m_cachedWidth);
- ASSERT(CGBitmapContextGetHeight(m_cgContext) == m_cachedHeight);
pixels = m_renderOutput;
- glReadPixels(0, 0, m_cachedWidth, m_cachedHeight, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
+ glReadPixels(0, 0, m_cachedWidth, m_cachedHeight, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, pixels);
}
#else
#error Must port to your platform
#endif
+ if (mustRestoreFBO)
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO);
+
#ifdef FLIP_FRAMEBUFFER_VERTICALLY
if (pixels)
flipVertically(pixels, m_cachedWidth, m_cachedHeight);
@@ -745,7 +849,20 @@ void GraphicsContext3DInternal::beginPaint(WebGLRenderingContext* context)
}
#elif PLATFORM(CG)
if (m_renderOutput) {
- CGImageRef cgImage = CGBitmapContextCreateImage(m_cgContext);
+ int rowBytes = m_cachedWidth * 4;
+ CGDataProviderRef dataProvider = CGDataProviderCreateWithData(0, m_renderOutput, rowBytes * m_cachedHeight, 0);
+ CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+ CGImageRef cgImage = CGImageCreate(m_cachedWidth,
+ m_cachedHeight,
+ 8,
+ 32,
+ rowBytes,
+ colorSpace,
+ kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
+ dataProvider,
+ 0,
+ false,
+ kCGRenderingIntentDefault);
// CSS styling may cause the canvas's content to be resized on
// the page. Go back to the Canvas to figure out the correct
// width and height to draw.
@@ -756,9 +873,13 @@ void GraphicsContext3DInternal::beginPaint(WebGLRenderingContext* context)
// rendering results.
CGContextSetBlendMode(imageBuffer->context()->platformContext(),
kCGBlendModeCopy);
+ CGContextSetInterpolationQuality(imageBuffer->context()->platformContext(),
+ kCGInterpolationNone);
CGContextDrawImage(imageBuffer->context()->platformContext(),
rect, cgImage);
CGImageRelease(cgImage);
+ CGColorSpaceRelease(colorSpace);
+ CGDataProviderRelease(dataProvider);
}
#else
#error Must port to your platform
@@ -788,6 +909,17 @@ void GraphicsContext3DInternal::bindBuffer(unsigned long target,
glBindBuffer(target, bufID);
}
+void GraphicsContext3DInternal::bindFramebuffer(unsigned long target,
+ WebGLFramebuffer* framebuffer)
+{
+ makeContextCurrent();
+ GLuint id = EXTRACT(framebuffer);
+ if (!id)
+ id = m_fbo;
+ glBindFramebufferEXT(target, id);
+ m_boundFBO = id;
+}
+
// If we didn't have to hack GL_TEXTURE_WRAP_R for cube maps,
// we could just use:
// GL_SAME_METHOD_2_X2(BindTexture, bindTexture, unsigned long, WebGLTexture*)
@@ -864,6 +996,11 @@ unsigned long GraphicsContext3DInternal::getError()
return glGetError();
}
+GraphicsContext3D::Attributes GraphicsContext3DInternal::getContextAttributes()
+{
+ return m_attrs;
+}
+
void GraphicsContext3DInternal::vertexAttribPointer(unsigned long indx, int size, int type, bool normalized,
unsigned long stride, unsigned long offset)
{
@@ -1012,17 +1149,17 @@ void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8
gl##glname(a1, a2, a3, a4, a5, a6, a7, a8); \
}
-PassOwnPtr<GraphicsContext3D> GraphicsContext3D::create()
+PassOwnPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attrs)
{
- PassOwnPtr<GraphicsContext3D> context = new GraphicsContext3D();
+ PassOwnPtr<GraphicsContext3D> context = new GraphicsContext3D(attrs);
// FIXME: add error checking
return context;
}
-GraphicsContext3D::GraphicsContext3D()
+GraphicsContext3D::GraphicsContext3D(GraphicsContext3D::Attributes attrs)
: m_currentWidth(0)
, m_currentHeight(0)
- , m_internal(new GraphicsContext3DInternal())
+ , m_internal(new GraphicsContext3DInternal(attrs))
{
}
@@ -1190,7 +1327,10 @@ void GraphicsContext3D::bindBuffer(unsigned long target,
m_internal->bindBuffer(target, buffer);
}
-GL_SAME_METHOD_2_X2(BindFramebufferEXT, bindFramebuffer, unsigned long, WebGLFramebuffer*)
+void GraphicsContext3D::bindFramebuffer(unsigned long target, WebGLFramebuffer* framebuffer)
+{
+ m_internal->bindFramebuffer(target, framebuffer);
+}
GL_SAME_METHOD_2_X2(BindRenderbufferEXT, bindRenderbuffer, unsigned long, WebGLRenderbuffer*)
@@ -1448,6 +1588,11 @@ void GraphicsContext3D::getBufferParameteriv(unsigned long target, unsigned long
glGetBufferParameteriv(target, pname, value);
}
+GraphicsContext3D::Attributes GraphicsContext3D::getContextAttributes()
+{
+ return m_internal->getContextAttributes();
+}
+
unsigned long GraphicsContext3D::getError()
{
return m_internal->getError();
@@ -1735,7 +1880,7 @@ int GraphicsContext3D::texImage2D(unsigned target,
unsigned border,
unsigned format,
unsigned type,
- WebGLArray* pixels)
+ void* pixels)
{
// FIXME: must do validation similar to JOGL's to ensure that
// the incoming array is of the appropriate length.
@@ -1747,25 +1892,10 @@ int GraphicsContext3D::texImage2D(unsigned target,
border,
format,
type,
- pixels->baseAddress());
+ pixels);
return 0;
}
-int GraphicsContext3D::texImage2D(unsigned target,
- unsigned level,
- unsigned internalformat,
- unsigned width,
- unsigned height,
- unsigned border,
- unsigned format,
- unsigned type,
- ImageData* pixels)
-{
- // FIXME: implement.
- notImplemented();
- return -1;
-}
-
// Remove premultiplied alpha from color channels.
// FIXME: this is lossy. Must retrieve original values from HTMLImageElement.
static void unmultiplyAlpha(unsigned char* rgbaData, int numPixels)
@@ -1926,6 +2056,7 @@ int GraphicsContext3D::texImage2D(unsigned target, unsigned level, Image* image,
colorSpace,
kCGImageAlphaPremultipliedLast);
CGColorSpaceRelease(colorSpace);
+ CGContextSetBlendMode(tmpContext, kCGBlendModeCopy);
CGContextDrawImage(tmpContext,
CGRectMake(0, 0, static_cast<CGFloat>(width), static_cast<CGFloat>(height)),
cgImage);
@@ -1939,14 +2070,6 @@ int GraphicsContext3D::texImage2D(unsigned target, unsigned level, Image* image,
return res;
}
-int GraphicsContext3D::texImage2D(unsigned target, unsigned level, HTMLVideoElement* video,
- bool flipY, bool premultiplyAlpha)
-{
- // FIXME: implement.
- notImplemented();
- return -1;
-}
-
GL_SAME_METHOD_3(TexParameterf, texParameterf, unsigned, unsigned, float);
GL_SAME_METHOD_3(TexParameteri, texParameteri, unsigned, unsigned, int);
@@ -1959,34 +2082,16 @@ int GraphicsContext3D::texSubImage2D(unsigned target,
unsigned height,
unsigned format,
unsigned type,
- WebGLArray* pixels)
+ void* pixels)
{
- // FIXME: implement.
- notImplemented();
- return -1;
-}
-
-int GraphicsContext3D::texSubImage2D(unsigned target,
- unsigned level,
- unsigned xoffset,
- unsigned yoffset,
- unsigned width,
- unsigned height,
- unsigned format,
- unsigned type,
- ImageData* pixels)
-{
- // FIXME: implement.
- notImplemented();
- return -1;
+ glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+ return 0;
}
int GraphicsContext3D::texSubImage2D(unsigned target,
unsigned level,
unsigned xoffset,
unsigned yoffset,
- unsigned width,
- unsigned height,
Image* image,
bool flipY,
bool premultiplyAlpha)
@@ -1996,21 +2101,6 @@ int GraphicsContext3D::texSubImage2D(unsigned target,
return -1;
}
-int GraphicsContext3D::texSubImage2D(unsigned target,
- unsigned level,
- unsigned xoffset,
- unsigned yoffset,
- unsigned width,
- unsigned height,
- HTMLVideoElement* video,
- bool flipY,
- bool premultiplyAlpha)
-{
- // FIXME: implement.
- notImplemented();
- return -1;
-}
-
GL_SAME_METHOD_2(Uniform1f, uniform1f, long, float)
void GraphicsContext3D::uniform1fv(long location, float* v, int size)
diff --git a/WebKit/chromium/src/LocalizedStrings.cpp b/WebKit/chromium/src/LocalizedStrings.cpp
index 1121931..4e01848 100644
--- a/WebKit/chromium/src/LocalizedStrings.cpp
+++ b/WebKit/chromium/src/LocalizedStrings.cpp
@@ -165,6 +165,16 @@ String AXLinkActionVerb()
return query(WebLocalizedString::AXLinkActionVerb);
}
+String AXMenuListPopupActionVerb()
+{
+ return String();
+}
+
+String AXMenuListActionVerb()
+{
+ return String();
+}
+
String multipleFileUploadText(unsigned numberOfFiles)
{
return query(WebLocalizedString::MultipleFileUploadText, numberOfFiles);
diff --git a/WebKit/chromium/src/NotificationPresenterImpl.cpp b/WebKit/chromium/src/NotificationPresenterImpl.cpp
index 6b22319..a38b8b5 100644
--- a/WebKit/chromium/src/NotificationPresenterImpl.cpp
+++ b/WebKit/chromium/src/NotificationPresenterImpl.cpp
@@ -33,12 +33,15 @@
#if ENABLE(NOTIFICATIONS)
+#include "Document.h"
#include "Notification.h"
#include "SecurityOrigin.h"
+#include "WebDocument.h"
#include "WebNotification.h"
#include "WebNotificationPermissionCallback.h"
#include "WebNotificationPresenter.h"
+#include "WebURL.h"
#include <wtf/PassRefPtr.h>
@@ -89,9 +92,13 @@ void NotificationPresenterImpl::notificationObjectDestroyed(Notification* notifi
m_presenter->objectDestroyed(PassRefPtr<Notification>(notification));
}
-NotificationPresenter::Permission NotificationPresenterImpl::checkPermission(SecurityOrigin* origin)
+NotificationPresenter::Permission NotificationPresenterImpl::checkPermission(const KURL& url, Document* document)
{
- int result = m_presenter->checkPermission(origin->toString());
+ WebDocument webDocument;
+ if (document)
+ webDocument = document;
+
+ int result = m_presenter->checkPermission(url, document ? &webDocument : 0);
return static_cast<NotificationPresenter::Permission>(result);
}
diff --git a/WebKit/chromium/src/NotificationPresenterImpl.h b/WebKit/chromium/src/NotificationPresenterImpl.h
index 4afe9dc..8e3799c 100644
--- a/WebKit/chromium/src/NotificationPresenterImpl.h
+++ b/WebKit/chromium/src/NotificationPresenterImpl.h
@@ -54,7 +54,7 @@ public:
virtual bool show(WebCore::Notification* object);
virtual void cancel(WebCore::Notification* object);
virtual void notificationObjectDestroyed(WebCore::Notification* object);
- virtual WebCore::NotificationPresenter::Permission checkPermission(WebCore::SecurityOrigin* origin);
+ virtual WebCore::NotificationPresenter::Permission checkPermission(const WebCore::KURL& url, WebCore::Document* document);
virtual void requestPermission(WebCore::SecurityOrigin* origin, WTF::PassRefPtr<WebCore::VoidCallback> callback);
private:
diff --git a/WebKit/chromium/src/PlatformMessagePortChannel.cpp b/WebKit/chromium/src/PlatformMessagePortChannel.cpp
index f8c41d3..aa42a10 100644
--- a/WebKit/chromium/src/PlatformMessagePortChannel.cpp
+++ b/WebKit/chromium/src/PlatformMessagePortChannel.cpp
@@ -179,7 +179,7 @@ void PlatformMessagePortChannel::postMessageToRemote(PassOwnPtr<MessagePortChann
if (!m_localPort || !m_webChannel)
return;
- WebString messageString = message->message()->toString();
+ WebString messageString = message->message()->toWireString();
OwnPtr<WebCore::MessagePortChannelArray> channels = message->channels();
WebMessagePortChannelArray* webChannels = 0;
if (channels.get() && channels->size()) {
@@ -211,7 +211,7 @@ bool PlatformMessagePortChannel::tryGetMessageFromRemote(OwnPtr<MessagePortChann
(*channels)[i] = MessagePortChannel::create(platformChannel);
}
}
- RefPtr<SerializedScriptValue> serializedMessage = SerializedScriptValue::create(message);
+ RefPtr<SerializedScriptValue> serializedMessage = SerializedScriptValue::createFromWire(message);
result = MessagePortChannel::EventData::create(serializedMessage.release(), channels.release());
}
diff --git a/WebKit/chromium/src/StorageAreaProxy.cpp b/WebKit/chromium/src/StorageAreaProxy.cpp
index 551507f..c9185fe 100644
--- a/WebKit/chromium/src/StorageAreaProxy.cpp
+++ b/WebKit/chromium/src/StorageAreaProxy.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2009 Google Inc. All Rights Reserved.
+ * (C) 2008 Apple Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,11 +29,16 @@
#if ENABLE(DOM_STORAGE)
+#include "DOMWindow.h"
#include "Document.h"
+#include "EventNames.h"
#include "ExceptionCode.h"
#include "Frame.h"
+#include "Page.h"
+#include "PageGroup.h"
#include "SecurityOrigin.h"
#include "StorageAreaImpl.h"
+#include "StorageEvent.h"
#include "WebStorageArea.h"
#include "WebString.h"
@@ -40,8 +46,9 @@
namespace WebCore {
-StorageAreaProxy::StorageAreaProxy(WebKit::WebStorageArea* storageArea)
+StorageAreaProxy::StorageAreaProxy(WebKit::WebStorageArea* storageArea, StorageType storageType)
: m_storageArea(storageArea)
+ , m_storageType(storageType)
{
}
@@ -64,21 +71,34 @@ String StorageAreaProxy::getItem(const String& key) const
return m_storageArea->getItem(key);
}
-void StorageAreaProxy::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame)
+String StorageAreaProxy::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame)
{
bool quotaException = false;
- m_storageArea->setItem(key, value, frame->document()->url(), quotaException);
+ WebKit::WebString oldValue;
+ m_storageArea->setItem(key, value, frame->document()->url(), quotaException, oldValue);
ec = quotaException ? QUOTA_EXCEEDED_ERR : 0;
+ String oldValueString = oldValue;
+ if (oldValueString != value)
+ storageEvent(key, oldValue, value, m_storageType, frame->document()->securityOrigin(), frame);
+ return oldValue;
}
-void StorageAreaProxy::removeItem(const String& key, Frame* frame)
+String StorageAreaProxy::removeItem(const String& key, Frame* frame)
{
- m_storageArea->removeItem(key, frame->document()->url());
+ WebKit::WebString oldValue;
+ m_storageArea->removeItem(key, frame->document()->url(), oldValue);
+ if (!oldValue.isNull())
+ storageEvent(key, oldValue, String(), m_storageType, frame->document()->securityOrigin(), frame);
+ return oldValue;
}
-void StorageAreaProxy::clear(Frame* frame)
+bool StorageAreaProxy::clear(Frame* frame)
{
- m_storageArea->clear(frame->document()->url());
+ bool clearedSomething;
+ m_storageArea->clear(frame->document()->url(), clearedSomething);
+ if (clearedSomething)
+ storageEvent(String(), String(), String(), m_storageType, frame->document()->securityOrigin(), frame);
+ return clearedSomething;
}
bool StorageAreaProxy::contains(const String& key) const
@@ -86,6 +106,41 @@ bool StorageAreaProxy::contains(const String& key) const
return !getItem(key).isNull();
}
+// Copied from WebCore/storage/StorageEventDispatcher.cpp out of necessity. It's probably best to keep it current.
+void StorageAreaProxy::storageEvent(const String& key, const String& oldValue, const String& newValue, StorageType storageType, SecurityOrigin* securityOrigin, Frame* sourceFrame)
+{
+ Page* page = sourceFrame->page();
+ if (!page)
+ return;
+
+ // We need to copy all relevant frames from every page to a vector since sending the event to one frame might mutate the frame tree
+ // of any given page in the group or mutate the page group itself.
+ Vector<RefPtr<Frame> > frames;
+ if (storageType == SessionStorage) {
+ // Send events only to our page.
+ for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
+ if (sourceFrame != frame && frame->document()->securityOrigin()->equal(securityOrigin))
+ frames.append(frame);
+ }
+
+ for (unsigned i = 0; i < frames.size(); ++i)
+ frames[i]->document()->enqueueStorageEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), frames[i]->domWindow()->sessionStorage()));
+ } else {
+ // Send events to every page.
+ const HashSet<Page*>& pages = page->group().pages();
+ HashSet<Page*>::const_iterator end = pages.end();
+ for (HashSet<Page*>::const_iterator it = pages.begin(); it != end; ++it) {
+ for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
+ if (sourceFrame != frame && frame->document()->securityOrigin()->equal(securityOrigin))
+ frames.append(frame);
+ }
+ }
+
+ for (unsigned i = 0; i < frames.size(); ++i)
+ frames[i]->document()->enqueueStorageEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), frames[i]->domWindow()->localStorage()));
+ }
+}
+
} // namespace WebCore
#endif // ENABLE(DOM_STORAGE)
diff --git a/WebKit/chromium/src/StorageAreaProxy.h b/WebKit/chromium/src/StorageAreaProxy.h
index 5d09d82..b169828 100644
--- a/WebKit/chromium/src/StorageAreaProxy.h
+++ b/WebKit/chromium/src/StorageAreaProxy.h
@@ -34,22 +34,28 @@ namespace WebKit { class WebStorageArea; }
namespace WebCore {
+class Frame;
+class SecurityOrigin;
+
class StorageAreaProxy : public StorageArea {
public:
- StorageAreaProxy(WebKit::WebStorageArea* storageArea);
+ StorageAreaProxy(WebKit::WebStorageArea*, StorageType);
virtual ~StorageAreaProxy();
// The HTML5 DOM Storage API
virtual unsigned length() const;
virtual String key(unsigned index) const;
virtual String getItem(const String& key) const;
- virtual void setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame);
- virtual void removeItem(const String& key, Frame* sourceFrame);
- virtual void clear(Frame* sourceFrame);
+ virtual String setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame);
+ virtual String removeItem(const String& key, Frame* sourceFrame);
+ virtual bool clear(Frame* sourceFrame);
virtual bool contains(const String& key) const;
private:
+ void storageEvent(const String& key, const String& oldValue, const String& newValue, StorageType, SecurityOrigin*, Frame* sourceFrame);
+
OwnPtr<WebKit::WebStorageArea> m_storageArea;
+ StorageType m_storageType;
};
} // namespace WebCore
diff --git a/WebKit/chromium/src/StorageNamespaceProxy.cpp b/WebKit/chromium/src/StorageNamespaceProxy.cpp
index e22bbef..1be1967 100644
--- a/WebKit/chromium/src/StorageNamespaceProxy.cpp
+++ b/WebKit/chromium/src/StorageNamespaceProxy.cpp
@@ -28,27 +28,35 @@
#if ENABLE(DOM_STORAGE)
+#include "Chrome.h"
+#include "ChromeClientImpl.h"
+#include "Page.h"
#include "SecurityOrigin.h"
#include "StorageAreaProxy.h"
#include "WebKit.h"
#include "WebKitClient.h"
#include "WebStorageNamespace.h"
#include "WebString.h"
+#include "WebViewClient.h"
+#include "WebViewImpl.h"
namespace WebCore {
PassRefPtr<StorageNamespace> StorageNamespace::localStorageNamespace(const String& path, unsigned quota)
{
- return new StorageNamespaceProxy(WebKit::webKitClient()->createLocalStorageNamespace(path, quota));
+ return adoptRef(new StorageNamespaceProxy(WebKit::webKitClient()->createLocalStorageNamespace(path, quota), LocalStorage));
}
-PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace()
+PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace(Page* page)
{
- return new StorageNamespaceProxy(WebKit::webKitClient()->createSessionStorageNamespace());
+ WebKit::ChromeClientImpl* chromeClientImpl = static_cast<WebKit::ChromeClientImpl*>(page->chrome()->client());
+ WebKit::WebViewClient* webViewClient = chromeClientImpl->webView()->client();
+ return adoptRef(new StorageNamespaceProxy(webViewClient->createSessionStorageNamespace(), SessionStorage));
}
-StorageNamespaceProxy::StorageNamespaceProxy(WebKit::WebStorageNamespace* storageNamespace)
+StorageNamespaceProxy::StorageNamespaceProxy(WebKit::WebStorageNamespace* storageNamespace, StorageType storageType)
: m_storageNamespace(storageNamespace)
+ , m_storageType(storageType)
{
}
@@ -58,12 +66,19 @@ StorageNamespaceProxy::~StorageNamespaceProxy()
PassRefPtr<StorageNamespace> StorageNamespaceProxy::copy()
{
- return adoptRef(new StorageNamespaceProxy(m_storageNamespace->copy()));
+ ASSERT(m_storageType == SessionStorage);
+ // The WebViewClient knows what its session storage namespace id is but we
+ // do not. Returning 0 here causes it to be fetched (via the WebViewClient)
+ // on its next use. Note that it is WebViewClient::createView's
+ // responsibility to clone the session storage namespace id and that the
+ // only time copy() is called is directly after the createView call...which
+ // is why all of this is safe.
+ return 0;
}
PassRefPtr<StorageArea> StorageNamespaceProxy::storageArea(PassRefPtr<SecurityOrigin> origin)
{
- return adoptRef(new StorageAreaProxy(m_storageNamespace->createStorageArea(origin->toString())));
+ return adoptRef(new StorageAreaProxy(m_storageNamespace->createStorageArea(origin->toString()), m_storageType));
}
void StorageNamespaceProxy::close()
diff --git a/WebKit/chromium/src/StorageNamespaceProxy.h b/WebKit/chromium/src/StorageNamespaceProxy.h
index 9ff624b..28d7a23 100644
--- a/WebKit/chromium/src/StorageNamespaceProxy.h
+++ b/WebKit/chromium/src/StorageNamespaceProxy.h
@@ -28,6 +28,7 @@
#if ENABLE(DOM_STORAGE)
+#include "StorageArea.h"
#include "StorageNamespace.h"
namespace WebKit { class WebStorageNamespace; }
@@ -36,7 +37,7 @@ namespace WebCore {
class StorageNamespaceProxy : public StorageNamespace {
public:
- StorageNamespaceProxy(WebKit::WebStorageNamespace* storageNamespace);
+ StorageNamespaceProxy(WebKit::WebStorageNamespace*, StorageType);
virtual ~StorageNamespaceProxy();
virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>);
virtual PassRefPtr<StorageNamespace> copy();
@@ -45,6 +46,7 @@ public:
private:
OwnPtr<WebKit::WebStorageNamespace> m_storageNamespace;
+ StorageType m_storageType;
};
} // namespace WebCore
diff --git a/WebKit/chromium/src/WebAccessibilityObject.cpp b/WebKit/chromium/src/WebAccessibilityObject.cpp
index bdbd260..c386d44 100644
--- a/WebKit/chromium/src/WebAccessibilityObject.cpp
+++ b/WebKit/chromium/src/WebAccessibilityObject.cpp
@@ -231,13 +231,13 @@ bool WebAccessibilityObject::isIndeterminate() const
return m_private->isIndeterminate();
}
-bool WebAccessibilityObject::isMultiSelect() const
+bool WebAccessibilityObject::isMultiSelectable() const
{
if (!m_private)
return 0;
m_private->updateBackingStore();
- return m_private->isMultiSelect();
+ return m_private->isMultiSelectable();
}
bool WebAccessibilityObject::isOffScreen() const
diff --git a/WebKit/chromium/src/WebAnimationControllerImpl.cpp b/WebKit/chromium/src/WebAnimationControllerImpl.cpp
new file mode 100644
index 0000000..32a7a61
--- /dev/null
+++ b/WebKit/chromium/src/WebAnimationControllerImpl.cpp
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebAnimationControllerImpl.h"
+
+#include "AnimationController.h"
+#include "Element.h"
+
+#include "WebElement.h"
+#include "WebFrameImpl.h"
+#include "WebString.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebAnimationControllerImpl::WebAnimationControllerImpl(WebFrameImpl* frameImpl)
+ : m_frameImpl(frameImpl)
+{
+ ASSERT(m_frameImpl);
+}
+
+AnimationController* WebAnimationControllerImpl::animationController() const
+{
+ if (!m_frameImpl->frame())
+ return 0;
+ return m_frameImpl->frame()->animation();
+}
+
+bool WebAnimationControllerImpl::pauseAnimationAtTime(WebElement& element,
+ const WebString& animationName,
+ double time)
+{
+ AnimationController* controller = animationController();
+ if (!controller)
+ return 0;
+ return controller->pauseAnimationAtTime(PassRefPtr<Element>(element)->renderer(),
+ animationName,
+ time);
+}
+
+bool WebAnimationControllerImpl::pauseTransitionAtTime(WebElement& element,
+ const WebString& propertyName,
+ double time)
+{
+ AnimationController* controller = animationController();
+ if (!controller)
+ return 0;
+ return controller->pauseTransitionAtTime(PassRefPtr<Element>(element)->renderer(),
+ propertyName,
+ time);
+}
+
+unsigned WebAnimationControllerImpl::numberOfActiveAnimations() const
+{
+ AnimationController* controller = animationController();
+ if (!controller)
+ return 0;
+ return controller->numberOfActiveAnimations();
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebAnimationControllerImpl.h b/WebKit/chromium/src/WebAnimationControllerImpl.h
new file mode 100644
index 0000000..8b0676e
--- /dev/null
+++ b/WebKit/chromium/src/WebAnimationControllerImpl.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebAnimationControllerImpl_h
+#define WebAnimationControllerImpl_h
+
+// FIXME: This relative path is a temporary hack to support using this
+// header from webkit/glue.
+#include "../public/WebAnimationController.h"
+
+namespace WebCore {
+class AnimationController;
+}
+
+namespace WebKit {
+class WebFrameImpl;
+
+class WebAnimationControllerImpl : public WebAnimationController {
+public:
+ explicit WebAnimationControllerImpl(WebFrameImpl*);
+ virtual ~WebAnimationControllerImpl() { }
+
+ virtual bool pauseAnimationAtTime(WebElement&,
+ const WebString& animationName,
+ double time);
+ virtual bool pauseTransitionAtTime(WebElement&,
+ const WebString& propertyName,
+ double time);
+ virtual unsigned numberOfActiveAnimations() const;
+private:
+ WebFrameImpl* m_frameImpl;
+ WebCore::AnimationController* animationController() const;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/WebBindings.cpp b/WebKit/chromium/src/WebBindings.cpp
index 0bc67b6..04f2f85 100644
--- a/WebKit/chromium/src/WebBindings.cpp
+++ b/WebKit/chromium/src/WebBindings.cpp
@@ -44,9 +44,12 @@
#include "MouseEvent.h"
#include "NPV8Object.h" // for PrivateIdentifier
#include "Range.h"
+#include "V8BindingState.h"
#include "V8DOMWrapper.h"
+#include "V8Event.h"
#include "V8Helpers.h"
#include "V8Proxy.h"
+#include "V8Range.h"
#elif USE(JSC)
#include "bridge/c/c_utility.h"
#endif
@@ -223,20 +226,20 @@ static bool getDragDataImpl(NPObject* npobj, int* eventId, WebDragData* data)
// Get the current WebCore event.
v8::Handle<v8::Value> currentEvent(getEvent(context));
- Event* event = V8DOMWrapper::convertToNativeEvent(currentEvent);
+ Event* event = V8Event::toNative(v8::Handle<v8::Object>::Cast(currentEvent));
if (!event)
return false;
// Check that the given npobj is that event.
V8NPObject* object = reinterpret_cast<V8NPObject*>(npobj);
- Event* given = V8DOMWrapper::convertToNativeEvent(object->v8Object);
+ Event* given = V8Event::toNative(object->v8Object);
if (given != event)
return false;
// Check the execution frames are same origin.
V8Proxy* current = V8Proxy::retrieve(V8Proxy::retrieveFrameForCurrentContext());
Frame* frame = V8Proxy::retrieveFrame(context);
- if (!current || !current->canAccessFrame(frame, false))
+ if (!current || !V8BindingSecurity::canAccessFrame(V8BindingState::Only(), frame, false))
return false;
const EventNames& names(eventNames());
@@ -284,7 +287,7 @@ static bool getRangeImpl(NPObject* npobj, WebRange* range)
if (V8ClassIndex::RANGE != V8DOMWrapper::domWrapperType(v8object))
return false;
- Range* native = V8DOMWrapper::convertToNativeObject<WebCore::Range>(V8ClassIndex::RANGE, v8object);
+ Range* native = V8Range::toNative(v8object);
if (!native)
return false;
diff --git a/WebKit/chromium/src/WebDataSourceImpl.cpp b/WebKit/chromium/src/WebDataSourceImpl.cpp
index 456706a..5a315cf 100644
--- a/WebKit/chromium/src/WebDataSourceImpl.cpp
+++ b/WebKit/chromium/src/WebDataSourceImpl.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "WebDataSourceImpl.h"
+#include "ApplicationCacheHostInternal.h"
#include "WebURL.h"
#include "WebURLError.h"
#include "WebVector.h"
@@ -108,6 +109,14 @@ void WebDataSourceImpl::setExtraData(ExtraData* extraData)
m_extraData.set(extraData);
}
+WebApplicationCacheHost* WebDataSourceImpl::applicationCacheHost() {
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+ return ApplicationCacheHostInternal::toWebApplicationCacheHost(DocumentLoader::applicationCacheHost());
+#else
+ return 0;
+#endif
+}
+
WebNavigationType WebDataSourceImpl::toWebNavigationType(NavigationType type)
{
switch (type) {
diff --git a/WebKit/chromium/src/WebDataSourceImpl.h b/WebKit/chromium/src/WebDataSourceImpl.h
index 8860fe4..f868e95 100644
--- a/WebKit/chromium/src/WebDataSourceImpl.h
+++ b/WebKit/chromium/src/WebDataSourceImpl.h
@@ -46,7 +46,6 @@
#include <wtf/PassOwnPtr.h>
#include <wtf/Vector.h>
-
namespace WebKit {
class WebPluginLoadObserver;
@@ -73,6 +72,7 @@ public:
virtual double triggeringEventTime() const;
virtual ExtraData* extraData() const;
virtual void setExtraData(ExtraData*);
+ virtual WebApplicationCacheHost* applicationCacheHost();
static WebNavigationType toWebNavigationType(WebCore::NavigationType type);
diff --git a/WebKit/chromium/src/WebDocument.cpp b/WebKit/chromium/src/WebDocument.cpp
new file mode 100644
index 0000000..84f3004
--- /dev/null
+++ b/WebKit/chromium/src/WebDocument.cpp
@@ -0,0 +1,150 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebDocument.h"
+
+#include "Document.h"
+#include "DocumentLoader.h"
+#include "Element.h"
+#include "HTMLAllCollection.h"
+#include "HTMLBodyElement.h"
+#include "HTMLCollection.h"
+#include "HTMLElement.h"
+#include "HTMLHeadElement.h"
+#include "NodeList.h"
+
+#include "WebElement.h"
+#include "WebFrameImpl.h"
+#include "WebNodeCollection.h"
+#include "WebURL.h"
+
+#include <wtf/PassRefPtr.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebDocument::WebDocument(const PassRefPtr<Document>& elem)
+ : WebNode(elem.releaseRef())
+{
+}
+
+WebDocument& WebDocument::operator=(const PassRefPtr<Document>& elem)
+{
+ WebNode::assign(elem.releaseRef());
+ return *this;
+}
+
+WebDocument::operator PassRefPtr<Document>() const
+{
+ return PassRefPtr<Document>(static_cast<Document*>(m_private));
+}
+
+WebFrame* WebDocument::frame() const
+{
+ return WebFrameImpl::fromFrame(constUnwrap<Document>()->frame());
+}
+
+bool WebDocument::isHTMLDocument() const
+{
+ return constUnwrap<Document>()->isHTMLDocument();
+}
+
+WebURL WebDocument::baseURL() const
+{
+ return constUnwrap<Document>()->baseURL();
+}
+
+WebElement WebDocument::documentElement() const
+{
+ return WebElement(constUnwrap<Document>()->documentElement());
+}
+
+WebElement WebDocument::body() const
+{
+ return WebElement(constUnwrap<Document>()->body());
+}
+
+WebElement WebDocument::head()
+{
+ return WebElement(unwrap<Document>()->head());
+}
+
+WebNodeCollection WebDocument::all()
+{
+ return WebNodeCollection(unwrap<Document>()->all());
+}
+
+WebURL WebDocument::completeURL(const WebString& partialURL) const
+{
+ return constUnwrap<Document>()->completeURL(partialURL);
+}
+
+WebElement WebDocument::getElementById(const WebString& id) const
+{
+ return WebElement(constUnwrap<Document>()->getElementById(id));
+}
+
+WebString WebDocument::applicationID() const
+{
+ const char* kChromeApplicationHeader = "x-chrome-application";
+
+ // First check if the document's response included a header indicating the
+ // application it should go with.
+ const Document* document = constUnwrap<Document>();
+ Frame* frame = document->frame();
+ if (!frame)
+ return WebString();
+
+ DocumentLoader* loader = frame->loader()->documentLoader();
+ if (!loader)
+ return WebString();
+
+ WebString headerValue =
+ loader->response().httpHeaderField(kChromeApplicationHeader);
+ if (!headerValue.isEmpty())
+ return headerValue;
+
+ // Otherwise, fall back to looking for the meta tag.
+ RefPtr<NodeList> metaTags =
+ const_cast<Document*>(document)->getElementsByTagName("meta");
+ for (unsigned i = 0; i < metaTags->length(); ++i) {
+ Element* element = static_cast<Element*>(metaTags->item(i));
+ if (element->getAttribute("http-equiv").lower() ==
+ kChromeApplicationHeader) {
+ return element->getAttribute("value");
+ }
+ }
+
+ return WebString();
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebDragData.cpp b/WebKit/chromium/src/WebDragData.cpp
index 4af1119..3bd4a02 100644
--- a/WebKit/chromium/src/WebDragData.cpp
+++ b/WebKit/chromium/src/WebDragData.cpp
@@ -88,6 +88,18 @@ void WebDragData::setURLTitle(const WebString& urlTitle)
m_private->urlTitle = urlTitle;
}
+WebURL WebDragData::downloadURL() const
+{
+ ASSERT(!isNull());
+ return m_private->downloadURL;
+}
+
+void WebDragData::setDownloadURL(const WebURL& downloadURL)
+{
+ ensureMutable();
+ m_private->downloadURL = downloadURL;
+}
+
WebString WebDragData::fileExtension() const
{
ASSERT(!isNull());
diff --git a/WebKit/chromium/src/WebElement.cpp b/WebKit/chromium/src/WebElement.cpp
index 3f13ee1..d0a0862 100644
--- a/WebKit/chromium/src/WebElement.cpp
+++ b/WebKit/chromium/src/WebElement.cpp
@@ -54,5 +54,38 @@ WebElement::operator WTF::PassRefPtr<Element>() const
return PassRefPtr<Element>(static_cast<Element*>(m_private));
}
+WebString WebElement::tagName() const
+{
+ return constUnwrap<Element>()->tagName();
+}
+
+bool WebElement::hasTagName(const WebString& tagName) const
+{
+ return equalIgnoringCase(constUnwrap<Element>()->tagName(),
+ tagName.operator WebCore::String());
+}
+
+bool WebElement::hasAttribute(const WebString& attrName) const
+{
+ return constUnwrap<Element>()->hasAttribute(attrName);
+}
+
+WebString WebElement::getAttribute(const WebString& attrName) const
+{
+ return constUnwrap<Element>()->getAttribute(attrName);
+}
+
+bool WebElement::setAttribute(const WebString& attrName, const WebString& attrValue)
+{
+ ExceptionCode exceptionCode = 0;
+ unwrap<Element>()->setAttribute(attrName, attrValue, exceptionCode);
+ return !exceptionCode;
+}
+
+WebString WebElement::innerText() const
+{
+ return constUnwrap<Element>()->innerText();
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebEntities.cpp b/WebKit/chromium/src/WebEntities.cpp
new file mode 100644
index 0000000..b9143d9
--- /dev/null
+++ b/WebKit/chromium/src/WebEntities.cpp
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebEntities.h"
+
+#include <string.h>
+
+#include "PlatformString.h"
+#include "StringBuilder.h"
+#include <wtf/HashMap.h>
+
+#include "WebString.h"
+
+using namespace WebCore;
+
+namespace {
+// Note that this file is also included by HTMLTokenizer.cpp so we are getting
+// two copies of the data in memory. We can fix this by changing the script
+// that generated the array to create a static const that is its length, but
+// this is low priority since the data is less than 4K. We use anonymous
+// namespace to prevent name collisions.
+#include "HTMLEntityNames.c" // NOLINT
+}
+
+namespace WebKit {
+
+void populateMap(WTF::HashMap<int, WebCore::String>& map,
+ const Entity* entities,
+ size_t entitiesCount,
+ bool standardHTML)
+{
+ ASSERT(map.isEmpty());
+ const Entity* entity = &entities[0];
+ for (size_t i = 0; i < entitiesCount; i++, entity++) {
+ int code = entity->code;
+ String name = entity->name;
+ // For consistency, use the lowe case for entities that have both.
+ if (map.contains(code) && map.get(code) == name.lower())
+ continue;
+ // Don't register &percnt;, &nsup; and &supl;.
+ if (standardHTML && (code == '%' || code == 0x2285 || code == 0x00b9))
+ continue;
+ map.set(code, name);
+ }
+ if (standardHTML)
+ map.set(static_cast<int>(0x0027), String("#39"));
+}
+
+static const Entity xmlBuiltInEntityCodes[] = {
+ { "lt", 0x003c },
+ { "gt", 0x003e },
+ { "amp", 0x0026 },
+ { "apos", 0x0027 },
+ { "quot", 0x0022 }
+};
+
+WebEntities::WebEntities(bool xmlEntities)
+{
+ if (xmlEntities)
+ populateMap(m_entitiesMap,
+ xmlBuiltInEntityCodes,
+ sizeof(xmlBuiltInEntityCodes) / sizeof(Entity),
+ false);
+ else
+ populateMap(m_entitiesMap,
+ wordlist,
+ sizeof(wordlist) / sizeof(Entity),
+ true);
+}
+
+String WebEntities::entityNameByCode(int code) const
+{
+ if (m_entitiesMap.contains(code))
+ return m_entitiesMap.get(code);
+ return "";
+}
+
+String WebEntities::convertEntitiesInString(const String& value) const
+{
+ unsigned len = value.length();
+ const UChar* startPos = value.characters();
+ const UChar* curPos = startPos;
+
+ // FIXME: Optimize - create StringBuilder only if value has any entities.
+ StringBuilder result;
+ while (len--) {
+ if (m_entitiesMap.contains(*curPos)) {
+ // Append content before entity code.
+ if (curPos > startPos)
+ result.append(String(startPos, curPos - startPos));
+ result.append("&");
+ result.append(m_entitiesMap.get(*curPos));
+ result.append(";");
+ startPos = ++curPos;
+ } else
+ curPos++;
+ }
+ // Append the remaining content.
+ if (curPos > startPos)
+ result.append(String(startPos, curPos - startPos));
+
+ return result.toString();
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebEntities.h b/WebKit/chromium/src/WebEntities.h
new file mode 100644
index 0000000..ad3c310
--- /dev/null
+++ b/WebKit/chromium/src/WebEntities.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebEntities_h
+#define WebEntities_h
+
+#include "PlatformString.h"
+#include <wtf/HashMap.h>
+
+namespace WebKit {
+
+class WebEntities {
+public:
+ // &apos;, &percnt;, &nsup;, &supl; are not defined by the HTML standards.
+ // - IE does not support &apos; as an HTML entity (but support it as an XML
+ // entity.)
+ // - Firefox supports &apos; as an HTML entity.
+ // - Both of IE and Firefox don't support &percnt;, &nsup; and &supl;.
+ //
+ // A web page saved by Chromium should be able to be read by other browsers
+ // such as IE and Firefox. Chromium should produce only the standard entity
+ // references which other browsers can recognize.
+ // So if standard_html_entities_ is true, we will use a numeric character
+ // reference for &apos;, and don't use entity references for &percnt;, &nsup;
+ // and &supl; for serialization.
+ //
+ // If xmlEntities is true, WebEntities will only contain standard XML
+ // entities.
+ explicit WebEntities(bool xmlEntities);
+
+ // Check whether specified unicode has corresponding html or xml built-in
+ // entity name. If yes, return the entity notation. If not, returns an
+ // empty string. Parameter isHTML indicates check the code in html entity
+ // map or in xml entity map.
+ WebCore::String entityNameByCode(int code) const;
+
+ // Returns a new string with corresponding entity names replaced.
+ WebCore::String convertEntitiesInString(const WebCore::String&) const;
+private:
+ typedef HashMap<int, WebCore::String> EntitiesMapType;
+ // An internal object that maps the Unicode character to corresponding
+ // entity notation.
+ EntitiesMapType m_entitiesMap;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/WebEvent.cpp b/WebKit/chromium/src/WebEvent.cpp
new file mode 100644
index 0000000..8c68959
--- /dev/null
+++ b/WebKit/chromium/src/WebEvent.cpp
@@ -0,0 +1,219 @@
+/*
+ * 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 "WebEvent.h"
+
+#include "Event.h"
+#include "Node.h"
+#include <wtf/PassRefPtr.h>
+
+namespace WebKit {
+
+class WebEventPrivate : public WebCore::Event {
+};
+
+void WebEvent::reset()
+{
+ assign(0);
+}
+
+void WebEvent::assign(const WebEvent& other)
+{
+ WebEventPrivate* p = const_cast<WebEventPrivate*>(other.m_private);
+ if (p)
+ p->ref();
+ assign(p);
+}
+
+void WebEvent::assign(WebEventPrivate* p)
+{
+ // p is already ref'd for us by the caller
+ if (m_private)
+ m_private->deref();
+ m_private = p;
+}
+
+WebEvent::WebEvent(const WTF::PassRefPtr<WebCore::Event>& event)
+ : m_private(static_cast<WebEventPrivate*>(event.releaseRef()))
+{
+}
+
+WebString WebEvent::type() const
+{
+ ASSERT(m_private);
+ return m_private->type();
+}
+
+WebNode WebEvent::target() const
+{
+ ASSERT(m_private);
+ return WebNode(m_private->target()->toNode());
+}
+
+WebNode WebEvent::currentTarget() const
+{
+ ASSERT(m_private);
+ return WebNode(m_private->currentTarget()->toNode());
+}
+
+WebEvent::PhaseType WebEvent::eventPhase() const
+{
+ ASSERT(m_private);
+ return static_cast<WebEvent::PhaseType>(m_private->eventPhase());
+}
+
+bool WebEvent::bubbles() const
+{
+ ASSERT(m_private);
+ return m_private->bubbles();
+}
+
+bool WebEvent::cancelable() const
+{
+ ASSERT(m_private);
+ return m_private->cancelable();
+}
+
+bool WebEvent::isUIEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isUIEvent();
+}
+
+bool WebEvent::isMouseEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isMouseEvent();
+}
+
+bool WebEvent::isMutationEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isMutationEvent();
+}
+
+bool WebEvent::isKeyboardEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isKeyboardEvent();
+}
+
+bool WebEvent::isTextEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isTextEvent();
+}
+
+bool WebEvent::isCompositionEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isCompositionEvent();
+}
+
+bool WebEvent::isDragEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isDragEvent();
+}
+
+bool WebEvent::isClipboardEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isClipboardEvent();
+}
+
+bool WebEvent::isMessageEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isMessageEvent();
+}
+
+bool WebEvent::isWheelEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isWheelEvent();
+}
+
+bool WebEvent::isBeforeTextInsertedEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isBeforeTextInsertedEvent();
+}
+
+bool WebEvent::isOverflowEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isOverflowEvent();
+}
+
+bool WebEvent::isPageTransitionEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isPageTransitionEvent();
+}
+
+bool WebEvent::isPopStateEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isPopStateEvent();
+}
+
+bool WebEvent::isProgressEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isProgressEvent();
+}
+
+bool WebEvent::isXMLHttpRequestProgressEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isXMLHttpRequestProgressEvent();
+}
+
+bool WebEvent::isWebKitAnimationEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isWebKitAnimationEvent();
+}
+
+bool WebEvent::isWebKitTransitionEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isWebKitTransitionEvent();
+}
+
+bool WebEvent::isBeforeLoadEvent() const
+{
+ ASSERT(m_private);
+ return m_private->isBeforeLoadEvent();
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebEventListener.cpp b/WebKit/chromium/src/WebEventListener.cpp
new file mode 100644
index 0000000..8d9a887
--- /dev/null
+++ b/WebKit/chromium/src/WebEventListener.cpp
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebEventListener.h"
+
+#include "WebEventListenerPrivate.h"
+
+namespace WebKit {
+
+WebEventListener::WebEventListener()
+ : m_private(new WebEventListenerPrivate(this))
+{
+}
+
+WebEventListener::~WebEventListener()
+{
+ m_private->webEventListenerDeleted();
+ delete m_private;
+}
+
+void WebEventListener::notifyEventListenerDeleted(EventListenerWrapper* wrapper)
+{
+ m_private->eventListenerDeleted(wrapper);
+}
+
+EventListenerWrapper* WebEventListener::createEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node)
+{
+ return m_private->createEventListenerWrapper(eventType, useCapture, node);
+}
+
+EventListenerWrapper* WebEventListener::getEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node)
+{
+ return m_private->getEventListenerWrapper(eventType, useCapture, node);
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebEventListenerPrivate.cpp b/WebKit/chromium/src/WebEventListenerPrivate.cpp
new file mode 100644
index 0000000..bd14baf
--- /dev/null
+++ b/WebKit/chromium/src/WebEventListenerPrivate.cpp
@@ -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.
+ */
+
+#include "config.h"
+#include "WebEventListenerPrivate.h"
+
+#include "EventListenerWrapper.h"
+#include "WebEventListener.h"
+
+namespace WebKit {
+
+WebEventListenerPrivate::WebEventListenerPrivate(WebEventListener* webEventListener)
+ : m_webEventListener(webEventListener)
+{
+}
+
+WebEventListenerPrivate::~WebEventListenerPrivate()
+{
+}
+
+EventListenerWrapper* WebEventListenerPrivate::createEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node)
+{
+ EventListenerWrapper* listenerWrapper = new EventListenerWrapper(m_webEventListener);
+ WebEventListenerPrivate::ListenerInfo listenerInfo(eventType, useCapture, listenerWrapper, node);
+ m_listenerWrappers.append(listenerInfo);
+ return listenerWrapper;
+}
+
+EventListenerWrapper* WebEventListenerPrivate::getEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node)
+{
+ Vector<WebEventListenerPrivate::ListenerInfo>::const_iterator iter;
+ for (iter = m_listenerWrappers.begin(); iter != m_listenerWrappers.end(); ++iter) {
+ if (iter->node == node)
+ return iter->eventListenerWrapper;
+ }
+ ASSERT_NOT_REACHED();
+ return 0;
+}
+
+void WebEventListenerPrivate::webEventListenerDeleted()
+{
+ // Notifies all WebEventListenerWrappers that we are going away so they can
+ // invalidate their pointer to us.
+ Vector<WebEventListenerPrivate::ListenerInfo>::const_iterator iter;
+ for (iter = m_listenerWrappers.begin(); iter != m_listenerWrappers.end(); ++iter)
+ iter->eventListenerWrapper->webEventListenerDeleted();
+}
+
+void WebEventListenerPrivate::eventListenerDeleted(EventListenerWrapper* eventListener)
+{
+ for (size_t i = 0; i < m_listenerWrappers.size(); ++i) {
+ if (m_listenerWrappers[i].eventListenerWrapper == eventListener) {
+ m_listenerWrappers.remove(i);
+ return;
+ }
+ }
+ ASSERT_NOT_REACHED();
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebEventListenerPrivate.h b/WebKit/chromium/src/WebEventListenerPrivate.h
new file mode 100644
index 0000000..0ba2b5d
--- /dev/null
+++ b/WebKit/chromium/src/WebEventListenerPrivate.h
@@ -0,0 +1,95 @@
+/*
+ * 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 WebEventListenerPrivate_h
+#define WebEventListenerPrivate_h
+
+#include "WebString.h"
+
+#include <wtf/Vector.h>
+
+namespace WebCore {
+class Node;
+}
+
+using namespace WebCore;
+
+namespace WebKit {
+
+class EventListenerWrapper;
+class WebEventListener;
+
+class WebEventListenerPrivate {
+public:
+ WebEventListenerPrivate(WebEventListener* webEventListener);
+ ~WebEventListenerPrivate();
+
+ EventListenerWrapper* createEventListenerWrapper(
+ const WebString& eventType, bool useCapture, Node* node);
+
+ // Gets the ListenerEventWrapper for a specific node.
+ // Used by WebNode::removeEventListener().
+ EventListenerWrapper* getEventListenerWrapper(
+ const WebString& eventType, bool useCapture, Node* node);
+
+ // Called by the WebEventListener when it is about to be deleted.
+ void webEventListenerDeleted();
+
+ // Called by the EventListenerWrapper when it is about to be deleted.
+ void eventListenerDeleted(EventListenerWrapper* eventListener);
+
+ struct ListenerInfo {
+ ListenerInfo(const WebString& eventType, bool useCapture,
+ EventListenerWrapper* eventListenerWrapper,
+ Node* node)
+ : eventType(eventType)
+ , useCapture(useCapture)
+ , eventListenerWrapper(eventListenerWrapper)
+ , node(node)
+ {
+ }
+
+ WebString eventType;
+ bool useCapture;
+ EventListenerWrapper* eventListenerWrapper;
+ Node* node;
+ };
+
+private:
+ WebEventListener* m_webEventListener;
+
+ // We keep a list of the wrapper for the WebKit EventListener, it is needed
+ // to implement WebNode::removeEventListener().
+ Vector<ListenerInfo> m_listenerWrappers;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index ab6769f..28c27cc 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -84,7 +84,6 @@
#include "Editor.h"
#include "EventHandler.h"
#include "FormState.h"
-#include "FrameChromium.h"
#include "FrameLoader.h"
#include "FrameLoadRequest.h"
#include "FrameTree.h"
@@ -104,6 +103,7 @@
#include "PlatformContextSkia.h"
#include "PrintContext.h"
#include "RenderFrame.h"
+#include "RenderTreeAsText.h"
#include "RenderView.h"
#include "RenderWidget.h"
#include "ReplaceSelectionCommand.h"
@@ -120,8 +120,10 @@
#include "SubstituteData.h"
#include "TextAffinity.h"
#include "TextIterator.h"
+#include "WebAnimationControllerImpl.h"
#include "WebConsoleMessage.h"
#include "WebDataSourceImpl.h"
+#include "WebDocument.h"
#include "WebFindOptions.h"
#include "WebFormElement.h"
#include "WebFrameClient.h"
@@ -142,11 +144,11 @@
#include <wtf/CurrentTime.h>
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
#include "LocalCurrentGraphicsContext.h"
#endif
-#if PLATFORM(LINUX)
+#if OS(LINUX)
#include <gdk/gdk.h>
#endif
@@ -154,6 +156,8 @@ using namespace WebCore;
namespace WebKit {
+static int frameCount = 0;
+
// Key for a StatsCounter tracking how many WebFrames are active.
static const char* const webFrameActiveCount = "WebFrameActiveCount";
@@ -329,6 +333,11 @@ private:
// WebFrame -------------------------------------------------------------------
+int WebFrame::instanceCount()
+{
+ return frameCount;
+}
+
WebFrame* WebFrame::frameForEnteredContext()
{
Frame* frame =
@@ -343,11 +352,22 @@ WebFrame* WebFrame::frameForCurrentContext()
return WebFrameImpl::fromFrame(frame);
}
+WebFrame* WebFrame::fromFrameOwnerElement(const WebElement& element)
+{
+ return WebFrameImpl::fromFrameOwnerElement(
+ PassRefPtr<Element>(element).get());
+}
+
WebString WebFrameImpl::name() const
{
return m_frame->tree()->name();
}
+void WebFrameImpl::clearName()
+{
+ m_frame->tree()->clearName();
+}
+
WebURL WebFrameImpl::url() const
{
const WebDataSource* ds = dataSource();
@@ -391,6 +411,11 @@ WebURL WebFrameImpl::openSearchDescriptionURL() const
return WebURL();
}
+WebString WebFrameImpl::encoding() const
+{
+ return frame()->loader()->encoding();
+}
+
WebSize WebFrameImpl::scrollOffset() const
{
FrameView* view = frameView();
@@ -515,6 +540,13 @@ WebFrame* WebFrameImpl::findChildByExpression(const WebString& xpath) const
return fromFrame(frameElement->contentFrame());
}
+WebDocument WebFrameImpl::document() const
+{
+ if (!m_frame || !m_frame->document())
+ return WebDocument();
+ return WebDocument(m_frame->document());
+}
+
void WebFrameImpl::forms(WebVector<WebFormElement>& results) const
{
if (!m_frame)
@@ -533,6 +565,11 @@ void WebFrameImpl::forms(WebVector<WebFormElement>& results) const
results.swap(temp);
}
+WebAnimationController* WebFrameImpl::animationController()
+{
+ return &m_animationController;
+}
+
WebSecurityOrigin WebFrameImpl::securityOrigin() const
{
if (!m_frame || !m_frame->document())
@@ -559,7 +596,7 @@ NPObject* WebFrameImpl::windowObject() const
void WebFrameImpl::bindToWindowObject(const WebString& name, NPObject* object)
{
ASSERT(m_frame);
- if (!m_frame || !m_frame->script()->isEnabled())
+ if (!m_frame || !m_frame->script()->canExecuteScripts())
return;
String key = name;
@@ -576,19 +613,6 @@ void WebFrameImpl::executeScript(const WebScriptSource& source)
ScriptSourceCode(source.code, source.url, source.startLine));
}
-void WebFrameImpl::executeScriptInNewContext(
- const WebScriptSource* sourcesIn, unsigned numSources, int extensionGroup)
-{
- Vector<ScriptSourceCode> sources;
-
- for (unsigned i = 0; i < numSources; ++i) {
- sources.append(ScriptSourceCode(
- sourcesIn[i].code, sourcesIn[i].url, sourcesIn[i].startLine));
- }
-
- m_frame->script()->evaluateInNewContext(sources, extensionGroup);
-}
-
void WebFrameImpl::executeScriptInIsolatedWorld(
int worldId, const WebScriptSource* sourcesIn, unsigned numSources,
int extensionGroup)
@@ -1037,7 +1061,7 @@ WebString WebFrameImpl::selectionAsText() const
return WebString();
String text = range->text();
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
replaceNewlinesWithWindowsStyleNewlines(text);
#endif
replaceNBSPWithSpace(text);
@@ -1087,10 +1111,10 @@ float WebFrameImpl::printPage(int page, WebCanvas* canvas)
return 0;
}
-#if PLATFORM(WIN_OS) || PLATFORM(LINUX) || PLATFORM(FREEBSD)
+#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD)
PlatformContextSkia context(canvas);
GraphicsContext spool(&context);
-#elif PLATFORM(DARWIN)
+#elif OS(DARWIN)
GraphicsContext spool(canvas);
LocalCurrentGraphicsContext localContext(&spool);
#endif
@@ -1212,8 +1236,7 @@ void WebFrameImpl::stopFinding(bool clearSelection)
cancelPendingScopingEffort();
// Remove all markers for matches found and turn off the highlighting.
- if (!parent())
- frame()->document()->removeMarkers(DocumentMarker::TextMatch);
+ frame()->document()->removeMarkers(DocumentMarker::TextMatch);
frame()->setMarkedTextMatchesAreHighlighted(false);
// Let the frame know that we don't want tickmarks or highlighting anymore.
@@ -1456,9 +1479,24 @@ WebString WebFrameImpl::contentAsMarkup() const
return createFullMarkup(m_frame->document());
}
-// WebFrameImpl public ---------------------------------------------------------
+WebString WebFrameImpl::renderTreeAsText() const
+{
+ return externalRepresentation(m_frame);
+}
+
+WebString WebFrameImpl::counterValueForElementById(const WebString& id) const
+{
+ if (!m_frame)
+ return WebString();
+
+ Element* element = m_frame->document()->getElementById(id);
+ if (!element)
+ return WebString();
-int WebFrameImpl::m_liveObjectCount = 0;
+ return counterValueForElement(element);
+}
+
+// WebFrameImpl public ---------------------------------------------------------
PassRefPtr<WebFrameImpl> WebFrameImpl::create(WebFrameClient* client)
{
@@ -1477,15 +1515,16 @@ WebFrameImpl::WebFrameImpl(WebFrameClient* client)
, m_framesScopingCount(-1)
, m_scopingComplete(false)
, m_nextInvalidateAfter(0)
+ , m_animationController(this)
{
ChromiumBridge::incrementStatsCounter(webFrameActiveCount);
- m_liveObjectCount++;
+ frameCount++;
}
WebFrameImpl::~WebFrameImpl()
{
ChromiumBridge::decrementStatsCounter(webFrameActiveCount);
- m_liveObjectCount--;
+ frameCount--;
cancelPendingScopingEffort();
clearPasswordListeners();
@@ -1631,6 +1670,19 @@ WebFrameImpl* WebFrameImpl::fromFrame(Frame* frame)
return static_cast<FrameLoaderClientImpl*>(frame->loader()->client())->webFrame();
}
+WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element)
+{
+ if (!element
+ || !element->isFrameOwnerElement()
+ || (!element->hasTagName(HTMLNames::iframeTag)
+ && !element->hasTagName(HTMLNames::frameTag)))
+ return 0;
+
+ HTMLFrameOwnerElement* frameElement =
+ static_cast<HTMLFrameOwnerElement*>(element);
+ return fromFrame(frameElement->contentFrame());
+}
+
WebViewImpl* WebFrameImpl::viewImpl() const
{
if (!m_frame)
diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h
index 2cd332a..ba8d279 100644
--- a/WebKit/chromium/src/WebFrameImpl.h
+++ b/WebKit/chromium/src/WebFrameImpl.h
@@ -39,6 +39,8 @@
#include <wtf/OwnPtr.h>
#include <wtf/RefCounted.h>
+#include "WebAnimationControllerImpl.h"
+
namespace WebCore {
class HistoryItem;
class KURL;
@@ -62,9 +64,11 @@ class WebFrameImpl : public WebFrame, public RefCounted<WebFrameImpl> {
public:
// WebFrame methods:
virtual WebString name() const;
+ virtual void clearName();
virtual WebURL url() const;
virtual WebURL favIconURL() const;
virtual WebURL openSearchDescriptionURL() const;
+ virtual WebString encoding() const;
virtual WebSize scrollOffset() const;
virtual WebSize contentsSize() const;
virtual int contentsPreferredWidth() const;
@@ -82,14 +86,14 @@ public:
virtual WebFrame* traversePrevious(bool wrap) const;
virtual WebFrame* findChildByName(const WebString&) const;
virtual WebFrame* findChildByExpression(const WebString&) const;
+ virtual WebDocument document() const;
virtual void forms(WebVector<WebFormElement>&) const;
+ virtual WebAnimationController* animationController();
virtual WebSecurityOrigin securityOrigin() const;
virtual void grantUniversalAccess();
virtual NPObject* windowObject() const;
virtual void bindToWindowObject(const WebString& name, NPObject*);
virtual void executeScript(const WebScriptSource&);
- virtual void executeScriptInNewContext(
- const WebScriptSource* sources, unsigned numSources, int extensionGroup);
virtual void executeScriptInIsolatedWorld(
int worldId, const WebScriptSource* sources, unsigned numSources,
int extensionGroup);
@@ -157,12 +161,12 @@ public:
virtual WebURL completeURL(const WebString& url) const;
virtual WebString contentAsText(size_t maxChars) const;
virtual WebString contentAsMarkup() const;
+ virtual WebString renderTreeAsText() const;
+ virtual WebString counterValueForElementById(const WebString& id) const;
static PassRefPtr<WebFrameImpl> create(WebFrameClient* client);
~WebFrameImpl();
- static int liveObjectCount() { return m_liveObjectCount; }
-
// Called by the WebViewImpl to initialize its main frame:
void initializeAsMainFrame(WebViewImpl*);
@@ -174,6 +178,7 @@ public:
void createFrameView();
static WebFrameImpl* fromFrame(WebCore::Frame* frame);
+ static WebFrameImpl* fromFrameOwnerElement(WebCore::Element* element);
WebViewImpl* viewImpl() const;
@@ -276,9 +281,6 @@ private:
void loadJavaScriptURL(const WebCore::KURL&);
- // Used to check for leaks of this object.
- static int m_liveObjectCount;
-
FrameLoaderClientImpl m_frameLoaderClient;
WebFrameClient* m_client;
@@ -348,6 +350,9 @@ private:
typedef HashMap<RefPtr<WebCore::HTMLInputElement>,
WebPasswordAutocompleteListener*> PasswordListenerMap;
PasswordListenerMap m_passwordListeners;
+
+ // Keeps a reference to the frame's WebAnimationController.
+ WebAnimationControllerImpl m_animationController;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebGlyphCache.cpp b/WebKit/chromium/src/WebGlyphCache.cpp
new file mode 100644
index 0000000..272c6cd
--- /dev/null
+++ b/WebKit/chromium/src/WebGlyphCache.cpp
@@ -0,0 +1,45 @@
+/*
+ * 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 "WebGlyphCache.h"
+
+#include "GlyphPageTreeNode.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+size_t WebGlyphCache::pageCount()
+{
+ return GlyphPageTreeNode::treeGlyphPageCount();
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebHistoryItem.cpp b/WebKit/chromium/src/WebHistoryItem.cpp
index d4ee50a..4ca8cc7 100644
--- a/WebKit/chromium/src/WebHistoryItem.cpp
+++ b/WebKit/chromium/src/WebHistoryItem.cpp
@@ -218,6 +218,18 @@ void WebHistoryItem::setDocumentState(const WebVector<WebString>& state)
m_private->setDocumentState(ds);
}
+long long WebHistoryItem::documentSequenceNumber() const
+{
+ ASSERT(!isNull());
+ return m_private->documentSequenceNumber();
+}
+
+void WebHistoryItem::setDocumentSequenceNumber(long long documentSequenceNumber)
+{
+ ensureMutable();
+ m_private->setDocumentSequenceNumber(documentSequenceNumber);
+}
+
WebString WebHistoryItem::httpContentType() const
{
ASSERT(!isNull());
diff --git a/WebKit/chromium/src/WebInputElement.cpp b/WebKit/chromium/src/WebInputElement.cpp
index d403120..ee799f6 100644
--- a/WebKit/chromium/src/WebInputElement.cpp
+++ b/WebKit/chromium/src/WebInputElement.cpp
@@ -56,6 +56,11 @@ WebInputElement::operator WTF::PassRefPtr<HTMLInputElement>() const
return PassRefPtr<HTMLInputElement>(static_cast<HTMLInputElement*>(m_private));
}
+bool WebInputElement::autoComplete() const
+{
+ return constUnwrap<HTMLInputElement>()->autoComplete();
+}
+
bool WebInputElement::isEnabledFormControl() const
{
return constUnwrap<HTMLInputElement>()->isEnabledFormControl();
diff --git a/WebKit/chromium/src/WebKit.cpp b/WebKit/chromium/src/WebKit.cpp
index a129f85..a8e1851 100644
--- a/WebKit/chromium/src/WebKit.cpp
+++ b/WebKit/chromium/src/WebKit.cpp
@@ -33,6 +33,7 @@
#include "AtomicString.h"
#include "DOMTimer.h"
+#include "Logging.h"
#include "Page.h"
#include "RuntimeEnabledFeatures.h"
#include "TextEncoding.h"
@@ -94,6 +95,13 @@ bool layoutTestMode()
return s_layoutTestMode;
}
+void enableLogChannel(const char* name)
+{
+ WTFLogChannel* channel = WebCore::getChannelFromName(name);
+ if (channel)
+ channel->state = WTFLogChannelOn;
+}
+
void resetPluginCache(bool reloadPages)
{
WebCore::Page::refreshPlugins(reloadPages);
diff --git a/WebKit/chromium/src/WebMutationEvent.cpp b/WebKit/chromium/src/WebMutationEvent.cpp
new file mode 100644
index 0000000..511b615
--- /dev/null
+++ b/WebKit/chromium/src/WebMutationEvent.cpp
@@ -0,0 +1,65 @@
+/*
+ * 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 "WebMutationEvent.h"
+
+#include "MutationEvent.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebNode WebMutationEvent::relatedNode() const
+{
+ return WebNode(constUnwrap<MutationEvent>()->relatedNode());
+}
+
+WebString WebMutationEvent::prevValue() const
+{
+ return WebString(constUnwrap<MutationEvent>()->prevValue());
+}
+
+WebString WebMutationEvent::newValue() const
+{
+ return WebString(constUnwrap<MutationEvent>()->newValue());
+}
+
+WebString WebMutationEvent::attrName() const
+{
+ return WebString(constUnwrap<MutationEvent>()->attrName());
+}
+
+WebMutationEvent::AttrChangeType WebMutationEvent::attrChange() const
+{
+ return static_cast<AttrChangeType>(constUnwrap<MutationEvent>()->attrChange());
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebNode.cpp b/WebKit/chromium/src/WebNode.cpp
index 965c412..9fbf573 100644
--- a/WebKit/chromium/src/WebNode.cpp
+++ b/WebKit/chromium/src/WebNode.cpp
@@ -35,9 +35,18 @@
#include "Frame.h"
#include "FrameLoaderClientImpl.h"
#include "Node.h"
+#include "NodeList.h"
+#include "EventListenerWrapper.h"
+#include "WebDocument.h"
+#include "WebEvent.h"
+#include "WebEventListener.h"
#include "WebFrameImpl.h"
+#include "WebNodeList.h"
#include "WebString.h"
+#include "WebVector.h"
+
+#include "markup.h"
#include <wtf/PassRefPtr.h>
@@ -61,6 +70,11 @@ void WebNode::assign(const WebNode& other)
assign(p);
}
+WebNode::NodeType WebNode::nodeType() const
+{
+ return static_cast<NodeType>(m_private->nodeType());
+}
+
WebNode WebNode::parentNode() const
{
return PassRefPtr<Node>(const_cast<Node*>(m_private->parentNode()));
@@ -71,18 +85,30 @@ WebString WebNode::nodeName() const
return m_private->nodeName();
}
-WebNode::WebNode(const WTF::PassRefPtr<WebCore::Node>& node)
+WebString WebNode::nodeValue() const
+{
+ return m_private->nodeValue();
+}
+
+bool WebNode::setNodeValue(const WebString& value)
+{
+ ExceptionCode exceptionCode = 0;
+ m_private->setNodeValue(value, exceptionCode);
+ return !exceptionCode;
+}
+
+WebNode::WebNode(const PassRefPtr<Node>& node)
: m_private(static_cast<WebNodePrivate*>(node.releaseRef()))
{
}
-WebNode& WebNode::operator=(const WTF::PassRefPtr<WebCore::Node>& node)
+WebNode& WebNode::operator=(const PassRefPtr<Node>& node)
{
assign(static_cast<WebNodePrivate*>(node.releaseRef()));
return *this;
}
-WebNode::operator WTF::PassRefPtr<WebCore::Node>() const
+WebNode::operator PassRefPtr<Node>() const
{
return PassRefPtr<Node>(const_cast<WebNodePrivate*>(m_private));
}
@@ -100,4 +126,72 @@ WebFrame* WebNode::frame() const
return WebFrameImpl::fromFrame(m_private->document()->frame());
}
+WebDocument WebNode::document() const
+{
+ return WebDocument(m_private->document());
+}
+
+WebNode WebNode::firstChild() const
+{
+ return WebNode(m_private->firstChild());
+}
+
+WebNode WebNode::lastChild() const
+{
+ return WebNode(m_private->lastChild());
+}
+
+WebNode WebNode::previousSibling() const
+{
+ return WebNode(m_private->previousSibling());
+}
+
+WebNode WebNode::nextSibling() const
+{
+ return WebNode(m_private->nextSibling());
+}
+
+bool WebNode::hasChildNodes() const
+{
+ return m_private->hasChildNodes();
+}
+
+WebNodeList WebNode::childNodes()
+{
+ return WebNodeList(m_private->childNodes());
+}
+
+WebString WebNode::createMarkup() const
+{
+ return WebCore::createMarkup(m_private);
+}
+
+bool WebNode::isTextNode() const
+{
+ return m_private->isTextNode();
+}
+
+bool WebNode::isElementNode() const
+{
+ return m_private->isElementNode();
+}
+
+void WebNode::addEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture)
+{
+ EventListenerWrapper* listenerWrapper =
+ listener->createEventListenerWrapper(eventType, useCapture, m_private);
+ // The listenerWrapper is only referenced by the actual Node. Once it goes
+ // away, the wrapper notifies the WebEventListener so it can clear its
+ // pointer to it.
+ m_private->addEventListener(eventType, adoptRef(listenerWrapper), useCapture);
+}
+
+void WebNode::removeEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture)
+{
+ EventListenerWrapper* listenerWrapper =
+ listener->getEventListenerWrapper(eventType, useCapture, m_private);
+ m_private->removeEventListener(eventType, listenerWrapper, useCapture);
+ // listenerWrapper is now deleted.
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebNodeCollection.cpp b/WebKit/chromium/src/WebNodeCollection.cpp
new file mode 100644
index 0000000..a9e532f
--- /dev/null
+++ b/WebKit/chromium/src/WebNodeCollection.cpp
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebNodeCollection.h"
+
+#include "HTMLCollection.h"
+#include "Node.h"
+#include <wtf/PassRefPtr.h>
+
+#include "WebNode.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebNodeCollection::reset()
+{
+ assign(0);
+}
+
+void WebNodeCollection::assign(const WebNodeCollection& other)
+{
+ HTMLCollection* p = const_cast<HTMLCollection*>(other.m_private);
+ if (p)
+ p->ref();
+ assign(p);
+}
+
+WebNodeCollection::WebNodeCollection(const PassRefPtr<HTMLCollection>& col)
+ : m_private(static_cast<HTMLCollection*>(col.releaseRef()))
+{
+}
+
+void WebNodeCollection::assign(HTMLCollection* p)
+{
+ // p is already ref'd for us by the caller
+ if (m_private)
+ m_private->deref();
+ m_private = p;
+}
+
+unsigned WebNodeCollection::length() const
+{
+ return m_private->length();
+}
+
+WebNode WebNodeCollection::nextItem() const
+{
+ return WebNode(m_private->nextItem());
+}
+
+WebNode WebNodeCollection::firstItem() const
+{
+ return WebNode(m_private->firstItem());
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebNodeList.cpp b/WebKit/chromium/src/WebNodeList.cpp
new file mode 100644
index 0000000..f68f961
--- /dev/null
+++ b/WebKit/chromium/src/WebNodeList.cpp
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebNodeList.h"
+
+#include "Node.h"
+#include "NodeList.h"
+#include <wtf/PassRefPtr.h>
+
+#include "WebNode.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebNodeList::reset()
+{
+ assign(0);
+}
+
+void WebNodeList::assign(const WebNodeList& other)
+{
+ NodeList* p = const_cast<NodeList*>(other.m_private);
+ if (p)
+ p->ref();
+ assign(p);
+}
+
+WebNodeList::WebNodeList(const PassRefPtr<NodeList>& col)
+ : m_private(static_cast<NodeList*>(col.releaseRef()))
+{
+}
+
+void WebNodeList::assign(NodeList* p)
+{
+ // p is already ref'd for us by the caller
+ if (m_private)
+ m_private->deref();
+ m_private = p;
+}
+
+unsigned WebNodeList::length() const
+{
+ return m_private->length();
+}
+
+WebNode WebNodeList::item(size_t index) const
+{
+ return WebNode(m_private->item(index));
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebPageSerializer.cpp b/WebKit/chromium/src/WebPageSerializer.cpp
new file mode 100644
index 0000000..1010285
--- /dev/null
+++ b/WebKit/chromium/src/WebPageSerializer.cpp
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebPageSerializer.h"
+
+#include "KURL.h"
+#include "PlatformString.h"
+
+#include "WebFrame.h"
+#include "WebPageSerializerClient.h"
+#include "WebPageSerializerImpl.h"
+#include "WebString.h"
+#include "WebURL.h"
+#include "WebVector.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+bool WebPageSerializer::serialize(WebFrame* frame,
+ bool recursive,
+ WebPageSerializerClient* client,
+ const WebVector<WebURL>& links,
+ const WebVector<WebString>& localPaths,
+ const WebString& localDirectoryName)
+{
+ WebPageSerializerImpl serializerImpl(
+ frame, recursive, client, links, localPaths, localDirectoryName);
+ return serializerImpl.serialize();
+}
+
+WebString WebPageSerializer::generateMetaCharsetDeclaration(const WebString& charset)
+{
+ return String::format("<META http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">",
+ charset.utf8().data());
+}
+
+WebString WebPageSerializer::generateMarkOfTheWebDeclaration(const WebURL& url)
+{
+ return String::format("\n<!-- saved from url=(%04d)%s -->\n",
+ static_cast<int>(url.spec().length()),
+ url.spec().data());
+}
+
+WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTarget)
+{
+ String targetDeclaration;
+ if (!baseTarget.isEmpty())
+ targetDeclaration = String::format(" target=\"%s\"", baseTarget.utf8().data());
+ return String::format("<BASE href=\".\"%s>", targetDeclaration.utf8().data());
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebPageSerializerImpl.cpp b/WebKit/chromium/src/WebPageSerializerImpl.cpp
new file mode 100644
index 0000000..d5b2b7f
--- /dev/null
+++ b/WebKit/chromium/src/WebPageSerializerImpl.cpp
@@ -0,0 +1,547 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// How we handle the base tag better.
+// Current status:
+// At now the normal way we use to handling base tag is
+// a) For those links which have corresponding local saved files, such as
+// savable CSS, JavaScript files, they will be written to relative URLs which
+// point to local saved file. Why those links can not be resolved as absolute
+// file URLs, because if they are resolved as absolute URLs, after moving the
+// file location from one directory to another directory, the file URLs will
+// be dead links.
+// b) For those links which have not corresponding local saved files, such as
+// links in A, AREA tags, they will be resolved as absolute URLs.
+// c) We comment all base tags when serialzing DOM for the page.
+// FireFox also uses above way to handle base tag.
+//
+// Problem:
+// This way can not handle the following situation:
+// the base tag is written by JavaScript.
+// For example. The page "www.yahoo.com" use
+// "document.write('<base href="http://www.yahoo.com/"...');" to setup base URL
+// of page when loading page. So when saving page as completed-HTML, we assume
+// that we save "www.yahoo.com" to "c:\yahoo.htm". After then we load the saved
+// completed-HTML page, then the JavaScript will insert a base tag
+// <base href="http://www.yahoo.com/"...> to DOM, so all URLs which point to
+// local saved resource files will be resolved as
+// "http://www.yahoo.com/yahoo_files/...", which will cause all saved resource
+// files can not be loaded correctly. Also the page will be rendered ugly since
+// all saved sub-resource files (such as CSS, JavaScript files) and sub-frame
+// files can not be fetched.
+// Now FireFox, IE and WebKit based Browser all have this problem.
+//
+// Solution:
+// My solution is that we comment old base tag and write new base tag:
+// <base href="." ...> after the previous commented base tag. In WebKit, it
+// always uses the latest "href" attribute of base tag to set document's base
+// URL. Based on this behavior, when we encounter a base tag, we comment it and
+// write a new base tag <base href="."> after the previous commented base tag.
+// The new added base tag can help engine to locate correct base URL for
+// correctly loading local saved resource files. Also I think we need to inherit
+// the base target value from document object when appending new base tag.
+// If there are multiple base tags in original document, we will comment all old
+// base tags and append new base tag after each old base tag because we do not
+// know those old base tags are original content or added by JavaScript. If
+// they are added by JavaScript, it means when loading saved page, the script(s)
+// will still insert base tag(s) to DOM, so the new added base tag(s) can
+// override the incorrect base URL and make sure we alway load correct local
+// saved resource files.
+
+#include "config.h"
+#include "WebPageSerializerImpl.h"
+
+#include "Document.h"
+#include "DocumentType.h"
+#include "Element.h"
+#include "FrameLoader.h"
+#include "HTMLAllCollection.h"
+#include "HTMLElement.h"
+#include "HTMLFormElement.h"
+#include "HTMLMetaElement.h"
+#include "HTMLNames.h"
+#include "KURL.h"
+#include "PlatformString.h"
+#include "StringBuilder.h"
+#include "TextEncoding.h"
+#include "markup.h"
+
+#include "DOMUtilitiesPrivate.h"
+#include "WebFrameImpl.h"
+#include "WebURL.h"
+#include "WebVector.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+// Maximum length of data buffer which is used to temporary save generated
+// html content data. This is a soft limit which might be passed if a very large
+// contegious string is found in the page.
+static const unsigned dataBufferCapacity = 65536;
+
+WebPageSerializerImpl::SerializeDomParam::SerializeDomParam(const KURL& currentFrameURL,
+ const TextEncoding& textEncoding,
+ Document* doc,
+ const String& directoryName)
+ : currentFrameURL(currentFrameURL)
+ , textEncoding(textEncoding)
+ , doc(doc)
+ , directoryName(directoryName)
+ , hasDoctype(false)
+ , hasCheckedMeta(false)
+ , skipMetaElement(0)
+ , isInScriptOrStyleTag(false)
+ , hasDocDeclaration(false)
+{
+ // Cache the value since we check it lots of times.
+ isHTMLDocument = doc->isHTMLDocument();
+}
+
+String WebPageSerializerImpl::preActionBeforeSerializeOpenTag(
+ const Element* element, SerializeDomParam* param, bool* needSkip)
+{
+ StringBuilder result;
+
+ *needSkip = false;
+ if (param->isHTMLDocument) {
+ // Skip the open tag of original META tag which declare charset since we
+ // have overrided the META which have correct charset declaration after
+ // serializing open tag of HEAD element.
+ if (element->hasTagName(HTMLNames::metaTag)) {
+ const HTMLMetaElement* meta = static_cast<const HTMLMetaElement*>(element);
+ // Check whether the META tag has declared charset or not.
+ String equiv = meta->httpEquiv();
+ if (equalIgnoringCase(equiv, "content-type")) {
+ String content = meta->content();
+ if (content.length() && content.contains("charset", false)) {
+ // Find META tag declared charset, we need to skip it when
+ // serializing DOM.
+ param->skipMetaElement = element;
+ *needSkip = true;
+ }
+ }
+ } else if (element->hasTagName(HTMLNames::htmlTag)) {
+ // Check something before processing the open tag of HEAD element.
+ // First we add doc type declaration if original doc has it.
+ if (!param->hasDoctype) {
+ param->hasDoctype = true;
+ result.append(createMarkup(param->doc->doctype()));
+ }
+
+ // Add MOTW declaration before html tag.
+ // See http://msdn2.microsoft.com/en-us/library/ms537628(VS.85).aspx.
+ result.append(WebPageSerializer::generateMarkOfTheWebDeclaration(param->currentFrameURL));
+ } else if (element->hasTagName(HTMLNames::baseTag)) {
+ // Comment the BASE tag when serializing dom.
+ result.append("<!--");
+ }
+ } else {
+ // Write XML declaration.
+ if (!param->hasDocDeclaration) {
+ param->hasDocDeclaration = true;
+ // Get encoding info.
+ String xmlEncoding = param->doc->xmlEncoding();
+ if (xmlEncoding.isEmpty())
+ xmlEncoding = param->doc->frame()->loader()->encoding();
+ if (xmlEncoding.isEmpty())
+ xmlEncoding = UTF8Encoding().name();
+ result.append("<?xml version=\"");
+ result.append(param->doc->xmlVersion());
+ result.append("\" encoding=\"");
+ result.append(xmlEncoding);
+ if (param->doc->xmlStandalone())
+ result.append("\" standalone=\"yes");
+ result.append("\"?>\n");
+ }
+ // Add doc type declaration if original doc has it.
+ if (!param->hasDoctype) {
+ param->hasDoctype = true;
+ result.append(createMarkup(param->doc->doctype()));
+ }
+ }
+ return result.toString();
+}
+
+String WebPageSerializerImpl::postActionAfterSerializeOpenTag(
+ const Element* element, SerializeDomParam* param)
+{
+ StringBuilder result;
+
+ param->hasAddedContentsBeforeEnd = false;
+ if (!param->isHTMLDocument)
+ return result.toString();
+ // Check after processing the open tag of HEAD element
+ if (!param->hasCheckedMeta
+ && element->hasTagName(HTMLNames::headTag)) {
+ param->hasCheckedMeta = true;
+ // Check meta element. WebKit only pre-parse the first 512 bytes
+ // of the document. If the whole <HEAD> is larger and meta is the
+ // end of head part, then this kind of pages aren't decoded correctly
+ // because of this issue. So when we serialize the DOM, we need to
+ // make sure the meta will in first child of head tag.
+ // See http://bugs.webkit.org/show_bug.cgi?id=16621.
+ // First we generate new content for writing correct META element.
+ result.append(WebPageSerializer::generateMetaCharsetDeclaration(
+ String(param->textEncoding.name())));
+
+ param->hasAddedContentsBeforeEnd = true;
+ // Will search each META which has charset declaration, and skip them all
+ // in PreActionBeforeSerializeOpenTag.
+ } else if (element->hasTagName(HTMLNames::scriptTag)
+ || element->hasTagName(HTMLNames::styleTag)) {
+ param->isInScriptOrStyleTag = true;
+ }
+
+ return result.toString();
+}
+
+String WebPageSerializerImpl::preActionBeforeSerializeEndTag(
+ const Element* element, SerializeDomParam* param, bool* needSkip)
+{
+ String result;
+
+ *needSkip = false;
+ if (!param->isHTMLDocument)
+ return result;
+ // Skip the end tag of original META tag which declare charset.
+ // Need not to check whether it's META tag since we guarantee
+ // skipMetaElement is definitely META tag if it's not 0.
+ if (param->skipMetaElement == element)
+ *needSkip = true;
+ else if (element->hasTagName(HTMLNames::scriptTag)
+ || element->hasTagName(HTMLNames::styleTag)) {
+ ASSERT(param->isInScriptOrStyleTag);
+ param->isInScriptOrStyleTag = false;
+ }
+
+ return result;
+}
+
+// After we finish serializing end tag of a element, we give the target
+// element a chance to do some post work to add some additional data.
+String WebPageSerializerImpl::postActionAfterSerializeEndTag(
+ const Element* element, SerializeDomParam* param)
+{
+ StringBuilder result;
+
+ if (!param->isHTMLDocument)
+ return result.toString();
+ // Comment the BASE tag when serializing DOM.
+ if (element->hasTagName(HTMLNames::baseTag)) {
+ result.append("-->");
+ // Append a new base tag declaration.
+ result.append(WebPageSerializer::generateBaseTagDeclaration(
+ param->doc->baseTarget()));
+ }
+
+ return result.toString();
+}
+
+void WebPageSerializerImpl::saveHTMLContentToBuffer(
+ const String& result, SerializeDomParam* param)
+{
+ m_dataBuffer.append(result);
+ encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsNotFinished,
+ param,
+ 0);
+}
+
+void WebPageSerializerImpl::encodeAndFlushBuffer(
+ WebPageSerializerClient::PageSerializationStatus status,
+ SerializeDomParam* param,
+ bool force)
+{
+ // Data buffer is not full nor do we want to force flush.
+ if (!force && m_dataBuffer.length() <= dataBufferCapacity)
+ return;
+
+ String content = m_dataBuffer.toString();
+ m_dataBuffer.clear();
+
+ // Convert the unicode content to target encoding
+ CString encodedContent = param->textEncoding.encode(
+ content.characters(), content.length(), EntitiesForUnencodables);
+
+ // Send result to the client.
+ m_client->didSerializeDataForFrame(param->currentFrameURL,
+ WebCString(encodedContent.data(), encodedContent.length()),
+ status);
+}
+
+void WebPageSerializerImpl::openTagToString(const Element* element,
+ SerializeDomParam* param)
+{
+ // FIXME: use StringBuilder instead of String.
+ bool needSkip;
+ // Do pre action for open tag.
+ String result = preActionBeforeSerializeOpenTag(element, param, &needSkip);
+ if (needSkip)
+ return;
+ // Add open tag
+ result += "<" + element->nodeName();
+ // Go through all attributes and serialize them.
+ const NamedNodeMap *attrMap = element->attributes(true);
+ if (attrMap) {
+ unsigned numAttrs = attrMap->length();
+ for (unsigned i = 0; i < numAttrs; i++) {
+ result += " ";
+ // Add attribute pair
+ const Attribute *attribute = attrMap->attributeItem(i);
+ result += attribute->name().toString();
+ result += "=\"";
+ if (!attribute->value().isEmpty()) {
+ const String& attrValue = attribute->value();
+
+ // Check whether we need to replace some resource links
+ // with local resource paths.
+ const QualifiedName& attrName = attribute->name();
+ if (elementHasLegalLinkAttribute(element, attrName)) {
+ // For links start with "javascript:", we do not change it.
+ if (attrValue.startsWith("javascript:", false))
+ result += attrValue;
+ else {
+ // Get the absolute link
+ String completeURL = param->doc->completeURL(attrValue);
+ // Check whether we have local files for those link.
+ if (m_localLinks.contains(completeURL)) {
+ if (!m_localDirectoryName.isEmpty())
+ result += "./" + m_localDirectoryName + "/";
+ result += m_localLinks.get(completeURL);
+ } else
+ result += completeURL;
+ }
+ } else {
+ if (param->isHTMLDocument)
+ result += m_htmlEntities.convertEntitiesInString(attrValue);
+ else
+ result += m_xmlEntities.convertEntitiesInString(attrValue);
+ }
+ }
+ result += "\"";
+ }
+ }
+
+ // Do post action for open tag.
+ String addedContents = postActionAfterSerializeOpenTag(element, param);
+ // Complete the open tag for element when it has child/children.
+ if (element->hasChildNodes() || param->hasAddedContentsBeforeEnd)
+ result += ">";
+ // Append the added contents generate in post action of open tag.
+ result += addedContents;
+ // Save the result to data buffer.
+ saveHTMLContentToBuffer(result, param);
+}
+
+// Serialize end tag of an specified element.
+void WebPageSerializerImpl::endTagToString(const Element* element,
+ SerializeDomParam* param)
+{
+ bool needSkip;
+ // Do pre action for end tag.
+ String result = preActionBeforeSerializeEndTag(element,
+ param,
+ &needSkip);
+ if (needSkip)
+ return;
+ // Write end tag when element has child/children.
+ if (element->hasChildNodes() || param->hasAddedContentsBeforeEnd) {
+ result += "</";
+ result += element->nodeName();
+ result += ">";
+ } else {
+ // Check whether we have to write end tag for empty element.
+ if (param->isHTMLDocument) {
+ result += ">";
+ const HTMLElement* htmlElement =
+ static_cast<const HTMLElement*>(element);
+ if (htmlElement->endTagRequirement() == TagStatusRequired) {
+ // We need to write end tag when it is required.
+ result += "</";
+ result += element->nodeName();
+ result += ">";
+ }
+ } else {
+ // For xml base document.
+ result += " />";
+ }
+ }
+ // Do post action for end tag.
+ result += postActionAfterSerializeEndTag(element, param);
+ // Save the result to data buffer.
+ saveHTMLContentToBuffer(result, param);
+}
+
+void WebPageSerializerImpl::buildContentForNode(const Node* node,
+ SerializeDomParam* param)
+{
+ switch (node->nodeType()) {
+ case Node::ELEMENT_NODE:
+ // Process open tag of element.
+ openTagToString(static_cast<const Element*>(node), param);
+ // Walk through the children nodes and process it.
+ for (const Node *child = node->firstChild(); child; child = child->nextSibling())
+ buildContentForNode(child, param);
+ // Process end tag of element.
+ endTagToString(static_cast<const Element*>(node), param);
+ break;
+ case Node::TEXT_NODE:
+ saveHTMLContentToBuffer(createMarkup(node), param);
+ break;
+ case Node::ATTRIBUTE_NODE:
+ case Node::DOCUMENT_NODE:
+ case Node::DOCUMENT_FRAGMENT_NODE:
+ // Should not exist.
+ ASSERT_NOT_REACHED();
+ break;
+ // Document type node can be in DOM?
+ case Node::DOCUMENT_TYPE_NODE:
+ param->hasDoctype = true;
+ default:
+ // For other type node, call default action.
+ saveHTMLContentToBuffer(createMarkup(node), param);
+ break;
+ }
+}
+
+WebPageSerializerImpl::WebPageSerializerImpl(WebFrame* frame,
+ bool recursiveSerialization,
+ WebPageSerializerClient* client,
+ const WebVector<WebURL>& links,
+ const WebVector<WebString>& localPaths,
+ const WebString& localDirectoryName)
+ : m_client(client)
+ , m_recursiveSerialization(recursiveSerialization)
+ , m_framesCollected(false)
+ , m_localDirectoryName(localDirectoryName)
+ , m_htmlEntities(false)
+ , m_xmlEntities(true)
+{
+ // Must specify available webframe.
+ ASSERT(frame);
+ m_specifiedWebFrameImpl = static_cast<WebFrameImpl*>(frame);
+ // Make sure we have non 0 client.
+ ASSERT(client);
+ // Build local resources map.
+ ASSERT(links.size() == localPaths.size());
+ for (size_t i = 0; i < links.size(); i++) {
+ KURL url = links[i];
+ ASSERT(!m_localLinks.contains(url.string()));
+ m_localLinks.set(url.string(), localPaths[i]);
+ }
+
+ ASSERT(!m_dataBuffer.length());
+}
+
+void WebPageSerializerImpl::collectTargetFrames()
+{
+ ASSERT(!m_framesCollected);
+ m_framesCollected = true;
+
+ // First, process main frame.
+ m_frames.append(m_specifiedWebFrameImpl);
+ // Return now if user only needs to serialize specified frame, not including
+ // all sub-frames.
+ if (!m_recursiveSerialization)
+ return;
+ // Collect all frames inside the specified frame.
+ for (int i = 0; i < static_cast<int>(m_frames.size()); ++i) {
+ WebFrameImpl* currentFrame = m_frames[i];
+ // Get current using document.
+ Document* currentDoc = currentFrame->frame()->document();
+ // Go through sub-frames.
+ RefPtr<HTMLAllCollection> all = currentDoc->all();
+ for (Node* node = all->firstItem(); node; node = all->nextItem()) {
+ if (!node->isHTMLElement())
+ continue;
+ Element* element = static_cast<Element*>(node);
+ WebFrameImpl* webFrame =
+ WebFrameImpl::fromFrameOwnerElement(element);
+ if (webFrame)
+ m_frames.append(webFrame);
+ }
+ }
+}
+
+bool WebPageSerializerImpl::serialize()
+{
+ // Collect target frames.
+ if (!m_framesCollected)
+ collectTargetFrames();
+ bool didSerialization = false;
+ // Get KURL for main frame.
+ KURL mainPageURL = m_specifiedWebFrameImpl->frame()->loader()->url();
+
+ // Go through all frames for serializing DOM for whole page, include
+ // sub-frames.
+ for (int i = 0; i < static_cast<int>(m_frames.size()); ++i) {
+ // Get current serializing frame.
+ WebFrameImpl* currentFrame = m_frames[i];
+ // Get current using document.
+ Document* currentDoc = currentFrame->frame()->document();
+ // Get current frame's URL.
+ const KURL& currentFrameURL = currentFrame->frame()->loader()->url();
+
+ // Check whether we have done this document.
+ if (m_localLinks.contains(currentFrameURL.string())) {
+ // A new document, we will serialize it.
+ didSerialization = true;
+ // Get target encoding for current document.
+ String encoding = currentFrame->frame()->loader()->encoding();
+ // Create the text encoding object with target encoding.
+ TextEncoding textEncoding(encoding);
+ // Construct serialize parameter for late processing document.
+ SerializeDomParam param(currentFrameURL,
+ encoding.length() ? textEncoding : UTF8Encoding(),
+ currentDoc,
+ currentFrameURL == mainPageURL ? m_localDirectoryName : "");
+
+ // Process current document.
+ Element* rootElement = currentDoc->documentElement();
+ if (rootElement)
+ buildContentForNode(rootElement, &param);
+
+ // Flush the remainder data and finish serializing current frame.
+ encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsFinished,
+ &param,
+ 1);
+ }
+ }
+
+ // We have done call frames, so we send message to embedder to tell it that
+ // frames are finished serializing.
+ ASSERT(!m_dataBuffer.length());
+ m_client->didSerializeDataForFrame(KURL(),
+ WebCString("", 0),
+ WebPageSerializerClient::AllFramesAreFinished);
+ return didSerialization;
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebPageSerializerImpl.h b/WebKit/chromium/src/WebPageSerializerImpl.h
new file mode 100644
index 0000000..8f6a99f
--- /dev/null
+++ b/WebKit/chromium/src/WebPageSerializerImpl.h
@@ -0,0 +1,199 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebPageSerializerImpl_h
+#define WebPageSerializerImpl_h
+
+#include "PlatformString.h"
+#include "StringBuilder.h"
+#include "StringHash.h"
+#include <wtf/HashMap.h>
+#include <wtf/Vector.h>
+
+#include "WebEntities.h"
+#include "WebPageSerializer.h"
+#include "WebPageSerializerClient.h"
+#include "WebString.h"
+#include "WebURL.h"
+
+namespace WebCore {
+class Document;
+class Element;
+class Node;
+class String;
+class TextEncoding;
+}
+
+namespace WebKit {
+class WebFrameImpl;
+
+// Get html data by serializing all frames of current page with lists
+// which contain all resource links that have local copy.
+// contain all saved auxiliary files included all sub frames and resources.
+// This function will find out all frames and serialize them to HTML data.
+// We have a data buffer to temporary saving generated html data. We will
+// sequentially call WebViewDelegate::SendSerializedHtmlData once the data
+// buffer is full. See comments of WebViewDelegate::SendSerializedHtmlData
+// for getting more information.
+class WebPageSerializerImpl {
+public:
+ // Do serialization action. Return false means no available frame has been
+ // serialized, otherwise return true.
+ bool serialize();
+
+ // The parameter specifies which frame need to be serialized.
+ // The parameter recursive_serialization specifies whether we need to
+ // serialize all sub frames of the specified frame or not.
+ // The parameter delegate specifies the pointer of interface
+ // DomSerializerDelegate provide sink interface which can receive the
+ // individual chunks of data to be saved.
+ // The parameter links contain original URLs of all saved links.
+ // The parameter local_paths contain corresponding local file paths of all
+ // saved links, which matched with vector:links one by one.
+ // The parameter local_directory_name is relative path of directory which
+ // contain all saved auxiliary files included all sub frames and resources.
+ WebPageSerializerImpl(WebFrame* frame,
+ bool recursive,
+ WebPageSerializerClient* client,
+ const WebVector<WebURL>& links,
+ const WebVector<WebString>& localPaths,
+ const WebString& localDirectoryName);
+
+private:
+ // Specified frame which need to be serialized;
+ WebFrameImpl* m_specifiedWebFrameImpl;
+ // Pointer of WebPageSerializerClient
+ WebPageSerializerClient* m_client;
+ // This hash map is used to map resource URL of original link to its local
+ // file path.
+ typedef HashMap<WebCore::String, WebCore::String> LinkLocalPathMap;
+ // local_links_ include all pair of local resource path and corresponding
+ // original link.
+ LinkLocalPathMap m_localLinks;
+ // Data buffer for saving result of serialized DOM data.
+ WebCore::StringBuilder m_dataBuffer;
+ // Passing true to recursive_serialization_ indicates we will serialize not
+ // only the specified frame but also all sub-frames in the specific frame.
+ // Otherwise we only serialize the specified frame excluded all sub-frames.
+ bool m_recursiveSerialization;
+ // Flag indicates whether we have collected all frames which need to be
+ // serialized or not;
+ bool m_framesCollected;
+ // Local directory name of all local resource files.
+ WebCore::String m_localDirectoryName;
+ // Vector for saving all frames which need to be serialized.
+ Vector<WebFrameImpl*> m_frames;
+
+ // Web entities conversion maps.
+ WebEntities m_htmlEntities;
+ WebEntities m_xmlEntities;
+
+ struct SerializeDomParam {
+ // Frame URL of current processing document presented by GURL
+ const WebCore::KURL& currentFrameURL;
+ // Current using text encoding object.
+ const WebCore::TextEncoding& textEncoding;
+
+ // Document object of current frame.
+ WebCore::Document* doc;
+ // Local directory name of all local resource files.
+ const WebCore::String& directoryName;
+
+ // Flag indicates current doc is html document or not. It's a cache value
+ // of Document.isHTMLDocument().
+ bool isHTMLDocument;
+ // Flag which indicate whether we have met document type declaration.
+ bool hasDoctype;
+ // Flag which indicate whether will process meta issue.
+ bool hasCheckedMeta;
+ // This meta element need to be skipped when serializing DOM.
+ const WebCore::Element* skipMetaElement;
+ // Flag indicates we are in script or style tag.
+ bool isInScriptOrStyleTag;
+ // Flag indicates whether we have written xml document declaration.
+ // It is only used in xml document
+ bool hasDocDeclaration;
+ // Flag indicates whether we have added additional contents before end tag.
+ // This flag will be re-assigned in each call of function
+ // PostActionAfterSerializeOpenTag and it could be changed in function
+ // PreActionBeforeSerializeEndTag if the function adds new contents into
+ // serialization stream.
+ bool hasAddedContentsBeforeEnd;
+
+ // Constructor.
+ SerializeDomParam(const WebCore::KURL& currentFrameURL,
+ const WebCore::TextEncoding& textEncoding,
+ WebCore::Document* doc,
+ const WebCore::String& directoryName);
+ };
+
+ // Collect all target frames which need to be serialized.
+ void collectTargetFrames();
+ // Before we begin serializing open tag of a element, we give the target
+ // element a chance to do some work prior to add some additional data.
+ WebCore::String preActionBeforeSerializeOpenTag(const WebCore::Element* element,
+ SerializeDomParam* param,
+ bool* needSkip);
+ // After we finish serializing open tag of a element, we give the target
+ // element a chance to do some post work to add some additional data.
+ WebCore::String postActionAfterSerializeOpenTag(const WebCore::Element* element,
+ SerializeDomParam* param);
+ // Before we begin serializing end tag of a element, we give the target
+ // element a chance to do some work prior to add some additional data.
+ WebCore::String preActionBeforeSerializeEndTag(const WebCore::Element* element,
+ SerializeDomParam* param,
+ bool* needSkip);
+ // After we finish serializing end tag of a element, we give the target
+ // element a chance to do some post work to add some additional data.
+ WebCore::String postActionAfterSerializeEndTag(const WebCore::Element* element,
+ SerializeDomParam* param);
+ // Save generated html content to data buffer.
+ void saveHTMLContentToBuffer(const WebCore::String& content,
+ SerializeDomParam* param);
+ // Flushes the content buffer by encoding and sending the content to the
+ // WebPageSerializerClient. Content is not flushed if the buffer is not full
+ // unless force is 1.
+ void encodeAndFlushBuffer(WebPageSerializerClient::PageSerializationStatus status,
+ SerializeDomParam* param,
+ bool force);
+ // Serialize open tag of an specified element.
+ void openTagToString(const WebCore::Element* element,
+ SerializeDomParam* param);
+ // Serialize end tag of an specified element.
+ void endTagToString(const WebCore::Element* element,
+ SerializeDomParam* param);
+ // Build content for a specified node
+ void buildContentForNode(const WebCore::Node* node,
+ SerializeDomParam* param);
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/WebPluginContainerImpl.cpp b/WebKit/chromium/src/WebPluginContainerImpl.cpp
index 43f3cef..86cac26 100644
--- a/WebKit/chromium/src/WebPluginContainerImpl.cpp
+++ b/WebKit/chromium/src/WebPluginContainerImpl.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "WebPluginContainerImpl.h"
+#include "Chrome.h"
#include "ChromeClientImpl.h"
#include "WebCursorInfo.h"
#include "WebDataSourceImpl.h"
@@ -353,7 +354,7 @@ void WebPluginContainerImpl::handleMouseEvent(MouseEvent* event)
WebCursorInfo cursorInfo;
bool handled = m_webPlugin->handleInputEvent(webEvent, cursorInfo);
-#if !PLATFORM(DARWIN)
+#if !OS(DARWIN)
// TODO(pkasting): http://b/1119691 This conditional seems exactly
// backwards, but if I reverse it, giving focus to a transparent
// (windowless) plugin fails.
@@ -389,7 +390,7 @@ void WebPluginContainerImpl::handleKeyboardEvent(KeyboardEvent* event)
WebCursorInfo cursor_info;
bool handled = m_webPlugin->handleInputEvent(webEvent, cursor_info);
-#if !PLATFORM(DARWIN)
+#if !OS(DARWIN)
// TODO(pkasting): http://b/1119691 See above.
handled = !handled;
#endif
diff --git a/WebKit/chromium/src/WebRuntimeFeatures.cpp b/WebKit/chromium/src/WebRuntimeFeatures.cpp
index b630a09..0ef8b9b 100644
--- a/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "WebRuntimeFeatures.h"
+#include "Database.h"
#include "RuntimeEnabledFeatures.h"
#include "WebMediaPlayerClientImpl.h"
#include "WebSocket.h"
@@ -42,14 +43,14 @@ namespace WebKit {
void WebRuntimeFeatures::enableDatabase(bool enable)
{
#if ENABLE(DATABASE)
- RuntimeEnabledFeatures::setDatabaseEnabled(enable);
+ Database::setIsAvailable(enable);
#endif
}
bool WebRuntimeFeatures::isDatabaseEnabled()
{
#if ENABLE(DATABASE)
- return RuntimeEnabledFeatures::databaseEnabled();
+ return Database::isAvailable();
#else
return false;
#endif
@@ -151,4 +152,36 @@ bool WebRuntimeFeatures::isApplicationCacheEnabled()
#endif
}
+void WebRuntimeFeatures::enableGeolocation(bool enable)
+{
+#if ENABLE(GEOLOCATION)
+ RuntimeEnabledFeatures::setGeolocationEnabled(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isGeolocationEnabled()
+{
+#if ENABLE(GEOLOCATION)
+ return RuntimeEnabledFeatures::geolocationEnabled();
+#else
+ return false;
+#endif
+}
+
+void WebRuntimeFeatures::enableIndexedDatabase(bool enable)
+{
+#if ENABLE(INDEXED_DATABASE)
+ RuntimeEnabledFeatures::setIndexedDatabaseEnabled(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isIndexedDatabaseEnabled()
+{
+#if ENABLE(INDEXED_DATABASE)
+ return RuntimeEnabledFeatures::indexedDatabaseEnabled();
+#else
+ return false;
+#endif
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebSecurityOrigin.cpp b/WebKit/chromium/src/WebSecurityOrigin.cpp
index 3cf7364..87916ca 100644
--- a/WebKit/chromium/src/WebSecurityOrigin.cpp
+++ b/WebKit/chromium/src/WebSecurityOrigin.cpp
@@ -42,6 +42,11 @@ namespace WebKit {
class WebSecurityOriginPrivate : public SecurityOrigin {
};
+WebSecurityOrigin* WebSecurityOrigin::createFromDatabaseIdentifier(const WebString& databaseIdentifier)
+{
+ return new WebSecurityOrigin(SecurityOrigin::createFromDatabaseIdentifier(databaseIdentifier));
+}
+
void WebSecurityOrigin::reset()
{
assign(0);
diff --git a/WebKit/chromium/src/WebSecurityPolicy.cpp b/WebKit/chromium/src/WebSecurityPolicy.cpp
index c66c805..48b445c 100644
--- a/WebKit/chromium/src/WebSecurityPolicy.cpp
+++ b/WebKit/chromium/src/WebSecurityPolicy.cpp
@@ -66,4 +66,9 @@ void WebSecurityPolicy::resetOriginAccessWhiteLists()
SecurityOrigin::resetOriginAccessWhiteLists();
}
+bool WebSecurityPolicy::shouldHideReferrer(const WebURL& url, const WebString& referrer)
+{
+ return SecurityOrigin::shouldHideReferrer(url, referrer);
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebSettingsImpl.cpp b/WebKit/chromium/src/WebSettingsImpl.cpp
index e019653..5cfbd4f 100644
--- a/WebKit/chromium/src/WebSettingsImpl.cpp
+++ b/WebKit/chromium/src/WebSettingsImpl.cpp
@@ -130,6 +130,11 @@ void WebSettingsImpl::setLoadsImagesAutomatically(bool loadsImagesAutomatically)
m_settings->setLoadsImagesAutomatically(loadsImagesAutomatically);
}
+void WebSettingsImpl::setImagesEnabled(bool enabled)
+{
+ m_settings->setImagesEnabled(enabled);
+}
+
void WebSettingsImpl::setPluginsEnabled(bool enabled)
{
m_settings->setPluginsEnabled(enabled);
diff --git a/WebKit/chromium/src/WebSettingsImpl.h b/WebKit/chromium/src/WebSettingsImpl.h
index 9c0f9f4..3b69fe6 100644
--- a/WebKit/chromium/src/WebSettingsImpl.h
+++ b/WebKit/chromium/src/WebSettingsImpl.h
@@ -60,6 +60,7 @@ public:
virtual void setWebSecurityEnabled(bool);
virtual void setJavaScriptCanOpenWindowsAutomatically(bool);
virtual void setLoadsImagesAutomatically(bool);
+ virtual void setImagesEnabled(bool);
virtual void setPluginsEnabled(bool);
virtual void setDOMPasteAllowed(bool);
virtual void setDeveloperExtrasEnabled(bool);
diff --git a/WebKit/chromium/src/WebStorageAreaImpl.cpp b/WebKit/chromium/src/WebStorageAreaImpl.cpp
index f24bee3..92a923a 100644
--- a/WebKit/chromium/src/WebStorageAreaImpl.cpp
+++ b/WebKit/chromium/src/WebStorageAreaImpl.cpp
@@ -66,12 +66,12 @@ WebString WebStorageAreaImpl::getItem(const WebString& key)
return m_storageArea->getItem(key);
}
-void WebStorageAreaImpl::setItem(const WebString& key, const WebString& value, const WebURL& url, bool& quotaException)
+void WebStorageAreaImpl::setItem(const WebString& key, const WebString& value, const WebURL& url, bool& quotaException, WebString& oldValue)
{
int exceptionCode = 0;
ScopedStorageEventURL scope(url);
- m_storageArea->setItem(key, value, exceptionCode, 0);
+ oldValue = m_storageArea->setItem(key, value, exceptionCode, 0);
if (exceptionCode) {
ASSERT(exceptionCode == WebCore::QUOTA_EXCEEDED_ERR);
@@ -80,16 +80,16 @@ void WebStorageAreaImpl::setItem(const WebString& key, const WebString& value, c
quotaException = false;
}
-void WebStorageAreaImpl::removeItem(const WebString& key, const WebURL& url)
+void WebStorageAreaImpl::removeItem(const WebString& key, const WebURL& url, WebString& oldValue)
{
ScopedStorageEventURL scope(url);
- m_storageArea->removeItem(key, 0);
+ oldValue = m_storageArea->removeItem(key, 0);
}
-void WebStorageAreaImpl::clear(const WebURL& url)
+void WebStorageAreaImpl::clear(const WebURL& url, bool& somethingCleared)
{
ScopedStorageEventURL scope(url);
- m_storageArea->clear(0);
+ somethingCleared = m_storageArea->clear(0);
}
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebStorageAreaImpl.h b/WebKit/chromium/src/WebStorageAreaImpl.h
index e1f74e0..7e90531 100644
--- a/WebKit/chromium/src/WebStorageAreaImpl.h
+++ b/WebKit/chromium/src/WebStorageAreaImpl.h
@@ -45,9 +45,9 @@ public:
virtual unsigned length();
virtual WebString key(unsigned index);
virtual WebString getItem(const WebString& key);
- virtual void setItem(const WebString& key, const WebString& value, const WebURL& url, bool& quotaException);
- virtual void removeItem(const WebString& key, const WebURL& url);
- virtual void clear(const WebURL& url);
+ virtual void setItem(const WebString& key, const WebString& value, const WebURL& url, bool& quotaException, WebString& oldValue);
+ virtual void removeItem(const WebString& key, const WebURL& url, WebString& oldValue);
+ virtual void clear(const WebURL& url, bool& somethingCleared);
// For storage events in single-process mode and test shell.
static const WebURL* currentStorageEventURL() { return storageEventURL; }
diff --git a/WebKit/chromium/src/WebString.cpp b/WebKit/chromium/src/WebString.cpp
index f45e05f..36d5f86 100644
--- a/WebKit/chromium/src/WebString.cpp
+++ b/WebKit/chromium/src/WebString.cpp
@@ -86,6 +86,11 @@ WebString WebString::fromUTF8(const char* data)
return WebCore::String::fromUTF8(data);
}
+bool WebString::equals(const WebString& s) const
+{
+ return equal(m_private, s.m_private);
+}
+
WebString::WebString(const WebCore::String& s)
: m_private(static_cast<WebStringPrivate*>(s.impl()))
{
diff --git a/WebKit/chromium/src/WebURLResponse.cpp b/WebKit/chromium/src/WebURLResponse.cpp
index 49f07f9..95e0be2 100644
--- a/WebKit/chromium/src/WebURLResponse.cpp
+++ b/WebKit/chromium/src/WebURLResponse.cpp
@@ -255,6 +255,16 @@ const ResourceResponse& WebURLResponse::toResourceResponse() const
return *m_private->m_resourceResponse;
}
+bool WebURLResponse::wasFetchedViaSPDY() const
+{
+ return m_private->m_resourceResponse->wasFetchedViaSPDY();
+}
+
+void WebURLResponse::setWasFetchedViaSPDY(bool value)
+{
+ m_private->m_resourceResponse->setWasFetchedViaSPDY(value);
+}
+
void WebURLResponse::assign(WebURLResponsePrivate* p)
{
// Subclasses may call this directly so a self-assignment check is needed
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 030c4bd..97825e9 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -33,6 +33,7 @@
#include "AutocompletePopupMenuClient.h"
#include "AXObjectCache.h"
+#include "Chrome.h"
#include "ContextMenu.h"
#include "ContextMenuController.h"
#include "ContextMenuItem.h"
@@ -65,6 +66,7 @@
#include "NodeRenderStyle.h"
#include "Page.h"
#include "PageGroup.h"
+#include "PageGroupLoadDeferrer.h"
#include "Pasteboard.h"
#include "PlatformContextSkia.h"
#include "PlatformKeyboardEvent.h"
@@ -96,11 +98,11 @@
#include "WebVector.h"
#include "WebViewClient.h"
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include "KeyboardCodesWin.h"
#include "RenderThemeChromiumWin.h"
#else
-#if PLATFORM(LINUX)
+#if OS(LINUX)
#include "RenderThemeChromiumLinux.h"
#endif
#include "KeyboardCodesPosix.h"
@@ -129,6 +131,10 @@ static const double maxTextSizeMultiplier = 3.0;
// one page group.
const char* pageGroupName = "default";
+// Used to defer all page activity in cases where the embedder wishes to run
+// a nested event loop.
+static PageGroupLoadDeferrer* pageGroupLoadDeferrer;
+
// Ensure that the WebDragOperation enum values stay in sync with the original
// DragOperation constants.
#define COMPILE_ASSERT_MATCHING_ENUM(coreName) \
@@ -174,6 +180,28 @@ void WebView::resetVisitedLinkState()
Page::allVisitedStateChanged(PageGroup::pageGroup(pageGroupName));
}
+void WebView::willEnterModalLoop()
+{
+ // It is not valid to nest more than once.
+ ASSERT(!pageGroupLoadDeferrer);
+
+ PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName);
+ ASSERT(pageGroup);
+ ASSERT(!pageGroup->pages().isEmpty());
+
+ // Pick any page in the page group since we are deferring all pages.
+ pageGroupLoadDeferrer = new PageGroupLoadDeferrer(*pageGroup->pages().begin(), true);
+}
+
+void WebView::didExitModalLoop()
+{
+ // The embedder must have called willEnterNestedEventLoop.
+ ASSERT(pageGroupLoadDeferrer);
+
+ delete pageGroupLoadDeferrer;
+ pageGroupLoadDeferrer = 0;
+}
+
void WebViewImpl::initializeMainFrame(WebFrameClient* frameClient)
{
// NOTE: The WebFrameImpl takes a reference to itself within InitMainFrame
@@ -327,12 +355,12 @@ void WebViewImpl::mouseDown(const WebMouseEvent& event)
// Dispatch the contextmenu event regardless of if the click was swallowed.
// On Windows, we handle it on mouse up, not down.
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
if (event.button == WebMouseEvent::ButtonRight
|| (event.button == WebMouseEvent::ButtonLeft
&& event.modifiers & WebMouseEvent::ControlKey))
mouseContextMenu(event);
-#elif PLATFORM(LINUX)
+#elif OS(LINUX)
if (event.button == WebMouseEvent::ButtonRight)
mouseContextMenu(event);
#endif
@@ -355,7 +383,7 @@ void WebViewImpl::mouseContextMenu(const WebMouseEvent& event)
else
targetFrame = m_page->focusController()->focusedOrMainFrame();
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
targetFrame->view()->setCursor(pointerCursor());
#endif
@@ -371,7 +399,7 @@ void WebViewImpl::mouseUp(const WebMouseEvent& event)
if (!mainFrameImpl() || !mainFrameImpl()->frameView())
return;
-#if PLATFORM(LINUX)
+#if OS(LINUX)
// If the event was a middle click, attempt to copy text into the focused
// frame. We execute this before we let the page have a go at the event
// because the page may change what is focused during in its event handler.
@@ -390,14 +418,14 @@ void WebViewImpl::mouseUp(const WebMouseEvent& event)
// handleMouseReleaseEvent() earlier in this function
if (event.button == WebMouseEvent::ButtonMiddle) {
Frame* focused = focusedWebCoreFrame();
+ FrameView* view = m_page->mainFrame()->view();
IntPoint clickPoint(m_lastMouseDownPoint.x, m_lastMouseDownPoint.y);
- clickPoint = m_page->mainFrame()->view()->windowToContents(clickPoint);
- HitTestResult hitTestResult =
- focused->eventHandler()->hitTestResultAtPoint(clickPoint, false, false,
- ShouldHitTestScrollbars);
+ IntPoint contentPoint = view->windowToContents(clickPoint);
+ HitTestResult hitTestResult = focused->eventHandler()->hitTestResultAtPoint(contentPoint, false, false, ShouldHitTestScrollbars);
// We don't want to send a paste when middle clicking a scroll bar or a
- // link (which will navigate later in the code).
- if (!hitTestResult.scrollbar() && !hitTestResult.isLiveLink() && focused) {
+ // link (which will navigate later in the code). The main scrollbars
+ // have to be handled separately.
+ if (!hitTestResult.scrollbar() && !hitTestResult.isLiveLink() && focused && !view->scrollbarAtPoint(clickPoint)) {
Editor* editor = focused->editor();
Pasteboard* pasteboard = Pasteboard::generalPasteboard();
bool oldSelectionMode = pasteboard->isSelectionMode();
@@ -412,7 +440,7 @@ void WebViewImpl::mouseUp(const WebMouseEvent& event)
mainFrameImpl()->frame()->eventHandler()->handleMouseReleaseEvent(
PlatformMouseEventBuilder(mainFrameImpl()->frameView(), event));
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// Dispatch the contextmenu event regardless of if the click was swallowed.
// On Mac/Linux, we handle it on mouse down, not up.
if (event.button == WebMouseEvent::ButtonRight)
@@ -452,9 +480,17 @@ bool WebViewImpl::keyEvent(const WebKeyboardEvent& event)
if (!handler)
return keyEventDefault(event);
-#if PLATFORM(WIN_OS) || PLATFORM(LINUX)
- if ((!event.modifiers && (event.windowsKeyCode == VKEY_APPS))
- || ((event.modifiers == WebInputEvent::ShiftKey) && (event.windowsKeyCode == VKEY_F10))) {
+#if OS(WINDOWS) || OS(LINUX)
+ const WebInputEvent::Type contextMenuTriggeringEventType =
+#if OS(WINDOWS)
+ WebInputEvent::KeyUp;
+#elif OS(LINUX)
+ WebInputEvent::RawKeyDown;
+#endif
+
+ if (((!event.modifiers && (event.windowsKeyCode == VKEY_APPS))
+ || ((event.modifiers == WebInputEvent::ShiftKey) && (event.windowsKeyCode == VKEY_F10)))
+ && event.type == contextMenuTriggeringEventType) {
sendContextMenuEvent(event);
return true;
}
@@ -574,7 +610,7 @@ bool WebViewImpl::charEvent(const WebKeyboardEvent& event)
//
// This function is an ugly copy/paste and should be cleaned up when the
// WebKitWin version is cleaned: https://bugs.webkit.org/show_bug.cgi?id=20438
-#if PLATFORM(WIN_OS) || PLATFORM(LINUX)
+#if OS(WINDOWS) || OS(LINUX)
// FIXME: implement on Mac
bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event)
{
@@ -585,22 +621,19 @@ bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event)
return false;
IntPoint coords(-1, -1);
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
int rightAligned = ::GetSystemMetrics(SM_MENUDROPALIGNMENT);
#else
int rightAligned = 0;
#endif
IntPoint location;
- // The context menu event was generated from the keyboard, so show the
- // context menu by the current selection.
- Position start = mainFrameImpl->selection()->selection().start();
- Position end = mainFrameImpl->selection()->selection().end();
Frame* focusedFrame = page()->focusController()->focusedOrMainFrame();
Node* focusedNode = focusedFrame->document()->focusedNode();
+ Position start = mainFrameImpl->selection()->selection().start();
- if (start.node() && end.node()) {
+ if (focusedFrame->editor() && focusedFrame->editor()->canEdit() && start.node()) {
RenderObject* renderer = start.node()->renderer();
if (!renderer)
return false;
@@ -1641,13 +1674,26 @@ bool WebViewImpl::isActive() const
void WebViewImpl::setScrollbarColors(unsigned inactiveColor,
unsigned activeColor,
unsigned trackColor) {
-#if PLATFORM(LINUX)
+#if OS(LINUX)
RenderThemeChromiumLinux::setScrollbarColors(inactiveColor,
activeColor,
trackColor);
#endif
}
+void WebViewImpl::setSelectionColors(unsigned activeBackgroundColor,
+ unsigned activeForegroundColor,
+ unsigned inactiveBackgroundColor,
+ unsigned inactiveForegroundColor) {
+#if OS(LINUX)
+ RenderThemeChromiumLinux::setSelectionColors(activeBackgroundColor,
+ activeForegroundColor,
+ inactiveBackgroundColor,
+ inactiveForegroundColor);
+ theme()->platformColorsDidChange();
+#endif
+}
+
void WebViewImpl::didCommitLoad(bool* isNewNavigation)
{
if (isNewNavigation)
@@ -1666,9 +1712,9 @@ bool WebViewImpl::navigationPolicyFromMouseEvent(unsigned short button,
bool alt, bool meta,
WebNavigationPolicy* policy)
{
-#if PLATFORM(WIN_OS) || PLATFORM(LINUX) || PLATFORM(FREEBSD)
+#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD)
const bool newTabModifier = (button == 1) || ctrl;
-#elif PLATFORM(DARWIN)
+#elif OS(DARWIN)
const bool newTabModifier = (button == 1) || meta;
#endif
if (!newTabModifier && !shift && !alt)
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index dd5191e..ed5cc5f 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -157,6 +157,10 @@ public:
virtual void setScrollbarColors(unsigned inactiveColor,
unsigned activeColor,
unsigned trackColor);
+ virtual void setSelectionColors(unsigned activeBackgroundColor,
+ unsigned activeForegroundColor,
+ unsigned inactiveBackgroundColor,
+ unsigned inactiveForegroundColor);
virtual void performCustomContextMenuAction(unsigned action);
// WebViewImpl
diff --git a/WebKit/chromium/src/WebWorkerBase.cpp b/WebKit/chromium/src/WebWorkerBase.cpp
index 85a263b..7fd3749 100644
--- a/WebKit/chromium/src/WebWorkerBase.cpp
+++ b/WebKit/chromium/src/WebWorkerBase.cpp
@@ -132,8 +132,7 @@ void WebWorkerBase::initializeLoader(const WebURL& url)
int len = static_cast<int>(content.length());
RefPtr<SharedBuffer> buf(SharedBuffer::create(content.data(), len));
SubstituteData substData(buf, String("text/html"), String("UTF-8"), KURL());
- ResourceRequest request(url, CString());
- webFrame->frame()->loader()->load(request, substData, false);
+ webFrame->frame()->loader()->load(ResourceRequest(url), substData, false);
// This document will be used as 'loading context' for the worker.
m_loadingDocument = webFrame->frame()->document();
@@ -158,7 +157,7 @@ void WebWorkerBase::postMessageToWorkerObject(PassRefPtr<SerializedScriptValue>
PassOwnPtr<MessagePortChannelArray> channels)
{
dispatchTaskToMainThread(createCallbackTask(&postMessageTask, this,
- message->toString(), channels));
+ message->toWireString(), channels));
}
void WebWorkerBase::postMessageTask(ScriptExecutionContext* context,
diff --git a/WebKit/chromium/src/WebWorkerClientImpl.cpp b/WebKit/chromium/src/WebWorkerClientImpl.cpp
index 6be03a7..598a078 100644
--- a/WebKit/chromium/src/WebWorkerClientImpl.cpp
+++ b/WebKit/chromium/src/WebWorkerClientImpl.cpp
@@ -173,7 +173,7 @@ void WebWorkerClientImpl::postMessageToWorkerContext(
if (!isMainThread()) {
WebWorkerBase::dispatchTaskToMainThread(createCallbackTask(&postMessageToWorkerContextTask,
this,
- message->toString(),
+ message->toWireString(),
channels));
return;
}
@@ -184,7 +184,7 @@ void WebWorkerClientImpl::postMessageToWorkerContext(
webchannel->setClient(0);
webChannels[i] = webchannel;
}
- m_webWorker->postMessageToWorkerContext(message->toString(), webChannels);
+ m_webWorker->postMessageToWorkerContext(message->toWireString(), webChannels);
}
bool WebWorkerClientImpl::hasPendingActivity() const
@@ -356,7 +356,7 @@ void WebWorkerClientImpl::postMessageToWorkerObjectTask(
OwnPtr<MessagePortArray> ports =
MessagePort::entanglePorts(*context, channels.release());
RefPtr<SerializedScriptValue> serializedMessage =
- SerializedScriptValue::create(message);
+ SerializedScriptValue::createFromWire(message);
thisPtr->m_worker->dispatchEvent(MessageEvent::create(ports.release(),
serializedMessage.release()));
}
diff --git a/WebKit/chromium/src/WebWorkerImpl.cpp b/WebKit/chromium/src/WebWorkerImpl.cpp
index 744be30..5b5e053 100644
--- a/WebKit/chromium/src/WebWorkerImpl.cpp
+++ b/WebKit/chromium/src/WebWorkerImpl.cpp
@@ -88,7 +88,7 @@ void WebWorkerImpl::postMessageToWorkerContextTask(WebCore::ScriptExecutionConte
OwnPtr<MessagePortArray> ports =
MessagePort::entanglePorts(*context, channels.release());
RefPtr<SerializedScriptValue> serializedMessage =
- SerializedScriptValue::create(message);
+ SerializedScriptValue::createFromWire(message);
workerContext->dispatchEvent(MessageEvent::create(
ports.release(), serializedMessage.release()));
thisPtr->confirmMessageFromWorkerObject(workerContext->hasPendingActivity());
diff --git a/WebKit/chromium/src/mac/WebInputEventFactory.mm b/WebKit/chromium/src/mac/WebInputEventFactory.mm
index d618228..46b0afe 100644
--- a/WebKit/chromium/src/mac/WebInputEventFactory.mm
+++ b/WebKit/chromium/src/mac/WebInputEventFactory.mm
@@ -92,6 +92,9 @@ static bool isKeypadEvent(NSEvent* event)
return false;
}
+ if ([event modifierFlags] & NSNumericPadKeyMask)
+ return true;
+
switch ([event keyCode]) {
case 71: // Clear
case 81: // =
diff --git a/WebKit/chromium/tests/KURLTest.cpp b/WebKit/chromium/tests/KURLTest.cpp
new file mode 100644
index 0000000..b316683
--- /dev/null
+++ b/WebKit/chromium/tests/KURLTest.cpp
@@ -0,0 +1,611 @@
+/*
+ * 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.
+ */
+
+// Basic tests that verify our KURL's interface behaves the same as the
+// original KURL's.
+
+#include "config.h"
+
+#include <gtest/gtest.h>
+
+#include "KURL.h"
+
+namespace {
+
+// Output stream operator so gTest's macros work with WebCore strings.
+std::ostream& operator<<(std::ostream& out, const WebCore::String& str)
+{
+ return str.isEmpty() ? out : out << str.utf8().data();
+}
+
+struct ComponentCase {
+ const char* url;
+ const char* protocol;
+ const char* host;
+ const int port;
+ const char* user;
+ const char* pass;
+ const char* path;
+ const char* lastPath;
+ const char* query;
+ const char* ref;
+};
+
+// Test the cases where we should be the same as WebKit's old KURL.
+TEST(KURLTest, SameGetters)
+{
+ struct GetterCase {
+ const char* url;
+ const char* protocol;
+ const char* host;
+ int port;
+ const char* user;
+ const char* pass;
+ const char* lastPathComponent;
+ const char* query;
+ const char* ref;
+ bool hasRef;
+ } cases[] = {
+ {"http://www.google.com/foo/blah?bar=baz#ref", "http", "www.google.com", 0, "", 0, "blah", "bar=baz", "ref", true},
+ {"http://foo.com:1234/foo/bar/", "http", "foo.com", 1234, "", 0, "bar", 0, 0, false},
+ {"http://www.google.com?#", "http", "www.google.com", 0, "", 0, 0, "", "", true},
+ {"https://me:pass@google.com:23#foo", "https", "google.com", 23, "me", "pass", 0, 0, "foo", true},
+ {"javascript:hello!//world", "javascript", "", 0, "", 0, "world", 0, 0, false},
+ };
+
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); i++) {
+ // UTF-8
+ WebCore::KURL kurl(WebCore::ParsedURLString, cases[i].url);
+
+ EXPECT_EQ(cases[i].protocol, kurl.protocol());
+ EXPECT_EQ(cases[i].host, kurl.host());
+ EXPECT_EQ(cases[i].port, kurl.port());
+ EXPECT_EQ(cases[i].user, kurl.user());
+ EXPECT_EQ(cases[i].pass, kurl.pass());
+ EXPECT_EQ(cases[i].lastPathComponent, kurl.lastPathComponent());
+ EXPECT_EQ(cases[i].query, kurl.query());
+ EXPECT_EQ(cases[i].ref, kurl.fragmentIdentifier());
+ EXPECT_EQ(cases[i].hasRef, kurl.hasFragmentIdentifier());
+
+ // UTF-16
+ WebCore::String utf16(cases[i].url);
+ kurl = WebCore::KURL(WebCore::ParsedURLString, utf16);
+
+ EXPECT_EQ(cases[i].protocol, kurl.protocol());
+ EXPECT_EQ(cases[i].host, kurl.host());
+ EXPECT_EQ(cases[i].port, kurl.port());
+ EXPECT_EQ(cases[i].user, kurl.user());
+ EXPECT_EQ(cases[i].pass, kurl.pass());
+ EXPECT_EQ(cases[i].lastPathComponent, kurl.lastPathComponent());
+ EXPECT_EQ(cases[i].query, kurl.query());
+ EXPECT_EQ(cases[i].ref, kurl.fragmentIdentifier());
+ EXPECT_EQ(cases[i].hasRef, kurl.hasFragmentIdentifier());
+ }
+}
+
+// Test a few cases where we're different just to make sure we give reasonable
+// output.
+TEST(KURLTest, DifferentGetters)
+{
+ ComponentCase cases[] = {
+ // url protocol host port user pass path lastPath query ref
+
+ // Old WebKit allows references and queries in what we call "path" URLs
+ // like javascript, so the path here will only consist of "hello!".
+ {"javascript:hello!?#/\\world", "javascript", "", 0, "", 0, "hello!?#/\\world", "world", 0, 0},
+
+ // Old WebKit doesn't handle "parameters" in paths, so will
+ // disagree with us about where the path is for this URL.
+ {"http://a.com/hello;world", "http", "a.com", 0, "", 0, "/hello;world", "hello", 0, 0},
+
+ // WebKit doesn't like UTF-8 or UTF-16 input.
+ {"http://\xe4\xbd\xa0\xe5\xa5\xbd\xe4\xbd\xa0\xe5\xa5\xbd/", "http", "xn--6qqa088eba", 0, "", 0, "/", 0, 0, 0},
+
+ // WebKit %-escapes non-ASCII characters in reference, but we don't.
+ {"http://www.google.com/foo/blah?bar=baz#\xce\xb1\xce\xb2", "http", "www.google.com", 0, "", 0, "/foo/blah/", "blah", "bar=baz", "\xce\xb1\xce\xb2"},
+ };
+
+ for (size_t i = 0; i < arraysize(cases); i++) {
+ WebCore::KURL kurl(WebCore::ParsedURLString, cases[i].url);
+
+ EXPECT_EQ(cases[i].protocol, kurl.protocol());
+ EXPECT_EQ(cases[i].host, kurl.host());
+ EXPECT_EQ(cases[i].port, kurl.port());
+ EXPECT_EQ(cases[i].user, kurl.user());
+ EXPECT_EQ(cases[i].pass, kurl.pass());
+ EXPECT_EQ(cases[i].lastPath, kurl.lastPathComponent());
+ EXPECT_EQ(cases[i].query, kurl.query());
+ // Want to compare UCS-16 refs (or to null).
+ if (cases[i].ref)
+ EXPECT_EQ(WebCore::String::fromUTF8(cases[i].ref), kurl.fragmentIdentifier());
+ else
+ EXPECT_TRUE(kurl.fragmentIdentifier().isNull());
+ }
+}
+
+// Ensures that both ASCII and UTF-8 canonical URLs are handled properly and we
+// get the correct string object out.
+TEST(KURLTest, UTF8)
+{
+ const char asciiURL[] = "http://foo/bar#baz";
+ WebCore::KURL asciiKURL(WebCore::ParsedURLString, asciiURL);
+ EXPECT_TRUE(asciiKURL.string() == WebCore::String(asciiURL));
+
+ // When the result is ASCII, we should get an ASCII String. Some
+ // code depends on being able to compare the result of the .string()
+ // getter with another String, and the isASCIIness of the two
+ // strings must match for these functions (like equalIgnoringCase).
+ EXPECT_TRUE(WebCore::equalIgnoringCase(asciiKURL, WebCore::String(asciiURL)));
+
+ // Reproduce code path in FrameLoader.cpp -- equalIgnoringCase implicitly
+ // expects gkurl.protocol() to have been created as ascii.
+ WebCore::KURL mailto(WebCore::ParsedURLString, "mailto:foo@foo.com");
+ EXPECT_TRUE(WebCore::equalIgnoringCase(mailto.protocol(), "mailto"));
+
+ const char utf8URL[] = "http://foo/bar#\xe4\xbd\xa0\xe5\xa5\xbd";
+ WebCore::KURL utf8KURL(WebCore::ParsedURLString, utf8URL);
+
+ EXPECT_TRUE(utf8KURL.string() == WebCore::String::fromUTF8(utf8URL));
+}
+
+TEST(KURLTest, Setters)
+{
+ // Replace the starting URL with the given components one at a time and
+ // verify that we're always the same as the old KURL.
+ //
+ // Note that old KURL won't canonicalize the default port away, so we
+ // can't set setting the http port to "80" (or even "0").
+ //
+ // We also can't test clearing the query.
+ //
+ // The format is every other row is a test, and the row that follows it is the
+ // expected result.
+ struct ExpectedComponentCase {
+ const char* url;
+ const char* protocol;
+ const char* host;
+ const int port;
+ const char* user;
+ const char* pass;
+ const char* path;
+ const char* query;
+ const char* ref;
+
+ // The full expected URL with the given "set" applied.
+ const char* expectedProtocol;
+ const char* expectedHost;
+ const char* expectedPort;
+ const char* expectedUser;
+ const char* expectedPass;
+ const char* expectedPath;
+ const char* expectedQuery;
+ const char* expectedRef;
+ } cases[] = {
+ // url protocol host port user pass path query ref
+ {"http://www.google.com/", "https", "news.google.com", 8888, "me", "pass", "/foo", "?q=asdf", "heehee",
+ "https://www.google.com/",
+ "https://news.google.com/",
+ "https://news.google.com:8888/",
+ "https://me@news.google.com:8888/",
+ "https://me:pass@news.google.com:8888/",
+ "https://me:pass@news.google.com:8888/foo",
+ "https://me:pass@news.google.com:8888/foo?q=asdf",
+ "https://me:pass@news.google.com:8888/foo?q=asdf#heehee"},
+
+ {"https://me:pass@google.com:88/a?f#b", "http", "goo.com", 92, "", "", "/", 0, "",
+ "http://me:pass@google.com:88/a?f#b",
+ "http://me:pass@goo.com:88/a?f#b",
+ "http://me:pass@goo.com:92/a?f#b",
+ "http://:pass@goo.com:92/a?f#b",
+ "http://goo.com:92/a?f#b",
+ "http://goo.com:92/?f#b",
+ "http://goo.com:92/#b",
+ "https://goo.com:92/"},
+ };
+
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); i++) {
+ WebCore::KURL kurl(WebCore::ParsedURLString, cases[i].url);
+
+ kurl.setProtocol(cases[i].protocol);
+ EXPECT_STREQ(cases[i].expectedProtocol, kurl.string().utf8().data());
+
+ kurl.setHost(cases[i].host);
+ EXPECT_STREQ(cases[i].expectedHost, kurl.string().utf8().data());
+
+ kurl.setPort(cases[i].port);
+ EXPECT_STREQ(cases[i].expectedPort, kurl.string().utf8().data());
+
+ kurl.setUser(cases[i].user);
+ EXPECT_STREQ(cases[i].expectedUser, kurl.string().utf8().data());
+
+ kurl.setPass(cases[i].pass);
+ EXPECT_STREQ(cases[i].expectedPass, kurl.string().utf8().data());
+
+ kurl.setPath(cases[i].path);
+ EXPECT_STREQ(cases[i].expectedPath, kurl.string().utf8().data());
+
+ kurl.setQuery(cases[i].query);
+ EXPECT_STREQ(cases[i].expectedQuery, kurl.string().utf8().data());
+
+ // Refs are tested below. On the Safari 3.1 branch, we don't match their
+ // KURL since we integrated a fix from their trunk.
+ }
+}
+
+// Tests that KURL::decodeURLEscapeSequences works as expected
+#if USE(GOOGLEURL)
+TEST(KURLTest, Decode)
+{
+ struct DecodeCase {
+ const char* input;
+ const char* output;
+ } decodeCases[] = {
+ {"hello, world", "hello, world"},
+ {"%01%02%03%04%05%06%07%08%09%0a%0B%0C%0D%0e%0f/", "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0B\x0C\x0D\x0e\x0f/"},
+ {"%10%11%12%13%14%15%16%17%18%19%1a%1B%1C%1D%1e%1f/", "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1B\x1C\x1D\x1e\x1f/"},
+ {"%20%21%22%23%24%25%26%27%28%29%2a%2B%2C%2D%2e%2f/", " !\"#$%&'()*+,-.//"},
+ {"%30%31%32%33%34%35%36%37%38%39%3a%3B%3C%3D%3e%3f/", "0123456789:;<=>?/"},
+ {"%40%41%42%43%44%45%46%47%48%49%4a%4B%4C%4D%4e%4f/", "@ABCDEFGHIJKLMNO/"},
+ {"%50%51%52%53%54%55%56%57%58%59%5a%5B%5C%5D%5e%5f/", "PQRSTUVWXYZ[\\]^_/"},
+ {"%60%61%62%63%64%65%66%67%68%69%6a%6B%6C%6D%6e%6f/", "`abcdefghijklmno/"},
+ {"%70%71%72%73%74%75%76%77%78%79%7a%7B%7C%7D%7e%7f/", "pqrstuvwxyz{|}~\x7f/"},
+ // Test un-UTF-8-ization.
+ {"%e4%bd%a0%e5%a5%bd", "\xe4\xbd\xa0\xe5\xa5\xbd"},
+ };
+
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(decodeCases); i++) {
+ WebCore::String input(decodeCases[i].input);
+ WebCore::String str = WebCore::decodeURLEscapeSequences(input);
+ EXPECT_STREQ(decodeCases[i].output, str.utf8().data());
+ }
+
+ // Our decode should decode %00
+ WebCore::String zero = WebCore::decodeURLEscapeSequences("%00");
+ EXPECT_STRNE("%00", zero.utf8().data());
+
+ // Test the error behavior for invalid UTF-8 (we differ from WebKit here).
+ WebCore::String invalid = WebCore::decodeURLEscapeSequences(
+ "%e4%a0%e5%a5%bd");
+ char16 invalidExpectedHelper[4] = { 0x00e4, 0x00a0, 0x597d, 0 };
+ WebCore::String invalidExpected(
+ reinterpret_cast<const ::UChar*>(invalidExpectedHelper),
+ 3);
+ EXPECT_EQ(invalidExpected, invalid);
+}
+#endif
+
+TEST(KURLTest, Encode)
+{
+ // Also test that it gets converted to UTF-8 properly.
+ char16 wideInputHelper[3] = { 0x4f60, 0x597d, 0 };
+ WebCore::String wideInput(
+ reinterpret_cast<const ::UChar*>(wideInputHelper), 2);
+ WebCore::String wideReference("\xe4\xbd\xa0\xe5\xa5\xbd", 6);
+ WebCore::String wideOutput =
+ WebCore::encodeWithURLEscapeSequences(wideInput);
+ EXPECT_EQ(wideReference, wideOutput);
+
+ // Our encode only escapes NULLs for safety (see the implementation for
+ // more), so we only bother to test a few cases.
+ WebCore::String input(
+ "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", 16);
+ WebCore::String reference(
+ "%00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", 18);
+ WebCore::String output = WebCore::encodeWithURLEscapeSequences(input);
+ EXPECT_EQ(reference, output);
+}
+
+TEST(KURLTest, ResolveEmpty)
+{
+ WebCore::KURL emptyBase;
+
+ // WebKit likes to be able to resolve absolute input agains empty base URLs,
+ // which would normally be invalid since the base URL is invalid.
+ const char abs[] = "http://www.google.com/";
+ WebCore::KURL resolveAbs(emptyBase, abs);
+ EXPECT_TRUE(resolveAbs.isValid());
+ EXPECT_STREQ(abs, resolveAbs.string().utf8().data());
+
+ // Resolving a non-relative URL agains the empty one should still error.
+ const char rel[] = "foo.html";
+ WebCore::KURL resolveErr(emptyBase, rel);
+ EXPECT_FALSE(resolveErr.isValid());
+}
+
+// WebKit will make empty URLs and set components on them. kurl doesn't allow
+// replacements on invalid URLs, but here we do.
+TEST(KURLTest, ReplaceInvalid)
+{
+ WebCore::KURL kurl;
+
+ EXPECT_FALSE(kurl.isValid());
+ EXPECT_TRUE(kurl.isEmpty());
+ EXPECT_STREQ("", kurl.string().utf8().data());
+
+ kurl.setProtocol("http");
+ // GKURL will say that a URL with just a scheme is invalid, KURL will not.
+#if USE(GOOGLEURL)
+ EXPECT_FALSE(kurl.isValid());
+#else
+ EXPECT_TRUE(kurl.isValid());
+#endif
+ EXPECT_FALSE(kurl.isEmpty());
+ // At this point, we do things slightly differently if there is only a scheme.
+ // We check the results here to make it more obvious what is going on, but it
+ // shouldn't be a big deal if these change.
+#if USE(GOOGLEURL)
+ EXPECT_STREQ("http:", kurl.string().utf8().data());
+#else
+ EXPECT_STREQ("http:/", kurl.string().utf8().data());
+#endif
+
+ kurl.setHost("www.google.com");
+ EXPECT_TRUE(kurl.isValid());
+ EXPECT_FALSE(kurl.isEmpty());
+ EXPECT_STREQ("http://www.google.com/", kurl.string().utf8().data());
+
+ kurl.setPort(8000);
+ EXPECT_TRUE(kurl.isValid());
+ EXPECT_FALSE(kurl.isEmpty());
+ EXPECT_STREQ("http://www.google.com:8000/", kurl.string().utf8().data());
+
+ kurl.setPath("/favicon.ico");
+ EXPECT_TRUE(kurl.isValid());
+ EXPECT_FALSE(kurl.isEmpty());
+ EXPECT_STREQ("http://www.google.com:8000/favicon.ico", kurl.string().utf8().data());
+
+ // Now let's test that giving an invalid replacement still fails.
+#if USE(GOOGLEURL)
+ kurl.setProtocol("f/sj#@");
+ EXPECT_FALSE(kurl.isValid());
+#endif
+}
+
+TEST(KURLTest, Path)
+{
+ const char initial[] = "http://www.google.com/path/foo";
+ WebCore::KURL kurl(WebCore::ParsedURLString, initial);
+
+ // Clear by setting a null string.
+ WebCore::String nullString;
+ EXPECT_TRUE(nullString.isNull());
+ kurl.setPath(nullString);
+ EXPECT_STREQ("http://www.google.com/", kurl.string().utf8().data());
+}
+
+// Test that setting the query to different things works. Thq query is handled
+// a littler differently than some of the other components.
+TEST(KURLTest, Query)
+{
+ const char initial[] = "http://www.google.com/search?q=awesome";
+ WebCore::KURL kurl(WebCore::ParsedURLString, initial);
+
+ // Clear by setting a null string.
+ WebCore::String nullString;
+ EXPECT_TRUE(nullString.isNull());
+ kurl.setQuery(nullString);
+ EXPECT_STREQ("http://www.google.com/search", kurl.string().utf8().data());
+
+ // Clear by setting an empty string.
+ kurl = WebCore::KURL(WebCore::ParsedURLString, initial);
+ WebCore::String emptyString("");
+ EXPECT_FALSE(emptyString.isNull());
+ kurl.setQuery(emptyString);
+ EXPECT_STREQ("http://www.google.com/search?", kurl.string().utf8().data());
+
+ // Set with something that begins in a question mark.
+ const char question[] = "?foo=bar";
+ kurl.setQuery(question);
+ EXPECT_STREQ("http://www.google.com/search?foo=bar",
+ kurl.string().utf8().data());
+
+ // Set with something that doesn't begin in a question mark.
+ const char query[] = "foo=bar";
+ kurl.setQuery(query);
+ EXPECT_STREQ("http://www.google.com/search?foo=bar",
+ kurl.string().utf8().data());
+}
+
+TEST(KURLTest, Ref)
+{
+ WebCore::KURL kurl(WebCore::ParsedURLString, "http://foo/bar#baz");
+
+ // Basic ref setting.
+ WebCore::KURL cur(WebCore::ParsedURLString, "http://foo/bar");
+ cur.setFragmentIdentifier("asdf");
+ EXPECT_STREQ("http://foo/bar#asdf", cur.string().utf8().data());
+ cur = kurl;
+ cur.setFragmentIdentifier("asdf");
+ EXPECT_STREQ("http://foo/bar#asdf", cur.string().utf8().data());
+
+ // Setting a ref to the empty string will set it to "#".
+ cur = WebCore::KURL(WebCore::ParsedURLString, "http://foo/bar");
+ cur.setFragmentIdentifier("");
+ EXPECT_STREQ("http://foo/bar#", cur.string().utf8().data());
+ cur = kurl;
+ cur.setFragmentIdentifier("");
+ EXPECT_STREQ("http://foo/bar#", cur.string().utf8().data());
+
+ // Setting the ref to the null string will clear it altogether.
+ cur = WebCore::KURL(WebCore::ParsedURLString, "http://foo/bar");
+ cur.setFragmentIdentifier(WebCore::String());
+ EXPECT_STREQ("http://foo/bar", cur.string().utf8().data());
+ cur = kurl;
+ cur.setFragmentIdentifier(WebCore::String());
+ EXPECT_STREQ("http://foo/bar", cur.string().utf8().data());
+}
+
+TEST(KURLTest, Empty)
+{
+ WebCore::KURL kurl;
+
+ // First test that regular empty URLs are the same.
+ EXPECT_TRUE(kurl.isEmpty());
+ EXPECT_FALSE(kurl.isValid());
+ EXPECT_TRUE(kurl.isNull());
+ EXPECT_TRUE(kurl.string().isNull());
+ EXPECT_TRUE(kurl.string().isEmpty());
+
+ // Test resolving a null URL on an empty string.
+ WebCore::KURL kurl2(kurl, "");
+ EXPECT_FALSE(kurl2.isNull());
+ EXPECT_TRUE(kurl2.isEmpty());
+ EXPECT_FALSE(kurl2.isValid());
+ EXPECT_FALSE(kurl2.string().isNull());
+ EXPECT_TRUE(kurl2.string().isEmpty());
+ EXPECT_FALSE(kurl2.string().isNull());
+ EXPECT_TRUE(kurl2.string().isEmpty());
+
+ // Resolve the null URL on a null string.
+ WebCore::KURL kurl22(kurl, WebCore::String());
+ EXPECT_FALSE(kurl22.isNull());
+ EXPECT_TRUE(kurl22.isEmpty());
+ EXPECT_FALSE(kurl22.isValid());
+ EXPECT_FALSE(kurl22.string().isNull());
+ EXPECT_TRUE(kurl22.string().isEmpty());
+ EXPECT_FALSE(kurl22.string().isNull());
+ EXPECT_TRUE(kurl22.string().isEmpty());
+
+ // Test non-hierarchical schemes resolving. The actual URLs will be different.
+ // WebKit's one will set the string to "something.gif" and we'll set it to an
+ // empty string. I think either is OK, so we just check our behavior.
+#if USE(GOOGLEURL)
+ WebCore::KURL kurl3(WebCore::KURL(WebCore::ParsedURLString, "data:foo"),
+ "something.gif");
+ EXPECT_TRUE(kurl3.isEmpty());
+ EXPECT_FALSE(kurl3.isValid());
+#endif
+
+ // Test for weird isNull string input,
+ // see: http://bugs.webkit.org/show_bug.cgi?id=16487
+ WebCore::KURL kurl4(WebCore::ParsedURLString, kurl.string());
+ EXPECT_TRUE(kurl4.isEmpty());
+ EXPECT_FALSE(kurl4.isValid());
+ EXPECT_TRUE(kurl4.string().isNull());
+ EXPECT_TRUE(kurl4.string().isEmpty());
+
+ // Resolving an empty URL on an invalid string.
+ WebCore::KURL kurl5(WebCore::KURL(), "foo.js");
+ // We'll be empty in this case, but KURL won't be. Should be OK.
+ // EXPECT_EQ(kurl5.isEmpty(), kurl5.isEmpty());
+ // EXPECT_EQ(kurl5.string().isEmpty(), kurl5.string().isEmpty());
+ EXPECT_FALSE(kurl5.isValid());
+ EXPECT_FALSE(kurl5.string().isNull());
+
+ // Empty string as input
+ WebCore::KURL kurl6(WebCore::ParsedURLString, "");
+ EXPECT_TRUE(kurl6.isEmpty());
+ EXPECT_FALSE(kurl6.isValid());
+ EXPECT_FALSE(kurl6.string().isNull());
+ EXPECT_TRUE(kurl6.string().isEmpty());
+
+ // Non-empty but invalid C string as input.
+ WebCore::KURL kurl7(WebCore::ParsedURLString, "foo.js");
+ // WebKit will actually say this URL has the string "foo.js" but is invalid.
+ // We don't do that.
+ // EXPECT_EQ(kurl7.isEmpty(), kurl7.isEmpty());
+ EXPECT_FALSE(kurl7.isValid());
+ EXPECT_FALSE(kurl7.string().isNull());
+}
+
+TEST(KURLTest, UserPass)
+{
+ const char* src = "http://user:pass@google.com/";
+ WebCore::KURL kurl(WebCore::ParsedURLString, src);
+
+ // Clear just the username.
+ kurl.setUser("");
+ EXPECT_EQ("http://:pass@google.com/", kurl.string());
+
+ // Clear just the password.
+ kurl = WebCore::KURL(WebCore::ParsedURLString, src);
+ kurl.setPass("");
+ EXPECT_EQ("http://user@google.com/", kurl.string());
+
+ // Now clear both.
+ kurl.setUser("");
+ EXPECT_EQ("http://google.com/", kurl.string());
+}
+
+TEST(KURLTest, Offsets)
+{
+ const char* src1 = "http://user:pass@google.com/foo/bar.html?baz=query#ref";
+ WebCore::KURL kurl1(WebCore::ParsedURLString, src1);
+
+ EXPECT_EQ(17u, kurl1.hostStart());
+ EXPECT_EQ(27u, kurl1.hostEnd());
+ EXPECT_EQ(27u, kurl1.pathStart());
+ EXPECT_EQ(40u, kurl1.pathEnd());
+ EXPECT_EQ(32u, kurl1.pathAfterLastSlash());
+
+ const char* src2 = "http://google.com/foo/";
+ WebCore::KURL kurl2(WebCore::ParsedURLString, src2);
+
+ EXPECT_EQ(7u, kurl2.hostStart());
+ EXPECT_EQ(17u, kurl2.hostEnd());
+ EXPECT_EQ(17u, kurl2.pathStart());
+ EXPECT_EQ(22u, kurl2.pathEnd());
+ EXPECT_EQ(22u, kurl2.pathAfterLastSlash());
+
+ const char* src3 = "javascript:foobar";
+ WebCore::KURL kurl3(WebCore::ParsedURLString, src3);
+
+ EXPECT_EQ(11u, kurl3.hostStart());
+ EXPECT_EQ(11u, kurl3.hostEnd());
+ EXPECT_EQ(11u, kurl3.pathStart());
+ EXPECT_EQ(17u, kurl3.pathEnd());
+ EXPECT_EQ(11u, kurl3.pathAfterLastSlash());
+}
+
+TEST(KURLTest, DeepCopy)
+{
+ const char url[] = "http://www.google.com/";
+ WebCore::KURL src(WebCore::ParsedURLString, url);
+ EXPECT_TRUE(src.string() == url); // This really just initializes the cache.
+ WebCore::KURL dest = src.copy();
+ EXPECT_TRUE(dest.string() == url); // This really just initializes the cache.
+
+ // The pointers should be different for both UTF-8 and UTF-16.
+ EXPECT_NE(dest.string().characters(), src.string().characters());
+ EXPECT_NE(dest.utf8String().data(), src.utf8String().data());
+}
+
+TEST(KURLTest, ProtocolIs)
+{
+ WebCore::KURL url1(WebCore::ParsedURLString, "foo://bar");
+ EXPECT_TRUE(url1.protocolIs("foo"));
+ EXPECT_FALSE(url1.protocolIs("foo-bar"));
+
+ WebCore::KURL url2(WebCore::ParsedURLString, "foo-bar:");
+ EXPECT_TRUE(url2.protocolIs("foo-bar"));
+ EXPECT_FALSE(url2.protocolIs("foo"));
+}
+
+} // namespace
diff --git a/WebKit/chromium/tests/KeyboardTest.cpp b/WebKit/chromium/tests/KeyboardTest.cpp
new file mode 100644
index 0000000..07bed3c
--- /dev/null
+++ b/WebKit/chromium/tests/KeyboardTest.cpp
@@ -0,0 +1,213 @@
+/*
+ * 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 <gtest/gtest.h>
+
+#include "EditorClientImpl.h"
+#include "EventTarget.h"
+#include "KeyboardCodes.h"
+#include "KeyboardEvent.h"
+#include "WebInputEvent.h"
+#include "WebInputEventConversion.h"
+
+using namespace WebCore;
+using namespace WebKit;
+
+namespace {
+
+class KeyboardTest : public testing::Test {
+public:
+
+ // Pass a WebKeyboardEvent into the EditorClient and get back the string
+ // name of which editing event that key causes.
+ // E.g., sending in the enter key gives back "InsertNewline".
+ const char* interpretKeyEvent(
+ const WebKeyboardEvent& webKeyboardEvent,
+ PlatformKeyboardEvent::Type keyType)
+ {
+ EditorClientImpl editorImpl(0);
+ PlatformKeyboardEventBuilder evt(webKeyboardEvent);
+ evt.setKeyType(keyType);
+ RefPtr<KeyboardEvent> keyboardEvent = KeyboardEvent::create(evt, 0);
+ return editorImpl.interpretKeyEvent(keyboardEvent.get());
+ }
+
+ // Set up a WebKeyboardEvent KEY_DOWN event with key code and modifiers.
+ void setupKeyDownEvent(WebKeyboardEvent* keyboardEvent,
+ char keyCode,
+ int modifiers)
+ {
+ keyboardEvent->windowsKeyCode = keyCode;
+ keyboardEvent->modifiers = modifiers;
+ keyboardEvent->type = WebInputEvent::KeyDown;
+ keyboardEvent->text[0] = keyCode;
+ keyboardEvent->setKeyIdentifierFromWindowsKeyCode();
+ }
+
+ // Like interpretKeyEvent, but with pressing down OSModifier+|keyCode|.
+ // OSModifier is the platform's standard modifier key: control on most
+ // platforms, but meta (command) on Mac.
+ const char* interpretOSModifierKeyPress(char keyCode)
+ {
+ WebKeyboardEvent keyboardEvent;
+#if OS(DARWIN)
+ WebInputEvent::Modifiers osModifier = WebInputEvent::MetaKey;
+#else
+ WebInputEvent::Modifiers osModifier = WebInputEvent::ControlKey;
+#endif
+ setupKeyDownEvent(&keyboardEvent, keyCode, osModifier);
+ return interpretKeyEvent(keyboardEvent, PlatformKeyboardEvent::RawKeyDown);
+ }
+
+ // Like interpretKeyEvent, but with pressing down ctrl+|keyCode|.
+ const char* interpretCtrlKeyPress(char keyCode)
+ {
+ WebKeyboardEvent keyboardEvent;
+ setupKeyDownEvent(&keyboardEvent, keyCode, WebInputEvent::ControlKey);
+ return interpretKeyEvent(keyboardEvent, PlatformKeyboardEvent::RawKeyDown);
+ }
+
+ // Like interpretKeyEvent, but with typing a tab.
+ const char* interpretTab(int modifiers)
+ {
+ WebKeyboardEvent keyboardEvent;
+ setupKeyDownEvent(&keyboardEvent, '\t', modifiers);
+ return interpretKeyEvent(keyboardEvent, PlatformKeyboardEvent::Char);
+ }
+
+ // Like interpretKeyEvent, but with typing a newline.
+ const char* interpretNewLine(int modifiers)
+ {
+ WebKeyboardEvent keyboardEvent;
+ setupKeyDownEvent(&keyboardEvent, '\r', modifiers);
+ return interpretKeyEvent(keyboardEvent, PlatformKeyboardEvent::Char);
+ }
+
+ // A name for "no modifiers set".
+ static const int noModifiers = 0;
+};
+
+TEST_F(KeyboardTest, TestCtrlReturn)
+{
+ EXPECT_STREQ("InsertNewline", interpretCtrlKeyPress(0xD));
+}
+
+TEST_F(KeyboardTest, TestOSModifierZ)
+{
+#if !OS(DARWIN)
+ EXPECT_STREQ("Undo", interpretOSModifierKeyPress('Z'));
+#endif
+}
+
+TEST_F(KeyboardTest, TestOSModifierY)
+{
+#if !OS(DARWIN)
+ EXPECT_STREQ("Redo", interpretOSModifierKeyPress('Y'));
+#endif
+}
+
+TEST_F(KeyboardTest, TestOSModifierA)
+{
+#if !OS(DARWIN)
+ EXPECT_STREQ("SelectAll", interpretOSModifierKeyPress('A'));
+#endif
+}
+
+TEST_F(KeyboardTest, TestOSModifierX)
+{
+#if !OS(DARWIN)
+ EXPECT_STREQ("Cut", interpretOSModifierKeyPress('X'));
+#endif
+}
+
+TEST_F(KeyboardTest, TestOSModifierC)
+{
+#if !OS(DARWIN)
+ EXPECT_STREQ("Copy", interpretOSModifierKeyPress('C'));
+#endif
+}
+
+TEST_F(KeyboardTest, TestOSModifierV)
+{
+#if !OS(DARWIN)
+ EXPECT_STREQ("Paste", interpretOSModifierKeyPress('V'));
+#endif
+}
+
+TEST_F(KeyboardTest, TestEscape)
+{
+ WebKeyboardEvent keyboardEvent;
+ setupKeyDownEvent(&keyboardEvent, WebCore::VKEY_ESCAPE, noModifiers);
+
+ const char* result = interpretKeyEvent(keyboardEvent,
+ PlatformKeyboardEvent::RawKeyDown);
+ EXPECT_STREQ("Cancel", result);
+}
+
+TEST_F(KeyboardTest, TestInsertTab)
+{
+ EXPECT_STREQ("InsertTab", interpretTab(noModifiers));
+}
+
+TEST_F(KeyboardTest, TestInsertBackTab)
+{
+ EXPECT_STREQ("InsertBacktab", interpretTab(WebInputEvent::ShiftKey));
+}
+
+TEST_F(KeyboardTest, TestInsertNewline)
+{
+ EXPECT_STREQ("InsertNewline", interpretNewLine(noModifiers));
+}
+
+TEST_F(KeyboardTest, TestInsertNewline2)
+{
+ EXPECT_STREQ("InsertNewline", interpretNewLine(WebInputEvent::ControlKey));
+}
+
+TEST_F(KeyboardTest, TestInsertLineBreak)
+{
+ EXPECT_STREQ("InsertLineBreak", interpretNewLine(WebInputEvent::ShiftKey));
+}
+
+TEST_F(KeyboardTest, TestInsertNewline3)
+{
+ EXPECT_STREQ("InsertNewline", interpretNewLine(WebInputEvent::AltKey));
+}
+
+TEST_F(KeyboardTest, TestInsertNewline4)
+{
+ int modifiers = WebInputEvent::AltKey | WebInputEvent::ShiftKey;
+ const char* result = interpretNewLine(modifiers);
+ EXPECT_STREQ("InsertNewline", result);
+}
+
+} // empty namespace
diff --git a/WebKit/chromium/tests/RunAllTests.cpp b/WebKit/chromium/tests/RunAllTests.cpp
new file mode 100644
index 0000000..0f3f82f
--- /dev/null
+++ b/WebKit/chromium/tests/RunAllTests.cpp
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// FIXME: Avoid this source dependency on Chromium's base module.
+#include <base/test/test_suite.h>
+
+#include "WebKit.h"
+#include "WebKitClient.h"
+
+// WebKitClient has a protected destructor, so we need to subclass.
+class DummyWebKitClient : public WebKit::WebKitClient {
+};
+
+int main(int argc, char** argv)
+{
+ DummyWebKitClient dummyClient;
+ WebKit::initialize(&dummyClient);
+
+ int result = TestSuite(argc, argv).Run();
+
+ WebKit::shutdown();
+ return result;
+}
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index a72e2c9..b112460 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,572 @@
+<<<<<<< HEAD
+=======
+2010-01-27 Martin Robinson <mrobinson@webkit.org>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Expose the IM context via the API
+ https://bugs.webkit.org/show_bug.cgi?id=33327
+
+ Expose the GtkIMMultiContext as a property of WebKitWebView. This will
+ allow embedders to generate the input method context menu entries and
+ make testing certain IM context behavior possible.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_get_property):
+ (DNDContentsRequest::webkit_web_view_get_im_context):
+ (DNDContentsRequest::webkit_web_view_class_init):
+
+2010-01-19 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30883
+ [Gtk] Implement AtkText for HTML elements which contain text
+
+ Adds two news tests.
+
+ * tests/testatk.c
+ (testWebkitAtkGetTextInParagraphAndBodySimple):
+ (testWebkitAtkGetTextInParagraphAndBodyModerate):
+ (main):
+
+2010-01-19 Gustavo Noronha Silva <gns@gnome.org>
+
+ Unreviewed. Changes to the test I forgot to make after a last
+ minute change before landing 53294 - this causes make distcheck to
+ fail.
+
+ * tests/testloading.c:
+ (load_error_status_changed_cb):
+ (test_loading_error):
+
+2010-01-19 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Xan Lopez.
+
+ News items for 1.1.19.
+
+ * NEWS:
+
+2010-01-19 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] More crashes related to the clipboard management
+ https://bugs.webkit.org/show_bug.cgi?id=33746
+
+ Pass the WebKitWebView object (which is a GObject, thus
+ ref-counted) to the clipboard functions instead of passing the
+ Page - this allows us to explicitely protect the object inbetween
+ the clipboard call and its callbacks, which fixes the crash.
+
+ * WebCoreSupport/EditorClientGtk.cpp:
+ (WebKit::EditorClient::respondToChangedSelection):
+ * WebCoreSupport/PasteboardHelperGtk.cpp:
+ (WebKit::getClipboardContentsCallback):
+ (WebKit::clearClipboardContentsCallback):
+ (WebKit::PasteboardHelperGtk::writeClipboardContents):
+
+2010-01-15 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ Original patch by David Ronis <david.ronis@mcgill.ca>
+
+ Upgrade 1.1.17->1.1.18 fails: GTK_WIDGET_TOPLEVEL' was not declared in this scope
+ https://bugs.webkit.org/show_bug.cgi?id=33486
+
+ Deprecated symbols replaced for gtk+ versions over 2.18.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::windowRect):
+ * webkit/webkitprivate.cpp:
+ (currentToplevelCallback):
+ * webkit/webkitwebframe.cpp:
+ (webkit_web_frame_print_full):
+ (webkit_web_frame_print):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_focus_in_event):
+
+2010-01-14 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Eric Seidel.
+
+ [GTK] Crashes cleaning clipboard contents, with page cache enabled
+ https://bugs.webkit.org/show_bug.cgi?id=32900
+
+ Null-check the focus controller to avoid crashing. Could not find
+ a way to reproduce this consistently, thus no test.
+
+ * WebCoreSupport/PasteboardHelperGtk.cpp:
+ (WebKit::clearClipboardContentsCallback):
+
+2010-01-14 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Oliver Hunter.
+
+ [GTK] couple fixes for signal emissions, and property notifications
+ https://bugs.webkit.org/show_bug.cgi?id=33428
+
+ Do not emit signals and property notifications for error
+ pages. The notifications are not really useful for anything, you
+ can get them back by overriding the error pages, and it avoids a
+ number of hacks.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::FrameLoaderClient):
+ (WebKit::FrameLoaderClient::dispatchDidFinishLoad):
+ (WebKit::FrameLoaderClient::dispatchDidReceiveIcon):
+ (WebKit::FrameLoaderClient::dispatchDidStartProvisionalLoad):
+ (WebKit::FrameLoaderClient::dispatchDidReceiveTitle):
+ (WebKit::FrameLoaderClient::dispatchDidCommitLoad):
+ (WebKit::FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
+ (WebKit::FrameLoaderClient::dispatchDidFailLoad):
+ * WebCoreSupport/FrameLoaderClientGtk.h:
+ * tests/testloading.c:
+ (load_error_status_changed_cb):
+ (test_loading_error):
+
+2010-01-14 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Enable DOM clipboard and drag-and-drop access
+ https://bugs.webkit.org/show_bug.cgi?id=30623
+
+ Use DataObjectGtk when setting and clearing pasteboard data on
+ the GDK_SELECTION_PRIMARY clipboard.
+
+ * WebCoreSupport/EditorClientGtk.cpp:
+ (WebKit::EditorClient::respondToChangedSelection):
+ (WebKit::EditorClient::EditorClient):
+ * WebCoreSupport/EditorClientGtk.h:
+ * WebCoreSupport/PasteboardHelperGtk.cpp:
+ (WebKit::fillSelectionData):
+ (WebKit::targetListForDataObject):
+ (WebKit::getClipboardContentsCallback):
+ (WebKit::clearClipboardContentsCallback):
+ (WebKit::PasteboardHelperGtk::writeClipboardContents):
+ * WebCoreSupport/PasteboardHelperGtk.h:
+
+2010-01-14 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ Review the tooltip implementation
+ https://bugs.webkit.org/show_bug.cgi?id=32819
+
+ Change the GTK tooltip implementation to avoid the workaround that
+ we are currently using. Now we use a new private API to set the
+ text and all the tooltip handling is done in the webview widget.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ * webkit/webkitprivate.h:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_set_tooltip_text): Added, new private API.
+ (webkit_web_view_query_tooltip): Added
+
+2010-01-09 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] couple fixes for signal emissions, and property notifications
+ https://bugs.webkit.org/show_bug.cgi?id=33428
+
+ Fix commitedLoad being called where it should not, causing it to
+ be called one time too many in some cases. We now match Qt's and
+ Mac's behavior here.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::finishedLoading):
+ * tests/testloading.c:
+ (load_error_status_changed_cb):
+
+2010-01-08 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] loading test should use SoupServer instead of actual sites
+ https://bugs.webkit.org/show_bug.cgi?id=33353
+
+ Make all the loading tests use SoupServer, instead of fetching
+ stuff from the Internet.
+
+ * tests/testloading.c:
+ (server_callback):
+ (get_uri_for_path):
+ (test_loading_status):
+ (test_loading_error):
+ (test_loading_cancelled):
+ (load_wentback_status_changed_cb):
+ (load_error_test):
+ (test_loading_goback):
+ (main):
+
+2010-01-06 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30883
+ [Gtk] Implement AtkText for HTML elements which contain text
+
+ * tests/testatk.c
+ (test_webkit_atk_get_text_at_offset):
+ (test_webkit_atk_get_text_at_offset_forms):
+ (test_webkit_atk_get_text_at_offset_newlines):
+
+2010-01-05 Gustavo Noronha Silva <gns@gnome.org>
+
+ Updated docs for 1.1.18 release.
+
+ * docs/webkitgtk-docs.sgml:
+ * docs/webkitgtk-sections.txt:
+
+2010-01-05 Xan Lopez <xlopez@igalia.com>
+
+ Update for 1.1.18 release.
+
+ * NEWS:
+
+2010-01-04 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Fisher.
+
+ Reorganize, document and rename OS() platform macros.
+ https://bugs.webkit.org/show_bug.cgi?id=33198
+
+ Adapt to name changes.
+
+ * webkit/webkitwebsettings.cpp:
+ (webkit_get_user_agent):
+
+2010-01-04 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Adam Barth.
+
+ Reorganize, document and rename CPU() platform macros.
+ https://bugs.webkit.org/show_bug.cgi?id=33145
+
+ * webkit/webkitwebsettings.cpp:
+ (webkit_get_user_agent):
+
+2009-12-20 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ Remove emission of signal that does not exist.
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::InspectorClient::inspectorDestroyed):
+ (WebKit::InspectorClient::webViewDestroyed):
+
+2009-12-20 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Unset the adjustments in our FrameView when detaching from
+ parent. Fixes some crashers when transitioning to a new page from
+ a scrolled page.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::detachedFromParent2):
+
+2009-12-20 Xan Lopez <xlopez@igalia.com>
+
+ Rubber-stamped by Gustavo Noronha.
+
+ Disable the page cache by default since:
+
+ - It was previously off by default.
+ - There are still some issues when enabling it.
+
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_class_init):
+
+2009-12-20 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ Provides a new API to copy WebKitWebHistoryItem objects.
+
+ * webkit/webkitwebhistoryitem.cpp:
+ (webkit_web_history_item_copy):
+ * webkit/webkitwebhistoryitem.h:
+
+2009-12-20 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ Make sure we get the URI that is being loaded when updating
+ WebKitWebFrame's knowledge of it. This was causing problems now
+ that page cache is enabled.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::dispatchDidCommitLoad):
+ * tests/testloading.c:
+ (load_goback_status_changed_cb):
+ (load_wentback_status_changed_cb):
+ (test_loading_goback):
+ (main):
+
+2009-12-20 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Cache control APIs
+ https://bugs.webkit.org/show_bug.cgi?id=24001
+
+ Original patch by Bobby Powers <bobby@laptop.org>
+
+ Added new API to specify cache models for GTK port.
+
+ * webkit/webkitprivate.cpp:
+ (webkit_init): set a default cache model.
+ * webkit/webkitwebview.cpp:
+ * webkit/webkitwebview.h:
+ (webkit_set_cache_model): Added function.
+ (webkit_get_cache_model): Added function.
+
+2009-12-20 Xan Lopez <xlopez@igalia.com>
+
+ Revert the previous patch, it introduces some failures in the
+ bots.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::committedLoad):
+ (WebKit::FrameLoaderClient::transitionToCommittedForNewPage):
+
+2009-12-20 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] crash when loading new page
+ https://bugs.webkit.org/show_bug.cgi?id=32752
+
+ Wait until the document is attached to adjust our alignments,
+ since we need to make sure the FrameView in the document content
+ render object matches the newly created FrameView for the new
+ page, otherwise we'll try to relayout the wrong view.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::committedLoad):
+ (WebKit::FrameLoaderClient::transitionToCommittedForNewPage):
+
+2009-12-20 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ Create a new WebKitDataSource object when attaching to a frame, if
+ one does not exist. This may happen when we are fetching data from
+ the page cache.
+
+ * WebCoreSupport/DocumentLoaderGtk.cpp:
+ (WebKit::DocumentLoader::attachToFrame):
+ (WebKit::DocumentLoader::unrefDataSource):
+
+2009-12-20 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Rubber-stamped by Xan Lopez.
+
+ Make sure the text encoding machinery is initialized from the main
+ frame, before opening the icon database.
+
+ * webkit/webkitprivate.cpp:
+ (webkit_init):
+
+2009-12-19 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ Fixed the problem when pasting in the same window with the
+ middle-button, now we store a reference to the range instead of
+ requesting it every time, and we do not release it until the
+ clipboard is requested.
+ https://bugs.webkit.org/show_bug.cgi?id=28153
+
+ * WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp:
+ * WebKit/gtk/WebCoreSupport/EditorClientGtk.h:
+
+2009-12-19 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ Protect download objects when reporting errors, to make sure the
+ download stays alive between the status change notification, and
+ the error signal emission.
+
+ * webkit/webkitdownload.cpp:
+ (webkit_download_error):
+
+2009-12-18 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Fix gtk-doc of webkit_web_resource_new.
+
+ * webkit/webkitwebresource.cpp:
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ GTK build fix
+
+ * webkit/webkitprivate.cpp: Added #include.
+
+2009-12-18 Kalle Vahlman <kalle.vahlman@movial.com> and Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Add enable-page-cache property to WebSettings for disabling the Page Cache
+
+ * webkit/webkitwebsettings.cpp:
+ (_WebKitWebSettingsPrivate::):
+ (_WebKitWebSettingsPrivate::webkit_web_settings_class_init):
+ (_WebKitWebSettingsPrivate::webkit_web_settings_set_property):
+ (_WebKitWebSettingsPrivate::webkit_web_settings_get_property):
+ (_WebKitWebSettingsPrivate::webkit_web_settings_copy):
+ * webkit/webkitwebview.cpp:
+
+2009-12-17 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ More make distcheck fixes. Use a more robust solution to making
+ sure we are in the correct directory for running these tests.
+
+ * tests/testmimehandling.c:
+ (main):
+ * tests/testwebview.c:
+ (main):
+
+2009-12-17 Christian Dywan <christian@twotoasts.de>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Don't assume downloads are always synchronous
+ http://bugs.webkit.org/show_bug.cgi?id=32359
+
+ * tests/testdownload.c:
+ (download_requested_cb):
+ (set_filename):
+ (test_webkit_download_perform):
+ (test_webkit_download_synch):
+ (test_webkit_download_asynch):
+ (main): Test downloads synchronously and asynchronously.
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_class_init):
+ (webkit_web_view_request_download): Only try to start a requested
+ download if the destination URI is set and clarify the documentation.
+
+2009-12-17 Christian Dywan <christian@twotoasts.de>
+
+ Reviewed by Xan Lopez.
+
+ Deprecate the title-changed signal of WebKitWebFrame.
+
+ * webkit/webkitwebframe.cpp:
+ (webkit_web_frame_class_init):
+
+2009-12-17 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] WebKit GTK needs a wrapper for ref counted glib/gobject structs
+ https://bugs.webkit.org/show_bug.cgi?id=21599
+
+ Convert a use of GOwnPtr for a reference counted type to GRefPtr.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::createPlugin):
+
+2009-12-17 Evan Martin <evan@chromium.org>
+
+ Reviewed by Xan Lopez.
+
+ Expose the page workarounds ("quirks") setting to the GTK+ WebKit API.
+
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_class_init):
+ (webkit_web_settings_set_property):
+ (webkit_web_settings_get_property):
+ (webkit_web_settings_copy):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_update_settings):
+
+2009-12-16 Dan Winship <danw@gnome.org>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Content-Encoding support
+
+ https://bugs.webkit.org/show_bug.cgi?id=522772
+
+ * webkit/webkitprivate.cpp:
+ (webkit_init): add a SoupContentDecoder feature to the session
+
+2009-12-16 Christian Dywan <christian@twotoasts.de>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Deprecate the old loading signals load-started, load-committed,
+ load-finished, load-progress-changed and change unit tests to use
+ load-status instead.
+
+ * tests/testmimehandling.c:
+ (idle_quit_loop_cb):
+ (test_mime_type): use notify::load-status
+ * tests/testwebdatasource.c:
+ (notify_load_status_unreachable_cb):
+ (notify_load_status_cb):
+ (test_webkit_web_data_source):
+ (test_webkit_web_data_source_unreachable_uri): Remove uses of
+ g_main_loop_is_running. It's an error if the loop is wrongly terminated.
+ * tests/testwebresource.c:
+ (notify_load_status_cb):
+ (test_web_resource_loading):
+ (notify_load_status_sub_cb):
+ (test_web_resource_sub_resource_loading): use notify::load-status
+ * tests/testwebview.c:
+ (idle_quit_loop_cb):
+ (test_webkit_web_view_icon_uri):
+ * tests/testwindow.c:
+ (notify_load_status_cb):
+ (test_webkit_window_scrollbar_policy): use notify::load-status
+ * webkit/webkitwebframe.cpp:
+ (webkit_web_frame_class_init):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_class_init): Deprecate old load signals.
+
+2009-12-16 Christian Dywan <christian@twotoasts.de>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Take into account favicon.ico in the webresource test.
+
+ * tests/testwebresource.c:
+ (test_web_resource_sub_resource_loading):
+
+2009-12-16 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Rubber-stamped by Xan Lopez.
+
+ Add tab_key_cycles_through_elements to copies of
+ WebKitWebSettings.
+
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_copy):
+
+2009-12-16 Martin Robinson <martin.james.robinson@gmail.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] webkit_web_navigation_action_get_button() documentation
+ https://bugs.webkit.org/show_bug.cgi?id=25555
+
+ Small documentation improvement for webkit_web_navigation_action_get_button.
+
+ * webkit/webkitwebnavigationaction.cpp:
+
+>>>>>>> webkit.org at r54127
2009-12-13 Sam Weinig <sam@webkit.org>
Reviewed by Dan Bernstein.
@@ -13,6 +582,61 @@
* webkit/webkitwebview.cpp:
(webkit_web_view_init):
+<<<<<<< HEAD
+=======
+2009-12-14 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ New setting to allow applications to completely suppress the
+ default context menu that is generated by WebKit. This allows them
+ to still pass the event to the default handler without needing to
+ use ugly hacks such as handling populate-popup, and removing all
+ the items from the default context menu.
+
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_class_init):
+ (webkit_web_settings_set_property):
+ (webkit_web_settings_get_property):
+ (webkit_web_settings_copy):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_forward_context_menu_event):
+
+2009-12-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ Also give the right click event to the frame's event handler, if
+ there WebCore decides to not generate the default context
+ menu. This fixes some pages that handle right-button clicks for
+ things other than context menu creation.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_forward_context_menu_event):
+
+2009-12-13 Christian Dywan <christian@twotoasts.de>
+
+ Reviewed by Holger Freyther.
+
+ http://bugs.webkit.org/show_bug.cgi?id=31014
+ [Gtk] Build fails with gtk+-2.10 (no tested with older releases)
+
+ Guard GTK+ 2.12 specific tooltip code with #ifdef.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::mouseDidMoveOverElement):
+
+2009-12-11 Christian Dywan <christian@twotoasts.de>
+
+ Reviewed by Eric Seidel.
+
+ [GTK] Build with --disable-svg is broken
+ http://bugs.webkit.org/show_bug.cgi?id=32361
+
+ * webkit/webkitwebframe.cpp:
+ (webkit_web_frame_pause_svg_animation): Fix ENABLE(SVG) guards.
+
+>>>>>>> webkit.org at r54127
2009-12-10 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Reviewed by Xan Lopez.
diff --git a/WebKit/gtk/NEWS b/WebKit/gtk/NEWS
index f40390e..18b5e3c 100644
--- a/WebKit/gtk/NEWS
+++ b/WebKit/gtk/NEWS
@@ -1,4 +1,50 @@
=================
+WebKitGTK+ 1.1.19
+=================
+
+What's new in WebKitGTK+ 1.1.19?
+
+ - Improvements to AtkText implementation
+ - RGBA colormap support has been added
+ - Improvements to the HTML5 media player
+ - Crashes related to clipboard handling, which were hitting many
+ users and seemed to be random have been fixed
+
+=================
+WebKitGTK+ 1.1.18
+=================
+
+What's new in WebKitGTK+ 1.1.18?
+
+ - Add methods to set and get a cache model in WebKitGTK+. We offer
+ two possibilites: document viewer (no caches are used) and browser
+ (similar to the previous defaults).
+ - Add WebKitWebSettings::enable-page-cache. Controls whether the
+ Page Cache is enabled or not. For details about what the page
+ cache is and does see
+ http://webkit.org/blog/427/webkit-page-cache-i-the-basics/
+ The page cache is disabled by default, since the gtk+ port still
+ presents some small bugs when it's enabled.
+ - Add WebKitWebSettings::enable-site-specific-quirks. Controls
+ whether a series of page-specific workarounds are used by WebKit.
+ - Use Content-Encoding support available in libsoup 2.28.2 and
+ newer.
+ - Add WebKitWebSettings::enable-default-context-menu. Controls
+ whether webkitgtk+ will show a default context menu on right click
+ in the view. Note that even with the property set to FALSE right
+ clicks can be handled by the page, either by actions or by
+ ad-hoc in-page context menus.
+ - Make the WebKitWebView::icon-loaded signal carry a string with the
+ favicon's URI. This is an API break, but the signal already had a
+ broken signature and was useless anyway, so it's extremely
+ unlikely that anybody was using it. Also, add the 'icon-uri'
+ property to the view, holding the URI for its current favicon.
+ - Respect Content-Disposition header in downloads (fixes downloads
+ in gmail).
+ - Various accessibility improvements.
+ - Many bugfixes.
+
+=================
WebKitGTK+ 1.1.17
=================
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index d9a043b..8ea8991 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -64,7 +64,11 @@ void ChromeClient::chromeDestroyed()
FloatRect ChromeClient::windowRect()
{
GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView));
+#if GTK_CHECK_VERSION(2, 18, 0)
+ if (gtk_widget_is_toplevel(window)) {
+#else
if (GTK_WIDGET_TOPLEVEL(window)) {
+#endif
gint left, top, width, height;
gtk_window_get_position(GTK_WINDOW(window), &left, &top);
gtk_window_get_size(GTK_WINDOW(window), &width, &height);
@@ -106,7 +110,11 @@ void ChromeClient::focus()
void ChromeClient::unfocus()
{
GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView));
+#if GTK_CHECK_VERSION(2, 18, 0)
+ if (gtk_widget_is_toplevel(window))
+#else
if (GTK_WIDGET_TOPLEVEL(window))
+#endif
gtk_window_set_focus(GTK_WINDOW(window), NULL);
}
@@ -234,7 +242,11 @@ void ChromeClient::closeWindowSoon()
bool ChromeClient::canTakeFocus(FocusDirection)
{
+#if GTK_CHECK_VERSION(2, 18, 0)
+ return gtk_widget_get_can_focus(GTK_WIDGET(m_webView));
+#else
return GTK_WIDGET_CAN_FOCUS(m_webView);
+#endif
}
void ChromeClient::takeFocus(FocusDirection)
@@ -442,20 +454,6 @@ void ChromeClient::scrollbarsModeDidChange() const
void ChromeClient::mouseDidMoveOverElement(const HitTestResult& hit, unsigned modifierFlags)
{
- // If a tooltip must be displayed it will be, afterwards, when
- // setToolTip is called; this is just a work-around to make sure
- // it updates its location correctly; see
- // https://bugs.webkit.org/show_bug.cgi?id=15793.
- g_object_set(m_webView, "has-tooltip", FALSE, NULL);
-
- GdkDisplay* gdkDisplay;
- GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView));
- if (GTK_WIDGET_TOPLEVEL(window))
- gdkDisplay = gtk_widget_get_display(window);
- else
- gdkDisplay = gdk_display_get_default();
- gtk_tooltip_trigger_tooltip_query(gdkDisplay);
-
// check if the element is a link...
bool isLink = hit.isLiveLink();
if (isLink) {
@@ -475,16 +473,7 @@ void ChromeClient::mouseDidMoveOverElement(const HitTestResult& hit, unsigned mo
void ChromeClient::setToolTip(const String& toolTip, TextDirection)
{
-#if GTK_CHECK_VERSION(2,12,0)
- if (toolTip.isEmpty())
- g_object_set(m_webView, "has-tooltip", FALSE, NULL);
- else
- gtk_widget_set_tooltip_text(GTK_WIDGET(m_webView), toolTip.utf8().data());
-#else
- // TODO: Support older GTK+ versions
- // See http://bugs.webkit.org/show_bug.cgi?id=15793
- notImplemented();
-#endif
+ webkit_web_view_set_tooltip_text(m_webView, toolTip.utf8().data());
}
void ChromeClient::print(Frame* frame)
diff --git a/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp b/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
index 0efc9fa..2b355cb 100644
--- a/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
@@ -30,6 +30,7 @@
#include "config.h"
#include "DocumentLoaderGtk.h"
+#include "webkitprivate.h"
#include "webkitwebdatasource.h"
using namespace WebCore;
@@ -60,7 +61,16 @@ void DocumentLoader::attachToFrame()
{
WebCore::DocumentLoader::attachToFrame();
- refDataSource();
+ if (m_dataSource) {
+ refDataSource();
+ return;
+ }
+
+ // We may get to here without having a datasource, when the data
+ // is coming from the page cache.
+ WebKitWebDataSource* dataSource = webkit_web_data_source_new_with_loader(this);
+ setDataSource(dataSource);
+ g_object_unref(dataSource);
}
void DocumentLoader::detachFromFrame()
@@ -110,6 +120,7 @@ void DocumentLoader::unrefDataSource()
ASSERT(m_dataSource);
m_isDataSourceReffed = false;
g_object_unref(m_dataSource);
+ m_dataSource = 0;
}
} // end namespace WebKit
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
index 6ec6baf..02d1a53 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
@@ -24,6 +24,7 @@
#include "EditorClientGtk.h"
#include "CString.h"
+#include "DataObjectGtk.h"
#include "EditCommand.h"
#include "Editor.h"
#include <enchant.h>
@@ -35,6 +36,7 @@
#include "KeyboardEvent.h"
#include "NotImplemented.h"
#include "Page.h"
+#include "PasteboardHelperGtk.h"
#include "PlatformKeyboardEvent.h"
#include "markup.h"
#include "webkitprivate.h"
@@ -185,35 +187,11 @@ void EditorClient::respondToChangedContents()
notImplemented();
}
-static void clipboard_get_contents_cb(GtkClipboard* clipboard, GtkSelectionData* selection_data, guint info, gpointer data)
-{
- WebKitWebView* webView = reinterpret_cast<WebKitWebView*>(data);
- Frame* frame = core(webView)->focusController()->focusedOrMainFrame();
- PassRefPtr<Range> selectedRange = frame->selection()->toNormalizedRange();
-
- if (static_cast<gint>(info) == WEBKIT_WEB_VIEW_TARGET_INFO_HTML) {
- String markup = createMarkup(selectedRange.get(), 0, AnnotateForInterchange);
- gtk_selection_data_set(selection_data, selection_data->target, 8,
- reinterpret_cast<const guchar*>(markup.utf8().data()), markup.utf8().length());
- } else {
- String text = selectedRange->text();
- gtk_selection_data_set_text(selection_data, text.utf8().data(), text.utf8().length());
- }
-}
-
-static void clipboard_clear_contents_cb(GtkClipboard* clipboard, gpointer data)
-{
- WebKitWebView* webView = reinterpret_cast<WebKitWebView*>(data);
- Frame* frame = core(webView)->focusController()->focusedOrMainFrame();
-
- // Collapse the selection without clearing it
- frame->selection()->setBase(frame->selection()->extent(), frame->selection()->affinity());
-}
-
void EditorClient::respondToChangedSelection()
{
WebKitWebViewPrivate* priv = m_webView->priv;
- Frame* targetFrame = core(m_webView)->focusController()->focusedOrMainFrame();
+ WebCore::Page* corePage = core(m_webView);
+ Frame* targetFrame = corePage->focusController()->focusedOrMainFrame();
if (!targetFrame)
return;
@@ -221,16 +199,16 @@ void EditorClient::respondToChangedSelection()
if (targetFrame->editor()->ignoreCompositionSelectionChange())
return;
+#if PLATFORM(X11)
GtkClipboard* clipboard = gtk_widget_get_clipboard(GTK_WIDGET(m_webView), GDK_SELECTION_PRIMARY);
+ DataObjectGtk* dataObject = DataObjectGtk::forClipboard(clipboard);
+
if (targetFrame->selection()->isRange()) {
- GtkTargetList* targetList = webkit_web_view_get_copy_target_list(m_webView);
- gint targetCount;
- GtkTargetEntry* targets = gtk_target_table_new_from_list(targetList, &targetCount);
- gtk_clipboard_set_with_owner(clipboard, targets, targetCount,
- clipboard_get_contents_cb, clipboard_clear_contents_cb, G_OBJECT(m_webView));
- gtk_target_table_free(targets, targetCount);
- } else if (gtk_clipboard_get_owner(clipboard) == G_OBJECT(m_webView))
- gtk_clipboard_clear(clipboard);
+ dataObject->clear();
+ dataObject->setRange(targetFrame->selection()->toNormalizedRange());
+ pasteboardHelperInstance()->writeClipboardContents(clipboard, m_webView);
+ }
+#endif
if (!targetFrame->editor()->hasComposition())
return;
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index 0eaa7c8..8f1bec2 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -33,6 +33,7 @@
#include "FrameView.h"
#include "FrameTree.h"
#include "GOwnPtr.h"
+#include "GRefPtr.h"
#include "GtkPluginWidget.h"
#include "HTMLAppletElement.h"
#include "HTMLFormElement.h"
@@ -76,6 +77,7 @@ namespace WebKit {
FrameLoaderClient::FrameLoaderClient(WebKitWebFrame* frame)
: m_frame(frame)
, m_policyDecision(0)
+ , m_loadingErrorPage(false)
, m_pluginView(0)
, m_hasSentResponseToPlugin(false)
{
@@ -440,7 +442,7 @@ PassRefPtr<Widget> FrameLoaderClient::createPlugin(const IntSize& pluginSize, HT
CString mimeTypeString = mimeType.utf8();
ASSERT(paramNames.size() == paramValues.size());
- GOwnPtr<GHashTable> hash(g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free));
+ GRefPtr<GHashTable> hash = adoptGRef(g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free));
for (unsigned i = 0; i < paramNames.size(); ++i) {
g_hash_table_insert(hash.get(),
g_strdup(paramNames[i].utf8().data()),
@@ -567,6 +569,11 @@ bool FrameLoaderClient::hasWebView() const
void FrameLoaderClient::dispatchDidFinishLoad()
{
+ if (m_loadingErrorPage) {
+ m_loadingErrorPage = false;
+ return;
+ }
+
loadDone(m_frame, true);
}
@@ -639,7 +646,9 @@ void FrameLoaderClient::setCopiesOnScroll()
void FrameLoaderClient::detachedFromParent2()
{
- notImplemented();
+ FrameView *view = core(m_frame)->view();
+ if (view)
+ view->setGtkAdjustments(0, 0);
}
void FrameLoaderClient::detachedFromParent3()
@@ -700,6 +709,9 @@ void FrameLoaderClient::dispatchWillClose()
void FrameLoaderClient::dispatchDidReceiveIcon()
{
+ if (m_loadingErrorPage)
+ return;
+
WebKitWebView* webView = getViewFromFrame(m_frame);
// Avoid reporting favicons for non-main frames.
@@ -712,11 +724,17 @@ void FrameLoaderClient::dispatchDidReceiveIcon()
void FrameLoaderClient::dispatchDidStartProvisionalLoad()
{
+ if (m_loadingErrorPage)
+ return;
+
notifyStatus(m_frame, WEBKIT_LOAD_PROVISIONAL);
}
void FrameLoaderClient::dispatchDidReceiveTitle(const String& title)
{
+ if (m_loadingErrorPage)
+ return;
+
WebKitWebFramePrivate* priv = m_frame->priv;
g_free(priv->title);
priv->title = g_strdup(title.utf8().data());
@@ -733,6 +751,9 @@ void FrameLoaderClient::dispatchDidReceiveTitle(const String& title)
void FrameLoaderClient::dispatchDidCommitLoad()
{
+ if (m_loadingErrorPage)
+ return;
+
/* Update the URI once first data has been received.
* This means the URI is valid and successfully identify the page that's going to be loaded.
*/
@@ -740,7 +761,7 @@ void FrameLoaderClient::dispatchDidCommitLoad()
WebKitWebFramePrivate* priv = m_frame->priv;
g_free(priv->uri);
- priv->uri = g_strdup(core(m_frame)->loader()->url().prettyURL().utf8().data());
+ priv->uri = g_strdup(core(m_frame)->loader()->activeDocumentLoader()->url().prettyURL().utf8().data());
g_free(priv->title);
priv->title = NULL;
g_object_notify(G_OBJECT(m_frame), "uri");
@@ -773,6 +794,9 @@ void FrameLoaderClient::dispatchDidFirstLayout()
void FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout()
{
+ if (m_loadingErrorPage)
+ return;
+
notifyStatus(m_frame, WEBKIT_LOAD_FIRST_VISUALLY_NON_EMPTY_LAYOUT);
}
@@ -837,9 +861,10 @@ String FrameLoaderClient::generatedMIMETypeForURLScheme(const String&) const
void FrameLoaderClient::finishedLoading(WebCore::DocumentLoader* documentLoader)
{
- if (!m_pluginView)
- committedLoad(documentLoader, 0, 0);
- else {
+ if (!m_pluginView) {
+ FrameLoader* loader = documentLoader->frameLoader();
+ loader->setEncoding(m_response.textEncodingName(), false);
+ } else {
m_pluginView->didFinishLoading();
m_pluginView = 0;
m_hasSentResponseToPlugin = false;
@@ -933,6 +958,9 @@ void FrameLoaderClient::dispatchDidFailProvisionalLoad(const ResourceError& erro
void FrameLoaderClient::dispatchDidFailLoad(const ResourceError& error)
{
+ if (m_loadingErrorPage)
+ return;
+
notifyStatus(m_frame, WEBKIT_LOAD_FAILED);
WebKitWebView* webView = getViewFromFrame(m_frame);
@@ -952,6 +980,8 @@ void FrameLoaderClient::dispatchDidFailLoad(const ResourceError& error)
return;
}
+ m_loadingErrorPage = true;
+
String content;
gchar* fileContent = 0;
gchar* errorURI = g_filename_to_uri(DATA_DIR"/webkit-1.0/resources/error.html", NULL, NULL);
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
index cace770..b364873 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
@@ -184,6 +184,8 @@ namespace WebKit {
WebCore::ResourceResponse m_response;
WebKitWebPolicyDecision* m_policyDecision;
+ bool m_loadingErrorPage;
+
// Plugin view to redirect data to
WebCore::PluginView* m_pluginView;
bool m_hasSentResponseToPlugin;
diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
index a06ff50..99bc627 100644
--- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
@@ -44,13 +44,8 @@ InspectorClient::InspectorClient(WebKitWebView* webView)
void InspectorClient::inspectorDestroyed()
{
- if (m_webView) {
- gboolean handled = FALSE;
- g_signal_emit_by_name(m_webInspector, "destroy", &handled);
-
- /* we can now dispose our own reference */
+ if (m_webInspector)
g_object_unref(m_webInspector);
- }
delete this;
}
@@ -64,6 +59,7 @@ void InspectorClient::webViewDestroyed()
// something else, and the inspector will be referenced again,
// there.
g_object_unref(m_webInspector);
+ m_webInspector = 0;
}
Page* InspectorClient::createPage()
diff --git a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
index c71ef1b..8406ada 100644
--- a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
@@ -20,13 +20,14 @@
#include "config.h"
#include "PasteboardHelperGtk.h"
+#include "DataObjectGtk.h"
+#include "FocusController.h"
#include "Frame.h"
+#include <gtk/gtk.h>
#include "webkitwebframe.h"
#include "webkitwebview.h"
#include "webkitprivate.h"
-#include <gtk/gtk.h>
-
using namespace WebCore;
namespace WebKit {
@@ -79,4 +80,102 @@ gint PasteboardHelperGtk::getWebViewTargetInfoHtml() const
return WEBKIT_WEB_VIEW_TARGET_INFO_HTML;
}
+static void fillSelectionData(GtkSelectionData* selectionData, guint info, DataObjectGtk* dataObject)
+{
+ if (info == WEBKIT_WEB_VIEW_TARGET_INFO_TEXT)
+ gtk_selection_data_set_text(selectionData, dataObject->text().utf8().data(), -1);
+ else if (info == WEBKIT_WEB_VIEW_TARGET_INFO_HTML) {
+ GOwnPtr<gchar> markup(g_strdup(dataObject->markup().utf8().data()));
+ gtk_selection_data_set(selectionData, selectionData->target, 8,
+ reinterpret_cast<const guchar*>(markup.get()),
+ strlen(markup.get()));
+ }
+}
+
+static GtkTargetList* targetListForDataObject(DataObjectGtk* dataObject)
+{
+ GtkTargetList* list = gtk_target_list_new(0, 0);
+
+ if (dataObject->hasText())
+ gtk_target_list_add_text_targets(list, WEBKIT_WEB_VIEW_TARGET_INFO_TEXT);
+
+ if (dataObject->hasMarkup())
+ gtk_target_list_add(list, gdkMarkupAtom, 0, WEBKIT_WEB_VIEW_TARGET_INFO_HTML);
+
+ return list;
+}
+
+static bool settingClipboard = false;
+static void getClipboardContentsCallback(GtkClipboard* clipboard, GtkSelectionData *selectionData, guint info, gpointer data)
+{
+ DataObjectGtk* dataObject = DataObjectGtk::forClipboard(clipboard);
+ ASSERT(dataObject);
+ fillSelectionData(selectionData, info, dataObject);
+}
+
+static void clearClipboardContentsCallback(GtkClipboard* clipboard, gpointer data)
+{
+ // GTK will call the clear clipboard callback while setting clipboard data.
+ // We don't actually want to clear the DataObject during that time.
+ if (settingClipboard)
+ return;
+
+ DataObjectGtk* dataObject = DataObjectGtk::forClipboard(clipboard);
+ ASSERT(dataObject);
+ dataObject->clear();
+
+ // This will be true for clipboards other than X11 primary.
+ if (!data)
+ return;
+
+ WebKitWebView* webView = reinterpret_cast<WebKitWebView*>(data);
+ WebCore::Page* corePage = core(webView);
+
+ if (!corePage || !corePage->focusController()) {
+ g_object_unref(webView);
+ return;
+ }
+
+ Frame* frame = corePage->focusController()->focusedOrMainFrame();
+
+ // Collapse the selection without clearing it
+ ASSERT(frame);
+ frame->selection()->setBase(frame->selection()->extent(), frame->selection()->affinity());
+
+ g_object_unref(webView);
+}
+
+void PasteboardHelperGtk::writeClipboardContents(GtkClipboard* clipboard, gpointer data)
+{
+ DataObjectGtk* dataObject = DataObjectGtk::forClipboard(clipboard);
+ GtkTargetList* list = targetListForDataObject(dataObject);
+
+ int numberOfTargets;
+ GtkTargetEntry* table = gtk_target_table_new_from_list(list, &numberOfTargets);
+
+ if (numberOfTargets > 0 && table) {
+ settingClipboard = true;
+
+ // Protect the web view from being destroyed before one of the clipboard callbacks
+ // is called. Balanced in both getClipboardContentsCallback and
+ // clearClipboardContentsCallback.
+ WebKitWebView* webView = static_cast<WebKitWebView*>(data);
+ g_object_ref(webView);
+
+ gboolean succeeded = gtk_clipboard_set_with_data(clipboard, table, numberOfTargets,
+ getClipboardContentsCallback,
+ clearClipboardContentsCallback, data);
+ if (!succeeded)
+ g_object_unref(webView);
+
+ settingClipboard = false;
+ } else
+ gtk_clipboard_clear(clipboard);
+
+ if (table)
+ gtk_target_table_free(table, numberOfTargets);
+
+ gtk_target_list_unref(list);
+}
+
}
diff --git a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h
index 12ba207..97eff90 100644
--- a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h
+++ b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h
@@ -47,6 +47,8 @@ public:
virtual GtkTargetList* targetList() const;
virtual gint getWebViewTargetInfoHtml() const;
+ void writeClipboardContents(GtkClipboard* clipboard, gpointer data = 0);
+
private:
GtkTargetList* m_targetList;
};
diff --git a/WebKit/gtk/docs/webkitgtk-docs.sgml b/WebKit/gtk/docs/webkitgtk-docs.sgml
index ca478f9..d61a4fd 100644
--- a/WebKit/gtk/docs/webkitgtk-docs.sgml
+++ b/WebKit/gtk/docs/webkitgtk-docs.sgml
@@ -29,6 +29,7 @@
<xi:include href="xml/webkitsoupauthdialog.xml"/>
<xi:include href="xml/webkitsecurityorigin.xml"/>
<xi:include href="xml/webkitwebwindowfeatures.xml"/>
+ <xi:include href="xml/webkitcachemodel.xml"/>
</chapter>
<chapter>
@@ -96,4 +97,7 @@
<index id="index-1.1.17" role="1.1.17">
<title>Index of new symbols in 1.1.17</title>
</index>
+ <index id="index-1.1.18" role="1.1.18">
+ <title>Index of new symbols in 1.1.18</title>
+ </index>
</book>
diff --git a/WebKit/gtk/docs/webkitgtk-sections.txt b/WebKit/gtk/docs/webkitgtk-sections.txt
index 1f4d1b7..9574280 100644
--- a/WebKit/gtk/docs/webkitgtk-sections.txt
+++ b/WebKit/gtk/docs/webkitgtk-sections.txt
@@ -58,6 +58,7 @@ WebKitWebBackForwardListClass
<FILE>webkitwebhistoryitem</FILE>
<TITLE>WebKitWebHistoryItem</TITLE>
WebKitWebHistoryItem
+webkit_web_history_item_copy
webkit_web_history_item_get_alternate_title
webkit_web_history_item_get_last_visited_time
webkit_web_history_item_get_original_uri
@@ -91,6 +92,7 @@ webkit_web_frame_get_global_context
webkit_web_frame_get_horizontal_scrollbar_policy
webkit_web_frame_get_load_status
webkit_web_frame_get_name
+webkit_web_frame_get_network_response
webkit_web_frame_get_parent
webkit_web_frame_get_provisional_data_source
webkit_web_frame_get_security_origin
@@ -419,6 +421,7 @@ webkit_web_view_get_encoding
webkit_web_view_get_focused_frame
webkit_web_view_get_full_content_zoom
webkit_web_view_get_hit_test_result
+webkit_web_view_get_icon_uri
webkit_web_view_get_inspector
webkit_web_view_get_load_status
webkit_web_view_get_main_frame
@@ -581,3 +584,9 @@ webkit_micro_version
webkit_minor_version
</SECTION>
+<SECTION>
+<FILE>webkitcachemodel</FILE>
+WebKitCacheModel
+webkit_get_cache_model
+webkit_set_cache_model
+</SECTION>
diff --git a/WebKit/gtk/tests/testatk.c b/WebKit/gtk/tests/testatk.c
index c5f4db3..7db274a 100644
--- a/WebKit/gtk/tests/testatk.c
+++ b/WebKit/gtk/tests/testatk.c
@@ -34,6 +34,10 @@ static const char* contentsInTextarea = "<html><body><textarea cols='80'>This is
static const char* contentsInTextInput = "<html><body><input type='text' size='80' value='This is a test. This is the second sentence. And this the third.'/></body></html>";
+static const char* contentsInParagraphAndBodySimple = "<html><body><p>This is a test.</p>Hello world.</body></html>";
+
+static const char* contentsInParagraphAndBodyModerate = "<html><body><p>This is a test.</p>Hello world.<br /><font color='#00cc00'>This sentence is green.</font><br />This one is not.</body></html>";
+
static gboolean bail_out(GMainLoop* loop)
{
if (g_main_loop_is_running(loop))
@@ -221,8 +225,6 @@ static void test_webkit_atk_get_text_at_offset_forms(void)
g_assert(obj);
obj = atk_object_ref_accessible_child(obj, 0);
g_assert(obj);
- obj = atk_object_ref_accessible_child(obj, 0);
- g_assert(obj);
text_obj = ATK_TEXT(obj);
g_assert(ATK_IS_TEXT(text_obj));
@@ -254,8 +256,6 @@ static void test_webkit_atk_get_text_at_offset(void)
g_assert(obj);
obj = atk_object_ref_accessible_child(obj, 0);
g_assert(obj);
- obj = atk_object_ref_accessible_child(obj, 0);
- g_assert(obj);
text_obj = ATK_TEXT(obj);
g_assert(ATK_IS_TEXT(text_obj));
@@ -287,8 +287,6 @@ static void test_webkit_atk_get_text_at_offset_newlines(void)
g_assert(obj);
obj = atk_object_ref_accessible_child(obj, 0);
g_assert(obj);
- obj = atk_object_ref_accessible_child(obj, 0);
- g_assert(obj);
text_obj = ATK_TEXT(obj);
g_assert(ATK_IS_TEXT(text_obj));
@@ -364,6 +362,94 @@ static void test_webkit_atk_get_text_at_offset_text_input(void)
g_object_unref(webView);
}
+static void testWebkitAtkGetTextInParagraphAndBodySimple(void)
+{
+ WebKitWebView* webView;
+ AtkObject* obj;
+ AtkObject* obj1;
+ AtkObject* obj2;
+ GMainLoop* loop;
+ AtkText* textObj1;
+ AtkText* textObj2;
+
+ webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+ g_object_ref_sink(webView);
+ GtkAllocation alloc = { 0, 0, 800, 600 };
+ gtk_widget_size_allocate(GTK_WIDGET(webView), &alloc);
+ webkit_web_view_load_string(webView, contentsInParagraphAndBodySimple, NULL, NULL, NULL);
+ loop = g_main_loop_new(NULL, TRUE);
+
+ g_timeout_add(100, (GSourceFunc)bail_out, loop);
+ g_main_loop_run(loop);
+
+ /* Get to the inner AtkText object */
+ obj = gtk_widget_get_accessible(GTK_WIDGET(webView));
+ g_assert(obj);
+ obj1 = atk_object_ref_accessible_child(obj, 0);
+ g_assert(obj1);
+ obj2 = atk_object_ref_accessible_child(obj, 1);
+ g_assert(obj2);
+
+ textObj1 = ATK_TEXT(obj1);
+ g_assert(ATK_IS_TEXT(textObj1));
+ textObj2 = ATK_TEXT(obj2);
+ g_assert(ATK_IS_TEXT(textObj2));
+
+ char *text = atk_text_get_text(textObj1, 0, -1);
+ g_assert_cmpstr(text, ==, "This is a test.");
+
+ text = atk_text_get_text(textObj2, 0, 12);
+ g_assert_cmpstr(text, ==, "Hello world.");
+
+ g_object_unref(obj1);
+ g_object_unref(obj2);
+ g_object_unref(webView);
+}
+
+static void testWebkitAtkGetTextInParagraphAndBodyModerate(void)
+{
+ WebKitWebView* webView;
+ AtkObject* obj;
+ AtkObject* obj1;
+ AtkObject* obj2;
+ GMainLoop* loop;
+ AtkText* textObj1;
+ AtkText* textObj2;
+
+ webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+ g_object_ref_sink(webView);
+ GtkAllocation alloc = { 0, 0, 800, 600 };
+ gtk_widget_size_allocate(GTK_WIDGET(webView), &alloc);
+ webkit_web_view_load_string(webView, contentsInParagraphAndBodyModerate, NULL, NULL, NULL);
+ loop = g_main_loop_new(NULL, TRUE);
+
+ g_timeout_add(100, (GSourceFunc)bail_out, loop);
+ g_main_loop_run(loop);
+
+ /* Get to the inner AtkText object */
+ obj = gtk_widget_get_accessible(GTK_WIDGET(webView));
+ g_assert(obj);
+ obj1 = atk_object_ref_accessible_child(obj, 0);
+ g_assert(obj1);
+ obj2 = atk_object_ref_accessible_child(obj, 1);
+ g_assert(obj2);
+
+ textObj1 = ATK_TEXT(obj1);
+ g_assert(ATK_IS_TEXT(textObj1));
+ textObj2 = ATK_TEXT(obj2);
+ g_assert(ATK_IS_TEXT(textObj2));
+
+ char *text = atk_text_get_text(textObj1, 0, -1);
+ g_assert_cmpstr(text, ==, "This is a test.");
+
+ text = atk_text_get_text(textObj2, 0, 53);
+ g_assert_cmpstr(text, ==, "Hello world.\nThis sentence is green.\nThis one is not.");
+
+ g_object_unref(obj1);
+ g_object_unref(obj2);
+ g_object_unref(webView);
+}
+
int main(int argc, char** argv)
{
g_thread_init(NULL);
@@ -375,6 +461,8 @@ int main(int argc, char** argv)
g_test_add_func("/webkit/atk/get_text_at_offset_newlines", test_webkit_atk_get_text_at_offset_newlines);
g_test_add_func("/webkit/atk/get_text_at_offset_textarea", test_webkit_atk_get_text_at_offset_textarea);
g_test_add_func("/webkit/atk/get_text_at_offset_text_input", test_webkit_atk_get_text_at_offset_text_input);
+ g_test_add_func("/webkit/atk/getTextInParagraphAndBodySimple", testWebkitAtkGetTextInParagraphAndBodySimple);
+ g_test_add_func("/webkit/atk/getTextInParagraphAndBodyModerate", testWebkitAtkGetTextInParagraphAndBodyModerate);
return g_test_run ();
}
diff --git a/WebKit/gtk/tests/testdownload.c b/WebKit/gtk/tests/testdownload.c
index 0d964ed..05c3a8d 100644
--- a/WebKit/gtk/tests/testdownload.c
+++ b/WebKit/gtk/tests/testdownload.c
@@ -26,6 +26,7 @@
GMainLoop* loop;
char* temporaryFilename = NULL;
+WebKitDownload* theDownload = NULL;
static void
test_webkit_download_create(void)
@@ -87,6 +88,7 @@ download_requested_cb(WebKitWebView* web_view,
WebKitDownload* download,
gboolean* beenThere)
{
+ theDownload = download;
*beenThere = TRUE;
if (temporaryFilename) {
gchar *uri = g_filename_to_uri(temporaryFilename, NULL, NULL);
@@ -101,8 +103,19 @@ download_requested_cb(WebKitWebView* web_view,
return TRUE;
}
+static gboolean
+set_filename(gchar* filename)
+{
+ gchar *uri = g_filename_to_uri(filename, NULL, NULL);
+ webkit_download_set_destination_uri(theDownload, uri);
+ g_free(uri);
+ temporaryFilename = filename;
+ webkit_download_start(theDownload);
+ return FALSE;
+}
+
static void
-test_webkit_download_perform(void)
+test_webkit_download_perform(gboolean asynch)
{
WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
@@ -121,16 +134,23 @@ test_webkit_download_perform(void)
* utilities file, because we have a very similar one in
* testwebframe.c */
GError *error = NULL;
- int fd = g_file_open_tmp ("webkit-testwebdownload-XXXXXX",
- &temporaryFilename, &error);
+ gchar* filename;
+ int fd = g_file_open_tmp("webkit-testwebdownload-XXXXXX", &filename, &error);
close(fd);
if (error)
g_critical("Failed to open a temporary file for writing: %s.", error->message);
- if (g_unlink(temporaryFilename) == -1)
+ if (g_unlink(filename) == -1)
g_critical("Failed to delete the temporary file: %s.", g_strerror(errno));
+ if (asynch)
+ g_idle_add((GSourceFunc)set_filename, filename);
+ else
+ temporaryFilename = filename;
+
+ theDownload = NULL;
+
loop = g_main_loop_new(NULL, TRUE);
webkit_web_view_load_uri(webView, "http://gnome.org/");
g_main_loop_run(loop);
@@ -145,6 +165,18 @@ test_webkit_download_perform(void)
g_object_unref(webView);
}
+static void
+test_webkit_download_synch(void)
+{
+ test_webkit_download_perform(FALSE);
+}
+
+static void
+test_webkit_download_asynch(void)
+{
+ test_webkit_download_perform(TRUE);
+}
+
int main(int argc, char** argv)
{
g_thread_init(NULL);
@@ -152,7 +184,8 @@ int main(int argc, char** argv)
g_test_bug_base("https://bugs.webkit.org/");
g_test_add_func("/webkit/download/create", test_webkit_download_create);
- g_test_add_func("/webkit/download/perform", test_webkit_download_perform);
+ g_test_add_func("/webkit/download/synch", test_webkit_download_synch);
+ g_test_add_func("/webkit/download/asynch", test_webkit_download_asynch);
return g_test_run ();
}
diff --git a/WebKit/gtk/tests/testloading.c b/WebKit/gtk/tests/testloading.c
index c1f0fac..fd9a05c 100644
--- a/WebKit/gtk/tests/testloading.c
+++ b/WebKit/gtk/tests/testloading.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Gustavo Noronha Silva
+ * Copyright (C) 2009, 2010 Gustavo Noronha Silva
* Copyright (C) 2009 Igalia S.L.
*
* This library is free software; you can redistribute it and/or
@@ -19,10 +19,45 @@
*/
#include <gtk/gtk.h>
+#include <libsoup/soup.h>
+#include <string.h>
#include <webkit/webkit.h>
#if GLIB_CHECK_VERSION(2, 16, 0) && GTK_CHECK_VERSION(2, 14, 0)
+/* This string has to be rather big because of the cancelled test - it
+ * looks like soup refuses to send or receive a too small chunk */
+#define HTML_STRING "<html><body>Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!</body></html>"
+
+SoupURI* base_uri;
+
+/* For real request testing */
+static void
+server_callback(SoupServer* server, SoupMessage* msg,
+ const char* path, GHashTable* query,
+ SoupClientContext* context, gpointer data)
+{
+ if (msg->method != SOUP_METHOD_GET) {
+ soup_message_set_status(msg, SOUP_STATUS_NOT_IMPLEMENTED);
+ return;
+ }
+
+ soup_message_set_status(msg, SOUP_STATUS_OK);
+
+ if (g_str_equal(path, "/test_loading_status") || g_str_equal(path, "/test_loading_status2"))
+ soup_message_body_append(msg->response_body, SOUP_MEMORY_STATIC, HTML_STRING, strlen(HTML_STRING));
+ else if (g_str_equal(path, "/test_load_error")) {
+ soup_message_set_status(msg, SOUP_STATUS_CANT_CONNECT);
+ } else if (g_str_equal(path, "/test_loading_cancelled")) {
+ soup_message_headers_set_encoding(msg->response_headers, SOUP_ENCODING_CHUNKED);
+ soup_message_body_append(msg->response_body, SOUP_MEMORY_STATIC, HTML_STRING, strlen(HTML_STRING));
+ soup_server_unpause_message(server, msg);
+ return;
+ }
+
+ soup_message_body_complete(msg->response_body);
+}
+
typedef struct {
WebKitWebView* webView;
GMainLoop *loop;
@@ -53,6 +88,18 @@ static void web_loading_fixture_teardown(WebLoadingFixture* fixture, gconstpoint
g_main_loop_unref(fixture->loop);
}
+static char* get_uri_for_path(const char* path)
+{
+ SoupURI* uri;
+ char* uri_string;
+
+ uri = soup_uri_new_with_base(base_uri, path);
+ uri_string = soup_uri_to_string(uri, FALSE);
+ soup_uri_free (uri);
+
+ return uri_string;
+}
+
static void load_finished_cb(WebKitWebView* web_view, WebKitWebFrame* web_frame, WebLoadingFixture* fixture)
{
g_assert(fixture->has_been_provisional);
@@ -98,6 +145,8 @@ static void status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixt
static void test_loading_status(WebLoadingFixture* fixture, gconstpointer data)
{
+ char* uri_string;
+
g_assert_cmpint(webkit_web_view_get_load_status(fixture->webView), ==, WEBKIT_LOAD_PROVISIONAL);
g_object_connect(G_OBJECT(fixture->webView),
@@ -105,10 +154,13 @@ static void test_loading_status(WebLoadingFixture* fixture, gconstpointer data)
"signal::load-finished", G_CALLBACK(load_finished_cb), fixture,
NULL);
+ uri_string = get_uri_for_path("/test_loading_status");
+
/* load_uri will trigger the navigation-policy-decision-requested
* signal emission;
*/
- webkit_web_view_load_uri(fixture->webView, "http://gnome.org/");
+ webkit_web_view_load_uri(fixture->webView, uri_string);
+ g_free(uri_string);
g_main_loop_run(fixture->loop);
}
@@ -119,23 +171,24 @@ static void load_error_status_changed_cb(GObject* object, GParamSpec* pspec, Web
switch(status) {
case WEBKIT_LOAD_PROVISIONAL:
- /* We are going to go through here twice, so don't assert
- * anything */
+ g_assert(!fixture->has_been_provisional);
fixture->has_been_provisional = TRUE;
break;
+ case WEBKIT_LOAD_COMMITTED:
+ g_assert(!fixture->has_been_committed);
+ fixture->has_been_committed = TRUE;
+ break;
case WEBKIT_LOAD_FINISHED:
g_assert(fixture->has_been_provisional);
g_assert(fixture->has_been_load_error);
g_assert(fixture->has_been_failed);
- /* We are checking that only one FINISHED is received in the
- whole cycle, so assert it's FALSE */
g_assert(!fixture->has_been_finished);
fixture->has_been_finished = TRUE;
- g_main_loop_quit(fixture->loop);
break;
case WEBKIT_LOAD_FAILED:
g_assert(!fixture->has_been_failed);
fixture->has_been_failed = TRUE;
+ g_main_loop_quit(fixture->loop);
break;
default:
break;
@@ -153,13 +206,24 @@ static gboolean load_error_cb(WebKitWebView* webView, WebKitWebFrame* frame, con
static void test_loading_error(WebLoadingFixture* fixture, gconstpointer data)
{
+ char* uri_string;
+
g_test_bug("28842");
g_signal_connect(fixture->webView, "load-error", G_CALLBACK(load_error_cb), fixture);
g_signal_connect(fixture->webView, "notify::load-status", G_CALLBACK(load_error_status_changed_cb), fixture);
- webkit_web_view_load_uri(fixture->webView, "http://snoetuhsetuhseoutoeutc.com/");
+ uri_string = get_uri_for_path("/test_load_error");
+ webkit_web_view_load_uri(fixture->webView, uri_string);
+ g_free(uri_string);
+
g_main_loop_run(fixture->loop);
+
+ g_assert(fixture->has_been_provisional);
+ g_assert(!fixture->has_been_committed);
+ g_assert(fixture->has_been_load_error);
+ g_assert(fixture->has_been_failed);
+ g_assert(!fixture->has_been_finished);
}
/* Cancelled load */
@@ -211,20 +275,142 @@ static void load_cancelled_status_changed_cb(GObject* object, GParamSpec* pspec,
static void test_loading_cancelled(WebLoadingFixture* fixture, gconstpointer data)
{
+ char* uri_string;
+
g_test_bug("29644");
g_signal_connect(fixture->webView, "load-error", G_CALLBACK(load_cancelled_cb), fixture);
g_signal_connect(fixture->webView, "notify::load-status", G_CALLBACK(load_cancelled_status_changed_cb), fixture);
- webkit_web_view_load_uri(fixture->webView, "http://google.com/");
+ uri_string = get_uri_for_path("/test_loading_cancelled");
+ webkit_web_view_load_uri(fixture->webView, uri_string);
+ g_free(uri_string);
+
g_main_loop_run(fixture->loop);
}
+static void load_goback_status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixture* fixture)
+{
+ WebKitLoadStatus status = webkit_web_view_get_load_status(WEBKIT_WEB_VIEW(object));
+
+ switch(status) {
+ case WEBKIT_LOAD_PROVISIONAL:
+ g_assert(!fixture->has_been_provisional);
+ fixture->has_been_provisional = TRUE;
+ break;
+ case WEBKIT_LOAD_COMMITTED:
+ g_assert(fixture->has_been_provisional);
+ fixture->has_been_committed = TRUE;
+ break;
+ case WEBKIT_LOAD_FAILED:
+ g_assert_not_reached();
+ break;
+ case WEBKIT_LOAD_FINISHED:
+ g_assert(fixture->has_been_provisional);
+ g_assert(fixture->has_been_committed);
+ fixture->has_been_finished = TRUE;
+ g_main_loop_quit(fixture->loop);
+ break;
+ default:
+ break;
+ }
+}
+
+static void load_wentback_status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixture* fixture)
+{
+ WebKitLoadStatus status = webkit_web_view_get_load_status(WEBKIT_WEB_VIEW(object));
+ char* uri_string;
+ char* uri_string2;
+
+ uri_string = get_uri_for_path("/test_loading_status");
+ uri_string2 = get_uri_for_path("/test_loading_status2");
+
+ switch(status) {
+ case WEBKIT_LOAD_PROVISIONAL:
+ g_assert_cmpstr(webkit_web_view_get_uri(fixture->webView), ==, uri_string2);
+ break;
+ case WEBKIT_LOAD_COMMITTED:
+ g_assert_cmpstr(webkit_web_view_get_uri(fixture->webView), ==, uri_string);
+ break;
+ case WEBKIT_LOAD_FAILED:
+ g_assert_not_reached();
+ break;
+ case WEBKIT_LOAD_FINISHED:
+ g_assert_cmpstr(webkit_web_view_get_uri(fixture->webView), ==, uri_string);
+ g_main_loop_quit(fixture->loop);
+ break;
+ default:
+ break;
+ }
+
+ g_free(uri_string);
+ g_free(uri_string2);
+}
+
+static void load_error_test(WebKitWebView* webview, WebKitWebFrame* frame, const char* uri, GError* error)
+{
+ g_debug("Error: %s", error->message);
+}
+
+static void test_loading_goback(WebLoadingFixture* fixture, gconstpointer data)
+{
+ char* uri_string;
+
+ g_signal_connect(fixture->webView, "notify::load-status", G_CALLBACK(load_goback_status_changed_cb), fixture);
+
+ g_signal_connect(fixture->webView, "load-error", G_CALLBACK(load_error_test), fixture);
+
+ uri_string = get_uri_for_path("/test_loading_status");
+ webkit_web_view_load_uri(fixture->webView, uri_string);
+ g_free(uri_string);
+
+ g_main_loop_run(fixture->loop);
+
+ fixture->has_been_provisional = FALSE;
+ fixture->has_been_committed = FALSE;
+ fixture->has_been_first_visually_non_empty_layout = FALSE;
+ fixture->has_been_finished = FALSE;
+ fixture->has_been_failed = FALSE;
+ fixture->has_been_load_error = FALSE;
+
+ uri_string = get_uri_for_path("/test_loading_status2");
+ webkit_web_view_load_uri(fixture->webView, uri_string);
+ g_free(uri_string);
+
+ g_main_loop_run(fixture->loop);
+
+ g_signal_handlers_disconnect_by_func(fixture->webView, load_goback_status_changed_cb, fixture);
+
+ fixture->has_been_provisional = FALSE;
+ fixture->has_been_committed = FALSE;
+ fixture->has_been_first_visually_non_empty_layout = FALSE;
+ fixture->has_been_finished = FALSE;
+ fixture->has_been_failed = FALSE;
+ fixture->has_been_load_error = FALSE;
+
+ g_signal_connect(fixture->webView, "notify::load-status", G_CALLBACK(load_wentback_status_changed_cb), fixture);
+ webkit_web_view_go_back(fixture->webView);
+
+ g_main_loop_run(fixture->loop);
+
+ g_signal_handlers_disconnect_by_func(fixture->webView, load_wentback_status_changed_cb, fixture);
+}
+
int main(int argc, char** argv)
{
+ SoupServer* server;
+
g_thread_init(NULL);
gtk_test_init(&argc, &argv, NULL);
+ server = soup_server_new(SOUP_SERVER_PORT, 0, NULL);
+ soup_server_run_async(server);
+
+ soup_server_add_handler(server, NULL, server_callback, NULL, NULL);
+
+ base_uri = soup_uri_new("http://127.0.0.1/");
+ soup_uri_set_port(base_uri, soup_server_get_port(server));
+
g_test_bug_base("https://bugs.webkit.org/");
g_test_add("/webkit/loading/status",
WebLoadingFixture, NULL,
@@ -241,6 +427,11 @@ int main(int argc, char** argv)
web_loading_fixture_setup,
test_loading_cancelled,
web_loading_fixture_teardown);
+ g_test_add("/webkit/loading/goback",
+ WebLoadingFixture, NULL,
+ web_loading_fixture_setup,
+ test_loading_goback,
+ web_loading_fixture_teardown);
return g_test_run();
}
diff --git a/WebKit/gtk/tests/testmimehandling.c b/WebKit/gtk/tests/testmimehandling.c
index e68dcdf..bfe3148 100644
--- a/WebKit/gtk/tests/testmimehandling.c
+++ b/WebKit/gtk/tests/testmimehandling.c
@@ -23,6 +23,7 @@
#include <libsoup/soup.h>
#include <string.h>
#include <webkit/webkit.h>
+#include <unistd.h>
#if GLIB_CHECK_VERSION(2, 16, 0) && GTK_CHECK_VERSION(2, 14, 0)
@@ -87,10 +88,11 @@ server_callback(SoupServer *server, SoupMessage *msg,
soup_message_body_complete(msg->response_body);
}
-static gboolean idle_quit_loop_cb(gpointer data)
+static void idle_quit_loop_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
{
- g_main_loop_quit(loop);
- return FALSE;
+ if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED ||
+ webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FAILED)
+ g_main_loop_quit(loop);
}
static gboolean mime_type_policy_decision_requested_cb(WebKitWebView* view, WebKitWebFrame* frame,
@@ -138,7 +140,7 @@ static void test_mime_type(const char* name)
loop = g_main_loop_new(NULL, TRUE);
g_object_connect(G_OBJECT(view),
- "signal::load-finished", idle_quit_loop_cb, NULL,
+ "signal::notify::load-status", idle_quit_loop_cb, NULL,
"signal::mime-type-policy-decision-requested", mime_type_policy_decision_requested_cb, g_strdup(name),
NULL);
@@ -175,22 +177,20 @@ int main(int argc, char** argv)
{
SoupServer* server;
SoupURI* soup_uri;
- char* test_dir;
- char* resources_dir;
g_thread_init(NULL);
gtk_test_init(&argc, &argv, NULL);
/* Hopefully make test independent of the path it's called from. */
- test_dir = g_path_get_dirname(argv[0]);
- resources_dir = g_build_path(G_DIR_SEPARATOR_S, test_dir,
- "..", "..", "..", "..",
- "WebKit", "gtk", "tests", "resources",
- NULL);
- g_free(test_dir);
-
- g_chdir(resources_dir);
- g_free(resources_dir);
+ while (!g_file_test ("WebKit/gtk/tests/resources/test.html", G_FILE_TEST_EXISTS)) {
+ char path_name[PATH_MAX];
+
+ g_chdir("..");
+
+ g_assert(!g_str_equal(getcwd(path_name, PATH_MAX), "/"));
+ }
+
+ g_chdir("WebKit/gtk/tests/resources/");
server = soup_server_new(SOUP_SERVER_PORT, 0, NULL);
soup_server_run_async(server);
diff --git a/WebKit/gtk/tests/testwebdatasource.c b/WebKit/gtk/tests/testwebdatasource.c
index fe5c62f..5c0568e 100644
--- a/WebKit/gtk/tests/testwebdatasource.c
+++ b/WebKit/gtk/tests/testwebdatasource.c
@@ -55,35 +55,45 @@ static void test_webkit_web_data_source_get_initial_request()
g_object_unref(view);
}
-static void load_finished_unreachable_cb(WebKitWebView* view, WebKitWebFrame* frame, GMainLoop* loop)
+static void notify_load_status_unreachable_cb(WebKitWebView* view, GParamSpec* pspec, GMainLoop* loop)
{
+ WebKitLoadStatus status = webkit_web_view_get_load_status (view);
+ WebKitWebFrame* frame = webkit_web_view_get_main_frame(view);
+
+ if (status != WEBKIT_LOAD_FINISHED)
+ return;
+
if (waitTimer) {
g_source_remove(waitTimer);
waitTimer = 0;
}
- WebKitWebDataSource* datasource;
- frame = webkit_web_view_get_main_frame(view);
- datasource = webkit_web_frame_get_data_source(frame);
+ WebKitWebDataSource* datasource = webkit_web_frame_get_data_source(frame);
g_assert_cmpstr("http://this.host.does.not.exist/doireallyexist.html", ==,
webkit_web_data_source_get_unreachable_uri(datasource));
- if (g_main_loop_is_running(loop))
- g_main_loop_quit(loop);
+ g_main_loop_quit(loop);
}
-static void load_finished_cb(WebKitWebView* view, WebKitWebFrame* frame, GMainLoop* loop)
+static void notify_load_status_cb(WebKitWebView* view, GParamSpec* pspec, GMainLoop* loop)
{
+ WebKitLoadStatus status = webkit_web_view_get_load_status (view);
+ WebKitWebFrame* frame = webkit_web_view_get_main_frame(view);
+ WebKitWebDataSource* dataSource = webkit_web_frame_get_data_source(frame);
+
+ if (status == WEBKIT_LOAD_COMMITTED) {
+ g_assert(webkit_web_data_source_is_loading(dataSource));
+ return;
+ }
+ else if (status != WEBKIT_LOAD_FINISHED)
+ return;
+
if (waitTimer) {
g_source_remove(waitTimer);
waitTimer = 0;
}
- WebKitWebDataSource* dataSource;
- frame = webkit_web_view_get_main_frame(view);
- dataSource = webkit_web_frame_get_data_source(frame);
-
/* Test get_request */
g_test_message("Testing webkit_web_data_source_get_request");
WebKitNetworkRequest* request = webkit_web_data_source_get_request(dataSource);
@@ -102,21 +112,13 @@ static void load_finished_cb(WebKitWebView* view, WebKitWebFrame* frame, GMainLo
/* FIXME: Add test for get_encoding */
- if (g_main_loop_is_running(loop))
- g_main_loop_quit(loop);
-}
-
-static void load_committed_cb(WebKitWebView* view, WebKitWebFrame* frame)
-{
- WebKitWebDataSource* dataSource = webkit_web_frame_get_data_source(frame);
- g_assert(webkit_web_data_source_is_loading(dataSource));
+ g_main_loop_quit(loop);
}
static gboolean wait_timer_fired(GMainLoop* loop)
{
waitTimer = 0;
- if (g_main_loop_is_running(loop))
- g_main_loop_quit(loop);
+ g_main_loop_quit(loop);
return FALSE;
}
@@ -129,8 +131,7 @@ static void test_webkit_web_data_source()
view = WEBKIT_WEB_VIEW(webkit_web_view_new());
g_object_ref_sink(view);
loop = g_main_loop_new(NULL, TRUE);
- g_signal_connect(view, "load-committed", G_CALLBACK(load_committed_cb), loop);
- g_signal_connect(view, "load-finished", G_CALLBACK(load_finished_cb), loop);
+ g_signal_connect(view, "notify::load-status", G_CALLBACK(notify_load_status_cb), loop);
webkit_web_view_load_uri(view, "http://webkit.org");
if (!waitTimer)
@@ -148,7 +149,7 @@ static void test_webkit_web_data_source_unreachable_uri()
view = WEBKIT_WEB_VIEW(webkit_web_view_new());
g_object_ref_sink(view);
loop = g_main_loop_new(NULL, TRUE);
- g_signal_connect(view, "load-finished", G_CALLBACK(load_finished_unreachable_cb), loop);
+ g_signal_connect(view, "notify::load-status", G_CALLBACK(notify_load_status_unreachable_cb), loop);
webkit_web_view_load_uri(view, "http://this.host.does.not.exist/doireallyexist.html");
if (!waitTimer)
diff --git a/WebKit/gtk/tests/testwebresource.c b/WebKit/gtk/tests/testwebresource.c
index b9cd40b..81457a4 100644
--- a/WebKit/gtk/tests/testwebresource.c
+++ b/WebKit/gtk/tests/testwebresource.c
@@ -163,14 +163,16 @@ static void resource_request_starting_cb(WebKitWebView* web_view, WebKitWebFrame
}
}
-static void load_finished_cb(WebKitWebView* web_view, WebKitWebFrame* web_frame, gpointer data)
+static void notify_load_status_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
{
- gboolean* been_there = data;
- *been_there = TRUE;
+ if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED) {
+ gboolean* been_there = data;
+ *been_there = TRUE;
- g_assert_cmpstr(webkit_web_view_get_uri(web_view), ==, "about:blank");
+ g_assert_cmpstr(webkit_web_view_get_uri(web_view), ==, "about:blank");
- g_main_loop_quit(loop);
+ g_main_loop_quit(loop);
+ }
}
static void test_web_resource_loading()
@@ -189,8 +191,8 @@ static void test_web_resource_loading()
G_CALLBACK(resource_request_starting_cb),
&been_to_resource_request_starting);
- g_signal_connect(web_view, "load-finished",
- G_CALLBACK(load_finished_cb),
+ g_signal_connect(web_view, "notify::load-status",
+ G_CALLBACK(notify_load_status_cb),
&been_to_load_finished);
webkit_web_view_load_uri(web_view, base_uri);
@@ -220,9 +222,10 @@ static void resource_request_starting_sub_cb(WebKitWebView* web_view, WebKitWebF
sub_resource = g_object_ref(web_resource);
}
-static void load_finished_sub_cb(WebKitWebView* web_view, WebKitWebFrame* web_frame, gpointer data)
+static void notify_load_status_sub_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
{
- g_main_loop_quit(loop);
+ if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED)
+ g_main_loop_quit(loop);
}
static gboolean idle_quit_loop_cb(gpointer data)
@@ -249,8 +252,8 @@ static void test_web_resource_sub_resource_loading()
G_CALLBACK(resource_request_starting_sub_cb),
NULL);
- g_signal_connect(web_view, "load-finished",
- G_CALLBACK(load_finished_sub_cb),
+ g_signal_connect(web_view, "notify::load-status",
+ G_CALLBACK(notify_load_status_sub_cb),
NULL);
webkit_web_view_load_uri(web_view, uri);
@@ -271,8 +274,10 @@ static void test_web_resource_sub_resource_loading()
g_object_unref(main_resource);
sub_resources = webkit_web_data_source_get_subresources(data_source);
+ // Expected resources: javascripts.js, favicon.ico
g_assert(sub_resources);
- g_assert(!sub_resources->next);
+ g_assert(sub_resources->next);
+ g_assert(!sub_resources->next->next);
g_assert(WEBKIT_WEB_RESOURCE(sub_resources->data) == sub_resource);
diff --git a/WebKit/gtk/tests/testwebview.c b/WebKit/gtk/tests/testwebview.c
index e0921c0..7482747 100644
--- a/WebKit/gtk/tests/testwebview.c
+++ b/WebKit/gtk/tests/testwebview.c
@@ -63,10 +63,11 @@ server_callback(SoupServer* server, SoupMessage* msg,
soup_message_body_complete(msg->response_body);
}
-static gboolean idle_quit_loop_cb(gpointer data)
+static void idle_quit_loop_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
{
- g_main_loop_quit(loop);
- return FALSE;
+ if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED ||
+ webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FAILED)
+ g_main_loop_quit(loop);
}
static void icon_uri_changed_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
@@ -105,7 +106,7 @@ static void test_webkit_web_view_icon_uri()
loop = g_main_loop_new(NULL, TRUE);
g_object_connect(G_OBJECT(view),
- "signal::load-finished", idle_quit_loop_cb, NULL,
+ "signal::notify::progress", idle_quit_loop_cb, NULL,
"signal::notify::icon-uri", icon_uri_changed_cb, &been_to_uri_changed,
"signal::icon-loaded", icon_loaded_cb, &been_to_icon_loaded,
NULL);
@@ -124,22 +125,20 @@ int main(int argc, char** argv)
{
SoupServer* server;
SoupURI* soup_uri;
- char* test_dir;
- char* resources_dir;
g_thread_init(NULL);
gtk_test_init(&argc, &argv, NULL);
/* Hopefully make test independent of the path it's called from. */
- test_dir = g_path_get_dirname(argv[0]);
- resources_dir = g_build_path(G_DIR_SEPARATOR_S, test_dir,
- "..", "..", "..", "..",
- "WebKit", "gtk", "tests", "resources",
- NULL);
- g_free(test_dir);
-
- g_chdir(resources_dir);
- g_free(resources_dir);
+ while (!g_file_test ("WebKit/gtk/tests/resources/test.html", G_FILE_TEST_EXISTS)) {
+ char path_name[PATH_MAX];
+
+ g_chdir("..");
+
+ g_assert(!g_str_equal(getcwd(path_name, PATH_MAX), "/"));
+ }
+
+ g_chdir("WebKit/gtk/tests/resources/");
server = soup_server_new(SOUP_SERVER_PORT, 0, NULL);
soup_server_run_async(server);
diff --git a/WebKit/gtk/tests/testwindow.c b/WebKit/gtk/tests/testwindow.c
index 41ff323..106f934 100644
--- a/WebKit/gtk/tests/testwindow.c
+++ b/WebKit/gtk/tests/testwindow.c
@@ -22,11 +22,13 @@
#if GLIB_CHECK_VERSION(2, 16, 0) && GTK_CHECK_VERSION(2, 14, 0)
-static void load_finished_cb(WebKitWebView* web_view, WebKitWebFrame* web_frame, gpointer data)
+static void notify_load_status_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
{
- GMainLoop* loop = (GMainLoop*)data;
+ if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED) {
+ GMainLoop* loop = (GMainLoop*)data;
- g_main_loop_quit(loop);
+ g_main_loop_quit(loop);
+ }
}
static void test_webkit_window_scrollbar_policy(void)
@@ -47,8 +49,8 @@ static void test_webkit_window_scrollbar_policy(void)
webView = webkit_web_view_new();
g_object_ref_sink(webView);
- g_signal_connect(webView, "load-finished",
- G_CALLBACK(load_finished_cb), loop);
+ g_signal_connect(webView, "notify::load-status",
+ G_CALLBACK(notify_load_status_cb), loop);
gtk_container_add(GTK_CONTAINER(scrolledWindow), webView);
diff --git a/WebKit/gtk/webkit/webkitdownload.cpp b/WebKit/gtk/webkit/webkitdownload.cpp
index dd6629b..1912a12 100644
--- a/WebKit/gtk/webkit/webkitdownload.cpp
+++ b/WebKit/gtk/webkit/webkitdownload.cpp
@@ -22,6 +22,7 @@
#include "CString.h"
#include <glib/gi18n-lib.h>
+#include "GRefPtr.h"
#include "Noncopyable.h"
#include "NotImplemented.h"
#include "ResourceHandleClient.h"
@@ -853,22 +854,24 @@ static void webkit_download_received_data(WebKitDownload* download, const gchar*
if (priv->currentSize > webkit_download_get_total_size(download))
g_object_notify(G_OBJECT(download), "total-size");
- gdouble lastProgress = webkit_download_get_progress(download);
-
// Throttle progress notification to not consume high amounts of
- // CPU on fast links, except when the progress is >= 3%, or we
- // reached the end.
+ // CPU on fast links, except when the last notification occured
+ // in more then 0.7 secs from now, or the last notified progress
+ // is passed in 1% or we reached the end.
+ static gdouble lastProgress = 0;
static gdouble lastElapsed = 0;
gdouble currentElapsed = g_timer_elapsed(priv->timer, NULL);
+ gdouble currentProgress = webkit_download_get_progress(download);
if (lastElapsed
- && (currentElapsed - lastElapsed) < 0.1
- && (webkit_download_get_progress(download) - lastProgress) < 0.03
- && webkit_download_get_progress(download) < 1.0) {
- lastElapsed = currentElapsed;
+ && lastProgress
+ && (currentElapsed - lastElapsed) < 0.7
+ && (currentProgress - lastProgress) < 0.01
+ && currentProgress < 1.0) {
return;
}
lastElapsed = currentElapsed;
+ lastProgress = currentProgress;
g_object_notify(G_OBJECT(download), "progress");
}
@@ -890,6 +893,7 @@ static void webkit_download_error(WebKitDownload* download, const ResourceError&
webkit_download_close_stream(download);
WebKitDownloadPrivate* priv = download->priv;
+ GRefPtr<WebKitDownload> protect(download);
g_timer_stop(priv->timer);
webkit_download_set_status(download, WEBKIT_DOWNLOAD_STATUS_ERROR);
diff --git a/WebKit/gtk/webkit/webkitprivate.cpp b/WebKit/gtk/webkit/webkitprivate.cpp
index c80160c..be88bb5 100644
--- a/WebKit/gtk/webkit/webkitprivate.cpp
+++ b/WebKit/gtk/webkit/webkitprivate.cpp
@@ -23,6 +23,7 @@
#include "webkitsoupauthdialog.h"
#include "webkitprivate.h"
#include "ApplicationCacheStorage.h"
+#include "Chrome.h"
#include "ChromeClientGtk.h"
#include "Frame.h"
#include "FrameLoader.h"
@@ -42,6 +43,7 @@
#include <runtime/InitializeThreading.h>
#include "SecurityOrigin.h"
#include <stdlib.h>
+#include "TextEncodingRegistry.h"
#include "webkitnetworkresponse.h"
#if ENABLE(DATABASE)
@@ -221,7 +223,11 @@ static GtkWidget* currentToplevelCallback(WebKitSoupAuthDialog* feature, SoupMes
return NULL;
GtkWidget* toplevel = gtk_widget_get_toplevel(GTK_WIDGET(frame->page()->chrome()->platformPageClient()));
+#if GTK_CHECK_VERSION(2, 18, 0)
+ if (gtk_widget_is_toplevel(toplevel))
+#else
if (GTK_WIDGET_TOPLEVEL(toplevel))
+#endif
return toplevel;
else
return NULL;
@@ -245,10 +251,14 @@ void webkit_init()
JSC::initializeThreading();
WebCore::InitializeLoggingChannelsIfNecessary();
+ // We make sure the text codecs have been initialized, because
+ // that may only be done by the main thread.
+ atomicCanonicalTextEncodingName("UTF-8");
+
// Page cache capacity (in pages). Comment from Mac port:
// (Research indicates that value / page drops substantially after 3 pages.)
// FIXME: Expose this with an API and/or calculate based on available resources
- WebCore::pageCache()->setCapacity(3);
+ webkit_set_cache_model(WEBKIT_CACHE_MODEL_WEB_BROWSER);
#if ENABLE(DATABASE)
gchar* databaseDirectory = g_build_filename(g_get_user_data_dir(), "webkit", "databases", NULL);
@@ -280,6 +290,8 @@ void webkit_init()
SoupSessionFeature* sniffer = static_cast<SoupSessionFeature*>(g_object_new(SOUP_TYPE_CONTENT_SNIFFER, NULL));
soup_session_add_feature(session, sniffer);
g_object_unref(sniffer);
+
+ soup_session_add_feature_by_type(session, SOUP_TYPE_CONTENT_DECODER);
}
void webkit_white_list_access_from_origin(const gchar* sourceOrigin, const gchar* destinationProtocol, const gchar* destinationHost, bool allowDestinationSubdomains)
diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h
index e17e79e..e9d61a6 100644
--- a/WebKit/gtk/webkit/webkitprivate.h
+++ b/WebKit/gtk/webkit/webkitprivate.h
@@ -152,6 +152,7 @@ extern "C" {
WebKitWebResource* mainResource;
char* mainResourceIdentifier;
GHashTable* subResources;
+ char* tooltipText;
};
#define WEBKIT_WEB_FRAME_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_FRAME, WebKitWebFramePrivate))
@@ -254,6 +255,9 @@ extern "C" {
GList*
webkit_web_view_get_subresources(WebKitWebView*);
+ void
+ webkit_web_view_set_tooltip_text(WebKitWebView*, const char*);
+
WebKitDownload*
webkit_download_new_with_handle(WebKitNetworkRequest* request, WebCore::ResourceHandle* handle, const WebCore::ResourceResponse& response);
diff --git a/WebKit/gtk/webkit/webkitwebframe.cpp b/WebKit/gtk/webkit/webkitwebframe.cpp
index 64fdc40..35d9524 100644
--- a/WebKit/gtk/webkit/webkitwebframe.cpp
+++ b/WebKit/gtk/webkit/webkitwebframe.cpp
@@ -54,7 +54,9 @@
#include "JSDOMBinding.h"
#include "ScriptController.h"
#include "SubstituteData.h"
+#if ENABLE(SVG)
#include "SVGSMILElement.h"
+#endif
#include <atk/atk.h>
#include <JavaScriptCore/APICast.h>
@@ -182,6 +184,14 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+ /**
+ * WebKitWebFrame::load-done
+ * @web_frame: the object on which the signal is emitted
+ *
+ * Emitted when frame loading is done.
+ *
+ * Deprecated: Use the "load-status" property instead.
+ */
webkit_web_frame_signals[LOAD_COMMITTED] = g_signal_new("load-committed",
G_TYPE_FROM_CLASS(frameClass),
(GSignalFlags)G_SIGNAL_RUN_LAST,
@@ -197,7 +207,7 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
*
* Emitted when frame loading is done.
*
- * Deprecated: Use WebKitWebView::load-finished instead, and/or
+ * Deprecated: Use the "load-status" property instead, and/or
* WebKitWebView::load-error to be notified of load errors
*/
webkit_web_frame_signals[LOAD_DONE] = g_signal_new("load-done",
@@ -210,6 +220,15 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
G_TYPE_NONE, 1,
G_TYPE_BOOLEAN);
+ /**
+ * WebKitWebFrame::title-changed:
+ * @frame: the object on which the signal is emitted
+ * @title: the new title
+ *
+ * When a #WebKitWebFrame changes the document title this signal is emitted.
+ *
+ * Deprecated: 1.1.18: Use "notify::title" instead.
+ */
webkit_web_frame_signals[TITLE_CHANGED] = g_signal_new("title-changed",
G_TYPE_FROM_CLASS(frameClass),
(GSignalFlags)G_SIGNAL_RUN_LAST,
@@ -891,7 +910,12 @@ GtkPrintOperationResult webkit_web_frame_print_full(WebKitWebFrame* frame, GtkPr
g_return_val_if_fail(GTK_IS_PRINT_OPERATION(operation), GTK_PRINT_OPERATION_RESULT_ERROR);
GtkWidget* topLevel = gtk_widget_get_toplevel(GTK_WIDGET(webkit_web_frame_get_web_view(frame)));
+
+#if GTK_CHECK_VERSION(2, 18, 0)
+ if (!gtk_widget_is_toplevel(topLevel))
+#else
if (!GTK_WIDGET_TOPLEVEL(topLevel))
+#endif
topLevel = NULL;
Frame* coreFrame = core(frame);
@@ -930,11 +954,20 @@ void webkit_web_frame_print(WebKitWebFrame* frame)
if (error) {
GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(priv->webView));
+#if GTK_CHECK_VERSION(2, 18, 0)
+ GtkWidget* dialog = gtk_message_dialog_new(gtk_widget_is_toplevel(window) ? GTK_WINDOW(window) : 0,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ "%s", error->message);
+#else
GtkWidget* dialog = gtk_message_dialog_new(GTK_WIDGET_TOPLEVEL(window) ? GTK_WINDOW(window) : 0,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"%s", error->message);
+#endif
+
g_error_free(error);
g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
@@ -963,13 +996,13 @@ bool webkit_web_frame_pause_transition(WebKitWebFrame* frame, const gchar* name,
bool webkit_web_frame_pause_svg_animation(WebKitWebFrame* frame, const gchar* animationId, double time, const gchar* elementId)
{
ASSERT(core(frame));
+#if ENABLE(SVG)
Document* document = core(frame)->document();
if (!document || !document->svgExtensions())
return false;
Element* coreElement = document->getElementById(AtomicString(animationId));
if (!coreElement || !SVGSMILElement::isSMILElement(coreElement))
return false;
-#if ENABLE(SVG)
return document->accessSVGExtensions()->sampleAnimationAtTime(elementId, static_cast<SVGSMILElement*>(coreElement), time);
#else
return false;
diff --git a/WebKit/gtk/webkit/webkitwebhistoryitem.cpp b/WebKit/gtk/webkit/webkitwebhistoryitem.cpp
index aab8b51..f2811ea 100644
--- a/WebKit/gtk/webkit/webkitwebhistoryitem.cpp
+++ b/WebKit/gtk/webkit/webkitwebhistoryitem.cpp
@@ -432,6 +432,33 @@ gdouble webkit_web_history_item_get_last_visited_time(WebKitWebHistoryItem* webH
return item->lastVisitedTime();
}
+/**
+ * webkit_web_history_item_copy :
+ * @web_history_item: a #WebKitWebHistoryItem
+ *
+ * Makes a copy of the item for use with other WebView objects.
+ *
+ * Since: 1.1.18
+ *
+ * Return value: the new #WebKitWebHistoryItem.
+ */
+WebKitWebHistoryItem* webkit_web_history_item_copy(WebKitWebHistoryItem* self)
+{
+ WebKitWebHistoryItemPrivate* selfPrivate = self->priv;
+
+ WebKitWebHistoryItem* item = WEBKIT_WEB_HISTORY_ITEM(g_object_new(WEBKIT_TYPE_WEB_HISTORY_ITEM, 0));
+ WebKitWebHistoryItemPrivate* priv = item->priv;
+
+ priv->title = selfPrivate->title;
+ priv->alternateTitle = selfPrivate->alternateTitle;
+ priv->uri = selfPrivate->uri;
+ priv->originalUri = selfPrivate->originalUri;
+
+ priv->historyItem = selfPrivate->historyItem->copy().releaseRef();
+
+ return item;
+}
+
/* private methods */
G_CONST_RETURN gchar* webkit_web_history_item_get_target(WebKitWebHistoryItem* webHistoryItem)
diff --git a/WebKit/gtk/webkit/webkitwebhistoryitem.h b/WebKit/gtk/webkit/webkitwebhistoryitem.h
index cafeb36..1820736 100644
--- a/WebKit/gtk/webkit/webkitwebhistoryitem.h
+++ b/WebKit/gtk/webkit/webkitwebhistoryitem.h
@@ -82,6 +82,9 @@ webkit_web_history_item_get_original_uri (WebKitWebHistoryItem *web_history
WEBKIT_API gdouble
webkit_web_history_item_get_last_visited_time (WebKitWebHistoryItem *web_history_item);
+WEBKIT_API WebKitWebHistoryItem*
+webkit_web_history_item_copy (WebKitWebHistoryItem *web_history_item);
+
G_END_DECLS
#endif /* webkitwebhistoryitem_h */
diff --git a/WebKit/gtk/webkit/webkitwebnavigationaction.cpp b/WebKit/gtk/webkit/webkitwebnavigationaction.cpp
index c866c0f..f421f40 100644
--- a/WebKit/gtk/webkit/webkitwebnavigationaction.cpp
+++ b/WebKit/gtk/webkit/webkitwebnavigationaction.cpp
@@ -177,7 +177,9 @@ static void webkit_web_navigation_action_class_init(WebKitWebNavigationActionCla
/**
* WebKitWebNavigationAction:button:
*
- * The button used to click if the action was a mouse event.
+ * The DOM identifier for the mouse button used to click. DOM button values
+ * are 0, 1 and 2 for left, middle and right buttons. If the action was not
+ * initiated by a mouse click the value will be -1.
*
* Since: 1.0.3
*/
@@ -308,8 +310,9 @@ void webkit_web_navigation_action_set_original_uri(WebKitWebNavigationAction* na
* webkit_web_navigation_action_get_button:
* @navigationAction: a #WebKitWebNavigationAction
*
- * Returns the mouse button used to click if the action was a mouse event.
- * Otherwise returns -1.
+ * Returns the DOM identifier for the mouse button used to click.
+ * DOM button values are 0, 1 and 2 for left, middle and right buttons.
+ * If the action was not initiated by a mouse click, returns -1.
*
* Return value: the mouse button used to click
*
diff --git a/WebKit/gtk/webkit/webkitwebresource.cpp b/WebKit/gtk/webkit/webkitwebresource.cpp
index e995e08..bd3cd69 100644
--- a/WebKit/gtk/webkit/webkitwebresource.cpp
+++ b/WebKit/gtk/webkit/webkitwebresource.cpp
@@ -245,13 +245,13 @@ void webkit_web_resource_init_with_core_resource(WebKitWebResource* webResource,
/**
* webkit_web_resource_new:
* @data: the data to initialize the #WebKitWebResource
- * @length: the length of @data
+ * @size: the length of @data
* @uri: the uri of the #WebKitWebResource
* @mime_type: the MIME type of the #WebKitWebResource
- * @text_encoding_name: the text encoding name of the #WebKitWebResource
+ * @encoding: the text encoding name of the #WebKitWebResource
* @frame_name: the frame name of the #WebKitWebResource
*
- * Returns a new #WebKitWebResource. The @text_encoding_name can be %NULL. The
+ * Returns a new #WebKitWebResource. The @encoding can be %NULL. The
* @frame_name argument can be used if the resource represents contents of an
* entire HTML frame, otherwise pass %NULL.
*
diff --git a/WebKit/gtk/webkit/webkitwebsettings.cpp b/WebKit/gtk/webkit/webkitwebsettings.cpp
index 143ae06..1e2f8cc 100644
--- a/WebKit/gtk/webkit/webkitwebsettings.cpp
+++ b/WebKit/gtk/webkit/webkitwebsettings.cpp
@@ -4,6 +4,8 @@
* Copyright (C) 2008 Collabora Ltd.
* Copyright (C) 2008 Holger Hans Peter Freyther
* Copyright (C) 2009 Jan Michael Alonzo
+ * Copyright (C) 2009 Movial Creative Technologies Inc.
+ * Copyright (C) 2009 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
@@ -35,7 +37,7 @@
#include "PlatformString.h"
#include <glib/gi18n-lib.h>
-#if PLATFORM(UNIX)
+#if OS(UNIX)
#include <sys/utsname.h>
#endif
@@ -98,6 +100,9 @@ struct _WebKitWebSettingsPrivate {
gboolean enable_universal_access_from_file_uris;
gboolean enable_dom_paste;
gboolean tab_key_cycles_through_elements;
+ gboolean enable_default_context_menu;
+ gboolean enable_site_specific_quirks;
+ gboolean enable_page_cache;
};
#define WEBKIT_WEB_SETTINGS_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_SETTINGS, WebKitWebSettingsPrivate))
@@ -139,7 +144,10 @@ enum {
PROP_EDITING_BEHAVIOR,
PROP_ENABLE_UNIVERSAL_ACCESS_FROM_FILE_URIS,
PROP_ENABLE_DOM_PASTE,
- PROP_TAB_KEY_CYCLES_THROUGH_ELEMENTS
+ PROP_TAB_KEY_CYCLES_THROUGH_ELEMENTS,
+ PROP_ENABLE_DEFAULT_CONTEXT_MENU,
+ PROP_ENABLE_SITE_SPECIFIC_QUIRKS,
+ PROP_ENABLE_PAGE_CACHE
};
// Create a default user agent string
@@ -152,7 +160,7 @@ static String webkit_get_user_agent()
#if PLATFORM(X11)
platform = g_strdup("X11");
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
platform = g_strdup("Windows");
#elif PLATFORM(MAC)
platform = g_strdup("Macintosh");
@@ -163,22 +171,22 @@ static String webkit_get_user_agent()
#endif
// FIXME: platform/version detection can be shared.
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
-#if PLATFORM(X86)
+#if CPU(X86)
osVersion = g_strdup("Intel Mac OS X");
#else
osVersion = g_strdup("PPC Mac OS X");
#endif
-#elif PLATFORM(UNIX)
+#elif OS(UNIX)
struct utsname name;
if (uname(&name) != -1)
osVersion = g_strdup_printf("%s %s", name.sysname, name.machine);
else
osVersion = g_strdup("Unknown");
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
// FIXME: Compute the Windows version
osVersion = g_strdup("Windows");
@@ -686,6 +694,71 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass)
TRUE,
flags));
+ /**
+ * WebKitWebSettings:enable-default-context-menu:
+ *
+ * Whether right-clicks should be handled automatically to create,
+ * and display the context menu. Turning this off will make
+ * WebKitGTK+ not emit the populate-popup signal. Notice that the
+ * default button press event handler may still handle right
+ * clicks for other reasons, such as in-page context menus, or
+ * right-clicks that are handled by the page itself.
+ *
+ * Since: 1.1.18
+ */
+ g_object_class_install_property(gobject_class,
+ PROP_ENABLE_DEFAULT_CONTEXT_MENU,
+ g_param_spec_boolean(
+ "enable-default-context-menu",
+ _("Enable Default Context Menu"),
+ _("Enables the handling of right-clicks for the creation of the default context menu"),
+ TRUE,
+ flags));
+
+ /**
+ * WebKitWebSettings::enable-site-specific-quirks
+ *
+ * Whether to turn on site-specific hacks. Turning this on will
+ * tell WebKitGTK+ to use some site-specific workarounds for
+ * better web compatibility. For example, older versions of
+ * MediaWiki will incorrectly send WebKit a css file with KHTML
+ * workarounds. By turning on site-specific quirks, WebKit will
+ * special-case this and other cases to make the sites work.
+ *
+ * Since: 1.1.18
+ */
+ g_object_class_install_property(gobject_class,
+ PROP_ENABLE_SITE_SPECIFIC_QUIRKS,
+ g_param_spec_boolean(
+ "enable-site-specific-quirks",
+ _("Enable Site Specific Quirks"),
+ _("Enables the site-specific compatibility workarounds"),
+ FALSE,
+ flags));
+
+ /**
+ * WebKitWebSettings:enable-page-cache:
+ *
+ * Enable or disable the page cache. Disabling the page cache is
+ * generally only useful for special circumstances like low-memory
+ * scenarios or special purpose applications like static HTML
+ * viewers. This setting only controls the Page Cache, this cache
+ * is different than the disk-based or memory-based traditional
+ * resource caches, its point is to make going back and forth
+ * between pages much faster. For details about the different types
+ * of caches and their purposes see:
+ * http://webkit.org/blog/427/webkit-page-cache-i-the-basics/
+ *
+ * Since: 1.1.18
+ */
+ g_object_class_install_property(gobject_class,
+ PROP_ENABLE_PAGE_CACHE,
+ g_param_spec_boolean("enable-page-cache",
+ _("Enable page cache"),
+ _("Whether the page cache should be used"),
+ FALSE,
+ flags));
+
g_type_class_add_private(klass, sizeof(WebKitWebSettingsPrivate));
}
@@ -883,7 +956,16 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con
priv->enable_dom_paste = g_value_get_boolean(value);
break;
case PROP_TAB_KEY_CYCLES_THROUGH_ELEMENTS:
- priv->tab_key_cycles_through_elements = g_value_get_boolean(value);
+ priv->tab_key_cycles_through_elements = g_value_get_boolean(value);
+ break;
+ case PROP_ENABLE_DEFAULT_CONTEXT_MENU:
+ priv->enable_default_context_menu = g_value_get_boolean(value);
+ break;
+ case PROP_ENABLE_SITE_SPECIFIC_QUIRKS:
+ priv->enable_site_specific_quirks = g_value_get_boolean(value);
+ break;
+ case PROP_ENABLE_PAGE_CACHE:
+ priv->enable_page_cache = g_value_get_boolean(value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
@@ -1002,7 +1084,16 @@ static void webkit_web_settings_get_property(GObject* object, guint prop_id, GVa
case PROP_TAB_KEY_CYCLES_THROUGH_ELEMENTS:
g_value_set_boolean(value, priv->tab_key_cycles_through_elements);
break;
- default:
+ case PROP_ENABLE_DEFAULT_CONTEXT_MENU:
+ g_value_set_boolean(value, priv->enable_default_context_menu);
+ break;
+ case PROP_ENABLE_SITE_SPECIFIC_QUIRKS:
+ g_value_set_boolean(value, priv->enable_site_specific_quirks);
+ break;
+ case PROP_ENABLE_PAGE_CACHE:
+ g_value_set_boolean(value, priv->enable_page_cache);
+ break;
+ default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
}
@@ -1067,6 +1158,10 @@ WebKitWebSettings* webkit_web_settings_copy(WebKitWebSettings* web_settings)
"editing-behavior", priv->editing_behavior,
"enable-universal-access-from-file-uris", priv->enable_universal_access_from_file_uris,
"enable-dom-paste", priv->enable_dom_paste,
+ "tab-key-cycles-through-elements", priv->tab_key_cycles_through_elements,
+ "enable-default-context-menu", priv->enable_default_context_menu,
+ "enable-site-specific-quirks", priv->enable_site_specific_quirks,
+ "enable-page-cache", priv->enable_page_cache,
NULL));
return copy;
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index 211f671..ad13895 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -8,6 +8,8 @@
* Copyright (C) 2008 Nuanti Ltd.
* Copyright (C) 2008, 2009 Collabora Ltd.
* Copyright (C) 2009 Igalia S.L.
+ * Copyright (C) 2009 Movial Creative Technologies Inc.
+ * Copyright (C) 2009 Bobby Powers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -40,6 +42,7 @@
#include "AXObjectCache.h"
#include "NotImplemented.h"
#include "BackForwardList.h"
+#include "Cache.h"
#include "CString.h"
#include "ChromeClientGtk.h"
#include "ContextMenu.h"
@@ -64,6 +67,7 @@
#include "FrameLoader.h"
#include "FrameView.h"
#include "MouseEventWithHitTestResults.h"
+#include "PageCache.h"
#include "Pasteboard.h"
#include "PasteboardHelper.h"
#include "PasteboardHelperGtk.h"
@@ -112,6 +116,7 @@
*/
static const double defaultDPI = 96.0;
+static WebKitCacheModel cacheModel;
using namespace WebKit;
using namespace WebCore;
@@ -174,7 +179,8 @@ enum {
PROP_PROGRESS,
PROP_ENCODING,
PROP_CUSTOM_ENCODING,
- PROP_ICON_URI
+ PROP_ICON_URI,
+ PROP_IM_CONTEXT
};
static guint webkit_web_view_signals[LAST_SIGNAL] = { 0, };
@@ -184,6 +190,8 @@ G_DEFINE_TYPE(WebKitWebView, webkit_web_view, GTK_TYPE_CONTAINER)
static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GParamSpec* pspec, WebKitWebView* webView);
static void webkit_web_view_set_window_features(WebKitWebView* webView, WebKitWebWindowFeatures* webWindowFeatures);
+static GtkIMContext* webkit_web_view_get_im_context(WebKitWebView*);
+
static void destroy_menu_cb(GtkObject* object, gpointer data)
{
WebKitWebView* webView = WEBKIT_WEB_VIEW(data);
@@ -207,8 +215,28 @@ static gboolean webkit_web_view_forward_context_menu_event(WebKitWebView* webVie
if (!handledEvent)
return FALSE;
+ // If coreMenu is NULL, this means WebCore decided to not create
+ // the default context menu; this may still mean that the frame
+ // wants to consume the event - this happens when the page is
+ // handling the right-click for reasons other than a context menu,
+ // so we give it to it.
ContextMenu* coreMenu = page->contextMenuController()->contextMenu();
- if (!coreMenu)
+ if (!coreMenu) {
+ Frame* frame = core(webView)->mainFrame();
+ if (frame->view() && frame->eventHandler()->handleMousePressEvent(PlatformMouseEvent(event)))
+ return TRUE;
+
+ return FALSE;
+ }
+
+ // If we reach here, it's because WebCore is going to show the
+ // default context menu. We check our setting to figure out
+ // whether we want it or not.
+ WebKitWebSettings* settings = webkit_web_view_get_settings(webView);
+ gboolean enableDefaultContextMenu;
+ g_object_get(settings, "enable-default-context-menu", &enableDefaultContextMenu, NULL);
+
+ if (!enableDefaultContextMenu)
return FALSE;
GtkMenu* menu = GTK_MENU(coreMenu->platformDescription());
@@ -359,6 +387,9 @@ static void webkit_web_view_get_property(GObject* object, guint prop_id, GValue*
case PROP_ICON_URI:
g_value_set_string(value, webkit_web_view_get_icon_uri(webView));
break;
+ case PROP_IM_CONTEXT:
+ g_value_set_object(value, webkit_web_view_get_im_context(webView));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
}
@@ -625,7 +656,11 @@ static gboolean webkit_web_view_focus_in_event(GtkWidget* widget, GdkEventFocus*
// TODO: Improve focus handling as suggested in
// http://bugs.webkit.org/show_bug.cgi?id=16910
GtkWidget* toplevel = gtk_widget_get_toplevel(widget);
+#if GTK_CHECK_VERSION(2, 18, 0)
+ if (gtk_widget_is_toplevel(toplevel) && gtk_window_has_toplevel_focus(GTK_WINDOW(toplevel))) {
+#else
if (GTK_WIDGET_TOPLEVEL(toplevel) && gtk_window_has_toplevel_focus(GTK_WINDOW(toplevel))) {
+#endif
WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
FocusController* focusController = core(webView)->focusController();
@@ -814,7 +849,11 @@ static gboolean webkit_web_view_script_dialog(WebKitWebView* webView, WebKitWebF
}
window = gtk_widget_get_toplevel(GTK_WIDGET(webView));
+#if GTK_CHECK_VERSION(2, 18, 0)
+ dialog = gtk_message_dialog_new(gtk_widget_is_toplevel(window) ? GTK_WINDOW(window) : 0, GTK_DIALOG_DESTROY_WITH_PARENT, messageType, buttons, "%s", message);
+#else
dialog = gtk_message_dialog_new(GTK_WIDGET_TOPLEVEL(window) ? GTK_WINDOW(window) : 0, GTK_DIALOG_DESTROY_WITH_PARENT, messageType, buttons, "%s", message);
+#endif
gchar* title = g_strconcat("JavaScript - ", webkit_web_frame_get_uri(frame), NULL);
gtk_window_set_title(GTK_WINDOW(dialog), title);
g_free(title);
@@ -1028,6 +1067,7 @@ static void webkit_web_view_finalize(GObject* object)
WebKitWebView* webView = WEBKIT_WEB_VIEW(object);
WebKitWebViewPrivate* priv = webView->priv;
+ g_free(priv->tooltipText);
g_free(priv->mainResourceIdentifier);
g_free(priv->encoding);
g_free(priv->customEncoding);
@@ -1251,6 +1291,26 @@ static void webkit_web_view_drag_data_get(GtkWidget* widget, GdkDragContext* con
clipboard_contents_received, contents_request);
}
+#if GTK_CHECK_VERSION(2, 12, 0)
+static gboolean webkit_web_view_query_tooltip(GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip)
+{
+ WebKitWebViewPrivate* priv = WEBKIT_WEB_VIEW_GET_PRIVATE(widget);
+
+ if (priv->tooltipText) {
+ gtk_tooltip_set_text(tooltip, priv->tooltipText);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+#endif
+
+static GtkIMContext* webkit_web_view_get_im_context(WebKitWebView* webView)
+{
+ g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0);
+ return GTK_IM_CONTEXT(webView->priv->imContext);
+}
+
static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
{
GtkBindingSet* binding_set;
@@ -1521,9 +1581,10 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* @return: %TRUE if the download should be performed, %FALSE to cancel it.
*
* A new Download is being requested. By default, if the signal is
- * not handled, the download is cancelled. Notice that while
- * handling this signal you must set the target URI using
- * webkit_download_set_target_uri().
+ * not handled, the download is cancelled. If you handle the download
+ * and call webkit_download_set_destination_uri(), it will be
+ * started for you. If you need to set the destination asynchronously
+ * you are responsible for starting or cancelling it yourself.
*
* If you intend to handle downloads yourself rather than using
* the #WebKitDownload helper object you must handle this signal,
@@ -1558,6 +1619,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* @frame: the frame going to do the load
*
* When a #WebKitWebFrame begins to load this signal is emitted.
+ *
+ * Deprecated: Use the "load-status" property instead.
*/
webkit_web_view_signals[LOAD_STARTED] = g_signal_new("load-started",
G_TYPE_FROM_CLASS(webViewClass),
@@ -1575,6 +1638,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* @frame: the main frame that received the first data
*
* When a #WebKitWebFrame loaded the first data this signal is emitted.
+ *
+ * Deprecated: Use the "load-status" property instead.
*/
webkit_web_view_signals[LOAD_COMMITTED] = g_signal_new("load-committed",
G_TYPE_FROM_CLASS(webViewClass),
@@ -1591,6 +1656,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* WebKitWebView::load-progress-changed:
* @web_view: the #WebKitWebView
* @progress: the global progress
+ *
+ * Deprecated: Use the "progress" property instead.
*/
webkit_web_view_signals[LOAD_PROGRESS_CHANGED] = g_signal_new("load-progress-changed",
G_TYPE_FROM_CLASS(webViewClass),
@@ -1627,6 +1694,13 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
G_TYPE_STRING,
G_TYPE_POINTER);
+ /**
+ * WebKitWebView::load-finished:
+ * @web_view: the #WebKitWebView
+ * @frame: the #WebKitWebFrame
+ *
+ * Deprecated: Use the "load-status" property instead.
+ */
webkit_web_view_signals[LOAD_FINISHED] = g_signal_new("load-finished",
G_TYPE_FROM_CLASS(webViewClass),
(GSignalFlags)G_SIGNAL_RUN_LAST,
@@ -2106,6 +2180,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
widgetClass->screen_changed = webkit_web_view_screen_changed;
widgetClass->drag_end = webkit_web_view_drag_end;
widgetClass->drag_data_get = webkit_web_view_drag_data_get;
+#if GTK_CHECK_VERSION(2, 12, 0)
+ widgetClass->query_tooltip = webkit_web_view_query_tooltip;
+#endif
GtkContainerClass* containerClass = GTK_CONTAINER_CLASS(webViewClass);
containerClass->add = webkit_web_view_container_add;
@@ -2369,6 +2446,16 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
*
* Determines the current status of the load.
*
+ * Connect to "notify::load-status" to monitor loading.
+ *
+ * Some versions of WebKitGTK+ emitted this signal for the default
+ * error page, while loading it. This behavior was considered bad,
+ * because it was essentially exposing an implementation
+ * detail. From 1.1.19 onwards this signal is no longer emitted for
+ * the default error pages, but keep in mind that if you override
+ * the error pages by using webkit_web_frame_load_alternate_string()
+ * the signals will be emitted.
+ *
* Since: 1.1.7
*/
g_object_class_install_property(objectClass, PROP_LOAD_STATUS,
@@ -2406,6 +2493,23 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
_("The URI for the favicon for the #WebKitWebView."),
NULL,
WEBKIT_PARAM_READABLE));
+ /**
+ * WebKitWebView:im-context:
+ *
+ * The GtkIMMulticontext for the #WebKitWebView.
+ *
+ * This is the input method context used for all text entry widgets inside
+ * the #WebKitWebView. It can be used to generate context menu items for
+ * controlling the active input method.
+ *
+ * Since: 1.1.20
+ */
+ g_object_class_install_property(objectClass, PROP_IM_CONTEXT,
+ g_param_spec_object("im-context",
+ "IM Context",
+ "The GtkIMMultiContext for the #WebKitWebView.",
+ GTK_TYPE_IM_CONTEXT,
+ WEBKIT_PARAM_READABLE));
g_type_class_add_private(webViewClass, sizeof(WebKitWebViewPrivate));
}
@@ -2421,7 +2525,8 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
enableScripts, enablePlugins, enableDeveloperExtras, resizableTextAreas,
enablePrivateBrowsing, enableCaretBrowsing, enableHTML5Database, enableHTML5LocalStorage,
enableXSSAuditor, javascriptCanOpenWindows, enableOfflineWebAppCache,
- enableUniversalAccessFromFileURI, enableDOMPaste, tabKeyCyclesThroughElements;
+ enableUniversalAccessFromFileURI, enableDOMPaste, tabKeyCyclesThroughElements,
+ enableSiteSpecificQuirks, usePageCache;
WebKitEditingBehavior editingBehavior;
@@ -2452,6 +2557,8 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
"enable-universal-access-from-file-uris", &enableUniversalAccessFromFileURI,
"enable-dom-paste", &enableDOMPaste,
"tab-key-cycles-through-elements", &tabKeyCyclesThroughElements,
+ "enable-site-specific-quirks", &enableSiteSpecificQuirks,
+ "enable-page-cache", &usePageCache,
NULL);
settings->setDefaultTextEncodingName(defaultEncoding);
@@ -2479,6 +2586,8 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
settings->setEditingBehavior(core(editingBehavior));
settings->setAllowUniversalAccessFromFileURLs(enableUniversalAccessFromFileURI);
settings->setDOMPasteAllowed(enableDOMPaste);
+ settings->setNeedsSiteSpecificQuirks(enableSiteSpecificQuirks);
+ settings->setUsesPageCache(usePageCache);
Page* page = core(webView);
if (page)
@@ -2575,7 +2684,10 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar
Page* page = core(webView);
if (page)
page->setTabKeyCyclesThroughElements(g_value_get_boolean(&value));
- }
+ } else if (name == g_intern_string("enable-site-specific-quirks"))
+ settings->setNeedsSiteSpecificQuirks(g_value_get_boolean(&value));
+ else if (name == g_intern_string("enable-page-cache"))
+ settings->setUsesPageCache(g_value_get_boolean(&value));
else if (!g_object_class_find_property(G_OBJECT_GET_CLASS(webSettings), name))
g_warning("Unexpected setting '%s'", name);
g_value_unset(&value);
@@ -2618,6 +2730,8 @@ static void webkit_web_view_init(WebKitWebView* webView)
priv->webWindowFeatures = webkit_web_window_features_new();
priv->subResources = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_object_unref);
+
+ priv->tooltipText = 0;
}
GtkWidget* webkit_web_view_new(void)
@@ -2656,7 +2770,10 @@ void webkit_web_view_request_download(WebKitWebView* webView, WebKitNetworkReque
return;
}
- webkit_download_start(download);
+ /* Start the download now if it has a destination URI, otherwise it
+ may be handled asynchronously by the application. */
+ if (webkit_download_get_destination_uri(download))
+ webkit_download_start(download);
}
bool webkit_web_view_use_primary_for_paste(WebKitWebView* webView)
@@ -3969,6 +4086,27 @@ static IntPoint documentPointForWindowPoint(Frame* frame, const IntPoint& window
return view ? view->windowToContents(windowPoint) : windowPoint;
}
+void webkit_web_view_set_tooltip_text(WebKitWebView* webView, const char* tooltip)
+{
+#if GTK_CHECK_VERSION(2, 12, 0)
+ WebKitWebViewPrivate* priv = webView->priv;
+ g_free(priv->tooltipText);
+ if (tooltip && *tooltip != '\0') {
+ priv->tooltipText = g_strdup(tooltip);
+ gtk_widget_set_has_tooltip(GTK_WIDGET(webView), TRUE);
+ } else {
+ priv->tooltipText = 0;
+ gtk_widget_set_has_tooltip(GTK_WIDGET(webView), FALSE);
+ }
+
+ gtk_widget_trigger_tooltip_query(GTK_WIDGET(webView));
+#else
+ // TODO: Support older GTK+ versions
+ // See http://bugs.webkit.org/show_bug.cgi?id=15793
+ notImplemented();
+#endif
+}
+
/**
* webkit_web_view_get_hit_test_result:
* @webView: a #WebKitWebView
@@ -4019,3 +4157,81 @@ G_CONST_RETURN gchar* webkit_web_view_get_icon_uri(WebKitWebView* webView)
priv->iconURI = g_strdup(iconURL.utf8().data());
return priv->iconURI;
}
+
+/**
+ * webkit_set_cache_model:
+ * @cache_model: a #WebKitCacheModel
+ *
+ * Specifies a usage model for WebViews, which WebKit will use to
+ * determine its caching behavior. All web views follow the cache
+ * model. This cache model determines the RAM and disk space to use
+ * for caching previously viewed content .
+ *
+ * Research indicates that users tend to browse within clusters of
+ * documents that hold resources in common, and to revisit previously
+ * visited documents. WebKit and the frameworks below it include
+ * built-in caches that take advantage of these patterns,
+ * substantially improving document load speed in browsing
+ * situations. The WebKit cache model controls the behaviors of all of
+ * these caches, including various WebCore caches.
+ *
+ * Browsers can improve document load speed substantially by
+ * specifying WEBKIT_CACHE_MODEL_WEB_BROWSER. Applications without a
+ * browsing interface can reduce memory usage substantially by
+ * specifying WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER. Default value is
+ * WEBKIT_CACHE_MODEL_WEB_BROWSER.
+ *
+ * Since: 1.1.18
+ */
+void webkit_set_cache_model(WebKitCacheModel model)
+{
+ if (cacheModel == model)
+ return;
+
+ // FIXME: Add disk cache handling when soup has the API
+ guint cacheTotalCapacity;
+ guint cacheMinDeadCapacity;
+ guint cacheMaxDeadCapacity;
+ gdouble deadDecodedDataDeletionInterval;
+ guint pageCacheCapacity;
+
+ switch (model) {
+ case WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER:
+ pageCacheCapacity = 0;
+ cacheTotalCapacity = 0;
+ cacheMinDeadCapacity = 0;
+ cacheMaxDeadCapacity = 0;
+ deadDecodedDataDeletionInterval = 0;
+ break;
+ case WEBKIT_CACHE_MODEL_WEB_BROWSER:
+ pageCacheCapacity = 3;
+ cacheTotalCapacity = 32 * 1024 * 1024;
+ cacheMinDeadCapacity = cacheTotalCapacity / 4;
+ cacheMaxDeadCapacity = cacheTotalCapacity / 2;
+ deadDecodedDataDeletionInterval = 60;
+ break;
+ default:
+ g_return_if_reached();
+ }
+
+ cache()->setCapacities(cacheMinDeadCapacity, cacheMaxDeadCapacity, cacheTotalCapacity);
+ cache()->setDeadDecodedDataDeletionInterval(deadDecodedDataDeletionInterval);
+ pageCache()->setCapacity(pageCacheCapacity);
+ cacheModel = model;
+}
+
+/**
+ * webkit_get_cache_model:
+ *
+ * Returns the current cache model. For more information about this
+ * value check the documentation of the function
+ * webkit_set_cache_model().
+ *
+ * Return value: the current #WebKitCacheModel
+ *
+ * Since: 1.1.18
+ */
+WebKitCacheModel webkit_get_cache_model()
+{
+ return cacheModel;
+}
diff --git a/WebKit/gtk/webkit/webkitwebview.h b/WebKit/gtk/webkit/webkitwebview.h
index 8dd7f39..e69de0a 100644
--- a/WebKit/gtk/webkit/webkitwebview.h
+++ b/WebKit/gtk/webkit/webkitwebview.h
@@ -49,6 +49,11 @@ typedef enum {
WEBKIT_NAVIGATION_RESPONSE_DOWNLOAD
} WebKitNavigationResponse;
+typedef enum {
+ WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER = 1,
+ WEBKIT_CACHE_MODEL_WEB_BROWSER
+} WebKitCacheModel;
+
typedef enum
{
WEBKIT_WEB_VIEW_TARGET_INFO_HTML,
@@ -370,6 +375,12 @@ webkit_web_view_get_hit_test_result (WebKitWebView *webView,
WEBKIT_API G_CONST_RETURN gchar *
webkit_web_view_get_icon_uri (WebKitWebView *webView);
+WEBKIT_API void
+webkit_set_cache_model (WebKitCacheModel cache_model);
+
+WEBKIT_API WebKitCacheModel
+webkit_get_cache_model (void);
+
G_END_DECLS
#endif
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 17c7470..13dd4e1 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
2010-01-19 Steve Block <steveblock@google.com>
Reviewed by Adam Barth.
@@ -22570,3 +22571,6 @@
(-[WebView initWithCoder:]):
== Rolled over to ChangeLog-2007-10-14 ==
+=======
+== Rolled over to ChangeLog-2010-01-29 ==
+>>>>>>> webkit.org at r54127
diff --git a/WebKit/mac/ChangeLog-2010-01-29 b/WebKit/mac/ChangeLog-2010-01-29
new file mode 100644
index 0000000..e734309
--- /dev/null
+++ b/WebKit/mac/ChangeLog-2010-01-29
@@ -0,0 +1,23230 @@
+2010-01-29 Mark Rowe <mrowe@apple.com>
+
+ Fix the Mac build.
+
+ Disable ENABLE_INDEXED_DATABASE since it is "completely non-functional".
+
+ As the comment in FeatureDefines.xcconfig notes, the list of feature defines
+ needs to be kept in sync across the various files. The default values also
+ need to be kept in sync between these files and build-webkit.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-01-29 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7441982> REGRESSION (TOT): Adobe CS4: Installer alerts are displayed as
+ blank windows
+
+ * WebView/WebView.mm:
+ (shouldEnableLoadDeferring): Load deferring is enabled unless the application is Adobe
+ Installer.
+ (-[WebView _preferencesChangedNotification:]): Call setLoadDeferringEnabled().
+
+2010-01-28 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Huge plain text pastes are slow
+ <rdar://problem/5195056>
+ https://bugs.webkit.org/show_bug.cgi?id=34237
+
+ Mail is ignoring the fragment created from plain text or HTML that is
+ passed to the delegate function, that creates a new one.
+ This fix avoids creating the fragment twice.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]):
+
+2010-01-25 Anders Carlsson <andersca@apple.com>
+
+ Featureless build fixes.
+
+ * Misc/WebCache.mm:
+ (+[WebCache empty]):
+ * WebCoreSupport/WebApplicationCache.mm:
+ * WebCoreSupport/WebChromeClient.h:
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _transferApplicationCache:]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _cacheabilityDictionary]):
+ * WebView/WebView.mm:
+ (WebKitInitializeApplicationCachePathIfNecessary):
+ (-[WebView _close]):
+ * WebView/WebViewData.mm:
+ (-[WebViewPrivate dealloc]):
+ (-[WebViewPrivate finalize]):
+
+2010-01-25 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ A WebGeolocationControllerClient is leaked for every WebView
+ https://bugs.webkit.org/show_bug.cgi?id=34145
+
+ * WebCoreSupport/WebGeolocationControllerClient.h:
+ * WebCoreSupport/WebGeolocationControllerClient.mm:
+ (WebGeolocationControllerClient::geolocationDestroyed):
+
+2010-01-22 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34025
+ Enable client-based Geolocation abstraction for Mac, Windows AppleWebKit targets.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-01-22 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ [WebFrame loadRequest:] does not null check the WebCore::Frame
+ <rdar://problem/7416286> and https://bugs.webkit.org/show_bug.cgi?id=34021
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame loadRequest:]): Null check the WebCore::Frame as it can disappear
+ out of underneath a WebFrame.
+
+2010-01-22 Peter Kasting <pkasting@google.com>
+
+ Reviewed by David Hyatt.
+
+ When scrolling by page, hold back 1/8th of the visible size instead of
+ 40 px.
+ https://bugs.webkit.org/show_bug.cgi?id=32595
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _verticalPageScrollDistance]):
+ (-[WebFrameView initWithFrame:]):
+ (-[WebFrameView _horizontalPageScrollDistance]):
+
+2010-01-20 Jian Li <jianli@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Implement File and Blob interfaces as defined in File API spec.
+ https://bugs.webkit.org/show_bug.cgi?id=32912
+
+ * MigrateHeaders.make:
+
+2010-01-19 Timothy Hatcher <timothy@apple.com>
+
+ Fix erroneous page scrolls when trying to select text or use form elements
+ with the Web Inspector docked.
+
+ http://webkit.org/b/24403
+ rdar://problem/6753925
+
+ Reviewed by John Sullivan and Darin Adler.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::scrollRectIntoView): The scrollRect.move() call was
+ incorrectly converting the rect under the assumption that the frame view
+ is the same size as the WebView. Using convertRect:fromView: instead
+ is enough to fix the bug, but that code isn't needed since WebCore
+ already takes care of scrolling the main frame's document view, so it
+ was redundant to do it here too.
+
+2010-01-20 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler and Adam Roben.
+
+ Feature defines are difficult to maintain on Windows builds
+ https://bugs.webkit.org/show_bug.cgi?id=33883
+
+ * Configurations/FeatureDefines.xcconfig: Add comments about keeping feature definitions in sync.
+
+2010-01-20 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7489504> Clicking on an overflow scrollbar when the window doesn't have
+ focus only focuses the window; it should start scrolling too
+ https://bugs.webkit.org/show_bug.cgi?id=33906
+
+ * Misc/WebElementDictionary.mm:
+ (+[WebElementDictionary initializeLookupTable]): Initialize WebElementIsInScrollBarKey.
+ (-[WebElementDictionary _isInScrollBar]): Added. Returns whether the HitTestResult contains
+ a scroll bar.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _isScrollBarEvent:]): Added. Returns whether the event point is in a scroll
+ bar in this view.
+ (-[WebHTMLView acceptsFirstMouse:]): Accept scroll bar events.
+ * WebView/WebView.mm: Define WebElementIsInScrollBarKey.
+ * WebView/WebViewPrivate.h: Declare WebElementIsInScrollBarKey.
+
+2010-01-19 Dan Bernstein <mitz@apple.com>
+
+ Redo Tiger build fix without making WebTypesInternal.h a private header
+
+ * WebView/WebHTMLRepresentation.h: Define and use WebNSUInteger.
+ * WebView/WebHTMLRepresentation.mm: Import WebTypesInternal.h.
+
+2009-12-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7068584> Crash at NetscapePluginHostProxy::processRequests
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::waitForReply): Wrapped with calls
+ to willCallPluginFunction/didCallPluginFunction. This prevents the plug-in
+ from being stopped while waiting for reply.
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::createBindingsInstance): Protect the
+ instance proxy in case the plug-in host crashes while waiting for reply.
+ * Plugins/Hosted/ProxyInstance.h:
+ (WebKit::ProxyInstance::waitForReply): Added. Calls through to
+ NetscapePluginInstanceProxy::waitForReply(), but returns a null reply if the
+ proxy gets invalidated while waiting for the reply.
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::invoke): Use ProxyInstance::waitForReply().
+ (WebKit::ProxyInstance::supportsInvokeDefaultMethod): Ditto.
+ (WebKit::ProxyInstance::supportsConstruct): Ditto.
+ (WebKit::ProxyInstance::getPropertyNames): Ditto.
+ (WebKit::ProxyInstance::methodsNamed): Ditto.
+ (WebKit::ProxyInstance::fieldNamed): Ditto.
+ (WebKit::ProxyInstance::fieldValue): Ditto.
+ (WebKit::ProxyInstance::setFieldValue): Ditto.
+
+2010-01-19 John Sullivan <sullivan@apple.com>
+
+ Tiger build fix.
+
+ * WebView/WebHTMLRepresentation.h:
+ Added #import for WebTypesInternal.h so NSUInteger will be defined on Tiger.
+
+2010-01-19 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Part of <http://webkit.org/b/28622>.
+ Caught exceptions still pause the debugger.
+
+ Update WebScriptDebugger::exception to have the hasHandler parameter.
+
+ This just adds a new parameter, no behavior is changed.
+
+ * WebView/WebScriptDebugger.h:
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::exception):
+
+2010-01-19 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: The child <option> elements of a non-multiple <select> are not
+ exposed
+
+ https://bugs.webkit.org/show_bug.cgi?id=33773
+ <rdar://problem/7550556>
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory AXMenuListPopupActionVerb]):
+ Stubbed.
+ (-[WebViewFactory AXMenuListActionVerb]):
+ Stubbed.
+
+2010-01-19 John Sullivan <sullivan@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=33854
+ Would like a variant of WebHTMLRepresentation's searchForLabelsBeforeElement that returns
+ more info about where the result was found
+
+ Reviewed by Darin Adler
+
+ * WebView/WebHTMLRepresentation.h:
+ Declare -searchForLabels:beforeElement:resultDistance:resultIsInCellAbove.
+
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation searchForLabels:beforeElement:]):
+ Now calls through to searchForLabels:beforeElement:resultDistance:resultIsInCellAbove.
+ (-[WebHTMLRepresentation searchForLabels:beforeElement:resultDistance:resultIsInCellAbove:]):
+ New method, calls through to WebCore.
+
+2010-01-19 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Add an API to obtain the WebScriptWorld for a given JSGlobalContextRef.
+
+ * WebView/WebScriptWorld.h:
+ * WebView/WebScriptWorld.mm:
+ (+[WebScriptWorld scriptWorldForGlobalContext:]):
+
+2010-01-19 Steve Block <steveblock@google.com>
+
+ Unreviewed build fix.
+
+ Fixes Snow Leopard build due to http://trac.webkit.org/changeset/53464
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm: Modified. Import <WebCore/Bridge.h>
+
+2010-01-19 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ Renames WebCore/bridge/runtime.[cpp|h] to WebCore/bridge/Bridge.[cpp|h]
+ https://bugs.webkit.org/show_bug.cgi?id=33801
+
+ * Plugins/Hosted/ProxyInstance.h:
+
+2010-01-18 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Script attributes are copied and pasted, making cross-domain attacks possible (30019)
+ <rdar://problem/6008809>
+ https://bugs.webkit.org/show_bug.cgi?id=30019
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Modified the call to createMarkupString.
+
+2010-01-18 Steve Falkenburg <sfalken@apple.com>
+
+ Rubber-stamped by Sam Weinig.
+
+ Add missing export for Geolocation.
+
+ * WebKit.exp:
+
+2010-01-18 Adam Roben <aroben@apple.com>
+
+ Add +[WebView _setDomainRelaxationForbidden:forURLScheme:]
+
+ WebKit/mac part of fixing <http://webkit.org/b/33806>
+ <rdar://problem/7552837> Would like API to disallow setting of
+ document.domain for pages with certain URL schemes
+
+ Reviewed by Sam Weinig.
+
+ * WebView/WebView.mm:
+ (+[WebView _setDomainRelaxationForbidden:forURLScheme:]):
+ * WebView/WebViewPrivate.h:
+ Added. Calls through to SecurityOrigin.
+
+2010-01-16 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Cache JS string values made from DOM strings (Dromaeo speedup)
+ https://bugs.webkit.org/show_bug.cgi?id=33768
+ <rdar://problem/7353576>
+
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::stringValue): Explicitly make a String, since char*
+ is now ambiguous.
+
+2010-01-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7532544>
+
+ Expose new method on WebKitSystemInterface, WKGetUserToBaseCTM(), which will
+ be used for a shadow drawing fix.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+
+2010-01-13 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33610
+ <rdar://problem/7288546> Silverlight full screen performance problem seen on Snow Leopard.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView _workaroundSilverlightFullScreenBug:]): Added. Work around Silverlight full screen
+ performance issue by maintaining an accelerated GL pixel format. We can safely remove this at some point in
+ the future when both Microsoft releases a genuine fix for 7288546 and enough Silverlight users update to the
+ new Silverlight. For now, we'll distinguish older broken versions of Silverlight by asking the plug-in if it
+ resolved its full screen badness.
+ (-[WebNetscapePluginView _createPlugin]): Call _workaroundSilverlightFullScreenBug:YES if this is Silverlight.
+ (-[WebNetscapePluginView _destroyPlugin]): Call _workaroundSilverlightFullScreenBug:NO if this is Silverlight.
+
+2010-01-11 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7512726> Flash full-screen does not work correctly with Flash 10.1 beta
+
+ Explicitly track when the plug-in shows and hides a full-screen window to determine
+ whether a plug-in is currently full-screen, rather than relying on menu bar visibility.
+ This ensures that we activate the plug-in host process and client application as
+ appropriate when the plug-in enters or exits full-screen.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ (WebKit::NetscapePluginHostProxy::isFullScreenWindowShowing):
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+ (WebKit::NetscapePluginHostProxy::setMenuBarVisible):
+ (WebKit::NetscapePluginHostProxy::didEnterFullScreen):
+ (WebKit::NetscapePluginHostProxy::didExitFullScreen):
+ (WebKit::NetscapePluginHostProxy::setFullScreenWindowIsShowing):
+ (WKPCSetMenuBarVisible):
+ (WKPCSetFullScreenWindowIsShowing):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+
+2010-01-11 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33455
+ Allows plugins to participate in accelerated compositing
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView createPlugin]):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView createPlugin]): If accelerated compositing is
+ available, don't use a layer-backed NSView for plugins. Instead, tickle the
+ accelerated compositing code via setNeedsStyleRecalc(SyntheticStyleChange),
+ which will parent the plugin's layer in the accelerated compositing layer
+ tree.
+
+2010-01-09 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ ScriptController::isEnabled needs to be renamed
+ https://bugs.webkit.org/show_bug.cgi?id=32063
+
+ Rename ScriptController::isEnabled to
+ ScriptController::canExecuteScripts.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
+ (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
+
+2010-01-07 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32987
+
+ Added ENABLE_XHTMLMP flag. Disabled by default.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-01-07 Alexey Proskuryakov <ap@apple.com>
+
+ More build fix.
+
+ * WebKitPrefix.h: Define JS_EXPORTCLASS here, as well (as empty).
+
+2010-01-07 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ REGRESSION (r48075): Clicking and dragging in a widget's text field doesn't create a selection; drags widget instead ( Translation, Weather, Ski Report )
+ https://bugs.webkit.org/show_bug.cgi?id=33348
+ <rdar://problem/7310616>
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): We only want to
+ handle file: URLs for the user stylesheet now, so special-case the
+ DashboardClient's funky user stylesheet URL by mapping it to the
+ equivalent file URL.
+
+2010-01-07 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33331
+ (WebHostedNetscapePluginView should pass acceleratedCompositingEnabled bool to NetscapePluginHostManager when instantiating plug-ins)
+
+ * Plugins/Hosted/NetscapePluginHostManager.h: Modify method signature for instantiatePlugin to include acceleratedCompositingEnabled bool.
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView createPlugin]): Pass accelerated compositing status to NetscapePluginHostManage
+
+2010-01-06 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Third step of:
+ <rdar://problem/6398111> Integrate hardware layers with out-of-process plug-ins layer hosting mechanism
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView getVariable:value:]): Add case for WKNVSupportsCompositingCoreAnimationPluginsBool.
+
+2010-01-06 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Second step of:
+ <rdar://problem/6398111> Integrate hardware layers with out-of-process plug-ins layer hosting mechanism
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.h: Expose the CALayer of the plugin by adding -pluginLayer method.
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView pluginLayer]): Added.
+ * Plugins/WebNetscapePluginView.h: Expose the CALayer of the plugin by adding -pluginLayer method.
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView pluginLayer]): Added.
+
+2010-01-06 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ First step toward:
+ <rdar://problem/6398111> Integrate hardware layers with out-of-process plug-ins layer hosting mechanism
+
+ Small refactoring moving the PluginWidget class from WebKit to WebCore.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm: Use the WebCore version of PluginWidget.
+
+2010-01-05 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Re-enable plug-in halting on Mac after r51953
+
+ * WebCoreSupport/WebPluginHalterClient.mm:
+ (WebPluginHalterClient::enabled): Test for the correct selector.
+
+2010-01-04 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Ada Chan and Mark Rowe.
+
+ Updated copyright string
+
+ * Info.plist:
+
+2009-12-27 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ plugins/get-url-with-iframe-target.html fails on SnowLeopard (64-bit)
+ https://bugs.webkit.org/show_bug.cgi?id=32982
+
+ This test has been failing on SnowLeopard since it was landed.
+
+ The problem is that we never delivered the notification for
+ NPN_GetURLNotify, in the frame-targeting case, for out-of-process
+ plugins on Mac.
+
+ I implemented support for this based on how in-process Mac plugins
+ do it.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.h:
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+ (WebKit::HostedNetscapePluginStream::reasonForError):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::PluginRequest::create):
+ (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest):
+ (WebKit::NetscapePluginInstanceProxy::destroy):
+ (WebKit::NetscapePluginInstanceProxy::performRequest):
+ (WebKit::NetscapePluginInstanceProxy::webFrameDidFinishLoadWithReason):
+ (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
+ (WebKit::NetscapePluginInstanceProxy::loadRequest):
+ * Plugins/Hosted/WebHostedNetscapePluginView.h:
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView webFrame:didFinishLoadWithReason:]):
+ (-[WebHostedNetscapePluginView webFrame:didFinishLoadWithError:]):
+
+2009-12-22 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Turn off datagrid by default, at least for all platforms Apple ships.
+ The datagrid implementation isn't ready for general web use yet.
+
+ * Configurations/FeatureDefines.xcconfig: Turn off datagrid by default.
+
+2009-12-21 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Don't allocate a WebGeolocationControllerClient unless that compile-time setting is enabled.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+
+2009-12-18 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Add Mac WebKit side of the client based geolocation provider.
+
+ * Misc/WebKitErrors.m:
+ (registerErrors): Add Geolocation errors.
+ * Misc/WebKitErrorsPrivate.h:
+ * WebCoreSupport/WebGeolocationControllerClient.h: Added.
+ (WebGeolocationControllerClient::webView):
+ * WebCoreSupport/WebGeolocationControllerClient.mm: Added.
+ (WebGeolocationControllerClient::WebGeolocationControllerClient):
+ (WebGeolocationControllerClient::startUpdating):
+ (WebGeolocationControllerClient::stopUpdating):
+ (WebGeolocationControllerClient::lastPosition):
+ Add implementation of the WebGeolocationControllerClient.
+
+ * WebView/WebGeolocationPosition.h: Added.
+ * WebView/WebGeolocationPosition.mm: Added.
+ (-[WebGeolocationPositionInternal initWithCoreGeolocationPosition:]):
+ (core):
+ (-[WebGeolocationPosition initWithTimestamp:latitude:longitude:accuracy:]):
+ * WebView/WebGeolocationPositionInternal.h: Added.
+ Add an Objective-C wrapper for GeolocationPosition.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Set the GeolocationControllerClient.
+ (-[WebView _setGeolocationProvider:]): Set the GeolocationProvider
+ (-[WebView _geolocationProvider]): Return the GeolocationProvider.
+ (-[WebView _geolocationDidChangePosition:]): Notify WebCore that the position changed.
+ (-[WebView _geolocationDidFailWithError:]): Notify WebCore that an error occured.
+ * WebView/WebViewData.h:
+ * WebView/WebViewPrivate.h:
+
+2009-12-18 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ REGRESSION(52325) Chromium build broken due to link failure
+ https://bugs.webkit.org/show_bug.cgi?id=32753
+
+ * WebCoreSupport/WebSystemInterface.m:
+ - Chromium Mac builds use this file, but do not
+ enable Pre-compiled Header (PCH) files so that
+ Chromium build bots can take advantage of the faster
+ distcc 3. Eventually all mac builds will likely use
+ distcc, but for now we'll add Platform.h here and document
+ its usage so it's not removed by accident.
+
+2009-12-18 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Fix preference key name.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+
+2009-12-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Pass preference to plug-in host.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+
+2009-12-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add WKPCRunSyncOpenPanel implementation.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCRunSyncOpenPanel):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2009-12-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add a useProxiedOpenPanel WebPreference and tunnel it through to the plug-in host.
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::hostForPackage):
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences usesProxiedOpenPanel]):
+ (-[WebPreferences setUsesProxiedOpenPanel:]):
+ * WebView/WebPreferencesPrivate.h:
+
+2009-12-18 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Update WebKitSystemInterface for <rdar://problem/7237059>.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ Add #includes needed after WebCore clean-up
+
+ Rubber-stamped by Anders Carlsson.
+
+ Fixes <http://webkit.org/b/32718>.
+
+ * WebView/WebFrame.mm:
+ * WebView/WebFrameView.mm:
+ * WebView/WebView.mm:
+
+2009-12-17 Adam Roben <aroben@apple.com>
+
+ Mac build fix
+
+ * WebView/WebVideoFullscreenController.mm: Added now-needed #import.
+
+2009-12-13 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=32499
+ Add client based Geolocation provider
+
+ Add first cut of a client based Geolocation provider. This is guarded by
+ ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a
+ GeolocationControllerClient interface that no-one currently implements,
+ but will in a subsequent patch.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+
+2009-12-10 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Mac build fix. Unreviewed.
+
+ Re-adds code that was mistakenly removed from my last patch.
+
+ * WebCoreSupport/WebPluginHalterClient.mm:
+ Add necessary #import.
+
+ * WebView/WebDelegateImplementationCaching.h:
+ Declare a new overload of CallUIDelegateReturningBoolean.
+
+ * WebView/WebDelegateImplementationCaching.mm:
+ (CallDelegateReturningBoolean):
+ Add a new overload with different arguments.
+ (CallUIDelegateReturningBoolean):
+ Ditto.
+
+2009-12-10 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Pass more information about a plug-in to the PluginHalterDelegate
+
+ Reviewed by Adam Roben.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (WebHaltablePlugin::isWindowed):
+ Return false - the Mac doesn't really have windowed plug-ins.
+ (WebHaltablePlugin::pluginName):
+ Return the name from the plug-in package.
+
+ * WebCoreSupport/WebPluginHalterClient.h:
+ Update for new parameters.
+
+ * WebCoreSupport/WebPluginHalterClient.mm:
+ (WebPluginHalterClient::shouldHaltPlugin):
+ Ditto; pass them when making the delegate call.
+
+ * WebView/WebUIDelegatePrivate.h:
+ Update for new parameters.
+
+2009-12-08 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7295070> WebKit video fullscreen keeps playing after closing the window
+
+ Fix a leak of the QTMovieView when exiting fullscreen video, and remove the
+ old workaround.
+
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController windowDidLoad]): Set the movie view as the contentView directly.
+ (-[WebVideoFullscreenController setMediaElement:WebCore::]): Cast the contentView to a movie view.
+ (-[WebVideoFullscreenController windowDidExitFullscreen]): Remove the old workaround.
+
+2009-12-08 Dmitry Titov <dimich@chromium.org>
+
+ Rubber-stamped by David Levin.
+
+ Revert and reopen "Add asserts to RefCounted to make sure ref/deref happens on the right thread."
+ It may have caused massive increase of reported leaks on the bots.
+ https://bugs.webkit.org/show_bug.cgi?id=31639
+
+ * ForwardingHeaders/wtf/ThreadVerifier.h: Removed.
+
+2009-12-08 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Add asserts to RefCounted to make sure ref/deref happens on the right thread.
+ https://bugs.webkit.org/show_bug.cgi?id=31639
+
+ * ForwardingHeaders/wtf/ThreadVerifier.h: Added.
+
+2009-12-07 Dmitry Titov <dimich@chromium.org>
+
+ Rubber-stamped by Darin Adler.
+
+ Remove ENABLE_SHARED_SCRIPT flags
+ https://bugs.webkit.org/show_bug.cgi?id=32245
+ This patch was obtained by "git revert" command and then un-reverting of ChangeLog files.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-12-07 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7450481> One compositing test keeps DRT in "compositing mode", breaks repaint tests
+
+ The counter that WebView used to keep track of the number of enclosed WebHTMLViews using
+ accelerated compositing was hard to manage, and maintained incorrectly in a number of cases.
+ This caused one compositing test make DumpRenderTree think that all subsequent tests
+ were compositing too.
+
+ Replace this counter with notifications, which are only fired if a client (DRT) requests them. The
+ notification informs the client that a WebHTMLView entered compositing mode (or an already-
+ compositing WebHTML was added); it does not say when a view becomes uncomposited, or all
+ compositing subviews were removed, since this is tricky to get right.
+
+ Change -[WebView _isUsingAcceleratedCompositing] to manually walk the frames, and
+ return YES if any document view is composited.
+
+ * WebKit.exp:
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView close]):
+ (-[WebHTMLView viewDidMoveToSuperview]):
+ (-[WebHTMLView attachRootLayer:]):
+ (-[WebHTMLView detachRootLayer]):
+ * WebView/WebView.mm:
+ (+[WebView automaticallyNotifiesObserversForKey:]):
+ (-[WebView _postsAcceleratedCompositingNotifications]):
+ (-[WebView _setPostsAcceleratedCompositingNotifications:]):
+ (-[WebView _isUsingAcceleratedCompositing]):
+ * WebView/WebViewData.h:
+ * WebView/WebViewInternal.h:
+ * WebView/WebViewPrivate.h:
+
+2009-12-07 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32184
+ Handle out-of-memory conditions with JSC Ropes with a JS exception, rather than crashing.
+ Switch from using fastMalloc to tryFastMalloc, pass an ExecState to record the exception on.
+
+ * WebView/WebView.mm:
+ (aeDescFromJSValue):
+
+2009-12-07 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Holger Hans Peter Freyther.
+
+ Turn on (SVG) Filters support, by default.
+ https://bugs.webkit.org/show_bug.cgi?id=32224
+
+ * Configurations/FeatureDefines.xcconfig: Enable FILTERS build flag.
+
+2009-12-03 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/7214236> and http://webkit.org/b/32052 - Implement HTML5 state object history API
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDidPushStateWithinPage):
+ (WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
+ (WebFrameLoaderClient::dispatchDidPopStateWithinPage):
+ * WebView/WebDelegateImplementationCaching.h:
+ * WebView/WebFrameLoadDelegatePrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _cacheFrameLoadDelegateImplementations]):
+
+2009-12-03 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Simplify the settings support in inspector controller.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32076
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController showWindow:]):
+ (-[WebInspectorWindowController attach]):
+ (-[WebInspectorWindowController detach]):
+
+2009-12-03 Ben Murdoch <benm@google.com>
+
+ Reviewed by Brady Eidson.
+
+ [Android] notifyHistoryItemChanged() should pass a pointer to the HistoryItem that changed.
+ https://bugs.webkit.org/show_bug.cgi?id=31915
+
+ * History/WebHistoryItem.mm:
+ (WKNotifyHistoryItemChanged): Update WKNotifyHistoryItemChanged() to add the new HistoryItem parameter added in the WebCore portion of this patch.
+ * History/WebHistoryItemInternal.h: ditto.
+
+2009-12-03 Ben Murdoch <benm@google.com>
+
+ Reviewed by Brady Eidson.
+
+ [Android] The FrameLoaderClient is unaware of BackForwardList changes.
+ https://bugs.webkit.org/show_bug.cgi?id=31914
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDidAddBackForwardItem): Add an empty implementation. Method added to FrameLoaderClient by Android (see bug).
+ (WebFrameLoaderClient::dispatchDidRemoveBackForwardItem): ditto.
+ (WebFrameLoaderClient::dispatchDidChangeBackForwardIndex): ditto.
+
+2009-12-02 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Fix a mistake in the previous change
+
+ * WebView/WebView.mm:
+ (+[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]):
+ Make sure to include the image types’ view and representation classes
+ even when plug-ins are not allowed.
+
+2009-12-02 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Fixed <rdar://problem/7254127> WebKit can load plug-ins even when
+ plug-ins are disabled
+
+ Ensure that the shared WebPluginDatabase is not instantiated if no
+ WebViews are used that have plug-ins enabled.
+
+ * DefaultDelegates/WebDefaultPolicyDelegate.m:
+ (-[WebDefaultPolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]):
+ Call -[WebView _canShowMIMEType:] on the WebView instead of calling the
+ class method.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::canShowMIMEType): Ditto.
+ (WebFrameLoaderClient::transitionToCommittedForNewPage): Call
+ -[WebFrameView _viewClassForMIMEType:] on the WebView instead of calling
+ the class method.
+ (WebFrameLoaderClient::objectContentType): Ditto.
+
+ * WebView/WebDataSource.mm:
+ (+[WebDataSource _representationClassForMIMEType:allowingPlugins:]):
+ Added the allowPlugins parameter, which is passed through to
+ +[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:].
+ (-[WebDataSource _makeRepresentation]): Pass an allowPlugins value
+ based on the WebView’s preferences.
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _makeDocumentViewForDataSource:]): Call
+ -[WebFrameView _viewClassForMIMEType:] instead of calling the class
+ method.
+ (+[WebFrameView _viewClassForMIMEType:allowingPlugins:]): Added the
+ allowPlugins parameter, which is passed through to
+ +[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:].
+ (-[WebFrameView _viewClassForMIMEType:]): Added. Passes an allowPlugins
+ value based on the WebView’s preferences.
+
+ * WebView/WebFrameViewInternal.h:
+ * WebView/WebView.mm:
+ (+[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]):
+ Added the allowPlugins parameter. If false, skip the instantiation of
+ the shared WebPluginDatabase.
+ (-[WebView _viewClass:andRepresentationClass:forMIMEType:]): Pass an
+ allowPlugins value based on the WebView’s preferences.
+ (+[WebView _canShowMIMEType:allowingPlugins:]): Passes allowPlugins to
+ +_viewClass:andRepresentationClass:forMIMEType:allowingPlugins:.
+ (+[WebView canShowMIMEType:]): Changed to pass YES to
+ +_canShowMIMEType:allowingPlugins:.
+ (-[WebView _canShowMIMEType:]): Added. Passes an allowPlugins value
+ based on the WebView’s preferences.
+ (-[WebView _pluginForMIMEType:]): Return nil if plug-ins are disabled.
+ (-[WebView _pluginForExtension:]): Ditto.
+ (-[WebView _isMIMETypeRegisteredAsPlugin:]): Return NO if plug-ins are
+ disabled.
+ * WebView/WebViewInternal.h:
+
+2009-12-02 Timothy Hatcher <timothy@apple.com>
+
+ Fixes a crash when scrolling a frame that goes away mid-scroll.
+
+ <rdar://problem/7400263>
+
+ Reviewed by John Sullivan.
+
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView scrollWheel:]): Retain self incase the last
+ reference is released when calling super.
+
+2009-11-13 Timothy Hatcher <timothy@apple.com>
+
+ Migrate DOMHTMLInputElementPrivate.h as a private header.
+
+ Reviewed by Darin Adler.
+
+ * MigrateHeaders.make:
+
+2009-12-01 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Simon Fraser.
+
+ Add SVG animation test framework with 'snapshot' functionality
+ https://bugs.webkit.org/show_bug.cgi?id=31897
+
+ Add API used by the new 'sampleSVGAnimationForElementAtTime' DRT method,
+ forwarding the call to SVGDocumentExtensions, if SVG is enabled.
+
+ Implemented just like the existing pauseAnimation* methods for CSS animations.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _pauseSVGAnimation:onSMILNode:atTime:]):
+ * WebView/WebFramePrivate.h:
+
+2009-12-01 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Simplify [WebView userAgentForURL:]. No need to call into helper function.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::userAgent):
+ * WebView/WebView.mm:
+ (-[WebView userAgentForURL:]):
+ * WebView/WebViewInternal.h:
+
+2009-11-24 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Bug 31859 - Make world selection for JSC IsolatedWorlds automagical.
+
+ WebCore presently has to explicitly specify the world before entering into JSC,
+ which is a little fragile (particularly since property access via a
+ getter/setter might invoke execution). Instead derive the current world from
+ the lexical global object.
+
+ Since WebCore no longer needs to explicitly specify the world on entry to JSC DebuggerCallFrame::evaluate can be called directly.
+
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame evaluateWebScript:]):
+
+2009-11-24 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit
+ https://bugs.webkit.org/show_bug.cgi?id=31444
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-11-24 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31844
+ SocketStreamHandleCFNet should support CONNECT proxy credentials
+
+ * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): Add WKSI methods.
+
+2009-11-23 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ DocumentMarkers need to be educated about transforms
+ https://bugs.webkit.org/show_bug.cgi?id=31751
+
+ Find highlight is incorrect with transforms
+ <rdar://problem/6358394>
+
+ Allow callers to specify that Frame::selectionTextRects() takes transforms into account
+ when computing the set of rects that encompass a selection. For transformed elemenets, the
+ selection rect will be the bounding box of the selected content.
+
+ Fix DocumentMarkers to cache rects in absolute coordinates, rather than painting coordinates.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView selectionTextRects]):
+ Pass RespectTransforms to get a list of rects with transforms taken into account.
+
+2009-11-23 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Adam Roben.
+
+ <rdar://problem/7401503>
+
+ Added a workaround for plug-ins not drawing immediately.
+
+ * Plugins/WebBaseNetscapePluginView.mm: Added new constant.
+ (-[WebBaseNetscapePluginView _clearSubstituteImage]): Added.
+ (-[WebBaseNetscapePluginView resumeFromHalt]): Call above new method.
+
+2009-11-20 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Make sure to export WebSerializedJSValue.
+
+ * WebKit.exp:
+
+2009-11-20 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Oliver Hunt and Jon Honeycutt.
+
+ Add support for WebSerializedJSValue to WebKit. This object wraps the SerializedScriptValue functionality in WebCore
+ and exposes the ability to do JS value serialization/deserialization to WebKit clients.
+
+ * WebView/WebSerializedJSValue.h: Added.
+ * WebView/WebSerializedJSValue.mm: Added.
+ (-[WebSerializedJSValue initWithValue:context:]):
+ (-[WebSerializedJSValue deserialize:]):
+ (-[WebSerializedJSValue dealloc]):
+
+2009-11-20 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ WAI-ARIA: add support for 'math' role
+ https://bugs.webkit.org/show_bug.cgi?id=31706
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory AXARIAContentGroupText:]):
+
+2009-11-19 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7035231>
+ Support closed caption in <video> element
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+ Add QTMovieHasClosedCaptions and QTMovieSetShowClosedCaptions.
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory localizedMediaControlElementString:]):
+ (-[WebViewFactory localizedMediaControlElementHelpText:]):
+ Add accessibility help strings for media controller closed caption button.
+
+2009-11-18 Michelangelo De Simone <micdesim@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
+ Support for validationMessage attribute, as per HTML5 specs.
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory validationMessageValueMissingText]):
+ (-[WebViewFactory validationMessageTypeMismatchText]):
+ (-[WebViewFactory validationMessagePatternMismatchText]):
+ (-[WebViewFactory validationMessageTooLongText]):
+ (-[WebViewFactory validationMessageRangeUnderflowText]):
+ (-[WebViewFactory validationMessageRangeOverflowText]):
+ (-[WebViewFactory validationMessageStepMismatchText]):
+
+2009-11-18 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Make the Mac Geolocation API async.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::requestGeolocationPermissionForFrame):
+ (-[WebGeolocationPolicyListener initWithGeolocation:]):
+ (-[WebGeolocationPolicyListener allow]):
+ (-[WebGeolocationPolicyListener deny]):
+ Add WebGeolocationPolicyListener implementation of the new WebGeolocationPolicyListener
+ protocol and use if to implement requestGeolocationPermissionForFrame using the new async
+ API.
+
+ * WebCoreSupport/WebGeolocation.mm: Removed.
+ * WebCoreSupport/WebGeolocationInternal.h: Removed.
+ * WebCoreSupport/WebGeolocationMock.mm: Remove bogus include.
+ * WebCoreSupport/WebGeolocationPrivate.h: Removed.
+ * WebView/WebUIDelegatePrivate.h: Remove requestGeolocationPermission and add
+ WebGeolocationPolicyListener protocol and decidePolicyForGeolocationRequestFromOrigin delegate
+ method.
+
+2009-11-18 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Add Preferences for WebKitShowDebugBorders and WebKitShowRepaintCounter
+ https://bugs.webkit.org/show_bug.cgi?id=31601
+
+ These are used to debug accelerated compositing layers
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences showDebugBorders]):
+ (-[WebPreferences setShowDebugBorders:]):
+ (-[WebPreferences showRepaintCounter]):
+ (-[WebPreferences setShowRepaintCounter:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-11-17 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Make DRT show web inspector for tests in inspector/ folder.
+ - Updated DRT to show/close inspector for all tests under /inspector
+ - Introduced LayoutTestController::setTimelineProfilingEnabled and
+ WebInspector::setTimelineProfilingEnabled beside setJavaScriptProfilingEnabled
+ - Removed reload on each inspector test
+ - Renamed fast/inspector to fast/inspector-support in order not to trigger
+ inspector for those.
+ - Reimplemented timeline tests in order to get rid of reload there.
+ - Moved tests that don't require harness into the fast group.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31472
+
+ * WebInspector/WebInspector.h:
+ * WebInspector/WebInspector.mm:
+ (-[WebInspector isTimelineProfilingEnabled]):
+ (-[WebInspector setTimelineProfilingEnabled:]):
+
+2009-11-14 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Need to implement ARIA role="directory"
+ https://bugs.webkit.org/show_bug.cgi?id=31516
+
+ Fix a spelling error in the comment of a localized (accessibility) string.
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory AXARIAContentGroupText:]):
+
+2009-11-14 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/7287487>
+ Do not use QuickTime version to detect media controller theme
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Initialize wkMediaControllerThemeAvailable.
+
+2009-11-13 Adam Roben <aroben@apple.com>
+
+ Tell the WebFrameLoadDelegate when window objects in isolated worlds
+ are cleared
+
+ Fixes <http://webkit.org/b/31124>.
+
+ Reviewed by Dave Hyatt.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
+ Replaced windowObjectCleared with this function. If the delegate
+ implements it, call
+ -webView:didClearWindowObjectForFrame:inScriptWorld:. Otherwise, if
+ the passed-in world is the mainThreadNormalWorld(), call
+ -webView:didClearWindowObject:forFrame:.
+
+ * WebView/WebDelegateImplementationCaching.h: Added a new entry in the
+ frame load delegate implementation cache for the new delegate method.
+
+ * WebView/WebFrameLoadDelegatePrivate.h:
+ * WebView/WebScriptWorld.mm:
+ (allWorlds): Added. Returns a HashMap of all the WebScriptWorlds in
+ existence.
+ (-[WebScriptWorld initWithWorld:]): Add ourselves to allWorlds().
+ (-[WebScriptWorld dealloc]): Remove ourselves from allWorlds().
+ (+[WebScriptWorld findOrCreateWorld:]): Returns the existing
+ WebScriptWorld for this DOMWrapperWorld, or a new one if one doesn't
+ already exist.
+
+ * WebView/WebScriptWorldInternal.h: Declared +findOrCreateWorld:.
+
+ * WebView/WebView.mm:
+ (-[WebView _cacheFrameLoadDelegateImplementations]): Cache the
+ implementation of the new frame load delegate method.
+
+2009-11-13 Adam Roben <aroben@apple.com>
+
+ Finish replacing worldIDs with world objects
+
+ The only remaining use of worldIDs was in a method only used by DRT
+ for the isolated worlds tests.
+
+ Fixes <http://webkit.org/b/31414> Replace worldIDs with world objects
+
+ Reviewed by Mark Rowe.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
+ * WebView/WebFramePrivate.h:
+ Renamed from
+ _stringByEvaluatingJavaScriptInIsolatedWorld:WithGobalObject:FromString:.
+ Now takes a WebScriptWorld instead of a worldID, so we don't need to
+ maintain a map of worldID -> world anymore.
+
+2009-11-12 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ When exiting full-screen video, rather than resetting the system UI
+ mode, restore it to what it was when full-screen mode was entered.
+
+ * WebView/WebVideoFullscreenController.h: Cleaned up style, removed
+ unnecessary imports, and added _savedUIMode and _savedUIOptions ivars.
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController delegate]): Cleaned up style.
+ (-[WebVideoFullscreenController setDelegate:]): Ditto.
+ (-[WebVideoFullscreenController windowDidExitFullscreen]): Restore the
+ system UI mode.
+ (-[WebVideoFullscreenController windowDidEnterFullscreen]): Save the
+ system UI mode.
+ * WebView/WebView.mm: Added now-necessary import.
+
+2009-11-12 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ externalRepresentation should take Frame as the argument
+ https://bugs.webkit.org/show_bug.cgi?id=31393
+
+ No new tests as this is just a refactoring.
+
+ * Misc/WebCoreStatistics.mm:
+ (-[WebFrame renderTreeAsExternalRepresentation]):
+
+2009-11-12 Adam Roben <aroben@apple.com>
+
+ Replace worldIDs with world objects
+
+ WebScriptWorld is the new object that represents a world. The only
+ place worldID is still used is in -[WebFrame
+ _stringByEvaluatingJavaScriptInIsolatedWorld:WithGlobalObject:FromString:],
+ but that will change soon.
+
+ Part of <http://webkit.org/b/31414> Implement new SPI for dealing with
+ user scripts/stylesheets and isolated worlds
+
+ Reviewed by Sam Weinig.
+
+ * WebKit.exp: Export WebScriptWorld.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptInIsolatedWorld:WithGlobalObject:FromString:]):
+ Moved the bizarre world caching/creation logic that DRT depends on
+ here from the findWorld function in ScriptController.cpp. Updated to
+ use ScriptController::executeScriptInWorld instead of
+ ScriptController::executeScriptInIsolatedWorld.
+ (-[WebFrame _contextForWorld:]): Renamed from contextForWorldID:. Now
+ takes a WebScriptWorld.
+
+ * WebView/WebFramePrivate.h: Replaced contextForWorldID: with
+ _contextForWorld:.
+
+ * WebView/WebScriptWorld.h: Added.
+ * WebView/WebScriptWorld.mm: Added.
+ (-[WebScriptWorld initWithWorld:]): Store the passed-in world in our
+ _private member.
+ (-[WebScriptWorld init]): Create a new DOMWrapperWorld and pass it to
+ -initWithWorld:.
+ (-[WebScriptWorld dealloc]): Release _private.
+ (+[WebScriptWorld standardWorld]): Returns a shared instance that
+ represents WebCore's mainThreadNormalWorld().
+ (+[WebScriptWorld world]): Returns a new instance.
+ (core): Returns the DOMWrapperWorld for this WebScriptWorld.
+
+ * WebView/WebScriptWorldInternal.h: Added.
+
+ * WebView/WebView.mm:
+ (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:]):
+ (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:]):
+ (+[WebView _removeUserScriptFromGroup:world:url:]):
+ (+[WebView _removeUserStyleSheetFromGroup:world:url:]):
+ (+[WebView _removeUserScriptsFromGroup:world:]):
+ (+[WebView _removeUserStyleSheetsFromGroup:world:]):
+ * WebView/WebViewPrivate.h:
+ Changed these functions to take a WebScriptWorld instead of a worldID.
+
+2009-11-12 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ ARIA: add alert type roles
+ https://bugs.webkit.org/show_bug.cgi?id=31392
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory AXARIAContentGroupText:]):
+
+2009-11-10 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30754
+
+ Removed method draggedImage:movedTo:
+
+ * WebView/WebFrame.mm:
+ * WebView/WebFrameInternal.h:
+ * WebView/WebHTMLView.mm:
+
+2009-11-10 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Small WebKit part of:
+ Fix for <rdar://problem/7059710>
+ -and corresponding-
+ https://bugs.webkit.org/show_bug.cgi?id=31196 Implement -webkit-
+ color-correction for CSS colors
+
+ * Misc/WebKitNSStringExtras.mm:
+ (-[NSString _web_drawAtPoint:font:textColor:]): setFillColor now
+ requires callers to pass a ColorSpace.
+
+2009-11-10 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Eric Carlson and Darin Adler.
+
+ WebKit part of making full-screen video pause during scrubbing.
+
+ * WebView/WebVideoFullscreenHUDWindowController.h: Added _isScrubbing
+ ivar.
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindowController dealloc]): Assert that
+ _isScrubbing is NO.
+ (-[WebVideoFullscreenHUDWindowController endScrubbing]): Call
+ HTMLMediaElement::endScrubbing().
+ (-[WebVideoFullscreenHUDWindowController timelinePositionChanged:]):
+ If scrubbing has just begun, call HTMLMediaElement::beginScrubbing()
+ and schedule -endScrubbing to be called when mouse tracking ends.
+
+2009-11-09 Mark Mentovai <mark@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ Track "can have scrollbar" state within FrameView independently of the
+ individual scrollbar states in ScrollView.
+
+ rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167
+ REGRESSION (r48064): mint.com loses scrollbars after coming out of
+ edit mode.
+
+ rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517
+ REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
+
+ Test: fast/overflow/scrollbar-restored.html
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _install]):
+
+2009-11-08 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Made the full-screen video HUD appear when playback stops, such as when
+ the end of the video is reached.
+
+ * WebView/WebVideoFullscreenHUDWindowController.h: Cleaned up.
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Updated
+ for the renaming of -updateRate to -updatePlayButton.
+ (-[WebVideoFullscreenHUDWindowController updatePlayButton]): Renamed
+ -updateRate to this.
+ (-[WebVideoFullscreenHUDWindowController updateRate]): This method now
+ responds to changes to the playback rate by updating the play button
+ and showing or hiding the HUD as necessary.
+ (-[WebVideoFullscreenHUDWindowController togglePlaying:]): Now only
+ toggles playing. UI updates are driven by -updateRate being called.
+ (-[WebVideoFullscreenHUDWindowController playing]): Cleaned up.
+
+2009-11-02 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by John Sullivan and Mark Rowe.
+
+ <rdar://problem/7356733> Voiceover does not read correct media controller time values
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory localizedMediaTimeDescription:]):
+
+2009-11-02 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Made the remaining time display show negative zero at the end of the
+ video.
+
+ Made other cleanup.
+
+ * WebView/WebVideoFullscreenHUDWindowController.h: Reverted the types of
+ _timeline and _volumeSlider to the more generic NSControl.
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Cleaned
+ up style.
+ (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Added an
+ assertion that the cast to NSButton * is legal. Removed casts.
+ (-[WebVideoFullscreenHUDWindowController updateTime]): Use
+ -setValue:forKey: instead of an NSSlider method.
+ (timeToString): Changed to support only non-negative values and
+ simplified.
+ (-[WebVideoFullscreenHUDWindowController remainingTimeText]): Always
+ prepend a “-” to the time.
+
+2009-11-02 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ WebKit part of making the appearance of the full-screen video HUD match
+ QuickTime Player X’s HUD.
+
+ * WebView/WebVideoFullscreenHUDWindowController.h: Removed unnecessary
+ #import statements, cleaned up style, and changed _timeline,
+ _volumeSlider and _playButton to have more specific types.
+ * WebView/WebVideoFullscreenHUDWindowController.mm: Updated #import
+ statements.
+ (webkit_CGFloor): Added this helper function.
+ (-[WebVideoFullscreenHUDWindowController init]): Cleaned up style.
+ (createTimeTextField): Changed to use the bold system font.
+ (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Changed the
+ subviews’ metrics and the text fields’ text alignment.
+ (-[WebVideoFullscreenHUDWindowController updateTime]): Avoid conversion
+ from double to float.
+ (stringToTimeTextAttributed): Removed this useless function that
+ returned an NSAttributedString masquerading as an NSString.
+ (-[WebVideoFullscreenHUDWindowController remainingTimeText]): Removed
+ call to stringToTimeTextAttributed().
+ (-[WebVideoFullscreenHUDWindowController elapsedTimeText]): Ditto.
+
+2009-11-02 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Support ARIA "tab" roles
+ https://bugs.webkit.org/show_bug.cgi?id=30842
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory AXARIAContentGroupText:]):
+
+2009-11-01 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Made the space bar toggle playing state in full-screen video when
+ modifier keys are down. Made it do so without highlighting the
+ Play/Pause button.
+
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindowController keyDown:]):
+
+2009-11-01 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Made the full-screen video HUD respond to the up and down arrow keys by
+ increasing and decreasing the volume by 1/10 of the range or, when
+ combined with the Option key, all the way up or down.
+
+ Made the volume buttons in the full-screen video HUD match the behavior
+ of their equivalents in the QuickTime Player HUD by turning the volume
+ all the way up or down.
+
+ Made the volume slider update immediately when the keyboard or volume
+ buttons are used to change the volume, rather than at the nearest 1/4
+ second interval.
+
+ Made the elapsed and remaining time displays update immediately when the
+ play head is dragged across the timeline, rather than at 1/4 second
+ intervals.
+
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindowController keyDown:]): Handle the up and
+ down arrow keys.
+ (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Changed the
+ actions of the volume up and volume down buttons.
+ (-[WebVideoFullscreenHUDWindowController setCurrentTime:]): Call
+ -updateTime.
+ (-[WebVideoFullscreenHUDWindowController setVolumeToZero:]): Added this
+ action for the volume down button.
+ (-[WebVideoFullscreenHUDWindowController setVolumeToMaximum:]): Added
+ this action for the volume up button.
+ (-[WebVideoFullscreenHUDWindowController decrementVolume]): No longer
+ and action method.
+ (-[WebVideoFullscreenHUDWindowController incrementVolume]): Ditto.
+ (-[WebVideoFullscreenHUDWindowController setVolume:]): Call
+ -updateVolume.
+
+2009-10-30 Evan Stade <estade@chromium.org>
+
+ Reviewed by David Levin.
+
+ Notify the chrome when the focused node has changed.
+ https://bugs.webkit.org/show_bug.cgi?id=30832
+
+ Added stub implementation for new ChromeClient function.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::focusedNodeChanged):
+
+2009-10-30 Roland Steiner <rolandsteiner@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak.
+
+ Bug 28420 - Implement HTML5 <ruby> rendering
+ (https://bugs.webkit.org/show_bug.cgi?id=28420)
+
+ No new tests (no functional change).
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-10-29 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Validate the stopSpeaking: selector so that is not always enabled when a WebView is first responder.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
+
+2009-10-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30932
+ <rdar://problem/7350269>
+
+ REGRESSION: Crash when turning on Private Browsing on site with flash.
+
+ Null check setValue.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView privateBrowsingModeDidChange]):
+
+2009-10-29 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Refactor some duplicate plug-in clean up code into shared functions.
+
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController stopOnePlugin:]): New, stop a plug-in.
+ (-[WebPluginController destroyOnePlugin:]): New, destroy plug-in.
+ (-[WebPluginController stopAllPlugins]): Call stopOnePlugin.
+ (-[WebPluginController destroyPlugin:]): Call stopOnePlugin and destroyOnePlugin.
+ (-[WebPluginController destroyAllPlugins]): Call destroyOnePlugin.
+
+2009-10-28 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7303145>
+ Can't exit full screen mode or restart movie after pressing command -R.
+
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController _requestExit]):
+ New, call media element's exitFullscreen method.
+ (-[WebVideoFullscreenController requestExitFullscreenWithAnimation:]):
+ Call mediaElement->exitFullscreen() after a delay as it turns around and calls
+ WebVideoFullscreenController:exitFullscreen.
+
+ * WebView/WebVideoFullscreenHUDWindowController.h:
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindow resignFirstResponder]):
+ New, don't give up responder status.
+ (-[WebVideoFullscreenHUDWindow performKeyEquivalent:]):
+ New, block all command key events.
+ (-[WebVideoFullscreenHUDWindowController exitFullscreen:]):
+ Remember when we are in the process of exiting fullscreen, don't allow recursion.
+
+ * WebView/WebView.mm:
+ (-[WebView _exitFullscreen]):
+ Early return if fullscreen controller is nil.
+
+ * WebView/WebWindowAnimation.h:
+ Correct comment about _window retain status.
+ * WebView/WebWindowAnimation.m:
+ (-[WebWindowScaleAnimation dealloc]):
+ Don't release _window, we never reatained it.
+
+2009-10-27 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Provide a way to get counter values with layoutTestContoller
+ https://bugs.webkit.org/show_bug.cgi?id=30555
+
+ Add counterValueForElement in WebFrame to call WebCore::counterValueForElement.
+
+ * Misc/WebCoreStatistics.h:
+ * Misc/WebCoreStatistics.mm:
+ (-[WebFrame counterValueForElement:]):
+
+2009-10-27 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Updated for refactoring in the date code.
+
+ * WebView/WebView.mm:
+ (aeDescFromJSValue): Since we just want a number of milliseconds, do that
+ instead of something more complicated.
+
+2009-10-26 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Move some WebView event handling code into its own file, WebViewEventHandling.mm
+
+ * WebView/WebView.mm:
+ (-[WebView _close]):
+ (-[WebView _selectedOrMainFrame]):
+ * WebView/WebViewEventHandling.mm: Added.
+ (-[WebView _closingEventHandling]):
+ (-[WebView _setMouseDownEvent:]):
+ (-[WebView mouseDown:]):
+ (-[WebView mouseUp:]):
+ (+[WebView _updateMouseoverWithEvent:]):
+ (-[WebView _updateMouseoverWithFakeEvent]):
+ (_updateMouseoverWithEvent:fakeEvent::if):
+ (-[WebView _stopAutoscrollTimer]):
+ (-[WebView _setToolTip:]):
+ * WebView/WebViewInternal.h:
+
+2009-10-26 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6988966> Hardware layers do not show up in page snapshots
+
+ * WebView/WebHTMLViewPrivate.h:
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _compositingLayersHostingView]):
+ Add a private method that returns the NSView used to host compositing layers.
+
+2009-10-23 Mark Rowe <mrowe@apple.com>
+
+ Fix engineering builds in the mysterious future.
+
+ * Configurations/DebugRelease.xcconfig:
+
+2009-10-23 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30729
+ Provide private API to request the global context for a specific world.
+ Used to initialize parameters on the global object.
+
+ * WebView/WebFramePrivate.h:
+ * WebView/WebFrame.mm:
+ (-[WebFrame contextForWorldID:]):
+
+2009-10-22 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by John Sullivan.
+
+ <rdar://problem/7322847>
+ Pressing space bar key in full screen mode should pause movie but doesn't
+
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindowController keyDown:]): New, toggle playback on space key.
+ (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Play button action is now called togglePlaying.
+ (-[WebVideoFullscreenHUDWindowController togglePlaying:]): Rename from playingChanged.
+
+2009-10-22 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by NOBODY (build fix).
+ Build fix following bug #30696.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
+ (WebKit::NetscapePluginInstanceProxy::evaluate):
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ (WebKit::NetscapePluginInstanceProxy::invokeDefault):
+ (WebKit::NetscapePluginInstanceProxy::construct):
+ (WebKit::NetscapePluginInstanceProxy::getProperty):
+ (WebKit::NetscapePluginInstanceProxy::setProperty):
+ (WebKit::NetscapePluginInstanceProxy::removeProperty):
+ (WebKit::NetscapePluginInstanceProxy::hasProperty):
+ (WebKit::NetscapePluginInstanceProxy::hasMethod):
+ (WebKit::NetscapePluginInstanceProxy::enumerate):
+
+2009-10-16 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig & Geoff Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30696
+ Update to incorporate support for IsolatedWorlds in JSC bindings.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _attachScriptDebugger]):
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ (-[WebFrame globalContext]):
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame evaluateWebScript:]):
+ * WebView/WebView.mm:
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
+
+2009-10-22 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Dan Bernstein & Simon Fraser.
+
+ <rdar://problem/7297717>
+ https://bugs.webkit.org/show_bug.cgi?id=30323
+ Play/pause button in full-screen video controller does not reflect current state
+
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController setMediaElement:WebCore::]): Register for QTMovieRateDidChangeNotification
+ (-[WebVideoFullscreenController rateChanged:]): Call HUD controller when rate changes.
+
+ * WebView/WebVideoFullscreenHUDWindowController.h:
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Call updateRate so play button
+ reflects playback state.
+ (-[WebVideoFullscreenHUDWindowController updateRate]): New, set play button state according to
+ movie state.
+ (-[WebVideoFullscreenHUDWindowController playingChanged:]): Only call [self playing] once.
+
+2009-10-21 John Sullivan <sullivan@apple.com>
+
+ Rubber-stamped by Dan Bernstein.
+
+ * WebView/WebDynamicScrollBarsView.h:
+ Corrected a couple of long-obsolete comments regarding Safari's use of this class.
+
+2009-10-20 Dan Bernstein <mitz@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ <rdar://problem/7319749> REGRESSION(r49806): Contextual Menu items missing
+ https://bugs.webkit.org/show_bug.cgi?id=30568
+
+ Revert accidental change from r49806.
+
+ * WebCoreSupport/WebContextMenuClient.mm:
+ (WebContextMenuClient::getCustomMenuFromDefaultItems):
+
+2009-10-20 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by David Levin.
+
+ Removed WebSocket runtime settings.
+ https://bugs.webkit.org/show_bug.cgi?id=29896
+
+ WebSocket runtime configuration is supported by chromium/v8 only.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-10-19 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Update call to loadFrameRequest to match new parameters.
+
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Update call to loadFrameRequest.
+
+2009-10-19 David Kilzer <ddkilzer@apple.com>
+
+ Documentation fix for -[NSObject(WebResourceLoadDelegate) webView:resource:willSendRequest:redirectResponse:fromDataSource:]
+
+ Reviewed by Dan Bernstein.
+
+ * WebView/WebResourceLoadDelegate.h: Prepended "webView:" to the
+ @method declaration of
+ -webView:resource:willSendRequest:redirectResponse:fromDataSource:
+ which was absent before r3953 and was missed during the great
+ documentation clean up of r4269.
+
+2009-10-19 Anders Carlsson <andersca@apple.com>
+
+ Fix build.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+
+2009-10-19 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Split assertions of conjunctions into separate statements or remove
+ redundant assertions.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView setAttributeKeys:andValues:]):
+ (-[WebHostedNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView halt]):
+ (-[WebBaseNetscapePluginView resumeFromHalt]):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+ (-[WebNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
+ * WebCoreSupport/WebContextMenuClient.mm:
+ (WebContextMenuClient::getCustomMenuFromDefaultItems):
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::checkGrammarOfString):
+ (WebEditorClient::checkTextOfParagraph):
+ * WebView/WebTextCompletionController.mm:
+ (-[WebTextCompletionController _reflectSelection]):
+
+2009-10-18 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7309062> Crashes in WebCore::DocumentLoader::isStopping below WebKit::NetscapePluginInstanceProxy::loadRequest.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::loadRequest): Null-check the DocumentLoader before deferencing it.
+
+2009-10-16 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ <rdar://problem/7304575>
+
+ * Plugins/WebBaseNetscapePluginView.h: Added new boolean ivar and -hasBeenHalted instance method.
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView halt]):Update _hasBeenHalted.
+ (-[WebBaseNetscapePluginView hasBeenHalted]): Added.
+ * WebView/WebView.mm:
+ (+[WebView _hasPluginForNodeBeenHalted:]): Checks to see if a plug-in node's been halted.
+ * WebView/WebViewPrivate.h: Added -_hasPluginForNodeBeenHalted method.
+
+2009-10-16 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlson.
+
+ Small code cleanup
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (WebHaltablePlugin::halt): Just call -[WebBaseNetscapePluginView halt].
+ (WebHaltablePlugin::restart): Just call -[WebBaseNetscapePluginView resumeFromHalt]
+ (-[WebBaseNetscapePluginView halt]):
+ (-[WebBaseNetscapePluginView resumeFromHalt]):
+ * WebView/WebView.mm:
+ (_pluginViewForNode): Added a check if a render is a widget. This prevents a later assertion.
+
+2009-10-16 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlson.
+
+ Last part of:
+ <rdar://problem/7273354>
+
+ * WebView/WebView.mm:
+ (_pluginViewForNode): Added with code extracted from _isNodeHaltedPlugin
+ (+[WebView _isNodeHaltedPlugin:]): Made this a class method.
+ (+[WebView _restartHaltedPluginForNode:]): Added. Restarts a plug-in
+ * WebView/WebViewPrivate.h: Added +_restartHaltedPluginForNode to header.
+
+2009-10-16 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders.
+
+ <rdar://problem/7273354>
+
+ * Plugins/WebBaseNetscapePluginView.h: Added _isHalted ivar and three new methods: -halt, -resumeFromHalt, and -isHalted
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (WebHaltablePlugin::halt): Call -halt instead of -stop.
+ (WebHaltablePlugin::restart):Call -resumeFromHalt instead of -start.
+ (-[WebBaseNetscapePluginView halt]): Added. Stop the plug-in, update _isHalted.
+ (-[WebBaseNetscapePluginView resumeFromHalt]): Added. Start the plug-in, update _isHalted.
+ (-[WebBaseNetscapePluginView isHalted]): Added.
+ * WebView/WebView.mm:
+ (-[WebView _isNodeHaltedPlugin:]): Added. Queries a DOMNode to determine if it's a halted plug-in.
+ * WebView/WebViewPrivate.h: Added _isNodeHaltedPlugin.
+
+2009-10-15 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ <rdar://problem/7306052> Fullscreen max/min volume buttons non-functional
+
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Set volume buttons target and action.
+ (-[WebVideoFullscreenHUDWindowController decrementVolume:]): New, decrement the volume by 10%.
+ (-[WebVideoFullscreenHUDWindowController incrementVolume:]): New, increment the volume by 10%.
+
+2009-10-15 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7295738> No way to mute/unmute a movie in full screen video mode
+
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindowController setVolume:]): Unmute movie before changing volume.
+
+2009-10-14 Kevin Decker <kdecker@apple.com>
+
+ Unbreak the world.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (WebHaltablePlugin::restart):
+
+2009-10-14 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlsson and Jon Honeycutt
+
+ <rdar://problem/7304295> snapshots of halted plug-ins are missing
+
+ * Plugins/WebBaseNetscapePluginView.mm: Move bodies of WebHaltablePlugin virtual functions from WebHaltablePlugin class definition.
+ (WebHaltablePlugin::halt): Provide a substitute image to the RenderWidget for the plug-in view.
+ (WebHaltablePlugin::restart): Clear the substitute image.
+
+2009-10-13 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Change the order of arguments on some methods. Split removal for user stylesheets and script into
+ separate functions based off the type of object being removed.
+
+ * WebView/WebView.mm:
+ (+[WebView _addUserScriptToGroup:worldID:source:url:whitelist:blacklist:injectionTime:]):
+ (+[WebView _addUserStyleSheetToGroup:worldID:source:url:whitelist:blacklist:]):
+ (+[WebView _removeUserScriptFromGroup:worldID:url:]):
+ (+[WebView _removeUserStyleSheetFromGroup:worldID:url:]):
+ (+[WebView _removeUserScriptsFromGroup:worldID:]):
+ (+[WebView _removeUserStyleSheetsFromGroup:worldID:]):
+ * WebView/WebViewPrivate.h:
+
+2009-10-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6660507> Add "privacy mode" to Netscape Plug-in API
+
+ Listen for WebPreferences notifications and update the _isPrivateBrowsingEnabled ivar
+ when the value changes. Also call -[WebBaseNetscapePluginView privateBrowsingModeDidChange] when the
+ value changes. In process this just calls NPP_SetValue, and OOP it sends a MIG message to the plug-in host.
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::privateBrowsingModeDidChange):
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView createPlugin]):
+ (-[WebHostedNetscapePluginView privateBrowsingModeDidChange]):
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView privateBrowsingModeDidChange]):
+ (-[WebBaseNetscapePluginView viewDidMoveToWindow]):
+ (-[WebBaseNetscapePluginView preferencesHaveChanged:]):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView privateBrowsingModeDidChange]):
+ (-[WebNetscapePluginView getVariable:value:]):
+
+2009-10-12 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Video keeps playing after going fullscreen, then closing window
+ https://bugs.webkit.org/show_bug.cgi?id=30164
+
+ Clear the QTMovie on the QTMovieView when coming out of fullscreen,
+ to fix issue where the underlying movie keeps playing.
+
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController windowDidExitFullscreen]):
+
+2009-10-11 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7294267> REGRESSION (r48492): Gmail voice and video chat
+ doesn’t work
+ https://bugs.webkit.org/show_bug.cgi?id=30295
+
+ Test: plugins/setProperty.html
+
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::setFieldValue): Fixed a typo. The function
+ should return early if m_instanceProxy is null.
+
+2009-10-09 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Factor HistoryController out of FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=30246
+
+ Update API call.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::restoreViewState):
+ * WebView/WebView.mm:
+ (-[WebView _loadBackForwardListFromOtherView:]):
+
+2009-10-09 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ <rdar://problem/7290671> Crash after navigating away from a page with subframe containing plug-in
+
+ At the time that -stop is called on a WebBaseNetscapePluginView that is contained within a subframe
+ the WebFrame's data source has been zeroed out. This was causing -[WebBaseNetscapePluginView webFrame]
+ to return nil during -stop, preventing the plug-in view from unregistering itself from the PluginHalter.
+ We fix this by having -webFrame retrieve the frame directly rather than retrieving it from the data source.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView dataSource]): Get the data source from the WebFrame.
+ (-[WebBaseNetscapePluginView webFrame]): Get the Frame directly from the element's document rather
+ than taking a windy route through the WebDataSource.
+
+2009-10-09 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add SPI to specifically enable visited link tracking.
+
+ * History/WebHistory.mm:
+ (+[WebHistory _setVisitedLinkTrackingEnabled:]):
+ * History/WebHistoryPrivate.h:
+
+2009-10-08 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Remove the WebKitPluginHalterEnabledPreferenceKey in favor of checking
+ for the existence of a PluginHalterDelegate.
+
+ Reviewed by Dan Bernstein.
+
+ * WebCoreSupport/WebPluginHalterClient.h:
+ Add declaration for new function.
+
+ * WebCoreSupport/WebPluginHalterClient.mm:
+ (WebPluginHalterClient::enabled):
+ Check whether the UIDelegate responds to shouldHaltPlugin.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ Remove the "enabled" preference key.
+
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ Remove the initialization of the pref.
+
+ * WebView/WebPreferencesPrivate.h:
+ Remove the getter/setter for this pref.
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+ Remove propagation of the pref.
+
+2009-10-08 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move executeScript from FrameLoader to ScriptController
+ https://bugs.webkit.org/show_bug.cgi?id=30200
+
+ Update API call.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ * WebView/WebView.mm:
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
+
+2009-10-08 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Ask the History Delegate to populate the visited links hash.
+ <rdar://problem/7285293> and https://webkit.org/b/29904
+
+ * History/WebHistory.mm:
+ (+[WebHistory _removeAllVisitedLinks]):
+ * History/WebHistoryPrivate.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::populateVisitedLinks):
+ * WebView/WebDelegateImplementationCaching.h:
+ * WebView/WebDelegateImplementationCaching.mm:
+ (CallHistoryDelegate):
+ * WebView/WebHistoryDelegate.h:
+ * WebView/WebView.mm:
+ (-[WebView _cacheHistoryDelegateImplementations]):
+ (-[WebView addVisitedLinks:]):
+ * WebView/WebViewPrivate.h:
+
+2009-10-08 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove the shouldLoadMediaElementURL implementation.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ * WebView/WebPolicyDelegatePrivate.h:
+
+2009-10-07 Simon Fraser <simon.fraser@apple.com>
+
+ Re-land 49269-49271 since reverting them did not fix the tests.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawRect:]):
+
+2009-10-07 Simon Fraser <simon.fraser@apple.com>
+
+ Revert 49269-49271 to see if it fixes test failures on SnowLeopard that do not
+ reproduce locally.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawRect:]):
+
+2009-10-07 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Factor PolicyChecker out of FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=30155
+
+ Move the policy callback to the policy object.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchWillSubmitForm):
+ (WebFrameLoaderClient::receivedPolicyDecison):
+
+2009-10-07 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Send title changes to the global history delegate.
+ <rdar://problem/7285293> and https://webkit.org/b/29904
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::setTitle):
+ * WebView/WebDelegateImplementationCaching.h:
+ * WebView/WebHistoryDelegate.h:
+ * WebView/WebView.mm:
+ (-[WebView _cacheHistoryDelegateImplementations]):
+
+2009-10-07 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Make the setMetadataURL function foolproof by having it remove user info
+ https://bugs.webkit.org/show_bug.cgi?id=30178
+ rdar://problem/6544670
+
+ * Misc/WebNSFileManagerExtras.m:
+ (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]):
+ Call _web_URLByRemovingUserInfo on the passed in URL string after converting
+ it to a URL, and then convert it back to a string.
+
+ * Misc/WebNSURLExtras.h: Added _web_URLByRemovingUserInfo.
+ * Misc/WebNSURLExtras.mm: Removed unused WebKitURLComponents struct.
+ (-[NSURL _web_URLByTruncatingOneCharacterBeforeComponent:]): Renamed to be
+ clearer on what this does.
+ (-[NSURL _webkit_URLByRemovingFragment]): Changed to call new name.
+ (-[NSURL _webkit_URLByRemovingResourceSpecifier]): Ditto.
+ (-[NSURL _web_URLByRemovingComponentAndSubsequentCharacter:]): Added.
+ (-[NSURL _web_URLByRemovingUserInfo]): Added.
+
+2009-10-07 Simon Fraser <simon.fraser@apple.com>
+
+ Make Dan Bernstein happy.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawRect:]):
+
+2009-10-07 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Avoid Obj-C message dispatch when possible by storing accessed objects
+ in local variables.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawRect:]):
+
+2009-10-07 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Animation stalls for a few seconds partway through
+ https://bugs.webkit.org/show_bug.cgi?id=30182
+
+ Make sure that we only call -disableScreenUpdatesUntilFlush when a window
+ update is actually going to happen, otherwise screen updates are disabled
+ for too long.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawRect:]):
+
+2009-10-06 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: default to an attached inspector window on Windows (as on Mac).
+
+ https://bugs.webkit.org/show_bug.cgi?id=30134
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController showWindow:]):
+
+2009-10-06 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move FrameLoader::canLoad to SecurityOrigin
+ https://bugs.webkit.org/show_bug.cgi?id=30111
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+ (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::loadRequest):
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::WebNetscapePluginStream):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
+ * Plugins/WebPluginContainerCheck.mm:
+ (-[WebPluginContainerCheck _isForbiddenFileLoad]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _allowsFollowingLink:]):
+
+2009-10-06 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move setLocalLoadPolicy and friends to SecurityOrigin
+ https://bugs.webkit.org/show_bug.cgi?id=30110
+
+ Call the new API.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+
+2009-10-06 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ accessibility/media-element.html crashes (and has incorrect result)
+ https://bugs.webkit.org/show_bug.cgi?id=30108
+
+ Fix up the accessibilty label for the newly added fullscreen button,
+ and update the test result accordingly.
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory localizedMediaControlElementString:]):
+ Handle "ControlsPanel" which is just an empty container, to avoid
+ asserting in debug builds.
+
+2009-10-06 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30107
+
+ Fixes an issue where the Mac build does return the correct drop effect
+ with respect to the HTML 5 specification when effectAllowed == "none".
+
+ Currently, when effectAllowed == "none" and dropEffect == "copy" or
+ dropEffect == "move" the resulting drop effect is "copy" and "move",
+ respectively. However, the HTML 5 specification states that regardless
+ of the specified dropEffect, when effectAllowed == "none" the resulting
+ drop effect should be "none".
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView draggingSourceOperationMaskForLocal:]):
+
+2009-10-06 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: close inspector client view on
+ InspectorController::close API call.
+
+ In order to run batch web inspector layout tests (and not affect
+ subsequent tests) we should close inspector client's view upon
+ InspectorController::close API call.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30009
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::createPage):
+
+2009-10-05 Dan Bernstein <mitz@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ Moved a WebPluginHalterClient out of the WebCore namesapce.
+
+ * WebCoreSupport/WebPluginHalterClient.h:
+
+2009-10-05 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Added new PluginHalter client, delegate and few more WebPreferences keys.
+
+ * WebView/WebPreferenceKeysPrivate.h: Added two new keys.
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]): Initialize newly added key.
+ (-[WebPreferences pluginAllowedRunTime]): Added.
+ (-[WebPreferences setPluginAllowedRunTime:]): Added.
+ * WebView/WebPreferencesPrivate.h: Added above two methods.
+ * WebView/WebUIDelegatePrivate.h: Added shouldHaltPlugin delegate.
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ Setup a new WebPluginHalterClient.
+ (-[WebView _preferencesChangedNotification:]): Update WebCore settings accordingly.
+ * WebCoreSupport/WebPluginHalterClient.h: Added.
+ * WebCoreSupport/WebPluginHalterClient.mm: Added.
+ (WebPluginHalterClient::WebPluginHalterClient):
+ (WebPluginHalterClient::shouldHaltPlugin): Added, invoke the delegate.
+
+2009-10-05 Simon Fraser <simon.fraser@apple.com>
+
+ More build fixes for Tiger.
+
+ * WebView/WebVideoFullscreenController.mm:
+
+2009-10-05 Simon Fraser <simon.fraser@apple.com>
+
+ More build fixes for Tiger.
+
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenWindow animationDidEnd:]):
+ * WebView/WebWindowAnimation.m:
+
+2009-10-05 Simon Fraser <simon.fraser@apple.com>
+
+ More build fixes for Tiger.
+
+ * WebView/WebVideoFullscreenController.mm:
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindow initWithContentRect:styleMask:backing:defer:]):
+ (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]):
+ (-[WebVideoFullscreenHUDWindowController fadeWindowIn]):
+ (-[WebVideoFullscreenHUDWindowController fadeWindowOut]):
+ (-[WebVideoFullscreenHUDWindowController closeWindow]):
+
+2009-10-05 Simon Fraser <simon.fraser@apple.com>
+
+ Build fixes for Tiger.
+
+ * WebView/WebVideoFullscreenHUDWindowController.h:
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindow initWithContentRect:styleMask:backing:defer:]):
+ (-[WebVideoFullscreenHUDWindowController dealloc]):
+ (-[WebVideoFullscreenHUDWindowController closeWindow]):
+ (-[WebVideoFullscreenHUDWindowController windowDidLoad]):
+
+2009-10-05 Simon Fraser <simon.fraser@apple.com>
+
+ Build fix. If you call Node::hasTagName(), you also have to include Element.h.
+
+ * WebCoreSupport/WebChromeClient.mm:
+
+2009-10-05 Pierre d'Herbemont <pdherbemont@webkit.org>
+
+ Reviewed by Simon Fraser
+
+ Support fullscreen in MediaPlayer (Mac)
+ https://bugs.webkit.org/show_bug.cgi?id=26742
+
+ Add a fullscreen button to the <video> controller if the media engine,
+ and the theme have support for fullscreen, and can show appropriate controls.
+ Clicking the button calls through the ChromeClient to the WebVideoFullscreenController
+ in WebKit to do a nice animation to fullscreen, with a custom controller.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::supportsFullscreenForNode):
+ (WebChromeClient::enterFullscreenForNode):
+ (WebChromeClient::exitFullscreenForNode):
+ New methods to ask whether fullscreen is possible for a given node, and
+ notifications on enterying and exiting fullscreen.
+
+ * WebView/WebVideoFullscreenController.h: Added.
+ * WebView/WebVideoFullscreenController.mm: Added.
+ WebVideoFullscreenController is responsible for creating the fullscreen window,
+ and coordinating the various animations when going fullscreen.
+
+ * WebView/WebVideoFullscreenHUDWindowController.h: Added.
+ * WebView/WebVideoFullscreenHUDWindowController.mm: Added.
+ This class manages the heads-up display (HUD) control bar.
+
+ * WebView/WebView.mm:
+ (-[WebView _close]):
+ Make sure we come out of fullscreen if the WebView is torn down (e.g. if
+ you close a background window).
+
+ (-[WebView _enterFullscreenForNode:WebCore::]):
+ Make a WebVideoFullscreenController and tell is to start to go fullscreen.
+
+ (-[WebView _exitFullscreen]):
+ Tell the WebVideoFullscreenController to come out of fullscreen, and clean up.
+
+ * WebView/WebViewData.h:
+ * WebView/WebViewData.mm:
+ (-[WebViewPrivate dealloc]):
+ (-[WebViewPrivate finalize]):
+ * WebView/WebViewInternal.h:
+ Keep a pointer to the WebVideoFullscreenController.
+
+ * WebView/WebWindowAnimation.h: Added.
+ * WebView/WebWindowAnimation.m: Added.
+ (WebWindowAnimationDurationFromDuration):
+ (scaledRect):
+ (squaredDistance):
+ Handle the animations used during the transitition to fullscreen.
+
+2009-10-05 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ WebKit side of <rdar://problem/7179166>
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ Add an m_pluginIsWaitingForDraw member variable.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ Initialize m_pluginIsWaitingForDraw.
+
+ (WebKit::NetscapePluginInstanceProxy::invalidateRect):
+ Set m_pluginIsWaitingForDraw to true.
+
+ (WebKit::NetscapePluginInstanceProxy::didDraw):
+ If m_pluginIsWaitingForDraw is true, call _WKPHPluginInstanceDidDraw.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView drawRect:]):
+ Call didDraw.
+
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ Add PHPluginInstanceDidDraw.
+
+2009-10-02 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Add functionality to pause/throttle CSS transitions/animations in a WebView
+ https://bugs.webkit.org/show_bug.cgi?id=29942
+
+ Added both a setter and getter function
+
+ * WebView/WebView.mm:
+ (-[WebView cssAnimationsSuspended]):
+ (-[WebView setCSSAnimationsSuspended:]):
+ * WebView/WebViewData.h:
+ * WebView/WebViewData.mm:
+ (-[WebViewPrivate init]):
+ * WebView/WebViewPrivate.h:
+
+2009-10-04 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/7273363> Plug-ins should use PluginHalter
+
+ * Plugins/WebBaseNetscapePluginView.h: Add WebHaltablePlugin forward declare and _haltable ivar.
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (WebHaltablePlugin::WebHaltablePlugin): Added.
+ (WebHaltablePlugin::halt): New method that stops a plug-in.
+ (WebHaltablePlugin::restart): New method that starts a plug-in.
+ (WebHaltablePlugin::node): Added. Provides the DOMNode corresponding to the plug-in in WebBaseNetscapePluginView.
+ (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
+ Initialize new _haltable ivar.
+ (-[WebBaseNetscapePluginView start]): Call the page's didStartPlugin() upon starting a plug-in.
+ (-[WebBaseNetscapePluginView stop]): Call the page's didStopPlugin() upon stopping a plug-in.
+
+2009-10-05 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: add testing harness for Web Inspector.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30010
+
+ * WebInspector/WebInspector.mm:
+ (-[WebInspector evaluateInFrontend:callId:script:]):
+ * WebInspector/WebInspectorPrivate.h: Added.
+
+2009-10-04 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Cameron Zwarich.
+
+ * WebView/WebPreferenceKeysPrivate.h: Added new key.
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]): Leave plug-in halting disabled by default.
+ (-[WebPreferences pluginHalterEnabled]): Added.
+ (-[WebPreferences setPluginHalterEnabled:]): Ditto.
+ * WebView/WebPreferencesPrivate.h: Added above new methods.
+
+2009-10-02 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Add support for blacklist patterns to user stylesheets and scripts in addition to whitelist patterns.
+
+ * WebView/WebView.mm:
+ (toStringVector):
+ (+[WebView _addUserScriptToGroup:source:url:worldID:whitelist:blacklist:injectionTime:]):
+ (+[WebView _addUserStyleSheetToGroup:source:url:worldID:whitelist:blacklist:]):
+ * WebView/WebViewPrivate.h:
+
+2009-10-01 Mark Rowe <mrowe@apple.com>
+
+ Fix the Tiger build. Don't unconditionally enable 3D canvas as it is not supported on Tiger.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-10-01 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Turn on ENABLE_3D_CANVAS in TOT
+ https://bugs.webkit.org/show_bug.cgi?id=29906
+
+ * Configurations/FeatureDefines.xcconfig:
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences webGLEnabled]):
+ (-[WebPreferences setWebGLEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-09-30 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for <rdar://problem/7259706>
+ Need WebKit API or SPI on Mac and Windows to test whether it's safe to load a page in a new tab/window
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _allowsFollowingLink:]):
+ * WebView/WebFramePrivate.h:
+
+2009-09-30 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Add the ability to remove user stylesheets and scripts by URL.
+
+ * WebView/WebView.mm:
+ (+[WebView _removeUserContentFromGroup:url:worldID:]):
+ * WebView/WebViewPrivate.h:
+
+2009-09-29 Brady Eidson <beidson@apple.com>
+
+ Rubberstamped by Dan Bernstein.
+
+ Fix license and some sorting in new files.
+
+ * WebView/WebHistoryDelegate.h:
+ * WebView/WebNavigationData.h:
+ * WebView/WebNavigationData.mm:
+
+2009-09-29 Brady Eidson <beidson@apple.com>
+
+ Reviewed by John Sullivan.
+
+ WebKit Mac API should provide a delegate interface for global history.
+ <rdar://problem/7042773> and https://webkit.org/b/29904
+
+ * WebView/WebHistoryDelegate.h: Added. New interface for WebKit clients to implement to manage
+ their own global history store.
+
+ Object to store all of the bits of data relevant to a page visit:
+ * WebView/WebNavigationData.h: Added.
+ * WebView/WebNavigationData.mm: Added.
+ (-[WebNavigationDataPrivate dealloc]):
+ (-[WebNavigationData initWithURLString:title:originalRequest:response:hasSubstituteData:clientRedirectSource:]):
+ (-[WebNavigationData url]):
+ (-[WebNavigationData title]):
+ (-[WebNavigationData originalRequest]):
+ (-[WebNavigationData response]):
+ (-[WebNavigationData hasSubstituteData]):
+ (-[WebNavigationData clientRedirectSource]):
+ (-[WebNavigationData dealloc]):
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::updateGlobalHistory): If the delegate exists, don't use the built-in WebHistory.
+ If the implementation for this method exists, call it.
+ (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks): Ditto
+
+ * WebView/WebDelegateImplementationCaching.h:
+ * WebView/WebDelegateImplementationCaching.mm:
+ (WebViewGetHistoryDelegateImplementations):
+ (CallHistoryDelegate):
+
+ * WebView/WebView.mm:
+ (-[WebView _cacheHistoryDelegateImplementations]):
+ (-[WebView setHistoryDelegate:]):
+ (-[WebView historyDelegate]):
+ * WebView/WebViewData.h:
+ * WebView/WebViewPrivate.h:
+
+2009-09-29 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add support for run-time flag for 3D canvas
+ https://bugs.webkit.org/show_bug.cgi?id=29826
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Enable experimental
+ WebGL flag when 3D_CANVAS is enabled in the build.
+
+2009-09-28 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Add experimentalWebSocketsEnabled in WebPreferences.
+ https://bugs.webkit.org/show_bug.cgi?id=28941
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences experimentalWebSocketsEnabled]):
+ (-[WebPreferences setExperimentalWebSocketsEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-09-28 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/7240911> REGRESSION (r48586): Crash occurs when loading
+ a PDF
+
+ CGPDFObjectRef is not a CFTypeRef, and cannot be retained or released.
+ Its lifetime is managed by its container. Just use a Vector to store
+ CGPDFObjectRefs, relying on the CGPDFDocument to keep them alive.
+
+ * WebView/WebPDFDocumentExtras.mm:
+ (appendValuesInPDFNameSubtreeToVector):
+ (getAllValuesInPDFNameTree):
+ (web_PDFDocumentAllScripts):
+
+2009-09-24 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Reviewed by Alice Liu.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ Pass 0 for new Page constructor argument.
+
+2009-09-14 John Gregg <johnnyg@google.com>
+
+ Reviewed by Eric Seidel.
+
+ isEnabled switch for notifications (experimental) in Page Settings
+ https://bugs.webkit.org/show_bug.cgi?id=28930
+
+ Adds support for the experimentalNotificationsEnabled flag in Settings
+ through WebPreferencesPrivate.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences experimentalNotificationsEnabled]):
+ (-[WebPreferences setExperimentalNotificationsEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-09-23 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Updated for a WebCore rename.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _cacheabilityDictionary]):
+
+2009-09-23 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Speed up access to history items by caching date computation.
+
+ * History/WebHistory.mm:
+ (getDayBoundaries): Refactored from timeIntervalForBeginningOfDay.
+ Returns the beginning of the day that the passed time is within and
+ the beginning of the next day.
+ (beginningOfDay): Added. Uses getDayBoundaries so it can be fast for
+ multiple dates within the same day, which is the common case.
+ (dateKey): Added. Calls beginningOfDay and converts to an integer.
+ (-[WebHistoryPrivate findKey:forDay:]): Changed to call dateKey
+ insetad of timeIntervalForBeginningOfDay.
+
+2009-09-23 David Kilzer <ddkilzer@apple.com>
+
+ Move definition of USE(PLUGIN_HOST_PROCESS) from WebKitPrefix.h to Platform.h
+
+ Reviewed by Mark Rowe.
+
+ * WebKitPrefix.h: Removed definition of
+ WTF_USE_PLUGIN_HOST_PROCESS.
+
+2009-09-22 Timothy Hatcher <timothy@apple.com>
+
+ Prevent scrolling multiple frames during latched wheel events.
+
+ Reviewed by Anders Carlsson.
+
+ * WebView/WebDynamicScrollBarsView.h:
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView scrollWheel:]):
+
+2009-09-22 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ <rdar://problem/7240911> REGRESSION (r48586): Crash occurs when loading
+ a PDF
+
+ * WebView/WebPDFDocumentExtras.mm:
+ (addWebPDFDocumentExtras): Made methodList static, because
+ class_addMethods() doesn't copy it.
+
+2009-09-21 Dan Bernstein <mitz@apple.com>
+
+ Attempt to fix the Tiger build
+
+ * WebView/WebPDFDocumentExtras.mm:
+ (addWebPDFDocumentExtras):
+
+2009-09-21 Dan Bernstein <mitz@apple.com>
+
+ Attempt to fix the Tiger build
+
+ * WebView/WebPDFDocumentExtras.mm:
+ (web_PDFDocumentAllScripts):
+ (addWebPDFDocumentExtras):
+
+2009-09-21 Dan Bernstein <mitz@apple.com>
+
+ Attempt to fix the Tiger build
+
+ * WebView/WebPDFDocumentExtras.mm:
+ * WebView/WebPDFRepresentation.mm:
+
+2009-09-21 Dan Bernstein <mitz@apple.com>
+
+ Attempt to fix the Leopard and Tiger builds
+
+ * WebView/WebPDFDocumentExtras.mm:
+
+2009-09-21 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/4137135> iFrame with PDF not being handled correctly on
+ usps.com
+ https://bugs.webkit.org/show_bug.cgi?id=4151
+
+ * WebView/WebJSPDFDoc.h: Added.
+ * WebView/WebJSPDFDoc.mm: Added.
+ (jsPDFDocInitialize): Retains the WebDataSource.
+ (jsPDFDocFinalize): Releases the WebDataSource.
+ (jsPDFDocPrint): Call the WebUIDelegate method -webView:printFrameView:
+ with the PDF document's view.
+ (makeJSPDFDoc): Makes and returns a JavaScript Doc instance that wraps
+ the WebDataSource.
+ * WebView/WebPDFDocumentExtras.h: Added.
+ * WebView/WebPDFDocumentExtras.mm: Added.
+ (appendValuesInPDFNameSubtreeToArray): Traverses a subtree of a PDF name
+ tree and adds all values in the subtree to an array.
+ (allValuesInPDFNameTree): Returns an array with all of the values in a
+ PDF name tree.
+ (web_PDFDocumentAllScripts): This is the implementation of -[PDFDocument
+ _web_allScripts]. It gets all values in the document-level "JavaScript"
+ name tree, which are action dictionaries, and returns an array of the
+ actions' scripts.
+ (addWebPDFDocumentExtras): Adds the -_web_allScripts method to
+ PDFDocument.
+ * WebView/WebPDFRepresentation.h:
+ * WebView/WebPDFRepresentation.m: Removed.
+ * WebView/WebPDFRepresentation.mm: Copied from WebKit/mac/WebView/WebPDFRepresentation.m.
+ (+[WebPDFRepresentation initialize]): Added. Calls
+ addWebPDFDocumentExtras().
+ (-[WebPDFRepresentation finishedLoadingWithDataSource:]): Get the
+ scripts from the PDF document, create a JavaScript Doc object for the
+ document, and a JavaScript execution context, then execute every script
+ in the context, with the Doc object as "this".
+
+2009-09-17 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Compositing layers are incorrectly positioned after scrolling with position:fixed
+ https://bugs.webkit.org/show_bug.cgi?id=29262
+
+ When scrolling a page with compositing layers inside a position:fixed element,
+ we need to update the compositing layer positions when the scroll position changes.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _frameOrBoundsChanged]):
+ Call the new FrameView::scrollPositionChanged() method rather than sending the
+ scroll event directly.
+
+2009-09-17 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Make PlatformWindow return something else than PlatformWidget
+ https://bugs.webkit.org/show_bug.cgi?id=29085
+
+ Reflect the rename of platformWindow and it's return type.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::platformPageClient):
+
+2009-09-17 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/7007541>
+ CrashTracer: 4800+ crashes in Safari at com.apple.WebKit • WTF::HashTableIterator...
+
+ Add null checks for m_instanceProxy (It will be null when a plug-in has crashed).
+
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::invoke):
+ (WebKit::ProxyInstance::supportsInvokeDefaultMethod):
+ (WebKit::ProxyInstance::supportsConstruct):
+ (WebKit::ProxyInstance::getPropertyNames):
+ (WebKit::ProxyInstance::methodsNamed):
+ (WebKit::ProxyInstance::fieldNamed):
+ (WebKit::ProxyInstance::fieldValue):
+ (WebKit::ProxyInstance::setFieldValue):
+ (WebKit::ProxyInstance::invalidate):
+
+2009-09-16 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Work around a bug in AppKit on Leopard which causes compositing layers to jitter, and
+ become misplaced when the WebHTMLView is resized or scrolled sometimes.
+ <rdar://problem/7071636>
+
+ The previous fix didn't fix the case where the layers jiggle when resizing the docked
+ inspector when the view size is over 2048px tall, on Leopard.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _updateLayerHostingViewPosition]):
+
+2009-09-16 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Work around a bug in AppKit on Leopard which causes compositing layers to jitter, and
+ become misplaced when the WebHTMLView is resized or scrolled sometimes.
+ <rdar://problem/7071636>
+
+ We call an internal AppKit method to make sure the layer geometry is updated correctly.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _updateLayerHostingViewPosition]):
+
+2009-09-15 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fixed position elements flash when CSS transforms are applied on page > 2048px tall
+ https://bugs.webkit.org/show_bug.cgi?id=27272
+
+ Update the previous workaround for misplaced compositing layers, which used a 4096px
+ threshold, to 2048px since that's the GPU max texture size on some older hardware.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _updateLayerHostingViewPosition]):
+
+2009-09-15 Alex Milowski <alex@milowski.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Added the ENABLE_MATHML to the feaure defines
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-09-15 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/7224378> REGRESSION(r48360): Dragging a tab with a plug-in out of a window, the plug-in gets slow and confused
+
+ In r48360, the fix for <rdar://problem/7090444>, I neglected to consider the case where the plug-in had already been started and
+ -start would do an early-return rather than calling -restartTimers and -addWindowObservers itself.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView viewDidMoveToWindow]): Reinstate the call to -restartTimers and -addWindowObservers, but guard them
+ with a check that the view is still in the window.
+
+2009-09-14 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Safari 4 cannot be used to update firmware on Linksys routers.
+ <rdar://problem/7174050> and https://bugs.webkit.org/show_bug.cgi?id=29160
+
+ Adopt the new WebCore::CredentialStorage in WebKit/Mac.
+
+ * Misc/WebDownload.mm:
+ (-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (WebKit::getAuthenticationInfo):
+
+2009-09-12 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Fix <rdar://problem/7090444> Crashes in-[WebBaseNetscapePluginView stop] handling NSWindowWillCloseNotification.
+
+ It's not valid to call -addWindowObservers when the view is not in a window, but this can happen when -start
+ initializes a plug-in and the plug-in removes itself from the document during initialization. -viewDidMoveToWindow
+ calls -start and then calls -addWindowObservers without ensuring that the view is still in a window.
+
+ If -[WebBaseNetscapePluginView addWindowObservers] is incorrectly called when the view is not in a window, it will
+ observe NSWindowWillCloseNotification on all windows. This unexpected observer registration is not balanced by an
+ unregistration so the notification can be delivered after the view is deallocated, causing the crash seen in
+ <rdar://problem/7090444>.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView start]): Only call -updateAndSetWindow if we still have a current window.
+ (-[WebBaseNetscapePluginView viewDidMoveToWindow]): Remove unnecessary calls to -restartTimers and -addWindowObservers
+ from -[WebBaseNetscapePluginView viewDidMoveToWindow]. They are already called from within -start with the extra benefit
+ of ensuring that the view is still in a window when they are called.
+
+2009-09-11 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Fix <rdar://problem/7145242> Crashes inside WTF::HashTable below NetscapePluginInstanceProxy::disconnectStream
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+ (WebKit::HostedNetscapePluginStream::cancelLoad): Canceling the load can result in calling through to disconnectStream.
+ If the plug-in instance holds the last reference to the plug-in stream this will result in the stream being deallocated.
+ This leads to HostedNetscapePluginStream::cancelLoad's call to disconnectStream being passed a deallocated stream object.
+ Since the stream was already disconnected by the call to cancel there's no need to call disconnectStream a second time.
+
+2009-09-11 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r48229.
+ http://trac.webkit.org/changeset/48229
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _dragSourceMovedTo:]):
+
+2009-09-10 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Sam Weinig.
+
+ Update JavaScriptCore and WebKit's FeatureDefines.xcconfig so that they are in sync with WebCore as they need to be.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-09-09 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Initialize DataTransfer's effectAllowed and dropEffect properties correctly
+ according to HTML5 spec (sec. 7.9.2-7.9.3).
+ https://bugs.webkit.org/show_bug.cgi?id=26700
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _dragSourceMovedTo:]):
+ Pass current drag operation (if known) to EventHandler::dragSourceMovedTo().
+
+2009-09-09 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection. This is similar
+ to user script injection but allows for user stylesheets to be added. The stylesheets are applied immediately
+ to all Frames in the PageGroup.
+
+ Added userscripts/simple-stylesheet.html test case.
+
+ * WebView/WebView.mm:
+ (+[WebView _addUserStyleSheetToGroup:source:url:worldID:patterns:]):
+ * WebView/WebViewPrivate.h:
+
+2009-09-07 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ Adds a mock Geolocation service. This will be used to provide predictable behavior of the
+ Geolocation API for use in LayoutTests. Later changes will integrate the the mock
+ Geolocation service with DumpRenderTree.
+ https://bugs.webkit.org/show_bug.cgi?id=28264
+
+ * WebCoreSupport/WebGeolocationMockPrivate.h: Added.
+ * WebCoreSupport/WebGeolocationMock.mm: Added.
+ (+[WebGeolocationMock setError:code:]): Added. Used by DumpRender tree to configure the mock Geolocation service.
+ (+[WebGeolocationMock setPosition:latitude:longitude:accuracy:]): Added. Used by DumpRender tree to configure the mock Geolocation service.
+ * WebKit.exp: Modified. Exports WebGeolocationMock.
+
+2009-09-07 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ Enable SHARED_WORKERS by default.
+ https://bugs.webkit.org/show_bug.cgi?id=28959
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-09-06 Cameron McCormack <cam@mcc.id.au>
+
+ Reviewed by Eric Seidel.
+
+ Drop <definition-src> support
+ https://bugs.webkit.org/show_bug.cgi?id=28991
+
+ * MigrateHeaders.make: Remove reference to ObjC definition-src
+ binding class.
+
+2009-09-04 Mark Mentovai <mark@chromium.org>
+
+ Reviewed by Dave Hyatt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28614
+
+ Account for scrollbar state changes that occur during layout.
+
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView updateScrollers]):
+
+ Perform a layout prior to checking whether the scrollbar modes are
+ off, on, or automatic. The modes may change during layout.
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _install]):
+
+ Eliminate duplicated (and incorrect) scrollbar mode tracking between
+ FrameView and ScrollView.
+
+2009-09-03 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28890, make simple user script injection work.
+
+ This patch adds new API for adding and removing user scripts from page groups. User scripts
+ are bundled together in isolated worlds (you can have multiple scripts together in the same
+ world).
+
+ Added userscripts/ directory for holding new tests (along with a simple test of script injection).
+
+ * WebView/WebView.mm:
+ (+[WebView _addUserScriptToGroup:source:url:worldID:patterns:injectionTime:]):
+ (+[WebView _removeUserContentFromGroup:worldID:]):
+ (+[WebView _removeAllUserContentFromGroup:]):
+ * WebView/WebViewPrivate.h:
+
+2009-09-04 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24696
+
+ Plumb mixed content notifications to WebFrameLoadDelegatePrivate.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::didDisplayInsecureContent):
+ (WebFrameLoaderClient::didRunInsecureContent):
+ * WebView/WebDelegateImplementationCaching.h:
+ * WebView/WebFrameLoadDelegatePrivate.h: Added.
+
+2009-09-03 Adam Barth <abarth@webkit.org>
+
+ Unreviewed build fix.
+
+ Change notImplemented() to a FIXME.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::didDisplayInsecureContent):
+ (WebFrameLoaderClient::didRunInsecureContent):
+
+2009-09-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by eric@webkit.org.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24696
+
+ Plumb mixed content notifications to WebFrameLoadDelegatePrivate.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::didDisplayInsecureContent):
+ (WebFrameLoaderClient::didRunInsecureContent):
+ * WebView/WebDelegateImplementationCaching.h:
+ * WebView/WebFrameLoadDelegatePrivate.h: Added.
+
+2009-09-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24696
+
+ Stub implementations of mixed content methods of FrameLoaderClient.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::didDisplayInsecureContent):
+ (WebFrameLoaderClient::didRunInsecureContent):
+
+2009-09-02 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ More partial work towards "Page Cache should support pages with Frames"
+ https://bugs.webkit.org/show_bug.cgi?id=13631
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _topHTMLView]): Rework the ASSERT in this method to reflect the
+ reality of calling this method for pages currently in the PageCache.
+
+2009-08-31 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reverting http://trac.webkit.org/changeset/47904, because it caused
+ layout test failure.
+
+2009-08-31 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28852
+ Rename KURL single argument constructor to avoid confusion
+
+ * WebView/WebScriptDebugger.mm: (toNSURL): Adapt to the change.
+
+2009-08-31 Mark Mentovai <mark@chromium.org>
+
+ Reviewed by Dave Hyatt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28614
+
+ Perform a layout prior to checking whether the scrollbar modes are
+ off, on, or automatic. The modes may change during layout.
+
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView updateScrollers]):
+
+2009-08-28 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by John Sullivan.
+
+ update-webkit-localizable-strings script can no longer complete
+ https://bugs.webkit.org/show_bug.cgi?id=28792
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory AXARIAContentGroupText:]):
+
+2009-08-28 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Holger Freyther.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25889
+ [GTK] scrollbar policy for main frame is not implementable
+
+ Add empty implementation for new ChromeClient method.
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::scrollbarsModeDidChange):
+
+2009-08-25 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <video> and <audio> controller should be accessible
+ https://bugs.webkit.org/show_bug.cgi?id=28081
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory localizedMediaControlElementString:]):
+ (-[WebViewFactory localizedMediaControlElementHelpText:]):
+ (-[WebViewFactory localizedMediaTimeDescription:]):
+ New.
+
+2009-08-24 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by NOBODY (build fix)
+
+ Turn off ENABLE_3D_CANVAS in the xconfig files.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-08-22 Adam Barth <abarth@webkit.org>
+
+ Revert 47684. We're going to do this later once clients have had a
+ chance to opt into the setting they like.
+
+ * Misc/WebKitVersionChecks.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+
+2009-08-22 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Don't let local files access web URLs
+ https://bugs.webkit.org/show_bug.cgi?id=28480
+
+ * Misc/WebKitVersionChecks.m:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+
+2009-08-21 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7162480>
+ Sometimes WebKit does not layout correctly when a WebView is embedded in an HICocoaView
+
+ Add a null check for the current context when reflectScrolledClipView: is called from outside a
+ draw operation.
+
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
+
+2009-08-20 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Enable various "grouping" ARIA roles
+ https://bugs.webkit.org/show_bug.cgi?id=28486
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory AXARIAContentGroupText:]):
+
+2009-08-19 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix <http://webkit.org/b/28484> Plug-in-related leaks seen on the build bot
+
+ When the plug-in data is being loaded manually there is a reference cycle between the
+ NetscapePluginInstanceProxy and the HostedNetscapePluginStream. We need to explicitly
+ break the reference cycle in NetscapePluginInstanceProxy::cleanup so that both objects
+ will be destroyed.
+
+ Take the opportunity to add RefCountedLeakCounter support to HostedNetscapePluginStream
+ and NetscapePluginInstanceProxy to simplify tracking down leaks of these objects in the future.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.h:
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+ (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
+ (WebKit::HostedNetscapePluginStream::~HostedNetscapePluginStream):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
+ (WebKit::NetscapePluginInstanceProxy::cleanup): Clear m_manualStream to break the reference
+ cycle.
+
+2009-08-19 Aaron Boodman <aa@chromium.org>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24853: Provide a way for WebKit clients to
+ specify a more granular policy for cross-origin XHR access.
+
+ * WebView/WebView.mm: Add SPI to manipulate origin access whitelists.
+ (+[WebView _whiteListAccessFromOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]): Ditto.
+ (+[WebView _resetOriginAccessWhiteLists]): Ditto.
+ * WebView/WebViewPrivate.h: Ditto.
+
+2009-08-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Mac specific part of
+
+ <rdar://problem/7135588> HTMLMediaElement should ask WebPolicyLoadDelegate before loading resource
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ Implement shouldLoadMediaElementURL by asking the policy delegate.
+
+ * WebView/WebPolicyDelegatePrivate.h:
+ Add new delegate method, remove some unused cruft.
+
+2009-08-18 Drew Wilson <atwilson@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Need to extend DumpRenderTree to expose number of worker threads.
+ https://bugs.webkit.org/show_bug.cgi?id=28292
+
+ * WebKit.exp:
+ Exported WebWorkersPrivate so DumpRenderTree can access it.
+ * Workers/WebWorkersPrivate.h: Added.
+ * Workers/WebWorkersPrivate.mm: Added.
+ (+[WebWorkersPrivate workerThreadCount]):
+ Added WebWorkersPrivate::workerThreadCount() API for DumpRenderTree.
+
+2009-08-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Use a HashMap instead of a list of if statements for the command
+ name exception map.
+
+ * WebView/WebHTMLView.mm:
+ (createSelectorExceptionMap): Added.
+ (commandNameForSelector): Use createSelectorExceptionMap.
+
+2009-08-16 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/28366> WebHTMLViewInternal.h: add @class CALayer declaration
+
+ Reviewed by Simon Fraser.
+
+ Without WebKitPrefix.h, the missing @class CALayer declaration
+ causes a compile-time error.
+
+ * WebView/WebHTMLViewInternal.h: Added @class CALayer
+ declaration with USE(ACCELERATED_COMPOSITING).
+
+2009-08-16 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/28355> Replace MAX()/MIN() macros with type-safe std::max()/min() templates
+
+ Reviewed by Dan Bernstein.
+
+ * Plugins/WebBaseNetscapePluginStream.mm: Added using std::min
+ statement.
+ (WebNetscapePluginStream::deliverData): Changed MIN() to min().
+ Changed C-style cast to a static_cast.
+ * Plugins/WebNetscapePluginView.mm: Added using std::min
+ statement.
+ (-[WebNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]):
+ Changed MIN() to min(). Changed C-style cast to a static_cast.
+ * WebView/WebHTMLView.mm: Added using std::max statement.
+ (-[WebHTMLView _dragImageForURL:withLabel:]): Changed MAX() to
+ max().
+ (-[WebHTMLView _scaleFactorForPrintOperation:]): Ditto.
+ * WebView/WebTextCompletionController.mm: Added using std::max
+ and using std::min statements.
+ (-[WebTextCompletionController _placePopupWindow:]): Changed
+ type of maxWidth variable from float to CGFloat to prevent a
+ type mismatch on x86_64. Changed MAX() to max() and MIN() to
+ min(). Added static_cast for a constant value since CGFloat is
+ defined as a float on i386 and as a double on x86_64.
+
+2009-08-15 Adam Bergkvist <adam.bergkvist@ericsson.com>
+
+ Reviewed by Sam Weinig.
+
+ Added ENABLE_EVENTSOURCE flag.
+ https://bugs.webkit.org/show_bug.cgi?id=14997
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-08-14 Mark Rowe <mrowe@apple.com>
+
+ Build fix.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::enumerate): Add the necessary .get() calls.
+
+2009-08-14 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/7091546> - Assertion failure in plugins/return-error-from-new-stream-doesnt-invoke-destroy-stream.html
+ on 64-bit SnowLeopard
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+ (WebKit::HostedNetscapePluginStream::cancelLoad): Since this might be called while the FrameLoader is switching DocumentLoaders
+ during the brief moment where there is no activeDocumentLoader(), accept and handle a validly null DocumentLoader.
+
+2009-08-14 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ Fix leaks of NSNumber and NSMutableArray objects seen during layout tests.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::enumerate): Don't leak an NSMutableArray that we allocate.
+
+2009-08-14 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Fix leaks of HostedNetscapePluginStream and NetscapePlugInStreamLoader objects seen during layout tests.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+ (WebKit::HostedNetscapePluginStream::didFail): Disconnect the stream from the plug-in instance proxy
+ when the load fails.
+
+2009-08-13 Darin Adler <darin@apple.com>
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Updated includes.
+ * WebView/WebScriptDebugger.mm: Ditto.
+
+2009-08-12 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ <rdar://problem/6017913> Replace use of HISearchWindowShow in -[WebView _searchWithSpotlightFromMenu].
+
+ * WebView/WebView.mm:
+ (-[WebView _searchWithSpotlightFromMenu:]): Use -[NSWorkspace showSearchResultsForQueryString:] post-Leopard.
+
+2009-08-12 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Add delegate methods about focus and blur and state change
+ https://bugs.webkit.org/show_bug.cgi?id=27153
+
+ Have ObjC delegate methods match C++ method names in the ChromeClient.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::formDidFocus):
+ (WebChromeClient::formDidBlur):
+ * WebView/WebUIDelegatePrivate.h:
+
+2009-08-11 John Gregg <johnnyg@google.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Desktop Notifications API
+ https://bugs.webkit.org/show_bug.cgi?id=25643
+
+ Adds ENABLE_NOTIFICATION flag.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-08-11 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove dead declarations.
+
+ * WebView/WebViewInternal.h:
+
+2009-08-11 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Adam Roben.
+
+ Originally implemented by Glenn Wilson <gwilson@chromium.org>.
+
+ Added new methods for overriding default WebPreference values
+ and for resetting preferences to their defaults.
+ See https://bugs.webkit.org/show_bug.cgi?id=20534
+
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences _setPreferenceForTestWithValue:withKey:]): added.
+ * WebView/WebPreferencesPrivate.h: same.
+
+2009-08-09 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] Deck access control is completly broken
+ https://bugs.webkit.org/show_bug.cgi?id=27721
+
+ Synchronize WebFrameLoadType with FrameLoadType enum. Append 'WebFrameLoadTypeBackWMLDeckNotAccessible'.
+
+ * WebView/WebFramePrivate.h:
+
+2009-08-07 Simon Fraser <simon.fraser@apple.com>
+
+ Fix the build on 10.6.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView attachRootLayer:]):
+
+2009-08-07 Simon Fraser <simon.fraser@apple.com>
+
+ Fix a stylistic nit related to the location of the *, which, for some
+ ridiculous reason, WebKit style dictates to be different between Objective-C and C++.
+
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
+
+2009-08-07 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Work around an issue on Leopard where composited layers are misplaced and squished when the page
+ gets over 4096px tall.
+ https://bugs.webkit.org/show_bug.cgi?id=27272
+ <rdar://problem/7067892> [Leopard] Composisted layers are misplaced and squished on on long pages
+ <rdar://problem/7068252> [Leopard] When switching to a tab with HW layers, they fade in
+
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
+ Call -_updateLayerHostingViewPosition after scrolling.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _frameOrBoundsChanged]):
+ Call -_updateLayerHostingViewPosition after the view changes size.
+
+ (-[WebHTMLView attachRootLayer:]):
+ Turn off default animations, to avoid animations of sublayer transform, and fading-in
+ when tab switching.
+
+ * WebView/WebHTMLViewInternal.h:
+ (-[WebHTMLView _updateLayerHostingViewPosition]):
+ New method that constrains the height of the layer-hosting view to a max height
+ of 4096px, and compensates for the height restriction by placing the layer-hosting
+ view at the top of the visible part of the WebHTMLView, and adjusting the position
+ of the hosted layers via sublayer transform.
+
+2009-08-07 Anders Carlsson <andersca@apple.com>
+
+ Fix Tiger build.
+
+ * WebView/WebRenderNode.mm:
+ (-[WebRenderNode _initWithCoreFrame:]):
+
+2009-08-07 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Timothy Hatcher and Sam Weinig.
+
+ Change WebRenderNode to take a WebFrame instead of a WebFrameView.
+
+ * WebView/WebRenderNode.h:
+ * WebView/WebRenderNode.mm:
+ (-[WebRenderNode _initWithName:position:rect:coreFrame:children:]):
+ (copyRenderNode):
+ (-[WebRenderNode _initWithCoreFrame:]):
+ (-[WebRenderNode initWithWebFrame:]):
+
+2009-08-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler and Dan Bernstein.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::hasHTMLView):
+ Always return true when we're in viewless mode.
+
+2009-08-06 Anders Carlsson <andersca@apple.com>
+
+ Remove WebGraphicsExtras.h include.
+
+ * Plugins/WebNetscapePluginView.mm:
+
+2009-08-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove WebGraphicsExtras, it is no longer used.
+
+ * Misc/WebGraphicsExtras.c: Removed.
+ * Misc/WebGraphicsExtras.h: Removed.
+
+2009-08-06 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Added ENABLE_3D_CANVAS flag to build, default to off
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-08-04 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27821
+
+ Mods to keep up with ApplicationCacheHost refactoring.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _transferApplicationCache:]):
+
+2009-07-30 Darin Adler <darin@apple.com>
+
+ Reviewed by David Levin.
+
+ Use checked casts for render tree
+ https://bugs.webkit.org/show_bug.cgi?id=23522
+
+ * Misc/WebNSAttributedStringExtras.mm:
+ (fileWrapperForElement):
+ * Misc/WebNSPasteboardExtras.mm:
+ (imageFromElement):
+ (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]):
+ (-[WebFrame _accessibilityTree]):
+ * WebView/WebRenderNode.mm:
+ (copyRenderNode):
+ Use checked casts.
+
+2009-07-31 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Accelerated animations stutter on pages with lots of animations and 3d transforms
+ https://bugs.webkit.org/show_bug.cgi?id=27884
+
+ This patch changes the strategy for synchronizing painting view the view,
+ and compositing layer updates. Previously the strategy was to disable screen
+ updates between the time we updated the layer tree, and painted the view. That
+ left screen updates disabled for too long (hundreds of milliseconds) in some
+ cases, causing animation stutter.
+
+ The new strategy is to batch up changes to the CA layer tree, and commit them
+ all at once just before painting happens (referred to as a "sync" in the code).
+ GraphicsLayerCA now keeps a bitmask of changed properties, and then migrates
+ the values stored in GraphicsLayer into the CA layer tree at commit time.
+
+ Compositing layers are then synced in FrameView::paintContents(). However, not
+ all style/layout changes will result in painting; to deal with style changes that
+ touch only compositing properties, we set up a runloop observer that takes care
+ of comitting layer changes when no painting happens.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::scheduleCompositingLayerSync):
+ scheduleViewUpdate() renamed to syncCompositingStateRecursive()
+
+ * WebView/WebView.mm:
+ (-[WebView _close]):
+ (-[WebView _clearLayerSyncLoopObserver]):
+ "viewUpdateRunLoopObserver" is now "layerSyncLoopObserver".
+
+ (-[WebView _syncCompositingChanges]):
+ Helper method that calls syncCompositingStateRecursive() on the FrameView.
+
+ (layerSyncRunLoopObserverCallBack):
+ (-[WebView _scheduleCompositingLayerSync]):
+ This is all about layer sycning now. Also, the run loop observer is repeating,
+ because it has to keep firing until syncCompositingStateRecursive() says that it
+ has completed.
+
+ * WebView/WebViewData.h:
+ "viewUpdateRunLoopObserver" is now "layerSyncLoopObserver".
+
+ * WebView/WebViewInternal.h:
+ _scheduleViewUpdate is now _scheduleCompositingLayerSync
+
+2009-07-30 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27821
+
+ Mods to keep up with ApplicationCacheHost refactoring.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _transferApplicationCache:]):
+
+2009-07-29 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/27788> Don't export WebPluginController.h as a private header
+
+ Reviewed by Mark Rowe.
+
+ * Plugins/WebPluginController.h: Changed #import of
+ WebPluginContainerCheck.h to use a framework-style include in
+ case other platforms wish to export WebPluginController.h as a
+ private header.
+
+2009-07-29 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Added foundation work to allow a testing infrastructure for the Web
+ Inspector.
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::inspectorWindowObjectCleared): Send the delegate
+ callback.
+ * WebView/WebDelegateImplementationCaching.h:
+ * WebView/WebView.mm:
+ (-[WebView _cacheFrameLoadDelegateImplementations]):
+ * WebView/WebViewPrivate.h: The delegate SPI.
+
+2009-07-27 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7091036> REGRESSION: Microsoft Messenger crashes during file send/receive due to use of WebKit on non-main thread
+
+ In some situations Microsoft Messenger can attempt to manipulate the DOM from a secondary thread while
+ updating its file transfer progress bar. This results in corruption of WebCore data structures that is
+ quickly followed by a crash. We can work around this by having -[WebFrame DOMDocument] return nil when
+ called from a secondary thread by Microsoft Messenger, which has the effect of turning its attempts at
+ DOM manipulation in to no-ops.
+
+ * WebView/WebFrame.mm:
+ (needsMicrosoftMessengerDOMDocumentWorkaround):
+ (-[WebFrame DOMDocument]):
+
+2009-07-27 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27735
+ Give a helpful name to JSLock constructor argument
+
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics javaScriptObjectsCount]):
+ (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
+ (+[WebCoreStatistics shouldPrintExceptions]):
+ (+[WebCoreStatistics setShouldPrintExceptions:]):
+ (+[WebCoreStatistics memoryStatistics]):
+ (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::evaluate):
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ (WebKit::NetscapePluginInstanceProxy::invokeDefault):
+ (WebKit::NetscapePluginInstanceProxy::construct):
+ (WebKit::NetscapePluginInstanceProxy::getProperty):
+ (WebKit::NetscapePluginInstanceProxy::setProperty):
+ (WebKit::NetscapePluginInstanceProxy::removeProperty):
+ (WebKit::NetscapePluginInstanceProxy::hasMethod):
+ (WebKit::NetscapePluginInstanceProxy::enumerate):
+ (WebKit::NetscapePluginInstanceProxy::addValueToArray):
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::wantsAllStreams):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView sendEvent:isDrawRect:]):
+ (-[WebNetscapePluginView setWindowIfNecessary]):
+ (-[WebNetscapePluginView createPluginScriptableObject]):
+ (-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):
+ (-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]):
+ (-[WebNetscapePluginView loadPluginRequest:]):
+ (-[WebNetscapePluginView _printedPluginBitmap]):
+ * Plugins/WebPluginController.mm:
+ (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
+ (-[WebPluginController startAllPlugins]):
+ (-[WebPluginController stopAllPlugins]):
+ (-[WebPluginController addPlugin:]):
+ (-[WebPluginController destroyPlugin:]):
+ (-[WebPluginController destroyAllPlugins]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame scopeChain]):
+ (-[WebScriptCallFrame evaluateWebScript:]):
+ * WebView/WebView.mm:
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
+
+2009-07-24 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ REGRESSION (r46298): Exception after clicking on Bookmarks button in the Bookmarks Bar
+ https://bugs.webkit.org/show_bug.cgi?id=27667
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage): Moved the code to set the
+ title here. This is late enough that both the view and representation exist.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _makeRepresentation]): Removed the code to set the title from here.
+ It's a bit too early.
+
+2009-07-24 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Anders Carlsson.
+
+ ApplicationCache should have size limit
+ https://bugs.webkit.org/show_bug.cgi?id=22700
+
+ Adds the WebApplicationCache class that is
+ used by the DumpRenderTree test application to
+ configure the Application Cache maximum size.
+
+ * WebCoreSupport/WebApplicationCache.h: Added.
+ * WebCoreSupport/WebApplicationCache.mm: Added.
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::reachedMaxAppCacheSize):
+ Adds empty implementation of the reachedMaxAppCacheSize callback.
+ * WebKit.exp:
+
+2009-07-23 Darin Adler <darin@apple.com>
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _makeRepresentation]): Landed a comment I forgot last time.
+
+2009-07-23 Darin Adler <darin@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ URL appears in back/forward button menu instead of title for items with custom representation
+ https://bugs.webkit.org/show_bug.cgi?id=27586
+ rdar://problem/5060337
+
+ The problem is that DocumentLoader expects to store a title, but for custom representations
+ it is never passed to the document loader.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _makeRepresentation]): Added a call to DocumentLoader::setTitle.
+ Works as long as the title does not change during the document's lifetime, which
+ is good enough for the simple cases in Safari.
+
+2009-07-20 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ REGRESSION (r39185): Safari adds ".jpeg" extension to images that already have ".JPG" extension
+ https://bugs.webkit.org/show_bug.cgi?id=27472
+
+ * WebView/WebHTMLView.mm:
+ (matchesExtensionOrEquivalent): Changed category method into a C function.
+ Made it require the leading dot when checking for the extension and do it
+ in a non-case-sensitive way.
+ (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Changed to call
+ the function.
+
+2009-07-21 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by David Levin.
+
+ Add ENABLE_RUBY to list of build options
+ https://bugs.webkit.org/show_bug.cgi?id=27324
+
+ * Configurations/FeatureDefines.xcconfig: Added flag ENABLE_RUBY.
+
+2009-07-17 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Fix of <rdar://problem/5712795> Win: Cannot change the height of the docked Web Inspector (14272)
+ https://bugs.webkit.org/show_bug.cgi?id=14272
+
+ Removed size calculation code from [WebInspectorWindowController setInitialAttachedHeight] into
+ InspectorController.cpp to make it cross platform, and use InspectorController to store the
+ user's preferred size for an attached window, instead of NSUserDefaults.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController showWindow:]):
+ (-[WebInspectorWindowController setAttachedWindowHeight:]):
+
+2009-07-16 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add --web-sockets flag and ENABLE_WEB_SOCKETS define.
+ https://bugs.webkit.org/show_bug.cgi?id=27206
+
+ Add ENABLE_WEB_SOCKETS
+
+ * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS
+
+2009-07-16 Xiaomei Ji <xji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix tooltip does not get its directionality from its element's directionality.
+ https://bugs.webkit.org/show_bug.cgi?id=24187
+
+ Per mitz's suggestion in comment #6, while getting the plain-text
+ title, we also get the directionality of the title. How to handle
+ the directionality is up to clients. Clients could ignore it,
+ or use attribute or unicode control characters to display the title
+ as what they want.
+
+ * Misc/WebElementDictionary.mm:
+ (-[WebElementDictionary _spellingToolTip]): Change spellingToolTip caller due to signature change.
+ (-[WebElementDictionary _title]): Change title caller due to signature change.
+ * WebCoreSupport/WebChromeClient.h: Add directionality as 2nd parameter to setToolTip().
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::setToolTip): Add directionality as 2nd parameter to setToopTip() (without handling it yet).
+
+2009-07-15 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Renamed parseURL to deprecatedParseURL.
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMDocument URLWithAttributeString:]): Renamed.
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin): Renamed.
+
+2009-07-15 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27304
+ WebKit should provide usage and eligibility information about the page cache.
+
+ * Misc/WebCoreStatistics.h:
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics numberCachedPages]):
+ (+[WebCoreStatistics numberCachedFrames]):
+ (+[WebCoreStatistics numberAutoreleasedPages]):
+ * WebKit.exp:
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _cacheabilityDictionary]): Returns a dictionary with all the data about
+ why the frame is not cacheable. If the frame *is* cacheable, the dictionary is
+ empty.
+ * WebView/WebFramePrivate.h:
+
+2009-07-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein, Adam Roben.
+
+ "Unrecognized selector" console log when the Safari 4 Welcome page navigates to Top Sites.
+ <rdar://problem/6994893
+
+ attachRootGraphicsLayer() should not assume that the frameView's documentView
+ is a WebHTMLView.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::attachRootGraphicsLayer):
+
+2009-07-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler and Kevin Decker.
+
+ <rdar://problem/7053687> Core Animation plug-ins continue to grow larger and larger when opening new tabs (32 bit-only)
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView setLayer:]):
+ Add a FIXME.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView setLayer:]):
+ Make sure to set the size of the layer before changing the autoresizing mask so it won't grow everytime it's inserted
+ into the layer tree.
+
+2009-07-13 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Correct these delegate methods' declarations by adding parameter names.
+
+ * WebView/WebUIDelegatePrivate.h:
+
+2009-07-13 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
+ https://bugs.webkit.org/show_bug.cgi?id=26932
+
+ Added ENABLE(SHARED_WORKERS) flag (disabled by default).
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-07-12 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Refactor ConsoleMessage to add MessageType attribute.
+ https://bugs.webkit.org/show_bug.cgi?id=20625
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::addMessageToConsole):
+
+2009-07-11 Simon Fraser <simon.fraser@apple.com>
+
+ Enable support for accelerated compositing and 3d transforms on Leopard.
+ <https://bugs.webkit.org/show_bug.cgi?id=20166>
+ <rdar://problem/6120614>
+
+ Reviewed by Oliver Hunt.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-07-10 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27007: Build fixes when ICONDATABASE is disabled
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27007>
+
+ Reviewed by Sam Weinig.
+
+ * Misc/WebIconDatabase.mm:
+ (defaultClient): Return 0 if ICONDATABASE is disabled.
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDidReceiveIcon): Commented out
+ the body of the method if ICONDATABASE is disabled.
+ (WebFrameLoaderClient::registerForIconNotification): Ditto.
+ * WebCoreSupport/WebIconDatabaseClient.mm: Added #if
+ ENABLE(ICONDATABASE)/#endif guard to source.
+ * WebView/WebView.mm:
+ (-[WebView setFrameLoadDelegate:]): Wrapped code that starts the
+ icon database machinery in #if ENABLE(ICONDATABASE)/#endif.
+ (-[WebView _registerForIconNotification:]): Wrapped method in
+ #if ENABLE(ICONDATABASE)/#endif guard.
+ (-[WebView _dispatchDidReceiveIconFromWebFrame:]): Ditto.
+ * WebView/WebViewInternal.h: Wrapped methods in #if
+ ENABLE(ICONDATABASE)/#endif guard.
+ (-[WebView _registerForIconNotification:]):
+ (-[WebView _dispatchDidReceiveIconFromWebFrame:]):
+
+2009-07-10 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Flashing as hardware layers are created and destroyed in some content
+ <rdar://problem/7032246>
+
+ There's a window of time between the end of one runloop cycle, after CA layers changes
+ have been committed, and the window display at the start of the next cycle when
+ CA may push updates to the screen before AppKit has drawn the view contents. If
+ we know that we need to do drawing synchronization (which we do when content moves
+ between a layer and the view), then we need to call -disableScreenUpdatesUntilFlush
+ from the existing runloop observer that is set up when layers need repainting to
+ ensure that layer updates don't reach the screen before view-based painting does.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawRect:]):
+ Tweak the comments
+
+ * WebView/WebView.mm:
+ (viewUpdateRunLoopObserverCallBack):
+ (-[WebView _scheduleViewUpdate]):
+ Add a big comment to explain the timing of things.
+ Call -disableScreenUpdatesUntilFlush when the view _needsOneShotDrawingSynchronization.
+
+ 2009-07-09 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Tim Hatcher.
+2009-07-10 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Sam Weinig with the power of Grayskull.
+
+ Enable XSSAuditor by default.
+
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+
+2009-07-10 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Antti Koivisto.
+
+ Add delegate methods about focus and blur and state change
+ https://bugs.webkit.org/show_bug.cgi?id=27153
+
+ Call the appropriate private delegate methods from the ChromeClient.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::formStateDidChange):
+ (WebChromeClient::formDidFocus):
+ (WebChromeClient::formDidBlur):
+ * WebView/WebUIDelegatePrivate.h:
+
+2009-07-09 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27141
+
+ Updated WebInspectorClient to use Web Inspector Preferences to remember whether or not it should be
+ docked or a free window instead of NSUserDefaults it used to have.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController init]):
+ (-[WebInspectorWindowController showWindow:]):
+ (-[WebInspectorWindowController attach]):
+ (-[WebInspectorWindowController detach]):
+
+2009-07-09 Drew Wilson <atwilson@google.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26903
+
+ Turned on CHANNEL_MESSAGING by default because the MessageChannel API
+ can now be implemented for Web Workers and is reasonably stable.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-07-09 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele Peterson and Dan Bernstein.
+
+ <rdar://problem/7024972> Cannot set font to Helvetica Neue Light in Mail compose window
+
+ No regression test because this only affects the font panel.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _addToStyle:fontA:fontB:]): Fix code that detects whether the font would
+ survive a round trip by using the weight corresponding to "bold" or "normal" rather than
+ the actual weight number.
+
+2009-07-09 Beth Dakin and Jon Honeycutt <bdakin@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Make Widget RefCounted to fix:
+
+ <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs
+ at WebCore::Widget::afterMouseDown() after clicking To Do's close
+ box
+ <rdar://problem/6978804> WER #16: Repro Access Violation in
+ WebCore::PluginView::bindingInstance (1310178023)
+ -and-
+ <rdar://problem/6991251> WER #13: Crash in WebKit!
+ WebCore::PluginView::performRequest+203 (1311461169)
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin):
+
+2009-07-09 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Steve Falkenburg.
+
+ Roll out r43848. The quirk is no longer necessary.
+
+ * WebView/WebView.mm:
+ (-[WebView WebCore::_userAgentForURL:WebCore::]):
+
+2009-07-09 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ <rdar://problem/6921671> Visit count shouldn't be incremented by redirects.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::updateGlobalHistory):
+ Do not increase visit count if there is a redirect source. As a result, only pages that were
+ explicitly visited by the user (by typing a URL, choosing one from bookmarks, or clicking
+ a link) will be counted.
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate visitedURL:withTitle:increaseVisitCount:]):
+ (-[WebHistory _visitedURL:withTitle:method:wasFailure:increaseVisitCount:]):
+ * History/WebHistoryInternal.h:
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem _visitedWithTitle:increaseVisitCount:]):
+ * History/WebHistoryItemInternal.h:
+ Marshal this new argument all the way down to WebCore.
+
+2009-07-08 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add -[WebView _isProcessingUserGesture]
+ https://bugs.webkit.org/show_bug.cgi?id=27084
+
+ Add -_isProcessingUserGesture that calls into WebCore::FrameLoader::isProcessingUserGesture()
+ so that WebView code can determine if a user gesture is in progress.
+
+ * WebView/WebView.mm:
+ (-[WebView _isProcessingUserGesture]):
+ * WebView/WebViewPrivate.h:
+
+2009-07-07 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - Fix <rdar://problem/6544693>.
+
+ For Flash, don't cache which methods or fields in an object are missing, since they can
+ be added at any time.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::hostForPackage):
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ (WebKit::NetscapePluginHostProxy::shouldCacheMissingPropertiesAndMethods):
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::methodsNamed):
+ (WebKit::ProxyInstance::fieldNamed):
+
+2009-07-06 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27006: Build fix when MAC_JAVA_BRIDGE is disabled
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27006>
+
+ Reviewed by Darin Adler.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createJavaAppletWidget): Wrap contents of
+ the method in #if ENABLE(MAC_JAVA_BRIDGE)/#endif and return 0
+ when this feature is disabled.
+
+2009-07-06 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27005: Build fixes when NETSCAPE_PLUGIN_API is disabled
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27005>
+
+ Reviewed by Geoff Garen.
+
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController destroyPlugin:]): Wrap call to
+ ScriptController::cleanupScriptObjectsForPlugin() in
+ #if ENABLE(NETSCAPE_PLUGIN_API)/#endif macro.
+ (-[WebPluginController destroyAllPlugins]): Ditto.
+ * Plugins/WebPluginDatabase.mm:
+ (-[WebPluginDatabase removePluginInstanceViewsFor:]): Wrap
+ WebBaseNetscapePluginView class checks in
+ #if ENABLE(NETSCAPE_PLUGIN_API)/#endif macro.
+ (-[WebPluginDatabase destroyAllPluginInstanceViews]): Ditto.
+
+2009-07-06 David Kilzer <ddkilzer@apple.com>
+
+ BUILD FIX: Use ENABLE(NETSCAPE_PLUGIN_API) instead of USE(PLUGIN_HOST_PROCESS)
+
+ In r45579, #if/#endif macros for USE(PLUGIN_HOST_PROCESS) were
+ used, but ENABLE(NETSCAPE_PLUGIN_API) should have been used
+ instead.
+
+ * Plugins/WebNetscapeContainerCheckContextInfo.h:
+ * Plugins/WebNetscapeContainerCheckContextInfo.mm:
+ * Plugins/WebNetscapeContainerCheckPrivate.mm:
+
+2009-07-06 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27004: Build fix for ENABLE(PLUGIN_PROXY_FOR_VIDEO) after r42618
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27004>
+
+ Reviewed by Geoff Garen.
+
+ * Plugins/WebPluginController.mm:
+ (mediaProxyClient): Use core() method to convert from
+ DOMElement to WebCore::Element.
+
+2009-07-06 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27003: Build fix when USE(PLUGIN_HOST_PROCESS) is disabled
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27003>
+
+ Reviewed by Geoff Garen.
+
+ * Plugins/WebNetscapeContainerCheckContextInfo.h: Added #if
+ USE(PLUGIN_HOST_PROCESS)/#endif guards.
+ * Plugins/WebNetscapeContainerCheckContextInfo.mm: Ditto.
+ * Plugins/WebNetscapeContainerCheckPrivate.mm: Ditto.
+
+2009-07-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Initialize wkIsLatchingWheelEvent.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+
+2009-07-03 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ - fix <rdar://problem/6964278> REGRESSION (r42118): Scrolling redraw
+ problem in FileMaker Pro
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
+ Perform layout if needed, even on Mac OS X versions that have
+ -viewWillDraw. This prevents attempts to draw without layout in case
+ -viewWillDraw was not called due to NSView issues or the client
+ did something during the display operation that re-invalidated the
+ layout.
+
+2009-07-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6978783>
+ Software-rendered plug-in does not update correctly when inside a hardware layer
+
+ Replace calls to setNeedsDisplay: and setNeedsDisplayInRect: with a call to the new method
+ invalidatePluginContentRect:. This new method will ask WebCore to do the repainting, taking
+ transforms into account.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::invalidateRect):
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView pluginHostDied]):
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView windowBecameKey:]):
+ (-[WebBaseNetscapePluginView windowResignedKey:]):
+ (-[WebBaseNetscapePluginView preferencesHaveChanged:]):
+ (-[WebBaseNetscapePluginView invalidatePluginContentRect:]):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView invalidateRect:]):
+ (-[WebNetscapePluginView invalidateRegion:]):
+ (-[WebNetscapePluginView forceRedraw]):
+
+2009-07-02 Adam Roben <aroben@apple.com>
+
+ Fix warnings from update-webkit-localizable-strings
+
+ Rubber-stamped by Eric Carlson.
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory mediaElementLoadingStateText]):
+ (-[WebViewFactory mediaElementLiveBroadcastStateText]):
+ Changed the localization comments to match the comments in the Windows
+ version of this file, to avoid warnings about different comments for
+ the same localized string.
+
+2009-07-02 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Compositing-related preference methods are not public API; should move to WebPreferencesPrivate.h
+ <rdar://problem/7027363>
+
+ Move accelerated-compositing pref to WebPreferencesPrivate.h
+
+ * WebView/WebPreferences.h:
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences acceleratedCompositingEnabled]):
+ (-[WebPreferences setAcceleratedCompositingEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+
+2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/6518119>
+
+ Add localized strings for media controller status messages.
+
+ * WebCoreSupport/WebViewFactory.mm: Add new localized text.
+ (-[WebViewFactory mediaElementLoadingStateText]):
+ (-[WebViewFactory mediaElementLiveBroadcastStateText]):
+
+2009-07-01 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add a preference/setting to toggle whether content sniffing is enabled for file URLs.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences localFileContentSniffingEnabled]):
+ (-[WebPreferences setLocalFileContentSniffingEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-07-01 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ <rdar://problem/6998524> REGRESSION (r44474): Form text field has focus ring, looks focused,
+ even though the field is not actually focused for keyboard input
+
+ Add the concept of whether or not the Page is focused by adding a boolean to the focusController. This allows the
+ focused frame and focused node to both be cached and changed programmatically without causing errors when the Page doesn't
+ have focus.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView becomeFirstResponder]):
+ (-[WebHTMLView resignFirstResponder]):
+
+2009-06-30 Adele Peterson <adele@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for <rdar://problem/7014389> REGRESSION(4-TOT): Hyperlinks have no tooltips in Mail unless you first click in the message body
+
+ Updated these new methods (added as part of the viewless WebKit effort) that call through to WebHTMLView to use _selectedOrMainFrame,
+ instead of just selectedFrame. When the selection changes, I don't think there is a situation where there's no selected frame, but
+ it seems better to keep these two uses the same, since if there is a case, this will be more like the old behavior, before there was
+ a version of _selectionChanged in WebView.
+
+ * WebView/WebView.mm:
+ (-[WebView _setToolTip:]):
+ (-[WebView _selectionChanged]):
+
+2009-06-30 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ <rdar://problem/7006959> 'Save as…’ does not work in Mail
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView initWithFrame:]): Call _needMailThreadWorkaroundIfCalledOffMainThread rather than
+ needMailThreadWorkaround, as the latter is intended to be used at the point which a workaround would
+ be applied and thus contains a main thread check. Since -initWithFrame: is called on the main thread,
+ this was causing us to not switch from exception-throwing to logging for the thread violation behavior.
+
+2009-06-30 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ - fix <rdar://problem/6946611> REGRESSION (r30673): Shade10:" D_Snap
+ to Grid" window is clipping
+
+ * Misc/WebKitVersionChecks.h: Added
+ WEBKIT_FIRST_VERSION_WITHOUT_SHADE10_QUIRK
+ * WebView/WebView.mm:
+ (-[WebView _needsLinkElementTextCSSQuirk]): Added. Returns YES if the
+ client app is a version of Shade 10 earlier than 10.6 and it was
+ linked against a version of WebKit earlier than 531.2.
+ (-[WebView _preferencesChangedNotification:]): Added a call to
+ Settings::setTreatsAnyTextCSSLinkAsStylesheet().
+
+2009-06-29 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7014813> Ask media engine if a movie is streamed or downloaded.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+ Add QTMovieGetType.
+
+2009-06-29 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Put datagrid behind an #ifdef.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-06-26 John Sullivan <sullivan@apple.com>
+
+ Added support for disabling Stop Speaking when there is no speaking to stop.
+ Also fixed Stop Speaking so that it works (formerly it would throw an exception, and
+ selecting it from the menu would perform a web search instead (!)).
+
+ Reviewed by Tim Hatcher.
+
+ * WebCoreSupport/WebContextMenuClient.h:
+ declare isSpeaking()
+
+ * WebCoreSupport/WebContextMenuClient.mm:
+ (WebContextMenuClient::isSpeaking):
+ implement by calling through to NSApplication
+ (WebContextMenuClient::stopSpeaking):
+ fixed implementation by correcting the signature of the NSApplication method
+
+2009-06-26 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser <simon.fraser@apple.com>.
+
+ Additional fix for https://bugs.webkit.org/show_bug.cgi?id=26651
+
+ The flag should always default to true to avoid it getting set
+ to false in a build with accelerated compositing turned off
+ and then disabling accelerated compositing when subsequently
+ running a build with it turned on.
+
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+
+2009-06-26 Brady Eidson <beidson@apple.com>
+
+ Fix SnowLeopard build.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+ (WebKit::HostedNetscapePluginStream::didReceiveResponse):
+
+2009-06-26 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig
+
+ <rdar://problem/6961578> REGRESSION (r43511): Opening .fdf files from Acrobat Professional fails
+
+ Replace all usage of the now obsolete [NSURLResponse _webcore_MIMEType].
+
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::didReceiveResponse):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView pluginView:receivedData:]):
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController pluginView:receivedResponse:]):
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _responseMIMEType]):
+ * WebView/WebResource.mm:
+ (-[WebResource _initWithData:URL:response:]):
+
+2009-06-26 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6651201> Update lookalike character list.
+
+ * Misc/WebNSURLExtras.mm: (isLookalikeCharacter): Added more characters to the list.
+
+2009-06-25 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/6989017>
+ REGRESSION (SnowLeopard): RealPlayer content replays when opening a new tab or switching back to the RealPlayer tab
+
+ If a plug-in fails in NPP_New, we would try to recreate it whenever the preferences for a web view would change.
+
+ Fix this by setting a flag when we fail to instantiate the plug-in, so we only try once.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView start]):
+
+2009-06-25 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser <simon.fraser@apple.com>.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26651
+
+ Preference is named "WebKitAcceleratedCompositingEnabled"
+ and is a boolean value. When false, prevents compositing layers from
+ being created, which prevents hardware animation from running.
+ Also forces video to do software rendering. Added a cache for
+ the flag in RenderLayerCompositing and made it all work
+ on-the-fly when the flag is changed while a page is loaded.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences acceleratedCompositingEnabled]):
+ (-[WebPreferences setAcceleratedCompositingEnabled:]):
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-06-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Fix the most recently seen kind of crash in <rdar://problem/5983224>
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Null-check the
+ Frame.
+
+2009-06-24 Jeff Johnson <opendarwin@lapcatsoftware.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26638 WebKitErrors.m: _initWithPluginErrorCode: does not set localizedDescription
+
+ Add localized descriptions for plugin errors.
+ The localized strings already existed but were unused; now NSLocalizedDescriptionKey is added to the NSError userInfo.
+
+ * Misc/WebKitErrors.m:
+ (-[NSError _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]):
+
+2009-06-23 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6950660> REGRESSION: iSale 5.5.3 crashes after I click a template to load
+
+ Due to some subtle WebKit changes - presumably some delegate callback behavior - a latent bug in
+ iSale was uncovered where they aren't properly retaining their FrameLoadDelegate, and we ended up
+ calling back to a dealloc'ed object.
+
+ * WebView/WebView.mm:
+ (-[WebView _needsAdobeFrameReloadingQuirk]): Use more intelligent C++-style initialization.
+ (-[WebView _needsKeyboardEventDisambiguationQuirks]): Ditto.
+ (-[WebView _needsFrameLoadDelegateRetainQuirk]): YES for iSale versions under 5.6
+ (-[WebView dealloc]): Release the delegate if the quirk is in effect.
+ (-[WebView setFrameLoadDelegate:]): Retain the new delegate if the quirk is in effect.
+
+2009-06-23 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - Fix <rdar://problem/6965672>
+
+ Defer calls to WKPCInvalidateRect, so we don't try to invalidate while waiting for a reply, since
+ that is too early.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ (WebKit::NetscapePluginHostProxy::isProcessingRequests):
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+ (WebKit::NetscapePluginHostProxy::processRequests):
+ (WKPCInvalidateRect):
+
+2009-06-22 Timothy Hatcher <timothy@apple.com>
+
+ Add Mail on Tiger and Leopard to the list of applications that need the WebView init thread workaround.
+
+ <rdar://problem/6929524> Console shows WebKit Threading Violations from Mail
+
+ Reviewed by Anders Carlsson.
+
+ * WebView/WebView.mm:
+ (clientNeedsWebViewInitThreadWorkaround): Return true for com.apple.Mail.
+
+2009-06-22 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ - speculative fix for <rdar://problem/6889082>
+ Crash at -[WebHTMLView(WebPrivate) _updateMouseoverWithEvent:]
+
+ The crash seems to happen because lastHitView points to a deleted
+ object. Since -close calls -_clearLastHitViewIfSelf, I speculate that
+ lastHitView has been set to an already-closed view.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView hitTest:]): Return nil if the view is closed.
+
+2009-06-22 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by John Sullivan.
+
+ <rdar://problem/6956606> REGRESSION (S4Beta -> Final): After the password is input,
+ Japanese can't be input.
+
+ * WebView/WebHTMLView.mm: (-[WebHTMLView _updateSelectionForInputManager]): Removed an
+ unnecessary check - the function has an early return for null frame.
+
+2009-06-22 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ - fix <rdar://problem/6990938> REGRESSION (r42787): After showing and
+ hiding the Find banner, the WebHTMLView's height is not restored
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView setFrameSize:]): Mark the FrameView for layout when the
+ WebFrameView's size changes.
+ * WebView/WebView.mm:
+ (-[WebView setFrameSize:]): Left the resize logic here, but only for
+ the single view model.
+
+2009-06-20 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6964221> Need more processing of pluginspage.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin): Check protocolInHTTPFamily.
+
+2009-06-18 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26199
+
+ Added preference to enable the XSSAuditor.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences isXSSAuditorEnabled]):
+ (-[WebPreferences setXSSAuditorEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-06-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6926859>
+ NPN_ConvertPoint doesn't give the right value when converting to/from NPCoordinateSpaceFlippedScreen
+
+ When inverting Y, use the height of the first screen instead of the screen the window is on.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::windowFrameChanged):
+ (WebKit::NetscapePluginInstanceProxy::mouseEvent):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]):
+
+2009-06-16 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ <rdar://problem/6976766> Control-click on pages with accelerated compositing
+ content does not work.
+
+ Part deux. #ifdef the use of _private->layerHostingView with
+ USE(ACCELERATED_COMPOSITING)
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView hitTest:]):
+
+2009-06-16 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ <rdar://problem/6976766> Control-click on pages with accelerated compositing
+ content does not work.
+
+ Remove the WebLayerHostingView subclass of NSView, with its attempts to
+ forward events to the WebHTMLView, and just fix -[WebHTMLView hitTest:]
+ to ignore the layerHostingView.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView hitTest:]):
+ (-[WebHTMLView attachRootLayer:]):
+
+2009-06-15 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ <rdar://problem/6974857>
+
+ Define ENABLE_3D_RENDERING when building on 10.6, and move ENABLE_3D_RENDERING
+ switch from config.h to wtf/Platform.h.
+
+ * Configurations/FeatureDefines.xcconfig:
+ * WebKitPrefix.h:
+
+2009-06-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6967569>
+ CrashTracer: 15 crashes in Safari at com.apple.WebKit • WebKit::NetscapePluginHostManager::didCreateWindow + 85
+
+ Make sure to remove the entry from the plug-in host map so we won't end up with an entry that has a null value.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::hostForPackage):
+
+2009-06-15 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ - make the source code font in the Web Inspector match Mac defaults
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController init]): Set the default monospace font
+ to 11px Menlo, except on Leopard and Tiger where it is 10px Monaco.
+
+2009-06-09 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by Eric Seidel. Landed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26281
+
+ REGRESSION: Copying from TextEdit/OmniGraffle and pasting into editable
+ region loses images
+
+ Prefer RTFD (RTF with inline images) over RTF. In
+ http://trac.webkit.org/changeset/19745 I accidently reversed their
+ order.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
+
+2009-06-13 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24492
+
+ Move registerURLSchemeAsLocal from FrameLoader to SecurityOrigin
+
+ * WebView/WebView.mm:
+ (+[WebView registerURLSchemeAsLocal:]):
+
+2009-06-12 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ * ChangeLog-2007-10-14: Change pseudonym "Don Gibson" to me (was used while Google Chrome was not public); update my email address.
+
+2009-06-08 Dan Bernstein <mitz@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ - gave Objective-C++ files the .mm extension
+
+ * Carbon/HIWebView.m: Removed.
+ * Carbon/HIWebView.mm: Copied from WebKit/mac/Carbon/HIWebView.m.
+ * Misc/WebKitNSStringExtras.m: Removed.
+ * Misc/WebKitNSStringExtras.mm: Copied from WebKit/mac/Misc/WebKitNSStringExtras.m.
+ * Misc/WebStringTruncator.m: Removed.
+ * Misc/WebStringTruncator.mm: Copied from WebKit/mac/Misc/WebStringTruncator.m.
+ * WebInspector/WebNodeHighlight.m: Removed.
+ * WebInspector/WebNodeHighlight.mm: Copied from WebKit/mac/WebInspector/WebNodeHighlight.m.
+ * WebInspector/WebNodeHighlightView.m: Removed.
+ * WebInspector/WebNodeHighlightView.mm: Copied from WebKit/mac/WebInspector/WebNodeHighlightView.m.
+ * WebView/WebDynamicScrollBarsView.m: Removed.
+ * WebView/WebDynamicScrollBarsView.mm: Copied from WebKit/mac/WebView/WebDynamicScrollBarsView.m.
+
+2009-06-05 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26220
+
+ Update a WebView's active state when it moves to a different window.
+
+ * WebView/WebView.mm:
+ (-[WebView viewDidMoveToWindow]):
+
+2009-06-04 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Alice Liu.
+
+ Move WebView internal data into WebViewData.h/mm.
+
+ * WebView/WebDelegateImplementationCaching.mm:
+ * WebView/WebView.mm:
+ * WebView/WebViewData.h: Copied from mac/WebView/WebViewInternal.h.
+ * WebView/WebViewData.mm: Copied from mac/WebView/WebViewInternal.mm.
+ * WebView/WebViewInternal.h:
+ * WebView/WebViewInternal.mm: Removed.
+
+2009-06-04 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove _updateFocusedStateForFrame, since it's actually not even necessary now that I made
+ setFocusedFrame get called explicitly from become/ResignFirstResponder. setFocusedFrame does
+ the work of focusing the selection already.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView becomeFirstResponder]):
+ (-[WebHTMLView resignFirstResponder]):
+ * WebView/WebView.mm:
+ * WebView/WebViewInternal.h:
+
+2009-06-04 Dan Bernstein <mitz@apple.com>
+
+ - build fix
+
+ * WebView/WebViewInternal.mm:
+
+2009-06-03 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Reworking of focus and active state updating for WebHTMLViews so that it actually works instead of reporting wrong answers.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage):
+ WebHTMLViews become first responders before they are able to reach their Frames/Pages. This happens because the NSClipView
+ becomes first responder when the WebHTMLView gets destroyed, and then we transfer the responder state back to the new WebHTMLView
+ when it is first connected. Once we have transitioned to a new page and have the Frame/Page available, go ahead and explicitly
+ focus the frame in WebCore and update our focused state. This change allows us to remove the updateFocusedActive timer and the
+ code from viewDidMoveToWindow.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView close]):
+ (-[WebHTMLView addWindowObservers]):
+ (-[WebHTMLView viewWillMoveToWindow:]):
+ (-[WebHTMLView viewDidMoveToWindow]):
+ (-[WebHTMLView _removeWindowObservers]):
+ Remove all the updateFocusedActiveState timer code, since it no longer exists.
+
+ (-[WebHTMLView windowDidBecomeKey:]):
+ (-[WebHTMLView windowDidResignKey:]):
+ Active state updating is no longer done by WebHTMLViews. It is handled by the WebView instead.
+
+ (-[WebHTMLView becomeFirstResponder]):
+ (-[WebHTMLView resignFirstResponder]):
+ Reworking of WebHTMLView's code for gaining/losing responder status. No longer update active state here, since the active state
+ can never change just because of responder changes. Make sure that the focused frame gets updated properly (and most importantly
+ actually cleared when a WebHTMLView resigns responder status).
+
+ * WebView/WebHTMLViewInternal.h:
+ * WebView/WebHTMLViewPrivate.h:
+ State updating for focused and active states has been made independent.
+
+ * WebView/WebView.mm:
+ (-[WebView _updateActiveState]):
+ WebView now handles updating of active state in _updateActiveState. It is now purely based off whether the window is key and nothing
+ else.
+
+ (-[WebView addWindowObserversForWindow:]):
+ (-[WebView removeWindowObservers]):
+ Start listening for the window becoming/losing key even in the usesDocumentViews case.
+
+ (-[WebView _updateFocusedStateForFrame:]):
+ Focused state updating is split into its own method now and called when WebHTMLViews gain and lose responder status.
+
+ (-[WebView _windowDidBecomeKey:]):
+ (-[WebView _windowDidResignKey:]):
+ Make sure to call _updateActiveState as the window gains/loses key.
+
+ (-[WebView _windowWillOrderOnScreen:]):
+ Run this code now that WebHTMLView no longer does it.
+
+ * WebView/WebViewInternal.h:
+ * WebView/WebViewPrivate.h:
+ Updating for the split of focused and active state updating into separate methods.
+
+2009-06-04 Mark Rowe <mrowe@apple.com>
+
+ Speculative Tiger build fix.
+
+ * WebView/WebDelegateImplementationCaching.h:
+
+2009-06-03 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Move delegate implementation caching logic into its own files.
+
+ * WebView/WebDelegateImplementationCaching.h: Copied from mac/WebView/WebViewInternal.h.
+ * WebView/WebDelegateImplementationCaching.mm: Copied from mac/WebView/WebView.mm.
+ (WebViewGetResourceLoadDelegateImplementations):
+ (WebViewGetFrameLoadDelegateImplementations):
+ (WebViewGetScriptDebugDelegateImplementations):
+ * WebView/WebView.mm:
+ * WebView/WebViewInternal.h:
+
+2009-06-03 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Move WebViewPrivate structure to WebViewInternal.h/mm.
+
+ * WebView/WebView.mm:
+ * WebView/WebViewInternal.h:
+ * WebView/WebViewInternal.mm: Added.
+ (+[WebViewPrivate initialize]):
+ (-[WebViewPrivate init]):
+ (-[WebViewPrivate dealloc]):
+ (-[WebViewPrivate finalize]):
+
+2009-06-03 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Small cleanup in WebView.
+ - Move global data initialization to WebView's initialization method.
+ - Move _clearViewUpdateRunLoopObserver from WebViewPrivate to WebView (FileInternal)
+
+ * WebView/WebView.mm:
+ (-[WebViewPrivate init]): Remove global initializers.
+ (-[WebViewPrivate dealloc]): Cleanup whitespace.
+ (-[WebViewPrivate finalize]): Ditto.
+ (-[WebView _close]): Call [self _clearViewUpdateRunLoopObserver] instead of
+ [_private _clearViewUpdateRunLoopObserver]
+ (+[WebView initialize]): Move global initializers here.
+ (-[WebView _clearViewUpdateRunLoopObserver]): Moved from WebViewPrivate.
+ (viewUpdateRunLoopObserverCallBack): Call [self _clearViewUpdateRunLoopObserver]
+ instead of [_private _clearViewUpdateRunLoopObserver]
+
+2009-06-03 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ - WebKit part of eliminating WebCoreTextRenderer
+
+ * Misc/WebKitNSStringExtras.m:
+ (webkit_CGCeiling): Added.
+ (-[NSString _web_drawAtPoint:font:textColor:]): Replaced the malloc()ed
+ string buffer with a Vector. Moved code from
+ WebCoreDrawTextAtPoint() to here.
+ (-[NSString _web_drawDoubledAtPoint:withTopColor:bottomColor:font:]):
+ (-[NSString _web_widthWithFont:]): Replaced the malloc()ed string buffer
+ with a Vector. Moved code from WebCoreTextFloatWidth() to here.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _addToStyle:fontA:fontB:]): Replaced call to
+ WebCoreFindFont() with use of
+ +[WebFontCache fontWithFamily:traits:weight:size:].
+ * WebView/WebView.mm:
+ (+[WebView _setAlwaysUsesComplexTextCodePath:]): Changed to call
+ Font::setCodePath() directly.
+ (+[WebView _setShouldUseFontSmoothing:]): Changed to call
+ Font::setShouldUseSmoothing().
+ (+[WebView _shouldUseFontSmoothing]): Changed to call
+ Font::shouldUseSmoothing().
+
+2009-06-03 Dan Bernstein <mitz@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ - remove a private method that was used only by Safari 3.0.
+
+ * WebView/WebView.mm: Removed +_minimumRequiredSafariBuildNumber.
+ * WebView/WebViewPrivate.h: Ditto.
+
+2009-06-03 Dan Bernstein <mitz@apple.com>
+
+ - build fix
+
+ * WebView/WebHTMLView.mm:
+
+2009-06-03 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ - build fix
+
+ * WebView/WebHTMLView.mm:
+ * WebView/WebView.mm:
+
+2009-06-02 Darin Adler <darin@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Bug 26112: viewless WebKit -- make events work
+ https://bugs.webkit.org/show_bug.cgi?id=26112
+
+ One change here is to make the -[WebFrame frameView] function assert if ever called
+ in viewless mode, and fix many callers that would trip that assertion.
+
+ A major change is to put some methods and data in WebView that are currently in
+ WebHTMLView, used only in viewless mode. A next step will be to use the WebView
+ methods whenever possible, even when not in the viewless mode.
+
+ Also fix FrameView to do normal reference counting instead of a strange model with
+ an explicit deref near creation time.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::scrollRectIntoView): Add code to start in the appropriate place
+ when dealing with viewless mode. This gets triggered when visiting the Google home page.
+ (WebChromeClient::setToolTip): Changed to call WebView instead of WebHTMLView.
+ (WebChromeClient::print): Changed to use a new selector that doesn't require a
+ WebFrameView if present. Also don't even try to use the old selector in viewless mode.
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::respondToChangedSelection): Changed to call WebView instead of WebHTMLView.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage): Added more code paths for
+ viewless mode to skip things we can't do in that mode, with appropriate FIXME.
+ Use Frame::create and RefPtr and eliminate the strange reference counting of FrameView.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _receivedData:]): Added a _usesDocumentViews guard around code that's
+ specific to document views.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]): Added a _usesDocumentViews
+ guard around code that's specific to document views.
+ (-[WebFrame _hasSelection]): Added an implementation for viewless mode.
+ (-[WebFrame _clearSelection]): Assert we're not in viewless mode; it doesn't really
+ make sense to clear the selection in only one frame in viewless mode. Later we can
+ decide what to do.
+ (-[WebFrame _dragSourceMovedTo:]): Assert we're not in viewless mode; the dragging
+ code for viewless mode shouldn't have to involve the WebFrame object at all.
+ (-[WebFrame _dragSourceEndedAt:operation:]): Ditto.
+ (-[WebFrame frameView]): Assert we're not in viewless mode. This assertion fires
+ often, but it's a great pointer to code that needs to be changed.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView hitTest:]): Tweaked a comment.
+ (-[WebHTMLView _updateMouseoverWithEvent:]): Fixed a bug where the fake event for
+ moving the mouse out of the old view ended up overwriting the event for moving
+ the mouse within the new view.
+ (-[WebHTMLView mouseDown:]): Got rid of explicit conversion of event to
+ PlatformMouseEvent in call to sendContextMenuEvent; that's no longer possible
+ without passing another argument, and it's now handled in EventHandler.
+
+ * WebView/WebTextCompletionController.h: Copied from WebKit/mac/WebView/WebHTMLView.mm.
+ Removed everything except for the WebTextCompletionController class.
+ * WebView/WebTextCompletionController.mm: Copied from WebKit/mac/WebView/WebHTMLView.mm.
+ Ditto.
+
+ * WebView/WebUIDelegatePrivate.h: Added webView:printFrame: method.
+
+ * WebView/WebView.mm: Moved includes and fields in from WebHTMLView.
+ (-[WebView _usesDocumentViews]): Updated for name change from useDocumentViews
+ to usesDocumentViews.
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Ditto.
+ (-[WebView drawSingleRect:]): Ditto.
+ (-[WebView isFlipped]): Ditto.
+ (-[WebView setFrameSize:]): Ditto. Also changed to use _mainCoreFrame method.
+ (-[WebView _viewWillDrawInternal]): Ditto.
+ (-[WebView viewWillDraw]): Ditto.
+ (-[WebView drawRect:]): Ditto.
+ (-[WebView _close]): Added code to nil out the lastMouseoverView global.
+ (-[WebView _dashboardRegions]): Use _mainCoreFrame.
+ (-[WebView setProhibitsMainFrameScrolling:]): Ditto.
+ (-[WebView _setInViewSourceMode:]): Ditto.
+ (-[WebView _inViewSourceMode]): Ditto.
+ (-[WebView _attachScriptDebuggerToAllFrames]): Ditto.
+ (-[WebView _detachScriptDebuggerFromAllFrames]): Ditto.
+ (-[WebView textIteratorForRect:]): Ditto.
+ (-[WebView _executeCoreCommandByName:value:]): Ditto.
+ (-[WebView addWindowObserversForWindow:]): Ditto.
+ (-[WebView removeWindowObservers]): Ditto.
+ (-[WebView _updateFocusedAndActiveState]): Ditto.
+ (-[WebView _updateFocusedAndActiveStateForFrame:]): Turned into a class method.
+ Added code to handle the viewless case without calling frameView.
+ (-[WebView _windowDidBecomeKey:]): Updated for name change from useDocumentViews
+ to usesDocumentViews.
+ (-[WebView _windowDidResignKey:]): Ditto.
+ (-[WebView _windowWillOrderOnScreen:]): Ditto.
+ (-[WebView mainFrame]): Tweaked.
+ (-[WebView selectedFrame]): Added a conditional to avoid trying to get at the
+ frame view in viewless case.
+ (-[WebView _setZoomMultiplier:isTextOnly:]): Use _mainCoreFrame.
+ (-[WebView setCustomTextEncodingName:]): Ditto.
+ (-[WebView windowScriptObject]): Ditto.
+ (-[WebView setHostWindow:]): Ditto. Also put some code that's needed only for
+ document views inside _private->usesDocumentViews.
+ (-[WebView _hitTest:dragTypes:]): Tweaked.
+ (-[WebView acceptsFirstResponder]): Added case for viewless mode along with a
+ FIXME, since it's not complete.
+ (-[WebView becomeFirstResponder]): Ditto.
+ (-[WebView _webcore_effectiveFirstResponder]): Put the body of this inside
+ a usesDocumentView check, because we don't need the first responder forwarding
+ in viewless mode.
+ (-[WebView setNextKeyView:]): Ditto.
+ (-[WebView mouseDown:]): Added. Copied from WebHTMLView. FIXME in here suggests
+ that we make WebHTMLView share this one soon, which I think is practical.
+ (-[WebView mouseUp:]): Ditto.
+ (-[WebView setHoverFeedbackSuspended:]): Added a code path for viewless mode.
+ (-[WebView shouldClose]): Use _mainCoreFrame.
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto.
+ (-[WebView setEditable:]): Ditto.
+ (-[WebView _frameViewAtWindowPoint:]): Added an assertion that we're not in
+ viewless mode since this method makes no sense in that mode.
+ (-[WebView _setMouseDownEvent:]): Added. Copied from WebHTMLView. I plan to
+ eliminate the one in WebHTMLView soon.
+ (-[WebView _cancelUpdateMouseoverTimer]): Ditto.
+ (-[WebView _stopAutoscrollTimer]): Ditto.
+ (+[WebView _updateMouseoverWithEvent:]): Ditto.
+ (-[WebView _updateMouseoverWithFakeEvent]): Ditto.
+ (-[WebView _setToolTip:]): Added. Calls through to the WebHTMLView version.
+ (-[WebView _selectionChanged]): Ditto.
+ (-[WebView _mainCoreFrame]): Added.
+ (-[WebView _needsOneShotDrawingSynchronization]): Moved into the WebInternal
+ category.
+ (-[WebView _setNeedsOneShotDrawingSynchronization:]): Ditto.
+ (-[WebView _startedAcceleratedCompositingForFrame:]): Ditto.
+ (-[WebView _stoppedAcceleratedCompositingForFrame:]): Ditto.
+ (viewUpdateRunLoopObserverCallBack): Ditto.
+ (-[WebView _scheduleViewUpdate]): Ditto.
+
+ * WebView/WebViewInternal.h: Made most of the file not compile at all when
+ included from non-C++ source files, elminating some excess declarations and
+ typedefs. Moved more methods into the real internal category. Added new
+ methods _setMouseDownEvent, _cancelUpdateMouseoverTimer, _stopAutoscrollTimer,
+ _updateMouseoverWithFakeEvent, _selectionChanged, and _setToolTip:.
+
+2009-06-02 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Remove workaround that was added to address <rdar://problem/5488678> as it no longer affects our Tiger builds.
+
+ * Configurations/Base.xcconfig:
+
+2009-06-01 Darin Adler <darin@apple.com>
+
+ * WebView/WebTextCompletionController.mm: Fix Tiger build by adding import
+ of WebTypesInternal.h.
+
+2009-06-01 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Bug 26113: break WebTextCompletionController out into its own source file
+ https://bugs.webkit.org/show_bug.cgi?id=26113
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLViewPrivate dealloc]): Updated for new name.
+ (-[WebHTMLViewPrivate clear]): Ditto.
+ (-[WebHTMLView _frameOrBoundsChanged]): Ditto.
+ (-[WebHTMLView menuForEvent:]): Ditto.
+ (-[WebHTMLView windowDidResignKey:]): Ditto.
+ (-[WebHTMLView windowWillClose:]): Ditto.
+ (-[WebHTMLView mouseDown:]): Ditto.
+ (-[WebHTMLView resignFirstResponder]): Ditto.
+ (-[WebHTMLView keyDown:]): Ditto.
+ (-[WebHTMLView complete:]): Ditto. Also pass WebView to init method.
+ (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]): Ditto.
+
+ * WebView/WebTextCompletionController.h: Copied from mac/WebView/WebHTMLView.mm.
+ * WebView/WebTextCompletionController.mm: Copied from mac/WebView/WebHTMLView.mm.
+ Changed initializer to pass in a spearate WebView and WebHTMLView, to smooth the
+ way for handling viewless mode properly in the future.
+
+2009-05-30 David Kilzer <ddkilzer@apple.com>
+
+ Add JSLock to -[WebScriptCallFrame scopeChain]
+
+ Reviewed by Darin Adler.
+
+ In Debug builds of WebKit, Dashcode launching MobileSafari could
+ cause the ASSERT(JSLock::lockCount() > 0) assertion to fire in
+ JSC::Heap::heapAllocate() because the JSLock wasn't taken.
+
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame scopeChain]): Take JSLock before calling
+ into JavaScriptCore.
+
+2009-05-28 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Dan Bernstein.
+
+ Build fix. Move off a deprecated NSFileManager method.
+
+ * Misc/WebNSFileManagerExtras.h:
+ * Misc/WebNSFileManagerExtras.m:
+ (-[NSFileManager destinationOfSymbolicLinkAtPath:error:]): Implement a new-in-Leopard method for Tiger to use.
+ (-[NSFileManager attributesOfItemAtPath:error:]): Ditto.
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage _initWithPath:]): Use the new non-deprecated methods.
+
+2009-05-28 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Added new build flag --filters. More details in WebCore/ChangeLog.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-05-27 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26009
+ <rdar://problem/6925656> REGRESSION (r43973): Problems While Working With OpenVanilla
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _updateSelectionForInputManager]): Don't call updateWindows if the selection
+ is None. This routinely happens during editing, and it doesn't mean that we left an editable
+ area (in which case the selection changes to a non-editable one).
+
+2009-05-26 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Brady Eidson.
+
+ Fix for <rdar://problem/6916371>
+ iWeb 'Announce' button does nothing after publishing to MobileMe
+
+ Add linked-on-or-after check to allow older WebKit apps to use the
+ old behavior of sniffing everything (including file: urls)
+
+ * Misc/WebKitVersionChecks.h:
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+
+2009-05-26 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Ada Chan and Oliver Hunt.
+
+ Remove WebView observers in during fast teardown.
+ <rdar://problem/6922619> REGRESSION (Tiger-only?): After restoring windows from the previous session, a crash occurs while attempting to quit Safari
+
+ * WebView/WebView.mm:
+ (-[WebView _closeWithFastTeardown]):
+
+2009-05-26 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6901751>
+ REGRESSION (r35515): Tiger crash painting the selection on registration page of car2go.com
+
+ Remove WKCGContextIsSafeToClip.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+
+2009-05-26 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - fix <rdar://problem/6922371> REGRESSION (r43973): Can't type first
+ character with an umlaut, circumflex, or accent in Mail or in a wiki
+
+ * WebView/WebHTMLView.mm:
+ (isTextInput): Moved here.
+ (isInPasswordField): Moved here.
+ (-[WebHTMLView becomeFirstResponder]): Update the exposeInputContext
+ flag and let NSApplication update the input manager with the new input
+ context if necessary.
+ (-[WebHTMLView _updateSelectionForInputManager]): Changed to use the
+ NSApp global instead of +[NSApplication sharedApplication].
+
+2009-05-26 Mark Rowe <mrowe@apple.com>
+
+ Fix the Tiger build.
+
+ * Misc/WebNSObjectExtras.mm:
+ (-[NSInvocation _webkit_invokeAndHandleException:]): Rename the local variable so that
+ it doesn't conflict with a member variable on Tiger.
+
+2009-05-26 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ <rdar://problem/6921835> REGRESSION (r44115): Crash in Leopard Mail viewing message
+
+ Fix case where we autorelease an object on the main thread that we are returning
+ to another thread when using our _webkit_invokeOnMainThread method.
+
+ * Misc/WebNSObjectExtras.mm:
+ (returnTypeIsObject): Added.
+ (-[WebMainThreadInvoker forwardInvocation:]): Autorelease the object on the calling
+ thread, balancing a retain done on the main thread.
+ (-[NSInvocation _webkit_invokeAndHandleException:]): Retain the object on the main
+ thread.
+
+2009-05-26 David Hyatt <hyatt@apple.com>
+
+ Back out the workaround for Mail crashing. Darin is working on the real fix.
+
+ * Misc/WebNSObjectExtras.mm:
+ (-[WebMainThreadInvoker forwardInvocation:]):
+
+2009-05-26 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=25969.
+
+ Stop using notifications for boundsChanged, since the notifications are being sent too late.
+ Since subviews get resized before parents do, the notification comes in telling the WebHTMLView
+ that its size has changed *before* we've done setNeedsLayout in the WebView size change callback.
+
+ Become more like the Windows platform and just do the bounds changed immediately as our size is
+ being altered by subclassing setFrameSize in WebView.
+
+ Also patch WebDynamicScrollbarsView to detect the case where neither axis is really spilling out
+ past the viewport, so that in shrinking situations we figure out that we don't need scrollbars
+ any more.
+
+ * WebView/WebDynamicScrollBarsView.m:
+ (-[WebDynamicScrollBarsView updateScrollers]):
+ * WebView/WebView.mm:
+ (-[WebView _boundsChangedToNewSize:]):
+ (-[WebView setFrameSize:]):
+ (-[WebView viewWillMoveToWindow:]):
+ (-[WebView viewDidMoveToWindow]):
+
+2009-05-25 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - WebKit side of <rdar://problem/6914001>.
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::didCreateWindow):
+ Iterate over all plug-in hosts. If one is in full-screen mode, make sure to activate the
+ WebKit app instead.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ (WebKit::NetscapePluginHostProxy::isMenuBarVisible):
+ Add getter.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCEvaluate):
+ Add allowPopups flag.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest):
+ (WebKit::NetscapePluginInstanceProxy::PluginRequest::allowPopups):
+ (WebKit::NetscapePluginInstanceProxy::loadURL):
+ (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript):
+ (WebKit::NetscapePluginInstanceProxy::loadRequest):
+ (WebKit::NetscapePluginInstanceProxy::evaluate):
+ Use "allowPopups" instead of "userGesture".
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ Add allowPopups argument to Evaluate.
+
+ * Plugins/Hosted/WebKitPluginHostTypes.h:
+ Use "allowPopups" instead of "userGesture".
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::createWindow):
+ Call didCreateWindow here.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchCreatePage):
+ Ditto.
+
+2009-05-25 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - Fix <rdar://problem/6915849>.
+
+ Release the placeholder window after -[NSApplication runModalForWindow] returns.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::beginModal):
+ (WebKit::NetscapePluginHostProxy::endModal):
+
+2009-05-24 Dan Bernstein <mitz@apple.com>
+
+ - revert an accidental change from r43964.
+
+ * WebView/WebView.mm:
+ (+[WebView _setShouldUseFontSmoothing:]):
+
+2009-05-24 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein and Tim Hatcher.
+
+ <rdar://problem/6913045> New console message spewed by automator CLI after installing JetstreamLeo40B21a
+
+ * Misc/WebNSObjectExtras.mm:
+ (-[WebMainThreadInvoker initWithTarget:]): Tweaked argument name.
+ (-[WebMainThreadInvoker forwardInvocation:]): Removed call to retainArguments.
+ This was unneeded and in the case of a newly created but not yet fully initialized
+ NSView object it caused the abovementioned bug.
+ (-[WebMainThreadInvoker handleException:]): Tweaked argument name. Added assertion.
+ (-[NSInvocation _webkit_invokeAndHandleException:]): Tweaked name of local variable
+ that holds the exception.
+
+2009-05-23 David Kilzer <ddkilzer@apple.com>
+
+ Part 2 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr
+
+ <https://bugs.webkit.org/show_bug.cgi?id=25495>
+
+ Reviewed by Oliver Hunt.
+
+ * History/WebHistory.mm:
+ (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): Return
+ 0 instead of an empty auto_ptr<>.
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem initFromDictionaryRepresentation:]): Use
+ OwnPtr<> instead of auto_ptr<> for stack variable.
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::createHTMLParserQuirks): Return a PassOwnPtr<>
+ instead of a raw HTMLParserQuirks pointer.
+
+2009-05-23 David Kilzer <ddkilzer@apple.com>
+
+ Part 1 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr
+
+ <https://bugs.webkit.org/show_bug.cgi?id=25495>
+
+ Reviewed by Oliver Hunt.
+
+ * ForwardingHeaders/wtf/OwnPtrCommon.h: Added.
+ * ForwardingHeaders/wtf/PassOwnPtr.h: Added.
+
+2009-05-22 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ - Fix <rdar://problem/6913765> REGRESSION (r42331-r42334): Extra scroll
+ bars appearing on Welcome panels of iLife '09 apps
+
+ * WebView/WebView.mm:
+ (needsUnwantedScrollBarWorkaround): Added. Checks if this is a panel
+ where scroll bars are unwanted. For safety, limited to only Apple applications.
+ (-[WebView viewDidMoveToWindow]): If the workaround is needed, disallow
+ scrolling the main frame. This prevents scroll bars from appearing.
+
+2009-05-22 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25955
+
+ Remove the policyBaseURL parameter from setCookie. This parameter is
+ redudant with the document parameter.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::setCookies):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView setVariable:forURL:value:length:]):
+
+2009-05-21 Darin Fisher <darin@chromium.org>
+
+ Fix-up coding style.
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::getAutoCorrectSuggestionForMisspelledWord):
+
+2009-05-20 Siddhartha Chattopadhyaya <sidchat@google.com>
+
+ Reviewed by Justin Garcia.
+
+ Add automatic spell correction support in WebKit
+
+ https://bugs.webkit.org/show_bug.cgi?id=24953
+
+ * WebCoreSupport/WebEditorClient.h:
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::getAutoCorrectSuggestionForMisspelledWord):
+
+2009-05-21 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6907542> REGRESSION (r43143): Hang in RenderLineBoxList::dirtyLinesFromChangedChild
+ when clicking link to load Flash animation (http://www.roambi.com)
+
+ * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::respondToChangedSelection):
+ Don't call -[NSApplication updateWindows] here, WebHTMLView can take care of this.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView inputContext]): Use a precomputed boolean stored in WebHTMLViewPrivate, as
+ calling isTextInput() is not always safe.
+ (-[WebHTMLView textStorage]): Ditto.
+ (-[WebHTMLView _updateSelectionForInputManager]): Update _private->exposeInputContext when
+ selection changes, and let AppKit update its cache if necessary.
+
+2009-05-21 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5579292> REGRESSION (2-3): "Default default" encoding for Korean changed
+ from Korean (Windows, DOS) to Korean (ISO 2022-KR), which breaks some sites
+
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]): Update the existing fix
+ for the changed result of CFStringConvertEncodingToIANACharSetName().
+
+2009-05-21 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6883758> REGRESSION (r43143): First character typed with input method does
+ not go into inline hole (seen with Chinese & Kotoeri on top Chinese website www.baidu.com)
+
+ * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::respondToChangedSelection):
+ Call -[NSApplication updateWindows] to make AppKit re-fetch the input context when selection
+ changes. Since we use SelectionController to check whether the view is editable, it is
+ important not to re-fetch the context too early, e.g. from a focus changed notification.
+
+2009-05-21 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Rename DragController::dragOperation() to sourceDragOperation() for clarity
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView draggingSourceOperationMaskForLocal:]):
+
+2009-05-21 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ - WebKit part of <rdar://problem/6901751> REGRESSION (r35515): Tiger
+ crash painting the selection on registration page of car2go.com
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Added CGContextIsSafeToClip.
+
+2009-05-20 Stephanie Lewis <slewis@apple.com>
+
+ Update the order files. <rdar://problem/6881750> Generate new order files.
+
+ * WebKit.order:
+
+2009-05-20 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6905336> REGRESSION: "Clear History" does not save empty history to disk
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate data]): If there are no entries, return an empty NSData instead of nil.
+
+2009-05-20 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler and Kevin Decker.
+
+ WebKit side of <rdar://problem/6895072>
+
+ Pass the localization as a launch property.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+
+2009-05-20 Dan Bernstein <mitz@apple.com>
+
+ - fix the build after r43918
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::setCursor):
+
+2009-05-20 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan.
+
+ <rdar://problem/4023899> Shift-Tab skips key views in toolbar in Safari, although Tab
+ iterates through them properly
+
+ * WebView/WebView.mm:
+ (-[WebView previousValidKeyView]): Work around a bug in -[NSView previousValidKeyView].
+
+2009-05-19 Timothy Hatcher <timothy@apple.com>
+
+ Add a new private API method that will dispatch pending loads that have been scheduled
+ because of recent DOM additions or style changes.
+
+ <rdar://problem/6889218> REGRESSION: Some iChat transcript resources are not
+ loaded because willSendRequest doesn't happen immediately
+
+ Reviewed by Antti Koivisto.
+
+ * WebView/WebView.mm:
+ (-[WebView _dispatchPendingLoadRequests]): Call Loader::servePendingRequests().
+ * WebView/WebViewPrivate.h: Added _dispatchPendingLoadRequests.
+
+2009-05-18 Sam Weinig <sam@webkit.org>
+
+ <rdar://problem/6899044> Can't see Apple ad on nytimes.com unless I spoof the user agent
+
+ Add user agent hack for pointroll.com.
+
+ Reviewed by Steve Falkenburg.
+
+ * WebView/WebView.mm:
+ (-[WebView WebCore::_userAgentForURL:WebCore::]):
+
+2009-05-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig and Dan Bernstein.
+
+ Fix <rdar://problem/6889644>
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+
+2009-05-16 Dan Bernstein <mitz@apple.com>
+
+ - revert an accidental change from r43802.
+
+ * WebInspector/WebInspector.mm:
+
+2009-05-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6895347> Mouse wheeling in the QuickTime plug-in (incorrectly) scrolls the page
+
+ Fix logic. The plug-in returns true if it handled the event.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView sendEvent:isDrawRect:]):
+
+2009-05-16 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ - fix <rdar://problem/6873305> Two distinct characters are not displayed
+ correctly with 2 of the font selections from the stickies widget
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _plainTextFromPasteboard:]): Return precomposed text.
+ This is consistent with
+ -_documentFragmentFromPasteboard:forType:inContext:subresources:.
+
+2009-05-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix <rdar://problem/6875398>.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ If we failed to instantiate the plug-in, call cleanup() so that any streams created by the plug-in from its
+ NPP_New callback are destroyed.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ Make cleanup() public.
+
+2009-05-15 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/6889823> hash table iterator used after hash table modified in
+ ProxyInstance::fieldNamed() when viewing movie trailer
+
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::methodsNamed): Move add call after the waitForReply call.
+ Anders says that by the time we return someone else might have done the same add
+ for us.
+ (WebKit::ProxyInstance::fieldNamed): Ditto.
+
+2009-05-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6892055>
+ Replace WKN_GetLocation with WKN_ResolveURL (WKN_GetLocation was confusing and did not take the base URL into account)
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCResolveURL):
+ New MIG callback.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::resolveURL):
+ Use FrameLoader::complete URL here.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ Add new MIG definition.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView resolvedURLStringForURL:target:]):
+ * Plugins/WebNetscapeContainerCheckPrivate.h:
+ * Plugins/WebNetscapeContainerCheckPrivate.mm:
+ (browserContainerCheckFuncs):
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView resolveURL:forTarget:]):
+ * Plugins/npapi.mm:
+ (WKN_ResolveURL):
+
+2009-05-15 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - fix <rdar://problem/6892052> WebTextIterator should not “emit
+ characters between all visible positions”
+
+ * WebView/WebTextIterator.mm:
+ (-[WebTextIterator initWithRange:]): Changed to construct a TextIterator
+ with emitCharactersBetweenAllVisiblePositions set to false.
+
+2009-05-15 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dave Kilzer.
+
+ Look for libWebKitSystemInterface.a in a more reasonable location.
+
+ * Configurations/DebugRelease.xcconfig:
+
+2009-05-14 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Fix for <rdar://problem/6886217> REGRESSION (S4 beta-ToT): Adium chat window contents no longer resize.
+
+ Technically this is a bug in Adium. It appears that Adium has subclassed the WebView and implemented
+ viewDidMoveToWindow in its subclass improperly. It doesn't call up to the base class WebView like it
+ should and so our boundsChanged notification never gets added.
+
+ Reduce the dependence on viewDidMoveToWindow by moving the registration of observers into
+ viewWillMoveToWindow instead.
+
+ * WebView/WebView.mm:
+ (-[WebView addSizeObserversForWindow:]):
+ (-[WebView removeWindowObservers]):
+ (-[WebView addWindowObserversForWindow:]):
+ (-[WebView viewWillMoveToWindow:]):
+ (-[WebView viewDidMoveToWindow]):
+ (-[WebView viewDidMoveToSuperview]):
+
+2009-05-14 David Levin <levin@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24704
+
+ Allow the local cache directory to be set using a defaults key.
+
+ * Misc/WebKitNSStringExtras.h:
+ * Misc/WebKitNSStringExtras.m:
+ (+[NSString _webkit_localCacheDirectoryWithBundleIdentifier:]):
+ * WebKit.exp:
+
+2009-05-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ <rdar://problem/6879999> Automator actions that use WebKit on a background thread fail when run outside of Automator
+
+ * WebView/WebView.mm:
+ (clientNeedsWebViewInitThreadWorkaround): Added. Contains new broader rule.
+ (needsWebViewInitThreadWorkaround): Changed to call clientNeedsWebViewInitThreadWorkaround.
+
+2009-05-14 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Bug 24049: Second right-click crashes safari when alert invoked
+ https://bugs.webkit.org/show_bug.cgi?id=24049
+ rdar://problem/6878977
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView rightMouseUp:]): Added a retain/autorelease of the event.
+ (-[WebHTMLView menuForEvent:]): Ditto. Also cleaned up the logic here and
+ eliminated some use of pointers that might be invalid after calling through
+ to WebCore.
+ (-[WebHTMLView scrollWheel:]): Ditto.
+ (-[WebHTMLView acceptsFirstMouse:]): Ditto.
+ (-[WebHTMLView shouldDelayWindowOrderingForEvent:]): Ditto.
+ (-[WebHTMLView mouseDown:]): Ditto.
+ (-[WebHTMLView mouseDragged:]): Ditto.
+ (-[WebHTMLView mouseUp:]): Ditto.
+ (-[WebHTMLView keyDown:]): Ditto.
+ (-[WebHTMLView keyUp:]): Ditto.
+ (-[WebHTMLView flagsChanged:]): Ditto.
+ (-[WebHTMLView performKeyEquivalent:]): Ditto.
+
+2009-05-14 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Darin Adler.
+
+ <rdar://problem/6681868> When building with Xcode 3.1.3 should be using gcc 4.2
+
+ The meaning of XCODE_VERSION_ACTUAL is more sensible in newer versions of Xcode.
+ Update our logic to select the compiler version to use the more appropriate XCODE_VERSION_MINOR
+ if the version of Xcode supports it, and fall back to XCODE_VERSION_ACTUAL if not.
+
+ * Configurations/Base.xcconfig:
+
+2009-05-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKit side of <rdar://problem/6884476>.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCGetLocation):
+ Forward this to the plug-in instance proxy.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::getLocation):
+ Ask the plug-in view for the location.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ Add MIG definition.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView locationStringForTarget:]):
+ Return the URL for a given frame.
+
+ * Plugins/WebNetscapeContainerCheckPrivate.h:
+ Bump version. Add new declaration to the vtable.
+
+ * Plugins/WebNetscapeContainerCheckPrivate.mm:
+ (browserContainerCheckFuncs):
+ Add new declaration to the vtable.
+
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView locationForTarget:]):
+ Call the base class method.
+
+ * Plugins/npapi.mm:
+ (WKN_GetLocation):
+ Forward this to the plug-in view.
+
+2009-05-13 Douglas R. Davidson <ddavidso@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6871587> Smart Copy/Paste setting should persist as continuous
+ spell checking setting does
+
+ * WebView/WebPreferenceKeysPrivate.h: Added WebSmartInsertDeleteEnabled.
+
+ * WebView/WebView.mm:
+ (-[WebViewPrivate init]): Initialize based on WebSmartInsertDeleteEnabled
+ default.
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ Removed code that initialized here.
+ (-[WebView setSmartInsertDeleteEnabled:]): Set default here was with
+ continuous spell checking setting.
+
+2009-05-13 Darin Adler <darin@apple.com>
+
+ Revert the parser arena change. It was a slowdown, not a speedup.
+ Better luck next time (I'll break it up into pieces).
+
+2009-05-13 Darin Adler <darin@apple.com>
+
+ Reviewed by Cameron Zwarich.
+
+ Bug 25674: syntax tree nodes should use arena allocation
+ https://bugs.webkit.org/show_bug.cgi?id=25674
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Updated includes.
+ New ones needed due to reducing includes of JSDOMBinding.h.
+ * WebView/WebScriptDebugger.mm: Ditto.
+
+2009-05-13 Douglas R. Davidson <ddavidso@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6879145>
+ Generate a contextual menu item allowing autocorrections to
+ easily be changed back. Refrain from re-correcting items
+ that have already been autocorrected once.
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory contextMenuItemTagChangeBack:]):
+ * WebView/WebUIDelegatePrivate.h:
+
+2009-05-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix <rdar://problem/6878105>.
+
+ When instantiating the QT plug-in under Dashboard, force "kiosk mode".
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
+
+2009-05-12 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - declare a forgotten method
+
+ * DOM/WebDOMOperationsPrivate.h: Declare -[DOMNode markupString] in the
+ WebDOMNodeOperationsPendingPublic category.
+
+2009-05-10 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6870383> Have to enter credentials twice when downloading from a protected page
+
+ * Misc/WebDownload.m: Removed.
+ * Misc/WebDownload.mm: Copied from WebKit/mac/Misc/WebDownload.m.
+ (-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]): Try to use
+ credentials from WebCore storage.
+
+2009-05-08 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Not reviewed. Fix clean builds, forgot to land name() -> formControlName() rename patch in WebKit. Only landed the WebCore side.
+
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation elementWithName:inForm:]):
+
+2009-05-08 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ - Fix <rdar://problem/6866712>.
+
+ Instead of just caching whether a plug-in object _has_ a field or method, also add an entry to the cache
+ if it _doesn't_ have a certain field or method. This way we have to make fewer calls to the plug-in host.
+
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::methodsNamed):
+ (WebKit::ProxyInstance::fieldNamed):
+
+2009-05-08 Douglas R. Davidson <ddavidso@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fixes for <rdar://problem/6852771>.
+ Disable text checking menu items if view is not editable.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
+ (-[WebHTMLView smartInsertDeleteEnabled]):
+ (-[WebHTMLView setSmartInsertDeleteEnabled:]):
+ (-[WebHTMLView toggleSmartInsertDelete:]):
+ * WebView/WebHTMLViewInternal.h:
+
+2009-05-08 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ <rdar://problem/6868773> NPN_GetAuthenticationInfo does not work with non-permanent credentials
+
+ * Plugins/WebBaseNetscapePluginView.mm: (WebKit::getAuthenticationInfo): Ask WebCore for
+ credentials first (but also ask NSURLCredentialStorage, because WebCore won't know about
+ permanent credentials).
+
+2009-05-05 Ben Murdoch <benm@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Add #if ENABLE(DATABASE) guards around database code so toggling ENABLE_DATABASE off does not break builds.
+ https://bugs.webkit.org/show_bug.cgi?id=24776
+
+ * Storage/WebDatabaseManager.mm:
+ * Storage/WebDatabaseManagerInternal.h:
+ * Storage/WebDatabaseManagerPrivate.h:
+ * Storage/WebDatabaseTrackerClient.h:
+ * Storage/WebDatabaseTrackerClient.mm:
+ * Storage/WebSecurityOrigin.mm:
+ (-[WebSecurityOrigin usage]):
+ (-[WebSecurityOrigin quota]):
+ (-[WebSecurityOrigin setQuota:]):
+ * Storage/WebSecurityOriginPrivate.h:
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+
+2009-05-04 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Fix <rdar://problem/6797644>.
+
+ Make sure to send a reply even when an instance proxy can't be found.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCEvaluate):
+ (WKPCInvoke):
+ (WKPCInvokeDefault):
+ (WKPCGetProperty):
+ (WKPCHasProperty):
+ (WKPCHasMethod):
+ (WKPCEnumerate):
+
+2009-05-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Bug 24924: remove Document.h include of Attr.h and HTMLCollection.h,
+ and NamedMappedAttrMap.h include of MappedAttribute.h
+ https://bugs.webkit.org/show_bug.cgi?id=24924
+
+ * WebView/WebFrame.mm: Added include of CSSMutableStyleDeclaration.h
+ and ScriptValue.h.
+
+2009-05-02 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Simplified null-ish JSValues.
+
+ Replaced calls to noValue() with calls to JSValue() (which is what
+ noValue() returned). Removed noValue().
+
+ Removed "JSValue()" initialiazers, since default construction happens...
+ by default.
+
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame evaluateWebScript:]):
+
+2009-05-02 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6741615> REGRESSION (r38629): Shortcut "Flag/Junk" in MobileMe does not work
+ when Kotoeri is used.
+
+ * WebView/WebHTMLView.mm: (-[WebHTMLView inputContext]): Return a nil input context when
+ focus is not in editable content.
+
+2009-05-01 Geoffrey Garen <ggaren@apple.com>
+
+ Rubber Stamped by Sam Weinig.
+
+ Renamed JSValuePtr => JSValue.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::evaluate):
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ (WebKit::NetscapePluginInstanceProxy::invokeDefault):
+ (WebKit::NetscapePluginInstanceProxy::construct):
+ (WebKit::NetscapePluginInstanceProxy::getProperty):
+ (WebKit::NetscapePluginInstanceProxy::setProperty):
+ (WebKit::NetscapePluginInstanceProxy::hasMethod):
+ (WebKit::NetscapePluginInstanceProxy::addValueToArray):
+ (WebKit::NetscapePluginInstanceProxy::marshalValue):
+ (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
+ (WebKit::NetscapePluginInstanceProxy::demarshalValue):
+ (WebKit::NetscapePluginInstanceProxy::demarshalValues):
+ * Plugins/Hosted/ProxyInstance.h:
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyField::valueFromInstance):
+ (WebKit::ProxyField::setValueToInstance):
+ (WebKit::ProxyInstance::invoke):
+ (WebKit::ProxyInstance::invokeMethod):
+ (WebKit::ProxyInstance::invokeDefaultMethod):
+ (WebKit::ProxyInstance::invokeConstruct):
+ (WebKit::ProxyInstance::defaultValue):
+ (WebKit::ProxyInstance::stringValue):
+ (WebKit::ProxyInstance::numberValue):
+ (WebKit::ProxyInstance::booleanValue):
+ (WebKit::ProxyInstance::valueOf):
+ (WebKit::ProxyInstance::fieldValue):
+ (WebKit::ProxyInstance::setFieldValue):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame _convertValueToObjcValue:]):
+ (-[WebScriptCallFrame exception]):
+ (-[WebScriptCallFrame evaluateWebScript:]):
+ * WebView/WebView.mm:
+ (aeDescFromJSValue):
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
+
+2009-05-01 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25347
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest):
+
+2009-04-30 David Kilzer <ddkilzer@apple.com>
+
+ Provide a mechanism to create a quirks delegate for HTMLParser
+
+ Reviewed by David Hyatt.
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::createHTMLParserQuirks): Added. The default
+ implementation of this factory method returns 0.
+
+2009-04-30 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25470
+ Extend the cover of ENABLE_JAVASCRIPT_DEBUGGER to profiler.
+
+ * Configurations/FeatureDefines.xcconfig: Added ENABLE_JAVASCRIPT_DEBUGGER define.
+
+2009-04-30 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlson.
+
+ <rdar://problem/6823049>
+
+ Fix an issue where some plug-ins would cause the application icon to constantly bounce
+ up and down in the Dock.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h: Change m_placeholderWindow ivar to be
+ a subclass of NSWindow, WebPlaceholderModalWindow.
+ * Plugins/Hosted/NetscapePluginHostProxy.mm: Added WebPlaceholderModalWindow NSWindow subclass.
+ (-[WebPlaceholderModalWindow _wantsUserAttention]): Prevent NSApp from calling requestUserAttention:
+ when the window is shown modally, even if the app is inactive.
+ (WebKit::NetscapePluginHostProxy::beginModal): NSWindow -> WebPlaceholderModalWindow.
+
+2009-04-30 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25342
+ Add MessageSource and MessageLevel parameters to the ChromeClient::addMessageToConsole.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::addMessageToConsole):
+
+2009-04-29 Mark Rowe <mrowe@apple.com>
+
+ More build fixing after r43037.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ (WebKit::NetscapePluginInstanceProxy::invokeDefault):
+ (WebKit::NetscapePluginInstanceProxy::construct):
+ (WebKit::NetscapePluginInstanceProxy::demarshalValues):
+
+2009-04-29 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ - WebKit part of <rdar://problem/6609509> Select All and then Delete
+ should put Mail editing back into the same state as a new message
+
+ * WebView/WebView.mm:
+ (-[WebView _selectionIsCaret]): Added.
+ (-[WebView _selectionIsAll]): Added. Returns whether the selection
+ encompasses the entire document.
+ * WebView/WebViewPrivate.h:
+
+2009-04-29 Douglas Davidson <ddavidso@apple.com>
+
+ Reviewed by Justin Garcia.
+
+ <rdar://problem/6836921> Mail exhibits issues with text checking, e.g. menu items not always validated correctly
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
+ (-[WebHTMLView orderFrontSubstitutionsPanel:]):
+ * WebView/WebView.mm:
+ (-[WebView validateUserInterfaceItemWithoutDelegate:]):
+
+2009-04-29 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix a bug in the bounds checking for setNeedsLayout dirtying when a WebView's size changes. The superview
+ of the WebView was being incorrectly checked instead of the WebView itself.
+
+ * WebView/WebView.mm:
+ (-[WebView _boundsChanged]):
+
+2009-04-29 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlson.
+
+ Allow WKN_CheckIfAllowedToLoadURL() to take an optional void* context parameter.
+
+ * Plugins/WebNetscapeContainerCheckContextInfo.h:
+ * Plugins/WebNetscapeContainerCheckContextInfo.mm:
+ (-[WebNetscapeContainerCheckContextInfo initWithCheckRequestID:callbackFunc:context:]):
+ (-[WebNetscapeContainerCheckContextInfo callback]):
+ (-[WebNetscapeContainerCheckContextInfo context]):
+ * Plugins/WebNetscapeContainerCheckPrivate.h:
+ * Plugins/WebNetscapeContainerCheckPrivate.mm:
+ (browserContainerCheckFuncs):
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:context:]):
+ (-[WebNetscapePluginView _containerCheckResult:contextInfo:]):
+ * Plugins/npapi.mm:
+ (WKN_CheckIfAllowedToLoadURL):
+
+2009-04-29 David Hyatt <hyatt@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Fix for <rdar://problem/6835573>, Find Banner turns invisible when WebView is resized. Make sure
+ not to resize the interior views of a WebView in response to its bounds changing when not using
+ viewless WebKit. Auto-resizing rules were already in place to handle size adjustments for us.
+ Just mark as needing layout and do nothing else.
+
+ This does mean viewless WebKit is broken with the Find Banner, and that will likely require a
+ Safari change (using a new API that will enable clients to define the edges of the content area as offsets
+ from the sides of the WebView).
+
+ * WebView/WebView.mm:
+ (-[WebView _boundsChanged]):
+
+2009-04-28 Geoffrey Garen <ggaren@apple.com>
+
+ Rubber stamped by Beth Dakin.
+
+ Removed scaffolding supporting dynamically converting between 32bit and
+ 64bit value representations.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::marshalValues):
+
+2009-04-28 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker and Darin Adler.
+
+ Fix <rdar://problem/6836132>.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCCheckIfAllowedToLoadURL):
+ Call the instance proxy.
+
+ (WKPCCancelCheckIfAllowedToLoadURL):
+ Ditto.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ Initialize the check ID counter.
+
+ (WebKit::NetscapePluginInstanceProxy::checkIfAllowedToLoadURL):
+ Create a WebPluginContainerCheck, add it to the map, and start it.
+
+ (WebKit::NetscapePluginInstanceProxy::cancelCheckIfAllowedToLoadURL):
+ Remove the check from the map.
+
+ (WebKit::NetscapePluginInstanceProxy::checkIfAllowedToLoadURLResult):
+ Call the WKPH MIG callback.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.h:
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
+ Call the instance proxy.
+
+ (-[WebHostedNetscapePluginView _containerCheckResult:contextInfo:]):
+ Ditto.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ Add MIG declarations.
+
+2009-04-28 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - fix <rdar://problem/6786360> Make PDF an insertable pasteboard type
+
+ * WebCoreSupport/WebPasteboardHelper.mm:
+ (WebPasteboardHelper::insertablePasteboardTypes):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
+ (+[WebHTMLView _insertablePasteboardTypes]):
+ (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
+
+2009-04-27 Douglas R. Davidson <ddavidso@apple.com>
+
+ Add the various switches and context menu items needed for
+ <rdar://problem/6724106> WebViews need to implement text checking
+ and adopt updatePanels in place of old SPI _updateGrammar.
+
+ Reviewed by Justin Garcia.
+
+ * WebCoreSupport/WebContextMenuClient.mm:
+ (fixMenusReceivedFromOldClients):
+ * WebCoreSupport/WebEditorClient.h:
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::uppercaseWord):
+ (WebEditorClient::lowercaseWord):
+ (WebEditorClient::capitalizeWord):
+ (WebEditorClient::showSubstitutionsPanel):
+ (WebEditorClient::substitutionsPanelIsShowing):
+ (WebEditorClient::toggleSmartInsertDelete):
+ (WebEditorClient::isAutomaticQuoteSubstitutionEnabled):
+ (WebEditorClient::toggleAutomaticQuoteSubstitution):
+ (WebEditorClient::isAutomaticLinkDetectionEnabled):
+ (WebEditorClient::toggleAutomaticLinkDetection):
+ (WebEditorClient::isAutomaticDashSubstitutionEnabled):
+ (WebEditorClient::toggleAutomaticDashSubstitution):
+ (WebEditorClient::isAutomaticTextReplacementEnabled):
+ (WebEditorClient::toggleAutomaticTextReplacement):
+ (WebEditorClient::isAutomaticSpellingCorrectionEnabled):
+ (WebEditorClient::toggleAutomaticSpellingCorrection):
+ (WebEditorClient::checkTextOfParagraph):
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory contextMenuItemTagShowColors]):
+ (-[WebViewFactory contextMenuItemTagCorrectSpellingAutomatically]):
+ (-[WebViewFactory contextMenuItemTagSubstitutionsMenu]):
+ (-[WebViewFactory contextMenuItemTagShowSubstitutions:]):
+ (-[WebViewFactory contextMenuItemTagSmartCopyPaste]):
+ (-[WebViewFactory contextMenuItemTagSmartQuotes]):
+ (-[WebViewFactory contextMenuItemTagSmartDashes]):
+ (-[WebViewFactory contextMenuItemTagSmartLinks]):
+ (-[WebViewFactory contextMenuItemTagTextReplacement]):
+ (-[WebViewFactory contextMenuItemTagTransformationsMenu]):
+ (-[WebViewFactory contextMenuItemTagMakeUpperCase]):
+ (-[WebViewFactory contextMenuItemTagMakeLowerCase]):
+ (-[WebViewFactory contextMenuItemTagCapitalize]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
+ (-[WebHTMLView isAutomaticQuoteSubstitutionEnabled]):
+ (-[WebHTMLView setAutomaticQuoteSubstitutionEnabled:]):
+ (-[WebHTMLView toggleAutomaticQuoteSubstitution:]):
+ (-[WebHTMLView isAutomaticLinkDetectionEnabled]):
+ (-[WebHTMLView setAutomaticLinkDetectionEnabled:]):
+ (-[WebHTMLView toggleAutomaticLinkDetection:]):
+ (-[WebHTMLView isAutomaticDashSubstitutionEnabled]):
+ (-[WebHTMLView setAutomaticDashSubstitutionEnabled:]):
+ (-[WebHTMLView toggleAutomaticDashSubstitution:]):
+ (-[WebHTMLView isAutomaticTextReplacementEnabled]):
+ (-[WebHTMLView setAutomaticTextReplacementEnabled:]):
+ (-[WebHTMLView toggleAutomaticTextReplacement:]):
+ (-[WebHTMLView isAutomaticSpellingCorrectionEnabled]):
+ (-[WebHTMLView setAutomaticSpellingCorrectionEnabled:]):
+ (-[WebHTMLView toggleAutomaticSpellingCorrection:]):
+ * WebView/WebHTMLViewInternal.h:
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebUIDelegatePrivate.h:
+ * WebView/WebView.mm:
+ (-[WebViewPrivate init]):
+ (-[WebView validateUserInterfaceItemWithoutDelegate:]):
+ (-[WebView setGrammarCheckingEnabled:]):
+ (-[WebView isAutomaticQuoteSubstitutionEnabled]):
+ (-[WebView isAutomaticLinkDetectionEnabled]):
+ (-[WebView isAutomaticDashSubstitutionEnabled]):
+ (-[WebView isAutomaticTextReplacementEnabled]):
+ (-[WebView isAutomaticSpellingCorrectionEnabled]):
+ (-[WebView setAutomaticQuoteSubstitutionEnabled:]):
+ (-[WebView toggleAutomaticQuoteSubstitution:]):
+ (-[WebView setAutomaticLinkDetectionEnabled:]):
+ (-[WebView toggleAutomaticLinkDetection:]):
+ (-[WebView setAutomaticDashSubstitutionEnabled:]):
+ (-[WebView toggleAutomaticDashSubstitution:]):
+ (-[WebView setAutomaticTextReplacementEnabled:]):
+ (-[WebView toggleAutomaticTextReplacement:]):
+ (-[WebView setAutomaticSpellingCorrectionEnabled:]):
+ (-[WebView toggleAutomaticSpellingCorrection:]):
+ * WebView/WebViewPrivate.h:
+
+2009-04-27 David Kilzer <ddkilzer@apple.com>
+
+ Consolidate runtime application checks for Apple Mail and Safari
+
+ Reviewed by Mark Rowe and Darin Adler.
+
+ * WebCoreSupport/WebContextMenuClient.mm:
+ (isAppleMail): Removed.
+ (fixMenusToSendToOldClients): Switched to use
+ applicationIsAppleMail().
+ * WebView/WebFrame.mm:
+ (-[WebFrame reload]): Switched to use applicationIsSafari().
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView menuForEvent:]): Ditto.
+ * WebView/WebResource.mm:
+ (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]):
+ Switched to use applicationIsAppleMail().
+ * WebView/WebView.mm:
+ (runningLeopardMail): Ditto.
+ (runningTigerMail): Ditto.
+ (-[WebView _needsKeyboardEventDisambiguationQuirks]): Switched
+ to use applicationIsSafari().
+
+2009-04-27 Kevin Decker <kdecker@apple.com>
+
+ Fix the Tiger build.
+
+ * Plugins/WebNetscapePluginView.mm: The base class of WebNetscapePluginView.mm, WebBaseNetscapePluginView, already implemented
+ the two methods below. But the Tiger compiler didn't know that.
+ (-[WebNetscapePluginView webView]):
+ (-[WebNetscapePluginView webFrame]):
+
+2009-04-27 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/6352982>
+
+ * Plugins/WebBaseNetscapePluginView.mm: Removed checkIfAllowedToLoadURL:frame:callbackFunc, cancelCheckIfAllowedToLoadURL, and
+ _webPluginContainerCancelCheckIfAllowedToLoadRequest from the base class. These methods now exist in the subclass WebNetscapePluginView.
+
+ Added WebNetscapeContainerCheckContextInfo, which is used as a "contextInfo" object in
+ -[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:]
+ * Plugins/WebNetscapeContainerCheckContextInfo.h: Added.
+ * Plugins/WebNetscapeContainerCheckContextInfo.mm: Added.
+ (-[WebNetscapeContainerCheckContextInfo initWithCheckRequestID:callbackFunc:]): Added desiginated initializer.
+ (-[WebNetscapeContainerCheckContextInfo checkRequestID]): Added. Returns the checkRequestID.
+ (-[WebNetscapeContainerCheckContextInfo callback]): Added. Returns the callback.
+
+ * Plugins/WebNetscapePluginView.h: Added two new ivars: _containerChecksInProgress and _currentContainerCheckRequestID.
+ * Plugins/WebNetscapePluginView.mm: #import both WebPluginContainerCheck.h and WebNetscapeContainerCheckContextInfo.h
+
+ (-[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:]): Added. This is the implementation of WKN_CheckIfAllowedToLoadURL.
+ Here, we increment the request ID and start the container check.
+
+ (-[WebNetscapePluginView _containerCheckResult:contextInfo:]): Added. This is a callback method for WebPluginContainerCheck.
+ It's where we actually call into the plug-in and provide the allow-or-deny result.
+
+ (-[WebNetscapePluginView cancelCheckIfAllowedToLoadURL:]): Added. This is the implementation of WKN_CancelCheckIfAllowedToLoadURL.
+ Here we lookup the check, cancel it, and remove it from _containerChecksInProgress.
+
+ (-[WebNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]): Added. WebPluginContainerCheck automatically calls
+ this method after invoking our _containerCheckResult: selector. It works this way because calling -[WebPluginContainerCheck cancel] allows
+ it to do it's teardown process.
+
+ (-[WebNetscapePluginView fini]): Release _containerChecksInProgress ivar.
+
+ * Plugins/WebPluginContainerCheck.h: Removed initWithRequest: method from header; no client was using this method directly.
+ * Plugins/WebPluginContainerCheck.mm:
+ (+[WebPluginContainerCheck checkWithRequest:target:resultObject:selector:controller:contextInfo:]): Added optional contextInfo parameter.
+ (-[WebPluginContainerCheck _continueWithPolicy:]): If there's a contextInfo object, pass it as a parameter to resultSelector.
+ (-[WebPluginContainerCheck cancel]): Release _contextInfo ivar.
+ (-[WebPluginContainerCheck contextInfo]): Added new method. Returns the contextInfo object, if one so exists.
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController _webPluginContainerCheckIfAllowedToLoadRequest:inFrame:resultObject:selector:]): Pass nil for contextInfo. WebKit-style
+ plug-ins do not need additional context information.
+
+2009-04-25 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig
+
+ Some *obvious* style cleanup in my last patch.
+
+ * History/WebBackForwardList.mm:
+ (bumperCarBackForwardHackNeeded):
+
+2009-04-25 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Oliver Hunt
+
+ <rdar://problem/6817607> BumperCar 2.2 crashes going back (invalid WebHistoryItem)
+
+ BumperCar was holding a pointer to a WebHistoryItem they never retain, then later
+ tried to go to it. In some cases it would be dealloc'ed first.
+ When WebHistoryItems were pure Objective-C they probably got away with this more often.
+ With the WebCore/Obj-C mixed WebHistoryItems it's more likely to crash.
+
+ * History/WebBackForwardList.mm:
+ (bumperCarBackForwardHackNeeded):
+ (-[WebBackForwardList backListWithLimit:]): If this is BumperCar, hang on to the
+ NSArray of WebHistoryItems until the next time this method is called.
+ (-[WebBackForwardList forwardListWithLimit:]): Ditto.
+
+ * Misc/WebKitVersionChecks.h: Added WEBKIT_FIRST_VERSION_WITHOUT_BUMPERCAR_BACK_FORWARD_QUIRK.
+
+2009-04-24 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix <rdar://problem/6761635>.
+
+ Make sure to keep an extra reference to the instance proxy in case the plug-in host crashes while
+ we're waiting for a reply.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::destroy):
+
+2009-04-24 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ Currently working on a bug where a WebHistoryItem was being used after being dealloc'ed.
+ I added this assertion to help catch the case as soon as it happens instead of random
+ issues downstream. Figured it's worth checking in by itself.
+
+ * History/WebHistoryItem.mm:
+ (core): ASSERT that the WebCore::HistoryItem inside this WebHistoryItem is supposed to have
+ this WebHistoryItem as a wrapper.
+
+2009-04-23 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for <rdar://problem/6333461> REGRESSION (r36864-r36869):
+ Dragging stocks widget scrollbar drags the whole widget
+
+ Look for our new WebCore scrollbars in the WebHTMLView and add
+ proper Dashboard regions for them.
+
+ * WebView/WebView.mm:
+ (-[WebView _addScrollerDashboardRegionsForFrameView:dashboardRegions:]):
+ (-[WebView _addScrollerDashboardRegions:from:]):
+
+2009-04-23 John Sullivan <sullivan@apple.com>
+
+ fixed <rdar://problem/6822479> Assertion failure after Reset Safari in new history-writing code
+
+ Reviewed by Oliver Hunt
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate data]):
+ Return nil immediately if there are no entries; this matches a recent Windows-platform fix.
+
+2009-04-23 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25313
+ Missing scroll bars in GMail.
+
+ * WebView/WebDynamicScrollBarsView.m:
+ (-[WebDynamicScrollBarsView updateScrollers]): Added check for the ScrollbarAlwaysOn
+ scroll mode.
+
+2009-04-23 Kevin Decker <kdecker@apple.com>
+
+ * Plugins/WebPluginContainerCheck.h: Fix the Tiger build.
+
+2009-04-23 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ Fix <rdar://problem/6821992>
+
+ Add a new m_inDestroy member variable. Set it to true when in destroy, and have all NPRuntime functions return false
+ when m_inDestroy is true.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ (WebKit::NetscapePluginInstanceProxy::destroy):
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ (WebKit::NetscapePluginInstanceProxy::invokeDefault):
+ (WebKit::NetscapePluginInstanceProxy::construct):
+ (WebKit::NetscapePluginInstanceProxy::getProperty):
+ (WebKit::NetscapePluginInstanceProxy::setProperty):
+ (WebKit::NetscapePluginInstanceProxy::removeProperty):
+ (WebKit::NetscapePluginInstanceProxy::hasProperty):
+ (WebKit::NetscapePluginInstanceProxy::hasMethod):
+ (WebKit::NetscapePluginInstanceProxy::enumerate):
+
+2009-04-23 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Maciej.
+
+ Fix for <rdar://problem/6789879> REGRESSION (42464): Hitting assertion when loading message in Mail + TOT WebKit
+
+ Make the Mac platform the same as all the other platforms. Instead of (incorrectly) marking a FrameView for layout
+ when its underlying document view changes, just mark the outermost frame view for layout when the WebView's size changes.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _frameOrBoundsChanged]):
+ (-[WebHTMLView addSuperviewObservers]):
+ * WebView/WebView.mm:
+ (-[WebView _boundsChanged]):
+ (-[WebView removeSizeObservers]):
+ (-[WebView addSizeObservers]):
+
+2009-04-23 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Second part of the fix for <rdar://problem/6352982>
+
+ * Plugins/WebBaseNetscapePluginView.h: Make this class conform to WebPluginContainerCheckController
+ * Plugins/WebBaseNetscapePluginView.mm: Likewise.
+ (-[WebBaseNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]): Added skeleton method.
+ * Plugins/WebPluginContainerCheck.h: Added protocol for <WebPluginContainerCheckController>
+ * Plugins/WebPluginContainerCheck.mm:
+ (-[WebPluginContainerCheck initWithRequest:target:resultObject:selector:controller:]):
+ * Plugins/WebPluginController.h: Make this class conform to WebPluginContainerCheckController
+
+2009-04-23 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ First part of <rdar://problem/6352982>
+
+ * Plugins/WebBaseNetscapePluginView.h: Imported #WebNetscapeContainerCheckPrivate.h; Added two new method:
+ checkIfAllowedToLoadURL:url:frame:callbackFunc: and cancelCheckIfAllowedToLoadURL:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:]): Added skeleton method, does nothing interesting
+ yet.
+ (-[WebBaseNetscapePluginView cancelCheckIfAllowedToLoadURL:]): Likewise.
+ * Plugins/WebNetscapeContainerCheckPrivate.h: Added.
+ * Plugins/WebNetscapeContainerCheckPrivate.mm: Added.
+ (browserContainerCheckFuncs): Added.
+ * Plugins/WebNetscapePluginView.h: Imported #WebNetscapeContainerCheckPrivate.h;
+ * Plugins/WebNetscapePluginView.mm: Imported #WebNetscapeContainerCheckPrivate.h; added WKN_CheckIfAllowedToLoadURL
+ and WKN_CancelCheckIfAllowedToLoadURL functions.
+ (-[WebNetscapePluginView getVariable:value:]): Return vtable for container check functions.
+ * Plugins/npapi.mm:
+ (WKN_CheckIfAllowedToLoadURL): Added new private function.
+ (WKN_CancelCheckIfAllowedToLoadURL): Ditto.
+
+2009-04-22 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves
+
+ Make mouseUP forward to the root view as we do for mouseMoves and mouseDragged:.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView mouseUp:]):
+
+2009-04-22 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves
+
+ Make mouseDragged forward to the root view as we do for mouseMoves.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView mouseDragged:]):
+
+2009-04-22 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix <rdar://problem/6792694>
+
+ When we're trying to instantiate a plug-in and the plug-in host has died, we need to invalidate the
+ instance so that it doesn't stick around and do bad things.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+
+2009-04-22 Sam Weinig <sam@webkit.org>
+
+ Rubber-stamped by Darin Adler.
+
+ Fix for <rdar://problem/6816957>
+ Turn off Geolocation by default
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-04-21 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ - Mac part of fixing for <rdar://problem/6755137> Action dictionary for
+ policy decision is missing keys when full-page zoom is used
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::actionDictionary): Use absoluteLocation() instead
+ of pageX() and pageY(), which are adjusted for zoom.
+
+2009-04-21 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler and Kevin Decker.
+
+ WebKit side of <rdar://problem/6781642>.
+
+ When we call resize with an actual changed size, block until the plug-in host is done.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::resize):
+ * Plugins/Hosted/WebHostedNetscapePluginView.h:
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView updateAndSetWindow]):
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2009-04-17 Timothy Hatcher <timothy@apple.com>
+
+ Change how sudden termination works with WebView teardown.
+
+ <rdar://problem/6383352&6383379&6383940>
+
+ Reviewed by Darin Adler.
+
+ * WebCoreSupport/WebChromeClient.h: Remove disableSuddenTermination/enableSuddenTermination.
+ * WebCoreSupport/WebChromeClient.mm: Ditto.
+ * WebView/WebFrame.mm:
+ (-[WebFrame _pendingFrameUnloadEventCount]): Ask the DOMWindow.
+ * WebView/WebView.mm:
+ (+[WebView canCloseAllWebViews]): Call DOMWindow::dispatchAllPendingBeforeUnloadEvents.
+ (+[WebView closeAllWebViews]): Call DOMWindow::dispatchAllPendingUnloadEvents and
+ call close on all the WebViews.
+ (-[WebView _closeWithFastTeardown]): Remove code for unload event dispatch.
+ (-[WebView _close]): Correct a comment.
+ (+[WebView _applicationWillTerminate]): Call closeAllWebViews.
+ * WebView/WebViewPrivate.h: Add canCloseAllWebViews and closeAllWebViews.
+
+2009-04-21 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Tiger crash fix: Put VM tags in their own header file, and fixed up the
+ #ifdefs so they're not used on Tiger.
+
+ * ForwardingHeaders/wtf/VMTags.h: Copied from ForwardingHeaders/wtf/HashTraits.h.
+
+2009-04-17 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6722845>
+ In the Cocoa event model, NPWindow's window field should be null
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCConvertPoint):
+ Get the instance proxy and call it's convertPoint function.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::convertPoint):
+ Call convertPoint on the plug-in view.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ Add PCConvertPoint.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ Add a declaration for convertFromX:andY:space:toX:andY:space:.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]):
+ Convert a point from one coordinate system to another.
+
+ * Plugins/WebNetscapePluginEventHandler.h:
+ * Plugins/WebNetscapePluginEventHandlerCarbon.h:
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ (WebNetscapePluginEventHandlerCarbon::drawRect):
+ * Plugins/WebNetscapePluginEventHandlerCocoa.h:
+ Add CGContextRef to drawRect.
+
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ (WebNetscapePluginEventHandlerCocoa::drawRect):
+ Set the passed in context.
+
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage _tryLoad]):
+ Add NPN_ConvertPoint to the browserFuncs vtable.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+ Only set the window for the Carbon event model.
+
+ (-[WebNetscapePluginView restorePortState:]):
+ It's OK for the window context to be null.
+
+ (-[WebNetscapePluginView sendDrawRectEvent:]):
+ Pass the CGContextRef to drawRect.
+
+ * Plugins/npapi.mm:
+ (NPN_ConvertPoint):
+ Call the plug-in view method.
+
+2009-04-20 Sam Weinig <sam@webkit.org>
+
+ Rubber-stamped by Tim Hatcher.
+
+ Add licenses for xcconfig files.
+
+ * Configurations/Base.xcconfig:
+ * Configurations/DebugRelease.xcconfig:
+ * Configurations/FeatureDefines.xcconfig:
+ * Configurations/Version.xcconfig:
+ * Configurations/WebKit.xcconfig:
+
+2009-04-20 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ WebKit side of <rdar://problem/6781302>
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::keyEvent):
+ Pass the event keyChar.
+
+ (WebKit::NetscapePluginInstanceProxy::syntheticKeyDownWithCommandModifier):
+ Ditto.
+
+ (WebKit::NetscapePluginInstanceProxy::flagsChanged):
+ Pass a 0 keyChar.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView flagsChanged:]):
+ Call NetscapePluginInstanceProxy::flagsChanged.
+
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ Add a keyChar argument.
+
+2009-04-19 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for <rdar://problem/6804809> REGRESSION: In Mail, Home and End do not scroll message
+
+ If no scrolling occurs, call tryToPerform on the next responder. Then our WebResponderChainSink
+ will correctly detect if no responders handle the selector.
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _scrollToBeginningOfDocument]):
+ (-[WebFrameView _scrollToEndOfDocument]):
+ (-[WebFrameView scrollToBeginningOfDocument:]):
+ (-[WebFrameView scrollToEndOfDocument:]):
+ (-[WebFrameView scrollLineUp:]):
+ (-[WebFrameView scrollLineDown:]):
+
+2009-04-19 David Kilzer <ddkilzer@apple.com>
+
+ Make FEATURE_DEFINES completely dynamic
+
+ Reviewed by Darin Adler.
+
+ Make FEATURE_DEFINES depend on individual ENABLE_FEATURE_NAME
+ variables for each feature, making it possible to remove all
+ knowledge of FEATURE_DEFINES from build-webkit.
+
+ * Configurations/FeatureDefines.xcconfig: Extract a variable
+ from FEATURE_DEFINES for each feature setting.
+
+2009-04-18 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ <rdar://problem/6781295> video.buffered and video.seekable are not
+ the same. video.buffered should return only what is buffered and
+ not what is seekable
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Add wkQTMovieMaxTimeSeekable.
+
+2009-04-18 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ <rdar://problem/6747241> work around QTKit no longer reaching
+ QTMovieLoadStateComplete
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Init the new WKSI exported symbol.
+
+2009-04-17 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6714488>
+ REGRESSION (Safari 3-4): Edit menu commands (cut/copy/paste/select all) do not work on Flash content
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::syntheticKeyDownWithCommandModifier):
+ Send a keyDown event to the plug-in host.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView sendModifierEventWithKeyCode:character:]):
+ Call the plug-in instance proxy.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView sendModifierEventWithKeyCode:character:]):
+ Add this. Subclasses are required to override it.
+
+ (-[WebBaseNetscapePluginView cut:]):
+ (-[WebBaseNetscapePluginView copy:]):
+ (-[WebBaseNetscapePluginView paste:]):
+ (-[WebBaseNetscapePluginView selectAll:]):
+ Call sendModifierEventWithKeyCode.
+
+ * Plugins/WebNetscapePluginEventHandler.h:
+ Add syntheticKeyDownWithCommandModifier.
+
+ * Plugins/WebNetscapePluginEventHandlerCarbon.h:
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ (WebNetscapePluginEventHandlerCarbon::syntheticKeyDownWithCommandModifier):
+ Send the synthetic event.
+
+ * Plugins/WebNetscapePluginEventHandlerCocoa.h:
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ (WebNetscapePluginEventHandlerCocoa::syntheticKeyDownWithCommandModifier):
+ Send the synthetic event.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView sendModifierEventWithKeyCode:character:]):
+ Call the event handler.
+
+2009-04-17 David Kilzer <ddkilzer@apple.com>
+
+ Simplify FEATURE_DEFINES definition
+
+ Reviewed by Darin Adler.
+
+ This moves FEATURE_DEFINES and its related ENABLE_FEATURE_NAME
+ variables to their own FeatureDefines.xcconfig file. It also
+ extracts a new ENABLE_GEOLOCATION variable so that
+ FEATURE_DEFINES only needs to be defined once.
+
+ * Configurations/FeatureDefines.xcconfig: Added.
+ * Configurations/WebKit.xcconfig: Removed definition of
+ ENABLE_SVG_DOM_OBJC_BINDINGS and FEATURE_DEFINES. Added include
+ of FeatureDefines.xcconfig.
+
+2009-04-17 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix crashes seen in regression tests with hosted plug-ins.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad): Check the stream for 0,
+ not the stream ID.
+
+2009-04-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Antti Koivisto.
+
+ Bug 25210: don't use ObjC methods to wrap/unwrap DOM objects with ObjC
+ https://bugs.webkit.org/show_bug.cgi?id=25210
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMNode markupString]): Use the core function instead of an Objective-C method.
+ (-[DOMNode _subresourceURLs]): Ditto.
+ (-[DOMDocument _focusableNodes]): Ditto.
+ (-[DOMRange webArchive]): Ditto.
+ (-[DOMRange markupString]): Ditto.
+
+ * Misc/WebElementDictionary.mm: Added now-needed include since the core and kit
+ functions now come from the internal headers from DOM bindings.
+ * Misc/WebNSPasteboardExtras.mm: Ditto.
+ * Plugins/WebNullPluginView.mm: Ditto.
+ * Plugins/WebPluginController.mm: Ditto.
+ * WebCoreSupport/WebChromeClient.mm: Ditto.
+ * WebCoreSupport/WebInspectorClient.mm: Ditto.
+ * WebCoreSupport/WebPasteboardHelper.mm: Ditto.
+ * WebView/WebHTMLView.mm: Ditto.
+
+ * WebCoreSupport/WebEditorClient.mm: Made kit function have internal linkage
+ since it's only used in this file. Someone had instead added a declaration to
+ suppress the warning you would otherwise get. Removed the core function.
+ (WebEditorClient::textFieldDidBeginEditing): Added correct type checking.
+ Previously the function would check only that something was an HTMLElement,
+ but then cast it to HTMLInputElement. Also call kit instead of old wrap method.
+ (WebEditorClient::textFieldDidEndEditing): Ditto.
+ (WebEditorClient::textDidChangeInTextField): Ditto.
+ (WebEditorClient::doTextFieldCommandFromEvent): Ditto.
+ (WebEditorClient::textWillBeDeletedInTextField): Ditto.
+ (WebEditorClient::textDidChangeInTextArea): Ditto, but for HTMLTextAreaElement.
+
+ * WebView/WebFrame.mm: Removed the core and kit functions here which are no longer
+ needed since they're automatically generated now.
+ (-[WebFrame _nodesFromList:]): Use kit.
+ (-[WebFrame _markupStringFromRange:nodes:]): Use core.
+ (-[WebFrame _stringForRange:]): More of the same.
+ (-[WebFrame _caretRectAtNode:offset:affinity:]): Ditto.
+ (-[WebFrame _firstRectForDOMRange:]): Ditto.
+ (-[WebFrame _scrollDOMRangeToVisible:]): Ditto.
+ (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
+ Ditto.
+ (-[WebFrame _convertNSRangeToDOMRange:]): Ditto.
+ (-[WebFrame _convertDOMRangeToNSRange:]): Ditto.
+ (-[WebFrame _markDOMRange]): Ditto.
+ (-[WebFrame _smartDeleteRangeForProposedRange:]): Ditto.
+ (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
+ (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Ditto.
+ (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): Ditto.
+ (-[WebFrame _replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]): Ditto.
+ (-[WebFrame _characterRangeAtPoint:]): Ditto.
+ (-[WebFrame _typingStyle]): Ditto.
+ (-[WebFrame _setTypingStyle:withUndoAction:]): Ditto.
+ (-[WebFrame _pauseAnimation:onNode:atTime:]): Ditto.
+ (-[WebFrame _pauseTransitionOfProperty:onNode:atTime:]): Ditto.
+ (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): Ditto.
+
+ * WebView/WebFrameInternal.h: Removed the core and kit functions here which are no longer
+ needed since they're automatically generated now.
+
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]): Use core.
+ (formElementFromDOMElement): Ditto.
+ (inputElementFromDOMElement): Ditto.
+ * WebView/WebTextIterator.mm:
+ (-[WebTextIterator initWithRange:]): Ditto.
+ (-[WebTextIterator currentRange]): Ditto.
+ (-[WebTextIterator currentNode]): Ditto.
+ * WebView/WebView.mm:
+ (-[WebView textIteratorForRect:]): Ditto.
+ (-[WebView setSelectedDOMRange:affinity:]): Ditto.
+
+2009-04-17 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKit side of <rdar://problem/6449642>.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.h:
+ (WebKit::HostedNetscapePluginStream::create):
+ New function that creates a stream from a frame loader.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+ (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
+ Add the constructor that takes a frame loader.
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ Pass "fullFrame" to the plug-in host.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCCancelLoadURL):
+ Call NetscapePluginInstanceProxy::cancelStreamLoad.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::create):
+ Pass "fullFrame" to the constructor.
+
+ (WebKit::NetscapePluginInstanceProxy::manualStream):
+ New getter for the manual stream.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ Take the implicit request into account if we have a full frame plug-in.
+
+ (WebKit::NetscapePluginInstanceProxy::setManualStream):
+ Setter for the manual stream.
+
+ (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad):
+ Cancel the manual stream if necessary.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.h:
+ WebHostedNetscapePluginView now conforms to the WebPluginManualLoader protocol.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView createPlugin]):
+ Pass "fullFrame" to instantiatePlugin.
+
+ (-[WebHostedNetscapePluginView pluginView:receivedResponse:]):
+ (-[WebHostedNetscapePluginView pluginView:receivedData:]):
+ (-[WebHostedNetscapePluginView pluginView:receivedError:]):
+ (-[WebHostedNetscapePluginView pluginViewFinishedLoading:]):
+ Call the equivalent manual stream functions.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin):
+ Use a macro for getting the plug-in view type.
+
+2009-04-14 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ https://bugs.webkit.org/show_bug.cgi?id=25157
+
+ Move the run loop observer cleanup from -close
+ to -_close.
+
+ * WebView/WebView.mm:
+ (-[WebView _close]):
+ (-[WebView close]):
+
+2009-04-14 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - Speculative fix for <rdar://problem/6781422>
+
+ Protect the plug-in instance proxy in case it's deleted while waiting for a reply.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::wheelEvent):
+
+2009-04-14 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin.
+
+ Initialize WebKitSystemInterface in class methods that could get called before a WebView/WebFrame is set up. This was causing Mail to crash on launch.
+
+ * Misc/WebCache.mm: (+[WebCache initialize]):
+ * WebView/WebView.mm: (+[WebView initialize]):
+
+2009-04-13 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Darin.
+
+ <rdar://problem/6784955> REGRESSION: closing a tab containing a PDF causes world leaks
+
+ Simplify the _trackFirstResponder method by just caching the value instead of retaining
+ a Cocoa object.
+
+ * WebView/WebPDFView.h: Eliminated trackedFirstResponder object and replaced it with
+ a firstResponderIsPDFDocumentView boolean.
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView dealloc]): Removed no longer necessary ASSERT.
+ (-[WebPDFView viewWillMoveToWindow:]): Removed call to release and nil-out trackedFirstResponder,
+ which no longer exists. In the new code all we do now is set firstResponderIsPDFDocumentView to NO.
+ (-[WebPDFView _trackFirstResponder]): Rewrote this method to just cache the value instead
+ of retaining an object.
+
+2009-04-13 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=25125. Rework scrolling so that a layout happens first when
+ it's already needed so that the code doesn't end up making bad decisions based off invalid document sizes.
+
+ This patch also eliminates WebHTMLView's separate notion of needing a layout and just consolidates it with
+ WebCore's notion of needing layout.
+
+ * WebView/WebDynamicScrollBarsView.m:
+ (-[WebDynamicScrollBarsView updateScrollers]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _frameOrBoundsChanged]):
+ (-[WebHTMLView initWithFrame:]):
+ (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
+ (-[WebHTMLView setNeedsLayout:]):
+ (-[WebHTMLView _layoutIfNeeded]):
+ (-[WebHTMLView _needsLayout]):
+ * WebView/WebHTMLViewInternal.h:
+
+2009-04-13 Darin Adler <darin@apple.com>
+
+ * WebView/WebViewPrivate.h: Updated comments.
+
+2009-04-13 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6740294> Increase the connection count per host
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+
+2009-04-13 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Tim Hatcher
+
+ Tweak my last check-in, moving the thread violation check up to the API-level calls so the logging is more
+ useful to developers/users.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): If not on the main thread, only
+ perform the "call on main thead" workaround, as the log/exception raising is now up at the API level.
+ (-[WebFrame loadData:MIMEType:textEncodingName:baseURL:]): Perform a thread violation check here so logging
+ is more meaningful.
+ (-[WebFrame loadHTMLString:baseURL:]): Ditto.
+ (-[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]): Ditto.
+
+2009-04-13 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Kevin Decker
+
+ <rdar://problem/6712063> Garmin WebUpdater crashes
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): If not called on the main thread,
+ add a ThreadViolationCheckRoundTwo() call to either log or raise an exception. In the case where it's
+ only a log, reschedule the _loadData call to occur on the main thread.
+
+2009-04-10 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ - fix <rdar://problem/6752340> Light blue-green background in content
+ area in Mail
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ Use device white, rather than calibrated white, as the default
+ background color.
+
+2009-04-10 Darin Adler <darin@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ <rdar://problem/6773515> crash in push_heap inside WebCore when printing
+
+ The crash was due to manipulating a timer on a different thread than the one it was created on.
+
+ * History/WebHistoryItem.mm:
+ (-[WebWindowWatcher windowWillClose:]): Call later on main thread, if called on non-main thread.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView windowDidBecomeKey:]): Ditto.
+ (-[WebHTMLView windowDidResignKey:]): Ditto.
+ (-[WebHTMLView windowWillClose:]): Ditto.
+ (-[WebHTMLView _updateControlTints]): Added. Factored out the non-thread-safe part of
+ our override of _windowChangedKeyState.
+ (-[WebHTMLView _windowChangedKeyState]): Call _updateControlTints later on main thread, if
+ called on non-main thread.
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences _postPreferencesChangesNotification]): Call later on main thread, if called
+ on non-main thread
+
+2009-04-10 Timothy Hatcher <timothy@apple.com>
+
+ Remove DOMDocumentPrivate.h now that <rdar://problem/6730996> is fixed.
+
+ Rubber-stamped by Mark Rowe.
+
+ * Misc/DOMDocumentPrivate.h: Removed.
+
+2009-04-10 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ <rdar://problem/6646998> Avoid starting QTKitServer if possible
+ Add the requires symbol in the WebSystemInterface. It is used by
+ WebCore.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Add wkQTIncludeOnlyModernMediaFileTypes.
+
+2009-04-09 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Hyatt.
+
+ <rdar://problem/4680397> tearing seen because deferred updates are disabled
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView initWithFrame:]): Don't call WKDisableCGDeferredUpdates on post-Leopard if
+ NSAppKitVersionNumberWithDeferredWindowDisplaySupport is defined.
+
+2009-04-09 John Sullivan <sullivan@apple.com>
+
+ <rdar://problem/6775682> WebKit's support for SnowLeopard sudden termination for
+ downloads is broken and should be removed
+
+ Reviewed by Darin Adler
+
+ * Misc/WebDownload.m:
+ (-[WebDownloadInternal downloadDidBegin:]):
+ remove disableSuddenTermination call
+ (-[WebDownloadInternal downloadDidFinish:]):
+ remove enableSuddenTermination call
+ (-[WebDownloadInternal download:didFailWithError:]):
+ remove enableSuddenTermination call
+
+2009-04-09 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders Carlsson and Sam Weinig.
+
+ Part of <rdar://problem/5438063> Saving history containing 100,000 entries causes pauses of 2s while browsing
+
+ Longer term solution is to change the design so Safari doesn't read and write all of history.
+ This patch is step one: Do the serializing, which is done on the main thread, much faster.
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate data]): Added. Returns the NSData object containing serialized history.
+ For creating new SPI so you can get the data in memory instead of on disk. Uses WebHistoryWriter.
+ (-[WebHistoryPrivate saveToURL:error:]): Changed to call [self data
+ (-[WebHistory _data]): Added.
+ (WebHistoryWriter::WebHistoryWriter): Added.
+ (WebHistoryWriter::writeHistoryItems): Added.
+
+ * History/WebHistoryPrivate.h: Added a new _data method.
+
+2009-04-09 Mike Thole <mthole@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ Fix 64-bit build
+
+ * Panels/WebAuthenticationPanel.h:
+ Declare the 'separateRealmLabel' IBOutlet as an NSTextField instead of 'id'.
+ This fixes a duplicate method warning (setAutoresizingMask: on NSView and CALayer)
+
+2009-04-09 Mike Thole <mthole@apple.com>
+
+ Reviewed by Ada Chan.
+
+ <rdar://problem/5697111> Basic authentication dialog spoofing vulnerability
+
+ * Panels/WebAuthenticationPanel.h:
+ Added IBOutlet for separateRealmLabel
+ * Panels/WebAuthenticationPanel.m:
+ (-[WebAuthenticationPanel setUpForChallenge:]):
+ In the realm case, decide if it is a simple or complex realm name. A realm name
+ is considered complex if it has any whitespace or newline characters. Present
+ alternative text and layout for the complex case, where the realm name isn't inline
+ with the rest of the sheet's text.
+
+ * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
+ * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
+ Updated the nib with a new 'separateRealmLabel' outlet.
+ Updated the File's Owner to correctly be WebAuthenticationPanel.
+ Fixed springs on the sheet's icon to keep it from moving during a resize.
+
+2009-04-09 David Kilzer <ddkilzer@apple.com>
+
+ Reinstating <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings
+
+ Rolled r42345 back in. The build failure was caused by an
+ internal script which had not been updated the same way that
+ build-webkit was updated.
+
+ * Configurations/WebKit.xcconfig:
+ * DOM/WebDOMOperations.mm:
+ * MigrateHeaders.make:
+
+2009-04-09 Alexey Proskuryakov <ap@webkit.org>
+
+ Reverting <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings.
+ It broke Mac build, and I don't know how to fix it.
+
+ * Configurations/WebKit.xcconfig:
+ * DOM/WebDOMOperations.mm:
+ * MigrateHeaders.make:
+
+2009-04-08 David Kilzer <ddkilzer@apple.com>
+
+ <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings
+
+ Reviewed by Darin Adler and Maciej Stachowiak.
+
+ Introduce the ENABLE_SVG_DOM_OBJC_BINDINGS feature define so
+ that SVG DOM Objective-C bindings may be optionally disabled.
+
+ * Configurations/WebKit.xcconfig: Added
+ ENABLE_SVG_DOM_OBJC_BINDINGS variable and use it in
+ FEATURE_DEFINES.
+ * DOM/WebDOMOperations.mm: Removed unused header.
+ * MigrateHeaders.make: Switched from using ENABLE_SVG to using
+ ENABLE_SVG_DOM_OBJC_BINDINGS.
+
+2009-04-08 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben and Darin Adler
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=12440, fixed positioned elements end up in
+ inconsistent positions. Rewrite updateScrollers to improve the correctness.
+
+ * WebView/WebDynamicScrollBarsView.h:
+ * WebView/WebDynamicScrollBarsView.m:
+ (-[WebDynamicScrollBarsView updateScrollers]):
+
+2009-04-07 Anders Carlsson <andersca@apple.com>
+
+ Fix Tiger build for real this time.
+
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView getVariable:forURL:value:length:]):
+ (-[WebNetscapePluginView setVariable:forURL:value:length:]):
+ (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
+ * Plugins/npapi.mm:
+ (NPN_GetValueForURL):
+ (NPN_SetValueForURL):
+
+2009-04-07 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben
+
+ Mac portion of fix to make DumpRenderTree always produce accurate scrollbar results. Change
+ updateScrollers to call minimumContentsSize when a WebHTMLView is inside the WebDynamicScrollbarsView.
+
+ * WebView/WebDynamicScrollBarsView.m:
+ (-[WebDynamicScrollBarsView updateScrollers]):
+
+2009-04-07 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Anders Carlsson.
+
+ Trying to fix Tiger build.
+
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
+
+2009-04-07 Anders Carlsson <andersca@apple.com>
+
+ Try to fix the Leopard build once more.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView getVariable:forURL:value:length:]):
+
+2009-04-07 Anders Carlsson <andersca@apple.com>
+
+ ...and try to fix the Leopard build.
+
+ * Plugins/npapi.mm:
+ (NPN_GetAuthenticationInfo):
+
+2009-04-07 Anders Carlsson <andersca@apple.com>
+
+ Try to fix the Tiger build.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+
+2009-04-07 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6667001>
+ NPAPI: need NPN_Get/SetValueForURL() and NPN_GetAuthenticationInfo()
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCGetCookies):
+ (WKPCGetProxy):
+ (WKPCSetCookies):
+ (WKPCGetAuthenticationInfo):
+ New MIG functions to be used by the plug-in host.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::getCookies):
+ (WebKit::NetscapePluginInstanceProxy::setCookies):
+ (WebKit::NetscapePluginInstanceProxy::getProxy):
+ (WebKit::NetscapePluginInstanceProxy::getAuthenticationInfo):
+ Implement these.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ Add callbacks.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView URLWithCString:]):
+ Factor this out of URLWithCString.
+
+ (-[WebBaseNetscapePluginView requestWithURLCString:]):
+ Call URLWithCString.
+
+ (WebKit::proxiesForURL):
+ Return a string representation of proxies for a given URL.
+
+ (WebKit::getAuthenticationInfo):
+ Get the authentication info for a given host/protocol/scheme/realm/port combination.
+
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage _tryLoad]):
+ Initialize the new vtable functions.
+
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView getVariable:forURL:value:length:]):
+ (-[WebNetscapePluginView setVariable:forURL:value:length:]):
+ (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
+ Implement these.
+
+ * Plugins/npapi.mm:
+ (NPN_GetValueForURL):
+ (NPN_SetValueForURL):
+ (NPN_GetAuthenticationInfo):
+ Call the plug-in view functions.
+
+2009-04-03 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/6756512>
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::spawnPluginHost): Tweaked the visibleName property.
+
+2009-04-03 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Ada Chan
+
+ <rdar://problem/6755838> Removing all icons can delete other items from disk.
+
+ * Misc/WebIconDatabase.mm:
+ (importToWebCoreFormat):
+ When snooping around in various directories looking for a directory full of Safari-2-style
+ icon database information to convert and delete, bail out without doing the delete part if
+ we didn't actually find any Safari-2-style icon database information.
+
+2009-04-03 John Sullivan <sullivan@apple.com>
+
+ fixed <rdar://problem/6355573> [WebView _setCacheModel:] leaks the result of _CFURLCacheCopyCacheDirectory
+
+ Reviewed by Adam Roben
+
+ * WebView/WebView.mm:
+ (+[WebView _setCacheModel:]):
+ use WebCFAutorelease rather than autorelease on result of method that returns CFStringRef
+
+2009-04-03 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Fixed https://bugs.webkit.org/show_bug.cgi?id=24941
+
+ This fix essentially does a -viewWillDraw call for layout. It adds
+ a CFRunLoopObserver which performs layout just before drawing on the
+ Mac platform. This makes sure layout is complete before rendering and
+ avoids a flash.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::attachRootGraphicsLayer):
+ (WebChromeClient::setNeedsOneShotDrawingSynchronization):
+ (WebChromeClient::scheduleViewUpdate):
+ * WebView/WebView.mm:
+ (-[WebViewPrivate _clearViewUpdateRunLoopObserver]):
+ (-[WebView _viewWillDrawInternal]):
+ (-[WebView viewWillDraw]):
+ (-[WebView close]):
+ (viewUpdateRunLoopObserverCallBack):
+ (-[WebView _scheduleViewUpdate]):
+ * WebView/WebViewInternal.h:
+
+2009-04-03 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ WebKit side of <rdar://problem/6752953>.
+
+ Pass the clip rect to the plug-in host.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::resize):
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2009-04-02 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein and Timothy Hatcher.
+
+ <rdar://problem/6684745> Crash in -[WebView removeSizeObservers] when loading NIB file
+
+ The implementation of -[NSView initWithCoder:] can result in -viewWillMoveToSuperview:/-viewDidMoveToSuperview: being sent to
+ our view before we've had a chance to initialize _private, so we need to ensure it is non-nil before dereferencing it in those
+ methods.
+
+ * WebView/WebView.mm:
+ (-[WebView removeSizeObservers]): Nil-check _private before dereferencing it.
+ (-[WebView addSizeObservers]): Ditto.
+
+2009-04-02 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add a way to get a list of focusable nodes.
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMDocument _focusableNodes]):
+ * DOM/WebDOMOperationsInternal.h: Added.
+ * DOM/WebDOMOperationsPrivate.h: Make this a private header.
+ Move old methods to WebDOMOperationsInternal.h
+ * WebView/WebHTMLView.mm: Use methods from WebDOMOperationsInternal.h
+
+2009-04-01 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Bug 22378: Crash submitting a form when parsing an XHTML document
+ https://bugs.webkit.org/show_bug.cgi?id=22378
+ rdar://problem/6388377
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem targetItem]): Call targetItem directly instead of callling
+ isTargetItem, hasChildren, and recurseToFindTargetItem.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchWillSubmitForm): Updated for the new
+ textFieldValues function in FormState.
+
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Updated for name and
+ argument change of loadFrameRequest.
+
+2009-04-01 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24990
+ Put SECTORDER_FLAGS into xcconfig files.
+
+ * Configurations/Base.xcconfig:
+ * Configurations/DebugRelease.xcconfig:
+
+2009-03-31 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebKit side of <rdar://problem/6500266>.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::wheelEvent):
+ Send the event.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView scrollWheel:]):
+ Call NetscapePluginInstanceProxy::wheelEvent. If the plug-in processed the event, don't
+ call super.
+
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ Add definition.
+
+2009-03-31 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ <rdar://problem/6740581> REGRESSION (r41793): Page Down and Page Up don’t work in Leopard Mail
+
+ * WebView/WebHTMLView.mm:
+ (-[WebResponderChainSink tryToPerform:with:]): Added. Without this we would think we had
+ handled an event when we actually hadn't. Specifically, when -[WebFrameView scrollPageDown:]
+ calls tryToPerform on the next responder.
+
+2009-03-30 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24938
+
+ Build fixes when building --no-svg
+
+ DOMHTMLFrameElementPrivate.h and DOMHTMLIFrameElementPrivate.h are only available with ENABLE_SVG.
+
+ * MigrateHeaders.make:
+
+2009-03-29 Darin Adler <darin@apple.com>
+
+ Reviewed by Cameron Zwarich.
+
+ * Plugins/WebNullPluginView.mm: Added now-needed includes.
+ * WebView/WebHTMLRepresentation.mm: Ditto.
+ * WebView/WebHTMLView.mm: Ditto.
+
+2009-03-27 Timothy Hatcher <timothy@apple.com>
+
+ * MigrateHeaders.make: Remove DOMHTMLBodyElementPrivate.h since it
+ is not generated anymore.
+
+2009-03-27 Adam Roben <aroben@apple.com>
+
+ Don't include substitute data URLs in global history redirect chains
+
+ <rdar://6690169>
+
+ Reviewed by Darin Adler.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::updateGlobalHistory): Don't call
+ updateGlobalHistoryRedirectLinks. FrameLoader calls this for us now.
+ (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
+ Added an assertion to help catch cases where we might be adding a
+ substitute data URL into a redirect chain.
+
+2009-03-27 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ <rdar://problem/6541923> REGRESSION (r38629): Tab cycle in empty tab is broken
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _wantsKeyDownForEvent:]): Only return YES when we have a Frame.
+
+2009-03-27 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan and Anders Carlsson.
+
+ <rdar://problem/5987442> Pasteboard not exposed to WebEditingDelegate for WebViewInsertActionPasted (needed for system services)
+
+ Added SPI to tell which pasteboard is currently being inserted.
+ I chose to put it on WebView to be forward-looking since we're migrating things
+ from WebHTMLView to WebView in the future.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Add calls to _setInsertionPasteboard.
+ (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Ditto.
+ * WebView/WebView.mm:
+ (-[WebViewPrivate dealloc]): Assert the pasteboard is nil.
+ (-[WebViewPrivate finalize]): Ditto.
+ (-[WebView _insertionPasteboard]): Return the pastebaord.
+ (-[WebView _setInsertionPasteboard:]): Set the pasteboard.
+ * WebView/WebViewInternal.h: Added _setInsertionPasteboard.
+ * WebView/WebViewPrivate.h: Added _insertionPasteboard.
+
+2009-03-25 Timothy Hatcher <timothy@apple.com>
+
+ Expose new DOM methods as public Objective-C API.
+
+ <rdar://problem/5837350> Expose new DOM classes and methods
+ as public API (match the additions to the JavaScript DOM)
+
+ Reviewed by Mark Rowe and Darin Adler.
+
+ * MigrateHeaders.make:
+ * Misc/DOMDocumentPrivate.h: Added. Forwarding header for
+ <rdar://problem/6730996>.
+
+2009-03-26 Jungshik Shin <jshin@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Add WebPreferences for encoding autodetection on Mac.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16482
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences usesEncodingDetector]):
+ (-[WebPreferences setUsesEncodingDetector:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-03-26 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ - Fix <rdar://problem/6687055> and <rdar://problem/6713639>.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCInvalidateRect):
+ Call NetscapePluginInstanceProxy::invalidateRect.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::cleanup):
+ Stop the request timer, set m_pluginView to nil.
+
+ (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
+ No need to set m_pluginView to nil here anymore, it's now done in cleanup().
+
+ (WebKit::NetscapePluginInstanceProxy::performRequest):
+ (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
+ Assert that the plug-in view is not nil.
+
+ (WebKit::NetscapePluginInstanceProxy::invalidateRect):
+ Call setNeedsDisplayInRect here.
+
+2009-03-25 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6714964>
+ CrashTracer: [REGRESSION] 51 crashes in Safari at com.apple.WebKit • WebNetscapePluginStream::deliverData + 775
+
+ Don't release m_deliveryData since it's a RetainPtr. Also, use adoptNS instead of releasing newDeliveryData manually.
+
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::deliverData):
+
+2009-03-25 Mike Thole <mthole@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ <rdar://problem/6453738> call SetWindow when user creates a new tab
+
+ CoreGraphics plug-ins now receive an NPP_SetWindow call when moving to a background tab.
+ Flash is excluded from this change in behavior, as it has historical WebKit-specific code
+ that isn't compatible with this change.
+
+ * Plugins/WebNetscapePluginView.h:
+ Added an _isFlash ivar.
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView _createPlugin]):
+ Set the new _isFlash ivar based on the bundle identifier.
+ (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+ When using the CG drawing model and in a non-drawable state, set the portState
+ to NULL and return early.
+ (-[WebNetscapePluginView updateAndSetWindow]):
+ When using the CG drawing model, call -setWindowIfNecessary even if the portState is NULL.
+ Flash is an exception to this, due to its historical behavior.
+ (-[WebNetscapePluginView setWindowIfNecessary]):
+ Removed an assertion that was no longer true. The [NSView focus] view
+ is no longer guaranteed to be 'self' at this point.
+ Also modified the debug logging for CG plug-ins to include the size of the
+ window's clipRect, which was useful in verifying the correct behavior of this patch.
+
+2009-03-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ - speculative fix for <rdar://problem/6630134> Crash at
+ Editor::compositionRange()
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView markedRange]): Null-check the Frame like most other
+ methods in this class.
+
+2009-03-23 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for <rdar://problem/6140966>
+ Empty Caches does not clear the Cross-site XMLHttpRequest preflight cache
+
+ * Misc/WebCache.mm:
+ (+[WebCache empty]):
+
+2009-03-23 Adele Peterson <adele@apple.com>
+
+ Reviewed by Mark Rowe & Dave Hyatt.
+
+ Merge some of the individual Mail quirks into two settings that we can check for future quirks.
+
+ * WebView/WebView.mm:
+ (runningLeopardMail):
+ (runningTigerMail):
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-03-23 Darin Adler <darin@apple.com>
+
+ * WebView/WebTextIterator.h: Fixed a spelling error in a comment.
+
+2009-03-22 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - fix <rdar://problem/6640741> Messages not displaying after the
+ Safari 4 beta was installed
+
+ Mail assumes that if -[WebArchive subresources] is not nil, then it
+ contains at least one object.
+
+ * WebView/WebArchive.mm:
+ (-[WebArchive subresources]): Preserve the behavior of returning nil
+ if there are no subresources.
+
+2009-03-20 Adele Peterson <adele@apple.com>
+
+ Build fix.
+
+ Reviewed by Darin Adler.
+
+ * WebView/WebFrameView.mm: (-[WebFrameView initWithFrame:]):
+
+2009-03-20 Timothy Hatcher <timothy@apple.com>
+
+ Change how threading exceptions are checked so they are reported
+ by what round they were added. That way WebKit can decided the
+ behavior per-round based on linked-on-or-after checks.
+
+ <rdar://problem/6626741&6648478&6635474&6674079>
+
+ Reviewed by Darin Adler.
+
+ * History/WebBackForwardList.mm: Use the new WebCoreThreadViolationCheckRoundOne macro.
+ * History/WebHistoryItem.mm: Ditto.
+ * Misc/WebIconDatabase.mm: Ditto.
+
+ * WebView/WebArchive.mm: Use the new WebCoreThreadViolationCheckRoundTwo macro.
+ * WebView/WebResource.mm: Ditto.
+ (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Check Mail's bundle version
+ to truly decide if it is an old Mail client.
+ * WebView/WebView.mm: Ditto.
+
+ * Misc/WebKitVersionChecks.h: Add a new linked-on-or-after version define.
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView initWithFrame:]): Set the default thread violation behavior per-round
+ based on difference version checks and the Mail workaround check.
+
+2009-03-20 Darin Adler <darin@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ * WebView/WebTextIterator.h: Improved comments to point out some of the pitfalls
+ of this SPI.
+
+2009-03-20 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Use a better technique to handle finding out if something responds to a selector
+ in WebHTMLView's doCommandBySelector method.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView doCommandBySelector:]): Removed unneeded check for 0 coreFrame;
+ this is already handled by coreCommandBySelector: so doesn't need to be checked
+ twice. Got rid of initial value for eventWasHandled boolean to make it more clear.
+ Use WebResponderChainSink to find out if a command is handled rather than walking
+ the responder chain explicitly.
+ (-[WebResponderChainSink initWithResponderChain:]): Added.
+ (-[WebResponderChainSink detach]): Added.
+ (-[WebResponderChainSink receivedUnhandledCommand]): Added.
+ (-[WebResponderChainSink noResponderFor:]): Added.
+ (-[WebResponderChainSink doCommandBySelector:]): Added.
+
+2009-03-19 Timothy Hatcher <timothy@apple.com>
+
+ Remove #ifndef BUILDING_ON_TIGER around code that schedules runloop modes
+ for Page, so the new RunLoopTimer in WebCore always gets a default mode.
+ Fixes the layout test failures on the Tiger build bots.
+
+ Reviewed by Mark Rowe.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ (-[WebView scheduleInRunLoop:forMode:]):
+ (-[WebView unscheduleFromRunLoop:forMode:]):
+
+2009-03-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ WebKit side of <rdar://problem/6688244>.
+
+ Try reinitializing the vendor port if it's invalid.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+
+2009-03-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6504776>
+ CrashTracer: [USER] 188 crashes in Safari at com.apple.WebCore • WTF::HashTableIterator<WTF::RefPtr<WebCore::ResourceLoader>, ...
+
+ If the m_pluginView member was zeroed out as a result of making a call into the plug-in, the pluginFunctionCallDepth would be off
+ causing the plug-in never to be stopped. Simplify the code by using a RAII object.
+
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (PluginStopDeferrer::PluginStopDeferrer):
+ (PluginStopDeferrer::~PluginStopDeferrer):
+ (WebNetscapePluginStream::startStream):
+ (WebNetscapePluginStream::wantsAllStreams):
+ (WebNetscapePluginStream::destroyStream):
+
+2009-03-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ <rdar://problem/6687005> Need support for new move-left/right selectors.
+
+ * WebView/WebHTMLView.mm: Added the four new selectors to the command-forwarding list.
+ * WebView/WebView.mm: Ditto.
+
+2009-03-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Bug 24477: REGRESSION (r41467): Page Down key scrolls two pages
+ https://bugs.webkit.org/show_bug.cgi?id=24477
+ rdar://problem/6674184
+
+ * WebView/WebHTMLView.mm:
+ (responderChainRespondsToSelector): Added.
+ (-[WebHTMLView doCommandBySelector:]): Set eventWasHandled based on whether we
+ can find a responder that responds to this selector rather than always assuming
+ the selector will not be handled.
+
+2009-03-17 Mark Rowe <mrowe@apple.com>
+
+ Fix the build.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+
+2009-03-17 David Kilzer <ddkilzer@apple.com>
+
+ Use -[NSURLResponse(WebCoreURLResponse) _webcore_MIMEType] consistently
+
+ Reviewed by Darin Adler.
+
+ WebKit r30323 added -_webcore_MIMEType to fix issues with
+ incorrect MIME types in NS[HTTP]URLResponse objects. However,
+ uses of -[NSURLResponse MIMEType] still persist in WebKit that
+ should be switched to use -_webcore_MIMEType. Note that
+ -[WebDataSource _responseMIMEType] calls back into WebCore to
+ get the MIME type from the ResourceResponse object, which has
+ already retrieved it via -_webcore_MIMEType.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+ (WebKit::HostedNetscapePluginStream::didReceiveResponse): Use
+ -_webcore_MIMEType.
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::didReceiveResponse): Ditto.
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView pluginView:receivedData:]): Ditto.
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController pluginView:receivedResponse:]): Ditto.
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation _isDisplayingWebArchive]): Use
+ -[WebDataSource _responseMIMEType] instead.
+ * WebView/WebPDFRepresentation.m:
+ (-[WebPDFRepresentation finishedLoadingWithDataSource:]): Ditto.
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView menuForEvent:]): Ditto.
+
+2009-03-17 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler
+
+ https://bugs.webkit.org/show_bug.cgi?id=24396
+
+ Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now.
+
+ * WebKitPrefix.h:
+
+2009-03-17 Kevin Ollivier <kevino@theolliviers.com>
+
+ Reviewed by Mark Rowe.
+
+ Get BUILDING_ON_* defines from Platform.h.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24630
+
+ * WebKitPrefix.h:
+
+2009-03-16 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6577174> Rename the text directionality submenus to “Paragraph Direction” and “Selection Direction”
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory contextMenuItemTagParagraphDirectionMenu]): Changed string here, but only
+ post-Leopard, since we want this to match the Mac OS X menu on Tiger and Leopard.
+ (-[WebViewFactory contextMenuItemTagSelectionDirectionMenu]): Changed string here.
+
+2009-03-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Don't mig_deallocate random data in case an instance proxy method returns false.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCEvaluate):
+ (WKPCInvoke):
+ (WKPCInvokeDefault):
+ (WKPCGetProperty):
+ (WKPCEnumerate):
+
+2009-03-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/6633944>
+ REGRESSION (Safari 4 PB): Many crashes in Flip4Mac involving loading the plugin
+
+ Defer loading while calling webPlugInInitialize since it can end up spinning the run loop.
+
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController addPlugin:]):
+
+2009-03-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix <rdar://problem/6622601>
+
+ Make sure to update both the window frame and the plug-in frame.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView addWindowObservers]):
+
+2009-03-15 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ - fix <rdar://problem/6607773> WebKit should support the "Default"
+ paragraph writing direction -- or at least validate the menu item
+ appropriately
+
+ Made WebHTMLView validate user interface items with the selector
+ -makeBaseWritingDirectionNatural: by returning NO and, if the item is
+ a menu item, setting its state to "off".
+
+ Strictly speaking, since -makeBaseWritingDirectionNatural: is never
+ valid for WebViews, WebHTMLView should not need to respond to it and
+ validate it, however because other responders respond to all three
+ -makeBaseWritingDirection*: messages and set the menu item state, having
+ WebHTMLView do the same makes application developers' lives easier.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
+ (-[WebHTMLView makeBaseWritingDirectionNatural:]):
+
+2009-03-13 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Dan Bernstein.
+
+ Take advantage of the ability of recent versions of Xcode to easily switch the active
+ architecture.
+
+ * Configurations/DebugRelease.xcconfig:
+
+2009-03-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker and Geoffrey Garen.
+
+ <rdar://problem/6590384>
+ REGRESSION (Safari 3-4): Tiger-only Crash occurs at WebView hostWindow () after reloading a set of tabs then quitting
+
+ When we're doing fast teardown, plug-in views can be destroyed from -[WebView dealloc]'s [super dealloc] call,
+ and thus calling -[WebView hostWindow] will crash since _private is nil.
+
+ * WebView/WebView.mm:
+ (-[WebView hostWindow]):
+
+2009-03-13 Anders Carlsson <andersca@apple.com>
+
+ And yet another attempt...
+
+ * Plugins/WebNetscapePluginEventHandlerCocoa.h:
+ (WebNetscapePluginEventHandlerCocoa::installKeyEventHandler):
+ (WebNetscapePluginEventHandlerCocoa::removeKeyEventHandler):
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+
+2009-03-13 Anders Carlsson <andersca@apple.com>
+
+ Another attempt at fixing the build.
+
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
+
+2009-03-13 Anders Carlsson <andersca@apple.com>
+
+ Try to fix the SL build.
+
+ * Plugins/WebNetscapePluginEventHandlerCocoa.h:
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ (WebNetscapePluginEventHandlerCocoa::keyDown):
+
+2009-03-13 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Update Geolocation perimission dialogs to be asynchronous.
+ https://bugs.webkit.org/show_bug.cgi?id=24505
+
+ WebGeolocation is a wrapper around WebCore::Geolocation. It mimics the
+ coding style set by WebSecurityOrigin.
+
+ WebChromeClient now calls the private UI delegate method
+ -webView:frame:requestGeolocationPermission:securityOrigin:
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::requestGeolocationPermissionForFrame):
+ * WebCoreSupport/WebGeolocation.mm: Added.
+ (WebCore::if):
+ (-[WebGeolocation shouldClearCache]):
+ (-[WebGeolocation setIsAllowed:]):
+ (-[WebGeolocation dealloc]):
+ * WebCoreSupport/WebGeolocationInternal.h: Added.
+ * WebCoreSupport/WebGeolocationPrivate.h: Added.
+ * WebView/WebUIDelegatePrivate.h:
+
+2009-03-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6610666> Revise the Cocoa event model text API
+
+ Replace the text input API with a simpler API that uses a separate text input window.
+
+ * Plugins/WebNetscapePluginEventHandlerCocoa.h:
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
+ Initialize m_keyEventHandler to 0.
+
+ (WebNetscapePluginEventHandlerCocoa::keyDown):
+ If the plug-in returns 0 from NPP_HandleEvent, pass the event to the TSM machinery.
+
+ (WebNetscapePluginEventHandlerCocoa::focusChanged):
+ Install/remove the key event handler as needed.
+
+ (WebNetscapePluginEventHandlerCocoa::handleTSMEvent):
+ Get the text and send a TextInput event.
+
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ Remove the old text input API.
+
+ (-[WebNetscapePluginView inputContext]):
+ Always return nil here.
+
+ * Plugins/npapi.mm:
+ * Plugins/nptextinput.h: Removed.
+
+2009-03-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mike Thole and Mark Rowe.
+
+ Fix <rdar://problem/6624105>.
+
+ Make sure to process incoming messages for the NSEventTrackingRunLoopMode as well.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+
+2009-03-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ WebKit side of <rdar://problem/6607801>
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::destroy):
+ Pass a requestID to _WKPCDestroyPluginInstance and wait until we get a reply back.
+
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ Add requestID parameter.
+
+2009-03-12 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage _unloadWithShutdown:]): Simply a small SUPPORT_CFM code block.
+
+2009-03-12 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Fixed: <rdar://problem/5815862> Opening a subclassed NSWindow from a Safari plugin causes Safari to crash on Quit
+
+ This fix addresses crashes in both Silverlight and ChemDraw. This type of crash would occur because AppKit still
+ had a reference to open windows that the plugin created (which no longer exist).
+
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage _unloadWithShutdown:]): Do not unload the plug-in bundle on browser shutdown.
+
+2009-03-11 David Kilzer <ddkilzer@apple.com>
+
+ Remove duplicate header include
+
+ Rubber-stamped by Mark Rowe.
+
+ * WebView/WebView.mm: Remove duplicate #include <runtime/InitializeThreading.h>.
+ Also realphabetized lowercase #include statements.
+
+2009-03-11 David Kilzer <ddkilzer@apple.com>
+
+ Clarify comments regarding order of FEATURE_DEFINES
+
+ Rubber-stamped by Mark Rowe.
+
+ * Configurations/WebKit.xcconfig: Added warning about the
+ consequences when FEATURE_DEFINES are not kept in sync.
+
+2009-03-11 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKit side of <rdar://problem/6656147>.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ Pass the requestID to _WKPHInstantiatePlugin.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ Pass the requestID to setCurrentReply.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
+ Store the reply in a map with the requestID as the key.
+
+ (WebKit::NetscapePluginInstanceProxy::waitForReply):
+ Wait for a reply that matches the given requestID.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ Initialize member variables.
+
+ (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
+ Delete all requests.
+
+ (WebKit::NetscapePluginInstanceProxy::print):
+ Pass the requestID to _WKPHPluginInstancePrint.
+
+ (WebKit::NetscapePluginInstanceProxy::loadRequest):
+ Rename m_currentRequestID to m_currentURLRequestID.
+
+ (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
+ Process requests until we find a reply with the right requestID.
+
+ (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
+ Pass a requestID to the _WKPH function.
+
+ (WebKit::NetscapePluginInstanceProxy::nextRequestID):
+ Ditto.
+
+ * Plugins/Hosted/ProxyInstance.mm:
+ Pass a requestID to the _WKPH functions.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ Add requestID parameters.
+
+2009-03-11 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix <rdar://problem/6620064>.
+
+ * Plugins/WebPluginContainerPrivate.h:
+
+2009-03-10 Xan Lopez <xlopez@igalia.com>
+
+ Build fix, no review.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _smartDeleteRangeForProposedRange:]):
+
+2009-03-09 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ WebKit side of <rdar://problem/6530007>
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCEnumerate):
+ Call NetscapePluginInstanceProxy::enumerate.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::enumerate):
+ Enumerate the JS object and serialize its values.
+
+ * Plugins/Hosted/ProxyInstance.h:
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::getPropertyNames):
+ Ask the plug-in host to get the property names and deserialize them.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2009-03-09 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Oliver Hunt and Cameron Zwarich
+
+ https://bugs.webkit.org/show_bug.cgi?id=24440
+
+ The sublayer added to WebHTMLView to host accelerated compositing layers needs to
+ be a subclass of NSView which allows context menu clicks through.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebLayerHostingView rightMouseDown:]):
+ (-[WebHTMLView attachRootLayer:]):
+
+2009-03-08 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Split ScrollAlignment and ScrollBehavior out of RenderLayer.h so that
+ Frame.h no longer needs to include it. This cuts the size of the symbols
+ for a debug build by around 3%.
+
+ * Plugins/WebNetscapePluginView.mm:
+ * WebView/WebFrame.mm:
+ (-[WebFrame _scrollDOMRangeToVisible:]):
+ (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
+ (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView jumpToSelection:]):
+ (-[WebHTMLView centerSelectionInVisibleArea:]):
+
+2009-03-07 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ - fix a bug where debug builds were clearing the HTML5 application cache
+ on application termination
+
+ * WebView/WebView.mm:
+ (-[WebView _close]): Call -[WebCache setDisabled:YES] instead of
+ -[WebCache empty].
+
+2009-03-06 Douglas R. Davidson <ddavidso@apple.com>
+
+ Reviewed by Justin Garcia.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24108
+
+ Update spelling and grammar checking to use the new combined text
+ checking (with automatic language identification) on Snow Leopard.
+
+ * WebCoreSupport/WebEditorClient.h:
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::checkSpellingAndGrammarOfParagraph):
+
+2009-03-05 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=24079
+ <rdar://problem/6611233> REGRESSION (r39549): Page loads cannot be interrupted with Command-. or Escape
+ <rdar://problem/6636563> Ctrl-tab shortcut doesn't switch tabs when focus is in text field
+
+ * WebView/WebHTMLView.mm: (-[WebHTMLView doCommandBySelector:]):
+ If WebKit does not support the command, we need to pass the selector to super. In this case,
+ we'll consider the event not to be handled. This is not perfect because in theory, [super doCommandBySelector:]
+ can do some action that would cause WebKit to need to consider the event handled. But in practice, I've found no
+ example of that happening and causing broken behavior.
+
+2009-03-04 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6206172> Adoption of new Cocoa API for dictionary contextual menu
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
+
+2009-03-04 Adam Barth <abath@webkit.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24356
+
+ Fix WebKit style for allowUniversalAccessFromFileURLs.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences allowUniversalAccessFromFileURLs]):
+ (-[WebPreferences setAllowUniversalAccessFromFileURLs:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-03-03 David Kilzer <ddkilzer@apple.com>
+
+ <rdar://problem/6581203> WebCore and WebKit should install the same set of headers during installhdrs phase as build phase
+
+ Reviewed by Mark Rowe.
+
+ The fix is to add INSTALLHDRS_COPY_PHASE = YES and
+ INSTALLHDRS_SCRIPT_PHASE = YES to WebKit.xcconfig, then to
+ make sure various build phase scripts work with the installhdrs
+ build phase.
+
+ * Configurations/Base.xcconfig: Defined REAL_PLATFORM_NAME
+ based on PLATFORM_NAME to work around the missing definition on
+ Tiger.
+ * Configurations/WebKit.xcconfig: Added
+ WEBCORE_PRIVATE_HEADERS_DIR variable to remove definition of
+ UMBRELLA_FRAMEWORKS_DIR for Debug and Release builds in the
+ Xcode project file. Added INSTALLHDRS_COPY_PHASE = YES and
+ INSTALLHDRS_SCRIPT_PHASE = YES.
+
+2009-03-03 David Kilzer <ddkilzer@apple.com>
+
+ Remove last vestiges of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR from WebKit
+
+ Reviewed by Adam Roben.
+
+ Use of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR was removed in r37465
+ since NPAPI headers had migrated from JavaScriptCore to WebCore
+ before that.
+
+ * Configurations/WebKit.xcconfig: Removed definition of
+ JAVASCRIPTCORE_PRIVATE_HEADERS_DIR used in Production builds.
+
+2009-03-03 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix <rdar://problem/6633834>.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ Create a new plug-in instance if the plug-in host has crashed.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::invalidate):
+ Add a null check for the plug-in host proxy.
+
+2009-03-02 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Enable Geolocation (except on Tiger and Leopard).
+
+ * Configurations/WebKit.xcconfig:
+
+2009-03-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ WebKit part of <rdar://problem/6638658>.
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::createPropertyListFile):
+ Spawn the plug-in host and wait for it to create the property list.
+
+ * Plugins/WebBasePluginPackage.mm:
+ (-[WebBasePluginPackage createPropertyListFile]):
+ Factor code out into a new method.
+
+ (-[WebBasePluginPackage pListForPath:createFile:]):
+ Call the newly added createPropertyListFile method.
+
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage createPropertyListFile]):
+ Tell the plug-in host manager to create a property list file for us.
+
+2009-03-02 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Geoffrey Garen.
+
+ Fix for <rdar://problem/6507404> Add Geolocation support.
+
+ This is not yet turned on for any Mac platform.
+
+ Add SPI to ask the embedding application whether to allow
+ Geolocation for an origin.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::shouldAllowGeolocationForFrame):
+ * WebView/WebUIDelegatePrivate.h:
+
+2009-03-02 Anders Carlsson <andersca@apple.com>
+
+ Fix PowerPC build.
+
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage _tryLoad]):
+
+2009-03-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by John Sullivan, Ada Chan.
+
+ Factor loading code out into its own method and get rid of a bunch of gotos.
+
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage _tryLoad]):
+ (-[WebNetscapePluginPackage load]):
+
+2009-03-02 Anders Carlsson <andersca@apple.com>
+
+ Build fix.
+
+ * Plugins/WebNetscapeDeprecatedFunctions.h:
+
+2009-03-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Rename WebNetscapePluginPackage.m to WebNetscapePluginPackage.mm
+
+ * Plugins/WebNetscapePluginPackage.m: Removed.
+ * Plugins/WebNetscapePluginPackage.mm: Copied from mac/Plugins/WebNetscapePluginPackage.m.
+
+2009-03-01 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKit side of <rdar://problem/6449689>
+
+ Pass the visible name to the plug-in host.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+
+2009-02-27 Alice Liu <alice.liu@apple.com>
+
+ Fix <rdar://problem/6531265> REGRESSION (r39185): adding ".jpeg"
+ extension to images that already have .jpg extension
+
+ Reviewed by Oliver Hunt.
+
+ * WebView/WebHTMLView.mm:
+ (-[NSString matchesExtensionEquivalent:]):
+ (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
+ Relax the check for the proper extension to allow for known
+ equivalents, special-cased in matchesExtensionEquivalent function.
+
+2009-02-27 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ <rdar://problem/6631436>
+ CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::addValueToArray + 55
+
+ Port the NPN_Evaluate code over from WebCore instead of using the frame loader.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::evaluate):
+
+2009-02-27 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ WebKit side of <rdar://problem/6626814>.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCInvokeDefault):
+ Make InvokeDefault async.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::addValueToArray):
+ Handle passing NPObjects back to the plug-in host.
+
+ * Plugins/Hosted/ProxyInstance.h:
+ (WebKit::ProxyInstance::objectID):
+ Add objectID getter.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ Make InvokeDefault a simpleroutine.
+
+2009-02-27 Timothy Hatcher <timothy@apple.com>
+
+ Fixes an exception by null checking the WebResource before adding it to
+ the subresources array.
+
+ <rdar://problem/5950769> Bug in [WebDataSource subresources] can throw an exception
+
+ Reviewed by Geoff Garen and Anders Carlsson.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource subresources]): Null check the WebResource before adding it.
+
+2009-02-27 Timothy Hatcher <timothy@apple.com>
+
+ Adds a workaround for Automator creating a WebView from a secondary thread.
+
+ <rdar://problem/6631951> REGRESSION (Safari 4 Beta): Automator crash on
+ secondary thread beneath -[WebView initWithFrame:frameName:groupName:]
+
+ Reviewed by Geoff Garen.
+
+ * WebView/WebView.mm:
+ (needsWebViewInitThreadWorkaround): Check for com.apple.Automator.
+
+2009-02-27 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Add a preference to reduce the power of file:// URLs.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences allowUniversalAccessFromFileUrls]):
+ (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-02-27 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Anders Carlsson
+
+ https://bugs.webkit.org/show_bug.cgi?id=24242
+
+ setCursor(), and resetCursorRects() on Tiger, were using global, not local
+ coordinates for elementAtPoint:
+
+ * WebView/WebHTMLView.mm:
+ (resetCursorRects):
+ (setCursor):
+
+2009-02-27 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Add a preference to reduce the power of file:// URLs.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences allowUniversalAccessFromFileUrls]):
+ (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-02-26 Adele Peterson <adele@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Fix for <rdar://problem/6618166>
+ https://bugs.webkit.org/show_bug.cgi?id=24216
+ (REGRESSION r36919) Safari 4 Beta causes MSN Messenger's text entry field to lose focus after entering a message
+
+ During a series of firstResponder changes, at some point while the WebHTMLView was losing first responder status,
+ we incorrectly marked the page as active, and then when the WebHTMLView became first responder again, setActive did nothing.
+ This change restores behavior from before r36919 to check if the WebHTMLView is in the middle of losing first responder when calling setActive.
+
+ In addition to updating editing/selection/designmode-no-caret.html results, I also made sure the test cases that were
+ fixed in r36919 and r38570 are still fixed.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView resignFirstResponder]): Keep track if we're in the process of resigning first responder.
+ (-[WebHTMLView _isResigningFirstResponder]): Added.
+ * WebView/WebHTMLViewInternal.h:
+ * WebView/WebView.mm: (-[WebView _updateFocusedAndActiveStateForFrame:]): Don't set the page to be active
+ if the document view is currently resigning first responder.
+
+2009-02-25 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Fix <rdar://problem/6623697>.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::print):
+ Ask the plug-in host to print, create a CGImage of the returned bytes and draw
+ the image into the passed in context.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView drawRect:]):
+ When printing, call NetscapePluginInstanceProxy::print.
+
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2009-02-19 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24024
+ REGRESSION (r39845): Assertion failure in -[WebHistoryItem dictionaryRepresentation] when
+ archiving a submission to about:blank
+
+ I don't know how to make an automated test for this bug.
+
+ * History/WebHistory.mm: (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
+ Account for the fact that HTTP method may be non-empty for non-HTTP requests.
+
+2009-02-25 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Naming change from
+ Bug 24143: Crash occurs at WebCore::AccessibilityTable::isTableExposableThroughAccessibility() when applying a link in GMail
+ https://bugs.webkit.org/show_bug.cgi?id=24143
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _accessibilityTree]):
+
+2009-02-25 Simon Fraser <simon.fraser@apple.com>
+
+ Build fix with ACCELERATED_COMPOSITING turned on.
+
+ I missed a spot in my last commit in renaming to
+ _stoppedAcceleratedCompositingForFrame:
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView close]):
+
+2009-02-25 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ https://bugs.webkit.org/show_bug.cgi?id=23854
+
+ Make an observable property, _isUsingAcceleratedCompositing, on
+ WebView that DumpRenderTree can use to specialize behavior.
+
+ This is implemented via a count of Frames that are using
+ accelerated compositing.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLViewPrivate clear]):
+ (-[WebHTMLView close]):
+ (-[WebHTMLView attachRootLayer:]):
+ (-[WebHTMLView detachRootLayer]):
+ * WebView/WebView.mm:
+ (+[WebView automaticallyNotifiesObserversForKey:]):
+ (-[WebView _startedAcceleratedCompositingForFrame:]):
+ (-[WebView _stoppedAcceleratedCompositingForFrame:]):
+ (-[WebView _isUsingAcceleratedCompositing]):
+ * WebView/WebViewInternal.h:
+ * WebView/WebViewPrivate.h:
+
+2009-02-24 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Geoffrey Garen.
+
+ Related to <rdar://problem/6590295>
+ Allow disabling javascript: urls.
+
+ * WebView/WebView.mm:
+ (-[WebView _setJavaScriptURLsAreAllowed:]):
+ * WebView/WebViewPrivate.h:
+
+2009-02-24 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/6259220> Rename AVAILABLE_AFTER_WEBKIT_VERSION_3_1 (etc.) to match the other macros
+
+ * Carbon/CarbonUtils.h:
+ * Carbon/HIWebView.h:
+ * Plugins/WebPlugin.h:
+ * Plugins/WebPluginViewFactory.h:
+ * WebView/WebUIDelegate.h:
+
+2009-02-24 Peter Ammon <pammon@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Fix <rdar://problem/6251410> Services can modify non-editable content in Safari
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView validRequestorForSendType:returnType:]): Return self only if we can handle
+ both the send and return type. We should also handle a nil send or return type by ignoring
+ the argument and returning whether we can handle the other type passed in.
+
+2009-02-23 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Geoffrey Garen and Darin Adler.
+
+ WebKit side of <rdar://problem/6613151>.
+
+ Make sure to vm_deallocate all memory we get from MIG callbacks.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (DataDeallocator::DataDeallocator):
+ (DataDeallocator::~DataDeallocator):
+ Add a simple deallocator class.
+
+ (WKPCStatusText):
+ (WKPCLoadURL):
+ (WKPCBooleanAndDataReply):
+ (WKPCEvaluate):
+ (WKPCGetStringIdentifier):
+ (WKPCInvoke):
+ (WKPCInvokeDefault):
+ (WKPCConstruct):
+ (WKPCSetProperty):
+ Use the new deallocator class.
+
+2009-02-23 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix <rdar://problem/6450656>.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::insertText):
+ Add insert text which just calls the new WKPH function.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView inputContext]):
+ Get the input context from the shared input panel.
+
+ (-[WebHostedNetscapePluginView keyDown:]):
+ Let the shared input panel have a go at the event first.
+
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ Add new InsertText function.
+
+2009-02-23 Mark Rowe <mrowe@apple.com>
+
+ Fix the build after r41126.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ (WebKit::NetscapePluginInstanceProxy::invokeDefault):
+ (WebKit::NetscapePluginInstanceProxy::construct):
+
+2009-02-22 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - fix <rdar://problem/5966123> REGRESSION (r30741): Generic Sun Applet loading logo appears half off screen
+
+ * WebCoreSupport/WebFrameLoaderClient.mm: Correct a copy & paste error
+ in r30741, and assign the height value, rather than the width, to the
+ "height" parameter.
+
+2009-02-21 Anders Carlsson <andersca@apple.com>
+
+ Fix build.
+
+ * Plugins/Hosted/WebTextInputWindowController.m:
+
+2009-02-20 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add a shared floating text input window implementation, to be used by the hosted plug-in view.
+
+ * Plugins/Hosted/WebTextInputWindowController.h: Added.
+ * Plugins/Hosted/WebTextInputWindowController.m: Added.
+
+2009-02-20 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by andersca.
+
+ <rdar://problem/6496140> Safari sometimes hangs in WKSetMetadataURL for several seconds after downloading a file
+
+ Spawn a background thread for WKSetMetadataURL because this function will not return until mds has journaled the data
+ we are trying to set. Depending on what other I/O is going on, it can take some time.
+
+ * Misc/WebNSFileManagerExtras.m: Import pthread.h and FoundationExtras.h
+ (setMetaData): Added. Calls WKSetMetadataURL().
+ (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Call setMetaData on a background thread
+
+2009-02-19 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - WebKit part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027
+ Do not send loader callbacks during CSS styling
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Reverted the
+ iChat-specific quirk added in <http://trac.webkit.org/changeset/41071>.
+
+2009-02-18 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ - WebKit part of fixing <rdar://problem/6507512> Crash in iChat at CSSStyleSelector::adjustRenderStyle
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Activate the WebCore
+ workaround for this crash in iChat.
+
+2009-02-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix for <rdar://problem/6542390>
+
+ There's no need to call setDefersLoading here - we already defer anything a plug-in can do that
+ would cause a load to begin.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView sendEvent:isDrawRect:]):
+
+2009-02-18 Adam Roben <aroben@apple.com>
+
+ Add SPI to get WebKit's custom pointing-hand cursor
+
+ Reviewed by John Sullivan.
+
+ * WebView/WebView.mm:
+ (+[WebView _pointingHandCursor]): Added. Returns the custom
+ pointing-hand cursor that WebKit uses.
+ * WebView/WebViewPrivate.h: Added +_pointingHandCursor.
+
+2009-02-17 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Antti Koivisto.
+
+ https://bugs.webkit.org/show_bug.cgi?id=23917
+ Allow a WebKit plug-in to act as a proxy for the <audio> and <video>
+ element.
+
+ * Plugins/WebPluginContainerPrivate.h:
+ * Plugins/WebPluginController.mm:
+ (mediaProxyClient): New, cast to HTMLMediaElement if it is a video or audio element
+ (-[WebPluginController _setMediaPlayerProxy:forElement:]): New, pass proxy to HTMLMediaElement
+ (-[WebPluginController _postMediaPlayerNotification:forElement:]): New, deliver event to HTMLMediaElement
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin): Don't allow a media player proxy plug-in to be chosen by
+ file extension, only want a match for the new MIME type proxy plug-ins should have.
+
+2009-02-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ <rdar://problem/6584834> ESPN radio live stream link hangs Safari
+
+ When a plug-in invokes JavaScript code that will destroy the plug-in, we need to
+ defer destruction until we're done executing the script.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::PluginDestroyDeferrer::PluginDestroyDeferrer):
+ (WebKit::PluginDestroyDeferrer::~PluginDestroyDeferrer):
+ Add a simple RAII object for deferring destruction of the plug-in instance.
+
+ (WKPCEvaluate):
+ (WKPCInvoke):
+ (WKPCInvokeDefault):
+ (WKPCConstruct):
+ (WKPCGetProperty):
+ (WKPCSetProperty):
+ (WKPCRemoveProperty):
+ (WKPCHasProperty):
+ (WKPCHasMethod):
+ Use the PluginDestroyDeferrer.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::pluginID):
+ Assert that the plug-in ID is not 0 here.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ Initialize the call depth.
+
+ (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
+ Set the plug-in ID to 0 to aid debugging.
+
+ (WebKit::NetscapePluginInstanceProxy::willCallPluginFunction):
+ Increment the call depth.
+
+ (WebKit::NetscapePluginInstanceProxy::didCallPluginFunction):
+ Decrement the call depth, if it's 0 and we should stop the plug-in, do so.
+
+ (WebKit::NetscapePluginInstanceProxy::shouldStop):
+ If we're called this with a non-zero call depth, set shouldStopSoon to true.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView shouldStop]):
+ Call the proxy.
+
+2009-02-12 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Kevin Decker
+
+ <rdar://problem/6582180> - Wrong HTTP method applied to history item.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::updateGlobalHistory): Check the original request, not any
+ redirected request.
+
+2009-02-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ <rdar://problem/6579412>
+ REGRESSION (3.2.1-ToT): Crash in Silverlight viewing streaming lecture
+
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView userAgent]):
+ Apply workaround for Silverlight workaround.
+
+ (-[WebNetscapePluginView _createPlugin]):
+ Check if the plug-in that we're creating is the silverlight plug-in.
+
+2009-02-12 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler
+
+ Fix potential ref-count or null-deref problems with C++ objects as Obj-C members.
+
+ * History/WebBackForwardList.mm:
+ (-[WebBackForwardList dealloc]): Null check before deref()'ing.
+ (-[WebBackForwardList finalize]): Ditto.
+
+ * Misc/WebIconFetcher.mm:
+ (-[WebIconFetcher dealloc]): Null check before deref()'ing.
+ (-[WebIconFetcher finalize]): Ditto.
+
+ * WebCoreSupport/WebEditorClient.mm: Change to use RefPtr<> instead of ref()/deref().
+ (-[WebEditCommand initWithEditCommand:]):
+ (-[WebEditCommand dealloc]):
+ (-[WebEditCommand finalize]):
+ (-[WebEditCommand command]):
+
+ * WebView/WebArchive.mm: Change to use RefPtr<> instead of ref()/deref().
+ (-[WebArchivePrivate init]):
+ (-[WebArchivePrivate initWithCoreArchive:]):
+ (-[WebArchivePrivate coreArchive]):
+ (-[WebArchivePrivate setCoreArchive:]):
+ (-[WebArchivePrivate dealloc]):
+ (-[WebArchivePrivate finalize]):
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSourcePrivate dealloc]): Null check before deref()'ing.
+ (-[WebDataSourcePrivate finalize]): Ditto.
+
+2009-02-12 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Kevin Decker
+
+ <rdar://problem/6579750> - Crash in WebArchivePrivate in Tiger TextEdit
+
+ NSHTMLReader tries to create a WebArchive from a random chunk of data. Previously, WebArchive creation would
+ fail and return nil and NSHTMLReader would try something else. When we changed the behavior to return an invalid
+ WebArchive object, things started getting weird.
+
+ * WebView/WebArchive.mm:
+ (-[WebArchivePrivate setCoreArchive:]): Null check the pointer before calling ->deref()
+ (-[WebArchivePrivate dealloc]): Remove the ASSERT which is now invalid, and null check the pointer before ->deref().
+ (-[WebArchivePrivate finalize]): Ditto
+ (-[WebArchive initWithData:]): If the LegacyWebArchive cannot be created, return nil instead of an invalid object.
+
+2009-02-11 Mark Rowe <mrowe@apple.com>
+
+ Fix the build.
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate visitedURL:withTitle:]): Use ASSERT_UNUSED in a manner that makes sense.
+
+2009-02-11 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Mark Rowe
+
+ <rdar://problem/6570573> Some visit counts in History.plist have insanely high values, can roll over to negative
+
+ Remove the item from the date caches before registering the visit. Otherwise it might not be successfully removed
+ and when we add it back later it will exist in the list twice. This will cause the entry to be written out twice,
+ which would lead to doubling (or more!) the visit count on next launch when these multiple items are merged.
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate visitedURL:withTitle:]): Swap the removeItemFromDateCaches and visitedWithTitle calls.
+ (-[WebHistoryPrivate addItem:discardDuplicate:]): Add a mode that allows the entry being added to be discarded
+ if an entry for the URL already exists. Use that mode when reading the History.plist so only the most
+ recent entry for a given URL will be used.
+ (-[WebHistoryPrivate addItems:]):
+ (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
+
+2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
+
+ Added a preference to disable some Inspector's panels (rdar://6419624, rdar://6419645).
+ This is controlled via the 'WebKitInspectorHiddenPanels' key; if nothing is specified, all panels are shown.
+
+ Reviewed by Timothy Hatcher.
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::hiddenPanels):
+
+2009-02-11 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6562920> Pasted text should be normalized to NFC
+
+ * Misc/WebNSURLExtras.mm: (-[NSURL _web_userVisibleString]): Route the URL string through
+ -[NSString precomposedStringWithCanonicalMapping].
+
+ * WebCoreSupport/WebPasteboardHelper.mm:
+ (WebPasteboardHelper::plainTextFromPasteboard): Ditto.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
+ Ditto. The affected cases are all plain text ones - RTF, RTFD and HTML are assumed to be
+ precomposed already, and the conversion is performed outside WebKit for those anyway.
+
+2009-02-10 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ <https://bugs.webkit.org/show_bug.cgi?id=23889>, <rdar://problem/6572300>
+ Negative visit counts stored in History.plist aren't corrected.
+
+ It's not clear how a huge negative visit count ended up in History.plist, but we can't
+ trust data read from disk so we can at least reset this to something sane. WebCore has
+ no guard against a visit count overflowing an int, but that seems very unlikely to have
+ caused this.
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem initFromDictionaryRepresentation:]):
+ If a negative visit count is in the dictionary, replace it with 1. If a negative daily or
+ weekly visit count is in the dictionary, replace it with 0.
+
+2009-02-10 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ <https://bugs.webkit.org/show_bug.cgi?id=23891>
+ [WebHistoryItem _setVisitCount:] is unused and should be removed
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem _setVisitCount:]):
+ removed this unused method, which is a synonym for setVisitCount: that was introduced
+ recently and abandoned even more recently
+
+ * History/WebHistoryItemInternal.h:
+ removed declaration of _setVisitCount:
+
+2009-02-10 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ <rdar://problem/6573916>
+ CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::pluginHostDied + 25.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ If we failed to instantiate the plug-in, invalidate the instance proxy.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::invalidate):
+ Remove the instance from the plug-in host's set.
+
+ (WebKit::NetscapePluginInstanceProxy::destroy):
+ Call invalidate().
+
+2009-02-09 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix <https://bugs.webkit.org/show_bug.cgi?id=23863> / <rdar://problem/6571390>.
+ Bug 23863: Reproducible crash in Mail with TOT WebKit when creating a new message
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _removeMouseMovedObserverUnconditionally]): Nil-check _private as it may have not
+ yet been initialized if this WebHTMLView was loaded from a nib.
+ (-[WebHTMLView _removeSuperviewObservers]): Ditto.
+
+2009-02-09 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Dave Hyatt.
+
+ Rename Selection to VisibleSelection to allow us to separate
+ the selections the user works with from the ones used by
+ the JS editing APIs.
+ https://bugs.webkit.org/show_bug.cgi?id=23852
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _selectNSRange:]):
+ * WebView/WebView.mm:
+ (-[WebView textIteratorForRect:]):
+
+2009-02-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Fix crash when plug-in host dies.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+ (WebKit::HostedNetscapePluginStream::didFail):
+
+2009-02-05 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Justin Garcia.
+
+ DOMSelection.getRangeAt() returns a different range than the selection
+ https://bugs.webkit.org/show_bug.cgi?id=23601
+
+ Rename toRange to toNormalizedRange and add new firstRange which returns an unmodified range
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
+ (-[WebFrame _markDOMRange]):
+ (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
+ (-[WebFrame _selectedNSRange]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _selectedRange]):
+ (-[WebTextCompleteController doCompletion]):
+ (-[WebHTMLView selectedAttributedString]):
+ * WebView/WebView.mm:
+ (-[WebView textIteratorForRect:]):
+ (-[WebView selectedDOMRange]):
+
+2009-02-06 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Part III of <rdar://problem/6552272>.
+
+ Refactored to use the redirect data WebCore makes available, instead of
+ tracking loading state in WebKit.
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate dealloc]):
+ (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
+ (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]):
+ * History/WebHistoryInternal.h:
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::updateGlobalHistory):
+ (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
+
+2009-02-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6562220>
+ CrashTracer: [USER] 21 crashes in Safari at com.apple.WebKit • WebKit::NetscapePluginHostProxy::port
+
+ Make the handling of crashes in the plug-in host more robust.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ Add m_portSet.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+ Initialize m_portSet.
+
+ (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
+ Free m_portSet.
+
+ (WebKit::NetscapePluginHostProxy::processRequests):
+ Listen for messages on the port set. If we get a message to the port death notification port,
+ then call pluginHostDied. Otherwise, process the message.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::cleanup):
+ Factor code that should be shared between destroy() and pluginHostDied() into cleanup.
+
+ (WebKit::NetscapePluginInstanceProxy::destroy):
+ Call cleanup().
+
+ (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
+ Call cleanup().
+
+ (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
+ Call NetscapePluginHostProxy::processRequests.
+
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::invalidate):
+ Add a null check for the host proxy.
+
+2009-02-06 Dan Bernstein <mitz@apple.com>
+
+ - try to fix the Tiger build
+
+ * Misc/WebNSArrayExtras.h:
+
+2009-02-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6563650>
+ Add Netscape plug-in API to tell the browser not to load streams (some plug-ins handle network loading manually)
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView loadStream]):
+ (-[WebNetscapePluginView pluginView:receivedData:]):
+ (-[WebNetscapePluginView _shouldCancelSrcStream]):
+
+2009-02-05 Maciej Stachowiak <mjs@apple.com> and Brady Eidson <beidson@apple.com>
+
+ Reviewed by Dan Bernstein and Geoff Garen.
+
+ - WebKit code to track per-day and per-week visit counts in history
+
+ For now this data is only exposed via SPI for performance reasons.
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem initFromDictionaryRepresentation:]): Add parsing support
+ for new data.
+ (-[WebHistoryItem _recordInitialVisit]): Tell WebCore to record an initial visit.
+ (-[WebHistoryItem dictionaryRepresentation]): Add saving support for new data.
+ (-[WebHistoryItem _getDailyVisitCounts:]): SPI accessor.
+ (-[WebHistoryItem _getWeeklyVisitCounts:]): SPI accessor.
+ * History/WebHistoryItemInternal.h: Declare new methods.
+ * History/WebHistoryItemPrivate.h: Ditto.
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate visitedURL:withTitle:]): For the initial visit, use
+ the new _recordInitialVisit method instead of setting visit count to 1.
+
+ * Misc/WebNSArrayExtras.h:
+ * Misc/WebNSArrayExtras.m:
+ (-[NSArray _webkit_numberAtIndex:]): Helper to retrieve an NSNumber or nil from an NSArray
+ (-[NSArray _webkit_stringAtIndex:]): Helper to retrieve an NSString of nil from an NSArray
+
+2009-02-05 Aaron Boodman <aa@chromium.org>
+
+ Reviewed by Dave Hyatt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=23708
+ Adds documentElementAvailable() callback to FrameLoaderClient.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ Stub out documentElementAvailable().
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ Ditto.
+
+2009-02-05 Dan Bernstein <mitz@apple.com>
+
+ - build fix
+
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::initGlobalCallFrame):
+
+2009-02-05 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by John Sullivan and Brady Eidson.
+
+ Fix for <rdar://problem/6557595> REGRESSION: In Mail, selecting a
+ mail note message doesn't display it in Mail's preview pane
+
+ This was failing because revision 36962 removed a version of
+ setVerticalScrollingMode that mail calls. This patch simply adds
+ that method back.
+
+ * WebView/WebDynamicScrollBarsView.m:
+ (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
+
+2009-02-04 Anders Carlsson <andersca@apple.com>
+
+ Build fix fix.
+
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::initGlobalCallFrame):
+
+2009-02-04 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Change PCHasProperty, PCHasMethod and PCGetProperty into simpleroutines.
+
+ Rename PHEvaluateReply to PHBooleanAndDataReply and add PHBooleanReply.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCEvaluate):
+ (WKPCInvoke):
+ (WKPCGetProperty):
+ (WKPCHasProperty):
+ (WKPCHasMethod):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2009-02-04 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Fix 64-bit build.
+
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::initGlobalCallFrame):
+
+2009-02-04 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Part I of <rdar://problem/6552272>.
+
+ Clear the redirectURLs entry when first visiting a site, so sites that
+ only redirect you the first time you visit them can later learn that
+ they don't redirect.
+
+ * History/WebHistory.mm:
+ (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
+
+2009-02-04 Timothy Hatcher <timothy@apple.com>
+
+ Change the WebSourceId typedef from int to intptr_t now that <rdar://problem/6263297> is fixed.
+
+ <rdar://problem/6263293> WebScriptDebugDelegate should use intptr_t for sourceId, not int
+
+ Reviewed by Oliver Hunt.
+
+ * WebView/WebScriptDebugDelegate.h:
+
+2009-02-04 Timothy Hatcher <timothy@apple.com>
+
+ Switched over from using the WebSafeForwarder for the Script Debug
+ delegate and added high performance CallScriptDebugDelegate functions.
+
+ <rdar://problem/6508457> Launching widget in Dashcode debugger is
+ super-slow due forwardInvocation: calling debug delegate
+
+ Reviewed by Oliver Hunt.
+
+ * DefaultDelegates/WebDefaultScriptDebugDelegate.h: Removed.
+ * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Removed.
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::initGlobalCallFrame): Use CallScriptDebugDelegate.
+ (WebScriptDebugger::sourceParsed): Ditto.
+ (WebScriptDebugger::callEvent): Ditto.
+ (WebScriptDebugger::atStatement): Ditto.
+ (WebScriptDebugger::returnEvent): Ditto.
+ (WebScriptDebugger::exception): Ditto.
+ * WebView/WebView.mm:
+ (-[WebViewPrivate dealloc]): Removed scriptDebugDelegateForwarder.
+ (-[WebView _cacheScriptDebugDelegateImplementations]): Added. Gets the
+ method implementations for the script debug delegate. Also caches what
+ didParseSource method to use.
+ (WebViewGetScriptDebugDelegateImplementations): Added. Returns the
+ WebScriptDebugDelegateImplementations structure.
+ (-[WebView setScriptDebugDelegate:]): Call _cacheScriptDebugDelegateImplementations.
+ (CallDelegate): Added more overloaded versions that take different arguments.
+ (CallScriptDebugDelegate): Added overloaded versions that take different arguments.
+ * WebView/WebViewInternal.h:
+
+2009-02-03 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt
+
+ https://bugs.webkit.org/show_bug.cgi?id=23365
+
+ Hook up accelerated compositing layers the native
+ view system on Mac.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::attachRootGraphicsLayer):
+ (WebChromeClient::setNeedsOneShotDrawingSynchronization):
+ New methods to hook up the root GraphicsLayer to the native
+ view system, and to synchronize layer changes with view-based
+ drawing when layers come and go.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLViewPrivate clear]):
+ Clear the pointer to layerHostingView.
+
+ (-[WebHTMLView _setAsideSubviews]):
+ (-[WebHTMLView willRemoveSubview:]):
+ Keep the special layer-hosting view in the subviews even
+ when the rest of the subviews are ripped out for
+ painting.
+
+ (-[WebHTMLView _isUsingAcceleratedCompositing]):
+ New utility method for DumpRenderTree to know if we're
+ hosting layers.
+
+ (-[WebHTMLView drawRect:]):
+ Call -disableScreenUpdatesUntilFlush if we have to
+ synchronize layer changes with painting.
+
+ (-[WebHTMLView attachRootLayer:]):
+ (-[WebHTMLView detachRootLayer]):
+ Attach and detach the root GraphicsLayer.
+
+ * WebView/WebViewInternal.h:
+ * WebView/WebHTMLViewInternal.h:
+ * WebView/WebHTMLViewPrivate.h:
+ New method declarations.
+
+ * WebView/WebView.mm:
+ (-[WebView _needsOneShotDrawingSynchronization]):
+ (-[WebView _setNeedsOneShotDrawingSynchronization:]):
+ Set the flag to say if we need to synchronize layer
+ changes and painting on the next -drawRect: call.
+
+ (-[WebView viewWillMoveToWindow:]):
+ (-[WebView viewDidMoveToWindow]):
+ Call new notifications that the view was added to or removed from
+ the window, which are required by the layer hosting mechanism.
+
+2009-02-02 Geoffrey Garen <ggaren@apple.com>
+
+ Build fix.
+
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
+
+2009-02-02 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Track redirects in global history.
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate dealloc]):
+ (-[WebHistoryPrivate lastVisitedEntry]):
+ (-[WebHistoryPrivate setLastVisitedEntry:]): Remember the last global history
+ entry in case we're asked to add redirect information to it later.
+
+ (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
+ (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]): Record redirect
+ information in global history.
+
+ * History/WebHistoryInternal.h:
+ * WebCoreSupport/WebFrameLoaderClient.h: See above and below.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::updateGlobalHistory):
+ (WebFrameLoaderClient::updateGlobalHistoryForRedirectWithoutHistoryItem): Record redirect
+ information in global history.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame loadRequest:]):
+ (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
+ * WebView/WebFramePrivate.h: Updated for rename and extra parameter.
+
+2009-02-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Work around a limitation in MIG where two functions can't have the same name even if they're
+ not in the same subsystem.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2009-02-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Implement WKPCGetPluginElementObject.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCGetPluginElementNPObject):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView WebCore::]):
+
+2009-02-02 Anders Carlsson <andersca@apple.com>
+
+ Build fix.
+
+ * WebView/WebHTMLView.mm:
+
+2009-02-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Make WebBaseNetscapePluginView hold a reference to a HTMLPlugInElement instead of a DOMElement.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.h:
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
+ (-[WebBaseNetscapePluginView _windowClipRect]):
+ (-[WebBaseNetscapePluginView visibleRect]):
+ (-[WebBaseNetscapePluginView dataSource]):
+ * Plugins/WebKitPluginContainerView.h: Removed.
+ * Plugins/WebKitPluginContainerView.mm: Removed.
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
+ (-[WebNetscapePluginView getVariable:value:]):
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin):
+
+2009-02-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Update for changes to WebCore.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin):
+
+2009-02-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ When a new Web View was not created, report back to the plug-in host.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::performRequest):
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2009-02-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Draw the regular missing plug-in icon instead of a red rect when a plug-in has crashed.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView drawRect:]):
+
+2009-02-02 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Darin Adler.
+
+ Move Frame::forceLayout, Frame::adjustPageHeight and Frame::forceLayoutWithPageWidthRange to FrameView
+
+ https://bugs.webkit.org/show_bug.cgi?id=23428
+
+ FrameView::forceLayout could be killed but the comment might
+ contain a value over the the plain FrameView::layout...
+
+ Adjust the WebCore/WebKit consumers of these methods.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
+ (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
+
+2009-01-31 John Sullivan <sullivan@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=23665
+
+ Cleaned up code to add/remove NSNotification observers, to avoid performance hit
+ of calling removeObserver with unspecified notifications, or calling removeObserver
+ multiple times for the same notification.
+
+ Reviewed by Darin Adler
+
+ * WebView/WebHTMLView.mm:
+ added observingMouseMovedNotifications, observingSuperviewNotifications, and
+ observingWindowNotifications as BOOL ivars of _private object
+ (-[WebHTMLView _removeMouseMovedObserverUnconditionally]):
+ moved to file-internal section of file, added leading underscore, now bails out
+ if we aren't observing the relevant notifications, now records that we are no longer
+ observing the relevant notifications
+ (-[WebHTMLView _removeSuperviewObservers]):
+ ditto, also stores [NSNoticationCenter defaultCenter] in local var to avoid objc dispatch
+ (-[WebHTMLView _removeWindowObservers]):
+ ditto
+ (-[WebHTMLView close]):
+ replace general removeObserver: call with three specific calls for all the notifications
+ that this class actually observes
+ (-[WebHTMLView addMouseMovedObserver]):
+ bail out if already observing relevant notifications, now records that we are observing
+ the relevant notifications
+ (-[WebHTMLView removeMouseMovedObserver]):
+ updated for name change
+ (-[WebHTMLView addSuperviewObservers]):
+ bail out if already observing relevant notifications, now records that we are observing
+ the relevant notifications; also stores [NSNoticationCenter defaultCenter] in local var
+ to avoid objc dispatch
+ (-[WebHTMLView addWindowObservers]):
+ ditto
+ (-[WebHTMLView viewWillMoveToSuperview:]):
+ updated for name change
+ (-[WebHTMLView viewWillMoveToWindow:]):
+ updated for name changes
+
+2009-01-31 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Fix code that assumes all command selectors end in colons.
+ rdar://problem/6545874
+
+ * WebView/WebHTMLView.mm:
+ (commandNameForSelector): Don't assert, just return a null string, when
+ the selector doesn't end in a colon.
+
+2009-01-30 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ Add a pref to disable web security.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences isWebSecurityEnabled]):
+ (-[WebPreferences setWebSecurityEnabled:]):
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-01-30 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Darin Adler.
+
+ Move Frame::sendResizeEvent and Frame::sendScrollEvent to EventHandler
+
+ Carry out the move and catch up in two call sites.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _frameOrBoundsChanged]):
+
+2009-01-30 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Darin Adler.
+
+ isFrameSet was moved from Frame to Document. Update the
+ WebKit usage.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _isFrameSet]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView knowsPageRange:]):
+
+2009-01-30 Geoffrey Garen <ggaren@apple.com>
+
+ Build fix.
+
+ * WebView/WebFramePrivate.h:
+
+2009-01-30 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Split "lockHistory" into "lockHistory" and "lockBackForwardList" in
+ preparation for setting them differently during a redirect.
+
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
+
+2009-01-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix <rdar://problem/6544048>
+
+ Have NetscapePluginInstanceProxy keep track of all the ProxyInstance objects associated.
+
+ When the plug-in instance is destroyed, invalidate all proxy instances.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::destroy):
+ (WebKit::NetscapePluginInstanceProxy::addInstance):
+ (WebKit::NetscapePluginInstanceProxy::removeInstance):
+ * Plugins/Hosted/ProxyInstance.h:
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::ProxyInstance):
+ (WebKit::ProxyInstance::~ProxyInstance):
+ (WebKit::ProxyInstance::invalidate):
+
+2009-01-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix <rdar://problem/6490778>.
+
+ Change the NPRuntime related functions to use IdentifierRep directly, and make sure to always
+ validate IdentifierReps before dereferencing them.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCEvaluate):
+ (WKPCGetStringIdentifier):
+ (WKPCGetIntIdentifier):
+ (identifierFromIdentifierRep):
+ (WKPCInvoke):
+ (WKPCGetProperty):
+ (WKPCSetProperty):
+ (WKPCRemoveProperty):
+ (WKPCHasProperty):
+ (WKPCHasMethod):
+ (WKPCIdentifierInfo):
+
+2009-01-30 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig
+
+ Remove FrameLoaderClient code that is now handled by FrameLoader itself
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::frameLoadCompleted):
+
+2009-01-29 Stephanie Lewis <slewis@apple.com>
+
+ RS by Oliver Hunt.
+
+ Update the order files.
+
+ * WebKit.order:
+
+2009-01-29 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Second step in tracking the urls a HistoryItem was redirected through
+ Add SPI to access the array of redirect urls associated with a HistoryItem.
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem dictionaryRepresentation]):
+ (-[WebHistoryItem _redirectURLs]):
+ * History/WebHistoryItemPrivate.h:
+
+2009-01-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Always activate the plug-in host process if we're in "modal mode" and are being told to activate.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::pluginHostDied):
+ Call endModal here.
+
+ (WebKit::NetscapePluginHostProxy::applicationDidBecomeActive):
+ If we're modal, we should always bring the plug-in host process to the front.
+
+ (WebKit::NetscapePluginHostProxy::beginModal):
+ Add an observer for the NSApplicationWillBecomeActiveNotification callback.
+
+ (WebKit::NetscapePluginHostProxy::endModal):
+ Remove the observer.
+
+2009-01-29 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ First step in tracking the urls a HistoryItem was redirected through.
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem initFromDictionaryRepresentation:]):
+ (-[WebHistoryItem dictionaryRepresentation]):
+ * Misc/WebNSDictionaryExtras.h:
+ * Misc/WebNSDictionaryExtras.m:
+ (-[NSDictionary _webkit_arrayForKey:]): Add helper.
+
+2009-01-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Pass the PSN of the client to the host, and get the PSN of the host back when checking in.
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::hostForPackage):
+ Get the current PSN and pass it to spawnPluginHost.
+
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+ Pass the PSN to the "check in" function.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+
+ (WebKit::NetscapePluginHostProxy::pluginHostDied):
+ Fix a bug noticed by Julien Chaffraix. Call endModal if necessary.
+
+ (WebKit::NetscapePluginHostProxy::beginModal):
+ (WebKit::NetscapePluginHostProxy::endModal):
+ (WebKit::NetscapePluginHostProxy::setModal):
+ Split out the code that does all of the work into beginModal and endModal methods.
+
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView loadStream]):
+
+2009-01-29 David Kilzer <ddkilzer@apple.com>
+
+ Remove semi-colons from the end of ObjC method implementations
+
+ Rubber-stamped by Adam Roben.
+
+ $ find WebKit -name \*.m -o -name \*.mm -exec perl -e 'undef $/; $s = <>; while ($s =~ m/[\n\r][-+].*;[\s\r\n]+\{/g) { print "$ARGV: $&\n"; }' {} \;
+
+ * DefaultDelegates/WebDefaultUIDelegate.m:
+ (-[WebDefaultUIDelegate webView:setResizable:]):
+ (-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):
+ (-[WebDefaultUIDelegate webView:dragSourceActionMaskForPoint:]):
+ (-[WebDefaultUIDelegate webView:willPerformDragSourceAction:fromPoint:withPasteboard:]):
+ * History/WebBackForwardList.mm:
+ (-[WebBackForwardList addItem:]):
+ (-[WebBackForwardList backListWithLimit:]):
+ (-[WebBackForwardList forwardListWithLimit:]):
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem alternateTitle]):
+ (-[WebHistoryItem setViewState:]):
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging:]):
+ * Misc/WebKitNSStringExtras.m:
+ (-[NSString _web_drawAtPoint:font:textColor:]):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView setAttributeKeys:andValues:]):
+ * WebCoreSupport/WebEditorClient.mm:
+ (-[WebEditCommand command]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _getVisibleRect:]):
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView elementAtPoint:allowShadowContent:]):
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences setAllowsAnimatedImages:]):
+ (-[WebPreferences setAutosaves:]):
+ (-[WebPreferences PDFDisplayMode]):
+ * WebView/WebView.mm:
+ (+[WebView _viewClass:andRepresentationClass:forMIMEType:]):
+ (-[WebView _viewClass:andRepresentationClass:forMIMEType:]):
+ (+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]):
+ (+[WebView _registerViewClass:representationClass:forURLScheme:]):
+ (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
+ (-[WebView _insertNewlineInQuotedContent]):
+
+2009-01-28 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Updated for WebCore rename.
+
+ * WebView/WebView.mm:
+ (-[WebView setCustomTextEncodingName:]):
+
+2009-01-28 David Kilzer <ddkilzer@apple.com>
+
+ Add missing declaration for -[NSURL(WebNSURLExtras) _webkit_isFileURL]
+
+ Reviewed by Dan Bernstein.
+
+ * Misc/WebNSURLExtras.h:
+ (-[NSURL(WebNSURLExtras) _webkit_isFileURL]): Added missing
+ declaration after the implementation was added in r9258.
+
+2009-01-28 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ Fix for <rdar://problem/6129678>
+ REGRESSION (Safari 3-4): Local variable not accessible from Dashcode console or variables view
+
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame scopeChain]): Wrap JSActivations in DebuggerActivations.
+
+2009-01-27 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix two bugs with Core Animation based plug-ins.
+
+ 1. The plug-in view was marked as opaque even though it's not.
+ (This would leave garbage in the plug-in view).
+ 2. The plug-in layer needs to have autoresizing turned on.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView setLayer:]):
+
+2009-01-27 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage
+
+ * History/WebHistoryItem.mm:
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::savePlatformDataToCachedFrame):
+ (WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
+ * WebKit.order:
+
+2009-01-26 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add the ability for plug-ins to make WebKit operate in "modal mode"
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+ (WebKit::NetscapePluginHostProxy::pluginHostDied):
+ If the plug-in crashes while we're modal, make sure to leave the modal mode.
+
+ (WebKit::NetscapePluginHostProxy::setModal):
+ (WKPCSetModal):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+
+2009-01-26 John Sullivan <sullivan@apple.com>
+
+ fixed <rdar://problem/6530053> REGRESSION (Leopard): Shift-tab in http authentication window gets
+ stuck in the Name field rather than cycling around
+
+ Reviewed by Dan Bernstein
+
+ * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
+ * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
+ The two static text fields and the last button all had their "next key view" outlets set to the
+ name field, which caused shift-tab from the name field to do the wrong thing. Fixed by making each
+ selectable view have exactly one "next key view" set to it.
+
+2009-01-26 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add the ability for a plug-in to show or hide the menu bar.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+ (WebKit::NetscapePluginHostProxy::pluginHostDied):
+ (WebKit::NetscapePluginHostProxy::setMenuBarVisible):
+ (WKPCSetMenuBarVisible):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+
+2009-01-26 Cameron Zwarich <cwzwarich@uwaterloo.ca>
+
+ Reviewed by Gavin Barraclough.
+
+ Bug 23552: Dashcode evaluator no longer works after making ExecStates actual call frames
+ <https://bugs.webkit.org/show_bug.cgi?id=23552>
+ <rdar://problem/6398839>
+
+ Dashcode will crash when using the evaluator because it saves a global call
+ frame, even after global code has finished executing, and then uses this as
+ a launching pad to execute new JS in the evaluator. The fix is to detect
+ when Dashcode is attempting to do this and execute code from a global call
+ frame instead.
+
+ * ForwardingHeaders/runtime/Protect.h: Added.
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame _initWithGlobalObject:debugger:caller:debuggerCallFrame:]):
+ Added debugger, a WebScriptDebugger* argument.
+ (-[WebScriptCallFrame evaluateWebScript:]): Detect when Dashcode is using
+ a stale WebScriptCallFrame to execute new JS and evaluate it starting from
+ the global object's global call frame instead.
+ * WebView/WebScriptDebugger.h:
+ (WebScriptDebugger::globalObject): Added.
+ (WebScriptDebugger::globalCallFrame): Added.
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::WebScriptDebugger): Initialize m_globalObject.
+ (WebScriptDebugger::initGlobalCallFrame): Created as a clone of callEvent
+ so that the global call frame can be saved immediately after being created.
+ (WebScriptDebugger::callEvent): Pass 'this' as the debugger argument of
+ WebScriptCallFrame's _initWithGlobalObject method.
+
+2009-01-26 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Make WKPCInvoke a simpleroutine.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCInvoke):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+
+2009-01-26 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Implement using plug-in objects as constructors, and setting and getting properties from a plug-in object.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCBooleanAndDataReply):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::Reply::):
+ (WebKit::NetscapePluginInstanceProxy::BooleanAndDataReply::BooleanAndDataReply):
+ Rename NPObjectInvokeReply to BooleanAndDataReply.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::addValueToArray):
+ Fix a cut and paste error.
+
+ (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
+ Handle NPObjects.
+
+ * Plugins/Hosted/ProxyInstance.h:
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyField::valueFromInstance):
+ (WebKit::ProxyField::setValueToInstance):
+ Call the ProxyInstance method.
+
+ (WebKit::ProxyInstance::~ProxyInstance):
+ Release the NPObject.
+
+ (WebKit::ProxyInstance::supportsConstruct):
+ Ask the plug-in host if an instance supports construct.
+
+ (WebKit::ProxyInstance::fieldValue):
+ (WebKit::ProxyInstance::setFieldValue):
+ Call the plug-in host methods.
+
+ * Plugins/Hosted/WebKitPluginHostTypes.h:
+ Rename ObjectValueType to JSObjectValueType, and add NPObjectValueType.
+
+2009-01-26 Mark Rowe <mrowe@apple.com>
+
+ Fix the build.
+
+ Remove -Wformat=2 from the warning flags as newer versions of GCC emit
+ warnings about non-literal format strings for uses of our UI_STRING macro.
+
+ * Configurations/Base.xcconfig:
+
+2009-01-26 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Sam Weinig.
+
+ Clean up after r40240.
+
+ * Configurations/Base.xcconfig: Don't dead code strip in debug builds for now as it leads to link errors.
+ * Plugins/Hosted/HostedNetscapePluginStream.mm: Revert change that is no longer needed now that WebKitPluginHost.defs
+ is back in the build.
+
+2009-01-25 Darin Adler <darin@apple.com>
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm: Added a missing extern "C".
+
+2009-01-25 Darin Adler <darin@apple.com>
+
+ Discussed with Mark Rowe; not sure he reviewed it.
+
+ * Configurations/Base.xcconfig: Add all the same warnings as in WebCore except for
+ -Wcast-qual and -Wunused-parameter, which both need to be off at least for now.
+
+2009-01-25 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Dan Bernstein.
+
+ Improve the consistency of settings in our .xcconfig files.
+
+ * Configurations/Base.xcconfig: Only dead code strip the normal variant.
+ Handle all cases in GCC_GENERATE_DEBUGGING_SYMBOLS.
+
+2009-01-25 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Bug 23522: use checked casts for render tree
+ https://bugs.webkit.org/show_bug.cgi?id=23522
+
+ Step one: RenderText.
+
+ * WebView/WebRenderNode.mm:
+ (copyRenderNode): Use toRenderText.
+
+2009-01-23 Brady Eidson <beidson@apple.com>
+
+ Rubberstamped by Darin Adler
+
+ Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role.
+
+ * WebCoreSupport/WebCachedFramePlatformData.h: Copied from WebKit/mac/WebCoreSupport/WebCachedPagePlatformData.h.
+ (WebCachedFramePlatformData::WebCachedFramePlatformData):
+ * WebCoreSupport/WebCachedPagePlatformData.h: Removed.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::savePlatformDataToCachedPage):
+ (WebFrameLoaderClient::transitionToCommittedFromCachedPage):
+
+ * WebKit.order:
+
+2009-01-23 Adele Peterson <adele@apple.com>
+
+ Build fix.
+
+ Use new linesBoundingBox method instead of
+ boundingBoxWidth and boundingBoxHeight for RenderText objects.
+
+ * WebView/WebRenderNode.mm: (copyRenderNode):
+
+2009-01-23 Anders Carlsson <andersca@apple.com>
+
+ Fix 64-bit build.
+
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::proxyClass):
+
+2009-01-23 Anders Carlsson <andersca@apple.com>
+
+ Fix GCC 4.0 build.
+
+ * Configurations/Base.xcconfig:
+
+2009-01-23 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Turn on -Wmissing-prototypes and fix the resulting warnings.
+
+ * Configurations/Base.xcconfig:
+ * History/WebHistory.mm:
+ (timeIntervalForBeginningOfDay):
+ * History/WebHistoryItem.mm:
+ (historyItemWrappers):
+ * Misc/WebNSPasteboardExtras.mm:
+ (imageFromElement):
+ * WebView/WebFrame.mm:
+ * WebView/WebScriptDebugger.mm:
+ (toNSString):
+
+2009-01-22 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Anders Carlsson.
+
+ Disable GCC_WARN_ABOUT_MISSING_PROTOTYPES temporarily.
+
+ Current versions of Xcode only respect it for C and Objective-C files,
+ and our code doesn't currently compile if it is applied to C++ and
+ Objective-C++ files.
+
+ * Configurations/Base.xcconfig:
+
+2009-01-22 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add support for Invoke and InvokeDefault. Clean up code.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCBooleanReply):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::Reply::):
+ (WebKit::NetscapePluginInstanceProxy::BooleanReply::BooleanReply):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
+ * Plugins/Hosted/ProxyInstance.h:
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::invoke):
+ (WebKit::ProxyInstance::invokeMethod):
+ (WebKit::ProxyInstance::supportsInvokeDefaultMethod):
+ (WebKit::ProxyInstance::invokeDefaultMethod):
+ (WebKit::ProxyInstance::methodsNamed):
+ (WebKit::ProxyInstance::fieldNamed):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ * Plugins/Hosted/WebKitPluginHostTypes.h:
+
+2009-01-22 Eric Roman <eroman@chromium.og>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=20806
+ Deprecate RSSFeedReferrer() and setRSSFeedReferrer().
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem RSSFeedReferrer]):
+ (-[WebHistoryItem setRSSFeedReferrer:]):
+
+2009-01-22 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Don't crash or hang when we fail to instantiate a plug-in.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ Return 0 on failure.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
+ Null check for the proxy member.
+
+2009-01-21 David Hyatt <hyatt@apple.com>
+
+ Devirtualize width/height/x/y on RenderObject and move the methods to RenderBox.
+
+ Reviewed by Eric Seidel and Darin Adler
+
+ * WebView/WebRenderNode.mm:
+ (copyRenderNode):
+
+2009-01-21 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ More browser->plug-in scripting support.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCNPObjectHasPropertyReply):
+ (WKPCNPObjectHasMethodReply):
+ (WKPCNPObjectInvokeReply):
+ MIG reply functions.
+
+ (WKPCIdentifierInfo):
+ Return information about an identifier given its 64-bit value.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ Add new reply structs.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::addValueToArray):
+ Split out code that adds values to the arrays from marshalValue.
+
+ (WebKit::NetscapePluginInstanceProxy::marshalValue):
+ Call addValueToArray.
+
+ (WebKit::NetscapePluginInstanceProxy::marshalValues):
+ Marshal a list of values.
+
+ (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
+ Actually create a proxy instance.
+
+ * Plugins/Hosted/ProxyInstance.h:
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyClass::methodsNamed):
+ (WebKit::ProxyClass::fieldNamed):
+ Add a proxy ProxyClass class that just forwards everything to the ProxyInstance class.
+
+ (WebKit::proxyClass):
+ Shared proxyClass getter.
+
+ (WebKit::ProxyField::ProxyField):
+ (WebKit::ProxyField::valueFromInstance):
+ (WebKit::ProxyField::setValueToInstance):
+ Add a proxy ProxyField class that just forwards everything to the ProxyInstance class.
+
+ (WebKit::ProxyMethod::ProxyMethod):
+ (WebKit::ProxyMethod::serverIdentifier):
+ (WebKit::ProxyMethod::numParameters):
+ Add a dummy ProxyMethod class.
+
+ (WebKit::ProxyInstance::invokeMethod):
+ Call _WKPHNPObjectInvoke.
+
+ (WebKit::ProxyInstance::defaultValue):
+ (WebKit::ProxyInstance::stringValue):
+ (WebKit::ProxyInstance::numberValue):
+ (WebKit::ProxyInstance::booleanValue):
+ (WebKit::ProxyInstance::valueOf):
+ Add dummy implementations (taken from CInstance).
+
+ (WebKit::ProxyInstance::methodsNamed):
+ Call _WKPHNPObjectHasMethod to determine whether a method with the given name exists.
+
+ (WebKit::ProxyInstance::fieldNamed):
+ Call _WKPHNPObjectHasProperty to determine whether a property with the given name exists.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ Add new MIG definitions.
+
+2009-01-21 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Clean up how we force invocations of API that happened on background threads over to the main thread.
+
+ This was previously accomplished in a somewhat ad-hoc manner using a mutable dictionary to pass arguments
+ and return values back from the function. The new approach is to use a proxy object that forwards an
+ NSInvocation over to the main thread and applies it to the target object, which leads to a much cleaner
+ call site.
+
+ * Misc/WebNSObjectExtras.h:
+ * Misc/WebNSObjectExtras.mm:
+ (-[WebMainThreadInvoker initWithTarget:]):
+ (-[WebMainThreadInvoker forwardInvocation:]):
+ (-[WebMainThreadInvoker methodSignatureForSelector:]):
+ (-[WebMainThreadInvoker handleException:]):
+ (-[NSInvocation _webkit_invokeAndHandleException:]): Execute the invocation and forward any exception that was
+ raised back to the WebMainThreadInvoker.
+ (-[NSObject _webkit_invokeOnMainThread]):
+
+ The following methods are updated to use the proxy object to forward methods to the main thread:
+
+ * WebView/WebArchive.mm:
+ (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
+ (-[WebArchive mainResource]):
+ (-[WebArchive subresources]):
+ (-[WebArchive subframeArchives]):
+ * WebView/WebResource.mm:
+ (-[WebResource data]):
+ (-[WebResource URL]):
+ (-[WebResource MIMEType]):
+ (-[WebResource textEncodingName]):
+ (-[WebResource frameName]):
+ (-[WebResource _ignoreWhenUnarchiving]):
+ (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
+ (-[WebResource _initWithData:URL:response:]):
+ (-[WebResource _suggestedFilename]):
+ (-[WebResource _response]):
+ (-[WebResource _stringValue]):
+ * WebView/WebView.mm:
+ (-[WebView initWithFrame:frameName:groupName:]):
+ (-[WebView initWithCoder:]):
+
+2009-01-20 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ Fixes: https://bugs.webkit.org/show_bug.cgi?id=23434 (Add WML <input> element support)
+
+ Protect text field related WebEditorClient.mm methods against non-HTMLElement callers.
+ WebEditorClient.mm relies on HTMLInputElement as input element. Ignore calls from non-HTMLElement elements.
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::textFieldDidBeginEditing):
+ (WebEditorClient::textFieldDidEndEditing):
+ (WebEditorClient::textDidChangeInTextField):
+ (WebEditorClient::doTextFieldCommandFromEvent):
+ (WebEditorClient::textWillBeDeletedInTextField):
+ (WebEditorClient::textDidChangeInTextArea):
+
+2009-01-19 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add and implement GetScriptableNPObject.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCGetScriptableNPObjectReply):
+ Create a new reply struct and set it as the current reply.
+
+ (WKPCEvaluate):
+ Get rid of an unused variable.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::Reply::):
+ (WebKit::NetscapePluginInstanceProxy::GetScriptableNPObjectReply::GetScriptableNPObjectReply):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
+ Call _WKPHGetScriptableNPObject and wait for a reply.
+
+ * Plugins/Hosted/ProxyInstance.h: Added.
+ * Plugins/Hosted/ProxyInstance.mm: Added.
+ Add empty files.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
+ Call NetscapePluginInstanceProxy::createBindingsInstance.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ Add new declarations.
+
+2009-01-19 Sam Weinig <sam@webkit.org>
+
+ Rubber-stamped by Gavin Barraclough.
+
+ Remove temporary operator-> from JSValuePtr.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ (WebKit::NetscapePluginInstanceProxy::hasMethod):
+ (WebKit::NetscapePluginInstanceProxy::marshalValue):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ * WebView/WebView.mm:
+ (aeDescFromJSValue):
+
+2009-01-19 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Make Evaluate an asynchronous method that has a reply method.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCEvaluate):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2009-01-19 Brady Eidson <beidson@apple.com>
+
+ Rubberstamped by Tim Hatcher
+
+ Fix long standing typo.
+
+ * History/WebBackForwardList.h:
+
+2009-01-19 Mark Rowe <mrowe@apple.com>
+
+ Fix the build!
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::demarshalValue):
+ (WebKit::NetscapePluginInstanceProxy::demarshalValues):
+
+2009-01-18 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Fix <https://bugs.webkit.org/show_bug.cgi?id=23414>.
+ Bug 23414: Reproducible crash accessing View menu with plugins disabled
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _canProvideDocumentSource]): Null-check the PluginData before using it.
+
+2009-01-17 David Hyatt <hyatt@apple.com>
+
+ Eliminate dependencies on "backslashAsCurrencySymbol()" from WebKit, and make sure these alterations
+ are done in WebCore instead.
+
+ Reviewed by Oliver Hunt
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _selectedString]):
+ (-[WebFrame _stringForRange:]):
+
+2009-01-17 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Adele Peterson
+
+ Complete <rdar://problem/6293969>
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Remove UseSharedMediaUI
+
+2009-01-15 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ Fix problem where a URL visited as non-GET once is flagged as non-GET forever.
+
+ * History/WebHistory.mm:
+ (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): Always update the HTTPNonGet
+ flag for all loads with an HTTP Method
+
+2009-01-14 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Implement InvokeDefault, Construct, GetProperty and SetProperty.
+
+ Fully implement marshalValue.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCInvokeDefault):
+ (WKPCConstruct):
+ (WKPCGetProperty):
+ (WKPCSetProperty):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::evaluate):
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ (WebKit::NetscapePluginInstanceProxy::invokeDefault):
+ (WebKit::NetscapePluginInstanceProxy::construct):
+ (WebKit::NetscapePluginInstanceProxy::getProperty):
+ (WebKit::NetscapePluginInstanceProxy::setProperty):
+ (WebKit::NetscapePluginInstanceProxy::marshalValue):
+ (WebKit::NetscapePluginInstanceProxy::demarshalValue):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+
+2009-01-14 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Demarshal arguments and pass them to the JS call.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCInvoke):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
+ (WebKit::NetscapePluginInstanceProxy::demarshalValues):
+
+2009-01-14 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ <rdar://problem/6496520> REGRESSION: In Mail, a crash occurs when attempting to display a mail message
+
+ Move WebArchive and WebResource to use the same approach for initializing themselves on the main thread
+ that WebView uses.
+
+ * WebView/WebArchive.mm:
+ (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Use _webkit_performSelectorOnMainThread:withObject:.
+ (-[WebArchive _initWithArguments:]):
+ * WebView/WebResource.mm:
+ (-[WebResource _initWithArguments:]): Unbox the BOOL argument.
+
+2009-01-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix crash I ran into while printing. I was unable to reproduce it, but also,
+ it's clear there's no guarantee that the frame will be non-zero in this case,
+ so it seems fine to check it.
+
+ * WebView/WebHTMLView.mm: (-[WebHTMLView reapplyStyles]): Check frame for zero
+ and don't do anything with it if it's zero.
+
+2009-01-14 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - update copyright
+
+ * Info.plist:
+
+2009-01-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add a bunch of methods to WebKitPluginClient.defs, and implement them.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::fromUTF8WithLatin1Fallback):
+ If the length isn't specified, get it by calling strlen.
+
+ (WKPCEvaluate):
+ Evaluate doesn't take any arguments.
+
+ (WKPCGetIntIdentifier):
+ Call _NPN_GetIntIdentifier.
+
+ (identifierFromServerIdentifier):
+ New helper function that returns a JSC Identifier from an NPIdentifier.
+
+ (WKPCInvoke):
+ Call identifierFromServerIdentifier.
+
+ (WKPCRemoveProperty):
+ (WKPCHasProperty):
+ (WKPCHasMethod):
+ Call NetscapePluginInstanceProxy.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::removeProperty):
+ (WebKit::NetscapePluginInstanceProxy::hasProperty):
+ (WebKit::NetscapePluginInstanceProxy::hasMethod):
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ Add new definitions.
+
+2009-01-13 Anders Carlsson <andersca@apple.com>
+
+ Fix build.
+
+ * WebView/WebView.mm:
+ (-[WebView _initWithArguments:]):
+
+2009-01-13 Timothy Hatcher <timothy@apple.com>
+
+ Adds a workaround for the flip4mac installer plugin decoding a WebView from a NIB on a secondary thread.
+
+ <rdar://problem/6489788> New WebKit thread checks break installation of flip4mac (thread violation)
+
+ Reviewed by Darin Adler.
+
+ * Misc/WebKitVersionChecks.h: Add WEBKIT_FIRST_VERSION_WITHOUT_WEBVIEW_INIT_THREAD_WORKAROUND.
+ * Misc/WebNSObjectExtras.h: Add _webkit_performSelectorOnMainThread:withObject:.
+ * Misc/WebNSObjectExtras.mm:
+ (-[NSObject _webkit_performSelectorWithArguments:]): Renamed from _webkit_getPropertyWithArguments.
+ Passes the optional object to the selector.
+ (-[NSObject _webkit_performSelectorOnMainThread:withObject:]): Renamed from _webkit_getPropertyOnMainThread:.
+ Put the optional object into the arguments dictionary.
+ (-[NSObject _webkit_getPropertyOnMainThread:]): Call _webkit_performSelectorOnMainThread with a nil object.
+ * WebView/WebResource.mm:
+ (-[WebResource _ignoreWhenUnarchiving]): Use _cmd instead of making the selector again.
+ (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): Use the new
+ _webkit_performSelectorOnMainThread:withObject: method instead of performSelectorOnMainThread.
+ * WebView/WebView.mm:
+ (-[WebView _initWithArguments:]): Added. Pulls arguments out of the dictionary and calls the right init method.
+ (needsWebViewInitThreadWorkaround): Checks if the thead is not the main thread and if we are in the Installer bundle.
+ (-[WebView initWithFrame:frameName:groupName:]): Call needsWebViewInitThreadWorkaround and use _webkit_performSelectorOnMainThread
+ to call _initWithArguments: passing the frame, frameName and groupName.
+ (-[WebView initWithCoder:]): Ditto, except pass the coder to _initWithArguments:.
+
+2009-01-12 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Deprecate JSValuePtr::getNumber() - two ways to get a number should be enough.
+
+ * WebView/WebView.mm:
+ (aeDescFromJSValue):
+
+2009-01-12 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler
+
+ <rdar://problem/6468274> - Track Non-get requests in global history
+
+ * History/WebHistory.mm:
+ (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
+ * History/WebHistoryInternal.h:
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem initFromDictionaryRepresentation:]):
+ (-[WebHistoryItem dictionaryRepresentation]):
+ (-[WebHistoryItem _lastVisitWasHTTPNonGet]):
+ * History/WebHistoryItemPrivate.h:
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::updateGlobalHistory): Only pass the method through if it was an HTTP load
+
+2009-01-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Move marshalling into NetscapePluginInstanceProxy.
+
+ Add support for marshallin strings.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCEvaluate):
+ (WKPCInvoke):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::evaluate):
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ (WebKit::NetscapePluginInstanceProxy::marshalValue):
+ * Plugins/Hosted/WebKitPluginHostTypes.h:
+
+2009-01-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Implement WKPCInvoke.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCEvaluate):
+ (WKPCInvoke):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::idForObject):
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+
+2009-01-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Move marshalling code to NetscapePluginInstanceProxy. Add support for marshalling JS objects.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCEvaluate):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::marshalValue):
+ * Plugins/Hosted/WebKitPluginHostTypes.h:
+
+2009-01-12 Julien Chaffraix <jchaffraix@pleyo.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 22861: Turn the FontCache into a singleton
+ https://bugs.webkit.org/show_bug.cgi?id=22861
+
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics cachedFontDataCount]):
+ (+[WebCoreStatistics cachedFontDataInactiveCount]):
+ (+[WebCoreStatistics purgeInactiveFontData]):
+ Redirected all the static calls to the global FontCache
+ instance.
+
+2009-01-11 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=23207
+ Moved currentTime() to from WebCore to WTF.
+
+ * WebView/WebFrame.mm: a different header file included.
+
+2009-01-10 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/5845089> REGRESSION (r30044): Mail custom stationery missing images
+ because of change to -[HTMLObjectElement data]
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Added a thread
+ violation check because I saw this being done off the main thread while testing Mail, and it
+ caused problems. Put all the one time initialization under a single guard to make things just
+ a little faster other times, and to make it clearer which things are one-time. Added a call to
+ the new patchMailRemoveAttributesMethod function.
+ (-[WebView initWithFrame:frameName:groupName:]): Added a thread violation check here too,
+ because I assumed it would be slightly better to have a public method name in the violation
+ message. This calls commonInitialization later, so it will hit that one eventually.
+ (objectElementDataAttribute): Added. Just returns the value of the "data" attribute.
+ (recursivelyRemoveMailAttributes): Added. Patch to an internal Mail method that in turn patches
+ a WebKit method and removes the patch again on the way out.
+ (patchMailRemoveAttributesMethod): Added. On Leopard only, checks the Mail version, and then
+ applies the patch that fixes this bug.
+
+2009-01-09 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - fixed <rdar://problem/6234347> Add/change conditional key
+ bindings for changing paragraph- and character-level writing
+ direction (to match NSTextView)
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Added
+ code to validate makeBaseWritingDirectionLeftToRight: and
+ makeBaseWritingDirectionRightToLeft:.
+ (writingDirectionKeyBindingsEnabled): Changed this function to
+ always return YES, except on Tiger and Leopard.
+ (-[WebHTMLView makeBaseWritingDirectionLeftToRight:]): Renamed
+ changeBaseWritingDirectionToLTR: to this.
+ (-[WebHTMLView makeBaseWritingDirectionRightToLeft:]): Renamed
+ changeBaseWritingDirectionToRTL: to this.
+ (-[WebHTMLView changeBaseWritingDirectionToLTR:]): Now calls
+ makeBaseWritingDirectionLeftToRight:.
+ (-[WebHTMLView changeBaseWritingDirectionToRTL:]): Now calls
+ makeBaseWritingDirectionRightToLeft:.
+ * WebView/WebView.mm: Added makeBaseWritingDirectionLeftToRight
+ and makeBaseWritingDirectionRightToLeft to
+ FOR_EACH_RESPONDER_SELECTOR.
+
+2009-01-08 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add and implement WKPCGetStringIdentifier.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCGetStringIdentifier):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+
+2009-01-08 Stephanie Lewis <slewis@gmail.com>
+
+ Fix Tiger build.
+
+ * WebView/WebTextIterator.mm:
+
+2009-01-08 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add basic support for evaluating scripts.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::fromUTF8WithLatin1Fallback):
+ (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
+ (WKPCReleaseObject):
+ (marshalValue):
+ (WKPCEvaluate):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::releaseObject):
+ (WebKit::NetscapePluginInstanceProxy::evaluate):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHostTypes.h:
+
+2009-01-08 David Hyatt <hyatt@apple.com>
+
+ Fix for <rdar://problem/6465682> REGRESSION: In Mail, can't force a message to auto scroll
+
+ Add a new ChromeClient method for handling exposure of scrolled rects.
+
+ Reviewed by Oliver Hunt
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::scrollRectIntoView):
+
+2009-01-08 Darin Adler <darin@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Bug 23185: add a currentRange method to the WebTextIterator SPI
+ https://bugs.webkit.org/show_bug.cgi?id=23185
+ rdar://problem/6455834
+
+ I also noticed a garbage-collection-related threading issue that I fixed, and
+ that the SPI for getting text was unnecessarily inefficient, so I fixed that too.
+
+ * WebView/WebTextIterator.h: Moved currentNode and currentText into a "deprecated"
+ category. Added currentTextPointer and currentTextLength.
+
+ * WebView/WebTextIterator.mm: Changed m_textIterator into an OwnPtr, and also
+ used _textIterator to be consistent with ObjC rather than C++ naming.
+ (+[WebTextIteratorPrivate initialize]): Added. Calls WebCoreObjCFinalizeOnMainThread,
+ since the finalize method here works with main-thread only WebCore objects.
+ (-[WebTextIterator initWithRange:]): Changed since _textIterator is an OwnPtr now.
+ (-[WebTextIterator advance]): Changed name of m_textIterator. Removed null assertion,
+ since I don't think it provides much value.
+ (-[WebTextIterator atEnd]): Ditto.
+ (-[WebTextIterator currentRange]): Added.
+ (-[WebTextIterator currentTextPointer]): Added.
+ (-[WebTextIterator currentTextLength]): Added.
+ (-[WebTextIterator currentNode]): Did same as above, but also put into new category.
+ (-[WebTextIterator currentText]): Ditto.
+
+2009-01-08 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Simplify Mac interfaces for drawing media controller elements
+
+ <rdar://problem/6293969>
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Update for changes to media controller functions
+
+2009-01-07 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix build.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::idForObject):
+
+2009-01-07 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add a way for a plug-in to get a reference to the Window JS object.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCGetWindowNPObject):
+ Call the appropriate instance.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ Add object ID counter.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::destroy):
+ Clear the object ID map.
+
+ (WebKit::NetscapePluginInstanceProxy::idForObject):
+ New method that returns a unique ID for a given JS object.
+
+ (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
+ Return the object ID for the window JS object.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ Add GetWindowNPObject.
+
+2009-01-07 Darin Adler <darin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 23160: add setMemoryCacheClientCallsEnabled SPI so Safari can be faster with activity window closed
+ https://bugs.webkit.org/show_bug.cgi?id=23160
+
+ * WebView/WebView.mm:
+ (-[WebView setMemoryCacheDelegateCallsEnabled:]): Added.
+ (-[WebView areMemoryCacheDelegateCallsEnabled]): Added
+ * WebView/WebViewPrivate.h: Ditto.
+
+2009-01-05 Gavin Barraclough <baraclough@apple.com>
+
+ Rubber Stamped by Oliver Hunt.
+
+ Replace all uses of JSValue* with new wrapper class, JSValuePtr.
+ See JavaScriptCore/ChangeLog for more detailed description.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame _convertValueToObjcValue:]):
+ (-[WebScriptCallFrame exception]):
+ (-[WebScriptCallFrame evaluateWebScript:]):
+ * WebView/WebView.mm:
+ (aeDescFromJSValue):
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
+
+2009-01-06 Pierre-Olivier Latour <pol@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Exposed through WebFrame private interface the new WebCore API AnimationController::numberOfActiveAnimations() to be used by DRT.
+
+ https://bugs.webkit.org/show_bug.cgi?id=23126
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _numberOfActiveAnimations]):
+ * WebView/WebFramePrivate.h:
+
+2009-01-05 David Kilzer <ddkilzer@apple.com>
+
+ Add SPI to enable, disable and check state of WebIconDatabase
+
+ Reviewed by Darin Adler & Timothy Hatcher.
+
+ Add -[WebIconDatabase isEnabled] and -[WebIconDatabase setEnabled:]
+ SPI to make it possible to enable, disable and check the state of
+ the icon database.
+
+ * Misc/WebIconDatabase.mm:
+ (-[WebIconDatabase init]): Extracted code into -_startUpIconDatabase.
+ (-[WebIconDatabase iconForURL:withSize:cache:]): Switched to use
+ -isEnabled instead of -_isEnabled.
+ (-[WebIconDatabase iconURLForURL:]): Ditto.
+ (-[WebIconDatabase retainIconForURL:]): Ditto.
+ (-[WebIconDatabase releaseIconForURL:]): Ditto.
+ (-[WebIconDatabase isEnabled]): Renamed from -_isEnabled in
+ WebInternal category.
+ (-[WebIconDatabase setEnabled:]): Added. Takes care of changing
+ the enabled/disabled state of the icon database.
+ (-[WebIconDatabase removeAllIcons]): Switched to use -isEnabled
+ instead of -_isEnabled.
+ (-[WebIconDatabase _startUpIconDatabase]): Added. Extrated from
+ -init.
+ (-[WebIconDatabase _shutDownIconDatabase]): Added. Remove
+ observers when the icon database is disabled.
+ * Misc/WebIconDatabaseInternal.h: Added declarations for
+ -_startUpIconDatabase and -_shutDownIconDatabase.
+ * Misc/WebIconDatabasePrivate.h: Added declarations for
+ -isEnabled and -setEnabled:.
+
+2009-01-05 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Jon Honeycutt
+
+ Expose setting the last-visit-was-failure flag on a history items in preparation for <rdar://problem/6173319>
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem _setLastVisitWasFailure:]):
+ * History/WebHistoryItemPrivate.h:
+
+2009-01-05 Adam Treat <adam.treat@torchmobile.com>
+
+ Another blind mac build fix
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::contentsSizeChanged):
+
+2009-01-05 Adam Treat <adam.treat@torchmobile.com>
+
+ Blind mac build fix
+
+ * WebCoreSupport/WebChromeClient.mm:
+
+2009-01-05 Adam Treat <adam.treat@torchmobile.com>
+
+ Fix mac build
+
+ * WebCoreSupport/WebChromeClient.h:
+
+2009-01-05 Adam Treat <adam.treat@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ Build fix for contentsSizeChanged
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::contentsSizeChanged):
+
+2009-01-02 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears
+ inside its web view when resizing its window
+ https://bugs.webkit.org/show_bug.cgi?id=23072
+ rdar://problem/6368028
+
+ The first attempt at fixing this did not work.
+ This time I was able to reproduce the bug and test the fix.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (applyAppleDictionaryApplicationQuirkNonInlinePart): Changed the arguments and
+ function names around a bit to make even less code at the call site.
+ (applyAppleDictionaryApplicationQuirk): Put the check for whether this is the
+ Dictionary application in here.
+ (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache): Put a call to
+ applyAppleDictionaryApplicationQuirk here. This was a case I had missed before,
+ when the script is cached. This fixes one of the two problems with the initial
+ patch; the other fix is in WebCore.
+ (WebFrameLoaderClient::dispatchWillSendRequest): Changed the
+ applyAppleDictionaryApplicationQuirk call here to work the new simpler way.
+
+ * WebView/WebView.mm: Had to add an include due to changes in WebCore header includes.
+
+2009-01-02 Cameron Zwarich <cwzwarich@uwaterloo.ca>
+
+ Reviewed by Darin Adler.
+
+ Bug 23060: REGRESSION (r38629): Cannot scroll a WebHTMLView using Home/End/Page up/Page down
+ <https://bugs.webkit.org/show_bug.cgi?id=23060>
+ <rdar://problem/6467830>
+
+ After r38629, all keyboard events get sent by Editor to the EditorClient, even
+ if the selection is not editable. If the event's command is unsupported by
+ WebHTMLView, WebHTMLView mistakenly thinks that the event was handled when it
+ was not. When using the page up / page down keys, the events generated are of
+ the form scrollPageUp rather than movePageUp, so they are unsupported by
+ WebHTMLView and cause this bug to occur.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView doCommandBySelector:]):
+
+2009-01-02 Darin Adler <darin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears inside its web view when resizing its window
+ https://bugs.webkit.org/show_bug.cgi?id=23072
+ rdar://problem/6368028
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (isAppleDictionaryApplication): Added.
+ (applyAppleDictionaryApplicationQuirk): Added. Under the right conditions, sets
+ a flag to ask HTMLFrameElementBase to ignore the scrolling attribute.
+ (WebFrameLoaderClient::dispatchWillSendRequest): Call the two functions above to
+ apply the quirk when the relevant script is loaded.
+
+2008-12-26 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - fix <rdar://problem/6467608> lastVisitWasFailure flag persists in
+ global history after a successful visit
+
+ * History/WebHistory.mm:
+ (-[WebHistory _visitedURL:withTitle:wasFailure:]): Changed to always
+ update the wasFailure flag on the HistoryItem.
+
+2008-12-23 Darin Adler <darin@apple.com>
+
+ Reviewed by Alexey Proskuryakov (a slightly earlier version).
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=22976
+ crash due to Mail's use of WebArchive and WebResource on non-main thread
+
+ * Misc/WebKitLogging.h: Improved comments for ASSERT_MAIN_THREAD. Got rid of
+ WebKitRunningOnMainThread function, which was just a cover for pthread_main_np.
+ * Misc/WebKitLogging.m: Ditto.
+
+ * Misc/WebKitVersionChecks.h: Added a version after which we won't do the
+ main thread workaround.
+
+ * Misc/WebNSObjectExtras.h: Added a new method, _webkit_getPropertyOnMainThread:,
+ which performs a selector on the main thread, waits for it to complete, and then
+ returns the value on the caller thread.
+ * Misc/WebNSObjectExtras.mm: Added.
+
+ * WebView/WebArchive.mm:
+ (-[WebArchive init]): Added WebCoreThreadViolationCheck.
+ (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Perform
+ initialization on main thread if needMailThreadWorkaround is true.
+ Also added WebCoreThreadViolationCheck.
+ (-[WebArchive initWithData:]): Added WebCoreThreadViolationCheck.
+ (-[WebArchive mainResource]): Get property on main thread if
+ needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
+ (-[WebArchive subresources]): Ditto.
+ (-[WebArchive subframeArchives]): Ditto.
+ (-[WebArchive data]): Ditto.
+ (-[WebArchive _initWithCoreLegacyWebArchive:]): Added WebCoreThreadViolationCheck.
+ (-[WebArchive _coreLegacyWebArchive]): Ditto.
+ (-[WebArchive _initWithArguments:]): Added. Used to implement the cross-thread
+ version of initWithMainResource above.
+
+ * WebView/WebResource.mm:
+ (-[WebResource initWithCoder:]): Added WebCoreThreadViolationCheck.
+ (-[WebResource data]): Get property on main thread if
+ needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
+ (-[WebResource URL]): Ditto.
+ (-[WebResource MIMEType]): Ditto.
+ (-[WebResource textEncodingName]): Ditto.
+ (-[WebResource frameName]): Ditto.
+ (-[WebResource _ignoreWhenUnarchiving]): Ditto.
+ (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
+ Perform initialization on main thread if needMailThreadWorkaround is true.
+ Also added WebCoreThreadViolationCheck.
+ (-[WebResource _suggestedFilename]): Added. Helper for _fileWrapperRepresentation.
+ (-[WebResource _fileWrapperRepresentation]): Rewrote to use methods instead of
+ getting at coreResource directly.
+ (-[WebResource _response]): Get property on main thread if
+ needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
+ (-[WebResource _stringValue]): Ditto.
+ (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Added.
+ (-[WebResource _initWithArguments:]): Added. Used to implement the cross-thread
+ version of _initWithData above.
+
+ * WebView/WebResourceInternal.h: Changed to include WebResourcePrivate.h since internal
+ clients have access to the SPI as well as the API. Added definition of MAIL_THREAD_WORKAROUND
+ and the needMainThreadWorkaround helper function.
+
+ * Misc/WebIconDatabase.mm: Removed include of now-defunct FoundationExtras.h
+ file. This probably fixes clean builds.
+ * WebCoreSupport/WebIconDatabaseClient.mm: Ditto.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm: Removed include of WebResourcePrivate.h,
+ since it's not actually used.
+ * WebView/WebDataSource.mm: Ditto.
+ * WebView/WebHTMLRepresentation.mm: Ditto.
+
+2008-12-23 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=22979
+ crash seen in -[WebView drawsBackground] when quitting
+ <rdar://problem/6464601>
+
+ * WebView/WebView.mm:
+ (-[WebView drawsBackground]): Added comment and a null check for _private.
+
+2008-12-22 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/6449588> REGRESSION (r38279-r38280): Minimize them remaximize a window with a flash plugin, plugin doesn't resume at full speed
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView windowDidDeminiaturize:]): Deminiaturizing should restart timers, not stop timers.
+
+2008-12-19 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler, Adele Peterson, Brady Eidson.
+
+ Added SPI for getting an unsorted vector of all items in history.
+
+ * History/WebHistory.h:
+ * History/WebHistory.mm:
+ (-[WebHistory allItems]):
+
+2008-12-18 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - implement FrameLoaderClient::shouldUseCredentialStorage() by calling
+ a new resource load delegae method.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::shouldUseCredentialStorage): Added. Calls the
+ delegate method. If the method is unimplemented, returns true for
+ backwards compatibility.
+ * WebView/WebView.mm:
+ (-[WebView _cacheResourceLoadDelegateImplementations]): Initialize the
+ shouldUseCredentialStorageFunc member.
+ (CallResourceLoadDelegateReturningBoolean): Added.
+ * WebView/WebViewInternal.h:
+ * WebView/WebResourceLoadDelegatePrivate.h: Declared the delegate method
+ -webView:resource:shouldUseCredentialStorageForDataSource:.
+
+2008-12-18 Cameron Zwarich <zwarich@apple.com>
+
+ Reviewed by Jonathan Honeycutt.
+
+ Fix an apparent typo in r39385 that is causing lots of crashes.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
+
+2008-12-18 Brady Eidson <beidson@apple.com>
+
+ Reviewed by John Sullivan
+
+ Initial visit to a website creates history items that start with a visit count of
+ zero instead of one
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate visitedURL:withTitle:]): Set the visit count on new items
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem _setVisitCount:]): Call through to the WebCore item
+ * History/WebHistoryItemInternal.h:
+
+2008-12-18 Sam Weinig <sam@webkit.org>
+
+ Reviewed by John Sullivan.
+
+ Implement FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout() by calling
+ a new private frame load delegate method.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
+ * WebView/WebView.mm:
+ (-[WebView _cacheFrameLoadDelegateImplementations]):
+ * WebView/WebViewInternal.h:
+ * WebView/WebViewPrivate.h:
+
+2008-12-16 Antti Koivisto <antti@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Add version check for shift-reload behavior.
+
+ * Misc/WebKitVersionChecks.h:
+ * WebView/WebFrame.mm:
+ (-[WebFrame reload]):
+
+2008-12-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Start sending keyboard events to the plug-in host.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::keyEvent):
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView keyDown:]):
+ (-[WebHostedNetscapePluginView keyUp:]):
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2008-12-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ <rdar://problem/6450538>
+
+ Fix flag enumeration.
+
+ * Plugins/Hosted/WebKitPluginHostTypes.h:
+
+2008-12-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Instead of passing a gazillion booleans to WKPCLoadURL, pass a single set of flags.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCLoadURL):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::loadURL):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHostTypes.h:
+
+2008-12-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Add trailing null to headers to avoid a crash in the plug-in host.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+ (WebKit::HostedNetscapePluginStream::didReceiveResponse):
+
+2008-12-15 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Cameron Zwarich.
+
+ <rdar://problem/6289933> Change WebKit-related projects to build with GCC 4.2 on Leopard.
+
+ * Configurations/Base.xcconfig:
+ * Configurations/DebugRelease.xcconfig:
+
+2008-12-15 Stephanie Lewis <slewis@apple.com>
+
+ Fix build.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+
+2008-12-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Change InstantiatePlugin to be asynchronous so we won't deadlock if the plug-in tries to call
+ back into us while it's being instantiated.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ (WebKit::NetscapePluginHostProxy::clientPort):
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCInstantiatePluginReply):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::Reply::):
+ (WebKit::NetscapePluginInstanceProxy::Reply::Reply):
+ (WebKit::NetscapePluginInstanceProxy::Reply::~Reply):
+ (WebKit::NetscapePluginInstanceProxy::InstantiatePluginReply::InstantiatePluginReply):
+ (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
+ (WebKit::NetscapePluginInstanceProxy::waitForReply):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2008-12-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Let WebKit generate a plug-in ID instead of having the plug-in host do it.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ Create the plug-in proxy before instantiating the plug-in.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::create):
+ (WebKit::NetscapePluginInstanceProxy::setRenderContextID):
+ (WebKit::NetscapePluginInstanceProxy::setUseSoftwareRenderer):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2008-12-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ LoadURL doesn't need to be asynchronous.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCLoadURL):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2008-12-15 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - Add [WebFrame reloadFromOrigin] for performing end-to-end reload.
+ - Add corresponding IBAction to WebView.
+ - Temporarily make [WebFrame reload] trigger end-to-end reload if shift modifier is pressed when it is called.
+
+ * WebView/WebFrame.h:
+ * WebView/WebFrame.mm:
+ (-[WebFrame reload]):
+ (-[WebFrame reloadFromOrigin]):
+ * WebView/WebFramePrivate.h: Match the FrameLoadType enum in WebCore.
+ * WebView/WebView.h:
+ * WebView/WebView.mm:
+ (-[WebView reloadFromOrigin:]):
+
+2008-12-14 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - fix <rdar://problem/3258561> WebHistoryAllItemsRemovedNotification
+ should add items to userInfo
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate allItems]): Added this helper method, which returns
+ all values in the _entriesByURL dictionary.
+ (-[WebHistory removeAllItems]): Changed to send the array of all items
+ in the notification.
+
+2008-12-13 Darin Adler <darin@apple.com>
+
+ - <rdar://problem/6441035> WebTextIterator class not exported in WebKit
+
+ * WebKit.exp: Added the class. We forgot to export it when we added
+ the WebTextIterator SPI.
+
+2008-12-12 Darin Adler <darin@apple.com>
+
+ Rubber stamped by Adam Roben.
+
+ - fix <rdar://problem/5648301> Can't tab around to text fields in Safari
+ login sheet after clicking static text, due to AppKit key loop change
+
+ * Panels/English.lproj/WebAuthenticationPanel.nib/classes.nib: Removed.
+ * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib: Added.
+ * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib: Removed.
+ * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
+ Set nextKeyView of the selectable static texts to the editable text.
+ Updated nib format.
+
+2008-12-12 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Shrink Cache Sizes.
+
+ * WebView/WebView.mm:
+ (+[WebView _setCacheModel:]):
+
+2008-12-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Don't try to free the dummy "1" port state.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView sendEvent:isDrawRect:]):
+ (-[WebNetscapePluginView updateAndSetWindow]):
+
+2008-12-11 Cameron Zwarich <zwarich@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ Roll out r39212 due to assertion failures during layout tests, multiple
+ layout test failures, memory leaks, and obvious incorrectness.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences fullDocumentTeardownEnabled]):
+ * WebView/WebPreferencesPrivate.h:
+
+2008-12-11 Stephanie Lewis <slewis@apple.com>
+
+ Fix build.
+
+ * WebView/WebView.mm:
+
+2008-12-11 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Empty Web cache before quitting a debug build in order
+ to report accurate CachedResource leaks.
+
+ * WebView/WebView.mm:
+ (-[WebView _close]):
+
+2008-12-11 Anders Carlsson <andersca@apple.com>
+
+ Fix Tiger build.
+
+ * Misc/WebNSDataExtras.h:
+
+2008-12-11 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Cameron Zwarich.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22797
+ REGRESSION: Crash at http://news.cnet.com/8301-17939_109-10119149-2.html
+
+ Make sure to protect the stream because destroyStream can otherwise cause it to be deleted.
+
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::destroyStreamWithReason):
+
+2008-12-10 Glenn Wilson <gwilson@google.com>
+
+ Reviewed by Adam Roben.
+
+ Added new methods for overriding default WebPreference values
+ and for resetting preferences to their defaults.
+ https://bugs.webkit.org/show_bug.cgi?id=20534
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences resetToDefaults]): new method
+ (-[WebPreferences overridePreference:flag:]): new method
+ * WebView/WebPreferencesPrivate.h: new method signatures
+
+2008-12-10 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Implement support for NPN_PostURL/NPN_PostURLNotify in WebKit.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ Add stopAllStreams.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::stopAllStreams):
+ Factored out this from ::destroy.
+
+ (WebKit::NetscapePluginInstanceProxy::destroy):
+ Call stopAllStreams().
+
+ (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
+ Ditto.
+
+ (WebKit::NetscapePluginInstanceProxy::loadURL):
+ Handle post being true. This code has been copied from WebNetscapePluginView.mm (for now).
+
+2008-12-10 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Move two NSData category methods to WebNSDataExtras.m.
+
+ * Misc/WebNSDataExtras.h:
+ * Misc/WebNSDataExtras.m:
+ (-[NSData _web_startsWithBlankLine]):
+ (-[NSData _web_locationAfterFirstBlankLine]):
+ * Plugins/WebNetscapePluginView.mm:
+
+2008-12-10 Alice Liu <alice.liu@apple.com>
+
+ fixed https://bugs.webkit.org/show_bug.cgi?id=20685
+
+ Reviewed by Darin Adler.
+
+ * Misc/WebNSPasteboardExtras.mm:
+ Ask image for its file extension instead of falling back on MIME type and file path.
+ Also moved this code to before setting the pasteboard data so as not to set any if
+ no extension can be determined.
+ (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
+
+ * WebView/WebHTMLView.mm:
+ Fixed a separate but related long-standing bug of how the filename for the promised
+ drag data is determined by asking the image for a proper file extension.
+ (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
+
+2008-12-09 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix typecast.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
+
+2008-12-09 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Implement software rendering of hosted plug-ins.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCInvalidateRect):
+ New MiG function. This is called by the plug-in host when it has drawn something.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.h:
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView createPlugin]):
+ Create a software renderer.
+
+ (-[WebHostedNetscapePluginView destroyPlugin]):
+ Destroy the software renderer.
+
+ (-[WebHostedNetscapePluginView drawRect:]):
+ Draw using the software renderer.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ Add InvalidateRect.
+
+2008-12-09 Brett Wilson <brettw@chromium.org>
+
+ Reviewed by Dave Hyatt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22177
+
+ Add a callback on ChromeClient that the state of form elements on
+ the page has changed. This is to allow clients implementing session
+ saving to know when the current state is dirty.
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::formStateDidChange):
+
+2008-12-09 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Make sure to pause null events for hosted plug-ins as well.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
+
+2008-12-09 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+ (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
+ Unfortunately we can't use a libdispatch source right now, because of <rdar://problem/6393180>.
+
+2008-12-09 Timothy Hatcher <timothy@apple.com>
+
+ Implement a few methods needed to keep Dictionary.app working on Leopard.
+
+ <rdar://problem/6002160> Internal changes to WebKit in Safari 4
+ Developer Preview might break Dictionary
+
+ Reviewed by Dan Bernstein.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame convertNSRangeToDOMRange:]): Added. Calls _convertNSRangeToDOMRange.
+ (-[WebFrame convertDOMRangeToNSRange:]): Added. Calls _convertDOMRangeToNSRange.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _bridge]): Added. Returns the WebFrame, which has the methods
+ that Dictionary.app is using.
+
+2008-12-08 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ More work towards getting NPN_GetURL working.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.h:
+ Inherit from NetscapePlugInStreamLoaderClient.
+
+ (WebKit::HostedNetscapePluginStream::streamID):
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+ (WebKit::HostedNetscapePluginStream::startStream):
+ Keep track of the resposne URL and the MIME type. Pass the response URL to the
+ plug-in host.
+
+ (WebKit::HostedNetscapePluginStream::didFinishLoading):
+ Disconnect the stream.
+
+ (WebKit::HostedNetscapePluginStream::start):
+ Create a plug-in stream loader and start loading.
+
+ (WebKit::HostedNetscapePluginStream::stop):
+ Cancel the load.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCLoadURL):
+ Fix the parameter order.
+
+ (WKPCCancelLoadURL):
+ New function that cancels a load of a stream with a given reason.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::destroy):
+ Stop the streams.
+
+ (WebKit::NetscapePluginInstanceProxy::pluginStream):
+ Return a plug-in stream given a stream ID.
+
+ (WebKit::NetscapePluginInstanceProxy::disconnectStream):
+ Remove the stream from the streams map.
+
+ (WebKit::NetscapePluginInstanceProxy::loadRequest):
+ Create a stream and load it.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ Add CancelLoadURL.
+
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ Add responseURL to StartStream.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView pluginPackage]):
+ Move this down to the base class from WebNetscapePluginView.
+
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+
+2008-12-08 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - WebKit/mac part of tracking the global history item for a WebView
+
+ * WebView/WebView.mm:
+ (-[WebView _globalHistoryItem]): Added. Returns the page's global
+ history item.
+ * WebView/WebViewPrivate.h:
+
+2008-12-06 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt
+
+ https://bugs.webkit.org/show_bug.cgi?id=15671
+
+ VisiblePosition::caretRect() was renaemd to absoluteCaretBounds().
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _caretRectAtNode:offset:affinity:]):
+
+2008-12-06 David Kilzer <ddkilzer@apple.com>
+
+ Bug 22666: Clean up data structures used when collecting URLs of subresources for webarchives
+
+ <https://bugs.webkit.org/show_bug.cgi?id=22666>
+
+ Reviewed by Darin Adler.
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMNode _subresourceURLs]): Changed from using Vector<KURL> to
+ ListHashSet<KURL> when calling WebCore::Node::getSubresourceURLs().
+
+2008-12-05 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6405599> Tiger Mail crashes when using "Mail Contents of This Page"
+ in Safari before opening a mail message in Mail
+
+ * Carbon/CarbonWindowAdapter.m: Removed.
+ * Carbon/CarbonWindowAdapter.mm: Copied from WebKit/mac/Carbon/CarbonWindowAdapter.m.
+ (+[CarbonWindowAdapter initialize]):
+ * History/WebBackForwardList.mm:
+ (+[WebBackForwardList initialize]):
+ * History/WebHistoryItem.mm:
+ (+[WebHistoryItem initialize]):
+ * Misc/WebElementDictionary.mm:
+ (+[WebElementDictionary initialize]):
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (+[WebHostedNetscapePluginView initialize]):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ * Plugins/WebBasePluginPackage.m: Removed.
+ * Plugins/WebBasePluginPackage.mm: Copied from WebKit/mac/Plugins/WebBasePluginPackage.m.
+ (+[WebBasePluginPackage initialize]):
+ * Plugins/WebNetscapePluginView.mm:
+ (+[WebNetscapePluginView initialize]):
+ * WebCoreSupport/WebEditorClient.mm:
+ (+[WebEditCommand initialize]):
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ * WebView/WebArchive.mm:
+ (+[WebArchivePrivate initialize]):
+ * WebView/WebDataSource.mm:
+ (+[WebDataSourcePrivate initialize]):
+ * WebView/WebHTMLView.mm:
+ (+[WebHTMLViewPrivate initialize]):
+ (+[WebHTMLView initialize]):
+ * WebView/WebResource.mm:
+ (+[WebResourcePrivate initialize]):
+ * WebView/WebView.mm:
+ (+[WebViewPrivate initialize]):
+ Call JSC::initializeThreading();
+
+2008-12-04 Stephanie Lewis <slewis@apple.com>
+
+ Fix build.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCLoadURL):
+
+2008-12-04 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ More work on streams.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.h: Added.
+ (WebKit::HostedNetscapePluginStream::create):
+ * Plugins/Hosted/HostedNetscapePluginStream.mm: Added.
+ (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
+ (WebKit::HostedNetscapePluginStream::startStreamWithResponse):
+ (WebKit::HostedNetscapePluginStream::startStream):
+ (WebKit::HostedNetscapePluginStream::didReceiveData):
+ (WebKit::HostedNetscapePluginStream::didFinishLoading):
+ (WebKit::HostedNetscapePluginStream::didReceiveResponse):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::pluginView):
+ (WebKit::NetscapePluginInstanceProxy::hostProxy):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest):
+ (WebKit::NetscapePluginInstanceProxy::PluginRequest::requestID):
+ (WebKit::NetscapePluginInstanceProxy::PluginRequest::request):
+ (WebKit::NetscapePluginInstanceProxy::PluginRequest::frameName):
+ (WebKit::NetscapePluginInstanceProxy::PluginRequest::didStartFromUserGesture):
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ (WebKit::NetscapePluginInstanceProxy::performRequest):
+ (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript):
+ (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
+ (WebKit::NetscapePluginInstanceProxy::loadRequest):
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2008-12-04 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Start implementing WKPCLoadURL. Currently this has copied a lot of code from WebNetscapePluginView
+ but once we have a more complete implementation of NPStreams we can start refactoring things so that the
+ implementations can share more code.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCLoadURL):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ (WebKit::NetscapePluginInstanceProxy::loadURL):
+ (WebKit::NetscapePluginInstanceProxy::performRequest):
+ (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
+ (WebKit::NetscapePluginInstanceProxy::loadRequest):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2008-12-04 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Move requestWithURLCString to WebBaseNetscapePluginView.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView requestWithURLCString:]):
+ * Plugins/WebNetscapePluginView.mm:
+
+2008-12-03 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Move WebPluginRequest to its own file.
+
+ * Plugins/WebNetscapePluginView.mm:
+ * Plugins/WebPluginRequest.h: Added.
+ * Plugins/WebPluginRequest.m: Added.
+ (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]):
+ (-[WebPluginRequest dealloc]):
+ (-[WebPluginRequest request]):
+ (-[WebPluginRequest frameName]):
+ (-[WebPluginRequest isCurrentEventUserGesture]):
+ (-[WebPluginRequest sendNotification]):
+ (-[WebPluginRequest notifyData]):
+
+2008-12-03 Anders Carlsson <andersca@apple.com>
+
+ Handle the CA model.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView setWindowIfNecessary]):
+
+2008-12-03 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ <rdar://problem/6412293>
+ Call NPP_SetWindow for CA plug-ins.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+ (-[WebNetscapePluginView restorePortState:]):
+ (-[WebNetscapePluginView isNewWindowEqualToOldWindow]):
+ (-[WebNetscapePluginView updateAndSetWindow]):
+ (-[WebNetscapePluginView setWindowIfNecessary]):
+
+2008-12-03 Anders Carlsson <andersca@apple.com>
+
+ Fix the release build.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):
+
+2008-12-03 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6412234>
+ Don't crash if we can't launch the plug-in host.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+
+2008-12-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Start processing messages sent to the client port.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ Add a map from ports to plug-in proxies. Turn the set of instances into a map from
+ pluginID to instance proxy.
+
+ (WKPCStatusText):
+ Look up the right instance proxy and call status().
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::pluginID):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::status):
+ Implement this.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ Add the plug-in ID to StatusText.
+
+2008-12-02 Gregory Hughes <ghughes@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Bug 22513: ZOOM: text selection does not send correct zoom bounds
+
+ When zoomed, text selection must send the zoom bounds in flipped
+ screen coordinates.
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory accessibilityConvertScreenRect:]):
+
+2008-12-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Create a client mach port and pass it to the plug-in host.
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::hostForPackage):
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2008-12-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Let the plug-in views know if the plug-in host crashes.
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::pluginHostDied):
+ (WebKit::NetscapePluginHostProxy::addPluginInstance):
+ (WebKit::NetscapePluginHostProxy::removePluginInstance):
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::create):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ Keep a pointer to the host proxy.
+
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ Add the instance to the host set.
+
+ (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
+ Remove the instance form the host set.
+
+ (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
+ Tell the plug-in view that the plug-in died.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.h:
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView createPlugin]):
+ Pass the plug-in view to the instantiatePlugin.
+
+ (-[WebHostedNetscapePluginView pluginHostDied]):
+ Handle the plug-in host crashing.
+
+ (-[WebHostedNetscapePluginView drawRect:]):
+ Fill the plug-in view with a nice red shade if the plug-in crashes.
+
+2008-12-01 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Recover if the plug-in host dies and we try to instantiate another plugin before we get the port death notification
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::pluginHostDied):
+ Remove the plug-in host from the map.
+
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ NetscapePluginHostProxy is no longer refcounted.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ This is no longer refcounted. Add a set of plug-in instances (unused for now).
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+ Create a death notification port.
+
+ (WebKit::NetscapePluginHostProxy::pluginHostDied):
+ Tell the manager that we're gone and delete ourselves.
+
+ (WebKit::NetscapePluginHostProxy::deathPortCallback):
+ New CFMachPort callback.
+
+2008-12-01 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Move instantiatePlugin to NetscapePluginHostManager.
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView createPlugin]):
+
+2008-12-01 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Pass the plug-in host port directly to the instance proxy.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::instantiatePlugin):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::create):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ (WebKit::NetscapePluginInstanceProxy::resize):
+ (WebKit::NetscapePluginInstanceProxy::destroy):
+ (WebKit::NetscapePluginInstanceProxy::focusChanged):
+ (WebKit::NetscapePluginInstanceProxy::windowFocusChanged):
+ (WebKit::NetscapePluginInstanceProxy::windowFrameChanged):
+ (WebKit::NetscapePluginInstanceProxy::startTimers):
+ (WebKit::NetscapePluginInstanceProxy::mouseEvent):
+ (WebKit::NetscapePluginInstanceProxy::stopTimers):
+
+2008-12-01 Anders Carlsson <andersca@apple.com>
+
+ Try to fix the Tiger build.
+
+ * Plugins/WebNetscapePluginView.mm:
+
+2008-12-01 Anders Carlsson <andersca@apple.com>
+
+ Rename _layer to _pluginLayer where I forgot to do so.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView destroyPlugin]):
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView createPlugin]):
+ (-[WebNetscapePluginView setLayer:]):
+ (-[WebNetscapePluginView destroyPlugin]):
+
+2008-12-01 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Make sure to re-insert layers as needed so they won't be lost when the layer backed
+ view is removed from the view hierarchy.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.h:
+ Add _pluginLayer ivar.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView createPlugin]):
+ Don't add the layer here.
+
+ (-[WebHostedNetscapePluginView setLayer:]):
+ Instead, add it here.
+
+ (-[WebHostedNetscapePluginView destroyPlugin]):
+ Set _pluginLayer to 0.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView createPlugin]):
+ Don't add the layer here.
+
+ (-[WebNetscapePluginView setLayer:]):
+ Do it here.
+
+2008-11-30 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22557
+
+ Report free size in central and thread caches too.
+
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics memoryStatistics]):
+
+2008-11-29 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22557
+ Add statistics for JavaScript GC heap.
+
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics javaScriptObjectsCount]):
+ (+[WebCoreStatistics memoryStatistics]):
+
+2008-11-29 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22557
+
+ - Add purgeable memory statistics to cache statistics.
+ - Add method for getting fastMalloc statistics.
+ - Add method to force returning free memory back to system.
+
+ * Misc/WebCache.mm:
+ (+[WebCache statistics]):
+ * Misc/WebCoreStatistics.h:
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics stopIgnoringWebCoreNodeLeaks]):
+ (+[WebCoreStatistics memoryStatistics]):
+ (+[WebCoreStatistics returnFreeMemoryToSystem]):
+
+2008-11-26 Mark Rowe <mrowe@apple.com>
+
+ Fix the Tiger build.
+
+ mig.h does not always define __MigTypeCheck on Tiger, which leads to problems when the generated
+ code is built with -Wundef.
+
+ * Plugins/Hosted/WebKitPluginHostTypes.h:
+
+2008-11-26 Anders Carlsson <andersca@apple.com>
+
+ Fix build.
+
+ * Configurations/Base.xcconfig:
+
+2008-11-26 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Move WebHostedNetscapePluginView.{h|mm} to Plugins/Hosted.
+
+ (-[WebHostedNetscapePluginView handleMouseMoved:]):
+ (-[WebHostedNetscapePluginView setAttributeKeys:andValues:]):
+ Fix a leak.
+
+ (-[WebHostedNetscapePluginView createPlugin]):
+ Instantiate the plug-in, store the plug-in proxy in the _proxy ivar.
+
+ (-[WebHostedNetscapePluginView loadStream]):
+ (-[WebHostedNetscapePluginView shouldStop]):
+ Add stubs for these.
+
+ (-[WebHostedNetscapePluginView updateAndSetWindow]):
+ (-[WebHostedNetscapePluginView windowFocusChanged:]):
+ (-[WebHostedNetscapePluginView destroyPlugin]):
+ (-[WebHostedNetscapePluginView startTimers]):
+ (-[WebHostedNetscapePluginView stopTimers]):
+ (-[WebHostedNetscapePluginView focusChanged]):
+ (-[WebHostedNetscapePluginView windowFrameDidChange:]):
+ (-[WebHostedNetscapePluginView mouseDown:]):
+ (-[WebHostedNetscapePluginView mouseUp:]):
+ (-[WebHostedNetscapePluginView mouseDragged:]):
+ (-[WebHostedNetscapePluginView mouseEntered:]):
+ (-[WebHostedNetscapePluginView mouseExited:]):
+ Call the proxy.
+
+ (-[WebHostedNetscapePluginView addWindowObservers]):
+ (-[WebHostedNetscapePluginView removeWindowObservers]):
+ Add/remove observers for when the window frame changes.
+
+ * Plugins/WebHostedNetscapePluginView.h: Removed.
+ * Plugins/WebHostedNetscapePluginView.mm: Removed.
+
+2008-11-26 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Add the plug-in host proxy and plug-in instance proxy objects.
+
+ These are just simple objects that forward their calls to the plug-in host.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h: Added.
+ (WebKit::NetscapePluginHostProxy::create):
+ (WebKit::NetscapePluginHostProxy::port):
+ * Plugins/Hosted/NetscapePluginHostProxy.mm: Added.
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+ (WebKit::NetscapePluginHostProxy::instantiatePlugin):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h: Added.
+ (WebKit::NetscapePluginInstanceProxy::create):
+ (WebKit::NetscapePluginInstanceProxy::renderContextID):
+ (WebKit::NetscapePluginInstanceProxy::useSoftwareRenderer):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Added.
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ (WebKit::NetscapePluginInstanceProxy::resize):
+ (WebKit::NetscapePluginInstanceProxy::destroy):
+ (WebKit::NetscapePluginInstanceProxy::focusChanged):
+ (WebKit::NetscapePluginInstanceProxy::windowFocusChanged):
+ (WebKit::NetscapePluginInstanceProxy::windowFrameChanged):
+ (WebKit::NetscapePluginInstanceProxy::startTimers):
+ (WebKit::NetscapePluginInstanceProxy::mouseEvent):
+ (WebKit::NetscapePluginInstanceProxy::stopTimers):
+
+2008-11-26 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein, Mark Rowe and Kevin Decker.
+
+ Add the plug-in host manager singleton.
+
+ * Plugins/Hosted/NetscapePluginHostManager.h: Added.
+ * Plugins/Hosted/NetscapePluginHostManager.mm: Added.
+
+ (WebKit::NetscapePluginHostManager::hostForPackage):
+ If there's an existing host proxy available, just return it. Otherwise spawn a new plug-in host and
+ create a new plug-in host proxy from the new plug-in host port.
+
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+ Pass the plug-in host path and the preferred CPU type to the plug-in agent. When the plug-in host has
+ finished launching, pass it the path to the plug-in bundle.
+
+ (WebKit::NetscapePluginHostManager::initializeVendorPort):
+ Check in with the plug-in agent and get the new plug-in vendor port back.
+
+2008-11-26 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ * Plugins/Hosted/WebKitPluginHostTypes.h:
+ Add copyright headers and fix the spacing around the *'s.
+
+2008-11-26 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ Add copyright headers.
+
+ * Plugins/Hosted/WebKitPluginHostTypes.h: Added.
+ Forgot to add this.
+
+2008-11-26 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add plug-in host .defs.
+
+ * Plugins/Hosted/WebKitPluginAgent.defs: Added.
+ * Plugins/Hosted/WebKitPluginAgentReply.defs: Added.
+ * Plugins/Hosted/WebKitPluginClient.defs: Added.
+ * Plugins/Hosted/WebKitPluginHost.defs: Added.
+ * Plugins/Hosted/WebKitPluginHostTypes.defs: Added.
+
+2008-11-26 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mark Rowe and Kevin Decker.
+
+ Minor plug-in changes.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ Add add/remove observer method declarations.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView isFlipped]):
+ Move this down from WebNetscapePluginView.
+
+ * Plugins/WebNetscapePluginPackage.h:
+ * Plugins/WebNetscapePluginPackage.m:
+ (-[WebNetscapePluginPackage pluginHostArchitecture]):
+ Getter for the plug-in host architecture.
+
+ * Plugins/WebNetscapePluginView.mm:
+
+2008-11-25 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ - include the text direction submenu in context menus when appropriate
+
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]): Changed the default
+ textDirectionSubmenuInclusionBehavior to "automatically", which includes
+ the menu when the selection is confined to a single paragraph the either
+ has right-to-left base writing direction or contains right-to-left or
+ embedded text. Left the default for Tiger and Leopard to be "never".
+
+2008-11-24 Darin Fisher <darin@chromium.org>
+
+ Fix bustage.
+
+ * History/WebHistory.mm:
+
+2008-11-24 Glenn Wilson <gwilson@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ http://bugs.webkit.org/show_bug.cgi?id=15643
+
+ Added API support for the "trailing whitespace" work-around. This includes an APIs
+ to get and set the state of this configuration variable.
+
+ * WebCoreSupport/WebEditorClient.h:
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::selectTrailingWhitespaceEnabled):
+ * WebView/WebView.mm:
+ (-[WebView setSelectTrailingWhitespaceEnabled:]):
+ (-[WebView isSelectTrailingWhitespaceEnabled]):
+ (-[WebView setSmartInsertDeleteEnabled:]):
+ * WebView/WebViewPrivate.h:
+
+2008-11-24 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ - https://bugs.webkit.org/show_bug.cgi?id=22470
+ remove unneeded URL argument from FrameLoaderClient::updateGlobalHistory
+
+ * WebCoreSupport/WebFrameLoaderClient.h: Remove argument.
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::updateGlobalHistory): Get the URL from the
+ DocumentLoader, just as we do the title and the failure flag.
+
+2008-11-24 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ - finish https://bugs.webkit.org/show_bug.cgi?id=22295
+ track which history items are from page load failures
+
+ Last time around I did this only for the back/forward list and missed the
+ global history list.
+
+ * History/WebHistory.mm:
+ (-[WebHistory _visitedURL:withTitle:wasFailure:]): Added wasFailure argument.
+ Set the flag on the newly created history item. Also eliminated the use of
+ autorelease on the added-items array.
+ * History/WebHistoryInternal.h: Ditto.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::updateGlobalHistory): Added code to check for failure
+ and pass the argument in to WebHistory. Given that this function gets other
+ data from the DocumentLoader, I think we should get rid of the KURL argument,
+ but that's a separate issue so I don't do it in this patch.
+
+2008-11-24 Simon Fraser <simon.fraser@apple.com>
+
+ Fix call to Frame::selectionBounds in Tiger build.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
+
+2008-11-24 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ Via: https://bugs.webkit.org/show_bug.cgi?id=22433
+
+ Rename RenderView::selectionRect() to selectionBounds(), to remove
+ longstanding ambiguity with the base class selectionRect() method.
+ Do the same on Frame for consistency with RenderView.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
+ (-[WebHTMLView selectionRect]):
+ (-[WebHTMLView selectionImageRect]):
+
+2008-11-20 Pierre-Olivier Latour <pol@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ WebKit should be using Device RGB colorspace everywhere for
+ consistency.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22300
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _dragImageForURL:withLabel:]):
+ (-[WebHTMLView _colorAsString:]):
+
+2008-11-20 Darin Adler <darin@apple.com>
+
+ Earlier version reviewed by Justin Garcia.
+
+ - part of fix for <rdar://problem/4108572> REGRESSION: Can't extend selection with shift-arrow in read only mode
+ Also resolves <rdar://problem/5000134>.
+
+ * WebView/WebHTMLView.mm: Removed some unused code, and made the Tiger workaround for bug 3789278
+ be Tiger-only.
+ (-[WebHTMLView resignFirstResponder]): Removed code setting unused resigningFirstResponder flag.
+ (-[WebHTMLView _wantsKeyDownForEvent:]): Added. Returns YES.
+ (-[WebHTMLView insertText:]): Don't try to insert text if the selection is not editable. We used
+ to prevent even processing the input, but that's not practical since some commands need to work
+ even in non-editable regions.
+
+2008-11-20 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Move some frame/page checking code down to the base class.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView start]):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView _createPlugin]):
+
+2008-11-19 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Test: plugins/netscape-plugin-setwindow-size-2.html
+
+ Fix bug where NPP_SetWindow wasn't getting called for some plug-ins.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView updateAndSetWindow]):
+ Don't bail if the drawing model is not the CA drawing model. Remove some code
+ that was doing the wrong thing.
+
+2008-11-19 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Geoff Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22345
+ Define ScriptValue as a thin container for a JSC::Value*.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ * WebView/WebView.mm:
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
+
+2008-11-19 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6383762> WebKit r38340 crash on key press in plugin
+
+ Set the value to 0 before calling NPP_GetValue, in case the plug-in returns NPERR_NO_ERROR but does not
+ update the value.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView createPlugin]):
+
+2008-11-19 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Make sure to copy the MIME type.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
+
+2008-11-19 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ First step toward fixing <rdar://problem/6263293> WebScriptDebugDelegate
+ should use intptr_t for sourceId, not int
+
+ Added a conditional typedef (currently disabled) to switch sourceId to
+ intptr_t in non-Tiger, non-Leopard builds.
+
+ * DefaultDelegates/WebDefaultScriptDebugDelegate.m:
+ (-[WebDefaultScriptDebugDelegate webView:didParseSource:fromURL:sourceId:forWebFrame:]):
+ (-[WebDefaultScriptDebugDelegate webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
+ (-[WebDefaultScriptDebugDelegate webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
+ (-[WebDefaultScriptDebugDelegate webView:willExecuteStatement:sourceId:line:forWebFrame:]):
+ (-[WebDefaultScriptDebugDelegate webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
+ (-[WebDefaultScriptDebugDelegate webView:exceptionWasRaised:sourceId:line:forWebFrame:]):
+ * WebView/WebScriptDebugDelegate.h:
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::sourceParsed):
+ (WebScriptDebugger::callEvent):
+ (WebScriptDebugger::atStatement):
+ (WebScriptDebugger::returnEvent):
+ (WebScriptDebugger::exception):
+
+2008-11-18 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=22331
+ <rdar://problem/6381657> REGRESSION: Contextual menu no longer has an "Inspect Element" item
+
+ * WebView/WebUIDelegatePrivate.h: Reorder new enum values after existing
+ ones.
+
+2008-11-17 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Fix for <rdar://problem/6373102> REGRESSION (r36919): In a new mail
+ message, the caret appears in message body by default
+
+ This fixes a regression caused by http://trac.webkit.org/changeset/36919.
+ That change was too sweeping; we do not want to
+ unconditionally set the page to be active, but we can be looser
+ than the original constraints. This patch set the window active if
+ the first responder is or is a descendant of the main frame's frame
+ view.
+
+ * WebView/WebView.mm:
+ (-[WebView _updateFocusedAndActiveStateForFrame:]):
+
+2008-11-18 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22337
+ Enable workers by default
+
+ * Configurations/WebKit.xcconfig: Define ENABLE_WORKERS (change from ENABLE_WORKER_THREADS,
+ which was accidentally committed before).
+
+2008-11-17 Geoffrey Garen <ggaren@apple.com>
+
+ Not reviewed.
+
+ Try to fix Mac build.
+
+ * WebView/WebScriptDebugDelegate.mm:
+
+2008-11-17 Pierre-Olivier Latour <pol@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Added SPI to allow pausing a running CSS transition or animation
+ at a given time for testing purposes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21261
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _pauseAnimation:onNode:atTime:]):
+ (-[WebFrame _pauseTransitionOfProperty:onNode:atTime:]):
+ * WebView/WebFramePrivate.h:
+
+2008-11-17 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Updated for JavaScriptCore renames.
+
+ * ForwardingHeaders/runtime/Completion.h: Copied from ForwardingHeaders/runtime/Interpreter.h.
+ * ForwardingHeaders/runtime/Interpreter.h: Removed.
+ * WebView/WebScriptDebugDelegate.mm:
+
+2008-11-16 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21810
+ Remove use of static C++ objects that are destroyed at exit time (destructors)
+
+ Use DEFINE_STATIC_LOCAL for static RetainPtr<T>
+
+ * Misc/WebNSPasteboardExtras.mm: Use DEFINE_STATIC_LOCAL
+ (+[NSPasteboard _web_writableTypesForURL]):
+ (_createWritableTypesForImageWithoutArchive): Created so accessor has one line initialization
+ (_writableTypesForImageWithoutArchive): Use create function for one line initialization
+ (_createWritableTypesForImageWithArchive): Created so accessor has one line initialization
+ (_writableTypesForImageWithArchive): Use create function for one line initialization
+ * WebCoreSupport/WebPasteboardHelper.mm: Use DEFINE_STATIC_LOCAL
+ (WebPasteboardHelper::insertablePasteboardTypes):
+ * WebView/WebHTMLRepresentation.mm: Use DEFINE_STATIC_LOCAL
+ (+[WebHTMLRepresentation supportedMIMETypes]):
+ (+[WebHTMLRepresentation supportedNonImageMIMETypes]):
+ (+[WebHTMLRepresentation supportedImageMIMETypes]):
+
+2008-11-16 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ - https://bugs.webkit.org/show_bug.cgi?id=22295
+ track which history items are from page load failures
+
+ * History/WebHistoryItem.mm: Added lastVisitWasFailureKey.
+ (-[WebHistoryItem initFromDictionaryRepresentation:]): Set the lastVisitWasFailure
+ flag in the history item if the dictionary had lastVisitWasFailureKey true.
+ (-[WebHistoryItem dictionaryRepresentation]): Set the lastVisitWasFailureKey boolean
+ in the dictionary if the history item had the lastVisitWasFailure flag.
+ (-[WebHistoryItem lastVisitWasFailure]): Added.
+
+ * History/WebHistoryItemInternal.h: Moved include of WebBackForwardList here from
+ WebHistoryItemPrivate.h; removed other unneeded includes.
+
+ * History/WebHistoryItemPrivate.h: Added lastVisitWasFailure method.
+ Removed unneeded includes.
+
+ * Misc/WebNSDictionaryExtras.h: Added _webkit_boolForKey.
+ * Misc/WebNSDictionaryExtras.m:
+ (-[NSDictionary _webkit_boolForKey:]): Added.
+
+2008-11-14 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21810
+ Remove use of static C++ objects that are destroyed at exit time (destructors)
+
+ Create DEFINE_STATIC_LOCAL macro. Change static local objects to leak to avoid
+ exit-time destructor. Update code that was changed to fix this issue that ran
+ into a gcc bug (<rdar://problem/6354696> Codegen issue with C++ static reference
+ in gcc build 5465). Also typdefs for template types needed to be added in some
+ cases so the type could make it through the macro successfully.
+
+ Basically code of the form:
+ static T m;
+ becomes:
+ DEFINE_STATIC_LOCAL(T, m, ());
+
+ Also any code of the form:
+ static T& m = *new T;
+ also becomes:
+ DEFINE_STATIC_LOCAL(T, m, ());
+
+ * ForwardingHeaders/wtf/StdLibExtras.h: Added.
+ * History/WebBackForwardList.mm:
+ (backForwardLists):
+ * History/WebHistoryItem.mm:
+ (historyItemWrappers):
+ * Misc/WebStringTruncator.m:
+ (fontFromNSFont):
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (streams):
+ * WebView/WebView.mm:
+ (aeDescFromJSValue):
+
+2008-11-14 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - <rdar://problem/6234333> Implement action methods for setting and clearing character-level directionality
+ - part of <rdar://problem/6234337> Add a Text Direction menu to the default context menu when appropriate
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory contextMenuItemTagTextDirectionMenu]): Added.
+ * WebView/WebFrame.mm:
+ (core): Added a convertor from WebTextDirectionSubmenuInclusionBehavior
+ to WebCore::TextDirectionSubmenuInclusionBehavior.
+ * WebView/WebFrameInternal.h:
+ * WebView/WebHTMLView.mm:
+ Added makeTextWritingDirectionLeftToRight:,
+ makeTextWritingDirectionNatural: and
+ makeTextWritingDirectionRightToLeft: using the WEBCORE_COMMAND macro.
+ * WebView/WebPreferenceKeysPrivate.h:
+ Added WebKitTextDirectionSubmenuInclusionBehaviorPreferenceKey.
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]): Set the default Text Direction
+ submenu inclusion behavior to never include.
+ (-[WebPreferences textDirectionSubmenuInclusionBehavior]): Added this
+ accessor.
+ (-[WebPreferences setTextDirectionSubmenuInclusionBehavior:]): Ditto.
+ * WebView/WebPreferencesPrivate.h: Defined the
+ WebTextDirectionSubmenuInclusionBehavior enum and declared
+ accessors.
+ * WebView/WebUIDelegatePrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Added code to transfer
+ the Text Direction submenu inclusion behavior preference to WebCore
+ settings.
+
+2008-11-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=22222
+ selectKeyViewPrecedingView: with document view that can't be first responder
+ makes WebFrameView be first responder
+
+ * WebView/WebFrameView.mm: (-[WebFrameView becomeFirstResponder]):
+ Moved the acceptsFirstResponder special case inside the if statement so it won't
+ run in the "selecting previous" case. Also removed the "just before shipping Tiger"
+ code that doesn't need to be here any more.
+
+2008-11-13 Mark Rowe <mrowe@apple.com>
+
+ Fix the build.
+
+ Don't use NSPICTPboardType on systems where it is deprecated. The system will take care of converting
+ from this format to a format that we can understand.
+
+ * WebCoreSupport/WebPasteboardHelper.mm:
+ (WebPasteboardHelper::insertablePasteboardTypes):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
+ (+[WebHTMLView _insertablePasteboardTypes]):
+ (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
+
+2008-11-13 John Sullivan <sullivan@apple.com>
+
+ fixed <rdar://problem/6361578> Web Kit UI strings: a few edits
+
+ Reviewed by Tim Hatcher
+
+ * Misc/WebKitErrors.m:
+ "Cannot show content with specified mime type" -> "Content with specified MIME type can't be shown"
+ "Cannot show URL" -> "The URL can't be shown"
+ "Cannot find plug-in" -> "The plug-in can't be found"
+ "Cannot load plug-in" -> "The plug-in can't be loaded"
+
+ * Panels/English.lproj/WebAuthenticationPanel.nib/classes.nib:
+ * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib:
+ * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib: Added.
+ * Panels/English.lproj/WebAuthenticationPanel.nib/objects.nib: Removed.
+ Changed placeholder fine print in the nib to match one of the two strings it might be replaced by.
+ This automagically updated the nib to a newer format, hence the objects -> keyedobjects change.
+ I could have changed the placeholder fine print to be empty but this lets localizers understand
+ the dialog layout better.
+
+ * Panels/WebAuthenticationPanel.m:
+ (-[WebAuthenticationPanel setUpForChallenge:]):
+ "you need to log in" -> "you must log in"
+ "Your log-in information" -> "Your login information"
+ "The name or password entered" -> "The user name or password you entered"
+ "Please try again." -> "Make sure you're entering them correctly, and then try again."
+
+2008-11-12 Stephanie Lewis <slewis@apple.com>
+
+ Fix Mac build.
+
+ * Panels/WebAuthenticationPanel.m:
+
+2008-11-12 John Sullivan <sullivan@apple.com>
+
+ fixed <rdar://problem/3839110> Authentication dialogs talk about passwords being sent "in the clear"
+
+ Reviewed by Tim Hatcher
+
+ * Panels/WebAuthenticationPanel.m:
+ (-[WebAuthenticationPanel setUpForChallenge:]):
+ use "unencrypted" instead of "in the clear". Also, use the "Your log-in information
+ will be sent securely" version when the receiving server is https, regardless of
+ whether it uses basic or digest authentication.
+
+2008-11-12 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=22223
+ <rdar://problem/6366864> REGRESSION(r38245): "View Source" crashes the browser
+
+ * WebView/WebFrameView.mm: (-[WebFrameView viewDidMoveToWindow]):
+ Add missing null check.
+
+2008-11-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Fix stupid bug.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView createPlugin]):
+
+2008-11-10 Tor Arne Vestbø <tavestbo@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ Move _web_encodingForResource from WebKit into WebCore and change return type
+
+ This change is needed to implement NSAPI in WebCore for Mac, see:
+
+ https://bugs.webkit.org/show_bug.cgi?id=21427
+
+
+ * Misc/WebKitNSStringExtras.m:
+ (+[NSString _web_encodingForResource:]):
+
+2008-11-10 Tor Arne Vestbø <tavestbo@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ Moved the implementation of _webkit_isCaseInsensitiveEqualToString to
+ WebCore's WebCoreNSStringExtras as _stringIsCaseInsensitiveEqualToString.
+
+ This change is needed to implement NSAPI in WebCore for Mac, see:
+
+ https://bugs.webkit.org/show_bug.cgi?id=21427
+
+ * Misc/WebKitNSStringExtras.m:
+ (-[NSString _webkit_isCaseInsensitiveEqualToString:]):
+
+2008-11-11 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebKit/mac part of adding a master volume control for media elements in a WebView
+
+ * WebView/WebView.mm:
+ (-[WebView setMediaVolume:]): Added.
+ (-[WebView mediaVolume]): Added.
+ * WebView/WebViewPrivate.h:
+
+2008-11-11 Aaron Golden <agolden@apple.com>
+
+ Bug 22134: -[WebHistoryItem dictionaryRepresentation] accesses past the end of a vector
+
+ <https://bugs.webkit.org/show_bug.cgi?id=22134>
+
+ Reviewed by Geoff Garen.
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem initFromDictionaryRepresentation:]):
+ (-[WebHistoryItem dictionaryRepresentation]):
+
+2008-11-10 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Move renewGState to the base class.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView renewGState]):
+ * Plugins/WebNetscapePluginView.mm:
+
+2008-11-10 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Move start, stop and all the related methods down to WebBaseNetscapePluginView.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView updateAndSetWindow]):
+ (-[WebBaseNetscapePluginView addWindowObservers]):
+ (-[WebBaseNetscapePluginView removeWindowObservers]):
+ (-[WebBaseNetscapePluginView start]):
+ (-[WebBaseNetscapePluginView stop]):
+ (-[WebBaseNetscapePluginView viewWillMoveToWindow:]):
+ (-[WebBaseNetscapePluginView viewWillMoveToSuperview:]):
+ (-[WebBaseNetscapePluginView viewDidMoveToWindow]):
+ (-[WebBaseNetscapePluginView viewWillMoveToHostWindow:]):
+ (-[WebBaseNetscapePluginView viewDidMoveToHostWindow]):
+ (-[WebBaseNetscapePluginView windowWillClose:]):
+ (-[WebBaseNetscapePluginView windowBecameKey:]):
+ (-[WebBaseNetscapePluginView windowResignedKey:]):
+ (-[WebBaseNetscapePluginView windowDidMiniaturize:]):
+ (-[WebBaseNetscapePluginView windowDidDeminiaturize:]):
+ (-[WebBaseNetscapePluginView loginWindowDidSwitchFromUser:]):
+ (-[WebBaseNetscapePluginView loginWindowDidSwitchToUser:]):
+ (-[WebBaseNetscapePluginView preferencesHaveChanged:]):
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+
+2008-11-10 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Move rightMouseDown, rightMouseUp and sendActivateEvent to the base plugin view.
+ Add stubs for createPlugin, loadStream, shouldStop and destroyPlugin.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView windowFocusChanged:]):
+ (-[WebBaseNetscapePluginView createPlugin]):
+ (-[WebBaseNetscapePluginView loadStream]):
+ (-[WebBaseNetscapePluginView destroyPlugin]):
+ (-[WebBaseNetscapePluginView sendActivateEvent:]):
+ (-[WebBaseNetscapePluginView rightMouseDown:]):
+ (-[WebBaseNetscapePluginView rightMouseUp:]):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView windowFocusChanged:]):
+
+2008-11-10 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Factor plug-in type specific code out to three new methods, createPlugin, destroyPlugin and loadStream.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView createPlugin]):
+ (-[WebNetscapePluginView loadStream]):
+ (-[WebNetscapePluginView start]):
+ (-[WebNetscapePluginView shouldStop]):
+ (-[WebNetscapePluginView destroyPlugin]):
+ (-[WebNetscapePluginView stop]):
+
+2008-11-10 Anders Carlsson <andersca@apple.com>
+
+ Fix Tiger build.
+
+ * Plugins/WebNetscapePluginPackage.m:
+ (-[WebNetscapePluginPackage load]):
+
+2008-11-10 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Move even more code down to WebBaseNetscapePluginView, get rid of some unnecessary methods.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView focusChanged]):
+ (-[WebBaseNetscapePluginView visibleRect]):
+ (-[WebBaseNetscapePluginView acceptsFirstResponder]):
+ (-[WebBaseNetscapePluginView setHasFocus:]):
+ (-[WebBaseNetscapePluginView becomeFirstResponder]):
+ (-[WebBaseNetscapePluginView resignFirstResponder]):
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView focusChanged]):
+ (-[WebNetscapePluginView tellQuickTimeToChill]):
+ (-[WebNetscapePluginView updateAndSetWindow]):
+ (-[WebNetscapePluginView start]):
+ (-[WebNetscapePluginView stop]):
+ (-[WebNetscapePluginView viewWillMoveToWindow:]):
+ (-[WebNetscapePluginView createPluginScriptableObject]):
+ (-[WebNetscapePluginView pluginView:receivedData:]):
+ (-[WebNetscapePluginView pluginView:receivedError:]):
+ (-[WebNetscapePluginView pluginViewFinishedLoading:]):
+ (-[WebNetscapePluginView inputContext]):
+ (-[WebNetscapePluginView hasMarkedText]):
+ (-[WebNetscapePluginView insertText:]):
+ (-[WebNetscapePluginView markedRange]):
+ (-[WebNetscapePluginView selectedRange]):
+ (-[WebNetscapePluginView setMarkedText:selectedRange:]):
+ (-[WebNetscapePluginView unmarkText]):
+ (-[WebNetscapePluginView validAttributesForMarkedText]):
+ (-[WebNetscapePluginView attributedSubstringFromRange:]):
+ (-[WebNetscapePluginView characterIndexForPoint:]):
+ (-[WebNetscapePluginView doCommandBySelector:]):
+ (-[WebNetscapePluginView firstRectForCharacterRange:]):
+ (-[WebNetscapePluginView _viewHasMoved]):
+ (-[WebNetscapePluginView _redeliverStream]):
+
+2008-11-10 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Move timer handling code down to WebBaseNetscapePluginView.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView stopTimers]):
+ (-[WebBaseNetscapePluginView startTimers]):
+ (-[WebBaseNetscapePluginView restartTimers]):
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView stopTimers]):
+ (-[WebNetscapePluginView startTimers]):
+ (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]):
+
+2008-11-10 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Move a bunch of methods and ivars up to WebBaseNetscapePluginView.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView dealloc]):
+ (-[WebBaseNetscapePluginView finalize]):
+ (-[WebBaseNetscapePluginView removeTrackingRect]):
+ (-[WebBaseNetscapePluginView resetTrackingRect]):
+ (-[WebBaseNetscapePluginView dataSource]):
+ (-[WebBaseNetscapePluginView webFrame]):
+ (-[WebBaseNetscapePluginView webView]):
+ (-[WebBaseNetscapePluginView currentWindow]):
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ (WebNetscapePluginEventHandlerCarbon::windowFocusChanged):
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView sendEvent:isDrawRect:]):
+ (-[WebNetscapePluginView sendActivateEvent:]):
+ (-[WebNetscapePluginView restartTimers]):
+ (-[WebNetscapePluginView setHasFocus:]):
+ (-[WebNetscapePluginView mouseDown:]):
+ (-[WebNetscapePluginView mouseUp:]):
+ (-[WebNetscapePluginView mouseEntered:]):
+ (-[WebNetscapePluginView mouseExited:]):
+ (-[WebNetscapePluginView handleMouseMoved:]):
+ (-[WebNetscapePluginView mouseDragged:]):
+ (-[WebNetscapePluginView scrollWheel:]):
+ (-[WebNetscapePluginView keyUp:]):
+ (-[WebNetscapePluginView keyDown:]):
+ (-[WebNetscapePluginView flagsChanged:]):
+ (-[WebNetscapePluginView updateAndSetWindow]):
+ (-[WebNetscapePluginView setWindowIfNecessary]):
+ (-[WebNetscapePluginView start]):
+ (-[WebNetscapePluginView stop]):
+ (-[WebNetscapePluginView isStarted]):
+ (-[WebNetscapePluginView dealloc]):
+ (-[WebNetscapePluginView finalize]):
+ (-[WebNetscapePluginView drawRect:]):
+ (-[WebNetscapePluginView windowBecameKey:]):
+ (-[WebNetscapePluginView preferencesHaveChanged:]):
+ (-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):
+ (-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]):
+ (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
+ (-[WebNetscapePluginView _viewHasMoved]):
+
+2008-11-10 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker and Mark Rowe.
+
+ Add a WebHostedNetscapePluginView class.
+
+ * Plugins/WebHostedNetscapePluginView.h: Added.
+ * Plugins/WebHostedNetscapePluginView.mm: Added.
+
+ * Plugins/WebNetscapePluginPackage.h:
+ Use the right define.
+
+ * Plugins/WebPluginDatabase.mm:
+ (-[WebPluginDatabase removePluginInstanceViewsFor:]):
+ Check for WebBaseNetscapePluginView.
+
+ (-[WebPluginDatabase destroyAllPluginInstanceViews]):
+ Check for WebBaseNetscapePluginView.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (NetscapePluginWidget::NetscapePluginWidget):
+ (NetscapePluginWidget::handleEvent):
+ Use WebBaseNetscapePluginView.
+
+ (netscapePluginViewClass):
+ New function that returns the right netscape plugin view type to use.
+
+ (WebFrameLoaderClient::createPlugin):
+ Get the right class.
+
+ * WebKitPrefix.h:
+ Prefix the #define with WTF_.
+
+ * WebView/WebHTMLView.mm:
+ (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
+ Check for WebBaseNetscapePluginView.
+
+ * WebView/WebView.mm:
+ Remove an unnecessary include.
+
+2008-11-10 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Don't use individual ivars for each plug-in vtable function. Instead, get them from the plugin package.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
+ * Plugins/WebNetscapePluginPackage.h:
+ * Plugins/WebNetscapePluginPackage.m:
+ (-[WebNetscapePluginPackage load]):
+ (-[WebNetscapePluginPackage _unloadWithShutdown:]):
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView sendEvent:isDrawRect:]):
+ (-[WebNetscapePluginView setWindowIfNecessary]):
+ (-[WebNetscapePluginView start]):
+ (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
+ (-[WebNetscapePluginView createPluginScriptableObject]):
+ (-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):
+ (-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]):
+ (-[WebNetscapePluginView loadPluginRequest:]):
+ (-[WebNetscapePluginView _createPlugin]):
+ (-[WebNetscapePluginView _destroyPlugin]):
+ (-[WebNetscapePluginView _printedPluginBitmap]):
+
+2008-11-10 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Add a new WebBaseNetscapePluginView class.
+
+ * Plugins/WebBaseNetscapePluginView.h: Added.
+ * Plugins/WebBaseNetscapePluginView.mm: Added.
+ (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
+ (-[WebBaseNetscapePluginView setAttributeKeys:andValues:]):
+ (-[WebBaseNetscapePluginView handleMouseMoved:]):
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView cut:]):
+ (-[WebNetscapePluginView copy:]):
+ (-[WebNetscapePluginView paste:]):
+ (-[WebNetscapePluginView selectAll:]):
+ (-[WebNetscapePluginView start]):
+ (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
+
+2008-11-10 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Rename WebBaseNetscapePluginView to WebNetscapePluginView.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::WebNetscapePluginStream):
+ (WebNetscapePluginStream::setPlugin):
+ * Plugins/WebBaseNetscapePluginView.h: Removed.
+ * Plugins/WebBaseNetscapePluginView.mm: Removed.
+ * Plugins/WebNetscapePluginEventHandler.h:
+ (WebNetscapePluginEventHandler::WebNetscapePluginEventHandler):
+ * Plugins/WebNetscapePluginEventHandler.mm:
+ (WebNetscapePluginEventHandler::create):
+ * Plugins/WebNetscapePluginEventHandlerCarbon.h:
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ (WebNetscapePluginEventHandlerCarbon::WebNetscapePluginEventHandlerCarbon):
+ * Plugins/WebNetscapePluginEventHandlerCocoa.h:
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
+ * Plugins/WebNetscapePluginView.h: Copied from mac/Plugins/WebBaseNetscapePluginView.h.
+ * Plugins/WebNetscapePluginView.mm: Copied from mac/Plugins/WebBaseNetscapePluginView.mm.
+ (+[WebNetscapePluginView setCurrentPluginView:]):
+ (+[WebNetscapePluginView currentPluginView]):
+ (-[WebNetscapePluginView loadPluginRequest:]):
+ * Plugins/WebPluginDatabase.mm:
+ (-[WebPluginDatabase removePluginInstanceViewsFor:]):
+ (-[WebPluginDatabase destroyAllPluginInstanceViews]):
+ * Plugins/npapi.mm:
+ (pluginViewForInstance):
+ (NPN_MarkedTextAbandoned):
+ (NPN_MarkedTextSelectionChanged):
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (NetscapePluginWidget::NetscapePluginWidget):
+ (NetscapePluginWidget::handleEvent):
+ (WebFrameLoaderClient::createPlugin):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
+ (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]):
+ (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
+ * WebView/WebView.mm:
+
+2008-11-09 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=15063
+ <rdar://problem/5452227> REGRESSION (r25151): Switching to a tab waiting
+ for first data does not clear the window
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::frameLoadCompleted): Added comments, and got rid of
+ a local variable to make this code match the code in the function below
+ more closely.
+ (WebFrameLoaderClient::provisionalLoadStarted): Added comments.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]): Improved comment.
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _scrollView]): Tweaked formatting.
+ (-[WebFrameView initWithFrame:]): Ditto.
+ (-[WebFrameView setFrameSize:]): Added a comment and tweaked formatting.
+ (-[WebFrameView viewDidMoveToWindow]): Added. This is the change that fixes
+ the bug. Calls setDrawsBackground:YES as appropriate since moving the view
+ out of the window to switch to another view disrupts the special technique
+ for showing the old page during the start of loading. This is the identical
+ reason for the setFrameSize: method above, and the code is almost the same.
+
+2008-11-08 David Kilzer <ddkilzer@apple.com>
+
+ Bug 22137: PLATFORM(MAC) build broken with HAVE(ACCESSIBILITY) disabled
+
+ <https://bugs.webkit.org/show_bug.cgi?id=22137>
+
+ Reviewed by Darin Adler.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _accessibilityTree]): Return nil if HAVE(ACCESSIBILITY)
+ is false.
+
+2008-11-08 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - WebKit/mac part of adding WebPreferences for controlling databases and local storage
+
+ * WebView/WebPreferenceKeysPrivate.h: Added
+ WebKitDatabasesEnabledPreferenceKey and
+ WebKitLocalStorageEnabledPreferenceKey.
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]): Made databases and local storage enabled
+ by default.
+ (-[WebPreferences databasesEnabled]): Added.
+ (-[WebPreferences setDatabasesEnabled:]): Added.
+ (-[WebPreferences localStorageEnabled]): Added.
+ (-[WebPreferences setLocalStorageEnabled:]): Added.
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Transfer the databases
+ and local storage preferences to WebCore settings.
+
+2008-11-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22115
+ NPN_HasPropertyUPP and NPN_HasMethodUPP entries in NPNetscapeFuncs are NULL
+
+ Initialize the browser funcs correctly.
+
+ * Plugins/WebNetscapePluginPackage.m:
+ (-[WebNetscapePluginPackage load]):
+
+2008-11-06 David Kilzer <ddkilzer@apple.com>
+
+ BUILD FIX: Backed out r38189 (and r38203) for Xcode 3.0.
+
+ Apparently older versions of gcc have issues with this patch.
+ Backing out a second time until the issues are resolved.
+
+2008-11-06 Cameron Zwarich <zwarich@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Move the remaining files in the kjs subdirectory of JavaScriptCore to
+ a new parser subdirectory, and remove the kjs subdirectory entirely.
+
+ The header SavedBuiltins.h was removed in r32587, so it no longer needs
+ a forwarding header.
+
+ * ForwardingHeaders/kjs: Removed.
+ * ForwardingHeaders/kjs/SavedBuiltins.h: Removed.
+
+2008-11-06 David Kilzer <ddkilzer@apple.com>
+
+ BUILD WAS NOT BROKEN: Rolling r38189 back in.
+
+ Please perform a clean build if you see crashes.
+
+2008-11-06 David Kilzer <ddkilzer@apple.com>
+
+ BUILD FIX: Backed out r38189 since it apparently broke the world.
+
+2008-11-06 John Sullivan <sullivan@apple.com>
+
+ Fixed problem with switching between text-only zoom and full-content zoom
+
+ There were two booleans tracking whether zoom was text-only, one in WebCore settings
+ and one in WebViewPrivate. Fixed by eliminating the one in WebViewPrivate.
+
+ Reviewed by Adam Roben
+
+ * WebView/WebView.mm:
+ remove declaration of zoomMultiplierIsTextOnly instance variable in WebViewPrivate
+ (-[WebViewPrivate init]):
+ removed initialization of zoomMultiplierIsTextOnly
+ (-[WebView textSizeMultiplier]):
+ call [self _realZoomMultiplierIsTextOnly] instead of accessing WebViewPrivate instance variable
+ (-[WebView _setZoomMultiplier:isTextOnly:]):
+ update WebCore settings rather than WebViewPrivate instance variable
+ (-[WebView _zoomMultiplier:]):
+ call [self _realZoomMultiplierIsTextOnly] instead of accessing WebViewPrivate instance variable
+ (-[WebView _realZoomMultiplierIsTextOnly]):
+ return value from WebCore settings instead of accessing WebViewPrivate instance variable
+ (-[WebView pageSizeMultiplier]):
+ call [self _realZoomMultiplierIsTextOnly] instead of accessing WebViewPrivate instance variable
+
+2008-11-06 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 21810: Remove use of static C++ objects that are destroyed at exit time (destructors)
+ https://bugs.webkit.org/show_bug.cgi?id=21810
+
+ * History/WebBackForwardList.mm:
+ (backForwardLists): Changed to leak an object to avoid an exit-time destructor.
+ * History/WebHistoryItem.mm:
+ (historyItemWrappers): Ditto
+ * Misc/WebStringTruncator.m:
+ (fontFromNSFont): Ditto
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (streams): Ditto
+ * WebView/WebView.mm:
+ (aeDescFromJSValue): Ditto
+
+2008-11-05 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Keep track of which plug-in host architecture would be needed for a given plug-in package.
+
+ * Plugins/WebNetscapePluginPackage.h:
+ * Plugins/WebNetscapePluginPackage.m:
+ (-[WebNetscapePluginPackage _initWithPath:]):
+ * WebKitPrefix.h:
+
+2008-11-05 Cameron Zwarich <zwarich@apple.com>
+
+ Rubber-stamped by Sam Weinig.
+
+ Correct forwarding headers for files moved to the runtime subdirectory
+ of JavaScriptCore and remove unused forwarding headers.
+
+ * ForwardingHeaders/kjs/collector.h: Removed.
+ * ForwardingHeaders/kjs/identifier.h: Removed.
+ * ForwardingHeaders/kjs/interpreter.h: Removed.
+ * ForwardingHeaders/kjs/lookup.h: Removed.
+ * ForwardingHeaders/kjs/operations.h: Removed.
+ * ForwardingHeaders/kjs/protect.h: Removed.
+ * ForwardingHeaders/runtime/Interpreter.h: Copied from ForwardingHeaders/kjs/interpreter.h.
+ * WebView/WebScriptDebugDelegate.mm:
+
+2008-11-05 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Remove WebPlugInStreamLoaderDelegate.h
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebPlugInStreamLoaderDelegate.h: Removed.
+
+2008-11-05 Dan Bernstein <mitz@apple.com>
+
+ - Tiger build fix
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView stop]):
+
+2008-11-04 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Don't leak the CALayer.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ Make the layer a RetainPtr.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView start]):
+
+ (-[WebBaseNetscapePluginView stop]):
+ Make sure to clear out the layer here.
+
+2008-11-04 Cameron Zwarich <zwarich@apple.com>
+
+ Rubber-stamped by Sam Weinig.
+
+ Remove the unused kjs/dtoa.h forwarding header.
+
+ * ForwardingHeaders/kjs/dtoa.h: Removed.
+
+2008-11-04 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ More cleanup. Make a bunch of instance variables RetainPtrs.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView visibleRect]):
+ (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+ (-[WebBaseNetscapePluginView sendActivateEvent:]):
+ (-[WebBaseNetscapePluginView sendDrawRectEvent:]):
+ (-[WebBaseNetscapePluginView stopTimers]):
+ (-[WebBaseNetscapePluginView restartTimers]):
+ (-[WebBaseNetscapePluginView setHasFocus:]):
+ (-[WebBaseNetscapePluginView mouseDown:]):
+ (-[WebBaseNetscapePluginView mouseUp:]):
+ (-[WebBaseNetscapePluginView mouseEntered:]):
+ (-[WebBaseNetscapePluginView mouseExited:]):
+ (-[WebBaseNetscapePluginView handleMouseMoved:]):
+ (-[WebBaseNetscapePluginView mouseDragged:]):
+ (-[WebBaseNetscapePluginView scrollWheel:]):
+ (-[WebBaseNetscapePluginView keyUp:]):
+ (-[WebBaseNetscapePluginView keyDown:]):
+ (-[WebBaseNetscapePluginView flagsChanged:]):
+ (-[WebBaseNetscapePluginView cut:]):
+ (-[WebBaseNetscapePluginView copy:]):
+ (-[WebBaseNetscapePluginView paste:]):
+ (-[WebBaseNetscapePluginView selectAll:]):
+ (-[WebBaseNetscapePluginView didStart]):
+ (-[WebBaseNetscapePluginView start]):
+ (-[WebBaseNetscapePluginView stop]):
+ (-[WebBaseNetscapePluginView dataSource]):
+ (-[WebBaseNetscapePluginView pluginPackage]):
+ (-[WebBaseNetscapePluginView setPluginPackage:]):
+ (-[WebBaseNetscapePluginView setAttributeKeys:andValues:]):
+ (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
+ (-[WebBaseNetscapePluginView fini]):
+ (-[WebBaseNetscapePluginView dealloc]):
+ (-[WebBaseNetscapePluginView pluginView:receivedError:]):
+ (-[WebBaseNetscapePluginView requestWithURLCString:]):
+ (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]):
+ (-[WebBaseNetscapePluginView loadPluginRequest:]):
+ (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
+ (-[WebBaseNetscapePluginView userAgent]):
+ (-[WebBaseNetscapePluginView getVariable:value:]):
+ (-[WebBaseNetscapePluginView setVariable:value:]):
+ (-[WebBaseNetscapePluginView _createPlugin]):
+ (-[WebBaseNetscapePluginView _redeliverStream]):
+
+2008-11-04 Brady Eidson <beidson@apple.com>
+
+ Reviewed by John Sullivan
+
+ Cleanup global history a tad.
+
+ Used to _addItemForURL always create a new item and merge it with a previous item if one existed.
+
+ It is more efficient and less complicated to update the previous item if one exists.
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate visitedURL:withTitle:]):
+ (-[WebHistory _visitedURL:withTitle:]): Instead of calling the general purpose [WebHistoryPrivate addItem:]
+ with a new history item, call the new special purposed visitedURL:withTitle:
+ * History/WebHistoryInternal.h:
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem _visitedWithTitle:]): Call "visited()" on the WebCore history item with the pertinent info.
+ * History/WebHistoryItemInternal.h:
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::updateGlobalHistory):
+
+2008-11-04 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22065
+
+ Only create the plug-in stream loader when the stream is started.
+
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::WebNetscapePluginStream):
+ (WebNetscapePluginStream::start):
+
+2008-11-04 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22065
+
+ Remove some old, unused plug-in code.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+ (-[WebBaseNetscapePluginView start]):
+ (-[WebBaseNetscapePluginView setVariable:value:]):
+
+2008-11-04 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt
+
+ https://bugs.webkit.org/show_bug.cgi?id=21941
+
+ Rename absolutePosition() to localToAbsolute(), and add the ability
+ to optionally take transforms into account (which will eventually be the
+ default behavior).
+
+ * WebView/WebRenderNode.mm:
+ (copyRenderNode):
+
+2008-11-01 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22030
+ Make EventNames usable from multiple threads
+
+ * WebView/WebHTMLView.mm:
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
+ Access event names via eventNames() function.
+
+2008-11-04 Cameron Zwarich <zwarich@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Delete a forwarding header for a file that no longer exists.
+
+ * ForwardingHeaders/kjs/string_object.h: Removed.
+
+2008-11-03 Cameron Zwarich <zwarich@apple.com>
+
+ Rubber-stamped by Maciej Stachowiak.
+
+ Move more files into the runtime subdirectory of JavaScriptCore.
+
+ * ForwardingHeaders/kjs/JSLock.h: Removed.
+ * ForwardingHeaders/kjs/SymbolTable.h: Removed.
+ * ForwardingHeaders/runtime/JSLock.h: Copied from ForwardingHeaders/kjs/JSLock.h.
+ * ForwardingHeaders/runtime/SymbolTable.h: Copied from ForwardingHeaders/kjs/SymbolTable.h.
+ * Misc/WebCoreStatistics.mm:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ * Plugins/WebPluginController.mm:
+ * WebView/WebFrame.mm:
+ * WebView/WebScriptDebugDelegate.mm:
+ * WebView/WebView.mm:
+
+2008-11-03 Mark Rowe <mrowe@apple.com>
+
+ Fix the 64-bit build.
+
+ Pull the frequently-made check for drawingModel == NPDrawingModelQuickDraw out into a
+ helper function to avoid #ifdef'ing all of the new places that this check is made.
+
+ A few other #ifdef's are moved inside functions to allow their call sites to remain #ifdef-free,
+ and we rely on the compiler to optimise out the check (which will always be false in 64-bit) instead.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (isDrawingModelQuickDraw):
+ (-[WebBaseNetscapePluginView fixWindowPort]):
+ (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+ (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
+ (-[WebBaseNetscapePluginView updateAndSetWindow]):
+ (-[WebBaseNetscapePluginView start]):
+ (-[WebBaseNetscapePluginView tellQuickTimeToChill]):
+ (-[WebBaseNetscapePluginView viewWillMoveToWindow:]):
+ (-[WebBaseNetscapePluginView _viewHasMoved]):
+
+2008-11-03 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ - fix release build (and unitialized variable for CG drawing model!)
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): initialize portState in all code paths
+
+2008-11-03 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22053
+
+ This patch adds initial support for the NPDrawingModelCoreAnimation drawing model.
+
+ * Plugins/WebBaseNetscapePluginView.h: Added _layer ivar.
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): ASSERT this is not a plug-in using NPDrawingModelCoreAnimation.
+ (-[WebBaseNetscapePluginView restorePortState:]): Ditto.
+ (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): Slightly refactored a small block of code which with the PortState.
+ Plug-ins using the NPDrawingModelCoreAnimation drawing model have no PortState.
+ (-[WebBaseNetscapePluginView isNewWindowEqualToOldWindow]): ASSERT this is not a plug-in using NPDrawingModelCoreAnimation
+ (-[WebBaseNetscapePluginView updateAndSetWindow]): Ditto.
+ (-[WebBaseNetscapePluginView setWindowIfNecessary]): Ditto.
+ (-[WebBaseNetscapePluginView start]): If the plug-in is a plug-in using the Core Animation model, request a layer from it.
+ (-[WebBaseNetscapePluginView drawRect:]): Return early for NPDrawingModelCoreAnimation plug-ins.
+ (-[WebBaseNetscapePluginView getVariable:value:]): Tell plug-ins running on post-Tiger systems WebKit supports
+ NPDrawingModelCoreAnimation.
+ (-[WebBaseNetscapePluginView setVariable:value:]): Added the new NPDrawingModelCoreAnimation case, which initializes drawingMode.
+ (-[WebBaseNetscapePluginView _viewHasMoved]): Reworded the conditional call to updateAndSetWindow to be specific to
+ CoreGraphics and QuickDraw plug-ins.
+
+2008-10-31 Cameron Zwarich <zwarich@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 22019: Move JSC::Interpreter::shouldPrintExceptions() to WebCore::Console
+ <https://bugs.webkit.org/show_bug.cgi?id=22019>
+
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics shouldPrintExceptions]):
+ (+[WebCoreStatistics setShouldPrintExceptions:]):
+
+2008-10-31 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - WebKit/mac part of <rdar://problem/6334641> Add WebView SPI for disabling document.cookie
+
+ * WebView/WebView.mm:
+ (-[WebView _cookieEnabled]):
+ (-[WebView _setCookieEnabled:]):
+ * WebView/WebViewPrivate.h:
+
+2008-10-31 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler
+
+ [WebHistory setLastVisitedTimeInterval:forItem] was internal to WebHistory.mm and
+ completely unused. Nuke it!
+
+ * History/WebHistory.mm:
+
+2008-10-31 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/4361197> Screen Reader's Item Chooser shows scroll area for WebKit Application window
+
+ If a WebFrameView does not allow scrolling, its scrollbars should not appear in the accessibility hierarchy.
+
+ * WebView/WebDynamicScrollBarsView.m:
+ (-[WebDynamicScrollBarsView accessibilityIsIgnored]):
+
+2008-10-30 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Jon Homeycutt.
+
+ Explicitly default to building for only the native architecture in debug and release builds.
+
+ * Configurations/DebugRelease.xcconfig:
+
+2008-10-30 Cameron Zwarich <zwarich@apple.com>
+
+ Rubber-stamped by Sam Weinig.
+
+ Create a debugger directory in JavaScriptCore and move the relevant
+ files to it.
+
+ * ForwardingHeaders/debugger: Added.
+ * ForwardingHeaders/debugger/DebuggerCallFrame.h: Copied from ForwardingHeaders/kjs/DebuggerCallFrame.h.
+ * ForwardingHeaders/kjs/DebuggerCallFrame.h: Removed.
+ * WebView/WebScriptDebugDelegate.mm:
+ * WebView/WebScriptDebugger.h:
+ * WebView/WebScriptDebugger.mm:
+
+2008-10-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::WebNetscapePluginStream):
+ (WebNetscapePluginStream::~WebNetscapePluginStream):
+ (WebNetscapePluginStream::start):
+
+2008-10-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove an unused forward class declaration.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+
+2008-10-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove WebBaseNetscapePluginViewInternal.h and WebBaseNetscapePluginViewPrivate.h.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginViewInternal.h: Removed.
+ * Plugins/WebBaseNetscapePluginViewPrivate.h: Removed.
+ * Plugins/WebNetscapePluginEventHandler.mm:
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ * Plugins/npapi.mm:
+ * WebView/WebHTMLView.mm:
+
+2008-10-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove WebNetscapePluginEmbeddedView, it adds nothing extra now.
+
+ Remove WebNetscapePlugInStreamLoaderClient since WebNetscapePluginStream is the client now.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebKitPluginContainerView.h:
+ * Plugins/WebNetscapePluginEmbeddedView.h: Removed.
+ * Plugins/WebNetscapePluginEmbeddedView.mm: Removed.
+ * Plugins/WebNetscapePluginEventHandler.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (NetscapePluginWidget::NetscapePluginWidget):
+ (NetscapePluginWidget::handleEvent):
+ (WebFrameLoaderClient::createPlugin):
+ * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.h: Removed.
+ * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.mm: Removed.
+ * WebView/WebHTMLView.mm:
+ (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
+
+2008-10-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove the WebBaseNetscapePluginStream Objective-C object.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ (WebNetscapePluginStream::create):
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::WebNetscapePluginStream):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView pluginView:receivedResponse:]):
+ (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
+ (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
+
+2008-10-29 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig
+
+ https://bugs.webkit.org/show_bug.cgi?id=21952
+
+ Address an outstanding FIXME by removing unused SPI
+
+ * History/WebHistory.mm:
+ (-[WebHistory _addItemForURL:title:]): Fold addItem: into this method
+
+ * History/WebHistoryPrivate.h: Removed unused/unneccessary SPI
+
+2008-10-28 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5188560> REGRESSION: Spell checker doesn't clear spelling/grammar marker after error is marked as Ignored
+
+ * WebView/WebHTMLView.mm: IgnoreSpelling is now a WebCore command. That command handles
+ calling back into WebKit to perform the cross platform work that was removed in this change.
+
+2008-10-28 Cameron Zwarich <zwarich@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Move ForwardingHeaders to their correct location after the creation of
+ the runtime directory in JavaScriptCore.
+
+ * ForwardingHeaders/kjs/JSFunction.h: Removed.
+ * ForwardingHeaders/kjs/JSObject.h: Removed.
+ * ForwardingHeaders/kjs/JSString.h: Removed.
+ * ForwardingHeaders/kjs/JSValue.h: Removed.
+ * ForwardingHeaders/runtime: Added.
+ * ForwardingHeaders/runtime/JSFunction.h: Copied from ForwardingHeaders/kjs/JSFunction.h.
+ * ForwardingHeaders/runtime/JSObject.h: Copied from ForwardingHeaders/kjs/JSObject.h.
+ * ForwardingHeaders/runtime/JSString.h: Copied from ForwardingHeaders/kjs/JSString.h.
+ * ForwardingHeaders/runtime/JSValue.h: Copied from ForwardingHeaders/kjs/JSValue.h.
+ * WebView/WebScriptDebugDelegate.mm:
+ * WebView/WebScriptDebugger.mm:
+ * WebView/WebView.mm:
+
+2008-10-28 Adele Peterson <adele@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=21880
+ "files" string for multifile uploads needs to be localized
+
+ * WebCoreSupport/WebViewFactory.mm: (-[WebViewFactory multipleFileUploadTextForNumberOfFiles:]):
+ Added.
+
+2008-10-28 Timothy Hatcher <timothy@apple.com>
+
+ Add WebInspector methods to enable the profiler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21927
+
+ <rdar://problem/6211578> Make the JavaScript profiler opt-in, so it does
+ not slow down JavaScript all the time
+
+ Reviewed by Darin Adler and Kevin McCullough.
+
+ * WebInspector/WebInspector.h:
+ * WebInspector/WebInspector.mm:
+ (-[WebInspector isJavaScriptProfilingEnabled]): Added. Calls InspectorController::profilerEnabled.
+ (-[WebInspector setJavaScriptProfilingEnabled:]): Added. Call InspectorController's disableProfiler
+ or enableProfiler methods.
+
+2008-10-27 Timothy Hatcher <timothy@apple.com>
+
+ Rename a few methods related to attaching and detaching the debugger.
+
+ * Rename attachDebugger to enableDebugger.
+ * Rename detachDebugger to disableDebugger.
+ * Rename the debuggerAttached getter to debuggerEnabled.
+
+ Reviewed by Darin Adler.
+
+ * WebInspector/WebInspector.mm:
+ (-[WebInspector isDebuggingJavaScript]):
+ (-[WebInspector startDebuggingJavaScript:]):
+ (-[WebInspector stopDebuggingJavaScript:]):
+
+2008-10-27 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Use the C++ stream object for JS requests as well.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
+ (-[WebBaseNetscapePluginView destroyStream:reason:]):
+
+2008-10-27 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Use the C++ stream object in WebBaseNetscapePluginView. Use a HashSet of RefPtrs to keep track of the streams.
+
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::~WebNetscapePluginStream):
+ (WebNetscapePluginStream::setPlugin):
+ (WebNetscapePluginStream::startStream):
+ (WebNetscapePluginStream::destroyStream):
+ (WebNetscapePluginStream::destroyStreamWithReason):
+ (WebNetscapePluginStream::cancelLoadAndDestroyStreamWithError):
+ (WebNetscapePluginStream::deliverData):
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView stop]):
+ (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
+ (-[WebBaseNetscapePluginView disconnectStream:]):
+ (-[WebBaseNetscapePluginView dealloc]):
+ (-[WebBaseNetscapePluginView pluginView:receivedResponse:]):
+ (-[WebBaseNetscapePluginView pluginView:receivedData:]):
+ (-[WebBaseNetscapePluginView pluginView:receivedError:]):
+ (-[WebBaseNetscapePluginView pluginViewFinishedLoading:]):
+ (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
+
+2008-10-27 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Move code from dealloc and finalize to the WebNetscapePluginStream destructor.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::~WebNetscapePluginStream):
+ (-[WebBaseNetscapePluginStream dealloc]):
+ (-[WebBaseNetscapePluginStream finalize]):
+
+2008-10-27 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Get rid of WebNetscapePlugInStreamLoaderClient, the plug-in stream is its own client.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::WebNetscapePluginStream):
+ (-[WebBaseNetscapePluginStream dealloc]):
+ (-[WebBaseNetscapePluginStream finalize]):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView pluginView:receivedError:]):
+ (-[WebBaseNetscapePluginView pluginViewFinishedLoading:]):
+ (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
+ (-[WebBaseNetscapePluginView destroyStream:reason:]):
+
+2008-10-27 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Change the Obj-C init methods to simply call WebNetscapePluginStream::create.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ (WebNetscapePluginStream::create):
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream initWithFrameLoader:]):
+ (WebNetscapePluginStream::WebNetscapePluginStream):
+ (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
+
+2008-10-27 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Convert more code over to C++.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ (WebNetscapePluginStream::plugin):
+ (WebNetscapePluginStream::setRequestURL):
+ Convert to C++.
+
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::start):
+ (WebNetscapePluginStream::stop):
+ Ditto.
+
+ (WebNetscapePluginStream::startStreamWithResponse):
+ Ditto.
+
+ (-[WebBaseNetscapePluginStream startStreamWithResponse:]):
+ Call the C++ version.
+
+ (-[WebBaseNetscapePluginStream impl]):
+ New accessor for the C++ class.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView pluginView:receivedData:]):
+ (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
+ (-[WebBaseNetscapePluginView destroyStream:reason:]):
+ Call the C++ methods.
+
+2008-10-24 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Fix https://bugs.webkit.org/show_bug.cgi?id=21759
+ Layering violation: FileChooser should not depend on Document/Frame/Page
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::runOpenPanel):
+
+2008-10-24 Anders Carlsson <andersca@apple.com>
+
+ Fix Tiger build.
+
+ * WebView/WebUIDelegate.h:
+
+2008-10-24 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/5440917> Support NPN_Construct
+
+ Set construct.
+
+ * Plugins/WebNetscapePluginPackage.m:
+ (-[WebNetscapePluginPackage load]):
+
+2008-10-24 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Tim Hatcher.
+
+ <rdar://problem/6119711> Remove the dependency on Foundation's private __COCOA_FORMAL_PROTOCOLS__ define.
+
+ * Misc/EmptyProtocolDefinitions.h:
+
+2008-10-24 Adele Peterson <adele@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKit part of fix for <rdar://problem/5839256> FILE CONTROL: multi-file upload.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::runOpenPanel):
+ (-[WebOpenPanelResultListener chooseFilenames:]):
+ * WebView/WebUIDelegate.h:
+
+2008-10-24 Timothy Hatcher <timothy@apple.com>
+
+ Implement new InspectorClient methods to work with Settings.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21856
+
+ Reviewed by Darin Adler.
+
+ * WebCoreSupport/WebInspectorClient.h: Add the new methods and
+ guard the ObjC parts of the header.
+
+2008-10-24 Darin Adler <darin@apple.com>
+
+ - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame _convertValueToObjcValue:]):
+ (-[WebScriptCallFrame exception]):
+ (-[WebScriptCallFrame evaluateWebScript:]):
+ * WebView/WebView.mm:
+ (aeDescFromJSValue):
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
+ Use JSValue* instead of JSValuePtr.
+
+2008-10-23 Mark Rowe <mrowe@apple.com>
+
+ Build fix.
+
+ * Misc/WebKitErrors.m:
+ (-[NSError _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]):
+
+2008-10-20 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Remove FrameLoaderClient::detachedFromParent4. It is no longer used by any port.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+
+2008-10-20 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/6277777> REGRESSION (r36954): XMLHttpRequest not working when
+ certain WebView delegate actions are taken
+
+ * WebView/WebFrame.mm: (-[WebFrame _attachScriptDebugger]): Don't accidentally create
+ a window shell if there is none yet.
+
+2008-10-19 Darin Adler <darin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
+ improve performance by eliminating JSValue as a base class for JSCell
+
+ Remove most uses of JSValue, which will be removed in a future patch.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ Use JSValuePtr instead of JSValue.
+ * WebView/WebScriptDebugger.h: Removed declaration of JSValue.
+
+2008-10-18 Darin Adler <darin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
+ improve performance by eliminating JSValue as a base class for JSCell
+
+ Tweak a little more to get closer to where we can make JSValuePtr a class.
+
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame _convertValueToObjcValue:]): Use JSValuePtr.
+ (-[WebScriptCallFrame exception]): Ditto.
+ (-[WebScriptCallFrame evaluateWebScript:]): Ditto. And noValue.
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::WebScriptDebugger): Use new DebuggerCallFrame
+ constructor that doesn't require explicitly passing an exception.
+ * WebView/WebView.mm:
+ (aeDescFromJSValue): Use JSValuePtr.
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto.
+
+2008-10-18 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - WebKit/mac part of https://bugs.webkit.org/show_bug.cgi?id=21736
+ Long-dead decoded image data make up for most of the object cache's memory use over time
+
+ * WebView/WebView.mm:
+ (+[WebView _setCacheModel:]): In the primary web browser model, set the
+ cache's dead decoded data deletion interval to 60 seconds.
+
+2008-10-15 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Fix a leak of a CFStringRef reported by the build bot.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): Use a autoreleased
+ NSString rather than manually releasing a CFStringRef when we're done with it.
+
+2008-10-15 Kenneth Russell <kenneth.russell@sun.com>
+
+ Reviewed and landed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21572
+
+ Initialize pluginFunc.size to the correct size before calling NP_GetEntryPoints.
+
+ * Plugins/WebNetscapePluginPackage.m:
+ (-[WebNetscapePluginPackage load]):
+
+2008-10-15 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6272508> Crash occurs after loading flash content at http://www.macrumors.com/
+
+ Restore some code related to the CoreGraphics drawing model that was misplaced in r37131.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView invalidateRegion:]):
+ (-[WebBaseNetscapePluginView setVariable:value:]):
+
+2008-10-15 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Cameron Zwarich.
+
+ Fixed https://bugs.webkit.org/show_bug.cgi?id=21345
+ Start the debugger without reloading the inspected page
+
+ * WebInspector/WebInspector.mm:
+ (-[WebInspector startDebuggingJavaScript:]): Updated for rename.
+
+2008-10-14 Maxime Britto <britto@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Added SPI to use WebCore's TextIterator with WebKit.
+
+ * WebView/WebTextIterator.h: Added.
+ * WebView/WebTextIterator.mm: Added.
+ (-[WebTextIteratorPrivate dealloc]):
+ (-[WebTextIterator dealloc]):
+ (-[WebTextIterator initWithRange:]): Creates a TextIterator
+ instance
+ (-[WebTextIterator advance]): Asks the iterator to advance() .
+ (-[WebTextIterator currentNode]): Returns the current DOMNode from
+ the iterator
+ (-[WebTextIterator currentText]): Returns the current text from the
+ iterator
+ (-[WebTextIterator atEnd]): Indicated whether the iterator has
+ reached the end of the range.
+ * WebView/WebView.h:
+ * WebView/WebView.mm:
+ (-[WebView textIteratorForRect:]): Returns a WebTextIterator with
+ the DOMRange contained in the rectangle given as a parameter.
+
+2008-10-15 Timothy Hatcher <timothy@apple.com>
+
+ Clean up user agent generation to simplify the _standardUserAgentWithApplicationName:
+ class method to not require a WebKit version.
+
+ Reviewed by Darin Adler.
+
+ * WebView/WebView.mm:
+ (+[WebView _standardUserAgentWithApplicationName:]): Create the WebKit version.
+ (-[WebView WebCore::_userAgentForURL:]): Use the simplified _standardUserAgentWithApplicationName:.
+ Remove code that created the WebKit version.
+ * WebView/WebViewPrivate.h: Change the method name of _standardUserAgentWithApplicationName:.
+
+2008-10-14 Timothy Hatcher <timothy@apple.com>
+
+ Make the user agent generation method a class method and cache the WebKit
+ version in a static to prevent generating it every time. This is needed
+ clean up to fix <rdar://problem/6292331>. Moved all code to WebPrivate so
+ the class method can be in the WebViewPrivate.h header.
+
+ Reviewed by John Sullivan.
+
+ * WebView/WebView.mm:
+ (callGestalt): Moved. Same code.
+ (createMacOSXVersionString): Moved. Same code.
+ (createUserVisibleWebKitVersionString): Moved from _userVisibleBundleVersionFromFullVersion:
+ and returns a copied string.
+ (+[WebView _standardUserAgentWithApplicationName:andWebKitVersion:]): Made into a class method.
+ (-[WebView WebCore::_userAgentForURL:]): Changed to cache the WebKit version.
+ * WebView/WebViewPrivate.h: Added +_standardUserAgentWithApplicationName:andWebKitVersion:.
+
+2008-10-13 Maciej Stachowiak <mjs@apple.com>
+
+ Rubber stamped by Mark Rowe.
+
+ - use gcc 4.2 when building with Xcode 3.1 or newer on Leopard, even though this is not the default
+
+ * Configurations/DebugRelease.xcconfig:
+
+2008-10-11 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - rename _setAlwaysUseATSU to _setAlwaysUsesComplexTextCodePath and
+ update it for the renamed WebCoreTextRenderer method; keep the old
+ method around for clients that use it
+
+ * WebView/WebView.mm:
+ (+[WebView _setAlwaysUseATSU:]):
+ (+[WebView _setAlwaysUsesComplexTextCodePath:]):
+ * WebView/WebViewPrivate.h:
+
+2008-10-09 Timothy Hatcher <timothy@apple.com>
+
+ Don't convert JavaScriptCore header include paths to WebKit paths. This was needed
+ back when NPAPI and WebScriptObject migrated from JavaScriptCore. Also remove
+ JavaScriptCore from the VPATH.
+
+ Reviewed by Sam Weinig.
+
+ * MigrateHeaders.make:
+
+2008-10-08 Darin Adler <darin@apple.com>
+
+ Reviewed by Cameron Zwarich.
+
+ - https://bugs.webkit.org/show_bug.cgi?id=21403
+ Bug 21403: use new CallFrame class rather than Register* for call frame manipulation
+
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::WebScriptDebugger): Update since DebuggerCallFrame is simpler now.
+
+2008-10-08 Timothy Hatcher <timothy@apple.com>
+
+ Roll out r37427 because it causes an infinite recursion loading about:blank.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21476
+
+2008-10-08 Darin Adler <darin@apple.com>
+
+ Reviewed by Cameron Zwarich.
+
+ - https://bugs.webkit.org/show_bug.cgi?id=21403
+ Bug 21403: use new CallFrame class rather than Register* for call frame manipulation
+
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::WebScriptDebugger): Update since DebuggerCallFrame is simpler now.
+
+2008-10-07 David Hyatt <hyatt@apple.com>
+
+ Move viewless WebKit methods that Safari needs from WebViewInternal to WebViewPrivate.
+
+ Reviewed by Tim Hatcher
+
+ * WebView/WebView.mm:
+ (WebKitInitializeApplicationCachePathIfNecessary):
+ (-[WebView _registerDraggedTypes]):
+ (-[WebView _usesDocumentViews]):
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ (-[WebView _initWithFrame:frameName:groupName:usesDocumentViews:]):
+ (-[WebView isFlipped]):
+ (-[WebView viewWillDraw]):
+ * WebView/WebViewInternal.h:
+ * WebView/WebViewPrivate.h:
+
+2008-10-07 David Hyatt <hyatt@apple.com>
+
+ Fix crash in isFlipped. Null check _private since isFlipped can get called from within AppKit
+ machinery during teardown of the WebView.
+
+ Reviewed by Adam Roben
+
+ * WebView/WebView.mm:
+ (-[WebView isFlipped]):
+
+2008-10-07 David Hyatt <hyatt@apple.com>
+
+ Make viewless WebKit update focused and active state when the window becomes and loses key.
+ The focus controller has been patched to understand that in viewless mode it can recur down and
+ update all of the frames, which is why this code works now when placed just on the WebView.
+
+ Reviewed by Adam Roben
+
+ * WebView/WebView.mm:
+ (-[WebView addWindowObservers]):
+ (-[WebView removeWindowObservers]):
+ (-[WebView viewWillMoveToWindow:]):
+ (-[WebView viewDidMoveToWindow]):
+ (-[WebView _updateFocusedAndActiveState]):
+ (-[WebView _windowDidBecomeKey:]):
+ (-[WebView _windowDidResignKey:]):
+ (-[WebView _windowWillOrderOnScreen:]):
+
+2008-10-07 David Hyatt <hyatt@apple.com>
+
+ Make sure the parent visibility state is set up properly on the outermost ScrollView widget.
+ This fixes the repainting issues with viewless WebKit on Mac.
+
+ Reviewed by Sam Weinig
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage):
+
+2008-10-07 David Hyatt <hyatt@apple.com>
+
+ Make sure viewless Mac WebKit does a layout if needed before drawing.
+
+ Reviewed by Sam Weinig
+
+ * WebView/WebView.mm:
+ (-[WebView viewWillDraw]):
+
+2008-10-07 David Hyatt <hyatt@apple.com>
+
+ Make sure observers get hooked up to watch for size changes in viewless WebKit mode.
+
+ Reviewed by Sam Weinig
+
+ * ChangeLog:
+ * WebView/WebFrame.mm:
+ (-[WebFrame _drawRect:contentsOnly:]):
+ * WebView/WebView.mm:
+ (-[WebView viewWillDraw]):
+ (-[WebView _boundsChanged]):
+ (-[WebView addSizeObservers]):
+ (-[WebView viewDidMoveToWindow]):
+ (-[WebView viewDidMoveToSuperview]):
+
+2008-10-07 David Hyatt <hyatt@apple.com>
+
+ Make sure WebView listens for size changes and resizes the frame view in viewless mode.
+
+ Reviewed by Sam Weinig
+
+ * WebView/WebView.mm:
+ (-[WebView addSizeObservers]):
+ (-[WebView viewDidMoveToWindow]):
+ (-[WebView viewDidMoveToSuperview]):
+
+2008-10-06 David Hyatt <hyatt@apple.com>
+
+ Enable viewless Mac WebKit to paint some basic pages.
+
+ Reviewed by Sam Weinig
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::windowResizerRect):
+ (WebChromeClient::repaint):
+ (WebChromeClient::screenToWindow):
+ (WebChromeClient::windowToScreen):
+ (WebChromeClient::platformWindow):
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::forceLayoutForNonHTML):
+ (WebFrameLoaderClient::dispatchDidCommitLoad):
+ (WebFrameLoaderClient::transitionToCommittedForNewPage):
+ (WebFrameLoaderClient::createFrame):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _drawRect:contentsOnly:]):
+ * WebView/WebFrameInternal.h:
+ * WebView/WebFrameView.mm:
+ * WebView/WebFrameViewInternal.h:
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawSingleRect:]):
+ (-[WebHTMLView drawRect:]):
+ * WebView/WebView.mm:
+ (-[WebView isFlipped]):
+ (-[WebView _boundsChanged]):
+ (-[WebView _mustDrawUnionedRect:singleRects:count:]):
+ (-[WebView drawSingleRect:]):
+ (-[WebView drawRect:]):
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ (-[WebView initWithFrame:frameName:groupName:]):
+ (-[WebView _initWithFrame:frameName:groupName:usesDocumentViews:]):
+ (-[WebView initWithCoder:]):
+ (-[WebView removeSizeObservers]):
+ (-[WebView viewWillMoveToWindow:]):
+ (-[WebView viewWillMoveToSuperview:]):
+ (-[WebView _usesDocumentViews]):
+ * WebView/WebViewInternal.h:
+
+2008-10-06 Kevin Decker <kdecker@apple.com>
+
+ Rubber-stamped by Anders Carlsson.
+
+ Rename _webkit_applicationCacheDirectoryWithBundleIdentifier to _webkit_localCacheDirectoryWithBundleIdentifier.
+
+ * Misc/WebKitNSStringExtras.h:
+ * Misc/WebKitNSStringExtras.m:
+ (+[NSString _webkit_localCacheDirectoryWithBundleIdentifier:]):
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _transferApplicationCache:]):
+ * WebView/WebView.mm:
+ (WebKitInitializeApplicationCachePathIfNecessary):
+
+2008-10-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Make WebNetscapePluginStream a WebCore::NetscapePlugInStreamLoaderClient.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ (WebNetscapePluginStream::~WebNetscapePluginStream):
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::didReceiveResponse):
+ (-[WebBaseNetscapePluginStream startStreamWithResponse:]):
+ (WebNetscapePluginStream::wantsAllStreams):
+ (-[WebBaseNetscapePluginStream wantsAllStreams]):
+ (WebNetscapePluginStream::didFail):
+ (-[WebBaseNetscapePluginStream destroyStreamWithError:]):
+ (WebNetscapePluginStream::didFinishLoading):
+ (-[WebBaseNetscapePluginStream finishedLoading]):
+ (WebNetscapePluginStream::didReceiveData):
+ (-[WebBaseNetscapePluginStream receivedData:]):
+
+2008-10-06 Anders Carlsson <andersca@apple.com>
+
+ Bring back the stop method. It was called through performSelector, which
+ is why I couldn't find any references to it.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream stop]):
+
+2008-10-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ More conversion and cleanup.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::startStream):
+ (-[WebBaseNetscapePluginStream startStreamWithResponse:]):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
+
+2008-10-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fold initWithRequestURL into initWithRequest.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
+
+2008-10-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Change the init methods not to return nil on failures. (These failures never occur anyway)
+
+ Use initWithRequest as the initializer, initWithRequestURL is going to be merged with it.
+
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
+ (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
+
+2008-10-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Convert more methods over to C++.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::ownerForStream):
+ (WebNetscapePluginStream::pluginCancelledConnectionError):
+ (WebNetscapePluginStream::errorForReason):
+ (-[WebBaseNetscapePluginStream errorForReason:]):
+ (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
+ (WebNetscapePluginStream::cancelLoadAndDestroyStreamWithError):
+ (-[WebBaseNetscapePluginStream cancelLoadAndDestroyStreamWithError:]):
+ (WebNetscapePluginStream::deliverData):
+ (WebNetscapePluginStream::deliverDataTimerFired):
+ (WebNetscapePluginStream::deliverDataToFile):
+ (-[WebBaseNetscapePluginStream finishedLoading]):
+ (-[WebBaseNetscapePluginStream receivedData:]):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView destroyStream:reason:]):
+
+2008-10-06 David Hyatt <hyatt@apple.com>
+
+ Add SPI for a new viewless WebKit mode. The idea is that when this flag is set there will be no
+ views created except for the outermost WebView.
+
+ Reviewed by Tim Hatcher
+
+ * WebView/WebView.mm:
+ * WebView/WebViewInternal.h:
+
+2008-10-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Convert more methods over to C++.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::reasonForError):
+ (WebNetscapePluginStream::destroyStreamWithReason):
+ (WebNetscapePluginStream::cancelLoadWithError):
+ (-[WebBaseNetscapePluginStream cancelLoadWithError:]):
+ (WebNetscapePluginStream::destroyStreamWithError):
+ (-[WebBaseNetscapePluginStream destroyStreamWithError:]):
+ (-[WebBaseNetscapePluginStream cancelLoadAndDestroyStreamWithError:]):
+ (-[WebBaseNetscapePluginStream _deliverDataToFile:]):
+ (-[WebBaseNetscapePluginStream finishedLoading]):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithError:]):
+
+2008-10-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Cameron Zwarich.
+
+ - https://bugs.webkit.org/show_bug.cgi?id=21295
+ Bug 21295: Replace ExecState with a call frame Register pointer
+
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::WebScriptDebugger): Remove 0 passed for ExecState.
+
+2008-10-03 John Sullivan <sullivan@apple.com>
+
+ Fixed Release build
+
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::destroyStream):
+ added !LOG_DISABLED guard around declaration of npErr used only in LOG
+
+2008-10-03 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Convert destroyStream over to C++.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::destroyStream):
+ (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]):
+ (-[WebBaseNetscapePluginStream _deliverData]):
+
+2008-10-03 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Use a Timer instead of -[NSObject performSelector:withObject:afterDelay];
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ (WebNetscapePluginStream::WebNetscapePluginStream):
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream _destroyStream]):
+ (-[WebBaseNetscapePluginStream _deliverData]):
+ (WebNetscapePluginStream::deliverDataTimerFired):
+
+2008-10-03 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by David Hyatt.
+
+ More plug-in stream cleanup.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ (WebNetscapePluginStream::create):
+ (WebNetscapePluginStream::WebNetscapePluginStream):
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream initWithFrameLoader:]):
+ (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
+ (-[WebBaseNetscapePluginStream dealloc]):
+ (-[WebBaseNetscapePluginStream finalize]):
+ (-[WebBaseNetscapePluginStream setPlugin:]):
+ (WebNetscapePluginStream::setPlugin):
+ (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
+ (-[WebBaseNetscapePluginStream _destroyStream]):
+
+2008-10-03 David Hyatt <hyatt@apple.com>
+
+ Remove addToDirtyRegion.
+
+ Reviewed by Oliver Hunt
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+
+2008-10-02 David Hyatt <hyatt@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=21328
+
+ Make widget invalidation more cross-platform.
+
+ (1) Make invalidateRect a pure virtual function on Widget. All leaf widgets must now implement this function.
+
+ (2) Scrollbars now send invalidations through the ScrollbarClient. windowClipRect on ScrollbarClient has been removed and replaced with this invalidation call.
+ This allows all scrollbar invalidations to go through the render tree so that transforms and reflections will be respected.
+
+ (3) Plugins now have the native window invalidation code for windowed plugins. Windowless plugins do a repaintRectangle on the plugin's renderer.
+
+ (4) FrameViews now do a repaintRectangle on their owner element's renderer.
+
+ Reviewed by Sam Weinig
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (PluginWidget::PluginWidget):
+ (PluginWidget::invalidateRect):
+ (NetscapePluginWidget::NetscapePluginWidget):
+ (WebFrameLoaderClient::createPlugin):
+
+2008-10-02 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ - https://bugs.webkit.org/show_bug.cgi?id=21321
+ Bug 21321: speed up JavaScriptCore by inlining Heap in JSGlobalData
+
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics javaScriptObjectsCount]): Use heap. instead of heap-> to
+ work with the heap.
+ (+[WebCoreStatistics javaScriptGlobalObjectsCount]): Ditto.
+ (+[WebCoreStatistics javaScriptProtectedObjectsCount]): Ditto.
+ (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]): Ditto.
+ (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]): Ditto.
+ (+[WebCoreStatistics javaScriptReferencedObjectsCount]): Ditto.
+
+2008-10-02 David Hyatt <hyatt@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=21314
+
+ Make scrollBackingStore cross-platform.
+
+ Reviewed by Sam Weinig
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::repaint):
+ (WebChromeClient::scroll):
+
+2008-10-01 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler and Cameron Zwarich.
+
+ Updated for JavaScriptCore API changes: use a SourceCode instead of
+ broken out parameters; treat sourceId as intptr_t.
+
+ We still treat sourceId as int in some cases because of DashCode. See
+ <rdar://problem/6263293> WebScriptDebugDelegate should use intptr_t for
+ sourceId, not int.
+
+ * WebView/WebScriptDebugger.h:
+ * WebView/WebScriptDebugger.mm:
+ (toNSString):
+ (WebScriptDebugger::sourceParsed):
+ (WebScriptDebugger::callEvent):
+ (WebScriptDebugger::atStatement):
+ (WebScriptDebugger::returnEvent):
+ (WebScriptDebugger::exception):
+ (WebScriptDebugger::willExecuteProgram):
+ (WebScriptDebugger::didExecuteProgram):
+ (WebScriptDebugger::didReachBreakpoint):
+
+2008-10-01 David Hyatt <hyatt@apple.com>
+
+ Move prohibitsScrolling from the Frame to the ScrollView.
+
+ Reviewed by Sam Weinig
+
+ * WebView/WebView.mm:
+ (-[WebView setProhibitsMainFrameScrolling:]):
+
+2008-10-01 David Hyatt <hyatt@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=21282
+
+ Make contentsToScreen/screenToContents cross-platform. Only implemented by Mac/Win right now.
+
+ Reviewed by Adam Roben
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::repaint):
+ (WebChromeClient::screenToWindow):
+ (WebChromeClient::windowToScreen):
+
+2008-09-30 Dave Hyatt <hyatt@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=21269
+
+ This patch makes the ScrollView::paint method cross-platform. The paint method calls the base class
+ Widget paint on platforms with native widgets (Mac and wx). Otherwise it calls a virtual function,
+ paintContents, to paint the ScrollView's contents, and then it paints each of the two scrollbars and
+ the scrollbar corner.
+
+ The scrollbar themes are now responsible for painting scrollbar corners. At the moment ScrollbarThemeWin still
+ paints white (which is incorrect), so a future patch will actually implement proper native scroll corner painting
+ for Windows.
+
+ paintContents is implemented by FrameView, and replaces Frame::paint. All of the FramePrivate member
+ variables used by Frame::paint have moved to FrameViewPrivate instead. All callers of Frame::paint have
+ been patched to use FrameView::paintContents instead.
+
+ Reviewed by Darin Adler
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _drawRect:]):
+
+2008-09-30 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Remove the NPDrawingModelOpenGL entirely. To my knowledge no shipping plug-in ever used it, and no other browser engine
+ ever supported it.
+
+ * Plugins/WebBaseNetscapePluginView.h: Removed AGL.h import and OpenGL related ivars.
+ * Plugins/WebBaseNetscapePluginView.mm: Removed soft linking for OpenGL and AGL frameworks.
+ Also removed many methods AGL/CGL support methods that are no longer necessary.
+ (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): Removed NPDrawingModelOpenGL related code.
+ (-[WebBaseNetscapePluginView restorePortState:]): Ditto.
+ (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): Ditto.
+ (-[WebBaseNetscapePluginView isNewWindowEqualToOldWindow]): Ditto.
+ (-[WebBaseNetscapePluginView setWindowIfNecessary]): Ditto.
+ (-[WebBaseNetscapePluginView stop]): Ditto.
+ (-[WebBaseNetscapePluginView dealloc]): Ditto.
+ (-[WebBaseNetscapePluginView drawRect:]):
+ (-[WebBaseNetscapePluginView viewWillMoveToWindow:]): Ditto.
+ (-[WebBaseNetscapePluginView invalidateRegion:]): Ditto.
+ (-[WebBaseNetscapePluginView getVariable:value:]): Tell plug-ins WebKit does not support NPDrawingModelOpenGL.
+ (-[WebBaseNetscapePluginView setVariable:value:]): Removed NPDrawingModelOpenGL related code.
+ (-[WebBaseNetscapePluginView _viewHasMoved]): Ditto.
+
+2008-09-30 Dave Hyatt <hyatt@apple.com>
+
+ http://bugs.webkit.org/show_bug.cgi?id=21250
+
+ Rename updateContents to repaintContentRectangle and make it cross-platform by always sending
+ repaints up through the ChromeClient.
+
+ Reviewed by Darin Adler
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::repaint):
+
+2008-09-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mark Rowe and Adam Roben.
+
+ No need to use pointers to store C++ objects as pointers in WebViewPrivate, we can just
+ store them directly.
+
+ * Configurations/Base.xcconfig:
+ Set GCC_OBJC_CALL_CXX_CDTORS to YES.
+
+ * WebView/WebView.mm:
+ (-[WebViewPrivate init]):
+ (-[WebViewPrivate dealloc]):
+ (-[WebViewPrivate finalize]):
+ (-[WebView _preferencesChangedNotification:]):
+ (-[WebView setApplicationNameForUserAgent:]):
+ (-[WebView setCustomUserAgent:]):
+ (-[WebView customUserAgent]):
+ (-[WebView WebCore::_userAgentForURL:WebCore::]):
+ (-[WebView _addObject:forIdentifier:]):
+ (-[WebView _objectForIdentifier:]):
+ (-[WebView _removeObjectForIdentifier:]):
+
+2008-09-29 Thiago Macieira <thiago.macieira@nokia.com>
+
+ Reviewed by Simon.
+
+ Changed copyright from Trolltech ASA to Nokia.
+
+ Nokia acquired Trolltech ASA, assets were transferred on September 26th 2008.
+
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ * WebCoreSupport/WebEditorClient.h:
+ * WebCoreSupport/WebEditorClient.mm:
+
+2008-09-28 Timothy Hatcher <timothy@apple.com>
+
+ Improves the Web Inspector node highlight so it does not scroll
+ to reveal the node in the page. This makes the highlight less
+ invasive and causes less things to change on screen. Also makes
+ the highlight redraw when the WebView draws, so it stays current
+ if the node changes on the page for any reason.
+
+ <rdar://problem/6115804> Don't scroll when highlighting (21000)
+ https://bugs.webkit.org/show_bug.cgi?id=21000
+
+ Reviewed by Dan Bernstein.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController highlightNode:]): Call setNeedsDisplay:YES
+ if there is an existing highlight.
+ (-[WebInspectorWindowController didAttachWebNodeHighlight:]): Set the current
+ highlight node on the inspected WebView.
+ (-[WebInspectorWindowController willDetachWebNodeHighlight:]): Set the current
+ highlight node on the inspected WebView to nil.
+ * WebInspector/WebNodeHighlight.m:
+ (-[WebNodeHighlight setNeedsUpdateInTargetViewRect:]): Disable screen updates
+ until flush for the inspected window. Invalidate the whole highlight view since
+ we don't know the rect that needs updated since the highlight can be larger than
+ the highlighted element due to the margins and other factors.
+ * WebInspector/WebNodeHighlightView.m:
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawSingleRect:]): Call setNeedsUpdateInTargetViewRect: on the
+ current highlight node.
+ * WebView/WebView.mm:
+ (-[WebViewPrivate dealloc]): Release the current highlight node.
+ (-[WebView setCurrentNodeHighlight:]): Set the current highlight node.
+ (-[WebView currentNodeHighlight]): Return the current highlight node.
+ * WebView/WebViewInternal.h:
+
+2008-09-28 David Kilzer <ddkilzer@apple.com>
+
+ Fix build warning in WebDefaultUIDelegate.m
+
+ Reviewed by Dan Bernstein.
+
+ This fixes a warning noticed by the clang static analyzer:
+ .../WebDefaultUIDelegate.m: In function ‘-[WebDefaultUIDelegate webViewFirstResponder:]’:
+ .../WebDefaultUIDelegate.m:92: warning: initialization from distinct Objective-C type
+
+ Note that this doesn't actually cause any change in behavior since
+ the gcc compiler ignores the semi-colon anyway.
+
+ * DefaultDelegates/WebDefaultUIDelegate.m:
+ (-[WebDefaultUIDelegate webViewFirstResponder:]): Removed semi-colon
+ from method signature.
+
+2008-09-27 David Hyatt <hyatt@apple.com>
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=21182
+
+ Make sure Mac null checks the view like the other platforms do now that Mac goes through WebCore
+ to call setAllowsScrolling.
+
+ Reviewed by Mark Rowe
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createFrame):
+
+2008-09-27 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21178
+ <rdar://problem/6248651>
+
+ Check if the plug-in is allowed to load the resource. This matches Firefox.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
+
+2008-09-26 Matt Lilek <webkit@mattlilek.com>
+
+ Reviewed by Tim Hatcher.
+
+ Update FEATURE_DEFINES after ENABLE_CROSS_DOCUMENT_MESSAGING was removed.
+
+ * Configurations/WebKit.xcconfig:
+
+2008-09-26 David Hyatt <hyatt@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=21164
+
+ Rework concept of allowsScrolling/setAllowsScrolling to be cross-platform.
+
+ Reviewed by Sam Weinig
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createFrame):
+ * WebView/WebDynamicScrollBarsView.h:
+ * WebView/WebDynamicScrollBarsView.m:
+ * WebView/WebDynamicScrollBarsViewInternal.h:
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView setAllowsScrolling:]):
+ (-[WebFrameView allowsScrolling]):
+
+2008-09-26 David Hyatt <hyatt@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=21149
+
+ More refactoring to make scrollbar modes cross-platform. Reduce the protocol that
+ WebDynamicScrollBarsView has to implement for communicating with WebCore to just three methods.
+
+ Reviewed by Sam Weinig
+
+ * WebView/WebDynamicScrollBarsView.m:
+ (-[WebDynamicScrollBarsView scrollingModes:WebCore::vertical:WebCore::]):
+ (-[WebDynamicScrollBarsView setHorizontalScrollingMode:andLock:]):
+ (-[WebDynamicScrollBarsView setVerticalScrollingMode:andLock:]):
+ (-[WebDynamicScrollBarsView setScrollingModes:vertical:andLock:]):
+ * WebView/WebDynamicScrollBarsViewInternal.h:
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView setAllowsScrolling:]):
+ * WebView/WebView.mm:
+ (-[WebView setAlwaysShowVerticalScroller:]):
+ (-[WebView setAlwaysShowHorizontalScroller:]):
+
+2008-09-26 David Kilzer <ddkilzer@apple.com>
+
+ Fix Mac build with XSLT disabled
+
+ Reviewed by Alexey.
+
+ * Misc/WebCache.mm:
+ (+[WebCache statistics]): Populate xslStyleSheet statistics with
+ zeros if XSLT is disabled.
+
+2008-09-25 David Hyatt <hyatt@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=21101
+
+ Fix the updating of the active state to not be dumb, so that viewless scrollbars repaint properly.
+
+ Reviewed by Tim Hatcher
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _updateFocusedAndActiveState]):
+
+2008-09-24 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ - https://bugs.webkit.org/show_bug.cgi?id=21079
+ <rdar://problem/6203938> Disallow embedding Safari-generated pages
+ (e.g bookmarks collection) in subframes
+
+ * DefaultDelegates/WebDefaultPolicyDelegate.m:
+ (-[WebDefaultPolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]):
+ Use the new +[WebView _canHandleRequest:forMainFrame:] so we can give
+ a different answer for the main frame and subframes.
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::canHandleRequest): Ditto.
+
+ * WebView/WebView.mm:
+ (+[WebView _canHandleRequest:forMainFrame:]): Added forMainFrame. Only look
+ for scheme-specific representations for the main frame, not subframes.
+ (+[WebView _canHandleRequest:]): Give answer for main frame -- calls the
+ method above with YES for main frame.
+
+ * WebView/WebViewInternal.h: Added _canHandleRequest:forMainFrame:.
+
+2008-09-23 David Hyatt <hyatt@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=21039
+
+ Teach the viewless Mac scrollbar how to avoid the NSWindow resizer.
+
+ Reviewed by Sam Weinig
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::windowResizerRect):
+
+2008-09-23 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ - fix <rdar://problem/6233388> Crash beneath -[WebFrameView keyDown:]
+
+ Test: fast/events/keydown-remove-frame.html
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView keyDown:]): Added a null check.
+
+2008-09-21 Dirk Schulze <vbs85@gmx.de>
+
+ Reviewed and landed by Eric Seidel.
+
+ Moved CGFloat definition to WebKitPrefix so CGFloat can be used more
+ freely throughout WebCore without worrying about breaking Tiger.
+
+ * Misc/WebTypesInternal.h: Removed it from here.
+ * WebKitPrefix.h: Added it here.
+
+2008-09-20 Matt Lilek <webkit@mattlilek.com>
+
+ Reviewed by Tim Hatcher.
+
+ Revert r35688. We use a textured window on Leopard, which does not have the
+ square corners of the standard Aqua window on Tiger.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController window]): Add back the call to WKNSWindowMakeBottomCornersSquare.
+
+2008-09-19 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ - speculative fix for https://bugs.webkit.org/show_bug.cgi?id=20943
+ Assertion failure in RefCountedLeakCounter::cancelMessageSuppression() when closing a window
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]): Moved call to
+ RefCountedLeakCounter::suppressMessages in here.
+ (-[WebView initWithFrame:frameName:groupName:]): Moved it out of here.
+
+2008-09-18 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add SPI to WebView to allow DRT to clear the main frame's name between tests.
+
+ * WebView/WebView.mm:
+ (-[WebView _clearMainFrameName]):
+ * WebView/WebViewPrivate.h:
+
+2008-09-18 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=20925
+ LEAK messages appear every time I quit
+
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences setFullDocumentTeardownEnabled:]): Removed unneeded call
+ to setLogLeakMessages.
+ * WebView/WebView.mm:
+ (-[WebView _closeWithFastTeardown]): Call RefCountedLeakCounter::suppressMessages,
+ telling it that we can't track leaks because at least one WebView was closed with
+ fast teardown.
+ (-[WebView _close]): Removed unneeded call to setLogLeakMessages. Added a call to
+ cancelMessageSuppression since the WebView is no longer open.
+ Added an explicit garbage collect to help with the case where we're closing during
+ the quit process -- the garbageCollectSoon() calls done inside WebCore won't help
+ us in that case.
+ (-[WebView initWithFrame:frameName:groupName:]): Call
+ RefCountedLeakCounter::suppressMessages telling it that we can't track leaks
+ because at least one WebView is currently open.
+
+2008-09-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Move the remainder of the stream ivars to the C++ object.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ (WebNetscapePluginStream::WebNetscapePluginStream):
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream _pluginCancelledConnectionError]):
+ (-[WebBaseNetscapePluginStream initWithFrameLoader:]):
+ (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
+ (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
+ (-[WebBaseNetscapePluginStream dealloc]):
+ (-[WebBaseNetscapePluginStream finalize]):
+ (-[WebBaseNetscapePluginStream setPlugin:]):
+ (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
+ (-[WebBaseNetscapePluginStream start]):
+ (-[WebBaseNetscapePluginStream stop]):
+ (-[WebBaseNetscapePluginStream wantsAllStreams]):
+ (-[WebBaseNetscapePluginStream _destroyStream]):
+ (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]):
+ (-[WebBaseNetscapePluginStream cancelLoadWithError:]):
+ (-[WebBaseNetscapePluginStream _deliverData]):
+
+2008-09-17 David Hyatt <hyatt@apple.com>
+
+ Make the notion of Widget having an underlying native widget cross-platform.
+
+ Reviewed by Sam Weinig
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (NetscapePluginWidget::handleEvent):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _dragSourceMovedTo:]):
+ (-[WebFrame _dragSourceEndedAt:operation:]):
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _install]):
+ * WebView/WebRenderNode.mm:
+ (copyRenderNode):
+
+2008-09-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Cameron Zwarich.
+
+ Move more instance variables down to the C++ class.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ (WebNetscapePluginStream::WebNetscapePluginStream):
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
+ (-[WebBaseNetscapePluginStream dealloc]):
+ (-[WebBaseNetscapePluginStream finalize]):
+ (-[WebBaseNetscapePluginStream transferMode]):
+ (-[WebBaseNetscapePluginStream plugin]):
+ (-[WebBaseNetscapePluginStream setPlugin:]):
+ (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
+ (-[WebBaseNetscapePluginStream wantsAllStreams]):
+ (-[WebBaseNetscapePluginStream _destroyStream]):
+ (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]):
+ (-[WebBaseNetscapePluginStream _deliverData]):
+ (-[WebBaseNetscapePluginStream _deliverDataToFile:]):
+ (-[WebBaseNetscapePluginStream finishedLoading]):
+ (-[WebBaseNetscapePluginStream receivedData:]):
+
+2008-09-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Move a bunch of instance variables into the C++ class.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream _pluginCancelledConnectionError]):
+ (-[WebBaseNetscapePluginStream errorForReason:]):
+ (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
+ (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
+ (-[WebBaseNetscapePluginStream dealloc]):
+ (-[WebBaseNetscapePluginStream setRequestURL:]):
+ (-[WebBaseNetscapePluginStream setResponseURL:]):
+ (-[WebBaseNetscapePluginStream setMIMEType:]):
+ (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
+ (-[WebBaseNetscapePluginStream _destroyStream]):
+ (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]):
+ (-[WebBaseNetscapePluginStream _deliverData]):
+ (-[WebBaseNetscapePluginStream receivedData:]):
+
+2008-09-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Add a new WebNetscapePluginStream C++ class. The idea is that it is supposed to replace the Obj-C
+ WebBaseNetscapePluginStream class. The plan is to gradually move/rewrite code from the Obj-C class to the C++ class
+ until the C++ class can replace the Obj-C class.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ (WebNetscapePluginStream::create):
+ (WebNetscapePluginStream::WebNetscapePluginStream):
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream initWithFrameLoader:]):
+ (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
+ (-[WebBaseNetscapePluginStream dealloc]):
+ (-[WebBaseNetscapePluginStream finalize]):
+
+2008-09-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Instead of storing a pointer to NPP method individually, just store a pointer to the NPNetscapeFuncs vtable.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream setPlugin:]):
+ (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
+ (-[WebBaseNetscapePluginStream wantsAllStreams]):
+ (-[WebBaseNetscapePluginStream _destroyStream]):
+ (-[WebBaseNetscapePluginStream _deliverData]):
+ * Plugins/WebNetscapePluginPackage.h:
+ * Plugins/WebNetscapePluginPackage.m:
+ (-[WebNetscapePluginPackage pluginFuncs]):
+
+2008-09-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Remove references to WebNetscapePluginStream.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebNetscapePluginEmbeddedView.h:
+
+2008-09-15 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=20860
+ REGRESSION: Crash in RenderLayer::hasVisibleContent() loading wavy.com
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _getVisibleRect:]): Changed to check if the RenderPart has
+ layout before accessing it, instead of checking if the frame inside it
+ has layout.
+
+2008-09-15 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler, Beth Dakin
+
+ Support strings for AXLists
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory AXDefinitionListTermText]):
+ (-[WebViewFactory AXDefinitionListDefinitionText]):
+
+2008-09-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mitz.
+
+ Merge WebNetscapePluginStream into WebBaseNetscapePluginStream.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream initWithFrameLoader:]):
+ (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
+ (-[WebBaseNetscapePluginStream dealloc]):
+ (-[WebBaseNetscapePluginStream finalize]):
+ (-[WebBaseNetscapePluginStream start]):
+ (-[WebBaseNetscapePluginStream stop]):
+ (-[WebBaseNetscapePluginStream cancelLoadWithError:]):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView pluginView:receivedResponse:]):
+ (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
+ * Plugins/WebNetscapePluginEmbeddedView.mm:
+ * Plugins/WebNetscapePluginStream.h: Removed.
+ * Plugins/WebNetscapePluginStream.mm: Removed.
+
+2008-09-12 John Sullivan <sullivan@apple.com>
+
+ Fixed <rdar://problem/6110941> Clicking the print button in PDF content does nothing
+
+ Reviewed by Darin Adler
+
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView PDFViewPerformPrint:]):
+ Implemented PDFKit delegate method that's called after a Print action in the PDF content
+
+2008-09-12 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - fix a crash in -visibleRect when it is called during WebFrameView deallocation
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView visibleRect]): Added an early return if _private is 0.
+
+2008-09-11 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - eliminate excessive repainting when a clipped iframe is moved (noticed in <rdar://problem/6204032>)
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _getVisibleRect:]): Added. If the frame is in a RenderPart
+ and has layout, gets the visible rect of the RenderPart and returns
+ YES. Returns NO otherwise.
+ * WebView/WebFrameInternal.h:
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView visibleRect]): Added. Overrides this NSView method to
+ take clipping in the render tree into account.
+
+2008-09-09 Dan Bernstein <mitz@apple.com>
+
+ - Tiger build fix
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+
+2008-09-09 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - WebKit part of <rdar://problem/6206244> Use alternate character-to-glyph interface on Leopard
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+
+2008-09-07 Cameron Zwarich <cwzwarich@uwaterloo.ca>
+
+ Reviewed by Maciej Stachowiak.
+
+ Bug 20704: Replace the KJS namespace
+ <https://bugs.webkit.org/show_bug.cgi?id=20704>
+
+ Rename the KJS namespace to JSC.
+
+ * Misc/WebCoreStatistics.mm:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream wantsAllStreams]):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
+ (-[WebBaseNetscapePluginView setWindowIfNecessary]):
+ (-[WebBaseNetscapePluginView start]):
+ (-[WebBaseNetscapePluginView createPluginScriptableObject]):
+ (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
+ (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]):
+ (-[WebBaseNetscapePluginView loadPluginRequest:]):
+ (-[WebBaseNetscapePluginView _printedPluginBitmap]):
+ * Plugins/WebPluginController.mm:
+ (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
+ (-[WebPluginController startAllPlugins]):
+ (-[WebPluginController stopAllPlugins]):
+ (-[WebPluginController addPlugin:]):
+ (-[WebPluginController destroyPlugin:]):
+ (-[WebPluginController destroyAllPlugins]):
+ * WebView/WebFrame.mm:
+ * WebView/WebScriptDebugDelegate.mm:
+ * WebView/WebScriptDebugger.h:
+ * WebView/WebScriptDebugger.mm:
+ * WebView/WebView.mm:
+ (-[WebViewPrivate init]):
+
+2008-09-05 Timothy Hatcher <timothy@apple.com>
+
+ Correct a typo in the setApplicationChromeModeEnabledEnabled:
+ method name, remove the extra "Enabled".
+
+ * WebView/WebPreferences.mm:
+ * WebView/WebPreferencesPrivate.h:
+
+2008-09-04 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Fix https://bugs.webkit.org/show_bug.cgi?id=20639.
+ Bug 20639: ENABLE_DASHBOARD_SUPPORT does not need to be a FEATURE_DEFINE
+
+ * Configurations/WebKit.xcconfig: Remove ENABLE_DASHBOARD_SUPPORT from FEATURE_DEFINES.
+
+2008-09-03 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Sam.
+
+ Clean up Platform.h and add PLATFORM(CHROMIUM), PLATFORM(SKIA) and USE(V8_BINDINGS)
+
+ * Configurations/WebKit.xcconfig:
+ * WebKitPrefix.h: add rules for V8_BINDINGS
+
+2008-09-01 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=19760
+
+ Add a linked-on-or-after check to prevent substitute data from loading
+ local resources on newer users of WebKit.
+
+ * Misc/WebKitVersionChecks.h:
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+
+2008-08-29 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Anders
+
+ Fix regression I introducted in 35946
+ Already covered by media/video-click-dlbclick-standalone.html
+
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation receivedData:withDataSource:]): Cancel the load here after
+ calling [WebFrame _receivedData:] which more closely follows the path taken by PluginDocuments
+
+2008-08-28 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Geoff.
+
+ <rdar://problem/6095949> REGRESSION (5525.8-6527.1?): "this" is null
+ when you first hit a breakpoint in Dashcode
+ - We wanted to reset the callframe whenever eval() was called but
+ dashcode uses eval() when broken to evaluate the state of the current
+ call frame.
+
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::willExecuteProgram):
+ (WebScriptDebugger::didExecuteProgram):
+
+2008-08-27 Robert Kroeger <rjkroege@liqui.org>
+
+ Tweaked by Sam Weinig.
+
+ Reviewed by Eric Seidel.
+
+ Fix https://bugs.webkit.org/show_bug.cgi?id=6595
+ <rdar://problem/4432150>
+ Right-click does not fire mouseup event
+
+ Adds a rightMouseUp handler to the WebHTMLView.
+
+ The added method generates mouseup events for button 2. The result
+ is that webkit will deliver mousedown and mouseup events for button
+ 2 in a fashion identical to FireFox and will retain event ordering
+ identical to Internet Explorer.
+
+ Test: fast/events/mouseup-from-button2.html
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView rightMouseUp:]):
+
+2008-08-27 Timothy Hatcher <timothy@apple.com>
+
+ Add support for support for -webkit-appearance: default-button on the Mac platform.
+
+ <rdar://problem/6173530>
+
+ Reviewed by Dave Hyatt.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Init AdvanceDefaultButtonPulseAnimation.
+ * WebView/WebPreferenceKeysPrivate.h: Added WebKitApplicationChromeModeEnabledPreferenceKey.
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]): Set WebKitApplicationChromeModeEnabledPreferenceKey to NO.
+ (-[WebPreferences applicationChromeModeEnabled]): Added.
+ (-[WebPreferences setApplicationChromeModeEnabledEnabled:]): Added.
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Call Settings::setApplicationChromeMode
+ with the value of -[WebPreferences applicationChromeModeEnabled].
+
+2008-08-27 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Anders
+
+ <rdar://problem/6134133> - Crash when loading large movie as a standalone document
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::pluginWillHandleLoadError):
+
+2008-08-20 Dan Bernstein <mitz@apple.com>
+
+ Rubber-stamped by John Sullivan.
+
+ - rename shouldUpdateWhileHidden to shouldUpdateWhileOffscreen,
+ rename related methods and variables accordingly, and make
+ -setShouldUpdateWhileOffscreen: and -shouldUpdateWhileOffscreen
+ WebView API.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]):
+ * WebView/WebFrameInternal.h:
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView windowWillOrderOnScreen:]):
+ * WebView/WebView.h:
+ * WebView/WebView.mm:
+ (-[WebViewPrivate init]):
+ (-[WebView setBackgroundColor:]):
+ (-[WebView setDrawsBackground:]):
+ (-[WebView setShouldUpdateWhileOffscreen:]):
+ (-[WebView shouldUpdateWhileOffscreen]):
+ * WebView/WebViewPrivate.h:
+
+2008-08-18 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Switch to non-deprecated NSFileManager API.
+
+ In order to minimize #if's the new NSFileManager APIs have been implemented for
+ Tiger and call sites updated to use the new methods.
+
+ * Misc/WebIconDatabase.mm:
+ (importToWebCoreFormat):
+ * Misc/WebKitNSStringExtras.m:
+ (-[NSString _webkit_fixedCarbonPOSIXPath]):
+ * Misc/WebKitSystemBits.m:
+ * Misc/WebNSFileManagerExtras.h:
+ * Misc/WebNSFileManagerExtras.m: Remove implementations of methods that are not used.
+ (-[NSFileManager _webkit_backgroundRemoveFileAtPath:]):
+ (-[NSFileManager attributesOfFileSystemForPath:error:]): Implement new API for Tiger in terms of Tiger API.
+ (-[NSFileManager contentsOfDirectoryAtPath:error:]): Ditto.
+ (-[NSFileManager moveItemAtPath:toPath:error:]): Ditto.
+ (-[NSFileManager removeItemAtPath:error:]): Ditto.
+ * Plugins/WebPluginDatabase.mm:
+ (-[WebPluginDatabase _scanForNewPlugins]):
+
+2008-08-20 Josh Aas <joshmoz@gmail.com>
+
+ Reviewed and landed by Anders.
+
+ <rdar://problem/6163636>
+ rename NPCocoaEvent's "event" struct to "data" (20446)
+
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ (WebNetscapePluginEventHandlerCocoa::drawRect):
+ (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
+ (WebNetscapePluginEventHandlerCocoa::flagsChanged):
+ (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
+ (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
+ (WebNetscapePluginEventHandlerCocoa::focusChanged):
+
+2008-08-20 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for <rdar://problem/6145626>
+ Allows a WebKit client to mark a frame as not-text-searchable
+ through SPI.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _setExcludeFromTextSearch:]):
+ * WebView/WebFramePrivate.h:
+
+2008-08-19 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ Bring back shared JSGlobalData and implicit locking, because too many clients rely on it.
+
+ * ForwardingHeaders/runtime/JSLock.h: Added.
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics javaScriptObjectsCount]):
+ (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
+ (+[WebCoreStatistics shouldPrintExceptions]):
+ (+[WebCoreStatistics setShouldPrintExceptions:]):
+ (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream wantsAllStreams]):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
+ (-[WebBaseNetscapePluginView setWindowIfNecessary]):
+ (-[WebBaseNetscapePluginView start]):
+ (-[WebBaseNetscapePluginView createPluginScriptableObject]):
+ (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
+ (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]):
+ (-[WebBaseNetscapePluginView loadPluginRequest:]):
+ (-[WebBaseNetscapePluginView _printedPluginBitmap]):
+ * Plugins/WebPluginController.mm:
+ (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
+ (-[WebPluginController startAllPlugins]):
+ (-[WebPluginController stopAllPlugins]):
+ (-[WebPluginController addPlugin:]):
+ (-[WebPluginController destroyPlugin:]):
+ (-[WebPluginController destroyAllPlugins]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame evaluateWebScript:]):
+ * WebView/WebView.mm:
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
+
+2008-08-19 Timothy Hatcher <timothy@apple.com>
+
+ Fixes the Web Inspector flashing white while resizing after
+ highlighting a page element. Calling disableScreenUpdatesUntilFlush
+ when attaching and detaching the Inspector page highlight is bad,
+ since the browser window might not flush again for a while. So screen
+ updates could be disabled for long periods of time, causing backing store
+ flashing while resizing. There is no need to call disableScreenUpdatesUntilFlush
+ when attaching or detaching the child window.
+
+ Reviewed by John Sullivan and Kevin McCullough.
+
+ * WebInspector/WebNodeHighlight.m:
+ (-[WebNodeHighlight attach]): Remove the call to disableScreenUpdatesUntilFlush.
+ (-[WebNodeHighlight detach]): Ditto.
+
+2008-08-19 Timothy Hatcher <timothy@apple.com>
+
+ Correctly remembers the attached state of the Web Inspector so
+ it opens in that state for the next window, or next launch.
+
+ Reviewed by Kevin McCullough.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController attach]): Set WebKitInspectorAttachedKey
+ to YES in the user defaults.
+ (-[WebInspectorWindowController detach]): Set WebKitInspectorAttachedKey
+ to NO in the user defaults.
+
+2008-08-18 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=19347
+ <rdar://problem/5977562> Input methods do not work after switching to a password field
+ and back.
+
+ Fix <rdar://problem/5522011> (The content of the password field of Safari is displayed by
+ reconversion) in a different way which doesn't conflict with context caching performed
+ by AppKit.
+
+ This original bug does not really occur in ToT or shipping Safari under Mac OS X 10.5.4,
+ because input methods are disabled in password fields. Attempting to reconvert text typed
+ with Romaji only yields a string of bullets. Still, it is probably better to match Cocoa
+ password field behavior and disable reconversion completely.
+
+ * WebView/WebHTMLView.mm:
+ (isInPasswordField): Factored out code to determine that the current selection is in
+ a password field.
+ (inputContext): Removed a hack that was breaking TSMGetActiveDocument().
+ (-[WebHTMLView attributedSubstringFromRange:]): Check for password fields.
+ (-[WebHTMLView textStorage]): Ditto.
+
+2008-08-12 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff.
+
+ - eliminate JSValue::type()
+
+ * WebView/WebView.mm:
+ (aeDescFromJSValue): Rewrite to use the JSValue::is functions instead
+ of a switch on JSValue::type().
+
+2008-08-17 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Cameron Zwarich.
+
+ Made room for a free word in JSCell.
+
+ (Updated for JavaScriptCore changes.)
+
+2008-08-15 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Geoff Garen.
+
+ <rdar://problem/6139914> Please include a _debug version of JavaScriptCore framework
+
+ * Configurations/Base.xcconfig: Factor out the debug-only settings so that they can shared
+ between the Debug configuration and debug Production variant.
+
+2008-08-14 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Geoffrey Garen and Timothy Hatcher.
+
+ Add WebView SPI to set HTMLTokenizer yielding parameters.
+
+ * WebView/WebView.mm:
+ (-[WebView _setCustomHTMLTokenizerTimeDelay:]):
+ (-[WebView _setCustomHTMLTokenizerChunkSize:]):
+ * WebView/WebViewPrivate.h:
+
+2008-08-13 Timothy Hatcher <timothy@apple.com>
+
+ Fixes a bug where Safari's find banner would be permanently hidden
+ when attaching or closing the Web Inspector while attached.
+
+ https://bugs.webkit.org/show_bug.cgi?id=20376
+
+ Reviewed by Kevin McCullough.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController close]):
+ Carefully manipulate the WebFrameView's frame when closing to
+ not assume the WebFrameView's frame fills the inspected WebView.
+ (-[WebInspectorWindowController setAttachedWindowHeight:]):
+ Carefully manipulate the WebFrameView's frame when docking to
+ not assume the WebFrameView plus the Web Inspector WebViews fills
+ the full inspected WebView.
+
+2008-08-13 Stephanie Lewis <slewis@apple.com>
+
+ fix 64bit build
+
+ * WebCoreSupport/WebInspectorClient.mm:
+
+2008-08-13 Timothy Hatcher <timothy@apple.com>
+
+ Remember the docked state of the Web Inspector, so it can be
+ reopened docked if it was last docked.
+
+ https://bugs.webkit.org/show_bug.cgi?id=14271
+
+ Reviewed by Kevin McCullough.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController init]): Initialize _shouldAttach
+ to the value stored in the user defaults. If there has never
+ been a value stored, default to being attached.
+ (-[WebInspectorWindowController showWindow:]): Pass the attached
+ state to InspectorController::setWindowVisible.
+
+2008-08-12 Timothy Hatcher <timothy@apple.com>
+
+ Remove the Inspector's WebView for the view hierarchy when closed
+ while attached. This prevents it from showing in the background
+ while the page changes.
+
+ Reviewed by Kevin McCullough.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController close:]): Call removeFromSuperview
+ on the Inspector's WebView if it isn't attached, so it will not
+ be visible when navigating pages while closed.
+
+2008-08-12 Timothy Hatcher <timothy@apple.com>
+
+ Make the docked Web Inspector resizable.
+
+ https://bugs.webkit.org/show_bug.cgi?id=14282
+
+ Reviewed by Kevin McCullough.
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::setAttachedWindowHeight): Call setAttachedWindowHeight:
+ on the WebInspectorWindowController.
+ (-[WebInspectorWindowController showWindow:]): Call setAttachedWindowHeight:.
+ (-[WebInspectorWindowController setAttachedWindowHeight:]): Moved code
+ from showWindow: and generalized to allow being called multiple times.
+ Remembers the last height passed, which is used by showWindow: the next
+ time the Inspector attaches.
+
+2008-08-12 Timothy Hatcher <timothy@apple.com>
+
+ Remove unneeded header imports from some Web Inspector files.
+
+ Reviewed by Adam Roben.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ * WebInspector/WebInspector.mm:
+ * WebInspector/WebNodeHighlightView.m:
+
+2008-08-12 Timothy Hatcher <timothy@apple.com>
+
+ Remove the call to WKNSWindowMakeBottomCornersSquare on the
+ Web Inspector's window. This isn't needed anymore since the
+ window style masks used always have square bottom corners.
+
+ Reviewed by Adam Roben.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController window]): Remove the call
+ to WKNSWindowMakeBottomCornersSquare.
+
+2008-08-12 Timothy Hatcher <timothy@apple.com>
+
+ Make attaching and detaching the Web Inspector instantaneous.
+ This also preserves the current view, other state, and keeps
+ the script debugger attached.
+
+ https://bugs.webkit.org/show_bug.cgi?id=19301
+
+ Reviewed by Adam Roben.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController close]): Only call setWindowVisible(false)
+ when not moving windows.
+
+2008-08-12 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - replace -[WebPreferences updatesWhenOffscreen] with -[WebView shouldUpdateWhileHidden]
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _updateBackgroundAndUpdatesWhileHidden]):
+ * WebView/WebFrameInternal.h:
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView windowWillOrderOnScreen:]):
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebViewPrivate init]):
+ (-[WebView _preferencesChangedNotification:]):
+ (-[WebView setBackgroundColor:]):
+ (-[WebView setDrawsBackground:]):
+ (-[WebView shouldUpdateWhileHidden]):
+ (-[WebView setShouldUpdateWhileHidden:]):
+ * WebView/WebViewPrivate.h:
+
+2008-08-08 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - fix <rdar://problem/6130216> Exception "windowRegionBeingDrawn != nil" in NSView when caching image of a subframe
+
+ This change reintroduces <https://bugs.webkit.org/show_bug.cgi?id=5195> on Leopard.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:topView:]): Removed an
+ unsuccessful workaround for <rdar://problem/5668489>, because invoking
+ layout may change the view hierarchy during the drawing operation,
+ which is not supported on Leopard.
+
+2008-08-08 Maxime Britto <britto@apple.com>
+
+ Reviewed by Adele.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _scrollDOMRangeToVisible:]):
+
+2008-08-08 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig
+
+ Fix for <rdar://problem/5865504>
+
+ This bug was actually *largely* fixed by http://trac.webkit.org/changeset/35538.
+ But with that same patch, it became possible for a WebResource to fail to initialize.
+ Therefore we were trying to add nil to an NSCFArray for certain situations, which is bad.
+ Lets fix that, shall we?
+
+ * WebView/WebArchive.mm:
+ (-[WebArchive subresources]):
+
+2008-08-06 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Cameron Zwarich.
+
+ Move more methods from Frame into ScriptController
+ https://bugs.webkit.org/show_bug.cgi?id=20294
+
+ The WebKit side of this move. Calls to frame() are now frame()->script()
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView getVariable:value:]):
+ (-[WebBaseNetscapePluginView _destroyPlugin]):
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController destroyPlugin:]):
+ (-[WebPluginController destroyAllPlugins]):
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ * WebView/WebFrame.mm:
+ (-[WebFrame windowObject]):
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::callEvent):
+ * WebView/WebView.mm:
+ (-[WebView windowScriptObject]):
+
+2008-08-06 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ - fix an assertion failure in Cache::setCapacities()
+
+ * Misc/WebKitSystemBits.h: Changed the return type of WebMemorySize()
+ to uint64_t.
+ * Misc/WebKitSystemBits.m:
+ (WebMemorySize):
+ * WebView/WebView.mm:
+ (+[WebView _setCacheModel:]):
+
+2008-08-05 Anders Carlsson <andersca@apple.com>
+
+ Pass in the correct class here.
+
+ * WebView/WebResource.mm:
+ (-[WebResourcePrivate dealloc]):
+
+2008-08-05 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6037398>
+ ER: Deallocate WebKit objects on the main thread, even if released on secondary thread
+
+ Add calls to WebCoreObjCScheduleDeallocateOnMainThread in dealloc methods of objects we expose.
+
+ * Carbon/CarbonWindowAdapter.m:
+ (-[CarbonWindowAdapter dealloc]):
+ * History/WebBackForwardList.mm:
+ (-[WebBackForwardList dealloc]):
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem dealloc]):
+ * Misc/WebElementDictionary.mm:
+ (+[WebElementDictionary initialize]):
+ (-[WebElementDictionary dealloc]):
+ * WebCoreSupport/WebEditorClient.mm:
+ (-[WebEditCommand dealloc]):
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ * WebView/WebArchive.mm:
+ (-[WebArchivePrivate dealloc]):
+ * WebView/WebDataSource.mm:
+ (-[WebDataSourcePrivate dealloc]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLViewPrivate dealloc]):
+ (-[WebHTMLView dealloc]):
+ * WebView/WebResource.mm:
+ (-[WebResourcePrivate dealloc]):
+
+2008-08-05 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Remove MainThreadObjectDeallocator.{h|mm}.
+
+ * WebView/MainThreadObjectDeallocator.h: Removed.
+ * WebView/MainThreadObjectDeallocator.mm: Removed.
+
+ * WebView/WebView.mm:
+ (-[WebView dealloc]):
+ Call WebCoreObjCScheduleDeallocateOnMainThread instead.
+
+2008-08-05 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Make the main thread object deallocator work with subclasses.
+
+ * WebView/MainThreadObjectDeallocator.h:
+ * WebView/MainThreadObjectDeallocator.mm:
+ (deallocCallback):
+ Call the correct dealloc method.
+
+ (scheduleDeallocateOnMainThread):
+ Store both the class and the instance, so we know which dealloc method to call.
+
+ * WebView/WebView.mm:
+ (-[WebViewPrivate dealloc]):
+ Schedule deallocation on the main thread.
+
+2008-08-05 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe and Anders Carlsson.
+
+ - fix WebMemorySize() reporting a value capped at 2GB
+
+ * misc/WebKitSystemBits.m:
+ (WebMemorySize): Changed to return the max_mem field, which, unlike
+ memory_size, is not capped at 2GB.
+ * WebView/WebView.mm:
+ (+[WebView _setCacheModel:]): Made the cache sizes for over 2GB RAM the
+ same as for 2GB, so that behavior on machines that have more than 2GB
+ RAM is not affected by the fix to WebMemorySize().
+
+2008-08-04 Mark Rowe <mrowe@apple.com>
+
+ Build fix.
+
+ * WebView/WebHTMLView.mm:
+
+2008-08-04 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Adopt the formal protocols where necessary.
+ Final part of fix for <rdar://problem/5853147>.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ * WebView/WebHTMLView.mm:
+ * WebView/WebView.mm:
+ (-[WebView _openFrameInNewWindowFromMenu:]):
+
+2008-08-04 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Declare empty protocols when using versions of AppKit that do not use formal protocols for delegates and data sources.
+ Part one of fix for <rdar://problem/5853147>.
+
+ * Misc/EmptyProtocolDefinitions.h:
+ * WebKitPrefix.h:
+
+2008-08-04 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Mitz Pettel
+
+ Fix <rdar://problem/5820157> - Saving WebArchives of Mail attachments broken.
+
+ This broke in r31355 when we stopped returning nil WebResources when there was nil
+ resource data.
+
+ * WebView/WebResource.mm:
+ (-[WebResource _initWithCoreResource:]): Restore previous behavior of returning nil
+ when the resource data is null.
+
+2008-08-02 Matt Lilek <webkit@mattlilek.com>
+
+ Reviewed by Tim Hatcher.
+
+ Update the window gradient offset to match the inspector toolbar's new height.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController window]):
+
+2008-08-01 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Jon.
+
+ <rdar://problem/6120206>
+ Crash when plug-in queries for NPPVpluginWantsAllNetworkStreams.
+
+ Pass in a pointer to a void* to make sure that plug-ins don't overwrite the stack.
+
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream wantsAllStreams]):
+
+2008-07-31 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5949410>
+ Add the ability to transfer a given application cache to a new database.
+
+ * Misc/WebKitNSStringExtras.h:
+ * Misc/WebKitNSStringExtras.m:
+ (+[NSString _webkit_applicationCacheDirectoryWithBundleIdentifier:]):
+ New method which returns the appopriate cache directory for a given bundle identifier.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _transferApplicationCache:]):
+ Transfer the application cache.
+
+ * WebView/WebDataSourcePrivate.h:
+ * WebView/WebView.mm:
+ (WebKitInitializeApplicationCachePathIfNecessary):
+ Change this to use _webkit_applicationCacheDirectoryWithBundleIdentifier.
+
+2008-07-31 John Sullivan <sullivan@apple.com>
+
+ WebKit part of <rdar://problem/6116650> Text-only zoom setting should be stored in WebKit prefs
+
+ Reviewed by Hyatt
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ added WebKitZoomsTextOnlyPreferenceKey
+
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ default value of YES for WebKitZoomsTextOnlyPreferenceKey
+ (-[WebPreferences zoomsTextOnly]):
+ getter for WebKitZoomsTextOnlyPreferenceKey
+ (-[WebPreferences setZoomsTextOnly:]):
+ setter for WebKitZoomsTextOnlyPreferenceKey
+
+ * WebView/WebPreferencesPrivate.h:
+ declare zoomsTextOnly/setZoomsTextOnly:
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+ update WebCore::Settings value for zoomsTextOnly
+
+2008-07-31 David D. Kilzer <ddkilzer@webkit.org>
+
+ Fix layout test results for webarchive/test-xml-stylesheet.xml
+
+ Reviewed by Darin Adler.
+
+ Needed to expose -[WebHTMLRepresentation supportedNonImageMIMETypes]
+ for DumpRenderTree.
+
+ * WebView/WebHTMLRepresentationInternal.h: Added.
+
+2008-07-31 Alexey Proskuryakov <ap@webkit.org>
+
+ Release build fix.
+
+ * Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView setWindowIfNecessary]):
+ Don't define to npErr in release builds, as it is only used for logging.
+
+2008-07-31 John Sullivan <sullivan@apple.com>
+
+ Fixed <https://bugs.webkit.org/show_bug.cgi?id=5195>
+ drawing with cacheDisplayInRect:toBitmapImageRep: doesn't trigger layout on Leopard
+
+ Reviewed by Dan
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:topView:]):
+ include Leopard in the #ifdef that forces a layout if needed
+
+2008-07-30 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Adam and Hyatt
+
+ Fix for <rdar://problem/6099748>
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Set the "don't enforce CSS mime type in strict mode"
+ quirk when running under iWeb 2
+
+2008-07-31 Alexey Proskuryakov <ap@webkit.org>
+
+ Rubber-stamped by Maciej.
+
+ Eliminate JSLock (it was already disabled, removing the stub implementaion and all
+ call sites now).
+
+ * ForwardingHeaders/runtime/JSLock.h: Removed.
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics javaScriptObjectsCount]):
+ (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
+ (+[WebCoreStatistics shouldPrintExceptions]):
+ (+[WebCoreStatistics setShouldPrintExceptions:]):
+ (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream wantsAllStreams]):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
+ (-[WebBaseNetscapePluginView setWindowIfNecessary]):
+ (-[WebBaseNetscapePluginView start]):
+ (-[WebBaseNetscapePluginView createPluginScriptableObject]):
+ (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
+ (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]):
+ (-[WebBaseNetscapePluginView loadPluginRequest:]):
+ (-[WebBaseNetscapePluginView _printedPluginBitmap]):
+ * Plugins/WebPluginController.mm:
+ (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
+ (-[WebPluginController startAllPlugins]):
+ (-[WebPluginController stopAllPlugins]):
+ (-[WebPluginController addPlugin:]):
+ (-[WebPluginController destroyPlugin:]):
+ (-[WebPluginController destroyAllPlugins]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame evaluateWebScript:]):
+ * WebView/WebView.mm:
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
+
+2008-07-30 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Fixes <rdar://problem/6041390>
+
+ Adds the ability to have a frame that is "disconnected" from the
+ main frame from the perspective of top and parent in
+ Javascript.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _setIsDisconnectedFrame]):
+ * WebView/WebFramePrivate.h:
+
+2008-07-29 Mark Rowe <mrowe@apple.com>
+
+ Tweak to the build fix to keep Dan happy.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ * WebView/WebHTMLView.mm:
+
+2008-07-29 Mark Rowe <mrowe@apple.com>
+
+ Build fix.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView inputContext]):
+ * WebView/WebHTMLView.mm:
+
+2008-07-28 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Based on a patch by Dimcho Balev.
+
+ https://bugs.webkit.org/show_bug.cgi?id=18676
+ <rdar://problem/6106578>
+ Plug-In API Proposal: Enable plugins to receive response body when an HTTP error occurs
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ Add NPP_GetValue pointer.
+
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream setPlugin:]):
+ Initialize NPP_GetValue.
+
+ (-[WebBaseNetscapePluginStream wantsAllStreams]):
+ Call NPP_GetValue.
+
+ * Plugins/WebPlugInStreamLoaderDelegate.h:
+ * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.h:
+ * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.mm:
+ (WebNetscapePlugInStreamLoaderClient::wantsAllStreams):
+ Implement this and call down to the stream.
+
+2008-07-28 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ <rdar://problem/6105529>
+ https://bugs.webkit.org/show_bug.cgi?id=19659
+ Turning off plugins causes crash
+
+ When an active page has plug-ins, and plug-ins are disabled, they will be stopped and will
+ end up in a state where they don't have an event handler. Because of this, we need to
+ check that the plug-in has been started before calling the event handler.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView sendActivateEvent:]):
+ (-[WebBaseNetscapePluginView sendDrawRectEvent:]):
+ (-[WebBaseNetscapePluginView setHasFocus:]):
+ (-[WebBaseNetscapePluginView mouseDown:]):
+ (-[WebBaseNetscapePluginView mouseUp:]):
+ (-[WebBaseNetscapePluginView mouseEntered:]):
+ (-[WebBaseNetscapePluginView mouseExited:]):
+ (-[WebBaseNetscapePluginView handleMouseMoved:]):
+ (-[WebBaseNetscapePluginView mouseDragged:]):
+ (-[WebBaseNetscapePluginView scrollWheel:]):
+ (-[WebBaseNetscapePluginView keyUp:]):
+ (-[WebBaseNetscapePluginView keyDown:]):
+ (-[WebBaseNetscapePluginView flagsChanged:]):
+ (-[WebBaseNetscapePluginView cut:]):
+ (-[WebBaseNetscapePluginView copy:]):
+ (-[WebBaseNetscapePluginView paste:]):
+ (-[WebBaseNetscapePluginView selectAll:]):
+ (-[WebBaseNetscapePluginView drawRect:]):
+ (-[WebBaseNetscapePluginView inputContext]):
+
+2008-07-26 Daniel Jalkut <jalkut@red-sweater.com>
+
+ Reviewed by Geoff Garen.
+
+ Changes to accommodate newly named/signatured loading methods in WebCore.
+
+ * Plugins/WebNetscapePluginStream.mm:
+ (-[WebNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
+ * Plugins/WebPluginContainerCheck.mm:
+ (-[WebPluginContainerCheck _isForbiddenFileLoad]):
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
+
+2008-07-21 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6091287> Revamp the handling of CFBundleShortVersionString to be fixed at the major component of the version number.
+
+ * Configurations/Version.xcconfig:
+ * Info.plist:
+
+2008-07-21 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Geoff.
+
+ <rdar://problem/5820667>
+ CrashTracer: [USER] 3759 crashes in Safari at FrameLoader::activeDocumentLoader const + 6 while canceling plug-in load
+
+ Don't allow URLs to be loaded in response to an NPP_DestroyStream that happens when tearing down the plug-in.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
+
+2008-07-21 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Adam Roben.
+
+ <rdar://problem/5624143> WebView printing doesn't work correctly in x86_64
+
+ Fix the return type of an NSView method that we override so that the correct data type is used in 64-bit.
+ This prevents a garbage value being used for the scale factor that the NSView print machinery applies.
+
+ * WebView/WebHTMLView.mm:
+
+2008-07-21 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Fix CallDelegateReturningFloat for x86_64. The x86_64 Objective-C runtime
+ only uses objc_msgSend_fpret for long double return values. For float return
+ values the standard objc_msgSend is used, as on ppc and ppc64.
+
+ * WebView/WebView.mm: Use objc_msgSend_float_return as the name of our version of
+ objc_msgSend with the correct return type. We can no longer call it objc_msgSend_fpret
+ as that method is defined by the Objective-C runtime for x86_64.
+ (CallDelegateReturningFloat):
+
+2008-07-14 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - WebKit part of fixing <rdar://problem/6071850> Subviews not drawn correctly when using -cacheDisplayInRect:toBitmapImageRep:
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): Changed
+ to account for the case of being drawn into a bitmap context that is not
+ a window's backing store. In that case, there are no valid "rects being
+ drawn" to clip to.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:topView:]):
+ Added an override of this NSView method which is used in for
+ -cacheDisplayInRect:toBitmapImageRep:. Like two existing NSView drawing
+ machinery overrides, it sets subviews aside before invoking the
+ superclass implementation. On Tiger, it also updates the layout.
+
+2008-07-14 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ Eliminate per-thread JavaScript global data instance support and make arbitrary
+ global data/global object combinations possible.
+
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics javaScriptObjectsCount]):
+ (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
+ (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
+ Ask WebCore for its instance of JSGlobalData, now that it is not in per-thread storage.
+
+2008-07-11 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Disable WTF leak messages when using fast teardown. Use full document teardown while running in debug.
+
+ * WebView/WebPreferences.m: Removed.
+ * WebView/WebPreferences.mm: Copied from http:/svn.webkit.org/repository/webkit/trunk/WebKit/mac/WebView/WebPreferences.m.
+ (+[WebPreferences initialize]): if running in Default enable full document teardown
+ (-[WebPreferences editableLinkBehavior]):
+ (-[WebPreferences setFullDocumentTeardownEnabled:]):
+ * WebView/WebView.mm:
+ (-[WebView _close]): disable leak messages if using fast teardown
+
+2008-07-10 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Define WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST when building WebKit to ensure that no symbols end up with the weak_import attribute.
+
+ * Configurations/WebKit.xcconfig:
+
+2008-07-10 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix the Tiger build by omitting annotations from methods declared in categories when using old versions of GCC.
+
+ * Plugins/WebPlugin.h: Wrap annotations on methods declared in categories in the WEBKIT_CATEGORY_METHOD_ANNOTATION macro.
+ * WebView/WebFrameLoadDelegate.h: Ditto.
+ * WebView/WebUIDelegate.h: Ditto.
+
+2008-07-10 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mark.
+
+ Add availability macros for the new WebPlugin methods.
+
+ * Plugins/WebPlugin.h:
+ * Plugins/WebPluginViewFactory.h:
+
+2008-07-09 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Don't warn about deprecated functions in production builds.
+
+ * Configurations/Base.xcconfig:
+ * Configurations/DebugRelease.xcconfig:
+
+2008-07-09 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin
+
+ <rdar://problem/5823684> - Crash manipulating frame tree of a new frame before the new frame
+ has been installed in a frame tree.
+
+ The root of this problem was that calling init() on a new frame could end up calling arbitrary
+ javascript that might end up removing the frame from the tree. This opened up a small can of worms
+ such as the frame not having yet been installed in its frame tree, and other assumed behavior while
+ destroying the frame.
+
+ Note that each platforms WebKit API layer needs to make this new guarantee:
+ "The new Frame must be installed in its FrameTree before newCoreFrame->init() is called"
+ I am fixing Mac, and Windows and GTK already have this property. Wx currently has subframes disabled
+ but will need to add this guarantee when re-enabling, and Qt is currently vulnerable to this same bug.
+
+ Alternately, the way frames are created right now is roundabout and asinine, and this is a key
+ architectural improvement we can make in the future so the individual platform clients are no longer
+ vulnerable to this problem, which should really have been a WebCore issue.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createFrame): Don't bother null checking the newCoreFrame - can't be NULL.
+ Don't appendChild() the new frame here.
+ Null-check the new frame's page before loading the URL into it, as it might already have been
+ removed from the page.
+
+ * WebView/WebFrame.mm:
+ (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): If there is an ownerElement,
+ go ahead and install the new frame in the frame tree *before* calling init() on it.
+
+2008-07-09 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Make some WebPlugin and WebPluginFactory SPI public.
+
+ * Plugins/WebPlugin.h:
+ * Plugins/WebPluginPrivate.h:
+ * Plugins/WebPluginViewFactory.h:
+ * Plugins/WebPluginViewFactoryPrivate.h:
+
+2008-07-08 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Reviewed by Anders.
+
+ Port r34988 to Mac: don't call NPP_DestroyStream if NPP_NewStream was
+ unsuccessful.
+
+ * Plugins/WebBaseNetscapePluginStream.h: Added new member,
+ newStreamSuccessful.
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]): Initialize new member.
+ (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]): If NPP_NewStream is successful, set
+ newStreamSuccessful to YES.
+ (-[WebBaseNetscapePluginStream _destroyStream]): Only call
+ NPP_DestroyStream if newStreamSuccessful is true.
+
+2008-07-08 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - WebKit part of <rdar://problem/6008409> Need a way to disable updates in offscreen views
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView addWindowObservers]): Added code to observe when the
+ window goes onscreen.
+ (-[WebHTMLView removeWindowObservers]): Added.
+ (-[WebHTMLView windowWillOrderOnScreen:]): Added. If the view is set to
+ not update when offscreen, calls -setNeedsDisplay: just before it comes
+ onscreen.
+ * WebView/WebPreferenceKeysPrivate.h: Added preference key.
+ * WebView/WebPreferences.m:
+ (+[WebPreferences initialize]): Made updates when offscreen on by
+ default.
+ (-[WebPreferences updatesWhenOffscreen]): Added.
+ (-[WebPreferences setUpdatesWhenOffscreen:]): Added.
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Added code to update the
+ updatesWhenOffscreen setting in WebCore.
+
+2008-07-07 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Speculative fix for
+ <rdar://problem/5839800>
+ CrashTracer: [USER] 5802 crashes in Safari at com.apple.WebKit: -[WebHTMLView(WebPrivate) _updateMouseoverWithFakeEvent] + 389
+
+ Set _private->closed to YES before calling -[WebPluginController destroyAllPlugins].
+
+ My theory is that the plug-in destruction callbacks could end up rescheduling timers or re-adding notifications.
+ This is usually protected by _private->closed, but in this case it might still be false.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView close]):
+
+2008-07-05 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Remove WebSearchableTextView as it has been unused for some time now.
+
+ * Misc/WebSearchableTextView.h: Removed.
+ * Misc/WebSearchableTextView.m: Removed.
+
+2008-07-05 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Don't leak the result of WKCopyCFLocalizationPreferredName when running under GC.
+
+ * Misc/WebNSUserDefaultsExtras.m:
+ (-[NSString _webkit_HTTPStyleLanguageCode]):
+
+2008-07-02 Alexey Proskuryakov <ap@webkit.org>
+
+ Inspired and reviewed by Mark Rowe.
+
+ Change non-API includes from JavaScriptCore/ to kjs/ and wtf/ to match prevalent style.
+
+ * Carbon/HIViewAdapter.m:
+ * DOM/WebDOMOperations.mm:
+ * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
+ * DefaultDelegates/WebDefaultPolicyDelegate.m:
+ * History/WebBackForwardList.mm:
+ * History/WebHistory.mm:
+ * History/WebHistoryItem.mm:
+ * History/WebHistoryItemInternal.h:
+ * Misc/WebCoreStatistics.mm:
+ * Misc/WebDownload.m:
+ * Misc/WebGraphicsExtras.c:
+ * Misc/WebKitLogging.h:
+ * Misc/WebKitSystemBits.m:
+ * Misc/WebLocalizableStrings.m:
+ * Misc/WebNSArrayExtras.m:
+ * Misc/WebNSDataExtras.m:
+ * Misc/WebNSDictionaryExtras.m:
+ * Misc/WebNSFileManagerExtras.m:
+ * Misc/WebNSPasteboardExtras.mm:
+ * Misc/WebNSURLExtras.mm:
+ * Misc/WebNSUserDefaultsExtras.m:
+ * Panels/WebAuthenticationPanel.m:
+ * Panels/WebPanelAuthenticationHandler.m:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ * Plugins/WebBasePluginPackage.m:
+ * Plugins/WebNetscapePluginEmbeddedView.mm:
+ * Plugins/WebPluginContainerCheck.mm:
+ * Plugins/WebPluginController.mm:
+ * Plugins/WebPluginDatabase.mm:
+ * WebCoreSupport/WebJavaScriptTextInputPanel.m:
+ * WebCoreSupport/WebKeyGenerator.m:
+ * WebCoreSupport/WebViewFactory.mm:
+ * WebKitPrefix.h:
+ * WebView/WebHTMLRepresentation.mm:
+ * WebView/WebPDFRepresentation.m:
+ * WebView/WebPDFView.mm:
+ * WebView/WebScriptDebugger.mm:
+
+2008-07-01 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Disable JSLock for per-thread contexts.
+
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics javaScriptObjectsCount]):
+ (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
+ (+[WebCoreStatistics shouldPrintExceptions]):
+ (+[WebCoreStatistics setShouldPrintExceptions:]):
+ (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
+ (-[WebBaseNetscapePluginView setWindowIfNecessary]):
+ (-[WebBaseNetscapePluginView start]):
+ (-[WebBaseNetscapePluginView createPluginScriptableObject]):
+ (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
+ (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]):
+ (-[WebBaseNetscapePluginView loadPluginRequest:]):
+ (-[WebBaseNetscapePluginView _printedPluginBitmap]):
+ * Plugins/WebPluginController.mm:
+ (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
+ (-[WebPluginController startAllPlugins]):
+ (-[WebPluginController stopAllPlugins]):
+ (-[WebPluginController addPlugin:]):
+ (-[WebPluginController destroyPlugin:]):
+ (-[WebPluginController destroyAllPlugins]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame evaluateWebScript:]):
+ * WebView/WebView.mm:
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
+ Pass a parameter (always false) to JSLock and JSLock::DropAllLocks to indicate that WebKit
+ doesn't need locking. In the future, it may be possible to remove some of these if we
+ establish that this won't make JSC assertions fail (and that we don't want to add such
+ assertions either).
+ Added includes that are now needed.
+
+2008-07-01 Kevin McCullough <kmccullough@apple.com>
+
+ Build fix.
+
+ * WebView/WebView.mm:
+
+2008-07-01 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Use the PluginMainThreadScheduler, and implement NPN_PluginThreadAsyncCall.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView _createPlugin]):
+ Register the plug-in instance.
+
+ (-[WebBaseNetscapePluginView _destroyPlugin]):
+ Unegister the plug-in instance.
+
+ * Plugins/WebNetscapePluginPackage.m:
+ (-[WebNetscapePluginPackage load]):
+ Set NPN_PluginThreadAsyncCall.
+
+ * Plugins/npapi.mm:
+ (NPN_PluginThreadAsyncCall):
+ Implement this.
+
+2008-07-01 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - WebKit part of moving the method to set the base writing direction from Frame to Editor
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView toggleBaseWritingDirection:]): Changed back to call the
+ Editor method.
+ (-[WebHTMLView changeBaseWritingDirection:]): Ditto.
+ (-[WebHTMLView _changeBaseWritingDirectionTo:]): Ditto.
+
+2008-07-01 Geoffrey Garen <ggaren@apple.com>
+
+ Build fix: forgot to check in this file.
+
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::WebScriptDebugger):
+
+2008-06-30 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ - WebKit/mac part of <rdar://problem/3881497> Writing direction context menu item has no effect on text typed in Safari
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView toggleBaseWritingDirection:]): Changed to call
+ WebCore::Frame::setSelectionBaseWritingDirection() instead of
+ WebCore::Editor::setBaseWritingDirection().
+ (-[WebHTMLView changeBaseWritingDirection:]): Ditto.
+ (-[WebHTMLView _changeBaseWritingDirectionTo:]): Ditto.
+
+2008-06-28 Darin Adler <darin@apple.com>
+
+ - fix build
+
+ * WebView/WebView.mm:
+ (aeDescFromJSValue): Use get instead of getItem, which no longer exists.
+
+2008-06-26 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add a new MainThreadObjectDeallocator which can schedule dealloc calls on the main thread
+ if necessary. Use this for the WebView class.
+
+ * WebView/MainThreadObjectDeallocator.h: Added.
+ * WebView/MainThreadObjectDeallocator.mm: Added.
+ (deallocCallback):
+ (scheduleDeallocateOnMainThread):
+ * WebView/WebView.mm:
+ (-[WebViewPrivate dealloc]):
+ (+[WebView initialize]):
+
+2008-06-25 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mark.
+
+ <rdar://problem/5984270>
+ REGRESSION (Tiger only) : Mail crashes because message load is being processed on a secondary thread
+
+ * WebView/WebView.mm:
+ (tigerMailReleaseIMP):
+ New method that makes sure that the final release happens on the main thread.
+
+ (-[WebView release]):
+ New method that just calls [super release];
+
+ (+[WebView initialize]):
+ When running under Tiger mail, replace the release method with tigerMailReleaseIMP.
+
+2008-06-19 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Geoff.
+
+ Make Machine per-JSGlobalData.
+
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::WebScriptDebugger):
+
+2008-06-17 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Prepare JavaScript heap for being per-thread.
+
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics javaScriptObjectsCount]):
+ (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
+ (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
+ Use JSGlobalData::threadInstance()->heap instead of static Collector calls.
+
+2008-06-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Use create instead of new
+ to create a CSSMutableStyleDeclaration.
+
+2008-06-16 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5951874> WebHTMLHighlighter mistakenly gained two new methods, causing compile warnings
+
+ _pauseNullEventsForAllNetscapePlugins and _resumeNullEventsForAllNetscapePlugins ended up being declared both in
+ WebHTMLViewInternal.h and as members of the WebHTMLHighlighter protocol in WebHTMLViewPrivate.h. They don't belong
+ in the protocol, but they do need to be available outside of WebKit so they're being moved to the correct location
+ in WebHTMLViewPrivate.h and removed from WebHTMLViewInternal.h.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
+ (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]):
+ * WebView/WebHTMLViewInternal.h:
+ * WebView/WebHTMLViewPrivate.h:
+
+2008-06-15 Darin Adler <darin@apple.com>
+
+ - give Frame object functions shorter names: scriptProxy() -> script(),
+ selectionController() -> selection(), animationController() -> animation()
+
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController webPlugInContainerSelectionColor]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _attachScriptDebugger]):
+ (-[WebFrame _hasSelection]):
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
+ (-[WebFrame _convertToNSRange:]):
+ (-[WebFrame _convertToDOMRange:]):
+ (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
+ (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
+ (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
+ (-[WebFrame _selectedNSRange]):
+ (-[WebFrame _selectNSRange:]):
+ (-[WebFrame globalContext]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _selectedRange]):
+ (-[WebHTMLView _hasSelection]):
+ (-[WebHTMLView _hasSelectionOrInsertionPoint]):
+ (-[WebHTMLView _hasInsertionPoint]):
+ (-[WebHTMLView _isEditable]):
+ (-[WebHTMLView _updateFocusedAndActiveState]):
+ (-[WebHTMLView readSelectionFromPasteboard:]):
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
+ (-[WebHTMLView maintainsInactiveSelection]):
+ (-[WebHTMLView paste:]):
+ (isTextInput):
+ (-[WebHTMLView inputContext]):
+ (-[WebTextCompleteController doCompletion]):
+ (-[WebHTMLView selectAll]):
+ (-[WebHTMLView deselectAll]):
+ (-[WebHTMLView selectedAttributedString]):
+ * WebView/WebView.mm:
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
+ (-[WebView setSelectedDOMRange:affinity:]):
+ (-[WebView selectedDOMRange]):
+ (-[WebView selectionAffinity]):
+
+2008-06-15 Darin Adler <darin@apple.com>
+
+ - rename KJS::List to KJS::ArgList
+
+ * WebView/WebScriptDebugger.h:
+
+2008-06-15 Darin Adler <darin@apple.com>
+
+ - new names for more JavaScriptCore files
+
+ * WebView/WebView.mm:
+
+2008-06-15 Darin Adler <darin@apple.com>
+
+ - new names for a few key JavaScriptCore files
+
+ * ForwardingHeaders/kjs/JSFunction.h: Copied from WebKit/mac/ForwardingHeaders/kjs/function.h.
+ * ForwardingHeaders/kjs/JSObject.h: Copied from WebKit/mac/ForwardingHeaders/kjs/object.h.
+ * ForwardingHeaders/kjs/JSString.h: Copied from WebKit/mac/ForwardingHeaders/kjs/internal.h.
+ * ForwardingHeaders/kjs/JSValue.h: Copied from WebKit/mac/ForwardingHeaders/kjs/value.h.
+ * ForwardingHeaders/kjs/function.h: Removed.
+ * ForwardingHeaders/kjs/internal.h: Removed.
+ * ForwardingHeaders/kjs/object.h: Removed.
+ * ForwardingHeaders/kjs/value.h: Removed.
+ * WebView/WebScriptDebugDelegate.mm:
+
+2008-06-15 Darin Adler <darin@apple.com>
+
+ Rubber stamped by Sam.
+
+ - use JS prefix and simpler names for basic JavaScriptCore types,
+ to complement JSValue and JSObject
+
+ * WebView/WebView.mm:
+ (aeDescFromJSValue):
+
+2008-06-14 Darin Adler <darin@apple.com>
+
+ Rubber stamped by Sam.
+
+ - new names for kjs_binding.h and kjs_proxy.h
+
+ * WebView/WebFrame.mm:
+ * WebView/WebScriptDebugDelegate.mm:
+ * WebView/WebView.mm:
+
+2008-06-14 Darin Adler <darin@apple.com>
+
+ Rubber stamped by Sam.
+
+ - renamed HTMLGenericFormElement to HTMLFormControlElement
+
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation elementWithName:inForm:]):
+ (-[WebHTMLRepresentation controlsInForm:]):
+
+2008-06-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam.
+
+ - more of https://bugs.webkit.org/show_bug.cgi?id=17257
+ start ref counts at 1 instead of 0 for speed
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createDocumentLoader): Use create instead of new.
+ (WebFrameLoaderClient::createFrame): Remove now-obsolete adoptRef that was balanced by
+ a ref call inside the Frame constructor. The lifetime rules for Frame are now the
+ conventional ones without a special case.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _initWithDocumentLoader:]): Changed argument to be a PassRefPtr, since
+ this function takes ownership of the DocumentLoader.
+ (-[WebDataSource initWithRequest:]): Use create instead of new.
+ * WebView/WebDataSourceInternal.h: Changed _initWithDocumentLoader argument to be a
+ PassRefPtr and also cleaned up the header a bit.
+
+ * WebView/WebDocumentLoaderMac.h:
+ (WebDocumentLoaderMac::create): Added. Also made the constructor and a couple of virtual
+ functions private.
+
+ * WebView/WebFrame.mm:
+ (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): Use create instead
+ of new.
+
+2008-06-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam.
+
+ - more work on https://bugs.webkit.org/show_bug.cgi?id=17257
+ start ref counts at 1 instead of 0 for speed
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
+
+2008-06-13 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - updated for addition of FormState argument to action policy functions
+ - added WebActionFormKey
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
+ (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
+ (WebFrameLoaderClient::actionDictionary):
+ * WebKit.exp:
+ * WebView/WebPolicyDelegate.mm:
+ * WebView/WebPolicyDelegatePrivate.h:
+
+2008-06-12 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Dan and Darin
+
+ Clear up the confusion about _close (older private method) vs -close (newer public method).
+
+ * WebView/WebView.mm:
+ (-[WebView _isClosed]):
+ simplified style
+ (-[WebView _close]):
+ added a comment about how clients and subclasses should use -close instead
+ (-[WebView dealloc]):
+ call -close instead of _close, so subclasses that override the public method will have the intended behavior
+ (-[WebView close]):
+ added a comment
+ (-[WebView _windowWillClose:]):
+ call -close instead of _close, so subclasses that override the public method will have the intended behavior
+
+ * WebView/WebViewPrivate.h:
+ added a comment about how clients and subclasses should use -close instead
+
+2008-06-07 Darin Adler <darin@apple.com>
+
+ Reviewed by Mitz.
+
+ - work on https://bugs.webkit.org/show_bug.cgi?id=17257
+ start ref counts at 1 instead of 0 for speed
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem init]):
+ (-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]):
+ (-[WebHistoryItem initWithURL:target:parent:title:]):
+ (-[WebHistoryItem initWithURLString:title:displayTitle:lastVisitedTimeInterval:]):
+ * WebView/WebView.mm:
+ (+[WebView _decodeData:]):
+
+2008-06-03 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Tim.
+
+ Bug 12983: Web Inspector break on the debugger keyword
+ <https://bugs.webkit.org/show_bug.cgi?id=12983>
+
+ Add stubs to allow old webkit debugger interface to build.
+
+ * WebView/WebScriptDebugger.h:
+ * WebView/WebScriptDebugger.mm:
+
+2008-06-03 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5980961>
+
+ In 64-bit Web Kit, converting between float and double, can cause rounding errors which in turn causes
+ newBottom to be larger than oldBottom which is illegal.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
+
+2008-06-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mitz.
+
+ Speculative fix for <rdar://problem/5661112>
+ CrashTracer: [USER] 49 crashes in DashboardClient at com.apple.WebCore: WebCore::RenderPart::setWidget + 62
+
+ Defer loads while calling NPP_New. Some plug-ins start a run-loop inside NPP_New and finished loads could cause
+ layouts to be triggered.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView _createPlugin]):
+
+2008-05-29 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5949462> REGRESSION: Can't paste screen captures into Mail
+
+ AppKit started putting PNG instead of PICT onto the pasteboard for screen
+ captures. Added support for PNG with kUTTypePNG. Tiger doesn't support
+ setting and retrieving pasteboard types with UTIs, but we don't know of any
+ applications on Tiger that put only PNG on the pasteboard.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
+ (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
+
+2008-05-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Brady.
+
+ <rdar://problem/5970312>
+ icon file specified for stand alone web app causes crash if the icon can't be found
+
+ Handle the case where iconData is null.
+
+ * Misc/WebIconFetcher.mm:
+ (WebIconFetcherClient::finishedFetchingIcon):
+
+2008-05-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mitz.
+
+ <rdar://problem/5971845>
+ https://bugs.webkit.org/show_bug.cgi?id=19313
+ Add version member to NPCocoaEvent
+
+ Initialize the version member to 0 for all events.
+
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ (initializeEvent):
+ (WebNetscapePluginEventHandlerCocoa::drawRect):
+ (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
+ (WebNetscapePluginEventHandlerCocoa::flagsChanged):
+ (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
+ (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
+ (WebNetscapePluginEventHandlerCocoa::focusChanged):
+
+2008-05-29 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Jessica Kahn.
+
+ - fix <rdar://problem/5965013> Page 2 does not print correctly
+
+ When printing, _recursiveDisplayRectIfNeededIgnoringOpacity:... and
+ _recursiveDisplayAllDirtyWithLockFocus:... can be invoked without
+ -viewWillDraw being sent first, which could lead to painting without
+ valid layout. The fix is to ensure up-to-date layout in those methods
+ when printing.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
+ (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
+
+2008-05-28 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Jon.
+
+ Remove workaround, this is no longer a problem.
+
+ * WebView/WebView.mm:
+ (-[WebView _removeObjectForIdentifier:]):
+
+2008-05-27 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Fixed https://bugs.webkit.org/show_bug.cgi?id=19183
+ REGRESSION (r33979): Crash in DebuggerCallFrame::functionName when
+ clicking button in returnEvent-crash.html
+
+ Added implementations for willExecuteProgram and didExecuteProgram, which
+ take care of making sure we're not hanging on to stale data.
+
+2008-05-27 Timothy Hatcher <timothy@apple.com>
+
+ Fixes a bug where unplugging the monitor from a video card and
+ moving it to another video card would no longer show OpenGL plugins
+ until you relaunched Safari.
+
+ <rdar://problem/5790983> Add AllowOfflineDisplays pixel format
+ attribute to OpenGL contexts
+
+ Reviewed by Kevin Decker.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView _createWindowedAGLContext]): Added
+ AGL_ALLOW_OFFLINE_RENDERERS for non-Tiger builds.
+ (-[WebBaseNetscapePluginView _createWindowlessAGLContext]): Ditto.
+
+2008-05-25 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5840884> _recursive_resumeNullEventsForAllNetscapePlugins and _pauseNullEvents not defined
+
+ Follow-up for r33052. _recursive_resumeNullEventsForAllNetscapePlugins and _recursive_pauseNullEventsForAllNetscapePlugins
+ need to be declared in WebFramePrivate.h rather than WebFrameInternal.h so they can be used from outside of WebKit.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
+ (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
+ * WebView/WebFrameInternal.h:
+ * WebView/WebFramePrivate.h:
+
+2008-05-23 Timothy Hatcher <timothy@apple.com>
+
+ Fix attaching and detaching the Web Inspector. This change removes
+ the clunky animation that never looked right and was causing issues
+ where the inspected WebView would get into a no useable state.
+
+ <rdar://problem/5958812> Attaching and Detaching the Web Inspector
+ can cause the inspected WebVIew to be unusable
+
+ Reviewed by Adam Roben.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController close]): Removes animation code.
+ Sets the frame directly and does a displayIfNeeded to prevent
+ showing the Inspector in the page and in the Inspector window.
+ (-[WebInspectorWindowController showWindow:]): Removes animation code.
+ Sets the frame directly.
+ (-[WebInspectorWindowController attach]): Simplified.
+ (-[WebInspectorWindowController detach]): Ditto.
+
+2008-05-22 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - fix broken documentation of
+ webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:
+
+ * WebView/WebUIDelegate.h: Fixed method name in HeaderDoc for
+ -webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:
+
+2008-05-22 Timothy Hatcher <timothy@apple.com>
+
+ <rdar://problem/5956403> Update the Develop menu to match the new Inspector items
+
+ Reviewed by Adam Roben.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController showWebInspector:]):
+ (-[WebInspectorWindowController showErrorConsole:]):
+ (-[WebInspectorWindowController toggleDebuggingJavaScript:]):
+ (-[WebInspectorWindowController toggleProfilingJavaScript:]):
+ (-[WebInspectorWindowController validateUserInterfaceItem:]):
+ * WebInspector/WebInspector.h:
+ * WebInspector/WebInspector.mm:
+ (-[WebInspector showConsole:]):
+ (-[WebInspector showTimeline:]):
+ (-[WebInspector isDebuggingJavaScript]):
+ (-[WebInspector toggleDebuggingJavaScript:]):
+ (-[WebInspector startDebuggingJavaScript:]):
+ (-[WebInspector stopDebuggingJavaScript:]):
+ (-[WebInspector isProfilingJavaScript]):
+ (-[WebInspector toggleProfilingJavaScript:]):
+ (-[WebInspector startProfilingJavaScript:]):
+ (-[WebInspector stopProfilingJavaScript:]):
+
+2008-05-22 Josh Aas <joshmoz@gmail.com>
+
+ Reviewed by Anders.
+
+ <rdar://problem/5956429>
+ https://bugs.webkit.org/show_bug.cgi?id=19192
+ remove NPNVpluginEventModel, fix example plugin
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView getVariable:value:]):
+
+2008-05-21 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Maciej.
+
+ Add WebIconFetcher.
+
+ * Misc/WebIconFetcher.h: Added.
+ * Misc/WebIconFetcher.mm: Added.
+ (WebIconFetcherClient::WebIconFetcherClient):
+ (WebIconFetcherClient::finishedFetchingIcon):
+ (WebIconFetcherClient::setFetcher):
+ (-[WebIconFetcher init]):
+ (-[WebIconFetcher dealloc]):
+ (-[WebIconFetcher finalize]):
+ (-[WebIconFetcher cancel]):
+ (-[WebIconFetcher _initWithIconFetcher:client:]):
+ (+[WebIconFetcher _fetchApplicationIconForFrame:target:selector:]):
+ * Misc/WebIconFetcherInternal.h: Added.
+ * WebView/WebFrame.mm:
+ (-[WebFrame fetchApplicationIcon:selector:]):
+ * WebView/WebFramePrivate.h:
+
+=== End merge of squirrelfish ===
+
+2008-05-21 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Updated for API changes from merging with trunk WebCore's new debugger.
+
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame evaluateWebScript:]): Explicitly check for an
+ exception return, since the DebuggerCallFrame no longer automatically
+ substitutes the exception for the return value.
+
+ * WebView/WebScriptDebugger.mm: Use the dynamic global object, not the
+ lexical global object, since the debugger attaches based on dynamic
+ global object.
+
+2008-05-17 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Re-enabled previously disabled debugging functionality.
+
+ There are two major changes from how the WebKit debugger used to work:
+
+ (1) All the interesting bits are implemented down in JavaScriptCore. The
+ debugger just calls through to KJS::DebuggerCallFrame for everything.
+
+ (2) Instead of copyihng a pointer to an ExecState once, the debugger
+ copies the DebuggerCallFrame passed to it in each callback. This is
+ because the VM no longer maintains a fully transparent execution state
+ to which you can hold a pointer, and the DebuggerCallFrames it vends
+ are temporaries.
+
+ Also, we NULL out a WebScriptCallFrame's DebuggerCallFrame upon return
+ from its function. This is safer than the old method, which was to
+ hold a stale ExecState* and hope for the best.
+
+2008-05-13 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Updated for API changes in KJS::Debugger.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _attachScriptDebugger]): Changed the order of operations to
+ fix an ASSERT that can happen when re-entering _attachScriptDebugger.
+
+2008-05-13 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Updated WebScriptDebugger API to accept a SourceProvider instead
+ of a WebCore::String, to avoid copying.
+
+ (WebScriptDebugger::sourceParsed): Updated this function not to return
+ a value.
+
+2008-04-30 Geoffrey Garen <ggaren@apple.com>
+
+ Build fix: #ifdef'd out some code that doesn't work anymore.
+
+2008-04-30 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ #ifdef'd out some debugger code that doesn't work anymore.
+
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame scopeChain]):
+
+2008-04-21 Geoffrey Garen <ggaren@apple.com>
+
+ Build fix.
+
+ * ChangeLog:
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame scopeChain]):
+
+2008-03-30 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Build fix.
+
+=== Start merge of squirrelfish ===
+
+2008-05-21 Darin Adler <darin@apple.com>
+
+ - fix build
+
+ * WebView/WebViewPrivate.h: Remove declaration of closeWithFastTeardown. We can add it back later
+ if we want, but if we do, we should probably make some refinements like checking _private->closed
+ and applicationIsTerminating.
+
+2008-05-21 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders and Kevin Decker.
+
+ - fix <rdar://problem/5951130> REGRESSION: crash on quit after reopening windows from previous session
+
+ * WebView/WebView.mm:
+ (-[WebViewPrivate dealloc]): Fix assertions to not complain when fast teardown is used.
+ (-[WebView _closePluginDatabases]): Factored out some common code from both versions of close.
+ (-[WebView _closeWithFastTeardown]): Added an underscore to this method's name, since it's internal.
+ Streamlined the code a bit. Added a line of code to set _private->closed (this is the bug fix).
+ (-[WebView _close]): Changed for new method name and to use _closePluginDatabases.
+
+2008-05-19 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Darin Adler.
+
+ more fast teardown performance work
+
+ * Misc/WebDownload.m:
+ (-[WebDownloadInternal downloadDidBegin:]):
+ (-[WebDownloadInternal downloadDidFinish:]):
+ (-[WebDownloadInternal download:didFailWithError:]):
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::disableSuddenTermination):
+ (WebChromeClient::enableSuddenTermination):
+
+2008-05-18 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - fix <rdar://problem/5944596> IDNs are displayed as punycode in the authentication panel
+
+ * Panels/WebAuthenticationPanel.m:
+ (-[WebAuthenticationPanel setUpForChallenge:]):
+
+2008-05-16 Timothy Hatcher <timothy@apple.com>
+
+ Removes WebScriptDebugServer files and related calls. This removes
+ the hooks that Drosera uses for debugging. Now that the Web Inspector
+ has a better debugger, we don't need these anymore.
+
+ Reviewed by Sam Weinig.
+
+ * DefaultDelegates/WebScriptDebugServer.h: Removed.
+ * DefaultDelegates/WebScriptDebugServer.m: Removed.
+ * DefaultDelegates/WebScriptDebugServerPrivate.h: Removed.
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ * WebKit.exp:
+ * WebView/WebScriptDebugDelegate.mm:
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::sourceParsed):
+ (WebScriptDebugger::callEvent):
+ (WebScriptDebugger::atStatement):
+ (WebScriptDebugger::returnEvent):
+ (WebScriptDebugger::exception):
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+ * WebView/WebViewPrivate.h:
+
+2008-05-16 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Anders
+
+ <rdar://problem/5942616> - Need to standardize LocalStorage persistence path
+
+ Took the opportunity to touch up another pref that needs the same standardization.
+ That pref is currently not in use on Mac.
+
+ * WebView/WebPreferences.m:
+ (-[WebPreferences _setFTPDirectoryTemplatePath:]):
+ (-[WebPreferences _localStorageDatabasePath]):
+ (-[WebPreferences _setLocalStorageDatabasePath:]):
+ (-[WebPreferences _ftpDirectoryTemplatePath]):
+
+2008-05-16 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Alice Liu
+
+ <rdar://problem/5710317> REGRESSION:Selecting ranges of text should be possible using the keyboard (15310)
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _accessibilityTree]):
+
+2008-05-15 Stephanie Lewis <slewis@apple.com>
+
+ fix mac build
+
+ * WebView/WebView.mm:
+ (-[WebView closeWithFastTeardown]):
+
+2008-05-15 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Anders.
+
+ Turn on fast teardown. I added a preference for using full teardown because
+ the LEAKS output will be useless without a full teardown.
+
+ preference for fullteardown
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.m:
+ (-[WebPreferences setFullDocumentTeardownEnabled:]):
+ (-[WebPreferences fullDocumentTeardownEnabled]):
+ * WebView/WebPreferencesPrivate.h:
+
+ on application quit dispatch unload events and destroy plugins then exit
+ * WebView/WebView.mm:
+ (-[WebView closeWithFastTeardown]):
+ (-[WebView _close]):
+ * WebView/WebViewPrivate.h:
+
+2008-05-15 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Anders.
+
+ get the pending frame unload count from WebCore
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _pendingFrameUnloadEventCount]):
+ * WebView/WebFramePrivate.h:
+
+2008-05-15 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Kevin Decker
+
+ - fixed <rdar://problem/5940275> Inspector highlighting moves to bottom-left corner of
+ screen when new tab appears
+
+ The highlight should go away entirely, but this simple patch just makes it not jump away.
+ The issue with it not going away entirely is harder to fix and covered by <rdar://problem/5322306>
+
+ * WebInspector/WebNodeHighlight.m:
+ (-[WebNodeHighlight _repositionHighlightWindow]):
+ Bail out if target view isn't in a window
+
+2008-05-15 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Anders.
+
+ Track views that contain plugin instances so that they can be destroyed at application
+ quit without walking the entire document tree.
+
+ Add/Remove Netscape plugin views from instance list. Start/stop are when netscape
+ plugins are created and destroyed
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView start]):
+ (-[WebBaseNetscapePluginView stop]):
+
+ Add/remove WebKit plugin views from instance list
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController addPlugin:]):
+ (-[WebPluginController destroyPlugin:]):
+ (-[WebPluginController destroyAllPlugins]):
+
+ Add a set of views with plugin instances to the WebPluginDatabase
+ * Plugins/WebPluginDatabase.h:
+ * Plugins/WebPluginDatabase.mm:
+ (-[WebPluginDatabase init]):
+ (-[WebPluginDatabase dealloc]):
+ (-[WebPluginDatabase addPluginInstanceView:]):
+ (-[WebPluginDatabase removePluginInstanceView:]):
+ (-[WebPluginDatabase removePluginInstanceViewsFor:]):
+ (-[WebPluginDatabase destroyAllPluginInstanceViews]):
+
+ Handle cases where plugin views are detached before the plugin is destroyed.
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::detachedFromParent2):
+ (WebFrameLoaderClient::transitionToCommittedFromCachedPage):
+ (WebFrameLoaderClient::transitionToCommittedForNewPage):
+
+ Add plugin instances to the set in the WebPluginDatabase by way of the WebView
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _destroyAllWebPlugins]):
+ * WebView/WebHTMLViewInternal.h:
+ * WebView/WebView.mm:
+ (-[WebView addPluginInstanceView:]):
+ (-[WebView removePluginInstanceView:]):
+ (-[WebView removePluginInstanceViewsFor:]):
+ * WebView/WebViewInternal.h:
+
+2008-05-15 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Tim Hatcher
+
+ Until the settings/preferences equation can be reworked, we'll need to manually set the local storage path
+ before setting the page group of the new page.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]): Set the LocalStorage path
+ immediately after creating the page so it is in place for initializing the LocalStorageThread
+
+2008-05-15 Timothy Hatcher <timothy@apple.com>
+
+ Fixes the bug where the Web Inspector would flash white while resizing.
+ This was cause by deferring the window creation.
+
+ <rdar://problem/5873549> REGRESSION: Inspector flickers horribly while resizing (17979)
+
+ Reviewed by Darin Adler.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController window]): Don't defer the window creation.
+
+2008-05-15 Alexey Proskuryakov <ap@webkit.org>
+
+ Tiger build fix.
+
+ * Misc/WebNSAttributedStringExtras.mm: Import WebTypesInternal.h for NSUInteger.
+
+2008-05-15 Adele Peterson <adele@apple.com>
+
+ Reviewed and landed by Alexey.
+
+ Use TextIterator in +[NSAttributedString _web_attributedStringFromRange:].
+
+ * Misc/WebNSAttributedStringExtras.mm:
+ (+[NSAttributedString _web_attributedStringFromRange:]):
+
+2008-05-14 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Oliver.
+
+ Add missing NULL check to match rest of file, this was found by the editing fuzzer.
+
+ * WebView/WebResource.mm:
+ (-[WebResource data]):
+
+2008-05-14 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ NPP_ValidAttributesForMarkedText should return NSArray*, not NSArray.
+
+ * Plugins/nptextinput.h:
+
+2008-05-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam.
+
+ Don't empty the application cache in _setCacheModel, since it will be called during initialization.
+ Instead, do it in [WebCache empty].
+
+ * Misc/WebCache.mm:
+ (+[WebCache empty]):
+ * WebView/WebView.mm:
+ (+[WebView _setCacheModel:]):
+
+2008-05-13 chris fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin
+
+ <rdar://problem/4780592> WebKit application has its window announced as HTML content
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory AXWebAreaText]):
+
+2008-05-13 Timothy Hatcher <timothy@apple.com>
+
+ Fixes a crash seen in Xcode where CallUIDelegateReturningBoolean
+ was referencing a nil WebView under validateUserInterfaceItem.
+ The validateUserInterfaceItem methods was being called at a time
+ when the WebHTMLView is being torndown.
+
+ <rdar://problem/5806229> A crash occurs at CallUIDelegateReturningBoolean()
+ while mousing down on menu bar after Xcode News window is opened
+
+ Reviewed by Ada Chan.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView validateUserInterfaceItem:]): NULL check the WebView and
+ return NO when it is nil. Adds a comment.
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView validateUserInterfaceItem:]): Ditto.
+
+2008-05-13 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by John Sullivan.
+
+ <rdar://problem/5926425> HIWebViewCreateWithClass declared as API in HIWebView.h but never exported from WebKit.framework
+
+ * Carbon/HIWebView.h: Remove HIWebViewCreateWithClass.
+ * Carbon/HIWebView.m: Ditto.
+ (HIWebViewCreate):
+ (HIWebViewConstructor):
+
+2008-05-12 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Ada Chan.
+
+ - WebKit/mac changes for https://bugs.webkit.org/show_bug.cgi?id=17097
+ <rdar://problem/5715471> CGFontRefs (and HFONTs on Windows) leak because FontCache grows without bound
+
+ Added font cache statistics and a function to purge inactive font data.
+
+ * Misc/WebCoreStatistics.h:
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics cachedFontDataCount]):
+ (+[WebCoreStatistics cachedFontDataInactiveCount]):
+ (+[WebCoreStatistics purgeInactiveFontData]):
+ (+[WebCoreStatistics glyphPageCount]):
+
+2008-05-12 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Decorate some deprecated delegate methods with the availability macros.
+
+ The compiler doesn't appear to warn if a delegate implements these methods, but using the availability
+ macros is good for consistency and documentation.
+
+ * WebView/WebFrameLoadDelegate.h:
+ * WebView/WebUIDelegate.h:
+
+2008-05-12 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ <rdar://problem/5835604> Deprecate HIWebView
+
+ Use of HIWebView is deprecated in favor of embedding a WebView in a HICocoaView.
+
+ * Carbon/CarbonUtils.h: Include the availability macro header and decorate the functions appropriately.
+ * Carbon/HIWebView.h: Ditto.
+
+2008-05-12 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders.
+
+ Fixed: <rdar://problem/5840884>_recursive_resumeNullEventsForAllNetscapePlugins and _pauseNullEvents not defined
+
+ Re-added these SPI methods because they are needed by some clients. They were accidentally removed
+ in changeset <http://trac.webkit.org/changeset/31028>
+
+ * Plugins/WebBaseNetscapePluginView.h: Added stopTimers, restartTimers to the header.
+ * WebView/WebFrame.mm:
+ (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]): Re-addd.
+ (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]): Ditto.
+ * WebView/WebFrameInternal.h: Ditto.
+ * WebView/WebHTMLView.mm: Ditto.
+ (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]): Ditto.
+ (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]): Ditto.
+ * WebView/WebHTMLViewInternal.h: Ditto.
+ * WebView/WebHTMLViewPrivate.h: Ditto.
+
+2008-05-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Alexey.
+
+ Empty the application cache when changing the cache model.
+
+ * WebView/WebView.mm:
+ (+[WebView _setCacheModel:]):
+
+2008-05-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Oliver.
+
+ <rdar://problem/5774495> Make Unicode text input possible in Netscape-style plug-ins
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView start]):
+ Get the plug-in text input vtable pointer.
+
+ (-[WebBaseNetscapePluginView stop]):
+ Set the plug-in text input vtable pointer to 0.
+
+ (-[WebBaseNetscapePluginView inputContext]):
+ Return 0 for Carbon plug-ins since we don't want Cocoa to handle text input for them.
+
+ (-[WebBaseNetscapePluginView hasMarkedText]):
+ (-[WebBaseNetscapePluginView insertText:]):
+ (-[WebBaseNetscapePluginView markedRange]):
+ (-[WebBaseNetscapePluginView selectedRange]):
+ (-[WebBaseNetscapePluginView setMarkedText:selectedRange:]):
+ (-[WebBaseNetscapePluginView unmarkText]):
+ (-[WebBaseNetscapePluginView validAttributesForMarkedText]):
+ (-[WebBaseNetscapePluginView attributedSubstringFromRange:]):
+ (-[WebBaseNetscapePluginView characterIndexForPoint:]):
+ (-[WebBaseNetscapePluginView doCommandBySelector:]):
+ (-[WebBaseNetscapePluginView firstRectForCharacterRange:]):
+ (-[WebBaseNetscapePluginView conversationIdentifier]):
+ Implement NSTextInput and call into the plug-in text input vtable.
+
+ (browserTextInputFuncs):
+ New method which returns the browser input vtable.
+
+ (-[WebBaseNetscapePluginView getVariable:value:]):
+ Support getting the browser input vtable pointer.
+
+ * Plugins/WebNetscapePluginEventHandlerCocoa.h:
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ (WebNetscapePluginEventHandlerCocoa::keyDown):
+ (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
+ If the plug-in returns 0 when a NPCocoaEventKeyDown is passed to NPP_HandleEvent,
+ it means that the event should be passed on to the input manager.
+
+ * Plugins/npapi.mm:
+ (NPN_MarkedTextAbandoned):
+ (NPN_MarkedTextSelectionChanged):
+ Add implementations of browser input method methods.
+
+ * Plugins/nptextinput.h: Added.
+ Add file with new text input API.
+
+2008-05-12 Alexey Proskuryakov <ap@webkit.org>
+
+ Roll out recent threading changes (r32807, r32810, r32819, r32822) to simplify
+ SquirrelFish merging.
+
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics javaScriptObjectsCount]):
+ (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
+ (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame evaluateWebScript:]):
+
+2008-05-07 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mitz.
+
+ REGRESSION (3.1.1-TOT): Arrow keys are sticky in Google Maps street view
+ https://bugs.webkit.org/show_bug.cgi?id=18880
+ <rdar://problem/5909513>
+
+ Stop suspending key up events before calling handleEvent.
+
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ (WebNetscapePluginEventHandlerCarbon::sendEvent):
+
+2008-05-06 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Andersca.
+
+ prepare for plugin fast teardown work - make WebPluginDatabase a objective C++ file.
+
+ * Plugins/WebPluginDatabase.m: Removed.
+ * Plugins/WebPluginDatabase.mm: Copied from WebKit/mac/Plugins/WebPluginDatabase.m.
+ * Plugins/npapi.m: Removed.
+ * Plugins/npapi.mm: Copied from WebKit/mac/Plugins/npapi.m.
+
+2008-05-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Initialize numArchs to 0.
+
+ * Plugins/WebBasePluginPackage.m:
+ (-[WebBasePluginPackage isNativeLibraryData:]):
+
+2008-05-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add implementation of NPN_PopUpContextMenu.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView popUpContextMenu:]):
+ * Plugins/WebBaseNetscapePluginViewPrivate.h:
+ * Plugins/WebNetscapePluginPackage.m:
+ (-[WebNetscapePluginPackage load]):
+ * Plugins/npapi.m:
+ (NPN_PopUpContextMenu):
+
+2008-05-06 Anders Carlsson <andersca@apple.com>
+
+ Fix typo (don't read random memory).
+
+ * Plugins/WebBasePluginPackage.m:
+ (-[WebBasePluginPackage isNativeLibraryData:]):
+
+2008-05-05 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Change the isNativeLibraryData: method to handle universal binaries.
+
+ * Plugins/WebBasePluginPackage.m:
+ (swapIntsInHeader):
+ (-[WebBasePluginPackage isNativeLibraryData:]):
+
+2008-05-06 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler
+
+ Preparation for upcoming work making LocalStorage persistent.
+
+ When the application terminates, all LocalStorage areas must be sync'ed out to disk first.
+
+ * WebView/WebView.mm:
+ (+[WebView _applicationWillTerminate]): Close all LocalStorage areas before quitting.
+
+2008-05-05 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Fix for <rdar://problem/5884383>
+ Escape look-a-like characters from the the entire url.
+
+ * Misc/WebNSURLExtras.mm:
+ (escapeUnsafeCharacters):
+ (-[NSURL _web_userVisibleString]):
+
+2008-05-05 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5865171> REGRESSION: Creating a new quote places caret at beginning of quote instead of the end
+
+ * WebView/WebView.mm:
+ (-[WebView _updateSettingsFromPreferences:]): Disable Range mutation on changes to
+ the document for Tiger and Leopard Mail. There is code in Mail that does it, and
+ the two interfere.
+
+2008-05-05 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Tim Hatcher.
+
+ Make the Inspector's localizable strings file match the format used by Dashboard widgets.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::localizedStringsURL):
+
+2008-05-05 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Jess.
+
+ Apparently preflighting can cause hangs for some reason. Revert this for now.
+
+ * Plugins/WebNetscapePluginPackage.m:
+ (-[WebNetscapePluginPackage _initWithPath:]):
+ * Plugins/WebPluginPackage.m:
+ (-[WebPluginPackage initWithPath:]):
+
+2008-05-05 Darin Adler <darin@apple.com>
+
+ Reviewed by Mitz.
+
+ - https://bugs.webkit.org/show_bug.cgi?id=18789
+ fix some shouldCloseWithWindow edge cases
+
+ * WebView/WebView.mm:
+ (-[WebView viewWillMoveToWindow:]): Fix bug where we would stop observing the
+ NSWindowWillCloseNotification if the view was moved out of the window but still
+ had that window set as the host window. Also make sure this function doesn't do
+ anything if the WebView is already closed.
+ (-[WebView setHostWindow:]): Ditto.
+
+2008-05-04 David Kilzer <ddkilzer@apple.com>
+
+ Make parameters match for WebChromeClient::addMessageToConsole()
+
+ Reviewed by John.
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::addMessageToConsole): Renamed sourceID parameter
+ to sourceURL to match implementation in WebChromeClient.mm.
+
+2008-05-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mark.
+
+ Various Cocoa event model and 64-bit plug-in fixes.
+
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
+ Set click count.
+
+ (WebNetscapePluginEventHandlerCocoa::flagsChanged):
+ (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
+ Don't try to get the mouse location for keyboard events.
+
+ * Plugins/WebPluginPackage.m:
+ (-[WebPluginPackage initWithPath:]):
+ Preflight the bundle so we won't show 32-bit WebKit plug-ins when running as 64-bit.
+
+2008-05-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam.
+
+ The event union is now named.
+
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ (WebNetscapePluginEventHandlerCocoa::drawRect):
+ (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
+ (WebNetscapePluginEventHandlerCocoa::flagsChanged):
+ (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
+ (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
+ (WebNetscapePluginEventHandlerCocoa::focusChanged):
+
+2008-05-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mark.
+
+ Make sure that 32-bit only plug-ins aren't shown when running as 64-bit.
+
+ Call preflightAndReturnError on the bundle, which will check if any of the architectures
+ in the bundle match the current architecture.
+
+ * Plugins/WebNetscapePluginPackage.m:
+ (-[WebNetscapePluginPackage _initWithPath:]):
+
+2008-05-02 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Geoffrey Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=18826
+ Make JavaScript heap per-thread
+
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics javaScriptObjectsCount]):
+ (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
+ (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
+ Replaced static Collector calls with calls to a current thread's instance.
+
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame evaluateWebScript:]):
+ Pass ExecState to jsString().
+
+2008-05-01 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mark.
+
+ 64-bit NPAPI plugin build fixes.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+ (-[WebBaseNetscapePluginView updateAndSetWindow]):
+ (-[WebBaseNetscapePluginView start]):
+ (-[WebBaseNetscapePluginView windowBecameKey:]):
+ * Plugins/WebNetscapeDeprecatedFunctions.c:
+ * Plugins/WebNetscapeDeprecatedFunctions.h:
+ * Plugins/WebNetscapePluginEventHandler.mm:
+ (WebNetscapePluginEventHandler::create):
+ * Plugins/WebNetscapePluginEventHandlerCarbon.h:
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ * Plugins/WebPluginDatabase.m:
+ (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
+
+2008-05-01 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Tim.
+
+ Remove duplicate npfunctions.h header from WebKit.
+
+ * MigrateHeaders.make:
+ Migrate npfunctions.h
+
+ * Plugins/npfunctions.h: Removed.
+
+2008-05-01 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by John.
+
+ Add null checks for the event handler.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView stopTimers]):
+ (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
+
+2008-05-01 Anders Carlsson <andersca@apple.com>
+
+ Fix 64-bit build.
+
+ * Plugins/WebNetscapePluginEventHandlerCocoa.h:
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+
+2008-05-01 Anders Carlsson <andersca@apple.com>
+
+ Fix build.
+
+ * Plugins/npfunctions.h:
+
+2008-05-01 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ Forward mouse move events to the Netscape plug-in view.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView handleMouseMoved:]):
+ New method that just calls the current event handler.
+
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ (WebNetscapePluginEventHandlerCocoa::flagsChanged):
+ NSFlagsChanged is not a regular keyboard event and some of the NSEvent accessors
+ don't work on it so don't call them.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (NetscapePluginWidget::NetscapePluginWidget):
+ New Widget subclass to be used for Netscape plug-ins.
+
+ (NetscapePluginWidget::handleEvent):
+ Forward NSMouseMoved events to the plug-in.
+
+ (WebFrameLoaderClient::createPlugin):
+ Wrap the plug-in view in a NetscapePluginWidget.
+
+2008-05-01 Alp Toker <alp@nuanti.com>
+
+ Rubber-stamped by Anders.
+
+ GTK+ build fix for changes in r32752. Use int32, not int32_t types in
+ npapi.h.
+
+ Additional fix to use same signedness in npapi.h and Mac for the
+ interval parameter.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (PluginTimer::PluginTimer):
+ (-[WebBaseNetscapePluginView stopTimers]):
+ (-[WebBaseNetscapePluginView restartTimers]):
+ (-[WebBaseNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
+ (-[WebBaseNetscapePluginView unscheduleTimer:]):
+ * Plugins/WebBaseNetscapePluginViewPrivate.h:
+ * Plugins/npapi.m:
+ (NPN_ScheduleTimer):
+ (NPN_UnscheduleTimer):
+ * Plugins/npfunctions.h:
+
+2008-04-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ Add new Cocoa event model and the NPN_ScheduleTimer/NPN_UnscheduleTimer methods.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (PluginTimer::PluginTimer):
+ (PluginTimer::start):
+ (PluginTimer::fired):
+ (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+ (-[WebBaseNetscapePluginView stopTimers]):
+ (-[WebBaseNetscapePluginView restartTimers]):
+ (-[WebBaseNetscapePluginView scrollWheel:]):
+ (-[WebBaseNetscapePluginView flagsChanged:]):
+ (-[WebBaseNetscapePluginView start]):
+ (-[WebBaseNetscapePluginView eventModel]):
+ (-[WebBaseNetscapePluginView fini]):
+ (-[WebBaseNetscapePluginView getVariable:value:]):
+ (-[WebBaseNetscapePluginView setVariable:value:]):
+ (-[WebBaseNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
+ (-[WebBaseNetscapePluginView unscheduleTimer:]):
+ * Plugins/WebBaseNetscapePluginViewInternal.h:
+ * Plugins/WebBaseNetscapePluginViewPrivate.h:
+ * Plugins/WebNetscapePluginEventHandler.h:
+ * Plugins/WebNetscapePluginEventHandler.mm:
+ (WebNetscapePluginEventHandler::create):
+ * Plugins/WebNetscapePluginEventHandlerCarbon.h:
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ (WebNetscapePluginEventHandlerCarbon::scrollWheel):
+ (WebNetscapePluginEventHandlerCarbon::flagsChanged):
+ (WebNetscapePluginEventHandlerCarbon::platformWindow):
+ * Plugins/WebNetscapePluginEventHandlerCocoa.h: Added.
+ (WebNetscapePluginEventHandlerCocoa::startTimers):
+ (WebNetscapePluginEventHandlerCocoa::stopTimers):
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm: Added.
+ (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
+ (WebNetscapePluginEventHandlerCocoa::drawRect):
+ (WebNetscapePluginEventHandlerCocoa::mouseDown):
+ (WebNetscapePluginEventHandlerCocoa::mouseDragged):
+ (WebNetscapePluginEventHandlerCocoa::mouseEntered):
+ (WebNetscapePluginEventHandlerCocoa::mouseExited):
+ (WebNetscapePluginEventHandlerCocoa::mouseMoved):
+ (WebNetscapePluginEventHandlerCocoa::mouseUp):
+ (WebNetscapePluginEventHandlerCocoa::scrollWheel):
+ (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
+ (WebNetscapePluginEventHandlerCocoa::keyDown):
+ (WebNetscapePluginEventHandlerCocoa::keyUp):
+ (WebNetscapePluginEventHandlerCocoa::flagsChanged):
+ (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
+ (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
+ (WebNetscapePluginEventHandlerCocoa::focusChanged):
+ (WebNetscapePluginEventHandlerCocoa::platformWindow):
+ (WebNetscapePluginEventHandlerCocoa::sendEvent):
+ * Plugins/WebNetscapePluginPackage.m:
+ (-[WebNetscapePluginPackage load]):
+ * Plugins/npapi.m:
+ (NPN_ScheduleTimer):
+ (NPN_UnscheduleTimer):
+ * Plugins/npfunctions.h:
+
+2008-04-30 Brady Eidson <beidson@apple.com>
+
+ Fix my WebPreferences revert check-in
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2008-04-30 Brady Eidson <beidson@apple.com>
+
+ Rubberstamped by John Sullivan
+
+ Revert the remainder of my original preferences changes from last week.
+ They caused a massive PLT regression (too many notifications being sent out
+ or listened to that weren't previously) and it's not in my schedule to refine
+ the preferences code instead of working on my feature!
+
+ * WebView/WebView.mm:
+ (-[WebView _updateSettingsFromPreferences:]):
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+
+2008-04-30 Anders Carlsson <andersca@apple.com>
+
+ Fix the 64-bit build.
+
+ * Plugins/WebNetscapePluginEventHandler.h:
+ * Plugins/WebNetscapePluginEventHandler.mm:
+ * Plugins/WebNetscapePluginEventHandlerCarbon.h:
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+
+2008-04-29 David D. Kilzer <ddkilzer@apple.com>
+
+ BUILD FIX for Release build.
+
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ (WebNetscapePluginEventHandlerCarbon::drawRect): Declare acceptedEvent
+ separately so the compiler doesn't complain about an unused variable.
+ (WebNetscapePluginEventHandlerCarbon::TSMEventHandler): Ditto.
+
+2008-04-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ Refactor the Carbon event handling code out into a separate class in preparation for adding
+ the Cocoa event handling code.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
+ (-[WebBaseNetscapePluginView sendActivateEvent:]):
+ (-[WebBaseNetscapePluginView sendDrawRectEvent:]):
+ (-[WebBaseNetscapePluginView stopTimers]):
+ (-[WebBaseNetscapePluginView restartTimers]):
+ (-[WebBaseNetscapePluginView setHasFocus:]):
+ (-[WebBaseNetscapePluginView mouseDown:]):
+ (-[WebBaseNetscapePluginView mouseUp:]):
+ (-[WebBaseNetscapePluginView mouseEntered:]):
+ (-[WebBaseNetscapePluginView mouseExited:]):
+ (-[WebBaseNetscapePluginView mouseDragged:]):
+ (-[WebBaseNetscapePluginView keyUp:]):
+ (-[WebBaseNetscapePluginView keyDown:]):
+ (-[WebBaseNetscapePluginView cut:]):
+ (-[WebBaseNetscapePluginView copy:]):
+ (-[WebBaseNetscapePluginView paste:]):
+ (-[WebBaseNetscapePluginView selectAll:]):
+ (-[WebBaseNetscapePluginView start]):
+ (-[WebBaseNetscapePluginView stop]):
+ (-[WebBaseNetscapePluginView fini]):
+ (-[WebBaseNetscapePluginView drawRect:]):
+ (-[WebBaseNetscapePluginView viewWillMoveToWindow:]):
+ (-[WebBaseNetscapePluginView viewDidMoveToWindow]):
+ (-[WebBaseNetscapePluginView windowBecameKey:]):
+ (-[WebBaseNetscapePluginView windowResignedKey:]):
+ (-[WebBaseNetscapePluginView windowDidMiniaturize:]):
+ (-[WebBaseNetscapePluginView windowDidDeminiaturize:]):
+ (-[WebBaseNetscapePluginView loginWindowDidSwitchFromUser:]):
+ (-[WebBaseNetscapePluginView loginWindowDidSwitchToUser:]):
+ (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
+ (-[WebBaseNetscapePluginView _viewHasMoved]):
+ * Plugins/WebBaseNetscapePluginViewInternal.h:
+ * Plugins/WebNetscapePluginEmbeddedView.h:
+ * Plugins/WebNetscapePluginEventHandler.h: Added.
+ (WebNetscapePluginEventHandler::~WebNetscapePluginEventHandler):
+ (WebNetscapePluginEventHandler::currentEventIsUserGesture):
+ (WebNetscapePluginEventHandler::WebNetscapePluginEventHandler):
+ * Plugins/WebNetscapePluginEventHandler.mm: Added.
+ (WebNetscapePluginEventHandler::create):
+ * Plugins/WebNetscapePluginEventHandlerCarbon.h: Added.
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm: Added.
+ (WebNetscapePluginEventHandlerCarbon::WebNetscapePluginEventHandlerCarbon):
+ (getCarbonEvent):
+ (modifiersForEvent):
+ (WebNetscapePluginEventHandlerCarbon::sendNullEvent):
+ (WebNetscapePluginEventHandlerCarbon::drawRect):
+ (WebNetscapePluginEventHandlerCarbon::mouseDown):
+ (WebNetscapePluginEventHandlerCarbon::mouseUp):
+ (WebNetscapePluginEventHandlerCarbon::mouseEntered):
+ (WebNetscapePluginEventHandlerCarbon::mouseExited):
+ (WebNetscapePluginEventHandlerCarbon::mouseDragged):
+ (WebNetscapePluginEventHandlerCarbon::mouseMoved):
+ (WebNetscapePluginEventHandlerCarbon::keyDown):
+ (keyMessageForEvent):
+ (WebNetscapePluginEventHandlerCarbon::keyUp):
+ (WebNetscapePluginEventHandlerCarbon::focusChanged):
+ (WebNetscapePluginEventHandlerCarbon::windowFocusChanged):
+ (WebNetscapePluginEventHandlerCarbon::TSMEventHandler):
+ (WebNetscapePluginEventHandlerCarbon::installKeyEventHandler):
+ (WebNetscapePluginEventHandlerCarbon::removeKeyEventHandler):
+ (WebNetscapePluginEventHandlerCarbon::nullEventTimerFired):
+ (WebNetscapePluginEventHandlerCarbon::startTimers):
+ (WebNetscapePluginEventHandlerCarbon::stopTimers):
+ (WebNetscapePluginEventHandlerCarbon::sendEvent):
+
+2008-04-29 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by David Harrison.
+
+ Ensure that WebDynamicScrollBarsView defines WebCoreScrollbarAlwaysOn to keep Mail building.
+
+ * WebKit.exp:
+ * WebView/WebDynamicScrollBarsView.h:
+ * WebView/WebDynamicScrollBarsView.m:
+
+2008-04-29 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT)
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ * WebView/WebClipView.m:
+ (-[WebClipView scrollWheel:]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView addMouseMovedObserver]):
+ (-[WebHTMLView removeMouseMovedObserver]):
+ (-[WebHTMLView acceptsFirstMouse:]):
+ * WebView/WebUIDelegatePrivate.h:
+ * WebView/WebView.mm:
+ (-[WebViewPrivate init]):
+ * WebView/WebViewPrivate.h:
+
+2008-04-28 Rob Buis <buis@kde.org>
+
+ Reviewed by Maciej.
+
+ Build fix for Tiger.
+
+ * WebView/WebView.mm:
+ (WebKitInitializeApplicationCachePathIfNecessary):
+
+2008-04-28 Adele Peterson <adele@apple.com>
+
+ Reviewed by Dan Bernstein, Tim Hatcher, Anders Carlsson, and Darin Adler.
+
+ WebKit part of fix for <rdar://problem/3709505>
+ Safari should have a way to upload bundles from the file upload control (as zip)
+
+ Added UIDelegate methods to let the application handle generating replacement files for uploads.
+ In this case, Safari will create archived files for bundles so they can be uploaded properly.
+
+ * DefaultDelegates/WebDefaultUIDelegate.m:
+ (-[WebDefaultUIDelegate webView:shouldReplaceUploadFile:usingGeneratedFilename:]):
+ (-[WebDefaultUIDelegate webView:generateReplacementFile:]):
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::shouldReplaceWithGeneratedFileForUpload):
+ (WebChromeClient::generateReplacementFile):
+ * WebView/WebUIDelegatePrivate.h:
+
+2008-04-28 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam, Mark, Adele and Darin.
+
+ Initialize the application cache path.
+
+ * WebView/WebView.mm:
+ (WebKitInitializeApplicationCachePathIfNecessary):
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+
+2008-04-28 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix <rdar://problem/4911289> Add tabindex property to all children
+ of HTMLElement (7138)
+ http://bugs.webkit.org/show_bug.cgi?id=7138
+
+ * MigrateHeaders.make:
+ Removing DOMHTMLLabelElementPrivate.h and DOMHTMLLegendElementPrivate.h
+ because now that focus() has been moved to DOMHTMLElement.h, these
+ files are no longer needed.
+
+2008-04-25 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Fix run-webkit-tests --threading
+ and provisionally fix <https://bugs.webkit.org/show_bug.cgi?id=18661>
+ Proxy server issue in Sunday's Nightly
+
+ * WebView/WebView.mm: (-[WebViewPrivate init]): Initialize threading. Previously, this was
+ only done from icon database code, which is not robust enough.
+
+2008-04-20 Adam Barth <hk9565@gmail.com>
+
+ Reviewed by Adam Roben and Sam Weinig.
+
+ Updated WebSecurityOrigin to match new SecurityOrigin API.
+
+ Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
+
+ * Storage/WebSecurityOrigin.mm:
+ (-[WebSecurityOrigin host]):
+ (-[WebSecurityOrigin domain]):
+ * Storage/WebSecurityOriginPrivate.h:
+
+2008-04-25 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Sam Weinig.
+
+ Add some content to an empty ICU header file to prevent verification errors.
+
+ * icu/unicode/utf_old.h:
+
+2008-04-25 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam.
+
+ Add offlineWebApplicationCacheEnabled preference.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.m:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences offlineWebApplicationCacheEnabled]):
+ (-[WebPreferences setOfflineWebApplicationCacheEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _updateSettingsFromPreferences:]):
+
+2008-04-24 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove code for calculating the glyph cache size.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Remove unused symbol.
+
+2008-04-24 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add a definition of BUILDING_ON_LEOPARD to complement BUILDING_ON_TIGER.
+
+ * WebKitPrefix.h:
+
+2008-04-24 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin
+
+ Fix layout test regressions from my earlier preferences/settings tweak.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]): Even if we're not posting
+ the notification to update the settings, each WebView still needs to register for the
+ notification - restore that behavior.
+
+2008-04-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - preparation for https://bugs.webkit.org/show_bug.cgi?id=3729
+ <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _caretRectAtNode:offset:affinity:]): Changed to use
+ VisiblePosition::caretRect() instead of the RenderObject method which
+ was removed.
+
+2008-04-24 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin
+
+ Rework the Settings population again.
+
+ * WebView/WebView.mm:
+ (-[WebView _updateSettingsFromPreferences:]): This method is called both from _preferencesChangedNotification
+ and directly from WebView's common init function.
+ (-[WebView _preferencesChangedNotification:]):
+ (-[WebView _commonInitializationWithFrameName:groupName:]): Call _updateSettingsFromPreferences immediately
+ after creating the new Page
+
+2008-04-24 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff.
+
+ - fix crash in regression test where we'd ask a frame for a user agent string
+ after the WebView was already closed
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::userAgent): Assert that the WebView is not nil. Also
+ added some code to prevent the crash in release builds if this problem happens
+ again.
+
+2008-04-24 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam.
+
+ Change some String arguments to be const references instead.
+
+ * WebCoreSupport/WebEditorClient.h:
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::shouldInsertText):
+
+2008-04-24 John Sullivan <sullivan@apple.com>
+
+ Mac build fix
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory AXButtonActionVerb]):
+ implement this method using the text in WebCoreLocalizedStrings.cpp
+ (-[WebViewFactory AXRadioButtonActionVerb]):
+ ditto
+ (-[WebViewFactory AXTextFieldActionVerb]):
+ ditto
+ (-[WebViewFactory AXCheckedCheckBoxActionVerb]):
+ ditto
+ (-[WebViewFactory AXUncheckedCheckBoxActionVerb]):
+ ditto
+ (-[WebViewFactory AXLinkActionVerb]):
+ ditto
+
+2008-04-23 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig
+
+ In some current work I noticed that when a new Page is created, it is possible that it requires info from its Settings
+ object before the Settings object is initialized. It seems quite prudent to post the preferences changed notification,
+ thereby populating the Settings object, immediately after the Page is created.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]): Post the notification right after the Page is created
+
+2008-04-24 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Jess
+
+ - fixed <rdar://problem/5886655> JavaScript input panel automatic resizing doesn't work right with HiDPI
+
+ * Misc/WebNSControlExtras.m:
+ (-[NSControl sizeToFitAndAdjustWindowHeight]):
+ deploy userSpaceScaleFactor when using view distances on the window
+
+2008-04-22 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add NPN_Construct and NPN_PluginThreadAsyncCall declarations.
+
+ * Plugins/npfunctions.h:
+
+2008-04-20 Matt Lilek <webkit@mattlilek.com>
+
+ Mysteriously reviewed by mitz|away.
+
+ Bug 18111: Closing a tab while dragging crashes Safari
+ https://bugs.webkit.org/show_bug.cgi?id=18111
+
+ Null check the page before handling drag events.
+
+ * WebView/WebView.mm:
+ (-[WebView draggingUpdated:]):
+ (-[WebView draggingExited:]):
+
+2008-04-19 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Tim Hatcher
+
+ Add a WebPreference for the path of the local storage persistent store.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+
+ * WebView/WebPreferences.m:
+ (-[WebPreferences _localStorageDatabasePath]):
+ (-[WebPreferences _setLocalStorageDatabasePath:]):
+ * WebView/WebPreferencesPrivate.h:
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2008-04-18 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig
+
+ Don't clear the PageGroup on _close, as the WebCore::Page destructor already does this.
+ No reason to do the work twice...
+
+ * WebView/WebView.mm:
+ (-[WebView _close]):
+
+2008-04-17 Eric Seidel <eric@webkit.org>
+
+ Reviewed by beth.
+
+ Rename Frame::renderer() to contentRenderer() and fix uses.
+
+ * Misc/WebCoreStatistics.mm:
+ * WebView/WebRenderNode.mm:
+ (-[WebRenderNode initWithWebFrameView:]):
+
+2008-04-17 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Reviewed by mrowe.
+
+ * WebView/WebFrame.mm: Remove temporary build fix.
+
+2008-04-17 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix <rdar://problem/5863552> REGRESSION (r30741): Attachments don't appear in the iChat message window after sending
+
+ The order of arguments to -[NSDictionary initWithObjects:andKeys:] had been transposed accidentally during refactoring.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin): Pass the arguments in the correct order.
+
+2008-04-17 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Dan Bernstein.
+
+ Fix the Mac build.
+
+ * WebView/WebFrame.mm: Define HAVE_ACCESSIBILITY before including AccessibilityObject.h and AXObjectCache.h to get things building
+ for now. This comes from config.h in WebCore but we don't have an equivalent in WebKit so we'll need to work out the correct place
+ for this to live going forward.
+
+2008-04-15 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders.
+
+ <rdar://problem/5412759> CrashTracer: [USER] 22 crashes in Safari at com.apple.quicktime.webplugin: NPN_SetValue + 15403
+
+ In certain situations, code in WebBasePluginPackage would load a plug-in only for the explicit reason of asking it to create a
+ preference file, but wouldn't actually unload the bundle. This created problems for the QuickTime WebKit plug-in by unloading
+ a bundle out from underneath itself.
+
+ * Plugins/WebBasePluginPackage.h: Added unload method.
+ * Plugins/WebBasePluginPackage.m:
+ (-[WebBasePluginPackage unload]): Added new method. Currently, only Netscape plug-ins support unload.
+ (-[WebBasePluginPackage pListForPath:createFile:]): Added a call to unload.
+ * Plugins/WebNetscapePluginPackage.m:
+ (-[WebNetscapePluginPackage unload]): Added.
+
+2008-04-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES.
+
+ * Configurations/WebKit.xcconfig:
+
+2008-04-15 Brady Eidson <beidson@apple.com>
+
+ Reviewed by John Sullivan
+
+ Do a more complete job adding the "WebArchiveDebugMode" pref
+
+ * WebView/WebPreferences.m: Add both getter *and* setter
+ (-[WebPreferences webArchiveDebugModeEnabled]):
+ (-[WebPreferences setWebArchiveDebugModeEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Call the renamed getter
+
+2008-04-14 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Anders
+
+ Add a hidden pref to debug WebArchive loading. With this pref on, when loading a WebArchive,
+ if the resource isn't in the ArchiveResourceCollection, the loader will not fall back to the
+ network and will instead fail the load as "cancelled."
+
+ * WebView/WebPreferenceKeysPrivate.h:
+
+ * WebView/WebPreferences.m:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences _webArchiveDebugModeEnabled]):
+ * WebView/WebPreferencesPrivate.h:
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2008-04-11 David Hyatt <hyatt@apple.com>
+
+ Rename CachedResource ref/deref methods to addClient/removeClient.
+
+ Reviewed by olliej
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLViewPrivate dealloc]):
+ (-[WebHTMLViewPrivate finalize]):
+ (-[WebHTMLViewPrivate clear]):
+ (-[WebHTMLView setPromisedDragTIFFDataSource:WebCore::]):
+
+2008-04-07 Brady Eidson <beidson@apple.com>
+
+ Add "ENABLE_DOM_STORAGE" to keep in sync with the rest of the project
+
+ * Configurations/WebKit.xcconfig:
+
+2008-04-04 Adam Roben <aroben@apple.com>
+
+ Use WebCore's ICU headers instead of our own copy
+
+ Rubberstamped by Tim Hatcher.
+
+ * Configurations/WebKit.xcconfig: Pick up ICU headers from WebCore's
+ PrivateHeaders.
+
+2008-04-04 Adam Roben <aroben@apple.com>
+
+ Fix <rdar://problem/5804776> Would like to use WebCore's
+ ForwardingHeaders in WebKit without manually creating copies
+
+ Patch by Tim Hatcher, typed by me.
+
+ * Configurations/WebKit.xcconfig: Use the copy of ForwardingHeaders in
+ WebCore's PrivateHeaders instead of our own copy.
+
+2008-04-04 Ada Chan <adachan@apple.com>
+
+ Now we pass width and height directly as integers to format
+ the window title for a standalone image.
+
+ Reviewed by Dan.
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory imageTitleForFilename:width:height:]):
+
+2008-04-03 Nicholas Shanks <webkit@nickshanks.com>
+
+ Updated by Dan Bernstein. Reviewed by Dave Hyatt.
+
+ - WebKit part of fixing http://bugs.webkit.org/show_bug.cgi?id=6484
+ font-weight does not properly support graded weights
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _styleFromFontAttributes:]):
+ (-[WebHTMLView _originalFontB]):
+ (-[WebHTMLView _addToStyle:fontA:fontB:]):
+
+2008-04-02 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Ensure that debug symbols are generated for x86_64 and ppc64 builds.
+
+ * Configurations/Base.xcconfig:
+
+2008-03-31 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Darin Adler.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _accessibilityTree]):
+ The syntax for fetching an object from the AXObjectCache changed slightly
+
+2008-03-31 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Jon Honeycutt
+
+ Move a WebArchive loading check into WebCore
+
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation receivedData:withDataSource:]): Don't check "isDisplayingWebArchive" as WebCore is now
+ responsible for checking that state
+
+2008-03-31 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin and Mitz's rubber stamp
+
+ Remove dataForArchivedSelection(WebCore::Frame*) from the EditorClient - only usage is now directly in WebCore
+
+ * WebCoreSupport/WebEditorClient.mm:
+ * WebCoreSupport/WebEditorClient.h:
+
+2008-03-28 Brady Eidson <beidson@apple.com>
+
+ Rubberstamped by Darin Adler
+
+ Remove WebArchiver.h/mm
+
+ * WebView/WebArchiver.h: Removed.
+ * WebView/WebArchiver.mm: Removed.
+
+ * DOM/WebDOMOperations.mm:
+ * WebCoreSupport/WebDragClient.mm:
+ * WebCoreSupport/WebEditorClient.mm:
+ * WebView/WebDataSource.mm:
+ * WebView/WebHTMLView.mm:
+
+2008-03-28 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler
+
+ Now that WebCore can create archives from a frame selection directly, we don't need it in WebArchiver anymore
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::dataForArchivedSelection):
+
+ * WebView/WebArchiver.h: Nuke archiveSelectionInFrame, as there are no remaining users
+ * WebView/WebArchiver.mm: Ditto
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
+
+2008-03-28 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler
+
+ More Kit->Core WebArchive changes.
+
+ Create an archive from the current selection in a frame
+
+ * WebView/WebArchiver.mm: Remove one more *undeclared* method, the last method will drop off
+ easily in a followup
+
+2008-03-28 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig
+
+ WebArchive saga continues - Can now make archives from ranges in WebCore
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMRange webArchive]):
+ (-[DOMRange markupString]):
+
+ * WebView/WebArchiver.h: Remove newly obsolete [WebArchiver archiveRange:]
+ * WebView/WebArchiver.mm:
+
+2008-03-28 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig
+
+ More Kit->Core webarchive code movement
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMNode markupString]): Call createFullMarkup() instead
+
+ * WebView/WebFrame.mm: Remove obsolete _markupStringFromNode
+ * WebView/WebFrameInternal.h: Ditto
+
+2008-03-28 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig
+
+ Fold [WebArchiver archiveFrame:] into WebDataSource - the last remaining caller
+
+ * WebView/WebArchiver.h:
+ * WebView/WebArchiver.mm:
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource webArchive]):
+
+2008-03-28 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig
+
+ Remove unused [WebArchiver archiveNode:], made obsolete in r31400
+
+ * WebView/WebArchiver.h:
+ * WebView/WebArchiver.mm:
+
+2008-03-28 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin
+
+ "Yet another transitional step" to empty out WebKit-based code for archiving.
+
+ With this patch, the key operation of "Creating a WebArchive rooted at a single Node" takes place
+ entirely within WebCore, and opens the door to saving WebArchives on Windows.
+
+ * DOM/WebDOMOperations.mm:
+ * WebView/WebArchiver.mm:
+ (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]):
+
+2008-03-27 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Adam Roben
+
+ Move [WebDataSource mainResource] and [WebDataSource subresources] down into WebCore
+ as the push to core-ify WebArchives continues.
+
+ This patch also introduces a behavior change. WebCore allows ArchiveResources with null or empty data.
+ WebKit has had the inexplicable distinction of allowing empty Data in a WebResource, but not null.
+ Since WebResource is API, I decided to leave it be to avoid a behavior change. But internally created resources
+ (as in "while archiving a page") are accepting of null or empty data.
+
+ This actually fixes a bug where not all subframes are archived, and resulted in a layout test change.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource mainResource]): Call DocumentLoader implementation
+ (-[WebDataSource subresources]): Ditto
+ * WebView/WebFrame.mm: Remove [WebFrame _getAllResourceDatas:andResponses:] as its only caller is obsolete
+ * WebView/WebFrameInternal.h:
+
+2008-03-27 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Adam
+
+ Change the "init from WebCore resource" version of WebResource to take PassRefPtr
+ (more efficient)
+
+ * WebView/WebResource.mm:
+ (-[WebResource _initWithCoreResource:]):
+ * WebView/WebResourceInternal.h:
+
+2008-03-26 Brady Eidson <beidson@apple.com>
+
+ Build fix - accidentally checked in this change which was work in progress
+
+ * DOM/WebDOMOperations.mm:
+
+2008-03-26 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin
+
+ When we create a WebArchive, we walk every node from some starting point, asking each node
+ along the way "What are your subresource URLs?"
+
+ That logic is currently in DOMNode in WebKitMac - this patch moves that ability down into
+ WebCore::Node
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMNode _subresourceURLs]): One generic DOMNode method can now handle all DOMNodes by
+ calling into individual WebCore::Node implementations
+ * DOM/WebDOMOperationsPrivate.h:
+
+2008-03-26 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Mark Rowe
+
+ Part of the continued push to move WebArchive-related code down to WebCore, this
+ moves [WebDataSource subresourceForURL:] down to DocumentLoader->subresource()
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource subresourceForURL:]): Call through to the DocumentLoader
+
+ * WebView/WebFrame.mm: Remove [WebFrame _getData:andResponse:forURL:], as its only use
+ has now been ported down to WebCore
+ * WebView/WebFrameInternal.h:
+
+2008-03-26 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Brady Eidson.
+
+ Update FEATURE_DEFINES to be consistent with the other locations in which it is defined.
+
+ * Configurations/WebKit.xcconfig:
+
+2008-03-26 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Make the Ahem font antialias correctly on Acid3 on Tiger.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+
+2008-03-26 Mark Rowe <mrowe@apple.com>
+
+ Fix the Mac build.
+
+ * MigrateHeaders.make: Copy the newly generated header into the right place.
+
+2008-03-25 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Beth Dakin
+
+ Remove entirely unused internal method
+
+ * WebView/WebArchiver.h:
+ * WebView/WebArchiver.mm:
+
+2008-03-25 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Adam Roben
+
+ <rdar://problem/5819308> - View Source is empty when view webarchives
+
+ * WebCore.base.exp:
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::setParsedArchiveData):
+ (WebCore::DocumentLoader::parsedArchiveData):
+ * loader/DocumentLoader.h:
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::finishedLoadingDocument): Set the archive's MainResource data as the parsedArchiveData
+ in the DocumentLoader
+
+2008-03-25 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=17933
+ Reopen All Windows From Last Session causes crash
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Added null
+ check.
+
+2008-03-25 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Jon Honeycutt's rubberstamp
+
+ Fix a leak with the new WebArchive setup
+
+ * WebView/WebArchive.mm:
+ (-[WebArchivePrivate setCoreArchive:]): Deref() the old WebArchive
+
+2008-03-25 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin
+
+ Removed the concept of "pending archive resources" and the "archive resources delivery timer"
+ from WebFrameLoaderClient, as those concepts have been pushed into WebCore
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::WebFrameLoaderClient):
+
+2008-03-25 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin
+
+ Remove newly obsolete FrameLoaderClient methods
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+
+2008-03-25 Brady Eidson <beidson@apple.com>
+
+ Release build fix
+
+ * WebView/WebArchive.mm:
+ (-[WebArchive subresources]):
+ (-[WebArchive subframeArchives]):
+
+2008-03-25 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin
+
+ <rdar://problem/4516169> - Support WebArchives on Windows
+ And paves the way for many future WebArchive bug fixes and enhancements
+
+ This change moves most of the real workhorse code about WebArchives into WebCore. It maintains
+ 1-to-1 relationships between a few objects in WebCore and WebKit. Such as:
+ * WebArchive <-> LegacyWebArchive
+ * WebResource <-> ArchiveResource
+ * WebUnarchivingState <-> ArchiveResourceCollection
+
+ The other biggest changes involve many FrameLoaderClient methods that existed soley for WebArchives
+ and now exist in WebCore
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::clearUnarchivingState): Emptied - to be removed in a followup patch
+ (WebFrameLoaderClient::finalSetupForReplace):
+ (WebFrameLoaderClient::setDefersLoading):
+ (WebFrameLoaderClient::willUseArchive):
+ (WebFrameLoaderClient::isArchiveLoadPending):
+ (WebFrameLoaderClient::cancelPendingArchiveLoad):
+ (WebFrameLoaderClient::clearArchivedResources):
+ (WebFrameLoaderClient::createFrame):
+
+ * WebView/WebArchive.mm:
+ (+[WebArchivePrivate initialize]):
+ (-[WebArchivePrivate init]):
+ (-[WebArchivePrivate initWithCoreArchive:]):
+ (-[WebArchivePrivate coreArchive]):
+ (-[WebArchivePrivate setCoreArchive:]):
+ (-[WebArchivePrivate dealloc]):
+ (-[WebArchivePrivate finalize]):
+ (-[WebArchive init]):
+ (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
+ (-[WebArchive initWithData:]):
+ (-[WebArchive initWithCoder:]):
+ (-[WebArchive encodeWithCoder:]):
+ (-[WebArchive mainResource]):
+ (-[WebArchive subresources]):
+ (-[WebArchive subframeArchives]):
+ (-[WebArchive data]):
+ (-[WebArchive _initWithCoreLegacyWebArchive:WebCore::]):
+ (-[WebArchive WebCore::]):
+ * WebView/WebArchiveInternal.h: Added.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSourcePrivate dealloc]):
+ (-[WebDataSource _addSubframeArchives:]):
+ (-[WebDataSource _documentFragmentWithArchive:]):
+ (-[WebDataSource subresourceForURL:]):
+ (-[WebDataSource addSubresource:]):
+ * WebView/WebDataSourceInternal.h:
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame loadArchive:]):
+ * WebView/WebFrameInternal.h:
+
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
+
+ * WebView/WebResource.mm:
+ (+[WebResourcePrivate initialize]):
+ (-[WebResourcePrivate init]):
+ (-[WebResourcePrivate initWithCoreResource:]):
+ (-[WebResourcePrivate dealloc]):
+ (-[WebResourcePrivate finalize]):
+ (-[WebResource initWithCoder:]):
+ (-[WebResource encodeWithCoder:]):
+ (-[WebResource data]):
+ (-[WebResource URL]):
+ (-[WebResource MIMEType]):
+ (-[WebResource textEncodingName]):
+ (-[WebResource frameName]):
+ (-[WebResource _initWithCoreResource:WebCore::]):
+ (-[WebResource WebCore::]):
+ (-[WebResource _ignoreWhenUnarchiving]):
+ (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
+ (-[WebResource _fileWrapperRepresentation]):
+ (-[WebResource _response]):
+ (-[WebResource _stringValue]):
+ * WebView/WebResourceInternal.h: Added.
+ * WebView/WebResourcePrivate.h:
+
+ * WebView/WebUnarchivingState.h: Removed.
+ * WebView/WebUnarchivingState.m: Removed.
+
+2008-03-24 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Bug 18030: REGRESSION(r31236): Space bar fails to scroll down page
+ <http://bugs.webkit.org/show_bug.cgi?id=18030>
+
+ Rollout keyDown changes from r31236 -- fix for keyDown behaviour is
+ tracked by Bug 18057: keyDown incorrectly propagates up the frame tree
+ <http://bugs.webkit.org/show_bug.cgi?id=18057>
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView keyDown:]):
+
+2008-03-24 Cameron Zwarich <cwzwarich@uwaterloo.ca>
+
+ Reviewed by Maciej, landed by Brady
+
+ Bug 3580: iFrames Appear to be Cached
+ <http://bugs.webkit.org/show_bug.cgi?id=3580>
+
+ Bug 15486: REGRESSION: Reload causes WebKit to *forget* fragment URLs
+ <http://bugs.webkit.org/show_bug.cgi?id=15486>
+
+ Bug 15554: Reload causes <object> to use old data
+ <http://bugs.webkit.org/show_bug.cgi?id=15554>
+
+ If a page is reloaded, a child frame's URL can not be taken from a history item.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _loadURL:referrer:intoChild:]):
+
+2008-03-24 Darin Adler <darin@apple.com>
+
+ Reviewed by Beth.
+
+ - fix <rdar://problem/5817067> -[WebDataSource unreachableURL] invokes KURL's copy constructor
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem URL]): Use a reference to avoid making a copy.
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _URL]): Ditto.
+ (-[WebDataSource unreachableURL]): Ditto.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Ditto.
+
+ * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
+ * History/WebHistory.mm:
+ * Misc/WebElementDictionary.mm:
+ * Misc/WebNSAttributedStringExtras.mm:
+ Remove unneeded imports of KURL.h.
+
+2008-03-24 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin's rubberstamp
+
+ Rename this file for upcoming work.
+
+ * WebView/WebArchive.m: Removed.
+ * WebView/WebArchive.mm: Copied from WebKit/mac/WebView/WebArchive.m.
+
+2008-03-24 Alexey Proskuryakov <ap@webkit.org>
+
+ Build fix.
+
+ * MigrateHeaders.make: Added DOMSVGAltGlyphElement.h and DOMSVGAltGlyphElementInternal.h.
+
+2008-03-23 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Maciej.
+
+ Bug 17670: Key events may improperly propagate from iframe to parent frame
+ <http://bugs.webkit.org/show_bug.cgi?id=17670>
+ Bug 16381: REGRESSION: Shift, command, option, ctrl keys in Gmail Rich Text changes focus
+ <http://bugs.webkit.org/show_bug.cgi?id=16381>
+
+ Prevent the Cocoa event system from propagating key events to the parent WebHTMLView,
+ as that results in us dispatching the key events for each frame going up the frame
+ tree.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView keyDown:]):
+ (-[WebHTMLView keyUp:]):
+ (-[WebHTMLView flagsChanged:]):
+
+2008-03-21 Timothy Hatcher <timothy@apple.com>
+
+ Bug 17980: Regression: Inspector highlighting of webpage not cleared when going to new URL
+ http://bugs.webkit.org/show_bug.cgi?id=17980
+
+ Reviewed by Adam.
+
+ The new highlight drawing was not honoring the fade value, so it was
+ always drawing at full opacity. The animation code didn't match Windows
+ and the new highlight anyway, so it has been removed. The highlight
+ how just detaches when it is hidden.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController windowShouldClose:]): Call hideHighlight.
+ (-[WebInspectorWindowController close]): Ditto.
+ (-[WebInspectorWindowController highlightNode:]): Call attach.
+ (-[WebInspectorWindowController hideHighlight]): Call detach and release _currentHighlight.
+ * WebInspector/WebNodeHighlight.h:
+ * WebInspector/WebNodeHighlight.m:
+ (-[WebNodeHighlight initWithTargetView:inspectorController:]):
+ (-[WebNodeHighlight dealloc]): Assert we have no _highlightView.
+ (-[WebNodeHighlight attach]): Renamed from attachHighlight.
+ (-[WebNodeHighlight detach]): Renamed from detachHighlight.
+ (-[WebNodeHighlight setNeedsUpdateInTargetViewRect:]): Renamed from setHolesNeedUpdateInTargetViewRect:.
+ * WebInspector/WebNodeHighlightView.h:
+ * WebInspector/WebNodeHighlightView.m:
+ (-[WebNodeHighlightView setNeedsDisplayInRect:]): Renamed from setHolesNeedUpdateInRect:.
+
+2008-03-20 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Ensure that the defines in FEATURE_DEFINES are sorted so that they will match the default settings of build-webkit.
+ This will prevent the world from being rebuilt if you happen to switch between building in Xcode and with build-webkit on the
+ command-line.
+
+ * Configurations/WebKit.xcconfig:
+
+2008-03-20 Adam Roben <aroben@apple.com>
+
+ Make WebNodeHighlightView use InspectorController to do its painting
+
+ Reviewed by Tim Hatcher.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController highlightNode:]): Pass the
+ InspectorController to the WebNodeHighlight, and don't call
+ setHighlightedNode: (which has been removed).
+ (-[WebInspectorWindowController hideHighlight]): Removed call to
+ setHighlightedNode:.
+ * WebInspector/WebNodeHighlight.h:
+ - Replaced _highlightNode with _inspectorController
+ - Removed _highlightedNode accessors
+ - Added -inspectorController method
+ * WebInspector/WebNodeHighlight.m:
+ (-[WebNodeHighlight initWithTargetView:inspectorController:]): Now
+ takes an InspectorController* and stores it in _inspectorController.
+ (-[WebNodeHighlight dealloc]): Removed code dealing with
+ _highlightedNode.
+ (-[WebNodeHighlight inspectorController]): Added.
+ * WebInspector/WebNodeHighlightView.m: Removed FileInternal category.
+ (-[WebNodeHighlightView isFlipped]): Added. WebCore expects all
+ GraphicsContexts to be based on a flipped CGContext, so we have to
+ specify that this view is flipped.
+ (-[WebNodeHighlightView drawRect:]): Changed to create a
+ GraphicsContext and pass it to InspectorController::drawNodeHighlight.
+
+2008-03-18 David Hyatt <hyatt@apple.com>
+
+ Add support for a preference in WebKit that can be used in nightly builds to test full page
+ zoom.
+
+ Reviewed by Antti
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView setTextSizeMultiplier:]):
+ (-[WebView canMakeTextSmaller]):
+ (-[WebView makeTextSmaller:]):
+ (-[WebView canMakeTextLarger]):
+ (-[WebView makeTextLarger:]):
+ (-[WebView canMakeTextStandardSize]):
+ (-[WebView makeTextStandardSize:]):
+
+2008-03-17 Eric Seidel <eric@webkit.org>
+
+ Reviewed by darin.
+
+ Export _NPN_IntFromIdentifier as part of our NPAPI interface
+
+ * Plugins/WebNetscapePluginPackage.m:
+ (-[WebNetscapePluginPackage load]):
+
+2008-03-14 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Brian Dash's rubberstamp
+
+ Remove a class declaration for a class that has never existed
+
+ * WebView/WebResource.h:
+
+2008-03-14 David D. Kilzer <ddkilzer@apple.com>
+
+ Unify concept of enabling the Mac Java bridge.
+
+ Reviewed by Darin and Anders.
+
+ * Plugins/WebPluginJava.h: Removed unused file.
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ (WebFrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
+ * WebCoreSupport/WebFrameLoaderClient.mm: Ditto for #import and NSView SPI method.
+ (WebFrameLoaderClient::javaApplet): Ditto.
+
+2008-03-13 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Darin Adler.
+
+ * ForwardingHeaders/wtf/Deque.h: Added.
+
+2008-03-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ Call originalRequest, not initialRequest.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource initialRequest]):
+
+2008-03-12 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - cleanup after removing the bridge
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMDocument URLWithAttributeString:]): Call computeURL directly.
+
+ * Misc/WebCoreStatistics.mm:
+ (-[WebFrame renderTreeAsExternalRepresentation]): Call externalRepresentation directly.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView loadPluginRequest:]): Use core function instead of
+ _frameLoader method.
+ (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
+ Ditto.
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]): Ditto.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::frameLoaderDestroyed): Added a call to the new _clearCoreFrame
+ method. Without this we could leave a stale frame pointer around.
+ (WebFrameLoaderClient::dispatchDidReceiveIcon): Rewrote assertion so it's not the single
+ caller of the _isMainFrame method.
+ (WebFrameLoaderClient::transitionToCommittedForNewPage): Use core function instead of
+ _frameLoader method.
+ (WebFrameLoaderClient::createFrame): Moved code here from _addChild.
+
+ * WebView/WebFrame.mm: Removed lots of methods. Some were moved elsewhere, others
+ turned out to be unused.
+ (core): Added overload for DocumentFragment.
+ (kit): Ditto.
+ (-[WebFrame _loadURL:referrer:intoChild:]): Get to Frame using _private->coreFrame and
+ to FrameLoader with _private->coreFrame->loader().
+ (-[WebFrame _attachScriptDebugger]): Ditto.
+ (-[WebFrame _clearCoreFrame]): Added.
+ (-[WebFrame _updateBackground]): More of the same.
+ (-[WebFrame _unmarkAllBadGrammar]): Ditto.
+ (-[WebFrame _unmarkAllMisspellings]): Ditto.
+ (-[WebFrame _hasSelection]): Ditto.
+ (-[WebFrame _atMostOneFrameHasSelection]): Ditto.
+ (-[WebFrame _findFrameWithSelection]): Ditto.
+ (-[WebFrame _dataSource]): Ditto.
+ (-[WebFrame _addData:]): Streamlined code a bit.
+ (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): Ditto.
+ (-[WebFrame _receivedData:textEncodingName:]): Ditto.
+ (-[WebFrame _isDescendantOfFrame:]): Ditto.
+ (-[WebFrame _bodyBackgroundColor]): Ditto.
+ (-[WebFrame _isFrameSet]): Ditto.
+ (-[WebFrame _firstLayoutDone]): Ditto.
+ (-[WebFrame _loadType]): Ditto.
+ (-[WebFrame _isDisplayingStandaloneImage]): Ditto.
+ (-[WebFrame name]): Ditto.
+ (-[WebFrame DOMDocument]): Ditto.
+ (-[WebFrame frameElement]): Ditto.
+ (-[WebFrame provisionalDataSource]): Ditto.
+ (-[WebFrame dataSource]): Ditto.
+ (-[WebFrame loadRequest:]): Ditto.
+ (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): Ditto.
+ (-[WebFrame loadArchive:]): Ditto.
+ (-[WebFrame stopLoading]): Ditto.
+ (-[WebFrame reload]): Ditto.
+ (-[WebFrame findFrameNamed:]): Ditto.
+ (-[WebFrame parentFrame]): Ditto.
+ (-[WebFrame childFrames]): Ditto.
+ (-[WebFrame windowObject]): Ditto.
+ (-[WebFrame globalContext]): Ditto.
+
+ * WebView/WebFrameInternal.h: Added overloads of core and kit.
+ Removed method declarations.
+
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation documentSource]): Moved code here from WebFrame.
+ (formElementFromDOMElement): Ditto.
+ (-[WebHTMLRepresentation elementWithName:inForm:]): Ditto.
+ (inputElementFromDOMElement): Ditto.
+ (-[WebHTMLRepresentation elementDoesAutoComplete:]): Ditto.
+ (-[WebHTMLRepresentation elementIsPassword:]): Ditto.
+ (-[WebHTMLRepresentation formForElement:]): Ditto.
+ (-[WebHTMLRepresentation currentForm]): Ditto.
+ (-[WebHTMLRepresentation controlsInForm:]): Ditto.
+ (-[WebHTMLRepresentation searchForLabels:beforeElement:]): Ditto.
+ (-[WebHTMLRepresentation matchLabels:againstElement:]): Ditto.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _frameOrBoundsChanged]): Moved sendScrollEvent code here from WebFrame.
+ (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
+ Call createFragmentFromText directly instead of via WebFrame.
+ (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
+ Moved layout calls here from WebFrame.
+ (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Ditto.
+ (-[WebHTMLView _updateFontPanel]): Ditto, but with fontForSelection.
+ (-[WebHTMLView _canSmartCopyOrDelete]): Ditto, but with selectionGranularity.
+ (-[WebHTMLView markedRange]): Moved code here from _markedTextNSRange.
+ (-[WebHTMLView attributedSubstringFromRange:]): Tweaked code a bit.
+ (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]):
+ Moved code here from WebFrame.
+ (-[WebHTMLView elementAtPoint:allowShadowContent:]): Ditto.
+ (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Ditto.
+ (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]): Ditto.
+ (-[WebHTMLView markedTextMatchesAreHighlighted]): Ditto.
+ (-[WebHTMLView unmarkAllTextMatches]): Ditto.
+ (-[WebHTMLView rectsForTextMatches]): Ditto.
+
+ * WebView/WebHTMLViewInternal.h: Removed unused method declarations.
+
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Use core function instead of
+ _frameLoader method.
+
+ * WebView/WebRenderNode.mm:
+ (copyRenderNode): Moved code here from WebFrame.
+ (-[WebRenderNode initWithWebFrameView:]): Ditto.
+
+ * WebView/WebResource.mm:
+ (-[WebResource _stringValue]): Moved code here from WebFrame.
+
+ * WebView/WebView.mm:
+ (-[WebView _close]): Use core function intsead of _frameLoader method.
+ (-[WebView setCustomTextEncodingName:]): Ditto.
+ (-[WebView setHostWindow:]): Moved code here from WebFrame.
+ (aeDescFromJSValue): Moved this here from WebFrame.
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Moved code here from WebFrame.
+
+2008-03-12 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=17640
+ eliminate WebCoreFrameBridge
+
+ Moved all the code from the bridge into WebFrame. This need not be the final
+ home of these methods -- they can be moved closer to their callers and improved
+ further -- but it eliminates the bridge without requiring a rewrite of the code.
+ It's a fairly mechanical process (just adding underscores to method names really).
+
+ There's even a chance that some of the methods are unused. Those we can remove
+ after checking if that's so.
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMNode markupString]): Use WebFrame rather than bridge.
+ (-[DOMDocument webFrame]): Changed to use the core and kit functions
+ instead of using the bridge.
+ (-[DOMDocument URLWithAttributeString:]): Use WebFrame rather than bridge.
+ (-[DOMRange markupString]): Ditto.
+ * DOM/WebDOMOperationsPrivate.h: Removed _bridge methods.
+
+ * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Removed unneeded import.
+ * History/WebHistoryItem.mm: Ditto.
+
+ * MigrateHeaders.make: Added DOMDocumentFragmentInternal.h.
+ * Misc/WebCoreStatistics.mm:
+ (-[WebFrame renderTreeAsExternalRepresentation]): Use WebFrame rather than bridge.
+
+ * Misc/WebElementDictionary.mm: Removed unneeded import.
+
+ * Misc/WebKitStatistics.m:
+ (+[WebKitStatistics bridgeCount]): Removed WebBridgeCount and just return 0.
+ * Misc/WebKitStatisticsPrivate.h: Ditto.
+
+ * Misc/WebNSAttributedStringExtras.mm: Removed unneeded import.
+ * Misc/WebNSPasteboardExtras.mm: Ditto.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): Use WebFrame
+ rather than bridge.
+
+ * Plugins/WebNetscapePluginEmbeddedView.mm: Removed unneeded import.
+ * Plugins/WebNetscapePluginStream.mm: Ditto.
+
+ * Plugins/WebPluginContainerCheck.mm:
+ (-[WebPluginContainerCheck _isForbiddenFileLoad]): Use WebFrame rather than
+ bridge to get to the WebCore::Frame.
+
+ * Plugins/WebPluginController.h: Declare webFrame method and remove bridge method.
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]): Use WebFrame
+ rather than bridge.
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (selectorForKeyEvent): Tweaked comment.
+
+ * WebCoreSupport/WebFrameBridge.h: Removed.
+ * WebCoreSupport/WebFrameBridge.mm: Removed.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::frameLoaderDestroyed): Removed bridge assertion.
+ (WebFrameLoaderClient::detachedFromParent4): Removed bridge teardown code.
+ I could remove this function entirely, but it looks like the Qt port is using it.
+
+ * WebCoreSupport/WebViewFactory.mm: Removed unneeded import.
+
+ * WebView/WebArchiver.mm:
+ (+[WebArchiver archiveRange:]): Use WebFrame rather than bridge.
+ (+[WebArchiver archiveNode:]): Ditto.
+ (+[WebArchiver archiveSelectionInFrame:]): Ditto.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): Ditto.
+ (-[WebDataSource _documentFragmentWithArchive:]): Ditto.
+ (-[WebDataSource subresources]): Ditto.
+ (-[WebDataSource subresourceForURL:]): Ditto.
+
+ * WebView/WebDataSourceInternal.h: Removed _bridge method.
+
+ * WebView/WebFrame.mm:
+ (-[WebFramePrivate dealloc]): Removed code to release the bridge.
+ (core): Go directly to the core frame, not via the bridge.
+ (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
+ Remove the code to deal with the bridge.
+ (-[WebFrame _initWithWebFrameView:webView:]): Ditto. Also added code to set the
+ shouldCreateRenderers flag, formerly on the bridge.
+ (-[WebFrame _updateBackground]): Change to call mehods on self, not bridge.
+ (aeDescFromJSValue): Moved here from bridge.
+ (-[WebFrame _domain]): Ditto.
+ (-[WebFrame _addData:]): Ditto.
+ (-[WebFrame _stringWithDocumentTypeStringAndMarkupString:]): Ditto.
+ (-[WebFrame _nodesFromList:]): Ditto.
+ (-[WebFrame _markupStringFromNode:nodes:]): Ditto.
+ (-[WebFrame _markupStringFromRange:nodes:]): Ditto.
+ (-[WebFrame _selectedString]): Ditto.
+ (-[WebFrame _stringForRange:]): Ditto.
+ (-[WebFrame _forceLayoutAdjustingViewSize:]): Ditto.
+ (-[WebFrame _forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Ditto.
+ (-[WebFrame _sendScrollEvent]): Ditto.
+ (-[WebFrame _drawRect:]): Ditto.
+ (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]): Ditto.
+ (-[WebFrame _adjustPageHeightNew:top:bottom:limit:]): Ditto.
+ (-[WebFrame _copyRenderNode:copier:]): Ditto.
+ (-[WebFrame _copyRenderTree:]): Ditto.
+ (inputElementFromDOMElement): Ditto.
+ (formElementFromDOMElement): Ditto.
+ (-[WebFrame _elementWithName:inForm:]): Ditto.
+ (-[WebFrame _elementDoesAutoComplete:]): Ditto.
+ (-[WebFrame _elementIsPassword:]): Ditto.
+ (-[WebFrame _formForElement:]): Ditto.
+ (-[WebFrame _currentForm]): Ditto.
+ (-[WebFrame _controlsInForm:]): Ditto.
+ (-[WebFrame _searchForLabels:beforeElement:]): Ditto.
+ (-[WebFrame _matchLabels:againstElement:]): Ditto.
+ (-[WebFrame _URLWithAttributeString:]): Ditto.
+ (-[WebFrame _searchFor:direction:caseSensitive:wrap:startInSelection:]): Ditto.
+ (-[WebFrame _markAllMatchesForText:caseSensitive:limit:]): Ditto.
+ (-[WebFrame _markedTextMatchesAreHighlighted]): Ditto.
+ (-[WebFrame _setMarkedTextMatchesAreHighlighted:]): Ditto.
+ (-[WebFrame _unmarkAllTextMatches]): Ditto.
+ (-[WebFrame _rectsForTextMatches]): Ditto.
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:]): Ditto.
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): Ditto.
+ (-[WebFrame _aeDescByEvaluatingJavaScriptFromString:]): Ditto.
+ (-[WebFrame _caretRectAtNode:offset:affinity:]): Ditto.
+ (-[WebFrame _firstRectForDOMRange:]): Ditto.
+ (-[WebFrame _scrollDOMRangeToVisible:]): Ditto.
+ (-[WebFrame _baseURL]): Ditto.
+ (-[WebFrame _stringWithData:]): Ditto.
+ (+[WebFrame _stringWithData:textEncodingName:]): Ditto.
+ (-[WebFrame _needsLayout]): Ditto.
+ (-[WebFrame _renderTreeAsExternalRepresentation]): Ditto.
+ (-[WebFrame _accessibilityTree]): Ditto.
+ (-[WebFrame _setBaseBackgroundColor:]): Ditto.
+ (-[WebFrame _setDrawsBackground:]): Ditto.
+ (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
+ Ditto.
+ (-[WebFrame _selectionGranularity]): Ditto.
+ (-[WebFrame _convertToNSRange:]): Ditto.
+ (-[WebFrame _convertToDOMRange:]): Ditto.
+ (-[WebFrame _convertNSRangeToDOMRange:]): Ditto.
+ (-[WebFrame _convertDOMRangeToNSRange:]): Ditto.
+ (-[WebFrame _markDOMRange]): Ditto.
+ (-[WebFrame _markedTextNSRange]): Ditto.
+ (-[WebFrame _smartDeleteRangeForProposedRange:]): Ditto.
+ (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
+ (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Ditto.
+ (-[WebFrame _documentFragmentWithText:inContext:]): Ditto.
+ (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): Ditto.
+ (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): Ditto.
+ (-[WebFrame _replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]): Ditto.
+ (-[WebFrame _replaceSelectionWithMarkupString:baseURLString:selectReplacement:smartReplace:]): Ditto.
+ (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): Ditto.
+ (-[WebFrame _insertParagraphSeparatorInQuotedContent]): Ditto.
+ (-[WebFrame _visiblePositionForPoint:]): Ditto.
+ (-[WebFrame _characterRangeAtPoint:]): Ditto.
+ (-[WebFrame _typingStyle]): Ditto.
+ (-[WebFrame _setTypingStyle:withUndoAction:]): Ditto.
+ (-[WebFrame _fontForSelection:]): Ditto.
+ (-[WebFrame _dragSourceMovedTo:]): Ditto.
+ (-[WebFrame _dragSourceEndedAt:operation:]): Ditto.
+ (-[WebFrame _getData:andResponse:forURL:]): Ditto.
+ (-[WebFrame _getAllResourceDatas:andResponses:]): Ditto.
+ (-[WebFrame _canProvideDocumentSource]): Ditto.
+ (-[WebFrame _canSaveAsWebArchive]): Ditto.
+ (-[WebFrame _receivedData:textEncodingName:]): Ditto.
+ (-[WebFrame _setShouldCreateRenderers:]): Put the code from the bridge in this preexisting
+ function. Couldn't just keep the bridge method because this was already here with the same name.
+ (-[WebFrame _selectedNSRange]): Ditto.
+ (-[WebFrame _selectNSRange:]): Ditto.
+ (-[WebFrame dealloc]): Remove bridge-related code.
+ (-[WebFrame finalize]): Ditto.
+
+ * WebView/WebFrameInternal.h: Added all the method declarations from the bridge.
+ Removed the bridge parameter from the init method. Removed the #if blocks that
+ tried to make this header work in non-C++ ObjC files -- they were broken and unused.
+ Removed the _bridge method.
+
+ * WebView/WebFrameView.mm: Removed the _bridge method.
+
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation setDataSource:]): Removed the code to set up the bridge
+ field.
+ (-[WebHTMLRepresentation receivedData:withDataSource:]): Use WebFrame instead of bridge.
+ (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): Ditto.
+ (-[WebHTMLRepresentation canProvideDocumentSource]): Ditto.
+ (-[WebHTMLRepresentation canSaveAsWebArchive]): Ditto.
+ (-[WebHTMLRepresentation documentSource]): Ditto.
+ (-[WebHTMLRepresentation DOMDocument]): Ditto.
+ (-[WebHTMLRepresentation elementWithName:inForm:]): Ditto.
+ (-[WebHTMLRepresentation elementDoesAutoComplete:]): Ditto.
+ (-[WebHTMLRepresentation elementIsPassword:]): Ditto.
+ (-[WebHTMLRepresentation formForElement:]): Ditto.
+ (-[WebHTMLRepresentation currentForm]): Ditto.
+ (-[WebHTMLRepresentation controlsInForm:]): Ditto.
+ (-[WebHTMLRepresentation searchForLabels:beforeElement:]): Ditto.
+ (-[WebHTMLRepresentation matchLabels:againstElement:]): Ditto.
+
+ * WebView/WebHTMLRepresentationPrivate.h: Removed the _bridge method.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _documentFragmentWithPaths:]): Use WebFrame instead of bridge.
+ (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Ditto.
+ (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Ditto.
+ (-[WebHTMLView _updateTextSizeMultiplier]): Ditto.
+ (-[WebHTMLView _frameOrBoundsChanged]): Ditto.
+ (-[WebHTMLView _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
+ (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): Ditto.
+ (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Ditto.
+ (-[WebHTMLView drawSingleRect:]): Ditto.
+ (-[WebHTMLView draggedImage:movedTo:]): Ditto.
+ (-[WebHTMLView draggedImage:endedAt:operation:]): Ditto.
+ (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Ditto.
+ (-[WebHTMLView knowsPageRange:]): Ditto.
+ (-[WebHTMLView accessibilityAttributeValue:]): Ditto.
+ (-[WebHTMLView accessibilityFocusedUIElement]): Ditto.
+ (-[WebHTMLView accessibilityHitTest:]): Ditto.
+ (-[WebHTMLView _accessibilityParentForSubview:]): Ditto.
+ (-[WebHTMLView changeDocumentBackgroundColor:]): Ditto.
+ (-[WebHTMLView _changeWordCaseWithSelector:]): Ditto.
+ (-[WebHTMLView _changeSpellingToWord:]): Ditto.
+ (-[WebHTMLView startSpeaking:]): Ditto.
+ (-[WebHTMLView _updateFontPanel]): Ditto.
+ (-[WebHTMLView _canSmartCopyOrDelete]): Ditto.
+ (-[WebHTMLView _layoutIfNeeded]): Ditto.
+ (-[WebHTMLView characterIndexForPoint:]): Ditto.
+ (-[WebHTMLView firstRectForCharacterRange:]): Ditto.
+ (-[WebHTMLView selectedRange]): Ditto.
+ (-[WebHTMLView markedRange]): Ditto.
+ (-[WebHTMLView attributedSubstringFromRange:]): Ditto.
+ (-[WebHTMLView setMarkedText:selectedRange:]): Ditto.
+ (-[WebHTMLView insertText:]): Ditto.
+ (-[WebTextCompleteController _insertMatch:]): Ditto.
+ (-[WebTextCompleteController doCompletion]): Ditto.
+ (-[WebTextCompleteController endRevertingChange:moveLeft:]): Ditto.
+ (-[WebHTMLView string]): Ditto.
+ (-[WebHTMLView selectedString]): Ditto.
+ (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]): Ditto.
+ (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Ditto.
+ (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]): Ditto.
+ (-[WebHTMLView markedTextMatchesAreHighlighted]): Ditto.
+ (-[WebHTMLView unmarkAllTextMatches]): Ditto.
+ (-[WebHTMLView rectsForTextMatches]): Ditto.
+ * WebView/WebRenderNode.mm:
+ (-[WebRenderNode initWithWebFrameView:]): Ditto.
+ * WebView/WebResource.mm:
+ (-[WebResource _stringValue]): Ditto.
+
+ * WebView/WebScriptDebugDelegate.mm: Removed unneeded include.
+
+ * WebView/WebView.mm:
+ (-[WebView _dashboardRegions]): Use WebFrame instead of bridge.
+ (-[WebView setProhibitsMainFrameScrolling:]): Ditto.
+ (-[WebView _setInViewSourceMode:]): Ditto.
+ (-[WebView _inViewSourceMode]): Ditto.
+ (-[WebView _executeCoreCommandByName:value:]): Ditto.
+ (-[WebView stringByEvaluatingJavaScriptFromString:]): Ditto.
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto.
+ (-[WebView scrollDOMRangeToVisible:]): Ditto.
+ (-[WebView setSelectedDOMRange:affinity:]): Ditto.
+ (-[WebView setEditable:]): Ditto.
+ (-[WebView setTypingStyle:]): Ditto.
+ (-[WebView typingStyle]): Ditto.
+ (-[WebView replaceSelectionWithNode:]): Ditto.
+ (-[WebView replaceSelectionWithText:]): Ditto.
+ (-[WebView replaceSelectionWithMarkupString:]): Ditto.
+ (-[WebView replaceSelectionWithArchive:]): Ditto.
+ (-[WebView _insertNewlineInQuotedContent]): Ditto.
+ (-[WebView _replaceSelectionWithNode:matchStyle:]): Ditto.
+
+2008-03-12 David Hyatt <hyatt@apple.com>
+
+ Make the zoom factor a float and not a percent.
+
+ Reviewed by antti
+
+ * WebView/WebView.mm:
+ (-[WebView _setZoomMultiplier:isTextOnly:]):
+
+2008-03-11 David Hyatt <hyatt@apple.com>
+
+ This patch prepares Mac WebKit to handle two different zooming modes (full page zoom and text only zoom).
+ New API is added that is parallel to the text zoom public API. You can get/set a pageSizeMultiplier and you
+ can zoom the page in, out or reset it to the standard size.
+
+ In the implementation only one zoom factor is stored, and setting one multiplier will shift you into that mode
+ and set the common zoom factor. In other words you can't combine text zoom and page zoom. One will always
+ win.
+
+ Reviewed by Tim H.
+
+ * WebCoreSupport/WebFrameBridge.mm:
+ (-[WebFrameBridge finishInitializingWithPage:frameName:WebCore::frameView:ownerElement:]):
+ * WebView/WebDocumentInternal.h:
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView viewDidMoveToSuperview]):
+ * WebView/WebPDFView.h:
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView _zoomOut:]):
+ (-[WebPDFView _zoomIn:]):
+ (-[WebPDFView _resetZoom:]):
+ (-[WebPDFView _canZoomOut]):
+ (-[WebPDFView _canZoomIn]):
+ (-[WebPDFView _canResetZoom]):
+ * WebView/WebView.mm:
+ (-[WebViewPrivate init]):
+ (-[WebView setTextSizeMultiplier:]):
+ (-[WebView textSizeMultiplier]):
+ (-[WebView _setZoomMultiplier:isTextOnly:]):
+ (-[WebView _zoomMultiplier:]):
+ (-[WebView _realZoomMultiplier]):
+ (-[WebView _realZoomMultiplierIsTextOnly]):
+ (-[WebView _canZoomOut:]):
+ (-[WebView _canZoomIn:]):
+ (-[WebView _zoomOut:isTextOnly:]):
+ (-[WebView _zoomIn:isTextOnly:]):
+ (-[WebView _canResetZoom:]):
+ (-[WebView _resetZoom:isTextOnly:]):
+ (-[WebView canMakeTextSmaller]):
+ (-[WebView makeTextSmaller:]):
+ (-[WebView canMakeTextLarger]):
+ (-[WebView makeTextLarger:]):
+ (-[WebView canMakeTextStandardSize]):
+ (-[WebView makeTextStandardSize:]):
+ (-[WebView setPageSizeMultiplier:]):
+ (-[WebView pageSizeMultiplier]):
+ (-[WebView canZoomPageIn]):
+ (-[WebView zoomPageIn:]):
+ (-[WebView canZoomPageOut]):
+ (-[WebView zoomPageOut:]):
+ (-[WebView canResetPageZoom]):
+ (-[WebView resetPageZoom:]):
+ (-[WebView _searchWithSpotlightFromMenu:]):
+ * WebView/WebViewInternal.h:
+ * WebView/WebViewPrivate.h:
+
+2008-03-12 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler and Sam Weinig.
+
+ - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Made WKGetCGFontFromNSFont and
+ WKGetNSFontATSUFontId Tiger-only.
+
+2008-03-12 Darin Adler <darin@apple.com>
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=17794
+ REGRESSION (r30980): 23 tests hanging on the Mac buildbot
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _initWithWebFrameView:webView:bridge:]): Added missing call to set
+ up pointer from the bridge to the frame. (My next check-in removes the bridge
+ entirely, but we need this until then.)
+
+2008-03-11 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam.
+
+ - remove all bridge-related things from WebCore except the bridge itself
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMNode _bridge]): Reimplemented to not use the bridgeForDOMDocument: method.
+
+ * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Removed unneeded include.
+
+ * Plugins/WebPluginController.mm: Ditto.
+
+ * WebCoreSupport/WebFrameBridge.h: Removed unneeded things, including the
+ init and close methods. Added a setWebFrame: method.
+
+ * WebCoreSupport/WebFrameBridge.mm:
+ (-[WebFrameBridge setWebFrame:]): Added.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::frameLoaderDestroyed): Added an assertion.
+ (WebFrameLoaderClient::detachedFromParent4): Moved the call to close on the
+ bridge here. Soon we will be able to remove this entirely!
+ (WebFrameLoaderClient::createFrame): Rewrote this to use the method moved
+ into WebFrame from the bridge.
+
+ * WebView/WebFrame.mm:
+ (-[WebFramePrivate dealloc]): Added code to release the bridge, because it's
+ now owned by the frame.
+ (-[WebFramePrivate finalize]): Added this missing method. We'd leak the script
+ debugger under GC without this!
+ (kit): Rewrote the function that maps from a WebCore::Frame to a WebFrame to
+ use WebFrameLoaderClient instead of the bridge.
+ (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): Added.
+ This is code that used to live in the bridge's init function.
+ (+[WebFrame _createMainFrameWithPage:frameName:frameView:]): Ditto.
+ (+[WebFrame WebCore::_createSubframeWithOwnerElement:frameName:frameView:]): Ditto.
+ (-[WebFrame _initWithWebFrameView:webView:bridge:]): Retain the bridge, since
+ the WebView is now the bridge's owner.
+ (-[WebFrame _updateBackground]): Changed this one call site that was calling the
+ WebCore::Frame::bridge function directly to use the kit function instead.
+ (-[WebFrame dealloc]): Added code to clear the WebFrame pointer in the bridge.
+ This code won't last long -- we're eliminating the bridge soon.
+ (-[WebFrame finalize]): Ditto.
+
+ * WebView/WebFrameInternal.h: Added a coreFrame backpointer and two new methods
+ for creating frames.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]): Rewrote this to use
+ the method moved into WebFrame from the bridge. Gets rid of the unpleasant idiom
+ where we have to allocate a WebFrameBridge and then immediately release it.
+
+2008-03-11 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders.
+
+ - remove code depending on the bridge to get from an NSView to a WebCore::Frame
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage): Remove incorrect call
+ to setView. A couple lines later, there is a call to _install, which sets the
+ view to the scroll view.
+
+ * WebCoreSupport/WebViewFactory.mm: Removed bridgeForView method.
+
+ * WebView/WebDynamicScrollBarsView.h: Moved most of the declarations out of
+ this file, since it's used by Safari.
+ * WebView/WebDynamicScrollBarsViewInternal.h: Added.
+ * WebView/WebDynamicScrollBarsView.m:
+ (-[WebDynamicScrollBarsView updateScrollers]): Ditto.
+ (-[WebDynamicScrollBarsView setAllowsScrolling:]): Ditto.
+ (-[WebDynamicScrollBarsView allowsScrolling]): Ditto.
+ (-[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]): Ditto.
+ (-[WebDynamicScrollBarsView setAllowsVerticalScrolling:]): Ditto.
+ (-[WebDynamicScrollBarsView allowsHorizontalScrolling]): Ditto.
+ (-[WebDynamicScrollBarsView allowsVerticalScrolling]): Ditto.
+ (-[WebDynamicScrollBarsView horizontalScrollingMode]): Ditto.
+ (-[WebDynamicScrollBarsView verticalScrollingMode]): Ditto.
+ (-[WebDynamicScrollBarsView setHorizontalScrollingMode:]): Ditto.
+ (-[WebDynamicScrollBarsView setHorizontalScrollingMode:andLock:]): Ditto.
+ (-[WebDynamicScrollBarsView setVerticalScrollingMode:]): Ditto.
+ (-[WebDynamicScrollBarsView setVerticalScrollingMode:andLock:]): Ditto.
+ (-[WebDynamicScrollBarsView setScrollingMode:]): Ditto.
+ (-[WebDynamicScrollBarsView setScrollingMode:andLock:]): Ditto.
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _web_frame]): Added. Replaces the webCoreBridge method.
+
+ * WebView/WebView.mm:
+ (-[WebView setAlwaysShowVerticalScroller:]): Updated for changes to WebCoreFrameView.h.
+ (-[WebView alwaysShowVerticalScroller]): Ditto.
+ (-[WebView setAlwaysShowHorizontalScroller:]): Ditto.
+ (-[WebView alwaysShowHorizontalScroller]): Ditto.
+
+2008-03-11 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam.
+
+ - eliminate the remaining parts of WebCoreBridge used for calls to WebKit from WebCore
+
+ * WebCoreSupport/WebChromeClient.h: Added new virtual functions that replace
+ bridge methods.
+ * WebCoreSupport/WebChromeClient.mm: Added lots of BEGIN_BLOCK_OBJC_EXCEPTIONS
+ to recently-created functions.
+ (WebChromeClient::firstResponder): Moved code here from the bridge.
+ (WebChromeClient::makeFirstResponder): Ditto.
+ (WebChromeClient::runOpenPanel): Ditto.
+ (WebChromeClient::willPopUpMenu): Ditto.
+
+ * WebCoreSupport/WebFrameBridge.h: Removed almost everything. What's left
+ is related to creating the bridge and connecting it to WebCore, which will
+ go next when I eliminate use of the bridge to get to/from the Frame*.
+ * WebCoreSupport/WebFrameBridge.mm:
+ (-[WebFrameBridge close]): Moved the code to track the bridge count here
+ instead of the dealloc and finalize methods.
+
+2008-03-11 Darin Adler <darin@apple.com>
+
+ Reviewed by Mitz.
+
+ - update code affected by Range changes
+
+ * Misc/WebNSAttributedStringExtras.mm:
+ (+[NSAttributedString _web_attributedStringFromRange:]): Update for name changes.
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]):
+ Use Range::create.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView attributedString]): Ditto.
+
+2008-03-10 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam.
+
+ - eliminate keyboard UI mode method from WebCoreFrameBridge
+
+ * WebCoreSupport/WebChromeClient.h: Added keyboardUIMode function.
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::keyboardUIMode): Ditto. Calls WebView.
+ * WebCoreSupport/WebFrameBridge.h: Removed unused things, including the
+ fields for keyboard UI mode.
+ * WebCoreSupport/WebFrameBridge.mm:
+ (-[WebFrameBridge dealloc]): Removed unneeded code; eliminated the fini
+ method.
+ (-[WebFrameBridge finalize]): Ditto.
+ * WebView/WebView.mm: Moved the keyboard mode code in here.
+ (-[WebView _close]): Remove observer from the distributed notification
+ center as well as the normal one.
+ (-[WebView _retrieveKeyboardUIModeFromPreferences:]): Added. Code moved
+ here from the bridge.
+ (-[WebView _keyboardUIMode]): Ditto.
+ * WebView/WebViewInternal.h: Added _keyboardUIMode method.
+
+2008-03-10 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam.
+
+ - eliminate Java applet methods from WebCoreFrameBridge
+
+ * WebCoreSupport/WebChromeClient.mm: Removed unneeded headers and declarations.
+ * WebCoreSupport/WebFrameBridge.mm: Ditto. Also removed unneeded methods, including
+ the ones that load Java applets.
+ * WebCoreSupport/WebFrameLoaderClient.h: Added javaApplet function.
+ * WebCoreSupport/WebFrameLoaderClient.mm: Ditto.
+
+2008-03-07 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Done with Lars.
+
+ Simplified WebViewFactory's refreshPlugins method to only refresh the
+ plugins and not reload the frames anymore since that's now done in a
+ platform independent manner by WebCore::Page.
+
+ Also removed the now unused pluginNameForMIMEType and
+ pluginSupportsMIMEType methods.
+
+ * WebCoreSupport/WebViewFactory.mm:
+ * WebView/WebFrame.mm:
+ * WebView/WebFrameInternal.h:
+ * WebView/WebView.mm:
+
+2008-03-08 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix 64-bit build with GCC 4.2.
+
+ * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Use NSUInteger in place of unsigned where required.
+ * DefaultDelegates/WebDefaultUIDelegate.m: Ditto.
+ * History/WebHistoryItem.mm: Ditto.
+ * Misc/WebElementDictionary.mm: Ditto.
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::objectContentType): Move variable declaration outside of if to avoid warning about the
+ variable being unused in 64-bit.
+ * WebCoreSupport/WebInspectorClient.mm: Use NSUInteger in place of unsigned where required.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Use CGFloat in place of float where required.
+ (-[WebTextCompleteController numberOfRowsInTableView:]): Use NSInteger in place of int where required.
+
+2008-03-08 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele.
+
+ - eliminate custom highlight methods from WebCoreFrameBridge
+
+ * WebCoreSupport/WebChromeClient.h: Added custom highlight functions.
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::customHighlightRect): Moved code here from bridge.
+ (WebChromeClient::paintCustomHighlight): Ditto.
+ * WebCoreSupport/WebFrameBridge.mm: Removed code here.
+
+2008-03-07 David D. Kilzer <ddkilzer@apple.com>
+
+ Unify concept of enabling Netscape Plug-in API (NPAPI).
+
+ Reviewed by Darin Adler.
+
+ * WebKit.exp: Removed unused class export for WebBaseNetscapePluginView.
+
+ * WebKitPrefix.h: Removed WTF_USE_NPOBJECT since we now use
+ ENABLE(NETSCAPE_PLUGIN_API) as defined in Platform.h.
+
+ * Plugins/WebBaseNetscapePluginStream.h: Replaced #ifndef __LP64__ with
+ #if ENABLE(NETSCAPE_PLUGIN_API).
+ * Plugins/WebBaseNetscapePluginStream.mm: Ditto.
+ * Plugins/WebBaseNetscapePluginView.h: Ditto.
+ * Plugins/WebBaseNetscapePluginView.mm: Ditto.
+ * Plugins/WebBaseNetscapePluginViewInternal.h: Ditto.
+ * Plugins/WebBaseNetscapePluginViewPrivate.h: Ditto.
+ * Plugins/WebBasePluginPackage.h: Ditto.
+ * Plugins/WebBasePluginPackage.m: Ditto.
+ (+[WebBasePluginPackage pluginWithPath:]):
+ * Plugins/WebNetscapeDeprecatedFunctions.c: Ditto.
+ * Plugins/WebNetscapeDeprecatedFunctions.h: Ditto.
+ * Plugins/WebNetscapePluginEmbeddedView.h: Ditto.
+ * Plugins/WebNetscapePluginEmbeddedView.mm: Ditto.
+ * Plugins/WebNetscapePluginPackage.h: Ditto.
+ * Plugins/WebNetscapePluginPackage.m: Ditto.
+ * Plugins/WebNetscapePluginStream.h: Ditto.
+ * Plugins/WebNetscapePluginStream.mm: Ditto.
+ * Plugins/WebPluginDatabase.m: Ditto.
+ (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
+ * Plugins/npapi.m: Ditto.
+ * WebCoreSupport/WebFrameLoaderClient.mm: Ditto.
+ (WebFrameLoaderClient::objectContentType):
+ (WebFrameLoaderClient::createPlugin):
+ * WebView/WebHTMLView.mm: Ditto.
+ (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
+ * WebView/WebHTMLViewInternal.h: Ditto.
+
+ * WebView/WebFrame.mm: Replaced #ifndef __LP64__ with
+ #if ENABLE(NETSCAPE_PLUGIN_API). Moved methods below from (WebPrivate)
+ category to (WebInternal) category so we don't expose the ENABLE() macro
+ from the private header.
+ (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
+ (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
+ * WebView/WebFrameInternal.h: Ditto.
+ * WebView/WebFramePrivate.h: Ditto.
+
+2008-03-07 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5579292> REGRESSION: (safari 2-3): "Default default" encoding for Korean
+ changed from Korean (Windows, DOS) to Korean (ISO 2022-KR), which breaks some sites
+
+ * WebView/WebPreferences.m:
+ (+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]): Make encoding name match
+ the one used in Safari.
+
+2008-03-07 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix WebKit build with GCC 4.2.
+
+ * Plugins/WebBaseNetscapePluginView.mm: Use the correct return type in method signature.
+
+2008-03-07 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam.
+
+ - eliminated WebCoreFrameBridge runOpenPanel
+
+ * WebCoreSupport/WebChromeClient.h: Added runOpenPanel.
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::runOpenPanel): Added.
+ (-[WebOpenPanelResultListener initWithChooser:]): Added. Used to wrap the
+ FileChooser so it can get a result from the UI delegate.
+ (-[WebOpenPanelResultListener dealloc]): Added.
+ (-[WebOpenPanelResultListener finalize]): Added.
+ (-[WebOpenPanelResultListener cancel]): Added.
+ (-[WebOpenPanelResultListener chooseFilename:]): Added.
+
+2008-03-06 Darin Adler <darin@apple.com>
+
+ Reviewed by Mitz.
+
+ - fix regression test failures from the visited-link change
+
+ * History/WebHistory.mm:
+ (+[WebHistory setOptionalSharedHistory:]): Call PageGroup::setShouldTrackVisitedLinks
+ to turn off visited links if there is no history object. Also call
+ removeAllVisitedLinks so we can start over from scratch with the new history.
+
+2008-03-06 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - fix a regression from r30741: a crash under
+ WebFrameLoaderClient::createPlugin() when showing a Mail message with
+ an attachment
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin):
+
+2008-03-06 Darin Adler <darin@apple.com>
+
+ - fix Tiger build
+
+ * History/WebHistory.mm: Added include of WebTypesInternal.h.
+
+2008-03-06 Darin Adler <darin@apple.com>
+
+ - fix Release build
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate setLastVisitedTimeInterval:forItem:]): Removed underscore.
+ (-[WebHistoryPrivate loadFromURL:collectDiscardedItemsInto:error:]): Added #if.
+ (-[WebHistoryPrivate saveToURL:error:]): Ditto.
+
+2008-03-06 Darin Adler <darin@apple.com>
+
+ Reviewed by Mitz.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=17526
+ REGRESSION: iframes are added to Safari's History menu
+ by separating the visited link machinery from global history
+
+ * History/WebHistory.mm: Moved WebHistoryPrivate inside this file.
+ (-[WebHistoryPrivate removeItemFromDateCaches:]): Removed the underscore from this
+ method name, since it's on a private object.
+ (-[WebHistoryPrivate removeItemForURLString:]): Added a call to the
+ PageGroup::removeAllVisitedLinks function if the last URL was removed.
+ (-[WebHistoryPrivate addItemToDateCaches:]): Removed the underscore from this
+ method name, since it's on a private object.
+ (-[WebHistoryPrivate removeAllItems]): Call PageGroup::removeAllVisitedLinks.
+ (-[WebHistoryPrivate ageLimitDate]): Removed the underscore from this
+ method name, since it's on a private object.
+ (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
+ Ditto.
+ (-[WebHistoryPrivate saveHistoryGuts:URL:error:]): Ditto. Also changed this
+ to correctly return the error by using the newer version of writeToURL: and
+ removed the FIXME about that.
+ (-[WebHistoryPrivate addVisitedLinksToPageGroup:]): Added. Calls addVisitedLink
+ for every link in the history.
+ (-[WebHistory saveToURL:error:]): Removed the FIXME, since we do get the error now.
+ (-[WebHistory addItem:]): Moved into the WebPrivate category.
+ (-[WebHistory addItemForURL:]): Ditto.
+ (-[WebHistory _addItemForURL:title:]): Added. Used for the normal case where we
+ create an item and already know its title.
+ (-[WebHistory ageLimitDate]): Moved into the WebPrivate category.
+ (-[WebHistory containsItemForURLString:]): Ditto.
+ (-[WebHistory removeItem:]): Ditto.
+ (-[WebHistory setLastVisitedTimeInterval:forItem:]): Ditto.
+ (-[WebHistory _itemForURLString:]): Ditto.
+ (-[WebHistory _addVisitedLinksToPageGroup:]): Added. For use only inside WebKit.
+
+ * History/WebHistoryInternal.h: Added.
+ * History/WebHistoryItemInternal.h: Tweaked formatting and includes.
+ * History/WebHistoryPrivate.h: Moved the WebHistoryPrivate class out of this header.
+ Also reorganized what was left behind.
+
+ * WebCoreSupport/WebChromeClient.h: Added populateVisitedLinks.
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::populateVisitedLinks): Added a call to the new
+ -[WebHistory _addVisitedLinksToPageGroup:] method.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::updateGlobalHistory): Changed code to use the new
+ -[WebHistory _addItemForURL:title:] method.
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Rename WebCoreScriptDebuggerImp.{h,mm} to WebScriptDebugger.{h,mm}
+
+ Reviewed by Kevin M.
+
+ * WebView/WebFrame.mm:
+ * WebView/WebScriptDebugDelegate.mm:
+ * WebView/WebScriptDebugger.h: Renamed from WebKit/mac/WebView/WebCoreScriptDebuggerImp.h.
+ * WebView/WebScriptDebugger.mm: Renamed from WebKit/mac/WebView/WebCoreScriptDebuggerImp.mm.
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Rename WebCoreScriptDebuggerImp to WebScriptDebugger
+
+ Reviewed by Kevin M.
+
+ * WebView/WebCoreScriptDebuggerImp.h:
+ * WebView/WebCoreScriptDebuggerImp.mm:
+ * WebView/WebFrame.mm:
+ (-[WebFrame _attachScriptDebugger]):
+ * WebView/WebFrameInternal.h:
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Remove WebScriptDebugger
+
+ Uses of WebScriptDebugger have been replaced with
+ WebCoreScriptDebuggerImp.
+
+ Reviewed by Kevin M.
+
+ * WebView/WebFrame.mm:
+ (-[WebFramePrivate dealloc]): Use delete instead of release since
+ WebCoreScriptDebuggerImp is a C++ class.
+ (-[WebFrame _attachScriptDebugger]): Updated to use early returns and
+ WebCoreScriptDebuggerImp.
+ (-[WebFrame _detachScriptDebugger]): Ditto.
+ * WebView/WebFrameInternal.h:
+ * WebView/WebScriptDebugDelegate.mm: Removed WebScriptDebugger
+ * WebView/WebScriptDebugDelegatePrivate.h: Removed.
+ * WebView/WebView.mm:
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Remove -webFrame and -globalObject from WebScriptDebugger
+
+ WebCoreScriptDebuggerImp is now unaware of WebScriptDebugger
+
+ Reviewed by Kevin M.
+
+ * WebView/WebCoreScriptDebuggerImp.h: Removed WebScriptDebugger*
+ parameter to the constructor.
+ * WebView/WebCoreScriptDebuggerImp.mm:
+ (toWebFrame): Added.
+ (WebCoreScriptDebuggerImp::sourceParsed): Call toWebFrame.
+ (WebCoreScriptDebuggerImp::callEvent): Ditto, and get the Frame's
+ WindowScriptObject ourselves instead of asking WebScriptDebugger for
+ it.
+ (WebCoreScriptDebuggerImp::atStatement): Call toWebFrame.
+ (WebCoreScriptDebuggerImp::returnEvent): Ditto.
+ (WebCoreScriptDebuggerImp::exception): Ditto.
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptDebugger initWithWebFrame:]): Updated for change to
+ WebScriptDebuggerImp's constructor.
+ * WebView/WebScriptDebugDelegatePrivate.h: Removed
+ -webFrame/-globalObject.
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Remove -enterFrame: and -leaveFrame from WebScriptDebugger
+
+ Reviewed by Kevin M.
+
+ * WebView/WebCoreScriptDebuggerImp.h: Changed to store m_topCallFrame
+ in a RetainPtr, now that WebCoreScriptDebuggerImp is in charge of its
+ lifetime.
+ * WebView/WebCoreScriptDebuggerImp.mm:
+ - Added declaration of -[WebScriptCallFrame
+ _initWithGlobalObject:caller:state:].
+ - Changed most uses of m_topCallFrame to m_topCallFrame.get()
+ (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp): Removed
+ now-unnecessary initialization of m_topCallFrame.
+ (WebCoreScriptDebuggerImp::callEvent): Replaced call to enterFrame:
+ with its implementation. The one difference between this
+ implementation and the old enterFrame: method is that we don't hand
+ our reference to m_topCallFrame to _initWithGlobalObject: -- that
+ method must now retain the passed-in WebScriptCallFrame manually.
+ (WebCoreScriptDebuggerImp::atStatement):
+ (WebCoreScriptDebuggerImp::returnEvent): Replaced call to leaveFrame
+ with its implementation.
+ (WebCoreScriptDebuggerImp::exception):
+ * WebView/WebScriptDebugDelegate.mm: Removed declaration of
+ -[WebScriptCallFrame _initWithGlobalObject:caller:state:].
+ (-[WebScriptCallFrame _initWithGlobalObject:caller:state:]): Changed
+ to retain the passed-in caller.
+ * WebView/WebScriptDebugDelegatePrivate.h:
+ - Removed _current ivar
+ - Removed enterFrame:/leaveFrame declarations.
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Remove -parsedSource: from WebScriptDebugger
+
+ Reviewed by Kevin M.
+
+ * WebView/WebCoreScriptDebuggerImp.mm:
+ (WebCoreScriptDebuggerImp::sourceParsed): Moved code here from
+ -[WebScriptDebugger parsedSource:fromURL:sourceId:startLine:errorLine:errorMessage:]
+ * WebView/WebScriptDebugDelegate.mm: Removed -parsedSource:.
+ * WebView/WebScriptDebugDelegatePrivate.h: Ditto.
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Remove -enteredFrame:, -leavingFrame:, and -exceptionRaised: from WebScriptDebugger
+
+ Reviewed by Kevin M.
+
+ * WebView/WebCoreScriptDebuggerImp.mm:
+ (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp): Changed to call
+ trhough to callEvent instead of duplicating its code here.
+ (WebCoreScriptDebuggerImp::callEvent): Moved code from
+ -[WebScriptDebugger enteredFrame:sourceId:line:] here.
+ (WebCoreScriptDebuggerImp::returnEvent): Moved code from
+ -[WebScriptDebugger leavingFrame:sourceId:line:] here.
+ (WebCoreScriptDebuggerImp::exception): Moved code from
+ -[WebScriptDebugger exceptionRaised:sourceId:line:] here.
+ * WebView/WebScriptDebugDelegate.mm: Removed -enteredFrame:,
+ -leavingFrame:, and -exceptionRaised:.
+ * WebView/WebScriptDebugDelegatePrivate.h: Ditto.
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Remove -[WebScriptDebugger hitStatement:sourceId:line:]
+
+ Reviewed by Kevin M.
+
+ * WebView/WebCoreScriptDebuggerImp.mm:
+ (WebCoreScriptDebuggerImp::atStatement): Moved code here from
+ -[WebScriptDebugger hitStatement:sourceId:line:].
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptDebugger webFrame]): Added.
+ * WebView/WebScriptDebugDelegatePrivate.h:
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Remove WebCoreScriptDebugger
+
+ Reviewed by Kevin M.
+
+ * WebView/WebCoreScriptDebugger.h: Removed.
+ * WebView/WebCoreScriptDebugger.mm: Removed.
+ * WebView/WebCoreScriptDebuggerImp.h: Replaced WebCoreScriptDebugger
+ with WebScriptDebugger.
+ * WebView/WebCoreScriptDebuggerImp.mm: Ditto, and replaced [m_debugger
+ delegate] with just m_debugger.
+ (toNSString): Moved here from WebCoreScriptDebugger.mm.
+ (toNSURL): Ditto.
+ (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp):
+ (WebCoreScriptDebuggerImp::sourceParsed):
+ (WebCoreScriptDebuggerImp::callEvent):
+ (WebCoreScriptDebuggerImp::atStatement):
+ (WebCoreScriptDebuggerImp::returnEvent):
+ (WebCoreScriptDebuggerImp::exception):
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptDebugger initWithWebFrame:]): _debugger now holds a
+ WebCoreScriptDebuggerImp, so initialize it properly.
+ * WebView/WebScriptDebugDelegatePrivate.h: Changed _debugger to hold a
+ WebCoreScriptDebuggerImp.
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Move WebCoreScriptDebuggerImp to its own source files
+
+ Also changed WebCoreScriptDebuggerImp coding style to match our style
+ guidelines.
+
+ Reviewed by Kevin M.
+
+ * WebView/WebCoreScriptDebugger.h: Added declaration of toNSURL
+ function.
+ * WebView/WebCoreScriptDebugger.mm: Removed WebCoreScriptDebuggerImp
+ implementation.
+ (toNSURL): Made no longer static.
+ * WebView/WebCoreScriptDebuggerImp.h: Added.
+ * WebView/WebCoreScriptDebuggerImp.mm: Added. Code was moved here from
+ WebCoreScriptDebugger.mm and cleaned up.
+ (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp):
+ (WebCoreScriptDebuggerImp::sourceParsed):
+ (WebCoreScriptDebuggerImp::callEvent):
+ (WebCoreScriptDebuggerImp::atStatement):
+ (WebCoreScriptDebuggerImp::returnEvent):
+ (WebCoreScriptDebuggerImp::exception):
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Move -_enterFrame and -_leaveFrame from WebCoreScriptDebugger to WebScriptDebugger
+
+ Reviewed by Kevin M.
+
+ * WebView/WebCoreScriptDebugger.h:
+ - Removed newFrameWithGlobalObject:caller:state: from
+ WebScriptDebugger protocol
+ - Added enterFrame: and leaveFrame: to WebScriptDebugger protocol
+ - Removed _current ivar from WebCoreScriptDebugger
+ * WebView/WebCoreScriptDebugger.mm:
+ (WebCoreScriptDebuggerImp::callEvent): Changed to call enterFrame on
+ the delegate.
+ (WebCoreScriptDebuggerImp::returnEvent): Ditto for leaveFrame.
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptDebugger dealloc]): Added code to release _current.
+ (-[WebScriptDebugger enterFrame:]): Added. Code came from
+ WebCoreScriptDebugger.
+ (-[WebScriptDebugger leaveFrame]): Ditto.
+ * WebView/WebScriptDebugDelegatePrivate.h: Added _current ivar.
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Remove WebCoreScriptCallFrame
+
+ Reviewed by Tim.
+
+ * WebView/WebCoreScriptDebugger.h:
+ - Replaced WebCoreScriptCallFrame with WebScriptCallFrame
+ - Replaced -newWrapperForFrame: with
+ -newFrameWithGlobalObject:caller:state:
+ - Removed WebCoreScriptCallFrame interface.
+ * WebView/WebCoreScriptDebugger.mm: Replaced WebCoreScriptCallFrame
+ with WebScriptCallFrame.
+ (-[WebCoreScriptDebugger _enterFrame:]): Changed to call
+ -newFrameWithGlobalObject:caller:state.
+ (-[WebCoreScriptDebugger _leaveFrame]):
+ * WebView/WebScriptDebugDelegate.h: Changed WebScriptCallFrame's
+ _private ivar to be of type WebScriptCallFramePrivate*.
+ * WebView/WebScriptDebugDelegate.mm:
+ - Replaced WebCoreScriptCallFrame with WebScriptCallFrame
+ - Added WebScriptCallFramePrivate
+ (-[WebScriptDebugger enteredFrame:sourceId:line:]):
+ (-[WebScriptDebugger hitStatement:sourceId:line:]):
+ (-[WebScriptDebugger leavingFrame:sourceId:line:]):
+ (-[WebScriptDebugger exceptionRaised:sourceId:line:]):
+ (-[WebScriptCallFramePrivate dealloc]): Added.
+ (-[WebScriptCallFrame _initWithGlobalObject:caller:state:]): Added.
+ Code came from WebCoreScriptCallFrame.
+ (-[WebScriptCallFrame dealloc]): Added a call to release the _private
+ ivar.
+ (-[WebScriptCallFrame _convertValueToObjcValue:]): Replaced calls to
+ _private with direct access of _private's ivars.
+ (-[WebScriptCallFrame caller]): Ditto.
+ (-[WebScriptCallFrame scopeChain]): Ditto.
+ (-[WebScriptCallFrame evaluateWebScript:]): Ditto.
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Move -_convertValueToObjcValue to WebScriptCallFrame
+
+ Reviewed by Darin Adler.
+
+ * WebView/WebCoreScriptDebugger.h: Removed declaration of
+ -_convertValueToObjcValue.
+ * WebView/WebCoreScriptDebugger.mm: Removed -_convertValueToObjcValue.
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame _convertValueToObjcValue:]): Added. Code came
+ from -[WebCoreScriptCallFrame _convertValueToObjcValue].
+ (-[WebScriptCallFrame scopeChain]): Changed to call
+ -_convertValueToObjcValue on self instead of _private.
+ (-[WebScriptCallFrame exception]): Ditto.
+ (-[WebScriptCallFrame evaluateWebScript:]): Ditto.
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Move -exception and -evaluateWebScript: to WebScriptCallFrame
+
+ Reviewed by Darin Adler.
+
+ * WebView/WebCoreScriptDebugger.h: Removed declarations of -exception
+ and -evaluateWebScript:.
+ * WebView/WebCoreScriptDebugger.mm: Removed -exception and
+ -evaluateWebScript:.
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame exception]): Added. Code came from
+ -[WebCoreScriptCallFrame exception].
+ (-[WebScriptCallFrame evaluateWebScript:]): Added. Code came from
+ -[WebCoreScriptCallFrame evaluateWebScript:].
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Move -scopeChain to WebScriptCallFrame
+
+ Reviewed by Darin Adler.
+
+ * WebView/WebCoreScriptDebugger.h:
+ - Added declarations of -globalObject and -_convertValueToObjcValue:
+ to WebCoreScriptCallFrame
+ - Removed declaration of -scopeChain.
+ * WebView/WebCoreScriptDebugger.mm: Moved -_convertValueToObjcValue
+ within the main WebCoreScriptCallFrame implementation.
+ (-[WebCoreScriptCallFrame globalObject]): Added.
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame scopeChain]): Added. Code came from
+ -[WebCoreScriptCallFrame scopeChain].
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Move -functionName from WebCoreScriptCallFrame to WebScriptCallFrame
+
+ Reviewed by Darin Adler.
+
+ * WebView/WebCoreScriptDebugger.h:
+ - Removed #else case of #ifdef __cplusplus since this file is only
+ ever used by C++ Objective-C files
+ - Removed 'using KJS::ExecState' statement since we prefer not to
+ have using statements in header files
+ - Consequently prefixed uses of ExecState with KJS::
+ - Added declaration of toNSString method that takes a const
+ UString&
+ - Added declaration of -[WebCoreScriptCallFrame state]
+ - Removed declaration of -[WebCoreScriptCallFrame functionName]
+ * WebView/WebCoreScriptDebugger.mm:
+ (toNSString): Made this no longer static.
+ (-[WebCoreScriptCallFrame state]): Added.
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame functionName]): Added. Code came from
+ -[WebCoreScriptCallFrame functionName], though I changed some nested
+ ifs into early returns.
+
+2008-03-05 Adam Roben <aroben@apple.com>
+
+ Move WebCoreScriptDebugger to WebKit
+
+ Reviewed by Darin Adler.
+
+ * WebView/WebCoreScriptDebugger.h: Renamed from WebCore/page/mac/WebCoreScriptDebugger.h.
+ * WebView/WebCoreScriptDebugger.mm: Renamed from WebCore/page/mac/WebCoreScriptDebugger.mm.
+ (toNSString):
+ (toNSURL):
+ (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp):
+ (WebCoreScriptDebuggerImp::sourceParsed):
+ (WebCoreScriptDebuggerImp::callEvent):
+ (WebCoreScriptDebuggerImp::atStatement):
+ (WebCoreScriptDebuggerImp::returnEvent):
+ (WebCoreScriptDebuggerImp::exception):
+ (+[WebCoreScriptDebugger initialize]):
+ (-[WebCoreScriptDebugger initWithDelegate:]):
+ (-[WebCoreScriptDebugger dealloc]):
+ (-[WebCoreScriptDebugger finalize]):
+ (-[WebCoreScriptDebugger delegate]):
+ (-[WebCoreScriptDebugger _enterFrame:]):
+ (-[WebCoreScriptDebugger _leaveFrame]):
+ (-[WebCoreScriptCallFrame _initWithGlobalObject:caller:state:]):
+ (-[WebCoreScriptCallFrame _setWrapper:]):
+ (-[WebCoreScriptCallFrame _convertValueToObjcValue:]):
+ (-[WebCoreScriptCallFrame dealloc]):
+ (-[WebCoreScriptCallFrame wrapper]):
+ (-[WebCoreScriptCallFrame caller]):
+ (-[WebCoreScriptCallFrame scopeChain]):
+ (-[WebCoreScriptCallFrame functionName]):
+ (-[WebCoreScriptCallFrame exception]):
+ (-[WebCoreScriptCallFrame evaluateWebScript:]):
+ * WebView/WebScriptDebugDelegate.mm: Updated header path.
+ * WebView/WebScriptDebugDelegatePrivate.h: Ditto.
+
+2008-03-05 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Geoff.
+
+ Include file changes.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ * Plugins/WebNetscapePluginPackage.m:
+
+2008-03-04 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5720160> Browser windows "do nothing" while modal
+ dialog or menu is up due to run loop modes (or while scrolling)
+
+ Add new API that lets a WebView be scheduled with multiple runloops and modes.
+ This lets loading continue when in a nested runloop or in a different mode.
+
+ * Misc/WebKitVersionChecks.h: Add a new version define:
+ WEBKIT_FIRST_VERSION_WITH_LOADING_DURING_COMMON_RUNLOOP_MODES.
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]): Schedule in the main runloop and with
+ the default runloop mode if we are linked on an earlier WebKit version, use common modes otherwise.
+ (-[WebView scheduleInRunLoop:forMode:]): New API, that calls through to Page.
+ (-[WebView unscheduleFromRunLoop:forMode:]): Ditto.
+ * WebView/WebViewPrivate.h: Add the new pending API methods.
+
+2008-03-04 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix crash that happens when trying to load a page with a Java applet.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ Don't release the names and values array - the kit method returns an autoreleased array.
+
+2008-03-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam.
+
+ - fix 200+ failing regression tests
+ - fix http://bugs.webkit.org/show_bug.cgi?id=17668
+ Vertical scrollbar at slashdot.org is randomly not shown
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage): Changed the refcounting
+ code here to exactly match the way it was before it was moved from WebCore. I had
+ introduced a storage leak and that was causing problems with scroll bars!
+
+2008-03-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam.
+
+ - remove WebCoreFrameBridge reapplyStyles method
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView reapplyStyles]): Moved code to reapply styles here from the bridge.
+
+2008-03-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam.
+
+ - eliminate WebCoreFrameBridge createFrameViewWithNSView
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage):
+ Moved code here from createFrameViewWithNSView.
+
+2008-03-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam.
+
+ - removed WebCoreFrameBridge scrollOverflowInDirection
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _scrollOverflowInDirection:granularity:]): Changed to call
+ EventHandler directly instead of using the bridge.
+ (-[WebFrameView scrollToBeginningOfDocument:]): Updated to use WebCore enums instead
+ of the ones from the bridge.
+ (-[WebFrameView scrollToEndOfDocument:]): Ditto.
+ (-[WebFrameView _pageVertically:]): Ditto.
+ (-[WebFrameView _pageHorizontally:]): Ditto.
+ (-[WebFrameView _scrollLineVertically:]): Ditto.
+ (-[WebFrameView _scrollLineHorizontally:]): Ditto.
+
+2008-03-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam.
+
+ - remove WebCoreFrameBridge installInFrame: method
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage): Call
+ -[WebFrameView _install] instead of -[WebCoreFrameBridge installInFrame:].
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _install]): Added. Has code from -[WebCoreFrameBridge installInFrame:].
+ (-[WebFrameView _setCustomScrollViewClass:]): Used early return idiom so the entire
+ method isn't nested inside an if statement. Call
+ -[WebFrameView _install] instead of -[WebCoreFrameBridge installInFrame:].
+ * WebView/WebFrameViewInternal.h: Added declaration of _install method so it can be
+ used in WebFrameLoaderClient.mm.
+
+2008-03-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam.
+
+ - remove WebCoreFrameBridge window method
+
+ * WebCoreSupport/WebFrameBridge.mm: Removed window method.
+
+2008-03-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam.
+
+ - move code from WebFrameBridge into WebFrameLoaderClient
+
+ * WebCoreSupport/WebFrameBridge.h: Removed unused fields, changed frame name parameters
+ to use WebCore::String instead of NSString, add initSubframeWithOwnerElement declaration,
+ removed viewForPluginWithFrame, viewForJavaAppletWithFrame, createChildFrameNamed,
+ redirectDataToPlugin, determineObjectFromMIMEType, and windowObjectCleared methods.
+ * WebCoreSupport/WebFrameBridge.mm:
+ (-[WebFrameBridge finishInitializingWithPage:frameName:WebCore::frameView:ownerElement:]):
+ Changed to use WebCore::String.
+ (-[WebFrameBridge initMainFrameWithPage:frameName:WebCore::frameView:]): Ditto.
+ (-[WebFrameBridge initSubframeWithOwnerElement:frameName:WebCore::frameView:]): Ditto.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::setOriginalURLForDownload): Removed some dead code I found here
+ and added a FIXME.
+ (WebFrameLoaderClient::createFrame): Moved the code from WebFrameBridge here.
+ (WebFrameLoaderClient::objectContentType): Ditto.
+ (parameterValue): Added. Helper function, based on code originally in WebFrameBridge.
+ (pluginView): Ditto.
+ (WebFrameLoaderClient::createPlugin): Moved the code from WebFrameBridge here.
+
+2008-03-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam.
+
+ - remove -[WebCoreFrameBridge dashboardRegionsChanged:]
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::dashboardRegionsChanged): Moved code here from the bridge.
+ The WebCore side now calls this only when there's an actual change.
+ * WebCoreSupport/WebFrameBridge.h: Removed lastDashboardRegions.
+ * WebCoreSupport/WebFrameBridge.mm:
+ (-[WebFrameBridge dealloc]): Removed code to release lastDashboardRegions.
+ Removed _compareDashboardRegions: and dashboardRegionsChanged: methods.
+
+2008-03-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam.
+
+ - remove WebCoreFrameBridge issuePasteComand method
+
+ * WebCoreSupport/WebFrameBridge.mm: Removed issuePasteCommand method.
+ * WebView/WebHTMLViewInternal.h: Removed declaration of paste: method.
+
+2008-03-03 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam.
+
+ - some "cleanup" on the path to removing WebCoreFrameBridge
+
+ * Storage/WebDatabaseManager.mm: Tweak includes.
+ * Storage/WebDatabaseTrackerClient.mm: Ditto.
+ * Storage/WebSecurityOrigin.mm: Ditto.
+ * Storage/WebSecurityOriginInternal.h: Ditto.
+
+ * WebView/WebFrame.mm:
+ (core): Changed to get rid of the requirement that WebKitEditableLinkBehavior exactly
+ match WebCore::EditableLinkBehavior.
+ * WebView/WebFrameInternal.h: Removed unused kit function.
+
+ * WebView/WebHTMLView.mm: Moved WebHTMLViewPrivate class in here.
+ * WebView/WebHTMLViewInternal.h: Moved WebHTMLVewPrivate class out of here.
+ * WebView/WebHTMLViewPrivate.h: Tweaked formatting and removed some unneeded declarations.
+
+ * WebView/WebPreferencesPrivate.h: Removed a no-longer-needed comment.
+
+2008-03-01 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Update Xcode configuration to support building debug and release from the mysterious future.
+
+ * Configurations/DebugRelease.xcconfig:
+
+2008-02-29 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Replace use of WKPathFromFont with implementation in terms of public API.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Remove unused symbol.
+
+2008-02-29 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix spelling of "request" in name of WKNSURLProtocolClassForRequest.
+
+ * Misc/WebNSURLExtras.mm:
+ (-[NSURL _webkit_canonicalize]):
+ * WebKit.order:
+
+2008-02-29 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Don't use WKSupportsMultipartXMixedReplace on Leopard as multipart/x-mixed-replace is always handled by NSURLRequest.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+
+2008-02-29 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Remove obsolete code that had been left intact to support users running WebKit with older versions of Safari.
+
+ * Misc/WebNSViewExtras.m: Remove _web_superviewOfClass:stoppingAtClass:.
+ * Misc/WebNSWindowExtras.m: Remove _webkit_displayThrottledWindows.
+ * Misc/WebSearchableTextView.m: Remove selectionImageForcingWhiteText:.
+ * WebCoreSupport/WebImageRendererFactory.m: Update comment to mention the last version of Safari that
+ requires this class.
+ * WebInspector/WebInspector.mm: Remove sharedWebInspector and update comments to mention the last version
+ of Safari that calls other obsolete methods.
+ * WebView/WebDocumentPrivate.h: Remove selectionImageForcingWhiteText:.
+ * WebView/WebHTMLView.mm: Ditto.
+ * WebView/WebPDFView.mm: Ditto.
+ * WebView/WebView.mm: Update comment to mentoin the last version of Safari that requires the obsolete method.
+
+2008-02-29 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Eric Seidel.
+
+ Remove unneeded includes of WebKitSystemInterface.h.
+
+ * History/WebHistoryItem.mm:
+ * Misc/WebNSViewExtras.m:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ * WebView/WebDataSource.mm:
+ * WebView/WebPDFView.mm:
+
+2008-02-29 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt and Oliver Hunt.
+
+ <rdar://problem/4753845> WebKit should use CGEventSourceSecondsSinceLastEventType in place of WKSecondsSinceLastInputEvent SPI.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Remove unused symbol.
+ * WebKit.order: Ditto.
+
+2008-02-28 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Make use of new CGFont APIs on Leopard rather than making a WebKitSystemInterface call.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Only initialize wkGetFontMetrics on Tiger.
+
+2008-02-27 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Mark Rowe (code) and Darin (concept)
+
+ Much better fix for <rdar://problem/4930688> (see r19549)
+ Original fix for <rdar://problem/3947312> (and 14 dupes)
+
+ Let me tell you a story:
+ A long time ago, in a cvs repository far, far away, loader code was almost all up in WebKit.
+ WebArchive code was intertwined with that code in bizarre and complex ways.
+ During the months long loader re-factoring where we pushed much loader code down into WebCore,
+ many portions of the WebKit loader were thinned out until they ceased to exist. Others remained
+ with a sole purpose.
+
+ One such section of code whose lineage traces back from WebFrameLoaderClient to WebFrameLoader
+ to WebLoader was originally rooted in the method [WebLoader loadRequest:]. This method was the
+ single entry point for almost all loading (network or web archives)
+
+ This method would check various headers and other fields on the NSURLRequest and NSURLResponse
+ to make decisions about the load. If the cache control fields were expired or other conditions
+ in the headers were met, the load would be forced to go out to the network.
+
+ As the loader was moved and tweaked repeatedly, most of this code was pruned or re-factored.
+ At some point, all that remained was the special cases for loading WebArchives.
+
+ Somewhere in the r16,000s, this remaining responsibility was noticed and related methods we renamed
+ to be WebArchive specific, further cementing the assumed design.
+
+ Problem is, the design was bad. A WebArchive is meant to be a static snapshot of a WebPage at a
+ specific point in time. Referring to the request to see if the resource should be reloaded seems
+ nonsensical, as does referring to the response headers to see if the resource is "expired". In the
+ context of loading a WebArchive, available data should *always* be loaded from the WebArchive, at least
+ during the initial load!
+
+ After discovering the secret to reproducing all of these bugs is both emptying our your Foundation
+ cache and disconnecting your network, it was easy to reproduce the 16 individually reported cases
+ that were all symptoms of this bug, and easy to verify that they are fixed with this patch.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::willUseArchive): Do not call either form of "canUseArchivedResource()" that
+ inspect the request or response objects - We are loading from a WebArchive, and we should never
+ make the decision to go out to the network when we actually have the resource available.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Remove two methods that are no longer used anywhere in WebKit
+
+2008-02-27 Matt Lilek <webkit@mattlilek.com>
+
+ Reviewed by Adam Roben.
+
+ Bug 14348: Messing up the inspector by dragging an URL into it
+ http://bugs.webkit.org/show_bug.cgi?id=14348
+ <rdar://problem/5283620> and <rdar://problem/5712808>
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController init]): Remove duplicate preference setting.
+ (-[WebInspectorWindowController webView:dragDestinationActionMaskForDraggingInfo:]):
+
+2008-02-25 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam.
+
+ * WebView/WebArchiver.mm:
+ (+[WebArchiver archiveSelectionInFrame:]): Use blankURL.
+ * WebView/WebFrame.mm:
+ (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): Avoid the
+ variable name URL to avoid clashing with the renamed KURL in the future. Also use
+ blankURL.
+ (-[WebFrame loadData:MIMEType:textEncodingName:baseURL:]): Ditto.
+ (-[WebFrame _loadHTMLString:baseURL:unreachableURL:]): Ditto.
+ (-[WebFrame loadHTMLString:baseURL:]): Ditto.
+ (-[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]): Ditto.
+
+2008-02-24 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam.
+
+ - remove separate client calls for "standard" and "reload' history
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::updateGlobalHistory):
+
+2008-02-23 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Move basic threading support from WebCore to WTF.
+
+ * ForwardingHeaders/wtf/Threading.h: Added.
+ * ForwardingHeaders/wtf/Locker.h: Added.
+
+2008-02-23 David Kilzer <ddkilzer@apple.com>
+
+ Please clarify licensing for some files
+ <http://bugs.webkit.org/show_bug.cgi?id=14970>
+
+ Reviewed by Darin Adler.
+
+ * Plugins/WebNetscapeDeprecatedFunctions.c: Updated copyright statement
+ and added Apple BSD-style license.
+ * Plugins/WebNetscapeDeprecatedFunctions.h: Ditto.
+
+2008-02-22 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Adam Roben
+
+ Reverted the changed from yesterday to add pasteAndMatchStyle:, as the existing
+ pasteAsPlainText: has the same behavior.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]):
+ (-[WebHTMLView readSelectionFromPasteboard:]):
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
+ (-[WebHTMLView pasteAsRichText:]):
+ (-[WebHTMLView paste:]):
+ * WebView/WebView.mm:
+ * WebView/WebViewPrivate.h:
+
+2008-02-21 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam.
+
+ Use BackForwardList::create instead.
+
+ * History/WebBackForwardList.mm:
+ (-[WebBackForwardList init]):
+
+2008-02-21 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Jessica Kahn
+
+ support for pasteAndMatchStyle: command (see <rdar://problem/5723952>)
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _pasteWithPasteboard:allowPlainText:matchStyle:]):
+ added matchStyle parameter, passed along to bridge (formerly always passed NO to bridge)
+ (-[WebHTMLView readSelectionFromPasteboard:]):
+ pass NO for new matchStyle parameter to match old behavior
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
+ validate pasteAndMatchStyle the same way as pasteAsRichText
+ (-[WebHTMLView pasteAndMatchStyle:]):
+ just like pasteAsRichText but passes YES for matchStyle
+ (-[WebHTMLView pasteAsRichText:]):
+ pass NO for new matchStyle parameter to match old behavior
+ (-[WebHTMLView paste:]):
+ ditto
+
+ * WebView/WebView.mm:
+ added macro(pasteAndMatchStyle)
+
+ * WebView/WebViewPrivate.h:
+ added pasteAndMatchStyle: to WebViewEditingActionsPendingPublic category
+
+2008-02-20 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin and Geoff.
+
+ - WebKit part of <rdar://problem/5754378> work around missing video on YouTube front page with a site-specific hack
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Added a call to Settings::setNeedsSiteSpecificQuirks.
+ There are currently no site-specific quirks on Mac, but we will propagate the state
+ to WebCore to avoid possible mistakes later.
+
+2008-02-19 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Move back WebKit methods that were unused in WebCore.
+
+ * Misc/WebNSURLExtras.mm:
+ (+[NSURL _web_URLWithData:]):
+ (+[NSURL _web_URLWithData:relativeToURL:]):
+ (-[NSURL _web_originalData]):
+ (-[NSURL _web_originalDataAsString]):
+ (-[NSURL _web_isEmpty]):
+ (-[NSURL _webkit_canonicalize]):
+ (-[NSURL _webkit_URLByRemovingComponent:]):
+ (-[NSURL _webkit_URLByRemovingFragment]):
+ (-[NSURL _webkit_URLByRemovingResourceSpecifier]):
+ (-[NSURL _webkit_isFileURL]):
+ (-[NSString _webkit_isFileURL]):
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::setTitle):
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+
+2008-02-18 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam.
+
+ * Misc/WebNSAttributedStringExtras.mm:
+ (+[NSAttributedString _web_attributedStringFromRange:]): Eliminate use of
+ DeprecatedString.
+
+2008-02-17 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for http://bugs.webkit.org/show_bug.cgi?id=17365
+ document.createEvent("MessageEvent") throws NOT_SUPPORTED_ERR
+
+ * MigrateHeaders.make: Migrate DOMProgressEvent.h and DOMTextPrivate.h which were
+ mistakenly not migrated.
+
+2008-02-15 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ - WebKit part of fixing http://bugs.webkit.org/show_bug.cgi?id=17360
+ <rdar://problem/5743131> REGRESSION: mp4 file downloaded from server is downloaded as html
+
+ * WebView/WebDataSource.mm:
+ (+[WebDataSource _representationClassForMIMEType:]):
+ (-[WebDataSource _responseMIMEType]):
+ (-[WebDataSource subresources]):
+ (-[WebDataSource subresourceForURL:]):
+ * WebView/WebResource.mm:
+ (-[WebResource _initWithData:URL:response:]):
+ * WebView/WebResourcePrivate.h:
+
+2008-02-15 Adam Roben <aroben@apple.com>
+
+ Make WebKit's FEATURE_DEFINES match WebCore's
+
+ Reviewed by Mark.
+
+ * Configurations/WebKit.xcconfig:
+
+2008-02-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ - updated for WebCore KURL changes
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem URL]): Removed getNSURL call.
+ * Misc/WebElementDictionary.mm:
+ (-[WebElementDictionary _absoluteImageURL]): Ditto.
+ (-[WebElementDictionary _absoluteLinkURL]): Ditto.
+ * Misc/WebNSAttributedStringExtras.mm:
+ (fileWrapperForElement): Ditto.
+ (+[NSAttributedString _web_attributedStringFromRange:]): Ditto.
+ * Misc/WebNSURLExtras.mm:
+ (-[NSString _webkit_stringByReplacingValidPercentEscapes]): Updated
+ for function name change.
+ * WebCoreSupport/WebContextMenuClient.mm:
+ (WebContextMenuClient::downloadURL): Removed getNSURL call.
+ * WebCoreSupport/WebDragClient.mm:
+ (WebDragClient::createDragImageForLink): Ditto.
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchWillPerformClientRedirect): Ditto.
+ (WebFrameLoaderClient::startDownload): Ditto.
+ (WebFrameLoaderClient::updateGlobalHistoryForStandardLoad): Ditto.
+ (WebFrameLoaderClient::updateGlobalHistoryForReload): Ditto.
+ (WebFrameLoaderClient::cancelledError): Ditto.
+ (WebFrameLoaderClient::blockedError): Ditto.
+ (WebFrameLoaderClient::cannotShowURLError): Ditto.
+ (WebFrameLoaderClient::interruptForPolicyChangeError): Ditto.
+ (WebFrameLoaderClient::cannotShowMIMETypeError): Ditto.
+ (WebFrameLoaderClient::fileDoesNotExistError): Ditto.
+ (WebFrameLoaderClient::willUseArchive): Ditto.
+ (WebFrameLoaderClient::setTitle): Ditto.
+ (WebFrameLoaderClient::actionDictionary): Ditto.
+ (WebFrameLoaderClient::createFrame): Ditto.
+ (WebFrameLoaderClient::objectContentType): Ditto.
+ (WebFrameLoaderClient::createPlugin): Ditto.
+ (WebFrameLoaderClient::createJavaAppletWidget): Ditto.
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _URL]): Ditto.
+ (-[WebDataSource _initWithDocumentLoader:]): Ditto.
+ (-[WebDataSource unreachableURL]): Ditto.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Ditto.
+
+2008-02-14 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Geoff.
+
+ Update order files.
+
+ * WebKit.order:
+
+2008-02-14 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ http://bugs.webkit.org/show_bug.cgi?id=17207
+ Database example doesn't work (requires not-yet-released Safari)
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::exceededDatabaseQuota): Check Safari version, and allow 5 megabytes of storage
+ if it's too old.
+
+2008-02-11 Darin Adler <darin@apple.com>
+
+ - roll out fix for <rdar://problem/5726016> REGRESSION: Xcode News window renders
+ incorrectly due to visibility fix
+
+ Removed the Xcode-specific quirk at the request of some folks on the Xcode team.
+
+ * Misc/WebKitVersionChecks.h: Removed the constant.
+
+ * WebView/WebView.mm:
+ (-[WebView _needsXcodeVisibilityQuirk]): Removed.
+ (-[WebView _preferencesChangedNotification:]): Removed call to
+ setNeedsXcodeVisibilityQuirk.
+
+2008-02-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mitz.
+
+ * WebCoreSupport/WebFrameBridge.mm:
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory imageTitleForFilename:size:]):
+ Move implementation from WebFrameBridge to WebViewFactory.
+
+2008-02-11 Darin Adler <darin@apple.com>
+
+ Reviewed by Mitz.
+
+ - fix <rdar://problem/5726016> REGRESSION: Xcode News window renders
+ incorrectly due to visibility fix
+
+ Added an Xcode-specific quirk.
+
+ * Misc/WebKitVersionChecks.h: Added a constant for the "linked on or after"
+ part of the check.
+
+ * WebView/WebView.mm:
+ (-[WebView _needsXcodeVisibilityQuirk]): Added.
+ (-[WebView _preferencesChangedNotification:]): Added a call to
+ setNeedsXcodeVisibilityQuirk based on _needsXcodeVisibilityQuirk.
+
+2008-02-10 Darin Adler <darin@apple.com>
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=17274
+ REGRESSION: User Agent string broken in r30119
+
+ * WebView/WebView.mm:
+ (-[WebView _userAgentWithApplicationName:andWebKitVersion:]):
+ Fix wrong variable name. Doh!
+
+2008-02-09 Darin Adler <darin@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ - fix <rdar://problem/5725996> crash every time you open the Xcode documentation window
+
+ * WebView/WebView.mm:
+ (-[WebView _userAgentWithApplicationName:andWebKitVersion:]): Work around a bug in the
+ garbage collector's Objective C++ support by not initializing a static to an object
+ that needs to be marked when running under GC.
+
+2008-02-05 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - WebKit part of <rdar://problem/5724303> Should implement writing direction shortcuts
+
+ The key bindings are Command-Control-left arrow and
+ Command-Control-right arrow. To match AppKit, the bindings are enabled
+ only when certain user defaults are set.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
+ (-[WebHTMLView toggleBaseWritingDirection:]): Changed to call
+ Frame::baseWritingDirectionForSelectionStart() and
+ Editor::setBaseWritingDirection() directly.
+ (-[WebHTMLView changeBaseWritingDirection:]): Ditto.
+ (writingDirectionKeyBindingsEnabled): Added.
+ (-[WebHTMLView _changeBaseWritingDirectionTo:]): Added this helper
+ method.
+ (-[WebHTMLView changeBaseWritingDirectionToLTR:]): Added.
+ (-[WebHTMLView changeBaseWritingDirectionToRTL:]): Added.
+ * WebView/WebView.mm:
+
+2008-02-05 Mark Rowe <mrowe@apple.com>
+
+ Unreviewed build fix.
+
+ * WebView/WebView.mm: Add missing #import.
+
+2008-02-05 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Update versioning to support the mysterious future.
+
+ * Configurations/Version.xcconfig: Add SYSTEM_VERSION_PREFIX_1060.
+
+2008-01-30 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5708115> REGRESSION: Words selected with a double click and copied won't paste into Mail
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _smartInsertForString:replacingRange:beforeString:afterString:]): Brought
+ this back, it's used by Mail.
+ (-[WebHTMLView _canSmartReplaceWithPasteboard:]): This WebInternal method is
+ also used by Mail. Moved to WebPrivate.
+ * WebView/WebHTMLViewPrivate.h: Expose two methods that Mail uses here, so that we don't
+ accidently remove them in the future.
+
+2008-01-30 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Move off deprecated NSTableView methods.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebTextCompleteController _buildUI]): Switch from -setDrawsGrid: to -setGridStyleMask:.
+ (-[WebTextCompleteController _placePopupWindow:]): Switch from -selectRow:byExtendingSelection: to -selectRowIndexes:byExtendingSelection:.
+ (-[WebTextCompleteController filterKeyDown:]): Ditto.
+
+2008-01-26 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix leaks seen after loading <http://www.funnyordie.com/videos/d70b5a11cb>.
+
+ * Misc/WebNSDataExtras.m:
+ (-[NSString _web_capitalizeRFC822HeaderFieldName]): Transfer ownerhip of the allocated buffers
+ to the new CFString so that they will be freed when no longer needed.
+
+2008-01-26 Greg Bolsinga <bolsinga@apple.com>
+
+ <rdar://problem/5708388> WebDashboardRegion.h duplicated between WebCore / WebKit
+
+ Reviewed by Darin Adler.
+
+ * WebCoreSupport/WebDashboardRegion.h: Removed.
+ * WebView/WebView.mm: Updated #import to use copy of WebDashboardRegion.h from WebCore.
+
+2008-01-21 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - fix <rdar://problem/5644324> Delegate-less WebKit clients should have no databases
+ - add a missing export of WebDatabaseExpectedSizeKey
+ - implement deleteOrigin: and remove deleteDatabasesWithOrigin:
+
+ * Storage/WebDatabaseManager.mm:
+ (-[WebDatabaseManager detailsForDatabase:withOrigin:]): Updated to check for a null
+ name instead of calling isValid().
+ (-[WebDatabaseManager deleteOrigin:]): Implemented.
+ (WebKitInitializeDatabasesIfNecessary): Updated for name change.
+
+ * Storage/WebDatabaseManagerPrivate.h: Removed deleteDatabasesWithOrigin:.
+
+ * WebCoreSupport/WebChromeClient.h: Updated for changes to ChromeClient.
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::exceededDatabaseQuota): Replaced the two different client functions
+ we had before with a single one.
+
+ * WebKit.exp: Added missing export for WebDatabaseExpectedSizeKey.
+
+ * WebView/WebPreferenceKeysPrivate.h: Removed WebKitDefaultDatabaseQuotaKey.
+ * WebView/WebPreferences.m:
+ (+[WebPreferences initialize]): Removed the default for WebKitDefaultDatabaseQuotaKey.
+ * WebView/WebPreferencesPrivate.h: Removed defaultDatabaseQuota and
+ setDefaultDatabaseQuota:.
+
+ * WebView/WebUIDelegatePrivate.h: Replaced the two different database quota delegate
+ methods we had before with a single one.
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Removed the code to set the
+ default database origin quota in WebCore::Settings based on WebPreferences.
+
+ * WebView/WebViewInternal.h: Removed delegate method dispatch functions for unusual
+ types of parameters that the database UI delegate methods had before.
+
+2008-01-20 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Remove code bracketed by REMOVE_SAFARI_DOM_TREE_DEBUG_ITEM as we are no longer
+ interested in supporting Safari 2 with TOT WebKit.
+
+ * WebView/WebView.mm:
+ (+[WebView initialize]):
+
+2008-01-17 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Adam Roben.
+
+ <rdar://problem/5693558> REGRESSION (r29581): no form field focus rings
+ and inactive text selection after loading a page
+ Bug 16917: REGRESSION (r29581/2): Google Maps search box loses focused appearance
+
+ The problem was other frames were changing the FocusController's active
+ status to false after the first responder frame set it to true. The last
+ frame to call _updateActiveState would win.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _updateActiveState]): Only call page->focusController()->setActive()
+ if the first responder is the current WebHTMLView or the WebFrameView.
+ (-[WebHTMLView _web_firstResponderCausesFocusDisplay]): Removed, inlined code in _updateActiveState.
+
+2008-01-18 Adam Roben <aroben@apple.com>
+
+ Rename _updateActiveState to _updateFocusedAndActiveState
+
+ Also renamed any related methods/members similarly.
+
+ Reviewed by Adele.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLViewPrivate dealloc]):
+ (-[WebHTMLView _cancelUpdateFocusedAndActiveStateTimer]):
+ (-[WebHTMLView close]):
+ (_updateFocusedAndActiveStateTimerCallback):
+ (-[WebHTMLView viewWillMoveToWindow:]):
+ (-[WebHTMLView viewDidMoveToWindow]):
+ (-[WebHTMLView windowDidBecomeKey:]):
+ (-[WebHTMLView windowDidResignKey:]):
+ (-[WebHTMLView becomeFirstResponder]):
+ (-[WebHTMLView resignFirstResponder]):
+ * WebView/WebHTMLViewInternal.h:
+ * WebView/WebHTMLViewPrivate.h:
+
+2008-01-17 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Darin
+
+ - fixed <rdar://problem/5692068> -1 WebFrameView world leaks reported after closing view source window
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView initWithCoder:]):
+ override to bump the global WebFrameView count
+
+2008-01-16 Adam Roben <aroben@apple.com>
+
+ Updated for renames/removal of WebCore methods.
+
+ Reviewed by Darin Adler.
+
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController webPlugInContainerSelectionColor]): Changed to
+ ask isFocusedAndActive directly, instead of going through the frame
+ bridge.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _updateActiveState]): Updated for method renames.
+
+2008-01-16 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Adam and Dan
+
+ - cleaned up some existing logging
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView setNeedsDisplay:]):
+ add method name to log, use "YES" and "NO" instead of (int)flag
+ (-[WebHTMLView setNeedsLayout:]):
+ ditto
+ (-[WebHTMLView setNeedsToApplyStyles:]):
+ ditto
+
+2008-01-15 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Andre Boule.
+
+ Fixed <rdar://problem/5667627> [WebCache empty] implementation should
+ not disable/enable the cache
+
+ Toggle the cache model instead -- toggling disable/enable just causes
+ the cache to forget about resources, not reclaim their memory.
+
+ * Misc/WebCache.mm:
+ (+[WebCache empty]):
+ * WebView/WebView.mm:
+ * WebView/WebViewInternal.h:
+
+2008-01-15 Adele Peterson <adele@apple.com>
+
+ Reviewed by Adam and Antti.
+
+ WebKit part of fix for <rdar://problem/5619062> Add load progress indicator to video controls
+
+ * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
+ Removed initialization for GetMediaControlBackgroundImageData. Added initialization for DrawMediaSliderTrack.
+
+2008-01-10 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Fixed some world leak reports:
+ * <rdar://problem/5669436> PLT complains about world leak of 1 JavaScript
+ Interpreter after running cvs-base suite
+
+ * <rdar://problem/5669423> PLT complains about world leak if browser
+ window is open when PLT starts
+
+ These were both bugs in the reporting mechanism, so I took the
+ opportunity to do some house cleaning there.
+
+ * Misc/WebCoreStatistics.h: Did a little renaming, to match
+ JavaScriptCore better. I kept the methods with the old names around,
+ though, because old versions of Safari need them.
+
+ * Misc/WebCoreStatistics.mm: Removed dependence on
+ WebCore::JavaScriptStatistics, which is gone now.
+
+ These two methods are now distinct, for the sake of world leak reporting:
+ (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
+
+2008-01-10 Maciej Stachowiak <mjs@apple.com>
+
+ Not reviewed. Build fix.
+
+ - Attempt to fix mac build.
+
+ * Storage/WebDatabaseManager.mm:
+
+2008-01-10 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Sam.
+
+ - remove SecurityOriginData and fold its functionality into SecurityOrigin
+
+ * Storage/WebDatabaseManager.mm:
+ (-[WebDatabaseManager origins]):
+ (-[WebDatabaseManager databasesWithOrigin:]):
+ (-[WebDatabaseManager detailsForDatabase:withOrigin:]):
+ (-[WebDatabaseManager deleteDatabasesWithOrigin:]):
+ (-[WebDatabaseManager deleteDatabase:withOrigin:]):
+ * Storage/WebDatabaseTrackerClient.h:
+ * Storage/WebDatabaseTrackerClient.mm:
+ (WebDatabaseTrackerClient::dispatchDidModifyOrigin):
+ (WebDatabaseTrackerClient::dispatchDidModifyDatabase):
+ * Storage/WebSecurityOrigin.mm:
+ (-[WebSecurityOrigin initWithProtocol:domain:port:]):
+ (-[WebSecurityOrigin protocol]):
+ (-[WebSecurityOrigin domain]):
+ (-[WebSecurityOrigin port]):
+ (-[WebSecurityOrigin usage]):
+ (-[WebSecurityOrigin quota]):
+ (-[WebSecurityOrigin setQuota:]):
+ (-[WebSecurityOrigin isEqual:]):
+ (-[WebSecurityOrigin dealloc]):
+ (-[WebSecurityOrigin finalize]):
+ (-[WebSecurityOrigin _initWithWebCoreSecurityOrigin:]):
+ (-[WebSecurityOrigin _core]):
+ * Storage/WebSecurityOriginInternal.h:
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::requestQuotaIncreaseForNewDatabase):
+ (WebChromeClient::requestQuotaIncreaseForDatabaseOperation):
+
+2008-01-10 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Fixes: http://bugs.webkit.org/show_bug.cgi?id=16522
+ <rdar://problem/5657355>
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView loadPluginRequest:]): call findFrameForNavigation
+ to ensure the shouldAllowNavigation check is made.
+
+2008-01-07 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Mark.
+
+ Enable SVG_FONTS by default.
+
+ * Configurations/WebKit.xcconfig:
+
+2008-01-07 Adele Peterson <adele@apple.com>
+
+ Reviewed by Antti, Adam, and Mitz.
+
+ WebKit part of fix for
+ <rdar://problem/5619073> Updated look for <video> controls
+ <rdar://problem/5619057> Add volume control to video controls
+
+ * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
+
+2008-01-07 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ - <rdar://problem/5665216> Support the unicode-range property in @font-face rules
+
+ * Misc/WebNSAttributedStringExtras.mm:
+
+2008-01-03 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5463489> A number of layout tests should be using execCommand instead of textInputController
+
+ * WebView/WebView.mm:
+ (-[WebView _executeCoreCommandByName:value:]):
+ * WebView/WebViewPrivate.h:
+ Added an SPI to implement layoutTestController.execCommand.
+
+2008-01-03 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fixed: <rdar://problem/4106190> Include "Where from" metadata in drag-and-dropped images
+
+ * Misc/WebNSFileManagerExtras.h:
+ * Misc/WebNSFileManagerExtras.m:
+ (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Added new method. Uses WebKitSystemInterface to set
+ "Where from:" metadata information.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Added "Where from:" metadata for drag and dropped images.
+
+2008-01-03 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Darin Adler.
+
+ This fixes pageup/down in iframes. test for this is fast/frames/iframe-scroll-page-up-down.html
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView doCommandBySelector:]):
+ Have the editor handle all the commands it supports instead of just text commands.
+ If not handled by the editor, the webview will handle the command.
+
+2008-01-02 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fixed: <rdar://problem/5660603> QuickDraw plug-ins can cause a 100% reproducible assertion failure in AppKit (breaks Safari UI)
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView updateAndSetWindow]): Simplified an early return for non-QuickDraw plug-ins and switched
+ to using the more NSView friendly version of lockFocus, lockFocusIfCanDraw.
+
+2008-01-01 David D. Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Dan.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=16700
+ Fix -[WebDefaultPolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]
+
+ * DefaultDelegates/WebDefaultPolicyDelegate.m: Check return value of
+ -[NSFileManager fileExistsAtPath:isDirectory:] before using the value
+ of isDirectory.
+
+2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Eric.
+
+ Add DOMSVGFontElement/DOMSVGGlyphElement/DOMSVGMissingGlyphElement to MigrateHeaders.make
+
+ * MigrateHeaders.make:
+
+2007-12-25 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ - fix an assertion failure when pressing the num lock key
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView flagsChanged:]): Avoid passing key code 10 down to
+ WebCore.
+
+2007-12-20 Darin Adler <darin@apple.com>
+
+ Reviewed by Oliver.
+
+ - fix <rdar://problem/5658787> Selector -[WebView insertLineBreak:] is not implemented
+
+ * WebView/WebView.mm: Added all selectors implemented by WebHTMLView to the list of
+ selectors to forward here. The new ones are: changeBaseWritingDirection:, changeSpelling:,
+ deleteToMark:, insertLineBreak:, moveParagraphBackwardAndModifySelection:,
+ moveParagraphForwardAndModifySelection:, pageDownAndModifySelection:, pageUpAndModifySelection:,
+ selectToMark:, setMark:, swapWithMark:, takeFindStringFromSelection:, toggleBaseWritingDirection:,
+ and transpose:.
+
+2007-12-20 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders.
+
+ Fixed: <rdar://problem/5638288> REGRESSION: Flash movies show up in other tabs above the page (16373)
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView updateAndSetWindow]): QuickDraw plug-ins must manually be told when to stop
+ writing to the window backing store. The problem was that change-set 28400 introduced an early return
+ which prevented this necessary operation. The fix is to limit the scope of the early return to CG and GL
+ plug-ins and to tweak the needsFocus check to prevent an exception from occurring in QuickDraw-based plug-ins.
+
+2007-12-19 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Build fix.
+
+ * ForwardingHeaders/kjs/SymbolTable.h: Added.
+ * ForwardingHeaders/wtf/VectorTraits.h: Added.
+
+2007-12-16 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Refactor Mac plugin stream code to use the shared NetscapePlugInStreamLoader implementation.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebNetscapePluginStream.h:
+ * Plugins/WebNetscapePluginStream.mm:
+ (-[WebNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
+ (-[WebNetscapePluginStream dealloc]):
+ (-[WebNetscapePluginStream finalize]):
+ * Plugins/WebPlugInStreamLoaderDelegate.h: Moved from WebCore.
+ * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.h: Added.
+ (WebNetscapePlugInStreamLoaderClient::WebNetscapePlugInStreamLoaderClient):
+ * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.mm: Added.
+ (WebNetscapePlugInStreamLoaderClient::didReceiveResponse): Call through to the equivalent WebPlugInStreamLoaderDelegate method.
+ (WebNetscapePlugInStreamLoaderClient::didReceiveData): Ditto.
+ (WebNetscapePlugInStreamLoaderClient::didFail): Ditto.
+ (WebNetscapePlugInStreamLoaderClient::didFinishLoading): Ditto.
+
+2007-12-16 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=14140
+ <rdar://problem/5270958> REGRESSION: Complex system KeyBindings don't work properly
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]): Made command replaying work
+ when handling keypress, too.
+ (-[WebHTMLView doCommandBySelector:]): Adapted for the new way to store commands in events.
+ (-[WebHTMLView insertText:]): Append a command, not replace the whole existing vector. Also,
+ restore the state for additional commands to be saved correctly.
+
+2007-12-14 David D. Kilzer <ddkilzer@apple.com>
+
+ <rdar://problem/5647272> Remove user agent string hack for flickr.com
+
+ Reviewed by Darin Adler.
+
+ * WebView/WebView.mm:
+ (-[WebView _userAgentForURL:]): Removed hack.
+
+2007-12-14 David D. Kilzer <ddkilzer@apple.com>
+
+ <rdar://problem/5647261> Remove user agent string hack for yahoo.com
+
+ Reviewed by Darin Adler.
+
+ * WebView/WebView.mm:
+ (-[WebView _userAgentForURL:]): Removed hack.
+
+2007-12-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Brady.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=16296
+ <rdar://problem/5635641> -[WebFrameLoadDelegate didReceiveIcon:forFrame:] never called
+
+ * WebView/WebView.mm:
+ (-[WebView setFrameLoadDelegate:]): Call [WebIconDatabase sharedIconDatabase] if the
+ a didReceiveIcon method is present.
+
+2007-12-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Alexey.
+
+ - Changed a few more editing operations to use WebCore instead of WebKit.
+ - Removed some obsolete unused code.
+
+ * WebCoreSupport/WebFrameBridge.h: Moved declarations of methods that are both
+ defined and used on the WebKit side to here. These no longer belong on the bridge
+ and should be moved to the WebFrame class (or elsewhere).
+ * WebCoreSupport/WebFrameBridge.mm: Removed some unused methods.
+
+ * WebView/WebFrameView.mm:
+ (+[WebFrameView _viewTypesAllowImageTypeOmission:]): Fix typo in comment.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLViewPrivate dealloc]): Removed unused firstResponderTextViewAtMouseDownTime.
+ (-[WebHTMLViewPrivate clear]): Ditto.
+ (-[WebHTMLView _setMouseDownEvent:]): Ditto.
+ (commandNameForSelector): Added special cases for pageDown:, pageDownAndModifySelection:,
+ pageUp:, and pageUpAndModifySelection:, since those names probably aren't specific enough
+ to be used in WebCore (what AppKit calls scrollPageDown: vs. pageDown: needs to be
+ disambiguated with the word "Move"). Added deleteBackward:,
+ deleteBackwardByDecomposingPreviousCharacter:, deleteForward:, deleteToBeginningOfLine:,
+ deleteToBeginningOfParagraph:, deleteToEndOfLine:, deleteToEndOfParagraph:, pageDown:,
+ pageDownAndModifySelection:, pageUp:, pageUpAndModifySelection:, selectLine:,
+ selectParagraph:, selectSentence:, and selectWord: to the list of commands that are
+ forwarded to WebCore.
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Eliminated the long list of
+ operations that we forward to WebCore. Instead, look up any command that WebCore can
+ handle, after any that we handle specially in WebHTMLView. Also fixed a bug where
+ an item that's not a menu item with changeBaseWritingDirection:NSWritingDirectionNatural
+ would end up enabled instead of disabled and streamlined the logic for toggleGrammarChecking:.
+ (-[WebHTMLView mouseDown:]): Removed unused firstResponderTextViewAtMouseDownTime.
+ (-[WebHTMLView becomeFirstResponder]): Removed unused willBecomeFirstResponderForNodeFocus.
+ (-[WebHTMLView resignFirstResponder]): Ditto.
+ (-[WebHTMLView checkSpelling:]): Took unneeded extra initialization of NSSpellChecker.
+
+ * WebView/WebHTMLViewInternal.h: Removed unused willBecomeFirstResponderForNodeFocus,
+ firstResponderTextViewAtMouseDownTime, _textViewWasFirstResponderAtMouseDownTime: and
+ _willMakeFirstResponderForNodeFocus.
+
+2007-12-13 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Turn on keyboard event processing quirks for feed views and old applications on Mac OS X.
+
+ * Misc/WebKitVersionChecks.h:
+ * WebView/WebView.mm:
+ (-[WebView _needsKeyboardEventHandlingQuirks]):
+ (-[WebView _preferencesChangedNotification:]):
+
+2007-12-12 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig
+
+ Fix for <rdar://problem/4886844> and lay groundwork for <rdar://problem/4516170> (Back/Forward Cache on Windows)
+
+ * WebCoreSupport/WebCachedPagePlatformData.h: Added.
+ (WebCachedPagePlatformData::WebCachedPagePlatformData): Constructor takes a WebDocumentView for later restoration
+ (WebCachedPagePlatformData::clear):
+ (WebCachedPagePlatformData::webDocumentView):
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::savePlatformDataToCachedPage):
+ (WebFrameLoaderClient::transitionToCommittedFromCachedPage): Don't set the DocumentLoader to the Frame here,
+ because that is now done in WebCore.
+ (WebFrameLoaderClient::transitionToCommittedForNewPage):
+
+2007-12-12 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dave Kilzer.
+
+ Remove abuse of projectDirPath from WebKit.xcodeproj to fix Production builds.
+
+ * Configurations/WebKit.xcconfig:
+
+2007-12-11 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Scrub URL out of the tree in preparation for renaming KURL to URL.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::actionDictionary):
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _URL]):
+ * WebView/WebView.mm:
+ (-[WebView _dispatchDidReceiveIconFromWebFrame:]):
+
+2007-12-11 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff.
+
+ - change more editing commands to use WebCore::Editor
+ - change to use the new WebCore::Editor::command() function
+
+ * WebView/WebHTMLView.mm: Changed alignCenter, alignJustified, alignLeft,
+ alignRight, cut, copy, deleteToMark, indent, insertNewlineIgnoringFieldEditor,
+ insertTabIgnoringFieldEditor, outdent, selectAll, selectToMark, setMark,
+ subscript, superscript, swapWithMark, underline, unscript, yank, and yankAndSelect
+ to use the "forward to WebCore" macro instead of having hand-written implementations.
+ (kit): Added function to change a TriState to an AppKit-style tri-state value.
+ (-[WebHTMLView coreCommandBySelector:]): Added. No longer converts case of the
+ first character or copies the selector name, since the Editor commands are not case
+ sensitive any more. Returns a command object.
+ (-[WebHTMLView coreCommandByName:]): Added.
+ (-[WebHTMLView executeCoreCommandBySelector:]): Renamed from callWebCoreCommand:,
+ and changed to use the new coreCommandBySelector: method.
+ (-[WebHTMLView executeCoreCommandByName:]): Added.
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Changed all the
+ methods that call through to WebCore to also use the state() and isEnabled()
+ functions on the commands for the menu item state and user interface item enabling.
+ (-[WebHTMLView _handleStyleKeyEquivalent:]): Use ToggleBold and ToggleItalic by
+ name rather than having local methods for them; no need for methods with a single
+ call site.
+ (-[WebHTMLView insertParagraphSeparator:]): Use executeCoreCommandByName: rather
+ than the deprecated execCommand().
+ (-[WebHTMLView doCommandBySelector:]): Changed to use command().execute() rather
+ than the deprecated execCommand().
+ * WebView/WebHTMLViewInternal.h: Removed some unneeded method declarations.
+
+2007-12-07 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5535636>
+ Have to press 4 times instead of 2 times to get the expected result of ^^ with german keyboard.
+
+ http://bugs.webkit.org/show_bug.cgi?id=13916
+ JavaScript detects Tab as a character input on a textfield validation
+
+ * WebCoreSupport/WebEditorClient.h:
+ Renamed handleKeypress() to handleKeyboardEvent(), as it gets both keydowns and keypresses.
+ Renamed handleInputMethodKeypress() to handleInputMethodKeydown().
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::handleKeyboardEvent): This change makes sense only remotely, but it helped
+ to get tests working. I guess Mac keyboard event handling needs further refactoring.
+
+ * WebView/WebHTMLView.mm:
+ (selectorToCommandName): Convert AppKit editing selector name to Editor command name - extracted
+ from callWebCoreCommand:.
+ (_interceptEditingKeyEvent:shouldSaveCommand:): Insert text from keypress.
+
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
+ Convert incoming platform KeyDown into RawKeyDown, as this is what the view is interested in.
+
+2007-12-10 Brady Eidson <beidson@apple.com>
+
+ Reviewed by John Sullivan
+
+ Fix for <rdar://problem/5640080> - Database UI delegate calls need to specify WebFrame
+
+ This is because a common UI case is to want to know the originating URL of a Database
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::requestQuotaIncreaseForNewDatabase):
+ (WebChromeClient::requestQuotaIncreaseForDatabaseOperation):
+
+ * WebView/WebUIDelegatePrivate.h:
+
+ * WebView/WebView.mm:
+ (CallDelegateReturningUnsignedLongLong):
+ (CallUIDelegateReturningUnsignedLongLong):
+ * WebView/WebViewInternal.h:
+
+2007-12-10 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ <rdar://problem/5639463> Bundle versions on Tiger should be 4523.x not 523.x
+
+ * Configurations/Version.xcconfig: Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR,
+ so assume Tiger and use a 4 for the SYSTEM_VERSION_PREFIX.
+
+2007-12-10 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fixed: <rdar://problem/4290098> Right-mouse click on element doesn't call onmousedown handler
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView menuForEvent:]): Match behavior of other browsers by sending an onmousedown event for right clicks.
+
+2007-12-08 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Sam W.
+
+ Split the ENABLE_SVG_EXPERIMENTAL_FEATURES flag into separate flags.
+
+ Fixes <rdar://problem/5620249> Must disable SVG animation
+ <rdar://problem/5612772> Disable SVG filters on Mac to match Windows behavior
+
+ Minor updates to the feature flags used.
+
+ * Configurations/WebKit.xcconfig:
+ * DOM/WebDOMOperations.mm:
+
+2007-12-07 Darin Adler <darin@apple.com>
+
+ Reviewed by Kevin Decker and Tim Hatcher.
+
+ - speculative fix for <rdar://problem/5400159> CrashTracer: [USER] 726 crashes
+ in Safari at com.apple.WebKit: -[WebHTMLView(WebPrivate) _updateMouseoverWithFakeEvent] + 389
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _frameOrBoundsChanged]): Only schedule the mouseover timer if we are in a window
+ and not closed. That's because viewDidMoveToWindow and close are the entry points for cancelling.
+ (-[WebHTMLView close]): Add code to cancel both timers. Needed for the case where the entire
+ window goes away, and the view is never removed from the window.
+ (-[WebHTMLView viewDidMoveToWindow]): Don't do work if the view is closed.
+
+2007-12-07 Darin Adler <darin@apple.com>
+
+ Reviewed by Mitz.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=15981
+ speed up visited-link code a bit
+
+ * History/WebHistory.mm: Removed unused Latin-1 code path.
+ (-[_WebCoreHistoryProvider containsURL:length:]): Updated for method name change.
+
+2007-12-07 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Added a forwarding header, since we now #include nodes.h through some
+ JavaScriptCore headers.
+
+ * ForwardingHeaders/wtf/ListRefPtr.h: Added.
+
+2007-12-06 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Oliver's rubber stamp
+
+ Let's go ahead and call the correct UI Delegate method, shall we?
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::requestQuotaIncreaseForDatabaseOperation): Call the correct UI delegate
+
+2007-12-06 Adam Roben <aroben@apple.com>
+
+ Remove some assertions we know can fire and replace them with a FIXME
+
+ Reviewed by Anders.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+
+2007-12-06 Timothy Hatcher <timothy@apple.com>
+
+ Change the ASSERT added for the previous fix. The ASSERT was firing for 10.5.0.
+ Only assert if the major version is zero, since zero is handled in the other cases.
+
+ * WebView/WebView.mm:
+ (callGestalt): Remove the ASSERT.
+ (createMacOSXVersionString): ASSERT that major is not zero.
+
+2007-12-06 Darin Adler <darin@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ - fix <rdar://problem/5513394> No way to detect Tiger vs Leopard from Safari's user agent string
+
+ * WebView/WebView.mm:
+ (callGestalt): Added.
+ (createMacOSXVersionString): Added.
+ (-[WebView _userAgentWithApplicationName:andWebKitVersion:]): Added Mac OS X version string,
+ right after the string "Mac OS X", but with underscores instead of dots to avoid the dreaded
+ "4." problem (old libraries that think a "4." anywhere in the user agent means Netscape 4).
+ (-[WebView _userAgentForURL:]): Fixed incorrect bug numbers.
+
+2007-12-04 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Third step in refactoring JSGlobalObject: Moved data members and data
+ member access from Interpreter to JSGlobalObject.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _attachScriptDebugger]):
+
+2007-12-04 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - <rdar://5621435>
+ - Security Fix. Instead of having it off by default, WebKit now must
+ explicitly turn off local-resource restriction when needed for backwards
+ coimpatibility reasons.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+
+2007-12-05 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Kevin Deckers rubberstamp
+
+ Disclose and export the Databases Directory defaults key
+
+ * Storage/WebDatabaseManager.mm:
+ * Storage/WebDatabaseManagerPrivate.h:
+ * WebKit.exp:
+
+2007-12-04 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders.
+
+ <rdar://problem/5629125> PluginInfoStore needs the ability to return the name of a plug-in for a given MIME type
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory pluginNameForMIMEType:]): Added.
+
+2007-12-04 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Mark Rowe
+
+ Tweaked the way we typedef and cast these objc_msgSend calls
+
+ * WebView/WebView.mm:
+ (CallDelegateReturningUnsignedLongLong):
+
+2007-12-04 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Brady Eidson (with help from Mark Rowe)
+
+ Fixed return values for unsigned-long-long delegate methods
+
+ * WebView/WebView.mm:
+ (CallDelegateReturningUnsignedLongLong):
+ redid the change that Brady did at home over the weekend but forgot to check in
+
+2007-11-27 Adam Roben <aroben@apple.com>
+
+ Remove -[WebFrameBridge setNeedsReapplyStyles]
+
+ This functionality is now WebCore's responsibility.
+
+ Reviewed by Hyatt.
+
+ * WebCoreSupport/WebFrameBridge.mm:
+ * WebKit.order:
+
+2007-12-04 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Darin
+
+ Added deleteOrigin: SPI, which isn't fully implemented
+
+ * Storage/WebDatabaseManagerPrivate.h:
+ * Storage/WebDatabaseManager.mm:
+ (-[WebDatabaseManager deleteOrigin:]):
+ just calls deleteDatabasesWithOrigin: for now, but needs to delete origin itself too
+
+2007-12-04 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Remove a check for early versions of Leopard CFNetwork now that
+ Leopard has shipped.
+
+ * Misc/WebKitVersionChecks.h: Remove WEBKIT_FIRST_CFNETWORK_VERSION_WITH_LARGE_DISK_CACHE_FIX.
+ * WebView/WebView.mm:
+ (+[WebView _setCacheModel:]): Remove the early Leopard CFNetwork check.
+
+2007-12-04 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Revised fix for: <rdar://problem/5586978> REGRESSION (Safari 2-3): WebKit sometimes doesn't invoke Flash's NPP_SetWindow function and causes a hang
+
+ This fix is exactly the same as chageset 28359 with the exception of an added early return in
+ updateAndSetWindow to cover the additional case of when a plug-in isn't drawable.
+
+ The CG-based Flash player would sometimes hang because (for CoreGraphics-based plug-ins) our code would
+ only call into the NPP_SetWindow() function when we tell the plug-in to draw. This created havoc with
+ Flash because Flash expects the browser to call NPP_SetWindow() and provide a valid graphics context
+ regardless of whether or not it actually needs to draw.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): Removed an incorrect comment and toned
+ down an ASSERT that was too strict.
+ (-[WebBaseNetscapePluginView updateAndSetWindow]): Removed an early return for CoreGraphics-based plug-ins
+ which would sometimes altogether prevent updating the PortState and calling into a plug-ins NPP_SetWindow()
+ function. Also tweaked a comment and added an early return if the plug-in can't draw.
+
+2007-12-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ * WebCoreSupport/WebFrameLoaderClient.h: Removed obsolete privateBrowsingEnabled.
+ * WebCoreSupport/WebFrameLoaderClient.mm: Ditto.
+ * WebKit.order: Ditto.
+
+2007-12-03 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ - fix <rdar://problem/5346452> Resize event doesn't fire on body element inside a frame
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Removed the code
+ that checked if the view had resized and sent the resize event, since
+ FrameView sends resize events now.
+ * WebView/WebHTMLViewInternal.h:
+
+2007-12-03 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Change WebViewGetResourceLoadDelegateImplementations and WebViewGetFrameLoadDelegateImplementations
+ to return a pointer to the implementation struct instead of a copy of the struct. This changes
+ all of the callers to dereference the pointer to access the struct fields.
+
+ * Plugins/WebNullPluginView.mm:
+ (-[WebNullPluginView reportFailure]):
+ * WebCoreSupport/WebFrameBridge.mm:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
+ (WebFrameLoaderClient::assignIdentifierToInitialRequest):
+ (WebFrameLoaderClient::dispatchWillSendRequest):
+ (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
+ (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
+ (WebFrameLoaderClient::dispatchDidReceiveResponse):
+ (WebFrameLoaderClient::willCacheResponse):
+ (WebFrameLoaderClient::dispatchDidReceiveContentLength):
+ (WebFrameLoaderClient::dispatchDidFinishLoading):
+ (WebFrameLoaderClient::dispatchDidFailLoading):
+ (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
+ (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
+ (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
+ (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
+ (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
+ (WebFrameLoaderClient::dispatchWillClose):
+ (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
+ (WebFrameLoaderClient::dispatchDidReceiveTitle):
+ (WebFrameLoaderClient::dispatchDidCommitLoad):
+ (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
+ (WebFrameLoaderClient::dispatchDidFailLoad):
+ (WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
+ (WebFrameLoaderClient::dispatchDidFinishLoad):
+ (WebFrameLoaderClient::dispatchDidFirstLayout):
+ * WebView/WebView.mm:
+ (WebViewGetResourceLoadDelegateImplementations):
+ (WebViewGetFrameLoadDelegateImplementations):
+ (-[WebView _dispatchDidReceiveIconFromWebFrame:]):
+ * WebView/WebViewInternal.h:
+
+2007-12-03 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ <rdar://problem/5539913> 188 crashes in WebViewGetFrameLoadDelegateImplementations
+ <rdar://problem/5586095> CrashTracer: [USER] 5000+ crashes in Safari and Dashboard in dispatchDidFailLoading
+ <rdar://problem/5607081> CrashTracer: [USER] 2150 crashes in Safari at com.apple.WebKit:
+ WebViewGetResourceLoadDelegateImplementations + 28
+
+ * WebView/WebView.mm:
+ (-[WebView _cacheResourceLoadDelegateImplementations]): If the delegate is nil, bzero the
+ implementation cache. This just prevents us from calling getMethod() multiple times just to zero.
+ (-[WebView _cacheFrameLoadDelegateImplementations]): Ditto.
+ (WebViewGetResourceLoadDelegateImplementations): Return a zeroed implementations struct
+ if the WebView is nil. This fixes the crashes.
+ (WebViewGetFrameLoadDelegateImplementations): Ditto.
+
+2007-12-02 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Updated to match the JavaScriptCore change to move virtual methods from
+ Interpreter to JSGlobalObject.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame globalContext]): Use the toRef function instead of manually
+ casting.
+
+2007-12-01 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Tim
+
+ Added a default database quota of 5mb to the default WebPreferences
+
+ * WebView/WebPreferences.m:
+ (+[WebPreferences initialize]):
+
+2007-11-30 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Geoff Garen
+
+ Added another symbol for WebDatabaseManager clients
+
+ * WebKit.exp:
+ added .objc_class_name_WebSecurityOrigin
+
+2007-11-30 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Geoff
+
+ Add isEqual operator to WebSecurityOrigin
+
+ * Storage/WebSecurityOrigin.mm:
+ (-[WebSecurityOrigin isEqual:]):
+
+2007-11-30 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Darin
+
+ Tweaks to newly-declared NSString * constants to make them usable from clients
+
+ * Storage/WebDatabaseManagerPrivate.h:
+ * Storage/WebDatabaseManager.mm:
+ removed "const" from new NSNotification names and userInfo keys; these generate compiler warnings when used
+
+ * WebKit.exp:
+ export new NSNotification names and userInfo keys so clients can use them
+
+2007-11-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by John.
+
+ Rename WebKitShrinksStandaloneImagesToFitKey to WebKitShrinksStandaloneImagesToFit.
+
+ This is safe to do because the preference is off by default and Safari 3, which is the only client that turns it on,
+ is using the setter and not messing around with NSUserDefaults.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.m:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences shrinksStandaloneImagesToFit]):
+ (-[WebPreferences setShrinksStandaloneImagesToFit:]):
+
+2007-11-29 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Anders
+
+ Support for <rdar://problem/5556381> and <rdar://problem/5556379>
+
+ Hook up UI Delegate calls for the database engine feature and other small tweaks
+
+ * Storage/WebDatabaseManager.mm:
+ (-[WebDatabaseManager detailsForDatabase:withOrigin:]): Renamed databaseName parameter to databaseIdentifier for clarity
+ (-[WebDatabaseManager deleteDatabase:withOrigin:]): Renamed databaseName parameter to databaseIdentifier for clarity
+ * Storage/WebDatabaseManagerPrivate.h:
+
+ * Storage/WebDatabaseTrackerClient.h:
+ * Storage/WebDatabaseTrackerClient.mm:
+ (WebDatabaseTrackerClient::dispatchDidModifyDatabase): Renamed databaseName parameter to databaseIdentifier for clarity
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::requestQuotaIncreaseForNewDatabase): Call through to the UI Delegate
+ (WebChromeClient::requestQuotaIncreaseForDatabaseOperation): Ditto
+
+ * WebView/WebUIDelegatePrivate.h: Added the two UI Delegate methods
+
+ * WebView/WebView.mm:
+ (CallDelegateReturningUnsignedLongLong):
+ (CallUIDelegateReturningUnsignedLongLong):
+ * WebView/WebViewInternal.h:
+
+2007-11-28 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Sam.
+
+ - Added recursive runloop guards.
+
+ * DefaultDelegates/WebScriptDebugServer.m:
+ (-[WebScriptDebugServer suspendProcessIfPaused]):
+
+2007-11-29 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix an assertion failure seen on the layout tests, and when closing the window after
+ visiting <http://www.coudal.com/losalamos/>.
+
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream _destroyStream]): Unlink the file and close the file
+ descriptor even when the stream is being destroyed without the load completing. This
+ avoids leaking the path and file descriptor, and leaving the temporary file on disk.
+
+2007-11-28 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for <rdar://problem/5524216> CrashTracer: [USER] 496 crashes in Safari at com.apple.WebCore: WebCore::Frame::eventHandler const + 6
+
+ The CrashTracer shows a variety of crashes in different methods (including keyDown and keyUp). This change adds nil checks for the frame in
+ WebHTMLView to prevent future problems in other methods as well.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
+ (-[WebHTMLView keyDown:]):
+ (-[WebHTMLView keyUp:]):
+ (-[WebHTMLView flagsChanged:]):
+ (-[WebHTMLView _selectionStartFontAttributesAsRTF]):
+ (-[WebHTMLView _changeCSSColorUsingSelector:inRange:]):
+ (-[WebHTMLView checkSpelling:]):
+ (-[WebHTMLView showGuessPanel:]):
+ (-[WebHTMLView indent:]):
+ (-[WebHTMLView outdent:]):
+ (-[WebHTMLView paste:]):
+ (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
+ (-[WebHTMLView insertText:]):
+ (-[WebHTMLView selectionTextRects]):
+
+2007-11-28 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ - fix <rdar://problem/5596160> fast/events/objc-event-api.html fails when run alone (or first)
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView setDataSource:]): This method calls addMouseMovedObserver
+ because addMouseMovedObserver returns early if the dataSource
+ is not nil. But if the dataSource is already set (which happens when
+ a WebHTMLView is being reused) then addMouseMovedObserver must not
+ be called again.
+
+2007-11-27 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Brady.
+
+ * Storage/WebDatabaseManager.mm:
+ * Storage/WebDatabaseManagerPrivate.h:
+ * Storage/WebDatabaseTrackerClient.mm:
+ (WebDatabaseTrackerClient::dispatchDidModifyOrigin):
+ (WebDatabaseTrackerClient::dispatchDidModifyDatabase):
+ * Storage/WebSecurityOrigin.mm:
+ (-[WebSecurityOrigin _initWithWebCoreSecurityOriginData:]):
+ * Storage/WebSecurityOriginInternal.h:
+
+2007-11-27 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Darin, landed by Anders.
+
+ Fixed: <rdar://problem/4610818> CrashTracer: 1533 crashes in Safari at com.macromedia.Flash Player.plugin: native_ShockwaveFlash_TCallLabel + 271131
+
+ The problem was that some Leopard users were still inadvertently using the old Flash 8 plug-in, even though Leopard
+ shipped with Flash 9. To avoid loading an older version of a plug-in when a newer version is installed, the plug-in
+ database will compare bundle versions and always load the latest version.
+
+ * Plugins/WebBasePluginPackage.h:
+ * Plugins/WebBasePluginPackage.m:
+ (-[WebBasePluginPackage versionNumber]): New method. CFBundleGetVersionNumber doesn't work with all possible versioning schemes,
+ but we think for now it's good enough for us.
+ * Plugins/WebPluginDatabase.m:
+ (considerCandidate): Added a C utility function which compares the current plug-in against a candidate plug-in's version number.
+ If both plug-ins have the same bundle ID and the candiate is newer, the current plug-in becomes the candidate.
+ (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]): Calls the new considerCandidate() function.
+
+2007-11-26 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ <rdar://problem/5569233> Add the ability to disable author and user CSS styles
+
+ * WebView/WebPreferenceKeysPrivate.h: Define WebKitRespectStandardStyleKeyEquivalentsPreferenceKey.
+ * WebView/WebPreferences.m:
+ (+[WebPreferences initialize]): Default WebKitRespectStandardStyleKeyEquivalentsPreferenceKey to YES.
+ (-[WebPreferences authorAndUserStylesEnabled]): Return the setting's BOOL value.
+ (-[WebPreferences setAuthorAndUserStylesEnabled:]): Set the setting's BOOL value.
+ * WebView/WebPreferencesPrivate.h: Add authorAndUserStylesEnabled and setAuthorAndUserStylesEnabled:.
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Update WebCore::Settings::authorAndUserStylesEnabled.
+
+2007-11-26 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Mark Rowe
+
+ Provide API for setting the default storage quota per database origin
+
+ * Misc/WebNSDictionaryExtras.h:
+ * Misc/WebNSDictionaryExtras.m:
+ (-[NSMutableDictionary _webkit_setUnsignedLongLong:forKey:]): Helper for UINT64 preferences
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.m:
+ (-[WebPreferences _unsignedLongLongValueForKey:]): Helper for UINT64 prefs
+ (-[WebPreferences _setUnsignedLongLongValue:forKey:]): Ditto
+ (-[WebPreferences defaultDatabaseQuota]):
+ (-[WebPreferences setDefaultDatabaseQuota:]):
+ * WebView/WebPreferencesPrivate.h:
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Set the WebCore Settings version of the default storage pref
+
+2007-11-26 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele.
+
+ - some middle-mouse-button-related fixes
+
+ These don't affect Safari since it maps the middle mouse button to the command key,
+ but that might not always be the case for future versions.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView otherMouseDown:]): Pass through middle mouse down events to WebCore.
+ (-[WebHTMLView otherMouseDragged:]): Ditto, for drag events.
+ (-[WebHTMLView otherMouseUp:]): Ditto, for up events.
+
+ * WebView/WebPolicyDelegate.h: Fixed inaccurate documentation of WebActionButtonKey.
+
+2007-11-26 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Brady.
+
+ Get rid of the WebSecurityOriginPrivate object and store
+ the WebCore::SecurityOriginData pointer in the _private field of
+ the WebSecurityOrigin object instead.
+
+ * Storage/WebDatabaseManager.mm:
+ (-[WebDatabaseManager databasesWithOrigin:]):
+ (-[WebDatabaseManager detailsForDatabase:withOrigin:]):
+ (-[WebDatabaseManager deleteDatabasesWithOrigin:]):
+ (-[WebDatabaseManager deleteDatabase:withOrigin:]):
+ * Storage/WebSecurityOrigin.mm:
+ (-[WebSecurityOrigin initWithProtocol:domain:port:]):
+ (-[WebSecurityOrigin protocol]):
+ (-[WebSecurityOrigin domain]):
+ (-[WebSecurityOrigin port]):
+ (-[WebSecurityOrigin usage]):
+ (-[WebSecurityOrigin quota]):
+ (-[WebSecurityOrigin setQuota:]):
+ (-[WebSecurityOrigin dealloc]):
+ (-[WebSecurityOrigin finalize]):
+ (-[WebSecurityOrigin _initWithWebCoreSecurityOriginData:]):
+ (-[WebSecurityOrigin _core]):
+ * Storage/WebSecurityOriginInternal.h:
+
+2007-11-26 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Bug 16137: Web Inspector window on Leopard should have a unified toolbar and window title
+ http://bugs.webkit.org/show_bug.cgi?id=16137
+
+ Create the Web Inspector window with the textured style. Set the content border
+ thickness for the top of the window or the height of the toolbar. Also make the
+ window's bottom corners square, since a normal textured window normally has
+ rounded bottom corners.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController window]):
+
+2007-11-24 Mark Rowe <mrowe@apple.com>
+
+ Tiger build fix.
+
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (CarbonPathFromPOSIXPath): Use WebCFAutorelease as this also works on Tiger.
+
+2007-11-24 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Fix <rdar://problem/5432686> 333MB RPRVT seems to leak @ www.43folders.com (1hr plug-in stream).
+ http://bugs.webkit.org/show_bug.cgi?id=13705
+
+ Have NP_ASFILE and NP_ASFILEONLY streams write the data to disk as they receive it rather than
+ dumping the data to disk in a single go when the stream has completed loading. On a test case
+ involving a 150MB Flash movie being streamed from a local web server this reduces memory consumption
+ on page load from around 400MB to 22MB.
+
+ The only plugin I have found that uses NP_ASFILE or NP_ASFILEONLY on the Mac is our NetscapeMoviePlugin
+ example code so the NP_ASFILE portion of this change has not had any testing with a real-world plugin.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
+ (-[WebBaseNetscapePluginStream dealloc]):
+ (-[WebBaseNetscapePluginStream finalize]):
+ (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
+ (-[WebBaseNetscapePluginStream _destroyStream]): Update to work with paths as NSStrings.
+ (-[WebBaseNetscapePluginStream _deliverDataToFile:]): Open the file if it is not already open, and write any data
+ to disk.
+ (-[WebBaseNetscapePluginStream finishedLoading]): If the stream is NP_ASFILE or NP_ASFILEONLY we need to ensure
+ that the file exists before _destroyStream passes it to the plugin. Simulating the arrival of an empty data block
+ ensure that the file will be created if it has not already.
+ (-[WebBaseNetscapePluginStream receivedData:]):
+ (CarbonPathFromPOSIXPath):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView pluginViewFinishedLoading:]): Data is dealt with incrementally so there's no need to pass
+ it to finishedLoading.
+ (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): Ditto.
+
+2007-11-23 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Fixed <rdar://problem/3759190> allow input methods the option of processing mouse events themselves
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView mouseDown:]):
+
+2007-11-22 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Antti Koivisto.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=15811
+ WebKit plug-ins can re-enter WebKit under attach()
+ <rdar://problem/5577978>
+
+ * Plugins/WebNullPluginView.mm:
+ (-[WebNullPluginView viewDidMoveToWindow]): Removed workaround for the
+ above bug that added as part of fixing
+ <http://bugs.webkit.org/show_bug.cgi?id=15804>.
+
+2007-11-21 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Eric.
+
+ Fix WebKit to build without warnings under GCC 4.2.
+
+ * Configurations/Base.xcconfig:
+
+2007-11-21 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Changes due to <rdar://problem/5602936> Need to resolve new GCC 4.2 warnings
+
+ Update format strings to use format specifiers that match the argument types.
+
+ * Misc/WebGraphicsExtras.c:
+ (WebConvertBGRAToARGB):
+
+2007-11-19 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Maciej
+
+ Finished hooking up the WebKit API for database management.
+ Most of the API is actually implemented in WebCore and some of those methods might
+ only be stubs for now.
+
+ * Storage/WebDatabaseManager.mm:
+ (-[WebDatabaseManager origins]): Call through to the WebCore tracker and construct an API result
+ (-[WebDatabaseManager databasesWithOrigin:]): Ditto
+ (-[WebDatabaseManager detailsForDatabase:withOrigin:]): Ditto
+
+ * Storage/WebSecurityOrigin.mm:
+ (-[WebSecurityOrigin usage]): Call through to WebCore
+ (-[WebSecurityOrigin quota]): Ditto
+ (-[WebSecurityOrigin setQuota:]): Ditto
+ (-[WebSecurityOrigin _core]): Get WebCore version of this object
+ * Storage/WebSecurityOriginInternal.h:
+
+2007-11-17 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Bug 13470: i18n: The Web Inspector is not localizable
+ http://bugs.webkit.org/show_bug.cgi?id=13470
+
+ Implement the localizedStringsURL() client method to return the
+ localized URL of InspectorLocalizedStrings.js in WebCore.
+
+ * WebCoreSupport/WebInspectorClient.h: Added localizedStringsURL.
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::localizedStringsURL): Added.
+ (WebInspectorClient::updateWindowTitle): Localized the window title.
+ (-[WebInspectorWindowController init]): Remove a FIXME that dosen't make sense anymore.
+ (-[WebInspectorWindowController initWithInspectedWebView:]): Code style cleanup.
+
+2007-11-17 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=15969
+ Eliminate Editor::deleteRange()
+
+ * WebView/WebHTMLView.mm:
+ (+[WebHTMLView initialize]):
+ (-[WebHTMLView yank:]):
+ (-[WebHTMLView yankAndSelect:]):
+ (-[WebHTMLView setMark:]):
+ (-[WebHTMLView deleteToMark:]):
+ (-[WebHTMLView selectToMark:]):
+ (-[WebHTMLView swapWithMark:]):
+ Pushed all kill ring methods to WebCore. They were guilty of using Editor::deleteRange()!
+
+2007-11-16 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Build WebCore as a sub-framework of WebKit in all configurations.
+
+ * Configurations/WebKit.xcconfig:
+
+2007-11-16 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Brady
+
+ * WebKit.exp:
+ Exported some new database-related symbols
+
+2007-11-16 Brady Eidson <beidson@apple.com>
+
+ Reviewed by John
+
+ Database management API tweaks
+
+ Fleshed out "WebSecurityOrigin" to be the API object representing an origin. This relieves some
+ burden off WebDatabaseManager and allows usage/quota operations on the SecurityOrigin object itself
+
+ Also added a new subdirectory for Storage related API - Why are we afraid to add new directories to
+ the WebKit tree?
+
+ * Misc/WebSecurityOrigin.mm: Removed.
+ * Misc/WebSecurityOriginInternal.h: Removed.
+ * Misc/WebSecurityOriginPrivate.h: Removed.
+
+ * Storage/WebDatabaseManager.mm: Work in terms of WebSecurityOrigin
+ * Storage/WebDatabaseManagerPrivate.h:
+
+ * Storage/WebSecurityOrigin.mm: Added.
+ (-[WebSecurityOriginPrivate initWithProtocol:domain:port:]):
+ (-[WebSecurityOriginPrivate initWithWebCoreSecurityOrigin:]):
+ (-[WebSecurityOriginPrivate finalize]):
+ (-[WebSecurityOriginPrivate dealloc]):
+ (-[WebSecurityOrigin initWithProtocol:domain:]):
+ (-[WebSecurityOrigin initWithProtocol:domain:port:]):
+ (-[WebSecurityOrigin protocol]):
+ (-[WebSecurityOrigin domain]):
+ (-[WebSecurityOrigin port]):
+ (-[WebSecurityOrigin usage]):
+ (-[WebSecurityOrigin quota]):
+ (-[WebSecurityOrigin setQuota:]): Clients will set quotas on the WebSecurityOrigin object itself
+ (-[WebSecurityOrigin dealloc]):
+ (-[WebSecurityOrigin _initWithWebCoreSecurityOriginData:]):
+ * Storage/WebSecurityOriginInternal.h: Added.
+ * Storage/WebSecurityOriginPrivate.h: Added.
+
+2007-11-15 Brady Eidson <beidson@apple.com>
+
+ Reviewed by John
+
+ Stubbing out everything required for a WebKit API for databases
+
+ These interfaces seem to provide everything we need for UI and management at the browser level
+
+ * Misc/WebDatabaseManager.h: Removed.
+ * Misc/WebDatabaseManager.mm: Removed.
+ * Misc/WebDatabaseManagerPrivate.h: Removed.
+
+ * Misc/WebSecurityOrigin.mm: Added. Object that acts as a container for the "SecurityOrigin tuple"
+ (protocol, domain, and port)
+ (-[WebSecurityOriginPrivate initWithProtocol:domain:port:]):
+ (-[WebSecurityOriginPrivate dealloc]):
+ (-[WebSecurityOrigin initWithProtocol:domain:]):
+ (-[WebSecurityOrigin initWithProtocol:domain:port:]):
+ (-[WebSecurityOrigin protocol]):
+ (-[WebSecurityOrigin domain]):
+ (-[WebSecurityOrigin port]):
+ (-[WebSecurityOrigin dealloc]):
+ (-[WebSecurityOrigin _initWithWebCoreSecurityOriginData:WebCore::]):
+ * Misc/WebSecurityOriginInternal.h: Added.
+ * Misc/WebSecurityOriginPrivate.h: Added.
+
+ * Storage/WebDatabaseManager.mm: Added.
+ (+[WebDatabaseManager sharedWebDatabaseManager]):
+ (-[WebDatabaseManager origins]): Get a list of all origins currently tracked
+ (-[WebDatabaseManager detailsForOrigin:]): Get the current usage and current quota for the given origin
+ (-[WebDatabaseManager databasesWithOrigin:]): Get all databases for a certain origin
+ (-[WebDatabaseManager detailsForDatabase:withOrigin:]): Get all details about a specific database
+ (-[WebDatabaseManager setQuota:forOrigin:]): Change origin-wide quota
+ (-[WebDatabaseManager deleteAllDatabases]):
+ (-[WebDatabaseManager deleteAllDatabasesWithOrigin:]):
+ (-[WebDatabaseManager deleteDatabase:withOrigin:]):
+ * Storage/WebDatabaseManagerPrivate.h: Added.
+ * Storage/WebDatabaseManagerInternal.h: Added.
+ (WebKitInitializeDatabasesIfNecessary): One-time initialization of database-related things
+
+ * Storage/WebDatabaseTrackerClient.h: Added. Stubbed out client for notifications
+ * Storage/WebDatabaseTrackerClient.mm: Added.
+ (WebDatabaseTrackerClient::sharedWebDatabaseTrackerClient):
+ (WebDatabaseTrackerClient::WebDatabaseTrackerClient):
+ (WebDatabaseTrackerClient::~WebDatabaseTrackerClient):
+ (WebDatabaseTrackerClient::dispatchDidModifyOrigin):
+ (WebDatabaseTrackerClient::dispatchDidModifyDatabase):
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]): Do one-time initialization of
+ Database-related things here
+
+2007-11-13 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Renamed Shared to RefCounted.
+
+ * ForwardingHeaders/wtf/RefCounted.h: Copied from WebKit/mac/ForwardingHeaders/wtf/Shared.h.
+ * ForwardingHeaders/wtf/Shared.h: Removed.
+ * WebCoreSupport/WebContextMenuClient.h:
+
+2007-11-13 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Moved Shared.h into wtf so it could be used in more places.
+
+ * ChangeLog:
+ * WebCoreSupport/WebContextMenuClient.h:
+
+2007-11-13 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Darin Adler.
+
+ removed recently-added PreferredType concept; we found a better way to do what
+ ths was accomplishing
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::createWindow):
+ removed use of PreferredType
+
+2007-11-13 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ - fixed <rdar://problem/5567954> REGRESSION (Safari 2-3): Autofill no longer automatically fills in
+ form fields other than the one you're typing into
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (selectorForKeyEvent):
+ correct the key identifier strings for Tab and Esc; these were updated in WebCore as part of r21445
+ but didn't get updated here.
+
+2007-11-12 Josh Aas <joshmoz@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=15946
+ add NPPValue NPPVpluginDrawingModel (Mozilla bug 403418 compat)
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView setVariable:value:]):
+
+2007-11-12 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=15954
+ Move DOM Selection operations out of SelectionController
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _expandSelectionToGranularity:]):
+ (-[WebHTMLView selectToMark:]):
+ (-[WebHTMLView swapWithMark:]):
+ * WebView/WebView.mm:
+ (-[WebView setSelectedDOMRange:affinity:]):
+ Adapted for SelectionController::setSelectedRange() now returning a bool.
+
+2007-11-12 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Darin and Geoff.
+
+ <rdar://problem/5522011> The content of the password field of
+ Safari is displayed by reconversion.
+
+ Some input methods (notably Kotoeri) can incorrectly provide
+ access to the raw text of a password field. To work around
+ this we forcefully override the inputContext whenever a password
+ field is active.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView inputContext]):
+
+2007-11-12 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Tim Hatcher
+
+ - speculative fix for <rdar://problem/5509989> CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit:
+ -[WebPDFView(FileInternal) _updatePreferencesSoon] + 56
+
+ The crash is probably due to messaging a dealloc'ed dataSource ivar. The dataSource ivar isn't retained
+ by this class, but should be. (It is retained by WebHTMLView, e.g.).
+
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView dealloc]):
+ release dataSource ivar
+ (-[WebPDFView setDataSource:]):
+ retain dataSource ivar
+
+2007-11-09 Tristan O'Tierney <tristan@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ This patch is for the WebKit side of <rdar://problem/5591115>.
+ We need a way to tell context menu navigations, such as "Open in New Window"
+ to override any sort of browser preference for tab based navigation.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::createWindow):
+ Pass up the new preferredType parameter as a string.
+
+2007-11-09 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by John.
+
+ <rdar://problem/5103720> REGRESSION: [WebView stringByEvaluatingJavaScriptFromString:] fails if "return" is used
+
+ Extend the linked on or after check to every application when a script passed to
+ stringByEvaluatingJavaScriptFromString: has a return statement. Before the check
+ was limited to VitalSource Bookshelf, but other developers are running into this.
+
+ * Misc/WebKitVersionChecks.h: Add the WEBKIT_FIRST_VERSION_WITHOUT_JAVASCRIPT_RETURN_QUIRK define.
+ * WebView/WebDocumentLoaderMac.mm:
+ (needsDataLoadWorkaround): Use WEBKIT_FIRST_VERSION_WITHOUT_ADOBE_INSTALLER_QUIRK sicne the
+ WebKitLinkedOnOrAfter check here was about the Adobe installer, not VitalSource.
+ * WebView/WebView.mm:
+ (-[WebView stringByEvaluatingJavaScriptFromString:]): Remove the bundle ID check and use
+ WEBKIT_FIRST_VERSION_WITHOUT_JAVASCRIPT_RETURN_QUIRK for the WebKitLinkedOnOrAfter call.
+
+2007-11-08 Kevin McCullough <kmccullough@apple.com>
+
+ Build Fix.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::windowObjectCleared):
+
+2007-11-07 Darin Adler <darin@apple.com>
+
+ Reviewed by Steve.
+
+ - removed some unused WebCore bridge methods
+
+ * WebCoreSupport/WebFrameBridge.mm: Removed issueTransposeCommand and overrideMediaType.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::overrideMediaType): Changed to call WebView directly instead of
+ using the bridge object.
+
+2007-11-06 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Dave Kilzer.
+
+ Move Mac files from WebKit into WebKit/mac.
+
+ * Carbon: Copied from WebKit/Carbon.
+ * ChangeLog: Copied from WebKit/ChangeLog.
+ * ChangeLog-2002-12-03: Copied from WebKit/ChangeLog-2002-12-03.
+ * ChangeLog-2006-02-09: Copied from WebKit/ChangeLog-2006-02-09.
+ * ChangeLog-2007-10-14: Copied from WebKit/ChangeLog-2007-10-14.
+ * Configurations: Copied from WebKit/Configurations.
+ * DOM: Copied from WebKit/DOM.
+ * DefaultDelegates: Copied from WebKit/DefaultDelegates.
+ * ForwardingHeaders: Copied from WebKit/ForwardingHeaders.
+ * History: Copied from WebKit/History.
+ * Info.plist: Copied from WebKit/Info.plist.
+ * MigrateHeaders.make: Copied from WebKit/MigrateHeaders.make.
+ * Misc: Copied from WebKit/Misc.
+ * Panels: Copied from WebKit/Panels.
+ * Plugins: Copied from WebKit/Plugins.
+ * PublicHeaderChangesFromTiger.txt: Copied from WebKit/PublicHeaderChangesFromTiger.txt.
+ * Resources: Copied from WebKit/Resources.
+ * WebCoreSupport: Copied from WebKit/WebCoreSupport.
+ * WebInspector: Copied from WebKit/WebInspector.
+ * WebKit.exp: Copied from WebKit/WebKit.exp.
+ * WebKit.order: Copied from WebKit/WebKit.order.
+ * WebKitPrefix.h: Copied from WebKit/WebKitPrefix.h.
+ * WebView: Copied from WebKit/WebView.
+ * icu: Copied from WebKit/icu.
+
+2007-11-06 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=15847
+ Some editing cleanup
+
+ No change in functionality.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView deleteToEndOfLine:]):
+ (-[WebHTMLView deleteToEndOfParagraph:]):
+ WebCore had a duplicate of the same logic already. We are passing a boundary value to
+ a function that expects granularity, this may need to be straightened out in the future.
+
+2007-11-05 John Sullivan <sullivan@apple.com>
+
+ * WebView/WebView.mm:
+ (-[WebView _searchWithSpotlightFromMenu:]):
+
+ Teeny style tweak to test svn access on other machine
+
+2007-11-05 John Sullivan <sullivan@apple.com>
+
+ * WebView/WebView.mm:
+ (-[WebView computedStyleForElement:pseudoElement:]):
+
+ Teeny style tweak to test svn access
+
+2007-11-02 Tristan O'Tierney <tristan@apple.com>
+
+ Reviewed by Darin Adler.
+
+ * DefaultDelegates/WebDefaultUIDelegate.m:
+ (-[WebDefaultUIDelegate webView:createWebViewWithRequest:windowFeatures:]):
+ Forward the UI delegate to call webView:createWebViewWithRequest: if
+ this method doesn't exist.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchCreatePage):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView loadPluginRequest:]):
+ * WebView/WebView.mm:
+ (-[WebView _openNewWindowWithRequest:]):
+ Revised to use new webView:createWebViewWithRequest:windowFeatures: callback.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::createWindow):
+ Added a new createWindow that accepts 3 parameters, so we can pass up windowFeatures to the chrome.
+ Removed createModalDialog to use new createWindow function.
+
+ * WebView/WebUIDelegatePrivate.h:
+ Added new webView:createWebViewWithRequest:windowFeatures: method.
+
+2007-11-05 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=15835
+
+ Small adaptations to new KJS::List class.
+
+ * ForwardingHeaders/kjs/value.h: Added.
+
+2007-11-03 David D. Kilzer <ddkilzer@webkit.org>
+
+ Sort files(...); sections of Xcode project files.
+
+ Rubber-stamped by Darin Adler.
+
+ * WebKit.xcodeproj/project.pbxproj:
+
+2007-11-02 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add method to enable video composition.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+
+2007-11-02 Darin Adler <darin@apple.com>
+
+ Reviewed by Mitz.
+
+ - fix problem I ran into while doing some testing on Mac for
+ <rdar://problem/5530185> WebKit does not show <object>
+ fallback content when both URL and MIME type is omitted
+
+ I don't know how to reproduce this failure in DumpRenderTree, so there is no
+ regression test.
+
+ * Plugins/WebNullPluginView.h: Removed some unneeded declarations, including
+ the didSendError local variable. Instead we just set the error to nil once
+ we've sent it.
+ * Plugins/WebNullPluginView.mm:
+ (-[WebNullPluginView initWithFrame:error:DOMElement:]): Refactored so that
+ the null plug-in image code is separate from the rest of the function and
+ so that the whole thing is not inside an if statement. Also don't hold a
+ reference to the DOM element if there is no error to report.
+ (-[WebNullPluginView reportFailure]): Added. Does the actual delegate
+ callback. Happens back at the top level of the run loop so it doesn't
+ fire deep inside layout. Also wrote this so that it is guaranteed not to
+ reenter and so that it can handle the case where the delegate destroys
+ the world (including this object). NOTE: This is not a real, general
+ solution to the problem of plug-ins that do work inside layout. We will need
+ a more general fix that works for other plug-ins, and we'll track that with
+ a separate bug report.
+ (-[WebNullPluginView viewDidMoveToWindow]): Removed most of the code;
+ changed so it just does a performSelector:afterDelay:0.
+
+2007-11-02 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix http://bugs.webkit.org/show_bug.cgi?id=15780
+ Bug 15780: WebFrameLoaderClient: WebActionElementKey wrong if view is scrolled
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::actionDictionary): Retrieve the mouse event coordinates
+ in the page coordinate system rather than the client area coordinate system.
+
+2007-11-01 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ - fix an assertion failure when Command-Tabbing out of Safari
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView flagsChanged:]): Avoid passing key code 0 down to
+ WebCore.
+
+2007-11-01 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/5195056> Huge plain text pastes are slow, time spent in ApplyStyleCommand::doApply
+
+ No need to match style when pasting plain text, since the fragment we build for plain text
+ won't have any style information on it.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]): There's no
+ longer a need to know whether this function chosePlaintext.
+ (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]):
+ (-[WebHTMLView _documentFragmentFromPasteboard:]):
+
+2007-10-31 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Move the developer extras preference to WebPreferences.
+
+ * WebView/WebPreferenceKeysPrivate.h: Add WebKitDeveloperExtrasEnabledPreferenceKey
+ * WebView/WebPreferences.m:
+ (+[WebPreferences initialize]): Initialize WebKitDeveloperExtrasEnabledPreferenceKey to NO.
+ (-[WebPreferences developerExtrasEnabled]): Check DisableWebKitDeveloperExtras, WebKitDeveloperExtras
+ and IncludeDebugMenu in addition to WebKitDeveloperExtrasEnabledPreferenceKey.
+ (-[WebPreferences setDeveloperExtrasEnabled:]): Set WebKitDeveloperExtrasEnabledPreferenceKey.
+ * WebView/WebPreferencesPrivate.h: Add developerExtrasEnabled and setDeveloperExtrasEnabled:.
+ * WebView/WebView.mm:
+ (+[WebView _developerExtrasEnabled]): Removed.
+ (-[WebView _preferencesChangedNotification:]): Check the WebPreferences object for developerExtrasEnabled.
+ * WebView/WebViewPrivate.h: Removed _developerExtrasEnabled.
+
+2007-10-30 David D. Kilzer <ddkilzer@webkit.org>
+
+ Generated files missing from WebCore's Xcode project file
+ <http://bugs.webkit.org/show_bug.cgi?id=15406>
+
+ Reviewed by Darin Adler.
+
+ Added the following private header files to MigrateHeaders.make:
+
+ - DOMCSSStyleSheetPrivate.h
+ - DOMEventPrivate.h
+ - DOMHTMLCollectionPrivate.h
+ - DOMHTMLEmbedElementPrivate.h
+ - DOMHTMLIFrameElementPrivate.h
+ - DOMHTMLObjectElementPrivate.h
+ - DOMHTMLSelectElementPrivate.h
+
+ * MigrateHeaders.make:
+
+2007-10-29 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Maciej.
+
+ Some SPIs for media support.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+
+2007-10-29 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Various semi-related changes:
+ - A WebView can now be asked for it's WebInspector. There is one
+ WebInspector per WebView.
+ - Refactor the WebInspector class and move obsolete methods to
+ a special category.
+ - Add new WebInspector methods to show, hide and show the
+ console/timeline panels.
+ - Add an isDisabled method to WebCache.
+ - Allow WebLocalizableStrings.h to be used in C files.
+
+ * Misc/WebCache.h: Add isDisabled.
+ * Misc/WebCache.mm:
+ (+[WebCache isDisabled]): New method.
+
+ * Misc/WebLocalizableStrings.h: Changes to allow use in plain C files.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController showWindow:]): Call super if already visible
+ so the window will be ordered front.
+ (-[WebInspectorWindowController showWebInspector:]): Method used by menu items,
+ so they are enabled and work when the Inspector window is key.
+ (-[WebInspectorWindowController showErrorConsole:]): Ditto.
+ (-[WebInspectorWindowController showNetworkTimeline:]): Ditto.
+
+ * WebInspector/WebInspector.h: Add and remove methods.
+ * WebInspector/WebInspector.mm:
+ (-[WebInspector webViewClosed]): Called when the WebView is closed/dealloced.
+ Clears the _webView pointer.
+ (-[WebInspector show:]): Calls thru to the Page's InspectorController.
+ (-[WebInspector showConsole:]): Ditto.
+ (-[WebInspector showTimeline:]): Ditto.
+ (-[WebInspector close:]): Ditto.
+ (-[WebInspector attach:]): Ditto.
+ (-[WebInspector detach:]): Ditto.
+ (+[WebInspector sharedWebInspector]): Moved to the obsolete category.
+ (+[WebInspector webInspector]): Ditto.
+ (-[WebInspector setWebFrame:]): Ditto.
+ (-[WebInspector window]): Ditto.
+ (-[WebInspector showWindow:]): Ditto.
+
+ * WebView/WebView.mm:
+ (-[WebViewPrivate dealloc]): Release the WebInspector.
+ (-[WebView _close]): Call webViewClosed on the WebInspector.
+ (-[WebView inspector]): Create a WebInspector if needed and return it.
+ * WebView/WebViewPrivate.h: Add the inspector method.
+
+2007-10-30 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin Adler.
+
+ WebKit part of fix for http://bugs.webkit.org/show_bug.cgi?id=10577
+ <rdar://problem/5103625> REGRESSION: Caps lock icon should show in password fields
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView flagsChanged:]): Call capsLockStateMayHaveChanged so WebCore knows it may have to update a password field.
+ (+[WebHTMLView _postFlagsChangedEvent:]): Added a comment with a Radar number for why this isn't just in flagsChanged.
+ (-[WebHTMLView scrollWheel:]): Instead of calling the next responder explicitly, we can just call super, which will take care of this.
+
+2007-10-27 Mark Ambachtsheer <mark.a@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for bug 15710, When QD plugins draw to an offscreen bitmap and the plugin is not at
+ (0, 0) the clipping rectangle is not correct.
+ Added the origin to the window clip rectangle coordinates to account for plugins that
+ don't originate at (0,0); affects code for offscreen GWorlds only.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+
+2007-10-26 Adele Peterson <adele@apple.com>
+
+ Reviewed by Oliver.
+
+ Adding WebKitSystemInterface support for the caps lock indicator
+
+ * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
+
+2007-10-25 David Hyatt <hyatt@apple.com>
+
+ Fix for bug 15672, backgrounds don't tile properly inside transforms. This patch fixes tiling
+ of backgrounds inside CSS transforms and also of HTML content with background images inside SVG
+ transforms.
+
+ Reviewed by aroben and mmitz
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+ * WebKit.xcodeproj/project.pbxproj:
+
+2007-10-25 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Tim Hatcher
+
+ Removed the support for toggling whether WebKit uses the 10.5 PDFKit improvements. Now it
+ always does, when available.
+
+ * WebView/WebPreferencesPrivate.h:
+ removed _usePDFPreviewView and _setUsePDFPreviewView:. Note that these were guarded with
+ a comment that says that they can be removed when no longer needed. That time is now.
+
+ * WebView/WebPreferences.m:
+ (+[WebPreferences initialize]):
+ removed WebKitUsePDFPreviewViewPreferenceKey
+ (-[WebPreferences _usePDFPreviewView]):
+ removed
+ (-[WebPreferences _setUsePDFPreviewView:]):
+ removed
+
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView initWithFrame:]):
+ don't check _usePDFPreviewView
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ removed WebKitUsePDFPreviewViewPreferenceKey
+
+2007-10-24 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ <rdar://problem/5069711> OpenSource version of libWebKitSystemInterface.a is Tiger only, causes issues if used on Leopard
+
+ Use the WebKitSystemInterface that matches the system version.
+
+ * Configurations/DebugRelease.xcconfig:
+ * WebKit.xcodeproj/project.pbxproj:
+
+2007-10-24 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Anders
+
+ <rdar://problem/5554130> DatabaseTracker.o has a global initializer
+
+ * Misc/WebDatabaseManager.mm:
+ (WebKitSetWebDatabasesPathIfNecessary): Call the member function instead of a static one
+
+2007-10-23 Mark Rowe <mrowe@apple.com>
+
+ Build fix for Eric's build fix in r26916.
+
+ * MigrateHeaders.make:
+
+2007-10-22 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Maciej.
+
+ * MigrateHeaders.make: copy over font-face related DOM headers
+
+2007-10-22 Andrew Wellington <proton@wiretapped.net>
+
+ Reviewed by Mark Rowe.
+
+ Fix for local database support after r26879
+ Ensure that ENABLE_DATABASE and ENABLE_ICONDATABASE are correctly set
+
+ * Configurations/WebKit.xcconfig:
+
+2007-10-19 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Tim Hatcher
+
+ Added support for Chrome prompts required by the Storage API
+ Added support API for future managing of databases from the WebKit client
+ Added preference and initialization for the databases path
+
+ * Misc/WebDatabaseManager.h: Added. WebDatabaseManager is how a WebKit application can list and
+ remove the current available databases
+ * Misc/WebDatabaseManager.mm: Added.
+ (+[WebDatabaseManager origins]):
+ (+[WebDatabaseManager databasesWithOrigin:]):
+ (+[WebDatabaseManager deleteAllDatabases]):
+ (+[WebDatabaseManager deleteAllDatabasesWithOrigin:]):
+ (+[WebDatabaseManager deleteDatabaseWithOrigin:named:]):
+ (WebKitSetWebDatabasesPathIfNecessary): Setup the database path
+ * Misc/WebDatabaseManagerPrivate.h: Added.
+
+ * WebCoreSupport/WebChromeClient.h: Support for calling the delegate to run the prompt for
+ an origin exceeding its size limit
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::runDatabaseSizeLimitPrompt):
+ * WebKit.xcodeproj/project.pbxproj:
+ * WebView/WebUIDelegate.h:
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]): Setup the database path
+ * WebView/WebViewInternal.h:
+
+2007-10-19 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Tim Hatcher
+
+ - fixed <rdar://problem/5540325> REGRESSION (2.0.4-3): History menu looks odd after clearing history
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate removeAllItems]):
+ This was fallout from r25275. We need to clear the orderedLastVisitedDays cache here, in addition
+ to the other places where it's cleared.
+
+2007-10-18 Dan Bernstein <mitz@apple.com>
+
+ Tiger build fix.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _MIMETypeOfResponse:]):
+
+2007-10-18 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Adam Roben.
+
+ - fix <rdar://problem/5313523>
+ REGRESSION(Leopard): http/tests/incremental/slow-utf8-text.pl fails on Leopard
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::makeDocumentView): Changed to use _responseMIMEType.
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _MIMETypeOfResponse:]): Added. Works around
+ <rdar://problem/5321972> by testing for the case of an NSHTTPURLResponse
+ with a MIMEType of application/octet-stream and a Content-Type header
+ starting with text/plain and returning text/plain as the MIME type in
+ that case.
+ (-[WebDataSource _responseMIMEType]): Added. Used to get the correct
+ response MIME type.
+ (-[WebDataSource _isDocumentHTML]): Changed to use _responseMIMEType.
+ (-[WebDataSource _makeRepresentation]): Ditto.
+ (-[WebDataSource mainResource]): Ditto.
+ (-[WebDataSource subresources]): Changed to use _MIMETypeOfResponse and
+ pass the MIME type explicitly.
+ (-[WebDataSource subresourceForURL:]): Ditto.
+ * WebView/WebDataSourcePrivate.h:
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _makeDocumentViewForDataSource:]): Changed to use
+ _responseMIMEType.
+ * WebView/WebResource.mm:
+ (-[WebResource _initWithData:URL:response:MIMEType:]): Changed this
+ method to take a MIME type instead of extracting it from the response,
+ so that WebDataSource could pass the correct MIME type.
+ * WebView/WebResourcePrivate.h:
+
+2007-10-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ - fix <rdar://problem/5183775> Uninitialized memory in -[WebDynamicScrollBarsView updateScrollers]
+
+ * WebView/WebDynamicScrollBarsView.m: (-[WebDynamicScrollBarsView updateScrollers]):
+ Change code path so it doesn't dispatch a method that returns an NSSize passing a nil object.
+ It's safe to do that for functions that return integers or pointers, but not structures.
+
+2007-10-16 David Kilzer <ddkilzer@apple.com>
+
+ Reviewed by Timothy.
+
+ <rdar://problem/5544354> Wrong delegate method called in
+ WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad()
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): Fixed selector name.
+
+2007-10-16 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele.
+
+ - moved transpose command implementation into WebCore
+
+ * WebView/WebHTMLView.mm: Removed transpose: and replaced it with standard WebCore forwarding.
+
+2007-10-16 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej and Geoff (and looked over by Eric).
+
+ - http://bugs.webkit.org/show_bug.cgi?id=15519
+ eliminate use of <ctype.h> for processing ASCII
+
+ * ForwardingHeaders/wtf/ASCIICType.h: Added.
+ * ForwardingHeaders/wtf/DisallowCType.h: Added.
+
+ * WebKitPrefix.h: Include DisallowCType.h.
+
+ * Misc/WebNSURLExtras.mm: (-[NSURL _web_URLWithLowercasedScheme]): Use toASCIILower.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView callWebCoreCommand:]): Use toASCIIUpper.
+ (-[WebTextCompleteController filterKeyDown:]): Add a list of specific character codes,
+ instead of using ispunct.
+
+2007-10-16 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Adam Roben
+
+ Cleaned up localizable strings
+
+ * English.lproj/Localizable.strings:
+ updated
+ * StringsNotToBeLocalized.txt:
+ updated
+ * WebKit.xcodeproj/project.pbxproj:
+ StringsNotToBeLocalized.txt recently moved but project file wasn't updated to match; now it is
+
+2007-10-15 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fixed: <rdar://problem/5520541> REGRESSION: Broken image when forwarding certain email on Tiger
+
+ * WebCoreSupport/WebFrameBridge.mm: The problem was that we were loading Mail's WebKit plug-in
+ too soon, which borked some necessary housekeeping on behalf of Mail. The fix is to add a quirk
+ that treats Tiger Mail's WebKit plug-in like a Netscape plug-in, thus ensuring the plug-in will
+ load during first layout and not attach time. For this plug-in, loading at first layout is
+ expected and is consistent with Safari 2 behavior.
+
+2007-10-15 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Geoff Garen
+
+ Replaced NS_DURING/NS_HANDLER with @try/@catch throughout WebKit
+
+ I made the following changes:
+ - replaced NS_DURING with @try, and added opening brace if there wasn't one
+ - replaced NS_HANDLER with @catch (NSException *localException), and added braces if there weren't any
+ - removed NS_ENDHANDLER, and added a closing brace if there wasn't one
+ - in a couple of places, fixed indentation therein
+
+ * Misc/WebIconDatabase.mm:
+ (objectFromPathForKey):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawSingleRect:]):
+ (-[WebHTMLView beginDocument]):
+ (-[WebHTMLView deleteToMark:]):
+ * WebView/WebView.mm:
+ (-[WebView initWithCoder:]):
+
+== Rolled over to ChangeLog-2007-10-14 ==
diff --git a/WebKit/mac/Configurations/FeatureDefines.xcconfig b/WebKit/mac/Configurations/FeatureDefines.xcconfig
index cd462d6..24589c7 100644
--- a/WebKit/mac/Configurations/FeatureDefines.xcconfig
+++ b/WebKit/mac/Configurations/FeatureDefines.xcconfig
@@ -26,6 +26,9 @@
// WebCore and WebKit. Also the default values of the ENABLE_FEATURE_NAME macros in build-webkit
// should match the values below, but they do not need to be in the same order.
+// Keep this list of features (not enabled/disabled state) in sync with FeatureDefines.vsprops
+// and FeatureDefinesCairo.vsprops in WebKitLibraries/win/tools/vsprops.
+
// Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature.
ENABLE_3D_CANVAS = $(ENABLE_3D_CANVAS_$(MAC_OS_X_VERSION_MAJOR));
@@ -39,14 +42,16 @@ ENABLE_3D_RENDERING_1060 = ENABLE_3D_RENDERING;
ENABLE_3D_RENDERING_1070 = ENABLE_3D_RENDERING;
ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
+ENABLE_CLIENT_BASED_GEOLOCATION = ENABLE_CLIENT_BASED_GEOLOCATION;
ENABLE_DATABASE = ENABLE_DATABASE;
-ENABLE_DATAGRID = ENABLE_DATAGRID;
+ENABLE_DATAGRID = ;
ENABLE_DATALIST = ENABLE_DATALIST;
ENABLE_DOM_STORAGE = ENABLE_DOM_STORAGE;
ENABLE_EVENTSOURCE = ENABLE_EVENTSOURCE;
ENABLE_FILTERS = ENABLE_FILTERS;
-ENABLE_GEOLOCATION = ;
+ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
ENABLE_ICONDATABASE = ENABLE_ICONDATABASE;
+ENABLE_INDEXED_DATABASE = ;
ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER;
ENABLE_MATHML = ;
ENABLE_NOTIFICATIONS = ;
@@ -63,7 +68,8 @@ ENABLE_VIDEO = ENABLE_VIDEO;
ENABLE_WEB_SOCKETS = ENABLE_WEB_SOCKETS;
ENABLE_WML = ;
ENABLE_WORKERS = ENABLE_WORKERS;
+ENABLE_XHTMLMP = ;
ENABLE_XPATH = ENABLE_XPATH;
ENABLE_XSLT = ENABLE_XSLT;
-FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(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_WML) $(ENABLE_WORKERS) $(ENABLE_XPATH) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(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_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
diff --git a/WebKit/mac/Configurations/Version.xcconfig b/WebKit/mac/Configurations/Version.xcconfig
index b3bf41d..75f9bd4 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 = 532;
-MINOR_VERSION = 6;
+MINOR_VERSION = 9;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/WebKit/mac/Info.plist b/WebKit/mac/Info.plist
index 849742c..7232293 100644
--- a/WebKit/mac/Info.plist
+++ b/WebKit/mac/Info.plist
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleGetInfoString</key>
- <string>${BUNDLE_VERSION}, Copyright 2003-2009 Apple Inc.</string>
+ <string>${BUNDLE_VERSION}, Copyright 2003-2010 Apple Inc.</string>
<key>CFBundleIdentifier</key>
<string>com.apple.${PRODUCT_NAME}</string>
<key>CFBundleInfoDictionaryVersion</key>
diff --git a/WebKit/mac/MigrateHeaders.make b/WebKit/mac/MigrateHeaders.make
index 072da65..7d01c99 100644
--- a/WebKit/mac/MigrateHeaders.make
+++ b/WebKit/mac/MigrateHeaders.make
@@ -36,6 +36,8 @@ all : \
$(PUBLIC_HEADERS_DIR)/DOM.h \
$(PUBLIC_HEADERS_DIR)/DOMAbstractView.h \
$(PUBLIC_HEADERS_DIR)/DOMAttr.h \
+ $(PRIVATE_HEADERS_DIR)/DOMBlob.h \
+ $(INTERNAL_HEADERS_DIR)/DOMBlobInternal.h \
$(PUBLIC_HEADERS_DIR)/DOMCDATASection.h \
$(PUBLIC_HEADERS_DIR)/DOMCSS.h \
$(PUBLIC_HEADERS_DIR)/DOMCSSCharsetRule.h \
diff --git a/WebKit/mac/Misc/WebCache.mm b/WebKit/mac/Misc/WebCache.mm
index 6013a5f..b29f720 100644
--- a/WebKit/mac/Misc/WebCache.mm
+++ b/WebKit/mac/Misc/WebCache.mm
@@ -115,8 +115,10 @@
[WebView _setCacheModel:WebCacheModelDocumentViewer];
[WebView _setCacheModel:cacheModel];
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
// Empty the application cache.
WebCore::cacheStorage().empty();
+#endif
// Empty the Cross-Origin Preflight cache
WebCore::CrossOriginPreflightResultCache::shared().empty();
diff --git a/WebKit/mac/Misc/WebElementDictionary.mm b/WebKit/mac/Misc/WebElementDictionary.mm
index aa703e0..7779392 100644
--- a/WebKit/mac/Misc/WebElementDictionary.mm
+++ b/WebKit/mac/Misc/WebElementDictionary.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 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
@@ -91,6 +91,7 @@ static void cacheValueForKey(const void *key, const void *value, void *self)
addLookupKey(WebElementLinkLabelKey, @selector(_textContent));
addLookupKey(WebElementLinkIsLiveKey, @selector(_isLiveLink));
addLookupKey(WebElementIsContentEditableKey, @selector(_isContentEditable));
+ addLookupKey(WebElementIsInScrollBarKey, @selector(_isInScrollBar));
}
- (id)initWithHitTestResult:(const HitTestResult&)result
@@ -254,4 +255,9 @@ static NSString* NSStringOrNil(String coreString)
return [NSNumber numberWithBool:_result->isContentEditable()];
}
+- (NSNumber *)_isInScrollBar
+{
+ return [NSNumber numberWithBool:_result->scrollbar() != 0];
+}
+
@end
diff --git a/WebKit/mac/Misc/WebKitErrors.m b/WebKit/mac/Misc/WebKitErrors.m
index ec42dc9..09aa907 100644
--- a/WebKit/mac/Misc/WebKitErrors.m
+++ b/WebKit/mac/Misc/WebKitErrors.m
@@ -53,6 +53,10 @@ NSString * const WebKitErrorPlugInPageURLStringKey = @"WebKitErrorPlugInPageU
#define WebKitErrorDescriptionPlugInCancelledConnection UI_STRING("Plug-in cancelled", "WebKitErrorPlugInCancelledConnection description")
#define WebKitErrorDescriptionPlugInWillHandleLoad UI_STRING("Plug-in handled load", "WebKitErrorPlugInWillHandleLoad description")
+// Geolocations errors
+
+#define WebKitErrorDescriptionGeolocationLocationUnknown UI_STRING("The current location cannot be found.", "WebKitErrorGeolocationLocationUnknown description")
+
static pthread_once_t registerErrorsControl = PTHREAD_ONCE_INIT;
static void registerErrors(void);
@@ -161,6 +165,9 @@ static void registerErrors()
WebKitErrorDescriptionJavaUnavailable, [NSNumber numberWithInt: WebKitErrorJavaUnavailable],
WebKitErrorDescriptionPlugInCancelledConnection, [NSNumber numberWithInt: WebKitErrorPlugInCancelledConnection],
WebKitErrorDescriptionPlugInWillHandleLoad, [NSNumber numberWithInt: WebKitErrorPlugInWillHandleLoad],
+
+ // Geolocation errors
+ WebKitErrorDescriptionGeolocationLocationUnknown, [NSNumber numberWithInt: WebKitErrorGeolocationLocationUnknown],
nil];
[NSError _webkit_addErrorsWithCodesAndDescriptions:dict inDomain:WebKitErrorDomain];
diff --git a/WebKit/mac/Misc/WebKitErrorsPrivate.h b/WebKit/mac/Misc/WebKitErrorsPrivate.h
index 6a98c4e..eee50a0 100644
--- a/WebKit/mac/Misc/WebKitErrorsPrivate.h
+++ b/WebKit/mac/Misc/WebKitErrorsPrivate.h
@@ -41,6 +41,15 @@ enum {
WebKitErrorCannotUseRestrictedPort = 103,
};
+/*!
+ @enum
+ @abstract Geolocation errors
+ @constant WebKitErrorGeolocationLocationUnknown
+*/
+enum {
+ WebKitErrorGeolocationLocationUnknown = 300,
+};
+
@interface NSError (WebKitExtras)
+ (NSError *)_webKitErrorWithCode:(int)code failingURL:(NSString *)URL;
+ (NSError *)_webKitErrorWithDomain:(NSString *)domain code:(int)code URL:(NSURL *)URL;
diff --git a/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.h b/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.h
index 946c8ac..34cea32 100644
--- a/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.h
+++ b/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.h
@@ -70,6 +70,8 @@ public:
void cancelLoad(NPReason reason);
+ static NPReason reasonForError(NSError* error);
+
private:
NSError *errorForReason(NPReason) const;
void cancelLoad(NSError *);
diff --git a/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm b/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm
index 5c25ef7..98b5a7e 100644
--- a/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm
+++ b/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm
@@ -183,7 +183,7 @@ void HostedNetscapePluginStream::didReceiveResponse(NetscapePlugInStreamLoader*,
startStream([r URL], expectedContentLength, WKGetNSURLResponseLastModifiedDate(r), [r MIMEType], theHeaders);
}
-static NPReason reasonForError(NSError *error)
+NPReason HostedNetscapePluginStream::reasonForError(NSError *error)
{
if (!error)
return NPRES_DONE;
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
index 9e29062..e62d87a 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
@@ -43,7 +43,7 @@ class NetscapePluginHostManager {
public:
static NetscapePluginHostManager& shared();
- PassRefPtr<NetscapePluginInstanceProxy> instantiatePlugin(WebNetscapePluginPackage *, WebHostedNetscapePluginView *, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled);
+ PassRefPtr<NetscapePluginInstanceProxy> instantiatePlugin(WebNetscapePluginPackage *, WebHostedNetscapePluginView *, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled, bool isAcceleratedCompositingEnabled);
void pluginHostDied(NetscapePluginHostProxy*);
@@ -52,12 +52,12 @@ public:
void didCreateWindow();
private:
- NetscapePluginHostProxy* hostForPackage(WebNetscapePluginPackage *);
+ NetscapePluginHostProxy* hostForPackage(WebNetscapePluginPackage *, bool useProxiedOpenPanel);
NetscapePluginHostManager();
~NetscapePluginHostManager();
- bool spawnPluginHost(WebNetscapePluginPackage *, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN);
+ bool spawnPluginHost(WebNetscapePluginPackage *, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN, bool useProxiedOpenPanel);
bool initializeVendorPort();
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
index 6b36a6d..281d41f 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
@@ -31,7 +31,10 @@
#import "NetscapePluginInstanceProxy.h"
#import "WebLocalizableStrings.h"
#import "WebKitSystemInterface.h"
+#import "WebHostedNetscapePluginView.h"
#import "WebNetscapePluginPackage.h"
+#import "WebPreferencesPrivate.h"
+#import "WebView.h"
#import <mach/mach_port.h>
#import <servers/bootstrap.h>
#import <spawn.h>
@@ -66,7 +69,7 @@ NetscapePluginHostManager::~NetscapePluginHostManager()
{
}
-NetscapePluginHostProxy* NetscapePluginHostManager::hostForPackage(WebNetscapePluginPackage *package)
+NetscapePluginHostProxy* NetscapePluginHostManager::hostForPackage(WebNetscapePluginPackage *package, bool useProxiedOpenPanel)
{
pair<PluginHostMap::iterator, bool> result = m_pluginHosts.add(package, 0);
@@ -82,7 +85,7 @@ NetscapePluginHostProxy* NetscapePluginHostManager::hostForPackage(WebNetscapePl
mach_port_t pluginHostPort;
ProcessSerialNumber pluginHostPSN;
- if (!spawnPluginHost(package, clientPort, pluginHostPort, pluginHostPSN)) {
+ if (!spawnPluginHost(package, clientPort, pluginHostPort, pluginHostPSN, useProxiedOpenPanel)) {
mach_port_destroy(mach_task_self(), clientPort);
m_pluginHosts.remove(result.first);
return 0;
@@ -100,7 +103,7 @@ NetscapePluginHostProxy* NetscapePluginHostManager::hostForPackage(WebNetscapePl
return hostProxy;
}
-bool NetscapePluginHostManager::spawnPluginHost(WebNetscapePluginPackage *package, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN)
+bool NetscapePluginHostManager::spawnPluginHost(WebNetscapePluginPackage *package, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN, bool useProxiedOpenPanel)
{
if (m_pluginVendorPort == MACH_PORT_NULL) {
if (!initializeVendorPort())
@@ -120,6 +123,7 @@ bool NetscapePluginHostManager::spawnPluginHost(WebNetscapePluginPackage *packag
pluginHostAppExecutablePath, @"pluginHostPath",
[NSNumber numberWithInt:[package pluginHostArchitecture]], @"cpuType",
localization.get(), @"localization",
+ [NSNumber numberWithBool:useProxiedOpenPanel], @"useProxiedOpenPanel",
nil];
NSData *data = [NSPropertyListSerialization dataFromPropertyList:launchProperties format:NSPropertyListBinaryFormat_v1_0 errorDescription:0];
@@ -211,9 +215,10 @@ void NetscapePluginHostManager::pluginHostDied(NetscapePluginHostProxy* pluginHo
}
}
-PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePlugin(WebNetscapePluginPackage *pluginPackage, WebHostedNetscapePluginView *pluginView, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled)
+PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePlugin(WebNetscapePluginPackage *pluginPackage, WebHostedNetscapePluginView *pluginView, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled, bool isAcceleratedCompositingEnabled)
{
- NetscapePluginHostProxy* hostProxy = hostForPackage(pluginPackage);
+ WebPreferences *preferences = [[pluginView webView] preferences];
+ NetscapePluginHostProxy* hostProxy = hostForPackage(pluginPackage, [preferences usesProxiedOpenPanel]);
if (!hostProxy)
return 0;
@@ -236,7 +241,8 @@ PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePl
[properties.get() setObject:[NSNumber numberWithBool:fullFrame] forKey:@"fullFrame"];
[properties.get() setObject:[NSNumber numberWithBool:isPrivateBrowsingEnabled] forKey:@"privateBrowsingEnabled"];
-
+ [properties.get() setObject:[NSNumber numberWithBool:isAcceleratedCompositingEnabled] forKey:@"acceleratedCompositingEnabled"];
+
NSData *data = [NSPropertyListSerialization dataFromPropertyList:properties.get() format:NSPropertyListBinaryFormat_v1_0 errorDescription:nil];
ASSERT(data);
@@ -251,7 +257,7 @@ PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePl
pluginHostDied(hostProxy);
// Try to spawn it again.
- hostProxy = hostForPackage(pluginPackage);
+ hostProxy = hostForPackage(pluginPackage, [preferences usesProxiedOpenPanel]);
// Create a new instance.
instance = NetscapePluginInstanceProxy::create(hostProxy, pluginView, fullFrame);
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h
index c3b58de..cd3729f 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h
@@ -50,10 +50,13 @@ public:
void removePluginInstance(NetscapePluginInstanceProxy*);
NetscapePluginInstanceProxy* pluginInstance(uint32_t pluginID);
-
+
bool isMenuBarVisible() const { return m_menuBarIsVisible; }
void setMenuBarVisible(bool);
-
+
+ bool isFullScreenWindowShowing() const { return m_fullScreenWindowIsShowing; }
+ void setFullScreenWindowIsShowing(bool);
+
void setModal(bool);
void applicationDidBecomeActive();
@@ -69,8 +72,11 @@ private:
void beginModal();
void endModal();
-
- static void deadNameNotificationCallback(CFMachPortRef port, void *msg, CFIndex size, void *info);
+
+ void didEnterFullScreen() const;
+ void didExitFullScreen() const;
+
+ static void deadNameNotificationCallback(CFMachPortRef, void *msg, CFIndex size, void *info);
typedef HashMap<uint32_t, RefPtr<NetscapePluginInstanceProxy> > PluginInstanceMap;
PluginInstanceMap m_instances;
@@ -90,10 +96,11 @@ private:
RetainPtr<WebPlaceholderModalWindow *> m_placeholderWindow;
unsigned m_isModal;
bool m_menuBarIsVisible;
+ bool m_fullScreenWindowIsShowing;
const ProcessSerialNumber m_pluginHostPSN;
-
+
unsigned m_processingRequests;
-
+
bool m_shouldCacheMissingPropertiesAndMethods;
};
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
index 970f5f5..0e6c9a3 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
@@ -94,6 +94,7 @@ NetscapePluginHostProxy::NetscapePluginHostProxy(mach_port_t clientPort, mach_po
, m_pluginHostPort(pluginHostPort)
, m_isModal(false)
, m_menuBarIsVisible(true)
+ , m_fullScreenWindowIsShowing(false)
, m_pluginHostPSN(pluginHostPSN)
, m_processingRequests(0)
, m_shouldCacheMissingPropertiesAndMethods(shouldCacheMissingPropertiesAndMethods)
@@ -196,14 +197,42 @@ void NetscapePluginHostProxy::deadNameNotificationCallback(CFMachPortRef port, v
void NetscapePluginHostProxy::setMenuBarVisible(bool visible)
{
m_menuBarIsVisible = visible;
-
+
[NSMenu setMenuBarVisible:visible];
- if (visible) {
- // Make ourselves the front app
- ProcessSerialNumber psn;
- GetCurrentProcess(&psn);
- SetFrontProcess(&psn);
- }
+}
+
+void NetscapePluginHostProxy::didEnterFullScreen() const
+{
+ SetFrontProcess(&m_pluginHostPSN);
+}
+
+void NetscapePluginHostProxy::didExitFullScreen() const
+{
+ // If the plug-in host is the current application then we should bring ourselves to the front when it exits full-screen mode.
+
+ ProcessSerialNumber frontProcess;
+ GetFrontProcess(&frontProcess);
+ Boolean isSameProcess = 0;
+ SameProcess(&frontProcess, &m_pluginHostPSN, &isSameProcess);
+ if (!isSameProcess)
+ return;
+
+ ProcessSerialNumber currentProcess;
+ GetCurrentProcess(&currentProcess);
+ SetFrontProcess(&currentProcess);
+}
+
+void NetscapePluginHostProxy::setFullScreenWindowIsShowing(bool isShowing)
+{
+ if (m_fullScreenWindowIsShowing == isShowing)
+ return;
+
+ m_fullScreenWindowIsShowing = isShowing;
+ if (m_fullScreenWindowIsShowing)
+ didEnterFullScreen();
+ else
+ didExitFullScreen();
+
}
void NetscapePluginHostProxy::applicationDidBecomeActive()
@@ -875,7 +904,18 @@ kern_return_t WKPCSetMenuBarVisible(mach_port_t clientPort, boolean_t menuBarVis
return KERN_FAILURE;
hostProxy->setMenuBarVisible(menuBarVisible);
-
+
+ return KERN_SUCCESS;
+}
+
+kern_return_t WKPCSetFullScreenWindowIsShowing(mach_port_t clientPort, boolean_t fullScreenWindowIsShowing)
+{
+ NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
+ if (!hostProxy)
+ return KERN_FAILURE;
+
+ hostProxy->setFullScreenWindowIsShowing(fullScreenWindowIsShowing);
+
return KERN_SUCCESS;
}
@@ -1058,4 +1098,55 @@ kern_return_t WKPCResolveURL(mach_port_t clientPort, uint32_t pluginID, data_t u
return KERN_SUCCESS;
}
+#if !defined(BUILDING_ON_SNOW_LEOPARD)
+kern_return_t WKPCRunSyncOpenPanel(mach_port_t clientPort, data_t panelData, mach_msg_type_number_t panelDataLength)
+{
+ DataDeallocator panelDataDeallocator(panelData, panelDataLength);
+
+ NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
+ if (!hostProxy)
+ return KERN_FAILURE;
+
+ NSOpenPanel *sheet = [NSOpenPanel openPanel];
+ NSDictionary *panelState = [NSPropertyListSerialization propertyListFromData:[NSData dataWithBytes:panelData length:panelDataLength]
+ mutabilityOption:NSPropertyListImmutable
+ format:NULL
+ errorDescription:nil];
+
+ [sheet setCanChooseFiles:[[panelState objectForKey:@"canChooseFiles"] boolValue]];
+ [sheet setCanChooseDirectories:[[panelState objectForKey:@"canChooseDirectories"] boolValue]];
+ [sheet setResolvesAliases:[[panelState objectForKey:@"resolvesAliases"] boolValue]];
+ [sheet setAllowsMultipleSelection:[[panelState objectForKey:@"allowsMultipleSelection"] boolValue]];
+ [sheet setCanCreateDirectories:[[panelState objectForKey:@"canCreateDirectories"] boolValue]];
+ [sheet setShowsHiddenFiles:[[panelState objectForKey:@"showsHiddenFiles"] boolValue]];
+ [sheet setExtensionHidden:[[panelState objectForKey:@"isExtensionHidden"] boolValue]];
+ [sheet setCanSelectHiddenExtension:[[panelState objectForKey:@"canSelectHiddenExtension"] boolValue]];
+ [sheet setAllowsOtherFileTypes:[[panelState objectForKey:@"allowsOtherFileTypes"] boolValue]];
+ [sheet setTreatsFilePackagesAsDirectories:[[panelState objectForKey:@"treatsFilePackagesAsDirectories"] boolValue]];
+ [sheet setPrompt:[panelState objectForKey:@"prompt"]];
+ [sheet setNameFieldLabel:[panelState objectForKey:@"nameFieldLabel"]];
+ [sheet setMessage:[panelState objectForKey:@"message"]];
+ [sheet setAllowedFileTypes:[panelState objectForKey:@"allowedFileTypes"]];
+ [sheet setRequiredFileType:[panelState objectForKey:@"requiredFileType"]];
+ [sheet setTitle:[panelState objectForKey:@"title"]];
+ [sheet runModal];
+
+ NSDictionary *ret = [NSDictionary dictionaryWithObjectsAndKeys:
+ [sheet filenames], @"filenames",
+ WKNoteOpenPanelFiles([sheet filenames]), @"extensions",
+ nil];
+
+ RetainPtr<NSData*> data = [NSPropertyListSerialization dataFromPropertyList:ret format:NSPropertyListBinaryFormat_v1_0 errorDescription:0];
+ ASSERT(data);
+
+ _WKPHSyncOpenPanelReply(hostProxy->port(), const_cast<char *>(static_cast<const char*>([data.get() bytes])), [data.get() length]);
+ return KERN_SUCCESS;
+}
+#else
+kern_return_t WKPCRunSyncOpenPanel(mach_port_t clientPort, data_t panelData, mach_msg_type_number_t panelDataLength)
+{
+ return KERN_FAILURE;
+}
+#endif // !defined(BUILDING_ON_SNOW_LEOPARD)
+
#endif // USE(PLUGIN_HOST_PROCESS)
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
index c950ab7..2ef6b02 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 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
@@ -49,11 +49,13 @@ namespace JSC {
}
}
@class WebHostedNetscapePluginView;
+@class WebFrame;
namespace WebKit {
class HostedNetscapePluginStream;
class NetscapePluginHostProxy;
+class PluginRequest;
class ProxyInstance;
class NetscapePluginInstanceProxy : public RefCounted<NetscapePluginInstanceProxy> {
@@ -247,6 +249,8 @@ public:
template <typename T>
std::auto_ptr<T> waitForReply(uint32_t requestID)
{
+ willCallPluginFunction();
+
m_waitingForReply = true;
Reply* reply = processRequestsAndWaitForReply(requestID);
@@ -254,13 +258,18 @@ public:
ASSERT(reply->m_type == T::ReplyType);
m_waitingForReply = false;
+
+ didCallPluginFunction();
+
return std::auto_ptr<T>(static_cast<T*>(reply));
}
+ void webFrameDidFinishLoadWithReason(WebFrame*, NPReason);
+
private:
- NetscapePluginInstanceProxy(NetscapePluginHostProxy*, WebHostedNetscapePluginView *, bool fullFramePlugin);
+ NetscapePluginInstanceProxy(NetscapePluginHostProxy*, WebHostedNetscapePluginView*, bool fullFramePlugin);
- NPError loadRequest(NSURLRequest *, const char* cTarget, bool currentEventIsUserGesture, uint32_t& streamID);
+ NPError loadRequest(NSURLRequest*, const char* cTarget, bool currentEventIsUserGesture, uint32_t& streamID);
class PluginRequest;
void performRequest(PluginRequest*);
@@ -274,7 +283,7 @@ private:
void requestTimerFired(WebCore::Timer<NetscapePluginInstanceProxy>*);
WebCore::Timer<NetscapePluginInstanceProxy> m_requestTimer;
- Deque<PluginRequest*> m_pluginRequests;
+ Deque<RefPtr<PluginRequest> > m_pluginRequests;
HashMap<uint32_t, RefPtr<HostedNetscapePluginStream> > m_streams;
@@ -313,6 +322,9 @@ private:
bool m_pluginIsWaitingForDraw;
RefPtr<HostedNetscapePluginStream> m_manualStream;
+
+ typedef HashMap<WebFrame*, RefPtr<PluginRequest> > FrameLoadMap;
+ FrameLoadMap m_pendingFrameLoads;
};
} // namespace WebKit
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
index 4ae0220..187b0ea 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 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
@@ -72,9 +72,20 @@ using namespace WebCore;
namespace WebKit {
-class NetscapePluginInstanceProxy::PluginRequest {
+class NetscapePluginInstanceProxy::PluginRequest : public RefCounted<NetscapePluginInstanceProxy::PluginRequest> {
public:
- PluginRequest(uint32_t requestID, NSURLRequest *request, NSString *frameName, bool allowPopups)
+ static PassRefPtr<PluginRequest> create(uint32_t requestID, NSURLRequest* request, NSString* frameName, bool allowPopups)
+ {
+ return adoptRef(new PluginRequest(requestID, request, frameName, allowPopups));
+ }
+
+ uint32_t requestID() const { return m_requestID; }
+ NSURLRequest* request() const { return m_request.get(); }
+ NSString* frameName() const { return m_frameName.get(); }
+ bool allowPopups() const { return m_allowPopups; }
+
+private:
+ PluginRequest(uint32_t requestID, NSURLRequest* request, NSString* frameName, bool allowPopups)
: m_requestID(requestID)
, m_request(request)
, m_frameName(frameName)
@@ -82,15 +93,9 @@ public:
{
}
- uint32_t requestID() const { return m_requestID; }
- NSURLRequest *request() const { return m_request.get(); }
- NSString *frameName() const { return m_frameName.get(); }
- bool allowPopups() const { return m_allowPopups; }
-
-private:
uint32_t m_requestID;
- RetainPtr<NSURLRequest *> m_request;
- RetainPtr<NSString *> m_frameName;
+ RetainPtr<NSURLRequest*> m_request;
+ RetainPtr<NSString*> m_frameName;
bool m_allowPopups;
};
@@ -212,6 +217,10 @@ void NetscapePluginInstanceProxy::destroy()
m_inDestroy = true;
+ FrameLoadMap::iterator end = m_pendingFrameLoads.end();
+ for (FrameLoadMap::iterator it = m_pendingFrameLoads.begin(); it != end; ++it)
+ [(it->first) _setInternalLoadDelegate:nil];
+
_WKPHDestroyPluginInstance(m_pluginHostProxy->port(), m_pluginID, requestID);
// If the plug-in host crashes while we're waiting for a reply, the last reference to the instance proxy
@@ -517,8 +526,33 @@ void NetscapePluginInstanceProxy::performRequest(PluginRequest* pluginRequest)
if (JSString) {
ASSERT(!frame || [m_pluginView webFrame] == frame);
evaluateJavaScript(pluginRequest);
- } else
+ } else {
[frame loadRequest:request];
+
+ // Check if another plug-in view or even this view is waiting for the frame to load.
+ // If it is, tell it that the load was cancelled because it will be anyway.
+ WebHostedNetscapePluginView *view = [frame _internalLoadDelegate];
+ if (view != nil) {
+ ASSERT([view isKindOfClass:[WebHostedNetscapePluginView class]]);
+ [view webFrame:frame didFinishLoadWithReason:NPRES_USER_BREAK];
+ }
+ m_pendingFrameLoads.set(frame, pluginRequest);
+ [frame _setInternalLoadDelegate:m_pluginView];
+ }
+
+}
+
+void NetscapePluginInstanceProxy::webFrameDidFinishLoadWithReason(WebFrame* webFrame, NPReason reason)
+{
+ FrameLoadMap::iterator it = m_pendingFrameLoads.find(webFrame);
+ ASSERT(it != m_pendingFrameLoads.end());
+
+ PluginRequest* pluginRequest = it->second.get();
+ _WKPHLoadURLNotify(m_pluginHostProxy->port(), m_pluginID, pluginRequest->requestID(), reason);
+
+ m_pendingFrameLoads.remove(it);
+
+ [webFrame _setInternalLoadDelegate:nil];
}
void NetscapePluginInstanceProxy::evaluateJavaScript(PluginRequest* pluginRequest)
@@ -557,14 +591,13 @@ void NetscapePluginInstanceProxy::requestTimerFired(Timer<NetscapePluginInstance
ASSERT(!m_pluginRequests.isEmpty());
ASSERT(m_pluginView);
- PluginRequest* request = m_pluginRequests.first();
+ RefPtr<PluginRequest> request = m_pluginRequests.first();
m_pluginRequests.removeFirst();
if (!m_pluginRequests.isEmpty())
m_requestTimer.startOneShot(0);
- performRequest(request);
- delete request;
+ performRequest(request.get());
}
NPError NetscapePluginInstanceProxy::loadRequest(NSURLRequest *request, const char* cTarget, bool allowPopups, uint32_t& requestID)
@@ -616,8 +649,8 @@ NPError NetscapePluginInstanceProxy::loadRequest(NSURLRequest *request, const ch
return NPERR_INVALID_PARAM;
}
- PluginRequest* pluginRequest = new PluginRequest(requestID, request, target, allowPopups);
- m_pluginRequests.append(pluginRequest);
+ RefPtr<PluginRequest> pluginRequest = PluginRequest::create(requestID, request, target, allowPopups);
+ m_pluginRequests.append(pluginRequest.release());
m_requestTimer.startOneShot(0);
} else {
RefPtr<HostedNetscapePluginStream> stream = HostedNetscapePluginStream::create(this, requestID, request);
@@ -663,7 +696,7 @@ bool NetscapePluginInstanceProxy::getWindowNPObject(uint32_t& objectID)
if (!frame)
return false;
- if (!frame->script()->isEnabled())
+ if (!frame->script()->canExecuteScripts())
objectID = 0;
else
objectID = idForObject(frame->script()->windowShell(pluginWorld())->window());
@@ -1168,7 +1201,7 @@ bool NetscapePluginInstanceProxy::demarshalValueFromArray(ExecState* exec, NSArr
if (!frame)
return false;
- if (!frame->script()->isEnabled())
+ if (!frame->script()->canExecuteScripts())
return false;
RefPtr<RootObject> rootObject = frame->script()->createRootObject(m_pluginView);
@@ -1220,6 +1253,10 @@ PassRefPtr<Instance> NetscapePluginInstanceProxy::createBindingsInstance(PassRef
if (_WKPHGetScriptableNPObject(m_pluginHostProxy->port(), m_pluginID, requestID) != KERN_SUCCESS)
return 0;
+
+ // If the plug-in host crashes while we're waiting for a reply, the last reference to the instance proxy
+ // will go away. Prevent this by protecting it here.
+ RefPtr<NetscapePluginInstanceProxy> protect(this);
auto_ptr<GetScriptableNPObjectReply> reply = waitForReply<GetScriptableNPObjectReply>(requestID);
if (!reply.get())
diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.h b/WebKit/mac/Plugins/Hosted/ProxyInstance.h
index f84c685..138a316 100644
--- a/WebKit/mac/Plugins/Hosted/ProxyInstance.h
+++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Apple Inc. All Rights Reserved.
+ * Copyright (C) 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
@@ -28,15 +28,22 @@
#ifndef ProxyInstance_h
#define ProxyInstance_h
+<<<<<<< HEAD
#include <WebCore/Bridge.h>
#include <WebCore/runtime_root.h>
#include <wtf/OwnPtr.h>
#include "WebKitPluginHostTypes.h"
+=======
+#import "NetscapePluginInstanceProxy.h"
+#import "WebKitPluginHostTypes.h"
+#import <WebCore/Bridge.h>
+#import <WebCore/runtime_root.h>
+#import <wtf/OwnPtr.h>
+>>>>>>> webkit.org at r54127
namespace WebKit {
class ProxyClass;
-class NetscapePluginInstanceProxy;
class ProxyInstance : public JSC::Bindings::Instance {
public:
@@ -80,6 +87,17 @@ private:
JSC::JSValue invoke(JSC::ExecState*, InvokeType, uint64_t identifier, const JSC::ArgList& args);
+ template <typename T>
+ std::auto_ptr<T> waitForReply(uint32_t requestID) const {
+ std::auto_ptr<T> reply = m_instanceProxy->waitForReply<T>(requestID);
+
+ // If the instance proxy was invalidated, just return a null reply.
+ if (!m_instanceProxy)
+ return std::auto_ptr<T>();
+
+ return reply;
+ }
+
NetscapePluginInstanceProxy* m_instanceProxy;
uint32_t m_objectID;
JSC::Bindings::FieldMap m_fields;
diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
index 6be3953..1af2ef8 100644
--- a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
+++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 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
@@ -28,11 +28,10 @@
#import "ProxyInstance.h"
#import "NetscapePluginHostProxy.h"
-#import "NetscapePluginInstanceProxy.h"
-#import <runtime/PropertyNameArray.h>
#import <WebCore/IdentifierRep.h>
#import <WebCore/JSDOMWindow.h>
#import <WebCore/npruntime_impl.h>
+#import <runtime/PropertyNameArray.h>
extern "C" {
#import "WebKitPluginHost.h"
@@ -147,7 +146,7 @@ JSValue ProxyInstance::invoke(JSC::ExecState* exec, InvokeType type, uint64_t id
type, identifier, (char*)[arguments.get() bytes], [arguments.get() length]) != KERN_SUCCESS)
return jsUndefined();
- auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
+ auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
if (!reply.get() || !reply->m_returnValue)
return jsUndefined();
@@ -175,7 +174,7 @@ bool ProxyInstance::supportsInvokeDefaultMethod() const
m_objectID) != KERN_SUCCESS)
return false;
- auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
+ auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
if (reply.get() && reply->m_result)
return true;
@@ -199,7 +198,7 @@ bool ProxyInstance::supportsConstruct() const
m_objectID) != KERN_SUCCESS)
return false;
- auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
+ auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
if (reply.get() && reply->m_result)
return true;
@@ -223,7 +222,7 @@ JSValue ProxyInstance::defaultValue(ExecState* exec, PreferredPrimitiveType hint
JSValue ProxyInstance::stringValue(ExecState* exec) const
{
// FIXME: Implement something sensible.
- return jsString(exec, "");
+ return jsEmptyString(exec);
}
JSValue ProxyInstance::numberValue(ExecState* exec) const
@@ -253,7 +252,7 @@ void ProxyInstance::getPropertyNames(ExecState* exec, PropertyNameArray& nameArr
if (_WKPHNPObjectEnumerate(m_instanceProxy->hostProxy()->port(), m_instanceProxy->pluginID(), requestID, m_objectID) != KERN_SUCCESS)
return;
- auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
+ auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
if (!reply.get() || !reply->m_returnValue)
return;
@@ -298,7 +297,7 @@ MethodList ProxyInstance::methodsNamed(const Identifier& identifier)
m_objectID, methodName) != KERN_SUCCESS)
return MethodList();
- auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
+ auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
if (!reply.get())
return MethodList();
@@ -334,7 +333,7 @@ Field* ProxyInstance::fieldNamed(const Identifier& identifier)
m_objectID, propertyName) != KERN_SUCCESS)
return 0;
- auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
+ auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
if (!reply.get())
return 0;
@@ -361,7 +360,7 @@ JSC::JSValue ProxyInstance::fieldValue(ExecState* exec, const Field* field) cons
m_objectID, serverIdentifier) != KERN_SUCCESS)
return jsUndefined();
- auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
+ auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
if (!reply.get() || !reply->m_returnValue)
return jsUndefined();
@@ -387,7 +386,7 @@ void ProxyInstance::setFieldValue(ExecState* exec, const Field* field, JSValue v
if (kr != KERN_SUCCESS)
return;
- auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
+ auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
}
void ProxyInstance::invalidate()
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h
index 4ff5aba..5313ff2 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h
@@ -59,6 +59,9 @@ namespace WebKit {
element:(PassRefPtr<WebCore::HTMLPlugInElement>)element;
- (void)pluginHostDied;
+- (CALayer *)pluginLayer;
+- (void)webFrame:(WebFrame *)webFrame didFinishLoadWithReason:(NPReason)reason;
+
@end
#endif // USE(PLUGIN_HOST_PROCESS)
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
index 8de2aa6..9baa328 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
@@ -37,10 +37,10 @@
#import "WebUIDelegate.h"
#import <CoreFoundation/CoreFoundation.h>
+#import <WebCore/Bridge.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameLoaderTypes.h>
#import <WebCore/HTMLPlugInElement.h>
-#import <WebCore/runtime.h>
#import <WebCore/runtime_root.h>
#import <WebCore/WebCoreObjCExtras.h>
#import <runtime/InitializeThreading.h>
@@ -102,9 +102,13 @@ extern "C" {
ASSERT(!_proxy);
NSString *userAgent = [[self webView] userAgentForURL:_baseURL.get()];
-
+ BOOL accleratedCompositingEnabled = false;
+#if USE(ACCELERATED_COMPOSITING)
+ accleratedCompositingEnabled = [[[self webView] preferences] acceleratedCompositingEnabled];
+#endif
+
_proxy = NetscapePluginHostManager::shared().instantiatePlugin(_pluginPackage.get(), self, _MIMEType.get(), _attributeKeys.get(), _attributeValues.get(), userAgent, _sourceURL.get(),
- _mode == NP_FULL, _isPrivateBrowsingEnabled);
+ _mode == NP_FULL, _isPrivateBrowsingEnabled, accleratedCompositingEnabled);
if (!_proxy)
return NO;
@@ -112,7 +116,11 @@ extern "C" {
_softwareRenderer = WKSoftwareCARendererCreate(_proxy->renderContextID());
else {
_pluginLayer = WKMakeRenderLayer(_proxy->renderContextID());
- self.wantsLayer = YES;
+
+ if (accleratedCompositingEnabled)
+ [self element]->setNeedsStyleRecalc(SyntheticStyleChange);
+ else
+ self.wantsLayer = YES;
}
// Update the window frame.
@@ -121,6 +129,12 @@ extern "C" {
return YES;
}
+// FIXME: This method is an ideal candidate to move up to the base class
+- (CALayer *)pluginLayer
+{
+ return _pluginLayer.get();
+}
+
- (void)setLayer:(CALayer *)newLayer
{
// FIXME: This should use the same implementation as WebNetscapePluginView (and move to the base class).
@@ -441,6 +455,20 @@ extern "C" {
_proxy->checkIfAllowedToLoadURLResult(checkID, (policy == PolicyUse));
}
+- (void)webFrame:(WebFrame *)webFrame didFinishLoadWithReason:(NPReason)reason
+{
+ if (_isStarted && _proxy)
+ _proxy->webFrameDidFinishLoadWithReason(webFrame, reason);
+}
+
+- (void)webFrame:(WebFrame *)webFrame didFinishLoadWithError:(NSError *)error
+{
+ NPReason reason = NPRES_DONE;
+ if (error)
+ reason = HostedNetscapePluginStream::reasonForError(error);
+ [self webFrame:webFrame didFinishLoadWithReason:reason];
+}
+
@end
#endif
diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs
index 9877d9e..0cf4005 100644
--- a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs
+++ b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs
@@ -206,7 +206,7 @@ routine PCResolveURL(clientPort :mach_port_t;
url :data_t;
target :data_t;
out resolvedURL :data_t, dealloc);
-
+
// Replies
simpleroutine PCInstantiatePluginReply(clientPort :mach_port_t;
pluginID :uint32_t;
@@ -224,9 +224,15 @@ simpleroutine PCBooleanReply(clientPort :mach_port_t;
pluginID :uint32_t;
requestID :uint32_t;
result :boolean_t);
-
+
simpleroutine PCBooleanAndDataReply(clientPort :mach_port_t;
pluginID :uint32_t;
requestID :uint32_t;
returnValue :boolean_t;
result :data_t);
+
+simpleroutine PCRunSyncOpenPanel(clientPort :mach_port_t;
+ panelData :data_t);
+
+simpleroutine PCSetFullScreenWindowIsShowing(clientPort :mach_port_t;
+ isShowing :boolean_t);
diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs b/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs
index 9882bb5..c7cec89 100644
--- a/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs
+++ b/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs
@@ -240,4 +240,5 @@ simpleroutine PHPluginInstancePrivateBrowsingModeDidChange(pluginHostPort :mach_
pluginID :uint32_t;
privateBrowsingEnabled :boolean_t);
-
+simpleroutine PHSyncOpenPanelReply(pluginHostPort :mach_port_t;
+ filenames :data_t);
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.h b/WebKit/mac/Plugins/WebNetscapePluginView.h
index b2583da..2ee566e 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.h
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.h
@@ -151,7 +151,9 @@ typedef union PluginPort {
@interface WebNetscapePluginView (WebInternal)
- (BOOL)sendEvent:(void*)event isDrawRect:(BOOL)eventIsDrawRect;
- (NPEventModel)eventModel;
-
+#ifndef BUILDING_ON_TIGER
+- (CALayer *)pluginLayer;
+#endif
- (NPError)loadRequest:(NSURLRequest *)request inTarget:(NSString *)target withNotifyData:(void *)notifyData sendNotification:(BOOL)sendNotification;
- (NPError)getURLNotify:(const char *)URL target:(const char *)target notifyData:(void *)notifyData;
- (NPError)getURL:(const char *)URL target:(const char *)target;
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm
index 3ce5e39..4a4a435 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm
@@ -81,6 +81,8 @@
#define LoginWindowDidSwitchFromUserNotification @"WebLoginWindowDidSwitchFromUserNotification"
#define LoginWindowDidSwitchToUserNotification @"WebLoginWindowDidSwitchToUserNotification"
+#define WKNVSupportsCompositingCoreAnimationPluginsBool 74656 /* TRUE if the browser supports hardware compositing of Core Animation plug-ins */
+static const int WKNVSilverlightFullScreenPerformanceIssueFixed = 7288546; /* TRUE if Siverlight addressed its underlying bug in <rdar://problem/7288546> */
using namespace WebCore;
using namespace WebKit;
@@ -1088,10 +1090,18 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
if (drawingModel == NPDrawingModelCoreAnimation) {
void *value = 0;
if ([_pluginPackage.get() pluginFuncs]->getvalue(plugin, NPPVpluginCoreAnimationLayer, &value) == NPERR_NO_ERROR && value) {
-
+
// The plug-in gives us a retained layer.
_pluginLayer.adoptNS((CALayer *)value);
- [self setWantsLayer:YES];
+
+ BOOL accleratedCompositingEnabled = false;
+#if USE(ACCELERATED_COMPOSITING)
+ accleratedCompositingEnabled = [[[self webView] preferences] acceleratedCompositingEnabled];
+#endif
+ if (accleratedCompositingEnabled)
+ [self element]->setNeedsStyleRecalc(SyntheticStyleChange);
+ else
+ [self setWantsLayer:YES];
LOG(Plugins, "%@ is using Core Animation drawing model with layer %@", _pluginPackage.get(), _pluginLayer.get());
}
@@ -1106,6 +1116,12 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
}
#ifndef BUILDING_ON_TIGER
+// FIXME: This method is an ideal candidate to move up to the base class
+- (CALayer *)pluginLayer
+{
+ return _pluginLayer.get();
+}
+
- (void)setLayer:(CALayer *)newLayer
{
[super setLayer:newLayer];
@@ -2057,6 +2073,13 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
*(WKNBrowserContainerCheckFuncs **)value = browserContainerCheckFuncs();
return NPERR_NO_ERROR;
}
+#if USE(ACCELERATED_COMPOSITING)
+ case WKNVSupportsCompositingCoreAnimationPluginsBool:
+ {
+ *(NPBool *)value = [[[self webView] preferences] acceleratedCompositingEnabled];
+ return NPERR_NO_ERROR;
+ }
+#endif
default:
break;
}
@@ -2297,6 +2320,39 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
return NO;
}
+// Work around Silverlight full screen performance issue by maintaining an accelerated GL pixel format.
+// We can safely remove it at some point in the future when both:
+// 1) Microsoft releases a genuine fix for 7288546.
+// 2) Enough Silverlight users update to the new Silverlight.
+// For now, we'll distinguish older broken versions of Silverlight by asking the plug-in if it resolved its full screen badness.
+- (void)_workaroundSilverlightFullScreenBug:(BOOL)initializedPlugin
+{
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ ASSERT(_isSilverlight);
+ NPBool isFullScreenPerformanceIssueFixed = 0;
+ NPPluginFuncs *pluginFuncs = [_pluginPackage.get() pluginFuncs];
+ if (pluginFuncs->getvalue && pluginFuncs->getvalue(plugin, static_cast<NPPVariable>(WKNVSilverlightFullScreenPerformanceIssueFixed), &isFullScreenPerformanceIssueFixed) == NPERR_NO_ERROR && isFullScreenPerformanceIssueFixed)
+ return;
+
+ static CGLPixelFormatObj pixelFormatObject = 0;
+ static unsigned refCount = 0;
+
+ if (initializedPlugin) {
+ refCount++;
+ if (refCount == 1) {
+ const CGLPixelFormatAttribute attributes[] = { kCGLPFAAccelerated, static_cast<CGLPixelFormatAttribute>(0) };
+ GLint npix;
+ CGLChoosePixelFormat(attributes, &pixelFormatObject, &npix);
+ }
+ } else {
+ ASSERT(pixelFormatObject);
+ refCount--;
+ if (!refCount)
+ CGLReleasePixelFormat(pixelFormatObject);
+ }
+#endif
+}
+
- (NPError)_createPlugin
{
plugin = (NPP)calloc(1, sizeof(NPP_t));
@@ -2315,6 +2371,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
[[self class] setCurrentPluginView:self];
NPError npErr = [_pluginPackage.get() pluginFuncs]->newp((char *)[_MIMEType.get() cString], plugin, _mode, argsCount, cAttributes, cValues, NULL);
[[self class] setCurrentPluginView:nil];
+ if (_isSilverlight)
+ [self _workaroundSilverlightFullScreenBug:YES];
LOG(Plugins, "NPP_New: %d", npErr);
return npErr;
}
@@ -2323,6 +2381,9 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
{
PluginMainThreadScheduler::scheduler().unregisterPlugin(plugin);
+ if (_isSilverlight)
+ [self _workaroundSilverlightFullScreenBug:NO];
+
NPError npErr;
npErr = ![_pluginPackage.get() pluginFuncs]->destroy(plugin, NULL);
LOG(Plugins, "NPP_Destroy: %d", npErr);
diff --git a/WebKit/mac/WebCoreSupport/WebApplicationCache.mm b/WebKit/mac/WebCoreSupport/WebApplicationCache.mm
index 8eb623d..4ca749c 100644
--- a/WebKit/mac/WebCoreSupport/WebApplicationCache.mm
+++ b/WebKit/mac/WebCoreSupport/WebApplicationCache.mm
@@ -23,6 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+
#import "WebApplicationCache.h"
#import <WebCore/ApplicationCacheStorage.h>
@@ -38,3 +40,5 @@ using namespace WebCore;
}
@end
+
+#endif
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h
index ca2863e..66381a4 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.h
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h
@@ -152,9 +152,11 @@ public:
virtual void scheduleCompositingLayerSync();
#endif
+#if ENABLE(VIDEO)
virtual bool supportsFullscreenForNode(const WebCore::Node*);
virtual void enterFullscreenForNode(WebCore::Node*);
virtual void exitFullscreenForNode(WebCore::Node*);
+#endif
virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index 58323bb..c4e9671 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -490,22 +490,14 @@ void WebChromeClient::scrollRectIntoView(const IntRect& r, const ScrollView* scr
{
// FIXME: This scrolling behavior should be under the control of the embedding client (rather than something
// we just do ourselves).
-
- IntRect scrollRect = r;
- NSView *startView = m_webView;
- if ([m_webView _usesDocumentViews]) {
- // We have to convert back to document view coordinates.
- // It doesn't make sense for the scrollRectIntoView API to take document view coordinates.
- scrollRect.move(scrollView->scrollOffset());
- startView = [[[m_webView mainFrame] frameView] documentView];
- }
- NSRect rect = scrollRect;
- for (NSView *view = startView; view; view = [view superview]) {
- if ([view isKindOfClass:[NSClipView class]]) {
- NSClipView *clipView = (NSClipView *)view;
- NSView *documentView = [clipView documentView];
- [documentView scrollRectToVisible:[documentView convertRect:rect fromView:startView]];
- }
+
+ NSRect rect = r;
+ for (NSView *view = m_webView; view; view = [view superview]) {
+ if ([view isKindOfClass:[NSClipView class]]) {
+ NSClipView *clipView = (NSClipView *)view;
+ NSView *documentView = [clipView documentView];
+ [documentView scrollRectToVisible:[documentView convertRect:rect fromView:m_webView]];
+ }
}
}
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index 9816e01..5934d7c 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -104,6 +104,7 @@
#import <WebCore/MouseEvent.h>
#import <WebCore/Page.h>
#import <WebCore/PlatformString.h>
+#import <WebCore/PluginWidget.h>
#import <WebCore/ResourceError.h>
#import <WebCore/ResourceHandle.h>
#import <WebCore/ResourceLoader.h>
@@ -1474,19 +1475,6 @@ static NSView *pluginView(WebFrame *frame, WebPluginPackage *pluginPackage,
return view;
}
-class PluginWidget : public Widget {
-public:
- PluginWidget(NSView *view = 0)
- : Widget(view)
- {
- }
-
- virtual void invalidateRect(const IntRect& rect)
- {
- [platformWidget() setNeedsDisplayInRect:rect];
- }
-};
-
#if ENABLE(NETSCAPE_PLUGIN_API)
class NetscapePluginWidget : public PluginWidget {
diff --git a/WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.h b/WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.h
new file mode 100644
index 0000000..3965210
--- /dev/null
+++ b/WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <WebCore/GeolocationControllerClient.h>
+
+namespace WebCore {
+ class GeolocationPosition;
+}
+
+@class WebView;
+
+class WebGeolocationControllerClient : public WebCore::GeolocationControllerClient {
+public:
+ WebGeolocationControllerClient(WebView *);
+ WebView *webView() { return m_webView; }
+
+ void geolocationDestroyed();
+ void startUpdating();
+ void stopUpdating();
+
+ WebCore::GeolocationPosition* lastPosition();
+
+private:
+ WebView *m_webView;
+};
diff --git a/WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.mm b/WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.mm
new file mode 100644
index 0000000..98ffc72
--- /dev/null
+++ b/WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.mm
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebGeolocationControllerClient.h"
+
+#import "WebGeolocationPositionInternal.h"
+#import "WebViewInternal.h"
+
+using namespace WebCore;
+
+WebGeolocationControllerClient::WebGeolocationControllerClient(WebView *webView)
+ : m_webView(webView)
+{
+}
+
+void WebGeolocationControllerClient::geolocationDestroyed()
+{
+ delete this;
+}
+
+void WebGeolocationControllerClient::startUpdating()
+{
+ [[m_webView _geolocationProvider] registerWebView:m_webView];
+}
+
+void WebGeolocationControllerClient::stopUpdating()
+{
+ [[m_webView _geolocationProvider] unregisterWebView:m_webView];
+}
+
+GeolocationPosition* WebGeolocationControllerClient::lastPosition()
+{
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ return core([[m_webView _geolocationProvider] lastPosition]);
+#else
+ return 0;
+#endif
+}
diff --git a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm
index 0c87d19..b59c1f2 100644
--- a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm
@@ -46,5 +46,5 @@ bool WebPluginHalterClient::shouldHaltPlugin(Node* pluginNode, bool isWindowed,
bool WebPluginHalterClient::enabled() const
{
- return [[m_webView UIDelegate] respondsToSelector:@selector(webView:shouldHaltPlugin:)];
+ return [[m_webView UIDelegate] respondsToSelector:@selector(webView:shouldHaltPlugin:isWindowed:pluginName:)];
}
diff --git a/WebKit/mac/WebCoreSupport/WebSystemInterface.m b/WebKit/mac/WebCoreSupport/WebSystemInterface.m
index f2a215d..7f4effd 100644
--- a/WebKit/mac/WebCoreSupport/WebSystemInterface.m
+++ b/WebKit/mac/WebCoreSupport/WebSystemInterface.m
@@ -31,6 +31,9 @@
#import <WebCore/WebCoreSystemInterface.h>
#import <WebKitSystemInterface.h>
+// Needed for builds not using PCH to expose BUILDING_ macros, see bug 32753.
+#include <wtf/Platform.h>
+
#define INIT(function) wk##function = WK##function
void InitWebCoreSystemInterface(void)
@@ -73,6 +76,7 @@ void InitWebCoreSystemInterface(void)
INIT(SetNSURLRequestShouldContentSniff);
INIT(SetPatternBaseCTM);
INIT(SetPatternPhaseInUserSpace);
+ INIT(GetUserToBaseCTM);
INIT(SetUpFontCache);
INIT(SignalCFReadStreamEnd);
INIT(SignalCFReadStreamError);
@@ -105,5 +109,9 @@ void InitWebCoreSystemInterface(void)
INIT(SupportsMultipartXMixedReplace);
#endif
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ INIT(NoteOpenPanelFiles);
+#endif
+
didInit = true;
}
diff --git a/WebKit/mac/WebCoreSupport/WebViewFactory.mm b/WebKit/mac/WebCoreSupport/WebViewFactory.mm
index 99729dc..2607f18 100644
--- a/WebKit/mac/WebCoreSupport/WebViewFactory.mm
+++ b/WebKit/mac/WebCoreSupport/WebViewFactory.mm
@@ -630,6 +630,16 @@
return UI_STRING("jump", "Verb stating the action that will occur when a link is clicked, as used by accessibility");
}
+- (NSString *)AXMenuListPopupActionVerb
+{
+ return nil;
+}
+
+- (NSString *)AXMenuListActionVerb
+{
+ return nil;
+}
+
- (NSString *)multipleFileUploadTextForNumberOfFiles:(unsigned)numberOfFiles
{
return [NSString stringWithFormat:UI_STRING("%d files", "Label to describe the number of files selected in a file upload control that allows multiple files"), numberOfFiles];
diff --git a/WebKit/mac/WebKit.exp b/WebKit/mac/WebKit.exp
index 3aa270f..904f389 100644
--- a/WebKit/mac/WebKit.exp
+++ b/WebKit/mac/WebKit.exp
@@ -13,6 +13,7 @@
.objc_class_name_WebFrame
.objc_class_name_WebFrameView
.objc_class_name_WebGeolocationMock
+.objc_class_name_WebGeolocationPosition
.objc_class_name_WebHTMLRepresentation
.objc_class_name_WebHTMLView
.objc_class_name_WebHistory
diff --git a/WebKit/mac/WebKitPrefix.h b/WebKit/mac/WebKitPrefix.h
index 518fc1b..2a894e6 100644
--- a/WebKit/mac/WebKitPrefix.h
+++ b/WebKit/mac/WebKitPrefix.h
@@ -90,4 +90,5 @@ typedef float CGFloat;
#undef catch
#define JS_EXPORTDATA
+#define JS_EXPORTCLASS
#define WEBKIT_EXPORTDATA
diff --git a/WebKit/mac/WebView/WebDataSource.mm b/WebKit/mac/WebView/WebDataSource.mm
index ecd89f7..8a3842e 100644
--- a/WebKit/mac/WebView/WebDataSource.mm
+++ b/WebKit/mac/WebView/WebDataSource.mm
@@ -194,6 +194,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
- (BOOL)_transferApplicationCache:(NSString*)destinationBundleIdentifier
{
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
DocumentLoader* loader = [self _documentLoader];
if (!loader)
@@ -202,6 +203,9 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
NSString *cacheDir = [NSString _webkit_localCacheDirectoryWithBundleIdentifier:destinationBundleIdentifier];
return ApplicationCacheStorage::storeCopyOfCache(cacheDir, loader->applicationCacheHost());
+#else
+ return NO;
+#endif
}
@end
diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm
index 58400d6..41d7e01 100644
--- a/WebKit/mac/WebView/WebFrame.mm
+++ b/WebKit/mac/WebView/WebFrame.mm
@@ -56,6 +56,7 @@
#import <WebCore/AccessibilityObject.h>
#import <WebCore/AnimationController.h>
#import <WebCore/CSSMutableStyleDeclaration.h>
+#import <WebCore/Chrome.h>
#import <WebCore/ColorMac.h>
#import <WebCore/DOMImplementation.h>
#import <WebCore/DocLoader.h>
@@ -847,7 +848,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
if (!_private->coreFrame || !_private->coreFrame->document())
return nil;
- return kit(createFragmentFromMarkup(_private->coreFrame->document(), markupString, baseURLString).get());
+ return kit(createFragmentFromMarkup(_private->coreFrame->document(), markupString, baseURLString, FragmentScriptingNotAllowed).get());
}
- (DOMDocumentFragment *)_documentFragmentWithNodesAsParagraphs:(NSArray *)nodes
@@ -1190,13 +1191,17 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
if (domWindow->hasEventListeners(eventNames().unloadEvent))
[result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameHasUnloadListener];
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
if (domWindow->optionalApplicationCache())
[result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameUsesApplicationCache];
+#endif
}
if (Document* document = _private->coreFrame->document()) {
+#if ENABLE(DATABASE)
if (document->hasOpenDatabases())
[result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameUsesDatabases];
+#endif
if (document->usingGeolocation())
[result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameUsesGeolocation];
@@ -1355,7 +1360,10 @@ static bool needsMicrosoftMessengerDOMDocumentWorkaround()
- (void)loadRequest:(NSURLRequest *)request
{
- _private->coreFrame->loader()->load(request, false);
+ Frame* coreFrame = _private->coreFrame;
+ if (!coreFrame)
+ return;
+ coreFrame->loader()->load(request, false);
}
static NSURL *createUniqueWebDataURL()
diff --git a/WebKit/mac/WebView/WebFrameView.mm b/WebKit/mac/WebView/WebFrameView.mm
index 4638418..565e64d 100644
--- a/WebKit/mac/WebView/WebFrameView.mm
+++ b/WebKit/mac/WebView/WebFrameView.mm
@@ -55,6 +55,7 @@
#import "WebViewInternal.h"
#import "WebViewPrivate.h"
#import <Foundation/NSURLRequest.h>
+#import <WebCore/BackForwardList.h>
#import <WebCore/DragController.h>
#import <WebCore/EventHandler.h>
#import <WebCore/Frame.h>
@@ -199,9 +200,8 @@ enum {
- (float)_verticalPageScrollDistance
{
- float overlap = [self _verticalKeyboardScrollDistance];
float height = [[self _contentView] bounds].size.height;
- return (height < overlap) ? height / 2 : height - overlap;
+ return max(height * cFractionToStepWhenPaging, 1.f);
}
static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCClass, NSArray *supportTypes)
@@ -342,7 +342,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
[scrollView setHasVerticalScroller:NO];
[scrollView setHasHorizontalScroller:NO];
[scrollView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
- [scrollView setLineScroll:40.0f];
+ [scrollView setLineScroll:cScrollbarPixelsPerLineStep];
[self addSubview:scrollView];
// Don't call our overridden version of setNextKeyView here; we need to make the standard NSView
@@ -612,9 +612,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
- (float)_horizontalPageScrollDistance
{
- float overlap = [self _horizontalKeyboardScrollDistance];
float width = [[self _contentView] bounds].size.width;
- return (width < overlap) ? width / 2 : width - overlap;
+ return max(width * cFractionToStepWhenPaging, 1.f);
}
- (BOOL)_pageVertically:(BOOL)up
diff --git a/WebKit/mac/WebView/WebGeolocationPosition.h b/WebKit/mac/WebView/WebGeolocationPosition.h
new file mode 100644
index 0000000..99348b4
--- /dev/null
+++ b/WebKit/mac/WebView/WebGeolocationPosition.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2009 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.
+ */
+
+@class WebGeolocationPositionInternal;
+
+@interface WebGeolocationPosition : NSObject
+{
+ WebGeolocationPositionInternal *_internal;
+}
+
+- (id)initWithTimestamp:(double)timestamp latitude:(double)latitude longitude:(double)longitude accuracy:(double)accuracy;
+
+@end
diff --git a/WebKit/mac/WebView/WebGeolocationPosition.mm b/WebKit/mac/WebView/WebGeolocationPosition.mm
new file mode 100644
index 0000000..46f62c1
--- /dev/null
+++ b/WebKit/mac/WebView/WebGeolocationPosition.mm
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebGeolocationPosition.h"
+
+#import "WebGeolocationPositionInternal.h"
+#import <wtf/PassRefPtr.h>
+#import <wtf/RefPtr.h>
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#import <WebCore/GeolocationPosition.h>
+
+using namespace WebCore;
+#endif
+
+@interface WebGeolocationPositionInternal : NSObject
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+{
+@public
+ RefPtr<GeolocationPosition> _position;
+}
+
+- (id)initWithCoreGeolocationPosition:(PassRefPtr<GeolocationPosition>)coreGeolocationPosition;
+#endif
+@end
+
+@implementation WebGeolocationPositionInternal
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+- (id)initWithCoreGeolocationPosition:(PassRefPtr<GeolocationPosition>)coreGeolocationPosition
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ _position = coreGeolocationPosition;
+ return self;
+}
+#endif
+
+@end
+
+@implementation WebGeolocationPosition
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+GeolocationPosition* core(WebGeolocationPosition *position)
+{
+ return position ? position->_internal->_position.get() : 0;
+}
+#endif
+
+- (id)initWithTimestamp:(double)timestamp latitude:(double)latitude longitude:(double)longitude accuracy:(double)accuracy
+{
+ self = [super init];
+ if (!self)
+ return nil;
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ _internal = [[WebGeolocationPositionInternal alloc] initWithCoreGeolocationPosition:GeolocationPosition::create(timestamp, latitude, longitude, accuracy)];
+#else
+ _internal = [[WebGeolocationPositionInternal alloc] init];
+#endif
+ return self;
+}
+
+@end
diff --git a/WebKit/mac/WebView/WebGeolocationPositionInternal.h b/WebKit/mac/WebView/WebGeolocationPositionInternal.h
new file mode 100644
index 0000000..27f8a39
--- /dev/null
+++ b/WebKit/mac/WebView/WebGeolocationPositionInternal.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebGeolocationPosition.h"
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+
+namespace WebCore {
+ class GeolocationPosition;
+}
+
+WebCore::GeolocationPosition* core(WebGeolocationPosition *);
+
+#endif
diff --git a/WebKit/mac/WebView/WebHTMLRepresentation.h b/WebKit/mac/WebView/WebHTMLRepresentation.h
index 2098c47..68f9bde 100644
--- a/WebKit/mac/WebView/WebHTMLRepresentation.h
+++ b/WebKit/mac/WebView/WebHTMLRepresentation.h
@@ -30,6 +30,12 @@
#import <WebKit/WebDocumentPrivate.h>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
+#define WebNSUInteger unsigned int
+#else
+#define WebNSUInteger NSUInteger
+#endif
+
@class WebHTMLRepresentationPrivate;
@class NSView;
@@ -60,7 +66,12 @@
- (DOMElement *)formForElement:(DOMElement *)element;
- (DOMElement *)currentForm;
- (NSArray *)controlsInForm:(DOMElement *)form;
-- (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element;
+- (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element resultDistance:(WebNSUInteger*)outDistance resultIsInCellAbove:(BOOL*)outIsInCellAbove;
- (NSString *)matchLabels:(NSArray *)labels againstElement:(DOMElement *)element;
+// Deprecated SPI
+- (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element; // Use -searchForLabels:beforeElement:resultDistance:resultIsInCellAbove:
+
@end
+
+#undef WebNSUInteger
diff --git a/WebKit/mac/WebView/WebHTMLRepresentation.mm b/WebKit/mac/WebView/WebHTMLRepresentation.mm
index 39489e8..41ce9f9 100644
--- a/WebKit/mac/WebView/WebHTMLRepresentation.mm
+++ b/WebKit/mac/WebView/WebHTMLRepresentation.mm
@@ -39,6 +39,7 @@
#import "WebKitStatisticsPrivate.h"
#import "WebNSAttributedStringExtras.h"
#import "WebNSObjectExtras.h"
+#import "WebTypesInternal.h"
#import "WebView.h"
#import <Foundation/NSURLResponse.h>
#import <WebCore/Document.h>
@@ -337,7 +338,27 @@ static HTMLInputElement* inputElementFromDOMElement(DOMElement* element)
- (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element
{
- return core([_private->dataSource webFrame])->searchForLabelsBeforeElement(labels, core(element));
+ return [self searchForLabels:labels beforeElement:element resultDistance:0 resultIsInCellAbove:0];
+}
+
+- (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element resultDistance:(NSUInteger*)outDistance resultIsInCellAbove:(BOOL*)outIsInCellAbove
+{
+ size_t distance;
+ bool isInCellAbove;
+
+ NSString *result = core([_private->dataSource webFrame])->searchForLabelsBeforeElement(labels, core(element), &distance, &isInCellAbove);
+
+ if (outDistance) {
+ if (distance == notFound)
+ *outDistance = NSNotFound;
+ else
+ *outDistance = distance;
+ }
+
+ if (outIsInCellAbove)
+ *outIsInCellAbove = isInCellAbove;
+
+ return result;
}
- (NSString *)matchLabels:(NSArray *)labels againstElement:(DOMElement *)element
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm
index 5dc66ee..54a177e 100644
--- a/WebKit/mac/WebView/WebHTMLView.mm
+++ b/WebKit/mac/WebView/WebHTMLView.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
* (C) 2006, 2007 Graham Dennis (graham.dennis@gmail.com)
*
* Redistribution and use in source and binary forms, with or without
@@ -103,6 +103,7 @@
#import <WebCore/Page.h>
#import <WebCore/PlatformKeyboardEvent.h>
#import <WebCore/Range.h>
+#import <WebCore/RuntimeApplicationChecks.h>
#import <WebCore/SelectionController.h>
#import <WebCore/SharedBuffer.h>
#import <WebCore/SimpleFontData.h>
@@ -796,10 +797,26 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
[webView _setInsertionPasteboard:pasteboard];
DOMRange *range = [self _selectedRange];
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
DOMDocumentFragment *fragment = [self _documentFragmentFromPasteboard:pasteboard inContext:range allowPlainText:allowPlainText];
if (fragment && [self _shouldInsertFragment:fragment replacingDOMRange:range givenAction:WebViewInsertActionPasted])
[[self _frame] _replaceSelectionWithFragment:fragment selectReplacement:NO smartReplace:[self _canSmartReplaceWithPasteboard:pasteboard] matchStyle:NO];
-
+#else
+ // Mail is ignoring the frament passed to the delegate and creates a new one.
+ // We want to avoid creating the fragment twice.
+ if (applicationIsAppleMail()) {
+ if ([self _shouldInsertFragment:nil replacingDOMRange:range givenAction:WebViewInsertActionPasted]) {
+ DOMDocumentFragment *fragment = [self _documentFragmentFromPasteboard:pasteboard inContext:range allowPlainText:allowPlainText];
+ if (fragment)
+ [[self _frame] _replaceSelectionWithFragment:fragment selectReplacement:NO smartReplace:[self _canSmartReplaceWithPasteboard:pasteboard] matchStyle:NO];
+ }
+ } else {
+ DOMDocumentFragment *fragment = [self _documentFragmentFromPasteboard:pasteboard inContext:range allowPlainText:allowPlainText];
+ if (fragment && [self _shouldInsertFragment:fragment replacingDOMRange:range givenAction:WebViewInsertActionPasted])
+ [[self _frame] _replaceSelectionWithFragment:fragment selectReplacement:NO smartReplace:[self _canSmartReplaceWithPasteboard:pasteboard] matchStyle:NO];
+ }
+#endif
[webView _setInsertionPasteboard:nil];
[webView release];
}
@@ -3309,6 +3326,12 @@ WEBCORE_COMMAND(yankAndSelect)
return [[[self elementAtPoint:point allowShadowContent:YES] objectForKey:WebElementIsSelectedKey] boolValue];
}
+- (BOOL)_isScrollBarEvent:(NSEvent *)event
+{
+ NSPoint point = [self convertPoint:[event locationInWindow] fromView:nil];
+ return [[[self elementAtPoint:point allowShadowContent:YES] objectForKey:WebElementIsInScrollBarKey] boolValue];
+}
+
- (BOOL)acceptsFirstMouse:(NSEvent *)event
{
// There's a chance that responding to this event will run a nested event loop, and
@@ -3331,6 +3354,8 @@ WEBCORE_COMMAND(yankAndSelect)
[hitHTMLView _setMouseDownEvent:event];
if ([hitHTMLView _isSelectionEvent:event])
result = coreFrame->eventHandler()->eventMayStartDrag(event);
+ else if ([hitHTMLView _isScrollBarEvent:event])
+ result = true;
[hitHTMLView _setMouseDownEvent:nil];
}
return result;
diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index d295323..7085cec 100644
--- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -88,6 +88,7 @@
#define WebKitShowDebugBordersPreferenceKey @"WebKitShowDebugBorders"
#define WebKitShowRepaintCounterPreferenceKey @"WebKitShowRepaintCounter"
#define WebKitWebGLEnabledPreferenceKey @"WebKitWebGLEnabled"
+#define WebKitUsesProxiedOpenPanelPreferenceKey @"WebKitUsesProxiedOpenPanel"
#define WebKitPluginAllowedRunTimePreferenceKey @"WebKitPluginAllowedRunTime"
// 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 6b55ea3..d06cc13 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -351,9 +351,10 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:YES], WebKitZoomsTextOnlyPreferenceKey,
[NSNumber numberWithBool:YES], WebKitXSSAuditorEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitAcceleratedCompositingEnabledPreferenceKey,
- [NSNumber numberWithBool:NO], WebKitShowDebugBordersPreferenceKey,
- [NSNumber numberWithBool:NO], WebKitShowRepaintCounterPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitShowDebugBordersPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitShowRepaintCounterPreferenceKey,
[NSNumber numberWithBool:NO], WebKitWebGLEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitUsesProxiedOpenPanelPreferenceKey,
[NSNumber numberWithUnsignedInt:4], WebKitPluginAllowedRunTimePreferenceKey,
nil];
@@ -1183,6 +1184,16 @@ static NSString *classIBCreatorID = nil;
[self _setBoolValue:enabled forKey:WebKitWebGLEnabledPreferenceKey];
}
+- (BOOL)usesProxiedOpenPanel
+{
+ return [self _boolValueForKey:WebKitUsesProxiedOpenPanelPreferenceKey];
+}
+
+- (void)setUsesProxiedOpenPanel:(BOOL)enabled
+{
+ [self _setBoolValue:enabled forKey:WebKitUsesProxiedOpenPanelPreferenceKey];
+}
+
- (unsigned)pluginAllowedRunTime
{
return [self _integerValueForKey:WebKitPluginAllowedRunTimePreferenceKey];
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index 3cea78b..20c98b2 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -158,6 +158,9 @@ extern NSString *WebPreferencesRemovedNotification;
- (BOOL)webGLEnabled;
- (void)setWebGLEnabled:(BOOL)enabled;
+- (BOOL)usesProxiedOpenPanel;
+- (void)setUsesProxiedOpenPanel:(BOOL)enabled;
+
// Other private methods
- (void)_postPreferencesChangesNotification;
+ (WebPreferences *)_getInstanceForIdentifier:(NSString *)identifier;
diff --git a/WebKit/mac/WebView/WebScriptDebugger.h b/WebKit/mac/WebView/WebScriptDebugger.h
index 1213ab2..c4147a2 100644
--- a/WebKit/mac/WebView/WebScriptDebugger.h
+++ b/WebKit/mac/WebView/WebScriptDebugger.h
@@ -57,7 +57,7 @@ public:
virtual void callEvent(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber);
virtual void atStatement(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber);
virtual void returnEvent(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber);
- virtual void exception(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber);
+ virtual void exception(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber, bool hasHandler);
virtual void willExecuteProgram(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineno);
virtual void didExecuteProgram(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineno);
virtual void didReachBreakpoint(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineno);
diff --git a/WebKit/mac/WebView/WebScriptDebugger.mm b/WebKit/mac/WebView/WebScriptDebugger.mm
index 8deccff..a71d78b 100644
--- a/WebKit/mac/WebView/WebScriptDebugger.mm
+++ b/WebKit/mac/WebView/WebScriptDebugger.mm
@@ -200,7 +200,7 @@ void WebScriptDebugger::returnEvent(const DebuggerCallFrame& debuggerCallFrame,
m_callingDelegate = false;
}
-void WebScriptDebugger::exception(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber)
+void WebScriptDebugger::exception(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber, bool hasHandler)
{
if (m_callingDelegate)
return;
diff --git a/WebKit/mac/WebView/WebScriptWorld.h b/WebKit/mac/WebView/WebScriptWorld.h
index 9204975..7059b76 100644
--- a/WebKit/mac/WebView/WebScriptWorld.h
+++ b/WebKit/mac/WebView/WebScriptWorld.h
@@ -22,6 +22,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+typedef struct OpaqueJSContext* JSGlobalContextRef;
+
@class WebScriptWorldPrivate;
@interface WebScriptWorld : NSObject {
@@ -31,4 +33,7 @@
+ (WebScriptWorld *)standardWorld;
+ (WebScriptWorld *)world;
+
++ (WebScriptWorld *)scriptWorldForGlobalContext:(JSGlobalContextRef)globalContext;
+
@end
diff --git a/WebKit/mac/WebView/WebScriptWorld.mm b/WebKit/mac/WebView/WebScriptWorld.mm
index 0310701..7dab1b3 100644
--- a/WebKit/mac/WebView/WebScriptWorld.mm
+++ b/WebKit/mac/WebView/WebScriptWorld.mm
@@ -27,6 +27,8 @@
#import "WebScriptWorldInternal.h"
#import <WebCore/JSDOMBinding.h>
#import <WebCore/ScriptController.h>
+#import <JavaScriptCore/APICast.h>
+
#import <wtf/RefPtr.h>
using namespace WebCore;
@@ -94,6 +96,11 @@ static WorldMap& allWorlds()
return [[[self alloc] init] autorelease];
}
++ (WebScriptWorld *)scriptWorldForGlobalContext:(JSGlobalContextRef)context
+{
+ return [self findOrCreateWorld:currentWorld(toJS(context))];
+}
+
@end
@implementation WebScriptWorld (WebInternal)
diff --git a/WebKit/mac/WebView/WebVideoFullscreenController.mm b/WebKit/mac/WebView/WebVideoFullscreenController.mm
index 946da90..e5fde5e 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenController.mm
+++ b/WebKit/mac/WebView/WebVideoFullscreenController.mm
@@ -34,6 +34,7 @@
#import <WebCore/HTMLMediaElement.h>
#import <WebCore/SoftLinking.h>
#import <objc/objc-runtime.h>
+#import <wtf/UnusedParam.h>
SOFT_LINK_FRAMEWORK(QTKit)
SOFT_LINK_CLASS(QTKit, QTMovieView)
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index ad8f33a..6dcbfb4 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -56,6 +56,8 @@
#import "WebFormDelegatePrivate.h"
#import "WebFrameInternal.h"
#import "WebFrameViewInternal.h"
+#import "WebGeolocationControllerClient.h"
+#import "WebGeolocationPositionInternal.h"
#import "WebHTMLRepresentation.h"
#import "WebHTMLViewInternal.h"
#import "WebHistoryItemInternal.h"
@@ -100,6 +102,7 @@
#import <CoreFoundation/CFSet.h>
#import <Foundation/NSURLConnection.h>
#import <WebCore/ApplicationCacheStorage.h>
+#import <WebCore/BackForwardList.h>
#import <WebCore/Cache.h>
#import <WebCore/ColorMac.h>
#import <WebCore/Cursor.h>
@@ -162,6 +165,11 @@
#import <WebKit/WebDashboardRegion.h>
#endif
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#import <WebCore/GeolocationController.h>
+#import <WebCore/GeolocationError.h>
+#endif
+
@interface NSSpellChecker (WebNSSpellCheckerDetails)
- (void)_preflightChosenSpellServer;
@end
@@ -369,6 +377,7 @@ NSString *WebElementLinkURLKey = @"WebElementLinkURL";
NSString *WebElementSpellingToolTipKey = @"WebElementSpellingToolTip";
NSString *WebElementTitleKey = @"WebElementTitle";
NSString *WebElementLinkIsLiveKey = @"WebElementLinkIsLive";
+NSString *WebElementIsInScrollBarKey = @"WebElementIsInScrollBar";
NSString *WebElementIsContentEditableKey = @"WebElementIsContentEditableKey";
NSString *WebViewProgressStartedNotification = @"WebProgressStartedNotification";
@@ -515,6 +524,7 @@ static NSString *createUserVisibleWebKitVersionString()
static void WebKitInitializeApplicationCachePathIfNecessary()
{
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
static BOOL initialized = NO;
if (initialized)
return;
@@ -529,6 +539,7 @@ static void WebKitInitializeApplicationCachePathIfNecessary()
cacheStorage().setCacheDirectory(cacheDir);
initialized = YES;
+#endif
}
static bool runningLeopardMail()
@@ -547,6 +558,11 @@ static bool runningTigerMail()
return NO;
}
+static bool shouldEnableLoadDeferring()
+{
+ return !applicationIsAdobeInstaller();
+}
+
- (void)_dispatchPendingLoadRequests
{
cache()->loader()->servePendingRequests();
@@ -607,7 +623,16 @@ static bool runningTigerMail()
didOneTimeInitialization = true;
}
+<<<<<<< HEAD
_private->page = new Page(new WebChromeClient(self), new WebContextMenuClient(self), new WebEditorClient(self), new WebDragClient(self), new WebInspectorClient(self), new WebPluginHalterClient(self), 0);
+=======
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ WebGeolocationControllerClient* geolocationControllerClient = new WebGeolocationControllerClient(self);
+#else
+ WebGeolocationControllerClient* geolocationControllerClient = 0;
+#endif
+ _private->page = new Page(new WebChromeClient(self), new WebContextMenuClient(self), new WebEditorClient(self), new WebDragClient(self), new WebInspectorClient(self), new WebPluginHalterClient(self), geolocationControllerClient);
+>>>>>>> webkit.org at r54127
_private->page->settings()->setLocalStorageDatabasePath([[self preferences] _localStorageDatabasePath]);
@@ -987,7 +1012,9 @@ static bool fastDocumentTeardownEnabled()
return;
}
+#if ENABLE(VIDEO)
[self _exitFullscreen];
+#endif
if (Frame* mainFrame = [self _mainCoreFrame])
mainFrame->loader()->detachFromParent();
@@ -1288,6 +1315,8 @@ static bool fastDocumentTeardownEnabled()
settings->setApplicationChromeMode([preferences applicationChromeModeEnabled]);
if ([preferences userStyleSheetEnabled]) {
NSString* location = [[preferences userStyleSheetLocation] _web_originalDataAsString];
+ if ([location isEqualToString:@"apple-dashboard://stylesheet"])
+ location = @"file:///System/Library/PrivateFrameworks/DashboardClient.framework/Resources/widget.css";
settings->setUserStyleSheetLocation([NSURL URLWithString:(location ? location : @"")]);
} else
settings->setUserStyleSheetLocation([NSURL URLWithString:@""]);
@@ -1308,6 +1337,7 @@ static bool fastDocumentTeardownEnabled()
settings->setShowRepaintCounter([preferences showRepaintCounter]);
settings->setPluginAllowedRunTime([preferences pluginAllowedRunTime]);
settings->setWebGLEnabled([preferences webGLEnabled]);
+ settings->setLoadDeferringEnabled(shouldEnableLoadDeferring());
}
static inline IMP getMethod(id o, SEL s)
@@ -2319,6 +2349,11 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
frame->animation()->resumeAnimations(frame->document());
}
++ (void)_setDomainRelaxationForbidden:(BOOL)forbidden forURLScheme:(NSString *)scheme
+{
+ SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
+}
+
@end
@implementation _WebSafeForwarder
@@ -5577,6 +5612,41 @@ static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActi
@end
+@implementation WebView (WebViewGeolocation)
+
+- (void)_setGeolocationProvider:(id<WebGeolocationProvider>)geolocationProvider
+{
+ if (_private)
+ _private->_geolocationProvider = geolocationProvider;
+}
+
+- (id<WebGeolocationProvider>)_geolocationProvider
+{
+ if (_private)
+ return _private->_geolocationProvider;
+ return nil;
+}
+
+- (void)_geolocationDidChangePosition:(WebGeolocationPosition *)position;
+{
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ if (_private && _private->page)
+ _private->page->geolocationController()->positionChanged(core(position));
+#endif
+}
+
+- (void)_geolocationDidFailWithError:(NSError *)error
+{
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ if (_private && _private->page) {
+ RefPtr<GeolocationError> geolocatioError = GeolocationError::create(GeolocationError::PositionUnavailable, [error localizedDescription]);
+ _private->page->geolocationController()->errorOccurred(geolocatioError.get());
+ }
+#endif
+}
+
+@end
+
#ifdef BUILDING_ON_LEOPARD
static IMP originalRecursivelyRemoveMailAttributesImp;
diff --git a/WebKit/mac/WebView/WebViewData.h b/WebKit/mac/WebView/WebViewData.h
index 37024c7..b0569a2 100644
--- a/WebKit/mac/WebView/WebViewData.h
+++ b/WebKit/mac/WebView/WebViewData.h
@@ -43,6 +43,7 @@ namespace WebCore {
@class WebPreferences;
@class WebTextCompletionController;
@protocol WebFormDelegate;
+@protocol WebGeolocationProvider;
#if ENABLE(VIDEO)
@class WebVideoFullscreenController;
#endif
@@ -165,5 +166,7 @@ extern int pluginDatabaseClientCount;
#if ENABLE(VIDEO)
WebVideoFullscreenController *fullscreenController;
#endif
+
+ id<WebGeolocationProvider> _geolocationProvider;
}
@end
diff --git a/WebKit/mac/WebView/WebViewData.mm b/WebKit/mac/WebView/WebViewData.mm
index 835f46e..21ba4c8 100644
--- a/WebKit/mac/WebView/WebViewData.mm
+++ b/WebKit/mac/WebView/WebViewData.mm
@@ -81,7 +81,9 @@ int pluginDatabaseClientCount = 0;
ASSERT(applicationIsTerminating || !page);
ASSERT(applicationIsTerminating || !preferences);
ASSERT(!insertionPasteboard);
+#if ENABLE(VIDEO)
ASSERT(!fullscreenController);
+#endif
[applicationNameForUserAgent release];
[backgroundColor release];
@@ -101,7 +103,9 @@ int pluginDatabaseClientCount = 0;
{
ASSERT_MAIN_THREAD();
ASSERT(!insertionPasteboard);
+#if ENABLE(VIDEO)
ASSERT(!fullscreenController);
+#endif
[super finalize];
}
diff --git a/WebKit/mac/WebView/WebViewPrivate.h b/WebKit/mac/WebView/WebViewPrivate.h
index 0622d4c..4d1145e 100644
--- a/WebKit/mac/WebView/WebViewPrivate.h
+++ b/WebKit/mac/WebView/WebViewPrivate.h
@@ -43,6 +43,7 @@
@class NSError;
@class WebFrame;
+@class WebGeolocationPosition;
@class WebInspector;
@class WebPreferences;
@class WebScriptWorld;
@@ -66,6 +67,7 @@ extern NSString *WebElementIsContentEditableKey; // NSNumber indicating whether
// other WebElementDictionary keys
extern NSString *WebElementLinkIsLiveKey; // NSNumber of BOOL indictating whether the link is live or not
+extern NSString *WebElementIsInScrollBarKey;
// One of the subviews of the WebView entered compositing mode.
extern NSString *_WebViewDidStartAcceleratedCompositingNotification;
@@ -507,6 +509,8 @@ Could be worth adding to the API.
*/
- (void)setCSSAnimationsSuspended:(BOOL)suspended;
++ (void)_setDomainRelaxationForbidden:(BOOL)forbidden forURLScheme:(NSString *)scheme;
+
@end
@interface WebView (WebViewPrintingPrivate)
@@ -573,6 +577,20 @@ Could be worth adding to the API.
- (BOOL)_selectionIsAll;
@end
+@protocol WebGeolocationProvider <NSObject>
+- (void)registerWebView:(WebView *)webView;
+- (void)unregisterWebView:(WebView *)webView;
+- (WebGeolocationPosition *)lastPosition;
+@end
+
+@interface WebView (WebViewGeolocation)
+- (void)_setGeolocationProvider:(id<WebGeolocationProvider>)locationProvider;
+- (id<WebGeolocationProvider>)_geolocationProvider;
+
+- (void)_geolocationDidChangePosition:(WebGeolocationPosition *)position;
+- (void)_geolocationDidFailWithError:(NSError *)error;
+@end
+
@interface NSObject (WebFrameLoadDelegatePrivate)
- (void)webView:(WebView *)sender didFirstLayoutInFrame:(WebFrame *)frame;
diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp
index b25b53b..8d4f3ba 100644
--- a/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/WebKit/qt/Api/qgraphicswebview.cpp
@@ -22,24 +22,71 @@
#include "qgraphicswebview.h"
#include "qwebframe.h"
+#include "qwebframe_p.h"
#include "qwebpage.h"
#include "qwebpage_p.h"
#include "QWebPageClient.h"
-#include <QtGui/QGraphicsScene>
-#include <QtGui/QGraphicsView>
+#include <FrameView.h>
+#include <QtCore/qsharedpointer.h>
+#include <QtCore/qtimer.h>
#include <QtGui/qapplication.h>
+#include <QtGui/qgraphicsscene.h>
#include <QtGui/qgraphicssceneevent.h>
+#include <QtGui/qgraphicsview.h>
+#include <QtGui/qpixmapcache.h>
#include <QtGui/qstyleoption.h>
#if defined(Q_WS_X11)
#include <QX11Info>
#endif
+#include <Settings.h>
+
+#if USE(ACCELERATED_COMPOSITING)
+
+// the overlay is here for one reason only: to have the scroll-bars and other
+// extra UI elements appear on top of any QGraphicsItems created by CSS compositing layers
+class QGraphicsWebViewOverlay : public QGraphicsItem {
+ public:
+ QGraphicsWebViewOverlay(QGraphicsWebView* view)
+ :QGraphicsItem(view)
+ , q(view)
+ {
+ setPos(0, 0);
+ setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true);
+ setCacheMode(QGraphicsItem::DeviceCoordinateCache);
+ }
+
+ QRectF boundingRect() const
+ {
+ return q->boundingRect();
+ }
+
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* options, QWidget*)
+ {
+ q->page()->mainFrame()->render(painter, static_cast<QWebFrame::RenderLayer>(QWebFrame::AllLayers&(~QWebFrame::ContentsLayer)), options->exposedRect.toRect());
+ }
+
+ friend class QGraphicsWebView;
+ QGraphicsWebView* q;
+};
+
+#endif
class QGraphicsWebViewPrivate : public QWebPageClient {
public:
QGraphicsWebViewPrivate(QGraphicsWebView* parent)
: q(parent)
, page(0)
- {}
+#if USE(ACCELERATED_COMPOSITING)
+ , rootGraphicsLayer(0)
+ , shouldSync(true)
+#endif
+ {
+#if USE(ACCELERATED_COMPOSITING)
+ // the overlay and stays alive for the lifetime of
+ // this QGraphicsWebView as the scrollbars are needed when there's no compositing
+ q->setFlag(QGraphicsItem::ItemUsesExtendedStyleOption);
+#endif
+ }
virtual ~QGraphicsWebViewPrivate();
virtual void scroll(int dx, int dy, const QRect&);
@@ -61,14 +108,97 @@ public:
virtual QObject* pluginParent() const;
+ virtual QStyle* style() const;
+
+#if USE(ACCELERATED_COMPOSITING)
+ virtual void setRootGraphicsLayer(QGraphicsItem* layer);
+ virtual void markForSync(bool scheduleSync);
+ void updateCompositingScrollPosition();
+#endif
+
+ void syncLayers();
void _q_doLoadFinished(bool success);
QGraphicsWebView* q;
QWebPage* page;
+#if USE(ACCELERATED_COMPOSITING)
+ QGraphicsItem* rootGraphicsLayer;
+
+ // the overlay gets instantiated when the root layer is attached, and get deleted when it's detached
+ QSharedPointer<QGraphicsWebViewOverlay> overlay;
+
+ // we need to sync the layers if we get a special call from the WebCore
+ // compositor telling us to do so. We'll get that call from ChromeClientQt
+ bool shouldSync;
+
+ // we need to put the root graphics layer behind the overlay (which contains the scrollbar)
+ enum { RootGraphicsLayerZValue, OverlayZValue };
+#endif
};
QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate()
{
+#if USE(ACCELERATED_COMPOSITING)
+ if (rootGraphicsLayer) {
+ // we don't need to delete the root graphics layer
+ // The lifecycle is managed in GraphicsLayerQt.cpp
+ rootGraphicsLayer->setParentItem(0);
+ q->scene()->removeItem(rootGraphicsLayer);
+ }
+#endif
+}
+
+#if USE(ACCELERATED_COMPOSITING)
+void QGraphicsWebViewPrivate::setRootGraphicsLayer(QGraphicsItem* layer)
+{
+ if (rootGraphicsLayer) {
+ rootGraphicsLayer->setParentItem(0);
+ q->scene()->removeItem(rootGraphicsLayer);
+ QWebFramePrivate::core(q->page()->mainFrame())->view()->syncCompositingStateRecursive();
+ }
+
+ rootGraphicsLayer = layer;
+
+ if (layer) {
+ layer->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
+ layer->setParentItem(q);
+ layer->setZValue(RootGraphicsLayerZValue);
+ if (!overlay) {
+ overlay = QSharedPointer<QGraphicsWebViewOverlay>(new QGraphicsWebViewOverlay(q));
+ overlay->setZValue(OverlayZValue);
+ }
+ updateCompositingScrollPosition();
+ } else {
+ // we don't have compositing layers, we can render the scrollbars and content in one go
+ overlay.clear();
+ }
+}
+
+void QGraphicsWebViewPrivate::markForSync(bool scheduleSync)
+{
+ shouldSync = true;
+ if (scheduleSync)
+ QTimer::singleShot(0, q, SLOT(syncLayers()));
+}
+
+void QGraphicsWebViewPrivate::updateCompositingScrollPosition()
+{
+ if (rootGraphicsLayer && q->page() && q->page()->mainFrame()) {
+ const QPoint scrollPosition = q->page()->mainFrame()->scrollPosition();
+ rootGraphicsLayer->setPos(-scrollPosition);
+ }
+}
+
+#endif
+
+void QGraphicsWebViewPrivate::syncLayers()
+{
+#if USE(ACCELERATED_COMPOSITING)
+ if (shouldSync) {
+ QWebFramePrivate::core(q->page()->mainFrame())->view()->syncCompositingStateRecursive();
+ shouldSync = false;
+ }
+#endif
}
void QGraphicsWebViewPrivate::_q_doLoadFinished(bool success)
@@ -83,11 +213,18 @@ void QGraphicsWebViewPrivate::_q_doLoadFinished(bool success)
void QGraphicsWebViewPrivate::scroll(int dx, int dy, const QRect& rectToScroll)
{
q->scroll(qreal(dx), qreal(dy), QRectF(rectToScroll));
+#if USE(ACCELERATED_COMPOSITING)
+ updateCompositingScrollPosition();
+#endif
}
void QGraphicsWebViewPrivate::update(const QRect & dirtyRect)
{
q->update(QRectF(dirtyRect));
+#if USE(ACCELERATED_COMPOSITING)
+ if (overlay)
+ overlay->update(QRectF(dirtyRect));
+#endif
}
@@ -156,6 +293,11 @@ QObject* QGraphicsWebViewPrivate::pluginParent() const
return q;
}
+QStyle* QGraphicsWebViewPrivate::style() const
+{
+ return q->style();
+}
+
/*!
\class QGraphicsWebView
\brief The QGraphicsWebView class allows Web content to be added to a GraphicsView.
@@ -244,7 +386,11 @@ QGraphicsWebView::QGraphicsWebView(QGraphicsItem* parent)
#endif
setAcceptDrops(true);
setAcceptHoverEvents(true);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ setAcceptTouchEvents(true);
+#endif
setFocusPolicy(Qt::StrongFocus);
+ setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
}
/*!
@@ -294,7 +440,12 @@ QWebPage* QGraphicsWebView::page() const
*/
void QGraphicsWebView::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget*)
{
- page()->mainFrame()->render(painter, option->exposedRect.toRect());
+#if USE(ACCELERATED_COMPOSITING)
+ page()->mainFrame()->render(painter, d->overlay ? QWebFrame::ContentsLayer : QWebFrame::AllLayers, option->exposedRect.toAlignedRect());
+ d->syncLayers();
+#else
+ page()->mainFrame()->render(painter, QWebFrame::AllLayers, option->exposedRect.toRect());
+#endif
}
/*! \reimp
@@ -302,6 +453,17 @@ void QGraphicsWebView::paint(QPainter* painter, const QStyleOptionGraphicsItem*
bool QGraphicsWebView::sceneEvent(QEvent* event)
{
// Re-implemented in order to allows fixing event-related bugs in patch releases.
+
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ if (d->page && (event->type() == QEvent::TouchBegin
+ || event->type() == QEvent::TouchEnd
+ || event->type() == QEvent::TouchUpdate)) {
+ d->page->event(event);
+ if (event->isAccepted())
+ return true;
+ }
+#endif
+
return QGraphicsWidget::sceneEvent(event);
}
@@ -411,6 +573,10 @@ void QGraphicsWebView::setPage(QWebPage* page)
d->page = page;
if (!d->page)
return;
+#if USE(ACCELERATED_COMPOSITING)
+ if (d->overlay)
+ d->overlay->prepareGeometryChange();
+#endif
d->page->d->client = d; // set the page client
QSize size = geometry().size().toSize();
@@ -494,7 +660,6 @@ QIcon QGraphicsWebView::icon() const
/*!
\property QGraphicsWebView::zoomFactor
- \since 4.5
\brief the zoom factor for the view
*/
@@ -515,6 +680,12 @@ qreal QGraphicsWebView::zoomFactor() const
*/
void QGraphicsWebView::updateGeometry()
{
+
+#if USE(ACCELERATED_COMPOSITING)
+ if (d->overlay)
+ d->overlay->prepareGeometryChange();
+#endif
+
QGraphicsWidget::updateGeometry();
if (!d->page)
@@ -530,6 +701,11 @@ void QGraphicsWebView::setGeometry(const QRectF& rect)
{
QGraphicsWidget::setGeometry(rect);
+#if USE(ACCELERATED_COMPOSITING)
+ if (d->overlay)
+ d->overlay->prepareGeometryChange();
+#endif
+
if (!d->page)
return;
diff --git a/WebKit/qt/Api/qgraphicswebview.h b/WebKit/qt/Api/qgraphicswebview.h
index f3afb4c..3cf51b2 100644
--- a/WebKit/qt/Api/qgraphicswebview.h
+++ b/WebKit/qt/Api/qgraphicswebview.h
@@ -134,6 +134,9 @@ protected:
private:
Q_PRIVATE_SLOT(d, void _q_doLoadFinished(bool success))
+ // we don't want to change the moc based on USE() macro, so this function is here
+ // but will be empty if ACCLERATED_COMPOSITING is disabled
+ Q_PRIVATE_SLOT(d, void syncLayers())
QGraphicsWebViewPrivate* const d;
friend class QGraphicsWebViewPrivate;
diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp
index b98b4d5..aeb7a22 100644
--- a/WebKit/qt/Api/qwebframe.cpp
+++ b/WebKit/qt/Api/qwebframe.cpp
@@ -220,6 +220,22 @@ QString QWEBKIT_EXPORT qt_drt_counterValueForElementById(QWebFrame* qFrame, cons
return QString();
}
+// Suspend active DOM objects in this frame.
+void QWEBKIT_EXPORT qt_suspendActiveDOMObjects(QWebFrame* qFrame)
+{
+ Frame* frame = QWebFramePrivate::core(qFrame);
+ if (frame->document())
+ frame->document()->suspendActiveDOMObjects();
+}
+
+// Resume active DOM objects in this frame.
+void QWEBKIT_EXPORT qt_resumeActiveDOMObjects(QWebFrame* qFrame)
+{
+ Frame* frame = QWebFramePrivate::core(qFrame);
+ if (frame->document())
+ frame->document()->resumeActiveDOMObjects();
+}
+
QWebFrameData::QWebFrameData(WebCore::Page* parentPage, WebCore::Frame* parentFrame,
WebCore::HTMLFrameOwnerElement* ownerFrameElement,
const WebCore::String& frameName)
@@ -361,6 +377,45 @@ void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame:
}
}
+bool QWebFramePrivate::scrollOverflow(int dx, int dy)
+{
+ if (!frame || !frame->document() || !frame->eventHandler())
+ return false;
+
+ Node* node = frame->document()->focusedNode();
+ if (!node)
+ node = frame->document()->elementFromPoint(frame->eventHandler()->currentMousePosition().x(),
+ frame->eventHandler()->currentMousePosition().y());
+ if (!node)
+ return false;
+
+ RenderObject* renderer = node->renderer();
+ if (!renderer)
+ return false;
+
+ if (renderer->isListBox())
+ return false;
+
+ RenderLayer* renderLayer = renderer->enclosingLayer();
+ if (!renderLayer)
+ return false;
+
+ bool scrolledHorizontal = false;
+ bool scrolledVertical = false;
+
+ if (dx > 0)
+ scrolledHorizontal = renderLayer->scroll(ScrollRight, ScrollByPixel, dx);
+ else if (dx < 0)
+ scrolledHorizontal = renderLayer->scroll(ScrollLeft, ScrollByPixel, qAbs(dx));
+
+ if (dy > 0)
+ scrolledVertical = renderLayer->scroll(ScrollDown, ScrollByPixel, dy);
+ else if (dy < 0)
+ scrolledVertical = renderLayer->scroll(ScrollUp, ScrollByPixel, qAbs(dy));
+
+ return (scrolledHorizontal || scrolledVertical);
+}
+
/*!
\class QWebFrame
\since 4.4
@@ -1000,6 +1055,55 @@ void QWebFrame::scroll(int dx, int dy)
}
/*!
+ \since 4.7
+ Scrolls nested frames starting at this frame, \a dx pixels to the right
+ and \a dy pixels downward. Both \a dx and \a dy may be negative. First attempts
+ to scroll elements with CSS overflow followed by this frame. If this
+ frame doesn't scroll, attempts to scroll the parent
+
+ \sa QWebFrame::scroll
+*/
+bool QWebFrame::scrollRecursively(int dx, int dy)
+{
+ bool scrolledHorizontal = false;
+ bool scrolledVertical = false;
+ bool scrolledOverflow = d->scrollOverflow(dx, dy);
+
+ if (!scrolledOverflow) {
+ Frame* frame = d->frame;
+ if (!frame || !frame->view())
+ return false;
+
+ do {
+ IntSize scrollOffset = frame->view()->scrollOffset();
+ IntPoint maxScrollOffset = frame->view()->maximumScrollPosition();
+
+ if (dx > 0) // scroll right
+ scrolledHorizontal = scrollOffset.width() < maxScrollOffset.x();
+ else if (dx < 0) // scroll left
+ scrolledHorizontal = scrollOffset.width() > 0;
+
+ if (dy > 0) // scroll down
+ scrolledVertical = scrollOffset.height() < maxScrollOffset.y();
+ else if (dy < 0) //scroll up
+ scrolledVertical = scrollOffset.height() > 0;
+
+ if (scrolledHorizontal || scrolledVertical) {
+ frame->view()->scrollBy(IntSize(dx, dy));
+ return true;
+ }
+ frame = frame->tree()->parent();
+ } while (frame && frame->view());
+ }
+ return (scrolledHorizontal || scrolledVertical || scrolledOverflow);
+}
+
+bool QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy)
+{
+ return qFrame->scrollRecursively(dx, dy);
+}
+
+/*!
\property QWebFrame::scrollPosition
\since 4.5
\brief the position the frame is currently scrolled to.
@@ -1289,6 +1393,11 @@ void QWebFrame::print(QPrinter *printer) const
// paranoia check
fromPage = qMax(1, fromPage);
toPage = qMin(printContext.pageCount(), toPage);
+ if (toPage < fromPage) {
+ // if the user entered a page range outside the actual number
+ // of printable pages, just return
+ return;
+ }
if (printer->pageOrder() == QPrinter::LastPageFirst) {
int tmp = fromPage;
diff --git a/WebKit/qt/Api/qwebframe.h b/WebKit/qt/Api/qwebframe.h
index c2a6e9b..25f6c9b 100644
--- a/WebKit/qt/Api/qwebframe.h
+++ b/WebKit/qt/Api/qwebframe.h
@@ -156,6 +156,7 @@ public:
QRect scrollBarGeometry(Qt::Orientation orientation) const;
void scroll(int, int);
+ bool scrollRecursively(int, int);
QPoint scrollPosition() const;
void setScrollPosition(const QPoint &pos);
diff --git a/WebKit/qt/Api/qwebframe_p.h b/WebKit/qt/Api/qwebframe_p.h
index 045c70e..ee978be 100644
--- a/WebKit/qt/Api/qwebframe_p.h
+++ b/WebKit/qt/Api/qwebframe_p.h
@@ -85,6 +85,8 @@ public:
void renderRelativeCoords(WebCore::GraphicsContext*, QWebFrame::RenderLayer, const QRegion& clip);
void renderContentsLayerAbsoluteCoords(WebCore::GraphicsContext*, const QRegion& clip);
+ bool scrollOverflow(int dx, int dy);
+
QWebFrame *q;
Qt::ScrollBarPolicy horizontalScrollBarPolicy;
Qt::ScrollBarPolicy verticalScrollBarPolicy;
diff --git a/WebKit/qt/Api/qwebinspector.cpp b/WebKit/qt/Api/qwebinspector.cpp
index f43cbbf..c3ef530 100644
--- a/WebKit/qt/Api/qwebinspector.cpp
+++ b/WebKit/qt/Api/qwebinspector.cpp
@@ -151,16 +151,25 @@ void QWebInspector::resizeEvent(QResizeEvent* event)
/*! \reimp */
void QWebInspector::showEvent(QShowEvent* event)
{
+#if ENABLE(INSPECTOR)
// Allows QWebInspector::show() to init the inspector.
if (d->page)
d->page->d->inspectorController()->show();
+#endif
}
/*! \reimp */
void QWebInspector::hideEvent(QHideEvent* event)
{
+}
+
+/*! \reimp */
+void QWebInspector::closeEvent(QCloseEvent* event)
+{
+#if ENABLE(INSPECTOR)
if (d->page)
d->page->d->inspectorController()->setWindowVisible(false);
+#endif
}
/*! \internal */
diff --git a/WebKit/qt/Api/qwebinspector.h b/WebKit/qt/Api/qwebinspector.h
index a5c1ed5..6cda479 100644
--- a/WebKit/qt/Api/qwebinspector.h
+++ b/WebKit/qt/Api/qwebinspector.h
@@ -43,6 +43,7 @@ protected:
void resizeEvent(QResizeEvent* event);
void showEvent(QShowEvent* event);
void hideEvent(QHideEvent* event);
+ void closeEvent(QCloseEvent* event);
private:
QWebInspectorPrivate* d;
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 50cbaf0..7e3b084 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -32,6 +32,8 @@
#include "qwebsettings.h"
#include "qwebkitversion.h"
+#include "Chrome.h"
+#include "ContextMenuController.h"
#include "Frame.h"
#include "FrameTree.h"
#include "FrameLoader.h"
@@ -79,6 +81,7 @@
#include "runtime/InitializeThreading.h"
#include "PageGroup.h"
#include "QWebPageClient.h"
+#include "WorkerThread.h"
#include <QApplication>
#include <QBasicTimer>
@@ -108,6 +111,11 @@
#include <QX11Info>
#endif
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+#include <QTouchEvent>
+#include "PlatformTouchEvent.h"
+#endif
+
using namespace WebCore;
void QWEBKIT_EXPORT qt_drt_overwritePluginDirectories()
@@ -122,6 +130,15 @@ void QWEBKIT_EXPORT qt_drt_overwritePluginDirectories()
db->refresh();
}
+int QWEBKIT_EXPORT qt_drt_workerThreadCount()
+{
+#if ENABLE(WORKERS)
+ return WebCore::WorkerThread::workerThreadCount();
+#else
+ return 0;
+#endif
+}
+
bool QWebPagePrivate::drtRun = false;
void QWEBKIT_EXPORT qt_drt_run(bool b)
{
@@ -165,6 +182,8 @@ public:
virtual QObject* pluginParent() const;
+ virtual QStyle* style() const;
+
QWidget* view;
};
@@ -234,6 +253,11 @@ QObject* QWebPageWidgetClient::pluginParent() const
return view;
}
+QStyle* QWebPageWidgetClient::style() const
+{
+ return view->style();
+}
+
// Lookup table mapping QWebPage::WebActions to the associated Editor commands
static const char* editorCommandWebActions[] =
{
@@ -337,8 +361,10 @@ static inline DragOperation dropActionToDragOp(Qt::DropActions actions)
unsigned result = 0;
if (actions & Qt::CopyAction)
result |= DragOperationCopy;
+ // DragOperationgeneric represents InternetExplorer's equivalent of Move operation,
+ // hence it should be considered as "move"
if (actions & Qt::MoveAction)
- result |= DragOperationMove;
+ result |= (DragOperationMove | DragOperationGeneric);
if (actions & Qt::LinkAction)
result |= DragOperationLink;
return (DragOperation)result;
@@ -351,6 +377,10 @@ static inline Qt::DropAction dragOpToDropAction(unsigned actions)
result = Qt::CopyAction;
else if (actions & DragOperationMove)
result = Qt::MoveAction;
+ // DragOperationgeneric represents InternetExplorer's equivalent of Move operation,
+ // hence it should be considered as "move"
+ else if (actions & DragOperationGeneric)
+ result = Qt::MoveAction;
else if (actions & DragOperationLink)
result = Qt::LinkAction;
return result;
@@ -455,7 +485,9 @@ static QWebPage::WebAction webActionForContextMenuAction(WebCore::ContextMenuAct
case WebCore::ContextMenuItemTagBold: return QWebPage::ToggleBold;
case WebCore::ContextMenuItemTagItalic: return QWebPage::ToggleItalic;
case WebCore::ContextMenuItemTagUnderline: return QWebPage::ToggleUnderline;
+#if ENABLE(INSPECTOR)
case WebCore::ContextMenuItemTagInspectElement: return QWebPage::InspectElement;
+#endif
default: break;
}
return QWebPage::NoWebAction;
@@ -1061,8 +1093,9 @@ void QWebPagePrivate::focusOutEvent(QFocusEvent*)
// and the focus frame. But don't tell the focus controller so that upon
// focusInEvent() we can re-activate the frame.
FocusController *focusController = page->focusController();
- focusController->setActive(false);
+ // Call setFocused first so that window.onblur doesn't get called twice
focusController->setFocused(false);
+ focusController->setActive(false);
}
void QWebPagePrivate::dragEnterEvent(QGraphicsSceneDragDropEvent* ev)
@@ -1084,8 +1117,9 @@ void QWebPagePrivate::dragEnterEvent(QDragEnterEvent* ev)
dropActionToDragOp(ev->possibleActions()));
Qt::DropAction action = dragOpToDropAction(page->dragController()->dragEntered(&dragData));
ev->setDropAction(action);
- if (action != Qt::IgnoreAction)
- ev->accept();
+ // We must accept this event in order to receive the drag move events that are sent
+ // while the drag and drop action is in progress.
+ ev->accept();
#endif
}
@@ -1125,9 +1159,11 @@ void QWebPagePrivate::dragMoveEvent(QDragMoveEvent* ev)
DragData dragData(ev->mimeData(), ev->pos(), QCursor::pos(),
dropActionToDragOp(ev->possibleActions()));
Qt::DropAction action = dragOpToDropAction(page->dragController()->dragUpdated(&dragData));
+ m_lastDropAction = action;
ev->setDropAction(action);
- if (action != Qt::IgnoreAction)
- ev->accept();
+ // We must accept this event in order to receive the drag move events that are sent
+ // while the drag and drop action is in progress.
+ ev->accept();
#endif
}
@@ -1136,8 +1172,7 @@ void QWebPagePrivate::dropEvent(QGraphicsSceneDragDropEvent* ev)
#ifndef QT_NO_DRAGANDDROP
DragData dragData(ev->mimeData(), ev->pos().toPoint(),
QCursor::pos(), dropActionToDragOp(ev->possibleActions()));
- Qt::DropAction action = dragOpToDropAction(page->dragController()->performDrag(&dragData));
- if (action != Qt::IgnoreAction)
+ if (page->dragController()->performDrag(&dragData))
ev->accept();
#endif
}
@@ -1145,10 +1180,11 @@ void QWebPagePrivate::dropEvent(QGraphicsSceneDragDropEvent* ev)
void QWebPagePrivate::dropEvent(QDropEvent* ev)
{
#ifndef QT_NO_DRAGANDDROP
+ // Overwrite the defaults set by QDragManager::defaultAction()
+ ev->setDropAction(m_lastDropAction);
DragData dragData(ev->mimeData(), ev->pos(), QCursor::pos(),
- dropActionToDragOp(ev->possibleActions()));
- Qt::DropAction action = dragOpToDropAction(page->dragController()->performDrag(&dragData));
- if (action != Qt::IgnoreAction)
+ dropActionToDragOp(Qt::DropAction(ev->dropAction())));
+ if (page->dragController()->performDrag(&dragData))
ev->accept();
#endif
}
@@ -1217,7 +1253,7 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
break;
}
case QInputMethodEvent::Cursor: {
- frame->setCaretVisible(a.length); //if length is 0 cursor is invisible
+ frame->selection()->setCaretVisible(a.length); //if length is 0 cursor is invisible
if (a.length > 0) {
RenderObject* caretRenderer = frame->selection()->caretRenderer();
if (caretRenderer) {
@@ -1334,6 +1370,18 @@ bool QWebPagePrivate::handleScrolling(QKeyEvent *ev, Frame *frame)
return frame->eventHandler()->scrollRecursively(direction, granularity);
}
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+void QWebPagePrivate::touchEvent(QTouchEvent* event)
+{
+ WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
+ if (!frame->view())
+ return;
+
+ bool accepted = frame->eventHandler()->handleTouchEvent(PlatformTouchEvent(event));
+ event->setAccepted(accepted);
+}
+#endif
+
/*!
This method is used by the input method to query a set of properties of the page
to be able to support complex input method operations as support for surrounding
@@ -1362,6 +1410,11 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const
switch (property) {
case Qt::ImMicroFocus: {
+ WebCore::FrameView* view = frame->view();
+ if (view && view->needsLayout()) {
+ // We can't access absoluteCaretBounds() while the view needs to layout.
+ return QVariant();
+ }
return QVariant(frame->selection()->absoluteCaretBounds());
}
case Qt::ImFont: {
@@ -1460,6 +1513,7 @@ void QWebPagePrivate::setInspector(QWebInspector* insp)
*/
QWebInspector* QWebPagePrivate::getOrCreateInspector()
{
+#if ENABLE(INSPECTOR)
if (!inspector) {
QWebInspector* insp = new QWebInspector;
insp->setPage(q);
@@ -1467,13 +1521,18 @@ QWebInspector* QWebPagePrivate::getOrCreateInspector()
Q_ASSERT(inspector); // Associated through QWebInspector::setPage(q)
}
+#endif
return inspector;
}
/*! \internal */
InspectorController* QWebPagePrivate::inspectorController()
{
+#if ENABLE(INSPECTOR)
return page->inspectorController();
+#else
+ return 0;
+#endif
}
@@ -1837,7 +1896,8 @@ bool QWebPage::javaScriptConfirm(QWebFrame *frame, const QString& msg)
The program may provide an optional message, \a msg, as well as a default value for the input in \a defaultValue.
If the prompt was cancelled by the user the implementation should return false; otherwise the
- result should be written to \a result and true should be returned.
+ result should be written to \a result and true should be returned. If the prompt was not cancelled by the
+ user, the implementation should return true and the result string must not be null.
The default implementation uses QInputDialog::getText.
*/
@@ -2014,11 +2074,13 @@ void QWebPage::triggerAction(WebAction action, bool)
editor->setBaseWritingDirection(RightToLeftWritingDirection);
break;
case InspectElement: {
+#if ENABLE(INSPECTOR)
if (!d->hitTestResult.isNull()) {
d->getOrCreateInspector(); // Make sure the inspector is created
d->inspector->show(); // The inspector is expected to be shown on inspection
d->page->inspectorController()->inspect(d->hitTestResult.d->innerNonSharedNode.get());
}
+#endif
break;
}
default:
@@ -2548,6 +2610,13 @@ bool QWebPage::event(QEvent *ev)
case QEvent::Leave:
d->leaveEvent(ev);
break;
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ case QEvent::TouchBegin:
+ case QEvent::TouchUpdate:
+ case QEvent::TouchEnd:
+ d->touchEvent(static_cast<QTouchEvent*>(ev));
+ break;
+#endif
default:
return QObject::event(ev);
}
@@ -2705,8 +2774,11 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos)
d->hitTestResult = QWebHitTestResult(new QWebHitTestResultPrivate(result));
WebCore::ContextMenu menu(result);
menu.populate();
+
+#if ENABLE(INSPECTOR)
if (d->page->inspectorController()->enabled())
menu.addInspectElementItem();
+#endif
QBitArray visitedWebActions(QWebPage::WebActionCount);
@@ -3396,9 +3468,9 @@ quint64 QWebPage::bytesReceived() const
/*!
\fn void QWebPage::unsupportedContent(QNetworkReply *reply)
- This signals is emitted when webkit cannot handle a link the user navigated to.
+ This signal is emitted when WebKit cannot handle a link the user navigated to.
- At signal emissions time the meta data of the QNetworkReply \a reply is available.
+ At signal emission time the meta-data of the QNetworkReply \a reply is available.
\note This signal is only emitted if the forwardUnsupportedContent property is set to true.
diff --git a/WebKit/qt/Api/qwebpage_p.h b/WebKit/qt/Api/qwebpage_p.h
index 5d97da4..dbc981e 100644
--- a/WebKit/qt/Api/qwebpage_p.h
+++ b/WebKit/qt/Api/qwebpage_p.h
@@ -114,6 +114,10 @@ public:
void handleSoftwareInputPanel(Qt::MouseButton);
bool handleScrolling(QKeyEvent*, WebCore::Frame*);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ void touchEvent(QTouchEvent*);
+#endif
+
void setInspector(QWebInspector*);
QWebInspector* getOrCreateInspector();
WebCore::InspectorController* inspectorController();
@@ -176,6 +180,7 @@ public:
QWidget* inspectorFrontend;
QWebInspector* inspector;
bool inspectorIsInternalOnly; // True if created through the Inspect context menu action
+ Qt::DropAction m_lastDropAction;
static bool drtRun;
};
diff --git a/WebKit/qt/Api/qwebsecurityorigin.cpp b/WebKit/qt/Api/qwebsecurityorigin.cpp
index 2a225c5..6c26bd7 100644
--- a/WebKit/qt/Api/qwebsecurityorigin.cpp
+++ b/WebKit/qt/Api/qwebsecurityorigin.cpp
@@ -40,6 +40,11 @@ void QWEBKIT_EXPORT qt_drt_resetOriginAccessWhiteLists()
SecurityOrigin::resetOriginAccessWhiteLists();
}
+void QWEBKIT_EXPORT qt_drt_setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme)
+{
+ SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
+}
+
/*!
\class QWebSecurityOrigin
\since 4.5
diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp
index 9a5ab46..a94a3aa 100644
--- a/WebKit/qt/Api/qwebsettings.cpp
+++ b/WebKit/qt/Api/qwebsettings.cpp
@@ -47,6 +47,17 @@
#include <QUrl>
#include <QFileInfo>
+#if ENABLE(QT_BEARER)
+#include "NetworkStateNotifier.h"
+#endif
+
+void QWEBKIT_EXPORT qt_networkAccessAllowed(bool isAllowed)
+{
+#if ENABLE(QT_BEARER)
+ WebCore::networkStateNotifier().setNetworkAccessAllowed(isAllowed);
+#endif
+}
+
class QWebSettingsPrivate {
public:
QWebSettingsPrivate(WebCore::Settings* wcSettings = 0)
@@ -141,7 +152,12 @@ void QWebSettingsPrivate::apply()
value = attributes.value(QWebSettings::JavascriptEnabled,
global->attributes.value(QWebSettings::JavascriptEnabled));
settings->setJavaScriptEnabled(value);
+#if USE(ACCELERATED_COMPOSITING)
+ value = attributes.value(QWebSettings::AcceleratedCompositingEnabled,
+ global->attributes.value(QWebSettings::AcceleratedCompositingEnabled));
+ settings->setAcceleratedCompositingEnabled(value);
+#endif
value = attributes.value(QWebSettings::JavascriptCanOpenWindows,
global->attributes.value(QWebSettings::JavascriptCanOpenWindows));
settings->setJavaScriptCanOpenWindowsAutomatically(value);
@@ -193,12 +209,16 @@ void QWebSettingsPrivate::apply()
value = attributes.value(QWebSettings::LocalStorageEnabled,
global->attributes.value(QWebSettings::LocalStorageEnabled));
-
settings->setLocalStorageEnabled(value);
value = attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls,
global->attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls));
settings->setAllowUniversalAccessFromFileURLs(value);
+
+ value = attributes.value(QWebSettings::XSSAuditorEnabled,
+ global->attributes.value(QWebSettings::XSSAuditorEnabled));
+ settings->setXSSAuditorEnabled(value);
+
settings->setUsesPageCache(WebCore::pageCache()->capacity());
} else {
QList<QWebSettingsPrivate*> settings = *::allSettings();
@@ -343,6 +363,7 @@ QWebSettings* QWebSettings::globalSettings()
\value LocalStorageDatabaseEnabled \e{This enum value is deprecated.} Use
QWebSettings::LocalStorageEnabled instead.
\value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are allowed to access remote urls.
+ \value XSSAuditorEnabled Specifies whether load requests should be monitored for cross-site scripting attempts.
*/
/*!
@@ -373,6 +394,7 @@ QWebSettings::QWebSettings()
d->attributes.insert(QWebSettings::OfflineWebApplicationCacheEnabled, false);
d->attributes.insert(QWebSettings::LocalStorageEnabled, false);
d->attributes.insert(QWebSettings::LocalContentCanAccessRemoteUrls, false);
+ d->attributes.insert(QWebSettings::AcceleratedCompositingEnabled, false);
d->offlineStorageDefaultQuota = 5 * 1024 * 1024;
d->defaultTextEncoding = QLatin1String("iso-8859-1");
}
diff --git a/WebKit/qt/Api/qwebsettings.h b/WebKit/qt/Api/qwebsettings.h
index 69f3b11..77f2167 100644
--- a/WebKit/qt/Api/qwebsettings.h
+++ b/WebKit/qt/Api/qwebsettings.h
@@ -67,7 +67,9 @@ public:
LocalStorageDatabaseEnabled = LocalStorageEnabled,
#endif
LocalContentCanAccessRemoteUrls,
- DnsPrefetchEnabled
+ DnsPrefetchEnabled,
+ XSSAuditorEnabled,
+ AcceleratedCompositingEnabled
};
enum WebGraphic {
MissingImageGraphic,
diff --git a/WebKit/qt/Api/qwebview.cpp b/WebKit/qt/Api/qwebview.cpp
index 7bc3168..b5a5a90 100644
--- a/WebKit/qt/Api/qwebview.cpp
+++ b/WebKit/qt/Api/qwebview.cpp
@@ -22,10 +22,11 @@
#include "config.h"
#include "qwebview.h"
+#include "Page.h"
#include "QWebPageClient.h"
+#include "Settings.h"
#include "qwebframe.h"
#include "qwebpage_p.h"
-
#include "qbitmap.h"
#include "qevent.h"
#include "qpainter.h"
@@ -57,6 +58,106 @@ void QWebViewPrivate::_q_pageDestroyed()
view->setPage(0);
}
+#ifdef Q_WS_MAEMO_5
+#include "qabstractkineticscroller.h"
+
+class QWebViewKineticScroller : public QAbstractKineticScroller {
+public:
+ QWebViewKineticScroller() : QAbstractKineticScroller() {}
+ // remember the frame where the button was pressed
+ bool eventFilter(QObject* o, QEvent* ev)
+ {
+ switch (ev->type()) {
+ case QEvent::MouseButtonPress: {
+ QWebFrame* hitFrame = scrollingFrameAt(static_cast<QMouseEvent*>(ev)->pos());
+ if (hitFrame)
+ m_frame = hitFrame;
+ break;
+ }
+ default:
+ break;
+ }
+ return QAbstractKineticScroller::eventFilter(o, ev);
+ }
+
+protected:
+ QWebFrame* currentFrame() const
+ {
+ if (!m_frame.isNull())
+ return m_frame.data();
+
+ QWebView* view = static_cast<QWebView*>(widget());
+ QWebFrame* frame = view->page()->mainFrame();
+ return frame;
+ }
+
+ // Returns the innermost frame at the given position that can scroll.
+ QWebFrame* scrollingFrameAt(const QPoint& pos) const
+ {
+ QWebView* view = static_cast<QWebView*>(widget());
+ QWebFrame* mainFrame = view->page()->mainFrame();
+ QWebFrame* hitFrame = mainFrame->hitTestContent(pos).frame();
+ QSize range = hitFrame->contentsSize() - hitFrame->geometry().size();
+
+ while (hitFrame && range.width() <= 1 && range.height() <= 1)
+ hitFrame = hitFrame->parentFrame();
+
+ return hitFrame;
+ }
+
+ void attachToWidget()
+ {
+ QWebView* view = static_cast<QWebView*>(widget());
+ QWebFrame* mainFrame = view->page()->mainFrame();
+ m_oldHorizontalScrollBarPolicy = mainFrame->scrollBarPolicy(Qt::Horizontal);
+ m_oldVerticalScrollBarPolicy = mainFrame->scrollBarPolicy(Qt::Vertical);
+ mainFrame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
+ mainFrame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
+ view->installEventFilter(this);
+ }
+
+ void removeFromWidget()
+ {
+ QWebView* view = static_cast<QWebView*>(widget());
+ view->removeEventFilter(this);
+ QWebFrame* mainFrame = view->page()->mainFrame();
+ mainFrame->setScrollBarPolicy(Qt::Vertical, m_oldVerticalScrollBarPolicy);
+ mainFrame->setScrollBarPolicy(Qt::Horizontal, m_oldHorizontalScrollBarPolicy);
+ }
+
+ QRect positionRange() const
+ {
+ QRect r;
+ QWebFrame* frame = currentFrame();
+ r.setSize(frame->contentsSize() - frame->geometry().size());
+ return r;
+ }
+
+ QPoint position() const
+ {
+ QWebFrame* frame = currentFrame();
+ return frame->scrollPosition();
+ }
+
+ QSize viewportSize() const
+ {
+ return static_cast<QWebView*>(widget())->page()->viewportSize();
+ }
+
+ void setPosition(const QPoint& point, const QPoint& /* overShootDelta */)
+ {
+ QWebFrame* frame = currentFrame();
+ frame->setScrollPosition(point);
+ }
+
+ QPointer<QWebFrame> m_frame;
+ Qt::ScrollBarPolicy m_oldVerticalScrollBarPolicy;
+ Qt::ScrollBarPolicy m_oldHorizontalScrollBarPolicy;
+};
+
+#endif // Q_WS_MAEMO_5
+
+
/*!
\class QWebView
\since 4.4
@@ -153,6 +254,14 @@ QWebView::QWebView(QWidget *parent)
setAttribute(Qt::WA_InputMethodEnabled);
#endif
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ setAttribute(Qt::WA_AcceptTouchEvents);
+#endif
+#if defined(Q_WS_MAEMO_5)
+ QAbstractKineticScroller* scroller = new QWebViewKineticScroller();
+ scroller->setWidget(this);
+ setProperty("kineticScroller", QVariant::fromValue(scroller));
+#endif
setAcceptDrops(true);
setMouseTracking(true);
@@ -243,6 +352,9 @@ void QWebView::setPage(QWebPage* page)
this, SLOT(_q_pageDestroyed()));
}
setAttribute(Qt::WA_OpaquePaintEvent, d->page);
+#if USE(ACCELERATED_COMPOSITING)
+ d->page->d->page->settings()->setAcceleratedCompositingEnabled(false);
+#endif
update();
}
@@ -640,6 +752,14 @@ bool QWebView::event(QEvent *e)
if (cursor().shape() == Qt::ArrowCursor)
d->page->d->client->resetCursor();
#endif
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ } else if (e->type() == QEvent::TouchBegin
+ || e->type() == QEvent::TouchEnd
+ || e->type() == QEvent::TouchUpdate) {
+ d->page->event(e);
+ if (e->isAccepted())
+ return true;
+#endif
} else if (e->type() == QEvent::Leave)
d->page->event(e);
}
diff --git a/WebKit/qt/Api/qwebview.h b/WebKit/qt/Api/qwebview.h
index d7910d9..f681fbc 100644
--- a/WebKit/qt/Api/qwebview.h
+++ b/WebKit/qt/Api/qwebview.h
@@ -49,12 +49,7 @@ class QWEBKIT_EXPORT QWebView : public QWidget {
Q_PROPERTY(qreal textSizeMultiplier READ textSizeMultiplier WRITE setTextSizeMultiplier DESIGNABLE false)
Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor)
-// FIXME: temporary work around for elftran issue that it couldn't find the QPainter::staticMetaObject
-// symbol from Qt lib; it should be reverted after the right symbol is exported.
-// See bug: http://qt.nokia.com/developer/task-tracker/index_html?method=entry&id=258893
-#if defined(Q_QDOC) || !defined(Q_OS_SYMBIAN)
Q_PROPERTY(QPainter::RenderHints renderHints READ renderHints WRITE setRenderHints)
-#endif
Q_FLAGS(QPainter::RenderHints)
public:
explicit QWebView(QWidget* parent = 0);
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 4d2467a..3928198 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,395 @@
+<<<<<<< HEAD
+=======
+2010-01-29 Ben Murdoch <benm@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Android] Android needs functionality in the ChromeClient to be informed when touch events are and are not needed by the webpage.
+ https://bugs.webkit.org/show_bug.cgi?id=34215
+
+ Add needTouchEvents() to the ChromeClient which is called when the page decides it needs or no longer needs to be informed of touch events.
+
+ * WebCoreSupport/ChromeClientQt.h:
+ (WebCore::ChromeClientQt::needTouchEvents): Add an empty implementation.
+
+2010-01-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann
+
+ Disable auto-uppercase and predictive text on Maemo5, just like the
+ build-in MicroB Browser.
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::setInputMethodState):
+
+2010-01-28 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Support kinetic scrolling on Maemo 5
+
+ https://bugs.webkit.org/show_bug.cgi?id=34267
+
+ Patch by Ralf Engels <ralf.engels@nokia.com> and
+ Robert Griebl <rgriebl@trolltech.com>
+
+ * Api/qwebview.cpp:
+ (QWebViewKineticScroller::QWebViewKineticScroller):
+ (QWebViewKineticScroller::eventFilter):
+ (QWebViewKineticScroller::currentFrame):
+ (QWebViewKineticScroller::scrollingFrameAt):
+ (QWebViewKineticScroller::attachToWidget):
+ (QWebViewKineticScroller::removeFromWidget):
+ (QWebViewKineticScroller::positionRange):
+ (QWebViewKineticScroller::position):
+ (QWebViewKineticScroller::viewportSize):
+ (QWebViewKineticScroller::setPosition):
+ (QWebView::QWebView):
+
+2010-01-28 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Do not set the combobox font on Maemo5 and S60; use the
+ default instead.
+
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopup::populate):
+
+2010-01-28 Trond Kjernåsen <trond@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix for endless print loop when printing web pages
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::print):
+
+2010-01-27 Diego Gonzalez <diego.gonzalez@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] DRT Provide worker thread ability to track counters
+ https://bugs.webkit.org/show_bug.cgi?id=34221
+
+ Implement workerThreadCount() in LayoutTestController of Qt DRT
+
+ Tests:
+ fast/workers/dedicated-worker-lifecycle.html
+ fast/workers/shared-worker-frame-lifecycle.html
+ fast/workers/shared-worker-lifecycle.html
+ fast/workers/worker-lifecycle.html
+
+ * Api/qwebpage.cpp:
+ (qt_drt_workerThreadCount):
+
+2010-01-27 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Update the .def files with exported symbols
+
+ * symbian/eabi/QtWebKitu.def: Add two mangled missing new symbols for arm eabi.
+
+2010-01-27 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Meta-methods can't be introspected using ES5 API
+ https://bugs.webkit.org/show_bug.cgi?id=34087
+
+ Test that Object.getOwnPropertyDescriptor and
+ Object.getOwnPropertyNames work with meta-methods.
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2010-01-26 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Show comboboxes on Maemo 5
+ https://bugs.webkit.org/show_bug.cgi?id=34088
+
+ Don't try to show the combobox by simulating a mouse event from QCursor::pos() to
+ get the combobox position right. The position on Maemo 5 is independent from the mouse
+ and there's no QCursor::pos().
+
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopup::show):
+
+2010-01-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ First steps of the QtScript API.
+
+ Two new classes were created; QScriptEngine and QScriptValue.
+ The first should encapsulate a javascript context and the second a script
+ value.
+
+ This API is still in development, so it isn't compiled by default.
+ To trigger compilation, pass --qmakearg="CONFIG+=build-qtscript" to
+ build-webkit.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32565
+
+ * docs/qtwebkit.qdocconf:
+
+2010-01-26 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] JavaScript prompt is currently broken
+ https://bugs.webkit.org/show_bug.cgi?id=30914
+
+ In r52152 a patch was landed to convert a null QString
+ to an empty WebCore::String in case the prompt was accepted
+ but the default implementation returned the null QString.
+
+ The patch tried to avoid assign to result twice and
+ was not checking the QString if it is null but the default
+ value. This lead to always returning an empty string on
+ successful prompts. Fix it by checking the variable 'x'
+ for isNull.
+
+ The manual test case used didn't cover the case of non
+ empty input, replace it with an automatic test case that
+ should cover all cases.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::runJavaScriptPrompt): Fix the bug.
+ * tests/qwebpage/tst_qwebpage.cpp: Add automatic test case
+ (JSPromptPage::JSPromptPage):
+ (JSPromptPage::javaScriptPrompt):
+ (tst_QWebPage::testJSPrompt):
+
+2010-01-25 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] In RenderThemeQt determine the QStyle from the page client instead of the page's view
+ https://bugs.webkit.org/show_bug.cgi?id=34053
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::style): Implement QWebPageClient::style() and return the graphics
+ widget's style.
+ * Api/qwebpage.cpp:
+ (QWebPageWidgetClient::style): Implement QWebPageClient::style() and return the widget's style.
+
+2010-01-25 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Phone backup support for QtWebkit for Symbian devices.
+ https://bugs.webkit.org/show_bug.cgi?id=34077
+
+ * symbian/backup_registration.xml: Added.
+
+2010-01-23 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix positioning of ComboBox popup in QGraphicsWebView.
+
+ Wrap the popup in a QGraphicsProxyWidget, so that the popup
+ transforms with the item.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33887
+
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopupCombo::hidePopup):
+ (WebCore::QtFallbackWebPopup::QtFallbackWebPopup):
+ (WebCore::QtFallbackWebPopup::~QtFallbackWebPopup):
+ (WebCore::QtFallbackWebPopup::show):
+ * WebCoreSupport/QtFallbackWebPopup.h:
+
+2010-01-22 Peter Kasting <pkasting@google.com>
+
+ Not reviewed, backout.
+
+ Back out r52673, which caused several regressions.
+ https://bugs.webkit.org/show_bug.cgi?id=32533
+
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopupCombo::hidePopup):
+
+2010-01-22 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Save the QWebPageClient instead of the ownerWidget in QtAbstractWebPopup
+
+ The QWebPageClient is required for the QtFallbackWebPopup. QtFallbackWebPopup will
+ need it to create a QGraphicsProxyWidget (in a future commit) for the
+ QGraphicsWebView's web popup.
+
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopup::show):
+
+2010-01-22 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ QState::polished() was renamed to QState::propertiesAssigned() when
+ Qt 4.6.0 was released.
+
+ * QGVLauncher/main.cpp:
+ (MainWindow::init):
+
+2010-01-21 Diego Gonzalez <diego.gonzalez@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] add setDomainRelaxationForbiddenForURLScheme in Qt DRT
+ https://bugs.webkit.org/show_bug.cgi?id=33945
+
+ * Api/qwebsecurityorigin.cpp:
+ (qt_drt_setDomainRelaxationForbiddenForURLScheme):
+
+2010-01-21 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Antti Koivisto.
+
+ [Qt] Implement GraphicsLayer for accelerated layer compositing
+ https://bugs.webkit.org/show_bug.cgi?id=33514
+
+ Here we have the QGraphicsWebView support for accelerated compositing
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewOverlay::q): access to container object
+ (QGraphicsWebViewOverlay::boundingRect): overlay has same rect as the
+ webview
+ (QGraphicsWebViewOverlay::paint): paint everything but the contents
+ (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate): some vars needed
+ for accelerated compositing
+ (QGraphicsWebViewPrivate::):
+ (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate):
+ (QGraphicsWebViewPrivate::setRootGraphicsLayer): make sure we have a
+ scrollbar overlay, and that the new graphics layer is parented by the
+ web-view
+ (QGraphicsWebViewPrivate::markForSync): flush changes at earliest
+ convenience or during the next draw
+
+ (QGraphicsWebViewPrivate::updateCompositingScrollPosition): sync the
+ position of the compositing layer with the scroll position
+ (QGraphicsWebViewPrivate::syncLayers): flush changes now
+ (QGraphicsWebViewPrivate::scroll): make sure we also move the
+ compositing layer
+ (QGraphicsWebViewPrivate::update): also update the overlay if needed
+ (QGraphicsWebView::QGraphicsWebView): initialize overlay with 0
+ (QGraphicsWebView::paint): paint only contents if we have an overlay,
+ sync the compositing layers now if needed
+ (QGraphicsWebView::setPage): also clean up the compositing
+ (QGraphicsWebView::updateGeometry): also update overlay geo
+ (QGraphicsWebView::setGeometry): also update overlay geo
+ * Api/qgraphicswebview.h: reimp compositing stuff from QWebPageClient
+ * Api/qwebsettings.cpp: init new settings flag for compositing as
+ false
+ (QWebSettingsPrivate::apply): apply new settings flag for compositing
+ (QWebSettings::QWebSettings):
+ * Api/qwebsettings.h: new settings flag for compositing
+ * Api/qwebview.cpp:
+ (QWebView::setPage): qwebview doesn't support compositing: always false
+ * QGVLauncher/main.cpp:
+ (WebView::WebView): some more cmdline arguments + compositing
+ (MainWindow::init): some more cmdline arguments
+ (main): ditto
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::attachRootGraphicsLayer): reimp for
+ accel-compositing
+ (WebCore::ChromeClientQt::setNeedsOneShotDrawingSynchronization):
+ reimp for accel compositing
+ (WebCore::ChromeClientQt::scheduleCompositingLayerSync): reimp for
+ accel compositing
+ * WebCoreSupport/ChromeClientQt.h: reimps for accel compositing
+
+2010-01-21 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Improve the autotests of QtWebkit
+ https://bugs.webkit.org/show_bug.cgi?id=32216
+
+ Remove qWait() of the test when possible.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::loadFinished):
+ (tst_QWebPage::database):
+ (tst_QWebPage::testEnablePersistentStorage):
+ (tst_QWebPage::errorPageExtension):
+ (tst_QWebPage::screenshot):
+
+2010-01-21 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Prospective build fix for the Qt build.
+
+ Fix compilation against Qt without WebKit support by not including QtWebKit/QWebView
+ but widget.h instead and instantiating QWebView through a typedef, to ensure we're using
+ our locally built WebKit.
+
+ * tests/hybridPixmap/widget.h:
+ * tests/hybridPixmap/widget.ui:
+
+2010-01-21 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Adding QPixmap/QImage support for the Qt hybrid layer
+ https://bugs.webkit.org/show_bug.cgi?id=32461
+
+ * tests/hybridPixmap: Added.
+ * tests/hybridPixmap/hybridPixmap.pro: Added.
+ * tests/hybridPixmap/resources.qrc: Added.
+ * tests/hybridPixmap/test.html: Added.
+ * tests/hybridPixmap/tst_hybridPixmap.cpp: Added.
+ (tst_hybridPixmap::tst_hybridPixmap): tests most of the use cases for
+ hybrid pixmap/image manipulation
+ (tst_hybridPixmap::init): QTestLib initialization
+ (tst_hybridPixmap::cleanup): QTestLib cleanup
+ (tst_hybridPixmap::hybridPixmap): run the html file
+ * tests/hybridPixmap/widget.cpp: Added.
+ (Widget::Widget):
+ (Widget::refreshJS):
+ (Widget::start):
+ (Widget::completeTest):
+ (Widget::setPixmap):
+ (Widget::pixmap):
+ (Widget::setImage):
+ (Widget::image):
+ (Widget::~Widget):
+ (Widget::changeEvent):
+ (Widget::compare):
+ (Widget::imageSlot):
+ (Widget::pixmapSlot):
+ (Widget::randomSlot):
+ * tests/hybridPixmap/widget.h: Added.
+ * tests/hybridPixmap/widget.ui: Added.
+ * tests/tests.pro:
+
+2010-01-21 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Custom select popups.
+ https://bugs.webkit.org/show_bug.cgi?id=33418
+
+ Adjusting QtFallbackWebPopupCombo to the changes in WebCore layer.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::createSelectPopup):
+ * WebCoreSupport/ChromeClientQt.h:
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopupCombo::QtFallbackWebPopupCombo):
+ (WebCore::QtFallbackWebPopupCombo::showPopup):
+ (WebCore::QtFallbackWebPopupCombo::hidePopup):
+ (WebCore::QtFallbackWebPopup::QtFallbackWebPopup):
+ (WebCore::QtFallbackWebPopup::~QtFallbackWebPopup):
+ (WebCore::QtFallbackWebPopup::show):
+ (WebCore::QtFallbackWebPopup::hide):
+ (WebCore::QtFallbackWebPopup::populate):
+ * WebCoreSupport/QtFallbackWebPopup.h:
+
+>>>>>>> webkit.org at r54127
2010-01-19 Steve Block <steveblock@google.com>
Reviewed by Adam Barth.
@@ -7,6 +399,580 @@
* Api/qwebframe.cpp:
+<<<<<<< HEAD
+=======
+2010-01-14 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Drag and Drop source/destination code needs cleanup.
+ <https://bugs.webkit.org/show_bug.cgi?id=33691>.
+
+ Update to new way of calling sourceOperation.
+
+ * WebCoreSupport/DragClientQt.cpp:
+ (WebCore::DragClientQt::startDrag):
+
+2010-01-14 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Symbian build fixes.
+
+ * tests/qwebpage/tst_qwebpage.cpp: Include util.h
+ * tests/tests.pri: Don't define TESTS_SOURCE_DIR, it doesn't work.
+ * tests/util.h: Define TESTS_SOURCE_DIR here, just like it's done in Qt.
+
+2010-01-14 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Update Symbian .def symbol export files after private API additions.
+
+ * symbian/bwins/QtWebKitu.def:
+ * symbian/eabi/QtWebKitu.def:
+
+2010-01-13 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Move more of the selection and caret painting code from Frame to SelectionController.
+ https://bugs.webkit.org/show_bug.cgi?id=33619
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::inputMethodEvent): Seems possibly wrong to be directly invoking this
+ setCaretVisible here, but I updated it to call it in its new location.
+
+2010-01-11 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Add private API for QWebFrame scrolling, to maintain binary compatibility with Qt 4.6.
+
+ This is just a temporary addition until we have introduced #ifdefs to allow
+ safely removing the private API again.
+
+ * Api/qwebframe.cpp:
+ (qtwebkit_webframe_scrollRecursively):
+
+2010-01-10 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Add enableXSSAuditor support to QWebSettings and DRT.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33419
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ * Api/qwebsettings.h:
+
+2010-01-09 Daniel Bates <dbates@webkit.org>
+
+ No review, rolling out r53044.
+ http://trac.webkit.org/changeset/53044
+ https://bugs.webkit.org/show_bug.cgi?id=33419
+
+ We need to look into this some more because the Qt
+ bot is failing the XSSAuditor tests. See bug #33419
+ for more details.
+
+ * Api/qwebsettings.cpp:
+ * Api/qwebsettings.h:
+
+2010-01-09 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33419
+
+ Adds support for the XSSAuditor to the Qt DRT.
+
+ * Api/qwebsettings.cpp: Updated comment to reflect added key XSSAuditorEnabled.
+ * Api/qwebsettings.h: Adds settings key XSSAuditorEnabled.
+
+2010-01-08 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Delegation client
+ https://bugs.webkit.org/show_bug.cgi?id=32826
+
+ Added method createPopup to ChromeClientQt used to create popups.
+ QtFallbackWebPopup moved from WebCore/platform/qt to
+ WebKit/qt/WebCoreSupport.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::createPopup):
+ * WebCoreSupport/ChromeClientQt.h:
+ * WebCoreSupport/QtFallbackWebPopup.cpp: Added.
+ (WebCore::QtFallbackWebPopup::QtFallbackWebPopup):
+ (WebCore::QtFallbackWebPopup::show):
+ (WebCore::QtFallbackWebPopup::populate):
+ (WebCore::QtFallbackWebPopup::showPopup):
+ (WebCore::QtFallbackWebPopup::hidePopup):
+ (WebCore::QtFallbackWebPopup::activeChanged):
+ (WebCore::QtFallbackWebPopup::setParent):
+ * WebCoreSupport/QtFallbackWebPopup.h: Added.
+ (WebCore::QtFallbackWebPopup::hide):
+
+2010-01-07 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Allow the application to override online/offline network status
+ https://bugs.webkit.org/show_bug.cgi?id=32684
+
+ Add a setting so that applications can overide the network status.
+ Applications that use this setting still need to block network access
+ through QNAM.
+
+ * Api/qwebsettings.cpp:
+ (qt_networkAccessAllowed):
+
+2010-01-07 Yongjun Zhang <yongjun.zhang@nokia.com>, Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] need an API to suspend and resume active Javascript DOM objects.
+ https://bugs.webkit.org/show_bug.cgi?id=31673
+
+ Add suspend and resume DOM objects private API to QWebFrame.
+
+ * Api/qwebframe.cpp:
+ (qt_suspendActiveDOMObjects):
+ (qt_resumeActiveDOMObjects):
+
+2010-01-06 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Return an invalid Qt::ImMicroFocus if queried while the view needs to layout.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33204
+
+ * Api/qwebpage.cpp:
+ (QWebPage::inputMethodQuery):
+
+2010-01-05 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Drag & drop layout tests fail even when run manually
+ https://bugs.webkit.org/show_bug.cgi?id=33055
+
+ No new tests. Fix 3 layout tests when run manually.
+ fast/events/drag-and-drop.html
+ fast/events/drag-and-drop-dataTransfer-types-nocrash.html
+ fast/events/drag-and-drop-fire-drag-dragover.html
+ Running these tests in DRT will be fixed in 31332.
+
+ * Api/qwebpage.cpp:
+ (dropActionToDragOp):
+ (dragOpToDropAction):
+ (QWebPagePrivate::dragEnterEvent):
+ (QWebPagePrivate::dragMoveEvent):
+ (QWebPagePrivate::dropEvent):
+ Accept drag events even if they are not over a drop target.
+ This is to ensure that drag events will continue to be delivered.
+
+ * Api/qwebpage_p.h:
+ * WebCoreSupport/DragClientQt.cpp:
+ (WebCore::dragOperationToDropActions):
+ (WebCore::dropActionToDragOperation):
+ (WebCore::DragClientQt::startDrag):
+ Send dragEnd event.
+
+2010-01-04 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33097
+
+ Cleans up the File menu to better conform to the File menu in Safari
+ both in terms of options and keyboard shortcuts. Adds a "Quit" menu
+ options to close all open windows.
+
+ * QGVLauncher/main.cpp:
+ (MainWindow::buildUI):
+
+2009-12-31 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Enable all HTML5 persistent features for QGVLauncher
+ https://bugs.webkit.org/show_bug.cgi?id=33086
+
+ * QGVLauncher/main.cpp: Call enablePersistentStorage()
+ (main):
+
+2009-12-30 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] It should be possible to disable inspector
+ https://bugs.webkit.org/show_bug.cgi?id=32724
+
+ This change fixes the build break. Some QtWebKit interfaces
+ will not be fully functional (most notable QWebInspector) if
+ INSPECTOR is disabled.
+
+ * Api/qwebinspector.cpp:
+ (QWebInspector::showEvent):
+ (QWebInspector::closeEvent):
+ * Api/qwebpage.cpp:
+ (webActionForContextMenuAction):
+ (QWebPagePrivate::getOrCreateInspector):
+ (QWebPagePrivate::inspectorController):
+ (QWebPage::triggerAction):
+ (QWebPage::updatePositionDependentActions):
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::showWindow):
+ (WebCore::InspectorClientQt::closeWindow):
+
+2009-12-30 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Upstream Symbian def files from Qt 4.6.
+
+ These files define the ABI of QtWebKit on Symbian.
+
+ * symbian/bwins/QtWebKitu.def: Added.
+ * symbian/eabi/QtWebKitu.def: Added.
+
+2009-12-29 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32925
+
+ Adds an Open File dialog to make it convenient to open a file
+ to view in the browser.
+
+ * QGVLauncher/main.cpp:
+ (MainWindow::load): Modified to call loadURL.
+ (MainWindow::openFile): Added.
+ (MainWindow::loadURL): Added.
+ (MainWindow::buildUI): Added menu item Open File.
+
+2009-12-29 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Fix crash on LayoutTests/fast/loader/empty-embed-src-attribute.html
+
+ Related to https://bugs.webkit.org/show_bug.cgi?id=23806
+
+ If an embedded document is loaded within a page and it has an empty
+ URL, use a blank URL for the load request.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33017
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createFrame):
+
+2009-12-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Rubber-stamped by Simon Hausmann and Holger Freyther.
+
+ [Qt] Remove WebKit/qt/WebKitPart empty directory
+
+ The content of the directory has been removed by r34888.
+
+ * WebKitPart: Removed.
+
+2009-12-29 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] DRT: Frame loader callbacks differ from the Mac port
+ https://bugs.webkit.org/show_bug.cgi?id=32989
+
+ Remove messages from the callbacks that should not dump them to match
+ the expected results for the http/loading tests.
+
+ Unskip some http/loading tests which succeed now.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchDidPopStateWithinPage):
+ (WebCore::FrameLoaderClientQt::dispatchWillClose):
+ (WebCore::FrameLoaderClientQt::dispatchDidReceiveIcon):
+ (WebCore::FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld):
+
+2009-12-29 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] fix fast/dom/Window/window-onFocus.html
+
+ Add support for layouttestcontroller.windowIsKey to Qt DRT and fix issue where
+ window.onblur was getting dispatched twice from QtWebKit.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32990
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::focusOutEvent):
+
+2009-12-24 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Gustavo Noronha.
+
+ Doc : QGraphicsWebView::zoomFactor was introduced in 4.6.
+
+ * Api/qgraphicswebview.cpp:
+
+2009-12-22 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Rubber-stamped by Holger Freyther.
+
+ Moved QtLauncher to WebKitTools/
+
+ * QtLauncher: Removed.
+ * QtLauncher/QtLauncher.pro: Removed.
+ * QtLauncher/main.cpp: Removed.
+
+2009-12-21 David Boddie <dboddie@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ Doc: Minor fixes to language.
+
+ * Api/qwebpage.cpp:
+
+2009-12-21 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Clean up the WebKit layer unit-tests
+
+ - Use tests.pri for common options
+ - Standardize file naming
+ - Move all resources to 'resources' subdir
+ - Standardize how TESTS_SOURCE_DIR is used
+ - Get rid of UID3 for symbian (autogenerated)
+ - Don't build app bundles on Mac OS X
+
+ * tests/benchmarks/loading/loading.pro: Added.
+ * tests/benchmarks/loading/tst_loading.pro: Removed.
+ * tests/benchmarks/painting/painting.pro: Added.
+ * tests/benchmarks/painting/tst_painting.pro: Removed.
+ * tests/qgraphicswebview/qgraphicswebview.pro:
+ * tests/qwebelement/qwebelement.pro:
+ * tests/qwebelement/qwebelement.qrc: Removed.
+ * tests/qwebelement/resources/image.png: Renamed from WebKit/qt/tests/qwebelement/image.png.
+ * tests/qwebelement/resources/style.css: Renamed from WebKit/qt/tests/qwebelement/style.css.
+ * tests/qwebelement/resources/style2.css: Renamed from WebKit/qt/tests/qwebelement/style2.css.
+ * tests/qwebelement/tst_qwebelement.qrc: Added.
+ * tests/qwebframe/qwebframe.pro:
+ * tests/qwebframe/qwebframe.qrc: Removed.
+ * tests/qwebframe/resources/image.png: Renamed from WebKit/qt/tests/qwebframe/image.png.
+ * tests/qwebframe/resources/style.css: Renamed from WebKit/qt/tests/qwebframe/style.css.
+ * tests/qwebframe/resources/test1.html: Renamed from WebKit/qt/tests/qwebframe/test1.html.
+ * tests/qwebframe/resources/test2.html: Renamed from WebKit/qt/tests/qwebframe/test2.html.
+ * tests/qwebframe/resources/testiframe.html: Renamed from WebKit/qt/tests/qwebframe/testiframe.html.
+ * tests/qwebframe/resources/testiframe2.html: Renamed from WebKit/qt/tests/qwebframe/testiframe2.html.
+ * tests/qwebframe/tst_qwebframe.cpp:
+ * tests/qwebframe/tst_qwebframe.qrc: Added.
+ * tests/qwebhistory/qwebhistory.pro:
+ * tests/qwebhistory/resources/page1.html: Renamed from WebKit/qt/tests/qwebhistory/data/page1.html.
+ * tests/qwebhistory/resources/page2.html: Renamed from WebKit/qt/tests/qwebhistory/data/page2.html.
+ * tests/qwebhistory/resources/page3.html: Renamed from WebKit/qt/tests/qwebhistory/data/page3.html.
+ * tests/qwebhistory/resources/page4.html: Renamed from WebKit/qt/tests/qwebhistory/data/page4.html.
+ * tests/qwebhistory/resources/page5.html: Renamed from WebKit/qt/tests/qwebhistory/data/page5.html.
+ * tests/qwebhistory/resources/page6.html: Renamed from WebKit/qt/tests/qwebhistory/data/page6.html.
+ * tests/qwebhistory/tst_qwebhistory.cpp:
+ (tst_QWebHistory::):
+ * tests/qwebhistory/tst_qwebhistory.qrc:
+ * tests/qwebhistoryinterface/qwebhistoryinterface.pro:
+ * tests/qwebinspector/qwebinspector.pro:
+ * tests/qwebpage/qwebpage.pro:
+ * tests/qwebpage/resources/frame_a.html: Renamed from WebKit/qt/tests/qwebpage/frametest/frame_a.html.
+ * tests/qwebpage/resources/iframe.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe.html.
+ * tests/qwebpage/resources/iframe2.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe2.html.
+ * tests/qwebpage/resources/iframe3.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe3.html.
+ * tests/qwebpage/resources/index.html: Renamed from WebKit/qt/tests/qwebpage/frametest/index.html.
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::backActionUpdate):
+ (tst_QWebPage::frameAt):
+ (tst_QWebPage::errorPageExtensionInFrameset):
+ (tst_QWebPage::screenshot):
+ * tests/qwebpage/tst_qwebpage.qrc:
+ * tests/qwebplugindatabase/qwebplugindatabase.pro:
+ * tests/qwebview/qwebview.pro:
+ * tests/qwebview/resources/frame_a.html: Renamed from WebKit/qt/tests/qwebview/data/frame_a.html.
+ * tests/qwebview/resources/index.html: Renamed from WebKit/qt/tests/qwebview/data/index.html.
+ * tests/qwebview/tst_qwebview.cpp:
+ (tst_QWebView::reusePage):
+ (tst_QWebView::crashTests):
+ * tests/qwebview/tst_qwebview.qrc:
+ * tests/resources/image2.png: Renamed from WebKit/qt/tests/qwebframe/resources/image2.png.
+ * tests/tests.pri: Added.
+ * tests/tests.pro:
+
+2009-12-18 Ariya Hidayat <ariya.hidayat@gmail.com>
+
+ Build fix, not reviewed.
+
+ * QtLauncher/main.cpp:
+ (MainWindow::setTouchMocking): Leave setTouchMocking as an empty
+ function for Qt < 4.6 so that moc still creates a slot for that.
+ Otherwise, it would have generated a linker error.
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ Qt build fix
+
+ * Api/qwebpage.cpp: Added #include.
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ Qt build fix
+
+ * Api/qwebpage.cpp:
+ Added #includes.
+
+2009-12-18 Joe Ligman <joseph.ligman@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add new API to QWebFrame to scrollRecursively starting with any css overflow
+ then checking current frame and then ancestors
+ https://bugs.webkit.org/show_bug.cgi?id=32668
+
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::scrollOverflow):
+ (QWebFrame::scrollRecursively):
+ * Api/qwebframe.h:
+ * Api/qwebframe_p.h:
+ * tests/qwebframe/qwebframe.qrc:
+ * tests/qwebframe/testiframe.html: Added.
+ * tests/qwebframe/testiframe2.html: Added.
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2009-12-18 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Fix infinite recursion in touch mocking.
+
+ Don't send the fake touch events to the view, as that'll trigger the
+ event filter again.
+
+ * QtLauncher/main.cpp:
+ (MainWindow::sendTouchEvent):
+
+2009-12-17 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Add support for mocking touch events with Q(GV)Launcher
+ https://bugs.webkit.org/show_bug.cgi?id=32434
+
+ The event delivery should go through QCoreApplication::sendEvent()
+
+ * QtLauncher/main.cpp:
+ (MainWindow::sendTouchEvent):
+
+2009-12-17 Kim Grönholm <kim.gronholm@nomovok.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Add support for touch events in QWebView and QGraphicsWebView
+ https://bugs.webkit.org/show_bug.cgi?id=32432
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebView::QGraphicsWebView):
+ (QGraphicsWebView::sceneEvent):
+ * Api/qwebview.cpp:
+ (QWebView::QWebView):
+ (QWebView::event):
+
+2009-12-17 Kim Grönholm <kim.gronholm@nomovok.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Add support for mocking touch events with QtLauncher
+ https://bugs.webkit.org/show_bug.cgi?id=32434
+
+ * QtLauncher/main.cpp:
+ (MainWindow::MainWindow):
+ (MainWindow::sendTouchEvent):
+ (MainWindow::eventFilter):
+ (MainWindow::setTouchMocking):
+ (MainWindow::setupUI):
+
+2009-12-14 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix JavaScript prompt behavior for empty/null strings.
+ https://bugs.webkit.org/show_bug.cgi?id=30914
+
+ The patch is based on the work done by Gupta Manish.
+
+ In the default implementation of the JavaScript prompt
+ we are using a QInputDialog to get the text and this has
+ one quirk with regard to not entering any text.
+
+ In other WebKit ports and in Firefox an empty string is
+ returned but in the Qt case it is a null string.
+
+ Change the API documentation in QWebPage to mention we want to
+ have a non null string but do the fixup in the ChromeClientQt
+ to support existing code.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::javaScriptPrompt): Change API documentation
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::runJavaScriptPrompt): Fixup null QString
+
+2009-11-24 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Do not disable the inspector on show and hide
+ https://bugs.webkit.org/show_bug.cgi?id=31851
+
+ On Qt/X11 with some window managers the window will be
+ hidden when switching windows. In this case all the results
+ are gone when coming back to the window.
+
+ Attempt to use the CloseEvent to figure out if the window
+ was closed and withdrawn as this is more friendly to the
+ user of the inspector client.
+
+ * Api/qwebinspector.cpp:
+ (QWebInspector::hideEvent):
+ (QWebInspector::closeEvent):
+ * Api/qwebinspector.h:
+
+2009-12-14 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Improve the autotests of QtWebkit
+ https://bugs.webkit.org/show_bug.cgi?id=32216
+
+ Refactor tst_qwebelement to remove the qWait()
+
+ * tests/qwebelement/tst_qwebelement.cpp:
+ (tst_QWebElement::style):
+
+2009-12-14 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Fix the QWebPage inputMethods() autotest after r51758
+ to compare the Qt::ImFont property's family against an explicitly
+ previously configured family.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32491
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::inputMethods):
+
+>>>>>>> webkit.org at r54127
2009-12-13 Sam Weinig <sam@webkit.org>
Reviewed by Dan Bernstein.
@@ -22,6 +988,63 @@
* Api/qwebpage.cpp:
(QWebPagePrivate::QWebPagePrivate):
+<<<<<<< HEAD
+=======
+2009-12-13 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Add a test in Qt for https://bugs.webkit.org/show_bug.cgi?id=29005
+ https://bugs.webkit.org/show_bug.cgi?id=29008
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2009-12-13 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Re-enable QWebView::renderHints property for Qt for Symbian
+
+ https://bugs.webkit.org/show_bug.cgi?id=28273
+
+ The bug in Qt's moc that triggered a linking error when declaring this
+ property has been fixed and we can remove the workaround.
+
+ * Api/qwebview.h:
+
+2009-12-11 Yael Aharon <yael.aharon@nokia.com>
+
+ Unreviewed build fix for Qt versions < 4.6.
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+ * tests/qwebview/tst_qwebview.cpp:
+ (tst_QWebView::reusePage):
+
+2009-12-11 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Updated QWebElement documentation
+
+ findAll() returns a QWebElementCollection, not QList<QWebElement>.
+
+ * docs/webkitsnippets/webelement/main.cpp:
+ (findAll):
+
+2009-12-11 Simon Hausmann <hausmann@webkit.org>, Kim Grönholm <kim.gronholm@nomovok.com>
+
+ Reviewed by Antti Koivisto.
+
+ Forward Qt touch events to the event handler as platform touch events.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32114
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::touchEvent):
+ (QWebPage::event):
+ * Api/qwebpage_p.h:
+
+>>>>>>> webkit.org at r54127
2009-12-07 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit/qt/QGVLauncher/main.cpp b/WebKit/qt/QGVLauncher/main.cpp
index 2021cb6..eefff7f 100644
--- a/WebKit/qt/QGVLauncher/main.cpp
+++ b/WebKit/qt/QGVLauncher/main.cpp
@@ -72,6 +72,8 @@ public:
WebView(QGraphicsItem* parent = 0)
: QGraphicsWebView(parent)
{
+ if (QApplication::instance()->arguments().contains("--cacheWebView"))
+ setCacheMode(QGraphicsItem::DeviceCoordinateCache);
}
void setYRotation(qreal angle)
{
@@ -253,6 +255,12 @@ public:
setAttribute(Qt::WA_DeleteOnClose);
view->setScene(scene->scene());
+ const QStringList arguments = QApplication::instance()->arguments();
+ const int indexOfViewportUpdateMode = arguments.indexOf("--updateMode");
+ if (indexOfViewportUpdateMode > 1 && indexOfViewportUpdateMode < arguments.count() - 1) {
+ const QString updateMode = arguments[indexOfViewportUpdateMode+1] + "ViewportUpdate";
+ view->setViewportUpdateMode(static_cast<QGraphicsView::ViewportUpdateMode>(QGraphicsView::staticMetaObject.enumerator(QGraphicsView::staticMetaObject.indexOfEnumerator("ViewportUpdateMode")).keysToValue(updateMode.toAscii())));
+ }
setCentralWidget(view);
@@ -277,7 +285,7 @@ public:
QState *s2 = new QState(machine);
s2->assignProperty(scene->webView(), "yRotation", -90);
- s1->addTransition(s1, SIGNAL(polished()), s2);
+ s1->addTransition(s1, SIGNAL(propertiesAssigned()), s2);
QAbstractTransition *t2 = s2->addTransition(s0);
t2->addAnimation(yRotationAnim);
@@ -296,9 +304,7 @@ public:
if (!deducedUrl.isValid())
deducedUrl = QUrl("http://" + url + "/");
- urlEdit->setText(deducedUrl.toEncoded());
- scene->webView()->load(deducedUrl);
- scene->webView()->setFocus(Qt::OtherFocusReason);
+ loadURL(deducedUrl);
}
QWebPage* page() const
@@ -307,6 +313,23 @@ public:
}
protected slots:
+
+ void openFile()
+ {
+ static const QString filter("HTML Files (*.htm *.html);;Text Files (*.txt);;Image Files (*.gif *.jpg *.png);;All Files (*)");
+
+ QFileDialog fileDialog(this, tr("Open"), QString(), filter);
+ fileDialog.setAcceptMode(QFileDialog::AcceptOpen);
+ fileDialog.setFileMode(QFileDialog::ExistingFile);
+ fileDialog.setOptions(QFileDialog::ReadOnly);
+
+ if (fileDialog.exec()) {
+ QString selectedFile = fileDialog.selectedFiles()[0];
+ if (!selectedFile.isEmpty())
+ loadURL(QUrl::fromLocalFile(selectedFile));
+ }
+ }
+
void changeLocation()
{
load(urlEdit->text());
@@ -368,6 +391,17 @@ public slots:
}
private:
+
+ void loadURL(const QUrl& url)
+ {
+ if (!url.isValid())
+ return;
+
+ urlEdit->setText(url.toString());
+ scene->webView()->load(url);
+ scene->webView()->setFocus(Qt::OtherFocusReason);
+ }
+
void buildUI()
{
QWebPage* page = scene->webView()->page();
@@ -383,9 +417,12 @@ private:
bar->addWidget(urlEdit);
QMenu* fileMenu = menuBar()->addMenu("&File");
- fileMenu->addAction("New Window", this, SLOT(newWindow()));
- fileMenu->addAction("Clone view", this, SLOT(clone()));
- fileMenu->addAction("Close", this, SLOT(close()));
+ fileMenu->addAction("New Window", this, SLOT(newWindow()), QKeySequence::New);
+ fileMenu->addAction("Open File...", this, SLOT(openFile()), QKeySequence::Open);
+ fileMenu->addAction("Clone Window", this, SLOT(clone()));
+ fileMenu->addAction("Close Window", this, SLOT(close()), QKeySequence::Close);
+ fileMenu->addSeparator();
+ fileMenu->addAction("Quit", QApplication::instance(), SLOT(closeAllWindows()), QKeySequence(Qt::CTRL | Qt::Key_Q));
QMenu* viewMenu = menuBar()->addMenu("&View");
viewMenu->addAction(page->action(QWebPage::Stop));
@@ -418,6 +455,10 @@ QWebPage* WebPage::createWindow(QWebPage::WebWindowType)
int main(int argc, char** argv)
{
QApplication app(argc, argv);
+ if (app.arguments().contains("--help")) {
+ qDebug() << "Usage: QGVLauncher [--url url] [--compositing] [--updateMode Full|Minimal|Smart|No|BoundingRect] [--cacheWebView]\n";
+ return 0;
+ }
QString url = QString("file://%1/%2").arg(QDir::homePath()).arg(QLatin1String("index.html"));
app.setApplicationName("GQVLauncher");
@@ -426,17 +467,23 @@ int main(int argc, char** argv)
QWebSettings::setMaximumPagesInCache(4);
QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, true);
QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
- QWebSettings::globalSettings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
+ QWebSettings::enablePersistentStorage();
const QStringList args = app.arguments();
- if (args.count() > 1)
+ const int indexOfUrl = args.indexOf("--url");
+ if (indexOfUrl > 0 && indexOfUrl < args.count() - 1)
+ url = args.at(indexOfUrl+1);
+ else if (args.count() > 1)
url = args.at(1);
+ if (args.contains("--compositing"))
+ QWebSettings::globalSettings()->setAttribute(QWebSettings::AcceleratedCompositingEnabled, true);
MainWindow* window = new MainWindow;
window->load(url);
- for (int i = 2; i < args.count(); i++)
- window->newWindow(args.at(i));
+ for (int i = 2; i < args.count(); ++i)
+ if (!args.at(i).startsWith("-") && !args.at(i - 1).startsWith("-"))
+ window->newWindow(args.at(i));
window->show();
return app.exec();
diff --git a/WebKit/qt/QtLauncher/QtLauncher.pro b/WebKit/qt/QtLauncher/QtLauncher.pro
deleted file mode 100644
index 133869c..0000000
--- a/WebKit/qt/QtLauncher/QtLauncher.pro
+++ /dev/null
@@ -1,16 +0,0 @@
-TEMPLATE = app
-SOURCES += main.cpp
-CONFIG -= app_bundle
-CONFIG += uitools
-DESTDIR = ../../../bin
-
-include(../../../WebKit.pri)
-
-QT += network
-macx:QT+=xml
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-
-symbian {
- TARGET.UID3 = 0xA000E543
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
diff --git a/WebKit/qt/QtLauncher/main.cpp b/WebKit/qt/QtLauncher/main.cpp
deleted file mode 100644
index 2286712..0000000
--- a/WebKit/qt/QtLauncher/main.cpp
+++ /dev/null
@@ -1,656 +0,0 @@
-/*
- * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
- * Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
- * Copyright (C) 2006 George Staikos <staikos@kde.org>
- * Copyright (C) 2006 Dirk Mueller <mueller@kde.org>
- * Copyright (C) 2006 Zack Rusin <zack@kde.org>
- * Copyright (C) 2006 Simon Hausmann <hausmann@kde.org>
- *
- * 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 <QtGui>
-#include <QtNetwork/QNetworkProxy>
-#include <QtNetwork/QNetworkRequest>
-#if !defined(QT_NO_PRINTER)
-#include <QPrintPreviewDialog>
-#endif
-
-#ifndef QT_NO_UITOOLS
-#include <QtUiTools/QUiLoader>
-#endif
-
-#include <QDebug>
-#include <QFile>
-#include <QTextStream>
-#include <QVector>
-
-#include <cstdio>
-#include <qwebelement.h>
-#include <qwebframe.h>
-#include <qwebinspector.h>
-#include <qwebpage.h>
-#include <qwebsettings.h>
-#include <qwebview.h>
-
-
-#ifndef NDEBUG
-void QWEBKIT_EXPORT qt_drt_garbageCollector_collect();
-#endif
-
-static QUrl urlFromUserInput(const QString& input)
-{
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
- return QUrl::fromUserInput(input);
-#else
- return QUrl(input);
-#endif
-}
-
-class WebView : public QWebView {
- Q_OBJECT
-public:
- WebView(QWidget* parent) : QWebView(parent) {}
-
-protected:
- virtual void contextMenuEvent(QContextMenuEvent* event)
- {
- QMenu* menu = page()->createStandardContextMenu();
-
- QWebHitTestResult r = page()->mainFrame()->hitTestContent(event->pos());
-
- if (!r.linkUrl().isEmpty()) {
- QAction* newTabAction = menu->addAction(tr("Open in Default &Browser"), this, SLOT(openUrlInDefaultBrowser()));
- newTabAction->setData(r.linkUrl());
- menu->insertAction(menu->actions().at(2), newTabAction);
- }
-
- menu->exec(mapToGlobal(event->pos()));
- delete menu;
- }
-
- virtual void mousePressEvent(QMouseEvent* event)
- {
- mouseButtons = event->buttons();
- keyboardModifiers = event->modifiers();
-
- QWebView::mousePressEvent(event);
- }
-
-public slots:
- void openUrlInDefaultBrowser(const QUrl &url = QUrl())
- {
- if (QAction* action = qobject_cast<QAction*>(sender()))
- QDesktopServices::openUrl(action->data().toUrl());
- else
- QDesktopServices::openUrl(url);
- }
-
-public:
- Qt::MouseButtons mouseButtons;
- Qt::KeyboardModifiers keyboardModifiers;
-};
-
-class WebPage : public QWebPage {
-public:
- WebPage(QWidget *parent) : QWebPage(parent) {}
-
- virtual QWebPage *createWindow(QWebPage::WebWindowType);
- virtual QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&);
- virtual bool supportsExtension(QWebPage::Extension extension) const
- {
- if (extension == QWebPage::ErrorPageExtension)
- return true;
- return false;
- }
- virtual bool extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output);
-
-
- virtual bool acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest &request, NavigationType type)
- {
- WebView* webView = static_cast<WebView*>(view());
- if (webView->keyboardModifiers & Qt::ShiftModifier) {
- QWebPage* page = createWindow(QWebPage::WebBrowserWindow);
- page->mainFrame()->load(request);
- return false;
- }
- if (webView->keyboardModifiers & Qt::AltModifier) {
- webView->openUrlInDefaultBrowser(request.url());
- return false;
- }
-
- return QWebPage::acceptNavigationRequest(frame, request, type);
- }
-};
-
-class WebInspector : public QWebInspector {
- Q_OBJECT
-public:
- WebInspector(QWidget* parent) : QWebInspector(parent) {}
-signals:
- void visibleChanged(bool nowVisible);
-protected:
- void showEvent(QShowEvent* event)
- {
- QWebInspector::showEvent(event);
- emit visibleChanged(true);
- }
- void hideEvent(QHideEvent* event)
- {
- QWebInspector::hideEvent(event);
- emit visibleChanged(false);
- }
-};
-
-class MainWindow : public QMainWindow {
- Q_OBJECT
-public:
- MainWindow(QString url = QString()): currentZoom(100)
- {
- setAttribute(Qt::WA_DeleteOnClose);
- if (qgetenv("QTLAUNCHER_USE_ARGB_VISUALS").toInt() == 1)
- setAttribute(Qt::WA_TranslucentBackground);
-
- QSplitter* splitter = new QSplitter(Qt::Vertical, this);
- setCentralWidget(splitter);
-
- view = new WebView(splitter);
- WebPage* page = new WebPage(view);
- view->setPage(page);
- connect(view, SIGNAL(loadFinished(bool)),
- this, SLOT(loadFinished()));
- connect(view, SIGNAL(titleChanged(const QString&)),
- this, SLOT(setWindowTitle(const QString&)));
- connect(view->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString &)),
- this, SLOT(showLinkHover(const QString&, const QString&)));
- connect(view->page(), SIGNAL(windowCloseRequested()), this, SLOT(close()));
-
- inspector = new WebInspector(splitter);
- inspector->setPage(page);
- inspector->hide();
- connect(this, SIGNAL(destroyed()), inspector, SLOT(deleteLater()));
-
- setupUI();
-
- // set the proxy to the http_proxy env variable - if present
- QUrl proxyUrl = urlFromUserInput(qgetenv("http_proxy"));
-
- if (proxyUrl.isValid() && !proxyUrl.host().isEmpty()) {
- int proxyPort = (proxyUrl.port() > 0) ? proxyUrl.port() : 8080;
- page->networkAccessManager()->setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, proxyUrl.host(), proxyPort));
- }
-
- QFileInfo fi(url);
- if (fi.exists() && fi.isRelative())
- url = fi.absoluteFilePath();
-
- QUrl qurl = urlFromUserInput(url);
- if (qurl.scheme().isEmpty())
- qurl = QUrl("http://" + url + "/");
- if (qurl.isValid()) {
- urlEdit->setText(qurl.toEncoded());
- view->load(qurl);
- }
-
- // the zoom values are chosen to be like in Mozilla Firefox 3
- zoomLevels << 30 << 50 << 67 << 80 << 90;
- zoomLevels << 100;
- zoomLevels << 110 << 120 << 133 << 150 << 170 << 200 << 240 << 300;
- }
-
- QWebPage* webPage() const
- {
- return view->page();
- }
-
- QWebView* webView() const
- {
- return view;
- }
-
-protected slots:
-
- void changeLocation()
- {
- QString string = urlEdit->text();
- QUrl url = urlFromUserInput(string);
- if (url.scheme().isEmpty())
- url = QUrl("http://" + string + "/");
- if (url.isValid()) {
- urlEdit->setText(url.toEncoded());
- view->load(url);
- view->setFocus(Qt::OtherFocusReason);
- }
- }
-
- void loadFinished()
- {
- urlEdit->setText(view->url().toString());
-
- QUrl::FormattingOptions opts;
- opts |= QUrl::RemoveScheme;
- opts |= QUrl::RemoveUserInfo;
- opts |= QUrl::StripTrailingSlash;
- QString s = view->url().toString(opts);
- s = s.mid(2);
- if (s.isEmpty())
- return;
-
- if (!urlList.contains(s))
- urlList += s;
- urlModel.setStringList(urlList);
- }
-
- void showLinkHover(const QString &link, const QString &toolTip)
- {
- statusBar()->showMessage(link);
-#ifndef QT_NO_TOOLTIP
- if (!toolTip.isEmpty())
- QToolTip::showText(QCursor::pos(), toolTip);
-#endif
- }
-
- void zoomIn()
- {
- int i = zoomLevels.indexOf(currentZoom);
- Q_ASSERT(i >= 0);
- if (i < zoomLevels.count() - 1)
- currentZoom = zoomLevels[i + 1];
-
- view->setZoomFactor(qreal(currentZoom) / 100.0);
- }
-
- void zoomOut()
- {
- int i = zoomLevels.indexOf(currentZoom);
- Q_ASSERT(i >= 0);
- if (i > 0)
- currentZoom = zoomLevels[i - 1];
-
- view->setZoomFactor(qreal(currentZoom) / 100.0);
- }
-
- void resetZoom()
- {
- currentZoom = 100;
- view->setZoomFactor(1.0);
- }
-
- void toggleZoomTextOnly(bool b)
- {
- view->page()->settings()->setAttribute(QWebSettings::ZoomTextOnly, b);
- }
-
- void print()
- {
-#if !defined(QT_NO_PRINTER)
- QPrintPreviewDialog dlg(this);
- connect(&dlg, SIGNAL(paintRequested(QPrinter *)),
- view, SLOT(print(QPrinter *)));
- dlg.exec();
-#endif
- }
-
- void screenshot()
- {
- QPixmap pixmap = QPixmap::grabWidget(view);
- QLabel* label = new QLabel;
- label->setAttribute(Qt::WA_DeleteOnClose);
- label->setWindowTitle("Screenshot - Preview");
- label->setPixmap(pixmap);
- label->show();
-
- QString fileName = QFileDialog::getSaveFileName(label, "Screenshot");
- if (!fileName.isEmpty()) {
- pixmap.save(fileName, "png");
- label->setWindowTitle(QString("Screenshot - Saved at %1").arg(fileName));
- }
- }
-
- void setEditable(bool on)
- {
- view->page()->setContentEditable(on);
- formatMenuAction->setVisible(on);
- }
-
- /*
- void dumpPlugins() {
- QList<QWebPluginInfo> plugins = QWebSettings::pluginDatabase()->plugins();
- foreach (const QWebPluginInfo plugin, plugins) {
- qDebug() << "Plugin:" << plugin.name();
- foreach (const QWebPluginInfo::MimeType mime, plugin.mimeTypes()) {
- qDebug() << " " << mime.name;
- }
- }
- }
- */
-
- void dumpHtml()
- {
- qDebug() << "HTML: " << view->page()->mainFrame()->toHtml();
- }
-
- void selectElements()
- {
- bool ok;
- QString str = QInputDialog::getText(this, "Select elements", "Choose elements",
- QLineEdit::Normal, "a", &ok);
-
- if (ok && !str.isEmpty()) {
- QWebElementCollection result = view->page()->mainFrame()->findAllElements(str);
- foreach (QWebElement e, result)
- e.setStyleProperty("background-color", "yellow");
- statusBar()->showMessage(QString("%1 element(s) selected").arg(result.count()), 5000);
- }
- }
-
-public slots:
-
- void newWindow(const QString &url = QString())
- {
- MainWindow* mw = new MainWindow(url);
- mw->show();
- }
-
-private:
-
- QVector<int> zoomLevels;
- int currentZoom;
-
- // create the status bar, tool bar & menu
- void setupUI()
- {
- progress = new QProgressBar(this);
- progress->setRange(0, 100);
- progress->setMinimumSize(100, 20);
- progress->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- progress->hide();
- statusBar()->addPermanentWidget(progress);
-
- connect(view, SIGNAL(loadProgress(int)), progress, SLOT(show()));
- connect(view, SIGNAL(loadProgress(int)), progress, SLOT(setValue(int)));
- connect(view, SIGNAL(loadFinished(bool)), progress, SLOT(hide()));
-
- urlEdit = new QLineEdit(this);
- urlEdit->setSizePolicy(QSizePolicy::Expanding, urlEdit->sizePolicy().verticalPolicy());
- connect(urlEdit, SIGNAL(returnPressed()),
- SLOT(changeLocation()));
- QCompleter* completer = new QCompleter(this);
- urlEdit->setCompleter(completer);
- completer->setModel(&urlModel);
-
- QToolBar* bar = addToolBar("Navigation");
- bar->addAction(view->pageAction(QWebPage::Back));
- bar->addAction(view->pageAction(QWebPage::Forward));
- bar->addAction(view->pageAction(QWebPage::Reload));
- bar->addAction(view->pageAction(QWebPage::Stop));
- bar->addWidget(urlEdit);
-
- QMenu* fileMenu = menuBar()->addMenu("&File");
- QAction* newWindow = fileMenu->addAction("New Window", this, SLOT(newWindow()));
- fileMenu->addAction(tr("Print"), this, SLOT(print()), QKeySequence::Print);
- QAction* screenshot = fileMenu->addAction("Screenshot", this, SLOT(screenshot()));
- fileMenu->addAction("Close", this, SLOT(close()));
-
- QMenu* editMenu = menuBar()->addMenu("&Edit");
- editMenu->addAction(view->pageAction(QWebPage::Undo));
- editMenu->addAction(view->pageAction(QWebPage::Redo));
- editMenu->addSeparator();
- editMenu->addAction(view->pageAction(QWebPage::Cut));
- editMenu->addAction(view->pageAction(QWebPage::Copy));
- editMenu->addAction(view->pageAction(QWebPage::Paste));
- editMenu->addSeparator();
- QAction* setEditable = editMenu->addAction("Set Editable", this, SLOT(setEditable(bool)));
- setEditable->setCheckable(true);
-
- QMenu* viewMenu = menuBar()->addMenu("&View");
- viewMenu->addAction(view->pageAction(QWebPage::Stop));
- viewMenu->addAction(view->pageAction(QWebPage::Reload));
- viewMenu->addSeparator();
- QAction* zoomIn = viewMenu->addAction("Zoom &In", this, SLOT(zoomIn()));
- QAction* zoomOut = viewMenu->addAction("Zoom &Out", this, SLOT(zoomOut()));
- QAction* resetZoom = viewMenu->addAction("Reset Zoom", this, SLOT(resetZoom()));
- QAction* zoomTextOnly = viewMenu->addAction("Zoom Text Only", this, SLOT(toggleZoomTextOnly(bool)));
- zoomTextOnly->setCheckable(true);
- zoomTextOnly->setChecked(false);
- viewMenu->addSeparator();
- viewMenu->addAction("Dump HTML", this, SLOT(dumpHtml()));
- //viewMenu->addAction("Dump plugins", this, SLOT(dumpPlugins()));
-
- QMenu* formatMenu = new QMenu("F&ormat", this);
- formatMenuAction = menuBar()->addMenu(formatMenu);
- formatMenuAction->setVisible(false);
- formatMenu->addAction(view->pageAction(QWebPage::ToggleBold));
- formatMenu->addAction(view->pageAction(QWebPage::ToggleItalic));
- formatMenu->addAction(view->pageAction(QWebPage::ToggleUnderline));
- QMenu* writingMenu = formatMenu->addMenu(tr("Writing Direction"));
- writingMenu->addAction(view->pageAction(QWebPage::SetTextDirectionDefault));
- writingMenu->addAction(view->pageAction(QWebPage::SetTextDirectionLeftToRight));
- writingMenu->addAction(view->pageAction(QWebPage::SetTextDirectionRightToLeft));
-
- newWindow->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_N));
- screenshot->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_S));
- view->pageAction(QWebPage::Back)->setShortcut(QKeySequence::Back);
- view->pageAction(QWebPage::Stop)->setShortcut(Qt::Key_Escape);
- view->pageAction(QWebPage::Forward)->setShortcut(QKeySequence::Forward);
- view->pageAction(QWebPage::Reload)->setShortcut(QKeySequence::Refresh);
- view->pageAction(QWebPage::Undo)->setShortcut(QKeySequence::Undo);
- view->pageAction(QWebPage::Redo)->setShortcut(QKeySequence::Redo);
- view->pageAction(QWebPage::Cut)->setShortcut(QKeySequence::Cut);
- view->pageAction(QWebPage::Copy)->setShortcut(QKeySequence::Copy);
- view->pageAction(QWebPage::Paste)->setShortcut(QKeySequence::Paste);
- zoomIn->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Plus));
- zoomOut->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Minus));
- resetZoom->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0));
- view->pageAction(QWebPage::ToggleBold)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_B));
- view->pageAction(QWebPage::ToggleItalic)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_I));
- view->pageAction(QWebPage::ToggleUnderline)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_U));
-
- QMenu* toolsMenu = menuBar()->addMenu("&Tools");
- toolsMenu->addAction("Select elements...", this, SLOT(selectElements()));
- QAction* showInspectorAction = toolsMenu->addAction("Show inspector", inspector, SLOT(setVisible(bool)));
- showInspectorAction->setCheckable(true);
- showInspectorAction->setShortcuts(QList<QKeySequence>() << QKeySequence(tr("F12")));
- showInspectorAction->connect(inspector, SIGNAL(visibleChanged(bool)), SLOT(setChecked(bool)));
-
- }
-
- QWebView* view;
- QLineEdit* urlEdit;
- QProgressBar* progress;
- WebInspector* inspector;
-
- QAction* formatMenuAction;
-
- QStringList urlList;
- QStringListModel urlModel;
-};
-
-bool WebPage::extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output)
-{
- const QWebPage::ErrorPageExtensionOption* info = static_cast<const QWebPage::ErrorPageExtensionOption*>(option);
- QWebPage::ErrorPageExtensionReturn* errorPage = static_cast<QWebPage::ErrorPageExtensionReturn*>(output);
-
- errorPage->content = QString("<html><head><title>Failed loading page</title></head><body>%1</body></html>")
- .arg(info->errorString).toUtf8();
-
- return true;
-}
-
-QWebPage* WebPage::createWindow(QWebPage::WebWindowType)
-{
- MainWindow* mw = new MainWindow;
- mw->show();
- return mw->webPage();
-}
-
-QObject* WebPage::createPlugin(const QString &classId, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues)
-{
- Q_UNUSED(url);
- Q_UNUSED(paramNames);
- Q_UNUSED(paramValues);
-#ifndef QT_NO_UITOOLS
- QUiLoader loader;
- return loader.createWidget(classId, view());
-#else
- Q_UNUSED(classId);
- return 0;
-#endif
-}
-
-class URLLoader : public QObject {
- Q_OBJECT
-public:
- URLLoader(QWebView* view, const QString& inputFileName)
- : m_view(view)
- , m_stdOut(stdout)
- , m_loaded(0)
- {
- init(inputFileName);
- }
-
-public slots:
- void loadNext()
- {
- QString qstr;
- if (getUrl(qstr)) {
- QUrl url(qstr, QUrl::StrictMode);
- if (url.isValid()) {
- m_stdOut << "Loading " << qstr << " ......" << ++m_loaded << endl;
- m_view->load(url);
- } else
- loadNext();
- } else
- disconnect(m_view, 0, this, 0);
- }
-
-private:
- void init(const QString& inputFileName)
- {
- QFile inputFile(inputFileName);
- if (inputFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
- QTextStream stream(&inputFile);
- QString line;
- while (true) {
- line = stream.readLine();
- if (line.isNull())
- break;
- m_urls.append(line);
- }
- } else {
- qDebug() << "Cant't open list file";
- exit(0);
- }
- m_index = 0;
- inputFile.close();
- }
-
- bool getUrl(QString& qstr)
- {
- if (m_index == m_urls.size())
- return false;
-
- qstr = m_urls[m_index++];
- return true;
- }
-
-private:
- QVector<QString> m_urls;
- int m_index;
- QWebView* m_view;
- QTextStream m_stdOut;
- int m_loaded;
-};
-
-#include "main.moc"
-
-int launcherMain(const QApplication& app)
-{
-#ifndef NDEBUG
- int retVal = app.exec();
- qt_drt_garbageCollector_collect();
- QWebSettings::clearMemoryCaches();
- return retVal;
-#else
- return app.exec();
-#endif
-}
-
-int main(int argc, char **argv)
-{
- QApplication app(argc, argv);
- QString defaultUrl = QString("file://%1/%2").arg(QDir::homePath()).arg(QLatin1String("index.html"));
-
- QWebSettings::setMaximumPagesInCache(4);
-
- app.setApplicationName("QtLauncher");
- app.setApplicationVersion("0.1");
-
- QWebSettings::setObjectCacheCapacities((16*1024*1024) / 8, (16*1024*1024) / 8, 16*1024*1024);
-
- QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, true);
- QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
- QWebSettings::enablePersistentStorage();
-
- // To allow QWebInspector's configuration persistence
- QCoreApplication::setOrganizationName("Nokia");
- QCoreApplication::setApplicationName("QtLauncher");
-
- const QStringList args = app.arguments();
-
- if (args.contains(QLatin1String("-r"))) {
- // robotized
- QString listFile = args.at(2);
- if (!(args.count() == 3) && QFile::exists(listFile)) {
- qDebug() << "Usage: QtLauncher -r listfile";
- exit(0);
- }
- MainWindow* window = new MainWindow;
- QWebView* view = window->webView();
- URLLoader loader(view, listFile);
- QObject::connect(view, SIGNAL(loadFinished(bool)), &loader, SLOT(loadNext()));
- loader.loadNext();
- window->show();
- launcherMain(app);
- } else {
- MainWindow* window = 0;
-
- // Look though the args for something we can open
- for (int i = 1; i < args.count(); i++) {
- if (!args.at(i).startsWith("-")) {
- if (!window)
- window = new MainWindow(args.at(i));
- else
- window->newWindow(args.at(i));
- }
- }
-
- // If not, just open the default URL
- if (!window)
- window = new MainWindow(defaultUrl);
-
- window->show();
- launcherMain(app);
- }
-}
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index eb7ac9a..f1e6a86 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -25,6 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
#include "config.h"
#include "ChromeClientQt.h"
@@ -38,8 +39,13 @@
#include "NotImplemented.h"
#include "WindowFeatures.h"
#include "DatabaseTracker.h"
-#include "SecurityOrigin.h"
+#include "QtFallbackWebPopup.h"
#include "QWebPageClient.h"
+#include "SecurityOrigin.h"
+
+#include <qdebug.h>
+#include <qtextdocument.h>
+#include <qtooltip.h>
#include "qwebpage.h"
#include "qwebpage_p.h"
@@ -48,12 +54,11 @@
#include "qwebsecurityorigin_p.h"
#include "qwebview.h"
-#include <qtooltip.h>
-#include <qtextdocument.h>
-
-namespace WebCore
-{
+#if USE(ACCELERATED_COMPOSITING)
+#include "GraphicsLayerQt.h"
+#endif
+namespace WebCore {
ChromeClientQt::ChromeClientQt(QWebPage* webPage)
: m_webPage(webPage)
@@ -283,7 +288,14 @@ bool ChromeClientQt::runJavaScriptPrompt(Frame* f, const String& message, const
QString x = result;
FrameLoaderClientQt *fl = static_cast<FrameLoaderClientQt*>(f->loader()->client());
bool rc = m_webPage->javaScriptPrompt(fl->webFrame(), (QString)message, (QString)defaultValue, &x);
- result = x;
+
+ // Fix up a quirk in the QInputDialog class. If no input happened the string should be empty
+ // but it is null. See https://bugs.webkit.org/show_bug.cgi?id=30914.
+ if (rc && x.isNull())
+ result = String("");
+ else
+ result = x;
+
return rc;
}
@@ -458,4 +470,31 @@ void ChromeClientQt::requestGeolocationPermissionForFrame(Frame*, Geolocation*)
notImplemented();
}
+#if USE(ACCELERATED_COMPOSITING)
+void ChromeClientQt::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer)
+{
+ if (platformPageClient())
+ platformPageClient()->setRootGraphicsLayer(graphicsLayer ? graphicsLayer->nativeLayer() : 0);
+}
+
+void ChromeClientQt::setNeedsOneShotDrawingSynchronization()
+{
+ // we want the layers to synchronize next time we update the screen anyway
+ if (platformPageClient())
+ platformPageClient()->markForSync(false);
+}
+
+void ChromeClientQt::scheduleCompositingLayerSync()
+{
+ // we want the layers to synchronize ASAP
+ if (platformPageClient())
+ platformPageClient()->markForSync(true);
+}
+#endif
+
+QtAbstractWebPopup* ChromeClientQt::createSelectPopup()
+{
+ return new QtFallbackWebPopup;
+}
+
}
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
index 939fe04..7699349 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.h
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -42,6 +42,7 @@ namespace WebCore {
class FloatRect;
class Page;
struct FrameLoadRequest;
+ class QtAbstractWebPopup;
class ChromeClientQt : public ChromeClient
{
@@ -122,6 +123,19 @@ namespace WebCore {
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
#endif
+
+#if USE(ACCELERATED_COMPOSITING)
+ // see ChromeClient.h
+ // this is a hook for WebCore to tell us what we need to do with the GraphicsLayers
+ virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*);
+ virtual void setNeedsOneShotDrawingSynchronization();
+ virtual void scheduleCompositingLayerSync();
+#endif
+
+#if ENABLE(TOUCH_EVENTS)
+ virtual void needTouchEvents(bool) { }
+#endif
+
virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
virtual void formStateDidChange(const Node*) { }
@@ -134,6 +148,8 @@ namespace WebCore {
virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
+ QtAbstractWebPopup* createSelectPopup();
+
QWebPage* m_webPage;
WebCore::KURL lastHoverURL;
WebCore::String lastHoverTitle;
diff --git a/WebKit/qt/WebCoreSupport/DragClientQt.cpp b/WebKit/qt/WebCoreSupport/DragClientQt.cpp
index 99e438d..e48c3e3 100644
--- a/WebKit/qt/WebCoreSupport/DragClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DragClientQt.cpp
@@ -27,6 +27,8 @@
#include "DragClientQt.h"
#include "ClipboardQt.h"
+#include "Frame.h"
+#include "PlatformMouseEvent.h"
#include "qwebpage.h"
#include <QDrag>
@@ -35,6 +37,32 @@
namespace WebCore {
+static inline Qt::DropActions dragOperationsToDropActions(unsigned op)
+{
+ Qt::DropActions result = Qt::IgnoreAction;
+ if (op & DragOperationCopy)
+ result = Qt::CopyAction;
+ if (op & DragOperationMove)
+ result |= Qt::MoveAction;
+ if (op & DragOperationGeneric)
+ result |= Qt::MoveAction;
+ if (op & DragOperationLink)
+ result |= Qt::LinkAction;
+ return result;
+}
+
+static inline DragOperation dropActionToDragOperation(Qt::DropActions action)
+{
+ DragOperation result = DragOperationNone;
+ if (action & Qt::CopyAction)
+ result = DragOperationCopy;
+ if (action & Qt::LinkAction)
+ result = DragOperationLink;
+ if (action & Qt::MoveAction)
+ result = DragOperationMove;
+ return result;
+}
+
DragDestinationAction DragClientQt::actionMaskForDrag(DragData*)
{
return DragDestinationActionAny;
@@ -58,7 +86,7 @@ void DragClientQt::willPerformDragSourceAction(DragSourceAction, const IntPoint&
{
}
-void DragClientQt::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard* clipboard, Frame*, bool)
+void DragClientQt::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard* clipboard, Frame* frame, bool)
{
#ifndef QT_NO_DRAGANDDROP
QMimeData* clipboardData = static_cast<ClipboardQt*>(clipboard)->clipboardData();
@@ -66,10 +94,15 @@ void DragClientQt::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Cli
QWidget* view = m_webPage->view();
if (view) {
QDrag *drag = new QDrag(view);
- if (clipboardData->hasImage())
+ if (clipboardData && clipboardData->hasImage())
drag->setPixmap(qvariant_cast<QPixmap>(clipboardData->imageData()));
+ DragOperation dragOperationMask = clipboard->sourceOperation();
drag->setMimeData(clipboardData);
- drag->start();
+ Qt::DropAction actualDropAction = drag->exec(dragOperationsToDropActions(dragOperationMask));
+
+ // Send dragEnd event
+ PlatformMouseEvent me(m_webPage->view()->mapFromGlobal(QCursor::pos()), QCursor::pos(), LeftButton, MouseEventMoved, 0, false, false, false, false, 0);
+ frame->eventHandler()->dragSourceEndedAt(me, dropActionToDragOperation(actualDropAction));
}
#endif
}
diff --git a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index 3091a43..90ebb1d 100644
--- a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -625,7 +625,12 @@ void EditorClientQt::setInputMethodState(bool active)
}
}
webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField);
-#endif
+#ifdef Q_WS_MAEMO_5
+ // Maemo 5 MicroB Browser disables auto-uppercase and predictive text, thus, so do we.
+ webPageClient->setInputMethodHint(Qt::ImhNoAutoUppercase, true);
+ webPageClient->setInputMethodHint(Qt::ImhNoPredictiveText, true);
+#endif // Q_WS_MAEMO_5
+#endif // QT_VERSION check
webPageClient->setInputMethodEnabled(active);
}
emit m_page->microFocusChanged();
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 3c30ab5..760e37e 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -331,8 +331,6 @@ void FrameLoaderClientQt::dispatchDidPopStateWithinPage()
void FrameLoaderClientQt::dispatchWillClose()
{
- if (dumpFrameLoaderCallbacks)
- printf("%s - willCloseFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
}
@@ -599,9 +597,6 @@ String FrameLoaderClientQt::userAgent(const KURL& url)
void FrameLoaderClientQt::dispatchDidReceiveIcon()
{
- if (dumpFrameLoaderCallbacks)
- printf("%s - didReceiveIconForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
-
if (m_webFrame) {
emit m_webFrame->iconChanged();
}
@@ -626,9 +621,6 @@ void FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* w
if (world != mainThreadNormalWorld())
return;
- if (dumpFrameLoaderCallbacks)
- printf("%s - didClearWindowObjectForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
-
if (m_webFrame)
emit m_webFrame->javaScriptWindowObjectCleared();
}
@@ -1036,7 +1028,12 @@ PassRefPtr<Frame> FrameLoaderClientQt::createFrame(const KURL& url, const String
return 0;
QWebFrameData frameData(m_frame->page(), m_frame, ownerElement, name);
- frameData.url = url;
+
+ if (url.isEmpty())
+ frameData.url = blankURL();
+ else
+ frameData.url = url;
+
frameData.referrer = referrer;
frameData.allowsScrolling = allowsScrolling;
frameData.marginWidth = marginWidth;
diff --git a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
index d5683c4..1caf96d 100644
--- a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
@@ -112,12 +112,16 @@ void InspectorClientQt::showWindow()
{
updateWindowTitle();
+#if ENABLE(INSPECTOR)
m_inspectedWebPage->d->inspectorController()->setWindowVisible(true, true);
+#endif
}
void InspectorClientQt::closeWindow()
{
+#if ENABLE(INSPECTOR)
m_inspectedWebPage->d->inspectorController()->setWindowVisible(false);
+#endif
}
void InspectorClientQt::attachWindow()
diff --git a/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
new file mode 100644
index 0000000..7ee2b7c
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
@@ -0,0 +1,165 @@
+/*
+ * Copyright (C) 2010 Girish Ramakrishnan <girish@forwardbias.in>
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#include "config.h"
+#include "QtFallbackWebPopup.h"
+
+#include "HostWindow.h"
+#include "PopupMenuClient.h"
+#include "qgraphicswebview.h"
+#include "QWebPageClient.h"
+#include <QAbstractItemView>
+#include <QApplication>
+#include <QGraphicsProxyWidget>
+#include <QGraphicsScene>
+#include <QGraphicsView>
+#include <QInputContext>
+#include <QMouseEvent>
+#include <QStandardItemModel>
+
+namespace WebCore {
+
+QtFallbackWebPopupCombo::QtFallbackWebPopupCombo(QtFallbackWebPopup& ownerPopup)
+ : m_ownerPopup(ownerPopup)
+{
+}
+
+void QtFallbackWebPopupCombo::showPopup()
+{
+ QComboBox::showPopup();
+ m_ownerPopup.m_popupVisible = true;
+}
+
+void QtFallbackWebPopupCombo::hidePopup()
+{
+ QWidget* activeFocus = QApplication::focusWidget();
+ if (activeFocus && activeFocus == QComboBox::view()
+ && activeFocus->testAttribute(Qt::WA_InputMethodEnabled)) {
+ QInputContext* qic = activeFocus->inputContext();
+ if (qic) {
+ qic->reset();
+ qic->setFocusWidget(0);
+ }
+ }
+
+ QComboBox::hidePopup();
+
+ if (QGraphicsProxyWidget* proxy = graphicsProxyWidget())
+ proxy->setVisible(false);
+
+ if (!m_ownerPopup.m_popupVisible)
+ return;
+
+ m_ownerPopup.m_popupVisible = false;
+ m_ownerPopup.popupDidHide();
+}
+
+// QtFallbackWebPopup
+
+QtFallbackWebPopup::QtFallbackWebPopup()
+ : QtAbstractWebPopup()
+ , m_popupVisible(false)
+ , m_combo(new QtFallbackWebPopupCombo(*this))
+ , m_proxy(0)
+{
+ connect(m_combo, SIGNAL(activated(int)),
+ SLOT(activeChanged(int)), Qt::QueuedConnection);
+}
+
+QtFallbackWebPopup::~QtFallbackWebPopup()
+{
+ // If we create a proxy, then the deletion of the proxy and the
+ // combo will be done by the proxy's parent (QGraphicsWebView)
+ if (!m_proxy)
+ delete m_combo;
+}
+
+void QtFallbackWebPopup::show()
+{
+ populate();
+ m_combo->setCurrentIndex(currentIndex());
+ QRect rect = geometry();
+ if (QGraphicsWebView *webView = qobject_cast<QGraphicsWebView*>(pageClient()->pluginParent())) {
+ if (!m_proxy) {
+ m_proxy = new QGraphicsProxyWidget(webView);
+ m_proxy->setWidget(m_combo);
+ } else
+ m_proxy->setVisible(true);
+ m_proxy->setGeometry(rect);
+ } else {
+ m_combo->setParent(pageClient()->ownerWidget());
+ m_combo->setGeometry(QRect(rect.left(), rect.top(),
+ rect.width(), m_combo->sizeHint().height()));
+
+ }
+
+ // QCursor::pos() is not a great idea for a touch screen, but we don't need the coordinates
+ // as comboboxes with Qt on Maemo 5 come up in their full width on the screen.
+ // On the other platforms it's okay to use QCursor::pos().
+#if defined(Q_WS_MAEMO_5)
+ m_combo->showPopup();
+#else
+ QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton,
+ Qt::LeftButton, Qt::NoModifier);
+ QCoreApplication::sendEvent(m_combo, &event);
+#endif
+}
+
+void QtFallbackWebPopup::hide()
+{
+ m_combo->hidePopup();
+}
+
+void QtFallbackWebPopup::populate()
+{
+ m_combo->clear();
+
+ QStandardItemModel* model = qobject_cast<QStandardItemModel*>(m_combo->model());
+ Q_ASSERT(model);
+
+#if !defined(Q_WS_S60) && !defined(Q_WS_MAEMO_5)
+ m_combo->setFont(font());
+#endif
+ for (int i = 0; i < itemCount(); ++i) {
+ switch (itemType(i)) {
+ case Separator:
+ m_combo->insertSeparator(i);
+ break;
+ case Group:
+ m_combo->insertItem(i, itemText(i));
+ model->item(i)->setEnabled(false);
+ break;
+ case Option:
+ m_combo->insertItem(i, itemText(i));
+ model->item(i)->setEnabled(itemIsEnabled(i));
+ break;
+ }
+ }
+}
+
+void QtFallbackWebPopup::activeChanged(int index)
+{
+ if (index < 0)
+ return;
+
+ valueChanged(index);
+}
+
+}
diff --git a/WebCore/platform/qt/QWebPopup.h b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
index 36d6781..3924bf6 100644
--- a/WebCore/platform/qt/QWebPopup.h
+++ b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
@@ -1,6 +1,5 @@
/*
- *
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -18,32 +17,49 @@
* Boston, MA 02110-1301, USA.
*
*/
-#ifndef QWebPopup_h
-#define QWebPopup_h
+#ifndef QtFallbackWebPopup_h
+#define QtFallbackWebPopup_h
+#include "QtAbstractWebPopup.h"
#include <QComboBox>
-#include "PopupMenuClient.h"
+class QGraphicsProxyWidget;
namespace WebCore {
-class QWebPopup : public QComboBox {
+class QtFallbackWebPopupCombo;
+
+class QtFallbackWebPopup : public QObject, public QtAbstractWebPopup {
Q_OBJECT
public:
- QWebPopup(PopupMenuClient* client);
+ QtFallbackWebPopup();
+ ~QtFallbackWebPopup();
- void exec();
-
- virtual void showPopup();
- virtual void hidePopup();
+ virtual void show();
+ virtual void hide();
private slots:
void activeChanged(int);
+
private:
- PopupMenuClient* m_client;
+ friend class QtFallbackWebPopupCombo;
bool m_popupVisible;
+ QtFallbackWebPopupCombo* m_combo;
+ QGraphicsProxyWidget* m_proxy;
+
+ void populate();
+};
+
+class QtFallbackWebPopupCombo : public QComboBox {
+public:
+ QtFallbackWebPopupCombo(QtFallbackWebPopup& ownerPopup);
+ virtual void showPopup();
+ virtual void hidePopup();
+
+private:
+ QtFallbackWebPopup& m_ownerPopup;
};
}
-#endif
+#endif // QtFallbackWebPopup_h
diff --git a/WebKit/qt/docs/qtwebkit.qdocconf b/WebKit/qt/docs/qtwebkit.qdocconf
index 8ee8f69..292c124 100644
--- a/WebKit/qt/docs/qtwebkit.qdocconf
+++ b/WebKit/qt/docs/qtwebkit.qdocconf
@@ -4,7 +4,7 @@ project = qtwebkit
description = "Qt WebKit API Documentation"
headerdirs = $SRCDIR/WebKit/qt/Api
-sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs
+sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs $SRCDIR/JavaScriptCore/qt/api
outputdir = $OUTPUT_DIR/doc/html
outputformats = HTML
sources.fileextensions = "*.cpp *.doc *.qdoc *.h"
diff --git a/WebKit/qt/docs/webkitsnippets/webelement/main.cpp b/WebKit/qt/docs/webkitsnippets/webelement/main.cpp
index 2707ffb..822b61c 100644
--- a/WebKit/qt/docs/webkitsnippets/webelement/main.cpp
+++ b/WebKit/qt/docs/webkitsnippets/webelement/main.cpp
@@ -53,8 +53,8 @@ static void findAll()
*/
//! [FindAll intro]
- QList<QWebElement> allSpans = document.findAll("span");
- QList<QWebElement> introSpans = document.findAll("p.intro span");
+ QWebElementCollection allSpans = document.findAll("span");
+ QWebElementCollection introSpans = document.findAll("p.intro span");
//! [FindAll intro] //! [FindAll]
}
diff --git a/WebKit/qt/symbian/backup_registration.xml b/WebKit/qt/symbian/backup_registration.xml
new file mode 100644
index 0000000..e026140
--- /dev/null
+++ b/WebKit/qt/symbian/backup_registration.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+ <system_backup/>
+ <restore requires_reboot = "no"/>
+</backup_registration>
diff --git a/WebKit/qt/symbian/bwins/QtWebKitu.def b/WebKit/qt/symbian/bwins/QtWebKitu.def
new file mode 100644
index 0000000..086e986
--- /dev/null
+++ b/WebKit/qt/symbian/bwins/QtWebKitu.def
@@ -0,0 +1,627 @@
+EXPORTS
+ ??0MimeType@QWebPluginFactory@@QAE@ABU01@@Z @ 1 NONAME ; QWebPluginFactory::MimeType::MimeType(struct QWebPluginFactory::MimeType const &)
+ ??0QGraphicsWebView@@QAE@PAVQGraphicsItem@@@Z @ 2 NONAME ; QGraphicsWebView::QGraphicsWebView(class QGraphicsItem *)
+ ??0QWebDatabase@@AAE@PAVQWebDatabasePrivate@@@Z @ 3 NONAME ; QWebDatabase::QWebDatabase(class QWebDatabasePrivate *)
+ ??0QWebDatabase@@QAE@ABV0@@Z @ 4 NONAME ; QWebDatabase::QWebDatabase(class QWebDatabase const &)
+ ??0QWebElement@@AAE@PAVElement@WebCore@@@Z @ 5 NONAME ; QWebElement::QWebElement(class WebCore::Element *)
+ ??0QWebElement@@AAE@PAVNode@WebCore@@@Z @ 6 NONAME ; QWebElement::QWebElement(class WebCore::Node *)
+ ??0QWebElement@@QAE@ABV0@@Z @ 7 NONAME ; QWebElement::QWebElement(class QWebElement const &)
+ ??0QWebElement@@QAE@XZ @ 8 NONAME ; QWebElement::QWebElement(void)
+ ??0QWebElementCollection@@QAE@ABV0@@Z @ 9 NONAME ; QWebElementCollection::QWebElementCollection(class QWebElementCollection const &)
+ ??0QWebElementCollection@@QAE@ABVQWebElement@@ABVQString@@@Z @ 10 NONAME ; QWebElementCollection::QWebElementCollection(class QWebElement const &, class QString const &)
+ ??0QWebElementCollection@@QAE@XZ @ 11 NONAME ; QWebElementCollection::QWebElementCollection(void)
+ ??0QWebFrame@@AAE@PAV0@PAVQWebFrameData@@@Z @ 12 NONAME ; QWebFrame::QWebFrame(class QWebFrame *, class QWebFrameData *)
+ ??0QWebFrame@@AAE@PAVQWebPage@@PAVQWebFrameData@@@Z @ 13 NONAME ; QWebFrame::QWebFrame(class QWebPage *, class QWebFrameData *)
+ ??0QWebHistory@@AAE@XZ @ 14 NONAME ; QWebHistory::QWebHistory(void)
+ ??0QWebHistoryInterface@@QAE@PAVQObject@@@Z @ 15 NONAME ; QWebHistoryInterface::QWebHistoryInterface(class QObject *)
+ ??0QWebHistoryItem@@AAE@PAVQWebHistoryItemPrivate@@@Z @ 16 NONAME ; QWebHistoryItem::QWebHistoryItem(class QWebHistoryItemPrivate *)
+ ??0QWebHistoryItem@@QAE@ABV0@@Z @ 17 NONAME ; QWebHistoryItem::QWebHistoryItem(class QWebHistoryItem const &)
+ ??0QWebHitTestResult@@AAE@PAVQWebHitTestResultPrivate@@@Z @ 18 NONAME ; QWebHitTestResult::QWebHitTestResult(class QWebHitTestResultPrivate *)
+ ??0QWebHitTestResult@@QAE@ABV0@@Z @ 19 NONAME ; QWebHitTestResult::QWebHitTestResult(class QWebHitTestResult const &)
+ ??0QWebHitTestResult@@QAE@XZ @ 20 NONAME ; QWebHitTestResult::QWebHitTestResult(void)
+ ??0QWebInspector@@QAE@PAVQWidget@@@Z @ 21 NONAME ; QWebInspector::QWebInspector(class QWidget *)
+ ??0QWebPage@@QAE@PAVQObject@@@Z @ 22 NONAME ; QWebPage::QWebPage(class QObject *)
+ ??0QWebPluginDatabase@@AAE@PAVQObject@@@Z @ 23 NONAME ; QWebPluginDatabase::QWebPluginDatabase(class QObject *)
+ ??0QWebPluginFactory@@QAE@PAVQObject@@@Z @ 24 NONAME ; QWebPluginFactory::QWebPluginFactory(class QObject *)
+ ??0QWebPluginInfo@@AAE@PAVPluginPackage@WebCore@@@Z @ 25 NONAME ; QWebPluginInfo::QWebPluginInfo(class WebCore::PluginPackage *)
+ ??0QWebPluginInfo@@QAE@ABV0@@Z @ 26 NONAME ; QWebPluginInfo::QWebPluginInfo(class QWebPluginInfo const &)
+ ??0QWebPluginInfo@@QAE@XZ @ 27 NONAME ; QWebPluginInfo::QWebPluginInfo(void)
+ ??0QWebSecurityOrigin@@AAE@PAVQWebSecurityOriginPrivate@@@Z @ 28 NONAME ; QWebSecurityOrigin::QWebSecurityOrigin(class QWebSecurityOriginPrivate *)
+ ??0QWebSecurityOrigin@@QAE@ABV0@@Z @ 29 NONAME ; QWebSecurityOrigin::QWebSecurityOrigin(class QWebSecurityOrigin const &)
+ ??0QWebSettings@@AAE@PAVSettings@WebCore@@@Z @ 30 NONAME ; QWebSettings::QWebSettings(class WebCore::Settings *)
+ ??0QWebSettings@@AAE@XZ @ 31 NONAME ; QWebSettings::QWebSettings(void)
+ ??0QWebView@@QAE@PAVQWidget@@@Z @ 32 NONAME ; QWebView::QWebView(class QWidget *)
+ ??1MimeType@QWebPluginFactory@@QAE@XZ @ 33 NONAME ; QWebPluginFactory::MimeType::~MimeType(void)
+ ??1QGraphicsWebView@@UAE@XZ @ 34 NONAME ; QGraphicsWebView::~QGraphicsWebView(void)
+ ??1QWebDatabase@@QAE@XZ @ 35 NONAME ; QWebDatabase::~QWebDatabase(void)
+ ??1QWebElement@@QAE@XZ @ 36 NONAME ; QWebElement::~QWebElement(void)
+ ??1QWebElementCollection@@QAE@XZ @ 37 NONAME ; QWebElementCollection::~QWebElementCollection(void)
+ ??1QWebFrame@@EAE@XZ @ 38 NONAME ; QWebFrame::~QWebFrame(void)
+ ??1QWebHistory@@AAE@XZ @ 39 NONAME ; QWebHistory::~QWebHistory(void)
+ ??1QWebHistoryInterface@@UAE@XZ @ 40 NONAME ; QWebHistoryInterface::~QWebHistoryInterface(void)
+ ??1QWebHistoryItem@@QAE@XZ @ 41 NONAME ; QWebHistoryItem::~QWebHistoryItem(void)
+ ??1QWebHitTestResult@@QAE@XZ @ 42 NONAME ; QWebHitTestResult::~QWebHitTestResult(void)
+ ??1QWebInspector@@UAE@XZ @ 43 NONAME ; QWebInspector::~QWebInspector(void)
+ ??1QWebPage@@UAE@XZ @ 44 NONAME ; QWebPage::~QWebPage(void)
+ ??1QWebPluginDatabase@@EAE@XZ @ 45 NONAME ; QWebPluginDatabase::~QWebPluginDatabase(void)
+ ??1QWebPluginFactory@@UAE@XZ @ 46 NONAME ; QWebPluginFactory::~QWebPluginFactory(void)
+ ??1QWebPluginInfo@@QAE@XZ @ 47 NONAME ; QWebPluginInfo::~QWebPluginInfo(void)
+ ??1QWebSecurityOrigin@@QAE@XZ @ 48 NONAME ; QWebSecurityOrigin::~QWebSecurityOrigin(void)
+ ??1QWebSettings@@AAE@XZ @ 49 NONAME ; QWebSettings::~QWebSettings(void)
+ ??1QWebView@@UAE@XZ @ 50 NONAME ; QWebView::~QWebView(void)
+ ??4QWebDatabase@@QAEAAV0@ABV0@@Z @ 51 NONAME ; class QWebDatabase & QWebDatabase::operator=(class QWebDatabase const &)
+ ??4QWebElement@@QAEAAV0@ABV0@@Z @ 52 NONAME ; class QWebElement & QWebElement::operator=(class QWebElement const &)
+ ??4QWebElementCollection@@QAEAAV0@ABV0@@Z @ 53 NONAME ; class QWebElementCollection & QWebElementCollection::operator=(class QWebElementCollection const &)
+ ??4QWebHistoryItem@@QAEAAV0@ABV0@@Z @ 54 NONAME ; class QWebHistoryItem & QWebHistoryItem::operator=(class QWebHistoryItem const &)
+ ??4QWebHitTestResult@@QAEAAV0@ABV0@@Z @ 55 NONAME ; class QWebHitTestResult & QWebHitTestResult::operator=(class QWebHitTestResult const &)
+ ??4QWebPluginInfo@@QAEAAV0@ABV0@@Z @ 56 NONAME ; class QWebPluginInfo & QWebPluginInfo::operator=(class QWebPluginInfo const &)
+ ??4QWebSecurityOrigin@@QAEAAV0@ABV0@@Z @ 57 NONAME ; class QWebSecurityOrigin & QWebSecurityOrigin::operator=(class QWebSecurityOrigin const &)
+ ??5@YAAAVQDataStream@@AAV0@AAVQWebHistory@@@Z @ 58 NONAME ; class QDataStream & operator>>(class QDataStream &, class QWebHistory &)
+ ??6@YAAAVQDataStream@@AAV0@ABVQWebHistory@@@Z @ 59 NONAME ; class QDataStream & operator<<(class QDataStream &, class QWebHistory const &)
+ ??8MimeType@QWebPluginFactory@@QBE_NABU01@@Z @ 60 NONAME ; bool QWebPluginFactory::MimeType::operator==(struct QWebPluginFactory::MimeType const &) const
+ ??8QWebElement@@QBE_NABV0@@Z @ 61 NONAME ; bool QWebElement::operator==(class QWebElement const &) const
+ ??8QWebPluginInfo@@QBE_NABV0@@Z @ 62 NONAME ; bool QWebPluginInfo::operator==(class QWebPluginInfo const &) const
+ ??9MimeType@QWebPluginFactory@@QBE_NABU01@@Z @ 63 NONAME ; bool QWebPluginFactory::MimeType::operator!=(struct QWebPluginFactory::MimeType const &) const
+ ??9QWebElement@@QBE_NABV0@@Z @ 64 NONAME ; bool QWebElement::operator!=(class QWebElement const &) const
+ ??9QWebPluginInfo@@QBE_NABV0@@Z @ 65 NONAME ; bool QWebPluginInfo::operator!=(class QWebPluginInfo const &) const
+ ??AQWebElementCollection@@QBE?AVQWebElement@@H@Z @ 66 NONAME ; class QWebElement QWebElementCollection::operator[](int) const
+ ??HQWebElementCollection@@QBE?AV0@ABV0@@Z @ 67 NONAME ; class QWebElementCollection QWebElementCollection::operator+(class QWebElementCollection const &) const
+ ??YQWebElementCollection@@QAEAAV0@ABV0@@Z @ 68 NONAME ; class QWebElementCollection & QWebElementCollection::operator+=(class QWebElementCollection const &)
+ ??_EMimeType@QWebPluginFactory@@QAE@I@Z @ 69 NONAME ; QWebPluginFactory::MimeType::~MimeType(unsigned int)
+ ??_EQGraphicsWebView@@UAE@I@Z @ 70 NONAME ; QGraphicsWebView::~QGraphicsWebView(unsigned int)
+ ??_EQWebFrame@@UAE@I@Z @ 71 NONAME ; QWebFrame::~QWebFrame(unsigned int)
+ ??_EQWebHistoryInterface@@UAE@I@Z @ 72 NONAME ; QWebHistoryInterface::~QWebHistoryInterface(unsigned int)
+ ??_EQWebInspector@@UAE@I@Z @ 73 NONAME ; QWebInspector::~QWebInspector(unsigned int)
+ ??_EQWebPage@@UAE@I@Z @ 74 NONAME ; QWebPage::~QWebPage(unsigned int)
+ ??_EQWebPluginDatabase@@UAE@I@Z @ 75 NONAME ; QWebPluginDatabase::~QWebPluginDatabase(unsigned int)
+ ??_EQWebPluginFactory@@UAE@I@Z @ 76 NONAME ; QWebPluginFactory::~QWebPluginFactory(unsigned int)
+ ??_EQWebView@@UAE@I@Z @ 77 NONAME ; QWebView::~QWebView(unsigned int)
+ ?acceptNavigationRequest@QWebPage@@MAE_NPAVQWebFrame@@ABVQNetworkRequest@@W4NavigationType@1@@Z @ 78 NONAME ; bool QWebPage::acceptNavigationRequest(class QWebFrame *, class QNetworkRequest const &, enum QWebPage::NavigationType)
+ ?action@QWebPage@@QBEPAVQAction@@W4WebAction@1@@Z @ 79 NONAME ; class QAction * QWebPage::action(enum QWebPage::WebAction) const
+ ?addClass@QWebElement@@QAEXABVQString@@@Z @ 80 NONAME ; void QWebElement::addClass(class QString const &)
+ ?addLocalScheme@QWebSecurityOrigin@@SAXABVQString@@@Z @ 81 NONAME ; void QWebSecurityOrigin::addLocalScheme(class QString const &)
+ ?addSearchPath@QWebPluginDatabase@@QAEXABVQString@@@Z @ 82 NONAME ; void QWebPluginDatabase::addSearchPath(class QString const &)
+ ?addToJavaScriptWindowObject@QWebFrame@@QAEXABVQString@@PAVQObject@@@Z @ 83 NONAME ; void QWebFrame::addToJavaScriptWindowObject(class QString const &, class QObject *)
+ ?addToJavaScriptWindowObject@QWebFrame@@QAEXABVQString@@PAVQObject@@W4ValueOwnership@QScriptEngine@@@Z @ 84 NONAME ; void QWebFrame::addToJavaScriptWindowObject(class QString const &, class QObject *, enum QScriptEngine::ValueOwnership)
+ ?allOrigins@QWebSecurityOrigin@@SA?AV?$QList@VQWebSecurityOrigin@@@@XZ @ 85 NONAME ; class QList<class QWebSecurityOrigin> QWebSecurityOrigin::allOrigins(void)
+ ?alternateText@QWebHitTestResult@@QBE?AVQString@@XZ @ 86 NONAME ; class QString QWebHitTestResult::alternateText(void) const
+ ?append@QWebElementCollection@@QAEXABV1@@Z @ 87 NONAME ; void QWebElementCollection::append(class QWebElementCollection const &)
+ ?appendInside@QWebElement@@QAEXABV1@@Z @ 88 NONAME ; void QWebElement::appendInside(class QWebElement const &)
+ ?appendInside@QWebElement@@QAEXABVQString@@@Z @ 89 NONAME ; void QWebElement::appendInside(class QString const &)
+ ?appendOutside@QWebElement@@QAEXABV1@@Z @ 90 NONAME ; void QWebElement::appendOutside(class QWebElement const &)
+ ?appendOutside@QWebElement@@QAEXABVQString@@@Z @ 91 NONAME ; void QWebElement::appendOutside(class QString const &)
+ ?at@QWebElementCollection@@QBE?AVQWebElement@@H@Z @ 92 NONAME ; class QWebElement QWebElementCollection::at(int) const
+ ?attribute@QWebElement@@QBE?AVQString@@ABV2@0@Z @ 93 NONAME ; class QString QWebElement::attribute(class QString const &, class QString const &) const
+ ?attributeNS@QWebElement@@QBE?AVQString@@ABV2@00@Z @ 94 NONAME ; class QString QWebElement::attributeNS(class QString const &, class QString const &, class QString const &) const
+ ?back@QGraphicsWebView@@QAEXXZ @ 95 NONAME ; void QGraphicsWebView::back(void)
+ ?back@QWebHistory@@QAEXXZ @ 96 NONAME ; void QWebHistory::back(void)
+ ?back@QWebView@@QAEXXZ @ 97 NONAME ; void QWebView::back(void)
+ ?backItem@QWebHistory@@QBE?AVQWebHistoryItem@@XZ @ 98 NONAME ; class QWebHistoryItem QWebHistory::backItem(void) const
+ ?backItems@QWebHistory@@QBE?AV?$QList@VQWebHistoryItem@@@@H@Z @ 99 NONAME ; class QList<class QWebHistoryItem> QWebHistory::backItems(int) const
+ ?baseUrl@QWebFrame@@QBE?AVQUrl@@XZ @ 100 NONAME ; class QUrl QWebFrame::baseUrl(void) const
+ ?begin@QWebElementCollection@@QAE?AViterator@1@XZ @ 101 NONAME ; class QWebElementCollection::iterator QWebElementCollection::begin(void)
+ ?begin@QWebElementCollection@@QBE?AVconst_iterator@1@XZ @ 102 NONAME ; class QWebElementCollection::const_iterator QWebElementCollection::begin(void) const
+ ?boundingRect@QWebHitTestResult@@QBE?AVQRect@@XZ @ 103 NONAME ; class QRect QWebHitTestResult::boundingRect(void) const
+ ?bytesReceived@QWebPage@@QBE_KXZ @ 104 NONAME ; unsigned long long QWebPage::bytesReceived(void) const
+ ?canGoBack@QWebHistory@@QBE_NXZ @ 105 NONAME ; bool QWebHistory::canGoBack(void) const
+ ?canGoForward@QWebHistory@@QBE_NXZ @ 106 NONAME ; bool QWebHistory::canGoForward(void) const
+ ?changeEvent@QWebView@@MAEXPAVQEvent@@@Z @ 107 NONAME ; void QWebView::changeEvent(class QEvent *)
+ ?childFrames@QWebFrame@@QBE?AV?$QList@PAVQWebFrame@@@@XZ @ 108 NONAME ; class QList<class QWebFrame *> QWebFrame::childFrames(void) const
+ ?chooseFile@QWebPage@@MAE?AVQString@@PAVQWebFrame@@ABV2@@Z @ 109 NONAME ; class QString QWebPage::chooseFile(class QWebFrame *, class QString const &)
+ ?classes@QWebElement@@QBE?AVQStringList@@XZ @ 110 NONAME ; class QStringList QWebElement::classes(void) const
+ ?clear@QWebHistory@@QAEXXZ @ 111 NONAME ; void QWebHistory::clear(void)
+ ?clearIconDatabase@QWebSettings@@SAXXZ @ 112 NONAME ; void QWebSettings::clearIconDatabase(void)
+ ?clearMemoryCaches@QWebSettings@@SAXXZ @ 113 NONAME ; void QWebSettings::clearMemoryCaches(void)
+ ?clone@QWebElement@@QBE?AV1@XZ @ 114 NONAME ; class QWebElement QWebElement::clone(void) const
+ ?constBegin@QWebElementCollection@@QBE?AVconst_iterator@1@XZ @ 115 NONAME ; class QWebElementCollection::const_iterator QWebElementCollection::constBegin(void) const
+ ?constEnd@QWebElementCollection@@QBE?AVconst_iterator@1@XZ @ 116 NONAME ; class QWebElementCollection::const_iterator QWebElementCollection::constEnd(void) const
+ ?contentsChanged@QWebPage@@IAEXXZ @ 117 NONAME ; void QWebPage::contentsChanged(void)
+ ?contentsSize@QWebFrame@@QBE?AVQSize@@XZ @ 118 NONAME ; class QSize QWebFrame::contentsSize(void) const
+ ?contentsSizeChanged@QWebFrame@@IAEXABVQSize@@@Z @ 119 NONAME ; void QWebFrame::contentsSizeChanged(class QSize const &)
+ ?contextMenuEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneContextMenuEvent@@@Z @ 120 NONAME ; void QGraphicsWebView::contextMenuEvent(class QGraphicsSceneContextMenuEvent *)
+ ?contextMenuEvent@QWebView@@MAEXPAVQContextMenuEvent@@@Z @ 121 NONAME ; void QWebView::contextMenuEvent(class QContextMenuEvent *)
+ ?count@QWebElementCollection@@QBEHXZ @ 122 NONAME ; int QWebElementCollection::count(void) const
+ ?count@QWebHistory@@QBEHXZ @ 123 NONAME ; int QWebHistory::count(void) const
+ ?createPlugin@QWebPage@@MAEPAVQObject@@ABVQString@@ABVQUrl@@ABVQStringList@@2@Z @ 124 NONAME ; class QObject * QWebPage::createPlugin(class QString const &, class QUrl const &, class QStringList const &, class QStringList const &)
+ ?createStandardContextMenu@QWebPage@@QAEPAVQMenu@@XZ @ 125 NONAME ; class QMenu * QWebPage::createStandardContextMenu(void)
+ ?createWindow@QWebPage@@MAEPAV1@W4WebWindowType@1@@Z @ 126 NONAME ; class QWebPage * QWebPage::createWindow(enum QWebPage::WebWindowType)
+ ?createWindow@QWebView@@MAEPAV1@W4WebWindowType@QWebPage@@@Z @ 127 NONAME ; class QWebView * QWebView::createWindow(enum QWebPage::WebWindowType)
+ ?currentFrame@QWebPage@@QBEPAVQWebFrame@@XZ @ 128 NONAME ; class QWebFrame * QWebPage::currentFrame(void) const
+ ?currentItem@QWebHistory@@QBE?AVQWebHistoryItem@@XZ @ 129 NONAME ; class QWebHistoryItem QWebHistory::currentItem(void) const
+ ?currentItemIndex@QWebHistory@@QBEHXZ @ 130 NONAME ; int QWebHistory::currentItemIndex(void) const
+ ?databaseQuota@QWebSecurityOrigin@@QBE_JXZ @ 131 NONAME ; long long QWebSecurityOrigin::databaseQuota(void) const
+ ?databaseQuotaExceeded@QWebPage@@IAEXPAVQWebFrame@@VQString@@@Z @ 132 NONAME ; void QWebPage::databaseQuotaExceeded(class QWebFrame *, class QString)
+ ?databaseUsage@QWebSecurityOrigin@@QBE_JXZ @ 133 NONAME ; long long QWebSecurityOrigin::databaseUsage(void) const
+ ?databases@QWebSecurityOrigin@@QBE?AV?$QList@VQWebDatabase@@@@XZ @ 134 NONAME ; class QList<class QWebDatabase> QWebSecurityOrigin::databases(void) const
+ ?defaultInterface@QWebHistoryInterface@@SAPAV1@XZ @ 135 NONAME ; class QWebHistoryInterface * QWebHistoryInterface::defaultInterface(void)
+ ?defaultSearchPaths@QWebPluginDatabase@@SA?AVQStringList@@XZ @ 136 NONAME ; class QStringList QWebPluginDatabase::defaultSearchPaths(void)
+ ?defaultTextEncoding@QWebSettings@@QBE?AVQString@@XZ @ 137 NONAME ; class QString QWebSettings::defaultTextEncoding(void) const
+ ?description@QWebPluginInfo@@QBE?AVQString@@XZ @ 138 NONAME ; class QString QWebPluginInfo::description(void) const
+ ?displayName@QWebDatabase@@QBE?AVQString@@XZ @ 139 NONAME ; class QString QWebDatabase::displayName(void) const
+ ?document@QWebElement@@QBE?AV1@XZ @ 140 NONAME ; class QWebElement QWebElement::document(void) const
+ ?documentElement@QWebFrame@@QBE?AVQWebElement@@XZ @ 141 NONAME ; class QWebElement QWebFrame::documentElement(void) const
+ ?downloadRequested@QWebPage@@IAEXABVQNetworkRequest@@@Z @ 142 NONAME ; void QWebPage::downloadRequested(class QNetworkRequest const &)
+ ?dragEnterEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneDragDropEvent@@@Z @ 143 NONAME ; void QGraphicsWebView::dragEnterEvent(class QGraphicsSceneDragDropEvent *)
+ ?dragEnterEvent@QWebView@@MAEXPAVQDragEnterEvent@@@Z @ 144 NONAME ; void QWebView::dragEnterEvent(class QDragEnterEvent *)
+ ?dragLeaveEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneDragDropEvent@@@Z @ 145 NONAME ; void QGraphicsWebView::dragLeaveEvent(class QGraphicsSceneDragDropEvent *)
+ ?dragLeaveEvent@QWebView@@MAEXPAVQDragLeaveEvent@@@Z @ 146 NONAME ; void QWebView::dragLeaveEvent(class QDragLeaveEvent *)
+ ?dragMoveEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneDragDropEvent@@@Z @ 147 NONAME ; void QGraphicsWebView::dragMoveEvent(class QGraphicsSceneDragDropEvent *)
+ ?dragMoveEvent@QWebView@@MAEXPAVQDragMoveEvent@@@Z @ 148 NONAME ; void QWebView::dragMoveEvent(class QDragMoveEvent *)
+ ?dropEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneDragDropEvent@@@Z @ 149 NONAME ; void QGraphicsWebView::dropEvent(class QGraphicsSceneDragDropEvent *)
+ ?dropEvent@QWebView@@MAEXPAVQDropEvent@@@Z @ 150 NONAME ; void QWebView::dropEvent(class QDropEvent *)
+ ?element@QWebHitTestResult@@QBE?AVQWebElement@@XZ @ 151 NONAME ; class QWebElement QWebHitTestResult::element(void) const
+ ?enablePersistentStorage@QWebSettings@@SAXABVQString@@@Z @ 152 NONAME ; void QWebSettings::enablePersistentStorage(class QString const &)
+ ?encloseContentsWith@QWebElement@@QAEXABV1@@Z @ 153 NONAME ; void QWebElement::encloseContentsWith(class QWebElement const &)
+ ?encloseContentsWith@QWebElement@@QAEXABVQString@@@Z @ 154 NONAME ; void QWebElement::encloseContentsWith(class QString const &)
+ ?encloseWith@QWebElement@@QAEXABV1@@Z @ 155 NONAME ; void QWebElement::encloseWith(class QWebElement const &)
+ ?encloseWith@QWebElement@@QAEXABVQString@@@Z @ 156 NONAME ; void QWebElement::encloseWith(class QString const &)
+ ?enclosingBlockElement@QWebHitTestResult@@QBE?AVQWebElement@@XZ @ 157 NONAME ; class QWebElement QWebHitTestResult::enclosingBlockElement(void) const
+ ?enclosingElement@QWebElement@@CA?AV1@PAVNode@WebCore@@@Z @ 158 NONAME ; class QWebElement QWebElement::enclosingElement(class WebCore::Node *)
+ ?end@QWebElementCollection@@QAE?AViterator@1@XZ @ 159 NONAME ; class QWebElementCollection::iterator QWebElementCollection::end(void)
+ ?end@QWebElementCollection@@QBE?AVconst_iterator@1@XZ @ 160 NONAME ; class QWebElementCollection::const_iterator QWebElementCollection::end(void) const
+ ?evaluateJavaScript@QWebElement@@QAE?AVQVariant@@ABVQString@@@Z @ 161 NONAME ; class QVariant QWebElement::evaluateJavaScript(class QString const &)
+ ?evaluateJavaScript@QWebFrame@@QAE?AVQVariant@@ABVQString@@@Z @ 162 NONAME ; class QVariant QWebFrame::evaluateJavaScript(class QString const &)
+ ?event@QGraphicsWebView@@UAE_NPAVQEvent@@@Z @ 163 NONAME ; bool QGraphicsWebView::event(class QEvent *)
+ ?event@QWebFrame@@UAE_NPAVQEvent@@@Z @ 164 NONAME ; bool QWebFrame::event(class QEvent *)
+ ?event@QWebInspector@@UAE_NPAVQEvent@@@Z @ 165 NONAME ; bool QWebInspector::event(class QEvent *)
+ ?event@QWebPage@@UAE_NPAVQEvent@@@Z @ 166 NONAME ; bool QWebPage::event(class QEvent *)
+ ?event@QWebView@@UAE_NPAVQEvent@@@Z @ 167 NONAME ; bool QWebView::event(class QEvent *)
+ ?expectedSize@QWebDatabase@@QBE_JXZ @ 168 NONAME ; long long QWebDatabase::expectedSize(void) const
+ ?extension@QWebPage@@UAE_NW4Extension@1@PBVExtensionOption@1@PAVExtensionReturn@1@@Z @ 169 NONAME ; bool QWebPage::extension(enum QWebPage::Extension, class QWebPage::ExtensionOption const *, class QWebPage::ExtensionReturn *)
+ ?extension@QWebPluginFactory@@UAE_NW4Extension@1@PBVExtensionOption@1@PAVExtensionReturn@1@@Z @ 170 NONAME ; bool QWebPluginFactory::extension(enum QWebPluginFactory::Extension, class QWebPluginFactory::ExtensionOption const *, class QWebPluginFactory::ExtensionReturn *)
+ ?fileName@QWebDatabase@@QBE?AVQString@@XZ @ 171 NONAME ; class QString QWebDatabase::fileName(void) const
+ ?findAll@QWebElement@@QBE?AVQWebElementCollection@@ABVQString@@@Z @ 172 NONAME ; class QWebElementCollection QWebElement::findAll(class QString const &) const
+ ?findAllElements@QWebFrame@@QBE?AVQWebElementCollection@@ABVQString@@@Z @ 173 NONAME ; class QWebElementCollection QWebFrame::findAllElements(class QString const &) const
+ ?findFirst@QWebElement@@QBE?AV1@ABVQString@@@Z @ 174 NONAME ; class QWebElement QWebElement::findFirst(class QString const &) const
+ ?findFirstElement@QWebFrame@@QBE?AVQWebElement@@ABVQString@@@Z @ 175 NONAME ; class QWebElement QWebFrame::findFirstElement(class QString const &) const
+ ?findText@QGraphicsWebView@@QAE_NABVQString@@V?$QFlags@W4FindFlag@QWebPage@@@@@Z @ 176 NONAME ; bool QGraphicsWebView::findText(class QString const &, class QFlags<enum QWebPage::FindFlag>)
+ ?findText@QWebPage@@QAE_NABVQString@@V?$QFlags@W4FindFlag@QWebPage@@@@@Z @ 177 NONAME ; bool QWebPage::findText(class QString const &, class QFlags<enum QWebPage::FindFlag>)
+ ?findText@QWebView@@QAE_NABVQString@@V?$QFlags@W4FindFlag@QWebPage@@@@@Z @ 178 NONAME ; bool QWebView::findText(class QString const &, class QFlags<enum QWebPage::FindFlag>)
+ ?first@QWebElementCollection@@QBE?AVQWebElement@@XZ @ 179 NONAME ; class QWebElement QWebElementCollection::first(void) const
+ ?firstChild@QWebElement@@QBE?AV1@XZ @ 180 NONAME ; class QWebElement QWebElement::firstChild(void) const
+ ?focusInEvent@QGraphicsWebView@@MAEXPAVQFocusEvent@@@Z @ 181 NONAME ; void QGraphicsWebView::focusInEvent(class QFocusEvent *)
+ ?focusInEvent@QWebView@@MAEXPAVQFocusEvent@@@Z @ 182 NONAME ; void QWebView::focusInEvent(class QFocusEvent *)
+ ?focusNextPrevChild@QGraphicsWebView@@MAE_N_N@Z @ 183 NONAME ; bool QGraphicsWebView::focusNextPrevChild(bool)
+ ?focusNextPrevChild@QWebPage@@QAE_N_N@Z @ 184 NONAME ; bool QWebPage::focusNextPrevChild(bool)
+ ?focusNextPrevChild@QWebView@@MAE_N_N@Z @ 185 NONAME ; bool QWebView::focusNextPrevChild(bool)
+ ?focusOutEvent@QGraphicsWebView@@MAEXPAVQFocusEvent@@@Z @ 186 NONAME ; void QGraphicsWebView::focusOutEvent(class QFocusEvent *)
+ ?focusOutEvent@QWebView@@MAEXPAVQFocusEvent@@@Z @ 187 NONAME ; void QWebView::focusOutEvent(class QFocusEvent *)
+ ?fontFamily@QWebSettings@@QBE?AVQString@@W4FontFamily@1@@Z @ 188 NONAME ; class QString QWebSettings::fontFamily(enum QWebSettings::FontFamily) const
+ ?fontSize@QWebSettings@@QBEHW4FontSize@1@@Z @ 189 NONAME ; int QWebSettings::fontSize(enum QWebSettings::FontSize) const
+ ?forward@QGraphicsWebView@@QAEXXZ @ 190 NONAME ; void QGraphicsWebView::forward(void)
+ ?forward@QWebHistory@@QAEXXZ @ 191 NONAME ; void QWebHistory::forward(void)
+ ?forward@QWebView@@QAEXXZ @ 192 NONAME ; void QWebView::forward(void)
+ ?forwardItem@QWebHistory@@QBE?AVQWebHistoryItem@@XZ @ 193 NONAME ; class QWebHistoryItem QWebHistory::forwardItem(void) const
+ ?forwardItems@QWebHistory@@QBE?AV?$QList@VQWebHistoryItem@@@@H@Z @ 194 NONAME ; class QList<class QWebHistoryItem> QWebHistory::forwardItems(int) const
+ ?forwardUnsupportedContent@QWebPage@@QBE_NXZ @ 195 NONAME ; bool QWebPage::forwardUnsupportedContent(void) const
+ ?frame@QWebHitTestResult@@QBEPAVQWebFrame@@XZ @ 196 NONAME ; class QWebFrame * QWebHitTestResult::frame(void) const
+ ?frameAt@QWebPage@@QBEPAVQWebFrame@@ABVQPoint@@@Z @ 197 NONAME ; class QWebFrame * QWebPage::frameAt(class QPoint const &) const
+ ?frameCreated@QWebPage@@IAEXPAVQWebFrame@@@Z @ 198 NONAME ; void QWebPage::frameCreated(class QWebFrame *)
+ ?frameName@QWebFrame@@QBE?AVQString@@XZ @ 199 NONAME ; class QString QWebFrame::frameName(void) const
+ ?geometry@QWebElement@@QBE?AVQRect@@XZ @ 200 NONAME ; class QRect QWebElement::geometry(void) const
+ ?geometry@QWebFrame@@QBE?AVQRect@@XZ @ 201 NONAME ; class QRect QWebFrame::geometry(void) const
+ ?geometryChangeRequested@QWebPage@@IAEXABVQRect@@@Z @ 202 NONAME ; void QWebPage::geometryChangeRequested(class QRect const &)
+ ?getStaticMetaObject@QGraphicsWebView@@SAABUQMetaObject@@XZ @ 203 NONAME ; struct QMetaObject const & QGraphicsWebView::getStaticMetaObject(void)
+ ?getStaticMetaObject@QWebFrame@@SAABUQMetaObject@@XZ @ 204 NONAME ; struct QMetaObject const & QWebFrame::getStaticMetaObject(void)
+ ?getStaticMetaObject@QWebHistoryInterface@@SAABUQMetaObject@@XZ @ 205 NONAME ; struct QMetaObject const & QWebHistoryInterface::getStaticMetaObject(void)
+ ?getStaticMetaObject@QWebInspector@@SAABUQMetaObject@@XZ @ 206 NONAME ; struct QMetaObject const & QWebInspector::getStaticMetaObject(void)
+ ?getStaticMetaObject@QWebPage@@SAABUQMetaObject@@XZ @ 207 NONAME ; struct QMetaObject const & QWebPage::getStaticMetaObject(void)
+ ?getStaticMetaObject@QWebPluginDatabase@@SAABUQMetaObject@@XZ @ 208 NONAME ; struct QMetaObject const & QWebPluginDatabase::getStaticMetaObject(void)
+ ?getStaticMetaObject@QWebPluginFactory@@SAABUQMetaObject@@XZ @ 209 NONAME ; struct QMetaObject const & QWebPluginFactory::getStaticMetaObject(void)
+ ?getStaticMetaObject@QWebView@@SAABUQMetaObject@@XZ @ 210 NONAME ; struct QMetaObject const & QWebView::getStaticMetaObject(void)
+ ?globalSettings@QWebSettings@@SAPAV1@XZ @ 211 NONAME ; class QWebSettings * QWebSettings::globalSettings(void)
+ ?goToItem@QWebHistory@@QAEXABVQWebHistoryItem@@@Z @ 212 NONAME ; void QWebHistory::goToItem(class QWebHistoryItem const &)
+ ?handle@QWebPage@@QBEPAVQWebPagePrivate@@XZ @ 213 NONAME ; class QWebPagePrivate * QWebPage::handle(void) const
+ ?handle@QWebSettings@@QBEPAVQWebSettingsPrivate@@XZ @ 214 NONAME ; class QWebSettingsPrivate * QWebSettings::handle(void) const
+ ?hasAttribute@QWebElement@@QBE_NABVQString@@@Z @ 215 NONAME ; bool QWebElement::hasAttribute(class QString const &) const
+ ?hasAttributeNS@QWebElement@@QBE_NABVQString@@0@Z @ 216 NONAME ; bool QWebElement::hasAttributeNS(class QString const &, class QString const &) const
+ ?hasAttributes@QWebElement@@QBE_NXZ @ 217 NONAME ; bool QWebElement::hasAttributes(void) const
+ ?hasClass@QWebElement@@QBE_NABVQString@@@Z @ 218 NONAME ; bool QWebElement::hasClass(class QString const &) const
+ ?hasFocus@QWebElement@@QBE_NXZ @ 219 NONAME ; bool QWebElement::hasFocus(void) const
+ ?hasFocus@QWebFrame@@QBE_NXZ @ 220 NONAME ; bool QWebFrame::hasFocus(void) const
+ ?hideEvent@QWebInspector@@MAEXPAVQHideEvent@@@Z @ 221 NONAME ; void QWebInspector::hideEvent(class QHideEvent *)
+ ?history@QGraphicsWebView@@QBEPAVQWebHistory@@XZ @ 222 NONAME ; class QWebHistory * QGraphicsWebView::history(void) const
+ ?history@QWebPage@@QBEPAVQWebHistory@@XZ @ 223 NONAME ; class QWebHistory * QWebPage::history(void) const
+ ?history@QWebView@@QBEPAVQWebHistory@@XZ @ 224 NONAME ; class QWebHistory * QWebView::history(void) const
+ ?hitTestContent@QWebFrame@@QBE?AVQWebHitTestResult@@ABVQPoint@@@Z @ 225 NONAME ; class QWebHitTestResult QWebFrame::hitTestContent(class QPoint const &) const
+ ?host@QWebSecurityOrigin@@QBE?AVQString@@XZ @ 226 NONAME ; class QString QWebSecurityOrigin::host(void) const
+ ?hoverLeaveEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneHoverEvent@@@Z @ 227 NONAME ; void QGraphicsWebView::hoverLeaveEvent(class QGraphicsSceneHoverEvent *)
+ ?hoverMoveEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneHoverEvent@@@Z @ 228 NONAME ; void QGraphicsWebView::hoverMoveEvent(class QGraphicsSceneHoverEvent *)
+ ?icon@QGraphicsWebView@@QBE?AVQIcon@@XZ @ 229 NONAME ; class QIcon QGraphicsWebView::icon(void) const
+ ?icon@QWebFrame@@QBE?AVQIcon@@XZ @ 230 NONAME ; class QIcon QWebFrame::icon(void) const
+ ?icon@QWebHistoryItem@@QBE?AVQIcon@@XZ @ 231 NONAME ; class QIcon QWebHistoryItem::icon(void) const
+ ?icon@QWebView@@QBE?AVQIcon@@XZ @ 232 NONAME ; class QIcon QWebView::icon(void) const
+ ?iconChanged@QGraphicsWebView@@IAEXXZ @ 233 NONAME ; void QGraphicsWebView::iconChanged(void)
+ ?iconChanged@QWebFrame@@IAEXXZ @ 234 NONAME ; void QWebFrame::iconChanged(void)
+ ?iconChanged@QWebView@@IAEXXZ @ 235 NONAME ; void QWebView::iconChanged(void)
+ ?iconDatabasePath@QWebSettings@@SA?AVQString@@XZ @ 236 NONAME ; class QString QWebSettings::iconDatabasePath(void)
+ ?iconForUrl@QWebSettings@@SA?AVQIcon@@ABVQUrl@@@Z @ 237 NONAME ; class QIcon QWebSettings::iconForUrl(class QUrl const &)
+ ?imageUrl@QWebHitTestResult@@QBE?AVQUrl@@XZ @ 238 NONAME ; class QUrl QWebHitTestResult::imageUrl(void) const
+ ?initialLayoutCompleted@QWebFrame@@IAEXXZ @ 239 NONAME ; void QWebFrame::initialLayoutCompleted(void)
+ ?inputMethodEvent@QGraphicsWebView@@MAEXPAVQInputMethodEvent@@@Z @ 240 NONAME ; void QGraphicsWebView::inputMethodEvent(class QInputMethodEvent *)
+ ?inputMethodEvent@QWebView@@MAEXPAVQInputMethodEvent@@@Z @ 241 NONAME ; void QWebView::inputMethodEvent(class QInputMethodEvent *)
+ ?inputMethodQuery@QGraphicsWebView@@UBE?AVQVariant@@W4InputMethodQuery@Qt@@@Z @ 242 NONAME ; class QVariant QGraphicsWebView::inputMethodQuery(enum Qt::InputMethodQuery) const
+ ?inputMethodQuery@QWebPage@@QBE?AVQVariant@@W4InputMethodQuery@Qt@@@Z @ 243 NONAME ; class QVariant QWebPage::inputMethodQuery(enum Qt::InputMethodQuery) const
+ ?inputMethodQuery@QWebView@@UBE?AVQVariant@@W4InputMethodQuery@Qt@@@Z @ 244 NONAME ; class QVariant QWebView::inputMethodQuery(enum Qt::InputMethodQuery) const
+ ?isContentEditable@QWebHitTestResult@@QBE_NXZ @ 245 NONAME ; bool QWebHitTestResult::isContentEditable(void) const
+ ?isContentEditable@QWebPage@@QBE_NXZ @ 246 NONAME ; bool QWebPage::isContentEditable(void) const
+ ?isContentSelected@QWebHitTestResult@@QBE_NXZ @ 247 NONAME ; bool QWebHitTestResult::isContentSelected(void) const
+ ?isEnabled@QWebPluginInfo@@QBE_NXZ @ 248 NONAME ; bool QWebPluginInfo::isEnabled(void) const
+ ?isModified@QGraphicsWebView@@QBE_NXZ @ 249 NONAME ; bool QGraphicsWebView::isModified(void) const
+ ?isModified@QWebPage@@QBE_NXZ @ 250 NONAME ; bool QWebPage::isModified(void) const
+ ?isModified@QWebView@@QBE_NXZ @ 251 NONAME ; bool QWebView::isModified(void) const
+ ?isNull@QWebElement@@QBE_NXZ @ 252 NONAME ; bool QWebElement::isNull(void) const
+ ?isNull@QWebHitTestResult@@QBE_NXZ @ 253 NONAME ; bool QWebHitTestResult::isNull(void) const
+ ?isNull@QWebPluginInfo@@QBE_NXZ @ 254 NONAME ; bool QWebPluginInfo::isNull(void) const
+ ?isValid@QWebHistoryItem@@QBE_NXZ @ 255 NONAME ; bool QWebHistoryItem::isValid(void) const
+ ?itemAt@QWebHistory@@QBE?AVQWebHistoryItem@@H@Z @ 256 NONAME ; class QWebHistoryItem QWebHistory::itemAt(int) const
+ ?itemChange@QGraphicsWebView@@UAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 257 NONAME ; class QVariant QGraphicsWebView::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
+ ?items@QWebHistory@@QBE?AV?$QList@VQWebHistoryItem@@@@XZ @ 258 NONAME ; class QList<class QWebHistoryItem> QWebHistory::items(void) const
+ ?javaScriptAlert@QWebPage@@MAEXPAVQWebFrame@@ABVQString@@@Z @ 259 NONAME ; void QWebPage::javaScriptAlert(class QWebFrame *, class QString const &)
+ ?javaScriptConfirm@QWebPage@@MAE_NPAVQWebFrame@@ABVQString@@@Z @ 260 NONAME ; bool QWebPage::javaScriptConfirm(class QWebFrame *, class QString const &)
+ ?javaScriptConsoleMessage@QWebPage@@MAEXABVQString@@H0@Z @ 261 NONAME ; void QWebPage::javaScriptConsoleMessage(class QString const &, int, class QString const &)
+ ?javaScriptPrompt@QWebPage@@MAE_NPAVQWebFrame@@ABVQString@@1PAV3@@Z @ 262 NONAME ; bool QWebPage::javaScriptPrompt(class QWebFrame *, class QString const &, class QString const &, class QString *)
+ ?javaScriptWindowObjectCleared@QWebFrame@@IAEXXZ @ 263 NONAME ; void QWebFrame::javaScriptWindowObjectCleared(void)
+ ?keyPressEvent@QGraphicsWebView@@MAEXPAVQKeyEvent@@@Z @ 264 NONAME ; void QGraphicsWebView::keyPressEvent(class QKeyEvent *)
+ ?keyPressEvent@QWebView@@MAEXPAVQKeyEvent@@@Z @ 265 NONAME ; void QWebView::keyPressEvent(class QKeyEvent *)
+ ?keyReleaseEvent@QGraphicsWebView@@MAEXPAVQKeyEvent@@@Z @ 266 NONAME ; void QGraphicsWebView::keyReleaseEvent(class QKeyEvent *)
+ ?keyReleaseEvent@QWebView@@MAEXPAVQKeyEvent@@@Z @ 267 NONAME ; void QWebView::keyReleaseEvent(class QKeyEvent *)
+ ?last@QWebElementCollection@@QBE?AVQWebElement@@XZ @ 268 NONAME ; class QWebElement QWebElementCollection::last(void) const
+ ?lastChild@QWebElement@@QBE?AV1@XZ @ 269 NONAME ; class QWebElement QWebElement::lastChild(void) const
+ ?lastVisited@QWebHistoryItem@@QBE?AVQDateTime@@XZ @ 270 NONAME ; class QDateTime QWebHistoryItem::lastVisited(void) const
+ ?linkClicked@QGraphicsWebView@@IAEXABVQUrl@@@Z @ 271 NONAME ; void QGraphicsWebView::linkClicked(class QUrl const &)
+ ?linkClicked@QWebPage@@IAEXABVQUrl@@@Z @ 272 NONAME ; void QWebPage::linkClicked(class QUrl const &)
+ ?linkClicked@QWebView@@IAEXABVQUrl@@@Z @ 273 NONAME ; void QWebView::linkClicked(class QUrl const &)
+ ?linkDelegationPolicy@QWebPage@@QBE?AW4LinkDelegationPolicy@1@XZ @ 274 NONAME ; enum QWebPage::LinkDelegationPolicy QWebPage::linkDelegationPolicy(void) const
+ ?linkElement@QWebHitTestResult@@QBE?AVQWebElement@@XZ @ 275 NONAME ; class QWebElement QWebHitTestResult::linkElement(void) const
+ ?linkHovered@QWebPage@@IAEXABVQString@@00@Z @ 276 NONAME ; void QWebPage::linkHovered(class QString const &, class QString const &, class QString const &)
+ ?linkTargetFrame@QWebHitTestResult@@QBEPAVQWebFrame@@XZ @ 277 NONAME ; class QWebFrame * QWebHitTestResult::linkTargetFrame(void) const
+ ?linkText@QWebHitTestResult@@QBE?AVQString@@XZ @ 278 NONAME ; class QString QWebHitTestResult::linkText(void) const
+ ?linkTitle@QWebHitTestResult@@QBE?AVQUrl@@XZ @ 279 NONAME ; class QUrl QWebHitTestResult::linkTitle(void) const
+ ?linkUrl@QWebHitTestResult@@QBE?AVQUrl@@XZ @ 280 NONAME ; class QUrl QWebHitTestResult::linkUrl(void) const
+ ?load@QGraphicsWebView@@QAEXABVQNetworkRequest@@W4Operation@QNetworkAccessManager@@ABVQByteArray@@@Z @ 281 NONAME ; void QGraphicsWebView::load(class QNetworkRequest const &, enum QNetworkAccessManager::Operation, class QByteArray const &)
+ ?load@QGraphicsWebView@@QAEXABVQUrl@@@Z @ 282 NONAME ; void QGraphicsWebView::load(class QUrl const &)
+ ?load@QWebFrame@@QAEXABVQNetworkRequest@@W4Operation@QNetworkAccessManager@@ABVQByteArray@@@Z @ 283 NONAME ; void QWebFrame::load(class QNetworkRequest const &, enum QNetworkAccessManager::Operation, class QByteArray const &)
+ ?load@QWebFrame@@QAEXABVQUrl@@@Z @ 284 NONAME ; void QWebFrame::load(class QUrl const &)
+ ?load@QWebView@@QAEXABVQNetworkRequest@@W4Operation@QNetworkAccessManager@@ABVQByteArray@@@Z @ 285 NONAME ; void QWebView::load(class QNetworkRequest const &, enum QNetworkAccessManager::Operation, class QByteArray const &)
+ ?load@QWebView@@QAEXABVQUrl@@@Z @ 286 NONAME ; void QWebView::load(class QUrl const &)
+ ?loadFinished@QGraphicsWebView@@IAEX_N@Z @ 287 NONAME ; void QGraphicsWebView::loadFinished(bool)
+ ?loadFinished@QWebFrame@@IAEX_N@Z @ 288 NONAME ; void QWebFrame::loadFinished(bool)
+ ?loadFinished@QWebPage@@IAEX_N@Z @ 289 NONAME ; void QWebPage::loadFinished(bool)
+ ?loadFinished@QWebView@@IAEX_N@Z @ 290 NONAME ; void QWebView::loadFinished(bool)
+ ?loadProgress@QGraphicsWebView@@IAEXH@Z @ 291 NONAME ; void QGraphicsWebView::loadProgress(int)
+ ?loadProgress@QWebPage@@IAEXH@Z @ 292 NONAME ; void QWebPage::loadProgress(int)
+ ?loadProgress@QWebView@@IAEXH@Z @ 293 NONAME ; void QWebView::loadProgress(int)
+ ?loadStarted@QGraphicsWebView@@IAEXXZ @ 294 NONAME ; void QGraphicsWebView::loadStarted(void)
+ ?loadStarted@QWebFrame@@IAEXXZ @ 295 NONAME ; void QWebFrame::loadStarted(void)
+ ?loadStarted@QWebPage@@IAEXXZ @ 296 NONAME ; void QWebPage::loadStarted(void)
+ ?loadStarted@QWebView@@IAEXXZ @ 297 NONAME ; void QWebView::loadStarted(void)
+ ?localName@QWebElement@@QBE?AVQString@@XZ @ 298 NONAME ; class QString QWebElement::localName(void) const
+ ?localSchemes@QWebSecurityOrigin@@SA?AVQStringList@@XZ @ 299 NONAME ; class QStringList QWebSecurityOrigin::localSchemes(void)
+ ?localStoragePath@QWebSettings@@QBE?AVQString@@XZ @ 300 NONAME ; class QString QWebSettings::localStoragePath(void) const
+ ?mainFrame@QWebPage@@QBEPAVQWebFrame@@XZ @ 301 NONAME ; class QWebFrame * QWebPage::mainFrame(void) const
+ ?maximumItemCount@QWebHistory@@QBEHXZ @ 302 NONAME ; int QWebHistory::maximumItemCount(void) const
+ ?maximumPagesInCache@QWebSettings@@SAHXZ @ 303 NONAME ; int QWebSettings::maximumPagesInCache(void)
+ ?menuBarVisibilityChangeRequested@QWebPage@@IAEX_N@Z @ 304 NONAME ; void QWebPage::menuBarVisibilityChangeRequested(bool)
+ ?metaData@QWebFrame@@QBE?AV?$QMultiMap@VQString@@V1@@@XZ @ 305 NONAME ; class QMultiMap<class QString, class QString> QWebFrame::metaData(void) const
+ ?metaObject@QGraphicsWebView@@UBEPBUQMetaObject@@XZ @ 306 NONAME ; struct QMetaObject const * QGraphicsWebView::metaObject(void) const
+ ?metaObject@QWebFrame@@UBEPBUQMetaObject@@XZ @ 307 NONAME ; struct QMetaObject const * QWebFrame::metaObject(void) const
+ ?metaObject@QWebHistoryInterface@@UBEPBUQMetaObject@@XZ @ 308 NONAME ; struct QMetaObject const * QWebHistoryInterface::metaObject(void) const
+ ?metaObject@QWebInspector@@UBEPBUQMetaObject@@XZ @ 309 NONAME ; struct QMetaObject const * QWebInspector::metaObject(void) const
+ ?metaObject@QWebPage@@UBEPBUQMetaObject@@XZ @ 310 NONAME ; struct QMetaObject const * QWebPage::metaObject(void) const
+ ?metaObject@QWebPluginDatabase@@UBEPBUQMetaObject@@XZ @ 311 NONAME ; struct QMetaObject const * QWebPluginDatabase::metaObject(void) const
+ ?metaObject@QWebPluginFactory@@UBEPBUQMetaObject@@XZ @ 312 NONAME ; struct QMetaObject const * QWebPluginFactory::metaObject(void) const
+ ?metaObject@QWebView@@UBEPBUQMetaObject@@XZ @ 313 NONAME ; struct QMetaObject const * QWebView::metaObject(void) const
+ ?microFocusChanged@QWebPage@@IAEXXZ @ 314 NONAME ; void QWebPage::microFocusChanged(void)
+ ?mimeTypes@QWebPluginInfo@@QBE?AV?$QList@UMimeType@QWebPluginFactory@@@@XZ @ 315 NONAME ; class QList<struct QWebPluginFactory::MimeType> QWebPluginInfo::mimeTypes(void) const
+ ?mouseDoubleClickEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 316 NONAME ; void QGraphicsWebView::mouseDoubleClickEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseDoubleClickEvent@QWebView@@MAEXPAVQMouseEvent@@@Z @ 317 NONAME ; void QWebView::mouseDoubleClickEvent(class QMouseEvent *)
+ ?mouseMoveEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 318 NONAME ; void QGraphicsWebView::mouseMoveEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseMoveEvent@QWebView@@MAEXPAVQMouseEvent@@@Z @ 319 NONAME ; void QWebView::mouseMoveEvent(class QMouseEvent *)
+ ?mousePressEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 320 NONAME ; void QGraphicsWebView::mousePressEvent(class QGraphicsSceneMouseEvent *)
+ ?mousePressEvent@QWebView@@MAEXPAVQMouseEvent@@@Z @ 321 NONAME ; void QWebView::mousePressEvent(class QMouseEvent *)
+ ?mouseReleaseEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 322 NONAME ; void QGraphicsWebView::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseReleaseEvent@QWebView@@MAEXPAVQMouseEvent@@@Z @ 323 NONAME ; void QWebView::mouseReleaseEvent(class QMouseEvent *)
+ ?name@QWebDatabase@@QBE?AVQString@@XZ @ 324 NONAME ; class QString QWebDatabase::name(void) const
+ ?name@QWebPluginInfo@@QBE?AVQString@@XZ @ 325 NONAME ; class QString QWebPluginInfo::name(void) const
+ ?namespaceUri@QWebElement@@QBE?AVQString@@XZ @ 326 NONAME ; class QString QWebElement::namespaceUri(void) const
+ ?networkAccessManager@QWebPage@@QBEPAVQNetworkAccessManager@@XZ @ 327 NONAME ; class QNetworkAccessManager * QWebPage::networkAccessManager(void) const
+ ?nextSibling@QWebElement@@QBE?AV1@XZ @ 328 NONAME ; class QWebElement QWebElement::nextSibling(void) const
+ ?offlineStorageDefaultQuota@QWebSettings@@SA_JXZ @ 329 NONAME ; long long QWebSettings::offlineStorageDefaultQuota(void)
+ ?offlineStoragePath@QWebSettings@@SA?AVQString@@XZ @ 330 NONAME ; class QString QWebSettings::offlineStoragePath(void)
+ ?offlineWebApplicationCachePath@QWebSettings@@SA?AVQString@@XZ @ 331 NONAME ; class QString QWebSettings::offlineWebApplicationCachePath(void)
+ ?offlineWebApplicationCacheQuota@QWebSettings@@SA_JXZ @ 332 NONAME ; long long QWebSettings::offlineWebApplicationCacheQuota(void)
+ ?origin@QWebDatabase@@QBE?AVQWebSecurityOrigin@@XZ @ 333 NONAME ; class QWebSecurityOrigin QWebDatabase::origin(void) const
+ ?originalUrl@QWebHistoryItem@@QBE?AVQUrl@@XZ @ 334 NONAME ; class QUrl QWebHistoryItem::originalUrl(void) const
+ ?page@QGraphicsWebView@@QBEPAVQWebPage@@XZ @ 335 NONAME ; class QWebPage * QGraphicsWebView::page(void) const
+ ?page@QWebFrame@@QBEPAVQWebPage@@XZ @ 336 NONAME ; class QWebPage * QWebFrame::page(void) const
+ ?page@QWebInspector@@QBEPAVQWebPage@@XZ @ 337 NONAME ; class QWebPage * QWebInspector::page(void) const
+ ?page@QWebView@@QBEPAVQWebPage@@XZ @ 338 NONAME ; class QWebPage * QWebView::page(void) const
+ ?pageAction@QGraphicsWebView@@QBEPAVQAction@@W4WebAction@QWebPage@@@Z @ 339 NONAME ; class QAction * QGraphicsWebView::pageAction(enum QWebPage::WebAction) const
+ ?pageAction@QWebView@@QBEPAVQAction@@W4WebAction@QWebPage@@@Z @ 340 NONAME ; class QAction * QWebView::pageAction(enum QWebPage::WebAction) const
+ ?paint@QGraphicsWebView@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 341 NONAME ; void QGraphicsWebView::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
+ ?paintEvent@QWebView@@MAEXPAVQPaintEvent@@@Z @ 342 NONAME ; void QWebView::paintEvent(class QPaintEvent *)
+ ?palette@QWebPage@@QBE?AVQPalette@@XZ @ 343 NONAME ; class QPalette QWebPage::palette(void) const
+ ?parent@QWebElement@@QBE?AV1@XZ @ 344 NONAME ; class QWebElement QWebElement::parent(void) const
+ ?parentFrame@QWebFrame@@QBEPAV1@XZ @ 345 NONAME ; class QWebFrame * QWebFrame::parentFrame(void) const
+ ?path@QWebPluginInfo@@QBE?AVQString@@XZ @ 346 NONAME ; class QString QWebPluginInfo::path(void) const
+ ?pixmap@QWebHitTestResult@@QBE?AVQPixmap@@XZ @ 347 NONAME ; class QPixmap QWebHitTestResult::pixmap(void) const
+ ?pluginFactory@QWebPage@@QBEPAVQWebPluginFactory@@XZ @ 348 NONAME ; class QWebPluginFactory * QWebPage::pluginFactory(void) const
+ ?pluginForMimeType@QWebPluginDatabase@@QAE?AVQWebPluginInfo@@ABVQString@@@Z @ 349 NONAME ; class QWebPluginInfo QWebPluginDatabase::pluginForMimeType(class QString const &)
+ ?plugins@QWebPluginDatabase@@QBE?AV?$QList@VQWebPluginInfo@@@@XZ @ 350 NONAME ; class QList<class QWebPluginInfo> QWebPluginDatabase::plugins(void) const
+ ?port@QWebSecurityOrigin@@QBEHXZ @ 351 NONAME ; int QWebSecurityOrigin::port(void) const
+ ?pos@QWebFrame@@QBE?AVQPoint@@XZ @ 352 NONAME ; class QPoint QWebFrame::pos(void) const
+ ?pos@QWebHitTestResult@@QBE?AVQPoint@@XZ @ 353 NONAME ; class QPoint QWebHitTestResult::pos(void) const
+ ?preferredContentsSize@QWebPage@@QBE?AVQSize@@XZ @ 354 NONAME ; class QSize QWebPage::preferredContentsSize(void) const
+ ?prefix@QWebElement@@QBE?AVQString@@XZ @ 355 NONAME ; class QString QWebElement::prefix(void) const
+ ?prependInside@QWebElement@@QAEXABV1@@Z @ 356 NONAME ; void QWebElement::prependInside(class QWebElement const &)
+ ?prependInside@QWebElement@@QAEXABVQString@@@Z @ 357 NONAME ; void QWebElement::prependInside(class QString const &)
+ ?prependOutside@QWebElement@@QAEXABV1@@Z @ 358 NONAME ; void QWebElement::prependOutside(class QWebElement const &)
+ ?prependOutside@QWebElement@@QAEXABVQString@@@Z @ 359 NONAME ; void QWebElement::prependOutside(class QString const &)
+ ?previousSibling@QWebElement@@QBE?AV1@XZ @ 360 NONAME ; class QWebElement QWebElement::previousSibling(void) const
+ ?print@QWebView@@QBEXPAVQPrinter@@@Z @ 361 NONAME ; void QWebView::print(class QPrinter *) const
+ ?printRequested@QWebPage@@IAEXPAVQWebFrame@@@Z @ 362 NONAME ; void QWebPage::printRequested(class QWebFrame *)
+ ?printingMaximumShrinkFactor@QWebSettings@@QBEMXZ @ 363 NONAME ABSENT ; float QWebSettings::printingMaximumShrinkFactor(void) const
+ ?printingMinimumShrinkFactor@QWebSettings@@QBEMXZ @ 364 NONAME ABSENT ; float QWebSettings::printingMinimumShrinkFactor(void) const
+ ?provisionalLoad@QWebFrame@@IAEXXZ @ 365 NONAME ; void QWebFrame::provisionalLoad(void)
+ ?qWebKitMajorVersion@@YAHXZ @ 366 NONAME ; int qWebKitMajorVersion(void)
+ ?qWebKitMinorVersion@@YAHXZ @ 367 NONAME ; int qWebKitMinorVersion(void)
+ ?qWebKitVersion@@YA?AVQString@@XZ @ 368 NONAME ; class QString qWebKitVersion(void)
+ ?qt_drt_clearFrameName@@YAXPAVQWebFrame@@@Z @ 369 NONAME ; void qt_drt_clearFrameName(class QWebFrame *)
+ ?qt_drt_counterValueForElementById@@YA?AVQString@@PAVQWebFrame@@ABV1@@Z @ 370 NONAME ; class QString qt_drt_counterValueForElementById(class QWebFrame *, class QString const &)
+ ?qt_drt_garbageCollector_collect@@YAXXZ @ 371 NONAME ; void qt_drt_garbageCollector_collect(void)
+ ?qt_drt_garbageCollector_collectOnAlternateThread@@YAX_N@Z @ 372 NONAME ; void qt_drt_garbageCollector_collectOnAlternateThread(bool)
+ ?qt_drt_javaScriptObjectsCount@@YAHXZ @ 373 NONAME ; int qt_drt_javaScriptObjectsCount(void)
+ ?qt_drt_numberOfActiveAnimations@@YAHPAVQWebFrame@@@Z @ 374 NONAME ; int qt_drt_numberOfActiveAnimations(class QWebFrame *)
+ ?qt_drt_overwritePluginDirectories@@YAXXZ @ 375 NONAME ; void qt_drt_overwritePluginDirectories(void)
+ ?qt_drt_pauseAnimation@@YA_NPAVQWebFrame@@ABVQString@@N1@Z @ 376 NONAME ; bool qt_drt_pauseAnimation(class QWebFrame *, class QString const &, double, class QString const &)
+ ?qt_drt_pauseTransitionOfProperty@@YA_NPAVQWebFrame@@ABVQString@@N1@Z @ 377 NONAME ; bool qt_drt_pauseTransitionOfProperty(class QWebFrame *, class QString const &, double, class QString const &)
+ ?qt_drt_resetOriginAccessWhiteLists@@YAXXZ @ 378 NONAME ; void qt_drt_resetOriginAccessWhiteLists(void)
+ ?qt_drt_run@@YAX_N@Z @ 379 NONAME ; void qt_drt_run(bool)
+ ?qt_drt_setJavaScriptProfilingEnabled@@YAXPAVQWebFrame@@_N@Z @ 380 NONAME ; void qt_drt_setJavaScriptProfilingEnabled(class QWebFrame *, bool)
+ ?qt_drt_whiteListAccessFromOrigin@@YAXABVQString@@00_N@Z @ 381 NONAME ; void qt_drt_whiteListAccessFromOrigin(class QString const &, class QString const &, class QString const &, bool)
+ ?qt_dump_editing_callbacks@@YAX_N@Z @ 382 NONAME ; void qt_dump_editing_callbacks(bool)
+ ?qt_dump_frame_loader@@YAX_N@Z @ 383 NONAME ; void qt_dump_frame_loader(bool)
+ ?qt_dump_resource_load_callbacks@@YAX_N@Z @ 384 NONAME ; void qt_dump_resource_load_callbacks(bool)
+ ?qt_dump_set_accepts_editing@@YAX_N@Z @ 385 NONAME ; void qt_dump_set_accepts_editing(bool)
+ ?qt_metacall@QGraphicsWebView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 386 NONAME ; int QGraphicsWebView::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QWebFrame@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 387 NONAME ; int QWebFrame::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QWebHistoryInterface@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 388 NONAME ; int QWebHistoryInterface::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QWebInspector@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 389 NONAME ; int QWebInspector::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QWebPage@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 390 NONAME ; int QWebPage::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QWebPluginDatabase@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 391 NONAME ; int QWebPluginDatabase::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QWebPluginFactory@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 392 NONAME ; int QWebPluginFactory::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QWebView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 393 NONAME ; int QWebView::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacast@QGraphicsWebView@@UAEPAXPBD@Z @ 394 NONAME ; void * QGraphicsWebView::qt_metacast(char const *)
+ ?qt_metacast@QWebFrame@@UAEPAXPBD@Z @ 395 NONAME ; void * QWebFrame::qt_metacast(char const *)
+ ?qt_metacast@QWebHistoryInterface@@UAEPAXPBD@Z @ 396 NONAME ; void * QWebHistoryInterface::qt_metacast(char const *)
+ ?qt_metacast@QWebInspector@@UAEPAXPBD@Z @ 397 NONAME ; void * QWebInspector::qt_metacast(char const *)
+ ?qt_metacast@QWebPage@@UAEPAXPBD@Z @ 398 NONAME ; void * QWebPage::qt_metacast(char const *)
+ ?qt_metacast@QWebPluginDatabase@@UAEPAXPBD@Z @ 399 NONAME ; void * QWebPluginDatabase::qt_metacast(char const *)
+ ?qt_metacast@QWebPluginFactory@@UAEPAXPBD@Z @ 400 NONAME ; void * QWebPluginFactory::qt_metacast(char const *)
+ ?qt_metacast@QWebView@@UAEPAXPBD@Z @ 401 NONAME ; void * QWebView::qt_metacast(char const *)
+ ?qt_webpage_groupName@@YA?AVQString@@PAVQWebPage@@@Z @ 402 NONAME ; class QString qt_webpage_groupName(class QWebPage *)
+ ?qt_webpage_setGroupName@@YAXPAVQWebPage@@ABVQString@@@Z @ 403 NONAME ; void qt_webpage_setGroupName(class QWebPage *, class QString const &)
+ ?refresh@QWebPluginDatabase@@QAEXXZ @ 404 NONAME ; void QWebPluginDatabase::refresh(void)
+ ?refreshPlugins@QWebPluginFactory@@UAEXXZ @ 405 NONAME ; void QWebPluginFactory::refreshPlugins(void)
+ ?reload@QGraphicsWebView@@QAEXXZ @ 406 NONAME ; void QGraphicsWebView::reload(void)
+ ?reload@QWebView@@QAEXXZ @ 407 NONAME ; void QWebView::reload(void)
+ ?removeAllChildren@QWebElement@@QAEXXZ @ 408 NONAME ; void QWebElement::removeAllChildren(void)
+ ?removeAllDatabases@QWebDatabase@@SAXXZ @ 409 NONAME ; void QWebDatabase::removeAllDatabases(void)
+ ?removeAttribute@QWebElement@@QAEXABVQString@@@Z @ 410 NONAME ; void QWebElement::removeAttribute(class QString const &)
+ ?removeAttributeNS@QWebElement@@QAEXABVQString@@0@Z @ 411 NONAME ; void QWebElement::removeAttributeNS(class QString const &, class QString const &)
+ ?removeClass@QWebElement@@QAEXABVQString@@@Z @ 412 NONAME ; void QWebElement::removeClass(class QString const &)
+ ?removeDatabase@QWebDatabase@@SAXABV1@@Z @ 413 NONAME ; void QWebDatabase::removeDatabase(class QWebDatabase const &)
+ ?removeFromDocument@QWebElement@@QAEXXZ @ 414 NONAME ; void QWebElement::removeFromDocument(void)
+ ?removeLocalScheme@QWebSecurityOrigin@@SAXABVQString@@@Z @ 415 NONAME ; void QWebSecurityOrigin::removeLocalScheme(class QString const &)
+ ?render@QWebElement@@QAEXPAVQPainter@@@Z @ 416 NONAME ; void QWebElement::render(class QPainter *)
+ ?render@QWebFrame@@QAEXPAVQPainter@@@Z @ 417 NONAME ; void QWebFrame::render(class QPainter *)
+ ?render@QWebFrame@@QAEXPAVQPainter@@ABVQRegion@@@Z @ 418 NONAME ; void QWebFrame::render(class QPainter *, class QRegion const &)
+ ?render@QWebFrame@@QAEXPAVQPainter@@W4RenderLayer@1@ABVQRegion@@@Z @ 419 NONAME ; void QWebFrame::render(class QPainter *, enum QWebFrame::RenderLayer, class QRegion const &)
+ ?renderHints@QWebView@@QBE?AV?$QFlags@W4RenderHint@QPainter@@@@XZ @ 420 NONAME ; class QFlags<enum QPainter::RenderHint> QWebView::renderHints(void) const
+ ?renderTreeDump@QWebFrame@@QBE?AVQString@@XZ @ 421 NONAME ; class QString QWebFrame::renderTreeDump(void) const
+ ?repaintRequested@QWebPage@@IAEXABVQRect@@@Z @ 422 NONAME ; void QWebPage::repaintRequested(class QRect const &)
+ ?replace@QWebElement@@QAEXABV1@@Z @ 423 NONAME ; void QWebElement::replace(class QWebElement const &)
+ ?replace@QWebElement@@QAEXABVQString@@@Z @ 424 NONAME ; void QWebElement::replace(class QString const &)
+ ?requestedUrl@QWebFrame@@QBE?AVQUrl@@XZ @ 425 NONAME ; class QUrl QWebFrame::requestedUrl(void) const
+ ?resetAttribute@QWebSettings@@QAEXW4WebAttribute@1@@Z @ 426 NONAME ; void QWebSettings::resetAttribute(enum QWebSettings::WebAttribute)
+ ?resetFontFamily@QWebSettings@@QAEXW4FontFamily@1@@Z @ 427 NONAME ; void QWebSettings::resetFontFamily(enum QWebSettings::FontFamily)
+ ?resetFontSize@QWebSettings@@QAEXW4FontSize@1@@Z @ 428 NONAME ; void QWebSettings::resetFontSize(enum QWebSettings::FontSize)
+ ?resizeEvent@QWebInspector@@MAEXPAVQResizeEvent@@@Z @ 429 NONAME ; void QWebInspector::resizeEvent(class QResizeEvent *)
+ ?resizeEvent@QWebView@@MAEXPAVQResizeEvent@@@Z @ 430 NONAME ; void QWebView::resizeEvent(class QResizeEvent *)
+ ?restoreFrameStateRequested@QWebPage@@IAEXPAVQWebFrame@@@Z @ 431 NONAME ; void QWebPage::restoreFrameStateRequested(class QWebFrame *)
+ ?saveFrameStateRequested@QWebPage@@IAEXPAVQWebFrame@@PAVQWebHistoryItem@@@Z @ 432 NONAME ; void QWebPage::saveFrameStateRequested(class QWebFrame *, class QWebHistoryItem *)
+ ?sceneEvent@QGraphicsWebView@@MAE_NPAVQEvent@@@Z @ 433 NONAME ; bool QGraphicsWebView::sceneEvent(class QEvent *)
+ ?scheme@QWebSecurityOrigin@@QBE?AVQString@@XZ @ 434 NONAME ; class QString QWebSecurityOrigin::scheme(void) const
+ ?scroll@QWebFrame@@QAEXHH@Z @ 435 NONAME ; void QWebFrame::scroll(int, int)
+ ?scrollBarGeometry@QWebFrame@@QBE?AVQRect@@W4Orientation@Qt@@@Z @ 436 NONAME ; class QRect QWebFrame::scrollBarGeometry(enum Qt::Orientation) const
+ ?scrollBarMaximum@QWebFrame@@QBEHW4Orientation@Qt@@@Z @ 437 NONAME ; int QWebFrame::scrollBarMaximum(enum Qt::Orientation) const
+ ?scrollBarMinimum@QWebFrame@@QBEHW4Orientation@Qt@@@Z @ 438 NONAME ; int QWebFrame::scrollBarMinimum(enum Qt::Orientation) const
+ ?scrollBarPolicy@QWebFrame@@QBE?AW4ScrollBarPolicy@Qt@@W4Orientation@3@@Z @ 439 NONAME ; enum Qt::ScrollBarPolicy QWebFrame::scrollBarPolicy(enum Qt::Orientation) const
+ ?scrollBarValue@QWebFrame@@QBEHW4Orientation@Qt@@@Z @ 440 NONAME ; int QWebFrame::scrollBarValue(enum Qt::Orientation) const
+ ?scrollPosition@QWebFrame@@QBE?AVQPoint@@XZ @ 441 NONAME ; class QPoint QWebFrame::scrollPosition(void) const
+ ?scrollRequested@QWebPage@@IAEXHHABVQRect@@@Z @ 442 NONAME ; void QWebPage::scrollRequested(int, int, class QRect const &)
+ ?searchPaths@QWebPluginDatabase@@QBE?AVQStringList@@XZ @ 443 NONAME ; class QStringList QWebPluginDatabase::searchPaths(void) const
+ ?securityOrigin@QWebFrame@@QBE?AVQWebSecurityOrigin@@XZ @ 444 NONAME ; class QWebSecurityOrigin QWebFrame::securityOrigin(void) const
+ ?selectedText@QWebPage@@QBE?AVQString@@XZ @ 445 NONAME ; class QString QWebPage::selectedText(void) const
+ ?selectedText@QWebView@@QBE?AVQString@@XZ @ 446 NONAME ; class QString QWebView::selectedText(void) const
+ ?selectionChanged@QWebPage@@IAEXXZ @ 447 NONAME ; void QWebPage::selectionChanged(void)
+ ?selectionChanged@QWebView@@IAEXXZ @ 448 NONAME ; void QWebView::selectionChanged(void)
+ ?setAttribute@QWebElement@@QAEXABVQString@@0@Z @ 449 NONAME ; void QWebElement::setAttribute(class QString const &, class QString const &)
+ ?setAttribute@QWebSettings@@QAEXW4WebAttribute@1@_N@Z @ 450 NONAME ; void QWebSettings::setAttribute(enum QWebSettings::WebAttribute, bool)
+ ?setAttributeNS@QWebElement@@QAEXABVQString@@00@Z @ 451 NONAME ; void QWebElement::setAttributeNS(class QString const &, class QString const &, class QString const &)
+ ?setContent@QGraphicsWebView@@QAEXABVQByteArray@@ABVQString@@ABVQUrl@@@Z @ 452 NONAME ; void QGraphicsWebView::setContent(class QByteArray const &, class QString const &, class QUrl const &)
+ ?setContent@QWebFrame@@QAEXABVQByteArray@@ABVQString@@ABVQUrl@@@Z @ 453 NONAME ; void QWebFrame::setContent(class QByteArray const &, class QString const &, class QUrl const &)
+ ?setContent@QWebView@@QAEXABVQByteArray@@ABVQString@@ABVQUrl@@@Z @ 454 NONAME ; void QWebView::setContent(class QByteArray const &, class QString const &, class QUrl const &)
+ ?setContentEditable@QWebPage@@QAEX_N@Z @ 455 NONAME ; void QWebPage::setContentEditable(bool)
+ ?setDatabaseQuota@QWebSecurityOrigin@@QAEX_J@Z @ 456 NONAME ; void QWebSecurityOrigin::setDatabaseQuota(long long)
+ ?setDefaultInterface@QWebHistoryInterface@@SAXPAV1@@Z @ 457 NONAME ; void QWebHistoryInterface::setDefaultInterface(class QWebHistoryInterface *)
+ ?setDefaultTextEncoding@QWebSettings@@QAEXABVQString@@@Z @ 458 NONAME ; void QWebSettings::setDefaultTextEncoding(class QString const &)
+ ?setEnabled@QWebPluginInfo@@QAEX_N@Z @ 459 NONAME ; void QWebPluginInfo::setEnabled(bool)
+ ?setFocus@QWebElement@@QAEXXZ @ 460 NONAME ; void QWebElement::setFocus(void)
+ ?setFocus@QWebFrame@@QAEXXZ @ 461 NONAME ; void QWebFrame::setFocus(void)
+ ?setFontFamily@QWebSettings@@QAEXW4FontFamily@1@ABVQString@@@Z @ 462 NONAME ; void QWebSettings::setFontFamily(enum QWebSettings::FontFamily, class QString const &)
+ ?setFontSize@QWebSettings@@QAEXW4FontSize@1@H@Z @ 463 NONAME ; void QWebSettings::setFontSize(enum QWebSettings::FontSize, int)
+ ?setForwardUnsupportedContent@QWebPage@@QAEX_N@Z @ 464 NONAME ; void QWebPage::setForwardUnsupportedContent(bool)
+ ?setGeometry@QGraphicsWebView@@UAEXABVQRectF@@@Z @ 465 NONAME ; void QGraphicsWebView::setGeometry(class QRectF const &)
+ ?setHtml@QGraphicsWebView@@QAEXABVQString@@ABVQUrl@@@Z @ 466 NONAME ; void QGraphicsWebView::setHtml(class QString const &, class QUrl const &)
+ ?setHtml@QWebFrame@@QAEXABVQString@@ABVQUrl@@@Z @ 467 NONAME ; void QWebFrame::setHtml(class QString const &, class QUrl const &)
+ ?setHtml@QWebView@@QAEXABVQString@@ABVQUrl@@@Z @ 468 NONAME ; void QWebView::setHtml(class QString const &, class QUrl const &)
+ ?setIconDatabasePath@QWebSettings@@SAXABVQString@@@Z @ 469 NONAME ; void QWebSettings::setIconDatabasePath(class QString const &)
+ ?setInnerXml@QWebElement@@QAEXABVQString@@@Z @ 470 NONAME ; void QWebElement::setInnerXml(class QString const &)
+ ?setLinkDelegationPolicy@QWebPage@@QAEXW4LinkDelegationPolicy@1@@Z @ 471 NONAME ; void QWebPage::setLinkDelegationPolicy(enum QWebPage::LinkDelegationPolicy)
+ ?setLocalStoragePath@QWebSettings@@QAEXABVQString@@@Z @ 472 NONAME ; void QWebSettings::setLocalStoragePath(class QString const &)
+ ?setMaximumItemCount@QWebHistory@@QAEXH@Z @ 473 NONAME ; void QWebHistory::setMaximumItemCount(int)
+ ?setMaximumPagesInCache@QWebSettings@@SAXH@Z @ 474 NONAME ; void QWebSettings::setMaximumPagesInCache(int)
+ ?setNetworkAccessManager@QWebPage@@QAEXPAVQNetworkAccessManager@@@Z @ 475 NONAME ; void QWebPage::setNetworkAccessManager(class QNetworkAccessManager *)
+ ?setObjectCacheCapacities@QWebSettings@@SAXHHH@Z @ 476 NONAME ; void QWebSettings::setObjectCacheCapacities(int, int, int)
+ ?setOfflineStorageDefaultQuota@QWebSettings@@SAX_J@Z @ 477 NONAME ; void QWebSettings::setOfflineStorageDefaultQuota(long long)
+ ?setOfflineStoragePath@QWebSettings@@SAXABVQString@@@Z @ 478 NONAME ; void QWebSettings::setOfflineStoragePath(class QString const &)
+ ?setOfflineWebApplicationCachePath@QWebSettings@@SAXABVQString@@@Z @ 479 NONAME ; void QWebSettings::setOfflineWebApplicationCachePath(class QString const &)
+ ?setOfflineWebApplicationCacheQuota@QWebSettings@@SAX_J@Z @ 480 NONAME ; void QWebSettings::setOfflineWebApplicationCacheQuota(long long)
+ ?setOuterXml@QWebElement@@QAEXABVQString@@@Z @ 481 NONAME ; void QWebElement::setOuterXml(class QString const &)
+ ?setPage@QGraphicsWebView@@QAEXPAVQWebPage@@@Z @ 482 NONAME ; void QGraphicsWebView::setPage(class QWebPage *)
+ ?setPage@QWebInspector@@QAEXPAVQWebPage@@@Z @ 483 NONAME ; void QWebInspector::setPage(class QWebPage *)
+ ?setPage@QWebView@@QAEXPAVQWebPage@@@Z @ 484 NONAME ; void QWebView::setPage(class QWebPage *)
+ ?setPalette@QWebPage@@QAEXABVQPalette@@@Z @ 485 NONAME ; void QWebPage::setPalette(class QPalette const &)
+ ?setPlainText@QWebElement@@QAEXABVQString@@@Z @ 486 NONAME ; void QWebElement::setPlainText(class QString const &)
+ ?setPluginFactory@QWebPage@@QAEXPAVQWebPluginFactory@@@Z @ 487 NONAME ; void QWebPage::setPluginFactory(class QWebPluginFactory *)
+ ?setPreferredContentsSize@QWebPage@@QBEXABVQSize@@@Z @ 488 NONAME ; void QWebPage::setPreferredContentsSize(class QSize const &) const
+ ?setPreferredPluginForMimeType@QWebPluginDatabase@@QAEXABVQString@@ABVQWebPluginInfo@@@Z @ 489 NONAME ; void QWebPluginDatabase::setPreferredPluginForMimeType(class QString const &, class QWebPluginInfo const &)
+ ?setPrintingMaximumShrinkFactor@QWebSettings@@QAEXM@Z @ 490 NONAME ABSENT ; void QWebSettings::setPrintingMaximumShrinkFactor(float)
+ ?setPrintingMinimumShrinkFactor@QWebSettings@@QAEXM@Z @ 491 NONAME ABSENT ; void QWebSettings::setPrintingMinimumShrinkFactor(float)
+ ?setRenderHint@QWebView@@QAEXW4RenderHint@QPainter@@_N@Z @ 492 NONAME ; void QWebView::setRenderHint(enum QPainter::RenderHint, bool)
+ ?setRenderHints@QWebView@@QAEXV?$QFlags@W4RenderHint@QPainter@@@@@Z @ 493 NONAME ; void QWebView::setRenderHints(class QFlags<enum QPainter::RenderHint>)
+ ?setScrollBarPolicy@QWebFrame@@QAEXW4Orientation@Qt@@W4ScrollBarPolicy@3@@Z @ 494 NONAME ; void QWebFrame::setScrollBarPolicy(enum Qt::Orientation, enum Qt::ScrollBarPolicy)
+ ?setScrollBarValue@QWebFrame@@QAEXW4Orientation@Qt@@H@Z @ 495 NONAME ; void QWebFrame::setScrollBarValue(enum Qt::Orientation, int)
+ ?setScrollPosition@QWebFrame@@QAEXABVQPoint@@@Z @ 496 NONAME ; void QWebFrame::setScrollPosition(class QPoint const &)
+ ?setSearchPaths@QWebPluginDatabase@@QAEXABVQStringList@@@Z @ 497 NONAME ; void QWebPluginDatabase::setSearchPaths(class QStringList const &)
+ ?setStyleProperty@QWebElement@@QAEXABVQString@@0@Z @ 498 NONAME ; void QWebElement::setStyleProperty(class QString const &, class QString const &)
+ ?setTextSizeMultiplier@QWebFrame@@QAEXM@Z @ 499 NONAME ; void QWebFrame::setTextSizeMultiplier(float)
+ ?setTextSizeMultiplier@QWebView@@QAEXM@Z @ 500 NONAME ; void QWebView::setTextSizeMultiplier(float)
+ ?setUrl@QGraphicsWebView@@QAEXABVQUrl@@@Z @ 501 NONAME ; void QGraphicsWebView::setUrl(class QUrl const &)
+ ?setUrl@QWebFrame@@QAEXABVQUrl@@@Z @ 502 NONAME ; void QWebFrame::setUrl(class QUrl const &)
+ ?setUrl@QWebView@@QAEXABVQUrl@@@Z @ 503 NONAME ; void QWebView::setUrl(class QUrl const &)
+ ?setUserData@QWebHistoryItem@@QAEXABVQVariant@@@Z @ 504 NONAME ; void QWebHistoryItem::setUserData(class QVariant const &)
+ ?setUserStyleSheetUrl@QWebSettings@@QAEXABVQUrl@@@Z @ 505 NONAME ; void QWebSettings::setUserStyleSheetUrl(class QUrl const &)
+ ?setView@QWebPage@@QAEXPAVQWidget@@@Z @ 506 NONAME ; void QWebPage::setView(class QWidget *)
+ ?setViewportSize@QWebPage@@QBEXABVQSize@@@Z @ 507 NONAME ; void QWebPage::setViewportSize(class QSize const &) const
+ ?setWebGraphic@QWebSettings@@SAXW4WebGraphic@1@ABVQPixmap@@@Z @ 508 NONAME ; void QWebSettings::setWebGraphic(enum QWebSettings::WebGraphic, class QPixmap const &)
+ ?setZoomFactor@QGraphicsWebView@@QAEXM@Z @ 509 NONAME ; void QGraphicsWebView::setZoomFactor(float)
+ ?setZoomFactor@QWebFrame@@QAEXM@Z @ 510 NONAME ; void QWebFrame::setZoomFactor(float)
+ ?setZoomFactor@QWebView@@QAEXM@Z @ 511 NONAME ; void QWebView::setZoomFactor(float)
+ ?settings@QGraphicsWebView@@QBEPAVQWebSettings@@XZ @ 512 NONAME ; class QWebSettings * QGraphicsWebView::settings(void) const
+ ?settings@QWebPage@@QBEPAVQWebSettings@@XZ @ 513 NONAME ; class QWebSettings * QWebPage::settings(void) const
+ ?settings@QWebView@@QBEPAVQWebSettings@@XZ @ 514 NONAME ; class QWebSettings * QWebView::settings(void) const
+ ?shouldInterruptJavaScript@QWebPage@@QAE_NXZ @ 515 NONAME ; bool QWebPage::shouldInterruptJavaScript(void)
+ ?showEvent@QWebInspector@@MAEXPAVQShowEvent@@@Z @ 516 NONAME ; void QWebInspector::showEvent(class QShowEvent *)
+ ?size@QWebDatabase@@QBE_JXZ @ 517 NONAME ; long long QWebDatabase::size(void) const
+ ?sizeHint@QGraphicsWebView@@UBE?AVQSizeF@@W4SizeHint@Qt@@ABV2@@Z @ 518 NONAME ; class QSizeF QGraphicsWebView::sizeHint(enum Qt::SizeHint, class QSizeF const &) const
+ ?sizeHint@QWebInspector@@UBE?AVQSize@@XZ @ 519 NONAME ; class QSize QWebInspector::sizeHint(void) const
+ ?sizeHint@QWebView@@UBE?AVQSize@@XZ @ 520 NONAME ; class QSize QWebView::sizeHint(void) const
+ ?statusBarMessage@QGraphicsWebView@@IAEXABVQString@@@Z @ 521 NONAME ; void QGraphicsWebView::statusBarMessage(class QString const &)
+ ?statusBarMessage@QWebPage@@IAEXABVQString@@@Z @ 522 NONAME ; void QWebPage::statusBarMessage(class QString const &)
+ ?statusBarMessage@QWebView@@IAEXABVQString@@@Z @ 523 NONAME ; void QWebView::statusBarMessage(class QString const &)
+ ?statusBarVisibilityChangeRequested@QWebPage@@IAEX_N@Z @ 524 NONAME ; void QWebPage::statusBarVisibilityChangeRequested(bool)
+ ?stop@QGraphicsWebView@@QAEXXZ @ 525 NONAME ; void QGraphicsWebView::stop(void)
+ ?stop@QWebView@@QAEXXZ @ 526 NONAME ; void QWebView::stop(void)
+ ?styleProperty@QWebElement@@QBE?AVQString@@ABV2@W4StyleResolveStrategy@1@@Z @ 527 NONAME ; class QString QWebElement::styleProperty(class QString const &, enum QWebElement::StyleResolveStrategy) const
+ ?supportsExtension@QWebPage@@UBE_NW4Extension@1@@Z @ 528 NONAME ; bool QWebPage::supportsExtension(enum QWebPage::Extension) const
+ ?supportsExtension@QWebPluginFactory@@UBE_NW4Extension@1@@Z @ 529 NONAME ; bool QWebPluginFactory::supportsExtension(enum QWebPluginFactory::Extension) const
+ ?supportsMimeType@QWebPluginInfo@@QBE_NABVQString@@@Z @ 530 NONAME ; bool QWebPluginInfo::supportsMimeType(class QString const &) const
+ ?swallowContextMenuEvent@QWebPage@@QAE_NPAVQContextMenuEvent@@@Z @ 531 NONAME ; bool QWebPage::swallowContextMenuEvent(class QContextMenuEvent *)
+ ?tagName@QWebElement@@QBE?AVQString@@XZ @ 532 NONAME ; class QString QWebElement::tagName(void) const
+ ?takeFromDocument@QWebElement@@QAEAAV1@XZ @ 533 NONAME ; class QWebElement & QWebElement::takeFromDocument(void)
+ ?testAttribute@QWebSettings@@QBE_NW4WebAttribute@1@@Z @ 534 NONAME ; bool QWebSettings::testAttribute(enum QWebSettings::WebAttribute) const
+ ?textSizeMultiplier@QWebFrame@@QBEMXZ @ 535 NONAME ; float QWebFrame::textSizeMultiplier(void) const
+ ?textSizeMultiplier@QWebView@@QBEMXZ @ 536 NONAME ; float QWebView::textSizeMultiplier(void) const
+ ?title@QGraphicsWebView@@QBE?AVQString@@XZ @ 537 NONAME ; class QString QGraphicsWebView::title(void) const
+ ?title@QWebFrame@@QBE?AVQString@@XZ @ 538 NONAME ; class QString QWebFrame::title(void) const
+ ?title@QWebHistoryItem@@QBE?AVQString@@XZ @ 539 NONAME ; class QString QWebHistoryItem::title(void) const
+ ?title@QWebHitTestResult@@QBE?AVQString@@XZ @ 540 NONAME ; class QString QWebHitTestResult::title(void) const
+ ?title@QWebView@@QBE?AVQString@@XZ @ 541 NONAME ; class QString QWebView::title(void) const
+ ?titleChanged@QGraphicsWebView@@IAEXABVQString@@@Z @ 542 NONAME ; void QGraphicsWebView::titleChanged(class QString const &)
+ ?titleChanged@QWebFrame@@IAEXABVQString@@@Z @ 543 NONAME ; void QWebFrame::titleChanged(class QString const &)
+ ?titleChanged@QWebView@@IAEXABVQString@@@Z @ 544 NONAME ; void QWebView::titleChanged(class QString const &)
+ ?toHtml@QWebFrame@@QBE?AVQString@@XZ @ 545 NONAME ; class QString QWebFrame::toHtml(void) const
+ ?toInnerXml@QWebElement@@QBE?AVQString@@XZ @ 546 NONAME ; class QString QWebElement::toInnerXml(void) const
+ ?toList@QWebElementCollection@@QBE?AV?$QList@VQWebElement@@@@XZ @ 547 NONAME ; class QList<class QWebElement> QWebElementCollection::toList(void) const
+ ?toOuterXml@QWebElement@@QBE?AVQString@@XZ @ 548 NONAME ; class QString QWebElement::toOuterXml(void) const
+ ?toPlainText@QWebElement@@QBE?AVQString@@XZ @ 549 NONAME ; class QString QWebElement::toPlainText(void) const
+ ?toPlainText@QWebFrame@@QBE?AVQString@@XZ @ 550 NONAME ; class QString QWebFrame::toPlainText(void) const
+ ?toggleClass@QWebElement@@QAEXABVQString@@@Z @ 551 NONAME ; void QWebElement::toggleClass(class QString const &)
+ ?toolBarVisibilityChangeRequested@QWebPage@@IAEX_N@Z @ 552 NONAME ; void QWebPage::toolBarVisibilityChangeRequested(bool)
+ ?totalBytes@QWebPage@@QBE_KXZ @ 553 NONAME ; unsigned long long QWebPage::totalBytes(void) const
+ ?tr@QGraphicsWebView@@SA?AVQString@@PBD0@Z @ 554 NONAME ; class QString QGraphicsWebView::tr(char const *, char const *)
+ ?tr@QGraphicsWebView@@SA?AVQString@@PBD0H@Z @ 555 NONAME ; class QString QGraphicsWebView::tr(char const *, char const *, int)
+ ?tr@QWebFrame@@SA?AVQString@@PBD0@Z @ 556 NONAME ; class QString QWebFrame::tr(char const *, char const *)
+ ?tr@QWebFrame@@SA?AVQString@@PBD0H@Z @ 557 NONAME ; class QString QWebFrame::tr(char const *, char const *, int)
+ ?tr@QWebHistoryInterface@@SA?AVQString@@PBD0@Z @ 558 NONAME ; class QString QWebHistoryInterface::tr(char const *, char const *)
+ ?tr@QWebHistoryInterface@@SA?AVQString@@PBD0H@Z @ 559 NONAME ; class QString QWebHistoryInterface::tr(char const *, char const *, int)
+ ?tr@QWebInspector@@SA?AVQString@@PBD0@Z @ 560 NONAME ; class QString QWebInspector::tr(char const *, char const *)
+ ?tr@QWebInspector@@SA?AVQString@@PBD0H@Z @ 561 NONAME ; class QString QWebInspector::tr(char const *, char const *, int)
+ ?tr@QWebPage@@SA?AVQString@@PBD0@Z @ 562 NONAME ; class QString QWebPage::tr(char const *, char const *)
+ ?tr@QWebPage@@SA?AVQString@@PBD0H@Z @ 563 NONAME ; class QString QWebPage::tr(char const *, char const *, int)
+ ?tr@QWebPluginDatabase@@SA?AVQString@@PBD0@Z @ 564 NONAME ; class QString QWebPluginDatabase::tr(char const *, char const *)
+ ?tr@QWebPluginDatabase@@SA?AVQString@@PBD0H@Z @ 565 NONAME ; class QString QWebPluginDatabase::tr(char const *, char const *, int)
+ ?tr@QWebPluginFactory@@SA?AVQString@@PBD0@Z @ 566 NONAME ; class QString QWebPluginFactory::tr(char const *, char const *)
+ ?tr@QWebPluginFactory@@SA?AVQString@@PBD0H@Z @ 567 NONAME ; class QString QWebPluginFactory::tr(char const *, char const *, int)
+ ?tr@QWebView@@SA?AVQString@@PBD0@Z @ 568 NONAME ; class QString QWebView::tr(char const *, char const *)
+ ?tr@QWebView@@SA?AVQString@@PBD0H@Z @ 569 NONAME ; class QString QWebView::tr(char const *, char const *, int)
+ ?trUtf8@QGraphicsWebView@@SA?AVQString@@PBD0@Z @ 570 NONAME ; class QString QGraphicsWebView::trUtf8(char const *, char const *)
+ ?trUtf8@QGraphicsWebView@@SA?AVQString@@PBD0H@Z @ 571 NONAME ; class QString QGraphicsWebView::trUtf8(char const *, char const *, int)
+ ?trUtf8@QWebFrame@@SA?AVQString@@PBD0@Z @ 572 NONAME ; class QString QWebFrame::trUtf8(char const *, char const *)
+ ?trUtf8@QWebFrame@@SA?AVQString@@PBD0H@Z @ 573 NONAME ; class QString QWebFrame::trUtf8(char const *, char const *, int)
+ ?trUtf8@QWebHistoryInterface@@SA?AVQString@@PBD0@Z @ 574 NONAME ; class QString QWebHistoryInterface::trUtf8(char const *, char const *)
+ ?trUtf8@QWebHistoryInterface@@SA?AVQString@@PBD0H@Z @ 575 NONAME ; class QString QWebHistoryInterface::trUtf8(char const *, char const *, int)
+ ?trUtf8@QWebInspector@@SA?AVQString@@PBD0@Z @ 576 NONAME ; class QString QWebInspector::trUtf8(char const *, char const *)
+ ?trUtf8@QWebInspector@@SA?AVQString@@PBD0H@Z @ 577 NONAME ; class QString QWebInspector::trUtf8(char const *, char const *, int)
+ ?trUtf8@QWebPage@@SA?AVQString@@PBD0@Z @ 578 NONAME ; class QString QWebPage::trUtf8(char const *, char const *)
+ ?trUtf8@QWebPage@@SA?AVQString@@PBD0H@Z @ 579 NONAME ; class QString QWebPage::trUtf8(char const *, char const *, int)
+ ?trUtf8@QWebPluginDatabase@@SA?AVQString@@PBD0@Z @ 580 NONAME ; class QString QWebPluginDatabase::trUtf8(char const *, char const *)
+ ?trUtf8@QWebPluginDatabase@@SA?AVQString@@PBD0H@Z @ 581 NONAME ; class QString QWebPluginDatabase::trUtf8(char const *, char const *, int)
+ ?trUtf8@QWebPluginFactory@@SA?AVQString@@PBD0@Z @ 582 NONAME ; class QString QWebPluginFactory::trUtf8(char const *, char const *)
+ ?trUtf8@QWebPluginFactory@@SA?AVQString@@PBD0H@Z @ 583 NONAME ; class QString QWebPluginFactory::trUtf8(char const *, char const *, int)
+ ?trUtf8@QWebView@@SA?AVQString@@PBD0@Z @ 584 NONAME ; class QString QWebView::trUtf8(char const *, char const *)
+ ?trUtf8@QWebView@@SA?AVQString@@PBD0H@Z @ 585 NONAME ; class QString QWebView::trUtf8(char const *, char const *, int)
+ ?triggerAction@QWebPage@@UAEXW4WebAction@1@_N@Z @ 586 NONAME ; void QWebPage::triggerAction(enum QWebPage::WebAction, bool)
+ ?triggerPageAction@QGraphicsWebView@@QAEXW4WebAction@QWebPage@@_N@Z @ 587 NONAME ; void QGraphicsWebView::triggerPageAction(enum QWebPage::WebAction, bool)
+ ?triggerPageAction@QWebView@@QAEXW4WebAction@QWebPage@@_N@Z @ 588 NONAME ; void QWebView::triggerPageAction(enum QWebPage::WebAction, bool)
+ ?undoStack@QWebPage@@QBEPAVQUndoStack@@XZ @ 589 NONAME ; class QUndoStack * QWebPage::undoStack(void) const
+ ?unsupportedContent@QWebPage@@IAEXPAVQNetworkReply@@@Z @ 590 NONAME ; void QWebPage::unsupportedContent(class QNetworkReply *)
+ ?updateGeometry@QGraphicsWebView@@UAEXXZ @ 591 NONAME ; void QGraphicsWebView::updateGeometry(void)
+ ?updatePositionDependentActions@QWebPage@@QAEXABVQPoint@@@Z @ 592 NONAME ; void QWebPage::updatePositionDependentActions(class QPoint const &)
+ ?url@QGraphicsWebView@@QBE?AVQUrl@@XZ @ 593 NONAME ; class QUrl QGraphicsWebView::url(void) const
+ ?url@QWebFrame@@QBE?AVQUrl@@XZ @ 594 NONAME ; class QUrl QWebFrame::url(void) const
+ ?url@QWebHistoryItem@@QBE?AVQUrl@@XZ @ 595 NONAME ; class QUrl QWebHistoryItem::url(void) const
+ ?url@QWebView@@QBE?AVQUrl@@XZ @ 596 NONAME ; class QUrl QWebView::url(void) const
+ ?urlChanged@QGraphicsWebView@@IAEXABVQUrl@@@Z @ 597 NONAME ; void QGraphicsWebView::urlChanged(class QUrl const &)
+ ?urlChanged@QWebFrame@@IAEXABVQUrl@@@Z @ 598 NONAME ; void QWebFrame::urlChanged(class QUrl const &)
+ ?urlChanged@QWebView@@IAEXABVQUrl@@@Z @ 599 NONAME ; void QWebView::urlChanged(class QUrl const &)
+ ?userAgentForUrl@QWebPage@@MBE?AVQString@@ABVQUrl@@@Z @ 600 NONAME ; class QString QWebPage::userAgentForUrl(class QUrl const &) const
+ ?userData@QWebHistoryItem@@QBE?AVQVariant@@XZ @ 601 NONAME ; class QVariant QWebHistoryItem::userData(void) const
+ ?userStyleSheetUrl@QWebSettings@@QBE?AVQUrl@@XZ @ 602 NONAME ; class QUrl QWebSettings::userStyleSheetUrl(void) const
+ ?view@QWebPage@@QBEPAVQWidget@@XZ @ 603 NONAME ; class QWidget * QWebPage::view(void) const
+ ?viewportSize@QWebPage@@QBE?AVQSize@@XZ @ 604 NONAME ; class QSize QWebPage::viewportSize(void) const
+ ?webFrame@QWebElement@@QBEPAVQWebFrame@@XZ @ 605 NONAME ; class QWebFrame * QWebElement::webFrame(void) const
+ ?webGraphic@QWebSettings@@SA?AVQPixmap@@W4WebGraphic@1@@Z @ 606 NONAME ; class QPixmap QWebSettings::webGraphic(enum QWebSettings::WebGraphic)
+ ?wheelEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneWheelEvent@@@Z @ 607 NONAME ; void QGraphicsWebView::wheelEvent(class QGraphicsSceneWheelEvent *)
+ ?wheelEvent@QWebView@@MAEXPAVQWheelEvent@@@Z @ 608 NONAME ; void QWebView::wheelEvent(class QWheelEvent *)
+ ?windowCloseRequested@QWebPage@@IAEXXZ @ 609 NONAME ; void QWebPage::windowCloseRequested(void)
+ ?zoomFactor@QGraphicsWebView@@QBEMXZ @ 610 NONAME ; float QGraphicsWebView::zoomFactor(void) const
+ ?zoomFactor@QWebFrame@@QBEMXZ @ 611 NONAME ; float QWebFrame::zoomFactor(void) const
+ ?zoomFactor@QWebView@@QBEMXZ @ 612 NONAME ; float QWebView::zoomFactor(void) const
+ ?staticMetaObject@QWebPluginDatabase@@2UQMetaObject@@B @ 613 NONAME ; struct QMetaObject const QWebPluginDatabase::staticMetaObject
+ ?staticMetaObject@QWebFrame@@2UQMetaObject@@B @ 614 NONAME ; struct QMetaObject const QWebFrame::staticMetaObject
+ ?staticMetaObject@QWebHistoryInterface@@2UQMetaObject@@B @ 615 NONAME ; struct QMetaObject const QWebHistoryInterface::staticMetaObject
+ ?staticMetaObject@QWebInspector@@2UQMetaObject@@B @ 616 NONAME ; struct QMetaObject const QWebInspector::staticMetaObject
+ ?staticMetaObject@QWebPluginFactory@@2UQMetaObject@@B @ 617 NONAME ; struct QMetaObject const QWebPluginFactory::staticMetaObject
+ ?staticMetaObject@QGraphicsWebView@@2UQMetaObject@@B @ 618 NONAME ; struct QMetaObject const QGraphicsWebView::staticMetaObject
+ ?staticMetaObject@QWebPage@@2UQMetaObject@@B @ 619 NONAME ; struct QMetaObject const QWebPage::staticMetaObject
+ ?staticMetaObject@QWebView@@2UQMetaObject@@B @ 620 NONAME ; struct QMetaObject const QWebView::staticMetaObject
+ ?attributeNames@QWebElement@@QBE?AVQStringList@@ABVQString@@@Z @ 621 NONAME ; class QStringList QWebElement::attributeNames(class QString const &) const
+ ?qt_networkAccessAllowed@@YAX_N@Z @ 622 NONAME ; void qt_networkAccessAllowed(bool)
+ ?qt_resumeActiveDOMObjects@@YAXPAVQWebFrame@@@Z @ 623 NONAME ; void qt_resumeActiveDOMObjects(class QWebFrame *)
+ ?qt_suspendActiveDOMObjects@@YAXPAVQWebFrame@@@Z @ 624 NONAME ; void qt_suspendActiveDOMObjects(class QWebFrame *)
+ ?qtwebkit_webframe_scrollRecursively@@YA_NPAVQWebFrame@@HH@Z @ 625 NONAME ; bool qtwebkit_webframe_scrollRecursively(class QWebFrame *, int, int)
+
diff --git a/WebKit/qt/symbian/eabi/QtWebKitu.def b/WebKit/qt/symbian/eabi/QtWebKitu.def
new file mode 100644
index 0000000..78523c6
--- /dev/null
+++ b/WebKit/qt/symbian/eabi/QtWebKitu.def
@@ -0,0 +1,699 @@
+EXPORTS
+ _Z10qt_drt_runb @ 1 NONAME
+ _Z14qWebKitVersionv @ 2 NONAME
+ _Z19qWebKitMajorVersionv @ 3 NONAME
+ _Z19qWebKitMinorVersionv @ 4 NONAME
+ _Z20qt_dump_frame_loaderb @ 5 NONAME
+ _Z20qt_webpage_groupNameP8QWebPage @ 6 NONAME
+ _Z21qt_drt_clearFrameNameP9QWebFrame @ 7 NONAME
+ _Z21qt_drt_pauseAnimationP9QWebFrameRK7QStringdS3_ @ 8 NONAME
+ _Z23qt_webpage_setGroupNameP8QWebPageRK7QString @ 9 NONAME
+ _Z25qt_dump_editing_callbacksb @ 10 NONAME
+ _Z27qt_dump_set_accepts_editingb @ 11 NONAME
+ _Z29qt_drt_javaScriptObjectsCountv @ 12 NONAME
+ _Z31qt_drt_garbageCollector_collectv @ 13 NONAME
+ _Z31qt_drt_numberOfActiveAnimationsP9QWebFrame @ 14 NONAME
+ _Z31qt_dump_resource_load_callbacksb @ 15 NONAME
+ _Z32qt_drt_pauseTransitionOfPropertyP9QWebFrameRK7QStringdS3_ @ 16 NONAME
+ _Z33qt_drt_overwritePluginDirectoriesv @ 17 NONAME
+ _Z36qt_drt_setJavaScriptProfilingEnabledP9QWebFrameb @ 18 NONAME
+ _Z48qt_drt_garbageCollector_collectOnAlternateThreadb @ 19 NONAME
+ _ZN11QWebElement11encloseWithERK7QString @ 20 NONAME
+ _ZN11QWebElement11encloseWithERKS_ @ 21 NONAME
+ _ZN11QWebElement11removeClassERK7QString @ 22 NONAME
+ _ZN11QWebElement11setInnerXmlERK7QString @ 23 NONAME
+ _ZN11QWebElement11setOuterXmlERK7QString @ 24 NONAME
+ _ZN11QWebElement11toggleClassERK7QString @ 25 NONAME
+ _ZN11QWebElement12appendInsideERK7QString @ 26 NONAME
+ _ZN11QWebElement12appendInsideERKS_ @ 27 NONAME
+ _ZN11QWebElement12setAttributeERK7QStringS2_ @ 28 NONAME
+ _ZN11QWebElement12setPlainTextERK7QString @ 29 NONAME
+ _ZN11QWebElement13appendOutsideERK7QString @ 30 NONAME
+ _ZN11QWebElement13appendOutsideERKS_ @ 31 NONAME
+ _ZN11QWebElement13prependInsideERK7QString @ 32 NONAME
+ _ZN11QWebElement13prependInsideERKS_ @ 33 NONAME
+ _ZN11QWebElement14prependOutsideERK7QString @ 34 NONAME
+ _ZN11QWebElement14prependOutsideERKS_ @ 35 NONAME
+ _ZN11QWebElement14removeChildrenEv @ 36 NONAME ABSENT
+ _ZN11QWebElement14setAttributeNSERK7QStringS2_S2_ @ 37 NONAME
+ _ZN11QWebElement15removeAttributeERK7QString @ 38 NONAME
+ _ZN11QWebElement16enclosingElementEPN7WebCore4NodeE @ 39 NONAME
+ _ZN11QWebElement16setStylePropertyERK7QStringS2_ @ 40 NONAME
+ _ZN11QWebElement16takeFromDocumentEv @ 41 NONAME
+ _ZN11QWebElement17removeAttributeNSERK7QStringS2_ @ 42 NONAME
+ _ZN11QWebElement18evaluateJavaScriptERK7QString @ 43 NONAME
+ _ZN11QWebElement18removeFromDocumentEv @ 44 NONAME
+ _ZN11QWebElement19encloseContentsWithERK7QString @ 45 NONAME
+ _ZN11QWebElement19encloseContentsWithERKS_ @ 46 NONAME
+ _ZN11QWebElement7replaceERK7QString @ 47 NONAME
+ _ZN11QWebElement7replaceERKS_ @ 48 NONAME
+ _ZN11QWebElement8addClassERK7QString @ 49 NONAME
+ _ZN11QWebElement8setFocusEv @ 50 NONAME
+ _ZN11QWebElementC1EPN7WebCore4NodeE @ 51 NONAME
+ _ZN11QWebElementC1EPN7WebCore7ElementE @ 52 NONAME
+ _ZN11QWebElementC1ERKS_ @ 53 NONAME
+ _ZN11QWebElementC1Ev @ 54 NONAME
+ _ZN11QWebElementC2EPN7WebCore4NodeE @ 55 NONAME
+ _ZN11QWebElementC2EPN7WebCore7ElementE @ 56 NONAME
+ _ZN11QWebElementC2ERKS_ @ 57 NONAME
+ _ZN11QWebElementC2Ev @ 58 NONAME
+ _ZN11QWebElementD1Ev @ 59 NONAME
+ _ZN11QWebElementD2Ev @ 60 NONAME
+ _ZN11QWebElementaSERKS_ @ 61 NONAME
+ _ZN11QWebHistory12restoreStateERK10QByteArray @ 62 NONAME ABSENT
+ _ZN11QWebHistory19setMaximumItemCountEi @ 63 NONAME
+ _ZN11QWebHistory4backEv @ 64 NONAME
+ _ZN11QWebHistory5clearEv @ 65 NONAME
+ _ZN11QWebHistory7forwardEv @ 66 NONAME
+ _ZN11QWebHistory8goToItemERK15QWebHistoryItem @ 67 NONAME
+ _ZN11QWebHistoryC1Ev @ 68 NONAME
+ _ZN11QWebHistoryC2Ev @ 69 NONAME
+ _ZN11QWebHistoryD1Ev @ 70 NONAME
+ _ZN11QWebHistoryD2Ev @ 71 NONAME
+ _ZN12QWebDatabase14removeDatabaseERKS_ @ 72 NONAME
+ _ZN12QWebDatabase18removeAllDatabasesEv @ 73 NONAME
+ _ZN12QWebDatabaseC1EP19QWebDatabasePrivate @ 74 NONAME
+ _ZN12QWebDatabaseC1ERKS_ @ 75 NONAME
+ _ZN12QWebDatabaseC2EP19QWebDatabasePrivate @ 76 NONAME
+ _ZN12QWebDatabaseC2ERKS_ @ 77 NONAME
+ _ZN12QWebDatabaseD1Ev @ 78 NONAME
+ _ZN12QWebDatabaseD2Ev @ 79 NONAME
+ _ZN12QWebDatabaseaSERKS_ @ 80 NONAME
+ _ZN12QWebSettings10iconForUrlERK4QUrl @ 81 NONAME
+ _ZN12QWebSettings10webGraphicENS_10WebGraphicE @ 82 NONAME
+ _ZN12QWebSettings11setFontSizeENS_8FontSizeEi @ 83 NONAME
+ _ZN12QWebSettings12setAttributeENS_12WebAttributeEb @ 84 NONAME
+ _ZN12QWebSettings13resetFontSizeENS_8FontSizeE @ 85 NONAME
+ _ZN12QWebSettings13setFontFamilyENS_10FontFamilyERK7QString @ 86 NONAME
+ _ZN12QWebSettings13setWebGraphicENS_10WebGraphicERK7QPixmap @ 87 NONAME
+ _ZN12QWebSettings14globalSettingsEv @ 88 NONAME
+ _ZN12QWebSettings14pluginDatabaseEv @ 89 NONAME ABSENT
+ _ZN12QWebSettings14resetAttributeENS_12WebAttributeE @ 90 NONAME
+ _ZN12QWebSettings15resetFontFamilyENS_10FontFamilyE @ 91 NONAME
+ _ZN12QWebSettings16iconDatabasePathEv @ 92 NONAME
+ _ZN12QWebSettings17clearIconDatabaseEv @ 93 NONAME
+ _ZN12QWebSettings17clearMemoryCachesEv @ 94 NONAME
+ _ZN12QWebSettings18offlineStoragePathEv @ 95 NONAME
+ _ZN12QWebSettings19maximumPagesInCacheEv @ 96 NONAME
+ _ZN12QWebSettings19setIconDatabasePathERK7QString @ 97 NONAME
+ _ZN12QWebSettings19setLocalStoragePathERK7QString @ 98 NONAME
+ _ZN12QWebSettings20setUserStyleSheetUrlERK4QUrl @ 99 NONAME
+ _ZN12QWebSettings21setOfflineStoragePathERK7QString @ 100 NONAME
+ _ZN12QWebSettings22setDefaultTextEncodingERK7QString @ 101 NONAME
+ _ZN12QWebSettings22setMaximumPagesInCacheEi @ 102 NONAME
+ _ZN12QWebSettings23enablePersistentStorageERK7QString @ 103 NONAME
+ _ZN12QWebSettings24setObjectCacheCapacitiesEiii @ 104 NONAME
+ _ZN12QWebSettings26offlineStorageDefaultQuotaEv @ 105 NONAME
+ _ZN12QWebSettings29setOfflineStorageDefaultQuotaEx @ 106 NONAME
+ _ZN12QWebSettings30offlineWebApplicationCachePathEv @ 107 NONAME
+ _ZN12QWebSettings31offlineWebApplicationCacheQuotaEv @ 108 NONAME
+ _ZN12QWebSettings33setOfflineWebApplicationCachePathERK7QString @ 109 NONAME
+ _ZN12QWebSettings34setOfflineWebApplicationCacheQuotaEx @ 110 NONAME
+ _ZN12QWebSettingsC1EPN7WebCore8SettingsE @ 111 NONAME
+ _ZN12QWebSettingsC1Ev @ 112 NONAME
+ _ZN12QWebSettingsC2EPN7WebCore8SettingsE @ 113 NONAME
+ _ZN12QWebSettingsC2Ev @ 114 NONAME
+ _ZN12QWebSettingsD1Ev @ 115 NONAME
+ _ZN12QWebSettingsD2Ev @ 116 NONAME
+ _ZN13QWebInspector11qt_metacallEN11QMetaObject4CallEiPPv @ 117 NONAME
+ _ZN13QWebInspector11qt_metacastEPKc @ 118 NONAME
+ _ZN13QWebInspector11resizeEventEP12QResizeEvent @ 119 NONAME
+ _ZN13QWebInspector16staticMetaObjectE @ 120 NONAME DATA 16
+ _ZN13QWebInspector18windowTitleChangedERK7QString @ 121 NONAME ABSENT
+ _ZN13QWebInspector19getStaticMetaObjectEv @ 122 NONAME
+ _ZN13QWebInspector5eventEP6QEvent @ 123 NONAME
+ _ZN13QWebInspector7setPageEP8QWebPage @ 124 NONAME
+ _ZN13QWebInspector9hideEventEP10QHideEvent @ 125 NONAME
+ _ZN13QWebInspector9showEventEP10QShowEvent @ 126 NONAME
+ _ZN13QWebInspectorC1EP7QWidget @ 127 NONAME
+ _ZN13QWebInspectorC2EP7QWidget @ 128 NONAME
+ _ZN13QWebInspectorD0Ev @ 129 NONAME
+ _ZN13QWebInspectorD1Ev @ 130 NONAME
+ _ZN13QWebInspectorD2Ev @ 131 NONAME
+ _ZN14QWebPluginInfo10setEnabledEb @ 132 NONAME
+ _ZN14QWebPluginInfoC1EPN7WebCore13PluginPackageE @ 133 NONAME
+ _ZN14QWebPluginInfoC1ERKS_ @ 134 NONAME
+ _ZN14QWebPluginInfoC1Ev @ 135 NONAME
+ _ZN14QWebPluginInfoC2EPN7WebCore13PluginPackageE @ 136 NONAME
+ _ZN14QWebPluginInfoC2ERKS_ @ 137 NONAME
+ _ZN14QWebPluginInfoC2Ev @ 138 NONAME
+ _ZN14QWebPluginInfoD1Ev @ 139 NONAME
+ _ZN14QWebPluginInfoD2Ev @ 140 NONAME
+ _ZN14QWebPluginInfoaSERKS_ @ 141 NONAME
+ _ZN15QWebHistoryItem11setUserDataERK8QVariant @ 142 NONAME
+ _ZN15QWebHistoryItemC1EP22QWebHistoryItemPrivate @ 143 NONAME
+ _ZN15QWebHistoryItemC1ERKS_ @ 144 NONAME
+ _ZN15QWebHistoryItemC2EP22QWebHistoryItemPrivate @ 145 NONAME
+ _ZN15QWebHistoryItemC2ERKS_ @ 146 NONAME
+ _ZN15QWebHistoryItemD1Ev @ 147 NONAME
+ _ZN15QWebHistoryItemD2Ev @ 148 NONAME
+ _ZN15QWebHistoryItemaSERKS_ @ 149 NONAME
+ _ZN16QGraphicsWebView10loadFailedEv @ 150 NONAME ABSENT
+ _ZN16QGraphicsWebView10sceneEventEP6QEvent @ 151 NONAME
+ _ZN16QGraphicsWebView10setContentERK10QByteArrayRK7QStringRK4QUrl @ 152 NONAME
+ _ZN16QGraphicsWebView10urlChangedERK4QUrl @ 153 NONAME
+ _ZN16QGraphicsWebView10wheelEventEP24QGraphicsSceneWheelEvent @ 154 NONAME
+ _ZN16QGraphicsWebView11iconChangedEv @ 155 NONAME
+ _ZN16QGraphicsWebView11loadStartedEv @ 156 NONAME
+ _ZN16QGraphicsWebView11qt_metacallEN11QMetaObject4CallEiPPv @ 157 NONAME
+ _ZN16QGraphicsWebView11qt_metacastEPKc @ 158 NONAME
+ _ZN16QGraphicsWebView11setGeometryERK6QRectF @ 159 NONAME
+ _ZN16QGraphicsWebView12focusInEventEP11QFocusEvent @ 160 NONAME
+ _ZN16QGraphicsWebView12loadFinishedEv @ 161 NONAME ABSENT
+ _ZN16QGraphicsWebView12titleChangedERK7QString @ 162 NONAME
+ _ZN16QGraphicsWebView13dragMoveEventEP27QGraphicsSceneDragDropEvent @ 163 NONAME
+ _ZN16QGraphicsWebView13focusOutEventEP11QFocusEvent @ 164 NONAME
+ _ZN16QGraphicsWebView13keyPressEventEP9QKeyEvent @ 165 NONAME
+ _ZN16QGraphicsWebView13setZoomFactorEf @ 166 NONAME
+ _ZN16QGraphicsWebView13statusChangedEv @ 167 NONAME ABSENT
+ _ZN16QGraphicsWebView14dragEnterEventEP27QGraphicsSceneDragDropEvent @ 168 NONAME
+ _ZN16QGraphicsWebView14dragLeaveEventEP27QGraphicsSceneDragDropEvent @ 169 NONAME
+ _ZN16QGraphicsWebView14hoverMoveEventEP24QGraphicsSceneHoverEvent @ 170 NONAME
+ _ZN16QGraphicsWebView14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 171 NONAME
+ _ZN16QGraphicsWebView14setInteractiveEb @ 172 NONAME ABSENT
+ _ZN16QGraphicsWebView14updateGeometryEv @ 173 NONAME
+ _ZN16QGraphicsWebView15hoverLeaveEventEP24QGraphicsSceneHoverEvent @ 174 NONAME
+ _ZN16QGraphicsWebView15keyReleaseEventEP9QKeyEvent @ 175 NONAME
+ _ZN16QGraphicsWebView15mousePressEventEP24QGraphicsSceneMouseEvent @ 176 NONAME
+ _ZN16QGraphicsWebView15progressChangedEf @ 177 NONAME ABSENT
+ _ZN16QGraphicsWebView16contextMenuEventEP30QGraphicsSceneContextMenuEvent @ 178 NONAME
+ _ZN16QGraphicsWebView16inputMethodEventEP17QInputMethodEvent @ 179 NONAME
+ _ZN16QGraphicsWebView16staticMetaObjectE @ 180 NONAME DATA 16
+ _ZN16QGraphicsWebView17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 181 NONAME
+ _ZN16QGraphicsWebView17zoomFactorChangedEv @ 182 NONAME ABSENT
+ _ZN16QGraphicsWebView18focusNextPrevChildEb @ 183 NONAME
+ _ZN16QGraphicsWebView19getStaticMetaObjectEv @ 184 NONAME
+ _ZN16QGraphicsWebView20interactivityChangedEv @ 185 NONAME ABSENT
+ _ZN16QGraphicsWebView21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 186 NONAME
+ _ZN16QGraphicsWebView4backEv @ 187 NONAME
+ _ZN16QGraphicsWebView4loadERK15QNetworkRequestN21QNetworkAccessManager9OperationERK10QByteArray @ 188 NONAME
+ _ZN16QGraphicsWebView4loadERK4QUrl @ 189 NONAME
+ _ZN16QGraphicsWebView4stopEv @ 190 NONAME
+ _ZN16QGraphicsWebView5eventEP6QEvent @ 191 NONAME
+ _ZN16QGraphicsWebView5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 192 NONAME
+ _ZN16QGraphicsWebView6reloadEv @ 193 NONAME
+ _ZN16QGraphicsWebView6setUrlERK4QUrl @ 194 NONAME
+ _ZN16QGraphicsWebView7forwardEv @ 195 NONAME
+ _ZN16QGraphicsWebView7setHtmlERK7QStringRK4QUrl @ 196 NONAME
+ _ZN16QGraphicsWebView7setPageEP8QWebPage @ 197 NONAME
+ _ZN16QGraphicsWebView9dropEventEP27QGraphicsSceneDragDropEvent @ 198 NONAME
+ _ZN16QGraphicsWebViewC1EP13QGraphicsItem @ 199 NONAME
+ _ZN16QGraphicsWebViewC2EP13QGraphicsItem @ 200 NONAME
+ _ZN16QGraphicsWebViewD0Ev @ 201 NONAME
+ _ZN16QGraphicsWebViewD1Ev @ 202 NONAME
+ _ZN16QGraphicsWebViewD2Ev @ 203 NONAME
+ _ZN17QWebHitTestResultC1EP24QWebHitTestResultPrivate @ 204 NONAME
+ _ZN17QWebHitTestResultC1ERKS_ @ 205 NONAME
+ _ZN17QWebHitTestResultC1Ev @ 206 NONAME
+ _ZN17QWebHitTestResultC2EP24QWebHitTestResultPrivate @ 207 NONAME
+ _ZN17QWebHitTestResultC2ERKS_ @ 208 NONAME
+ _ZN17QWebHitTestResultC2Ev @ 209 NONAME
+ _ZN17QWebHitTestResultD1Ev @ 210 NONAME
+ _ZN17QWebHitTestResultD2Ev @ 211 NONAME
+ _ZN17QWebHitTestResultaSERKS_ @ 212 NONAME
+ _ZN17QWebPluginFactory11qt_metacallEN11QMetaObject4CallEiPPv @ 213 NONAME
+ _ZN17QWebPluginFactory11qt_metacastEPKc @ 214 NONAME
+ _ZN17QWebPluginFactory14refreshPluginsEv @ 215 NONAME
+ _ZN17QWebPluginFactory16staticMetaObjectE @ 216 NONAME DATA 16
+ _ZN17QWebPluginFactory19getStaticMetaObjectEv @ 217 NONAME
+ _ZN17QWebPluginFactory9extensionENS_9ExtensionEPKNS_15ExtensionOptionEPNS_15ExtensionReturnE @ 218 NONAME
+ _ZN17QWebPluginFactoryC2EP7QObject @ 219 NONAME
+ _ZN17QWebPluginFactoryD0Ev @ 220 NONAME
+ _ZN17QWebPluginFactoryD1Ev @ 221 NONAME
+ _ZN17QWebPluginFactoryD2Ev @ 222 NONAME
+ _ZN18QWebPluginDatabase11qt_metacallEN11QMetaObject4CallEiPPv @ 223 NONAME
+ _ZN18QWebPluginDatabase11qt_metacastEPKc @ 224 NONAME
+ _ZN18QWebPluginDatabase13addSearchPathERK7QString @ 225 NONAME
+ _ZN18QWebPluginDatabase14setSearchPathsERK11QStringList @ 226 NONAME
+ _ZN18QWebPluginDatabase16staticMetaObjectE @ 227 NONAME DATA 16
+ _ZN18QWebPluginDatabase17pluginForMimeTypeERK7QString @ 228 NONAME
+ _ZN18QWebPluginDatabase18defaultSearchPathsEv @ 229 NONAME
+ _ZN18QWebPluginDatabase19getStaticMetaObjectEv @ 230 NONAME
+ _ZN18QWebPluginDatabase29setPreferredPluginForMimeTypeERK7QStringRK14QWebPluginInfo @ 231 NONAME
+ _ZN18QWebPluginDatabase7refreshEv @ 232 NONAME
+ _ZN18QWebPluginDatabaseC1EP7QObject @ 233 NONAME
+ _ZN18QWebPluginDatabaseC2EP7QObject @ 234 NONAME
+ _ZN18QWebPluginDatabaseD0Ev @ 235 NONAME
+ _ZN18QWebPluginDatabaseD1Ev @ 236 NONAME
+ _ZN18QWebPluginDatabaseD2Ev @ 237 NONAME
+ _ZN18QWebSecurityOrigin10allOriginsEv @ 238 NONAME
+ _ZN18QWebSecurityOrigin12localSchemesEv @ 239 NONAME
+ _ZN18QWebSecurityOrigin14addLocalSchemeERK7QString @ 240 NONAME
+ _ZN18QWebSecurityOrigin16setDatabaseQuotaEx @ 241 NONAME
+ _ZN18QWebSecurityOrigin17removeLocalSchemeERK7QString @ 242 NONAME
+ _ZN18QWebSecurityOrigin25whiteListAccessFromOriginERK7QStringS2_S2_b @ 243 NONAME ABSENT
+ _ZN18QWebSecurityOrigin27resetOriginAccessWhiteListsEv @ 244 NONAME ABSENT
+ _ZN18QWebSecurityOriginC1EP25QWebSecurityOriginPrivate @ 245 NONAME
+ _ZN18QWebSecurityOriginC1ERKS_ @ 246 NONAME
+ _ZN18QWebSecurityOriginC2EP25QWebSecurityOriginPrivate @ 247 NONAME
+ _ZN18QWebSecurityOriginC2ERKS_ @ 248 NONAME
+ _ZN18QWebSecurityOriginD1Ev @ 249 NONAME
+ _ZN18QWebSecurityOriginD2Ev @ 250 NONAME
+ _ZN18QWebSecurityOriginaSERKS_ @ 251 NONAME
+ _ZN20QWebHistoryInterface11qt_metacallEN11QMetaObject4CallEiPPv @ 252 NONAME
+ _ZN20QWebHistoryInterface11qt_metacastEPKc @ 253 NONAME
+ _ZN20QWebHistoryInterface16defaultInterfaceEv @ 254 NONAME
+ _ZN20QWebHistoryInterface16staticMetaObjectE @ 255 NONAME DATA 16
+ _ZN20QWebHistoryInterface19getStaticMetaObjectEv @ 256 NONAME
+ _ZN20QWebHistoryInterface19setDefaultInterfaceEPS_ @ 257 NONAME
+ _ZN20QWebHistoryInterfaceC2EP7QObject @ 258 NONAME
+ _ZN20QWebHistoryInterfaceD0Ev @ 259 NONAME
+ _ZN20QWebHistoryInterfaceD1Ev @ 260 NONAME
+ _ZN20QWebHistoryInterfaceD2Ev @ 261 NONAME
+ _ZN8QWebPage10chooseFileEP9QWebFrameRK7QString @ 262 NONAME
+ _ZN8QWebPage10setPaletteERK8QPalette @ 263 NONAME
+ _ZN8QWebPage11linkClickedERK4QUrl @ 264 NONAME
+ _ZN8QWebPage11linkHoveredERK7QStringS2_S2_ @ 265 NONAME
+ _ZN8QWebPage11loadStartedEv @ 266 NONAME
+ _ZN8QWebPage11qt_metacallEN11QMetaObject4CallEiPPv @ 267 NONAME
+ _ZN8QWebPage11qt_metacastEPKc @ 268 NONAME
+ _ZN8QWebPage12createPluginERK7QStringRK4QUrlRK11QStringListS8_ @ 269 NONAME
+ _ZN8QWebPage12createWindowENS_13WebWindowTypeE @ 270 NONAME
+ _ZN8QWebPage12frameCreatedEP9QWebFrame @ 271 NONAME
+ _ZN8QWebPage12loadFinishedEb @ 272 NONAME
+ _ZN8QWebPage12loadProgressEi @ 273 NONAME
+ _ZN8QWebPage13triggerActionENS_9WebActionEb @ 274 NONAME
+ _ZN8QWebPage14printRequestedEP9QWebFrame @ 275 NONAME
+ _ZN8QWebPage15contentsChangedEv @ 276 NONAME
+ _ZN8QWebPage15javaScriptAlertEP9QWebFrameRK7QString @ 277 NONAME
+ _ZN8QWebPage15scrollRequestedEiiRK5QRect @ 278 NONAME
+ _ZN8QWebPage16javaScriptPromptEP9QWebFrameRK7QStringS4_PS2_ @ 279 NONAME
+ _ZN8QWebPage16repaintRequestedERK5QRect @ 280 NONAME
+ _ZN8QWebPage16selectionChangedEv @ 281 NONAME
+ _ZN8QWebPage16setPluginFactoryEP17QWebPluginFactory @ 282 NONAME
+ _ZN8QWebPage16staticMetaObjectE @ 283 NONAME DATA 16
+ _ZN8QWebPage16statusBarMessageERK7QString @ 284 NONAME
+ _ZN8QWebPage17downloadRequestedERK15QNetworkRequest @ 285 NONAME
+ _ZN8QWebPage17javaScriptConfirmEP9QWebFrameRK7QString @ 286 NONAME
+ _ZN8QWebPage17microFocusChangedEv @ 287 NONAME
+ _ZN8QWebPage18focusNextPrevChildEb @ 288 NONAME
+ _ZN8QWebPage18setContentEditableEb @ 289 NONAME
+ _ZN8QWebPage18unsupportedContentEP13QNetworkReply @ 290 NONAME
+ _ZN8QWebPage19getStaticMetaObjectEv @ 291 NONAME
+ _ZN8QWebPage20windowCloseRequestedEv @ 292 NONAME
+ _ZN8QWebPage21databaseQuotaExceededEP9QWebFrame7QString @ 293 NONAME
+ _ZN8QWebPage21webInspectorTriggeredERK11QWebElement @ 294 NONAME ABSENT
+ _ZN8QWebPage23acceptNavigationRequestEP9QWebFrameRK15QNetworkRequestNS_14NavigationTypeE @ 295 NONAME
+ _ZN8QWebPage23geometryChangeRequestedERK5QRect @ 296 NONAME
+ _ZN8QWebPage23saveFrameStateRequestedEP9QWebFrameP15QWebHistoryItem @ 297 NONAME
+ _ZN8QWebPage23setLinkDelegationPolicyENS_20LinkDelegationPolicyE @ 298 NONAME
+ _ZN8QWebPage23setNetworkAccessManagerEP21QNetworkAccessManager @ 299 NONAME
+ _ZN8QWebPage23swallowContextMenuEventEP17QContextMenuEvent @ 300 NONAME
+ _ZN8QWebPage24javaScriptConsoleMessageERK7QStringiS2_ @ 301 NONAME
+ _ZN8QWebPage25createStandardContextMenuEv @ 302 NONAME
+ _ZN8QWebPage25shouldInterruptJavaScriptEv @ 303 NONAME
+ _ZN8QWebPage26restoreFrameStateRequestedEP9QWebFrame @ 304 NONAME
+ _ZN8QWebPage28setForwardUnsupportedContentEb @ 305 NONAME
+ _ZN8QWebPage30updatePositionDependentActionsERK6QPoint @ 306 NONAME
+ _ZN8QWebPage32menuBarVisibilityChangeRequestedEb @ 307 NONAME
+ _ZN8QWebPage32toolBarVisibilityChangeRequestedEb @ 308 NONAME
+ _ZN8QWebPage34statusBarVisibilityChangeRequestedEb @ 309 NONAME
+ _ZN8QWebPage5eventEP6QEvent @ 310 NONAME
+ _ZN8QWebPage7setViewEP7QWidget @ 311 NONAME
+ _ZN8QWebPage8findTextERK7QString6QFlagsINS_8FindFlagEE @ 312 NONAME
+ _ZN8QWebPage9extensionENS_9ExtensionEPKNS_15ExtensionOptionEPNS_15ExtensionReturnE @ 313 NONAME
+ _ZN8QWebPageC1EP7QObject @ 314 NONAME
+ _ZN8QWebPageC2EP7QObject @ 315 NONAME
+ _ZN8QWebPageD0Ev @ 316 NONAME
+ _ZN8QWebPageD1Ev @ 317 NONAME
+ _ZN8QWebPageD2Ev @ 318 NONAME
+ _ZN8QWebView10paintEventEP11QPaintEvent @ 319 NONAME
+ _ZN8QWebView10setContentERK10QByteArrayRK7QStringRK4QUrl @ 320 NONAME
+ _ZN8QWebView10urlChangedERK4QUrl @ 321 NONAME
+ _ZN8QWebView10wheelEventEP11QWheelEvent @ 322 NONAME
+ _ZN8QWebView11changeEventEP6QEvent @ 323 NONAME
+ _ZN8QWebView11iconChangedEv @ 324 NONAME
+ _ZN8QWebView11linkClickedERK4QUrl @ 325 NONAME
+ _ZN8QWebView11loadStartedEv @ 326 NONAME
+ _ZN8QWebView11qt_metacallEN11QMetaObject4CallEiPPv @ 327 NONAME
+ _ZN8QWebView11qt_metacastEPKc @ 328 NONAME
+ _ZN8QWebView11resizeEventEP12QResizeEvent @ 329 NONAME
+ _ZN8QWebView12createWindowEN8QWebPage13WebWindowTypeE @ 330 NONAME
+ _ZN8QWebView12focusInEventEP11QFocusEvent @ 331 NONAME
+ _ZN8QWebView12loadFinishedEb @ 332 NONAME
+ _ZN8QWebView12loadProgressEi @ 333 NONAME
+ _ZN8QWebView12titleChangedERK7QString @ 334 NONAME
+ _ZN8QWebView13dragMoveEventEP14QDragMoveEvent @ 335 NONAME
+ _ZN8QWebView13focusOutEventEP11QFocusEvent @ 336 NONAME
+ _ZN8QWebView13keyPressEventEP9QKeyEvent @ 337 NONAME
+ _ZN8QWebView13setRenderHintEN8QPainter10RenderHintEb @ 338 NONAME
+ _ZN8QWebView13setZoomFactorEf @ 339 NONAME
+ _ZN8QWebView14dragEnterEventEP15QDragEnterEvent @ 340 NONAME
+ _ZN8QWebView14dragLeaveEventEP15QDragLeaveEvent @ 341 NONAME
+ _ZN8QWebView14mouseMoveEventEP11QMouseEvent @ 342 NONAME
+ _ZN8QWebView14setRenderHintsE6QFlagsIN8QPainter10RenderHintEE @ 343 NONAME
+ _ZN8QWebView15keyReleaseEventEP9QKeyEvent @ 344 NONAME
+ _ZN8QWebView15mousePressEventEP11QMouseEvent @ 345 NONAME
+ _ZN8QWebView16contextMenuEventEP17QContextMenuEvent @ 346 NONAME
+ _ZN8QWebView16inputMethodEventEP17QInputMethodEvent @ 347 NONAME
+ _ZN8QWebView16selectionChangedEv @ 348 NONAME
+ _ZN8QWebView16staticMetaObjectE @ 349 NONAME DATA 16
+ _ZN8QWebView16statusBarMessageERK7QString @ 350 NONAME
+ _ZN8QWebView17mouseReleaseEventEP11QMouseEvent @ 351 NONAME
+ _ZN8QWebView17triggerPageActionEN8QWebPage9WebActionEb @ 352 NONAME
+ _ZN8QWebView18focusNextPrevChildEb @ 353 NONAME
+ _ZN8QWebView18guessUrlFromStringERK7QString @ 354 NONAME ABSENT
+ _ZN8QWebView19getStaticMetaObjectEv @ 355 NONAME
+ _ZN8QWebView21mouseDoubleClickEventEP11QMouseEvent @ 356 NONAME
+ _ZN8QWebView21setTextSizeMultiplierEf @ 357 NONAME
+ _ZN8QWebView4backEv @ 358 NONAME
+ _ZN8QWebView4loadERK15QNetworkRequestN21QNetworkAccessManager9OperationERK10QByteArray @ 359 NONAME
+ _ZN8QWebView4loadERK4QUrl @ 360 NONAME
+ _ZN8QWebView4stopEv @ 361 NONAME
+ _ZN8QWebView5eventEP6QEvent @ 362 NONAME
+ _ZN8QWebView6reloadEv @ 363 NONAME
+ _ZN8QWebView6setUrlERK4QUrl @ 364 NONAME
+ _ZN8QWebView7forwardEv @ 365 NONAME
+ _ZN8QWebView7setHtmlERK7QStringRK4QUrl @ 366 NONAME
+ _ZN8QWebView7setPageEP8QWebPage @ 367 NONAME
+ _ZN8QWebView8findTextERK7QString6QFlagsIN8QWebPage8FindFlagEE @ 368 NONAME
+ _ZN8QWebView9dropEventEP10QDropEvent @ 369 NONAME
+ _ZN8QWebViewC1EP7QWidget @ 370 NONAME
+ _ZN8QWebViewC2EP7QWidget @ 371 NONAME
+ _ZN8QWebViewD0Ev @ 372 NONAME
+ _ZN8QWebViewD1Ev @ 373 NONAME
+ _ZN8QWebViewD2Ev @ 374 NONAME
+ _ZN9QWebFrame10setContentERK10QByteArrayRK7QStringRK4QUrl @ 375 NONAME
+ _ZN9QWebFrame10urlChangedERK4QUrl @ 376 NONAME
+ _ZN9QWebFrame11iconChangedEv @ 377 NONAME
+ _ZN9QWebFrame11loadStartedEv @ 378 NONAME
+ _ZN9QWebFrame11qt_metacallEN11QMetaObject4CallEiPPv @ 379 NONAME
+ _ZN9QWebFrame11qt_metacastEPKc @ 380 NONAME
+ _ZN9QWebFrame12loadFinishedEb @ 381 NONAME
+ _ZN9QWebFrame12titleChangedERK7QString @ 382 NONAME
+ _ZN9QWebFrame13setZoomFactorEf @ 383 NONAME
+ _ZN9QWebFrame15provisionalLoadEv @ 384 NONAME
+ _ZN9QWebFrame16staticMetaObjectE @ 385 NONAME DATA 16
+ _ZN9QWebFrame17setScrollBarValueEN2Qt11OrientationEi @ 386 NONAME
+ _ZN9QWebFrame17setScrollPositionERK6QPoint @ 387 NONAME
+ _ZN9QWebFrame18evaluateJavaScriptERK7QString @ 388 NONAME
+ _ZN9QWebFrame18setScrollBarPolicyEN2Qt11OrientationENS0_15ScrollBarPolicyE @ 389 NONAME
+ _ZN9QWebFrame19contentsSizeChangedERK5QSize @ 390 NONAME
+ _ZN9QWebFrame19getStaticMetaObjectEv @ 391 NONAME
+ _ZN9QWebFrame21setTextSizeMultiplierEf @ 392 NONAME
+ _ZN9QWebFrame22initialLayoutCompletedEv @ 393 NONAME
+ _ZN9QWebFrame23setClipRenderToViewportEb @ 394 NONAME ABSENT
+ _ZN9QWebFrame27addToJavaScriptWindowObjectERK7QStringP7QObject @ 395 NONAME
+ _ZN9QWebFrame27addToJavaScriptWindowObjectERK7QStringP7QObjectN13QScriptEngine14ValueOwnershipE @ 396 NONAME
+ _ZN9QWebFrame29javaScriptWindowObjectClearedEv @ 397 NONAME
+ _ZN9QWebFrame4loadERK15QNetworkRequestN21QNetworkAccessManager9OperationERK10QByteArray @ 398 NONAME
+ _ZN9QWebFrame4loadERK4QUrl @ 399 NONAME
+ _ZN9QWebFrame5eventEP6QEvent @ 400 NONAME
+ _ZN9QWebFrame6renderEP8QPainter @ 401 NONAME
+ _ZN9QWebFrame6renderEP8QPainterRK7QRegion @ 402 NONAME
+ _ZN9QWebFrame6scrollEii @ 403 NONAME
+ _ZN9QWebFrame6setUrlERK4QUrl @ 404 NONAME
+ _ZN9QWebFrame7setHtmlERK7QStringRK4QUrl @ 405 NONAME
+ _ZN9QWebFrame8setFocusEv @ 406 NONAME
+ _ZN9QWebFrameC1EP8QWebPageP13QWebFrameData @ 407 NONAME
+ _ZN9QWebFrameC1EPS_P13QWebFrameData @ 408 NONAME
+ _ZN9QWebFrameC2EP8QWebPageP13QWebFrameData @ 409 NONAME
+ _ZN9QWebFrameC2EPS_P13QWebFrameData @ 410 NONAME
+ _ZN9QWebFrameD0Ev @ 411 NONAME
+ _ZN9QWebFrameD1Ev @ 412 NONAME
+ _ZN9QWebFrameD2Ev @ 413 NONAME
+ _ZNK11QWebElement10firstChildEv @ 414 NONAME
+ _ZNK11QWebElement10toInnerXmlEv @ 415 NONAME
+ _ZNK11QWebElement10toOuterXmlEv @ 416 NONAME
+ _ZNK11QWebElement11attributeNSERK7QStringS2_S2_ @ 417 NONAME
+ _ZNK11QWebElement11nextSiblingEv @ 418 NONAME
+ _ZNK11QWebElement11toPlainTextEv @ 419 NONAME
+ _ZNK11QWebElement12hasAttributeERK7QString @ 420 NONAME
+ _ZNK11QWebElement12namespaceUriEv @ 421 NONAME
+ _ZNK11QWebElement13hasAttributesEv @ 422 NONAME
+ _ZNK11QWebElement13stylePropertyERK7QStringNS_20StyleResolveStrategyE @ 423 NONAME
+ _ZNK11QWebElement14hasAttributeNSERK7QStringS2_ @ 424 NONAME
+ _ZNK11QWebElement15previousSiblingEv @ 425 NONAME
+ _ZNK11QWebElement5cloneEv @ 426 NONAME
+ _ZNK11QWebElement6isNullEv @ 427 NONAME
+ _ZNK11QWebElement6parentEv @ 428 NONAME
+ _ZNK11QWebElement6prefixEv @ 429 NONAME
+ _ZNK11QWebElement7classesEv @ 430 NONAME
+ _ZNK11QWebElement7findAllERK7QString @ 431 NONAME
+ _ZNK11QWebElement7tagNameEv @ 432 NONAME
+ _ZNK11QWebElement8documentEv @ 433 NONAME
+ _ZNK11QWebElement8geometryEv @ 434 NONAME
+ _ZNK11QWebElement8hasClassERK7QString @ 435 NONAME
+ _ZNK11QWebElement8hasFocusEv @ 436 NONAME
+ _ZNK11QWebElement8webFrameEv @ 437 NONAME
+ _ZNK11QWebElement9attributeERK7QStringS2_ @ 438 NONAME
+ _ZNK11QWebElement9findFirstERK7QString @ 439 NONAME
+ _ZNK11QWebElement9lastChildEv @ 440 NONAME
+ _ZNK11QWebElement9localNameEv @ 441 NONAME
+ _ZNK11QWebElementeqERKS_ @ 442 NONAME
+ _ZNK11QWebElementneERKS_ @ 443 NONAME
+ _ZNK11QWebHistory11currentItemEv @ 444 NONAME
+ _ZNK11QWebHistory11forwardItemEv @ 445 NONAME
+ _ZNK11QWebHistory12canGoForwardEv @ 446 NONAME
+ _ZNK11QWebHistory12forwardItemsEi @ 447 NONAME
+ _ZNK11QWebHistory16currentItemIndexEv @ 448 NONAME
+ _ZNK11QWebHistory16maximumItemCountEv @ 449 NONAME
+ _ZNK11QWebHistory5countEv @ 450 NONAME
+ _ZNK11QWebHistory5itemsEv @ 451 NONAME
+ _ZNK11QWebHistory6itemAtEi @ 452 NONAME
+ _ZNK11QWebHistory8backItemEv @ 453 NONAME
+ _ZNK11QWebHistory9backItemsEi @ 454 NONAME
+ _ZNK11QWebHistory9canGoBackEv @ 455 NONAME
+ _ZNK11QWebHistory9saveStateENS_19HistoryStateVersionE @ 456 NONAME ABSENT
+ _ZNK12QWebDatabase11displayNameEv @ 457 NONAME
+ _ZNK12QWebDatabase12expectedSizeEv @ 458 NONAME
+ _ZNK12QWebDatabase4nameEv @ 459 NONAME
+ _ZNK12QWebDatabase4sizeEv @ 460 NONAME
+ _ZNK12QWebDatabase6originEv @ 461 NONAME
+ _ZNK12QWebDatabase8fileNameEv @ 462 NONAME
+ _ZNK12QWebSettings10fontFamilyENS_10FontFamilyE @ 463 NONAME
+ _ZNK12QWebSettings13testAttributeENS_12WebAttributeE @ 464 NONAME
+ _ZNK12QWebSettings16localStoragePathEv @ 465 NONAME
+ _ZNK12QWebSettings17userStyleSheetUrlEv @ 466 NONAME
+ _ZNK12QWebSettings19defaultTextEncodingEv @ 467 NONAME
+ _ZNK12QWebSettings8fontSizeENS_8FontSizeE @ 468 NONAME
+ _ZNK13QWebInspector10metaObjectEv @ 469 NONAME
+ _ZNK13QWebInspector4pageEv @ 470 NONAME
+ _ZNK13QWebInspector8sizeHintEv @ 471 NONAME
+ _ZNK14QWebPluginInfo11descriptionEv @ 472 NONAME
+ _ZNK14QWebPluginInfo16supportsMimeTypeERK7QString @ 473 NONAME
+ _ZNK14QWebPluginInfo4nameEv @ 474 NONAME
+ _ZNK14QWebPluginInfo4pathEv @ 475 NONAME
+ _ZNK14QWebPluginInfo6isNullEv @ 476 NONAME
+ _ZNK14QWebPluginInfo9isEnabledEv @ 477 NONAME
+ _ZNK14QWebPluginInfo9mimeTypesEv @ 478 NONAME
+ _ZNK14QWebPluginInfoeqERKS_ @ 479 NONAME
+ _ZNK14QWebPluginInfoneERKS_ @ 480 NONAME
+ _ZNK15QWebHistoryItem11lastVisitedEv @ 481 NONAME
+ _ZNK15QWebHistoryItem11originalUrlEv @ 482 NONAME
+ _ZNK15QWebHistoryItem3urlEv @ 483 NONAME
+ _ZNK15QWebHistoryItem4iconEv @ 484 NONAME
+ _ZNK15QWebHistoryItem5titleEv @ 485 NONAME
+ _ZNK15QWebHistoryItem7isValidEv @ 486 NONAME
+ _ZNK15QWebHistoryItem8userDataEv @ 487 NONAME
+ _ZNK16QGraphicsWebView10metaObjectEv @ 488 NONAME
+ _ZNK16QGraphicsWebView10zoomFactorEv @ 489 NONAME
+ _ZNK16QGraphicsWebView13isInteractiveEv @ 490 NONAME ABSENT
+ _ZNK16QGraphicsWebView3urlEv @ 491 NONAME
+ _ZNK16QGraphicsWebView4iconEv @ 492 NONAME
+ _ZNK16QGraphicsWebView4pageEv @ 493 NONAME
+ _ZNK16QGraphicsWebView5titleEv @ 494 NONAME
+ _ZNK16QGraphicsWebView6statusEv @ 495 NONAME ABSENT
+ _ZNK16QGraphicsWebView6toHtmlEv @ 496 NONAME ABSENT
+ _ZNK16QGraphicsWebView7historyEv @ 497 NONAME
+ _ZNK16QGraphicsWebView8progressEv @ 498 NONAME ABSENT
+ _ZNK16QGraphicsWebView8settingsEv @ 499 NONAME
+ _ZNK17QWebHitTestResult11linkElementEv @ 500 NONAME
+ _ZNK17QWebHitTestResult12boundingRectEv @ 501 NONAME
+ _ZNK17QWebHitTestResult13alternateTextEv @ 502 NONAME
+ _ZNK17QWebHitTestResult15linkTargetFrameEv @ 503 NONAME
+ _ZNK17QWebHitTestResult17isContentEditableEv @ 504 NONAME
+ _ZNK17QWebHitTestResult17isContentSelectedEv @ 505 NONAME
+ _ZNK17QWebHitTestResult21enclosingBlockElementEv @ 506 NONAME
+ _ZNK17QWebHitTestResult3posEv @ 507 NONAME
+ _ZNK17QWebHitTestResult5frameEv @ 508 NONAME
+ _ZNK17QWebHitTestResult5titleEv @ 509 NONAME
+ _ZNK17QWebHitTestResult6isNullEv @ 510 NONAME
+ _ZNK17QWebHitTestResult6pixmapEv @ 511 NONAME
+ _ZNK17QWebHitTestResult7elementEv @ 512 NONAME
+ _ZNK17QWebHitTestResult7linkUrlEv @ 513 NONAME
+ _ZNK17QWebHitTestResult8imageUrlEv @ 514 NONAME
+ _ZNK17QWebHitTestResult8linkTextEv @ 515 NONAME
+ _ZNK17QWebHitTestResult9linkTitleEv @ 516 NONAME
+ _ZNK17QWebPluginFactory10metaObjectEv @ 517 NONAME
+ _ZNK17QWebPluginFactory17supportsExtensionENS_9ExtensionE @ 518 NONAME
+ _ZNK17QWebPluginFactory8MimeTypeeqERKS0_ @ 519 NONAME
+ _ZNK18QWebPluginDatabase10metaObjectEv @ 520 NONAME
+ _ZNK18QWebPluginDatabase11searchPathsEv @ 521 NONAME
+ _ZNK18QWebPluginDatabase7pluginsEv @ 522 NONAME
+ _ZNK18QWebSecurityOrigin13databaseQuotaEv @ 523 NONAME
+ _ZNK18QWebSecurityOrigin13databaseUsageEv @ 524 NONAME
+ _ZNK18QWebSecurityOrigin4hostEv @ 525 NONAME
+ _ZNK18QWebSecurityOrigin4portEv @ 526 NONAME
+ _ZNK18QWebSecurityOrigin6schemeEv @ 527 NONAME
+ _ZNK18QWebSecurityOrigin9databasesEv @ 528 NONAME
+ _ZNK20QWebHistoryInterface10metaObjectEv @ 529 NONAME
+ _ZNK8QWebPage10isModifiedEv @ 530 NONAME
+ _ZNK8QWebPage10metaObjectEv @ 531 NONAME
+ _ZNK8QWebPage10totalBytesEv @ 532 NONAME
+ _ZNK8QWebPage12currentFrameEv @ 533 NONAME
+ _ZNK8QWebPage12selectedTextEv @ 534 NONAME
+ _ZNK8QWebPage12viewportSizeEv @ 535 NONAME
+ _ZNK8QWebPage13bytesReceivedEv @ 536 NONAME
+ _ZNK8QWebPage13pluginFactoryEv @ 537 NONAME
+ _ZNK8QWebPage15setViewportSizeERK5QSize @ 538 NONAME
+ _ZNK8QWebPage15userAgentForUrlERK4QUrl @ 539 NONAME
+ _ZNK8QWebPage16inputMethodQueryEN2Qt16InputMethodQueryE @ 540 NONAME
+ _ZNK8QWebPage17fixedContentsSizeEv @ 541 NONAME ABSENT
+ _ZNK8QWebPage17isContentEditableEv @ 542 NONAME
+ _ZNK8QWebPage17supportsExtensionENS_9ExtensionE @ 543 NONAME
+ _ZNK8QWebPage20linkDelegationPolicyEv @ 544 NONAME
+ _ZNK8QWebPage20networkAccessManagerEv @ 545 NONAME
+ _ZNK8QWebPage20setFixedContentsSizeERK5QSize @ 546 NONAME ABSENT
+ _ZNK8QWebPage25forwardUnsupportedContentEv @ 547 NONAME
+ _ZNK8QWebPage4viewEv @ 548 NONAME
+ _ZNK8QWebPage6actionENS_9WebActionE @ 549 NONAME
+ _ZNK8QWebPage7frameAtERK6QPoint @ 550 NONAME
+ _ZNK8QWebPage7historyEv @ 551 NONAME
+ _ZNK8QWebPage7paletteEv @ 552 NONAME
+ _ZNK8QWebPage8settingsEv @ 553 NONAME
+ _ZNK8QWebPage9mainFrameEv @ 554 NONAME
+ _ZNK8QWebPage9undoStackEv @ 555 NONAME
+ _ZNK8QWebView10isModifiedEv @ 556 NONAME
+ _ZNK8QWebView10metaObjectEv @ 557 NONAME
+ _ZNK8QWebView10pageActionEN8QWebPage9WebActionE @ 558 NONAME
+ _ZNK8QWebView10zoomFactorEv @ 559 NONAME
+ _ZNK8QWebView11renderHintsEv @ 560 NONAME
+ _ZNK8QWebView12selectedTextEv @ 561 NONAME
+ _ZNK8QWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 562 NONAME
+ _ZNK8QWebView18textSizeMultiplierEv @ 563 NONAME
+ _ZNK8QWebView3urlEv @ 564 NONAME
+ _ZNK8QWebView4iconEv @ 565 NONAME
+ _ZNK8QWebView4pageEv @ 566 NONAME
+ _ZNK8QWebView5printEP8QPrinter @ 567 NONAME
+ _ZNK8QWebView5titleEv @ 568 NONAME
+ _ZNK8QWebView7historyEv @ 569 NONAME
+ _ZNK8QWebView8settingsEv @ 570 NONAME
+ _ZNK8QWebView8sizeHintEv @ 571 NONAME
+ _ZNK9QWebFrame10metaObjectEv @ 572 NONAME
+ _ZNK9QWebFrame10zoomFactorEv @ 573 NONAME
+ _ZNK9QWebFrame11childFramesEv @ 574 NONAME
+ _ZNK9QWebFrame11parentFrameEv @ 575 NONAME
+ _ZNK9QWebFrame11toPlainTextEv @ 576 NONAME
+ _ZNK9QWebFrame12contentsSizeEv @ 577 NONAME
+ _ZNK9QWebFrame12requestedUrlEv @ 578 NONAME
+ _ZNK9QWebFrame14hitTestContentERK6QPoint @ 579 NONAME
+ _ZNK9QWebFrame14renderTreeDumpEv @ 580 NONAME
+ _ZNK9QWebFrame14scrollBarValueEN2Qt11OrientationE @ 581 NONAME
+ _ZNK9QWebFrame14scrollPositionEv @ 582 NONAME
+ _ZNK9QWebFrame14securityOriginEv @ 583 NONAME
+ _ZNK9QWebFrame15documentElementEv @ 584 NONAME
+ _ZNK9QWebFrame15findAllElementsERK7QString @ 585 NONAME
+ _ZNK9QWebFrame15scrollBarPolicyEN2Qt11OrientationE @ 586 NONAME
+ _ZNK9QWebFrame16findFirstElementERK7QString @ 587 NONAME
+ _ZNK9QWebFrame16scrollBarMaximumEN2Qt11OrientationE @ 588 NONAME
+ _ZNK9QWebFrame16scrollBarMinimumEN2Qt11OrientationE @ 589 NONAME
+ _ZNK9QWebFrame17scrollBarGeometryEN2Qt11OrientationE @ 590 NONAME
+ _ZNK9QWebFrame18textSizeMultiplierEv @ 591 NONAME
+ _ZNK9QWebFrame20clipRenderToViewportEv @ 592 NONAME ABSENT
+ _ZNK9QWebFrame3posEv @ 593 NONAME
+ _ZNK9QWebFrame3urlEv @ 594 NONAME
+ _ZNK9QWebFrame4iconEv @ 595 NONAME
+ _ZNK9QWebFrame4pageEv @ 596 NONAME
+ _ZNK9QWebFrame5titleEv @ 597 NONAME
+ _ZNK9QWebFrame6toHtmlEv @ 598 NONAME
+ _ZNK9QWebFrame7baseUrlEv @ 599 NONAME
+ _ZNK9QWebFrame8geometryEv @ 600 NONAME
+ _ZNK9QWebFrame8hasFocusEv @ 601 NONAME
+ _ZNK9QWebFrame8metaDataEv @ 602 NONAME
+ _ZNK9QWebFrame9frameNameEv @ 603 NONAME
+ _ZTI13QWebInspector @ 604 NONAME
+ _ZTI16QGraphicsWebView @ 605 NONAME
+ _ZTI17QWebPluginFactory @ 606 NONAME
+ _ZTI18QWebPluginDatabase @ 607 NONAME
+ _ZTI20QWebHistoryInterface @ 608 NONAME
+ _ZTI8QWebPage @ 609 NONAME
+ _ZTI8QWebView @ 610 NONAME
+ _ZTI9QWebFrame @ 611 NONAME
+ _ZTV13QWebInspector @ 612 NONAME
+ _ZTV16QGraphicsWebView @ 613 NONAME
+ _ZTV17QWebPluginFactory @ 614 NONAME
+ _ZTV18QWebPluginDatabase @ 615 NONAME
+ _ZTV20QWebHistoryInterface @ 616 NONAME
+ _ZTV8QWebPage @ 617 NONAME
+ _ZTV8QWebView @ 618 NONAME
+ _ZTV9QWebFrame @ 619 NONAME
+ _ZThn16_N16QGraphicsWebView11setGeometryERK6QRectF @ 620 NONAME
+ _ZThn16_N16QGraphicsWebView14updateGeometryEv @ 621 NONAME
+ _ZThn16_N16QGraphicsWebViewD0Ev @ 622 NONAME
+ _ZThn16_N16QGraphicsWebViewD1Ev @ 623 NONAME
+ _ZThn8_N13QWebInspectorD0Ev @ 624 NONAME
+ _ZThn8_N13QWebInspectorD1Ev @ 625 NONAME
+ _ZThn8_N16QGraphicsWebView10sceneEventEP6QEvent @ 626 NONAME
+ _ZThn8_N16QGraphicsWebView10wheelEventEP24QGraphicsSceneWheelEvent @ 627 NONAME
+ _ZThn8_N16QGraphicsWebView12focusInEventEP11QFocusEvent @ 628 NONAME
+ _ZThn8_N16QGraphicsWebView13dragMoveEventEP27QGraphicsSceneDragDropEvent @ 629 NONAME
+ _ZThn8_N16QGraphicsWebView13focusOutEventEP11QFocusEvent @ 630 NONAME
+ _ZThn8_N16QGraphicsWebView13keyPressEventEP9QKeyEvent @ 631 NONAME
+ _ZThn8_N16QGraphicsWebView14dragEnterEventEP27QGraphicsSceneDragDropEvent @ 632 NONAME
+ _ZThn8_N16QGraphicsWebView14dragLeaveEventEP27QGraphicsSceneDragDropEvent @ 633 NONAME
+ _ZThn8_N16QGraphicsWebView14hoverMoveEventEP24QGraphicsSceneHoverEvent @ 634 NONAME
+ _ZThn8_N16QGraphicsWebView14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 635 NONAME
+ _ZThn8_N16QGraphicsWebView15hoverLeaveEventEP24QGraphicsSceneHoverEvent @ 636 NONAME
+ _ZThn8_N16QGraphicsWebView15keyReleaseEventEP9QKeyEvent @ 637 NONAME
+ _ZThn8_N16QGraphicsWebView15mousePressEventEP24QGraphicsSceneMouseEvent @ 638 NONAME
+ _ZThn8_N16QGraphicsWebView16contextMenuEventEP30QGraphicsSceneContextMenuEvent @ 639 NONAME
+ _ZThn8_N16QGraphicsWebView16inputMethodEventEP17QInputMethodEvent @ 640 NONAME
+ _ZThn8_N16QGraphicsWebView17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 641 NONAME
+ _ZThn8_N16QGraphicsWebView21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 642 NONAME
+ _ZThn8_N16QGraphicsWebView5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 643 NONAME
+ _ZThn8_N16QGraphicsWebView9dropEventEP27QGraphicsSceneDragDropEvent @ 644 NONAME
+ _ZThn8_N16QGraphicsWebViewD0Ev @ 645 NONAME
+ _ZThn8_N16QGraphicsWebViewD1Ev @ 646 NONAME
+ _ZThn8_N8QWebViewD0Ev @ 647 NONAME
+ _ZThn8_N8QWebViewD1Ev @ 648 NONAME
+ _ZlsR11QDataStreamRK11QWebHistory @ 649 NONAME
+ _ZrsR11QDataStreamR11QWebHistory @ 650 NONAME
+ _Z32qt_drt_whiteListAccessFromOriginRK7QStringS1_S1_b @ 651 NONAME
+ _Z33qt_drt_counterValueForElementByIdP9QWebFrameRK7QString @ 652 NONAME
+ _Z34qt_drt_resetOriginAccessWhiteListsv @ 653 NONAME
+ _ZN11QWebElement17removeAllChildrenEv @ 654 NONAME
+ _ZN11QWebElement6renderEP8QPainter @ 655 NONAME
+ _ZN12QWebSettings30setPrintingMaximumShrinkFactorEf @ 656 NONAME ABSENT
+ _ZN12QWebSettings30setPrintingMinimumShrinkFactorEf @ 657 NONAME ABSENT
+ _ZN16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 658 NONAME
+ _ZN16QGraphicsWebView11linkClickedERK4QUrl @ 659 NONAME
+ _ZN16QGraphicsWebView12loadFinishedEb @ 660 NONAME
+ _ZN16QGraphicsWebView12loadProgressEi @ 661 NONAME
+ _ZN16QGraphicsWebView16statusBarMessageERK7QString @ 662 NONAME
+ _ZN16QGraphicsWebView17triggerPageActionEN8QWebPage9WebActionEb @ 663 NONAME
+ _ZN16QGraphicsWebView8findTextERK7QString6QFlagsIN8QWebPage8FindFlagEE @ 664 NONAME
+ _ZN21QWebElementCollection6appendERKS_ @ 665 NONAME
+ _ZN21QWebElementCollectionC1ERK11QWebElementRK7QString @ 666 NONAME
+ _ZN21QWebElementCollectionC1ERKS_ @ 667 NONAME
+ _ZN21QWebElementCollectionC1Ev @ 668 NONAME
+ _ZN21QWebElementCollectionC2ERK11QWebElementRK7QString @ 669 NONAME
+ _ZN21QWebElementCollectionC2ERKS_ @ 670 NONAME
+ _ZN21QWebElementCollectionC2Ev @ 671 NONAME
+ _ZN21QWebElementCollectionD1Ev @ 672 NONAME
+ _ZN21QWebElementCollectionD2Ev @ 673 NONAME
+ _ZN21QWebElementCollectionaSERKS_ @ 674 NONAME
+ _ZN9QWebFrame6renderEP8QPainterNS_11RenderLayerERK7QRegion @ 675 NONAME
+ _ZNK12QWebSettings27printingMaximumShrinkFactorEv @ 676 NONAME ABSENT
+ _ZNK12QWebSettings27printingMinimumShrinkFactorEv @ 677 NONAME ABSENT
+ _ZNK16QGraphicsWebView10isModifiedEv @ 678 NONAME
+ _ZNK16QGraphicsWebView10pageActionEN8QWebPage9WebActionE @ 679 NONAME
+ _ZNK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 680 NONAME
+ _ZNK16QGraphicsWebView8sizeHintEN2Qt8SizeHintERK6QSizeF @ 681 NONAME
+ _ZNK21QWebElementCollection2atEi @ 682 NONAME
+ _ZNK21QWebElementCollection5countEv @ 683 NONAME
+ _ZNK21QWebElementCollection6toListEv @ 684 NONAME
+ _ZNK21QWebElementCollectionplERKS_ @ 685 NONAME
+ _ZNK8QWebPage21preferredContentsSizeEv @ 686 NONAME
+ _ZNK8QWebPage24setPreferredContentsSizeERK5QSize @ 687 NONAME
+ _ZThn16_NK16QGraphicsWebView8sizeHintEN2Qt8SizeHintERK6QSizeF @ 688 NONAME
+ _ZThn8_N16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 689 NONAME
+ _ZThn8_NK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 690 NONAME
+ _ZNK11QWebElement14attributeNamesERK7QString @ 691 NONAME
+ _Z23qt_networkAccessAllowedb @ 692 NONAME
+ _Z25qt_resumeActiveDOMObjectsP9QWebFrame @ 693 NONAME
+ _Z26qt_suspendActiveDOMObjectsP9QWebFrame @ 694 NONAME
+ _Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameii @ 695 NONAME
+ _ZN13QWebInspector10closeEventEP11QCloseEvent @ 696 NONAME
+ _ZN9QWebFrame17scrollRecursivelyEii @ 697 NONAME
+
diff --git a/WebKit/qt/tests/benchmarks/loading/loading.pro b/WebKit/qt/tests/benchmarks/loading/loading.pro
new file mode 100644
index 0000000..8b24274
--- /dev/null
+++ b/WebKit/qt/tests/benchmarks/loading/loading.pro
@@ -0,0 +1 @@
+include(../../tests.pri)
diff --git a/WebKit/qt/tests/benchmarks/loading/tst_loading.pro b/WebKit/qt/tests/benchmarks/loading/tst_loading.pro
deleted file mode 100644
index bc5e75f..0000000
--- a/WebKit/qt/tests/benchmarks/loading/tst_loading.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = app
-TARGET = tst_loading
-include(../../../../../WebKit.pri)
-SOURCES += tst_loading.cpp
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-
-symbian {
- TARGET.UID3 = 0xA000E541
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
diff --git a/WebKit/qt/tests/benchmarks/painting/painting.pro b/WebKit/qt/tests/benchmarks/painting/painting.pro
new file mode 100644
index 0000000..8acdd5c
--- /dev/null
+++ b/WebKit/qt/tests/benchmarks/painting/painting.pro
@@ -0,0 +1 @@
+include(../../tests.pri) \ No newline at end of file
diff --git a/WebKit/qt/tests/benchmarks/painting/tst_painting.pro b/WebKit/qt/tests/benchmarks/painting/tst_painting.pro
deleted file mode 100644
index 48c7072..0000000
--- a/WebKit/qt/tests/benchmarks/painting/tst_painting.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = app
-TARGET = tst_painting
-include(../../../../../WebKit.pri)
-SOURCES += tst_painting.cpp
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-
-symbian {
- TARGET.UID3 = 0xA000E542
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
diff --git a/WebKit/qt/tests/hybridPixmap/hybridPixmap.pro b/WebKit/qt/tests/hybridPixmap/hybridPixmap.pro
new file mode 100644
index 0000000..0e49a70
--- /dev/null
+++ b/WebKit/qt/tests/hybridPixmap/hybridPixmap.pro
@@ -0,0 +1,10 @@
+# -------------------------------------------------
+# Project created by QtCreator 2009-12-10T11:25:02
+# -------------------------------------------------
+include(../tests.pri)
+TARGET = hybridPixmap
+SOURCES += widget.cpp
+HEADERS += widget.h
+FORMS += widget.ui
+RESOURCES += resources.qrc
+CONFIG += console
diff --git a/WebKit/qt/tests/hybridPixmap/resources.qrc b/WebKit/qt/tests/hybridPixmap/resources.qrc
new file mode 100644
index 0000000..5fd47e3
--- /dev/null
+++ b/WebKit/qt/tests/hybridPixmap/resources.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>test.html</file>
+ </qresource>
+</RCC>
diff --git a/WebKit/qt/tests/hybridPixmap/test.html b/WebKit/qt/tests/hybridPixmap/test.html
new file mode 100644
index 0000000..ddaf75c
--- /dev/null
+++ b/WebKit/qt/tests/hybridPixmap/test.html
@@ -0,0 +1,57 @@
+<html>
+ <head>
+ <style>
+ img { display: block; border-style: groove}
+ </style>
+ <script>
+ function startTest()
+ {
+ var obj = myWidget.image;
+ var pxm = myWidget.pixmap;
+
+ var img = obj.toHTMLImageElement();
+ var img1 = document.getElementById("img1");
+ var img2 = document.getElementById("img2");
+ document.body.appendChild(img);
+ document.body.appendChild(pxm.toHTMLImageElement());
+ var signalsFired = 0;
+ myWidget.compare(obj.toString(),"[Qt Native Pixmap "+obj.width+","+obj.height+"]");
+ myWidget.compare(String(pxm),"[Qt Native Pixmap "+pxm.width+","+pxm.height+"]");
+
+ // this shouldn't work but shouldn't crash
+ myWidget.randomSlot("foobar");
+
+ myWidget.pixmapSignal.connect(function(imgFromSignal) {
+ myWidget.compare(imgFromSignal.height, img2.height);
+ if (++signalsFired == 2)
+ myWidget.completeTest();
+ });
+
+ myWidget.imageSignal.connect(function(imgFromSignal) {
+ myWidget.compare(pxm.height, img2.height);
+ if (++signalsFired == 2)
+ myWidget.completeTest();
+ });
+
+ function continueTestAfterImagesAreLoaded()
+ {
+ if (img1.complete && img2.complete) {
+ myWidget.compare(pxm.height, img2.height);
+ myWidget.pixmapSlot(img);
+ myWidget.imageSlot(pxm);
+ }
+ }
+ img1.onload = continueTestAfterImagesAreLoaded;
+ img2.onload = continueTestAfterImagesAreLoaded;
+ img1.src = obj.toDataUrl();
+ img2.src = myWidget.pixmap.toDataUrl();
+ myWidget.image = pxm;
+ myWidget.pixmap = img;
+ }
+ </script>
+ </head>
+ <body onload="startTest()">
+ <img id="img1" />
+ <img id="img2" />
+ </body>
+</html>
diff --git a/WebKit/qt/tests/hybridPixmap/tst_hybridPixmap.cpp b/WebKit/qt/tests/hybridPixmap/tst_hybridPixmap.cpp
new file mode 100644
index 0000000..72dbb3b
--- /dev/null
+++ b/WebKit/qt/tests/hybridPixmap/tst_hybridPixmap.cpp
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "../util.h"
+
+#include "widget.h"
+#include <QtTest/QtTest>
+
+class tst_hybridPixmap : public QObject {
+ Q_OBJECT
+
+public:
+ tst_hybridPixmap(QObject* o = 0) : QObject(o) {}
+
+public slots:
+ void init()
+ {
+ }
+
+ void cleanup()
+ {
+ }
+
+private slots:
+ void hybridPixmap()
+ {
+ Widget widget;
+ widget.show();
+ widget.start();
+ waitForSignal(&widget, SIGNAL(testComplete()));
+ }
+};
+
+QTEST_MAIN(tst_hybridPixmap)
+
+#include <tst_hybridPixmap.moc>
diff --git a/WebKit/qt/tests/hybridPixmap/widget.cpp b/WebKit/qt/tests/hybridPixmap/widget.cpp
new file mode 100644
index 0000000..cfdb1d6
--- /dev/null
+++ b/WebKit/qt/tests/hybridPixmap/widget.cpp
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "widget.h"
+
+#include "qwebelement.h"
+#include "qwebframe.h"
+#include "ui_widget.h"
+#include <QPainter>
+#include <QtTest/QtTest>
+
+Widget::Widget(QWidget* parent) :
+ QWidget(parent),
+ ui(new Ui::Widget)
+{
+ ui->setupUi(this);
+}
+
+void Widget::refreshJS()
+{
+ ui->webView->page()->mainFrame()->addToJavaScriptWindowObject("myWidget", this);
+}
+void Widget::start()
+{
+ ui->webView->load(QUrl("qrc:///test.html"));
+ connect(ui->webView->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(refreshJS()));
+ ui->webView->page()->mainFrame()->addToJavaScriptWindowObject("myWidget", this);
+}
+
+void Widget::completeTest()
+{
+ QCOMPARE(ui->lbl1->pixmap()->size(), ui->lbl2->size());
+ QCOMPARE(ui->lbl3->size(), ui->lbl4->pixmap()->size());
+ QCOMPARE(ui->lbl2->size().width(), ui->webView->page()->mainFrame()->findFirstElement("#img1").evaluateJavaScript("this.width").toInt());
+ QCOMPARE(ui->lbl3->size().width(), ui->webView->page()->mainFrame()->findFirstElement("#img2").evaluateJavaScript("this.width").toInt());
+ emit testComplete();
+}
+
+void Widget::setPixmap(const QPixmap& p)
+{
+ ui->lbl1->setPixmap(p);
+}
+QPixmap Widget::pixmap() const
+{
+ QPixmap px(ui->lbl3->size());
+ {
+ QPainter p(&px);
+ ui->lbl3->render(&p);
+ }
+ return px;
+}
+void Widget::setImage(const QImage& img)
+{
+ ui->lbl4->setPixmap(QPixmap::fromImage(img));
+}
+
+QImage Widget::image() const
+{
+ QImage img(ui->lbl2->size(), QImage::Format_ARGB32);
+ {
+ QPainter p(&img);
+ ui->lbl2->render(&p);
+ }
+ return img;
+}
+
+Widget::~Widget()
+{
+ delete ui;
+}
+
+void Widget::changeEvent(QEvent* e)
+{
+ QWidget::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
+void Widget::compare(const QVariant& a, const QVariant& b)
+{
+ QCOMPARE(a, b);
+}
+
+void Widget::imageSlot(const QImage& img)
+{
+ QCOMPARE(img.size(), ui->lbl3->size());
+ emit pixmapSignal(QPixmap::fromImage(img));
+}
+
+void Widget::pixmapSlot(const QPixmap& pxm)
+{
+ QCOMPARE(pxm.size(), ui->lbl2->size());
+ emit imageSignal(ui->lbl4->pixmap()->toImage());
+}
+
+void Widget::randomSlot(const QPixmap& pxm)
+{
+ QVERIFY(pxm.isNull());
+}
diff --git a/WebKit/qt/tests/hybridPixmap/widget.h b/WebKit/qt/tests/hybridPixmap/widget.h
new file mode 100644
index 0000000..a49f8ba
--- /dev/null
+++ b/WebKit/qt/tests/hybridPixmap/widget.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef widget_h
+#define widget_h
+
+#include <QImage>
+#include <QPixmap>
+#include <QWidget>
+#include "qwebview.h"
+
+typedef QWebView WebView;
+
+namespace Ui {
+class Widget;
+}
+
+class Widget : public QWidget {
+ Q_OBJECT
+ Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap)
+ Q_PROPERTY(QImage image READ image WRITE setImage)
+
+public:
+ Widget(QWidget* parent = 0);
+ ~Widget();
+ void setPixmap(const QPixmap&);
+ QPixmap pixmap() const;
+ void setImage(const QImage&);
+ QImage image() const;
+
+private slots:
+ void refreshJS();
+
+public slots:
+ void completeTest();
+ void start();
+ void compare(const QVariant& a, const QVariant& b);
+ void imageSlot(const QImage&);
+ void pixmapSlot(const QPixmap&);
+ void randomSlot(const QPixmap&);
+
+signals:
+ void testComplete();
+ void imageSignal(const QImage&);
+ void pixmapSignal(const QPixmap&);
+
+protected:
+ void changeEvent(QEvent* e);
+
+private:
+ Ui::Widget* ui;
+};
+
+#endif // widget_h
diff --git a/WebKit/qt/tests/hybridPixmap/widget.ui b/WebKit/qt/tests/hybridPixmap/widget.ui
new file mode 100644
index 0000000..4f2b3b8
--- /dev/null
+++ b/WebKit/qt/tests/hybridPixmap/widget.ui
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Widget</class>
+ <widget class="QWidget" name="Widget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>400</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Widget</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="WebView" name="webView" native="true">
+ <property name="url" stdset="0">
+ <url>
+ <string>about:blank</string>
+ </url>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="lbl1">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="lbl2">
+ <property name="minimumSize">
+ <size>
+ <width>120</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>120</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Image from Qt to HTML</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="lbl3">
+ <property name="text">
+ <string>Pixmap from Qt to HTML</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="lbl4">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <customwidgets>
+ <customwidget>
+ <class>WebView</class>
+ <extends>QWidget</extends>
+ <header>widget.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro b/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro
index 57b4437..4ca2bf6 100644
--- a/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro
+++ b/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro
@@ -1,10 +1 @@
-TEMPLATE = app
-TARGET = tst_qgraphicswebview
-include(../../../../WebKit.pri)
-SOURCES += tst_qgraphicswebview.cpp
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-
-symbian {
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
+include(../tests.pri) \ No newline at end of file
diff --git a/WebKit/qt/tests/qwebelement/qwebelement.pro b/WebKit/qt/tests/qwebelement/qwebelement.pro
index c45a9ac..4ca2bf6 100644
--- a/WebKit/qt/tests/qwebelement/qwebelement.pro
+++ b/WebKit/qt/tests/qwebelement/qwebelement.pro
@@ -1,12 +1 @@
-TEMPLATE = app
-TARGET = tst_qwebelement
-include(../../../../WebKit.pri)
-SOURCES += tst_qwebelement.cpp
-RESOURCES += qwebelement.qrc
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-
-symbian {
- TARGET.UID3 = 0xA000E53A
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
+include(../tests.pri) \ No newline at end of file
diff --git a/WebKit/qt/tests/qwebelement/qwebelement.qrc b/WebKit/qt/tests/qwebelement/qwebelement.qrc
deleted file mode 100644
index 28b9d7b..0000000
--- a/WebKit/qt/tests/qwebelement/qwebelement.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="/">
-<file>style.css</file>
-<file>style2.css</file>
-<file>image.png</file>
-</qresource>
-</RCC>
diff --git a/WebKit/qt/tests/qwebelement/image.png b/WebKit/qt/tests/qwebelement/resources/image.png
index 8d70364..8d70364 100644
--- a/WebKit/qt/tests/qwebelement/image.png
+++ b/WebKit/qt/tests/qwebelement/resources/image.png
Binary files differ
diff --git a/WebKit/qt/tests/qwebelement/style.css b/WebKit/qt/tests/qwebelement/resources/style.css
index 2713dfd..2713dfd 100644
--- a/WebKit/qt/tests/qwebelement/style.css
+++ b/WebKit/qt/tests/qwebelement/resources/style.css
diff --git a/WebKit/qt/tests/qwebelement/style2.css b/WebKit/qt/tests/qwebelement/resources/style2.css
index 6575dcb..6575dcb 100644
--- a/WebKit/qt/tests/qwebelement/style2.css
+++ b/WebKit/qt/tests/qwebelement/resources/style2.css
diff --git a/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp b/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
index e9dae18..dde65cf 100644
--- a/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
+++ b/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
@@ -18,8 +18,8 @@
*/
+#include <../util.h>
#include <QtTest/QtTest>
-
#include <qwebpage.h>
#include <qwidget.h>
#include <qwebview.h>
@@ -28,29 +28,6 @@
//TESTED_CLASS=
//TESTED_FILES=
-/**
- * Starts an event loop that runs until the given signal is received.
- Optionally the event loop
- * can return earlier on a timeout.
- *
- * \return \p true if the requested signal was received
- * \p false on timeout
- */
-static bool waitForSignal(QObject* obj, const char* signal, int timeout = 0)
-{
- QEventLoop loop;
- QObject::connect(obj, signal, &loop, SLOT(quit()));
- QTimer timer;
- QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
- if (timeout > 0) {
- QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
- timer.setSingleShot(true);
- timer.start(timeout);
- }
- loop.exec();
- return timeoutSpy.isEmpty();
-}
-
class tst_QWebElement : public QObject
{
Q_OBJECT
@@ -576,9 +553,8 @@ void tst_QWebElement::style()
"</body>";
// in few seconds, the CSS should be completey loaded
- QSignalSpy spy(m_page, SIGNAL(loadFinished(bool)));
m_mainFrame->setHtml(html6);
- QTest::qWait(200);
+ waitForSignal(m_page, SIGNAL(loadFinished(bool)), 200);
p = m_mainFrame->documentElement().findAll("p").at(0);
QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String("blue"));
@@ -596,7 +572,7 @@ void tst_QWebElement::style()
// in few seconds, the style should be completey loaded
m_mainFrame->setHtml(html7);
- QTest::qWait(200);
+ waitForSignal(m_page, SIGNAL(loadFinished(bool)), 200);
p = m_mainFrame->documentElement().findAll("p").at(0);
QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("black"));
diff --git a/WebKit/qt/tests/qwebelement/tst_qwebelement.qrc b/WebKit/qt/tests/qwebelement/tst_qwebelement.qrc
new file mode 100644
index 0000000..7384c76
--- /dev/null
+++ b/WebKit/qt/tests/qwebelement/tst_qwebelement.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+<file alias="style.css">resources/style.css</file>
+<file alias="style2.css">resources/style2.css</file>
+<file alias="image.png">resources/image.png</file>
+</qresource>
+</RCC>
diff --git a/WebKit/qt/tests/qwebframe/qwebframe.pro b/WebKit/qt/tests/qwebframe/qwebframe.pro
index b8734cd..4ca2bf6 100644
--- a/WebKit/qt/tests/qwebframe/qwebframe.pro
+++ b/WebKit/qt/tests/qwebframe/qwebframe.pro
@@ -1,13 +1 @@
-TEMPLATE = app
-TARGET = tst_qwebframe
-include(../../../../WebKit.pri)
-SOURCES += tst_qwebframe.cpp
-RESOURCES += qwebframe.qrc
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-!symbian:DEFINES += SRCDIR=\\\"$$PWD/resources\\\"
-
-symbian {
- TARGET.UID3 = 0xA000E53D
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
+include(../tests.pri) \ No newline at end of file
diff --git a/WebKit/qt/tests/qwebframe/qwebframe.qrc b/WebKit/qt/tests/qwebframe/qwebframe.qrc
deleted file mode 100644
index 9615e27..0000000
--- a/WebKit/qt/tests/qwebframe/qwebframe.qrc
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="/">
-<file>image.png</file>
-<file>style.css</file>
-<file>test1.html</file>
-<file>test2.html</file>
-</qresource>
-</RCC>
diff --git a/WebKit/qt/tests/qwebframe/image.png b/WebKit/qt/tests/qwebframe/resources/image.png
index 8d70364..8d70364 100644
--- a/WebKit/qt/tests/qwebframe/image.png
+++ b/WebKit/qt/tests/qwebframe/resources/image.png
Binary files differ
diff --git a/WebKit/qt/tests/qwebframe/style.css b/WebKit/qt/tests/qwebframe/resources/style.css
index c05b747..c05b747 100644
--- a/WebKit/qt/tests/qwebframe/style.css
+++ b/WebKit/qt/tests/qwebframe/resources/style.css
diff --git a/WebKit/qt/tests/qwebframe/test1.html b/WebKit/qt/tests/qwebframe/resources/test1.html
index b323f96..b323f96 100644
--- a/WebKit/qt/tests/qwebframe/test1.html
+++ b/WebKit/qt/tests/qwebframe/resources/test1.html
diff --git a/WebKit/qt/tests/qwebframe/test2.html b/WebKit/qt/tests/qwebframe/resources/test2.html
index 63ac1f6..63ac1f6 100644
--- a/WebKit/qt/tests/qwebframe/test2.html
+++ b/WebKit/qt/tests/qwebframe/resources/test2.html
diff --git a/WebKit/qt/tests/qwebframe/resources/testiframe.html b/WebKit/qt/tests/qwebframe/resources/testiframe.html
new file mode 100644
index 0000000..203d3d3
--- /dev/null
+++ b/WebKit/qt/tests/qwebframe/resources/testiframe.html
@@ -0,0 +1,54 @@
+</html>
+<html>
+<head>
+<title></title>
+<style type="text/css">
+<!--
+#header {
+ background: #0f0;
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 800px;
+ height: 100px;
+}
+#content1 {
+ background: #ff0;
+ position: absolute;
+ top: 101px;
+ left: 0px;
+ width: 400px;
+ height: 400px;
+ overflow: scroll;
+}
+#content2 {
+ background: #ff7;
+ position: absolute;
+ top: 101px;
+ left: 401px;
+ width: 400px;
+ height: 400px;
+}
+#footer {
+ background: #0f0;
+ position: absolute;
+ top: 502px;
+ left: 0px;
+ width: 800px;
+ height: 200px;
+}
+-->
+</style>
+</head>
+<body>
+<div id="header"></div>
+<div id="content1">You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
+You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
+You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
+You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
+You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
+You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.</div>
+<iframe id="content2" name="control" src="testiframe2.html"> </iframe>
+<div id="footer"></div>
+</body>
+</html> \ No newline at end of file
diff --git a/WebKit/qt/tests/qwebframe/resources/testiframe2.html b/WebKit/qt/tests/qwebframe/resources/testiframe2.html
new file mode 100644
index 0000000..0d3a22f
--- /dev/null
+++ b/WebKit/qt/tests/qwebframe/resources/testiframe2.html
@@ -0,0 +1,21 @@
+</html>
+<html>
+<head>
+<title></title>
+<style type="text/css">
+<!--
+#content {
+ background: #fff;
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 800px;
+ height: 800px;
+}
+-->
+</style>
+</head>
+<body>
+<div id="content"> </div>
+</body>
+</html> \ No newline at end of file
diff --git a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index 7c13fd0..0fb0bd6 100644
--- a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -38,10 +38,6 @@
#endif
#include "../util.h"
-#if defined(Q_OS_SYMBIAN)
-# define SRCDIR ""
-#endif
-
struct CustomType {
QString string;
};
@@ -550,6 +546,7 @@ private slots:
void enumerate();
void objectDeleted();
void typeConversion();
+ void arrayObjectEnumerable();
void symmetricUrl();
void progressSignal();
void urlChange();
@@ -575,6 +572,9 @@ private slots:
void scrollPosition();
void evaluateWillCauseRepaint();
void qObjectWrapperWithSameIdentity();
+ void scrollRecursively();
+ void introspectQtMethods_data();
+ void introspectQtMethods();
private:
QString evalJS(const QString&s) {
@@ -675,7 +675,6 @@ void tst_QWebFrame::init()
m_page = m_view->page();
m_myObject = new MyQObject();
m_page->mainFrame()->addToJavaScriptWindowObject("myObject", m_myObject);
- QDir::setCurrent(SRCDIR);
}
void tst_QWebFrame::cleanup()
@@ -2070,6 +2069,31 @@ void tst_QWebFrame::typeConversion()
// ### RegExps
}
+class StringListTestObject : public QObject {
+ Q_OBJECT
+public Q_SLOTS:
+ QVariant stringList()
+ {
+ return QStringList() << "Q" << "t";
+ };
+};
+
+void tst_QWebFrame::arrayObjectEnumerable()
+{
+ QWebPage page;
+ QWebFrame* frame = page.mainFrame();
+ QObject* qobject = new StringListTestObject();
+ frame->addToJavaScriptWindowObject("test", qobject, QScriptEngine::ScriptOwnership);
+
+ const QString script("var stringArray = test.stringList();"
+ "var result = '';"
+ "for (var i in stringArray) {"
+ " result += stringArray[i];"
+ "}"
+ "result;");
+ QCOMPARE(frame->evaluateJavaScript(script).toString(), QString::fromLatin1("Qt"));
+}
+
void tst_QWebFrame::symmetricUrl()
{
QVERIFY(m_view->url().isEmpty());
@@ -2350,6 +2374,11 @@ void tst_QWebFrame::setHtmlWithResource()
void tst_QWebFrame::setHtmlWithBaseURL()
{
+ if (!QDir(TESTS_SOURCE_DIR).exists())
+ QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll);
+
+ QDir::setCurrent(TESTS_SOURCE_DIR);
+
QString html("<html><body><p>hello world</p><img src='resources/image2.png'/></body></html>");
QWebPage page;
@@ -2358,7 +2387,7 @@ void tst_QWebFrame::setHtmlWithBaseURL()
// in few seconds, the image should be completey loaded
QSignalSpy spy(&page, SIGNAL(loadFinished(bool)));
- frame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath()));
+ frame->setHtml(html, QUrl::fromLocalFile(TESTS_SOURCE_DIR));
waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
QCOMPARE(spy.count(), 1);
@@ -2464,6 +2493,7 @@ void tst_QWebFrame::popupFocus()
QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(25, 25));
QObject* webpopup = firstChildByClassName(&view, "WebCore::QWebPopup");
QComboBox* combo = qobject_cast<QComboBox*>(webpopup);
+ QVERIFY(combo != 0);
QTRY_VERIFY(!view.hasFocus() && combo->view()->hasFocus()); // Focus should be on the popup
// hide the popup and check if focus is on the page
@@ -2719,7 +2749,11 @@ void tst_QWebFrame::evaluateWillCauseRepaint()
view.setHtml(html);
view.show();
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
QTest::qWaitForWindowShown(&view);
+#else
+ QTest::qWait(2000);
+#endif
view.page()->mainFrame()->evaluateJavaScript(
"document.getElementById('junk').style.display = 'none';");
@@ -2765,5 +2799,111 @@ void tst_QWebFrame::qObjectWrapperWithSameIdentity()
QCOMPARE(mainFrame->toPlainText(), QString("test2"));
}
+void tst_QWebFrame::scrollRecursively()
+{
+ // The test content is
+ // a nested frame set
+ // The main frame scrolls
+ // and has two children
+ // an iframe and a div overflow
+ // both scroll
+ QWebView webView;
+ QWebPage* webPage = webView.page();
+ QSignalSpy loadSpy(webPage, SIGNAL(loadFinished(bool)));
+ QUrl url = QUrl("qrc:///testiframe.html");
+ webPage->mainFrame()->load(url);
+ QTRY_COMPARE(loadSpy.count(), 1);
+
+ QList<QWebFrame*> children = webPage->mainFrame()->childFrames();
+ QVERIFY(children.count() == 1);
+
+ // 1st test
+ // call scrollRecursively over mainframe
+ // verify scrolled
+ // verify scroll postion changed
+ QPoint scrollPosition(webPage->mainFrame()->scrollPosition());
+ QVERIFY(webPage->mainFrame()->scrollRecursively(10, 10));
+ QVERIFY(scrollPosition != webPage->mainFrame()->scrollPosition());
+
+ // 2nd test
+ // call scrollRecursively over child iframe
+ // verify scrolled
+ // verify child scroll position changed
+ // verify parent's scroll position did not change
+ scrollPosition = webPage->mainFrame()->scrollPosition();
+ QPoint childScrollPosition = children.at(0)->scrollPosition();
+ QVERIFY(children.at(0)->scrollRecursively(10, 10));
+ QVERIFY(scrollPosition == webPage->mainFrame()->scrollPosition());
+ QVERIFY(childScrollPosition != children.at(0)->scrollPosition());
+
+ // 3rd test
+ // call scrollRecursively over div overflow
+ // verify scrolled == true
+ // verify parent and child frame's scroll postion did not change
+ QWebElement div = webPage->mainFrame()->documentElement().findFirst("#content1");
+ QMouseEvent evpres(QEvent::MouseMove, div.geometry().center(), Qt::NoButton, Qt::NoButton, Qt::NoModifier);
+ webPage->event(&evpres);
+ scrollPosition = webPage->mainFrame()->scrollPosition();
+ childScrollPosition = children.at(0)->scrollPosition();
+ QVERIFY(webPage->mainFrame()->scrollRecursively(5, 5));
+ QVERIFY(childScrollPosition == children.at(0)->scrollPosition());
+ QVERIFY(scrollPosition == webPage->mainFrame()->scrollPosition());
+
+ // 4th test
+ // call scrollRecursively twice over childs iframe
+ // verify scrolled == true first time
+ // verify parent's scroll == true second time
+ // verify parent and childs scroll position changed
+ childScrollPosition = children.at(0)->scrollPosition();
+ QVERIFY(children.at(0)->scrollRecursively(-10, -10));
+ QVERIFY(childScrollPosition != children.at(0)->scrollPosition());
+ scrollPosition = webPage->mainFrame()->scrollPosition();
+ QVERIFY(children.at(0)->scrollRecursively(-10, -10));
+ QVERIFY(scrollPosition != webPage->mainFrame()->scrollPosition());
+
+}
+
+void tst_QWebFrame::introspectQtMethods_data()
+{
+ QTest::addColumn<QString>("objectExpression");
+ QTest::addColumn<QString>("methodName");
+ QTest::addColumn<QStringList>("expectedPropertyNames");
+
+ QTest::newRow("myObject.mySignal")
+ << "myObject" << "mySignal" << (QStringList() << "connect" << "disconnect" << "length" << "name");
+ QTest::newRow("myObject.mySlot")
+ << "myObject" << "mySlot" << (QStringList() << "connect" << "disconnect" << "length" << "name");
+ QTest::newRow("myObject.myInvokable")
+ << "myObject" << "myInvokable" << (QStringList() << "connect" << "disconnect" << "length" << "name");
+ QTest::newRow("myObject.mySignal.connect")
+ << "myObject.mySignal" << "connect" << (QStringList() << "length" << "name");
+ QTest::newRow("myObject.mySignal.disconnect")
+ << "myObject.mySignal" << "disconnect" << (QStringList() << "length" << "name");
+}
+
+void tst_QWebFrame::introspectQtMethods()
+{
+ QFETCH(QString, objectExpression);
+ QFETCH(QString, methodName);
+ QFETCH(QStringList, expectedPropertyNames);
+
+ QString methodLookup = QString::fromLatin1("%0['%1']").arg(objectExpression).arg(methodName);
+ QCOMPARE(evalJSV(QString::fromLatin1("Object.getOwnPropertyNames(%0).sort()").arg(methodLookup)).toStringList(), expectedPropertyNames);
+
+ for (int i = 0; i < expectedPropertyNames.size(); ++i) {
+ QString name = expectedPropertyNames.at(i);
+ QCOMPARE(evalJS(QString::fromLatin1("%0.hasOwnProperty('%1')").arg(methodLookup).arg(name)), sTrue);
+ evalJS(QString::fromLatin1("var descriptor = Object.getOwnPropertyDescriptor(%0, '%1')").arg(methodLookup).arg(name));
+ QCOMPARE(evalJS("typeof descriptor"), QString::fromLatin1("object"));
+ QCOMPARE(evalJS("descriptor.get"), sUndefined);
+ QCOMPARE(evalJS("descriptor.set"), sUndefined);
+ QCOMPARE(evalJS(QString::fromLatin1("descriptor.value === %0['%1']").arg(methodLookup).arg(name)), sTrue);
+ QCOMPARE(evalJS(QString::fromLatin1("descriptor.enumerable")), sFalse);
+ QCOMPARE(evalJS(QString::fromLatin1("descriptor.configurable")), sFalse);
+ }
+
+ QVERIFY(evalJSV("var props=[]; for (var p in myObject.deleteLater) {props.push(p);}; props.sort()").toStringList().isEmpty());
+}
+
QTEST_MAIN(tst_QWebFrame)
#include "tst_qwebframe.moc"
diff --git a/WebKit/qt/tests/qwebframe/tst_qwebframe.qrc b/WebKit/qt/tests/qwebframe/tst_qwebframe.qrc
new file mode 100644
index 0000000..2a7d0b9
--- /dev/null
+++ b/WebKit/qt/tests/qwebframe/tst_qwebframe.qrc
@@ -0,0 +1,10 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+<file alias="image.png">resources/image.png</file>
+<file alias="style.css">resources/style.css</file>
+<file alias="test1.html">resources/test1.html</file>
+<file alias="test2.html">resources/test2.html</file>
+<file alias="testiframe.html">resources/testiframe.html</file>
+<file alias="testiframe2.html">resources/testiframe2.html</file>
+</qresource>
+</RCC>
diff --git a/WebKit/qt/tests/qwebhistory/qwebhistory.pro b/WebKit/qt/tests/qwebhistory/qwebhistory.pro
index 7445e3b..4ca2bf6 100644
--- a/WebKit/qt/tests/qwebhistory/qwebhistory.pro
+++ b/WebKit/qt/tests/qwebhistory/qwebhistory.pro
@@ -1,12 +1 @@
-TEMPLATE = app
-TARGET = tst_qwebhistory
-include(../../../../WebKit.pri)
-SOURCES += tst_qwebhistory.cpp
-RESOURCES += tst_qwebhistory.qrc
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-
-symbian {
- TARGET.UID3 = 0xA000E53B
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
+include(../tests.pri) \ No newline at end of file
diff --git a/WebKit/qt/tests/qwebhistory/data/page1.html b/WebKit/qt/tests/qwebhistory/resources/page1.html
index 82fa4af..82fa4af 100644
--- a/WebKit/qt/tests/qwebhistory/data/page1.html
+++ b/WebKit/qt/tests/qwebhistory/resources/page1.html
diff --git a/WebKit/qt/tests/qwebhistory/data/page2.html b/WebKit/qt/tests/qwebhistory/resources/page2.html
index 5307bdc..5307bdc 100644
--- a/WebKit/qt/tests/qwebhistory/data/page2.html
+++ b/WebKit/qt/tests/qwebhistory/resources/page2.html
diff --git a/WebKit/qt/tests/qwebhistory/data/page3.html b/WebKit/qt/tests/qwebhistory/resources/page3.html
index 4e5547c..4e5547c 100644
--- a/WebKit/qt/tests/qwebhistory/data/page3.html
+++ b/WebKit/qt/tests/qwebhistory/resources/page3.html
diff --git a/WebKit/qt/tests/qwebhistory/data/page4.html b/WebKit/qt/tests/qwebhistory/resources/page4.html
index 3c57aed..3c57aed 100644
--- a/WebKit/qt/tests/qwebhistory/data/page4.html
+++ b/WebKit/qt/tests/qwebhistory/resources/page4.html
diff --git a/WebKit/qt/tests/qwebhistory/data/page5.html b/WebKit/qt/tests/qwebhistory/resources/page5.html
index 8593552..8593552 100644
--- a/WebKit/qt/tests/qwebhistory/data/page5.html
+++ b/WebKit/qt/tests/qwebhistory/resources/page5.html
diff --git a/WebKit/qt/tests/qwebhistory/data/page6.html b/WebKit/qt/tests/qwebhistory/resources/page6.html
index c5bbc6f..c5bbc6f 100644
--- a/WebKit/qt/tests/qwebhistory/data/page6.html
+++ b/WebKit/qt/tests/qwebhistory/resources/page6.html
diff --git a/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp b/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
index ec2d497..e967dcc 100644
--- a/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
+++ b/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
@@ -37,7 +37,7 @@ public:
protected :
void loadPage(int nr)
{
- frame->load(QUrl("qrc:/data/page" + QString::number(nr) + ".html"));
+ frame->load(QUrl("qrc:/resources/page" + QString::number(nr) + ".html"));
waitForLoadFinished.exec();
}
diff --git a/WebKit/qt/tests/qwebhistory/tst_qwebhistory.qrc b/WebKit/qt/tests/qwebhistory/tst_qwebhistory.qrc
index 7c5ff0e..6e2f50a 100644
--- a/WebKit/qt/tests/qwebhistory/tst_qwebhistory.qrc
+++ b/WebKit/qt/tests/qwebhistory/tst_qwebhistory.qrc
@@ -1,11 +1,11 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
- <file>data/page1.html</file>
- <file>data/page2.html</file>
- <file>data/page3.html</file>
- <file>data/page4.html</file>
- <file>data/page5.html</file>
- <file>data/page6.html</file>
+ <file>resources/page1.html</file>
+ <file>resources/page2.html</file>
+ <file>resources/page3.html</file>
+ <file>resources/page4.html</file>
+ <file>resources/page5.html</file>
+ <file>resources/page6.html</file>
</qresource>
</RCC>
diff --git a/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro b/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro
index 764f806..4ca2bf6 100644
--- a/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro
+++ b/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro
@@ -1,11 +1 @@
-TEMPLATE = app
-TARGET = tst_qwebhistoryinterface
-include(../../../../WebKit.pri)
-SOURCES += tst_qwebhistoryinterface.cpp
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-
-symbian {
- TARGET.UID3 = 0xA000E53C
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
+include(../tests.pri) \ No newline at end of file
diff --git a/WebKit/qt/tests/qwebinspector/qwebinspector.pro b/WebKit/qt/tests/qwebinspector/qwebinspector.pro
index 520887e..e99c7f4 100644
--- a/WebKit/qt/tests/qwebinspector/qwebinspector.pro
+++ b/WebKit/qt/tests/qwebinspector/qwebinspector.pro
@@ -1,6 +1 @@
-TEMPLATE = app
-TARGET = tst_qwebinspector
-include(../../../../WebKit.pri)
-SOURCES += tst_qwebinspector.cpp
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
+include(../tests.pri)
diff --git a/WebKit/qt/tests/qwebpage/qwebpage.pro b/WebKit/qt/tests/qwebpage/qwebpage.pro
index 7853b28..4ca2bf6 100644
--- a/WebKit/qt/tests/qwebpage/qwebpage.pro
+++ b/WebKit/qt/tests/qwebpage/qwebpage.pro
@@ -1,13 +1 @@
-TEMPLATE = app
-TARGET = tst_qwebpage
-include(../../../../WebKit.pri)
-SOURCES += tst_qwebpage.cpp
-RESOURCES += tst_qwebpage.qrc
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-!symbian:DEFINES += SRCDIR=\\\"$$PWD/\\\"
-
-symbian {
- TARGET.UID3 = 0xA000E53E
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
+include(../tests.pri) \ No newline at end of file
diff --git a/WebKit/qt/tests/qwebpage/frametest/frame_a.html b/WebKit/qt/tests/qwebpage/resources/frame_a.html
index 9ff68f1..9ff68f1 100644
--- a/WebKit/qt/tests/qwebpage/frametest/frame_a.html
+++ b/WebKit/qt/tests/qwebpage/resources/frame_a.html
diff --git a/WebKit/qt/tests/qwebpage/frametest/iframe.html b/WebKit/qt/tests/qwebpage/resources/iframe.html
index f17027c..f17027c 100644
--- a/WebKit/qt/tests/qwebpage/frametest/iframe.html
+++ b/WebKit/qt/tests/qwebpage/resources/iframe.html
diff --git a/WebKit/qt/tests/qwebpage/frametest/iframe2.html b/WebKit/qt/tests/qwebpage/resources/iframe2.html
index 5017435..5017435 100644
--- a/WebKit/qt/tests/qwebpage/frametest/iframe2.html
+++ b/WebKit/qt/tests/qwebpage/resources/iframe2.html
diff --git a/WebKit/qt/tests/qwebpage/frametest/iframe3.html b/WebKit/qt/tests/qwebpage/resources/iframe3.html
index ed6ac5b..ed6ac5b 100644
--- a/WebKit/qt/tests/qwebpage/frametest/iframe3.html
+++ b/WebKit/qt/tests/qwebpage/resources/iframe3.html
diff --git a/WebKit/qt/tests/qwebpage/frametest/index.html b/WebKit/qt/tests/qwebpage/resources/index.html
index c53ad09..c53ad09 100644
--- a/WebKit/qt/tests/qwebpage/frametest/index.html
+++ b/WebKit/qt/tests/qwebpage/resources/index.html
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 2a52631..f48fb73 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -1,6 +1,7 @@
/*
Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
+ Copyright (C) 2010 Holger Hans Peter Freyther
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -18,72 +19,24 @@
Boston, MA 02110-1301, USA.
*/
-
+#include "../util.h"
+#include <QDir>
+#include <QGraphicsWidget>
+#include <QLineEdit>
+#include <QMenu>
+#include <QPushButton>
#include <QtTest/QtTest>
-
#include <qgraphicsscene.h>
#include <qgraphicsview.h>
#include <qgraphicswebview.h>
+#include <qnetworkrequest.h>
+#include <qwebdatabase.h>
#include <qwebelement.h>
-#include <qwebpage.h>
-#include <qwidget.h>
-#include <QGraphicsWidget>
-#include <qwebview.h>
#include <qwebframe.h>
#include <qwebhistory.h>
-#include <qnetworkrequest.h>
-#include <QDebug>
-#include <QLineEdit>
-#include <QMenu>
+#include <qwebpage.h>
#include <qwebsecurityorigin.h>
-#include <qwebdatabase.h>
-#include <QPushButton>
-#include <QDir>
-
-#if defined(Q_OS_SYMBIAN)
-# define SRCDIR ""
-#endif
-
-// Will try to wait for the condition while allowing event processing
-#define QTRY_COMPARE(__expr, __expected) \
- do { \
- const int __step = 50; \
- const int __timeout = 5000; \
- if ((__expr) != (__expected)) { \
- QTest::qWait(0); \
- } \
- for (int __i = 0; __i < __timeout && ((__expr) != (__expected)); __i+=__step) { \
- QTest::qWait(__step); \
- } \
- QCOMPARE(__expr, __expected); \
- } while(0)
-
-//TESTED_CLASS=
-//TESTED_FILES=
-
-// Task 160192
-/**
- * Starts an event loop that runs until the given signal is received.
- Optionally the event loop
- * can return earlier on a timeout.
- *
- * \return \p true if the requested signal was received
- * \p false on timeout
- */
-static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000)
-{
- QEventLoop loop;
- QObject::connect(obj, signal, &loop, SLOT(quit()));
- QTimer timer;
- QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
- if (timeout > 0) {
- QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
- timer.setSingleShot(true);
- timer.start(timeout);
- }
- loop.exec();
- return timeoutSpy.isEmpty();
-}
+#include <qwebview.h>
class EventSpy : public QObject, public QList<QEvent::Type>
{
@@ -156,6 +109,7 @@ private slots:
void screenshot();
void originatingObjectInNetworkRequests();
+ void testJSPrompt();
private:
QWebView* m_view;
@@ -270,10 +224,8 @@ void tst_QWebPage::loadFinished()
"<frame src=\"data:text/html,bar\"></frameset>"), QUrl());
QTRY_COMPARE(spyLoadFinished.count(), 1);
- QTest::qWait(3000);
-
- QVERIFY(spyLoadStarted.count() > 1);
- QVERIFY(spyLoadFinished.count() > 1);
+ QTRY_VERIFY(spyLoadStarted.count() > 1);
+ QTRY_VERIFY(spyLoadFinished.count() > 1);
spyLoadFinished.clear();
@@ -520,7 +472,6 @@ void tst_QWebPage::database()
// Remove removed test :-)
QWebDatabase::removeAllDatabases();
QVERIFY(!origin.databases().size());
- QTest::qWait(1000);
}
class PluginPage : public QWebPage
@@ -1275,7 +1226,7 @@ void tst_QWebPage::backActionUpdate()
QAction *action = page->action(QWebPage::Back);
QVERIFY(!action->isEnabled());
QSignalSpy loadSpy(page, SIGNAL(loadFinished(bool)));
- QUrl url = QUrl("qrc:///frametest/index.html");
+ QUrl url = QUrl("qrc:///resources/index.html");
page->mainFrame()->load(url);
QTRY_COMPARE(loadSpy.count(), 1);
QVERIFY(!action->isEnabled());
@@ -1306,7 +1257,7 @@ void tst_QWebPage::frameAt()
QWebView webView;
QWebPage* webPage = webView.page();
QSignalSpy loadSpy(webPage, SIGNAL(loadFinished(bool)));
- QUrl url = QUrl("qrc:///frametest/iframe.html");
+ QUrl url = QUrl("qrc:///resources/iframe.html");
webPage->mainFrame()->load(url);
QTRY_COMPARE(loadSpy.count(), 1);
frameAtHelper(webPage, webPage->mainFrame(), webPage->mainFrame()->pos());
@@ -1373,6 +1324,7 @@ void tst_QWebPage::inputMethods()
else
QVERIFY2(false, "Unknown view type");
+ page->settings()->setFontFamily(QWebSettings::SerifFont, "FooSerifFont");
page->mainFrame()->setHtml("<html><body>" \
"<input type='text' id='input1' style='font-family: serif' value='' maxlength='20'/><br>" \
"<input type='password'/>" \
@@ -1408,7 +1360,7 @@ void tst_QWebPage::inputMethods()
//ImFont
variant = page->inputMethodQuery(Qt::ImFont);
QFont font = variant.value<QFont>();
- QCOMPARE(QString("-webkit-serif"), font.family());
+ QCOMPARE(page->settings()->fontFamily(QWebSettings::SerifFont), font.family());
QList<QInputMethodEvent::Attribute> inputAttributes;
@@ -1599,16 +1551,14 @@ void tst_QWebPage::testEnablePersistentStorage()
QWebSettings::enablePersistentStorage();
- // Give it some time to initialize - icon database needs it
- QTest::qWait(1000);
- QCOMPARE(webPage.settings()->testAttribute(QWebSettings::LocalStorageEnabled), true);
- QCOMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineStorageDatabaseEnabled), true);
- QCOMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineWebApplicationCacheEnabled), true);
+ QTRY_COMPARE(webPage.settings()->testAttribute(QWebSettings::LocalStorageEnabled), true);
+ QTRY_COMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineStorageDatabaseEnabled), true);
+ QTRY_COMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineWebApplicationCacheEnabled), true);
- QVERIFY(!webPage.settings()->offlineStoragePath().isEmpty());
- QVERIFY(!webPage.settings()->offlineWebApplicationCachePath().isEmpty());
- QVERIFY(!webPage.settings()->iconDatabasePath().isEmpty());
+ QTRY_VERIFY(!webPage.settings()->offlineStoragePath().isEmpty());
+ QTRY_VERIFY(!webPage.settings()->offlineWebApplicationCachePath().isEmpty());
+ QTRY_VERIFY(!webPage.settings()->iconDatabasePath().isEmpty());
}
void tst_QWebPage::defaultTextEncoding()
@@ -1676,20 +1626,17 @@ void tst_QWebPage::errorPageExtension()
QCOMPARE(page->history()->canGoForward(), false);
page->triggerAction(QWebPage::Back);
- QTest::qWait(2000);
- QCOMPARE(page->history()->canGoBack(), false);
- QCOMPARE(page->history()->canGoForward(), true);
+ QTRY_COMPARE(page->history()->canGoBack(), false);
+ QTRY_COMPARE(page->history()->canGoForward(), true);
page->triggerAction(QWebPage::Forward);
- QTest::qWait(2000);
- QCOMPARE(page->history()->canGoBack(), true);
- QCOMPARE(page->history()->canGoForward(), false);
+ QTRY_COMPARE(page->history()->canGoBack(), true);
+ QTRY_COMPARE(page->history()->canGoForward(), false);
page->triggerAction(QWebPage::Back);
- QTest::qWait(2000);
- QCOMPARE(page->history()->canGoBack(), false);
- QCOMPARE(page->history()->canGoForward(), true);
- QCOMPARE(page->history()->currentItem().url(), QUrl("data:text/html,foo"));
+ QTRY_COMPARE(page->history()->canGoBack(), false);
+ QTRY_COMPARE(page->history()->canGoForward(), true);
+ QTRY_COMPARE(page->history()->currentItem().url(), QUrl("data:text/html,foo"));
m_view->setPage(0);
}
@@ -1716,7 +1663,7 @@ void tst_QWebPage::errorPageExtensionInFrameset()
ErrorPage* page = new ErrorPage;
m_view->setPage(page);
- m_view->load(QUrl("qrc:///frametest/index.html"));
+ m_view->load(QUrl("qrc:///resources/index.html"));
QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool)));
QTRY_COMPARE(spyLoadFinished.count(), 1);
@@ -1765,17 +1712,17 @@ void tst_QWebPage::screenshot_data()
void tst_QWebPage::screenshot()
{
- QDir::setCurrent(SRCDIR);
+ if (!QDir(TESTS_SOURCE_DIR).exists())
+ QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll);
+
+ QDir::setCurrent(TESTS_SOURCE_DIR);
QFETCH(QString, html);
QWebPage* page = new QWebPage;
page->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
QWebFrame* mainFrame = page->mainFrame();
- mainFrame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath()));
- if (html.contains("</embed>")) {
- // some reasonable time for the PluginStream to feed test.swf to flash and start painting
- QTest::qWait(2000);
- }
+ mainFrame->setHtml(html, QUrl::fromLocalFile(TESTS_SOURCE_DIR));
+ ::waitForSignal(mainFrame, SIGNAL(loadFinished(bool)), 2000);
// take screenshot without a view
takeScreenshot(page);
@@ -1814,5 +1761,72 @@ void tst_QWebPage::originatingObjectInNetworkRequests()
#endif
}
+/**
+ * Test fixups for https://bugs.webkit.org/show_bug.cgi?id=30914
+ *
+ * From JS we test the following conditions.
+ *
+ * OK + QString() => SUCCESS, empty string (but not null)
+ * OK + "text" => SUCCESS, "text"
+ * CANCEL + QString() => CANCEL, null string
+ * CANCEL + "text" => CANCEL, null string
+ */
+class JSPromptPage : public QWebPage {
+ Q_OBJECT
+public:
+ JSPromptPage()
+ {}
+
+ bool javaScriptPrompt(QWebFrame* frame, const QString& msg, const QString& defaultValue, QString* result)
+ {
+ if (msg == QLatin1String("test1")) {
+ *result = QString();
+ return true;
+ } else if (msg == QLatin1String("test2")) {
+ *result = QLatin1String("text");
+ return true;
+ } else if (msg == QLatin1String("test3")) {
+ *result = QString();
+ return false;
+ } else if (msg == QLatin1String("test4")) {
+ *result = QLatin1String("text");
+ return false;
+ }
+
+ qFatal("Unknown msg.");
+ return QWebPage::javaScriptPrompt(frame, msg, defaultValue, result);
+ }
+};
+
+void tst_QWebPage::testJSPrompt()
+{
+ JSPromptPage page;
+ bool res;
+
+ // OK + QString()
+ res = page.mainFrame()->evaluateJavaScript(
+ "var retval = prompt('test1');"
+ "retval=='' && retval.length == 0;").toBool();
+ QVERIFY(res);
+
+ // OK + "text"
+ res = page.mainFrame()->evaluateJavaScript(
+ "var retval = prompt('test2');"
+ "retval=='text' && retval.length == 4;").toBool();
+ QVERIFY(res);
+
+ // Cancel + QString()
+ res = page.mainFrame()->evaluateJavaScript(
+ "var retval = prompt('test3');"
+ "retval===null;").toBool();
+ QVERIFY(res);
+
+ // Cancel + "text"
+ res = page.mainFrame()->evaluateJavaScript(
+ "var retval = prompt('test4');"
+ "retval===null;").toBool();
+ QVERIFY(res);
+}
+
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc b/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc
index 3085ce2..0627cb4 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc
@@ -1,10 +1,10 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
- <file>frametest/index.html</file>
- <file>frametest/frame_a.html</file>
- <file>frametest/iframe.html</file>
- <file>frametest/iframe2.html</file>
- <file>frametest/iframe3.html</file>
+ <file>resources/index.html</file>
+ <file>resources/frame_a.html</file>
+ <file>resources/iframe.html</file>
+ <file>resources/iframe2.html</file>
+ <file>resources/iframe3.html</file>
</qresource>
</RCC>
diff --git a/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro b/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro
index 569146a..e99c7f4 100644
--- a/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro
+++ b/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro
@@ -1,11 +1 @@
-TEMPLATE = app
-TARGET = tst_qwebplugindatabase
-include(../../../../WebKit.pri)
-SOURCES += tst_qwebplugindatabase.cpp
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-
-symbian {
- TARGET.UID3 = 0xA000E540
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
+include(../tests.pri)
diff --git a/WebKit/qt/tests/qwebview/qwebview.pro b/WebKit/qt/tests/qwebview/qwebview.pro
index 735537b..4ca2bf6 100644
--- a/WebKit/qt/tests/qwebview/qwebview.pro
+++ b/WebKit/qt/tests/qwebview/qwebview.pro
@@ -1,13 +1 @@
-TEMPLATE = app
-TARGET = tst_qwebview
-include(../../../../WebKit.pri)
-SOURCES += tst_qwebview.cpp
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-RESOURCES += tst_qwebview.qrc
-DEFINES += SRCDIR=\\\"$$PWD/\\\"
-
-symbian {
- TARGET.UID3 = 0xA000E53F
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
+include(../tests.pri) \ No newline at end of file
diff --git a/WebKit/qt/tests/qwebview/data/frame_a.html b/WebKit/qt/tests/qwebview/resources/frame_a.html
index 9ff68f1..9ff68f1 100644
--- a/WebKit/qt/tests/qwebview/data/frame_a.html
+++ b/WebKit/qt/tests/qwebview/resources/frame_a.html
diff --git a/WebKit/qt/tests/qwebview/data/index.html b/WebKit/qt/tests/qwebview/resources/index.html
index c53ad09..c53ad09 100644
--- a/WebKit/qt/tests/qwebview/data/index.html
+++ b/WebKit/qt/tests/qwebview/resources/index.html
diff --git a/WebKit/qt/tests/qwebview/tst_qwebview.cpp b/WebKit/qt/tests/qwebview/tst_qwebview.cpp
index bd2f185..ebcf4bb 100644
--- a/WebKit/qt/tests/qwebview/tst_qwebview.cpp
+++ b/WebKit/qt/tests/qwebview/tst_qwebview.cpp
@@ -30,6 +30,8 @@
#include <qwebkitversion.h>
#include <qwebframe.h>
+#include <QDebug>
+
class tst_QWebView : public QObject
{
Q_OBJECT
@@ -121,7 +123,10 @@ void tst_QWebView::reusePage_data()
void tst_QWebView::reusePage()
{
- QDir::setCurrent(SRCDIR);
+ if (!QDir(TESTS_SOURCE_DIR).exists())
+ QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll);
+
+ QDir::setCurrent(TESTS_SOURCE_DIR);
QFETCH(QString, html);
QWebView* view1 = new QWebView;
@@ -129,21 +134,29 @@ void tst_QWebView::reusePage()
view1->setPage(page);
page->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
QWebFrame* mainFrame = page->mainFrame();
- mainFrame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath()));
+ mainFrame->setHtml(html, QUrl::fromLocalFile(TESTS_SOURCE_DIR));
if (html.contains("</embed>")) {
// some reasonable time for the PluginStream to feed test.swf to flash and start painting
waitForSignal(view1, SIGNAL(loadFinished(bool)), 2000);
}
view1->show();
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
QTest::qWaitForWindowShown(view1);
+#else
+ QTest::qWait(2000);
+#endif
delete view1;
QVERIFY(page != 0); // deleting view must not have deleted the page, since it's not a child of view
QWebView *view2 = new QWebView;
view2->setPage(page);
view2->show(); // in Windowless mode, you should still be able to see the plugin here
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
QTest::qWaitForWindowShown(view2);
+#else
+ QTest::qWait(2000);
+#endif
delete view2;
delete page; // must not crash
@@ -185,7 +198,7 @@ void tst_QWebView::crashTests()
// Test page should have frames.
QWebView view;
WebViewCrashTest tester(&view);
- QUrl url("qrc:///data/index.html");
+ QUrl url("qrc:///resources/index.html");
view.load(url);
QTRY_VERIFY(tester.m_executed); // If fail it means that the test wasn't executed.
}
diff --git a/WebKit/qt/tests/qwebview/tst_qwebview.qrc b/WebKit/qt/tests/qwebview/tst_qwebview.qrc
index ede34a9..5abc64c 100644
--- a/WebKit/qt/tests/qwebview/tst_qwebview.qrc
+++ b/WebKit/qt/tests/qwebview/tst_qwebview.qrc
@@ -1,7 +1,7 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
- <file>data/index.html</file>
- <file>data/frame_a.html</file>
+ <file>resources/index.html</file>
+ <file>resources/frame_a.html</file>
</qresource>
</RCC>
diff --git a/WebKit/qt/tests/qwebframe/resources/image2.png b/WebKit/qt/tests/resources/image2.png
index 8d70364..8d70364 100644
--- a/WebKit/qt/tests/qwebframe/resources/image2.png
+++ b/WebKit/qt/tests/resources/image2.png
Binary files differ
diff --git a/WebKit/qt/tests/tests.pri b/WebKit/qt/tests/tests.pri
new file mode 100644
index 0000000..c3d7755
--- /dev/null
+++ b/WebKit/qt/tests/tests.pri
@@ -0,0 +1,20 @@
+TEMPLATE = app
+CONFIG -= app_bundle
+
+TARGET = tst_$$TARGET
+SOURCES += $$_PRO_FILE_PWD_/$${TARGET}.cpp
+
+exists($$_PRO_FILE_PWD_/$${TARGET}.qrc):RESOURCES += $$_PRO_FILE_PWD_/$${TARGET}.qrc
+
+include(../../../WebKit.pri)
+QT += testlib network
+
+QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
+
+symbian {
+ TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
+}
+
+# This define is used by some tests to look up resources in the source tree
+!symbian: DEFINES += TESTS_SOURCE_DIR=\\\"$$PWD/\\\"
+
diff --git a/WebKit/qt/tests/tests.pro b/WebKit/qt/tests/tests.pro
index b967ca9..5e19202 100644
--- a/WebKit/qt/tests/tests.pro
+++ b/WebKit/qt/tests/tests.pro
@@ -1,4 +1,4 @@
TEMPLATE = subdirs
-SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory qwebinspector
-greaterThan(QT_MINOR_VERSION, 4): SUBDIRS += benchmarks/painting/tst_painting.pro benchmarks/loading/tst_loading.pro
+SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory qwebinspector hybridPixmap
+greaterThan(QT_MINOR_VERSION, 4): SUBDIRS += benchmarks/painting benchmarks/loading
diff --git a/WebKit/qt/tests/util.h b/WebKit/qt/tests/util.h
index 15af262..c61bc6b 100644
--- a/WebKit/qt/tests/util.h
+++ b/WebKit/qt/tests/util.h
@@ -22,6 +22,10 @@
#include <QSignalSpy>
#include <QTimer>
+#if !defined(TESTS_SOURCE_DIR)
+#define TESTS_SOURCE_DIR ""
+#endif
+
/**
* Starts an event loop that runs until the given signal is received.
* Optionally the event loop
diff --git a/WebKit/win/AccessibleBase.cpp b/WebKit/win/AccessibleBase.cpp
index 47b8369..0704771 100644
--- a/WebKit/win/AccessibleBase.cpp
+++ b/WebKit/win/AccessibleBase.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 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
@@ -29,6 +29,8 @@
#include "AccessibleImage.h"
#include "WebView.h"
+#include <WebCore/AccessibilityListBox.h>
+#include <WebCore/AccessibilityMenuListPopup.h>
#include <WebCore/AccessibilityObject.h>
#include <WebCore/AXObjectCache.h>
#include <WebCore/BString.h>
@@ -75,15 +77,30 @@ AccessibleBase* AccessibleBase::createInstance(AccessibilityObject* obj)
return new AccessibleBase(obj);
}
+HRESULT AccessibleBase::QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
+{
+ if (!IsEqualGUID(guidService, SID_AccessibleComparable)) {
+ *ppvObject = 0;
+ return E_INVALIDARG;
+ }
+ return QueryInterface(riid, ppvObject);
+}
+
// IUnknown
HRESULT STDMETHODCALLTYPE AccessibleBase::QueryInterface(REFIID riid, void** ppvObject)
{
if (IsEqualGUID(riid, __uuidof(IAccessible)))
- *ppvObject = this;
+ *ppvObject = static_cast<IAccessible*>(this);
else if (IsEqualGUID(riid, __uuidof(IDispatch)))
- *ppvObject = this;
+ *ppvObject = static_cast<IAccessible*>(this);
else if (IsEqualGUID(riid, __uuidof(IUnknown)))
- *ppvObject = this;
+ *ppvObject = static_cast<IAccessible*>(this);
+ else if (IsEqualGUID(riid, __uuidof(IAccessibleComparable)))
+ *ppvObject = static_cast<IAccessibleComparable*>(this);
+ else if (IsEqualGUID(riid, __uuidof(IServiceProvider)))
+ *ppvObject = static_cast<IServiceProvider*>(this);
+ else if (IsEqualGUID(riid, __uuidof(AccessibleBase)))
+ *ppvObject = static_cast<AccessibleBase*>(this);
else {
*ppvObject = 0;
return E_NOINTERFACE;
@@ -106,7 +123,17 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::get_accParent(IDispatch** parent)
{
*parent = 0;
- if (!m_object || !m_object->topDocumentFrameView())
+ if (!m_object)
+ return E_FAIL;
+
+ AccessibilityObject* parentObject = m_object->parentObjectUnignored();
+ if (parentObject) {
+ *parent = wrapper(parentObject);
+ (*parent)->AddRef();
+ return S_OK;
+ }
+
+ if (!m_object->topDocumentFrameView())
return E_FAIL;
return WebView::AccessibleObjectFromWindow(m_object->topDocumentFrameView()->hostWindow()->platformPageClient(),
@@ -252,9 +279,6 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::get_accState(VARIANT vChild, VARIANT*
if (childObj->isOffScreen())
pvState->lVal |= STATE_SYSTEM_OFFSCREEN;
- if (childObj->isMultiSelect())
- pvState->lVal |= STATE_SYSTEM_MULTISELECTABLE;
-
if (childObj->isPasswordField())
pvState->lVal |= STATE_SYSTEM_PROTECTED;
@@ -276,7 +300,27 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::get_accState(VARIANT vChild, VARIANT*
if (childObj->canSetFocusAttribute())
pvState->lVal |= STATE_SYSTEM_FOCUSABLE;
- // TODO: Add selected and selectable states.
+ if (childObj->isSelected())
+ pvState->lVal |= STATE_SYSTEM_SELECTED;
+
+ if (childObj->canSetSelectedAttribute())
+ pvState->lVal |= STATE_SYSTEM_SELECTABLE;
+
+ if (childObj->isMultiSelectable())
+ pvState->lVal |= STATE_SYSTEM_EXTSELECTABLE | STATE_SYSTEM_MULTISELECTABLE;
+
+ if (!childObj->isVisible())
+ pvState->lVal |= STATE_SYSTEM_INVISIBLE;
+
+ if (childObj->isCollapsed())
+ pvState->lVal |= STATE_SYSTEM_COLLAPSED;
+
+ if (childObj->roleValue() == PopUpButtonRole) {
+ pvState->lVal |= STATE_SYSTEM_HASPOPUP;
+
+ if (!childObj->isCollapsed())
+ pvState->lVal |= STATE_SYSTEM_EXPANDED;
+ }
return S_OK;
}
@@ -335,9 +379,54 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::get_accKeyboardShortcut(VARIANT vChild
return S_OK;
}
-HRESULT STDMETHODCALLTYPE AccessibleBase::accSelect(long, VARIANT)
+HRESULT STDMETHODCALLTYPE AccessibleBase::accSelect(long selectionFlags, VARIANT vChild)
{
- return E_NOTIMPL;
+ // According to MSDN, these combinations are invalid.
+ if (((selectionFlags & (SELFLAG_ADDSELECTION | SELFLAG_REMOVESELECTION)) == (SELFLAG_ADDSELECTION | SELFLAG_REMOVESELECTION)) ||
+ ((selectionFlags & (SELFLAG_ADDSELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_ADDSELECTION | SELFLAG_TAKESELECTION)) ||
+ ((selectionFlags & (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION)) ||
+ ((selectionFlags & (SELFLAG_EXTENDSELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION)))
+ return E_INVALIDARG;
+
+ AccessibilityObject* childObject;
+ HRESULT hr = getAccessibilityObjectForChild(vChild, childObject);
+
+ if (FAILED(hr))
+ return hr;
+
+ if (selectionFlags & SELFLAG_TAKEFOCUS)
+ childObject->setFocused(true);
+
+ AccessibilityObject* parentObject = childObject->parentObject();
+ if (!parentObject)
+ return E_INVALIDARG;
+
+ if (selectionFlags & SELFLAG_TAKESELECTION) {
+ if (parentObject->isListBox()) {
+ Vector<RefPtr<AccessibilityObject> > selectedChildren(1);
+ selectedChildren[0] = childObject;
+ static_cast<AccessibilityListBox*>(parentObject)->setSelectedChildren(selectedChildren);
+ } else if (parentObject->isMenuListPopup())
+ childObject->setSelected(true);
+ else
+ return E_INVALIDARG;
+ }
+
+ // MSDN says that ADD, REMOVE, and EXTENDSELECTION are invalid for
+ // single-select.
+ if (!parentObject->isMultiSelectable())
+ return E_INVALIDARG;
+
+ if (selectionFlags & SELFLAG_ADDSELECTION)
+ childObject->setSelected(true);
+
+ if (selectionFlags & SELFLAG_REMOVESELECTION)
+ childObject->setSelected(false);
+
+ // FIXME: Should implement SELFLAG_EXTENDSELECTION. For now, we just return
+ // S_OK, matching Firefox.
+
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE AccessibleBase::get_accSelection(VARIANT*)
@@ -405,7 +494,7 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::accLocation(long* left, long* top, lon
if (!childObj->documentFrameView())
return E_FAIL;
- IntRect screenRect(childObj->documentFrameView()->contentsToScreen(childObj->boundingBoxRect()));
+ IntRect screenRect(childObj->documentFrameView()->contentsToScreen(childObj->elementRect()));
*left = screenRect.x();
*top = screenRect.y();
*width = screenRect.width();
@@ -542,8 +631,9 @@ static long MSAARole(AccessibilityRole role)
return ROLE_SYSTEM_PAGETABLIST;
case WebCore::TextFieldRole:
case WebCore::TextAreaRole:
- case WebCore::ListMarkerRole:
+ case WebCore::EditableTextRole:
return ROLE_SYSTEM_TEXT;
+ case WebCore::ListMarkerRole:
case WebCore::StaticTextRole:
return ROLE_SYSTEM_STATICTEXT;
case WebCore::OutlineRole:
@@ -555,6 +645,8 @@ static long MSAARole(AccessibilityRole role)
case WebCore::GroupRole:
return ROLE_SYSTEM_GROUPING;
case WebCore::ListRole:
+ case WebCore::ListBoxRole:
+ case WebCore::MenuListPopupRole:
return ROLE_SYSTEM_LIST;
case WebCore::TableRole:
return ROLE_SYSTEM_TABLE;
@@ -564,6 +656,12 @@ static long MSAARole(AccessibilityRole role)
case WebCore::ImageMapRole:
case WebCore::ImageRole:
return ROLE_SYSTEM_GRAPHIC;
+ case WebCore::MenuListOptionRole:
+ case WebCore::ListItemRole:
+ case WebCore::ListBoxOptionRole:
+ return ROLE_SYSTEM_LISTITEM;
+ case WebCore::PopUpButtonRole:
+ return ROLE_SYSTEM_COMBOBOX;
default:
// This is the default role for MSAA.
return ROLE_SYSTEM_CLIENT;
@@ -572,7 +670,7 @@ static long MSAARole(AccessibilityRole role)
long AccessibleBase::role() const
{
- return MSAARole(m_object->roleValue());
+ return MSAARole(m_object->roleValueForMSAA());
}
HRESULT AccessibleBase::getAccessibilityObjectForChild(VARIANT vChild, AccessibilityObject*& childObj) const
@@ -616,3 +714,10 @@ AccessibleBase* AccessibleBase::wrapper(AccessibilityObject* obj)
result = createInstance(obj);
return result;
}
+
+HRESULT AccessibleBase::isSameObject(IAccessibleComparable* other, BOOL* result)
+{
+ COMPtr<AccessibleBase> otherAccessibleBase(Query, other);
+ *result = (otherAccessibleBase == this || otherAccessibleBase->m_object == m_object);
+ return S_OK;
+}
diff --git a/WebKit/win/AccessibleBase.h b/WebKit/win/AccessibleBase.h
index 3b6bce8..ca1703f 100644
--- a/WebKit/win/AccessibleBase.h
+++ b/WebKit/win/AccessibleBase.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 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
@@ -26,14 +26,18 @@
#ifndef AccessibleBase_h
#define AccessibleBase_h
-#include <oleacc.h>
#include <WebCore/AccessibilityObject.h>
#include <WebCore/AccessibilityObjectWrapperWin.h>
+#include <WebKit/WebKit.h>
+#include <oleacc.h>
-class AccessibleBase : public IAccessible, public WebCore::AccessibilityObjectWrapper {
+class DECLSPEC_UUID("3dbd565b-db22-4d88-8e0e-778bde54524a") AccessibleBase : public IAccessibleComparable, public IServiceProvider, public WebCore::AccessibilityObjectWrapper {
public:
static AccessibleBase* createInstance(WebCore::AccessibilityObject*);
+ // IServiceProvider
+ virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppv);
+
// IUnknown
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
virtual ULONG STDMETHODCALLTYPE AddRef(void) { return ++m_refCount; }
@@ -89,6 +93,9 @@ public:
m_object = 0;
}
+ // IAccessibleComparable
+ virtual HRESULT STDMETHODCALLTYPE isSameObject(IAccessibleComparable* other, BOOL* result);
+
protected:
AccessibleBase(WebCore::AccessibilityObject*);
virtual ~AccessibleBase();
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 9ea12f6..e661272 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,785 @@
+<<<<<<< HEAD
+=======
+2010-01-29 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Drag and Drop: Windows uses "stop" sign as cursor when dragging
+ https://bugs.webkit.org/show_bug.cgi?id=34305
+ <rdar://problem/7589672>
+
+ Add a preference in WebKit (that defaults to false), for whether or not
+ we should show the custom cursors during drag and drop. However, this is
+ currently only used on Windows, and only used to hide the "drop not allowed"
+ icon inside the WebView is the preference is set to true.
+
+ This will be off by default, so no change in behavior.
+
+ * Interfaces/IWebPreferencesPrivate.idl: Added new functions.
+ * Interfaces/WebKit.idl: Touched to force Interfaces build.
+ * WebDropSource.cpp:
+ (WebDropSource::GiveFeedback): Implementation of conditional showing cursor
+ logic.
+ * WebPreferenceKeysPrivate.h: Added new preference key.
+ * WebPreferences.cpp: Added new functions.
+ (WebPreferences::setCustomDragCursorsEnabled):
+ (WebPreferences::customDragCursorsEnabled):
+ * WebPreferences.h: Added new functions.
+
+2010-01-28 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: Crash when posting a notification for a detached object
+
+ https://bugs.webkit.org/show_bug.cgi?id=34309
+ <rdar://problem/7409759>
+
+ Reviewed by Darin Adler.
+
+ * AccessibleBase.cpp:
+ (AccessibleBase::QueryService):
+ If an unrecognized service ID is passed, return early. Otherwise, return
+ the result of QueryInterface.
+ (AccessibleBase::QueryInterface):
+ Add static_casts. Check for new UUIDs.
+ (AccessibleBase::isSameObject):
+ Query the object for AccessibleBase. Return whether the pointers or the
+ wrapped objects match.
+
+ * AccessibleBase.h:
+ Give the class a UUID so we can query for it in isSameObject(). Inherit
+ from IAccessibleComparable; inherit from IServiceProvider so clients can
+ use QueryService to query for a custom interface.
+
+ * Interfaces/AccessibleComparable.idl: Added. Declares a function that
+ can be called to compare to accessible objects.
+
+ * Interfaces/WebKit.idl:
+ Include the new IDL.
+
+ * WebKit.vcproj/Interfaces.vcproj:
+ Add the new IDL to the project.
+
+2010-01-27 Aaron Boodman <aa@chromium.org>
+
+ Expand NotificationCenter::checkPermission() interface.
+ It now passes the full URL instead of just the origin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34238
+
+ * WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
+ (WebDesktopNotificationsDelegate::checkPermission):
+ * WebCoreSupport/WebDesktopNotificationsDelegate.h:
+
+2010-01-27 Adam Roben <aroben@apple.com>
+
+ Make it possible to instantiate WebSerializedJSValue using
+ WebKitCreateInstance
+
+ Reviewed by Dave Hyatt.
+
+ * ForEachCoClass.h:
+ * WebKitClassFactory.cpp:
+ Added WebSerializedJSValue.
+
+2010-01-26 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Windows build references non-existent include paths
+ https://bugs.webkit.org/show_bug.cgi?id=34175
+
+ * WebKit.vcproj/WebKit.vcproj:
+
+2010-01-25 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ A WebGeolocationControllerClient is leaked for every WebView
+ https://bugs.webkit.org/show_bug.cgi?id=34145
+
+ * WebCoreSupport/WebGeolocationControllerClient.cpp:
+ (WebGeolocationControllerClient::geolocationDestroyed): Added.
+ * WebCoreSupport/WebGeolocationControllerClient.h:
+
+2010-01-23 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ <rdar://problem/7569820> svg/custom/text-zoom.xhtml fails on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=34006
+
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings): Added WebKitZoomsTextOnlyPreferenceKey
+ with a default value of true.
+
+2010-01-20 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add missing implementation for WebGeolocationPosition::initWithTimestamp.
+
+ * WebGeolocationPosition.cpp:
+ (WebGeolocationPosition::initWithTimestamp): Implemented.
+
+2010-01-20 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: accSelect() is not implemented
+
+ https://bugs.webkit.org/show_bug.cgi?id=33918
+ <rdar://problem/7436861>
+
+ Reviewed by Darin Adler.
+
+ * AccessibleBase.cpp:
+ (AccessibleBase::accSelect):
+ If there is an invalid combination of state flags, return early. If the
+ caller passed the "take focus" flag, focus the object. If the "take
+ selection" flag was passed, check whether the parent object is an
+ AccessibilityListBox; if so, call the object's setSelectedChildren()
+ function. If the parent is an AccessibilityMenuListPopup, call the
+ child object's setSelected() function. Otherwise, if the parent is some
+ other, unsupported object, return early.
+ If the selection flags include "add", "remove", or "extend" selection,
+ and the parent object is not multi-selectable, return early. Otherwise,
+ set or unset the child's selected flag based on the passed flag.
+
+2010-01-20 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler and Adam Roben.
+
+ Feature defines are difficult to maintain on Windows builds
+ https://bugs.webkit.org/show_bug.cgi?id=33883
+
+ FeatureDefines.vsprops are now maintained in a way similar to
+ Configurations/FeatureDefines.xcconfig, with the added advantage
+ of having a single FeatureDefines file across all projects.
+
+ * WebKit.vcproj/Interfaces.vcproj: Add FeatureDefines.vsprops inherited property sheet.
+ * WebKit.vcproj/WebKit.sln: Set up Cairo configuration for WebCoreGenerated.
+ * WebKit.vcproj/WebKit.vcproj: Remove ENABLE_ preprocessor definitions.
+ Add FeatureDefines.vsprops inherited property sheet.
+ * WebKit.vcproj/WebKitGUID.vcproj: Add FeatureDefines.vsprops inherited property sheet.
+
+2010-01-17 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: The child <option> elements of a non-multiple <select> are not
+ exposed
+
+ https://bugs.webkit.org/show_bug.cgi?id=33773
+ <rdar://problem/7550556>
+
+ Reviewed by Alice Liu.
+
+ * AccessibleBase.cpp:
+ (AccessibleBase::get_accState):
+ If the object is invisible, set the invisible state flag. If the object
+ is collapsed, set the collapsed state. If the object is a combo box,
+ set the has popup flag, and if it's not collapsed, set the expanded
+ flag.
+ (MSAARole):
+ Add new WebCore to MSAA role mappings.
+
+ * WebCoreLocalizedStrings.cpp:
+ (WebCore::AXMenuListActionVerb):
+ Return the action verb that Firefox uses for <select> elements with
+ popups.
+ (WebCore::AXMenuListPopupActionVerb):
+ Return the verb that Firefox uses for a popup list.
+
+2010-01-19 John Sullivan <sullivan@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=33854
+ Would like a variant of WebHTMLRepresentation's searchForLabelsBeforeElement that returns
+ more info about where the result was found
+
+ Reviewed by Darin Adler
+
+ * Interfaces/IWebHTMLRepresentation.idl:
+ Created variant of searchForLabels that includes additional in/out parameters resultDistance and resultIsInCellAbove.
+
+ * Interfaces/WebKit.idl:
+ Touched in order to get other idl change to propagate correctly.
+
+ * WebHTMLRepresentation.cpp:
+ (WebHTMLRepresentation::deprecatedSearchForLabels):
+ Renamed since iDL doesn't support two functions with the same name but different signatures.
+ (WebHTMLRepresentation::searchForLabels):
+ Implemented variant of searchForLabels that includes additional in/out parameters resultDistance and resultIsInCellAbove.
+
+ * WebHTMLRepresentation.h:
+ Declared variant of searchForLabels that includes additional in/out parameters resultDistance and resultIsInCellAbove.
+
+2010-01-19 Adam Roben <aroben@apple.com>
+
+ Windows build fix
+
+ * WebScriptWorld.cpp: Added missing #include.
+
+2010-01-19 Dave Hyatt <hyatt@apple.com>
+
+ Build bustage fix. Make sure the newly added scriptWorldForGlobalContext function is [local] in the IDL.
+
+ * Interfaces/IWebScriptWorld.idl:
+
+2010-01-19 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Add an API to obtain a WebScriptWorld from a JSGlobalContextRef.
+
+ * Interfaces/IWebScriptWorld.idl:
+ * WebScriptWorld.cpp:
+ (WebScriptWorld::scriptWorldForGlobalContext):
+ * WebScriptWorld.h:
+
+2010-01-18 Adam Roben <aroben@apple.com>
+
+ Add IWebViewPrivate::setDomainRelaxationForbiddenForURLScheme
+
+ WebKit/win part of fixing <http://webkit.org/b/33806>
+ <rdar://problem/7552837> Would like API to disallow setting of
+ document.domain for pages with certain URL schemes
+
+ Reviewed by Sam Weinig.
+
+ * Interfaces/IWebViewPrivate.idl: Added
+ setDomainRelaxationForbiddenForURLScheme.
+
+ * Interfaces/WebKit.idl: Touched to force a build.
+
+ * WebView.cpp:
+ (WebView::setDomainRelaxationForbiddenForURLScheme):
+ * WebView.h:
+ Added. Calls through to SecurityOrigin.
+
+2010-01-18 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Use new setScrollFrame API
+ https://bugs.webkit.org/show_bug.cgi?id=32279
+
+ * WebView.cpp:
+ (WebView::updateRootLayerContents):
+
+2010-01-15 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: Screen rect for <option> elements is always the zero rect
+
+ https://bugs.webkit.org/show_bug.cgi?id=33758
+
+ Reviewed by Oliver Hunt.
+
+ * AccessibleBase.cpp:
+ (AccessibleBase::accLocation):
+ Use elementRect() rather than boundingBoxRect(), which
+ AccessibilityListBoxOption overrides.
+
+2010-01-15 Jon Honeycutt <jhoneycutt@apple.com>
+
+ get_accParent should try to retrieve parent AccessibilityObject, before
+ calling upon window
+
+ https://bugs.webkit.org/show_bug.cgi?id=22893
+
+ Reviewed by Darin Adler.
+
+ * AccessibleBase.cpp:
+ (AccessibleBase::get_accParent):
+ If the object has a parent object, return it. If not, return the
+ accessible for the WebView window.
+
+2010-01-12 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: selected, selectable, extended selectable, and multiple
+ selectable states are not reported
+
+ https://bugs.webkit.org/show_bug.cgi?id=33574
+ <rdar://problem/7536826>
+
+ Reviewed by Darin Adler.
+
+ * AccessibleBase.cpp:
+ (AccessibleBase::get_accState):
+ Remove the call to isMultiSelect(). Call the correctly-named
+ isMultiSelectable(), and if it returns true, set both the "extended
+ selectable" and "multiple selectable" states. Check whether the object
+ is selected or selectable, and report those states.
+
+2010-01-13 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Add additional Geolocation interfaces in WebKit for Windows.
+
+ * Interfaces/IWebGeolocationPolicyListener.idl: Added.
+ * Interfaces/IWebUIDelegatePrivate.idl: Add decidePolicyForGeolocationRequest to IWebUIDelegatePrivate2.
+ Append since this version hasn't shipped.
+ * Interfaces/WebKit.idl: Add include of IWebGeolocationPolicyListener.idl.
+ * WebCoreSupport/WebChromeClient.cpp:
+ (WebChromeClient::requestGeolocationPermissionForFrame): Call into decidePolicyForGeolocationRequest.
+ * WebCoreSupport/WebGeolocationControllerClient.cpp:
+ (WebGeolocationControllerClient::WebGeolocationControllerClient): Moved *.
+ * WebGeolocationPolicyListener.cpp: Added.
+ * WebGeolocationPolicyListener.h: Added.
+ * WebKit.vcproj/Interfaces.vcproj: Added IWebGeolocationPolicyListener.
+ * WebKit.vcproj/WebKit.vcproj: Added WebGeolocationPolicyListener, WebGeolocationPolicyListener.
+ * WebView.cpp:
+ (WebView::setGeolocationProvider): Removed extraneous STDMETHODCALLTYPE.
+ (WebView::geolocationProvider): Removed extraneous STDMETHODCALLTYPE.
+ (WebView::geolocationDidChangePosition): Removed extraneous STDMETHODCALLTYPE.
+ (WebView::geolocationDidFailWithError): Removed extraneous STDMETHODCALLTYPE.
+
+2010-01-12 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Adam Roben, Sam Weinig.
+
+ Add Geolocation interfaces in WebKit for Windows.
+
+ * ForEachCoClass.h: Added WebGeolocationPosition.
+ * Interfaces/IWebError.idl:
+ * Interfaces/IWebGeolocationPosition.idl: Added.
+ * Interfaces/IWebGeolocationProvider.idl: Added.
+ * Interfaces/IWebViewPrivate.idl:
+ * Interfaces/WebKit.idl:
+ * WebCoreSupport/WebGeolocationControllerClient.cpp: Added.
+ (WebGeolocationControllerClient::WebGeolocationControllerClient):
+ (WebGeolocationControllerClient::startUpdating):
+ (WebGeolocationControllerClient::stopUpdating):
+ (WebGeolocationControllerClient::lastPosition):
+ * WebCoreSupport/WebGeolocationControllerClient.h: Added.
+ * WebGeolocationPosition.cpp: Added IWebGeolocationPosition implementation.
+ * WebGeolocationPosition.h: Added IWebGeolocationPosition implementation.
+ * WebKit.vcproj/Interfaces.vcproj: Added IWebGeolocationPosition.idl, IWebGeolocationProvider.idl,
+ relocated JavaScriptCoreAPITypes.idl, WebScrollbarTypes.idl
+ * WebKit.vcproj/WebKit.vcproj: Added WebGeolocationPosition.h/.cpp, WebGeolocationControllerClient.h/cpp,
+ * WebKitClassFactory.cpp: Add WebGeolocationPosition include.
+ * WebView.cpp:
+ (WebView::initWithFrame): Create WebGeolocationControllerClient if Geolocation is enabled.
+ (WebView::setGeolocationProvider): Added Geolocation-specific method.
+ (WebView::geolocationProvider): Added Geolocation-specific method.
+ (WebView::geolocationDidChangePosition): Added Geolocation-specific method.
+ (WebView::geolocationDidFailWithError): Added Geolocation-specific method.
+ * WebView.h: Added setGeolocationProvider, geolocationProvider, geolocationDidChangePosition, geolocationDidFailWithError.
+
+2010-01-11 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: Accessibility role of <select multiple> elements is wrong
+
+ https://bugs.webkit.org/show_bug.cgi?id=33522
+
+ Reviewed by Darin Adler.
+
+ * AccessibleBase.cpp:
+ (MSAARole):
+ Map the WebCore::ListBox and WebCore::ListBoxOption roles to the MSAA
+ "list" and "list item" roles.
+
+2010-01-08 Brent Fulgham <bfulgham@webkit.org>
+
+ Build fix, no review.
+
+ Protect video control logic inside ENABLE(VIDEO).
+
+ * WebView.cpp:
+ (WebView::enterFullscreenForNode):
+ (WebView::exitFullscreen):
+ * WebView.h:
+
+2010-01-08 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Implement full-screen video for Windows
+ https://bugs.webkit.org/show_bug.cgi?id=31318
+
+ This adds a full-screen controller, FullscreenVideoController,
+ which manages going in and out of full-screen. The actual
+ full-screen window is created and managed by logic added
+ to QTMovieWin. FullscreenVideoController also creates and
+ manages a HUD. The HUD renders and manages events to
+ control the playing video. Movie controller events go to
+ FullscreenVideoController which then sends them to HTMLMediaElement,
+ which is passed to the controller by WebView, which gets the call
+ to go into full-screen mode from HTMLMediaElement via
+ ChromeClient.
+
+ I've also updated the icons so the related sets (Play/Pause and
+ volume high/volume low/exit fullscreen) are the same size. This
+ allows me to position them using common code.
+
+ * WebCoreSupport/WebChromeClient.cpp:
+ (WebChromeClient::supportsFullscreenForNode):
+ (WebChromeClient::enterFullscreenForNode):
+ (WebChromeClient::exitFullscreenForNode):
+ * WebCoreSupport/WebChromeClient.h:
+ * WebKit.vcproj/WebKit.vcproj:
+ * WebKit.vcproj/fsVideoAudioVolumeHigh.png:
+ * WebKit.vcproj/fsVideoAudioVolumeLow.png:
+ * WebKit.vcproj/fsVideoExitFullscreen.png:
+ * WebKit.vcproj/fsVideoPause.png:
+ * WebKit.vcproj/fsVideoPlay.png:
+ * WebKitDLL.cpp:
+ (loadResourceIntoBuffer):
+ * FullscreenVideoController.cpp: Added.
+ * FullscreenVideoController.h: Added.
+ * WebView.cpp:
+ (WebView::enterFullscreenForNode):
+ (WebView::exitFullscreen):
+ * WebView.h:
+
+2010-01-08 Brent Fulgham <bfulgham@webkit.org>
+
+ Unreviewed correction.
+
+ Accidentally left unnecessary modification to hdcFromContext
+ in when landing r52995.
+
+ * WebFrame.cpp:
+ (hdcFromContext): Back out unneeded modification.
+
+2010-01-08 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Use correct cairo surface data type for handling print operations.
+ https://bugs.webkit.org/show_bug.cgi?id=33022.
+
+ * WebFrame.cpp:
+ (scaleFactor): Handle 'scale = 0' case.
+ (WebFrame::spoolPage): Use scaleFactor helper function. Account for
+ margin size in region passed to header/footer routines.
+ (WebFrame::spoolPages): Properly clean up Cairo surface.
+
+2010-01-07 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Remove COM code generation files.
+ https://bugs.webkit.org/show_bug.cgi?id=32854
+
+ * WebKit.vcproj/DerivedSources.make: Removed.
+ * WebKit.vcproj/build-generated-files.sh: Removed.
+
+2010-01-05 Adam Roben <aroben@apple.com>
+
+ Make IWebView::close and destroying a WebView's HWND optional for
+ WebKit clients
+
+ WebView will now take care of these operations itself when its last
+ reference is released, if they haven't already been done.
+
+ IWebView::close now also destroys the WebView's HWND. All WebKit
+ clients were already performing these operations in succession anyway,
+ or were attempting to by calling IWebView::close then destroying the
+ WebView's host window (which actually resulted in the WebView's HWND
+ leaking, and the crash in the below bug).
+
+ Fixes <rdar://problem/7374218> <http://webkit.org/b/32827> Crash when
+ calling IWebView::close, then releasing the WebView, without calling
+ DestroyWindow
+
+ Fixes a few WebViewDestruction tests, too.
+
+ Reviewed by Steve Falkenburg.
+
+ * WebView.cpp:
+ (WebView::~WebView): Don't try to destroy m_viewWindow here. That
+ should already have happened. Assert that this is the case.
+ (WebView::close): If m_viewWindow isn't already being destroyed,
+ destroy it now. Moved the call to revokeDragDrop() here from our
+ WM_DESTROY handler because it needs to be done before m_viewWindow is
+ nulled out.
+ (WebView::WebViewWndProc): Removed call to revokeDragDrop() that
+ close() now performs.
+ (WebView::Release): If our last reference is being released, call
+ close() so that clients don't have to. (It's harmless to call close()
+ multiple times.) We do this here instead of in the destructor because
+ close() can cause AddRef() and Release() to be called, and calling
+ those from within the destructor leads to double-destruction.
+ (WebView::setHostWindow): Removed an unnecessary (and now harmful)
+ null-check.
+ (WebView::revokeDragDrop): Changed an assertion into a run-time check,
+ since this will now sometimes be called when m_viewWindow hasn't been
+ created yet. Changed the IsWindow call to a null-check because we
+ never hold onto a destroyed m_viewWindow.
+ (WebView::windowAncestryDidChange): If we don't have a view window,
+ stop tracking changes to our parent's active state.
+
+2010-01-05 Adam Roben <aroben@apple.com>
+
+ Make it safe to call IWebView::close when IWebView::initWithFrame
+ hasn't been called
+
+ Part of <rdar://problem/7374218> <http://webkit.org/b/32827> Crash
+ when IWebView::close, then releasing the WebView, without calling
+ DestroyWindow
+
+ Reviewed by Steve Falkenburg.
+
+ * WebView.cpp:
+ (WebView::close): Null-check m_page and m_preferences before using
+ them. They will be null if initWithFrame was never called.
+
+2010-01-05 Adam Roben <aroben@apple.com>
+
+ Add assertions to catch double-destruction of WebViews earlier
+
+ I basically copied the m_deletionHasBegun logic from WTF::RefCounted.
+
+ Fixes <http://webkit.org/b/33219>.
+
+ Reviewed by Darin Adler.
+
+ * WebView.cpp:
+ (WebView::WebView): Initialize m_deletionHasBegun
+ (WebView::AddRef): Assert that deletion hasn't already begun.
+ (WebView::Release): Assert that deletion hasn't already begun, then
+ record when deletion *does* begin.
+
+ * WebView.h: Added m_deletionHasBegun.
+
+2010-01-05 Adam Roben <aroben@apple.com>
+
+ Remove dead code in WebViewWndProc
+
+ Fixes <http://webkit.org/b/33218>.
+
+ Reviewed by Darin Adler.
+
+ * WebView.cpp:
+ (WebView::WebViewWndProc): Removed a redundant isBeingDestroyed check.
+ We bail out much earlier in this function if isBeingDestroyed is true.
+
+2010-01-04 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: Accessibility role of <select> elements is wrong
+
+ https://bugs.webkit.org/show_bug.cgi?id=33192
+
+ Reviewed by Sam Weinig.
+
+ * AccessibleBase.cpp:
+ (MSAARole):
+ Map WebCore::PopUpButtonRole to MSAA's ROLE_SYSTEM_COMBOBOX.
+
+2010-01-04 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33181
+ The first letter is not removed properly from inline input hole
+
+ * WebView.cpp: (WebView::onIMEEndComposition): If composition is ended before it was
+ confirmed, cancel it.
+
+2010-01-04 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33161
+ Assertion failure in WebView when using Chinese Simplified IME
+
+ * WebView.cpp: (WebView::onIMERequestCharPosition): Changed the assertion into release mode
+ check. We can't make assertions about arguments passed from outside WebKit.
+
+2010-01-04 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33157
+ Implement TextInput logging channel on Windows
+
+ * WebKitLogging.cpp: (WebKitInitializeLoggingChannelsIfNecessary):
+ * WebKitLogging.h:
+ Added a TextInput channel in place of unused Network one.
+
+ * WebView.cpp:
+ (WebView::WebViewWndProc): Changed onIMERequest to return result directly. We never forward
+ it to DefWindowProc, so there is no need to return an unused boolean result for "handled".
+ (WebView::onIMEStartComposition): Added logging.
+ (imeCompositionArgumentNames): A helper function for detailed logging in onIMEComposition.
+ (imeNotificationName): A helper function for detailed logging in onIMENotify.
+ (imeRequestName): A helper function for detailed logging in onIMERequest.
+ (WebView::onIMEComposition): Added logging.
+ (WebView::onIMEEndComposition): Ditto.
+ (WebView::onIMEChar): Ditto.
+ (WebView::onIMENotify): Ditto.
+ (WebView::onIMERequestCharPosition): Changed to return result directly.
+ (WebView::onIMERequestReconvertString): Ditto.
+ (WebView::onIMERequest): Changed to return result directly. Added logging.
+ (WebView::onIMESelect): Added logging.
+ (WebView::onIMESetContext): Added logging.
+
+ * WebView.h: onIMERequest functions now return result directly.
+
+
+2010-01-04 Adam Roben <aroben@apple.com>
+
+ Add WebKitAPITest
+
+ Fixes <http://webkit.org/b/33167>.
+
+ Reviewed by Sam Weinig.
+
+ * WebKit.vcproj/WebKit.sln: Added WebKitAPITest.vcproj. It builds just
+ after DumpRenderTree.vcproj.
+
+2010-01-04 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Ada Chan and Mark Rowe.
+
+ Updated copyright string
+
+ * WebKit.vcproj/WebKit.rc:
+
+2009-12-22 Darin Adler <darin@apple.com>
+
+ Another try at fixing Windows build.
+
+ * WebKitPrefix.cpp: Touch it.
+
+2009-12-22 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Turn off datagrid by default, at least for all platforms Apple ships.
+ The datagrid implementation isn't ready for general web use yet.
+
+ * WebKit.vcproj/WebKit.vcproj: Turn off datagrid by default.
+
+2009-12-21 Adam Roben <aroben@apple.com>
+
+ Fix non-ACCELERATED_COMPOSITING builds
+
+ * WebPreferences.cpp:
+ (WebPreferences::acceleratedCompositingEnabled): Guard use of
+ WKCACFLayerRenderer with USE(ACCELERATED_COMPOSITING).
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ Add IWebPreferencesPrivate::[set]AcceleratedCompositingEnabled
+
+ Fixes <http://webkit.org/b/32745>.
+
+ Reviewed by Ada Chan.
+
+ * Interfaces/IWebPreferencesPrivate.idl: Added
+ [set]AcceleratedCompositingEnabled.
+
+ * Interfaces/WebKit.idl: Touched to force a build.
+
+ * WebPreferenceKeysPrivate.h: Added
+ WebKitAcceleratedCompositingEnabledPreferenceKey.
+
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings): Make accelerated
+ compositing be on by default.
+ (WebPreferences::setAcceleratedCompositingEnabled): Store the new
+ value.
+ (WebPreferences::acceleratedCompositingEnabled): If accelerated
+ compositing isn't available, return false. Otherwise, return the value
+ stored in preferences.
+
+ * WebPreferences.h: Added [set]AcceleratedCompositingAvailable.
+
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged): Just pass the value from
+ WebPreferences on down.
+
+2009-12-17 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: Accessibility role of list items is wrong
+
+ https://bugs.webkit.org/show_bug.cgi?id=32688
+
+ Reviewed by Adam Roben.
+
+ * AccessibleBase.cpp:
+ (MSAARole):
+ Make the WebCore list item role map to the MSAA list item role.
+
+2009-12-17 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: Accessibility role of list markers is wrong
+
+ https://bugs.webkit.org/show_bug.cgi?id=32687
+
+ Reviewed by Adam Roben.
+
+ * AccessibleBase.cpp:
+ (MSAARole):
+ Make the WebCore list marker role map to the MSAA static text role.
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ Add #includes needed after WebCore clean-up
+
+ Rubber-stamped by Anders Carlsson.
+
+ Fixes <http://webkit.org/b/32718>.
+
+ * WebCoreSupport/WebContextMenuClient.cpp:
+ * WebDataSource.cpp:
+ * WebHTMLRepresentation.cpp:
+ * WebView.cpp:
+ * WebView.h:
+
+2009-12-17 Benjamin Otte <otte@gnome.org>
+
+ Reviewed by Adam Roben.
+
+ Don't include all JSC headers everywhere
+ https://bugs.webkit.org/show_bug.cgi?id=32663
+
+ * WebCoreLocalizedStrings.cpp: Added now-needed #include of
+ MathExtras.h.
+
+2009-12-17 Adam Roben <aroben@apple.com>
+
+ Remove WebKit.sln's Debug_All and Debug_Internal configurations
+
+ These configurations aren't buildable by people outside of Apple, and
+ Apple doesn't use this solution file.
+
+ Fixes <http://webkit.org/b/31000> Windows WebKit Build Configuration
+ should default to Debug instead of Debug_all.
+
+ Rubber-stamped by Dan Bernstein.
+
+ * WebKit.vcproj/WebKit.sln:
+
+2009-12-16 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: Accessibility role of text nodes is wrong
+
+ https://bugs.webkit.org/show_bug.cgi?id=32631
+ <rdar://problem/7369084>
+
+ Reviewed by Alice Liu.
+
+ * AccessibleBase.cpp:
+ (MSAARole):
+ If the role is WebCore::EditableTextRole, return ROLE_SYSTEM_TEXT.
+ (AccessibleBase::role):
+ Call roleValueForMSAA().
+
+2009-12-14 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Provide working printing support for WinCairo port.
+
+ * WebFrame.cpp:
+ (WebFrame::spoolPage): Conditionalize initialization of
+ PlatformGraphicsContext handling for CG vs. Cairo.
+ (scaleFactor): Add helper function.
+ (hdcFromContext): Add helper function.
+ (WebFrame::drawHeader): Correct Cairo variation.
+ (WebFrame::drawFooter): Correct Cairo variation.
+ (WebFrame::spoolPages): Correct Cairo variation.
+
+>>>>>>> webkit.org at r54127
2009-12-13 Sam Weinig <sam@webkit.org>
Reviewed by Dan Bernstein.
@@ -13,6 +795,59 @@
* WebView.cpp:
(WebView::initWithFrame):
+<<<<<<< HEAD
+=======
+2009-12-14 Adam Roben <aroben@apple.com>
+
+ Change IWebFramePrivate's vtable to be compatible with Safari 4.0.4
+
+ Reviewed by Steve Falkenburg.
+
+ Fixes <http://webkit.org/b/32433> REGRESSION (r51567): Right click on
+ a link element crashes WebKit nightly
+
+ * Interfaces/IWebFramePrivate.idl: Moved pauseSVGAnimation to the end
+ of the interface so the vtable that Safari 4.0.4 sees is unchanged.
+
+2009-12-14 Adam Roben <aroben@apple.com>
+
+ Build fix
+
+ * WebKit.vcproj/WebKit.vcproj: Added $(DXSDK_DIR)\Lib\x86 to the
+ libpath for all non-Cairo configurations (it was missing from most of
+ them).
+
+2009-12-11 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Added icons for full-screen video on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=31318
+
+ * WebKit.vcproj/WebKit.rc:
+ * WebKit.vcproj/WebKit.vcproj:
+ * WebKit.vcproj/fsVideoAudioVolumeHigh.png: Added.
+ * WebKit.vcproj/fsVideoAudioVolumeLow.png: Added.
+ * WebKit.vcproj/fsVideoExitFullscreen.png: Added.
+ * WebKit.vcproj/fsVideoPause.png: Added.
+ * WebKit.vcproj/fsVideoPlay.png: Added.
+ * WebKit.vcproj/resource.h:
+
+2009-12-11 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Delay load DLLs for accelerated compositing
+ https://bugs.webkit.org/show_bug.cgi?id=31856
+
+ If the DLLs (d3d9 and QuartzCore). are not present it
+ turns off accelerated compositing and avoids calling
+ any of the functions in the DLLs.
+
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged):
+
+>>>>>>> webkit.org at r54127
2009-12-10 Jon Honeycutt <jhoneycutt@apple.com>
Pass more information about a plug-in to the PluginHalterDelegate
diff --git a/WebKit/win/ForEachCoClass.h b/WebKit/win/ForEachCoClass.h
index 39f8e32..ab7182d 100644
--- a/WebKit/win/ForEachCoClass.h
+++ b/WebKit/win/ForEachCoClass.h
@@ -64,6 +64,8 @@
macro(WebCookieManager) \
macro(WebWorkersPrivate) \
macro(WebScriptWorld) \
+ macro(WebGeolocationPosition) \
+ macro(WebSerializedJSValue) \
// end of macro
// Everything below this point is deprecated. Please do not use.
diff --git a/WebKit/win/FullscreenVideoController.cpp b/WebKit/win/FullscreenVideoController.cpp
new file mode 100644
index 0000000..6b8e5ac
--- /dev/null
+++ b/WebKit/win/FullscreenVideoController.cpp
@@ -0,0 +1,615 @@
+/*
+ * 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 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"
+
+#if ENABLE(VIDEO)
+
+#include "FullscreenVideoController.h"
+
+#include "WebKitDLL.h"
+#include <ApplicationServices/ApplicationServices.h>
+#include <WebCore/BitmapInfo.h>
+#include <WebCore/Font.h>
+#include <WebCore/FontSelector.h>
+#include <WebCore/GraphicsContext.h>
+#include <WebCore/TextRun.h>
+#include <WebKitSystemInterface/WebKitSystemInterface.h>
+#include <windowsx.h>
+#include <wtf/StdLibExtras.h>
+
+using namespace std;
+using namespace WebCore;
+
+static const float timerInterval = 0.033;
+
+// HUD Size
+static const int windowHeight = 59;
+static const int windowWidth = 438;
+
+// Margins and button sizes
+static const int margin = 9;
+static const int marginTop = 9;
+static const int buttonSize = 25;
+static const int buttonMiniSize = 16;
+static const int volumeSliderWidth = 50;
+static const int timeSliderWidth = 310;
+static const int sliderHeight = 8;
+static const int volumeSliderButtonSize = 10;
+static const int timeSliderButtonSize = 8;
+static const int textSize = 11;
+static const float initialHUDPositionY = 0.9; // Initial Y position of HUD in percentage from top of screen
+
+// Background values
+static const int borderRadius = 12;
+static const int borderThickness = 2;
+
+// Colors
+static const unsigned int backgroundColor = 0xA0202020;
+static const unsigned int borderColor = 0xFFA0A0A0;
+static const unsigned int sliderGutterColor = 0xFF141414;
+static const unsigned int sliderButtonColor = 0xFF808080;
+static const unsigned int textColor = 0xFFFFFFFF;
+
+HUDButton::HUDButton(HUDButtonType type, const IntPoint& position)
+ : HUDWidget(IntRect(position, IntSize()))
+ , m_type(type)
+ , m_showAltButton(false)
+{
+ const char* buttonResource = 0;
+ const char* buttonResourceAlt = 0;
+ switch (m_type) {
+ case PlayPauseButton:
+ buttonResource = "fsVideoPlay";
+ buttonResourceAlt = "fsVideoPause";
+ break;
+ case TimeSliderButton:
+ break;
+ case VolumeUpButton:
+ buttonResource = "fsVideoAudioVolumeHigh";
+ break;
+ case VolumeSliderButton:
+ break;
+ case VolumeDownButton:
+ buttonResource = "fsVideoAudioVolumeLow";
+ break;
+ case ExitFullscreenButton:
+ buttonResource = "fsVideoExitFullscreen";
+ break;
+ }
+
+ if (buttonResource) {
+ m_buttonImage = Image::loadPlatformResource(buttonResource);
+ m_rect.setWidth(m_buttonImage->width());
+ m_rect.setHeight(m_buttonImage->height());
+ }
+ if (buttonResourceAlt)
+ m_buttonImageAlt = Image::loadPlatformResource(buttonResourceAlt);
+}
+
+void HUDButton::draw(GraphicsContext& context)
+{
+ Image* image = (m_showAltButton && m_buttonImageAlt) ? m_buttonImageAlt.get() : m_buttonImage.get();
+ context.drawImage(image, DeviceColorSpace, m_rect.location());
+}
+
+HUDSlider::HUDSlider(HUDSliderButtonShape shape, int buttonSize, const IntRect& rect)
+ : HUDWidget(rect)
+ , m_buttonShape(shape)
+ , m_buttonSize(buttonSize)
+ , m_buttonPosition(0)
+ , m_dragStartOffset(0)
+{
+}
+
+void HUDSlider::draw(GraphicsContext& context)
+{
+ // Draw gutter
+ IntSize radius(m_rect.height() / 2, m_rect.height() / 2);
+ context.fillRoundedRect(m_rect, radius, radius, radius, radius, Color(sliderGutterColor), DeviceColorSpace);
+
+ // Draw button
+ context.setStrokeColor(Color(sliderButtonColor), DeviceColorSpace);
+ context.setFillColor(Color(sliderButtonColor), DeviceColorSpace);
+
+ if (m_buttonShape == RoundButton) {
+ context.drawEllipse(IntRect(m_rect.location().x() + m_buttonPosition, m_rect.location().y() - (m_buttonSize - m_rect.height()) / 2, m_buttonSize, m_buttonSize));
+ return;
+ }
+
+ // Draw a diamond
+ FloatPoint points[4];
+ float half = static_cast<float>(m_buttonSize) / 2;
+ points[0].setX(m_rect.location().x() + m_buttonPosition + half);
+ points[0].setY(m_rect.location().y());
+ points[1].setX(m_rect.location().x() + m_buttonPosition + m_buttonSize);
+ points[1].setY(m_rect.location().y() + half);
+ points[2].setX(m_rect.location().x() + m_buttonPosition + half);
+ points[2].setY(m_rect.location().y() + m_buttonSize);
+ points[3].setX(m_rect.location().x() + m_buttonPosition);
+ points[3].setY(m_rect.location().y() + half);
+ context.drawConvexPolygon(4, points, true);
+}
+
+void HUDSlider::drag(const IntPoint& point, bool start)
+{
+ if (start) {
+ // When we start, we need to snap the slider position to the x position if we clicked the gutter.
+ // But if we click the button, we need to drag relative to where we clicked down. We only need
+ // to check X because we would not even get here unless Y were already inside.
+ int relativeX = point.x() - m_rect.location().x();
+ if (relativeX >= m_buttonPosition && relativeX <= m_buttonPosition + m_buttonSize)
+ m_dragStartOffset = point.x() - m_buttonPosition;
+ else
+ m_dragStartOffset = m_rect.location().x() + m_buttonSize / 2;
+ }
+
+ m_buttonPosition = max(0, min(m_rect.width() - m_buttonSize, point.x() - m_dragStartOffset));
+}
+
+FullscreenVideoController::FullscreenVideoController()
+ : m_hudWindow(0)
+ , m_videoWindow(0)
+ , m_playPauseButton(HUDButton::PlayPauseButton, IntPoint((windowWidth - buttonSize) / 2, marginTop))
+ , m_timeSliderButton(HUDButton::TimeSliderButton, IntPoint(0, 0))
+ , m_volumeUpButton(HUDButton::VolumeUpButton, IntPoint(margin + buttonMiniSize + volumeSliderWidth + buttonMiniSize / 2, marginTop + (buttonSize - buttonMiniSize) / 2))
+ , m_volumeSliderButton(HUDButton::VolumeSliderButton, IntPoint(0, 0))
+ , m_volumeDownButton(HUDButton::VolumeDownButton, IntPoint(margin, marginTop + (buttonSize - buttonMiniSize) / 2))
+ , m_exitFullscreenButton(HUDButton::ExitFullscreenButton, IntPoint(windowWidth - 2 * margin - buttonMiniSize, marginTop + (buttonSize - buttonMiniSize) / 2))
+ , m_volumeSlider(HUDSlider::RoundButton, volumeSliderButtonSize, IntRect(IntPoint(margin + buttonMiniSize, marginTop + (buttonSize - buttonMiniSize) / 2 + buttonMiniSize / 2 - sliderHeight / 2), IntSize(volumeSliderWidth, sliderHeight)))
+ , m_timeSlider(HUDSlider::DiamondButton, timeSliderButtonSize, IntRect(IntPoint(windowWidth / 2 - timeSliderWidth / 2, windowHeight - margin - sliderHeight), IntSize(timeSliderWidth, sliderHeight)))
+ , m_hitWidget(0)
+ , m_movingWindow(false)
+ , m_timer(this, &FullscreenVideoController::timerFired)
+{
+}
+
+FullscreenVideoController::~FullscreenVideoController()
+{
+ if (movie())
+ movie()->exitFullscreen();
+}
+
+QTMovieWin* FullscreenVideoController::movie() const
+{
+ return m_mediaElement ? reinterpret_cast<QTMovieWin*>(m_mediaElement->platformMedia().qtMovie) : 0;
+}
+
+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::enterFullscreen()
+{
+ if (!movie())
+ return;
+
+ m_videoWindow = movie()->enterFullscreen(this);
+
+ RECT windowRect;
+ GetClientRect(m_videoWindow, &windowRect);
+ m_fullscreenSize.setWidth(windowRect.right - windowRect.left);
+ m_fullscreenSize.setHeight(windowRect.bottom - windowRect.top);
+
+ createHUDWindow();
+}
+
+void FullscreenVideoController::exitFullscreen()
+{
+ if (movie())
+ movie()->exitFullscreen();
+
+ m_videoWindow = 0;
+ SetWindowLongPtr(m_hudWindow, 0, 0);
+ DestroyWindow(m_hudWindow);
+ m_hudWindow = 0;
+}
+
+bool FullscreenVideoController::canPlay() const
+{
+ return m_mediaElement && m_mediaElement->canPlay();
+}
+
+void FullscreenVideoController::play()
+{
+ if (m_mediaElement)
+ m_mediaElement->play();
+}
+
+void FullscreenVideoController::pause()
+{
+ if (m_mediaElement)
+ m_mediaElement->pause();
+}
+
+float FullscreenVideoController::volume() const
+{
+ return m_mediaElement ? m_mediaElement->volume() : 0;
+}
+
+void FullscreenVideoController::setVolume(float volume)
+{
+ if (m_mediaElement) {
+ ExceptionCode ec;
+ m_mediaElement->setVolume(volume, ec);
+ }
+}
+
+float FullscreenVideoController::currentTime() const
+{
+ return m_mediaElement ? m_mediaElement->currentTime() : 0;
+}
+
+void FullscreenVideoController::setCurrentTime(float value)
+{
+ if (m_mediaElement) {
+ ExceptionCode ec;
+ m_mediaElement->setCurrentTime(value, ec);
+ }
+}
+
+float FullscreenVideoController::duration() const
+{
+ return m_mediaElement ? m_mediaElement->duration() : 0;
+}
+
+void FullscreenVideoController::beginScrubbing()
+{
+ if (m_mediaElement)
+ m_mediaElement->beginScrubbing();
+}
+
+void FullscreenVideoController::endScrubbing()
+{
+ if (m_mediaElement)
+ m_mediaElement->endScrubbing();
+}
+
+LRESULT FullscreenVideoController::fullscreenClientWndProc(HWND wnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ switch (message) {
+ case WM_CHAR:
+ onChar(wParam);
+ break;
+ case WM_LBUTTONDOWN:
+ onMouseDown(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)));
+ break;
+ case WM_MOUSEMOVE:
+ onMouseMove(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)));
+ break;
+ case WM_LBUTTONUP:
+ onMouseUp(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)));
+ break;
+ }
+
+ return DefWindowProc(wnd, message, wParam, lParam);
+}
+
+static const LPCWSTR fullscreenVideeoHUDWindowClassName = L"fullscreenVideeoHUDWindowClass";
+
+void FullscreenVideoController::registerHUDWindowClass()
+{
+ static bool haveRegisteredHUDWindowClass;
+ if (haveRegisteredHUDWindowClass)
+ return;
+
+ haveRegisteredHUDWindowClass = true;
+
+ WNDCLASSEX wcex;
+
+ wcex.cbSize = sizeof(WNDCLASSEX);
+
+ wcex.style = CS_HREDRAW | CS_VREDRAW;
+ wcex.lpfnWndProc = hudWndProc;
+ wcex.cbClsExtra = 0;
+ wcex.cbWndExtra = 4;
+ wcex.hInstance = gInstance;
+ wcex.hIcon = 0;
+ wcex.hCursor = LoadCursor(0, IDC_ARROW);
+ wcex.hbrBackground = 0;
+ wcex.lpszMenuName = 0;
+ wcex.lpszClassName = fullscreenVideeoHUDWindowClassName;
+ wcex.hIconSm = 0;
+
+ RegisterClassEx(&wcex);
+}
+
+void FullscreenVideoController::createHUDWindow()
+{
+ m_hudPosition.setX((m_fullscreenSize.width() - windowWidth) / 2);
+ m_hudPosition.setY(m_fullscreenSize.height() * initialHUDPositionY - windowHeight / 2);
+
+ // Local variable that will hold the returned pixels. No need to cleanup this value. It
+ // will get cleaned up when m_bitmap is destroyed in the dtor
+ void* pixels;
+ BitmapInfo bitmapInfo = BitmapInfo::createBottomUp(IntSize(windowWidth, windowHeight));
+ m_bitmap.set(::CreateDIBSection(0, &bitmapInfo, DIB_RGB_COLORS, &pixels, 0, 0));
+
+ // Dirty the window so the HUD draws
+ RECT clearRect = { m_hudPosition.x(), m_hudPosition.y(), m_hudPosition.x() + windowWidth, m_hudPosition.y() + windowHeight };
+ InvalidateRect(m_videoWindow, &clearRect, true);
+
+ m_playPauseButton.setShowAltButton(!canPlay());
+ m_volumeSlider.setValue(volume());
+ m_timeSlider.setValue(currentTime() / duration());
+
+ if (!canPlay())
+ m_timer.startRepeating(timerInterval);
+
+ registerHUDWindowClass();
+
+ m_hudWindow = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOPMOST | WS_EX_TOOLWINDOW,
+ fullscreenVideeoHUDWindowClassName, 0, WS_POPUP | WS_VISIBLE,
+ m_hudPosition.x(), m_hudPosition.y(), 0, 0, 0, 0, gInstance, 0);
+ ASSERT(::IsWindow(m_hudWindow));
+ SetWindowLongPtr(m_hudWindow, 0, reinterpret_cast<LONG_PTR>(this));
+
+ draw();
+}
+
+static String timeToString(float time)
+{
+ if (!isfinite(time))
+ time = 0;
+ int seconds = fabsf(time);
+ int hours = seconds / (60 * 60);
+ int minutes = (seconds / 60) % 60;
+ seconds %= 60;
+
+ if (hours) {
+ if (hours > 9)
+ return String::format("%s%02d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds);
+ return String::format("%s%01d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds);
+ }
+
+ return String::format("%s%02d:%02d", (time < 0 ? "-" : ""), minutes, seconds);
+}
+
+void FullscreenVideoController::draw()
+{
+ HDC windowDC = GetDC(m_hudWindow);
+ HDC bitmapDC = CreateCompatibleDC(windowDC);
+ ::ReleaseDC(m_hudWindow, windowDC);
+ SelectObject(bitmapDC, m_bitmap.get());
+
+ GraphicsContext context(bitmapDC, true);
+
+ context.save();
+
+ // Draw the background
+ IntSize outerRadius(borderRadius, borderRadius);
+ IntRect outerRect(0, 0, windowWidth, windowHeight);
+ IntSize innerRadius(borderRadius - borderThickness, borderRadius - borderThickness);
+ IntRect innerRect(borderThickness, borderThickness, windowWidth - borderThickness * 2, windowHeight - borderThickness * 2);
+
+ context.fillRoundedRect(outerRect, outerRadius, outerRadius, outerRadius, outerRadius, Color(borderColor), DeviceColorSpace);
+ context.setCompositeOperation(CompositeCopy);
+ context.fillRoundedRect(innerRect, innerRadius, innerRadius, innerRadius, innerRadius, Color(backgroundColor), DeviceColorSpace);
+
+ // Draw the widgets
+ m_playPauseButton.draw(context);
+ m_volumeUpButton.draw(context);
+ m_volumeSliderButton.draw(context);
+ m_volumeDownButton.draw(context);
+ m_timeSliderButton.draw(context);
+ m_exitFullscreenButton.draw(context);
+ m_volumeSlider.draw(context);
+ m_timeSlider.draw(context);
+
+ // Draw the text strings
+ FontDescription desc;
+
+ NONCLIENTMETRICS metrics;
+ metrics.cbSize = sizeof(metrics);
+ SystemParametersInfo(SPI_GETNONCLIENTMETRICS, metrics.cbSize, &metrics, 0);
+ FontFamily family;
+ family.setFamily(metrics.lfSmCaptionFont.lfFaceName);
+ desc.setFamily(family);
+
+ desc.setComputedSize(textSize);
+ Font font = Font(desc, 0, 0);
+ font.update(0);
+
+ String s;
+
+ // The y positioning of these two text strings is tricky because they are so small. They
+ // are currently positioned relative to the center of the slider and then down the font
+ // height / 4 (which is actually half of font height /2), which positions the center of
+ // the text at the center of the slider.
+ // Left string
+ s = timeToString(currentTime());
+ TextRun leftText(s);
+ context.setFillColor(Color(textColor), DeviceColorSpace);
+ context.drawText(font, leftText, IntPoint(windowWidth / 2 - timeSliderWidth / 2 - margin - font.width(leftText), windowHeight - margin - sliderHeight / 2 + font.height() / 4));
+
+ // Right string
+ s = timeToString(currentTime() - duration());
+ TextRun rightText(s);
+ context.setFillColor(Color(textColor), DeviceColorSpace);
+ context.drawText(font, rightText, IntPoint(windowWidth / 2 + timeSliderWidth / 2 + margin, windowHeight - margin - sliderHeight / 2 + font.height() / 4));
+
+ // Copy to the window
+ BLENDFUNCTION blendFunction = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA};
+ SIZE size = { windowWidth, windowHeight };
+ POINT sourcePoint = {0, 0};
+ POINT destPoint = { m_hudPosition.x(), m_hudPosition.y() };
+ BOOL result = UpdateLayeredWindow(m_hudWindow, 0, &destPoint, &size, bitmapDC, &sourcePoint, 0, &blendFunction, ULW_ALPHA);
+
+ context.restore();
+
+ ::DeleteDC(bitmapDC);
+}
+
+LRESULT FullscreenVideoController::hudWndProc(HWND wnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ LONG_PTR longPtr = GetWindowLongPtr(wnd, 0);
+ FullscreenVideoController* controller = reinterpret_cast<FullscreenVideoController*>(longPtr);
+ if (!controller)
+ return DefWindowProc(wnd, message, wParam, lParam);
+
+ switch (message) {
+ case WM_CHAR:
+ controller->onChar(wParam);
+ break;
+ case WM_LBUTTONDOWN:
+ controller->onMouseDown(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)));
+ break;
+ case WM_MOUSEMOVE:
+ controller->onMouseMove(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)));
+ break;
+ case WM_LBUTTONUP:
+ controller->onMouseUp(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)));
+ break;
+ }
+
+ return DefWindowProc(wnd, message, wParam, lParam);
+}
+
+void FullscreenVideoController::onChar(int c)
+{
+ if (c == VK_ESCAPE) {
+ if (m_mediaElement)
+ m_mediaElement->exitFullscreen();
+ } else if (c == VK_SPACE)
+ togglePlay();
+}
+
+void FullscreenVideoController::timerFired(Timer<FullscreenVideoController>*)
+{
+ // Update the time slider
+ m_timeSlider.setValue(currentTime() / duration());
+ draw();
+}
+
+void FullscreenVideoController::onMouseDown(const IntPoint& point)
+{
+ IntPoint convertedPoint(fullScreenToHUDCoordinates(point));
+
+ // Don't bother hit testing if we're outside the bounds of the window
+ if (convertedPoint.x() < 0 || convertedPoint.x() >= windowWidth || convertedPoint.y() < 0 || convertedPoint.y() >= windowHeight)
+ return;
+
+ m_hitWidget = 0;
+ m_movingWindow = false;
+
+ if (m_playPauseButton.hitTest(convertedPoint))
+ m_hitWidget = &m_playPauseButton;
+ else if (m_exitFullscreenButton.hitTest(convertedPoint))
+ m_hitWidget = &m_exitFullscreenButton;
+ else if (m_volumeUpButton.hitTest(convertedPoint))
+ m_hitWidget = &m_volumeUpButton;
+ else if (m_volumeDownButton.hitTest(convertedPoint))
+ m_hitWidget = &m_volumeDownButton;
+ else if (m_volumeSlider.hitTest(convertedPoint)) {
+ m_hitWidget = &m_volumeSlider;
+ m_volumeSlider.drag(convertedPoint, true);
+ setVolume(m_volumeSlider.value());
+ } else if (m_timeSlider.hitTest(convertedPoint)) {
+ m_hitWidget = &m_timeSlider;
+ m_timeSlider.drag(convertedPoint, true);
+ beginScrubbing();
+ setCurrentTime(m_timeSlider.value() * duration());
+ }
+
+ // If we did not pick any of our widgets we are starting a window move
+ if (!m_hitWidget) {
+ m_moveOffset = convertedPoint;
+ m_movingWindow = true;
+ }
+
+ draw();
+}
+
+void FullscreenVideoController::onMouseMove(const IntPoint& point)
+{
+ IntPoint convertedPoint(fullScreenToHUDCoordinates(point));
+
+ if (m_hitWidget) {
+ m_hitWidget->drag(convertedPoint, false);
+ if (m_hitWidget == &m_volumeSlider)
+ setVolume(m_volumeSlider.value());
+ else if (m_hitWidget == &m_timeSlider)
+ setCurrentTime(m_timeSlider.value() * duration());
+ draw();
+ } else if (m_movingWindow)
+ m_hudPosition.move(convertedPoint.x() - m_moveOffset.x(), convertedPoint.y() - m_moveOffset.y());
+}
+
+void FullscreenVideoController::onMouseUp(const IntPoint& point)
+{
+ IntPoint convertedPoint(fullScreenToHUDCoordinates(point));
+ m_movingWindow = false;
+
+ if (m_hitWidget) {
+ if (m_hitWidget == &m_playPauseButton && m_playPauseButton.hitTest(convertedPoint))
+ togglePlay();
+ else if (m_hitWidget == &m_volumeUpButton && m_volumeUpButton.hitTest(convertedPoint)) {
+ setVolume(1);
+ m_volumeSlider.setValue(1);
+ } else if (m_hitWidget == &m_volumeDownButton && m_volumeDownButton.hitTest(convertedPoint)) {
+ setVolume(0);
+ m_volumeSlider.setValue(0);
+ } else if (m_hitWidget == &m_timeSlider)
+ endScrubbing();
+ else if (m_hitWidget == &m_exitFullscreenButton && m_exitFullscreenButton.hitTest(convertedPoint)) {
+ m_hitWidget = 0;
+ if (m_mediaElement)
+ m_mediaElement->exitFullscreen();
+ return;
+ }
+ }
+
+ m_hitWidget = 0;
+ draw();
+}
+
+void FullscreenVideoController::togglePlay()
+{
+ if (canPlay())
+ play();
+ else
+ pause();
+
+ m_playPauseButton.setShowAltButton(!canPlay());
+
+ // Run a timer while the video is playing so we can keep the time
+ // slider and time values up to date.
+ if (!canPlay())
+ m_timer.startRepeating(timerInterval);
+ else
+ m_timer.stop();
+
+ draw();
+}
+
+#endif
diff --git a/WebKit/win/FullscreenVideoController.h b/WebKit/win/FullscreenVideoController.h
new file mode 100644
index 0000000..b39e30c
--- /dev/null
+++ b/WebKit/win/FullscreenVideoController.h
@@ -0,0 +1,173 @@
+/*
+ * 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 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 FullscreenVideoController_h
+#define FullscreenVideoController_h
+
+#if ENABLE(VIDEO)
+
+#include "QTMovieWin.h"
+
+#include <WebCore/HTMLMediaElement.h>
+#include <WebCore/Image.h>
+#include <WebCore/IntPoint.h>
+#include <WebCore/IntSize.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+class GraphicsContext;
+}
+
+class HUDWidget {
+public:
+ HUDWidget(const WebCore::IntRect& rect) : m_rect(rect) { }
+
+ virtual ~HUDWidget() { }
+
+ virtual void draw(WebCore::GraphicsContext&) = 0;
+ virtual void drag(const WebCore::IntPoint&, bool start) = 0;
+ bool hitTest(const WebCore::IntPoint& point) const { return m_rect.contains(point); }
+
+protected:
+ WebCore::IntRect m_rect;
+};
+
+class HUDButton : public HUDWidget {
+public:
+ enum HUDButtonType {
+ NoButton,
+ PlayPauseButton,
+ TimeSliderButton,
+ VolumeUpButton,
+ VolumeSliderButton,
+ VolumeDownButton,
+ ExitFullscreenButton
+ };
+
+ HUDButton(HUDButtonType, const WebCore::IntPoint&);
+ ~HUDButton() { }
+
+ virtual void draw(WebCore::GraphicsContext&);
+ virtual void drag(const WebCore::IntPoint&, bool start) { }
+ void setShowAltButton(bool b) { m_showAltButton = b; }
+
+private:
+ RefPtr<WebCore::Image> m_buttonImage;
+ RefPtr<WebCore::Image> m_buttonImageAlt;
+ HUDButtonType m_type;
+ bool m_showAltButton;
+};
+
+class HUDSlider : public HUDWidget {
+public:
+ enum HUDSliderButtonShape { RoundButton, DiamondButton };
+
+ HUDSlider(HUDSliderButtonShape, int buttonSize, const WebCore::IntRect& rect);
+ ~HUDSlider() { }
+
+ virtual void draw(WebCore::GraphicsContext&);
+ virtual void drag(const WebCore::IntPoint&, bool start);
+ float value() const { return static_cast<float>(m_buttonPosition) / (m_rect.width() - m_buttonSize); }
+ void setValue(float value) { m_buttonPosition = static_cast<int>(value * (m_rect.width() - m_buttonSize)); }
+
+private:
+ HUDSliderButtonShape m_buttonShape;
+ int m_buttonSize;
+ int m_buttonPosition;
+ int m_dragStartOffset;
+};
+
+class FullscreenVideoController : QTMovieWinFullscreenClient, public Noncopyable {
+public:
+ FullscreenVideoController();
+ virtual ~FullscreenVideoController();
+
+ void setMediaElement(WebCore::HTMLMediaElement*);
+ WebCore::HTMLMediaElement* mediaElement() const { return m_mediaElement.get(); }
+
+ void enterFullscreen();
+ void exitFullscreen();
+
+private:
+ // QTMovieWinFullscreenClient
+ virtual LRESULT fullscreenClientWndProc(HWND, UINT message, WPARAM, LPARAM);
+
+ void ensureWindow();
+ QTMovieWin* movie() const;
+
+ bool canPlay() const;
+ void play();
+ void pause();
+ float volume() const;
+ void setVolume(float);
+ float currentTime() const;
+ void setCurrentTime(float);
+ float duration() const;
+ void beginScrubbing();
+ void endScrubbing();
+
+ WebCore::IntPoint fullScreenToHUDCoordinates(const WebCore::IntPoint& point) const
+ {
+ return WebCore::IntPoint(point.x()- m_hudPosition.x(), point.y() - m_hudPosition.y());
+ }
+
+ static void registerHUDWindowClass();
+ static LRESULT CALLBACK hudWndProc(HWND, UINT message, WPARAM, LPARAM);
+ void createHUDWindow();
+ void timerFired(WebCore::Timer<FullscreenVideoController>*);
+
+ void togglePlay();
+ void draw();
+
+ void onChar(int c);
+ void onMouseDown(const WebCore::IntPoint&);
+ void onMouseMove(const WebCore::IntPoint&);
+ void onMouseUp(const WebCore::IntPoint&);
+
+ RefPtr<WebCore::HTMLMediaElement> m_mediaElement;
+
+ HWND m_hudWindow, m_videoWindow;
+ OwnPtr<HBITMAP> m_bitmap;
+ WebCore::IntSize m_fullscreenSize;
+ WebCore::IntPoint m_hudPosition;
+
+ HUDButton m_playPauseButton;
+ HUDButton m_timeSliderButton;
+ HUDButton m_volumeUpButton;
+ HUDButton m_volumeSliderButton;
+ HUDButton m_volumeDownButton;
+ HUDButton m_exitFullscreenButton;
+ HUDSlider m_volumeSlider;
+ HUDSlider m_timeSlider;
+
+ HUDWidget* m_hitWidget;
+ WebCore::IntPoint m_moveOffset;
+ bool m_movingWindow;
+ WebCore::Timer<FullscreenVideoController> m_timer;
+};
+
+#endif
+
+#endif // FullscreenVideoController_h
diff --git a/WebKit/win/Interfaces/AccessibleComparable.idl b/WebKit/win/Interfaces/AccessibleComparable.idl
new file mode 100644
index 0000000..710e0d1
--- /dev/null
+++ b/WebKit/win/Interfaces/AccessibleComparable.idl
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR 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 DO_NO_IMPORTS
+import "oaidl.idl";
+import "ocidl.idl";
+#endif
+
+import "oleacc.idl";
+
+cpp_quote("extern const GUID __declspec(selectany) SID_AccessibleComparable = { 0x62b8cb5f, 0xfb7a, 0x4faf, 0x81, 0xe8, 0x52, 0xb6, 0x5f, 0x12, 0x8b, 0x31 };")
+
+[
+ object,
+ uuid(4f0381ad-dab3-42ad-9ca2-a85b0ae041c0),
+ hidden,
+ dual,
+ pointer_default(unique)
+]
+interface IAccessibleComparable : IAccessible
+{
+ HRESULT isSameObject([in] IAccessibleComparable* other, [out, retval] BOOL* result);
+}
diff --git a/WebKit/win/Interfaces/IWebError.idl b/WebKit/win/Interfaces/IWebError.idl
index 4353ac6..e4a4ae9 100644
--- a/WebKit/win/Interfaces/IWebError.idl
+++ b/WebKit/win/Interfaces/IWebError.idl
@@ -99,6 +99,15 @@ enum {
WebKitErrorJavaUnavailable = 202,
};
+/*!
+ @enum
+ @abstract Geolocation errors
+ @constant WebKitErrorGeolocationLocationUnknown
+*/
+enum {
+ WebKitErrorGeolocationLocationUnknown = 300,
+};
+
cpp_quote("#define WebKitErrorMIMETypeKey TEXT(\"WebKitErrorMIMETypeKey\")")
cpp_quote("#define WebKitErrorPlugInNameKey TEXT(\"WebKitErrorPlugInNameKey\")")
cpp_quote("#define WebKitErrorPlugInPageURLStringKey TEXT(\"WebKitErrorPlugInPageURLStringKey\")")
diff --git a/WebKit/win/Interfaces/IWebFramePrivate.idl b/WebKit/win/Interfaces/IWebFramePrivate.idl
index 3ba71c8..ef1c133 100755
--- a/WebKit/win/Interfaces/IWebFramePrivate.idl
+++ b/WebKit/win/Interfaces/IWebFramePrivate.idl
@@ -89,7 +89,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 pauseSVGAnimation([in] BSTR elementId, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* animationWasRunning);
HRESULT numberOfActiveAnimations([out, retval] UINT* number);
HRESULT isDisplayingStandaloneImage([out, retval] BOOL* result);
@@ -101,4 +100,6 @@ interface IWebFramePrivate : IUnknown
[local] JSGlobalContextRef globalContextForScriptWorld([in] IWebScriptWorld*);
HRESULT counterValueForElementById([in] BSTR id, [out, retval] BSTR* result);
+
+ HRESULT pauseSVGAnimation([in] BSTR elementId, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* animationWasRunning);
}
diff --git a/WebKit/win/Interfaces/IWebGeolocationPolicyListener.idl b/WebKit/win/Interfaces/IWebGeolocationPolicyListener.idl
new file mode 100644
index 0000000..54b00bd
--- /dev/null
+++ b/WebKit/win/Interfaces/IWebGeolocationPolicyListener.idl
@@ -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 DO_NO_IMPORTS
+import "oaidl.idl";
+import "ocidl.idl";
+#endif
+
+[
+ object,
+ oleautomation,
+ uuid(1300A76E-26DF-4BED-B79F-3930D7A4202F),
+ pointer_default(unique)
+]
+interface IWebGeolocationPolicyListener : IUnknown
+{
+ HRESULT allow();
+ HRESULT deny();
+}
diff --git a/WebKit/win/Interfaces/IWebGeolocationPosition.idl b/WebKit/win/Interfaces/IWebGeolocationPosition.idl
new file mode 100644
index 0000000..c8f8eb4
--- /dev/null
+++ b/WebKit/win/Interfaces/IWebGeolocationPosition.idl
@@ -0,0 +1,39 @@
+/*
+ * 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 DO_NO_IMPORTS
+import "oaidl.idl";
+import "ocidl.idl";
+#endif
+
+[
+ object,
+ oleautomation,
+ uuid(8C92A6B9-4CBB-4626-A596-24C1B47D7CC7),
+ pointer_default(unique)
+]
+interface IWebGeolocationPosition : IUnknown
+{
+ HRESULT initWithTimestamp([in] double timestamp, [in] double latitude, [in] double longitude, [in] double accuracy);
+}
diff --git a/WebKit/win/Interfaces/IWebGeolocationProvider.idl b/WebKit/win/Interfaces/IWebGeolocationProvider.idl
new file mode 100644
index 0000000..9a8cb32
--- /dev/null
+++ b/WebKit/win/Interfaces/IWebGeolocationProvider.idl
@@ -0,0 +1,44 @@
+/*
+ * 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 DO_NO_IMPORTS
+import "oaidl.idl";
+import "ocidl.idl";
+#endif
+
+interface IWebView;
+interface IWebGeolocationPosition;
+
+[
+ object,
+ oleautomation,
+ uuid(47F4CCF6-963D-4306-BE0B-8205C94672B5),
+ pointer_default(unique)
+]
+interface IWebGeolocationProvider : IUnknown
+{
+ HRESULT registerWebView([in] IWebView* webView);
+ HRESULT unregisterWebView([in] IWebView* webView);
+ HRESULT lastPosition([out, retval] IWebGeolocationPosition** lastPosition);
+}
diff --git a/WebKit/win/Interfaces/IWebHTMLRepresentation.idl b/WebKit/win/Interfaces/IWebHTMLRepresentation.idl
index 7fbd451..ff39c0a 100644
--- a/WebKit/win/Interfaces/IWebHTMLRepresentation.idl
+++ b/WebKit/win/Interfaces/IWebHTMLRepresentation.idl
@@ -95,11 +95,17 @@ interface IWebHTMLRepresentation : IUnknown
/*
- (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element;
+ Deprecated: use the variant that includes resultDistance and resultIsInCellAbove instead.
*/
- HRESULT searchForLabels([in, size_is(cLabels)] BSTR* labels, [in] int cLabels, [in] IDOMElement* beforeElement, [out, retval] BSTR* result);
+ HRESULT deprecatedSearchForLabels([in, size_is(cLabels)] BSTR* labels, [in] int cLabels, [in] IDOMElement* beforeElement, [out, retval] BSTR* result);
/*
- (NSString *)matchLabels:(NSArray *)labels againstElement:(DOMElement *)element;
*/
HRESULT matchLabels([in, size_is(cLabels)] BSTR* labels, [in] int cLabels, [in] IDOMElement* againstElement, [out, retval] BSTR* result);
+
+ /*
+ - (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element resultDistance:(NSUInteger*)outDistance resultIsInCellAbove:(BOOL*)outIsInCellAbove;
+ */
+ HRESULT searchForLabels([in, size_is(cLabels)] BSTR* labels, [in] unsigned cLabels, [in] IDOMElement* beforeElement, [out] unsigned* resultDistance, [out] BOOL* resultIsInCellAbove, [out, retval] BSTR* result);
}
diff --git a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
index bec70e2..1293fb8 100644
--- a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
+++ b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
@@ -91,4 +91,10 @@ interface IWebPreferencesPrivate : IUnknown
HRESULT setPluginAllowedRunTime([in] UINT allowedRunTime);
HRESULT pluginAllowedRunTime([out, retval] UINT* allowedRunTime);
+
+ HRESULT setAcceleratedCompositingEnabled([in] BOOL);
+ HRESULT acceleratedCompositingEnabled([out, retval] BOOL*);
+
+ HRESULT setCustomDragCursorsEnabled([in] BOOL);
+ HRESULT customDragCursorsEnabled([out, retval] BOOL*);
}
diff --git a/WebKit/win/Interfaces/IWebScriptWorld.idl b/WebKit/win/Interfaces/IWebScriptWorld.idl
index 255255c..bd8012d 100644
--- a/WebKit/win/Interfaces/IWebScriptWorld.idl
+++ b/WebKit/win/Interfaces/IWebScriptWorld.idl
@@ -25,6 +25,7 @@
#ifndef DO_NO_IMPORTS
import "oaidl.idl";
import "ocidl.idl";
+import "JavaScriptCoreAPITypes.idl";
#endif
[
@@ -35,4 +36,5 @@ import "ocidl.idl";
]
interface IWebScriptWorld : IUnknown {
HRESULT standardWorld([out, retval] IWebScriptWorld**);
+ [local] HRESULT scriptWorldForGlobalContext([in] JSGlobalContextRef, [out, retval] IWebScriptWorld**);
}
diff --git a/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl b/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl
index e09aac4..ce00430 100755
--- a/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl
+++ b/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl
@@ -26,6 +26,7 @@
#ifndef DO_NO_IMPORTS
import "oaidl.idl";
import "ocidl.idl";
+import "IWebGeolocationPolicyListener.idl";
import "IWebSecurityOrigin.idl";
import "IWebView.idl";
#endif
@@ -37,6 +38,7 @@ cpp_quote("#define WebEmbeddedViewMIMETypeKey TEXT(\"WebEmbeddedViewMIMETypeKey\
interface IWebEmbeddedView;
interface IWebFrame;
+interface IWebGeolocationPolicyListener;
interface IWebSecurityOrigin;
interface IWebView;
@@ -94,4 +96,6 @@ interface IWebUIDelegatePrivate2 : IWebUIDelegatePrivate
HRESULT createWebViewWithRequest([in] IWebView* sender, [in] IWebURLRequest* request, [in] IPropertyBag* windowFeatures, [out, retval] IWebView** newWebView);
HRESULT drawBackground([in] IWebView* sender, [in] OLE_HANDLE hdc, [in] const RECT* dirtyRect);
+
+ HRESULT decidePolicyForGeolocationRequest([in] IWebView* sender, [in] IWebFrame* frame, [in] IWebSecurityOrigin* origin, [in] IWebGeolocationPolicyListener* listener);
}
diff --git a/WebKit/win/Interfaces/IWebViewPrivate.idl b/WebKit/win/Interfaces/IWebViewPrivate.idl
index 1c8cea2..7ab2304 100644
--- a/WebKit/win/Interfaces/IWebViewPrivate.idl
+++ b/WebKit/win/Interfaces/IWebViewPrivate.idl
@@ -219,4 +219,11 @@ interface IWebViewPrivate : IUnknown
HRESULT isNodeHaltedPlugin([in] IDOMNode*, [retval, out] BOOL*);
HRESULT restartHaltedPluginForNode([in] IDOMNode*);
HRESULT hasPluginForNodeBeenHalted([in] IDOMNode*, [retval, out] BOOL*);
+
+ HRESULT setGeolocationProvider([in] IWebGeolocationProvider* locationProvider);
+ HRESULT geolocationProvider([out, retval] IWebGeolocationProvider** locationProvider);
+ HRESULT geolocationDidChangePosition([in] IWebGeolocationPosition* position);
+ HRESULT geolocationDidFailWithError([in] IWebError* error);
+
+ HRESULT setDomainRelaxationForbiddenForURLScheme([in] BOOL forbidden, [in] BSTR scheme);
}
diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl
index 7b308db..94dc697 100644
--- a/WebKit/win/Interfaces/WebKit.idl
+++ b/WebKit/win/Interfaces/WebKit.idl
@@ -45,7 +45,7 @@ cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY")
cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT")
cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE")
-cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ")
+cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.")
cpp_quote(" */")
#include "autoversion.h"
@@ -55,6 +55,7 @@ cpp_quote(" */")
import "oaidl.idl";
import "ocidl.idl";
+#include "AccessibleComparable.idl"
#include "WebScrollbarTypes.idl"
#include "JavaScriptCoreAPITypes.idl"
#include "IWebScriptObject.idl"
@@ -88,6 +89,9 @@ import "ocidl.idl";
#include "IWebFrameLoadDelegatePrivate2.idl"
#include "IWebFramePrivate.idl"
#include "IWebFrameView.idl"
+#include "IWebGeolocationPolicyListener.idl"
+#include "IWebGeolocationPosition.idl"
+#include "IWebGeolocationProvider.idl"
#include "IWebHTMLRepresentation.idl"
#include "IWebHTTPURLResponse.idl"
#include "IWebHistory.idl"
@@ -284,4 +288,10 @@ library WebKit
coclass WebSerializedJSValue {
[default] interface IWebSerializedJSValue;
}
+
+ [uuid(67712611-83CF-4703-89FC-07A0E2A19C0D)]
+ coclass WebGeolocationPosition {
+ [default] interface IWebGeolocationPosition;
+ }
}
+
diff --git a/WebKit/win/WebCoreLocalizedStrings.cpp b/WebKit/win/WebCoreLocalizedStrings.cpp
index 9ee22db..5850605 100644
--- a/WebKit/win/WebCoreLocalizedStrings.cpp
+++ b/WebKit/win/WebCoreLocalizedStrings.cpp
@@ -28,6 +28,7 @@
#include <WebCore/IntSize.h>
#include <WebCore/LocalizedStrings.h>
#include <WebCore/PlatformString.h>
+#include <wtf/MathExtras.h>
#include <wtf/RetainPtr.h>
using namespace WebCore;
@@ -91,6 +92,8 @@ String WebCore::AXTextFieldActionVerb() { return String(LPCTSTR_UI_STRING("activ
String WebCore::AXCheckedCheckBoxActionVerb() { return String(LPCTSTR_UI_STRING("uncheck", "Verb stating the action that will occur when a checked checkbox is clicked, as used by accessibility")); }
String WebCore::AXUncheckedCheckBoxActionVerb() { return String(LPCTSTR_UI_STRING("check", "Verb stating the action that will occur when an unchecked checkbox is clicked, as used by accessibility")); }
String WebCore::AXLinkActionVerb() { return String(LPCTSTR_UI_STRING("jump", "Verb stating the action that will occur when a link is clicked, as used by accessibility")); }
+String WebCore::AXMenuListActionVerb() { return String(LPCTSTR_UI_STRING("open", "Verb stating the action that will occur when a select element is clicked, as used by accessibility")); }
+String WebCore::AXMenuListPopupActionVerb() { return String(LPCTSTR_UI_STRING("press", "Verb stating the action that will occur when a select element's popup list is clicked, as used by accessibility")); }
String WebCore::unknownFileSizeText() { return String(LPCTSTR_UI_STRING("Unknown", "Unknown filesize FTP directory listing item")); }
String WebCore::uploadFileText() { return String(LPCTSTR_UI_STRING("Upload file", "(Windows) Form submit file upload dialog title")); }
String WebCore::allFilesText() { return String(LPCTSTR_UI_STRING("All Files", "(Windows) Form submit file upload all files pop-up")); }
diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.cpp b/WebKit/win/WebCoreSupport/WebChromeClient.cpp
index 6e82caf..a1bb3a8 100644
--- a/WebKit/win/WebCoreSupport/WebChromeClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebChromeClient.cpp
@@ -30,6 +30,7 @@
#include "COMVariantSetter.h"
#include "WebElementPropertyBag.h"
#include "WebFrame.h"
+#include "WebGeolocationPolicyListener.h"
#include "WebHistory.h"
#include "WebMutableURLRequest.h"
#include "WebDesktopNotificationsDelegate.h"
@@ -44,6 +45,8 @@
#include <WebCore/FloatRect.h>
#include <WebCore/FrameLoadRequest.h>
#include <WebCore/FrameView.h>
+#include <WebCore/Geolocation.h>
+#include <WebCore/HTMLNames.h>
#include <WebCore/LocalizedStrings.h>
#include <WebCore/NotImplemented.h>
#include <WebCore/Page.h>
@@ -748,10 +751,27 @@ bool WebChromeClient::setCursor(PlatformCursorHandle cursor)
return true;
}
-void WebChromeClient::requestGeolocationPermissionForFrame(Frame*, Geolocation*)
+void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
{
- // See the comment in WebCore/page/ChromeClient.h
- notImplemented();
+ COMPtr<IWebUIDelegate> uiDelegate;
+ if (FAILED(m_webView->uiDelegate(&uiDelegate))) {
+ geolocation->setIsAllowed(false);
+ return;
+ }
+
+ COMPtr<IWebUIDelegatePrivate2> uiDelegatePrivate2(Query, uiDelegate);
+ if (!uiDelegatePrivate2) {
+ geolocation->setIsAllowed(false);
+ return;
+ }
+
+ COMPtr<WebSecurityOrigin> origin(AdoptCOM, WebSecurityOrigin::createInstance(frame->document()->securityOrigin()));
+ COMPtr<WebGeolocationPolicyListener> listener = WebGeolocationPolicyListener::createInstance(geolocation);
+ HRESULT hr = uiDelegatePrivate2->decidePolicyForGeolocationRequest(m_webView, kit(frame), origin.get(), listener.get());
+ if (hr != E_NOTIMPL)
+ return;
+
+ geolocation->setIsAllowed(false);
}
#if USE(ACCELERATED_COMPOSITING)
@@ -773,3 +793,23 @@ COMPtr<IWebUIDelegate> WebChromeClient::uiDelegate()
m_webView->uiDelegate(&delegate);
return delegate;
}
+
+#if ENABLE(VIDEO)
+
+bool WebChromeClient::supportsFullscreenForNode(const Node* node)
+{
+ return node->hasTagName(HTMLNames::videoTag);
+}
+
+void WebChromeClient::enterFullscreenForNode(Node* node)
+{
+ m_webView->enterFullscreenForNode(node);
+}
+
+void WebChromeClient::exitFullscreenForNode(Node*)
+{
+ m_webView->exitFullscreen();
+}
+
+#endif
+
diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.h b/WebKit/win/WebCoreSupport/WebChromeClient.h
index e0c59ae..5198e7c 100644
--- a/WebKit/win/WebCoreSupport/WebChromeClient.h
+++ b/WebKit/win/WebCoreSupport/WebChromeClient.h
@@ -147,6 +147,12 @@ public:
virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
+#if ENABLE(VIDEO)
+ virtual bool supportsFullscreenForNode(const WebCore::Node*);
+ virtual void enterFullscreenForNode(WebCore::Node*);
+ virtual void exitFullscreenForNode(WebCore::Node*);
+#endif
+
#if ENABLE(NOTIFICATIONS)
virtual WebCore::NotificationPresenter* notificationPresenter() const { return reinterpret_cast<WebCore::NotificationPresenter*>(m_notificationsDelegate.get()); }
#endif
diff --git a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
index ca3a6c4..241c35d 100644
--- a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
@@ -30,15 +30,14 @@
#include "WebLocalizableStrings.h"
#include "WebView.h"
-#pragma warning(push, 0)
#include <WebCore/ContextMenu.h>
#include <WebCore/Event.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameLoader.h>
#include <WebCore/FrameLoadRequest.h>
#include <WebCore/Page.h>
#include <WebCore/ResourceRequest.h>
#include <WebCore/NotImplemented.h>
-#pragma warning(pop)
#include <tchar.h>
diff --git a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp
index f822bfe..3f6eb07 100644
--- a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp
+++ b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp
@@ -33,6 +33,8 @@
#include "WebSecurityOrigin.h"
#include "WebView.h"
#include <WebCore/BString.h>
+#include <WebCore/Document.h>
+#include <WebCore/KURL.h>
#if ENABLE(NOTIFICATIONS)
@@ -170,10 +172,10 @@ void WebDesktopNotificationsDelegate::requestPermission(SecurityOrigin* origin,
notificationDelegate()->requestNotificationPermission(org);
}
-NotificationPresenter::Permission WebDesktopNotificationsDelegate::checkPermission(SecurityOrigin* origin)
+NotificationPresenter::Permission WebDesktopNotificationsDelegate::checkPermission(const KURL& url, Document*)
{
int out = 0;
- BString org(origin->toString());
+ BString org(SecurityOrigin::create(url)->toString());
if (hasNotificationDelegate())
notificationDelegate()->checkNotificationPermission(org, &out);
return (NotificationPresenter::Permission) out;
diff --git a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h
index 00c00d5..d30b1e7 100644
--- a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h
+++ b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h
@@ -36,6 +36,11 @@
interface IWebDesktopNotificationPresenter;
+namespace WebCore {
+class Document;
+class KURL;
+}
+
class WebDesktopNotificationsDelegate : public WebCore::NotificationPresenter {
public:
WebDesktopNotificationsDelegate(WebView* view);
@@ -45,7 +50,7 @@ public:
virtual void cancel(WebCore::Notification* object);
virtual void notificationObjectDestroyed(WebCore::Notification* object);
virtual void requestPermission(WebCore::SecurityOrigin* origin, PassRefPtr<WebCore::VoidCallback> callback);
- virtual WebCore::NotificationPresenter::Permission checkPermission(WebCore::SecurityOrigin* origin);
+ virtual WebCore::NotificationPresenter::Permission checkPermission(const KURL& url, Document* document);
private:
bool hasNotificationDelegate();
diff --git a/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.cpp b/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.cpp
new file mode 100644
index 0000000..db5ed90
--- /dev/null
+++ b/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.cpp
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebKitDLL.h"
+#include "WebGeolocationControllerClient.h"
+
+#include "WebGeolocationPosition.h"
+#include "WebView.h"
+
+using namespace WebCore;
+
+WebGeolocationControllerClient::WebGeolocationControllerClient(WebView* webView)
+ : m_webView(webView)
+{
+}
+
+void WebGeolocationControllerClient::geolocationDestroyed()
+{
+ delete this;
+}
+
+void WebGeolocationControllerClient::startUpdating()
+{
+ COMPtr<IWebGeolocationProvider> provider;
+ if (FAILED(m_webView->geolocationProvider(&provider)))
+ return;
+ provider->registerWebView(m_webView.get());
+}
+
+void WebGeolocationControllerClient::stopUpdating()
+{
+ COMPtr<IWebGeolocationProvider> provider;
+ if (FAILED(m_webView->geolocationProvider(&provider)))
+ return;
+ provider->registerWebView(m_webView.get());
+}
+
+GeolocationPosition* WebGeolocationControllerClient::lastPosition()
+{
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ COMPtr<IWebGeolocationProvider> provider;
+ if (FAILED(m_webView->geolocationProvider(&provider)))
+ return 0;
+ COMPtr<IWebGeolocationPosition> position;
+ if (FAILED(provider->lastPosition(&position)))
+ return 0;
+ return core(position.get());
+#else
+ return 0;
+#endif
+}
diff --git a/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.h b/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.h
new file mode 100644
index 0000000..ec0bef7
--- /dev/null
+++ b/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.h
@@ -0,0 +1,51 @@
+/*
+ * 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 WebGeolocationControllerClient_h
+#define WebGeolocationControllerClient_h
+
+#include "COMPtr.h"
+#include <WebCore/GeolocationControllerClient.h>
+
+namespace WebCore {
+ class GeolocationPosition;
+}
+
+class WebView;
+
+class WebGeolocationControllerClient : public WebCore::GeolocationControllerClient {
+public:
+ WebGeolocationControllerClient(WebView*);
+
+ virtual void geolocationDestroyed();
+ virtual void startUpdating();
+ virtual void stopUpdating();
+ virtual WebCore::GeolocationPosition* lastPosition();
+
+private:
+ COMPtr<WebView> m_webView;
+};
+
+#endif // WebGeolocationControllerClient_h
diff --git a/WebKit/win/WebDataSource.cpp b/WebKit/win/WebDataSource.cpp
index 6414bda..4ec1fd3 100644
--- a/WebKit/win/WebDataSource.cpp
+++ b/WebKit/win/WebDataSource.cpp
@@ -38,14 +38,12 @@
#include "WebMutableURLRequest.h"
#include "WebResource.h"
#include "WebURLResponse.h"
-
-#pragma warning(push, 0)
#include <WebCore/BString.h>
#include <WebCore/DocLoader.h>
#include <WebCore/Document.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameLoader.h>
#include <WebCore/KURL.h>
-#pragma warning(pop)
using namespace WebCore;
diff --git a/WebKit/win/WebDropSource.cpp b/WebKit/win/WebDropSource.cpp
index 294c337..8cf0588 100644
--- a/WebKit/win/WebDropSource.cpp
+++ b/WebKit/win/WebDropSource.cpp
@@ -29,9 +29,11 @@
#include "WebKitDLL.h"
#include "WebView.h"
+#include <WebCore/Cursor.h>
#include <WebCore/DragActions.h>
#include <WebCore/EventHandler.h>
#include <WebCore/Frame.h>
+#include <WebCore/FrameView.h>
#include <WebCore/Page.h>
#include <WebCore/PlatformMouseEvent.h>
#include <wtf/CurrentTime.h>
@@ -112,7 +114,43 @@ STDMETHODIMP WebDropSource::QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyS
return S_OK;
}
-STDMETHODIMP WebDropSource::GiveFeedback(DWORD)
+STDMETHODIMP WebDropSource::GiveFeedback(DWORD dwEffect)
{
- return DRAGDROP_S_USEDEFAULTCURSORS;
+ BOOL showCustomCursors;
+ if (FAILED(WebPreferences::sharedStandardPreferences()->customDragCursorsEnabled(&showCustomCursors)))
+ return DRAGDROP_S_USEDEFAULTCURSORS;
+
+ // If we don't want to hide the stop icon, let Windows select the cursor.
+ if (!showCustomCursors)
+ return DRAGDROP_S_USEDEFAULTCURSORS;
+
+ // If we are going to show something other than the not allowed arrow, then let Windows
+ // show the cursor.
+ if (dwEffect != DROPEFFECT_NONE)
+ return DRAGDROP_S_USEDEFAULTCURSORS;
+
+ HWND viewWindow;
+ if (FAILED(m_webView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow))))
+ return DRAGDROP_S_USEDEFAULTCURSORS;
+
+ RECT webViewRect;
+ GetWindowRect(viewWindow, &webViewRect);
+
+ POINT cursorPoint;
+ GetCursorPos(&cursorPoint);
+
+ if (!PtInRect(&webViewRect, cursorPoint)) {
+ // If our cursor is outside the bounds of the webView, we want to let Windows select the cursor.
+ return DRAGDROP_S_USEDEFAULTCURSORS;
+ }
+
+ FrameView* view = m_webView->page()->mainFrame()->view();
+ if (!view)
+ return DRAGDROP_S_USEDEFAULTCURSORS;
+
+ // When dragging inside a WebView and the drag is not allowed, don't show the not allowed icon,
+ // instead, show the pointer cursor.
+ // FIXME <rdar://7577595>: Custom cursors aren't supported during drag and drop (default to pointer).
+ view->setCursor(pointerCursor());
+ return S_OK;
}
diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp
index 9063fde..c0c1601 100644
--- a/WebKit/win/WebFrame.cpp
+++ b/WebKit/win/WebFrame.cpp
@@ -1278,13 +1278,17 @@ HRESULT WebFrame::elementIsPassword(IDOMElement *element, bool *result)
return S_OK;
}
-HRESULT WebFrame::searchForLabelsBeforeElement(const BSTR* labels, int cLabels, IDOMElement* beforeElement, BSTR* result)
+HRESULT WebFrame::searchForLabelsBeforeElement(const BSTR* labels, unsigned cLabels, IDOMElement* beforeElement, unsigned* outResultDistance, BOOL* outResultIsInCellAbove, BSTR* result)
{
if (!result) {
ASSERT_NOT_REACHED();
return E_POINTER;
}
+ if (outResultDistance)
+ *outResultDistance = 0;
+ if (outResultIsInCellAbove)
+ *outResultIsInCellAbove = FALSE;
*result = 0;
if (!cLabels)
@@ -1303,11 +1307,18 @@ HRESULT WebFrame::searchForLabelsBeforeElement(const BSTR* labels, int cLabels,
if (!coreElement)
return E_FAIL;
- String label = coreFrame->searchForLabelsBeforeElement(labelStrings, coreElement);
+ size_t resultDistance;
+ bool resultIsInCellAbove;
+ String label = coreFrame->searchForLabelsBeforeElement(labelStrings, coreElement, &resultDistance, &resultIsInCellAbove);
*result = SysAllocStringLen(label.characters(), label.length());
if (label.length() && !*result)
return E_OUTOFMEMORY;
+ if (outResultDistance)
+ *outResultDistance = resultDistance;
+ if (outResultIsInCellAbove)
+ *outResultIsInCellAbove = resultIsInCellAbove;
+
return S_OK;
}
@@ -1952,6 +1963,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::getPrintedPageCount(
return S_OK;
}
+#if PLATFORM(CG)
void WebFrame::drawHeader(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, const IntRect& pageRect, float headerHeight)
{
int x = pageRect.x();
@@ -1968,7 +1980,6 @@ void WebFrame::drawFooter(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, con
ui->drawFooterInRect(d->webView, &footerRect, static_cast<OLE_HANDLE>(reinterpret_cast<LONG64>(pctx)), page+1, pageCount);
}
-#if PLATFORM(CG)
void WebFrame::spoolPage(PlatformGraphicsContext* pctx, GraphicsContext* spoolCtx, HDC printDC, IWebUIDelegate* ui, float headerHeight, float footerHeight, UINT page, UINT pageCount)
{
Frame* coreFrame = core(this);
@@ -1985,7 +1996,6 @@ void WebFrame::spoolPage(PlatformGraphicsContext* pctx, GraphicsContext* spoolCt
CGContextBeginPage(pctx, &mediaBox);
- // FIXME: Could some of this coordinate space manipulation be shared with Cairo?
CGFloat scale = static_cast<float>(mediaBox.size.width)/static_cast<float>(pageRect.width());
CGAffineTransform ctm = CGContextGetBaseCTM(pctx);
ctm = CGAffineTransformScale(ctm, -scale, -scale);
@@ -2008,29 +2018,72 @@ void WebFrame::spoolPage(PlatformGraphicsContext* pctx, GraphicsContext* spoolCt
CGContextRestoreGState(pctx);
}
#elif PLATFORM(CAIRO)
+static float scaleFactor(HDC printDC, const IntRect& pageRect)
+{
+ const IntRect& printRect = printerRect(printDC);
+
+ float scale = static_cast<float>(printRect.width()) / static_cast<float>(pageRect.width());
+ if (!scale)
+ scale = 1.0;
+
+ return scale;
+}
+
+static HDC hdcFromContext(PlatformGraphicsContext* pctx)
+{
+ cairo_surface_t* surface = cairo_get_target(pctx);
+ return cairo_win32_surface_get_dc(surface);
+}
+
+void WebFrame::drawHeader(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, const IntRect& pageRect, float headerHeight)
+{
+ HDC hdc = hdcFromContext(pctx);
+
+ const float scale = scaleFactor(hdc, pageRect);
+ int x = static_cast<int>(scale * pageRect.x());
+ int y = 0;
+ RECT headerRect = {x, y, x + static_cast<int>(scale * pageRect.width()), y + static_cast<int>(scale * headerHeight)};
+
+ ui->drawHeaderInRect(d->webView, &headerRect, static_cast<OLE_HANDLE>(reinterpret_cast<LONG64>(hdc)));
+}
+
+void WebFrame::drawFooter(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, const IntRect& pageRect, UINT page, UINT pageCount, float headerHeight, float footerHeight)
+{
+ HDC hdc = hdcFromContext(pctx);
+
+ const float scale = scaleFactor(hdc, pageRect);
+ int x = static_cast<int>(scale * pageRect.x());
+ int y = static_cast<int>(scale * max(static_cast<int>(headerHeight) + pageRect.height(), m_pageHeight-static_cast<int>(footerHeight)));
+ RECT footerRect = {x, y, x + static_cast<int>(scale * pageRect.width()), y + static_cast<int>(scale * footerHeight)};
+
+ ui->drawFooterInRect(d->webView, &footerRect, static_cast<OLE_HANDLE>(reinterpret_cast<LONG64>(hdc)), page+1, pageCount);
+}
+
void WebFrame::spoolPage(PlatformGraphicsContext* pctx, GraphicsContext* spoolCtx, HDC printDC, IWebUIDelegate* ui, float headerHeight, float footerHeight, UINT page, UINT pageCount)
{
Frame* coreFrame = core(this);
- IntRect pageRect = m_pageRects[page];
+ const IntRect& pageRect = m_pageRects[page];
+ IntRect marginRect = printerMarginRect(printDC);
cairo_save(pctx);
+ float scale = scaleFactor(printDC, pageRect);
+ cairo_scale(pctx, scale, scale);
- IntRect printRect = printerRect(printDC);
- IntRect mediaBox(0, 0, printRect.width(), printRect.height());
+ cairo_translate(pctx, -pageRect.x() + marginRect.x(), -pageRect.y() + marginRect.y() + headerHeight);
+ coreFrame->view()->paintContents(spoolCtx, pageRect);
- ::StartPage(printDC);
+ cairo_translate(pctx, pageRect.x() - marginRect.x(), pageRect.y() - marginRect.y() - headerHeight);
- // FIXME: Could some of this coordinate space manipulation be shared with CG?
- float scale = static_cast<float>(mediaBox.size().width())/static_cast<float>(pageRect.width());
- cairo_scale(pctx, -scale, -scale);
- cairo_translate(pctx, -pageRect.x(), -pageRect.y()+headerHeight);
- cairo_scale(pctx, scale, scale);
- cairo_translate(pctx, -pageRect.x(), -pageRect.y()+headerHeight); // reserves space for header
+ XFORM originalWorld;
+ ::GetWorldTransform(printDC, &originalWorld);
- coreFrame->view()->paintContents(spoolCtx, pageRect);
+ // Position world transform to account for margin
+ XFORM newWorld = originalWorld;
+ newWorld.eDx = scale * marginRect.x();
+ newWorld.eDy = scale * marginRect.y();
- cairo_translate(pctx, pageRect.x(), pageRect.y()-headerHeight);
+ ::SetWorldTransform(printDC, &newWorld);
if (headerHeight)
drawHeader(pctx, ui, pageRect, headerHeight);
@@ -2038,8 +2091,10 @@ void WebFrame::spoolPage(PlatformGraphicsContext* pctx, GraphicsContext* spoolCt
if (footerHeight)
drawFooter(pctx, ui, pageRect, page, pageCount, headerHeight, footerHeight);
+ ::SetWorldTransform(printDC, &originalWorld);
+
cairo_show_page(pctx);
- ::EndPage(printDC);
+ ASSERT(!cairo_status(pctx));
cairo_restore(pctx);
}
#endif
@@ -2050,10 +2105,25 @@ HRESULT STDMETHODCALLTYPE WebFrame::spoolPages(
/* [in] */ UINT endPage,
/* [retval][out] */ void* ctx)
{
+#if PLATFORM(CG)
if (!printDC || !ctx) {
ASSERT_NOT_REACHED();
return E_POINTER;
}
+#elif PLATFORM(CAIRO)
+ if (!printDC) {
+ ASSERT_NOT_REACHED();
+ return E_POINTER;
+ }
+
+ cairo_surface_t* printSurface = cairo_win32_printing_surface_create(printDC);
+ ctx = cairo_create(printSurface);
+ if (!ctx) {
+ cairo_surface_destroy(printSurface);
+ return E_FAIL;
+ }
+ cairo_surface_set_fallback_resolution(printSurface, 72.0, 72.0);
+#endif
if (!m_inPrintingMode) {
ASSERT_NOT_REACHED();
@@ -2089,7 +2159,14 @@ HRESULT STDMETHODCALLTYPE WebFrame::spoolPages(
for (UINT ii = startPage; ii < endPage; ii++)
spoolPage(pctx, &spoolCtx, printDC, ui.get(), headerHeight, footerHeight, ii, pageCount);
-
+
+#if PLATFORM(CAIRO)
+ cairo_destroy(pctx);
+ cairo_surface_finish(printSurface);
+ ASSERT(!cairo_surface_status(printSurface));
+ cairo_surface_destroy(printSurface);
+#endif
+
return S_OK;
}
diff --git a/WebKit/win/WebFrame.h b/WebKit/win/WebFrame.h
index 91b8e14..1a92751 100644
--- a/WebKit/win/WebFrame.h
+++ b/WebKit/win/WebFrame.h
@@ -336,7 +336,7 @@ public:
HRESULT formForElement(IDOMElement* element, IDOMElement** form);
HRESULT controlsInForm(IDOMElement* form, IDOMElement** controls, int* cControls);
HRESULT elementIsPassword(IDOMElement* element, bool* result);
- HRESULT searchForLabelsBeforeElement(const BSTR* labels, int cLabels, IDOMElement* beforeElement, BSTR* result);
+ HRESULT searchForLabelsBeforeElement(const BSTR* labels, unsigned cLabels, IDOMElement* beforeElement, unsigned* resultDistance, BOOL* resultIsInCellAbove, BSTR* result);
HRESULT matchLabelsAgainstElement(const BSTR* labels, int cLabels, IDOMElement* againstElement, BSTR* result);
HRESULT canProvideDocumentSource(bool* result);
diff --git a/WebKit/win/WebGeolocationPolicyListener.cpp b/WebKit/win/WebGeolocationPolicyListener.cpp
new file mode 100644
index 0000000..d16f892
--- /dev/null
+++ b/WebKit/win/WebGeolocationPolicyListener.cpp
@@ -0,0 +1,97 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+#include "WebKitDLL.h"
+#include "WebGeolocationPolicyListener.h"
+
+#include <WebCore/Geolocation.h>
+
+using namespace WebCore;
+
+// WebGeolocationPolicyListener ----------------------------------------------------------------
+
+COMPtr<WebGeolocationPolicyListener> WebGeolocationPolicyListener::createInstance(PassRefPtr<Geolocation> geolocation)
+{
+ return new WebGeolocationPolicyListener(geolocation);
+}
+
+WebGeolocationPolicyListener::WebGeolocationPolicyListener(PassRefPtr<Geolocation> geolocation)
+ : m_refCount(0)
+ , m_geolocation(geolocation)
+{
+ gClassCount++;
+ gClassNameCount.add("WebGeolocationPolicyListener");
+}
+
+WebGeolocationPolicyListener::~WebGeolocationPolicyListener()
+{
+ gClassCount--;
+ gClassNameCount.remove("WebGeolocationPolicyListener");
+}
+
+// IUnknown -------------------------------------------------------------------
+
+HRESULT STDMETHODCALLTYPE WebGeolocationPolicyListener::QueryInterface(REFIID riid, void** ppvObject)
+{
+ *ppvObject = 0;
+ if (IsEqualIID(riid, __uuidof(IUnknown)))
+ *ppvObject = static_cast<IWebGeolocationPolicyListener*>(this);
+ else if (IsEqualIID(riid, __uuidof(IWebGeolocationPolicyListener)))
+ *ppvObject = static_cast<IWebGeolocationPolicyListener*>(this);
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+
+ULONG STDMETHODCALLTYPE WebGeolocationPolicyListener::AddRef()
+{
+ return ++m_refCount;
+}
+
+ULONG STDMETHODCALLTYPE WebGeolocationPolicyListener::Release()
+{
+ ULONG newRef = --m_refCount;
+ if (!newRef)
+ delete this;
+
+ return newRef;
+}
+
+// IWebPolicyDecisionListener ------------------------------------------------------------
+
+HRESULT STDMETHODCALLTYPE WebGeolocationPolicyListener::allow()
+{
+ m_geolocation->setIsAllowed(true);
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE WebGeolocationPolicyListener::deny()
+{
+ m_geolocation->setIsAllowed(false);
+ return S_OK;
+}
diff --git a/WebKit/win/WebGeolocationPolicyListener.h b/WebKit/win/WebGeolocationPolicyListener.h
new file mode 100644
index 0000000..636c5f5
--- /dev/null
+++ b/WebKit/win/WebGeolocationPolicyListener.h
@@ -0,0 +1,61 @@
+/*
+ * 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 WebGeolocationPolicyListener_h
+#define WebGeolocationPolicyListener_h
+
+#include "WebKit.h"
+
+#include <WebCore/COMPtr.h>
+
+#include <WTF/PassRefPtr.h>
+#include <WTF/RefPtr.h>
+
+namespace WebCore {
+ class Geolocation;
+}
+
+class WebGeolocationPolicyListener : public IWebGeolocationPolicyListener {
+public:
+ static COMPtr<WebGeolocationPolicyListener> createInstance(PassRefPtr<WebCore::Geolocation>);
+
+ // IUnknown
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef();
+ virtual ULONG STDMETHODCALLTYPE Release();
+
+ // IWebGeolocationPolicyListener
+ virtual HRESULT STDMETHODCALLTYPE allow();
+ virtual HRESULT STDMETHODCALLTYPE deny();
+
+private:
+ WebGeolocationPolicyListener(PassRefPtr<WebCore::Geolocation>);
+ ~WebGeolocationPolicyListener();
+
+ ULONG m_refCount;
+ RefPtr<WebCore::Geolocation> m_geolocation;
+};
+
+#endif WebGeolocationPolicyListener_h
diff --git a/WebKit/win/WebGeolocationPosition.cpp b/WebKit/win/WebGeolocationPosition.cpp
new file mode 100644
index 0000000..26554dd
--- /dev/null
+++ b/WebKit/win/WebGeolocationPosition.cpp
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebKitDLL.h"
+#include "WebGeolocationPosition.h"
+#include <WebCore/COMPtr.h>
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#include <WebCore/GeolocationPosition.h>
+
+using namespace WebCore;
+#endif
+
+COMPtr<WebGeolocationPosition> WebGeolocationPosition::createInstance()
+{
+ return new WebGeolocationPosition;
+}
+
+WebGeolocationPosition::WebGeolocationPosition()
+ : m_refCount(0)
+{
+ gClassCount++;
+ gClassNameCount.add("WebGeolocationPosition");
+}
+
+WebGeolocationPosition::~WebGeolocationPosition()
+{
+ gClassCount--;
+ gClassNameCount.remove("WebGeolocationPosition");
+}
+
+HRESULT WebGeolocationPosition::QueryInterface(REFIID riid, void** ppvObject)
+{
+ *ppvObject = 0;
+ if (IsEqualIID(riid, __uuidof(WebGeolocationPosition)))
+ *ppvObject = this;
+ else if (IsEqualIID(riid, __uuidof(IUnknown)))
+ *ppvObject = static_cast<IWebGeolocationPosition*>(this);
+ else if (IsEqualIID(riid, __uuidof(IWebGeolocationPosition)))
+ *ppvObject = static_cast<IWebGeolocationPosition*>(this);
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+
+ULONG WebGeolocationPosition::AddRef()
+{
+ return ++m_refCount;
+}
+
+ULONG WebGeolocationPosition::Release()
+{
+ ULONG newRef = --m_refCount;
+ if (!newRef)
+ delete this;
+
+ return newRef;
+}
+
+HRESULT WebGeolocationPosition::initWithTimestamp(double timestamp, double latitude, double longitude, double accuracy)
+{
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ m_position = GeolocationPosition::create(timestamp, latitude, longitude, accuracy);
+ return S_OK;
+#else
+ return E_FAIL;
+#endif
+}
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+GeolocationPosition* core(IWebGeolocationPosition* position)
+{
+ if (!position)
+ return 0;
+
+ COMPtr<WebGeolocationPosition> webGeolocationPosition(Query, position);
+ if (!webGeolocationPosition)
+ return 0;
+
+ return webGeolocationPosition->impl();
+}
+#endif
diff --git a/WebKit/win/WebGeolocationPosition.h b/WebKit/win/WebGeolocationPosition.h
new file mode 100644
index 0000000..8160270
--- /dev/null
+++ b/WebKit/win/WebGeolocationPosition.h
@@ -0,0 +1,66 @@
+/*
+ * 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 WebGeolocationPosition_h
+#define WebGeolocationPosition_h
+
+#include "WebKit.h"
+#include <WebCore/COMPtr.h>
+
+namespace WebCore {
+ class GeolocationPosition;
+};
+
+class WebGeolocationPosition : public IWebGeolocationPosition {
+public:
+ static COMPtr<WebGeolocationPosition> createInstance();
+private:
+ WebGeolocationPosition();
+ ~WebGeolocationPosition();
+
+public:
+ // IUnknown
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef();
+ virtual ULONG STDMETHODCALLTYPE Release();
+
+ // IWebGeolocationPosition
+ virtual HRESULT STDMETHODCALLTYPE initWithTimestamp(double timestamp, double latitude, double longitude, double accuracy);
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ WebCore::GeolocationPosition* impl() const { return m_position.get(); }
+#endif
+
+private:
+ ULONG m_refCount;
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ RefPtr<WebCore::GeolocationPosition> m_position;
+#endif
+};
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+WebCore::GeolocationPosition* core(IWebGeolocationPosition*);
+#endif
+
+#endif // WebGeolocationPosition_h
diff --git a/WebKit/win/WebHTMLRepresentation.cpp b/WebKit/win/WebHTMLRepresentation.cpp
index 5e5d56b..dd5813d 100644
--- a/WebKit/win/WebHTMLRepresentation.cpp
+++ b/WebKit/win/WebHTMLRepresentation.cpp
@@ -30,11 +30,10 @@
#include "WebKit.h"
#include "WebFrame.h"
#include "WebKitStatisticsPrivate.h"
-#pragma warning(push, 0)
#include <WebCore/BString.h>
+#include <WebCore/Frame.h>
#include <WebCore/HTMLInputElement.h>
#include <WebCore/TextResourceDecoder.h>
-#pragma warning(pop)
using namespace WebCore;
@@ -104,7 +103,7 @@ ULONG STDMETHODCALLTYPE WebHTMLRepresentation::Release()
// IWebHTMLRepresentation --------------------------------------------------------------------
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedMIMETypes(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedMIMETypes(
/* [out][in] */ BSTR* /*types*/,
/* [out][in] */ int* /*cTypes*/)
{
@@ -112,7 +111,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedMIMETypes(
return E_NOTIMPL;
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedNonImageMIMETypes(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedNonImageMIMETypes(
/* [out][in] */ BSTR* /*types*/,
/* [out][in] */ int* /*cTypes*/)
{
@@ -120,7 +119,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedNonImageMIMETypes(
return E_NOTIMPL;
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedImageMIMETypes(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedImageMIMETypes(
/* [out][in] */ BSTR* /*types*/,
/* [out][in] */ int* /*cTypes*/)
{
@@ -128,7 +127,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedImageMIMETypes(
return E_NOTIMPL;
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::attributedStringFromDOMNodes(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::attributedStringFromDOMNodes(
/* [in] */ IDOMNode* /*startNode*/,
/* [in] */ int /*startOffset*/,
/* [in] */ IDOMNode* /*endNode*/,
@@ -139,7 +138,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::attributedStringFromDOMNodes(
return E_NOTIMPL;
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementWithName(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementWithName(
/* [in] */ BSTR name,
/* [in] */ IDOMElement* form,
/* [retval][out] */ IDOMElement** element)
@@ -150,7 +149,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementWithName(
return m_frame->elementWithName(name, form, element);
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementDoesAutoComplete(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementDoesAutoComplete(
/* [in] */ IDOMElement* element,
/* [retval][out] */ BOOL* result)
{
@@ -160,7 +159,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementDoesAutoComplete(
return hr;
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementIsPassword(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementIsPassword(
/* [in] */ IDOMElement* element,
/* [retval][out] */ BOOL* result)
{
@@ -170,7 +169,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementIsPassword(
return hr;
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::formForElement(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::formForElement(
/* [in] */ IDOMElement* element,
/* [retval][out] */ IDOMElement** form)
{
@@ -180,7 +179,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::formForElement(
return m_frame->formForElement(element, form);
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::currentForm(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::currentForm(
/* [retval][out] */ IDOMElement** form)
{
if (!m_frame)
@@ -189,7 +188,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::currentForm(
return m_frame->currentForm(form);
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::controlsInForm(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::controlsInForm(
/* [in] */ IDOMElement* form,
/* [out][in] */ IDOMElement** controls,
/* [out][in] */ int* cControls)
@@ -197,16 +196,16 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::controlsInForm(
return m_frame->controlsInForm(form, controls, cControls);
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::searchForLabels(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::deprecatedSearchForLabels(
/* [size_is][in] */ BSTR* labels,
/* [in] */ int cLabels,
/* [in] */ IDOMElement* beforeElement,
/* [retval][out] */ BSTR* result)
{
- return m_frame->searchForLabelsBeforeElement(labels, cLabels, beforeElement, result);
+ return m_frame->searchForLabelsBeforeElement(labels, cLabels, beforeElement, 0, 0, result);
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::matchLabels(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::matchLabels(
/* [size_is][in] */ BSTR* labels,
/* [in] */ int cLabels,
/* [in] */ IDOMElement* againstElement,
@@ -215,16 +214,21 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::matchLabels(
return m_frame->matchLabelsAgainstElement(labels, cLabels, againstElement, result);
}
+HRESULT WebHTMLRepresentation::searchForLabels(BSTR* labels, unsigned cLabels, IDOMElement* beforeElement, unsigned* resultDistance, BOOL* resultIsInCellAbove, BSTR* result)
+{
+ return m_frame->searchForLabelsBeforeElement(labels, cLabels, beforeElement, resultDistance, resultIsInCellAbove, result);
+}
+
// IWebDocumentRepresentation ----------------------------------------------------------------
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::setDataSource(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::setDataSource(
/* [in] */ IWebDataSource* /*dataSource*/)
{
ASSERT_NOT_REACHED();
return E_NOTIMPL;
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedData(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedData(
/* [in] */ IStream* /*data*/,
/* [in] */ IWebDataSource* /*dataSource*/)
{
@@ -232,7 +236,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedData(
return E_NOTIMPL;
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedError(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedError(
/* [in] */ IWebError* /*error*/,
/* [in] */ IWebDataSource* /*dataSource*/)
{
@@ -240,14 +244,14 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedError(
return E_NOTIMPL;
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::finishedLoadingWithDataSource(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::finishedLoadingWithDataSource(
/* [in] */ IWebDataSource* /*dataSource*/)
{
ASSERT_NOT_REACHED();
return E_NOTIMPL;
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::canProvideDocumentSource(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::canProvideDocumentSource(
/* [retval][out] */ BOOL* result)
{
bool canProvideSource;
@@ -256,7 +260,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::canProvideDocumentSource(
return hr;
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::documentSource(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::documentSource(
/* [retval][out] */ BSTR* source)
{
if (!source)
@@ -307,7 +311,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::documentSource(
return S_OK;
}
-HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::title(
+HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::title(
/* [retval][out] */ BSTR* /*docTitle*/)
{
ASSERT_NOT_REACHED();
diff --git a/WebKit/win/WebHTMLRepresentation.h b/WebKit/win/WebHTMLRepresentation.h
index 01b8988..4d5eade 100644
--- a/WebKit/win/WebHTMLRepresentation.h
+++ b/WebKit/win/WebHTMLRepresentation.h
@@ -45,84 +45,87 @@ public:
virtual ULONG STDMETHODCALLTYPE Release();
// IWebHTMLRepresentation
- virtual HRESULT STDMETHODCALLTYPE supportedMIMETypes(
+ virtual HRESULT STDMETHODCALLTYPE supportedMIMETypes(
/* [out][in] */ BSTR* types,
/* [out][in] */ int* cTypes);
- virtual HRESULT STDMETHODCALLTYPE supportedNonImageMIMETypes(
+ virtual HRESULT STDMETHODCALLTYPE supportedNonImageMIMETypes(
/* [out][in] */ BSTR* types,
/* [out][in] */ int* cTypes);
- virtual HRESULT STDMETHODCALLTYPE supportedImageMIMETypes(
+ virtual HRESULT STDMETHODCALLTYPE supportedImageMIMETypes(
/* [out][in] */ BSTR* types,
/* [out][in] */ int* cTypes);
- virtual HRESULT STDMETHODCALLTYPE attributedStringFromDOMNodes(
+ virtual HRESULT STDMETHODCALLTYPE attributedStringFromDOMNodes(
/* [in] */ IDOMNode* startNode,
/* [in] */ int startOffset,
/* [in] */ IDOMNode* endNode,
/* [in] */ int endOffset,
/* [retval][out] */ IDataObject** attributedString);
- virtual HRESULT STDMETHODCALLTYPE elementWithName(
+ virtual HRESULT STDMETHODCALLTYPE elementWithName(
/* [in] */ BSTR name,
/* [in] */ IDOMElement* form,
/* [retval][out] */ IDOMElement** element);
- virtual HRESULT STDMETHODCALLTYPE elementDoesAutoComplete(
+ virtual HRESULT STDMETHODCALLTYPE elementDoesAutoComplete(
/* [in] */ IDOMElement* element,
/* [retval][out] */ BOOL* result);
- virtual HRESULT STDMETHODCALLTYPE elementIsPassword(
+ virtual HRESULT STDMETHODCALLTYPE elementIsPassword(
/* [in] */ IDOMElement* element,
/* [retval][out] */ BOOL* result);
- virtual HRESULT STDMETHODCALLTYPE formForElement(
+ virtual HRESULT STDMETHODCALLTYPE formForElement(
/* [in] */ IDOMElement* element,
/* [retval][out] */ IDOMElement** form);
- virtual HRESULT STDMETHODCALLTYPE currentForm(
+ virtual HRESULT STDMETHODCALLTYPE currentForm(
/* [retval][out] */ IDOMElement** form);
- virtual HRESULT STDMETHODCALLTYPE controlsInForm(
+ virtual HRESULT STDMETHODCALLTYPE controlsInForm(
/* [in] */ IDOMElement* form,
/* [out][in] */ IDOMElement** controls,
/* [out][in] */ int* cControls);
- virtual HRESULT STDMETHODCALLTYPE searchForLabels(
+ /* Deprecated. Use the variant that includes resultDistance and resultIsInCellAbove instead. */
+ virtual HRESULT STDMETHODCALLTYPE deprecatedSearchForLabels(
/* [size_is][in] */ BSTR *labels,
/* [in] */ int cLabels,
/* [in] */ IDOMElement *beforeElement,
/* [retval][out] */ BSTR *result);
- virtual HRESULT STDMETHODCALLTYPE matchLabels(
+ virtual HRESULT STDMETHODCALLTYPE matchLabels(
/* [size_is][in] */ BSTR *labels,
/* [in] */ int cLabels,
/* [in] */ IDOMElement *againstElement,
/* [retval][out] */ BSTR *result);
+ virtual HRESULT STDMETHODCALLTYPE searchForLabels(BSTR* labels, unsigned cLabels, IDOMElement* beforeElement, unsigned* resultDistance, BOOL* resultIsInCellAbove, BSTR* result);
+
// IWebDocumentRepresentation
- virtual HRESULT STDMETHODCALLTYPE setDataSource(
+ virtual HRESULT STDMETHODCALLTYPE setDataSource(
/* [in] */ IWebDataSource* dataSource);
- virtual HRESULT STDMETHODCALLTYPE receivedData(
+ virtual HRESULT STDMETHODCALLTYPE receivedData(
/* [in] */ IStream* data,
/* [in] */ IWebDataSource* dataSource);
- virtual HRESULT STDMETHODCALLTYPE receivedError(
+ virtual HRESULT STDMETHODCALLTYPE receivedError(
/* [in] */ IWebError* error,
/* [in] */ IWebDataSource* dataSource);
- virtual HRESULT STDMETHODCALLTYPE finishedLoadingWithDataSource(
+ virtual HRESULT STDMETHODCALLTYPE finishedLoadingWithDataSource(
/* [in] */ IWebDataSource* dataSource);
- virtual HRESULT STDMETHODCALLTYPE canProvideDocumentSource(
+ virtual HRESULT STDMETHODCALLTYPE canProvideDocumentSource(
/* [retval][out] */ BOOL* result);
- virtual HRESULT STDMETHODCALLTYPE documentSource(
+ virtual HRESULT STDMETHODCALLTYPE documentSource(
/* [retval][out] */ BSTR* source);
- virtual HRESULT STDMETHODCALLTYPE title(
+ virtual HRESULT STDMETHODCALLTYPE title(
/* [retval][out] */ BSTR* docTitle);
protected:
diff --git a/WebKit/win/WebKit.vcproj/DerivedSources.make b/WebKit/win/WebKit.vcproj/DerivedSources.make
deleted file mode 100644
index 73648a0..0000000
--- a/WebKit/win/WebKit.vcproj/DerivedSources.make
+++ /dev/null
@@ -1,161 +0,0 @@
-# Copyright (C) 2007 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.
-# 3. Neither the name of Apple puter, 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.
-
-PREFIX = IGEN_DOM
-
-WEBKIT_IDL = $(WEBKIT)/Interfaces/WebKit.idl
-
-HAND_WRITTEN_INTERFACES = $(filter-out $(WEBKIT_IDL), $(wildcard $(WEBKIT)/Interfaces/*.idl))
-
-GENERATED_INTERFACES = \
- $(PREFIX)Node.idl \
- $(PREFIX)Attr.idl \
- $(PREFIX)NodeList.idl \
- $(PREFIX)Element.idl \
- $(PREFIX)Document.idl \
- $(PREFIX)CharacterData.idl \
- $(PREFIX)CDATASection.idl \
- $(PREFIX)Comment.idl \
- $(PREFIX)Text.idl \
- $(PREFIX)DocumentFragment.idl \
- $(PREFIX)DocumentType.idl \
- $(PREFIX)DOMImplementation.idl \
- $(PREFIX)Entity.idl \
- $(PREFIX)EntityReference.idl \
- $(PREFIX)NamedNodeMap.idl \
- $(PREFIX)Notation.idl \
- $(PREFIX)ProcessingInstruction.idl \
- \
- $(PREFIX)HTMLAnchorElement.idl \
- $(PREFIX)HTMLAppletElement.idl \
- $(PREFIX)HTMLAreaElement.idl \
- $(PREFIX)HTMLBRElement.idl \
- $(PREFIX)HTMLBaseElement.idl \
- $(PREFIX)HTMLBaseFontElement.idl \
- $(PREFIX)HTMLBlockquoteElement.idl \
- $(PREFIX)HTMLBodyElement.idl \
- $(PREFIX)HTMLButtonElement.idl \
- $(PREFIX)HTMLCollection.idl \
- $(PREFIX)HTMLDListElement.idl \
- $(PREFIX)HTMLDirectoryElement.idl \
- $(PREFIX)HTMLDivElement.idl \
- $(PREFIX)HTMLDocument.idl \
- $(PREFIX)HTMLElement.idl \
- $(PREFIX)HTMLEmbedElement.idl \
- $(PREFIX)HTMLFieldSetElement.idl \
- $(PREFIX)HTMLFontElement.idl \
- $(PREFIX)HTMLFormElement.idl \
- $(PREFIX)HTMLFrameElement.idl \
- $(PREFIX)HTMLFrameSetElement.idl \
- $(PREFIX)HTMLHRElement.idl \
- $(PREFIX)HTMLHeadElement.idl \
- $(PREFIX)HTMLHeadingElement.idl \
- $(PREFIX)HTMLHtmlElement.idl \
- $(PREFIX)HTMLIFrameElement.idl \
- $(PREFIX)HTMLImageElement.idl \
- $(PREFIX)HTMLInputElement.idl \
- $(PREFIX)HTMLIsIndexElement.idl \
- $(PREFIX)HTMLLIElement.idl \
- $(PREFIX)HTMLLabelElement.idl \
- $(PREFIX)HTMLLegendElement.idl \
- $(PREFIX)HTMLLinkElement.idl \
- $(PREFIX)HTMLMapElement.idl \
- $(PREFIX)HTMLMarqueeElement.idl \
- $(PREFIX)HTMLMenuElement.idl \
- $(PREFIX)HTMLMetaElement.idl \
- $(PREFIX)HTMLModElement.idl \
- $(PREFIX)HTMLOListElement.idl \
- $(PREFIX)HTMLObjectElement.idl \
- $(PREFIX)HTMLOptGroupElement.idl \
- $(PREFIX)HTMLOptionElement.idl \
- $(PREFIX)HTMLOptionsCollection.idl \
- $(PREFIX)HTMLParagraphElement.idl \
- $(PREFIX)HTMLParamElement.idl \
- $(PREFIX)HTMLPreElement.idl \
- $(PREFIX)HTMLQuoteElement.idl \
- $(PREFIX)HTMLScriptElement.idl \
- $(PREFIX)HTMLSelectElement.idl \
- $(PREFIX)HTMLStyleElement.idl \
- $(PREFIX)HTMLTableCaptionElement.idl \
- $(PREFIX)HTMLTableCellElement.idl \
- $(PREFIX)HTMLTableColElement.idl \
- $(PREFIX)HTMLTableElement.idl \
- $(PREFIX)HTMLTableRowElement.idl \
- $(PREFIX)HTMLTableSectionElement.idl \
- $(PREFIX)HTMLTextAreaElement.idl \
- $(PREFIX)HTMLTitleElement.idl \
- $(PREFIX)HTMLUListElement.idl \
- \
- $(PREFIX)CSSCharsetRule.idl \
- $(PREFIX)CSSFontFaceRule.idl \
- $(PREFIX)CSSImportRule.idl \
- $(PREFIX)CSSMediaRule.idl \
- $(PREFIX)CSSPageRule.idl \
- $(PREFIX)CSSPrimitiveValue.idl \
- $(PREFIX)CSSRule.idl \
- $(PREFIX)CSSRuleList.idl \
- $(PREFIX)CSSStyleDeclaration.idl \
- $(PREFIX)CSSStyleRule.idl \
- $(PREFIX)CSSStyleSheet.idl \
- $(PREFIX)CSSUnknownRule.idl \
- $(PREFIX)CSSValue.idl \
- $(PREFIX)CSSValueList.idl \
- $(PREFIX)Counter.idl \
- $(PREFIX)MediaList.idl \
- $(PREFIX)Rect.idl \
- $(PREFIX)StyleSheet.idl \
- $(PREFIX)StyleSheetList.idl \
- \
- $(PREFIX)Event.idl \
- $(PREFIX)EventTarget.idl \
- $(PREFIX)EventListener.idl \
-#
-
-.PHONY : all
-all : \
- $(GENERATED_INTERFACES) \
- $(WEBKIT_IDL) \
-#
-
-# $(PREFIX)CanvasGradient.idl \
-# $(PREFIX)CanvasPattern.idl \
-# $(PREFIX)CanvasRenderingContext2D.idl \
-# $(PREFIX)HTMLCanvasElement.idl \
-# $(PREFIX)RGBColor.idl \
-
-COM_BINDINGS_SCRIPTS = \
- $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/CodeGenerator.pm \
- $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/CodeGeneratorCOM.pm \
- $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/IDLParser.pm \
- $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/IDLStructure.pm \
- $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/generate-bindings.pl \
-#
-
-$(PREFIX)%.idl : $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/%.idl $(COM_BINDINGS_SCRIPTS)
- perl -I $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/ $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_COM" --generator COM --include $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/ --outputdir . $<
-
-$(WEBKIT_IDL) : $(HAND_WRITTEN_INTERFACES) $(GENERATED_INTERFACES)
- touch $@
diff --git a/WebKit/win/WebKit.vcproj/Interfaces.vcproj b/WebKit/win/WebKit.vcproj/Interfaces.vcproj
index ca9b2a4..c6a0add 100644
--- a/WebKit/win/WebKit.vcproj/Interfaces.vcproj
+++ b/WebKit/win/WebKit.vcproj/Interfaces.vcproj
@@ -19,7 +19,7 @@
Name="Debug|Win32"
OutputDirectory="$(WebKitOutputDir)\include\WebKit"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
CharacterSet="1"
>
<Tool
@@ -86,7 +86,7 @@
Name="Release|Win32"
OutputDirectory="$(WebKitOutputDir)\include\WebKit"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -152,6 +152,26 @@
</References>
<Files>
<File
+ RelativePath="..\Interfaces\AccessibleComparable.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\Interfaces\DOMCore.idl"
>
<FileConfiguration
@@ -764,6 +784,66 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\Interfaces\IWebGeolocationPolicyListener.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\Interfaces\IWebGeolocationPosition.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\Interfaces\IWebGeolocationProvider.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\Interfaces\IWebHistory.idl"
>
<FileConfiguration
@@ -1644,47 +1724,47 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\Interfaces\WebKit.idl"
+ RelativePath="..\Interfaces\JavaScriptCoreAPITypes.idl"
>
<FileConfiguration
Name="Debug|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCMIDLTool"
- GenerateTypeLibrary="true"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCMIDLTool"
- GenerateTypeLibrary="true"
/>
</FileConfiguration>
</File>
<File
- RelativePath="..\Interfaces\WebScrollbarTypes.idl"
+ RelativePath="..\Interfaces\WebKit.idl"
>
<FileConfiguration
Name="Debug|Win32"
- ExcludedFromBuild="true"
>
<Tool
Name="VCMIDLTool"
+ GenerateTypeLibrary="true"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
- ExcludedFromBuild="true"
>
<Tool
Name="VCMIDLTool"
+ GenerateTypeLibrary="true"
/>
</FileConfiguration>
</File>
- <File
- RelativePath="..\Interfaces\JavaScriptCoreAPITypes.idl"
+ <File
+ RelativePath="..\Interfaces\WebScrollbarTypes.idl"
>
<FileConfiguration
Name="Debug|Win32"
diff --git a/WebKit/win/WebKit.vcproj/WebKit.rc b/WebKit/win/WebKit.vcproj/WebKit.rc
index 3d00011..fa57ca3 100644
--- a/WebKit/win/WebKit.vcproj/WebKit.rc
+++ b/WebKit/win/WebKit.vcproj/WebKit.rc
@@ -42,7 +42,7 @@ BEGIN
VALUE "FileVersion", __VERSION_TEXT__
VALUE "CompanyName", "Apple Inc."
VALUE "InternalName", "WebKit"
- VALUE "LegalCopyright", "Copyright Apple Inc. 2003-2009"
+ VALUE "LegalCopyright", "Copyright Apple Inc. 2003-2010"
VALUE "OriginalFilename", "WebKit.dll"
VALUE "ProductName", "WebKit"
VALUE "ProductVersion", __BUILD_NUMBER_SHORT__
@@ -81,4 +81,9 @@ IDR_SEARCH_CANCEL PNG "searchCancel.png"
IDR_SEARCH_CANCEL_PRESSED PNG "searchCancelPressed.png"
IDR_SEARCH_MAGNIFIER PNG "searchMagnifier.png"
IDR_SEARCH_MAGNIFIER_RESULTS PNG "searchMagnifierResults.png"
+IDR_FS_VIDEO_AUDIO_VOLUME_HIGH PNG "fsVideoAudioVolumeHigh.png"
+IDR_FS_VIDEO_AUDIO_VOLUME_LOW PNG "fsVideoAudioVolumeLow.png"
+IDR_FS_VIDEO_EXIT_FULLSCREEN PNG "fsVideoExitFullscreen.png"
+IDR_FS_VIDEO_PAUSE PNG "fsVideoPause.png"
+IDR_FS_VIDEO_PLAY PNG "fsVideoPlay.png"
diff --git a/WebKit/win/WebKit.vcproj/WebKit.sln b/WebKit/win/WebKit.vcproj/WebKit.sln
index 433bf4c..3b641fd 100644
--- a/WebKit/win/WebKit.vcproj/WebKit.sln
+++ b/WebKit/win/WebKit.vcproj/WebKit.sln
@@ -80,218 +80,161 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testapi", "..\..\..\JavaScr
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "record-memory-win", "..\..\..\WebKitTools\record-memory-win\record-memory-win.vcproj", "{44B9C152-1870-4035-B94D-7B3285AA0C12}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitAPITest", "..\..\..\WebKitTools\WebKitAPITest\WebKitAPITest.vcproj", "{626089A3-25D3-4883-A96C-B8C66E036397}"
+ ProjectSection(ProjectDependencies) = postProject
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1} = {6567DFD4-D6DE-4CD5-825D-17E353D160E1}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_All|Win32 = Debug_All|Win32
Debug_Cairo|Win32 = Debug_Cairo|Win32
- Debug_Internal|Win32 = Debug_Internal|Win32
Debug|Win32 = Debug|Win32
Release_Cairo|Win32 = Release_Cairo|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_All|Win32.Build.0 = Debug_All|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug|Win32.ActiveCfg = Debug|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug|Win32.Build.0 = Debug|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release_Cairo|Win32.ActiveCfg = Release_Cairo|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.ActiveCfg = Release|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.Build.0 = Release|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Debug_All|Win32.Build.0 = Debug_All|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug_Cairo|Win32.Build.0 = Debug|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug|Win32.ActiveCfg = Debug|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug|Win32.Build.0 = Debug|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Release_Cairo|Win32.Build.0 = Release|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.ActiveCfg = Release|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.Build.0 = Release|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_All|Win32.ActiveCfg = Debug|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_All|Win32.Build.0 = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Cairo|Win32.Build.0 = Debug|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Internal|Win32.ActiveCfg = Debug|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Internal|Win32.Build.0 = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug|Win32.ActiveCfg = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug|Win32.Build.0 = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release_Cairo|Win32.Build.0 = Release|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.ActiveCfg = Release|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.Build.0 = Release|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_All|Win32.Build.0 = Debug_All|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug|Win32.ActiveCfg = Debug|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug|Win32.Build.0 = Debug|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release_Cairo|Win32.ActiveCfg = Release_Cairo|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.ActiveCfg = Release|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.Build.0 = Release|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_All|Win32.Build.0 = Debug_All|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.ActiveCfg = Debug|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.Build.0 = Debug|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_Cairo|Win32.ActiveCfg = Release_Cairo|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.ActiveCfg = Release|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.Build.0 = Release|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_All|Win32.Build.0 = Debug_All|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.ActiveCfg = Debug|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.Build.0 = Debug|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_Cairo|Win32.Build.0 = Release|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.ActiveCfg = Release|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.Build.0 = Release|Win32
- {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.Build.0 = Debug_All|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
- {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug|Win32.ActiveCfg = Debug|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug|Win32.Build.0 = Debug|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo|Win32.ActiveCfg = Release_CFLite|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.ActiveCfg = Release|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.Build.0 = Release|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.Build.0 = Debug_All|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug|Win32.ActiveCfg = Debug|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug|Win32.Build.0 = Debug|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Release_Cairo|Win32.Build.0 = Release|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.ActiveCfg = Release|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.Build.0 = Release|Win32
- {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_All|Win32.Build.0 = Debug_All|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo|Win32.Build.0 = Debug|Win32
- {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug|Win32.ActiveCfg = Debug|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug|Win32.Build.0 = Debug|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_Cairo|Win32.Build.0 = Release|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release|Win32.ActiveCfg = Release|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release|Win32.Build.0 = Release|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.ActiveCfg = all|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.Build.0 = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.ActiveCfg = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.Build.0 = all|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.ActiveCfg = all|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.Build.0 = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.ActiveCfg = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.ActiveCfg = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.Build.0 = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = all|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.Build.0 = Debug_All|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Cairo|Win32.Build.0 = Debug|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.ActiveCfg = Debug|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.Build.0 = Debug|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.ActiveCfg = Debug|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.Build.0 = Debug|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_Cairo|Win32.Build.0 = Release|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.ActiveCfg = Release|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.Build.0 = Release|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.ActiveCfg = all|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo|Win32.Build.0 = all|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Internal|Win32.ActiveCfg = all|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Internal|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.Build.0 = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_All|Win32.ActiveCfg = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_All|Win32.Build.0 = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.ActiveCfg = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.Build.0 = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Internal|Win32.ActiveCfg = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Internal|Win32.Build.0 = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.ActiveCfg = cairo|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.Build.0 = cairo|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug|Win32.ActiveCfg = all|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug|Win32.Build.0 = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.ActiveCfg = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.Build.0 = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.ActiveCfg = cairo|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.Build.0 = cairo|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.ActiveCfg = all|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.Build.0 = all|Win32
- {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_All|Win32.Build.0 = Debug_All|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
- {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug|Win32.ActiveCfg = Debug|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug|Win32.Build.0 = Debug|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release|Win32.ActiveCfg = Release|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release|Win32.Build.0 = Release|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_All|Win32.Build.0 = Debug_All|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug|Win32.ActiveCfg = Debug|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug|Win32.Build.0 = Debug|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Release_Cairo|Win32.Build.0 = Release|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.ActiveCfg = Release|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.Build.0 = Release|Win32
- {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_All|Win32.Build.0 = Debug_All|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
- {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug|Win32.ActiveCfg = Debug|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug|Win32.Build.0 = Debug|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release_Cairo|Win32.ActiveCfg = Release_CFLite|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release|Win32.ActiveCfg = Release|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release|Win32.Build.0 = Release|Win32
- {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_All|Win32.ActiveCfg = Release|Win32
- {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_All|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Cairo|Win32.ActiveCfg = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Cairo|Win32.Build.0 = Release|Win32
- {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Internal|Win32.ActiveCfg = Release|Win32
- {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Internal|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug|Win32.ActiveCfg = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Release_Cairo|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Release|Win32.ActiveCfg = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Release|Win32.Build.0 = Release|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug_Cairo|Win32.ActiveCfg = Debug_Internal|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug_Cairo|Win32.Build.0 = Debug_Internal|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug|Win32.ActiveCfg = Debug|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug|Win32.Build.0 = Debug|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Release_Cairo|Win32.ActiveCfg = Debug|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Release_Cairo|Win32.Build.0 = Debug|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Release|Win32.ActiveCfg = Debug|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Release|Win32.Build.0 = Debug|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/WebKit/win/WebKit.vcproj/WebKit.vcproj b/WebKit/win/WebKit.vcproj/WebKit.vcproj
index 5846813..57d1da2 100644
--- a/WebKit/win/WebKit.vcproj/WebKit.vcproj
+++ b/WebKit/win/WebKit.vcproj/WebKit.vcproj
@@ -18,7 +18,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
CharacterSet="1"
>
<Tool
@@ -39,8 +39,8 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\icu&quot;;&quot;$(WebKitLibrariesDir)\Include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..\WebCoreSupport&quot;;&quot;$(IntDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
- PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_VIDEO;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..\WebCoreSupport&quot;;&quot;$(IntDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
DisableSpecificWarnings="4819"
@@ -61,9 +61,9 @@
Name="VCLinkerTool"
AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitDLLConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib winmm.lib rpcrt4.lib comsuppw.lib"
OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
- AdditionalLibraryDirectories=""
+ AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll;QuartzCore.dll;QuartzCoreInterface.dll"
/>
<Tool
Name="VCALinkTool"
@@ -94,7 +94,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -116,8 +116,8 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\icu&quot;;&quot;$(WebKitLibrariesDir)\Include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..\WebCoreSupport&quot;;&quot;$(IntDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
- PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_VIDEO;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..\WebCoreSupport&quot;;&quot;$(IntDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
DisableSpecificWarnings="4819"
@@ -138,9 +138,9 @@
Name="VCLinkerTool"
AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitDLLConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib winmm.lib rpcrt4.lib comsuppw.lib"
OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
- AdditionalLibraryDirectories=""
+ AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll;QuartzCore.dll;QuartzCoreInterface.dll"
/>
<Tool
Name="VCALinkTool"
@@ -171,7 +171,7 @@
<Configuration
Name="Debug_Internal|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
CharacterSet="1"
>
<Tool
@@ -192,8 +192,8 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\icu&quot;;&quot;$(WebKitLibrariesDir)\Include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..\WebCoreSupport&quot;;&quot;$(IntDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
- PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_VIDEO;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..\WebCoreSupport&quot;;&quot;$(IntDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
Detect64BitPortabilityProblems="false"
@@ -217,7 +217,7 @@
OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll;QuartzCore.dll;QuartzCoreInterface.dll"
/>
<Tool
Name="VCALinkTool"
@@ -248,7 +248,7 @@
<Configuration
Name="Debug_Cairo|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_wincairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\cURL.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefinesCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_wincairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\cURL.vsprops"
CharacterSet="1"
>
<Tool
@@ -269,8 +269,8 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\icu&quot;;&quot;$(WebKitLibrariesDir)\Include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..\WebCoreSupport&quot;;&quot;$(IntDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
- PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..\WebCoreSupport&quot;;&quot;$(IntDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
DisableSpecificWarnings="4819"
@@ -327,7 +327,7 @@
OutputDirectory="$(WebKitOutputDir)\bin"
IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\cURL.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefinesCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\cURL.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -349,8 +349,8 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\icu&quot;;&quot;$(WebKitLibrariesDir)\Include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..\WebCoreSupport&quot;;&quot;$(IntDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
- PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..\WebCoreSupport&quot;;&quot;$(IntDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
DisableSpecificWarnings="4819"
@@ -404,7 +404,7 @@
<Configuration
Name="Debug_All|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
CharacterSet="1"
>
<Tool
@@ -425,8 +425,8 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\icu&quot;;&quot;$(WebKitLibrariesDir)\Include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..\WebCoreSupport&quot;;&quot;$(IntDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
- PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_VIDEO;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..\WebCoreSupport&quot;;&quot;$(IntDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
Detect64BitPortabilityProblems="false"
@@ -448,7 +448,7 @@
Name="VCLinkerTool"
AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitDLLConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib winmm.lib rpcrt4.lib comsuppw.lib"
OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
- AdditionalLibraryDirectories=""
+ AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
/>
@@ -582,6 +582,10 @@
>
</File>
<File
+ RelativePath="..\FullscreenVideoController.h"
+ >
+ </File>
+ <File
RelativePath="..\MarshallingHelpers.h"
>
</File>
@@ -662,6 +666,14 @@
>
</File>
<File
+ RelativePath="..\WebGeolocationPolicyListener.h"
+ >
+ </File>
+ <File
+ RelativePath="..\WebGeolocationPosition.h"
+ >
+ </File>
+ <File
RelativePath="..\WebHistory.h"
>
</File>
@@ -722,14 +734,6 @@
>
</File>
<File
- RelativePath="..\WebScriptWorld.h"
- >
- </File>
- <File
- RelativePath="..\WebSerializedJSValue.h"
- >
- </File>
- <File
RelativePath="..\WebKitStatistics.h"
>
</File>
@@ -802,6 +806,10 @@
>
</File>
<File
+ RelativePath="..\WebScriptWorld.h"
+ >
+ </File>
+ <File
RelativePath="..\WebScrollBar.h"
>
</File>
@@ -810,6 +818,10 @@
>
</File>
<File
+ RelativePath="..\WebSerializedJSValue.h"
+ >
+ </File>
+ <File
RelativePath="..\WebTextRenderer.h"
>
</File>
@@ -894,6 +906,10 @@
>
</File>
<File
+ RelativePath="..\FullscreenVideoController.cpp"
+ >
+ </File>
+ <File
RelativePath="..\MemoryStream.cpp"
>
</File>
@@ -1070,6 +1086,14 @@
>
</File>
<File
+ RelativePath="..\WebGeolocationPolicyListener.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebGeolocationPosition.cpp"
+ >
+ </File>
+ <File
RelativePath="..\WebHistory.cpp"
>
</File>
@@ -1102,14 +1126,6 @@
>
</File>
<File
- RelativePath="..\WebScriptWorld.cpp"
- >
- </File>
- <File
- RelativePath="..\WebSerializedJSValue.cpp"
- >
- </File>
- <File
RelativePath="..\WebKitStatistics.cpp"
>
</File>
@@ -1146,6 +1162,10 @@
>
</File>
<File
+ RelativePath="..\WebScriptWorld.cpp"
+ >
+ </File>
+ <File
RelativePath="..\WebScrollBar.cpp"
>
</File>
@@ -1154,6 +1174,10 @@
>
</File>
<File
+ RelativePath="..\WebSerializedJSValue.cpp"
+ >
+ </File>
+ <File
RelativePath="..\WebTextRenderer.cpp"
>
</File>
@@ -1246,6 +1270,26 @@
Name="Resources"
>
<File
+ RelativePath=".\fsVideoAudioVolumeHigh.png"
+ >
+ </File>
+ <File
+ RelativePath=".\fsVideoAudioVolumeLow.png"
+ >
+ </File>
+ <File
+ RelativePath=".\fsVideoExitFullscreen.png"
+ >
+ </File>
+ <File
+ RelativePath=".\fsVideoPause.png"
+ >
+ </File>
+ <File
+ RelativePath=".\fsVideoPlay.png"
+ >
+ </File>
+ <File
RelativePath=".\missingImage.png"
>
</File>
@@ -1438,6 +1482,14 @@
>
</File>
<File
+ RelativePath="..\WebCoreSupport\WebGeolocationControllerClient.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebGeolocationControllerClient.h"
+ >
+ </File>
+ <File
RelativePath="..\WebCoreSupport\WebInspectorClient.cpp"
>
</File>
diff --git a/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj b/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj
index ab7a0b2..b2b708e 100644
--- a/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj
+++ b/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj
@@ -19,7 +19,7 @@
Name="Debug|Win32"
OutputDirectory="$(WebKitOutputDir)\lib"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
CharacterSet="1"
>
<Tool
@@ -79,7 +79,7 @@
Name="Release|Win32"
OutputDirectory="$(WebKitOutputDir)\lib"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -140,7 +140,7 @@
Name="Debug_Internal|Win32"
OutputDirectory="$(WebKitOutputDir)\lib"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
CharacterSet="1"
>
<Tool
@@ -200,7 +200,7 @@
Name="Debug_All|Win32"
OutputDirectory="$(WebKitOutputDir)\lib"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
CharacterSet="1"
>
<Tool
diff --git a/WebKit/win/WebKit.vcproj/build-generated-files.sh b/WebKit/win/WebKit.vcproj/build-generated-files.sh
deleted file mode 100644
index ac26fd2..0000000
--- a/WebKit/win/WebKit.vcproj/build-generated-files.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (C) 2007 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.
-# 3. Neither the name of Apple puter, 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.
-
-NUMCPUPATH="../../../WebKitTools/Scripts/num-cpus"
-if [ -x $NUMCPUPATH ]; then
- NUMCPUS=`$NUMCPUPATH`
-else
- NUMCPUS=1
-fi
-
-XSRCROOT="`pwd`/.."
-XSRCROOT=`realpath "$XSRCROOT"`
-# Do a little dance to get the path into 8.3 form to make it safe for gnu make
-# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173
-XSRCROOT=`cygpath -m -s "$XSRCROOT"`
-XSRCROOT=`cygpath -u "$XSRCROOT"`
-export XSRCROOT
-export SOURCE_ROOT=$XSRCROOT
-
-XDSTROOT="$1"
-export XDSTROOT
-# Do a little dance to get the path into 8.3 form to make it safe for gnu make
-# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173
-XDSTROOT=`cygpath -m -s "$XDSTROOT"`
-XDSTROOT=`cygpath -u "$XDSTROOT"`
-export XDSTROOT
-
-export BUILT_PRODUCTS_DIR="$XDSTROOT/obj/WebKit"
-
-mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources"
-cd "${BUILT_PRODUCTS_DIR}/DerivedSources"
-
-export WEBKIT=$XSRCROOT
-export WEBKIT_OUTPUT=$XDSTROOT
-
-export FEATURE_DEFINES="ENABLE_XPATH ENABLE_SVG"
-make -f "$WEBKIT/WebKit.vcproj/DerivedSources.make" -j ${NUMCPUS} || exit 1
diff --git a/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeHigh.png b/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeHigh.png
new file mode 100755
index 0000000..d04df37
--- /dev/null
+++ b/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeHigh.png
Binary files differ
diff --git a/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeLow.png b/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeLow.png
new file mode 100755
index 0000000..e824a21
--- /dev/null
+++ b/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeLow.png
Binary files differ
diff --git a/WebKit/win/WebKit.vcproj/fsVideoExitFullscreen.png b/WebKit/win/WebKit.vcproj/fsVideoExitFullscreen.png
new file mode 100755
index 0000000..01ce692
--- /dev/null
+++ b/WebKit/win/WebKit.vcproj/fsVideoExitFullscreen.png
Binary files differ
diff --git a/WebKit/win/WebKit.vcproj/fsVideoPause.png b/WebKit/win/WebKit.vcproj/fsVideoPause.png
new file mode 100755
index 0000000..b98fb36
--- /dev/null
+++ b/WebKit/win/WebKit.vcproj/fsVideoPause.png
Binary files differ
diff --git a/WebKit/win/WebKit.vcproj/fsVideoPlay.png b/WebKit/win/WebKit.vcproj/fsVideoPlay.png
new file mode 100755
index 0000000..035aeb2
--- /dev/null
+++ b/WebKit/win/WebKit.vcproj/fsVideoPlay.png
Binary files differ
diff --git a/WebKit/win/WebKit.vcproj/resource.h b/WebKit/win/WebKit.vcproj/resource.h
index 028cb3c..b999de6 100644
--- a/WebKit/win/WebKit.vcproj/resource.h
+++ b/WebKit/win/WebKit.vcproj/resource.h
@@ -23,6 +23,11 @@
#define IDR_SEARCH_CANCEL_PRESSED 19
#define IDR_SEARCH_MAGNIFIER 20
#define IDR_SEARCH_MAGNIFIER_RESULTS 21
+#define IDR_FS_VIDEO_AUDIO_VOLUME_HIGH 22
+#define IDR_FS_VIDEO_AUDIO_VOLUME_LOW 23
+#define IDR_FS_VIDEO_EXIT_FULLSCREEN 24
+#define IDR_FS_VIDEO_PAUSE 25
+#define IDR_FS_VIDEO_PLAY 26
#define IDC_STATIC -1
#define BUILD_NUMBER 1
diff --git a/WebKit/win/WebKitClassFactory.cpp b/WebKit/win/WebKitClassFactory.cpp
index b233a5c..d243588 100644
--- a/WebKit/win/WebKitClassFactory.cpp
+++ b/WebKit/win/WebKitClassFactory.cpp
@@ -37,6 +37,7 @@
#include "WebDownload.h"
#include "WebError.h"
#include "WebFrame.h"
+#include "WebGeolocationPosition.h"
#include "WebHistory.h"
#include "WebHistoryItem.h"
#include "WebIconDatabase.h"
@@ -48,6 +49,7 @@
#include "WebPreferences.h"
#include "WebScriptWorld.h"
#include "WebScrollBar.h"
+#include "WebSerializedJSValue.h"
#include "WebTextRenderer.h"
#include "WebURLCredential.h"
#include "WebURLProtectionSpace.h"
diff --git a/WebKit/win/WebKitDLL.cpp b/WebKit/win/WebKitDLL.cpp
index c34fe4b..9f4eaeb 100644
--- a/WebKit/win/WebKitDLL.cpp
+++ b/WebKit/win/WebKitDLL.cpp
@@ -179,6 +179,16 @@ PassRefPtr<WebCore::SharedBuffer> loadResourceIntoBuffer(const char* name)
idr = IDR_ZOOM_OUT_CURSOR;
else if (!strcmp(name, "verticalTextCursor"))
idr = IDR_VERTICAL_TEXT_CURSOR;
+ else if (!strcmp(name, "fsVideoAudioVolumeHigh"))
+ idr = IDR_FS_VIDEO_AUDIO_VOLUME_HIGH;
+ else if (!strcmp(name, "fsVideoAudioVolumeLow"))
+ idr = IDR_FS_VIDEO_AUDIO_VOLUME_LOW;
+ else if (!strcmp(name, "fsVideoExitFullscreen"))
+ idr = IDR_FS_VIDEO_EXIT_FULLSCREEN;
+ else if (!strcmp(name, "fsVideoPause"))
+ idr = IDR_FS_VIDEO_PAUSE;
+ else if (!strcmp(name, "fsVideoPlay"))
+ idr = IDR_FS_VIDEO_PLAY;
else
return 0;
diff --git a/WebKit/win/WebKitLogging.cpp b/WebKit/win/WebKitLogging.cpp
index f7a333c..273ab56 100644
--- a/WebKit/win/WebKitLogging.cpp
+++ b/WebKit/win/WebKitLogging.cpp
@@ -29,7 +29,7 @@
#include "config.h"
#include "WebKitLogging.h"
-WTFLogChannel WebKitLogNetwork = { 0x00000010, "WebKitLogLevel", WTFLogChannelOff };
+WTFLogChannel WebKitLogTextInput = { 0x00000010, "WebKitLogLevel", WTFLogChannelOff };
WTFLogChannel WebKitLogTiming = { 0x00000020, "WebKitLogLevel", WTFLogChannelOff };
WTFLogChannel WebKitLogLoading = { 0x00000040, "WebKitLogLevel", WTFLogChannelOff };
WTFLogChannel WebKitLogFontCache = { 0x00000100, "WebKitLogLevel", WTFLogChannelOff };
@@ -78,6 +78,7 @@ void WebKitInitializeLoggingChannelsIfNecessary()
return;
haveInitializedLoggingChannels = true;
+ initializeLogChannel(&WebKitLogTextInput);
initializeLogChannel(&WebKitLogTiming);
initializeLogChannel(&WebKitLogLoading);
initializeLogChannel(&WebKitLogFontCache);
diff --git a/WebKit/win/WebKitLogging.h b/WebKit/win/WebKitLogging.h
index 0aafb51..d19933d 100644
--- a/WebKit/win/WebKitLogging.h
+++ b/WebKit/win/WebKitLogging.h
@@ -36,7 +36,7 @@
#endif
-extern WTFLogChannel WebKitLogNetwork;
+extern WTFLogChannel WebKitLogTextInput;
extern WTFLogChannel WebKitLogTiming;
extern WTFLogChannel WebKitLogLoading;
extern WTFLogChannel WebKitLogFontCache;
diff --git a/WebKit/win/WebKitPrefix.cpp b/WebKit/win/WebKitPrefix.cpp
index e82b88d..9be9aed 100644
--- a/WebKit/win/WebKitPrefix.cpp
+++ b/WebKit/win/WebKitPrefix.cpp
@@ -25,5 +25,4 @@
* (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 "WebKitPrefix.h"
diff --git a/WebKit/win/WebPreferenceKeysPrivate.h b/WebKit/win/WebPreferenceKeysPrivate.h
index 09aeaff..3b4197c 100644
--- a/WebKit/win/WebPreferenceKeysPrivate.h
+++ b/WebKit/win/WebPreferenceKeysPrivate.h
@@ -129,3 +129,7 @@
#define WebKitUseHighResolutionTimersPreferenceKey "WebKitUseHighResolutionTimers"
#define WebKitPluginAllowedRunTimePreferenceKey "WebKitPluginAllowedRunTime"
+
+#define WebKitAcceleratedCompositingEnabledPreferenceKey "WebKitAcceleratedCompositingEnabled"
+
+#define WebKitCustomDragCursorsEnabledPreferenceKey "WebKitCustomDragCursorsEnabled"
diff --git a/WebKit/win/WebPreferences.cpp b/WebKit/win/WebPreferences.cpp
index 652e619..c23f236 100644
--- a/WebKit/win/WebPreferences.cpp
+++ b/WebKit/win/WebPreferences.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 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
@@ -32,14 +32,13 @@
#include "WebNotificationCenter.h"
#include "WebPreferenceKeysPrivate.h"
-#pragma warning( push, 0 )
#include <WebCore/CString.h>
#include <WebCore/FileSystem.h>
#include <WebCore/Font.h>
#include <WebCore/PlatformString.h>
#include <WebCore/StringHash.h>
+#include <WebCore/WKCACFLayerRenderer.h>
#include "WebLocalizableStrings.h"
-#pragma warning( pop )
#include <CoreFoundation/CoreFoundation.h>
#include <limits>
@@ -213,6 +212,7 @@ void WebPreferences::initializeDefaultSettings()
CFDictionaryAddValue(defaults, CFSTR(WebKitDatabasesEnabledPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitLocalStorageEnabledPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitExperimentalNotificationsEnabledPreferenceKey), kCFBooleanFalse);
+ CFDictionaryAddValue(defaults, CFSTR(WebKitZoomsTextOnlyPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitAllowAnimatedImagesPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitAllowAnimatedImageLoopingPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitDisplayImagesKey), kCFBooleanTrue);
@@ -255,6 +255,8 @@ void WebPreferences::initializeDefaultSettings()
RetainPtr<CFStringRef> pluginAllowedRunTime(AdoptCF, CFStringCreateWithFormat(0, 0, CFSTR("%u"), numeric_limits<unsigned>::max()));
CFDictionaryAddValue(defaults, CFSTR(WebKitPluginAllowedRunTimePreferenceKey), pluginAllowedRunTime.get());
+ CFDictionaryAddValue(defaults, CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey), kCFBooleanTrue);
+
defaultSettings = defaults;
}
@@ -1356,6 +1358,34 @@ HRESULT WebPreferences::setPreferenceForTest(BSTR key, BSTR value)
return S_OK;
}
+HRESULT WebPreferences::setAcceleratedCompositingEnabled(BOOL enabled)
+{
+ setBoolValue(CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey), enabled);
+ return S_OK;
+}
+
+HRESULT WebPreferences::acceleratedCompositingEnabled(BOOL* enabled)
+{
+#if USE(ACCELERATED_COMPOSITING)
+ *enabled = WKCACFLayerRenderer::acceleratedCompositingAvailable() && boolValueForKey(CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey));
+#else
+ *enabled = FALSE;
+#endif
+ return S_OK;
+}
+
+HRESULT WebPreferences::setCustomDragCursorsEnabled(BOOL enabled)
+{
+ setBoolValue(CFSTR(WebKitCustomDragCursorsEnabledPreferenceKey), enabled);
+ return S_OK;
+}
+
+HRESULT WebPreferences::customDragCursorsEnabled(BOOL* enabled)
+{
+ *enabled = boolValueForKey(CFSTR(WebKitCustomDragCursorsEnabledPreferenceKey));
+ return S_OK;
+}
+
void WebPreferences::willAddToWebView()
{
++m_numWebViews;
diff --git a/WebKit/win/WebPreferences.h b/WebKit/win/WebPreferences.h
index 2a89269..1631e78 100644
--- a/WebKit/win/WebPreferences.h
+++ b/WebKit/win/WebPreferences.h
@@ -384,6 +384,11 @@ public:
/* [in] */ BSTR key,
/* [in] */ BSTR value);
+ virtual HRESULT STDMETHODCALLTYPE setAcceleratedCompositingEnabled(BOOL);
+ virtual HRESULT STDMETHODCALLTYPE acceleratedCompositingEnabled(BOOL*);
+
+ virtual HRESULT STDMETHODCALLTYPE setCustomDragCursorsEnabled(BOOL);
+ virtual HRESULT STDMETHODCALLTYPE customDragCursorsEnabled(BOOL*);
// WebPreferences
diff --git a/WebKit/win/WebScriptWorld.cpp b/WebKit/win/WebScriptWorld.cpp
index 03eede7..7bc04eb 100644
--- a/WebKit/win/WebScriptWorld.cpp
+++ b/WebKit/win/WebScriptWorld.cpp
@@ -26,6 +26,7 @@
#include "WebKitDLL.h"
#include "WebScriptWorld.h"
+#include <JavaScriptCore/APICast.h>
#include <WebCore/JSDOMBinding.h>
#include <WebCore/ScriptController.h>
@@ -128,3 +129,10 @@ HRESULT WebScriptWorld::standardWorld(IWebScriptWorld** outWorld)
(*outWorld)->AddRef();
return S_OK;
}
+
+HRESULT WebScriptWorld::scriptWorldForGlobalContext(JSGlobalContextRef context, IWebScriptWorld** outWorld)
+{
+ if (!outWorld)
+ return E_POINTER;
+ return findOrCreateWorld(currentWorld(toJS(context))).copyRefTo(outWorld);
+}
diff --git a/WebKit/win/WebScriptWorld.h b/WebKit/win/WebScriptWorld.h
index b800225..dc7e9db 100644
--- a/WebKit/win/WebScriptWorld.h
+++ b/WebKit/win/WebScriptWorld.h
@@ -51,6 +51,7 @@ private:
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void** ppvObject);
virtual HRESULT STDMETHODCALLTYPE standardWorld(IWebScriptWorld**);
+ virtual HRESULT STDMETHODCALLTYPE scriptWorldForGlobalContext(JSGlobalContextRef, IWebScriptWorld**);
ULONG m_refCount;
RefPtr<WebCore::DOMWrapperWorld> m_world;
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index aadf15e..b4b47cd 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -24,11 +24,12 @@
*/
#include "config.h"
-#include "WebKitDLL.h"
+
#include "WebView.h"
#include "CFDictionaryPropertyBag.h"
#include "DOMCoreClasses.h"
+#include "FullscreenVideoController.h"
#include "MarshallingHelpers.h"
#include "SoftLinking.h"
#include "WebBackForwardList.h"
@@ -42,10 +43,14 @@
#include "WebEditorClient.h"
#include "WebElementPropertyBag.h"
#include "WebFrame.h"
+#include "WebGeolocationControllerClient.h"
+#include "WebGeolocationPosition.h"
#include "WebIconDatabase.h"
#include "WebInspector.h"
#include "WebInspectorClient.h"
#include "WebKit.h"
+#include "WebKitDLL.h"
+#include "WebKitLogging.h"
#include "WebKitStatisticsPrivate.h"
#include "WebKitSystemBits.h"
#include "WebMutableURLRequest.h"
@@ -54,16 +59,20 @@
#include "WebPreferences.h"
#include "WebScriptWorld.h"
#include "WindowsTouch.h"
-#pragma warning( push, 0 )
-#include <WebCore/ApplicationCacheStorage.h>
+#include <JavaScriptCore/InitializeThreading.h>
+#include <JavaScriptCore/JSLock.h>
+#include <JavaScriptCore/JSValue.h>
#include <WebCore/AXObjectCache.h>
-#include <WebCore/BitmapInfo.h>
+#include <WebCore/ApplicationCacheStorage.h>
#include <WebCore/BString.h>
+#include <WebCore/BackForwardList.h>
+#include <WebCore/BitmapInfo.h>
+#include <WebCore/CString.h>
#include <WebCore/Cache.h>
+#include <WebCore/Chrome.h>
#include <WebCore/ContextMenu.h>
#include <WebCore/ContextMenuController.h>
#include <WebCore/CookieStorageWin.h>
-#include <WebCore/CString.h>
#include <WebCore/Cursor.h>
#include <WebCore/Document.h>
#include <WebCore/DragController.h>
@@ -72,14 +81,16 @@
#include <WebCore/EventHandler.h>
#include <WebCore/EventNames.h>
#include <WebCore/FileSystem.h>
-#include <WebCore/FocusController.h>
#include <WebCore/FloatQuad.h>
+#include <WebCore/FocusController.h>
#include <WebCore/FrameLoader.h>
#include <WebCore/FrameTree.h>
#include <WebCore/FrameView.h>
#include <WebCore/FrameWin.h>
#include <WebCore/GDIObjectCounter.h>
#include <WebCore/GraphicsContext.h>
+#include <WebCore/HTMLMediaElement.h>
+#include <WebCore/HTMLNames.h>
#include <WebCore/HistoryItem.h>
#include <WebCore/HitTestRequest.h>
#include <WebCore/HitTestResult.h>
@@ -113,10 +124,11 @@
#include <WebCore/SimpleFontData.h>
#include <WebCore/TypingCommand.h>
#include <WebCore/WindowMessageBroadcaster.h>
-#pragma warning(pop)
-#include <JavaScriptCore/InitializeThreading.h>
-#include <JavaScriptCore/JSLock.h>
-#include <JavaScriptCore/JSValue.h>
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#include <WebCore/GeolocationController.h>
+#include <WebCore/GeolocationError.h>
+#endif
#if PLATFORM(CG)
#include <CoreGraphics/CGContext.h>
@@ -132,13 +144,13 @@
#include <WebKitSystemInterface/WebKitSystemInterface.h>
#endif
-#include <wtf/HashSet.h>
+#include <ShlObj.h>
#include <comutil.h>
#include <dimm.h>
#include <oleacc.h>
-#include <ShlObj.h>
#include <tchar.h>
#include <windowsx.h>
+#include <wtf/HashSet.h>
// Soft link functions for gestures and panning feedback
SOFT_LINK_LIBRARY(USER32);
@@ -295,6 +307,9 @@ bool WebView::s_allowSiteSpecificHacks = false;
WebView::WebView()
: m_refCount(0)
+#if !ASSERT_DISABLED
+ , m_deletionHasBegun(false)
+#endif
, m_hostWindow(0)
, m_viewWindow(0)
, m_mainFrame(0)
@@ -350,18 +365,13 @@ WebView::~WebView()
{
deleteBackingStore();
- // <rdar://4958382> m_viewWindow will be destroyed when m_hostWindow is destroyed, but if
- // setHostWindow was never called we will leak our HWND. If we still have a valid HWND at
- // this point, we should just destroy it ourselves.
- if (!isBeingDestroyed() && ::IsWindow(m_viewWindow))
- ::DestroyWindow(m_viewWindow);
-
// the tooltip window needs to be explicitly destroyed since it isn't a WS_CHILD
if (::IsWindow(m_toolTipHwnd))
::DestroyWindow(m_toolTipHwnd);
ASSERT(!m_page);
ASSERT(!m_preferences);
+ ASSERT(!m_viewWindow);
WebViewCount--;
gClassCount--;
@@ -631,9 +641,10 @@ HRESULT STDMETHODCALLTYPE WebView::close()
removeFromAllWebViewsSet();
- Frame* frame = m_page->mainFrame();
- if (frame)
- frame->loader()->detachFromParent();
+ if (m_page) {
+ if (Frame* frame = m_page->mainFrame())
+ frame->loader()->detachFromParent();
+ }
if (m_mouseOutTracker) {
m_mouseOutTracker->dwFlags = TME_CANCEL;
@@ -641,6 +652,18 @@ HRESULT STDMETHODCALLTYPE WebView::close()
m_mouseOutTracker.set(0);
}
+ revokeDragDrop();
+
+ if (m_viewWindow) {
+ // We can't check IsWindow(m_viewWindow) here, because that will return true even while
+ // we're already handling WM_DESTROY. So we check !isBeingDestroyed() instead.
+ if (!isBeingDestroyed())
+ DestroyWindow(m_viewWindow);
+ // Either we just destroyed m_viewWindow, or it's in the process of being destroyed. Either
+ // way, we clear it out to make sure we don't try to use it later.
+ m_viewWindow = 0;
+ }
+
setHostWindow(0);
setDownloadDelegate(0);
@@ -664,17 +687,18 @@ HRESULT STDMETHODCALLTYPE WebView::close()
IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
notifyCenter->removeObserver(this, WebPreferences::webPreferencesChangedNotification(), static_cast<IWebPreferences*>(m_preferences.get()));
- BSTR identifier = 0;
- m_preferences->identifier(&identifier);
-
- COMPtr<WebPreferences> preferences = m_preferences;
- m_preferences = 0;
- preferences->didRemoveFromWebView();
- // Make sure we release the reference, since WebPreferences::removeReferenceForIdentifier will check for last reference to WebPreferences
- preferences = 0;
- if (identifier) {
- WebPreferences::removeReferenceForIdentifier(identifier);
- SysFreeString(identifier);
+ if (COMPtr<WebPreferences> preferences = m_preferences) {
+ BSTR identifier = 0;
+ preferences->identifier(&identifier);
+
+ m_preferences = 0;
+ preferences->didRemoveFromWebView();
+ // Make sure we release the reference, since WebPreferences::removeReferenceForIdentifier will check for last reference to WebPreferences
+ preferences = 0;
+ if (identifier) {
+ WebPreferences::removeReferenceForIdentifier(identifier);
+ SysFreeString(identifier);
+ }
}
deleteBackingStore();
@@ -1904,7 +1928,6 @@ LRESULT CALLBACK WebView::WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam,
case WM_DESTROY:
webView->setIsBeingDestroyed();
webView->close();
- webView->revokeDragDrop();
break;
case WM_GESTURENOTIFY:
handled = webView->gestureNotify(wParam, lParam);
@@ -1953,10 +1976,6 @@ LRESULT CALLBACK WebView::WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam,
break;
// FIXME: We need to check WM_UNICHAR to support supplementary characters (that don't fit in 16 bits).
case WM_SIZE:
- if (webView->isBeingDestroyed())
- // If someone has sent us this message while we're being destroyed, we should bail out so we don't crash.
- break;
-
if (lParam != 0) {
webView->deleteBackingStore();
#if USE(ACCELERATED_COMPOSITING)
@@ -2100,7 +2119,7 @@ LRESULT CALLBACK WebView::WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam,
handled = webView->onIMEStartComposition();
break;
case WM_IME_REQUEST:
- webView->onIMERequest(wParam, lParam, &lResult);
+ lResult = webView->onIMERequest(wParam, lParam);
break;
case WM_IME_COMPOSITION:
handled = webView->onIMEComposition(lParam);
@@ -2270,14 +2289,29 @@ HRESULT STDMETHODCALLTYPE WebView::QueryInterface(REFIID riid, void** ppvObject)
ULONG STDMETHODCALLTYPE WebView::AddRef(void)
{
+ ASSERT(!m_deletionHasBegun);
return ++m_refCount;
}
ULONG STDMETHODCALLTYPE WebView::Release(void)
{
+ ASSERT(!m_deletionHasBegun);
+
+ if (m_refCount == 1) {
+ // Call close() now so that clients don't have to. (It's harmless to call close() multiple
+ // times.) We do this here instead of in our destructor because close() can cause AddRef()
+ // and Release() to be called, and if that happened in our destructor we would be destroyed
+ // more than once.
+ close();
+ }
+
ULONG newRef = --m_refCount;
- if (!newRef)
+ if (!newRef) {
+#if !ASSERT_DISABLED
+ m_deletionHasBegun = true;
+#endif
delete(this);
+ }
return newRef;
}
@@ -2390,11 +2424,21 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame(
Settings::setShouldPaintNativeControls(shouldPaintNativeControls);
#endif
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ WebGeolocationControllerClient* geolocationControllerClient = new WebGeolocationControllerClient(this);
+#else
+ WebGeolocationControllerClient* geolocationControllerClient = 0;
+#endif
+
BOOL useHighResolutionTimer;
if (SUCCEEDED(m_preferences->shouldUseHighResolutionTimers(&useHighResolutionTimer)))
Settings::setShouldUseHighResolutionTimers(useHighResolutionTimer);
+<<<<<<< HEAD
m_page = new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this), new WebInspectorClient(this), new WebPluginHalterClient(this), 0);
+=======
+ m_page = new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this), new WebInspectorClient(this), new WebPluginHalterClient(this), geolocationControllerClient);
+>>>>>>> webkit.org at r54127
BSTR localStoragePath;
if (SUCCEEDED(m_preferences->localStorageDatabasePath(&localStoragePath))) {
@@ -3051,8 +3095,7 @@ HRESULT STDMETHODCALLTYPE WebView::setHostWindow(
m_hostWindow = window;
- if (m_viewWindow)
- windowAncestryDidChange();
+ windowAncestryDidChange();
return S_OK;
}
@@ -4504,6 +4547,13 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
return hr;
settings->setPluginAllowedRunTime(runTime);
+#if USE(ACCELERATED_COMPOSITING)
+ hr = prefsPrivate->acceleratedCompositingEnabled(&enabled);
+ if (FAILED(hr))
+ return hr;
+ settings->setAcceleratedCompositingEnabled(enabled);
+#endif
+
#if ENABLE(3D_CANVAS)
settings->setExperimentalWebGLEnabled(true);
#endif // ENABLE(3D_CANVAS)
@@ -4925,7 +4975,9 @@ HRESULT WebView::registerDragDrop()
HRESULT WebView::revokeDragDrop()
{
- ASSERT(::IsWindow(m_viewWindow));
+ if (!m_viewWindow)
+ return S_OK;
+
return ::RevokeDragDrop(m_viewWindow);
}
@@ -5065,6 +5117,7 @@ void WebView::selectionChanged()
bool WebView::onIMEStartComposition()
{
+ LOG(TextInput, "onIMEStartComposition");
m_inIMEComposition++;
Frame* targetFrame = m_page->focusController()->focusedOrMainFrame();
if (!targetFrame)
@@ -5107,8 +5160,100 @@ static void compositionToUnderlines(const Vector<DWORD>& clauses, const Vector<B
}
}
+#if !LOG_DISABLED
+#define APPEND_ARGUMENT_NAME(name) \
+ if (lparam & name) { \
+ if (needsComma) \
+ result += ", "; \
+ result += #name; \
+ needsComma = true; \
+ }
+
+static String imeCompositionArgumentNames(LPARAM lparam)
+{
+ String result;
+ bool needsComma = false;
+ if (lparam & GCS_COMPATTR) {
+ result = "GCS_COMPATTR";
+ needsComma = true;
+ }
+ APPEND_ARGUMENT_NAME(GCS_COMPCLAUSE);
+ APPEND_ARGUMENT_NAME(GCS_COMPREADSTR);
+ APPEND_ARGUMENT_NAME(GCS_COMPREADATTR);
+ APPEND_ARGUMENT_NAME(GCS_COMPREADCLAUSE);
+ APPEND_ARGUMENT_NAME(GCS_COMPSTR);
+ APPEND_ARGUMENT_NAME(GCS_CURSORPOS);
+ APPEND_ARGUMENT_NAME(GCS_DELTASTART);
+ APPEND_ARGUMENT_NAME(GCS_RESULTCLAUSE);
+ APPEND_ARGUMENT_NAME(GCS_RESULTREADCLAUSE);
+ APPEND_ARGUMENT_NAME(GCS_RESULTREADSTR);
+ APPEND_ARGUMENT_NAME(GCS_RESULTSTR);
+ APPEND_ARGUMENT_NAME(CS_INSERTCHAR);
+ APPEND_ARGUMENT_NAME(CS_NOMOVECARET);
+
+ return result;
+}
+
+static String imeNotificationName(WPARAM wparam)
+{
+ switch (wparam) {
+ case IMN_CHANGECANDIDATE:
+ return "IMN_CHANGECANDIDATE";
+ case IMN_CLOSECANDIDATE:
+ return "IMN_CLOSECANDIDATE";
+ case IMN_CLOSESTATUSWINDOW:
+ return "IMN_CLOSESTATUSWINDOW";
+ case IMN_GUIDELINE:
+ return "IMN_GUIDELINE";
+ case IMN_OPENCANDIDATE:
+ return "IMN_OPENCANDIDATE";
+ case IMN_OPENSTATUSWINDOW:
+ return "IMN_OPENSTATUSWINDOW";
+ case IMN_SETCANDIDATEPOS:
+ return "IMN_SETCANDIDATEPOS";
+ case IMN_SETCOMPOSITIONFONT:
+ return "IMN_SETCOMPOSITIONFONT";
+ case IMN_SETCOMPOSITIONWINDOW:
+ return "IMN_SETCOMPOSITIONWINDOW";
+ case IMN_SETCONVERSIONMODE:
+ return "IMN_SETCONVERSIONMODE";
+ case IMN_SETOPENSTATUS:
+ return "IMN_SETOPENSTATUS";
+ case IMN_SETSENTENCEMODE:
+ return "IMN_SETSENTENCEMODE";
+ case IMN_SETSTATUSWINDOWPOS:
+ return "IMN_SETSTATUSWINDOWPOS";
+ default:
+ return "Unknown (" + String::number(wparam) + ")";
+ }
+}
+
+static String imeRequestName(WPARAM wparam)
+{
+ switch (wparam) {
+ case IMR_CANDIDATEWINDOW:
+ return "IMR_CANDIDATEWINDOW";
+ case IMR_COMPOSITIONFONT:
+ return "IMR_COMPOSITIONFONT";
+ case IMR_COMPOSITIONWINDOW:
+ return "IMR_COMPOSITIONWINDOW";
+ case IMR_CONFIRMRECONVERTSTRING:
+ return "IMR_CONFIRMRECONVERTSTRING";
+ case IMR_DOCUMENTFEED:
+ return "IMR_DOCUMENTFEED";
+ case IMR_QUERYCHARPOSITION:
+ return "IMR_QUERYCHARPOSITION";
+ case IMR_RECONVERTSTRING:
+ return "IMR_RECONVERTSTRING";
+ default:
+ return "Unknown (" + String::number(wparam) + ")";
+ }
+}
+#endif
+
bool WebView::onIMEComposition(LPARAM lparam)
{
+ LOG(TextInput, "onIMEComposition %s", imeCompositionArgumentNames(lparam).latin1().data());
HIMC hInputContext = getIMMContext();
if (!hInputContext)
return true;
@@ -5153,25 +5298,39 @@ bool WebView::onIMEComposition(LPARAM lparam)
bool WebView::onIMEEndComposition()
{
- if (m_inIMEComposition)
+ LOG(TextInput, "onIMEEndComposition");
+ // If the composition hasn't been confirmed yet, it needs to be cancelled.
+ // This happens after deleting the last character from inline input hole.
+ Frame* targetFrame = m_page->focusController()->focusedOrMainFrame();
+ if (targetFrame && targetFrame->editor()->hasComposition())
+ targetFrame->editor()->confirmComposition(String());
+
+ if (m_inIMEComposition)
m_inIMEComposition--;
+
return true;
}
-bool WebView::onIMEChar(WPARAM, LPARAM)
+bool WebView::onIMEChar(WPARAM wparam, LPARAM lparam)
{
+ UNUSED_PARAM(wparam);
+ UNUSED_PARAM(lparam);
+ LOG(TextInput, "onIMEChar U+%04X %08X", wparam, lparam);
return true;
}
-bool WebView::onIMENotify(WPARAM, LPARAM, LRESULT*)
+bool WebView::onIMENotify(WPARAM wparam, LPARAM, LRESULT*)
{
+ UNUSED_PARAM(wparam);
+ LOG(TextInput, "onIMENotify %s", imeNotificationName(wparam).latin1().data());
return false;
}
-bool WebView::onIMERequestCharPosition(Frame* targetFrame, IMECHARPOSITION* charPos, LRESULT* result)
+LRESULT WebView::onIMERequestCharPosition(Frame* targetFrame, IMECHARPOSITION* charPos)
{
+ if (charPos->dwCharPos && !targetFrame->editor()->hasComposition())
+ return 0;
IntRect caret;
- ASSERT(charPos->dwCharPos == 0 || targetFrame->editor()->hasComposition());
if (RefPtr<Range> range = targetFrame->editor()->hasComposition() ? targetFrame->editor()->compositionRange() : targetFrame->selection()->selection().toNormalizedRange()) {
ExceptionCode ec = 0;
RefPtr<Range> tempRange = range->cloneRange(ec);
@@ -5184,56 +5343,55 @@ bool WebView::onIMERequestCharPosition(Frame* targetFrame, IMECHARPOSITION* char
::ClientToScreen(m_viewWindow, &charPos->pt);
charPos->cLineHeight = caret.height();
::GetWindowRect(m_viewWindow, &charPos->rcDocument);
- *result = TRUE;
return true;
}
-bool WebView::onIMERequestReconvertString(Frame* targetFrame, RECONVERTSTRING* reconvertString, LRESULT* result)
+LRESULT WebView::onIMERequestReconvertString(Frame* targetFrame, RECONVERTSTRING* reconvertString)
{
RefPtr<Range> selectedRange = targetFrame->selection()->toNormalizedRange();
String text = selectedRange->text();
- if (!reconvertString) {
- *result = sizeof(RECONVERTSTRING) + text.length() * sizeof(UChar);
- return true;
- }
+ if (!reconvertString)
+ return sizeof(RECONVERTSTRING) + text.length() * sizeof(UChar);
unsigned totalSize = sizeof(RECONVERTSTRING) + text.length() * sizeof(UChar);
- *result = totalSize;
- if (totalSize > reconvertString->dwSize) {
- *result = 0;
- return false;
- }
+ if (totalSize > reconvertString->dwSize)
+ return 0;
reconvertString->dwCompStrLen = text.length();
reconvertString->dwStrLen = text.length();
reconvertString->dwTargetStrLen = text.length();
reconvertString->dwStrOffset = sizeof(RECONVERTSTRING);
memcpy(reconvertString + 1, text.characters(), text.length() * sizeof(UChar));
- return true;
+ return totalSize;
}
-bool WebView::onIMERequest(WPARAM request, LPARAM data, LRESULT* result)
+LRESULT WebView::onIMERequest(WPARAM request, LPARAM data)
{
+ LOG(TextInput, "onIMERequest %s", imeRequestName(request).latin1().data());
Frame* targetFrame = m_page->focusController()->focusedOrMainFrame();
if (!targetFrame || !targetFrame->editor()->canEdit())
- return true;
+ return 0;
switch (request) {
case IMR_RECONVERTSTRING:
- return onIMERequestReconvertString(targetFrame, (RECONVERTSTRING*)data, result);
+ return onIMERequestReconvertString(targetFrame, (RECONVERTSTRING*)data);
case IMR_QUERYCHARPOSITION:
- return onIMERequestCharPosition(targetFrame, (IMECHARPOSITION*)data, result);
+ return onIMERequestCharPosition(targetFrame, (IMECHARPOSITION*)data);
}
- return false;
+ return 0;
}
-bool WebView::onIMESelect(WPARAM, LPARAM)
+bool WebView::onIMESelect(WPARAM wparam, LPARAM lparam)
{
+ UNUSED_PARAM(wparam);
+ UNUSED_PARAM(lparam);
+ LOG(TextInput, "onIMESelect locale %ld %s", lparam, wparam ? "select" : "deselect");
return false;
}
-bool WebView::onIMESetContext(WPARAM, LPARAM)
+bool WebView::onIMESetContext(WPARAM wparam, LPARAM)
{
+ LOG(TextInput, "onIMESetContext %s", wparam ? "active" : "inactive");
return false;
}
@@ -5247,7 +5405,15 @@ HRESULT STDMETHODCALLTYPE WebView::inspector(IWebInspector** inspector)
HRESULT STDMETHODCALLTYPE WebView::windowAncestryDidChange()
{
- HWND newParent = findTopLevelParent(m_hostWindow);
+ HWND newParent;
+ if (m_viewWindow)
+ newParent = findTopLevelParent(m_hostWindow);
+ else {
+ // There's no point in tracking active state changes of our parent window if we don't have
+ // a window ourselves.
+ newParent = 0;
+ }
+
if (newParent == m_topLevelParent)
return S_OK;
@@ -5511,6 +5677,44 @@ static KURL toKURL(BSTR bstr)
return KURL(KURL(), toString(bstr));
}
+void WebView::enterFullscreenForNode(Node* node)
+{
+ if (!node->hasTagName(HTMLNames::videoTag))
+ return;
+
+#if ENABLE(VIDEO)
+ HTMLMediaElement* videoElement = static_cast<HTMLMediaElement*>(node);
+
+ if (m_fullscreenController) {
+ if (m_fullscreenController->mediaElement() == videoElement) {
+ // The backend may just warn us that the underlaying plaftormMovie()
+ // has changed. Just force an update.
+ m_fullscreenController->setMediaElement(videoElement);
+ return; // No more to do.
+ }
+
+ // First exit Fullscreen for the old mediaElement.
+ m_fullscreenController->mediaElement()->exitFullscreen();
+ // This previous call has to trigger exitFullscreen,
+ // which has to clear m_fullscreenController.
+ ASSERT(!m_fullscreenController);
+ }
+
+ m_fullscreenController = new FullscreenVideoController;
+ m_fullscreenController->setMediaElement(videoElement);
+ m_fullscreenController->enterFullscreen();
+#endif
+}
+
+void WebView::exitFullscreen()
+{
+#if ENABLE(VIDEO)
+ if (m_fullscreenController)
+ m_fullscreenController->exitFullscreen();
+ m_fullscreenController = 0;
+#endif
+}
+
static PassOwnPtr<Vector<String> > toStringVector(unsigned patternsCount, BSTR* patterns)
{
// Convert the patterns into a Vector.
@@ -5789,8 +5993,7 @@ void WebView::updateRootLayerContents()
return;
FrameView* frameView = coreFrame->view();
- m_layerRenderer->setScrollFrame(frameView->layoutWidth(), frameView->layoutHeight(),
- frameView->scrollX(), frameView->scrollY());
+ m_layerRenderer->setScrollFrame(IntRect(frameView->scrollX(), frameView->scrollY(), frameView->layoutWidth(), frameView->layoutHeight()));
}
#endif
@@ -5875,6 +6078,63 @@ HRESULT WebView::hasPluginForNodeBeenHalted(IDOMNode* domNode, BOOL* result)
return S_OK;
}
+HRESULT WebView::setGeolocationProvider(IWebGeolocationProvider* locationProvider)
+{
+ m_geolocationProvider = locationProvider;
+ return S_OK;
+}
+
+HRESULT WebView::geolocationProvider(IWebGeolocationProvider** locationProvider)
+{
+ if (!locationProvider)
+ return E_POINTER;
+
+ if (!m_geolocationProvider)
+ return E_FAIL;
+
+ return m_geolocationProvider.copyRefTo(locationProvider);
+}
+
+HRESULT WebView::geolocationDidChangePosition(IWebGeolocationPosition* position)
+{
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ if (!m_page)
+ return E_FAIL;
+ m_page->geolocationController()->positionChanged(core(position));
+ return S_OK;
+#else
+ return E_NOTIMPL;
+#endif
+}
+
+HRESULT WebView::geolocationDidFailWithError(IWebError* error)
+{
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ if (!m_page)
+ return E_FAIL;
+ if (!error)
+ return E_POINTER;
+
+ BSTR descriptionBSTR;
+ if (FAILED(error->localizedDescription(&descriptionBSTR)))
+ return E_FAIL;
+ String descriptionString(descriptionBSTR, SysStringLen(descriptionBSTR));
+ SysFreeString(descriptionBSTR);
+
+ RefPtr<GeolocationError> geolocationError = GeolocationError::create(GeolocationError::PositionUnavailable, descriptionString);
+ m_page->geolocationController()->errorOccurred(geolocationError.get());
+ return S_OK;
+#else
+ return E_NOTIMPL;
+#endif
+}
+
+HRESULT WebView::setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, BSTR scheme)
+{
+ SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(forbidden, String(scheme, SysStringLen(scheme)));
+ return S_OK;
+}
+
class EnumTextMatches : public IEnumTextMatches
{
long m_ref;
diff --git a/WebKit/win/WebView.h b/WebKit/win/WebView.h
index 4bdc98f..cd857a8 100644
--- a/WebKit/win/WebView.h
+++ b/WebKit/win/WebView.h
@@ -30,7 +30,7 @@
#include "WebKit.h"
#include "WebFrame.h"
#include "WebPreferences.h"
-
+#include <WebCore/DragActions.h>
#include <WebCore/IntRect.h>
#include <WebCore/Timer.h>
#include <WebCore/WindowMessageListener.h>
@@ -39,8 +39,9 @@
#include <wtf/HashSet.h>
#include <wtf/OwnPtr.h>
-class WebFrame;
+class FullscreenVideoController;
class WebBackForwardList;
+class WebFrame;
class WebInspector;
class WebInspectorClient;
@@ -772,6 +773,13 @@ public:
virtual HRESULT STDMETHODCALLTYPE restartHaltedPluginForNode(IDOMNode*);
virtual HRESULT STDMETHODCALLTYPE hasPluginForNodeBeenHalted(IDOMNode*, BOOL*);
+ virtual HRESULT STDMETHODCALLTYPE setGeolocationProvider(IWebGeolocationProvider* locationProvider);
+ virtual HRESULT STDMETHODCALLTYPE geolocationProvider(IWebGeolocationProvider** locationProvider);
+ virtual HRESULT STDMETHODCALLTYPE geolocationDidChangePosition(IWebGeolocationPosition* position);
+ virtual HRESULT STDMETHODCALLTYPE geolocationDidFailWithError(IWebError* error);
+
+ virtual HRESULT STDMETHODCALLTYPE setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, BSTR scheme);
+
// WebView
bool shouldUseEmbeddedView(const WebCore::String& mimeType) const;
@@ -811,7 +819,7 @@ public:
bool onIMEEndComposition();
bool onIMEChar(WPARAM, LPARAM);
bool onIMENotify(WPARAM, LPARAM, LRESULT*);
- bool onIMERequest(WPARAM, LPARAM, LRESULT*);
+ LRESULT onIMERequest(WPARAM, LPARAM);
bool onIMESelect(WPARAM, LPARAM);
bool onIMESetContext(WPARAM, LPARAM);
void selectionChanged();
@@ -868,6 +876,9 @@ public:
void setRootChildLayer(WebCore::PlatformLayer* layer);
#endif
+ void enterFullscreenForNode(WebCore::Node*);
+ void exitFullscreen();
+
private:
void setZoomMultiplier(float multiplier, bool isTextOnly);
float zoomMultiplier(bool isTextOnly);
@@ -904,8 +915,8 @@ protected:
void closeWindowTimerFired(WebCore::Timer<WebView>*);
void prepareCandidateWindow(WebCore::Frame*, HIMC);
void updateSelectionForIME();
- bool onIMERequestCharPosition(WebCore::Frame*, IMECHARPOSITION*, LRESULT*);
- bool onIMERequestReconvertString(WebCore::Frame*, RECONVERTSTRING*, LRESULT*);
+ LRESULT onIMERequestCharPosition(WebCore::Frame*, IMECHARPOSITION*);
+ LRESULT onIMERequestReconvertString(WebCore::Frame*, RECONVERTSTRING*);
bool developerExtrasEnabled() const;
// AllWebViewSet functions
@@ -915,6 +926,9 @@ protected:
virtual void windowReceivedMessage(HWND, UINT message, WPARAM, LPARAM);
ULONG m_refCount;
+#if !ASSERT_DISABLED
+ bool m_deletionHasBegun;
+#endif
HWND m_hostWindow;
HWND m_viewWindow;
WebFrame* m_mainFrame;
@@ -937,6 +951,7 @@ protected:
COMPtr<WebPreferences> m_preferences;
COMPtr<WebInspector> m_webInspector;
COMPtr<IWebPluginHalterDelegate> m_pluginHalterDelegate;
+ COMPtr<IWebGeolocationProvider> m_geolocationProvider;
bool m_userAgentOverridden;
bool m_useBackForwardList;
@@ -981,6 +996,10 @@ protected:
long m_xOverpan;
long m_yOverpan;
+#if ENABLE(VIDEO)
+ OwnPtr<FullscreenVideoController> m_fullscreenController;
+#endif
+
#if USE(ACCELERATED_COMPOSITING)
bool isAcceleratedCompositing() const { return m_isAcceleratedCompositing; }
void setAcceleratedCompositing(bool);
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index e6ed389..1c7adf2 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,125 @@
+2010-01-27 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Add a way to get the parse mode to wxWebKit API.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34341
+
+ * WebFrame.cpp:
+ (wxWebFrame::GetParseMode):
+ * WebFrame.h:
+ * WebView.cpp:
+ (wxWebView::GetParseMode):
+ * WebView.h:
+
+2010-01-22 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ [wx] Remove the Bakefile build system, which is no longer being used.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34022
+
+ * bindings/python/wxwebkit-py.bkl: Removed.
+ * dependencies.bkl: Removed.
+ * presets/wxwebkit.bkl: Removed.
+ * wxwebkit.bkl: Removed.
+ * wxwk-settings.bkl: Removed.
+
+2010-01-22 Kevin Ollivier <kevino@theolliviers.com>
+
+ Build fix after r53718.
+
+ * WebView.cpp:
+ (wxWebView::OnKeyEvents):
+
+2010-01-15 Kevin Ollivier <kevino@theolliviers.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Move the code adding the child frame to the FrameTree into wxWebFrame constructor
+ so that it happens before we call init() on the new frame. Fixes asserts checking
+ frame count consistency.
+
+ * WebFrame.cpp:
+ (wxWebFrame::wxWebFrame):
+ * WebKitSupport/FrameLoaderClientWx.cpp:
+ (WebCore::FrameLoaderClientWx::createFrame):
+
+2010-01-14 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix, missing header.
+
+ * WebView.cpp:
+
+2010-01-09 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ ScriptController::isEnabled needs to be renamed
+ https://bugs.webkit.org/show_bug.cgi?id=32063
+
+ Rename ScriptController::isEnabled to
+ ScriptController::canExecuteScripts.
+
+ * WebFrame.cpp:
+ (wxWebFrame::RunScript):
+
+2009-12-30 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Introduce wxWebSettings API interface for editing wxWebView / page settings.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32956
+
+ * WebBrowserShell.h:
+ * WebFrame.h:
+ * WebKitDefines.h: Added.
+ * WebSettings.cpp: Added.
+ (wxWebSettings::SetDefaultFixedFontSize):
+ (wxWebSettings::GetDefaultFixedFontSize):
+ (wxWebSettings::SetDefaultFontSize):
+ (wxWebSettings::GetDefaultFontSize):
+ (wxWebSettings::SetMinimumFontSize):
+ (wxWebSettings::GetMinimumFontSize):
+ (wxWebSettings::SetLoadsImagesAutomatically):
+ (wxWebSettings::LoadsImagesAutomatically):
+ (wxWebSettings::SetJavaScriptEnabled):
+ (wxWebSettings::IsJavaScriptEnabled):
+ (wxWebSettings::SetDatabasesEnabled):
+ (wxWebSettings::AreDatabasesEnabled):
+ (wxWebSettings::SetLocalStoragePath):
+ (wxWebSettings::GetLocalStoragePath):
+ (wxWebSettings::SetEditableLinkBehavior):
+ (wxWebSettings::GetEditableLinkBehavior):
+ (wxWebSettings::SetPluginsEnabled):
+ (wxWebSettings::ArePluginsEnabled):
+ * WebSettings.h: Added.
+ * WebView.cpp:
+ (wxWebView::Create):
+ (wxWebView::GetWebSettings):
+ * WebView.h:
+ * bindings/python/webview.i:
+
+2009-12-28 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Use JS_NO_EXPORT for JSBase.h.
+
+ * wxwk-settings.bkl:
+
+2009-12-20 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] build fixes after recent changes.
+
+ * WebFrame.cpp: Added missing header.
+ * WebKitSupport/EditorClientWx.cpp: Added missing header.
+ * WebView.cpp: Updated Page constructor call.
+ (wxWebView::Create):
+
2009-12-08 Kevin Watters <kevinwatters@gmail.com>
Reviewed by Kevin Ollivier.
diff --git a/WebKit/wx/WebBrowserShell.h b/WebKit/wx/WebBrowserShell.h
index edda9e4..2f43ffb 100644
--- a/WebKit/wx/WebBrowserShell.h
+++ b/WebKit/wx/WebBrowserShell.h
@@ -33,6 +33,7 @@
#include "wx/wx.h"
#endif
+#include "WebKitDefines.h"
#include "WebView.h"
#include <wx/srchctrl.h>
diff --git a/WebKit/wx/WebFrame.cpp b/WebKit/wx/WebFrame.cpp
index bd983f6..6cda197 100644
--- a/WebKit/wx/WebFrame.cpp
+++ b/WebKit/wx/WebFrame.cpp
@@ -24,6 +24,7 @@
*/
#include "config.h"
+#include "BackForwardList.h"
#include "CString.h"
#include "Document.h"
#include "Editor.h"
@@ -33,6 +34,7 @@
#include "FrameLoader.h"
#include "FrameView.h"
#include "HitTestResult.h"
+#include "HostWindow.h"
#include "HTMLFrameOwnerElement.h"
#include "markup.h"
#include "Page.h"
@@ -90,6 +92,13 @@ wxWebFrame::wxWebFrame(wxWebView* container, wxWebFrame* parent, WebViewFrameDat
m_impl->frame = newFrame.get();
+ if (data)
+ newFrame->tree()->setName(data->name);
+
+ // Subframes expect to be added to the FrameTree before init is called.
+ if (parentFrame)
+ parentFrame->document()->frame()->tree()->appendChild(newFrame.get());
+
loaderClient->setFrame(this);
loaderClient->setWebView(container);
@@ -192,7 +201,7 @@ wxString wxWebFrame::RunScript(const wxString& javascript)
wxASSERT_MSG(hasLoaded, wxT("Document must be loaded before calling RunScript."));
if (hasLoaded) {
WebCore::ScriptController* controller = m_impl->frame->script();
- bool jsEnabled = controller->isEnabled();
+ bool jsEnabled = controller->canExecuteScripts();
wxASSERT_MSG(jsEnabled, wxT("RunScript requires JavaScript to be enabled."));
if (jsEnabled) {
JSC::JSValue result = controller->executeScript(javascript, true).jsValue();
@@ -409,3 +418,11 @@ bool wxWebFrame::ShouldClose() const
return true;
}
+
+wxWebKitParseMode wxWebFrame::GetParseMode() const
+{
+ if (m_impl->frame && m_impl->frame->document())
+ return (wxWebKitParseMode)m_impl->frame->document()->parseMode();
+
+ return NoDocument;
+}
diff --git a/WebKit/wx/WebFrame.h b/WebKit/wx/WebFrame.h
index bd4bdb0..95a0691 100644
--- a/WebKit/wx/WebFrame.h
+++ b/WebKit/wx/WebFrame.h
@@ -33,6 +33,8 @@
#include "wx/wx.h"
#endif
+#include "WebKitDefines.h"
+
class WebFramePrivate;
class WebViewFrameData;
class wxWebView;
@@ -44,20 +46,6 @@ namespace WebCore {
class Frame;
}
-#ifndef SWIG
-
-#if !wxCHECK_VERSION(2,9,0) && wxCHECK_GCC_VERSION(4,0)
-#define WXDLLIMPEXP_WEBKIT __attribute__ ((visibility("default")))
-#elif WXMAKINGDLL_WEBKIT
-#define WXDLLIMPEXP_WEBKIT WXEXPORT
-#elif defined(WXUSINGDLL_WEBKIT)
-#define WXDLLIMPEXP_WEBKIT WXIMPORT
-#endif
-
-#else
-#define WXDLLIMPEXP_WEBKIT
-#endif // SWIG
-
class WXDLLIMPEXP_WEBKIT wxWebViewDOMElementInfo
{
public:
@@ -89,6 +77,9 @@ private:
wxString m_link;
};
+// based on enums in WebCore/dom/Document.h
+enum wxWebKitParseMode { Compat, AlmostStrict, Strict, NoDocument };
+
class WXDLLIMPEXP_WEBKIT wxWebFrame
{
// ChromeClientWx needs to get the Page* stored by the wxWebView
@@ -153,6 +144,8 @@ public:
bool ShouldClose() const;
+ wxWebKitParseMode GetParseMode() const;
+
private:
float m_textMagnifier;
bool m_isEditable;
diff --git a/WebKit/wx/WebKitDefines.h b/WebKit/wx/WebKitDefines.h
new file mode 100644
index 0000000..d973063
--- /dev/null
+++ b/WebKit/wx/WebKitDefines.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2008 Kevin Ollivier <kevino@theolliviers.com>
+ *
+ * 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 WebKitDefines_h
+#define WebKitDefines_h
+
+#ifndef SWIG
+
+#if !wxCHECK_VERSION(2, 9, 0) && wxCHECK_GCC_VERSION(4, 0)
+#define WXDLLIMPEXP_WEBKIT __attribute__ ((visibility("default")))
+#elif defined(WXMAKINGDLL_WEBKIT)
+#define WXDLLIMPEXP_WEBKIT WXEXPORT
+#elif defined(WXUSINGDLL_WEBKIT)
+#define WXDLLIMPEXP_WEBKIT WXIMPORT
+#endif
+
+#else
+#define WXDLLIMPEXP_WEBKIT
+#endif // SWIG
+
+#endif // WebKitDefines_h
diff --git a/WebKit/wx/WebKitSupport/EditorClientWx.cpp b/WebKit/wx/WebKitSupport/EditorClientWx.cpp
index bd3af48..b130557 100644
--- a/WebKit/wx/WebKitSupport/EditorClientWx.cpp
+++ b/WebKit/wx/WebKitSupport/EditorClientWx.cpp
@@ -32,6 +32,7 @@
#include "FocusController.h"
#include "Frame.h"
#include "FrameView.h"
+#include "HostWindow.h"
#include "KeyboardEvent.h"
#include "KeyboardCodes.h"
#include "NotImplemented.h"
diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
index fbb4ec3..5bb4dc1 100644
--- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
+++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
@@ -828,10 +828,6 @@ PassRefPtr<Frame> FrameLoaderClientWx::createFrame(const KURL& url, const String
RefPtr<Frame> childFrame = adoptRef(newFrame->m_impl->frame);
- m_frame->tree()->appendChild(childFrame);
- childFrame->tree()->setName(name);
- childFrame->init();
-
// The creation of the frame may have run arbitrary JavaScript that removed it from the page already.
if (!childFrame->page())
return 0;
diff --git a/WebKit/wx/WebSettings.cpp b/WebKit/wx/WebSettings.cpp
new file mode 100644
index 0000000..2aa246c
--- /dev/null
+++ b/WebKit/wx/WebSettings.cpp
@@ -0,0 +1,194 @@
+/*
+ * Copyright (C) 2009 Kevin Ollivier. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebSettings.h"
+
+#include "PlatformString.h"
+#include "Settings.h"
+
+void wxWebSettings::SetDefaultFixedFontSize(int size)
+{
+ if (m_settings)
+ m_settings->setDefaultFixedFontSize(size);
+}
+
+int wxWebSettings::GetDefaultFixedFontSize() const
+{
+ if (m_settings)
+ return m_settings->defaultFixedFontSize();
+
+ return 0;
+}
+
+void wxWebSettings::SetDefaultFontSize(int size)
+{
+ if (m_settings)
+ m_settings->setDefaultFontSize(size);
+}
+
+int wxWebSettings::GetDefaultFontSize() const
+{
+ if (m_settings)
+ return m_settings->defaultFontSize();
+
+ return 0;
+}
+
+void wxWebSettings::SetMinimumFontSize(int size)
+{
+ if (m_settings)
+ m_settings->setMinimumFontSize(size);
+}
+
+int wxWebSettings::GetMinimumFontSize() const
+{
+ if (m_settings)
+ return m_settings->minimumFontSize();
+
+ return 0;
+}
+
+void wxWebSettings::SetLoadsImagesAutomatically(bool loadAutomatically)
+{
+ if (m_settings)
+ m_settings->setLoadsImagesAutomatically(loadAutomatically);
+}
+
+bool wxWebSettings::LoadsImagesAutomatically() const
+{
+ if (m_settings)
+ return m_settings->loadsImagesAutomatically();
+
+ return false;
+}
+
+void wxWebSettings::SetJavaScriptEnabled(bool enabled)
+{
+ if (m_settings)
+ m_settings->setJavaScriptEnabled(enabled);
+}
+
+bool wxWebSettings::IsJavaScriptEnabled() const
+{
+ if (m_settings)
+ return m_settings->isJavaScriptEnabled();
+
+ return false;
+}
+
+void wxWebSettings::SetDatabasesEnabled(bool enabled)
+{
+ if (m_settings)
+ m_settings->setDatabasesEnabled(enabled);
+}
+
+bool wxWebSettings::AreDatabasesEnabled() const
+{
+ if (m_settings)
+ return m_settings->databasesEnabled();
+
+ return false;
+}
+
+void wxWebSettings::SetLocalStoragePath(const wxString& path)
+{
+ if (m_settings)
+ m_settings->setLocalStorageDatabasePath(path);
+}
+
+wxString wxWebSettings::GetLocalStoragePath() const
+{
+ if (m_settings)
+ return m_settings->localStorageDatabasePath();
+
+ return wxEmptyString;
+}
+
+void wxWebSettings::SetEditableLinkBehavior(wxEditableLinkBehavior behavior)
+{
+ WebCore::EditableLinkBehavior webCoreBehavior;
+ if (m_settings) {
+ switch (behavior) {
+ case wxEditableLinkAlwaysLive:
+ webCoreBehavior = WebCore::EditableLinkAlwaysLive;
+ break;
+ case wxEditableLinkOnlyLiveWithShiftKey:
+ webCoreBehavior = WebCore::EditableLinkOnlyLiveWithShiftKey;
+ break;
+ case wxEditableLinkLiveWhenNotFocused:
+ webCoreBehavior = WebCore::EditableLinkLiveWhenNotFocused;
+ break;
+ case wxEditableLinkNeverLive:
+ webCoreBehavior = WebCore::EditableLinkNeverLive;
+ break;
+ default:
+ webCoreBehavior = WebCore::EditableLinkDefaultBehavior;
+ }
+ m_settings->setEditableLinkBehavior(webCoreBehavior);
+ }
+}
+
+wxEditableLinkBehavior wxWebSettings::GetEditableLinkBehavior() const
+{
+ wxEditableLinkBehavior behavior = wxEditableLinkDefaultBehavior;
+ if (m_settings) {
+ WebCore::EditableLinkBehavior webCoreBehavior = m_settings->editableLinkBehavior();
+ switch (webCoreBehavior) {
+ case WebCore::EditableLinkAlwaysLive:
+ behavior = wxEditableLinkAlwaysLive;
+ break;
+ case WebCore::EditableLinkOnlyLiveWithShiftKey:
+ behavior = wxEditableLinkOnlyLiveWithShiftKey;
+ break;
+ case WebCore::EditableLinkLiveWhenNotFocused:
+ behavior = wxEditableLinkLiveWhenNotFocused;
+ break;
+ case WebCore::EditableLinkNeverLive:
+ behavior = wxEditableLinkNeverLive;
+ break;
+ default:
+ behavior = wxEditableLinkDefaultBehavior;
+ }
+ }
+ return behavior;
+}
+
+void wxWebSettings::SetPluginsEnabled(bool enabled)
+{
+ if (m_settings)
+ m_settings->setPluginsEnabled(enabled);
+}
+
+bool wxWebSettings::ArePluginsEnabled() const
+{
+ if (m_settings)
+ return m_settings->arePluginsEnabled();
+
+ return false;
+}
diff --git a/WebKit/wx/WebSettings.h b/WebKit/wx/WebSettings.h
new file mode 100644
index 0000000..e526b70
--- /dev/null
+++ b/WebKit/wx/WebSettings.h
@@ -0,0 +1,166 @@
+/*
+ * Copyright (C) 2009 Kevin Ollivier. 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 WebSettings_h
+#define WebSettings_h
+
+#include "wx/wxprec.h"
+#ifndef WX_PRECOMP
+ #include "wx/wx.h"
+#endif
+
+#include "WebKitDefines.h"
+
+namespace WebCore {
+class Settings;
+}
+
+enum wxEditableLinkBehavior {
+ wxEditableLinkDefaultBehavior,
+ wxEditableLinkAlwaysLive,
+ wxEditableLinkOnlyLiveWithShiftKey,
+ wxEditableLinkLiveWhenNotFocused,
+ wxEditableLinkNeverLive
+};
+
+/**
+ @class wxWebSettings
+
+ This class is used to control the configurable aspects of the WebKit engine.
+
+ Do not instantiate this object directly. Instead, create a wxWebView and
+ call its wxWebView::GetWebSettings() method to get and change that WebView's settings.
+
+*/
+
+class WXDLLIMPEXP_WEBKIT wxWebSettings: public wxObject {
+public:
+ wxWebSettings(WebCore::Settings* settings) :
+ wxObject(),
+ m_settings(settings)
+ {}
+
+ wxWebSettings() : wxObject() {}
+
+ /**
+ Sets the default font size for fixed fonts.
+ */
+ void SetDefaultFixedFontSize(int size);
+
+ /**
+ Returns the default font size for fixed fonts.
+ */
+ int GetDefaultFixedFontSize() const;
+
+ /**
+ Sets the default font size for fonts.
+ */
+ void SetDefaultFontSize(int size);
+
+ /**
+ Returns the default font size for fonts.
+ */
+ int GetDefaultFontSize() const;
+
+ /**
+ Sets the minimum acceptable font size.
+ */
+ void SetMinimumFontSize(int size);
+
+ /**
+ Returns the minimum acceptable font size.
+ */
+ int GetMinimumFontSize() const;
+
+ /**
+ Sets whether or not images are loaded automatically. (e.g. in email
+ programs you may wish to not load images until you confirm it is not SPAM)
+ */
+ void SetLoadsImagesAutomatically(bool loadAutomatically);
+
+ /**
+ Returns whether or not images are loaded automatically.
+ */
+ bool LoadsImagesAutomatically() const;
+
+ /**
+ Sets whether or not the WebView runs JavaScript code.
+ */
+ void SetJavaScriptEnabled(bool enabled);
+
+ /**
+ Returns whether or not the WebView runs JavaScript code.
+ */
+ bool IsJavaScriptEnabled() const;
+
+ /**
+ Sets whether or not web pages can create databases.
+ */
+ void SetDatabasesEnabled(bool enabled);
+
+ /**
+ Returns whether or not the WebView runs JavaScript code.
+ */
+ bool AreDatabasesEnabled() const;
+
+ /**
+ Sets the path where local data will be stored.
+ */
+ void SetLocalStoragePath(const wxString& path);
+
+ /**
+ Returns the path where local data will be stored.
+ */
+ wxString GetLocalStoragePath() const;
+
+ /**
+ Sets how links are handled when the wxWebView is in editing mode.
+ */
+ void SetEditableLinkBehavior(wxEditableLinkBehavior behavior);
+
+ /**
+ Returns how links are handled when the wxWebView is in editing mode.
+ */
+ wxEditableLinkBehavior GetEditableLinkBehavior() const;
+
+ /**
+ Sets whether or not web pages can load plugins.
+ */
+ void SetPluginsEnabled(bool enabled);
+
+ /**
+ Returns whether or not web pages can load plugins.
+ */
+ bool ArePluginsEnabled() const;
+
+private:
+ WebCore::Settings* m_settings;
+
+};
+
+#endif // WebSettings_h
diff --git a/WebKit/wx/WebView.cpp b/WebKit/wx/WebView.cpp
index 2c752de..5fdae83 100644
--- a/WebKit/wx/WebView.cpp
+++ b/WebKit/wx/WebView.cpp
@@ -34,6 +34,7 @@
#include "Editor.h"
#include "EmptyClients.h"
#include "EventHandler.h"
+#include "FileChooser.h"
#include "FocusController.h"
#include "Frame.h"
#include "FrameLoader.h"
@@ -317,7 +318,7 @@ bool wxWebView::Create(wxWindow* parent, int id, const wxPoint& position,
WebCore::HTMLFrameOwnerElement* parentFrame = 0;
WebCore::EditorClientWx* editorClient = new WebCore::EditorClientWx();
- m_impl->page = new WebCore::Page(new WebCore::ChromeClientWx(this), new WebCore::ContextMenuClientWx(), editorClient, new WebCore::DragClientWx(), new WebCore::InspectorClientWx(), new WebCore::EmptyPluginHalterClient());
+ m_impl->page = new WebCore::Page(new WebCore::ChromeClientWx(this), new WebCore::ContextMenuClientWx(), editorClient, new WebCore::DragClientWx(), new WebCore::InspectorClientWx(), 0, 0);
editorClient->setPage(m_impl->page);
m_mainFrame = new wxWebFrame(this);
@@ -338,10 +339,6 @@ bool wxWebView::Create(wxWindow* parent, int id, const wxPoint& position,
settings->setDatabasesEnabled(true);
#endif
-#if __WXMSW__ || __WXMAC__
- settings->setPluginsEnabled(true);
-#endif
-
m_isInitialized = true;
return true;
@@ -824,11 +821,11 @@ void wxWebView::OnKeyEvents(wxKeyEvent& event)
return;
case WXK_PAGEUP:
case WXK_NUMPAD_PAGEUP:
- frame->view()->scrollBy(WebCore::IntSize(0, -frame->view()->visibleHeight() + WebCore::cAmountToKeepWhenPaging));
+ frame->view()->scrollBy(WebCore::IntSize(0, -frame->view()->visibleHeight() * WebCore::cFractionToStepWhenPaging));
return;
case WXK_PAGEDOWN:
case WXK_NUMPAD_PAGEDOWN:
- frame->view()->scrollBy(WebCore::IntSize(0, frame->view()->visibleHeight() - WebCore::cAmountToKeepWhenPaging));
+ frame->view()->scrollBy(WebCore::IntSize(0, frame->view()->visibleHeight() * WebCore::cFractionToStepWhenPaging));
return;
//These we don't want turning into char events, stuff 'em
case WXK_ESCAPE:
@@ -966,3 +963,20 @@ void wxWebView::SetProxyInfo(const wxString& host,
if (ResourceHandleManager* mgr = ResourceHandleManager::sharedInstance())
mgr->setProxyInfo(host, port, curlProxyType(type), username, password);
}
+
+wxWebSettings wxWebView::GetWebSettings()
+{
+ ASSERT(m_impl->page);
+ if (m_impl->page)
+ return wxWebSettings(m_impl->page->settings());
+
+ return wxWebSettings();
+}
+
+wxWebKitParseMode wxWebView::GetParseMode() const
+{
+ if (m_mainFrame)
+ return m_mainFrame->GetParseMode();
+
+ return NoDocument;
+} \ No newline at end of file
diff --git a/WebKit/wx/WebView.h b/WebKit/wx/WebView.h
index 9b1cfab..7d923a3 100644
--- a/WebKit/wx/WebView.h
+++ b/WebKit/wx/WebView.h
@@ -34,6 +34,8 @@
#endif
#include "WebFrame.h"
+#include "WebKitDefines.h"
+#include "WebSettings.h"
class WebViewPrivate;
class WebViewFrameData;
@@ -48,20 +50,6 @@ namespace WebCore {
}
#ifndef SWIG
-
-#if !wxCHECK_VERSION(2,9,0) && wxCHECK_GCC_VERSION(4,0)
-#define WXDLLIMPEXP_WEBKIT __attribute__ ((visibility("default")))
-#elif WXMAKINGDLL_WEBKIT
-#define WXDLLIMPEXP_WEBKIT WXEXPORT
-#elif defined(WXUSINGDLL_WEBKIT)
-#define WXDLLIMPEXP_WEBKIT WXIMPORT
-#endif
-
-#else
-#define WXDLLIMPEXP_WEBKIT
-#endif // SWIG
-
-#ifndef SWIG
extern WXDLLIMPEXP_WEBKIT const wxChar* wxWebViewNameStr;
#endif
@@ -214,6 +202,10 @@ public:
const wxString& username = wxEmptyString,
const wxString& password = wxEmptyString);
+ wxWebSettings GetWebSettings();
+
+ wxWebKitParseMode GetParseMode() const;
+
protected:
// event handlers (these functions should _not_ be virtual)
diff --git a/WebKit/wx/bindings/python/webview.i b/WebKit/wx/bindings/python/webview.i
index 410191a..bdc5561 100644
--- a/WebKit/wx/bindings/python/webview.i
+++ b/WebKit/wx/bindings/python/webview.i
@@ -28,9 +28,12 @@
%{
#include "wx/wxPython/wxPython.h"
#include "wx/wxPython/pyclasses.h"
+
+#include "WebBrowserShell.h"
#include "WebFrame.h"
+#include "WebKitDefines.h"
+#include "WebSettings.h"
#include "WebView.h"
-#include "WebBrowserShell.h"
%}
//---------------------------------------------------------------------------
@@ -39,13 +42,16 @@
MAKE_CONST_WXSTRING(WebViewNameStr);
+MustHaveApp(wxWebBrowserShell);
MustHaveApp(wxWebFrame);
MustHaveApp(wxWebView);
-MustHaveApp(wxWebBrowserShell);
+%include WebKitDefines.h
+
+%include WebBrowserShell.h
%include WebFrame.h
+%include WebSettings.h
%include WebView.h
-%include WebBrowserShell.h
%constant wxEventType wxEVT_WEBVIEW_BEFORE_LOAD;
%constant wxEventType wxEVT_WEBVIEW_LOAD;
diff --git a/WebKit/wx/bindings/python/wxwebkit-py.bkl b/WebKit/wx/bindings/python/wxwebkit-py.bkl
index 2fade58..e69de29 100644
--- a/WebKit/wx/bindings/python/wxwebkit-py.bkl
+++ b/WebKit/wx/bindings/python/wxwebkit-py.bkl
@@ -1,109 +0,0 @@
-<?xml version="1.0" ?>
-<!--
-Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.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.
-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.
-
-Bakefile for wxWebKit Python bindings.
--->
-
-<makefile>
- <set var="WX_UNICODE">1</set>
- <set var="WX_SHARED">1</set>
- <include file="../../wxwk-settings.bkl"/>
-
- <!-- the WX_PYTHON option was added to presets/wx.bkl in 2.8.5, so define
- it in case the presets/wx.bkl doesn't define it for us. -->
- <if cond="not isdefined('WX_PYTHON')">
- <set var="WX_PYTHON">1</set>
- </if>
-
- <if cond="not isdefined('PYTHON_LIB')">
- <option name="PYTHON_LIB" never_empty="1">
- <default-value>python26</default-value>
- <description>
- The name of the Python library file.
- </description>
- </option>
- </if>
-
- <if cond="not isdefined('PYTHON_LIBDIR')">
- <option name="PYTHON_LIBDIR" category="path">
- <default-value>C:/Python25/Libs</default-value>
- <description>
- The directory containing the Python library to link against.
- </description>
- </option>
- </if>
-
- <module id="wxwebkit-python" template="wxwk,webcore,xml2,iconv,xslt,icu,jscore,curl,sqlite3,gtk,pthreads">
- <!-- make sure we relink wxwebkit if either webcore or jscore change -->
- <if cond="FORMAT=='gnu'">
- <depends-on-file>$(WKOUTPUTDIR)/libjscore.a</depends-on-file>
- <depends-on-file>$(WKOUTPUTDIR)/libwebcore-wx.a</depends-on-file>
- </if>
- <if cond="FORMAT=='msvc'">
- <depends-on-file>$(WKOUTPUTDIR)/jscore.lib</depends-on-file>
- <depends-on-file>$(WKOUTPUTDIR)/webcore-wx.lib</depends-on-file>
- </if>
- <runtime-libs>dynamic</runtime-libs>
- <dllname>_webview</dllname>
-
- <include>$(WK_ROOT)/WebCore/platform/wx</include>
- <include>$(WK_ROOT)/WebCore/bridge/wx</include>
- <include>$(WK_ROOT)/WebCore/page/wx</include>
- <include>$(WK_ROOT)/WebKit/wx</include>
- <include>$(WK_ROOT)/WebKit/wx/WebKitSupport</include>
-
- <if cond="FORMAT=='gnu'">
- <sys-lib>png</sys-lib>
- <set var="MAC_FLAGS">
- <if cond="PLATFORM_OS=='mac'">-bundle -undefined dynamic_lookup</if>
- </set>
- <ldflags>$(PYTHON_LIB)</ldflags>
- <ldflags>$(MAC_FLAGS)</ldflags>
- </if>
- <if cond="FORMAT in ['msvc','msvs2005prj']">
- <sys-lib>libpng</sys-lib>
- <lib-path>$(WK_ROOT)/libpng</lib-path>
- <sys-lib>$(PYTHON_LIB)</sys-lib>
- </if>
-
- <lib-path>$(PYTHON_LIBDIR)</lib-path>
-
-
- <sys-lib>wxwebkit</sys-lib>
- <lib-path>$(WKOUTPUTDIR)</lib-path>
-
- <define>SWIG_TYPE_TABLE=_wxPython_table</define>
- <define>WXP_USE_THREAD=1</define>
- <define>SWIG_PYTHON_OUTPUT_TUPLE</define>
-
- <sources>
- webview.cpp
- </sources>
- </module>
-
-</makefile>
diff --git a/WebKit/wx/dependencies.bkl b/WebKit/wx/dependencies.bkl
index dc82c3f..e69de29 100644
--- a/WebKit/wx/dependencies.bkl
+++ b/WebKit/wx/dependencies.bkl
@@ -1,177 +0,0 @@
-<?xml version="1.0" ?>
-<!--
-
-Copyright (C) 2005, 2006 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.
-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.
-
-This file contains templates with settings for components used by JavaScriptCore
-and WebCore. Include this file to use these settings.
-
--->
-
-
-<makefile>
-
- <option name="SQLITE3_LIBS">
- <default-value>$(DOLLAR)(shell pkg-config --libs sqlite3)</default-value>
- </option>
-
- <option name="SQLITE3_CFLAGS">
- <default-value>$(DOLLAR)(shell pkg-config --cflags sqlite3)</default-value>
- </option>
-
- <template id="sqlite3">
- <if cond="FORMAT=='gnu'">
- <set var="SQLITE_LDFLAGS"><if cond="PLATFORM_OS=='mac'">-lWebCoreSQLite3</if><if cond="PLATFORM_OS=='linux'">$(SQLITE3_LIBS)</if></set>
- <set var="SQLITE_CFLAGS"><if cond="PLATFORM_OS=='mac'">-I$(WK_ROOT)/WebKitLibraries/WebCoreSQLite3</if><if cond="PLATFORM_OS=='linux'">$(SQLITE3_CFLAGS)</if></set>
- <ldflags>$(SQLITE_LDFLAGS)</ldflags>
- <cxxflags>$(SQLITE_CFLAGS)</cxxflags>
- </if>
- <if cond="FORMAT in ['msvc','msvs2005prj']">
- <sys-lib>sqlite3</sys-lib>
- <include>$(WK_ROOT)/WebKitLibraries/win/include/SQLite</include>
- </if>
- </template>
-
- <option name="CURL_LIBS">
- <default-value>$(DOLLAR)(shell curl-config --libs)</default-value>
- </option>
-
- <option name="CURL_CFLAGS">
- <default-value>$(DOLLAR)(shell curl-config --cflags)</default-value>
- </option>
-
- <template id="curl">
- <if cond="FORMAT not in ['msvc', 'msvc2005prj']">
- <ldflags>$(CURL_LIBS)</ldflags>
- <cxxflags>$(CURL_CFLAGS)</cxxflags>
- </if>
- <if cond="FORMAT in ['msvc', 'msvs2005prj']">
- <sys-lib>libcurl</sys-lib>
- </if>
- </template>
-
- <option name="GTK_LIBS">
- <default-value>$(DOLLAR)(shell pkg-config --libs gtk+-2.0)</default-value>
- </option>
-
- <option name="GTK_CFLAGS">
- <default-value>$(DOLLAR)(shell pkg-config --cflags gtk+-2.0)</default-value>
- </option>
-
- <!-- GTK settings, for GTK ports - wx doesn't use these -->
- <template id="gtk">
- <if cond="FORMAT=='gnu'">
- <ldflags>$(GTK_LIBS)</ldflags>
- <cxxflags>$(GTK_CFLAGS)</cxxflags>
- </if>
-
- <!-- TODO: non-Cygwin Windows support for this? :) -->
- </template>
-
-
- <option name="XML2_LIBS">
- <default-value>$(DOLLAR)(shell xml2-config --libs)</default-value>
- </option>
-
- <option name="XML2_CFLAGS">
- <default-value>$(DOLLAR)(shell xml2-config --cflags)</default-value>
- </option>
-
- <!-- XML2 library settings -->
- <template id="xml2">
- <if cond="FORMAT=='gnu'">
- <ldflags>$(XML2_LIBS)</ldflags>
- <cxxflags>$(XML2_CFLAGS)</cxxflags>
- </if>
-
- <if cond="PLATFORM_WIN32=='1'">
- <include>$(WK_ROOT)/WebKitLibraries/win/include</include>
- <sys-lib>libxml2</sys-lib>
- </if>
- </template>
-
-
- <option name="XSLT_LIBS">
- <default-value>$(DOLLAR)(shell xslt-config --libs)</default-value>
- </option>
-
- <option name="XSLT_CFLAGS">
- <default-value>$(DOLLAR)(shell xslt-config --cflags)</default-value>
- </option>
-
- <!-- XSLT library settings -->
- <template id="xslt" template="xml2">
- <if cond="FORMAT=='gnu'">
- <ldflags>$(XSLT_LIBS)</ldflags>
- <cxxflags>$(XSLT_CFLAGS)</cxxflags>
- </if>
-
- <if cond="PLATFORM_WIN32=='1'">
- <include>$(WK_ROOT)/WebKitLibraries/win/include</include>
- <sys-lib>libxslt</sys-lib>
- </if>
- </template>
-
- <!-- IBM ICU settings -->
- <template id="icu">
- <if cond="FORMAT=='gnu'">
- <!-- Mac includes ICU with the system, but doesn't include headers or
- icu-config, so we have to hardcode settings there. -->
- <set var="ICU_INCLUDE"><if cond="PLATFORM_OS=='mac'">$(WK_ROOT)/JavaScriptCore/icu</if></set>
- <set var="ICU_INCLUDE"><if cond="PLATFORM_OS=='mac'">$(WK_ROOT)/WebCore/icu</if></set>
- <set var="ICU_LIB"><if cond="PLATFORM_OS=='mac'">icucore</if></set>
- <set var="ICU_LDFLAGS"><if cond="PLATFORM_OS=='linux'">$(DOLLAR)(shell icu-config --ldflags)</if></set>
- <set var="ICU_CFLAGS"><if cond="PLATFORM_OS=='linux'">$(DOLLAR)(shell icu-config --cppflags)</if></set>
-
- <include>$(ICU_INCLUDE)</include>
- <sys-lib>$(ICU_LIB)</sys-lib>
- <ldflags>$(ICU_LDFLAGS)</ldflags>
- <cxxflags>$(ICU_CFLAGS)</cxxflags>
- </if>
-
- <if cond="PLATFORM_WIN32=='1'">
- <sys-lib>icuuc</sys-lib>
- <sys-lib>icuin</sys-lib>
- </if>
- </template>
-
-
- <template id="iconv">
- </template>
-
-
- <template id="pthreads">
- <if cond="PLATFORM_WIN32=='1'">
- <include>$(WK_ROOT)/WebKitLibraries/win/include/pthreads</include>
- <sys-lib>pthreadVC2</sys-lib>
- </if>
- <if cond="FORMAT=='gnu'">
- <sys-lib>pthread</sys-lib>
- </if>
- </template>
-
-</makefile>
diff --git a/WebKit/wx/presets/wxwebkit.bkl b/WebKit/wx/presets/wxwebkit.bkl
index 029441f..e69de29 100644
--- a/WebKit/wx/presets/wxwebkit.bkl
+++ b/WebKit/wx/presets/wxwebkit.bkl
@@ -1,164 +0,0 @@
-<?xml version="1.0" ?>
-<!--
-
-Copyright (C) 2007 Kevin Ollivier. 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.
-
-This file contains templates with settings for components used by JavaScriptCore
-and WebCore. Include this file to use these settings.
-
--->
-
-
-<makefile>
- <if cond="not isdefined('WK_ROOT')">
- <option name="WK_ROOT" category="path">
- <default-value>$(DOLLAR)(WEBKIT_ROOT)</default-value>
- <description>
- The root directory containing WebKit sources
- </description>
- </option>
- </if>
- <if cond="not isdefined('WKOUTPUTDIR')">
- <option name="WKOUTPUTDIR" category="path">
- <default-value>$(DOLLAR)(WEBKITOUTPUTDIR)</default-value>
- <description>
- The root directory containing WebKit products
- </description>
- </option>
- </if>
-
- <if cond="not isdefined('WX_PORT')">
- <if cond="FORMAT in ['msvc','msvs2005prj']">
- <set var="WX_PORT_DEFAULT" overwrite="0">
- msw
- </set>
- </if>
- <if cond="not FORMAT in ['msvc','msvs2005prj']">
- <set var="WX_PORT_DEFAULT" overwrite="0">
- $(DOLLAR)(shell $(WX_CONFIG) --selected-config | cut -d '-' -f 1)
- </set>
- </if>
- <option name="WX_PORT">
- <values>gtk2,msw,mac</values>
- <default-value force="1">$(WX_PORT_DEFAULT)</default-value>
- <description>
- Port of the wx library to build against
- </description>
- </option>
- </if>
-
- <if cond="not isdefined('PLATFORM_OS')">
- <option name="PLATFORM_OS">
- <values>linux,mac,win</values>
- <default-value force="1">win</default-value>
- <description>
- Platform the wx library is being built on
- </description>
- </option>
- </if>
-
-
- <if cond="not isdefined('DEBUG')">
- <option name="DEBUG">
- <values>0,1</values>
- <default-value>0</default-value>
- <description>
- Whether or not to build debug
- </description>
- </option>
- </if>
-
- <template id="jscore">
- <if cond="FORMAT in ['msvc', 'msvs2005prj']">
- <!-- MSVC chokes on #import, so don't use ForwardingHeaders... -->
- <include>$(WK_ROOT)/JavaScriptCore/os-win32</include><!-- stdint.h is here -->
- <include>$(WKOUTPUTDIR)</include>
- </if>
- <lib-path>$(WKOUTPUTDIR)</lib-path>
- <sys-lib>jscore</sys-lib>
- </template>
-
- <template id="webcore">
- <if cond="FORMAT=='gnu'">
- <!-- FIXME: we need proper configure checks -->
- <define>HAVE_FUNC_ISNAN</define>
- </if>
-
- <if cond="PLATFORM_WIN32=='1'">
- <include>$(WK_ROOT)/os-win32</include>
- <define>HAVE_SYS_TIMEB_H=1</define>
- <define>HAVE_FLOAT_H=1</define>
- <define>HAVE_FUNC__FINITE=1</define>
- </if>
-
- <include>$(WKOUTPUTDIR)</include>
- <include>$(WK_ROOT)/WebCore</include>
- <include>$(WK_ROOT)/WebCore/DerivedSources/WebCore</include>
- <include>$(WK_ROOT)/WebCore/bindings/js</include>
- <include>$(WK_ROOT)/WebCore/bridge</include>
- <include>$(WK_ROOT)/WebCore/css</include>
- <include>$(WK_ROOT)/WebCore/dom</include>
- <include>$(WK_ROOT)/WebCore/editing</include>
- <include>$(WK_ROOT)/WebCore/history</include>
- <include>$(WK_ROOT)/WebCore/html</include>
- <include>$(WK_ROOT)/WebCore/inspector</include>
- <include>$(WK_ROOT)/WebCore/loader</include>
- <include>$(WK_ROOT)/WebCore/loader/icon</include>
- <include>$(WK_ROOT)/WebCore/page</include>
- <include>$(WK_ROOT)/WebCore/page/animation</include>
- <include>$(WK_ROOT)/WebCore/platform</include>
- <include>$(WK_ROOT)/WebCore/platform/animation</include>
- <include>$(WK_ROOT)/WebCore/platform/graphics</include>
- <include>$(WK_ROOT)/WebCore/platform/graphics/transforms</include>
- <include>$(WK_ROOT)/WebCore/platform/image-decoders</include>
- <include>$(WK_ROOT)/WebCore/platform/image-decoders/gif</include>
- <include>$(WK_ROOT)/WebCore/platform/image-decoders/jpeg</include>
- <include>$(WK_ROOT)/WebCore/platform/image-decoders/png</include>
- <include>$(WK_ROOT)/WebCore/platform/image-decoders/zlib</include>
- <include>$(WK_ROOT)/WebCore/platform/network</include>
- <include>$(WK_ROOT)/WebCore/platform/network/curl</include>
- <include>$(WK_ROOT)/WebCore/platform/sql</include>
- <include>$(WK_ROOT)/WebCore/platform/text</include>
- <include>$(WK_ROOT)/WebCore/rendering</include>
- <include>$(WK_ROOT)/WebCore/rendering/style</include>
- <include>$(WK_ROOT)/WebCore/storage</include>
- <include>$(WK_ROOT)/WebCore/xml</include>
-
- <include>$(WK_ROOT)/JavaScriptCore</include>
- <include>$(WK_ROOT)/JavaScriptCore/assembler</include>
- <include>$(WK_ROOT)/JavaScriptCore/bytecode</include>
- <include>$(WK_ROOT)/JavaScriptCore/bytecompiler</include>
- <include>$(WK_ROOT)/JavaScriptCore/jit</include>
- <include>$(WK_ROOT)/JavaScriptCore/parser</include>
- <include>$(WK_ROOT)/JavaScriptCore/pcre</include>
- <include>$(WK_ROOT)/JavaScriptCore/profiler</include>
- <include>$(WK_ROOT)/JavaScriptCore/runtime</include>
- <include>$(WK_ROOT)/JavaScriptCore/interpreter</include>
- <include>$(WK_ROOT)/JavaScriptCore/wtf</include>
- </template>
-
-</makefile>
diff --git a/WebKit/wx/wxwebkit.bkl b/WebKit/wx/wxwebkit.bkl
index ccf6752..e69de29 100644
--- a/WebKit/wx/wxwebkit.bkl
+++ b/WebKit/wx/wxwebkit.bkl
@@ -1,83 +0,0 @@
-<?xml version="1.0" ?>
-<!--
-
-Copyright (C) 2007 Kevin Ollivier. 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.
-
-This file builds the wxWebKit library.
-
--->
-
-<makefile>
- <include file="wxwk-settings.bkl"/>
-
- <dll id="wxwebkit-dynamic" template="wxwk,jscore,webcore,xml2,iconv,xslt,icu,curl,sqlite3,gtk,pthreads">
- <!-- make sure we relink wxwebkit if either webcore or jscore change -->
- <if cond="FORMAT=='gnu'">
- <depends-on-file>$(WKOUTPUTDIR)/libjscore.a</depends-on-file>
- <depends-on-file>$(WKOUTPUTDIR)/libwebcore-wx.a</depends-on-file>
- </if>
- <if cond="FORMAT=='msvc'">
- <depends-on-file>$(WKOUTPUTDIR)/jscore.lib</depends-on-file>
- <depends-on-file>$(WKOUTPUTDIR)/webcore-wx.lib</depends-on-file>
- </if>
- <runtime-libs>dynamic</runtime-libs>
- <dllname>wxwebkit</dllname>
- <libname>wxwebkit</libname>
-
- <include>$(WK_ROOT)/WebCore/platform/graphics/wx</include>
- <include>$(WK_ROOT)/WebCore/platform/wx</include>
- <include>$(WK_ROOT)/WebCore/bridge/wx</include>
- <include>$(WK_ROOT)/WebCore/page/wx</include>
- <include>$(WK_ROOT)/WebKit/wx</include>
- <include>$(WK_ROOT)/WebKit/wx/WebKitSupport</include>
-
- <lib-path>$(WKOUTPUTDIR)</lib-path>
- <sys-lib>webcore-wx</sys-lib>
- <sys-lib>jscore</sys-lib>
-
- <if cond="FORMAT in ['msvc','msvs2005prj']">
- <sys-lib>winmm</sys-lib> <!-- for timeGetTime -->
- <sys-lib>gdiplus</sys-lib>
- <sys-lib>libpng</sys-lib>
- <sys-lib>libjpeg</sys-lib>
- </if>
-
- <sources>
- WebKitSupport/ChromeClientWx.cpp
- WebKitSupport/ContextMenuClientWx.cpp
- WebKitSupport/DragClientWx.cpp
- WebKitSupport/EditorClientWx.cpp
- WebKitSupport/FrameLoaderClientWx.cpp
- WebKitSupport/InspectorClientWx.cpp
-
- WebFrame.cpp
- WebView.cpp
- WebBrowserShell.cpp
- </sources>
- </dll>
-
-</makefile>
diff --git a/WebKit/wx/wxwk-settings.bkl b/WebKit/wx/wxwk-settings.bkl
index d51c18a..e69de29 100644
--- a/WebKit/wx/wxwk-settings.bkl
+++ b/WebKit/wx/wxwk-settings.bkl
@@ -1,109 +0,0 @@
-<?xml version="1.0" ?>
-<!--
-Copyright (C) 2007 Kevin Ollivier 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.
-
-JavaScriptCore Bakefile project file.
--->
-
-<makefile>
- <set var="WX_UNICODE">1</set>
- <set var="WX_SHARED">1</set>
-
- <include file="presets/wx.bkl"/>
- <include file="presets/wxwebkit.bkl"/>
- <include file="dependencies.bkl"/>
-
- <set var="BUILDDIR">obj-$(FORMAT)</set>
- <!-- the WX_PYTHON option was added to presets/wx.bkl in 2.8.5, so define
- it in case the presets/wx.bkl doesn't define it for us. -->
-
- <if cond="not isdefined('WX_PYTHON')">
- <set var="WX_PYTHON">0</set>
- </if>
-
- <template id="wxwk_build_settings">
- <dirname>$(WKOUTPUTDIR)</dirname>
- <warnings>default</warnings>
- <cxx-rtti>on</cxx-rtti>
- <cxx-exceptions>on</cxx-exceptions>
- <define>BUILDING_WX__=1</define>
- <define>ENABLE_DOM_STORAGE</define>
- <define>
- $(substituteFromDict(DEBUG,{'1':'','0':'NDEBUG'}))
- </define>
- <define>USE_SYSTEM_MALLOC</define>
- <optimize>
- $(substituteFromDict(DEBUG,{'1':'off','0':'speed'}))
- </optimize>
- <debug-info>
- $(substituteFromDict(DEBUG,{'1':'on','0':'off'}))
- </debug-info>
- <if cond="FORMAT in ['msvc', 'msvs2005prj']">
- <set var="DEBUG_RUNTIME">
- <if cond="WX_PYTHON=='1' and WX_DEBUG=='0'">off</if>
- <if cond="WX_PYTHON=='0' and WX_DEBUG=='0'">off</if>
- <if cond="WX_PYTHON=='1' and WX_DEBUG=='1'">off</if>
- <if cond="WX_PYTHON=='0' and WX_DEBUG=='1'">on</if>
- </set>
- <debug-runtime-libs>
- $(DEBUG_RUNTIME)
- </debug-runtime-libs>
- </if>
- <if cond="FORMAT=='gnu'">
- <include>$(WK_ROOT)/WebKitLibraries/unix/include</include>
- <lib-path>$(WK_ROOT)/WebKitLibraries/unix/lib</lib-path>
- <lib-path>$(WK_ROOT)/WebKitLibraries</lib-path>
- </if>
- <if cond="FORMAT in ['msvc', 'msvs2005prj']">
- <include>$(WK_ROOT)/WebKitLibraries/win/include</include>
- <lib-path>$(WK_ROOT)/WebKitLibraries/win/lib</lib-path>
- </if>
- </template>
- <template id="wxwk" template="wxwk_build_settings,wx">
- <!--
- since wx 2.8's libpng and libjpeg symbols get exported when using gcc/gnu make
- we need to make sure our versions appear first, so that it will get the symbols
- from the right place
- -->
- <if cond="FORMAT=='gnu'">
- <ldflags>-ljpeg -lpng</ldflags>
- </if>
-
- <set var="WEBCORE_LIBS">
- <if cond="PLATFORM_OS=='mac'">
- WebKitSystemInterfaceTiger
- </if>
- </set>
- <sys-lib>$(WEBCORE_LIBS)</sys-lib>
- <wx-lib>core</wx-lib>
- <wx-lib>base</wx-lib>
- <if cond="PLATFORM_WIN32=='1'">
- <define>WXUSINGDLL=1</define>
- </if>
- </template>
-
-</makefile>
diff --git a/WebKitLibraries/ChangeLog b/WebKitLibraries/ChangeLog
index a0f1cef..b4d72ac 100644
--- a/WebKitLibraries/ChangeLog
+++ b/WebKitLibraries/ChangeLog
@@ -1,3 +1,170 @@
+2010-01-29 Mark Rowe <mrowe@apple.com>
+
+ Keep the Windows feature defines in sync with FeatureDefines.xcconfig.
+
+ * win/tools/vsprops/FeatureDefines.vsprops:
+ * win/tools/vsprops/FeatureDefinesCairo.vsprops:
+
+2010-01-26 Alexey Proskuryakov <ap@apple.com>
+
+ More Windows build fixing.
+
+ * win/tools/vsprops/common.vsprops: Disable warning C4180 (qualifier applied to function
+ type has no meaning; ignored). This is a known bug - MSVC tries to compile a wrong
+ specialization sometimes - but it's not instantiated, so it's harmless.
+
+2010-01-22 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34025
+ Enable client-based Geolocation abstraction for Mac, Windows AppleWebKit targets.
+
+ * win/tools/vsprops/FeatureDefines.vsprops:
+ * win/tools/vsprops/FeatureDefinesCairo.vsprops:
+
+2010-01-20 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler and Adam Roben.
+
+ Feature defines are difficult to maintain on Windows builds
+ https://bugs.webkit.org/show_bug.cgi?id=33883
+
+ FeatureDefines.vsprops are now maintained in a way similar to
+ Configurations/FeatureDefines.xcconfig, with the added advantage
+ of having a single FeatureDefines file across all projects.
+
+ Keep this list of features (not enabled/disabled state) in sync with
+ FeatureDefines.xcconfig files in JavaScriptCore, WebCore, and WebKit.
+
+ Add new features to both PreprocessorDefinitions and UserMacro sections.
+ Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature.
+
+ * win/tools/scripts/feature-defines.sh: Added.
+ * win/tools/vsprops/FeatureDefines.vsprops: Added.
+ * win/tools/vsprops/FeatureDefinesCairo.vsprops: Added.
+ * win/tools/vsprops/WinCairo.vsprops: Removed ENABLE_FILTERS. Now set in FeatureDefinesCairo.vsprops.
+
+2010-01-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7532544>
+
+ Expose new method on WebKitSystemInterface, WKGetUserToBaseCTM(), which will
+ be used for a shadow drawing fix. Once more, with feeling. On Windows.
+
+ * win/include/WebKitSystemInterface/WebKitSystemInterface.h:
+ * win/lib/WebKitSystemInterface.lib:
+ * win/lib/WebKitSystemInterface_debug.lib:
+
+2010-01-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7532544>
+
+ Expose new method on WebKitSystemInterface, WKGetUserToBaseCTM(), which will
+ be used for a shadow drawing fix.
+
+ * win/lib/WebKitSystemInterface.lib:
+ * win/lib/WebKitSystemInterface_debug.lib:
+
+2010-01-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7532544>
+
+ Expose new method on WebKitSystemInterface, WKGetUserToBaseCTM(), which will
+ be used for a shadow drawing fix.
+
+ * WebKitSystemInterface.h:
+ * libWebKitSystemInterfaceLeopard.a:
+ * libWebKitSystemInterfaceSnowLeopard.a:
+ * libWebKitSystemInterfaceTiger.a:
+
+2010-01-07 Alexey Proskuryakov <ap@apple.com>
+
+ Not reviewed, build fix.
+
+ Windows buid fix - disable warning 4251 (class needs to have dll-interface to be used by
+ clients of another class). WebCore doesn't use all methods of JSString, so
+ we don't export all classes clients could theoretically access via JSString.
+
+ * win/tools/vsprops/common.vsprops:
+
+2009-12-21 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Samuel Weinig.
+
+ Update WebKitSystemInterface.
+
+ * libWebKitSystemInterfaceLeopard.a:
+ * libWebKitSystemInterfaceSnowLeopard.a:
+ * libWebKitSystemInterfaceTiger.a:
+
+2009-12-21 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Samuel Weinig.
+
+ Update WebKitSystemInterface.
+
+ * WebKitSystemInterface.h:
+ * libWebKitSystemInterfaceLeopard.a:
+ * libWebKitSystemInterfaceSnowLeopard.a:
+ * libWebKitSystemInterfaceTiger.a:
+
+2009-12-18 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Update WebKitSystemInterface for <rdar://problem/7237059>.
+
+ * WebKitSystemInterface.h:
+ * libWebKitSystemInterfaceLeopard.a:
+ * libWebKitSystemInterfaceSnowLeopard.a:
+ * libWebKitSystemInterfaceTiger.a:
+
+2009-12-15 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebKitSystemInterface part of <rdar://problem/7173515> Use LOGFONT support in
+ Core Graphics when available
+
+ * win/include/WebKitSystemInterface/WebKitSystemInterface.h: Declared
+ wkCanCreateCGFontWithLOGFONT().
+ * win/lib/WebKitSystemInterface.lib:
+ * win/lib/WebKitSystemInterface_debug.lib:
+
+2009-12-12 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7453726> Pull shared UI code into WebKit
+
+ * WebKitSystemInterface.h:
+ * libWebKitSystemInterfaceLeopard.a:
+ * libWebKitSystemInterfaceSnowLeopard.a:
+ * libWebKitSystemInterfaceTiger.a:
+
+2009-12-11 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Add QuartzCore build files to OpenSource tree
+ https://bugs.webkit.org/show_bug.cgi?id=31856
+
+ This allows proper building and linking with QuartzCore
+ when present.
+
+ * win/bin: Added.
+ * win/bin/QuartzCoreInterface.dll: Added.
+ * win/include/QuartzCoreInterface: Added.
+ * win/include/QuartzCoreInterface/QuartzCoreInterface.h: Added.
+ * win/lib/QuartzCoreInterface.lib: Added.
+
2009-12-07 Adam Roben <aroben@apple.com>
Windows build fix for checkouts with a space in the path
diff --git a/WebKitLibraries/WebKitSystemInterface.h b/WebKitLibraries/WebKitSystemInterface.h
index f6234fe..ed68410 100644
--- a/WebKitLibraries/WebKitSystemInterface.h
+++ b/WebKitLibraries/WebKitSystemInterface.h
@@ -130,6 +130,7 @@ CFStringRef WKCopyFullFontName(CGFontRef font);
void WKSetPatternBaseCTM(CGContextRef, CGAffineTransform);
void WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint);
+CGAffineTransform WKGetUserToBaseCTM(CGContextRef);
#ifndef BUILDING_ON_TIGER
void WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t);
@@ -228,6 +229,7 @@ typedef enum {
WKMediaControllerFlagDisabled = 1 << 0,
WKMediaControllerFlagPressed = 1 << 1,
WKMediaControllerFlagDrawEndCaps = 1 << 3,
+ WKMediaControllerFlagFocused = 1 << 4
} WKMediaControllerThemeState;
BOOL WKMediaControllerThemeAvailable(int themeStyle);
@@ -289,7 +291,11 @@ BOOL WKIsLatchingWheelEvent(NSEvent *);
void WKWindowSetAlpha(NSWindow *window, float alphaValue);
void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
#endif
-
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+NSMutableArray *WKNoteOpenPanelFiles(NSArray *paths);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a
index 71f4659..a9d0480 100644
--- a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a
+++ b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a
Binary files differ
diff --git a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
index 6ecfb8b..3e3e1d7 100644
--- a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
+++ b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
Binary files differ
diff --git a/WebKitLibraries/libWebKitSystemInterfaceTiger.a b/WebKitLibraries/libWebKitSystemInterfaceTiger.a
index bd780bd..3dd651a 100644
--- a/WebKitLibraries/libWebKitSystemInterfaceTiger.a
+++ b/WebKitLibraries/libWebKitSystemInterfaceTiger.a
Binary files differ
diff --git a/WebKitLibraries/win/bin/QuartzCoreInterface.dll b/WebKitLibraries/win/bin/QuartzCoreInterface.dll
new file mode 100755
index 0000000..0b64349
--- /dev/null
+++ b/WebKitLibraries/win/bin/QuartzCoreInterface.dll
Binary files differ
diff --git a/WebKitLibraries/win/include/QuartzCoreInterface/QuartzCoreInterface.h b/WebKitLibraries/win/include/QuartzCoreInterface/QuartzCoreInterface.h
new file mode 100644
index 0000000..b3cef10
--- /dev/null
+++ b/WebKitLibraries/win/include/QuartzCoreInterface/QuartzCoreInterface.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ */
+
+#ifndef QuartzCoreInterface_h
+#define QuartzCoreInterface_h
+
+#ifdef QUARTZCOREINTERFACE_EXPORTS
+#define QUARTZCOREINTERFACE_API __declspec(dllexport)
+#else
+#define QUARTZCOREINTERFACE_API __declspec(dllimport)
+#endif
+
+// Interface to give access to QuartzCore data symbols.
+enum WKQCStringRefType { wkqckCACFLayer, wkqckCACFTransformLayer, wkqckCACFFilterLinear, wkqckCACFFilterNearest,
+ wkqckCACFFilterTrilinear, wkqckCACFFilterLanczos, wkqckCACFGravityCenter, wkqckCACFGravityTop,
+ wkqckCACFGravityBottom, wkqckCACFGravityLeft, wkqckCACFGravityRight, wkqckCACFGravityTopLeft,
+ wkqckCACFGravityTopRight, wkqckCACFGravityBottomLeft, wkqckCACFGravityBottomRight,
+ wkqckCACFGravityResize, wkqckCACFGravityResizeAspect, wkqckCACFGravityResizeAspectFill };
+
+enum WKQCCARenderOGLCallbacksType { wkqckCARenderDX9Callbacks };
+
+typedef const struct __CFString * CFStringRef;
+typedef struct _CARenderOGLCallbacks CARenderOGLCallbacks;
+typedef struct CATransform3D CATransform3D;
+
+extern "C" {
+QUARTZCOREINTERFACE_API CFStringRef wkqcCFStringRef(WKQCStringRefType);
+QUARTZCOREINTERFACE_API const CARenderOGLCallbacks* wkqcCARenderOGLCallbacks(WKQCCARenderOGLCallbacksType);
+QUARTZCOREINTERFACE_API const CATransform3D& wkqcCATransform3DIdentity();
+}
+
+#endif // QuartzCoreInterface_h
diff --git a/WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h b/WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h
index e3feae6..824b44d 100644
--- a/WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h
+++ b/WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h
@@ -58,6 +58,7 @@ void wkRestoreFontSmoothingStyle(CGContextRef cg, uint32_t oldStyle);
void wkSetCGContextFontRenderingStyle(CGContextRef, bool isSystemFont, bool isPrinterFont, bool usePlatformNativeGlyphs);
void wkGetGlyphAdvances(CGFontRef, const CGAffineTransform&, bool isSystemFont, bool isPrinterFont, CGGlyph, CGSize& advance);
void wkGetGlyphs(CGFontRef, const UChar[], CGGlyph[], size_t count);
+bool wkCanCreateCGFontWithLOGFONT();
void wkSetFontPlatformInfo(CGFontRef, LOGFONT*, void(*)(void*));
void wkSetUpFontCache(size_t s);
void wkAddFontsInDirectory(CFStringRef);
@@ -68,6 +69,7 @@ CFPropertyListRef wkCreateFontsPlist();
void wkSetPatternBaseCTM(CGContextRef, CGAffineTransform);
void wkSetPatternPhaseInUserSpace(CGContextRef, CGPoint phasePoint);
+CGAffineTransform wkGetUserToBaseCTM(CGContextRef);
void wkDrawFocusRing(CGContextRef, CGColorRef, float radius);
@@ -87,7 +89,7 @@ void wkSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumber
void wkSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
CFHTTPMessageRef wkCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL);
-CFURLCredentialRef wkCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef);
+CFURLCredentialRef wkCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef protectionSpace);
CFStringRef wkCFNetworkErrorGetLocalizedDescription(CFIndex errorCode);
diff --git a/WebKitLibraries/win/lib/QuartzCoreInterface.lib b/WebKitLibraries/win/lib/QuartzCoreInterface.lib
new file mode 100755
index 0000000..0a556d3
--- /dev/null
+++ b/WebKitLibraries/win/lib/QuartzCoreInterface.lib
Binary files differ
diff --git a/WebKitLibraries/win/lib/WebKitSystemInterface.lib b/WebKitLibraries/win/lib/WebKitSystemInterface.lib
index 60d4e1e..f1857e7 100644
--- a/WebKitLibraries/win/lib/WebKitSystemInterface.lib
+++ b/WebKitLibraries/win/lib/WebKitSystemInterface.lib
Binary files differ
diff --git a/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib b/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib
index 56cbdcf..9722d97 100644
--- a/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib
+++ b/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib
Binary files differ
diff --git a/WebKitLibraries/win/tools/scripts/feature-defines.sh b/WebKitLibraries/win/tools/scripts/feature-defines.sh
new file mode 100644
index 0000000..71c3a9b
--- /dev/null
+++ b/WebKitLibraries/win/tools/scripts/feature-defines.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/bash
+
+# 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.
+
+if [ "$2" = "cairo" ]; then
+ FeatureDefines=$1/tools/vsprops/FeatureDefinesCairo.vsprops
+else
+ FeatureDefines=$1/tools/vsprops/FeatureDefines.vsprops
+fi
+
+grep Value=\"ENABLE_ $FeatureDefines | sed 's/^.*Value\=\"/ /' | sed 's/\"//' | tr -d '\n'
diff --git a/WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops b/WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops
new file mode 100644
index 0000000..45495a3
--- /dev/null
+++ b/WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Keep this list of features (not enabled/disabled state) in sync with FeatureDefines.xcconfig files in JavaScriptCore, WebCore, and WebKit. -->
+<!-- Add new features to both PreprocessorDefinitions and UserMacro sections. -->
+<!-- Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature. -->
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="FeatureDefines"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="$(ENABLE_3D_CANVAS);$(ENABLE_3D_RENDERING);$(ENABLE_CHANNEL_MESSAGING);$(ENABLE_CLIENT_BASED_GEOLOCATION);$(ENABLE_DATABASE);$(ENABLE_DATAGRID);$(ENABLE_DATALIST);$(ENABLE_DOM_STORAGE);$(ENABLE_EVENTSOURCE);$(ENABLE_FILTERS);$(ENABLE_GEOLOCATION);$(ENABLE_ICONDATABASE);$(ENABLE_INDEXED_DATABASE);$(ENABLE_JAVASCRIPT_DEBUGGER);$(ENABLE_MATHML);$(ENABLE_NOTIFICATIONS);$(ENABLE_OFFLINE_WEB_APPLICATIONS);$(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_WML);$(ENABLE_WORKERS);$(ENABLE_XHTMLMP);$(ENABLE_XPATH);$(ENABLE_XSLT)"
+ />
+ <UserMacro
+ Name="ENABLE_3D_CANVAS"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_3D_RENDERING"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_CHANNEL_MESSAGING"
+ Value="ENABLE_CHANNEL_MESSAGING"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_CLIENT_BASED_GEOLOCATION"
+ Value="ENABLE_CLIENT_BASED_GEOLOCATION"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_DATABASE"
+ Value="ENABLE_DATABASE"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_DATAGRID"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_DATALIST"
+ Value="ENABLE_DATALIST"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_DOM_STORAGE"
+ Value="ENABLE_DOM_STORAGE"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_EVENTSOURCE"
+ Value="ENABLE_EVENTSOURCE"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_FILTERS"
+ Value="ENABLE_FILTERS"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_GEOLOCATION"
+ Value="ENABLE_GEOLOCATION"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_ICONDATABASE"
+ Value="ENABLE_ICONDATABASE"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_INDEXED_DATABASE"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_JAVASCRIPT_DEBUGGER"
+ Value="ENABLE_JAVASCRIPT_DEBUGGER"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_MATHML"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_NOTIFICATIONS"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_OFFLINE_WEB_APPLICATIONS"
+ Value="ENABLE_OFFLINE_WEB_APPLICATIONS"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_SHARED_WORKERS"
+ Value="ENABLE_SHARED_WORKERS"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_SVG"
+ Value="ENABLE_SVG"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_SVG_ANIMATION"
+ Value="ENABLE_SVG_ANIMATION"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_SVG_AS_IMAGE"
+ Value="ENABLE_SVG_AS_IMAGE"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_SVG_DOM_OBJC_BINDINGS"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_SVG_FONTS"
+ Value="ENABLE_SVG_FONTS"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_SVG_FOREIGN_OBJECT"
+ Value="ENABLE_SVG_FOREIGN_OBJECT"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_SVG_USE"
+ Value="ENABLE_SVG_USE"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_VIDEO"
+ Value="ENABLE_VIDEO"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_WEB_SOCKETS"
+ Value="ENABLE_WEB_SOCKETS"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_WML"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_WORKERS"
+ Value="ENABLE_WORKERS"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_XHTMLMP"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_XPATH"
+ Value="ENABLE_XPATH"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_XSLT"
+ Value="ENABLE_XSLT"
+ PerformEnvironmentSet="true"
+ />
+</VisualStudioPropertySheet>
diff --git a/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops b/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops
new file mode 100644
index 0000000..1c16a9b
--- /dev/null
+++ b/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<!-- Keep this list of features (not enabled/disabled state) in sync with FeatureDefines.xcconfig files in JavaScriptCore, WebCore, and WebKit. -->
+<!-- Add new features to both PreprocessorDefinitions and UserMacro sections. -->
+<!-- Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature. -->
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="FeatureDefines"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="$(ENABLE_3D_CANVAS);$(ENABLE_3D_RENDERING);$(ENABLE_CHANNEL_MESSAGING);$(ENABLE_CLIENT_BASED_GEOLOCATION);$(ENABLE_DATABASE);$(ENABLE_DATAGRID);$(ENABLE_DATALIST);$(ENABLE_DOM_STORAGE);$(ENABLE_EVENTSOURCE);$(ENABLE_FILTERS);$(ENABLE_GEOLOCATION);$(ENABLE_ICONDATABASE);$(ENABLE_INDEXED_DATABASE);$(ENABLE_JAVASCRIPT_DEBUGGER);$(ENABLE_MATHML);$(ENABLE_NOTIFICATIONS);$(ENABLE_OFFLINE_WEB_APPLICATIONS);$(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_WML);$(ENABLE_WORKERS);$(ENABLE_XHTMLMP);$(ENABLE_XPATH);$(ENABLE_XSLT)"
+ />
+ <UserMacro
+ Name="ENABLE_3D_CANVAS"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_3D_RENDERING"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_CHANNEL_MESSAGING"
+ Value="ENABLE_CHANNEL_MESSAGING"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_CLIENT_BASED_GEOLOCATION"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_DATABASE"
+ Value="ENABLE_DATABASE"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_DATAGRID"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_DATALIST"
+ Value="ENABLE_DATALIST"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_DOM_STORAGE"
+ Value="ENABLE_DOM_STORAGE"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_EVENTSOURCE"
+ Value="ENABLE_EVENTSOURCE"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_FILTERS"
+ Value="ENABLE_FILTERS"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_GEOLOCATION"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_ICONDATABASE"
+ Value="ENABLE_ICONDATABASE"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_INDEXED_DATABASE"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_JAVASCRIPT_DEBUGGER"
+ Value="ENABLE_JAVASCRIPT_DEBUGGER"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_MATHML"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_NOTIFICATIONS"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_OFFLINE_WEB_APPLICATIONS"
+ Value="ENABLE_OFFLINE_WEB_APPLICATIONS"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_SHARED_WORKERS"
+ Value="ENABLE_SHARED_WORKERS"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_SVG"
+ Value="ENABLE_SVG"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_SVG_ANIMATION"
+ Value="ENABLE_SVG_ANIMATION"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_SVG_AS_IMAGE"
+ Value="ENABLE_SVG_AS_IMAGE"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_SVG_DOM_OBJC_BINDINGS"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_SVG_FONTS"
+ Value="ENABLE_SVG_FONTS"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_SVG_FOREIGN_OBJECT"
+ Value="ENABLE_SVG_FOREIGN_OBJECT"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_SVG_USE"
+ Value="ENABLE_SVG_USE"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_VIDEO"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_WEB_SOCKETS"
+ Value="ENABLE_WEB_SOCKETS"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_WML"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_WORKERS"
+ Value="ENABLE_WORKERS"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_XHTMLMP"
+ Value=""
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_XPATH"
+ Value="ENABLE_XPATH"
+ PerformEnvironmentSet="true"
+ />
+ <UserMacro
+ Name="ENABLE_XSLT"
+ Value="ENABLE_XSLT"
+ PerformEnvironmentSet="true"
+ />
+</VisualStudioPropertySheet>
diff --git a/WebKitLibraries/win/tools/vsprops/WinCairo.vsprops b/WebKitLibraries/win/tools/vsprops/WinCairo.vsprops
index 1a8f4b2..60873a3 100644
--- a/WebKitLibraries/win/tools/vsprops/WinCairo.vsprops
+++ b/WebKitLibraries/win/tools/vsprops/WinCairo.vsprops
@@ -4,9 +4,9 @@
Version="8.00"
Name="WinCairo"
>
- <Tool
+ <Tool
Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN_CAIRO=1;ENABLE_FILTERS"
+ PreprocessorDefinitions="WIN_CAIRO=1"
AdditionalIncludeDirectories="&quot;$(WebKitLibrariesDir)\include\cairo&quot;"
/>
<Tool
diff --git a/WebKitLibraries/win/tools/vsprops/common.vsprops b/WebKitLibraries/win/tools/vsprops/common.vsprops
index 290db9a..8976ceb 100644
--- a/WebKitLibraries/win/tools/vsprops/common.vsprops
+++ b/WebKitLibraries/win/tools/vsprops/common.vsprops
@@ -15,7 +15,7 @@
WarningLevel="4"
WarnAsError="true"
DebugInformationFormat="3"
- DisableSpecificWarnings="4018;4068;4099;4100;4127;4138;4189;4244;4275;4291;4305;4344;4355;4389;4503;4505;4510;4512;4610;4706;4800;4951;4952;4996;6011;6031;6211;6246;6255;6387"
+ DisableSpecificWarnings="4018;4068;4099;4100;4127;4138;4180;4189;4244;4251;4275;4291;4305;4344;4355;4389;4503;4505;4510;4512;4610;4706;4800;4951;4952;4996;6011;6031;6211;6246;6255;6387"
/>
<Tool
Name="VCLibrarianTool"
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/buildbot.css b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/buildbot.css
index 534de25..a71c81f 100644
--- a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/buildbot.css
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/buildbot.css
@@ -1,4 +1,8 @@
-* {
+body {
+ margin-bottom:50px;
+}
+
+body, td {
font-family: Verdana, Cursor;
font-size: 10px;
font-weight: bold;
@@ -7,8 +11,9 @@
a:link,a:visited,a:active {
color: #444;
}
+
a:hover {
- color: #FFFFFF;
+ color: #000000;
}
table {
@@ -25,10 +30,14 @@ table td {
}
.LastBuild, .Activity {
- width: 230px;
padding: 0 0 0 4px;
}
+.LastBuild, .Activity, .Builder, .BuildStep {
+ width: 155px;
+ max-width: 155px;
+}
+
td.Time {
color: #000;
border-bottom: 1px solid #aaa;
@@ -58,7 +67,7 @@ td.Activity {
-webkit-border-top-left-radius: 10px;
-moz-border-radius-topleft: 10px;
min-height: 20px;
- padding: 8px 0 8px 0;
+ padding: 2px 0 2px 0;
}
td.idle, td.waiting, td.offline, td.building {
@@ -71,35 +80,255 @@ td.idle, td.waiting, td.offline, td.building {
border-top-left-radius: 5px;
-webkit-border-top-left-radius: 5px;
-moz-border-radius-topleft: 5px;
- border-top-right-radius: 5px;
- -webkit-border-top-right-radius: 5px;
+ border-top-right-radius: 5px;
+ -webkit-border-top-right-radius: 5px;
-moz-border-radius-topright: 5px;
}
+/* Console view styles */
+
+td.DevRev {
+ padding: 4px 8px 4px 8px;
+ color: #333333;
+ border-top-left-radius: 5px;
+ -webkit-border-top-left-radius: 5px;
+ -moz-border-radius-topleft: 5px;
+ background-color: #eee;
+ width: 1%;
+}
+
+td.DevRevCollapse {
+ border-bottom-left-radius: 5px;
+ -webkit-border-bottom-left-radius: 5px;
+ -moz-border-radius-bottomleft: 5px;
+}
+
+td.DevName {
+ padding: 4px 8px 4px 8px;
+ color: #333333;
+ background-color: #eee;
+ width: 1%;
+ text-align: left;
+}
+
+td.DevStatus {
+ padding: 4px 4px 4px 4px;
+ color: #333333;
+ background-color: #eee;
+}
+
+td.DevSlave {
+ padding: 4px 4px 4px 4px;
+ color: #333333;
+ background-color: #eee;
+}
+
+td.first {
+ border-top-left-radius: 5px;
+ -webkit-border-top-left-radius: 5px;
+ -moz-border-radius-topleft: 5px;
+}
+
+td.last {
+ border-top-right-radius: 5px;
+ -webkit-border-top-right-radius: 5px;
+ -moz-border-radius-topright: 5px;
+}
+
+td.DevStatusCategory {
+ border-radius: 5px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-width:1px;
+ border-style:solid;
+}
+
+td.DevStatusCollapse {
+ border-bottom-right-radius: 5px;
+ -webkit-border-bottom-right-radius: 5px;
+ -moz-border-radius-bottomright: 5px;
+}
+
+td.DevDetails {
+ font-weight: normal;
+ padding: 8px 8px 8px 8px;
+ color: #333333;
+ background-color: #eee;
+ text-align: left;
+}
+
+td.DevComment {
+ font-weight: normal;
+ padding: 8px 8px 8px 8px;
+ color: #333333;
+ border-bottom-right-radius: 5px;
+ -webkit-border-bottom-right-radius: 5px;
+ -moz-border-radius-bottomright: 5px;
+ border-bottom-left-radius: 5px;
+ -webkit-border-bottom-left-radius: 5px;
+ -moz-border-radius-bottomleft: 5px;
+ background-color: #eee;
+ text-align: left;
+}
+
+td.Alt {
+ background-color: #CCCCCC;
+}
+
+.legend {
+ border-radius: 5px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ width: 100px;
+ max-width: 100px;
+ text-align:center;
+ padding: 2px 2px 2px 2px;
+ height:14px;
+ white-space:nowrap;
+}
+
+.DevStatusBox {
+ text-align:center;
+ height:20px;
+ padding:0 2px;
+ line-height:0;
+ white-space:nowrap;
+}
+
+.DevStatusBox a {
+ opacity: 0.85;
+ border-width:1px;
+ border-style:solid;
+ border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ display:block;
+ width:90%;
+ height:20px;
+ line-height:20px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.DevSlaveBox {
+ text-align:center;
+ height:10px;
+ padding:0 2px;
+ line-height:0;
+ white-space:nowrap;
+}
+
+.DevSlaveBox a {
+ opacity: 0.85;
+ border-width:1px;
+ border-style:solid;
+ border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ display:block;
+ width:90%;
+ height:10px;
+ line-height:20px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+a.noround {
+ border-radius: 0px;
+ -webkit-border-radius: 0px;
+ -moz-border-radius: 0px;
+ position: relative;
+ margin-top: -8px;
+ margin-bottom: -8px;
+ height: 36px;
+ border-top-width: 0;
+ border-bottom-width: 0;
+}
+
+a.begin {
+ border-top-width:1px;
+ position: relative;
+ margin-top: 0px;
+ margin-bottom: -7px;
+ height: 27px;
+ border-top-left-radius: 4px;
+ -webkit-border-top-left-radius: 4px;
+ -moz-border-radius-topleft: 4px;
+ border-top-right-radius: 4px;
+ -webkit-border-top-right-radius: 4px;
+ -moz-border-radius-topright: 4px;
+}
+
+a.end {
+ border-bottom-width:1px;
+ position: relative;
+ margin-top: -7px;
+ margin-bottom: 0px;
+ height: 27px;
+ border-bottom-left-radius: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomleft: 4px;
+ border-bottom-right-radius: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+}
+
+.center_align {
+ text-align: center;
+}
+
+.right_align {
+ text-align: right;
+}
+
+.left_align {
+ text-align: left;
+}
+
+div.BuildWaterfall {
+ border-radius: 7px;
+ -webkit-border-radius: 7px;
+ -moz-border-radius: 7px;
+ position: absolute;
+ left: 0px;
+ top: 0px;
+ background-color: #FFFFFF;
+ padding: 4px 4px 4px 4px;
+ float: left;
+ display: none;
+ border-width: 1px;
+ border-style: solid;
+}
+
/* LastBuild, BuildStep states */
.success {
color: #FFFFFF;
background-color: #8fdf5f;
+ border-color: #4F8530;
}
.failure {
color: #FFFFFF;
background-color: #e98080;
+ border-color: #A77272;
}
.warnings {
color: #FFFFFF;
background-color: #ffc343;
+ border-color: #C29D46;
}
.exception, td.offline {
color: #FFFFFF;
background-color: #e0b0ff;
+ border-color: #ACA0B3;
}
.start,.running, td.building {
color: #666666;
background-color: #fffc6c;
+ border-color: #C5C56D;
}
.start {
@@ -111,6 +340,43 @@ td.idle, td.waiting, td.offline, td.building {
-moz-border-radius-bottomright: 10px;
}
+.notstarted {
+ border-width:1px;
+ border-style:solid;
+ border-color:#aaa;
+}
+
td.Project a:hover, td.start a:hover {
- color: #000;
+ color: #000;
+}
+
+/* grid styles */
+
+table.Grid {
+ border-collapse: collapse;
+}
+
+table.Grid tr td {
+ padding: 0.2em;
+ margin: 0px;
+ text-align: center;
+}
+
+table.Grid tr td.title {
+ font-size: 90%;
+ border-right: 1px gray solid;
+ border-bottom: 1px gray solid;
+}
+
+table.Grid tr td.sourcestamp {
+ font-size: 90%;
+}
+
+table.Grid tr td.builder {
+ text-align: right;
+ font-size: 90%;
+}
+
+table.Grid tr td.build {
+ border: 1px gray solid;
}
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/index.html b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/index.html
index 23e6650..b38adc9 100644
--- a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/index.html
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/index.html
@@ -9,24 +9,13 @@
<h1>Welcome to the Buildbot!</h1>
<ul>
- <li>the <a href="waterfall">Waterfall Display</a> will give you a
- time-oriented summary of recent buildbot activity.</li>
-
- <li>the <a href="grid">Grid Display</a> will give you a
- developer-oriented summary of recent buildbot activity.</li>
-
- <li>The <a href="one_box_per_builder">Latest Build</a> for each builder is
- here.</li>
-
- <li><a href="one_line_per_build">Recent Builds</a> are summarized here, one
- per line.</li>
-
+ <li><a href="console">Console</a></li>
+ <li><a href="waterfall">Waterfall Display</a> will give you a time-oriented summary of recent buildbot activity.</li>
+ <li><a href="one_box_per_builder">Latest Build</a> for each builder is here.</li>
+ <li><a href="one_line_per_build">Recent Builds</a> are summarized here, one per line.</li>
<li><a href="buildslaves">Buildslave</a> information</li>
+ <li><a href="http://webkit-commit-queue.appspot.com/">Commit Queue Status</a> information.</li>
<li><a href="changes">ChangeSource</a> information.</li>
-
- <br />
- <li><a href="about">About this Buildbot</a></li>
</ul>
-
-
</body> </html>
+
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/robots.txt b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/robots.txt
index 47a9d27..579297c 100644
--- a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/robots.txt
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/robots.txt
@@ -7,3 +7,7 @@ Disallow: /schedulers
Disallow: /one_line_per_build
Disallow: /one_box_per_builder
Disallow: /xmlrpc
+Disallow: /grid
+Disallow: /tgrid
+Disallow: /console
+Disallow: /results
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index c55009d..38cd459 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,6077 @@
+2010-01-31 Chris Jerdonek <cjerdonek@webkit.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Moved style error handler code to their own classes, and
+ related refactoring. Increased unit test code coverage of
+ style error handling.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34379
+
+ * Scripts/check-webkit-style:
+ - Minor change: added error_count variable.
+
+ * Scripts/webkitpy/style/checker.py:
+ - Renamed ProcessorOptions.should_report_error() to is_reportable().
+ - In the StyleChecker class--
+ - Removed _default_style_error_handler().
+ - Added _increment_error_count().
+ - Refactored to use DefaultStyleErrorHandler and
+ PatchStyleErrorHandler constructors.
+
+ * Scripts/webkitpy/style/checker_unittest.py:
+ - In the StyleStyleCheckerTest class--
+ - Removed write_sample_error().
+ - Removed test_default_style_error_handler().
+
+ * Scripts/webkitpy/style/error_handlers.py: Added.
+ - Added DefaultStyleErrorHandler class.
+ - Added PatchStyleErrorHandler class.
+
+ * Scripts/webkitpy/style/error_handlers_unittest.py: Added.
+ - Added unit tests for DefaultStyleErrorHandler and
+ PatchStyleErrorHandler.
+
+ * Scripts/webkitpy/style/unittests.py:
+ - Added error_handlers unit tests.
+
+2010-01-29 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Stephanie Lewis.
+
+ Fix run-leaks with newer versions of the leaks tool.
+
+ * Scripts/run-leaks:
+
+2010-01-29 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Eric Siedel.
+
+ Top-level test drivers for running the Chromium port of run-webkit-tests
+ and being able to rebaseline test results from the test bots. The
+ files in the Scripts directory are simply wrappers around the files
+ in webkitpy/layout_tests for convenience.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31498
+
+ * Scripts/rebaseline-chromium-webkit-tests: Added.
+ * Scripts/run-chromium-webkit-tests: Added.
+ * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py: Added.
+ * Scripts/webkitpy/layout_tests/run_chromium_webkit_tests.py: Added.
+
+2010-01-29 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Eric Siedel.
+
+ Add in the second block of python code for the Chromium port
+ of run-webkit-tests. These files execute different diffs to classify
+ the various types of failures from a test.
+
+ * Scripts/webkitpy/layout_tests/test_types: Added.
+ * Scripts/webkitpy/layout_tests/test_types/__init__.py: Added.
+ * Scripts/webkitpy/layout_tests/test_types/fuzzy_image_diff.py: Added.
+ * Scripts/webkitpy/layout_tests/test_types/image_diff.py: Added.
+ * Scripts/webkitpy/layout_tests/test_types/test_type_base.py: Added.
+ * Scripts/webkitpy/layout_tests/test_types/text_diff.py: Added.
+
+2010-01-29 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Eric Siedel.
+
+ Check in the first part of the Chromium Python port of the
+ run-webkit-tests test driver. The files under
+ layout_tests/layout_layout constitute most of the implementation;
+ they can be roughly divided into code that parses the
+ "test_expectations.txt" file that describes how we expect tests to
+ pass or fail, platform-specific hooks for the different Chromium
+ ports (in platform_utils*), code for parsing the output of the
+ tests and generating results files and HTML and JSON for the
+ dashboards, auxiliary scripts for starting and stopping HTTP and
+ Web Socket servers, and then one of the actual driver files
+ (test_shell_thread). Code for actually parsing test output for
+ failures and the top-level driver scripts will follow shortly.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31498
+
+ * Scripts/webkitpy/layout_tests: Added.
+ * Scripts/webkitpy/layout_tests/layout_package: Added.
+ * Scripts/webkitpy/layout_tests/layout_package/__init__.py: Added.
+ * Scripts/webkitpy/layout_tests/layout_package/apache_http_server.py: Added.
+ * Scripts/webkitpy/layout_tests/layout_package/http_server.py: Added.
+ * Scripts/webkitpy/layout_tests/layout_package/http_server_base.py: Added.
+ * Scripts/webkitpy/layout_tests/layout_package/httpd2.pem: Added.
+ - scripts to start and stop apache. Note that the apache file
+ generates a conf file dynamically, and we should switch to
+ using the same static conf file that the regular run-webkit-tests
+ uses, and we can also use the same httpd2.pem file.
+
+ * Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py: Added.
+ * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py: Added.
+ - scripts to generate the JSON layout test dashboard and the
+ flakiness dashboard
+ * Scripts/webkitpy/layout_tests/layout_package/lighttpd.conf: Added.
+ - default configuration for LigHTTPd (used on Windows)
+ * Scripts/webkitpy/layout_tests/layout_package/metered_stream.py: Added.
+ - utility class that implements progress bars on the console to
+ be displayed while the tests are running
+ * Scripts/webkitpy/layout_tests/layout_package/path_utils.py: Added.
+ - various routines for manipulating paths and URIs
+ * Scripts/webkitpy/layout_tests/layout_package/platform_utils.py: Added.
+ * Scripts/webkitpy/layout_tests/layout_package/platform_utils_linux.py: Added.
+ * Scripts/webkitpy/layout_tests/layout_package/platform_utils_mac.py: Added.
+ * Scripts/webkitpy/layout_tests/layout_package/platform_utils_win.py: Added.
+ - platform-specific aspects of the drivers (binary names, paths,
+ process control, etc.)
+ * Scripts/webkitpy/layout_tests/layout_package/test_expectations.py: Added.
+ - code for parsing the 'test_expectations.txt' file to determine
+ which tests are expected to fail (and how) on which platforms
+ * Scripts/webkitpy/layout_tests/layout_package/test_failures.py: Added.
+ - code for handling different kinds of failures (generating output
+ in the results, etc.)
+ * Scripts/webkitpy/layout_tests/layout_package/test_files.py: Added.
+ - code to gather the lists of tests
+ * Scripts/webkitpy/layout_tests/layout_package/test_shell_thread.py: Added.
+ - code to actually execute tests via TestShell and process
+ the output
+ * Scripts/webkitpy/layout_tests/layout_package/websocket_server.py: Added.
+ - scripts to start and stop the pywebsocket server
+
+2010-01-29 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Check in a copy of the simplejson library; it will be used by
+ the Chromium port of run-webkit-tests.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31498
+
+ * simplejson: Added.
+ * simplejson/LICENSE.txt: Added.
+ * simplejson/README.txt: Added.
+ * simplejson/__init__.py: Added.
+ * simplejson/_speedups.c: Added.
+ (ascii_escape_char):
+ (ascii_escape_unicode):
+ (ascii_escape_str):
+ (py_encode_basestring_ascii):
+ (init_speedups):
+ * simplejson/decoder.py: Added.
+ * simplejson/encoder.py: Added.
+ * simplejson/jsonfilter.py: Added.
+ * simplejson/scanner.py: Added.
+
+2010-01-29 Dirk Pranke <dpranke@chromium.org>
+
+ No review
+
+ Add myself to the committers list
+
+ * Scripts/webkitpy/committers.py:
+
+2010-01-29 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ A first step towards the Indexed Database API
+ https://bugs.webkit.org/show_bug.cgi?id=34342
+
+ Add indexed database API.
+
+ * Scripts/build-webkit:
+
+2010-01-29 Andras Becsi <abecsi@webkit.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Correct openHTTPD() to print requests to stdout if run-webkit-httpd is used.
+ This fixes a regression introduced in r53559.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34336
+
+ * Scripts/webkitperl/httpd.pm:
+
+2010-01-28 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: Crash when posting a notification for a detached object
+
+ https://bugs.webkit.org/show_bug.cgi?id=34309
+ <rdar://problem/7409759>
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/AccessibilityController.h:
+ Declare new functions. Add new members to store the event hook and the
+ mapping of accessibility elements to their JS callbacks.
+
+ * DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
+ (AccessibilityController::notificationReceived):
+ Stubbed.
+ (AccessibilityController::addNotificationListener):
+ Stubbed.
+
+ * DumpRenderTree/mac/AccessibilityControllerMac.mm:
+ (AccessibilityController::notificationReceived):
+ Stubbed.
+ (AccessibilityController::addNotificationListener):
+ Stubbed.
+
+ * DumpRenderTree/win/AccessibilityControllerWin.cpp:
+ (AccessibilityController::AccessibilityController):
+ Initialize the event hook.
+ (AccessibilityController::~AccessibilityController):
+ Remove the event hook. Unprotect all of the JS functions that are stored
+ in the map.
+ (logEventProc):
+ Clean-up a variable.
+ (stringEvent):
+ Return a string description of the MSAA event code.
+ (notificationListenerProc):
+ Get the accessible object from the event, and query it for IAccessible.
+ Call the AccessibilityController's notificationReceived().
+ (comparableObject):
+ Use QueryService to obtain the IAccessibleComparable for the
+ IServiceProvider.
+ (AccessibilityController::notificationReceived):
+ Iterate the map of objects that have registered for notification
+ callbacks. Query each for IServiceProvider, then use comparableObject()
+ to get an IAccessibleComparable. If we find an object matching the
+ notified object, call its callback, passing the event that was received.
+ (AccessibilityController::addNotificationListener):
+ If we have not created the event hook, create it. Protect the JS
+ callback function object, and add the object and its callback to our
+ map.
+
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::addNotificationListener):
+ Call through to the AccessibilityController's addNotificationListener().
+
+ * DumpRenderTree/win/DumpRenderTreeWin.h:
+ Add an extern declaration for the shared FrameLoadDelegate extern, so we
+ can access it from AccessibilityController.
+
+ * DumpRenderTree/win/FrameLoadDelegate.h:
+ (FrameLoadDelegate::accessibilityController):
+ Return the AccessibilityController.
+
+2010-01-29 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ prepare-ChangeLog outputs useless messages for a nonexistent bug ID
+ https://bugs.webkit.org/show_bug.cgi?id=34313
+
+ * Scripts/prepare-ChangeLog:
+
+2010-01-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Rubberstamped by Simon Hausmann.
+
+ [Qt] Separate implementation from class definition.
+
+ * QtLauncher/main.cpp:
+ (LauncherWindow::webView):
+ (LauncherWindow::LauncherWindow):
+ (LauncherWindow::~LauncherWindow):
+ (LauncherWindow::keyPressEvent):
+ (LauncherWindow::grabZoomKeys):
+ (LauncherWindow::sendTouchEvent):
+ (LauncherWindow::eventFilter):
+ (LauncherWindow::loadStarted):
+ (LauncherWindow::loadFinished):
+ (LauncherWindow::showLinkHover):
+ (LauncherWindow::zoomIn):
+ (LauncherWindow::zoomOut):
+ (LauncherWindow::resetZoom):
+ (LauncherWindow::toggleZoomTextOnly):
+ (LauncherWindow::print):
+ (LauncherWindow::screenshot):
+ (LauncherWindow::setEditable):
+ (LauncherWindow::dumpHtml):
+ (LauncherWindow::selectElements):
+ (LauncherWindow::setTouchMocking):
+ (LauncherWindow::newWindow):
+ (LauncherWindow::setupUI):
+
+2010-01-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] On Maemo5, a click/touch in the location bar (when unfocused)
+ should result in all text selected.
+
+ * QtLauncher/locationedit.cpp:
+ (LocationEdit::focusInEvent):
+ * QtLauncher/locationedit.h:
+
+2010-01-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Show progress reaching 100% for loads.
+
+ * QtLauncher/locationedit.cpp:
+ (LocationEdit::LocationEdit):
+ (LocationEdit::setProgress):
+ (LocationEdit::reset):
+ (LocationEdit::paintEvent):
+ * QtLauncher/locationedit.h:
+
+2010-01-29 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Disable the QtLauncher statusbar on Maemo
+
+ https://bugs.webkit.org/show_bug.cgi?id=34330
+
+ * QtLauncher/main.cpp:
+ (LauncherWindow::showLinkHover):
+ (LauncherWindow::selectElements):
+
+2010-01-29 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Display page loading progress inside the QtLauncher location bar
+
+ https://bugs.webkit.org/show_bug.cgi?id=34210
+
+ * QtLauncher/QtLauncher.pro:
+ * QtLauncher/locationedit.cpp: Added.
+ (LocationEdit::LocationEdit):
+ (LocationEdit::setProgress):
+ (LocationEdit::paintEvent):
+ * QtLauncher/locationedit.h: Added.
+ * QtLauncher/mainwindow.cpp:
+ (MainWindow::buildUI):
+ * QtLauncher/mainwindow.h:
+
+2010-01-29 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add support for Maemo zoom keys in QtLauncher
+
+ https://bugs.webkit.org/show_bug.cgi?id=34160
+
+ * QtLauncher/main.cpp:
+ (LauncherWindow::LauncherWindow):
+ (LauncherWindow::~LauncherWindow):
+ (LauncherWindow::keyPressEvent):
+ (LauncherWindow::grabZoomKeys):
+
+2010-01-29 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Implement the display() method of the layout test controller
+ https://bugs.webkit.org/show_bug.cgi?id=34258
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::showPage):
+ (WebCore::DumpRenderTree::hidePage):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::reset):
+ (LayoutTestController::display):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
+2010-01-28 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix for MSW, use ThreadingWin.cpp as the Windows pthreads implementation
+ implements pthread_t in a way that makes it impossible to check its validity,
+ which is needed by ThreadingPthreads.cpp.
+
+ * DumpRenderTree/wscript:
+ * wx/build/settings.py:
+
+2010-01-28 Andras Becsi <abecsi@webkit.org>
+
+ Adding myself to the committer list. No review needed.
+
+ * Scripts/webkitpy/committers.py:
+
+2010-01-28 Hayato Ito <hayato@chromium.org>
+
+ Reviewed by David Levin.
+
+ Remove NULL char from input JS file because 'grep' fails if the file contains NULL char.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34252
+
+ * Scripts/make-script-test-wrappers:
+
+2010-01-28 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix after removal of the zlib image decoder.
+
+ * wx/build/settings.py:
+
+2010-01-28 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Unreviewed, roll out r54000.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::reset):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+ (LayoutTestController::display):
+
+2010-01-28 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Implement the display() method of the layout test controller
+ https://bugs.webkit.org/show_bug.cgi?id=34258
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::showPage):
+ (WebCore::DumpRenderTree::hidePage):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::reset):
+ (LayoutTestController::display):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
+2010-01-28 Chris Jerdonek <cjerdonek@webkit.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Eliminated the filename parameter from functions in
+ check-webkit-style's cpp.py where it is no longer used.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34249
+
+ * Scripts/webkitpy/style/processors/cpp.py:
+ - Reduced number of occurrences of "filename" variable from
+ approximately 200 to 120.
+
+ * Scripts/webkitpy/style/processors/cpp_unittest.py:
+ - Refactored unit tests as necessary to accommodate changes to cpp.py.
+ - Fixed bug in CppStyleTestBase.perform_include_what_you_use()
+ where the incorrect file extension was getting passed to
+ cpp_style.check_language().
+
+2010-01-28 Chris Jerdonek <cjerdonek@webkit.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ In check-webkit-style, eliminated the dependency of
+ processors/cpp_unittest.py on checker.py.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34205
+
+ * Scripts/webkitpy/style/checker.py:
+ - Addressed FIXME by removing STYLE_CATEGORIES data.
+ - Added style_categories().
+
+ * Scripts/webkitpy/style/checker_unittest.py:
+ - Minor changes.
+
+ * Scripts/webkitpy/style/processors/cpp.py:
+ - Added categories attribute to CppProcessor class (data
+ was originally checker.STYLE_CATEGORIES).
+
+ * Scripts/webkitpy/style/processors/cpp_unittest.py:
+ - Addressed FIXME by eliminating "import" from checker.py.
+
+2010-01-28 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Improve treatment of conditions and rest of the line for if, else, switch and alikes
+ https://bugs.webkit.org/show_bug.cgi?id=34173
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+
+2010-01-28 Joe Mason <jmason@rim.com>
+
+ Reviewed by Adam Barth.
+
+ Limit login retries to 5
+ https://bugs.webkit.org/show_bug.cgi?id=34193
+
+ * Scripts/webkitpy/bugzilla.py:
+
+2010-01-27 Martin Robinson <mrobinson@webkit.org>
+
+ Adding myself to the committer list. No review necessary.
+
+ * Scripts/webkitpy/committers.py:
+
+2010-01-27 George Wright <gwright@rim.com>
+
+ Reviewed by Adam Treat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34216
+
+ Add missing include for wtf/Platform.h
+
+ * DumpRenderTree/AccessibilityController.h:
+
+2010-01-27 Diego Gonzalez <diego.gonzalez@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] DRT Provide worker thread ability to track counters
+ https://bugs.webkit.org/show_bug.cgi?id=34221
+
+ Implement workerThreadCount() in LayoutTestController of Qt DRT
+
+ Tests:
+ fast/workers/dedicated-worker-lifecycle.html
+ fast/workers/shared-worker-frame-lifecycle.html
+ fast/workers/shared-worker-lifecycle.html
+ fast/workers/worker-lifecycle.html
+
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::workerThreadCount):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
+2010-01-27 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Rubberstamped by Simon Hausmann.
+
+ [Qt] QtLauncher refactoring:
+
+ Make the LauncherWindow depend less on the view, so that more
+ code can be shared in near future.
+
+ * QtLauncher/main.cpp:
+ (LauncherWindow::sendTouchEvent):
+ (LauncherWindow::loadFinished):
+ (LauncherWindow::zoomIn):
+ (LauncherWindow::zoomOut):
+ (LauncherWindow::resetZoom):
+ (LauncherWindow::toggleZoomTextOnly):
+ (LauncherWindow::dumpHtml):
+ (LauncherWindow::selectElements):
+ (LauncherWindow::setupUI):
+
+2010-01-27 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Correctly handle the KeyLocation argument that has been introduced
+ recently to test location-dependent key events in EventSender.keyDown.
+ http://bugs.webkit.org/show_bug.cgi?id=28247
+
+ Test: fast/events/keydown-numpad-keys.html
+
+ * DumpRenderTree/gtk/EventSender.cpp:
+ (keyDownCallback):
+
+2010-01-27 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Rubberstamped by Simon Hausmann.
+
+ [Qt] QtLauncher refactoring:
+
+ Move out code from the MainWindow (renamed to LauncherWindow)
+ that is not depending on the view, and add it to a new class
+ called MainWindow.
+
+ * QtLauncher/QtLauncher.pro:
+ * QtLauncher/main.cpp:
+ (LauncherWindow::LauncherWindow):
+ (LauncherWindow::eventFilter):
+ (LauncherWindow::loadStarted):
+ (LauncherWindow::loadFinished):
+ (LauncherWindow::newWindow):
+ (LauncherWindow::setupUI):
+ (WebPage::createWindow):
+ (main):
+ * QtLauncher/mainwindow.cpp: Added.
+ (MainWindow::MainWindow):
+ (MainWindow::buildUI):
+ (MainWindow::page):
+ (MainWindow::setAddressUrl):
+ (MainWindow::addCompleterEntry):
+ (MainWindow::load):
+ (MainWindow::changeLocation):
+ (MainWindow::openFile):
+ * QtLauncher/mainwindow.h: Added.
+
+2010-01-27 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Rubberstamped by Simon Hausmann.
+
+ [Qt] QtLauncher, coding style fixes.
+
+ * QtLauncher/main.cpp:
+ (MainWindow::MainWindow):
+ (MainWindow::sendTouchEvent):
+ (MainWindow::eventFilter):
+ (MainWindow::loadURL):
+ (MainWindow::setupUI):
+ (WebPage::createPlugin):
+
+2010-01-27 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Rubberstamped by Simon Hausmann.
+
+ [Qt] QtLauncher refactoring, separating the webview and
+ adding a QGraphicsWebView based version.
+
+ * QtLauncher/QtLauncher.pro:
+ * QtLauncher/main.cpp:
+ (MainWindow::MainWindow):
+ * QtLauncher/webpage.h:
+ * QtLauncher/webview.cpp: Added.
+ (createContextMenu):
+ (WebViewGraphicsBased::mousePressEvent):
+ (WebViewTraditional::mousePressEvent):
+ (WebViewGraphicsBased::contextMenuEvent):
+ (WebViewTraditional::contextMenuEvent):
+ * QtLauncher/webview.h: Added.
+ (WebViewGraphicsBased::WebViewGraphicsBased):
+ (WebViewTraditional::WebViewTraditional):
+
+2010-01-27 Alexander Pavlov <apavlov@chromium.org>
+
+ Adding myself as committer. No review necessary.
+
+ * Scripts/webkitpy/committers.py:
+
+2010-01-27 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ webkit-patch needs an open-bugs command
+ https://bugs.webkit.org/show_bug.cgi?id=30793
+
+ * Scripts/test-webkitpy: import OpenBugsTest
+ * Scripts/webkit-patch: import OpenBugs
+ * Scripts/webkitpy/commands/download_unittest.py: don't import unittest
+ * Scripts/webkitpy/commands/early_warning_system_unittest.py: ditto
+ * Scripts/webkitpy/commands/queries_unittest.py: ditto
+ * Scripts/webkitpy/commands/queues_unittest.py: ditto
+ * Scripts/webkitpy/commands/upload_unittest.py: ditto
+ * Scripts/webkitpy/mock_bugzillatool.py: log when user.open_url is called.
+
+2010-01-27 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Rubberstamped by Simon Hausmann
+
+ [Qt] QtLauncher refactoring, separating utility methods.
+
+ * QtLauncher/QtLauncher.pro:
+ * QtLauncher/main.cpp:
+ * QtLauncher/utils.cpp: Added.
+ (urlFromUserInput):
+ * QtLauncher/utils.h: Added.
+
+2010-01-27 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Rubberstamped by Simon Hausmann
+
+ [Qt] Refactor the code in the QtLauncher dealing with HTTP proxy.
+
+ * QtLauncher/main.cpp:
+ (MainWindow::MainWindow):
+ * QtLauncher/webpage.cpp:
+ (WebPage::WebPage):
+ (WebPage::applyProxy):
+ * QtLauncher/webpage.h:
+
+2010-01-26 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Corrects debug build of DumpRenderTree on Windows.
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+
+2010-01-26 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34070
+
+ Moves the try/catch for OSError exceptions in Executive.run_command
+ to Credentials.read_credentials() so that the unit test
+ webkitpy.scm_unittest.SCMClassTests.test_error_handlers can
+ assert that Executive.run_command throws an OSError exception.
+
+ * Scripts/webkitpy/credentials.py:
+ * Scripts/webkitpy/executive.py: Moved try/catch for OSError to
+ method Credentials.read_credentials().
+ * Scripts/webkitpy/executive_unittest.py: Removed tests that no longer
+ apply: test_run_command_with_bad_command_check_return_code and
+ test_run_command_with_bad_command_check_calls_error_handler. Added new
+ test to assert that run_command throws OSError exceptions.
+
+2010-01-26 Diego Gonzalez <diego.gonzalez@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] DRT WebHistory support
+ https://bugs.webkit.org/show_bug.cgi?id=34167
+
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::reset):
+ (LayoutTestController::webHistoryItemCount):
+ (LayoutTestController::keepWebHistory):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
+2010-01-26 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [Win] Add modifiers parameter support to Windows DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=34068
+
+ Add support for functional name modifiers; "addSelectionKey" and
+ "rangeSelectionKey", and modifiers parameter to eventSender.mouseDown()
+ and eventSender.mouseUp().
+ This change is similar to r53498 for Mac.
+
+ * DumpRenderTree/win/EventSender.cpp:
+ (buildModifierFlags): New function to set MK_CONTROL or MK_SHIFT to WPARAM.
+ (mouseDownCallback): Call buidlModifiersFlags().
+ (mouseUpCallback): ditto.
+ (keyDownCallback): Add support for "addSelectionkey" and "rangeSelectionKey".
+
+2010-01-26 Chris Jerdonek <cjerdonek@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ The Python autoinstall cache directory now only gets created
+ in the directory containing autoinstall.py.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33365
+
+ * Scripts/webkitpy/autoinstall.py:
+ - Also added a README file to the cache directory saying
+ where it came from.
+
+2010-01-26 Chris Jerdonek <cjerdonek@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Moved the check-webkit-style processors into a new
+ webkitpy/style/processors directory.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34060
+
+ * Scripts/webkitpy/style/checker.py:
+ * Scripts/webkitpy/style/checker_unittest.py:
+ * Scripts/webkitpy/style/cpp_style.py: Removed.
+ * Scripts/webkitpy/style/cpp_style_unittest.py: Removed.
+ * Scripts/webkitpy/style/processors: Added.
+ * Scripts/webkitpy/style/processors/__init__.py: Added.
+ * Scripts/webkitpy/style/processors/cpp.py: Copied from WebKitTools/Scripts/webkitpy/style/cpp_style.py.
+ * Scripts/webkitpy/style/processors/cpp_unittest.py: Copied from WebKitTools/Scripts/webkitpy/style/cpp_style_unittest.py.
+ * Scripts/webkitpy/style/processors/text.py: Copied from WebKitTools/Scripts/webkitpy/style/text_style.py.
+ * Scripts/webkitpy/style/processors/text_unittest.py: Copied from WebKitTools/Scripts/webkitpy/style/text_style_unittest.py.
+ * Scripts/webkitpy/style/text_style.py: Removed.
+ * Scripts/webkitpy/style/text_style_unittest.py: Removed.
+ * Scripts/webkitpy/style/unittests.py:
+
+2010-01-26 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix, make sure stub function returns a value.
+
+ * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+ (LayoutTestController::counterValueForElementById):
+
+2010-01-26 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Windows build references non-existent include paths
+ https://bugs.webkit.org/show_bug.cgi?id=34175
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+ * DumpRenderTree/win/ImageDiff.vcproj:
+ * DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj:
+
+2010-01-26 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Separating out the UrlLoader from the QtLauncher in it's
+ own implementation and header file.
+
+ * QtLauncher/main.cpp:
+ (main):
+ * QtLauncher/urlloader.cpp: Added.
+ (UrlLoader::UrlLoader):
+ (UrlLoader::loadNext):
+ (UrlLoader::init):
+ (UrlLoader::getUrl):
+ * QtLauncher/urlloader.h: Added.
+
+2010-01-25 Chris Jerdonek <cjerdonek@webkit.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Refactored check-webkit-style by removing the file path
+ parameter from the style error handler functions.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34031
+
+ * Scripts/webkitpy/style/checker.py:
+ - Added _default_style_error_handler() to StyleChecker class.
+ - Moved handle_style_error() to inside _default_style_error_handler().
+
+ * Scripts/webkitpy/style/checker_unittest.py:
+ - Removed file path from calls to error handler.
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ - Removed file path from calls to error handler.
+
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+ - Removed file path from calls to error handler.
+
+ * Scripts/webkitpy/style/text_style.py:
+ - Removed file path from calls to error handler.
+
+ * Scripts/webkitpy/style/text_style_unittest.py:
+ - Removed file path from calls to error handler.
+
+2010-01-25 Jeremy Orlow <jorlow@chromium.org>
+
+ Adding myself as reviewer. No review necessary.
+
+ * Scripts/webkitpy/committers.py:
+
+2010-01-25 Chris Jerdonek <cjerdonek@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Improved prepare-ChangeLog so that it preserves the relative
+ indentation of a git commit message.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34058
+
+ * Scripts/prepare-ChangeLog:
+ - Also adjusted the script so that it does not add white
+ space characters to empty lines.
+
+2010-01-24 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r53763.
+ http://trac.webkit.org/changeset/53763
+ https://bugs.webkit.org/show_bug.cgi?id=33895
+
+ Broke 20+ tests on Windows.
+
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2010-01-24 Adam Barth <abarth@webkit.org>
+
+ Rubber stamped by Eric Seidel.
+
+ More pep8 compliance.
+
+ * Scripts/webkitpy/mock_bugzillatool.py:
+
+2010-01-24 Adam Barth <abarth@webkit.org>
+
+ Rubber stamped by Eric Seidel.
+
+ More pep8 compliance.
+
+ * Scripts/webkitpy/executive.py:
+ * Scripts/webkitpy/grammar.py:
+
+2010-01-24 Adam Barth <abarth@webkit.org>
+
+ Rubber stamped by Eric Seidel.
+
+ More pep8 compliance.
+
+ * Scripts/webkitpy/comments.py:
+ * Scripts/webkitpy/committers.py:
+ * Scripts/webkitpy/credentials.py:
+
+2010-01-24 Adam Barth <abarth@webkit.org>
+
+ Rubber stamped by Eric Seidel.
+
+ Make changelogs.py pass pep8.
+
+ * Scripts/webkitpy/changelogs.py:
+
+2010-01-23 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ [Qt] Unreviewed build fix
+
+ * QtLauncher/QtLauncher.pro:
+ * QtLauncher/webinspector.h:
+
+2010-01-23 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Rubberstamped by Simon Hausmann.
+
+ [Qt] Move the WebInspector class to it's own header file.
+
+ * QtLauncher/main.cpp:
+ * QtLauncher/webinspector.h: Added.
+ (WebInspector::WebInspector):
+ (WebInspector::showEvent):
+ (WebInspector::hideEvent):
+
+2010-01-23 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Qt DRT: respect window.close() and window.closed()
+
+ Qt DRT needs to maintain a correct count of open windows
+ for windowCount(). It also needs to delete windows that
+ have been closed by window.close().
+
+ This fixes the following tests:
+
+ plugins/destroy-during-npp-new.html
+ fast/dom/Document/early-document-access.html
+ fast/dom/Window/window-early-properties.html
+ fast/events/open-window-from-another-frame.html
+ fast/events/popup-blocking-click-in-iframe.html
+
+ https://bugs.webkit.org/show_bug.cgi?id=32953
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::createWindow):
+ (WebCore::DumpRenderTree::windowCloseRequested):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::maybeDump):
+
+2010-01-23 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Added a user default for specifying a fallback frameworks path in case
+ the bundle does not contain frameworks for the current Mac OS X version.
+
+ * WebKitLauncher/main.m:
+ (fallbackMacOSXVersion): Added. Looks up the fallback version in a dictionary
+ keyed by the FallbackSystemVersions user default and returns it.
+ (main): If a frameworks directory for the current system version is not found,
+ try the fallback.
+
+2010-01-22 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Make run-webkit-tests work under Cygwin for the Qt port
+
+ setPathForRunningWebKitApp() is implemented for the Qt port
+ by using qmake to query for the location of the Qt libraries.
+
+ This requires the original environment (%ENV) to be untouched,
+ so launchWithCurrentEnv() was refactored to launchWithEnv(),
+ and the code in openDumpTool() to not use %ENV but a %CLEAN_ENV
+ instead. This has the added benefit of getting rid of the temp
+ variables used for storing the current env.
+
+ openDumpTool() is also refactored a bit into platform-spesific,
+ port-spesific, and generic environment variables.
+
+ Checks for undef was added a few places to fix Perl concat
+ warnings when run-webkit-tests is aborted.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33895
+
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2010-01-22 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ [wx] Remove the Bakefile build system, which is no longer being used.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34022
+
+ * DumpRenderTree/wx/DumpRenderTree.bkl: Removed.
+ * wx/browser/browser.bkl: Removed.
+ * wx/build-wxwebkit: Removed.
+
+2010-01-22 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Simon Fraser.
+
+ Reset zoom level to 1.0 when resetting view state. This is causing
+ many tests to fail after svg/custom/text-zoom.xhtml changes the
+ zoom level.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (resetDefaultsToConsistentValues):
+
+2010-01-22 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34025
+ Enable client-based Geolocation abstraction for Mac, Windows AppleWebKit targets.
+
+ * Scripts/build-webkit:
+
+2010-01-22 Adam Barth <abarth@webkit.org>
+
+ Unreviewed. Arg. Someone renamed limit to output_limit on me.
+
+ * Scripts/webkitpy/commands/queues.py:
+
+2010-01-22 Adam Barth <abarth@webkit.org>
+
+ Rubber stamped by Eric Seidel.
+
+ Make __init__.py and buildbot.py pass pep8 style checker.
+
+ * Scripts/webkitpy/__init__.py:
+ * Scripts/webkitpy/buildbot.py:
+
+2010-01-21 Joe Mason <jmason@rim.com>
+
+ Reviewed by Adam Barth.
+
+ webkit-patch should retry on invalid password
+ https://bugs.webkit.org/show_bug.cgi?id=33955
+
+ Ask for bugs.webkit.org authentication in a loop.
+
+ * Scripts/webkitpy/bugzilla.py:
+
+2010-01-22 Adam Barth <abarth@webkit.org>
+
+ Unreviewed. Don't call seek on a NoneType.
+
+ * Scripts/webkitpy/statusserver.py:
+
+2010-01-22 Petri Latvala <petri.latvala@nomovok.com>
+
+ Reviewed by David Levin.
+
+ check-webkit-style breaks on files with unknown types
+ https://bugs.webkit.org/show_bug.cgi?id=34001
+
+ For files with type FileType.NONE, dispatch_processor returns None.
+
+ * Scripts/webkitpy/style/checker.py: Don't call process_file with a processor of value None.
+
+2010-01-22 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Make bugzilla.py and webkitport.py conform to pep8
+ https://bugs.webkit.org/show_bug.cgi?id=34015
+
+ This patch makes webkitport.py and bugzilla.py mostly conform to PEP8
+ style as enforced by pep8.py. I wasn't able to get rid of all the
+ errors because I'm not sure how to wrap some lines properly. Also,
+ there are a few deprication errors that I couldn't resolve easily.
+ However, this is a massive improvement in compliance.
+
+ * Scripts/webkitpy/bugzilla.py:
+ * Scripts/webkitpy/webkitport.py:
+
+2010-01-22 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Limit length of EWS results to 5MB
+ https://bugs.webkit.org/show_bug.cgi?id=34016
+
+ Hopefully this will fix the bug where the results link doesn't appear.
+ Our current theory is that the results blob is too big and the server
+ is rejecting the request with a 500 error. That causes us to re-try
+ the post, but when we re-try the StringIO buffer has its seek pointer
+ at the end.
+
+ * Scripts/webkitpy/commands/queues.py:
+ * Scripts/webkitpy/statusserver.py:
+
+2010-01-22 Chris Jerdonek <cjerdonek@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Made check-webkit-style able to check patches when script not
+ run from source root. Also consolidated external references
+ to a single file.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33791
+
+ * Scripts/check-webkit-style:
+ - Changed to import style_references.py.
+
+ * Scripts/webkitpy/style/__init__.py:
+ - Removed __path__ hack that allowed searching Scripts/ directory.
+
+ * Scripts/webkitpy/style/checker.py:
+ - Changed to import style_references.py.
+
+ * Scripts/webkitpy/style_references.py: Added.
+
+2010-01-22 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix the leak of ThreadIdentifiers in threadMap across threads.
+ https://bugs.webkit.org/show_bug.cgi?id=32689
+
+ Add a new test to verify the ThreadIdentifiers are not reused across threads.
+ The test runs in the beginning of DumpRenderTree and spawns 2 non-WTF treads sequentially,
+ waiting for the previous thread to terminate before starting the next.
+ The treads use WTF::currentThread() in their thread function. Without a fix, this
+ causes both threads to have the same ThreadIdentifier which triggers ASSERT in thread function.
+ It also starts another thread using WTF. Without the fix, this finds pthread handle from previous
+ threads in the WTF threadMap and asserts in WTF::establishIdentifierForPthreadHandle().
+ The test practically does not affect the DRT run time because the threads end immediately.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (runThread): Test thread function.
+ (testThreadIdentifierMap):
+ (dumpRenderTree):
+
+2010-01-22 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix a bug that mouseDown:withModifiers: is never called.
+ https://bugs.webkit.org/show_bug.cgi?id=33989
+
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (+[EventSendingController isSelectorExcludedFromWebScript:]):
+ (+[EventSendingController webScriptNameForSelector:]):
+
+2010-01-22 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Rubberstamped by Antti Koivisto.
+
+ [Qt] Separate out the WebPage class into it's own
+ cpp/header files. Also, removed the assumption that
+ the view is a QWebView, in preparation of a merger
+ of the two Qt WebKit launchers.
+
+ * QtLauncher/QtLauncher.pro:
+ * QtLauncher/main.cpp:
+ (WebView::mousePressEvent):
+ * QtLauncher/webpage.cpp: Added.
+ (WebPage::supportsExtension):
+ (WebPage::extension):
+ (WebPage::acceptNavigationRequest):
+ (WebPage::openUrlInDefaultBrowser):
+ * QtLauncher/webpage.h: Added.
+ (WebPage::WebPage):
+
+2010-01-21 Chris Jerdonek <cjerdonek@webkit.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Refactored to move file name and file-reading related code
+ from cpp_style.py and text_style.py to checker.py.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33775
+
+ * Scripts/check-webkit-style:
+ - Updates caused by changes to checker.py.
+
+ * Scripts/webkitpy/style/checker.py:
+ - Added SKIPPED_FILES_WITH_WARNING list.
+ - Added SKIPPED_FILES_WITHOUT_WARNING list.
+ - Added FileType class.
+ - Added ProcessorDispatcher class.
+ - In StyleChecker class:
+ - Renamed process_patch() to check_patch().
+ - Renamed process_file() to check_file().
+ - Added _process_file().
+ - Related refactoring.
+ - Addressed check_patch() FIXME to share code with process_file().
+
+ * Scripts/webkitpy/style/checker_unittest.py:
+ - Added ProcessorDispatcherSkipTest class.
+ - Added ProcessorDispatcherDispatchTest class.
+ - Added StyleCheckerCheckFileTest class.
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ - Renamed process_file_data() to _process_lines.
+ - Removed process_file() (moved logic to checker.py).
+ - Removed can_handle() (moved logic to checker.py).
+ - Added CppProcessor class.
+ - Removed is_exempt() (moved logic to checker.py).
+ - Added process_file_data() back as a wrapper function.
+
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+ - Removed test_can_handle().
+ - Removed test_is_exempt().
+ - Added CppProcessorTest class.
+
+ * Scripts/webkitpy/style/text_style.py:
+ - Added TextProcessor class.
+ - Removed process_file().
+ - Removed can_handle().
+
+ * Scripts/webkitpy/style/text_style_unittest.py:
+ - Removed test_can_handle().
+ - Added TextProcessorTest class.
+
+2010-01-21 Chris Jerdonek <cjerdonek@webkit.org>
+
+ Reviewed by David Kilzer.
+
+ Create a unit-tested subroutine to parse patch files created
+ by svn-create-patch.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33475
+
+ * Scripts/VCSUtils.pm:
+ - Added parseDiff().
+ - Added parsePatch().
+
+ * Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl: Added.
+ - Added unit tests for parseDiff().
+
+ * Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl:
+ - Total number of tests now computed dynamically.
+
+ * Scripts/webkitperl/VCSUtils_unittest/parsePatch.pl: Added.
+ - Added unit tests for parsePatch().
+
+2010-01-21 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix, add new directory to dir list.
+
+ * wx/build/settings.py:
+
+2010-01-21 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Make the EWS transactional
+ https://bugs.webkit.org/show_bug.cgi?id=33978
+
+ Now if the EWS gets interrupted in the middle of processing a patch,
+ the bots will re-process the patch.
+
+ * Scripts/test-webkitpy:
+ * Scripts/webkitpy/commands/queues.py:
+ * Scripts/webkitpy/commands/queues_unittest.py:
+ * Scripts/webkitpy/patchcollection.py:
+ * Scripts/webkitpy/patchcollection_unittest.py: Added.
+
+2010-01-21 Adam Barth <abarth@webkit.org>
+
+ Unreviewed. Add missing "ago" for style in the status bubble.
+
+ * QueueStatusServer/templates/statusbubble.html:
+
+2010-01-21 Adam Barth <abarth@webkit.org>
+
+ Reviewed by David Levin.
+
+ [style-queue] should not complain about identifier names with underscores under WebKit/gtk/webkit/
+ https://bugs.webkit.org/show_bug.cgi?id=33356
+
+ White list unix_hacker_style names in WebKit/gtk/webkit because these
+ are used in the GTK+ API.
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+
+2010-01-21 Diego Gonzalez <diego.gonzalez@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] add setDomainRelaxationForbiddenForURLScheme in Qt DRT
+ https://bugs.webkit.org/show_bug.cgi?id=33945
+
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
+2010-01-21 Simon Hausmann <simon.hausmann@nokia.com>
+
+ No review, rolling out 53615 as it causes two
+ crashes on the bot.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::createWindow):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::maybeDump):
+
+2010-01-21 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by Simon Hausmann.
+
+ Qt DRT: respect window.close() and window.closed()
+
+ Qt DRT needs to maintain a correct count of open windows
+ for windowCount(). It also needs to delete windows that
+ have been closed by window.close().
+
+ This fixes the following tests:
+
+ plugins/destroy-during-npp-new.html
+ fast/dom/Document/early-document-access.html
+ fast/dom/Window/window-early-properties.html
+ fast/events/open-window-from-another-frame.html
+ fast/events/popup-blocking-click-in-iframe.html
+
+ https://bugs.webkit.org/show_bug.cgi?id=32953
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::createWindow):
+ (WebCore::DumpRenderTree::windowCloseRequested):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::maybeDump):
+
+2010-01-20 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r53593.
+ http://trac.webkit.org/changeset/53593
+ https://bugs.webkit.org/show_bug.cgi?id=33496
+
+ Re-rollout this patch, the commit-queue should not have landed
+ it again, but it did due to land-diff and rollout both not
+ clearing flags.
+
+ * Scripts/webkitpy/commands/early_warning_system.py:
+ * Scripts/webkitpy/commands/queues.py:
+ * Scripts/webkitpy/queueengine.py:
+ * Scripts/webkitpy/scm.py:
+ * Scripts/webkitpy/scm_unittest.py:
+
+2010-01-20 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ webkit-commit-queue status page is confusing
+ https://bugs.webkit.org/show_bug.cgi?id=33496
+
+ This should improve the status page by removing more Fail messages.
+ To do this, I re-factored the CommitQueue and the AbstractReviewQueues
+ to behave more like one another. This meant moving where the failure reporting was done.
+ Previously the AbstractReviewQueue always used the parent process to report the error,
+ while CommitQueue used the subprocess when possible, and the parent only reported errors
+ that we didn't know how to handle (bugs in the commit-queue itself).
+ Now the AbstractReviewQueue follow's the commit-queue's model. This got rid of a try-block
+ in both implementations and required teaching handle_script_error in each to post Fail messages
+ to the status server instead of calling exit(1).
+
+ This will also make the style-queue share more bug posting logic with other queues:
+ https://bugs.webkit.org/show_bug.cgi?id=33871
+
+ * Scripts/webkitpy/commands/early_warning_system.py:
+ - Don't exit(1) as that will cause the calling queue to also report Fail to the status server.
+ Implementors of handle_script_error are expected to update the status server if needed, but only exit if the error could not be handled.
+ So we instead pass patch_has_failed_this_queue=True to _update_status_for_script_error in the case that this was a real failure.
+ _update_status_for_script_error knows how to post the Fail message to the status server.
+ - Teach _update_status_for_script_error how to post Fail messages to the status server.
+ * Scripts/webkitpy/commands/queues.py:
+ - Remove the try block from process_work_item since the caller already has one.
+ - Only CC watchers on failure to cut down on commit-queue generated mail.
+ - handle_unexpected_error needs to mark _did_fail now that the try block is gone from process_work_item.
+ - Abstract _format_script_error_output_for_bug to share code between all queues.
+ - The new _format_script_error_output_for_bug allows the style-queue to share the posting limit with other queues, as well as support linking to the full output.
+ - Rename _can_build_and_test to _current_checkout_builds_and_passes_tests to better explain what revision it's testing.
+ - Move logging out of _can_build_and_test and make the logs explain what revision we're testing.
+ - handle_script_error now posts Fail instead of the try block in process_work_item handling it.
+ * Scripts/webkitpy/queueengine.py:
+ - QueueEngine is no longer used just by the commit-queue, update the logging to say "processing" instead of landing.
+ * Scripts/webkitpy/scm.py:
+ - Add new checkout_revision function.
+ * Scripts/webkitpy/scm_unittest.py:
+ - Test our new checkout_revision function.
+
+2010-01-20 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ WebSocket: Missing Request-URI, when no tralling slash in host
+ https://bugs.webkit.org/show_bug.cgi?id=33689
+
+ Update pywebsocket to 0.4.7.1, which supports alias for resource
+ name, so that we could test for ws://127.0.0.1:8880
+
+ * Scripts/run-webkit-tests:
+ * Scripts/run-webkit-websocketserver:
+ * pywebsocket/mod_pywebsocket/dispatch.py:
+ * pywebsocket/mod_pywebsocket/handshake.py:
+ * pywebsocket/mod_pywebsocket/standalone.py:
+ * pywebsocket/setup.py:
+ * pywebsocket/test/test_dispatch.py:
+ * pywebsocket/test/test_handshake.py:
+
+2010-01-20 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r53537.
+ http://trac.webkit.org/changeset/53537
+ https://bugs.webkit.org/show_bug.cgi?id=33496
+
+ Added a failure condition to the commit-queue and looks to
+ have broken the EWS bots
+
+ * Scripts/webkitpy/commands/early_warning_system.py:
+ * Scripts/webkitpy/commands/queues.py:
+ * Scripts/webkitpy/queueengine.py:
+ * Scripts/webkitpy/scm.py:
+ * Scripts/webkitpy/scm_unittest.py:
+
+2010-01-20 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: accSelect() is not implemented
+
+ https://bugs.webkit.org/show_bug.cgi?id=33918
+ <rdar://problem/7436861>
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (takeFocusCallback):
+ Call the object's takeFocus() function.
+ (takeSelectionCallback):
+ Call its takeSelection() function.
+ (addSelectionCallback):
+ Call its addSelection() function.
+ (removeSelectionCallback):
+ Call its removeSelection() function.
+ (AccessibilityUIElement::getJSClass):
+ Add new functions to the JS class definition.
+
+ * DumpRenderTree/AccessibilityUIElement.h:
+ Declare new functions.
+
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::takeFocus):
+ Stubbed.
+ (AccessibilityUIElement::takeSelection):
+ Stubbed.
+ (AccessibilityUIElement::addSelection):
+ Stubbed.
+ (AccessibilityUIElement::removeSelection):
+ Stubbed.
+
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::takeFocus):
+ Stubbed.
+ (AccessibilityUIElement::takeSelection):
+ Stubbed.
+ (AccessibilityUIElement::addSelection):
+ Stubbed.
+ (AccessibilityUIElement::removeSelection):
+ Stubbed.
+
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::takeFocus):
+ Call the object's accSelect() function, passing the appropriate flag.
+ (AccessibilityUIElement::takeSelection):
+ Ditto.
+ (AccessibilityUIElement::addSelection):
+ Ditto.
+ (AccessibilityUIElement::removeSelection):
+ Ditto.
+
+2010-01-20 Andras Becsi <abecsi@inf.u-szeged.hu>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Extract Apache handling to httpd.pm module and use the provided functionality
+ in scripts where Apache is needed.
+ The module httpd.pm stores the PID of Apache in a variable and cleans up
+ the PID directory after Apache properly shut down. Catching INT and TERM
+ signals allows the scripts to close Apache and clean up its PID directory
+ even if the testing was interrupted.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33153
+
+ * Scripts/webkitperl/httpd.pm: Added.
+ * Scripts/run-iexploder-tests:
+ * Scripts/run-webkit-httpd:
+ * Scripts/run-webkit-tests:
+
+2010-01-20 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Make DumpRenderTree build on Windows
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ * DumpRenderTree/qt/main.cpp:
+
+2010-01-20 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Fix commit bot to land patches in order of the bug last modification date.
+ https://bugs.webkit.org/show_bug.cgi?id=33395
+
+ * Scripts/webkitpy/bugzilla.py: Modified. Added 'order=Last+Changed' to bugzilla commit queue URL.
+
+2010-01-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Teach check-webkit-style about WebKit/gtk/tests
+ https://bugs.webkit.org/show_bug.cgi?id=33892
+
+ Removes false positives found in
+ https://bugs.webkit.org/show_bug.cgi?id=30883
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+
+2010-01-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Teach check-webkit-style about QGVLauncher
+ https://bugs.webkit.org/show_bug.cgi?id=33890
+
+ Remove false positives found in
+ https://bugs.webkit.org/show_bug.cgi?id=33708
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+
+2010-01-20 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ webkit-commit-queue status page is confusing
+ https://bugs.webkit.org/show_bug.cgi?id=33496
+
+ This should improve the status page by removing more Fail messages.
+ To do this, I re-factored the CommitQueue and the AbstractReviewQueues
+ to behave more like one another. This meant moving where the failure reporting was done.
+ Previously the AbstractReviewQueue always used the parent process to report the error,
+ while CommitQueue used the subprocess when possible, and the parent only reported errors
+ that we didn't know how to handle (bugs in the commit-queue itself).
+ Now the AbstractReviewQueue follow's the commit-queue's model. This got rid of a try-block
+ in both implementations and required teaching handle_script_error in each to post Fail messages
+ to the status server instead of calling exit(1).
+
+ This will also make the style-queue share more bug posting logic with other queues:
+ https://bugs.webkit.org/show_bug.cgi?id=33871
+
+ * Scripts/webkitpy/commands/early_warning_system.py:
+ - Don't exit(1) as that will cause the calling queue to also report Fail to the status server.
+ Implementors of handle_script_error are expected to update the status server if needed, but only exit if the error could not be handled.
+ So we instead pass patch_has_failed_this_queue=True to _update_status_for_script_error in the case that this was a real failure.
+ _update_status_for_script_error knows how to post the Fail message to the status server.
+ - Teach _update_status_for_script_error how to post Fail messages to the status server.
+ * Scripts/webkitpy/commands/queues.py:
+ - Remove the try block from process_work_item since the caller already has one.
+ - Only CC watchers on failure to cut down on commit-queue generated mail.
+ - handle_unexpected_error needs to mark _did_fail now that the try block is gone from process_work_item.
+ - Abstract _format_script_error_output_for_bug to share code between all queues.
+ - The new _format_script_error_output_for_bug allows the style-queue to share the posting limit with other queues, as well as support linking to the full output.
+ - Rename _can_build_and_test to _current_checkout_builds_and_passes_tests to better explain what revision it's testing.
+ - Move logging out of _can_build_and_test and make the logs explain what revision we're testing.
+ - handle_script_error now posts Fail instead of the try block in process_work_item handling it.
+ * Scripts/webkitpy/queueengine.py:
+ - QueueEngine is no longer used just by the commit-queue, update the logging to say "processing" instead of landing.
+ * Scripts/webkitpy/scm.py:
+ - Add new checkout_revision function.
+ * Scripts/webkitpy/scm_unittest.py:
+ - Test our new checkout_revision function.
+
+2010-01-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Exempt JavaScriptCore/qt/api from style checks
+ https://bugs.webkit.org/show_bug.cgi?id=33879
+
+ Apparently there is a JavaScriptCore API for Qt as well as a WebKit
+ API.
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+
+2010-01-19 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Don't use QSocketNotifier in the DRT for reading stdin
+
+ QSocketNotifier is not available on Windows. Instead we read
+ stdin synchronously after each test using signals and slots.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ * DumpRenderTree/qt/main.cpp:
+
+2010-01-19 Adam Barth <abarth@webkit.org>
+
+ Rubber stamped by Eric Seidel.
+
+ Move chromium-ews back to building release only to make the EWS faster.
+
+ * Scripts/webkitpy/commands/early_warning_system.py:
+
+2010-01-17 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: The child <option> elements of a non-multiple <select> are not
+ exposed
+
+ https://bugs.webkit.org/show_bug.cgi?id=33773
+ <rdar://problem/7550556>
+
+ Reviewed by Alice Liu.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (getIsVisibleCallback):
+ Call the object's isVisible() function.
+ (getIsOffScreenCallback):
+ Ditto, for isOffScreen().
+ (getIsCollapsedCallback):
+ Ditto, for isCollapsed().
+ (getHasPopupCallback):
+ Ditto, for hasPopup().
+ (AccessibilityUIElement::getJSClass):
+ Add isVisible and isOffScreen attributes.
+
+ * DumpRenderTree/AccessibilityUIElement.h:
+ Declare new functions.
+
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::isVisible):
+ Stubbed.
+ (AccessibilityUIElement::isOffScreen):
+ Stubbed.
+ (AccessibilityUIElement::isCollapsed):
+ Stubbed.
+ (AccessibilityUIElement::hasPopup):
+ Stubbed.
+
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::isVisible):
+ Stubbed.
+ (AccessibilityUIElement::isOffScreen):
+ Stubbed.
+ (AccessibilityUIElement::isCollapsed):
+ Stubbed.
+ (AccessibilityUIElement::hasPopup):
+ Stubbed.
+
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::showMenu):
+ Call the object's accDoDefaultAction() to show its popup menu.
+ (AccessibilityUIElement::isEnabled):
+ Check that the object does not have the "unavailable" state.
+ (AccessibilityUIElement::isVisible):
+ Check that the object does not have the "invisible" state.
+ (AccessibilityUIElement::isOffScreen):
+ Check whether the object has the "offscreen" state.
+ (AccessibilityUIElement::isCollapsed):
+ Check whether the object has the "collapsed" state.
+ (AccessibilityUIElement::hasPopup):
+ Check whether the object has the "has popup" state.
+
+2010-01-19 Victor Wang <victorw@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Correct committer name.
+ https://bugs.webkit.org/show_bug.cgi?id=33868
+
+ * Scripts/webkitpy/committers.py:
+
+2010-01-19 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ [DRT][Mac] Add modifiers parameter to eventSender.mouseDown() and eventSender.mouseUp()
+ https://bugs.webkit.org/show_bug.cgi?id=33783
+
+ Some listbox tests check selection behavior by click events with
+ "meta" or "shift" keys. Behaviors for such modifier keys are
+ platform-dependent. The new parameter of mouseDown() and mouseUp()
+ allows to specify not only concrete modifier keys such as
+ "shiftKey" "metaKey", but also functional names like
+ "addSelectionKey" "rangeSelectionKey".
+
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (+[EventSendingController isSelectorExcludedFromWebScript:]):
+ (+[EventSendingController webScriptNameForSelector:]):
+ (buildModifierFlags):
+ (-[EventSendingController mouseDown:withModifiers:]):
+ (-[EventSendingController mouseDown:]):
+ (-[EventSendingController mouseUp:withModifiers:]):
+ (-[EventSendingController mouseUp:]):
+ (-[EventSendingController keyDown:withModifiers:withLocation:]):
+
+2010-01-19 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Unbreak --request-commit
+ https://bugs.webkit.org/show_bug.cgi?id=33832
+
+ * Scripts/webkitpy/bugzilla.py:
+
+2010-01-19 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ validate-committer-lists throws exception and committers.py needs a refresh
+ https://bugs.webkit.org/show_bug.cgi?id=33831
+
+ * Scripts/validate-committer-lists: use webkit_logging
+ * Scripts/webkitpy/committers.py: Add recently minted committers. Fix Simon Hausmanns email address list to include his webkit-committers@lists address.
+
+2010-01-18 Adam Roben <aroben@apple.com>
+
+ Add LayoutTestController support for calling new WebKit SPI to
+ disallow setting document.domain
+
+ DRT part of fixing <http://webkit.org/b/33806>
+ <rdar://problem/7552837> Would like API to disallow setting of
+ document.domain for pages with certain URL schemes
+
+ Reviewed by Sam Weinig.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (setDomainRelaxationForbiddenForURLSchemeCallback): Added. Calls
+ through to LayoutTestController.
+ (LayoutTestController::staticFunctions): Added
+ setDomainRelaxationForbiddenForURLScheme.
+
+ * DumpRenderTree/LayoutTestController.h: Added
+ setDomainRelaxationForbiddenForURLScheme.
+
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
+ Added. Calls through to WebKit.
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
+ * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+ (LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
+ Stubbed out.
+
+2010-01-18 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Rename patches-to-commit to patches-in-commit-queue
+ https://bugs.webkit.org/show_bug.cgi?id=33789
+
+ The command really lists the patches in the commit-queue not all the
+ patches that are pending-commit (as the FIXME commands).
+
+ * Scripts/webkitpy/commands/queries.py:
+ * Scripts/webkitpy/commands/queries_unittest.py:
+
+2010-01-18 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Force qmake to generate a single makefile for DerivedSources.pro
+
+ * Scripts/webkitdirs.pm:
+
+2010-01-18 Adam Roben <aroben@apple.com>
+
+ Clean up use of /useenv when invoking Visual C++
+
+ This change reverts things to their pre-r49485 state. That revision
+ (and, subsequently, r49664 and r51788) started passing /useenv to
+ Visual C++, even in cases where we don't want to do so (such as when
+ invoking Visual C++ Express), in the name of making the Chromium build
+ work. Now that Chromium isn't using buildVisualStudioProject or
+ pdevenv, we can put things back they way they were.
+
+ Fixes <http://webkit.org/b/33797> build-webkit fails with VC++ Express
+ (due to /useenv flag)
+
+ Reviewed by Sam Weinig.
+
+ * Scripts/pdevenv: Always pass /useenv. Chromium doesn't use this
+ script anymore.
+ * Scripts/webkitdirs.pm:
+ (buildVisualStudioProject): Never pass /useenv anymore. pdevenv takes
+ care of this itself, and we don't want to pass /useenv when not using
+ pdevenv (e.g., when using VC++ Express, because that will cause it to
+ ignore the Platform SDK).
+
+2010-01-18 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ webkit-patch land-safely should obsolete old patches
+ https://bugs.webkit.org/show_bug.cgi?id=33788
+
+ When posting a commit-queue+ patch with land-safely, we should
+ obsolete the old patches on the bug. They're really confusing
+ because the main use case is to address reviewer feedback on a
+ previous patch.
+
+ * Scripts/webkitpy/commands/upload.py:
+ * Scripts/webkitpy/commands/upload_unittest.py:
+
+2010-01-18 Adam Barth <abarth@webkit.org>
+
+ Reviewed by David Levin.
+
+ webkit-patch should authenticate more often
+ https://bugs.webkit.org/show_bug.cgi?id=33701
+
+ This makes it easier to work with security patches.
+
+ * Scripts/webkitpy/bugzilla.py:
+
+2010-01-18 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ style checker needs to know about GObject-specific requirements
+ inside WebCore/bindings/gobject/
+ https://bugs.webkit.org/show_bug.cgi?id=33606
+
+ Add an exception to the underscore rule for certain
+ GObject-specific names.
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+
+2010-01-18 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ [check-webkit-style] does understand ResourceHandleWin.h
+ https://bugs.webkit.org/show_bug.cgi?id=32975
+
+ I'm not 100% convinced this fix is correct, but without more examples,
+ it's hard to generalize. We can always generalize the fix in the
+ future.
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+
+2010-01-18 Adam Barth <abarth@webkit.org>
+
+ Unreviewed "build" fix.
+
+ * Scripts/webkitpy/bugzilla.py:
+
+2010-01-18 Adam Barth <abarth@webkit.org>
+
+ Unreviewed. Actually make land-safely mark commit-queue+ as
+ discussed with Eric.
+
+ * Scripts/webkitpy/bugzilla.py:
+ * Scripts/webkitpy/steps/postdiffforcommit.py:
+
+2010-01-17 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ style-queue complains about one-line macros that include multiple statements
+ https://bugs.webkit.org/show_bug.cgi?id=33173
+
+ Add an exception for multiple statements on a line that starts a macro.
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+
+2010-01-17 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ [check-webkit-style] qt unit testing false positives
+ https://bugs.webkit.org/show_bug.cgi?id=32833
+
+ Exempt the Qt API and unit tests from the style checker.
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+
+2010-01-17 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ style-check script reports loads of errors on gtk2drawing.c
+ https://bugs.webkit.org/show_bug.cgi?id=33771
+
+ Exempt WebCore/platform/gtk/gtk2drawing.c and
+ WebCore/platform/gtk/gtk2drawing.h from style checks.
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+
+2010-01-17 Chris Jerdonek <cjerdonek@webkit.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Finished eliminating _cpp_style_state global state variable from
+ check-webkit-style code and eliminating _CppStyleState class.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33764
+
+ * Scripts/webkitpy/style/checker.py:
+ - Minor updates caused by changes to cpp_style.py.
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ - Removed _CppStyleState class.
+ - Removed verbose_level functions.
+ - Added verbosity as a parameter to _FunctionState constructor.
+ - Added verbosity as a parameter to process_file().
+ - Added verbosity as a parameter to process_file_data().
+
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+ - Added helper functions to set verbosity while running tests.
+
+2010-01-17 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ check-webkit-style underscore check should be disabled for Qt methods starting with qt_
+ https://bugs.webkit.org/show_bug.cgi?id=33663
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+
+2010-01-17 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ style-queue complains about missing #include of config.h for non-WebCore projects
+ https://bugs.webkit.org/show_bug.cgi?id=33170
+
+ WebKitAPITests are consumers of the WebKit API and therefore do not
+ need to follow the same include discipline as the rest of WebKit. This
+ patch exempts them from the include checks.
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+
+2010-01-17 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ EWS (Early Warning Systems) should build both debug and release
+ https://bugs.webkit.org/show_bug.cgi?id=33681
+
+ Build both debug and release for chromium-ews.
+
+ * Scripts/webkitpy/commands/early_warning_system.py:
+
+2010-01-17 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ style-queue should include instructions for how to file bugs against check-webkit-style
+ https://bugs.webkit.org/show_bug.cgi?id=32345
+
+ Added some text to the error message asking folks to file bugs against
+ false positives.
+
+ * Scripts/webkitpy/commands/queues.py:
+
+2010-01-17 Chris Jerdonek <cjerdonek@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Eliminated the error_count global variable and related
+ check-webkit-style refactoring.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33678
+
+ * Scripts/check-webkit-style:
+ - Updated to use webkit_argument_defaults().
+ - Renamed styleChecker to style_checker.
+
+ * Scripts/webkitpy/style/checker.py:
+ - Prefixed the three default arguments with WEBKIT_DEFAULT.
+ - Added webkit_argument_defaults().
+ - Added default filter_rules parameter to CategoryFilter constructor.
+ - Added __ne__() to CategoryFilter class.
+ - Added __eq__() and __ne__() to ProcessorOptions class.
+ - Added error_count and _write_error attributes to StyleChecker class.
+ - Made StyleChecker._handle_error() increment the error count.
+
+ * Scripts/webkitpy/style/checker_unittest.py:
+ - Improved CategoryFilterTest.test_eq().
+ - Added CategoryFilterTest.test_ne().
+ - Added test_eq() and test_ne() to ProcessorOptionsTest class.
+ - Updated unit tests to use webkit_argument_defaults().
+ - Added StyleCheckerTest class.
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ - Removed references to global error_count.
+
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+ - Removed CppStyleStateTest class.
+
+2010-01-15 Jon Honeycutt <jhoneycutt@apple.com>
+
+ get_accParent should try to retrieve parent AccessibilityObject, before
+ calling upon window
+
+ https://bugs.webkit.org/show_bug.cgi?id=22893
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::parentElement):
+ Get the object's parent. Query it for IAccessible, and return it.
+
+2010-01-16 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ <rdar://problem/7529519> DumpRenderTree crashes in makeLargeMallocFailSilently()
+
+ * DumpRenderTree/mac/CheckedMalloc.cpp:
+ (makeLargeMallocFailSilently): Temporarily allow writing to the default
+ malloc zone structure while modifying it.
+
+2010-01-16 David Kilzer <ddkilzer@apple.com>
+
+ Added back removed properties to iExploder input files
+
+ While the update-iexploder-cssproperties script works great to
+ add new properties, it has the side-effect of removing old
+ properties that once were parsed.
+
+ * iExploder/htdocs/cssproperties.in: Added back removed
+ properties into their own section.
+ * iExploder/htdocs/htmlattrs.in: Ditto.
+
+2010-01-16 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by David Kilzer.
+
+ Update iExploder/htdocs/*.in by running update-iexploder-cssproperties
+ https://bugs.webkit.org/show_bug.cgi?id=33756
+
+ * iExploder/htdocs/cssproperties.in: New CSS attributes
+ * iExploder/htdocs/htmlattrs.in: New HTML attributes
+ * iExploder/htdocs/htmltags.in: New HTML tags
+
+2010-01-15 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by David Kilzer.
+
+ Altered parseDiffHeader() to skip unrecognized lines and
+ other minor clean-ups.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33476
+
+ * Scripts/VCSUtils.pm:
+ - Changed parseDiffHeader() as follows:
+ - Skips over unrecognized lines.
+ - Addressed FIXME to remove substitution for "diff" line.
+ - Renamed "version" header hash key to "sourceRevision".
+ - Eliminated "copiedFromVersion" header hash key.
+ - Included "sourceRevision" also for copied files.
+ - Checks that copy revision number matches "sourceRevision".
+ - No longer returns $foundHeaderEnding.
+ - Dies if header ending not found.
+ - Diff header dividing line now always added.
+
+ * Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl:
+ - Made necessary changes in parseDiffHeader() unit tests.
+ - Shortened the file paths in some test cases.
+
+2010-01-14 Yuzo Fujishima <yuzo@google.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Update pywebsocket to 0.4.6
+ https://bugs.webkit.org/show_bug.cgi?id=32299
+ The newer pywebsocket can handle more simultaneous connections.
+
+ * pywebsocket/mod_pywebsocket/handshake.py:
+ * pywebsocket/mod_pywebsocket/standalone.py:
+ * pywebsocket/setup.py:
+ * pywebsocket/test/test_handshake.py:
+
+2010-01-14 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ REGRESSION(53133): commit-queue no longer rejects patches with invalid committers, instead it hangs
+ https://bugs.webkit.org/show_bug.cgi?id=33638
+
+ * Scripts/webkitpy/bugzilla.py:
+ - Add Bug.id() to match Attachment.id()
+ - Give Bug.reviewed_patches and commit_queued_patches the option to return patches with invalid committers/reviewers.
+ - Add back a missing variable to _validate_setter_email found by the new unit tests!
+ * Scripts/webkitpy/commands/queries.py:
+ - Add FIXMEs about the commands being confusingly named.
+ * Scripts/webkitpy/commands/queries_unittest.py:
+ - Update results to reflect the newly restructured mock bug cache.
+ * Scripts/webkitpy/commands/queues.py:
+ - Add a new _validate_patches_in_commit_queue method (this is what fixes the regression).
+ - Add a FIXME about eventually sorting the patches into some order.
+ * Scripts/webkitpy/commands/queues_unittest.py:
+ - Update results now that with the newly restructure mock bug cache we're testing cq+'d patches with an invalid committer.
+ * Scripts/webkitpy/commands/upload_unittest.py:
+ - Update results to match the newly restructured mock bug cache.
+ * Scripts/webkitpy/mock_bugzillatool.py:
+ - Restructure fetch_ methods to not use a manual list of ids, but rather use Bug and Attachment classes to make real queries from all of the Bugs.
+ - Add a few more attachments and bug dictionaries for use by the tests.
+
+2010-01-13 Diego Gonzalez <diego.gonzalez@openbossa.org>
+
+ Reviewed by Kenneth Christiansen.
+
+ [Qt] DRT missing setUserStyleSheetLocation and setUserStyleSheetEnabled in LayoutTestController
+ https://bugs.webkit.org/show_bug.cgi?id=33617
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::WebPage::resetSettings):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::setUserStyleSheetLocation):
+ (LayoutTestController::setUserStyleSheetEnabled):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
+2010-01-14 Adam Roben <aroben@apple.com>
+
+ Add LayoutTestController API to force
+ -webView:resource:willSendRequest:: to return null
+
+ Enables tests for <rdar://problem/7533333> <http://webkit.org/b/33533>
+ window.onload never fires if page contains an <iframe> with a bad
+ scheme or whose load is cancelled by returning null from resource load
+ delegate's willSendRequest
+
+ Reviewed by Brady Eidson.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController): Initialize new member.
+ (setWillSendRequestReturnsNullCallback): Call through to
+ LayoutTestController.
+ (LayoutTestController::staticFunctions): Added new function.
+
+ * DumpRenderTree/LayoutTestController.h: Added
+ m_willSendRequestReturnsNull.
+ (LayoutTestController::willSendRequestReturnsNull):
+ (LayoutTestController::setWillSendRequestReturnsNull):
+ Added standard accessors.
+
+ * DumpRenderTree/mac/ResourceLoadDelegate.mm:
+ (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):
+ * DumpRenderTree/win/ResourceLoadDelegate.cpp:
+ (ResourceLoadDelegate::willSendRequest):
+ Return null if LayoutTestController says to.
+
+2010-01-14 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix after removal of XBM support.
+
+ * wx/build/settings.py:
+
+2010-01-14 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Add support for partial building on Symbian.
+
+ The build happens in the source directory as out of source builds are
+ not supported by qmake for Symbian.
+
+ Also the actual build isn't started but it is left to the developer
+ to choose the architecture/configuration.
+
+ * Scripts/webkitdirs.pm:
+
+2010-01-14 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add support for "detecting" Symbian environments by either
+ looking for the EPOCROOT environment variable or via --symbian
+ being passed on the commandline.
+
+ * Scripts/webkitdirs.pm:
+
+2010-01-14 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Unreviewed.
+
+ [Qt] Use a different Makefile names for sources generation and compilation.
+ This prevents Makefile overwriting when running build-webkit twice.
+
+ * Scripts/webkitdirs.pm:
+
+2010-01-14 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add an "alien_QLabel" classId for manual testing of alien widgets.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33373
+
+ * QtLauncher/main.cpp:
+ (WebPage::createPlugin):
+
+2010-01-14 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r53249.
+ http://trac.webkit.org/changeset/53249
+ https://bugs.webkit.org/show_bug.cgi?id=33617
+
+ This caused http/tests/security/local-user-CSS-from-
+ remote.html to fail on the Qt Release Build Bot.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::WebPage::resetSettings):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::overridePreference):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
+2010-01-14 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Moved error() from cpp_style.py to checker.py.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33620
+
+ * Scripts/check-webkit-style:
+ - Addressed FIXME to not set global state.
+
+ * Scripts/webkitpy/style/checker.py:
+ - Added argument validation to ProcessorOptions constructor.
+ - Added should_report_error() to ProcessorOptions class.
+ - Removed set_options().
+ - Added StyleChecker class.
+
+ * Scripts/webkitpy/style/checker_unittest.py:
+ - Added unit test class for ProcessorOptions class.
+ - Added unit test to check that parse() strips white space.
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ - Removed "filter" and "output_format" methods.
+ - Removed should_print_error() and error() functions.
+ - Removed default parameter value from process_file().
+
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+ - Removed call to cpp_style._should_print_error().
+ - Removed test_filter() and test_filter_appending().
+
+ * Scripts/webkitpy/style/text_style.py:
+ - Removed default parameter value from process_file().
+
+2010-01-14 Diego Gonzalez <diego.gonzalez@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] DRT missing setUserStyleSheetLocation and setUserStyleSheetEnabled in LayoutTestController
+ https://bugs.webkit.org/show_bug.cgi?id=33617
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::WebPage::resetSettings):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::setUserStyleSheetLocation):
+ (LayoutTestController::setUserStyleSheetEnabled):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
+2010-01-13 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix CloseBugForLandDiff unittest to actually run
+ https://bugs.webkit.org/show_bug.cgi?id=33640
+
+ * Scripts/webkitpy/mock_bugzillatool.py:
+ * Scripts/webkitpy/steps/closebugforlanddiff_unittest.py:
+
+2010-01-12 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: selected, selectable, extended selectable, and multiple
+ selectable states are not reported
+
+ https://bugs.webkit.org/show_bug.cgi?id=33574
+ <rdar://problem/7536826>
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (getIsSelectableCallback):
+ Return the result of calling isSelectable().
+ (getIsMultiSelectableCallback):
+ Return the result of calling isMultiSelectable().
+ (AccessibilityUIElement::getJSClass):
+ Add isSelected and isMultiSelectable properties to the JSClass
+ definition.
+
+ * DumpRenderTree/AccessibilityUIElement.h:
+ Declare isSelectable() and isMultiSelectable().
+
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::isSelectable):
+ Stubbed.
+ (AccessibilityUIElement::isMultiSelectable):
+ Stubbed.
+
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::isSelectable):
+ Stubbed.
+ (AccessibilityUIElement::isMultiSelectable):
+ Stubbed.
+
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (accessibilityState):
+ Get the object's state, and return it.
+ (AccessibilityUIElement::isSelected):
+ Check the object's selected state.
+ (AccessibilityUIElement::isSelectable):
+ Check the object's selectable state.
+ (AccessibilityUIElement::isMultiSelectable):
+ Check the object's extended/multiple selectable state.
+
+2010-01-13 Adam Barth <abarth@webkit.org>
+
+ Unreviewed. Repeat the below for CloseBugForLandDiff.
+
+ * Scripts/test-webkitpy:
+ * Scripts/webkitpy/steps/closebugforlanddiff.py:
+ * Scripts/webkitpy/steps/closebugforlanddiff_unittest.py: Added.
+
+2010-01-13 Adam Barth <abarth@webkit.org>
+
+ Unreviewed. Turn the mac-ews status bubbles back on now that this bot
+ is running again.
+
+ * QueueStatusServer/templates/statusbubble.html:
+
+2010-01-13 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(53133): webkit-patch land dies if it can't find a bug id.
+ https://bugs.webkit.org/show_bug.cgi?id=33634
+
+ Deal with the case of no bug patch object in the state.
+
+ * Scripts/webkitpy/steps/updatechangelogswithreview_unittests.py:
+ * Scripts/webkitpy/steps/updatechangelogswithreviewer.py:
+
+2010-01-13 Kenneth Russell <kbr@google.com>
+
+ Unreviewed; added myself to the committers list.
+
+ * Scripts/webkitpy/committers.py:
+
+2010-01-13 Darin Adler <darin@apple.com>
+
+ Ignore compiled Python in more of webkitpy.
+
+ * Scripts/webkitpy/commands: Added property svn:ignore.
+ * Scripts/webkitpy/steps: Added property svn:ignore.
+ * Scripts/webkitpy/style: Added property svn:ignore.
+
+2010-01-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix build problem related to the pushd command
+
+ * Scripts/webkitdirs.pm:
+
+2010-01-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Split the build process in two different .pro files.
+ This allows qmake to be run once all source files are available.
+
+ * Scripts/webkitdirs.pm: Add calls to make DerivedSources.pro in JSC and WC.
+
+2010-01-13 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Unreviewed tiny typo fix in docstrings.
+
+ * Scripts/webkitpy/style/checker_unittest.py:
+
+2010-01-13 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Created a CategoryFilter class to encapsulate the logic of
+ filter rules.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33454
+
+ * Scripts/webkitpy/style/checker.py:
+ - Added CategoryFilter class.
+
+ * Scripts/webkitpy/style/checker_unittest.py:
+ - Added CategoryFilter unit tests.
+
+ * Scripts/webkitpy/style/cpp_style.py:
+ - Updated filter methods to use CategoryFilter.
+
+ * Scripts/webkitpy/style/cpp_style_unittest.py:
+ - Updated references to filters.
+
+2010-01-12 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Unreviewed. Now I can review :)
+
+ * Scripts/webkitpy/committers.py:
+
+2010-01-12 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Extend WinLauncher example with better printing features.
+
+ * WinLauncher/PrintWebUIDelegate.cpp:
+ (PrintWebUIDelegate::webViewPrintingMarginRect): Provide slightly
+ larger margins.
+ (PrintWebUIDelegate::webViewHeaderHeight): Compute header height based
+ on text metrics.
+ (PrintWebUIDelegate::webViewFooterHeight): Compute footer height based
+ on text metrics.
+ (PrintWebUIDelegate::drawHeaderInRect): Write useful header, along
+ with separating line.
+ (PrintWebUIDelegate::drawFooterInRect):
+ * WinLauncher/PrintWebUIDelegate.h: Remove stubs.
+ * WinLauncher/WinLauncher.cpp:
+ (PrintView): Correct loop used to print individual pages.
+ Previously it started at 0, which is a wild-card to print all
+ pages at once.
+
+2010-01-12 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33540
+ Make it possible to build in debug mode with assertions disabled
+
+ * DumpRenderTree/mac/ObjCController.m: (-[ObjCController accessStoredWebScriptObject]):
+
+2010-01-11 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] "build-webkit --chromium" should run "make all" on Linux
+ https://bugs.webkit.org/show_bug.cgi?id=33500
+
+ * Scripts/webkitdirs.pm:
+
+2010-01-12 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ AssignToCommitter does not need to fetch bugs twice
+ https://bugs.webkit.org/show_bug.cgi?id=33530
+
+ This is a no-brainer patch now that we've added Bug.reviewed_patches
+
+ * Scripts/webkitpy/commands/upload.py:
+
+2010-01-12 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ bugzilla.py should have an Attachment object instead of passing around dictionaries
+ https://bugs.webkit.org/show_bug.cgi?id=31594
+
+ * Scripts/webkitpy/bugzilla.py:
+ - Add a new Attachment class, with accessor methods for all the necessary properties.
+ - Update Bug to carry a pointer back to bugzilla (attachments need to access Bugzilla for committer validation and url())
+ - Move reviewed_patches and commit_queued_patches out of Bugzilla custom methods and onto Bug
+ - Move committer validation logic into its own class.
+ - Committer rejection is only used in one place. Make the new Bug reviewed_patches and commit_queued_patches
+ handle the common case (of returning "reviewer" or "committer" as None), and let CommitterValidation handle
+ the case where we want to reject patches in bugzilla.
+ - Simplify fetch_patches_from_commit_queue now that committer validation is simpler.
+ - Make all self.bugzilla.fetch_bug access go through BugzillaQueries._fetch_bug.
+ - Mark set_flag_on_attachment as non-private to denote that CommitterValidation depends on it.
+ - Move fetch_reviewed_patches_from_bug and fetch_commit_queue_patches_from_bug logic onto the Bug class.
+ * Scripts/webkitpy/bugzilla_unittest.py:
+ - Move test_flag_permission_rejection_message into a new CommitterValidationTest class.
+ * Scripts/webkitpy/commands/download.py:
+ - Store "bug_id" in state instead of making a fake patch object.
+ - Update to use Attachment and Bug objects.
+ * Scripts/webkitpy/commands/download_unittest.py:
+ - Update expected results now that our testing framework covers more code.
+ * Scripts/webkitpy/commands/early_warning_system.py: Update to use new Attachment class.
+ * Scripts/webkitpy/commands/queries.py: Remove unused ReviewedPatches class.
+ * Scripts/webkitpy/commands/queries_unittest.py: ditto.
+ * Scripts/webkitpy/commands/queues.py: Update to use new Attachment and CommitterValidator classes.
+ * Scripts/webkitpy/commands/queuestest.py: ditto.
+ * Scripts/webkitpy/commands/upload.py: ditto.
+ * Scripts/webkitpy/mock_bugzillatool.py:
+ - Now that more logic has moved into Attachment and Bug, we have to actually
+ provide real reviewer emails as well as real reviewer flags.
+ - Update mock methods to return Attachment objects.
+ * Scripts/webkitpy/scm.py: Update to use Attachment class.
+ * Scripts/webkitpy/scm_unittest.py: Update to use Attachment class.
+ * Scripts/webkitpy/statusserver.py: ditto.
+ * Scripts/webkitpy/steps/applypatch.py: ditto.
+ * Scripts/webkitpy/steps/applypatchwithlocalcommit.py: ditto.
+ * Scripts/webkitpy/steps/closebug.py: ditto.
+ * Scripts/webkitpy/steps/closebugforlanddiff.py: Handle either state["bug_id"] or state["patch"].bug_id()
+ * Scripts/webkitpy/steps/closepatch.py: Update to use Attachment class.
+ * Scripts/webkitpy/steps/obsoletepatches.py: ditto.
+ * Scripts/webkitpy/steps/updatechangelogswithreviewer.py: ditto.
+
+2010-01-12 Adam Barth <abarth@webkit.org>
+
+ Unreviewed typo fix. :(
+
+ * Scripts/webkitpy/commands/early_warning_system.py:
+ * Scripts/webkitpy/commands/queues.py:
+
+2010-01-12 Adam Barth <abarth@webkit.org>
+
+ Unreviewed. Add "error" to the right part of the message.
+
+ * Scripts/webkitpy/commands/queues.py:
+
+2010-01-12 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ EWS should show purple when svn-apply fails
+ https://bugs.webkit.org/show_bug.cgi?id=33527
+
+ * Scripts/webkitpy/commands/early_warning_system.py:
+ * Scripts/webkitpy/commands/queues.py:
+
+2010-01-12 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Remove copy/paste code from subclasses of AbstractReviewQueue
+ https://bugs.webkit.org/show_bug.cgi?id=33525
+
+ * Scripts/webkitpy/commands/early_warning_system.py:
+ * Scripts/webkitpy/commands/queues.py:
+
+2010-01-12 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Add Gustavo and Xan as gtk-ews watchers
+ https://bugs.webkit.org/show_bug.cgi?id=33519
+
+ * Scripts/webkitpy/commands/early_warning_system.py:
+
+2010-01-12 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ webkit-patch shouldn't waste my time for with a component prompt
+ https://bugs.webkit.org/show_bug.cgi?id=33521
+
+ The component field isn't very useful for bugs created with
+ webkit-patch because they're likely to be resolved quickly. Instead of
+ always prompting for a component, we should just default to the "New
+ Bugs" component. If the bug stays around for more than five minutes,
+ we can assign it a proper component.
+
+ * Scripts/webkitpy/bugzilla.py:
+
+2010-01-12 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Add experimental "land-safely" command to webkit-patch
+ https://bugs.webkit.org/show_bug.cgi?id=33518
+
+ * Scripts/webkitpy/commands/upload.py:
+ * Scripts/webkitpy/commands/upload_unittest.py:
+ * Scripts/webkitpy/steps/__init__.py:
+ * Scripts/webkitpy/steps/postdiffforcommit.py: Added.
+
+2010-01-11 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix after introduction of JS_NO_EXPORT
+
+ * wx/build/settings.py:
+
+2010-01-11 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r53079.
+ http://trac.webkit.org/changeset/53079
+ https://bugs.webkit.org/show_bug.cgi?id=33197
+
+ Adam doens't think this actually works, and believe it caused
+ a regression https://bugs.webkit.org/show_bug.cgi?id=33488 so
+ rolling this out.
+
+ * Scripts/test-webkitpy:
+ * Scripts/webkitpy/commands/abstractdiffcommand.py: Removed.
+ * Scripts/webkitpy/commands/abstractdiffcommand_unittest.py: Removed.
+ * Scripts/webkitpy/commands/download.py:
+ * Scripts/webkitpy/commands/upload.py:
+ * Scripts/webkitpy/mock_bugzillatool.py:
+
+2010-01-10 Adam Barth <abarth@webkit.org>
+
+ Reviewed by David Kilzer.
+
+ bugzilla-tool submit-patch mistakenly picks up bug URLs in non-ChangeLog files
+ https://bugs.webkit.org/show_bug.cgi?id=33197
+
+ We should just search for bug numbers in the ChangeLogs instead of in
+ the whole diff.
+
+ * Scripts/test-webkitpy:
+ * Scripts/webkitpy/commands/abstractdiffcommand.py: Added.
+ * Scripts/webkitpy/commands/abstractdiffcommand_unittest.py: Added.
+ * Scripts/webkitpy/commands/download.py:
+ * Scripts/webkitpy/commands/upload.py:
+ * Scripts/webkitpy/mock_bugzillatool.py:
+
+2010-01-11 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by David Kilzer.
+
+ Created a unit-tested function to parse the header block of
+ a Git or SVN diff -- for future refactoring of svn-apply and
+ svn-unapply.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33447
+
+ * Scripts/VCSUtils.pm:
+ - Added parseDiffHeader().
+ - Removed irrelevant comment from gitdiff2svndiff().
+
+ * Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl: Added.
+ - Added 48 unit tests for parseDiffHeader().
+
+2010-01-10 Adam Barth <abarth@webkit.org>
+
+ Rubber stamped by David Kilzer.
+
+ bugzilla-tool submit-patch mistakenly picks up bug URLs in non-ChangeLog files
+ https://bugs.webkit.org/show_bug.cgi?id=33197
+
+ Fix a typo: Commmand -> Command.
+
+ * Scripts/webkitpy/commands/abstractsequencedcommand.py:
+ * Scripts/webkitpy/commands/download.py:
+ * Scripts/webkitpy/commands/queries.py:
+ * Scripts/webkitpy/commands/upload.py:
+ * Scripts/webkitpy/multicommandtool.py:
+
+2010-01-10 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Let webkit-patch work with options in $EDITOR
+ https://bugs.webkit.org/show_bug.cgi?id=33414
+
+ The $EDITOR evironment variable might have command line options like
+ bbedit -w. This patch lets us run those $EDITORs.
+
+ * Scripts/webkitpy/user.py:
+
+2010-01-10 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Add enableXSSAuditor support to QWebSettings and DRT.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33419
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::WebPage::WebPage):
+ (WebCore::WebPage::resetSettings):
+ (WebCore::DumpRenderTree::createWindow):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::setXSSAuditorEnabled):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
+2010-01-10 Adam Barth <abarth@webkit.org>
+
+ Unreviewed cosmetic change. Remove the status bubble for mac-ews
+ because we don't have hardware for it at the moment.
+
+ * QueueStatusServer/templates/statusbubble.html:
+
+2010-01-09 Daniel Bates <dbates@webkit.org>
+
+ No review, rolling out r53044.
+ http://trac.webkit.org/changeset/53044
+ https://bugs.webkit.org/show_bug.cgi?id=33419
+
+ We need to look into this some more because the Qt
+ bot is failing the XSSAuditor tests. See bug #33419
+ for more details.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::WebPage::WebPage):
+ (WebCore::WebPage::resetSettings):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
+2010-01-09 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33419
+
+ Adds support for the XSSAuditor to the Qt DRT.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::WebPage::WebPage):
+ (WebCore::WebPage::resetSettings):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::setXSSAuditorEnabled):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
+2010-01-09 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Retry writes to QueueStatusServer when we get 500 errors
+ https://bugs.webkit.org/show_bug.cgi?id=33412
+
+ This prevents the queues from failing to mark a patch as "pass" or
+ "fail" when AppEngine throws 500 errors.
+
+ * Scripts/test-webkitpy:
+ * Scripts/webkitpy/networktransaction.py: Added.
+ * Scripts/webkitpy/networktransaction_unittest.py: Added.
+ * Scripts/webkitpy/statusserver.py:
+ * Scripts/webkitpy/steps/closebugformarkbugfixed.py: Added.
+ * Scripts/webkitpy/steps/closebugregardlessofpatches.py: Added.
+ * Scripts/webkitpy/steps/findbugidfromsvnrevision.py: Added.
+
+2010-01-09 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/33430> Fix rounded borders in queue status on older Firefox and Safari browsers
+
+ Reviewed by Eric Seidel.
+
+ * QueueStatusServer/templates/statusbubble.html: Added
+ -moz-border-radius and -webkit-border-radius to provide rounded
+ borders in older Firefox and Safari browsers.
+
+2010-01-09 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by David Kilzer.
+
+ Modified VCSUtils::gitdiff2svndiff() to accept strings that
+ end in vertical white space.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33415
+
+ * Scripts/VCSUtils.pm:
+ * Scripts/webkitperl/VCSUtils_unittest/gitdiff2svndiff.pl:
+
+2010-01-08 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ run-javascriptcore-tests needs a --quiet flag
+ https://bugs.webkit.org/show_bug.cgi?id=33399
+
+ Until run-javascriptcore-tests has a --quiet flag, lets just stiffle the output in webkit-patch.
+
+ * Scripts/webkitpy/steps/runtests.py:
+
+2010-01-08 Andras Becsi <abecsi@inf.u-szeged.hu>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Only run http and websocket tests as last if no argument is given to be able to explicitly control the test order.
+
+ To be able to run multiple instances of run-webkit-tests besides each other on the same machine we need to minimize
+ the time when Apache and WebSocketServer is locked by tests.
+ Because closeHTTPD() and closeWebSocketServer() is only called at the end of the testing,
+ we need to run http and websocket tests after all other tests.
+ If one however explicitly specifies the tests to run in the argument list of run-webkit-tests
+ we need to preserve the given order.
+
+ * Scripts/run-webkit-tests:
+
+2010-01-08 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Don't post style-queue pass messages to bugs
+ https://bugs.webkit.org/show_bug.cgi?id=33404
+
+ These messages aren't needed any more now that we have the status
+ bubble reporting pass events passively.
+
+ * Scripts/webkitpy/commands/queues.py:
+
+2010-01-08 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Optimize the number of CPUs used for building Qt and Gtk
+ https://bugs.webkit.org/show_bug.cgi?id=33394
+
+ Instead of hardcoding the number 8, we should read the number of CPUs
+ from the environment.
+
+ * Scripts/webkitpy/executive.py:
+ * Scripts/webkitpy/webkitport.py:
+ * Scripts/webkitpy/webkitport_unittest.py:
+
+2010-01-08 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ REGRESSION(52819?): AXLoadComplete and AXLayoutComplete causes 4 tests fail on Snow Leopard Debug bot
+ https://bugs.webkit.org/show_bug.cgi?id=33300
+
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::AccessibilityUIElement):
+ (AccessibilityUIElement::~AccessibilityUIElement):
+ (_accessibilityNotificationCallback):
+ (AccessibilityUIElement::addNotificationListener):
+
+2010-01-08 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ commit-queue should run run-javascriptcore-tests
+ https://bugs.webkit.org/show_bug.cgi?id=33376
+
+ I also made it run the python and perl unit tests.
+
+ * Scripts/webkitpy/steps/runtests.py:
+ * Scripts/webkitpy/webkitport.py:
+
+2010-01-07 Andras Becsi <abecsi@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ Run the http and websocket tests after all other tests.
+ https://bugs.webkit.org/show_bug.cgi?id=33153
+
+ * Scripts/run-webkit-tests:
+
+2010-01-07 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix some test-webkitpy expectations
+ https://bugs.webkit.org/show_bug.cgi?id=33345
+
+ I forgot to change these when I added the CheckStyle step.
+
+ * Scripts/webkitpy/commands/upload_unittest.py:
+
+2010-01-07 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ webkit-patch edit-changelogs (or upload) will open blank files if run outside the root
+ https://bugs.webkit.org/show_bug.cgi?id=33341
+
+ Fix this by moving to the root directory before editing ChangeLogs.
+ There is a related bug with CheckStyle.
+
+ * Scripts/webkitpy/steps/checkstyle.py:
+ * Scripts/webkitpy/steps/editchangelog.py:
+
+2010-01-07 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ media/unsupported-tracks.html is failing on Snow Leopard Release bot
+ https://bugs.webkit.org/show_bug.cgi?id=32339
+
+ This is a speculative fix. I do not have a Snow Leopard machine to test on
+ and I've not seen mention of someone being able to reproduce this locally.
+
+ Prevent watchdog timer from firing after a test completes but before
+ the next one starts, causing the error to appear in the next test.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dump): Stop the watchdog before printing #EOF for the test content.
+ We only need to care about the JavaScript of the test running too long
+ or some hang in WebCore. Any other failures will be covered by the calling
+ script's own watchdog timer.
+
+2010-01-07 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ commit-queue is stuck spinning due to exception
+ https://bugs.webkit.org/show_bug.cgi?id=33358
+
+ * Scripts/webkitpy/commands/queues.py:
+ - Don't try to stringify the exception.
+
+2010-01-07 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Don't leak a JSStringRef within _accessibilityNotificationCallback.
+
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (_accessibilityNotificationCallback): Have a JSRetainPtr adopt the JSStringRef so that it will be cleaned up
+ when it goes out of scope.
+
+2010-01-07 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add proposed rename of HTMLPlugInImageElement to HTMLEmbeddedObjectElement.
+
+ * Scripts/do-webcore-rename:
+
+2010-01-07 Kim Grönholm <kim.gronholm@nomovok.com>
+
+ Reviewed by Antti Koivisto.
+
+ Wrong state and TouchLists in TouchEvents
+ https://bugs.webkit.org/show_bug.cgi?id=32878
+
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+ (EventSender::touchStart):
+ (EventSender::touchEnd):
+ (EventSender::clearTouchPoints):
+ * DumpRenderTree/qt/EventSenderQt.h:
+
+2010-01-07 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by Adam Barth.
+
+ Created a module that runs the style package unit tests.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32973
+
+ * Scripts/test-webkitpy:
+ * Scripts/webkitpy/style/unittests.py: Added.
+
+2010-01-07 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Don't print a redundant message when confirming a diff
+ https://bugs.webkit.org/show_bug.cgi?id=33315
+
+ Instead of saying "ERROR: User declined" we should just exit because
+ the use knows they just declined!
+
+ * Scripts/webkitpy/steps/confirmdiff.py:
+
+2010-01-07 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Check style before uploading a patch
+ https://bugs.webkit.org/show_bug.cgi?id=33314
+
+ * Scripts/webkitpy/commands/upload.py:
+ * Scripts/webkitpy/steps/checkstyle.py:
+ * Scripts/webkitpy/steps/options.py:
+
+2010-01-07 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Add prepare and post to webkit-patch main help
+ https://bugs.webkit.org/show_bug.cgi?id=33313
+
+ * Scripts/webkitpy/commands/upload.py:
+
+2010-01-07 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Add Chromium bots to the list of "core builders" (builders which stop the commit-queue when they turn red)
+ https://bugs.webkit.org/show_bug.cgi?id=33290
+
+ Add the Chromium builders to our list of core builders and test that our regexps work.
+ I also updated our regexp testing to make sure we cover all known builders at build.webkit.org.
+
+ * Scripts/webkitpy/buildbot.py:
+ * Scripts/webkitpy/buildbot_unittest.py:
+
+2010-01-07 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ bugzilla-tool needs a new name
+ https://bugs.webkit.org/show_bug.cgi?id=28459
+
+ Rename bugzilla-tool to webkit-patch. Also, rename some commands to
+ make more sense with the new name.
+
+ * Scripts/bugzilla-tool: Removed.
+ * Scripts/webkit-patch: Added.
+ * Scripts/webkit-tools-completion.sh:
+ * Scripts/webkitpy/bugzilla_unittest.py:
+ * Scripts/webkitpy/commands/download.py:
+ * Scripts/webkitpy/commands/download_unittest.py:
+ * Scripts/webkitpy/commands/early_warning_system.py:
+ * Scripts/webkitpy/commands/queries.py:
+ * Scripts/webkitpy/commands/queues.py:
+ * Scripts/webkitpy/commands/queues_unittest.py:
+ * Scripts/webkitpy/commands/upload.py:
+ * Scripts/webkitpy/commands/upload_unittest.py:
+ * Scripts/webkitpy/queueengine.py:
+ * Scripts/webkitpy/steps/completerollout.py:
+
+2010-01-07 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Moved style-related modules to webkitpy.style sub-package.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32971
+
+ * Scripts/check-webkit-style:
+ - Updated import statement.
+
+ * Scripts/test-webkitpy:
+ - Updated import statements.
+
+ * Scripts/webkitpy/cpp_style.py: Removed.
+ - Moved to webkitpy/style.
+
+ * Scripts/webkitpy/cpp_style_unittest.py: Removed.
+ - Moved to webkitpy/style.
+
+ * Scripts/webkitpy/style.py: Removed.
+ - Moved to webkitpy/style/checker.py.
+
+ * Scripts/webkitpy/style/__init__.py: Added.
+ - Added containing webkitpy directory to package search path.
+
+ * Scripts/webkitpy/style/checker.py: Copied from Scripts/webkitpy/style.py.
+ * Scripts/webkitpy/style/checker_unittest.py: Copied from Scripts/webkitpy/style_unittest.py.
+ - Updated import statement.
+
+ * Scripts/webkitpy/style/cpp_style.py: Copied from Scripts/webkitpy/cpp_style.py.
+ * Scripts/webkitpy/style/cpp_style_unittest.py: Copied from Scripts/webkitpy/cpp_style_unittest.py.
+ - Update import statement.
+
+ * Scripts/webkitpy/style/text_style.py: Copied from Scripts/webkitpy/text_style.py.
+ * Scripts/webkitpy/style/text_style_unittest.py: Copied from Scripts/webkitpy/text_style_unittest.py.
+ * Scripts/webkitpy/style_unittest.py: Removed.
+ - Moved to webkitpy/style/checker_unittest.py.
+
+ * Scripts/webkitpy/text_style.py: Removed.
+ - Moved to webkitpy/style.
+
+ * Scripts/webkitpy/text_style_unittest.py: Removed.
+ - Moved to webkitpy/style.
+
+2010-01-06 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Support the 3rd argument of EventSender.keyDown that
+ has been recently added to report keyLocation
+ (see also: https://bugs.webkit.org/show_bug.cgi?id=28247).
+ https://bugs.webkit.org/show_bug.cgi?id=33250
+
+ Test: fast/events/keydown-numpad-keys.html
+
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+ (EventSender::keyDown):
+ * DumpRenderTree/qt/EventSenderQt.h:
+
+2010-01-06 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Add long_help for all common commands.
+ https://bugs.webkit.org/show_bug.cgi?id=33261
+
+ For now these long_helps are pretty basic.
+ These were all written to just explain the steps
+ that each command runs. This style long_help could
+ be made easier by using:
+ https://bugs.webkit.org/show_bug.cgi?id=33257
+
+ * Scripts/webkitpy/commands/download.py:
+ * Scripts/webkitpy/commands/queries.py:
+
+2010-01-06 Diego Gonzalez <diego.gonzalez@openbossa.org>
+
+ Reviewed by Kenneth Christiansen.
+
+ [Qt] Add page zooming support to Qt DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=32898
+
+ Patch by Kim Grönholm <kim.gronholm@nomovok.com>,
+ Diego Gonzalez <diego.gonzalez@openbossa.org> and
+ Afonso Costa <afonso.costa@openbossa.org>
+
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+ (EventSender::zoomPageIn):
+ (EventSender::zoomPageOut):
+ * DumpRenderTree/qt/EventSenderQt.h:
+
+2010-01-06 Eric Seidel <eric@webkit.org>
+
+ No review, just adding Mike Belshe's new bugzilla email at his request.
+
+ * Scripts/webkitpy/committers.py:
+
+2010-01-06 Eric Seidel <eric@webkit.org>
+
+ Unreviewed. Rolling out r52869 and r52853 due to bot
+ and local run-webkit-test failures
+
+ REGRESSION(52854?) fast/workers/shared-worker-constructor.html failed on Leopard Build Bot
+ https://bugs.webkit.org/show_bug.cgi?id=33256
+
+ The original bug was https://bugs.webkit.org/show_bug.cgi?id=33153
+
+ * Scripts/run-webkit-tests:
+
+2010-01-06 Eric Seidel <eric@webkit.org>
+
+ Unreviewed "build" fix. Just adding missing include.
+
+ bugzilla-tool rollout --complete-rollout should make a nicer bug comment
+ https://bugs.webkit.org/show_bug.cgi?id=29212
+
+ * Scripts/webkitpy/steps/completerollout.py:
+
+2010-01-06 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ bugzilla-tool rollout --complete-rollout should make a nicer bug comment
+ https://bugs.webkit.org/show_bug.cgi?id=29212
+
+ * Scripts/webkitpy/bugzilla.py:
+ - Make reopen_bug robust against the bug already being open.
+ * Scripts/webkitpy/commands/download.py:
+ - Remove dead code from Rollout.
+ * Scripts/webkitpy/steps/completerollout.py:
+ - Improve the rollout comment.
+
+2010-01-06 Andras Becsi <abecsi@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ Set isHttpdOpen to 0 if pidfile does not exist for some reason.
+ Speculative fix for https://bugs.webkit.org/show_bug.cgi?id=33256.
+
+ * Scripts/run-webkit-tests:
+
+2010-01-06 Andras Becsi <abecsi@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ Change hardcoded /tmp in run-webkit-tests to File::Spec->tmpdir(),
+ and remove the httpd's pidfile directory if httpd terminated.
+
+ * Scripts/run-webkit-tests:
+
+2010-01-05 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by David Levin.
+
+ Refactored check-webkit-style's argument parser to not rely
+ on global state, and improved its error handling and unit
+ test coverage.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32966
+
+ * Scripts/check-webkit-style:
+ - Adjusted to use new argument parser.
+
+ * Scripts/webkitpy/cpp_style.py:
+ - Changed _CppStyleState to accept an array of filter rules
+ instead of a comma-delimited string.
+ - Eliminated cpp_style._DEFAULT_FILTER_RULES.
+ - Eliminated cpp_style._USAGE.
+
+ * Scripts/webkitpy/cpp_style_unittest.py:
+ - Updated test_filter() and test_default_filter().
+
+ * Scripts/webkitpy/style.py:
+ - Converted style._USAGE to create_usage().
+ - Corrected usage instructions by removing 0 as a valid
+ --verbose flag value.
+ - Removed use_webkit_styles().
+ - Added ProcessorOptions class.
+ - Added ArgumentDefaults class.
+ - Added ArgumentPrinter class.
+ - Removed parse_arguments and added ArgumentParser class.
+ - Moved exit_with_usage() and exit_with_categories() into
+ ArgumentParser.
+ - Refactored parse_arguments() as ArgumentParser.parse().
+ - Improved parser error handling.
+
+ * Scripts/webkitpy/style_unittest.py:
+ - Added DefaultArgumentsTest class.
+ - Addressed FIXME to check style.WEBKIT_FILTER_RULES
+ against style.STYLE_CATEGORIES.
+ - Added ArgumentPrinterTest class.
+ - Added ArgumentParserTest class and rewrote parser unit tests.
+
+2010-01-05 Adam Roben <aroben@apple.com>
+
+ Test that it's safe to call IWebView::close when
+ IWebView::initWithFrame hasn't been called
+
+ Part of <http://webkit.org/b/32827> Crash when calling
+ IWebView::close, then releasing the WebView, without calling
+ DestroyWindow
+
+ Reviewed by Steve Falkenburg.
+
+ * WebKitAPITest/tests/WebViewDestruction.cpp:
+ (WebKitAPITest::CloseWithoutInitWithFrame): Calls IWebView::close
+ without ever calling IWebView::initWithFrame and tests that we don't
+ crash or leak.
+
+2010-01-05 Adam Roben <aroben@apple.com>
+
+ Add more WebViewDestruction tests
+
+ Fixes <http://webkit.org/b/33216>.
+
+ Reviewed by Eric Seidel.
+
+ * WebKitAPITest/tests/WebViewDestruction.cpp:
+ (WebKitAPITest::NoInitWithFrame):
+ (WebKitAPITest::CloseThenDestroyViewWindow):
+ (WebKitAPITest::DestroyViewWindowThenClose):
+ (WebKitAPITest::DestroyHostWindow):
+ (WebKitAPITest::DestroyHostWindowThenClose):
+ (WebKitAPITest::CloseThenDestroyHostWindow):
+ Added these tests that exercise tearing down a WebView in various
+ ways, all of which we eventually want to have work. Some of them
+ currently crash or leak.
+
+2010-01-05 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] fix DRT link failures on --no-svg builds when only making changes to DRT
+
+ If you're working from a --minimal or --no-svg build and make changes to the
+ DRT, then recompile, the build will fail.
+
+ This is because the current behavior at build time is to assume that the
+ previous Qt build supported SVG and consequently delete libQtWebKit.so.
+ Unfortunately, just deleting libQtWebKit.so will not cause the library to
+ re-link. Instead the build will see libQtWebKit.so.4 and co., pass over the
+ linking phase, and attempt to link the DRT with libQtWebKit.so absent. This
+ results in a link failure on the DRT.
+
+ Since re-linking libQtWebKit can take up to ten minutes and should be avoided
+ in cases where not actually required, remove the assumption that
+ the previous Qt build supported SVG, and amend the symbol detection to look for
+ a symbol name that is not present in SVG builds. Currently webkitdirs.pm looks
+ for 'SVGElement' but even non-SVG builds contain the symbol 'isSVGElement'.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32992
+
+ * Scripts/webkitdirs.pm:
+
+2010-01-05 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by David Kilzer.
+
+ Switched to generating list of Perl unit test files dynamically,
+ instead of explicitly.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33200
+
+ * Scripts/test-webkitperl:
+
+2010-01-05 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Reimplement EventSender::leapForward
+ https://bugs.webkit.org/show_bug.cgi?id=33114
+
+ Follow Windows implementation of leapForward. When leapForward is called,
+ messages are queued and posted after the timeout. A new event loop is created to
+ handle those messages and the additional messages that are created as a result.
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+ (EventSender::EventSender):
+ (EventSender::mouseDown):
+ (EventSender::mouseUp):
+ (EventSender::mouseMoveTo):
+ (EventSender::leapForward):
+ (EventSender::sendOrQueueEvent):
+ (EventSender::replaySavedEvents):
+ (EventSender::eventFilter):
+ * DumpRenderTree/qt/EventSenderQt.h:
+
+2010-01-05 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Fix obscure queue crash in queueengine
+ https://bugs.webkit.org/show_bug.cgi?id=33196
+
+ Sometimes we get an exception that can't be stringified. For example:
+
+ AttributeError: 'ParseError' object has no attribute 'msg'
+
+ In these cases, the whole queue dies because we're in the global
+ exception handler. Instead of dieing here, we should just print a less
+ informative message to the console. We're already printing the whole
+ backtrace anyway, so there's not much point to stringifying the
+ exception anyway.
+
+ * Scripts/webkitpy/queueengine.py:
+
+2010-01-05 Dominic Mazzoni <dmazzoni@google.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32571
+
+ For an object with an aria role of "checkbox" or "radiobutton",
+ use the "aria-checked" attribute to determine if it's checked.
+ These changes add an isChecked() method to AccessibilityUIElement
+ so that we can check for this property from a layout test.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (getIsCheckedCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::isChecked):
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::isChecked):
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::isChecked):
+
+2010-01-05 David Levin <levin@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Having a comment for the #endif for a header guard is not required WebKit style.
+ https://bugs.webkit.org/show_bug.cgi?id=33214
+
+ * Scripts/webkitpy/cpp_style.py: removed the check and made the loop exit
+ early when it has all the needed information to continue.
+ * Scripts/webkitpy/cpp_style_unittest.py: removed the corresponding tests.
+
+2010-01-05 Adam Roben <aroben@apple.com>
+
+ Share more code in the WebViewDestruction tests
+
+ Part of <http://webkit.org/b/33212> Small fixes/improvements to
+ WebKitAPITest
+
+ Reviewed by Sam Weinig.
+
+ * WebKitAPITest/tests/WebViewDestruction.cpp:
+ (WebKitAPITest::createAndInitializeWebView): Renamed from
+ createWebView. Now initializes the HostWindow and returns the
+ WebView's HWND via an out-parameter.
+ (WebKitAPITest::finishWebViewDestructionTest): Added. Code came from
+ the CloseWithoutDestroyWindow test.
+ (WebKitAPITest::CloseWithoutDestroyViewWindow): Renamed from
+ CloseWithoutDestroyWindow and changed to use the new functions.
+ (WebKitAPITest::MainFrameAfterClose): Changed to use the new
+ functions.
+ (WebKitAPITest::NoCloseOrDestroyViewWindow): Renamed from
+ NoCloseOrDestroyWindow and changed to use the new functions.
+
+2010-01-05 Adam Roben <aroben@apple.com>
+
+ Don't show HostWindows by default
+
+ This was making WebKitAPITest very flashy as windows appeared and
+ disappeared.
+
+ Part of <http://webkit.org/b/33212> Small fixes/improvements to
+ WebKitAPITest
+
+ Reviewed by Sam Weinig.
+
+ * WebKitAPITest/HostWindow.cpp:
+ (WebKitAPITest::HostWindow::initialize): Removed the WS_VISIBLE style
+ from the window.
+
+2010-01-05 Adam Roben <aroben@apple.com>
+
+ Don't hang in WebKitAPITest if no messages have been posted
+
+ Part of <http://webkit.org/b/33212> Small fixes/improvements to
+ WebKitAPITest
+
+ Reviewed by Sam Weinig.
+
+ * WebKitAPITest/tests/WebViewDestruction.cpp:
+ (WebKitAPITest::runMessagePump): Use PeekMessage instead of GetMessage
+ to avoid hanging if no messages have been posted.
+
+2010-01-05 Adam Roben <aroben@apple.com>
+
+ Fix WebKitCreateInstance helper
+
+ Part of <http://webkit.org/b/33212> Small fixes/improvements to
+ WebKitAPITest
+
+ Reviewed by Sam Weinig.
+
+ * WebKitAPITest/tests/WebViewDestruction.cpp:
+ (WebKitAPITest::WebKitCreateInstance): Pass the pointer straight
+ through, instead of taking its address.
+
+2010-01-04 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Fisher.
+
+ Reorganize, document and rename OS() platform macros.
+ https://bugs.webkit.org/show_bug.cgi?id=33198
+
+ Adapt to name changes.
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/config.h:
+
+2010-01-05 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Minor improvements to test-webkit-scripts, as suggested
+ by an earlier review.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33125
+
+ * Scripts/test-webkit-scripts:
+ - Used OptionParser class instead of getopt.getopt().
+ - Created main() method for __main__ block.
+ - Enclosed functions in a class.
+
+2010-01-05 Chris Fleizach <cfleizach@apple.com>
+
+ No review. Fix DRT breakage on Tiger/Leopard.
+
+ Add ARIA "Live Region" support
+ https://bugs.webkit.org/show_bug.cgi?id=33117
+
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+
+2010-01-04 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add ARIA "Live Region" support
+ https://bugs.webkit.org/show_bug.cgi?id=33117
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (indexOfChildCallback):
+ (boolAttributeValueCallback):
+ (stringAttributeValueCallback):
+ (addNotificationListenerCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::indexOfChild):
+ (AccessibilityUIElement::stringAttributeValue):
+ (AccessibilityUIElement::boolAttributeValue):
+ (AccessibilityUIElement::addNotificationListener):
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::indexOfChild):
+ (AccessibilityUIElement::stringAttributeValue):
+ (AccessibilityUIElement::boolAttributeValue):
+ (_accessibilityNotificationCallback):
+ (AccessibilityUIElement::addNotificationListener):
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::indexOfChild):
+ (AccessibilityUIElement::stringAttributeValue):
+ (AccessibilityUIElement::boolAttributeValue):
+ (AccessibilityUIElement::addNotificationListener):
+
+2010-01-04 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ bugzilla-tool rollout should require a reason
+ https://bugs.webkit.org/show_bug.cgi?id=30810
+
+ * Scripts/webkitpy/changelogs.py: Add support for a reason, add auto-wrapping logic.
+ * Scripts/webkitpy/changelogs_unittest.py: Test reason support.
+ * Scripts/webkitpy/commands/download.py: rollout now requires a reason, remove unused BUGID argument
+ * Scripts/webkitpy/commands/download_unittest.py: pass required reason
+ * Scripts/webkitpy/steps/preparechangelogforrevert.py: pass reason to update_for_revert
+
+2010-01-04 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: <select> elements should broadcast value change events
+
+ https://bugs.webkit.org/show_bug.cgi?id=33088
+
+ <rdar://problem/7332364>
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/AccessibilityController.cpp:
+ (logValueChangeEventsCallback):
+ Start logging value change events.
+ (AccessibilityController::getJSClass):
+ Add a "logValueChangeEvents" to the AccessibilityController's JS class
+ definition.
+ (AccessibilityController::resetToConsistentState):
+ Disable logging of value change events.
+
+ * DumpRenderTree/AccessibilityController.h:
+ Declare setLogValueChangeEvents(), and add a member variable for the
+ value change event hook.
+
+ * DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
+ (AccessibilityController::setLogValueChangeEvents):
+ Stubbed.
+
+ * DumpRenderTree/mac/AccessibilityControllerMac.mm:
+ (AccessibilityController::setLogValueChangeEvents):
+ Stubbed.
+
+ * DumpRenderTree/win/AccessibilityControllerWin.cpp:
+ (AccessibilityController::AccessibilityController):
+ Initialize new member var.
+ (AccessibilityController::~AccessibilityController):
+ Disable logging of value change events.
+ (logEventProc):
+ When we receive an EVENT_OBJECT_VALUECHANGE, log the name of the object
+ and its value.
+ (AccessibilityController::setLogValueChangeEvents):
+ If disabling logging, unhook the event, and clear the event hook
+ member var. Otherwise, query for the root element to enable
+ accessibility, and hook EVENT_OBJECT_VALUECHANGE.
+
+2010-01-04 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ long_help for submit-patch
+ https://bugs.webkit.org/show_bug.cgi?id=33184
+
+ * Scripts/webkitpy/commands/upload.py:
+
+2010-01-04 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ commit-queue can wrongly reject patches if the buildbots are behind
+ https://bugs.webkit.org/show_bug.cgi?id=30098
+
+ Check to make sure we can currently build and test before trying to
+ land a patch.
+
+ * Scripts/webkitpy/commands/queues.py:
+
+2010-01-04 Adam Roben <aroben@apple.com>
+
+ Add a test harness for the Windows WebKit API, and a few tests
+
+ We currently only have tests for a handful of bugs regarding WebView
+ destruction, but more tests can easily be added later. Eventually
+ we'll run these tests as part of run-webkit-tests.
+
+ Fixes <http://webkit.org/b/33167>.
+
+ Reviewed by Sam Weinig.
+
+ * WebKitAPITest/HostWindow.cpp: Added.
+ (WebKitAPITest::HostWindow::HostWindow): Initialize m_window.
+ (WebKitAPITest::HostWindow::~HostWindow): Destroy our window if
+ needed.
+ (WebKitAPITest::HostWindow::initialize): Create our window.
+ (WebKitAPITest::HostWindow::clientRect): Return our window's client
+ rect.
+ (WebKitAPITest::HostWindow::registerWindowClass): Does what it says.
+ (WebKitAPITest::HostWindow::wndProc): Just call through to
+ DefWindowProcW.
+
+ * WebKitAPITest/HostWindow.h: Added.
+ (WebKitAPITest::HostWindow::window): Simple getter.
+
+ * WebKitAPITest/Test.h: Added. This file defines some macros useful
+ for writing tests.
+
+ * WebKitAPITest/TestsController.cpp: Added.
+ (WebKitAPITest::TestsController::TestsController): Initialize our
+ members.
+ (WebKitAPITest::TestsController::shared): Return the shared instance.
+ (WebKitAPITest::TestsController::runAllTests): Run a message pump
+ until a WM_QUIT message is received, then return whether all tests
+ succeeded.
+ (WebKitAPITest::TestsController::addTest): Add the test to m_tests and
+ start running tests soon.
+ (WebKitAPITest::TestsController::testFailed): Record the failure and
+ print a message about it to stdout.
+ (WebKitAPITest::TestsController::runNextTest): If we don't have any
+ tests to run, post a WM_QUIT message to stop the message pump.
+ Otherwise, run the test and print whether it passed, then schedule the
+ next test.
+ (WebKitAPITest::TestsController::runNextTestSoon): Set a 0-delay timer
+ to run the next test.
+ (WebKitAPITest::TestsController::registerWindowClass): Does what it
+ says.
+ (WebKitAPITest::TestsController::wndProc): If the runNextTestTimer
+ fired, call runNextTest(). Pass everything else through to
+ DefWindowProcW.
+
+ * WebKitAPITest/TestsController.h: Added.
+
+ * WebKitAPITest/WebKitAPITest.vcproj: Added.
+
+ * WebKitAPITest/WebKitAPITestCommon.vsprops: Added.
+
+ * WebKitAPITest/main.cpp: Added.
+ (main): (Mostly) just calls TestsController::runAllTests.
+
+ * WebKitAPITest/tests/WebViewDestruction.cpp: Added.
+ (WebKitAPITest::WebKitCreateInstance): Helper function template to
+ call through to the real WebKitCreateInstance.
+ (WebKitAPITest::webViewCount): Helper function to call through to
+ IWebKitStatistics::webViewCount.
+ (WebKitAPITest::createWebView): Helper function to create a WebView
+ and put it inside a HostWindow.
+ (WebKitAPITest::runMessagePump): Helper function to run a message pump
+ for a specified number of milliseconds, or until a WM_QUIT message is
+ received.
+ (WebKitAPITest::CloseWithoutDestroyWindow): Test for
+ <http://webkit.org/b/32827>.
+ (WebKitAPITest::MainFrameAfterClose): Test for
+ <http://webkit.org/b/32868>.
+ (WebKitAPITest::NoCloseOrDestroyWindow): Test for
+ <http://webkit.org/b/33162>.
+
+2010-01-04 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by David Kilzer.
+
+ Add support for Git's "diff.mnemonicprefix" config option to WebKitTools
+
+ https://bugs.webkit.org/show_bug.cgi?id=32820
+
+ * Scripts/VCSUtils.pm:
+ * Scripts/svn-apply:
+ * Scripts/svn-unapply:
+ * Scripts/test-webkitperl: Run gitdiff2svndiff test
+ * Scripts/webkitperl/VCSUtils_unittest/gitdiff2svndiff.pl: Added.
+ * Scripts/webkitpy/diff_parser.py:
+ * Scripts/webkitpy/diff_parser_unittest.py:
+
+2010-01-04 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by David Kilzer.
+
+ Divided the Perl unit tests into separate files and put
+ them in a separate directory, and renamed test-webkit-perl
+ to test-webkitperl.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33124
+
+ * Scripts/VCSUtils.pm:
+ - Renamed generateRunPatchCommand() to generatePatchCommand().
+
+ * Scripts/VCSUtils_unittest.pl: Removed.
+ - Divided into three files in Scripts/webkitperl/VCSUtils_unittest.
+
+ * Scripts/test-webkit-perl: Removed.
+ - Renamed to test-webkitperl.
+
+ * Scripts/test-webkit-scripts:
+ - Updated paths to test-webkitpy and test-webkitperl.
+
+ * Scripts/test-webkitperl: Copied from Scripts/test-webkit-perl.
+ - Added paths to new test files.
+
+ * Scripts/webkitperl: Added.
+ * Scripts/webkitperl/VCSUtils_unittest: Added.
+ * Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatch.pl: Added.
+ * Scripts/webkitperl/VCSUtils_unittest/generatePatchCommand.pl: Added.
+ * Scripts/webkitperl/VCSUtils_unittest/runPatchCommand.pl: Copied from Scripts/VCSUtils_unittest.pl.
+
+2010-01-04 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Make bugzilla-tool rollout include a bug link in the ChangeLog entry
+ https://bugs.webkit.org/show_bug.cgi?id=33146
+
+ One more step towards better rollouts.
+
+ * Scripts/webkitpy/changelogs.py:
+ * Scripts/webkitpy/changelogs_unittest.py:
+ * Scripts/webkitpy/steps/preparechangelogforrevert.py:
+
+2010-01-04 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Sort the step options
+ https://bugs.webkit.org/show_bug.cgi?id=33144
+
+ * Scripts/webkitpy/steps/options.py:
+
+2010-01-04 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Need support for longer text in per-command help
+ https://bugs.webkit.org/show_bug.cgi?id=33143
+
+ Add some minimal additional help to land-diff and
+ pave the way for adding better help to all commands.
+
+ * Scripts/webkitpy/commands/download.py: Add small amount of additional help to land-diff
+ * Scripts/webkitpy/multicommandtool.py: support long_help
+ * Scripts/webkitpy/multicommandtool_unittest.py: test long_help
+
+2010-01-04 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Add unit test for MarkBugFixed
+ https://bugs.webkit.org/show_bug.cgi?id=33142
+
+ MarkBugFixed is way behind in command technology, but it still needs a
+ unit test, as the FIXME commands.
+
+ Also, remove mark-bug-fixed and create-bug from main help since we have
+ more modern commands to replace them.
+
+ * Scripts/webkitpy/commands/upload.py:
+ * Scripts/webkitpy/commands/upload_unittest.py:
+ * Scripts/webkitpy/mock_bugzillatool.py:
+
+2010-01-04 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Add missing unit test for CommitMessageForCurrentDiff
+ https://bugs.webkit.org/show_bug.cgi?id=33141
+
+ * Scripts/webkitpy/commands/upload.py:
+ * Scripts/webkitpy/commands/upload_unittest.py:
+
+2010-01-04 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Remove raw_input from queues in favor of user.prompt
+ https://bugs.webkit.org/show_bug.cgi?id=33140
+
+ This lets up properly mock out the user interaction instead of hacking
+ around it with the options.
+
+ * Scripts/webkitpy/commands/queues.py:
+ * Scripts/webkitpy/commands/queuestest.py:
+
+2010-01-04 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ bugzilla-tool should not require users to install mechanize
+ https://bugs.webkit.org/show_bug.cgi?id=32635
+
+ * Scripts/webkitpy/__init__.py: Add missing declaration for ClientForm (which mechanize requires).
+
+2010-01-04 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ bugzilla-tool should not require users to install mechanize
+ https://bugs.webkit.org/show_bug.cgi?id=32635
+
+ Use the nifty "autoinstall" module from Daniel Krech:
+ http://pypi.python.org/pypi/autoinstall/0.2
+ http://code.google.com/p/pyautoinstall/
+ It's available under a WebKit-compatible BSD license.
+
+ * Scripts/webkitpy/__init__.py:
+ - bind "mechanize" to an autoinstall importer which will
+ auto-download mechanize if necessary.
+ * Scripts/webkitpy/autoinstall.py: Added.
+ * Scripts/webkitpy/bugzilla.py: use "mechanize" instead of webkit_mechanize
+ * Scripts/webkitpy/statusbot.py: ditto.
+ * Scripts/webkitpy/webkit_mechanize.py: Removed.
+
+2010-01-04 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Move AbstractSequencedCommand to a more general location
+ https://bugs.webkit.org/show_bug.cgi?id=33137
+
+ I do what the FIXME tell me to do.
+
+ * Scripts/webkitpy/commands/abstractsequencedcommand.py: Added.
+ * Scripts/webkitpy/commands/download.py:
+ * Scripts/webkitpy/commands/upload.py:
+
+2010-01-04 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Rename StatusBot to StatusServer
+ https://bugs.webkit.org/show_bug.cgi?id=33139
+
+ It's not a bot. It's a server.
+
+ * Scripts/bugzilla-tool:
+ * Scripts/webkitpy/bugzilla.py:
+ * Scripts/webkitpy/commands/early_warning_system.py:
+ * Scripts/webkitpy/commands/queues.py:
+ * Scripts/webkitpy/mock_bugzillatool.py:
+ * Scripts/webkitpy/queueengine.py:
+ * Scripts/webkitpy/statusbot.py: Removed.
+
+2010-01-04 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] submit-pach should have a -o/--open option to open the bug after submit
+ https://bugs.webkit.org/show_bug.cgi?id=33136
+
+ Python makes this very easy.
+
+ * Scripts/webkitpy/mock_bugzillatool.py:
+ * Scripts/webkitpy/steps/options.py:
+ * Scripts/webkitpy/steps/postdiff.py:
+ * Scripts/webkitpy/user.py:
+
+2010-01-04 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Move steps to a submodule
+ https://bugs.webkit.org/show_bug.cgi?id=33135
+
+ For great victory. This will probably introduce some regressions
+ because our test coverage isn't perfect, but I've tried to be careful.
+
+ * Scripts/test-webkitpy:
+ * Scripts/webkitpy/buildsteps.py: Removed.
+ * Scripts/webkitpy/buildsteps_unittest.py: Removed.
+ * Scripts/webkitpy/commands/download.py:
+ * Scripts/webkitpy/commands/upload.py:
+ * Scripts/webkitpy/steps/__init__.py: Added.
+ * Scripts/webkitpy/steps/abstractstep.py: Added.
+ * Scripts/webkitpy/steps/applypatch.py: Added.
+ * Scripts/webkitpy/steps/applypatchwithlocalcommit.py: Added.
+ * Scripts/webkitpy/steps/build.py: Added.
+ * Scripts/webkitpy/steps/checkstyle.py: Added.
+ * Scripts/webkitpy/steps/cleanworkingdirectory.py: Added.
+ * Scripts/webkitpy/steps/cleanworkingdirectorywithlocalcommits.py: Added.
+ * Scripts/webkitpy/steps/closebug.py: Added.
+ * Scripts/webkitpy/steps/closebugforlanddiff.py: Added.
+ * Scripts/webkitpy/steps/closepatch.py: Added.
+ * Scripts/webkitpy/steps/commit.py: Added.
+ * Scripts/webkitpy/steps/completerollout.py: Added.
+ * Scripts/webkitpy/steps/confirmdiff.py: Added.
+ * Scripts/webkitpy/steps/createbug.py: Added.
+ * Scripts/webkitpy/steps/editchangelog.py: Added.
+ * Scripts/webkitpy/steps/ensurebuildersaregreen.py: Added.
+ * Scripts/webkitpy/steps/ensurelocalcommitifneeded.py: Added.
+ * Scripts/webkitpy/steps/metastep.py: Added.
+ * Scripts/webkitpy/steps/obsoletepatches.py: Added.
+ * Scripts/webkitpy/steps/options.py: Added.
+ * Scripts/webkitpy/steps/postdiff.py: Added.
+ * Scripts/webkitpy/steps/preparechangelog.py: Added.
+ * Scripts/webkitpy/steps/preparechangelogforrevert.py: Added.
+ * Scripts/webkitpy/steps/promptforbugortitle.py: Added.
+ * Scripts/webkitpy/steps/revertrevision.py: Added.
+ * Scripts/webkitpy/steps/runtests.py: Added.
+ * Scripts/webkitpy/steps/steps_unittest.py: Added.
+ * Scripts/webkitpy/steps/update.py: Added.
+ * Scripts/webkitpy/steps/updatechangelogswithreview_unittests.py: Added.
+ * Scripts/webkitpy/steps/updatechangelogswithreviewer.py: Added.
+ * Scripts/webkitpy/stepsequence.py:
+
+2010-01-04 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33097
+
+ Cleans up the File menu to better conform to the File menu in Safari
+ both in terms of options and keyboard shortcuts. Adds a "Quit" menu
+ options to close all open windows. Also, renames the Tools menu to
+ Develop.
+
+ * QtLauncher/main.cpp:
+ (MainWindow::setupUI):
+
+2010-01-04 Daniel Bates <dbates@webkit.org>
+
+ https://bugs.webkit.org/show_bug.cgi?id=33039
+
+ Unreviewed fix.
+
+ * Scripts/webkitpy/credentials.py:
+ * Scripts/webkitpy/credentials_unittest.py:
+
+2010-01-04 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33039
+
+ [bzt] Second attempt to fix an issue where bugzilla-tool dies
+ when the keychain lookup fails to find an entry for bugs.webkit.org.
+
+ * Scripts/webkitpy/credentials.py:
+ * Scripts/webkitpy/credentials_unittest.py:
+
+2010-01-04 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Make Rollout an AbstractSequencedCommmand
+ https://bugs.webkit.org/show_bug.cgi?id=33133
+
+ As suggested by Adam in:
+ https://bugs.webkit.org/show_bug.cgi?id=33131#c2
+
+ * Scripts/webkitpy/commands/download.py:
+
+2010-01-04 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Make all commands AbstractDeclarativeCommmands instead of direct Command subclasses
+ https://bugs.webkit.org/show_bug.cgi?id=33131
+
+ Evenetually we'll probably roll AbstractDeclarativeCommmand directly into Command
+ but for now we just deploy it everywhere and don't try to fix up the few valid uses
+ of Command.
+
+ * Scripts/webkitpy/commands/download.py:
+ * Scripts/webkitpy/commands/queries.py:
+ * Scripts/webkitpy/commands/upload.py:
+ * Scripts/webkitpy/multicommandtool.py:
+
+2010-01-03 Adam Barth <abarth@webkit.org>
+
+ Unreviewed "build" fix. Need to import ScriptError.
+
+ * Scripts/webkitpy/buildsteps.py:
+
+2010-01-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Make it easier to run submit-patch when previous run cancelled
+ https://bugs.webkit.org/show_bug.cgi?id=33070
+
+ This patch renames create-review to submit-patch (as requested by
+ Maciej).
+
+ This patch makes it easier to run submit-patch after the user has
+ already cancelled a previous run of submit-patch by detecting when we
+ already have ChangeLogs and reading the bug number from them (and not
+ attempting to recreate them). Aside from performance and the extra
+ edit step, this command should not subsume post-dif.
+
+ Also, added a --email command line argument so that the output of
+ prepare-ChangeLog makes sense when it can't find the user's email
+ address.
+
+ * Scripts/webkitpy/bugzilla.py:
+ * Scripts/webkitpy/buildsteps.py:
+ * Scripts/webkitpy/commands/upload.py:
+ * Scripts/webkitpy/commands/upload_unittest.py:
+ * Scripts/webkitpy/mock_bugzillatool.py:
+ * Scripts/webkitpy/user.py:
+
+2010-01-03 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Rename Scripts/modules to Scripts/webkitpy
+ https://bugs.webkit.org/show_bug.cgi?id=33128
+
+ Just search-replace and svn mv commands.
+
+ * Scripts/bugzilla-tool:
+ * Scripts/check-webkit-style:
+ * Scripts/modules: Removed.
+ * Scripts/modules/BeautifulSoup.py: Removed.
+ * Scripts/modules/__init__.py: Removed.
+ * Scripts/modules/bugzilla.py: Removed.
+ * Scripts/modules/bugzilla_unittest.py: Removed.
+ * Scripts/modules/buildbot.py: Removed.
+ * Scripts/modules/buildbot_unittest.py: Removed.
+ * Scripts/modules/buildsteps.py: Removed.
+ * Scripts/modules/buildsteps_unittest.py: Removed.
+ * Scripts/modules/changelogs.py: Removed.
+ * Scripts/modules/changelogs_unittest.py: Removed.
+ * Scripts/modules/commands: Removed.
+ * Scripts/modules/commands/__init__.py: Removed.
+ * Scripts/modules/commands/commandtest.py: Removed.
+ * Scripts/modules/commands/download.py: Removed.
+ * Scripts/modules/commands/download_unittest.py: Removed.
+ * Scripts/modules/commands/early_warning_system.py: Removed.
+ * Scripts/modules/commands/early_warning_system_unittest.py: Removed.
+ * Scripts/modules/commands/queries.py: Removed.
+ * Scripts/modules/commands/queries_unittest.py: Removed.
+ * Scripts/modules/commands/queues.py: Removed.
+ * Scripts/modules/commands/queues_unittest.py: Removed.
+ * Scripts/modules/commands/queuestest.py: Removed.
+ * Scripts/modules/commands/upload.py: Removed.
+ * Scripts/modules/commands/upload_unittest.py: Removed.
+ * Scripts/modules/comments.py: Removed.
+ * Scripts/modules/committers.py: Removed.
+ * Scripts/modules/committers_unittest.py: Removed.
+ * Scripts/modules/cpp_style.py: Removed.
+ * Scripts/modules/cpp_style_unittest.py: Removed.
+ * Scripts/modules/credentials.py: Removed.
+ * Scripts/modules/credentials_unittest.py: Removed.
+ * Scripts/modules/diff_parser.py: Removed.
+ * Scripts/modules/diff_parser_unittest.py: Removed.
+ * Scripts/modules/executive.py: Removed.
+ * Scripts/modules/executive_unittest.py: Removed.
+ * Scripts/modules/grammar.py: Removed.
+ * Scripts/modules/mock.py: Removed.
+ * Scripts/modules/mock_bugzillatool.py: Removed.
+ * Scripts/modules/multicommandtool.py: Removed.
+ * Scripts/modules/multicommandtool_unittest.py: Removed.
+ * Scripts/modules/outputcapture.py: Removed.
+ * Scripts/modules/patchcollection.py: Removed.
+ * Scripts/modules/queueengine.py: Removed.
+ * Scripts/modules/queueengine_unittest.py: Removed.
+ * Scripts/modules/scm.py: Removed.
+ * Scripts/modules/scm_unittest.py: Removed.
+ * Scripts/modules/statusbot.py: Removed.
+ * Scripts/modules/stepsequence.py: Removed.
+ * Scripts/modules/style: Removed.
+ * Scripts/modules/style.py: Removed.
+ * Scripts/modules/style_unittest.py: Removed.
+ * Scripts/modules/text_style.py: Removed.
+ * Scripts/modules/text_style_unittest.py: Removed.
+ * Scripts/modules/user.py: Removed.
+ * Scripts/modules/webkit_logging.py: Removed.
+ * Scripts/modules/webkit_logging_unittest.py: Removed.
+ * Scripts/modules/webkit_mechanize.py: Removed.
+ * Scripts/modules/webkitport.py: Removed.
+ * Scripts/modules/webkitport_unittest.py: Removed.
+ * Scripts/test-webkit-python: Removed.
+ * Scripts/test-webkitpy: Copied from WebKitTools/Scripts/test-webkit-python.
+ * Scripts/validate-committer-lists:
+ * Scripts/webkitpy: Copied from WebKitTools/Scripts/modules.
+ * Scripts/webkitpy/bugzilla.py:
+ * Scripts/webkitpy/bugzilla_unittest.py:
+ * Scripts/webkitpy/buildbot.py:
+ * Scripts/webkitpy/buildbot_unittest.py:
+ * Scripts/webkitpy/buildsteps.py:
+ * Scripts/webkitpy/buildsteps_unittest.py:
+ * Scripts/webkitpy/commands/commandtest.py:
+ * Scripts/webkitpy/commands/download.py:
+ * Scripts/webkitpy/commands/download_unittest.py:
+ * Scripts/webkitpy/commands/early_warning_system.py:
+ * Scripts/webkitpy/commands/early_warning_system_unittest.py:
+ * Scripts/webkitpy/commands/queries.py:
+ * Scripts/webkitpy/commands/queries_unittest.py:
+ * Scripts/webkitpy/commands/queues.py:
+ * Scripts/webkitpy/commands/queues_unittest.py:
+ * Scripts/webkitpy/commands/queuestest.py:
+ * Scripts/webkitpy/commands/upload.py:
+ * Scripts/webkitpy/commands/upload_unittest.py:
+ * Scripts/webkitpy/comments.py:
+ * Scripts/webkitpy/credentials.py:
+ * Scripts/webkitpy/credentials_unittest.py:
+ * Scripts/webkitpy/executive.py:
+ * Scripts/webkitpy/executive_unittest.py:
+ * Scripts/webkitpy/mock_bugzillatool.py:
+ * Scripts/webkitpy/multicommandtool.py:
+ * Scripts/webkitpy/multicommandtool_unittest.py:
+ * Scripts/webkitpy/queueengine.py:
+ * Scripts/webkitpy/queueengine_unittest.py:
+ * Scripts/webkitpy/scm.py:
+ * Scripts/webkitpy/scm_unittest.py:
+ * Scripts/webkitpy/statusbot.py:
+ * Scripts/webkitpy/stepsequence.py:
+ * Scripts/webkitpy/webkit_logging_unittest.py:
+ * Scripts/webkitpy/webkitport_unittest.py:
+
+2010-01-03 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Added script to test both Perl and Python, and renamed
+ run-webkit-unittests to test-webkit-python.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33045
+
+ * Scripts/VCSUtils_unittest.pl:
+ - Tweaked so it can be run from outside Scripts directory.
+
+ * Scripts/run-webkit-unittests: Removed.
+ - Renamed to test-webkit-python.
+
+ * Scripts/test-webkit-perl:
+ - Tweaked so it can be run from outside Scripts directory.
+
+ * Scripts/test-webkit-python: Copied from Scripts/run-webkit-unittests.
+
+ * Scripts/test-webkit-scripts: Added.
+ - Runs both test-webkit-perl and test-webkit-python.
+
+2010-01-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ commit-queue/bugzilla-tool should build both Debug and Release
+ https://bugs.webkit.org/show_bug.cgi?id=28450
+
+ Add a --build-style command that lets the master process tell the child
+ process to build both debug and release. Eventually we want to teach
+ the test step to understand this option too, but that's a patch for
+ another day.
+
+ * Scripts/modules/buildsteps.py:
+ * Scripts/modules/commands/queues.py:
+ * Scripts/modules/webkitport.py:
+ * Scripts/modules/webkitport_unittest.py:
+
+2010-01-03 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] EventSender: add support for Enter key events
+ https://bugs.webkit.org/show_bug.cgi?id=33064
+
+ Unskip 5 tests that are fixed now.
+
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+ (EventSender::keyDown):
+
+2010-01-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Add test for previous typo fix
+ https://bugs.webkit.org/show_bug.cgi?id=33083
+
+ A trivial test for a trivial fix, as requested by Eric.
+
+ * Scripts/modules/bugzilla_unittest.py:
+
+2010-01-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Implement mac-ews
+ https://bugs.webkit.org/show_bug.cgi?id=33072
+
+ The mac-ews is slightly different than the other early warning systems
+ because we can't run Mac OS X inside a VM. For that reason, we only
+ process patches that were uploaded by committers. This isn't as much
+ coverage as the other EWS bots, but it's better than nothing.
+
+ * Scripts/modules/commands/early_warning_system.py:
+ * Scripts/modules/commands/early_warning_system_unittest.py:
+ * Scripts/modules/commands/queues.py:
+ * Scripts/modules/commands/queuestest.py:
+ * Scripts/modules/mock_bugzillatool.py:
+
+2010-01-03 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by David Kilzer.
+
+ Refactored svn-apply and svn-unapply to use a common "patch"
+ command method, and added unit tests for this new method.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33098
+
+ * Scripts/VCSUtils.pm:
+ - Added generateRunPatchCommand().
+ - Added runPatchCommand().
+ - Added exitStatus() from webkitdirs.pm to address FIXME.
+
+ * Scripts/VCSUtils_unittest.pl:
+ - Added 10 unit tests for generateRunPatchCommand().
+ - Added 4 unit tests for runPatchCommand().
+ - Added callSilently() method.
+
+ * Scripts/svn-apply:
+ - Refactored applyPatch().
+ - Removed $pathScriptWasRunFrom global variable.
+ - Addressed issue where "--force" option was getting added twice.
+
+ * Scripts/svn-unapply:
+ - Refactored applyPatch().
+ - Removed $pathScriptWasRunFrom global variable.
+ - Added support for --force option.
+ - Enhanced to return meaningful exit status.
+
+ * Scripts/webkitdirs.pm:
+ - Moved exitStatus() implementation to VCSUtils.pm.
+
+2009-12-31 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Implement build-and-test
+ https://bugs.webkit.org/show_bug.cgi?id=33073
+
+ Some of the early warning system bots want to use build-and-test so
+ they can cover LayoutTests in addition to just compilation.
+
+ * Scripts/modules/commands/download.py:
+ * Scripts/modules/commands/download_unittest.py:
+
+2009-12-31 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Show mac-ews status on QueueStatusServer
+ https://bugs.webkit.org/show_bug.cgi?id=33076
+
+ Also make error status purple.
+
+ * QueueStatusServer/model/attachment.py:
+ * QueueStatusServer/model/queues.py:
+ * QueueStatusServer/templates/dashboard.html:
+ * QueueStatusServer/templates/statusbubble.html:
+
+2009-12-31 Adam Barth <abarth@webkit.org>
+
+ Unreviewed.
+
+ [bzt] REGRESSION: Bugzila is a typo
+ https://bugs.webkit.org/show_bug.cgi?id=33074
+
+ Eric should test his code before landing! :)
+
+ * Scripts/modules/bugzilla.py:
+
+2009-12-31 Adam Barth <abarth@webkit.org>
+
+ Unreviewed. Fix the unit tests!
+
+ * Scripts/run-webkit-unittests:
+
+2009-12-30 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ [wx] Alter a couple of default settings in the test app.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32956
+
+ * wx/browser/browser.cpp:
+ (MyApp::OnInit):
+
+2009-12-30 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ logging.py should be renamed to webkit_logging.py and eventually die
+ https://bugs.webkit.org/show_bug.cgi?id=33058
+
+ Change all imports of "logging" to webkit_logging,
+ except the ones which came from Google's cpp_lint.py and diff_parser.py
+ which clearly are assuming python's logging.py.
+
+ * Scripts/modules/bugzilla.py:
+ * Scripts/modules/buildbot.py:
+ * Scripts/modules/buildsteps.py:
+ * Scripts/modules/commands/download.py:
+ * Scripts/modules/commands/queries.py:
+ * Scripts/modules/commands/queues.py:
+ * Scripts/modules/commands/upload.py:
+ * Scripts/modules/credentials.py:
+ * Scripts/modules/executive.py:
+ * Scripts/modules/multicommandtool.py:
+ * Scripts/modules/queueengine.py:
+ * Scripts/modules/scm.py:
+ * Scripts/modules/statusbot.py:
+ * Scripts/modules/stepsequence.py:
+ * Scripts/modules/webkit_logging.py: Renamed from WebKitTools/Scripts/modules/logging.py.
+ * Scripts/modules/webkit_logging_unittest.py: Renamed from WebKitTools/Scripts/modules/logging_unittest.py.
+
+2009-12-30 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] layoutTestController.pathToLocalResource() should return a path, not an URL
+ https://bugs.webkit.org/show_bug.cgi?id=33051
+
+ Moreover, its primary function is to normalize the path in regard of platform
+ specific directory separators. Therefore, it can simply make use of the
+ QDir::toNativeSeparators function.
+
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::pathToLocalResource):
+
+2009-12-30 David D. Kilzer <ddkilzer@webkit.org>
+
+ Fix executable bits for r52646
+
+ * Scripts/VCSUtils_unittest.pl: Added property svn:executable.
+ * Scripts/test-webkit-perl: Ditto.
+
+2009-12-29 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by David Kilzer.
+
+ Fixed a bug in fixChangeLogPatch, made it work correctly in
+ more circumstances, and added unit tests.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32919
+
+ * Scripts/VCSUtils.pm:
+ Rewrote fixChangeLogPatch.
+
+ * Scripts/VCSUtils_unittest.pl: Added.
+ Added 7 unit tests for fixChangeLogPatch.
+
+ * Scripts/test-webkit-perl: Added.
+ Added test harness for unit tests of Perl code.
+
+2009-12-29 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Split out BugzillaQueries class from Bugzilla
+ https://bugs.webkit.org/show_bug.cgi?id=33042
+
+ * Scripts/modules/bugzilla.py:
+ - Split out BugzillaQueries from Bugzilla.
+ - Try to isolate self.bugzilla usage into helper functions whenever possible.
+ - Add a bunch of FIXMEs.
+ - Rename fetch_bug_ids_from_needs_commit_list to fetch_bug_ids_from_pending_commit_list
+ * Scripts/modules/bugzilla_unittest.py:
+ - Create a new BugzillaQueriesTest testcase and move logic there.
+ * Scripts/modules/buildsteps_unittest.py:
+ - Use Bug 75 instead of 1 since bug 1 doesn't actually exist.
+ * Scripts/modules/commands/queries.py:
+ - Update to use bugzilla.queries
+ * Scripts/modules/commands/queues.py:
+ - Ditto.
+ * Scripts/modules/commands/upload.py:
+ - Ditto.
+ * Scripts/modules/mock_bugzillatool.py:
+ - Add a MockBugzillaQueries.
+ - Make patches and bugs global privates.
+ - Let _id_to_object_dictionary take a variable argument list instead of an array.
+
+2009-12-29 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33041
+
+ Speed up the test method test_read_credentials_with_SVN by not actually
+ creating an SVN repository to test against (by default). Instead, it is
+ sufficient to create a temporary directory that does not contain a Git
+ repository.
+
+ Also, renamed method test_read_credentials_with_SVN to
+ test_read_credentials_without_git_repo, to better reflect what it is
+ testing.
+
+ * Scripts/modules/credentials_unittest.py:
+
+2009-12-29 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33039
+
+ [bzt] Fixes an issue where bugzilla-tool dies when the keychain lookup
+ fails to find an entry for bugs.webkit.org.
+
+ Under Mac OS X, bugzilla-tool tries to query the keychain and Security
+ framework (via /usr/sbin/security) for an internet-password entry for
+ bugs.webkit.org so that it can use it to login to bugs.webkit.org.
+ However, if no such entry exists then bugzilla-tool dies with an error.
+
+ * Scripts/modules/credentials.py: Modified method _parse_security_tool_output to return
+ [None, None] if /usr/sbin/security cannot find keychain entry for bugs.webkit.org.
+ * Scripts/modules/credentials_unittest.py: Added method test_security_output_parse_entry_not_found.
+
+2009-12-29 Eric Seidel <eric@webkit.org>
+
+ Rubber-stamped by Adam Barth.
+
+ Remove unused BugzillaException.
+
+ * Scripts/modules/bugzilla.py:
+
+2009-12-29 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Need a script to assign bugs with r+ patches to committers for landing
+ https://bugs.webkit.org/show_bug.cgi?id=33009
+
+ This is just one more small tool to help in the fight against our
+ ever-growing list of to-be-committed patches.
+
+ * Scripts/modules/bugzilla.py:
+ - Rename assign_to_email to assigned_to_email (typo).
+ - Add assigned_to_email() method on Bug.
+ - Add reassign_bug method.
+ - Add Bugzilla.unassigned_email, eventually should move to some webkit_config.py module.
+ * Scripts/modules/bugzilla_unittest.py:
+ - Update test after assigned_to_email rename.
+ * Scripts/modules/commands/commandtest.py:
+ - Call bind_to_tool to that self.tool works in Command testing.
+ * Scripts/modules/commands/download.py:
+ - Move AbstractDeclarativeCommmand multicommandtool.py, it should be part of Command.
+ * Scripts/modules/commands/queries_unittest.py:
+ - One of the test patches is now posted by "eric@webkit.org" which is a committer.
+ - Eventually we'll mock out CommitterList and be able to better control what's a committer and what's not.
+ * Scripts/modules/commands/upload.py:
+ - Add new assign-to-committer command.
+ * Scripts/modules/commands/upload_unittest.py:
+ - Add basic assign-to-committer test.
+ * Scripts/modules/committers.py:
+ - Add bugzilla_email() accessor.
+ * Scripts/modules/committers_unittest.py:
+ - Test our assumption that bugzilla_email is the first email.
+ * Scripts/modules/mock_bugzillatool.py:
+ - Add _id_to_object_dictionary for generating bug_cache from list of bugs.
+ - Remove unused fetch_attachments_from_bug.
+ - Add fetch_bug support and a bug_cache.
+ * Scripts/modules/multicommandtool.py:
+ - Move AbstractDeclarativeCommmand here from download.py
+
+2009-12-29 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Don't crash if user types a number during PromptForBugOrTitleStep
+ https://bugs.webkit.org/show_bug.cgi?id=33038
+
+ Simple fix with test.
+
+ * Scripts/modules/buildsteps.py:
+ * Scripts/modules/buildsteps_unittest.py:
+
+2009-12-29 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] post-diff requires reading to the end
+ https://bugs.webkit.org/show_bug.cgi?id=33036
+
+ Catch the IOError caused by not reading to the end of the diff. We
+ don't have a good way to test this currently.
+
+ * Scripts/modules/user.py:
+
+2009-12-29 Chang Shu <Chang.Shu@nokia.com>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Move logic that handles Qt headers before primary headers
+ so that Qt headers won't be treated as primary headers by mistake.
+ https://bugs.webkit.org/show_bug.cgi?id=32991
+
+ * Scripts/modules/cpp_style.py:
+ * Scripts/modules/cpp_style_unittest.py:
+
+2009-12-29 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Add the start of a Bug object for bugzilla.py
+ https://bugs.webkit.org/show_bug.cgi?id=32995
+
+ This allowed us to get rid of some duplicated "is_obsolete" checks.
+
+ * Scripts/modules/bugzilla.py:
+ - Add a new Bug class, and move patches/unreviewed_patches filtering logic there.
+ - Add _fetch_bug_page for possible future mocking.
+ (I did not try to test fetch_*_from_bug now due to difficulties with our current validate_reviewer logic.)
+ - Rename fetch_bug to fetch_bug_dictionary and add a new fetch_bug which returns a Bug object.
+ - Use fetch_bug and attachments(), patches(), etc. instead of custom fetch_*_from_bug methods.
+ - Reduce code in fetch_patches_from_pending_commit_list and fetch_patches_from_review_queue
+ using list comprehensions. Use a sum(list, []) trick to flatten a list of lists into a single list.
+ * Scripts/modules/bugzilla_unittest.py:
+ - Remove an unneeded unicode string marker.
+ * Scripts/modules/buildsteps.py:
+ - define __all__ to include just the BuildSteps
+ * Scripts/modules/commands/download.py:
+ - import * now that we have an __all__ defined.
+ * Scripts/modules/commands/upload.py:
+ - Use fetch_bug_dictionary instead of fetch_bug.
+
+2009-12-29 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32925
+
+ Adds an Open File dialog to make it convenient to open a file
+ to view in the browser.
+
+ Currently a person must either specify the path to a file as a
+ command-line argument or type a file URL. Instead, we should
+ have a file dialog to allow a person to open a file without
+ memorizing its path.
+
+ * QtLauncher/main.cpp:
+ (MainWindow::MainWindow): Changed urlEdit->setText(qurl.toEncoded())
+ to urlEdit->setText(qurl.toString()).
+ (MainWindow::openFile): Added.
+ (MainWindow::changeLocation): Moved code to load URL into method
+ MainWindow::loadURL.
+ (MainWindow::loadURL): Added.
+ (MainWindow::setupUI): Added menu item Open File.
+
+2009-12-29 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Holger Freyther.
+
+ [GTK] fails fast/harness/use-page-cache.html
+ https://bugs.webkit.org/show_bug.cgi?id=33013
+
+ Make sure settings are forwarded to child WebViews.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (createWebView):
+
+2009-12-29 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32778
+
+ Changes $diffPercentage to be a number to resolve Perl
+ warning about comparing a string to a number.
+
+ * Scripts/run-webkit-tests:
+
+2009-12-29 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] DRT: Frame loader callbacks differ from the Mac port
+ https://bugs.webkit.org/show_bug.cgi?id=32989
+
+ Remove messages from the callbacks that should not dump them to match
+ the expected results for the http/loading tests.
+
+ Unskip some http/loading tests which succeed now.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::dump):
+
+2009-12-29 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] fix fast/dom/Window/window-onFocus.html
+
+ Add support for layouttestcontroller.windowIsKey to Qt DRT and fix issue where
+ window.onblur was getting dispatched twice from QtWebKit.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32990
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::switchFocus):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::setWindowIsKey):
+ (LayoutTestController::setMainFrameIsFirstResponder):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
+2009-12-28 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Extended EventSender.keyDown method to take another (3rd) argument
+ for indicating the keyLocation to make numeric pad key events testable.
+ Expected values for the argument is one of the KeyLocationCode
+ specified in DOM Level 3
+ (http://www.w3.org/TR/DOM-Level-3-Events/#events-keyboardevents).
+ https://bugs.webkit.org/show_bug.cgi?id=28247
+
+ Test: fast/events/keydown-numpad-keys.html
+
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (+[EventSendingController isSelectorExcludedFromWebScript:]):
+ (+[EventSendingController webScriptNameForSelector:]):
+ (-[EventSendingController keyDown:withModifiers:withLocation:]):
+
+2009-12-28 Ariya Hidayat <ariya.hidayat@gmail.com>
+
+ Unreviewed, update my email address.
+
+ * Scripts/modules/committers.py:
+
+2009-12-28 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Fix build break for Qt 4.4
+ https://bugs.webkit.org/show_bug.cgi?id=30327
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp: Include QLocale
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp: Ditto.
+ * QtLauncher/main.cpp:
+ (MainWindow::MainWindow): Qt::WA_TranslucentBackground was
+ introduced in Qt version 4.5
+
+2009-12-28 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Add an edit-changelog command
+ https://bugs.webkit.org/show_bug.cgi?id=32986
+
+ This command makes it easier to edit ChangeLogs. It's similar to
+ prepare-ChangeLog -o, except it works with already existing ChangeLogs.
+
+ * Scripts/modules/commands/upload.py:
+ * Scripts/modules/commands/upload_unittest.py:
+
+2009-12-28 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Create an ASAD command for uploading a patch
+ https://bugs.webkit.org/show_bug.cgi?id=32979
+
+ The create-review command goes through the whole process of preparing a
+ code review, including creating a bug, editing the ChangeLogs, and
+ uploading the patch. It is indeed the All Sing, All Dance upload
+ command.
+
+ * Scripts/modules/buildsteps.py:
+ * Scripts/modules/commands/upload.py:
+ * Scripts/modules/commands/upload_unittest.py:
+ * Scripts/modules/mock_bugzillatool.py:
+ * Scripts/modules/user.py:
+
+2009-12-28 Adam Barth <abarth@webkit.org>
+
+ Unreviewed "build" fix (with test!).
+
+ * Scripts/modules/bugzilla.py:
+ * Scripts/modules/bugzilla_unittest.py:
+
+2009-12-27 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Add more awesome bug-parsing logic to bugzilla.py in preparation for assign-to-committer command
+ https://bugs.webkit.org/show_bug.cgi?id=32980
+
+ * Scripts/modules/bugzilla.py:
+ - Add a new _parse_bug_page function and use it in fetch_attachments_from_bug
+ - Replace fetch_title_from_bug with a new fetch_bug call instead.
+ - Use list comprehensions where possible to reduce code duplication.
+ * Scripts/modules/bugzilla_unittest.py:
+ - Add a minimal bug parsing test.
+ - Share code between bug parsing and attachment parsing tests with _assert_dictionaries_equal
+ * Scripts/modules/commands/upload.py:
+ - Use fetch_bug(bug_id)["title"] instead of fetch_title_from_bug
+
+2009-12-27 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Status bubble shouldn't be transparent for bots that haven't run yet
+ https://bugs.webkit.org/show_bug.cgi?id=32977
+
+ * QueueStatusServer/templates/statusbubble.html:
+
+2009-12-27 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [QueueStatusServer] Run gc cron job less often
+ https://bugs.webkit.org/show_bug.cgi?id=32958
+
+ Now that we've cleaned out the backlog of idle messages, we don't need
+ to run the gc job every half hour. We could also stop logging the idle
+ messages, but this seems easier for the time being.
+
+ * QueueStatusServer/cron.yaml:
+
+2009-12-27 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32896
+
+ Fixes an issue where bugzilla-tool tries to read the username and password from
+ Git regardless of whether Git is installed. In particular, if Git is not
+ installed then bugzilla-tool dies (with a trace) when it attempts to query Git
+ for the authentication credentials to log into bugs.webkit.org.
+
+ Moreover, modifies Executive.run_command to catch and pass OSError exceptions to
+ the specified error handler. For instance, the specified error handler will now
+ be called when the command does not exist (i.e. OSError errno 2).
+
+ * Scripts/modules/credentials.py: Added check for Git.
+ * Scripts/modules/credentials_unittest.py: Added test method
+ test_read_credentials_with_SVN.
+ * Scripts/modules/executive.py: Modified method run_command to catch
+ OSError exceptions (i.e [Errno 2] No such file or directory) and call
+ the specified error handler.
+ * Scripts/modules/executive_unittest.py: Added.
+ * Scripts/run-webkit-unittests: Added import executive_unittest.py.
+
+2009-12-27 Daniel Bates <dbates@webkit.org>
+
+ Unreviewed. Added missing file style_unittest.py that wasn't committed
+ in change set 52541 (http://trac.webkit.org/changeset/52541) as part of
+ the patch for bug #32592.
+
+ * Scripts/modules/style_unittest.py: Added.
+
+2009-12-27 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32964
+
+ [bzt] Updated the unit test based on the change made in bug #32951.
+
+ The change made in bug #32951 added the command-line argument:
+ --makeargs="-j8" to the build-webkit command. However, the associated
+ unit test was not updated.
+
+ * Scripts/modules/webkitport_unittest.py:
+
+2009-12-27 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ check-webkit-style should not mark moc files inclusion as errors
+ https://bugs.webkit.org/show_bug.cgi?id=32669
+
+ Add a new header type for moc files, and skip them when checking the order of header files.
+
+ * Scripts/modules/cpp_style.py:
+
+2009-12-26 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Make the qt build go fast
+ https://bugs.webkit.org/show_bug.cgi?id=32951
+
+ Make use of multiple cores, if available.
+
+ * Scripts/modules/webkitport.py:
+
+2009-12-25 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32682
+
+ Fixes an issue where checkFrameworks always dies with an error under Windows
+ since the clause "unless (-x $path)" is always satisfied because files under
+ Windows do not have an explict executable bit.
+
+ * Scripts/webkitdirs.pm:
+
+2009-12-23 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ bugzilla-tool should accept global options anywhere
+ https://bugs.webkit.org/show_bug.cgi?id=26912
+
+ * Scripts/bugzilla-tool:
+ - Use the new global_options class property.
+ - Add a handle_global_options callback to avoid needing callbacks for each global option.
+ * Scripts/modules/multicommandtool.py:
+ - Make the code use one combined option parser.
+ This allows us to accept global options anywhere and
+ individual command options before commands.
+ - Add a handle_global_options callback to avoid needing callbacks for each global option.
+ - Make the Command hold the option parser, but allow the tool to override it.
+ - The default option parser is used for help printing and when Commands are run stand alone,
+ but are otherwise not used.
+ - Add Command.main to codify the idea that Commands should support being run stand-alone.
+ - Change _split_args to _split_command_name_from_args now that args are unified.
+ * Scripts/modules/multicommandtool_unittest.py:
+ - Test that "tool" and "tool help" show the same help.
+ - Test that args are accepted before commands
+
+2009-12-20 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by David Levin.
+
+ Moved some sections of code in preparation to refactor
+ check-webkit-style's argument parser to avoid setting
+ global variables.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32592
+
+ * Scripts/check-webkit-style:
+ - Moved _USAGE string to style.py.
+ - Addressed FIXME by eliminating dependencies on cpp_style.py.
+
+ * Scripts/modules/cpp_style.py:
+ - Moved default arguments and style categories to style.py.
+ - Moved exit_with_usage(), exit_with_categories(), and
+ parse_arguments() to style.py.
+ - Removed references in _CppStyleState to the global
+ variables now in style.py.
+
+ * Scripts/modules/cpp_style_unittest.py:
+ - Moved parse_arguments() unit tests to style_unittest.py.
+
+ * Scripts/modules/style.py:
+ - Added _USAGE string from check-webkit-style.
+ - Added default arguments and style categories from cpp_style.py.
+ - Added exit_with_usage(), exit_with_categories(), and
+ parse_arguments() from cpp_sstyle.py.
+
+ * Scripts/modules/style_unittest.py: Added.
+ - Added parse_arguments() unit tests from cpp_style_unittest.py.
+
+ * Scripts/run-webkit-unittests:
+ - Added unit tests from style_unittest.py.
+
+2009-12-23 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ commit-queue should mention bug 30084 when rejecting patches until it can be fixed
+ https://bugs.webkit.org/show_bug.cgi?id=32911
+
+ * Scripts/modules/bugzilla.py: Make the message even more fancy.
+ * Scripts/modules/bugzilla_unittest.py: Test our new fancy message.
+
+2009-12-23 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Not reviewed, adding myself to the reviewers list.
+
+ * Scripts/modules/committers.py:
+
+2009-12-23 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Create a prepare-diff command that creates a bug and a ChangeLog
+ https://bugs.webkit.org/show_bug.cgi?id=32895
+
+ The workflow Maciej and I discussed is as follows:
+
+ 1) Write code.
+ 2) bugzilla-tool prepare-diff
+ 3) Edit ChangeLogs
+ 4) bugzilla-tool post-diff
+
+ We might want to experimenting with combining 2-4 into a single
+ command, but that might be stressful to edit the ChangeLogs modally.
+
+ Removed submit-patch since it has the modal ChangeLog editing but none
+ oof the bug creating fun.
+
+ * Scripts/modules/bugzilla.py:
+ * Scripts/modules/buildsteps.py:
+ * Scripts/modules/commands/upload.py:
+ * Scripts/modules/commands/upload_unittest.py:
+
+2009-12-23 Gabor Loki <loki@webkit.org>
+
+ Unreviewed; added myself to the committers list.
+
+ * Scripts/modules/committers.py:
+
+2009-12-22 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ [bzt] Don't call create-patch twice during post-diff
+ https://bugs.webkit.org/show_bug.cgi?id=32893
+
+ If we call create-patch to get the bug number, cache the diff in the
+ state so we don't need to call it again.
+
+ * Scripts/modules/buildsteps.py:
+ * Scripts/modules/commands/upload.py:
+
+2009-12-22 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32680
+
+ Fixes an issue in builtDylibPathForName so that it returns the correct
+ path to the built QtWebKit library on the Qt Windows port. Currently,
+ it returns the path to the file named QtWebKit.dll but this file does
+ not exist on the Qt Windows build. Instead, the file is named
+ QtWebKit4.dll.
+
+ * Scripts/webkitdirs.pm:
+
+2009-12-22 Marc-Antoine Ruel <maruel@chromium.org>
+
+ Reviewed by Adam Roben.
+
+ Remove the only dependency on perl-libwin32 in cygwin
+
+ * Scripts/num-cpus:
+
+2009-12-22 Darin Adler <darin@apple.com>
+
+ * pywebsocket/mod_pywebsocket: Added property svn:ignore to ignore
+ generated ".pyc" files.
+
+2009-12-22 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Turn off datagrid by default, at least for all platforms Apple ships.
+ The datagrid implementation isn't ready for general web use yet.
+
+ * Scripts/build-webkit: Turn off datagrid by default.
+
+2009-12-22 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ validate-committer-lists fails when run from an SVN checkout
+ https://bugs.webkit.org/show_bug.cgi?id=31974
+
+ * Scripts/validate-committer-lists:
+ - Make it print a warning message instead of throwing
+ an exception when running from an SVN checkout.
+
+2009-12-22 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Adam Barth.
+
+ check-webkit-style should not warn about NULL usage in g_object_{get,set}
+ https://bugs.webkit.org/show_bug.cgi?id=32858
+
+ * Scripts/modules/cpp_style.py:
+ * Scripts/modules/cpp_style_unittest.py:
+
+2009-12-22 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Rubber-stamped by Holger Freyther.
+
+ Moved QtLauncher from WebKit/qt.
+
+ * QtLauncher: Copied from WebKit/qt/QtLauncher.
+ * QtLauncher/QtLauncher.pro:
+
+2009-12-21 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Automate the process of calling prepare-ChangeLog
+ https://bugs.webkit.org/show_bug.cgi?id=32816
+
+ This patch automates the process of creating a bug and patch and
+ uploading it to bugzilla. The first cut just calls
+ prepare-ChangeLog.
+
+ This patch required some refactoring of upload.py to the Step
+ model, but that's worth doing anyway.
+
+ * Scripts/bugzilla-tool:
+ * Scripts/modules/buildsteps.py:
+ * Scripts/modules/commands/download.py:
+ * Scripts/modules/commands/upload.py:
+ * Scripts/modules/commands/upload_unittest.py:
+ * Scripts/modules/mock_bugzillatool.py:
+
+2009-12-21 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Did a rename, so checking in the
+ version of the script I used.
+
+2009-12-21 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Update status-bubble to show all the queues
+ https://bugs.webkit.org/show_bug.cgi?id=32838
+
+ Also, move statusbubble over to use memcache.
+
+ * QueueStatusServer/handlers/statusbubble.py:
+ * QueueStatusServer/templates/statusbubble.html:
+
+2009-12-21 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Delete the boring "Empty queue" status messages in QueueStatusServer
+ https://bugs.webkit.org/show_bug.cgi?id=32818
+
+ * QueueStatusServer/app.yaml:
+ * QueueStatusServer/cron.yaml:
+ * QueueStatusServer/handlers/gc.py:
+ * QueueStatusServer/main.py:
+
+2009-12-21 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Exception on queue status server
+ https://bugs.webkit.org/show_bug.cgi?id=32812
+
+ Turns out we need to pass the id to the filter.
+
+ * QueueStatusServer/filters/webkit_extras.py:
+ * QueueStatusServer/templates/patch.html:
+ * QueueStatusServer/templates/recentstatus.html:
+
+2009-12-20 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Created "style" folder for code supporting check-webkit-style.
+
+ * Scripts/modules/style: Added.
+
+2009-12-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ REGRESSION: error when running commit-queue
+ https://bugs.webkit.org/show_bug.cgi?id=32806
+
+ Fix typo and add test!
+
+ * Scripts/modules/bugzilla.py:
+ * Scripts/modules/bugzilla_unittest.py:
+
+2009-12-20 Adam Barth <abarth@webkit.org>
+
+ [bzt] Optimize status updates for new dashboard
+ https://bugs.webkit.org/show_bug.cgi?id=32797
+
+ This patch makes the queues slightly more chatty with the web service.
+ Also, this patch introduces some testing for the queues!
+
+ * Scripts/modules/commands/early_warning_system.py:
+ * Scripts/modules/commands/early_warning_system_unittest.py: Added.
+ * Scripts/modules/commands/queues.py:
+ * Scripts/modules/commands/queues_unittest.py:
+ * Scripts/modules/commands/queuestest.py: Added.
+ * Scripts/modules/mock_bugzillatool.py:
+ * Scripts/modules/patchcollection.py:
+ * Scripts/modules/queueengine.py:
+ * Scripts/run-webkit-unittests:
+
+2009-12-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Prepare QueueStatusServer for new status messages
+ https://bugs.webkit.org/show_bug.cgi?id=32805
+
+ * QueueStatusServer/handlers/recentstatus.py:
+ * QueueStatusServer/index.html: Removed.
+ * QueueStatusServer/model/attachment.py:
+ * QueueStatusServer/model/queues.py: Added.
+ * QueueStatusServer/templates/recentstatus.html: Added.
+
+2009-12-20 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [check-webkit-style] static_cast is not misnamed!
+ https://bugs.webkit.org/show_bug.cgi?id=32796
+
+ * Scripts/modules/cpp_style.py:
+ * Scripts/modules/cpp_style_unittest.py:
+
+2009-12-20 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Failing test platform/gtk/editing/pasteboard/middle-button-paste.html
+ https://bugs.webkit.org/show_bug.cgi?id=32788
+
+ Do not increase the click count if we are using a different button.
+
+ * DumpRenderTree/gtk/EventSender.cpp:
+
+2009-12-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [QueueStatusServer] Add a per-patch details page
+ https://bugs.webkit.org/show_bug.cgi?id=32784
+
+ This is a first cut at a per-patch details page. I'm sure we'll have
+ to iterate.
+
+ * QueueStatusServer/filters/webkit_extras.py:
+ * QueueStatusServer/handlers/patch.py: Added.
+ * QueueStatusServer/index.yaml:
+ * QueueStatusServer/main.py:
+ * QueueStatusServer/model/attachment.py:
+ * QueueStatusServer/stylesheets/dashboard.css:
+ * QueueStatusServer/templates/dashboard.html:
+ * QueueStatusServer/templates/patch.html: Added.
+
+2009-12-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Use memcache to make dashboard to fast
+ https://bugs.webkit.org/show_bug.cgi?id=32780
+
+ * QueueStatusServer/app.yaml:
+ * QueueStatusServer/handlers/dashboard.py:
+ * QueueStatusServer/handlers/updatestatus.py:
+ * QueueStatusServer/model/attachment.py: Added.
+
+2009-12-19 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Provide an example implementation for printing under Windows.
+ http://bugs.webkit.org/show_bug.cgi?id=32504.`
+
+ * WinLauncher/PrintWebUIDelegate.cpp: Added.
+ (PrintWebUIDelegate::QueryInterface):
+ (PrintWebUIDelegate::AddRef):
+ (PrintWebUIDelegate::Release):
+ (PrintWebUIDelegate::webViewPrintingMarginRect):
+ * WinLauncher/PrintWebUIDelegate.h: Added.
+ (PrintWebUIDelegate::PrintWebUIDelegate):
+ (PrintWebUIDelegate::createWebViewWithRequest):
+ (PrintWebUIDelegate::webViewShow):
+ (PrintWebUIDelegate::webViewClose):
+ (PrintWebUIDelegate::webViewFocus):
+ (PrintWebUIDelegate::webViewUnfocus):
+ (PrintWebUIDelegate::webViewFirstResponder):
+ (PrintWebUIDelegate::makeFirstResponder):
+ (PrintWebUIDelegate::setStatusText):
+ (PrintWebUIDelegate::webViewStatusText):
+ (PrintWebUIDelegate::webViewAreToolbarsVisible):
+ (PrintWebUIDelegate::setToolbarsVisible):
+ (PrintWebUIDelegate::webViewIsStatusBarVisible):
+ (PrintWebUIDelegate::setStatusBarVisible):
+ (PrintWebUIDelegate::webViewIsResizable):
+ (PrintWebUIDelegate::setResizable):
+ (PrintWebUIDelegate::setFrame):
+ (PrintWebUIDelegate::webViewFrame):
+ (PrintWebUIDelegate::setContentRect):
+ (PrintWebUIDelegate::webViewContentRect):
+ (PrintWebUIDelegate::runJavaScriptAlertPanelWithMessage):
+ (PrintWebUIDelegate::runJavaScriptConfirmPanelWithMessage):
+ (PrintWebUIDelegate::runJavaScriptTextInputPanelWithPrompt):
+ (PrintWebUIDelegate::runBeforeUnloadConfirmPanelWithMessage):
+ (PrintWebUIDelegate::runOpenPanelForFileButtonWithResultListener):
+ (PrintWebUIDelegate::mouseDidMoveOverElement):
+ (PrintWebUIDelegate::contextMenuItemsForElement):
+ (PrintWebUIDelegate::validateUserInterfaceItem):
+ (PrintWebUIDelegate::shouldPerformAction):
+ (PrintWebUIDelegate::dragDestinationActionMaskForDraggingInfo):
+ (PrintWebUIDelegate::willPerformDragDestinationAction):
+ (PrintWebUIDelegate::dragSourceActionMaskForPoint):
+ (PrintWebUIDelegate::willPerformDragSourceAction):
+ (PrintWebUIDelegate::contextMenuItemSelected):
+ (PrintWebUIDelegate::hasCustomMenuImplementation):
+ (PrintWebUIDelegate::trackCustomPopupMenu):
+ (PrintWebUIDelegate::measureCustomMenuItem):
+ (PrintWebUIDelegate::drawCustomMenuItem):
+ (PrintWebUIDelegate::addCustomMenuDrawingData):
+ (PrintWebUIDelegate::cleanUpCustomMenuDrawingData):
+ (PrintWebUIDelegate::canTakeFocus):
+ (PrintWebUIDelegate::takeFocus):
+ (PrintWebUIDelegate::registerUndoWithTarget):
+ (PrintWebUIDelegate::removeAllActionsWithTarget):
+ (PrintWebUIDelegate::setActionTitle):
+ (PrintWebUIDelegate::undo):
+ (PrintWebUIDelegate::redo):
+ (PrintWebUIDelegate::canUndo):
+ (PrintWebUIDelegate::canRedo):
+ (PrintWebUIDelegate::printFrame):
+ (PrintWebUIDelegate::ftpDirectoryTemplatePath):
+ (PrintWebUIDelegate::webViewHeaderHeight):
+ (PrintWebUIDelegate::webViewFooterHeight):
+ (PrintWebUIDelegate::drawHeaderInRect):
+ (PrintWebUIDelegate::drawFooterInRect):
+ (PrintWebUIDelegate::canRunModal):
+ (PrintWebUIDelegate::createModalDialog):
+ (PrintWebUIDelegate::runModal):
+ (PrintWebUIDelegate::isMenuBarVisible):
+ (PrintWebUIDelegate::setMenuBarVisible):
+ (PrintWebUIDelegate::runDatabaseSizeLimitPrompt):
+ (PrintWebUIDelegate::paintCustomScrollbar):
+ (PrintWebUIDelegate::paintCustomScrollCorner):
+ * WinLauncher/WinLauncher.cpp: Add new UI delegate for print support.
+ (WinLauncherWebHost::updateAddressBar): check-webkit-style fixes.
+ (WinLauncherWebHost::QueryInterface): check-webkit-style fixes.
+ (WinLauncherWebHost::AddRef): check-webkit-style fixes.
+ (WinLauncherWebHost::Release): check-webkit-style fixes.
+ (resizeSubViews): check-webkit-style fixes.
+ (_tWinMain): check-webkit-style fixes.
+ (MyRegisterClass): check-webkit-style fixes.
+ (InitInstance): check-webkit-style fixes.
+ (AbortProc): New print support function.
+ (getPrinterDC): New print support function.
+ (initDocStruct): New print support function.
+ (PrintView): New printing implementation.
+ (WndProc): Add support for printing.
+ (MyEditProc): check-webkit-style fixes.
+ (About): check-webkit-style fixes.
+ (loadURL): check-webkit-style fixes.
+ * WinLauncher/WinLauncher.h:
+ (WinLauncherWebHost::WinLauncherWebHost):
+ (WinLauncherWebHost::didStartProvisionalLoadForFrame):
+ (WinLauncherWebHost::didReceiveServerRedirectForProvisionalLoadForFrame):
+ (WinLauncherWebHost::didFailProvisionalLoadWithError):
+ (WinLauncherWebHost::didCommitLoadForFrame):
+ (WinLauncherWebHost::didReceiveTitle):
+ (WinLauncherWebHost::didReceiveIcon):
+ (WinLauncherWebHost::didFinishLoadForFrame):
+ (WinLauncherWebHost::didFailLoadWithError):
+ (WinLauncherWebHost::didChangeLocationWithinPageForFrame):
+ (WinLauncherWebHost::willPerformClientRedirectToURL):
+ (WinLauncherWebHost::didCancelClientRedirectForFrame):
+ (WinLauncherWebHost::willCloseFrame):
+ (WinLauncherWebHost::windowScriptObjectAvailable):
+ * WinLauncher/WinLauncher.rc: Add menu entry for printing.
+ * WinLauncher/WinLauncher.vcproj: Add new files.
+ * WinLauncher/resource.h: Add menu entry for printing.
+
+2009-12-19 Adam Barth <abarth@webkit.org>
+
+ Unreviewed. Tweak the CSS to make the dashboard prettier.
+
+ * QueueStatusServer/stylesheets/dashboard.css:
+ * QueueStatusServer/templates/dashboard.html:
+
+2009-12-19 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ QueueStatusServer needs a human readable dashboard
+ https://bugs.webkit.org/show_bug.cgi?id=32769
+
+ Here is a first cut at the dashboard. There's a lot left to do.
+
+ * QueueStatusServer/filters/webkit_extras.py:
+ * QueueStatusServer/handlers/dashboard.py: Added.
+ * QueueStatusServer/handlers/patchstatus.py:
+ * QueueStatusServer/handlers/recentstatus.py:
+ * QueueStatusServer/handlers/showresults.py:
+ * QueueStatusServer/handlers/statusbubble.py:
+ * QueueStatusServer/handlers/updatestatus.py:
+ * QueueStatusServer/main.py:
+ * QueueStatusServer/model/__init__.py: Copied from WebKitTools/QueueStatusServer/filters/__init__.py.
+ * QueueStatusServer/model/queuestatus.py: Renamed from WebKitTools/QueueStatusServer/model.py.
+ * QueueStatusServer/stylesheets/dashboard.css: Added.
+ * QueueStatusServer/templates/dashboard.html: Added.
+ * QueueStatusServer/templates/statusbubble.html: Renamed from WebKitTools/QueueStatusServer/status_bubble.html.
+ * QueueStatusServer/templates/updatestatus.html: Renamed from WebKitTools/QueueStatusServer/update_status.html.
+
+2009-12-19 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32462
+
+ Added --inspector-frontend flag to build-webkit to copy any changes
+ to the inspector front-end files to the built WebCore framework. This
+ will make inspector development more consistent with the rest of
+ WebKit development.
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2009-12-19 Adam Barth <abarth@webkit.org>
+
+ Unreviewed fixes for me being terrible at python.
+
+ * Scripts/modules/bugzilla.py:
+ * Scripts/run-webkit-unittests:
+
+2009-12-18 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Split QueueStatus server into modules
+ https://bugs.webkit.org/show_bug.cgi?id=32768
+
+ One monolithic file is no good.
+
+ * QueueStatusServer/app.yaml:
+ * QueueStatusServer/handlers/__init__.py: Copied from WebKitTools/QueueStatusServer/filters/__init__.py.
+ * QueueStatusServer/handlers/patchstatus.py: Added.
+ * QueueStatusServer/handlers/recentstatus.py: Added.
+ * QueueStatusServer/handlers/showresults.py: Added.
+ * QueueStatusServer/handlers/statusbubble.py: Added.
+ * QueueStatusServer/handlers/updatestatus.py: Added.
+ * QueueStatusServer/main.py: Added.
+ * QueueStatusServer/model.py: Added.
+ * QueueStatusServer/queue_status.py: Removed.
+
+2009-12-18 Adam Barth <abarth@webkit.org>
+
+ Rubber stamped by Eric Seidel.
+
+ Renamed WorkQueue to QueueEngine. WorkQueue is not a queue.
+
+ * Scripts/modules/commands/queues.py:
+ * Scripts/modules/queueengine.py: Added.
+ * Scripts/modules/queueengine_unittest.py: Added.
+ * Scripts/modules/stepsequence.py:
+ * Scripts/modules/workqueue.py: Removed.
+ * Scripts/modules/workqueue_unittest.py: Removed.
+
+2009-12-18 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Add watches for EWS
+ https://bugs.webkit.org/show_bug.cgi?id=32767
+
+ dglazkov wanted to be added.
+
+ * Scripts/modules/bugzilla.py:
+ * Scripts/modules/commands/early_warning_system.py:
+ * Scripts/modules/commands/queues.py:
+
+2009-12-18 Eric Seidel <eric@webkit.org>
+
+ Reviewed by David Levin.
+
+ move bugzilla.py off of urllib2
+ https://bugs.webkit.org/show_bug.cgi?id=32729
+
+ * Scripts/modules/bugzilla.py: use mechanize for all url fetching.
+
+2009-12-18 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Rubber-stamped by Xan Lopez.
+
+ [GTK] New events (pageshow and pagehide) tests failing
+ https://bugs.webkit.org/show_bug.cgi?id=28823
+
+ Original patch by Jan Michael Alonzo.
+
+ Disable page cache for tests.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (resetDefaultsToConsistentValues):
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (copyWebSettingKey):
+ (LayoutTestController::overridePreference):
+
+2009-12-18 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by David Levin.
+
+ Check one space before end of line comments.
+ https://bugs.webkit.org/show_bug.cgi?id=32597
+
+ Fix to check one space before end of line comments in whitespace and build/header_guard.
+ Also fix build/header_guard to use WebKit header guard defines.
+
+ * Scripts/modules/cpp_style.py:
+ * Scripts/modules/cpp_style_unittest.py:
+
+2009-12-17 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Add BUILDING_ON_SNOW_LEOPARD #define.
+
+ * DumpRenderTree/mac/DumpRenderTreeMac.h:
+
+2009-12-17 Yuzo Fujishima <yuzo@google.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Update pywebsocket to 0.4.5 and make handshake checking stricter
+ https://bugs.webkit.org/show_bug.cgi?id=32249
+
+ * Scripts/run-webkit-tests:
+ * pywebsocket/mod_pywebsocket/handshake.py:
+ * pywebsocket/mod_pywebsocket/memorizingfile.py: Added.
+ * pywebsocket/mod_pywebsocket/standalone.py:
+ * pywebsocket/setup.py:
+ * pywebsocket/test/test_handshake.py:
+ * pywebsocket/test/test_memorizingfile.py: Added.
+
+2009-12-17 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Command.show_in_main_help should default to False
+ https://bugs.webkit.org/show_bug.cgi?id=32686
+
+ * Scripts/modules/commands/download.py:
+ * Scripts/modules/commands/queries.py:
+ * Scripts/modules/commands/queues.py:
+ * Scripts/modules/commands/upload.py:
+ * Scripts/modules/multicommandtool.py:
+
+2009-12-17 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Eric Seidel.
+
+ Added the key WebKitEnableCaretBrowsing to the
+ layoutTestController.overridePreference in order to activate caret
+ browsing.
+ https://bugs.webkit.org/show_bug.cgi?id=32612
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp: Added the reset value of
+ the setting.
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: Inserted the new
+ key in the keytable.
+
+2009-12-17 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by David Kilzer.
+
+ AX: DRT needs to support URL for accessibility
+ https://bugs.webkit.org/show_bug.cgi?id=32666
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (getURLCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::url):
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::url):
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::url):
+
+2009-12-17 Philippe Normand <pnormand@igalia.com>
+
+ Unreviewed; added myself to committers
+
+ * Scripts/modules/committers.py:
+
+2009-12-17 Benjamin Otte <otte@gnome.org>
+
+ Unreviewed; added myself to committers
+
+ * Scripts/modules/committers.py:
+
+2009-12-17 Adam Barth <abarth@webkit.org>
+
+ Rubber stamp by Seidel.
+
+ Clean up exception handling in WorkQueue. Basically, a bunch of the
+ delegate messages can throw exceptions because of network errors. We
+ want the queues to keep on ticking instead of erroring out. That means
+ we want to catch generic exceptions and continue looping.
+
+ Also, cleaned up the exception handling in the EWS to properly log
+ failures.
+
+ * Scripts/modules/commands/early_warning_system.py:
+ * Scripts/modules/commands/queues.py:
+ * Scripts/modules/workqueue.py:
+
+2009-12-16 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Make UpdateStep quiet
+ https://bugs.webkit.org/show_bug.cgi?id=32599
+
+ * Scripts/modules/buildsteps.py:
+ * Scripts/modules/buildsteps_unittest.py:
+
+2009-12-16 Evan Martin <evan@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add Gtk to the early warning system WebKit port list.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32629
+
+ * Scripts/modules/commands/early_warning_system.py:
+ * Scripts/modules/webkitport.py:
+ * Scripts/modules/webkitport_unittest.py:
+
+2009-12-16 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ post-diff is failing with exception under guess_reviewer_from_bug
+ https://bugs.webkit.org/show_bug.cgi?id=32642
+
+ Also refactor output capturing code into
+ OutputCapture.assert_outputs to share more code between tests.
+
+ * Scripts/modules/buildsteps.py:
+ - Add the missing include.
+ - Give guess_reviewer_from_bug a private underscore.
+ * Scripts/modules/buildsteps_unittest.py: Added.
+ - Test to make sure _guess_reviewer_from_bug works as expected.
+ * Scripts/modules/commands/commandtest.py:
+ - Custom code is now obsoleted by OutputCapture.assert_outputs
+ * Scripts/modules/commands/queues_unittest.py:
+ - ditto
+ * Scripts/modules/credentials_unittest.py:
+ - ditto
+ * Scripts/modules/mock_bugzillatool.py:
+ - fetch_reviewed_patches_from_bug can never return None
+ * Scripts/modules/multicommandtool_unittest.py:
+ - Custom code is now obsoleted by OutputCapture.assert_outputs
+ * Scripts/modules/outputcapture.py:
+ - Add assert_outputs to share more code between tests.
+ * Scripts/run-webkit-unittests:
+ - Add buildsteps_unittest.py
+
+2009-12-16 Adam Barth <abarth@webkit.org>
+
+ Unreviewed. Added a default argument to _update_status so that callers
+ don't have to explictly pass None when they don't have a patch object.
+
+ * Scripts/modules/commands/queues.py:
+
+2009-12-16 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by David Levin.
+
+ check-webkit-style supports for TAB check against text files.
+ https://bugs.webkit.org/show_bug.cgi?id=32538
+
+ * Scripts/check-webkit-style:
+ Move process_patch() to style.py.
+ * Scripts/modules/cpp_style.py:
+ Add can_handle().
+ * Scripts/modules/cpp_style_unittest.py:
+ Add tests for can_handle().
+ * Scripts/modules/style.py:
+ Added. This is a front-end of cpp_style and text_style. It dispatches
+ files to an appropriate linter.
+ * Scripts/modules/text_style.py:
+ Added. This is a linter module for generic text files. It supports
+ only for TAB checking at this moment.
+ * Scripts/modules/text_style_unittest.py:
+ Added. Tests for text_style.py.
+ * Scripts/run-webkit-unittests:
+ Add text_style_unittest.
+
+2009-12-16 Eric Seidel <eric@webkit.org>
+
+ Reviewed by David Levin.
+
+ bugzilla-tool should not require users to install mechanize
+ https://bugs.webkit.org/show_bug.cgi?id=32635
+
+ Centralize our import logic.
+
+ * Scripts/modules/bugzilla.py: use webkit_mechanize
+ * Scripts/modules/statusbot.py: use webkit_mechanize
+ * Scripts/modules/webkit_mechanize.py: Added.
+
+2009-12-16 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Generalize commit-queue recent status page for all queues
+ https://bugs.webkit.org/show_bug.cgi?id=32633
+
+ * QueueStatusServer/index.html:
+ - Generalize to support other queues.
+ * QueueStatusServer/queue_status.py:
+ - Generalize MainPage to support other queues.
+
+2009-12-16 Evan Martin <evan@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Early warning system server should display output as UTF-8.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32625
+
+ * QueueStatusServer/queue_status.py:
+
+2009-12-16 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Add error handling to the early warning system
+ https://bugs.webkit.org/show_bug.cgi?id=32594
+
+ This should be the last step in making the EWS operational. When we
+ have a build error, we post the log to QueueStatusServer and add a link
+ to the bug.
+
+ * Scripts/modules/commands/early_warning_system.py:
+ * Scripts/modules/commands/queues.py:
+ * Scripts/modules/executive.py:
+
+2009-12-16 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ Fix crash with tests that use custom font faces.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32600
+
+ In the DRT we call QApplication::removeAllApplicationFonts(), to make sure
+ that custom font faces between tests don't influence each other. Calling this
+ function in Qt however also invalidates all existing handles with QFontDatabase.
+
+ In order to make sure that WebCore also drops these handles we call QWebSettings::clearMemoryCaches(),
+ which implies a call to WebCore::FontCache::fontCache()->invalidate().
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::open):
+
+2009-12-16 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Maintain button state between mouse events.
+
+ This allows eventSender to generate drag events.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32601
+
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+ (EventSender::mouseDown):
+ (EventSender::mouseUp):
+ (EventSender::mouseMoveTo):
+ * DumpRenderTree/qt/EventSenderQt.h:
+
+2009-12-15 Chris Jerdonek <chris.jerdonek@gmail.com>
+
+ Reviewed by David Levin.
+
+ Code clean-up in check-webkit-style as described below.
+ The only functional changes are minor improvements to the
+ script's help output.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32487
+
+ * Scripts/check-webkit-style:
+ - Added the module docstring from cpp_style.py.
+ - Improved wording of the --help output and added some of the
+ default values as substitution strings.
+ - Called cpp_style.exit_with_usage instead of sys.stderr.write
+ in main function.
+ - Made changes caused by changes to cpp_style.py.
+
+ * Scripts/modules/cpp_style.py:
+ - Removed module docstring, as well as redundant _USAGE string
+ and main() function obsoleted by check-webkit-style.
+ - Moved specification of default script values from within a
+ function definition to global variables.
+ - Moved the default webkit filter rules to be near the other
+ global variables.
+ - Renamed "FILTER" global variables to "FILTER_RULES" to
+ establish unambiguous terminology.
+ - Renamed _ERROR_CATEGORIES to _STYLE_CATEGORIES.
+ - Changed _STYLE_CATEGORIES from a string to a list.
+ - Added default webkit filter rules to --filter= output.
+ - Renamed "print_" methods to "exit_with_" since they exist
+ and added a temporary display_help parameter.
+ - Added a temporary display_help parameter to parse_arguments.
+
+ * Scripts/modules/cpp_style_unittest.py:
+ - Made changes caused by changes to cpp_style.py.
+ - Lower-cased ErrorCollector's ERROR_CATEGORIES instance
+ variables since they are not global.
+
+2009-12-15 Adam Barth <abarth@webkit.org>
+
+ Unreviewed fix for the style-queue.
+ Typo: _updates_status -> _update_status
+
+ We need to improve our testing infrastructure for the queues.
+
+ * Scripts/modules/commands/queues.py:
+
+2009-12-15 Adam Barth <abarth@webkit.org>
+
+ Unreviewed fix for the style-queue. I suspect this is a recent
+ regression from Eric's change below.
+
+ * Scripts/modules/commands/queues.py:
+
+2009-12-15 Yaar Schnitman <yaar@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ update-webkit-chromium to auto-install gclient
+
+ https://bugs.webkit.org/show_bug.cgi?id=32587
+
+ * Scripts/update-webkit-chromium:
+
+2009-12-15 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ bugzilla-tool / commit-queue should add results links to bugs when more results are available on the status bot
+ https://bugs.webkit.org/show_bug.cgi?id=32546
+
+ You can see an example of this working in:
+ https://bugs.webkit.org/show_bug.cgi?id=32585#c3
+
+ * QueueStatusServer/queue_status.py:
+ - Output the id of the newly created status.
+ * Scripts/modules/commands/queues.py:
+ - Tweak the commit-queue logging to include a full status link.
+ * Scripts/modules/statusbot.py:
+ - update_status should return the newly created status id.
+
+2009-12-15 Andras Becsi <abecsi@inf.u-szeged.hu>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Rename Qt DRT components to match other ports' naming convention and to be more understandable.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp: Removed.
+ * DumpRenderTree/qt/DumpRenderTree.h: Removed.
+ * DumpRenderTree/qt/DumpRenderTree.pro: Updated.
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp: Copied from WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp.
+ * DumpRenderTree/qt/DumpRenderTreeQt.h: Copied from WebKitTools/DumpRenderTree/qt/DumpRenderTree.h.
+ * DumpRenderTree/qt/GCControllerQt.cpp: Copied from WebKitTools/DumpRenderTree/qt/jsobjects.cpp.
+ (GCController::GCController):
+ * DumpRenderTree/qt/GCControllerQt.h: Copied from WebKitTools/DumpRenderTree/qt/jsobjects.h.
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ * DumpRenderTree/qt/WorkQueueItem.h: Removed.
+ * DumpRenderTree/qt/WorkQueueItemQt.cpp: Updated includes.
+ * DumpRenderTree/qt/WorkQueueItemQt.h: Copied from WebKitTools/DumpRenderTree/qt/WorkQueueItem.h.
+ * DumpRenderTree/qt/jsobjects.cpp: Removed.
+ * DumpRenderTree/qt/jsobjects.h: Removed.
+ * DumpRenderTree/qt/main.cpp: Updated includes.
+
+2009-12-15 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ We have two mark-fixed commands
+ https://bugs.webkit.org/show_bug.cgi?id=32073
+
+ * Scripts/mark-bug-fixed: Removed.
+ * Scripts/modules/commands/upload.py:
+ * Scripts/modules/commands/upload_unittest.py:
+
+2009-12-15 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ bugzilla-tool/commit-queue needs to upload failure logs when patches are rejected
+ https://bugs.webkit.org/show_bug.cgi?id=28286
+
+ * QueueStatusServer/index.html:
+ - Show [results] links if a results log was uploaded.
+ * QueueStatusServer/queue_status.py:
+ - Empty file uploads appear as u"" and Blob does not handle unicode, so convert to str().
+ * Scripts/modules/commands/queues.py:
+ - Post to the status bot when a patch fails and include the failure log as a results file.
+
+2009-12-15 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ queue sub-commands need --status-host so they can report status
+ https://bugs.webkit.org/show_bug.cgi?id=32313
+
+ Make --status-bot a global option and make
+ run_bugzilla_tool pass --status-bot to sub-commands.
+
+ * Scripts/bugzilla-tool:
+ - Rename _status to status_bot and make it non-lazy.
+ * Scripts/modules/commands/queues.py:
+ - Move status updates out of WorkQueue and into individual queues.
+ * Scripts/modules/commands/queues_unittest.py:
+ - Test that --status-host is passed to bugzilla-tool when run as subcommand.
+ * Scripts/modules/mock_bugzillatool.py:
+ - Add a MockStatusBot
+ * Scripts/modules/workqueue.py:
+ - Remove status_host and work_work_logs_directory callbacks.
+ - Add new work_item_log_path callback so that WorkQueue doesn't need to know about patches!
+ * Scripts/modules/workqueue_unittest.py:
+ - Update unit tests to reflect new callbacks.
+
+2009-12-15 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ scm_unittest.py is too slow
+ https://bugs.webkit.org/show_bug.cgi?id=31818
+
+ Now we don't run the SCM unit tests unless we get the --all flag on the
+ command line. Eric and I were commenting out this test because it was
+ too painful to run.
+
+ * Scripts/run-webkit-unittests:
+
+2009-12-14 Adam Barth <abarth@webkit.org>
+
+ Unreviewed. Fix failing unittest.
+
+ * Scripts/modules/bugzilla_unittest.py:
+
+2009-12-14 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Move Credential handling out into a separate module
+ https://bugs.webkit.org/show_bug.cgi?id=32531
+
+ * Scripts/modules/bugzilla.py:
+ * Scripts/modules/credentials.py: Added.
+ * Scripts/modules/credentials_unittest.py: Added.
+ * Scripts/run-webkit-unittests:
+
+2009-12-14 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Kill _create_step_sequence
+ https://bugs.webkit.org/show_bug.cgi?id=32539
+
+ It's cleaner to represent not having these sequences as an empty
+ sequence instead of None.
+
+ * Scripts/modules/commands/download.py:
+ * Scripts/modules/stepsequence.py:
+
+2009-12-14 Adam Barth <abarth@webkit.org>
+
+ Unreviewed. Address reviewer comments from an earlier patch. I didn't
+ do this earlier because I was worried about conflicts in dependent
+ patches.
+
+ * Scripts/modules/commands/download.py:
+
+2009-12-14 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Make download commands declarative
+ https://bugs.webkit.org/show_bug.cgi?id=32469
+
+ This patch "properly" factors most of the download commands. These
+ commands are now largely declarative, which is the final step of this
+ grand refactoring.
+
+ * Scripts/modules/buildsteps.py:
+ * Scripts/modules/commands/download.py:
+
+2009-12-14 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Add AbstractPatchSequencingCommand to remove redundant code
+ https://bugs.webkit.org/show_bug.cgi?id=32468
+
+ Redundant code is bad. This patch moves us towards more declarative
+ commands.
+
+ * Scripts/modules/commands/download.py:
+
+2009-12-14 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Kill WebKitApplyingScripts
+ https://bugs.webkit.org/show_bug.cgi?id=32467
+
+ Ah! I've been wanting to do this for a long time. This patch brings
+ the applying commands into the patch processing fold.
+
+ * Scripts/bugzilla-tool:
+ * Scripts/modules/buildsteps.py:
+ * Scripts/modules/commands/download.py:
+ * Scripts/modules/commands/download_unittest.py:
+ * Scripts/modules/mock_bugzillatool.py:
+
+2009-12-14 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Convert rollout to StepSequence
+ https://bugs.webkit.org/show_bug.cgi?id=32406
+
+ * Scripts/modules/buildsteps.py:
+ * Scripts/modules/commands/download.py:
+ * Scripts/modules/commands/download_unittest.py:
+ * Scripts/modules/mock_bugzillatool.py:
+
+2009-12-14 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [bzt] Kill LandingSequence
+ https://bugs.webkit.org/show_bug.cgi?id=32464
+
+ Removes LandingSequence in favor of StepSequence. This required
+ changing the Step API slightly to carry a general notion of state
+ instead of carrying patches specifically.
+
+ * Scripts/modules/buildsteps.py:
+ * Scripts/modules/commands/download.py:
+ * Scripts/modules/commands/queues.py:
+ * Scripts/modules/landingsequence.py: Removed.
+ * Scripts/modules/stepsequence.py:
+
+2009-12-14 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Fix https://bugs.webkit.org/show_bug.cgi?id=32437
+
+ Amend the behaviour of DRT::notifyDone to dump only when
+ the page has finished loading.
+
+ This fix permits removal of the following tests from the Qt skipped list:
+ fast/forms/textarea-linewrap-dynamic.html
+ fast/forms/textarea-setvalue-submit.html
+ fast/forms/textarea-hard-linewrap-empty.html
+ fast/forms/submit-to-url-fragment.html
+ http/tests/misc/percent-sign-in-form-field-name.html
+ http/tests/security/escape-form-data-field-names.html
+
+ However it also requires the following two to be added to the skipped list:
+
+ http/tests/xmlhttprequest/access-control-basic-denied-preflight-cache.html
+ svg/custom/use-instanceRoot-as-event-target.xhtml
+
+ It appears the behaviour of notifyDone was masking problems with these two
+ tests.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::reset):
+ (LayoutTestController::processWork):
+ (LayoutTestController::maybeDump):
+ (LayoutTestController::notifyDone):
+ (LayoutTestController::provisionalLoad):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+ (LayoutTestController::resetLoadFinished):
+
+2009-12-14 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Add support for keyboard modifiers to Qt DRT's EventSender for touch events
+
+ https://bugs.webkit.org/show_bug.cgi?id=32482
+
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+ (EventSender::setTouchModifier):
+ (EventSender::clearTouchPoints):
+ (EventSender::sendTouchEvent):
+ * DumpRenderTree/qt/EventSenderQt.h:
+
+2009-12-13 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Gavin Barraclaugh.
+
+ Fix minor problem in sunspider-compare-results which left it broken.
+
+ * Scripts/sunspider-compare-results: Declare $parseonly
+
+2009-12-12 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Give command-line sunspider the ability to handle multiple suites and versions
+ https://bugs.webkit.org/show_bug.cgi?id=32477
+
+ * Scripts/run-sunspider: Updated for changes to command-line parameters.
+ * Scripts/sunspider-compare-results: ditto
+
+2009-12-12 Maciej Stachowiak <mjs@apple.com>
+
+ Not reviewed, fixing previous comment.
+
+ Remove accidental change to sunspider-compare-results
+
+ * Scripts/sunspider-compare-results:
+
+2009-12-11 Yael Aharon <yael.aharon@nokia.com>
+
+ Unreviewed build fix for Qt versions < 4.6.
+ Guard every slot individually with #ifdef.
+
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+ (EventSender::addTouchPoint):
+ (EventSender::updateTouchPoint):
+ (EventSender::touchStart):
+ (EventSender::touchMove):
+ (EventSender::touchEnd):
+ (EventSender::clearTouchPoints):
+ (EventSender::releaseTouchPoint):
+ (EventSender::sendTouchEvent):
+ * DumpRenderTree/qt/EventSenderQt.h:
+
+2009-12-11 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ CommandsTest.assert_execute_outputs doesn't check stderr
+ https://bugs.webkit.org/show_bug.cgi?id=32352
+
+ Fix assert_execute_outputs to check stderr
+ and then fix all the unit tests which needed to
+ pass stderr output.
+
+ * Scripts/modules/commands/commandtest.py:
+ * Scripts/modules/commands/download_unittest.py:
+ * Scripts/modules/commands/upload_unittest.py:
+
+2009-12-11 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [check-webkit-style] False positive for tst_QWebFrame
+ https://bugs.webkit.org/show_bug.cgi?id=32436
+
+ Add an exception for function names that start with "tst_". These are
+ used by the Qt unit testing framework.
+
+ * Scripts/modules/cpp_style.py:
+ * Scripts/modules/cpp_style_unittest.py:
+
+2009-12-11 Simon Hausmann <hausmann@webkit.org>, Kim Grönholm <kim.gronholm@nomovok.com>
+
+ Reviewed by Antti Koivisto.
+
+ Added support for creating synthetic touch events with EventSender
+ in Qt's DumpRenderTree.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32114
+
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+ (EventSender::addTouchPoint):
+ (EventSender::updateTouchPoint):
+ (EventSender::touchStart):
+ (EventSender::touchMove):
+ (EventSender::touchEnd):
+ (EventSender::clearTouchPoints):
+ (EventSender::releaseTouchPoint):
+ (EventSender::sendTouchEvent):
+ * DumpRenderTree/qt/EventSenderQt.h:
+
+2009-12-11 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ The values of RuntimeArray are not enumerable
+ https://bugs.webkit.org/show_bug.cgi?id=29005
+
+ * DumpRenderTree/mac/ObjCController.m:
+ (+[ObjCController isSelectorExcludedFromWebScript:]):
+ (+[ObjCController webScriptNameForSelector:]):
+ (-[ObjCController arrayOfString]):
+
2009-12-10 Eric Seidel <eric@webkit.org>
No review, just updating unit tests to match recent checkins.
diff --git a/WebKitTools/DumpRenderTree/AccessibilityController.cpp b/WebKitTools/DumpRenderTree/AccessibilityController.cpp
index d3688f4..045bc80 100644
--- a/WebKitTools/DumpRenderTree/AccessibilityController.cpp
+++ b/WebKitTools/DumpRenderTree/AccessibilityController.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 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
@@ -63,6 +63,13 @@ static JSValueRef logFocusEventsCallback(JSContextRef ctx, JSObjectRef, JSObject
return JSValueMakeUndefined(ctx);
}
+static JSValueRef logValueChangeEventsCallback(JSContextRef ctx, JSObjectRef, JSObjectRef thisObject, size_t, const JSValueRef[], JSValueRef*)
+{
+ AccessibilityController* controller = static_cast<AccessibilityController*>(JSObjectGetPrivate(thisObject));
+ controller->setLogValueChangeEvents(true);
+ return JSValueMakeUndefined(ctx);
+}
+
static JSValueRef logScrollingStartEventsCallback(JSContextRef ctx, JSObjectRef, JSObjectRef thisObject, size_t, const JSValueRef[], JSValueRef*)
{
AccessibilityController* controller = static_cast<AccessibilityController*>(JSObjectGetPrivate(thisObject));
@@ -74,6 +81,7 @@ JSClassRef AccessibilityController::getJSClass()
{
static JSStaticFunction staticFunctions[] = {
{ "logFocusEvents", logFocusEventsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "logValueChangeEvents", logValueChangeEventsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "logScrollingStartEvents", logScrollingStartEventsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ 0, 0, 0 }
};
@@ -95,5 +103,6 @@ JSClassRef AccessibilityController::getJSClass()
void AccessibilityController::resetToConsistentState()
{
setLogFocusEvents(false);
+ setLogValueChangeEvents(false);
setLogScrollingStartEvents(false);
}
diff --git a/WebKitTools/DumpRenderTree/AccessibilityController.h b/WebKitTools/DumpRenderTree/AccessibilityController.h
index a10e8be..de58f84 100644
--- a/WebKitTools/DumpRenderTree/AccessibilityController.h
+++ b/WebKitTools/DumpRenderTree/AccessibilityController.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 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
@@ -26,13 +26,15 @@
#ifndef AccessibilityController_h
#define AccessibilityController_h
+#include "AccessibilityUIElement.h"
#include <JavaScriptCore/JSObjectRef.h>
+#include <string>
+#include <wtf/HashMap.h>
+#include <wtf/Platform.h>
#if PLATFORM(WIN)
#include <windows.h>
#endif
-class AccessibilityUIElement;
-
class AccessibilityController {
public:
AccessibilityController();
@@ -45,16 +47,24 @@ public:
AccessibilityUIElement focusedElement();
void setLogFocusEvents(bool);
+ void setLogValueChangeEvents(bool);
void setLogScrollingStartEvents(bool);
void resetToConsistentState();
+ void addNotificationListener(PlatformUIElement, JSObjectRef functionCallback);
+ void notificationReceived(PlatformUIElement, const std::string& eventName);
+
private:
static JSClassRef getJSClass();
#if PLATFORM(WIN)
HWINEVENTHOOK m_focusEventHook;
+ HWINEVENTHOOK m_valueChangeEventHook;
HWINEVENTHOOK m_scrollingStartEventHook;
+
+ HWINEVENTHOOK m_allEventsHook;
+ HashMap<PlatformUIElement, JSObjectRef> m_notificationListeners;
#endif
};
diff --git a/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp b/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
index 8c59252..87fe05c 100644
--- a/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
+++ b/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
@@ -152,6 +152,16 @@ static JSValueRef stringForRangeCallback(JSContextRef context, JSObjectRef funct
return JSValueMakeString(context, stringDescription.get());
}
+static JSValueRef indexOfChildCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount != 1)
+ return 0;
+
+ JSObjectRef otherElement = JSValueToObject(context, arguments[0], exception);
+ AccessibilityUIElement* childElement = toAXElement(otherElement);
+ return JSValueMakeNumber(context, (double)toAXElement(thisObject)->indexOfChild(childElement));
+}
+
static JSValueRef childAtIndexCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
int indexNumber = -1;
@@ -254,13 +264,25 @@ static JSValueRef isActionSupportedCallback(JSContextRef context, JSObjectRef fu
return result;
}
-static JSValueRef attributeValueCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef boolAttributeValueCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
JSStringRef attribute = 0;
if (argumentCount == 1)
attribute = JSValueToStringCopy(context, arguments[0], exception);
- JSRetainPtr<JSStringRef> attributeValue(Adopt, toAXElement(thisObject)->attributeValue(attribute));
- JSValueRef result = JSValueMakeString(context, attributeValue.get());
+ bool val = toAXElement(thisObject)->boolAttributeValue(attribute);
+ JSValueRef result = JSValueMakeBoolean(context, val);
+ if (attribute)
+ JSStringRelease(attribute);
+ return result;
+}
+
+static JSValueRef stringAttributeValueCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSStringRef attribute = 0;
+ if (argumentCount == 1)
+ attribute = JSValueToStringCopy(context, arguments[0], exception);
+ JSRetainPtr<JSStringRef> stringAttributeValue(Adopt, toAXElement(thisObject)->stringAttributeValue(attribute));
+ JSValueRef result = JSValueMakeString(context, stringAttributeValue.get());
if (attribute)
JSStringRelease(attribute);
return result;
@@ -322,6 +344,31 @@ static JSValueRef showMenuCallback(JSContextRef context, JSObjectRef function, J
return JSValueMakeUndefined(context);
}
+static JSValueRef takeFocusCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ toAXElement(thisObject)->takeFocus();
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef takeSelectionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ toAXElement(thisObject)->takeSelection();
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef addSelectionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ toAXElement(thisObject)->addSelection();
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef removeSelectionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ toAXElement(thisObject)->removeSelection();
+ return JSValueMakeUndefined(context);
+}
+
+
// Static Value Getters
static JSValueRef getARIADropEffectsCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
@@ -470,11 +517,46 @@ static JSValueRef getIsSelectedCallback(JSContextRef context, JSObjectRef thisOb
return JSValueMakeBoolean(context, toAXElement(thisObject)->isSelected());
}
+static JSValueRef getIsSelectableCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)
+{
+ return JSValueMakeBoolean(context, toAXElement(thisObject)->isSelectable());
+}
+
+static JSValueRef getIsMultiSelectableCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)
+{
+ return JSValueMakeBoolean(context, toAXElement(thisObject)->isMultiSelectable());
+}
+
static JSValueRef getIsExpandedCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)
{
return JSValueMakeBoolean(context, toAXElement(thisObject)->isExpanded());
}
+static JSValueRef getIsCheckedCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)
+{
+ return JSValueMakeBoolean(context, toAXElement(thisObject)->isChecked());
+}
+
+static JSValueRef getIsVisibleCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)
+{
+ return JSValueMakeBoolean(context, toAXElement(thisObject)->isVisible());
+}
+
+static JSValueRef getIsOffScreenCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)
+{
+ return JSValueMakeBoolean(context, toAXElement(thisObject)->isOffScreen());
+}
+
+static JSValueRef getIsCollapsedCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)
+{
+ return JSValueMakeBoolean(context, toAXElement(thisObject)->isCollapsed());
+}
+
+static JSValueRef getHasPopupCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)
+{
+ return JSValueMakeBoolean(context, toAXElement(thisObject)->hasPopup());
+}
+
static JSValueRef hierarchicalLevelCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)
{
return JSValueMakeNumber(context, toAXElement(thisObject)->hierarchicalLevel());
@@ -504,6 +586,22 @@ static JSValueRef getDocumentURICallback(JSContextRef context, JSObjectRef thisO
return JSValueMakeString(context, documentURI.get());
}
+static JSValueRef getURLCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> url(Adopt, toAXElement(thisObject)->url());
+ return JSValueMakeString(context, url.get());
+}
+
+static JSValueRef addNotificationListenerCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount != 1)
+ return JSValueMakeBoolean(context, false);
+
+ JSObjectRef callback = JSValueToObject(context, arguments[0], exception);
+ bool succeeded = toAXElement(thisObject)->addNotificationListener(callback);
+ return JSValueMakeBoolean(context, succeeded);
+}
+
// Destruction
static void finalize(JSObjectRef thisObject)
@@ -544,11 +642,19 @@ JSClassRef AccessibilityUIElement::getJSClass()
{ "isEnabled", getIsEnabledCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "isRequired", getIsRequiredCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "isSelected", getIsSelectedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "isSelectable", getIsSelectableCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "isMultiSelectable", getIsMultiSelectableCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "isExpanded", getIsExpandedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "isChecked", getIsCheckedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "isVisible", getIsVisibleCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "isOffScreen", getIsOffScreenCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "isCollapsed", getIsCollapsedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "hasPopup", getHasPopupCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "valueDescription", getValueDescriptionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "hierarchicalLevel", hierarchicalLevelCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "documentEncoding", getDocumentEncodingCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "documentURI", getDocumentURICallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "url", getURLCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "isValid", getIsValidCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "orientation", getOrientationCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "ariaIsGrabbed", getARIAIsGrabbedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -566,6 +672,7 @@ JSClassRef AccessibilityUIElement::getJSClass()
{ "boundsForRange", boundsForRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "stringForRange", stringForRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "childAtIndex", childAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "indexOfChild", indexOfChildCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "elementAtPoint", elementAtPointCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "attributesOfColumnHeaders", attributesOfColumnHeadersCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "attributesOfRowHeaders", attributesOfRowHeadersCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -579,7 +686,8 @@ JSClassRef AccessibilityUIElement::getJSClass()
{ "cellForColumnAndRow", cellForColumnAndRowCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "titleUIElement", titleUIElementCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setSelectedTextRange", setSelectedTextRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "attributeValue", attributeValueCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "stringAttributeValue", stringAttributeValueCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "boolAttributeValue", boolAttributeValueCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "isAttributeSupported", isAttributeSupportedCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "isAttributeSettable", isAttributeSettableCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "isActionSupported", isActionSupportedCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -593,6 +701,11 @@ JSClassRef AccessibilityUIElement::getJSClass()
{ "ariaFlowToElementAtIndex", ariaFlowToElementAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "selectedRowAtIndex", selectedRowAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "isEqual", isEqualCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "addNotificationListener", addNotificationListenerCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "takeFocus", takeFocusCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "takeSelection", takeSelectionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "addSelection", addSelectionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "removeSelection", removeSelectionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ 0, 0, 0 }
};
diff --git a/WebKitTools/DumpRenderTree/AccessibilityUIElement.h b/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
index 9985523..e7d3bc7 100644
--- a/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
+++ b/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
@@ -70,10 +70,16 @@ public:
AccessibilityUIElement elementAtPoint(int x, int y);
AccessibilityUIElement getChildAtIndex(unsigned);
+ unsigned indexOfChild(AccessibilityUIElement*);
int childrenCount();
AccessibilityUIElement titleUIElement();
AccessibilityUIElement parentElement();
-
+
+ void takeFocus();
+ void takeSelection();
+ void addSelection();
+ void removeSelection();
+
// Methods - platform-independent implementations
JSStringRef allAttributes();
JSStringRef attributesOfLinkedUIElements();
@@ -85,7 +91,8 @@ public:
void showMenu();
// Attributes - platform-independent implementations
- JSStringRef attributeValue(JSStringRef attribute);
+ JSStringRef stringAttributeValue(JSStringRef attribute);
+ bool boolAttributeValue(JSStringRef attribute);
bool isAttributeSupported(JSStringRef attribute);
bool isAttributeSettable(JSStringRef attribute);
bool isActionSupported(JSStringRef action);
@@ -102,7 +109,7 @@ public:
double y();
double width();
double height();
- double intValue();
+ double intValue() const;
double minValue();
double maxValue();
JSStringRef valueDescription();
@@ -111,12 +118,20 @@ public:
bool isEnabled();
bool isRequired() const;
bool isSelected() const;
+ bool isSelectable() const;
+ bool isMultiSelectable() const;
bool isExpanded() const;
+ bool isChecked() const;
+ bool isVisible() const;
+ bool isOffScreen() const;
+ bool isCollapsed() const;
+ bool hasPopup() const;
int hierarchicalLevel() const;
double clickPointX();
double clickPointY();
JSStringRef documentEncoding();
JSStringRef documentURI();
+ JSStringRef url();
// Table-specific attributes
JSStringRef attributesOfColumnHeaders();
@@ -152,10 +167,15 @@ public:
// Table-specific
AccessibilityUIElement cellForColumnAndRow(unsigned column, unsigned row);
+ // Notifications
+ // Function callback should take one argument, the name of the notification.
+ bool addNotificationListener(JSObjectRef functionCallback);
+
private:
static JSClassRef getJSClass();
PlatformUIElement m_element;
+ JSObjectRef m_notificationFunctionCallback;
};
#endif // AccessibilityUIElement_h
diff --git a/WebKitTools/DumpRenderTree/DumpRenderTree.h b/WebKitTools/DumpRenderTree/DumpRenderTree.h
index c11c5f6..8366e89 100644
--- a/WebKitTools/DumpRenderTree/DumpRenderTree.h
+++ b/WebKitTools/DumpRenderTree/DumpRenderTree.h
@@ -46,7 +46,7 @@
#include <string>
-#if !PLATFORM(OPENBSD)
+#if !OS(OPENBSD)
std::wstring urlSuitableForTestResult(const std::wstring& url);
#endif
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
index 572d610..e71cd29 100644
--- a/WebKitTools/DumpRenderTree/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
@@ -66,6 +66,7 @@ LayoutTestController::LayoutTestController(const std::string& testPathOrURL, con
, m_testRepaint(false)
, m_testRepaintSweepHorizontally(false)
, m_waitToDump(false)
+ , m_willSendRequestReturnsNull(false)
, m_willSendRequestReturnsNullOnRedirect(false)
, m_windowIsKey(true)
, m_alwaysAcceptCookies(false)
@@ -699,6 +700,21 @@ static JSValueRef setDatabaseQuotaCallback(JSContextRef context, JSObjectRef fun
return JSValueMakeUndefined(context);
}
+static JSValueRef setDomainRelaxationForbiddenForURLSchemeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has Mac and Windows implementation
+ if (argumentCount < 2)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+
+ bool forbidden = JSValueToBoolean(context, arguments[0]);
+ JSRetainPtr<JSStringRef> scheme(Adopt, JSValueToStringCopy(context, arguments[1], 0));
+ controller->setDomainRelaxationForbiddenForURLScheme(forbidden, scheme.get());
+
+ return JSValueMakeUndefined(context);
+}
+
static JSValueRef setMockGeolocationPositionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount < 3)
@@ -911,6 +927,18 @@ static JSValueRef setUserStyleSheetLocationCallback(JSContextRef context, JSObje
return JSValueMakeUndefined(context);
}
+static JSValueRef setWillSendRequestReturnsNullCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has cross-platform implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setWillSendRequestReturnsNull(JSValueToBoolean(context, arguments[0]));
+
+ return JSValueMakeUndefined(context);
+}
+
static JSValueRef setWillSendRequestReturnsNullOnRedirectCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
// Has cross-platform implementation
@@ -1287,6 +1315,7 @@ JSStaticFunction* LayoutTestController::staticFunctions()
{ "setCloseRemainingWindowsWhenComplete", setCloseRemainingWindowsWhenCompleteCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setCustomPolicyDelegate", setCustomPolicyDelegateCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setDatabaseQuota", setDatabaseQuotaCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setDomainRelaxationForbiddenForURLScheme", setDomainRelaxationForbiddenForURLSchemeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setGeolocationPermission", setGeolocationPermissionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setHandlesAuthenticationChallenges", setHandlesAuthenticationChallengesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setPOSIXLocale", setPOSIXLocaleCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -1307,6 +1336,7 @@ JSStaticFunction* LayoutTestController::staticFunctions()
{ "setUseDashboardCompatibilityMode", setUseDashboardCompatibilityModeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setUserStyleSheetEnabled", setUserStyleSheetEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setUserStyleSheetLocation", setUserStyleSheetLocationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setWillSendRequestReturnsNull", setWillSendRequestReturnsNullCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setWillSendRequestReturnsNullOnRedirect", setWillSendRequestReturnsNullOnRedirectCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setWindowIsKey", setWindowIsKeyCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "showWebInspector", showWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.h b/WebKitTools/DumpRenderTree/LayoutTestController.h
index 7e18dce..c8da6ab 100644
--- a/WebKitTools/DumpRenderTree/LayoutTestController.h
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.h
@@ -72,6 +72,7 @@ public:
void setCacheModel(int);
void setCustomPolicyDelegate(bool setDelegate, bool permissive);
void setDatabaseQuota(unsigned long long quota);
+ void setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme);
void setMockGeolocationPosition(double latitude, double longitude, double accuracy);
void setMockGeolocationError(int code, JSStringRef message);
void setIconDatabaseEnabled(bool iconDatabaseEnabled);
@@ -176,6 +177,9 @@ public:
void setWaitToDump(bool waitToDump);
void waitToDumpWatchdogTimerFired();
+ bool willSendRequestReturnsNull() const { return m_willSendRequestReturnsNull; }
+ void setWillSendRequestReturnsNull(bool returnsNull) { m_willSendRequestReturnsNull = returnsNull; }
+
bool willSendRequestReturnsNullOnRedirect() const { return m_willSendRequestReturnsNullOnRedirect; }
void setWillSendRequestReturnsNullOnRedirect(bool returnsNull) { m_willSendRequestReturnsNullOnRedirect = returnsNull; }
@@ -249,6 +253,7 @@ private:
bool m_testRepaint;
bool m_testRepaintSweepHorizontally;
bool m_waitToDump; // True if waitUntilDone() has been called, but notifyDone() has not yet been called.
+ bool m_willSendRequestReturnsNull;
bool m_willSendRequestReturnsNullOnRedirect;
bool m_windowIsKey;
bool m_alwaysAcceptCookies;
diff --git a/WebKitTools/DumpRenderTree/config.h b/WebKitTools/DumpRenderTree/config.h
index 063eeea..33dee6d 100644
--- a/WebKitTools/DumpRenderTree/config.h
+++ b/WebKitTools/DumpRenderTree/config.h
@@ -32,7 +32,7 @@
#include <wtf/FastMalloc.h>
#endif
-#if PLATFORM(WIN_OS) && !COMPILER(GCC)
+#if OS(WINDOWS) && !COMPILER(GCC)
#define JS_EXPORTDATA __declspec(dllimport)
#define WEBKIT_EXPORTDATA __declspec(dllimport)
#else
diff --git a/WebKitTools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp
index df06cea..12653fc 100644
--- a/WebKitTools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved.
* Copyright (C) 2009 Jan Michael Alonzo
*
* Redistribution and use in source and binary forms, with or without
@@ -73,3 +73,15 @@ void AccessibilityController::setLogFocusEvents(bool)
void AccessibilityController::setLogScrollingStartEvents(bool)
{
}
+
+void AccessibilityController::setLogValueChangeEvents(bool)
+{
+}
+
+void AccessibilityController::addNotificationListener(PlatformUIElement, JSObjectRef)
+{
+}
+
+void AccessibilityController::notificationReceived(PlatformUIElement, const std::string&)
+{
+}
diff --git a/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp b/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
index 13d313d..abfe115 100644
--- a/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
@@ -102,6 +102,12 @@ AccessibilityUIElement AccessibilityUIElement::getChildAtIndex(unsigned index)
return 0;
}
+unsigned AccessibilityUIElement::indexOfChild(AccessibilityUIElement* element)
+{
+ // FIXME: implement
+ return 0;
+}
+
JSStringRef AccessibilityUIElement::allAttributes()
{
// FIXME: implement
@@ -249,7 +255,7 @@ JSStringRef AccessibilityUIElement::orientation() const
return 0;
}
-double AccessibilityUIElement::intValue()
+double AccessibilityUIElement::intValue() const
{
GValue value = { 0, { { 0 } } };
@@ -359,6 +365,11 @@ bool AccessibilityUIElement::isExpanded() const
return false;
}
+bool AccessibilityUIElement::isChecked() const
+{
+ return intValue();
+}
+
JSStringRef AccessibilityUIElement::attributesOfColumnHeaders()
{
// FIXME: implement
@@ -448,12 +459,18 @@ void AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned le
// FIXME: implement
}
-JSStringRef AccessibilityUIElement::attributeValue(JSStringRef attribute)
+JSStringRef AccessibilityUIElement::stringAttributeValue(JSStringRef attribute)
{
// FIXME: implement
return JSStringCreateWithCharacters(0, 0);
}
+bool AccessibilityUIElement::boolAttributeValue(JSStringRef attribute)
+{
+ // FIXME: implement
+ return false;
+}
+
bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute)
{
// FIXME: implement
@@ -528,3 +545,71 @@ JSStringRef AccessibilityUIElement::documentURI()
return JSStringCreateWithUTF8CString(atk_document_get_attribute_value(ATK_DOCUMENT(m_element), "URI"));
}
+
+JSStringRef AccessibilityUIElement::url()
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+bool AccessibilityUIElement::addNotificationListener(JSObjectRef functionCallback)
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isSelectable() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isMultiSelectable() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isVisible() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isOffScreen() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isCollapsed() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::hasPopup() const
+{
+ // FIXME: implement
+ return false;
+}
+
+void AccessibilityUIElement::takeFocus()
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::takeSelection()
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::addSelection()
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::removeSelection()
+{
+ // FIXME: implement
+}
diff --git a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
index fd1e3c6..39430cf 100644
--- a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
@@ -333,6 +333,8 @@ static void resetDefaultsToConsistentValues()
"default-font-size", 16,
"default-monospace-font-size", 13,
"minimum-font-size", 1,
+ "enable-caret-browsing", FALSE,
+ "enable-page-cache", FALSE,
NULL);
webkit_web_frame_clear_main_frame_name(mainFrame);
@@ -340,6 +342,8 @@ static void resetDefaultsToConsistentValues()
WebKitWebInspector* inspector = webkit_web_view_get_inspector(webView);
g_object_set(G_OBJECT(inspector), "javascript-profiling-enabled", FALSE, NULL);
+ webkit_web_view_set_zoom_level(webView, 1.0);
+
webkit_reset_origin_access_white_lists();
setlocale(LC_ALL, "");
@@ -780,6 +784,11 @@ static WebKitWebView* createWebView()
"signal::close-window", webInspectorCloseWindow, 0,
NULL);
+ if (webView) {
+ WebKitWebSettings* settings = webkit_web_view_get_settings(webView);
+ webkit_web_view_set_settings(view, settings);
+ }
+
return view;
}
diff --git a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
index 6268b5b..458e0ba 100644
--- a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
@@ -76,6 +76,14 @@ static unsigned startOfQueue;
static const float zoomMultiplierRatio = 1.2f;
+// Key event location code defined in DOM Level 3.
+enum KeyLocationCode {
+ DOM_KEY_LOCATION_STANDARD = 0x00,
+ DOM_KEY_LOCATION_LEFT = 0x01,
+ DOM_KEY_LOCATION_RIGHT = 0x02,
+ DOM_KEY_LOCATION_NUMPAD = 0x03
+};
+
static JSValueRef getDragModeCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
{
return JSValueMakeBoolean(context, dragMode);
@@ -120,10 +128,10 @@ static JSValueRef contextClickCallback(JSContextRef context, JSObjectRef functio
return JSValueMakeUndefined(context);
}
-static void updateClickCount(int /* button */)
+static void updateClickCount(int button)
{
// FIXME: take the last clicked button number and the time of last click into account.
- if (lastClickPositionX != lastMousePositionX || lastClickPositionY != lastMousePositionY)
+ if (lastClickPositionX != lastMousePositionX || lastClickPositionY != lastMousePositionY || currentEventButton != button)
clickCount = 1;
else
clickCount++;
@@ -180,7 +188,7 @@ static JSValueRef mouseDownCallback(JSContextRef context, JSObjectRef function,
event.button.x_root = x_root;
event.button.y_root = y_root;
- updateClickCount(1);
+ updateClickCount(event.button.button);
if (!msgQueue[endOfQueue].delay) {
webkit_web_frame_layout(mainFrame);
@@ -449,66 +457,93 @@ static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS
}
}
+ // handle location argument.
+ int location = DOM_KEY_LOCATION_STANDARD;
+ if (argumentCount > 2)
+ location = (int)JSValueToNumber(context, arguments[2], exception);
+
JSStringRef character = JSValueToStringCopy(context, arguments[0], exception);
g_return_val_if_fail((!exception || !*exception), JSValueMakeUndefined(context));
- int gdkKeySym;
- if (JSStringIsEqualToUTF8CString(character, "leftArrow"))
- gdkKeySym = GDK_Left;
- else if (JSStringIsEqualToUTF8CString(character, "rightArrow"))
- gdkKeySym = GDK_Right;
- else if (JSStringIsEqualToUTF8CString(character, "upArrow"))
- gdkKeySym = GDK_Up;
- else if (JSStringIsEqualToUTF8CString(character, "downArrow"))
- gdkKeySym = GDK_Down;
- else if (JSStringIsEqualToUTF8CString(character, "pageUp"))
- gdkKeySym = GDK_Page_Up;
- else if (JSStringIsEqualToUTF8CString(character, "pageDown"))
- gdkKeySym = GDK_Page_Down;
- else if (JSStringIsEqualToUTF8CString(character, "home"))
- gdkKeySym = GDK_Home;
- else if (JSStringIsEqualToUTF8CString(character, "end"))
- gdkKeySym = GDK_End;
- else if (JSStringIsEqualToUTF8CString(character, "delete"))
- gdkKeySym = GDK_BackSpace;
- else if (JSStringIsEqualToUTF8CString(character, "F1"))
- gdkKeySym = GDK_F1;
- else if (JSStringIsEqualToUTF8CString(character, "F2"))
- gdkKeySym = GDK_F2;
- else if (JSStringIsEqualToUTF8CString(character, "F3"))
- gdkKeySym = GDK_F3;
- else if (JSStringIsEqualToUTF8CString(character, "F4"))
- gdkKeySym = GDK_F4;
- else if (JSStringIsEqualToUTF8CString(character, "F5"))
- gdkKeySym = GDK_F5;
- else if (JSStringIsEqualToUTF8CString(character, "F6"))
- gdkKeySym = GDK_F6;
- else if (JSStringIsEqualToUTF8CString(character, "F7"))
- gdkKeySym = GDK_F7;
- else if (JSStringIsEqualToUTF8CString(character, "F8"))
- gdkKeySym = GDK_F8;
- else if (JSStringIsEqualToUTF8CString(character, "F9"))
- gdkKeySym = GDK_F9;
- else if (JSStringIsEqualToUTF8CString(character, "F10"))
- gdkKeySym = GDK_F10;
- else if (JSStringIsEqualToUTF8CString(character, "F11"))
- gdkKeySym = GDK_F11;
- else if (JSStringIsEqualToUTF8CString(character, "F12"))
- gdkKeySym = GDK_F12;
- else {
- int charCode = JSStringGetCharactersPtr(character)[0];
- if (charCode == '\n' || charCode == '\r')
- gdkKeySym = GDK_Return;
- else if (charCode == '\t')
- gdkKeySym = GDK_Tab;
- else if (charCode == '\x8')
+ int gdkKeySym = GDK_VoidSymbol;
+ if (location == DOM_KEY_LOCATION_NUMPAD) {
+ if (JSStringIsEqualToUTF8CString(character, "leftArrow"))
+ gdkKeySym = GDK_KP_Left;
+ else if (JSStringIsEqualToUTF8CString(character, "rightArrow"))
+ gdkKeySym = GDK_KP_Right;
+ else if (JSStringIsEqualToUTF8CString(character, "upArrow"))
+ gdkKeySym = GDK_KP_Up;
+ else if (JSStringIsEqualToUTF8CString(character, "downArrow"))
+ gdkKeySym = GDK_KP_Down;
+ else if (JSStringIsEqualToUTF8CString(character, "pageUp"))
+ gdkKeySym = GDK_KP_Page_Up;
+ else if (JSStringIsEqualToUTF8CString(character, "pageDown"))
+ gdkKeySym = GDK_KP_Page_Down;
+ else if (JSStringIsEqualToUTF8CString(character, "home"))
+ gdkKeySym = GDK_KP_Home;
+ else if (JSStringIsEqualToUTF8CString(character, "end"))
+ gdkKeySym = GDK_KP_End;
+ else
+ // Assume we only get arrow/pgUp/pgDn/home/end keys with
+ // location=NUMPAD for now.
+ g_assert_not_reached();
+ } else {
+ if (JSStringIsEqualToUTF8CString(character, "leftArrow"))
+ gdkKeySym = GDK_Left;
+ else if (JSStringIsEqualToUTF8CString(character, "rightArrow"))
+ gdkKeySym = GDK_Right;
+ else if (JSStringIsEqualToUTF8CString(character, "upArrow"))
+ gdkKeySym = GDK_Up;
+ else if (JSStringIsEqualToUTF8CString(character, "downArrow"))
+ gdkKeySym = GDK_Down;
+ else if (JSStringIsEqualToUTF8CString(character, "pageUp"))
+ gdkKeySym = GDK_Page_Up;
+ else if (JSStringIsEqualToUTF8CString(character, "pageDown"))
+ gdkKeySym = GDK_Page_Down;
+ else if (JSStringIsEqualToUTF8CString(character, "home"))
+ gdkKeySym = GDK_Home;
+ else if (JSStringIsEqualToUTF8CString(character, "end"))
+ gdkKeySym = GDK_End;
+ else if (JSStringIsEqualToUTF8CString(character, "delete"))
gdkKeySym = GDK_BackSpace;
+ else if (JSStringIsEqualToUTF8CString(character, "F1"))
+ gdkKeySym = GDK_F1;
+ else if (JSStringIsEqualToUTF8CString(character, "F2"))
+ gdkKeySym = GDK_F2;
+ else if (JSStringIsEqualToUTF8CString(character, "F3"))
+ gdkKeySym = GDK_F3;
+ else if (JSStringIsEqualToUTF8CString(character, "F4"))
+ gdkKeySym = GDK_F4;
+ else if (JSStringIsEqualToUTF8CString(character, "F5"))
+ gdkKeySym = GDK_F5;
+ else if (JSStringIsEqualToUTF8CString(character, "F6"))
+ gdkKeySym = GDK_F6;
+ else if (JSStringIsEqualToUTF8CString(character, "F7"))
+ gdkKeySym = GDK_F7;
+ else if (JSStringIsEqualToUTF8CString(character, "F8"))
+ gdkKeySym = GDK_F8;
+ else if (JSStringIsEqualToUTF8CString(character, "F9"))
+ gdkKeySym = GDK_F9;
+ else if (JSStringIsEqualToUTF8CString(character, "F10"))
+ gdkKeySym = GDK_F10;
+ else if (JSStringIsEqualToUTF8CString(character, "F11"))
+ gdkKeySym = GDK_F11;
+ else if (JSStringIsEqualToUTF8CString(character, "F12"))
+ gdkKeySym = GDK_F12;
else {
- gdkKeySym = gdk_unicode_to_keyval(charCode);
- if (WTF::isASCIIUpper(charCode))
- state |= GDK_SHIFT_MASK;
+ int charCode = JSStringGetCharactersPtr(character)[0];
+ if (charCode == '\n' || charCode == '\r')
+ gdkKeySym = GDK_Return;
+ else if (charCode == '\t')
+ gdkKeySym = GDK_Tab;
+ else if (charCode == '\x8')
+ gdkKeySym = GDK_BackSpace;
+ else {
+ gdkKeySym = gdk_unicode_to_keyval(charCode);
+ if (WTF::isASCIIUpper(charCode))
+ state |= GDK_SHIFT_MASK;
+ }
}
}
-
JSStringRelease(character);
WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
index 6e94c1c..a74f7ad 100644
--- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
@@ -68,6 +68,8 @@ static gchar* copyWebSettingKey(gchar* preferenceKey)
keyTable = g_hash_table_new(g_str_hash, g_str_equal);
g_hash_table_insert(keyTable, g_strdup("WebKitJavaScriptEnabled"), g_strdup("enable-scripts"));
g_hash_table_insert(keyTable, g_strdup("WebKitDefaultFontSize"), g_strdup("default-font-size"));
+ g_hash_table_insert(keyTable, g_strdup("WebKitEnableCaretBrowsing"), g_strdup("enable-caret-browsing"));
+ g_hash_table_insert(keyTable, g_strdup("WebKitUsesPageCachePreferenceKey"), g_strdup("enable-page-cache"));
}
return g_strdup(static_cast<gchar*>(g_hash_table_lookup(keyTable, preferenceKey)));
@@ -424,6 +426,11 @@ void LayoutTestController::setDatabaseQuota(unsigned long long quota)
webkit_security_origin_set_web_database_quota(origin, quota);
}
+void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(bool, JSStringRef)
+{
+ // FIXME: implement
+}
+
void LayoutTestController::setAppCacheMaximumSize(unsigned long long size)
{
webkit_application_cache_set_maximum_size(size);
@@ -489,9 +496,12 @@ void LayoutTestController::overridePreference(JSStringRef key, JSStringRef value
g_value_transform(const_cast<GValue*>(&stringValue), &propValue);
g_object_set_property(G_OBJECT(settings), webSettingKey, const_cast<GValue*>(&propValue));
} else if (G_VALUE_HOLDS_BOOLEAN(&propValue)) {
+ char* lowered = g_utf8_strdown(strValue, -1);
g_object_set(G_OBJECT(settings), webSettingKey,
- g_str_equal(g_utf8_strdown(strValue, -1), "true"),
+ g_str_equal(lowered, "true")
+ || g_str_equal(strValue, "1"),
NULL);
+ g_free(lowered);
} else if (G_VALUE_HOLDS_INT(&propValue)) {
std::string str(strValue);
std::stringstream ss(str);
diff --git a/WebKitTools/DumpRenderTree/mac/AccessibilityControllerMac.mm b/WebKitTools/DumpRenderTree/mac/AccessibilityControllerMac.mm
index 67e0fa4..4d2da6e 100644
--- a/WebKitTools/DumpRenderTree/mac/AccessibilityControllerMac.mm
+++ b/WebKitTools/DumpRenderTree/mac/AccessibilityControllerMac.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 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
@@ -62,3 +62,14 @@ void AccessibilityController::setLogScrollingStartEvents(bool)
{
}
+void AccessibilityController::setLogValueChangeEvents(bool)
+{
+}
+
+void AccessibilityController::addNotificationListener(PlatformUIElement, JSObjectRef)
+{
+}
+
+void AccessibilityController::notificationReceived(PlatformUIElement, const std::string&)
+{
+}
diff --git a/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm b/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
index 948f379..e9361f2 100644
--- a/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
+++ b/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
@@ -28,6 +28,7 @@
#import "AccessibilityUIElement.h"
#import <Foundation/Foundation.h>
+#import <JavaScriptCore/JSRetainPtr.h>
#import <JavaScriptCore/JSStringRef.h>
#import <JavaScriptCore/JSStringRefCF.h>
#import <WebKit/WebFrame.h>
@@ -52,24 +53,33 @@
#define NSAccessibilityDropEffectsAttribute @"AXDropEffects"
#endif
-@interface NSObject (WebKitAccessibilityArrayCategory)
+typedef void (*AXPostedNotificationCallback)(id element, NSString* notification, void* context);
+
+@interface NSObject (WebKitAccessibilityAdditions)
- (NSArray *)accessibilityArrayAttributeValues:(NSString *)attribute index:(NSUInteger)index maxCount:(NSUInteger)maxCount;
+- (void)accessibilitySetPostedNotificationCallback:(AXPostedNotificationCallback)function withContext:(void*)context;
+- (NSUInteger)accessibilityIndexOfChild:(id)child;
@end
AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element)
: m_element(element)
+ , m_notificationFunctionCallback(0)
{
[m_element retain];
}
AccessibilityUIElement::AccessibilityUIElement(const AccessibilityUIElement& other)
: m_element(other.m_element)
+ , m_notificationFunctionCallback(0)
{
[m_element retain];
}
AccessibilityUIElement::~AccessibilityUIElement()
{
+ // Make sure that our notification callback does not stick around.
+ if (m_notificationFunctionCallback)
+ [m_element accessibilitySetPostedNotificationCallback:0 withContext:0];
[m_element release];
}
@@ -237,6 +247,11 @@ AccessibilityUIElement AccessibilityUIElement::elementAtPoint(int x, int y)
return AccessibilityUIElement(element);
}
+unsigned AccessibilityUIElement::indexOfChild(AccessibilityUIElement* element)
+{
+ return [m_element accessibilityIndexOfChild:element->platformUIElement()];
+}
+
AccessibilityUIElement AccessibilityUIElement::getChildAtIndex(unsigned index)
{
Vector<AccessibilityUIElement> children;
@@ -337,7 +352,7 @@ JSStringRef AccessibilityUIElement::allAttributes()
return [attributes createJSStringRef];
}
-JSStringRef AccessibilityUIElement::attributeValue(JSStringRef attribute)
+JSStringRef AccessibilityUIElement::stringAttributeValue(JSStringRef attribute)
{
id value = [m_element accessibilityAttributeValue:[NSString stringWithJSStringRef:attribute]];
if (![value isKindOfClass:[NSString class]])
@@ -345,6 +360,15 @@ JSStringRef AccessibilityUIElement::attributeValue(JSStringRef attribute)
return [value createJSStringRef];
}
+bool AccessibilityUIElement::boolAttributeValue(JSStringRef attribute)
+{
+ id value = [m_element accessibilityAttributeValue:[NSString stringWithJSStringRef:attribute]];
+ if (![value isKindOfClass:[NSNumber class]])
+ return NULL;
+
+ return [value boolValue];
+}
+
bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute)
{
return [m_element accessibilityIsAttributeSettable:[NSString stringWithJSStringRef:attribute]];
@@ -451,7 +475,7 @@ double AccessibilityUIElement::clickPointY()
return static_cast<double>([positionValue pointValue].y);
}
-double AccessibilityUIElement::intValue()
+double AccessibilityUIElement::intValue() const
{
id value = [m_element accessibilityAttributeValue:NSAccessibilityValueAttribute];
if ([value isKindOfClass:[NSNumber class]])
@@ -529,6 +553,12 @@ bool AccessibilityUIElement::isExpanded() const
return false;
}
+bool AccessibilityUIElement::isChecked() const
+{
+ // On the Mac, intValue()==1 if a a checkable control is checked.
+ return intValue() == 1;
+}
+
int AccessibilityUIElement::hierarchicalLevel() const
{
id value = [m_element accessibilityAttributeValue:NSAccessibilityDisclosureLevelAttribute];
@@ -721,3 +751,87 @@ JSStringRef AccessibilityUIElement::documentURI()
{
return JSStringCreateWithCharacters(0, 0);
}
+
+JSStringRef AccessibilityUIElement::url()
+{
+ NSURL *url = [m_element accessibilityAttributeValue:NSAccessibilityURLAttribute];
+ return [[url absoluteString] createJSStringRef];
+}
+
+static void _accessibilityNotificationCallback(id element, NSString* notification, void* context)
+{
+ if (!context)
+ return;
+
+ JSObjectRef functionCallback = static_cast<JSObjectRef>(context);
+
+ JSRetainPtr<JSStringRef> jsNotification(Adopt, [notification createJSStringRef]);
+ JSValueRef argument = JSValueMakeString([mainFrame globalContext], jsNotification.get());
+ JSObjectCallAsFunction([mainFrame globalContext], functionCallback, NULL, 1, &argument, NULL);
+}
+
+bool AccessibilityUIElement::addNotificationListener(JSObjectRef functionCallback)
+{
+ if (!functionCallback)
+ return false;
+
+ m_notificationFunctionCallback = functionCallback;
+ [platformUIElement() accessibilitySetPostedNotificationCallback:_accessibilityNotificationCallback withContext:reinterpret_cast<void*>(m_notificationFunctionCallback)];
+ return true;
+}
+
+bool AccessibilityUIElement::isSelectable() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isMultiSelectable() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isVisible() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isOffScreen() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isCollapsed() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::hasPopup() const
+{
+ // FIXME: implement
+ return false;
+}
+
+void AccessibilityUIElement::takeFocus()
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::takeSelection()
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::addSelection()
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::removeSelection()
+{
+ // FIXME: implement
+}
diff --git a/WebKitTools/DumpRenderTree/mac/CheckedMalloc.cpp b/WebKitTools/DumpRenderTree/mac/CheckedMalloc.cpp
index 85d0613..faef760 100644
--- a/WebKitTools/DumpRenderTree/mac/CheckedMalloc.cpp
+++ b/WebKitTools/DumpRenderTree/mac/CheckedMalloc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2006, 2007 Apple, Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
* (C) 2007 Graham Dennis (graham.dennis@gmail.com)
* (C) 2007 Eric Seidel <eric@webkit.org>
*
@@ -32,6 +32,7 @@
#import "CheckedMalloc.h"
#import <malloc/malloc.h>
+#import <sys/mman.h>
static void* (*savedMalloc)(malloc_zone_t*, size_t);
static void* (*savedRealloc)(malloc_zone_t*, void*, size_t);
@@ -53,8 +54,19 @@ static void* checkedRealloc(malloc_zone_t* zone, void* ptr, size_t size)
void makeLargeMallocFailSilently()
{
malloc_zone_t* zone = malloc_default_zone();
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ vm_address_t pageStart = reinterpret_cast<vm_address_t>(zone) & static_cast<vm_size_t>(~(getpagesize() - 1));
+ vm_size_t len = reinterpret_cast<vm_address_t>(zone) - pageStart + sizeof(malloc_zone_t);
+ mprotect(reinterpret_cast<void*>(pageStart), len, PROT_READ | PROT_WRITE);
+#endif
+
savedMalloc = zone->malloc;
savedRealloc = zone->realloc;
zone->malloc = checkedMalloc;
zone->realloc = checkedRealloc;
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ mprotect(reinterpret_cast<void*>(pageStart), len, PROT_READ);
+#endif
}
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
index 4ffeac3..12e1941 100644
--- a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
@@ -80,6 +80,7 @@
#import <objc/objc-runtime.h>
#import <wtf/Assertions.h>
#import <wtf/RetainPtr.h>
+#import <wtf/Threading.h>
#import <wtf/OwnPtr.h>
using namespace std;
@@ -466,6 +467,31 @@ static void setDefaultsToConsistentValuesForTesting()
}
+static void* runThread(void* arg)
+{
+ static ThreadIdentifier previousId = 0;
+ ThreadIdentifier currentId = currentThread();
+ // Verify 2 successive threads do not get the same Id.
+ ASSERT(previousId != currentId);
+ previousId = currentId;
+ return 0;
+}
+
+static void testThreadIdentifierMap()
+{
+ // Imitate 'foreign' threads that are not created by WTF.
+ pthread_t pthread;
+ pthread_create(&pthread, 0, &runThread, 0);
+ pthread_join(pthread, 0);
+
+ pthread_create(&pthread, 0, &runThread, 0);
+ pthread_join(pthread, 0);
+
+ // Now create another thread using WTF. On OSX, it will have the same pthread handle
+ // but should get a different ThreadIdentifier.
+ createThread(runThread, 0, "DumpRenderTree: test");
+}
+
static void crashHandler(int sig)
{
char *signalName = strsignal(sig);
@@ -614,6 +640,9 @@ void dumpRenderTree(int argc, const char *argv[])
// <rdar://problem/5222911>
testStringByEvaluatingJavaScriptFromString();
+ // http://webkit.org/b/32689
+ testThreadIdentifierMap();
+
if (threaded)
startJavaScriptThreads();
@@ -1075,15 +1104,20 @@ void dump()
} else
printf("ERROR: nil result from %s", methodNameStringForFailedTest());
+ // Stop the watchdog thread before we leave this test to make sure it doesn't
+ // fire in between tests causing the next test to fail.
+ // This is a speculative fix for: https://bugs.webkit.org/show_bug.cgi?id=32339
+ invalidateAnyPreviousWaitToDumpWatchdog();
+
if (printSeparators) {
puts("#EOF"); // terminate the content block
fputs("#EOF\n", stderr);
}
}
-
+
if (dumpPixels && !dumpAsText)
dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash());
-
+
puts("#EOF"); // terminate the (possibly empty) pixels block
fflush(stdout);
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTreeMac.h b/WebKitTools/DumpRenderTree/mac/DumpRenderTreeMac.h
index fe1ac00..5c93ee9 100644
--- a/WebKitTools/DumpRenderTree/mac/DumpRenderTreeMac.h
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTreeMac.h
@@ -36,6 +36,8 @@
#define BUILDING_ON_TIGER 1
#elif !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
#define BUILDING_ON_LEOPARD 1
+#elif !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
+#define BUILDING_ON_SNOW_LEOPARD 1
#endif
@class DumpRenderTreeDraggingInfo;
diff --git a/WebKitTools/DumpRenderTree/mac/EventSendingController.mm b/WebKitTools/DumpRenderTree/mac/EventSendingController.mm
index 1cba53b..feaeddc 100644
--- a/WebKitTools/DumpRenderTree/mac/EventSendingController.mm
+++ b/WebKitTools/DumpRenderTree/mac/EventSendingController.mm
@@ -125,11 +125,11 @@ BOOL replayingSavedEvents;
|| aSelector == @selector(contextClick)
|| aSelector == @selector(enableDOMUIEventLogging:)
|| aSelector == @selector(fireKeyboardEventsToElement:)
- || aSelector == @selector(keyDown:withModifiers:)
+ || aSelector == @selector(keyDown:withModifiers:withLocation:)
|| aSelector == @selector(leapForward:)
- || aSelector == @selector(mouseDown:)
+ || aSelector == @selector(mouseDown:withModifiers:)
|| aSelector == @selector(mouseMoveToX:Y:)
- || aSelector == @selector(mouseUp:)
+ || aSelector == @selector(mouseUp:withModifiers:)
|| aSelector == @selector(scheduleAsynchronousClick)
|| aSelector == @selector(textZoomIn)
|| aSelector == @selector(textZoomOut)
@@ -154,13 +154,13 @@ BOOL replayingSavedEvents;
return @"enableDOMUIEventLogging";
if (aSelector == @selector(fireKeyboardEventsToElement:))
return @"fireKeyboardEventsToElement";
- if (aSelector == @selector(keyDown:withModifiers:))
+ if (aSelector == @selector(keyDown:withModifiers:withLocation:))
return @"keyDown";
if (aSelector == @selector(leapForward:))
return @"leapForward";
- if (aSelector == @selector(mouseDown:))
+ if (aSelector == @selector(mouseDown:withModifiers:))
return @"mouseDown";
- if (aSelector == @selector(mouseUp:))
+ if (aSelector == @selector(mouseUp:withModifiers:))
return @"mouseUp";
if (aSelector == @selector(mouseMoveToX:Y:))
return @"mouseMoveTo";
@@ -285,7 +285,26 @@ static NSEventType eventTypeForMouseButtonAndAction(int button, MouseAction acti
clickCount++;
}
-- (void)mouseDown:(int)buttonNumber
+static int buildModifierFlags(const WebScriptObject* modifiers)
+{
+ int flags = 0;
+ if (![modifiers isKindOfClass:[WebScriptObject class]])
+ return flags;
+ for (unsigned i = 0; [[modifiers webScriptValueAtIndex:i] isKindOfClass:[NSString class]]; i++) {
+ NSString* modifierName = (NSString*)[modifiers webScriptValueAtIndex:i];
+ if ([modifierName isEqual:@"ctrlKey"])
+ flags |= NSControlKeyMask;
+ else if ([modifierName isEqual:@"shiftKey"] || [modifierName isEqual:@"rangeSelectionKey"])
+ flags |= NSShiftKeyMask;
+ else if ([modifierName isEqual:@"altKey"])
+ flags |= NSAlternateKeyMask;
+ else if ([modifierName isEqual:@"metaKey"] || [modifierName isEqual:@"addSelectionKey"])
+ flags |= NSCommandKeyMask;
+ }
+ return flags;
+}
+
+- (void)mouseDown:(int)buttonNumber withModifiers:(WebScriptObject*)modifiers
{
[[[mainFrame frameView] documentView] layout];
[self updateClickCountForButton:buttonNumber];
@@ -293,7 +312,7 @@ static NSEventType eventTypeForMouseButtonAndAction(int button, MouseAction acti
NSEventType eventType = eventTypeForMouseButtonAndAction(buttonNumber, MouseDown);
NSEvent *event = [NSEvent mouseEventWithType:eventType
location:lastMousePosition
- modifierFlags:0
+ modifierFlags:buildModifierFlags(modifiers)
timestamp:[self currentEventTime]
windowNumber:[[[mainFrame webView] window] windowNumber]
context:[NSGraphicsContext currentContext]
@@ -309,6 +328,11 @@ static NSEventType eventTypeForMouseButtonAndAction(int button, MouseAction acti
}
}
+- (void)mouseDown:(int)buttonNumber
+{
+ [self mouseDown:buttonNumber withModifiers:nil];
+}
+
- (void)textZoomIn
{
[[mainFrame webView] makeTextLarger:self];
@@ -329,13 +353,14 @@ static NSEventType eventTypeForMouseButtonAndAction(int button, MouseAction acti
[[mainFrame webView] zoomPageOut:self];
}
-- (void)mouseUp:(int)buttonNumber
+- (void)mouseUp:(int)buttonNumber withModifiers:(WebScriptObject*)modifiers
{
if (dragMode && !replayingSavedEvents) {
- NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[EventSendingController instanceMethodSignatureForSelector:@selector(mouseUp:)]];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[EventSendingController instanceMethodSignatureForSelector:@selector(mouseUp:withModifiers:)]];
[invocation setTarget:self];
- [invocation setSelector:@selector(mouseUp:)];
+ [invocation setSelector:@selector(mouseUp:withModifiers:)];
[invocation setArgument:&buttonNumber atIndex:2];
+ [invocation setArgument:&modifiers atIndex:3];
[EventSendingController saveEvent:invocation];
[EventSendingController replaySavedEvents];
@@ -347,7 +372,7 @@ static NSEventType eventTypeForMouseButtonAndAction(int button, MouseAction acti
NSEventType eventType = eventTypeForMouseButtonAndAction(buttonNumber, MouseUp);
NSEvent *event = [NSEvent mouseEventWithType:eventType
location:lastMousePosition
- modifierFlags:0
+ modifierFlags:buildModifierFlags(modifiers)
timestamp:[self currentEventTime]
windowNumber:[[[mainFrame webView] window] windowNumber]
context:[NSGraphicsContext currentContext]
@@ -383,6 +408,11 @@ static NSEventType eventTypeForMouseButtonAndAction(int button, MouseAction acti
}
}
+- (void)mouseUp:(int)buttonNumber
+{
+ [self mouseUp:buttonNumber withModifiers:nil];
+}
+
- (void)mouseMoveToX:(int)x Y:(int)y
{
if (dragMode && leftMouseButtonDown && !replayingSavedEvents) {
@@ -474,7 +504,7 @@ static NSEventType eventTypeForMouseButtonAndAction(int button, MouseAction acti
savedMouseEvents = nil;
}
-- (void)keyDown:(NSString *)character withModifiers:(WebScriptObject *)modifiers
+- (void)keyDown:(NSString *)character withModifiers:(WebScriptObject *)modifiers withLocation:(unsigned long)keyLocation
{
NSString *eventCharacter = character;
if ([character isEqualToString:@"leftArrow"]) {
@@ -524,19 +554,10 @@ static NSEventType eventTypeForMouseButtonAndAction(int button, MouseAction acti
charactersIgnoringModifiers = [character lowercaseString];
}
- if ([modifiers isKindOfClass:[WebScriptObject class]]) {
- for (unsigned i = 0; [[modifiers webScriptValueAtIndex:i] isKindOfClass:[NSString class]]; i++) {
- NSString *modifier = (NSString *)[modifiers webScriptValueAtIndex:i];
- if ([modifier isEqual:@"ctrlKey"])
- modifierFlags |= NSControlKeyMask;
- else if ([modifier isEqual:@"shiftKey"])
- modifierFlags |= NSShiftKeyMask;
- else if ([modifier isEqual:@"altKey"])
- modifierFlags |= NSAlternateKeyMask;
- else if ([modifier isEqual:@"metaKey"])
- modifierFlags |= NSCommandKeyMask;
- }
- }
+ modifierFlags |= buildModifierFlags(modifiers);
+
+ if (keyLocation == DOM_KEY_LOCATION_NUMPAD)
+ modifierFlags |= NSNumericPadKeyMask;
[[[mainFrame frameView] documentView] layout];
diff --git a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
index 69fe19f..5f020fa 100644
--- a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
+++ b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
@@ -251,6 +251,12 @@ void LayoutTestController::setDatabaseQuota(unsigned long long quota)
[origin release];
}
+void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme)
+{
+ RetainPtr<CFStringRef> schemeCFString(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, scheme));
+ [WebView _setDomainRelaxationForbidden:forbidden forURLScheme:(NSString *)schemeCFString.get()];
+}
+
void LayoutTestController::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
{
[WebGeolocationMock setPosition:latitude:longitude:accuracy];
diff --git a/WebKitTools/DumpRenderTree/mac/ObjCController.m b/WebKitTools/DumpRenderTree/mac/ObjCController.m
index e0d663e..aa9ee49 100644
--- a/WebKitTools/DumpRenderTree/mac/ObjCController.m
+++ b/WebKitTools/DumpRenderTree/mac/ObjCController.m
@@ -58,6 +58,7 @@ static void* runJavaScriptThread(void* arg)
if (0
|| aSelector == @selector(classNameOf:)
|| aSelector == @selector(objectOfClass:)
+ || aSelector == @selector(arrayOfString)
|| aSelector == @selector(identityIsEqual::)
|| aSelector == @selector(longLongRoundTrip:)
|| aSelector == @selector(unsignedLongLongRoundTrip:)
@@ -77,6 +78,8 @@ static void* runJavaScriptThread(void* arg)
return @"className";
if (aSelector == @selector(objectOfClass:))
return @"objectOfClass";
+ if (aSelector == @selector(arrayOfString))
+ return @"arrayOfString";
if (aSelector == @selector(identityIsEqual::))
return @"identityIsEqual";
if (aSelector == @selector(longLongRoundTrip:))
@@ -122,6 +125,16 @@ static void* runJavaScriptThread(void* arg)
return nil;
}
+- (NSArray *)arrayOfString
+{
+ NSString *strings[3];
+ strings[0] = @"one";
+ strings[1] = @"two";
+ strings[2] = @"three";
+ NSArray *array = [NSArray arrayWithObjects:strings count:3];
+ return array;
+}
+
- (BOOL)identityIsEqual:(WebScriptObject *)a :(WebScriptObject *)b
{
if ([a isKindOfClass:[NSString class]] && [b isKindOfClass:[NSString class]])
@@ -196,10 +209,9 @@ static void* runJavaScriptThread(void* arg)
{
#if !ASSERT_DISABLED
BOOL isWindowObject = [storedWebScriptObject isKindOfClass:[DOMAbstractView class]];
-#endif
JSObjectRef jsObject = [storedWebScriptObject JSObject];
ASSERT((jsObject && isWindowObject) || (!jsObject && !isWindowObject));
-
+#endif
[storedWebScriptObject callWebScriptMethod:@"" withArguments:nil];
[storedWebScriptObject evaluateWebScript:@""];
[storedWebScriptObject setValue:[WebUndefined undefined] forKey:@"key"];
diff --git a/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm b/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm
index 3aaba59..6f82e01 100644
--- a/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm
+++ b/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm
@@ -129,6 +129,9 @@
printf("%s\n", [string UTF8String]);
}
+ if (!done && gLayoutTestController->willSendRequestReturnsNull())
+ return nil;
+
if (!done && gLayoutTestController->willSendRequestReturnsNullOnRedirect() && redirectResponse) {
printf("Returning null for this redirect\n");
return nil;
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
index 81e929b..ad42bdd 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
@@ -17,29 +17,32 @@ INCLUDEPATH += ../../../JavaScriptCore/ForwardingHeaders
INCLUDEPATH += $$BASEDIR
DESTDIR = ../../../bin
-CONFIG += link_pkgconfig
-PKGCONFIG += fontconfig
+!win32 {
+ CONFIG += link_pkgconfig
+ PKGCONFIG += fontconfig
+}
-QT = core gui network
+QT = core gui network testlib
macx: QT += xml
HEADERS = $$BASEDIR/WorkQueue.h \
- WorkQueueItem.h \
- DumpRenderTree.h \
+ DumpRenderTreeQt.h \
EventSenderQt.h \
TextInputControllerQt.h \
+ WorkQueueItemQt.h \
LayoutTestControllerQt.h \
- jsobjects.h \
+ GCControllerQt.h \
testplugin.h
-SOURCES = $$BASEDIR/WorkQueue.cpp \
- DumpRenderTree.cpp \
+SOURCES = ../../../JavaScriptCore/wtf/Assertions.cpp \
+ $$BASEDIR/WorkQueue.cpp \
+ DumpRenderTreeQt.cpp \
EventSenderQt.cpp \
TextInputControllerQt.cpp \
WorkQueueItemQt.cpp \
LayoutTestControllerQt.cpp \
- main.cpp \
- jsobjects.cpp \
- testplugin.cpp
+ GCControllerQt.cpp \
+ testplugin.cpp \
+ main.cpp
unix:!mac {
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
index 6d466bf..9916f24 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
@@ -31,11 +31,11 @@
#include "config.h"
-#include "DumpRenderTree.h"
+#include "DumpRenderTreeQt.h"
#include "EventSenderQt.h"
+#include "GCControllerQt.h"
#include "LayoutTestControllerQt.h"
#include "TextInputControllerQt.h"
-#include "jsobjects.h"
#include "testplugin.h"
#include "WorkQueue.h"
@@ -48,6 +48,7 @@
#include <QFileInfo>
#include <QFocusEvent>
#include <QFontDatabase>
+#include <QLocale>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
@@ -66,7 +67,10 @@
#include <limits.h>
+#ifndef Q_OS_WIN
#include <unistd.h>
+#endif
+
#include <qdebug.h>
extern void qt_drt_run(bool b);
@@ -86,13 +90,13 @@ const unsigned int maxViewHeight = 600;
NetworkAccessManager::NetworkAccessManager(QObject* parent)
: QNetworkAccessManager(parent)
{
-#ifndef QT_NO_SSL
+#ifndef QT_NO_OPENSSL
connect(this, SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)),
this, SLOT(sslErrorsEncountered(QNetworkReply*, const QList<QSslError>&)));
#endif
}
-#ifndef QT_NO_SSL
+#ifndef QT_NO_OPENSSL
void NetworkAccessManager::sslErrorsEncountered(QNetworkReply* reply, const QList<QSslError>& errors)
{
if (reply->url().host() == "127.0.0.1" || reply->url().host() == "localhost") {
@@ -158,7 +162,6 @@ void WebPage::resetSettings()
{
// After each layout test, reset the settings that may have been changed by
// layoutTestController.overridePreference() or similar.
-
settings()->resetFontSize(QWebSettings::DefaultFontSize);
settings()->resetAttribute(QWebSettings::JavascriptCanOpenWindows);
settings()->resetAttribute(QWebSettings::JavascriptEnabled);
@@ -166,7 +169,12 @@ void WebPage::resetSettings()
settings()->resetAttribute(QWebSettings::LinksIncludedInFocusChain);
settings()->resetAttribute(QWebSettings::OfflineWebApplicationCacheEnabled);
settings()->resetAttribute(QWebSettings::LocalContentCanAccessRemoteUrls);
+
+ // globalSettings must be reset explicitly.
+ m_drt->layoutTestController()->setXSSAuditorEnabled(false);
+
QWebSettings::setMaximumPagesInCache(0); // reset to default
+ settings()->setUserStyleSheetUrl(QUrl()); // reset to default
}
QWebPage *WebPage::createWindow(QWebPage::WebWindowType)
@@ -305,8 +313,8 @@ QObject* WebPage::createPlugin(const QString& classId, const QUrl& url, const QS
DumpRenderTree::DumpRenderTree()
: m_dumpPixels(false)
, m_stdin(0)
- , m_notifier(0)
, m_enableTextOutput(false)
+ , m_singleFileMode(false)
{
qt_drt_overwritePluginDirectories();
QWebSettings::enablePersistentStorage();
@@ -317,9 +325,12 @@ DumpRenderTree::DumpRenderTree()
m_page = new WebPage(m_mainView, this);
m_mainView->setPage(m_page);
- // create out controllers. This has to be done before connectFrame,
+ // create our controllers. This has to be done before connectFrame,
// as it exports there to the JavaScript DOM window.
m_controller = new LayoutTestController(this);
+ connect(m_controller, SIGNAL(showPage()), this, SLOT(showPage()));
+ connect(m_controller, SIGNAL(hidePage()), this, SLOT(hidePage()));
+
connect(m_controller, SIGNAL(done()), this, SLOT(dump()));
m_eventSender = new EventSender(m_page);
m_textInputController = new TextInputController(m_page);
@@ -332,6 +343,11 @@ DumpRenderTree::DumpRenderTree()
connect(m_page, SIGNAL(loadFinished(bool)),
m_controller, SLOT(maybeDump(bool)));
+ // We need to connect to loadStarted() because notifyDone should only
+ // dump results itself when the last page loaded in the test has finished loading.
+ connect(m_page, SIGNAL(loadStarted()),
+ m_controller, SLOT(resetLoadFinished()));
+ connect(m_page, SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested()));
connect(m_page->mainFrame(), SIGNAL(titleChanged(const QString&)),
SLOT(titleChanged(const QString&)));
@@ -350,20 +366,6 @@ DumpRenderTree::~DumpRenderTree()
{
delete m_mainView;
delete m_stdin;
- delete m_notifier;
-}
-
-void DumpRenderTree::open()
-{
- if (!m_stdin) {
- m_stdin = new QFile;
- m_stdin->open(stdin, QFile::ReadOnly);
- }
-
- if (!m_notifier) {
- m_notifier = new QSocketNotifier(STDIN_FILENO, QSocketNotifier::Read);
- connect(m_notifier, SIGNAL(activated(int)), this, SLOT(readStdin(int)));
- }
}
static void clearHistory(QWebPage* page)
@@ -438,6 +440,7 @@ void DumpRenderTree::open(const QUrl& aurl)
QFocusEvent ev(QEvent::FocusIn);
m_page->event(&ev);
+ QWebSettings::clearMemoryCaches();
QFontDatabase::removeAllApplicationFonts();
#if defined(Q_WS_X11)
initializeFonts();
@@ -448,20 +451,59 @@ void DumpRenderTree::open(const QUrl& aurl)
m_page->mainFrame()->load(url);
}
-void DumpRenderTree::readStdin(int /* socket */)
+void DumpRenderTree::readLine()
+{
+ if (!m_stdin) {
+ m_stdin = new QFile;
+ m_stdin->open(stdin, QFile::ReadOnly);
+
+ if (!m_stdin->isReadable()) {
+ emit quit();
+ return;
+ }
+ }
+
+ QByteArray line = m_stdin->readLine().trimmed();
+
+ if (line.isEmpty()) {
+ emit quit();
+ return;
+ }
+
+ processLine(QString::fromLocal8Bit(line.constData(), line.length()));
+}
+
+void DumpRenderTree::processLine(const QString &input)
{
- // Read incoming data from stdin...
- QByteArray line = m_stdin->readLine();
- if (line.endsWith('\n'))
- line.truncate(line.size()-1);
- //fprintf(stderr, "\n opening %s\n", line.constData());
- if (line.isEmpty())
- quit();
+ QString line = input;
- if (line.startsWith("http:") || line.startsWith("https:"))
+ if (line.startsWith(QLatin1String("http:"))
+ || line.startsWith(QLatin1String("https:"))
+ || line.startsWith(QLatin1String("file:"))) {
open(QUrl(line));
- else {
+ } else {
QFileInfo fi(line);
+
+ if (!fi.exists()) {
+ QDir currentDir = QDir::currentPath();
+
+ // Try to be smart about where the test is located
+ if (currentDir.dirName() == QLatin1String("LayoutTests"))
+ fi = QFileInfo(currentDir, line.replace(QRegExp(".*?LayoutTests/(.*)"), "\\1"));
+ else if (!line.contains(QLatin1String("LayoutTests")))
+ fi = QFileInfo(currentDir, line.prepend(QLatin1String("LayoutTests/")));
+
+ if (!fi.exists()) {
+ if (isSingleFileMode())
+ emit quit();
+ else
+ emit ready();
+
+ return;
+ }
+
+ }
+
open(QUrl::fromLocalFile(fi.absoluteFilePath()));
}
@@ -490,6 +532,18 @@ void DumpRenderTree::initJSObjects()
frame->addToJavaScriptWindowObject(QLatin1String("GCController"), m_gcController);
}
+void DumpRenderTree::showPage()
+{
+ m_mainView->show();
+ // we need a paint event but cannot process all the events
+ QPixmap pixmap(m_mainView->size());
+ m_mainView->render(&pixmap);
+}
+
+void DumpRenderTree::hidePage()
+{
+ m_mainView->hide();
+}
QString DumpRenderTree::dumpFramesAsText(QWebFrame* frame)
{
@@ -602,11 +656,12 @@ static const char *methodNameStringForFailedTest(LayoutTestController *controlle
void DumpRenderTree::dump()
{
+ // Prevent any further frame load callbacks from appearing after we dump the result.
+ qt_dump_frame_loader(false);
+
QWebFrame *mainFrame = m_page->mainFrame();
- //fprintf(stderr, " Dumping\n");
- if (!m_notifier) {
- // Dump markup in single file mode...
+ if (isSingleFileMode()) {
QString markup = mainFrame->toHtml();
fprintf(stdout, "Source:\n\n%s\n", markup.toUtf8().constData());
}
@@ -684,8 +739,10 @@ void DumpRenderTree::dump()
fflush(stdout);
fflush(stderr);
- if (!m_notifier)
- quit(); // Exit now in single file mode...
+ if (isSingleFileMode())
+ emit quit();
+ else
+ emit ready();
}
void DumpRenderTree::titleChanged(const QString &s)
@@ -741,15 +798,30 @@ QWebPage *DumpRenderTree::createWindow()
connect(page, SIGNAL(frameCreated(QWebFrame*)), this, SLOT(connectFrame(QWebFrame*)));
connectFrame(page->mainFrame());
connect(page, SIGNAL(loadFinished(bool)), m_controller, SLOT(maybeDump(bool)));
+ connect(page, SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested()));
return page;
}
+void DumpRenderTree::windowCloseRequested()
+{
+ QWebPage* page = qobject_cast<QWebPage*>(sender());
+ QObject* container = page->parent();
+ windows.removeAll(container);
+ container->deleteLater();
+}
+
int DumpRenderTree::windowCount() const
{
// include the main view in the count
return windows.count() + 1;
}
+void DumpRenderTree::switchFocus(bool focused)
+{
+ QFocusEvent event((focused) ? QEvent::FocusIn : QEvent::FocusOut, Qt::ActiveWindowFocusReason);
+ QApplication::sendEvent(m_mainView, &event);
+}
+
#if defined(Q_WS_X11)
void DumpRenderTree::initializeFonts()
{
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h
index ab229fe..00d7ae4 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h
@@ -27,8 +27,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DUMPRENDERTREE_H
-#define DUMPRENDERTREE_H
+#ifndef DumpRenderTreeQt_h
+#define DumpRenderTreeQt_h
#include <QList>
#include <QNetworkAccessManager>
@@ -36,7 +36,7 @@
#include <QTextStream>
#include <QSocketNotifier>
-#ifndef QT_NO_SSL
+#ifndef QT_NO_OPENSSL
#include <QSslError>
#endif
@@ -68,15 +68,15 @@ public:
DumpRenderTree();
virtual ~DumpRenderTree();
- // Initialize in multi-file mode, used by run-webkit-tests.
- void open();
-
// Initialize in single-file mode.
void open(const QUrl& url);
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 setDumpPixels(bool);
void closeRemainingWindows();
@@ -89,6 +89,8 @@ public:
QWebPage *createWindow();
int windowCount() const;
+ void switchFocus(bool focused);
+
WebPage *webPage() const { return m_page; }
@@ -98,15 +100,24 @@ public:
public Q_SLOTS:
void initJSObjects();
- void readStdin(int);
+
+ void readLine();
+ void processLine(const QString&);
+
void dump();
void titleChanged(const QString &s);
void connectFrame(QWebFrame *frame);
void dumpDatabaseQuota(QWebFrame* frame, const QString& dbName);
void statusBarMessage(const QString& message);
+ void windowCloseRequested();
Q_SIGNALS:
void quit();
+ void ready();
+
+private Q_SLOTS:
+ void showPage();
+ void hidePage();
private:
QString dumpFramesAsText(QWebFrame* frame);
@@ -124,10 +135,10 @@ private:
GCController* m_gcController;
QFile *m_stdin;
- QSocketNotifier* m_notifier;
QList<QObject*> windows;
bool m_enableTextOutput;
+ bool m_singleFileMode;
};
class NetworkAccessManager : public QNetworkAccessManager {
@@ -136,7 +147,7 @@ public:
NetworkAccessManager(QObject* parent);
private slots:
-#ifndef QT_NO_SSL
+#ifndef QT_NO_OPENSSL
void sslErrorsEncountered(QNetworkReply*, const QList<QSslError>&);
#endif
};
diff --git a/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp b/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp
index a0da273..73a9934 100644
--- a/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp
@@ -31,6 +31,8 @@
//#include <QtDebug>
+#include <QtTest/QtTest>
+
#define KEYCODE_DEL 127
#define KEYCODE_BACKSPACE 8
#define KEYCODE_LEFTARROW 0xf702
@@ -38,11 +40,34 @@
#define KEYCODE_UPARROW 0xf700
#define KEYCODE_DOWNARROW 0xf701
+// Ports like Gtk and Windows expose a different approach for their zooming
+// API if compared to Qt: they have specific methods for zooming in and out,
+// as well as a settable zoom factor, while Qt has only a 'setZoomValue' method.
+// Hence Qt DRT adopts a fixed zoom-factor (1.2) for compatibility.
+#define ZOOM_STEP 1.2
+
+#define DRT_MESSAGE_DONE (QEvent::User + 1)
+
+struct DRTEventQueue {
+ QEvent* m_event;
+ int m_delay;
+};
+
+static DRTEventQueue eventQueue[1024];
+static unsigned endOfQueue;
+static unsigned startOfQueue;
EventSender::EventSender(QWebPage* parent)
: QObject(parent)
{
m_page = parent;
+ m_mouseButtonPressed = false;
+ m_drag = false;
+ memset(eventQueue, 0, sizeof(eventQueue));
+ endOfQueue = 0;
+ startOfQueue = 0;
+ m_eventLoop = 0;
+ m_page->view()->installEventFilter(this);
}
void EventSender::mouseDown(int button)
@@ -67,9 +92,11 @@ void EventSender::mouseDown(int button)
break;
}
+ m_mouseButtons |= mouseButton;
+
// qDebug() << "EventSender::mouseDown" << frame;
- QMouseEvent event(QEvent::MouseButtonPress, m_mousePos, mouseButton, mouseButton, Qt::NoModifier);
- QApplication::sendEvent(m_page, &event);
+ QMouseEvent* event = new QMouseEvent(QEvent::MouseButtonPress, m_mousePos, m_mousePos, mouseButton, m_mouseButtons, Qt::NoModifier);
+ sendOrQueueEvent(event);
}
void EventSender::mouseUp(int button)
@@ -94,26 +121,28 @@ void EventSender::mouseUp(int button)
break;
}
+ m_mouseButtons &= ~mouseButton;
+
// qDebug() << "EventSender::mouseUp" << frame;
- QMouseEvent event(QEvent::MouseButtonRelease, m_mousePos, mouseButton, mouseButton, Qt::NoModifier);
- QApplication::sendEvent(m_page, &event);
+ QMouseEvent* event = new QMouseEvent(QEvent::MouseButtonRelease, m_mousePos, m_mousePos, mouseButton, m_mouseButtons, Qt::NoModifier);
+ sendOrQueueEvent(event);
}
void EventSender::mouseMoveTo(int x, int y)
{
// qDebug() << "EventSender::mouseMoveTo" << x << y;
m_mousePos = QPoint(x, y);
- QMouseEvent event(QEvent::MouseMove, m_mousePos, Qt::NoButton, Qt::NoButton, Qt::NoModifier);
- QApplication::sendEvent(m_page, &event);
+ QMouseEvent* event = new QMouseEvent(QEvent::MouseMove, m_mousePos, m_mousePos, Qt::NoButton, m_mouseButtons, Qt::NoModifier);
+ sendOrQueueEvent(event);
}
void EventSender::leapForward(int ms)
{
- m_timeLeap += ms;
+ eventQueue[endOfQueue].m_delay = ms;
//qDebug() << "EventSender::leapForward" << ms;
}
-void EventSender::keyDown(const QString& string, const QStringList& modifiers)
+void EventSender::keyDown(const QString& string, const QStringList& modifiers, unsigned int location)
{
QString s = string;
Qt::KeyboardModifiers modifs = 0;
@@ -128,12 +157,16 @@ void EventSender::keyDown(const QString& string, const QStringList& modifiers)
else if (m == "metaKey")
modifs |= Qt::MetaModifier;
}
+ if (location == 3)
+ modifs |= Qt::KeypadModifier;
int code = 0;
if (string.length() == 1) {
code = string.unicode()->unicode();
//qDebug() << ">>>>>>>>> keyDown" << code << (char)code;
// map special keycodes used by the tests to something that works for Qt/X11
- if (code == '\t') {
+ if (code == '\r') {
+ code = Qt::Key_Return;
+ } else if (code == '\t') {
code = Qt::Key_Tab;
if (modifs == Qt::ShiftModifier)
code = Qt::Key_Backtab;
@@ -251,6 +284,131 @@ void EventSender::scheduleAsynchronousClick()
QApplication::postEvent(m_page, event2);
}
+void EventSender::addTouchPoint(int x, int y)
+{
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ int id = m_touchPoints.count();
+ QTouchEvent::TouchPoint point(id);
+ m_touchPoints.append(point);
+ updateTouchPoint(id, x, y);
+ m_touchPoints[id].setState(Qt::TouchPointPressed);
+#endif
+}
+
+void EventSender::updateTouchPoint(int index, int x, int y)
+{
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ if (index < 0 || index >= m_touchPoints.count())
+ return;
+
+ QTouchEvent::TouchPoint &p = m_touchPoints[index];
+ p.setPos(QPointF(x, y));
+ p.setState(Qt::TouchPointMoved);
+#endif
+}
+
+void EventSender::setTouchModifier(const QString &modifier, bool enable)
+{
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ Qt::KeyboardModifier mod = Qt::NoModifier;
+ if (!modifier.compare(QLatin1String("shift"), Qt::CaseInsensitive))
+ mod = Qt::ShiftModifier;
+ else if (!modifier.compare(QLatin1String("alt"), Qt::CaseInsensitive))
+ mod = Qt::AltModifier;
+ else if (!modifier.compare(QLatin1String("meta"), Qt::CaseInsensitive))
+ mod = Qt::MetaModifier;
+ else if (!modifier.compare(QLatin1String("ctrl"), Qt::CaseInsensitive))
+ mod = Qt::ControlModifier;
+
+ if (enable)
+ m_touchModifiers |= mod;
+ else
+ m_touchModifiers &= ~mod;
+#endif
+}
+
+void EventSender::touchStart()
+{
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ if (!m_touchActive) {
+ sendTouchEvent(QEvent::TouchBegin);
+ m_touchActive = true;
+ } else
+ sendTouchEvent(QEvent::TouchUpdate);
+#endif
+}
+
+void EventSender::touchMove()
+{
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ sendTouchEvent(QEvent::TouchUpdate);
+#endif
+}
+
+void EventSender::touchEnd()
+{
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ for (int i = 0; i < m_touchPoints.count(); ++i)
+ if (m_touchPoints[i].state() != Qt::TouchPointReleased) {
+ sendTouchEvent(QEvent::TouchUpdate);
+ return;
+ }
+ sendTouchEvent(QEvent::TouchEnd);
+ m_touchActive = false;
+#endif
+}
+
+void EventSender::clearTouchPoints()
+{
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ m_touchPoints.clear();
+ m_touchModifiers = Qt::KeyboardModifiers();
+ m_touchActive = false;
+#endif
+}
+
+void EventSender::releaseTouchPoint(int index)
+{
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ if (index < 0 || index >= m_touchPoints.count())
+ return;
+
+ m_touchPoints[index].setState(Qt::TouchPointReleased);
+#endif
+}
+
+void EventSender::sendTouchEvent(QEvent::Type type)
+{
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ QTouchEvent event(type, QTouchEvent::TouchScreen, m_touchModifiers);
+ event.setTouchPoints(m_touchPoints);
+ QApplication::sendEvent(m_page, &event);
+ QList<QTouchEvent::TouchPoint>::Iterator it = m_touchPoints.begin();
+ while (it != m_touchPoints.end()) {
+ if (it->state() == Qt::TouchPointReleased)
+ it = m_touchPoints.erase(it);
+ else {
+ it->setState(Qt::TouchPointStationary);
+ ++it;
+ }
+ }
+#endif
+}
+
+void EventSender::zoomPageIn()
+{
+ QWebFrame* frame = m_page->mainFrame();
+ if (frame)
+ frame->setZoomFactor(frame->zoomFactor() * ZOOM_STEP);
+}
+
+void EventSender::zoomPageOut()
+{
+ QWebFrame* frame = m_page->mainFrame();
+ if (frame)
+ frame->setZoomFactor(frame->zoomFactor() / ZOOM_STEP);
+}
+
QWebFrame* EventSender::frameUnderMouse() const
{
QWebFrame* frame = m_page->mainFrame();
@@ -267,3 +425,76 @@ redo:
return frame;
return 0;
}
+
+void EventSender::sendOrQueueEvent(QEvent* event)
+{
+ // Mouse move events are queued if
+ // 1. A previous event was queued.
+ // 2. A delay was set-up by leapForward().
+ // 3. A call to mouseMoveTo while the mouse button is pressed could initiate a drag operation, and that does not return until mouseUp is processed.
+ // To be safe and avoid a deadlock, this event is queued.
+ if (endOfQueue == startOfQueue && !eventQueue[endOfQueue].m_delay && (!(m_mouseButtonPressed && (m_eventLoop && event->type() == QEvent::MouseButtonRelease)))) {
+ QApplication::sendEvent(m_page->view(), event);
+ delete event;
+ return;
+ }
+ eventQueue[endOfQueue++].m_event = event;
+ eventQueue[endOfQueue].m_delay = 0;
+ replaySavedEvents(event->type() != QEvent::MouseMove);
+}
+
+void EventSender::replaySavedEvents(bool flush)
+{
+ if (startOfQueue < endOfQueue) {
+ // First send all the events that are ready to be sent
+ while (!eventQueue[startOfQueue].m_delay && startOfQueue < endOfQueue) {
+ QEvent* ev = eventQueue[startOfQueue++].m_event;
+ QApplication::postEvent(m_page->view(), ev); // ev deleted by the system
+ }
+ if (startOfQueue == endOfQueue) {
+ // Reset the queue
+ startOfQueue = 0;
+ endOfQueue = 0;
+ } else {
+ QTest::qWait(eventQueue[startOfQueue].m_delay);
+ eventQueue[startOfQueue].m_delay = 0;
+ }
+ }
+ if (!flush)
+ return;
+
+ // Send a marker event, it will tell us when it is safe to exit the new event loop
+ QEvent* drtEvent = new QEvent((QEvent::Type)DRT_MESSAGE_DONE);
+ QApplication::postEvent(m_page->view(), drtEvent);
+
+ // Start an event loop for async handling of Drag & Drop
+ m_eventLoop = new QEventLoop;
+ m_eventLoop->exec();
+ delete m_eventLoop;
+ m_eventLoop = 0;
+}
+
+bool EventSender::eventFilter(QObject* watched, QEvent* event)
+{
+ if (watched != m_page->view())
+ return false;
+ switch (event->type()) {
+ case QEvent::Leave:
+ return true;
+ case QEvent::MouseButtonPress:
+ m_mouseButtonPressed = true;
+ break;
+ case QEvent::MouseMove:
+ if (m_mouseButtonPressed)
+ m_drag = true;
+ break;
+ case QEvent::MouseButtonRelease:
+ m_mouseButtonPressed = false;
+ m_drag = false;
+ break;
+ case DRT_MESSAGE_DONE:
+ m_eventLoop->exit();
+ return true;
+ }
+ return false;
+}
diff --git a/WebKitTools/DumpRenderTree/qt/EventSenderQt.h b/WebKitTools/DumpRenderTree/qt/EventSenderQt.h
index fd74455..f6cfc7c 100644
--- a/WebKitTools/DumpRenderTree/qt/EventSenderQt.h
+++ b/WebKitTools/DumpRenderTree/qt/EventSenderQt.h
@@ -31,6 +31,7 @@
#include <QApplication>
#include <QEvent>
+#include <QEventLoop>
#include <QMouseEvent>
#include <QObject>
#include <QPoint>
@@ -40,25 +41,52 @@
#include <qwebpage.h>
#include <qwebframe.h>
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+#include <QTouchEvent>
+#endif
+
class EventSender : public QObject {
Q_OBJECT
public:
EventSender(QWebPage* parent);
+ virtual bool eventFilter(QObject* watched, QEvent* event);
public slots:
void mouseDown(int button = 0);
void mouseUp(int button = 0);
void mouseMoveTo(int x, int y);
void leapForward(int ms);
- void keyDown(const QString& string, const QStringList& modifiers = QStringList());
+ void keyDown(const QString& string, const QStringList& modifiers = QStringList(), unsigned int location = 0);
void clearKillRing() {}
void contextClick();
void scheduleAsynchronousClick();
+ void addTouchPoint(int x, int y);
+ void updateTouchPoint(int index, int x, int y);
+ void setTouchModifier(const QString &modifier, bool enable);
+ void touchStart();
+ void touchMove();
+ void touchEnd();
+ void zoomPageIn();
+ void zoomPageOut();
+ void clearTouchPoints();
+ void releaseTouchPoint(int index);
private:
+ void sendTouchEvent(QEvent::Type);
+ void sendOrQueueEvent(QEvent*);
+ void replaySavedEvents(bool flush);
QPoint m_mousePos;
+ Qt::MouseButtons m_mouseButtons;
QWebPage* m_page;
int m_timeLeap;
+ bool m_mouseButtonPressed;
+ bool m_drag;
+ QEventLoop* m_eventLoop;
QWebFrame* frameUnderMouse() const;
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ QList<QTouchEvent::TouchPoint> m_touchPoints;
+ Qt::KeyboardModifiers m_touchModifiers;
+ bool m_touchActive;
+#endif
};
#endif // EventSenderQt_h
diff --git a/WebKitTools/DumpRenderTree/qt/jsobjects.cpp b/WebKitTools/DumpRenderTree/qt/GCControllerQt.cpp
index af331f0..9cc3aa7 100644
--- a/WebKitTools/DumpRenderTree/qt/jsobjects.cpp
+++ b/WebKitTools/DumpRenderTree/qt/GCControllerQt.cpp
@@ -28,20 +28,20 @@
*/
#include "config.h"
-#include "jsobjects.h"
+#include "GCControllerQt.h"
#include <qwebpage.h>
-GCController::GCController(QWebPage* parent)
- : QObject(parent)
-{
-}
-
extern int qt_drt_javaScriptObjectsCount();
extern void qt_drt_garbageCollector_collect();
extern void qt_drt_garbageCollector_collectOnAlternateThread(bool waitUntilDone);
+GCController::GCController(QWebPage* parent)
+ : QObject(parent)
+{
+}
+
void GCController::collect() const
{
qt_drt_garbageCollector_collect();
diff --git a/WebKitTools/DumpRenderTree/qt/jsobjects.h b/WebKitTools/DumpRenderTree/qt/GCControllerQt.h
index 3ee566b..8f5b432 100644
--- a/WebKitTools/DumpRenderTree/qt/jsobjects.h
+++ b/WebKitTools/DumpRenderTree/qt/GCControllerQt.h
@@ -26,8 +26,8 @@
* (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 JSOBJECTS_H
-#define JSOBJECTS_H
+#ifndef GCControllerQt_h
+#define GCControllerQt_h
#include <QObject>
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index 0ea5632..9430ec7 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -29,10 +29,12 @@
#include "config.h"
#include "LayoutTestControllerQt.h"
-#include "DumpRenderTree.h"
+#include "DumpRenderTreeQt.h"
#include "WorkQueue.h"
-#include "WorkQueueItem.h"
+#include "WorkQueueItemQt.h"
#include <QDir>
+#include <QLocale>
+#include <qwebsettings.h>
extern void qt_dump_editing_callbacks(bool b);
extern void qt_dump_resource_load_callbacks(bool b);
@@ -41,9 +43,11 @@ extern bool qt_drt_pauseAnimation(QWebFrame*, const QString& name, double time,
extern bool qt_drt_pauseTransitionOfProperty(QWebFrame*, const QString& name, double time, const QString& elementId);
extern bool qt_drt_pauseSVGAnimation(QWebFrame*, const QString& animationId, double time, const QString& elementId);
extern int qt_drt_numberOfActiveAnimations(QWebFrame*);
+extern void qt_drt_setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme);
extern void qt_drt_whiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains);
extern QString qt_drt_counterValueForElementById(QWebFrame* qFrame, const QString& id);
+extern int qt_drt_workerThreadCount();
LayoutTestController::LayoutTestController(WebCore::DumpRenderTree* drt)
: QObject()
@@ -54,7 +58,8 @@ LayoutTestController::LayoutTestController(WebCore::DumpRenderTree* drt)
void LayoutTestController::reset()
{
- m_isLoading = true;
+ m_hasDumped = false;
+ m_loadFinished = false;
m_textDump = false;
m_dumpBackForwardList = false;
m_dumpChildrenAsText = false;
@@ -67,8 +72,10 @@ void LayoutTestController::reset()
m_topLoadingFrame = 0;
m_waitForPolicy = false;
m_handleErrorPages = false;
+ m_webHistory = 0;
qt_dump_editing_callbacks(false);
qt_dump_resource_load_callbacks(false);
+ emit hidePage();
}
void LayoutTestController::processWork()
@@ -78,32 +85,40 @@ void LayoutTestController::processWork()
// if we didn't start a new load, then we finished all the commands, so we're ready to dump state
if (WorkQueue::shared()->processWork() && !shouldWaitUntilDone()) {
emit done();
- m_isLoading = false;
+ m_hasDumped = true;
}
}
-// Called on loadFinished on mainFrame.
+// Called on loadFinished on WebPage
void LayoutTestController::maybeDump(bool success)
{
- Q_ASSERT(sender() == m_topLoadingFrame->page());
+ // This can happen on any of the http/tests/security/window-events-*.html tests, where the test opens
+ // a new window, calls the unload and load event handlers on the window's page, and then immediately
+ // issues a notifyDone. Needs investigation.
+ if (!m_topLoadingFrame)
+ return;
+
+ // It is possible that we get called by windows created from the main page that have finished
+ // loading, so we don't ASSERT here. At the moment we do not gather results from such windows,
+ // but may need to in future.
+ if (sender() != m_topLoadingFrame->page())
+ return;
+
+ m_loadFinished = true;
// as the function is called on loadFinished, the test might
// already have dumped and thus no longer be active, thus
// bail out here.
- if (!m_isLoading)
+ if (m_hasDumped)
return;
- m_topLoadingFrame = 0;
WorkQueue::shared()->setFrozen(true); // first complete load freezes the queue for the rest of this test
-
- if (!shouldWaitUntilDone()) {
- if (WorkQueue::shared()->count())
- QTimer::singleShot(0, this, SLOT(processWork()));
- else {
- if (success)
- emit done();
- m_isLoading = false;
- }
+ if (WorkQueue::shared()->count())
+ QTimer::singleShot(0, this, SLOT(processWork()));
+ else if (!shouldWaitUntilDone()) {
+ if (success)
+ emit done();
+ m_hasDumped = true;
}
}
@@ -119,9 +134,19 @@ QString LayoutTestController::counterValueForElementById(const QString& id)
return qt_drt_counterValueForElementById(m_drt->webPage()->mainFrame(), id);
}
+int LayoutTestController::webHistoryItemCount()
+{
+ if (!m_webHistory)
+ return -1;
+
+ // Subtract one here as our QWebHistory::count() includes the actual page,
+ // which is not considered in the DRT tests.
+ return m_webHistory->count() - 1;
+}
+
void LayoutTestController::keepWebHistory()
{
- // FIXME: implement
+ m_webHistory = m_drt->webPage()->history();
}
void LayoutTestController::notifyDone()
@@ -132,11 +157,19 @@ void LayoutTestController::notifyDone()
return;
m_timeoutTimer.stop();
+ m_waitForDone = false;
+
+ // If the page has not finished loading (i.e. loadFinished() has not been emitted) then
+ // content created by the likes of document.write() JS methods will not be available yet.
+ // When the page has finished loading, maybeDump above will dump the results now that we have
+ // just set shouldWaitUntilDone to false.
+ if (!m_loadFinished)
+ return;
+
emit done();
// FIXME: investigate why always resetting these result in timeouts
- m_isLoading = false;
- m_waitForDone = false;
+ m_hasDumped = true;
m_waitForPolicy = false;
}
@@ -145,6 +178,11 @@ int LayoutTestController::windowCount()
return m_drt->windowCount();
}
+void LayoutTestController::display()
+{
+ emit showPage();
+}
+
void LayoutTestController::clearBackForwardList()
{
m_drt->webPage()->history()->clear();
@@ -153,7 +191,7 @@ void LayoutTestController::clearBackForwardList()
QString LayoutTestController::pathToLocalResource(const QString& url)
{
// Function introduced in r28690.
- return QLatin1String("file://") + QUrl(url).toLocalFile();
+ return QDir::toNativeSeparators(url);
}
void LayoutTestController::dumpEditingCallbacks()
@@ -208,7 +246,7 @@ void LayoutTestController::queueNonLoadingScript(const QString& script)
void LayoutTestController::provisionalLoad()
{
QWebFrame* frame = qobject_cast<QWebFrame*>(sender());
- if (!m_topLoadingFrame && m_isLoading)
+ if (!m_topLoadingFrame && !m_hasDumped)
m_topLoadingFrame = frame;
}
@@ -280,6 +318,26 @@ void LayoutTestController::setPOSIXLocale(const QString& locale)
QLocale::setDefault(qlocale);
}
+void LayoutTestController::setWindowIsKey(bool isKey)
+{
+ m_drt->switchFocus(isKey);
+}
+
+void LayoutTestController::setMainFrameIsFirstResponder(bool isFirst)
+{
+ //FIXME: only need this for the moment: https://bugs.webkit.org/show_bug.cgi?id=32990
+}
+
+void LayoutTestController::setXSSAuditorEnabled(bool enable)
+{
+ // Set XSSAuditorEnabled globally so that windows created by the test inherit it too.
+ // resetSettings() will call this to reset the page and global setting to false again.
+ // Needed by http/tests/security/xssAuditor/link-opens-new-window.html
+ QWebSettings* globalSettings = QWebSettings::globalSettings();
+ globalSettings->setAttribute(QWebSettings::XSSAuditorEnabled, enable);
+ m_drt->webPage()->settings()->setAttribute(QWebSettings::XSSAuditorEnabled, enable);
+}
+
bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(const QString& animationName,
double time,
const QString& elementId)
@@ -363,3 +421,26 @@ void LayoutTestController::overridePreference(const QString& name, const QVarian
else if (name == "WebKitUsesPageCachePreferenceKey")
QWebSettings::setMaximumPagesInCache(value.toInt());
}
+
+void LayoutTestController::setUserStyleSheetLocation(const QString& url)
+{
+ m_userStyleSheetLocation = QUrl(url);
+}
+
+void LayoutTestController::setUserStyleSheetEnabled(bool enabled)
+{
+ if (enabled)
+ m_drt->webPage()->settings()->setUserStyleSheetUrl(m_userStyleSheetLocation);
+ else
+ m_drt->webPage()->settings()->setUserStyleSheetUrl(QUrl());
+}
+
+void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme)
+{
+ qt_drt_setDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
+}
+
+int LayoutTestController::workerThreadCount()
+{
+ return qt_drt_workerThreadCount();
+}
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
index ac8681f..64b3a15 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
@@ -51,12 +51,11 @@ namespace WebCore {
}
class LayoutTestController : public QObject {
Q_OBJECT
+ Q_PROPERTY(int webHistoryItemCount READ webHistoryItemCount)
+ Q_PROPERTY(int workerThreadCount READ workerThreadCount)
public:
LayoutTestController(WebCore::DumpRenderTree* drt);
- bool isLoading() const { return m_isLoading; }
- void setLoading(bool loading) { m_isLoading = loading; }
-
bool shouldDumpAsText() const { return m_textDump; }
bool shouldDumpBackForwardList() const { return m_dumpBackForwardList; }
bool shouldDumpChildrenAsText() const { return m_dumpChildrenAsText; }
@@ -76,6 +75,9 @@ protected:
signals:
void done();
+ void showPage();
+ void hidePage();
+
public slots:
void maybeDump(bool ok);
void dumpAsText() { m_textDump = true; }
@@ -85,6 +87,7 @@ public slots:
void setCanOpenWindows() { m_canOpenWindows = true; }
void waitUntilDone();
QString counterValueForElementById(const QString& id);
+ int webHistoryItemCount();
void keepWebHistory();
void notifyDone();
void dumpBackForwardList() { m_dumpBackForwardList = true; }
@@ -100,7 +103,7 @@ public slots:
void provisionalLoad();
void setCloseRemainingWindowsWhenComplete(bool = false) {}
int windowCount();
- void display() {}
+ void display();
void clearBackForwardList();
QString pathToLocalResource(const QString& url);
void dumpTitleChanges() { m_dumpTitleChanges = true; }
@@ -115,6 +118,10 @@ public slots:
void setPrivateBrowsingEnabled(bool enable);
void setPopupBlockingEnabled(bool enable);
void setPOSIXLocale(const QString& locale);
+ void resetLoadFinished() { m_loadFinished = false; }
+ void setWindowIsKey(bool isKey);
+ void setMainFrameIsFirstResponder(bool isFirst);
+ void setXSSAuditorEnabled(bool enable);
bool pauseAnimationAtTimeOnElementWithId(const QString& animationName, double time, const QString& elementId);
bool pauseTransitionAtTimeOnElementWithId(const QString& propertyName, double time, const QString& elementId);
@@ -132,12 +139,16 @@ public slots:
void waitForPolicyDelegate();
void overridePreference(const QString& name, const QVariant& value);
+ void setUserStyleSheetLocation(const QString& url);
+ void setUserStyleSheetEnabled(bool enabled);
+ void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme);
+ int workerThreadCount();
private slots:
void processWork();
private:
- bool m_isLoading;
+ bool m_hasDumped;
bool m_textDump;
bool m_dumpBackForwardList;
bool m_dumpChildrenAsText;
@@ -148,10 +159,13 @@ private:
bool m_dumpStatusCallbacks;
bool m_waitForPolicy;
bool m_handleErrorPages;
+ bool m_loadFinished;
+ QUrl m_userStyleSheetLocation;
QBasicTimer m_timeoutTimer;
QWebFrame* m_topLoadingFrame;
WebCore::DumpRenderTree* m_drt;
+ QWebHistory* m_webHistory;
};
#endif // LayoutTestControllerQt_h
diff --git a/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.cpp b/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.cpp
index 807a6a4..067e6aa 100644
--- a/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.cpp
@@ -27,7 +27,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
-#include "WorkQueueItem.h"
+#include "WorkQueueItemQt.h"
QWebFrame* findFrameNamed(const QString& frameName, QWebFrame* frame)
{
diff --git a/WebKitTools/DumpRenderTree/qt/WorkQueueItem.h b/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.h
index d534493..94da5e1 100644
--- a/WebKitTools/DumpRenderTree/qt/WorkQueueItem.h
+++ b/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.h
@@ -7,13 +7,13 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * 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.
+ * 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
@@ -27,8 +27,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WorkQueueItem_h
-#define WorkQueueItem_h
+#ifndef WorkQueueItemQt_h
+#define WorkQueueItemQt_h
#include <QPointer>
#include <QString>
@@ -140,4 +140,4 @@ public:
}
};
-#endif // !defined(WorkQueueItem_h)
+#endif // !defined(WorkQueueItemQt_h)
diff --git a/WebKitTools/DumpRenderTree/qt/main.cpp b/WebKitTools/DumpRenderTree/qt/main.cpp
index 719315f..69d3c23 100644
--- a/WebKitTools/DumpRenderTree/qt/main.cpp
+++ b/WebKitTools/DumpRenderTree/qt/main.cpp
@@ -27,7 +27,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "DumpRenderTree.h"
+#include "DumpRenderTreeQt.h"
#include <wtf/AlwaysInline.h>
@@ -40,6 +40,7 @@
#include <qwebsettings.h>
#include <qwebdatabase.h>
#include <qdesktopservices.h>
+#include <qtimer.h>
#include <qwindowsstyle.h>
#ifdef Q_WS_X11
@@ -89,12 +90,14 @@ QString get_backtrace() {
return s;
}
+#ifndef Q_OS_WIN
static NO_RETURN void crashHandler(int sig)
{
fprintf(stderr, "%s\n", strsignal(sig));
fprintf(stderr, "%s\n", get_backtrace().toLatin1().constData());
exit(128 + sig);
}
+#endif
int main(int argc, char* argv[])
{
@@ -121,6 +124,7 @@ int main(int argc, char* argv[])
QX11Info::setAppDpiX(0, 96);
#endif
+#ifndef Q_OS_WIN
signal(SIGILL, crashHandler); /* 4: illegal instruction (not reset when caught) */
signal(SIGTRAP, crashHandler); /* 5: trace trap (not reset when caught) */
signal(SIGFPE, crashHandler); /* 8: floating point exception */
@@ -130,41 +134,42 @@ int main(int argc, char* argv[])
signal(SIGPIPE, crashHandler); /* 13: write on a pipe with no reader */
signal(SIGXCPU, crashHandler); /* 24: exceeded CPU time limit */
signal(SIGXFSZ, crashHandler); /* 25: exceeded file size limit */
+#endif
QStringList args = app.arguments();
if (args.count() < 2) {
- qDebug() << "Usage: DumpRenderTree [-v] filename";
+ qDebug() << "Usage: DumpRenderTree [-v|--pixel-tests] filename";
exit(0);
}
- // supress debug output from Qt if not started with -v
+ // Suppress debug output from Qt if not started with -v
if (!args.contains(QLatin1String("-v")))
qInstallMsgHandler(messageHandler);
WebCore::DumpRenderTree dumper;
- if (args.contains("--pixel-tests"))
+ if (args.contains(QLatin1String("--pixel-tests")))
dumper.setDumpPixels(true);
QString dbDir = QDesktopServices::storageLocation(QDesktopServices::DataLocation) + QDir::separator() + "qtwebkitdrt";
QWebSettings::setOfflineStoragePath(dbDir);
QWebDatabase::removeAllDatabases();
- if (args.last() == QLatin1String("-")) {
- dumper.open();
+ if (args.contains(QLatin1String("-"))) {
+ QObject::connect(&dumper, SIGNAL(ready()), &dumper, SLOT(readLine()), Qt::QueuedConnection);
+ QTimer::singleShot(0, &dumper, SLOT(readLine()));
} else {
- if (!args.last().startsWith("/")
- && !args.last().startsWith("file:")
- && !args.last().startsWith("http:")
- && !args.last().startsWith("https:")) {
- QString path = QDir::currentPath();
- if (!path.endsWith('/'))
- path.append('/');
- args.last().prepend(path);
+ dumper.setSingleFileMode(true);
+ for (int i = 1; i < args.size(); ++i) {
+ if (!args.at(i).startsWith('-')) {
+ dumper.processLine(args.at(i));
+ break;
+ }
}
- dumper.open(QUrl(args.last()));
}
+
return app.exec();
+
#ifdef Q_WS_X11
FcConfigSetCurrent(0);
#endif
diff --git a/WebKitTools/DumpRenderTree/win/AccessibilityControllerWin.cpp b/WebKitTools/DumpRenderTree/win/AccessibilityControllerWin.cpp
index ac64efb..6b35948 100644
--- a/WebKitTools/DumpRenderTree/win/AccessibilityControllerWin.cpp
+++ b/WebKitTools/DumpRenderTree/win/AccessibilityControllerWin.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 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
@@ -28,7 +28,10 @@
#include "AccessibilityUIElement.h"
#include "DumpRenderTree.h"
+#include "FrameLoadDelegate.h"
#include <JavaScriptCore/Assertions.h>
+#include <JavaScriptCore/JSRetainPtr.h>
+#include <JavaScriptCore/JSStringRef.h>
#include <WebCore/COMPtr.h>
#include <WebKit/WebKit.h>
#include <oleacc.h>
@@ -39,12 +42,21 @@ using namespace std;
AccessibilityController::AccessibilityController()
: m_focusEventHook(0)
, m_scrollingStartEventHook(0)
+ , m_valueChangeEventHook(0)
+ , m_allEventsHook(0)
{
}
AccessibilityController::~AccessibilityController()
{
setLogFocusEvents(false);
+ setLogValueChangeEvents(false);
+
+ if (m_allEventsHook)
+ UnhookWinEvent(m_allEventsHook);
+
+ for (HashMap<PlatformUIElement, JSObjectRef>::iterator it = m_notificationListeners.begin(); it != m_notificationListeners.end(); ++it)
+ JSValueUnprotect(frame->globalContext(), it->second);
}
AccessibilityUIElement AccessibilityController::focusedElement()
@@ -89,7 +101,7 @@ AccessibilityUIElement AccessibilityController::rootElement()
return rootAccessible;
}
-static void CALLBACK logEventProc(HWINEVENTHOOK hWinEventHook, DWORD event, HWND hwnd, LONG idObject, LONG idChild, DWORD, DWORD)
+static void CALLBACK logEventProc(HWINEVENTHOOK, DWORD event, HWND hwnd, LONG idObject, LONG idChild, DWORD, DWORD)
{
// Get the accessible object for this event.
COMPtr<IAccessible> parentObject;
@@ -112,6 +124,17 @@ static void CALLBACK logEventProc(HWINEVENTHOOK hWinEventHook, DWORD event, HWND
printf("Received focus event for object '%S'.\n", name.c_str());
break;
+ case EVENT_OBJECT_VALUECHANGE: {
+ BSTR valueBSTR;
+ hr = parentObject->get_accValue(vChild, &valueBSTR);
+ ASSERT(SUCCEEDED(hr));
+ wstring value(valueBSTR, ::SysStringLen(valueBSTR));
+ SysFreeString(valueBSTR);
+
+ printf("Received value change event for object '%S', value '%S'.\n", name.c_str(), value.c_str());
+ break;
+ }
+
case EVENT_SYSTEM_SCROLLINGSTART:
printf("Received scrolling start event for object '%S'.\n", name.c_str());
break;
@@ -120,6 +143,8 @@ static void CALLBACK logEventProc(HWINEVENTHOOK hWinEventHook, DWORD event, HWND
printf("Received unknown event for object '%S'.\n", name.c_str());
break;
}
+
+ VariantClear(&vChild);
}
void AccessibilityController::setLogFocusEvents(bool logFocusEvents)
@@ -142,6 +167,26 @@ void AccessibilityController::setLogFocusEvents(bool logFocusEvents)
ASSERT(m_focusEventHook);
}
+void AccessibilityController::setLogValueChangeEvents(bool logValueChangeEvents)
+{
+ if (!!m_valueChangeEventHook == logValueChangeEvents)
+ return;
+
+ if (!logValueChangeEvents) {
+ UnhookWinEvent(m_valueChangeEventHook);
+ m_valueChangeEventHook = 0;
+ return;
+ }
+
+ // Ensure that accessibility is initialized for the WebView by querying for
+ // the root accessible object.
+ rootElement();
+
+ m_valueChangeEventHook = SetWinEventHook(EVENT_OBJECT_VALUECHANGE, EVENT_OBJECT_VALUECHANGE, GetModuleHandle(0), logEventProc, GetCurrentProcessId(), 0, WINEVENT_INCONTEXT);
+
+ ASSERT(m_valueChangeEventHook);
+}
+
void AccessibilityController::setLogScrollingStartEvents(bool logScrollingStartEvents)
{
if (!!m_scrollingStartEventHook == logScrollingStartEvents)
@@ -161,3 +206,83 @@ void AccessibilityController::setLogScrollingStartEvents(bool logScrollingStartE
ASSERT(m_scrollingStartEventHook);
}
+
+static string stringEvent(DWORD event)
+{
+ switch(event) {
+ case EVENT_OBJECT_VALUECHANGE:
+ return "value change event";
+ default:
+ return "unknown event";
+ }
+}
+
+static void CALLBACK notificationListenerProc(HWINEVENTHOOK, DWORD event, HWND hwnd, LONG idObject, LONG idChild, DWORD, DWORD)
+{
+ // Get the accessible object for this event.
+ COMPtr<IAccessible> parentObject;
+
+ VARIANT vChild;
+ VariantInit(&vChild);
+
+ HRESULT hr = AccessibleObjectFromEvent(hwnd, idObject, idChild, &parentObject, &vChild);
+ ASSERT(SUCCEEDED(hr));
+
+ COMPtr<IDispatch> childDispatch;
+ if (FAILED(parentObject->get_accChild(vChild, &childDispatch))) {
+ VariantClear(&vChild);
+ return;
+ }
+
+ COMPtr<IAccessible> childAccessible(Query, childDispatch);
+
+ sharedFrameLoadDelegate->accessibilityController()->notificationReceived(childAccessible, stringEvent(event));
+
+ VariantClear(&vChild);
+}
+
+static COMPtr<IAccessibleComparable> comparableObject(const COMPtr<IServiceProvider>& serviceProvider)
+{
+ COMPtr<IAccessibleComparable> comparable;
+ serviceProvider->QueryService(SID_AccessibleComparable, __uuidof(IAccessibleComparable), reinterpret_cast<void**>(&comparable));
+ return comparable;
+}
+
+void AccessibilityController::notificationReceived(PlatformUIElement element, const string& eventName)
+{
+ for (HashMap<PlatformUIElement, JSObjectRef>::iterator it = m_notificationListeners.begin(); it != m_notificationListeners.end(); ++it) {
+ COMPtr<IServiceProvider> thisServiceProvider(Query, it->first);
+ if (!thisServiceProvider)
+ continue;
+
+ COMPtr<IAccessibleComparable> thisComparable = comparableObject(thisServiceProvider);
+ if (!thisComparable)
+ continue;
+
+ COMPtr<IServiceProvider> elementServiceProvider(Query, element);
+ if (!elementServiceProvider)
+ continue;
+
+ COMPtr<IAccessibleComparable> elementComparable = comparableObject(elementServiceProvider);
+ if (!elementComparable)
+ continue;
+
+ BOOL isSame = FALSE;
+ thisComparable->isSameObject(elementComparable.get(), &isSame);
+ if (!isSame)
+ continue;
+
+ JSRetainPtr<JSStringRef> jsNotification(Adopt, JSStringCreateWithUTF8CString(eventName.c_str()));
+ JSValueRef argument = JSValueMakeString(frame->globalContext(), jsNotification.get());
+ JSObjectCallAsFunction(frame->globalContext(), it->second, NULL, 1, &argument, NULL);
+ }
+}
+
+void AccessibilityController::addNotificationListener(PlatformUIElement element, JSObjectRef functionCallback)
+{
+ if (!m_allEventsHook)
+ m_allEventsHook = SetWinEventHook(EVENT_MIN, EVENT_MAX, GetModuleHandle(0), notificationListenerProc, GetCurrentProcessId(), 0, WINEVENT_INCONTEXT);
+
+ JSValueProtect(frame->globalContext(), functionCallback);
+ m_notificationListeners.add(element, functionCallback);
+}
diff --git a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
index 163abb1..301112f 100644
--- a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
+++ b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
@@ -26,6 +26,9 @@
#include "config.h"
#include "AccessibilityUIElement.h"
+#include "AccessibilityController.h"
+#include "DumpRenderTree.h"
+#include "FrameLoadDelegate.h"
#include <JavaScriptCore/JSStringRef.h>
#include <tchar.h>
#include <string>
@@ -98,6 +101,12 @@ AccessibilityUIElement AccessibilityUIElement::getChildAtIndex(unsigned index)
return COMPtr<IAccessible>(Query, child);
}
+unsigned AccessibilityUIElement::indexOfChild(AccessibilityUIElement* element)
+{
+ // FIXME: implement
+ return 0;
+}
+
JSStringRef AccessibilityUIElement::allAttributes()
{
return JSStringCreateWithCharacters(0, 0);
@@ -120,7 +129,11 @@ AccessibilityUIElement AccessibilityUIElement::titleUIElement()
AccessibilityUIElement AccessibilityUIElement::parentElement()
{
- return 0;
+ COMPtr<IDispatch> parent;
+ m_element->get_accParent(&parent);
+
+ COMPtr<IAccessible> parentAccessible(Query, parent);
+ return parentAccessible;
}
JSStringRef AccessibilityUIElement::attributesOfChildren()
@@ -257,9 +270,24 @@ JSStringRef AccessibilityUIElement::valueDescription()
{
return 0;
}
+
+static DWORD accessibilityState(COMPtr<IAccessible> element)
+{
+ VARIANT state;
+ element->get_accState(self(), &state);
+
+ ASSERT(V_VT(&state) == VT_I4);
+
+ DWORD result = state.lVal;
+ VariantClear(&state);
+
+ return result;
+}
+
bool AccessibilityUIElement::isSelected() const
{
- return false;
+ DWORD state = accessibilityState(m_element);
+ return (state & STATE_SYSTEM_SELECTED) == STATE_SYSTEM_SELECTED;
}
int AccessibilityUIElement::hierarchicalLevel() const
@@ -282,12 +310,21 @@ bool AccessibilityUIElement::isExpanded() const
return false;
}
+bool AccessibilityUIElement::isChecked() const
+{
+ VARIANT vState;
+ if (FAILED(m_element->get_accState(self(), &vState)))
+ return false;
+
+ return vState.lVal & STATE_SYSTEM_CHECKED;
+}
+
JSStringRef AccessibilityUIElement::orientation() const
{
return 0;
}
-double AccessibilityUIElement::intValue()
+double AccessibilityUIElement::intValue() const
{
BSTR valueBSTR;
if (FAILED(m_element->get_accValue(self(), &valueBSTR)) || !valueBSTR)
@@ -315,7 +352,8 @@ bool AccessibilityUIElement::isActionSupported(JSStringRef action)
bool AccessibilityUIElement::isEnabled()
{
- return false;
+ DWORD state = accessibilityState(m_element);
+ return (state & STATE_SYSTEM_UNAVAILABLE) != STATE_SYSTEM_UNAVAILABLE;
}
bool AccessibilityUIElement::isRequired() const
@@ -403,11 +441,18 @@ void AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned le
{
}
-JSStringRef AccessibilityUIElement::attributeValue(JSStringRef attribute)
+JSStringRef AccessibilityUIElement::stringAttributeValue(JSStringRef attribute)
{
+ // FIXME: implement
return JSStringCreateWithCharacters(0, 0);
}
+bool AccessibilityUIElement::boolAttributeValue(JSStringRef attribute)
+{
+ // FIXME: implement
+ return false;
+}
+
bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute)
{
return false;
@@ -428,6 +473,8 @@ void AccessibilityUIElement::decrement()
void AccessibilityUIElement::showMenu()
{
+ ASSERT(hasPopup());
+ m_element->accDoDefaultAction(self());
}
AccessibilityUIElement AccessibilityUIElement::disclosedRowAtIndex(unsigned index)
@@ -477,3 +524,75 @@ JSStringRef AccessibilityUIElement::documentURI()
{
return JSStringCreateWithCharacters(0, 0);
}
+
+JSStringRef AccessibilityUIElement::url()
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+bool AccessibilityUIElement::addNotificationListener(JSObjectRef functionCallback)
+{
+ if (!functionCallback)
+ return false;
+
+ sharedFrameLoadDelegate->accessibilityController()->addNotificationListener(m_element, functionCallback);
+ return true;
+}
+
+bool AccessibilityUIElement::isSelectable() const
+{
+ DWORD state = accessibilityState(m_element);
+ return (state & STATE_SYSTEM_SELECTABLE) == STATE_SYSTEM_SELECTABLE;
+}
+
+bool AccessibilityUIElement::isMultiSelectable() const
+{
+ DWORD multiSelectable = STATE_SYSTEM_EXTSELECTABLE | STATE_SYSTEM_MULTISELECTABLE;
+ DWORD state = accessibilityState(m_element);
+ return (state & multiSelectable) == multiSelectable;
+}
+
+bool AccessibilityUIElement::isVisible() const
+{
+ DWORD state = accessibilityState(m_element);
+ return (state & STATE_SYSTEM_INVISIBLE) != STATE_SYSTEM_INVISIBLE;
+}
+
+bool AccessibilityUIElement::isOffScreen() const
+{
+ DWORD state = accessibilityState(m_element);
+ return (state & STATE_SYSTEM_OFFSCREEN) == STATE_SYSTEM_OFFSCREEN;
+}
+
+bool AccessibilityUIElement::isCollapsed() const
+{
+ DWORD state = accessibilityState(m_element);
+ return (state & STATE_SYSTEM_COLLAPSED) == STATE_SYSTEM_COLLAPSED;
+}
+
+bool AccessibilityUIElement::hasPopup() const
+{
+ DWORD state = accessibilityState(m_element);
+ return (state & STATE_SYSTEM_HASPOPUP) == STATE_SYSTEM_HASPOPUP;
+}
+
+void AccessibilityUIElement::takeFocus()
+{
+ m_element->accSelect(SELFLAG_TAKEFOCUS, self());
+}
+
+void AccessibilityUIElement::takeSelection()
+{
+ m_element->accSelect(SELFLAG_TAKESELECTION, self());
+}
+
+void AccessibilityUIElement::addSelection()
+{
+ m_element->accSelect(SELFLAG_ADDSELECTION, self());
+}
+
+void AccessibilityUIElement::removeSelection()
+{
+ m_element->accSelect(SELFLAG_REMOVESELECTION, self());
+}
diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj b/WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj
index 299c53c..4d2dea8 100644
--- a/WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj
+++ b/WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj
@@ -39,7 +39,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
PreprocessorDefinitions="_CONSOLE"
DisableSpecificWarnings="4146"
ForcedIncludeFiles="DumpRenderTreePrefix.h"
@@ -112,7 +112,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
PreprocessorDefinitions="_CONSOLE"
DisableSpecificWarnings="4146"
ForcedIncludeFiles="DumpRenderTreePrefix.h"
@@ -184,7 +184,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
PreprocessorDefinitions="_CONSOLE"
DisableSpecificWarnings="4146"
ForcedIncludeFiles="DumpRenderTreePrefix.h"
@@ -255,7 +255,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cairo&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cairo&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
PreprocessorDefinitions="_CONSOLE"
DisableSpecificWarnings="4146"
ForcedIncludeFiles="DumpRenderTreePrefix.h"
@@ -328,7 +328,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cairo&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cairo&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
PreprocessorDefinitions="_CONSOLE"
DisableSpecificWarnings="4146"
ForcedIncludeFiles="DumpRenderTreePrefix.h"
@@ -400,7 +400,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
PreprocessorDefinitions="_CONSOLE"
DisableSpecificWarnings="4146"
ForcedIncludeFiles="DumpRenderTreePrefix.h"
diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h b/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h
index 54ec87b..499c57b 100644
--- a/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h
+++ b/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h
@@ -32,6 +32,7 @@
struct IWebFrame;
struct IWebScriptWorld;
struct IWebView;
+struct FrameLoadDelegate;
struct PolicyDelegate;
typedef const struct __CFString* CFStringRef;
typedef struct HWND__* HWND;
@@ -60,4 +61,6 @@ unsigned worldIDForWorld(IWebScriptWorld*);
extern UINT_PTR waitToDumpWatchdog;
+extern COMPtr<FrameLoadDelegate> sharedFrameLoadDelegate;
+
#endif // DumpRenderTreeWin_h
diff --git a/WebKitTools/DumpRenderTree/win/EventSender.cpp b/WebKitTools/DumpRenderTree/win/EventSender.cpp
index dd5bf9d..5a42b00 100644
--- a/WebKitTools/DumpRenderTree/win/EventSender.cpp
+++ b/WebKitTools/DumpRenderTree/win/EventSender.cpp
@@ -144,6 +144,30 @@ static JSValueRef contextClickCallback(JSContextRef context, JSObjectRef functio
return JSValueMakeUndefined(context);
}
+static WPARAM buildModifierFlags(JSContextRef context, const JSValueRef modifiers)
+{
+ JSObjectRef modifiersArray = JSValueToObject(context, modifiers, 0);
+ if (!modifiersArray)
+ return 0;
+
+ WPARAM flags = 0;
+ int modifiersCount = JSValueToNumber(context, JSObjectGetProperty(context, modifiersArray, JSStringCreateWithUTF8CString("length"), 0), 0);
+ for (int i = 0; i < modifiersCount; ++i) {
+ JSValueRef value = JSObjectGetPropertyAtIndex(context, modifiersArray, i, 0);
+ JSStringRef string = JSValueToStringCopy(context, value, 0);
+ if (JSStringIsEqualToUTF8CString(string, "ctrlKey")
+ || JSStringIsEqualToUTF8CString(string, "addSelectionKey"))
+ flags |= MK_CONTROL;
+ else if (JSStringIsEqualToUTF8CString(string, "shiftKey")
+ || JSStringIsEqualToUTF8CString(string, "rangeSelectionKey"))
+ flags |= MK_SHIFT;
+ // No way to specifiy altKey in a MSG.
+
+ JSStringRelease(string);
+ }
+ return flags;
+}
+
static JSValueRef mouseDownCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
COMPtr<IWebFramePrivate> framePrivate;
@@ -152,7 +176,7 @@ static JSValueRef mouseDownCallback(JSContextRef context, JSObjectRef function,
down = true;
int mouseType = WM_LBUTTONDOWN;
- if (argumentCount == 1) {
+ if (argumentCount >= 1) {
int mouseNumber = JSValueToNumber(context, arguments[0], exception);
switch (mouseNumber) {
case 0:
@@ -173,8 +197,12 @@ static JSValueRef mouseDownCallback(JSContextRef context, JSObjectRef function,
break;
}
}
+
+ WPARAM wparam = 0;
+ if (argumentCount >= 2)
+ wparam |= buildModifierFlags(context, arguments[1]);
- MSG msg = makeMsg(webViewWindow, mouseType, 0, MAKELPARAM(lastMousePosition.x, lastMousePosition.y));
+ MSG msg = makeMsg(webViewWindow, mouseType, wparam, MAKELPARAM(lastMousePosition.x, lastMousePosition.y));
if (!msgQueue[endOfQueue].delay)
dispatchMessage(&msg);
else {
@@ -234,7 +262,7 @@ static void doMouseUp(MSG msg, HRESULT* oleDragAndDropReturnValue = 0)
static JSValueRef mouseUpCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
int mouseType = WM_LBUTTONUP;
- if (argumentCount == 1) {
+ if (argumentCount >= 1) {
int mouseNumber = JSValueToNumber(context, arguments[0], exception);
switch (mouseNumber) {
case 0:
@@ -256,7 +284,11 @@ static JSValueRef mouseUpCallback(JSContextRef context, JSObjectRef function, JS
}
}
- MSG msg = makeMsg(webViewWindow, mouseType, 0, MAKELPARAM(lastMousePosition.x, lastMousePosition.y));
+ WPARAM wparam = 0;
+ if (argumentCount >= 2)
+ wparam |= buildModifierFlags(context, arguments[1]);
+
+ MSG msg = makeMsg(webViewWindow, mouseType, wparam, MAKELPARAM(lastMousePosition.x, lastMousePosition.y));
if ((dragMode && !replayingSavedEvents) || msgQueue[endOfQueue].delay) {
msgQueue[endOfQueue++].msg = msg;
@@ -462,9 +494,9 @@ static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS
for (int i = 0; i < modifiersCount; ++i) {
JSValueRef value = JSObjectGetPropertyAtIndex(context, modifiersArray, i, 0);
JSStringRef string = JSValueToStringCopy(context, value, 0);
- if (JSStringIsEqualToUTF8CString(string, "ctrlKey"))
+ if (JSStringIsEqualToUTF8CString(string, "ctrlKey") || JSStringIsEqualToUTF8CString(string, "addSelectionKey"))
newKeyState[VK_CONTROL] = 0x80;
- else if (JSStringIsEqualToUTF8CString(string, "shiftKey"))
+ else if (JSStringIsEqualToUTF8CString(string, "shiftKey") || JSStringIsEqualToUTF8CString(string, "rangeSelectionKey"))
newKeyState[VK_SHIFT] = 0x80;
else if (JSStringIsEqualToUTF8CString(string, "altKey"))
newKeyState[VK_MENU] = 0x80;
diff --git a/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.h b/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.h
index cc6653b..329c17f 100644
--- a/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.h
+++ b/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.h
@@ -44,6 +44,8 @@ public:
void resetToConsistentState();
+ AccessibilityController* accessibilityController() const { return m_accessibilityController.get(); }
+
// IUnknown
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
virtual ULONG STDMETHODCALLTYPE AddRef(void);
diff --git a/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj b/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj
index d9f5225..73d541b 100644
--- a/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj
+++ b/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj
@@ -38,7 +38,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -106,7 +106,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -173,7 +173,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -240,7 +240,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;"
/>
<Tool
Name="VCManagedResourceCompilerTool"
diff --git a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
index 5debf16..b7a63fc 100644
--- a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
+++ b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
@@ -806,6 +806,17 @@ void LayoutTestController::setDatabaseQuota(unsigned long long quota)
databaseManager->setQuota(TEXT("file:///"), quota);
}
+void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme)
+{
+ COMPtr<IWebViewPrivate> webView;
+ if (FAILED(WebKitCreateInstance(__uuidof(WebView), 0, __uuidof(webView), reinterpret_cast<void**>(&webView))))
+ return;
+
+ BSTR schemeBSTR = JSStringCopyBSTR(scheme);
+ webView->setDomainRelaxationForbiddenForURLScheme(forbidden, schemeBSTR);
+ SysFreeString(schemeBSTR);
+}
+
void LayoutTestController::setAppCacheMaximumSize(unsigned long long size)
{
printf("ERROR: LayoutTestController::setAppCacheMaximumSize() not implemented\n");
diff --git a/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp b/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp
index 0edf69b..19bf84a 100644
--- a/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp
+++ b/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp
@@ -243,6 +243,11 @@ HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::willSendRequest(
descriptionSuitableForTestResult(redirectResponse).c_str());
}
+ if (!done && gLayoutTestController->willSendRequestReturnsNull()) {
+ *newRequest = 0;
+ return S_OK;
+ }
+
if (!done && gLayoutTestController->willSendRequestReturnsNullOnRedirect() && redirectResponse) {
printf("Returning null for this redirect\n");
*newRequest = 0;
diff --git a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj
index b1f2073..0177d99 100644
--- a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj
+++ b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj
@@ -39,7 +39,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(ProjectDir)..\..\TestNetscapePlugin.subproj&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(ProjectDir)..\..\TestNetscapePlugin.subproj&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"
PreprocessorDefinitions="_USRDLL;TESTNETSCAPEPLUGIN_EXPORTS;snprintf=_snprintf"
DisableSpecificWarnings="4819"
/>
@@ -109,7 +109,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(ProjectDir)..\..\TestNetscapePlugin.subproj&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(ProjectDir)..\..\TestNetscapePlugin.subproj&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"
PreprocessorDefinitions="_USRDLL;TESTNETSCAPEPLUGIN_EXPORTS;snprintf=_snprintf"
DisableSpecificWarnings="4819"
/>
@@ -178,7 +178,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(ProjectDir)..\..\TestNetscapePlugin.subproj&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(ProjectDir)..\..\TestNetscapePlugin.subproj&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"
PreprocessorDefinitions="_USRDLL;TESTNETSCAPEPLUGIN_EXPORTS;snprintf=_snprintf"
RuntimeLibrary="3"
DisableSpecificWarnings="4819"
@@ -248,7 +248,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(ProjectDir)..\..\TestNetscapePlugin.subproj&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(ProjectDir)..\..\TestNetscapePlugin.subproj&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"
PreprocessorDefinitions="_USRDLL;TESTNETSCAPEPLUGIN_EXPORTS;snprintf=_snprintf"
DisableSpecificWarnings="4819"
/>
@@ -317,7 +317,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(ProjectDir)..\..\TestNetscapePlugin.subproj&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(ProjectDir)..\..\TestNetscapePlugin.subproj&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"
PreprocessorDefinitions="_USRDLL;TESTNETSCAPEPLUGIN_EXPORTS;snprintf=_snprintf"
RuntimeLibrary="3"
DisableSpecificWarnings="4819"
diff --git a/WebKitTools/DumpRenderTree/wscript b/WebKitTools/DumpRenderTree/wscript
index 29eca9a..5e6c597 100644
--- a/WebKitTools/DumpRenderTree/wscript
+++ b/WebKitTools/DumpRenderTree/wscript
@@ -57,7 +57,7 @@ def build(bld):
includes = ' '.join(include_paths),
source = sources,
target = 'DumpRenderTree',
- uselib = 'WXWEBKIT WX ' + get_config(),
+ uselib = 'JSCORE ICU WXWEBKIT WX ' + get_config(),
libpath = [output_dir],
uselib_local = '',
install_path = output_dir)
diff --git a/WebKitTools/DumpRenderTree/wx/DumpRenderTree.bkl b/WebKitTools/DumpRenderTree/wx/DumpRenderTree.bkl
index 22fe1f9..e69de29 100644
--- a/WebKitTools/DumpRenderTree/wx/DumpRenderTree.bkl
+++ b/WebKitTools/DumpRenderTree/wx/DumpRenderTree.bkl
@@ -1,69 +0,0 @@
-<?xml version="1.0" ?>
-<!--
-Copyright (C) 2008 Kevin Ollivier <kevino@theolliviers.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.
-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.
-
-wxWebKit sample application build file
--->
-
-<makefile>
- <set var="WX_UNICODE">1</set>
- <set var="WX_SHARED">1</set>
-
- <include file="../../../WebKit/wx/wxwk-settings.bkl"/>
-
- <!-- the WX_PYTHON option was added to presets/wx.bkl in 2.8.5, so define
- it in case the presets/wx.bkl doesn't define it for us. -->
- <if cond="not isdefined('WX_PYTHON')">
- <set var="WX_PYTHON">0</set>
- </if>
- <template id="wxwebkit">
- <lib-path>$(WKOUTPUTDIR)</lib-path>
- <sys-lib>wxwebkit</sys-lib>
- </template>
- <exe id="DumpRenderTree" template="wxwk,xml2,iconv,xslt,icu,jscore,webcore,wxwebkit,curl,pthreads">
- <app-type>gui</app-type>
- <runtime-libs>dynamic</runtime-libs>
-
- <include>$(WK_ROOT)/WebCore/platform/wx</include>
- <include>$(WK_ROOT)/WebCore/bridge/wx</include>
- <include>$(WK_ROOT)/WebCore/page/wx</include>
- <include>$(WK_ROOT)/WebKit/wx</include>
- <include>$(WK_ROOT)/WebKit/wx/WebKitSupport</include>
- <include>$(WK_ROOT)/WebKitTools/DumpRenderTree</include>
- <include>$(WK_ROOT)/WebKitTools/DumpRenderTree/wx</include>
- <include>$(WK_ROOT)/WebKitBuild/Debug</include>
- <sources>
- DumpRenderTreeWx.cpp
- LayoutTestControllerWx.cpp
- WorkQueueItemWx.cpp
- ../LayoutTestController.cpp
- ../WorkQueue.cpp
- </sources>
-
- </exe>
-
-</makefile>
diff --git a/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp b/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
index 2c46950..4b811ec 100644
--- a/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
+++ b/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
@@ -216,6 +216,11 @@ void LayoutTestController::setDatabaseQuota(unsigned long long quota)
// FIXME: implement
}
+void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(bool, JSStringRef)
+{
+ // FIXME: implement
+}
+
void LayoutTestController::setAppCacheMaximumSize(unsigned long long size)
{
// FIXME: implement
@@ -352,5 +357,5 @@ void LayoutTestController::whiteListAccessFromOrigin(JSStringRef sourceOrigin, J
JSRetainPtr<JSStringRef> LayoutTestController::counterValueForElementById(JSStringRef id)
{
-
+ return 0;
}
diff --git a/WebKitTools/QtLauncher/QtLauncher.pro b/WebKitTools/QtLauncher/QtLauncher.pro
new file mode 100644
index 0000000..e448f69
--- /dev/null
+++ b/WebKitTools/QtLauncher/QtLauncher.pro
@@ -0,0 +1,34 @@
+TEMPLATE = app
+
+SOURCES += \
+ locationedit.cpp \
+ main.cpp \
+ mainwindow.cpp \
+ urlloader.cpp \
+ utils.cpp \
+ webpage.cpp \
+ webview.cpp \
+
+HEADERS += \
+ locationedit.h \
+ mainwindow.h \
+ urlloader.h \
+ utils.h \
+ webinspector.h \
+ webpage.h \
+ webview.h \
+
+CONFIG -= app_bundle
+CONFIG += uitools
+DESTDIR = ../../bin
+
+include(../../WebKit.pri)
+
+QT += network
+macx:QT+=xml
+QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
+
+symbian {
+ TARGET.UID3 = 0xA000E543
+ TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
+}
diff --git a/WebKitTools/QtLauncher/locationedit.cpp b/WebKitTools/QtLauncher/locationedit.cpp
new file mode 100644
index 0000000..a97f148
--- /dev/null
+++ b/WebKitTools/QtLauncher/locationedit.cpp
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * 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 "locationedit.h"
+
+LocationEdit::LocationEdit(QWidget* parent)
+ : QLineEdit(parent)
+ , m_progress(0)
+{
+ m_clearTimer.setSingleShot(true);
+ connect(&m_clearTimer, SIGNAL(timeout()), this, SLOT(reset()));
+}
+
+void LocationEdit::setProgress(int progress)
+{
+ m_clearTimer.stop();
+ m_progress = progress;
+ update();
+}
+
+void LocationEdit::reset()
+{
+ setProgress(0);
+}
+
+void LocationEdit::paintEvent(QPaintEvent* ev)
+{
+ QColor backgroundColor = QApplication::palette().color(QPalette::Base);
+ QColor progressColor = QColor(120, 180, 240);
+ QPalette p = palette();
+
+ if (!m_progress)
+ p.setBrush(QPalette::Base, backgroundColor);
+ else {
+ QLinearGradient gradient(0, 0, width(), 0);
+ gradient.setColorAt(0, progressColor);
+ gradient.setColorAt(((double) m_progress) / 100, progressColor);
+ if (m_progress != 100)
+ gradient.setColorAt((double) m_progress / 100 + 0.001, backgroundColor);
+ p.setBrush(QPalette::Base, gradient);
+ }
+ setPalette(p);
+
+ QLineEdit::paintEvent(ev);
+
+ if (m_progress == 100)
+ m_clearTimer.start(100);
+}
+
+void LocationEdit::focusInEvent(QFocusEvent* ev)
+{
+ QLineEdit::focusInEvent(ev);
+#ifdef Q_WS_MAEMO_5
+ QTimer::singleShot(0, this, SLOT(selectAll()));
+#endif
+}
diff --git a/WebKitTools/QtLauncher/locationedit.h b/WebKitTools/QtLauncher/locationedit.h
new file mode 100644
index 0000000..e82920c
--- /dev/null
+++ b/WebKitTools/QtLauncher/locationedit.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * 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 locationedit_h
+#define locationedit_h
+
+#include <QtGui>
+
+class LocationEdit : public QLineEdit {
+ Q_OBJECT
+
+public:
+ LocationEdit(QWidget* parent = 0);
+
+public slots:
+ void setProgress(int progress);
+
+private slots:
+ void reset();
+
+protected:
+ virtual void paintEvent(QPaintEvent*);
+ virtual void focusInEvent(QFocusEvent*);
+
+private:
+ int m_progress;
+ QTimer m_clearTimer;
+};
+
+#endif
diff --git a/WebKitTools/QtLauncher/main.cpp b/WebKitTools/QtLauncher/main.cpp
new file mode 100644
index 0000000..081b8f0
--- /dev/null
+++ b/WebKitTools/QtLauncher/main.cpp
@@ -0,0 +1,598 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
+ * Copyright (C) 2006 George Staikos <staikos@kde.org>
+ * Copyright (C) 2006 Dirk Mueller <mueller@kde.org>
+ * Copyright (C) 2006 Zack Rusin <zack@kde.org>
+ * Copyright (C) 2006 Simon Hausmann <hausmann@kde.org>
+ *
+ * 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 <QtGui>
+#include <QtNetwork/QNetworkRequest>
+#if !defined(QT_NO_PRINTER)
+#include <QPrintPreviewDialog>
+#endif
+
+#ifndef QT_NO_UITOOLS
+#include <QtUiTools/QUiLoader>
+#endif
+
+#include <QDebug>
+
+#include <cstdio>
+#include "mainwindow.h"
+#include <qevent.h>
+#include <qwebelement.h>
+#include <qwebframe.h>
+#include <qwebinspector.h>
+#include <qwebsettings.h>
+
+#ifdef Q_WS_MAEMO_5
+#include <qx11info_x11.h>
+#endif
+
+#include "urlloader.h"
+#include "utils.h"
+#include "webinspector.h"
+#include "webpage.h"
+#include "webview.h"
+
+#ifdef Q_WS_MAEMO_5
+#include <X11/Xatom.h>
+#include <X11/Xlib.h>
+#undef KeyPress
+#endif
+
+#ifndef NDEBUG
+void QWEBKIT_EXPORT qt_drt_garbageCollector_collect();
+#endif
+
+class LauncherWindow : public MainWindow {
+ Q_OBJECT
+
+public:
+ LauncherWindow(QString url = QString());
+ virtual ~LauncherWindow();
+
+ virtual void keyPressEvent(QKeyEvent* event);
+ void grabZoomKeys(bool grab);
+
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ void sendTouchEvent();
+ bool eventFilter(QObject* obj, QEvent* event);
+#endif
+
+ QWebView* webView() const { return view; }
+
+protected slots:
+ void loadStarted();
+ void loadFinished();
+
+ void showLinkHover(const QString &link, const QString &toolTip);
+
+ void zoomIn();
+ void zoomOut();
+ void resetZoom();
+ void toggleZoomTextOnly(bool on);
+
+ void print();
+ void screenshot();
+
+ void setEditable(bool on);
+
+ /* void dumpPlugins() */
+ void dumpHtml();
+
+ void selectElements();
+
+ void setTouchMocking(bool on);
+
+public slots:
+ void newWindow(const QString& url = QString());
+
+private:
+ // create the status bar, tool bar & menu
+ void setupUI();
+
+private:
+ QVector<int> zoomLevels;
+ int currentZoom;
+
+ QWebView* view;
+ WebInspector* inspector;
+
+ QAction* formatMenuAction;
+
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ QList<QTouchEvent::TouchPoint> touchPoints;
+ bool touchMocking;
+#endif
+};
+
+
+LauncherWindow::LauncherWindow(QString url)
+ : MainWindow(url)
+ , currentZoom(100)
+{
+ QSplitter* splitter = new QSplitter(Qt::Vertical, this);
+ setCentralWidget(splitter);
+
+ view = new WebViewTraditional(splitter);
+ view->setPage(page());
+
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ view->installEventFilter(this);
+ touchMocking = false;
+#endif
+
+ connect(page(), SIGNAL(loadStarted()), this, SLOT(loadStarted()));
+ connect(page(), SIGNAL(loadFinished(bool)), this, SLOT(loadFinished()));
+ connect(page(), SIGNAL(linkHovered(const QString&, const QString&, const QString&)),
+ this, SLOT(showLinkHover(const QString&, const QString&)));
+
+ inspector = new WebInspector(splitter);
+ inspector->setPage(page());
+ inspector->hide();
+ connect(this, SIGNAL(destroyed()), inspector, SLOT(deleteLater()));
+
+ setupUI();
+
+ // the zoom values are chosen to be like in Mozilla Firefox 3
+ zoomLevels << 30 << 50 << 67 << 80 << 90;
+ zoomLevels << 100;
+ zoomLevels << 110 << 120 << 133 << 150 << 170 << 200 << 240 << 300;
+
+ grabZoomKeys(true);
+
+ load(url);
+}
+
+LauncherWindow::~LauncherWindow()
+{
+ grabZoomKeys(false);
+}
+
+void LauncherWindow::keyPressEvent(QKeyEvent* event)
+{
+#ifdef Q_WS_MAEMO_5
+ switch (event->key()) {
+ case Qt::Key_F7:
+ zoomIn();
+ event->accept();
+ break;
+ case Qt::Key_F8:
+ zoomOut();
+ event->accept();
+ break;
+ }
+#endif
+ MainWindow::keyPressEvent(event);
+}
+
+void LauncherWindow::grabZoomKeys(bool grab)
+{
+#ifdef Q_WS_MAEMO_5
+ if (!winId()) {
+ qWarning("Can't grab keys unless we have a window id");
+ return;
+ }
+
+ Atom atom = XInternAtom(QX11Info::display(), "_HILDON_ZOOM_KEY_ATOM", False);
+ if (!atom) {
+ qWarning("Unable to obtain _HILDON_ZOOM_KEY_ATOM");
+ return;
+ }
+
+ unsigned long val = (grab) ? 1 : 0;
+ XChangeProperty(QX11Info::display(), winId(), atom, XA_INTEGER, 32, PropModeReplace, reinterpret_cast<unsigned char*>(&val), 1);
+#endif
+}
+
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+void LauncherWindow::sendTouchEvent()
+{
+ if (touchPoints.isEmpty())
+ return;
+
+ QEvent::Type type = QEvent::TouchUpdate;
+ if (touchPoints.size() == 1) {
+ if (touchPoints[0].state() == Qt::TouchPointReleased)
+ type = QEvent::TouchEnd;
+ else if (touchPoints[0].state() == Qt::TouchPointPressed)
+ type = QEvent::TouchBegin;
+ }
+
+ QTouchEvent touchEv(type);
+ touchEv.setTouchPoints(touchPoints);
+ QCoreApplication::sendEvent(page(), &touchEv);
+
+ // After sending the event, remove all touchpoints that were released
+ if (touchPoints[0].state() == Qt::TouchPointReleased)
+ touchPoints.removeAt(0);
+ if (touchPoints.size() > 1 && touchPoints[1].state() == Qt::TouchPointReleased)
+ touchPoints.removeAt(1);
+}
+
+bool LauncherWindow::eventFilter(QObject* obj, QEvent* event)
+{
+ if (!touchMocking || obj != view)
+ return QObject::eventFilter(obj, event);
+
+ if (event->type() == QEvent::MouseButtonPress
+ || event->type() == QEvent::MouseButtonRelease
+ || event->type() == QEvent::MouseButtonDblClick
+ || event->type() == QEvent::MouseMove) {
+
+ QMouseEvent* ev = static_cast<QMouseEvent*>(event);
+ if (ev->type() == QEvent::MouseMove
+ && !(ev->buttons() & Qt::LeftButton))
+ return false;
+
+ QTouchEvent::TouchPoint touchPoint;
+ touchPoint.setState(Qt::TouchPointMoved);
+ if ((ev->type() == QEvent::MouseButtonPress
+ || ev->type() == QEvent::MouseButtonDblClick))
+ touchPoint.setState(Qt::TouchPointPressed);
+ else if (ev->type() == QEvent::MouseButtonRelease)
+ touchPoint.setState(Qt::TouchPointReleased);
+
+ touchPoint.setId(0);
+ touchPoint.setScreenPos(ev->globalPos());
+ touchPoint.setPos(ev->pos());
+ touchPoint.setPressure(1);
+
+ // If the point already exists, update it. Otherwise create it.
+ if (touchPoints.size() > 0 && !touchPoints[0].id())
+ touchPoints[0] = touchPoint;
+ else if (touchPoints.size() > 1 && !touchPoints[1].id())
+ touchPoints[1] = touchPoint;
+ else
+ touchPoints.append(touchPoint);
+
+ sendTouchEvent();
+ } else if (event->type() == QEvent::KeyPress
+ && static_cast<QKeyEvent*>(event)->key() == Qt::Key_F
+ && static_cast<QKeyEvent*>(event)->modifiers() == Qt::ControlModifier) {
+
+ // If the keyboard point is already pressed, release it.
+ // Otherwise create it and append to touchPoints.
+ if (touchPoints.size() > 0 && touchPoints[0].id() == 1) {
+ touchPoints[0].setState(Qt::TouchPointReleased);
+ sendTouchEvent();
+ } else if (touchPoints.size() > 1 && touchPoints[1].id() == 1) {
+ touchPoints[1].setState(Qt::TouchPointReleased);
+ sendTouchEvent();
+ } else {
+ QTouchEvent::TouchPoint touchPoint;
+ touchPoint.setState(Qt::TouchPointPressed);
+ touchPoint.setId(1);
+ touchPoint.setScreenPos(QCursor::pos());
+ touchPoint.setPos(view->mapFromGlobal(QCursor::pos()));
+ touchPoint.setPressure(1);
+ touchPoints.append(touchPoint);
+ sendTouchEvent();
+
+ // After sending the event, change the touchpoint state to stationary
+ touchPoints.last().setState(Qt::TouchPointStationary);
+ }
+ }
+ return false;
+}
+#endif // QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+
+void LauncherWindow::loadStarted()
+{
+ view->setFocus(Qt::OtherFocusReason);
+}
+
+void LauncherWindow::loadFinished()
+{
+ QUrl url = page()->mainFrame()->url();
+ setAddressUrl(url.toString());
+ addCompleterEntry(url);
+}
+
+void LauncherWindow::showLinkHover(const QString &link, const QString &toolTip)
+{
+#ifndef Q_WS_MAEMO_5
+ statusBar()->showMessage(link);
+#endif
+#ifndef QT_NO_TOOLTIP
+ if (!toolTip.isEmpty())
+ QToolTip::showText(QCursor::pos(), toolTip);
+#endif
+}
+
+void LauncherWindow::zoomIn()
+{
+ int i = zoomLevels.indexOf(currentZoom);
+ Q_ASSERT(i >= 0);
+ if (i < zoomLevels.count() - 1)
+ currentZoom = zoomLevels[i + 1];
+
+ page()->mainFrame()->setZoomFactor(qreal(currentZoom) / 100.0);
+}
+
+void LauncherWindow::zoomOut()
+{
+ int i = zoomLevels.indexOf(currentZoom);
+ Q_ASSERT(i >= 0);
+ if (i > 0)
+ currentZoom = zoomLevels[i - 1];
+
+ page()->mainFrame()->setZoomFactor(qreal(currentZoom) / 100.0);
+}
+
+void LauncherWindow::resetZoom()
+{
+ currentZoom = 100;
+ page()->mainFrame()->setZoomFactor(1.0);
+}
+
+void LauncherWindow::toggleZoomTextOnly(bool b)
+{
+ page()->settings()->setAttribute(QWebSettings::ZoomTextOnly, b);
+}
+
+void LauncherWindow::print()
+{
+#if !defined(QT_NO_PRINTER)
+ QPrintPreviewDialog dlg(this);
+ connect(&dlg, SIGNAL(paintRequested(QPrinter*)),
+ view, SLOT(print(QPrinter*)));
+ dlg.exec();
+#endif
+}
+
+void LauncherWindow::screenshot()
+{
+ QPixmap pixmap = QPixmap::grabWidget(view);
+ QLabel* label = new QLabel;
+ label->setAttribute(Qt::WA_DeleteOnClose);
+ label->setWindowTitle("Screenshot - Preview");
+ label->setPixmap(pixmap);
+ label->show();
+
+ QString fileName = QFileDialog::getSaveFileName(label, "Screenshot");
+ if (!fileName.isEmpty()) {
+ pixmap.save(fileName, "png");
+ label->setWindowTitle(QString("Screenshot - Saved at %1").arg(fileName));
+ }
+}
+
+void LauncherWindow::setEditable(bool on)
+{
+ view->page()->setContentEditable(on);
+ formatMenuAction->setVisible(on);
+}
+
+/*
+void LauncherWindow::dumpPlugins() {
+ QList<QWebPluginInfo> plugins = QWebSettings::pluginDatabase()->plugins();
+ foreach (const QWebPluginInfo plugin, plugins) {
+ qDebug() << "Plugin:" << plugin.name();
+ foreach (const QWebPluginInfo::MimeType mime, plugin.mimeTypes()) {
+ qDebug() << " " << mime.name;
+ }
+ }
+}
+*/
+
+void LauncherWindow::dumpHtml()
+{
+ qDebug() << "HTML: " << page()->mainFrame()->toHtml();
+}
+
+void LauncherWindow::selectElements()
+{
+ bool ok;
+ QString str = QInputDialog::getText(this, "Select elements", "Choose elements",
+ QLineEdit::Normal, "a", &ok);
+
+ if (ok && !str.isEmpty()) {
+ QWebElementCollection result = page()->mainFrame()->findAllElements(str);
+ foreach (QWebElement e, result)
+ e.setStyleProperty("background-color", "yellow");
+#ifndef Q_WS_MAEMO_5
+ statusBar()->showMessage(QString("%1 element(s) selected").arg(result.count()), 5000);
+#endif
+ }
+}
+
+void LauncherWindow::setTouchMocking(bool on)
+{
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ touchMocking = on;
+#endif
+}
+
+void LauncherWindow::newWindow(const QString& url)
+{
+ LauncherWindow* mw = new LauncherWindow(url);
+ mw->show();
+}
+
+void LauncherWindow::setupUI()
+{
+ QMenu* fileMenu = menuBar()->addMenu("&File");
+ fileMenu->addAction("New Window", this, SLOT(newWindow()), QKeySequence::New);
+ fileMenu->addAction(tr("Open File..."), this, SLOT(openFile()), QKeySequence::Open);
+ fileMenu->addAction("Close Window", this, SLOT(close()), QKeySequence::Close);
+ fileMenu->addSeparator();
+ fileMenu->addAction("Take Screen Shot...", this, SLOT(screenshot()));
+ fileMenu->addAction(tr("Print..."), this, SLOT(print()), QKeySequence::Print);
+ fileMenu->addSeparator();
+ fileMenu->addAction("Quit", QApplication::instance(), SLOT(closeAllWindows()), QKeySequence(Qt::CTRL | Qt::Key_Q));
+
+ QMenu* editMenu = menuBar()->addMenu("&Edit");
+ editMenu->addAction(page()->action(QWebPage::Undo));
+ editMenu->addAction(page()->action(QWebPage::Redo));
+ editMenu->addSeparator();
+ editMenu->addAction(page()->action(QWebPage::Cut));
+ editMenu->addAction(page()->action(QWebPage::Copy));
+ editMenu->addAction(page()->action(QWebPage::Paste));
+ editMenu->addSeparator();
+ QAction* setEditable = editMenu->addAction("Set Editable", this, SLOT(setEditable(bool)));
+ setEditable->setCheckable(true);
+
+ QMenu* viewMenu = menuBar()->addMenu("&View");
+ viewMenu->addAction(view->pageAction(QWebPage::Stop));
+ viewMenu->addAction(view->pageAction(QWebPage::Reload));
+ viewMenu->addSeparator();
+ QAction* zoomIn = viewMenu->addAction("Zoom &In", this, SLOT(zoomIn()));
+ QAction* zoomOut = viewMenu->addAction("Zoom &Out", this, SLOT(zoomOut()));
+ QAction* resetZoom = viewMenu->addAction("Reset Zoom", this, SLOT(resetZoom()));
+ QAction* zoomTextOnly = viewMenu->addAction("Zoom Text Only", this, SLOT(toggleZoomTextOnly(bool)));
+ zoomTextOnly->setCheckable(true);
+ zoomTextOnly->setChecked(false);
+ viewMenu->addSeparator();
+ viewMenu->addAction("Dump HTML", this, SLOT(dumpHtml()));
+ // viewMenu->addAction("Dump plugins", this, SLOT(dumpPlugins()));
+
+ QMenu* formatMenu = new QMenu("F&ormat", this);
+ formatMenuAction = menuBar()->addMenu(formatMenu);
+ formatMenuAction->setVisible(false);
+ formatMenu->addAction(page()->action(QWebPage::ToggleBold));
+ formatMenu->addAction(page()->action(QWebPage::ToggleItalic));
+ formatMenu->addAction(page()->action(QWebPage::ToggleUnderline));
+ QMenu* writingMenu = formatMenu->addMenu(tr("Writing Direction"));
+ writingMenu->addAction(page()->action(QWebPage::SetTextDirectionDefault));
+ writingMenu->addAction(page()->action(QWebPage::SetTextDirectionLeftToRight));
+ writingMenu->addAction(page()->action(QWebPage::SetTextDirectionRightToLeft));
+
+ zoomIn->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Plus));
+ zoomOut->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Minus));
+ resetZoom->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0));
+
+ QMenu* toolsMenu = menuBar()->addMenu("&Develop");
+ toolsMenu->addAction("Select Elements...", this, SLOT(selectElements()));
+ QAction* showInspectorAction = toolsMenu->addAction("Show Web Inspector", inspector, SLOT(setVisible(bool)), QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_I));
+ showInspectorAction->setCheckable(true);
+ showInspectorAction->connect(inspector, SIGNAL(visibleChanged(bool)), SLOT(setChecked(bool)));
+
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ QAction* touchMockAction = toolsMenu->addAction("Toggle multitouch mocking", this, SLOT(setTouchMocking(bool)));
+ touchMockAction->setCheckable(true);
+ touchMockAction->setShortcut(QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_T));
+#endif
+}
+
+QWebPage* WebPage::createWindow(QWebPage::WebWindowType)
+{
+ LauncherWindow* mw = new LauncherWindow;
+ mw->show();
+ return mw->page();
+}
+
+QObject* WebPage::createPlugin(const QString &classId, const QUrl&, const QStringList&, const QStringList&)
+{
+ if (classId == "alien_QLabel") {
+ QLabel* l = new QLabel;
+ l->winId();
+ return l;
+ }
+
+#ifndef QT_NO_UITOOLS
+ QUiLoader loader;
+ return loader.createWidget(classId, view());
+#else
+ Q_UNUSED(classId);
+ return 0;
+#endif
+}
+
+
+#include "main.moc"
+
+int launcherMain(const QApplication& app)
+{
+#ifndef NDEBUG
+ int retVal = app.exec();
+ qt_drt_garbageCollector_collect();
+ QWebSettings::clearMemoryCaches();
+ return retVal;
+#else
+ return app.exec();
+#endif
+}
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ QString defaultUrl = QString("file://%1/%2").arg(QDir::homePath()).arg(QLatin1String("index.html"));
+
+ QWebSettings::setMaximumPagesInCache(4);
+
+ app.setApplicationName("QtLauncher");
+ app.setApplicationVersion("0.1");
+
+ QWebSettings::setObjectCacheCapacities((16*1024*1024) / 8, (16*1024*1024) / 8, 16*1024*1024);
+
+ QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, true);
+ QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
+ QWebSettings::enablePersistentStorage();
+
+ // To allow QWebInspector's configuration persistence
+ QCoreApplication::setOrganizationName("Nokia");
+ QCoreApplication::setApplicationName("QtLauncher");
+
+ const QStringList args = app.arguments();
+
+ if (args.contains(QLatin1String("-r"))) {
+ // robotized
+ QString listFile = args.at(2);
+ if (!(args.count() == 3) && QFile::exists(listFile)) {
+ qDebug() << "Usage: QtLauncher -r listfile";
+ exit(0);
+ }
+ LauncherWindow* window = new LauncherWindow;
+ QWebView* view = window->webView();
+ UrlLoader loader(view->page()->mainFrame(), listFile);
+ QObject::connect(view->page()->mainFrame(), SIGNAL(loadFinished(bool)), &loader, SLOT(loadNext()));
+ loader.loadNext();
+ window->show();
+ launcherMain(app);
+ } else {
+ LauncherWindow* window = 0;
+
+ // Look though the args for something we can open
+ for (int i = 1; i < args.count(); i++) {
+ if (!args.at(i).startsWith("-")) {
+ if (!window)
+ window = new LauncherWindow(args.at(i));
+ else
+ window->newWindow(args.at(i));
+ }
+ }
+
+ // If not, just open the default URL
+ if (!window)
+ window = new LauncherWindow(defaultUrl);
+
+ window->show();
+ launcherMain(app);
+ }
+}
diff --git a/WebKitTools/QtLauncher/mainwindow.cpp b/WebKitTools/QtLauncher/mainwindow.cpp
new file mode 100644
index 0000000..2662f5e
--- /dev/null
+++ b/WebKitTools/QtLauncher/mainwindow.cpp
@@ -0,0 +1,151 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
+ * Copyright (C) 2006 George Staikos <staikos@kde.org>
+ * Copyright (C) 2006 Dirk Mueller <mueller@kde.org>
+ * Copyright (C) 2006 Zack Rusin <zack@kde.org>
+ * Copyright (C) 2006 Simon Hausmann <hausmann@kde.org>
+ *
+ * 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 "mainwindow.h"
+
+#include "locationedit.h"
+#include "utils.h"
+
+MainWindow::MainWindow(const QString& url)
+ : m_page(new WebPage(this))
+{
+ setAttribute(Qt::WA_DeleteOnClose);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 5, 0)
+ if (qgetenv("QTLAUNCHER_USE_ARGB_VISUALS").toInt() == 1)
+ setAttribute(Qt::WA_TranslucentBackground);
+#endif
+
+ buildUI();
+}
+
+void MainWindow::buildUI()
+{
+ QToolBar* bar = addToolBar("Navigation");
+ bar->addAction(page()->action(QWebPage::Back));
+ bar->addAction(page()->action(QWebPage::Forward));
+ bar->addAction(page()->action(QWebPage::Reload));
+ bar->addAction(page()->action(QWebPage::Stop));
+
+ urlEdit = new LocationEdit(this);
+ urlEdit->setSizePolicy(QSizePolicy::Expanding, urlEdit->sizePolicy().verticalPolicy());
+ connect(urlEdit, SIGNAL(returnPressed()), SLOT(changeLocation()));
+ QCompleter* completer = new QCompleter(this);
+ urlEdit->setCompleter(completer);
+ completer->setModel(&urlModel);
+ bar->addWidget(urlEdit);
+
+ connect(page()->mainFrame(), SIGNAL(titleChanged(const QString&)),
+ this, SLOT(setWindowTitle(const QString&)));
+ connect(page(), SIGNAL(loadProgress(int)), urlEdit, SLOT(setProgress(int)));
+ connect(page(), SIGNAL(windowCloseRequested()), this, SLOT(close()));
+
+ // short-cuts
+ page()->action(QWebPage::Back)->setShortcut(QKeySequence::Back);
+ page()->action(QWebPage::Stop)->setShortcut(Qt::Key_Escape);
+ page()->action(QWebPage::Forward)->setShortcut(QKeySequence::Forward);
+ page()->action(QWebPage::Reload)->setShortcut(QKeySequence::Refresh);
+ page()->action(QWebPage::Undo)->setShortcut(QKeySequence::Undo);
+ page()->action(QWebPage::Redo)->setShortcut(QKeySequence::Redo);
+ page()->action(QWebPage::Cut)->setShortcut(QKeySequence::Cut);
+ page()->action(QWebPage::Copy)->setShortcut(QKeySequence::Copy);
+ page()->action(QWebPage::Paste)->setShortcut(QKeySequence::Paste);
+
+ page()->action(QWebPage::ToggleBold)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_B));
+ page()->action(QWebPage::ToggleItalic)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_I));
+ page()->action(QWebPage::ToggleUnderline)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_U));
+}
+
+WebPage* MainWindow::page()
+{
+ return m_page;
+}
+
+void MainWindow::setAddressUrl(const QString& url)
+{
+ urlEdit->setText(url);
+}
+
+void MainWindow::addCompleterEntry(const QUrl& url)
+{
+ QUrl::FormattingOptions opts;
+ opts |= QUrl::RemoveScheme;
+ opts |= QUrl::RemoveUserInfo;
+ opts |= QUrl::StripTrailingSlash;
+ QString s = url.toString(opts);
+ s = s.mid(2);
+ if (s.isEmpty())
+ return;
+
+ if (!urlList.contains(s))
+ urlList += s;
+ urlModel.setStringList(urlList);
+}
+
+void MainWindow::load(const QString& url)
+{
+ QUrl qurl = urlFromUserInput(url);
+ if (qurl.scheme().isEmpty())
+ qurl = QUrl("http://" + url + "/");
+ load(qurl);
+}
+
+void MainWindow::load(const QUrl& url)
+{
+ if (!url.isValid())
+ return;
+
+ setAddressUrl(url.toString());
+ page()->mainFrame()->load(url);
+}
+
+void MainWindow::changeLocation()
+{
+ QString string = urlEdit->text();
+ load(string);
+}
+
+void MainWindow::openFile()
+{
+ static const QString filter("HTML Files (*.htm *.html);;Text Files (*.txt);;Image Files (*.gif *.jpg *.png);;All Files (*)");
+
+ QFileDialog fileDialog(this, tr("Open"), QString(), filter);
+ fileDialog.setAcceptMode(QFileDialog::AcceptOpen);
+ fileDialog.setFileMode(QFileDialog::ExistingFile);
+ fileDialog.setOptions(QFileDialog::ReadOnly);
+
+ if (fileDialog.exec()) {
+ QString selectedFile = fileDialog.selectedFiles()[0];
+ if (!selectedFile.isEmpty())
+ load(QUrl::fromLocalFile(selectedFile));
+ }
+}
+
diff --git a/WebKitTools/QtLauncher/mainwindow.h b/WebKitTools/QtLauncher/mainwindow.h
new file mode 100644
index 0000000..1a30a09
--- /dev/null
+++ b/WebKitTools/QtLauncher/mainwindow.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
+ * Copyright (C) 2006 George Staikos <staikos@kde.org>
+ * Copyright (C) 2006 Dirk Mueller <mueller@kde.org>
+ * Copyright (C) 2006 Zack Rusin <zack@kde.org>
+ * Copyright (C) 2006 Simon Hausmann <hausmann@kde.org>
+ *
+ * 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 mainwindow_h
+#define mainwindow_h
+
+#include <QtGui>
+#include "webpage.h"
+
+class LocationEdit;
+
+class MainWindow : public QMainWindow {
+ Q_OBJECT
+
+public:
+ MainWindow(const QString& url = QString());
+
+ void setAddressUrl(const QString& url);
+ void addCompleterEntry(const QUrl& url);
+
+ void load(const QString& url);
+ void load(const QUrl& url);
+
+ WebPage* page();
+
+protected slots:
+ void openFile();
+ void changeLocation();
+
+private:
+ void buildUI();
+
+ QStringListModel urlModel;
+ QStringList urlList;
+ LocationEdit* urlEdit;
+
+ WebPage* m_page;
+};
+
+#endif
diff --git a/WebKitTools/QtLauncher/urlloader.cpp b/WebKitTools/QtLauncher/urlloader.cpp
new file mode 100644
index 0000000..630ead6
--- /dev/null
+++ b/WebKitTools/QtLauncher/urlloader.cpp
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2009 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 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 "urlloader.h"
+
+#include <QFile>
+#include <QDebug>
+
+UrlLoader::UrlLoader(QWebFrame* frame, const QString& inputFileName)
+ : m_frame(frame)
+ , m_stdOut(stdout)
+ , m_loaded(0)
+{
+ init(inputFileName);
+}
+
+void UrlLoader::loadNext()
+{
+ QString qstr;
+ if (getUrl(qstr)) {
+ QUrl url(qstr, QUrl::StrictMode);
+ if (url.isValid()) {
+ m_stdOut << "Loading " << qstr << " ......" << ++m_loaded << endl;
+ m_frame->load(url);
+ } else
+ loadNext();
+ } else
+ disconnect(m_frame, 0, this, 0);
+}
+
+void UrlLoader::init(const QString& inputFileName)
+{
+ QFile inputFile(inputFileName);
+ if (inputFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ QTextStream stream(&inputFile);
+ QString line;
+ while (true) {
+ line = stream.readLine();
+ if (line.isNull())
+ break;
+ m_urls.append(line);
+ }
+ } else {
+ qDebug() << "Can't open list file";
+ exit(0);
+ }
+ m_index = 0;
+ inputFile.close();
+}
+
+bool UrlLoader::getUrl(QString& qstr)
+{
+ if (m_index == m_urls.size())
+ return false;
+
+ qstr = m_urls[m_index++];
+ return true;
+}
diff --git a/WebKitTools/QtLauncher/urlloader.h b/WebKitTools/QtLauncher/urlloader.h
new file mode 100644
index 0000000..ed14adc
--- /dev/null
+++ b/WebKitTools/QtLauncher/urlloader.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2009 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 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 urlloader_h
+#define urlloader_h
+
+#include "qwebframe.h"
+
+#include <QTextStream>
+#include <QVector>
+
+class UrlLoader : public QObject {
+ Q_OBJECT
+
+public:
+ UrlLoader(QWebFrame* frame, const QString& inputFileName);
+
+public slots:
+ void loadNext();
+
+private:
+ void init(const QString& inputFileName);
+ bool getUrl(QString& qstr);
+
+private:
+ QVector<QString> m_urls;
+ int m_index;
+ QWebFrame* m_frame;
+ QTextStream m_stdOut;
+ int m_loaded;
+};
+
+#endif
diff --git a/WebCore/page/chromium/FrameChromium.h b/WebKitTools/QtLauncher/utils.cpp
index faa78e7..7013f46 100644
--- a/WebCore/page/chromium/FrameChromium.h
+++ b/WebKitTools/QtLauncher/utils.cpp
@@ -1,6 +1,7 @@
/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
- * Copyright (C) 2008 Google Inc.
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -21,19 +22,21 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef FrameChromium_h
-#define FrameChromium_h
-
-#include "Frame.h"
-
-namespace WebCore {
+#include "utils.h"
- // printRect is only used for the width/height ratio. Their absolute values aren't used.
- void computePageRectsForFrame(Frame*, const IntRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, Vector<IntRect>& pages, int& pageHeight);
-
-}
+QUrl urlFromUserInput(const QString& string)
+{
+ QString input(string);
+ QFileInfo fi(input);
+ if (fi.exists() && fi.isRelative())
+ input = fi.absoluteFilePath();
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ return QUrl::fromUserInput(input);
+#else
+ return QUrl(input);
#endif
+}
diff --git a/WebKitTools/QtLauncher/utils.h b/WebKitTools/QtLauncher/utils.h
new file mode 100644
index 0000000..afe771e
--- /dev/null
+++ b/WebKitTools/QtLauncher/utils.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * 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 utils_h
+#define utils_h
+
+#include <QtCore>
+
+QUrl urlFromUserInput(const QString& input);
+
+#endif
diff --git a/WebKitTools/QtLauncher/webinspector.h b/WebKitTools/QtLauncher/webinspector.h
new file mode 100644
index 0000000..d251c5c
--- /dev/null
+++ b/WebKitTools/QtLauncher/webinspector.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * 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 webinspector_h
+#define webinspector_h
+
+#include <QtGui>
+#include "qwebinspector.h"
+
+class WebInspector : public QWebInspector {
+ Q_OBJECT
+
+public:
+ WebInspector(QWidget* parent) : QWebInspector(parent) {}
+
+signals:
+ void visibleChanged(bool nowVisible);
+
+protected:
+ void showEvent(QShowEvent* event)
+ {
+ QWebInspector::showEvent(event);
+ emit visibleChanged(true);
+ }
+ void hideEvent(QHideEvent* event)
+ {
+ QWebInspector::hideEvent(event);
+ emit visibleChanged(false);
+ }
+};
+
+#endif
diff --git a/WebKitTools/QtLauncher/webpage.cpp b/WebKitTools/QtLauncher/webpage.cpp
new file mode 100644
index 0000000..2fe1306
--- /dev/null
+++ b/WebKitTools/QtLauncher/webpage.cpp
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
+ * Copyright (C) 2006 George Staikos <staikos@kde.org>
+ * Copyright (C) 2006 Dirk Mueller <mueller@kde.org>
+ * Copyright (C) 2006 Zack Rusin <zack@kde.org>
+ * Copyright (C) 2006 Simon Hausmann <hausmann@kde.org>
+ *
+ * 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 "webpage.h"
+
+#include <QDesktopServices>
+#include <QtGui>
+#include <QtNetwork/QNetworkRequest>
+#include <QtNetwork/QNetworkProxy>
+
+WebPage::WebPage(QObject* parent)
+ : QWebPage(parent)
+{
+ applyProxy();
+}
+
+void WebPage::applyProxy()
+{
+ QUrl proxyUrl(qgetenv("http_proxy"));
+
+ if (proxyUrl.isValid() && !proxyUrl.host().isEmpty()) {
+ int proxyPort = (proxyUrl.port() > 0) ? proxyUrl.port() : 8080;
+ networkAccessManager()->setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, proxyUrl.host(), proxyPort));
+ }
+}
+
+bool WebPage::supportsExtension(QWebPage::Extension extension) const
+{
+ if (extension == QWebPage::ErrorPageExtension)
+ return true;
+ return false;
+}
+
+bool WebPage::extension(Extension extension, const ExtensionOption* option, ExtensionReturn* output)
+{
+ const QWebPage::ErrorPageExtensionOption* info = static_cast<const QWebPage::ErrorPageExtensionOption*>(option);
+ QWebPage::ErrorPageExtensionReturn* errorPage = static_cast<QWebPage::ErrorPageExtensionReturn*>(output);
+
+ errorPage->content = QString("<html><head><title>Failed loading page</title></head><body>%1</body></html>")
+ .arg(info->errorString).toUtf8();
+
+ return true;
+}
+
+bool WebPage::acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& request, NavigationType type)
+{
+ QObject* view = parent();
+
+ QVariant value = view->property("keyboardModifiers");
+
+ if (!value.isNull()) {
+ Qt::KeyboardModifiers modifiers = Qt::KeyboardModifiers(value.toInt());
+
+ if (modifiers & Qt::ShiftModifier) {
+ QWebPage* page = createWindow(QWebPage::WebBrowserWindow);
+ page->mainFrame()->load(request);
+ return false;
+ }
+
+ if (modifiers & Qt::AltModifier) {
+ openUrlInDefaultBrowser(request.url());
+ return false;
+ }
+ }
+
+ return QWebPage::acceptNavigationRequest(frame, request, type);
+}
+
+void WebPage::openUrlInDefaultBrowser(const QUrl& url)
+{
+ if (QAction* action = qobject_cast<QAction*>(sender()))
+ QDesktopServices::openUrl(action->data().toUrl());
+ else
+ QDesktopServices::openUrl(url);
+}
+
+
diff --git a/WebKitTools/QtLauncher/webpage.h b/WebKitTools/QtLauncher/webpage.h
new file mode 100644
index 0000000..14a0571
--- /dev/null
+++ b/WebKitTools/QtLauncher/webpage.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
+ * Copyright (C) 2006 George Staikos <staikos@kde.org>
+ * Copyright (C) 2006 Dirk Mueller <mueller@kde.org>
+ * Copyright (C) 2006 Zack Rusin <zack@kde.org>
+ * Copyright (C) 2006 Simon Hausmann <hausmann@kde.org>
+ *
+ * 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 webpage_h
+#define webpage_h
+
+#include <qwebframe.h>
+#include <qwebpage.h>
+
+class WebPage : public QWebPage {
+ Q_OBJECT
+
+public:
+ WebPage(QObject* parent = 0);
+
+ virtual QWebPage* createWindow(QWebPage::WebWindowType);
+ virtual QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&);
+ virtual bool supportsExtension(QWebPage::Extension extension) const;
+ virtual bool extension(Extension extension, const ExtensionOption* option, ExtensionReturn* output);
+
+ virtual bool acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& request, NavigationType type);
+
+public slots:
+ void openUrlInDefaultBrowser(const QUrl& url = QUrl());
+
+private:
+ void applyProxy();
+};
+
+#endif
diff --git a/WebKitTools/QtLauncher/webview.cpp b/WebKitTools/QtLauncher/webview.cpp
new file mode 100644
index 0000000..d08da4c
--- /dev/null
+++ b/WebKitTools/QtLauncher/webview.cpp
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
+ * Copyright (C) 2006 George Staikos <staikos@kde.org>
+ * Copyright (C) 2006 Dirk Mueller <mueller@kde.org>
+ * Copyright (C) 2006 Zack Rusin <zack@kde.org>
+ * Copyright (C) 2006 Simon Hausmann <hausmann@kde.org>
+ *
+ * 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 "webview.h"
+
+#include <QtGui>
+
+static QMenu* createContextMenu(QWebPage* page, QPoint position)
+{
+ QMenu* menu = page->createStandardContextMenu();
+
+ QWebHitTestResult r = page->mainFrame()->hitTestContent(position);
+
+ if (!r.linkUrl().isEmpty()) {
+ WebPage* webPage = qobject_cast<WebPage*>(page);
+ QAction* newTabAction = menu->addAction("Open in Default &Browser", webPage, SLOT(openUrlInDefaultBrowser()));
+ newTabAction->setData(r.linkUrl());
+ menu->insertAction(menu->actions().at(2), newTabAction);
+ }
+ return menu;
+}
+
+void WebViewGraphicsBased::mousePressEvent(QGraphicsSceneMouseEvent* event)
+{
+ setProperty("mouseButtons", QVariant::fromValue(int(event->buttons())));
+ setProperty("keyboardModifiers", QVariant::fromValue(int(event->modifiers())));
+
+ QGraphicsWebView::mousePressEvent(event);
+}
+
+void WebViewTraditional::mousePressEvent(QMouseEvent* event)
+{
+ setProperty("mouseButtons", QVariant::fromValue(int(event->buttons())));
+ setProperty("keyboardModifiers", QVariant::fromValue(int(event->modifiers())));
+
+ QWebView::mousePressEvent(event);
+}
+
+void WebViewGraphicsBased::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
+{
+ QMenu* menu = createContextMenu(page(), event->pos().toPoint());
+ menu->exec(mapToScene(event->pos()).toPoint());
+ delete menu;
+}
+
+void WebViewTraditional::contextMenuEvent(QContextMenuEvent* event)
+{
+ QMenu* menu = createContextMenu(page(), event->pos());
+ menu->exec(mapToGlobal(event->pos()));
+ delete menu;
+}
+
diff --git a/WebKitTools/QtLauncher/webview.h b/WebKitTools/QtLauncher/webview.h
new file mode 100644
index 0000000..68f220e
--- /dev/null
+++ b/WebKitTools/QtLauncher/webview.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
+ * Copyright (C) 2006 George Staikos <staikos@kde.org>
+ * Copyright (C) 2006 Dirk Mueller <mueller@kde.org>
+ * Copyright (C) 2006 Zack Rusin <zack@kde.org>
+ * Copyright (C) 2006 Simon Hausmann <hausmann@kde.org>
+ *
+ * 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 webview_h
+#define webview_h
+
+#include "webpage.h"
+#include <qwebview.h>
+#include <qgraphicswebview.h>
+
+class WebViewGraphicsBased : public QGraphicsWebView {
+ Q_OBJECT
+
+public:
+ WebViewGraphicsBased(QGraphicsItem* parent = 0) : QGraphicsWebView(parent) {};
+
+protected:
+ virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent*);
+ virtual void mousePressEvent(QGraphicsSceneMouseEvent*);
+};
+
+class WebViewTraditional : public QWebView {
+ Q_OBJECT
+
+public:
+ WebViewTraditional(QWidget* parent) : QWebView(parent) {}
+
+protected:
+ virtual void contextMenuEvent(QContextMenuEvent*);
+ virtual void mousePressEvent(QMouseEvent*);
+};
+
+#endif
diff --git a/WebKitTools/QueueStatusServer/app.yaml b/WebKitTools/QueueStatusServer/app.yaml
index 2756112..f6ff870 100644
--- a/WebKitTools/QueueStatusServer/app.yaml
+++ b/WebKitTools/QueueStatusServer/app.yaml
@@ -8,4 +8,4 @@ handlers:
static_dir: stylesheets
- url: /.*
- script: queue_status.py
+ script: main.py
diff --git a/WebKitTools/QueueStatusServer/cron.yaml b/WebKitTools/QueueStatusServer/cron.yaml
new file mode 100644
index 0000000..09b9945
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/cron.yaml
@@ -0,0 +1,4 @@
+cron:
+- description: collect the garbage
+ url: /gc
+ schedule: every 4 hours
diff --git a/WebKitTools/QueueStatusServer/filters/webkit_extras.py b/WebKitTools/QueueStatusServer/filters/webkit_extras.py
index 6a08727..b645f78 100644
--- a/WebKitTools/QueueStatusServer/filters/webkit_extras.py
+++ b/WebKitTools/QueueStatusServer/filters/webkit_extras.py
@@ -26,19 +26,34 @@
# (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 re
+
from django.template.defaultfilters import stringfilter
from google.appengine.ext import webapp
-import re
+register = webapp.template.create_template_register()
bug_regexp = re.compile(r"bug (?P<bug_id>\d+)")
patch_regexp = re.compile(r"patch (?P<patch_id>\d+)")
+@register.filter
@stringfilter
def webkit_linkify(value):
value = bug_regexp.sub(r'<a href="http://webkit.org/b/\g<bug_id>">bug \g<bug_id></a>', value)
value = patch_regexp.sub(r'<a href="https://bugs.webkit.org/attachment.cgi?id=\g<patch_id>&action=prettypatch">patch \g<patch_id></a>', value)
return value
-register = webapp.template.create_template_register()
-register.filter(webkit_linkify)
+@register.filter
+@stringfilter
+def webkit_bug_id(value):
+ return '<a href="http://webkit.org/b/%s">%s</a>' % (value, value)
+
+@register.filter
+@stringfilter
+def webkit_attachment_id(value):
+ return '<a href="https://bugs.webkit.org/attachment.cgi?id=%s&action=prettypatch">%s</a>' % (value, value)
+
+@register.filter
+@stringfilter
+def results_link(status_id):
+ return '<a href="/results/%s">results</a>' % status_id
diff --git a/WebKitTools/Scripts/modules/__init__.py b/WebKitTools/QueueStatusServer/handlers/__init__.py
index ef65bee..ef65bee 100644
--- a/WebKitTools/Scripts/modules/__init__.py
+++ b/WebKitTools/QueueStatusServer/handlers/__init__.py
diff --git a/WebKitTools/QueueStatusServer/handlers/dashboard.py b/WebKitTools/QueueStatusServer/handlers/dashboard.py
new file mode 100644
index 0000000..80f30ec
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/handlers/dashboard.py
@@ -0,0 +1,41 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from google.appengine.ext import webapp
+from google.appengine.ext.webapp import template
+
+from model.attachment import Attachment
+
+class Dashboard(webapp.RequestHandler):
+ def get(self):
+ attachments = Attachment.recent(limit=25)
+
+ template_values = {
+ "summaries" : [attachment.summary() for attachment in attachments],
+ }
+ self.response.out.write(template.render("templates/dashboard.html", template_values))
diff --git a/WebKitTools/QueueStatusServer/handlers/gc.py b/WebKitTools/QueueStatusServer/handlers/gc.py
new file mode 100644
index 0000000..d04ee4d
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/handlers/gc.py
@@ -0,0 +1,44 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from google.appengine.ext import webapp
+
+from model.queuestatus import QueueStatus
+
+
+class GC(webapp.RequestHandler):
+ def get(self):
+ statuses = QueueStatus.all().order("-date")
+ seen_queues = set()
+ for status in statuses:
+ if status.active_patch_id or status.active_bug_id:
+ continue
+ if status.queue_name in seen_queues:
+ status.delete()
+ seen_queues.add(status.queue_name)
+ self.response.out.write("Done!")
diff --git a/WebKitTools/QueueStatusServer/handlers/patch.py b/WebKitTools/QueueStatusServer/handlers/patch.py
new file mode 100644
index 0000000..3219212
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/handlers/patch.py
@@ -0,0 +1,53 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from google.appengine.ext import webapp
+from google.appengine.ext.webapp import template
+
+from model.queuestatus import QueueStatus
+
+
+class Patch(webapp.RequestHandler):
+ def get(self, attachment_id_string):
+ attachment_id = int(attachment_id_string)
+ statuses = QueueStatus.all().filter("active_patch_id =", attachment_id).order("-date")
+
+ bug_id = None
+ queue_status = {}
+ for status in statuses:
+ bug_id = status.active_bug_id # Should be the same for every status.
+ per_queue_statuses = queue_status.get(status.queue_name, [])
+ per_queue_statuses.append(status)
+ queue_status[status.queue_name] = per_queue_statuses
+
+ template_values = {
+ "attachment_id" : attachment_id,
+ "bug_id" : bug_id,
+ "queue_status" : queue_status,
+ }
+ self.response.out.write(template.render("templates/patch.html", template_values))
diff --git a/WebKitTools/QueueStatusServer/handlers/patchstatus.py b/WebKitTools/QueueStatusServer/handlers/patchstatus.py
new file mode 100644
index 0000000..1a5422e
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/handlers/patchstatus.py
@@ -0,0 +1,40 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from google.appengine.ext import webapp
+
+from model.queuestatus import QueueStatus
+
+
+class PatchStatus(webapp.RequestHandler):
+ def get(self, queue_name, attachment_id):
+ statuses = QueueStatus.all().filter('queue_name =', queue_name).filter('active_patch_id =', int(attachment_id)).order('-date').fetch(1)
+ if not statuses:
+ self.error(404)
+ return
+ self.response.out.write(statuses[0].message)
diff --git a/WebKitTools/QueueStatusServer/handlers/recentstatus.py b/WebKitTools/QueueStatusServer/handlers/recentstatus.py
new file mode 100644
index 0000000..d1df78c
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/handlers/recentstatus.py
@@ -0,0 +1,57 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from google.appengine.ext import webapp
+from google.appengine.ext.webapp import template
+
+from model.queues import queues
+from model.queuestatus import QueueStatus
+
+class RecentStatus(webapp.RequestHandler):
+ def _title_case(self, string):
+ words = string.split(" ")
+ words = map(lambda word: word.capitalize(), words)
+ return " ".join(words)
+
+ def _pretty_queue_name(self, queue_name):
+ return self._title_case(queue_name.replace("-", " "))
+
+ # We could change "/" to just redirect to /queue-status/commit-queue in the future
+ # at which point we would not need a default value for queue_name here.
+ def get(self, queue_name="commit-queue"):
+ queue_status = {}
+ for queue in queues:
+ statuses = QueueStatus.all().filter("queue_name =", queue).order("-date").fetch(6)
+ if not statuses:
+ continue
+ queue_status[queue] = statuses
+
+ template_values = {
+ "queue_status" : queue_status,
+ }
+ self.response.out.write(template.render("templates/recentstatus.html", template_values))
diff --git a/WebKitTools/QueueStatusServer/handlers/showresults.py b/WebKitTools/QueueStatusServer/handlers/showresults.py
new file mode 100644
index 0000000..e4cb71b
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/handlers/showresults.py
@@ -0,0 +1,41 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from google.appengine.ext import webapp
+
+from model.queuestatus import QueueStatus
+
+
+class ShowResults(webapp.RequestHandler):
+ def get(self, status_id):
+ status = QueueStatus.get_by_id(int(status_id))
+ if not status:
+ self.error(404)
+ return
+ self.response.headers["Content-Type"] = "text/plain; charset=utf-8"
+ self.response.out.write(status.results_file)
diff --git a/WebKitTools/QueueStatusServer/handlers/statusbubble.py b/WebKitTools/QueueStatusServer/handlers/statusbubble.py
new file mode 100644
index 0000000..d52509f
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/handlers/statusbubble.py
@@ -0,0 +1,42 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from google.appengine.ext import webapp
+from google.appengine.ext.webapp import template
+
+from model.attachment import Attachment
+
+
+class StatusBubble(webapp.RequestHandler):
+ def get(self, attachment_id):
+ attachment = Attachment(int(attachment_id))
+
+ template_values = {
+ "summary" : attachment.summary()
+ }
+ self.response.out.write(template.render("templates/statusbubble.html", template_values))
diff --git a/WebKitTools/QueueStatusServer/handlers/updatestatus.py b/WebKitTools/QueueStatusServer/handlers/updatestatus.py
new file mode 100644
index 0000000..3ad7b77
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/handlers/updatestatus.py
@@ -0,0 +1,67 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from google.appengine.api import users
+from google.appengine.ext import webapp, db
+from google.appengine.ext.webapp import template
+
+from model.attachment import Attachment
+from model.queuestatus import QueueStatus
+
+
+class UpdateStatus(webapp.RequestHandler):
+ def get(self):
+ self.response.out.write(template.render("templates/updatestatus.html", None))
+
+ def _int_from_request(self, name):
+ string_value = self.request.get(name)
+ try:
+ int_value = int(string_value)
+ return int_value
+ except ValueError, TypeError:
+ pass
+ return None
+
+ def post(self):
+ queue_status = QueueStatus()
+
+ if users.get_current_user():
+ queue_status.author = users.get_current_user()
+
+ bug_id = self._int_from_request("bug_id")
+ patch_id = self._int_from_request("patch_id")
+ queue_name = self.request.get("queue_name")
+ queue_status.queue_name = queue_name
+ queue_status.active_bug_id = bug_id
+ queue_status.active_patch_id = patch_id
+ queue_status.message = self.request.get("status")
+ results_file = self.request.get("results_file")
+ queue_status.results_file = db.Blob(str(results_file))
+ queue_status.put()
+ Attachment.dirty(patch_id)
+ self.response.out.write(queue_status.key().id())
diff --git a/WebKitTools/QueueStatusServer/index.html b/WebKitTools/QueueStatusServer/index.html
deleted file mode 100644
index fbd51fb..0000000
--- a/WebKitTools/QueueStatusServer/index.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>WebKit Commit Queue Status</title>
- <link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
-</head>
-<body>
- <center>
- <div id="current_status">
- {{ last_status.message|force_escape|urlize|webkit_linkify|safe }}
- <div id="last_status_date">As of {{ last_status.date|timesince }} ago</div>
- </div>
-
- <table id="recent_status_table">
- <tr>
- <th colspan=2>Recent Status</th>
- </tr>
- {% for recent_status in recent_statuses %}
- <tr>
- <td class='status_date'>{{ recent_status.date|timesince }} ago</td>
- <td class="recent_status">{{ recent_status.message|force_escape|urlize|webkit_linkify|safe }}</td>
- </tr>
- {% endfor %}
- </table>
-
- <div id="footer"><a href="https://bugs.webkit.org/buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=commit-queue%2B">queued bugs</a> | <a href="http://trac.webkit.org/wiki/CommitQueue">documentation</a> | <a href="http://webkit.org/">webkit.org</a></div>
- </center>
-</body>
-</html>
diff --git a/WebKitTools/QueueStatusServer/index.yaml b/WebKitTools/QueueStatusServer/index.yaml
index bf11262..60ba3df 100644
--- a/WebKitTools/QueueStatusServer/index.yaml
+++ b/WebKitTools/QueueStatusServer/index.yaml
@@ -13,6 +13,12 @@ indexes:
- kind: QueueStatus
properties:
- name: active_patch_id
+ - name: date
+ direction: desc
+
+- kind: QueueStatus
+ properties:
+ - name: active_patch_id
- name: queue_name
- name: date
direction: desc
diff --git a/WebKitTools/QueueStatusServer/main.py b/WebKitTools/QueueStatusServer/main.py
new file mode 100644
index 0000000..8efc771
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/main.py
@@ -0,0 +1,65 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Request a modern Django
+from google.appengine.dist import use_library
+use_library('django', '1.1')
+
+from google.appengine.ext import webapp
+from google.appengine.ext.webapp.util import run_wsgi_app
+
+from handlers.dashboard import Dashboard
+from handlers.gc import GC
+from handlers.patch import Patch
+from handlers.patchstatus import PatchStatus
+from handlers.recentstatus import RecentStatus
+from handlers.showresults import ShowResults
+from handlers.statusbubble import StatusBubble
+from handlers.updatestatus import UpdateStatus
+
+webapp.template.register_template_library('filters.webkit_extras')
+
+routes = [
+ ('/', RecentStatus),
+ ('/dashboard', Dashboard),
+ ('/gc', GC),
+ (r'/patch-status/(.*)/(.*)', PatchStatus),
+ (r'/patch/(.*)', Patch),
+ (r'/results/(.*)', ShowResults),
+ (r'/status-bubble/(.*)', StatusBubble),
+ (r'/queue-status/(.*)', RecentStatus),
+ ('/update-status', UpdateStatus),
+]
+
+application = webapp.WSGIApplication(routes, debug=True)
+
+def main():
+ run_wsgi_app(application)
+
+if __name__ == "__main__":
+ main()
diff --git a/WebKitTools/Scripts/modules/commands/__init__.py b/WebKitTools/QueueStatusServer/model/__init__.py
index ef65bee..ef65bee 100644
--- a/WebKitTools/Scripts/modules/commands/__init__.py
+++ b/WebKitTools/QueueStatusServer/model/__init__.py
diff --git a/WebKitTools/QueueStatusServer/model/attachment.py b/WebKitTools/QueueStatusServer/model/attachment.py
new file mode 100644
index 0000000..751f78e
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/model/attachment.py
@@ -0,0 +1,109 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import re
+
+from google.appengine.api import memcache
+
+from model.queues import queues
+from model.queuestatus import QueueStatus
+
+
+class Attachment(object):
+ @classmethod
+ def dirty(cls, attachment_id):
+ memcache.delete(str(attachment_id), namespace="attachment-summary")
+
+ @classmethod
+ def recent(cls, limit=1):
+ statuses = QueueStatus.all().order("-date")
+ # Notice that we use both a set and a list here to keep the -date ordering.
+ ids = []
+ visited_ids = set()
+ for status in statuses:
+ attachment_id = status.active_patch_id
+ if not attachment_id:
+ continue
+ if attachment_id in visited_ids:
+ continue
+ visited_ids.add(attachment_id)
+ ids.append(attachment_id)
+ if len(visited_ids) >= limit:
+ break
+ return map(cls, ids)
+
+ def __init__(self, attachment_id):
+ self.id = attachment_id
+ self._summary = None
+
+ def summary(self):
+ if self._summary:
+ return self._summary
+ self._summary = memcache.get(str(self.id), namespace="attachment-summary")
+ if self._summary:
+ return self._summary
+ self._summary = self._fetch_summary()
+ memcache.set(str(self.id), self._summary, namespace="attachment-summary")
+ return self._summary
+
+ def _dash_to_underscore(self, dashed_name):
+ regexp = re.compile("-")
+ return regexp.sub("_", dashed_name)
+
+ def _state_from_status(self, status):
+ table = {
+ "Pass" : "pass",
+ "Fail" : "fail",
+ }
+ state = table.get(status.message)
+ if state:
+ return state
+ if status.message.startswith("Error:"):
+ return "error"
+ if status:
+ return "pending"
+ return None
+
+ def _fetch_summary(self):
+ summary = { "attachment_id" : self.id }
+
+ first_status = QueueStatus.all().filter('active_patch_id =', self.id).get()
+ if not first_status:
+ # We don't have any record of this attachment.
+ return summary
+ summary["bug_id"] = first_status.active_bug_id
+
+ for queue in queues:
+ summary[queue] = None
+ status = QueueStatus.all().filter('queue_name =', queue).filter('active_patch_id =', self.id).order('-date').get()
+ if status:
+ summary[self._dash_to_underscore(queue)] = {
+ "state" : self._state_from_status(status),
+ "status" : status,
+ }
+ return summary
diff --git a/WebKitTools/QueueStatusServer/model/queues.py b/WebKitTools/QueueStatusServer/model/queues.py
new file mode 100644
index 0000000..8d48aff
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/model/queues.py
@@ -0,0 +1,36 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+queues = [
+ "style-queue",
+ "chromium-ews",
+ "qt-ews",
+ "mac-ews",
+ "gtk-ews",
+ "commit-queue",
+]
diff --git a/WebKitTools/QueueStatusServer/model/queuestatus.py b/WebKitTools/QueueStatusServer/model/queuestatus.py
new file mode 100644
index 0000000..3d7e599
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/model/queuestatus.py
@@ -0,0 +1,38 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from google.appengine.ext import db
+
+class QueueStatus(db.Model):
+ author = db.UserProperty()
+ queue_name = db.StringProperty()
+ active_bug_id = db.IntegerProperty()
+ active_patch_id = db.IntegerProperty()
+ message = db.StringProperty(multiline=True)
+ date = db.DateTimeProperty(auto_now_add=True)
+ results_file = db.BlobProperty()
diff --git a/WebKitTools/QueueStatusServer/queue_status.py b/WebKitTools/QueueStatusServer/queue_status.py
deleted file mode 100644
index 65197bb..0000000
--- a/WebKitTools/QueueStatusServer/queue_status.py
+++ /dev/null
@@ -1,177 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import cgi
-import os
-
-# Request a modern Django
-from google.appengine.dist import use_library
-use_library('django', '1.1')
-
-from google.appengine.ext.webapp import template
-from google.appengine.api import users
-from google.appengine.ext import webapp, db
-from google.appengine.ext.webapp.util import run_wsgi_app
-
-webapp.template.register_template_library('filters.webkit_extras')
-
-
-class QueueStatus(db.Model):
- author = db.UserProperty()
- queue_name = db.StringProperty()
- active_bug_id = db.IntegerProperty()
- active_patch_id = db.IntegerProperty()
- message = db.StringProperty(multiline=True)
- date = db.DateTimeProperty(auto_now_add=True)
- results_file = db.BlobProperty()
-
-
-class MainPage(webapp.RequestHandler):
- def get(self):
- statuses_query = QueueStatus.all().filter('queue_name =', 'commit-queue').order('-date')
- statuses = statuses_query.fetch(6)
- if not statuses:
- return self.response.out.write("No status to report.")
- template_values = {
- 'last_status' : statuses[0],
- 'recent_statuses' : statuses[1:],
- }
- self.response.out.write(template.render('index.html', template_values))
-
-
-class PatchStatus(webapp.RequestHandler):
- def get(self, queue_name, attachment_id):
- statuses = QueueStatus.all().filter('queue_name =', queue_name).filter('active_patch_id =', int(attachment_id)).order('-date').fetch(1)
- if not statuses:
- self.error(404)
- return
- self.response.out.write(statuses[0].message)
-
-
-class StatusSummary(object):
- def _status_to_code(self, status):
- code_names = {
- "Pass": "pass",
- "Pending": "pending",
- "Fail": "fail",
- "Error": "error",
- }
- return code_names.get(status, "none")
-
- def _queue_name_to_code(self, queue_name):
- code_names = {
- "style-queue": "style",
- }
- return code_names[queue_name]
-
- queues = [
- "style-queue",
- ]
-
- def __init__(self):
- self._summary = {}
-
- def summarize(self, attachment_id):
- if self._summary.get(attachment_id):
- return self._summary.get(attachment_id)
-
- attachment_summary = {}
- for queue in self.queues:
- statuses = QueueStatus.all().filter('queue_name =', queue).filter('active_patch_id =', attachment_id).order('-date').fetch(1)
- status_code = self._status_to_code(statuses[0].message if statuses else None)
- queue_code = self._queue_name_to_code(queue)
- attachment_summary[queue_code] = status_code
-
- self._summary[attachment_id] = attachment_summary
- return attachment_summary
-
-
-class StatusBubble(webapp.RequestHandler):
- def get(self, attachment_id):
- status_summary = StatusSummary()
- template_values = {
- "queue_status" : status_summary.summarize(int(attachment_id)),
- }
- self.response.out.write(template.render('status_bubble.html', template_values))
-
-
-class UpdateStatus(webapp.RequestHandler):
- def get(self):
- self.response.out.write(template.render('update_status.html', None))
-
- def _int_from_request(self, name):
- string_value = self.request.get(name)
- try:
- int_value = int(string_value)
- return int_value
- except ValueError, TypeError:
- pass
- return None
-
- def post(self):
- queue_status = QueueStatus()
-
- if users.get_current_user():
- queue_status.author = users.get_current_user()
-
- queue_name = self.request.get('queue_name')
- queue_status.queue_name = queue_name
- queue_status.active_bug_id = self._int_from_request('bug_id')
- queue_status.active_patch_id = self._int_from_request('patch_id')
- queue_status.message = self.request.get('status')
- results_file = self.request.get("results_file")
- queue_status.results_file = db.Blob(results_file)
- queue_status.put()
- self.redirect('/')
-
-
-class ShowResults(webapp.RequestHandler):
- def get(self, status_id):
- status = QueueStatus.get_by_id(int(status_id))
- if not status:
- self.error(404)
- return
- self.response.headers["Content-Type"] = "text/plain"
- self.response.out.write(status.results_file)
-
-
-routes = [
- ('/', MainPage),
- ('/update-status', UpdateStatus),
- (r'/patch-status/(.*)/(.*)', PatchStatus),
- (r'/status-bubble/(.*)', StatusBubble),
- (r'/results/(.*)', ShowResults)
-]
-
-application = webapp.WSGIApplication(routes, debug=True)
-
-def main():
- run_wsgi_app(application)
-
-if __name__ == "__main__":
- main()
diff --git a/WebKitTools/QueueStatusServer/status_bubble.html b/WebKitTools/QueueStatusServer/status_bubble.html
deleted file mode 100644
index f8959d9..0000000
--- a/WebKitTools/QueueStatusServer/status_bubble.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style>
-body {
- font-family: Verdana, sans-serif;
- margin: 0px;
- padding: 0px;
-}
-.status {
- display: block;
- float: left;
- margin: 1px;
- padding: 1px 2px;
- border-radius: 5px;
- border: 1px solid #AAA;
- font-size: 11px;
-}
-.pass {
- background-color: #8FDF5F;
- border: 1px solid #4F8530;
-}
-.fail {
- background-color: #E98080;
- border: 1px solid #A77272;
-}
-.pending {
- background-color: #FFFC6C;
- border: 1px solid #C5C56D;
-}
-</style>
-</head>
-<body>{% for key, value in queue_status.items %}
-<div class="status {{value}}" title="{{key}}: {{value}}">{{key}}</div>{% endfor %}
-</body>
-</html>
diff --git a/WebKitTools/QueueStatusServer/stylesheets/dashboard.css b/WebKitTools/QueueStatusServer/stylesheets/dashboard.css
new file mode 100644
index 0000000..1ecf2eb
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/stylesheets/dashboard.css
@@ -0,0 +1,80 @@
+body {
+ font-family: Verdana, Helvetica, sans-serif;
+ width: 600px;
+ padding: 0px;
+ color: #444;
+}
+h1 {
+ background-color: #EEE;
+ color: #444;
+ font-size: 14pt;
+ font-style: italic;
+ margin: 0px;
+ padding: 5px;
+}
+h2 {
+ background-color: #AAA;
+ color: white;
+ font-weight: bold;
+ font-size: 9pt;
+ margin: 0px;
+ padding: 5px;
+}
+ul {
+ margin: 0px;
+ padding: 0px;
+ list-style: none;
+}
+li {
+ padding: 5px;
+}
+table {
+ border-spacing: 0px;
+}
+th {
+ background-color: #AAA;
+ color: white;
+ padding: 5px;
+ width: 100px;
+ font-size: 9pt;
+}
+td {
+ text-align: center;
+}
+tr:hover, li:hover {
+ background-color: #EEE;
+}
+.status-date {
+ color: #AAA;
+ float: right;
+ font-size: 8pt;
+}
+.status {
+ margin: 1px;
+ padding: 1px 2px;
+ font-size: 9pt;
+ border: 1px solid transparent;
+}
+.status:hover {
+ border: 1px solid black;
+}
+.pass {
+ background-color: #8FDF5F;
+ cursor: pointer;
+ /* border: 1px solid #4F8530; */
+}
+.fail {
+ background-color: #E98080;
+ cursor: pointer;
+ /* border: 1px solid #A77272; */
+}
+.pending {
+ background-color: #FFFC6C;
+ cursor: pointer;
+ /* border: 1px solid #C5C56D; */
+}
+.error {
+ background-color: #E0B0FF;
+ cursor: pointer;
+ /* border: 1px solid #ACA0B3; */
+}
diff --git a/WebKitTools/QueueStatusServer/templates/dashboard.html b/WebKitTools/QueueStatusServer/templates/dashboard.html
new file mode 100644
index 0000000..84ecabb
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/templates/dashboard.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>WebKit Bot Status</title>
+<link type="text/css" rel="stylesheet" href="/stylesheets/dashboard.css" />
+<script>
+function statusDetail(patch_id) {
+ // FIXME: We'd like to use AJAX to show the details on this page.
+ window.location = "/patch/" + patch_id
+}
+</script>
+</head>
+<body>
+<h1>WebKit Bot Status</h1>
+<table>
+ <theader>
+ <tr>
+ <th>Bug</th>
+ <th>Attachment</th>
+ <th>Style</th>
+ <th>Chromium</th>
+ <th>Qt</th>
+ <th>Mac</th>
+ <th>Gtk</th>
+ <th>Commit</th>
+ </tr>
+ </thead>
+ <tbody>{% for summary in summaries %}
+ <tr>
+ <td class="status">
+ {{ summary.bug_id|force_escape|webkit_bug_id|safe }}
+ </td>
+ <td class="status">
+ {{ summary.attachment_id|force_escape|webkit_attachment_id|safe }}
+ </td>
+ <!-- FIXME: Find some way to remove this copy-and-paste code! -->
+ <td class="status {{ summary.style_queue.state }}"{% if summary.style_queue.status %}
+ onclick="statusDetail({{ summary.attachment_id }})"
+ title="{{ summary.style_queue.status.date|timesince }}"{% endif %}>
+ </td>
+ <td class="status {{ summary.chromium_ews.state }}"{% if summary.chromium_ews.status %}
+ onclick="statusDetail({{ summary.attachment_id }})"
+ title="{{ summary.chromium_ews.status.date|timesince }} ago"{% endif %}>
+ </td>
+ <td class="status {{ summary.qt_ews.state }}"{% if summary.qt_ews.status %}
+ onclick="statusDetail({{ summary.attachment_id }})"
+ title="{{ summary.qt_ews.status.date|timesince }} ago"{% endif %}>
+ </td>
+ <td class="status {{ summary.mac_ews.state }}"{% if summary.mac_ews.status %}
+ onclick="statusDetail({{ summary.attachment_id }})"
+ title="{{ summary.mac_ews.status.date|timesince }} ago"{% endif %}>
+ </td>
+ <td class="status {{ summary.gtk_ews.state }}"{% if summary.gtk_ews.status %}
+ onclick="statusDetail({{ summary.attachment_id }})"
+ title="{{ summary.gtk_ews.status.date|timesince }} ago"{% endif %}>
+ </td>
+ <td class="status {{ summary.commit_queue.state }}"{% if summary.commit_queue.status %}
+ onclick="statusDetail({{ summary.attachment_id }})"
+ title="{{ summary.commit_queue.status.date|timesince }} ago"{% endif %}>
+ </td>
+ </tr>{% endfor %}
+ </tbody>
+</table>
+</html>
diff --git a/WebKitTools/QueueStatusServer/templates/patch.html b/WebKitTools/QueueStatusServer/templates/patch.html
new file mode 100644
index 0000000..de334a5
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/templates/patch.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Patch Status</title>
+<link type="text/css" rel="stylesheet" href="/stylesheets/dashboard.css" />
+</head>
+<body>
+<h1>
+ Patch {{ attachment_id|force_escape|webkit_attachment_id|safe }} (Bug {{ bug_id|force_escape|webkit_bug_id|safe }})
+</h1>{% for queue_name, statuses in queue_status.items %}
+<div class="status-details">
+ <h2>{{ queue_name }}</h2>
+ <ul>{% for status in statuses %}
+ <li>
+ <span class="status-message">{{ status.message|force_escape|urlize|webkit_linkify|safe }}</span>{% if status.results_file %}
+ <span class="status-results">[{{ status.key.id|results_link|safe }}]</span>{% endif %}
+ <span class="status-date">{{ status.date|timesince }} ago</span>
+ </li>{% endfor %}
+ </ul>
+</div>{% endfor %}
+</html>
diff --git a/WebKitTools/QueueStatusServer/templates/recentstatus.html b/WebKitTools/QueueStatusServer/templates/recentstatus.html
new file mode 100644
index 0000000..2bb9fbb
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/templates/recentstatus.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>WebKit Queue Status</title>
+<link type="text/css" rel="stylesheet" href="/stylesheets/dashboard.css" />
+</head>
+<body>
+<h1>WebKit Queue Status</h1>{% for queue_name, statuses in queue_status.items %}
+<div class="status-details">
+ <h2>{{ queue_name }}</h2>
+ <ul>{% for status in statuses %}
+ <li>{% if status.active_bug_id %}
+ <span class="status-bug">
+ Patch {{ status.active_patch_id|force_escape|webkit_attachment_id|safe }} from bug
+ {{ status.active_bug_id|force_escape|webkit_bug_id|safe }}:
+ </span>{% endif %}
+ <span class="status-message">{{ status.message|force_escape|urlize|webkit_linkify|safe }}</span>{% if status.results_file %}
+ <span class="status-results">[{{ status.key.id|results_link|safe }}]</span>{% endif %}
+ <span class="status-date">{{ status.date|timesince }} ago</span>
+ </li>{% endfor %}
+ </ul>
+</div>{% endfor %}
+</body>
+</html>
diff --git a/WebKitTools/QueueStatusServer/templates/statusbubble.html b/WebKitTools/QueueStatusServer/templates/statusbubble.html
new file mode 100644
index 0000000..d1f331c
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/templates/statusbubble.html
@@ -0,0 +1,77 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+body {
+ font-family: Verdana, sans-serif;
+ margin: 0px;
+ padding: 0px;
+}
+.status {
+ display: block;
+ float: left;
+ margin: 1px;
+ padding: 1px 2px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ border: 1px solid #AAA;
+ background-color: white;
+ font-size: 11px;
+}
+.pass {
+ background-color: #8FDF5F;
+ border: 1px solid #4F8530;
+ cursor: pointer;
+}
+.fail {
+ background-color: #E98080;
+ border: 1px solid #A77272;
+ cursor: pointer;
+}
+.pending {
+ background-color: #FFFC6C;
+ border: 1px solid #C5C56D;
+ cursor: pointer;
+}
+.error {
+ background-color: #E0B0FF;
+ border: 1px solid #ACA0B3;
+ cursor: pointer;
+}
+</style>
+<script>
+function statusDetail(patch_id) {
+ top.location = "/patch/" + patch_id
+}
+</script>
+</head>
+<body>
+<!-- FIXME: Find some way to remove this copy-and-paste code! -->
+<div class="status {{ summary.style_queue.state }}"{% if summary.style_queue.status %}
+ onclick="statusDetail({{ summary.attachment_id }})"
+ title="{{ summary.style_queue.status.date|timesince }} ago"{% endif %}>
+ style
+</div>
+<div class="status {{ summary.chromium_ews.state }}"{% if summary.chromium_ews.status %}
+ onclick="statusDetail({{ summary.attachment_id }})"
+ title="{{ summary.chromium_ews.status.date|timesince }} ago"{% endif %}>
+ chromium
+</div>
+<div class="status {{ summary.qt_ews.state }}"{% if summary.qt_ews.status %}
+ onclick="statusDetail({{ summary.attachment_id }})"
+ title="{{ summary.qt_ews.status.date|timesince }} ago"{% endif %}>
+ qt
+</div>
+<div class="status {{ summary.gtk_ews.state }}"{% if summary.gtk_ews.status %}
+ onclick="statusDetail({{ summary.attachment_id }})"
+ title="{{ summary.gtk_ews.status.date|timesince }} ago"{% endif %}>
+ gtk
+</div>
+<div class="status {{ summary.mac_ews.state }}"{% if summary.mac_ews.status %}
+ onclick="statusDetail({{ summary.attachment_id }})"
+ title="{{ summary.mac_ews.status.date|timesince }} ago"{% endif %}>
+ mac
+</div>
+</body>
+</html>
diff --git a/WebKitTools/QueueStatusServer/update_status.html b/WebKitTools/QueueStatusServer/templates/updatestatus.html
index 9343c60..9343c60 100644
--- a/WebKitTools/QueueStatusServer/update_status.html
+++ b/WebKitTools/QueueStatusServer/templates/updatestatus.html
diff --git a/WebKitTools/Scripts/VCSUtils.pm b/WebKitTools/Scripts/VCSUtils.pm
index 7638102..022c72a 100644
--- a/WebKitTools/Scripts/VCSUtils.pm
+++ b/WebKitTools/Scripts/VCSUtils.pm
@@ -1,4 +1,5 @@
# Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+# Copyright (C) 2009, 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -31,8 +32,10 @@ use strict;
use warnings;
use Cwd qw(); # "qw()" prevents warnings about redefining getcwd() with "use POSIX;"
+use English; # for $POSTMATCH, etc.
use File::Basename;
use File::Spec;
+use POSIX;
BEGIN {
use Exporter ();
@@ -47,6 +50,7 @@ BEGIN {
&decodeGitBinaryPatch
&determineSVNRoot
&determineVCSRoot
+ &exitStatus
&fixChangeLogPatch
&gitBranch
&gitdiff2svndiff
@@ -58,7 +62,9 @@ BEGIN {
&isSVNVersion16OrNewer
&makeFilePathRelative
&normalizePath
+ &parsePatch
&pathRelativeToSVNRepositoryRootForPath
+ &runPatchCommand
&svnRevisionForDirectory
&svnStatus
);
@@ -75,6 +81,20 @@ my $isGitBranchBuild;
my $isSVN;
my $svnVersion;
+# This method is for portability. Return the system-appropriate exit
+# status of a child process.
+#
+# Args: pass the child error status returned by the last pipe close,
+# for example "$?".
+sub exitStatus($)
+{
+ my ($returnvalue) = @_;
+ if ($^O eq "MSWin32") {
+ return $returnvalue >> 8;
+ }
+ return WEXITSTATUS($returnvalue);
+}
+
sub isGitDirectory($)
{
my ($dir) = @_;
@@ -93,7 +113,7 @@ sub gitBranch()
{
unless (defined $gitBranch) {
chomp($gitBranch = `git symbolic-ref -q HEAD`);
- $gitBranch = "" if main::exitStatus($?); # FIXME: exitStatus is defined in webkitdirs.pm
+ $gitBranch = "" if exitStatus($?);
$gitBranch =~ s#^refs/heads/##;
$gitBranch = "" if $gitBranch eq "master";
}
@@ -341,79 +361,458 @@ sub svnStatus($)
return $svnStatus;
}
+# Convert a line of a git-formatted patch to SVN format, while
+# preserving any end-of-line characters.
sub gitdiff2svndiff($)
{
$_ = shift @_;
- if (m#^diff --git a/(.+) b/(.+)#) {
- return "Index: $1";
- } elsif (m#^index [0-9a-f]{7}\.\.[0-9a-f]{7} [0-9]{6}#) {
- return "===================================================================";
- } elsif (m#^--- a/(.+)#) {
- return "--- $1";
- } elsif (m#^\+\+\+ b/(.+)#) {
- return "+++ $1";
+
+ if (m#^diff --git \w/(.+) \w/([^\r\n]+)#) {
+ return "Index: $1$POSTMATCH";
+ }
+ if (m#^index [0-9a-f]{7}\.\.[0-9a-f]{7} [0-9]{6}#) {
+ # FIXME: No need to return dividing line once parseDiffHeader() is used.
+ return "===================================================================$POSTMATCH";
+ }
+ if (m#^--- \w/([^\r\n]+)#) {
+ return "--- $1$POSTMATCH";
+ }
+ if (m#^\+\+\+ \w/([^\r\n]+)#) {
+ return "+++ $1$POSTMATCH";
}
return $_;
}
-# The diff(1) command is greedy when matching lines, so a new ChangeLog entry will
-# have lines of context at the top of a patch when the existing entry has the same
-# date and author as the new entry. Alter the ChangeLog patch so
-# that the added lines ("+") in the patch always start at the beginning of the
-# patch and there are no initial lines of context.
+# Parse the next diff header from the given file handle, and advance
+# the file handle so the last line read is the first line after the
+# parsed header block.
+#
+# This subroutine dies if given leading junk or if the end of the header
+# block could not be detected. The last line of a header block is a
+# line beginning with "+++".
+#
+# Args:
+# $fileHandle: advanced so the last line read is the first line of the
+# next diff header. For SVN-formatted diffs, this is the
+# "Index:" line.
+# $line: the line last read from $fileHandle
+#
+# Returns ($headerHashRef, $lastReadLine):
+# $headerHashRef: a hash reference representing a diff header
+# copiedFromPath: if a file copy, the path from which the file was
+# copied. Otherwise, undefined.
+# indexPath: the path in the "Index:" line.
+# sourceRevision: the revision number of the source. This is the same
+# as the revision number the file was copied from, in
+# the case of a file copy.
+# svnConvertedText: the header text converted to SVN format.
+# Unrecognized lines are discarded.
+# $lastReadLine: the line last read from $fileHandle. This is the first
+# line after the header ending.
+sub parseDiffHeader($$)
+{
+ my ($fileHandle, $line) = @_;
+
+ my $filter;
+ if ($line =~ m#^diff --git #) {
+ $filter = \&gitdiff2svndiff;
+ }
+ $line = &$filter($line) if $filter;
+
+ my $indexPath;
+ if ($line =~ /^Index: ([^\r\n]+)/) {
+ $indexPath = $1;
+ } else {
+ die("Could not parse first line of diff header: \"$line\".");
+ }
+
+ my %header;
+
+ my $foundHeaderEnding;
+ my $lastReadLine;
+ my $sourceRevision;
+ my $svnConvertedText = $line;
+ while (<$fileHandle>) {
+ # Temporarily strip off any end-of-line characters to simplify
+ # regex matching below.
+ s/([\n\r]+)$//;
+ my $eol = $1;
+
+ $_ = &$filter($_) if $filter;
+
+ # Fix paths on ""---" and "+++" lines to match the leading
+ # index line.
+ if (s/^--- \S+/--- $indexPath/) {
+ # ---
+ if (/^--- .+\(revision (\d+)\)/) {
+ $sourceRevision = $1 if ($1 != 0);
+ if (/\(from (\S+):(\d+)\)$/) {
+ # The "from" clause is created by svn-create-patch, in
+ # which case there is always also a "revision" clause.
+ $header{copiedFromPath} = $1;
+ die("Revision number \"$2\" in \"from\" clause does not match " .
+ "source revision number \"$sourceRevision\".") if ($2 != $sourceRevision);
+ }
+ }
+ $_ = "=" x 67 . "$eol$_"; # Prepend dividing line ===....
+ } elsif (s/^\+\+\+ \S+/+++ $indexPath/) {
+ # +++
+ $foundHeaderEnding = 1;
+ } else {
+ # Skip unrecognized lines.
+ next;
+ }
+
+ $svnConvertedText .= "$_$eol"; # Also restore end-of-line characters.
+ if ($foundHeaderEnding) {
+ $lastReadLine = <$fileHandle>;
+ last;
+ }
+ } # $lastReadLine is undef if while loop ran out.
+
+ if (!$foundHeaderEnding) {
+ die("Did not find end of header block corresponding to index path \"$indexPath\".");
+ }
+
+ $header{indexPath} = $indexPath;
+ $header{sourceRevision} = $sourceRevision;
+ $header{svnConvertedText} = $svnConvertedText;
+
+ return (\%header, $lastReadLine);
+}
+
+# Parse one diff from a patch file created by svn-create-patch, and
+# advance the file handle so the last line read is the first line
+# of the next header block.
+#
+# This subroutine preserves any leading junk encountered before the header.
+#
+# Args:
+# $fileHandle: a file handle advanced to the first line of the next
+# header block. Leading junk is okay.
+# $line: the line last read from $fileHandle.
+#
+# Returns ($diffHashRef, $lastReadLine):
+# $diffHashRef:
+# copiedFromPath: if a file copy, the path from which the file was
+# copied. Otherwise, undefined.
+# indexPath: the path in the "Index:" line.
+# sourceRevision: the revision number of the source. This is the same
+# as the revision number the file was copied from, in
+# the case of a file copy.
+# svnConvertedText: the diff converted to SVN format.
+# $lastReadLine: the line last read from $fileHandle
+sub parseDiff($$)
+{
+ my ($fileHandle, $line) = @_;
+
+ my $headerStartRegEx = qr#^Index: #; # SVN-style header for the default
+ my $gitHeaderStartRegEx = qr#^diff --git \w/#;
+
+ my $headerHashRef; # Last header found, as returned by parseDiffHeader().
+ my $svnText;
+ while (defined($line)) {
+ if (!$headerHashRef && ($line =~ $gitHeaderStartRegEx)) {
+ # Then assume all diffs in the patch are Git-formatted. This
+ # block was made to be enterable at most once since we assume
+ # all diffs in the patch are formatted the same (SVN or Git).
+ $headerStartRegEx = $gitHeaderStartRegEx;
+ }
+
+ if ($line !~ $headerStartRegEx) {
+ # Then we are in the body of the diff.
+ $svnText .= $line;
+ $line = <$fileHandle>;
+ next;
+ } # Otherwise, we found a diff header.
+
+ if ($headerHashRef) {
+ # Then this is the second diff header of this while loop.
+ last;
+ }
+
+ ($headerHashRef, $line) = parseDiffHeader($fileHandle, $line);
+
+ $svnText .= $headerHashRef->{svnConvertedText};
+ }
+
+ my %diffHashRef;
+ $diffHashRef{copiedFromPath} = $headerHashRef->{copiedFromPath};
+ $diffHashRef{indexPath} = $headerHashRef->{indexPath};
+ $diffHashRef{sourceRevision} = $headerHashRef->{sourceRevision};
+ $diffHashRef{svnConvertedText} = $svnText;
+
+ return (\%diffHashRef, $line);
+}
+
+# Parse a patch file created by svn-create-patch.
+#
+# Args:
+# $fileHandle: A file handle to the patch file that has not yet been
+# read from.
+#
+# Returns:
+# @diffHashRefs: an array of diff hash references. See parseDiff() for
+# a description of each $diffHashRef.
+sub parsePatch($)
+{
+ my ($fileHandle) = @_;
+
+ my @diffHashRefs; # return value
+
+ my $line = <$fileHandle>;
+
+ while (defined($line)) { # Otherwise, at EOF.
+
+ my $diffHashRef;
+ ($diffHashRef, $line) = parseDiff($fileHandle, $line);
+
+ push @diffHashRefs, $diffHashRef;
+ }
+
+ return @diffHashRefs;
+}
+
+# If possible, returns a ChangeLog patch equivalent to the given one,
+# but with the newest ChangeLog entry inserted at the top of the
+# file -- i.e. no leading context and all lines starting with "+".
+#
+# If given a patch string not representable as a patch with the above
+# properties, it returns the input back unchanged.
+#
+# WARNING: This subroutine can return an inequivalent patch string if
+# both the beginning of the new ChangeLog file matches the beginning
+# of the source ChangeLog, and the source beginning was modified.
+# Otherwise, it is guaranteed to return an equivalent patch string,
+# if it returns.
+#
+# Applying this subroutine to ChangeLog patches allows svn-apply to
+# insert new ChangeLog entries at the top of the ChangeLog file.
+# svn-apply uses patch with --fuzz=3 to do this. We need to apply
+# this subroutine because the diff(1) command is greedy when matching
+# lines. A new ChangeLog entry with the same date and author as the
+# previous will match and cause the diff to have lines of starting
+# context.
+#
+# This subroutine has unit tests in VCSUtils_unittest.pl.
sub fixChangeLogPatch($)
{
my $patch = shift; # $patch will only contain patch fragments for ChangeLog.
$patch =~ /(\r?\n)/;
my $lineEnding = $1;
- my @patchLines = split(/$lineEnding/, $patch);
-
- # e.g. 2009-06-03 Eric Seidel <eric@webkit.org>
- my $dateLineRegexpString = '^\+(\d{4}-\d{2}-\d{2})' # Consume the leading '+' and the date.
- . '\s+(.+)\s+' # Consume the name.
- . '<([^<>]+)>$'; # And finally the email address.
-
- # Figure out where the patch contents start and stop.
- my $patchHeaderIndex;
- my $firstContentIndex;
- my $trailingContextIndex;
- my $dateIndex;
- my $patchEndIndex = scalar(@patchLines);
- for (my $index = 0; $index < @patchLines; ++$index) {
- my $line = $patchLines[$index];
- if ($line =~ /^\@\@ -\d+,\d+ \+\d+,\d+ \@\@$/) { # e.g. @@ -1,5 +1,18 @@
- if ($patchHeaderIndex) {
- $patchEndIndex = $index; # We only bother to fix up the first patch fragment.
- last;
- }
- $patchHeaderIndex = $index;
+ my @lines = split(/$lineEnding/, $patch);
+
+ my $i = 0; # We reuse the same index throughout.
+
+ # Skip to beginning of first chunk.
+ for (; $i < @lines; ++$i) {
+ if (substr($lines[$i], 0, 1) eq "@") {
+ last;
}
- $firstContentIndex = $index if ($patchHeaderIndex && !$firstContentIndex && $line =~ /^\+[^+]/); # Only match after finding patchHeaderIndex, otherwise we'd match "+++".
- $dateIndex = $index if ($line =~ /$dateLineRegexpString/);
- $trailingContextIndex = $index if ($firstContentIndex && !$trailingContextIndex && $line =~ /^ /);
}
- my $contentLineCount = $trailingContextIndex - $firstContentIndex;
- my $trailingContextLineCount = $patchEndIndex - $trailingContextIndex;
+ my $chunkStartIndex = ++$i;
+
+ # Optimization: do not process if new lines already begin the chunk.
+ if (substr($lines[$i], 0, 1) eq "+") {
+ return $patch;
+ }
+
+ # Skip to first line of newly added ChangeLog entry.
+ # For example, +2009-06-03 Eric Seidel <eric@webkit.org>
+ my $dateStartRegEx = '^\+(\d{4}-\d{2}-\d{2})' # leading "+" and date
+ . '\s+(.+)\s+' # name
+ . '<([^<>]+)>$'; # e-mail address
+
+ for (; $i < @lines; ++$i) {
+ my $line = $lines[$i];
+ my $firstChar = substr($line, 0, 1);
+ if ($line =~ /$dateStartRegEx/) {
+ last;
+ } elsif ($firstChar eq " " or $firstChar eq "+") {
+ next;
+ }
+ return $patch; # Do not change if, for example, "-" or "@" found.
+ }
+ if ($i >= @lines) {
+ return $patch; # Do not change if date not found.
+ }
+ my $dateStartIndex = $i;
+
+ # Rewrite overlapping lines to lead with " ".
+ my @overlappingLines = (); # These will include a leading "+".
+ for (; $i < @lines; ++$i) {
+ my $line = $lines[$i];
+ if (substr($line, 0, 1) ne "+") {
+ last;
+ }
+ push(@overlappingLines, $line);
+ $lines[$i] = " " . substr($line, 1);
+ }
+
+ # Remove excess ending context, if necessary.
+ my $shouldTrimContext = 1;
+ for (; $i < @lines; ++$i) {
+ my $firstChar = substr($lines[$i], 0, 1);
+ if ($firstChar eq " ") {
+ next;
+ } elsif ($firstChar eq "@") {
+ last;
+ }
+ $shouldTrimContext = 0; # For example, if "+" or "-" encountered.
+ last;
+ }
+ my $deletedLineCount = 0;
+ if ($shouldTrimContext) { # Also occurs if end of file reached.
+ splice(@lines, $i - @overlappingLines, @overlappingLines);
+ $deletedLineCount = @overlappingLines;
+ }
+
+ # Work backwards, shifting overlapping lines towards front
+ # while checking that patch stays equivalent.
+ for ($i = $dateStartIndex - 1; $i >= $chunkStartIndex; --$i) {
+ my $line = $lines[$i];
+ if (substr($line, 0, 1) ne " ") {
+ next;
+ }
+ my $text = substr($line, 1);
+ my $newLine = pop(@overlappingLines);
+ if ($text ne substr($newLine, 1)) {
+ return $patch; # Unexpected difference.
+ }
+ $lines[$i] = "+$text";
+ }
+
+ # Finish moving whatever overlapping lines remain, and update
+ # the initial chunk range.
+ my $chunkRangeRegEx = '^\@\@ -(\d+),(\d+) \+\d+,(\d+) \@\@$'; # e.g. @@ -2,6 +2,18 @@
+ if ($lines[$chunkStartIndex - 1] !~ /$chunkRangeRegEx/) {
+ # FIXME: Handle errors differently from ChangeLog files that
+ # are okay but should not be altered. That way we can find out
+ # if improvements to the script ever become necessary.
+ return $patch; # Error: unexpected patch string format.
+ }
+ my $skippedFirstLineCount = $1 - 1;
+ my $oldSourceLineCount = $2;
+ my $oldTargetLineCount = $3;
+
+ if (@overlappingLines != $skippedFirstLineCount) {
+ # This can happen, for example, when deliberately inserting
+ # a new ChangeLog entry earlier in the file.
+ return $patch;
+ }
+ # If @overlappingLines > 0, this is where we make use of the
+ # assumption that the beginning of the source file was not modified.
+ splice(@lines, $chunkStartIndex, 0, @overlappingLines);
+
+ my $sourceLineCount = $oldSourceLineCount + @overlappingLines - $deletedLineCount;
+ my $targetLineCount = $oldTargetLineCount + @overlappingLines - $deletedLineCount;
+ $lines[$chunkStartIndex - 1] = "@@ -1,$sourceLineCount +1,$targetLineCount @@";
+
+ return join($lineEnding, @lines) . "\n"; # patch(1) expects an extra trailing newline.
+}
+
+# This is a supporting method for runPatchCommand.
+#
+# Arg: the optional $args parameter passed to runPatchCommand (can be undefined).
+#
+# Returns ($patchCommand, $isForcing).
+#
+# This subroutine has unit tests in VCSUtils_unittest.pl.
+sub generatePatchCommand($)
+{
+ my ($passedArgsHashRef) = @_;
+
+ my $argsHashRef = { # Defaults
+ ensureForce => 0,
+ shouldReverse => 0,
+ options => []
+ };
+
+ # Merges hash references. It's okay here if passed hash reference is undefined.
+ @{$argsHashRef}{keys %{$passedArgsHashRef}} = values %{$passedArgsHashRef};
+
+ my $ensureForce = $argsHashRef->{ensureForce};
+ my $shouldReverse = $argsHashRef->{shouldReverse};
+ my $options = $argsHashRef->{options};
+
+ if (! $options) {
+ $options = [];
+ } else {
+ $options = [@{$options}]; # Copy to avoid side effects.
+ }
+
+ my $isForcing = 0;
+ if (grep /^--force$/, @{$options}) {
+ $isForcing = 1;
+ } elsif ($ensureForce) {
+ push @{$options}, "--force";
+ $isForcing = 1;
+ }
+
+ if ($shouldReverse) { # No check: --reverse should never be passed explicitly.
+ push @{$options}, "--reverse";
+ }
+
+ @{$options} = sort(@{$options}); # For easier testing.
+
+ my $patchCommand = join(" ", "patch -p0", @{$options});
+
+ return ($patchCommand, $isForcing);
+}
+
+# Apply the given patch using the patch(1) command.
+#
+# On success, return the resulting exit status. Otherwise, exit with the
+# exit status. If "--force" is passed as an option, however, then never
+# exit and always return the exit status.
+#
+# Args:
+# $patch: a patch string.
+# $repositoryRootPath: an absolute path to the repository root.
+# $pathRelativeToRoot: the path of the file to be patched, relative to the
+# repository root. This should normally be the path
+# found in the patch's "Index:" line. It is passed
+# explicitly rather than reparsed from the patch
+# string for optimization purposes.
+# This is used only for error reporting. The
+# patch command gleans the actual file to patch
+# from the patch string.
+# $args: a reference to a hash of optional arguments. The possible
+# keys are --
+# ensureForce: whether to ensure --force is passed (defaults to 0).
+# shouldReverse: whether to pass --reverse (defaults to 0).
+# options: a reference to an array of options to pass to the
+# patch command. The subroutine passes the -p0 option
+# no matter what. This should not include --reverse.
+#
+# This subroutine has unit tests in VCSUtils_unittest.pl.
+sub runPatchCommand($$$;$)
+{
+ my ($patch, $repositoryRootPath, $pathRelativeToRoot, $args) = @_;
+
+ my ($patchCommand, $isForcing) = generatePatchCommand($args);
+
+ # Temporarily change the working directory since the path found
+ # in the patch's "Index:" line is relative to the repository root
+ # (i.e. the same as $pathRelativeToRoot).
+ my $cwd = Cwd::getcwd();
+ chdir $repositoryRootPath;
- # If we didn't find a date line in the content then this is not a patch we should try and fix.
- return $patch if (!$dateIndex);
+ open PATCH, "| $patchCommand" or die "Could not call \"$patchCommand\" for file \"$pathRelativeToRoot\": $!";
+ print PATCH $patch;
+ close PATCH;
+ my $exitStatus = exitStatus($?);
- # We only need to do anything if the date line is not the first content line.
- return $patch if ($dateIndex == $firstContentIndex);
+ chdir $cwd;
- # Write the new patch.
- my $totalNewContentLines = $contentLineCount + $trailingContextLineCount;
- $patchLines[$patchHeaderIndex] = "@@ -1,$trailingContextLineCount +1,$totalNewContentLines @@"; # Write a new header.
- my @repeatedLines = splice(@patchLines, $dateIndex, $trailingContextIndex - $dateIndex); # The date line and all the content after it that diff saw as repeated.
- splice(@patchLines, $firstContentIndex, 0, @repeatedLines); # Move the repeated content to the top.
- foreach my $line (@repeatedLines) {
- $line =~ s/^\+/ /;
+ if ($exitStatus && !$isForcing) {
+ print "Calling \"$patchCommand\" for file \"$pathRelativeToRoot\" returned " .
+ "status $exitStatus. Pass --force to ignore patch failures.\n";
+ exit $exitStatus;
}
- splice(@patchLines, $trailingContextIndex, $patchEndIndex, @repeatedLines); # Replace trailing context with the repeated content.
- splice(@patchLines, $patchHeaderIndex + 1, $firstContentIndex - $patchHeaderIndex - 1); # Remove any leading context.
- return join($lineEnding, @patchLines) . "\n"; # patch(1) expects an extra trailing newline.
+ return $exitStatus;
}
sub gitConfig($)
diff --git a/WebKitTools/Scripts/build-webkit b/WebKitTools/Scripts/build-webkit
index 566965b..8171fba 100755
--- a/WebKitTools/Scripts/build-webkit
+++ b/WebKitTools/Scripts/build-webkit
@@ -50,8 +50,8 @@ my $minimal = 0;
my $makeArgs;
my $startTime = time();
-my ($threeDCanvasSupport, $threeDRenderingSupport, $channelMessagingSupport, $databaseSupport, $datagridSupport, $datalistSupport,
- $domStorageSupport, $eventsourceSupport, $filtersSupport, $geolocationSupport, $iconDatabaseSupport,
+my ($threeDCanvasSupport, $threeDRenderingSupport, $channelMessagingSupport, $clientBasedGeolocationSupport, $databaseSupport, $datagridSupport, $datalistSupport,
+ $domStorageSupport, $eventsourceSupport, $filtersSupport, $geolocationSupport, $iconDatabaseSupport, $indexedDatabaseSupport,
$javaScriptDebuggerSupport, $mathmlSupport, $offlineWebApplicationSupport, $sharedWorkersSupport,
$svgSupport, $svgAnimationSupport, $svgAsImageSupport, $svgDOMObjCBindingsSupport, $svgFontsSupport,
$svgForeignObjectSupport, $svgUseSupport, $videoSupport, $webSocketsSupport, $wmlSupport, $wcssSupport, $xhtmlmpSupport, $workersSupport,
@@ -67,6 +67,9 @@ my @features = (
{ option => "channel-messaging", desc => "Toggle MessageChannel and MessagePort support",
define => "ENABLE_CHANNEL_MESSAGING", default => 1, value => \$channelMessagingSupport },
+ { option => "client-based-geolocation", desc => "Toggle client-based Geolocation support",
+ define => "ENABLE_CLIENT_BASED_GEOLOCATION", default => isAppleWebKit(), value => \$clientBasedGeolocationSupport },
+
{ option => "coverage", desc => "Toggle code coverage support",
define => "", default => 0, value => \$coverageSupport },
@@ -74,7 +77,7 @@ my @features = (
define => "ENABLE_DATABASE", default => 1, value => \$databaseSupport },
{ option => "datagrid", desc => "Toggle Datagrid Support",
- define => "ENABLE_DATAGRID", default => 1, value => \$datagridSupport },
+ define => "ENABLE_DATAGRID", default => 0, value => \$datagridSupport },
{ option => "datalist", desc => "Toggle HTML5 datalist support",
define => "ENABLE_DATALIST", default => 1, value => \$datalistSupport },
@@ -89,11 +92,14 @@ my @features = (
define => "ENABLE_FILTERS", default => (isAppleWebKit() || isGtk() || isQt()), value => \$filtersSupport },
{ option => "geolocation", desc => "Toggle Geolocation support",
- define => "ENABLE_GEOLOCATION", default => isGtk(), value => \$geolocationSupport },
+ define => "ENABLE_GEOLOCATION", default => (isAppleWebKit() || isGtk()), value => \$geolocationSupport },
{ option => "icon-database", desc => "Toggle Icon database support",
define => "ENABLE_ICONDATABASE", default => 1, value => \$iconDatabaseSupport },
+ { option => "indexed-database", desc => "Toggle Indexed Database API support",
+ define => "ENABLE_INDEXED_DATABASE", default => 0, value => \$indexedDatabaseSupport },
+
{ option => "javascript-debugger", desc => "Toggle JavaScript Debugger/Profiler support",
define => "ENABLE_JAVASCRIPT_DEBUGGER", default => 1, value => \$javaScriptDebuggerSupport },
@@ -191,6 +197,7 @@ Usage: $programName [options] [options to pass to build system]
--chromium Build the Chromium port on Mac/Win/Linux
--gtk Build the GTK+ port
--qt Build the Qt port
+ --inspector-frontend Copy changes to the inspector front-end files to the build directory
--makeargs=<arguments> Optional Makefile flags
@@ -311,6 +318,10 @@ if (isGtk()) {
# Force re-link of existing libraries if different than expected
removeLibraryDependingOnSVG("WebCore", $svgSupport);
+if (isInspectorFrontend()) {
+ exit exitStatus(copyInspectorFrontendFiles());
+}
+
if (isWx()) {
downloadWafIfNeeded();
push @projects, 'WebKitTools/DumpRenderTree';
diff --git a/WebKitTools/Scripts/check-webkit-style b/WebKitTools/Scripts/check-webkit-style
index 5709cf0..501264b 100755
--- a/WebKitTools/Scripts/check-webkit-style
+++ b/WebKitTools/Scripts/check-webkit-style
@@ -1,6 +1,7 @@
#!/usr/bin/env python
#
# Copyright (C) 2009 Google Inc. All rights reserved.
+# Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -28,105 +29,28 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-"""Script to run the linter for source code of WebKit."""
+"""Does WebKit-lint on C/C++ or text files.
+
+The goal of this script is to identify places in the code that *may*
+be in non-compliance with WebKit style. It does not attempt to fix
+up these problems -- the point is to educate. It does also not
+attempt to find all problems, or to ensure that everything it does
+find is legitimately a problem.
+
+In particular, we can get very confused by /* and // inside strings!
+We do a small hack, which is to ignore //'s with "'s after them on the
+same line, but it is far from perfect (in either direction).
+"""
import codecs
import os
import os.path
import sys
-import modules.cpp_style as cpp_style
-from modules.diff_parser import DiffParser
-from modules.scm import detect_scm_system
-
-
-# Override the usage of the lint tool.
-cpp_style._USAGE = """
-Syntax: %(program_name)s [--verbose=#] [--git-commit=<SingleCommit>] [--output=vs7]
- [--filter=-x,+y,...] [file] ...
-
- The style guidelines this tries to follow are those in
- http://webkit.org/coding/coding-style.html
-
- Every problem is given a confidence score from 1-5, with 5 meaning we are
- certain of the problem, and 1 meaning it could be a legitimate construct.
- This will miss some errors, and is not a substitute for a code review.
-
- To prevent specific lines from being linted, add a '// NOLINT' comment to the
- end of the line.
-
- Linted extensions are .cpp, .c and .h. Other file types will be ignored.
-
- The file parameter is optional and multiple files to scan be passed in.
- Leaving out the file parameter will apply the check to the files changed
- according to the scm system.
-
- Flags:
-
- verbose=#
- Specify a number 0-5 to restrict errors to certain verbosity levels.
-
- git-commit=<SingleCommit>
- Checks the style of everything from the given commit to the local tree.
-
- output=vs7
- By default, the output is formatted to ease emacs parsing. Visual Studio
- compatible output (vs7) may also be used. Other formats are unsupported.
-
- filter=-x,+y,...
- Specify a comma-separated list of category-filters to apply: only
- error messages whose category names pass the filters will be printed.
- (Category names are printed with the message and look like
- "[whitespace/indent]".) Filters are evaluated left to right.
- "-FOO" and "FOO" means "do not print categories that start with FOO".
- "+FOO" means "do print categories that start with FOO".
-
- Examples: --filter=-whitespace,+whitespace/braces
- --filter=whitespace,runtime/printf,+runtime/printf_format
- --filter=-,+build/include_what_you_use
-
- To see a list of all the categories used in %(program_name)s, pass no arg:
- --filter=
-""" % {'program_name': os.path.basename(sys.argv[0])}
-
-
-def process_patch(patch_string):
- """Does lint on a single patch.
-
- Args:
- patch_string: A string of a patch.
- """
- patch = DiffParser(patch_string.splitlines())
- for filename, diff in patch.files.iteritems():
- file_extension = os.path.splitext(filename)[1]
-
- if file_extension in ['.cpp', '.c', '.h']:
- line_numbers = set()
-
- def error_for_patch(filename, line_number, category, confidence, message):
- """Wrapper function of cpp_style.error for patches.
-
- This function outputs errors only if the line number
- corresponds to lines which are modified or added.
- """
- if not line_numbers:
- for line in diff.lines:
- # When deleted line is not set, it means that
- # the line is newly added.
- if not line[0]:
- line_numbers.add(line[1])
-
- if line_number in line_numbers:
- cpp_style.error(filename, line_number, category, confidence, message)
-
- cpp_style.process_file(filename, error=error_for_patch)
-
+import webkitpy.style.checker as checker
+from webkitpy.style_references import SimpleScm
def main():
- cpp_style.use_webkit_styles()
-
- (files, flags) = cpp_style.parse_arguments(sys.argv[1:], ["git-commit="])
-
# Change stderr to write with replacement characters so we don't die
# if we try to print something containing non-ASCII characters.
sys.stderr = codecs.StreamReaderWriter(sys.stderr,
@@ -134,32 +58,37 @@ def main():
codecs.getwriter('utf8'),
'replace')
- if files and "--git-commit" in flags:
- sys.stderr.write("ERROR: It is not possible to check files "
- "and a specific commit at the same time.\n" + cpp_style._USAGE)
- sys.exit(1)
+ defaults = checker.webkit_argument_defaults()
+
+ parser = checker.ArgumentParser(defaults)
+ (files, options) = parser.parse(sys.argv[1:])
+
+ style_checker = checker.StyleChecker(options)
if files:
for filename in files:
- cpp_style.process_file(filename)
+ style_checker.check_file(filename)
else:
- cwd = os.path.abspath('.')
- scm = detect_scm_system(cwd)
+ scm = SimpleScm()
+
+ os.chdir(scm.checkout_root())
- if "--git-commit" in flags:
- commit = flags["--git-commit"]
+ if options.git_commit:
+ commit = options.git_commit
if '..' in commit:
# FIXME: If the range is a "...", the code should find the common ancestor and
# start there (see git diff --help for information about how ... usually works).
commit = commit[:commit.find('..')]
print >> sys.stderr, "Warning: Ranges are not supported for --git-commit. Checking all changes since %s.\n" % commit
- process_patch(scm.create_patch_since_local_commit(commit))
+ patch = scm.create_patch_since_local_commit(commit)
else:
- process_patch(scm.create_patch())
+ patch = scm.create_patch()
+ style_checker.check_patch(patch)
- sys.stderr.write('Total errors found: %d\n' % cpp_style.error_count())
- sys.exit(cpp_style.error_count() > 0)
+ error_count = style_checker.error_count
+ sys.stderr.write('Total errors found: %d\n' % error_count)
+ sys.exit(error_count > 0)
if __name__ == "__main__":
diff --git a/WebKitTools/Scripts/do-webcore-rename b/WebKitTools/Scripts/do-webcore-rename
index a65fa4f..56d8bed 100755
--- a/WebKitTools/Scripts/do-webcore-rename
+++ b/WebKitTools/Scripts/do-webcore-rename
@@ -67,232 +67,14 @@ sub wanted
push @paths, $File::Find::name;
}
-my $isDOMTypeRename = 1;
+my $isDOMTypeRename = 0;
my %renames = (
- "CanvasActiveInfo" => "WebGLActiveInfo",
- "canvasActiveInfo" => "webGLActiveInfo",
- "CanvasActiveInfoConstructor" => "WebGLActiveInfoConstructor",
- "CanvasActiveInfoPrototype" => "WebGLActiveInfoPrototype",
- "toCanvasActiveInfo" => "toWebGLActiveInfo",
- "JSCanvasActiveInfo" => "JSWebGLActiveInfo",
- "JSCanvasActiveInfoPrototype" => "JSWebGLActiveInfoPrototype",
- "JSCanvasActiveInfoConstructor" => "JSWebGLActiveInfoConstructor",
- "JSCanvasActiveInfoCustom" => "JSWebGLActiveInfoCustom",
- "V8CanvasActiveInfo" => "V8WebGLActiveInfo",
- "V8CanvasActiveInfoPrototype" => "V8WebGLActiveInfoPrototype",
- "V8CanvasActiveInfoConstructor" => "V8WebGLActiveInfoConstructor",
- "V8CanvasActiveInfoCustom" => "V8WebGLActiveInfoCustom",
- "CanvasArray" => "WebGLArray",
- "canvasArray" => "webGLArray",
- "CanvasArrayConstructor" => "WebGLArrayConstructor",
- "CanvasArrayPrototype" => "WebGLArrayPrototype",
- "toCanvasArray" => "toWebGLArray",
- "JSCanvasArray" => "JSWebGLArray",
- "JSCanvasArrayPrototype" => "JSWebGLArrayPrototype",
- "JSCanvasArrayConstructor" => "JSWebGLArrayConstructor",
- "JSCanvasArrayCustom" => "JSWebGLArrayCustom",
- "V8CanvasArray" => "V8WebGLArray",
- "V8CanvasArrayPrototype" => "V8WebGLArrayPrototype",
- "V8CanvasArrayConstructor" => "V8WebGLArrayConstructor",
- "V8CanvasArrayCustom" => "V8WebGLArrayCustom",
- "CanvasArrayBuffer" => "WebGLArrayBuffer",
- "canvasArrayBuffer" => "webGLArrayBuffer",
- "CanvasArrayBufferConstructor" => "WebGLArrayBufferConstructor",
- "CanvasArrayBufferPrototype" => "WebGLArrayBufferPrototype",
- "toCanvasArrayBuffer" => "toWebGLArrayBuffer",
- "JSCanvasArrayBuffer" => "JSWebGLArrayBuffer",
- "JSCanvasArrayBufferPrototype" => "JSWebGLArrayBufferPrototype",
- "JSCanvasArrayBufferConstructor" => "JSWebGLArrayBufferConstructor",
- "JSCanvasArrayBufferCustom" => "JSWebGLArrayBufferCustom",
- "V8CanvasArrayBuffer" => "V8WebGLArrayBuffer",
- "V8CanvasArrayBufferPrototype" => "V8WebGLArrayBufferPrototype",
- "V8CanvasArrayBufferConstructor" => "V8WebGLArrayBufferConstructor",
- "V8CanvasArrayBufferCustom" => "V8WebGLArrayBufferCustom",
- "CanvasBuffer" => "WebGLBuffer",
- "canvasBuffer" => "webGLBuffer",
- "CanvasBufferConstructor" => "WebGLBufferConstructor",
- "CanvasBufferPrototype" => "WebGLBufferPrototype",
- "toCanvasBuffer" => "toWebGLBuffer",
- "JSCanvasBuffer" => "JSWebGLBuffer",
- "JSCanvasBufferPrototype" => "JSWebGLBufferPrototype",
- "JSCanvasBufferConstructor" => "JSWebGLBufferConstructor",
- "JSCanvasBufferCustom" => "JSWebGLBufferCustom",
- "V8CanvasBuffer" => "V8WebGLBuffer",
- "V8CanvasBufferPrototype" => "V8WebGLBufferPrototype",
- "V8CanvasBufferConstructor" => "V8WebGLBufferConstructor",
- "V8CanvasBufferCustom" => "V8WebGLBufferCustom",
- "CanvasByteArray" => "WebGLByteArray",
- "canvasByteArray" => "webGLByteArray",
- "CanvasByteArrayConstructor" => "WebGLByteArrayConstructor",
- "CanvasByteArrayPrototype" => "WebGLByteArrayPrototype",
- "toCanvasByteArray" => "toWebGLByteArray",
- "JSCanvasByteArray" => "JSWebGLByteArray",
- "JSCanvasByteArrayPrototype" => "JSWebGLByteArrayPrototype",
- "JSCanvasByteArrayConstructor" => "JSWebGLByteArrayConstructor",
- "JSCanvasByteArrayCustom" => "JSWebGLByteArrayCustom",
- "V8CanvasByteArray" => "V8WebGLByteArray",
- "V8CanvasByteArrayPrototype" => "V8WebGLByteArrayPrototype",
- "V8CanvasByteArrayConstructor" => "V8WebGLByteArrayConstructor",
- "V8CanvasByteArrayCustom" => "V8WebGLByteArrayCustom",
- "CanvasFloatArray" => "WebGLFloatArray",
- "canvasFloatArray" => "webGLFloatArray",
- "CanvasFloatArrayConstructor" => "WebGLFloatArrayConstructor",
- "CanvasFloatArrayPrototype" => "WebGLFloatArrayPrototype",
- "toCanvasFloatArray" => "toWebGLFloatArray",
- "JSCanvasFloatArray" => "JSWebGLFloatArray",
- "JSCanvasFloatArrayPrototype" => "JSWebGLFloatArrayPrototype",
- "JSCanvasFloatArrayConstructor" => "JSWebGLFloatArrayConstructor",
- "JSCanvasFloatArrayCustom" => "JSWebGLFloatArrayCustom",
- "V8CanvasFloatArray" => "V8WebGLFloatArray",
- "V8CanvasFloatArrayPrototype" => "V8WebGLFloatArrayPrototype",
- "V8CanvasFloatArrayConstructor" => "V8WebGLFloatArrayConstructor",
- "V8CanvasFloatArrayCustom" => "V8WebGLFloatArrayCustom",
- "CanvasFramebuffer" => "WebGLFramebuffer",
- "canvasFramebuffer" => "webGLFramebuffer",
- "CanvasFramebufferConstructor" => "WebGLFramebufferConstructor",
- "CanvasFramebufferPrototype" => "WebGLFramebufferPrototype",
- "toCanvasFramebuffer" => "toWebGLFramebuffer",
- "JSCanvasFramebuffer" => "JSWebGLFramebuffer",
- "JSCanvasFramebufferPrototype" => "JSWebGLFramebufferPrototype",
- "JSCanvasFramebufferConstructor" => "JSWebGLFramebufferConstructor",
- "JSCanvasFramebufferCustom" => "JSWebGLFramebufferCustom",
- "V8CanvasFramebuffer" => "V8WebGLFramebuffer",
- "V8CanvasFramebufferPrototype" => "V8WebGLFramebufferPrototype",
- "V8CanvasFramebufferConstructor" => "V8WebGLFramebufferConstructor",
- "V8CanvasFramebufferCustom" => "V8WebGLFramebufferCustom",
- "CanvasIntArray" => "WebGLIntArray",
- "canvasIntArray" => "webGLIntArray",
- "CanvasIntArrayConstructor" => "WebGLIntArrayConstructor",
- "CanvasIntArrayPrototype" => "WebGLIntArrayPrototype",
- "toCanvasIntArray" => "toWebGLIntArray",
- "JSCanvasIntArray" => "JSWebGLIntArray",
- "JSCanvasIntArrayPrototype" => "JSWebGLIntArrayPrototype",
- "JSCanvasIntArrayConstructor" => "JSWebGLIntArrayConstructor",
- "JSCanvasIntArrayCustom" => "JSWebGLIntArrayCustom",
- "V8CanvasIntArray" => "V8WebGLIntArray",
- "V8CanvasIntArrayPrototype" => "V8WebGLIntArrayPrototype",
- "V8CanvasIntArrayConstructor" => "V8WebGLIntArrayConstructor",
- "V8CanvasIntArrayCustom" => "V8WebGLIntArrayCustom",
- "CanvasProgram" => "WebGLProgram",
- "canvasProgram" => "webGLProgram",
- "CanvasProgramConstructor" => "WebGLProgramConstructor",
- "CanvasProgramPrototype" => "WebGLProgramPrototype",
- "toCanvasProgram" => "toWebGLProgram",
- "JSCanvasProgram" => "JSWebGLProgram",
- "JSCanvasProgramPrototype" => "JSWebGLProgramPrototype",
- "JSCanvasProgramConstructor" => "JSWebGLProgramConstructor",
- "JSCanvasProgramCustom" => "JSWebGLProgramCustom",
- "V8CanvasProgram" => "V8WebGLProgram",
- "V8CanvasProgramPrototype" => "V8WebGLProgramPrototype",
- "V8CanvasProgramConstructor" => "V8WebGLProgramConstructor",
- "V8CanvasProgramCustom" => "V8WebGLProgramCustom",
- "CanvasRenderbuffer" => "WebGLRenderbuffer",
- "canvasRenderbuffer" => "webGLRenderbuffer",
- "CanvasRenderbufferConstructor" => "WebGLRenderbufferConstructor",
- "CanvasRenderbufferPrototype" => "WebGLRenderbufferPrototype",
- "toCanvasRenderbuffer" => "toWebGLRenderbuffer",
- "JSCanvasRenderbuffer" => "JSWebGLRenderbuffer",
- "JSCanvasRenderbufferPrototype" => "JSWebGLRenderbufferPrototype",
- "JSCanvasRenderbufferConstructor" => "JSWebGLRenderbufferConstructor",
- "JSCanvasRenderbufferCustom" => "JSWebGLRenderbufferCustom",
- "V8CanvasRenderbuffer" => "V8WebGLRenderbuffer",
- "V8CanvasRenderbufferPrototype" => "V8WebGLRenderbufferPrototype",
- "V8CanvasRenderbufferConstructor" => "V8WebGLRenderbufferConstructor",
- "V8CanvasRenderbufferCustom" => "V8WebGLRenderbufferCustom",
- "CanvasRenderingContext3D" => "WebGLRenderingContext",
- "canvasRenderingContext3D" => "webGLRenderingContext",
- "CanvasRenderingContext3DConstructor" => "WebGLRenderingContextConstructor",
- "CanvasRenderingContext3DPrototype" => "WebGLRenderingContextPrototype",
- "toCanvasRenderingContext3D" => "toWebGLRenderingContext",
- "JSCanvasRenderingContext3D" => "JSWebGLRenderingContext",
- "JSCanvasRenderingContext3DPrototype" => "JSWebGLRenderingContextPrototype",
- "JSCanvasRenderingContext3DConstructor" => "JSWebGLRenderingContextConstructor",
- "JSCanvasRenderingContext3DCustom" => "JSWebGLRenderingContextCustom",
- "V8CanvasRenderingContext3D" => "V8WebGLRenderingContext",
- "V8CanvasRenderingContext3DPrototype" => "V8WebGLRenderingContextPrototype",
- "V8CanvasRenderingContext3DConstructor" => "V8WebGLRenderingContextConstructor",
- "V8CanvasRenderingContext3DCustom" => "V8WebGLRenderingContextCustom",
- "CanvasShader" => "WebGLShader",
- "canvasShader" => "webGLShader",
- "CanvasShaderConstructor" => "WebGLShaderConstructor",
- "CanvasShaderPrototype" => "WebGLShaderPrototype",
- "toCanvasShader" => "toWebGLShader",
- "JSCanvasShader" => "JSWebGLShader",
- "JSCanvasShaderPrototype" => "JSWebGLShaderPrototype",
- "JSCanvasShaderConstructor" => "JSWebGLShaderConstructor",
- "JSCanvasShaderCustom" => "JSWebGLShaderCustom",
- "V8CanvasShader" => "V8WebGLShader",
- "V8CanvasShaderPrototype" => "V8WebGLShaderPrototype",
- "V8CanvasShaderConstructor" => "V8WebGLShaderConstructor",
- "V8CanvasShaderCustom" => "V8WebGLShaderCustom",
- "CanvasShortArray" => "WebGLShortArray",
- "canvasShortArray" => "webGLShortArray",
- "CanvasShortArrayConstructor" => "WebGLShortArrayConstructor",
- "CanvasShortArrayPrototype" => "WebGLShortArrayPrototype",
- "toCanvasShortArray" => "toWebGLShortArray",
- "JSCanvasShortArray" => "JSWebGLShortArray",
- "JSCanvasShortArrayPrototype" => "JSWebGLShortArrayPrototype",
- "JSCanvasShortArrayConstructor" => "JSWebGLShortArrayConstructor",
- "JSCanvasShortArrayCustom" => "JSWebGLShortArrayCustom",
- "V8CanvasShortArray" => "V8WebGLShortArray",
- "V8CanvasShortArrayPrototype" => "V8WebGLShortArrayPrototype",
- "V8CanvasShortArrayConstructor" => "V8WebGLShortArrayConstructor",
- "V8CanvasShortArrayCustom" => "V8WebGLShortArrayCustom",
- "CanvasTexture" => "WebGLTexture",
- "canvasTexture" => "webGLTexture",
- "CanvasTextureConstructor" => "WebGLTextureConstructor",
- "CanvasTexturePrototype" => "WebGLTexturePrototype",
- "toCanvasTexture" => "toWebGLTexture",
- "JSCanvasTexture" => "JSWebGLTexture",
- "JSCanvasTexturePrototype" => "JSWebGLTexturePrototype",
- "JSCanvasTextureConstructor" => "JSWebGLTextureConstructor",
- "JSCanvasTextureCustom" => "JSWebGLTextureCustom",
- "V8CanvasTexture" => "V8WebGLTexture",
- "V8CanvasTexturePrototype" => "V8WebGLTexturePrototype",
- "V8CanvasTextureConstructor" => "V8WebGLTextureConstructor",
- "V8CanvasTextureCustom" => "V8WebGLTextureCustom",
- "CanvasUnsignedByteArray" => "WebGLUnsignedByteArray",
- "canvasUnsignedByteArray" => "webGLUnsignedByteArray",
- "CanvasUnsignedByteArrayConstructor" => "WebGLUnsignedByteArrayConstructor",
- "CanvasUnsignedByteArrayPrototype" => "WebGLUnsignedByteArrayPrototype",
- "toCanvasUnsignedByteArray" => "toWebGLUnsignedByteArray",
- "JSCanvasUnsignedByteArray" => "JSWebGLUnsignedByteArray",
- "JSCanvasUnsignedByteArrayPrototype" => "JSWebGLUnsignedByteArrayPrototype",
- "JSCanvasUnsignedByteArrayConstructor" => "JSWebGLUnsignedByteArrayConstructor",
- "JSCanvasUnsignedByteArrayCustom" => "JSWebGLUnsignedByteArrayCustom",
- "V8CanvasUnsignedByteArray" => "V8WebGLUnsignedByteArray",
- "V8CanvasUnsignedByteArrayPrototype" => "V8WebGLUnsignedByteArrayPrototype",
- "V8CanvasUnsignedByteArrayConstructor" => "V8WebGLUnsignedByteArrayConstructor",
- "V8CanvasUnsignedByteArrayCustom" => "V8WebGLUnsignedByteArrayCustom",
- "CanvasUnsignedIntArray" => "WebGLUnsignedIntArray",
- "canvasUnsignedIntArray" => "webGLUnsignedIntArray",
- "CanvasUnsignedIntArrayConstructor" => "WebGLUnsignedIntArrayConstructor",
- "CanvasUnsignedIntArrayPrototype" => "WebGLUnsignedIntArrayPrototype",
- "toCanvasUnsignedIntArray" => "toWebGLUnsignedIntArray",
- "JSCanvasUnsignedIntArray" => "JSWebGLUnsignedIntArray",
- "JSCanvasUnsignedIntArrayPrototype" => "JSWebGLUnsignedIntArrayPrototype",
- "JSCanvasUnsignedIntArrayConstructor" => "JSWebGLUnsignedIntArrayConstructor",
- "JSCanvasUnsignedIntArrayCustom" => "JSWebGLUnsignedIntArrayCustom",
- "V8CanvasUnsignedIntArray" => "V8WebGLUnsignedIntArray",
- "V8CanvasUnsignedIntArrayPrototype" => "V8WebGLUnsignedIntArrayPrototype",
- "V8CanvasUnsignedIntArrayConstructor" => "V8WebGLUnsignedIntArrayConstructor",
- "V8CanvasUnsignedIntArrayCustom" => "V8WebGLUnsignedIntArrayCustom",
- "CanvasUnsignedShortArray" => "WebGLUnsignedShortArray",
- "canvasUnsignedShortArray" => "webGLUnsignedShortArray",
- "CanvasUnsignedShortArrayConstructor" => "WebGLUnsignedShortArrayConstructor",
- "CanvasUnsignedShortArrayPrototype" => "WebGLUnsignedShortArrayPrototype",
- "toCanvasUnsignedShortArray" => "toWebGLUnsignedShortArray",
- "JSCanvasUnsignedShortArray" => "JSWebGLUnsignedShortArray",
- "JSCanvasUnsignedShortArrayPrototype" => "JSWebGLUnsignedShortArrayPrototype",
- "JSCanvasUnsignedShortArrayConstructor" => "JSWebGLUnsignedShortArrayConstructor",
- "JSCanvasUnsignedShortArrayCustom" => "JSWebGLUnsignedShortArrayCustom",
- "V8CanvasUnsignedShortArray" => "V8WebGLUnsignedShortArray",
- "V8CanvasUnsignedShortArrayPrototype" => "V8WebGLUnsignedShortArrayPrototype",
- "V8CanvasUnsignedShortArrayConstructor" => "V8WebGLUnsignedShortArrayConstructor",
- "V8CanvasUnsignedShortArrayCustom" => "V8WebGLUnsignedShortArrayCustom"
+ "m_sel" => "m_selection",
);
my %renamesContemplatedForTheFuture = (
+ "HTMLPlugInImageElement" => "HTMLEmbeddedObjectElement",
+
"DOMObject" => "JSDOMObject",
"runtimeObjectGetter" => "pluginElementGetter",
diff --git a/WebKitTools/Scripts/make-script-test-wrappers b/WebKitTools/Scripts/make-script-test-wrappers
index 133476c..aed1834 100755
--- a/WebKitTools/Scripts/make-script-test-wrappers
+++ b/WebKitTools/Scripts/make-script-test-wrappers
@@ -99,7 +99,7 @@ for my $tfile (@templates) {
$html =~ s:${templateDirectory}/(.*)\.js:$1.html:;
next if -f "$html-disabled";
- system("grep -q 'successfullyParsed =' $file");
+ system("cat ${file} | tr '\\0' ' ' | grep -q 'successfullyParsed ='");
if ($? != 0) {
`echo "" >> "${file}"`;
`echo "var successfullyParsed = true;" >> "${file}"`;
diff --git a/WebKitTools/Scripts/mark-bug-fixed b/WebKitTools/Scripts/mark-bug-fixed
deleted file mode 100755
index c7086c2..0000000
--- a/WebKitTools/Scripts/mark-bug-fixed
+++ /dev/null
@@ -1,141 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2009 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 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.
-
-# Mark a bug as fixed on bugs.webkit.org.
-
-import os
-import re
-import sys
-
-from optparse import OptionParser
-
-from modules.bugzilla import Bugzilla, parse_bug_id
-from modules.comments import bug_comment_from_svn_revision
-from modules.logging import error, log
-from modules.scm import SCM, detect_scm_system
-
-
-class MarkBugFixedTool:
- def __init__(self):
- self.bugs = Bugzilla()
- self.cached_scm = None
- self.option_parser = OptionParser(usage="usage: %prog [options] [rNNNNN]")
- self.option_parser.add_option("-b", "--bug-id", action="store", type="string", dest="bug_id", help="Specify bug id if no URL is provided in the commit log.")
- self.option_parser.add_option("-m", "--comment", action="store", type="string", dest="comment", help="Text to include in bug comment.")
- self.option_parser.add_option("-o", "--open", action="store_true", default=False, dest="open_bug", help="Open bug in default web browser (Mac only).")
- self.option_parser.add_option("-u", "--update-only", action="store_true", default=False, dest="update_only", help="Add comment to the bug, but do not close it.")
-
- def scm(self):
- # Lazily initialize SCM to not error-out before command line parsing (or when running non-scm commands).
- if not self.cached_scm:
- original_cwd = os.path.abspath('.')
- self.cached_scm = detect_scm_system(original_cwd)
- return self.cached_scm
-
- def _fetch_commit_log(self, scm, svn_revision):
- if not svn_revision:
- return scm.last_svn_commit_log()
- return scm.svn_commit_log(svn_revision)
-
- def _determine_bug_id_and_svn_revision(self, bug_id, svn_revision):
- commit_log = self._fetch_commit_log(self.scm(), svn_revision)
-
- if not bug_id:
- bug_id = parse_bug_id(commit_log)
-
- if not svn_revision:
- match = re.search("^r(?P<svn_revision>\d+) \|", commit_log, re.MULTILINE)
- if match:
- svn_revision = match.group('svn_revision')
-
- if not bug_id or not svn_revision:
- not_found = []
- if not bug_id:
- not_found.append("bug id")
- if not svn_revision:
- not_found.append("svn revision")
- error("Could not find %s on command-line or in %s."
- % (" or ".join(not_found), "r%s" % svn_revision if svn_revision else "last commit"))
-
- return (bug_id, svn_revision)
-
- def _open_bug_in_web_browser(self, bug_id):
- if sys.platform == "darwin":
- SCM.run_command(["open", self.bugs.short_bug_url_for_bug_id(bug_id)])
- return
- log("WARNING: -o|--open is only supported on Mac OS X.")
-
- def _prompt_user_for_correctness(self, bug_id, svn_revision):
- answer = raw_input("Is this correct (y/N)? ")
- if not re.match("^\s*y(es)?", answer, re.IGNORECASE):
- exit(1)
-
- def main(self):
- (options, args) = self.option_parser.parse_args(sys.argv[1:])
-
- if len(args) > 1:
- error("Only one revision may be specified.")
-
- bug_id = options.bug_id
-
- svn_revision = args[0] if len(args) == 1 else None
- if svn_revision:
- if re.match("^r[0-9]+$", svn_revision, re.IGNORECASE):
- svn_revision = svn_revision[1:]
- if not re.match("^[0-9]+$", svn_revision):
- error("Invalid svn revision: '%s'" % svn_revision)
-
- needs_prompt = False
- if not bug_id or not svn_revision:
- needs_prompt = True
- (bug_id, svn_revision) = self._determine_bug_id_and_svn_revision(bug_id, svn_revision)
-
- log("Bug: <%s> %s" % (self.bugs.short_bug_url_for_bug_id(bug_id), self.bugs.fetch_title_from_bug(bug_id)))
- log("Revision: %s" % svn_revision)
-
- if options.open_bug:
- self._open_bug_in_web_browser(bug_id)
-
- if needs_prompt:
- self._prompt_user_for_correctness(bug_id, svn_revision)
-
- bug_comment = bug_comment_from_svn_revision(svn_revision)
- if options.comment:
- bug_comment = "%s\n\n%s" % (options.comment, bug_comment)
-
- if options.update_only:
- log("Adding comment to Bug %s." % bug_id)
- self.bugs.post_comment_to_bug(bug_id, bug_comment)
- else:
- log("Adding comment to Bug %s and marking as Resolved/Fixed." % bug_id)
- self.bugs.close_bug_as_fixed(bug_id, bug_comment)
-
-
-def main():
- tool = MarkBugFixedTool()
- return tool.main()
-
-if __name__ == "__main__":
- main()
diff --git a/WebKitTools/Scripts/modules/bugzilla.py b/WebKitTools/Scripts/modules/bugzilla.py
deleted file mode 100644
index be78544..0000000
--- a/WebKitTools/Scripts/modules/bugzilla.py
+++ /dev/null
@@ -1,595 +0,0 @@
-# Copyright (c) 2009, Google Inc. All rights reserved.
-# Copyright (c) 2009 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:
-#
-# * 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.
-#
-# WebKit's Python module for interacting with Bugzilla
-
-import getpass
-import platform
-import re
-import subprocess
-import urllib2
-
-from datetime import datetime # used in timestamp()
-
-# Import WebKit-specific modules.
-from modules.logging import error, log
-from modules.committers import CommitterList
-
-# WebKit includes a built copy of BeautifulSoup in Scripts/modules
-# so this import should always succeed.
-from .BeautifulSoup import BeautifulSoup, SoupStrainer
-
-try:
- from mechanize import Browser
-except ImportError, e:
- print """
-mechanize is required.
-
-To install:
-sudo easy_install mechanize
-
-Or from the web:
-http://wwwsearch.sourceforge.net/mechanize/
-"""
- exit(1)
-
-def credentials_from_git():
- return [read_config("username"), read_config("password")]
-
-def credentials_from_keychain(username=None):
- if not is_mac_os_x():
- return [username, None]
-
- command = "/usr/bin/security %s -g -s %s" % ("find-internet-password", Bugzilla.bug_server_host)
- if username:
- command += " -a %s" % username
-
- log('Reading Keychain for %s account and password. Click "Allow" to continue...' % Bugzilla.bug_server_host)
- keychain_process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
- value = keychain_process.communicate()[0]
- exit_code = keychain_process.wait()
-
- if exit_code:
- return [username, None]
-
- match = re.search('^\s*"acct"<blob>="(?P<username>.+)"', value, re.MULTILINE)
- if match:
- username = match.group('username')
-
- password = None
- match = re.search('^password: "(?P<password>.+)"', value, re.MULTILINE)
- if match:
- password = match.group('password')
-
- return [username, password]
-
-def is_mac_os_x():
- return platform.mac_ver()[0]
-
-def parse_bug_id(message):
- match = re.search("http\://webkit\.org/b/(?P<bug_id>\d+)", message)
- if match:
- return int(match.group('bug_id'))
- match = re.search(Bugzilla.bug_server_regex + "show_bug\.cgi\?id=(?P<bug_id>\d+)", message)
- if match:
- return int(match.group('bug_id'))
- return None
-
-# FIXME: This should not depend on git for config storage
-def read_config(key):
- # Need a way to read from svn too
- config_process = subprocess.Popen("git config --get bugzilla.%s" % key, stdout=subprocess.PIPE, shell=True)
- value = config_process.communicate()[0]
- return_code = config_process.wait()
-
- if return_code:
- return None
- return value.rstrip('\n')
-
-def read_credentials():
- (username, password) = credentials_from_git()
-
- if not username or not password:
- (username, password) = credentials_from_keychain(username)
-
- if not username:
- username = raw_input("Bugzilla login: ")
- if not password:
- password = getpass.getpass("Bugzilla password for %s: " % username)
-
- return [username, password]
-
-def timestamp():
- return datetime.now().strftime("%Y%m%d%H%M%S")
-
-
-class BugzillaError(Exception):
- pass
-
-
-class Bugzilla:
- def __init__(self, dryrun=False, committers=CommitterList()):
- self.dryrun = dryrun
- self.authenticated = False
-
- self.browser = Browser()
- # Ignore bugs.webkit.org/robots.txt until we fix it to allow this script
- self.browser.set_handle_robots(False)
- self.committers = committers
-
- # Defaults (until we support better option parsing):
- bug_server_host = "bugs.webkit.org"
- bug_server_regex = "https?://%s/" % re.sub('\.', '\\.', bug_server_host)
- bug_server_url = "https://%s/" % bug_server_host
-
- def bug_url_for_bug_id(self, bug_id, xml=False):
- content_type = "&ctype=xml" if xml else ""
- return "%sshow_bug.cgi?id=%s%s" % (self.bug_server_url, bug_id, content_type)
-
- def short_bug_url_for_bug_id(self, bug_id):
- return "http://webkit.org/b/%s" % bug_id
-
- def attachment_url_for_id(self, attachment_id, action="view"):
- action_param = ""
- if action and action != "view":
- action_param = "&action=%s" % action
- return "%sattachment.cgi?id=%s%s" % (self.bug_server_url, attachment_id, action_param)
-
- def _parse_attachment_flag(self, element, flag_name, attachment, result_key):
- flag = element.find('flag', attrs={'name' : flag_name})
- if flag:
- attachment[flag_name] = flag['status']
- if flag['status'] == '+':
- attachment[result_key] = flag['setter']
-
- def _parse_attachment_element(self, element, bug_id):
- attachment = {}
- attachment['bug_id'] = bug_id
- attachment['is_obsolete'] = (element.has_key('isobsolete') and element['isobsolete'] == "1")
- attachment['is_patch'] = (element.has_key('ispatch') and element['ispatch'] == "1")
- attachment['id'] = int(element.find('attachid').string)
- attachment['url'] = self.attachment_url_for_id(attachment['id'])
- attachment['name'] = unicode(element.find('desc').string)
- attachment['attacher_email'] = str(element.find('attacher').string)
- attachment['type'] = str(element.find('type').string)
- self._parse_attachment_flag(element, 'review', attachment, 'reviewer_email')
- self._parse_attachment_flag(element, 'commit-queue', attachment, 'committer_email')
- return attachment
-
- def fetch_attachments_from_bug(self, bug_id):
- bug_url = self.bug_url_for_bug_id(bug_id, xml=True)
- log("Fetching: %s" % bug_url)
-
- page = urllib2.urlopen(bug_url)
- soup = BeautifulSoup(page)
-
- attachments = []
- for element in soup.findAll('attachment'):
- attachment = self._parse_attachment_element(element, bug_id)
- attachments.append(attachment)
- return attachments
-
- def _parse_bug_id_from_attachment_page(self, page):
- up_link = BeautifulSoup(page).find('link', rel='Up') # The "Up" relation happens to point to the bug.
- if not up_link:
- return None # This attachment does not exist (or you don't have permissions to view it).
- match = re.search("show_bug.cgi\?id=(?P<bug_id>\d+)", up_link['href'])
- return int(match.group('bug_id'))
-
- def bug_id_for_attachment_id(self, attachment_id):
- attachment_url = self.attachment_url_for_id(attachment_id, 'edit')
- log("Fetching: %s" % attachment_url)
- page = urllib2.urlopen(attachment_url)
- return self._parse_bug_id_from_attachment_page(page)
-
- # This should really return an Attachment object
- # which can lazily fetch any missing data.
- def fetch_attachment(self, attachment_id):
- # We could grab all the attachment details off of the attachment edit page
- # but we already have working code to do so off of the bugs page, so re-use that.
- bug_id = self.bug_id_for_attachment_id(attachment_id)
- if not bug_id:
- return None
- attachments = self.fetch_attachments_from_bug(bug_id)
- for attachment in attachments:
- # FIXME: Once we have a real Attachment class we shouldn't paper over this possible comparison failure
- # and we should remove the int() == int() hacks and leave it just ==.
- if int(attachment['id']) == int(attachment_id):
- self._validate_committer_and_reviewer(attachment)
- return attachment
- return None # This should never be hit.
-
- def fetch_title_from_bug(self, bug_id):
- bug_url = self.bug_url_for_bug_id(bug_id, xml=True)
- page = urllib2.urlopen(bug_url)
- soup = BeautifulSoup(page)
- return soup.find('short_desc').string
-
- def fetch_patches_from_bug(self, bug_id):
- patches = []
- for attachment in self.fetch_attachments_from_bug(bug_id):
- if attachment['is_patch'] and not attachment['is_obsolete']:
- patches.append(attachment)
- return patches
-
- # _view_source_link belongs in some sort of webkit_config.py module.
- def _view_source_link(self, local_path):
- return "http://trac.webkit.org/browser/trunk/%s" % local_path
-
- def _flag_permission_rejection_message(self, setter_email, flag_name):
- committer_list = "WebKitTools/Scripts/modules/committers.py"
- contribution_guidlines_url = "http://webkit.org/coding/contributing.html"
- rejection_message = "%s does not have %s permissions according to %s." % (setter_email, flag_name, self._view_source_link(committer_list))
- rejection_message += "\n\n- If you have %s rights please correct the error in %s by adding yourself to the file (no review needed) and then set the %s flag again." % (flag_name, committer_list, flag_name)
- rejection_message += "\n\n- If you do not have %s rights please read %s for instructions on how to use bugzilla flags." % (flag_name, contribution_guidlines_url)
- return rejection_message
-
- def _validate_setter_email(self, patch, result_key, lookup_function, rejection_function, reject_invalid_patches):
- setter_email = patch.get(result_key + '_email')
- if not setter_email:
- return None
-
- committer = lookup_function(setter_email)
- if committer:
- patch[result_key] = committer.full_name
- return patch[result_key]
-
- if reject_invalid_patches:
- rejection_function(patch['id'], self._flag_permission_rejection_message(setter_email, result_key))
- else:
- log("Warning, attachment %s on bug %s has invalid %s (%s)" % (patch['id'], patch['bug_id'], result_key, setter_email))
- return None
-
- def _validate_reviewer(self, patch, reject_invalid_patches):
- return self._validate_setter_email(patch, 'reviewer', self.committers.reviewer_by_email, self.reject_patch_from_review_queue, reject_invalid_patches)
-
- def _validate_committer(self, patch, reject_invalid_patches):
- return self._validate_setter_email(patch, 'committer', self.committers.committer_by_email, self.reject_patch_from_commit_queue, reject_invalid_patches)
-
- # FIXME: This is a hack until we have a real Attachment object.
- # _validate_committer and _validate_reviewer fill in the 'reviewer' and 'committer'
- # keys which other parts of the code expect to be filled in.
- def _validate_committer_and_reviewer(self, patch):
- self._validate_reviewer(patch, reject_invalid_patches=False)
- self._validate_committer(patch, reject_invalid_patches=False)
-
- def fetch_unreviewed_patches_from_bug(self, bug_id):
- unreviewed_patches = []
- for attachment in self.fetch_attachments_from_bug(bug_id):
- if attachment.get('review') == '?' and not attachment['is_obsolete']:
- unreviewed_patches.append(attachment)
- return unreviewed_patches
-
- def fetch_reviewed_patches_from_bug(self, bug_id, reject_invalid_patches=False):
- reviewed_patches = []
- for attachment in self.fetch_attachments_from_bug(bug_id):
- if self._validate_reviewer(attachment, reject_invalid_patches) and not attachment['is_obsolete']:
- reviewed_patches.append(attachment)
- return reviewed_patches
-
- def fetch_commit_queue_patches_from_bug(self, bug_id, reject_invalid_patches=False):
- commit_queue_patches = []
- for attachment in self.fetch_reviewed_patches_from_bug(bug_id, reject_invalid_patches):
- if self._validate_committer(attachment, reject_invalid_patches) and not attachment['is_obsolete']:
- commit_queue_patches.append(attachment)
- return commit_queue_patches
-
- def _fetch_bug_ids_advanced_query(self, query):
- page = urllib2.urlopen(query)
- soup = BeautifulSoup(page)
-
- bug_ids = []
- # Grab the cells in the first column (which happens to be the bug ids)
- for bug_link_cell in soup('td', "first-child"): # tds with the class "first-child"
- bug_link = bug_link_cell.find("a")
- bug_ids.append(int(bug_link.string)) # the contents happen to be the bug id
-
- return bug_ids
-
- def _parse_attachment_ids_request_query(self, page):
- digits = re.compile("\d+")
- attachment_href = re.compile("attachment.cgi\?id=\d+&action=review")
- attachment_links = SoupStrainer("a", href=attachment_href)
- return [int(digits.search(tag["href"]).group(0)) for tag in BeautifulSoup(page, parseOnlyThese=attachment_links)]
-
- def _fetch_attachment_ids_request_query(self, query):
- return self._parse_attachment_ids_request_query(urllib2.urlopen(query))
-
- def fetch_bug_ids_from_commit_queue(self):
- commit_queue_url = self.bug_server_url + "buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=commit-queue%2B"
- return self._fetch_bug_ids_advanced_query(commit_queue_url)
-
- # List of all r+'d bugs.
- def fetch_bug_ids_from_needs_commit_list(self):
- needs_commit_query_url = self.bug_server_url + "buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=review%2B"
- return self._fetch_bug_ids_advanced_query(needs_commit_query_url)
-
- def fetch_bug_ids_from_review_queue(self):
- review_queue_url = self.bug_server_url + "buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=review?"
- return self._fetch_bug_ids_advanced_query(review_queue_url)
-
- def fetch_attachment_ids_from_review_queue(self):
- review_queue_url = self.bug_server_url + "request.cgi?action=queue&type=review&group=type"
- return self._fetch_attachment_ids_request_query(review_queue_url)
-
- def fetch_patches_from_commit_queue(self, reject_invalid_patches=False):
- patches_to_land = []
- for bug_id in self.fetch_bug_ids_from_commit_queue():
- patches = self.fetch_commit_queue_patches_from_bug(bug_id, reject_invalid_patches)
- patches_to_land += patches
- return patches_to_land
-
- def fetch_patches_from_pending_commit_list(self):
- patches_needing_commit = []
- for bug_id in self.fetch_bug_ids_from_needs_commit_list():
- patches = self.fetch_reviewed_patches_from_bug(bug_id)
- patches_needing_commit += patches
- return patches_needing_commit
-
- def fetch_patches_from_review_queue(self, limit=None):
- patches_to_review = []
- for bug_id in self.fetch_bug_ids_from_review_queue():
- if limit and len(patches_to_review) >= limit:
- break
- patches = self.fetch_unreviewed_patches_from_bug(bug_id)
- patches_to_review += patches
- return patches_to_review
-
- def authenticate(self):
- if self.authenticated:
- return
-
- if self.dryrun:
- log("Skipping log in for dry run...")
- self.authenticated = True
- return
-
- (username, password) = read_credentials()
-
- log("Logging in as %s..." % username)
- self.browser.open(self.bug_server_url + "index.cgi?GoAheadAndLogIn=1")
- self.browser.select_form(name="login")
- self.browser['Bugzilla_login'] = username
- self.browser['Bugzilla_password'] = password
- response = self.browser.submit()
-
- match = re.search("<title>(.+?)</title>", response.read())
- # If the resulting page has a title, and it contains the word "invalid" assume it's the login failure page.
- if match and re.search("Invalid", match.group(1), re.IGNORECASE):
- # FIXME: We could add the ability to try again on failure.
- raise BugzillaError("Bugzilla login failed: %s" % match.group(1))
-
- self.authenticated = True
-
- def _fill_attachment_form(self, description, patch_file_object, comment_text=None, mark_for_review=False, mark_for_commit_queue=False, bug_id=None):
- self.browser['description'] = description
- self.browser['ispatch'] = ("1",)
- self.browser['flag_type-1'] = ('?',) if mark_for_review else ('X',)
- self.browser['flag_type-3'] = ('?',) if mark_for_commit_queue else ('X',)
- if bug_id:
- patch_name = "bug-%s-%s.patch" % (bug_id, timestamp())
- else:
- patch_name ="%s.patch" % timestamp()
- self.browser.add_file(patch_file_object, "text/plain", patch_name, 'data')
-
- def add_patch_to_bug(self, bug_id, patch_file_object, description, comment_text=None, mark_for_review=False, mark_for_commit_queue=False):
- self.authenticate()
-
- log('Adding patch "%s" to bug %s' % (description, bug_id))
- if self.dryrun:
- log(comment_text)
- return
-
- self.browser.open("%sattachment.cgi?action=enter&bugid=%s" % (self.bug_server_url, bug_id))
- self.browser.select_form(name="entryform")
- self._fill_attachment_form(description, patch_file_object, mark_for_review=mark_for_review, mark_for_commit_queue=mark_for_commit_queue, bug_id=bug_id)
- if comment_text:
- log(comment_text)
- self.browser['comment'] = comment_text
- self.browser.submit()
-
- def prompt_for_component(self, components):
- log("Please pick a component:")
- i = 0
- for name in components:
- i += 1
- log("%2d. %s" % (i, name))
- result = int(raw_input("Enter a number: ")) - 1
- return components[result]
-
- def _check_create_bug_response(self, response_html):
- match = re.search("<title>Bug (?P<bug_id>\d+) Submitted</title>", response_html)
- if match:
- return match.group('bug_id')
-
- match = re.search('<div id="bugzilla-body">(?P<error_message>.+)<div id="footer">', response_html, re.DOTALL)
- error_message = "FAIL"
- if match:
- text_lines = BeautifulSoup(match.group('error_message')).findAll(text=True)
- error_message = "\n" + '\n'.join([" " + line.strip() for line in text_lines if line.strip()])
- raise BugzillaError("Bug not created: %s" % error_message)
-
- def create_bug_with_patch(self, bug_title, bug_description, component, patch_file_object, patch_description, cc, mark_for_review=False, mark_for_commit_queue=False):
- self.authenticate()
-
- log('Creating bug with patch description "%s"' % patch_description)
- if self.dryrun:
- log(bug_description)
- return
-
- self.browser.open(self.bug_server_url + "enter_bug.cgi?product=WebKit")
- self.browser.select_form(name="Create")
- component_items = self.browser.find_control('component').items
- component_names = map(lambda item: item.name, component_items)
- if not component or component not in component_names:
- component = self.prompt_for_component(component_names)
- self.browser['component'] = [component]
- if cc:
- self.browser['cc'] = cc
- self.browser['short_desc'] = bug_title
- if bug_description:
- log(bug_description)
- self.browser['comment'] = bug_description
-
- self._fill_attachment_form(patch_description, patch_file_object, mark_for_review=mark_for_review, mark_for_commit_queue=mark_for_commit_queue)
- response = self.browser.submit()
-
- bug_id = self._check_create_bug_response(response.read())
- log("Bug %s created." % bug_id)
- log("%sshow_bug.cgi?id=%s" % (self.bug_server_url, bug_id))
- return bug_id
-
- def _find_select_element_for_flag(self, flag_name):
- # FIXME: This will break if we ever re-order attachment flags
- if flag_name == "review":
- return self.browser.find_control(type='select', nr=0)
- if flag_name == "commit-queue":
- return self.browser.find_control(type='select', nr=1)
- raise Exception("Don't know how to find flag named \"%s\"" % flag_name)
-
- def clear_attachment_flags(self, attachment_id, additional_comment_text=None):
- self.authenticate()
-
- comment_text = "Clearing flags on attachment: %s" % attachment_id
- if additional_comment_text:
- comment_text += "\n\n%s" % additional_comment_text
- log(comment_text)
-
- if self.dryrun:
- return
-
- self.browser.open(self.attachment_url_for_id(attachment_id, 'edit'))
- self.browser.select_form(nr=1)
- self.browser.set_value(comment_text, name='comment', nr=0)
- self._find_select_element_for_flag('review').value = ("X",)
- self._find_select_element_for_flag('commit-queue').value = ("X",)
- self.browser.submit()
-
- # FIXME: We need a way to test this on a live bugzilla instance.
- def _set_flag_on_attachment(self, attachment_id, flag_name, flag_value, comment_text, additional_comment_text):
- self.authenticate()
-
- if additional_comment_text:
- comment_text += "\n\n%s" % additional_comment_text
- log(comment_text)
-
- if self.dryrun:
- return
-
- self.browser.open(self.attachment_url_for_id(attachment_id, 'edit'))
- self.browser.select_form(nr=1)
- self.browser.set_value(comment_text, name='comment', nr=0)
- self._find_select_element_for_flag(flag_name).value = (flag_value,)
- self.browser.submit()
-
- def reject_patch_from_commit_queue(self, attachment_id, additional_comment_text=None):
- comment_text = "Rejecting patch %s from commit-queue." % attachment_id
- self._set_flag_on_attachment(attachment_id, 'commit-queue', '-', comment_text, additional_comment_text)
-
- def reject_patch_from_review_queue(self, attachment_id, additional_comment_text=None):
- comment_text = "Rejecting patch %s from review queue." % attachment_id
- self._set_flag_on_attachment(attachment_id, 'review', '-', comment_text, additional_comment_text)
-
- def obsolete_attachment(self, attachment_id, comment_text = None):
- self.authenticate()
-
- log("Obsoleting attachment: %s" % attachment_id)
- if self.dryrun:
- log(comment_text)
- return
-
- self.browser.open(self.attachment_url_for_id(attachment_id, 'edit'))
- self.browser.select_form(nr=1)
- self.browser.find_control('isobsolete').items[0].selected = True
- # Also clear any review flag (to remove it from review/commit queues)
- self._find_select_element_for_flag('review').value = ("X",)
- self._find_select_element_for_flag('commit-queue').value = ("X",)
- if comment_text:
- log(comment_text)
- # Bugzilla has two textareas named 'comment', one is somehow hidden. We want the first.
- self.browser.set_value(comment_text, name='comment', nr=0)
- self.browser.submit()
-
- def add_cc_to_bug(self, bug_id, email_address):
- self.authenticate()
-
- log("Adding %s to the CC list for bug %s" % (email_address, bug_id))
- if self.dryrun:
- return
-
- self.browser.open(self.bug_url_for_bug_id(bug_id))
- self.browser.select_form(name="changeform")
- self.browser["newcc"] = email_address
- self.browser.submit()
-
- def post_comment_to_bug(self, bug_id, comment_text, cc=None):
- self.authenticate()
-
- log("Adding comment to bug %s" % bug_id)
- if self.dryrun:
- log(comment_text)
- return
-
- self.browser.open(self.bug_url_for_bug_id(bug_id))
- self.browser.select_form(name="changeform")
- self.browser["comment"] = comment_text
- if cc:
- self.browser["newcc"] = cc
- self.browser.submit()
-
- def close_bug_as_fixed(self, bug_id, comment_text=None):
- self.authenticate()
-
- log("Closing bug %s as fixed" % bug_id)
- if self.dryrun:
- log(comment_text)
- return
-
- self.browser.open(self.bug_url_for_bug_id(bug_id))
- self.browser.select_form(name="changeform")
- if comment_text:
- log(comment_text)
- self.browser['comment'] = comment_text
- self.browser['bug_status'] = ['RESOLVED']
- self.browser['resolution'] = ['FIXED']
- self.browser.submit()
-
- def reopen_bug(self, bug_id, comment_text):
- self.authenticate()
-
- log("Re-opening bug %s" % bug_id)
- log(comment_text) # Bugzilla requires a comment when re-opening a bug, so we know it will never be None.
- if self.dryrun:
- return
-
- self.browser.open(self.bug_url_for_bug_id(bug_id))
- self.browser.select_form(name="changeform")
- self.browser['bug_status'] = ['REOPENED']
- self.browser['comment'] = comment_text
- self.browser.submit()
diff --git a/WebKitTools/Scripts/modules/buildsteps.py b/WebKitTools/Scripts/modules/buildsteps.py
deleted file mode 100644
index 425b912..0000000
--- a/WebKitTools/Scripts/modules/buildsteps.py
+++ /dev/null
@@ -1,254 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import os
-
-from optparse import make_option
-
-from modules.comments import bug_comment_from_commit_text
-from modules.logging import log, error
-from modules.webkitport import WebKitPort
-
-
-class CommandOptions(object):
- force_clean = make_option("--force-clean", action="store_true", dest="force_clean", default=False, help="Clean working directory before applying patches (removes local changes and commits)")
- clean = make_option("--no-clean", action="store_false", dest="clean", default=True, help="Don't check if the working directory is clean before applying patches")
- check_builders = make_option("--ignore-builders", action="store_false", dest="check_builders", default=True, help="Don't check to see if the build.webkit.org builders are green before landing.")
- quiet = make_option("--quiet", action="store_true", dest="quiet", default=False, help="Produce less console output.")
- non_interactive = make_option("--non-interactive", action="store_true", dest="non_interactive", default=False, help="Never prompt the user, fail as fast as possible.")
- parent_command = make_option("--parent-command", action="store", dest="parent_command", default=None, help="(Internal) The command that spawned this instance.")
- update = make_option("--no-update", action="store_false", dest="update", default=True, help="Don't update the working directory.")
- build = make_option("--no-build", action="store_false", dest="build", default=True, help="Commit without building first, implies --no-test.")
- test = make_option("--no-test", action="store_false", dest="test", default=True, help="Commit without running run-webkit-tests.")
- close_bug = make_option("--no-close", action="store_false", dest="close_bug", default=True, help="Leave bug open after landing.")
- port = make_option("--port", action="store", dest="port", default=None, help="Specify a port (e.g., mac, qt, gtk, ...).")
-
-
-class AbstractStep(object):
- def __init__(self, tool, options, patch=None):
- self._tool = tool
- self._options = options
- self._patch = patch
- self._port = None
-
- def _run_script(self, script_name, quiet=False, port=WebKitPort):
- log("Running %s" % script_name)
- self._tool.executive.run_and_throw_if_fail(port.script_path(script_name), quiet)
-
- # FIXME: The port should live on the tool.
- def port(self):
- if self._port:
- return self._port
- self._port = WebKitPort.port(self._options.port)
- return self._port
-
- @classmethod
- def options(cls):
- return []
-
- def run(self, tool):
- raise NotImplementedError, "subclasses must implement"
-
-
-class PrepareChangelogStep(AbstractStep):
- def run(self):
- self._run_script("prepare-ChangeLog")
-
-
-class CleanWorkingDirectoryStep(AbstractStep):
- def __init__(self, tool, options, patch=None, allow_local_commits=False):
- AbstractStep.__init__(self, tool, options, patch)
- self._allow_local_commits = allow_local_commits
-
- @classmethod
- def options(cls):
- return [
- CommandOptions.force_clean,
- CommandOptions.clean,
- ]
-
- def run(self):
- os.chdir(self._tool.scm().checkout_root)
- if not self._allow_local_commits:
- self._tool.scm().ensure_no_local_commits(self._options.force_clean)
- if self._options.clean:
- self._tool.scm().ensure_clean_working_directory(force_clean=self._options.force_clean)
-
-
-class UpdateStep(AbstractStep):
- @classmethod
- def options(cls):
- return [
- CommandOptions.update,
- CommandOptions.port,
- ]
-
- def run(self):
- if not self._options.update:
- return
- log("Updating working directory")
- self._tool.executive.run_and_throw_if_fail(self.port().update_webkit_command())
-
-
-class ApplyPatchStep(AbstractStep):
- @classmethod
- def options(cls):
- return [
- CommandOptions.non_interactive,
- ]
-
- def run(self):
- log("Processing patch %s from bug %s." % (self._patch["id"], self._patch["bug_id"]))
- self._tool.scm().apply_patch(self._patch, force=self._options.non_interactive)
-
-
-class EnsureBuildersAreGreenStep(AbstractStep):
- @classmethod
- def options(cls):
- return [
- CommandOptions.check_builders,
- ]
-
- def run(self):
- if not self._options.check_builders:
- return
- red_builders_names = self._tool.buildbot.red_core_builders_names()
- if not red_builders_names:
- return
- red_builders_names = map(lambda name: "\"%s\"" % name, red_builders_names) # Add quotes around the names.
- error("Builders [%s] are red, please do not commit.\nSee http://%s.\nPass --ignore-builders to bypass this check." % (", ".join(red_builders_names), self._tool.buildbot.buildbot_host))
-
-
-class BuildStep(AbstractStep):
- @classmethod
- def options(cls):
- return [
- CommandOptions.build,
- CommandOptions.quiet,
- ]
-
- def run(self):
- if not self._options.build:
- return
- log("Building WebKit")
- self._tool.executive.run_and_throw_if_fail(self.port().build_webkit_command(), self._options.quiet)
-
-
-class CheckStyleStep(AbstractStep):
- def run(self):
- self._run_script("check-webkit-style")
-
-
-class RunTestsStep(AbstractStep):
- @classmethod
- def options(cls):
- return [
- CommandOptions.build,
- CommandOptions.test,
- CommandOptions.non_interactive,
- CommandOptions.quiet,
- CommandOptions.port,
- ]
-
- def run(self):
- if not self._options.build:
- return
- if not self._options.test:
- return
- args = self.port().run_webkit_tests_command()
- if self._options.non_interactive:
- args.append("--no-launch-safari")
- args.append("--exit-after-n-failures=1")
- if self._options.quiet:
- args.append("--quiet")
- self._tool.executive.run_and_throw_if_fail(args)
-
-
-class CommitStep(AbstractStep):
- def run(self):
- commit_message = self._tool.scm().commit_message_for_this_commit()
- return self._tool.scm().commit_with_message(commit_message.message())
-
-
-class ClosePatchStep(AbstractStep):
- def run(self, commit_log):
- comment_text = bug_comment_from_commit_text(self._tool.scm(), commit_log)
- self._tool.bugs.clear_attachment_flags(self._patch["id"], comment_text)
-
-
-class CloseBugStep(AbstractStep):
- @classmethod
- def options(cls):
- return [
- CommandOptions.close_bug,
- ]
-
- def run(self):
- if not self._options.close_bug:
- return
- # Check to make sure there are no r? or r+ patches on the bug before closing.
- # Assume that r- patches are just previous patches someone forgot to obsolete.
- patches = self._tool.bugs.fetch_patches_from_bug(self._patch["bug_id"])
- for patch in patches:
- review_flag = patch.get("review")
- if review_flag == "?" or review_flag == "+":
- log("Not closing bug %s as attachment %s has review=%s. Assuming there are more patches to land from this bug." % (patch["bug_id"], patch["id"], review_flag))
- return
- self._tool.bugs.close_bug_as_fixed(self._patch["bug_id"], "All reviewed patches have been landed. Closing bug.")
-
-
-# FIXME: This class is a dinosaur and should be extinct soon.
-class BuildSteps:
- # FIXME: The options should really live on each "Step" object.
- @staticmethod
- def cleaning_options():
- return [
- CommandOptions.force_clean,
- CommandOptions.clean,
- ]
-
- # FIXME: These distinctions are bogus. We need a better model for handling options.
- @staticmethod
- def build_options():
- return [
- CommandOptions.check_builders,
- CommandOptions.quiet,
- CommandOptions.non_interactive,
- CommandOptions.parent_command,
- CommandOptions.port,
- ]
-
- @staticmethod
- def land_options():
- return [
- CommandOptions.update,
- CommandOptions.build,
- CommandOptions.test,
- CommandOptions.close_bug,
- ]
-
diff --git a/WebKitTools/Scripts/modules/commands/download.py b/WebKitTools/Scripts/modules/commands/download.py
deleted file mode 100644
index 2acd69f..0000000
--- a/WebKitTools/Scripts/modules/commands/download.py
+++ /dev/null
@@ -1,370 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2009, Google Inc. All rights reserved.
-# Copyright (c) 2009 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:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import os
-
-from optparse import make_option
-
-from modules.bugzilla import parse_bug_id
-from modules.buildsteps import CommandOptions, BuildSteps, EnsureBuildersAreGreenStep, CleanWorkingDirectoryStep, UpdateStep, ApplyPatchStep, BuildStep, CheckStyleStep, PrepareChangelogStep
-from modules.changelogs import ChangeLog
-from modules.comments import bug_comment_from_commit_text
-from modules.executive import ScriptError
-from modules.grammar import pluralize
-from modules.landingsequence import LandingSequence
-from modules.logging import error, log
-from modules.multicommandtool import Command
-from modules.stepsequence import StepSequence
-
-
-class Build(Command):
- name = "build"
- show_in_main_help = False
- def __init__(self):
- self._sequence = StepSequence([
- CleanWorkingDirectoryStep,
- UpdateStep,
- BuildStep
- ])
- Command.__init__(self, "Update working copy and build", "", self._sequence.options())
-
- def execute(self, options, args, tool):
- self._sequence.run_and_handle_errors(tool, options)
-
-
-class ApplyAttachment(Command):
- name = "apply-attachment"
- show_in_main_help = True
- def __init__(self):
- options = WebKitApplyingScripts.apply_options()
- options += BuildSteps.cleaning_options()
- Command.__init__(self, "Apply an attachment to the local working directory", "ATTACHMENT_ID", options=options)
-
- def execute(self, options, args, tool):
- WebKitApplyingScripts.setup_for_patch_apply(tool, options)
- attachment_id = args[0]
- attachment = tool.bugs.fetch_attachment(attachment_id)
- WebKitApplyingScripts.apply_patches_with_options(tool.scm(), [attachment], options)
-
-
-class ApplyPatches(Command):
- name = "apply-patches"
- show_in_main_help = True
- def __init__(self):
- options = WebKitApplyingScripts.apply_options()
- options += BuildSteps.cleaning_options()
- Command.__init__(self, "Apply reviewed patches from provided bugs to the local working directory", "BUGID", options=options)
-
- def execute(self, options, args, tool):
- WebKitApplyingScripts.setup_for_patch_apply(tool, options)
- bug_id = args[0]
- patches = tool.bugs.fetch_reviewed_patches_from_bug(bug_id)
- WebKitApplyingScripts.apply_patches_with_options(tool.scm(), patches, options)
-
-
-class WebKitApplyingScripts:
- @staticmethod
- def apply_options():
- return [
- make_option("--no-update", action="store_false", dest="update", default=True, help="Don't update the working directory before applying patches"),
- make_option("--local-commit", action="store_true", dest="local_commit", default=False, help="Make a local commit for each applied patch"),
- CommandOptions.port,
- ]
-
- @staticmethod
- def setup_for_patch_apply(tool, options):
- clean_step = CleanWorkingDirectoryStep(tool, options, allow_local_commits=True)
- clean_step.run()
- update_step = UpdateStep(tool, options)
- update_step.run()
-
- @staticmethod
- def apply_patches_with_options(scm, patches, options):
- if options.local_commit and not scm.supports_local_commits():
- error("--local-commit passed, but %s does not support local commits" % scm.display_name())
-
- for patch in patches:
- log("Applying attachment %s from bug %s" % (patch["id"], patch["bug_id"]))
- scm.apply_patch(patch)
- if options.local_commit:
- commit_message = scm.commit_message_for_this_commit()
- scm.commit_locally_with_message(commit_message.message() or patch["name"])
-
-
-class LandDiffSequence(LandingSequence):
- def run(self):
- self.check_builders()
- self.build()
- self.test()
- commit_log = self.commit()
- self.close_bug(commit_log)
-
- def close_bug(self, commit_log):
- comment_test = bug_comment_from_commit_text(self._tool.scm(), commit_log)
- bug_id = self._patch["bug_id"]
- if bug_id:
- log("Updating bug %s" % bug_id)
- if self._options.close_bug:
- self._tool.bugs.close_bug_as_fixed(bug_id, comment_test)
- else:
- # FIXME: We should a smart way to figure out if the patch is attached
- # to the bug, and if so obsolete it.
- self._tool.bugs.post_comment_to_bug(bug_id, comment_test)
- else:
- log(comment_test)
- log("No bug id provided.")
-
-
-class LandDiff(Command):
- name = "land-diff"
- show_in_main_help = True
- def __init__(self):
- options = [
- make_option("-r", "--reviewer", action="store", type="string", dest="reviewer", help="Update ChangeLogs to say Reviewed by REVIEWER."),
- ]
- options += BuildSteps.build_options()
- options += BuildSteps.land_options()
- Command.__init__(self, "Land the current working directory diff and updates the associated bug if any", "[BUGID]", options=options)
-
- def guess_reviewer_from_bug(self, bugs, bug_id):
- patches = bugs.fetch_reviewed_patches_from_bug(bug_id)
- if len(patches) != 1:
- log("%s on bug %s, cannot infer reviewer." % (pluralize("reviewed patch", len(patches)), bug_id))
- return None
- patch = patches[0]
- reviewer = patch["reviewer"]
- log("Guessing \"%s\" as reviewer from attachment %s on bug %s." % (reviewer, patch["id"], bug_id))
- return reviewer
-
- def update_changelogs_with_reviewer(self, reviewer, bug_id, tool):
- if not reviewer:
- if not bug_id:
- log("No bug id provided and --reviewer= not provided. Not updating ChangeLogs with reviewer.")
- return
- reviewer = self.guess_reviewer_from_bug(tool.bugs, bug_id)
-
- if not reviewer:
- log("Failed to guess reviewer from bug %s and --reviewer= not provided. Not updating ChangeLogs with reviewer." % bug_id)
- return
-
- for changelog_path in tool.scm().modified_changelogs():
- ChangeLog(changelog_path).set_reviewer(reviewer)
-
- def execute(self, options, args, tool):
- bug_id = (args and args[0]) or parse_bug_id(tool.scm().create_patch())
-
- EnsureBuildersAreGreenStep(tool, options).run()
-
- os.chdir(tool.scm().checkout_root)
- self.update_changelogs_with_reviewer(options.reviewer, bug_id, tool)
-
- fake_patch = {
- "id": None,
- "bug_id": bug_id
- }
-
- sequence = LandDiffSequence(fake_patch, options, tool)
- sequence.run()
-
-
-class AbstractPatchProcessingCommand(Command):
- def __init__(self, help_text, args_description, options):
- Command.__init__(self, help_text, args_description, options=options)
-
- def _fetch_list_of_patches_to_process(self, options, args, tool):
- raise NotImplementedError, "subclasses must implement"
-
- def _prepare_to_process(self, options, args, tool):
- raise NotImplementedError, "subclasses must implement"
-
- @staticmethod
- def _collect_patches_by_bug(patches):
- bugs_to_patches = {}
- for patch in patches:
- bug_id = patch["bug_id"]
- bugs_to_patches[bug_id] = bugs_to_patches.get(bug_id, []) + [patch]
- return bugs_to_patches
-
- def execute(self, options, args, tool):
- self._prepare_to_process(options, args, tool)
- patches = self._fetch_list_of_patches_to_process(options, args, tool)
-
- # It's nice to print out total statistics.
- bugs_to_patches = self._collect_patches_by_bug(patches)
- log("Processing %s from %s." % (pluralize("patch", len(patches)), pluralize("bug", len(bugs_to_patches))))
-
- for patch in patches:
- self._process_patch(patch, options, args, tool)
-
-
-class CheckStyle(AbstractPatchProcessingCommand):
- name = "check-style"
- show_in_main_help = False
- def __init__(self):
- self._sequence = StepSequence([
- CleanWorkingDirectoryStep,
- UpdateStep,
- ApplyPatchStep,
- CheckStyleStep,
- ])
- AbstractPatchProcessingCommand.__init__(self, "Run check-webkit-style on the specified attachments", "ATTACHMENT_ID [ATTACHMENT_IDS]", self._sequence.options())
-
- def _fetch_list_of_patches_to_process(self, options, args, tool):
- return map(lambda patch_id: tool.bugs.fetch_attachment(patch_id), args)
-
- def _prepare_to_process(self, options, args, tool):
- pass
-
- def _process_patch(self, patch, options, args, tool):
- self._sequence.run_and_handle_errors(tool, options, patch)
-
-
-class BuildAttachment(AbstractPatchProcessingCommand):
- name = "build-attachment"
- show_in_main_help = False
- def __init__(self):
- self._sequence = StepSequence([
- CleanWorkingDirectoryStep,
- UpdateStep,
- ApplyPatchStep,
- BuildStep,
- ])
- AbstractPatchProcessingCommand.__init__(self, "Apply and build patches from bugzilla", "ATTACHMENT_ID [ATTACHMENT_IDS]", self._sequence.options())
-
- def _fetch_list_of_patches_to_process(self, options, args, tool):
- return map(lambda patch_id: tool.bugs.fetch_attachment(patch_id), args)
-
- def _prepare_to_process(self, options, args, tool):
- pass
-
- def _process_patch(self, patch, options, args, tool):
- self._sequence.run_and_handle_errors(tool, options, patch)
-
-
-class AbstractPatchLandingCommand(AbstractPatchProcessingCommand):
- def __init__(self, help_text, args_description):
- options = BuildSteps.cleaning_options()
- options += BuildSteps.build_options()
- options += BuildSteps.land_options()
- AbstractPatchProcessingCommand.__init__(self, help_text, args_description, options)
-
- def _prepare_to_process(self, options, args, tool):
- # Check the tree status first so we can fail early.
- EnsureBuildersAreGreenStep(tool, options).run()
-
- def _process_patch(self, patch, options, args, tool):
- sequence = LandingSequence(patch, options, tool)
- sequence.run_and_handle_errors()
-
-
-class LandAttachment(AbstractPatchLandingCommand):
- name = "land-attachment"
- show_in_main_help = True
- def __init__(self):
- AbstractPatchLandingCommand.__init__(self, "Land patches from bugzilla, optionally building and testing them first", "ATTACHMENT_ID [ATTACHMENT_IDS]")
-
- def _fetch_list_of_patches_to_process(self, options, args, tool):
- return map(lambda patch_id: tool.bugs.fetch_attachment(patch_id), args)
-
-
-class LandPatches(AbstractPatchLandingCommand):
- name = "land-patches"
- show_in_main_help = True
- def __init__(self):
- AbstractPatchLandingCommand.__init__(self, "Land all patches on the given bugs, optionally building and testing them first", "BUGID [BUGIDS]")
-
- def _fetch_list_of_patches_to_process(self, options, args, tool):
- all_patches = []
- for bug_id in args:
- patches = tool.bugs.fetch_reviewed_patches_from_bug(bug_id)
- log("%s found on bug %s." % (pluralize("reviewed patch", len(patches)), bug_id))
- all_patches += patches
- return all_patches
-
-
-# FIXME: Requires unit test.
-class Rollout(Command):
- name = "rollout"
- show_in_main_help = True
- def __init__(self):
- options = BuildSteps.cleaning_options()
- options += BuildSteps.build_options()
- options += BuildSteps.land_options()
- options.append(make_option("--complete-rollout", action="store_true", dest="complete_rollout", help="Commit the revert and re-open the original bug."))
- Command.__init__(self, "Revert the given revision in the working copy and optionally commit the revert and re-open the original bug", "REVISION [BUGID]", options=options)
-
- @staticmethod
- def _create_changelogs_for_revert(tool, revision):
- # First, discard the ChangeLog changes from the rollout.
- changelog_paths = tool.scm().modified_changelogs()
- tool.scm().revert_files(changelog_paths)
-
- # Second, make new ChangeLog entries for this rollout.
- # This could move to prepare-ChangeLog by adding a --revert= option.
- PrepareChangelogStep(tool, None).run()
- for changelog_path in changelog_paths:
- ChangeLog(changelog_path).update_for_revert(revision)
-
- @staticmethod
- def _parse_bug_id_from_revision_diff(tool, revision):
- original_diff = tool.scm().diff_for_revision(revision)
- return parse_bug_id(original_diff)
-
- @staticmethod
- def _reopen_bug_after_rollout(tool, bug_id, comment_text):
- if bug_id:
- tool.bugs.reopen_bug(bug_id, comment_text)
- else:
- log(comment_text)
- log("No bugs were updated or re-opened to reflect this rollout.")
-
- def execute(self, options, args, tool):
- revision = args[0]
- bug_id = self._parse_bug_id_from_revision_diff(tool, revision)
- if options.complete_rollout:
- if bug_id:
- log("Will re-open bug %s after rollout." % bug_id)
- else:
- log("Failed to parse bug number from diff. No bugs will be updated/reopened after the rollout.")
-
- CleanWorkingDirectoryStep(tool, options).run()
- UpdateStep(tool, options).run()
- tool.scm().apply_reverse_diff(revision)
- self._create_changelogs_for_revert(tool, revision)
-
- # FIXME: Fully automated rollout is not 100% idiot-proof yet, so for now just log with instructions on how to complete the rollout.
- # Once we trust rollout we will remove this option.
- if not options.complete_rollout:
- log("\nNOTE: Rollout support is experimental.\nPlease verify the rollout diff and use \"bugzilla-tool land-diff %s\" to commit the rollout." % bug_id)
- else:
- # FIXME: This function does not exist!!
- # comment_text = WebKitLandingScripts.build_and_commit(tool.scm(), options)
- raise ScriptError("OOPS! This option is not implemented (yet).")
- self._reopen_bug_after_rollout(tool, bug_id, comment_text)
diff --git a/WebKitTools/Scripts/modules/commands/download_unittest.py b/WebKitTools/Scripts/modules/commands/download_unittest.py
deleted file mode 100644
index a1ed41a..0000000
--- a/WebKitTools/Scripts/modules/commands/download_unittest.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import unittest
-
-from modules.commands.commandtest import CommandsTest
-from modules.commands.download import *
-from modules.mock import Mock
-
-class DownloadCommandsTest(CommandsTest):
- def _default_options(self):
- options = Mock()
- options.force_clean = False
- options.clean = True
- options.check_builders = True
- options.quiet = False
- options.non_interactive = False
- options.update = True
- options.build = True
- options.test = True
- options.close_bug = True
- return options
-
- def test_build(self):
- self.assert_execute_outputs(Build(), [], options=self._default_options())
-
- def test_apply_attachment(self):
- options = self._default_options()
- options.update = True
- options.local_commit = True
- self.assert_execute_outputs(ApplyAttachment(), [197], options=options)
-
- def test_apply_patches(self):
- options = self._default_options()
- options.update = True
- options.local_commit = True
- self.assert_execute_outputs(ApplyPatches(), [42], options=options)
-
- def test_land_diff(self):
- self.assert_execute_outputs(LandDiff(), [42], options=self._default_options())
-
- def test_check_style(self):
- self.assert_execute_outputs(CheckStyle(), [197], options=self._default_options())
-
- def test_build_attachment(self):
- self.assert_execute_outputs(BuildAttachment(), [197], options=self._default_options())
-
- def test_land_attachment(self):
- self.assert_execute_outputs(LandAttachment(), [197], options=self._default_options())
-
- def test_land_patches(self):
- self.assert_execute_outputs(LandPatches(), [42], options=self._default_options())
diff --git a/WebKitTools/Scripts/modules/commands/queues.py b/WebKitTools/Scripts/modules/commands/queues.py
deleted file mode 100644
index 53b9e48..0000000
--- a/WebKitTools/Scripts/modules/commands/queues.py
+++ /dev/null
@@ -1,216 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2009, Google Inc. All rights reserved.
-# Copyright (c) 2009 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:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import re
-
-from datetime import datetime
-from optparse import make_option
-
-from modules.executive import ScriptError
-from modules.grammar import pluralize
-from modules.landingsequence import LandingSequence, LandingSequenceErrorHandler
-from modules.logging import error, log
-from modules.multicommandtool import Command
-from modules.patchcollection import PersistentPatchCollection, PersistentPatchCollectionDelegate
-from modules.statusbot import StatusBot
-from modules.workqueue import WorkQueue, WorkQueueDelegate
-
-class AbstractQueue(Command, WorkQueueDelegate):
- show_in_main_help = False
- watchers = "webkit-bot-watchers@googlegroups.com"
- def __init__(self, options=None): # Default values should never be collections (like []) as default values are shared between invocations
- options_list = (options or []) + [
- make_option("--no-confirm", action="store_false", dest="confirm", default=True, help="Do not ask the user for confirmation before running the queue. Dangerous!"),
- make_option("--status-host", action="store", type="string", dest="status_host", default=StatusBot.default_host, help="Hostname (e.g. localhost or commit.webkit.org) where status updates should be posted."),
- ]
- Command.__init__(self, "Run the %s" % self.name, options=options_list)
-
- def _cc_watchers(self, bug_id):
- try:
- self.tool.bugs.add_cc_to_bug(bug_id, self.watchers)
- except Exception, e:
- log("Failed to CC watchers: %s." % e)
-
- def queue_log_path(self):
- return "%s.log" % self.name
-
- def work_logs_directory(self):
- return "%s-logs" % self.name
-
- def status_host(self):
- return self.options.status_host
-
- def begin_work_queue(self):
- log("CAUTION: %s will discard all local changes in %s" % (self.name, self.tool.scm().checkout_root))
- if self.options.confirm:
- response = raw_input("Are you sure? Type \"yes\" to continue: ")
- if (response != "yes"):
- error("User declined.")
- log("Running WebKit %s. %s" % (self.name, datetime.now().strftime(WorkQueue.log_date_format)))
-
- def should_continue_work_queue(self):
- return True
-
- def next_work_item(self):
- raise NotImplementedError, "subclasses must implement"
-
- def should_proceed_with_work_item(self, work_item):
- raise NotImplementedError, "subclasses must implement"
-
- def process_work_item(self, work_item):
- raise NotImplementedError, "subclasses must implement"
-
- def handle_unexpected_error(self, work_item, message):
- raise NotImplementedError, "subclasses must implement"
-
- def run_bugzilla_tool(self, args):
- bugzilla_tool_args = [self.tool.path()] + map(str, args)
- self.tool.executive.run_and_throw_if_fail(bugzilla_tool_args)
-
- def log_progress(self, patch_ids):
- log("%s in %s [%s]" % (pluralize("patch", len(patch_ids)), self.name, ", ".join(map(str, patch_ids))))
-
- def execute(self, options, args, tool):
- self.options = options
- self.tool = tool
- work_queue = WorkQueue(self.name, self)
- return work_queue.run()
-
-
-class CommitQueue(AbstractQueue, LandingSequenceErrorHandler):
- name = "commit-queue"
- def __init__(self):
- AbstractQueue.__init__(self)
-
- # AbstractQueue methods
-
- def begin_work_queue(self):
- AbstractQueue.begin_work_queue(self)
-
- def next_work_item(self):
- patches = self.tool.bugs.fetch_patches_from_commit_queue(reject_invalid_patches=True)
- if not patches:
- return None
- # Only bother logging if we have patches in the queue.
- self.log_progress([patch['id'] for patch in patches])
- return patches[0]
-
- def should_proceed_with_work_item(self, patch):
- red_builders_names = self.tool.buildbot.red_core_builders_names()
- if red_builders_names:
- red_builders_names = map(lambda name: "\"%s\"" % name, red_builders_names) # Add quotes around the names.
- return (False, "Builders [%s] are red. See http://build.webkit.org." % ", ".join(red_builders_names), None)
- return (True, "Landing patch %s from bug %s." % (patch["id"], patch["bug_id"]), patch)
-
- def process_work_item(self, patch):
- self._cc_watchers(patch["bug_id"])
- self.run_bugzilla_tool(["land-attachment", "--force-clean", "--non-interactive", "--parent-command=commit-queue", "--quiet", patch["id"]])
-
- def handle_unexpected_error(self, patch, message):
- self.tool.bugs.reject_patch_from_commit_queue(patch["id"], message)
-
- # LandingSequenceErrorHandler methods
-
- @classmethod
- def handle_script_error(cls, tool, patch, script_error):
- tool.bugs.reject_patch_from_commit_queue(patch["id"], script_error.message_with_output())
-
-
-class AbstractReviewQueue(AbstractQueue, PersistentPatchCollectionDelegate, LandingSequenceErrorHandler):
- def __init__(self, options=None):
- AbstractQueue.__init__(self, options)
-
- # PersistentPatchCollectionDelegate methods
-
- def collection_name(self):
- return self.name
-
- def fetch_potential_patch_ids(self):
- return self.tool.bugs.fetch_attachment_ids_from_review_queue()
-
- def status_server(self):
- return self.tool.status()
-
- # AbstractQueue methods
-
- def begin_work_queue(self):
- AbstractQueue.begin_work_queue(self)
- self.tool.status().set_host(self.options.status_host)
- self._patches = PersistentPatchCollection(self)
-
- def next_work_item(self):
- patch_id = self._patches.next()
- if patch_id:
- return self.tool.bugs.fetch_attachment(patch_id)
-
- def should_proceed_with_work_item(self, patch):
- raise NotImplementedError, "subclasses must implement"
-
- def process_work_item(self, patch):
- raise NotImplementedError, "subclasses must implement"
-
- def handle_unexpected_error(self, patch, message):
- log(message)
-
- # LandingSequenceErrorHandler methods
-
- @classmethod
- def handle_script_error(cls, tool, patch, script_error):
- log(script_error.message_with_output())
-
-
-class StyleQueue(AbstractReviewQueue):
- name = "style-queue"
- def __init__(self):
- AbstractReviewQueue.__init__(self)
-
- def should_proceed_with_work_item(self, patch):
- return (True, "Checking style for patch %s on bug %s." % (patch["id"], patch["bug_id"]), patch)
-
- def process_work_item(self, patch):
- try:
- self.run_bugzilla_tool(["check-style", "--force-clean", "--non-interactive", "--parent-command=style-queue", patch["id"]])
- message = "%s ran check-webkit-style on attachment %s without any errors." % (self.name, patch["id"])
- self.tool.bugs.post_comment_to_bug(patch["bug_id"], message, cc=self.watchers)
- self._patches.did_pass(patch)
- except ScriptError, e:
- self._patches.did_fail(patch)
- raise e
-
- @classmethod
- def handle_script_error(cls, tool, patch, script_error):
- command = script_error.script_args
- if type(command) is list:
- command = command[0]
- # FIXME: We shouldn't need to use a regexp here. ScriptError should
- # have a better API.
- if re.search("check-webkit-style", command):
- message = "Attachment %s did not pass %s:\n\n%s" % (patch["id"], cls.name, script_error.message_with_output(output_limit=5*1024))
- tool.bugs.post_comment_to_bug(patch["bug_id"], message, cc=cls.watchers)
diff --git a/WebKitTools/Scripts/modules/commands/queues_unittest.py b/WebKitTools/Scripts/modules/commands/queues_unittest.py
deleted file mode 100644
index 75abbe5..0000000
--- a/WebKitTools/Scripts/modules/commands/queues_unittest.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import unittest
-
-from modules.commands.commandtest import CommandsTest
-from modules.commands.queues import *
-from modules.mock_bugzillatool import MockBugzillaTool
-from modules.outputcapture import OutputCapture
-
-
-class TestQueue(AbstractQueue):
- name = "test-queue"
-
-
-class AbstractQueueTest(CommandsTest):
- def _assert_output(self, function, args, expected_stdout="", expected_stderr=""):
- capture = OutputCapture()
- capture.capture_output()
- function(*args)
- (stdout_string, stderr_string) = capture.restore_output()
- self.assertEqual(stdout_string, expected_stdout)
- self.assertEqual(stderr_string, expected_stderr)
-
- def _assert_log_progress_output(self, patch_ids, progress_output):
- self._assert_output(TestQueue().log_progress, [patch_ids], expected_stderr=progress_output)
-
- def test_log_progress(self):
- self._assert_log_progress_output([1,2,3], "3 patches in test-queue [1, 2, 3]\n")
- self._assert_log_progress_output(["1","2","3"], "3 patches in test-queue [1, 2, 3]\n")
- self._assert_log_progress_output([1], "1 patch in test-queue [1]\n")
-
- def _assert_run_bugzilla_tool_output(self, run_args, tool_output):
- queue = TestQueue()
- queue.bind_to_tool(MockBugzillaTool())
- # MockBugzillaTool.path() is "echo"
- self._assert_output(queue.run_bugzilla_tool, [run_args], expected_stdout=tool_output)
-
- def test_run_bugzilla_tool(self):
- self._assert_run_bugzilla_tool_output([1], "")
- self._assert_run_bugzilla_tool_output(["one", 2], "")
diff --git a/WebKitTools/Scripts/modules/commands/upload.py b/WebKitTools/Scripts/modules/commands/upload.py
deleted file mode 100644
index 1f892a1..0000000
--- a/WebKitTools/Scripts/modules/commands/upload.py
+++ /dev/null
@@ -1,246 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2009, Google Inc. All rights reserved.
-# Copyright (c) 2009 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:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import os
-import StringIO
-import sys
-
-from optparse import make_option
-
-from modules.bugzilla import parse_bug_id
-from modules.grammar import pluralize
-from modules.logging import error, log
-from modules.multicommandtool import Command
-
-# FIXME: Requires unit test.
-class CommitMessageForCurrentDiff(Command):
- name = "commit-message"
- show_in_main_help = False
- def __init__(self):
- Command.__init__(self, "Print a commit message suitable for the uncommitted changes")
-
- def execute(self, options, args, tool):
- os.chdir(tool.scm().checkout_root)
- print "%s" % tool.scm().commit_message_for_this_commit().message()
-
-
-class ObsoleteAttachments(Command):
- name = "obsolete-attachments"
- show_in_main_help = False
- def __init__(self):
- Command.__init__(self, "Mark all attachments on a bug as obsolete", "BUGID")
-
- def execute(self, options, args, tool):
- bug_id = args[0]
- attachments = tool.bugs.fetch_attachments_from_bug(bug_id)
- for attachment in attachments:
- if not attachment["is_obsolete"]:
- tool.bugs.obsolete_attachment(attachment["id"])
-
-
-class PostDiff(Command):
- name = "post-diff"
- show_in_main_help = True
- def __init__(self):
- options = [
- make_option("-m", "--description", action="store", type="string", dest="description", help="Description string for the attachment (default: \"patch\")"),
- ]
- options += self.posting_options()
- Command.__init__(self, "Attach the current working directory diff to a bug as a patch file", "[BUGID]", options=options)
-
- @staticmethod
- def posting_options():
- return [
- make_option("--no-obsolete", action="store_false", dest="obsolete_patches", default=True, help="Do not obsolete old patches before posting this one."),
- make_option("--no-review", action="store_false", dest="review", default=True, help="Do not mark the patch for review."),
- make_option("--request-commit", action="store_true", dest="request_commit", default=False, help="Mark the patch as needing auto-commit after review."),
- ]
-
- @staticmethod
- def obsolete_patches_on_bug(bug_id, bugs):
- patches = bugs.fetch_patches_from_bug(bug_id)
- if len(patches):
- log("Obsoleting %s on bug %s" % (pluralize("old patch", len(patches)), bug_id))
- for patch in patches:
- bugs.obsolete_attachment(patch["id"])
-
- def execute(self, options, args, tool):
- # Perfer a bug id passed as an argument over a bug url in the diff (i.e. ChangeLogs).
- bug_id = (args and args[0]) or parse_bug_id(tool.scm().create_patch())
- if not bug_id:
- error("No bug id passed and no bug url found in diff, can't post.")
-
- if options.obsolete_patches:
- self.obsolete_patches_on_bug(bug_id, tool.bugs)
-
- diff = tool.scm().create_patch()
- diff_file = StringIO.StringIO(diff) # add_patch_to_bug expects a file-like object
-
- description = options.description or "Patch"
- tool.bugs.add_patch_to_bug(bug_id, diff_file, description, mark_for_review=options.review, mark_for_commit_queue=options.request_commit)
-
-
-class PostCommits(Command):
- name = "post-commits"
- show_in_main_help = True
- def __init__(self):
- options = [
- make_option("-b", "--bug-id", action="store", type="string", dest="bug_id", help="Specify bug id if no URL is provided in the commit log."),
- make_option("--add-log-as-comment", action="store_true", dest="add_log_as_comment", default=False, help="Add commit log message as a comment when uploading the patch."),
- make_option("-m", "--description", action="store", type="string", dest="description", help="Description string for the attachment (default: description from commit message)"),
- ]
- options += PostDiff.posting_options()
- Command.__init__(self, "Attach a range of local commits to bugs as patch files", "COMMITISH", options=options, requires_local_commits=True)
-
- def _comment_text_for_commit(self, options, commit_message, tool, commit_id):
- comment_text = None
- if (options.add_log_as_comment):
- comment_text = commit_message.body(lstrip=True)
- comment_text += "---\n"
- comment_text += tool.scm().files_changed_summary_for_commit(commit_id)
- return comment_text
-
- def _diff_file_for_commit(self, tool, commit_id):
- diff = tool.scm().create_patch_from_local_commit(commit_id)
- return StringIO.StringIO(diff) # add_patch_to_bug expects a file-like object
-
- def execute(self, options, args, tool):
- commit_ids = tool.scm().commit_ids_from_commitish_arguments(args)
- if len(commit_ids) > 10: # We could lower this limit, 10 is too many for one bug as-is.
- error("bugzilla-tool does not support attaching %s at once. Are you sure you passed the right commit range?" % (pluralize("patch", len(commit_ids))))
-
- have_obsoleted_patches = set()
- for commit_id in commit_ids:
- commit_message = tool.scm().commit_message_for_local_commit(commit_id)
-
- # Prefer --bug-id=, then a bug url in the commit message, then a bug url in the entire commit diff (i.e. ChangeLogs).
- bug_id = options.bug_id or parse_bug_id(commit_message.message()) or parse_bug_id(tool.scm().create_patch_from_local_commit(commit_id))
- if not bug_id:
- log("Skipping %s: No bug id found in commit or specified with --bug-id." % commit_id)
- continue
-
- if options.obsolete_patches and bug_id not in have_obsoleted_patches:
- PostDiff.obsolete_patches_on_bug(bug_id, tool.bugs)
- have_obsoleted_patches.add(bug_id)
-
- diff_file = self._diff_file_for_commit(tool, commit_id)
- description = options.description or commit_message.description(lstrip=True, strip_url=True)
- comment_text = self._comment_text_for_commit(options, commit_message, tool, commit_id)
- tool.bugs.add_patch_to_bug(bug_id, diff_file, description, comment_text, mark_for_review=options.review, mark_for_commit_queue=options.request_commit)
-
-
-class MarkFixed(Command):
- name = "mark-fixed"
- show_in_main_help = False
- def __init__(self):
- Command.__init__(self, "Mark the specified bug as fixed", "BUG_ID REASON")
-
- def execute(self, options, args, tool):
- tool.bugs.close_bug_as_fixed(args[0], args[1])
-
-
-# FIXME: Requires unit test. Blocking issue: too complex for now.
-class CreateBug(Command):
- name = "create-bug"
- show_in_main_help = True
- def __init__(self):
- options = [
- make_option("--cc", action="store", type="string", dest="cc", help="Comma-separated list of email addresses to carbon-copy."),
- make_option("--component", action="store", type="string", dest="component", help="Component for the new bug."),
- make_option("--no-prompt", action="store_false", dest="prompt", default=True, help="Do not prompt for bug title and comment; use commit log instead."),
- make_option("--no-review", action="store_false", dest="review", default=True, help="Do not mark the patch for review."),
- make_option("--request-commit", action="store_true", dest="request_commit", default=False, help="Mark the patch as needing auto-commit after review."),
- ]
- Command.__init__(self, "Create a bug from local changes or local commits", "[COMMITISH]", options=options)
-
- def create_bug_from_commit(self, options, args, tool):
- commit_ids = tool.scm().commit_ids_from_commitish_arguments(args)
- if len(commit_ids) > 3:
- error("Are you sure you want to create one bug with %s patches?" % len(commit_ids))
-
- commit_id = commit_ids[0]
-
- bug_title = ""
- comment_text = ""
- if options.prompt:
- (bug_title, comment_text) = self.prompt_for_bug_title_and_comment()
- else:
- commit_message = tool.scm().commit_message_for_local_commit(commit_id)
- bug_title = commit_message.description(lstrip=True, strip_url=True)
- comment_text = commit_message.body(lstrip=True)
- comment_text += "---\n"
- comment_text += tool.scm().files_changed_summary_for_commit(commit_id)
-
- diff = tool.scm().create_patch_from_local_commit(commit_id)
- diff_file = StringIO.StringIO(diff) # create_bug_with_patch expects a file-like object
- bug_id = tool.bugs.create_bug_with_patch(bug_title, comment_text, options.component, diff_file, "Patch", cc=options.cc, mark_for_review=options.review, mark_for_commit_queue=options.request_commit)
-
- if bug_id and len(commit_ids) > 1:
- options.bug_id = bug_id
- options.obsolete_patches = False
- # FIXME: We should pass through --no-comment switch as well.
- PostCommits.execute(self, options, commit_ids[1:], tool)
-
- def create_bug_from_patch(self, options, args, tool):
- bug_title = ""
- comment_text = ""
- if options.prompt:
- (bug_title, comment_text) = self.prompt_for_bug_title_and_comment()
- else:
- commit_message = tool.scm().commit_message_for_this_commit()
- bug_title = commit_message.description(lstrip=True, strip_url=True)
- comment_text = commit_message.body(lstrip=True)
-
- diff = tool.scm().create_patch()
- diff_file = StringIO.StringIO(diff) # create_bug_with_patch expects a file-like object
- bug_id = tool.bugs.create_bug_with_patch(bug_title, comment_text, options.component, diff_file, "Patch", cc=options.cc, mark_for_review=options.review, mark_for_commit_queue=options.request_commit)
-
- def prompt_for_bug_title_and_comment(self):
- bug_title = raw_input("Bug title: ")
- print "Bug comment (hit ^D on blank line to end):"
- lines = sys.stdin.readlines()
- try:
- sys.stdin.seek(0, os.SEEK_END)
- except IOError:
- # Cygwin raises an Illegal Seek (errno 29) exception when the above
- # seek() call is made. Ignoring it seems to cause no harm.
- # FIXME: Figure out a way to get avoid the exception in the first
- # place.
- pass
- comment_text = "".join(lines)
- return (bug_title, comment_text)
-
- def execute(self, options, args, tool):
- if len(args):
- if (not tool.scm().supports_local_commits()):
- error("Extra arguments not supported; patch is taken from working directory.")
- self.create_bug_from_commit(options, args, tool)
- else:
- self.create_bug_from_patch(options, args, tool)
diff --git a/WebKitTools/Scripts/modules/landingsequence.py b/WebKitTools/Scripts/modules/landingsequence.py
deleted file mode 100644
index 90683f4..0000000
--- a/WebKitTools/Scripts/modules/landingsequence.py
+++ /dev/null
@@ -1,113 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2009, Google Inc. All rights reserved.
-# Copyright (c) 2009 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:
-#
-# * 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.
-
-from modules.comments import bug_comment_from_commit_text
-from modules.executive import ScriptError
-from modules.logging import log
-from modules.scm import CheckoutNeedsUpdate
-from modules.webkitport import WebKitPort
-from modules.workqueue import WorkQueue
-from modules.buildsteps import CleanWorkingDirectoryStep, UpdateStep, ApplyPatchStep, EnsureBuildersAreGreenStep, BuildStep, RunTestsStep, CommitStep, ClosePatchStep, CloseBugStep
-
-
-class LandingSequenceErrorHandler():
- @classmethod
- def handle_script_error(cls, tool, patch, script_error):
- raise NotImplementedError, "subclasses must implement"
-
-# FIXME: This class is slowing being killed and replaced with StepSequence.
-class LandingSequence:
- def __init__(self, patch, options, tool):
- self._patch = patch
- self._options = options
- self._tool = tool
- self._port = WebKitPort.port(self._options.port)
-
- def run(self):
- self.clean()
- self.update()
- self.apply_patch()
- self.check_builders()
- self.build()
- self.test()
- commit_log = self.commit()
- self.close_patch(commit_log)
- self.close_bug()
-
- def run_and_handle_errors(self):
- try:
- self.run()
- except CheckoutNeedsUpdate, e:
- log("Commit failed because the checkout is out of date. Please update and try again.")
- log("You can pass --no-build to skip building/testing after update if you believe the new commits did not affect the results.")
- WorkQueue.exit_after_handled_error(e)
- except ScriptError, e:
- if not self._options.quiet:
- log(e.message_with_output())
- if self._options.parent_command:
- command = self._tool.command_by_name(self._options.parent_command)
- command.handle_script_error(self._tool, self._patch, e)
- WorkQueue.exit_after_handled_error(e)
-
- def clean(self):
- step = CleanWorkingDirectoryStep(self._tool, self._options)
- step.run()
-
- def update(self):
- step = UpdateStep(self._tool, self._options)
- step.run()
-
- def apply_patch(self):
- step = ApplyPatchStep(self._tool, self._options, self._patch)
- step.run()
-
- def check_builders(self):
- step = EnsureBuildersAreGreenStep(self._tool, self._options)
- step.run()
-
- def build(self):
- step = BuildStep(self._tool, self._options)
- step.run()
-
- def test(self):
- step = RunTestsStep(self._tool, self._options)
- step.run()
-
- def commit(self):
- step = CommitStep(self._tool, self._options)
- return step.run()
-
- def close_patch(self, commit_log):
- step = ClosePatchStep(self._tool, self._options, self._patch)
- step.run(commit_log)
-
- def close_bug(self):
- step = CloseBugStep(self._tool, self._options, self._patch)
- step.run()
diff --git a/WebKitTools/Scripts/modules/mock_bugzillatool.py b/WebKitTools/Scripts/modules/mock_bugzillatool.py
deleted file mode 100644
index e600947..0000000
--- a/WebKitTools/Scripts/modules/mock_bugzillatool.py
+++ /dev/null
@@ -1,153 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import os
-
-from modules.mock import Mock
-from modules.scm import CommitMessage
-
-
-class MockBugzilla(Mock):
- patch1 = {
- "id" : 197,
- "bug_id" : 42,
- "url" : "http://example.com/197",
- "is_obsolete" : False,
- "reviewer" : "Reviewer1",
- "attacher_email" : "Contributer1",
- }
- patch2 = {
- "id" : 128,
- "bug_id" : 42,
- "url" : "http://example.com/128",
- "is_obsolete" : False,
- "reviewer" : "Reviewer2",
- "attacher_email" : "Contributer2",
- }
- bug_server_url = "http://example.com"
-
- def fetch_bug_ids_from_commit_queue(self):
- return [42, 75]
-
- def fetch_attachment_ids_from_review_queue(self):
- return [197, 128]
-
- def fetch_patches_from_commit_queue(self):
- return [self.patch1, self.patch2]
-
- def fetch_patches_from_pending_commit_list(self):
- return [self.patch1, self.patch2]
-
- def fetch_reviewed_patches_from_bug(self, bug_id):
- if bug_id == 42:
- return [self.patch1, self.patch2]
- return None
-
- def fetch_attachments_from_bug(self, bug_id):
- if bug_id == 42:
- return [self.patch1, self.patch2]
- return None
-
- def fetch_patches_from_bug(self, bug_id):
- if bug_id == 42:
- return [self.patch1, self.patch2]
- return None
-
- def fetch_attachment(self, attachment_id):
- if attachment_id == 197:
- return self.patch1
- if attachment_id == 128:
- return self.patch2
- raise Exception("Bogus attachment_id in fetch_attachment.")
-
- def bug_url_for_bug_id(self, bug_id):
- return "%s/%s" % (self.bug_server_url, bug_id)
-
- def attachment_url_for_id(self, attachment_id, action):
- action_param = ""
- if action and action != "view":
- action_param = "&action=%s" % action
- return "%s/%s%s" % (self.bug_server_url, attachment_id, action_param)
-
-
-class MockBuildBot(Mock):
- def builder_statuses(self):
- return [{
- "name": "Builder1",
- "is_green": True
- }, {
- "name": "Builder2",
- "is_green": True
- }]
-
- def red_core_builders_names(self):
- return []
-
-class MockSCM(Mock):
- def __init__(self):
- Mock.__init__(self)
- self.checkout_root = os.getcwd()
-
- def create_patch(self):
- return "Patch1"
-
- def commit_ids_from_commitish_arguments(self, args):
- return ["Commitish1", "Commitish2"]
-
- def commit_message_for_local_commit(self, commit_id):
- if commit_id == "Commitish1":
- return CommitMessage("CommitMessage1\nhttps://bugs.example.org/show_bug.cgi?id=42\n")
- if commit_id == "Commitish2":
- return CommitMessage("CommitMessage2\nhttps://bugs.example.org/show_bug.cgi?id=75\n")
- raise Exception("Bogus commit_id in commit_message_for_local_commit.")
-
- def create_patch_from_local_commit(self, commit_id):
- if commit_id == "Commitish1":
- return "Patch1"
- if commit_id == "Commitish2":
- return "Patch2"
- raise Exception("Bogus commit_id in commit_message_for_local_commit.")
-
- def modified_changelogs(self):
- # Ideally we'd return something more interesting here.
- # The problem is that LandDiff will try to actually read the path from disk!
- return []
-
-
-class MockBugzillaTool():
- def __init__(self):
- self.bugs = MockBugzilla()
- self.buildbot = MockBuildBot()
- self.executive = Mock()
- self._scm = MockSCM()
-
- def scm(self):
- return self._scm
-
- def path(self):
- return "echo"
diff --git a/WebKitTools/Scripts/num-cpus b/WebKitTools/Scripts/num-cpus
index c5f28a1..ede9995 100755
--- a/WebKitTools/Scripts/num-cpus
+++ b/WebKitTools/Scripts/num-cpus
@@ -1,16 +1,3 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-use Win32API::Registry 0.21 qw( :ALL );
-
-
-my $key;
-my $i = 0;
-while (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\$i", 0, KEY_READ, $key)) {
- $i++;
- RegCloseKey($key);
-}
-
-print "$i\n";
+#!/bin/bash
+# Assumes cygwin.
+ls /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor | wc -w
diff --git a/WebKitTools/Scripts/pdevenv b/WebKitTools/Scripts/pdevenv
index cab8b16..4643728 100755
--- a/WebKitTools/Scripts/pdevenv
+++ b/WebKitTools/Scripts/pdevenv
@@ -32,13 +32,8 @@ print $fh "\@echo off\n\n";
print $fh "call \"\%" . $vsToolsVar . "\%\\vsvars32.bat\"\n\n";
print $fh "set PATH=$vcBin;$scriptsPath;\%PATH\%\n\n";
-my $useenv = "/useenv ";
-if (isChromium()) {
- $useenv = "";
-}
-
-print $fh "IF EXIST \"\%VSINSTALLDIR\%\\Common7\\IDE\\devenv.com\" (devenv.com " . $useenv . join(" ", @ARGV) . ") ELSE ";
-print $fh "VCExpress.exe " . $useenv . join(" ", @ARGV) . "\n";
+print $fh "IF EXIST \"\%VSINSTALLDIR\%\\Common7\\IDE\\devenv.com\" (devenv.com /useenv " . join(" ", @ARGV) . ") ELSE ";
+print $fh "VCExpress.exe /useenv " . join(" ", @ARGV) . "\n";
close $fh;
diff --git a/WebKitTools/Scripts/prepare-ChangeLog b/WebKitTools/Scripts/prepare-ChangeLog
index 4c59af9..3350aa3 100755
--- a/WebKitTools/Scripts/prepare-ChangeLog
+++ b/WebKitTools/Scripts/prepare-ChangeLog
@@ -257,7 +257,11 @@ if ($bugNumber) {
my $bugXMLURL = "$bugURL&ctype=xml";
# Perl has no built in XML processing, so we'll fetch and parse with curl and grep
my $descriptionLine = `curl --silent "$bugXMLURL" | grep short_desc`;
- $descriptionLine =~ /<short_desc>(.*)<\/short_desc>/;
+ if ($descriptionLine !~ /<short_desc>(.*)<\/short_desc>/) {
+ print STDERR " Bug $bugNumber has no bug description. Maybe you set wrong bug ID?\n";
+ print STDERR " The bug URL: $bugXMLURL\n";
+ exit 1;
+ }
$bugDescription = decodeEntities($1);
print STDERR " Description from bug $bugNumber:\n \"$bugDescription\".\n";
}
@@ -1606,6 +1610,7 @@ sub reviewerAndDescriptionForGitCommit($)
$description .= "\n" if $commitLogCount;
$commitLogCount++;
my $inHeader = 1;
+ my $commitLogIndent;
my @lines = split(/\n/, $commitLog);
shift @lines; # Remove initial blank line
foreach my $line (@lines) {
@@ -1620,11 +1625,18 @@ sub reviewerAndDescriptionForGitCommit($)
} else {
$reviewer .= ", " . $1;
}
- } elsif (length $line == 0) {
+ } elsif ($line =~ /^\s*$/) {
$description = $description . "\n";
} else {
- $line =~ s/^\s*//;
- $description = $description . " " . $line . "\n";
+ if (!defined($commitLogIndent)) {
+ # Let the first line with non-white space determine
+ # the global indent.
+ $line =~ /^(\s*)\S/;
+ $commitLogIndent = length($1);
+ }
+ # Strip at most the indent to preserve relative indents.
+ $line =~ s/^\s{0,$commitLogIndent}//;
+ $description = $description . (" " x 8) . $line . "\n";
}
}
}
diff --git a/WebKitTools/Scripts/rebaseline-chromium-webkit-tests b/WebKitTools/Scripts/rebaseline-chromium-webkit-tests
new file mode 100755
index 0000000..d22c0c4
--- /dev/null
+++ b/WebKitTools/Scripts/rebaseline-chromium-webkit-tests
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""Wrapper around webkitpy/layout_tests/rebaseline.py"""
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])),
+ "webkitpy", "layout_tests"))
+
+import rebaseline_chromium_webkit_tests
+
+if __name__ == '__main__':
+ rebaseline_chromium_webkit_tests.main()
diff --git a/WebKitTools/Scripts/run-chromium-webkit-tests b/WebKitTools/Scripts/run-chromium-webkit-tests
new file mode 100755
index 0000000..8712836
--- /dev/null
+++ b/WebKitTools/Scripts/run-chromium-webkit-tests
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""Wrapper around webkitpy/layout_tests/run-chromium-webkit-tests.py"""
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])),
+ "webkitpy", "layout_tests"))
+import run_chromium_webkit_tests
+
+if __name__ == '__main__':
+ options, args = run_chromium_webkit_tests.parse_args()
+ run_chromium_webkit_tests.main(options, args)
diff --git a/WebKitTools/Scripts/run-iexploder-tests b/WebKitTools/Scripts/run-iexploder-tests
index ed5ecd6..1b3976f 100755
--- a/WebKitTools/Scripts/run-iexploder-tests
+++ b/WebKitTools/Scripts/run-iexploder-tests
@@ -38,16 +38,17 @@ use Getopt::Long;
use IPC::Open2;
use lib $FindBin::Bin;
+use webkitperl::httpd;
use webkitdirs;
-sub openHTTPDIfNeeded();
-sub closeHTTPD();
+sub configureAndOpenHTTPDIfNeeded();
sub runSafariWithIExploder();
# Argument handling
my $guardMalloc = '';
my $httpdPort = 8000;
my $downloadTest;
+my $iExploderTestDirectory = "/tmp/iExploderTest";
GetOptions(
'guard-malloc|g' => \$guardMalloc,
@@ -63,8 +64,8 @@ chdirWebKit();
checkFrameworks();
-my $httpdOpen = 0;
-openHTTPDIfNeeded();
+my $isHttpdOpen = 0;
+configureAndOpenHTTPDIfNeeded();
if ($downloadTest) {
system "/usr/bin/curl -o ~/Desktop/iexploder$downloadTest.html \"http://127.0.0.1:$httpdPort/iexploder.cgi?lookup=1&test=$downloadTest\"";
@@ -72,11 +73,11 @@ if ($downloadTest) {
} else {
runSafariWithIExploder();
print "Last generated tests:\n";
- system "grep 'iexploder.cgi' /tmp/WebKit/access_log.txt | tail -n -5 | awk -F'[ =&\\?]' '{if (\$8 == \"lookup\") print \$11; else print \$9}'";
+ system "grep 'iexploder.cgi' $iExploderTestDirectory/access_log.txt | tail -n -5 | awk -F'[ =&\\?]' '{if (\$8 == \"lookup\") print \$11; else print \$9}'";
}
-closeHTTPD();
-
+rmtree $iExploderTestDirectory;
+$isHttpdOpen = !closeHTTPD();
sub runSafariWithIExploder()
{
@@ -87,7 +88,7 @@ sub runSafariWithIExploder()
$redirectTo = "http://127.0.0.1:$httpdPort/index.html";
}
- open REDIRECT_HTML, ">", "/tmp/WebKit/redirect.html" or die;
+ open REDIRECT_HTML, ">", "$iExploderTestDirectory/redirect.html" or die;
print REDIRECT_HTML "<html>\n";
print REDIRECT_HTML " <head>\n";
print REDIRECT_HTML " <meta http-equiv=\"refresh\" content=\"1;URL=$redirectTo\" />\n";
@@ -102,35 +103,17 @@ sub runSafariWithIExploder()
local %ENV;
$ENV{DYLD_INSERT_LIBRARIES} = "/usr/lib/libgmalloc.dylib" if $guardMalloc;
- system "WebKitTools/Scripts/run-safari", "-NSOpen", "/tmp/WebKit/redirect.html";
+ system "WebKitTools/Scripts/run-safari", "-NSOpen", "$iExploderTestDirectory/redirect.html";
}
-sub openHTTPDIfNeeded()
+sub configureAndOpenHTTPDIfNeeded()
{
- return if $httpdOpen;
-
- mkdir "/tmp/WebKit";
-
- if (-f "/tmp/WebKit/httpd.pid") {
- my $oldPid = `cat /tmp/WebKit/httpd.pid`;
- chomp $oldPid;
- if (0 != kill 0, $oldPid) {
- print "\nhttpd is already running: pid $oldPid, killing...\n";
- kill 15, $oldPid;
-
- my $retryCount = 20;
- while ((0 != kill 0, $oldPid) && $retryCount) {
- sleep 1;
- --$retryCount;
- }
-
- die "Timed out waiting for httpd to quit" unless $retryCount;
- }
- }
-
- my $testDirectory = getcwd() . "/LayoutTests";
- my $iExploderDirectory = getcwd() . "/WebKitTools/iExploder";
- my $httpdPath = "/usr/sbin/httpd";
+ return if $isHttpdOpen;
+ mkdir $iExploderTestDirectory;
+ my $httpdPath = getHTTPDPath();
+ my $webkitDirectory = getcwd();
+ my $testDirectory = $webkitDirectory . "/LayoutTests";
+ my $iExploderDirectory = $webkitDirectory . "/WebKitTools/iExploder";
my $httpdConfig = "$testDirectory/http/conf/httpd.conf";
$httpdConfig = "$testDirectory/http/conf/apache2-httpd.conf" if `$httpdPath -v` =~ m|Apache/2|;
my $documentRoot = "$iExploderDirectory/htdocs";
@@ -138,36 +121,18 @@ sub openHTTPDIfNeeded()
my $sslCertificate = "$testDirectory/http/conf/webkit-httpd.pem";
my $listen = "127.0.0.1:$httpdPort";
- open2(\*HTTPDIN, \*HTTPDOUT, $httpdPath,
+
+ my @args = (
"-f", "$httpdConfig",
"-C", "DocumentRoot \"$documentRoot\"",
"-C", "Listen $listen",
"-c", "TypesConfig \"$typesConfig\"",
- "-c", "CustomLog \"/tmp/WebKit/access_log.txt\" common",
- "-c", "ErrorLog \"/tmp/WebKit/error_log.txt\"",
+ "-c", "CustomLog \"$iExploderTestDirectory/access_log.txt\" common",
+ "-c", "ErrorLog \"$iExploderTestDirectory/error_log.txt\"",
"-c", "SSLCertificateFile \"$sslCertificate\"",
# Apache wouldn't run CGIs with permissions==700 otherwise
- "-c", "User \"#$<\"");
-
- my $retryCount = 20;
- while (system("/usr/bin/curl -q --silent --stderr - --output " . File::Spec->devnull() . " $listen") && $retryCount) {
- sleep 1;
- --$retryCount;
- }
-
- die "Timed out waiting for httpd to start" unless $retryCount;
-
- $httpdOpen = 1;
-}
-
-sub closeHTTPD()
-{
- return if !$httpdOpen;
-
- close HTTPDIN;
- close HTTPDOUT;
-
- kill 15, `cat /tmp/WebKit/httpd.pid` if -f "/tmp/WebKit/httpd.pid";
+ "-c", "User \"#$<\""
+ );
- $httpdOpen = 0;
+ $isHttpdOpen = openHTTPD(@args);
}
diff --git a/WebKitTools/Scripts/run-leaks b/WebKitTools/Scripts/run-leaks
index d8f89d3..9dc58de 100755
--- a/WebKitTools/Scripts/run-leaks
+++ b/WebKitTools/Scripts/run-leaks
@@ -132,6 +132,15 @@ sub parseLeaksOutput(\@)
#
# We treat every line except for Process 00000: and Leak: as optional
+ # Newer versions of the leaks output have a header section at the top, with the first line describing the version of the output format.
+ # If we detect the new format is being used then we eat all of the header section so the output matches the format of older versions.
+ # FIXME: In the future we may wish to propagate this section through to our output.
+ if ($leaksOutput->[0] =~ /^leaks Report Version:/) {
+ while ($leaksOutput->[0] !~ /^Process /) {
+ shift @$leaksOutput;
+ }
+ }
+
my ($leakCount) = ($leaksOutput->[1] =~ /[[:blank:]]+([0-9]+)[[:blank:]]+leaks?/);
if (!defined($leakCount)) {
reportError("Could not parse leak count reported by leaks tool.");
diff --git a/WebKitTools/Scripts/run-sunspider b/WebKitTools/Scripts/run-sunspider
index e63f5d1..1f0d056 100755
--- a/WebKitTools/Scripts/run-sunspider
+++ b/WebKitTools/Scripts/run-sunspider
@@ -41,6 +41,7 @@ my $testRuns = 10; # This number may be different from what sunspider defaults t
my $runShark = 0;
my $runShark20 = 0;
my $runSharkCache = 0;
+my $suite = "";
my $ubench = 0;
my $v8 = 0;
my $parseonly = 0;
@@ -59,9 +60,10 @@ Usage: $programName [options] [options to pass to build system]
--shark Sample with the Mac OS X "Shark" performance testing tool (implies --runs=1)
--shark20 Like --shark, but with a 20 microsecond sampling interval
--shark-cache Like --shark, but performs a L2 cache-miss sample instead of time sample
- --ubench Use microbenchmark suite instead of regular tests (to check for core execution regressions)
- --v8 Use the V8 benchmark suite.
- --parse-only Use the parse-only benchmark suite
+ --suite Select a specific benchmark suite. The default is sunspider-0.9.1
+ --ubench Use microbenchmark suite instead of regular tests. Same as --suite=ubench
+ --v8-suite Use the V8 benchmark suite. Same as --suite=v8-v4
+ --parse-only Use the parse-only benchmark suite. Same as --suite=parse-only
EOF
GetOptions('root=s' => sub { my ($x, $value) = @_; $root = $value; setConfigurationProductDir(Cwd::abs_path($root)); },
@@ -70,6 +72,7 @@ GetOptions('root=s' => sub { my ($x, $value) = @_; $root = $value; setConfigurat
'shark' => \$runShark,
'shark20' => \$runShark20,
'shark-cache' => \$runSharkCache,
+ 'suite=s' => \$suite,
'ubench' => \$ubench,
'v8' => \$v8,
'parse-only' => \$parseonly,
@@ -117,6 +120,7 @@ push @args, "--set-baseline" if $setBaseline;
push @args, "--shark" if $runShark;
push @args, "--shark20" if $runShark20;
push @args, "--shark-cache" if $runSharkCache;
+push @args, "--suite=${suite}" if $suite;
push @args, "--ubench" if $ubench;
push @args, "--v8" if $v8;
push @args, "--parse-only" if $parseonly;
diff --git a/WebKitTools/Scripts/run-webkit-httpd b/WebKitTools/Scripts/run-webkit-httpd
index 9a97190..018f64c 100755
--- a/WebKitTools/Scripts/run-webkit-httpd
+++ b/WebKitTools/Scripts/run-webkit-httpd
@@ -33,11 +33,13 @@ use strict;
use warnings;
use Cwd;
+use File::Path;
use File::Basename;
use Getopt::Long;
use FindBin;
use lib $FindBin::Bin;
+use webkitperl::httpd;
use webkitdirs;
# Argument handling
@@ -62,39 +64,7 @@ if (!$result || @ARGV || $showHelp) {
setConfiguration();
my $productDir = productDir();
chdirWebKit();
-
-mkdir "/tmp/WebKit";
-
-if (-f "/tmp/WebKit/httpd.pid") {
- my $oldPid = `cat /tmp/WebKit/httpd.pid`;
- chomp $oldPid;
- if (0 != kill 0, $oldPid) {
- print "\nhttpd is already running: pid $oldPid, killing...\n";
- kill 15, $oldPid;
-
- my $retryCount = 20;
- while ((0 != kill 0, $oldPid) && $retryCount) {
- sleep 1;
- --$retryCount;
- }
-
- die "Timed out waiting for httpd to quit" unless $retryCount;
- }
-}
-
-my $testDirectory = getcwd() . "/LayoutTests";
-my $jsTestResourcesDirectory = $testDirectory . "/fast/js/resources";
-my $httpdPath = "/usr/sbin/httpd";
-$httpdPath = "/usr/sbin/apache2" if isDebianBased();
-my $httpdConfig = "$testDirectory/http/conf/httpd.conf";
-$httpdConfig = "$testDirectory/http/conf/cygwin-httpd.conf" if isCygwin();
-$httpdConfig = "$testDirectory/http/conf/apache2-httpd.conf" if `$httpdPath -v` =~ m|Apache/2|;
-$httpdConfig = "$testDirectory/http/conf/apache2-debian-httpd.conf" if isDebianBased();
-$httpdConfig = "$testDirectory/http/conf/fedora-httpd.conf" if isFedoraBased();
-my $documentRoot = "$testDirectory/http/tests";
-my $typesConfig = "$testDirectory/http/conf/mime.types";
-my $sslCertificate = "$testDirectory/http/conf/webkit-httpd.pem";
-
+my $testDirectory = File::Spec->catfile(getcwd(), "LayoutTests");
my $listen = "127.0.0.1:$httpdPort";
$listen = "$httpdPort" if ($allInterfaces);
@@ -103,19 +73,13 @@ if ($allInterfaces) {
} else {
print "Starting httpd on <http://$listen/>...\n";
}
+setShouldWaitForUserInterrupt();
print "Press Ctrl+C to stop it.\n\n";
my @args = (
- "-f", "$httpdConfig",
- "-C", "DocumentRoot \"$documentRoot\"",
- # Setup a link to where the js test templates are stored, use -c so that mod_alias will already be laoded.
- "-c", "Alias /js-test-resources \"$jsTestResourcesDirectory\"",
"-C", "Listen $listen",
- "-c", "TypesConfig \"$typesConfig\"",
"-c", "CustomLog |/usr/bin/tee common",
"-c", "ErrorLog |/usr/bin/tee",
- # Apache wouldn't run CGIs with permissions==700 otherwise.
- "-c", "User \"#$<\"",
# Run in single-process mode, do not detach from the controlling terminal.
"-X",
# Disable Keep-Alive support. Makes testing in multiple browsers easier (no need to wait
@@ -123,9 +87,6 @@ my @args = (
"-c", "KeepAlive 0"
);
-# FIXME: Enable this on Windows once <rdar://problem/5345985> is fixed
-push(@args, "-c", "SSLCertificateFile \"$sslCertificate\"") unless isCygwin();
-
-system($httpdPath, @args);
-
-unlink "/tmp/WebKit/httpd.pid";
+my @defaultArgs = getDefaultConfigForTestDirectory($testDirectory);
+@args = (@defaultArgs, @args);
+openHTTPD(@args);
diff --git a/WebKitTools/Scripts/run-webkit-tests b/WebKitTools/Scripts/run-webkit-tests
index 6dd8339..bb4fb34 100755
--- a/WebKitTools/Scripts/run-webkit-tests
+++ b/WebKitTools/Scripts/run-webkit-tests
@@ -67,6 +67,7 @@ use Time::HiRes qw(time usleep);
use List::Util 'shuffle';
use lib $FindBin::Bin;
+use webkitperl::httpd;
use webkitdirs;
use VCSUtils;
use POSIX;
@@ -75,8 +76,8 @@ sub buildPlatformResultHierarchy();
sub buildPlatformTestHierarchy(@);
sub closeCygpaths();
sub closeDumpTool();
-sub closeHTTPD();
sub closeWebSocketServer();
+sub configureAndOpenHTTPDIfNeeded();
sub countAndPrintLeaks($$$);
sub countFinishedTest($$$$);
sub deleteExpectedAndActualResults($);
@@ -91,7 +92,6 @@ sub resolveAndMakeTestResultsDirectory();
sub numericcmp($$);
sub openDiffTool();
sub openDumpTool();
-sub openHTTPDIfNeeded();
sub parseLeaksandPrintUniqueLeaks();
sub openWebSocketServerIfNeeded();
sub pathcmp($$);
@@ -143,7 +143,8 @@ my $showHelp = 0;
my $stripEditingCallbacks = isCygwin();
my $testHTTP = 1;
my $testMedia = 1;
-my $testResultsDirectory = "/tmp/layout-test-results";
+my $tmpDir = "/tmp";
+my $testResultsDirectory = File::Spec->catfile($tmpDir, "layout-test-results");
my $testsPerDumpTool = 1000;
my $threaded = 0;
# DumpRenderTree has an internal timeout of 15 seconds, so this must be > 15.
@@ -383,7 +384,8 @@ my @platformTestHierarchy = buildPlatformTestHierarchy(@platformResultHierarchy)
$expectedDirectory = $ENV{"WebKitExpectedTestResultsDirectory"} if $ENV{"WebKitExpectedTestResultsDirectory"};
-my $testResults = catfile($testResultsDirectory, "results.html");
+$testResultsDirectory = File::Spec->rel2abs($testResultsDirectory);
+my $testResults = File::Spec->catfile($testResultsDirectory, "results.html");
print "Running tests from $testDirectory\n";
if ($pixelTests) {
@@ -605,7 +607,7 @@ for my $test (@tests) {
}
if ($test =~ /^http\//) {
- openHTTPDIfNeeded();
+ configureAndOpenHTTPDIfNeeded();
if ($test !~ /^http\/tests\/local\// && $test !~ /^http\/tests\/ssl\// && $test !~ /^http\/tests\/wml\// && $test !~ /^http\/tests\/media\//) {
my $path = canonpath($test);
$path =~ s/^http\/tests\///;
@@ -708,7 +710,7 @@ for my $test (@tests) {
my $actualPNG = "";
my $diffPNG = "";
- my $diffPercentage = "";
+ my $diffPercentage = 0;
my $diffResult = "passed";
my $actualHash = "";
@@ -762,12 +764,12 @@ for my $test (@tests) {
}
if (/^diff: (.+)% (passed|failed)/) {
- $diffPercentage = $1;
+ $diffPercentage = $1 + 0;
$imageDifferences{$base} = $diffPercentage;
$diffResult = $2;
}
- if ($diffPercentage == 0) {
+ if (!$diffPercentage) {
printFailureMessageForTest($test, "pixel hash failed (but pixel test still passes)");
}
} elsif ($verbose) {
@@ -945,7 +947,7 @@ printf "\n%0.2fs total testing time\n", (time - $overallStartTime) . "";
!$isDumpToolOpen || die "Failed to close $dumpToolName.\n";
-closeHTTPD();
+$isHttpdOpen = !closeHTTPD();
closeWebSocketServer();
# Because multiple instances of this script are running concurrently we cannot
@@ -1345,95 +1347,21 @@ sub dumpToolDidCrash()
return DumpRenderTreeSupport::processIsCrashing($dumpToolPID);
}
-sub openHTTPDIfNeeded()
+sub configureAndOpenHTTPDIfNeeded()
{
return if $isHttpdOpen;
-
- mkdir "/tmp/WebKit";
-
- if (-f "/tmp/WebKit/httpd.pid") {
- my $oldPid = `cat /tmp/WebKit/httpd.pid`;
- chomp $oldPid;
- if (0 != kill 0, $oldPid) {
- print "\nhttpd is already running: pid $oldPid, killing...\n";
- kill 15, $oldPid;
-
- my $retryCount = 20;
- while ((0 != kill 0, $oldPid) && $retryCount) {
- sleep 1;
- --$retryCount;
- }
-
- die "Timed out waiting for httpd to quit" unless $retryCount;
- }
- }
-
- my $httpdPath = "/usr/sbin/httpd";
- my $httpdConfig;
- if (isCygwin()) {
- my $windowsConfDirectory = "$testDirectory/http/conf/";
- unless (-x "/usr/lib/apache/libphp4.dll") {
- copy("$windowsConfDirectory/libphp4.dll", "/usr/lib/apache/libphp4.dll");
- chmod(0755, "/usr/lib/apache/libphp4.dll");
- }
- $httpdConfig = "$windowsConfDirectory/cygwin-httpd.conf";
- } elsif (isDebianBased()) {
- $httpdPath = "/usr/sbin/apache2";
- $httpdConfig = "$testDirectory/http/conf/apache2-debian-httpd.conf";
- } elsif (isFedoraBased()) {
- $httpdPath = "/usr/sbin/httpd";
- $httpdConfig = "$testDirectory/http/conf/fedora-httpd.conf";
- } else {
- $httpdConfig = "$testDirectory/http/conf/httpd.conf";
- $httpdConfig = "$testDirectory/http/conf/apache2-httpd.conf" if `$httpdPath -v` =~ m|Apache/2|;
- }
- my $documentRoot = "$testDirectory/http/tests";
- my $jsTestResourcesDirectory = $testDirectory . "/fast/js/resources";
- my $typesConfig = "$testDirectory/http/conf/mime.types";
- my $listen = "127.0.0.1:$httpdPort";
my $absTestResultsDirectory = resolveAndMakeTestResultsDirectory();
- my $sslCertificate = "$testDirectory/http/conf/webkit-httpd.pem";
-
+ my $listen = "127.0.0.1:$httpdPort";
my @args = (
- "-f", "$httpdConfig",
- "-C", "DocumentRoot \"$documentRoot\"",
- # Setup a link to where the js test templates are stored, use -c so that mod_alias will already be laoded.
- "-c", "Alias /js-test-resources \"$jsTestResourcesDirectory\"",
- "-C", "Listen $listen",
- "-c", "TypesConfig \"$typesConfig\"",
"-c", "CustomLog \"$absTestResultsDirectory/access_log.txt\" common",
"-c", "ErrorLog \"$absTestResultsDirectory/error_log.txt\"",
- # Apache wouldn't run CGIs with permissions==700 otherwise
- "-c", "User \"#$<\""
+ "-C", "Listen $listen"
);
- # FIXME: Enable this on Windows once <rdar://problem/5345985> is fixed
- # The version of Apache we use with Cygwin does not support SSL
- push(@args, "-c", "SSLCertificateFile \"$sslCertificate\"") unless isCygwin();
+ my @defaultArgs = getDefaultConfigForTestDirectory($testDirectory);
+ @args = (@defaultArgs, @args);
- open2(\*HTTPDIN, \*HTTPDOUT, $httpdPath, @args);
-
- my $retryCount = 20;
- while (system("/usr/bin/curl -q --silent --stderr - --output " . File::Spec->devnull() . " $listen") && $retryCount) {
- sleep 1;
- --$retryCount;
- }
-
- die "Timed out waiting for httpd to start" unless $retryCount;
-
- $isHttpdOpen = 1;
-}
-
-sub closeHTTPD()
-{
- return if !$isHttpdOpen;
-
- close HTTPDIN;
- close HTTPDOUT;
-
- kill 15, `cat /tmp/WebKit/httpd.pid` if -f "/tmp/WebKit/httpd.pid";
-
- $isHttpdOpen = 0;
+ $isHttpdOpen = openHTTPD(@args);
}
sub openWebSocketServerIfNeeded()
@@ -1445,6 +1373,7 @@ sub openWebSocketServerIfNeeded()
my $webSocketPythonPath = "WebKitTools/pywebsocket";
my $webSocketHandlerDir = "$testDirectory";
my $webSocketHandlerScanDir = "$testDirectory/websocket/tests";
+ my $webSocketHandlerMapFile = "$webSocketHandlerScanDir/handler_map.txt";
my $sslCertificate = "$testDirectory/http/conf/webkit-httpd.pem";
my $absTestResultsDirectory = resolveAndMakeTestResultsDirectory();
my $logFile = "$absTestResultsDirectory/pywebsocket_log.txt";
@@ -1454,7 +1383,9 @@ sub openWebSocketServerIfNeeded()
"-p", "$webSocketPort",
"-d", "$webSocketHandlerDir",
"-s", "$webSocketHandlerScanDir",
+ "-m", "$webSocketHandlerMapFile",
"-l", "$logFile",
+ "--strict",
);
# wss is disabled until all platforms support pyOpenSSL.
# my @argsSecure = (
@@ -2220,6 +2151,24 @@ sub findTestsToRun
@testsToRun = sort pathcmp @testsToRun;
+ # We need to minimize the time when Apache and WebSocketServer is locked by tests
+ # so run them last if no explicit order was specified in the argument list.
+ if (!scalar @ARGV) {
+ my @httpTests;
+ my @websocketTests;
+ my @otherTests;
+ foreach my $test (@testsToRun) {
+ if ($test =~ /^http\//) {
+ push(@httpTests, $test);
+ } elsif ($test =~ /^websocket\//) {
+ push(@websocketTests, $test);
+ } else {
+ push(@otherTests, $test);
+ }
+ }
+ @testsToRun = (@otherTests, @httpTests, @websocketTests);
+ }
+
# Reverse the tests
@testsToRun = reverse @testsToRun if $reverseTests;
diff --git a/WebKitTools/Scripts/run-webkit-websocketserver b/WebKitTools/Scripts/run-webkit-websocketserver
index e05303a..bbc5af6 100755
--- a/WebKitTools/Scripts/run-webkit-websocketserver
+++ b/WebKitTools/Scripts/run-webkit-websocketserver
@@ -67,12 +67,14 @@ sub openWebSocketServer()
my $webSocketPythonPath = "$srcDir/WebKitTools/pywebsocket";
my $webSocketHandlerDir = "$testDirectory";
my $webSocketHandlerScanDir = "$testDirectory/websocket/tests";
+ my $webSocketHandlerMapFile = "$webSocketHandlerScanDir/handler_map.txt";
my @args = (
"$srcDir/WebKitTools/pywebsocket/mod_pywebsocket/standalone.py",
"-p", "$webSocketPort",
"-d", "$webSocketHandlerDir",
"-s", "$webSocketHandlerScanDir",
+ "-m", "$webSocketHandlerMapFile",
);
$ENV{"PYTHONPATH"} = $webSocketPythonPath;
diff --git a/WebKitTools/Scripts/sunspider-compare-results b/WebKitTools/Scripts/sunspider-compare-results
index a207d7a..3446cd8 100755
--- a/WebKitTools/Scripts/sunspider-compare-results
+++ b/WebKitTools/Scripts/sunspider-compare-results
@@ -39,21 +39,27 @@ my $configuration = configuration();
my $root;
my $showHelp = 0;
+my $suite = "";
my $ubench = 0;
my $v8 = 0;
+my $parseonly = 0;
my $programName = basename($0);
my $usage = <<EOF;
Usage: $programName [options] FILE FILE
--help Show this help message
--root Path to root tools build
- --ubench Compare microbenchmark results
- --v8 Compare the V8 benchmark results
+ --suite Select a specific benchmark suite. The default is sunspider-0.9.1
+ --ubench Use microbenchmark suite instead of regular tests. Same as --suite=ubench
+ --v8-suite Use the V8 benchmark suite. Same as --suite=v8-v4
+ --parse-only Use the parse-only benchmark suite. Same as --suite=parse-only
EOF
GetOptions('root=s' => sub { my ($argName, $value); setConfigurationProductDir(Cwd::abs_path($value)); },
+ 'suite=s' => \$suite,
'ubench' => \$ubench,
'v8' => \$v8,
+ 'parse-only' => \$parseonly,
'help' => \$showHelp);
if ($showHelp) {
@@ -119,7 +125,9 @@ chdir("SunSpider");
my @args = ("--shell", $jscPath);
# This code could be removed if we chose to pass extra args to sunspider instead of Xcode
+push @args, "--suite=${suite}" if $suite;
push @args, "--ubench" if $ubench;
push @args, "--v8" if $v8;
+push @args, "--parse-only" if $parseonly;
exec currentPerlPath(), "./sunspider-compare-results", @args, @ARGV;
diff --git a/WebKitTools/Scripts/svn-apply b/WebKitTools/Scripts/svn-apply
index 0373aa5..f586211 100755
--- a/WebKitTools/Scripts/svn-apply
+++ b/WebKitTools/Scripts/svn-apply
@@ -2,6 +2,7 @@
# Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
# Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
+# Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -116,10 +117,9 @@ my %removeDirectoryIgnoreList = (
'_svn' => 1,
);
-my $globalExitCode = 0;
+my $globalExitStatus = 0;
-my $pathScriptWasRunFrom = Cwd::getcwd();
-my $pathForRepositoryRoot = determineVCSRoot();
+my $repositoryRootPath = determineVCSRoot();
my %checkedDirectories;
my %copiedFiles;
@@ -133,7 +133,7 @@ my $patch;
while (<>) {
s/([\n\r]+)$//mg;
my $eol = $1;
- if (!defined($indexPath) && m#^diff --git a/#) {
+ if (!defined($indexPath) && m#^diff --git \w/#) {
$filter = \&gitdiff2svndiff;
}
$_ = &$filter($_) if $filter;
@@ -193,7 +193,7 @@ for $patch (@patches) {
removeDirectoriesIfNeeded();
-exit $globalExitCode;
+exit $globalExitStatus;
sub addDirectoriesIfNeeded($)
{
@@ -224,25 +224,22 @@ sub addDirectoriesIfNeeded($)
}
}
+# Args:
+# $patch: a patch string.
+# $pathRelativeToRoot: the path of the file to be patched, relative to the
+# repository root. This should normally be the path
+# found in the patch's "Index:" line.
+# $options: a reference to an array of options to pass to the patch command.
sub applyPatch($$;$)
{
- my ($patch, $fullPath, $options) = @_;
- chdir $pathForRepositoryRoot;
- $options = [] if (! $options);
- push @{$options}, "--force" if $force;
- my $command = "patch " . join(" ", "-p0", @{$options});
- open PATCH, "| $command" or die "Failed to patch $fullPath\n";
- print PATCH $patch;
- close PATCH;
- chdir $pathScriptWasRunFrom;
-
- my $exitCode = $? >> 8;
- if ($exitCode) {
- if (!$force) {
- print "$command \"$fullPath\" returned $exitCode. Pass --force to ignore patch failures.\n";
- exit $exitCode;
- }
- $globalExitCode = $exitCode;
+ my ($patch, $pathRelativeToRoot, $options) = @_;
+
+ my $optionalArgs = {options => $options, ensureForce => $force};
+
+ my $exitStatus = runPatchCommand($patch, $repositoryRootPath, $pathRelativeToRoot, $optionalArgs);
+
+ if ($exitStatus) {
+ $globalExitStatus = $exitStatus;
}
}
diff --git a/WebKitTools/Scripts/svn-unapply b/WebKitTools/Scripts/svn-unapply
index c277a3e..eb20ca0 100755
--- a/WebKitTools/Scripts/svn-unapply
+++ b/WebKitTools/Scripts/svn-unapply
@@ -2,6 +2,7 @@
# Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
# Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
+# Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -76,14 +77,22 @@ sub revertDirectories();
sub unapplyPatch($$;$);
sub unsetChangeLogDate($$);
+my $force = 0;
my $showHelp = 0;
-if (!GetOptions("help!" => \$showHelp) || $showHelp) {
- print STDERR basename($0) . " [-h|--help] patch1 [patch2 ...]\n";
+
+my $optionParseSuccess = GetOptions(
+ "force!" => \$force,
+ "help!" => \$showHelp
+);
+
+if (!$optionParseSuccess || $showHelp) {
+ print STDERR basename($0) . " [-h|--help] [--force] patch1 [patch2 ...]\n";
exit 1;
}
-my $pathScriptWasRunFrom = Cwd::getcwd();
-my $pathForRepositoryRoot = determineVCSRoot();
+my $globalExitStatus = 0;
+
+my $repositoryRootPath = determineVCSRoot();
my @copiedFiles;
my %directoriesToCheck;
@@ -95,7 +104,7 @@ my $patch;
while (<>) {
s/([\n\r]+)$//mg;
my $eol = $1;
- if (!defined($indexPath) && m#^diff --git a/#) {
+ if (!defined($indexPath) && m#^diff --git \w/#) {
$filter = \&gitdiff2svndiff;
}
$_ = &$filter($_) if $filter;
@@ -142,7 +151,7 @@ if (isSVN()) {
revertDirectories();
}
-exit 0;
+exit $globalExitStatus;
sub checksum($)
{
@@ -228,7 +237,7 @@ sub patch($)
sub revertDirectories()
{
- chdir $pathForRepositoryRoot;
+ chdir $repositoryRootPath;
my %checkedDirectories;
foreach my $path (reverse sort keys %directoriesToCheck) {
my @dirs = File::Spec->splitdir($path);
@@ -258,16 +267,24 @@ sub revertDirectories()
}
}
+# Args:
+# $patch: a patch string.
+# $pathRelativeToRoot: the path of the file to be patched, relative to the
+# repository root. This should normally be the path
+# found in the patch's "Index:" line.
+# $options: a reference to an array of options to pass to the patch command.
+# Do not include --reverse in this array.
sub unapplyPatch($$;$)
{
- my ($patch, $fullPath, $options) = @_;
- chdir $pathForRepositoryRoot;
- $options = [] if (! $options);
- my $command = "patch " . join(" ", "-p0", "-R", @{$options});
- open PATCH, "| $command" or die "Failed to patch $fullPath: $!";
- print PATCH $patch;
- close PATCH;
- chdir $pathScriptWasRunFrom;
+ my ($patch, $pathRelativeToRoot, $options) = @_;
+
+ my $optionalArgs = {options => $options, ensureForce => $force, shouldReverse => 1};
+
+ my $exitStatus = runPatchCommand($patch, $repositoryRootPath, $pathRelativeToRoot, $optionalArgs);
+
+ if ($exitStatus) {
+ $globalExitStatus = $exitStatus;
+ }
}
sub unsetChangeLogDate($$)
diff --git a/WebKitTools/Scripts/test-webkit-scripts b/WebKitTools/Scripts/test-webkit-scripts
new file mode 100755
index 0000000..781e8ce
--- /dev/null
+++ b/WebKitTools/Scripts/test-webkit-scripts
@@ -0,0 +1,85 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2009, 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
+#
+# 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 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 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.
+
+"""Run unit tests of WebKit's Perl and Python scripts."""
+
+# The docstring above is passed as the "description" to the OptionParser
+# used in this script's __main__ block.
+#
+# For the command options supported by this script, see the code below
+# that instantiates the OptionParser class, or else pass --help
+# while running this script (since argument help is auto-generated).
+
+import os
+import subprocess
+import sys
+from optparse import OptionParser
+
+class ScriptsTester(object):
+
+ """Supports running unit tests of WebKit scripts."""
+
+ def __init__(self, scripts_directory):
+ self.scripts_directory = scripts_directory
+
+ def script_path(self, script_file_name):
+ """Return an absolute path to the given script."""
+ return os.path.join(self.scripts_directory, script_file_name)
+
+ def run_test_script(self, script_title, script_path, args=None):
+ """Run the given test script."""
+ print('Testing %s:' % script_title)
+ call_args = [script_path]
+ if args:
+ call_args.extend(args)
+ subprocess.call(call_args)
+ print(70 * "*") # dividing line
+
+ def main(self):
+ parser = OptionParser(description=__doc__)
+ parser.add_option('-a', '--all', dest='all', action='store_true',
+ default=False, help='run all available tests, '
+ 'including those suppressed by default')
+ (options, args) = parser.parse_args()
+
+ self.run_test_script('Perl scripts', self.script_path('test-webkitperl'))
+ self.run_test_script('Python scripts', self.script_path('test-webkitpy'),
+ ['--all'] if options.all else None)
+
+ # FIXME: Display a cumulative indication of success or failure.
+ # In addition, call sys.exit() with 0 or 1 depending on that
+ # cumulative success or failure.
+ print('Note: Perl and Python results appear separately above.')
+
+
+if __name__ == '__main__':
+ # The scripts directory is the directory containing this file.
+ tester = ScriptsTester(os.path.dirname(__file__))
+ tester.main()
diff --git a/WebKitTools/Scripts/test-webkitperl b/WebKitTools/Scripts/test-webkitperl
new file mode 100755
index 0000000..2e31593
--- /dev/null
+++ b/WebKitTools/Scripts/test-webkitperl
@@ -0,0 +1,49 @@
+#!/usr/bin/perl
+#
+# Copyright (C) 2009 Chris Jerdonek (chris.jerdonek@gmail.com)
+#
+# 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.
+
+# Runs unit tests of WebKit Perl code.
+
+use strict;
+use warnings;
+
+use File::Spec;
+use FindBin;
+use Test::Harness;
+use lib $FindBin::Bin; # so this script can be run from any directory.
+use VCSUtils;
+
+# Use an absolute path so this script can be run from any directory.
+my $scriptsDir = $FindBin::Bin;
+
+my $pattern = File::Spec->catfile($scriptsDir, "webkitperl/*_unittest/*.pl");
+
+my @files = <${pattern}>; # lists files alphabetically
+
+runtests(@files);
diff --git a/WebKitTools/Scripts/test-webkitpy b/WebKitTools/Scripts/test-webkitpy
new file mode 100755
index 0000000..ca58b50
--- /dev/null
+++ b/WebKitTools/Scripts/test-webkitpy
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+# Copyright (c) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import sys
+import unittest
+
+from webkitpy.bugzilla_unittest import *
+from webkitpy.buildbot_unittest import *
+from webkitpy.changelogs_unittest import *
+from webkitpy.commands.download_unittest import *
+from webkitpy.commands.early_warning_system_unittest import *
+from webkitpy.commands.openbugs_unittest import OpenBugsTest
+from webkitpy.commands.upload_unittest import *
+from webkitpy.commands.queries_unittest import *
+from webkitpy.commands.queues_unittest import *
+from webkitpy.committers_unittest import *
+from webkitpy.credentials_unittest import *
+from webkitpy.diff_parser_unittest import *
+from webkitpy.executive_unittest import *
+from webkitpy.multicommandtool_unittest import *
+from webkitpy.networktransaction_unittest import *
+from webkitpy.patchcollection_unittest import *
+from webkitpy.queueengine_unittest import *
+from webkitpy.steps.steps_unittest import *
+from webkitpy.steps.closebugforlanddiff_unittest import *
+from webkitpy.steps.updatechangelogswithreview_unittests import *
+from webkitpy.style.unittests import * # for check-webkit-style
+from webkitpy.webkit_logging_unittest import *
+from webkitpy.webkitport_unittest import *
+
+if __name__ == "__main__":
+ # FIXME: This is a hack, but I'm tired of commenting out the test.
+ # See https://bugs.webkit.org/show_bug.cgi?id=31818
+ if len(sys.argv) > 1 and sys.argv[1] == "--all":
+ sys.argv.remove("--all")
+ from webkitpy.scm_unittest import *
+
+ unittest.main()
diff --git a/WebKitTools/Scripts/update-webkit-chromium b/WebKitTools/Scripts/update-webkit-chromium
index 779b9a6..fa94f8c 100755
--- a/WebKitTools/Scripts/update-webkit-chromium
+++ b/WebKitTools/Scripts/update-webkit-chromium
@@ -28,24 +28,28 @@
# Update script for the WebKit Chromium Port.
-# Check if gclient is installed.
-if (not `gclient --version`) {
- print STDERR "gclient is required for updating chromium dependencies.\n";
- print STDERR "Install depot_tools and add gclient to the environment\n";
- print STDERR "path. For more information, refer to:\n";
- print STDERR "http://dev.chromium.org/developers/how-tos/install-gclient\n";
- die;
+chdir("WebKit/chromium") or die $!;
+
+# Find gclient or install it.
+my $gclientPath;
+if (`gclient --version`) {
+ $gclientPath = 'gclient';
+} elsif (-e 'depot_tools/gclient') {
+ $gclientPath = 'depot_tools/gclient';
+} else {
+ print "Installing chromium's depot_tools...\n";
+ system("svn co http://src.chromium.org/svn/trunk/tools/depot_tools") == 0 or die $1;
+ $gclientPath = 'depot_tools/gclient';
}
-chdir("WebKit/chromium") or die $!;
if (! -e ".gclient") {
# If .gclient configuration file doesn't exist, create it.
print "Configuring gclient...\n";
- system("gclient",
+ system($gclientPath,
"config",
"--spec=solutions=[{'name':'./','url':None}]") == 0 or die $!;
}
# Execute gclient sync.
print "Updating chromium port dependencies using gclient...\n";
-system("gclient", "sync", "--force") == 0 or die $!;
+system($gclientPath, "sync", "--force") == 0 or die $!;
diff --git a/WebKitTools/Scripts/validate-committer-lists b/WebKitTools/Scripts/validate-committer-lists
index 05f2b36..2f2dd32 100755
--- a/WebKitTools/Scripts/validate-committer-lists
+++ b/WebKitTools/Scripts/validate-committer-lists
@@ -36,12 +36,13 @@ import subprocess
import re
import urllib2
from datetime import date, datetime, timedelta
-from modules.committers import CommitterList
-from modules.logging import log, error
+from webkitpy.committers import CommitterList
+from webkitpy.webkit_logging import log, error
+from webkitpy.scm import Git
-# WebKit includes a built copy of BeautifulSoup in Scripts/modules
+# WebKit includes a built copy of BeautifulSoup in Scripts/webkitpy
# so this import should always succeed.
-from modules.BeautifulSoup import BeautifulSoup
+from webkitpy.BeautifulSoup import BeautifulSoup
def print_list_if_non_empty(title, list_to_print):
if not list_to_print:
@@ -243,7 +244,14 @@ class CommitterListFromGit:
def main():
committer_list = CommitterList()
CommitterListFromMailingList().check_for_emails_missing_from_list(committer_list)
-
+
+ if not Git.in_working_directory("."):
+ print """\n\nWARNING: validate-committer-lists requires a git checkout.
+The following checks are disabled:
+ - List of committers ordered by last commit
+ - List of historical committers missing from committers.py
+"""
+ return 1
svn_committer_list = CommitterListFromGit()
svn_committer_list.print_possibly_expired_committers(committer_list)
svn_committer_list.print_committers_missing_from_committer_list(committer_list)
diff --git a/WebKitTools/Scripts/bugzilla-tool b/WebKitTools/Scripts/webkit-patch
index fdbb740..b4bcc4c 100755
--- a/WebKitTools/Scripts/bugzilla-tool
+++ b/WebKitTools/Scripts/webkit-patch
@@ -32,34 +32,36 @@
import os
-from modules.bugzilla import Bugzilla
-from modules.buildbot import BuildBot
-from modules.buildsteps import BuildSteps
-from modules.commands.download import *
-from modules.commands.early_warning_system import *
-from modules.commands.queries import *
-from modules.commands.queues import *
-from modules.commands.upload import *
-from modules.executive import Executive
-from modules.logging import log
-from modules.multicommandtool import MultiCommandTool
-from modules.scm import detect_scm_system
+from webkitpy.bugzilla import Bugzilla
+from webkitpy.buildbot import BuildBot
+from webkitpy.commands.download import *
+from webkitpy.commands.early_warning_system import *
+from webkitpy.commands.openbugs import OpenBugs
+from webkitpy.commands.queries import *
+from webkitpy.commands.queues import *
+from webkitpy.commands.upload import *
+from webkitpy.executive import Executive
+from webkitpy.webkit_logging import log
+from webkitpy.multicommandtool import MultiCommandTool
+from webkitpy.scm import detect_scm_system
+from webkitpy.user import User
+
+
+class WebKitPatch(MultiCommandTool):
+ global_options = [
+ make_option("--dry-run", action="store_true", dest="dry_run", default=False, help="do not touch remote servers"),
+ make_option("--status-host", action="store", dest="status_host", type="string", nargs=1, help="Hostname (e.g. localhost or commit.webkit.org) where status updates should be posted."),
+ ]
-class BugzillaTool(MultiCommandTool):
def __init__(self):
MultiCommandTool.__init__(self)
- self.global_option_parser.add_option("--dry-run", action="callback", help="do not touch remote servers", callback=self.dry_run_callback)
self.bugs = Bugzilla()
self.buildbot = BuildBot()
self.executive = Executive()
+ self.user = User()
self._scm = None
- self._status = None
- self.steps = BuildSteps()
-
- def dry_run_callback(self, option, opt, value, parser):
- self.scm().dryrun = True
- self.bugs.dryrun = True
+ self.status_server = StatusServer()
def scm(self):
# Lazily initialize SCM to not error-out before command line parsing (or when running non-scm commands).
@@ -78,11 +80,6 @@ class BugzillaTool(MultiCommandTool):
return self._scm
- def status(self):
- if not self._status:
- self._status = StatusBot()
- return self._status
-
def path(self):
return __file__
@@ -93,6 +90,14 @@ class BugzillaTool(MultiCommandTool):
return self.scm().supports_local_commits()
return True
+ # FIXME: This may be unnecessary since we pass global options to all commands during execute() as well.
+ def handle_global_options(self, options):
+ if options.dry_run:
+ self.scm().dryrun = True
+ self.bugs.dryrun = True
+ if options.status_host:
+ self.status_server.set_host(options.status_host)
+
def should_execute_command(self, command):
if command.requires_local_commits and not self.scm().supports_local_commits():
failure_reason = "%s requires local commits using %s in %s." % (command.name, self.scm().display_name(), self.scm().checkout_root)
@@ -101,4 +106,4 @@ class BugzillaTool(MultiCommandTool):
if __name__ == "__main__":
- BugzillaTool().main()
+ WebKitPatch().main()
diff --git a/WebKitTools/Scripts/webkit-tools-completion.sh b/WebKitTools/Scripts/webkit-tools-completion.sh
index 308711d..5eb6833 100644
--- a/WebKitTools/Scripts/webkit-tools-completion.sh
+++ b/WebKitTools/Scripts/webkit-tools-completion.sh
@@ -32,12 +32,12 @@
# Add a line like this to your .bashrc:
# source /path/to/WebKitCode/WebKitTools/Scripts/webkit-tools-completion.sh
-__bugzilla-tool_generate_reply()
+__webkit-patch_generate_reply()
{
COMPREPLY=( $(compgen -W "$1" -- "${COMP_WORDS[COMP_CWORD]}") )
}
-_bugzilla-tool_complete()
+_webkit-patch_complete()
{
local command current_command="${COMP_WORDS[1]}"
case "$current_command" in
@@ -50,41 +50,45 @@ _bugzilla-tool_complete()
esac
if [ $COMP_CWORD -eq 1 ]; then
- __bugzilla-tool_generate_reply "--help apply-patches bugs-to-commit commit-message land-diff land-patches obsolete-attachments patches-to-commit post-commits post-diff reviewed-patches"
+ __webkit-patch_generate_reply "--help apply-from-bug bugs-to-commit commit-message land land-from-bug obsolete-attachments patches-to-commit post upload tree-status rollout reviewed-patches"
return
fi
case "$command" in
- apply-patches)
- __bugzilla-tool_generate_reply "--force-clean --local-commit --no-clean --no-update"
+ apply-from-bug)
+ __webkit-patch_generate_reply "--force-clean --local-commit --no-clean --no-update"
return
;;
commit-message)
return
;;
- land-diff)
- __bugzilla-tool_generate_reply "--no-build --no-close --no-test --reviewer= -r"
+ land)
+ __webkit-patch_generate_reply "--no-build --no-close --no-test --reviewer= -r"
return
;;
- land-patches)
- __bugzilla-tool_generate_reply "--force-clean --no-build --no-clean --no-test"
+ land-from-bug)
+ __webkit-patch_generate_reply "--force-clean --no-build --no-clean --no-test"
return
;;
obsolete-attachments)
return
;;
- post-diff)
- __bugzilla-tool_generate_reply "--description --no-obsolete --no-review -m"
+ post)
+ __webkit-patch_generate_reply "--description --no-obsolete --no-review --request-commit -m --open-bug"
+ return
+ ;;
+ upload)
+ __webkit-patch_generate_reply "--description --no-obsolete --no-review --request-commit --cc -m --open-bug"
return
;;
post-commits)
- __bugzilla-tool_generate_reply "--bug-id= --no-comment --no-obsolete --no-review -b"
+ __webkit-patch_generate_reply "--bug-id= --no-comment --no-obsolete --no-review -b"
return
;;
esac
}
-complete -F _bugzilla-tool_complete bugzilla-tool
+complete -F _webkit-patch_complete webkit-patch
complete -W "--continue --fix-merged --help --no-continue --no-warnings --warnings -c -f -h -w" resolve-ChangeLogs
complete -W "--bug --diff --git-commit --git-index --git-reviewer --help --no-update --no-write --open --update --write -d -h -o" prepare-ChangeLog
complete -W "--clean --debug --help -h" build-webkit
diff --git a/WebKitTools/Scripts/webkitdirs.pm b/WebKitTools/Scripts/webkitdirs.pm
index 64e5dc4..d667a8a 100644
--- a/WebKitTools/Scripts/webkitdirs.pm
+++ b/WebKitTools/Scripts/webkitdirs.pm
@@ -32,6 +32,7 @@ use warnings;
use Config;
use FindBin;
use File::Basename;
+use File::Path;
use File::Spec;
use POSIX;
use VCSUtils;
@@ -58,17 +59,22 @@ my $sourceDir;
my $currentSVNRevision;
my $osXVersion;
my $isQt;
+my $isSymbian;
my %qtFeatureDefaults;
my $isGtk;
my $isWx;
my @wxArgs;
my $isChromium;
+my $isInspectorFrontend;
# Variables for Win32 support
my $vcBuildPath;
my $windowsTmpPath;
my $windowsSourceDir;
+# Defined in VCSUtils.
+sub exitStatus($);
+
sub determineSourceDir
{
return if $sourceDir;
@@ -134,6 +140,9 @@ sub determineBaseProductDir
undef $baseProductDir unless $baseProductDir =~ /^\//;
}
}
+ } elsif (isSymbian()) {
+ # Shadow builds are not supported on Symbian
+ $baseProductDir = $sourceDir;
}
if (!defined($baseProductDir)) { # Port-spesific checks failed, use default
@@ -234,9 +243,11 @@ sub argumentsForConfiguration()
push(@args, '--release') if $configuration eq "Release";
push(@args, '--32-bit') if $architecture ne "x86_64";
push(@args, '--qt') if isQt();
+ push(@args, '--symbian') if isSymbian();
push(@args, '--gtk') if isGtk();
push(@args, '--wx') if isWx();
push(@args, '--chromium') if isChromium();
+ push(@args, '--inspector-frontend') if isInspectorFrontend();
return @args;
}
@@ -529,8 +540,13 @@ sub builtDylibPathForName
$libraryName = "QtWebKit";
if (isDarwin() and -d "$configurationProductDir/lib/$libraryName.framework") {
return "$configurationProductDir/lib/$libraryName.framework/$libraryName";
- } elsif (isWindows() or isCygwin()) {
- return "$configurationProductDir/lib/$libraryName.dll";
+ } elsif (isWindows()) {
+ chomp(my $mkspec = `qmake -query QMAKE_MKSPECS`);
+ my $qtMajorVersion = retrieveQMakespecVar("$mkspec/qconfig.pri", "QT_MAJOR_VERSION");
+ if ($qtMajorVersion eq "unknown") {
+ $qtMajorVersion = "";
+ }
+ return "$configurationProductDir/lib/$libraryName$qtMajorVersion.dll";
} else {
return "$configurationProductDir/lib/lib$libraryName.so";
}
@@ -563,7 +579,7 @@ sub checkFrameworks
push(@frameworks, "WebKit") if isAppleMacWebKit();
for my $framework (@frameworks) {
my $path = builtDylibPathForName($framework);
- die "Can't find built framework at \"$path\".\n" unless -x $path;
+ die "Can't find built framework at \"$path\".\n" unless -e $path;
}
}
@@ -611,15 +627,12 @@ sub hasSVGSupport
{
my $path = shift;
- if (isQt()) {
- return 1;
- }
-
if (isWx()) {
return 0;
}
- return libraryContainsSymbol($path, "SVGElement");
+ # We used to look for SVGElement but isSVGElement is a valid symbol in --no-svg builds.
+ return libraryContainsSymbol($path, "SVGDefsElement");
}
sub removeLibraryDependingOnSVG
@@ -775,12 +788,30 @@ sub checkWebCoreWCSSSupport
return $hasWCSS;
}
+sub isInspectorFrontend()
+{
+ determineIsInspectorFrontend();
+ return $isInspectorFrontend;
+}
+
+sub determineIsInspectorFrontend()
+{
+ return if defined($isInspectorFrontend);
+ $isInspectorFrontend = checkForArgumentAndRemoveFromARGV("--inspector-frontend");
+}
+
sub isQt()
{
determineIsQt();
return $isQt;
}
+sub isSymbian()
+{
+ determineIsSymbian();
+ return $isSymbian;
+}
+
sub qtFeatureDefaults()
{
determineQtFeatureDefaults();
@@ -831,6 +862,18 @@ sub determineIsQt()
$isQt = defined($ENV{'QTDIR'});
}
+sub determineIsSymbian()
+{
+ return if defined($isSymbian);
+
+ if (checkForArgumentAndRemoveFromARGV("--symbian")) {
+ $isSymbian = 1;
+ return;
+ }
+
+ $isSymbian = defined($ENV{'EPOCROOT'});
+}
+
sub isGtk()
{
determineIsGtk();
@@ -1172,6 +1215,38 @@ sub setupCygwinEnv()
print "WEBKITLIBRARIESDIR is set to: ", $ENV{"WEBKITLIBRARIESDIR"}, "\n";
}
+sub copyInspectorFrontendFiles
+{
+ my $productDir = productDir();
+ my $sourceInspectorPath = sourceDir() . "/WebCore/inspector/front-end/";
+ my $inspectorResourcesDirPath = $ENV{"WEBKITINSPECTORRESOURCESDIR"};
+
+ if (!defined($inspectorResourcesDirPath)) {
+ $inspectorResourcesDirPath = "";
+ }
+
+ if (isAppleMacWebKit()) {
+ $inspectorResourcesDirPath = $productDir . "/WebCore.framework/Resources/inspector";
+ } elsif (isAppleWinWebKit()) {
+ $inspectorResourcesDirPath = $productDir . "/WebKit.resources/inspector";
+ } elsif (isQt() || isGtk()) {
+ my $prefix = $ENV{"WebKitInstallationPrefix"};
+ $inspectorResourcesDirPath = (defined($prefix) ? $prefix : "/usr/share") . "/webkit-1.0/webinspector";
+ }
+
+ if (! -d $inspectorResourcesDirPath) {
+ print "*************************************************************\n";
+ print "Cannot find '$inspectorResourcesDirPath'.\n" if (defined($inspectorResourcesDirPath));
+ print "Make sure that you have built WebKit first.\n" if (! -d $productDir || defined($inspectorResourcesDirPath));
+ print "Optionally, set the environment variable 'WebKitInspectorResourcesDir'\n";
+ print "to point to the directory that contains the WebKit Inspector front-end\n";
+ print "files for the built WebCore framework.\n";
+ print "*************************************************************\n";
+ die;
+ }
+ return system "rsync", "-aut", "--exclude=/.DS_Store", "--exclude=.svn/", !isQt() ? "--exclude=/WebKit.qrc" : "", $sourceInspectorPath, $inspectorResourcesDirPath;
+}
+
sub buildXCodeProject($$@)
{
my ($project, $clean, @extraOptions) = @_;
@@ -1198,9 +1273,7 @@ sub buildVisualStudioProject
$action = "/clean";
}
- my $useenv = "/useenv";
-
- my @command = ($vcBuildPath, $useenv, $winProjectPath, $action, $config);
+ my @command = ($vcBuildPath, $winProjectPath, $action, $config);
print join(" ", @command), "\n";
return system @command;
@@ -1398,6 +1471,45 @@ sub buildQMakeProject($@)
my $make = qtMakeCommand($qmakebin);
my $config = configuration();
my $prefix = $ENV{"WebKitInstallationPrefix"};
+ my $dir = File::Spec->canonpath(baseProductDir());
+ $dir = File::Spec->catfile($dir, $config) unless isSymbian();
+ File::Path::mkpath($dir);
+ chdir $dir or die "Failed to cd into " . $dir . "\n";
+
+ print "Generating derived sources\n\n";
+
+ my @dsQmakeArgs = @buildArgs;
+ push @dsQmakeArgs, "-r";
+ push @dsQmakeArgs, sourceDir() . "/DerivedSources.pro";
+ push @dsQmakeArgs, "-o Makefile.DerivedSources";
+ print "Calling '$qmakebin @dsQmakeArgs' in " . $dir . "\n\n";
+ my $result = system "$qmakebin @dsQmakeArgs";
+ if ($result ne 0) {
+ die "Failed while running $qmakebin to generate derived sources!\n";
+ }
+
+ my $dsMakefile = "Makefile.DerivedSources";
+
+ print "Calling '$make $makeargs -f $dsMakefile generated_files' in " . $dir . "/JavaScriptCore\n\n";
+ if ($make eq "nmake") {
+ $result = system "pushd JavaScriptCore && $make $makeargs -f $dsMakefile generated_files && popd";
+ } else {
+ $result = system "$make $makeargs -C JavaScriptCore -f $dsMakefile generated_files";
+ }
+ if ($result ne 0) {
+ die "Failed to generate JavaScriptCore's derived sources!\n";
+ }
+
+ print "Calling '$make $makeargs -f $dsMakefile generated_files' in " . $dir . "/WebCore\n\n";
+ if ($make eq "nmake") {
+ $result = system "pushd WebCore && $make $makeargs -f $dsMakefile generated_files && popd";
+ } else {
+ $result = system "$make $makeargs -C WebCore -f $dsMakefile generated_files";
+ }
+ if ($result ne 0) {
+ die "Failed to generate WebCore's derived sources!\n";
+ }
+
push @buildArgs, "OUTPUT_DIR=" . baseProductDir() . "/$config";
push @buildArgs, sourceDir() . "/WebKit.pro";
@@ -1415,36 +1527,23 @@ sub buildQMakeProject($@)
}
}
- my $dir = File::Spec->canonpath(baseProductDir());
- my @mkdirArgs;
- push @mkdirArgs, "-p" if !isWindows();
- if (! -d $dir) {
- system "mkdir", @mkdirArgs, "$dir";
- if (! -d $dir) {
- die "Failed to create product directory " . $dir;
- }
- }
- $dir = File::Spec->catfile($dir, $config);
- if (! -d $dir) {
- system "mkdir", @mkdirArgs, "$dir";
- if (! -d $dir) {
- die "Failed to create build directory " . $dir;
- }
- }
-
- chdir $dir or die "Failed to cd into " . $dir . "\n";
-
print "Calling '$qmakebin @buildArgs' in " . $dir . "\n\n";
print "Installation directory: $prefix\n" if(defined($prefix));
- my $result = system "$qmakebin @buildArgs";
+ $result = system "$qmakebin @buildArgs";
if ($result ne 0) {
die "Failed to setup build environment using $qmakebin!\n";
}
if ($clean) {
+ print "Calling '$make $makeargs distclean' in " . $dir . "\n\n";
$result = system "$make $makeargs distclean";
+ } elsif (isSymbian()) {
+ print "\n\nWebKit is now configured for building, but you have to make\n";
+ print "a choice about the target yourself. To start the build run:\n\n";
+ print " make release-armv5|debug-winscw|etc.\n\n";
} else {
+ print "Calling '$make $makeargs' in " . $dir . "\n\n";
$result = system "$make $makeargs";
}
@@ -1523,7 +1622,7 @@ sub buildChromium($@)
$result = buildChromiumVisualStudioProject("WebKit/chromium/WebKit.sln", $clean);
} elsif (isLinux()) {
# Linux build - build using make.
- $ result = buildChromiumMakefile("WebKit/chromium/", "webkit", $clean);
+ $ result = buildChromiumMakefile("WebKit/chromium/", "all", $clean);
} else {
print STDERR "This platform is not supported by chromium.\n";
}
@@ -1551,15 +1650,6 @@ sub setPathForRunningWebKitApp
$env->{PATH} = join(':', productDir(), dirname(installedSafariPath()), appleApplicationSupportPath(), $env->{PATH} || "");
}
-sub exitStatus($)
-{
- my ($returnvalue) = @_;
- if ($^O eq "MSWin32") {
- return $returnvalue >> 8;
- }
- return WEXITSTATUS($returnvalue);
-}
-
sub runSafari
{
my ($debugger) = @_;
diff --git a/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatch.pl b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatch.pl
new file mode 100644
index 0000000..d21c706
--- /dev/null
+++ b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatch.pl
@@ -0,0 +1,290 @@
+#!/usr/bin/perl
+#
+# Copyright (C) 2009, 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
+#
+# 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.
+
+# Unit tests of VCSUtils::fixChangeLogPatch().
+
+use Test::Simple tests => 7;
+use VCSUtils;
+
+# The source ChangeLog for these tests is the following:
+#
+# 2009-12-22 Alice <alice@email.address>
+#
+# Reviewed by Ray.
+#
+# Changed some code on 2009-12-22.
+#
+# * File:
+# * File2:
+#
+# 2009-12-21 Alice <alice@email.address>
+#
+# Reviewed by Ray.
+#
+# Changed some code on 2009-12-21.
+#
+# * File:
+# * File2:
+
+my $title;
+my $in;
+my $out;
+
+# New test
+$title = "fixChangeLogPatch: [no change] First line is new line.";
+
+$in = <<'END';
+--- ChangeLog
++++ ChangeLog
+@@ -1,3 +1,11 @@
++2009-12-22 Bob <bob@email.address>
++
++ Reviewed by Ray.
++
++ Changed some more code on 2009-12-22.
++
++ * File:
++
+ 2009-12-22 Alice <alice@email.address>
+
+ Reviewed by Ray.
+END
+
+ok(fixChangeLogPatch($in) eq $in, $title);
+
+# New test
+$title = "fixChangeLogPatch: [no change] No date string.";
+
+$in = <<'END';
+--- ChangeLog
++++ ChangeLog
+@@ -6,6 +6,7 @@
+
+ * File:
+ * File2:
++ * File3:
+
+ 2009-12-21 Alice <alice@email.address>
+
+END
+
+ok(fixChangeLogPatch($in) eq $in, $title);
+
+# New test
+$title = "fixChangeLogPatch: [no change] New entry inserted in middle.";
+
+$in = <<'END';
+--- ChangeLog
++++ ChangeLog
+@@ -11,6 +11,14 @@
+
+ Reviewed by Ray.
+
++ Changed some more code on 2009-12-21.
++
++ * File:
++
++2009-12-21 Alice <alice@email.address>
++
++ Reviewed by Ray.
++
+ Changed some code on 2009-12-21.
+
+ * File:
+END
+
+ok(fixChangeLogPatch($in) eq $in, $title);
+
+# New test
+$title = "fixChangeLogPatch: Leading context includes first line.";
+
+$in = <<'END';
+--- ChangeLog
++++ ChangeLog
+@@ -1,5 +1,13 @@
+ 2009-12-22 Alice <alice@email.address>
+
++ Reviewed by Sue.
++
++ Changed some more code on 2009-12-22.
++
++ * File:
++
++2009-12-22 Alice <alice@email.address>
++
+ Reviewed by Ray.
+
+ Changed some code on 2009-12-22.
+END
+
+$out = <<'END';
+--- ChangeLog
++++ ChangeLog
+@@ -1,3 +1,11 @@
++2009-12-22 Alice <alice@email.address>
++
++ Reviewed by Sue.
++
++ Changed some more code on 2009-12-22.
++
++ * File:
++
+ 2009-12-22 Alice <alice@email.address>
+
+ Reviewed by Ray.
+END
+
+ok(fixChangeLogPatch($in) eq $out, $title);
+
+# New test
+$title = "fixChangeLogPatch: Leading context does not include first line.";
+
+$in = <<'END';
+@@ -2,6 +2,14 @@
+
+ Reviewed by Ray.
+
++ Changed some more code on 2009-12-22.
++
++ * File:
++
++2009-12-22 Alice <alice@email.address>
++
++ Reviewed by Ray.
++
+ Changed some code on 2009-12-22.
+
+ * File:
+END
+
+$out = <<'END';
+@@ -1,3 +1,11 @@
++2009-12-22 Alice <alice@email.address>
++
++ Reviewed by Ray.
++
++ Changed some more code on 2009-12-22.
++
++ * File:
++
+ 2009-12-22 Alice <alice@email.address>
+
+ Reviewed by Ray.
+END
+
+ok(fixChangeLogPatch($in) eq $out, $title);
+
+# New test
+$title = "fixChangeLogPatch: Non-consecutive line additions.";
+
+# This can occur, for example, if the new ChangeLog entry includes
+# trailing white space in the first blank line but not the second.
+# A diff command can then match the second blank line of the new
+# ChangeLog entry with the first blank line of the old.
+# The svn diff command with the default --diff-cmd has done this.
+$in = <<'END';
+@@ -1,5 +1,11 @@
+ 2009-12-22 Alice <alice@email.address>
++ <pretend-whitespace>
++ Reviewed by Ray.
+
++ Changed some more code on 2009-12-22.
++
++2009-12-22 Alice <alice@email.address>
++
+ Reviewed by Ray.
+
+ Changed some code on 2009-12-22.
+END
+
+$out = <<'END';
+@@ -1,3 +1,9 @@
++2009-12-22 Alice <alice@email.address>
++ <pretend-whitespace>
++ Reviewed by Ray.
++
++ Changed some more code on 2009-12-22.
++
+ 2009-12-22 Alice <alice@email.address>
+
+ Reviewed by Ray.
+END
+
+ok(fixChangeLogPatch($in) eq $out, $title);
+
+# New test
+$title = "fixChangeLogPatch: Additional edits after new entry.";
+
+$in = <<'END';
+@@ -2,10 +2,17 @@
+
+ Reviewed by Ray.
+
++ Changed some more code on 2009-12-22.
++
++ * File:
++
++2009-12-22 Alice <alice@email.address>
++
++ Reviewed by Ray.
++
+ Changed some code on 2009-12-22.
+
+ * File:
+- * File2:
+
+ 2009-12-21 Alice <alice@email.address>
+
+END
+
+$out = <<'END';
+@@ -1,11 +1,18 @@
++2009-12-22 Alice <alice@email.address>
++
++ Reviewed by Ray.
++
++ Changed some more code on 2009-12-22.
++
++ * File:
++
+ 2009-12-22 Alice <alice@email.address>
+
+ Reviewed by Ray.
+
+ Changed some code on 2009-12-22.
+
+ * File:
+- * File2:
+
+ 2009-12-21 Alice <alice@email.address>
+
+END
+
+ok(fixChangeLogPatch($in) eq $out, $title);
diff --git a/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/generatePatchCommand.pl b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/generatePatchCommand.pl
new file mode 100644
index 0000000..483a0a8
--- /dev/null
+++ b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/generatePatchCommand.pl
@@ -0,0 +1,87 @@
+#!/usr/bin/perl
+#
+# Copyright (C) 2009, 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
+#
+# 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.
+
+# Unit tests of VCSUtils::generatePatchCommand().
+
+use Test::Simple tests => 10;
+use VCSUtils;
+
+# New test
+$title = "generatePatchCommand: Undefined optional arguments.";
+
+my $argsHashRef;
+my ($patchCommand, $isForcing) = VCSUtils::generatePatchCommand($argsHashRef);
+
+ok($patchCommand eq "patch -p0", $title);
+ok($isForcing == 0, $title);
+
+# New test
+$title = "generatePatchCommand: Undefined options.";
+
+my $options;
+$argsHashRef = {options => $options};
+($patchCommand, $isForcing) = VCSUtils::generatePatchCommand($argsHashRef);
+
+ok($patchCommand eq "patch -p0", $title);
+ok($isForcing == 0, $title);
+
+# New test
+$title = "generatePatchCommand: --force and no \"ensure force\".";
+
+$argsHashRef = {options => ["--force"]};
+($patchCommand, $isForcing) = VCSUtils::generatePatchCommand($argsHashRef);
+
+ok($patchCommand eq "patch -p0 --force", $title);
+ok($isForcing == 1, $title);
+
+# New test
+$title = "generatePatchCommand: no --force and \"ensure force\".";
+
+$argsHashRef = {ensureForce => 1};
+($patchCommand, $isForcing) = VCSUtils::generatePatchCommand($argsHashRef);
+
+ok($patchCommand eq "patch -p0 --force", $title);
+ok($isForcing == 1, $title);
+
+# New test
+$title = "generatePatchCommand: \"should reverse\".";
+
+$argsHashRef = {shouldReverse => 1};
+($patchCommand, $isForcing) = VCSUtils::generatePatchCommand($argsHashRef);
+
+ok($patchCommand eq "patch -p0 --reverse", $title);
+
+# New test
+$title = "generatePatchCommand: --fuzz=3, --force.";
+
+$argsHashRef = {options => ["--fuzz=3", "--force"]};
+($patchCommand, $isForcing) = VCSUtils::generatePatchCommand($argsHashRef);
+
+ok($patchCommand eq "patch -p0 --force --fuzz=3", $title);
diff --git a/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/gitdiff2svndiff.pl b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/gitdiff2svndiff.pl
new file mode 100644
index 0000000..93708d6
--- /dev/null
+++ b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/gitdiff2svndiff.pl
@@ -0,0 +1,117 @@
+#!/usr/bin/perl -w
+#
+# Copyright (C) 2009, 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
+# 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.
+
+# Unit tests of VCSUtils::gitdiff2svndiff()
+
+use strict;
+use warnings;
+
+use Test::Simple tests => 20;
+use VCSUtils;
+
+# We use this for display purposes, to keep each test title on one line.
+sub excerptString($)
+{
+ my ($text) = @_;
+
+ my $length = 25;
+
+ my $shortened = substr($text, 0, $length);
+ $shortened .= "..." if (length($text) > $length);
+
+ return $shortened;
+}
+
+my $git_patch = <<END;
+diff --git a/WebCore/rendering/style/StyleFlexibleBoxData.h b/WebCore/rendering/style/StyleFlexibleBoxData.h
+index f5d5e74..3b6aa92 100644
+--- a/WebCore/rendering/style/StyleFlexibleBoxData.h
++++ b/WebCore/rendering/style/StyleFlexibleBoxData.h
+@@ -47,7 +47,6 @@ public:
+END
+
+my $svn_patch = <<END;
+Index: WebCore/rendering/style/StyleFlexibleBoxData.h
+===================================================================
+--- WebCore/rendering/style/StyleFlexibleBoxData.h
++++ WebCore/rendering/style/StyleFlexibleBoxData.h
+@@ -47,7 +47,6 @@ public:
+END
+
+my @gitLines = split("\n", $git_patch);
+my @svnLines = split("\n", $svn_patch);
+
+# New test: check each git header line with different line endings
+my $titleHeader = "gitdiff2svndiff: ";
+
+my @lineEndingPairs = ( # display name, value
+ ["", ""],
+ ["\\n", "\n"],
+ ["\\r\\n", "\r\n"],
+);
+
+for (my $i = 0; $i < @gitLines; $i++) {
+ foreach my $pair (@lineEndingPairs) {
+ my $gitLine = $gitLines[$i] . $pair->[1];
+ my $expected = $svnLines[$i] . $pair->[1];
+ my $title = $titleHeader . excerptString($gitLine);
+ $title .= " [line-end: \"$pair->[0]\"]";
+
+ ok($expected eq gitdiff2svndiff($gitLine), $title);
+ }
+}
+
+# New test
+my $title = "gitdiff2svndiff: Convert mnemonic git diff to svn diff";
+
+my @prefixes = (
+ { 'a' => 'i', 'b' => 'w' }, # git-diff (compares the (i)ndex and the (w)ork tree)
+ { 'a' => 'c', 'b' => 'w' }, # git-diff HEAD (compares a (c)ommit and the (w)ork tree)
+ { 'a' => 'c', 'b' => 'i' }, # git diff --cached (compares a (c)ommit and the (i)ndex)
+ { 'a' => 'o', 'b' => 'w' }, # git-diff HEAD:file1 file2 (compares an (o)bject and a (w)ork tree entity)
+ { 'a' => '1', 'b' => '2' }, # git diff --no-index a b (compares two non-git things (1) and (2))
+);
+
+my $out = "";
+
+foreach my $prefix (@prefixes) {
+ my $mnemonic_patch = $git_patch;
+ $mnemonic_patch =~ s/ a\// $prefix->{'a'}\//g;
+ $mnemonic_patch =~ s/ b\// $prefix->{'b'}\//g;
+
+ $out = "";
+ foreach my $line (split('\n', $mnemonic_patch)) {
+ $out .= gitdiff2svndiff($line) . "\n";
+ }
+
+ ok($svn_patch eq $out, $title . " (" . $prefix->{'a'} . "," . $prefix->{'b'} . ")");
+}
+
diff --git a/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl
new file mode 100644
index 0000000..2507d2d
--- /dev/null
+++ b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl
@@ -0,0 +1,328 @@
+#!/usr/bin/perl -w
+#
+# Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.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 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.
+
+# Unit tests of parseDiff().
+
+use strict;
+use warnings;
+
+use Test::More;
+use VCSUtils;
+
+my @diffHashRefKeys = ( # The $diffHashRef keys to check.
+ "copiedFromPath",
+ "indexPath",
+ "sourceRevision",
+ "svnConvertedText",
+);
+
+# The array of test cases.
+my @testCaseHashRefs = (
+{
+ # New test
+ diffName => "SVN: simple",
+ inputText => <<'END',
+Index: Makefile
+===================================================================
+--- Makefile (revision 53052)
++++ Makefile (working copy)
+@@ -1,3 +1,4 @@
++
+ MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools
+
+ all:
+END
+ # Header keys to check
+ svnConvertedText => <<'END', # Same as input text
+Index: Makefile
+===================================================================
+--- Makefile (revision 53052)
++++ Makefile (working copy)
+@@ -1,3 +1,4 @@
++
+ MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools
+
+ all:
+END
+ copiedFromPath => undef,
+ indexPath => "Makefile",
+ sourceRevision => "53052",
+ # Other values to check
+ lastReadLine => undef,
+ nextLine => undef,
+},
+{
+ # New test
+ diffName => "SVN: leading junk",
+ inputText => <<'END',
+
+LEADING JUNK
+
+Index: Makefile
+===================================================================
+--- Makefile (revision 53052)
++++ Makefile (working copy)
+@@ -1,3 +1,4 @@
++
+ MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools
+
+ all:
+END
+ # Header keys to check
+ svnConvertedText => <<'END', # Same as input text
+
+LEADING JUNK
+
+Index: Makefile
+===================================================================
+--- Makefile (revision 53052)
++++ Makefile (working copy)
+@@ -1,3 +1,4 @@
++
+ MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools
+
+ all:
+END
+ copiedFromPath => undef,
+ indexPath => "Makefile",
+ sourceRevision => "53052",
+ # Other values to check
+ lastReadLine => undef,
+ nextLine => undef,
+},
+{
+ # New test
+ diffName => "SVN: copied file",
+ inputText => <<'END',
+Index: Makefile_new
+===================================================================
+--- Makefile_new (revision 53131) (from Makefile:53131)
++++ Makefile_new (working copy)
+@@ -0,0 +1,1 @@
++MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools
+END
+ # Header keys to check
+ svnConvertedText => <<'END', # Same as input text
+Index: Makefile_new
+===================================================================
+--- Makefile_new (revision 53131) (from Makefile:53131)
++++ Makefile_new (working copy)
+@@ -0,0 +1,1 @@
++MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools
+END
+ copiedFromPath => "Makefile",
+ indexPath => "Makefile_new",
+ sourceRevision => "53131",
+ # Other values to check
+ lastReadLine => undef,
+ nextLine => undef,
+},
+{
+ # New test
+ diffName => "SVN: two diffs",
+ inputText => <<'END',
+Index: Makefile
+===================================================================
+--- Makefile (revision 53131)
++++ Makefile (working copy)
+@@ -1,1 +0,0 @@
+-MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools
+Index: Makefile_new
+===================================================================
+--- Makefile_new (revision 53131) (from Makefile:53131)
+END
+ # Header keys to check
+ svnConvertedText => <<'END',
+Index: Makefile
+===================================================================
+--- Makefile (revision 53131)
++++ Makefile (working copy)
+@@ -1,1 +0,0 @@
+-MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools
+END
+ copiedFromPath => undef,
+ indexPath => "Makefile",
+ sourceRevision => "53131",
+ # Other values to check
+ lastReadLine => "Index: Makefile_new\n",
+ nextLine => "===================================================================\n",
+},
+{
+ # New test
+ diffName => "SVN: SVN diff followed by Git diff", # Should not recognize Git start
+ inputText => <<'END',
+Index: Makefile
+===================================================================
+--- Makefile (revision 53131)
++++ Makefile (working copy)
+@@ -1,1 +0,0 @@
+-MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools
+diff --git a/Makefile b/Makefile
+index f5d5e74..3b6aa92 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,1 1,1 @@ public:
+END
+ # Header keys to check
+ svnConvertedText => <<'END', # Same as input text
+Index: Makefile
+===================================================================
+--- Makefile (revision 53131)
++++ Makefile (working copy)
+@@ -1,1 +0,0 @@
+-MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools
+diff --git a/Makefile b/Makefile
+index f5d5e74..3b6aa92 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,1 1,1 @@ public:
+END
+ copiedFromPath => undef,
+ indexPath => "Makefile",
+ sourceRevision => "53131",
+ # Other values to check
+ lastReadLine => undef,
+ nextLine => undef,
+},
+{
+ # New test
+ diffName => "Git: simple",
+ inputText => <<'END',
+diff --git a/Makefile b/Makefile
+index f5d5e74..3b6aa92 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,1 1,1 @@ public:
+END
+ # Header keys to check
+ svnConvertedText => <<'END',
+Index: Makefile
+===================================================================
+--- Makefile
++++ Makefile
+@@ -1,1 1,1 @@ public:
+END
+ copiedFromPath => undef,
+ indexPath => "Makefile",
+ sourceRevision => undef,
+ # Other values to check
+ lastReadLine => undef,
+ nextLine => undef,
+},
+{
+ # New test
+ diffName => "Git: Git diff followed by SVN diff", # Should not recognize SVN start
+ inputText => <<'END',
+diff --git a/Makefile b/Makefile
+index f5d5e74..3b6aa92 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,1 1,1 @@ public:
+Index: Makefile_new
+===================================================================
+--- Makefile_new (revision 53131) (from Makefile:53131)
+END
+ # Header keys to check
+ svnConvertedText => <<'END',
+Index: Makefile
+===================================================================
+--- Makefile
++++ Makefile
+@@ -1,1 1,1 @@ public:
+Index: Makefile_new
+===================================================================
+--- Makefile_new (revision 53131) (from Makefile:53131)
+END
+ copiedFromPath => undef,
+ indexPath => "Makefile",
+ sourceRevision => undef,
+ # Other values to check
+ lastReadLine => undef,
+ nextLine => undef,
+},
+);
+
+# Return the arguments for each assertion per test case.
+#
+# In particular, the number of assertions per test case is the length
+# of the return value of this subroutine on a sample input.
+#
+# Returns @assertionArgsArrayRefs:
+# $assertionArgsArrayRef: A reference to an array of parameters to pass
+# to each call to is(). The parameters are--
+# $got: The value obtained
+# $expected: The expected value
+# $testName: The name of the test
+sub testParseDiffAssertionArgs($)
+{
+ my ($testCaseHashRef) = @_;
+
+ my $fileHandle;
+ open($fileHandle, "<", \$testCaseHashRef->{inputText});
+
+ my $line = <$fileHandle>;
+
+ my ($diffHashRef, $lastReadLine) = VCSUtils::parseDiff($fileHandle, $line);
+
+ my $testNameStart = "parseDiff(): [$testCaseHashRef->{diffName}] ";
+
+ my @assertionArgsArrayRefs; # Return value
+ my @assertionArgs;
+ foreach my $diffHashRefKey (@diffHashRefKeys) {
+ my $testName = "${testNameStart}key=\"$diffHashRefKey\"";
+ @assertionArgs = ($diffHashRef->{$diffHashRefKey}, $testCaseHashRef->{$diffHashRefKey}, $testName);
+ push(@assertionArgsArrayRefs, \@assertionArgs);
+ }
+
+ @assertionArgs = ($lastReadLine, $testCaseHashRef->{lastReadLine}, "${testNameStart}lastReadLine");
+ push(@assertionArgsArrayRefs, \@assertionArgs);
+
+ my $nextLine = <$fileHandle>;
+ @assertionArgs = ($nextLine, $testCaseHashRef->{nextLine}, "${testNameStart}nextLine");
+ push(@assertionArgsArrayRefs, \@assertionArgs);
+
+ return @assertionArgsArrayRefs;
+}
+
+# Test parseDiff() for the given test case.
+sub testParseDiff($)
+{
+ my ($testCaseHashRef) = @_;
+
+ my @assertionArgsArrayRefs = testParseDiffAssertionArgs($testCaseHashRef);
+
+ foreach my $arrayRef (@assertionArgsArrayRefs) {
+ # The parameters are -- is($got, $expected, $testName).
+ is($arrayRef->[0], $arrayRef->[1], $arrayRef->[2]);
+ }
+}
+
+# Count the number of assertions per test case, using a sample test case.
+my $assertionCount = testParseDiffAssertionArgs($testCaseHashRefs[0]);
+
+plan(tests => @testCaseHashRefs * $assertionCount); # Total number of tests
+
+foreach my $testCaseHashRef (@testCaseHashRefs) {
+ testParseDiff($testCaseHashRef);
+}
diff --git a/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl
new file mode 100644
index 0000000..a7a3c26
--- /dev/null
+++ b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl
@@ -0,0 +1,288 @@
+#!/usr/bin/perl -w
+#
+# Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
+#
+# 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 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 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.
+
+# Unit tests of parseDiffHeader().
+
+use strict;
+use warnings;
+
+use Test::More;
+use VCSUtils;
+
+my @diffHeaderHashRefKeys = ( # The $diffHeaderHashRef keys to check.
+ "copiedFromPath",
+ "indexPath",
+ "sourceRevision",
+ "svnConvertedText",
+);
+
+# The array of test cases.
+my @testCaseHashRefs = (
+{
+ # New test
+ diffName => "SVN: simple",
+ inputText => <<'END',
+Index: WebKitTools/Scripts/VCSUtils.pm
+===================================================================
+--- WebKitTools/Scripts/VCSUtils.pm (revision 53004)
++++ WebKitTools/Scripts/VCSUtils.pm (working copy)
+@@ -32,6 +32,7 @@ use strict;
+ use warnings;
+END
+ # Header keys to check
+ svnConvertedText => <<'END',
+Index: WebKitTools/Scripts/VCSUtils.pm
+===================================================================
+--- WebKitTools/Scripts/VCSUtils.pm (revision 53004)
++++ WebKitTools/Scripts/VCSUtils.pm (working copy)
+END
+ copiedFromPath => undef,
+ indexPath => "WebKitTools/Scripts/VCSUtils.pm",
+ sourceRevision => "53004",
+ # Other values to check
+ lastReadLine => "@@ -32,6 +32,7 @@ use strict;\n",
+ nextLine => " use warnings;\n",
+},
+{
+ # New test
+ diffName => "SVN: new file",
+ inputText => <<'END',
+Index: WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl
+===================================================================
+--- WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl (revision 0)
++++ WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl (revision 0)
+@@ -0,0 +1,262 @@
++#!/usr/bin/perl -w
+END
+ # Header keys to check
+ svnConvertedText => <<'END',
+Index: WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl
+===================================================================
+--- WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl (revision 0)
++++ WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl (revision 0)
+END
+ copiedFromPath => undef,
+ indexPath => "WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl",
+ sourceRevision => undef,
+ # Other values to check
+ lastReadLine => "@@ -0,0 +1,262 @@\n",
+ nextLine => "+#!/usr/bin/perl -w\n",
+},
+{
+ # New test
+ diffName => "SVN: copy",
+ inputText => <<'END',
+Index: index_path.py
+===================================================================
+--- index_path.py (revision 53048) (from copied_from_path.py:53048)
++++ index_path.py (working copy)
+@@ -0,0 +1,7 @@
++# Python file...
+END
+ # Header keys to check
+ svnConvertedText => <<'END',
+Index: index_path.py
+===================================================================
+--- index_path.py (revision 53048) (from copied_from_path.py:53048)
++++ index_path.py (working copy)
+END
+ copiedFromPath => "copied_from_path.py",
+ indexPath => "index_path.py",
+ sourceRevision => 53048,
+ # Other values to check
+ lastReadLine => "@@ -0,0 +1,7 @@\n",
+ nextLine => "+# Python file...\n",
+},
+{
+ # New test
+ diffName => "SVN: \\r\\n lines",
+ inputText => <<END, # No single quotes to allow interpolation of "\r"
+Index: index_path.py\r
+===================================================================\r
+--- index_path.py (revision 53048) (from copied_from_path.py:53048)\r
++++ index_path.py (working copy)\r
+@@ -0,0 +1,7 @@\r
++# Python file...\r
+END
+ # Header keys to check
+ svnConvertedText => <<END, # No single quotes to allow interpolation of "\r"
+Index: index_path.py\r
+===================================================================\r
+--- index_path.py (revision 53048) (from copied_from_path.py:53048)\r
++++ index_path.py (working copy)\r
+END
+ copiedFromPath => "copied_from_path.py",
+ indexPath => "index_path.py",
+ sourceRevision => 53048,
+ # Other values to check
+ lastReadLine => "@@ -0,0 +1,7 @@\r\n",
+ nextLine => "+# Python file...\r\n",
+},
+{
+ # New test
+ diffName => "SVN: path corrections",
+ inputText => <<'END',
+Index: index_path.py
+===================================================================
+--- bad_path (revision 53048) (from copied_from_path.py:53048)
++++ bad_path (working copy)
+@@ -0,0 +1,7 @@
++# Python file...
+END
+ # Header keys to check
+ svnConvertedText => <<'END',
+Index: index_path.py
+===================================================================
+--- index_path.py (revision 53048) (from copied_from_path.py:53048)
++++ index_path.py (working copy)
+END
+ copiedFromPath => "copied_from_path.py",
+ indexPath => "index_path.py",
+ sourceRevision => 53048,
+ # Other values to check
+ lastReadLine => "@@ -0,0 +1,7 @@\n",
+ nextLine => "+# Python file...\n",
+},
+{
+ # New test
+ diffName => "Git: simple",
+ inputText => <<'END',
+diff --git a/WebCore/rendering/style/StyleFlexibleBoxData.h b/WebCore/rendering/style/StyleFlexibleBoxData.h
+index f5d5e74..3b6aa92 100644
+--- a/WebCore/rendering/style/StyleFlexibleBoxData.h
++++ b/WebCore/rendering/style/StyleFlexibleBoxData.h
+@@ -47,7 +47,6 @@ public:
+END
+ # Header keys to check
+ svnConvertedText => <<'END',
+Index: WebCore/rendering/style/StyleFlexibleBoxData.h
+===================================================================
+--- WebCore/rendering/style/StyleFlexibleBoxData.h
++++ WebCore/rendering/style/StyleFlexibleBoxData.h
+END
+ copiedFromPath => undef,
+ indexPath => "WebCore/rendering/style/StyleFlexibleBoxData.h",
+ sourceRevision => undef,
+ # Other values to check
+ lastReadLine => "@@ -47,7 +47,6 @@ public:\n",
+ nextLine => undef,
+},
+{
+ # New test
+ diffName => "Git: unrecognized lines",
+ inputText => <<'END',
+diff --git a/LayoutTests/http/tests/security/listener/xss-inactive-closure.html b/LayoutTests/http/tests/security/listener/xss-inactive-closure.html
+new file mode 100644
+index 0000000..3c9f114
+--- /dev/null
++++ b/LayoutTests/http/tests/security/listener/xss-inactive-closure.html
+@@ -0,0 +1,34 @@
++<html>
+END
+ # Header keys to check
+ svnConvertedText => <<'END',
+Index: LayoutTests/http/tests/security/listener/xss-inactive-closure.html
+===================================================================
+--- LayoutTests/http/tests/security/listener/xss-inactive-closure.html
++++ LayoutTests/http/tests/security/listener/xss-inactive-closure.html
+END
+ copiedFromPath => undef,
+ indexPath => "LayoutTests/http/tests/security/listener/xss-inactive-closure.html",
+ sourceRevision => undef,
+ # Other values to check
+ lastReadLine => "@@ -0,0 +1,34 @@\n",
+ nextLine => "+<html>\n",
+},
+);
+
+# Return the arguments for each assertion per test case.
+#
+# In particular, the number of assertions per test case is the length
+# of the return value of this subroutine on a sample input.
+#
+# Returns @assertionArgsArrayRefs:
+# $assertionArgsArrayRef: A reference to an array of parameters to pass
+# to each call to is(). The parameters are--
+# $got: The value obtained
+# $expected: The expected value
+# $testName: The name of the test
+sub testParseDiffHeaderAssertionArgs($)
+{
+ my ($testCaseHashRef) = @_;
+
+ my $fileHandle;
+ open($fileHandle, "<", \$testCaseHashRef->{inputText});
+
+ my $line = <$fileHandle>;
+
+ my ($headerHashRef, $lastReadLine) = VCSUtils::parseDiffHeader($fileHandle, $line);
+
+ my $testNameStart = "parseDiffHeader(): [$testCaseHashRef->{diffName}] ";
+
+ my @assertionArgsArrayRefs; # Return value
+ my @assertionArgs;
+ foreach my $diffHeaderHashRefKey (@diffHeaderHashRefKeys) {
+ my $testName = "${testNameStart}key=\"$diffHeaderHashRefKey\"";
+ @assertionArgs = ($headerHashRef->{$diffHeaderHashRefKey}, $testCaseHashRef->{$diffHeaderHashRefKey}, $testName);
+ push(@assertionArgsArrayRefs, \@assertionArgs);
+ }
+
+ @assertionArgs = ($lastReadLine, $testCaseHashRef->{lastReadLine}, "${testNameStart}lastReadLine");
+ push(@assertionArgsArrayRefs, \@assertionArgs);
+
+ my $nextLine = <$fileHandle>;
+ @assertionArgs = ($nextLine, $testCaseHashRef->{nextLine}, "${testNameStart}nextLine");
+ push(@assertionArgsArrayRefs, \@assertionArgs);
+
+ return @assertionArgsArrayRefs;
+}
+
+# Test parseDiffHeader() for the given test case.
+sub testParseDiffHeader($)
+{
+ my ($testCaseHashRef) = @_;
+
+ my @assertionArgsArrayRefs = testParseDiffHeaderAssertionArgs($testCaseHashRef);
+
+ foreach my $arrayRef (@assertionArgsArrayRefs) {
+ # The parameters are -- is($got, $expected, $testName).
+ is($arrayRef->[0], $arrayRef->[1], $arrayRef->[2]);
+ }
+}
+
+# Count the number of assertions per test case to calculate the total number
+# of Test::More tests. We could have used any test case for the count.
+my $assertionCount = testParseDiffHeaderAssertionArgs($testCaseHashRefs[0]);
+
+plan(tests => @testCaseHashRefs * $assertionCount); # Total number of tests
+
+foreach my $testCaseHashRef (@testCaseHashRefs) {
+ testParseDiffHeader($testCaseHashRef);
+}
diff --git a/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parsePatch.pl b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parsePatch.pl
new file mode 100644
index 0000000..e6f82ca
--- /dev/null
+++ b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parsePatch.pl
@@ -0,0 +1,102 @@
+#!/usr/bin/perl -w
+#
+# Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.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 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.
+
+# Unit tests of parseDiffHeader().
+
+use strict;
+use warnings;
+
+use Test::More;
+use VCSUtils;
+
+my @diffHashRefKeys = ( # The hash reference keys to check per diff.
+ "copiedFromPath",
+ "indexPath",
+ "sourceRevision",
+ "svnConvertedText",
+);
+
+# New test
+my $testNameStart = "parsePatch(): [SVN: Rename] ";
+my $patch = <<'END',
+Index: Makefile
+===================================================================
+--- Makefile (revision 53131)
++++ Makefile (working copy)
+@@ -1,1 +0,0 @@
+-MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools
+Index: Makefile_new
+===================================================================
+--- Makefile_new (revision 53131) (from Makefile:53131)
++++ Makefile_new (working copy)
+@@ -0,0 +1,1 @@
++MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools
+END
+
+my @expectedDiffHashRefs = (
+{
+ svnConvertedText => <<'END',
+Index: Makefile
+===================================================================
+--- Makefile (revision 53131)
++++ Makefile (working copy)
+@@ -1,1 +0,0 @@
+-MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools
+END
+ copiedFromPath => undef,
+ indexPath => "Makefile",
+ sourceRevision => "53131",
+},
+{
+ svnConvertedText => <<'END',
+Index: Makefile_new
+===================================================================
+--- Makefile_new (revision 53131) (from Makefile:53131)
++++ Makefile_new (working copy)
+@@ -0,0 +1,1 @@
++MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools
+END
+ copiedFromPath => "Makefile",
+ indexPath => "Makefile_new",
+ sourceRevision => "53131",
+},
+);
+
+plan(tests => @expectedDiffHashRefs * @diffHashRefKeys);
+
+my $fileHandle;
+open($fileHandle, "<", \$patch);
+
+my @gotDiffHashRefs = parsePatch($fileHandle);
+
+my $i = 0;
+foreach my $expectedDiffHashRef (@expectedDiffHashRefs) {
+
+ my $gotDiffHashRef = $gotDiffHashRefs[$i++];
+
+ foreach my $diffHashRefKey (@diffHashRefKeys) {
+ my $testName = "${testNameStart}[diff $i] key=\"$diffHashRefKey\"";
+ is($gotDiffHashRef->{$diffHashRefKey}, $expectedDiffHashRef->{$diffHashRefKey}, $testName);
+ }
+}
diff --git a/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/runPatchCommand.pl b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/runPatchCommand.pl
new file mode 100644
index 0000000..8111def
--- /dev/null
+++ b/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/runPatchCommand.pl
@@ -0,0 +1,105 @@
+#!/usr/bin/perl
+#
+# Copyright (C) 2009, 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
+#
+# 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.
+
+# Unit tests of VCSUtils::runPatchCommand().
+
+use Test::Simple tests => 4;
+use VCSUtils;
+
+# Call a function while suppressing STDERR.
+sub callSilently($@) {
+ my ($func, @args) = @_;
+
+ open(OLDERR, ">&STDERR");
+ close(STDERR);
+ my @returnValue = &$func(@args);
+ open(STDERR, ">&OLDERR");
+ close(OLDERR); # FIXME: Is this necessary?
+
+ return @returnValue;
+}
+
+# New test
+$title = "runPatchCommand: Unsuccessful patch, forcing.";
+
+# Since $patch has no "Index:" path, passing this to runPatchCommand
+# should not affect any files.
+my $patch = <<'END';
+Garbage patch contents
+END
+
+# We call via callSilently() to avoid output like the following to STDERR:
+# patch: **** Only garbage was found in the patch input.
+$argsHashRef = {ensureForce => 1};
+$exitStatus = callSilently(\&runPatchCommand, $patch, ".", "file_to_patch.txt", $argsHashRef);
+
+ok($exitStatus != 0, $title);
+
+# New test
+$title = "runPatchCommand: New file, --dry-run.";
+
+# This file should not exist after the tests, but we take care with the
+# file name and contents just in case.
+my $fileToPatch = "temp_OK_TO_ERASE__README_FOR_MORE.txt";
+$patch = <<END;
+Index: $fileToPatch
+===================================================================
+--- $fileToPatch (revision 0)
++++ $fileToPatch (revision 0)
+@@ -0,0 +1,5 @@
++This is a test file for WebKitTools/Scripts/VCSUtils_unittest.pl.
++This file should not have gotten created on your system.
++If it did, some unit tests don't seem to be working quite right:
++It would be great if you could file a bug report. Thanks!
++---------------------------------------------------------------------
+END
+
+# --dry-run prevents creating any files.
+# --silent suppresses the success message to STDOUT.
+$argsHashRef = {options => ["--dry-run", "--silent"]};
+$exitStatus = runPatchCommand($patch, ".", $fileToPatch, $argsHashRef);
+
+ok($exitStatus == 0, $title);
+
+# New test
+$title = "runPatchCommand: New file: \"$fileToPatch\".";
+
+$argsHashRef = {options => ["--silent"]};
+$exitStatus = runPatchCommand($patch, ".", $fileToPatch, $argsHashRef);
+
+ok($exitStatus == 0, $title);
+
+# New test
+$title = "runPatchCommand: Reverse new file (clean up previous).";
+
+$argsHashRef = {shouldReverse => 1,
+ options => ["--silent", "--remove-empty-files"]}; # To clean up.
+$exitStatus = runPatchCommand($patch, ".", $fileToPatch, $argsHashRef);
+ok($exitStatus == 0, $title);
diff --git a/WebKitTools/Scripts/webkitperl/httpd.pm b/WebKitTools/Scripts/webkitperl/httpd.pm
new file mode 100644
index 0000000..d082870
--- /dev/null
+++ b/WebKitTools/Scripts/webkitperl/httpd.pm
@@ -0,0 +1,202 @@
+# Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved
+# Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
+# Copyright (C) 2010 Andras Becsi (abecsi@inf.u-szeged.hu), University of Szeged
+#
+# 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.
+
+# Module to share code to start and stop the Apache daemon.
+
+use strict;
+use warnings;
+
+use File::Path;
+use File::Spec;
+use File::Spec::Functions;
+use IPC::Open2;
+
+use webkitdirs;
+
+BEGIN {
+ use Exporter ();
+ our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+ $VERSION = 1.00;
+ @ISA = qw(Exporter);
+ @EXPORT = qw(&getHTTPDPath &getDefaultConfigForTestDirectory &openHTTPD &closeHTTPD &getHTTPDPid &setShouldWaitForUserInterrupt);
+ %EXPORT_TAGS = ( );
+ @EXPORT_OK = ();
+}
+
+my $tmpDir = "/tmp";
+my $httpdPath;
+my $httpdPidDir = File::Spec->catfile($tmpDir, "WebKit");
+my $httpdPidFile = File::Spec->catfile($httpdPidDir, "httpd.pid");
+my $httpdPid;
+my $waitForUserInterrupt = 0;
+
+$SIG{'INT'} = 'cleanup';
+$SIG{'TERM'} = 'cleanup';
+
+sub getHTTPDPath
+{
+ if (isDebianBased()) {
+ $httpdPath = "/usr/sbin/apache2";
+ } else {
+ $httpdPath = "/usr/sbin/httpd";
+ }
+ return $httpdPath;
+}
+
+sub getDefaultConfigForTestDirectory
+{
+ my ($testDirectory) = @_;
+ die "No test directory has been specified." unless ($testDirectory);
+
+ my $httpdConfig;
+ getHTTPDPath();
+ if (isCygwin()) {
+ my $windowsConfDirectory = "$testDirectory/http/conf/";
+ unless (-x "/usr/lib/apache/libphp4.dll") {
+ copy("$windowsConfDirectory/libphp4.dll", "/usr/lib/apache/libphp4.dll");
+ chmod(0755, "/usr/lib/apache/libphp4.dll");
+ }
+ $httpdConfig = "$windowsConfDirectory/cygwin-httpd.conf";
+ } elsif (isDebianBased()) {
+ $httpdConfig = "$testDirectory/http/conf/apache2-debian-httpd.conf";
+ } elsif (isFedoraBased()) {
+ $httpdConfig = "$testDirectory/http/conf/fedora-httpd.conf";
+ } else {
+ $httpdConfig = "$testDirectory/http/conf/httpd.conf";
+ $httpdConfig = "$testDirectory/http/conf/apache2-httpd.conf" if `$httpdPath -v` =~ m|Apache/2|;
+ }
+
+ my $documentRoot = "$testDirectory/http/tests";
+ my $jsTestResourcesDirectory = $testDirectory . "/fast/js/resources";
+ my $typesConfig = "$testDirectory/http/conf/mime.types";
+ my $httpdLockFile = File::Spec->catfile($httpdPidDir, "httpd.lock");
+ my $httpdScoreBoardFile = File::Spec->catfile($httpdPidDir, "httpd.scoreboard");
+
+ my @httpdArgs = (
+ "-f", "$httpdConfig",
+ "-C", "DocumentRoot \"$documentRoot\"",
+ # Setup a link to where the js test templates are stored, use -c so that mod_alias will already be loaded.
+ "-c", "Alias /js-test-resources \"$jsTestResourcesDirectory\"",
+ "-c", "TypesConfig \"$typesConfig\"",
+ # Apache wouldn't run CGIs with permissions==700 otherwise
+ "-c", "User \"#$<\"",
+ "-c", "LockFile \"$httpdLockFile\"",
+ "-c", "PidFile \"$httpdPidFile\"",
+ "-c", "ScoreBoardFile \"$httpdScoreBoardFile\"",
+ );
+
+ # FIXME: Enable this on Windows once <rdar://problem/5345985> is fixed
+ # The version of Apache we use with Cygwin does not support SSL
+ my $sslCertificate = "$testDirectory/http/conf/webkit-httpd.pem";
+ push(@httpdArgs, "-c", "SSLCertificateFile \"$sslCertificate\"") unless isCygwin();
+
+ return @httpdArgs;
+
+}
+
+sub openHTTPD(@)
+{
+ my (@args) = @_;
+ die "No HTTPD configuration has been specified" unless (@args);
+ mkdir($httpdPidDir, 0755);
+ die "No write permissions to $httpdPidDir" unless (-w $httpdPidDir);
+
+ if (-f $httpdPidFile) {
+ open (PIDFILE, $httpdPidFile);
+ my $oldPid = <PIDFILE>;
+ chomp $oldPid;
+ close PIDFILE;
+ if (0 != kill 0, $oldPid) {
+ print "\nhttpd is already running: pid $oldPid, killing...\n";
+ kill 15, $oldPid;
+
+ my $retryCount = 20;
+ while ((kill(0, $oldPid) != 0) && $retryCount) {
+ sleep 1;
+ --$retryCount;
+ }
+
+ die "Timed out waiting for httpd to quit" unless $retryCount;
+ }
+ }
+
+ $httpdPath = "/usr/sbin/httpd" unless ($httpdPath);
+
+ open2(">&1", \*HTTPDIN, $httpdPath, @args);
+
+ my $retryCount = 20;
+ while (!-f $httpdPidFile && $retryCount) {
+ sleep 1;
+ --$retryCount;
+ }
+
+ if (!$retryCount) {
+ rmtree $httpdPidDir;
+ die "Timed out waiting for httpd to start";
+ }
+
+ $httpdPid = <PIDFILE> if open(PIDFILE, $httpdPidFile);
+ chomp $httpdPid if $httpdPid;
+ close PIDFILE;
+
+ waitpid($httpdPid, 0) if ($waitForUserInterrupt && $httpdPid);
+
+ return 1;
+}
+
+sub closeHTTPD
+{
+ close HTTPDIN;
+ if ($httpdPid) {
+ kill 15, $httpdPid;
+ my $retryCount = 20;
+ while (-f $httpdPidFile && $retryCount) {
+ sleep 1;
+ --$retryCount;
+ }
+
+ if (!$retryCount) {
+ print STDERR "Timed out waiting for httpd to terminate!\n";
+ return 0;
+ }
+ }
+ rmdir $httpdPidDir;
+ return 1;
+}
+
+sub setShouldWaitForUserInterrupt
+{
+ $waitForUserInterrupt = 1;
+}
+
+sub cleanup
+{
+ closeHTTPD();
+ print "\n";
+ exit(1);
+}
diff --git a/WebKitTools/Scripts/modules/BeautifulSoup.py b/WebKitTools/Scripts/webkitpy/BeautifulSoup.py
index 34204e7..34204e7 100644
--- a/WebKitTools/Scripts/modules/BeautifulSoup.py
+++ b/WebKitTools/Scripts/webkitpy/BeautifulSoup.py
diff --git a/WebKitTools/Scripts/webkitpy/BeautifulSoup.pyc b/WebKitTools/Scripts/webkitpy/BeautifulSoup.pyc
new file mode 100644
index 0000000..dffb144
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/BeautifulSoup.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/__init__.py b/WebKitTools/Scripts/webkitpy/__init__.py
new file mode 100644
index 0000000..94ecc70
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/__init__.py
@@ -0,0 +1,8 @@
+# Required for Python to search this directory for module files
+
+import autoinstall
+
+# List our third-party library dependencies here and where they can be
+# downloaded.
+autoinstall.bind("ClientForm", "http://pypi.python.org/packages/source/C/ClientForm/ClientForm-0.2.10.zip", "ClientForm-0.2.10")
+autoinstall.bind("mechanize", "http://pypi.python.org/packages/source/m/mechanize/mechanize-0.1.11.zip", "mechanize-0.1.11")
diff --git a/WebKitTools/Scripts/webkitpy/__init__.pyc b/WebKitTools/Scripts/webkitpy/__init__.pyc
new file mode 100644
index 0000000..d1ffa10
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/__init__.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/autoinstall.py b/WebKitTools/Scripts/webkitpy/autoinstall.py
new file mode 100644
index 0000000..467e6b4
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/autoinstall.py
@@ -0,0 +1,335 @@
+# Copyright (c) 2009, Daniel Krech 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 the Daniel Krech 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
+# HOLDER 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.
+
+"""\
+package loader for auto installing Python packages.
+
+A package loader in the spirit of Zero Install that can be used to
+inject dependencies into the import process.
+
+
+To install::
+
+ easy_install -U autoinstall
+
+ or
+
+ download, unpack, python setup.py install
+
+ or
+
+ try the bootstrap loader. See below.
+
+
+To use::
+
+ # You can bind any package name to a URL pointing to something
+ # that can be imported using the zipimporter.
+
+ autoinstall.bind("pymarc", "http://pypi.python.org/packages/2.5/p/pymarc/pymarc-2.1-py2.5.egg")
+
+ import pymarc
+
+ print pymarc.__version__, pymarc.__file__
+
+
+Changelog::
+
+- added support for non top level packages.
+- cache files now use filename part from URL.
+- applied patch from Eric Seidel <eseidel@google.com> to add support
+for loading modules where the module is not at the root of the .zip
+file.
+
+
+TODO::
+
+- a description of the intended use case
+- address other issues pointed out in:
+
+ http://mail.python.org/pipermail/python-dev/2008-March/077926.html
+
+Scribbles::
+
+pull vs. push
+user vs. system
+web vs. filesystem
+auto vs. manual
+
+manage development sandboxes
+
+optional interfaces...
+
+ def get_data(pathname) -> string with file data.
+
+ Return the data associated with 'pathname'. Raise IOError if
+ the file wasn't found.");
+
+ def is_package,
+ "is_package(fullname) -> bool.
+
+ Return True if the module specified by fullname is a package.
+ Raise ZipImportError is the module couldn't be found.");
+
+ def get_code,
+ "get_code(fullname) -> code object.
+
+ Return the code object for the specified module. Raise ZipImportError
+ is the module couldn't be found.");
+
+ def get_source,
+ "get_source(fullname) -> source string.
+
+ Return the source code for the specified module. Raise ZipImportError
+ is the module couldn't be found, return None if the archive does
+ contain the module, but has no source for it.");
+
+
+Autoinstall can also be bootstraped with the nascent package loader
+bootstrap module. For example::
+
+ # or via the bootstrap
+ # loader.
+
+ try:
+ _version = "0.2"
+ import autoinstall
+ if autoinstall.__version__ != _version:
+ raise ImportError("A different version than expected found.")
+ except ImportError, e:
+ # http://svn.python.org/projects/sandbox/trunk/bootstrap/bootstrap.py
+ import bootstrap
+ pypi = "http://pypi.python.org"
+ dir = "packages/source/a/autoinstall"
+ url = "%s/%s/autoinstall-%s.tar.gz" % (pypi, dir, _version)
+ bootstrap.main((url,))
+ import autoinstall
+
+References::
+
+ http://0install.net/
+ http://www.python.org/dev/peps/pep-0302/
+ http://svn.python.org/projects/sandbox/trunk/import_in_py
+ http://0install.net/injector-find.html
+ http://roscidus.com/desktop/node/903
+
+"""
+
+# To allow use of the "with" keyword for Python 2.5 users.
+from __future__ import with_statement
+
+__version__ = "0.2"
+__docformat__ = "restructuredtext en"
+
+import os
+import new
+import sys
+import urllib
+import logging
+import tempfile
+import zipimport
+
+_logger = logging.getLogger(__name__)
+
+
+_importer = None
+
+def _getImporter():
+ global _importer
+ if _importer is None:
+ _importer = Importer()
+ sys.meta_path.append(_importer)
+ return _importer
+
+def bind(package_name, url, zip_subpath=None):
+ """bind a top level package name to a URL.
+
+ The package name should be a package name and the url should be a
+ url to something that can be imported using the zipimporter.
+
+ Optional zip_subpath parameter allows searching for modules
+ below the root level of the zip file.
+ """
+ _getImporter().bind(package_name, url, zip_subpath)
+
+
+class Cache(object):
+
+ def __init__(self, directory=None):
+ if directory is None:
+ # Default to putting the cache directory in the same directory
+ # as this file.
+ containing_directory = os.path.dirname(__file__)
+ directory = os.path.join(containing_directory, "autoinstall.cache.d");
+
+ self.directory = directory
+ try:
+ if not os.path.exists(self.directory):
+ self._create_cache_directory()
+ except Exception, err:
+ _logger.exception(err)
+ self.cache_directry = tempfile.mkdtemp()
+ _logger.info("Using cache directory '%s'." % self.directory)
+
+ def _create_cache_directory(self):
+ _logger.debug("Creating cache directory '%s'." % self.directory)
+ os.mkdir(self.directory)
+ readme_path = os.path.join(self.directory, "README")
+ with open(readme_path, "w") as f:
+ f.write("This directory was auto-generated by '%s'.\n"
+ "It is safe to delete.\n" % __file__)
+
+ def get(self, url):
+ _logger.info("Getting '%s' from cache." % url)
+ filename = url.rsplit("/")[-1]
+
+ # so that source url is significant in determining cache hits
+ d = os.path.join(self.directory, "%s" % hash(url))
+ if not os.path.exists(d):
+ os.mkdir(d)
+
+ filename = os.path.join(d, filename)
+
+ if os.path.exists(filename):
+ _logger.debug("... already cached in file '%s'." % filename)
+ else:
+ _logger.debug("... not in cache. Caching in '%s'." % filename)
+ stream = file(filename, "wb")
+ self.download(url, stream)
+ stream.close()
+ return filename
+
+ def download(self, url, stream):
+ _logger.info("Downloading: %s" % url)
+ try:
+ netstream = urllib.urlopen(url)
+ code = 200
+ if hasattr(netstream, "getcode"):
+ code = netstream.getcode()
+ if not 200 <= code < 300:
+ raise ValueError("HTTP Error code %s" % code)
+ except Exception, err:
+ _logger.exception(err)
+
+ BUFSIZE = 2**13 # 8KB
+ size = 0
+ while True:
+ data = netstream.read(BUFSIZE)
+ if not data:
+ break
+ stream.write(data)
+ size += len(data)
+ netstream.close()
+ _logger.info("Downloaded %d bytes." % size)
+
+
+class Importer(object):
+
+ def __init__(self):
+ self.packages = {}
+ self.__cache = None
+
+ def __get_store(self):
+ return self.__store
+ store = property(__get_store)
+
+ def _get_cache(self):
+ if self.__cache is None:
+ self.__cache = Cache()
+ return self.__cache
+ def _set_cache(self, cache):
+ self.__cache = cache
+ cache = property(_get_cache, _set_cache)
+
+ def find_module(self, fullname, path=None):
+ """-> self or None.
+
+ Search for a module specified by 'fullname'. 'fullname' must be
+ the fully qualified (dotted) module name. It returns the
+ zipimporter instance itself if the module was found, or None if
+ it wasn't. The optional 'path' argument is ignored -- it's
+ there for compatibility with the importer protocol.");
+ """
+ _logger.debug("find_module(%s, path=%s)" % (fullname, path))
+
+ if fullname in self.packages:
+ (url, zip_subpath) = self.packages[fullname]
+ filename = self.cache.get(url)
+ zip_path = "%s/%s" % (filename, zip_subpath) if zip_subpath else filename
+ _logger.debug("fullname: %s url: %s path: %s zip_path: %s" % (fullname, url, path, zip_path))
+ try:
+ loader = zipimport.zipimporter(zip_path)
+ _logger.debug("returning: %s" % loader)
+ except Exception, e:
+ _logger.exception(e)
+ return None
+ return loader
+ return None
+
+ def bind(self, package_name, url, zip_subpath):
+ _logger.info("binding: %s -> %s subpath: %s" % (package_name, url, zip_subpath))
+ self.packages[package_name] = (url, zip_subpath)
+
+
+if __name__=="__main__":
+ import logging
+ #logging.basicConfig()
+ logger = logging.getLogger()
+
+ console = logging.StreamHandler()
+ console.setLevel(logging.DEBUG)
+ # set a format which is simpler for console use
+ formatter = logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s')
+ # tell the handler to use this format
+ console.setFormatter(formatter)
+ # add the handler to the root logger
+ logger.addHandler(console)
+ logger.setLevel(logging.INFO)
+
+ bind("pymarc", "http://pypi.python.org/packages/2.5/p/pymarc/pymarc-2.1-py2.5.egg")
+
+ import pymarc
+
+ print pymarc.__version__, pymarc.__file__
+
+ assert pymarc.__version__=="2.1"
+
+ d = _getImporter().cache.directory
+ assert d in pymarc.__file__, "'%s' not found in pymarc.__file__ (%s)" % (d, pymarc.__file__)
+
+ # Can now also bind to non top level packages. The packages
+ # leading up to the package being bound will need to be defined
+ # however.
+ #
+ # bind("rdf.plugins.stores.memory",
+ # "http://pypi.python.org/packages/2.5/r/rdf.plugins.stores.memeory/rdf.plugins.stores.memory-0.9a-py2.5.egg")
+ #
+ # from rdf.plugins.stores.memory import Memory
+
+
diff --git a/WebKitTools/Scripts/webkitpy/autoinstall.pyc b/WebKitTools/Scripts/webkitpy/autoinstall.pyc
new file mode 100644
index 0000000..68e46fd
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/autoinstall.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/bugzilla.py b/WebKitTools/Scripts/webkitpy/bugzilla.py
new file mode 100644
index 0000000..c1cf41d
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/bugzilla.py
@@ -0,0 +1,789 @@
+# Copyright (c) 2009 Google Inc. All rights reserved.
+# Copyright (c) 2009 Apple Inc. All rights reserved.
+# Copyright (c) 2010 Research In Motion Limited. 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.
+#
+# WebKit's Python module for interacting with Bugzilla
+
+import re
+import subprocess
+
+from datetime import datetime # used in timestamp()
+
+# Import WebKit-specific modules.
+from webkitpy.webkit_logging import error, log
+from webkitpy.committers import CommitterList
+from webkitpy.credentials import Credentials
+
+# WebKit includes a built copy of BeautifulSoup in Scripts/webkitpy
+# so this import should always succeed.
+from .BeautifulSoup import BeautifulSoup, SoupStrainer
+
+from mechanize import Browser
+
+
+def parse_bug_id(message):
+ match = re.search("http\://webkit\.org/b/(?P<bug_id>\d+)", message)
+ if match:
+ return int(match.group('bug_id'))
+ match = re.search(
+ Bugzilla.bug_server_regex + "show_bug\.cgi\?id=(?P<bug_id>\d+)",
+ message)
+ if match:
+ return int(match.group('bug_id'))
+ return None
+
+
+def timestamp():
+ return datetime.now().strftime("%Y%m%d%H%M%S")
+
+
+class Attachment(object):
+
+ def __init__(self, attachment_dictionary, bug):
+ self._attachment_dictionary = attachment_dictionary
+ self._bug = bug
+ self._reviewer = None
+ self._committer = None
+
+ def _bugzilla(self):
+ return self._bug._bugzilla
+
+ def id(self):
+ return int(self._attachment_dictionary.get("id"))
+
+ def attacher_is_committer(self):
+ return self._bugzilla.committers.committer_by_email(
+ patch.attacher_email())
+
+ def attacher_email(self):
+ return self._attachment_dictionary.get("attacher_email")
+
+ def bug(self):
+ return self._bug
+
+ def bug_id(self):
+ return int(self._attachment_dictionary.get("bug_id"))
+
+ def is_patch(self):
+ return not not self._attachment_dictionary.get("is_patch")
+
+ def is_obsolete(self):
+ return not not self._attachment_dictionary.get("is_obsolete")
+
+ def name(self):
+ return self._attachment_dictionary.get("name")
+
+ def review(self):
+ return self._attachment_dictionary.get("review")
+
+ def commit_queue(self):
+ return self._attachment_dictionary.get("commit-queue")
+
+ def url(self):
+ # FIXME: This should just return
+ # self._bugzilla().attachment_url_for_id(self.id()). scm_unittest.py
+ # depends on the current behavior.
+ return self._attachment_dictionary.get("url")
+
+ def _validate_flag_value(self, flag):
+ email = self._attachment_dictionary.get("%s_email" % flag)
+ if not email:
+ return None
+ committer = getattr(self._bugzilla().committers,
+ "%s_by_email" % flag)(email)
+ if committer:
+ return committer
+ log("Warning, attachment %s on bug %s has invalid %s (%s)" % (
+ self._attachment_dictionary['id'],
+ self._attachment_dictionary['bug_id'], flag, email))
+
+ def reviewer(self):
+ if not self._reviewer:
+ self._reviewer = self._validate_flag_value("reviewer")
+ return self._reviewer
+
+ def committer(self):
+ if not self._committer:
+ self._committer = self._validate_flag_value("committer")
+ return self._committer
+
+
+class Bug(object):
+ # FIXME: This class is kinda a hack for now. It exists so we have one
+ # place to hold bug logic, even if much of the code deals with
+ # dictionaries still.
+
+ def __init__(self, bug_dictionary, bugzilla):
+ self.bug_dictionary = bug_dictionary
+ self._bugzilla = bugzilla
+
+ def id(self):
+ return self.bug_dictionary["id"]
+
+ def assigned_to_email(self):
+ return self.bug_dictionary["assigned_to_email"]
+
+ # Rarely do we actually want obsolete attachments
+ def attachments(self, include_obsolete=False):
+ attachments = self.bug_dictionary["attachments"]
+ if not include_obsolete:
+ attachments = filter(lambda attachment:
+ not attachment["is_obsolete"], attachments)
+ return [Attachment(attachment, self) for attachment in attachments]
+
+ def patches(self, include_obsolete=False):
+ return [patch for patch in self.attachments(include_obsolete)
+ if patch.is_patch()]
+
+ def unreviewed_patches(self):
+ return [patch for patch in self.patches() if patch.review() == "?"]
+
+ def reviewed_patches(self, include_invalid=False):
+ patches = [patch for patch in self.patches() if patch.review() == "+"]
+ if include_invalid:
+ return patches
+ # Checking reviewer() ensures that it was both reviewed and has a valid
+ # reviewer.
+ return filter(lambda patch: patch.reviewer(), patches)
+
+ def commit_queued_patches(self, include_invalid=False):
+ patches = [patch for patch in self.patches()
+ if patch.commit_queue() == "+"]
+ if include_invalid:
+ return patches
+ # Checking committer() ensures that it was both commit-queue+'d and has
+ # a valid committer.
+ return filter(lambda patch: patch.committer(), patches)
+
+
+# A container for all of the logic for making and parsing buzilla queries.
+class BugzillaQueries(object):
+
+ def __init__(self, bugzilla):
+ self._bugzilla = bugzilla
+
+ # Note: _load_query and _fetch_bug are the only two methods which access
+ # self._bugzilla.
+
+ def _load_query(self, query):
+ self._bugzilla.authenticate()
+
+ full_url = "%s%s" % (self._bugzilla.bug_server_url, query)
+ return self._bugzilla.browser.open(full_url)
+
+ def _fetch_bug(self, bug_id):
+ return self._bugzilla.fetch_bug(bug_id)
+
+ def _fetch_bug_ids_advanced_query(self, query):
+ soup = BeautifulSoup(self._load_query(query))
+ # The contents of the <a> inside the cells in the first column happen
+ # to be the bug id.
+ return [int(bug_link_cell.find("a").string)
+ for bug_link_cell in soup('td', "first-child")]
+
+ def _parse_attachment_ids_request_query(self, page):
+ digits = re.compile("\d+")
+ attachment_href = re.compile("attachment.cgi\?id=\d+&action=review")
+ attachment_links = SoupStrainer("a", href=attachment_href)
+ return [int(digits.search(tag["href"]).group(0))
+ for tag in BeautifulSoup(page, parseOnlyThese=attachment_links)]
+
+ def _fetch_attachment_ids_request_query(self, query):
+ return self._parse_attachment_ids_request_query(self._load_query(query))
+
+ # List of all r+'d bugs.
+ def fetch_bug_ids_from_pending_commit_list(self):
+ needs_commit_query_url = "buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=review%2B"
+ return self._fetch_bug_ids_advanced_query(needs_commit_query_url)
+
+ def fetch_patches_from_pending_commit_list(self):
+ return sum([self._fetch_bug(bug_id).reviewed_patches()
+ for bug_id in self.fetch_bug_ids_from_pending_commit_list()], [])
+
+ def fetch_bug_ids_from_commit_queue(self):
+ commit_queue_url = "buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=commit-queue%2B&order=Last+Changed"
+ return self._fetch_bug_ids_advanced_query(commit_queue_url)
+
+ def fetch_patches_from_commit_queue(self):
+ # This function will only return patches which have valid committers
+ # set. It won't reject patches with invalid committers/reviewers.
+ return sum([self._fetch_bug(bug_id).commit_queued_patches()
+ for bug_id in self.fetch_bug_ids_from_commit_queue()], [])
+
+ def _fetch_bug_ids_from_review_queue(self):
+ review_queue_url = "buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=review?"
+ return self._fetch_bug_ids_advanced_query(review_queue_url)
+
+ def fetch_patches_from_review_queue(self, limit=None):
+ # [:None] returns the whole array.
+ return sum([self._fetch_bug(bug_id).unreviewed_patches()
+ for bug_id in self._fetch_bug_ids_from_review_queue()[:limit]], [])
+
+ # FIXME: Why do we have both fetch_patches_from_review_queue and
+ # fetch_attachment_ids_from_review_queue??
+ # NOTE: This is also the only client of _fetch_attachment_ids_request_query
+
+ def fetch_attachment_ids_from_review_queue(self):
+ review_queue_url = "request.cgi?action=queue&type=review&group=type"
+ return self._fetch_attachment_ids_request_query(review_queue_url)
+
+
+class CommitterValidator(object):
+
+ def __init__(self, bugzilla):
+ self._bugzilla = bugzilla
+
+ # _view_source_url belongs in some sort of webkit_config.py module.
+ def _view_source_url(self, local_path):
+ return "http://trac.webkit.org/browser/trunk/%s" % local_path
+
+ def _flag_permission_rejection_message(self, setter_email, flag_name):
+ # This could be computed from CommitterList.__file__
+ committer_list = "WebKitTools/Scripts/webkitpy/committers.py"
+ # Should come from some webkit_config.py
+ contribution_guidlines = "http://webkit.org/coding/contributing.html"
+ # This could be queried from the status_server.
+ queue_administrator = "eseidel@chromium.org"
+ # This could be queried from the tool.
+ queue_name = "commit-queue"
+ message = "%s does not have %s permissions according to %s." % (
+ setter_email,
+ flag_name,
+ self._view_source_url(committer_list))
+ message += "\n\n- If you do not have %s rights please read %s for instructions on how to use bugzilla flags." % (
+ 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, committer_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)
+ return message
+
+ def _validate_setter_email(self, patch, result_key, rejection_function):
+ committer = getattr(patch, result_key)()
+ # If the flag is set, and we don't recognize the setter, reject the
+ # flag!
+ setter_email = patch._attachment_dictionary.get("%s_email" % result_key)
+ if setter_email and not committer:
+ rejection_function(patch.id(),
+ self._flag_permission_rejection_message(setter_email,
+ result_key))
+ return False
+ return True
+
+ def patches_after_rejecting_invalid_commiters_and_reviewers(self, patches):
+ validated_patches = []
+ for patch in patches:
+ if (self._validate_setter_email(
+ patch, "reviewer", self.reject_patch_from_review_queue)
+ and self._validate_setter_email(
+ patch, "committer", self.reject_patch_from_commit_queue)):
+ validated_patches.append(patch)
+ return validated_patches
+
+ def reject_patch_from_commit_queue(self,
+ attachment_id,
+ additional_comment_text=None):
+ comment_text = "Rejecting patch %s from commit-queue." % attachment_id
+ self._bugzilla.set_flag_on_attachment(attachment_id,
+ "commit-queue",
+ "-",
+ comment_text,
+ additional_comment_text)
+
+ def reject_patch_from_review_queue(self,
+ attachment_id,
+ additional_comment_text=None):
+ comment_text = "Rejecting patch %s from review queue." % attachment_id
+ self._bugzilla.set_flag_on_attachment(attachment_id,
+ 'review',
+ '-',
+ comment_text,
+ additional_comment_text)
+
+
+class Bugzilla(object):
+
+ def __init__(self, dryrun=False, committers=CommitterList()):
+ self.dryrun = dryrun
+ self.authenticated = False
+ self.queries = BugzillaQueries(self)
+ self.committers = committers
+
+ # FIXME: We should use some sort of Browser mock object when in dryrun
+ # mode (to prevent any mistakes).
+ self.browser = Browser()
+ # Ignore bugs.webkit.org/robots.txt until we fix it to allow this
+ # script.
+ self.browser.set_handle_robots(False)
+
+ # FIXME: Much of this should go into some sort of config module:
+ bug_server_host = "bugs.webkit.org"
+ bug_server_regex = "https?://%s/" % re.sub('\.', '\\.', bug_server_host)
+ bug_server_url = "https://%s/" % bug_server_host
+ unassigned_email = "webkit-unassigned@lists.webkit.org"
+
+ def bug_url_for_bug_id(self, bug_id, xml=False):
+ content_type = "&ctype=xml" if xml else ""
+ return "%sshow_bug.cgi?id=%s%s" % (self.bug_server_url,
+ bug_id,
+ content_type)
+
+ def short_bug_url_for_bug_id(self, bug_id):
+ return "http://webkit.org/b/%s" % bug_id
+
+ def attachment_url_for_id(self, attachment_id, action="view"):
+ action_param = ""
+ if action and action != "view":
+ action_param = "&action=%s" % action
+ return "%sattachment.cgi?id=%s%s" % (self.bug_server_url,
+ attachment_id,
+ action_param)
+
+ def _parse_attachment_flag(self,
+ element,
+ flag_name,
+ attachment,
+ result_key):
+ flag = element.find('flag', attrs={'name': flag_name})
+ if flag:
+ attachment[flag_name] = flag['status']
+ if flag['status'] == '+':
+ attachment[result_key] = flag['setter']
+
+ def _parse_attachment_element(self, element, bug_id):
+ attachment = {}
+ attachment['bug_id'] = bug_id
+ attachment['is_obsolete'] = (element.has_key('isobsolete') and element['isobsolete'] == "1")
+ attachment['is_patch'] = (element.has_key('ispatch') and element['ispatch'] == "1")
+ attachment['id'] = int(element.find('attachid').string)
+ # FIXME: No need to parse out the url here.
+ attachment['url'] = self.attachment_url_for_id(attachment['id'])
+ attachment['name'] = unicode(element.find('desc').string)
+ attachment['attacher_email'] = str(element.find('attacher').string)
+ attachment['type'] = str(element.find('type').string)
+ self._parse_attachment_flag(
+ element, 'review', attachment, 'reviewer_email')
+ self._parse_attachment_flag(
+ element, 'commit-queue', attachment, 'committer_email')
+ return attachment
+
+ def _parse_bug_page(self, page):
+ soup = BeautifulSoup(page)
+ bug = {}
+ bug["id"] = int(soup.find("bug_id").string)
+ bug["title"] = unicode(soup.find("short_desc").string)
+ bug["reporter_email"] = str(soup.find("reporter").string)
+ bug["assigned_to_email"] = str(soup.find("assigned_to").string)
+ bug["cc_emails"] = [str(element.string)
+ for element in soup.findAll('cc')]
+ bug["attachments"] = [self._parse_attachment_element(element, bug["id"]) for element in soup.findAll('attachment')]
+ return bug
+
+ # Makes testing fetch_*_from_bug() possible until we have a better
+ # BugzillaNetwork abstration.
+
+ def _fetch_bug_page(self, bug_id):
+ bug_url = self.bug_url_for_bug_id(bug_id, xml=True)
+ log("Fetching: %s" % bug_url)
+ return self.browser.open(bug_url)
+
+ def fetch_bug_dictionary(self, bug_id):
+ return self._parse_bug_page(self._fetch_bug_page(bug_id))
+
+ # FIXME: A BugzillaCache object should provide all these fetch_ methods.
+
+ def fetch_bug(self, bug_id):
+ return Bug(self.fetch_bug_dictionary(bug_id), self)
+
+ def _parse_bug_id_from_attachment_page(self, page):
+ # The "Up" relation happens to point to the bug.
+ up_link = BeautifulSoup(page).find('link', rel='Up')
+ if not up_link:
+ # This attachment does not exist (or you don't have permissions to
+ # view it).
+ return None
+ match = re.search("show_bug.cgi\?id=(?P<bug_id>\d+)", up_link['href'])
+ return int(match.group('bug_id'))
+
+ def bug_id_for_attachment_id(self, attachment_id):
+ self.authenticate()
+
+ attachment_url = self.attachment_url_for_id(attachment_id, 'edit')
+ log("Fetching: %s" % attachment_url)
+ page = self.browser.open(attachment_url)
+ return self._parse_bug_id_from_attachment_page(page)
+
+ # FIXME: This should just return Attachment(id), which should be able to
+ # lazily fetch needed data.
+
+ def fetch_attachment(self, attachment_id):
+ # We could grab all the attachment details off of the attachment edit
+ # page but we already have working code to do so off of the bugs page,
+ # so re-use that.
+ bug_id = self.bug_id_for_attachment_id(attachment_id)
+ if not bug_id:
+ return None
+ attachments = self.fetch_bug(bug_id).attachments(include_obsolete=True)
+ for attachment in attachments:
+ if attachment.id() == int(attachment_id):
+ return attachment
+ return None # This should never be hit.
+
+ def authenticate(self):
+ if self.authenticated:
+ return
+
+ if self.dryrun:
+ log("Skipping log in for dry run...")
+ self.authenticated = True
+ return
+
+ attempts = 0
+ while not self.authenticated:
+ attempts += 1
+ (username, password) = Credentials(
+ self.bug_server_host, git_prefix="bugzilla").read_credentials()
+
+ log("Logging in as %s..." % username)
+ self.browser.open(self.bug_server_url +
+ "index.cgi?GoAheadAndLogIn=1")
+ self.browser.select_form(name="login")
+ self.browser['Bugzilla_login'] = username
+ self.browser['Bugzilla_password'] = password
+ response = self.browser.submit()
+
+ match = re.search("<title>(.+?)</title>", response.read())
+ # If the resulting page has a title, and it contains the word
+ # "invalid" assume it's the login failure page.
+ if match and re.search("Invalid", match.group(1), re.IGNORECASE):
+ errorMessage = "Bugzilla login failed: %s" % match.group(1)
+ # raise an exception only if this was the last attempt
+ if attempts < 5:
+ log(errorMessage)
+ else:
+ raise Exception(errorMessage)
+ else:
+ self.authenticated = True
+
+ def _fill_attachment_form(self,
+ description,
+ patch_file_object,
+ comment_text=None,
+ mark_for_review=False,
+ mark_for_commit_queue=False,
+ mark_for_landing=False, bug_id=None):
+ self.browser['description'] = description
+ self.browser['ispatch'] = ("1",)
+ self.browser['flag_type-1'] = ('?',) if mark_for_review else ('X',)
+
+ if mark_for_landing:
+ self.browser['flag_type-3'] = ('+',)
+ elif mark_for_commit_queue:
+ self.browser['flag_type-3'] = ('?',)
+ else:
+ self.browser['flag_type-3'] = ('X',)
+
+ if bug_id:
+ patch_name = "bug-%s-%s.patch" % (bug_id, timestamp())
+ else:
+ patch_name ="%s.patch" % timestamp()
+ self.browser.add_file(patch_file_object,
+ "text/plain",
+ patch_name,
+ 'data')
+
+ def add_patch_to_bug(self,
+ bug_id,
+ patch_file_object,
+ description,
+ comment_text=None,
+ mark_for_review=False,
+ mark_for_commit_queue=False,
+ mark_for_landing=False):
+ self.authenticate()
+
+ log('Adding patch "%s" to %sshow_bug.cgi?id=%s' % (description,
+ self.bug_server_url,
+ bug_id))
+
+ if self.dryrun:
+ log(comment_text)
+ return
+
+ self.browser.open("%sattachment.cgi?action=enter&bugid=%s" % (
+ self.bug_server_url, bug_id))
+ self.browser.select_form(name="entryform")
+ self._fill_attachment_form(description,
+ patch_file_object,
+ mark_for_review=mark_for_review,
+ mark_for_commit_queue=mark_for_commit_queue,
+ mark_for_landing=mark_for_landing,
+ bug_id=bug_id)
+ if comment_text:
+ log(comment_text)
+ self.browser['comment'] = comment_text
+ self.browser.submit()
+
+ def prompt_for_component(self, components):
+ log("Please pick a component:")
+ i = 0
+ for name in components:
+ i += 1
+ log("%2d. %s" % (i, name))
+ result = int(raw_input("Enter a number: ")) - 1
+ return components[result]
+
+ def _check_create_bug_response(self, response_html):
+ match = re.search("<title>Bug (?P<bug_id>\d+) Submitted</title>",
+ response_html)
+ if match:
+ return match.group('bug_id')
+
+ match = re.search(
+ '<div id="bugzilla-body">(?P<error_message>.+)<div id="footer">',
+ response_html,
+ re.DOTALL)
+ error_message = "FAIL"
+ if match:
+ text_lines = BeautifulSoup(
+ match.group('error_message')).findAll(text=True)
+ error_message = "\n" + '\n'.join(
+ [" " + line.strip()
+ for line in text_lines if line.strip()])
+ raise Exception("Bug not created: %s" % error_message)
+
+ def create_bug(self,
+ bug_title,
+ bug_description,
+ component=None,
+ patch_file_object=None,
+ patch_description=None,
+ cc=None,
+ mark_for_review=False,
+ mark_for_commit_queue=False):
+ self.authenticate()
+
+ log('Creating bug with title "%s"' % bug_title)
+ if self.dryrun:
+ log(bug_description)
+ return
+
+ self.browser.open(self.bug_server_url + "enter_bug.cgi?product=WebKit")
+ self.browser.select_form(name="Create")
+ component_items = self.browser.find_control('component').items
+ component_names = map(lambda item: item.name, component_items)
+ if not component:
+ component = "New Bugs"
+ if component not in component_names:
+ component = self.prompt_for_component(component_names)
+ self.browser['component'] = [component]
+ if cc:
+ self.browser['cc'] = cc
+ self.browser['short_desc'] = bug_title
+ self.browser['comment'] = bug_description
+
+ if patch_file_object:
+ self._fill_attachment_form(
+ patch_description,
+ patch_file_object,
+ mark_for_review=mark_for_review,
+ mark_for_commit_queue=mark_for_commit_queue)
+
+ response = self.browser.submit()
+
+ bug_id = self._check_create_bug_response(response.read())
+ log("Bug %s created." % bug_id)
+ log("%sshow_bug.cgi?id=%s" % (self.bug_server_url, bug_id))
+ return bug_id
+
+ def _find_select_element_for_flag(self, flag_name):
+ # FIXME: This will break if we ever re-order attachment flags
+ if flag_name == "review":
+ return self.browser.find_control(type='select', nr=0)
+ if flag_name == "commit-queue":
+ return self.browser.find_control(type='select', nr=1)
+ raise Exception("Don't know how to find flag named \"%s\"" % flag_name)
+
+ def clear_attachment_flags(self,
+ attachment_id,
+ additional_comment_text=None):
+ self.authenticate()
+
+ comment_text = "Clearing flags on attachment: %s" % attachment_id
+ if additional_comment_text:
+ comment_text += "\n\n%s" % additional_comment_text
+ log(comment_text)
+
+ if self.dryrun:
+ return
+
+ self.browser.open(self.attachment_url_for_id(attachment_id, 'edit'))
+ self.browser.select_form(nr=1)
+ self.browser.set_value(comment_text, name='comment', nr=0)
+ self._find_select_element_for_flag('review').value = ("X",)
+ self._find_select_element_for_flag('commit-queue').value = ("X",)
+ self.browser.submit()
+
+ def set_flag_on_attachment(self,
+ attachment_id,
+ flag_name,
+ flag_value,
+ comment_text,
+ additional_comment_text):
+ # FIXME: We need a way to test this function on a live bugzilla
+ # instance.
+
+ self.authenticate()
+
+ if additional_comment_text:
+ comment_text += "\n\n%s" % additional_comment_text
+ log(comment_text)
+
+ if self.dryrun:
+ return
+
+ self.browser.open(self.attachment_url_for_id(attachment_id, 'edit'))
+ self.browser.select_form(nr=1)
+ self.browser.set_value(comment_text, name='comment', nr=0)
+ self._find_select_element_for_flag(flag_name).value = (flag_value,)
+ self.browser.submit()
+
+ # FIXME: All of these bug editing methods have a ridiculous amount of
+ # copy/paste code.
+
+ def obsolete_attachment(self, attachment_id, comment_text=None):
+ self.authenticate()
+
+ log("Obsoleting attachment: %s" % attachment_id)
+ if self.dryrun:
+ log(comment_text)
+ return
+
+ self.browser.open(self.attachment_url_for_id(attachment_id, 'edit'))
+ self.browser.select_form(nr=1)
+ self.browser.find_control('isobsolete').items[0].selected = True
+ # Also clear any review flag (to remove it from review/commit queues)
+ self._find_select_element_for_flag('review').value = ("X",)
+ self._find_select_element_for_flag('commit-queue').value = ("X",)
+ if comment_text:
+ log(comment_text)
+ # Bugzilla has two textareas named 'comment', one is somehow
+ # hidden. We want the first.
+ self.browser.set_value(comment_text, name='comment', nr=0)
+ self.browser.submit()
+
+ def add_cc_to_bug(self, bug_id, email_address_list):
+ self.authenticate()
+
+ log("Adding %s to the CC list for bug %s" % (email_address_list,
+ bug_id))
+ if self.dryrun:
+ return
+
+ self.browser.open(self.bug_url_for_bug_id(bug_id))
+ self.browser.select_form(name="changeform")
+ self.browser["newcc"] = ", ".join(email_address_list)
+ self.browser.submit()
+
+ def post_comment_to_bug(self, bug_id, comment_text, cc=None):
+ self.authenticate()
+
+ log("Adding comment to bug %s" % bug_id)
+ if self.dryrun:
+ log(comment_text)
+ return
+
+ self.browser.open(self.bug_url_for_bug_id(bug_id))
+ self.browser.select_form(name="changeform")
+ self.browser["comment"] = comment_text
+ if cc:
+ self.browser["newcc"] = ", ".join(cc)
+ self.browser.submit()
+
+ def close_bug_as_fixed(self, bug_id, comment_text=None):
+ self.authenticate()
+
+ log("Closing bug %s as fixed" % bug_id)
+ if self.dryrun:
+ log(comment_text)
+ return
+
+ self.browser.open(self.bug_url_for_bug_id(bug_id))
+ self.browser.select_form(name="changeform")
+ if comment_text:
+ log(comment_text)
+ self.browser['comment'] = comment_text
+ self.browser['bug_status'] = ['RESOLVED']
+ self.browser['resolution'] = ['FIXED']
+ self.browser.submit()
+
+ def reassign_bug(self, bug_id, assignee, comment_text=None):
+ self.authenticate()
+
+ log("Assigning bug %s to %s" % (bug_id, assignee))
+ if self.dryrun:
+ log(comment_text)
+ return
+
+ self.browser.open(self.bug_url_for_bug_id(bug_id))
+ self.browser.select_form(name="changeform")
+ if comment_text:
+ log(comment_text)
+ self.browser["comment"] = comment_text
+ self.browser["assigned_to"] = assignee
+ self.browser.submit()
+
+ def reopen_bug(self, bug_id, comment_text):
+ self.authenticate()
+
+ log("Re-opening bug %s" % bug_id)
+ # Bugzilla requires a comment when re-opening a bug, so we know it will
+ # never be None.
+ log(comment_text)
+ if self.dryrun:
+ return
+
+ self.browser.open(self.bug_url_for_bug_id(bug_id))
+ self.browser.select_form(name="changeform")
+ bug_status = self.browser.find_control("bug_status", type="select")
+ # This is a hack around the fact that ClientForm.ListControl seems to
+ # have no simpler way to ask if a control has an item named "REOPENED"
+ # without using exceptions for control flow.
+ possible_bug_statuses = map(lambda item: item.name, bug_status.items)
+ if "REOPENED" in possible_bug_statuses:
+ bug_status.value = ["REOPENED"]
+ else:
+ log("Did not reopen bug %s. " +
+ "It appears to already be open with status %s." % (
+ bug_id, bug_status.value))
+ self.browser['comment'] = comment_text
+ self.browser.submit()
diff --git a/WebKitTools/Scripts/webkitpy/bugzilla.pyc b/WebKitTools/Scripts/webkitpy/bugzilla.pyc
new file mode 100644
index 0000000..dfde47c
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/bugzilla.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/modules/bugzilla_unittest.py b/WebKitTools/Scripts/webkitpy/bugzilla_unittest.py
index fb7f8c4..d555f78 100644
--- a/WebKitTools/Scripts/modules/bugzilla_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/bugzilla_unittest.py
@@ -28,13 +28,39 @@
import unittest
-from modules.committers import CommitterList, Reviewer, Committer
-from modules.bugzilla import Bugzilla, parse_bug_id
+from webkitpy.committers import CommitterList, Reviewer, Committer
+from webkitpy.bugzilla import Bugzilla, BugzillaQueries, parse_bug_id, CommitterValidator
+from webkitpy.outputcapture import OutputCapture
+from webkitpy.mock import Mock
-from modules.BeautifulSoup import BeautifulSoup
+from webkitpy.BeautifulSoup import BeautifulSoup
-class BugzillaTest(unittest.TestCase):
+class MockBrowser(object):
+ def open(self, url):
+ pass
+
+ def select_form(self, name):
+ pass
+
+ def __setitem__(self, key, value):
+ pass
+
+ def submit(self):
+ pass
+
+class CommitterValidatorTest(unittest.TestCase):
+ def test_flag_permission_rejection_message(self):
+ validator = CommitterValidator(bugzilla=None)
+ expected_messsage="""foo@foo.com does not have review permissions according to http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/committers.py.
+
+- 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/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."""
+ self.assertEqual(validator._flag_permission_rejection_message("foo@foo.com", "review"), expected_messsage)
+
+
+class BugzillaTest(unittest.TestCase):
_example_attachment = '''
<attachment
isobsolete="1"
@@ -88,20 +114,110 @@ class BugzillaTest(unittest.TestCase):
self.assertEquals(None, parse_bug_id("http://www.webkit.org/b/12345"))
self.assertEquals(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?ctype=xml&id=12345"))
+ _example_bug = """
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/bugzilla.dtd">
+<bugzilla version="3.2.3"
+ urlbase="https://bugs.webkit.org/"
+ maintainer="admin@webkit.org"
+ exporter="eric@webkit.org"
+>
+ <bug>
+ <bug_id>32585</bug_id>
+ <creation_ts>2009-12-15 15:17 PST</creation_ts>
+ <short_desc>bug to test webkit-patch and commit-queue failures</short_desc>
+ <delta_ts>2009-12-27 21:04:50 PST</delta_ts>
+ <reporter_accessible>1</reporter_accessible>
+ <cclist_accessible>1</cclist_accessible>
+ <classification_id>1</classification_id>
+ <classification>Unclassified</classification>
+ <product>WebKit</product>
+ <component>Tools / Tests</component>
+ <version>528+ (Nightly build)</version>
+ <rep_platform>PC</rep_platform>
+ <op_sys>Mac OS X 10.5</op_sys>
+ <bug_status>NEW</bug_status>
+ <priority>P2</priority>
+ <bug_severity>Normal</bug_severity>
+ <target_milestone>---</target_milestone>
+ <everconfirmed>1</everconfirmed>
+ <reporter name="Eric Seidel">eric@webkit.org</reporter>
+ <assigned_to name="Nobody">webkit-unassigned@lists.webkit.org</assigned_to>
+ <cc>foo@bar.com</cc>
+ <cc>example@example.com</cc>
+ <long_desc isprivate="0">
+ <who name="Eric Seidel">eric@webkit.org</who>
+ <bug_when>2009-12-15 15:17:28 PST</bug_when>
+ <thetext>bug to test webkit-patch and commit-queue failures
+Ignore this bug. Just for testing failure modes of webkit-patch and the commit-queue.</thetext>
+ </long_desc>
+ <attachment
+ isobsolete="0"
+ ispatch="1"
+ isprivate="0"
+ >
+ <attachid>45548</attachid>
+ <date>2009-12-27 23:51 PST</date>
+ <desc>Patch</desc>
+ <filename>bug-32585-20091228005112.patch</filename>
+ <type>text/plain</type>
+ <size>10882</size>
+ <attacher>mjs@apple.com</attacher>
+
+ <token>1261988248-dc51409e9c421a4358f365fa8bec8357</token>
+ <data encoding="base64">SW5kZXg6IFdlYktpdC9tYWMvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
+removed-because-it-was-really-long
+ZEZpbmlzaExvYWRXaXRoUmVhc29uOnJlYXNvbl07Cit9CisKIEBlbmQKIAogI2VuZGlmCg==
+</data>
+
+ <flag name="review"
+ id="27602"
+ status="?"
+ setter="mjs@apple.com"
+ />
+ </attachment>
+ </bug>
+</bugzilla>
+"""
+ _expected_example_bug_parsing = {
+ "id" : 32585,
+ "title" : u"bug to test webkit-patch and commit-queue failures",
+ "cc_emails" : ["foo@bar.com", "example@example.com"],
+ "reporter_email" : "eric@webkit.org",
+ "assigned_to_email" : "webkit-unassigned@lists.webkit.org",
+ "attachments" : [{
+ 'name': u'Patch',
+ 'url' : "https://bugs.webkit.org/attachment.cgi?id=45548",
+ 'is_obsolete': False,
+ 'review': '?',
+ 'is_patch': True,
+ 'attacher_email': 'mjs@apple.com',
+ 'bug_id': 32585,
+ 'type': 'text/plain',
+ 'id': 45548
+ }],
+ }
+
+ def _assert_dictionaries_equal(self, actual, expected):
+ # Make sure we aren't parsing more or less than we expect
+ self.assertEquals(sorted(actual.keys()), sorted(expected.keys()))
+
+ for key, expected_value in expected.items():
+ self.assertEquals(actual[key], expected_value, ("Failure for key: %s: Actual='%s' Expected='%s'" % (key, actual[key], expected_value)))
+
+ def test_bug_parsing(self):
+ bug = Bugzilla()._parse_bug_page(self._example_bug)
+ self._assert_dictionaries_equal(bug, self._expected_example_bug_parsing)
+
+ # This could be combined into test_bug_parsing later if desired.
def test_attachment_parsing(self):
bugzilla = Bugzilla()
-
soup = BeautifulSoup(self._example_attachment)
attachment_element = soup.find("attachment")
attachment = bugzilla._parse_attachment_element(attachment_element, self._expected_example_attachment_parsing['bug_id'])
self.assertTrue(attachment)
-
- # Make sure we aren't parsing more or less than we expect
- self.assertEquals(attachment.keys(), self._expected_example_attachment_parsing.keys())
-
- for key, expected_value in self._expected_example_attachment_parsing.items():
- self.assertEquals(attachment[key], expected_value, ("Failure for key: %s: Actual='%s' Expected='%s'" % (key, attachment[key], expected_value)))
+ self._assert_dictionaries_equal(attachment, self._expected_example_attachment_parsing)
_sample_attachment_detail_page = """
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
@@ -118,6 +234,15 @@ class BugzillaTest(unittest.TestCase):
bugzilla = Bugzilla()
self.assertEquals(27314, bugzilla._parse_bug_id_from_attachment_page(self._sample_attachment_detail_page))
+ def test_add_cc_to_bug(self):
+ bugzilla = Bugzilla()
+ bugzilla.browser = MockBrowser()
+ bugzilla.authenticate = lambda: None
+ expected_stderr = "Adding ['adam@example.com'] to the CC list for bug 42\n"
+ OutputCapture().assert_outputs(self, bugzilla.add_cc_to_bug, [42, ["adam@example.com"]], expected_stderr=expected_stderr)
+
+
+class BugzillaQueriesTest(unittest.TestCase):
_sample_request_page = """
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
@@ -166,8 +291,13 @@ class BugzillaTest(unittest.TestCase):
"""
def test_request_page_parsing(self):
- bugzilla = Bugzilla()
- self.assertEquals([40511, 40722, 40723], bugzilla._parse_attachment_ids_request_query(self._sample_request_page))
+ queries = BugzillaQueries(None)
+ self.assertEquals([40511, 40722, 40723], queries._parse_attachment_ids_request_query(self._sample_request_page))
+
+ def test_load_query(self):
+ queries = BugzillaQueries(Mock())
+ queries._load_query("request.cgi?action=queue&type=review&group=type")
+
if __name__ == '__main__':
unittest.main()
diff --git a/WebKitTools/Scripts/modules/buildbot.py b/WebKitTools/Scripts/webkitpy/buildbot.py
index 548cad8..38828fd 100644
--- a/WebKitTools/Scripts/modules/buildbot.py
+++ b/WebKitTools/Scripts/webkitpy/buildbot.py
@@ -1,9 +1,9 @@
# Copyright (c) 2009, Google Inc. All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
-#
+#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
# * 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
@@ -32,51 +32,71 @@ import re
import urllib2
# Import WebKit-specific modules.
-from modules.logging import log
+from webkitpy.webkit_logging import log
-# WebKit includes a built copy of BeautifulSoup in Scripts/modules
+# WebKit includes a built copy of BeautifulSoup in Scripts/webkitpy
# so this import should always succeed.
from .BeautifulSoup import BeautifulSoup
+
class BuildBot:
+
default_host = "build.webkit.org"
+
def __init__(self, host=default_host):
self.buildbot_host = host
self.buildbot_server_url = "http://%s/" % self.buildbot_host
-
- # If any of the Leopard build/test bots or the Windows builders are red we should not be landing patches.
- # Other builders should be added to this list once they're known to be stable.
- self.core_builder_names_regexps = [ 'Leopard', "Windows.*Build" ]
- # If WebKit's buildbot has an XMLRPC interface we could use, we could do something more sophisticated here.
- # For now we just parse out the basics, enough to support basic questions like "is the tree green?"
+ # If any Leopard builder/tester, Windows builder or Chromium builder is
+ # red we should not be landing patches. Other builders should be added
+ # to this list once they are known to be reliable.
+ # See https://bugs.webkit.org/show_bug.cgi?id=33296 and related bugs.
+ self.core_builder_names_regexps = [
+ "Leopard",
+ "Windows.*Build",
+ "Chromium",
+ ]
+
def _parse_builder_status_from_row(self, status_row):
+ # If WebKit's buildbot has an XMLRPC interface we could use, we could
+ # do something more sophisticated here. For now we just parse out the
+ # basics, enough to support basic questions like "is the tree green?"
status_cells = status_row.findAll('td')
builder = {}
name_link = status_cells[0].find('a')
builder['name'] = name_link.string
- # We could generate the builder_url from the name in a future version of this code.
+ # We could generate the builder_url from the name in a future version
+ # of this code.
builder['builder_url'] = self.buildbot_server_url + name_link['href']
status_link = status_cells[1].find('a')
if not status_link:
- # We failed to find a link in the first cell, just give up.
- # This can happen if a builder is just-added, the first cell will just be "no build"
- builder['is_green'] = False # Other parts of the code depend on is_green being present.
+ # We failed to find a link in the first cell, just give up. This
+ # can happen if a builder is just-added, the first cell will just
+ # be "no build"
+ # Other parts of the code depend on is_green being present.
+ builder['is_green'] = False
return builder
- revision_string = status_link.string # Will be either a revision number or a build number
+ # Will be either a revision number or a build number
+ revision_string = status_link.string
# If revision_string has non-digits assume it's not a revision number.
- builder['built_revision'] = int(revision_string) if not re.match('\D', revision_string) else None
- builder['is_green'] = not re.search('fail', status_cells[1].renderContents())
- # We could parse out the build number instead, but for now just store the URL.
+ builder['built_revision'] = int(revision_string) \
+ if not re.match('\D', revision_string) \
+ else None
+ builder['is_green'] = not re.search('fail',
+ status_cells[1].renderContents())
+ # We could parse out the build number instead, but for now just store
+ # the URL.
builder['build_url'] = self.buildbot_server_url + status_link['href']
# We could parse out the current activity too.
return builder
- def _builder_statuses_with_names_matching_regexps(self, builder_statuses, name_regexps):
+ def _builder_statuses_with_names_matching_regexps(self,
+ builder_statuses,
+ name_regexps):
builders = []
for builder in builder_statuses:
for name_regexp in name_regexps:
@@ -86,7 +106,9 @@ class BuildBot:
def red_core_builders(self):
red_builders = []
- for builder in self._builder_statuses_with_names_matching_regexps(self.builder_statuses(), self.core_builder_names_regexps):
+ for builder in self._builder_statuses_with_names_matching_regexps(
+ self.builder_statuses(),
+ self.core_builder_names_regexps):
if not builder['is_green']:
red_builders.append(builder)
return red_builders
diff --git a/WebKitTools/Scripts/webkitpy/buildbot.pyc b/WebKitTools/Scripts/webkitpy/buildbot.pyc
new file mode 100644
index 0000000..49b1e68
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/buildbot.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/modules/buildbot_unittest.py b/WebKitTools/Scripts/webkitpy/buildbot_unittest.py
index a85f2ea..bde3e04 100644
--- a/WebKitTools/Scripts/modules/buildbot_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/buildbot_unittest.py
@@ -28,9 +28,9 @@
import unittest
-from modules.buildbot import BuildBot
+from webkitpy.buildbot import BuildBot
-from modules.BeautifulSoup import BeautifulSoup
+from webkitpy.BeautifulSoup import BeautifulSoup
class BuildBotTest(unittest.TestCase):
@@ -110,18 +110,39 @@ class BuildBotTest(unittest.TestCase):
def test_builder_name_regexps(self):
buildbot = BuildBot()
+ # For complete testing, this list should match the list of builders at build.webkit.org:
example_builders = [
- { 'name': u'Leopard Debug (Build)', },
- { 'name': u'Leopard Debug (Tests)', },
+ { 'name': u'Tiger Intel Release', },
+ { 'name': u'Leopard Intel Release (Build)', },
+ { 'name': u'Leopard Intel Release (Tests)', },
+ { 'name': u'Leopard Intel Debug (Build)', },
+ { 'name': u'Leopard Intel Debug (Tests)', },
+ { 'name': u'SnowLeopard Intel Release (Build)', },
+ { 'name': u'SnowLeopard Intel Release (Tests)', },
+ { 'name': u'SnowLeopard Intel Leaks', },
{ 'name': u'Windows Release (Build)', },
+ { 'name': u'Windows Release (Tests)', },
+ { 'name': u'Windows Debug (Build)', },
{ 'name': u'Windows Debug (Tests)', },
{ 'name': u'Qt Linux Release', },
+ { 'name': u'Gtk Linux Release', },
+ { 'name': u'Gtk Linux 32-bit Debug', },
+ { 'name': u'Gtk Linux 64-bit Debug', },
+ { 'name': u'Chromium Linux Release', },
+ { 'name': u'Chromium Mac Release', },
+ { 'name': u'Chromium Win Release', },
]
- name_regexps = [ 'Leopard', "Windows.*Build" ]
+ name_regexps = [ "Leopard", "Windows.*Build", "Chromium" ]
expected_builders = [
- { 'name': u'Leopard Debug (Build)', },
- { 'name': u'Leopard Debug (Tests)', },
+ { 'name': u'Leopard Intel Release (Build)', },
+ { 'name': u'Leopard Intel Release (Tests)', },
+ { 'name': u'Leopard Intel Debug (Build)', },
+ { 'name': u'Leopard Intel Debug (Tests)', },
{ 'name': u'Windows Release (Build)', },
+ { 'name': u'Windows Debug (Build)', },
+ { 'name': u'Chromium Linux Release', },
+ { 'name': u'Chromium Mac Release', },
+ { 'name': u'Chromium Win Release', },
]
# This test should probably be updated if the default regexp list changes
diff --git a/WebKitTools/Scripts/modules/changelogs.py b/WebKitTools/Scripts/webkitpy/changelogs.py
index a407d23..ebc89c4 100644
--- a/WebKitTools/Scripts/modules/changelogs.py
+++ b/WebKitTools/Scripts/webkitpy/changelogs.py
@@ -1,9 +1,9 @@
# Copyright (C) 2009, Google Inc. All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
-#
+#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
# * 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
@@ -30,21 +30,27 @@
import fileinput # inplace file editing for set_reviewer_in_changelog
import re
+import textwrap
+
-# FIMXE: This doesn't really belong in this file, but we don't have a better home for it yet.
-# Maybe eventually a webkit_config.py?
def view_source_url(revision_number):
+ # FIMXE: This doesn't really belong in this file, but we don't have a
+ # better home for it yet.
+ # Maybe eventually a webkit_config.py?
return "http://trac.webkit.org/changeset/%s" % revision_number
class ChangeLog:
+
def __init__(self, path):
self.path = path
+ _changelog_indent = " " * 8
+
# e.g. 2009-06-03 Eric Seidel <eric@webkit.org>
date_line_regexp = re.compile('^(\d{4}-\d{2}-\d{2})' # Consume the date.
+ '\s+(.+)\s+' # Consume the name.
- + '<([^<>]+)>$') # And finally the email address.
+ + '<([^<>]+)>$') # And the email address.
@staticmethod
def _parse_latest_entry_from_file(changelog_file):
@@ -58,7 +64,8 @@ class ChangeLog:
for line in changelog_file:
# If we've hit the next entry, return.
if ChangeLog.date_line_regexp.match(line):
- return ''.join(entry_lines[:-1]) # Remove the extra newline at the end
+ # Remove the extra newline at the end
+ return ''.join(entry_lines[:-1])
entry_lines.append(line)
return None # We never found a date line!
@@ -69,18 +76,52 @@ class ChangeLog:
finally:
changelog_file.close()
- def update_for_revert(self, revision):
- reviewed_by_regexp = re.compile('Reviewed by NOBODY \(OOPS!\)\.')
+ # _wrap_line and _wrap_lines exist to work around
+ # http://bugs.python.org/issue1859
+
+ def _wrap_line(self, line):
+ return textwrap.fill(line,
+ width=70,
+ initial_indent=self._changelog_indent,
+ # Don't break urls which may be longer than width.
+ break_long_words=False,
+ subsequent_indent=self._changelog_indent)
+
+ # Workaround as suggested by guido in
+ # http://bugs.python.org/issue1859#msg60040
+
+ def _wrap_lines(self, message):
+ lines = [self._wrap_line(line) for line in message.splitlines()]
+ return "\n".join(lines)
+
+ # This probably does not belong in changelogs.py
+ def _message_for_revert(self, revision, reason, bug_url):
+ message = "No review, rolling out r%s.\n" % revision
+ message += "%s\n" % view_source_url(revision)
+ if bug_url:
+ message += "%s\n" % bug_url
+ # Add an extra new line after the rollout links, before any reason.
+ message += "\n"
+ if reason:
+ message += "%s\n\n" % reason
+ return self._wrap_lines(message)
+
+ def update_for_revert(self, revision, reason, bug_url=None):
+ reviewed_by_regexp = re.compile(
+ "%sReviewed by NOBODY \(OOPS!\)\." % self._changelog_indent)
removing_boilerplate = False
# inplace=1 creates a backup file and re-directs stdout to the file
for line in fileinput.FileInput(self.path, inplace=1):
if reviewed_by_regexp.search(line):
- print reviewed_by_regexp.sub("No review, rolling out r%s." % revision, line),
- print " %s\n" % view_source_url(revision)
- # Remove all the ChangeLog boilerplate between the Reviewed by line and the first changed file.
+ message_lines = self._message_for_revert(revision,
+ reason,
+ bug_url)
+ print reviewed_by_regexp.sub(message_lines, line),
+ # Remove all the ChangeLog boilerplate between the Reviewed by
+ # line and the first changed file.
removing_boilerplate = True
elif removing_boilerplate:
- if line.find('*') >= 0 : # each changed file is preceded by a *
+ if line.find('*') >= 0: # each changed file is preceded by a *
removing_boilerplate = False
if not removing_boilerplate:
@@ -89,4 +130,5 @@ class ChangeLog:
def set_reviewer(self, reviewer):
# inplace=1 creates a backup file and re-directs stdout to the file
for line in fileinput.FileInput(self.path, inplace=1):
- print line.replace("NOBODY (OOPS!)", reviewer.encode("utf-8")), # Trailing comma suppresses printing newline
+ # Trailing comma suppresses printing newline
+ print line.replace("NOBODY (OOPS!)", reviewer.encode("utf-8")),
diff --git a/WebKitTools/Scripts/webkitpy/changelogs.pyc b/WebKitTools/Scripts/webkitpy/changelogs.pyc
new file mode 100644
index 0000000..2fca994
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/changelogs.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/modules/changelogs_unittest.py b/WebKitTools/Scripts/webkitpy/changelogs_unittest.py
index dd14cb7..de3e60c 100644
--- a/WebKitTools/Scripts/modules/changelogs_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/changelogs_unittest.py
@@ -124,22 +124,56 @@ class ChangeLogsTest(unittest.TestCase):
os.remove(changelog_path)
self.assertEquals(actual_contents, expected_contents)
- _expected_revert_entry = '''2009-08-19 Eric Seidel <eric@webkit.org>
+ _revert_message = """ No review, rolling out r12345.
+ http://trac.webkit.org/changeset/12345
+ http://example.com/123
+
+ This is a very long reason which should be long enough so that
+ _message_for_revert will need to wrap it. We'll also include
+ a
+ https://veryveryveryveryverylongbugurl.com/reallylongbugthingy.cgi?bug_id=12354
+ link so that we can make sure we wrap that right too.
+"""
+
+ def test_message_for_revert(self):
+ changelog = ChangeLog("/fake/path")
+ long_reason = "This is a very long reason which should be long enough so that _message_for_revert will need to wrap it. We'll also include a https://veryveryveryveryverylongbugurl.com/reallylongbugthingy.cgi?bug_id=12354 link so that we can make sure we wrap that right too."
+ message = changelog._message_for_revert(12345, long_reason, "http://example.com/123")
+ self.assertEquals(message, self._revert_message)
+
+ _revert_entry_with_bug_url = '''2009-08-19 Eric Seidel <eric@webkit.org>
No review, rolling out r12345.
http://trac.webkit.org/changeset/12345
+ http://example.com/123
+
+ Reason
* Scripts/bugzilla-tool:
'''
- def test_update_for_revert(self):
+ _revert_entry_without_bug_url = '''2009-08-19 Eric Seidel <eric@webkit.org>
+
+ No review, rolling out r12345.
+ http://trac.webkit.org/changeset/12345
+
+ Reason
+
+ * Scripts/bugzilla-tool:
+'''
+
+ def _assert_update_for_revert_output(self, args, expected_entry):
changelog_contents = "%s\n%s" % (self._new_entry_boilerplate, self._example_changelog)
changelog_path = self._write_tmp_file_with_contents(changelog_contents)
changelog = ChangeLog(changelog_path)
- changelog.update_for_revert(12345)
+ changelog.update_for_revert(*args)
actual_entry = changelog.latest_entry()
os.remove(changelog_path)
- self.assertEquals(actual_entry, self._expected_revert_entry)
+ self.assertEquals(actual_entry, expected_entry)
+
+ def test_update_for_revert(self):
+ self._assert_update_for_revert_output([12345, "Reason"], self._revert_entry_without_bug_url)
+ self._assert_update_for_revert_output([12345, "Reason", "http://example.com/123"], self._revert_entry_with_bug_url)
if __name__ == '__main__':
unittest.main()
diff --git a/WebKitTools/Scripts/webkitpy/commands/__init__.py b/WebKitTools/Scripts/webkitpy/commands/__init__.py
new file mode 100644
index 0000000..ef65bee
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/__init__.py
@@ -0,0 +1 @@
+# Required for Python to search this directory for module files
diff --git a/WebKitTools/Scripts/webkitpy/commands/__init__.pyc b/WebKitTools/Scripts/webkitpy/commands/__init__.pyc
new file mode 100644
index 0000000..ac801ef
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/__init__.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/commands/abstractsequencedcommand.py b/WebKitTools/Scripts/webkitpy/commands/abstractsequencedcommand.py
new file mode 100644
index 0000000..53af5b1
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/abstractsequencedcommand.py
@@ -0,0 +1,43 @@
+# 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.
+
+from webkitpy.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.stepsequence import StepSequence
+
+
+class AbstractSequencedCommand(AbstractDeclarativeCommand):
+ steps = None
+ def __init__(self):
+ self._sequence = StepSequence(self.steps)
+ AbstractDeclarativeCommand.__init__(self, self._sequence.options())
+
+ def _prepare_state(self, options, args, tool):
+ return None
+
+ def execute(self, options, args, tool):
+ self._sequence.run_and_handle_errors(tool, options, self._prepare_state(options, args, tool))
diff --git a/WebKitTools/Scripts/webkitpy/commands/abstractsequencedcommand.pyc b/WebKitTools/Scripts/webkitpy/commands/abstractsequencedcommand.pyc
new file mode 100644
index 0000000..6d3afc4
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/abstractsequencedcommand.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/modules/commands/commandtest.py b/WebKitTools/Scripts/webkitpy/commands/commandtest.py
index 618a517..a56cb05 100644
--- a/WebKitTools/Scripts/modules/commands/commandtest.py
+++ b/WebKitTools/Scripts/webkitpy/commands/commandtest.py
@@ -28,15 +28,11 @@
import unittest
-from modules.mock import Mock
-from modules.mock_bugzillatool import MockBugzillaTool
-from modules.outputcapture import OutputCapture
+from webkitpy.mock import Mock
+from webkitpy.mock_bugzillatool import MockBugzillaTool
+from webkitpy.outputcapture import OutputCapture
class CommandsTest(unittest.TestCase):
def assert_execute_outputs(self, command, args, expected_stdout="", expected_stderr="", options=Mock(), tool=MockBugzillaTool()):
- capture = OutputCapture()
- capture.capture_output()
- command.execute(options, args, tool)
- (stdout_string, stderr_string) = capture.restore_output()
- self.assertEqual(stdout_string, expected_stdout)
- self.assertEqual(expected_stderr, expected_stderr)
+ command.bind_to_tool(tool)
+ OutputCapture().assert_outputs(self, command.execute, [options, args, tool], expected_stdout=expected_stdout, expected_stderr=expected_stderr)
diff --git a/WebKitTools/Scripts/webkitpy/commands/download.py b/WebKitTools/Scripts/webkitpy/commands/download.py
new file mode 100644
index 0000000..49a6862
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/download.py
@@ -0,0 +1,284 @@
+# Copyright (c) 2009, Google Inc. All rights reserved.
+# Copyright (c) 2009 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:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+
+from optparse import make_option
+
+import webkitpy.steps as steps
+
+from webkitpy.bugzilla import parse_bug_id
+# We could instead use from modules import buildsteps and then prefix every buildstep with "buildsteps."
+from webkitpy.changelogs import ChangeLog
+from webkitpy.commands.abstractsequencedcommand import AbstractSequencedCommand
+from webkitpy.comments import bug_comment_from_commit_text
+from webkitpy.executive import ScriptError
+from webkitpy.grammar import pluralize
+from webkitpy.webkit_logging import error, log
+from webkitpy.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.stepsequence import StepSequence
+
+
+class Build(AbstractSequencedCommand):
+ name = "build"
+ help_text = "Update working copy and build"
+ steps = [
+ steps.CleanWorkingDirectory,
+ steps.Update,
+ steps.Build,
+ ]
+
+
+class BuildAndTest(AbstractSequencedCommand):
+ name = "build-and-test"
+ help_text = "Update working copy, build, and run the tests"
+ steps = [
+ steps.CleanWorkingDirectory,
+ steps.Update,
+ steps.Build,
+ steps.RunTests,
+ ]
+
+
+class Land(AbstractSequencedCommand):
+ name = "land"
+ help_text = "Land the current working directory diff and updates the associated bug if any"
+ argument_names = "[BUGID]"
+ show_in_main_help = True
+ steps = [
+ steps.EnsureBuildersAreGreen,
+ steps.UpdateChangeLogsWithReviewer,
+ steps.EnsureBuildersAreGreen,
+ steps.Build,
+ steps.RunTests,
+ steps.Commit,
+ steps.CloseBugForLandDiff,
+ ]
+ long_help = """land commits the current working copy diff (just as svn or git commit would).
+land will build and run the tests before committing.
+If a bug id is provided, or one can be found in the ChangeLog land will update the bug after committing."""
+
+ def _prepare_state(self, options, args, tool):
+ return {
+ "bug_id" : (args and args[0]) or parse_bug_id(tool.scm().create_patch()),
+ }
+
+
+class AbstractPatchProcessingCommand(AbstractDeclarativeCommand):
+ # Subclasses must implement the methods below. We don't declare them here
+ # because we want to be able to implement them with mix-ins.
+ #
+ # def _fetch_list_of_patches_to_process(self, options, args, tool):
+ # def _prepare_to_process(self, options, args, tool):
+
+ @staticmethod
+ def _collect_patches_by_bug(patches):
+ bugs_to_patches = {}
+ for patch in patches:
+ bugs_to_patches[patch.bug_id()] = bugs_to_patches.get(patch.bug_id(), []) + [patch]
+ return bugs_to_patches
+
+ def execute(self, options, args, tool):
+ self._prepare_to_process(options, args, tool)
+ patches = self._fetch_list_of_patches_to_process(options, args, tool)
+
+ # It's nice to print out total statistics.
+ bugs_to_patches = self._collect_patches_by_bug(patches)
+ log("Processing %s from %s." % (pluralize("patch", len(patches)), pluralize("bug", len(bugs_to_patches))))
+
+ for patch in patches:
+ self._process_patch(patch, options, args, tool)
+
+
+class AbstractPatchSequencingCommand(AbstractPatchProcessingCommand):
+ prepare_steps = None
+ main_steps = None
+
+ def __init__(self):
+ options = []
+ self._prepare_sequence = StepSequence(self.prepare_steps)
+ self._main_sequence = StepSequence(self.main_steps)
+ options = sorted(set(self._prepare_sequence.options() + self._main_sequence.options()))
+ AbstractPatchProcessingCommand.__init__(self, options)
+
+ def _prepare_to_process(self, options, args, tool):
+ self._prepare_sequence.run_and_handle_errors(tool, options)
+
+ def _process_patch(self, patch, options, args, tool):
+ state = { "patch" : patch }
+ self._main_sequence.run_and_handle_errors(tool, options, state)
+
+
+class ProcessAttachmentsMixin(object):
+ def _fetch_list_of_patches_to_process(self, options, args, tool):
+ return map(lambda patch_id: tool.bugs.fetch_attachment(patch_id), args)
+
+
+class ProcessBugsMixin(object):
+ def _fetch_list_of_patches_to_process(self, options, args, tool):
+ all_patches = []
+ for bug_id in args:
+ patches = tool.bugs.fetch_bug(bug_id).reviewed_patches()
+ log("%s found on bug %s." % (pluralize("reviewed patch", len(patches)), bug_id))
+ all_patches += patches
+ return all_patches
+
+
+class CheckStyle(AbstractPatchSequencingCommand, ProcessAttachmentsMixin):
+ name = "check-style"
+ help_text = "Run check-webkit-style on the specified attachments"
+ argument_names = "ATTACHMENT_ID [ATTACHMENT_IDS]"
+ main_steps = [
+ steps.CleanWorkingDirectory,
+ steps.Update,
+ steps.ApplyPatch,
+ steps.CheckStyle,
+ ]
+
+
+class BuildAttachment(AbstractPatchSequencingCommand, ProcessAttachmentsMixin):
+ name = "build-attachment"
+ help_text = "Apply and build patches from bugzilla"
+ argument_names = "ATTACHMENT_ID [ATTACHMENT_IDS]"
+ main_steps = [
+ steps.CleanWorkingDirectory,
+ steps.Update,
+ steps.ApplyPatch,
+ steps.Build,
+ ]
+
+
+class AbstractPatchApplyingCommand(AbstractPatchSequencingCommand):
+ prepare_steps = [
+ steps.EnsureLocalCommitIfNeeded,
+ steps.CleanWorkingDirectoryWithLocalCommits,
+ steps.Update,
+ ]
+ main_steps = [
+ steps.ApplyPatchWithLocalCommit,
+ ]
+ long_help = """Updates the working copy.
+Downloads and applies the patches, creating local commits if necessary."""
+
+
+class ApplyAttachment(AbstractPatchApplyingCommand, ProcessAttachmentsMixin):
+ name = "apply-attachment"
+ help_text = "Apply an attachment to the local working directory"
+ argument_names = "ATTACHMENT_ID [ATTACHMENT_IDS]"
+ show_in_main_help = True
+
+
+class ApplyFromBug(AbstractPatchApplyingCommand, ProcessBugsMixin):
+ name = "apply-from-bug"
+ help_text = "Apply reviewed patches from provided bugs to the local working directory"
+ argument_names = "BUGID [BUGIDS]"
+ show_in_main_help = True
+
+
+class AbstractPatchLandingCommand(AbstractPatchSequencingCommand):
+ prepare_steps = [
+ steps.EnsureBuildersAreGreen,
+ ]
+ main_steps = [
+ steps.CleanWorkingDirectory,
+ steps.Update,
+ steps.ApplyPatch,
+ steps.EnsureBuildersAreGreen,
+ steps.Build,
+ steps.RunTests,
+ steps.Commit,
+ steps.ClosePatch,
+ steps.CloseBug,
+ ]
+ long_help = """Checks to make sure builders are green.
+Updates the working copy.
+Applies the patch.
+Builds.
+Runs the layout tests.
+Commits the patch.
+Clears the flags on the patch.
+Closes the bug if no patches are marked for review."""
+
+
+class LandAttachment(AbstractPatchLandingCommand, ProcessAttachmentsMixin):
+ name = "land-attachment"
+ help_text = "Land patches from bugzilla, optionally building and testing them first"
+ argument_names = "ATTACHMENT_ID [ATTACHMENT_IDS]"
+ show_in_main_help = True
+
+
+class LandFromBug(AbstractPatchLandingCommand, ProcessBugsMixin):
+ name = "land-from-bug"
+ help_text = "Land all patches on the given bugs, optionally building and testing them first"
+ argument_names = "BUGID [BUGIDS]"
+ show_in_main_help = True
+
+
+class Rollout(AbstractSequencedCommand):
+ name = "rollout"
+ show_in_main_help = True
+ help_text = "Revert the given revision in the working copy and optionally commit the revert and re-open the original bug"
+ argument_names = "REVISION REASON"
+ long_help = """Updates the working copy.
+Applies the inverse diff for the provided revision.
+Creates an appropriate rollout ChangeLog, including a trac link and bug link.
+Opens the generated ChangeLogs in $EDITOR.
+Shows the prepared diff for confirmation.
+Commits the revert and updates the bug (including re-opening the bug if necessary)."""
+ steps = [
+ steps.CleanWorkingDirectory,
+ steps.Update,
+ steps.RevertRevision,
+ steps.PrepareChangeLogForRevert,
+ steps.EditChangeLog,
+ steps.ConfirmDiff,
+ steps.CompleteRollout,
+ ]
+
+ @staticmethod
+ def _parse_bug_id_from_revision_diff(tool, revision):
+ original_diff = tool.scm().diff_for_revision(revision)
+ return parse_bug_id(original_diff)
+
+ def execute(self, options, args, tool):
+ revision = args[0]
+ reason = args[1]
+ bug_id = self._parse_bug_id_from_revision_diff(tool, revision)
+ if options.complete_rollout:
+ if bug_id:
+ log("Will re-open bug %s after rollout." % bug_id)
+ else:
+ log("Failed to parse bug number from diff. No bugs will be updated/reopened after the rollout.")
+
+ state = {
+ "revision" : revision,
+ "bug_id" : bug_id,
+ "reason" : reason,
+ }
+ self._sequence.run_and_handle_errors(tool, options, state)
diff --git a/WebKitTools/Scripts/webkitpy/commands/download.pyc b/WebKitTools/Scripts/webkitpy/commands/download.pyc
new file mode 100644
index 0000000..3a0046f
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/download.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/commands/download_unittest.py b/WebKitTools/Scripts/webkitpy/commands/download_unittest.py
new file mode 100644
index 0000000..f60c5b8
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/download_unittest.py
@@ -0,0 +1,127 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from webkitpy.commands.commandtest import CommandsTest
+from webkitpy.commands.download import *
+from webkitpy.mock import Mock
+
+class DownloadCommandsTest(CommandsTest):
+ def _default_options(self):
+ options = Mock()
+ options.force_clean = False
+ options.clean = True
+ options.check_builders = True
+ options.quiet = False
+ options.non_interactive = False
+ options.update = True
+ options.build = True
+ options.test = True
+ options.close_bug = True
+ options.complete_rollout = False
+ return options
+
+ def test_build(self):
+ expected_stderr = "Updating working directory\nBuilding WebKit\n"
+ self.assert_execute_outputs(Build(), [], options=self._default_options(), expected_stderr=expected_stderr)
+
+ def test_build_and_test(self):
+ expected_stderr = "Updating working directory\nBuilding WebKit\nRunning Python unit tests\nRunning Perl unit tests\nRunning JavaScriptCore tests\nRunning run-webkit-tests\n"
+ self.assert_execute_outputs(BuildAndTest(), [], options=self._default_options(), expected_stderr=expected_stderr)
+
+ def test_apply_attachment(self):
+ options = self._default_options()
+ options.update = True
+ options.local_commit = True
+ expected_stderr = "Updating working directory\nProcessing 1 patch from 1 bug.\nProcessing patch 197 from bug 42.\n"
+ self.assert_execute_outputs(ApplyAttachment(), [197], options=options, expected_stderr=expected_stderr)
+
+ def test_apply_patches(self):
+ options = self._default_options()
+ options.update = True
+ options.local_commit = True
+ expected_stderr = "Updating working directory\n2 reviewed patches found on bug 42.\nProcessing 2 patches from 1 bug.\nProcessing patch 197 from bug 42.\nProcessing patch 128 from bug 42.\n"
+ self.assert_execute_outputs(ApplyFromBug(), [42], options=options, expected_stderr=expected_stderr)
+
+ def test_land_diff(self):
+ expected_stderr = "Building WebKit\nRunning Python unit tests\nRunning Perl unit tests\nRunning JavaScriptCore tests\nRunning run-webkit-tests\nUpdating bug 42\n"
+ self.assert_execute_outputs(Land(), [42], options=self._default_options(), expected_stderr=expected_stderr)
+
+ def test_check_style(self):
+ expected_stderr = "Processing 1 patch from 1 bug.\nUpdating working directory\nProcessing patch 197 from bug 42.\nRunning check-webkit-style\n"
+ self.assert_execute_outputs(CheckStyle(), [197], options=self._default_options(), expected_stderr=expected_stderr)
+
+ def test_build_attachment(self):
+ expected_stderr = "Processing 1 patch from 1 bug.\nUpdating working directory\nProcessing patch 197 from bug 42.\nBuilding WebKit\n"
+ self.assert_execute_outputs(BuildAttachment(), [197], options=self._default_options(), expected_stderr=expected_stderr)
+
+ def test_land_attachment(self):
+ # FIXME: This expected result is imperfect, notice how it's seeing the same patch as still there after it thought it would have cleared the flags.
+ expected_stderr = """Processing 1 patch from 1 bug.
+Updating working directory
+Processing patch 197 from bug 42.
+Building WebKit
+Running Python unit tests
+Running Perl unit tests
+Running JavaScriptCore tests
+Running run-webkit-tests
+Not closing bug 42 as attachment 197 has review=+. Assuming there are more patches to land from this bug.
+"""
+ self.assert_execute_outputs(LandAttachment(), [197], options=self._default_options(), expected_stderr=expected_stderr)
+
+ def test_land_patches(self):
+ # FIXME: This expected result is imperfect, notice how it's seeing the same patch as still there after it thought it would have cleared the flags.
+ expected_stderr = """2 reviewed patches found on bug 42.
+Processing 2 patches from 1 bug.
+Updating working directory
+Processing patch 197 from bug 42.
+Building WebKit
+Running Python unit tests
+Running Perl unit tests
+Running JavaScriptCore tests
+Running run-webkit-tests
+Not closing bug 42 as attachment 197 has review=+. Assuming there are more patches to land from this bug.
+Updating working directory
+Processing patch 128 from bug 42.
+Building WebKit
+Running Python unit tests
+Running Perl unit tests
+Running JavaScriptCore tests
+Running run-webkit-tests
+Not closing bug 42 as attachment 197 has review=+. Assuming there are more patches to land from this bug.
+"""
+ self.assert_execute_outputs(LandFromBug(), [42], options=self._default_options(), expected_stderr=expected_stderr)
+
+ def test_rollout(self):
+ expected_stderr = "Updating working directory\nRunning prepare-ChangeLog\n\nNOTE: Rollout support is experimental.\nPlease verify the rollout diff and use \"webkit-patch land 12345\" to commit the rollout.\n"
+ self.assert_execute_outputs(Rollout(), [852, "Reason"], options=self._default_options(), expected_stderr=expected_stderr)
+
+ def test_complete_rollout(self):
+ options = self._default_options()
+ options.complete_rollout = True
+ expected_stderr = "Will re-open bug 12345 after rollout.\nUpdating working directory\nRunning prepare-ChangeLog\nBuilding WebKit\n"
+ self.assert_execute_outputs(Rollout(), [852, "Reason"], options=options, expected_stderr=expected_stderr)
diff --git a/WebKitTools/Scripts/webkitpy/commands/early_warning_system.py b/WebKitTools/Scripts/webkitpy/commands/early_warning_system.py
new file mode 100644
index 0000000..e3e14dd
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/early_warning_system.py
@@ -0,0 +1,122 @@
+#!/usr/bin/env python
+# Copyright (c) 2009, Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from StringIO import StringIO
+
+from webkitpy.commands.queues import AbstractReviewQueue
+from webkitpy.committers import CommitterList
+from webkitpy.executive import ScriptError
+from webkitpy.webkitport import WebKitPort
+from webkitpy.queueengine import QueueEngine
+
+
+class AbstractEarlyWarningSystem(AbstractReviewQueue):
+ _build_style = "release"
+
+ def __init__(self):
+ AbstractReviewQueue.__init__(self)
+ self.port = WebKitPort.port(self.port_name)
+
+ def should_proceed_with_work_item(self, patch):
+ try:
+ self.run_webkit_patch([
+ "build",
+ self.port.flag(),
+ "--build-style=%s" % self._build_style,
+ "--force-clean",
+ "--quiet"])
+ self._update_status("Building", patch)
+ except ScriptError, e:
+ self._update_status("Unable to perform a build")
+ return False
+ return True
+
+ def _review_patch(self, patch):
+ self.run_webkit_patch([
+ "build-attachment",
+ self.port.flag(),
+ "--build-style=%s" % self._build_style,
+ "--force-clean",
+ "--quiet",
+ "--non-interactive",
+ "--parent-command=%s" % self.name,
+ "--no-update",
+ patch.id()])
+
+ @classmethod
+ def handle_script_error(cls, tool, state, script_error):
+ is_svn_apply = script_error.command_name() == "svn-apply"
+ status_id = cls._update_status_for_script_error(tool, state, script_error, is_error=is_svn_apply)
+ if is_svn_apply:
+ QueueEngine.exit_after_handled_error(script_error)
+ results_link = tool.status_server.results_url_for_status(status_id)
+ message = "Attachment %s did not build on %s:\nBuild output: %s" % (state["patch"].id(), cls.port_name, results_link)
+ tool.bugs.post_comment_to_bug(state["patch"].bug_id(), message, cc=cls.watchers)
+ exit(1)
+
+
+class GtkEWS(AbstractEarlyWarningSystem):
+ name = "gtk-ews"
+ port_name = "gtk"
+ watchers = AbstractEarlyWarningSystem.watchers + [
+ "gns@gnome.org",
+ "xan.lopez@gmail.com",
+ ]
+
+
+class QtEWS(AbstractEarlyWarningSystem):
+ name = "qt-ews"
+ port_name = "qt"
+
+
+class ChromiumEWS(AbstractEarlyWarningSystem):
+ name = "chromium-ews"
+ port_name = "chromium"
+ watchers = AbstractEarlyWarningSystem.watchers + [
+ "dglazkov@chromium.org",
+ ]
+
+
+# For platforms that we can't run inside a VM (like Mac OS X), we require
+# patches to be uploaded by committers, who are generally trustworthy folk. :)
+class AbstractCommitterOnlyEWS(AbstractEarlyWarningSystem):
+ def __init__(self, committers=CommitterList()):
+ AbstractEarlyWarningSystem.__init__(self)
+ self._committers = committers
+
+ def process_work_item(self, patch):
+ if not self._committers.committer_by_email(patch.attacher_email()):
+ self._did_error(patch, "%s cannot process patches from non-committers :(" % self.name)
+ return
+ AbstractEarlyWarningSystem.process_work_item(self, patch)
+
+
+class MacEWS(AbstractCommitterOnlyEWS):
+ name = "mac-ews"
+ port_name = "mac"
diff --git a/WebKitTools/Scripts/webkitpy/commands/early_warning_system.pyc b/WebKitTools/Scripts/webkitpy/commands/early_warning_system.pyc
new file mode 100644
index 0000000..d6e0800
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/early_warning_system.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/commands/early_warning_system_unittest.py b/WebKitTools/Scripts/webkitpy/commands/early_warning_system_unittest.py
new file mode 100644
index 0000000..d516b84
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/early_warning_system_unittest.py
@@ -0,0 +1,62 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+
+from webkitpy.commands.early_warning_system import *
+from webkitpy.commands.queuestest import QueuesTest
+from webkitpy.mock import Mock
+
+class EarlyWarningSytemTest(QueuesTest):
+ def test_chromium_ews(self):
+ expected_stderr = {
+ "begin_work_queue" : "CAUTION: chromium-ews will discard all local changes in \"%s\"\nRunning WebKit chromium-ews.\n" % os.getcwd(),
+ "handle_unexpected_error" : "Mock error message\n",
+ }
+ self.assert_queue_outputs(ChromiumEWS(), expected_stderr=expected_stderr)
+
+ def test_qt_ews(self):
+ expected_stderr = {
+ "begin_work_queue" : "CAUTION: qt-ews will discard all local changes in \"%s\"\nRunning WebKit qt-ews.\n" % os.getcwd(),
+ "handle_unexpected_error" : "Mock error message\n",
+ }
+ self.assert_queue_outputs(QtEWS(), expected_stderr=expected_stderr)
+
+ def test_gtk_ews(self):
+ expected_stderr = {
+ "begin_work_queue" : "CAUTION: gtk-ews will discard all local changes in \"%s\"\nRunning WebKit gtk-ews.\n" % os.getcwd(),
+ "handle_unexpected_error" : "Mock error message\n",
+ }
+ self.assert_queue_outputs(GtkEWS(), expected_stderr=expected_stderr)
+
+ def test_mac_ews(self):
+ expected_stderr = {
+ "begin_work_queue" : "CAUTION: mac-ews will discard all local changes in \"%s\"\nRunning WebKit mac-ews.\n" % os.getcwd(),
+ "handle_unexpected_error" : "Mock error message\n",
+ }
+ self.assert_queue_outputs(MacEWS(), expected_stderr=expected_stderr)
diff --git a/WebKitTools/Scripts/webkitpy/commands/openbugs.py b/WebKitTools/Scripts/webkitpy/commands/openbugs.py
new file mode 100644
index 0000000..25bdefc
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/openbugs.py
@@ -0,0 +1,63 @@
+# Copyright (c) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import re
+import sys
+
+from webkitpy.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.webkit_logging import log
+
+
+class OpenBugs(AbstractDeclarativeCommand):
+ name = "open-bugs"
+ help_text = "Finds all bug numbers passed in arguments (or stdin if no args provided) and opens them in a web browser"
+
+ bug_number_regexp = re.compile(r"\b\d{4,6}\b")
+
+ def _open_bugs(self, bug_ids):
+ for bug_id in bug_ids:
+ bug_url = self.tool.bugs.bug_url_for_bug_id(bug_id)
+ self.tool.user.open_url(bug_url)
+
+ # _find_bugs_in_string mostly exists for easy unit testing.
+ def _find_bugs_in_string(self, string):
+ return self.bug_number_regexp.findall(string)
+
+ def _find_bugs_in_iterable(self, iterable):
+ return sum([self._find_bugs_in_string(string) for string in iterable], [])
+
+ def execute(self, options, args, tool):
+ if args:
+ bug_ids = self._find_bugs_in_iterable(args)
+ else:
+ # This won't open bugs until stdin is closed but could be made to easily. That would just make unit testing slightly harder.
+ bug_ids = self._find_bugs_in_iterable(sys.stdin)
+
+ log("%s bugs found in input." % len(bug_ids))
+
+ self._open_bugs(bug_ids)
diff --git a/WebKitTools/Scripts/webkitpy/commands/openbugs_unittest.py b/WebKitTools/Scripts/webkitpy/commands/openbugs_unittest.py
new file mode 100644
index 0000000..71fefd2
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/openbugs_unittest.py
@@ -0,0 +1,50 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from webkitpy.commands.commandtest import CommandsTest
+from webkitpy.commands.openbugs import OpenBugs
+
+class OpenBugsTest(CommandsTest):
+
+ find_bugs_in_string_expectations = [
+ ["123", []],
+ ["1234", ["1234"]],
+ ["12345", ["12345"]],
+ ["123456", ["123456"]],
+ ["1234567", []],
+ [" 123456 234567", ["123456", "234567"]],
+ ]
+
+ def test_find_bugs_in_string(self):
+ openbugs = OpenBugs()
+ for expectation in self.find_bugs_in_string_expectations:
+ self.assertEquals(openbugs._find_bugs_in_string(expectation[0]), expectation[1])
+
+ def test_args_parsing(self):
+ expected_stderr = "2 bugs found in input.\nMOCK: user.open_url: http://example.com/12345\nMOCK: user.open_url: http://example.com/23456\n"
+ self.assert_execute_outputs(OpenBugs(), ["12345\n23456"], expected_stderr=expected_stderr)
diff --git a/WebKitTools/Scripts/modules/commands/queries.py b/WebKitTools/Scripts/webkitpy/commands/queries.py
index 98310e3..3ca4f42 100644
--- a/WebKitTools/Scripts/modules/commands/queries.py
+++ b/WebKitTools/Scripts/webkitpy/commands/queries.py
@@ -31,103 +31,84 @@
from optparse import make_option
-from modules.buildbot import BuildBot
-from modules.committers import CommitterList
-from modules.logging import log
-from modules.multicommandtool import Command
+from webkitpy.buildbot import BuildBot
+from webkitpy.committers import CommitterList
+from webkitpy.webkit_logging import log
+from webkitpy.multicommandtool import AbstractDeclarativeCommand
-class BugsToCommit(Command):
+class BugsToCommit(AbstractDeclarativeCommand):
name = "bugs-to-commit"
- show_in_main_help = False
- def __init__(self):
- Command.__init__(self, "List bugs in the commit-queue")
+ help_text = "List bugs in the commit-queue"
def execute(self, options, args, tool):
- bug_ids = tool.bugs.fetch_bug_ids_from_commit_queue()
+ # FIXME: This command is poorly named. It's fetching the commit-queue list here. The name implies it's fetching pending-commit (all r+'d patches).
+ bug_ids = tool.bugs.queries.fetch_bug_ids_from_commit_queue()
for bug_id in bug_ids:
print "%s" % bug_id
-class PatchesToCommit(Command):
- name = "patches-to-commit"
- show_in_main_help = False
- def __init__(self):
- Command.__init__(self, "List patches in the commit-queue")
+class PatchesInCommitQueue(AbstractDeclarativeCommand):
+ name = "patches-in-commit-queue"
+ help_text = "List patches in the commit-queue"
def execute(self, options, args, tool):
- patches = tool.bugs.fetch_patches_from_commit_queue()
+ patches = tool.bugs.queries.fetch_patches_from_commit_queue()
log("Patches in commit queue:")
for patch in patches:
- print "%s" % patch["url"]
+ print patch.url()
-class PatchesToCommitQueue(Command):
+class PatchesToCommitQueue(AbstractDeclarativeCommand):
name = "patches-to-commit-queue"
- show_in_main_help = False
+ help_text = "Patches which should be added to the commit queue"
def __init__(self):
options = [
make_option("--bugs", action="store_true", dest="bugs", help="Output bug links instead of patch links"),
]
- Command.__init__(self, "Patches which should be added to the commit queue", options=options)
+ AbstractDeclarativeCommand.__init__(self, options=options)
@staticmethod
def _needs_commit_queue(patch):
- commit_queue_flag = patch.get("commit-queue")
- if (commit_queue_flag and commit_queue_flag == '+'): # If it's already cq+, ignore the patch.
- log("%s already has cq=%s" % (patch["id"], commit_queue_flag))
+ if patch.commit_queue() == "+": # If it's already cq+, ignore the patch.
+ log("%s already has cq=%s" % (patch.id(), patch.commit_queue()))
return False
# We only need to worry about patches from contributers who are not yet committers.
- committer_record = CommitterList().committer_by_email(patch["attacher_email"])
+ committer_record = CommitterList().committer_by_email(patch.attacher_email())
if committer_record:
- log("%s committer = %s" % (patch["id"], committer_record))
+ log("%s committer = %s" % (patch.id(), committer_record))
return not committer_record
def execute(self, options, args, tool):
- patches = tool.bugs.fetch_patches_from_pending_commit_list()
+ patches = tool.bugs.queries.fetch_patches_from_pending_commit_list()
patches_needing_cq = filter(self._needs_commit_queue, patches)
if options.bugs:
- bugs_needing_cq = map(lambda patch: patch['bug_id'], patches_needing_cq)
+ bugs_needing_cq = map(lambda patch: patch.bug_id(), patches_needing_cq)
bugs_needing_cq = sorted(set(bugs_needing_cq))
for bug_id in bugs_needing_cq:
print "%s" % tool.bugs.bug_url_for_bug_id(bug_id)
else:
for patch in patches_needing_cq:
- print "%s" % tool.bugs.attachment_url_for_id(patch["id"], action="edit")
+ print "%s" % tool.bugs.attachment_url_for_id(patch.id(), action="edit")
-class PatchesToReview(Command):
+class PatchesToReview(AbstractDeclarativeCommand):
name = "patches-to-review"
- show_in_main_help = False
- def __init__(self):
- Command.__init__(self, "List patches that are pending review")
+ help_text = "List patches that are pending review"
def execute(self, options, args, tool):
- patch_ids = tool.bugs.fetch_attachment_ids_from_review_queue()
+ patch_ids = tool.bugs.queries.fetch_attachment_ids_from_review_queue()
log("Patches pending review:")
for patch_id in patch_ids:
print patch_id
-class ReviewedPatches(Command):
- name = "reviewed-patches"
- show_in_main_help = False
- def __init__(self):
- Command.__init__(self, "List r+'d patches on a bug", "BUGID")
-
- def execute(self, options, args, tool):
- bug_id = args[0]
- patches_to_land = tool.bugs.fetch_reviewed_patches_from_bug(bug_id)
- for patch in patches_to_land:
- print "%s" % patch["url"]
-
-
-class TreeStatus(Command):
+class TreeStatus(AbstractDeclarativeCommand):
name = "tree-status"
- show_in_main_help = True
- def __init__(self):
- Command.__init__(self, "Print the status of the %s buildbots" % BuildBot.default_host)
+ help_text = "Print the status of the %s buildbots" % BuildBot.default_host
+ long_help = """Fetches build status from http://build.webkit.org/one_box_per_builder
+and displayes the status of each builder."""
def execute(self, options, args, tool):
for builder in tool.buildbot.builder_statuses():
diff --git a/WebKitTools/Scripts/webkitpy/commands/queries.pyc b/WebKitTools/Scripts/webkitpy/commands/queries.pyc
new file mode 100644
index 0000000..829b6e3
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/queries.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/modules/commands/queries_unittest.py b/WebKitTools/Scripts/webkitpy/commands/queries_unittest.py
index 0d1c82a..b858777 100644
--- a/WebKitTools/Scripts/modules/commands/queries_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/commands/queries_unittest.py
@@ -26,43 +26,38 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import unittest
-
-from modules.bugzilla import Bugzilla
-from modules.commands.commandtest import CommandsTest
-from modules.commands.queries import *
-from modules.mock import Mock
-from modules.mock_bugzillatool import MockBugzillaTool
+from webkitpy.bugzilla import Bugzilla
+from webkitpy.commands.commandtest import CommandsTest
+from webkitpy.commands.queries import *
+from webkitpy.mock import Mock
+from webkitpy.mock_bugzillatool import MockBugzillaTool
class QueryCommandsTest(CommandsTest):
def test_bugs_to_commit(self):
- self.assert_execute_outputs(BugsToCommit(), None, "42\n75\n")
+ expected_stderr = "Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com)\n"
+ self.assert_execute_outputs(BugsToCommit(), None, "42\n77\n", expected_stderr)
- def test_patches_to_commit(self):
- expected_stdout = "http://example.com/197\nhttp://example.com/128\n"
- expected_stderr = "Patches in commit queue:\n"
- self.assert_execute_outputs(PatchesToCommit(), None, expected_stdout, expected_stderr)
+ def test_patches_in_commit_queue(self):
+ expected_stdout = "http://example.com/197\nhttp://example.com/103\n"
+ expected_stderr = "Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com)\nPatches in commit queue:\n"
+ self.assert_execute_outputs(PatchesInCommitQueue(), None, expected_stdout, expected_stderr)
def test_patches_to_commit_queue(self):
- expected_stdout = "http://example.com/197&action=edit\nhttp://example.com/128&action=edit\n"
- expected_stderr = ""
+ expected_stdout = "http://example.com/104&action=edit\n"
+ expected_stderr = "197 already has cq=+\n128 already has cq=+\n105 committer = \"Eric Seidel\" <eric@webkit.org>\n"
options = Mock()
options.bugs = False
self.assert_execute_outputs(PatchesToCommitQueue(), None, expected_stdout, expected_stderr, options=options)
- expected_stdout = "http://example.com/42\n"
+ expected_stdout = "http://example.com/77\n"
options.bugs = True
self.assert_execute_outputs(PatchesToCommitQueue(), None, expected_stdout, expected_stderr, options=options)
def test_patches_to_review(self):
- expected_stdout = "197\n128\n"
+ expected_stdout = "103\n"
expected_stderr = "Patches pending review:\n"
self.assert_execute_outputs(PatchesToReview(), None, expected_stdout, expected_stderr)
- def test_reviewed_patches(self):
- expected_stdout = "http://example.com/197\nhttp://example.com/128\n"
- self.assert_execute_outputs(ReviewedPatches(), [42], expected_stdout)
-
def test_tree_status(self):
expected_stdout = "ok : Builder1\nok : Builder2\n"
self.assert_execute_outputs(TreeStatus(), None, expected_stdout)
diff --git a/WebKitTools/Scripts/webkitpy/commands/queues.py b/WebKitTools/Scripts/webkitpy/commands/queues.py
new file mode 100644
index 0000000..6ea1c48
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/queues.py
@@ -0,0 +1,295 @@
+#!/usr/bin/env python
+# Copyright (c) 2009, Google Inc. All rights reserved.
+# Copyright (c) 2009 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:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import traceback
+import os
+
+from datetime import datetime
+from optparse import make_option
+from StringIO import StringIO
+
+from webkitpy.bugzilla import CommitterValidator
+from webkitpy.executive import ScriptError
+from webkitpy.grammar import pluralize
+from webkitpy.webkit_logging import error, log
+from webkitpy.multicommandtool import Command
+from webkitpy.patchcollection import PersistentPatchCollection, PersistentPatchCollectionDelegate
+from webkitpy.statusserver import StatusServer
+from webkitpy.stepsequence import StepSequenceErrorHandler
+from webkitpy.queueengine import QueueEngine, QueueEngineDelegate
+
+class AbstractQueue(Command, QueueEngineDelegate):
+ watchers = [
+ "webkit-bot-watchers@googlegroups.com",
+ ]
+
+ _pass_status = "Pass"
+ _fail_status = "Fail"
+ _error_status = "Error"
+
+ def __init__(self, options=None): # Default values should never be collections (like []) as default values are shared between invocations
+ options_list = (options or []) + [
+ make_option("--no-confirm", action="store_false", dest="confirm", default=True, help="Do not ask the user for confirmation before running the queue. Dangerous!"),
+ ]
+ Command.__init__(self, "Run the %s" % self.name, options=options_list)
+
+ def _cc_watchers(self, bug_id):
+ try:
+ self.tool.bugs.add_cc_to_bug(bug_id, self.watchers)
+ except Exception, e:
+ traceback.print_exc()
+ log("Failed to CC watchers.")
+
+ def _update_status(self, message, patch=None, results_file=None):
+ self.tool.status_server.update_status(self.name, message, patch, results_file)
+
+ def _did_pass(self, patch):
+ self._update_status(self._pass_status, patch)
+
+ def _did_fail(self, patch):
+ self._update_status(self._fail_status, patch)
+
+ def _did_error(self, patch, reason):
+ message = "%s: %s" % (self._error_status, reason)
+ self._update_status(message, patch)
+
+ def queue_log_path(self):
+ return "%s.log" % self.name
+
+ def work_item_log_path(self, patch):
+ return os.path.join("%s-logs" % self.name, "%s.log" % patch.bug_id())
+
+ def begin_work_queue(self):
+ log("CAUTION: %s will discard all local changes in \"%s\"" % (self.name, self.tool.scm().checkout_root))
+ if self.options.confirm:
+ response = self.tool.user.prompt("Are you sure? Type \"yes\" to continue: ")
+ if (response != "yes"):
+ error("User declined.")
+ log("Running WebKit %s." % self.name)
+
+ def should_continue_work_queue(self):
+ return True
+
+ def next_work_item(self):
+ raise NotImplementedError, "subclasses must implement"
+
+ def should_proceed_with_work_item(self, work_item):
+ raise NotImplementedError, "subclasses must implement"
+
+ def process_work_item(self, work_item):
+ raise NotImplementedError, "subclasses must implement"
+
+ def handle_unexpected_error(self, work_item, message):
+ raise NotImplementedError, "subclasses must implement"
+
+ def run_webkit_patch(self, args):
+ webkit_patch_args = [self.tool.path()]
+ # FIXME: This is a hack, we should have a more general way to pass global options.
+ webkit_patch_args += ["--status-host=%s" % self.tool.status_server.host]
+ webkit_patch_args += map(str, args)
+ self.tool.executive.run_and_throw_if_fail(webkit_patch_args)
+
+ def log_progress(self, patch_ids):
+ log("%s in %s [%s]" % (pluralize("patch", len(patch_ids)), self.name, ", ".join(map(str, patch_ids))))
+
+ def execute(self, options, args, tool, engine=QueueEngine):
+ self.options = options
+ self.tool = tool
+ return engine(self.name, self).run()
+
+ @classmethod
+ def _update_status_for_script_error(cls, tool, state, script_error, is_error=False):
+ message = script_error.message
+ if is_error:
+ message = "Error: %s" % message
+ output = script_error.message_with_output(output_limit=5*1024*1024) # 5MB
+ return tool.status_server.update_status(cls.name, message, state["patch"], StringIO(output))
+
+
+class CommitQueue(AbstractQueue, StepSequenceErrorHandler):
+ name = "commit-queue"
+ def __init__(self):
+ AbstractQueue.__init__(self)
+
+ # AbstractQueue methods
+
+ def begin_work_queue(self):
+ AbstractQueue.begin_work_queue(self)
+ self.committer_validator = CommitterValidator(self.tool.bugs)
+
+ def _validate_patches_in_commit_queue(self):
+ # Not using BugzillaQueries.fetch_patches_from_commit_queue() so we can reject patches with invalid committers/reviewers.
+ bug_ids = self.tool.bugs.queries.fetch_bug_ids_from_commit_queue()
+ all_patches = sum([self.tool.bugs.fetch_bug(bug_id).commit_queued_patches(include_invalid=True) for bug_id in bug_ids], [])
+ return self.committer_validator.patches_after_rejecting_invalid_commiters_and_reviewers(all_patches)
+
+ def next_work_item(self):
+ patches = self._validate_patches_in_commit_queue()
+ # FIXME: We could sort the patches in a specific order here, was suggested by https://bugs.webkit.org/show_bug.cgi?id=33395
+ if not patches:
+ self._update_status("Empty queue")
+ return None
+ # Only bother logging if we have patches in the queue.
+ self.log_progress([patch.id() for patch in patches])
+ return patches[0]
+
+ def _can_build_and_test(self):
+ try:
+ self.run_webkit_patch(["build-and-test", "--force-clean", "--non-interactive", "--build-style=both", "--quiet"])
+ except ScriptError, e:
+ self._update_status("Unabled to successfully build and test", None)
+ return False
+ return True
+
+ def _builders_are_green(self):
+ red_builders_names = self.tool.buildbot.red_core_builders_names()
+ if red_builders_names:
+ red_builders_names = map(lambda name: "\"%s\"" % name, red_builders_names) # Add quotes around the names.
+ self._update_status("Builders [%s] are red. See http://build.webkit.org" % ", ".join(red_builders_names), None)
+ return False
+ return True
+
+ def should_proceed_with_work_item(self, patch):
+ if not self._builders_are_green():
+ return False
+ if not self._can_build_and_test():
+ return False
+ if not self._builders_are_green():
+ return False
+ self._update_status("Landing patch", patch)
+ return True
+
+ def process_work_item(self, patch):
+ try:
+ self._cc_watchers(patch.bug_id())
+ # We pass --no-update here because we've already validated
+ # that the current revision actually builds and passes the tests.
+ # If we update, we risk moving to a revision that doesn't!
+ self.run_webkit_patch(["land-attachment", "--force-clean", "--non-interactive", "--no-update", "--parent-command=commit-queue", "--build-style=both", "--quiet", patch.id()])
+ self._did_pass(patch)
+ except ScriptError, e:
+ self._did_fail(patch)
+ raise e
+
+ def handle_unexpected_error(self, patch, message):
+ self.committer_validator.reject_patch_from_commit_queue(patch.id(), message)
+
+ # StepSequenceErrorHandler methods
+
+ @staticmethod
+ def _error_message_for_bug(tool, status_id, script_error):
+ if not script_error.output:
+ return script_error.message_with_output()
+ results_link = tool.status_server.results_url_for_status(status_id)
+ return "%s\nFull output: %s" % (script_error.message_with_output(), results_link)
+
+ @classmethod
+ def handle_script_error(cls, tool, state, script_error):
+ status_id = cls._update_status_for_script_error(tool, state, script_error)
+ validator = CommitterValidator(tool.bugs)
+ validator.reject_patch_from_commit_queue(state["patch"].id(), cls._error_message_for_bug(tool, status_id, script_error))
+
+
+class AbstractReviewQueue(AbstractQueue, PersistentPatchCollectionDelegate, StepSequenceErrorHandler):
+ def __init__(self, options=None):
+ AbstractQueue.__init__(self, options)
+
+ def _review_patch(self, patch):
+ raise NotImplementedError, "subclasses must implement"
+
+ # PersistentPatchCollectionDelegate methods
+
+ def collection_name(self):
+ return self.name
+
+ def fetch_potential_patch_ids(self):
+ return self.tool.bugs.queries.fetch_attachment_ids_from_review_queue()
+
+ def status_server(self):
+ return self.tool.status_server
+
+ def is_terminal_status(self, status):
+ return status == "Pass" or status == "Fail" or status.startswith("Error:")
+
+ # AbstractQueue methods
+
+ def begin_work_queue(self):
+ AbstractQueue.begin_work_queue(self)
+ self._patches = PersistentPatchCollection(self)
+
+ def next_work_item(self):
+ patch_id = self._patches.next()
+ if patch_id:
+ return self.tool.bugs.fetch_attachment(patch_id)
+ self._update_status("Empty queue")
+
+ def should_proceed_with_work_item(self, patch):
+ raise NotImplementedError, "subclasses must implement"
+
+ def process_work_item(self, patch):
+ try:
+ self._review_patch(patch)
+ self._did_pass(patch)
+ except ScriptError, e:
+ if e.exit_code != QueueEngine.handled_error_code:
+ self._did_fail(patch)
+ raise e
+
+ def handle_unexpected_error(self, patch, message):
+ log(message)
+
+ # StepSequenceErrorHandler methods
+
+ @classmethod
+ def handle_script_error(cls, tool, state, script_error):
+ log(script_error.message_with_output())
+
+
+class StyleQueue(AbstractReviewQueue):
+ name = "style-queue"
+ def __init__(self):
+ AbstractReviewQueue.__init__(self)
+
+ def should_proceed_with_work_item(self, patch):
+ self._update_status("Checking style", patch)
+ return True
+
+ def _review_patch(self, patch):
+ self.run_webkit_patch(["check-style", "--force-clean", "--non-interactive", "--parent-command=style-queue", patch.id()])
+
+ @classmethod
+ def handle_script_error(cls, tool, state, script_error):
+ is_svn_apply = script_error.command_name() == "svn-apply"
+ status_id = cls._update_status_for_script_error(tool, state, script_error, is_error=is_svn_apply)
+ if is_svn_apply:
+ QueueEngine.exit_after_handled_error(script_error)
+ message = "Attachment %s did not pass %s:\n\n%s\n\nIf any of these errors are false positives, please file a bug against check-webkit-style." % (state["patch"].id(), cls.name, script_error.message_with_output(output_limit=3*1024))
+ tool.bugs.post_comment_to_bug(state["patch"].bug_id(), message, cc=cls.watchers)
+ exit(1)
diff --git a/WebKitTools/Scripts/webkitpy/commands/queues.pyc b/WebKitTools/Scripts/webkitpy/commands/queues.pyc
new file mode 100644
index 0000000..8d52d05
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/queues.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/commands/queues_unittest.py b/WebKitTools/Scripts/webkitpy/commands/queues_unittest.py
new file mode 100644
index 0000000..87cd645
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/queues_unittest.py
@@ -0,0 +1,102 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+
+from webkitpy.commands.commandtest import CommandsTest
+from webkitpy.commands.queues import *
+from webkitpy.commands.queuestest import QueuesTest
+from webkitpy.mock_bugzillatool import MockBugzillaTool
+from webkitpy.outputcapture import OutputCapture
+
+
+class TestQueue(AbstractQueue):
+ name = "test-queue"
+
+
+class TestReviewQueue(AbstractReviewQueue):
+ name = "test-review-queue"
+
+
+class AbstractQueueTest(CommandsTest):
+ def _assert_log_progress_output(self, patch_ids, progress_output):
+ OutputCapture().assert_outputs(self, TestQueue().log_progress, [patch_ids], expected_stderr=progress_output)
+
+ def test_log_progress(self):
+ self._assert_log_progress_output([1,2,3], "3 patches in test-queue [1, 2, 3]\n")
+ self._assert_log_progress_output(["1","2","3"], "3 patches in test-queue [1, 2, 3]\n")
+ self._assert_log_progress_output([1], "1 patch in test-queue [1]\n")
+
+ def _assert_run_webkit_patch(self, run_args):
+ queue = TestQueue()
+ tool = MockBugzillaTool()
+ queue.bind_to_tool(tool)
+
+ queue.run_webkit_patch(run_args)
+ expected_run_args = ["echo", "--status-host=example.com"] + map(str, run_args)
+ tool.executive.run_and_throw_if_fail.assert_called_with(expected_run_args)
+
+ def test_run_webkit_patch(self):
+ self._assert_run_webkit_patch([1])
+ self._assert_run_webkit_patch(["one", 2])
+
+
+class AbstractReviewQueueTest(CommandsTest):
+ def test_patch_collection_delegate_methods(self):
+ queue = TestReviewQueue()
+ tool = MockBugzillaTool()
+ queue.bind_to_tool(tool)
+ self.assertEquals(queue.collection_name(), "test-review-queue")
+ self.assertEquals(queue.fetch_potential_patch_ids(), [103])
+ queue.status_server()
+ self.assertTrue(queue.is_terminal_status("Pass"))
+ self.assertTrue(queue.is_terminal_status("Fail"))
+ self.assertTrue(queue.is_terminal_status("Error: Your patch exploded"))
+ self.assertFalse(queue.is_terminal_status("Foo"))
+
+
+class CommitQueueTest(QueuesTest):
+ def test_commit_queue(self):
+ expected_stderr = {
+ "begin_work_queue" : "CAUTION: commit-queue will discard all local changes in \"%s\"\nRunning WebKit commit-queue.\n" % os.getcwd(),
+ # 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)
+2 patches in commit-queue [197, 106]
+""",
+ }
+ self.assert_queue_outputs(CommitQueue(), expected_stderr=expected_stderr)
+
+
+class StyleQueueTest(QueuesTest):
+ def test_style_queue(self):
+ expected_stderr = {
+ "begin_work_queue" : "CAUTION: style-queue will discard all local changes in \"%s\"\nRunning WebKit style-queue.\n" % os.getcwd(),
+ "handle_unexpected_error" : "Mock error message\n",
+ }
+ self.assert_queue_outputs(StyleQueue(), expected_stderr=expected_stderr)
diff --git a/WebKitTools/Scripts/webkitpy/commands/queuestest.py b/WebKitTools/Scripts/webkitpy/commands/queuestest.py
new file mode 100644
index 0000000..09d1c26
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/queuestest.py
@@ -0,0 +1,99 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import unittest
+
+from webkitpy.bugzilla import Attachment
+from webkitpy.mock import Mock
+from webkitpy.mock_bugzillatool import MockBugzillaTool
+from webkitpy.outputcapture import OutputCapture
+
+
+class MockQueueEngine(object):
+ def __init__(self, name, queue):
+ pass
+
+ def run(self):
+ pass
+
+
+class QueuesTest(unittest.TestCase):
+ mock_work_item = Attachment({
+ "id" : 1234,
+ "bug_id" : 345,
+ "attacher_email": "adam@example.com",
+ }, None)
+
+ def assert_queue_outputs(self, queue, args=None, work_item=None, expected_stdout=None, expected_stderr=None, options=Mock(), tool=MockBugzillaTool()):
+ if not expected_stdout:
+ expected_stdout = {}
+ if not expected_stderr:
+ expected_stderr = {}
+ if not args:
+ args = []
+ if not work_item:
+ work_item = self.mock_work_item
+ tool.user.prompt = lambda message: "yes"
+
+ queue.execute(options, args, tool, engine=MockQueueEngine)
+
+ OutputCapture().assert_outputs(self,
+ queue.queue_log_path,
+ expected_stdout=expected_stdout.get("queue_log_path", ""),
+ expected_stderr=expected_stderr.get("queue_log_path", ""))
+ OutputCapture().assert_outputs(self,
+ queue.work_item_log_path,
+ args=[work_item],
+ expected_stdout=expected_stdout.get("work_item_log_path", ""),
+ expected_stderr=expected_stderr.get("work_item_log_path", ""))
+ OutputCapture().assert_outputs(self,
+ queue.begin_work_queue,
+ expected_stdout=expected_stdout.get("begin_work_queue", ""),
+ expected_stderr=expected_stderr.get("begin_work_queue", ""))
+ OutputCapture().assert_outputs(self,
+ queue.should_continue_work_queue,
+ expected_stdout=expected_stdout.get("should_continue_work_queue", ""), expected_stderr=expected_stderr.get("should_continue_work_queue", ""))
+ OutputCapture().assert_outputs(self,
+ queue.next_work_item,
+ expected_stdout=expected_stdout.get("next_work_item", ""),
+ expected_stderr=expected_stderr.get("next_work_item", ""))
+ OutputCapture().assert_outputs(self,
+ queue.should_proceed_with_work_item,
+ args=[work_item],
+ expected_stdout=expected_stdout.get("should_proceed_with_work_item", ""),
+ expected_stderr=expected_stderr.get("should_proceed_with_work_item", ""))
+ OutputCapture().assert_outputs(self,
+ queue.process_work_item,
+ args=[work_item],
+ expected_stdout=expected_stdout.get("process_work_item", ""),
+ expected_stderr=expected_stderr.get("process_work_item", ""))
+ OutputCapture().assert_outputs(self,
+ queue.handle_unexpected_error,
+ args=[work_item, "Mock error message"],
+ expected_stdout=expected_stdout.get("handle_unexpected_error", ""),
+ expected_stderr=expected_stderr.get("handle_unexpected_error", ""))
diff --git a/WebKitTools/Scripts/webkitpy/commands/upload.py b/WebKitTools/Scripts/webkitpy/commands/upload.py
new file mode 100644
index 0000000..8d23d8b
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/upload.py
@@ -0,0 +1,406 @@
+#!/usr/bin/env python
+# Copyright (c) 2009, Google Inc. All rights reserved.
+# Copyright (c) 2009 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:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+import re
+import StringIO
+import sys
+
+from optparse import make_option
+
+import webkitpy.steps as steps
+
+from webkitpy.bugzilla import parse_bug_id
+from webkitpy.commands.abstractsequencedcommand import AbstractSequencedCommand
+from webkitpy.comments import bug_comment_from_svn_revision
+from webkitpy.committers import CommitterList
+from webkitpy.grammar import pluralize
+from webkitpy.webkit_logging import error, log
+from webkitpy.mock import Mock
+from webkitpy.multicommandtool import AbstractDeclarativeCommand
+
+class CommitMessageForCurrentDiff(AbstractDeclarativeCommand):
+ name = "commit-message"
+ help_text = "Print a commit message suitable for the uncommitted changes"
+
+ def execute(self, options, args, tool):
+ os.chdir(tool.scm().checkout_root)
+ print "%s" % tool.scm().commit_message_for_this_commit().message()
+
+
+class AssignToCommitter(AbstractDeclarativeCommand):
+ name = "assign-to-committer"
+ help_text = "Assign bug to whoever attached the most recent r+'d patch"
+
+ def _assign_bug_to_last_patch_attacher(self, bug_id):
+ committers = CommitterList()
+ bug = self.tool.bugs.fetch_bug(bug_id)
+ assigned_to_email = bug.assigned_to_email()
+ if assigned_to_email != self.tool.bugs.unassigned_email:
+ log("Bug %s is already assigned to %s (%s)." % (bug_id, assigned_to_email, committers.committer_by_email(assigned_to_email)))
+ return
+
+ reviewed_patches = bug.reviewed_patches()
+ if not reviewed_patches:
+ log("Bug %s has no non-obsolete patches, ignoring." % bug_id)
+ return
+ latest_patch = reviewed_patches[-1]
+ attacher_email = latest_patch.attacher_email()
+ committer = committers.committer_by_email(attacher_email)
+ if not committer:
+ log("Attacher %s is not a committer. Bug %s likely needs commit-queue+." % (attacher_email, bug_id))
+ return
+
+ reassign_message = "Attachment %s was posted by a committer and has review+, assigning to %s for commit." % (latest_patch.id(), committer.full_name)
+ self.tool.bugs.reassign_bug(bug_id, committer.bugzilla_email(), reassign_message)
+
+ def execute(self, options, args, tool):
+ for bug_id in tool.bugs.queries.fetch_bug_ids_from_pending_commit_list():
+ self._assign_bug_to_last_patch_attacher(bug_id)
+
+
+class ObsoleteAttachments(AbstractSequencedCommand):
+ name = "obsolete-attachments"
+ help_text = "Mark all attachments on a bug as obsolete"
+ argument_names = "BUGID"
+ steps = [
+ steps.ObsoletePatches,
+ ]
+
+ def _prepare_state(self, options, args, tool):
+ return { "bug_id" : args[0] }
+
+
+class AbstractPatchUploadingCommand(AbstractSequencedCommand):
+ def _bug_id(self, args, tool, state):
+ # Perfer a bug id passed as an argument over a bug url in the diff (i.e. ChangeLogs).
+ bug_id = args and args[0]
+ if not bug_id:
+ state["diff"] = tool.scm().create_patch()
+ bug_id = parse_bug_id(state["diff"])
+ return bug_id
+
+ def _prepare_state(self, options, args, tool):
+ state = {}
+ state["bug_id"] = self._bug_id(args, tool, state)
+ if not state["bug_id"]:
+ error("No bug id passed and no bug url found in diff.")
+ return state
+
+
+class Post(AbstractPatchUploadingCommand):
+ name = "post"
+ help_text = "Attach the current working directory diff to a bug as a patch file"
+ argument_names = "[BUGID]"
+ show_in_main_help = True
+ steps = [
+ steps.CheckStyle,
+ steps.ConfirmDiff,
+ steps.ObsoletePatches,
+ steps.PostDiff,
+ ]
+
+
+class LandSafely(AbstractPatchUploadingCommand):
+ name = "land-safely"
+ help_text = "Land the current diff via the commit-queue (Experimental)"
+ argument_names = "[BUGID]"
+ steps = [
+ steps.UpdateChangeLogsWithReviewer,
+ steps.ObsoletePatches,
+ steps.PostDiffForCommit,
+ ]
+
+
+class Prepare(AbstractSequencedCommand):
+ name = "prepare"
+ help_text = "Creates a bug (or prompts for an existing bug) and prepares the ChangeLogs"
+ argument_names = "[BUGID]"
+ show_in_main_help = True
+ steps = [
+ steps.PromptForBugOrTitle,
+ steps.CreateBug,
+ steps.PrepareChangeLog,
+ ]
+
+ def _prepare_state(self, options, args, tool):
+ bug_id = args and args[0]
+ return { "bug_id" : bug_id }
+
+
+class Upload(AbstractPatchUploadingCommand):
+ name = "upload"
+ help_text = "Automates the process of uploading a patch for review"
+ argument_names = "[BUGID]"
+ show_in_main_help = True
+ steps = [
+ steps.CheckStyle,
+ steps.PromptForBugOrTitle,
+ steps.CreateBug,
+ steps.PrepareChangeLog,
+ steps.EditChangeLog,
+ steps.ConfirmDiff,
+ steps.ObsoletePatches,
+ steps.PostDiff,
+ ]
+ long_help = """upload uploads the current diff to bugs.webkit.org.
+ If no bug id is provided, upload will create a bug.
+ If the current diff does not have a ChangeLog, upload
+ will prepare a ChangeLog. Once a patch is read, upload
+ will open the ChangeLogs for editing using the command in the
+ EDITOR environment variable and will display the diff using the
+ command in the PAGER environment variable."""
+
+ def _prepare_state(self, options, args, tool):
+ state = {}
+ state["bug_id"] = self._bug_id(args, tool, state)
+ return state
+
+
+class EditChangeLogs(AbstractSequencedCommand):
+ name = "edit-changelogs"
+ help_text = "Opens modified ChangeLogs in $EDITOR"
+ show_in_main_help = True
+ steps = [
+ steps.EditChangeLog,
+ ]
+
+
+class PostCommits(AbstractDeclarativeCommand):
+ name = "post-commits"
+ help_text = "Attach a range of local commits to bugs as patch files"
+ argument_names = "COMMITISH"
+
+ def __init__(self):
+ options = [
+ make_option("-b", "--bug-id", action="store", type="string", dest="bug_id", help="Specify bug id if no URL is provided in the commit log."),
+ make_option("--add-log-as-comment", action="store_true", dest="add_log_as_comment", default=False, help="Add commit log message as a comment when uploading the patch."),
+ make_option("-m", "--description", action="store", type="string", dest="description", help="Description string for the attachment (default: description from commit message)"),
+ steps.Options.obsolete_patches,
+ steps.Options.review,
+ steps.Options.request_commit,
+ ]
+ AbstractDeclarativeCommand.__init__(self, options=options, requires_local_commits=True)
+
+ def _comment_text_for_commit(self, options, commit_message, tool, commit_id):
+ comment_text = None
+ if (options.add_log_as_comment):
+ comment_text = commit_message.body(lstrip=True)
+ comment_text += "---\n"
+ comment_text += tool.scm().files_changed_summary_for_commit(commit_id)
+ return comment_text
+
+ def _diff_file_for_commit(self, tool, commit_id):
+ diff = tool.scm().create_patch_from_local_commit(commit_id)
+ return StringIO.StringIO(diff) # add_patch_to_bug expects a file-like object
+
+ def execute(self, options, args, tool):
+ commit_ids = tool.scm().commit_ids_from_commitish_arguments(args)
+ if len(commit_ids) > 10: # We could lower this limit, 10 is too many for one bug as-is.
+ error("webkit-patch does not support attaching %s at once. Are you sure you passed the right commit range?" % (pluralize("patch", len(commit_ids))))
+
+ have_obsoleted_patches = set()
+ for commit_id in commit_ids:
+ commit_message = tool.scm().commit_message_for_local_commit(commit_id)
+
+ # Prefer --bug-id=, then a bug url in the commit message, then a bug url in the entire commit diff (i.e. ChangeLogs).
+ bug_id = options.bug_id or parse_bug_id(commit_message.message()) or parse_bug_id(tool.scm().create_patch_from_local_commit(commit_id))
+ if not bug_id:
+ log("Skipping %s: No bug id found in commit or specified with --bug-id." % commit_id)
+ continue
+
+ if options.obsolete_patches and bug_id not in have_obsoleted_patches:
+ state = { "bug_id": bug_id }
+ steps.ObsoletePatches(tool, options).run(state)
+ have_obsoleted_patches.add(bug_id)
+
+ diff_file = self._diff_file_for_commit(tool, commit_id)
+ description = options.description or commit_message.description(lstrip=True, strip_url=True)
+ comment_text = self._comment_text_for_commit(options, commit_message, tool, commit_id)
+ tool.bugs.add_patch_to_bug(bug_id, diff_file, description, comment_text, mark_for_review=options.review, mark_for_commit_queue=options.request_commit)
+
+
+class MarkBugFixed(AbstractDeclarativeCommand):
+ name = "mark-bug-fixed"
+ help_text = "Mark the specified bug as fixed"
+ argument_names = "[SVN_REVISION]"
+ def __init__(self):
+ options = [
+ make_option("--bug-id", action="store", type="string", dest="bug_id", help="Specify bug id if no URL is provided in the commit log."),
+ make_option("--comment", action="store", type="string", dest="comment", help="Text to include in bug comment."),
+ make_option("--open", action="store_true", default=False, dest="open_bug", help="Open bug in default web browser (Mac only)."),
+ make_option("--update-only", action="store_true", default=False, dest="update_only", help="Add comment to the bug, but do not close it."),
+ ]
+ AbstractDeclarativeCommand.__init__(self, options=options)
+
+ def _fetch_commit_log(self, tool, svn_revision):
+ if not svn_revision:
+ return tool.scm().last_svn_commit_log()
+ return tool.scm().svn_commit_log(svn_revision)
+
+ def _determine_bug_id_and_svn_revision(self, tool, bug_id, svn_revision):
+ commit_log = self._fetch_commit_log(tool, svn_revision)
+
+ if not bug_id:
+ bug_id = parse_bug_id(commit_log)
+
+ if not svn_revision:
+ match = re.search("^r(?P<svn_revision>\d+) \|", commit_log, re.MULTILINE)
+ if match:
+ svn_revision = match.group('svn_revision')
+
+ if not bug_id or not svn_revision:
+ not_found = []
+ if not bug_id:
+ not_found.append("bug id")
+ if not svn_revision:
+ not_found.append("svn revision")
+ error("Could not find %s on command-line or in %s."
+ % (" or ".join(not_found), "r%s" % svn_revision if svn_revision else "last commit"))
+
+ return (bug_id, svn_revision)
+
+ def execute(self, options, args, tool):
+ bug_id = options.bug_id
+
+ svn_revision = args and args[0]
+ if svn_revision:
+ if re.match("^r[0-9]+$", svn_revision, re.IGNORECASE):
+ svn_revision = svn_revision[1:]
+ if not re.match("^[0-9]+$", svn_revision):
+ error("Invalid svn revision: '%s'" % svn_revision)
+
+ needs_prompt = False
+ if not bug_id or not svn_revision:
+ needs_prompt = True
+ (bug_id, svn_revision) = self._determine_bug_id_and_svn_revision(tool, bug_id, svn_revision)
+
+ log("Bug: <%s> %s" % (tool.bugs.bug_url_for_bug_id(bug_id), tool.bugs.fetch_bug_dictionary(bug_id)["title"]))
+ log("Revision: %s" % svn_revision)
+
+ if options.open_bug:
+ tool.user.open_url(tool.bugs.bug_url_for_bug_id(bug_id))
+
+ if needs_prompt:
+ if not tool.user.confirm("Is this correct?"):
+ exit(1)
+
+ bug_comment = bug_comment_from_svn_revision(svn_revision)
+ if options.comment:
+ bug_comment = "%s\n\n%s" % (options.comment, bug_comment)
+
+ if options.update_only:
+ log("Adding comment to Bug %s." % bug_id)
+ tool.bugs.post_comment_to_bug(bug_id, bug_comment)
+ else:
+ log("Adding comment to Bug %s and marking as Resolved/Fixed." % bug_id)
+ tool.bugs.close_bug_as_fixed(bug_id, bug_comment)
+
+
+# FIXME: Requires unit test. Blocking issue: too complex for now.
+class CreateBug(AbstractDeclarativeCommand):
+ name = "create-bug"
+ help_text = "Create a bug from local changes or local commits"
+ argument_names = "[COMMITISH]"
+
+ def __init__(self):
+ options = [
+ steps.Options.cc,
+ steps.Options.component,
+ make_option("--no-prompt", action="store_false", dest="prompt", default=True, help="Do not prompt for bug title and comment; use commit log instead."),
+ make_option("--no-review", action="store_false", dest="review", default=True, help="Do not mark the patch for review."),
+ make_option("--request-commit", action="store_true", dest="request_commit", default=False, help="Mark the patch as needing auto-commit after review."),
+ ]
+ AbstractDeclarativeCommand.__init__(self, options=options)
+
+ def create_bug_from_commit(self, options, args, tool):
+ commit_ids = tool.scm().commit_ids_from_commitish_arguments(args)
+ if len(commit_ids) > 3:
+ error("Are you sure you want to create one bug with %s patches?" % len(commit_ids))
+
+ commit_id = commit_ids[0]
+
+ bug_title = ""
+ comment_text = ""
+ if options.prompt:
+ (bug_title, comment_text) = self.prompt_for_bug_title_and_comment()
+ else:
+ commit_message = tool.scm().commit_message_for_local_commit(commit_id)
+ bug_title = commit_message.description(lstrip=True, strip_url=True)
+ comment_text = commit_message.body(lstrip=True)
+ comment_text += "---\n"
+ comment_text += tool.scm().files_changed_summary_for_commit(commit_id)
+
+ diff = tool.scm().create_patch_from_local_commit(commit_id)
+ diff_file = StringIO.StringIO(diff) # create_bug expects a file-like object
+ bug_id = tool.bugs.create_bug(bug_title, comment_text, options.component, diff_file, "Patch", cc=options.cc, mark_for_review=options.review, mark_for_commit_queue=options.request_commit)
+
+ if bug_id and len(commit_ids) > 1:
+ options.bug_id = bug_id
+ options.obsolete_patches = False
+ # FIXME: We should pass through --no-comment switch as well.
+ PostCommits.execute(self, options, commit_ids[1:], tool)
+
+ def create_bug_from_patch(self, options, args, tool):
+ bug_title = ""
+ comment_text = ""
+ if options.prompt:
+ (bug_title, comment_text) = self.prompt_for_bug_title_and_comment()
+ else:
+ commit_message = tool.scm().commit_message_for_this_commit()
+ bug_title = commit_message.description(lstrip=True, strip_url=True)
+ comment_text = commit_message.body(lstrip=True)
+
+ diff = tool.scm().create_patch()
+ diff_file = StringIO.StringIO(diff) # create_bug expects a file-like object
+ bug_id = tool.bugs.create_bug(bug_title, comment_text, options.component, diff_file, "Patch", cc=options.cc, mark_for_review=options.review, mark_for_commit_queue=options.request_commit)
+
+ def prompt_for_bug_title_and_comment(self):
+ bug_title = raw_input("Bug title: ")
+ print "Bug comment (hit ^D on blank line to end):"
+ lines = sys.stdin.readlines()
+ try:
+ sys.stdin.seek(0, os.SEEK_END)
+ except IOError:
+ # Cygwin raises an Illegal Seek (errno 29) exception when the above
+ # seek() call is made. Ignoring it seems to cause no harm.
+ # FIXME: Figure out a way to get avoid the exception in the first
+ # place.
+ pass
+ comment_text = "".join(lines)
+ return (bug_title, comment_text)
+
+ def execute(self, options, args, tool):
+ if len(args):
+ if (not tool.scm().supports_local_commits()):
+ error("Extra arguments not supported; patch is taken from working directory.")
+ self.create_bug_from_commit(options, args, tool)
+ else:
+ self.create_bug_from_patch(options, args, tool)
diff --git a/WebKitTools/Scripts/webkitpy/commands/upload.pyc b/WebKitTools/Scripts/webkitpy/commands/upload.pyc
new file mode 100644
index 0000000..a4bd81b
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/upload.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/commands/upload_unittest.py b/WebKitTools/Scripts/webkitpy/commands/upload_unittest.py
new file mode 100644
index 0000000..33001ac
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/commands/upload_unittest.py
@@ -0,0 +1,84 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from webkitpy.commands.commandtest import CommandsTest
+from webkitpy.commands.upload import *
+from webkitpy.mock import Mock
+from webkitpy.mock_bugzillatool import MockBugzillaTool
+
+class UploadCommandsTest(CommandsTest):
+ def test_commit_message_for_current_diff(self):
+ tool = MockBugzillaTool()
+ mock_commit_message_for_this_commit = Mock()
+ mock_commit_message_for_this_commit.message = lambda: "Mock message"
+ tool._scm.commit_message_for_this_commit = lambda: mock_commit_message_for_this_commit
+ expected_stdout = "Mock message\n"
+ self.assert_execute_outputs(CommitMessageForCurrentDiff(), [], expected_stdout=expected_stdout, tool=tool)
+
+ def test_assign_to_committer(self):
+ tool = MockBugzillaTool()
+ expected_stderr = "Bug 77 is already assigned to foo@foo.com (None).\nBug 76 has no non-obsolete patches, ignoring.\n"
+ self.assert_execute_outputs(AssignToCommitter(), [], expected_stderr=expected_stderr, tool=tool)
+ tool.bugs.reassign_bug.assert_called_with(42, "eric@webkit.org", "Attachment 128 was posted by a committer and has review+, assigning to Eric Seidel for commit.")
+
+ def test_obsolete_attachments(self):
+ expected_stderr = "Obsoleting 2 old patches on bug 42\n"
+ self.assert_execute_outputs(ObsoleteAttachments(), [42], expected_stderr=expected_stderr)
+
+ def test_post(self):
+ expected_stderr = "Running check-webkit-style\nObsoleting 2 old patches on bug 42\n"
+ self.assert_execute_outputs(Post(), [42], expected_stderr=expected_stderr)
+
+ def test_post(self):
+ expected_stderr = "Obsoleting 2 old patches on bug 42\n"
+ self.assert_execute_outputs(LandSafely(), [42], expected_stderr=expected_stderr)
+
+ def test_prepare_diff_with_arg(self):
+ self.assert_execute_outputs(Prepare(), [42])
+
+ def test_prepare(self):
+ self.assert_execute_outputs(Prepare(), [])
+
+ def test_upload(self):
+ expected_stderr = "Running check-webkit-style\nObsoleting 2 old patches on bug 42\nMOCK: user.open_url: http://example.com/42\n"
+ self.assert_execute_outputs(Upload(), [42], expected_stderr=expected_stderr)
+
+ def test_mark_bug_fixed(self):
+ tool = MockBugzillaTool()
+ tool._scm.last_svn_commit_log = lambda: "r9876 |"
+ options = Mock()
+ options.bug_id = 42
+ expected_stderr = """Bug: <http://example.com/42> Bug with two r+'d and cq+'d patches, one of which has an invalid commit-queue setter.
+Revision: 9876
+MOCK: user.open_url: http://example.com/42
+Adding comment to Bug 42.
+"""
+ self.assert_execute_outputs(MarkBugFixed(), [], expected_stderr=expected_stderr, tool=tool, options=options)
+
+ def test_edit_changelog(self):
+ self.assert_execute_outputs(EditChangeLogs(), [])
diff --git a/WebKitTools/Scripts/modules/comments.py b/WebKitTools/Scripts/webkitpy/comments.py
index eeee655..77ad239 100755
--- a/WebKitTools/Scripts/modules/comments.py
+++ b/WebKitTools/Scripts/webkitpy/comments.py
@@ -4,7 +4,7 @@
# 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
@@ -14,7 +14,7 @@
# * 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
@@ -27,12 +27,16 @@
# (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 tool for automating dealing with bugzilla, posting patches, committing patches, etc.
+# A tool for automating dealing with bugzilla, posting patches, committing
+# patches, etc.
+
+from webkitpy.changelogs import view_source_url
-from modules.changelogs import view_source_url
def bug_comment_from_svn_revision(svn_revision):
- return "Committed r%s: <%s>" % (svn_revision, view_source_url(svn_revision))
+ return "Committed r%s: <%s>" % (svn_revision,
+ view_source_url(svn_revision))
+
def bug_comment_from_commit_text(scm, commit_text):
svn_revision = scm.svn_revision_from_commit_text(commit_text)
diff --git a/WebKitTools/Scripts/webkitpy/comments.pyc b/WebKitTools/Scripts/webkitpy/comments.pyc
new file mode 100644
index 0000000..ead9e58
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/comments.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/modules/committers.py b/WebKitTools/Scripts/webkitpy/committers.py
index d32a536..73e4172 100644
--- a/WebKitTools/Scripts/modules/committers.py
+++ b/WebKitTools/Scripts/webkitpy/committers.py
@@ -1,9 +1,9 @@
# Copyright (c) 2009, Google Inc. All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
-#
+#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
# * 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
@@ -28,7 +28,9 @@
#
# WebKit's Python module for committer and reviewer validation
+
class Committer:
+
def __init__(self, name, email_or_emails):
self.full_name = name
if isinstance(email_or_emails, str):
@@ -37,34 +39,49 @@ class Committer:
self.emails = email_or_emails
self.can_review = False
+ def bugzilla_email(self):
+ # FIXME: We're assuming the first email is a valid bugzilla email,
+ # which might not be right.
+ return self.emails[0]
+
def __str__(self):
return '"%s" <%s>' % (self.full_name, self.emails[0])
+
class Reviewer(Committer):
+
def __init__(self, name, email_or_emails):
Committer.__init__(self, name, email_or_emails)
self.can_review = True
-# This is intended as a canonical, machine-readable list of all non-reviewer committers for WebKit.
-# If your name is missing here and you are a committer, please add it. No review needed.
-# All reviewers are committers, so this list is only of committers who are not reviewers.
+
+# This is intended as a canonical, machine-readable list of all non-reviewer
+# committers for WebKit. If your name is missing here and you are a committer,
+# please add it. No review needed. All reviewers are committers, so this list
+# is only of committers who are not reviewers.
+
+
committers_unable_to_review = [
Committer("Aaron Boodman", "aa@chromium.org"),
Committer("Adam Langley", "agl@chromium.org"),
Committer("Albert J. Wong", "ajwong@chromium.org"),
Committer("Alexander Kellett", ["lypanov@mac.com", "a-lists001@lypanov.net", "lypanov@kde.org"]),
+ Committer("Alexander Pavlov", "apavlov@chromium.org"),
Committer("Andre Boule", "aboule@apple.com"),
Committer("Andrew Wellington", ["andrew@webkit.org", "proton@wiretapped.net"]),
+ Committer("Andras Becsi", "abecsi@webkit.org"),
Committer("Anthony Ricaud", "rik@webkit.org"),
Committer("Anton Muhin", "antonm@chromium.org"),
Committer("Antonio Gomes", "tonikitoo@webkit.org"),
Committer("Ben Murdoch", "benm@google.com"),
Committer("Benjamin C Meyer", ["ben@meyerhome.net", "ben@webkit.org"]),
+ Committer("Benjamin Otte", ["otte@gnome.org", "otte@webkit.org"]),
Committer("Brent Fulgham", "bfulgham@webkit.org"),
Committer("Brett Wilson", "brettw@chromium.org"),
Committer("Brian Weinstein", "bweinstein@apple.com"),
Committer("Cameron McCormack", "cam@webkit.org"),
Committer("Chris Fleizach", "cfleizach@apple.com"),
+ Committer("Chris Jerdonek", "cjerdonek@webkit.org"),
Committer("Chris Marrin", "cmarrin@apple.com"),
Committer("Chris Petersen", "cpetersen@apple.com"),
Committer("Christian Dywan", ["christian@twotoasts.de", "christian@webkit.org"]),
@@ -73,6 +90,7 @@ committers_unable_to_review = [
Committer("Daniel Bates", "dbates@webkit.org"),
Committer("David Smith", ["catfish.man@gmail.com", "dsmith@webkit.org"]),
Committer("Dean Jackson", "dino@apple.com"),
+ Committer("Dirk Pranke", "dpranke@chromium.org"),
Committer("Drew Wilson", "atwilson@chromium.org"),
Committer("Dumitru Daniliuc", "dumi@chromium.org"),
Committer("Eli Fidler", "eli@staikos.net"),
@@ -81,13 +99,14 @@ committers_unable_to_review = [
Committer("Eric Roman", "eroman@chromium.org"),
Committer("Feng Qian", "feng@chromium.org"),
Committer("Fumitoshi Ukai", "ukai@chromium.org"),
+ Committer("Gabor Loki", "loki@webkit.org"),
Committer("Girish Ramakrishnan", ["girish@forwardbias.in", "ramakrishnan.girish@gmail.com"]),
Committer("Graham Dennis", ["Graham.Dennis@gmail.com", "gdennis@webkit.org"]),
Committer("Greg Bolsinga", "bolsinga@apple.com"),
Committer("Hin-Chung Lam", ["hclam@google.com", "hclam@chromium.org"]),
+ Committer("Jakob Petsovits", ["jpetsovits@rim.com", "jpetso@gmx.at"]),
Committer("Jens Alfke", ["snej@chromium.org", "jens@apple.com"]),
Committer("Jeremy Moskovich", ["playmobil@google.com", "jeremy@chromium.org"]),
- Committer("Jeremy Orlow", "jorlow@chromium.org"),
Committer("Jessie Berlin", ["jberlin@webkit.org", "jberlin@apple.com"]),
Committer("Jian Li", "jianli@chromium.org"),
Committer("John Abd-El-Malek", "jam@chromium.org"),
@@ -98,45 +117,52 @@ committers_unable_to_review = [
Committer("Jungshik Shin", "jshin@chromium.org"),
Committer("Keishi Hattori", "keishi@webkit.org"),
Committer("Kelly Norton", "knorton@google.com"),
+ Committer("Kenneth Russell", "kbr@google.com"),
Committer("Kent Tamura", "tkent@chromium.org"),
Committer("Krzysztof Kowalczyk", "kkowalczyk@gmail.com"),
- Committer("Laszlo Gombos", "laszlo.1.gombos@nokia.com"),
Committer("Levi Weintraub", "lweintraub@apple.com"),
Committer("Mads Ager", "ager@chromium.org"),
Committer("Matt Lilek", ["webkit@mattlilek.com", "pewtermoose@webkit.org"]),
Committer("Matt Perry", "mpcomplete@chromium.org"),
Committer("Maxime Britto", ["maxime.britto@gmail.com", "britto@apple.com"]),
Committer("Maxime Simon", ["simon.maxime@gmail.com", "maxime.simon@webkit.org"]),
+ Committer("Martin Robinson", ["mrobinson@webkit.org", "martin.james.robinson@gmail.com"]),
Committer("Michelangelo De Simone", "michelangelo@webkit.org"),
- Committer("Mike Belshe", "mike@belshe.com"),
+ Committer("Mike Belshe", ["mbelshe@chromium.org", "mike@belshe.com"]),
Committer("Mike Fenton", ["mike.fenton@torchmobile.com", "mifenton@rim.com"]),
Committer("Mike Thole", ["mthole@mikethole.com", "mthole@apple.com"]),
Committer("Nate Chapin", "japhet@chromium.org"),
Committer("Ojan Vafai", "ojan@chromium.org"),
Committer("Pam Greene", "pam@chromium.org"),
Committer("Peter Kasting", ["pkasting@google.com", "pkasting@chromium.org"]),
+ Committer("Philippe Normand", ["pnormand@igalia.com", "philn@webkit.org"]),
Committer("Pierre d'Herbemont", ["pdherbemont@free.fr", "pdherbemont@apple.com"]),
Committer("Pierre-Olivier Latour", "pol@apple.com"),
Committer("Roland Steiner", "rolandsteiner@chromium.org"),
Committer("Ryosuke Niwa", "rniwa@webkit.org"),
Committer("Scott Violet", "sky@chromium.org"),
- Committer("Shinichiro Hamaji", "hamaji@chromium.org"),
Committer("Stephen White", "senorblanco@chromium.org"),
Committer("Steve Block", "steveblock@google.com"),
Committer("Tony Chang", "tony@chromium.org"),
Committer("Trey Matteson", "trey@usa.net"),
Committer("Tristan O'Tierney", ["tristan@otierney.net", "tristan@apple.com"]),
+ Committer("Victor Wang", "victorw@chromium.org"),
Committer("William Siegrist", "wsiegrist@apple.com"),
Committer("Yael Aharon", "yael.aharon@nokia.com"),
Committer("Yaar Schnitman", ["yaar@chromium.org", "yaar@google.com"]),
Committer("Yong Li", ["yong.li@torchmobile.com", "yong.li.webkit@gmail.com"]),
Committer("Yongjun Zhang", "yongjun.zhang@nokia.com"),
Committer("Yury Semikhatsky", "yurys@chromium.org"),
+ Committer("Zoltan Herczeg", "zherczeg@webkit.org"),
Committer("Zoltan Horvath", "zoltan@webkit.org"),
]
-# This is intended as a canonical, machine-readable list of all reviewers for WebKit.
-# If your name is missing here and you are a reviewer, please add it. No review needed.
+
+# This is intended as a canonical, machine-readable list of all reviewers for
+# WebKit. If your name is missing here and you are a reviewer, please add it.
+# No review needed.
+
+
reviewers_list = [
Reviewer("Ada Chan", "adachan@apple.com"),
Reviewer("Adam Barth", "abarth@webkit.org"),
@@ -148,7 +174,7 @@ reviewers_list = [
Reviewer("Alp Toker", ["alp@nuanti.com", "alp@atoker.com", "alp@webkit.org"]),
Reviewer("Anders Carlsson", ["andersca@apple.com", "acarlsson@apple.com"]),
Reviewer("Antti Koivisto", ["koivisto@iki.fi", "antti@apple.com"]),
- Reviewer("Ariya Hidayat", ["ariya.hidayat@trolltech.com", "ariya.hidayat@gmail.com", "ariya@webkit.org"]),
+ Reviewer("Ariya Hidayat", ["ariya.hidayat@gmail.com", "ariya@webkit.org"]),
Reviewer("Beth Dakin", "bdakin@apple.com"),
Reviewer("Brady Eidson", "beidson@apple.com"),
Reviewer("Cameron Zwarich", ["zwarich@apple.com", "cwzwarich@apple.com", "cwzwarich@webkit.org"]),
@@ -172,6 +198,7 @@ reviewers_list = [
Reviewer("Gustavo Noronha Silva", ["gns@gnome.org", "kov@webkit.org"]),
Reviewer("Holger Freyther", ["zecke@selfish.org", "zecke@webkit.org"]),
Reviewer("Jan Alonzo", ["jmalonzo@gmail.com", "jmalonzo@webkit.org"]),
+ Reviewer("Jeremy Orlow", "jorlow@chromium.org"),
Reviewer("John Sullivan", "sullivan@apple.com"),
Reviewer("Jon Honeycutt", "jhoneycutt@apple.com"),
Reviewer("Justin Garcia", "justin.garcia@apple.com"),
@@ -181,6 +208,7 @@ reviewers_list = [
Reviewer("Kevin McCullough", "kmccullough@apple.com"),
Reviewer("Kevin Ollivier", ["kevino@theolliviers.com", "kevino@webkit.org"]),
Reviewer("Lars Knoll", ["lars@trolltech.com", "lars@kde.org"]),
+ Reviewer("Laszlo Gombos", "laszlo.1.gombos@nokia.com"),
Reviewer("Maciej Stachowiak", "mjs@apple.com"),
Reviewer("Mark Rowe", "mrowe@apple.com"),
Reviewer("Nikolas Zimmermann", ["zimmermann@kde.org", "zimmermann@physik.rwth-aachen.de", "zimmermann@webkit.org"]),
@@ -189,8 +217,9 @@ reviewers_list = [
Reviewer("Richard Williamson", "rjw@apple.com"),
Reviewer("Rob Buis", ["rwlbuis@gmail.com", "rwlbuis@webkit.org"]),
Reviewer("Sam Weinig", ["sam@webkit.org", "weinig@apple.com"]),
+ Reviewer("Shinichiro Hamaji", "hamaji@chromium.org"),
Reviewer("Simon Fraser", "simon.fraser@apple.com"),
- Reviewer("Simon Hausmann", ["hausmann@webkit.org", "hausmann@kde.org"]),
+ Reviewer("Simon Hausmann", ["hausmann@webkit.org", "hausmann@kde.org", "simon.hausmann@nokia.com"]),
Reviewer("Stephanie Lewis", "slewis@apple.com"),
Reviewer("Steve Falkenburg", "sfalken@apple.com"),
Reviewer("Tim Omernick", "timo@apple.com"),
@@ -203,8 +232,12 @@ reviewers_list = [
class CommitterList:
+
# Committers and reviewers are passed in to allow easy testing
- def __init__(self, committers=committers_unable_to_review, reviewers=reviewers_list):
+
+ def __init__(self,
+ committers=committers_unable_to_review,
+ reviewers=reviewers_list):
self._committers = committers + reviewers
self._reviewers = reviewers
self._committers_by_email = {}
diff --git a/WebKitTools/Scripts/webkitpy/committers.pyc b/WebKitTools/Scripts/webkitpy/committers.pyc
new file mode 100644
index 0000000..bce8c17
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/committers.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/modules/committers_unittest.py b/WebKitTools/Scripts/webkitpy/committers_unittest.py
index cf9f486..f5dc539 100644
--- a/WebKitTools/Scripts/modules/committers_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/committers_unittest.py
@@ -43,6 +43,9 @@ class CommittersTest(unittest.TestCase):
self.assertEqual(committer_list.committer_by_email('two@rad.com'), reviewer)
self.assertEqual(committer_list.reviewer_by_email('so_two@gmail.com'), reviewer)
+ # Test that the first email is assumed to be the Bugzilla email address (for now)
+ self.assertEqual(committer_list.committer_by_email('two@rad.com').bugzilla_email(), 'two@test.com')
+
# Test that a known committer is not returned during reviewer lookup
self.assertEqual(committer_list.reviewer_by_email('one@test.com'), None)
diff --git a/WebKitTools/Scripts/webkitpy/credentials.py b/WebKitTools/Scripts/webkitpy/credentials.py
new file mode 100644
index 0000000..a4d8e34
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/credentials.py
@@ -0,0 +1,132 @@
+# Copyright (c) 2009 Google Inc. All rights reserved.
+# Copyright (c) 2009 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:
+#
+# * 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.
+#
+# Python module for reading stored web credentials from the OS.
+
+import getpass
+import os
+import platform
+import re
+
+from webkitpy.executive import Executive, ScriptError
+from webkitpy.webkit_logging import log
+from webkitpy.scm import Git
+
+
+class Credentials(object):
+
+ def __init__(self, host, git_prefix=None, executive=None, cwd=os.getcwd()):
+ self.host = host
+ self.git_prefix = git_prefix
+ self.executive = executive or Executive()
+ self.cwd = cwd
+
+ def _credentials_from_git(self):
+ return [self._read_git_config("username"),
+ self._read_git_config("password")]
+
+ def _read_git_config(self, key):
+ config_key = "%s.%s" % (self.git_prefix, key) if self.git_prefix \
+ else key
+ return self.executive.run_command(
+ ["git", "config", "--get", config_key],
+ error_handler=Executive.ignore_error).rstrip('\n')
+
+ def _keychain_value_with_label(self, label, source_text):
+ match = re.search("%s\"(?P<value>.+)\"" % label,
+ source_text,
+ re.MULTILINE)
+ if match:
+ return match.group('value')
+
+ def _is_mac_os_x(self):
+ return platform.mac_ver()[0]
+
+ def _parse_security_tool_output(self, security_output):
+ username = self._keychain_value_with_label("^\s*\"acct\"<blob>=",
+ security_output)
+ password = self._keychain_value_with_label("^password: ",
+ security_output)
+ return [username, password]
+
+ def _run_security_tool(self, username=None):
+ security_command = [
+ "/usr/bin/security",
+ "find-internet-password",
+ "-g",
+ "-s",
+ self.host,
+ ]
+ if username:
+ security_command += ["-a", username]
+
+ log("Reading Keychain for %s account and password. "
+ "Click \"Allow\" to continue..." % self.host)
+ try:
+ return self.executive.run_command(security_command)
+ except ScriptError:
+ # Failed to either find a keychain entry or somekind of OS-related
+ # error occured (for instance, couldn't find the /usr/sbin/security
+ # command).
+ log("Could not find a keychain entry for %s." % self.host)
+ return None
+
+ def _credentials_from_keychain(self, username=None):
+ if not self._is_mac_os_x():
+ return [username, None]
+
+ security_output = self._run_security_tool(username)
+ if security_output:
+ return self._parse_security_tool_output(security_output)
+ else:
+ return [None, None]
+
+ def read_credentials(self):
+ username = None
+ password = None
+
+ try:
+ if Git.in_working_directory(self.cwd):
+ (username, password) = self._credentials_from_git()
+ except OSError, e:
+ # Catch and ignore OSError exceptions such as "no such file
+ # or directory" (OSError errno 2), which imply that the Git
+ # command cannot be found/is not installed.
+ pass
+
+ if not username or not password:
+ (username, password) = self._credentials_from_keychain(username)
+
+ if not username:
+ username = raw_input("%s login: " % self.host)
+ if not password:
+ password = getpass.getpass("%s password for %s: " % (self.host,
+ username))
+
+ return [username, password]
diff --git a/WebKitTools/Scripts/webkitpy/credentials.pyc b/WebKitTools/Scripts/webkitpy/credentials.pyc
new file mode 100644
index 0000000..cd42568
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/credentials.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/credentials_unittest.py b/WebKitTools/Scripts/webkitpy/credentials_unittest.py
new file mode 100644
index 0000000..0bd5340
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/credentials_unittest.py
@@ -0,0 +1,127 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+import tempfile
+import unittest
+from webkitpy.credentials import Credentials
+from webkitpy.executive import Executive
+from webkitpy.outputcapture import OutputCapture
+from webkitpy.mock import Mock
+
+class CredentialsTest(unittest.TestCase):
+ example_security_output = """keychain: "/Users/test/Library/Keychains/login.keychain"
+class: "inet"
+attributes:
+ 0x00000007 <blob>="bugs.webkit.org (test@webkit.org)"
+ 0x00000008 <blob>=<NULL>
+ "acct"<blob>="test@webkit.org"
+ "atyp"<blob>="form"
+ "cdat"<timedate>=0x32303039303832353233353231365A00 "20090825235216Z\000"
+ "crtr"<uint32>=<NULL>
+ "cusi"<sint32>=<NULL>
+ "desc"<blob>="Web form password"
+ "icmt"<blob>="default"
+ "invi"<sint32>=<NULL>
+ "mdat"<timedate>=0x32303039303930393137323635315A00 "20090909172651Z\000"
+ "nega"<sint32>=<NULL>
+ "path"<blob>=<NULL>
+ "port"<uint32>=0x00000000
+ "prot"<blob>=<NULL>
+ "ptcl"<uint32>="htps"
+ "scrp"<sint32>=<NULL>
+ "sdmn"<blob>=<NULL>
+ "srvr"<blob>="bugs.webkit.org"
+ "type"<uint32>=<NULL>
+password: "SECRETSAUCE"
+"""
+
+ def test_keychain_lookup_on_non_mac(self):
+ class FakeCredentials(Credentials):
+ def _is_mac_os_x(self):
+ return False
+ credentials = FakeCredentials("bugs.webkit.org")
+ self.assertEqual(credentials._is_mac_os_x(), False)
+ self.assertEqual(credentials._credentials_from_keychain("foo"), ["foo", None])
+
+ def test_security_output_parse(self):
+ credentials = Credentials("bugs.webkit.org")
+ self.assertEqual(credentials._parse_security_tool_output(self.example_security_output), ["test@webkit.org", "SECRETSAUCE"])
+
+ def test_security_output_parse_entry_not_found(self):
+ credentials = Credentials("foo.example.com")
+ if not credentials._is_mac_os_x():
+ return # This test does not run on a non-Mac.
+
+ # Note, we ignore the captured output because it is already covered
+ # by the test case CredentialsTest._assert_security_call (below).
+ outputCapture = OutputCapture()
+ outputCapture.capture_output()
+ self.assertEqual(credentials._run_security_tool(), None)
+ outputCapture.restore_output()
+
+ def _assert_security_call(self, username=None):
+ executive_mock = Mock()
+ credentials = Credentials("example.com", executive=executive_mock)
+
+ expected_stderr = "Reading Keychain for example.com account and password. Click \"Allow\" to continue...\n"
+ OutputCapture().assert_outputs(self, credentials._run_security_tool, [username], expected_stderr=expected_stderr)
+
+ security_args = ["/usr/bin/security", "find-internet-password", "-g", "-s", "example.com"]
+ if username:
+ security_args += ["-a", username]
+ executive_mock.run_command.assert_called_with(security_args)
+
+ def test_security_calls(self):
+ self._assert_security_call()
+ self._assert_security_call(username="foo")
+
+ def test_git_config_calls(self):
+ executive_mock = Mock()
+ credentials = Credentials("example.com", executive=executive_mock)
+ credentials._read_git_config("foo")
+ executive_mock.run_command.assert_called_with(["git", "config", "--get", "foo"], error_handler=Executive.ignore_error)
+
+ credentials = Credentials("example.com", git_prefix="test_prefix", executive=executive_mock)
+ credentials._read_git_config("foo")
+ executive_mock.run_command.assert_called_with(["git", "config", "--get", "test_prefix.foo"], error_handler=Executive.ignore_error)
+
+ def test_read_credentials_without_git_repo(self):
+ class FakeCredentials(Credentials):
+ def _is_mac_os_x(self):
+ return True
+ def _credentials_from_keychain(self, username):
+ return ["test@webkit.org", "SECRETSAUCE"]
+
+ temp_dir_path = tempfile.mkdtemp(suffix="not_a_git_repo")
+ credentials = FakeCredentials("bugs.webkit.org", cwd=temp_dir_path)
+ self.assertEqual(credentials.read_credentials(), ["test@webkit.org", "SECRETSAUCE"])
+ os.rmdir(temp_dir_path)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/WebKitTools/Scripts/modules/diff_parser.py b/WebKitTools/Scripts/webkitpy/diff_parser.py
index 91898af..7dce7e8 100644
--- a/WebKitTools/Scripts/modules/diff_parser.py
+++ b/WebKitTools/Scripts/webkitpy/diff_parser.py
@@ -48,11 +48,11 @@ def git_diff_to_svn_diff(line):
Args:
line: A string representing a line of the diff.
"""
- conversion_patterns = (("^diff --git a/(.+) b/(?P<FilePath>.+)", lambda matched: "Index: " + matched.group('FilePath') + "\n"),
+ conversion_patterns = (("^diff --git \w/(.+) \w/(?P<FilePath>.+)", lambda matched: "Index: " + matched.group('FilePath') + "\n"),
("^new file.*", lambda matched: "\n"),
("^index [0-9a-f]{7}\.\.[0-9a-f]{7} [0-9]{6}", lambda matched: "===================================================================\n"),
- ("^--- a/(?P<FilePath>.+)", lambda matched: "--- " + matched.group('FilePath') + "\n"),
- ("^\+\+\+ b/(?P<FilePath>.+)", lambda matched: "+++ " + matched.group('FilePath') + "\n"))
+ ("^--- \w/(?P<FilePath>.+)", lambda matched: "--- " + matched.group('FilePath') + "\n"),
+ ("^\+\+\+ \w/(?P<FilePath>.+)", lambda matched: "+++ " + matched.group('FilePath') + "\n"))
for pattern, conversion in conversion_patterns:
matched = match(pattern, line)
@@ -69,7 +69,7 @@ def get_diff_converter(first_diff_line):
If this line is git formatted, we'll return a
converter from git to SVN.
"""
- if match(r"^diff --git a/", first_diff_line):
+ if match(r"^diff --git \w/", first_diff_line):
return git_diff_to_svn_diff
return lambda input: input
diff --git a/WebKitTools/Scripts/modules/diff_parser_unittest.py b/WebKitTools/Scripts/webkitpy/diff_parser_unittest.py
index 1c806f0..7eb0eab 100644
--- a/WebKitTools/Scripts/modules/diff_parser_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/diff_parser_unittest.py
@@ -28,6 +28,7 @@
import unittest
import diff_parser
+import re
class DiffParserTest(unittest.TestCase):
@@ -82,11 +83,11 @@ index 0000000..6db26bd
@@ -0,0 +1 @@
+61a373ee739673a9dcd7bac62b9f182e
\ No newline at end of file
-'''.splitlines()
+'''
-
- def test_diff_parser(self):
- parser = diff_parser.DiffParser(self._PATCH)
+ def test_diff_parser(self, parser = None):
+ if not parser:
+ parser = diff_parser.DiffParser(self._PATCH.splitlines())
self.assertEquals(3, len(parser.files))
self.assertTrue('WebCore/rendering/style/StyleFlexibleBoxData.h' in parser.files)
@@ -126,6 +127,20 @@ index 0000000..6db26bd
self.assertEquals(1, len(diff.lines))
self.assertEquals((0, 1), diff.lines[0][0:2])
+ def test_git_mnemonicprefix(self):
+ p = re.compile(r' ([a|b])/')
+
+ prefixes = [
+ { 'a' : 'i', 'b' : 'w' }, # git-diff (compares the (i)ndex and the (w)ork tree)
+ { 'a' : 'c', 'b' : 'w' }, # git-diff HEAD (compares a (c)ommit and the (w)ork tree)
+ { 'a' : 'c', 'b' : 'i' }, # git diff --cached (compares a (c)ommit and the (i)ndex)
+ { 'a' : 'o', 'b' : 'w' }, # git-diff HEAD:file1 file2 (compares an (o)bject and a (w)ork tree entity)
+ { 'a' : '1', 'b' : '2' }, # git diff --no-index a b (compares two non-git things (1) and (2))
+ ]
+
+ for prefix in prefixes:
+ patch = p.sub(lambda x: " %s/" % prefix[x.group(1)], self._PATCH)
+ self.test_diff_parser(diff_parser.DiffParser(patch.splitlines()))
if __name__ == '__main__':
unittest.main()
diff --git a/WebKitTools/Scripts/modules/executive.py b/WebKitTools/Scripts/webkitpy/executive.py
index b73e17d..50b119b 100644
--- a/WebKitTools/Scripts/modules/executive.py
+++ b/WebKitTools/Scripts/webkitpy/executive.py
@@ -1,10 +1,10 @@
# Copyright (c) 2009, Google Inc. All rights reserved.
# Copyright (c) 2009 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:
-#
+#
# * 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
@@ -14,7 +14,7 @@
# * 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
@@ -32,11 +32,17 @@ import StringIO
import subprocess
import sys
-from modules.logging import tee
+from webkitpy.webkit_logging import tee
class ScriptError(Exception):
- def __init__(self, message=None, script_args=None, exit_code=None, output=None, cwd=None):
+
+ def __init__(self,
+ message=None,
+ script_args=None,
+ exit_code=None,
+ output=None,
+ cwd=None):
if not message:
message = 'Failed to run "%s"' % script_args
if exit_code:
@@ -53,22 +59,33 @@ class ScriptError(Exception):
def message_with_output(self, output_limit=500):
if self.output:
if output_limit and len(self.output) > output_limit:
- return "%s\nLast %s characters of output:\n%s" % (self, output_limit, self.output[-output_limit:])
+ return "%s\nLast %s characters of output:\n%s" % \
+ (self, output_limit, self.output[-output_limit:])
return "%s\n%s" % (self, self.output)
return str(self)
+ def command_name(self):
+ command_path = self.script_args
+ if type(command_path) is list:
+ command_path = command_path[0]
+ return os.path.basename(command_path)
+
-# FIXME: This should not be a global static.
-# New code should use Executive.run_command directly instead
def run_command(*args, **kwargs):
+ # FIXME: This should not be a global static.
+ # New code should use Executive.run_command directly instead
return Executive().run_command(*args, **kwargs)
class Executive(object):
+
def _run_command_with_teed_output(self, args, teed_output):
- child_process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ child_process = subprocess.Popen(args,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
- # Use our own custom wait loop because Popen ignores a tee'd stderr/stdout.
+ # Use our own custom wait loop because Popen ignores a tee'd
+ # stderr/stdout.
# FIXME: This could be improved not to flatten output to stdout.
while True:
output_line = child_process.stdout.readline()
@@ -90,9 +107,24 @@ class Executive(object):
child_out_file.close()
if exit_code:
- raise ScriptError(script_args=args, exit_code=exit_code, output=child_output)
+ raise ScriptError(script_args=args,
+ exit_code=exit_code,
+ output=child_output)
+
+ @staticmethod
+ def cpu_count():
+ # This API exists only in Python 2.6 and higher. :(
+ try:
+ import multiprocessing
+ return multiprocessing.cpu_count()
+ except (ImportError, NotImplementedError):
+ # This quantity is a lie but probably a reasonable guess for modern
+ # machines.
+ return 2
+
+ # Error handlers do not need to be static methods once all callers are
+ # updated to use an Executive object.
- # Error handlers do not need to be static methods once all callers are updated to use an Executive object.
@staticmethod
def default_error_handler(error):
raise error
@@ -102,7 +134,14 @@ class Executive(object):
pass
# FIXME: This should be merged with run_and_throw_if_fail
- def run_command(self, args, cwd=None, input=None, error_handler=None, return_exit_code=False, return_stderr=True):
+
+ def run_command(self,
+ args,
+ cwd=None,
+ input=None,
+ error_handler=None,
+ return_exit_code=False,
+ return_stderr=True):
if hasattr(input, 'read'): # Check if the input is a file.
stdin = input
string_to_communicate = None
@@ -113,11 +152,19 @@ class Executive(object):
stderr = subprocess.STDOUT
else:
stderr = None
- process = subprocess.Popen(args, stdin=stdin, stdout=subprocess.PIPE, stderr=stderr, cwd=cwd)
+
+ process = subprocess.Popen(args,
+ stdin=stdin,
+ stdout=subprocess.PIPE,
+ stderr=stderr,
+ cwd=cwd)
output = process.communicate(string_to_communicate)[0]
exit_code = process.wait()
if exit_code:
- script_error = ScriptError(script_args=args, exit_code=exit_code, output=output, cwd=cwd)
+ script_error = ScriptError(script_args=args,
+ exit_code=exit_code,
+ output=output,
+ cwd=cwd)
(error_handler or self.default_error_handler)(script_error)
if return_exit_code:
return exit_code
diff --git a/WebKitTools/Scripts/webkitpy/executive.pyc b/WebKitTools/Scripts/webkitpy/executive.pyc
new file mode 100644
index 0000000..190fabb
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/executive.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/modules/commands/upload_unittest.py b/WebKitTools/Scripts/webkitpy/executive_unittest.py
index 4d3f85c..f78e301 100644
--- a/WebKitTools/Scripts/modules/commands/upload_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/executive_unittest.py
@@ -1,4 +1,5 @@
# Copyright (C) 2009 Google Inc. All rights reserved.
+# Copyright (C) 2009 Daniel Bates (dbates@intudata.com). All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -27,16 +28,14 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import unittest
+from webkitpy.executive import Executive, run_command
-from modules.commands.commandtest import CommandsTest
-from modules.commands.upload import *
+class ExecutiveTest(unittest.TestCase):
-class UploadCommandsTest(CommandsTest):
- def test_mark_fixed(self):
- self.assert_execute_outputs(MarkFixed(), [43, "Test comment"])
+ def test_run_command_with_bad_command(self):
+ def run_bad_command():
+ run_command(["foo_bar_command_blah"], error_handler=Executive.ignore_error, return_exit_code=True)
+ self.failUnlessRaises(OSError, run_bad_command)
- def test_obsolete_attachments(self):
- self.assert_execute_outputs(ObsoleteAttachments(), [42])
-
- def test_post_diff(self):
- self.assert_execute_outputs(PostDiff(), [42])
+if __name__ == '__main__':
+ unittest.main()
diff --git a/WebKitTools/Scripts/modules/grammar.py b/WebKitTools/Scripts/webkitpy/grammar.py
index dd2967a..78809e0 100644
--- a/WebKitTools/Scripts/modules/grammar.py
+++ b/WebKitTools/Scripts/webkitpy/grammar.py
@@ -5,7 +5,7 @@
# 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
@@ -15,7 +15,7 @@
# * 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
@@ -30,13 +30,15 @@
import re
+
def plural(noun):
- # This is a dumb plural() implementation which was just enough for our uses.
+ # This is a dumb plural() implementation that is just enough for our uses.
if re.search("h$", noun):
return noun + "es"
else:
return noun + "s"
+
def pluralize(noun, count):
if count != 1:
noun = plural(noun)
diff --git a/WebKitTools/Scripts/webkitpy/grammar.pyc b/WebKitTools/Scripts/webkitpy/grammar.pyc
new file mode 100644
index 0000000..50edeeb
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/grammar.pyc
Binary files differ
diff --git a/JavaScriptCore/profiler/HeavyProfile.cpp b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/__init__.py
index e69de29..e69de29 100644
--- a/JavaScriptCore/profiler/HeavyProfile.cpp
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/__init__.py
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/apache_http_server.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/apache_http_server.py
new file mode 100644
index 0000000..15f2065
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/apache_http_server.py
@@ -0,0 +1,229 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""A class to start/stop the apache http server used by layout tests."""
+
+import logging
+import optparse
+import os
+import re
+import subprocess
+import sys
+
+import http_server_base
+import path_utils
+import platform_utils
+
+
+class LayoutTestApacheHttpd(http_server_base.HttpServerBase):
+
+ def __init__(self, output_dir):
+ """Args:
+ output_dir: the absolute path to the layout test result directory
+ """
+ self._output_dir = output_dir
+ self._httpd_proc = None
+ path_utils.maybe_make_directory(output_dir)
+
+ self.mappings = [{'port': 8000},
+ {'port': 8080},
+ {'port': 8081},
+ {'port': 8443, 'sslcert': True}]
+
+ # The upstream .conf file assumed the existence of /tmp/WebKit for
+ # placing apache files like the lock file there.
+ self._runtime_path = os.path.join("/tmp", "WebKit")
+ path_utils.maybe_make_directory(self._runtime_path)
+
+ # The PID returned when Apache is started goes away (due to dropping
+ # privileges?). The proper controlling PID is written to a file in the
+ # apache runtime directory.
+ self._pid_file = os.path.join(self._runtime_path, 'httpd.pid')
+
+ test_dir = path_utils.path_from_base('third_party', 'WebKit',
+ 'LayoutTests')
+ js_test_resources_dir = self._cygwin_safe_join(test_dir, "fast", "js",
+ "resources")
+ mime_types_path = self._cygwin_safe_join(test_dir, "http", "conf",
+ "mime.types")
+ cert_file = self._cygwin_safe_join(test_dir, "http", "conf",
+ "webkit-httpd.pem")
+ access_log = self._cygwin_safe_join(output_dir, "access_log.txt")
+ error_log = self._cygwin_safe_join(output_dir, "error_log.txt")
+ document_root = self._cygwin_safe_join(test_dir, "http", "tests")
+
+ executable = platform_utils.apache_executable_path()
+ if self._is_cygwin():
+ executable = self._get_cygwin_path(executable)
+
+ cmd = [executable,
+ '-f', self._get_apache_config_file_path(test_dir, output_dir),
+ '-C', "\'DocumentRoot %s\'" % document_root,
+ '-c', "\'Alias /js-test-resources %s\'" % js_test_resources_dir,
+ '-C', "\'Listen %s\'" % "127.0.0.1:8000",
+ '-C', "\'Listen %s\'" % "127.0.0.1:8081",
+ '-c', "\'TypesConfig \"%s\"\'" % mime_types_path,
+ '-c', "\'CustomLog \"%s\" common\'" % access_log,
+ '-c', "\'ErrorLog \"%s\"\'" % error_log,
+ '-C', "\'User \"%s\"\'" % os.environ.get("USERNAME",
+ os.environ.get("USER", ""))]
+
+ if self._is_cygwin():
+ cygbin = path_utils.path_from_base('third_party', 'cygwin', 'bin')
+ # Not entirely sure why, but from cygwin we need to run the
+ # httpd command through bash.
+ self._start_cmd = [
+ os.path.join(cygbin, 'bash.exe'),
+ '-c',
+ 'PATH=%s %s' % (self._get_cygwin_path(cygbin), " ".join(cmd)),
+ ]
+ else:
+ # TODO(ojan): When we get cygwin using Apache 2, use set the
+ # cert file for cygwin as well.
+ cmd.extend(['-c', "\'SSLCertificateFile %s\'" % cert_file])
+ # Join the string here so that Cygwin/Windows and Mac/Linux
+ # can use the same code. Otherwise, we could remove the single
+ # quotes above and keep cmd as a sequence.
+ self._start_cmd = " ".join(cmd)
+
+ def _is_cygwin(self):
+ return sys.platform in ("win32", "cygwin")
+
+ def _cygwin_safe_join(self, *parts):
+ """Returns a platform appropriate path."""
+ path = os.path.join(*parts)
+ if self._is_cygwin():
+ return self._get_cygwin_path(path)
+ return path
+
+ def _get_cygwin_path(self, path):
+ """Convert a Windows path to a cygwin path.
+
+ The cygpath utility insists on converting paths that it thinks are
+ Cygwin root paths to what it thinks the correct roots are. So paths
+ such as "C:\b\slave\webkit-release\build\third_party\cygwin\bin"
+ are converted to plain "/usr/bin". To avoid this, we
+ do the conversion manually.
+
+ The path is expected to be an absolute path, on any drive.
+ """
+ drive_regexp = re.compile(r'([a-z]):[/\\]', re.IGNORECASE)
+
+ def lower_drive(matchobj):
+ return '/cygdrive/%s/' % matchobj.group(1).lower()
+ path = drive_regexp.sub(lower_drive, path)
+ return path.replace('\\', '/')
+
+ def _get_apache_config_file_path(self, test_dir, output_dir):
+ """Returns the path to the apache config file to use.
+ Args:
+ test_dir: absolute path to the LayoutTests directory.
+ output_dir: absolute path to the layout test results directory.
+ """
+ httpd_config = platform_utils.apache_config_file_path()
+ httpd_config_copy = os.path.join(output_dir, "httpd.conf")
+ httpd_conf = open(httpd_config).read()
+ if self._is_cygwin():
+ # This is a gross hack, but it lets us use the upstream .conf file
+ # and our checked in cygwin. This tells the server the root
+ # directory to look in for .so modules. It will use this path
+ # plus the relative paths to the .so files listed in the .conf
+ # file. We have apache/cygwin checked into our tree so
+ # people don't have to install it into their cygwin.
+ cygusr = path_utils.path_from_base('third_party', 'cygwin', 'usr')
+ httpd_conf = httpd_conf.replace('ServerRoot "/usr"',
+ 'ServerRoot "%s"' % self._get_cygwin_path(cygusr))
+
+ # TODO(ojan): Instead of writing an extra file, checkin a conf file
+ # upstream. Or, even better, upstream/delete all our chrome http
+ # tests so we don't need this special-cased DocumentRoot and then
+ # just use the upstream
+ # conf file.
+ chrome_document_root = path_utils.path_from_base('webkit', 'data',
+ 'layout_tests')
+ if self._is_cygwin():
+ chrome_document_root = self._get_cygwin_path(chrome_document_root)
+ httpd_conf = (httpd_conf +
+ self._get_virtual_host_config(chrome_document_root, 8081))
+
+ f = open(httpd_config_copy, 'wb')
+ f.write(httpd_conf)
+ f.close()
+
+ if self._is_cygwin():
+ return self._get_cygwin_path(httpd_config_copy)
+ return httpd_config_copy
+
+ def _get_virtual_host_config(self, document_root, port, ssl=False):
+ """Returns a <VirtualHost> directive block for an httpd.conf file.
+ It will listen to 127.0.0.1 on each of the given port.
+ """
+ return '\n'.join(('<VirtualHost 127.0.0.1:%s>' % port,
+ 'DocumentRoot %s' % document_root,
+ ssl and 'SSLEngine On' or '',
+ '</VirtualHost>', ''))
+
+ def _start_httpd_process(self):
+ """Starts the httpd process and returns whether there were errors."""
+ # Use shell=True because we join the arguments into a string for
+ # the sake of Window/Cygwin and it needs quoting that breaks
+ # shell=False.
+ self._httpd_proc = subprocess.Popen(self._start_cmd,
+ stderr=subprocess.PIPE,
+ shell=True)
+ err = self._httpd_proc.stderr.read()
+ if len(err):
+ logging.debug(err)
+ return False
+ return True
+
+ def start(self):
+ """Starts the apache http server."""
+ # Stop any currently running servers.
+ self.stop()
+
+ logging.debug("Starting apache http server")
+ server_started = self.wait_for_action(self._start_httpd_process)
+ if server_started:
+ logging.debug("Apache started. Testing ports")
+ server_started = self.wait_for_action(
+ self.is_server_running_on_all_ports)
+
+ if server_started:
+ logging.debug("Server successfully started")
+ else:
+ raise Exception('Failed to start http server')
+
+ def stop(self):
+ """Stops the apache http server."""
+ logging.debug("Shutting down any running http servers")
+ httpd_pid = None
+ if os.path.exists(self._pid_file):
+ httpd_pid = int(open(self._pid_file).readline())
+ path_utils.shut_down_http_server(httpd_pid)
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/http_server.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/http_server.py
new file mode 100755
index 0000000..dfcb44f
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/http_server.py
@@ -0,0 +1,279 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""A class to help start/stop the lighttpd server used by layout tests."""
+
+
+import logging
+import optparse
+import os
+import shutil
+import subprocess
+import sys
+import tempfile
+import time
+import urllib
+
+import http_server_base
+import path_utils
+
+class HttpdNotStarted(Exception): pass
+
+def remove_log_files(folder, starts_with):
+ files = os.listdir(folder)
+ for file in files:
+ if file.startswith(starts_with):
+ full_path = os.path.join(folder, file)
+ os.remove(full_path)
+
+
+class Lighttpd(http_server_base.HttpServerBase):
+ # Webkit tests
+ try:
+ _webkit_tests = path_utils.path_from_base('third_party', 'WebKit',
+ 'LayoutTests', 'http',
+ 'tests')
+ _js_test_resource = path_utils.path_from_base('third_party', 'WebKit',
+ 'LayoutTests', 'fast',
+ 'js', 'resources')
+ except path_utils.PathNotFound:
+ _webkit_tests = None
+ _js_test_resource = None
+
+ # Path where we can access all of the tests
+ _all_tests = path_utils.path_from_base('webkit', 'data', 'layout_tests')
+ # Self generated certificate for SSL server (for client cert get
+ # <base-path>\chrome\test\data\ssl\certs\root_ca_cert.crt)
+ _pem_file = path_utils.path_from_base(
+ os.path.dirname(os.path.abspath(__file__)), 'httpd2.pem')
+ # One mapping where we can get to everything
+ VIRTUALCONFIG = [{'port': 8081, 'docroot': _all_tests}]
+
+ if _webkit_tests:
+ VIRTUALCONFIG.extend(
+ # Three mappings (one with SSL enabled) for LayoutTests http tests
+ [{'port': 8000, 'docroot': _webkit_tests},
+ {'port': 8080, 'docroot': _webkit_tests},
+ {'port': 8443, 'docroot': _webkit_tests, 'sslcert': _pem_file}])
+
+ def __init__(self, output_dir, background=False, port=None,
+ root=None, register_cygwin=None, run_background=None):
+ """Args:
+ output_dir: the absolute path to the layout test result directory
+ """
+ self._output_dir = output_dir
+ self._process = None
+ self._port = port
+ self._root = root
+ self._register_cygwin = register_cygwin
+ self._run_background = run_background
+ if self._port:
+ self._port = int(self._port)
+
+ def is_running(self):
+ return self._process != None
+
+ def start(self):
+ if self.is_running():
+ raise 'Lighttpd already running'
+
+ base_conf_file = path_utils.path_from_base('third_party',
+ 'WebKitTools', 'Scripts', 'webkitpy', 'layout_tests',
+ 'layout_package', 'lighttpd.conf')
+ out_conf_file = os.path.join(self._output_dir, 'lighttpd.conf')
+ time_str = time.strftime("%d%b%Y-%H%M%S")
+ access_file_name = "access.log-" + time_str + ".txt"
+ access_log = os.path.join(self._output_dir, access_file_name)
+ log_file_name = "error.log-" + time_str + ".txt"
+ error_log = os.path.join(self._output_dir, log_file_name)
+
+ # Remove old log files. We only need to keep the last ones.
+ remove_log_files(self._output_dir, "access.log-")
+ remove_log_files(self._output_dir, "error.log-")
+
+ # Write out the config
+ f = file(base_conf_file, 'rb')
+ base_conf = f.read()
+ f.close()
+
+ f = file(out_conf_file, 'wb')
+ f.write(base_conf)
+
+ # Write out our cgi handlers. Run perl through env so that it
+ # processes the #! line and runs perl with the proper command
+ # line arguments. Emulate apache's mod_asis with a cat cgi handler.
+ f.write(('cgi.assign = ( ".cgi" => "/usr/bin/env",\n'
+ ' ".pl" => "/usr/bin/env",\n'
+ ' ".asis" => "/bin/cat",\n'
+ ' ".php" => "%s" )\n\n') %
+ path_utils.lighttpd_php_path())
+
+ # Setup log files
+ f.write(('server.errorlog = "%s"\n'
+ 'accesslog.filename = "%s"\n\n') % (error_log, access_log))
+
+ # Setup upload folders. Upload folder is to hold temporary upload files
+ # and also POST data. This is used to support XHR layout tests that
+ # does POST.
+ f.write(('server.upload-dirs = ( "%s" )\n\n') % (self._output_dir))
+
+ # Setup a link to where the js test templates are stored
+ f.write(('alias.url = ( "/js-test-resources" => "%s" )\n\n') %
+ (self._js_test_resource))
+
+ # dump out of virtual host config at the bottom.
+ if self._root:
+ if self._port:
+ # Have both port and root dir.
+ mappings = [{'port': self._port, 'docroot': self._root}]
+ else:
+ # Have only a root dir - set the ports as for LayoutTests.
+ # This is used in ui_tests to run http tests against a browser.
+
+ # default set of ports as for LayoutTests but with a
+ # specified root.
+ mappings = [{'port': 8000, 'docroot': self._root},
+ {'port': 8080, 'docroot': self._root},
+ {'port': 8443, 'docroot': self._root,
+ 'sslcert': Lighttpd._pem_file}]
+ else:
+ mappings = self.VIRTUALCONFIG
+ for mapping in mappings:
+ ssl_setup = ''
+ if 'sslcert' in mapping:
+ ssl_setup = (' ssl.engine = "enable"\n'
+ ' ssl.pemfile = "%s"\n' % mapping['sslcert'])
+
+ f.write(('$SERVER["socket"] == "127.0.0.1:%d" {\n'
+ ' server.document-root = "%s"\n' +
+ ssl_setup +
+ '}\n\n') % (mapping['port'], mapping['docroot']))
+ f.close()
+
+ executable = path_utils.lighttpd_executable_path()
+ module_path = path_utils.lighttpd_module_path()
+ start_cmd = [executable,
+ # Newly written config file
+ '-f', path_utils.path_from_base(self._output_dir,
+ 'lighttpd.conf'),
+ # Where it can find its module dynamic libraries
+ '-m', module_path]
+
+ if not self._run_background:
+ start_cmd.append(# Don't background
+ '-D')
+
+ # Copy liblightcomp.dylib to /tmp/lighttpd/lib to work around the
+ # bug that mod_alias.so loads it from the hard coded path.
+ if sys.platform == 'darwin':
+ tmp_module_path = '/tmp/lighttpd/lib'
+ if not os.path.exists(tmp_module_path):
+ os.makedirs(tmp_module_path)
+ lib_file = 'liblightcomp.dylib'
+ shutil.copyfile(os.path.join(module_path, lib_file),
+ os.path.join(tmp_module_path, lib_file))
+
+ # Put the cygwin directory first in the path to find cygwin1.dll
+ env = os.environ
+ if sys.platform in ('cygwin', 'win32'):
+ env['PATH'] = '%s;%s' % (
+ path_utils.path_from_base('third_party', 'cygwin', 'bin'),
+ env['PATH'])
+
+ if sys.platform == 'win32' and self._register_cygwin:
+ setup_mount = path_utils.path_from_base('third_party', 'cygwin',
+ 'setup_mount.bat')
+ subprocess.Popen(setup_mount).wait()
+
+ logging.debug('Starting http server')
+ self._process = subprocess.Popen(start_cmd, env=env)
+
+ # Wait for server to start.
+ self.mappings = mappings
+ server_started = self.wait_for_action(
+ self.is_server_running_on_all_ports)
+
+ # Our process terminated already
+ if not server_started or self._process.returncode != None:
+ raise google.httpd_utils.HttpdNotStarted('Failed to start httpd.')
+
+ logging.debug("Server successfully started")
+
+ # TODO(deanm): Find a nicer way to shutdown cleanly. Our log files are
+ # probably not being flushed, etc... why doesn't our python have os.kill ?
+
+ def stop(self, force=False):
+ if not force and not self.is_running():
+ return
+
+ httpd_pid = None
+ if self._process:
+ httpd_pid = self._process.pid
+ path_utils.shut_down_http_server(httpd_pid)
+
+ if self._process:
+ self._process.wait()
+ self._process = None
+
+if '__main__' == __name__:
+ # Provide some command line params for starting/stopping the http server
+ # manually. Also used in ui_tests to run http layout tests in a browser.
+ option_parser = optparse.OptionParser()
+ option_parser.add_option('-k', '--server',
+ help='Server action (start|stop)')
+ option_parser.add_option('-p', '--port',
+ help='Port to listen on (overrides layout test ports)')
+ option_parser.add_option('-r', '--root',
+ help='Absolute path to DocumentRoot (overrides layout test roots)')
+ option_parser.add_option('--register_cygwin', action="store_true",
+ dest="register_cygwin", help='Register Cygwin paths (on Win try bots)')
+ option_parser.add_option('--run_background', action="store_true",
+ dest="run_background",
+ help='Run on background (for running as UI test)')
+ options, args = option_parser.parse_args()
+
+ if not options.server:
+ print ('Usage: %s --server {start|stop} [--root=root_dir]'
+ ' [--port=port_number]' % sys.argv[0])
+ else:
+ if (options.root is None) and (options.port is not None):
+ # specifying root but not port means we want httpd on default
+ # set of ports that LayoutTest use, but pointing to a different
+ # source of tests. Specifying port but no root does not seem
+ # meaningful.
+ raise 'Specifying port requires also a root.'
+ httpd = Lighttpd(tempfile.gettempdir(),
+ port=options.port,
+ root=options.root,
+ register_cygwin=options.register_cygwin,
+ run_background=options.run_background)
+ if 'start' == options.server:
+ httpd.start()
+ else:
+ httpd.stop(force=True)
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/http_server_base.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/http_server_base.py
new file mode 100644
index 0000000..2720486
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/http_server_base.py
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""Base class with common routines between the Apache and Lighttpd servers."""
+
+import logging
+import time
+import urllib
+
+
+class HttpServerBase(object):
+
+ def wait_for_action(self, action):
+ """Repeat the action for 20 seconds or until it succeeds. Returns
+ whether it succeeded."""
+ start_time = time.time()
+ while time.time() - start_time < 20:
+ if action():
+ return True
+ time.sleep(1)
+
+ return False
+
+ def is_server_running_on_all_ports(self):
+ """Returns whether the server is running on all the desired ports."""
+ for mapping in self.mappings:
+ if 'sslcert' in mapping:
+ http_suffix = 's'
+ else:
+ http_suffix = ''
+
+ url = 'http%s://127.0.0.1:%d/' % (http_suffix, mapping['port'])
+
+ try:
+ response = urllib.urlopen(url)
+ logging.debug("Server running at %s" % url)
+ except IOError:
+ logging.debug("Server NOT running at %s" % url)
+ return False
+
+ return True
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/httpd2.pem b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/httpd2.pem
new file mode 100644
index 0000000..6349b78
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/httpd2.pem
@@ -0,0 +1,41 @@
+-----BEGIN CERTIFICATE-----
+MIIEZDCCAkygAwIBAgIBATANBgkqhkiG9w0BAQUFADBgMRAwDgYDVQQDEwdUZXN0
+IENBMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN
+TW91bnRhaW4gVmlldzESMBAGA1UEChMJQ2VydCBUZXN0MB4XDTA4MDcyODIyMzIy
+OFoXDTEzMDcyNzIyMzIyOFowSjELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlm
+b3JuaWExEjAQBgNVBAoTCUNlcnQgVGVzdDESMBAGA1UEAxMJMTI3LjAuMC4xMIGf
+MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDQj2tPWPUgbuI4H3/3dnttqVbndwU3
+3BdRCd67DFM44GRrsjDSH4bY/EbFyX9D52d/iy6ZaAmDePcCz5k/fgP3DMujykYG
+qgNiV2ywxTlMj7NlN2C7SRt68fQMZr5iI7rypdxuaZt9lSMD3ENBffYtuLTyZd9a
+3JPJe1TaIab5GwIDAQABo4HCMIG/MAkGA1UdEwQCMAAwHQYDVR0OBBYEFCYLBv5K
+x5sLNVlpLh5FwTwhdDl7MIGSBgNVHSMEgYowgYeAFF3Of5nj1BlBMU/Gz7El9Vqv
+45cxoWSkYjBgMRAwDgYDVQQDEwdUZXN0IENBMQswCQYDVQQGEwJVUzETMBEGA1UE
+CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzESMBAGA1UEChMJ
+Q2VydCBUZXN0ggkA1FGT1D/e2U4wDQYJKoZIhvcNAQEFBQADggIBAEtkVmLObUgk
+b2cIA2S+QDtifq1UgVfBbytvR2lFmnADOR55mo0gHQG3HHqq4g034LmoVXDHhUk8
+Gb6aFiv4QubmVhLXcUelTRXwiNvGzkW7pC6Jrq105hdPjzXMKTcmiLaopm5Fqfc7
+hj5Cn1Sjspc8pdeQjrbeMdvca7KlFrGP8YkwCU2xOOX9PiN9G0966BWfjnr/fZZp
++OQVuUFHdiAZwthEMuDpAAXHqYXIsermgdOpgJaA53cf8NqBV2QGhtFgtsJCRoiu
+7DKqhyRWBGyz19VIH2b7y+6qvQVxuHk19kKRM0nftw/yNcJnm7gtttespMUPsOMa
+a2SD1G0hm0TND6vxaBhgR3cVqpl/qIpAdFi00Tm7hTyYE7I43zPW03t+/DpCt3Um
+EMRZsQ90co5q+bcx/vQ7YAtwUh30uMb0wpibeyCwDp8cqNmSiRkEuc/FjTYes5t8
+5gR//WX1l0+qjrjusO9NmoLnq2Yk6UcioX+z+q6Z/dudGfqhLfeWD2Q0LWYA242C
+d7km5Y3KAt1PJdVsof/aiVhVdddY/OIEKTRQhWEdDbosy2eh16BCKXT2FFvhNDg1
+AYFvn6I8nj9IldMJiIc3DdhacEAEzRMeRgPdzAa1griKUGknxsyTyRii8ru0WS6w
+DCNrlDOVXdzYGEZooBI76BDVY0W0akjV
+-----END CERTIFICATE-----
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDQj2tPWPUgbuI4H3/3dnttqVbndwU33BdRCd67DFM44GRrsjDS
+H4bY/EbFyX9D52d/iy6ZaAmDePcCz5k/fgP3DMujykYGqgNiV2ywxTlMj7NlN2C7
+SRt68fQMZr5iI7rypdxuaZt9lSMD3ENBffYtuLTyZd9a3JPJe1TaIab5GwIDAQAB
+AoGANHXu8z2YIzlhE+bwhGm8MGBpKL3qhRuKjeriqMA36tWezOw8lY4ymEAU+Ulv
+BsCdaxqydQoTYou57m4TyUHEcxq9pq3H0zB0qL709DdHi/t4zbV9XIoAzC5v0/hG
+9+Ca29TwC02FCw+qLkNrtwCpwOcQmc+bPxqvFu1iMiahURECQQD2I/Hi2413CMZz
+TBjl8fMiVO9GhA2J0sc8Qi+YcgJakaLD9xcbaiLkTzPZDlA389C1b6Ia+poAr4YA
+Ve0FFbxpAkEA2OobayyHE/QtPEqoy6NLR57jirmVBNmSWWd4lAyL5UIHIYVttJZg
+8CLvbzaU/iDGwR+wKsM664rKPHEmtlyo4wJBAMeSqYO5ZOCJGu9NWjrHjM3fdAsG
+8zs2zhiLya+fcU0iHIksBW5TBmt71Jw/wMc9R5J1K0kYvFml98653O5si1ECQBCk
+RV4/mE1rmlzZzYFyEcB47DQkcM5ictvxGEsje0gnfKyRtAz6zI0f4QbDRUMJ+LWw
+XK+rMsYHa+SfOb0b9skCQQCLdeonsIpFDv/Uv+flHISy0WA+AFkLXrRkBKh6G/OD
+dMHaNevkJgUnpceVEnkrdenp5CcEoFTI17pd+nBgDm/B
+-----END RSA PRIVATE KEY-----
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py
new file mode 100644
index 0000000..b7b26e9
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py
@@ -0,0 +1,184 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import logging
+import os
+
+from layout_package import json_results_generator
+from layout_package import path_utils
+from layout_package import test_expectations
+from layout_package import test_failures
+
+
+class JSONLayoutResultsGenerator(json_results_generator.JSONResultsGenerator):
+ """A JSON results generator for layout tests."""
+
+ LAYOUT_TESTS_PATH = "LayoutTests"
+
+ # Additional JSON fields.
+ WONTFIX = "wontfixCounts"
+ DEFERRED = "deferredCounts"
+
+ def __init__(self, builder_name, build_name, build_number,
+ results_file_base_path, builder_base_url,
+ test_timings, expectations, result_summary, all_tests):
+ """Modifies the results.json file. Grabs it off the archive directory
+ if it is not found locally.
+
+ Args:
+ result_summary: ResultsSummary object storing the summary of the test
+ results.
+ (see the comment of JSONResultsGenerator.__init__ for other Args)
+ """
+
+ self._builder_name = builder_name
+ self._build_name = build_name
+ self._build_number = build_number
+ self._builder_base_url = builder_base_url
+ self._results_file_path = os.path.join(results_file_base_path,
+ self.RESULTS_FILENAME)
+ self._expectations = expectations
+
+ # We don't use self._skipped_tests and self._passed_tests as we
+ # override _InsertFailureSummaries.
+
+ # We want relative paths to LayoutTest root for JSON output.
+ path_to_name = self._get_path_relative_to_layout_test_root
+ self._result_summary = result_summary
+ self._failures = dict(
+ (path_to_name(test), test_failures.determine_result_type(failures))
+ for (test, failures) in result_summary.failures.iteritems())
+ self._all_tests = [path_to_name(test) for test in all_tests]
+ self._test_timings = dict(
+ (path_to_name(test_tuple.filename), test_tuple.test_run_time)
+ for test_tuple in test_timings)
+
+ self._generate_json_output()
+
+ def _get_path_relative_to_layout_test_root(self, test):
+ """Returns the path of the test relative to the layout test root.
+ For example, for:
+ src/third_party/WebKit/LayoutTests/fast/forms/foo.html
+ We would return
+ fast/forms/foo.html
+ """
+ index = test.find(self.LAYOUT_TESTS_PATH)
+ if index is not -1:
+ index += len(self.LAYOUT_TESTS_PATH)
+
+ if index is -1:
+ # Already a relative path.
+ relativePath = test
+ else:
+ relativePath = test[index + 1:]
+
+ # Make sure all paths are unix-style.
+ return relativePath.replace('\\', '/')
+
+ # override
+ def _convert_json_to_current_version(self, results_json):
+ archive_version = None
+ if self.VERSION_KEY in results_json:
+ archive_version = results_json[self.VERSION_KEY]
+
+ super(JSONLayoutResultsGenerator,
+ self)._convert_json_to_current_version(results_json)
+
+ # version 2->3
+ if archive_version == 2:
+ for results_for_builder in results_json.itervalues():
+ try:
+ test_results = results_for_builder[self.TESTS]
+ except:
+ continue
+
+ for test in test_results:
+ # Make sure all paths are relative
+ test_path = self._get_path_relative_to_layout_test_root(test)
+ if test_path != test:
+ test_results[test_path] = test_results[test]
+ del test_results[test]
+
+ # override
+ def _insert_failure_summaries(self, results_for_builder):
+ summary = self._result_summary
+
+ self._insert_item_into_raw_list(results_for_builder,
+ len((set(summary.failures.keys()) |
+ summary.tests_by_expectation[test_expectations.SKIP]) &
+ summary.tests_by_timeline[test_expectations.NOW]),
+ self.FIXABLE_COUNT)
+ self._insert_item_into_raw_list(results_for_builder,
+ self._get_failure_summary_entry(test_expectations.NOW),
+ self.FIXABLE)
+ self._insert_item_into_raw_list(results_for_builder,
+ len(self._expectations.get_tests_with_timeline(
+ test_expectations.NOW)), self.ALL_FIXABLE_COUNT)
+ self._insert_item_into_raw_list(results_for_builder,
+ self._get_failure_summary_entry(test_expectations.DEFER),
+ self.DEFERRED)
+ self._insert_item_into_raw_list(results_for_builder,
+ self._get_failure_summary_entry(test_expectations.WONTFIX),
+ self.WONTFIX)
+
+ # override
+ def _normalize_results_json(self, test, test_name, tests):
+ super(JSONLayoutResultsGenerator, self)._normalize_results_json(
+ test, test_name, tests)
+
+ # Remove tests that don't exist anymore.
+ full_path = os.path.join(path_utils.layout_tests_dir(), test_name)
+ full_path = os.path.normpath(full_path)
+ if not os.path.exists(full_path):
+ del tests[test_name]
+
+ def _get_failure_summary_entry(self, timeline):
+ """Creates a summary object to insert into the JSON.
+
+ Args:
+ summary ResultSummary object with test results
+ timeline current test_expectations timeline to build entry for
+ (e.g., test_expectations.NOW, etc.)
+ """
+ entry = {}
+ summary = self._result_summary
+ timeline_tests = summary.tests_by_timeline[timeline]
+ entry[self.SKIP_RESULT] = len(
+ summary.tests_by_expectation[test_expectations.SKIP] &
+ timeline_tests)
+ entry[self.PASS_RESULT] = len(
+ summary.tests_by_expectation[test_expectations.PASS] &
+ timeline_tests)
+ for failure_type in summary.tests_by_expectation.keys():
+ if failure_type not in self.FAILURE_TO_CHAR:
+ continue
+ count = len(summary.tests_by_expectation[failure_type] &
+ timeline_tests)
+ entry[self.FAILURE_TO_CHAR[failure_type]] = count
+ return entry
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py
new file mode 100644
index 0000000..596e1e4
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py
@@ -0,0 +1,418 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import logging
+import os
+import subprocess
+import sys
+import time
+import urllib2
+import xml.dom.minidom
+
+from layout_package import path_utils
+from layout_package import test_expectations
+
+sys.path.append(path_utils.path_from_base('third_party', 'WebKit',
+ 'WebKitTools'))
+import simplejson
+
+
+class JSONResultsGenerator(object):
+
+ MAX_NUMBER_OF_BUILD_RESULTS_TO_LOG = 750
+ # Min time (seconds) that will be added to the JSON.
+ MIN_TIME = 1
+ JSON_PREFIX = "ADD_RESULTS("
+ JSON_SUFFIX = ");"
+ PASS_RESULT = "P"
+ SKIP_RESULT = "X"
+ NO_DATA_RESULT = "N"
+ VERSION = 3
+ VERSION_KEY = "version"
+ RESULTS = "results"
+ TIMES = "times"
+ BUILD_NUMBERS = "buildNumbers"
+ WEBKIT_SVN = "webkitRevision"
+ CHROME_SVN = "chromeRevision"
+ TIME = "secondsSinceEpoch"
+ TESTS = "tests"
+
+ FIXABLE_COUNT = "fixableCount"
+ FIXABLE = "fixableCounts"
+ ALL_FIXABLE_COUNT = "allFixableCount"
+
+ # Note that we omit test_expectations.FAIL from this list because
+ # it should never show up (it's a legacy input expectation, never
+ # an output expectation).
+ FAILURE_TO_CHAR = {test_expectations.CRASH: "C",
+ test_expectations.TIMEOUT: "T",
+ test_expectations.IMAGE: "I",
+ test_expectations.TEXT: "F",
+ test_expectations.MISSING: "O",
+ test_expectations.IMAGE_PLUS_TEXT: "Z"}
+ FAILURE_CHARS = FAILURE_TO_CHAR.values()
+
+ RESULTS_FILENAME = "results.json"
+
+ def __init__(self, builder_name, build_name, build_number,
+ results_file_base_path, builder_base_url,
+ test_timings, failures, passed_tests, skipped_tests, all_tests):
+ """Modifies the results.json file. Grabs it off the archive directory
+ if it is not found locally.
+
+ Args
+ builder_name: the builder name (e.g. Webkit).
+ build_name: the build name (e.g. webkit-rel).
+ build_number: the build number.
+ results_file_base_path: Absolute path to the directory containing the
+ results json file.
+ builder_base_url: the URL where we have the archived test results.
+ test_timings: Map of test name to a test_run-time.
+ failures: Map of test name to a failure type (of test_expectations).
+ passed_tests: A set containing all the passed tests.
+ skipped_tests: A set containing all the skipped tests.
+ all_tests: List of all the tests that were run. This should not
+ include skipped tests.
+ """
+ self._builder_name = builder_name
+ self._build_name = build_name
+ self._build_number = build_number
+ self._builder_base_url = builder_base_url
+ self._results_file_path = os.path.join(results_file_base_path,
+ self.RESULTS_FILENAME)
+ self._test_timings = test_timings
+ self._failures = failures
+ self._passed_tests = passed_tests
+ self._skipped_tests = skipped_tests
+ self._all_tests = all_tests
+
+ self._generate_json_output()
+
+ def _generate_json_output(self):
+ """Generates the JSON output file."""
+ json = self._get_json()
+ if json:
+ results_file = open(self._results_file_path, "w")
+ results_file.write(json)
+ results_file.close()
+
+ def _get_svn_revision(self, in_directory=None):
+ """Returns the svn revision for the given directory.
+
+ Args:
+ in_directory: The directory where svn is to be run.
+ """
+ output = subprocess.Popen(["svn", "info", "--xml"],
+ cwd=in_directory,
+ shell=(sys.platform == 'win32'),
+ stdout=subprocess.PIPE).communicate()[0]
+ try:
+ dom = xml.dom.minidom.parseString(output)
+ return dom.getElementsByTagName('entry')[0].getAttribute(
+ 'revision')
+ except xml.parsers.expat.ExpatError:
+ return ""
+
+ def _get_archived_json_results(self):
+ """Reads old results JSON file if it exists.
+ Returns (archived_results, error) tuple where error is None if results
+ were successfully read.
+ """
+ results_json = {}
+ old_results = None
+ error = None
+
+ if os.path.exists(self._results_file_path):
+ old_results_file = open(self._results_file_path, "r")
+ old_results = old_results_file.read()
+ elif self._builder_base_url:
+ # Check if we have the archived JSON file on the buildbot server.
+ results_file_url = (self._builder_base_url +
+ self._build_name + "/" + self.RESULTS_FILENAME)
+ logging.error("Local results.json file does not exist. Grabbing "
+ "it off the archive at " + results_file_url)
+
+ try:
+ results_file = urllib2.urlopen(results_file_url)
+ info = results_file.info()
+ old_results = results_file.read()
+ except urllib2.HTTPError, http_error:
+ # A non-4xx status code means the bot is hosed for some reason
+ # and we can't grab the results.json file off of it.
+ if (http_error.code < 400 and http_error.code >= 500):
+ error = http_error
+ except urllib2.URLError, url_error:
+ error = url_error
+
+ if old_results:
+ # Strip the prefix and suffix so we can get the actual JSON object.
+ old_results = old_results[len(self.JSON_PREFIX):
+ len(old_results) - len(self.JSON_SUFFIX)]
+
+ try:
+ results_json = simplejson.loads(old_results)
+ except:
+ logging.debug("results.json was not valid JSON. Clobbering.")
+ # The JSON file is not valid JSON. Just clobber the results.
+ results_json = {}
+ else:
+ logging.debug('Old JSON results do not exist. Starting fresh.')
+ results_json = {}
+
+ return results_json, error
+
+ def _get_json(self):
+ """Gets the results for the results.json file."""
+ results_json, error = self._get_archived_json_results()
+ if error:
+ # If there was an error don't write a results.json
+ # file at all as it would lose all the information on the bot.
+ logging.error("Archive directory is inaccessible. Not modifying "
+ "or clobbering the results.json file: " + str(error))
+ return None
+
+ builder_name = self._builder_name
+ if results_json and builder_name not in results_json:
+ logging.debug("Builder name (%s) is not in the results.json file."
+ % builder_name)
+
+ self._convert_json_to_current_version(results_json)
+
+ if builder_name not in results_json:
+ results_json[builder_name] = (
+ self._create_results_for_builder_json())
+
+ results_for_builder = results_json[builder_name]
+
+ self._insert_generic_metadata(results_for_builder)
+
+ self._insert_failure_summaries(results_for_builder)
+
+ # Update the all failing tests with result type and time.
+ tests = results_for_builder[self.TESTS]
+ all_failing_tests = set(self._failures.iterkeys())
+ all_failing_tests.update(tests.iterkeys())
+ for test in all_failing_tests:
+ self._insert_test_time_and_result(test, tests)
+
+ # Specify separators in order to get compact encoding.
+ results_str = simplejson.dumps(results_json, separators=(',', ':'))
+ return self.JSON_PREFIX + results_str + self.JSON_SUFFIX
+
+ def _insert_failure_summaries(self, results_for_builder):
+ """Inserts aggregate pass/failure statistics into the JSON.
+ This method reads self._skipped_tests, self._passed_tests and
+ self._failures and inserts FIXABLE, FIXABLE_COUNT and ALL_FIXABLE_COUNT
+ entries.
+
+ Args:
+ results_for_builder: Dictionary containing the test results for a
+ single builder.
+ """
+ # Insert the number of tests that failed.
+ self._insert_item_into_raw_list(results_for_builder,
+ len(set(self._failures.keys()) | self._skipped_tests),
+ self.FIXABLE_COUNT)
+
+ # Create a pass/skip/failure summary dictionary.
+ entry = {}
+ entry[self.SKIP_RESULT] = len(self._skipped_tests)
+ entry[self.PASS_RESULT] = len(self._passed_tests)
+ get = entry.get
+ for failure_type in self._failures.values():
+ failure_char = self.FAILURE_TO_CHAR[failure_type]
+ entry[failure_char] = get(failure_char, 0) + 1
+
+ # Insert the pass/skip/failure summary dictionary.
+ self._insert_item_into_raw_list(results_for_builder, entry,
+ self.FIXABLE)
+
+ # Insert the number of all the tests that are supposed to pass.
+ self._insert_item_into_raw_list(results_for_builder,
+ len(self._skipped_tests | self._all_tests),
+ self.ALL_FIXABLE_COUNT)
+
+ def _insert_item_into_raw_list(self, results_for_builder, item, key):
+ """Inserts the item into the list with the given key in the results for
+ this builder. Creates the list if no such list exists.
+
+ Args:
+ results_for_builder: Dictionary containing the test results for a
+ single builder.
+ item: Number or string to insert into the list.
+ key: Key in results_for_builder for the list to insert into.
+ """
+ if key in results_for_builder:
+ raw_list = results_for_builder[key]
+ else:
+ raw_list = []
+
+ raw_list.insert(0, item)
+ raw_list = raw_list[:self.MAX_NUMBER_OF_BUILD_RESULTS_TO_LOG]
+ results_for_builder[key] = raw_list
+
+ def _insert_item_run_length_encoded(self, item, encoded_results):
+ """Inserts the item into the run-length encoded results.
+
+ Args:
+ item: String or number to insert.
+ encoded_results: run-length encoded results. An array of arrays, e.g.
+ [[3,'A'],[1,'Q']] encodes AAAQ.
+ """
+ if len(encoded_results) and item == encoded_results[0][1]:
+ num_results = encoded_results[0][0]
+ if num_results <= self.MAX_NUMBER_OF_BUILD_RESULTS_TO_LOG:
+ encoded_results[0][0] = num_results + 1
+ else:
+ # Use a list instead of a class for the run-length encoding since
+ # we want the serialized form to be concise.
+ encoded_results.insert(0, [1, item])
+
+ def _insert_generic_metadata(self, results_for_builder):
+ """ Inserts generic metadata (such as version number, current time etc)
+ into the JSON.
+
+ Args:
+ results_for_builder: Dictionary containing the test results for
+ a single builder.
+ """
+ self._insert_item_into_raw_list(results_for_builder,
+ self._build_number, self.BUILD_NUMBERS)
+
+ path_to_webkit = path_utils.path_from_base('third_party', 'WebKit',
+ 'WebCore')
+ self._insert_item_into_raw_list(results_for_builder,
+ self._get_svn_revision(path_to_webkit),
+ self.WEBKIT_SVN)
+
+ path_to_chrome_base = path_utils.path_from_base()
+ self._insert_item_into_raw_list(results_for_builder,
+ self._get_svn_revision(path_to_chrome_base),
+ self.CHROME_SVN)
+
+ self._insert_item_into_raw_list(results_for_builder,
+ int(time.time()),
+ self.TIME)
+
+ def _insert_test_time_and_result(self, test_name, tests):
+ """ Insert a test item with its results to the given tests dictionary.
+
+ Args:
+ tests: Dictionary containing test result entries.
+ """
+
+ result = JSONResultsGenerator.PASS_RESULT
+ time = 0
+
+ if test_name not in self._all_tests:
+ result = JSONResultsGenerator.NO_DATA_RESULT
+
+ if test_name in self._failures:
+ result = self.FAILURE_TO_CHAR[self._failures[test_name]]
+
+ if test_name in self._test_timings:
+ # Floor for now to get time in seconds.
+ time = int(self._test_timings[test_name])
+
+ if test_name not in tests:
+ tests[test_name] = self._create_results_and_times_json()
+
+ thisTest = tests[test_name]
+ self._insert_item_run_length_encoded(result, thisTest[self.RESULTS])
+ self._insert_item_run_length_encoded(time, thisTest[self.TIMES])
+ self._normalize_results_json(thisTest, test_name, tests)
+
+ def _convert_json_to_current_version(self, results_json):
+ """If the JSON does not match the current version, converts it to the
+ current version and adds in the new version number.
+ """
+ if (self.VERSION_KEY in results_json and
+ results_json[self.VERSION_KEY] == self.VERSION):
+ return
+
+ results_json[self.VERSION_KEY] = self.VERSION
+
+ def _create_results_and_times_json(self):
+ results_and_times = {}
+ results_and_times[self.RESULTS] = []
+ results_and_times[self.TIMES] = []
+ return results_and_times
+
+ def _create_results_for_builder_json(self):
+ results_for_builder = {}
+ results_for_builder[self.TESTS] = {}
+ return results_for_builder
+
+ def _remove_items_over_max_number_of_builds(self, encoded_list):
+ """Removes items from the run-length encoded list after the final
+ item that exceeds the max number of builds to track.
+
+ Args:
+ encoded_results: run-length encoded results. An array of arrays, e.g.
+ [[3,'A'],[1,'Q']] encodes AAAQ.
+ """
+ num_builds = 0
+ index = 0
+ for result in encoded_list:
+ num_builds = num_builds + result[0]
+ index = index + 1
+ if num_builds > self.MAX_NUMBER_OF_BUILD_RESULTS_TO_LOG:
+ return encoded_list[:index]
+ return encoded_list
+
+ def _normalize_results_json(self, test, test_name, tests):
+ """ Prune tests where all runs pass or tests that no longer exist and
+ truncate all results to maxNumberOfBuilds.
+
+ Args:
+ test: ResultsAndTimes object for this test.
+ test_name: Name of the test.
+ tests: The JSON object with all the test results for this builder.
+ """
+ test[self.RESULTS] = self._remove_items_over_max_number_of_builds(
+ test[self.RESULTS])
+ test[self.TIMES] = self._remove_items_over_max_number_of_builds(
+ test[self.TIMES])
+
+ is_all_pass = self._is_results_all_of_type(test[self.RESULTS],
+ self.PASS_RESULT)
+ is_all_no_data = self._is_results_all_of_type(test[self.RESULTS],
+ self.NO_DATA_RESULT)
+ max_time = max([time[1] for time in test[self.TIMES]])
+
+ # Remove all passes/no-data from the results to reduce noise and
+ # filesize. If a test passes every run, but takes > MIN_TIME to run,
+ # don't throw away the data.
+ if is_all_no_data or (is_all_pass and max_time <= self.MIN_TIME):
+ del tests[test_name]
+
+ def _is_results_all_of_type(self, results, type):
+ """Returns whether all the results are of the given type
+ (e.g. all passes)."""
+ return len(results) == 1 and results[0][1] == type
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/lighttpd.conf b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/lighttpd.conf
new file mode 100644
index 0000000..d3150dd
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/lighttpd.conf
@@ -0,0 +1,89 @@
+server.tag = "LightTPD/1.4.19 (Win32)"
+server.modules = ( "mod_accesslog",
+ "mod_alias",
+ "mod_cgi",
+ "mod_rewrite" )
+
+# default document root required
+server.document-root = "."
+
+# files to check for if .../ is requested
+index-file.names = ( "index.php", "index.pl", "index.cgi",
+ "index.html", "index.htm", "default.htm" )
+# mimetype mapping
+mimetype.assign = (
+ ".gif" => "image/gif",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".png" => "image/png",
+ ".svg" => "image/svg+xml",
+ ".css" => "text/css",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".xhtml" => "application/xhtml+xml",
+ ".js" => "text/javascript",
+ ".log" => "text/plain",
+ ".conf" => "text/plain",
+ ".text" => "text/plain",
+ ".txt" => "text/plain",
+ ".dtd" => "text/xml",
+ ".xml" => "text/xml",
+ ".manifest" => "text/cache-manifest",
+ )
+
+# Use the "Content-Type" extended attribute to obtain mime type if possible
+mimetype.use-xattr = "enable"
+
+##
+# which extensions should not be handle via static-file transfer
+#
+# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
+static-file.exclude-extensions = ( ".php", ".pl", ".cgi" )
+
+server.bind = "localhost"
+server.port = 8001
+
+## virtual directory listings
+dir-listing.activate = "enable"
+#dir-listing.encoding = "iso-8859-2"
+#dir-listing.external-css = "style/oldstyle.css"
+
+## enable debugging
+#debug.log-request-header = "enable"
+#debug.log-response-header = "enable"
+#debug.log-request-handling = "enable"
+#debug.log-file-not-found = "enable"
+
+#### SSL engine
+#ssl.engine = "enable"
+#ssl.pemfile = "server.pem"
+
+# Rewrite rule for utf-8 path test (LayoutTests/http/tests/uri/utf8-path.html)
+# See the apache rewrite rule at LayoutTests/http/tests/uri/intercept/.htaccess
+# Rewrite rule for LayoutTests/http/tests/appcache/cyrillic-uri.html.
+# See the apache rewrite rule at
+# LayoutTests/http/tests/appcache/resources/intercept/.htaccess
+url.rewrite-once = (
+ "^/uri/intercept/(.*)" => "/uri/resources/print-uri.php",
+ "^/appcache/resources/intercept/(.*)" => "/appcache/resources/print-uri.php"
+)
+
+# LayoutTests/http/tests/xmlhttprequest/response-encoding.html uses an htaccess
+# to override charset for reply2.txt, reply2.xml, and reply4.txt.
+$HTTP["url"] =~ "^/xmlhttprequest/resources/reply2.(txt|xml)" {
+ mimetype.assign = (
+ ".txt" => "text/plain; charset=windows-1251",
+ ".xml" => "text/xml; charset=windows-1251"
+ )
+}
+$HTTP["url"] =~ "^/xmlhttprequest/resources/reply4.txt" {
+ mimetype.assign = ( ".txt" => "text/plain; charset=koi8-r" )
+}
+
+# LayoutTests/http/tests/appcache/wrong-content-type.html uses an htaccess
+# to override mime type for wrong-content-type.manifest.
+$HTTP["url"] =~ "^/appcache/resources/wrong-content-type.manifest" {
+ mimetype.assign = ( ".manifest" => "text/plain" )
+}
+
+# Autogenerated test-specific config follows.
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/metered_stream.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/metered_stream.py
new file mode 100644
index 0000000..6c094e3
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/metered_stream.py
@@ -0,0 +1,96 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""
+Package that implements a stream wrapper that has 'meters' as well as
+regular output. A 'meter' is a single line of text that can be erased
+and rewritten repeatedly, without producing multiple lines of output. It
+can be used to produce effects like progress bars.
+"""
+
+
+class MeteredStream:
+ """This class is a wrapper around a stream that allows you to implement
+ meters.
+
+ It can be used like a stream, but calling update() will print
+ the string followed by only a carriage return (instead of a carriage
+ return and a line feed). This can be used to implement progress bars and
+ other sorts of meters. Note that anything written by update() will be
+ erased by a subsequent update(), write(), or flush()."""
+
+ def __init__(self, verbose, stream):
+ """
+ Args:
+ verbose: whether update is a no-op
+ stream: output stream to write to
+ """
+ self._dirty = False
+ self._verbose = verbose
+ self._stream = stream
+ self._last_update = ""
+
+ def write(self, txt):
+ """Write text directly to the stream, overwriting and resetting the
+ meter."""
+ if self._dirty:
+ self.update("")
+ self._dirty = False
+ self._stream.write(txt)
+
+ def flush(self):
+ """Flush any buffered output."""
+ self._stream.flush()
+
+ def update(self, str):
+ """Write an update to the stream that will get overwritten by the next
+ update() or by a write().
+
+ This is used for progress updates that don't need to be preserved in
+ the log. Note that verbose disables this routine; we have this in
+ case we are logging lots of output and the update()s will get lost
+ or won't work properly (typically because verbose streams are
+ redirected to files.
+
+ TODO(dpranke): figure out if there is a way to detect if we're writing
+ to a stream that handles CRs correctly (e.g., terminals). That might
+ be a cleaner way of handling this.
+ """
+ if self._verbose:
+ return
+
+ # Print the necessary number of backspaces to erase the previous
+ # message.
+ self._stream.write("\b" * len(self._last_update))
+ self._stream.write(str)
+ num_remaining = len(self._last_update) - len(str)
+ if num_remaining > 0:
+ self._stream.write(" " * num_remaining + "\b" * num_remaining)
+ self._last_update = str
+ self._dirty = True
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/path_utils.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/path_utils.py
new file mode 100644
index 0000000..26d062b
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/path_utils.py
@@ -0,0 +1,395 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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 package contains utility methods for manipulating paths and
+filenames for test results and baselines. It also contains wrappers
+of a few routines in platform_utils.py so that platform_utils.py can
+be considered a 'protected' package - i.e., this file should be
+the only file that ever includes platform_utils. This leads to
+us including a few things that don't really have anything to do
+ with paths, unfortunately."""
+
+import errno
+import os
+import stat
+import sys
+
+import platform_utils
+import platform_utils_win
+import platform_utils_mac
+import platform_utils_linux
+
+# Cache some values so we don't have to recalculate them. _basedir is
+# used by PathFromBase() and caches the full (native) path to the top
+# of the source tree (/src). _baseline_search_path is used by
+# ExpectedBaselines() and caches the list of native paths to search
+# for baseline results.
+_basedir = None
+_baseline_search_path = None
+
+
+class PathNotFound(Exception):
+ pass
+
+
+def layout_tests_dir():
+ """Returns the fully-qualified path to the directory containing the input
+ data for the specified layout test."""
+ return path_from_base('third_party', 'WebKit', 'LayoutTests')
+
+
+def chromium_baseline_path(platform=None):
+ """Returns the full path to the directory containing expected
+ baseline results from chromium ports. If |platform| is None, the
+ currently executing platform is used.
+
+ Note: although directly referencing individual platform_utils_* files is
+ usually discouraged, we allow it here so that the rebaselining tool can
+ pull baselines for platforms other than the host platform."""
+
+ # Normalize the platform string.
+ platform = platform_name(platform)
+ if platform.startswith('chromium-mac'):
+ return platform_utils_mac.baseline_path(platform)
+ elif platform.startswith('chromium-win'):
+ return platform_utils_win.baseline_path(platform)
+ elif platform.startswith('chromium-linux'):
+ return platform_utils_linux.baseline_path(platform)
+
+ return platform_utils.baseline_path()
+
+
+def webkit_baseline_path(platform):
+ """Returns the full path to the directory containing expected
+ baseline results from WebKit ports."""
+ return path_from_base('third_party', 'WebKit', 'LayoutTests',
+ 'platform', platform)
+
+
+def baseline_search_path(platform=None):
+ """Returns the list of directories to search for baselines/results for a
+ given platform, in order of preference. Paths are relative to the top of
+ the source tree. If parameter platform is None, returns the list for the
+ current platform that the script is running on.
+
+ Note: although directly referencing individual platform_utils_* files is
+ usually discouraged, we allow it here so that the rebaselining tool can
+ pull baselines for platforms other than the host platform."""
+
+ # Normalize the platform name.
+ platform = platform_name(platform)
+ if platform.startswith('chromium-mac'):
+ return platform_utils_mac.baseline_search_path(platform)
+ elif platform.startswith('chromium-win'):
+ return platform_utils_win.baseline_search_path(platform)
+ elif platform.startswith('chromium-linux'):
+ return platform_utils_linux.baseline_search_path(platform)
+ return platform_utils.baseline_search_path()
+
+
+def expected_baselines(filename, suffix, platform=None, all_baselines=False):
+ """Given a test name, finds where the baseline results are located.
+
+ Args:
+ filename: absolute filename to test file
+ suffix: file suffix of the expected results, including dot; e.g. '.txt'
+ or '.png'. This should not be None, but may be an empty string.
+ platform: layout test platform: 'win', 'linux' or 'mac'. Defaults to
+ the current platform.
+ all_baselines: If True, return an ordered list of all baseline paths
+ for the given platform. If False, return only the first
+ one.
+ Returns
+ a list of ( platform_dir, results_filename ), where
+ platform_dir - abs path to the top of the results tree (or test tree)
+ results_filename - relative path from top of tree to the results file
+ (os.path.join of the two gives you the full path to the file,
+ unless None was returned.)
+ Return values will be in the format appropriate for the current platform
+ (e.g., "\\" for path separators on Windows). If the results file is not
+ found, then None will be returned for the directory, but the expected
+ relative pathname will still be returned.
+ """
+ global _baseline_search_path
+ global _search_path_platform
+ testname = os.path.splitext(relative_test_filename(filename))[0]
+
+ baseline_filename = testname + '-expected' + suffix
+
+ if (_baseline_search_path is None) or (_search_path_platform != platform):
+ _baseline_search_path = baseline_search_path(platform)
+ _search_path_platform = platform
+
+ baselines = []
+ for platform_dir in _baseline_search_path:
+ if os.path.exists(os.path.join(platform_dir, baseline_filename)):
+ baselines.append((platform_dir, baseline_filename))
+
+ if not all_baselines and baselines:
+ return baselines
+
+ # If it wasn't found in a platform directory, return the expected result
+ # in the test directory, even if no such file actually exists.
+ platform_dir = layout_tests_dir()
+ if os.path.exists(os.path.join(platform_dir, baseline_filename)):
+ baselines.append((platform_dir, baseline_filename))
+
+ if baselines:
+ return baselines
+
+ return [(None, baseline_filename)]
+
+
+def expected_filename(filename, suffix):
+ """Given a test name, returns an absolute path to its expected results.
+
+ If no expected results are found in any of the searched directories, the
+ directory in which the test itself is located will be returned. The return
+ value is in the format appropriate for the platform (e.g., "\\" for
+ path separators on windows).
+
+ Args:
+ filename: absolute filename to test file
+ suffix: file suffix of the expected results, including dot; e.g. '.txt'
+ or '.png'. This should not be None, but may be an empty string.
+ platform: the most-specific directory name to use to build the
+ search list of directories, e.g., 'chromium-win', or
+ 'chromium-mac-leopard' (we follow the WebKit format)
+ """
+ platform_dir, baseline_filename = expected_baselines(filename, suffix)[0]
+ if platform_dir:
+ return os.path.join(platform_dir, baseline_filename)
+ return os.path.join(layout_tests_dir(), baseline_filename)
+
+
+def relative_test_filename(filename):
+ """Provide the filename of the test relative to the layout tests
+ directory as a unix style path (a/b/c)."""
+ return _win_path_to_unix(filename[len(layout_tests_dir()) + 1:])
+
+
+def _win_path_to_unix(path):
+ """Convert a windows path to use unix-style path separators (a/b/c)."""
+ return path.replace('\\', '/')
+
+#
+# Routines that are arguably platform-specific but have been made
+# generic for now (they used to be in platform_utils_*)
+#
+
+
+def filename_to_uri(full_path):
+ """Convert a test file to a URI."""
+ LAYOUTTEST_HTTP_DIR = "http/tests/"
+ LAYOUTTEST_WEBSOCKET_DIR = "websocket/tests/"
+
+ relative_path = _win_path_to_unix(relative_test_filename(full_path))
+ port = None
+ use_ssl = False
+
+ if relative_path.startswith(LAYOUTTEST_HTTP_DIR):
+ # http/tests/ run off port 8000 and ssl/ off 8443
+ relative_path = relative_path[len(LAYOUTTEST_HTTP_DIR):]
+ port = 8000
+ elif relative_path.startswith(LAYOUTTEST_WEBSOCKET_DIR):
+ # websocket/tests/ run off port 8880 and 9323
+ # Note: the root is /, not websocket/tests/
+ port = 8880
+
+ # Make http/tests/local run as local files. This is to mimic the
+ # logic in run-webkit-tests.
+ # TODO(jianli): Consider extending this to "media/".
+ if port and not relative_path.startswith("local/"):
+ if relative_path.startswith("ssl/"):
+ port += 443
+ protocol = "https"
+ else:
+ protocol = "http"
+ return "%s://127.0.0.1:%u/%s" % (protocol, port, relative_path)
+
+ if sys.platform in ('cygwin', 'win32'):
+ return "file:///" + get_absolute_path(full_path)
+ return "file://" + get_absolute_path(full_path)
+
+
+def get_absolute_path(path):
+ """Returns an absolute UNIX path."""
+ return _win_path_to_unix(os.path.abspath(path))
+
+
+def maybe_make_directory(*path):
+ """Creates the specified directory if it doesn't already exist."""
+ try:
+ os.makedirs(os.path.join(*path))
+ except OSError, e:
+ if e.errno != errno.EEXIST:
+ raise
+
+
+def path_from_base(*comps):
+ """Returns an absolute filename from a set of components specified
+ relative to the top of the source tree. If the path does not exist,
+ the exception PathNotFound is raised."""
+ global _basedir
+ if _basedir == None:
+ # We compute the top of the source tree by finding the absolute
+ # path of this source file, and then climbing up three directories
+ # as given in subpath. If we move this file, subpath needs to be
+ # updated.
+ path = os.path.abspath(__file__)
+ subpath = os.path.join('third_party', 'WebKit')
+ _basedir = path[:path.index(subpath)]
+ path = os.path.join(_basedir, *comps)
+ if not os.path.exists(path):
+ raise PathNotFound('could not find %s' % (path))
+ return path
+
+
+def remove_directory(*path):
+ """Recursively removes a directory, even if it's marked read-only.
+
+ Remove the directory located at *path, if it exists.
+
+ shutil.rmtree() doesn't work on Windows if any of the files or directories
+ are read-only, which svn repositories and some .svn files are. We need to
+ be able to force the files to be writable (i.e., deletable) as we traverse
+ the tree.
+
+ Even with all this, Windows still sometimes fails to delete a file, citing
+ a permission error (maybe something to do with antivirus scans or disk
+ indexing). The best suggestion any of the user forums had was to wait a
+ bit and try again, so we do that too. It's hand-waving, but sometimes it
+ works. :/
+ """
+ file_path = os.path.join(*path)
+ if not os.path.exists(file_path):
+ return
+
+ win32 = False
+ if sys.platform == 'win32':
+ win32 = True
+ # Some people don't have the APIs installed. In that case we'll do
+ # without.
+ try:
+ win32api = __import__('win32api')
+ win32con = __import__('win32con')
+ except ImportError:
+ win32 = False
+
+ def remove_with_retry(rmfunc, path):
+ os.chmod(path, stat.S_IWRITE)
+ if win32:
+ win32api.SetFileAttributes(path,
+ win32con.FILE_ATTRIBUTE_NORMAL)
+ try:
+ return rmfunc(path)
+ except EnvironmentError, e:
+ if e.errno != errno.EACCES:
+ raise
+ print 'Failed to delete %s: trying again' % repr(path)
+ time.sleep(0.1)
+ return rmfunc(path)
+ else:
+
+ def remove_with_retry(rmfunc, path):
+ if os.path.islink(path):
+ return os.remove(path)
+ else:
+ return rmfunc(path)
+
+ for root, dirs, files in os.walk(file_path, topdown=False):
+ # For POSIX: making the directory writable guarantees removability.
+ # Windows will ignore the non-read-only bits in the chmod value.
+ os.chmod(root, 0770)
+ for name in files:
+ remove_with_retry(os.remove, os.path.join(root, name))
+ for name in dirs:
+ remove_with_retry(os.rmdir, os.path.join(root, name))
+
+ remove_with_retry(os.rmdir, file_path)
+
+#
+# Wrappers around platform_utils
+#
+
+
+def platform_name(platform=None):
+ """Returns the appropriate chromium platform name for |platform|. If
+ |platform| is None, returns the name of the chromium platform on the
+ currently running system. If |platform| is of the form 'chromium-*',
+ it is returned unchanged, otherwise 'chromium-' is prepended."""
+ if platform == None:
+ return platform_utils.platform_name()
+ if not platform.startswith('chromium-'):
+ platform = "chromium-" + platform
+ return platform
+
+
+def platform_version():
+ return platform_utils.platform_version()
+
+
+def lighttpd_executable_path():
+ return platform_utils.lighttpd_executable_path()
+
+
+def lighttpd_module_path():
+ return platform_utils.lighttpd_module_path()
+
+
+def lighttpd_php_path():
+ return platform_utils.lighttpd_php_path()
+
+
+def wdiff_path():
+ return platform_utils.wdiff_path()
+
+
+def test_shell_path(target):
+ return platform_utils.test_shell_path(target)
+
+
+def image_diff_path(target):
+ return platform_utils.image_diff_path(target)
+
+
+def layout_test_helper_path(target):
+ return platform_utils.layout_test_helper_path(target)
+
+
+def fuzzy_match_path():
+ return platform_utils.fuzzy_match_path()
+
+
+def shut_down_http_server(server_pid):
+ return platform_utils.shut_down_http_server(server_pid)
+
+
+def kill_all_test_shells():
+ platform_utils.kill_all_test_shells()
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/platform_utils.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/platform_utils.py
new file mode 100644
index 0000000..09e7b4b
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/platform_utils.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""Platform-specific utilities and pseudo-constants
+
+Any functions whose implementations or values differ from one platform to
+another should be defined in their respective platform_utils_<platform>.py
+modules. The appropriate one of those will be imported into this module to
+provide callers with a common, platform-independent interface.
+
+This file should only ever be imported by layout_package.path_utils.
+"""
+
+import sys
+
+# We may not support the version of Python that a user has installed (Cygwin
+# especially has had problems), but we'll allow the platform utils to be
+# included in any case so we don't get an import error.
+if sys.platform in ('cygwin', 'win32'):
+ from platform_utils_win import *
+elif sys.platform == 'darwin':
+ from platform_utils_mac import *
+elif sys.platform in ('linux', 'linux2', 'freebsd7', 'openbsd4'):
+ from platform_utils_linux import *
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/platform_utils_linux.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/platform_utils_linux.py
new file mode 100644
index 0000000..87b27c7
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/platform_utils_linux.py
@@ -0,0 +1,248 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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 the Linux implementation of the layout_package.platform_utils
+ package. This file should only be imported by that package."""
+
+import os
+import signal
+import subprocess
+import sys
+import logging
+
+import path_utils
+import platform_utils_win
+
+
+def platform_name():
+ """Returns the name of the platform we're currently running on."""
+ return 'chromium-linux' + platform_version()
+
+
+def platform_version():
+ """Returns the version string for the platform, e.g. '-vista' or
+ '-snowleopard'. If the platform does not distinguish between
+ minor versions, it returns ''."""
+ return ''
+
+
+def get_num_cores():
+ """Returns the number of cores on the machine. For hyperthreaded machines,
+ this will be double the number of actual processors."""
+ num_cores = os.sysconf("SC_NPROCESSORS_ONLN")
+ if isinstance(num_cores, int) and num_cores > 0:
+ return num_cores
+ return 1
+
+
+def baseline_path(platform=None):
+ """Returns the path relative to the top of the source tree for the
+ baselines for the specified platform version. If |platform| is None,
+ then the version currently in use is used."""
+ if platform is None:
+ platform = platform_name()
+ return path_utils.path_from_base('webkit', 'data', 'layout_tests',
+ 'platform', platform, 'LayoutTests')
+
+
+def baseline_search_path(platform=None):
+ """Returns the list of directories to search for baselines/results, in
+ order of preference. Paths are relative to the top of the source tree."""
+ return [baseline_path(platform),
+ platform_utils_win.baseline_path('chromium-win'),
+ path_utils.webkit_baseline_path('win'),
+ path_utils.webkit_baseline_path('mac')]
+
+
+def apache_executable_path():
+ """Returns the executable path to start Apache"""
+ path = os.path.join("/usr", "sbin", "apache2")
+ if os.path.exists(path):
+ return path
+ print "Unable to fine Apache executable %s" % path
+ _missing_apache()
+
+
+def apache_config_file_path():
+ """Returns the path to Apache config file"""
+ return path_utils.path_from_base("third_party", "WebKit", "LayoutTests",
+ "http", "conf", "apache2-debian-httpd.conf")
+
+
+def lighttpd_executable_path():
+ """Returns the executable path to start LigHTTPd"""
+ binpath = "/usr/sbin/lighttpd"
+ if os.path.exists(binpath):
+ return binpath
+ print "Unable to find LigHTTPd executable %s" % binpath
+ _missing_lighttpd()
+
+
+def lighttpd_module_path():
+ """Returns the library module path for LigHTTPd"""
+ modpath = "/usr/lib/lighttpd"
+ if os.path.exists(modpath):
+ return modpath
+ print "Unable to find LigHTTPd modules %s" % modpath
+ _missing_lighttpd()
+
+
+def lighttpd_php_path():
+ """Returns the PHP executable path for LigHTTPd"""
+ binpath = "/usr/bin/php-cgi"
+ if os.path.exists(binpath):
+ return binpath
+ print "Unable to find PHP CGI executable %s" % binpath
+ _missing_lighttpd()
+
+
+def wdiff_path():
+ """Path to the WDiff executable, which we assume is already installed and
+ in the user's $PATH."""
+ return 'wdiff'
+
+
+def image_diff_path(target):
+ """Path to the image_diff binary.
+
+ Args:
+ target: Build target mode (debug or release)"""
+ return _path_from_build_results(target, 'image_diff')
+
+
+def layout_test_helper_path(target):
+ """Path to the layout_test helper binary, if needed, empty otherwise"""
+ return ''
+
+
+def test_shell_path(target):
+ """Return the platform-specific binary path for our TestShell.
+
+ Args:
+ target: Build target mode (debug or release) """
+ if target in ('Debug', 'Release'):
+ try:
+ debug_path = _path_from_build_results('Debug', 'test_shell')
+ release_path = _path_from_build_results('Release', 'test_shell')
+
+ debug_mtime = os.stat(debug_path).st_mtime
+ release_mtime = os.stat(release_path).st_mtime
+
+ if debug_mtime > release_mtime and target == 'Release' or \
+ release_mtime > debug_mtime and target == 'Debug':
+ logging.info('\x1b[31mWarning: you are not running the most '
+ 'recent test_shell binary. You need to pass '
+ '--debug or not to select between Debug and '
+ 'Release.\x1b[0m')
+ # This will fail if we don't have both a debug and release binary.
+ # That's fine because, in this case, we must already be running the
+ # most up-to-date one.
+ except path_utils.PathNotFound:
+ pass
+
+ return _path_from_build_results(target, 'test_shell')
+
+
+def fuzzy_match_path():
+ """Return the path to the fuzzy matcher binary."""
+ return path_utils.path_from_base('third_party', 'fuzzymatch', 'fuzzymatch')
+
+
+def shut_down_http_server(server_pid):
+ """Shut down the lighttpd web server. Blocks until it's fully shut down.
+
+ Args:
+ server_pid: The process ID of the running server.
+ """
+ # server_pid is not set when "http_server.py stop" is run manually.
+ if server_pid is None:
+ # This isn't ideal, since it could conflict with web server processes
+ # not started by http_server.py, but good enough for now.
+ kill_all_process('lighttpd')
+ kill_all_process('apache2')
+ else:
+ try:
+ os.kill(server_pid, signal.SIGTERM)
+ #TODO(mmoss) Maybe throw in a SIGKILL just to be sure?
+ except OSError:
+ # Sometimes we get a bad PID (e.g. from a stale httpd.pid file),
+ # so if kill fails on the given PID, just try to 'killall' web
+ # servers.
+ shut_down_http_server(None)
+
+
+def kill_process(pid):
+ """Forcefully kill the process.
+
+ Args:
+ pid: The id of the process to be killed.
+ """
+ os.kill(pid, signal.SIGKILL)
+
+
+def kill_all_process(process_name):
+ null = open(os.devnull)
+ subprocess.call(['killall', '-TERM', '-u', os.getenv('USER'),
+ process_name], stderr=null)
+ null.close()
+
+
+def kill_all_test_shells():
+ """Kills all instances of the test_shell binary currently running."""
+ kill_all_process('test_shell')
+
+#
+# Private helper functions
+#
+
+
+def _missing_lighttpd():
+ print 'Please install using: "sudo apt-get install lighttpd php5-cgi"'
+ print 'For complete Linux build requirements, please see:'
+ print 'http://code.google.com/p/chromium/wiki/LinuxBuildInstructions'
+ sys.exit(1)
+
+
+def _missing_apache():
+ print ('Please install using: "sudo apt-get install apache2 '
+ 'libapache2-mod-php5"')
+ print 'For complete Linux build requirements, please see:'
+ print 'http://code.google.com/p/chromium/wiki/LinuxBuildInstructions'
+ sys.exit(1)
+
+
+def _path_from_build_results(*pathies):
+ # FIXME(dkegel): use latest or warn if more than one found?
+ for dir in ["sconsbuild", "out", "xcodebuild"]:
+ try:
+ return path_utils.path_from_base(dir, *pathies)
+ except:
+ pass
+ raise path_utils.PathNotFound("Unable to find %s in build tree" %
+ (os.path.join(*pathies)))
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/platform_utils_mac.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/platform_utils_mac.py
new file mode 100644
index 0000000..1eaa10c
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/platform_utils_mac.py
@@ -0,0 +1,201 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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 the Mac implementation of the layout_package.platform_utils
+ package. This file should only be imported by that package."""
+
+import os
+import platform
+import signal
+import subprocess
+
+import path_utils
+
+
+def platform_name():
+ """Returns the name of the platform we're currently running on."""
+ # At the moment all chromium mac results are version-independent. At some
+ # point we may need to return 'chromium-mac' + PlatformVersion()
+ return 'chromium-mac'
+
+
+def platform_version():
+ """Returns the version string for the platform, e.g. '-vista' or
+ '-snowleopard'. If the platform does not distinguish between
+ minor versions, it returns ''."""
+ os_version_string = platform.mac_ver()[0] # e.g. "10.5.6"
+ if not os_version_string:
+ return '-leopard'
+
+ release_version = int(os_version_string.split('.')[1])
+
+ # we don't support 'tiger' or earlier releases
+ if release_version == 5:
+ return '-leopard'
+ elif release_version == 6:
+ return '-snowleopard'
+
+ return ''
+
+
+def get_num_cores():
+ """Returns the number of cores on the machine. For hyperthreaded machines,
+ this will be double the number of actual processors."""
+ return int(os.popen2("sysctl -n hw.ncpu")[1].read())
+
+
+def baseline_path(platform=None):
+ """Returns the path relative to the top of the source tree for the
+ baselines for the specified platform version. If |platform| is None,
+ then the version currently in use is used."""
+ if platform is None:
+ platform = platform_name()
+ return path_utils.path_from_base('webkit', 'data', 'layout_tests',
+ 'platform', platform, 'LayoutTests')
+
+# TODO: We should add leopard and snowleopard to the list of paths to check
+# once we start running the tests from snowleopard.
+
+
+def baseline_search_path(platform=None):
+ """Returns the list of directories to search for baselines/results, in
+ order of preference. Paths are relative to the top of the source tree."""
+ return [baseline_path(platform),
+ path_utils.webkit_baseline_path('mac' + platform_version()),
+ path_utils.webkit_baseline_path('mac')]
+
+
+def wdiff_path():
+ """Path to the WDiff executable, which we assume is already installed and
+ in the user's $PATH."""
+ return 'wdiff'
+
+
+def image_diff_path(target):
+ """Path to the image_diff executable
+
+ Args:
+ target: build type - 'Debug','Release',etc."""
+ return path_utils.path_from_base('xcodebuild', target, 'image_diff')
+
+
+def layout_test_helper_path(target):
+ """Path to the layout_test_helper executable, if needed, empty otherwise
+
+ Args:
+ target: build type - 'Debug','Release',etc."""
+ return path_utils.path_from_base('xcodebuild', target,
+ 'layout_test_helper')
+
+
+def test_shell_path(target):
+ """Path to the test_shell executable.
+
+ Args:
+ target: build type - 'Debug','Release',etc."""
+ # TODO(pinkerton): make |target| happy with case-sensitive file systems.
+ return path_utils.path_from_base('xcodebuild', target, 'TestShell.app',
+ 'Contents', 'MacOS', 'TestShell')
+
+
+def apache_executable_path():
+ """Returns the executable path to start Apache"""
+ return os.path.join("/usr", "sbin", "httpd")
+
+
+def apache_config_file_path():
+ """Returns the path to Apache config file"""
+ return path_utils.path_from_base("third_party", "WebKit", "LayoutTests",
+ "http", "conf", "apache2-httpd.conf")
+
+
+def lighttpd_executable_path():
+ """Returns the executable path to start LigHTTPd"""
+ return path_utils.path_from_base('third_party', 'lighttpd', 'mac',
+ 'bin', 'lighttpd')
+
+
+def lighttpd_module_path():
+ """Returns the library module path for LigHTTPd"""
+ return path_utils.path_from_base('third_party', 'lighttpd', 'mac', 'lib')
+
+
+def lighttpd_php_path():
+ """Returns the PHP executable path for LigHTTPd"""
+ return path_utils.path_from_base('third_party', 'lighttpd', 'mac', 'bin',
+ 'php-cgi')
+
+
+def shut_down_http_server(server_pid):
+ """Shut down the lighttpd web server. Blocks until it's fully shut down.
+
+ Args:
+ server_pid: The process ID of the running server.
+ """
+ # server_pid is not set when "http_server.py stop" is run manually.
+ if server_pid is None:
+ # TODO(mmoss) This isn't ideal, since it could conflict with lighttpd
+ # processes not started by http_server.py, but good enough for now.
+ kill_all_process('lighttpd')
+ kill_all_process('httpd')
+ else:
+ try:
+ os.kill(server_pid, signal.SIGTERM)
+ # TODO(mmoss) Maybe throw in a SIGKILL just to be sure?
+ except OSError:
+ # Sometimes we get a bad PID (e.g. from a stale httpd.pid file),
+ # so if kill fails on the given PID, just try to 'killall' web
+ # servers.
+ shut_down_http_server(None)
+
+
+def kill_process(pid):
+ """Forcefully kill the process.
+
+ Args:
+ pid: The id of the process to be killed.
+ """
+ os.kill(pid, signal.SIGKILL)
+
+
+def kill_all_process(process_name):
+ # On Mac OS X 10.6, killall has a new constraint: -SIGNALNAME or
+ # -SIGNALNUMBER must come first. Example problem:
+ # $ killall -u $USER -TERM lighttpd
+ # killall: illegal option -- T
+ # Use of the earlier -TERM placement is just fine on 10.5.
+ null = open(os.devnull)
+ subprocess.call(['killall', '-TERM', '-u', os.getenv('USER'),
+ process_name], stderr=null)
+ null.close()
+
+
+def kill_all_test_shells():
+ """Kills all instances of the test_shell binary currently running."""
+ kill_all_process('TestShell')
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/platform_utils_win.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/platform_utils_win.py
new file mode 100644
index 0000000..3cbbec3
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/platform_utils_win.py
@@ -0,0 +1,210 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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 the Linux implementation of the layout_package.platform_utils
+ package. This file should only be imported by that package."""
+
+import os
+import path_utils
+import subprocess
+import sys
+
+
+def platform_name():
+ """Returns the name of the platform we're currently running on."""
+ # We're not ready for version-specific results yet. When we uncomment
+ # this, we also need to add it to the BaselineSearchPath()
+ return 'chromium-win' + platform_version()
+
+
+def platform_version():
+ """Returns the version string for the platform, e.g. '-vista' or
+ '-snowleopard'. If the platform does not distinguish between
+ minor versions, it returns ''."""
+ winver = sys.getwindowsversion()
+ if winver[0] == 6 and (winver[1] == 1):
+ return '-7'
+ if winver[0] == 6 and (winver[1] == 0):
+ return '-vista'
+ if winver[0] == 5 and (winver[1] == 1 or winver[1] == 2):
+ return '-xp'
+ return ''
+
+
+def get_num_cores():
+ """Returns the number of cores on the machine. For hyperthreaded machines,
+ this will be double the number of actual processors."""
+ return int(os.environ.get('NUMBER_OF_PROCESSORS', 1))
+
+
+def baseline_path(platform=None):
+ """Returns the path relative to the top of the source tree for the
+ baselines for the specified platform version. If |platform| is None,
+ then the version currently in use is used."""
+ if platform is None:
+ platform = platform_name()
+ return path_utils.path_from_base('webkit', 'data', 'layout_tests',
+ 'platform', platform, 'LayoutTests')
+
+
+def baseline_search_path(platform=None):
+ """Returns the list of directories to search for baselines/results, in
+ order of preference. Paths are relative to the top of the source tree."""
+ dirs = []
+ if platform is None:
+ platform = platform_name()
+
+ if platform == 'chromium-win-xp':
+ dirs.append(baseline_path(platform))
+ if platform in ('chromium-win-xp', 'chromium-win-vista'):
+ dirs.append(baseline_path('chromium-win-vista'))
+ dirs.append(baseline_path('chromium-win'))
+ dirs.append(path_utils.webkit_baseline_path('win'))
+ dirs.append(path_utils.webkit_baseline_path('mac'))
+ return dirs
+
+
+def wdiff_path():
+ """Path to the WDiff executable, whose binary is checked in on Win"""
+ return path_utils.path_from_base('third_party', 'cygwin', 'bin',
+ 'wdiff.exe')
+
+
+def image_diff_path(target):
+ """Return the platform-specific binary path for the image compare util.
+ We use this if we can't find the binary in the default location
+ in path_utils.
+
+ Args:
+ target: Build target mode (debug or release)
+ """
+ return _find_binary(target, 'image_diff.exe')
+
+
+def layout_test_helper_path(target):
+ """Return the platform-specific binary path for the layout test helper.
+ We use this if we can't find the binary in the default location
+ in path_utils.
+
+ Args:
+ target: Build target mode (debug or release)
+ """
+ return _find_binary(target, 'layout_test_helper.exe')
+
+
+def test_shell_path(target):
+ """Return the platform-specific binary path for our TestShell.
+ We use this if we can't find the binary in the default location
+ in path_utils.
+
+ Args:
+ target: Build target mode (debug or release)
+ """
+ return _find_binary(target, 'test_shell.exe')
+
+
+def apache_executable_path():
+ """Returns the executable path to start Apache"""
+ path = path_utils.path_from_base('third_party', 'cygwin', "usr", "sbin")
+ # Don't return httpd.exe since we want to use this from cygwin.
+ return os.path.join(path, "httpd")
+
+
+def apache_config_file_path():
+ """Returns the path to Apache config file"""
+ return path_utils.path_from_base("third_party", "WebKit", "LayoutTests",
+ "http", "conf", "cygwin-httpd.conf")
+
+
+def lighttpd_executable_path():
+ """Returns the executable path to start LigHTTPd"""
+ return path_utils.path_from_base('third_party', 'lighttpd', 'win',
+ 'LightTPD.exe')
+
+
+def lighttpd_module_path():
+ """Returns the library module path for LigHTTPd"""
+ return path_utils.path_from_base('third_party', 'lighttpd', 'win', 'lib')
+
+
+def lighttpd_php_path():
+ """Returns the PHP executable path for LigHTTPd"""
+ return path_utils.path_from_base('third_party', 'lighttpd', 'win', 'php5',
+ 'php-cgi.exe')
+
+
+def shut_down_http_server(server_pid):
+ """Shut down the lighttpd web server. Blocks until it's fully shut down.
+
+ Args:
+ server_pid: The process ID of the running server.
+ Unused in this implementation of the method.
+ """
+ subprocess.Popen(('taskkill.exe', '/f', '/im', 'LightTPD.exe'),
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE).wait()
+ subprocess.Popen(('taskkill.exe', '/f', '/im', 'httpd.exe'),
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE).wait()
+
+
+def kill_process(pid):
+ """Forcefully kill the process.
+
+ Args:
+ pid: The id of the process to be killed.
+ """
+ subprocess.call(('taskkill.exe', '/f', '/pid', str(pid)),
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+
+
+def kill_all_test_shells(self):
+ """Kills all instances of the test_shell binary currently running."""
+ subprocess.Popen(('taskkill.exe', '/f', '/im', 'test_shell.exe'),
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE).wait()
+
+#
+# Private helper functions.
+#
+
+
+def _find_binary(target, binary):
+ """On Windows, we look for binaries that we compile in potentially
+ two places: src/webkit/$target (preferably, which we get if we
+ built using webkit_glue.gyp), or src/chrome/$target (if compiled some
+ other way)."""
+ try:
+ return path_utils.path_from_base('webkit', target, binary)
+ except path_utils.PathNotFound:
+ try:
+ return path_utils.path_from_base('chrome', target, binary)
+ except path_utils.PathNotFound:
+ return path_utils.path_from_base('build', target, binary)
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py
new file mode 100644
index 0000000..f1647f7
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py
@@ -0,0 +1,818 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""A helper class for reading in and dealing with tests expectations
+for layout tests.
+"""
+
+import logging
+import os
+import re
+import sys
+import time
+import path_utils
+
+sys.path.append(path_utils.path_from_base('third_party', 'WebKit',
+ 'WebKitTools'))
+import simplejson
+
+# Test expectation and modifier constants.
+(PASS, FAIL, TEXT, IMAGE, IMAGE_PLUS_TEXT, TIMEOUT, CRASH, SKIP, WONTFIX,
+ DEFER, SLOW, REBASELINE, MISSING, FLAKY, NOW, NONE) = range(16)
+
+# Test expectation file update action constants
+(NO_CHANGE, REMOVE_TEST, REMOVE_PLATFORM, ADD_PLATFORMS_EXCEPT_THIS) = range(4)
+
+
+class TestExpectations:
+ TEST_LIST = "test_expectations.txt"
+
+ def __init__(self, tests, directory, platform, is_debug_mode, is_lint_mode,
+ tests_are_present=True):
+ """Reads the test expectations files from the given directory."""
+ path = os.path.join(directory, self.TEST_LIST)
+ self._expected_failures = TestExpectationsFile(path, tests, platform,
+ is_debug_mode, is_lint_mode, tests_are_present=tests_are_present)
+
+ # TODO(ojan): Allow for removing skipped tests when getting the list of
+ # tests to run, but not when getting metrics.
+ # TODO(ojan): Replace the Get* calls here with the more sane API exposed
+ # by TestExpectationsFile below. Maybe merge the two classes entirely?
+
+ def get_expectations_json_for_all_platforms(self):
+ return (
+ self._expected_failures.get_expectations_json_for_all_platforms())
+
+ def get_rebaselining_failures(self):
+ return (self._expected_failures.get_test_set(REBASELINE, FAIL) |
+ self._expected_failures.get_test_set(REBASELINE, IMAGE) |
+ self._expected_failures.get_test_set(REBASELINE, TEXT) |
+ self._expected_failures.get_test_set(REBASELINE,
+ IMAGE_PLUS_TEXT))
+
+ def get_options(self, test):
+ return self._expected_failures.get_options(test)
+
+ def get_expectations(self, test):
+ return self._expected_failures.get_expectations(test)
+
+ def get_expectations_string(self, test):
+ """Returns the expectatons for the given test as an uppercase string.
+ If there are no expectations for the test, then "PASS" is returned."""
+ expectations = self.get_expectations(test)
+ retval = []
+
+ for expectation in expectations:
+ for item in TestExpectationsFile.EXPECTATIONS.items():
+ if item[1] == expectation:
+ retval.append(item[0])
+ break
+
+ return " ".join(retval).upper()
+
+ def get_timeline_for_test(self, test):
+ return self._expected_failures.get_timeline_for_test(test)
+
+ def get_tests_with_result_type(self, result_type):
+ return self._expected_failures.get_tests_with_result_type(result_type)
+
+ def get_tests_with_timeline(self, timeline):
+ return self._expected_failures.get_tests_with_timeline(timeline)
+
+ def matches_an_expected_result(self, test, result):
+ """Returns whether we got one of the expected results for this test."""
+ return (result in self._expected_failures.get_expectations(test) or
+ (result in (IMAGE, TEXT, IMAGE_PLUS_TEXT) and
+ FAIL in self._expected_failures.get_expectations(test)) or
+ result == MISSING and self.is_rebaselining(test) or
+ result == SKIP and self._expected_failures.has_modifier(test,
+ SKIP))
+
+ def is_rebaselining(self, test):
+ return self._expected_failures.has_modifier(test, REBASELINE)
+
+ def has_modifier(self, test, modifier):
+ return self._expected_failures.has_modifier(test, modifier)
+
+ def remove_platform_from_file(self, tests, platform, backup=False):
+ return self._expected_failures.remove_platform_from_file(tests,
+ platform,
+ backup)
+
+
+def strip_comments(line):
+ """Strips comments from a line and return None if the line is empty
+ or else the contents of line with leading and trailing spaces removed
+ and all other whitespace collapsed"""
+
+ commentIndex = line.find('//')
+ if commentIndex is -1:
+ commentIndex = len(line)
+
+ line = re.sub(r'\s+', ' ', line[:commentIndex].strip())
+ if line == '':
+ return None
+ else:
+ return line
+
+
+class ModifiersAndExpectations:
+ """A holder for modifiers and expectations on a test that serializes to
+ JSON."""
+
+ def __init__(self, modifiers, expectations):
+ self.modifiers = modifiers
+ self.expectations = expectations
+
+
+class ExpectationsJsonEncoder(simplejson.JSONEncoder):
+ """JSON encoder that can handle ModifiersAndExpectations objects.
+ """
+
+ def default(self, obj):
+ if isinstance(obj, ModifiersAndExpectations):
+ return {"modifiers": obj.modifiers,
+ "expectations": obj.expectations}
+ else:
+ return JSONEncoder.default(self, obj)
+
+
+class TestExpectationsFile:
+ """Test expectation files consist of lines with specifications of what
+ to expect from layout test cases. The test cases can be directories
+ in which case the expectations apply to all test cases in that
+ directory and any subdirectory. The format of the file is along the
+ lines of:
+
+ LayoutTests/fast/js/fixme.js = FAIL
+ LayoutTests/fast/js/flaky.js = FAIL PASS
+ LayoutTests/fast/js/crash.js = CRASH TIMEOUT FAIL PASS
+ ...
+
+ To add other options:
+ SKIP : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
+ DEBUG : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
+ DEBUG SKIP : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
+ LINUX DEBUG SKIP : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
+ DEFER LINUX WIN : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
+
+ SKIP: Doesn't run the test.
+ SLOW: The test takes a long time to run, but does not timeout indefinitely.
+ WONTFIX: For tests that we never intend to pass on a given platform.
+ DEFER: Test does not count in our statistics for the current release.
+ DEBUG: Expectations apply only to the debug build.
+ RELEASE: Expectations apply only to release build.
+ LINUX/WIN/WIN-XP/WIN-VISTA/WIN-7/MAC: Expectations apply only to these
+ platforms.
+
+ Notes:
+ -A test cannot be both SLOW and TIMEOUT
+ -A test cannot be both DEFER and WONTFIX
+ -A test should only be one of IMAGE, TEXT, IMAGE+TEXT, or FAIL. FAIL is
+ a migratory state that currently means either IMAGE, TEXT, or
+ IMAGE+TEXT. Once we have finished migrating the expectations, we will
+ change FAIL to have the meaning of IMAGE+TEXT and remove the IMAGE+TEXT
+ identifier.
+ -A test can be included twice, but not via the same path.
+ -If a test is included twice, then the more precise path wins.
+ -CRASH tests cannot be DEFER or WONTFIX
+ """
+
+ EXPECTATIONS = {'pass': PASS,
+ 'fail': FAIL,
+ 'text': TEXT,
+ 'image': IMAGE,
+ 'image+text': IMAGE_PLUS_TEXT,
+ 'timeout': TIMEOUT,
+ 'crash': CRASH,
+ 'missing': MISSING}
+
+ EXPECTATION_DESCRIPTIONS = {SKIP: ('skipped', 'skipped'),
+ PASS: ('pass', 'passes'),
+ FAIL: ('failure', 'failures'),
+ TEXT: ('text diff mismatch',
+ 'text diff mismatch'),
+ IMAGE: ('image mismatch', 'image mismatch'),
+ IMAGE_PLUS_TEXT: ('image and text mismatch',
+ 'image and text mismatch'),
+ CRASH: ('test shell crash',
+ 'test shell crashes'),
+ TIMEOUT: ('test timed out', 'tests timed out'),
+ MISSING: ('no expected result found',
+ 'no expected results found')}
+
+ EXPECTATION_ORDER = (PASS, CRASH, TIMEOUT, MISSING, IMAGE_PLUS_TEXT,
+ TEXT, IMAGE, FAIL, SKIP)
+
+ BASE_PLATFORMS = ('linux', 'mac', 'win')
+ PLATFORMS = BASE_PLATFORMS + ('win-xp', 'win-vista', 'win-7')
+
+ BUILD_TYPES = ('debug', 'release')
+
+ MODIFIERS = {'skip': SKIP,
+ 'wontfix': WONTFIX,
+ 'defer': DEFER,
+ 'slow': SLOW,
+ 'rebaseline': REBASELINE,
+ 'none': NONE}
+
+ TIMELINES = {'wontfix': WONTFIX,
+ 'now': NOW,
+ 'defer': DEFER}
+
+ RESULT_TYPES = {'skip': SKIP,
+ 'pass': PASS,
+ 'fail': FAIL,
+ 'flaky': FLAKY}
+
+ def __init__(self, path, full_test_list, platform, is_debug_mode,
+ is_lint_mode, expectations_as_str=None, suppress_errors=False,
+ tests_are_present=True):
+ """
+ path: The path to the expectation file. An error is thrown if a test is
+ listed more than once.
+ full_test_list: The list of all tests to be run pending processing of
+ the expections for those tests.
+ platform: Which platform from self.PLATFORMS to filter tests for.
+ is_debug_mode: Whether we testing a test_shell built debug mode.
+ is_lint_mode: Whether this is just linting test_expecatations.txt.
+ expectations_as_str: Contents of the expectations file. Used instead of
+ the path. This makes unittesting sane.
+ suppress_errors: Whether to suppress lint errors.
+ tests_are_present: Whether the test files are present in the local
+ filesystem. The LTTF Dashboard uses False here to avoid having to
+ keep a local copy of the tree.
+ """
+
+ self._path = path
+ self._expectations_as_str = expectations_as_str
+ self._is_lint_mode = is_lint_mode
+ self._tests_are_present = tests_are_present
+ self._full_test_list = full_test_list
+ self._suppress_errors = suppress_errors
+ self._errors = []
+ self._non_fatal_errors = []
+ self._platform = self.to_test_platform_name(platform)
+ if self._platform is None:
+ raise Exception("Unknown platform '%s'" % (platform))
+ self._is_debug_mode = is_debug_mode
+
+ # Maps relative test paths as listed in the expectations file to a
+ # list of maps containing modifiers and expectations for each time
+ # the test is listed in the expectations file.
+ self._all_expectations = {}
+
+ # Maps a test to its list of expectations.
+ self._test_to_expectations = {}
+
+ # Maps a test to its list of options (string values)
+ self._test_to_options = {}
+
+ # Maps a test to its list of modifiers: the constants associated with
+ # the options minus any bug or platform strings
+ self._test_to_modifiers = {}
+
+ # Maps a test to the base path that it was listed with in the list.
+ self._test_list_paths = {}
+
+ self._modifier_to_tests = self._dict_of_sets(self.MODIFIERS)
+ self._expectation_to_tests = self._dict_of_sets(self.EXPECTATIONS)
+ self._timeline_to_tests = self._dict_of_sets(self.TIMELINES)
+ self._result_type_to_tests = self._dict_of_sets(self.RESULT_TYPES)
+
+ self._read(self._get_iterable_expectations())
+
+ def _dict_of_sets(self, strings_to_constants):
+ """Takes a dict of strings->constants and returns a dict mapping
+ each constant to an empty set."""
+ d = {}
+ for c in strings_to_constants.values():
+ d[c] = set()
+ return d
+
+ def _get_iterable_expectations(self):
+ """Returns an object that can be iterated over. Allows for not caring
+ about whether we're iterating over a file or a new-line separated
+ string."""
+ if self._expectations_as_str:
+ iterable = [x + "\n" for x in
+ self._expectations_as_str.split("\n")]
+ # Strip final entry if it's empty to avoid added in an extra
+ # newline.
+ if iterable[len(iterable) - 1] == "\n":
+ return iterable[:len(iterable) - 1]
+ return iterable
+ else:
+ return open(self._path)
+
+ def to_test_platform_name(self, name):
+ """Returns the test expectation platform that will be used for a
+ given platform name, or None if there is no match."""
+ chromium_prefix = 'chromium-'
+ name = name.lower()
+ if name.startswith(chromium_prefix):
+ name = name[len(chromium_prefix):]
+ if name in self.PLATFORMS:
+ return name
+ return None
+
+ def get_test_set(self, modifier, expectation=None, include_skips=True):
+ if expectation is None:
+ tests = self._modifier_to_tests[modifier]
+ else:
+ tests = (self._expectation_to_tests[expectation] &
+ self._modifier_to_tests[modifier])
+
+ if not include_skips:
+ tests = tests - self.get_test_set(SKIP, expectation)
+
+ return tests
+
+ def get_tests_with_result_type(self, result_type):
+ return self._result_type_to_tests[result_type]
+
+ def get_tests_with_timeline(self, timeline):
+ return self._timeline_to_tests[timeline]
+
+ def get_options(self, test):
+ """This returns the entire set of options for the given test
+ (the modifiers plus the BUGXXXX identifier). This is used by the
+ LTTF dashboard."""
+ return self._test_to_options[test]
+
+ def has_modifier(self, test, modifier):
+ return test in self._modifier_to_tests[modifier]
+
+ def get_expectations(self, test):
+ return self._test_to_expectations[test]
+
+ def get_expectations_json_for_all_platforms(self):
+ # Specify separators in order to get compact encoding.
+ return ExpectationsJsonEncoder(separators=(',', ':')).encode(
+ self._all_expectations)
+
+ def contains(self, test):
+ return test in self._test_to_expectations
+
+ def remove_platform_from_file(self, tests, platform, backup=False):
+ """Remove the platform option from test expectations file.
+
+ If a test is in the test list and has an option that matches the given
+ platform, remove the matching platform and save the updated test back
+ to the file. If no other platforms remaining after removal, delete the
+ test from the file.
+
+ Args:
+ tests: list of tests that need to update..
+ platform: which platform option to remove.
+ backup: if true, the original test expectations file is saved as
+ [self.TEST_LIST].orig.YYYYMMDDHHMMSS
+
+ Returns:
+ no
+ """
+
+ new_file = self._path + '.new'
+ logging.debug('Original file: "%s"', self._path)
+ logging.debug('New file: "%s"', new_file)
+ f_orig = self._get_iterable_expectations()
+ f_new = open(new_file, 'w')
+
+ tests_removed = 0
+ tests_updated = 0
+ lineno = 0
+ for line in f_orig:
+ lineno += 1
+ action = self._get_platform_update_action(line, lineno, tests,
+ platform)
+ if action == NO_CHANGE:
+ # Save the original line back to the file
+ logging.debug('No change to test: %s', line)
+ f_new.write(line)
+ elif action == REMOVE_TEST:
+ tests_removed += 1
+ logging.info('Test removed: %s', line)
+ elif action == REMOVE_PLATFORM:
+ parts = line.split(':')
+ new_options = parts[0].replace(platform.upper() + ' ', '', 1)
+ new_line = ('%s:%s' % (new_options, parts[1]))
+ f_new.write(new_line)
+ tests_updated += 1
+ logging.info('Test updated: ')
+ logging.info(' old: %s', line)
+ logging.info(' new: %s', new_line)
+ elif action == ADD_PLATFORMS_EXCEPT_THIS:
+ parts = line.split(':')
+ new_options = parts[0]
+ for p in self.PLATFORMS:
+ p = p.upper();
+ # This is a temp solution for rebaselining tool.
+ # Do not add tags WIN-7 and WIN-VISTA to test expectations
+ # if the original line does not specify the platform option.
+ # TODO(victorw): Remove WIN-VISTA and WIN-7 once we have
+ # reliable Win 7 and Win Vista buildbots setup.
+ if not p in (platform.upper(), 'WIN-VISTA', 'WIN-7'):
+ new_options += p + ' '
+ new_line = ('%s:%s' % (new_options, parts[1]))
+ f_new.write(new_line)
+ tests_updated += 1
+ logging.info('Test updated: ')
+ logging.info(' old: %s', line)
+ logging.info(' new: %s', new_line)
+ else:
+ logging.error('Unknown update action: %d; line: %s',
+ action, line)
+
+ logging.info('Total tests removed: %d', tests_removed)
+ logging.info('Total tests updated: %d', tests_updated)
+
+ f_orig.close()
+ f_new.close()
+
+ if backup:
+ date_suffix = time.strftime('%Y%m%d%H%M%S',
+ time.localtime(time.time()))
+ backup_file = ('%s.orig.%s' % (self._path, date_suffix))
+ if os.path.exists(backup_file):
+ os.remove(backup_file)
+ logging.info('Saving original file to "%s"', backup_file)
+ os.rename(self._path, backup_file)
+ else:
+ os.remove(self._path)
+
+ logging.debug('Saving new file to "%s"', self._path)
+ os.rename(new_file, self._path)
+ return True
+
+ def parse_expectations_line(self, line, lineno):
+ """Parses a line from test_expectations.txt and returns a tuple
+ with the test path, options as a list, expectations as a list."""
+ line = strip_comments(line)
+ if not line:
+ return (None, None, None)
+
+ options = []
+ if line.find(":") is -1:
+ test_and_expectation = line.split("=")
+ else:
+ parts = line.split(":")
+ options = self._get_options_list(parts[0])
+ test_and_expectation = parts[1].split('=')
+
+ test = test_and_expectation[0].strip()
+ if (len(test_and_expectation) is not 2):
+ self._add_error(lineno, "Missing expectations.",
+ test_and_expectation)
+ expectations = None
+ else:
+ expectations = self._get_options_list(test_and_expectation[1])
+
+ return (test, options, expectations)
+
+ def _get_platform_update_action(self, line, lineno, tests, platform):
+ """Check the platform option and return the action needs to be taken.
+
+ Args:
+ line: current line in test expectations file.
+ lineno: current line number of line
+ tests: list of tests that need to update..
+ platform: which platform option to remove.
+
+ Returns:
+ NO_CHANGE: no change to the line (comments, test not in the list etc)
+ REMOVE_TEST: remove the test from file.
+ REMOVE_PLATFORM: remove this platform option from the test.
+ ADD_PLATFORMS_EXCEPT_THIS: add all the platforms except this one.
+ """
+ test, options, expectations = self.parse_expectations_line(line,
+ lineno)
+ if not test or test not in tests:
+ return NO_CHANGE
+
+ has_any_platform = False
+ for option in options:
+ if option in self.PLATFORMS:
+ has_any_platform = True
+ if not option == platform:
+ return REMOVE_PLATFORM
+
+ # If there is no platform specified, then it means apply to all
+ # platforms. Return the action to add all the platforms except this
+ # one.
+ if not has_any_platform:
+ return ADD_PLATFORMS_EXCEPT_THIS
+
+ return REMOVE_TEST
+
+ def _has_valid_modifiers_for_current_platform(self, options, lineno,
+ test_and_expectations, modifiers):
+ """Returns true if the current platform is in the options list or if
+ no platforms are listed and if there are no fatal errors in the
+ options list.
+
+ Args:
+ options: List of lowercase options.
+ lineno: The line in the file where the test is listed.
+ test_and_expectations: The path and expectations for the test.
+ modifiers: The set to populate with modifiers.
+ """
+ has_any_platform = False
+ has_bug_id = False
+ for option in options:
+ if option in self.MODIFIERS:
+ modifiers.add(option)
+ elif option in self.PLATFORMS:
+ has_any_platform = True
+ elif option.startswith('bug'):
+ has_bug_id = True
+ elif option not in self.BUILD_TYPES:
+ self._add_error(lineno, 'Invalid modifier for test: %s' %
+ option, test_and_expectations)
+
+ if has_any_platform and not self._match_platform(options):
+ return False
+
+ if not has_bug_id and 'wontfix' not in options:
+ # TODO(ojan): Turn this into an AddError call once all the
+ # tests have BUG identifiers.
+ self._log_non_fatal_error(lineno, 'Test lacks BUG modifier.',
+ test_and_expectations)
+
+ if 'release' in options or 'debug' in options:
+ if self._is_debug_mode and 'debug' not in options:
+ return False
+ if not self._is_debug_mode and 'release' not in options:
+ return False
+
+ if 'wontfix' in options and 'defer' in options:
+ self._add_error(lineno, 'Test cannot be both DEFER and WONTFIX.',
+ test_and_expectations)
+
+ if self._is_lint_mode and 'rebaseline' in options:
+ self._add_error(lineno,
+ 'REBASELINE should only be used for running rebaseline.py. '
+ 'Cannot be checked in.', test_and_expectations)
+
+ return True
+
+ def _match_platform(self, options):
+ """Match the list of options against our specified platform. If any
+ of the options prefix-match self._platform, return True. This handles
+ the case where a test is marked WIN and the platform is WIN-VISTA.
+
+ Args:
+ options: list of options
+ """
+ for opt in options:
+ if self._platform.startswith(opt):
+ return True
+ return False
+
+ def _add_to_all_expectations(self, test, options, expectations):
+ # Make all paths unix-style so the dashboard doesn't need to.
+ test = test.replace('\\', '/')
+ if not test in self._all_expectations:
+ self._all_expectations[test] = []
+ self._all_expectations[test].append(
+ ModifiersAndExpectations(options, expectations))
+
+ def _read(self, expectations):
+ """For each test in an expectations iterable, generate the
+ expectations for it."""
+ lineno = 0
+ for line in expectations:
+ lineno += 1
+
+ test_list_path, options, expectations = \
+ self.parse_expectations_line(line, lineno)
+ if not expectations:
+ continue
+
+ self._add_to_all_expectations(test_list_path,
+ " ".join(options).upper(),
+ " ".join(expectations).upper())
+
+ modifiers = set()
+ if options and not self._has_valid_modifiers_for_current_platform(
+ options, lineno, test_list_path, modifiers):
+ continue
+
+ expectations = self._parse_expectations(expectations, lineno,
+ test_list_path)
+
+ if 'slow' in options and TIMEOUT in expectations:
+ self._add_error(lineno,
+ 'A test can not be both slow and timeout. If it times out '
+ 'indefinitely, then it should be just timeout.',
+ test_list_path)
+
+ full_path = os.path.join(path_utils.layout_tests_dir(),
+ test_list_path)
+ full_path = os.path.normpath(full_path)
+ # WebKit's way of skipping tests is to add a -disabled suffix.
+ # So we should consider the path existing if the path or the
+ # -disabled version exists.
+ if (self._tests_are_present and not os.path.exists(full_path)
+ and not os.path.exists(full_path + '-disabled')):
+ # Log a non fatal error here since you hit this case any
+ # time you update test_expectations.txt without syncing
+ # the LayoutTests directory
+ self._log_non_fatal_error(lineno, 'Path does not exist.',
+ test_list_path)
+ continue
+
+ if not self._full_test_list:
+ tests = [test_list_path]
+ else:
+ tests = self._expand_tests(test_list_path)
+
+ self._add_tests(tests, expectations, test_list_path, lineno,
+ modifiers, options)
+
+ if not self._suppress_errors and (
+ len(self._errors) or len(self._non_fatal_errors)):
+ if self._is_debug_mode:
+ build_type = 'DEBUG'
+ else:
+ build_type = 'RELEASE'
+ print "\nFAILURES FOR PLATFORM: %s, BUILD_TYPE: %s" \
+ % (self._platform.upper(), build_type)
+
+ for error in self._non_fatal_errors:
+ logging.error(error)
+ if len(self._errors):
+ raise SyntaxError('\n'.join(map(str, self._errors)))
+
+ # Now add in the tests that weren't present in the expectations file
+ expectations = set([PASS])
+ options = []
+ modifiers = []
+ if self._full_test_list:
+ for test in self._full_test_list:
+ if not test in self._test_list_paths:
+ self._add_test(test, modifiers, expectations, options)
+
+ def _get_options_list(self, listString):
+ return [part.strip().lower() for part in listString.strip().split(' ')]
+
+ def _parse_expectations(self, expectations, lineno, test_list_path):
+ result = set()
+ for part in expectations:
+ if not part in self.EXPECTATIONS:
+ self._add_error(lineno, 'Unsupported expectation: %s' % part,
+ test_list_path)
+ continue
+ expectation = self.EXPECTATIONS[part]
+ result.add(expectation)
+ return result
+
+ def _expand_tests(self, test_list_path):
+ """Convert the test specification to an absolute, normalized
+ path and make sure directories end with the OS path separator."""
+ path = os.path.join(path_utils.layout_tests_dir(), test_list_path)
+ path = os.path.normpath(path)
+ path = self._fix_dir(path)
+
+ result = []
+ for test in self._full_test_list:
+ if test.startswith(path):
+ result.append(test)
+ return result
+
+ def _fix_dir(self, path):
+ """Check to see if the path points to a directory, and if so, append
+ the directory separator if necessary."""
+ if self._tests_are_present:
+ if os.path.isdir(path):
+ path = os.path.join(path, '')
+ else:
+ # If we can't check the filesystem to see if this is a directory,
+ # we assume that files w/o an extension are directories.
+ # TODO(dpranke): What happens w/ LayoutTests/css2.1 ?
+ if os.path.splitext(path)[1] == '':
+ path = os.path.join(path, '')
+ return path
+
+ def _add_tests(self, tests, expectations, test_list_path, lineno,
+ modifiers, options):
+ for test in tests:
+ if self._already_seen_test(test, test_list_path, lineno):
+ continue
+
+ self._clear_expectations_for_test(test, test_list_path)
+ self._add_test(test, modifiers, expectations, options)
+
+ def _add_test(self, test, modifiers, expectations, options):
+ """Sets the expected state for a given test.
+
+ This routine assumes the test has not been added before. If it has,
+ use _ClearExpectationsForTest() to reset the state prior to
+ calling this.
+
+ Args:
+ test: test to add
+ modifiers: sequence of modifier keywords ('wontfix', 'slow', etc.)
+ expectations: sequence of expectations (PASS, IMAGE, etc.)
+ options: sequence of keywords and bug identifiers."""
+ self._test_to_expectations[test] = expectations
+ for expectation in expectations:
+ self._expectation_to_tests[expectation].add(test)
+
+ self._test_to_options[test] = options
+ self._test_to_modifiers[test] = set()
+ for modifier in modifiers:
+ mod_value = self.MODIFIERS[modifier]
+ self._modifier_to_tests[mod_value].add(test)
+ self._test_to_modifiers[test].add(mod_value)
+
+ if 'wontfix' in modifiers:
+ self._timeline_to_tests[WONTFIX].add(test)
+ elif 'defer' in modifiers:
+ self._timeline_to_tests[DEFER].add(test)
+ else:
+ self._timeline_to_tests[NOW].add(test)
+
+ if 'skip' in modifiers:
+ self._result_type_to_tests[SKIP].add(test)
+ elif expectations == set([PASS]):
+ self._result_type_to_tests[PASS].add(test)
+ elif len(expectations) > 1:
+ self._result_type_to_tests[FLAKY].add(test)
+ else:
+ self._result_type_to_tests[FAIL].add(test)
+
+ def _clear_expectations_for_test(self, test, test_list_path):
+ """Remove prexisting expectations for this test.
+ This happens if we are seeing a more precise path
+ than a previous listing.
+ """
+ if test in self._test_list_paths:
+ self._test_to_expectations.pop(test, '')
+ self._remove_from_sets(test, self._expectation_to_tests)
+ self._remove_from_sets(test, self._modifier_to_tests)
+ self._remove_from_sets(test, self._timeline_to_tests)
+ self._remove_from_sets(test, self._result_type_to_tests)
+
+ self._test_list_paths[test] = os.path.normpath(test_list_path)
+
+ def _remove_from_sets(self, test, dict):
+ """Removes the given test from the sets in the dictionary.
+
+ Args:
+ test: test to look for
+ dict: dict of sets of files"""
+ for set_of_tests in dict.itervalues():
+ if test in set_of_tests:
+ set_of_tests.remove(test)
+
+ def _already_seen_test(self, test, test_list_path, lineno):
+ """Returns true if we've already seen a more precise path for this test
+ than the test_list_path.
+ """
+ if not test in self._test_list_paths:
+ return False
+
+ prev_base_path = self._test_list_paths[test]
+ if (prev_base_path == os.path.normpath(test_list_path)):
+ self._add_error(lineno, 'Duplicate expectations.', test)
+ return True
+
+ # Check if we've already seen a more precise path.
+ return prev_base_path.startswith(os.path.normpath(test_list_path))
+
+ def _add_error(self, lineno, msg, path):
+ """Reports an error that will prevent running the tests. Does not
+ immediately raise an exception because we'd like to aggregate all the
+ errors so they can all be printed out."""
+ self._errors.append('\nLine:%s %s %s' % (lineno, msg, path))
+
+ def _log_non_fatal_error(self, lineno, msg, path):
+ """Reports an error that will not prevent running the tests. These are
+ still errors, but not bad enough to warrant breaking test running."""
+ self._non_fatal_errors.append('Line:%s %s %s' % (lineno, msg, path))
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py
new file mode 100644
index 0000000..6957dea
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py
@@ -0,0 +1,267 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""Classes for failures that occur during tests."""
+
+import os
+import test_expectations
+
+
+def determine_result_type(failure_list):
+ """Takes a set of test_failures and returns which result type best fits
+ the list of failures. "Best fits" means we use the worst type of failure.
+
+ Returns:
+ one of the test_expectations result types - PASS, TEXT, CRASH, etc."""
+
+ if not failure_list or len(failure_list) == 0:
+ return test_expectations.PASS
+
+ failure_types = [type(f) for f in failure_list]
+ if FailureCrash in failure_types:
+ return test_expectations.CRASH
+ elif FailureTimeout in failure_types:
+ return test_expectations.TIMEOUT
+ elif (FailureMissingResult in failure_types or
+ FailureMissingImage in failure_types or
+ FailureMissingImageHash in failure_types):
+ return test_expectations.MISSING
+ else:
+ is_text_failure = FailureTextMismatch in failure_types
+ is_image_failure = (FailureImageHashIncorrect in failure_types or
+ FailureImageHashMismatch in failure_types)
+ if is_text_failure and is_image_failure:
+ return test_expectations.IMAGE_PLUS_TEXT
+ elif is_text_failure:
+ return test_expectations.TEXT
+ elif is_image_failure:
+ return test_expectations.IMAGE
+ else:
+ raise ValueError("unclassifiable set of failures: "
+ + str(failure_types))
+
+
+class TestFailure(object):
+ """Abstract base class that defines the failure interface."""
+
+ @staticmethod
+ def message():
+ """Returns a string describing the failure in more detail."""
+ raise NotImplemented
+
+ def result_html_output(self, filename):
+ """Returns an HTML string to be included on the results.html page."""
+ raise NotImplemented
+
+ def should_kill_test_shell(self):
+ """Returns True if we should kill the test shell before the next
+ test."""
+ return False
+
+ def relative_output_filename(self, filename, modifier):
+ """Returns a relative filename inside the output dir that contains
+ modifier.
+
+ For example, if filename is fast\dom\foo.html and modifier is
+ "-expected.txt", the return value is fast\dom\foo-expected.txt
+
+ Args:
+ filename: relative filename to test file
+ modifier: a string to replace the extension of filename with
+
+ Return:
+ The relative windows path to the output filename
+ """
+ return os.path.splitext(filename)[0] + modifier
+
+
+class FailureWithType(TestFailure):
+ """Base class that produces standard HTML output based on the test type.
+
+ Subclasses may commonly choose to override the ResultHtmlOutput, but still
+ use the standard OutputLinks.
+ """
+
+ def __init__(self, test_type):
+ TestFailure.__init__(self)
+ # TODO(ojan): This class no longer needs to know the test_type.
+ self._test_type = test_type
+
+ # Filename suffixes used by ResultHtmlOutput.
+ OUT_FILENAMES = []
+
+ def output_links(self, filename, out_names):
+ """Returns a string holding all applicable output file links.
+
+ Args:
+ filename: the test filename, used to construct the result file names
+ out_names: list of filename suffixes for the files. If three or more
+ suffixes are in the list, they should be [actual, expected, diff,
+ wdiff]. Two suffixes should be [actual, expected], and a
+ single item is the [actual] filename suffix.
+ If out_names is empty, returns the empty string.
+ """
+ links = ['']
+ uris = [self.relative_output_filename(filename, fn) for
+ fn in out_names]
+ if len(uris) > 1:
+ links.append("<a href='%s'>expected</a>" % uris[1])
+ if len(uris) > 0:
+ links.append("<a href='%s'>actual</a>" % uris[0])
+ if len(uris) > 2:
+ links.append("<a href='%s'>diff</a>" % uris[2])
+ if len(uris) > 3:
+ links.append("<a href='%s'>wdiff</a>" % uris[3])
+ return ' '.join(links)
+
+ def result_html_output(self, filename):
+ return self.message() + self.output_links(filename, self.OUT_FILENAMES)
+
+
+class FailureTimeout(TestFailure):
+ """Test timed out. We also want to restart the test shell if this
+ happens."""
+
+ @staticmethod
+ def message():
+ return "Test timed out"
+
+ def result_html_output(self, filename):
+ return "<strong>%s</strong>" % self.message()
+
+ def should_kill_test_shell(self):
+ return True
+
+
+class FailureCrash(TestFailure):
+ """Test shell crashed."""
+
+ @staticmethod
+ def message():
+ return "Test shell crashed"
+
+ def result_html_output(self, filename):
+ # TODO(tc): create a link to the minidump file
+ stack = self.relative_output_filename(filename, "-stack.txt")
+ return "<strong>%s</strong> <a href=%s>stack</a>" % (self.message(),
+ stack)
+
+ def should_kill_test_shell(self):
+ return True
+
+
+class FailureMissingResult(FailureWithType):
+ """Expected result was missing."""
+ OUT_FILENAMES = ["-actual.txt"]
+
+ @staticmethod
+ def message():
+ return "No expected results found"
+
+ def result_html_output(self, filename):
+ return ("<strong>%s</strong>" % self.message() +
+ self.output_links(filename, self.OUT_FILENAMES))
+
+
+class FailureTextMismatch(FailureWithType):
+ """Text diff output failed."""
+ # Filename suffixes used by ResultHtmlOutput.
+ OUT_FILENAMES = ["-actual.txt", "-expected.txt", "-diff.txt"]
+ OUT_FILENAMES_WDIFF = ["-actual.txt", "-expected.txt", "-diff.txt",
+ "-wdiff.html"]
+
+ def __init__(self, test_type, has_wdiff):
+ FailureWithType.__init__(self, test_type)
+ if has_wdiff:
+ self.OUT_FILENAMES = self.OUT_FILENAMES_WDIFF
+
+ @staticmethod
+ def message():
+ return "Text diff mismatch"
+
+
+class FailureMissingImageHash(FailureWithType):
+ """Actual result hash was missing."""
+ # Chrome doesn't know to display a .checksum file as text, so don't bother
+ # putting in a link to the actual result.
+ OUT_FILENAMES = []
+
+ @staticmethod
+ def message():
+ return "No expected image hash found"
+
+ def result_html_output(self, filename):
+ return "<strong>%s</strong>" % self.message()
+
+
+class FailureMissingImage(FailureWithType):
+ """Actual result image was missing."""
+ OUT_FILENAMES = ["-actual.png"]
+
+ @staticmethod
+ def message():
+ return "No expected image found"
+
+ def result_html_output(self, filename):
+ return ("<strong>%s</strong>" % self.message() +
+ self.output_links(filename, self.OUT_FILENAMES))
+
+
+class FailureImageHashMismatch(FailureWithType):
+ """Image hashes didn't match."""
+ OUT_FILENAMES = ["-actual.png", "-expected.png", "-diff.png"]
+
+ @staticmethod
+ def message():
+ # We call this a simple image mismatch to avoid confusion, since
+ # we link to the PNGs rather than the checksums.
+ return "Image mismatch"
+
+
+class FailureFuzzyFailure(FailureWithType):
+ """Image hashes didn't match."""
+ OUT_FILENAMES = ["-actual.png", "-expected.png"]
+
+ @staticmethod
+ def message():
+ return "Fuzzy image match also failed"
+
+
+class FailureImageHashIncorrect(FailureWithType):
+ """Actual result hash is incorrect."""
+ # Chrome doesn't know to display a .checksum file as text, so don't bother
+ # putting in a link to the actual result.
+ OUT_FILENAMES = []
+
+ @staticmethod
+ def message():
+ return "Images match, expected image hash incorrect. "
+
+ def result_html_output(self, filename):
+ return "<strong>%s</strong>" % self.message()
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_files.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_files.py
new file mode 100644
index 0000000..91fe136
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_files.py
@@ -0,0 +1,95 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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 module is used to find all of the layout test files used by Chromium
+(across all platforms). It exposes one public function - GatherTestFiles() -
+which takes an optional list of paths. If a list is passed in, the returned
+list of test files is constrained to those found under the paths passed in,
+i.e. calling GatherTestFiles(["LayoutTests/fast"]) will only return files
+under that directory."""
+
+import glob
+import os
+import path_utils
+
+# When collecting test cases, we include any file with these extensions.
+_supported_file_extensions = set(['.html', '.shtml', '.xml', '.xhtml', '.pl',
+ '.php', '.svg'])
+# When collecting test cases, skip these directories
+_skipped_directories = set(['.svn', '_svn', 'resources', 'script-tests'])
+
+
+def gather_test_files(paths):
+ """Generate a set of test files and return them.
+
+ Args:
+ paths: a list of command line paths relative to the webkit/tests
+ directory. glob patterns are ok.
+ """
+ paths_to_walk = set()
+ # if paths is empty, provide a pre-defined list.
+ if paths:
+ for path in paths:
+ # If there's an * in the name, assume it's a glob pattern.
+ path = os.path.join(path_utils.layout_tests_dir(), path)
+ if path.find('*') > -1:
+ filenames = glob.glob(path)
+ paths_to_walk.update(filenames)
+ else:
+ paths_to_walk.add(path)
+ else:
+ paths_to_walk.add(path_utils.layout_tests_dir())
+
+ # Now walk all the paths passed in on the command line and get filenames
+ test_files = set()
+ for path in paths_to_walk:
+ if os.path.isfile(path) and _has_supported_extension(path):
+ test_files.add(os.path.normpath(path))
+ continue
+
+ for root, dirs, files in os.walk(path):
+ # don't walk skipped directories and sub directories
+ if os.path.basename(root) in _skipped_directories:
+ del dirs[:]
+ continue
+
+ for filename in files:
+ if _has_supported_extension(filename):
+ filename = os.path.join(root, filename)
+ filename = os.path.normpath(filename)
+ test_files.add(filename)
+
+ return test_files
+
+
+def _has_supported_extension(filename):
+ """Return true if filename is one of the file extensions we want to run a
+ test on."""
+ extension = os.path.splitext(filename)[1]
+ return extension in _supported_file_extensions
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_shell_thread.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_shell_thread.py
new file mode 100644
index 0000000..10d0509
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_shell_thread.py
@@ -0,0 +1,511 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""A Thread object for running the test shell and processing URLs from a
+shared queue.
+
+Each thread runs a separate instance of the test_shell binary and validates
+the output. When there are no more URLs to process in the shared queue, the
+thread exits.
+"""
+
+import copy
+import logging
+import os
+import Queue
+import signal
+import subprocess
+import sys
+import thread
+import threading
+import time
+
+import path_utils
+import test_failures
+
+
+def process_output(proc, test_info, test_types, test_args, target, output_dir):
+ """Receives the output from a test_shell process, subjects it to a number
+ of tests, and returns a list of failure types the test produced.
+
+ Args:
+ proc: an active test_shell process
+ test_info: Object containing the test filename, uri and timeout
+ test_types: list of test types to subject the output to
+ test_args: arguments to be passed to each test
+ target: Debug or Release
+ output_dir: directory to put crash stack traces into
+
+ Returns: a list of failure objects and times for the test being processed
+ """
+ outlines = []
+ extra_lines = []
+ failures = []
+ crash = False
+
+ # Some test args, such as the image hash, may be added or changed on a
+ # test-by-test basis.
+ local_test_args = copy.copy(test_args)
+
+ start_time = time.time()
+
+ line = proc.stdout.readline()
+
+ # Only start saving output lines once we've loaded the URL for the test.
+ url = None
+ test_string = test_info.uri.strip()
+
+ while line.rstrip() != "#EOF":
+ # Make sure we haven't crashed.
+ if line == '' and proc.poll() is not None:
+ failures.append(test_failures.FailureCrash())
+
+ # This is hex code 0xc000001d, which is used for abrupt
+ # termination. This happens if we hit ctrl+c from the prompt and
+ # we happen to be waiting on the test_shell.
+ # sdoyon: Not sure for which OS and in what circumstances the
+ # above code is valid. What works for me under Linux to detect
+ # ctrl+c is for the subprocess returncode to be negative SIGINT.
+ # And that agrees with the subprocess documentation.
+ if (-1073741510 == proc.returncode or
+ - signal.SIGINT == proc.returncode):
+ raise KeyboardInterrupt
+ crash = True
+ break
+
+ # Don't include #URL lines in our output
+ if line.startswith("#URL:"):
+ url = line.rstrip()[5:]
+ if url != test_string:
+ logging.fatal("Test got out of sync:\n|%s|\n|%s|" %
+ (url, test_string))
+ raise AssertionError("test out of sync")
+ elif line.startswith("#MD5:"):
+ local_test_args.hash = line.rstrip()[5:]
+ elif line.startswith("#TEST_TIMED_OUT"):
+ # Test timed out, but we still need to read until #EOF.
+ failures.append(test_failures.FailureTimeout())
+ elif url:
+ outlines.append(line)
+ else:
+ extra_lines.append(line)
+
+ line = proc.stdout.readline()
+
+ end_test_time = time.time()
+
+ if len(extra_lines):
+ extra = "".join(extra_lines)
+ if crash:
+ logging.debug("Stacktrace for %s:\n%s" % (test_string, extra))
+ # Strip off "file://" since RelativeTestFilename expects
+ # filesystem paths.
+ filename = os.path.join(output_dir,
+ path_utils.relative_test_filename(test_string[7:]))
+ filename = os.path.splitext(filename)[0] + "-stack.txt"
+ path_utils.maybe_make_directory(os.path.split(filename)[0])
+ open(filename, "wb").write(extra)
+ else:
+ logging.debug("Previous test output extra lines after dump:\n%s" %
+ extra)
+
+ # Check the output and save the results.
+ time_for_diffs = {}
+ for test_type in test_types:
+ start_diff_time = time.time()
+ new_failures = test_type.compare_output(test_info.filename,
+ proc, ''.join(outlines),
+ local_test_args, target)
+ # Don't add any more failures if we already have a crash, so we don't
+ # double-report those tests. We do double-report for timeouts since
+ # we still want to see the text and image output.
+ if not crash:
+ failures.extend(new_failures)
+ time_for_diffs[test_type.__class__.__name__] = (
+ time.time() - start_diff_time)
+
+ total_time_for_all_diffs = time.time() - end_test_time
+ test_run_time = end_test_time - start_time
+ return TestStats(test_info.filename, failures, test_run_time,
+ total_time_for_all_diffs, time_for_diffs)
+
+
+def start_test_shell(command, args):
+ """Returns the process for a new test_shell started in layout-tests mode.
+ """
+ cmd = []
+ # Hook for injecting valgrind or other runtime instrumentation,
+ # used by e.g. tools/valgrind/valgrind_tests.py.
+ wrapper = os.environ.get("BROWSER_WRAPPER", None)
+ if wrapper != None:
+ cmd += [wrapper]
+ cmd += command + ['--layout-tests'] + args
+ return subprocess.Popen(cmd,
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
+
+
+class TestStats:
+
+ def __init__(self, filename, failures, test_run_time,
+ total_time_for_all_diffs, time_for_diffs):
+ self.filename = filename
+ self.failures = failures
+ self.test_run_time = test_run_time
+ self.total_time_for_all_diffs = total_time_for_all_diffs
+ self.time_for_diffs = time_for_diffs
+
+
+class SingleTestThread(threading.Thread):
+ """Thread wrapper for running a single test file."""
+
+ def __init__(self, test_shell_command, shell_args, test_info, test_types,
+ test_args, target, output_dir):
+ """
+ Args:
+ test_info: Object containing the test filename, uri and timeout
+ output_dir: Directory to put crash stacks into.
+ See TestShellThread for documentation of the remaining arguments.
+ """
+
+ threading.Thread.__init__(self)
+ self._command = test_shell_command
+ self._shell_args = shell_args
+ self._test_info = test_info
+ self._test_types = test_types
+ self._test_args = test_args
+ self._target = target
+ self._output_dir = output_dir
+
+ def run(self):
+ proc = start_test_shell(self._command, self._shell_args +
+ ["--time-out-ms=" + self._test_info.timeout, self._test_info.uri])
+ self._test_stats = process_output(proc, self._test_info,
+ self._test_types, self._test_args, self._target, self._output_dir)
+
+ def get_test_stats(self):
+ return self._test_stats
+
+
+class TestShellThread(threading.Thread):
+
+ def __init__(self, filename_list_queue, result_queue, test_shell_command,
+ test_types, test_args, shell_args, options):
+ """Initialize all the local state for this test shell thread.
+
+ Args:
+ filename_list_queue: A thread safe Queue class that contains lists
+ of tuples of (filename, uri) pairs.
+ result_queue: A thread safe Queue class that will contain tuples of
+ (test, failure lists) for the test results.
+ test_shell_command: A list specifying the command+args for
+ test_shell
+ test_types: A list of TestType objects to run the test output
+ against.
+ test_args: A TestArguments object to pass to each TestType.
+ shell_args: Any extra arguments to be passed to test_shell.exe.
+ options: A property dictionary as produced by optparse. The
+ command-line options should match those expected by
+ run_webkit_tests; they are typically passed via the
+ run_webkit_tests.TestRunner class."""
+ threading.Thread.__init__(self)
+ self._filename_list_queue = filename_list_queue
+ self._result_queue = result_queue
+ self._filename_list = []
+ self._test_shell_command = test_shell_command
+ self._test_types = test_types
+ self._test_args = test_args
+ self._test_shell_proc = None
+ self._shell_args = shell_args
+ self._options = options
+ self._canceled = False
+ self._exception_info = None
+ self._directory_timing_stats = {}
+ self._test_stats = []
+ self._num_tests = 0
+ self._start_time = 0
+ self._stop_time = 0
+
+ # Current directory of tests we're running.
+ self._current_dir = None
+ # Number of tests in self._current_dir.
+ self._num_tests_in_current_dir = None
+ # Time at which we started running tests from self._current_dir.
+ self._current_dir_start_time = None
+
+ def get_directory_timing_stats(self):
+ """Returns a dictionary mapping test directory to a tuple of
+ (number of tests in that directory, time to run the tests)"""
+ return self._directory_timing_stats
+
+ def get_individual_test_stats(self):
+ """Returns a list of (test_filename, time_to_run_test,
+ total_time_for_all_diffs, time_for_diffs) tuples."""
+ return self._test_stats
+
+ def cancel(self):
+ """Set a flag telling this thread to quit."""
+ self._canceled = True
+
+ def get_exception_info(self):
+ """If run() terminated on an uncaught exception, return it here
+ ((type, value, traceback) tuple).
+ Returns None if run() terminated normally. Meant to be called after
+ joining this thread."""
+ return self._exception_info
+
+ def get_total_time(self):
+ return max(self._stop_time - self._start_time, 0.0)
+
+ def get_num_tests(self):
+ return self._num_tests
+
+ def run(self):
+ """Delegate main work to a helper method and watch for uncaught
+ exceptions."""
+ self._start_time = time.time()
+ self._num_tests = 0
+ try:
+ logging.debug('%s starting' % (self.getName()))
+ self._run(test_runner=None, result_summary=None)
+ logging.debug('%s done (%d tests)' % (self.getName(),
+ self.get_num_tests()))
+ except:
+ # Save the exception for our caller to see.
+ self._exception_info = sys.exc_info()
+ self._stop_time = time.time()
+ # Re-raise it and die.
+ logging.error('%s dying: %s' % (self.getName(),
+ self._exception_info))
+ raise
+ self._stop_time = time.time()
+
+ def run_in_main_thread(self, test_runner, result_summary):
+ """This hook allows us to run the tests from the main thread if
+ --num-test-shells==1, instead of having to always run two or more
+ threads. This allows us to debug the test harness without having to
+ do multi-threaded debugging."""
+ self._run(test_runner, result_summary)
+
+ def _run(self, test_runner, result_summary):
+ """Main work entry point of the thread. Basically we pull urls from the
+ filename queue and run the tests until we run out of urls.
+
+ If test_runner is not None, then we call test_runner.UpdateSummary()
+ with the results of each test."""
+ batch_size = 0
+ batch_count = 0
+ if self._options.batch_size:
+ try:
+ batch_size = int(self._options.batch_size)
+ except:
+ logging.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.
+ tests_run_filename = os.path.join(self._options.results_directory,
+ "tests_run.txt")
+ tests_run_file = open(tests_run_filename, "a")
+
+ while True:
+ if self._canceled:
+ logging.info('Testing canceled')
+ tests_run_file.close()
+ return
+
+ if len(self._filename_list) is 0:
+ if self._current_dir is not None:
+ self._directory_timing_stats[self._current_dir] = \
+ (self._num_tests_in_current_dir,
+ time.time() - self._current_dir_start_time)
+
+ try:
+ self._current_dir, self._filename_list = \
+ self._filename_list_queue.get_nowait()
+ except Queue.Empty:
+ self._kill_test_shell()
+ tests_run_file.close()
+ return
+
+ self._num_tests_in_current_dir = len(self._filename_list)
+ self._current_dir_start_time = time.time()
+
+ test_info = self._filename_list.pop()
+
+ # We have a url, run tests.
+ batch_count += 1
+ self._num_tests += 1
+ if self._options.run_singly:
+ failures = self._run_test_singly(test_info)
+ else:
+ failures = self._run_test(test_info)
+
+ filename = test_info.filename
+ tests_run_file.write(filename + "\n")
+ if failures:
+ # Check and kill test shell if we need too.
+ if len([1 for f in failures if f.should_kill_test_shell()]):
+ self._kill_test_shell()
+ # Reset the batch count since the shell just bounced.
+ batch_count = 0
+ # Print the error message(s).
+ error_str = '\n'.join([' ' + f.message() for f in failures])
+ logging.debug("%s %s failed:\n%s" % (self.getName(),
+ path_utils.relative_test_filename(filename),
+ error_str))
+ else:
+ logging.debug("%s %s passed" % (self.getName(),
+ path_utils.relative_test_filename(filename)))
+ self._result_queue.put((filename, failures))
+
+ if batch_size > 0 and batch_count > batch_size:
+ # Bounce the shell and reset count.
+ self._kill_test_shell()
+ batch_count = 0
+
+ if test_runner:
+ test_runner.update_summary(result_summary)
+
+ def _run_test_singly(self, test_info):
+ """Run a test in a separate thread, enforcing a hard time limit.
+
+ Since we can only detect the termination of a thread, not any internal
+ state or progress, we can only run per-test timeouts when running test
+ files singly.
+
+ Args:
+ test_info: Object containing the test filename, uri and timeout
+
+ Return:
+ A list of TestFailure objects describing the error.
+ """
+ worker = SingleTestThread(self._test_shell_command,
+ self._shell_args,
+ test_info,
+ self._test_types,
+ self._test_args,
+ self._options.target,
+ self._options.results_directory)
+
+ worker.start()
+
+ # When we're running one test per test_shell process, we can enforce
+ # a hard timeout. the test_shell watchdog uses 2.5x the timeout
+ # We want to be larger than that.
+ worker.join(int(test_info.timeout) * 3.0 / 1000.0)
+ if worker.isAlive():
+ # If join() returned with the thread still running, the
+ # test_shell.exe is completely hung and there's nothing
+ # more we can do with it. We have to kill all the
+ # test_shells to free it up. If we're running more than
+ # one test_shell thread, we'll end up killing the other
+ # test_shells too, introducing spurious crashes. We accept that
+ # tradeoff in order to avoid losing the rest of this thread's
+ # results.
+ logging.error('Test thread hung: killing all test_shells')
+ path_utils.kill_all_test_shells()
+
+ try:
+ stats = worker.get_test_stats()
+ self._test_stats.append(stats)
+ failures = stats.failures
+ except AttributeError, e:
+ failures = []
+ logging.error('Cannot get results of test: %s' %
+ test_info.filename)
+
+ return failures
+
+ def _run_test(self, test_info):
+ """Run a single test file using a shared test_shell process.
+
+ Args:
+ test_info: Object containing the test filename, uri and timeout
+
+ Return:
+ A list of TestFailure objects describing the error.
+ """
+ self._ensure_test_shell_is_running()
+ # Args to test_shell is a space-separated list of
+ # "uri timeout pixel_hash"
+ # The timeout and pixel_hash are optional. The timeout is used if this
+ # test has a custom timeout. The pixel_hash is used to avoid doing an
+ # image dump if the checksums match, so it should be set to a blank
+ # value if we are generating a new baseline.
+ # (Otherwise, an image from a previous run will be copied into
+ # the baseline.)
+ image_hash = test_info.image_hash
+ if image_hash and self._test_args.new_baseline:
+ image_hash = ""
+ self._test_shell_proc.stdin.write(("%s %s %s\n" %
+ (test_info.uri, test_info.timeout, image_hash)))
+
+ # If the test shell is dead, the above may cause an IOError as we
+ # try to write onto the broken pipe. If this is the first test for
+ # this test shell process, than the test shell did not
+ # successfully start. If this is not the first test, then the
+ # previous tests have caused some kind of delayed crash. We don't
+ # try to recover here.
+ self._test_shell_proc.stdin.flush()
+
+ stats = process_output(self._test_shell_proc, test_info,
+ self._test_types, self._test_args,
+ self._options.target,
+ self._options.results_directory)
+
+ self._test_stats.append(stats)
+ return stats.failures
+
+ def _ensure_test_shell_is_running(self):
+ """Start the shared test shell, if it's not running. Not for use when
+ running tests singly, since those each start a separate test shell in
+ their own thread.
+ """
+ if (not self._test_shell_proc or
+ self._test_shell_proc.poll() is not None):
+ self._test_shell_proc = start_test_shell(self._test_shell_command,
+ self._shell_args)
+
+ def _kill_test_shell(self):
+ """Kill the test shell process if it's running."""
+ if self._test_shell_proc:
+ self._test_shell_proc.stdin.close()
+ self._test_shell_proc.stdout.close()
+ if self._test_shell_proc.stderr:
+ self._test_shell_proc.stderr.close()
+ if (sys.platform not in ('win32', 'cygwin') and
+ not self._test_shell_proc.poll()):
+ # Closing stdin/stdout/stderr hangs sometimes on OS X.
+ null = open(os.devnull, "w")
+ subprocess.Popen(["kill", "-9",
+ str(self._test_shell_proc.pid)], stderr=null)
+ null.close()
+ self._test_shell_proc = None
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/websocket_server.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/websocket_server.py
new file mode 100644
index 0000000..7fc47a0
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/websocket_server.py
@@ -0,0 +1,316 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""A class to help start/stop the PyWebSocket server used by layout tests."""
+
+
+import logging
+import optparse
+import os
+import subprocess
+import sys
+import tempfile
+import time
+import urllib
+
+import path_utils
+import platform_utils
+import http_server
+
+_WS_LOG_PREFIX = 'pywebsocket.ws.log-'
+_WSS_LOG_PREFIX = 'pywebsocket.wss.log-'
+
+_DEFAULT_WS_PORT = 8880
+_DEFAULT_WSS_PORT = 9323
+
+
+def url_is_alive(url):
+ """Checks to see if we get an http response from |url|.
+ We poll the url 5 times with a 1 second delay. If we don't
+ get a reply in that time, we give up and assume the httpd
+ didn't start properly.
+
+ Args:
+ url: The URL to check.
+ Return:
+ True if the url is alive.
+ """
+ wait_time = 5
+ while wait_time > 0:
+ try:
+ response = urllib.urlopen(url)
+ # Server is up and responding.
+ return True
+ except IOError:
+ pass
+ wait_time -= 1
+ # Wait a second and try again.
+ time.sleep(1)
+
+ return False
+
+
+def remove_log_files(folder, starts_with):
+ files = os.listdir(folder)
+ for file in files:
+ if file.startswith(starts_with):
+ full_path = os.path.join(folder, file)
+ os.remove(full_path)
+
+
+class PyWebSocketNotStarted(Exception):
+ pass
+
+
+class PyWebSocketNotFound(Exception):
+ pass
+
+
+class PyWebSocket(http_server.Lighttpd):
+
+ def __init__(self, output_dir, port=_DEFAULT_WS_PORT,
+ root=None,
+ use_tls=False,
+ private_key=http_server.Lighttpd._pem_file,
+ certificate=http_server.Lighttpd._pem_file,
+ register_cygwin=None,
+ pidfile=None):
+ """Args:
+ output_dir: the absolute path to the layout test result directory
+ """
+ http_server.Lighttpd.__init__(self, output_dir,
+ port=port,
+ root=root,
+ register_cygwin=register_cygwin)
+ self._output_dir = output_dir
+ self._process = None
+ self._port = port
+ self._root = root
+ self._use_tls = use_tls
+ self._private_key = private_key
+ self._certificate = certificate
+ if self._port:
+ self._port = int(self._port)
+ if self._use_tls:
+ self._server_name = 'PyWebSocket(Secure)'
+ else:
+ self._server_name = 'PyWebSocket'
+ self._pidfile = pidfile
+ self._wsout = None
+
+ # Webkit tests
+ if self._root:
+ self._layout_tests = os.path.abspath(self._root)
+ self._web_socket_tests = os.path.abspath(
+ os.path.join(self._root, 'websocket', 'tests'))
+ else:
+ try:
+ self._web_socket_tests = path_utils.path_from_base(
+ 'third_party', 'WebKit', 'LayoutTests', 'websocket',
+ 'tests')
+ self._layout_tests = path_utils.path_from_base(
+ 'third_party', 'WebKit', 'LayoutTests')
+ except path_utils.PathNotFound:
+ self._web_socket_tests = None
+
+ def start(self):
+ if not self._web_socket_tests:
+ logging.info('No need to start %s server.' % self._server_name)
+ return
+ if self.is_running():
+ raise PyWebSocketNotStarted('%s is already running.' %
+ self._server_name)
+
+ time_str = time.strftime('%d%b%Y-%H%M%S')
+ if self._use_tls:
+ log_prefix = _WSS_LOG_PREFIX
+ else:
+ log_prefix = _WS_LOG_PREFIX
+ log_file_name = log_prefix + time_str
+
+ # Remove old log files. We only need to keep the last ones.
+ remove_log_files(self._output_dir, log_prefix)
+
+ error_log = os.path.join(self._output_dir, log_file_name + "-err.txt")
+
+ output_log = os.path.join(self._output_dir, log_file_name + "-out.txt")
+ self._wsout = open(output_log, "w")
+
+ python_interp = sys.executable
+ pywebsocket_base = path_utils.path_from_base(
+ 'third_party', 'WebKit', 'WebKitTools', 'pywebsocket')
+ pywebsocket_script = path_utils.path_from_base(
+ 'third_party', 'WebKit', 'WebKitTools', 'pywebsocket',
+ 'mod_pywebsocket', 'standalone.py')
+ start_cmd = [
+ python_interp, pywebsocket_script,
+ '-p', str(self._port),
+ '-d', self._layout_tests,
+ '-s', self._web_socket_tests,
+ '-l', error_log,
+ ]
+
+ handler_map_file = os.path.join(self._web_socket_tests,
+ 'handler_map.txt')
+ if os.path.exists(handler_map_file):
+ logging.debug('Using handler_map_file: %s' % handler_map_file)
+ start_cmd.append('-m')
+ start_cmd.append(handler_map_file)
+ else:
+ logging.warning('No handler_map_file found')
+
+ if self._use_tls:
+ start_cmd.extend(['-t', '-k', self._private_key,
+ '-c', self._certificate])
+
+ # Put the cygwin directory first in the path to find cygwin1.dll
+ env = os.environ
+ if sys.platform in ('cygwin', 'win32'):
+ env['PATH'] = '%s;%s' % (
+ path_utils.path_from_base('third_party', 'cygwin', 'bin'),
+ env['PATH'])
+
+ if sys.platform == 'win32' and self._register_cygwin:
+ setup_mount = path_utils.path_from_base('third_party', 'cygwin',
+ 'setup_mount.bat')
+ subprocess.Popen(setup_mount).wait()
+
+ env['PYTHONPATH'] = (pywebsocket_base + os.path.pathsep +
+ env.get('PYTHONPATH', ''))
+
+ logging.debug('Starting %s server on %d.' % (
+ self._server_name, self._port))
+ logging.debug('cmdline: %s' % ' '.join(start_cmd))
+ self._process = subprocess.Popen(start_cmd, stdout=self._wsout,
+ stderr=subprocess.STDOUT,
+ env=env)
+
+ # Wait a bit before checking the liveness of the server.
+ time.sleep(0.5)
+
+ if self._use_tls:
+ url = 'https'
+ else:
+ url = 'http'
+ url = url + '://127.0.0.1:%d/' % self._port
+ if not url_is_alive(url):
+ fp = open(output_log)
+ try:
+ for line in fp:
+ logging.error(line)
+ finally:
+ fp.close()
+ raise PyWebSocketNotStarted(
+ 'Failed to start %s server on port %s.' %
+ (self._server_name, self._port))
+
+ # Our process terminated already
+ if self._process.returncode != None:
+ raise PyWebSocketNotStarted(
+ 'Failed to start %s server.' % self._server_name)
+ if self._pidfile:
+ f = open(self._pidfile, 'w')
+ f.write("%d" % self._process.pid)
+ f.close()
+
+ def stop(self, force=False):
+ if not force and not self.is_running():
+ return
+
+ if self._process:
+ pid = self._process.pid
+ elif self._pidfile:
+ f = open(self._pidfile)
+ pid = int(f.read().strip())
+ f.close()
+
+ if not pid:
+ raise PyWebSocketNotFound(
+ 'Failed to find %s server pid.' % self._server_name)
+
+ logging.debug('Shutting down %s server %d.' % (self._server_name, pid))
+ platform_utils.kill_process(pid)
+
+ if self._process:
+ self._process.wait()
+ self._process = None
+
+ if self._wsout:
+ self._wsout.close()
+ self._wsout = None
+
+
+if '__main__' == __name__:
+ # Provide some command line params for starting the PyWebSocket server
+ # manually.
+ option_parser = optparse.OptionParser()
+ option_parser.add_option('--server', type='choice',
+ choices=['start', 'stop'], default='start',
+ help='Server action (start|stop)')
+ option_parser.add_option('-p', '--port', dest='port',
+ default=None, help='Port to listen on')
+ option_parser.add_option('-r', '--root',
+ help='Absolute path to DocumentRoot '
+ '(overrides layout test roots)')
+ option_parser.add_option('-t', '--tls', dest='use_tls',
+ action='store_true',
+ default=False, help='use TLS (wss://)')
+ option_parser.add_option('-k', '--private_key', dest='private_key',
+ default='', help='TLS private key file.')
+ option_parser.add_option('-c', '--certificate', dest='certificate',
+ default='', help='TLS certificate file.')
+ option_parser.add_option('--register_cygwin', action="store_true",
+ dest="register_cygwin",
+ help='Register Cygwin paths (on Win try bots)')
+ option_parser.add_option('--pidfile', help='path to pid file.')
+ options, args = option_parser.parse_args()
+
+ if not options.port:
+ if options.use_tls:
+ options.port = _DEFAULT_WSS_PORT
+ else:
+ options.port = _DEFAULT_WS_PORT
+
+ kwds = {'port': options.port, 'use_tls': options.use_tls}
+ if options.root:
+ kwds['root'] = options.root
+ if options.private_key:
+ kwds['private_key'] = options.private_key
+ if options.certificate:
+ kwds['certificate'] = options.certificate
+ kwds['register_cygwin'] = options.register_cygwin
+ if options.pidfile:
+ kwds['pidfile'] = options.pidfile
+
+ pywebsocket = PyWebSocket(tempfile.gettempdir(), **kwds)
+
+ if 'start' == options.server:
+ pywebsocket.start()
+ else:
+ pywebsocket.stop(force=True)
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py b/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py
new file mode 100644
index 0000000..1db811f
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py
@@ -0,0 +1,1028 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""Rebaselining tool that automatically produces baselines for all platforms.
+
+The script does the following for each platform specified:
+ 1. Compile a list of tests that need rebaselining.
+ 2. Download test result archive from buildbot for the platform.
+ 3. Extract baselines from the archive file for all identified files.
+ 4. Add new baselines to SVN repository.
+ 5. For each test that has been rebaselined, remove this platform option from
+ the test in test_expectation.txt. If no other platforms remain after
+ removal, delete the rebaselined test from the file.
+
+At the end, the script generates a html that compares old and new baselines.
+"""
+
+import logging
+import optparse
+import os
+import re
+import shutil
+import subprocess
+import sys
+import tempfile
+import time
+import urllib
+import webbrowser
+import zipfile
+
+from layout_package import path_utils
+from layout_package import test_expectations
+from test_types import image_diff
+from test_types import text_diff
+
+# Repository type constants.
+REPO_SVN, REPO_UNKNOWN = range(2)
+
+BASELINE_SUFFIXES = ['.txt', '.png', '.checksum']
+REBASELINE_PLATFORM_ORDER = ['mac', 'win', 'win-xp', 'win-vista', 'linux']
+ARCHIVE_DIR_NAME_DICT = {'win': 'webkit-rel',
+ 'win-vista': 'webkit-dbg-vista',
+ 'win-xp': 'webkit-rel',
+ 'mac': 'webkit-rel-mac5',
+ 'linux': 'webkit-rel-linux',
+ 'win-canary': 'webkit-rel-webkit-org',
+ 'win-vista-canary': 'webkit-dbg-vista',
+ 'win-xp-canary': 'webkit-rel-webkit-org',
+ 'mac-canary': 'webkit-rel-mac-webkit-org',
+ 'linux-canary': 'webkit-rel-linux-webkit-org'}
+
+
+def run_shell_with_return_code(command, print_output=False):
+ """Executes a command and returns the output and process return code.
+
+ Args:
+ command: program and arguments.
+ print_output: if true, print the command results to standard output.
+
+ Returns:
+ command output, return code
+ """
+
+ # Use a shell for subcommands on Windows to get a PATH search.
+ use_shell = sys.platform.startswith('win')
+ p = subprocess.Popen(command, stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT, shell=use_shell)
+ if print_output:
+ output_array = []
+ while True:
+ line = p.stdout.readline()
+ if not line:
+ break
+ if print_output:
+ print line.strip('\n')
+ output_array.append(line)
+ output = ''.join(output_array)
+ else:
+ output = p.stdout.read()
+ p.wait()
+ p.stdout.close()
+
+ return output, p.returncode
+
+
+def run_shell(command, print_output=False):
+ """Executes a command and returns the output.
+
+ Args:
+ command: program and arguments.
+ print_output: if true, print the command results to standard output.
+
+ Returns:
+ command output
+ """
+
+ output, return_code = run_shell_with_return_code(command, print_output)
+ return output
+
+
+def log_dashed_string(text, platform, logging_level=logging.INFO):
+ """Log text message with dashes on both sides."""
+
+ msg = text
+ if platform:
+ msg += ': ' + platform
+ if len(msg) < 78:
+ dashes = '-' * ((78 - len(msg)) / 2)
+ msg = '%s %s %s' % (dashes, msg, dashes)
+
+ if logging_level == logging.ERROR:
+ logging.error(msg)
+ elif logging_level == logging.WARNING:
+ logging.warn(msg)
+ else:
+ logging.info(msg)
+
+
+def setup_html_directory(html_directory):
+ """Setup the directory to store html results.
+
+ All html related files are stored in the "rebaseline_html" subdirectory.
+
+ Args:
+ html_directory: parent directory that stores the rebaselining results.
+ If None, a temp directory is created.
+
+ Returns:
+ the directory that stores the html related rebaselining results.
+ """
+
+ if not html_directory:
+ html_directory = tempfile.mkdtemp()
+ elif not os.path.exists(html_directory):
+ os.mkdir(html_directory)
+
+ html_directory = os.path.join(html_directory, 'rebaseline_html')
+ logging.info('Html directory: "%s"', html_directory)
+
+ if os.path.exists(html_directory):
+ shutil.rmtree(html_directory, True)
+ logging.info('Deleted file at html directory: "%s"', html_directory)
+
+ if not os.path.exists(html_directory):
+ os.mkdir(html_directory)
+ return html_directory
+
+
+def get_result_file_fullpath(html_directory, baseline_filename, platform,
+ result_type):
+ """Get full path of the baseline result file.
+
+ Args:
+ html_directory: directory that stores the html related files.
+ baseline_filename: name of the baseline file.
+ platform: win, linux or mac
+ result_type: type of the baseline result: '.txt', '.png'.
+
+ Returns:
+ Full path of the baseline file for rebaselining result comparison.
+ """
+
+ base, ext = os.path.splitext(baseline_filename)
+ result_filename = '%s-%s-%s%s' % (base, platform, result_type, ext)
+ fullpath = os.path.join(html_directory, result_filename)
+ logging.debug(' Result file full path: "%s".', fullpath)
+ return fullpath
+
+
+class Rebaseliner(object):
+ """Class to produce new baselines for a given platform."""
+
+ REVISION_REGEX = r'<a href=\"(\d+)/\">'
+
+ def __init__(self, platform, options):
+ self._file_dir = path_utils.path_from_base('webkit', 'tools',
+ 'layout_tests')
+ self._platform = platform
+ self._options = options
+ self._rebaselining_tests = []
+ self._rebaselined_tests = []
+
+ # Create tests and expectations helper which is used to:
+ # -. compile list of tests that need rebaselining.
+ # -. update the tests in test_expectations file after rebaseline
+ # is done.
+ self._test_expectations = \
+ test_expectations.TestExpectations(None,
+ self._file_dir,
+ platform,
+ False,
+ False)
+
+ self._repo_type = self._get_repo_type()
+
+ def run(self, backup):
+ """Run rebaseline process."""
+
+ log_dashed_string('Compiling rebaselining tests', self._platform)
+ if not self._compile_rebaselining_tests():
+ return True
+
+ log_dashed_string('Downloading archive', self._platform)
+ archive_file = self._download_buildbot_archive()
+ logging.info('')
+ if not archive_file:
+ logging.error('No archive found.')
+ return False
+
+ log_dashed_string('Extracting and adding new baselines',
+ self._platform)
+ if not self._extract_and_add_new_baselines(archive_file):
+ return False
+
+ log_dashed_string('Updating rebaselined tests in file',
+ self._platform)
+ self._update_rebaselined_tests_in_file(backup)
+ logging.info('')
+
+ if len(self._rebaselining_tests) != len(self._rebaselined_tests):
+ logging.warning('NOT ALL TESTS THAT NEED REBASELINING HAVE BEEN '
+ 'REBASELINED.')
+ logging.warning(' Total tests needing rebaselining: %d',
+ len(self._rebaselining_tests))
+ logging.warning(' Total tests rebaselined: %d',
+ len(self._rebaselined_tests))
+ return False
+
+ logging.warning('All tests needing rebaselining were successfully '
+ 'rebaselined.')
+
+ return True
+
+ def get_rebaselining_tests(self):
+ return self._rebaselining_tests
+
+ def _get_repo_type(self):
+ """Get the repository type that client is using."""
+ output, return_code = run_shell_with_return_code(['svn', 'info'],
+ False)
+ if return_code == 0:
+ return REPO_SVN
+
+ return REPO_UNKNOWN
+
+ def _compile_rebaselining_tests(self):
+ """Compile list of tests that need rebaselining for the platform.
+
+ Returns:
+ List of tests that need rebaselining or
+ None if there is no such test.
+ """
+
+ self._rebaselining_tests = \
+ self._test_expectations.get_rebaselining_failures()
+ if not self._rebaselining_tests:
+ logging.warn('No tests found that need rebaselining.')
+ return None
+
+ logging.info('Total number of tests needing rebaselining '
+ 'for "%s": "%d"', self._platform,
+ len(self._rebaselining_tests))
+
+ test_no = 1
+ for test in self._rebaselining_tests:
+ logging.info(' %d: %s', test_no, test)
+ test_no += 1
+
+ return self._rebaselining_tests
+
+ def _get_latest_revision(self, url):
+ """Get the latest layout test revision number from buildbot.
+
+ Args:
+ url: Url to retrieve layout test revision numbers.
+
+ Returns:
+ latest revision or
+ None on failure.
+ """
+
+ logging.debug('Url to retrieve revision: "%s"', url)
+
+ f = urllib.urlopen(url)
+ content = f.read()
+ f.close()
+
+ revisions = re.findall(self.REVISION_REGEX, content)
+ if not revisions:
+ logging.error('Failed to find revision, content: "%s"', content)
+ return None
+
+ revisions.sort(key=int)
+ logging.info('Latest revision: "%s"', revisions[len(revisions) - 1])
+ return revisions[len(revisions) - 1]
+
+ def _get_archive_dir_name(self, platform, webkit_canary):
+ """Get name of the layout test archive directory.
+
+ Returns:
+ Directory name or
+ None on failure
+ """
+
+ if webkit_canary:
+ platform += '-canary'
+
+ if platform in ARCHIVE_DIR_NAME_DICT:
+ return ARCHIVE_DIR_NAME_DICT[platform]
+ else:
+ logging.error('Cannot find platform key %s in archive '
+ 'directory name dictionary', platform)
+ return None
+
+ def _get_archive_url(self):
+ """Generate the url to download latest layout test archive.
+
+ Returns:
+ Url to download archive or
+ None on failure
+ """
+
+ dir_name = self._get_archive_dir_name(self._platform,
+ self._options.webkit_canary)
+ if not dir_name:
+ return None
+
+ logging.debug('Buildbot platform dir name: "%s"', dir_name)
+
+ url_base = '%s/%s/' % (self._options.archive_url, dir_name)
+ latest_revision = self._get_latest_revision(url_base)
+ if latest_revision is None or latest_revision <= 0:
+ return None
+
+ archive_url = ('%s%s/layout-test-results.zip' % (url_base,
+ latest_revision))
+ logging.info('Archive url: "%s"', archive_url)
+ return archive_url
+
+ def _download_buildbot_archive(self):
+ """Download layout test archive file from buildbot.
+
+ Returns:
+ True if download succeeded or
+ False otherwise.
+ """
+
+ url = self._get_archive_url()
+ if url is None:
+ return None
+
+ fn = urllib.urlretrieve(url)[0]
+ logging.info('Archive downloaded and saved to file: "%s"', fn)
+ return fn
+
+ def _extract_and_add_new_baselines(self, archive_file):
+ """Extract new baselines from archive and add them to SVN repository.
+
+ Args:
+ archive_file: full path to the archive file.
+
+ Returns:
+ List of tests that have been rebaselined or
+ None on failure.
+ """
+
+ zip_file = zipfile.ZipFile(archive_file, 'r')
+ zip_namelist = zip_file.namelist()
+
+ logging.debug('zip file namelist:')
+ for name in zip_namelist:
+ logging.debug(' ' + name)
+
+ platform = path_utils.platform_name(self._platform)
+ logging.debug('Platform dir: "%s"', platform)
+
+ test_no = 1
+ self._rebaselined_tests = []
+ for test in self._rebaselining_tests:
+ logging.info('Test %d: %s', test_no, test)
+
+ found = False
+ svn_error = False
+ test_basename = os.path.splitext(test)[0]
+ for suffix in BASELINE_SUFFIXES:
+ archive_test_name = ('layout-test-results/%s-actual%s' %
+ (test_basename, suffix))
+ logging.debug(' Archive test file name: "%s"',
+ archive_test_name)
+ if not archive_test_name in zip_namelist:
+ logging.info(' %s file not in archive.', suffix)
+ continue
+
+ found = True
+ logging.info(' %s file found in archive.', suffix)
+
+ # Extract new baseline from archive and save it to a temp file.
+ data = zip_file.read(archive_test_name)
+ temp_fd, temp_name = tempfile.mkstemp(suffix)
+ f = os.fdopen(temp_fd, 'wb')
+ f.write(data)
+ f.close()
+
+ expected_filename = '%s-expected%s' % (test_basename, suffix)
+ expected_fullpath = os.path.join(
+ path_utils.chromium_baseline_path(platform),
+ expected_filename)
+ expected_fullpath = os.path.normpath(expected_fullpath)
+ logging.debug(' Expected file full path: "%s"',
+ expected_fullpath)
+
+ # TODO(victorw): for now, the rebaselining tool checks whether
+ # or not THIS baseline is duplicate and should be skipped.
+ # We could improve the tool to check all baselines in upper
+ # and lower
+ # levels and remove all duplicated baselines.
+ if self._is_dup_baseline(temp_name,
+ expected_fullpath,
+ test,
+ suffix,
+ self._platform):
+ os.remove(temp_name)
+ self._delete_baseline(expected_fullpath)
+ continue
+
+ # Create the new baseline directory if it doesn't already
+ # exist.
+ path_utils.maybe_make_directory(
+ os.path.dirname(expected_fullpath))
+
+ shutil.move(temp_name, expected_fullpath)
+
+ if not self._svn_add(expected_fullpath):
+ svn_error = True
+ elif suffix != '.checksum':
+ self._create_html_baseline_files(expected_fullpath)
+
+ if not found:
+ logging.warn(' No new baselines found in archive.')
+ else:
+ if svn_error:
+ logging.warn(' Failed to add baselines to SVN.')
+ else:
+ logging.info(' Rebaseline succeeded.')
+ self._rebaselined_tests.append(test)
+
+ test_no += 1
+
+ zip_file.close()
+ os.remove(archive_file)
+
+ return self._rebaselined_tests
+
+ def _is_dup_baseline(self, new_baseline, baseline_path, test, suffix,
+ platform):
+ """Check whether a baseline is duplicate and can fallback to same
+ baseline for another platform. For example, if a test has same
+ baseline on linux and windows, then we only store windows
+ baseline and linux baseline will fallback to the windows version.
+
+ Args:
+ expected_filename: baseline expectation file name.
+ test: test name.
+ suffix: file suffix of the expected results, including dot;
+ e.g. '.txt' or '.png'.
+ platform: baseline platform 'mac', 'win' or 'linux'.
+
+ Returns:
+ True if the baseline is unnecessary.
+ False otherwise.
+ """
+ test_filepath = os.path.join(path_utils.layout_tests_dir(), test)
+ all_baselines = path_utils.expected_baselines(test_filepath,
+ suffix, platform, True)
+ for (fallback_dir, fallback_file) in all_baselines:
+ if fallback_dir and fallback_file:
+ fallback_fullpath = os.path.normpath(
+ os.path.join(fallback_dir, fallback_file))
+ if fallback_fullpath.lower() != baseline_path.lower():
+ if not self._diff_baselines(new_baseline,
+ fallback_fullpath):
+ logging.info(' Found same baseline at %s',
+ fallback_fullpath)
+ return True
+ else:
+ return False
+
+ return False
+
+ def _diff_baselines(self, file1, file2):
+ """Check whether two baselines are different.
+
+ Args:
+ file1, file2: full paths of the baselines to compare.
+
+ Returns:
+ True if two files are different or have different extensions.
+ False otherwise.
+ """
+
+ ext1 = os.path.splitext(file1)[1].upper()
+ ext2 = os.path.splitext(file2)[1].upper()
+ if ext1 != ext2:
+ logging.warn('Files to compare have different ext. '
+ 'File1: %s; File2: %s', file1, file2)
+ return True
+
+ if ext1 == '.PNG':
+ return image_diff.ImageDiff(self._platform, '').diff_files(file1,
+ file2)
+ else:
+ return text_diff.TestTextDiff(self._platform, '').diff_files(file1,
+ file2)
+
+ def _delete_baseline(self, filename):
+ """Remove the file from repository and delete it from disk.
+
+ Args:
+ filename: full path of the file to delete.
+ """
+
+ if not filename or not os.path.isfile(filename):
+ return
+
+ if self._repo_type == REPO_SVN:
+ parent_dir, basename = os.path.split(filename)
+ original_dir = os.getcwd()
+ os.chdir(parent_dir)
+ run_shell(['svn', 'delete', '--force', basename], False)
+ os.chdir(original_dir)
+ else:
+ os.remove(filename)
+
+ def _update_rebaselined_tests_in_file(self, backup):
+ """Update the rebaselined tests in test expectations file.
+
+ Args:
+ backup: if True, backup the original test expectations file.
+
+ Returns:
+ no
+ """
+
+ if self._rebaselined_tests:
+ self._test_expectations.remove_platform_from_file(
+ self._rebaselined_tests, self._platform, backup)
+ else:
+ logging.info('No test was rebaselined so nothing to remove.')
+
+ def _svn_add(self, filename):
+ """Add the file to SVN repository.
+
+ Args:
+ filename: full path of the file to add.
+
+ Returns:
+ True if the file already exists in SVN or is sucessfully added
+ to SVN.
+ False otherwise.
+ """
+
+ if not filename:
+ return False
+
+ parent_dir, basename = os.path.split(filename)
+ if self._repo_type != REPO_SVN or parent_dir == filename:
+ logging.info("No svn checkout found, skip svn add.")
+ return True
+
+ original_dir = os.getcwd()
+ os.chdir(parent_dir)
+ status_output = run_shell(['svn', 'status', basename], False)
+ os.chdir(original_dir)
+ output = status_output.upper()
+ if output.startswith('A') or output.startswith('M'):
+ logging.info(' File already added to SVN: "%s"', filename)
+ return True
+
+ if output.find('IS NOT A WORKING COPY') >= 0:
+ logging.info(' File is not a working copy, add its parent: "%s"',
+ parent_dir)
+ return self._svn_add(parent_dir)
+
+ os.chdir(parent_dir)
+ add_output = run_shell(['svn', 'add', basename], True)
+ os.chdir(original_dir)
+ output = add_output.upper().rstrip()
+ if output.startswith('A') and output.find(basename.upper()) >= 0:
+ logging.info(' Added new file: "%s"', filename)
+ self._svn_prop_set(filename)
+ return True
+
+ if (not status_output) and (add_output.upper().find(
+ 'ALREADY UNDER VERSION CONTROL') >= 0):
+ logging.info(' File already under SVN and has no change: "%s"',
+ filename)
+ return True
+
+ logging.warn(' Failed to add file to SVN: "%s"', filename)
+ logging.warn(' Svn status output: "%s"', status_output)
+ logging.warn(' Svn add output: "%s"', add_output)
+ return False
+
+ def _svn_prop_set(self, filename):
+ """Set the baseline property
+
+ Args:
+ filename: full path of the file to add.
+
+ Returns:
+ True if the file already exists in SVN or is sucessfully added
+ to SVN.
+ False otherwise.
+ """
+ ext = os.path.splitext(filename)[1].upper()
+ if ext != '.TXT' and ext != '.PNG' and ext != '.CHECKSUM':
+ return
+
+ parent_dir, basename = os.path.split(filename)
+ original_dir = os.getcwd()
+ os.chdir(parent_dir)
+ if ext == '.PNG':
+ cmd = ['svn', 'pset', 'svn:mime-type', 'image/png', basename]
+ else:
+ cmd = ['svn', 'pset', 'svn:eol-style', 'LF', basename]
+
+ logging.debug(' Set svn prop: %s', ' '.join(cmd))
+ run_shell(cmd, False)
+ os.chdir(original_dir)
+
+ def _create_html_baseline_files(self, baseline_fullpath):
+ """Create baseline files (old, new and diff) in html directory.
+
+ The files are used to compare the rebaselining results.
+
+ Args:
+ baseline_fullpath: full path of the expected baseline file.
+ """
+
+ if not baseline_fullpath or not os.path.exists(baseline_fullpath):
+ return
+
+ # Copy the new baseline to html directory for result comparison.
+ baseline_filename = os.path.basename(baseline_fullpath)
+ new_file = get_result_file_fullpath(self._options.html_directory,
+ baseline_filename, self._platform,
+ 'new')
+ shutil.copyfile(baseline_fullpath, new_file)
+ logging.info(' Html: copied new baseline file from "%s" to "%s".',
+ baseline_fullpath, new_file)
+
+ # Get the old baseline from SVN and save to the html directory.
+ output = run_shell(['svn', 'cat', '-r', 'BASE', baseline_fullpath])
+ if (not output) or (output.upper().rstrip().endswith(
+ 'NO SUCH FILE OR DIRECTORY')):
+ logging.info(' No base file: "%s"', baseline_fullpath)
+ return
+ base_file = get_result_file_fullpath(self._options.html_directory,
+ baseline_filename, self._platform,
+ 'old')
+ f = open(base_file, 'wb')
+ f.write(output)
+ f.close()
+ logging.info(' Html: created old baseline file: "%s".',
+ base_file)
+
+ # Get the diff between old and new baselines and save to the html dir.
+ if baseline_filename.upper().endswith('.TXT'):
+ # If the user specified a custom diff command in their svn config
+ # file, then it'll be used when we do svn diff, which we don't want
+ # to happen since we want the unified diff. Using --diff-cmd=diff
+ # doesn't always work, since they can have another diff executable
+ # in their path that gives different line endings. So we use a
+ # bogus temp directory as the config directory, which gets
+ # around these problems.
+ if sys.platform.startswith("win"):
+ parent_dir = tempfile.gettempdir()
+ else:
+ parent_dir = sys.path[0] # tempdir is not secure.
+ bogus_dir = os.path.join(parent_dir, "temp_svn_config")
+ logging.debug(' Html: temp config dir: "%s".', bogus_dir)
+ if not os.path.exists(bogus_dir):
+ os.mkdir(bogus_dir)
+ delete_bogus_dir = True
+ else:
+ delete_bogus_dir = False
+
+ output = run_shell(["svn", "diff", "--config-dir", bogus_dir,
+ baseline_fullpath])
+ if output:
+ diff_file = get_result_file_fullpath(
+ self._options.html_directory, baseline_filename,
+ self._platform, 'diff')
+ f = open(diff_file, 'wb')
+ f.write(output)
+ f.close()
+ logging.info(' Html: created baseline diff file: "%s".',
+ diff_file)
+
+ if delete_bogus_dir:
+ shutil.rmtree(bogus_dir, True)
+ logging.debug(' Html: removed temp config dir: "%s".',
+ bogus_dir)
+
+
+class HtmlGenerator(object):
+ """Class to generate rebaselining result comparison html."""
+
+ HTML_REBASELINE = ('<html>'
+ '<head>'
+ '<style>'
+ 'body {font-family: sans-serif;}'
+ '.mainTable {background: #666666;}'
+ '.mainTable td , .mainTable th {background: white;}'
+ '.detail {margin-left: 10px; margin-top: 3px;}'
+ '</style>'
+ '<title>Rebaselining Result Comparison (%(time)s)'
+ '</title>'
+ '</head>'
+ '<body>'
+ '<h2>Rebaselining Result Comparison (%(time)s)</h2>'
+ '%(body)s'
+ '</body>'
+ '</html>')
+ HTML_NO_REBASELINING_TESTS = (
+ '<p>No tests found that need rebaselining.</p>')
+ HTML_TABLE_TEST = ('<table class="mainTable" cellspacing=1 cellpadding=5>'
+ '%s</table><br>')
+ HTML_TR_TEST = ('<tr>'
+ '<th style="background-color: #CDECDE; border-bottom: '
+ '1px solid black; font-size: 18pt; font-weight: bold" '
+ 'colspan="5">'
+ '<a href="%s">%s</a>'
+ '</th>'
+ '</tr>')
+ HTML_TEST_DETAIL = ('<div class="detail">'
+ '<tr>'
+ '<th width="100">Baseline</th>'
+ '<th width="100">Platform</th>'
+ '<th width="200">Old</th>'
+ '<th width="200">New</th>'
+ '<th width="150">Difference</th>'
+ '</tr>'
+ '%s'
+ '</div>')
+ HTML_TD_NOLINK = '<td align=center><a>%s</a></td>'
+ HTML_TD_LINK = '<td align=center><a href="%(uri)s">%(name)s</a></td>'
+ HTML_TD_LINK_IMG = ('<td><a href="%(uri)s">'
+ '<img style="width: 200" src="%(uri)s" /></a></td>')
+ HTML_TR = '<tr>%s</tr>'
+
+ def __init__(self, options, platforms, rebaselining_tests):
+ self._html_directory = options.html_directory
+ self._platforms = platforms
+ self._rebaselining_tests = rebaselining_tests
+ self._html_file = os.path.join(options.html_directory,
+ 'rebaseline.html')
+
+ def generate_html(self):
+ """Generate html file for rebaselining result comparison."""
+
+ logging.info('Generating html file')
+
+ html_body = ''
+ if not self._rebaselining_tests:
+ html_body += self.HTML_NO_REBASELINING_TESTS
+ else:
+ tests = list(self._rebaselining_tests)
+ tests.sort()
+
+ test_no = 1
+ for test in tests:
+ logging.info('Test %d: %s', test_no, test)
+ html_body += self._generate_html_for_one_test(test)
+
+ html = self.HTML_REBASELINE % ({'time': time.asctime(),
+ 'body': html_body})
+ logging.debug(html)
+
+ f = open(self._html_file, 'w')
+ f.write(html)
+ f.close()
+
+ logging.info('Baseline comparison html generated at "%s"',
+ self._html_file)
+
+ def show_html(self):
+ """Launch the rebaselining html in brwoser."""
+
+ logging.info('Launching html: "%s"', self._html_file)
+
+ html_uri = path_utils.filename_to_uri(self._html_file)
+ webbrowser.open(html_uri, 1)
+
+ logging.info('Html launched.')
+
+ def _generate_baseline_links(self, test_basename, suffix, platform):
+ """Generate links for baseline results (old, new and diff).
+
+ Args:
+ test_basename: base filename of the test
+ suffix: baseline file suffixes: '.txt', '.png'
+ platform: win, linux or mac
+
+ Returns:
+ html links for showing baseline results (old, new and diff)
+ """
+
+ baseline_filename = '%s-expected%s' % (test_basename, suffix)
+ logging.debug(' baseline filename: "%s"', baseline_filename)
+
+ new_file = get_result_file_fullpath(self._html_directory,
+ baseline_filename, platform, 'new')
+ logging.info(' New baseline file: "%s"', new_file)
+ if not os.path.exists(new_file):
+ logging.info(' No new baseline file: "%s"', new_file)
+ return ''
+
+ old_file = get_result_file_fullpath(self._html_directory,
+ baseline_filename, platform, 'old')
+ logging.info(' Old baseline file: "%s"', old_file)
+ if suffix == '.png':
+ html_td_link = self.HTML_TD_LINK_IMG
+ else:
+ html_td_link = self.HTML_TD_LINK
+
+ links = ''
+ if os.path.exists(old_file):
+ links += html_td_link % {
+ 'uri': path_utils.filename_to_uri(old_file),
+ 'name': baseline_filename}
+ else:
+ logging.info(' No old baseline file: "%s"', old_file)
+ links += self.HTML_TD_NOLINK % ''
+
+ links += html_td_link % {'uri': path_utils.filename_to_uri(new_file),
+ 'name': baseline_filename}
+
+ diff_file = get_result_file_fullpath(self._html_directory,
+ baseline_filename, platform,
+ 'diff')
+ logging.info(' Baseline diff file: "%s"', diff_file)
+ if os.path.exists(diff_file):
+ links += html_td_link % {'uri': path_utils.filename_to_uri(
+ diff_file), 'name': 'Diff'}
+ else:
+ logging.info(' No baseline diff file: "%s"', diff_file)
+ links += self.HTML_TD_NOLINK % ''
+
+ return links
+
+ def _generate_html_for_one_test(self, test):
+ """Generate html for one rebaselining test.
+
+ Args:
+ test: layout test name
+
+ Returns:
+ html that compares baseline results for the test.
+ """
+
+ test_basename = os.path.basename(os.path.splitext(test)[0])
+ logging.info(' basename: "%s"', test_basename)
+ rows = []
+ for suffix in BASELINE_SUFFIXES:
+ if suffix == '.checksum':
+ continue
+
+ logging.info(' Checking %s files', suffix)
+ for platform in self._platforms:
+ links = self._generate_baseline_links(test_basename, suffix,
+ platform)
+ if links:
+ row = self.HTML_TD_NOLINK % self._get_baseline_result_type(
+ suffix)
+ row += self.HTML_TD_NOLINK % platform
+ row += links
+ logging.debug(' html row: %s', row)
+
+ rows.append(self.HTML_TR % row)
+
+ if rows:
+ test_path = os.path.join(path_utils.layout_tests_dir(), test)
+ html = self.HTML_TR_TEST % (path_utils.filename_to_uri(test_path),
+ test)
+ html += self.HTML_TEST_DETAIL % ' '.join(rows)
+
+ logging.debug(' html for test: %s', html)
+ return self.HTML_TABLE_TEST % html
+
+ return ''
+
+ def _get_baseline_result_type(self, suffix):
+ """Name of the baseline result type."""
+
+ if suffix == '.png':
+ return 'Pixel'
+ elif suffix == '.txt':
+ return 'Render Tree'
+ else:
+ return 'Other'
+
+
+def main():
+ """Main function to produce new baselines."""
+
+ option_parser = optparse.OptionParser()
+ option_parser.add_option('-v', '--verbose',
+ action='store_true',
+ default=False,
+ help='include debug-level logging.')
+
+ option_parser.add_option('-p', '--platforms',
+ default='mac,win,win-xp,win-vista,linux',
+ help=('Comma delimited list of platforms '
+ 'that need rebaselining.'))
+
+ option_parser.add_option('-u', '--archive_url',
+ default=('http://build.chromium.org/buildbot/'
+ 'layout_test_results'),
+ help=('Url to find the layout test result archive'
+ ' file.'))
+
+ option_parser.add_option('-w', '--webkit_canary',
+ action='store_true',
+ default=False,
+ help=('If True, pull baselines from webkit.org '
+ 'canary bot.'))
+
+ option_parser.add_option('-b', '--backup',
+ action='store_true',
+ default=False,
+ help=('Whether or not to backup the original test'
+ ' expectations file after rebaseline.'))
+
+ option_parser.add_option('-d', '--html_directory',
+ default='',
+ help=('The directory that stores the results for'
+ ' rebaselining comparison.'))
+
+ options = option_parser.parse_args()[0]
+
+ # Set up our logging format.
+ log_level = logging.INFO
+ if options.verbose:
+ log_level = logging.DEBUG
+ logging.basicConfig(level=log_level,
+ format=('%(asctime)s %(filename)s:%(lineno)-3d '
+ '%(levelname)s %(message)s'),
+ datefmt='%y%m%d %H:%M:%S')
+
+ # Verify 'platforms' option is valid
+ if not options.platforms:
+ logging.error('Invalid "platforms" option. --platforms must be '
+ 'specified in order to rebaseline.')
+ sys.exit(1)
+ platforms = [p.strip().lower() for p in options.platforms.split(',')]
+ for platform in platforms:
+ if not platform in REBASELINE_PLATFORM_ORDER:
+ logging.error('Invalid platform: "%s"' % (platform))
+ sys.exit(1)
+
+ # Adjust the platform order so rebaseline tool is running at the order of
+ # 'mac', 'win' and 'linux'. This is in same order with layout test baseline
+ # search paths. It simplifies how the rebaseline tool detects duplicate
+ # baselines. Check _IsDupBaseline method for details.
+ rebaseline_platforms = []
+ for platform in REBASELINE_PLATFORM_ORDER:
+ if platform in platforms:
+ rebaseline_platforms.append(platform)
+
+ options.html_directory = setup_html_directory(options.html_directory)
+
+ rebaselining_tests = set()
+ backup = options.backup
+ for platform in rebaseline_platforms:
+ rebaseliner = Rebaseliner(platform, options)
+
+ logging.info('')
+ log_dashed_string('Rebaseline started', platform)
+ if rebaseliner.run(backup):
+ # Only need to backup one original copy of test expectation file.
+ backup = False
+ log_dashed_string('Rebaseline done', platform)
+ else:
+ log_dashed_string('Rebaseline failed', platform, logging.ERROR)
+
+ rebaselining_tests |= set(rebaseliner.get_rebaselining_tests())
+
+ logging.info('')
+ log_dashed_string('Rebaselining result comparison started', None)
+ html_generator = HtmlGenerator(options,
+ rebaseline_platforms,
+ rebaselining_tests)
+ html_generator.generate_html()
+ html_generator.show_html()
+ log_dashed_string('Rebaselining result comparison done', None)
+
+ sys.exit(0)
+
+if '__main__' == __name__:
+ main()
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/run_chromium_webkit_tests.py b/WebKitTools/Scripts/webkitpy/layout_tests/run_chromium_webkit_tests.py
new file mode 100755
index 0000000..88b97f8
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/run_chromium_webkit_tests.py
@@ -0,0 +1,1697 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""Run layout tests using the test_shell.
+
+This is a port of the existing webkit test script run-webkit-tests.
+
+The TestRunner class runs a series of tests (TestType interface) against a set
+of test files. If a test file fails a TestType, it returns a list TestFailure
+objects to the TestRunner. The TestRunner then aggregates the TestFailures to
+create a final report.
+
+This script reads several files, if they exist in the test_lists subdirectory
+next to this script itself. Each should contain a list of paths to individual
+tests or entire subdirectories of tests, relative to the outermost test
+directory. Entire lines starting with '//' (comments) will be ignored.
+
+For details of the files' contents and purposes, see test_lists/README.
+"""
+
+import errno
+import glob
+import logging
+import math
+import optparse
+import os
+import Queue
+import random
+import re
+import shutil
+import subprocess
+import sys
+import time
+import traceback
+
+from layout_package import apache_http_server
+from layout_package import test_expectations
+from layout_package import http_server
+from layout_package import json_layout_results_generator
+from layout_package import metered_stream
+from layout_package import path_utils
+from layout_package import platform_utils
+from layout_package import test_failures
+from layout_package import test_shell_thread
+from layout_package import test_files
+from layout_package import websocket_server
+from test_types import fuzzy_image_diff
+from test_types import image_diff
+from test_types import test_type_base
+from test_types import text_diff
+
+sys.path.append(path_utils.path_from_base('third_party'))
+import simplejson
+
+# Indicates that we want detailed progress updates in the output (prints
+# directory-by-directory feedback).
+LOG_DETAILED_PROGRESS = 'detailed-progress'
+
+# Log any unexpected results while running (instead of just at the end).
+LOG_UNEXPECTED = 'unexpected'
+
+# Builder base URL where we have the archived test results.
+BUILDER_BASE_URL = "http://build.chromium.org/buildbot/layout_test_results/"
+
+TestExpectationsFile = test_expectations.TestExpectationsFile
+
+
+class TestInfo:
+ """Groups information about a test for easy passing of data."""
+
+ def __init__(self, filename, timeout):
+ """Generates the URI and stores the filename and timeout for this test.
+ Args:
+ filename: Full path to the test.
+ timeout: Timeout for running the test in TestShell.
+ """
+ self.filename = filename
+ self.uri = path_utils.filename_to_uri(filename)
+ self.timeout = timeout
+ expected_hash_file = path_utils.expected_filename(filename,
+ '.checksum')
+ try:
+ self.image_hash = open(expected_hash_file, "r").read()
+ except IOError, e:
+ if errno.ENOENT != e.errno:
+ raise
+ self.image_hash = None
+
+
+class ResultSummary(object):
+ """A class for partitioning the test results we get into buckets.
+
+ This class is basically a glorified struct and it's private to this file
+ so we don't bother with any information hiding."""
+
+ def __init__(self, expectations, test_files):
+ self.total = len(test_files)
+ self.remaining = self.total
+ self.expectations = expectations
+ self.expected = 0
+ self.unexpected = 0
+ self.tests_by_expectation = {}
+ self.tests_by_timeline = {}
+ self.results = {}
+ self.unexpected_results = {}
+ self.failures = {}
+ self.tests_by_expectation[test_expectations.SKIP] = set()
+ for expectation in TestExpectationsFile.EXPECTATIONS.values():
+ self.tests_by_expectation[expectation] = set()
+ for timeline in TestExpectationsFile.TIMELINES.values():
+ self.tests_by_timeline[timeline] = (
+ expectations.get_tests_with_timeline(timeline))
+
+ def add(self, test, failures, result, expected):
+ """Add a result into the appropriate bin.
+
+ Args:
+ test: test file name
+ failures: list of failure objects from test execution
+ result: result of test (PASS, IMAGE, etc.).
+ expected: whether the result was what we expected it to be.
+ """
+
+ self.tests_by_expectation[result].add(test)
+ self.results[test] = result
+ self.remaining -= 1
+ if len(failures):
+ self.failures[test] = failures
+ if expected:
+ self.expected += 1
+ else:
+ self.unexpected_results[test] = result
+ self.unexpected += 1
+
+
+class TestRunner:
+ """A class for managing running a series of tests on a series of layout
+ test files."""
+
+ HTTP_SUBDIR = os.sep.join(['', 'http', ''])
+ WEBSOCKET_SUBDIR = os.sep.join(['', 'websocket', ''])
+
+ # The per-test timeout in milliseconds, if no --time-out-ms option was
+ # given to run_webkit_tests. This should correspond to the default timeout
+ # in test_shell.exe.
+ DEFAULT_TEST_TIMEOUT_MS = 6 * 1000
+
+ NUM_RETRY_ON_UNEXPECTED_FAILURE = 1
+
+ def __init__(self, options, meter):
+ """Initialize test runner data structures.
+
+ Args:
+ options: a dictionary of command line options
+ meter: a MeteredStream object to record updates to.
+ """
+ self._options = options
+ self._meter = meter
+
+ if options.use_apache:
+ self._http_server = apache_http_server.LayoutTestApacheHttpd(
+ options.results_directory)
+ else:
+ self._http_server = http_server.Lighttpd(options.results_directory)
+
+ self._websocket_server = websocket_server.PyWebSocket(
+ options.results_directory)
+ # disable wss server. need to install pyOpenSSL on buildbots.
+ # self._websocket_secure_server = websocket_server.PyWebSocket(
+ # options.results_directory, use_tls=True, port=9323)
+
+ # a list of TestType objects
+ self._test_types = []
+
+ # a set of test files, and the same tests as a list
+ self._test_files = set()
+ self._test_files_list = None
+ self._file_dir = path_utils.path_from_base('webkit', 'tools',
+ 'layout_tests')
+ self._result_queue = Queue.Queue()
+
+ # These are used for --log detailed-progress to track status by
+ # directory.
+ self._current_dir = None
+ self._current_progress_str = ""
+ self._current_test_number = 0
+
+ def __del__(self):
+ logging.debug("flushing stdout")
+ sys.stdout.flush()
+ logging.debug("flushing stderr")
+ sys.stderr.flush()
+ logging.debug("stopping http server")
+ # Stop the http server.
+ self._http_server.stop()
+ # Stop the Web Socket / Web Socket Secure servers.
+ self._websocket_server.stop()
+ # self._websocket_secure_server.Stop()
+
+ def gather_file_paths(self, paths):
+ """Find all the files to test.
+
+ Args:
+ paths: a list of globs to use instead of the defaults."""
+ self._test_files = test_files.gather_test_files(paths)
+
+ def parse_expectations(self, platform, 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
+ invalid syntax."""
+ if self._options.lint_test_files:
+ test_files = None
+ else:
+ test_files = self._test_files
+
+ try:
+ self._expectations = test_expectations.TestExpectations(test_files,
+ self._file_dir, platform, is_debug_mode,
+ self._options.lint_test_files)
+ return self._expectations
+ except Exception, err:
+ if self._options.lint_test_files:
+ print str(err)
+ else:
+ raise err
+
+ def prepare_lists_and_print_output(self, write):
+ """Create appropriate subsets of test lists and returns a
+ ResultSummary object. Also prints expected test counts.
+
+ Args:
+ write: A callback to write info to (e.g., a LoggingWriter) or
+ sys.stdout.write.
+ """
+
+ # Remove skipped - both fixable and ignored - files from the
+ # top-level list of files to test.
+ num_all_test_files = len(self._test_files)
+ write("Found: %d tests" % (len(self._test_files)))
+ skipped = set()
+ if num_all_test_files > 1 and not self._options.force:
+ skipped = self._expectations.get_tests_with_result_type(
+ test_expectations.SKIP)
+ self._test_files -= skipped
+
+ # Create a sorted list of test files so the subset chunk,
+ # if used, contains alphabetically consecutive tests.
+ self._test_files_list = list(self._test_files)
+ if self._options.randomize_order:
+ random.shuffle(self._test_files_list)
+ else:
+ self._test_files_list.sort()
+
+ # If the user specifies they just want to run a subset of the tests,
+ # just grab a subset of the non-skipped tests.
+ if self._options.run_chunk or self._options.run_part:
+ chunk_value = self._options.run_chunk or self._options.run_part
+ test_files = self._test_files_list
+ try:
+ (chunk_num, chunk_len) = chunk_value.split(":")
+ chunk_num = int(chunk_num)
+ assert(chunk_num >= 0)
+ test_size = int(chunk_len)
+ assert(test_size > 0)
+ except:
+ logging.critical("invalid chunk '%s'" % chunk_value)
+ sys.exit(1)
+
+ # Get the number of tests
+ num_tests = len(test_files)
+
+ # Get the start offset of the slice.
+ if self._options.run_chunk:
+ chunk_len = test_size
+ # In this case chunk_num can be really large. We need
+ # to make the slave fit in the current number of tests.
+ slice_start = (chunk_num * chunk_len) % num_tests
+ else:
+ # Validate the data.
+ assert(test_size <= num_tests)
+ assert(chunk_num <= test_size)
+
+ # To count the chunk_len, and make sure we don't skip
+ # some tests, we round to the next value that fits exactly
+ # all the parts.
+ rounded_tests = num_tests
+ if rounded_tests % test_size != 0:
+ rounded_tests = (num_tests + test_size -
+ (num_tests % test_size))
+
+ chunk_len = rounded_tests / test_size
+ slice_start = chunk_len * (chunk_num - 1)
+ # It does not mind if we go over test_size.
+
+ # Get the end offset of the slice.
+ slice_end = min(num_tests, slice_start + chunk_len)
+
+ files = test_files[slice_start:slice_end]
+
+ tests_run_msg = 'Running: %d tests (chunk slice [%d:%d] of %d)' % (
+ (slice_end - slice_start), slice_start, slice_end, num_tests)
+ write(tests_run_msg)
+
+ # If we reached the end and we don't have enough tests, we run some
+ # from the beginning.
+ if (self._options.run_chunk and
+ (slice_end - slice_start < chunk_len)):
+ extra = 1 + chunk_len - (slice_end - slice_start)
+ extra_msg = (' last chunk is partial, appending [0:%d]' %
+ extra)
+ write(extra_msg)
+ tests_run_msg += "\n" + extra_msg
+ files.extend(test_files[0:extra])
+ tests_run_filename = os.path.join(self._options.results_directory,
+ "tests_run.txt")
+ tests_run_file = open(tests_run_filename, "w")
+ tests_run_file.write(tests_run_msg + "\n")
+ tests_run_file.close()
+
+ len_skip_chunk = int(len(files) * len(skipped) /
+ float(len(self._test_files)))
+ skip_chunk_list = list(skipped)[0:len_skip_chunk]
+ skip_chunk = set(skip_chunk_list)
+
+ # Update expectations so that the stats are calculated correctly.
+ # We need to pass a list that includes the right # of skipped files
+ # to ParseExpectations so that ResultSummary() will get the correct
+ # stats. So, we add in the subset of skipped files, and then
+ # subtract them back out.
+ self._test_files_list = files + skip_chunk_list
+ self._test_files = set(self._test_files_list)
+
+ self._expectations = self.parse_expectations(
+ path_utils.platform_name(), self._options.target == 'Debug')
+
+ self._test_files = set(files)
+ self._test_files_list = files
+ else:
+ skip_chunk = skipped
+
+ result_summary = ResultSummary(self._expectations,
+ self._test_files | skip_chunk)
+ self._print_expected_results_of_type(write, result_summary,
+ test_expectations.PASS, "passes")
+ self._print_expected_results_of_type(write, result_summary,
+ test_expectations.FAIL, "failures")
+ self._print_expected_results_of_type(write, result_summary,
+ test_expectations.FLAKY, "flaky")
+ self._print_expected_results_of_type(write, result_summary,
+ test_expectations.SKIP, "skipped")
+
+
+ if self._options.force:
+ write('Running all tests, including skips (--force)')
+ else:
+ # Note that we don't actually run the skipped tests (they were
+ # subtracted out of self._test_files, above), but we stub out the
+ # results here so the statistics can remain accurate.
+ for test in skip_chunk:
+ result_summary.add(test, [], test_expectations.SKIP,
+ expected=True)
+ write("")
+
+ 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."""
+ index = test_file.rfind(os.sep + 'LayoutTests' + os.sep)
+
+ test_file = test_file[index + len('LayoutTests/'):]
+ test_file_parts = test_file.split(os.sep, 1)
+ directory = test_file_parts[0]
+ test_file = test_file_parts[1]
+
+ # The http tests are very stable on mac/linux.
+ # TODO(ojan): Make the http server on Windows be apache so we can
+ # turn shard the http tests there as well. Switching to apache is
+ # what made them stable on linux/mac.
+ return_value = directory
+ while ((directory != 'http' or sys.platform in ('darwin', 'linux2'))
+ and test_file.find(os.sep) >= 0):
+ test_file_parts = test_file.split(os.sep, 1)
+ directory = test_file_parts[0]
+ return_value = os.path.join(return_value, directory)
+ test_file = test_file_parts[1]
+
+ return return_value
+
+ def _get_test_info_for_file(self, test_file):
+ """Returns the appropriate TestInfo object for the file. Mostly this
+ is used for looking up the timeout value (in ms) to use for the given
+ test."""
+ if self._expectations.has_modifier(test_file, test_expectations.SLOW):
+ return TestInfo(test_file, self._options.slow_time_out_ms)
+ return TestInfo(test_file, self._options.time_out_ms)
+
+ def _get_test_file_queue(self, test_files):
+ """Create the thread safe queue of lists of (test filenames, test URIs)
+ tuples. Each TestShellThread pulls a list from this queue and runs
+ those tests in order before grabbing the next available list.
+
+ Shard the lists by directory. This helps ensure that tests that depend
+ on each other (aka bad tests!) continue to run together as most
+ cross-tests dependencies tend to occur within the same directory.
+
+ Return:
+ The Queue of lists of TestInfo objects.
+ """
+
+ if (self._options.experimental_fully_parallel or
+ self._is_single_threaded()):
+ filename_queue = Queue.Queue()
+ for test_file in test_files:
+ filename_queue.put(
+ ('.', [self._get_test_info_for_file(test_file)]))
+ return filename_queue
+
+ tests_by_dir = {}
+ for test_file in test_files:
+ directory = self._get_dir_for_test_file(test_file)
+ tests_by_dir.setdefault(directory, [])
+ tests_by_dir[directory].append(
+ self._get_test_info_for_file(test_file))
+
+ # Sort by the number of tests in the dir so that the ones with the
+ # most tests get run first in order to maximize parallelization.
+ # Number of tests is a good enough, but not perfect, approximation
+ # of how long that set of tests will take to run. We can't just use
+ # a PriorityQueue until we move # to Python 2.6.
+ test_lists = []
+ http_tests = None
+ for directory in tests_by_dir:
+ test_list = tests_by_dir[directory]
+ # Keep the tests in alphabetical order.
+ # TODO: Remove once tests are fixed so they can be run in any
+ # order.
+ test_list.reverse()
+ test_list_tuple = (directory, test_list)
+ if directory == 'LayoutTests' + os.sep + 'http':
+ http_tests = test_list_tuple
+ else:
+ test_lists.append(test_list_tuple)
+ test_lists.sort(lambda a, b: cmp(len(b[1]), len(a[1])))
+
+ # Put the http tests first. There are only a couple hundred of them,
+ # but each http test takes a very long time to run, so sorting by the
+ # number of tests doesn't accurately capture how long they take to run.
+ if http_tests:
+ test_lists.insert(0, http_tests)
+
+ filename_queue = Queue.Queue()
+ for item in test_lists:
+ filename_queue.put(item)
+ return filename_queue
+
+ def _get_test_shell_args(self, index):
+ """Returns the tuple of arguments for tests and for test_shell."""
+ shell_args = []
+ test_args = test_type_base.TestArguments()
+ if not self._options.no_pixel_tests:
+ png_path = os.path.join(self._options.results_directory,
+ "png_result%s.png" % index)
+ shell_args.append("--pixel-tests=" + png_path)
+ test_args.png_path = png_path
+
+ test_args.new_baseline = self._options.new_baseline
+
+ test_args.show_sources = self._options.sources
+
+ if self._options.startup_dialog:
+ shell_args.append('--testshell-startup-dialog')
+
+ if self._options.gp_fault_error_box:
+ shell_args.append('--gp-fault-error-box')
+
+ return (test_args, shell_args)
+
+ def _contains_tests(self, subdir):
+ for test_file in self._test_files_list:
+ if test_file.find(subdir) >= 0:
+ return True
+ return False
+
+ def _instantiate_test_shell_threads(self, test_shell_binary, test_files,
+ result_summary):
+ """Instantitates and starts the TestShellThread(s).
+
+ Return:
+ The list of threads.
+ """
+ test_shell_command = [test_shell_binary]
+
+ if self._options.wrapper:
+ # This split() isn't really what we want -- it incorrectly will
+ # split quoted strings within the wrapper argument -- but in
+ # practice it shouldn't come up and the --help output warns
+ # about it anyway.
+ test_shell_command = (self._options.wrapper.split() +
+ test_shell_command)
+
+ filename_queue = self._get_test_file_queue(test_files)
+
+ # Instantiate TestShellThreads and start them.
+ threads = []
+ for i in xrange(int(self._options.num_test_shells)):
+ # Create separate TestTypes instances for each thread.
+ test_types = []
+ for t in self._test_types:
+ test_types.append(t(self._options.platform,
+ self._options.results_directory))
+
+ test_args, shell_args = self._get_test_shell_args(i)
+ thread = test_shell_thread.TestShellThread(filename_queue,
+ self._result_queue,
+ test_shell_command,
+ test_types,
+ test_args,
+ shell_args,
+ self._options)
+ if self._is_single_threaded():
+ thread.run_in_main_thread(self, result_summary)
+ else:
+ thread.start()
+ threads.append(thread)
+
+ return threads
+
+ def _stop_layout_test_helper(self, proc):
+ """Stop the layout test helper and closes it down."""
+ if proc:
+ logging.debug("Stopping layout test helper")
+ proc.stdin.write("x\n")
+ proc.stdin.close()
+ proc.wait()
+
+ def _is_single_threaded(self):
+ """Returns whether we should run all the tests in the main thread."""
+ return int(self._options.num_test_shells) == 1
+
+ def _run_tests(self, test_shell_binary, file_list, result_summary):
+ """Runs the tests in the file_list.
+
+ Return: A tuple (failures, thread_timings, test_timings,
+ individual_test_timings)
+ failures is a map from test to list of failure types
+ thread_timings is a list of dicts with the total runtime
+ of each thread with 'name', 'num_tests', 'total_time' properties
+ test_timings is a list of timings for each sharded subdirectory
+ of the form [time, directory_name, num_tests]
+ individual_test_timings is a list of run times for each test
+ in the form {filename:filename, test_run_time:test_run_time}
+ result_summary: summary object to populate with the results
+ """
+ threads = self._instantiate_test_shell_threads(test_shell_binary,
+ file_list,
+ result_summary)
+
+ # Wait for the threads to finish and collect test failures.
+ failures = {}
+ test_timings = {}
+ individual_test_timings = []
+ thread_timings = []
+ try:
+ for thread in threads:
+ while thread.isAlive():
+ # Let it timeout occasionally so it can notice a
+ # KeyboardInterrupt. Actually, the timeout doesn't
+ # really matter: apparently it suffices to not use
+ # an indefinite blocking join for it to
+ # be interruptible by KeyboardInterrupt.
+ thread.join(0.1)
+ self.update_summary(result_summary)
+ thread_timings.append({'name': thread.getName(),
+ 'num_tests': thread.get_num_tests(),
+ 'total_time': thread.get_total_time()})
+ test_timings.update(thread.get_directory_timing_stats())
+ individual_test_timings.extend(
+ thread.get_individual_test_stats())
+ except KeyboardInterrupt:
+ for thread in threads:
+ thread.cancel()
+ self._stop_layout_test_helper(layout_test_helper_proc)
+ raise
+ for thread in threads:
+ # Check whether a TestShellThread died before normal completion.
+ exception_info = thread.get_exception_info()
+ if exception_info is not None:
+ # Re-raise the thread's exception here to make it clear that
+ # testing was aborted. Otherwise, the tests that did not run
+ # would be assumed to have passed.
+ raise exception_info[0], exception_info[1], exception_info[2]
+
+ # Make sure we pick up any remaining tests.
+ self.update_summary(result_summary)
+ return (thread_timings, test_timings, individual_test_timings)
+
+ def run(self, result_summary):
+ """Run all our tests on all our test files.
+
+ For each test file, we run each test type. If there are any failures,
+ we collect them for reporting.
+
+ Args:
+ result_summary: a summary object tracking the test results.
+
+ Return:
+ We return nonzero if there are regressions compared to the last run.
+ """
+ if not self._test_files:
+ return 0
+ start_time = time.time()
+ test_shell_binary = path_utils.test_shell_path(self._options.target)
+
+ # Start up any helper needed
+ layout_test_helper_proc = None
+ if not self._options.no_pixel_tests:
+ helper_path = path_utils.layout_test_helper_path(
+ self._options.target)
+ if len(helper_path):
+ logging.debug("Starting layout helper %s" % helper_path)
+ layout_test_helper_proc = subprocess.Popen(
+ [helper_path], stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE, stderr=None)
+ is_ready = layout_test_helper_proc.stdout.readline()
+ if not is_ready.startswith('ready'):
+ logging.error("layout_test_helper failed to be ready")
+
+ # Check that the system dependencies (themes, fonts, ...) are correct.
+ if not self._options.nocheck_sys_deps:
+ proc = subprocess.Popen([test_shell_binary,
+ "--check-layout-test-sys-deps"])
+ if proc.wait() != 0:
+ logging.info("Aborting because system dependencies check "
+ "failed.\n To override, invoke with "
+ "--nocheck-sys-deps")
+ sys.exit(1)
+
+ if self._contains_tests(self.HTTP_SUBDIR):
+ self._http_server.start()
+
+ if self._contains_tests(self.WEBSOCKET_SUBDIR):
+ self._websocket_server.start()
+ # self._websocket_secure_server.Start()
+
+ thread_timings, test_timings, individual_test_timings = (
+ self._run_tests(test_shell_binary, self._test_files_list,
+ result_summary))
+
+ # We exclude the crashes from the list of results to retry, because
+ # we want to treat even a potentially flaky crash as an error.
+ failures = self._get_failures(result_summary, include_crashes=False)
+ retries = 0
+ retry_summary = result_summary
+ while (retries < self.NUM_RETRY_ON_UNEXPECTED_FAILURE and
+ len(failures)):
+ logging.debug("Retrying %d unexpected failure(s)" % len(failures))
+ retries += 1
+ retry_summary = ResultSummary(self._expectations, failures.keys())
+ self._run_tests(test_shell_binary, failures.keys(), retry_summary)
+ failures = self._get_failures(retry_summary, include_crashes=True)
+
+ self._stop_layout_test_helper(layout_test_helper_proc)
+ end_time = time.time()
+
+ write = create_logging_writer(self._options, 'timing')
+ self._print_timing_statistics(write, end_time - start_time,
+ thread_timings, test_timings,
+ individual_test_timings,
+ result_summary)
+
+ self._meter.update("")
+
+ if self._options.verbose:
+ # We write this block to stdout for compatibility with the
+ # buildbot log parser, which only looks at stdout, not stderr :(
+ write = lambda s: sys.stdout.write("%s\n" % s)
+ else:
+ write = create_logging_writer(self._options, 'actual')
+
+ self._print_result_summary(write, result_summary)
+
+ sys.stdout.flush()
+ sys.stderr.flush()
+
+ if (LOG_DETAILED_PROGRESS in self._options.log or
+ (LOG_UNEXPECTED in self._options.log and
+ result_summary.total != result_summary.expected)):
+ print
+
+ # This summary data gets written to stdout regardless of log level
+ self._print_one_line_summary(result_summary.total,
+ result_summary.expected)
+
+ unexpected_results = self._summarize_unexpected_results(result_summary,
+ retry_summary)
+ self._print_unexpected_results(unexpected_results)
+
+ # Write the same data to log files.
+ self._write_json_files(unexpected_results, result_summary,
+ individual_test_timings)
+
+ # Write the summary to disk (results.html) and maybe open the
+ # test_shell to this file.
+ wrote_results = self._write_results_html_file(result_summary)
+ if not self._options.noshow_results and wrote_results:
+ self._show_results_html_file()
+
+ # Ignore flaky failures and unexpected passes so we don't turn the
+ # bot red for those.
+ return unexpected_results['num_regressions']
+
+ def update_summary(self, result_summary):
+ """Update the summary while running tests."""
+ while True:
+ try:
+ (test, fail_list) = self._result_queue.get_nowait()
+ result = test_failures.determine_result_type(fail_list)
+ expected = self._expectations.matches_an_expected_result(test,
+ result)
+ result_summary.add(test, fail_list, result, expected)
+ if (LOG_DETAILED_PROGRESS in self._options.log and
+ (self._options.experimental_fully_parallel or
+ self._is_single_threaded())):
+ self._display_detailed_progress(result_summary)
+ else:
+ if not expected and LOG_UNEXPECTED in self._options.log:
+ self._print_unexpected_test_result(test, result)
+ self._display_one_line_progress(result_summary)
+ except Queue.Empty:
+ return
+
+ def _display_one_line_progress(self, result_summary):
+ """Displays the progress through the test run."""
+ self._meter.update("Testing: %d ran as expected, %d didn't, %d left" %
+ (result_summary.expected, result_summary.unexpected,
+ result_summary.remaining))
+
+ def _display_detailed_progress(self, result_summary):
+ """Display detailed progress output where we print the directory name
+ and one dot for each completed test. This is triggered by
+ "--log detailed-progress"."""
+ if self._current_test_number == len(self._test_files_list):
+ return
+
+ next_test = self._test_files_list[self._current_test_number]
+ next_dir = os.path.dirname(
+ path_utils.relative_test_filename(next_test))
+ if self._current_progress_str == "":
+ self._current_progress_str = "%s: " % (next_dir)
+ self._current_dir = next_dir
+
+ while next_test in result_summary.results:
+ if next_dir != self._current_dir:
+ self._meter.write("%s\n" % (self._current_progress_str))
+ self._current_progress_str = "%s: ." % (next_dir)
+ self._current_dir = next_dir
+ else:
+ self._current_progress_str += "."
+
+ if (next_test in result_summary.unexpected_results and
+ LOG_UNEXPECTED in self._options.log):
+ result = result_summary.unexpected_results[next_test]
+ self._meter.write("%s\n" % self._current_progress_str)
+ self._print_unexpected_test_result(next_test, result)
+ self._current_progress_str = "%s: " % self._current_dir
+
+ self._current_test_number += 1
+ if self._current_test_number == len(self._test_files_list):
+ break
+
+ next_test = self._test_files_list[self._current_test_number]
+ next_dir = os.path.dirname(
+ path_utils.relative_test_filename(next_test))
+
+ if result_summary.remaining:
+ remain_str = " (%d)" % (result_summary.remaining)
+ self._meter.update("%s%s" %
+ (self._current_progress_str, remain_str))
+ else:
+ self._meter.write("%s\n" % (self._current_progress_str))
+
+ def _get_failures(self, result_summary, include_crashes):
+ """Filters a dict of results and returns only the failures.
+
+ Args:
+ result_summary: the results of the test run
+ include_crashes: whether crashes are included in the output.
+ We use False when finding the list of failures to retry
+ to see if the results were flaky. Although the crashes may also be
+ flaky, we treat them as if they aren't so that they're not ignored.
+ Returns:
+ a dict of files -> results
+ """
+ failed_results = {}
+ for test, result in result_summary.unexpected_results.iteritems():
+ if (result == test_expectations.PASS or
+ result == test_expectations.CRASH and not include_crashes):
+ continue
+ failed_results[test] = result
+
+ return failed_results
+
+ def _summarize_unexpected_results(self, result_summary, retry_summary):
+ """Summarize any unexpected results as a dict.
+
+ TODO(dpranke): split this data structure into a separate class?
+
+ Args:
+ result_summary: summary object from initial test runs
+ retry_summary: summary object from final test run of retried tests
+ Returns:
+ A dictionary containing a summary of the unexpected results from the
+ run, with the following fields:
+ 'version': a version indicator (1 in this version)
+ 'fixable': # of fixable tests (NOW - PASS)
+ 'skipped': # of skipped tests (NOW & SKIPPED)
+ 'num_regressions': # of non-flaky failures
+ 'num_flaky': # of flaky failures
+ 'num_passes': # of unexpected passes
+ 'tests': a dict of tests -> {'expected': '...', 'actual': '...'}
+ """
+ results = {}
+ results['version'] = 1
+
+ tbe = result_summary.tests_by_expectation
+ tbt = result_summary.tests_by_timeline
+ results['fixable'] = len(tbt[test_expectations.NOW] -
+ tbe[test_expectations.PASS])
+ results['skipped'] = len(tbt[test_expectations.NOW] &
+ tbe[test_expectations.SKIP])
+
+ num_passes = 0
+ num_flaky = 0
+ num_regressions = 0
+ keywords = {}
+ for k, v in TestExpectationsFile.EXPECTATIONS.iteritems():
+ keywords[v] = k.upper()
+
+ tests = {}
+ for filename, result in result_summary.unexpected_results.iteritems():
+ # Note that if a test crashed in the original run, we ignore
+ # whether or not it crashed when we retried it (if we retried it),
+ # and always consider the result not flaky.
+ test = path_utils.relative_test_filename(filename)
+ expected = self._expectations.get_expectations_string(filename)
+ actual = [keywords[result]]
+
+ if result == test_expectations.PASS:
+ num_passes += 1
+ elif result == test_expectations.CRASH:
+ num_regressions += 1
+ else:
+ if filename not in retry_summary.unexpected_results:
+ actual.extend(
+ self._expectations.get_expectations_string(
+ filename).split(" "))
+ num_flaky += 1
+ else:
+ retry_result = retry_summary.unexpected_results[filename]
+ if result != retry_result:
+ actual.append(keywords[retry_result])
+ num_flaky += 1
+ else:
+ num_regressions += 1
+
+ tests[test] = {}
+ tests[test]['expected'] = expected
+ tests[test]['actual'] = " ".join(actual)
+
+ results['tests'] = tests
+ results['num_passes'] = num_passes
+ results['num_flaky'] = num_flaky
+ results['num_regressions'] = num_regressions
+
+ return results
+
+ def _write_json_files(self, unexpected_results, result_summary,
+ individual_test_timings):
+ """Writes the results of the test run as JSON files into the results
+ dir.
+
+ There are three different files written into the results dir:
+ unexpected_results.json: A short list of any unexpected results.
+ This is used by the buildbots to display results.
+ expectations.json: This is used by the flakiness dashboard.
+ results.json: A full list of the results - used by the flakiness
+ dashboard and the aggregate results dashboard.
+
+ Args:
+ unexpected_results: dict of unexpected results
+ result_summary: full summary object
+ individual_test_timings: list of test times (used by the flakiness
+ dashboard).
+ """
+ logging.debug("Writing JSON files in %s." %
+ self._options.results_directory)
+ unexpected_file = open(os.path.join(self._options.results_directory,
+ "unexpected_results.json"), "w")
+ unexpected_file.write(simplejson.dumps(unexpected_results,
+ sort_keys=True, indent=2))
+ unexpected_file.close()
+
+ # Write a json file of the test_expectations.txt file for the layout
+ # tests dashboard.
+ expectations_file = open(os.path.join(self._options.results_directory,
+ "expectations.json"), "w")
+ expectations_json = \
+ self._expectations.get_expectations_json_for_all_platforms()
+ expectations_file.write("ADD_EXPECTATIONS(" + expectations_json + ");")
+ expectations_file.close()
+
+ json_layout_results_generator.JSONLayoutResultsGenerator(
+ self._options.builder_name, self._options.build_name,
+ self._options.build_number, self._options.results_directory,
+ BUILDER_BASE_URL, individual_test_timings,
+ self._expectations, result_summary, self._test_files_list)
+
+ logging.debug("Finished writing JSON files.")
+
+ def _print_expected_results_of_type(self, write, result_summary,
+ result_type, result_type_str):
+ """Print the number of the tests in a given result class.
+
+ Args:
+ write: A callback to write info to (e.g., a LoggingWriter) or
+ sys.stdout.write.
+ result_summary - the object containing all the results to report on
+ result_type - the particular result type to report in the summary.
+ result_type_str - a string description of the result_type.
+ """
+ tests = self._expectations.get_tests_with_result_type(result_type)
+ now = result_summary.tests_by_timeline[test_expectations.NOW]
+ wontfix = result_summary.tests_by_timeline[test_expectations.WONTFIX]
+ defer = result_summary.tests_by_timeline[test_expectations.DEFER]
+
+ # We use a fancy format string in order to print the data out in a
+ # nicely-aligned table.
+ fmtstr = ("Expect: %%5d %%-8s (%%%dd now, %%%dd defer, %%%dd wontfix)"
+ % (self._num_digits(now), self._num_digits(defer),
+ self._num_digits(wontfix)))
+ write(fmtstr % (len(tests), result_type_str, len(tests & now),
+ len(tests & defer), len(tests & wontfix)))
+
+ def _num_digits(self, num):
+ """Returns the number of digits needed to represent the length of a
+ sequence."""
+ ndigits = 1
+ if len(num):
+ ndigits = int(math.log10(len(num))) + 1
+ return ndigits
+
+ def _print_timing_statistics(self, write, total_time, thread_timings,
+ directory_test_timings, individual_test_timings,
+ result_summary):
+ """Record timing-specific information for the test run.
+
+ Args:
+ write: A callback to write info to (e.g., a LoggingWriter) or
+ sys.stdout.write.
+ total_time: total elapsed time (in seconds) for the test run
+ thread_timings: wall clock time each thread ran for
+ directory_test_timings: timing by directory
+ individual_test_timings: timing by file
+ result_summary: summary object for the test run
+ """
+ write("Test timing:")
+ write(" %6.2f total testing time" % total_time)
+ write("")
+ write("Thread timing:")
+ cuml_time = 0
+ for t in thread_timings:
+ write(" %10s: %5d tests, %6.2f secs" %
+ (t['name'], t['num_tests'], t['total_time']))
+ cuml_time += t['total_time']
+ write(" %6.2f cumulative, %6.2f optimal" %
+ (cuml_time, cuml_time / int(self._options.num_test_shells)))
+ write("")
+
+ self._print_aggregate_test_statistics(write, individual_test_timings)
+ self._print_individual_test_times(write, individual_test_timings,
+ result_summary)
+ self._print_directory_timings(write, directory_test_timings)
+
+ def _print_aggregate_test_statistics(self, write, individual_test_timings):
+ """Prints aggregate statistics (e.g. median, mean, etc.) for all tests.
+ Args:
+ write: A callback to write info to (e.g., a LoggingWriter) or
+ sys.stdout.write.
+ individual_test_timings: List of test_shell_thread.TestStats for all
+ tests.
+ """
+ test_types = individual_test_timings[0].time_for_diffs.keys()
+ times_for_test_shell = []
+ times_for_diff_processing = []
+ times_per_test_type = {}
+ for test_type in test_types:
+ times_per_test_type[test_type] = []
+
+ for test_stats in individual_test_timings:
+ times_for_test_shell.append(test_stats.test_run_time)
+ times_for_diff_processing.append(
+ test_stats.total_time_for_all_diffs)
+ time_for_diffs = test_stats.time_for_diffs
+ for test_type in test_types:
+ times_per_test_type[test_type].append(
+ time_for_diffs[test_type])
+
+ self._print_statistics_for_test_timings(write,
+ "PER TEST TIME IN TESTSHELL (seconds):", times_for_test_shell)
+ self._print_statistics_for_test_timings(write,
+ "PER TEST DIFF PROCESSING TIMES (seconds):",
+ times_for_diff_processing)
+ for test_type in test_types:
+ self._print_statistics_for_test_timings(write,
+ "PER TEST TIMES BY TEST TYPE: %s" % test_type,
+ times_per_test_type[test_type])
+
+ def _print_individual_test_times(self, write, individual_test_timings,
+ result_summary):
+ """Prints the run times for slow, timeout and crash tests.
+ Args:
+ write: A callback to write info to (e.g., a LoggingWriter) or
+ sys.stdout.write.
+ individual_test_timings: List of test_shell_thread.TestStats for all
+ tests.
+ result_summary: summary object for test run
+ """
+ # Reverse-sort by the time spent in test_shell.
+ individual_test_timings.sort(lambda a, b:
+ cmp(b.test_run_time, a.test_run_time))
+
+ num_printed = 0
+ slow_tests = []
+ timeout_or_crash_tests = []
+ unexpected_slow_tests = []
+ for test_tuple in individual_test_timings:
+ filename = test_tuple.filename
+ is_timeout_crash_or_slow = False
+ if self._expectations.has_modifier(filename,
+ test_expectations.SLOW):
+ is_timeout_crash_or_slow = True
+ slow_tests.append(test_tuple)
+
+ if filename in result_summary.failures:
+ result = result_summary.results[filename]
+ if (result == test_expectations.TIMEOUT or
+ result == test_expectations.CRASH):
+ is_timeout_crash_or_slow = True
+ timeout_or_crash_tests.append(test_tuple)
+
+ if (not is_timeout_crash_or_slow and
+ num_printed < self._options.num_slow_tests_to_log):
+ num_printed = num_printed + 1
+ unexpected_slow_tests.append(test_tuple)
+
+ write("")
+ self._print_test_list_timing(write, "%s slowest tests that are not "
+ "marked as SLOW and did not timeout/crash:" %
+ self._options.num_slow_tests_to_log, unexpected_slow_tests)
+ write("")
+ self._print_test_list_timing(write, "Tests marked as SLOW:",
+ slow_tests)
+ write("")
+ self._print_test_list_timing(write, "Tests that timed out or crashed:",
+ timeout_or_crash_tests)
+ write("")
+
+ def _print_test_list_timing(self, write, title, test_list):
+ """Print timing info for each test.
+
+ Args:
+ write: A callback to write info to (e.g., a LoggingWriter) or
+ sys.stdout.write.
+ title: section heading
+ test_list: tests that fall in this section
+ """
+ write(title)
+ for test_tuple in test_list:
+ filename = test_tuple.filename[len(
+ path_utils.layout_tests_dir()) + 1:]
+ filename = filename.replace('\\', '/')
+ test_run_time = round(test_tuple.test_run_time, 1)
+ write(" %s took %s seconds" % (filename, test_run_time))
+
+ def _print_directory_timings(self, write, directory_test_timings):
+ """Print timing info by directory for any directories that
+ take > 10 seconds to run.
+
+ Args:
+ write: A callback to write info to (e.g., a LoggingWriter) or
+ sys.stdout.write.
+ directory_test_timing: time info for each directory
+ """
+ timings = []
+ for directory in directory_test_timings:
+ num_tests, time_for_directory = directory_test_timings[directory]
+ timings.append((round(time_for_directory, 1), directory,
+ num_tests))
+ timings.sort()
+
+ write("Time to process slowest subdirectories:")
+ min_seconds_to_print = 10
+ for timing in timings:
+ if timing[0] > min_seconds_to_print:
+ write(" %s took %s seconds to run %s tests." % (timing[1],
+ timing[0], timing[2]))
+ write("")
+
+ def _print_statistics_for_test_timings(self, write, title, timings):
+ """Prints the median, mean and standard deviation of the values in
+ timings.
+
+ Args:
+ write: A callback to write info to (e.g., a LoggingWriter) or
+ sys.stdout.write.
+ title: Title for these timings.
+ timings: A list of floats representing times.
+ """
+ write(title)
+ timings.sort()
+
+ num_tests = len(timings)
+ percentile90 = timings[int(.9 * num_tests)]
+ percentile99 = timings[int(.99 * num_tests)]
+
+ if num_tests % 2 == 1:
+ median = timings[((num_tests - 1) / 2) - 1]
+ else:
+ lower = timings[num_tests / 2 - 1]
+ upper = timings[num_tests / 2]
+ median = (float(lower + upper)) / 2
+
+ mean = sum(timings) / num_tests
+
+ for time in timings:
+ sum_of_deviations = math.pow(time - mean, 2)
+
+ std_deviation = math.sqrt(sum_of_deviations / num_tests)
+ write(" Median: %6.3f" % median)
+ write(" Mean: %6.3f" % mean)
+ write(" 90th percentile: %6.3f" % percentile90)
+ write(" 99th percentile: %6.3f" % percentile99)
+ write(" Standard dev: %6.3f" % std_deviation)
+ write("")
+
+ def _print_result_summary(self, write, result_summary):
+ """Print a short summary about how many tests passed.
+
+ Args:
+ write: A callback to write info to (e.g., a LoggingWriter) or
+ sys.stdout.write.
+ result_summary: information to log
+ """
+ failed = len(result_summary.failures)
+ skipped = len(
+ result_summary.tests_by_expectation[test_expectations.SKIP])
+ total = result_summary.total
+ passed = total - failed - skipped
+ pct_passed = 0.0
+ if total > 0:
+ pct_passed = float(passed) * 100 / total
+
+ write("")
+ write("=> Results: %d/%d tests passed (%.1f%%)" %
+ (passed, total, pct_passed))
+ write("")
+ self._print_result_summary_entry(write, result_summary,
+ test_expectations.NOW, "Tests to be fixed for the current release")
+
+ write("")
+ self._print_result_summary_entry(write, result_summary,
+ test_expectations.DEFER,
+ "Tests we'll fix in the future if they fail (DEFER)")
+
+ write("")
+ self._print_result_summary_entry(write, result_summary,
+ test_expectations.WONTFIX,
+ "Tests that will only be fixed if they crash (WONTFIX)")
+
+ def _print_result_summary_entry(self, write, result_summary, timeline,
+ heading):
+ """Print a summary block of results for a particular timeline of test.
+
+ Args:
+ write: A callback to write info to (e.g., a LoggingWriter) or
+ sys.stdout.write.
+ result_summary: summary to print results for
+ timeline: the timeline to print results for (NOT, WONTFIX, etc.)
+ heading: a textual description of the timeline
+ """
+ total = len(result_summary.tests_by_timeline[timeline])
+ not_passing = (total -
+ len(result_summary.tests_by_expectation[test_expectations.PASS] &
+ result_summary.tests_by_timeline[timeline]))
+ write("=> %s (%d):" % (heading, not_passing))
+
+ for result in TestExpectationsFile.EXPECTATION_ORDER:
+ if result == test_expectations.PASS:
+ continue
+ results = (result_summary.tests_by_expectation[result] &
+ result_summary.tests_by_timeline[timeline])
+ desc = TestExpectationsFile.EXPECTATION_DESCRIPTIONS[result]
+ if not_passing and len(results):
+ pct = len(results) * 100.0 / not_passing
+ write(" %5d %-24s (%4.1f%%)" % (len(results),
+ desc[len(results) != 1], pct))
+
+ def _print_one_line_summary(self, total, expected):
+ """Print a one-line summary of the test run to stdout.
+
+ Args:
+ total: total number of tests run
+ expected: number of expected results
+ """
+ unexpected = total - expected
+ if unexpected == 0:
+ print "All %d tests ran as expected." % expected
+ elif expected == 1:
+ print "1 test ran as expected, %d didn't:" % unexpected
+ else:
+ print "%d tests ran as expected, %d didn't:" % (expected,
+ unexpected)
+
+ def _print_unexpected_results(self, unexpected_results):
+ """Prints any unexpected results in a human-readable form to stdout."""
+ passes = {}
+ flaky = {}
+ regressions = {}
+
+ if len(unexpected_results['tests']):
+ print ""
+
+ for test, results in unexpected_results['tests'].iteritems():
+ actual = results['actual'].split(" ")
+ expected = results['expected'].split(" ")
+ if actual == ['PASS']:
+ if 'CRASH' in expected:
+ _add_to_dict_of_lists(passes,
+ 'Expected to crash, but passed',
+ test)
+ elif 'TIMEOUT' in expected:
+ _add_to_dict_of_lists(passes,
+ 'Expected to timeout, but passed',
+ test)
+ else:
+ _add_to_dict_of_lists(passes,
+ 'Expected to fail, but passed',
+ test)
+ elif len(actual) > 1:
+ # We group flaky tests by the first actual result we got.
+ _add_to_dict_of_lists(flaky, actual[0], test)
+ else:
+ _add_to_dict_of_lists(regressions, results['actual'], test)
+
+ if len(passes):
+ for key, tests in passes.iteritems():
+ print "%s: (%d)" % (key, len(tests))
+ tests.sort()
+ for test in tests:
+ print " %s" % test
+ print
+
+ if len(flaky):
+ descriptions = TestExpectationsFile.EXPECTATION_DESCRIPTIONS
+ for key, tests in flaky.iteritems():
+ result = TestExpectationsFile.EXPECTATIONS[key.lower()]
+ print "Unexpected flakiness: %s (%d)" % (
+ descriptions[result][1], len(tests))
+ tests.sort()
+
+ for test in tests:
+ result = unexpected_results['tests'][test]
+ actual = result['actual'].split(" ")
+ expected = result['expected'].split(" ")
+ result = TestExpectationsFile.EXPECTATIONS[key.lower()]
+ new_expectations_list = list(set(actual) | set(expected))
+ print " %s = %s" % (test, " ".join(new_expectations_list))
+ print
+
+ if len(regressions):
+ descriptions = TestExpectationsFile.EXPECTATION_DESCRIPTIONS
+ for key, tests in regressions.iteritems():
+ result = TestExpectationsFile.EXPECTATIONS[key.lower()]
+ print "Regressions: Unexpected %s : (%d)" % (
+ descriptions[result][1], len(tests))
+ tests.sort()
+ for test in tests:
+ print " %s = %s" % (test, key)
+ print
+
+ if len(unexpected_results['tests']) and self._options.verbose:
+ print "-" * 78
+
+ def _print_unexpected_test_result(self, test, result):
+ """Prints one unexpected test result line."""
+ desc = TestExpectationsFile.EXPECTATION_DESCRIPTIONS[result][0]
+ self._meter.write(" %s -> unexpected %s\n" %
+ (path_utils.relative_test_filename(test), desc))
+
+ def _write_results_html_file(self, result_summary):
+ """Write results.html which is a summary of tests that failed.
+
+ Args:
+ result_summary: a summary of the results :)
+
+ Returns:
+ True if any results were written (since expected failures may be
+ omitted)
+ """
+ # test failures
+ if self._options.full_results_html:
+ test_files = result_summary.failures.keys()
+ else:
+ unexpected_failures = self._get_failures(result_summary,
+ include_crashes=True)
+ test_files = unexpected_failures.keys()
+ if not len(test_files):
+ return False
+
+ out_filename = os.path.join(self._options.results_directory,
+ "results.html")
+ out_file = open(out_filename, 'w')
+ # header
+ if self._options.full_results_html:
+ h2 = "Test Failures"
+ else:
+ h2 = "Unexpected Test Failures"
+ out_file.write("<html><head><title>Layout Test Results (%(time)s)"
+ "</title></head><body><h2>%(h2)s (%(time)s)</h2>\n"
+ % {'h2': h2, 'time': time.asctime()})
+
+ test_files.sort()
+ for test_file in test_files:
+ test_failures = result_summary.failures.get(test_file, [])
+ out_file.write("<p><a href='%s'>%s</a><br />\n"
+ % (path_utils.filename_to_uri(test_file),
+ path_utils.relative_test_filename(test_file)))
+ for failure in test_failures:
+ out_file.write("&nbsp;&nbsp;%s<br/>"
+ % failure.result_html_output(
+ path_utils.relative_test_filename(test_file)))
+ out_file.write("</p>\n")
+
+ # footer
+ out_file.write("</body></html>\n")
+ return True
+
+ def _show_results_html_file(self):
+ """Launches the test shell open to the results.html page."""
+ results_filename = os.path.join(self._options.results_directory,
+ "results.html")
+ subprocess.Popen([path_utils.test_shell_path(self._options.target),
+ path_utils.filename_to_uri(results_filename)])
+
+
+def _add_to_dict_of_lists(dict, key, value):
+ dict.setdefault(key, []).append(value)
+
+
+def read_test_files(files):
+ tests = []
+ for file in files:
+ for line in open(file):
+ line = test_expectations.strip_comments(line)
+ if line:
+ tests.append(line)
+ return tests
+
+
+def create_logging_writer(options, log_option):
+ """Returns a write() function that will write the string to logging.info()
+ if comp was specified in --log or if --verbose is true. Otherwise the
+ message is dropped.
+
+ Args:
+ options: list of command line options from optparse
+ log_option: option to match in options.log in order for the messages
+ to be logged (e.g., 'actual' or 'expected')
+ """
+ if options.verbose or log_option in options.log.split(","):
+ return logging.info
+ return lambda str: 1
+
+
+def main(options, args):
+ """Run the tests. Will call sys.exit when complete.
+
+ Args:
+ options: a dictionary of command line options
+ args: a list of sub directories or files to test
+ """
+
+ if options.sources:
+ options.verbose = True
+
+ # Set up our logging format.
+ meter = metered_stream.MeteredStream(options.verbose, sys.stderr)
+ 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)
+
+ if not options.target:
+ if options.debug:
+ options.target = "Debug"
+ else:
+ options.target = "Release"
+
+ if not options.use_apache:
+ options.use_apache = sys.platform in ('darwin', 'linux2')
+
+ if options.results_directory.startswith("/"):
+ # Assume it's an absolute path and normalize.
+ options.results_directory = path_utils.get_absolute_path(
+ options.results_directory)
+ else:
+ # If it's a relative path, make the output directory relative to
+ # Debug or Release.
+ basedir = path_utils.path_from_base('webkit')
+ options.results_directory = path_utils.get_absolute_path(
+ os.path.join(basedir, options.target, options.results_directory))
+
+ 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.
+ path = os.path.join(options.results_directory, 'LayoutTests')
+ if os.path.exists(path):
+ shutil.rmtree(path)
+
+ # Ensure platform is valid and force it to the form 'chromium-<platform>'.
+ options.platform = path_utils.platform_name(options.platform)
+
+ if not options.num_test_shells:
+ # TODO(ojan): Investigate perf/flakiness impact of using numcores + 1.
+ options.num_test_shells = platform_utils.get_num_cores()
+
+ write = create_logging_writer(options, 'config')
+ write("Running %s test_shells in parallel" % options.num_test_shells)
+
+ if not options.time_out_ms:
+ if options.target == "Debug":
+ options.time_out_ms = str(2 * TestRunner.DEFAULT_TEST_TIMEOUT_MS)
+ else:
+ options.time_out_ms = str(TestRunner.DEFAULT_TEST_TIMEOUT_MS)
+
+ options.slow_time_out_ms = str(5 * int(options.time_out_ms))
+ write("Regular timeout: %s, slow test timeout: %s" %
+ (options.time_out_ms, options.slow_time_out_ms))
+
+ # 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 = []
+ if options.test_list:
+ paths += read_test_files(options.test_list)
+
+ # Create the output directory if it doesn't already exist.
+ path_utils.maybe_make_directory(options.results_directory)
+ meter.update("Gathering files ...")
+
+ test_runner = TestRunner(options, meter)
+ test_runner.gather_file_paths(paths)
+
+ if options.lint_test_files:
+ # Creating the expecations for each platform/target pair does all the
+ # test list parsing and ensures it's correct syntax (e.g. no dupes).
+ for platform in TestExpectationsFile.PLATFORMS:
+ test_runner.parse_expectations(platform, is_debug_mode=True)
+ test_runner.parse_expectations(platform, is_debug_mode=False)
+ print ("If there are no fail messages, errors or exceptions, then the "
+ "lint succeeded.")
+ sys.exit(0)
+
+ try:
+ test_shell_binary_path = path_utils.test_shell_path(options.target)
+ except path_utils.PathNotFound:
+ print "\nERROR: test_shell is not found. Be sure that you have built"
+ print "it and that you are using the correct build. This script"
+ print "will run the Release one by default. Use --debug to use the"
+ print "Debug build.\n"
+ sys.exit(1)
+
+ write = create_logging_writer(options, "config")
+ write("Using platform '%s'" % options.platform)
+ write("Placing test results in %s" % options.results_directory)
+ if options.new_baseline:
+ write("Placing new baselines in %s" %
+ path_utils.chromium_baseline_path(options.platform))
+ write("Using %s build at %s" % (options.target, test_shell_binary_path))
+ if options.no_pixel_tests:
+ write("Not running pixel tests")
+ write("")
+
+ meter.update("Parsing expectations ...")
+ test_runner.parse_expectations(options.platform, options.target == 'Debug')
+
+ meter.update("Preparing tests ...")
+ write = create_logging_writer(options, "expected")
+ result_summary = test_runner.prepare_lists_and_print_output(write)
+
+ if 'cygwin' == sys.platform:
+ logging.warn("#" * 40)
+ logging.warn("# UNEXPECTED PYTHON VERSION")
+ logging.warn("# This script should be run using the version of python")
+ logging.warn("# in third_party/python_24/")
+ logging.warn("#" * 40)
+ sys.exit(1)
+
+ # Delete the disk cache if any to ensure a clean test run.
+ cachedir = os.path.split(test_shell_binary_path)[0]
+ cachedir = os.path.join(cachedir, "cache")
+ if os.path.exists(cachedir):
+ shutil.rmtree(cachedir)
+
+ test_runner.add_test_type(text_diff.TestTextDiff)
+ if not options.no_pixel_tests:
+ test_runner.add_test_type(image_diff.ImageDiff)
+ if options.fuzzy_pixel_tests:
+ test_runner.add_test_type(fuzzy_image_diff.FuzzyImageDiff)
+
+ meter.update("Starting ...")
+ has_new_failures = test_runner.run(result_summary)
+
+ logging.debug("Exit status: %d" % has_new_failures)
+ sys.exit(has_new_failures)
+
+
+def parse_args(args=None):
+ """Provides a default set of command line args.
+
+ Returns a tuple of options, args from optparse"""
+ option_parser = optparse.OptionParser()
+ option_parser.add_option("", "--no-pixel-tests", action="store_true",
+ default=False,
+ help="disable pixel-to-pixel PNG comparisons")
+ option_parser.add_option("", "--fuzzy-pixel-tests", action="store_true",
+ default=False,
+ help="Also use fuzzy matching to compare pixel "
+ "test outputs.")
+ option_parser.add_option("", "--results-directory",
+ default="layout-test-results",
+ help="Output results directory source dir,"
+ " relative to Debug or Release")
+ option_parser.add_option("", "--new-baseline", action="store_true",
+ default=False,
+ help="save all generated results as new baselines"
+ " into the platform directory, overwriting "
+ "whatever's already there.")
+ option_parser.add_option("", "--noshow-results", action="store_true",
+ default=False, help="don't launch the test_shell"
+ " with results after the tests are done")
+ option_parser.add_option("", "--full-results-html", action="store_true",
+ default=False, help="show all failures in "
+ "results.html, rather than only regressions")
+ option_parser.add_option("", "--clobber-old-results", action="store_true",
+ default=False, help="Clobbers test results from "
+ "previous runs.")
+ option_parser.add_option("", "--lint-test-files", action="store_true",
+ default=False, help="Makes sure the test files "
+ "parse for all configurations. Does not run any "
+ "tests.")
+ option_parser.add_option("", "--force", action="store_true",
+ default=False,
+ help="Run all tests, even those marked SKIP "
+ "in the test list")
+ option_parser.add_option("", "--num-test-shells",
+ help="Number of testshells to run in parallel.")
+ option_parser.add_option("", "--use-apache", action="store_true",
+ default=False,
+ help="Whether to use apache instead of lighttpd.")
+ option_parser.add_option("", "--time-out-ms", default=None,
+ help="Set the timeout for each test")
+ option_parser.add_option("", "--run-singly", action="store_true",
+ default=False,
+ help="run a separate test_shell for each test")
+ option_parser.add_option("", "--debug", action="store_true", default=False,
+ help="use the debug binary instead of the release"
+ " binary")
+ option_parser.add_option("", "--num-slow-tests-to-log", default=50,
+ help="Number of slow tests whose timings "
+ "to print.")
+ option_parser.add_option("", "--platform",
+ help="Override the platform for expected results")
+ option_parser.add_option("", "--target", default="",
+ help="Set the build target configuration "
+ "(overrides --debug)")
+ option_parser.add_option("", "--log", action="store",
+ default="detailed-progress,unexpected",
+ help="log various types of data. The param should"
+ " be a comma-separated list of values from: "
+ "actual,config," + LOG_DETAILED_PROGRESS +
+ ",expected,timing," + LOG_UNEXPECTED + " "
+ "(defaults to " +
+ "--log detailed-progress,unexpected)")
+ option_parser.add_option("-v", "--verbose", action="store_true",
+ default=False, help="include debug-level logging")
+ option_parser.add_option("", "--sources", action="store_true",
+ help="show expected result file path for each "
+ "test (implies --verbose)")
+ option_parser.add_option("", "--startup-dialog", action="store_true",
+ default=False,
+ help="create a dialog on test_shell.exe startup")
+ option_parser.add_option("", "--gp-fault-error-box", action="store_true",
+ default=False,
+ help="enable Windows GP fault error box")
+ option_parser.add_option("", "--wrapper",
+ help="wrapper command to insert before "
+ "invocations of test_shell; option is split "
+ "on whitespace before running. (Example: "
+ "--wrapper='valgrind --smc-check=all')")
+ option_parser.add_option("", "--test-list", action="append",
+ help="read list of tests to run from file",
+ metavar="FILE")
+ option_parser.add_option("", "--nocheck-sys-deps", action="store_true",
+ default=False,
+ help="Don't check the system dependencies "
+ "(themes)")
+ option_parser.add_option("", "--randomize-order", action="store_true",
+ default=False,
+ help=("Run tests in random order (useful for "
+ "tracking down corruption)"))
+ option_parser.add_option("", "--run-chunk",
+ default=None,
+ help=("Run a specified chunk (n:l), the "
+ "nth of len l, of the layout tests"))
+ option_parser.add_option("", "--run-part",
+ default=None,
+ help=("Run a specified part (n:m), the nth of m"
+ " parts, of the layout tests"))
+ option_parser.add_option("", "--batch-size",
+ default=None,
+ help=("Run a the tests in batches (n), after "
+ "every n tests, the test shell is "
+ "relaunched."))
+ option_parser.add_option("", "--builder-name",
+ default="DUMMY_BUILDER_NAME",
+ help=("The name of the builder shown on the "
+ "waterfall running this script e.g. "
+ "WebKit."))
+ option_parser.add_option("", "--build-name",
+ default="DUMMY_BUILD_NAME",
+ help=("The name of the builder used in its path, "
+ "e.g. webkit-rel."))
+ option_parser.add_option("", "--build-number",
+ default="DUMMY_BUILD_NUMBER",
+ help=("The build number of the builder running"
+ "this script."))
+ option_parser.add_option("", "--experimental-fully-parallel",
+ action="store_true", default=False,
+ help="run all tests in parallel")
+ return option_parser.parse_args(args)
+
+if '__main__' == __name__:
+ options, args = parse_args()
+ main(options, args)
diff --git a/JavaScriptCore/profiler/HeavyProfile.h b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/__init__.py
index e69de29..e69de29 100644
--- a/JavaScriptCore/profiler/HeavyProfile.h
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/__init__.py
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/test_types/fuzzy_image_diff.py b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/fuzzy_image_diff.py
new file mode 100644
index 0000000..134b507
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/fuzzy_image_diff.py
@@ -0,0 +1,72 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""Compares the image output of a test to the expected image output using
+fuzzy matching.
+"""
+
+import errno
+import logging
+import os
+import shutil
+import subprocess
+
+from layout_package import path_utils
+from layout_package import test_failures
+from test_types import test_type_base
+
+
+class FuzzyImageDiff(test_type_base.TestTypeBase):
+
+ def compare_output(self, filename, proc, output, test_args, target):
+ """Implementation of CompareOutput that checks the output image and
+ checksum against the expected files from the LayoutTest directory.
+ """
+ failures = []
+
+ # If we didn't produce a hash file, this test must be text-only.
+ if test_args.hash is None:
+ return failures
+
+ expected_png_file = path_utils.expected_filename(filename, '.png')
+
+ if test_args.show_sources:
+ logging.debug('Using %s' % expected_png_file)
+
+ # Also report a missing expected PNG file.
+ if not os.path.isfile(expected_png_file):
+ failures.append(test_failures.FailureMissingImage(self))
+
+ # Run the fuzzymatcher
+ r = subprocess.call([path_utils.fuzzy_match_path(),
+ test_args.png_path, expected_png_file])
+ if r != 0:
+ failures.append(test_failures.FailureFuzzyFailure(self))
+
+ return failures
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/test_types/image_diff.py b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/image_diff.py
new file mode 100644
index 0000000..b0bf189
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/image_diff.py
@@ -0,0 +1,224 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""Compares the image output of a test to the expected image output.
+
+Compares hashes for the generated and expected images. If the output doesn't
+match, returns FailureImageHashMismatch and outputs both hashes into the layout
+test results directory.
+"""
+
+import errno
+import logging
+import os
+import shutil
+import subprocess
+
+from layout_package import path_utils
+from layout_package import test_failures
+from test_types import test_type_base
+
+# Cache whether we have the image_diff executable available.
+_compare_available = True
+_compare_msg_printed = False
+
+
+class ImageDiff(test_type_base.TestTypeBase):
+
+ def _copy_output_png(self, test_filename, source_image, extension):
+ """Copies result files into the output directory with appropriate
+ names.
+
+ Args:
+ test_filename: the test filename
+ source_file: path to the image file (either actual or expected)
+ extension: extension to indicate -actual.png or -expected.png
+ """
+ self._make_output_directory(test_filename)
+ dest_image = self.output_filename(test_filename, extension)
+
+ try:
+ shutil.copyfile(source_image, dest_image)
+ except IOError, e:
+ # A missing expected PNG has already been recorded as an error.
+ if errno.ENOENT != e.errno:
+ raise
+
+ def _save_baseline_files(self, filename, png_path, checksum):
+ """Saves new baselines for the PNG and checksum.
+
+ Args:
+ filename: test filename
+ png_path: path to the actual PNG result file
+ checksum: value of the actual checksum result
+ """
+ png_file = open(png_path, "rb")
+ png_data = png_file.read()
+ png_file.close()
+ self._save_baseline_data(filename, png_data, ".png")
+ self._save_baseline_data(filename, checksum, ".checksum")
+
+ def _create_image_diff(self, filename, target):
+ """Creates the visual diff of the expected/actual PNGs.
+
+ Args:
+ filename: the name of the test
+ target: Debug or Release
+ """
+ diff_filename = self.output_filename(filename,
+ self.FILENAME_SUFFIX_COMPARE)
+ actual_filename = self.output_filename(filename,
+ self.FILENAME_SUFFIX_ACTUAL + '.png')
+ expected_filename = self.output_filename(filename,
+ self.FILENAME_SUFFIX_EXPECTED + '.png')
+
+ global _compare_available
+ cmd = ''
+
+ try:
+ executable = path_utils.image_diff_path(target)
+ cmd = [executable, '--diff', actual_filename, expected_filename,
+ diff_filename]
+ except Exception, e:
+ _compare_available = False
+
+ result = 1
+ if _compare_available:
+ try:
+ result = subprocess.call(cmd)
+ except OSError, e:
+ if e.errno == errno.ENOENT or e.errno == errno.EACCES:
+ _compare_available = False
+ else:
+ raise e
+ except ValueError:
+ # work around a race condition in Python 2.4's implementation
+ # of subprocess.Popen
+ pass
+
+ global _compare_msg_printed
+
+ if not _compare_available and not _compare_msg_printed:
+ _compare_msg_printed = True
+ print('image_diff not found. Make sure you have a ' + target +
+ ' build of the image_diff executable.')
+
+ return result
+
+ def compare_output(self, filename, proc, output, test_args, target):
+ """Implementation of CompareOutput that checks the output image and
+ checksum against the expected files from the LayoutTest directory.
+ """
+ failures = []
+
+ # If we didn't produce a hash file, this test must be text-only.
+ if test_args.hash is None:
+ return failures
+
+ # If we're generating a new baseline, we pass.
+ if test_args.new_baseline:
+ self._save_baseline_files(filename, test_args.png_path,
+ test_args.hash)
+ return failures
+
+ # Compare hashes.
+ expected_hash_file = path_utils.expected_filename(filename,
+ '.checksum')
+ expected_png_file = path_utils.expected_filename(filename, '.png')
+
+ if test_args.show_sources:
+ logging.debug('Using %s' % expected_hash_file)
+ logging.debug('Using %s' % expected_png_file)
+
+ try:
+ expected_hash = open(expected_hash_file, "r").read()
+ except IOError, e:
+ if errno.ENOENT != e.errno:
+ raise
+ expected_hash = ''
+
+
+ if not os.path.isfile(expected_png_file):
+ # Report a missing expected PNG file.
+ self.write_output_files(filename, '', '.checksum', test_args.hash,
+ expected_hash, diff=False, wdiff=False)
+ self._copy_output_png(filename, test_args.png_path, '-actual.png')
+ failures.append(test_failures.FailureMissingImage(self))
+ return failures
+ elif test_args.hash == expected_hash:
+ # Hash matched (no diff needed, okay to return).
+ return failures
+
+
+ self.write_output_files(filename, '', '.checksum', test_args.hash,
+ expected_hash, diff=False, wdiff=False)
+ self._copy_output_png(filename, test_args.png_path, '-actual.png')
+ self._copy_output_png(filename, expected_png_file, '-expected.png')
+
+ # Even though we only use result in one codepath below but we
+ # still need to call CreateImageDiff for other codepaths.
+ result = self._create_image_diff(filename, target)
+ if expected_hash == '':
+ failures.append(test_failures.FailureMissingImageHash(self))
+ elif test_args.hash != expected_hash:
+ # Hashes don't match, so see if the images match. If they do, then
+ # the hash is wrong.
+ if result == 0:
+ failures.append(test_failures.FailureImageHashIncorrect(self))
+ else:
+ failures.append(test_failures.FailureImageHashMismatch(self))
+
+ return failures
+
+ def diff_files(self, file1, file2):
+ """Diff two image files.
+
+ Args:
+ file1, file2: full paths of the files to compare.
+
+ Returns:
+ True if two files are different.
+ False otherwise.
+ """
+
+ try:
+ executable = path_utils.image_diff_path('Debug')
+ except Exception, e:
+ logging.warn('Failed to find image diff executable.')
+ return True
+
+ cmd = [executable, file1, file2]
+ result = 1
+ try:
+ result = subprocess.call(cmd)
+ except OSError, e:
+ logging.warn('Failed to compare image diff: %s', e)
+ return True
+
+ return result == 1
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/test_types/test_type_base.py b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/test_type_base.py
new file mode 100644
index 0000000..334ae70
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/test_type_base.py
@@ -0,0 +1,266 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""Defines the interface TestTypeBase which other test types inherit from.
+
+Also defines the TestArguments "struct" to pass them additional arguments.
+"""
+
+import cgi
+import difflib
+import errno
+import logging
+import os.path
+import subprocess
+
+from layout_package import path_utils
+
+
+class TestArguments(object):
+ """Struct-like wrapper for additional arguments needed by
+ specific tests."""
+ # Whether to save new baseline results.
+ new_baseline = False
+
+ # Path to the actual PNG file generated by pixel tests
+ png_path = None
+
+ # Value of checksum generated by pixel tests.
+ hash = None
+
+ # Whether to use wdiff to generate by-word diffs.
+ wdiff = False
+
+ # Whether to report the locations of the expected result files used.
+ show_sources = False
+
+# Python bug workaround. See the wdiff code in WriteOutputFiles for an
+# explanation.
+_wdiff_available = True
+
+
+class TestTypeBase(object):
+
+ # Filename pieces when writing failures to the test results directory.
+ FILENAME_SUFFIX_ACTUAL = "-actual"
+ FILENAME_SUFFIX_EXPECTED = "-expected"
+ FILENAME_SUFFIX_DIFF = "-diff"
+ FILENAME_SUFFIX_WDIFF = "-wdiff.html"
+ FILENAME_SUFFIX_COMPARE = "-diff.png"
+
+ def __init__(self, platform, root_output_dir):
+ """Initialize a TestTypeBase object.
+
+ Args:
+ platform: the platform (e.g., 'chromium-mac-leopard')
+ identifying the platform-specific results to be used.
+ root_output_dir: The unix style path to the output dir.
+ """
+ self._root_output_dir = root_output_dir
+ self._platform = platform
+
+ def _make_output_directory(self, filename):
+ """Creates the output directory (if needed) for a given test
+ filename."""
+ output_filename = os.path.join(self._root_output_dir,
+ path_utils.relative_test_filename(filename))
+ path_utils.maybe_make_directory(os.path.split(output_filename)[0])
+
+ def _save_baseline_data(self, filename, data, modifier):
+ """Saves a new baseline file into the platform directory.
+
+ The file will be named simply "<test>-expected<modifier>", suitable for
+ use as the expected results in a later run.
+
+ Args:
+ filename: path to the test file
+ data: result to be saved as the new baseline
+ modifier: type of the result file, e.g. ".txt" or ".png"
+ """
+ relative_dir = os.path.dirname(
+ path_utils.relative_test_filename(filename))
+ output_dir = os.path.join(
+ path_utils.chromium_baseline_path(self._platform), relative_dir)
+ output_file = os.path.basename(os.path.splitext(filename)[0] +
+ self.FILENAME_SUFFIX_EXPECTED + modifier)
+
+ path_utils.maybe_make_directory(output_dir)
+ output_path = os.path.join(output_dir, output_file)
+ logging.debug('writing new baseline to "%s"' % (output_path))
+ open(output_path, "wb").write(data)
+
+ def output_filename(self, filename, modifier):
+ """Returns a filename inside the output dir that contains modifier.
+
+ For example, if filename is c:/.../fast/dom/foo.html and modifier is
+ "-expected.txt", the return value is
+ c:/cygwin/tmp/layout-test-results/fast/dom/foo-expected.txt
+
+ Args:
+ filename: absolute filename to test file
+ modifier: a string to replace the extension of filename with
+
+ Return:
+ The absolute windows path to the output filename
+ """
+ output_filename = os.path.join(self._root_output_dir,
+ path_utils.relative_test_filename(filename))
+ return os.path.splitext(output_filename)[0] + modifier
+
+ def compare_output(self, filename, proc, output, test_args, target):
+ """Method that compares the output from the test with the
+ expected value.
+
+ This is an abstract method to be implemented by all sub classes.
+
+ Args:
+ filename: absolute filename to test file
+ proc: a reference to the test_shell process
+ output: a string containing the output of the test
+ test_args: a TestArguments object holding optional additional
+ arguments
+ target: Debug or Release
+
+ Return:
+ a list of TestFailure objects, empty if the test passes
+ """
+ raise NotImplemented
+
+ def write_output_files(self, filename, test_type, file_type, output,
+ expected, diff=True, wdiff=False):
+ """Writes the test output, the expected output and optionally the diff
+ between the two to files in the results directory.
+
+ The full output filename of the actual, for example, will be
+ <filename><test_type>-actual<file_type>
+ For instance,
+ my_test-simp-actual.txt
+
+ Args:
+ filename: The test filename
+ test_type: A string describing the test type, e.g. "simp"
+ file_type: A string describing the test output file type, e.g. ".txt"
+ output: A string containing the test output
+ expected: A string containing the expected test output
+ diff: if True, write a file containing the diffs too. This should be
+ False for results that are not text
+ wdiff: if True, write an HTML file containing word-by-word diffs
+ """
+ self._make_output_directory(filename)
+ actual_filename = self.output_filename(filename,
+ test_type + self.FILENAME_SUFFIX_ACTUAL + file_type)
+ expected_filename = self.output_filename(filename,
+ test_type + self.FILENAME_SUFFIX_EXPECTED + file_type)
+ if output:
+ open(actual_filename, "wb").write(output)
+ if expected:
+ open(expected_filename, "wb").write(expected)
+
+ if not output or not expected:
+ return
+
+ if diff:
+ diff = difflib.unified_diff(expected.splitlines(True),
+ output.splitlines(True),
+ expected_filename,
+ actual_filename)
+
+ diff_filename = self.output_filename(filename,
+ test_type + self.FILENAME_SUFFIX_DIFF + file_type)
+ open(diff_filename, "wb").write(''.join(diff))
+
+ if wdiff:
+ # Shell out to wdiff to get colored inline diffs.
+ executable = path_utils.wdiff_path()
+ cmd = [executable,
+ '--start-delete=##WDIFF_DEL##',
+ '--end-delete=##WDIFF_END##',
+ '--start-insert=##WDIFF_ADD##',
+ '--end-insert=##WDIFF_END##',
+ expected_filename,
+ actual_filename]
+ filename = self.output_filename(filename,
+ test_type + self.FILENAME_SUFFIX_WDIFF)
+
+ global _wdiff_available
+
+ try:
+ # Python's Popen has a bug that causes any pipes opened to a
+ # process that can't be executed to be leaked. Since this
+ # code is specifically designed to tolerate exec failures
+ # to gracefully handle cases where wdiff is not installed,
+ # the bug results in a massive file descriptor leak. As a
+ # workaround, if an exec failure is ever experienced for
+ # wdiff, assume it's not available. This will leak one
+ # file descriptor but that's better than leaking each time
+ # wdiff would be run.
+ #
+ # http://mail.python.org/pipermail/python-list/
+ # 2008-August/505753.html
+ # http://bugs.python.org/issue3210
+ #
+ # It also has a threading bug, so we don't output wdiff if
+ # the Popen raises a ValueError.
+ # http://bugs.python.org/issue1236
+ if _wdiff_available:
+ wdiff = subprocess.Popen(
+ cmd, stdout=subprocess.PIPE).communicate()[0]
+ wdiff_failed = False
+
+ except OSError, e:
+ if (e.errno == errno.ENOENT or e.errno == errno.EACCES or
+ e.errno == errno.ECHILD):
+ _wdiff_available = False
+ else:
+ raise e
+ except ValueError, e:
+ wdiff_failed = True
+
+ out = open(filename, 'wb')
+
+ if not _wdiff_available:
+ out.write(
+ "wdiff not installed.<br/> "
+ "If you're running OS X, you can install via macports."
+ "<br/>"
+ "If running Ubuntu linux, you can run "
+ "'sudo apt-get install wdiff'.")
+ elif wdiff_failed:
+ out.write('wdiff failed due to running with multiple '
+ 'test_shells in parallel.')
+ else:
+ wdiff = cgi.escape(wdiff)
+ wdiff = wdiff.replace('##WDIFF_DEL##', '<span class=del>')
+ wdiff = wdiff.replace('##WDIFF_ADD##', '<span class=add>')
+ wdiff = wdiff.replace('##WDIFF_END##', '</span>')
+ out.write('<head><style>.del { background: #faa; } ')
+ out.write('.add { background: #afa; }</style></head>')
+ out.write('<pre>' + wdiff + '</pre>')
+
+ out.close()
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/test_types/text_diff.py b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/text_diff.py
new file mode 100644
index 0000000..8cff9e6
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/text_diff.py
@@ -0,0 +1,122 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 The Chromium 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 Chromium name 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.
+
+"""Compares the text output of a test to the expected text output.
+
+If the output doesn't match, returns FailureTextMismatch and outputs the diff
+files into the layout test results directory.
+"""
+
+import errno
+import logging
+import os.path
+
+from layout_package import path_utils
+from layout_package import test_failures
+from test_types import test_type_base
+
+
+def is_render_tree_dump(data):
+ """Returns true if data appears to be a render tree dump as opposed to a
+ plain text dump."""
+ return data.find("RenderView at (0,0)") != -1
+
+
+class TestTextDiff(test_type_base.TestTypeBase):
+
+ def get_normalized_output_text(self, output):
+ # Some tests produce "\r\n" explicitly. Our system (Python/Cygwin)
+ # helpfully changes the "\n" to "\r\n", resulting in "\r\r\n".
+ norm = output.replace("\r\r\n", "\r\n").strip("\r\n").replace(
+ "\r\n", "\n")
+ return norm + "\n"
+
+ def get_normalized_expected_text(self, filename, show_sources):
+ """Given the filename of the test, read the expected output from a file
+ and normalize the text. Returns a string with the expected text, or ''
+ if the expected output file was not found."""
+ # Read the platform-specific expected text.
+ expected_filename = path_utils.expected_filename(filename, '.txt')
+ if show_sources:
+ logging.debug('Using %s' % expected_filename)
+
+ return self.get_normalized_text(expected_filename)
+
+ def get_normalized_text(self, filename):
+ try:
+ text = open(filename).read()
+ except IOError, e:
+ if errno.ENOENT != e.errno:
+ raise
+ return ''
+
+ # Normalize line endings
+ return text.strip("\r\n").replace("\r\n", "\n") + "\n"
+
+ def compare_output(self, filename, proc, output, test_args, target):
+ """Implementation of CompareOutput that checks the output text against
+ the expected text from the LayoutTest directory."""
+ failures = []
+
+ # If we're generating a new baseline, we pass.
+ if test_args.new_baseline:
+ self._save_baseline_data(filename, output, ".txt")
+ return failures
+
+ # Normalize text to diff
+ output = self.get_normalized_output_text(output)
+ expected = self.get_normalized_expected_text(filename,
+ test_args.show_sources)
+
+ # Write output files for new tests, too.
+ if output != expected:
+ # Text doesn't match, write output files.
+ self.write_output_files(filename, "", ".txt", output, expected,
+ diff=True, wdiff=True)
+
+ if expected == '':
+ failures.append(test_failures.FailureMissingResult(self))
+ else:
+ failures.append(test_failures.FailureTextMismatch(self, True))
+
+ return failures
+
+ def diff_files(self, file1, file2):
+ """Diff two text files.
+
+ Args:
+ file1, file2: full paths of the files to compare.
+
+ Returns:
+ True if two files are different.
+ False otherwise.
+ """
+
+ return (self.get_normalized_text(file1) !=
+ self.get_normalized_text(file2))
diff --git a/WebKitTools/Scripts/modules/mock.py b/WebKitTools/Scripts/webkitpy/mock.py
index f6f328e..f6f328e 100644
--- a/WebKitTools/Scripts/modules/mock.py
+++ b/WebKitTools/Scripts/webkitpy/mock.py
diff --git a/WebKitTools/Scripts/webkitpy/mock.pyc b/WebKitTools/Scripts/webkitpy/mock.pyc
new file mode 100644
index 0000000..c39d3f4
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/mock.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py b/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py
new file mode 100644
index 0000000..1aff53a
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py
@@ -0,0 +1,367 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+
+from webkitpy.bugzilla import Bug, Attachment
+from webkitpy.committers import CommitterList, Reviewer
+from webkitpy.mock import Mock
+from webkitpy.scm import CommitMessage
+from webkitpy.webkit_logging import log
+
+
+def _id_to_object_dictionary(*objects):
+ dictionary = {}
+ for thing in objects:
+ dictionary[thing["id"]] = thing
+ return dictionary
+
+
+# FIXME: The ids should be 1, 2, 3 instead of crazy numbers.
+
+
+_patch1 = {
+ "id": 197,
+ "bug_id": 42,
+ "url": "http://example.com/197",
+ "is_obsolete": False,
+ "is_patch": True,
+ "review": "+",
+ "reviewer_email": "foo@bar.com",
+ "commit-queue": "+",
+ "committer_email": "foo@bar.com",
+ "attacher_email": "Contributer1",
+}
+
+
+_patch2 = {
+ "id": 128,
+ "bug_id": 42,
+ "url": "http://example.com/128",
+ "is_obsolete": False,
+ "is_patch": True,
+ "review": "+",
+ "reviewer_email": "foo@bar.com",
+ "commit-queue": "+",
+ "committer_email": "non-committer@example.com",
+ "attacher_email": "eric@webkit.org",
+}
+
+
+_patch3 = {
+ "id": 103,
+ "bug_id": 75,
+ "url": "http://example.com/103",
+ "is_obsolete": False,
+ "is_patch": True,
+ "review": "?",
+ "attacher_email": "eric@webkit.org",
+}
+
+
+_patch4 = {
+ "id": 104,
+ "bug_id": 77,
+ "url": "http://example.com/103",
+ "is_obsolete": False,
+ "is_patch": True,
+ "review": "+",
+ "commit-queue": "?",
+ "reviewer_email": "foo@bar.com",
+ "attacher_email": "Contributer2",
+}
+
+
+_patch5 = {
+ "id": 105,
+ "bug_id": 77,
+ "url": "http://example.com/103",
+ "is_obsolete": False,
+ "is_patch": True,
+ "review": "+",
+ "reviewer_email": "foo@bar.com",
+ "attacher_email": "eric@webkit.org",
+}
+
+
+_patch6 = { # Valid committer, but no reviewer.
+ "id": 106,
+ "bug_id": 77,
+ "url": "http://example.com/103",
+ "is_obsolete": False,
+ "is_patch": True,
+ "commit-queue": "+",
+ "committer_email": "foo@bar.com",
+ "attacher_email": "eric@webkit.org",
+}
+
+
+_patch7 = { # Valid review, patch is marked obsolete.
+ "id": 107,
+ "bug_id": 76,
+ "url": "http://example.com/103",
+ "is_obsolete": True,
+ "is_patch": True,
+ "review": "+",
+ "reviewer_email": "foo@bar.com",
+ "attacher_email": "eric@webkit.org",
+}
+
+
+# This must be defined before we define the bugs, thus we don't use
+# MockBugzilla.unassigned_email directly.
+_unassigned_email = "unassigned@example.com"
+
+
+# FIXME: The ids should be 1, 2, 3 instead of crazy numbers.
+
+
+_bug1 = {
+ "id": 42,
+ "title": "Bug with two r+'d and cq+'d patches, one of which has an "
+ "invalid commit-queue setter.",
+ "assigned_to_email": _unassigned_email,
+ "attachments": [_patch1, _patch2],
+}
+
+
+_bug2 = {
+ "id": 75,
+ "title": "Bug with a patch needing review.",
+ "assigned_to_email": "foo@foo.com",
+ "attachments": [_patch3],
+}
+
+
+_bug3 = {
+ "id": 76,
+ "title": "The third bug",
+ "assigned_to_email": _unassigned_email,
+ "attachments": [_patch7],
+}
+
+
+_bug4 = {
+ "id": 77,
+ "title": "The fourth bug",
+ "assigned_to_email": "foo@foo.com",
+ "attachments": [_patch4, _patch5, _patch6],
+}
+
+
+class MockBugzillaQueries(Mock):
+
+ def __init__(self, bugzilla):
+ Mock.__init__(self)
+ self._bugzilla = bugzilla
+
+ def _all_bugs(self):
+ return map(lambda bug_dictionary: Bug(bug_dictionary, self._bugzilla),
+ self._bugzilla.bug_cache.values())
+
+ def fetch_bug_ids_from_commit_queue(self):
+ bugs_with_commit_queued_patches = filter(
+ lambda bug: bug.commit_queued_patches(),
+ self._all_bugs())
+ return map(lambda bug: bug.id(), bugs_with_commit_queued_patches)
+
+ def fetch_attachment_ids_from_review_queue(self):
+ unreviewed_patches = sum([bug.unreviewed_patches()
+ for bug in self._all_bugs()], [])
+ return map(lambda patch: patch.id(), unreviewed_patches)
+
+ def fetch_patches_from_commit_queue(self):
+ return sum([bug.commit_queued_patches()
+ for bug in self._all_bugs()], [])
+
+ def fetch_bug_ids_from_pending_commit_list(self):
+ bugs_with_reviewed_patches = filter(lambda bug: bug.reviewed_patches(),
+ self._all_bugs())
+ bug_ids = map(lambda bug: bug.id(), bugs_with_reviewed_patches)
+ # NOTE: This manual hack here is to allow testing logging in
+ # test_assign_to_committer the real pending-commit query on bugzilla
+ # will return bugs with patches which have r+, but are also obsolete.
+ return bug_ids + [76]
+
+ def fetch_patches_from_pending_commit_list(self):
+ return sum([bug.reviewed_patches() for bug in self._all_bugs()], [])
+
+
+# FIXME: Bugzilla is the wrong Mock-point. Once we have a BugzillaNetwork
+# class we should mock that instead.
+# Most of this class is just copy/paste from Bugzilla.
+
+
+class MockBugzilla(Mock):
+
+ bug_server_url = "http://example.com"
+
+ unassigned_email = _unassigned_email
+
+ bug_cache = _id_to_object_dictionary(_bug1, _bug2, _bug3, _bug4)
+
+ attachment_cache = _id_to_object_dictionary(_patch1,
+ _patch2,
+ _patch3,
+ _patch4,
+ _patch5,
+ _patch6,
+ _patch7)
+
+ def __init__(self):
+ Mock.__init__(self)
+ self.queries = MockBugzillaQueries(self)
+ self.committers = CommitterList(reviewers=[Reviewer("Foo Bar",
+ "foo@bar.com")])
+
+ def fetch_bug(self, bug_id):
+ return Bug(self.bug_cache.get(bug_id), self)
+
+ def fetch_attachment(self, attachment_id):
+ # This could be changed to .get() if we wish to allow failed lookups.
+ attachment_dictionary = self.attachment_cache[attachment_id]
+ bug = self.fetch_bug(attachment_dictionary["bug_id"])
+ for attachment in bug.attachments(include_obsolete=True):
+ if attachment.id() == int(attachment_id):
+ return attachment
+
+ def bug_url_for_bug_id(self, bug_id):
+ return "%s/%s" % (self.bug_server_url, bug_id)
+
+ def fetch_bug_dictionary(self, bug_id):
+ return self.bug_cache.get(bug_id)
+
+ def attachment_url_for_id(self, attachment_id, action="view"):
+ action_param = ""
+ if action and action != "view":
+ action_param = "&action=%s" % action
+ return "%s/%s%s" % (self.bug_server_url, attachment_id, action_param)
+
+
+class MockBuildBot(Mock):
+
+ def builder_statuses(self):
+ return [{
+ "name": "Builder1",
+ "is_green": True,
+ }, {
+ "name": "Builder2",
+ "is_green": True,
+ }]
+
+ def red_core_builders_names(self):
+ return []
+
+
+class MockSCM(Mock):
+
+ def __init__(self):
+ Mock.__init__(self)
+ self.checkout_root = os.getcwd()
+
+ def create_patch(self):
+ return "Patch1"
+
+ def commit_ids_from_commitish_arguments(self, args):
+ return ["Commitish1", "Commitish2"]
+
+ def commit_message_for_local_commit(self, commit_id):
+ if commit_id == "Commitish1":
+ return CommitMessage("CommitMessage1\n" \
+ "https://bugs.example.org/show_bug.cgi?id=42\n")
+ if commit_id == "Commitish2":
+ return CommitMessage("CommitMessage2\n" \
+ "https://bugs.example.org/show_bug.cgi?id=75\n")
+ raise Exception("Bogus commit_id in commit_message_for_local_commit.")
+
+ def create_patch_from_local_commit(self, commit_id):
+ if commit_id == "Commitish1":
+ return "Patch1"
+ if commit_id == "Commitish2":
+ return "Patch2"
+ raise Exception("Bogus commit_id in commit_message_for_local_commit.")
+
+ def diff_for_revision(self, revision):
+ return "DiffForRevision%s\n" \
+ "http://bugs.webkit.org/show_bug.cgi?id=12345" % revision
+
+ def svn_revision_from_commit_text(self, commit_text):
+ return "49824"
+
+ def modified_changelogs(self):
+ # Ideally we'd return something more interesting here. The problem is
+ # that LandDiff will try to actually read the path from disk!
+ return []
+
+
+class MockUser(object):
+
+ def prompt(self, message):
+ return "Mock user response"
+
+ def edit(self, files):
+ pass
+
+ def page(self, message):
+ pass
+
+ def confirm(self, message=None):
+ return True
+
+ def open_url(self, url):
+ log("MOCK: user.open_url: %s" % url)
+ pass
+
+
+class MockStatusServer(object):
+
+ def __init__(self):
+ self.host = "example.com"
+
+ def patch_status(self, queue_name, patch_id):
+ return None
+
+ def update_status(self, queue_name, status, patch=None, results_file=None):
+ return 187
+
+
+class MockBugzillaTool():
+
+ def __init__(self):
+ self.bugs = MockBugzilla()
+ self.buildbot = MockBuildBot()
+ self.executive = Mock()
+ self.user = MockUser()
+ self._scm = MockSCM()
+ self.status_server = MockStatusServer()
+
+ def scm(self):
+ return self._scm
+
+ def path(self):
+ return "echo"
diff --git a/WebKitTools/Scripts/modules/multicommandtool.py b/WebKitTools/Scripts/webkitpy/multicommandtool.py
index 0475cf1..10cf426 100644
--- a/WebKitTools/Scripts/modules/multicommandtool.py
+++ b/WebKitTools/Scripts/webkitpy/multicommandtool.py
@@ -35,20 +35,36 @@ import sys
from optparse import OptionParser, IndentedHelpFormatter, SUPPRESS_USAGE, make_option
-from modules.grammar import pluralize
-from modules.logging import log
+from webkitpy.grammar import pluralize
+from webkitpy.webkit_logging import log
+
class Command(object):
name = None
- # show_in_main_help = False # Subclasses must define show_in_main_help, we leave it out here to enforce that.
- def __init__(self, help_text, argument_names=None, options=None, requires_local_commits=False):
+ show_in_main_help = False
+ def __init__(self, help_text, argument_names=None, options=None, long_help=None, requires_local_commits=False):
self.help_text = help_text
+ self.long_help = long_help
self.argument_names = argument_names
self.required_arguments = self._parse_required_arguments(argument_names)
self.options = options
- self.option_parser = HelpPrintingOptionParser(usage=SUPPRESS_USAGE, add_help_option=False, option_list=self.options)
self.requires_local_commits = requires_local_commits
self.tool = None
+ # option_parser can be overriden by the tool using set_option_parser
+ # This default parser will be used for standalone_help printing.
+ self.option_parser = HelpPrintingOptionParser(usage=SUPPRESS_USAGE, add_help_option=False, option_list=self.options)
+
+ # This design is slightly awkward, but we need the
+ # the tool to be able to create and modify the option_parser
+ # before it knows what Command to run.
+ def set_option_parser(self, option_parser):
+ self.option_parser = option_parser
+ self._add_options_to_parser()
+
+ def _add_options_to_parser(self):
+ options = self.options or []
+ for option in options:
+ self.option_parser.add_option(option)
# The tool calls bind_to_tool on each Command after adding it to its list.
def bind_to_tool(self, tool):
@@ -84,28 +100,44 @@ class Command(object):
def parse_args(self, args):
return self.option_parser.parse_args(args)
- def check_arguments_and_execute(self, args_after_command_name, tool):
- (command_options, command_args) = self.parse_args(args_after_command_name)
-
- if len(command_args) < len(self.required_arguments):
+ def check_arguments_and_execute(self, options, args, tool=None):
+ if len(args) < len(self.required_arguments):
log("%s required, %s provided. Provided: %s Required: %s\nSee '%s help %s' for usage." % (
pluralize("argument", len(self.required_arguments)),
- pluralize("argument", len(command_args)),
- "'%s'" % " ".join(command_args),
+ pluralize("argument", len(args)),
+ "'%s'" % " ".join(args),
" ".join(self.required_arguments),
tool.name(),
self.name))
return 1
- return self.execute(command_options, command_args, tool) or 0
+ return self.execute(options, args, tool) or 0
def standalone_help(self):
- help_text = self.name_with_arguments().ljust(len(self.name_with_arguments()) + 3) + self.help_text + "\n"
+ help_text = self.name_with_arguments().ljust(len(self.name_with_arguments()) + 3) + self.help_text + "\n\n"
+ if self.long_help:
+ help_text += "%s\n\n" % self.long_help
help_text += self.option_parser.format_option_help(IndentedHelpFormatter())
return help_text
def execute(self, options, args, tool):
raise NotImplementedError, "subclasses must implement"
+ # main() exists so that Commands can be turned into stand-alone scripts.
+ # Other parts of the code will likely require modification to work stand-alone.
+ def main(self, args=sys.argv):
+ (options, args) = self.parse_args(args)
+ # Some commands might require a dummy tool
+ return self.check_arguments_and_execute(options, args)
+
+
+# FIXME: This should just be rolled into Command. help_text and argument_names do not need to be instance variables.
+class AbstractDeclarativeCommand(Command):
+ help_text = None
+ argument_names = None
+ long_help = None
+ def __init__(self, options=None, **kwargs):
+ Command.__init__(self, self.help_text, self.argument_names, options=options, long_help=self.long_help, **kwargs)
+
class HelpPrintingOptionParser(OptionParser):
def __init__(self, epilog_method=None, *args, **kwargs):
@@ -115,6 +147,7 @@ class HelpPrintingOptionParser(OptionParser):
def error(self, msg):
self.print_usage(sys.stderr)
error_message = "%s: error: %s\n" % (self.get_prog_name(), msg)
+ # This method is overriden to add this one line to the output:
error_message += "\nType \"%s --help\" to see usage.\n" % self.get_prog_name()
self.exit(1, error_message)
@@ -126,15 +159,16 @@ class HelpPrintingOptionParser(OptionParser):
return ""
-class HelpCommand(Command):
+class HelpCommand(AbstractDeclarativeCommand):
name = "help"
- show_in_main_help = False
+ help_text = "Display information about this program or its subcommands"
+ argument_names = "[COMMAND]"
def __init__(self):
options = [
make_option("-a", "--all-commands", action="store_true", dest="show_all_commands", help="Print all available commands"),
]
- Command.__init__(self, "Display information about this program or its subcommands", "[COMMAND]", options=options)
+ AbstractDeclarativeCommand.__init__(self, options)
self.show_all_commands = False # A hack used to pass --all-commands to _help_epilog even though it's called by the OptionParser.
def _help_epilog(self):
@@ -151,7 +185,12 @@ class HelpCommand(Command):
epilog += "%s\n" % "".join(command_help_texts)
epilog += "See '%prog help --all-commands' to list all commands.\n"
epilog += "See '%prog help COMMAND' for more information on a specific command.\n"
- return self.tool.global_option_parser.expand_prog_name(epilog)
+ return epilog.replace("%prog", self.tool.name()) # Use of %prog here mimics OptionParser.expand_prog_name().
+
+ # FIXME: This is a hack so that we don't show --all-commands as a global option:
+ def _remove_help_options(self):
+ for option in self.options:
+ self.option_parser.remove_option(option.get_opt_string())
def execute(self, options, args, tool):
if args:
@@ -161,12 +200,16 @@ class HelpCommand(Command):
return 0
self.show_all_commands = options.show_all_commands
- tool.global_option_parser.print_help()
+ self._remove_help_options()
+ self.option_parser.print_help()
return 0
class MultiCommandTool(object):
+ global_options = None
+
def __init__(self, name=None, commands=None):
+ self._name = name or OptionParser(prog=name).get_prog_name() # OptionParser has nice logic for fetching the name.
# Allow the unit tests to disable command auto-discovery.
self.commands = commands or [cls() for cls in self._find_all_commands() if cls.name]
self.help_command = self.command_by_name(HelpCommand.name)
@@ -176,7 +219,6 @@ class MultiCommandTool(object):
self.commands.append(self.help_command)
for command in self.commands:
command.bind_to_tool(self)
- self.global_option_parser = HelpPrintingOptionParser(epilog_method=self.help_command._help_epilog, prog=name, usage=self._usage_line())
@classmethod
def _add_all_subclasses(cls, class_to_crawl, seen_classes):
@@ -191,21 +233,15 @@ class MultiCommandTool(object):
cls._add_all_subclasses(Command, commands)
return sorted(commands)
- @staticmethod
- def _usage_line():
- return "Usage: %prog [options] COMMAND [ARGS]"
-
def name(self):
- return self.global_option_parser.get_prog_name()
+ return self._name
- def handle_global_args(self, args):
- (options, args) = self.global_option_parser.parse_args(args)
- # We should never hit this because _split_args splits at the first arg without a leading "-".
- if args:
- self.global_option_parser.error("Extra arguments before command: %s" % args)
+ def _create_option_parser(self):
+ usage = "Usage: %prog [options] COMMAND [ARGS]"
+ return HelpPrintingOptionParser(epilog_method=self.help_command._help_epilog, prog=self.name(), usage=usage)
@staticmethod
- def _split_args(args):
+ def _split_command_name_from_args(args):
# Assume the first argument which doesn't start with "-" is the command name.
command_index = 0
for arg in args:
@@ -213,12 +249,10 @@ class MultiCommandTool(object):
break
command_index += 1
else:
- return (args[:], None, [])
+ return (None, args[:])
- global_args = args[:command_index]
command = args[command_index]
- command_args = args[command_index + 1:]
- return (global_args, command, command_args)
+ return (command, args[:command_index] + args[command_index + 1:])
def command_by_name(self, command_name):
for command in self.commands:
@@ -233,21 +267,33 @@ class MultiCommandTool(object):
return command.show_in_main_help
def should_execute_command(self, command):
- raise NotImplementedError, "subclasses must implement"
+ return True
+
+ def _add_global_options(self, option_parser):
+ global_options = self.global_options or []
+ for option in global_options:
+ option_parser.add_option(option)
+
+ def handle_global_options(self, options):
+ pass
def main(self, argv=sys.argv):
- (global_args, command_name, args_after_command_name) = self._split_args(argv[1:])
+ (command_name, args) = self._split_command_name_from_args(argv[1:])
- # Handle --help, etc:
- self.handle_global_args(global_args)
+ option_parser = self._create_option_parser()
+ self._add_global_options(option_parser)
command = self.command_by_name(command_name) or self.help_command
if not command:
- self.global_option_parser.error("%s is not a recognized command" % command_name)
+ option_parser.error("%s is not a recognized command" % command_name)
+
+ command.set_option_parser(option_parser)
+ (options, args) = command.parse_args(args)
+ self.handle_global_options(options)
(should_execute, failure_reason) = self.should_execute_command(command)
if not should_execute:
log(failure_reason)
- return 0
+ return 0 # FIXME: Should this really be 0?
- return command.check_arguments_and_execute(args_after_command_name, self)
+ return command.check_arguments_and_execute(options, args, self)
diff --git a/WebKitTools/Scripts/webkitpy/multicommandtool.pyc b/WebKitTools/Scripts/webkitpy/multicommandtool.pyc
new file mode 100644
index 0000000..4584643
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/multicommandtool.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/modules/multicommandtool_unittest.py b/WebKitTools/Scripts/webkitpy/multicommandtool_unittest.py
index c71cc09..ae77e73 100644
--- a/WebKitTools/Scripts/modules/multicommandtool_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/multicommandtool_unittest.py
@@ -29,7 +29,7 @@
import sys
import unittest
from multicommandtool import MultiCommandTool, Command
-from modules.outputcapture import OutputCapture
+from webkitpy.outputcapture import OutputCapture
from optparse import make_option
@@ -63,14 +63,9 @@ class CommandTest(unittest.TestCase):
def test_required_arguments(self):
two_required_arguments = TrivialCommand(argument_names="ARG1 ARG2 [ARG3]")
- capture = OutputCapture()
- capture.capture_output()
- exit_code = two_required_arguments.check_arguments_and_execute(["foo"], TrivialTool())
- (stdout_string, stderr_string) = capture.restore_output()
expected_missing_args_error = "2 arguments required, 1 argument provided. Provided: 'foo' Required: ARG1 ARG2\nSee 'trivial-tool help trivial' for usage.\n"
+ exit_code = OutputCapture().assert_outputs(self, two_required_arguments.check_arguments_and_execute, [None, ["foo"], TrivialTool()], expected_stderr=expected_missing_args_error)
self.assertEqual(exit_code, 1)
- self.assertEqual(stdout_string, "")
- self.assertEqual(stderr_string, expected_missing_args_error)
class TrivialTool(MultiCommandTool):
@@ -86,20 +81,20 @@ class TrivialTool(MultiCommandTool):
class MultiCommandToolTest(unittest.TestCase):
def _assert_split(self, args, expected_split):
- self.assertEqual(MultiCommandTool._split_args(args), expected_split)
+ self.assertEqual(MultiCommandTool._split_command_name_from_args(args), expected_split)
def test_split_args(self):
- # MultiCommandToolTest._split_args returns: (global_args, command, command_args)
+ # MultiCommandToolTest._split_command_name_from_args returns: (command, args)
full_args = ["--global-option", "command", "--option", "arg"]
- full_args_expected = (["--global-option"], "command", ["--option", "arg"])
+ full_args_expected = ("command", ["--global-option", "--option", "arg"])
self._assert_split(full_args, full_args_expected)
full_args = []
- full_args_expected = ([], None, [])
+ full_args_expected = (None, [])
self._assert_split(full_args, full_args_expected)
full_args = ["command", "arg"]
- full_args_expected = ([], "command", ["arg"])
+ full_args_expected = ("command", ["arg"])
self._assert_split(full_args, full_args_expected)
def test_command_by_name(self):
@@ -108,13 +103,9 @@ class MultiCommandToolTest(unittest.TestCase):
self.assertEqual(tool.command_by_name("trivial").name, "trivial")
self.assertEqual(tool.command_by_name("bar"), None)
- def _assert_tool_main_outputs(self, tool, main_args, expected_stdout, expected_stderr = "", exit_code=0):
- capture = OutputCapture()
- capture.capture_output()
- exit_code = tool.main(main_args)
- (stdout_string, stderr_string) = capture.restore_output()
- self.assertEqual(stdout_string, expected_stdout)
- self.assertEqual(expected_stderr, expected_stderr)
+ def _assert_tool_main_outputs(self, tool, main_args, expected_stdout, expected_stderr = "", expected_exit_code=0):
+ exit_code = OutputCapture().assert_outputs(self, tool.main, [main_args], expected_stdout=expected_stdout, expected_stderr=expected_stderr)
+ self.assertEqual(exit_code, expected_exit_code)
def test_global_help(self):
tool = TrivialTool(commands=[TrivialCommand(), UncommonCommand()])
@@ -130,6 +121,7 @@ See 'trivial-tool help --all-commands' to list all commands.
See 'trivial-tool help COMMAND' for more information on a specific command.
"""
+ self._assert_tool_main_outputs(tool, ["tool"], expected_common_commands_help)
self._assert_tool_main_outputs(tool, ["tool", "help"], expected_common_commands_help)
expected_all_commands_help = """Usage: trivial-tool [options] COMMAND [ARGS]
@@ -146,11 +138,14 @@ See 'trivial-tool help COMMAND' for more information on a specific command.
"""
self._assert_tool_main_outputs(tool, ["tool", "help", "--all-commands"], expected_all_commands_help)
+ # Test that arguments can be passed before commands as well
+ self._assert_tool_main_outputs(tool, ["tool", "--all-commands", "help"], expected_all_commands_help)
+
def test_command_help(self):
- command_with_options = TrivialCommand(options=[make_option("--my_option")])
+ command_with_options = TrivialCommand(options=[make_option("--my_option")], long_help="LONG HELP")
tool = TrivialTool(commands=[command_with_options])
- expected_subcommand_help = "trivial [options] help text\nOptions:\n --my_option=MY_OPTION\n\n"
+ expected_subcommand_help = "trivial [options] help text\n\nLONG HELP\n\nOptions:\n --my_option=MY_OPTION\n\n"
self._assert_tool_main_outputs(tool, ["tool", "help", "trivial"], expected_subcommand_help)
diff --git a/WebKitTools/Scripts/webkitpy/networktransaction.py b/WebKitTools/Scripts/webkitpy/networktransaction.py
new file mode 100644
index 0000000..65ea27d
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/networktransaction.py
@@ -0,0 +1,63 @@
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import time
+
+from mechanize import HTTPError
+from webkitpy.webkit_logging import log
+
+
+class NetworkTimeout(Exception):
+ pass
+
+
+class NetworkTransaction(object):
+ def __init__(self, initial_backoff_seconds=10, grown_factor=1.1, timeout_seconds=5*60*60):
+ self._initial_backoff_seconds = initial_backoff_seconds
+ self._grown_factor = grown_factor
+ self._timeout_seconds = timeout_seconds
+
+ def run(self, request):
+ self._total_sleep = 0
+ self._backoff_seconds = self._initial_backoff_seconds
+ while True:
+ try:
+ return request()
+ except HTTPError, e:
+ self._check_for_timeout()
+ log("Received HTTP status %s from server. Retrying in %s seconds..." % (e.code, self._backoff_seconds))
+ self._sleep()
+
+ def _check_for_timeout(self):
+ if self._total_sleep + self._backoff_seconds > self._timeout_seconds:
+ raise NetworkTimeout()
+
+ def _sleep(self):
+ time.sleep(self._backoff_seconds)
+ self._total_sleep += self._backoff_seconds
+ self._backoff_seconds *= self._grown_factor
diff --git a/WebKitTools/Scripts/webkitpy/networktransaction.pyc b/WebKitTools/Scripts/webkitpy/networktransaction.pyc
new file mode 100644
index 0000000..fb45bcb
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/networktransaction.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/networktransaction_unittest.py b/WebKitTools/Scripts/webkitpy/networktransaction_unittest.py
new file mode 100644
index 0000000..3cffe02
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/networktransaction_unittest.py
@@ -0,0 +1,80 @@
+# Copyright (c) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import unittest
+
+from mechanize import HTTPError
+from webkitpy.networktransaction import NetworkTransaction, NetworkTimeout
+
+class NetworkTransactionTest(unittest.TestCase):
+ exception = Exception("Test exception")
+
+ def test_success(self):
+ transaction = NetworkTransaction()
+ self.assertEqual(transaction.run(lambda: 42), 42)
+
+ def _raise_exception(self):
+ raise self.exception
+
+ def test_exception(self):
+ transaction = NetworkTransaction()
+ did_process_exception = False
+ did_throw_exception = True
+ try:
+ transaction.run(lambda: self._raise_exception())
+ did_throw_exception = False
+ except Exception, e:
+ did_process_exception = True
+ self.assertEqual(e, self.exception)
+ self.assertTrue(did_throw_exception)
+ self.assertTrue(did_process_exception)
+
+ def _raise_http_error(self):
+ self._run_count += 1
+ if self._run_count < 3:
+ raise HTTPError("http://example.com/", 500, "inteneral server error", None, None)
+ return 42
+
+ def test_retry(self):
+ self._run_count = 0
+ transaction = NetworkTransaction(initial_backoff_seconds=0)
+ self.assertEqual(transaction.run(lambda: self._raise_http_error()), 42)
+ self.assertEqual(self._run_count, 3)
+
+ def test_timeout(self):
+ self._run_count = 0
+ transaction = NetworkTransaction(initial_backoff_seconds=60*60, timeout_seconds=60)
+ did_process_exception = False
+ did_throw_exception = True
+ try:
+ transaction.run(lambda: self._raise_http_error())
+ did_throw_exception = False
+ except NetworkTimeout, e:
+ did_process_exception = True
+ self.assertTrue(did_throw_exception)
+ self.assertTrue(did_process_exception)
diff --git a/WebKitTools/Scripts/modules/outputcapture.py b/WebKitTools/Scripts/webkitpy/outputcapture.py
index f02fc5d..592a669 100644
--- a/WebKitTools/Scripts/modules/outputcapture.py
+++ b/WebKitTools/Scripts/webkitpy/outputcapture.py
@@ -51,3 +51,12 @@ class OutputCapture(object):
def restore_output(self):
return (self._restore_output_with_name("stdout"), self._restore_output_with_name("stderr"))
+
+ def assert_outputs(self, testcase, function, args=[], kwargs={}, expected_stdout="", expected_stderr=""):
+ self.capture_output()
+ return_value = function(*args, **kwargs)
+ (stdout_string, stderr_string) = self.restore_output()
+ testcase.assertEqual(stdout_string, expected_stdout)
+ testcase.assertEqual(stderr_string, expected_stderr)
+ # This is a little strange, but I don't know where else to return this information.
+ return return_value
diff --git a/WebKitTools/Scripts/modules/patchcollection.py b/WebKitTools/Scripts/webkitpy/patchcollection.py
index add8129..7e8603c 100644
--- a/WebKitTools/Scripts/modules/patchcollection.py
+++ b/WebKitTools/Scripts/webkitpy/patchcollection.py
@@ -37,11 +37,11 @@ class PersistentPatchCollectionDelegate:
def status_server(self):
raise NotImplementedError, "subclasses must implement"
+ def is_terminal_status(self, status):
+ raise NotImplementedError, "subclasses must implement"
+
class PersistentPatchCollection:
- _initial_status = "Pending"
- _pass_status = "Pass"
- _fail_status = "Fail"
def __init__(self, delegate):
self._delegate = delegate
self._name = self._delegate.collection_name()
@@ -53,7 +53,7 @@ class PersistentPatchCollection:
if cached:
return cached
status = self._status.patch_status(self._name, patch_id)
- if status:
+ if status and self._delegate.is_terminal_status(status):
self._status_cache[patch_id] = status
return status
@@ -61,11 +61,5 @@ class PersistentPatchCollection:
patch_ids = self._delegate.fetch_potential_patch_ids()
for patch_id in patch_ids:
status = self._cached_status(patch_id)
- if not status:
+ if not status or not self._delegate.is_terminal_status(status):
return patch_id
-
- def did_pass(self, patch):
- self._status.update_status(self._name, self._pass_status, patch)
-
- def did_fail(self, patch):
- self._status.update_status(self._name, self._fail_status, patch)
diff --git a/WebKitTools/Scripts/webkitpy/patchcollection.pyc b/WebKitTools/Scripts/webkitpy/patchcollection.pyc
new file mode 100644
index 0000000..18058d3
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/patchcollection.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/run-webkit-unittests b/WebKitTools/Scripts/webkitpy/patchcollection_unittest.py
index 3487299..811fed9 100755..100644
--- a/WebKitTools/Scripts/run-webkit-unittests
+++ b/WebKitTools/Scripts/webkitpy/patchcollection_unittest.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (c) 2009 Google Inc. All rights reserved.
+# Copyright (c) 2009, Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -29,21 +29,25 @@
import unittest
-from modules.bugzilla_unittest import *
-from modules.buildbot_unittest import *
-from modules.changelogs_unittest import *
-from modules.commands.download_unittest import *
-from modules.commands.upload_unittest import *
-from modules.commands.queries_unittest import *
-from modules.commands.queues_unittest import *
-from modules.committers_unittest import *
-from modules.cpp_style_unittest import *
-from modules.diff_parser_unittest import *
-from modules.logging_unittest import *
-from modules.multicommandtool_unittest import *
-from modules.scm_unittest import *
-from modules.webkitport_unittest import *
-from modules.workqueue_unittest import *
-
-if __name__ == "__main__":
- unittest.main()
+from webkitpy.mock import Mock
+from webkitpy.patchcollection import PersistentPatchCollection, PersistentPatchCollectionDelegate
+
+
+class TestPersistentPatchCollectionDelegate(PersistentPatchCollectionDelegate):
+ def collection_name(self):
+ return "test-collection"
+
+ def fetch_potential_patch_ids(self):
+ return [42, 192, 87]
+
+ def status_server(self):
+ return Mock()
+
+ def is_terminal_status(self, status):
+ return False
+
+
+class PersistentPatchCollectionTest(unittest.TestCase):
+ def test_next(self):
+ collection = PersistentPatchCollection(TestPersistentPatchCollectionDelegate())
+ collection.next()
diff --git a/WebKitTools/Scripts/modules/workqueue.py b/WebKitTools/Scripts/webkitpy/queueengine.py
index f8cbba8..d14177d 100644
--- a/WebKitTools/Scripts/modules/workqueue.py
+++ b/WebKitTools/Scripts/webkitpy/queueengine.py
@@ -34,21 +34,15 @@ import traceback
from datetime import datetime, timedelta
-from modules.executive import ScriptError
-from modules.logging import log, OutputTee
-from modules.statusbot import StatusBot
-
-class WorkQueueDelegate:
- def queue_name(self):
- raise NotImplementedError, "subclasses must implement"
+from webkitpy.executive import ScriptError
+from webkitpy.webkit_logging import log, OutputTee
+from webkitpy.statusserver import StatusServer
+class QueueEngineDelegate:
def queue_log_path(self):
raise NotImplementedError, "subclasses must implement"
- def work_logs_directory(self):
- raise NotImplementedError, "subclasses must implement"
-
- def status_host(self):
+ def work_item_log_path(self, work_item):
raise NotImplementedError, "subclasses must implement"
def begin_work_queue(self):
@@ -71,7 +65,7 @@ class WorkQueueDelegate:
raise NotImplementedError, "subclasses must implement"
-class WorkQueue:
+class QueueEngine:
def __init__(self, name, delegate):
self._name = name
self._delegate = delegate
@@ -90,41 +84,38 @@ class WorkQueue:
def run(self):
self._begin_logging()
- self.status_bot = StatusBot(host=self._delegate.status_host())
self._delegate.begin_work_queue()
while (self._delegate.should_continue_work_queue()):
- self._ensure_work_log_closed()
try:
+ self._ensure_work_log_closed()
work_item = self._delegate.next_work_item()
if not work_item:
- self._update_status_and_sleep("Empty queue.")
+ self._sleep("No work item.")
continue
- (safe_to_proceed, waiting_message, patch) = self._delegate.should_proceed_with_work_item(work_item)
- if not safe_to_proceed:
- self._update_status_and_sleep(waiting_message)
+ if not self._delegate.should_proceed_with_work_item(work_item):
+ self._sleep("Not proceeding with work item.")
continue
- self.status_bot.update_status(self._name, waiting_message, patch)
+
+ # FIXME: Work logs should not depend on bug_id specificaly.
+ # This looks fixed, no?
+ self._open_work_log(work_item)
+ try:
+ self._delegate.process_work_item(work_item)
+ except ScriptError, e:
+ # Use a special exit code to indicate that the error was already
+ # handled in the child process and we should just keep looping.
+ if e.exit_code == self.handled_error_code:
+ continue
+ message = "Unexpected failure when landing patch! Please file a bug against webkit-patch.\n%s" % e.message_with_output()
+ self._delegate.handle_unexpected_error(work_item, message)
except KeyboardInterrupt, e:
log("\nUser terminated queue.")
return 1
except Exception, e:
traceback.print_exc()
# Don't try tell the status bot, in case telling it causes an exception.
- self._sleep("Exception while preparing queue: %s." % e)
- continue
-
- # FIXME: Work logs should not depend on bug_id specificaly.
- self._open_work_log(patch["bug_id"])
- try:
- self._delegate.process_work_item(work_item)
- except ScriptError, e:
- # Use a special exit code to indicate that the error was already
- # handled in the child process and we should just keep looping.
- if e.exit_code == self.handled_error_code:
- continue
- message = "Unexpected failure when landing patch! Please file a bug against bugzilla-tool.\n%s" % e.message_with_output()
- self._delegate.handle_unexpected_error(work_item, message)
+ self._sleep("Exception while preparing queue")
# Never reached.
self._ensure_work_log_closed()
@@ -132,9 +123,9 @@ class WorkQueue:
self._queue_log = self._output_tee.add_log(self._delegate.queue_log_path())
self._work_log = None
- def _open_work_log(self, bug_id):
- work_log_path = os.path.join(self._delegate.work_logs_directory(), "%s.log" % bug_id)
- self._work_log = self._output_tee.add_log(work_log_path)
+ def _open_work_log(self, work_item):
+ work_item_log_path = self._delegate.work_item_log_path(work_item)
+ self._work_log = self._output_tee.add_log(work_item_log_path)
def _ensure_work_log_closed(self):
# If we still have a bug log open, close it.
@@ -151,9 +142,3 @@ class WorkQueue:
def _sleep(cls, message):
log(cls._sleep_message(message))
time.sleep(cls.seconds_to_sleep)
-
- def _update_status_and_sleep(self, message):
- status_message = self._sleep_message(message)
- self.status_bot.update_status(self._name, status_message)
- log(status_message)
- time.sleep(self.seconds_to_sleep)
diff --git a/WebKitTools/Scripts/webkitpy/queueengine.pyc b/WebKitTools/Scripts/webkitpy/queueengine.pyc
new file mode 100644
index 0000000..635bb57
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/queueengine.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/modules/workqueue_unittest.py b/WebKitTools/Scripts/webkitpy/queueengine_unittest.py
index ed77b5f..a4036ea 100644
--- a/WebKitTools/Scripts/modules/workqueue_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/queueengine_unittest.py
@@ -32,10 +32,10 @@ import shutil
import tempfile
import unittest
-from modules.executive import ScriptError
-from modules.workqueue import WorkQueue, WorkQueueDelegate
+from webkitpy.executive import ScriptError
+from webkitpy.queueengine import QueueEngine, QueueEngineDelegate
-class LoggingDelegate(WorkQueueDelegate):
+class LoggingDelegate(QueueEngineDelegate):
def __init__(self, test):
self._test = test
self._callbacks = []
@@ -43,12 +43,11 @@ class LoggingDelegate(WorkQueueDelegate):
expected_callbacks = [
'queue_log_path',
- 'status_host',
'begin_work_queue',
'should_continue_work_queue',
'next_work_item',
'should_proceed_with_work_item',
- 'work_logs_directory',
+ 'work_item_log_path',
'process_work_item',
'should_continue_work_queue'
]
@@ -60,13 +59,9 @@ class LoggingDelegate(WorkQueueDelegate):
self.record("queue_log_path")
return os.path.join(self._test.temp_dir, "queue_log_path")
- def work_logs_directory(self):
- self.record("work_logs_directory")
- return os.path.join(self._test.temp_dir, "work_log_path")
-
- def status_host(self):
- self.record("status_host")
- return None
+ def work_item_log_path(self, work_item):
+ self.record("work_item_log_path")
+ return os.path.join(self._test.temp_dir, "work_log_path", "%s.log" % work_item)
def begin_work_queue(self):
self.record("begin_work_queue")
@@ -111,33 +106,32 @@ class NotSafeToProceedDelegate(LoggingDelegate):
def should_proceed_with_work_item(self, work_item):
self.record("should_proceed_with_work_item")
self._test.assertEquals(work_item, "work_item")
- fake_patch = { 'bug_id' : 42 }
- return (False, "waiting_message", fake_patch)
+ return False
-class FastWorkQueue(WorkQueue):
+class FastQueueEngine(QueueEngine):
def __init__(self, delegate):
- WorkQueue.__init__(self, "fast-queue", delegate)
+ QueueEngine.__init__(self, "fast-queue", delegate)
# No sleep for the wicked.
seconds_to_sleep = 0
- def _update_status_and_sleep(self, message):
+ def _sleep(self, message):
pass
-class WorkQueueTest(unittest.TestCase):
+class QueueEngineTest(unittest.TestCase):
def test_trivial(self):
delegate = LoggingDelegate(self)
- work_queue = WorkQueue("trivial-queue", delegate)
+ work_queue = QueueEngine("trivial-queue", delegate)
work_queue.run()
self.assertEquals(delegate._callbacks, LoggingDelegate.expected_callbacks)
- self.assertTrue(os.path.exists(delegate.queue_log_path()))
- self.assertTrue(os.path.exists(os.path.join(delegate.work_logs_directory(), "42.log")))
+ self.assertTrue(os.path.exists(os.path.join(self.temp_dir, "queue_log_path")))
+ self.assertTrue(os.path.exists(os.path.join(self.temp_dir, "work_log_path", "work_item.log")))
def test_unexpected_error(self):
delegate = ThrowErrorDelegate(self, 3)
- work_queue = WorkQueue("error-queue", delegate)
+ work_queue = QueueEngine("error-queue", delegate)
work_queue.run()
expected_callbacks = LoggingDelegate.expected_callbacks[:]
work_item_index = expected_callbacks.index('process_work_item')
@@ -147,14 +141,14 @@ class WorkQueueTest(unittest.TestCase):
self.assertEquals(delegate._callbacks, expected_callbacks)
def test_handled_error(self):
- delegate = ThrowErrorDelegate(self, WorkQueue.handled_error_code)
- work_queue = WorkQueue("handled-error-queue", delegate)
+ delegate = ThrowErrorDelegate(self, QueueEngine.handled_error_code)
+ work_queue = QueueEngine("handled-error-queue", delegate)
work_queue.run()
self.assertEquals(delegate._callbacks, LoggingDelegate.expected_callbacks)
def test_not_safe_to_proceed(self):
delegate = NotSafeToProceedDelegate(self)
- work_queue = FastWorkQueue(delegate)
+ work_queue = FastQueueEngine(delegate)
work_queue.run()
expected_callbacks = LoggingDelegate.expected_callbacks[:]
next_work_item_index = expected_callbacks.index('next_work_item')
diff --git a/WebKitTools/Scripts/modules/scm.py b/WebKitTools/Scripts/webkitpy/scm.py
index ff26693..743f3fe 100644
--- a/WebKitTools/Scripts/modules/scm.py
+++ b/WebKitTools/Scripts/webkitpy/scm.py
@@ -34,9 +34,9 @@ import re
import subprocess
# Import WebKit-specific modules.
-from modules.changelogs import ChangeLog
-from modules.executive import Executive, run_command, ScriptError
-from modules.logging import error, log
+from webkitpy.changelogs import ChangeLog
+from webkitpy.executive import Executive, run_command, ScriptError
+from webkitpy.webkit_logging import error, log
def detect_scm_system(path):
if SVN.in_working_directory(path):
@@ -123,10 +123,11 @@ class SCM:
def apply_patch(self, patch, force=False):
# It's possible that the patch was not made from the root directory.
# We should detect and handle that case.
- curl_process = subprocess.Popen(['curl', '--location', '--silent', '--show-error', patch['url']], stdout=subprocess.PIPE)
+ # FIXME: scm.py should not deal with fetching Attachment data. Attachment should just have a .data() accessor.
+ curl_process = subprocess.Popen(['curl', '--location', '--silent', '--show-error', patch.url()], stdout=subprocess.PIPE)
args = [self.script_path('svn-apply')]
- if patch.get('reviewer'):
- args += ['--reviewer', patch['reviewer']]
+ if patch.reviewer():
+ args += ['--reviewer', patch.reviewer().full_name]
if force:
args.append('--force')
diff --git a/WebKitTools/Scripts/webkitpy/scm.pyc b/WebKitTools/Scripts/webkitpy/scm.pyc
new file mode 100644
index 0000000..520f611
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/scm.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/modules/scm_unittest.py b/WebKitTools/Scripts/webkitpy/scm_unittest.py
index 8e82f3c..73faf40 100644
--- a/WebKitTools/Scripts/modules/scm_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/scm_unittest.py
@@ -38,8 +38,9 @@ import unittest
import urllib
from datetime import date
-from modules.executive import Executive, run_command, ScriptError
-from modules.scm import detect_scm_system, SCM, CheckoutNeedsUpdate, commit_error_handler
+from webkitpy.executive import Executive, run_command, ScriptError
+from webkitpy.scm import detect_scm_system, SCM, CheckoutNeedsUpdate, commit_error_handler
+from webkitpy.bugzilla import Attachment # FIXME: This should not be needed
# Eventually we will want to write tests which work for both scms. (like update_webkit, changed_files, etc.)
# Perhaps through some SCMTest base-class which both SVNTest and GitTest inherit from.
@@ -168,7 +169,7 @@ class SCMTest(unittest.TestCase):
patch['reviewer'] = 'Joe Cool'
patch['bug_id'] = '12345'
patch['url'] = 'file://%s' % urllib.pathname2url(patch_path)
- return patch
+ return Attachment(patch, None) # FIXME: This is a hack, scm.py shouldn't be fetching attachment data.
def _setup_webkittools_scripts_symlink(self, local_scm):
webkit_scm = detect_scm_system(os.path.dirname(os.path.abspath(__file__)))
diff --git a/WebKitTools/Scripts/modules/statusbot.py b/WebKitTools/Scripts/webkitpy/statusserver.py
index 350aebf..ff0ddfa 100644
--- a/WebKitTools/Scripts/modules/statusbot.py
+++ b/WebKitTools/Scripts/webkitpy/statusserver.py
@@ -25,31 +25,19 @@
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# WebKit's Python module for interacting with the Commit Queue status page.
-# WebKit includes a built copy of BeautifulSoup in Scripts/modules
+from webkitpy.networktransaction import NetworkTransaction
+from webkitpy.webkit_logging import log
+from mechanize import Browser
+
+# WebKit includes a built copy of BeautifulSoup in Scripts/webkitpy
# so this import should always succeed.
from .BeautifulSoup import BeautifulSoup
-try:
- from mechanize import Browser
-except ImportError, e:
- print """
-mechanize is required.
-
-To install:
-sudo easy_install mechanize
-
-Or from the web:
-http://wwwsearch.sourceforge.net/mechanize/
-"""
- exit(1)
-
import urllib2
-class StatusBot:
+class StatusServer:
default_host = "webkit-commit-queue.appspot.com"
def __init__(self, host=default_host):
@@ -57,30 +45,49 @@ class StatusBot:
self.browser = Browser()
def set_host(self, host):
- self.statusbot_host = host
- self.statusbot_server_url = "http://%s" % self.statusbot_host
+ self.host = host
+ self.url = "http://%s" % self.host
- def update_status(self, queue_name, status, patch=None, results_file=None):
- # During unit testing, statusbot_host is None
- if not self.statusbot_host:
+ def results_url_for_status(self, status_id):
+ return "%s/results/%s" % (self.url, status_id)
+
+ def _add_patch(self, patch):
+ if not patch:
+ return
+ if patch.bug_id():
+ self.browser["bug_id"] = str(patch.bug_id())
+ if patch.id():
+ self.browser["patch_id"] = str(patch.id())
+
+ def _add_results_file(self, results_file):
+ if not results_file:
return
+ self.browser.add_file(results_file, "text/plain", "results.txt", 'results_file')
- update_status_url = "%s/update-status" % self.statusbot_server_url
+ def _post_to_server(self, queue_name, status, patch, results_file):
+ if results_file:
+ # We might need to re-wind the file if we've already tried to post it.
+ results_file.seek(0)
+
+ update_status_url = "%s/update-status" % self.url
self.browser.open(update_status_url)
self.browser.select_form(name="update_status")
self.browser['queue_name'] = queue_name
- if patch:
- if patch.get('bug_id'):
- self.browser['bug_id'] = str(patch['bug_id'])
- if patch.get('id'):
- self.browser['patch_id'] = str(patch['id'])
+ self._add_patch(patch)
self.browser['status'] = status
- if results_file:
- self.browser.add_file(results_file, "text/plain", "results.txt", 'results_file')
- self.browser.submit()
+ self._add_results_file(results_file)
+ return self.browser.submit().read() # This is the id of the newly created status object.
+
+ def update_status(self, queue_name, status, patch=None, results_file=None):
+ # During unit testing, host is None
+ if not self.host:
+ return
+
+ log(status)
+ return NetworkTransaction().run(lambda: self._post_to_server(queue_name, status, patch, results_file))
def patch_status(self, queue_name, patch_id):
- update_status_url = "%s/patch-status/%s/%s" % (self.statusbot_server_url, queue_name, patch_id)
+ update_status_url = "%s/patch-status/%s/%s" % (self.url, queue_name, patch_id)
try:
return urllib2.urlopen(update_status_url).read()
except urllib2.HTTPError, e:
diff --git a/WebKitTools/Scripts/webkitpy/statusserver.pyc b/WebKitTools/Scripts/webkitpy/statusserver.pyc
new file mode 100644
index 0000000..2ba11b0
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/statusserver.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/__init__.py b/WebKitTools/Scripts/webkitpy/steps/__init__.py
new file mode 100644
index 0000000..5ae4bea
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/__init__.py
@@ -0,0 +1,56 @@
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# FIXME: Is this the right way to do this?
+from webkitpy.steps.applypatch import ApplyPatch
+from webkitpy.steps.applypatchwithlocalcommit import ApplyPatchWithLocalCommit
+from webkitpy.steps.build import Build
+from webkitpy.steps.checkstyle import CheckStyle
+from webkitpy.steps.cleanworkingdirectory import CleanWorkingDirectory
+from webkitpy.steps.cleanworkingdirectorywithlocalcommits import CleanWorkingDirectoryWithLocalCommits
+from webkitpy.steps.closebug import CloseBug
+from webkitpy.steps.closebugforlanddiff import CloseBugForLandDiff
+from webkitpy.steps.closepatch import ClosePatch
+from webkitpy.steps.commit import Commit
+from webkitpy.steps.completerollout import CompleteRollout
+from webkitpy.steps.confirmdiff import ConfirmDiff
+from webkitpy.steps.createbug import CreateBug
+from webkitpy.steps.editchangelog import EditChangeLog
+from webkitpy.steps.ensurebuildersaregreen import EnsureBuildersAreGreen
+from webkitpy.steps.ensurelocalcommitifneeded import EnsureLocalCommitIfNeeded
+from webkitpy.steps.obsoletepatches import ObsoletePatches
+from webkitpy.steps.options import Options
+from webkitpy.steps.postdiff import PostDiff
+from webkitpy.steps.postdiffforcommit import PostDiffForCommit
+from webkitpy.steps.preparechangelogforrevert import PrepareChangeLogForRevert
+from webkitpy.steps.preparechangelog import PrepareChangeLog
+from webkitpy.steps.promptforbugortitle import PromptForBugOrTitle
+from webkitpy.steps.revertrevision import RevertRevision
+from webkitpy.steps.runtests import RunTests
+from webkitpy.steps.updatechangelogswithreviewer import UpdateChangeLogsWithReviewer
+from webkitpy.steps.update import Update
diff --git a/WebKitTools/Scripts/webkitpy/steps/__init__.pyc b/WebKitTools/Scripts/webkitpy/steps/__init__.pyc
new file mode 100644
index 0000000..ccf513b
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/__init__.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/modules/commands/early_warning_system.py b/WebKitTools/Scripts/webkitpy/steps/abstractstep.py
index e8ef408..639cf55 100644
--- a/WebKitTools/Scripts/modules/commands/early_warning_system.py
+++ b/WebKitTools/Scripts/webkitpy/steps/abstractstep.py
@@ -1,6 +1,5 @@
-#!/usr/bin/env python
-# Copyright (c) 2009, Google Inc. All rights reserved.
-#
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
@@ -27,40 +26,44 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from modules.commands.queues import AbstractReviewQueue
-from modules.executive import ScriptError
-from modules.webkitport import WebKitPort
+from webkitpy.webkit_logging import log
+from webkitpy.webkitport import WebKitPort
+
-class AbstractEarlyWarningSystem(AbstractReviewQueue):
- def __init__(self):
- AbstractReviewQueue.__init__(self)
- self.port = WebKitPort.port(self.port_name)
+class AbstractStep(object):
+ def __init__(self, tool, options):
+ self._tool = tool
+ self._options = options
+ self._port = None
- def should_proceed_with_work_item(self, patch):
- try:
- self.run_bugzilla_tool(["build", self.port.flag(), "--force-clean", "--quiet"])
- except ScriptError, e:
- return (False, "Unable to perform a build.", None)
- return (True, "Building patch %s on bug %s." % (patch["id"], patch["bug_id"]), patch)
+ def _run_script(self, script_name, quiet=False, port=WebKitPort):
+ log("Running %s" % script_name)
+ # FIXME: This should use self.port()
+ self._tool.executive.run_and_throw_if_fail(port.script_path(script_name), quiet)
- def process_work_item(self, patch):
- self.run_bugzilla_tool([
- "build-attachment",
- self.port.flag(),
- "--force-clean",
- "--quiet",
- "--non-interactive",
- "--parent-command=%s" % self.name,
- "--no-update",
- patch["id"]])
- self._patches.did_pass(patch)
+ # FIXME: The port should live on the tool.
+ def port(self):
+ if self._port:
+ return self._port
+ self._port = WebKitPort.port(self._options.port)
+ return self._port
+ _well_known_keys = {
+ "diff" : lambda self: self._tool.scm().create_patch(),
+ "changelogs" : lambda self: self._tool.scm().modified_changelogs(),
+ }
-class QtEWS(AbstractEarlyWarningSystem):
- name = "qt-ews"
- port_name = "qt"
+ def cached_lookup(self, state, key, promise=None):
+ if state.get(key):
+ return state[key]
+ if not promise:
+ promise = self._well_known_keys.get(key)
+ state[key] = promise(self)
+ return state[key]
+ @classmethod
+ def options(cls):
+ return []
-class ChromiumEWS(AbstractEarlyWarningSystem):
- name = "chromium-ews"
- port_name = "chromium"
+ def run(self, state):
+ raise NotImplementedError, "subclasses must implement"
diff --git a/WebKitTools/Scripts/webkitpy/steps/abstractstep.pyc b/WebKitTools/Scripts/webkitpy/steps/abstractstep.pyc
new file mode 100644
index 0000000..d172c92
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/abstractstep.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/applypatch.py b/WebKitTools/Scripts/webkitpy/steps/applypatch.py
new file mode 100644
index 0000000..aba81ae
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/applypatch.py
@@ -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.
+
+from webkitpy.steps.abstractstep import AbstractStep
+from webkitpy.steps.options import Options
+from webkitpy.webkit_logging import log
+
+class ApplyPatch(AbstractStep):
+ @classmethod
+ def options(cls):
+ return [
+ Options.non_interactive,
+ ]
+
+ def run(self, state):
+ log("Processing patch %s from bug %s." % (state["patch"].id(), state["patch"].bug_id()))
+ self._tool.scm().apply_patch(state["patch"], force=self._options.non_interactive)
diff --git a/WebKitTools/Scripts/webkitpy/steps/applypatch.pyc b/WebKitTools/Scripts/webkitpy/steps/applypatch.pyc
new file mode 100644
index 0000000..0c5212d
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/applypatch.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/applypatchwithlocalcommit.py b/WebKitTools/Scripts/webkitpy/steps/applypatchwithlocalcommit.py
new file mode 100644
index 0000000..bfaf52a
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/applypatchwithlocalcommit.py
@@ -0,0 +1,43 @@
+# 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.
+
+from webkitpy.steps.applypatch import ApplyPatch
+from webkitpy.steps.options import Options
+
+class ApplyPatchWithLocalCommit(ApplyPatch):
+ @classmethod
+ def options(cls):
+ return [
+ Options.local_commit,
+ ] + ApplyPatch.options()
+
+ def run(self, state):
+ ApplyPatch.run(self, state)
+ if self._options.local_commit:
+ commit_message = self._tool.scm().commit_message_for_this_commit()
+ self._tool.scm().commit_locally_with_message(commit_message.message() or state["patch"].name())
diff --git a/WebKitTools/Scripts/webkitpy/steps/applypatchwithlocalcommit.pyc b/WebKitTools/Scripts/webkitpy/steps/applypatchwithlocalcommit.pyc
new file mode 100644
index 0000000..67afd10
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/applypatchwithlocalcommit.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/build.py b/WebKitTools/Scripts/webkitpy/steps/build.py
new file mode 100644
index 0000000..1823cff
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/build.py
@@ -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.
+
+from webkitpy.steps.abstractstep import AbstractStep
+from webkitpy.steps.options import Options
+from webkitpy.webkit_logging import log
+
+
+class Build(AbstractStep):
+ @classmethod
+ def options(cls):
+ return [
+ Options.build,
+ Options.quiet,
+ Options.build_style,
+ ]
+
+ def build(self, build_style):
+ self._tool.executive.run_and_throw_if_fail(self.port().build_webkit_command(build_style=build_style), self._options.quiet)
+
+ def run(self, state):
+ if not self._options.build:
+ return
+ log("Building WebKit")
+ if self._options.build_style == "both":
+ self.build("debug")
+ self.build("release")
+ else:
+ self.build(self._options.build_style)
diff --git a/WebKitTools/Scripts/webkitpy/steps/build.pyc b/WebKitTools/Scripts/webkitpy/steps/build.pyc
new file mode 100644
index 0000000..8e9e5ee
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/build.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/checkstyle.py b/WebKitTools/Scripts/webkitpy/steps/checkstyle.py
new file mode 100644
index 0000000..c8e20f8
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/checkstyle.py
@@ -0,0 +1,56 @@
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+
+from webkitpy.executive import ScriptError
+from webkitpy.steps.abstractstep import AbstractStep
+from webkitpy.steps.options import Options
+from webkitpy.webkit_logging import error
+
+class CheckStyle(AbstractStep):
+ @classmethod
+ def options(cls):
+ return [
+ Options.non_interactive,
+ Options.check_style,
+ ]
+
+ def run(self, state):
+ if not self._options.check_style:
+ return
+ os.chdir(self._tool.scm().checkout_root)
+ try:
+ self._run_script("check-webkit-style")
+ except ScriptError, e:
+ if self._options.non_interactive:
+ # We need to re-raise the exception here to have the
+ # style-queue do the right thing.
+ raise e
+ if not self._tool.user.confirm("Are you sure you want to continue?"):
+ exit(1)
diff --git a/WebKitTools/Scripts/webkitpy/steps/checkstyle.pyc b/WebKitTools/Scripts/webkitpy/steps/checkstyle.pyc
new file mode 100644
index 0000000..561036b
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/checkstyle.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/cleanworkingdirectory.py b/WebKitTools/Scripts/webkitpy/steps/cleanworkingdirectory.py
new file mode 100644
index 0000000..88e38f5
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/cleanworkingdirectory.py
@@ -0,0 +1,52 @@
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+
+from webkitpy.steps.abstractstep import AbstractStep
+from webkitpy.steps.options import Options
+
+
+class CleanWorkingDirectory(AbstractStep):
+ def __init__(self, tool, options, allow_local_commits=False):
+ AbstractStep.__init__(self, tool, options)
+ self._allow_local_commits = allow_local_commits
+
+ @classmethod
+ def options(cls):
+ return [
+ Options.force_clean,
+ Options.clean,
+ ]
+
+ def run(self, state):
+ os.chdir(self._tool.scm().checkout_root)
+ if not self._allow_local_commits:
+ self._tool.scm().ensure_no_local_commits(self._options.force_clean)
+ if self._options.clean:
+ self._tool.scm().ensure_clean_working_directory(force_clean=self._options.force_clean)
diff --git a/WebKitTools/Scripts/webkitpy/steps/cleanworkingdirectory.pyc b/WebKitTools/Scripts/webkitpy/steps/cleanworkingdirectory.pyc
new file mode 100644
index 0000000..11383f2
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/cleanworkingdirectory.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/cleanworkingdirectorywithlocalcommits.py b/WebKitTools/Scripts/webkitpy/steps/cleanworkingdirectorywithlocalcommits.py
new file mode 100644
index 0000000..cabeba2
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/cleanworkingdirectorywithlocalcommits.py
@@ -0,0 +1,34 @@
+# 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.
+
+from webkitpy.steps.cleanworkingdirectory import CleanWorkingDirectory
+
+class CleanWorkingDirectoryWithLocalCommits(CleanWorkingDirectory):
+ def __init__(self, tool, options):
+ # FIXME: This a bit of a hack. Consider doing this more cleanly.
+ CleanWorkingDirectory.__init__(self, tool, options, allow_local_commits=True)
diff --git a/WebKitTools/Scripts/webkitpy/steps/cleanworkingdirectorywithlocalcommits.pyc b/WebKitTools/Scripts/webkitpy/steps/cleanworkingdirectorywithlocalcommits.pyc
new file mode 100644
index 0000000..757d19a
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/cleanworkingdirectorywithlocalcommits.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/closebug.py b/WebKitTools/Scripts/webkitpy/steps/closebug.py
new file mode 100644
index 0000000..2640ee3
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/closebug.py
@@ -0,0 +1,51 @@
+# 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.
+
+from webkitpy.steps.abstractstep import AbstractStep
+from webkitpy.steps.options import Options
+from webkitpy.webkit_logging import log
+
+
+class CloseBug(AbstractStep):
+ @classmethod
+ def options(cls):
+ return [
+ Options.close_bug,
+ ]
+
+ def run(self, state):
+ if not self._options.close_bug:
+ return
+ # Check to make sure there are no r? or r+ patches on the bug before closing.
+ # Assume that r- patches are just previous patches someone forgot to obsolete.
+ patches = self._tool.bugs.fetch_bug(state["patch"].bug_id()).patches()
+ for patch in patches:
+ if patch.review() == "?" or patch.review() == "+":
+ log("Not closing bug %s as attachment %s has review=%s. Assuming there are more patches to land from this bug." % (patch.bug_id(), patch.id(), patch.review()))
+ return
+ self._tool.bugs.close_bug_as_fixed(state["patch"].bug_id(), "All reviewed patches have been landed. Closing bug.")
diff --git a/WebKitTools/Scripts/webkitpy/steps/closebug.pyc b/WebKitTools/Scripts/webkitpy/steps/closebug.pyc
new file mode 100644
index 0000000..356f430
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/closebug.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/closebugforlanddiff.py b/WebKitTools/Scripts/webkitpy/steps/closebugforlanddiff.py
new file mode 100644
index 0000000..43a0c66
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/closebugforlanddiff.py
@@ -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.
+
+from webkitpy.comments import bug_comment_from_commit_text
+from webkitpy.steps.abstractstep import AbstractStep
+from webkitpy.steps.options import Options
+from webkitpy.webkit_logging import log
+
+
+class CloseBugForLandDiff(AbstractStep):
+ @classmethod
+ def options(cls):
+ return [
+ Options.close_bug,
+ ]
+
+ def run(self, state):
+ comment_text = bug_comment_from_commit_text(self._tool.scm(), state["commit_text"])
+ bug_id = state.get("bug_id")
+ if not bug_id and state.get("patch"):
+ bug_id = state.get("patch").bug_id()
+
+ if bug_id:
+ log("Updating bug %s" % bug_id)
+ if self._options.close_bug:
+ self._tool.bugs.close_bug_as_fixed(bug_id, comment_text)
+ else:
+ # FIXME: We should a smart way to figure out if the patch is attached
+ # to the bug, and if so obsolete it.
+ self._tool.bugs.post_comment_to_bug(bug_id, comment_text)
+ else:
+ log(comment_text)
+ log("No bug id provided.")
diff --git a/WebKitTools/Scripts/webkitpy/steps/closebugforlanddiff.pyc b/WebKitTools/Scripts/webkitpy/steps/closebugforlanddiff.pyc
new file mode 100644
index 0000000..2dd3814
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/closebugforlanddiff.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/closebugforlanddiff_unittest.py b/WebKitTools/Scripts/webkitpy/steps/closebugforlanddiff_unittest.py
new file mode 100644
index 0000000..73561ab
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/closebugforlanddiff_unittest.py
@@ -0,0 +1,41 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import unittest
+
+from webkitpy.steps.closebugforlanddiff import CloseBugForLandDiff
+from webkitpy.mock import Mock
+from webkitpy.mock_bugzillatool import MockBugzillaTool
+from webkitpy.outputcapture import OutputCapture
+
+class CloseBugForLandDiffTest(unittest.TestCase):
+ def test_empty_state(self):
+ capture = OutputCapture()
+ step = CloseBugForLandDiff(MockBugzillaTool(), Mock())
+ expected_stderr = "Committed r49824: <http://trac.webkit.org/changeset/49824>\nNo bug id provided.\n"
+ capture.assert_outputs(self, step.run, [{"commit_text" : "Mock commit text"}], expected_stderr=expected_stderr)
diff --git a/WebKitTools/Scripts/webkitpy/steps/closepatch.py b/WebKitTools/Scripts/webkitpy/steps/closepatch.py
new file mode 100644
index 0000000..f20fe7e
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/closepatch.py
@@ -0,0 +1,36 @@
+# 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.
+
+from webkitpy.comments import bug_comment_from_commit_text
+from webkitpy.steps.abstractstep import AbstractStep
+
+
+class ClosePatch(AbstractStep):
+ def run(self, state):
+ comment_text = bug_comment_from_commit_text(self._tool.scm(), state["commit_text"])
+ self._tool.bugs.clear_attachment_flags(state["patch"].id(), comment_text)
diff --git a/WebKitTools/Scripts/webkitpy/steps/closepatch.pyc b/WebKitTools/Scripts/webkitpy/steps/closepatch.pyc
new file mode 100644
index 0000000..3a2a75b
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/closepatch.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/commit.py b/WebKitTools/Scripts/webkitpy/steps/commit.py
new file mode 100644
index 0000000..dd1fed7
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/commit.py
@@ -0,0 +1,35 @@
+# 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.
+
+from webkitpy.steps.abstractstep import AbstractStep
+
+
+class Commit(AbstractStep):
+ def run(self, state):
+ commit_message = self._tool.scm().commit_message_for_this_commit()
+ state["commit_text"] = self._tool.scm().commit_with_message(commit_message.message())
diff --git a/WebKitTools/Scripts/webkitpy/steps/commit.pyc b/WebKitTools/Scripts/webkitpy/steps/commit.pyc
new file mode 100644
index 0000000..fe9ef1a
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/commit.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/completerollout.py b/WebKitTools/Scripts/webkitpy/steps/completerollout.py
new file mode 100644
index 0000000..8534956
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/completerollout.py
@@ -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:
+#
+# * 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.
+
+from webkitpy.comments import bug_comment_from_commit_text
+from webkitpy.steps.build import Build
+from webkitpy.steps.commit import Commit
+from webkitpy.steps.metastep import MetaStep
+from webkitpy.steps.options import Options
+from webkitpy.webkit_logging import log
+
+
+class CompleteRollout(MetaStep):
+ substeps = [
+ Build,
+ Commit,
+ ]
+
+ @classmethod
+ def options(cls):
+ collected_options = cls._collect_options_from_steps(cls.substeps)
+ collected_options.append(Options.complete_rollout)
+ return collected_options
+
+ def run(self, state):
+ bug_id = state["bug_id"]
+ # FIXME: Fully automated rollout is not 100% idiot-proof yet, so for now just log with instructions on how to complete the rollout.
+ # Once we trust rollout we will remove this option.
+ if not self._options.complete_rollout:
+ log("\nNOTE: Rollout support is experimental.\nPlease verify the rollout diff and use \"webkit-patch land %s\" to commit the rollout." % bug_id)
+ return
+
+ MetaStep.run(self, state)
+
+ commit_comment = bug_comment_from_commit_text(self._tool.scm(), state["commit_text"])
+ comment_text = "Reverted r%s for reason:\n\n%s\n\n%s" % (state["revision"], state["reason"], commit_comment)
+
+ if not bug_id:
+ log(comment_text)
+ log("No bugs were updated.")
+ return
+ self._tool.bugs.reopen_bug(bug_id, comment_text)
diff --git a/WebKitTools/Scripts/webkitpy/steps/completerollout.pyc b/WebKitTools/Scripts/webkitpy/steps/completerollout.pyc
new file mode 100644
index 0000000..47312b8
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/completerollout.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/confirmdiff.py b/WebKitTools/Scripts/webkitpy/steps/confirmdiff.py
new file mode 100644
index 0000000..fc28f8f
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/confirmdiff.py
@@ -0,0 +1,47 @@
+# 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.
+
+from webkitpy.steps.abstractstep import AbstractStep
+from webkitpy.steps.options import Options
+from webkitpy.webkit_logging import error
+
+
+class ConfirmDiff(AbstractStep):
+ @classmethod
+ def options(cls):
+ return [
+ Options.confirm,
+ ]
+
+ def run(self, state):
+ if not self._options.confirm:
+ return
+ diff = self.cached_lookup(state, "diff")
+ self._tool.user.page(diff)
+ if not self._tool.user.confirm("Was that diff correct?"):
+ exit(1)
diff --git a/WebKitTools/Scripts/webkitpy/steps/confirmdiff.pyc b/WebKitTools/Scripts/webkitpy/steps/confirmdiff.pyc
new file mode 100644
index 0000000..d3fc1d4
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/confirmdiff.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/createbug.py b/WebKitTools/Scripts/webkitpy/steps/createbug.py
new file mode 100644
index 0000000..75bf17f
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/createbug.py
@@ -0,0 +1,45 @@
+# 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.
+
+from webkitpy.steps.abstractstep import AbstractStep
+from webkitpy.steps.options import Options
+
+
+class CreateBug(AbstractStep):
+ @classmethod
+ def options(cls):
+ return [
+ Options.cc,
+ Options.component,
+ ]
+
+ def run(self, state):
+ # No need to create a bug if we already have one.
+ if state.get("bug_id"):
+ return
+ state["bug_id"] = self._tool.bugs.create_bug(state["bug_title"], state["bug_description"], component=self._options.component, cc=self._options.cc)
diff --git a/WebKitTools/Scripts/webkitpy/steps/createbug.pyc b/WebKitTools/Scripts/webkitpy/steps/createbug.pyc
new file mode 100644
index 0000000..e27f5ec
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/createbug.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/editchangelog.py b/WebKitTools/Scripts/webkitpy/steps/editchangelog.py
new file mode 100644
index 0000000..d545c72
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/editchangelog.py
@@ -0,0 +1,37 @@
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+
+from webkitpy.steps.abstractstep import AbstractStep
+
+
+class EditChangeLog(AbstractStep):
+ def run(self, state):
+ os.chdir(self._tool.scm().checkout_root)
+ self._tool.user.edit(self.cached_lookup(state, "changelogs"))
diff --git a/WebKitTools/Scripts/webkitpy/steps/editchangelog.pyc b/WebKitTools/Scripts/webkitpy/steps/editchangelog.pyc
new file mode 100644
index 0000000..2ca5dbf
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/editchangelog.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/ensurebuildersaregreen.py b/WebKitTools/Scripts/webkitpy/steps/ensurebuildersaregreen.py
new file mode 100644
index 0000000..96f265a
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/ensurebuildersaregreen.py
@@ -0,0 +1,48 @@
+# 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.
+
+from webkitpy.steps.abstractstep import AbstractStep
+from webkitpy.steps.options import Options
+from webkitpy.webkit_logging import error
+
+
+class EnsureBuildersAreGreen(AbstractStep):
+ @classmethod
+ def options(cls):
+ return [
+ Options.check_builders,
+ ]
+
+ def run(self, state):
+ if not self._options.check_builders:
+ return
+ red_builders_names = self._tool.buildbot.red_core_builders_names()
+ if not red_builders_names:
+ return
+ red_builders_names = map(lambda name: "\"%s\"" % name, red_builders_names) # Add quotes around the names.
+ error("Builders [%s] are red, please do not commit.\nSee http://%s.\nPass --ignore-builders to bypass this check." % (", ".join(red_builders_names), self._tool.buildbot.buildbot_host))
diff --git a/WebKitTools/Scripts/webkitpy/steps/ensurebuildersaregreen.pyc b/WebKitTools/Scripts/webkitpy/steps/ensurebuildersaregreen.pyc
new file mode 100644
index 0000000..dd98935
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/ensurebuildersaregreen.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/ensurelocalcommitifneeded.py b/WebKitTools/Scripts/webkitpy/steps/ensurelocalcommitifneeded.py
new file mode 100644
index 0000000..cecf891
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/ensurelocalcommitifneeded.py
@@ -0,0 +1,43 @@
+# 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.
+
+from webkitpy.steps.abstractstep import AbstractStep
+from webkitpy.steps.options import Options
+from webkitpy.webkit_logging import error
+
+
+class EnsureLocalCommitIfNeeded(AbstractStep):
+ @classmethod
+ def options(cls):
+ return [
+ Options.local_commit,
+ ]
+
+ def run(self, state):
+ if self._options.local_commit and not self._tool.scm().supports_local_commits():
+ error("--local-commit passed, but %s does not support local commits" % self._tool.scm.display_name())
diff --git a/WebKitTools/Scripts/webkitpy/steps/ensurelocalcommitifneeded.pyc b/WebKitTools/Scripts/webkitpy/steps/ensurelocalcommitifneeded.pyc
new file mode 100644
index 0000000..18ce98a
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/ensurelocalcommitifneeded.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/metastep.py b/WebKitTools/Scripts/webkitpy/steps/metastep.py
new file mode 100644
index 0000000..9f368de
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/metastep.py
@@ -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.
+
+from webkitpy.steps.abstractstep import AbstractStep
+
+
+# FIXME: Unify with StepSequence? I'm not sure yet which is the better design.
+class MetaStep(AbstractStep):
+ substeps = [] # Override in subclasses
+ def __init__(self, tool, options):
+ AbstractStep.__init__(self, tool, options)
+ self._step_instances = []
+ for step_class in self.substeps:
+ self._step_instances.append(step_class(tool, options))
+
+ @staticmethod
+ def _collect_options_from_steps(steps):
+ collected_options = []
+ for step in steps:
+ collected_options = collected_options + step.options()
+ return collected_options
+
+ @classmethod
+ def options(cls):
+ return cls._collect_options_from_steps(cls.substeps)
+
+ def run(self, state):
+ for step in self._step_instances:
+ step.run(state)
diff --git a/WebKitTools/Scripts/webkitpy/steps/metastep.pyc b/WebKitTools/Scripts/webkitpy/steps/metastep.pyc
new file mode 100644
index 0000000..21d2bf6
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/metastep.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/obsoletepatches.py b/WebKitTools/Scripts/webkitpy/steps/obsoletepatches.py
new file mode 100644
index 0000000..dbdbabd
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/obsoletepatches.py
@@ -0,0 +1,51 @@
+# 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.
+
+from webkitpy.grammar import pluralize
+from webkitpy.steps.abstractstep import AbstractStep
+from webkitpy.steps.options import Options
+from webkitpy.webkit_logging import log
+
+
+class ObsoletePatches(AbstractStep):
+ @classmethod
+ def options(cls):
+ return [
+ Options.obsolete_patches,
+ ]
+
+ def run(self, state):
+ if not self._options.obsolete_patches:
+ return
+ bug_id = state["bug_id"]
+ patches = self._tool.bugs.fetch_bug(bug_id).patches()
+ if not patches:
+ return
+ log("Obsoleting %s on bug %s" % (pluralize("old patch", len(patches)), bug_id))
+ for patch in patches:
+ self._tool.bugs.obsolete_attachment(patch.id())
diff --git a/WebKitTools/Scripts/webkitpy/steps/obsoletepatches.pyc b/WebKitTools/Scripts/webkitpy/steps/obsoletepatches.pyc
new file mode 100644
index 0000000..4586950
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/obsoletepatches.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/options.py b/WebKitTools/Scripts/webkitpy/steps/options.py
new file mode 100644
index 0000000..8b28f27
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/options.py
@@ -0,0 +1,56 @@
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from optparse import make_option
+
+class Options(object):
+ build = make_option("--no-build", action="store_false", dest="build", default=True, help="Commit without building first, implies --no-test.")
+ build_style = make_option("--build-style", action="store", dest="build_style", default=None, help="Whether to build debug, release, or both.")
+ cc = make_option("--cc", action="store", type="string", dest="cc", help="Comma-separated list of email addresses to carbon-copy.")
+ check_builders = make_option("--ignore-builders", action="store_false", dest="check_builders", default=True, help="Don't check to see if the build.webkit.org builders are green before landing.")
+ check_style = make_option("--ignore-style", action="store_false", dest="check_style", default=True, help="Don't check to see if the patch has proper style before uploading.")
+ clean = make_option("--no-clean", action="store_false", dest="clean", default=True, help="Don't check if the working directory is clean before applying patches")
+ close_bug = make_option("--no-close", action="store_false", dest="close_bug", default=True, help="Leave bug open after landing.")
+ complete_rollout = make_option("--complete-rollout", action="store_true", dest="complete_rollout", help="Commit the revert and re-open the original bug.")
+ component = make_option("--component", action="store", type="string", dest="component", help="Component for the new bug.")
+ confirm = make_option("--no-confirm", action="store_false", dest="confirm", default=True, help="Skip confirmation steps.")
+ description = make_option("-m", "--description", action="store", type="string", dest="description", help="Description string for the attachment (default: \"patch\")")
+ email = make_option("--email", action="store", type="string", dest="email", help="Email address to use in ChangeLogs.")
+ force_clean = make_option("--force-clean", action="store_true", dest="force_clean", default=False, help="Clean working directory before applying patches (removes local changes and commits)")
+ local_commit = make_option("--local-commit", action="store_true", dest="local_commit", default=False, help="Make a local commit for each applied patch")
+ non_interactive = make_option("--non-interactive", action="store_true", dest="non_interactive", default=False, help="Never prompt the user, fail as fast as possible.")
+ obsolete_patches = make_option("--no-obsolete", action="store_false", dest="obsolete_patches", default=True, help="Do not obsolete old patches before posting this one.")
+ open_bug = make_option("--open-bug", action="store_true", dest="open_bug", default=False, help="Opens the associated bug in a browser.")
+ parent_command = make_option("--parent-command", action="store", dest="parent_command", default=None, help="(Internal) The command that spawned this instance.")
+ port = make_option("--port", action="store", dest="port", default=None, help="Specify a port (e.g., mac, qt, gtk, ...).")
+ quiet = make_option("--quiet", action="store_true", dest="quiet", default=False, help="Produce less console output.")
+ request_commit = make_option("--request-commit", action="store_true", dest="request_commit", default=False, help="Mark the patch as needing auto-commit after review.")
+ review = make_option("--no-review", action="store_false", dest="review", default=True, help="Do not mark the patch for review.")
+ reviewer = make_option("-r", "--reviewer", action="store", type="string", dest="reviewer", help="Update ChangeLogs to say Reviewed by REVIEWER.")
+ test = make_option("--no-test", action="store_false", dest="test", default=True, help="Commit without running run-webkit-tests.")
+ update = make_option("--no-update", action="store_false", dest="update", default=True, help="Don't update the working directory.")
diff --git a/WebKitTools/Scripts/webkitpy/steps/options.pyc b/WebKitTools/Scripts/webkitpy/steps/options.pyc
new file mode 100644
index 0000000..7634605
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/options.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/postdiff.py b/WebKitTools/Scripts/webkitpy/steps/postdiff.py
new file mode 100644
index 0000000..a5ba2a4
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/postdiff.py
@@ -0,0 +1,51 @@
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import StringIO
+
+from webkitpy.steps.abstractstep import AbstractStep
+from webkitpy.steps.options import Options
+
+
+class PostDiff(AbstractStep):
+ @classmethod
+ def options(cls):
+ return [
+ Options.description,
+ Options.review,
+ Options.request_commit,
+ Options.open_bug,
+ ]
+
+ def run(self, state):
+ diff = self.cached_lookup(state, "diff")
+ diff_file = StringIO.StringIO(diff) # add_patch_to_bug expects a file-like object
+ description = self._options.description or "Patch"
+ self._tool.bugs.add_patch_to_bug(state["bug_id"], diff_file, description, mark_for_review=self._options.review, mark_for_commit_queue=self._options.request_commit)
+ if self._options.open_bug:
+ self._tool.user.open_url(self._tool.bugs.bug_url_for_bug_id(state["bug_id"]))
diff --git a/WebKitTools/Scripts/webkitpy/steps/postdiff.pyc b/WebKitTools/Scripts/webkitpy/steps/postdiff.pyc
new file mode 100644
index 0000000..82f1c09
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/postdiff.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/postdiffforcommit.py b/WebKitTools/Scripts/webkitpy/steps/postdiffforcommit.py
new file mode 100644
index 0000000..449381c
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/postdiffforcommit.py
@@ -0,0 +1,41 @@
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import StringIO
+
+from webkitpy.steps.abstractstep import AbstractStep
+
+
+class PostDiffForCommit(AbstractStep):
+ def run(self, state):
+ self._tool.bugs.add_patch_to_bug(
+ state["bug_id"],
+ StringIO.StringIO(self.cached_lookup(state, "diff")),
+ "Patch for landing",
+ mark_for_review=False,
+ mark_for_landing=True)
diff --git a/WebKitTools/Scripts/webkitpy/steps/preparechangelog.py b/WebKitTools/Scripts/webkitpy/steps/preparechangelog.py
new file mode 100644
index 0000000..bd41f0b
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/preparechangelog.py
@@ -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.
+
+import os
+
+from webkitpy.executive import ScriptError
+from webkitpy.steps.abstractstep import AbstractStep
+from webkitpy.steps.options import Options
+from webkitpy.webkit_logging import error
+
+
+class PrepareChangeLog(AbstractStep):
+ @classmethod
+ def options(cls):
+ return [
+ Options.port,
+ Options.quiet,
+ Options.email,
+ ]
+
+ def run(self, state):
+ if self.cached_lookup(state, "changelogs"):
+ return
+ os.chdir(self._tool.scm().checkout_root)
+ args = [self.port().script_path("prepare-ChangeLog")]
+ if state["bug_id"]:
+ args.append("--bug=%s" % state["bug_id"])
+ if self._options.email:
+ args.append("--email=%s" % self._options.email)
+ try:
+ self._tool.executive.run_and_throw_if_fail(args, self._options.quiet)
+ except ScriptError, e:
+ error("Unable to prepare ChangeLogs.")
+ state["diff"] = None # We've changed the diff
diff --git a/WebKitTools/Scripts/webkitpy/steps/preparechangelog.pyc b/WebKitTools/Scripts/webkitpy/steps/preparechangelog.pyc
new file mode 100644
index 0000000..2f6edbd
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/preparechangelog.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/preparechangelogforrevert.py b/WebKitTools/Scripts/webkitpy/steps/preparechangelogforrevert.py
new file mode 100644
index 0000000..88e5134
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/preparechangelogforrevert.py
@@ -0,0 +1,49 @@
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+
+from webkitpy.changelogs import ChangeLog
+from webkitpy.steps.abstractstep import AbstractStep
+
+
+class PrepareChangeLogForRevert(AbstractStep):
+ def run(self, state):
+ # First, discard the ChangeLog changes from the rollout.
+ os.chdir(self._tool.scm().checkout_root)
+ changelog_paths = self._tool.scm().modified_changelogs()
+ self._tool.scm().revert_files(changelog_paths)
+
+ # Second, make new ChangeLog entries for this rollout.
+ # This could move to prepare-ChangeLog by adding a --revert= option.
+ self._run_script("prepare-ChangeLog")
+ bug_url = self._tool.bugs.bug_url_for_bug_id(state["bug_id"]) if state["bug_id"] else None
+ for changelog_path in changelog_paths:
+ # FIXME: Seems we should prepare the message outside of changelogs.py and then just pass in
+ # text that we want to use to replace the reviewed by line.
+ ChangeLog(changelog_path).update_for_revert(state["revision"], state["reason"], bug_url)
diff --git a/WebKitTools/Scripts/webkitpy/steps/preparechangelogforrevert.pyc b/WebKitTools/Scripts/webkitpy/steps/preparechangelogforrevert.pyc
new file mode 100644
index 0000000..c1f0ca4
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/preparechangelogforrevert.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/promptforbugortitle.py b/WebKitTools/Scripts/webkitpy/steps/promptforbugortitle.py
new file mode 100644
index 0000000..fb2f877
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/promptforbugortitle.py
@@ -0,0 +1,45 @@
+# 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.
+
+from webkitpy.steps.abstractstep import AbstractStep
+
+
+class PromptForBugOrTitle(AbstractStep):
+ def run(self, state):
+ # No need to prompt if we alrady have the bug_id.
+ if state.get("bug_id"):
+ return
+ user_response = self._tool.user.prompt("Please enter a bug number or a title for a new bug:\n")
+ # If the user responds with a number, we assume it's bug number.
+ # Otherwise we assume it's a bug subject.
+ try:
+ state["bug_id"] = int(user_response)
+ except ValueError, TypeError:
+ state["bug_title"] = user_response
+ # FIXME: This is kind of a lame description.
+ state["bug_description"] = user_response
diff --git a/WebKitTools/Scripts/webkitpy/steps/promptforbugortitle.pyc b/WebKitTools/Scripts/webkitpy/steps/promptforbugortitle.pyc
new file mode 100644
index 0000000..fdca409
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/promptforbugortitle.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/revertrevision.py b/WebKitTools/Scripts/webkitpy/steps/revertrevision.py
new file mode 100644
index 0000000..ce6c263
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/revertrevision.py
@@ -0,0 +1,34 @@
+# 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.
+
+from webkitpy.steps.abstractstep import AbstractStep
+
+
+class RevertRevision(AbstractStep):
+ def run(self, state):
+ self._tool.scm().apply_reverse_diff(state["revision"])
diff --git a/WebKitTools/Scripts/webkitpy/steps/revertrevision.pyc b/WebKitTools/Scripts/webkitpy/steps/revertrevision.pyc
new file mode 100644
index 0000000..ec08b1f
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/revertrevision.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/runtests.py b/WebKitTools/Scripts/webkitpy/steps/runtests.py
new file mode 100644
index 0000000..ebe809f
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/runtests.py
@@ -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:
+#
+# * 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.
+
+from webkitpy.steps.abstractstep import AbstractStep
+from webkitpy.steps.options import Options
+from webkitpy.webkit_logging import log
+
+class RunTests(AbstractStep):
+ @classmethod
+ def options(cls):
+ return [
+ Options.build,
+ Options.test,
+ Options.non_interactive,
+ Options.quiet,
+ Options.port,
+ ]
+
+ def run(self, state):
+ if not self._options.build:
+ return
+ if not self._options.test:
+ return
+
+ # Run the scripting unit tests first because they're quickest.
+ log("Running Python unit tests")
+ self._tool.executive.run_and_throw_if_fail(self.port().run_python_unittests_command())
+ log("Running Perl unit tests")
+ self._tool.executive.run_and_throw_if_fail(self.port().run_perl_unittests_command())
+ log("Running JavaScriptCore tests")
+ self._tool.executive.run_and_throw_if_fail(self.port().run_javascriptcore_tests_command(), quiet=True)
+
+ log("Running run-webkit-tests")
+ args = self.port().run_webkit_tests_command()
+ if self._options.non_interactive:
+ args.append("--no-launch-safari")
+ args.append("--exit-after-n-failures=1")
+ if self._options.quiet:
+ args.append("--quiet")
+ self._tool.executive.run_and_throw_if_fail(args)
+
diff --git a/WebKitTools/Scripts/webkitpy/steps/runtests.pyc b/WebKitTools/Scripts/webkitpy/steps/runtests.pyc
new file mode 100644
index 0000000..16908fb
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/runtests.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/steps_unittest.py b/WebKitTools/Scripts/webkitpy/steps/steps_unittest.py
new file mode 100644
index 0000000..3e6a032
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/steps_unittest.py
@@ -0,0 +1,56 @@
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import unittest
+
+from webkitpy.steps.update import Update
+from webkitpy.steps.promptforbugortitle import PromptForBugOrTitle
+from webkitpy.mock_bugzillatool import MockBugzillaTool
+from webkitpy.outputcapture import OutputCapture
+from webkitpy.mock import Mock
+
+
+class StepsTest(unittest.TestCase):
+ def _run_step(self, step, tool=None, options=None, state=None):
+ if not tool:
+ tool = MockBugzillaTool()
+ if not options:
+ options = Mock()
+ if not state:
+ state = {}
+ step(tool, options).run(state)
+
+ def test_update_step(self):
+ options = Mock()
+ options.update = True
+ self._run_step(Update, options)
+
+ def test_prompt_for_bug_or_title_step(self):
+ tool = MockBugzillaTool()
+ tool.user.prompt = lambda message: 42
+ self._run_step(PromptForBugOrTitle, tool=tool)
diff --git a/WebKitTools/Scripts/webkitpy/steps/update.py b/WebKitTools/Scripts/webkitpy/steps/update.py
new file mode 100644
index 0000000..0f45671
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/update.py
@@ -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.
+
+from webkitpy.steps.abstractstep import AbstractStep
+from webkitpy.steps.options import Options
+from webkitpy.webkit_logging import log
+
+
+class Update(AbstractStep):
+ @classmethod
+ def options(cls):
+ return [
+ Options.update,
+ Options.port,
+ ]
+
+ def run(self, state):
+ if not self._options.update:
+ return
+ log("Updating working directory")
+ self._tool.executive.run_and_throw_if_fail(self.port().update_webkit_command(), quiet=True)
diff --git a/WebKitTools/Scripts/webkitpy/steps/update.pyc b/WebKitTools/Scripts/webkitpy/steps/update.pyc
new file mode 100644
index 0000000..0b9e7e9
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/update.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/steps/updatechangelogswithreview_unittests.py b/WebKitTools/Scripts/webkitpy/steps/updatechangelogswithreview_unittests.py
new file mode 100644
index 0000000..102a454
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/updatechangelogswithreview_unittests.py
@@ -0,0 +1,46 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import unittest
+
+from webkitpy.steps.updatechangelogswithreviewer import UpdateChangeLogsWithReviewer
+from webkitpy.mock import Mock
+from webkitpy.mock_bugzillatool import MockBugzillaTool
+from webkitpy.outputcapture import OutputCapture
+
+class UpdateChangeLogsWithReviewerTest(unittest.TestCase):
+ def test_guess_reviewer_from_bug(self):
+ capture = OutputCapture()
+ step = UpdateChangeLogsWithReviewer(MockBugzillaTool(), Mock())
+ expected_stderr = "0 reviewed patches on bug 75, cannot infer reviewer.\n"
+ capture.assert_outputs(self, step._guess_reviewer_from_bug, [75], expected_stderr=expected_stderr)
+
+ def test_empty_state(self):
+ capture = OutputCapture()
+ step = UpdateChangeLogsWithReviewer(MockBugzillaTool(), Mock())
+ capture.assert_outputs(self, step.run, [{}])
diff --git a/WebKitTools/Scripts/webkitpy/steps/updatechangelogswithreviewer.py b/WebKitTools/Scripts/webkitpy/steps/updatechangelogswithreviewer.py
new file mode 100644
index 0000000..90fdc35
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/updatechangelogswithreviewer.py
@@ -0,0 +1,71 @@
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+
+from webkitpy.changelogs import ChangeLog
+from webkitpy.grammar import pluralize
+from webkitpy.steps.abstractstep import AbstractStep
+from webkitpy.steps.options import Options
+from webkitpy.webkit_logging import log, error
+
+class UpdateChangeLogsWithReviewer(AbstractStep):
+ @classmethod
+ def options(cls):
+ return [
+ Options.reviewer,
+ ]
+
+ def _guess_reviewer_from_bug(self, bug_id):
+ patches = self._tool.bugs.fetch_bug(bug_id).reviewed_patches()
+ if len(patches) != 1:
+ log("%s on bug %s, cannot infer reviewer." % (pluralize("reviewed patch", len(patches)), bug_id))
+ return None
+ patch = patches[0]
+ log("Guessing \"%s\" as reviewer from attachment %s on bug %s." % (patch.reviewer().full_name, patch.id(), bug_id))
+ return patch.reviewer().full_name
+
+ def run(self, state):
+ bug_id = state.get("bug_id")
+ if not bug_id and state.get("patch"):
+ bug_id = state.get("patch").bug_id()
+
+ reviewer = self._options.reviewer
+ if not reviewer:
+ if not bug_id:
+ log("No bug id provided and --reviewer= not provided. Not updating ChangeLogs with reviewer.")
+ return
+ reviewer = self._guess_reviewer_from_bug(bug_id)
+
+ if not reviewer:
+ log("Failed to guess reviewer from bug %s and --reviewer= not provided. Not updating ChangeLogs with reviewer." % bug_id)
+ return
+
+ os.chdir(self._tool.scm().checkout_root)
+ for changelog_path in self._tool.scm().modified_changelogs():
+ ChangeLog(changelog_path).set_reviewer(reviewer)
diff --git a/WebKitTools/Scripts/webkitpy/steps/updatechangelogswithreviewer.pyc b/WebKitTools/Scripts/webkitpy/steps/updatechangelogswithreviewer.pyc
new file mode 100644
index 0000000..6c9b7fd
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/updatechangelogswithreviewer.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/modules/stepsequence.py b/WebKitTools/Scripts/webkitpy/stepsequence.py
index 6f085c9..008b366 100644
--- a/WebKitTools/Scripts/modules/stepsequence.py
+++ b/WebKitTools/Scripts/webkitpy/stepsequence.py
@@ -26,21 +26,28 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from modules.buildsteps import CommandOptions
-from modules.executive import ScriptError
-from modules.logging import log
-from modules.scm import CheckoutNeedsUpdate
-from modules.workqueue import WorkQueue
+import webkitpy.steps as steps
+
+from webkitpy.executive import ScriptError
+from webkitpy.webkit_logging import log
+from webkitpy.scm import CheckoutNeedsUpdate
+from webkitpy.queueengine import QueueEngine
+
+
+class StepSequenceErrorHandler():
+ @classmethod
+ def handle_script_error(cls, tool, patch, script_error):
+ raise NotImplementedError, "subclasses must implement"
class StepSequence(object):
def __init__(self, steps):
- self._steps = steps
+ self._steps = steps or []
def options(self):
collected_options = [
- CommandOptions.parent_command,
- CommandOptions.quiet,
+ steps.Options.parent_command,
+ steps.Options.quiet,
]
for step in self._steps:
collected_options = collected_options + step.options()
@@ -48,21 +55,23 @@ class StepSequence(object):
collected_options = sorted(set(collected_options))
return collected_options
- def _run(self, tool, options, patch):
+ def _run(self, tool, options, state):
for step in self._steps:
- step(tool, options, patch).run()
+ step(tool, options).run(state)
- def run_and_handle_errors(self, tool, options, patch=None):
+ def run_and_handle_errors(self, tool, options, state=None):
+ if not state:
+ state = {}
try:
- self._run(tool, options, patch)
+ self._run(tool, options, state)
except CheckoutNeedsUpdate, e:
log("Commit failed because the checkout is out of date. Please update and try again.")
log("You can pass --no-build to skip building/testing after update if you believe the new commits did not affect the results.")
- WorkQueue.exit_after_handled_error(e)
+ QueueEngine.exit_after_handled_error(e)
except ScriptError, e:
if not options.quiet:
log(e.message_with_output())
if options.parent_command:
command = tool.command_by_name(options.parent_command)
- command.handle_script_error(tool, patch, e)
- WorkQueue.exit_after_handled_error(e)
+ command.handle_script_error(tool, state, e)
+ QueueEngine.exit_after_handled_error(e)
diff --git a/WebKitTools/Scripts/webkitpy/stepsequence.pyc b/WebKitTools/Scripts/webkitpy/stepsequence.pyc
new file mode 100644
index 0000000..4b3505e
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/stepsequence.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/webkitpy/style/__init__.py b/WebKitTools/Scripts/webkitpy/style/__init__.py
new file mode 100644
index 0000000..ef65bee
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/style/__init__.py
@@ -0,0 +1 @@
+# Required for Python to search this directory for module files
diff --git a/WebKitTools/Scripts/webkitpy/style/checker.py b/WebKitTools/Scripts/webkitpy/style/checker.py
new file mode 100644
index 0000000..faf954f
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/style/checker.py
@@ -0,0 +1,809 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+# Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
+#
+# 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.
+
+"""Front end of some style-checker modules."""
+
+import codecs
+import getopt
+import os.path
+import sys
+
+from .. style_references import parse_patch
+from error_handlers import DefaultStyleErrorHandler
+from error_handlers import PatchStyleErrorHandler
+from processors.cpp import CppProcessor
+from processors.text import TextProcessor
+
+
+# These defaults are used by check-webkit-style.
+WEBKIT_DEFAULT_VERBOSITY = 1
+WEBKIT_DEFAULT_OUTPUT_FORMAT = 'emacs'
+
+
+# FIXME: For style categories we will never want to have, remove them.
+# For categories for which we want to have similar functionality,
+# modify the implementation and enable them.
+#
+# Throughout this module, we use "filter rule" rather than "filter"
+# for an individual boolean filter flag like "+foo". This allows us to
+# reserve "filter" for what one gets by collectively applying all of
+# the filter rules.
+#
+# The _WEBKIT_FILTER_RULES are prepended to any user-specified filter
+# rules. Since by default all errors are on, only include rules that
+# begin with a - sign.
+WEBKIT_DEFAULT_FILTER_RULES = [
+ '-build/endif_comment',
+ '-build/include_what_you_use', # <string> for std::string
+ '-build/storage_class', # const static
+ '-legal/copyright',
+ '-readability/multiline_comment',
+ '-readability/braces', # int foo() {};
+ '-readability/fn_size',
+ '-readability/casting',
+ '-readability/function',
+ '-runtime/arrays', # variable length array
+ '-runtime/casting',
+ '-runtime/sizeof',
+ '-runtime/explicit', # explicit
+ '-runtime/virtual', # virtual dtor
+ '-runtime/printf',
+ '-runtime/threadsafe_fn',
+ '-runtime/rtti',
+ '-whitespace/blank_line',
+ '-whitespace/end_of_line',
+ '-whitespace/labels',
+ ]
+
+
+# Some files should be skipped when checking style. For example,
+# WebKit maintains some files in Mozilla style on purpose to ease
+# future merges.
+#
+# Include a warning for skipped files that are less obvious.
+SKIPPED_FILES_WITH_WARNING = [
+ # The Qt API and tests do not follow WebKit style.
+ # They follow Qt style. :)
+ "gtk2drawing.c", # WebCore/platform/gtk/gtk2drawing.c
+ "gtk2drawing.h", # WebCore/platform/gtk/gtk2drawing.h
+ "JavaScriptCore/qt/api/",
+ "WebKit/gtk/tests/",
+ "WebKit/qt/Api/",
+ "WebKit/qt/tests/",
+ ]
+
+
+# Don't include a warning for skipped files that are more common
+# and more obvious.
+SKIPPED_FILES_WITHOUT_WARNING = [
+ "LayoutTests/"
+ ]
+
+
+def style_categories():
+ """Return the set of all categories used by check-webkit-style."""
+ # If other processors had categories, we would take their union here.
+ return CppProcessor.categories
+
+
+def webkit_argument_defaults():
+ """Return the DefaultArguments instance for use by check-webkit-style."""
+ return ArgumentDefaults(WEBKIT_DEFAULT_OUTPUT_FORMAT,
+ WEBKIT_DEFAULT_VERBOSITY,
+ WEBKIT_DEFAULT_FILTER_RULES)
+
+
+def _create_usage(defaults):
+ """Return the usage string to display for command help.
+
+ Args:
+ defaults: An ArgumentDefaults instance.
+
+ """
+ usage = """
+Syntax: %(program_name)s [--verbose=#] [--git-commit=<SingleCommit>] [--output=vs7]
+ [--filter=-x,+y,...] [file] ...
+
+ The style guidelines this tries to follow are here:
+ http://webkit.org/coding/coding-style.html
+
+ Every style error is given a confidence score from 1-5, with 5 meaning
+ we are certain of the problem, and 1 meaning it could be a legitimate
+ construct. This can miss some errors and does not substitute for
+ code review.
+
+ To prevent specific lines from being linted, add a '// NOLINT' comment to the
+ end of the line.
+
+ Linted extensions are .cpp, .c and .h. Other file types are ignored.
+
+ The file parameter is optional and accepts multiple files. Leaving
+ out the file parameter applies the check to all files considered changed
+ by your source control management system.
+
+ Flags:
+
+ verbose=#
+ A number 1-5 that restricts output to errors with a confidence
+ score at or above this value. In particular, the value 1 displays
+ all errors. The default is %(default_verbosity)s.
+
+ git-commit=<SingleCommit>
+ Checks the style of everything from the given commit to the local tree.
+
+ output=vs7
+ The output format, which may be one of
+ emacs : to ease emacs parsing
+ vs7 : compatible with Visual Studio
+ Defaults to "%(default_output_format)s". Other formats are unsupported.
+
+ filter=-x,+y,...
+ A comma-separated list of boolean filter rules used to filter
+ which categories of style guidelines to check. The script checks
+ a category if the category passes the filter rules, as follows.
+
+ Any webkit category starts out passing. All filter rules are then
+ evaluated left to right, with later rules taking precedence. For
+ example, the rule "+foo" passes any category that starts with "foo",
+ and "-foo" fails any such category. The filter input "-whitespace,
+ +whitespace/braces" fails the category "whitespace/tab" and passes
+ "whitespace/braces".
+
+ Examples: --filter=-whitespace,+whitespace/braces
+ --filter=-whitespace,-runtime/printf,+runtime/printf_format
+ --filter=-,+build/include_what_you_use
+
+ Category names appear in error messages in brackets, for example
+ [whitespace/indent]. To see a list of all categories available to
+ %(program_name)s, along with which are enabled by default, pass
+ the empty filter as follows:
+ --filter=
+""" % {'program_name': os.path.basename(sys.argv[0]),
+ 'default_verbosity': defaults.verbosity,
+ 'default_output_format': defaults.output_format}
+
+ return usage
+
+
+class CategoryFilter(object):
+
+ """Filters whether to check style categories."""
+
+ def __init__(self, filter_rules=None):
+ """Create a category filter.
+
+ This method performs argument validation but does not strip
+ leading or trailing white space.
+
+ Args:
+ filter_rules: A list of strings that are filter rules, which
+ are strings beginning with the plus or minus
+ symbol (+/-). The list should include any
+ default filter rules at the beginning.
+ Defaults to the empty list.
+
+ Raises:
+ ValueError: Invalid filter rule if a rule does not start with
+ plus ("+") or minus ("-").
+
+ """
+ if filter_rules is None:
+ filter_rules = []
+
+ for rule in filter_rules:
+ if not (rule.startswith('+') or rule.startswith('-')):
+ raise ValueError('Invalid filter rule "%s": every rule '
+ 'rule in the --filter flag must start '
+ 'with + or -.' % rule)
+
+ self._filter_rules = filter_rules
+ self._should_check_category = {} # Cached dictionary of category to True/False
+
+ def __str__(self):
+ return ",".join(self._filter_rules)
+
+ # Useful for unit testing.
+ def __eq__(self, other):
+ """Return whether this CategoryFilter instance is equal to another."""
+ return self._filter_rules == other._filter_rules
+
+ # Useful for unit testing.
+ def __ne__(self, other):
+ # Python does not automatically deduce from __eq__().
+ return not (self == other)
+
+ def should_check(self, category):
+ """Return whether the category should be checked.
+
+ The rules for determining whether a category should be checked
+ are as follows. By default all categories should be checked.
+ Then apply the filter rules in order from first to last, with
+ later flags taking precedence.
+
+ A filter rule applies to a category if the string after the
+ leading plus/minus (+/-) matches the beginning of the category
+ name. A plus (+) means the category should be checked, while a
+ minus (-) means the category should not be checked.
+
+ """
+ if category in self._should_check_category:
+ return self._should_check_category[category]
+
+ should_check = True # All categories checked by default.
+ for rule in self._filter_rules:
+ if not category.startswith(rule[1:]):
+ continue
+ should_check = rule.startswith('+')
+ self._should_check_category[category] = should_check # Update cache.
+ return should_check
+
+
+# This class should not have knowledge of the flag key names.
+class ProcessorOptions(object):
+
+ """A container to store options to use when checking style.
+
+ Attributes:
+ output_format: A string that is the output format. The supported
+ output formats are "emacs" which emacs can parse
+ and "vs7" which Microsoft Visual Studio 7 can parse.
+
+ verbosity: An integer between 1-5 inclusive that restricts output
+ to errors with a confidence score at or above this value.
+ The default is 1, which displays all errors.
+
+ filter: A CategoryFilter instance. The default is the empty filter,
+ which means that all categories should be checked.
+
+ git_commit: A string representing the git commit to check.
+ The default is None.
+
+ extra_flag_values: A string-string dictionary of all flag key-value
+ pairs that are not otherwise represented by this
+ class. The default is the empty dictionary.
+
+ """
+
+ def __init__(self, output_format="emacs", verbosity=1, filter=None,
+ git_commit=None, extra_flag_values=None):
+ if filter is None:
+ filter = CategoryFilter()
+ if extra_flag_values is None:
+ extra_flag_values = {}
+
+ if output_format not in ("emacs", "vs7"):
+ raise ValueError('Invalid "output_format" parameter: '
+ 'value must be "emacs" or "vs7". '
+ 'Value given: "%s".' % output_format)
+
+ if (verbosity < 1) or (verbosity > 5):
+ raise ValueError('Invalid "verbosity" parameter: '
+ "value must be an integer between 1-5 inclusive. "
+ 'Value given: "%s".' % verbosity)
+
+ self.output_format = output_format
+ self.verbosity = verbosity
+ self.filter = filter
+ self.git_commit = git_commit
+ self.extra_flag_values = extra_flag_values
+
+ # Useful for unit testing.
+ def __eq__(self, other):
+ """Return whether this ProcessorOptions instance is equal to another."""
+ if self.output_format != other.output_format:
+ return False
+ if self.verbosity != other.verbosity:
+ return False
+ if self.filter != other.filter:
+ return False
+ if self.git_commit != other.git_commit:
+ return False
+ if self.extra_flag_values != other.extra_flag_values:
+ return False
+
+ return True
+
+ # Useful for unit testing.
+ def __ne__(self, other):
+ # Python does not automatically deduce from __eq__().
+ return not (self == other)
+
+ def is_reportable(self, category, confidence_in_error):
+ """Return whether an error is reportable.
+
+ An error is reportable if the confidence in the error
+ is at least the current verbosity level, and if the current
+ filter says that the category should be checked.
+
+ Args:
+ category: A string that is a style category.
+ confidence_in_error: An integer between 1 and 5, inclusive, that
+ represents the application's confidence in
+ the error. A higher number signifies greater
+ confidence.
+
+ """
+ if confidence_in_error < self.verbosity:
+ return False
+
+ if self.filter is None:
+ return True # All categories should be checked by default.
+
+ return self.filter.should_check(category)
+
+
+# This class should not have knowledge of the flag key names.
+class ArgumentDefaults(object):
+
+ """A container to store default argument values.
+
+ Attributes:
+ output_format: A string that is the default output format.
+ verbosity: An integer that is the default verbosity level.
+ filter_rules: A list of strings that are boolean filter rules
+ to prepend to any user-specified rules.
+
+ """
+
+ def __init__(self, default_output_format, default_verbosity,
+ default_filter_rules):
+ self.output_format = default_output_format
+ self.verbosity = default_verbosity
+ self.filter_rules = default_filter_rules
+
+
+class ArgumentPrinter(object):
+
+ """Supports the printing of check-webkit-style command arguments."""
+
+ def _flag_pair_to_string(self, flag_key, flag_value):
+ return '--%(key)s=%(val)s' % {'key': flag_key, 'val': flag_value }
+
+ def to_flag_string(self, options):
+ """Return a flag string yielding the given ProcessorOptions instance.
+
+ This method orders the flag values alphabetically by the flag key.
+
+ Args:
+ options: A ProcessorOptions instance.
+
+ """
+ flags = options.extra_flag_values.copy()
+
+ flags['output'] = options.output_format
+ flags['verbose'] = options.verbosity
+ if options.filter:
+ # Only include the filter flag if rules are present.
+ filter_string = str(options.filter)
+ if filter_string:
+ flags['filter'] = filter_string
+ if options.git_commit:
+ flags['git-commit'] = options.git_commit
+
+ flag_string = ''
+ # Alphabetizing lets us unit test this method.
+ for key in sorted(flags.keys()):
+ flag_string += self._flag_pair_to_string(key, flags[key]) + ' '
+
+ return flag_string.strip()
+
+
+class ArgumentParser(object):
+
+ """Supports the parsing of check-webkit-style command arguments.
+
+ Attributes:
+ defaults: An ArgumentDefaults instance.
+ create_usage: A function that accepts an ArgumentDefaults instance
+ and returns a string of usage instructions.
+ This defaults to the function used to generate the
+ usage string for check-webkit-style.
+ doc_print: A function that accepts a string parameter and that is
+ called to display help messages. This defaults to
+ sys.stderr.write().
+
+ """
+
+ def __init__(self, argument_defaults, create_usage=None, doc_print=None):
+ if create_usage is None:
+ create_usage = _create_usage
+ if doc_print is None:
+ doc_print = sys.stderr.write
+
+ self.defaults = argument_defaults
+ self.create_usage = create_usage
+ self.doc_print = doc_print
+
+ def _exit_with_usage(self, error_message=''):
+ """Exit and print a usage string with an optional error message.
+
+ Args:
+ error_message: A string that is an error message to print.
+
+ """
+ usage = self.create_usage(self.defaults)
+ self.doc_print(usage)
+ if error_message:
+ sys.exit('\nFATAL ERROR: ' + error_message)
+ else:
+ sys.exit(1)
+
+ def _exit_with_categories(self):
+ """Exit and print the style categories and default filter rules."""
+ self.doc_print('\nAll categories:\n')
+ categories = style_categories()
+ for category in sorted(categories):
+ self.doc_print(' ' + category + '\n')
+
+ self.doc_print('\nDefault filter rules**:\n')
+ for filter_rule in sorted(self.defaults.filter_rules):
+ self.doc_print(' ' + filter_rule + '\n')
+ self.doc_print('\n**The command always evaluates the above rules, '
+ 'and before any --filter flag.\n\n')
+
+ sys.exit(0)
+
+ def _parse_filter_flag(self, flag_value):
+ """Parse the value of the --filter flag.
+
+ These filters are applied when deciding whether to emit a given
+ error message.
+
+ Args:
+ flag_value: A string of comma-separated filter rules, for
+ example "-whitespace,+whitespace/indent".
+
+ """
+ filters = []
+ for uncleaned_filter in flag_value.split(','):
+ filter = uncleaned_filter.strip()
+ if not filter:
+ continue
+ filters.append(filter)
+ return filters
+
+ def parse(self, args, extra_flags=None):
+ """Parse the command line arguments to check-webkit-style.
+
+ Args:
+ args: A list of command-line arguments as returned by sys.argv[1:].
+ extra_flags: A list of flags whose values we want to extract, but
+ are not supported by the ProcessorOptions class.
+ An example flag "new_flag=". This defaults to the
+ empty list.
+
+ Returns:
+ A tuple of (filenames, options)
+
+ filenames: The list of filenames to check.
+ options: A ProcessorOptions instance.
+
+ """
+ if extra_flags is None:
+ extra_flags = []
+
+ output_format = self.defaults.output_format
+ verbosity = self.defaults.verbosity
+ filter_rules = self.defaults.filter_rules
+
+ # The flags already supported by the ProcessorOptions class.
+ flags = ['help', 'output=', 'verbose=', 'filter=', 'git-commit=']
+
+ for extra_flag in extra_flags:
+ if extra_flag in flags:
+ raise ValueError('Flag \'%(extra_flag)s is duplicated '
+ 'or already supported.' %
+ {'extra_flag': extra_flag})
+ flags.append(extra_flag)
+
+ try:
+ (opts, filenames) = getopt.getopt(args, '', flags)
+ except getopt.GetoptError:
+ # FIXME: Settle on an error handling approach: come up
+ # with a consistent guideline as to when and whether
+ # a ValueError should be raised versus calling
+ # sys.exit when needing to interrupt execution.
+ self._exit_with_usage('Invalid arguments.')
+
+ extra_flag_values = {}
+ git_commit = None
+
+ for (opt, val) in opts:
+ if opt == '--help':
+ self._exit_with_usage()
+ elif opt == '--output':
+ output_format = val
+ elif opt == '--verbose':
+ verbosity = val
+ elif opt == '--git-commit':
+ git_commit = val
+ elif opt == '--filter':
+ if not val:
+ self._exit_with_categories()
+ # Prepend the defaults.
+ filter_rules = filter_rules + self._parse_filter_flag(val)
+ else:
+ extra_flag_values[opt] = val
+
+ # Check validity of resulting values.
+ if filenames and (git_commit != None):
+ self._exit_with_usage('It is not possible to check files and a '
+ 'specific commit at the same time.')
+
+ if output_format not in ('emacs', 'vs7'):
+ raise ValueError('Invalid --output value "%s": The only '
+ 'allowed output formats are emacs and vs7.' %
+ output_format)
+
+ verbosity = int(verbosity)
+ if (verbosity < 1) or (verbosity > 5):
+ raise ValueError('Invalid --verbose value %s: value must '
+ 'be between 1-5.' % verbosity)
+
+ filter = CategoryFilter(filter_rules)
+
+ options = ProcessorOptions(output_format, verbosity, filter,
+ git_commit, extra_flag_values)
+
+ return (filenames, options)
+
+
+# Enum-like idiom
+class FileType:
+
+ NONE = 1
+ # Alphabetize remaining types
+ CPP = 2
+ TEXT = 3
+
+
+class ProcessorDispatcher(object):
+
+ """Supports determining whether and how to check style, based on path."""
+
+ cpp_file_extensions = (
+ 'c',
+ 'cpp',
+ 'h',
+ )
+
+ text_file_extensions = (
+ 'css',
+ 'html',
+ 'idl',
+ 'js',
+ 'mm',
+ 'php',
+ 'pm',
+ 'py',
+ 'txt',
+ )
+
+ def _file_extension(self, file_path):
+ """Return the file extension without the leading dot."""
+ return os.path.splitext(file_path)[1].lstrip(".")
+
+ def should_skip_with_warning(self, file_path):
+ """Return whether the given file should be skipped with a warning."""
+ for skipped_file in SKIPPED_FILES_WITH_WARNING:
+ if file_path.find(skipped_file) >= 0:
+ return True
+ return False
+
+ def should_skip_without_warning(self, file_path):
+ """Return whether the given file should be skipped without a warning."""
+ for skipped_file in SKIPPED_FILES_WITHOUT_WARNING:
+ if file_path.find(skipped_file) >= 0:
+ return True
+ return False
+
+ def _file_type(self, file_path):
+ """Return the file type corresponding to the given file."""
+ file_extension = self._file_extension(file_path)
+
+ if (file_extension in self.cpp_file_extensions) or (file_path == '-'):
+ # FIXME: Do something about the comment below and the issue it
+ # raises since cpp_style already relies on the extension.
+ #
+ # Treat stdin as C++. Since the extension is unknown when
+ # reading from stdin, cpp_style tests should not rely on
+ # the extension.
+ return FileType.CPP
+ elif ("ChangeLog" in file_path
+ or "WebKitTools/Scripts/" in file_path
+ or file_extension in self.text_file_extensions):
+ return FileType.TEXT
+ else:
+ return FileType.NONE
+
+ def _create_processor(self, file_type, file_path, handle_style_error, verbosity):
+ """Instantiate and return a style processor based on file type."""
+ if file_type == FileType.NONE:
+ processor = None
+ elif file_type == FileType.CPP:
+ file_extension = self._file_extension(file_path)
+ processor = CppProcessor(file_path, file_extension, handle_style_error, verbosity)
+ elif file_type == FileType.TEXT:
+ processor = TextProcessor(file_path, handle_style_error)
+ else:
+ raise ValueError('Invalid file type "%(file_type)s": the only valid file types '
+ "are %(NONE)s, %(CPP)s, and %(TEXT)s."
+ % {"file_type": file_type,
+ "NONE": FileType.NONE,
+ "CPP": FileType.CPP,
+ "TEXT": FileType.TEXT})
+
+ return processor
+
+ def dispatch_processor(self, file_path, handle_style_error, verbosity):
+ """Instantiate and return a style processor based on file path."""
+ file_type = self._file_type(file_path)
+
+ processor = self._create_processor(file_type,
+ file_path,
+ handle_style_error,
+ verbosity)
+ return processor
+
+
+class StyleChecker(object):
+
+ """Supports checking style in files and patches.
+
+ Attributes:
+ error_count: An integer that is the total number of reported
+ errors for the lifetime of this StyleChecker
+ instance.
+ options: A ProcessorOptions instance that controls the behavior
+ of style checking.
+
+ """
+
+ def __init__(self, options, stderr_write=None):
+ """Create a StyleChecker instance.
+
+ Args:
+ options: See options attribute.
+ stderr_write: A function that takes a string as a parameter
+ and that is called when a style error occurs.
+ Defaults to sys.stderr.write. This should be
+ used only for unit tests.
+
+ """
+ if stderr_write is None:
+ stderr_write = sys.stderr.write
+
+ self._stderr_write = stderr_write
+ self.error_count = 0
+ self.options = options
+
+ def _increment_error_count(self):
+ """Increment the total count of reported errors."""
+ self.error_count += 1
+
+ def _process_file(self, processor, file_path, handle_style_error):
+ """Process the file using the given processor."""
+ try:
+ # Support the UNIX convention of using "-" for stdin. Note that
+ # we are not opening the file with universal newline support
+ # (which codecs doesn't support anyway), so the resulting lines do
+ # contain trailing '\r' characters if we are reading a file that
+ # has CRLF endings.
+ # If after the split a trailing '\r' is present, it is removed
+ # below. If it is not expected to be present (i.e. os.linesep !=
+ # '\r\n' as in Windows), a warning is issued below if this file
+ # is processed.
+ if file_path == '-':
+ lines = codecs.StreamReaderWriter(sys.stdin,
+ codecs.getreader('utf8'),
+ codecs.getwriter('utf8'),
+ 'replace').read().split('\n')
+ else:
+ lines = codecs.open(file_path, 'r', 'utf8', 'replace').read().split('\n')
+
+ carriage_return_found = False
+ # Remove trailing '\r'.
+ for line_number in range(len(lines)):
+ if lines[line_number].endswith('\r'):
+ lines[line_number] = lines[line_number].rstrip('\r')
+ carriage_return_found = True
+
+ except IOError:
+ self._stderr_write("Skipping input '%s': Can't open for reading\n" % file_path)
+ return
+
+ processor.process(lines)
+
+ if carriage_return_found and os.linesep != '\r\n':
+ # FIXME: Make sure this error also shows up when checking
+ # patches, if appropriate.
+ #
+ # Use 0 for line_number since outputting only one error for
+ # potentially several lines.
+ handle_style_error(file_path, 0, 'whitespace/newline', 1,
+ 'One or more unexpected \\r (^M) found;'
+ 'better to use only a \\n')
+
+ def check_file(self, file_path, handle_style_error=None, process_file=None):
+ """Check style in the given file.
+
+ Args:
+ file_path: A string that is the path of the file to process.
+ handle_style_error: The function to call when a style error
+ occurs. This parameter is meant for internal
+ use within this class. Defaults to a
+ DefaultStyleErrorHandler instance.
+ process_file: The function to call to process the file. This
+ parameter should be used only for unit tests.
+ Defaults to the file processing method of this class.
+
+ """
+ if handle_style_error is None:
+ handle_style_error = DefaultStyleErrorHandler(file_path,
+ self.options,
+ self._increment_error_count,
+ self._stderr_write)
+ if process_file is None:
+ process_file = self._process_file
+
+ dispatcher = ProcessorDispatcher()
+
+ if dispatcher.should_skip_without_warning(file_path):
+ return
+ if dispatcher.should_skip_with_warning(file_path):
+ self._stderr_write('Ignoring "%s": this file is exempt from the '
+ "style guide.\n" % file_path)
+ return
+
+ verbosity = self.options.verbosity
+ processor = dispatcher.dispatch_processor(file_path,
+ handle_style_error,
+ verbosity)
+ if processor is None:
+ return
+
+ process_file(processor, file_path, handle_style_error)
+
+ def check_patch(self, patch_string):
+ """Check style in the given patch.
+
+ Args:
+ patch_string: A string that is a patch string.
+
+ """
+ patch_files = parse_patch(patch_string)
+ for file_path, diff in patch_files.iteritems():
+ style_error_handler = PatchStyleErrorHandler(diff,
+ file_path,
+ self.options,
+ self._increment_error_count,
+ self._stderr_write)
+
+ self.check_file(file_path, style_error_handler)
+
diff --git a/WebKitTools/Scripts/webkitpy/style/checker_unittest.py b/WebKitTools/Scripts/webkitpy/style/checker_unittest.py
new file mode 100755
index 0000000..4d6b2e7
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/style/checker_unittest.py
@@ -0,0 +1,677 @@
+#!/usr/bin/python
+# -*- coding: utf-8; -*-
+#
+# Copyright (C) 2009 Google Inc. All rights reserved.
+# Copyright (C) 2009 Torch Mobile Inc.
+# Copyright (C) 2009 Apple Inc. All rights reserved.
+# Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
+#
+# 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.
+
+"""Unit tests for style.py."""
+
+import unittest
+
+import checker as style
+from checker import CategoryFilter
+from checker import ProcessorDispatcher
+from checker import ProcessorOptions
+from checker import StyleChecker
+from processors.cpp import CppProcessor
+from processors.text import TextProcessor
+
+class CategoryFilterTest(unittest.TestCase):
+
+ """Tests CategoryFilter class."""
+
+ def test_init(self):
+ """Test __init__ constructor."""
+ self.assertRaises(ValueError, CategoryFilter, ["no_prefix"])
+ CategoryFilter() # No ValueError: works
+ CategoryFilter(["+"]) # No ValueError: works
+ CategoryFilter(["-"]) # No ValueError: works
+
+ def test_str(self):
+ """Test __str__ "to string" operator."""
+ filter = CategoryFilter(["+a", "-b"])
+ self.assertEquals(str(filter), "+a,-b")
+
+ def test_eq(self):
+ """Test __eq__ equality function."""
+ filter1 = CategoryFilter(["+a", "+b"])
+ filter2 = CategoryFilter(["+a", "+b"])
+ filter3 = CategoryFilter(["+b", "+a"])
+
+ # == calls __eq__.
+ self.assertTrue(filter1 == filter2)
+ self.assertFalse(filter1 == filter3) # Cannot test with assertNotEqual.
+
+ def test_ne(self):
+ """Test __ne__ inequality function."""
+ # != calls __ne__.
+ # By default, __ne__ always returns true on different objects.
+ # Thus, just check the distinguishing case to verify that the
+ # code defines __ne__.
+ self.assertFalse(CategoryFilter() != CategoryFilter())
+
+ def test_should_check(self):
+ """Test should_check() method."""
+ filter = CategoryFilter()
+ self.assertTrue(filter.should_check("everything"))
+ # Check a second time to exercise cache.
+ self.assertTrue(filter.should_check("everything"))
+
+ filter = CategoryFilter(["-"])
+ self.assertFalse(filter.should_check("anything"))
+ # Check a second time to exercise cache.
+ self.assertFalse(filter.should_check("anything"))
+
+ filter = CategoryFilter(["-", "+ab"])
+ self.assertTrue(filter.should_check("abc"))
+ self.assertFalse(filter.should_check("a"))
+
+ filter = CategoryFilter(["+", "-ab"])
+ self.assertFalse(filter.should_check("abc"))
+ self.assertTrue(filter.should_check("a"))
+
+
+class ProcessorOptionsTest(unittest.TestCase):
+
+ """Tests ProcessorOptions class."""
+
+ def test_init(self):
+ """Test __init__ constructor."""
+ # Check default parameters.
+ options = ProcessorOptions()
+ self.assertEquals(options.extra_flag_values, {})
+ self.assertEquals(options.filter, CategoryFilter())
+ self.assertEquals(options.git_commit, None)
+ self.assertEquals(options.output_format, "emacs")
+ self.assertEquals(options.verbosity, 1)
+
+ # Check argument validation.
+ self.assertRaises(ValueError, ProcessorOptions, output_format="bad")
+ ProcessorOptions(output_format="emacs") # No ValueError: works
+ ProcessorOptions(output_format="vs7") # works
+ self.assertRaises(ValueError, ProcessorOptions, verbosity=0)
+ self.assertRaises(ValueError, ProcessorOptions, verbosity=6)
+ ProcessorOptions(verbosity=1) # works
+ ProcessorOptions(verbosity=5) # works
+
+ # Check attributes.
+ options = ProcessorOptions(extra_flag_values={"extra_value" : 2},
+ filter=CategoryFilter(["+"]),
+ git_commit="commit",
+ output_format="vs7",
+ verbosity=3)
+ self.assertEquals(options.extra_flag_values, {"extra_value" : 2})
+ self.assertEquals(options.filter, CategoryFilter(["+"]))
+ self.assertEquals(options.git_commit, "commit")
+ self.assertEquals(options.output_format, "vs7")
+ self.assertEquals(options.verbosity, 3)
+
+ def test_eq(self):
+ """Test __eq__ equality function."""
+ # == calls __eq__.
+ self.assertTrue(ProcessorOptions() == ProcessorOptions())
+
+ # Verify that a difference in any argument cause equality to fail.
+ options = ProcessorOptions(extra_flag_values={"extra_value" : 1},
+ filter=CategoryFilter(["+"]),
+ git_commit="commit",
+ output_format="vs7",
+ verbosity=1)
+ self.assertFalse(options == ProcessorOptions(extra_flag_values={"extra_value" : 2}))
+ self.assertFalse(options == ProcessorOptions(filter=CategoryFilter(["-"])))
+ self.assertFalse(options == ProcessorOptions(git_commit="commit2"))
+ self.assertFalse(options == ProcessorOptions(output_format="emacs"))
+ self.assertFalse(options == ProcessorOptions(verbosity=2))
+
+ def test_ne(self):
+ """Test __ne__ inequality function."""
+ # != calls __ne__.
+ # By default, __ne__ always returns true on different objects.
+ # Thus, just check the distinguishing case to verify that the
+ # code defines __ne__.
+ self.assertFalse(ProcessorOptions() != ProcessorOptions())
+
+ def test_is_reportable(self):
+ """Test is_reportable()."""
+ filter = CategoryFilter(["-xyz"])
+ options = ProcessorOptions(filter=filter, verbosity=3)
+
+ # Test verbosity
+ self.assertTrue(options.is_reportable("abc", 3))
+ self.assertFalse(options.is_reportable("abc", 2))
+
+ # Test filter
+ self.assertTrue(options.is_reportable("xy", 3))
+ self.assertFalse(options.is_reportable("xyz", 3))
+
+
+class WebKitArgumentDefaultsTest(unittest.TestCase):
+
+ """Tests validity of default arguments used by check-webkit-style."""
+
+ def defaults(self):
+ return style.webkit_argument_defaults()
+
+ def test_filter_rules(self):
+ defaults = self.defaults()
+ already_seen = []
+ all_categories = style.style_categories()
+ for rule in defaults.filter_rules:
+ # Check no leading or trailing white space.
+ self.assertEquals(rule, rule.strip())
+ # All categories are on by default, so defaults should
+ # begin with -.
+ self.assertTrue(rule.startswith('-'))
+ self.assertTrue(rule[1:] in all_categories)
+ # Check no rule occurs twice.
+ self.assertFalse(rule in already_seen)
+ already_seen.append(rule)
+
+ def test_defaults(self):
+ """Check that default arguments are valid."""
+ defaults = self.defaults()
+
+ # FIXME: We should not need to call parse() to determine
+ # whether the default arguments are valid.
+ parser = style.ArgumentParser(defaults)
+ # No need to test the return value here since we test parse()
+ # on valid arguments elsewhere.
+ parser.parse([]) # arguments valid: no error or SystemExit
+
+
+class ArgumentPrinterTest(unittest.TestCase):
+
+ """Tests the ArgumentPrinter class."""
+
+ _printer = style.ArgumentPrinter()
+
+ def _create_options(self, output_format='emacs', verbosity=3,
+ filter_rules=[], git_commit=None,
+ extra_flag_values={}):
+ filter = CategoryFilter(filter_rules)
+ return style.ProcessorOptions(output_format, verbosity, filter,
+ git_commit, extra_flag_values)
+
+ def test_to_flag_string(self):
+ options = self._create_options('vs7', 5, ['+foo', '-bar'], 'git',
+ {'a': 0, 'z': 1})
+ self.assertEquals('--a=0 --filter=+foo,-bar --git-commit=git '
+ '--output=vs7 --verbose=5 --z=1',
+ self._printer.to_flag_string(options))
+
+ # This is to check that --filter and --git-commit do not
+ # show up when not user-specified.
+ options = self._create_options()
+ self.assertEquals('--output=emacs --verbose=3',
+ self._printer.to_flag_string(options))
+
+
+class ArgumentParserTest(unittest.TestCase):
+
+ """Test the ArgumentParser class."""
+
+ def _parse(self):
+ """Return a default parse() function for testing."""
+ return self._create_parser().parse
+
+ def _create_defaults(self, default_output_format='vs7',
+ default_verbosity=3,
+ default_filter_rules=['-', '+whitespace']):
+ """Return a default ArgumentDefaults instance for testing."""
+ return style.ArgumentDefaults(default_output_format,
+ default_verbosity,
+ default_filter_rules)
+
+ def _create_parser(self, defaults=None):
+ """Return an ArgumentParser instance for testing."""
+ def create_usage(_defaults):
+ """Return a usage string for testing."""
+ return "usage"
+
+ def doc_print(message):
+ # We do not want the usage string or style categories
+ # to print during unit tests, so print nothing.
+ return
+
+ if defaults is None:
+ defaults = self._create_defaults()
+
+ return style.ArgumentParser(defaults, create_usage, doc_print)
+
+ def test_parse_documentation(self):
+ parse = self._parse()
+
+ # FIXME: Test both the printing of the usage string and the
+ # filter categories help.
+
+ # Request the usage string.
+ self.assertRaises(SystemExit, parse, ['--help'])
+ # Request default filter rules and available style categories.
+ self.assertRaises(SystemExit, parse, ['--filter='])
+
+ def test_parse_bad_values(self):
+ parse = self._parse()
+
+ # Pass an unsupported argument.
+ self.assertRaises(SystemExit, parse, ['--bad'])
+
+ self.assertRaises(ValueError, parse, ['--verbose=bad'])
+ self.assertRaises(ValueError, parse, ['--verbose=0'])
+ self.assertRaises(ValueError, parse, ['--verbose=6'])
+ parse(['--verbose=1']) # works
+ parse(['--verbose=5']) # works
+
+ self.assertRaises(ValueError, parse, ['--output=bad'])
+ parse(['--output=vs7']) # works
+
+ # Pass a filter rule not beginning with + or -.
+ self.assertRaises(ValueError, parse, ['--filter=foo'])
+ parse(['--filter=+foo']) # works
+ # Pass files and git-commit at the same time.
+ self.assertRaises(SystemExit, parse, ['--git-commit=', 'file.txt'])
+ # Pass an extra flag already supported.
+ self.assertRaises(ValueError, parse, [], ['filter='])
+ parse([], ['extra=']) # works
+ # Pass an extra flag with typo.
+ self.assertRaises(SystemExit, parse, ['--extratypo='], ['extra='])
+ parse(['--extra='], ['extra=']) # works
+ self.assertRaises(ValueError, parse, [], ['extra=', 'extra='])
+
+
+ def test_parse_default_arguments(self):
+ parse = self._parse()
+
+ (files, options) = parse([])
+
+ self.assertEquals(files, [])
+
+ self.assertEquals(options.output_format, 'vs7')
+ self.assertEquals(options.verbosity, 3)
+ self.assertEquals(options.filter,
+ CategoryFilter(["-", "+whitespace"]))
+ self.assertEquals(options.git_commit, None)
+
+ def test_parse_explicit_arguments(self):
+ parse = self._parse()
+
+ # Pass non-default explicit values.
+ (files, options) = parse(['--output=emacs'])
+ self.assertEquals(options.output_format, 'emacs')
+ (files, options) = parse(['--verbose=4'])
+ self.assertEquals(options.verbosity, 4)
+ (files, options) = parse(['--git-commit=commit'])
+ self.assertEquals(options.git_commit, 'commit')
+ (files, options) = parse(['--filter=+foo,-bar'])
+ self.assertEquals(options.filter,
+ CategoryFilter(["-", "+whitespace", "+foo", "-bar"]))
+ # Spurious white space in filter rules.
+ (files, options) = parse(['--filter=+foo ,-bar'])
+ self.assertEquals(options.filter,
+ CategoryFilter(["-", "+whitespace", "+foo", "-bar"]))
+
+ # Pass extra flag values.
+ (files, options) = parse(['--extra'], ['extra'])
+ self.assertEquals(options.extra_flag_values, {'--extra': ''})
+ (files, options) = parse(['--extra='], ['extra='])
+ self.assertEquals(options.extra_flag_values, {'--extra': ''})
+ (files, options) = parse(['--extra=x'], ['extra='])
+ self.assertEquals(options.extra_flag_values, {'--extra': 'x'})
+
+ def test_parse_files(self):
+ parse = self._parse()
+
+ (files, options) = parse(['foo.cpp'])
+ self.assertEquals(files, ['foo.cpp'])
+
+ # Pass multiple files.
+ (files, options) = parse(['--output=emacs', 'foo.cpp', 'bar.cpp'])
+ self.assertEquals(files, ['foo.cpp', 'bar.cpp'])
+
+
+class ProcessorDispatcherSkipTest(unittest.TestCase):
+
+ """Tests the "should skip" methods of the ProcessorDispatcher class."""
+
+ def test_should_skip_with_warning(self):
+ """Test should_skip_with_warning()."""
+ dispatcher = ProcessorDispatcher()
+
+ # Check a non-skipped file.
+ self.assertFalse(dispatcher.should_skip_with_warning("foo.txt"))
+
+ # Check skipped files.
+ paths_to_skip = [
+ "gtk2drawing.c",
+ "gtk2drawing.h",
+ "JavaScriptCore/qt/api/qscriptengine_p.h",
+ "WebCore/platform/gtk/gtk2drawing.c",
+ "WebCore/platform/gtk/gtk2drawing.h",
+ "WebKit/gtk/tests/testatk.c",
+ "WebKit/qt/Api/qwebpage.h",
+ "WebKit/qt/tests/qwebsecurityorigin/tst_qwebsecurityorigin.cpp",
+ ]
+
+ for path in paths_to_skip:
+ self.assertTrue(dispatcher.should_skip_with_warning(path),
+ "Checking: " + path)
+
+ def test_should_skip_without_warning(self):
+ """Test should_skip_without_warning()."""
+ dispatcher = ProcessorDispatcher()
+
+ # Check a non-skipped file.
+ self.assertFalse(dispatcher.should_skip_without_warning("foo.txt"))
+
+ # Check skipped files.
+ paths_to_skip = [
+ # LayoutTests folder
+ "LayoutTests/foo.txt",
+ ]
+
+ for path in paths_to_skip:
+ self.assertTrue(dispatcher.should_skip_without_warning(path),
+ "Checking: " + path)
+
+
+class ProcessorDispatcherDispatchTest(unittest.TestCase):
+
+ """Tests dispatch_processor() method of ProcessorDispatcher class."""
+
+ def mock_handle_style_error(self):
+ pass
+
+ def dispatch_processor(self, file_path):
+ """Call dispatch_processor() with the given file path."""
+ dispatcher = ProcessorDispatcher()
+ processor = dispatcher.dispatch_processor(file_path,
+ self.mock_handle_style_error,
+ verbosity=3)
+ return processor
+
+ def assert_processor_none(self, file_path):
+ """Assert that the dispatched processor is None."""
+ processor = self.dispatch_processor(file_path)
+ self.assertTrue(processor is None, 'Checking: "%s"' % file_path)
+
+ def assert_processor(self, file_path, expected_class):
+ """Assert the type of the dispatched processor."""
+ processor = self.dispatch_processor(file_path)
+ got_class = processor.__class__
+ self.assertEquals(got_class, expected_class,
+ 'For path "%(file_path)s" got %(got_class)s when '
+ "expecting %(expected_class)s."
+ % {"file_path": file_path,
+ "got_class": got_class,
+ "expected_class": expected_class})
+
+ def assert_processor_cpp(self, file_path):
+ """Assert that the dispatched processor is a CppProcessor."""
+ self.assert_processor(file_path, CppProcessor)
+
+ def assert_processor_text(self, file_path):
+ """Assert that the dispatched processor is a TextProcessor."""
+ self.assert_processor(file_path, TextProcessor)
+
+ def test_cpp_paths(self):
+ """Test paths that should be checked as C++."""
+ paths = [
+ "-",
+ "foo.c",
+ "foo.cpp",
+ "foo.h",
+ ]
+
+ for path in paths:
+ self.assert_processor_cpp(path)
+
+ # Check processor attributes on a typical input.
+ file_base = "foo"
+ file_extension = "c"
+ file_path = file_base + "." + file_extension
+ self.assert_processor_cpp(file_path)
+ processor = self.dispatch_processor(file_path)
+ self.assertEquals(processor.file_extension, file_extension)
+ self.assertEquals(processor.file_path, file_path)
+ self.assertEquals(processor.handle_style_error, self.mock_handle_style_error)
+ self.assertEquals(processor.verbosity, 3)
+ # Check "-" for good measure.
+ file_base = "-"
+ file_extension = ""
+ file_path = file_base
+ self.assert_processor_cpp(file_path)
+ processor = self.dispatch_processor(file_path)
+ self.assertEquals(processor.file_extension, file_extension)
+ self.assertEquals(processor.file_path, file_path)
+
+ def test_text_paths(self):
+ """Test paths that should be checked as text."""
+ paths = [
+ "ChangeLog",
+ "foo.css",
+ "foo.html",
+ "foo.idl",
+ "foo.js",
+ "foo.mm",
+ "foo.php",
+ "foo.pm",
+ "foo.py",
+ "foo.txt",
+ "FooChangeLog.bak",
+ "WebCore/ChangeLog",
+ "WebCore/inspector/front-end/inspector.js",
+ "WebKitTools/Scripts/check-webkit=style",
+ "WebKitTools/Scripts/modules/text_style.py",
+ ]
+
+ for path in paths:
+ self.assert_processor_text(path)
+
+ # Check processor attributes on a typical input.
+ file_base = "foo"
+ file_extension = "css"
+ file_path = file_base + "." + file_extension
+ self.assert_processor_text(file_path)
+ processor = self.dispatch_processor(file_path)
+ self.assertEquals(processor.file_path, file_path)
+ self.assertEquals(processor.handle_style_error, self.mock_handle_style_error)
+
+ def test_none_paths(self):
+ """Test paths that have no file type.."""
+ paths = [
+ "Makefile",
+ "foo.png",
+ "foo.exe",
+ ]
+
+ for path in paths:
+ self.assert_processor_none(path)
+
+
+class StyleCheckerTest(unittest.TestCase):
+
+ """Test the StyleChecker class.
+
+ Attributes:
+ error_messages: A string containing all of the warning messages
+ written to the mock_stderr_write method of
+ this class.
+
+ """
+
+ def _mock_stderr_write(self, message):
+ pass
+
+ def _style_checker(self, options):
+ return StyleChecker(options, self._mock_stderr_write)
+
+ def test_init(self):
+ """Test __init__ constructor."""
+ options = ProcessorOptions()
+ style_checker = self._style_checker(options)
+
+ self.assertEquals(style_checker.error_count, 0)
+ self.assertEquals(style_checker.options, options)
+
+
+class StyleCheckerCheckFileTest(unittest.TestCase):
+
+ """Test the check_file() method of the StyleChecker class.
+
+ The check_file() method calls its process_file parameter when
+ given a file that should not be skipped.
+
+ The "got_*" attributes of this class are the parameters passed
+ to process_file by calls to check_file() made by this test
+ class. These attributes allow us to check the parameter values
+ passed internally to the process_file function.
+
+ Attributes:
+ got_file_path: The file_path parameter passed by check_file()
+ to its process_file parameter.
+ got_handle_style_error: The handle_style_error parameter passed
+ by check_file() to its process_file
+ parameter.
+ got_processor: The processor parameter passed by check_file() to
+ its process_file parameter.
+ warning_messages: A string containing all of the warning messages
+ written to the mock_stderr_write method of
+ this class.
+
+ """
+ def setUp(self):
+ self.got_file_path = None
+ self.got_handle_style_error = None
+ self.got_processor = None
+ self.warning_messages = ""
+
+ def mock_stderr_write(self, warning_message):
+ self.warning_messages += warning_message
+
+ def mock_handle_style_error(self):
+ pass
+
+ def mock_process_file(self, processor, file_path, handle_style_error):
+ """A mock _process_file().
+
+ See the documentation for this class for more information
+ on this function.
+
+ """
+ self.got_file_path = file_path
+ self.got_handle_style_error = handle_style_error
+ self.got_processor = processor
+
+ def assert_attributes(self,
+ expected_file_path,
+ expected_handle_style_error,
+ expected_processor,
+ expected_warning_messages):
+ """Assert that the attributes of this class equal the given values."""
+ self.assertEquals(self.got_file_path, expected_file_path)
+ self.assertEquals(self.got_handle_style_error, expected_handle_style_error)
+ self.assertEquals(self.got_processor, expected_processor)
+ self.assertEquals(self.warning_messages, expected_warning_messages)
+
+ def call_check_file(self, file_path):
+ """Call the check_file() method of a test StyleChecker instance."""
+ # Confirm that the attributes are reset.
+ self.assert_attributes(None, None, None, "")
+
+ # Create a test StyleChecker instance.
+ #
+ # The verbosity attribute is the only ProcessorOptions
+ # attribute that needs to be checked in this test.
+ # This is because it is the only option is directly
+ # passed to the constructor of a style processor.
+ options = ProcessorOptions(verbosity=3)
+
+ style_checker = StyleChecker(options, self.mock_stderr_write)
+
+ style_checker.check_file(file_path,
+ self.mock_handle_style_error,
+ self.mock_process_file)
+
+ def test_check_file_on_skip_without_warning(self):
+ """Test check_file() for a skipped-without-warning file."""
+
+ file_path = "LayoutTests/foo.txt"
+
+ dispatcher = ProcessorDispatcher()
+ # Confirm that the input file is truly a skipped-without-warning file.
+ self.assertTrue(dispatcher.should_skip_without_warning(file_path))
+
+ # Check the outcome.
+ self.call_check_file(file_path)
+ self.assert_attributes(None, None, None, "")
+
+ def test_check_file_on_skip_with_warning(self):
+ """Test check_file() for a skipped-with-warning file."""
+
+ file_path = "gtk2drawing.c"
+
+ dispatcher = ProcessorDispatcher()
+ # Check that the input file is truly a skipped-with-warning file.
+ self.assertTrue(dispatcher.should_skip_with_warning(file_path))
+
+ # Check the outcome.
+ self.call_check_file(file_path)
+ self.assert_attributes(None, None, None,
+ 'Ignoring "gtk2drawing.c": this file is exempt from the style guide.\n')
+
+ def test_check_file_on_non_skipped(self):
+
+ # We use a C++ file since by using a CppProcessor, we can check
+ # that all of the possible information is getting passed to
+ # process_file (in particular, the verbosity).
+ file_base = "foo"
+ file_extension = "cpp"
+ file_path = file_base + "." + file_extension
+
+ dispatcher = ProcessorDispatcher()
+ # Check that the input file is truly a C++ file.
+ self.assertEquals(dispatcher._file_type(file_path), style.FileType.CPP)
+
+ # Check the outcome.
+ self.call_check_file(file_path)
+
+ expected_processor = CppProcessor(file_path, file_extension, self.mock_handle_style_error, 3)
+
+ self.assert_attributes(file_path,
+ self.mock_handle_style_error,
+ expected_processor,
+ "")
+
+
+if __name__ == '__main__':
+ import sys
+
+ unittest.main()
+
diff --git a/WebKitTools/Scripts/webkitpy/style/error_handlers.py b/WebKitTools/Scripts/webkitpy/style/error_handlers.py
new file mode 100644
index 0000000..54b1d76
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/style/error_handlers.py
@@ -0,0 +1,154 @@
+# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
+#
+# 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.
+
+"""Defines style error handler classes.
+
+A style error handler is a function to call when a style error is
+found. Style error handlers can also have state. A class that represents
+a style error handler should implement the following methods.
+
+Methods:
+
+ __call__(self, line_number, category, confidence, message):
+
+ Handle the occurrence of a style error.
+
+ Check whether the error is reportable. If so, report the details.
+
+ Args:
+ line_number: The integer line number of the line containing the error.
+ category: The name of the category of the error, for example
+ "whitespace/newline".
+ confidence: An integer between 1-5 that represents the level of
+ confidence in the error. The value 5 means that we are
+ certain of the problem, and the value 1 means that it
+ could be a legitimate construct.
+ message: The error message to report.
+
+"""
+
+
+import sys
+
+
+class DefaultStyleErrorHandler(object):
+
+ """The default style error handler."""
+
+ def __init__(self, file_path, options, increment_error_count,
+ stderr_write=None):
+ """Create a default style error handler.
+
+ Args:
+ file_path: The path to the file containing the error. This
+ is used for reporting to the user.
+ options: A ProcessorOptions instance.
+ increment_error_count: A function that takes no arguments and
+ increments the total count of reportable
+ errors.
+ stderr_write: A function that takes a string as a parameter
+ and that is called when a style error occurs.
+ Defaults to sys.stderr.write. This should be
+ used only for unit tests.
+
+ """
+ if stderr_write is None:
+ stderr_write = sys.stderr.write
+
+ self._file_path = file_path
+ self._increment_error_count = increment_error_count
+ self._options = options
+ self._stderr_write = stderr_write
+
+ def __call__(self, line_number, category, confidence, message):
+ """Handle the occurrence of a style error.
+
+ See the docstring of this module for more information.
+
+ """
+ if not self._options.is_reportable(category, confidence):
+ return
+
+ self._increment_error_count()
+
+ if self._options.output_format == 'vs7':
+ format_string = "%s(%s): %s [%s] [%d]\n"
+ else:
+ format_string = "%s:%s: %s [%s] [%d]\n"
+
+ self._stderr_write(format_string % (self._file_path,
+ line_number,
+ message,
+ category,
+ confidence))
+
+
+class PatchStyleErrorHandler(object):
+
+ """The style error function for patch files."""
+
+ def __init__(self, diff, file_path, options, increment_error_count,
+ stderr_write):
+ """Create a patch style error handler for the given path.
+
+ Args:
+ diff: A DiffFile instance.
+ Other arguments: see the DefaultStyleErrorHandler.__init__()
+ documentation for the other arguments.
+
+ """
+ self._diff = diff
+ self._default_error_handler = DefaultStyleErrorHandler(file_path,
+ options,
+ increment_error_count,
+ stderr_write)
+
+ # The line numbers of the modified lines. This is set lazily.
+ self._line_numbers = set()
+
+ def _get_line_numbers(self):
+ """Return the line numbers of the modified lines."""
+ if not self._line_numbers:
+ for line in self._diff.lines:
+ # When deleted line is not set, it means that
+ # the line is newly added.
+ if not line[0]:
+ self._line_numbers.add(line[1])
+
+ return self._line_numbers
+
+ def __call__(self, line_number, category, confidence, message):
+ """Handle the occurrence of a style error.
+
+ This function does not report errors occurring in lines not
+ modified or added.
+
+ Args: see the DefaultStyleErrorHandler.__call__() documentation.
+
+ """
+ if line_number not in self._get_line_numbers():
+ # Then the error is not reportable.
+ return
+
+ self._default_error_handler(line_number, category, confidence,
+ message)
+
diff --git a/WebKitTools/Scripts/webkitpy/style/error_handlers_unittest.py b/WebKitTools/Scripts/webkitpy/style/error_handlers_unittest.py
new file mode 100644
index 0000000..6a91ff2
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/style/error_handlers_unittest.py
@@ -0,0 +1,163 @@
+# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
+#
+# 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.
+
+"""Unit tests for error_handlers.py."""
+
+
+import unittest
+
+from .. style_references import parse_patch
+from checker import ProcessorOptions
+from error_handlers import DefaultStyleErrorHandler
+from error_handlers import PatchStyleErrorHandler
+
+
+class StyleErrorHandlerTestBase(unittest.TestCase):
+
+ def setUp(self):
+ self._error_messages = ""
+ self._error_count = 0
+
+ def _mock_increment_error_count(self):
+ self._error_count += 1
+
+ def _mock_stderr_write(self, message):
+ self._error_messages += message
+
+
+class DefaultStyleErrorHandlerTest(StyleErrorHandlerTestBase):
+
+ """Tests DefaultStyleErrorHandler class."""
+
+ _category = "whitespace/tab"
+
+ def _options(self, output_format):
+ return ProcessorOptions(verbosity=3, output_format=output_format)
+
+ def _error_handler(self, options):
+ file_path = "foo.h"
+ return DefaultStyleErrorHandler(file_path,
+ options,
+ self._mock_increment_error_count,
+ self._mock_stderr_write)
+
+ def _prepare_call(self, output_format="emacs"):
+ """Return options after initializing."""
+ options = self._options(output_format)
+
+ # Test that count is initialized to zero.
+ self.assertEquals(0, self._error_count)
+ self.assertEquals("", self._error_messages)
+
+ return options
+
+ def _call_error_handler(self, options, confidence):
+ """Handle an error with given confidence."""
+ handle_error = self._error_handler(options)
+
+ line_number = 100
+ message = "message"
+
+ handle_error(line_number, self._category, confidence, message)
+
+ def test_call_non_reportable(self):
+ """Test __call__() method with a non-reportable error."""
+ confidence = 1
+ options = self._prepare_call()
+
+ # Confirm the error is not reportable.
+ self.assertFalse(options.is_reportable(self._category, confidence))
+
+ self._call_error_handler(options, confidence)
+
+ self.assertEquals(0, self._error_count)
+ self.assertEquals("", self._error_messages)
+
+ def test_call_reportable_emacs(self):
+ """Test __call__() method with a reportable error and emacs format."""
+ confidence = 5
+ options = self._prepare_call("emacs")
+
+ self._call_error_handler(options, confidence)
+
+ self.assertEquals(1, self._error_count)
+ self.assertEquals(self._error_messages,
+ "foo.h:100: message [whitespace/tab] [5]\n")
+
+ def test_call_reportable_vs7(self):
+ """Test __call__() method with a reportable error and vs7 format."""
+ confidence = 5
+ options = self._prepare_call("vs7")
+
+ self._call_error_handler(options, confidence)
+
+ self.assertEquals(1, self._error_count)
+ self.assertEquals(self._error_messages,
+ "foo.h(100): message [whitespace/tab] [5]\n")
+
+
+class PatchStyleErrorHandlerTest(StyleErrorHandlerTestBase):
+
+ """Tests PatchStyleErrorHandler class."""
+
+ file_path = "__init__.py"
+
+ patch_string = """diff --git a/__init__.py b/__init__.py
+index ef65bee..e3db70e 100644
+--- a/__init__.py
++++ b/__init__.py
+@@ -1 +1,2 @@
+ # Required for Python to search this directory for module files
++# New line
+
+"""
+
+ def test_call(self):
+ patch_files = parse_patch(self.patch_string)
+ diff = patch_files[self.file_path]
+
+ options = ProcessorOptions(verbosity=3)
+
+ handle_error = PatchStyleErrorHandler(diff,
+ self.file_path,
+ options,
+ self._mock_increment_error_count,
+ self._mock_stderr_write)
+
+ category = "whitespace/tab"
+ confidence = 5
+ message = "message"
+
+ # Confirm error is reportable.
+ self.assertTrue(options.is_reportable(category, confidence))
+
+ # Confirm error count initialized to zero.
+ self.assertEquals(0, self._error_count)
+
+ # Test error in unmodified line (error count does not increment).
+ handle_error(1, category, confidence, message)
+ self.assertEquals(0, self._error_count)
+
+ # Test error in modified line (error count increments).
+ handle_error(2, category, confidence, message)
+ self.assertEquals(1, self._error_count)
+
diff --git a/WebKitTools/Scripts/webkitpy/style/processors/__init__.py b/WebKitTools/Scripts/webkitpy/style/processors/__init__.py
new file mode 100644
index 0000000..ef65bee
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/style/processors/__init__.py
@@ -0,0 +1 @@
+# Required for Python to search this directory for module files
diff --git a/WebKitTools/Scripts/modules/cpp_style.py b/WebKitTools/Scripts/webkitpy/style/processors/cpp.py
index d8ca8d1..e1f41a4 100644
--- a/WebKitTools/Scripts/modules/cpp_style.py
+++ b/WebKitTools/Scripts/webkitpy/style/processors/cpp.py
@@ -4,6 +4,7 @@
# Copyright (C) 2009 Google Inc. All rights reserved.
# Copyright (C) 2009 Torch Mobile Inc.
# Copyright (C) 2009 Apple Inc. All rights reserved.
+# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -34,21 +35,9 @@
# This is the modified version of Google's cpplint. The original code is
# http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py
-"""Does WebKit-lint on c++ files.
-
-The goal of this script is to identify places in the code that *may*
-be in non-compliance with WebKit style. It does not attempt to fix
-up these problems -- the point is to educate. It does also not
-attempt to find all problems, or to ensure that everything it does
-find is legitimately a problem.
-
-In particular, we can get very confused by /* and // inside strings!
-We do a small hack, which is to ignore //'s with "'s after them on the
-same line, but it is far from perfect (in either direction).
-"""
+"""Support for check-webkit-style."""
import codecs
-import getopt
import math # for log
import os
import os.path
@@ -59,122 +48,6 @@ import sys
import unicodedata
-_USAGE = """
-Syntax: %(program_name)s [--verbose=#] [--output=vs7] [--filter=-x,+y,...]
- <file> [file] ...
-
- The style guidelines this tries to follow are those in
- http://webkit.org/coding/coding-style.html
-
- Every problem is given a confidence score from 1-5, with 5 meaning we are
- certain of the problem, and 1 meaning it could be a legitimate construct.
- This will miss some errors, and is not a substitute for a code review.
-
- To prevent specific lines from being linted, add a '// NOLINT' comment to the
- end of the line.
-
- The files passed in will be linted; at least one file must be provided.
- Linted extensions are .cpp, .c and .h. Other file types will be ignored.
-
- Flags:
-
- output=vs7
- By default, the output is formatted to ease emacs parsing. Visual Studio
- compatible output (vs7) may also be used. Other formats are unsupported.
-
- verbose=#
- Specify a number 0-5 to restrict errors to certain verbosity levels.
-
- filter=-x,+y,...
- Specify a comma-separated list of category-filters to apply: only
- error messages whose category names pass the filters will be printed.
- (Category names are printed with the message and look like
- "[whitespace/indent]".) Filters are evaluated left to right.
- "-FOO" and "FOO" means "do not print categories that start with FOO".
- "+FOO" means "do print categories that start with FOO".
-
- Examples: --filter=-whitespace,+whitespace/braces
- --filter=whitespace,runtime/printf,+runtime/printf_format
- --filter=-,+build/include_what_you_use
-
- To see a list of all the categories used in %(program_name)s, pass no arg:
- --filter=
-""" % {'program_name': sys.argv[0]}
-
-# We categorize each error message we print. Here are the categories.
-# We want an explicit list so we can list them all in cpp_style --filter=.
-# If you add a new error message with a new category, add it to the list
-# here! cpp_style_unittest.py should tell you if you forget to do this.
-# \ used for clearer layout -- pylint: disable-msg=C6013
-_ERROR_CATEGORIES = '''\
- build/class
- build/deprecated
- build/endif_comment
- build/forward_decl
- build/header_guard
- build/include
- build/include_order
- build/include_what_you_use
- build/namespaces
- build/printf_format
- build/storage_class
- build/using_std
- legal/copyright
- readability/braces
- readability/casting
- readability/check
- readability/comparison_to_zero
- readability/constructors
- readability/control_flow
- readability/fn_size
- readability/function
- readability/multiline_comment
- readability/multiline_string
- readability/naming
- readability/null
- readability/streams
- readability/todo
- readability/utf8
- runtime/arrays
- runtime/casting
- runtime/explicit
- runtime/int
- runtime/init
- runtime/invalid_increment
- runtime/max_min_macros
- runtime/memset
- runtime/printf
- runtime/printf_format
- runtime/references
- runtime/rtti
- runtime/sizeof
- runtime/string
- runtime/threadsafe_fn
- runtime/virtual
- whitespace/blank_line
- whitespace/braces
- whitespace/comma
- whitespace/comments
- whitespace/declaration
- whitespace/end_of_line
- whitespace/ending_newline
- whitespace/indent
- whitespace/labels
- whitespace/line_length
- whitespace/newline
- whitespace/operators
- whitespace/parens
- whitespace/semicolon
- whitespace/tab
- whitespace/todo
-'''
-
-# The default state of the category filter. This is overrided by the --filter=
-# flag. By default all errors are on, so only add here categories that should be
-# off by default (i.e., categories that must be enabled by the --filter= flags).
-# All entries here should start with a '-' or '+', as in the --filter= flag.
-_DEFAULT_FILTERS = []
-
# Headers that we consider STL headers.
_STL_HEADERS = frozenset([
'algobase.h', 'algorithm', 'alloc.h', 'bitset', 'deque', 'exception',
@@ -242,6 +115,7 @@ for op, inv_replacement in [('==', 'NE'), ('!=', 'EQ'),
_CONFIG_HEADER = 0
_PRIMARY_HEADER = 1
_OTHER_HEADER = 2
+_MOC_HEADER = 3
# The regexp compilation caching is inlined in all regexp functions for
@@ -278,6 +152,31 @@ def subn(pattern, replacement, s):
return _regexp_compile_cache[pattern].subn(replacement, s)
+def up_to_unmatched_closing_paren(s):
+ """Splits a string into two parts up to first unmatched ')'.
+
+ Args:
+ s: a string which is a substring of line after '('
+ (e.g., "a == (b + c))").
+
+ Returns:
+ A pair of strings (prefix before first unmatched ')',
+ reminder of s after first unmatched ')'), e.g.,
+ up_to_unmatched_closing_paren("a == (b + c)) { ")
+ returns "a == (b + c)", " {".
+ Returns None, None if there is no unmatched ')'
+
+ """
+ i = 1
+ for pos, c in enumerate(s):
+ if c == '(':
+ i += 1
+ elif c == ')':
+ i -= 1
+ if i == 0:
+ return s[:pos], s[pos + 1:]
+ return None, None
+
class _IncludeState(dict):
"""Tracks line numbers for includes, and the order in which includes appear.
@@ -300,6 +199,7 @@ class _IncludeState(dict):
_CONFIG_HEADER: 'WebCore config.h',
_PRIMARY_HEADER: 'header this file implements',
_OTHER_HEADER: 'other header',
+ _MOC_HEADER: 'moc file',
}
_SECTION_NAMES = {
_INITIAL_SECTION: "... nothing.",
@@ -336,6 +236,8 @@ class _IncludeState(dict):
return 'Header file should not contain WebCore config.h.'
if header_type == _PRIMARY_HEADER and file_is_header:
return 'Header file should not contain itself.'
+ if header_type == _MOC_HEADER:
+ return ''
error_message = ''
if self._section != self._OTHER_SECTION:
@@ -366,117 +268,19 @@ class _IncludeState(dict):
return error_message
-class _CppStyleState(object):
- """Maintains module-wide state.."""
-
- def __init__(self):
- self.verbose_level = 1 # global setting.
- self.error_count = 0 # global count of reported errors
- # filters to apply when emitting error messages
- self.filters = _DEFAULT_FILTERS[:]
-
- # output format:
- # "emacs" - format that emacs can parse (default)
- # "vs7" - format that Microsoft Visual Studio 7 can parse
- self.output_format = 'emacs'
-
- def set_output_format(self, output_format):
- """Sets the output format for errors."""
- self.output_format = output_format
-
- def set_verbose_level(self, level):
- """Sets the module's verbosity, and returns the previous setting."""
- last_verbose_level = self.verbose_level
- self.verbose_level = level
- return last_verbose_level
-
- def set_filters(self, filters):
- """Sets the error-message filters.
-
- These filters are applied when deciding whether to emit a given
- error message.
-
- Args:
- filters: A string of comma-separated filters (eg "+whitespace/indent").
- Each filter should start with + or -; else we die.
-
- Raises:
- ValueError: The comma-separated filters did not all start with '+' or '-'.
- E.g. "-,+whitespace,-whitespace/indent,whitespace/badfilter"
- """
- # Default filters always have less priority than the flag ones.
- self.filters = _DEFAULT_FILTERS[:]
- for filter in filters.split(','):
- clean_filter = filter.strip()
- if clean_filter:
- self.filters.append(clean_filter)
- for filter in self.filters:
- if not (filter.startswith('+') or filter.startswith('-')):
- raise ValueError('Every filter in --filter must start with '
- '+ or - (%s does not)' % filter)
-
- def reset_error_count(self):
- """Sets the module's error statistic back to zero."""
- self.error_count = 0
-
- def increment_error_count(self):
- """Bumps the module's error statistic."""
- self.error_count += 1
-
-
-_cpp_style_state = _CppStyleState()
-
-
-def _output_format():
- """Gets the module's output format."""
- return _cpp_style_state.output_format
-
-
-def _set_output_format(output_format):
- """Sets the module's output format."""
- _cpp_style_state.set_output_format(output_format)
-
-
-def _verbose_level():
- """Returns the module's verbosity setting."""
- return _cpp_style_state.verbose_level
-
-
-def _set_verbose_level(level):
- """Sets the module's verbosity, and returns the previous setting."""
- return _cpp_style_state.set_verbose_level(level)
-
-
-def _filters():
- """Returns the module's list of output filters, as a list."""
- return _cpp_style_state.filters
-
-
-def _set_filters(filters):
- """Sets the module's error-message filters.
+class _FunctionState(object):
+ """Tracks current function name and the number of lines in its body.
- These filters are applied when deciding whether to emit a given
- error message.
+ Attributes:
+ verbosity: The verbosity level to use while checking style.
- Args:
- filters: A string of comma-separated filters (eg "whitespace/indent").
- Each filter should start with + or -; else we die.
"""
- _cpp_style_state.set_filters(filters)
-
-
-def error_count():
- """Returns the global count of reported errors."""
- return _cpp_style_state.error_count
-
-
-class _FunctionState(object):
- """Tracks current function name and the number of lines in its body."""
_NORMAL_TRIGGER = 250 # for --v=0, 500 for --v=1, etc.
_TEST_TRIGGER = 400 # about 50% more than _NORMAL_TRIGGER.
- def __init__(self):
+ def __init__(self, verbosity):
+ self.verbosity = verbosity
self.in_a_function = False
self.lines_in_function = 0
self.current_function = ''
@@ -496,26 +300,25 @@ class _FunctionState(object):
if self.in_a_function:
self.lines_in_function += 1
- def check(self, error, filename, line_number):
+ def check(self, error, line_number):
"""Report if too many lines in function body.
Args:
error: The function to call with any errors found.
- filename: The name of the current file.
line_number: The number of the line to check.
"""
if match(r'T(EST|est)', self.current_function):
base_trigger = self._TEST_TRIGGER
else:
base_trigger = self._NORMAL_TRIGGER
- trigger = base_trigger * 2 ** _verbose_level()
+ trigger = base_trigger * 2 ** self.verbosity
if self.lines_in_function > trigger:
error_level = int(math.log(self.lines_in_function / base_trigger, 2))
# 50 => 0, 100 => 1, 200 => 2, 400 => 3, 800 => 4, 1600 => 5, ...
if error_level > 5:
error_level = 5
- error(filename, line_number, 'readability/fn_size', error_level,
+ error(line_number, 'readability/fn_size', error_level,
'Small and focused functions are preferred:'
' %s has %d non-comment lines'
' (error triggered by exceeding %d lines).' % (
@@ -531,6 +334,16 @@ class _IncludeError(Exception):
pass
+def is_c_or_objective_c(file_extension):
+ """Return whether the file extension corresponds to C or Objective-C.
+
+ Args:
+ file_extension: The file extension without the leading dot.
+
+ """
+ return file_extension in ['c', 'm']
+
+
class FileInfo:
"""Provides utility functions for filenames.
@@ -617,59 +430,6 @@ class FileInfo:
return self.extension()[1:] in ('c', 'cc', 'cpp', 'cxx')
-def _should_print_error(category, confidence):
- """Returns true iff confidence >= verbose, and category passes filter."""
- # There are two ways we might decide not to print an error message:
- # the verbosity level isn't high enough, or the filters filter it out.
- if confidence < _cpp_style_state.verbose_level:
- return False
-
- is_filtered = False
- for one_filter in _filters():
- if one_filter.startswith('-'):
- if category.startswith(one_filter[1:]):
- is_filtered = True
- elif one_filter.startswith('+'):
- if category.startswith(one_filter[1:]):
- is_filtered = False
- else:
- assert False # should have been checked for in set_filter.
- if is_filtered:
- return False
-
- return True
-
-
-def error(filename, line_number, category, confidence, message):
- """Logs the fact we've found a lint error.
-
- We log where the error was found, and also our confidence in the error,
- that is, how certain we are this is a legitimate style regression, and
- not a misidentification or a use that's sometimes justified.
-
- Args:
- filename: The name of the file containing the error.
- line_number: The number of the line containing the error.
- category: A string used to describe the "category" this bug
- falls under: "whitespace", say, or "runtime". Categories
- may have a hierarchy separated by slashes: "whitespace/indent".
- confidence: A number from 1-5 representing a confidence score for
- the error, with 5 meaning that we are certain of the problem,
- and 1 meaning that it could be a legitimate construct.
- message: The error message.
- """
- # There are two ways we might decide not to print an error message:
- # the verbosity level isn't high enough, or the filters filter it out.
- if _should_print_error(category, confidence):
- _cpp_style_state.increment_error_count()
- if _cpp_style_state.output_format == 'vs7':
- sys.stderr.write('%s(%s): %s [%s] [%d]\n' % (
- filename, line_number, message, category, confidence))
- else:
- sys.stderr.write('%s:%s: %s [%s] [%d]\n' % (
- filename, line_number, message, category, confidence))
-
-
# Matches standard C++ escape esequences per 2.13.2.3 of the C++ standard.
_RE_PATTERN_CLEANSE_LINE_ESCAPES = re.compile(
r'\\([abfnrtv?"\\\']|\d+|x[0-9a-fA-F]+)')
@@ -737,7 +497,7 @@ def remove_multi_line_comments_from_range(lines, begin, end):
lines[i] = '// dummy'
-def remove_multi_line_comments(filename, lines, error):
+def remove_multi_line_comments(lines, error):
"""Removes multiline (c-style) comments from lines."""
line_index = 0
while line_index < len(lines):
@@ -746,7 +506,7 @@ def remove_multi_line_comments(filename, lines, error):
return
line_index_end = find_next_multi_line_comment_end(lines, line_index_begin)
if line_index_end >= len(lines):
- error(filename, line_index_begin + 1, 'readability/multiline_comment', 5,
+ error(line_index_begin + 1, 'readability/multiline_comment', 5,
'Could not find end of multi-line comment')
return
remove_multi_line_comments_from_range(lines, line_index_begin, line_index_end + 1)
@@ -856,7 +616,7 @@ def close_expression(clean_lines, line_number, pos):
return (line, line_number, endpos + 1)
-def check_for_copyright(filename, lines, error):
+def check_for_copyright(lines, error):
"""Logs an error if no Copyright message appears at the top of the file."""
# We'll say it should occur by line 10. Don't forget there's a
@@ -865,7 +625,7 @@ def check_for_copyright(filename, lines, error):
if re.search(r'Copyright', lines[line], re.I):
break
else: # means no copyright line was found
- error(filename, 0, 'legal/copyright', 5,
+ error(0, 'legal/copyright', 5,
'No copyright message found. '
'You should have a line: "Copyright [year] <Copyright Owner>"')
@@ -882,8 +642,7 @@ def get_header_guard_cpp_variable(filename):
"""
- fileinfo = FileInfo(filename)
- return sub(r'[-./\s]', '_', fileinfo.repository_name()).upper() + '_'
+ return sub(r'[-.\s]', '_', os.path.basename(filename))
def check_for_header_guard(filename, lines, error):
@@ -903,8 +662,6 @@ def check_for_header_guard(filename, lines, error):
ifndef = None
ifndef_line_number = 0
define = None
- endif = None
- endif_line_number = 0
for line_number, line in enumerate(lines):
line_split = line.split()
if len(line_split) >= 2:
@@ -915,37 +672,22 @@ def check_for_header_guard(filename, lines, error):
ifndef_line_number = line_number
if not define and line_split[0] == '#define':
define = line_split[1]
- # find the last occurrence of #endif, save entire line
- if line.startswith('#endif'):
- endif = line
- endif_line_number = line_number
+ if define and ifndef:
+ break
if not ifndef or not define or ifndef != define:
- error(filename, 0, 'build/header_guard', 5,
+ error(0, 'build/header_guard', 5,
'No #ifndef header guard found, suggested CPP variable is: %s' %
cppvar)
return
- # The guard should be PATH_FILE_H_, but we also allow PATH_FILE_H__
- # for backward compatibility.
+ # The guard should be File_h.
if ifndef != cppvar:
- error_level = 0
- if ifndef != cppvar + '_':
- error_level = 5
-
- error(filename, ifndef_line_number, 'build/header_guard', error_level,
+ error(ifndef_line_number, 'build/header_guard', 5,
'#ifndef header guard has wrong style, please use: %s' % cppvar)
- if endif != ('#endif // %s' % cppvar):
- error_level = 0
- if endif != ('#endif // %s' % (cppvar + '_')):
- error_level = 5
-
- error(filename, endif_line_number, 'build/header_guard', error_level,
- '#endif line should be "#endif // %s"' % cppvar)
-
-def check_for_unicode_replacement_characters(filename, lines, error):
+def check_for_unicode_replacement_characters(lines, error):
"""Logs an error for each line containing Unicode replacement characters.
These indicate that either the file contained invalid UTF-8 (likely)
@@ -954,21 +696,19 @@ def check_for_unicode_replacement_characters(filename, lines, error):
UTF-8 occurred adjacent to a newline.
Args:
- filename: The name of the current file.
lines: An array of strings, each representing a line of the file.
error: The function to call with any errors found.
"""
for line_number, line in enumerate(lines):
if u'\ufffd' in line:
- error(filename, line_number, 'readability/utf8', 5,
+ error(line_number, 'readability/utf8', 5,
'Line contains invalid UTF-8 (or Unicode replacement character).')
-def check_for_new_line_at_eof(filename, lines, error):
+def check_for_new_line_at_eof(lines, error):
"""Logs an error if there is no newline char at the end of the file.
Args:
- filename: The name of the current file.
lines: An array of strings, each representing a line of the file.
error: The function to call with any errors found.
"""
@@ -978,11 +718,11 @@ def check_for_new_line_at_eof(filename, lines, error):
# To verify that the file ends in \n, we just have to make sure the
# last-but-two element of lines() exists and is empty.
if len(lines) < 3 or lines[-2]:
- error(filename, len(lines) - 2, 'whitespace/ending_newline', 5,
+ error(len(lines) - 2, 'whitespace/ending_newline', 5,
'Could not find a newline character at the end of the file.')
-def check_for_multiline_comments_and_strings(filename, clean_lines, line_number, error):
+def check_for_multiline_comments_and_strings(clean_lines, line_number, error):
"""Logs an error if we see /* ... */ or "..." that extend past one line.
/* ... */ comments are legit inside macros, for one line.
@@ -994,7 +734,6 @@ def check_for_multiline_comments_and_strings(filename, clean_lines, line_number,
in this lint program, so we warn about both.
Args:
- filename: The name of the current file.
clean_lines: A CleansedLines instance containing the file.
line_number: The number of the line to check.
error: The function to call with any errors found.
@@ -1006,7 +745,7 @@ def check_for_multiline_comments_and_strings(filename, clean_lines, line_number,
line = line.replace('\\\\', '')
if line.count('/*') > line.count('*/'):
- error(filename, line_number, 'readability/multiline_comment', 5,
+ error(line_number, 'readability/multiline_comment', 5,
'Complex multi-line /*...*/-style comment found. '
'Lint may give bogus warnings. '
'Consider replacing these with //-style comments, '
@@ -1014,7 +753,7 @@ def check_for_multiline_comments_and_strings(filename, clean_lines, line_number,
'or with more clearly structured multi-line comments.')
if (line.count('"') - line.count('\\"')) % 2:
- error(filename, line_number, 'readability/multiline_string', 5,
+ error(line_number, 'readability/multiline_string', 5,
'Multi-line string ("...") found. This lint script doesn\'t '
'do well with such strings, and may give bogus warnings. They\'re '
'ugly and unnecessary, and you should use concatenation instead".')
@@ -1037,7 +776,7 @@ _THREADING_LIST = (
)
-def check_posix_threading(filename, clean_lines, line_number, error):
+def check_posix_threading(clean_lines, line_number, error):
"""Checks for calls to thread-unsafe functions.
Much code has been originally written without consideration of
@@ -1047,7 +786,6 @@ def check_posix_threading(filename, clean_lines, line_number, error):
posix directly).
Args:
- filename: The name of the current file.
clean_lines: A CleansedLines instance containing the file.
line_number: The number of the line to check.
error: The function to call with any errors found.
@@ -1058,7 +796,7 @@ def check_posix_threading(filename, clean_lines, line_number, error):
# Comparisons made explicit for clarity -- pylint: disable-msg=C6403
if index >= 0 and (index == 0 or (not line[index - 1].isalnum()
and line[index - 1] not in ('_', '.', '>'))):
- error(filename, line_number, 'runtime/threadsafe_fn', 2,
+ error(line_number, 'runtime/threadsafe_fn', 2,
'Consider using ' + multithread_safe_function +
'...) instead of ' + single_thread_function +
'...) for improved thread safety.')
@@ -1070,7 +808,7 @@ _RE_PATTERN_INVALID_INCREMENT = re.compile(
r'^\s*\*\w+(\+\+|--);')
-def check_invalid_increment(filename, clean_lines, line_number, error):
+def check_invalid_increment(clean_lines, line_number, error):
"""Checks for invalid increment *count++.
For example following function:
@@ -1081,14 +819,13 @@ def check_invalid_increment(filename, clean_lines, line_number, error):
be replaced with ++*count, (*count)++ or *count += 1.
Args:
- filename: The name of the current file.
clean_lines: A CleansedLines instance containing the file.
line_number: The number of the line to check.
error: The function to call with any errors found.
"""
line = clean_lines.elided[line_number]
if _RE_PATTERN_INVALID_INCREMENT.match(line):
- error(filename, line_number, 'runtime/invalid_increment', 5,
+ error(line_number, 'runtime/invalid_increment', 5,
'Changing pointer instead of value (or unused value of operator*).')
@@ -1117,19 +854,18 @@ class _ClassState(object):
def __init__(self):
self.classinfo_stack = []
- def check_finished(self, filename, error):
+ def check_finished(self, error):
"""Checks that all classes have been completely parsed.
Call this when all lines in a file have been processed.
Args:
- filename: The name of the current file.
error: The function to call with any errors found.
"""
if self.classinfo_stack:
# Note: This test can result in false positives if #ifdef constructs
# get in the way of brace matching. See the testBuildClass test in
# cpp_style_unittest.py for an example of this.
- error(filename, self.classinfo_stack[0].line_number, 'build/class', 5,
+ error(self.classinfo_stack[0].line_number, 'build/class', 5,
'Failed to find complete declaration of class %s' %
self.classinfo_stack[0].name)
@@ -1144,7 +880,7 @@ class _FileState(object):
def did_inside_namespace_indent_warning(self):
return self._did_inside_namespace_indent_warning
-def check_for_non_standard_constructs(filename, clean_lines, line_number,
+def check_for_non_standard_constructs(clean_lines, line_number,
class_state, error):
"""Logs an error if we see certain non-ANSI constructs ignored by gcc-2.
@@ -1165,31 +901,30 @@ def check_for_non_standard_constructs(filename, clean_lines, line_number,
is very convenient to do so while checking for gcc-2 compliance.
Args:
- filename: The name of the current file.
clean_lines: A CleansedLines instance containing the file.
line_number: The number of the line to check.
class_state: A _ClassState instance which maintains information about
the current stack of nested class declarations being parsed.
- error: A callable to which errors are reported, which takes 4 arguments:
- filename, line number, error level, and message
+ error: A callable to which errors are reported, which takes parameters:
+ line number, error level, and message
"""
# Remove comments from the line, but leave in strings for now.
line = clean_lines.lines[line_number]
if search(r'printf\s*\(.*".*%[-+ ]?\d*q', line):
- error(filename, line_number, 'runtime/printf_format', 3,
+ error(line_number, 'runtime/printf_format', 3,
'%q in format strings is deprecated. Use %ll instead.')
if search(r'printf\s*\(.*".*%\d+\$', line):
- error(filename, line_number, 'runtime/printf_format', 2,
+ error(line_number, 'runtime/printf_format', 2,
'%N$ formats are unconventional. Try rewriting to avoid them.')
# Remove escaped backslashes before looking for undefined escapes.
line = line.replace('\\\\', '')
if search(r'("|\').*\\(%|\[|\(|{)', line):
- error(filename, line_number, 'build/printf_format', 3,
+ error(line_number, 'build/printf_format', 3,
'%, [, (, and { are undefined character escapes. Unescape them.')
# For the rest, work with both comments and strings removed.
@@ -1200,19 +935,19 @@ def check_for_non_standard_constructs(filename, clean_lines, line_number,
r'|schar|u?int8|u?int16|u?int32|u?int64)'
r'\s+(auto|register|static|extern|typedef)\b',
line):
- error(filename, line_number, 'build/storage_class', 5,
+ error(line_number, 'build/storage_class', 5,
'Storage class (static, extern, typedef, etc) should be first.')
if match(r'\s*#\s*endif\s*[^/\s]+', line):
- error(filename, line_number, 'build/endif_comment', 5,
+ error(line_number, 'build/endif_comment', 5,
'Uncommented text after #endif is non-standard. Use a comment.')
if match(r'\s*class\s+(\w+\s*::\s*)+\w+\s*;', line):
- error(filename, line_number, 'build/forward_decl', 5,
+ error(line_number, 'build/forward_decl', 5,
'Inner-style forward declarations are invalid. Remove this line.')
if search(r'(\w+|[+-]?\d+(\.\d*)?)\s*(<|>)\?=?\s*(\w+|[+-]?\d+)(\.\d*)?', line):
- error(filename, line_number, 'build/deprecated', 3,
+ error(line_number, 'build/deprecated', 3,
'>? and <? (max and min) operators are non-standard and deprecated.')
# Track class entry and exit, and attempt to find cases within the
@@ -1262,7 +997,7 @@ def check_for_non_standard_constructs(filename, clean_lines, line_number,
and args.group(1) != 'void'
and not match(r'(const\s+)?%s\s*&' % re.escape(base_classname),
args.group(1).strip())):
- error(filename, line_number, 'runtime/explicit', 5,
+ error(line_number, 'runtime/explicit', 5,
'Single-argument constructors should be marked explicit.')
# Look for methods declared virtual.
@@ -1287,7 +1022,7 @@ def check_for_non_standard_constructs(filename, clean_lines, line_number,
if ((classinfo.virtual_method_line_number is not None)
and (not classinfo.has_virtual_destructor)
and (not classinfo.is_derived)): # Only warn for base classes
- error(filename, classinfo.line_number, 'runtime/virtual', 4,
+ error(classinfo.line_number, 'runtime/virtual', 4,
'The class %s probably needs a virtual destructor due to '
'having virtual method(s), one declared at line %d.'
% (classinfo.name, classinfo.virtual_method_line_number))
@@ -1295,11 +1030,10 @@ def check_for_non_standard_constructs(filename, clean_lines, line_number,
classinfo.brace_depth = brace_depth
-def check_spacing_for_function_call(filename, line, line_number, error):
+def check_spacing_for_function_call(line, line_number, error):
"""Checks for the correctness of various spacing around function calls.
Args:
- filename: The name of the current file.
line: The text of the line to check.
line_number: The number of the line to check.
error: The function to call with any errors found.
@@ -1340,19 +1074,19 @@ def check_spacing_for_function_call(filename, line, line_number, error):
# Ignore pointers/references to arrays.
and not search(r' \([^)]+\)\[[^\]]+\]', function_call)):
if search(r'\w\s*\([ \t](?!\s*\\$)', function_call): # a ( used for a fn call
- error(filename, line_number, 'whitespace/parens', 4,
+ error(line_number, 'whitespace/parens', 4,
'Extra space after ( in function call')
elif search(r'\([ \t]+(?!(\s*\\)|\()', function_call):
- error(filename, line_number, 'whitespace/parens', 2,
+ error(line_number, 'whitespace/parens', 2,
'Extra space after (')
if (search(r'\w\s+\(', function_call)
and not search(r'#\s*define|typedef', function_call)):
- error(filename, line_number, 'whitespace/parens', 4,
+ error(line_number, 'whitespace/parens', 4,
'Extra space before ( in function call')
# If the ) is followed only by a newline or a { + newline, assume it's
# part of a control statement (if/while/etc), and don't complain
if search(r'[^)\s]\s+\)(?!\s*$|{\s*$)', function_call):
- error(filename, line_number, 'whitespace/parens', 2,
+ error(line_number, 'whitespace/parens', 2,
'Extra space before )')
@@ -1371,8 +1105,7 @@ def is_blank_line(line):
return not line or line.isspace()
-def check_for_function_lengths(filename, clean_lines, line_number,
- function_state, error):
+def check_for_function_lengths(clean_lines, line_number, function_state, error):
"""Reports for long function bodies.
For an overview why this is done, see:
@@ -1388,7 +1121,6 @@ def check_for_function_lengths(filename, clean_lines, line_number,
NOLINT *on the last line of a function* disables this check.
Args:
- filename: The name of the current file.
clean_lines: A CleansedLines instance containing the file.
line_number: The number of the line to check.
function_state: Current function name and lines in body so far.
@@ -1431,17 +1163,17 @@ def check_for_function_lengths(filename, clean_lines, line_number,
break
if not body_found:
# No body for the function (or evidence of a non-function) was found.
- error(filename, line_number, 'readability/fn_size', 5,
+ error(line_number, 'readability/fn_size', 5,
'Lint failed to find start of function body.')
elif match(r'^\}\s*$', line): # function end
if not search(r'\bNOLINT\b', raw_line):
- function_state.check(error, filename, line_number)
+ function_state.check(error, line_number)
function_state.end()
elif not match(r'^\s*$', line):
function_state.count() # Count non-blank/non-comment lines.
-def check_spacing(filename, clean_lines, line_number, error):
+def check_spacing(file_extension, clean_lines, line_number, error):
"""Checks for the correctness of various spacing issues in the code.
Things we check for: spaces around operators, spaces after
@@ -1451,7 +1183,7 @@ def check_spacing(filename, clean_lines, line_number, error):
blank lines in a row.
Args:
- filename: The name of the current file.
+ file_extension: The current file extension, without the leading dot.
clean_lines: A CleansedLines instance containing the file.
line_number: The number of the line to check.
error: The function to call with any errors found.
@@ -1502,7 +1234,7 @@ def check_spacing(filename, clean_lines, line_number, error):
or match(r' {4}:', previous_line))
if not exception:
- error(filename, line_number, 'whitespace/blank_line', 2,
+ error(line_number, 'whitespace/blank_line', 2,
'Blank line at the start of a code block. Is this needed?')
# This doesn't ignore whitespace at the end of a namespace block
# because that is too hard without pairing open/close braces;
@@ -1523,7 +1255,7 @@ def check_spacing(filename, clean_lines, line_number, error):
and match(r'\s*}', next_line)
and next_line.find('namespace') == -1
and next_line.find('} else ') == -1):
- error(filename, line_number, 'whitespace/blank_line', 3,
+ error(line_number, 'whitespace/blank_line', 3,
'Blank line at the end of a code block. Is this needed?')
# Next, we complain if there's a comment too near the text
@@ -1532,14 +1264,14 @@ def check_spacing(filename, clean_lines, line_number, error):
# Check if the // may be in quotes. If so, ignore it
# Comparisons made explicit for clarity -- pylint: disable-msg=C6403
if (line.count('"', 0, comment_position) - line.count('\\"', 0, comment_position)) % 2 == 0: # not in quotes
- # Allow one space for new scopes, two spaces otherwise:
- if (not match(r'^\s*{ //', line)
- and ((comment_position >= 1
- and line[comment_position-1] not in string.whitespace)
+ # Allow one space before end of line comment.
+ if (not match(r'^\s*$', line[:comment_position])
+ and (comment_position >= 1
+ and ((line[comment_position - 1] not in string.whitespace)
or (comment_position >= 2
- and line[comment_position-2] not in string.whitespace))):
- error(filename, line_number, 'whitespace/comments', 2,
- 'At least two spaces is best between code and comments')
+ and line[comment_position - 2] in string.whitespace)))):
+ error(line_number, 'whitespace/comments', 5,
+ 'One space before end of line comments')
# There should always be a space between the // and the comment
commentend = comment_position + 2
if commentend < len(line) and not line[commentend] == ' ':
@@ -1551,7 +1283,7 @@ def check_spacing(filename, clean_lines, line_number, error):
matched = (search(r'[=/-]{4,}\s*$', line[commentend:])
or search(r'^/+ ', line[commentend:]))
if not matched:
- error(filename, line_number, 'whitespace/comments', 4,
+ error(line_number, 'whitespace/comments', 4,
'Should have a space between // and comment')
line = clean_lines.elided[line_number] # get rid of comments and strings
@@ -1563,7 +1295,7 @@ def check_spacing(filename, clean_lines, line_number, error):
if match(r'\s*#\s*(?:include|import)', line):
return
if search(r'[\w.]=[\w.]', line):
- error(filename, line_number, 'whitespace/operators', 4,
+ error(line_number, 'whitespace/operators', 4,
'Missing spaces around =')
# FIXME: It's not ok to have spaces around binary operators like .
@@ -1581,19 +1313,19 @@ def check_spacing(filename, clean_lines, line_number, error):
if not search(r'<[^<]*,\s*$', line): # template params spill
matched = search(r'[^<>=!\s](<)[^<>=!\s]([^>]|->)*$', line)
if matched:
- error(filename, line_number, 'whitespace/operators', 3,
+ error(line_number, 'whitespace/operators', 3,
'Missing spaces around %s' % matched.group(1))
# There shouldn't be space around unary operators
matched = search(r'(!\s|~\s|[\s]--[\s;]|[\s]\+\+[\s;])', line)
if matched:
- error(filename, line_number, 'whitespace/operators', 4,
+ error(line_number, 'whitespace/operators', 4,
'Extra space for operator %s' % matched.group(1))
# A pet peeve of mine: no spaces after an if, while, switch, or for
matched = search(r' (if\(|for\(|foreach\(|while\(|switch\()', line)
if matched:
- error(filename, line_number, 'whitespace/parens', 5,
+ error(line_number, 'whitespace/parens', 5,
'Missing space before ( in %s' % matched.group(1))
# For if/for/foreach/while/switch, the left and right parens should be
@@ -1601,79 +1333,92 @@ def check_spacing(filename, clean_lines, line_number, error):
# there should either be zero or one spaces inside the parens.
# We don't want: "if ( foo)" or "if ( foo )".
# Exception: "for ( ; foo; bar)" and "for (foo; bar; )" are allowed.
- matched = search(r'\b(if|for|foreach|while|switch)\s*\(([ ]*)(.).*[^ ]+([ ]*)\)\s*{\s*$',
- line)
+ matched = search(r'\b(?P<statement>if|for|foreach|while|switch)\s*\((?P<reminder>.*)$', line)
if matched:
- if len(matched.group(2)) != len(matched.group(4)):
- if not (matched.group(3) == ';'
- and len(matched.group(2)) == 1 + len(matched.group(4))
- or not matched.group(2) and search(r'\bfor\s*\(.*; \)', line)):
- error(filename, line_number, 'whitespace/parens', 5,
- 'Mismatching spaces inside () in %s' % matched.group(1))
- if not len(matched.group(2)) in [0, 1]:
- error(filename, line_number, 'whitespace/parens', 5,
- 'Should have zero or one spaces inside ( and ) in %s' %
- matched.group(1))
+ statement = matched.group('statement')
+ condition, rest = up_to_unmatched_closing_paren(matched.group('reminder'))
+ if condition is not None:
+ condition_match = search(r'(?P<leading>[ ]*)(?P<separator>.).*[^ ]+(?P<trailing>[ ]*)', condition)
+ if condition_match:
+ n_leading = len(condition_match.group('leading'))
+ n_trailing = len(condition_match.group('trailing'))
+ if n_leading != n_trailing:
+ for_exception = statement == 'for' and (
+ (condition.startswith(' ;') and n_trailing == 0) or
+ (condition.endswith('; ') and n_leading == 0))
+ if not for_exception:
+ error(line_number, 'whitespace/parens', 5,
+ 'Mismatching spaces inside () in %s' % statement)
+ if n_leading > 1:
+ error(line_number, 'whitespace/parens', 5,
+ 'Should have zero or one spaces inside ( and ) in %s' %
+ statement)
+
+ # Do not check for more than one command in macros
+ in_macro = match(r'\s*#define', line)
+ if not in_macro and not match(r'((\s*{\s*}?)|(\s*;?))\s*\\?$', rest):
+ error(line_number, 'whitespace/parens', 4,
+ 'More than one command on the same line in %s' % statement)
# You should always have a space after a comma (either as fn arg or operator)
if search(r',[^\s]', line):
- error(filename, line_number, 'whitespace/comma', 3,
+ error(line_number, 'whitespace/comma', 3,
'Missing space after ,')
- if filename.endswith('.cpp'):
+ if file_extension == 'cpp':
# C++ should have the & or * beside the type not the variable name.
matched = match(r'\s*\w+(?<!\breturn)\s+(?P<pointer_operator>\*|\&)\w+', line)
if matched:
- error(filename, line_number, 'whitespace/declaration', 3,
+ error(line_number, 'whitespace/declaration', 3,
'Declaration has space between type name and %s in %s' % (matched.group('pointer_operator'), matched.group(0).strip()))
- elif filename.endswith('.c'):
+ elif file_extension == 'c':
# C Pointer declaration should have the * beside the variable not the type name.
matched = search(r'^\s*\w+\*\s+\w+', line)
if matched:
- error(filename, line_number, 'whitespace/declaration', 3,
+ error(line_number, 'whitespace/declaration', 3,
'Declaration has space between * and variable name in %s' % matched.group(0).strip())
# Next we will look for issues with function calls.
- check_spacing_for_function_call(filename, line, line_number, error)
+ check_spacing_for_function_call(line, line_number, error)
# Except after an opening paren, you should have spaces before your braces.
# And since you should never have braces at the beginning of a line, this is
# an easy test.
if search(r'[^ ({]{', line):
- error(filename, line_number, 'whitespace/braces', 5,
+ error(line_number, 'whitespace/braces', 5,
'Missing space before {')
# Make sure '} else {' has spaces.
if search(r'}else', line):
- error(filename, line_number, 'whitespace/braces', 5,
+ error(line_number, 'whitespace/braces', 5,
'Missing space before else')
# You shouldn't have spaces before your brackets, except maybe after
# 'delete []' or 'new char * []'.
if search(r'\w\s+\[', line) and not search(r'delete\s+\[', line):
- error(filename, line_number, 'whitespace/braces', 5,
+ error(line_number, 'whitespace/braces', 5,
'Extra space before [')
# You shouldn't have a space before a semicolon at the end of the line.
# There's a special case for "for" since the style guide allows space before
# the semicolon there.
if search(r':\s*;\s*$', line):
- error(filename, line_number, 'whitespace/semicolon', 5,
+ error(line_number, 'whitespace/semicolon', 5,
'Semicolon defining empty statement. Use { } instead.')
elif search(r'^\s*;\s*$', line):
- error(filename, line_number, 'whitespace/semicolon', 5,
+ error(line_number, 'whitespace/semicolon', 5,
'Line contains only semicolon. If this should be an empty statement, '
'use { } instead.')
elif (search(r'\s+;\s*$', line) and not search(r'\bfor\b', line)):
- error(filename, line_number, 'whitespace/semicolon', 5,
+ error(line_number, 'whitespace/semicolon', 5,
'Extra space before last semicolon. If this should be an empty '
'statement, use { } instead.')
elif (search(r'\b(for|while)\s*\(.*\)\s*;\s*$', line)
and line.count('(') == line.count(')')
# Allow do {} while();
and not search(r'}\s*while', line)):
- error(filename, line_number, 'whitespace/semicolon', 5,
+ error(line_number, 'whitespace/semicolon', 5,
'Semicolon defining empty statement for this loop. Use { } instead.')
@@ -1700,11 +1445,10 @@ def get_previous_non_blank_line(clean_lines, line_number):
return ('', -1)
-def check_namespace_indentation(filename, clean_lines, line_number, file_extension, file_state, error):
+def check_namespace_indentation(clean_lines, line_number, file_extension, file_state, error):
"""Looks for indentation errors inside of namespaces.
Args:
- filename: The name of the current file.
clean_lines: A CleansedLines instance containing the file.
line_number: The number of the line to check.
file_extension: The extension (dot not included) of the file.
@@ -1723,7 +1467,7 @@ def check_namespace_indentation(filename, clean_lines, line_number, file_extensi
if current_indentation_level > 0:
# Don't warn about an indented namespace if we already warned about indented code.
if not file_state.did_inside_namespace_indent_warning():
- error(filename, line_number, 'whitespace/indent', 4,
+ error(line_number, 'whitespace/indent', 4,
'namespace should never be indented.')
return
looking_for_semicolon = False;
@@ -1737,7 +1481,7 @@ def check_namespace_indentation(filename, clean_lines, line_number, file_extensi
if not (in_preprocessor_directive or looking_for_semicolon):
if not match(r'\S', current_line) and not file_state.did_inside_namespace_indent_warning():
file_state.set_did_inside_namespace_indent_warning()
- error(filename, line_number + line_offset, 'whitespace/indent', 4,
+ error(line_number + line_offset, 'whitespace/indent', 4,
'Code inside a namespace should not be indented.')
if in_preprocessor_directive or (current_line.strip()[0] == '#'): # This takes care of preprocessor directive syntax.
in_preprocessor_directive = current_line[-1] == '\\'
@@ -1749,18 +1493,18 @@ def check_namespace_indentation(filename, clean_lines, line_number, file_extensi
if current_indentation_level < 0:
break;
-def check_using_std(filename, clean_lines, line_number, error):
+def check_using_std(file_extension, clean_lines, line_number, error):
"""Looks for 'using std::foo;' statements which should be replaced with 'using namespace std;'.
Args:
- filename: The name of the current file.
+ file_extension: The extension of the current file, without the leading dot.
clean_lines: A CleansedLines instance containing the file.
line_number: The number of the line to check.
error: The function to call with any errors found.
"""
# This check doesn't apply to C or Objective-C implementation files.
- if filename.endswith('.c') or filename.endswith('.m'):
+ if is_c_or_objective_c(file_extension):
return
line = clean_lines.elided[line_number] # Get rid of comments and strings.
@@ -1770,22 +1514,22 @@ def check_using_std(filename, clean_lines, line_number, error):
return
method_name = using_std_match.group('method_name')
- error(filename, line_number, 'build/using_std', 4,
+ error(line_number, 'build/using_std', 4,
"Use 'using namespace std;' instead of 'using std::%s;'." % method_name)
-def check_max_min_macros(filename, clean_lines, line_number, error):
+def check_max_min_macros(file_extension, clean_lines, line_number, error):
"""Looks use of MAX() and MIN() macros that should be replaced with std::max() and std::min().
Args:
- filename: The name of the current file.
+ file_extension: The extension of the current file, without the leading dot.
clean_lines: A CleansedLines instance containing the file.
line_number: The number of the line to check.
error: The function to call with any errors found.
"""
# This check doesn't apply to C or Objective-C implementation files.
- if filename.endswith('.c') or filename.endswith('.m'):
+ if is_c_or_objective_c(file_extension):
return
line = clean_lines.elided[line_number] # Get rid of comments and strings.
@@ -1796,16 +1540,15 @@ def check_max_min_macros(filename, clean_lines, line_number, error):
max_min_macro = max_min_macros_search.group('max_min_macro')
max_min_macro_lower = max_min_macro.lower()
- error(filename, line_number, 'runtime/max_min_macros', 4,
+ error(line_number, 'runtime/max_min_macros', 4,
'Use std::%s() or std::%s<type>() instead of the %s() macro.'
% (max_min_macro_lower, max_min_macro_lower, max_min_macro))
-def check_switch_indentation(filename, clean_lines, line_number, error):
+def check_switch_indentation(clean_lines, line_number, error):
"""Looks for indentation errors inside of switch statements.
Args:
- filename: The name of the current file.
clean_lines: A CleansedLines instance containing the file.
line_number: The number of the line to check.
error: The function to call with any errors found.
@@ -1851,7 +1594,7 @@ def check_switch_indentation(filename, clean_lines, line_number, error):
# on stuff like "Document::Foo();".
elif match(r'(default|case\s+.*)\s*:([^:].*)?$', remaining_line):
if current_indentation != switch_indentation:
- error(filename, line_number + line_offset, 'whitespace/indent', 4,
+ error(line_number + line_offset, 'whitespace/indent', 4,
'A case label should not be indented, but line up with its switch statement.')
# Don't throw an error for multiple badly indented labels,
# one should be enough to figure out the problem.
@@ -1862,7 +1605,7 @@ def check_switch_indentation(filename, clean_lines, line_number, error):
# It's not a goto label, so check if it's indented at least as far as
# the switch statement plus one more level of indentation.
elif not current_indentation.startswith(inner_indentation):
- error(filename, line_number + line_offset, 'whitespace/indent', 4,
+ error(line_number + line_offset, 'whitespace/indent', 4,
'Non-label code inside switch statements should be indented.')
# Don't throw an error for multiple badly indented statements,
# one should be enough to figure out the problem.
@@ -1872,11 +1615,10 @@ def check_switch_indentation(filename, clean_lines, line_number, error):
break
-def check_braces(filename, clean_lines, line_number, error):
+def check_braces(clean_lines, line_number, error):
"""Looks for misplaced braces (e.g. at the end of line).
Args:
- filename: The name of the current file.
clean_lines: A CleansedLines instance containing the file.
line_number: The number of the line to check.
error: The function to call with any errors found.
@@ -1897,13 +1639,13 @@ def check_braces(filename, clean_lines, line_number, error):
if ((not search(r'[;:}{)=]\s*$|\)\s*const\s*$', previous_line)
or search(r'\b(if|for|foreach|while|switch|else)\b', previous_line))
and previous_line.find('#') < 0):
- error(filename, line_number, 'whitespace/braces', 4,
+ error(line_number, 'whitespace/braces', 4,
'This { should be at the end of the previous line')
elif (search(r'\)\s*(const\s*)?{\s*$', line)
and line.count('(') == line.count(')')
and not search(r'\b(if|for|foreach|while|switch)\b', line)
and not match(r'\s+[A-Z_][A-Z_0-9]+\b', line)):
- error(filename, line_number, 'whitespace/braces', 4,
+ error(line_number, 'whitespace/braces', 4,
'Place brace on its own line for function definitions.')
if (match(r'\s*}\s*(else\s*({\s*)?)?$', line) and line_number > 1):
@@ -1912,24 +1654,24 @@ def check_braces(filename, clean_lines, line_number, error):
previous_line = clean_lines.elided[line_number - 2]
if (previous_line.find('{') > 0
and search(r'\b(if|for|foreach|while|else)\b', previous_line)):
- error(filename, line_number, 'whitespace/braces', 4,
+ error(line_number, 'whitespace/braces', 4,
'One line control clauses should not use braces.')
# An else clause should be on the same line as the preceding closing brace.
if match(r'\s*else\s*', line):
previous_line = get_previous_non_blank_line(clean_lines, line_number)[0]
if match(r'\s*}\s*$', previous_line):
- error(filename, line_number, 'whitespace/newline', 4,
+ error(line_number, 'whitespace/newline', 4,
'An else should appear on the same line as the preceding }')
# Likewise, an else should never have the else clause on the same line
if search(r'\belse [^\s{]', line) and not search(r'\belse if\b', line):
- error(filename, line_number, 'whitespace/newline', 4,
+ error(line_number, 'whitespace/newline', 4,
'Else clause should never be on same line as else (use 2 lines)')
# In the same way, a do/while should never be on one line
if match(r'\s*do [^\s{]', line):
- error(filename, line_number, 'whitespace/newline', 4,
+ error(line_number, 'whitespace/newline', 4,
'do/while clauses should not be on a single line')
# Braces shouldn't be followed by a ; unless they're defining a struct
@@ -1945,17 +1687,16 @@ def check_braces(filename, clean_lines, line_number, error):
if (search(r'{.*}\s*;', line)
and line.count('{') == line.count('}')
and not search(r'struct|class|enum|\s*=\s*{', line)):
- error(filename, line_number, 'readability/braces', 4,
+ error(line_number, 'readability/braces', 4,
"You don't need a ; after a }")
-def check_exit_statement_simplifications(filename, clean_lines, line_number, error):
+def check_exit_statement_simplifications(clean_lines, line_number, error):
"""Looks for else or else-if statements that should be written as an
if statement when the prior if concludes with a return, break, continue or
goto statement.
Args:
- filename: The name of the current file.
clean_lines: A CleansedLines instance containing the file.
line_number: The number of the line to check.
error: The function to call with any errors found.
@@ -2028,11 +1769,11 @@ def check_exit_statement_simplifications(filename, clean_lines, line_number, err
# Whatever the outcome, this is the end of our loop.
if match(r'if\s*\(', remaining_line):
if else_match.start('else') != -1:
- error(filename, line_number + line_offset, 'readability/control_flow', 4,
+ error(line_number + line_offset, 'readability/control_flow', 4,
'An else statement can be removed when the prior "if" '
'concludes with a return, break, continue or goto statement.')
else:
- error(filename, line_number + line_offset, 'readability/control_flow', 4,
+ error(line_number + line_offset, 'readability/control_flow', 4,
'An else if statement should be written as an if statement '
'when the prior "if" concludes with a return, break, '
'continue or goto statement.')
@@ -2074,11 +1815,10 @@ def replaceable_check(operator, macro, line):
return match(match_this, line) and not search(r'NULL|&&|\|\|', line)
-def check_check(filename, clean_lines, line_number, error):
+def check_check(clean_lines, line_number, error):
"""Checks the use of CHECK and EXPECT macros.
Args:
- filename: The name of the current file.
clean_lines: A CleansedLines instance containing the file.
line_number: The number of the line to check.
error: The function to call with any errors found.
@@ -2100,31 +1840,36 @@ def check_check(filename, clean_lines, line_number, error):
# Encourage replacing plain CHECKs with CHECK_EQ/CHECK_NE/etc.
for operator in ['==', '!=', '>=', '>', '<=', '<']:
if replaceable_check(operator, current_macro, line):
- error(filename, line_number, 'readability/check', 2,
+ error(line_number, 'readability/check', 2,
'Consider using %s instead of %s(a %s b)' % (
_CHECK_REPLACEMENT[current_macro][operator],
current_macro, operator))
break
-def check_for_comparisons_to_zero(filename, clean_lines, line_number, error):
+def check_for_comparisons_to_zero(clean_lines, line_number, error):
# Get the line without comments and strings.
line = clean_lines.elided[line_number]
# Include NULL here so that users don't have to convert NULL to 0 first and then get this error.
if search(r'[=!]=\s*(NULL|0|true|false)\W', line) or search(r'\W(NULL|0|true|false)\s*[=!]=', line):
- error(filename, line_number, 'readability/comparison_to_zero', 5,
+ error(line_number, 'readability/comparison_to_zero', 5,
'Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.')
-def check_for_null(filename, clean_lines, line_number, error):
+def check_for_null(file_extension, clean_lines, line_number, error):
# This check doesn't apply to C or Objective-C implementation files.
- if filename.endswith('.c') or filename.endswith('.m'):
+ if is_c_or_objective_c(file_extension):
return
line = clean_lines.elided[line_number]
+
+ # Don't warn about NULL usage in g_object_{get,set}(). See Bug 32858
+ if search(r'\bg_object_[sg]et\b', line):
+ return
+
if search(r'\bNULL\b', line):
- error(filename, line_number, 'readability/null', 5, 'Use 0 instead of NULL.')
+ error(line_number, 'readability/null', 5, 'Use 0 instead of NULL.')
return
line = clean_lines.raw_lines[line_number]
@@ -2132,7 +1877,7 @@ def check_for_null(filename, clean_lines, line_number, error):
# matches, then do the check with strings collapsed to avoid giving errors for
# NULLs occurring in strings.
if search(r'\bNULL\b', line) and search(r'\bNULL\b', CleansedLines.collapse_strings(line)):
- error(filename, line_number, 'readability/null', 4, 'Use 0 instead of NULL.')
+ error(line_number, 'readability/null', 4, 'Use 0 instead of NULL.')
def get_line_width(line):
"""Determines the width of the line in column positions.
@@ -2155,7 +1900,7 @@ def get_line_width(line):
return len(line)
-def check_style(filename, clean_lines, line_number, file_extension, file_state, error):
+def check_style(clean_lines, line_number, file_extension, file_state, error):
"""Checks rules from the 'C++ style rules' section of cppguide.html.
Most of these rules are hard to test (naming, comment style), but we
@@ -2163,7 +1908,6 @@ def check_style(filename, clean_lines, line_number, file_extension, file_state,
tab usage, spaces inside code, etc.
Args:
- filename: The name of the current file.
clean_lines: A CleansedLines instance containing the file.
line_number: The number of the line to check.
file_extension: The extension (without the dot) of the filename.
@@ -2176,7 +1920,7 @@ def check_style(filename, clean_lines, line_number, file_extension, file_state,
line = raw_lines[line_number]
if line.find('\t') != -1:
- error(filename, line_number, 'whitespace/tab', 1,
+ error(line_number, 'whitespace/tab', 1,
'Tab found; better to use spaces')
# One or three blank spaces at the beginning of the line is weird; it's
@@ -2196,12 +1940,12 @@ def check_style(filename, clean_lines, line_number, file_extension, file_state,
while initial_spaces < len(line) and line[initial_spaces] == ' ':
initial_spaces += 1
if line and line[-1].isspace():
- error(filename, line_number, 'whitespace/end_of_line', 4,
+ error(line_number, 'whitespace/end_of_line', 4,
'Line ends in whitespace. Consider deleting these extra spaces.')
# There are certain situations we allow one space, notably for labels
elif ((initial_spaces >= 1 and initial_spaces <= 3)
and not match(r'\s*\w+\s*:\s*$', cleansed_line)):
- error(filename, line_number, 'whitespace/indent', 3,
+ error(line_number, 'whitespace/indent', 3,
'Weird number of spaces at line-start. '
'Are you using a 4-space indent?')
# Labels should always be indented at least one space.
@@ -2213,7 +1957,7 @@ def check_style(filename, clean_lines, line_number, file_extension, file_state,
# Only throw errors for stuff that is definitely not a goto label,
# because goto labels can in fact occur at the start of the line.
if label in ['public', 'private', 'protected'] or label.find(' ') != -1:
- error(filename, line_number, 'whitespace/labels', 4,
+ error(line_number, 'whitespace/labels', 4,
'Labels should always be indented at least one space. '
'If this is a member-initializer list in a constructor, '
'the colon should be on the line after the definition header.')
@@ -2226,26 +1970,27 @@ def check_style(filename, clean_lines, line_number, file_extension, file_state,
# It's ok to have many commands in a switch case that fits in 1 line
and not ((cleansed_line.find('case ') != -1
or cleansed_line.find('default:') != -1)
- and cleansed_line.find('break;') != -1)):
- error(filename, line_number, 'whitespace/newline', 4,
+ and cleansed_line.find('break;') != -1)
+ and not cleansed_line.startswith('#define ')):
+ error(line_number, 'whitespace/newline', 4,
'More than one command on the same line')
if cleansed_line.strip().endswith('||') or cleansed_line.strip().endswith('&&'):
- error(filename, line_number, 'whitespace/operators', 4,
+ error(line_number, 'whitespace/operators', 4,
'Boolean expressions that span multiple lines should have their '
'operators on the left side of the line instead of the right side.')
# Some more style checks
- check_namespace_indentation(filename, clean_lines, line_number, file_extension, file_state, error)
- check_using_std(filename, clean_lines, line_number, error)
- check_max_min_macros(filename, clean_lines, line_number, error)
- check_switch_indentation(filename, clean_lines, line_number, error)
- check_braces(filename, clean_lines, line_number, error)
- check_exit_statement_simplifications(filename, clean_lines, line_number, error)
- check_spacing(filename, clean_lines, line_number, error)
- check_check(filename, clean_lines, line_number, error)
- check_for_comparisons_to_zero(filename, clean_lines, line_number, error)
- check_for_null(filename, clean_lines, line_number, error)
+ check_namespace_indentation(clean_lines, line_number, file_extension, file_state, error)
+ check_using_std(file_extension, clean_lines, line_number, error)
+ check_max_min_macros(file_extension, clean_lines, line_number, error)
+ check_switch_indentation(clean_lines, line_number, error)
+ check_braces(clean_lines, line_number, error)
+ check_exit_statement_simplifications(clean_lines, line_number, error)
+ check_spacing(file_extension, clean_lines, line_number, error)
+ check_check(clean_lines, line_number, error)
+ check_for_comparisons_to_zero(clean_lines, line_number, error)
+ check_for_null(file_extension, clean_lines, line_number, error)
_RE_PATTERN_INCLUDE_NEW_STYLE = re.compile(r'#include +"[^/]+\.h"')
@@ -2336,6 +2081,13 @@ def _classify_include(filename, include, is_system, include_state):
if filename.endswith('.h') and filename != include:
return _OTHER_HEADER;
+ # Qt's moc files do not follow the naming and ordering rules, so they should be skipped
+ if include.startswith('moc_') and include.endswith('.cpp'):
+ return _MOC_HEADER
+
+ if include.endswith('.moc'):
+ return _MOC_HEADER
+
# If the target file basename starts with the include we're checking
# then we consider it the primary header.
target_base = FileInfo(filename).base_name()
@@ -2348,13 +2100,18 @@ def _classify_include(filename, include, is_system, include_state):
# In case the two filename bases are the same then the above lenient check
# probably was a false positive.
elif include_state.visited_primary_section() and target_base == include_base:
+ if include == "ResourceHandleWin.h":
+ # FIXME: Thus far, we've only seen one example of these, but if we
+ # start to see more, please consider generalizing this check
+ # somehow.
+ return _OTHER_HEADER
return _PRIMARY_HEADER
return _OTHER_HEADER
-def check_include_line(filename, clean_lines, line_number, include_state, error):
+def check_include_line(filename, file_extension, clean_lines, line_number, include_state, error):
"""Check rules that are applicable to #include lines.
Strings on #include lines are NOT removed from elided line, to make
@@ -2363,12 +2120,20 @@ def check_include_line(filename, clean_lines, line_number, include_state, error)
Args:
filename: The name of the current file.
+ file_extension: The current file extension, without the leading dot.
clean_lines: A CleansedLines instance containing the file.
line_number: The number of the line to check.
include_state: An _IncludeState instance in which the headers are inserted.
error: The function to call with any errors found.
"""
+ if (filename.find('WebKitTools/WebKitAPITest/') >= 0
+ or filename.find('WebKit/qt/QGVLauncher/') >= 0):
+ # Files in this directory are consumers of the WebKit API and
+ # therefore do not follow the same header including discipline as
+ # WebCore.
+ return
+
line = clean_lines.lines[line_number]
matched = _RE_PATTERN_INCLUDE.search(line)
@@ -2382,17 +2147,17 @@ def check_include_line(filename, clean_lines, line_number, include_state, error)
if match(r'(f|ind|io|i|o|parse|pf|stdio|str|)?stream$', include):
# Many unit tests use cout, so we exempt them.
if not _is_test_filename(filename):
- error(filename, line_number, 'readability/streams', 3,
+ error(line_number, 'readability/streams', 3,
'Streams are highly discouraged.')
# Look for specific includes to fix.
if include.startswith('wtf/') and not is_system:
- error(filename, line_number, 'build/include', 4,
+ error(line_number, 'build/include', 4,
'wtf includes should be <wtf/file.h> instead of "wtf/file.h".')
duplicate_header = include in include_state
if duplicate_header:
- error(filename, line_number, 'build/include', 4,
+ error(line_number, 'build/include', 4,
'"%s" already included at %s:%s' %
(include, filename, include_state[include]))
else:
@@ -2410,17 +2175,17 @@ def check_include_line(filename, clean_lines, line_number, include_state, error)
# 2) for header files: alphabetically sorted
# The include_state object keeps track of the last type seen
# and complains if the header types are out of order or missing.
- error_message = include_state.check_next_include_order(header_type, filename.endswith('.h'))
+ error_message = include_state.check_next_include_order(header_type, file_extension == "h")
# Check to make sure we have a blank line after primary header.
if not error_message and header_type == _PRIMARY_HEADER:
next_line = clean_lines.raw_lines[line_number + 1]
if not is_blank_line(next_line):
- error(filename, line_number, 'build/include_order', 4,
+ error(line_number, 'build/include_order', 4,
'You should add a blank line after implementation file\'s own header.')
# Check to make sure all headers besides config.h and the primary header are
- # alphabetically sorted.
+ # alphabetically sorted. Skip Qt's moc files.
if not error_message and header_type == _OTHER_HEADER:
previous_line_number = line_number - 1;
previous_line = clean_lines.lines[previous_line_number]
@@ -2433,16 +2198,16 @@ def check_include_line(filename, clean_lines, line_number, include_state, error)
if previous_match:
previous_header_type = include_state.header_types[previous_line_number]
if previous_header_type == _OTHER_HEADER and previous_line.strip() > line.strip():
- error(filename, line_number, 'build/include_order', 4,
+ error(line_number, 'build/include_order', 4,
'Alphabetical sorting problem.')
if error_message:
- if filename.endswith('.h'):
- error(filename, line_number, 'build/include_order', 4,
+ if file_extension == 'h':
+ error(line_number, 'build/include_order', 4,
'%s Should be: alphabetically sorted.' %
error_message)
else:
- error(filename, line_number, 'build/include_order', 4,
+ error(line_number, 'build/include_order', 4,
'%s Should be: config.h, primary header, blank line, and then alphabetically sorted.' %
error_message)
@@ -2470,7 +2235,7 @@ def check_language(filename, clean_lines, line_number, file_extension, include_s
matched = _RE_PATTERN_INCLUDE.search(line)
if matched:
- check_include_line(filename, clean_lines, line_number, include_state, error)
+ check_include_line(filename, file_extension, clean_lines, line_number, include_state, error)
return
# FIXME: figure out if they're using default arguments in fn proto.
@@ -2486,17 +2251,17 @@ def check_language(filename, clean_lines, line_number, file_extension, include_s
# where type may be float(), int(string), etc. Without context they are
# virtually indistinguishable from int(x) casts.
if not match(r'^\s*MOCK_(CONST_)?METHOD\d+(_T)?\(', line):
- error(filename, line_number, 'readability/casting', 4,
+ error(line_number, 'readability/casting', 4,
'Using deprecated casting style. '
'Use static_cast<%s>(...) instead' %
matched.group(1))
- check_c_style_cast(filename, line_number, line, clean_lines.raw_lines[line_number],
+ check_c_style_cast(line_number, line, clean_lines.raw_lines[line_number],
'static_cast',
r'\((int|float|double|bool|char|u?int(16|32|64))\)',
error)
# This doesn't catch all cases. Consider (const char * const)"hello".
- check_c_style_cast(filename, line_number, line, clean_lines.raw_lines[line_number],
+ check_c_style_cast(line_number, line, clean_lines.raw_lines[line_number],
'reinterpret_cast', r'\((\w+\s?\*+\s?)\)', error)
# In addition, we look for people taking the address of a cast. This
@@ -2504,7 +2269,7 @@ def check_language(filename, clean_lines, line_number, file_extension, include_s
# point where you think.
if search(
r'(&\([^)]+\)[\w(])|(&(static|dynamic|reinterpret)_cast\b)', line):
- error(filename, line_number, 'runtime/casting', 4,
+ error(line_number, 'runtime/casting', 4,
('Are you taking an address of a cast? '
'This is dangerous: could be a temp var. '
'Take the address before doing the cast, rather than after'))
@@ -2520,20 +2285,20 @@ def check_language(filename, clean_lines, line_number, file_extension, include_s
# Class template definitions look like: "string Foo<Type>::Method(...".
if matched and not match(r'\s*(<.*>)?(::[a-zA-Z0-9_]+)?\s*\(([^"]|$)',
matched.group(3)):
- error(filename, line_number, 'runtime/string', 4,
+ error(line_number, 'runtime/string', 4,
'For a static/global string constant, use a C style string instead: '
'"%schar %s[]".' %
(matched.group(1), matched.group(2)))
# Check that we're not using RTTI outside of testing code.
if search(r'\bdynamic_cast<', line) and not _is_test_filename(filename):
- error(filename, line_number, 'runtime/rtti', 5,
+ error(line_number, 'runtime/rtti', 5,
'Do not use dynamic_cast<>. If you need to cast within a class '
"hierarchy, use static_cast<> to upcast. Google doesn't support "
'RTTI.')
if search(r'\b([A-Za-z0-9_]*_)\(\1\)', line):
- error(filename, line_number, 'runtime/init', 4,
+ error(line_number, 'runtime/init', 4,
'You seem to be initializing a member variable with itself.')
if file_extension == 'h':
@@ -2546,33 +2311,33 @@ def check_language(filename, clean_lines, line_number, file_extension, include_s
# we regularly allow is "unsigned short port" for port.
if search(r'\bshort port\b', line):
if not search(r'\bunsigned short port\b', line):
- error(filename, line_number, 'runtime/int', 4,
+ error(line_number, 'runtime/int', 4,
'Use "unsigned short" for ports, not "short"')
# When snprintf is used, the second argument shouldn't be a literal.
matched = search(r'snprintf\s*\(([^,]*),\s*([0-9]*)\s*,', line)
if matched:
- error(filename, line_number, 'runtime/printf', 3,
+ error(line_number, 'runtime/printf', 3,
'If you can, use sizeof(%s) instead of %s as the 2nd arg '
'to snprintf.' % (matched.group(1), matched.group(2)))
# Check if some verboten C functions are being used.
if search(r'\bsprintf\b', line):
- error(filename, line_number, 'runtime/printf', 5,
+ error(line_number, 'runtime/printf', 5,
'Never use sprintf. Use snprintf instead.')
matched = search(r'\b(strcpy|strcat)\b', line)
if matched:
- error(filename, line_number, 'runtime/printf', 4,
+ error(line_number, 'runtime/printf', 4,
'Almost always, snprintf is better than %s' % matched.group(1))
if search(r'\bsscanf\b', line):
- error(filename, line_number, 'runtime/printf', 1,
+ error(line_number, 'runtime/printf', 1,
'sscanf can be ok, but is slow and can overflow buffers.')
# Check for suspicious usage of "if" like
# } if (a == b) {
if search(r'\}\s*if\s*\(', line):
- error(filename, line_number, 'readability/braces', 4,
+ error(line_number, 'readability/braces', 4,
'Did you mean "else if"? If not, start a new line for "if".')
# Check for potential format string bugs like printf(foo).
@@ -2580,14 +2345,14 @@ def check_language(filename, clean_lines, line_number, file_extension, include_s
# Not perfect but it can catch printf(foo.c_str()) and printf(foo->c_str())
matched = re.search(r'\b((?:string)?printf)\s*\(([\w.\->()]+)\)', line, re.I)
if matched:
- error(filename, line_number, 'runtime/printf', 4,
+ error(line_number, 'runtime/printf', 4,
'Potential format string bug. Do %s("%%s", %s) instead.'
% (matched.group(1), matched.group(2)))
# Check for potential memset bugs like memset(buf, sizeof(buf), 0).
matched = search(r'memset\s*\(([^,]*),\s*([^,]*),\s*0\s*\)', line)
if matched and not match(r"^''|-?[0-9]+|0x[0-9A-Fa-f]$", matched.group(2)):
- error(filename, line_number, 'runtime/memset', 4,
+ error(line_number, 'runtime/memset', 4,
'Did you mean "memset(%s, 0, %s)"?'
% (matched.group(1), matched.group(2)))
@@ -2634,7 +2399,7 @@ def check_language(filename, clean_lines, line_number, file_extension, include_s
is_const = False
break
if not is_const:
- error(filename, line_number, 'runtime/arrays', 1,
+ error(line_number, 'runtime/arrays', 1,
'Do not use variable-length arrays. Use an appropriately named '
"('k' followed by CamelCase) compile-time constant for the size.")
@@ -2644,7 +2409,7 @@ def check_language(filename, clean_lines, line_number, file_extension, include_s
if (file_extension == 'h'
and search(r'\bnamespace\s*{', line)
and line[-1] != '\\'):
- error(filename, line_number, 'build/namespaces', 4,
+ error(line_number, 'build/namespaces', 4,
'Do not use unnamed namespaces in header files. See '
'http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Namespaces'
' for more information.')
@@ -2666,7 +2431,7 @@ def check_identifier_name_in_declaration(filename, line_number, line, error):
error: The function to call with any errors found.
"""
# We don't check a return statement.
- if match(r'\s*return\b', line):
+ if match(r'\s*(return|delete)\b', line):
return
# Basically, a declaration is a type name followed by whitespaces
@@ -2737,8 +2502,13 @@ def check_identifier_name_in_declaration(filename, line_number, line, error):
if modified_identifier.find('_') >= 0:
# Various exceptions to the rule: JavaScript op codes functions, const_iterator.
if (not (filename.find('JavaScriptCore') >= 0 and modified_identifier.find('_op_') >= 0)
+ and not filename.find('WebKit/gtk/webkit/') >= 0
+ and not modified_identifier.startswith('tst_')
+ and not modified_identifier.startswith('webkit_dom_object_')
+ and not modified_identifier.startswith('qt_')
+ and not modified_identifier.find('::qt_') >= 0
and not modified_identifier == "const_iterator"):
- error(filename, line_number, 'readability/naming', 4, identifier + " is incorrectly named. Don't use underscores in your identifier names.")
+ error(line_number, 'readability/naming', 4, identifier + " is incorrectly named. Don't use underscores in your identifier names.")
# There can be only one declaration in non-for-control statements.
if control_statement:
@@ -2753,14 +2523,13 @@ def check_identifier_name_in_declaration(filename, line_number, line, error):
line = line[matched.end():]
-def check_c_style_cast(filename, line_number, line, raw_line, cast_type, pattern,
+def check_c_style_cast(line_number, line, raw_line, cast_type, pattern,
error):
"""Checks for a C-style cast by looking for the pattern.
This also handles sizeof(type) warnings, due to similarity of content.
Args:
- filename: The name of the current file.
line_number: The number of the line to check.
line: The line of code to check.
raw_line: The raw line of code to check, with comments.
@@ -2776,7 +2545,7 @@ def check_c_style_cast(filename, line_number, line, raw_line, cast_type, pattern
# e.g., sizeof(int)
sizeof_match = match(r'.*sizeof\s*$', line[0:matched.start(1) - 1])
if sizeof_match:
- error(filename, line_number, 'runtime/sizeof', 1,
+ error(line_number, 'runtime/sizeof', 1,
'Using sizeof(type). Use sizeof(varname) instead if possible')
return
@@ -2798,12 +2567,12 @@ def check_c_style_cast(filename, line_number, line, raw_line, cast_type, pattern
if (not function_match.group(3)
or function_match.group(3) == ';'
or raw_line.find('/*') < 0):
- error(filename, line_number, 'readability/function', 3,
+ error(line_number, 'readability/function', 3,
'All parameters should be named in a function')
return
# At this point, all that should be left is actual casts.
- error(filename, line_number, 'readability/casting', 4,
+ error(line_number, 'readability/casting', 4,
'Using C-style cast. Use %s<%s>(...) instead' %
(cast_type, matched.group(1)))
@@ -3043,7 +2812,7 @@ def check_for_include_what_you_use(filename, clean_lines, include_state, error,
if [True for header in headers if header in include_state]:
continue
if required_header_unstripped.strip('<>"') not in include_state:
- error(filename, required[required_header_unstripped][0],
+ error(required[required_header_unstripped][0],
'build/include_what_you_use', 4,
'Add #include ' + required_header_unstripped + ' for ' + template)
@@ -3065,25 +2834,24 @@ def process_line(filename, file_extension,
the current stack of nested class declarations being parsed.
file_state: A _FileState instance which maintains information about
the state of things in the file.
- error: A callable to which errors are reported, which takes 4 arguments:
- filename, line number, error level, and message
+ error: A callable to which errors are reported, which takes arguments:
+ line number, error level, and message
"""
raw_lines = clean_lines.raw_lines
- check_for_function_lengths(filename, clean_lines, line, function_state, error)
+ check_for_function_lengths(clean_lines, line, function_state, error)
if search(r'\bNOLINT\b', raw_lines[line]): # ignore nolint lines
return
- check_for_multiline_comments_and_strings(filename, clean_lines, line, error)
- check_style(filename, clean_lines, line, file_extension, file_state, error)
+ check_for_multiline_comments_and_strings(clean_lines, line, error)
+ check_style(clean_lines, line, file_extension, file_state, error)
check_language(filename, clean_lines, line, file_extension, include_state,
error)
- check_for_non_standard_constructs(filename, clean_lines, line,
- class_state, error)
- check_posix_threading(filename, clean_lines, line, error)
- check_invalid_increment(filename, clean_lines, line, error)
+ check_for_non_standard_constructs(clean_lines, line, class_state, error)
+ check_posix_threading(clean_lines, line, error)
+ check_invalid_increment(clean_lines, line, error)
-def process_file_data(filename, file_extension, lines, error):
+def _process_lines(filename, file_extension, lines, error, verbosity):
"""Performs lint checks and reports any errors to the given error function.
Args:
@@ -3097,221 +2865,143 @@ def process_file_data(filename, file_extension, lines, error):
['// marker so line numbers end in a known way'])
include_state = _IncludeState()
- function_state = _FunctionState()
+ function_state = _FunctionState(verbosity)
class_state = _ClassState()
file_state = _FileState()
- check_for_copyright(filename, lines, error)
+ check_for_copyright(lines, error)
if file_extension == 'h':
check_for_header_guard(filename, lines, error)
- remove_multi_line_comments(filename, lines, error)
+ remove_multi_line_comments(lines, error)
clean_lines = CleansedLines(lines)
for line in xrange(clean_lines.num_lines()):
process_line(filename, file_extension, clean_lines, line,
include_state, function_state, class_state, file_state, error)
- class_state.check_finished(filename, error)
+ class_state.check_finished(error)
check_for_include_what_you_use(filename, clean_lines, include_state, error)
# We check here rather than inside process_line so that we see raw
# lines rather than "cleaned" lines.
- check_for_unicode_replacement_characters(filename, lines, error)
+ check_for_unicode_replacement_characters(lines, error)
- check_for_new_line_at_eof(filename, lines, error)
+ check_for_new_line_at_eof(lines, error)
-def process_file(filename, error=error):
- """Performs cpp_style on a single file.
+class CppProcessor(object):
- Args:
- filename: The name of the file to parse.
- error: The function to call with any errors found.
- """
- try:
- # Support the UNIX convention of using "-" for stdin. Note that
- # we are not opening the file with universal newline support
- # (which codecs doesn't support anyway), so the resulting lines do
- # contain trailing '\r' characters if we are reading a file that
- # has CRLF endings.
- # If after the split a trailing '\r' is present, it is removed
- # below. If it is not expected to be present (i.e. os.linesep !=
- # '\r\n' as in Windows), a warning is issued below if this file
- # is processed.
-
- if filename == '-':
- lines = codecs.StreamReaderWriter(sys.stdin,
- codecs.getreader('utf8'),
- codecs.getwriter('utf8'),
- 'replace').read().split('\n')
- else:
- lines = codecs.open(filename, 'r', 'utf8', 'replace').read().split('\n')
-
- carriage_return_found = False
- # Remove trailing '\r'.
- for line_number in range(len(lines)):
- if lines[line_number].endswith('\r'):
- lines[line_number] = lines[line_number].rstrip('\r')
- carriage_return_found = True
+ """Processes C++ lines for checking style."""
- except IOError:
- sys.stderr.write(
- "Skipping input '%s': Can't open for reading\n" % filename)
- return
-
- # Note, if no dot is found, this will give the entire filename as the ext.
- file_extension = filename[filename.rfind('.') + 1:]
-
- # When reading from stdin, the extension is unknown, so no cpp_style tests
- # should rely on the extension.
- if (filename != '-' and file_extension != 'h' and file_extension != 'cpp'
- and file_extension != 'c'):
- sys.stderr.write('Ignoring %s; not a .cpp, .c or .h file\n' % filename)
- else:
- process_file_data(filename, file_extension, lines, error)
- if carriage_return_found and os.linesep != '\r\n':
- # Use 0 for line_number since outputing only one error for potentially
- # several lines.
- error(filename, 0, 'whitespace/newline', 1,
- 'One or more unexpected \\r (^M) found;'
- 'better to use only a \\n')
-
-
-def print_usage(message):
- """Prints a brief usage string and exits, optionally with an error message.
-
- Args:
- message: The optional error message.
- """
- sys.stderr.write(_USAGE)
- if message:
- sys.exit('\nFATAL ERROR: ' + message)
- else:
- sys.exit(1)
-
-
-def print_categories():
- """Prints a list of all the error-categories used by error messages.
-
- These are the categories used to filter messages via --filter.
- """
- sys.stderr.write(_ERROR_CATEGORIES)
- sys.exit(0)
-
-
-def parse_arguments(args, additional_flags=[]):
- """Parses the command line arguments.
-
- This may set the output format and verbosity level as side-effects.
-
- Args:
- args: The command line arguments:
- additional_flags: A list of strings which specifies flags we allow.
-
- Returns:
- A tuple of (filenames, flags)
-
- filenames: The list of filenames to lint.
- flags: The dict of the flag names and the flag values.
- """
- flags = ['help', 'output=', 'verbose=', 'filter='] + additional_flags
- additional_flag_values = {}
- try:
- (opts, filenames) = getopt.getopt(args, '', flags)
- except getopt.GetoptError:
- print_usage('Invalid arguments.')
-
- verbosity = _verbose_level()
- output_format = _output_format()
- filters = ''
-
- for (opt, val) in opts:
- if opt == '--help':
- print_usage(None)
- elif opt == '--output':
- if not val in ('emacs', 'vs7'):
- print_usage('The only allowed output formats are emacs and vs7.')
- output_format = val
- elif opt == '--verbose':
- verbosity = int(val)
- elif opt == '--filter':
- filters = val
- if not filters:
- print_categories()
- else:
- additional_flag_values[opt] = val
-
- _set_output_format(output_format)
- _set_verbose_level(verbosity)
- _set_filters(filters)
-
- return (filenames, additional_flag_values)
-
-
-def use_webkit_styles():
- """Disables some features which are not suitable for WebKit."""
- # FIXME: For filters we will never want to have, remove them.
- # For filters we want to have similar functionalities,
- # modify the implementation and enable them.
- global _DEFAULT_FILTERS
- _DEFAULT_FILTERS = [
- '-whitespace/end_of_line',
- '-whitespace/comments',
- '-whitespace/blank_line',
- '-runtime/explicit', # explicit
- '-runtime/virtual', # virtual dtor
- '-runtime/printf',
- '-runtime/threadsafe_fn',
- '-runtime/rtti',
- '-build/include_what_you_use', # <string> for std::string
- '-legal/copyright',
- '-readability/multiline_comment',
- '-readability/braces', # int foo() {};
- '-readability/fn_size',
- '-build/storage_class', # const static
- '-build/endif_comment',
- '-whitespace/labels',
- '-runtime/arrays', # variable length array
- '-build/header_guard',
- '-readability/casting',
- '-readability/function',
- '-runtime/casting',
- '-runtime/sizeof',
- ]
-
-
-def main():
- sys.stderr.write(
- '''********************* WARNING WARNING WARNING *********************
-
-This tool is in the process of development and may give inaccurate
-results at present. Please file bugs (and/or patches) for things
-that you notice that it flags incorrectly.
+ # This list is used to--
+ #
+ # (1) generate an explicit list of all possible categories,
+ # (2) unit test that all checked categories have valid names, and
+ # (3) unit test that all categories are getting unit tested.
+ #
+ categories = set([
+ 'build/class',
+ 'build/deprecated',
+ 'build/endif_comment',
+ 'build/forward_decl',
+ 'build/header_guard',
+ 'build/include',
+ 'build/include_order',
+ 'build/include_what_you_use',
+ 'build/namespaces',
+ 'build/printf_format',
+ 'build/storage_class',
+ 'build/using_std',
+ 'legal/copyright',
+ 'readability/braces',
+ 'readability/casting',
+ 'readability/check',
+ 'readability/comparison_to_zero',
+ 'readability/constructors',
+ 'readability/control_flow',
+ 'readability/fn_size',
+ 'readability/function',
+ 'readability/multiline_comment',
+ 'readability/multiline_string',
+ 'readability/naming',
+ 'readability/null',
+ 'readability/streams',
+ 'readability/todo',
+ 'readability/utf8',
+ 'runtime/arrays',
+ 'runtime/casting',
+ 'runtime/explicit',
+ 'runtime/init',
+ 'runtime/int',
+ 'runtime/invalid_increment',
+ 'runtime/max_min_macros',
+ 'runtime/memset',
+ 'runtime/printf',
+ 'runtime/printf_format',
+ 'runtime/references',
+ 'runtime/rtti',
+ 'runtime/sizeof',
+ 'runtime/string',
+ 'runtime/threadsafe_fn',
+ 'runtime/virtual',
+ 'whitespace/blank_line',
+ 'whitespace/braces',
+ 'whitespace/comma',
+ 'whitespace/comments',
+ 'whitespace/declaration',
+ 'whitespace/end_of_line',
+ 'whitespace/ending_newline',
+ 'whitespace/indent',
+ 'whitespace/labels',
+ 'whitespace/line_length',
+ 'whitespace/newline',
+ 'whitespace/operators',
+ 'whitespace/parens',
+ 'whitespace/semicolon',
+ 'whitespace/tab',
+ 'whitespace/todo',
+ ])
+
+ def __init__(self, file_path, file_extension, handle_style_error, verbosity):
+ """Create a CppProcessor instance.
-********************* WARNING WARNING WARNING *********************
+ Args:
+ file_extension: A string that is the file extension, without
+ the leading dot.
-''')
+ """
+ self.file_extension = file_extension
+ self.file_path = file_path
+ self.handle_style_error = handle_style_error
+ self.verbosity = verbosity
+
+ # Useful for unit testing.
+ def __eq__(self, other):
+ """Return whether this CppProcessor instance is equal to another."""
+ if self.file_extension != other.file_extension:
+ return False
+ if self.file_path != other.file_path:
+ return False
+ if self.handle_style_error != other.handle_style_error:
+ return False
+ if self.verbosity != other.verbosity:
+ return False
- use_webkit_styles()
+ return True
- (filenames, flags) = parse_arguments(sys.argv[1:])
- if not filenames:
- print_usage('No files were specified.')
+ # Useful for unit testing.
+ def __ne__(self, other):
+ # Python does not automatically deduce __ne__() from __eq__().
+ return not self.__eq__(other)
- # Change stderr to write with replacement characters so we don't die
- # if we try to print something containing non-ASCII characters.
- sys.stderr = codecs.StreamReaderWriter(sys.stderr,
- codecs.getreader('utf8'),
- codecs.getwriter('utf8'),
- 'replace')
+ def process(self, lines):
+ _process_lines(self.file_path, self.file_extension, lines,
+ self.handle_style_error, self.verbosity)
- _cpp_style_state.reset_error_count()
- for filename in filenames:
- process_file(filename)
- sys.stderr.write('Total errors found: %d\n' % _cpp_style_state.error_count)
- sys.exit(_cpp_style_state.error_count > 0)
+# FIXME: Remove this function (requires refactoring unit tests).
+def process_file_data(filename, file_extension, lines, error, verbosity):
+ processor = CppProcessor(filename, file_extension, error, verbosity)
+ processor.process(lines)
-if __name__ == '__main__':
- main()
diff --git a/WebKitTools/Scripts/modules/cpp_style_unittest.py b/WebKitTools/Scripts/webkitpy/style/processors/cpp_unittest.py
index 75dd47e..e556cd3 100644
--- a/WebKitTools/Scripts/modules/cpp_style_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/style/processors/cpp_unittest.py
@@ -4,6 +4,7 @@
# Copyright (C) 2009 Google Inc. All rights reserved.
# Copyright (C) 2009 Torch Mobile Inc.
# Copyright (C) 2009 Apple Inc. All rights reserved.
+# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -40,31 +41,28 @@ import os
import random
import re
import unittest
-import cpp_style
-
+import cpp as cpp_style
+from cpp import CppProcessor
# This class works as an error collector and replaces cpp_style.Error
# function for the unit tests. We also verify each category we see
-# is in cpp_style._ERROR_CATEGORIES, to help keep that list up to date.
+# is in STYLE_CATEGORIES, to help keep that list up to date.
class ErrorCollector:
- # These are a global list, covering all categories seen ever.
- _ERROR_CATEGORIES = [x.strip() # get rid of leading whitespace
- for x in cpp_style._ERROR_CATEGORIES.split()]
- _SEEN_ERROR_CATEGORIES = {}
+ _all_style_categories = CppProcessor.categories
+ # This is a list including all categories seen in any unit test.
+ _seen_style_categories = {}
def __init__(self, assert_fn):
"""assert_fn: a function to call when we notice a problem."""
self._assert_fn = assert_fn
self._errors = []
- def __call__(self, unused_filename, unused_linenum,
- category, confidence, message):
- self._assert_fn(category in self._ERROR_CATEGORIES,
+ def __call__(self, unused_linenum, category, confidence, message):
+ self._assert_fn(category in self._all_style_categories,
'Message "%s" has category "%s",'
- ' which is not in _ERROR_CATEGORIES' % (message, category))
- self._SEEN_ERROR_CATEGORIES[category] = 1
- if cpp_style._should_print_error(category, confidence):
- self._errors.append('%s [%s] [%d]' % (message, category, confidence))
+ ' which is not in STYLE_CATEGORIES' % (message, category))
+ self._seen_style_categories[category] = 1
+ self._errors.append('%s [%s] [%d]' % (message, category, confidence))
def results(self):
if len(self._errors) < 2:
@@ -76,16 +74,16 @@ class ErrorCollector:
return self._errors
def verify_all_categories_are_seen(self):
- """Fails if there's a category in _ERROR_CATEGORIES - _SEEN_ERROR_CATEGORIES.
+ """Fails if there's a category in _all_style_categories - _seen_style_categories.
This should only be called after all tests are run, so
- _SEEN_ERROR_CATEGORIES has had a chance to fully populate. Since
+ _seen_style_categories has had a chance to fully populate. Since
this isn't called from within the normal unittest framework, we
can't use the normal unittest assert macros. Instead we just exit
when we see an error. Good thing this test is always run last!
"""
- for category in self._ERROR_CATEGORIES:
- if category not in self._SEEN_ERROR_CATEGORIES:
+ for category in self._all_style_categories:
+ if category not in self._seen_style_categories:
import sys
sys.exit('FATAL ERROR: There are no tests for category "%s"' % category)
@@ -107,17 +105,43 @@ class MockIo:
return self.mock_file
+class CppFunctionsTest(unittest.TestCase):
+
+ """Supports testing functions that do not need CppStyleTestBase."""
+
+ def test_is_c_or_objective_c(self):
+ self.assertTrue(cpp_style.is_c_or_objective_c("c"))
+ self.assertTrue(cpp_style.is_c_or_objective_c("m"))
+ self.assertFalse(cpp_style.is_c_or_objective_c("cpp"))
+
+
class CppStyleTestBase(unittest.TestCase):
- """Provides some useful helper functions for cpp_style tests."""
+ """Provides some useful helper functions for cpp_style tests.
+
+ Attributes:
+ verbosity: An integer that is the current verbosity level for
+ the tests.
+
+ """
+
+ # FIXME: Refactor the unit tests so the verbosity level is passed
+ # explicitly, just like it is in the real code.
+ verbosity = 1;
+
+ # Helper function to avoid needing to explicitly pass verbosity
+ # in all the unit test calls to cpp_style.process_file_data().
+ def process_file_data(self, filename, file_extension, lines, error):
+ """Call cpp_style.process_file_data() with the current verbosity."""
+ return cpp_style.process_file_data(filename, file_extension, lines, error, self.verbosity)
# Perform lint on single line of input and return the error message.
def perform_single_line_lint(self, code, file_name):
error_collector = ErrorCollector(self.assert_)
lines = code.split('\n')
- cpp_style.remove_multi_line_comments(file_name, lines, error_collector)
+ cpp_style.remove_multi_line_comments(lines, error_collector)
clean_lines = cpp_style.CleansedLines(lines)
include_state = cpp_style._IncludeState()
- function_state = cpp_style._FunctionState()
+ function_state = cpp_style._FunctionState(self.verbosity)
ext = file_name[file_name.rfind('.') + 1:]
class_state = cpp_style._ClassState()
file_state = cpp_style._FileState()
@@ -131,19 +155,18 @@ class CppStyleTestBase(unittest.TestCase):
return error_collector.results()
# Perform lint over multiple lines and return the error message.
- def perform_multi_line_lint(self, code, file_name):
+ def perform_multi_line_lint(self, code, file_extension):
error_collector = ErrorCollector(self.assert_)
lines = code.split('\n')
- cpp_style.remove_multi_line_comments(file_name, lines, error_collector)
+ cpp_style.remove_multi_line_comments(lines, error_collector)
lines = cpp_style.CleansedLines(lines)
- ext = file_name[file_name.rfind('.') + 1:]
class_state = cpp_style._ClassState()
file_state = cpp_style._FileState()
for i in xrange(lines.num_lines()):
- cpp_style.check_style(file_name, lines, i, ext, file_state, error_collector)
- cpp_style.check_for_non_standard_constructs(file_name, lines, i, class_state,
+ cpp_style.check_style(lines, i, file_extension, file_state, error_collector)
+ cpp_style.check_for_non_standard_constructs(lines, i, class_state,
error_collector)
- class_state.check_finished(file_name, error_collector)
+ class_state.check_finished(error_collector)
return error_collector.results()
# Similar to perform_multi_line_lint, but calls check_language instead of
@@ -152,7 +175,7 @@ class CppStyleTestBase(unittest.TestCase):
error_collector = ErrorCollector(self.assert_)
include_state = cpp_style._IncludeState()
lines = code.split('\n')
- cpp_style.remove_multi_line_comments(file_name, lines, error_collector)
+ cpp_style.remove_multi_line_comments(lines, error_collector)
lines = cpp_style.CleansedLines(lines)
ext = file_name[file_name.rfind('.') + 1:]
for i in xrange(lines.num_lines()):
@@ -175,14 +198,13 @@ class CppStyleTestBase(unittest.TestCase):
Returns:
The accumulated errors.
"""
- file_name = 'foo.cpp'
error_collector = ErrorCollector(self.assert_)
- function_state = cpp_style._FunctionState()
+ function_state = cpp_style._FunctionState(self.verbosity)
lines = code.split('\n')
- cpp_style.remove_multi_line_comments(file_name, lines, error_collector)
+ cpp_style.remove_multi_line_comments(lines, error_collector)
lines = cpp_style.CleansedLines(lines)
for i in xrange(lines.num_lines()):
- cpp_style.check_for_function_lengths(file_name, lines, i,
+ cpp_style.check_for_function_lengths(lines, i,
function_state, error_collector)
return error_collector.results()
@@ -191,10 +213,11 @@ class CppStyleTestBase(unittest.TestCase):
error_collector = ErrorCollector(self.assert_)
include_state = cpp_style._IncludeState()
lines = code.split('\n')
- cpp_style.remove_multi_line_comments(filename, lines, error_collector)
+ cpp_style.remove_multi_line_comments(lines, error_collector)
lines = cpp_style.CleansedLines(lines)
+ file_extension = filename[filename.rfind('.') + 1:]
for i in xrange(lines.num_lines()):
- cpp_style.check_language(filename, lines, i, '.h', include_state,
+ cpp_style.check_language(filename, lines, i, file_extension, include_state,
error_collector)
# We could clear the error_collector here, but this should
# also be fine, since our IncludeWhatYouUse unittests do not
@@ -218,10 +241,12 @@ class CppStyleTestBase(unittest.TestCase):
self.assertEquals(expected_message, messages)
def assert_multi_line_lint(self, code, expected_message, file_name='foo.h'):
- self.assertEquals(expected_message, self.perform_multi_line_lint(code, file_name))
+ file_extension = file_name[file_name.rfind('.') + 1:]
+ self.assertEquals(expected_message, self.perform_multi_line_lint(code, file_extension))
def assert_multi_line_lint_re(self, code, expected_message_re, file_name='foo.h'):
- message = self.perform_multi_line_lint(code, file_name)
+ file_extension = file_name[file_name.rfind('.') + 1:]
+ message = self.perform_multi_line_lint(code, file_extension)
if not re.search(expected_message_re, message):
self.fail('Message was:\n' + message + 'Expected match to "' + expected_message_re + '"')
@@ -235,7 +260,7 @@ class CppStyleTestBase(unittest.TestCase):
def assert_blank_lines_check(self, lines, start_errors, end_errors):
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data('foo.cpp', 'cpp', lines, error_collector)
+ self.process_file_data('foo.cpp', 'cpp', lines, error_collector)
self.assertEquals(
start_errors,
error_collector.results().count(
@@ -400,13 +425,13 @@ class CppStyleTest(CppStyleTestBase):
' [readability/casting] [4]')
# Checks for false positives...
self.assert_lint(
- 'int a = int(); // Constructor, o.k.',
+ 'int a = int(); // Constructor, o.k.',
'')
self.assert_lint(
- 'X::X() : a(int()) {} // default Constructor, o.k.',
+ 'X::X() : a(int()) {} // default Constructor, o.k.',
'')
self.assert_lint(
- 'operator bool(); // Conversion operator, o.k.',
+ 'operator bool(); // Conversion operator, o.k.',
'')
# The second parameter to a gMock method definition is a function signature
@@ -693,10 +718,10 @@ class CppStyleTest(CppStyleTestBase):
file_path = 'mydir/foo.cpp'
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(file_path, 'cpp',
- ['const char* str = "This is a\\',
- ' multiline string.";'],
- error_collector)
+ self.process_file_data(file_path, 'cpp',
+ ['const char* str = "This is a\\',
+ ' multiline string.";'],
+ error_collector)
self.assertEquals(
2, # One per line.
error_collector.result_list().count(multiline_string_error_message))
@@ -721,7 +746,7 @@ class CppStyleTest(CppStyleTestBase):
# missing explicit, with distracting comment, is still bad
self.assert_multi_line_lint(
'''class Foo {
- Foo(int f); // simpler than Foo(blargh, blarg)
+ Foo(int f); // simpler than Foo(blargh, blarg)
};''',
'Single-argument constructors should be marked explicit.'
' [runtime/explicit] [5]')
@@ -1089,7 +1114,7 @@ class CppStyleTest(CppStyleTestBase):
' [readability/check] [2]')
self.assert_lint(
- ' EXPECT_TRUE(42 < x) // Random comment.',
+ ' EXPECT_TRUE(42 < x) // Random comment.',
'Consider using EXPECT_LT instead of EXPECT_TRUE(a < b)'
' [readability/check] [2]')
self.assert_lint(
@@ -1148,10 +1173,16 @@ class CppStyleTest(CppStyleTestBase):
' [whitespace/parens] [5]')
self.assert_lint('for (foo; ba; bar ) {', 'Mismatching spaces inside () in for'
' [whitespace/parens] [5]')
+ self.assert_lint('for ((foo); (ba); (bar) ) {', 'Mismatching spaces inside () in for'
+ ' [whitespace/parens] [5]')
self.assert_lint('for (; foo; bar) {', '')
+ self.assert_lint('for (; (foo); (bar)) {', '')
self.assert_lint('for ( ; foo; bar) {', '')
+ self.assert_lint('for ( ; (foo); (bar)) {', '')
self.assert_lint('for ( ; foo; bar ) {', '')
+ self.assert_lint('for ( ; (foo); (bar) ) {', '')
self.assert_lint('for (foo; bar; ) {', '')
+ self.assert_lint('for ((foo); (bar); ) {', '')
self.assert_lint('foreach (foo, foos ) {', 'Mismatching spaces inside () in foreach'
' [whitespace/parens] [5]')
self.assert_lint('foreach ( foo, foos) {', 'Mismatching spaces inside () in foreach'
@@ -1249,30 +1280,31 @@ class CppStyleTest(CppStyleTestBase):
' [whitespace/operators] [3]')
self.assert_lint('a<Foo*> t <<= *b/c;', 'Missing spaces around /'
' [whitespace/operators] [3]')
- self.assert_lint('a<Foo*> t <<= b/c; //Test', ['At least two spaces'
- ' is best between code and comments [whitespace/'
- 'comments] [2]', 'Should have a space between // '
- 'and comment [whitespace/comments] [4]', 'Missing'
+ self.assert_lint('a<Foo*> t <<= b/c; //Test', [
+ 'Should have a space between // and comment '
+ '[whitespace/comments] [4]', 'Missing'
' spaces around / [whitespace/operators] [3]'])
- self.assert_lint('a<Foo*> t <<= b||c; //Test', ['Should have a space'
- ' between // and comment [whitespace/comments] [4]',
+ self.assert_lint('a<Foo*> t <<= b||c; //Test', ['One space before end'
+ ' of line comments [whitespace/comments] [5]',
+ 'Should have a space between // and comment '
+ '[whitespace/comments] [4]',
'Missing spaces around || [whitespace/operators] [3]'])
- self.assert_lint('a<Foo*> t <<= b&&c; // Test', 'Missing spaces around'
+ self.assert_lint('a<Foo*> t <<= b&&c; // Test', 'Missing spaces around'
' && [whitespace/operators] [3]')
- self.assert_lint('a<Foo*> t <<= b&&&c; // Test', 'Missing spaces around'
+ self.assert_lint('a<Foo*> t <<= b&&&c; // Test', 'Missing spaces around'
' && [whitespace/operators] [3]')
- self.assert_lint('a<Foo*> t <<= b&&*c; // Test', 'Missing spaces around'
+ self.assert_lint('a<Foo*> t <<= b&&*c; // Test', 'Missing spaces around'
' && [whitespace/operators] [3]')
- self.assert_lint('a<Foo*> t <<= b && *c; // Test', '')
- self.assert_lint('a<Foo*> t <<= b && &c; // Test', '')
+ self.assert_lint('a<Foo*> t <<= b && *c; // Test', '')
+ self.assert_lint('a<Foo*> t <<= b && &c; // Test', '')
self.assert_lint('a<Foo*> t <<= b || &c; /*Test', 'Complex multi-line '
'/*...*/-style comment found. Lint may give bogus '
'warnings. Consider replacing these with //-style'
' comments, with #if 0...#endif, or with more clearly'
' structured multi-line comments. [readability/multiline_comment] [5]')
self.assert_lint('a<Foo&> t <<= &b | &c;', '')
- self.assert_lint('a<Foo*> t <<= &b & &c; // Test', '')
- self.assert_lint('a<Foo*> t <<= *b / &c; // Test', '')
+ self.assert_lint('a<Foo*> t <<= &b & &c; // Test', '')
+ self.assert_lint('a<Foo*> t <<= *b / &c; // Test', '')
self.assert_lint('if (a=b == 1)', 'Missing spaces around = [whitespace/operators] [4]')
self.assert_lint('a = 1<<20', 'Missing spaces around << [whitespace/operators] [3]')
self.assert_lint('if (a = b == 1)', '')
@@ -1306,7 +1338,7 @@ class CppStyleTest(CppStyleTestBase):
'For a static/global string constant, use a C style '
'string instead: "char foo[]".'
' [runtime/string] [4]')
- self.assert_lint('string kFoo = "hello"; // English',
+ self.assert_lint('string kFoo = "hello"; // English',
'For a static/global string constant, use a C style '
'string instead: "char kFoo[]".'
' [runtime/string] [4]')
@@ -1365,25 +1397,27 @@ class CppStyleTest(CppStyleTestBase):
def test_two_spaces_between_code_and_comments(self):
self.assert_lint('} // namespace foo',
- 'At least two spaces is best between code and comments'
- ' [whitespace/comments] [2]')
+ '')
self.assert_lint('}// namespace foo',
- 'At least two spaces is best between code and comments'
- ' [whitespace/comments] [2]')
+ 'One space before end of line comments'
+ ' [whitespace/comments] [5]')
self.assert_lint('printf("foo"); // Outside quotes.',
- 'At least two spaces is best between code and comments'
- ' [whitespace/comments] [2]')
- self.assert_lint('int i = 0; // Having two spaces is fine.', '')
- self.assert_lint('int i = 0; // Having three spaces is OK.', '')
+ '')
+ self.assert_lint('int i = 0; // Having one space is fine.','')
+ self.assert_lint('int i = 0; // Having two spaces is bad.',
+ 'One space before end of line comments'
+ ' [whitespace/comments] [5]')
+ self.assert_lint('int i = 0; // Having three spaces is bad.',
+ 'One space before end of line comments'
+ ' [whitespace/comments] [5]')
self.assert_lint('// Top level comment', '')
self.assert_lint(' // Line starts with four spaces.', '')
self.assert_lint('foo();\n'
'{ // A scope is opening.', '')
self.assert_lint(' foo();\n'
' { // An indented scope is opening.', '')
- self.assert_lint('if (foo) { // not a pure scope; comment is too close!',
- 'At least two spaces is best between code and comments'
- ' [whitespace/comments] [2]')
+ self.assert_lint('if (foo) { // not a pure scope',
+ '')
self.assert_lint('printf("// In quotes.")', '')
self.assert_lint('printf("\\"%s // In quotes.")', '')
self.assert_lint('printf("%s", "// In quotes.")', '')
@@ -1404,8 +1438,8 @@ class CppStyleTest(CppStyleTestBase):
def test_newline_at_eof(self):
def do_test(self, data, is_missing_eof):
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data('foo.cpp', 'cpp', data.split('\n'),
- error_collector)
+ self.process_file_data('foo.cpp', 'cpp', data.split('\n'),
+ error_collector)
# The warning appears only once.
self.assertEquals(
int(is_missing_eof),
@@ -1419,10 +1453,9 @@ class CppStyleTest(CppStyleTestBase):
def test_invalid_utf8(self):
def do_test(self, raw_bytes, has_invalid_utf8):
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(
- 'foo.cpp', 'cpp',
- unicode(raw_bytes, 'utf8', 'replace').split('\n'),
- error_collector)
+ self.process_file_data('foo.cpp', 'cpp',
+ unicode(raw_bytes, 'utf8', 'replace').split('\n'),
+ error_collector)
# The warning appears only once.
self.assertEquals(
int(has_invalid_utf8),
@@ -1455,40 +1488,40 @@ class CppStyleTest(CppStyleTestBase):
def test_allow_blank_line_before_closing_namespace(self):
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data('foo.cpp', 'cpp',
- ['namespace {', '', '} // namespace'],
- error_collector)
+ self.process_file_data('foo.cpp', 'cpp',
+ ['namespace {', '', '} // namespace'],
+ error_collector)
self.assertEquals(0, error_collector.results().count(
'Blank line at the end of a code block. Is this needed?'
' [whitespace/blank_line] [3]'))
def test_allow_blank_line_before_if_else_chain(self):
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data('foo.cpp', 'cpp',
- ['if (hoge) {',
- '', # No warning
- '} else if (piyo) {',
- '', # No warning
- '} else if (piyopiyo) {',
- ' hoge = true;', # No warning
- '} else {',
- '', # Warning on this line
- '}'],
- error_collector)
+ self.process_file_data('foo.cpp', 'cpp',
+ ['if (hoge) {',
+ '', # No warning
+ '} else if (piyo) {',
+ '', # No warning
+ '} else if (piyopiyo) {',
+ ' hoge = true;', # No warning
+ '} else {',
+ '', # Warning on this line
+ '}'],
+ error_collector)
self.assertEquals(1, error_collector.results().count(
'Blank line at the end of a code block. Is this needed?'
' [whitespace/blank_line] [3]'))
def test_else_on_same_line_as_closing_braces(self):
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data('foo.cpp', 'cpp',
- ['if (hoge) {',
- '',
- '}',
- ' else {' # Warning on this line
- '',
- '}'],
- error_collector)
+ self.process_file_data('foo.cpp', 'cpp',
+ ['if (hoge) {',
+ '',
+ '}',
+ ' else {' # Warning on this line
+ '',
+ '}'],
+ error_collector)
self.assertEquals(1, error_collector.results().count(
'An else should appear on the same line as the preceding }'
' [whitespace/newline] [4]'))
@@ -1562,112 +1595,9 @@ class CppStyleTest(CppStyleTestBase):
def test_tab(self):
self.assert_lint('\tint a;',
'Tab found; better to use spaces [whitespace/tab] [1]')
- self.assert_lint('int a = 5;\t\t// set a to 5',
+ self.assert_lint('int a = 5;\t// set a to 5',
'Tab found; better to use spaces [whitespace/tab] [1]')
- def test_parse_arguments(self):
- old_usage = cpp_style._USAGE
- old_error_categories = cpp_style._ERROR_CATEGORIES
- old_output_format = cpp_style._cpp_style_state.output_format
- old_verbose_level = cpp_style._cpp_style_state.verbose_level
- old_filters = cpp_style._cpp_style_state.filters
- try:
- # Don't print usage during the tests, or filter categories
- cpp_style._USAGE = ''
- cpp_style._ERROR_CATEGORIES = ''
-
- self.assertRaises(SystemExit, cpp_style.parse_arguments, ['--badopt'])
- self.assertRaises(SystemExit, cpp_style.parse_arguments, ['--help'])
- self.assertRaises(SystemExit, cpp_style.parse_arguments, ['--filter='])
- # This is illegal because all filters must start with + or -
- self.assertRaises(ValueError, cpp_style.parse_arguments, ['--filter=foo'])
- self.assertRaises(ValueError, cpp_style.parse_arguments,
- ['--filter=+a,b,-c'])
-
- self.assertEquals((['foo.cpp'], {}), cpp_style.parse_arguments(['foo.cpp']))
- self.assertEquals(old_output_format, cpp_style._cpp_style_state.output_format)
- self.assertEquals(old_verbose_level, cpp_style._cpp_style_state.verbose_level)
-
- self.assertEquals(([], {}), cpp_style.parse_arguments([]))
- self.assertEquals(([], {}), cpp_style.parse_arguments(['--v=0']))
-
- self.assertEquals((['foo.cpp'], {}),
- cpp_style.parse_arguments(['--v=1', 'foo.cpp']))
- self.assertEquals(1, cpp_style._cpp_style_state.verbose_level)
- self.assertEquals((['foo.h'], {}),
- cpp_style.parse_arguments(['--v=3', 'foo.h']))
- self.assertEquals(3, cpp_style._cpp_style_state.verbose_level)
- self.assertEquals((['foo.cpp'], {}),
- cpp_style.parse_arguments(['--verbose=5', 'foo.cpp']))
- self.assertEquals(5, cpp_style._cpp_style_state.verbose_level)
- self.assertRaises(ValueError,
- cpp_style.parse_arguments, ['--v=f', 'foo.cpp'])
-
- self.assertEquals((['foo.cpp'], {}),
- cpp_style.parse_arguments(['--output=emacs', 'foo.cpp']))
- self.assertEquals('emacs', cpp_style._cpp_style_state.output_format)
- self.assertEquals((['foo.h'], {}),
- cpp_style.parse_arguments(['--output=vs7', 'foo.h']))
- self.assertEquals('vs7', cpp_style._cpp_style_state.output_format)
- self.assertRaises(SystemExit,
- cpp_style.parse_arguments, ['--output=blah', 'foo.cpp'])
-
- filt = '-,+whitespace,-whitespace/indent'
- self.assertEquals((['foo.h'], {}),
- cpp_style.parse_arguments(['--filter='+filt, 'foo.h']))
- self.assertEquals(['-', '+whitespace', '-whitespace/indent'],
- cpp_style._cpp_style_state.filters)
-
- self.assertEquals((['foo.cpp', 'foo.h'], {}),
- cpp_style.parse_arguments(['foo.cpp', 'foo.h']))
-
- self.assertEquals((['foo.cpp'], {'--foo': ''}),
- cpp_style.parse_arguments(['--foo', 'foo.cpp'], ['foo']))
- self.assertEquals((['foo.cpp'], {'--foo': 'bar'}),
- cpp_style.parse_arguments(['--foo=bar', 'foo.cpp'], ['foo=']))
- self.assertEquals((['foo.cpp'], {}),
- cpp_style.parse_arguments(['foo.cpp'], ['foo=']))
- self.assertRaises(SystemExit,
- cpp_style.parse_arguments,
- ['--footypo=bar', 'foo.cpp'], ['foo='])
- finally:
- cpp_style._USAGE = old_usage
- cpp_style._ERROR_CATEGORIES = old_error_categories
- cpp_style._cpp_style_state.output_format = old_output_format
- cpp_style._cpp_style_state.verbose_level = old_verbose_level
- cpp_style._cpp_style_state.filters = old_filters
-
- def test_filter(self):
- old_filters = cpp_style._cpp_style_state.filters
- try:
- cpp_style._cpp_style_state.set_filters('-,+whitespace,-whitespace/indent')
- self.assert_lint(
- '// Hello there ',
- 'Line ends in whitespace. Consider deleting these extra spaces.'
- ' [whitespace/end_of_line] [4]')
- self.assert_lint('int a = (int)1.0;', '')
- self.assert_lint(' weird opening space', '')
- finally:
- cpp_style._cpp_style_state.filters = old_filters
-
- def test_default_filter(self):
- default_filters = cpp_style._DEFAULT_FILTERS
- old_filters = cpp_style._cpp_style_state.filters
- cpp_style._DEFAULT_FILTERS = [ '-whitespace' ]
- try:
- # Reset filters
- cpp_style._cpp_style_state.set_filters('')
- self.assert_lint('// Hello there ', '')
- cpp_style._cpp_style_state.set_filters('+whitespace/end_of_line')
- self.assert_lint(
- '// Hello there ',
- 'Line ends in whitespace. Consider deleting these extra spaces.'
- ' [whitespace/end_of_line] [4]')
- self.assert_lint(' weird opening space', '')
- finally:
- cpp_style._cpp_style_state.filters = old_filters
- cpp_style._DEFAULT_FILTERS = default_filters
-
def test_unnamed_namespaces_in_headers(self):
self.assert_language_rules_check(
'foo.h', 'namespace {',
@@ -1728,17 +1658,17 @@ class CppStyleTest(CppStyleTestBase):
' [build/forward_decl] [5]')
def test_build_header_guard(self):
- file_path = 'mydir/foo.h'
+ file_path = 'mydir/Foo.h'
# We can't rely on our internal stuff to get a sane path on the open source
# side of things, so just parse out the suggested header guard. This
# doesn't allow us to test the suggested header guard, but it does let us
# test all the other header tests.
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(file_path, 'h', [], error_collector)
+ self.process_file_data(file_path, 'h', [], error_collector)
expected_guard = ''
matcher = re.compile(
- 'No \#ifndef header guard found\, suggested CPP variable is\: ([A-Z_0-9]+) ')
+ 'No \#ifndef header guard found\, suggested CPP variable is\: ([A-Za-z_0-9]+) ')
for error in error_collector.result_list():
matches = matcher.match(error)
if matches:
@@ -1750,8 +1680,8 @@ class CppStyleTest(CppStyleTestBase):
# Wrong guard
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(file_path, 'h',
- ['#ifndef FOO_H', '#define FOO_H'], error_collector)
+ self.process_file_data(file_path, 'h',
+ ['#ifndef FOO_H', '#define FOO_H'], error_collector)
self.assertEquals(
1,
error_collector.result_list().count(
@@ -1761,8 +1691,8 @@ class CppStyleTest(CppStyleTestBase):
# No define
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(file_path, 'h',
- ['#ifndef %s' % expected_guard], error_collector)
+ self.process_file_data(file_path, 'h',
+ ['#ifndef %s' % expected_guard], error_collector)
self.assertEquals(
1,
error_collector.result_list().count(
@@ -1772,10 +1702,10 @@ class CppStyleTest(CppStyleTestBase):
# Mismatched define
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(file_path, 'h',
- ['#ifndef %s' % expected_guard,
- '#define FOO_H'],
- error_collector)
+ self.process_file_data(file_path, 'h',
+ ['#ifndef %s' % expected_guard,
+ '#define FOO_H'],
+ error_collector)
self.assertEquals(
1,
error_collector.result_list().count(
@@ -1783,107 +1713,30 @@ class CppStyleTest(CppStyleTestBase):
' [build/header_guard] [5]' % expected_guard),
error_collector.result_list())
- # No endif
- error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(file_path, 'h',
- ['#ifndef %s' % expected_guard,
- '#define %s' % expected_guard],
- error_collector)
- self.assertEquals(
- 1,
- error_collector.result_list().count(
- '#endif line should be "#endif // %s"'
- ' [build/header_guard] [5]' % expected_guard),
- error_collector.result_list())
-
- # Commentless endif
- error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(file_path, 'h',
- ['#ifndef %s' % expected_guard,
- '#define %s' % expected_guard,
- '#endif'],
- error_collector)
- self.assertEquals(
- 1,
- error_collector.result_list().count(
- '#endif line should be "#endif // %s"'
- ' [build/header_guard] [5]' % expected_guard),
- error_collector.result_list())
-
- # Commentless endif for old-style guard
- error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(file_path, 'h',
- ['#ifndef %s_' % expected_guard,
- '#define %s_' % expected_guard,
- '#endif'],
- error_collector)
- self.assertEquals(
- 1,
- error_collector.result_list().count(
- '#endif line should be "#endif // %s"'
- ' [build/header_guard] [5]' % expected_guard),
- error_collector.result_list())
-
# No header guard errors
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(file_path, 'h',
- ['#ifndef %s' % expected_guard,
- '#define %s' % expected_guard,
- '#endif // %s' % expected_guard],
- error_collector)
+ self.process_file_data(file_path, 'h',
+ ['#ifndef %s' % expected_guard,
+ '#define %s' % expected_guard,
+ '#endif // %s' % expected_guard],
+ error_collector)
for line in error_collector.result_list():
if line.find('build/header_guard') != -1:
self.fail('Unexpected error: %s' % line)
- # No header guard errors for old-style guard
- error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(file_path, 'h',
- ['#ifndef %s_' % expected_guard,
- '#define %s_' % expected_guard,
- '#endif // %s_' % expected_guard],
- error_collector)
- for line in error_collector.result_list():
- if line.find('build/header_guard') != -1:
- self.fail('Unexpected error: %s' % line)
-
- old_verbose_level = cpp_style._cpp_style_state.verbose_level
- try:
- cpp_style._cpp_style_state.verbose_level = 0
- # Warn on old-style guard if verbosity is 0.
- error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(file_path, 'h',
- ['#ifndef %s_' % expected_guard,
- '#define %s_' % expected_guard,
- '#endif // %s_' % expected_guard],
- error_collector)
- self.assertEquals(
- 1,
- error_collector.result_list().count(
- '#ifndef header guard has wrong style, please use: %s'
- ' [build/header_guard] [0]' % expected_guard),
- error_collector.result_list())
- finally:
- cpp_style._cpp_style_state.verbose_level = old_verbose_level
-
# Completely incorrect header guard
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(file_path, 'h',
- ['#ifndef FOO',
- '#define FOO',
- '#endif // FOO'],
- error_collector)
+ self.process_file_data(file_path, 'h',
+ ['#ifndef FOO',
+ '#define FOO',
+ '#endif // FOO'],
+ error_collector)
self.assertEquals(
1,
error_collector.result_list().count(
'#ifndef header guard has wrong style, please use: %s'
' [build/header_guard] [5]' % expected_guard),
error_collector.result_list())
- self.assertEquals(
- 1,
- error_collector.result_list().count(
- '#endif line should be "#endif // %s"'
- ' [build/header_guard] [5]' % expected_guard),
- error_collector.result_list())
def test_build_printf_format(self):
self.assert_lint(
@@ -2019,13 +1872,13 @@ class CppStyleTest(CppStyleTestBase):
# There should be a copyright message in the first 10 lines
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(file_path, 'cpp', [], error_collector)
+ self.process_file_data(file_path, 'cpp', [], error_collector)
self.assertEquals(
1,
error_collector.result_list().count(legal_copyright_message))
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(
+ self.process_file_data(
file_path, 'cpp',
['' for unused_i in range(10)] + [copyright_line],
error_collector)
@@ -2035,13 +1888,13 @@ class CppStyleTest(CppStyleTestBase):
# Test that warning isn't issued if Copyright line appears early enough.
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(file_path, 'cpp', [copyright_line], error_collector)
+ self.process_file_data(file_path, 'cpp', [copyright_line], error_collector)
for message in error_collector.result_list():
if message.find('legal/copyright') != -1:
self.fail('Unexpected error: %s' % message)
error_collector = ErrorCollector(self.assert_)
- cpp_style.process_file_data(
+ self.process_file_data(
file_path, 'cpp',
['' for unused_i in range(9)] + [copyright_line],
error_collector)
@@ -2203,6 +2056,16 @@ class OrderOfIncludesTest(CppStyleTestBase):
'#include <assert.h>\n',
'')
+ def test_webkit_api_test_excluded(self):
+ self.assert_language_rules_check('WebKitTools/WebKitAPITest/Test.h',
+ '#include "foo.h"\n',
+ '')
+
+ def test_webkit_api_test_excluded(self):
+ self.assert_language_rules_check('WebKit/qt/QGVLauncher/main.cpp',
+ '#include "foo.h"\n',
+ '')
+
def test_check_line_break_after_own_header(self):
self.assert_language_rules_check('foo.cpp',
'#include "config.h"\n'
@@ -2320,6 +2183,14 @@ class OrderOfIncludesTest(CppStyleTestBase):
classify_include('PrefixFooCustom.cpp',
'Foo.h',
False, include_state))
+ self.assertEqual(cpp_style._MOC_HEADER,
+ classify_include('foo.cpp',
+ 'foo.moc',
+ False, include_state))
+ self.assertEqual(cpp_style._MOC_HEADER,
+ classify_include('foo.cpp',
+ 'moc_foo.cpp',
+ False, include_state))
# Tricky example where both includes might be classified as primary.
self.assert_language_rules_check('ScrollbarThemeWince.cpp',
'#include "config.h"\n'
@@ -2335,6 +2206,12 @@ class OrderOfIncludesTest(CppStyleTestBase):
'Found header this file implements after a header this file implements.'
' Should be: config.h, primary header, blank line, and then alphabetically sorted.'
' [build/include_order] [4]')
+ self.assert_language_rules_check('ResourceHandleWin.cpp',
+ '#include "config.h"\n'
+ '#include "ResourceHandle.h"\n'
+ '\n'
+ '#include "ResourceHandleWin.h"\n',
+ '')
def test_try_drop_common_suffixes(self):
self.assertEqual('foo/foo', cpp_style._drop_common_suffixes('foo/foo-inl.h'))
@@ -2363,6 +2240,13 @@ class CheckForFunctionLengthsTest(CppStyleTestBase):
cpp_style._FunctionState._NORMAL_TRIGGER = self.old_normal_trigger
cpp_style._FunctionState._TEST_TRIGGER = self.old_test_trigger
+ # FIXME: Eliminate the need for this function.
+ def set_verbosity(self, verbosity):
+ """Set new test verbosity and return old test verbosity."""
+ old_verbosity = self.verbosity
+ self.verbosity = verbosity
+ return old_verbosity
+
def assert_function_lengths_check(self, code, expected_message):
"""Check warnings for long function bodies are as expected.
@@ -2402,7 +2286,7 @@ class CheckForFunctionLengthsTest(CppStyleTestBase):
lines: Number of lines to generate.
error_level: --v setting for cpp_style.
"""
- trigger_level = self.trigger_lines(cpp_style._verbose_level())
+ trigger_level = self.trigger_lines(self.verbosity)
self.assert_function_lengths_check(
'void test(int x)' + self.function_body(lines),
('Small and focused functions are preferred: '
@@ -2485,29 +2369,29 @@ class CheckForFunctionLengthsTest(CppStyleTestBase):
'')
def test_function_length_check_definition_below_severity0(self):
- old_verbosity = cpp_style._set_verbose_level(0)
+ old_verbosity = self.set_verbosity(0)
self.assert_function_length_check_definition_ok(self.trigger_lines(0) - 1)
- cpp_style._set_verbose_level(old_verbosity)
+ self.set_verbosity(old_verbosity)
def test_function_length_check_definition_at_severity0(self):
- old_verbosity = cpp_style._set_verbose_level(0)
+ old_verbosity = self.set_verbosity(0)
self.assert_function_length_check_definition_ok(self.trigger_lines(0))
- cpp_style._set_verbose_level(old_verbosity)
+ self.set_verbosity(old_verbosity)
def test_function_length_check_definition_above_severity0(self):
- old_verbosity = cpp_style._set_verbose_level(0)
+ old_verbosity = self.set_verbosity(0)
self.assert_function_length_check_above_error_level(0)
- cpp_style._set_verbose_level(old_verbosity)
+ self.set_verbosity(old_verbosity)
def test_function_length_check_definition_below_severity1v0(self):
- old_verbosity = cpp_style._set_verbose_level(0)
+ old_verbosity = self.set_verbosity(0)
self.assert_function_length_check_below_error_level(1)
- cpp_style._set_verbose_level(old_verbosity)
+ self.set_verbosity(old_verbosity)
def test_function_length_check_definition_at_severity1v0(self):
- old_verbosity = cpp_style._set_verbose_level(0)
+ old_verbosity = self.set_verbosity(0)
self.assert_function_length_check_at_error_level(1)
- cpp_style._set_verbose_level(old_verbosity)
+ self.set_verbosity(old_verbosity)
def test_function_length_check_definition_below_severity1(self):
self.assert_function_length_check_definition_ok(self.trigger_lines(1) - 1)
@@ -2521,7 +2405,7 @@ class CheckForFunctionLengthsTest(CppStyleTestBase):
def test_function_length_check_definition_severity1_plus_blanks(self):
error_level = 1
error_lines = self.trigger_lines(error_level) + 1
- trigger_level = self.trigger_lines(cpp_style._verbose_level())
+ trigger_level = self.trigger_lines(self.verbosity)
self.assert_function_lengths_check(
'void test_blanks(int x)' + self.function_body(error_lines),
('Small and focused functions are preferred: '
@@ -2533,7 +2417,7 @@ class CheckForFunctionLengthsTest(CppStyleTestBase):
def test_function_length_check_complex_definition_severity1(self):
error_level = 1
error_lines = self.trigger_lines(error_level) + 1
- trigger_level = self.trigger_lines(cpp_style._verbose_level())
+ trigger_level = self.trigger_lines(self.verbosity)
self.assert_function_lengths_check(
('my_namespace::my_other_namespace::MyVeryLongTypeName*\n'
'my_namespace::my_other_namespace::MyFunction(int arg1, char* arg2)'
@@ -2548,7 +2432,7 @@ class CheckForFunctionLengthsTest(CppStyleTestBase):
def test_function_length_check_definition_severity1_for_test(self):
error_level = 1
error_lines = self.trigger_test_lines(error_level) + 1
- trigger_level = self.trigger_test_lines(cpp_style._verbose_level())
+ trigger_level = self.trigger_test_lines(self.verbosity)
self.assert_function_lengths_check(
'TEST_F(Test, Mutator)' + self.function_body(error_lines),
('Small and focused functions are preferred: '
@@ -2560,7 +2444,7 @@ class CheckForFunctionLengthsTest(CppStyleTestBase):
def test_function_length_check_definition_severity1_for_split_line_test(self):
error_level = 1
error_lines = self.trigger_test_lines(error_level) + 1
- trigger_level = self.trigger_test_lines(cpp_style._verbose_level())
+ trigger_level = self.trigger_test_lines(self.verbosity)
self.assert_function_lengths_check(
('TEST_F(GoogleUpdateRecoveryRegistryProtectedTest,\n'
' FixGoogleUpdate_AllValues_MachineApp)' # note: 4 spaces
@@ -2575,7 +2459,7 @@ class CheckForFunctionLengthsTest(CppStyleTestBase):
def test_function_length_check_definition_severity1_for_bad_test_doesnt_break(self):
error_level = 1
error_lines = self.trigger_test_lines(error_level) + 1
- trigger_level = self.trigger_test_lines(cpp_style._verbose_level())
+ trigger_level = self.trigger_test_lines(self.verbosity)
self.assert_function_lengths_check(
('TEST_F('
+ self.function_body(error_lines)),
@@ -2588,7 +2472,7 @@ class CheckForFunctionLengthsTest(CppStyleTestBase):
def test_function_length_check_definition_severity1_with_embedded_no_lints(self):
error_level = 1
error_lines = self.trigger_lines(error_level) + 1
- trigger_level = self.trigger_lines(cpp_style._verbose_level())
+ trigger_level = self.trigger_lines(self.verbosity)
self.assert_function_lengths_check(
'void test(int x)' + self.function_body_with_no_lints(error_lines),
('Small and focused functions are preferred: '
@@ -2787,16 +2671,6 @@ class NoNonVirtualDestructorsTest(CppStyleTestBase):
'virtual method(s), one declared at line 2. [runtime/virtual] [4]'])
-class CppStyleStateTest(unittest.TestCase):
- def test_error_count(self):
- self.assertEquals(0, cpp_style.error_count())
- cpp_style._cpp_style_state.increment_error_count()
- cpp_style._cpp_style_state.increment_error_count()
- self.assertEquals(2, cpp_style.error_count())
- cpp_style._cpp_style_state.reset_error_count()
- self.assertEquals(0, cpp_style.error_count())
-
-
class WebKitStyleTest(CppStyleTestBase):
# for http://webkit.org/coding/coding-style.html
@@ -2910,7 +2784,7 @@ class WebKitStyleTest(CppStyleTestBase):
'foo.cpp')
self.assert_multi_line_lint(
'namespace WebCore {\n\n'
- 'const char* foo(void* a = ";", // ;\n'
+ 'const char* foo(void* a = ";", // ;\n'
' void* b);\n'
' void* p;\n'
'}\n',
@@ -2919,7 +2793,7 @@ class WebKitStyleTest(CppStyleTestBase):
self.assert_multi_line_lint(
'namespace WebCore {\n\n'
'const char* foo[] = {\n'
- ' "void* b);", // ;\n'
+ ' "void* b);", // ;\n'
' "asfdf",\n'
' }\n'
' void* p;\n'
@@ -2929,7 +2803,7 @@ class WebKitStyleTest(CppStyleTestBase):
self.assert_multi_line_lint(
'namespace WebCore {\n\n'
'const char* foo[] = {\n'
- ' "void* b);", // }\n'
+ ' "void* b);", // }\n'
' "asfdf",\n'
' }\n'
'}\n',
@@ -2939,7 +2813,7 @@ class WebKitStyleTest(CppStyleTestBase):
' namespace WebCore {\n\n'
' void Document::Foo()\n'
' {\n'
- 'start: // infinite loops are fun!\n'
+ 'start: // infinite loops are fun!\n'
' goto start;\n'
' }',
'namespace should never be indented. [whitespace/indent] [4]',
@@ -3136,12 +3010,15 @@ class WebKitStyleTest(CppStyleTestBase):
' doIt();\n',
'')
self.assert_multi_line_lint(
+ ' if (condition) \\\n'
+ ' doIt();\n',
+ '')
+ self.assert_multi_line_lint(
' x++; y++;',
'More than one command on the same line [whitespace/newline] [4]')
- # FIXME: Make this fail.
- # self.assert_multi_line_lint(
- # ' if (condition) doIt();\n',
- # '')
+ self.assert_multi_line_lint(
+ ' if (condition) doIt();\n',
+ 'More than one command on the same line in if [whitespace/parens] [4]')
# 2. An else statement should go on the same line as a preceding
# close brace if one is present, else it should line up with the
@@ -3169,7 +3046,16 @@ class WebKitStyleTest(CppStyleTestBase):
' doSomethingElseAgain();\n'
'}\n',
'')
-
+ self.assert_multi_line_lint(
+ '#define TEST_ASSERT(expression) do { if (!(expression)) { TestsController::shared().testFailed(__FILE__, __LINE__, #expression); return; } } while (0)\n',
+ '')
+ self.assert_multi_line_lint(
+ '#define TEST_ASSERT(expression) do { if ( !(expression)) { TestsController::shared().testFailed(__FILE__, __LINE__, #expression); return; } } while (0)\n',
+ 'Mismatching spaces inside () in if [whitespace/parens] [5]')
+ # FIXME: currently we only check first conditional, so we cannot detect errors in next ones.
+ # self.assert_multi_line_lint(
+ # '#define TEST_ASSERT(expression) do { if (!(expression)) { TestsController::shared().testFailed(__FILE__, __LINE__, #expression); return; } } while (0 )\n',
+ # 'Mismatching spaces inside () in if [whitespace/parens] [5]')
self.assert_multi_line_lint(
'if (condition) {\n'
' doSomething();\n'
@@ -3183,13 +3069,14 @@ class WebKitStyleTest(CppStyleTestBase):
self.assert_multi_line_lint(
'if (condition) doSomething(); else doSomethingElse();\n',
['More than one command on the same line [whitespace/newline] [4]',
- 'Else clause should never be on same line as else (use 2 lines) [whitespace/newline] [4]'])
- # FIXME: Make this fail.
- # self.assert_multi_line_lint(
- # 'if (condition) doSomething(); else {\n'
- # ' doSomethingElse();\n'
- # '}\n',
- # '')
+ 'Else clause should never be on same line as else (use 2 lines) [whitespace/newline] [4]',
+ 'More than one command on the same line in if [whitespace/parens] [4]'])
+ self.assert_multi_line_lint(
+ 'if (condition) doSomething(); else {\n'
+ ' doSomethingElse();\n'
+ '}\n',
+ ['More than one command on the same line in if [whitespace/parens] [4]',
+ 'One line control clauses should not use braces. [whitespace/braces] [4]'])
# 3. An else if statement should be written as an if statement
# when the prior if concludes with a return statement.
@@ -3493,7 +3380,7 @@ class WebKitStyleTest(CppStyleTestBase):
' [readability/null] [4]',
'foo.cpp')
self.assert_lint(
- '"A string with NULL" // and a comment with NULL is tricky to flag correctly in cpp_style.',
+ '"A string with NULL" // and a comment with NULL is tricky to flag correctly in cpp_style.',
'Use 0 instead of NULL.'
' [readability/null] [4]',
'foo.cpp')
@@ -3519,6 +3406,14 @@ class WebKitStyleTest(CppStyleTestBase):
'',
'foo.m')
+ # Make sure that the NULL check does not apply to g_object_{set,get}
+ self.assert_lint(
+ 'g_object_get(foo, "prop", &bar, NULL);',
+ '')
+ self.assert_lint(
+ 'g_object_set(foo, "prop", bar, NULL);',
+ '')
+
# 2. C++ and C bool values should be written as true and
# false. Objective-C BOOL values should be written as YES and NO.
# FIXME: Implement this.
@@ -3683,6 +3578,7 @@ class WebKitStyleTest(CppStyleTestBase):
'under_score' + name_error_message)
self.assert_lint('goto under_score;',
'under_score' + name_error_message)
+ self.assert_lint('delete static_cast<Foo*>(p);', '')
# Multiple variables in one line.
self.assert_lint('void myFunction(int variable1, int another_variable);',
@@ -3703,15 +3599,86 @@ class WebKitStyleTest(CppStyleTestBase):
self.assert_lint('void this_op_code(int var1, int var2)', '', 'JavaScriptCore/foo.cpp')
self.assert_lint('void this_op_code(int var1, int var2)', 'this_op_code' + name_error_message)
+ # GObject requires certain magical names in class declarations.
+ self.assert_lint('void webkit_dom_object_init();', '')
+ self.assert_lint('void webkit_dom_object_class_init();', '')
+
+ # The GTK+ APIs use GTK+ naming style, which includes lower-cased, _-separated values.
+ self.assert_lint('void this_is_a_gtk_style_name(int var1, int var2)', '', 'WebKit/gtk/webkit/foo.cpp')
+
+ # There is an exception for some unit tests that begin with "tst_".
+ self.assert_lint('void tst_QWebFrame::arrayObjectEnumerable(int var1, int var2)', '')
+
+ # The Qt API uses names that begin with "qt_".
+ self.assert_lint('void QTFrame::qt_drt_is_awesome(int var1, int var2)', '')
+ self.assert_lint('void qt_drt_is_awesome(int var1, int var2);', '')
+
# const_iterator is allowed as well.
self.assert_lint('typedef VectorType::const_iterator const_iterator;', '')
+ def test_comments(self):
+ # A comment at the beginning of a line is ok.
+ self.assert_lint('// comment', '')
+ self.assert_lint(' // comment', '')
+
+ self.assert_lint('} // namespace WebCore',
+ 'One space before end of line comments'
+ ' [whitespace/comments] [5]')
+
def test_other(self):
# FIXME: Implement this.
pass
+class CppProcessorTest(unittest.TestCase):
+
+ """Tests CppProcessor class."""
+
+ def mock_handle_style_error(self):
+ pass
+
+ def _processor(self):
+ return CppProcessor("foo", "h", self.mock_handle_style_error, 3)
+
+ def test_init(self):
+ """Test __init__ constructor."""
+ processor = self._processor()
+ self.assertEquals(processor.file_extension, "h")
+ self.assertEquals(processor.file_path, "foo")
+ self.assertEquals(processor.handle_style_error, self.mock_handle_style_error)
+ self.assertEquals(processor.verbosity, 3)
+
+ def test_eq(self):
+ """Test __eq__ equality function."""
+ processor1 = self._processor()
+ processor2 = self._processor()
+
+ # == calls __eq__.
+ self.assertTrue(processor1 == processor2)
+
+ def mock_handle_style_error2(self):
+ pass
+
+ # Verify that a difference in any argument cause equality to fail.
+ processor = CppProcessor("foo", "h", self.mock_handle_style_error, 3)
+ self.assertFalse(processor == CppProcessor("bar", "h", self.mock_handle_style_error, 3))
+ self.assertFalse(processor == CppProcessor("foo", "c", self.mock_handle_style_error, 3))
+ self.assertFalse(processor == CppProcessor("foo", "h", mock_handle_style_error2, 3))
+ self.assertFalse(processor == CppProcessor("foo", "h", self.mock_handle_style_error, 4))
+
+ def test_ne(self):
+ """Test __ne__ inequality function."""
+ processor1 = self._processor()
+ processor2 = self._processor()
+
+ # != calls __ne__.
+ # By default, __ne__ always returns true on different objects.
+ # Thus, just check the distinguishing case to verify that the
+ # code defines __ne__.
+ self.assertFalse(processor1 != processor2)
+
+
def tearDown():
"""A global check to make sure all error-categories have been tested.
diff --git a/WebKitTools/Scripts/webkitpy/style/processors/text.py b/WebKitTools/Scripts/webkitpy/style/processors/text.py
new file mode 100644
index 0000000..307e5b8
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/style/processors/text.py
@@ -0,0 +1,56 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
+#
+# 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.
+
+"""Checks WebKit style for text files."""
+
+
+class TextProcessor(object):
+
+ """Processes text lines for checking style."""
+
+ def __init__(self, file_path, handle_style_error):
+ self.file_path = file_path
+ self.handle_style_error = handle_style_error
+
+ def process(self, lines):
+ lines = (["// adjust line numbers to make the first line 1."] + lines)
+
+ # FIXME: share with cpp_style.
+ for line_number, line in enumerate(lines):
+ if "\t" in line:
+ self.handle_style_error(line_number,
+ "whitespace/tab", 5,
+ "Line contains tab character.")
+
+
+# FIXME: Remove this function (requires refactoring unit tests).
+def process_file_data(filename, lines, error):
+ processor = TextProcessor(filename, error)
+ processor.process(lines)
+
diff --git a/WebKitTools/Scripts/webkitpy/style/processors/text_unittest.py b/WebKitTools/Scripts/webkitpy/style/processors/text_unittest.py
new file mode 100644
index 0000000..62f825b
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/style/processors/text_unittest.py
@@ -0,0 +1,94 @@
+#!/usr/bin/python
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""Unit test for text_style.py."""
+
+import unittest
+
+import text as text_style
+from text import TextProcessor
+
+class TextStyleTestCase(unittest.TestCase):
+ """TestCase for text_style.py"""
+
+ def assertNoError(self, lines):
+ """Asserts that the specified lines has no errors."""
+ self.had_error = False
+
+ def error_for_test(line_number, category, confidence, message):
+ """Records if an error occurs."""
+ self.had_error = True
+
+ text_style.process_file_data('', lines, error_for_test)
+ self.assert_(not self.had_error, '%s should not have any errors.' % lines)
+
+ def assertError(self, lines, expected_line_number):
+ """Asserts that the specified lines has an error."""
+ self.had_error = False
+
+ def error_for_test(line_number, category, confidence, message):
+ """Checks if the expected error occurs."""
+ self.assertEquals(expected_line_number, line_number)
+ self.assertEquals('whitespace/tab', category)
+ self.had_error = True
+
+ text_style.process_file_data('', lines, error_for_test)
+ self.assert_(self.had_error, '%s should have an error [whitespace/tab].' % lines)
+
+
+ def test_no_error(self):
+ """Tests for no error cases."""
+ self.assertNoError([''])
+ self.assertNoError(['abc def', 'ggg'])
+
+
+ def test_error(self):
+ """Tests for error cases."""
+ self.assertError(['2009-12-16\tKent Tamura\t<tkent@chromium.org>'], 1)
+ self.assertError(['2009-12-16 Kent Tamura <tkent@chromium.org>',
+ '',
+ '\tReviewed by NOBODY.'], 3)
+
+
+class TextProcessorTest(unittest.TestCase):
+
+ """Tests TextProcessor class."""
+
+ def mock_handle_style_error(self):
+ pass
+
+ def test_init(self):
+ """Test __init__ constructor."""
+ processor = TextProcessor("foo.txt", self.mock_handle_style_error)
+ self.assertEquals(processor.file_path, "foo.txt")
+ self.assertEquals(processor.handle_style_error, self.mock_handle_style_error)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/WebKitTools/Scripts/webkitpy/style/unittests.py b/WebKitTools/Scripts/webkitpy/style/unittests.py
new file mode 100644
index 0000000..11c10e7
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/style/unittests.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
+#
+# 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 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 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.
+
+"""Runs style package unit tests."""
+
+# This module is imported by test-webkitpy.
+
+import sys
+import unittest
+
+from checker_unittest import *
+from error_handlers_unittest import *
+from processors.cpp_unittest import *
+from processors.text_unittest import *
diff --git a/WebKitTools/Scripts/webkitpy/style_references.py b/WebKitTools/Scripts/webkitpy/style_references.py
new file mode 100644
index 0000000..2528c4d
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/style_references.py
@@ -0,0 +1,72 @@
+# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
+#
+# 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.
+
+"""References to non-style modules used by the style package."""
+
+# This module is a simple facade to the functionality used by the
+# style package that comes from WebKit modules outside the style
+# package.
+#
+# With this module, the only intra-package references (i.e.
+# references to webkitpy modules outside the style folder) that
+# the style package needs to make are relative references to
+# this module. For example--
+#
+# > from .. style_references import parse_patch
+#
+# Similarly, people maintaining non-style code are not beholden
+# to the contents of the style package when refactoring or
+# otherwise changing non-style code. They only have to be aware
+# of this module.
+
+import os
+
+from diff_parser import DiffParser
+from scm import detect_scm_system
+
+
+def parse_patch(patch_string):
+
+ """Parse a patch string and return the affected files."""
+
+ patch = DiffParser(patch_string.splitlines())
+ return patch.files
+
+
+class SimpleScm(object):
+
+ """Simple facade to SCM for use by style package."""
+
+ def __init__(self):
+ cwd = os.path.abspath('.')
+ self._scm = detect_scm_system(cwd)
+
+ def checkout_root(self):
+ """Return the source control root as an absolute path."""
+ return self._scm.checkout_root
+
+ def create_patch(self):
+ return self._scm.create_patch()
+
+ def create_patch_since_local_commit(self, commit):
+ return self._scm.create_patch_since_local_commit(commit)
+
diff --git a/WebKitTools/Scripts/webkitpy/user.py b/WebKitTools/Scripts/webkitpy/user.py
new file mode 100644
index 0000000..8dbf74c
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/user.py
@@ -0,0 +1,58 @@
+# Copyright (c) 2009, Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+import shlex
+import subprocess
+import webbrowser
+
+class User(object):
+ def prompt(self, message):
+ return raw_input(message)
+
+ def edit(self, files):
+ editor = os.environ.get("EDITOR") or "vi"
+ args = shlex.split(editor)
+ subprocess.call(args + files)
+
+ def page(self, message):
+ pager = os.environ.get("PAGER") or "less"
+ try:
+ child_process = subprocess.Popen([pager], stdin=subprocess.PIPE)
+ child_process.communicate(input=message)
+ except IOError, e:
+ pass
+
+ def confirm(self, message=None):
+ if not message:
+ message = "Continue?"
+ response = raw_input("%s [Y/n]: " % message)
+ return not response or response.lower() == "y"
+
+ def open_url(self, url):
+ webbrowser.open(url)
diff --git a/WebKitTools/Scripts/webkitpy/user.pyc b/WebKitTools/Scripts/webkitpy/user.pyc
new file mode 100644
index 0000000..7d6b687
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/user.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/modules/logging.py b/WebKitTools/Scripts/webkitpy/webkit_logging.py
index 7b7cec5..ba1c5eb 100644
--- a/WebKitTools/Scripts/modules/logging.py
+++ b/WebKitTools/Scripts/webkitpy/webkit_logging.py
@@ -28,6 +28,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# WebKit's Python module for logging
+# This module is now deprecated in favor of python's built-in logging.py.
import os
import sys
diff --git a/WebKitTools/Scripts/webkitpy/webkit_logging.pyc b/WebKitTools/Scripts/webkitpy/webkit_logging.pyc
new file mode 100644
index 0000000..137f042
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/webkit_logging.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/modules/logging_unittest.py b/WebKitTools/Scripts/webkitpy/webkit_logging_unittest.py
index b09a563..b940a4d 100644
--- a/WebKitTools/Scripts/modules/logging_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/webkit_logging_unittest.py
@@ -32,8 +32,8 @@ import StringIO
import tempfile
import unittest
-from modules.executive import ScriptError
-from modules.logging import *
+from webkitpy.executive import ScriptError
+from webkitpy.webkit_logging import *
class LoggingTest(unittest.TestCase):
diff --git a/WebKitTools/Scripts/modules/webkitport.py b/WebKitTools/Scripts/webkitpy/webkitport.py
index 849ac4b..cd60a54 100644
--- a/WebKitTools/Scripts/modules/webkitport.py
+++ b/WebKitTools/Scripts/webkitpy/webkitport.py
@@ -1,9 +1,9 @@
# Copyright (C) 2009, Google Inc. All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
-#
+#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
# * 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
@@ -31,8 +31,11 @@
import os
from optparse import make_option
+from webkitpy.executive import Executive
+
+
+class WebKitPort(object):
-class WebKitPort():
# We might need to pass scm into this function for scm.checkout_root
@classmethod
def script_path(cls, script_name):
@@ -40,37 +43,55 @@ class WebKitPort():
@staticmethod
def port(port_name):
- if port_name == "mac":
- return MacPort
- if port_name == "qt":
- return QtPort
- if port_name == "chromium":
- return ChromiumPort
+ ports = {
+ "chromium": ChromiumPort,
+ "gtk": GtkPort,
+ "mac": MacPort,
+ "qt": QtPort,
+ }
# FIXME: We should default to WinPort on Windows.
- return MacPort
+ return ports.get(port_name, MacPort)
@classmethod
def name(cls):
- raise NotImplementedError, "subclasses must implement"
+ raise NotImplementedError("subclasses must implement")
@classmethod
def flag(cls):
- raise NotImplementedError, "subclasses must implement"
+ raise NotImplementedError("subclasses must implement")
@classmethod
def update_webkit_command(cls):
return [cls.script_path("update-webkit")]
@classmethod
- def build_webkit_command(cls):
- return [cls.script_path("build-webkit")]
+ def build_webkit_command(cls, build_style=None):
+ command = [cls.script_path("build-webkit")]
+ if build_style == "debug":
+ command.append("--debug")
+ if build_style == "release":
+ command.append("--release")
+ return command
+
+ @classmethod
+ def run_javascriptcore_tests_command(cls):
+ return [cls.script_path("run-javascriptcore-tests")]
@classmethod
def run_webkit_tests_command(cls):
return [cls.script_path("run-webkit-tests")]
+ @classmethod
+ def run_python_unittests_command(cls):
+ return [cls.script_path("test-webkitpy")]
+
+ @classmethod
+ def run_perl_unittests_command(cls):
+ return [cls.script_path("test-webkitperl")]
+
class MacPort(WebKitPort):
+
@classmethod
def name(cls):
return "Mac"
@@ -80,7 +101,32 @@ class MacPort(WebKitPort):
return "--port=mac"
+class GtkPort(WebKitPort):
+
+ @classmethod
+ def name(cls):
+ return "Gtk"
+
+ @classmethod
+ def flag(cls):
+ return "--port=gtk"
+
+ @classmethod
+ def build_webkit_command(cls, build_style=None):
+ command = WebKitPort.build_webkit_command(build_style=build_style)
+ command.append("--gtk")
+ command.append('--makeargs="-j%s"' % Executive.cpu_count())
+ return command
+
+ @classmethod
+ def run_webkit_tests_command(cls):
+ command = WebKitPort.run_webkit_tests_command()
+ command.append("--gtk")
+ return command
+
+
class QtPort(WebKitPort):
+
@classmethod
def name(cls):
return "Qt"
@@ -90,13 +136,15 @@ class QtPort(WebKitPort):
return "--port=qt"
@classmethod
- def build_webkit_command(cls):
- command = WebKitPort.build_webkit_command()
+ def build_webkit_command(cls, build_style=None):
+ command = WebKitPort.build_webkit_command(build_style=build_style)
command.append("--qt")
+ command.append('--makeargs="-j%s"' % Executive.cpu_count())
return command
class ChromiumPort(WebKitPort):
+
@classmethod
def name(cls):
return "Chromium"
@@ -112,7 +160,7 @@ class ChromiumPort(WebKitPort):
return command
@classmethod
- def build_webkit_command(cls):
- command = WebKitPort.build_webkit_command()
+ def build_webkit_command(cls, build_style=None):
+ command = WebKitPort.build_webkit_command(build_style=build_style)
command.append("--chromium")
return command
diff --git a/WebKitTools/Scripts/webkitpy/webkitport.pyc b/WebKitTools/Scripts/webkitpy/webkitport.pyc
new file mode 100644
index 0000000..e344aca
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/webkitport.pyc
Binary files differ
diff --git a/WebKitTools/Scripts/modules/webkitport_unittest.py b/WebKitTools/Scripts/webkitpy/webkitport_unittest.py
index c713e83..202234f 100644
--- a/WebKitTools/Scripts/modules/webkitport_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/webkitport_unittest.py
@@ -29,7 +29,9 @@
import unittest
-from modules.webkitport import WebKitPort, MacPort, QtPort, ChromiumPort
+from webkitpy.executive import Executive
+from webkitpy.webkitport import WebKitPort, MacPort, GtkPort, QtPort, ChromiumPort
+
class WebKitPortTest(unittest.TestCase):
def test_mac_port(self):
@@ -37,18 +39,29 @@ class WebKitPortTest(unittest.TestCase):
self.assertEquals(MacPort.flag(), "--port=mac")
self.assertEquals(MacPort.run_webkit_tests_command(), [WebKitPort.script_path("run-webkit-tests")])
self.assertEquals(MacPort.build_webkit_command(), [WebKitPort.script_path("build-webkit")])
+ self.assertEquals(MacPort.build_webkit_command(build_style="debug"), [WebKitPort.script_path("build-webkit"), "--debug"])
+ self.assertEquals(MacPort.build_webkit_command(build_style="release"), [WebKitPort.script_path("build-webkit"), "--release"])
+
+ def test_gtk_port(self):
+ self.assertEquals(GtkPort.name(), "Gtk")
+ self.assertEquals(GtkPort.flag(), "--port=gtk")
+ self.assertEquals(GtkPort.run_webkit_tests_command(), [WebKitPort.script_path("run-webkit-tests"), "--gtk"])
+ self.assertEquals(GtkPort.build_webkit_command(), [WebKitPort.script_path("build-webkit"), "--gtk", '--makeargs="-j%s"' % Executive.cpu_count()])
+ self.assertEquals(GtkPort.build_webkit_command(build_style="debug"), [WebKitPort.script_path("build-webkit"), "--debug", "--gtk", '--makeargs="-j%s"' % Executive.cpu_count()])
def test_qt_port(self):
self.assertEquals(QtPort.name(), "Qt")
self.assertEquals(QtPort.flag(), "--port=qt")
self.assertEquals(QtPort.run_webkit_tests_command(), [WebKitPort.script_path("run-webkit-tests")])
- self.assertEquals(QtPort.build_webkit_command(), [WebKitPort.script_path("build-webkit"), "--qt"])
+ self.assertEquals(QtPort.build_webkit_command(), [WebKitPort.script_path("build-webkit"), "--qt", '--makeargs="-j%s"' % Executive.cpu_count()])
+ self.assertEquals(QtPort.build_webkit_command(build_style="debug"), [WebKitPort.script_path("build-webkit"), "--debug", "--qt", '--makeargs="-j%s"' % Executive.cpu_count()])
def test_chromium_port(self):
self.assertEquals(ChromiumPort.name(), "Chromium")
self.assertEquals(ChromiumPort.flag(), "--port=chromium")
self.assertEquals(ChromiumPort.run_webkit_tests_command(), [WebKitPort.script_path("run-webkit-tests")])
self.assertEquals(ChromiumPort.build_webkit_command(), [WebKitPort.script_path("build-webkit"), "--chromium"])
+ self.assertEquals(ChromiumPort.build_webkit_command(build_style="debug"), [WebKitPort.script_path("build-webkit"), "--debug", "--chromium"])
self.assertEquals(ChromiumPort.update_webkit_command(), [WebKitPort.script_path("update-webkit"), "--chromium"])
diff --git a/WebKitTools/WebKitAPITest/HostWindow.cpp b/WebKitTools/WebKitAPITest/HostWindow.cpp
new file mode 100644
index 0000000..b364831
--- /dev/null
+++ b/WebKitTools/WebKitAPITest/HostWindow.cpp
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "HostWindow.h"
+
+namespace WebKitAPITest {
+
+static LPCWSTR hostWindowClassName = L"HostWindow";
+
+HostWindow::HostWindow()
+ : m_window(0)
+{
+}
+
+bool HostWindow::initialize()
+{
+ registerWindowClass();
+ m_window = CreateWindowExW(0, hostWindowClassName, L"WebKitAPITest", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, GetModuleHandle(0), 0);
+ return m_window;
+}
+
+HostWindow::~HostWindow()
+{
+ if (!IsWindow(m_window))
+ return;
+ DestroyWindow(m_window);
+}
+
+RECT HostWindow::clientRect() const
+{
+ RECT rect = {0};
+ if (!GetClientRect(m_window, &rect)) {
+ RECT emptyRect = {0};
+ return emptyRect;
+ }
+ return rect;
+}
+
+void HostWindow::registerWindowClass()
+{
+ static bool initialized;
+ if (initialized)
+ return;
+ initialized = true;
+
+ WNDCLASSEXW wndClass = {0};
+ wndClass.cbSize = sizeof(wndClass);
+ wndClass.style = CS_HREDRAW | CS_VREDRAW;
+ wndClass.lpfnWndProc = wndProc;
+ wndClass.hCursor = LoadCursor(0, IDC_ARROW);
+ wndClass.hInstance = GetModuleHandle(0);
+ wndClass.lpszClassName = hostWindowClassName;
+
+ RegisterClassExW(&wndClass);
+}
+
+LRESULT HostWindow::wndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ return DefWindowProcW(hWnd, uMsg, wParam, lParam);
+}
+
+} // namespace WebKitAPITest
diff --git a/WebKitTools/WebKitAPITest/HostWindow.h b/WebKitTools/WebKitAPITest/HostWindow.h
new file mode 100644
index 0000000..a2734ed
--- /dev/null
+++ b/WebKitTools/WebKitAPITest/HostWindow.h
@@ -0,0 +1,51 @@
+/*
+ * 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 HostWindow_h
+#define HostWindow_h
+
+#include <windows.h>
+#include <wtf/Noncopyable.h>
+
+namespace WebKitAPITest {
+
+class HostWindow : public Noncopyable {
+public:
+ HostWindow();
+ ~HostWindow();
+ bool initialize();
+
+ RECT clientRect() const;
+ HWND window() const { return m_window; }
+
+private:
+ static void registerWindowClass();
+ static LRESULT CALLBACK wndProc(HWND, UINT uMsg, WPARAM, LPARAM);
+
+ HWND m_window;
+};
+
+} // namespace WebKitAPITest
+
+#endif // HostWindow_h
diff --git a/WebKitTools/WebKitAPITest/Test.h b/WebKitTools/WebKitAPITest/Test.h
new file mode 100644
index 0000000..33b07c9
--- /dev/null
+++ b/WebKitTools/WebKitAPITest/Test.h
@@ -0,0 +1,59 @@
+/*
+ * 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 Test_h
+#define Test_h
+
+#include "TestsController.h"
+
+namespace WebKitAPITest {
+
+// Abstract base class that all tests inherit from.
+class Test {
+public:
+ ~Test() { }
+ virtual const char* name() const = 0;
+ virtual void run() = 0;
+};
+
+#define TEST_CLASS_NAME(testCaseName, testName) testCaseName##_##testName##_Test
+
+// Use this to define a new test.
+#define TEST(testCaseName, testName) \
+ class TEST_CLASS_NAME(testCaseName, testName) : public Test { \
+ public: \
+ virtual const char* name() const { return #testCaseName ": " #testName; } \
+ virtual void run(); \
+ static const bool initialized; \
+ }; \
+ \
+ const bool TEST_CLASS_NAME(testCaseName, testName)::initialized = (TestsController::shared().addTest(new TEST_CLASS_NAME(testCaseName, testName)), true); \
+ \
+ void TEST_CLASS_NAME(testCaseName, testName)::run()
+
+#define TEST_ASSERT(expression) do { if (!(expression)) { TestsController::shared().testFailed(__FILE__, __LINE__, #expression); return; } } while (0)
+
+} // namespace WebKitAPITest
+
+#endif // Test_h
diff --git a/WebKitTools/WebKitAPITest/TestsController.cpp b/WebKitTools/WebKitAPITest/TestsController.cpp
new file mode 100644
index 0000000..52ceabf
--- /dev/null
+++ b/WebKitTools/WebKitAPITest/TestsController.cpp
@@ -0,0 +1,147 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "TestsController.h"
+
+#include "Test.h"
+#include <wtf/PassOwnPtr.h>
+
+using namespace std;
+
+namespace WebKitAPITest {
+
+static const LPCWSTR testsControllerWindowClassName = L"TestsControllerWindowClass";
+
+enum { runNextTestTimerID = 1 };
+
+inline TestsController::TestsController()
+ : m_testFailed(false)
+ , m_anyTestFailed(false)
+{
+ registerWindowClass();
+ m_window = CreateWindowExW(0, testsControllerWindowClassName, 0, WS_CHILD, 0, 0, 0, 0, HWND_MESSAGE, 0, GetModuleHandle(0), 0);
+}
+
+TestsController& TestsController::shared()
+{
+ static TestsController& shared = *new TestsController;
+ return shared;
+}
+
+bool TestsController::runAllTests()
+{
+ if (m_tests.isEmpty())
+ return true;
+
+ MSG msg;
+ BOOL result;
+ while ((result = GetMessage(&msg, 0, 0, 0))) {
+ if (result == -1)
+ break;
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+
+ if (msg.message != WM_QUIT)
+ return false;
+
+ return !m_anyTestFailed;
+}
+
+void TestsController::addTest(PassOwnPtr<Test> test)
+{
+ m_tests.append(test.release());
+ runNextTestSoon();
+}
+
+void TestsController::testFailed(const char* file, int line, const char* message)
+{
+ ASSERT(!m_tests.isEmpty());
+
+ m_testFailed = true;
+ m_anyTestFailed = true;
+
+ printf("FAIL: %s\n\t%s (%s:%d)\n", m_tests.first()->name(), message, file, line);
+ fflush(stdout);
+}
+
+void TestsController::runNextTest()
+{
+ if (m_tests.isEmpty()) {
+ PostQuitMessage(0);
+ return;
+ }
+
+ Test* test = m_tests.first();
+
+ m_testFailed = false;
+ printf("RUN: %s\n", test->name());
+ fflush(stdout);
+ test->run();
+
+ if (!m_testFailed) {
+ printf("PASS: %s\n", test->name());
+ fflush(stdout);
+ }
+
+ m_tests.removeFirst();
+ delete test;
+
+ runNextTestSoon();
+}
+
+void TestsController::runNextTestSoon()
+{
+ SetTimer(m_window, runNextTestTimerID, 0, 0);
+}
+
+void TestsController::registerWindowClass()
+{
+ static bool initialized;
+ if (initialized)
+ return;
+ initialized = true;
+
+ WNDCLASSEXW wndClass = {0};
+ wndClass.cbSize = sizeof(wndClass);
+ wndClass.lpfnWndProc = wndProc;
+ wndClass.hCursor = LoadCursor(0, IDC_ARROW);
+ wndClass.hInstance = GetModuleHandle(0);
+ wndClass.lpszClassName = testsControllerWindowClassName;
+
+ RegisterClassExW(&wndClass);
+}
+
+LRESULT TestsController::wndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ if (uMsg == WM_TIMER && wParam == runNextTestTimerID) {
+ KillTimer(hWnd, runNextTestTimerID);
+ TestsController::shared().runNextTest();
+ return 0;
+ }
+
+ return DefWindowProcW(hWnd, uMsg, wParam, lParam);
+}
+
+} // namespace WebKitAPITest
diff --git a/WebKitTools/WebKitAPITest/TestsController.h b/WebKitTools/WebKitAPITest/TestsController.h
new file mode 100644
index 0000000..11b457d
--- /dev/null
+++ b/WebKitTools/WebKitAPITest/TestsController.h
@@ -0,0 +1,65 @@
+/*
+ * 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 TestsController_h
+#define TestsController_h
+
+#include <windows.h>
+#include <wtf/Forward.h>
+#include <wtf/Deque.h>
+#include <wtf/Noncopyable.h>
+
+namespace WebKitAPITest {
+
+class Test;
+
+class TestsController : public Noncopyable {
+public:
+ static TestsController& shared();
+
+ // Returns true if all the tests passed, false otherwise.
+ bool runAllTests();
+
+ void addTest(PassOwnPtr<Test>);
+ void testFailed(const char* file, int line, const char* message);
+
+private:
+ TestsController();
+ ~TestsController();
+
+ void runNextTest();
+ void runNextTestSoon();
+
+ static void registerWindowClass();
+ static LRESULT CALLBACK wndProc(HWND, UINT uMsg, WPARAM, LPARAM);
+
+ HWND m_window;
+ Deque<Test*> m_tests;
+ bool m_testFailed;
+ bool m_anyTestFailed;
+};
+
+} // namespace WebKitAPITest
+
+#endif // TestsController_h
diff --git a/WebKitTools/WebKitAPITest/WebKitAPITest.vcproj b/WebKitTools/WebKitAPITest/WebKitAPITest.vcproj
new file mode 100644
index 0000000..5473f10
--- /dev/null
+++ b/WebKitTools/WebKitAPITest/WebKitAPITest.vcproj
@@ -0,0 +1,235 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebKitAPITest"
+ ProjectGUID="{626089A3-25D3-4883-A96C-B8C66E036397}"
+ RootNamespace="WebKitAPITest"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug_All|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops;.\WebKitAPITestCommon.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug_Internal|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;.\WebKitAPITestCommon.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;.\WebKitAPITestCommon.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\HostWindow.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\HostWindow.h"
+ >
+ </File>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Test.h"
+ >
+ </File>
+ <File
+ RelativePath=".\TestsController.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\TestsController.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tests\WebViewDestruction.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/WebKitTools/WebKitAPITest/WebKitAPITestCommon.vsprops b/WebKitTools/WebKitAPITest/WebKitAPITestCommon.vsprops
new file mode 100644
index 0000000..bac1f6a
--- /dev/null
+++ b/WebKitTools/WebKitAPITest/WebKitAPITestCommon.vsprops
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebKitAPITestCommon"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\WebCore\ForwardingHeaders&quot;"
+ PreprocessorDefinitions="_CONSOLE;NOMINMAX"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;"
+ />
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ />
+</VisualStudioPropertySheet>
diff --git a/WebKitTools/WebKitAPITest/main.cpp b/WebKitTools/WebKitAPITest/main.cpp
new file mode 100644
index 0000000..a941c30
--- /dev/null
+++ b/WebKitTools/WebKitAPITest/main.cpp
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "TestsController.h"
+
+using namespace WebKitAPITest;
+
+int main(int, char*[])
+{
+ // FIXME: Remove this line once <http://webkit.org/b/32867> is fixed.
+ OleInitialize(0);
+
+ return !TestsController::shared().runAllTests();
+}
diff --git a/WebKitTools/WebKitAPITest/tests/WebViewDestruction.cpp b/WebKitTools/WebKitAPITest/tests/WebViewDestruction.cpp
new file mode 100644
index 0000000..6c09e6f
--- /dev/null
+++ b/WebKitTools/WebKitAPITest/tests/WebViewDestruction.cpp
@@ -0,0 +1,230 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "HostWindow.h"
+#include "Test.h"
+#include <WebCore/COMPtr.h>
+#include <WebKit/WebKit.h>
+#include <WebKit/WebKitCOMAPI.h>
+#include <wtf/PassOwnPtr.h>
+
+namespace WebKitAPITest {
+
+template <typename T>
+static HRESULT WebKitCreateInstance(REFCLSID clsid, T** object)
+{
+ return WebKitCreateInstance(clsid, 0, __uuidof(T), reinterpret_cast<void**>(object));
+}
+
+static int webViewCount()
+{
+ COMPtr<IWebKitStatistics> statistics;
+ if (FAILED(WebKitCreateInstance(__uuidof(WebKitStatistics), &statistics)))
+ return -1;
+ int count;
+ if (FAILED(statistics->webViewCount(&count)))
+ return -1;
+ return count;
+}
+
+static void createAndInitializeWebView(COMPtr<IWebView>& outWebView, HostWindow& window, HWND& viewWindow)
+{
+ COMPtr<IWebView> webView;
+ TEST_ASSERT(SUCCEEDED(WebKitCreateInstance(__uuidof(WebView), &webView)));
+
+ TEST_ASSERT(window.initialize());
+ TEST_ASSERT(SUCCEEDED(webView->setHostWindow(reinterpret_cast<OLE_HANDLE>(window.window()))));
+ TEST_ASSERT(SUCCEEDED(webView->initWithFrame(window.clientRect(), 0, 0)));
+
+ COMPtr<IWebViewPrivate> viewPrivate(Query, webView);
+ TEST_ASSERT(viewPrivate);
+ TEST_ASSERT(SUCCEEDED(viewPrivate->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow))));
+ TEST_ASSERT(IsWindow(viewWindow));
+
+ outWebView.adoptRef(webView.releaseRef());
+}
+
+static void runMessagePump(DWORD timeoutMilliseconds)
+{
+ DWORD startTickCount = GetTickCount();
+ MSG msg;
+ BOOL result;
+ while ((result = PeekMessageW(&msg, 0, 0, 0, PM_REMOVE)) && GetTickCount() - startTickCount <= timeoutMilliseconds) {
+ if (result == -1)
+ break;
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+}
+
+static void finishWebViewDestructionTest(COMPtr<IWebView>& webView, HWND viewWindow)
+{
+ // Allow window messages to be processed, because in some cases that would trigger a crash (e.g., <http://webkit.org/b/32827>).
+ runMessagePump(50);
+
+ // We haven't crashed. Release the WebView and ensure that its view window has been destroyed and the WebView doesn't leak.
+ int currentWebViewCount = webViewCount();
+ TEST_ASSERT(currentWebViewCount > 0);
+
+ webView = 0;
+
+ TEST_ASSERT(webViewCount() == currentWebViewCount - 1);
+ TEST_ASSERT(!IsWindow(viewWindow));
+}
+
+// Tests that releasing a WebView without calling IWebView::initWithFrame works.
+TEST(WebViewDestruction, NoInitWithFrame)
+{
+ COMPtr<IWebView> webView;
+ TEST_ASSERT(SUCCEEDED(WebKitCreateInstance(__uuidof(WebView), &webView)));
+
+ finishWebViewDestructionTest(webView, 0);
+}
+
+TEST(WebViewDestruction, CloseWithoutInitWithFrame)
+{
+ COMPtr<IWebView> webView;
+ TEST_ASSERT(SUCCEEDED(WebKitCreateInstance(__uuidof(WebView), &webView)));
+
+ TEST_ASSERT(SUCCEEDED(webView->close()));
+
+ finishWebViewDestructionTest(webView, 0);
+}
+
+// Tests that releasing a WebView without calling IWebView::close or DestroyWindow doesn't leak. <http://webkit.org/b/33162>
+TEST(WebViewDestruction, NoCloseOrDestroyViewWindow)
+{
+ COMPtr<IWebView> webView;
+ HostWindow window;
+ HWND viewWindow;
+ createAndInitializeWebView(webView, window, viewWindow);
+
+ finishWebViewDestructionTest(webView, viewWindow);
+}
+
+// Tests that calling IWebView::close without calling DestroyWindow, then releasing a WebView doesn't crash. <http://webkit.org/b/32827>
+TEST(WebViewDestruction, CloseWithoutDestroyViewWindow)
+{
+ COMPtr<IWebView> webView;
+ HostWindow window;
+ HWND viewWindow;
+ createAndInitializeWebView(webView, window, viewWindow);
+
+ TEST_ASSERT(SUCCEEDED(webView->close()));
+
+ finishWebViewDestructionTest(webView, viewWindow);
+}
+
+TEST(WebViewDestruction, DestroyViewWindowWithoutClose)
+{
+ COMPtr<IWebView> webView;
+ HostWindow window;
+ HWND viewWindow;
+ createAndInitializeWebView(webView, window, viewWindow);
+
+ DestroyWindow(viewWindow);
+
+ finishWebViewDestructionTest(webView, viewWindow);
+}
+
+TEST(WebViewDestruction, CloseThenDestroyViewWindow)
+{
+ COMPtr<IWebView> webView;
+ HostWindow window;
+ HWND viewWindow;
+ createAndInitializeWebView(webView, window, viewWindow);
+
+ TEST_ASSERT(SUCCEEDED(webView->close()));
+ DestroyWindow(viewWindow);
+
+ finishWebViewDestructionTest(webView, viewWindow);
+}
+
+TEST(WebViewDestruction, DestroyViewWindowThenClose)
+{
+ COMPtr<IWebView> webView;
+ HostWindow window;
+ HWND viewWindow;
+ createAndInitializeWebView(webView, window, viewWindow);
+
+ DestroyWindow(viewWindow);
+ TEST_ASSERT(SUCCEEDED(webView->close()));
+
+ finishWebViewDestructionTest(webView, viewWindow);
+}
+
+TEST(WebViewDestruction, DestroyHostWindow)
+{
+ COMPtr<IWebView> webView;
+ HostWindow window;
+ HWND viewWindow;
+ createAndInitializeWebView(webView, window, viewWindow);
+
+ DestroyWindow(window.window());
+
+ finishWebViewDestructionTest(webView, viewWindow);
+}
+
+TEST(WebViewDestruction, DestroyHostWindowThenClose)
+{
+ COMPtr<IWebView> webView;
+ HostWindow window;
+ HWND viewWindow;
+ createAndInitializeWebView(webView, window, viewWindow);
+
+ DestroyWindow(window.window());
+ TEST_ASSERT(SUCCEEDED(webView->close()));
+
+ finishWebViewDestructionTest(webView, viewWindow);
+}
+
+TEST(WebViewDestruction, CloseThenDestroyHostWindow)
+{
+ COMPtr<IWebView> webView;
+ HostWindow window;
+ HWND viewWindow;
+ createAndInitializeWebView(webView, window, viewWindow);
+
+ TEST_ASSERT(SUCCEEDED(webView->close()));
+ DestroyWindow(window.window());
+
+ finishWebViewDestructionTest(webView, viewWindow);
+}
+
+// Tests that calling IWebView::mainFrame after calling IWebView::close doesn't crash. <http://webkit.org/b/32868>
+TEST(WebViewDestruction, MainFrameAfterClose)
+{
+ COMPtr<IWebView> webView;
+ HostWindow window;
+ HWND viewWindow;
+ createAndInitializeWebView(webView, window, viewWindow);
+
+ TEST_ASSERT(SUCCEEDED(webView->close()));
+ COMPtr<IWebFrame> mainFrame;
+ TEST_ASSERT(SUCCEEDED(webView->mainFrame(&mainFrame)));
+
+ finishWebViewDestructionTest(webView, viewWindow);
+}
+
+} // namespace WebKitAPITest
diff --git a/WebKitTools/WebKitLauncher/main.m b/WebKitTools/WebKitLauncher/main.m
index 20f130e..4fee68a 100644
--- a/WebKitTools/WebKitLauncher/main.m
+++ b/WebKitTools/WebKitLauncher/main.m
@@ -166,6 +166,17 @@ static NSString *currentMacOSXVersion()
return [NSString stringWithFormat:@"%x.%x", (version & 0xFF00) >> 8, (version & 0x00F0) >> 4];
}
+static NSString *fallbackMacOSXVersion(NSString *systemVersion)
+{
+ NSDictionary *fallbackVersionMap = [[NSUserDefaults standardUserDefaults] dictionaryForKey:@"FallbackSystemVersions"];
+ if (!fallbackVersionMap)
+ return nil;
+ NSString *fallbackSystemVersion = [fallbackVersionMap objectForKey:systemVersion];
+ if (!fallbackSystemVersion || ![fallbackSystemVersion isKindOfClass:[NSString class]])
+ return nil;
+ return fallbackSystemVersion;
+}
+
static BOOL checkFrameworkPath(NSString *frameworkPath)
{
BOOL isDirectory = NO;
@@ -186,15 +197,26 @@ int main(int argc, char *argv[])
NSString *systemVersion = currentMacOSXVersion();
NSString *frameworkPath = [[[NSBundle mainBundle] privateFrameworksPath] stringByAppendingPathComponent:systemVersion];
- NSString *pathToEnablerLib = [[NSBundle mainBundle] pathForResource:@"WebKitNightlyEnabler" ofType:@"dylib"];
- NSBundle *safariBundle = locateSafariBundle();
- NSString *executablePath = [safariBundle executablePath];
+ BOOL frameworkPathIsUsable = checkFrameworkPath(frameworkPath);
- if (!checkFrameworkPath(frameworkPath))
+ if (!frameworkPathIsUsable) {
+ NSString *fallbackSystemVersion = fallbackMacOSXVersion(systemVersion);
+ if (fallbackSystemVersion) {
+ frameworkPath = [[[NSBundle mainBundle] privateFrameworksPath] stringByAppendingPathComponent:fallbackSystemVersion];
+ frameworkPathIsUsable = checkFrameworkPath(frameworkPath);
+ }
+ }
+
+ if (!frameworkPathIsUsable)
displayErrorAndQuit([NSString stringWithFormat:@"Mac OS X %@ is not supported", systemVersion],
[NSString stringWithFormat:@"Nightly builds of WebKit are not supported on Mac OS X %@ at this time.", systemVersion]);
+ NSString *pathToEnablerLib = [[NSBundle mainBundle] pathForResource:@"WebKitNightlyEnabler" ofType:@"dylib"];
+
+ NSBundle *safariBundle = locateSafariBundle();
+ NSString *executablePath = [safariBundle executablePath];
+
if (!checkSafariVersion(safariBundle)) {
NSString *safariVersion = [[safariBundle localizedInfoDictionary] objectForKey:@"CFBundleShortVersionString"];
displayErrorAndQuit([NSString stringWithFormat:@"Safari %@ is not supported", safariVersion],
diff --git a/WebKitTools/WinLauncher/PrintWebUIDelegate.cpp b/WebKitTools/WinLauncher/PrintWebUIDelegate.cpp
new file mode 100644
index 0000000..ccc267b
--- /dev/null
+++ b/WebKitTools/WinLauncher/PrintWebUIDelegate.cpp
@@ -0,0 +1,194 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2009 Brent Fulgham. 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 "stdafx.h"
+#include "PrintWebUIDelegate.h"
+
+#include <commctrl.h>
+#include <commdlg.h>
+#include <objbase.h>
+#include <shlwapi.h>
+#include <wininet.h>
+
+#include <WebKit/WebKitCOMAPI.h>
+
+static const int MARGIN = 20;
+
+HRESULT PrintWebUIDelegate::QueryInterface(REFIID riid, void** ppvObject)
+{
+ *ppvObject = 0;
+ if (IsEqualIID(riid, IID_IUnknown))
+ *ppvObject = static_cast<IWebUIDelegate*>(this);
+ else if (IsEqualIID(riid, IID_IWebUIDelegate))
+ *ppvObject = static_cast<IWebUIDelegate*>(this);
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+
+ULONG PrintWebUIDelegate::AddRef(void)
+{
+ return ++m_refCount;
+}
+
+ULONG PrintWebUIDelegate::Release(void)
+{
+ ULONG newRef = --m_refCount;
+ if (!newRef)
+ delete this;
+
+ return newRef;
+}
+
+HRESULT PrintWebUIDelegate::webViewPrintingMarginRect(IWebView* view, RECT* rect)
+{
+ if (!view || !rect)
+ return E_POINTER;
+
+ IWebFrame* mainFrame = 0;
+ if (FAILED(view->mainFrame(&mainFrame)))
+ return E_FAIL;
+
+ IWebFramePrivate* privateFrame = 0;
+ if (FAILED(mainFrame->QueryInterface(&privateFrame))) {
+ mainFrame->Release();
+ return E_FAIL;
+ }
+
+ privateFrame->frameBounds(rect);
+
+ rect->left += MARGIN;
+ rect->top += MARGIN;
+ HDC dc = ::GetDC(0);
+ rect->right = (::GetDeviceCaps(dc, LOGPIXELSX) * 6.5) - MARGIN;
+ rect->bottom = (::GetDeviceCaps(dc, LOGPIXELSY) * 11) - MARGIN;
+ ::ReleaseDC(0, dc);
+
+ privateFrame->Release();
+ mainFrame->Release();
+
+ return S_OK;
+}
+
+HRESULT PrintWebUIDelegate::webViewHeaderHeight(IWebView* webView, float* height)
+{
+ if (!webView || !height)
+ return E_POINTER;
+
+ HDC dc = ::GetDC(0);
+
+ TEXTMETRIC textMetric;
+ ::GetTextMetrics(dc, &textMetric);
+ ::ReleaseDC(0, dc);
+
+ *height = 1.1 * textMetric.tmHeight;
+
+ return S_OK;
+}
+
+HRESULT PrintWebUIDelegate::webViewFooterHeight(IWebView* webView, float* height)
+{
+ if (!webView || !height)
+ return E_POINTER;
+
+ HDC dc = ::GetDC(0);
+
+ TEXTMETRIC textMetric;
+ ::GetTextMetrics(dc, &textMetric);
+ ::ReleaseDC(0, dc);
+
+ *height = 1.1 * textMetric.tmHeight;
+
+ return S_OK;
+}
+
+HRESULT PrintWebUIDelegate::drawHeaderInRect(
+ /* [in] */ IWebView *webView,
+ /* [in] */ RECT *rect,
+ /* [in] */ OLE_HANDLE drawingContext)
+{
+ if (!webView || !rect)
+ return E_POINTER;
+
+ // Turn off header for now.
+ HDC dc = reinterpret_cast<HDC>(drawingContext);
+
+ HFONT hFont = (HFONT)::GetStockObject(ANSI_VAR_FONT);
+ HFONT hOldFont = (HFONT)::SelectObject(dc, hFont);
+
+ LPCTSTR header(_T("[Sample Header]"));
+ int length = _tcslen(header);
+
+ int rc = ::DrawText(dc, header, length, rect, DT_LEFT | DT_NOCLIP | DT_VCENTER | DT_SINGLELINE);
+ ::SelectObject(dc, hOldFont);
+
+ if (!rc)
+ return E_FAIL;
+
+ ::MoveToEx(dc, rect->left, rect->bottom, 0);
+ HPEN hPen = (HPEN)::GetStockObject(BLACK_PEN);
+ HPEN hOldPen = (HPEN)::SelectObject(dc, hPen);
+ ::LineTo(dc, rect->right, rect->bottom);
+ ::SelectObject(dc, hOldPen);
+
+ return S_OK;
+}
+
+HRESULT PrintWebUIDelegate::drawFooterInRect(
+ /* [in] */ IWebView *webView,
+ /* [in] */ RECT *rect,
+ /* [in] */ OLE_HANDLE drawingContext,
+ /* [in] */ UINT pageIndex,
+ /* [in] */ UINT pageCount)
+{
+ if (!webView || !rect)
+ return E_POINTER;
+
+ HDC dc = reinterpret_cast<HDC>(drawingContext);
+
+ HFONT hFont = (HFONT)::GetStockObject(ANSI_VAR_FONT);
+ HFONT hOldFont = (HFONT)::SelectObject(dc, hFont);
+
+ LPCTSTR footer(_T("[Sample Footer]"));
+ int length = _tcslen(footer);
+
+ // Add a line, 1/10th inch above the footer text from left margin to right margin.
+ ::MoveToEx(dc, rect->left, rect->top, 0);
+ HPEN hPen = (HPEN)::GetStockObject(BLACK_PEN);
+ HPEN hOldPen = (HPEN)::SelectObject(dc, hPen);
+ ::LineTo(dc, rect->right, rect->top);
+ ::SelectObject(dc, hOldPen);
+
+ int rc = ::DrawText(dc, footer, length, rect, DT_LEFT | DT_NOCLIP | DT_VCENTER | DT_SINGLELINE);
+ ::SelectObject(dc, hOldFont);
+
+ if (!rc)
+ return E_FAIL;
+
+ return S_OK;
+}
diff --git a/WebKitTools/WinLauncher/PrintWebUIDelegate.h b/WebKitTools/WinLauncher/PrintWebUIDelegate.h
new file mode 100644
index 0000000..9749a98
--- /dev/null
+++ b/WebKitTools/WinLauncher/PrintWebUIDelegate.h
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2009 Brent Fulgham. 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 PrintWebUIDelegate_h
+#define PrintWebUIDelegate_h
+
+#include <WebKit/WebKit.h>
+
+class PrintWebUIDelegate : public IWebUIDelegate {
+public:
+ PrintWebUIDelegate() : m_refCount(1) {}
+
+ // IUnknown
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef(void);
+ virtual ULONG STDMETHODCALLTYPE Release(void);
+
+ virtual HRESULT STDMETHODCALLTYPE createWebViewWithRequest(IWebView*, IWebURLRequest*, IWebView**) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE webViewShow(IWebView*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE webViewClose(IWebView*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE webViewFocus(IWebView*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE webViewUnfocus(IWebView*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE webViewFirstResponder(IWebView*, OLE_HANDLE*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE makeFirstResponder(IWebView*, OLE_HANDLE) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE setStatusText(IWebView*, BSTR) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE webViewStatusText(IWebView*, BSTR*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE webViewAreToolbarsVisible(IWebView*, BOOL*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE setToolbarsVisible(IWebView*, BOOL) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE webViewIsStatusBarVisible(IWebView*, BOOL*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE setStatusBarVisible(IWebView*, BOOL) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE webViewIsResizable(IWebView*, BOOL*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE setResizable(IWebView*, BOOL) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE setFrame(IWebView*, RECT*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE webViewFrame(IWebView*, RECT*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE setContentRect(IWebView*, RECT*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE webViewContentRect(IWebView*, RECT*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE runJavaScriptAlertPanelWithMessage(IWebView*, BSTR) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE runJavaScriptConfirmPanelWithMessage(IWebView*, BSTR, BOOL*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE runJavaScriptTextInputPanelWithPrompt(IWebView*, BSTR, BSTR, BSTR*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE runBeforeUnloadConfirmPanelWithMessage(IWebView*, BSTR, IWebFrame*, BOOL*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE runOpenPanelForFileButtonWithResultListener(IWebView*, IWebOpenPanelResultListener*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE mouseDidMoveOverElement(IWebView*, IPropertyBag*, UINT) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE contextMenuItemsForElement(IWebView*, IPropertyBag*, OLE_HANDLE, OLE_HANDLE*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE validateUserInterfaceItem(IWebView*, UINT, BOOL, BOOL*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE shouldPerformAction(IWebView*, UINT, UINT) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE dragDestinationActionMaskForDraggingInfo(IWebView*, IDataObject*, WebDragDestinationAction*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE willPerformDragDestinationAction(IWebView*, WebDragDestinationAction, IDataObject*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE dragSourceActionMaskForPoint(IWebView*, LPPOINT, WebDragSourceAction*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE willPerformDragSourceAction(IWebView*, WebDragSourceAction, LPPOINT, IDataObject*, IDataObject**) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE contextMenuItemSelected(IWebView*, void*, IPropertyBag*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE hasCustomMenuImplementation(BOOL*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE trackCustomPopupMenu(IWebView*, OLE_HANDLE, LPPOINT) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE measureCustomMenuItem(IWebView*, void*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE drawCustomMenuItem(IWebView*, void*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE addCustomMenuDrawingData(IWebView*, OLE_HANDLE) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE cleanUpCustomMenuDrawingData(IWebView*, OLE_HANDLE) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE canTakeFocus(IWebView*, BOOL, BOOL*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE takeFocus(IWebView*, BOOL) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE registerUndoWithTarget(IWebUndoTarget*, BSTR, IUnknown*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE removeAllActionsWithTarget(IWebUndoTarget*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE setActionTitle(BSTR) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE undo() { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE redo() { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE canUndo(BOOL*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE canRedo(BOOL*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE printFrame(IWebView*, IWebFrame *) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE ftpDirectoryTemplatePath(IWebView*, BSTR*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE webViewHeaderHeight(IWebView*, float*);
+ virtual HRESULT STDMETHODCALLTYPE webViewFooterHeight(IWebView*, float*);
+ virtual HRESULT STDMETHODCALLTYPE drawHeaderInRect(IWebView*, RECT*, OLE_HANDLE);
+ virtual HRESULT STDMETHODCALLTYPE drawFooterInRect(IWebView*, RECT*, OLE_HANDLE, UINT, UINT);
+ virtual HRESULT STDMETHODCALLTYPE webViewPrintingMarginRect(IWebView*, RECT*);
+ virtual HRESULT STDMETHODCALLTYPE canRunModal(IWebView*, BOOL*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE createModalDialog(IWebView*, IWebURLRequest*, IWebView**) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE runModal(IWebView*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE isMenuBarVisible(IWebView*, BOOL*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE setMenuBarVisible(IWebView*, BOOL) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE runDatabaseSizeLimitPrompt(IWebView*, BSTR, IWebFrame*, BOOL*) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE paintCustomScrollbar(IWebView*, HDC, RECT, WebScrollBarControlSize, WebScrollbarControlState, WebScrollbarControlPart, BOOL, float, float, WebScrollbarControlPartMask) { return E_NOTIMPL; }
+ virtual HRESULT STDMETHODCALLTYPE paintCustomScrollCorner(IWebView*, HDC, RECT) { return E_NOTIMPL; }
+
+private:
+ int m_refCount;
+};
+
+#endif
diff --git a/WebKitTools/WinLauncher/WinLauncher.cpp b/WebKitTools/WinLauncher/WinLauncher.cpp
index 2dda619..08b7ed9 100644
--- a/WebKitTools/WinLauncher/WinLauncher.cpp
+++ b/WebKitTools/WinLauncher/WinLauncher.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2009 Brent Fulgha. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,10 +29,13 @@
#include <WebKit/WebKitCOMAPI.h>
#include <commctrl.h>
+#include <commdlg.h>
#include <objbase.h>
#include <shlwapi.h>
#include <wininet.h>
+#include "PrintWebUIDelegate.h"
+
#define MAX_LOADSTRING 100
#define URLBAR_HEIGHT 24
@@ -43,6 +47,7 @@ long DefEditProc;
IWebView* gWebView = 0;
HWND gViewWindow = 0;
WinLauncherWebHost* gWebHost = 0;
+PrintWebUIDelegate* gPrintDelegate = 0;
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name
@@ -187,6 +192,12 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
if (FAILED(hr))
goto exit;
+ gPrintDelegate = new PrintWebUIDelegate;
+ gPrintDelegate->AddRef();
+ hr = gWebView->setUIDelegate(gPrintDelegate);
+ if (FAILED (hr))
+ goto exit;
+
hr = gWebView->setHostWindow((OLE_HANDLE) hMainWnd);
if (FAILED(hr))
goto exit;
@@ -232,6 +243,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
}
exit:
+ gPrintDelegate->Release();
gWebView->Release();
shutDownWebKit();
#ifdef _CRTDBG_MAP_ALLOC
@@ -281,6 +293,86 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
return TRUE;
}
+static BOOL CALLBACK AbortProc(HDC hDC, int Error)
+{
+ MSG msg;
+ while (::PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) {
+ ::TranslateMessage(&msg);
+ ::DispatchMessage(&msg);
+ }
+
+ return TRUE;
+}
+
+static HDC getPrinterDC()
+{
+ PRINTDLG pdlg;
+ memset(&pdlg, 0, sizeof(PRINTDLG));
+ pdlg.lStructSize = sizeof(PRINTDLG);
+ pdlg.Flags = PD_PRINTSETUP | PD_RETURNDC;
+
+ ::PrintDlg(&pdlg);
+
+ return pdlg.hDC;
+}
+
+static void initDocStruct(DOCINFO* di, TCHAR* docname)
+{
+ memset(di, 0, sizeof(DOCINFO));
+ di->cbSize = sizeof(DOCINFO);
+ di->lpszDocName = docname;
+}
+
+void PrintView(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ HDC printDC = getPrinterDC();
+ if (!printDC) {
+ ::MessageBox(0, _T("Error creating printing DC"), _T("Error"), MB_APPLMODAL | MB_OK);
+ return;
+ }
+
+ if (::SetAbortProc(printDC, AbortProc) == SP_ERROR) {
+ ::MessageBox(0, _T("Error setting up AbortProc"), _T("Error"), MB_APPLMODAL | MB_OK);
+ return;
+ }
+
+ IWebFrame* frame = 0;
+ if (FAILED(gWebView->mainFrame(&frame)))
+ goto exit;
+
+ IWebFramePrivate* framePrivate = 0;
+ if (FAILED(frame->QueryInterface(&framePrivate)))
+ goto exit;
+
+ framePrivate->setInPrintingMode(TRUE, printDC);
+
+ UINT pageCount = 0;
+ framePrivate->getPrintedPageCount(printDC, &pageCount);
+
+ DOCINFO di;
+ initDocStruct(&di, _T("WebKit Doc"));
+ ::StartDoc(printDC, &di);
+
+ // FIXME: Need CoreGraphics implementation
+ void* graphicsContext = 0;
+ for (size_t page = 1; page <= pageCount; ++page) {
+ ::StartPage(printDC);
+ framePrivate->spoolPages(printDC, page, page, graphicsContext);
+ ::EndPage(printDC);
+ }
+
+ framePrivate->setInPrintingMode(FALSE, printDC);
+
+ ::EndDoc(printDC);
+ ::DeleteDC(printDC);
+
+exit:
+ if (frame)
+ frame->Release();
+ if (framePrivate)
+ framePrivate->Release();
+}
+
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId, wmEvent;
@@ -299,6 +391,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case IDM_EXIT:
DestroyWindow(hWnd);
break;
+ case IDM_PRINT:
+ PrintView(hWnd, message, wParam, lParam);
+ break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
diff --git a/WebKitTools/WinLauncher/WinLauncher.h b/WebKitTools/WinLauncher/WinLauncher.h
index 03e9dd5..adc2b17 100644
--- a/WebKitTools/WinLauncher/WinLauncher.h
+++ b/WebKitTools/WinLauncher/WinLauncher.h
@@ -1,115 +1,115 @@
-/*
- * Copyright (C) 2006 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.
- */
-
-#pragma once
-
-#include "resource.h"
-#include <WebKit/WebKit.h>
-
-class WinLauncherWebHost : public IWebFrameLoadDelegate
-{
-public:
- WinLauncherWebHost() : m_refCount(1) {}
-
- // IUnknown
- virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
- virtual ULONG STDMETHODCALLTYPE AddRef(void);
- virtual ULONG STDMETHODCALLTYPE Release(void);
-
- // IWebFrameLoadDelegate
- virtual HRESULT STDMETHODCALLTYPE didStartProvisionalLoadForFrame(
- /* [in] */ IWebView* webView,
- /* [in] */ IWebFrame* /*frame*/) { return S_OK; }
-
- virtual HRESULT STDMETHODCALLTYPE didReceiveServerRedirectForProvisionalLoadForFrame(
- /* [in] */ IWebView *webView,
- /* [in] */ IWebFrame *frame) { return S_OK; }
-
- virtual HRESULT STDMETHODCALLTYPE didFailProvisionalLoadWithError(
- /* [in] */ IWebView *webView,
- /* [in] */ IWebError *error,
- /* [in] */ IWebFrame *frame) { return S_OK; }
-
- virtual HRESULT STDMETHODCALLTYPE didCommitLoadForFrame(
- /* [in] */ IWebView *webView,
- /* [in] */ IWebFrame *frame) { return updateAddressBar(webView); }
-
- virtual HRESULT STDMETHODCALLTYPE didReceiveTitle(
- /* [in] */ IWebView *webView,
- /* [in] */ BSTR title,
- /* [in] */ IWebFrame *frame) { return S_OK; }
-
- virtual HRESULT STDMETHODCALLTYPE didReceiveIcon(
- /* [in] */ IWebView *webView,
- /* [in] */ OLE_HANDLE hBitmap,
- /* [in] */ IWebFrame *frame) { return S_OK; }
-
- virtual HRESULT STDMETHODCALLTYPE didFinishLoadForFrame(
- /* [in] */ IWebView* webView,
- /* [in] */ IWebFrame* /*frame*/) { return S_OK; }
-
- virtual HRESULT STDMETHODCALLTYPE didFailLoadWithError(
- /* [in] */ IWebView *webView,
- /* [in] */ IWebError *error,
- /* [in] */ IWebFrame *forFrame) { return S_OK; }
-
- virtual HRESULT STDMETHODCALLTYPE didChangeLocationWithinPageForFrame(
- /* [in] */ IWebView *webView,
- /* [in] */ IWebFrame *frame) { return S_OK; }
-
- virtual HRESULT STDMETHODCALLTYPE willPerformClientRedirectToURL(
- /* [in] */ IWebView *webView,
- /* [in] */ BSTR url,
- /* [in] */ double delaySeconds,
- /* [in] */ DATE fireDate,
- /* [in] */ IWebFrame *frame) { return S_OK; }
-
- virtual HRESULT STDMETHODCALLTYPE didCancelClientRedirectForFrame(
- /* [in] */ IWebView *webView,
- /* [in] */ IWebFrame *frame) { return S_OK; }
-
- virtual HRESULT STDMETHODCALLTYPE willCloseFrame(
- /* [in] */ IWebView *webView,
- /* [in] */ IWebFrame *frame) { return S_OK; }
-
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE windowScriptObjectAvailable(
- /* [in] */ IWebView *webView,
- /* [in] */ JSContextRef context,
- /* [in] */ JSObjectRef windowScriptObject) { return S_OK; }
-
+/*
+ * Copyright (C) 2006 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.
+ */
+
+#pragma once
+
+#include "resource.h"
+#include <WebKit/WebKit.h>
+
+class WinLauncherWebHost : public IWebFrameLoadDelegate
+{
+public:
+ WinLauncherWebHost() : m_refCount(1) {}
+
+ // IUnknown
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef(void);
+ virtual ULONG STDMETHODCALLTYPE Release(void);
+
+ // IWebFrameLoadDelegate
+ virtual HRESULT STDMETHODCALLTYPE didStartProvisionalLoadForFrame(
+ /* [in] */ IWebView* webView,
+ /* [in] */ IWebFrame* /*frame*/) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE didReceiveServerRedirectForProvisionalLoadForFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE didFailProvisionalLoadWithError(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebError *error,
+ /* [in] */ IWebFrame *frame) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE didCommitLoadForFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame) { return updateAddressBar(webView); }
+
+ virtual HRESULT STDMETHODCALLTYPE didReceiveTitle(
+ /* [in] */ IWebView *webView,
+ /* [in] */ BSTR title,
+ /* [in] */ IWebFrame *frame) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE didReceiveIcon(
+ /* [in] */ IWebView *webView,
+ /* [in] */ OLE_HANDLE hBitmap,
+ /* [in] */ IWebFrame *frame) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE didFinishLoadForFrame(
+ /* [in] */ IWebView* webView,
+ /* [in] */ IWebFrame* /*frame*/) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE didFailLoadWithError(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebError *error,
+ /* [in] */ IWebFrame *forFrame) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE didChangeLocationWithinPageForFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE willPerformClientRedirectToURL(
+ /* [in] */ IWebView *webView,
+ /* [in] */ BSTR url,
+ /* [in] */ double delaySeconds,
+ /* [in] */ DATE fireDate,
+ /* [in] */ IWebFrame *frame) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE didCancelClientRedirectForFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE willCloseFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame) { return S_OK; }
+
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE windowScriptObjectAvailable(
+ /* [in] */ IWebView *webView,
+ /* [in] */ JSContextRef context,
+ /* [in] */ JSObjectRef windowScriptObject) { return S_OK; }
+
virtual /* [local] */ HRESULT STDMETHODCALLTYPE didClearWindowObject(
/* [in] */ IWebView *webView,
/* [in] */ JSContextRef context,
/* [in] */ JSObjectRef windowScriptObject,
/* [in] */ IWebFrame *frame) { return S_OK; }
-
- // WinLauncherWebHost
-
-protected:
- HRESULT updateAddressBar(IWebView* webView);
-
-protected:
- ULONG m_refCount;
-};
+
+ // WinLauncherWebHost
+
+protected:
+ HRESULT updateAddressBar(IWebView* webView);
+
+protected:
+ ULONG m_refCount;
+};
diff --git a/WebKitTools/WinLauncher/WinLauncher.rc b/WebKitTools/WinLauncher/WinLauncher.rc
index f4b2cd4..172ed4a 100644
--- a/WebKitTools/WinLauncher/WinLauncher.rc
+++ b/WebKitTools/WinLauncher/WinLauncher.rc
@@ -42,6 +42,7 @@ IDC_WINLAUNCHER MENU
BEGIN
POPUP "&File"
BEGIN
+ MENUITEM "&Print\tCtrl-P", IDM_PRINT
MENUITEM "E&xit", IDM_EXIT
END
POPUP "&Help"
@@ -74,8 +75,8 @@ CAPTION "About"
FONT 8, "System", 0, 0, 0x0
BEGIN
ICON IDI_WINLAUNCHER,IDC_MYICON,14,9,20,20
- LTEXT "WinLauncher Version 1.1",IDC_STATIC,49,10,119,8,SS_NOPREFIX
- LTEXT "Copyright (C) 2008",IDC_STATIC,49,20,119,8
+ LTEXT "WinLauncher Version 1.2",IDC_STATIC,49,10,119,8,SS_NOPREFIX
+ LTEXT "Copyright (C) 2009",IDC_STATIC,49,20,119,8
DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP
END
diff --git a/WebKitTools/WinLauncher/WinLauncher.vcproj b/WebKitTools/WinLauncher/WinLauncher.vcproj
index 9b7c42c..4546865 100644
--- a/WebKitTools/WinLauncher/WinLauncher.vcproj
+++ b/WebKitTools/WinLauncher/WinLauncher.vcproj
@@ -409,6 +409,10 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
+ RelativePath=".\PrintWebUIDelegate.cpp"
+ >
+ </File>
+ <File
RelativePath=".\stdafx.cpp"
>
<FileConfiguration
@@ -463,6 +467,10 @@
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
+ RelativePath=".\PrintWebUIDelegate.h"
+ >
+ </File>
+ <File
RelativePath=".\Resource.h"
>
</File>
diff --git a/WebKitTools/WinLauncher/resource.h b/WebKitTools/WinLauncher/resource.h
index 6a21684..c98fac7 100644
--- a/WebKitTools/WinLauncher/resource.h
+++ b/WebKitTools/WinLauncher/resource.h
@@ -8,6 +8,7 @@
#define IDD_ABOUTBOX 103
#define IDM_ABOUT 104
#define IDM_EXIT 105
+#define IDM_PRINT 106
#define IDI_WINLAUNCHER 107
#define IDI_SMALL 108
#define IDC_WINLAUNCHER 109
diff --git a/WebKitTools/iExploder/htdocs/cssproperties.in b/WebKitTools/iExploder/htdocs/cssproperties.in
index 8c7a98c..52ccdbe 100644
--- a/WebKitTools/iExploder/htdocs/cssproperties.in
+++ b/WebKitTools/iExploder/htdocs/cssproperties.in
@@ -1,10 +1,11 @@
-# From WebKit svn r44659 (WebCore/css/CSSPropertyNames.in)
+# From WebKit svn r53119 (WebCore/css/CSSPropertyNames.in)
-webkit-animation
-webkit-animation-delay
-webkit-animation-direction
-webkit-animation-duration
-webkit-animation-iteration-count
-webkit-animation-name
+-webkit-animation-play-state
-webkit-animation-timing-function
-webkit-appearance
-webkit-backface-visibility
@@ -13,14 +14,10 @@
-webkit-background-origin
-webkit-background-size
-webkit-binding
--webkit-border-bottom-left-radius
--webkit-border-bottom-right-radius
-webkit-border-fit
-webkit-border-horizontal-spacing
-webkit-border-image
-webkit-border-radius
--webkit-border-top-left-radius
--webkit-border-top-right-radius
-webkit-border-vertical-spacing
-webkit-box-align
-webkit-box-direction
@@ -33,6 +30,7 @@
-webkit-box-reflect
-webkit-box-shadow
-webkit-box-sizing
+-webkit-color-correction
-webkit-column-break-after
-webkit-column-break-before
-webkit-column-break-inside
@@ -45,6 +43,7 @@
-webkit-column-width
-webkit-columns
-webkit-font-size-delta
+-webkit-font-smoothing
-webkit-highlight
-webkit-line-break
-webkit-line-clamp
@@ -69,6 +68,8 @@
-webkit-mask-position-x
-webkit-mask-position-y
-webkit-mask-repeat
+-webkit-mask-repeat-x
+-webkit-mask-repeat-y
-webkit-mask-size
-webkit-match-nearest-mail-blockquote-color
-webkit-nbsp-mode
@@ -102,15 +103,22 @@
-webkit-variable-declaration-block
background
background-attachment
+background-clip
background-color
background-image
+background-origin
background-position
background-position-x
background-position-y
background-repeat
+background-repeat-x
+background-repeat-y
+background-size
border
border-bottom
border-bottom-color
+border-bottom-left-radius
+border-bottom-right-radius
border-bottom-style
border-bottom-width
border-collapse
@@ -119,6 +127,7 @@ border-left
border-left-color
border-left-style
border-left-width
+border-radius
border-right
border-right-color
border-right-style
@@ -127,6 +136,8 @@ border-spacing
border-style
border-top
border-top-color
+border-top-left-radius
+border-top-right-radius
border-top-style
border-top-width
border-width
@@ -208,6 +219,7 @@ text-overline-color
text-overline-mode
text-overline-style
text-overline-width
+text-rendering
text-shadow
text-transform
text-underline
@@ -248,6 +260,22 @@ column-span
column-width
column-width-policy
+# Removed from WebKit between r44660 and r53119
+-webkit-border-bottom-left-radius
+-webkit-border-bottom-right-radius
+-webkit-border-top-left-radius
+-webkit-border-top-right-radius
+
+# Removed from WebKit between r24523 and r44660
+-webkit-dashboard-region
+scrollbar-3dlight-color
+scrollbar-arrow-color
+scrollbar-darkshadow-color
+scrollbar-face-color
+scrollbar-highlight-color
+scrollbar-shadow-color
+scrollbar-track-color
+
# All of the following are from khtml's cssproperties.in as of 19oct2004, but are no longer in WebKit
-khtml-border-horizontal-spacing
-khtml-border-vertical-spacing
diff --git a/WebKitTools/iExploder/htdocs/htmlattrs.in b/WebKitTools/iExploder/htdocs/htmlattrs.in
index ad92384..2238427 100644
--- a/WebKitTools/iExploder/htdocs/htmlattrs.in
+++ b/WebKitTools/iExploder/htdocs/htmlattrs.in
@@ -1,5 +1,4 @@
-# the following come from WebCore 2006-04-15 (WebKit/WebCore/html/HTMLNames.h)
-
+# From WebKit svn r53119 (WebCore/html/HTMLAttributeNames.in)
abbr
accept
accept_charset
@@ -9,7 +8,39 @@ align
alink
alt
archive
+aria-activedescendant
+aria-atomic
+aria-busy
+aria-checked
+aria-controls
+aria-describedby
+aria-disabled
+aria-dropeffect
+aria-expanded
+aria-flowto
+aria-grabbed
+aria-hidden
+aria-label
+aria-labeledby
+aria-labelledby
+aria-level
+aria-live
+aria-multiselectable
+aria-orientation
+aria-owns
+aria-pressed
+aria-readonly
+aria-relevant
+aria-required
+aria-selected
+aria-valuemax
+aria-valuemin
+aria-valuenow
+aria-valuetext
+autobuffer
autocomplete
+autofocus
+autoplay
autosave
axis
background
@@ -40,6 +71,7 @@ compact
composite
content
contenteditable
+controls
coords
data
datetime
@@ -48,9 +80,14 @@ defer
dir
direction
disabled
+draggable
enctype
+end
+expanded
face
+focused
for
+formnovalidate
frame
frameborder
headers
@@ -62,16 +99,21 @@ hspace
http_equiv
id
incremental
+indeterminate
ismap
keytype
label
lang
language
-left
leftmargin
link
+list
longdesc
loop
+loopend
+loopstart
+lowsrc
+manifest
marginheight
marginwidth
max
@@ -85,14 +127,18 @@ name
nohref
noresize
noshade
+novalidate
nowrap
object
onabort
onbeforecopy
onbeforecut
+onbeforeload
onbeforepaste
onbeforeunload
onblur
+oncanplay
+oncanplaythrough
onchange
onclick
oncontextmenu
@@ -106,45 +152,84 @@ ondragleave
ondragover
ondragstart
ondrop
+ondurationchange
+onemptied
+onended
onerror
onfocus
+onhashchange
oninput
+oninvalid
onkeydown
onkeypress
onkeyup
onload
+onloadeddata
+onloadedmetadata
+onloadstart
onmousedown
onmousemove
onmouseout
onmouseover
onmouseup
onmousewheel
+onoffline
+ononline
+onorientationchange
+onpagehide
+onpageshow
onpaste
+onpause
+onplay
+onplaying
+onpopstate
+onprogress
+onratechange
onreset
onresize
onscroll
onsearch
+onseeked
+onseeking
onselect
onselectstart
+onstalled
+onstorage
onsubmit
+onsuspend
+ontimeupdate
+ontouchend
+ontouchmove
+ontouchstart
onunload
-pagex
-pagey
+onvolumechange
+onwaiting
+onwebkitanimationend
+onwebkitanimationiteration
+onwebkitanimationstart
+onwebkitbeginfullscreen
+onwebkitendfullscreen
+onwebkittransitionend
+pattern
placeholder
-plain
-pluginpage
-pluginspage
+playcount
pluginurl
+poster
precision
+primary
profile
+progress
prompt
readonly
rel
+required
results
rev
+role
rows
rowspan
rules
+sandbox
scheme
scope
scrollamount
@@ -153,10 +238,14 @@ scrolling
selected
shape
size
+sortable
+sortdirection
span
+spellcheck
src
standby
start
+step
style
summary
tabindex
@@ -173,11 +262,20 @@ valign
value
valuetype
version
+viewsource
vlink
vspace
width
wrap
+# Removed from WebKit between r14011 and r53119
+left
+pagex
+pagey
+plain
+pluginpage
+pluginspage
+
# was in khtml in 2004, but is no longer in WebCore
accept-charset
html
diff --git a/WebKitTools/iExploder/htdocs/htmltags.in b/WebKitTools/iExploder/htdocs/htmltags.in
index acac8f3..b47dd9c 100644
--- a/WebKitTools/iExploder/htdocs/htmltags.in
+++ b/WebKitTools/iExploder/htdocs/htmltags.in
@@ -1,12 +1,13 @@
-# The following come from khtml's htmltags.in from 19oct2004
-# From WebCore svn tree, 2006-04-18 (WebKit/WebCore/html/HTMLNames.h)
-
+# From WebKit svn r53119 (WebCore/html/HTMLTagNames.in)
a
abbr
acronym
address
applet
area
+article
+aside
+audio
b
base
basefont
@@ -23,17 +24,23 @@ cite
code
col
colgroup
+datagrid
+datalist
+dcell
+dcol
dd
del
dfn
dir
div
dl
+drow
dt
em
embed
fieldset
font
+footer
form
frame
frameset
@@ -44,6 +51,7 @@ h4
h5
h6
head
+header
hr
html
i
@@ -65,11 +73,13 @@ map
marquee
menu
meta
+nav
nobr
noembed
noframes
nolayer
noscript
+noscript
object
ol
optgroup
@@ -79,11 +89,16 @@ param
plaintext
pre
q
+rp
+rt
+ruby
s
samp
script
+section
select
small
+source
span
strike
strong
@@ -103,6 +118,7 @@ tt
u
ul
var
+video
wbr
xmp
diff --git a/WebKitTools/pywebsocket/mod_pywebsocket/dispatch.py b/WebKitTools/pywebsocket/mod_pywebsocket/dispatch.py
index bf9a856..c52e9eb 100644
--- a/WebKitTools/pywebsocket/mod_pywebsocket/dispatch.py
+++ b/WebKitTools/pywebsocket/mod_pywebsocket/dispatch.py
@@ -142,6 +142,23 @@ class Dispatcher(object):
'root_dir:%s.' % (scan_dir, root_dir))
self._source_files_in_dir(root_dir, scan_dir)
+ def add_resource_path_alias(self,
+ alias_resource_path, existing_resource_path):
+ """Add resource path alias.
+
+ Once added, request to alias_resource_path would be handled by
+ handler registered for existing_resource_path.
+
+ Args:
+ alias_resource_path: alias resource path
+ existing_resource_path: existing resource path
+ """
+ try:
+ handler = self._handlers[existing_resource_path]
+ self._handlers[alias_resource_path] = handler
+ except KeyError:
+ raise DispatchError('No handler for: %r' % existing_resource_path)
+
def source_warnings(self):
"""Return warnings in sourcing handlers."""
diff --git a/WebKitTools/pywebsocket/mod_pywebsocket/handshake.py b/WebKitTools/pywebsocket/mod_pywebsocket/handshake.py
index a67aadd..b86278e 100644
--- a/WebKitTools/pywebsocket/mod_pywebsocket/handshake.py
+++ b/WebKitTools/pywebsocket/mod_pywebsocket/handshake.py
@@ -39,14 +39,14 @@ not suitable because they don't allow direct raw bytes writing/reading.
import re
+import util
+
_DEFAULT_WEB_SOCKET_PORT = 80
_DEFAULT_WEB_SOCKET_SECURE_PORT = 443
_WEB_SOCKET_SCHEME = 'ws'
_WEB_SOCKET_SECURE_SCHEME = 'wss'
-_METHOD_LINE = re.compile(r'^GET ([^ ]+) HTTP/1.1\r\n$')
-
_MANDATORY_HEADERS = [
# key, expected value or None
['Upgrade', 'WebSocket'],
@@ -55,6 +55,22 @@ _MANDATORY_HEADERS = [
['Origin', None],
]
+_FIRST_FIVE_LINES = map(re.compile, [
+ r'^GET /[\S]* HTTP/1.1\r\n$',
+ r'^Upgrade: WebSocket\r\n$',
+ r'^Connection: Upgrade\r\n$',
+ r'^Host: [\S]+\r\n$',
+ r'^Origin: [\S]+\r\n$',
+])
+
+_SIXTH_AND_LATER = re.compile(
+ r'^'
+ r'(WebSocket-Protocol: [\x20-\x7e]+\r\n)?'
+ r'(Cookie: [^\r]*\r\n)*'
+ r'(Cookie2: [^\r]*\r\n)?'
+ r'(Cookie: [^\r]*\r\n)*'
+ r'\r\n')
+
def _default_port(is_secure):
if is_secure:
@@ -75,19 +91,22 @@ def _validate_protocol(protocol):
if not protocol:
raise HandshakeError('Invalid WebSocket-Protocol: empty')
for c in protocol:
- if not 0x21 <= ord(c) <= 0x7e:
+ if not 0x20 <= ord(c) <= 0x7e:
raise HandshakeError('Illegal character in protocol: %r' % c)
class Handshaker(object):
"""This class performs Web Socket handshake."""
- def __init__(self, request, dispatcher):
+ def __init__(self, request, dispatcher, strict=False):
"""Construct an instance.
Args:
request: mod_python request.
dispatcher: Dispatcher (dispatch.Dispatcher).
+ strict: Strictly check handshake request. Default: False.
+ If True, request.connection must provide get_memorized_lines
+ method.
Handshaker will add attributes such as ws_resource in performing
handshake.
@@ -95,6 +114,7 @@ class Handshaker(object):
self._request = request
self._dispatcher = dispatcher
+ self._strict = strict
def do_handshake(self):
"""Perform Web Socket Handshake."""
@@ -173,6 +193,28 @@ class Handshaker(object):
if actual_value != expected_value:
raise HandshakeError('Illegal value for header %s: %s' %
(key, actual_value))
+ if self._strict:
+ try:
+ lines = self._request.connection.get_memorized_lines()
+ except AttributeError, e:
+ util.prepend_message_to_exception(
+ 'Strict handshake is specified but the connection '
+ 'doesn\'t provide get_memorized_lines()', e)
+ raise
+ self._check_first_lines(lines)
+
+ def _check_first_lines(self, lines):
+ if len(lines) < len(_FIRST_FIVE_LINES):
+ raise HandshakeError('Too few header lines: %d' % len(lines))
+ for line, regexp in zip(lines, _FIRST_FIVE_LINES):
+ if not regexp.search(line):
+ raise HandshakeError('Unexpected header: %r doesn\'t match %r'
+ % (line, regexp.pattern))
+ sixth_and_later = ''.join(lines[5:])
+ if not _SIXTH_AND_LATER.search(sixth_and_later):
+ raise HandshakeError('Unexpected header: %r doesn\'t match %r'
+ % (sixth_and_later,
+ _SIXTH_AND_LATER.pattern))
# vi:sts=4 sw=4 et
diff --git a/WebKitTools/pywebsocket/mod_pywebsocket/memorizingfile.py b/WebKitTools/pywebsocket/mod_pywebsocket/memorizingfile.py
new file mode 100644
index 0000000..2f8a54e
--- /dev/null
+++ b/WebKitTools/pywebsocket/mod_pywebsocket/memorizingfile.py
@@ -0,0 +1,81 @@
+#!/usr/bin/env python
+#
+# Copyright 2009, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+"""Memorizing file.
+
+A memorizing file wraps a file and memorizes lines read by readline.
+"""
+
+
+import sys
+
+
+class MemorizingFile(object):
+ """MemorizingFile wraps a file and memorizes lines read by readline.
+
+ Note that data read by other methods are not memorized. This behavior
+ is good enough for memorizing lines SimpleHTTPServer reads before
+ the control reaches WebSocketRequestHandler.
+ """
+ def __init__(self, file_, max_memorized_lines=sys.maxint):
+ """Construct an instance.
+
+ Args:
+ file_: the file object to wrap.
+ max_memorized_lines: the maximum number of lines to memorize.
+ Only the first max_memorized_lines are memorized.
+ Default: sys.maxint.
+ """
+ self._file = file_
+ self._memorized_lines = []
+ self._max_memorized_lines = max_memorized_lines
+
+ def __getattribute__(self, name):
+ if name in ('_file', '_memorized_lines', '_max_memorized_lines',
+ 'readline', 'get_memorized_lines'):
+ return object.__getattribute__(self, name)
+ return self._file.__getattribute__(name)
+
+ def readline(self):
+ """Override file.readline and memorize the line read."""
+
+ line = self._file.readline()
+ if line and len(self._memorized_lines) < self._max_memorized_lines:
+ self._memorized_lines.append(line)
+ return line
+
+ def get_memorized_lines(self):
+ """Get lines memorized so far."""
+ return self._memorized_lines
+
+
+# vi:sts=4 sw=4 et
diff --git a/WebKitTools/pywebsocket/mod_pywebsocket/standalone.py b/WebKitTools/pywebsocket/mod_pywebsocket/standalone.py
index 6217585..0e6a349 100644
--- a/WebKitTools/pywebsocket/mod_pywebsocket/standalone.py
+++ b/WebKitTools/pywebsocket/mod_pywebsocket/standalone.py
@@ -38,6 +38,7 @@ Usage:
python standalone.py [-p <ws_port>] [-w <websock_handlers>]
[-s <scan_dir>]
[-d <document_root>]
+ [-m <websock_handlers_map_file>]
... for other options, see _main below ...
<ws_port> is the port number to use for ws:// connection.
@@ -63,6 +64,7 @@ import logging
import logging.handlers
import optparse
import os
+import re
import socket
import sys
@@ -75,6 +77,7 @@ except ImportError:
import dispatch
import handshake
+import memorizingfile
import util
@@ -88,6 +91,10 @@ _LOG_LEVELS = {
_DEFAULT_LOG_MAX_BYTES = 1024 * 256
_DEFAULT_LOG_BACKUP_COUNT = 5
+_DEFAULT_REQUEST_QUEUE_SIZE = 128
+
+# 1024 is practically large enough to contain WebSocket handshake lines.
+_MAX_MEMORIZED_LINES = 1024
def _print_warnings_if_any(dispatcher):
warnings = dispatcher.source_warnings()
@@ -129,6 +136,10 @@ class _StandaloneConnection(object):
"""Mimic mp_conn.read()."""
return self._request_handler.rfile.read(length)
+ def get_memorized_lines(self):
+ """Get memorized lines."""
+ return self._request_handler.rfile.get_memorized_lines()
+
class _StandaloneRequest(object):
"""Mimic mod_python request."""
@@ -198,7 +209,9 @@ class WebSocketRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
"""Override SocketServer.StreamRequestHandler.setup."""
self.connection = self.request
- self.rfile = socket._fileobject(self.request, 'rb', self.rbufsize)
+ self.rfile = memorizingfile.MemorizingFile(
+ socket._fileobject(self.request, 'rb', self.rbufsize),
+ max_memorized_lines=_MAX_MEMORIZED_LINES)
self.wfile = socket._fileobject(self.request, 'wb', self.wbufsize)
def __init__(self, *args, **keywords):
@@ -206,8 +219,9 @@ class WebSocketRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
self, WebSocketRequestHandler.options.use_tls)
self._dispatcher = WebSocketRequestHandler.options.dispatcher
self._print_warnings_if_any()
- self._handshaker = handshake.Handshaker(self._request,
- self._dispatcher)
+ self._handshaker = handshake.Handshaker(
+ self._request, self._dispatcher,
+ WebSocketRequestHandler.options.strict)
SimpleHTTPServer.SimpleHTTPRequestHandler.__init__(
self, *args, **keywords)
@@ -268,6 +282,31 @@ def _configure_logging(options):
handler.setFormatter(formatter)
logger.addHandler(handler)
+def _alias_handlers(dispatcher, websock_handlers_map_file):
+ """Set aliases specified in websock_handler_map_file in dispatcher.
+
+ Args:
+ dispatcher: dispatch.Dispatcher instance
+ websock_handler_map_file: alias map file
+ """
+ fp = open(websock_handlers_map_file)
+ try:
+ for line in fp:
+ if line[0] == '#' or line.isspace():
+ continue
+ m = re.match('(\S+)\s+(\S+)', line)
+ if not m:
+ logging.warning('Wrong format in map file:' + line)
+ continue
+ try:
+ dispatcher.add_resource_path_alias(
+ m.group(1), m.group(2))
+ except dispatch.DispatchError, e:
+ logging.error(str(e))
+ finally:
+ fp.close()
+
+
def _main():
parser = optparse.OptionParser()
@@ -277,6 +316,12 @@ def _main():
parser.add_option('-w', '--websock_handlers', dest='websock_handlers',
default='.',
help='Web Socket handlers root directory.')
+ parser.add_option('-m', '--websock_handlers_map_file',
+ dest='websock_handlers_map_file',
+ default=None,
+ help=('Web Socket handlers map file. '
+ 'Each line consists of alias_resource_path and '
+ 'existing_resource_path, separated by spaces.'))
parser.add_option('-s', '--scan_dir', dest='scan_dir',
default=None,
help=('Web Socket handlers scan directory. '
@@ -302,12 +347,19 @@ def _main():
parser.add_option('--log_count', dest='log_count', type='int',
default=_DEFAULT_LOG_BACKUP_COUNT,
help='Log backup count')
+ parser.add_option('--strict', dest='strict', action='store_true',
+ default=False, help='Strictly check handshake request')
+ parser.add_option('-q', '--queue', dest='request_queue_size', type='int',
+ default=_DEFAULT_REQUEST_QUEUE_SIZE,
+ help='request queue size')
options = parser.parse_args()[0]
os.chdir(options.document_root)
_configure_logging(options)
+ SocketServer.TCPServer.request_queue_size = options.request_queue_size
+
if options.use_tls:
if not _HAS_OPEN_SSL:
logging.critical('To use TLS, install pyOpenSSL.')
@@ -325,6 +377,9 @@ def _main():
# instantiation. Dispatcher can be shared because it is thread-safe.
options.dispatcher = dispatch.Dispatcher(options.websock_handlers,
options.scan_dir)
+ if options.websock_handlers_map_file:
+ _alias_handlers(options.dispatcher,
+ options.websock_handlers_map_file)
_print_warnings_if_any(options.dispatcher)
WebSocketRequestHandler.options = options
diff --git a/WebKitTools/pywebsocket/setup.py b/WebKitTools/pywebsocket/setup.py
index df05fef..a49c943 100644
--- a/WebKitTools/pywebsocket/setup.py
+++ b/WebKitTools/pywebsocket/setup.py
@@ -56,7 +56,7 @@ setup(author='Yuzo Fujishima',
name=_PACKAGE_NAME,
packages=[_PACKAGE_NAME],
url='http://code.google.com/p/pywebsocket/',
- version='0.4.3',
+ version='0.4.7.1',
)
diff --git a/WebKitTools/pywebsocket/test/test_dispatch.py b/WebKitTools/pywebsocket/test/test_dispatch.py
index b19d706..5403228 100644
--- a/WebKitTools/pywebsocket/test/test_dispatch.py
+++ b/WebKitTools/pywebsocket/test/test_dispatch.py
@@ -225,6 +225,17 @@ class DispatcherTest(unittest.TestCase):
self.assertRaises(dispatch.DispatchError,
dispatch.Dispatcher, 'a/b/c', 'a/b')
+ def test_resource_path_alias(self):
+ disp = dispatch.Dispatcher(_TEST_HANDLERS_DIR, None)
+ disp.add_resource_path_alias('/', '/origin_check')
+ self.assertEqual(4, len(disp._handlers))
+ self.failUnless(disp._handlers.has_key('/origin_check'))
+ self.failUnless(disp._handlers.has_key('/sub/exception_in_transfer'))
+ self.failUnless(disp._handlers.has_key('/sub/plain'))
+ self.failUnless(disp._handlers.has_key('/'))
+ self.assertRaises(dispatch.DispatchError,
+ disp.add_resource_path_alias, '/alias', '/not-exist')
+
if __name__ == '__main__':
unittest.main()
diff --git a/WebKitTools/pywebsocket/test/test_handshake.py b/WebKitTools/pywebsocket/test/test_handshake.py
index dd1f65c..8bf07be 100644
--- a/WebKitTools/pywebsocket/test/test_handshake.py
+++ b/WebKitTools/pywebsocket/test/test_handshake.py
@@ -214,11 +214,168 @@ _BAD_REQUESTS = (
'Connection':'Upgrade',
'Host':'example.com',
'Origin':'http://example.com',
- 'WebSocket-Protocol':'illegal protocol',
+ 'WebSocket-Protocol':'illegal\x09protocol',
}
),
)
+_STRICTLY_GOOD_REQUESTS = (
+ (
+ 'GET /demo HTTP/1.1\r\n',
+ 'Upgrade: WebSocket\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Host: example.com\r\n',
+ 'Origin: http://example.com\r\n',
+ '\r\n',
+ ),
+ ( # WebSocket-Protocol
+ 'GET /demo HTTP/1.1\r\n',
+ 'Upgrade: WebSocket\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Host: example.com\r\n',
+ 'Origin: http://example.com\r\n',
+ 'WebSocket-Protocol: sample\r\n',
+ '\r\n',
+ ),
+ ( # WebSocket-Protocol and Cookie
+ 'GET /demo HTTP/1.1\r\n',
+ 'Upgrade: WebSocket\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Host: example.com\r\n',
+ 'Origin: http://example.com\r\n',
+ 'WebSocket-Protocol: sample\r\n',
+ 'Cookie: xyz\r\n'
+ '\r\n',
+ ),
+ ( # Cookie
+ 'GET /demo HTTP/1.1\r\n',
+ 'Upgrade: WebSocket\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Host: example.com\r\n',
+ 'Origin: http://example.com\r\n',
+ 'Cookie: abc/xyz\r\n'
+ 'Cookie2: $Version=1\r\n'
+ 'Cookie: abc\r\n'
+ '\r\n',
+ ),
+ (
+ 'GET / HTTP/1.1\r\n',
+ 'Upgrade: WebSocket\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Host: example.com\r\n',
+ 'Origin: http://example.com\r\n',
+ '\r\n',
+ ),
+)
+
+_NOT_STRICTLY_GOOD_REQUESTS = (
+ ( # Extra space after GET
+ 'GET /demo HTTP/1.1\r\n',
+ 'Upgrade: WebSocket\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Host: example.com\r\n',
+ 'Origin: http://example.com\r\n',
+ '\r\n',
+ ),
+ ( # Resource name doesn't stat with '/'
+ 'GET demo HTTP/1.1\r\n',
+ 'Upgrade: WebSocket\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Host: example.com\r\n',
+ 'Origin: http://example.com\r\n',
+ '\r\n',
+ ),
+ ( # No space after :
+ 'GET /demo HTTP/1.1\r\n',
+ 'Upgrade:WebSocket\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Host: example.com\r\n',
+ 'Origin: http://example.com\r\n',
+ '\r\n',
+ ),
+ ( # Lower case Upgrade header
+ 'GET /demo HTTP/1.1\r\n',
+ 'upgrade: WebSocket\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Host: example.com\r\n',
+ 'Origin: http://example.com\r\n',
+ '\r\n',
+ ),
+ ( # Connection comes before Upgrade
+ 'GET /demo HTTP/1.1\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Upgrade: WebSocket\r\n',
+ 'Host: example.com\r\n',
+ 'Origin: http://example.com\r\n',
+ '\r\n',
+ ),
+ ( # Origin comes before Host
+ 'GET /demo HTTP/1.1\r\n',
+ 'Upgrade: WebSocket\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Origin: http://example.com\r\n',
+ 'Host: example.com\r\n',
+ '\r\n',
+ ),
+ ( # Host continued to the next line
+ 'GET /demo HTTP/1.1\r\n',
+ 'Upgrade: WebSocket\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Host: example\r\n',
+ ' .com\r\n',
+ 'Origin: http://example.com\r\n',
+ '\r\n',
+ ),
+ ( # Cookie comes before WebSocket-Protocol
+ 'GET /demo HTTP/1.1\r\n',
+ 'Upgrade: WebSocket\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Host: example.com\r\n',
+ 'Origin: http://example.com\r\n',
+ 'Cookie: xyz\r\n'
+ 'WebSocket-Protocol: sample\r\n',
+ '\r\n',
+ ),
+ ( # Unknown header
+ 'GET /demo HTTP/1.1\r\n',
+ 'Upgrade: WebSocket\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Host: example.com\r\n',
+ 'Origin: http://example.com\r\n',
+ 'Content-Type: text/html\r\n'
+ '\r\n',
+ ),
+ ( # Cookie with continuation lines
+ 'GET /demo HTTP/1.1\r\n',
+ 'Upgrade: WebSocket\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Host: example.com\r\n',
+ 'Origin: http://example.com\r\n',
+ 'Cookie: xyz\r\n',
+ ' abc\r\n',
+ ' defg\r\n',
+ '\r\n',
+ ),
+ ( # Wrong-case cookie
+ 'GET /demo HTTP/1.1\r\n',
+ 'Upgrade: WebSocket\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Host: example.com\r\n',
+ 'Origin: http://example.com\r\n',
+ 'cookie: abc/xyz\r\n'
+ '\r\n',
+ ),
+ ( # Cookie, no space after colon
+ 'GET /demo HTTP/1.1\r\n',
+ 'Upgrade: WebSocket\r\n',
+ 'Connection: Upgrade\r\n',
+ 'Host: example.com\r\n',
+ 'Origin: http://example.com\r\n',
+ 'Cookie:abc/xyz\r\n'
+ '\r\n',
+ ),
+)
+
def _create_request(request_def):
conn = mock.MockConn('')
@@ -229,13 +386,37 @@ def _create_request(request_def):
connection=conn)
+def _create_get_memorized_lines(lines):
+ def get_memorized_lines():
+ return lines
+ return get_memorized_lines
+
+
+def _create_requests_with_lines(request_lines_set):
+ requests = []
+ for lines in request_lines_set:
+ request = _create_request(_GOOD_REQUEST)
+ request.connection.get_memorized_lines = _create_get_memorized_lines(
+ lines)
+ requests.append(request)
+ return requests
+
+
class HandshakerTest(unittest.TestCase):
def test_validate_protocol(self):
handshake._validate_protocol('sample') # should succeed.
handshake._validate_protocol('Sample') # should succeed.
+ handshake._validate_protocol('sample\x20protocol') # should succeed.
+ handshake._validate_protocol('sample\x7eprotocol') # should succeed.
+ self.assertRaises(handshake.HandshakeError,
+ handshake._validate_protocol,
+ '')
self.assertRaises(handshake.HandshakeError,
handshake._validate_protocol,
- 'sample protocol')
+ 'sample\x19protocol')
+ self.assertRaises(handshake.HandshakeError,
+ handshake._validate_protocol,
+ 'sample\x7fprotocol')
self.assertRaises(handshake.HandshakeError,
handshake._validate_protocol,
# "Japan" in Japanese
@@ -308,6 +489,22 @@ class HandshakerTest(unittest.TestCase):
mock.MockDispatcher())
self.assertRaises(handshake.HandshakeError, handshaker.do_handshake)
+ def test_strictly_good_requests(self):
+ for request in _create_requests_with_lines(_STRICTLY_GOOD_REQUESTS):
+ strict_handshaker = handshake.Handshaker(request,
+ mock.MockDispatcher(),
+ True)
+ strict_handshaker.do_handshake()
+
+ def test_not_strictly_good_requests(self):
+ for request in _create_requests_with_lines(_NOT_STRICTLY_GOOD_REQUESTS):
+ strict_handshaker = handshake.Handshaker(request,
+ mock.MockDispatcher(),
+ True)
+ self.assertRaises(handshake.HandshakeError,
+ strict_handshaker.do_handshake)
+
+
if __name__ == '__main__':
unittest.main()
diff --git a/WebKitTools/pywebsocket/test/test_memorizingfile.py b/WebKitTools/pywebsocket/test/test_memorizingfile.py
new file mode 100644
index 0000000..2de77ba
--- /dev/null
+++ b/WebKitTools/pywebsocket/test/test_memorizingfile.py
@@ -0,0 +1,72 @@
+#!/usr/bin/env python
+#
+# Copyright 2009, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+"""Tests for memorizingfile module."""
+
+
+import StringIO
+import unittest
+
+import config # This must be imported before mod_pywebsocket.
+from mod_pywebsocket import memorizingfile
+
+
+class UtilTest(unittest.TestCase):
+ def check(self, memorizing_file, num_read, expected_list):
+ for unused in range(num_read):
+ memorizing_file.readline()
+ actual_list = memorizing_file.get_memorized_lines()
+ self.assertEqual(len(expected_list), len(actual_list))
+ for expected, actual in zip(expected_list, actual_list):
+ self.assertEqual(expected, actual)
+
+ def test_get_memorized_lines(self):
+ memorizing_file = memorizingfile.MemorizingFile(StringIO.StringIO(
+ 'Hello\nWorld\nWelcome'))
+ self.check(memorizing_file, 3, ['Hello\n', 'World\n', 'Welcome'])
+
+ def test_get_memorized_lines_limit_memorized_lines(self):
+ memorizing_file = memorizingfile.MemorizingFile(StringIO.StringIO(
+ 'Hello\nWorld\nWelcome'), 2)
+ self.check(memorizing_file, 3, ['Hello\n', 'World\n'])
+
+ def test_get_memorized_lines_empty_file(self):
+ memorizing_file = memorizingfile.MemorizingFile(StringIO.StringIO(
+ ''))
+ self.check(memorizing_file, 10, [])
+
+
+if __name__ == '__main__':
+ unittest.main()
+
+
+# vi:sts=4 sw=4 et
diff --git a/WebKitTools/simplejson/LICENSE.txt b/WebKitTools/simplejson/LICENSE.txt
new file mode 100644
index 0000000..ad95f29
--- /dev/null
+++ b/WebKitTools/simplejson/LICENSE.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2006 Bob Ippolito
+
+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", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/WebKitTools/simplejson/README.txt b/WebKitTools/simplejson/README.txt
new file mode 100644
index 0000000..7f726ce
--- /dev/null
+++ b/WebKitTools/simplejson/README.txt
@@ -0,0 +1,11 @@
+URL: http://undefined.org/python/#simplejson
+Version: 1.7.3
+License: MIT
+License File: LICENSE.txt
+
+Description:
+simplejson is a JSON encoder and decoder for Python.
+
+
+Local Modifications:
+Removed unit tests from current distribution.
diff --git a/WebKitTools/simplejson/__init__.py b/WebKitTools/simplejson/__init__.py
new file mode 100644
index 0000000..38d6229
--- /dev/null
+++ b/WebKitTools/simplejson/__init__.py
@@ -0,0 +1,287 @@
+r"""
+A simple, fast, extensible JSON encoder and decoder
+
+JSON (JavaScript Object Notation) <http://json.org> is a subset of
+JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
+interchange format.
+
+simplejson exposes an API familiar to uses of the standard library
+marshal and pickle modules.
+
+Encoding basic Python object hierarchies::
+
+ >>> import simplejson
+ >>> simplejson.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}])
+ '["foo", {"bar": ["baz", null, 1.0, 2]}]'
+ >>> print simplejson.dumps("\"foo\bar")
+ "\"foo\bar"
+ >>> print simplejson.dumps(u'\u1234')
+ "\u1234"
+ >>> print simplejson.dumps('\\')
+ "\\"
+ >>> print simplejson.dumps({"c": 0, "b": 0, "a": 0}, sort_keys=True)
+ {"a": 0, "b": 0, "c": 0}
+ >>> from StringIO import StringIO
+ >>> io = StringIO()
+ >>> simplejson.dump(['streaming API'], io)
+ >>> io.getvalue()
+ '["streaming API"]'
+
+Compact encoding::
+
+ >>> import simplejson
+ >>> simplejson.dumps([1,2,3,{'4': 5, '6': 7}], separators=(',',':'))
+ '[1,2,3,{"4":5,"6":7}]'
+
+Pretty printing::
+
+ >>> import simplejson
+ >>> print simplejson.dumps({'4': 5, '6': 7}, sort_keys=True, indent=4)
+ {
+ "4": 5,
+ "6": 7
+ }
+
+Decoding JSON::
+
+ >>> import simplejson
+ >>> simplejson.loads('["foo", {"bar":["baz", null, 1.0, 2]}]')
+ [u'foo', {u'bar': [u'baz', None, 1.0, 2]}]
+ >>> simplejson.loads('"\\"foo\\bar"')
+ u'"foo\x08ar'
+ >>> from StringIO import StringIO
+ >>> io = StringIO('["streaming API"]')
+ >>> simplejson.load(io)
+ [u'streaming API']
+
+Specializing JSON object decoding::
+
+ >>> import simplejson
+ >>> def as_complex(dct):
+ ... if '__complex__' in dct:
+ ... return complex(dct['real'], dct['imag'])
+ ... return dct
+ ...
+ >>> simplejson.loads('{"__complex__": true, "real": 1, "imag": 2}',
+ ... object_hook=as_complex)
+ (1+2j)
+
+Extending JSONEncoder::
+
+ >>> import simplejson
+ >>> class ComplexEncoder(simplejson.JSONEncoder):
+ ... def default(self, obj):
+ ... if isinstance(obj, complex):
+ ... return [obj.real, obj.imag]
+ ... return simplejson.JSONEncoder.default(self, obj)
+ ...
+ >>> dumps(2 + 1j, cls=ComplexEncoder)
+ '[2.0, 1.0]'
+ >>> ComplexEncoder().encode(2 + 1j)
+ '[2.0, 1.0]'
+ >>> list(ComplexEncoder().iterencode(2 + 1j))
+ ['[', '2.0', ', ', '1.0', ']']
+
+
+Note that the JSON produced by this module's default settings
+is a subset of YAML, so it may be used as a serializer for that as well.
+"""
+__version__ = '1.7.3'
+__all__ = [
+ 'dump', 'dumps', 'load', 'loads',
+ 'JSONDecoder', 'JSONEncoder',
+]
+
+from decoder import JSONDecoder
+from encoder import JSONEncoder
+
+_default_encoder = JSONEncoder(
+ skipkeys=False,
+ ensure_ascii=True,
+ check_circular=True,
+ allow_nan=True,
+ indent=None,
+ separators=None,
+ encoding='utf-8'
+)
+
+def dump(obj, fp, skipkeys=False, ensure_ascii=True, check_circular=True,
+ allow_nan=True, cls=None, indent=None, separators=None,
+ encoding='utf-8', **kw):
+ """
+ Serialize ``obj`` as a JSON formatted stream to ``fp`` (a
+ ``.write()``-supporting file-like object).
+
+ If ``skipkeys`` is ``True`` then ``dict`` keys that are not basic types
+ (``str``, ``unicode``, ``int``, ``long``, ``float``, ``bool``, ``None``)
+ will be skipped instead of raising a ``TypeError``.
+
+ If ``ensure_ascii`` is ``False``, then the some chunks written to ``fp``
+ may be ``unicode`` instances, subject to normal Python ``str`` to
+ ``unicode`` coercion rules. Unless ``fp.write()`` explicitly
+ understands ``unicode`` (as in ``codecs.getwriter()``) this is likely
+ to cause an error.
+
+ If ``check_circular`` is ``False``, then the circular reference check
+ for container types will be skipped and a circular reference will
+ result in an ``OverflowError`` (or worse).
+
+ If ``allow_nan`` is ``False``, then it will be a ``ValueError`` to
+ serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``)
+ in strict compliance of the JSON specification, instead of using the
+ JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``).
+
+ If ``indent`` is a non-negative integer, then JSON array elements and object
+ members will be pretty-printed with that indent level. An indent level
+ of 0 will only insert newlines. ``None`` is the most compact representation.
+
+ If ``separators`` is an ``(item_separator, dict_separator)`` tuple
+ then it will be used instead of the default ``(', ', ': ')`` separators.
+ ``(',', ':')`` is the most compact JSON representation.
+
+ ``encoding`` is the character encoding for str instances, default is UTF-8.
+
+ To use a custom ``JSONEncoder`` subclass (e.g. one that overrides the
+ ``.default()`` method to serialize additional types), specify it with
+ the ``cls`` kwarg.
+ """
+ # cached encoder
+ if (skipkeys is False and ensure_ascii is True and
+ check_circular is True and allow_nan is True and
+ cls is None and indent is None and separators is None and
+ encoding == 'utf-8' and not kw):
+ iterable = _default_encoder.iterencode(obj)
+ else:
+ if cls is None:
+ cls = JSONEncoder
+ iterable = cls(skipkeys=skipkeys, ensure_ascii=ensure_ascii,
+ check_circular=check_circular, allow_nan=allow_nan, indent=indent,
+ separators=separators, encoding=encoding, **kw).iterencode(obj)
+ # could accelerate with writelines in some versions of Python, at
+ # a debuggability cost
+ for chunk in iterable:
+ fp.write(chunk)
+
+
+def dumps(obj, skipkeys=False, ensure_ascii=True, check_circular=True,
+ allow_nan=True, cls=None, indent=None, separators=None,
+ encoding='utf-8', **kw):
+ """
+ Serialize ``obj`` to a JSON formatted ``str``.
+
+ If ``skipkeys`` is ``True`` then ``dict`` keys that are not basic types
+ (``str``, ``unicode``, ``int``, ``long``, ``float``, ``bool``, ``None``)
+ will be skipped instead of raising a ``TypeError``.
+
+ If ``ensure_ascii`` is ``False``, then the return value will be a
+ ``unicode`` instance subject to normal Python ``str`` to ``unicode``
+ coercion rules instead of being escaped to an ASCII ``str``.
+
+ If ``check_circular`` is ``False``, then the circular reference check
+ for container types will be skipped and a circular reference will
+ result in an ``OverflowError`` (or worse).
+
+ If ``allow_nan`` is ``False``, then it will be a ``ValueError`` to
+ serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``) in
+ strict compliance of the JSON specification, instead of using the
+ JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``).
+
+ If ``indent`` is a non-negative integer, then JSON array elements and
+ object members will be pretty-printed with that indent level. An indent
+ level of 0 will only insert newlines. ``None`` is the most compact
+ representation.
+
+ If ``separators`` is an ``(item_separator, dict_separator)`` tuple
+ then it will be used instead of the default ``(', ', ': ')`` separators.
+ ``(',', ':')`` is the most compact JSON representation.
+
+ ``encoding`` is the character encoding for str instances, default is UTF-8.
+
+ To use a custom ``JSONEncoder`` subclass (e.g. one that overrides the
+ ``.default()`` method to serialize additional types), specify it with
+ the ``cls`` kwarg.
+ """
+ # cached encoder
+ if (skipkeys is False and ensure_ascii is True and
+ check_circular is True and allow_nan is True and
+ cls is None and indent is None and separators is None and
+ encoding == 'utf-8' and not kw):
+ return _default_encoder.encode(obj)
+ if cls is None:
+ cls = JSONEncoder
+ return cls(
+ skipkeys=skipkeys, ensure_ascii=ensure_ascii,
+ check_circular=check_circular, allow_nan=allow_nan, indent=indent,
+ separators=separators, encoding=encoding,
+ **kw).encode(obj)
+
+_default_decoder = JSONDecoder(encoding=None, object_hook=None)
+
+def load(fp, encoding=None, cls=None, object_hook=None, **kw):
+ """
+ Deserialize ``fp`` (a ``.read()``-supporting file-like object containing
+ a JSON document) to a Python object.
+
+ If the contents of ``fp`` is encoded with an ASCII based encoding other
+ than utf-8 (e.g. latin-1), then an appropriate ``encoding`` name must
+ be specified. Encodings that are not ASCII based (such as UCS-2) are
+ not allowed, and should be wrapped with
+ ``codecs.getreader(fp)(encoding)``, or simply decoded to a ``unicode``
+ object and passed to ``loads()``
+
+ ``object_hook`` is an optional function that will be called with the
+ result of any object literal decode (a ``dict``). The return value of
+ ``object_hook`` will be used instead of the ``dict``. This feature
+ can be used to implement custom decoders (e.g. JSON-RPC class hinting).
+
+ To use a custom ``JSONDecoder`` subclass, specify it with the ``cls``
+ kwarg.
+ """
+ return loads(fp.read(),
+ encoding=encoding, cls=cls, object_hook=object_hook, **kw)
+
+def loads(s, encoding=None, cls=None, object_hook=None, **kw):
+ """
+ Deserialize ``s`` (a ``str`` or ``unicode`` instance containing a JSON
+ document) to a Python object.
+
+ If ``s`` is a ``str`` instance and is encoded with an ASCII based encoding
+ other than utf-8 (e.g. latin-1) then an appropriate ``encoding`` name
+ must be specified. Encodings that are not ASCII based (such as UCS-2)
+ are not allowed and should be decoded to ``unicode`` first.
+
+ ``object_hook`` is an optional function that will be called with the
+ result of any object literal decode (a ``dict``). The return value of
+ ``object_hook`` will be used instead of the ``dict``. This feature
+ can be used to implement custom decoders (e.g. JSON-RPC class hinting).
+
+ To use a custom ``JSONDecoder`` subclass, specify it with the ``cls``
+ kwarg.
+ """
+ if cls is None and encoding is None and object_hook is None and not kw:
+ return _default_decoder.decode(s)
+ if cls is None:
+ cls = JSONDecoder
+ if object_hook is not None:
+ kw['object_hook'] = object_hook
+ return cls(encoding=encoding, **kw).decode(s)
+
+def read(s):
+ """
+ json-py API compatibility hook. Use loads(s) instead.
+ """
+ import warnings
+ warnings.warn("simplejson.loads(s) should be used instead of read(s)",
+ DeprecationWarning)
+ return loads(s)
+
+def write(obj):
+ """
+ json-py API compatibility hook. Use dumps(s) instead.
+ """
+ import warnings
+ warnings.warn("simplejson.dumps(s) should be used instead of write(s)",
+ DeprecationWarning)
+ return dumps(obj)
+
+
diff --git a/WebKitTools/simplejson/_speedups.c b/WebKitTools/simplejson/_speedups.c
new file mode 100644
index 0000000..8f290bb
--- /dev/null
+++ b/WebKitTools/simplejson/_speedups.c
@@ -0,0 +1,215 @@
+#include "Python.h"
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+typedef int Py_ssize_t;
+#define PY_SSIZE_T_MAX INT_MAX
+#define PY_SSIZE_T_MIN INT_MIN
+#endif
+
+static Py_ssize_t
+ascii_escape_char(Py_UNICODE c, char *output, Py_ssize_t chars);
+static PyObject *
+ascii_escape_unicode(PyObject *pystr);
+static PyObject *
+ascii_escape_str(PyObject *pystr);
+static PyObject *
+py_encode_basestring_ascii(PyObject* self __attribute__((__unused__)), PyObject *pystr);
+void init_speedups(void);
+
+#define S_CHAR(c) (c >= ' ' && c <= '~' && c != '\\' && c != '/' && c != '"')
+
+#define MIN_EXPANSION 6
+#ifdef Py_UNICODE_WIDE
+#define MAX_EXPANSION (2 * MIN_EXPANSION)
+#else
+#define MAX_EXPANSION MIN_EXPANSION
+#endif
+
+static Py_ssize_t
+ascii_escape_char(Py_UNICODE c, char *output, Py_ssize_t chars) {
+ Py_UNICODE x;
+ output[chars++] = '\\';
+ switch (c) {
+ case '/': output[chars++] = (char)c; break;
+ case '\\': output[chars++] = (char)c; break;
+ case '"': output[chars++] = (char)c; break;
+ case '\b': output[chars++] = 'b'; break;
+ case '\f': output[chars++] = 'f'; break;
+ case '\n': output[chars++] = 'n'; break;
+ case '\r': output[chars++] = 'r'; break;
+ case '\t': output[chars++] = 't'; break;
+ default:
+#ifdef Py_UNICODE_WIDE
+ if (c >= 0x10000) {
+ /* UTF-16 surrogate pair */
+ Py_UNICODE v = c - 0x10000;
+ c = 0xd800 | ((v >> 10) & 0x3ff);
+ output[chars++] = 'u';
+ x = (c & 0xf000) >> 12;
+ output[chars++] = (x < 10) ? '0' + x : 'a' + (x - 10);
+ x = (c & 0x0f00) >> 8;
+ output[chars++] = (x < 10) ? '0' + x : 'a' + (x - 10);
+ x = (c & 0x00f0) >> 4;
+ output[chars++] = (x < 10) ? '0' + x : 'a' + (x - 10);
+ x = (c & 0x000f);
+ output[chars++] = (x < 10) ? '0' + x : 'a' + (x - 10);
+ c = 0xdc00 | (v & 0x3ff);
+ output[chars++] = '\\';
+ }
+#endif
+ output[chars++] = 'u';
+ x = (c & 0xf000) >> 12;
+ output[chars++] = (x < 10) ? '0' + x : 'a' + (x - 10);
+ x = (c & 0x0f00) >> 8;
+ output[chars++] = (x < 10) ? '0' + x : 'a' + (x - 10);
+ x = (c & 0x00f0) >> 4;
+ output[chars++] = (x < 10) ? '0' + x : 'a' + (x - 10);
+ x = (c & 0x000f);
+ output[chars++] = (x < 10) ? '0' + x : 'a' + (x - 10);
+ }
+ return chars;
+}
+
+static PyObject *
+ascii_escape_unicode(PyObject *pystr) {
+ Py_ssize_t i;
+ Py_ssize_t input_chars;
+ Py_ssize_t output_size;
+ Py_ssize_t chars;
+ PyObject *rval;
+ char *output;
+ Py_UNICODE *input_unicode;
+
+ input_chars = PyUnicode_GET_SIZE(pystr);
+ input_unicode = PyUnicode_AS_UNICODE(pystr);
+ /* One char input can be up to 6 chars output, estimate 4 of these */
+ output_size = 2 + (MIN_EXPANSION * 4) + input_chars;
+ rval = PyString_FromStringAndSize(NULL, output_size);
+ if (rval == NULL) {
+ return NULL;
+ }
+ output = PyString_AS_STRING(rval);
+ chars = 0;
+ output[chars++] = '"';
+ for (i = 0; i < input_chars; i++) {
+ Py_UNICODE c = input_unicode[i];
+ if (S_CHAR(c)) {
+ output[chars++] = (char)c;
+ } else {
+ chars = ascii_escape_char(c, output, chars);
+ }
+ if (output_size - chars < (1 + MAX_EXPANSION)) {
+ /* There's more than four, so let's resize by a lot */
+ output_size *= 2;
+ /* This is an upper bound */
+ if (output_size > 2 + (input_chars * MAX_EXPANSION)) {
+ output_size = 2 + (input_chars * MAX_EXPANSION);
+ }
+ if (_PyString_Resize(&rval, output_size) == -1) {
+ return NULL;
+ }
+ output = PyString_AS_STRING(rval);
+ }
+ }
+ output[chars++] = '"';
+ if (_PyString_Resize(&rval, chars) == -1) {
+ return NULL;
+ }
+ return rval;
+}
+
+static PyObject *
+ascii_escape_str(PyObject *pystr) {
+ Py_ssize_t i;
+ Py_ssize_t input_chars;
+ Py_ssize_t output_size;
+ Py_ssize_t chars;
+ PyObject *rval;
+ char *output;
+ char *input_str;
+
+ input_chars = PyString_GET_SIZE(pystr);
+ input_str = PyString_AS_STRING(pystr);
+ /* One char input can be up to 6 chars output, estimate 4 of these */
+ output_size = 2 + (MIN_EXPANSION * 4) + input_chars;
+ rval = PyString_FromStringAndSize(NULL, output_size);
+ if (rval == NULL) {
+ return NULL;
+ }
+ output = PyString_AS_STRING(rval);
+ chars = 0;
+ output[chars++] = '"';
+ for (i = 0; i < input_chars; i++) {
+ Py_UNICODE c = (Py_UNICODE)input_str[i];
+ if (S_CHAR(c)) {
+ output[chars++] = (char)c;
+ } else if (c > 0x7F) {
+ /* We hit a non-ASCII character, bail to unicode mode */
+ PyObject *uni;
+ Py_DECREF(rval);
+ uni = PyUnicode_DecodeUTF8(input_str, input_chars, "strict");
+ if (uni == NULL) {
+ return NULL;
+ }
+ rval = ascii_escape_unicode(uni);
+ Py_DECREF(uni);
+ return rval;
+ } else {
+ chars = ascii_escape_char(c, output, chars);
+ }
+ /* An ASCII char can't possibly expand to a surrogate! */
+ if (output_size - chars < (1 + MIN_EXPANSION)) {
+ /* There's more than four, so let's resize by a lot */
+ output_size *= 2;
+ if (output_size > 2 + (input_chars * MIN_EXPANSION)) {
+ output_size = 2 + (input_chars * MIN_EXPANSION);
+ }
+ if (_PyString_Resize(&rval, output_size) == -1) {
+ return NULL;
+ }
+ output = PyString_AS_STRING(rval);
+ }
+ }
+ output[chars++] = '"';
+ if (_PyString_Resize(&rval, chars) == -1) {
+ return NULL;
+ }
+ return rval;
+}
+
+PyDoc_STRVAR(pydoc_encode_basestring_ascii,
+ "encode_basestring_ascii(basestring) -> str\n"
+ "\n"
+ "..."
+);
+
+static PyObject *
+py_encode_basestring_ascii(PyObject* self __attribute__((__unused__)), PyObject *pystr) {
+ /* METH_O */
+ if (PyString_Check(pystr)) {
+ return ascii_escape_str(pystr);
+ } else if (PyUnicode_Check(pystr)) {
+ return ascii_escape_unicode(pystr);
+ }
+ PyErr_SetString(PyExc_TypeError, "first argument must be a string");
+ return NULL;
+}
+
+#define DEFN(n, k) \
+ { \
+ #n, \
+ (PyCFunction)py_ ##n, \
+ k, \
+ pydoc_ ##n \
+ }
+static PyMethodDef speedups_methods[] = {
+ DEFN(encode_basestring_ascii, METH_O),
+ {}
+};
+#undef DEFN
+
+void
+init_speedups(void)
+{
+ PyObject *m;
+ m = Py_InitModule4("_speedups", speedups_methods, NULL, NULL, PYTHON_API_VERSION);
+}
diff --git a/WebKitTools/simplejson/decoder.py b/WebKitTools/simplejson/decoder.py
new file mode 100644
index 0000000..a1b53b2
--- /dev/null
+++ b/WebKitTools/simplejson/decoder.py
@@ -0,0 +1,273 @@
+"""
+Implementation of JSONDecoder
+"""
+import re
+
+from simplejson.scanner import Scanner, pattern
+
+FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL
+
+def _floatconstants():
+ import struct
+ import sys
+ _BYTES = '7FF80000000000007FF0000000000000'.decode('hex')
+ if sys.byteorder != 'big':
+ _BYTES = _BYTES[:8][::-1] + _BYTES[8:][::-1]
+ nan, inf = struct.unpack('dd', _BYTES)
+ return nan, inf, -inf
+
+NaN, PosInf, NegInf = _floatconstants()
+
+def linecol(doc, pos):
+ lineno = doc.count('\n', 0, pos) + 1
+ if lineno == 1:
+ colno = pos
+ else:
+ colno = pos - doc.rindex('\n', 0, pos)
+ return lineno, colno
+
+def errmsg(msg, doc, pos, end=None):
+ lineno, colno = linecol(doc, pos)
+ if end is None:
+ return '%s: line %d column %d (char %d)' % (msg, lineno, colno, pos)
+ endlineno, endcolno = linecol(doc, end)
+ return '%s: line %d column %d - line %d column %d (char %d - %d)' % (
+ msg, lineno, colno, endlineno, endcolno, pos, end)
+
+_CONSTANTS = {
+ '-Infinity': NegInf,
+ 'Infinity': PosInf,
+ 'NaN': NaN,
+ 'true': True,
+ 'false': False,
+ 'null': None,
+}
+
+def JSONConstant(match, context, c=_CONSTANTS):
+ return c[match.group(0)], None
+pattern('(-?Infinity|NaN|true|false|null)')(JSONConstant)
+
+def JSONNumber(match, context):
+ match = JSONNumber.regex.match(match.string, *match.span())
+ integer, frac, exp = match.groups()
+ if frac or exp:
+ res = float(integer + (frac or '') + (exp or ''))
+ else:
+ res = int(integer)
+ return res, None
+pattern(r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?')(JSONNumber)
+
+STRINGCHUNK = re.compile(r'(.*?)(["\\])', FLAGS)
+BACKSLASH = {
+ '"': u'"', '\\': u'\\', '/': u'/',
+ 'b': u'\b', 'f': u'\f', 'n': u'\n', 'r': u'\r', 't': u'\t',
+}
+
+DEFAULT_ENCODING = "utf-8"
+
+def scanstring(s, end, encoding=None, _b=BACKSLASH, _m=STRINGCHUNK.match):
+ if encoding is None:
+ encoding = DEFAULT_ENCODING
+ chunks = []
+ _append = chunks.append
+ begin = end - 1
+ while 1:
+ chunk = _m(s, end)
+ if chunk is None:
+ raise ValueError(
+ errmsg("Unterminated string starting at", s, begin))
+ end = chunk.end()
+ content, terminator = chunk.groups()
+ if content:
+ if not isinstance(content, unicode):
+ content = unicode(content, encoding)
+ _append(content)
+ if terminator == '"':
+ break
+ try:
+ esc = s[end]
+ except IndexError:
+ raise ValueError(
+ errmsg("Unterminated string starting at", s, begin))
+ if esc != 'u':
+ try:
+ m = _b[esc]
+ except KeyError:
+ raise ValueError(
+ errmsg("Invalid \\escape: %r" % (esc,), s, end))
+ end += 1
+ else:
+ esc = s[end + 1:end + 5]
+ try:
+ m = unichr(int(esc, 16))
+ if len(esc) != 4 or not esc.isalnum():
+ raise ValueError
+ except ValueError:
+ raise ValueError(errmsg("Invalid \\uXXXX escape", s, end))
+ end += 5
+ _append(m)
+ return u''.join(chunks), end
+
+def JSONString(match, context):
+ encoding = getattr(context, 'encoding', None)
+ return scanstring(match.string, match.end(), encoding)
+pattern(r'"')(JSONString)
+
+WHITESPACE = re.compile(r'\s*', FLAGS)
+
+def JSONObject(match, context, _w=WHITESPACE.match):
+ pairs = {}
+ s = match.string
+ end = _w(s, match.end()).end()
+ nextchar = s[end:end + 1]
+ # trivial empty object
+ if nextchar == '}':
+ return pairs, end + 1
+ if nextchar != '"':
+ raise ValueError(errmsg("Expecting property name", s, end))
+ end += 1
+ encoding = getattr(context, 'encoding', None)
+ iterscan = JSONScanner.iterscan
+ while True:
+ key, end = scanstring(s, end, encoding)
+ end = _w(s, end).end()
+ if s[end:end + 1] != ':':
+ raise ValueError(errmsg("Expecting : delimiter", s, end))
+ end = _w(s, end + 1).end()
+ try:
+ value, end = iterscan(s, idx=end, context=context).next()
+ except StopIteration:
+ raise ValueError(errmsg("Expecting object", s, end))
+ pairs[key] = value
+ end = _w(s, end).end()
+ nextchar = s[end:end + 1]
+ end += 1
+ if nextchar == '}':
+ break
+ if nextchar != ',':
+ raise ValueError(errmsg("Expecting , delimiter", s, end - 1))
+ end = _w(s, end).end()
+ nextchar = s[end:end + 1]
+ end += 1
+ if nextchar != '"':
+ raise ValueError(errmsg("Expecting property name", s, end - 1))
+ object_hook = getattr(context, 'object_hook', None)
+ if object_hook is not None:
+ pairs = object_hook(pairs)
+ return pairs, end
+pattern(r'{')(JSONObject)
+
+def JSONArray(match, context, _w=WHITESPACE.match):
+ values = []
+ s = match.string
+ end = _w(s, match.end()).end()
+ # look-ahead for trivial empty array
+ nextchar = s[end:end + 1]
+ if nextchar == ']':
+ return values, end + 1
+ iterscan = JSONScanner.iterscan
+ while True:
+ try:
+ value, end = iterscan(s, idx=end, context=context).next()
+ except StopIteration:
+ raise ValueError(errmsg("Expecting object", s, end))
+ values.append(value)
+ end = _w(s, end).end()
+ nextchar = s[end:end + 1]
+ end += 1
+ if nextchar == ']':
+ break
+ if nextchar != ',':
+ raise ValueError(errmsg("Expecting , delimiter", s, end))
+ end = _w(s, end).end()
+ return values, end
+pattern(r'\[')(JSONArray)
+
+ANYTHING = [
+ JSONObject,
+ JSONArray,
+ JSONString,
+ JSONConstant,
+ JSONNumber,
+]
+
+JSONScanner = Scanner(ANYTHING)
+
+class JSONDecoder(object):
+ """
+ Simple JSON <http://json.org> decoder
+
+ Performs the following translations in decoding:
+
+ +---------------+-------------------+
+ | JSON | Python |
+ +===============+===================+
+ | object | dict |
+ +---------------+-------------------+
+ | array | list |
+ +---------------+-------------------+
+ | string | unicode |
+ +---------------+-------------------+
+ | number (int) | int, long |
+ +---------------+-------------------+
+ | number (real) | float |
+ +---------------+-------------------+
+ | true | True |
+ +---------------+-------------------+
+ | false | False |
+ +---------------+-------------------+
+ | null | None |
+ +---------------+-------------------+
+
+ It also understands ``NaN``, ``Infinity``, and ``-Infinity`` as
+ their corresponding ``float`` values, which is outside the JSON spec.
+ """
+
+ _scanner = Scanner(ANYTHING)
+ __all__ = ['__init__', 'decode', 'raw_decode']
+
+ def __init__(self, encoding=None, object_hook=None):
+ """
+ ``encoding`` determines the encoding used to interpret any ``str``
+ objects decoded by this instance (utf-8 by default). It has no
+ effect when decoding ``unicode`` objects.
+
+ Note that currently only encodings that are a superset of ASCII work,
+ strings of other encodings should be passed in as ``unicode``.
+
+ ``object_hook``, if specified, will be called with the result
+ of every JSON object decoded and its return value will be used in
+ place of the given ``dict``. This can be used to provide custom
+ deserializations (e.g. to support JSON-RPC class hinting).
+ """
+ self.encoding = encoding
+ self.object_hook = object_hook
+
+ def decode(self, s, _w=WHITESPACE.match):
+ """
+ Return the Python representation of ``s`` (a ``str`` or ``unicode``
+ instance containing a JSON document)
+ """
+ obj, end = self.raw_decode(s, idx=_w(s, 0).end())
+ end = _w(s, end).end()
+ if end != len(s):
+ raise ValueError(errmsg("Extra data", s, end, len(s)))
+ return obj
+
+ def raw_decode(self, s, **kw):
+ """
+ Decode a JSON document from ``s`` (a ``str`` or ``unicode`` beginning
+ with a JSON document) and return a 2-tuple of the Python
+ representation and the index in ``s`` where the document ended.
+
+ This can be used to decode a JSON document from a string that may
+ have extraneous data at the end.
+ """
+ kw.setdefault('context', self)
+ try:
+ obj, end = self._scanner.iterscan(s, **kw).next()
+ except StopIteration:
+ raise ValueError("No JSON object could be decoded")
+ return obj, end
+
+__all__ = ['JSONDecoder']
diff --git a/WebKitTools/simplejson/encoder.py b/WebKitTools/simplejson/encoder.py
new file mode 100644
index 0000000..d29919a
--- /dev/null
+++ b/WebKitTools/simplejson/encoder.py
@@ -0,0 +1,371 @@
+"""
+Implementation of JSONEncoder
+"""
+import re
+try:
+ from simplejson import _speedups
+except ImportError:
+ _speedups = None
+
+ESCAPE = re.compile(r'[\x00-\x19\\"\b\f\n\r\t]')
+ESCAPE_ASCII = re.compile(r'([\\"/]|[^\ -~])')
+ESCAPE_DCT = {
+ # escape all forward slashes to prevent </script> attack
+ '/': '\\/',
+ '\\': '\\\\',
+ '"': '\\"',
+ '\b': '\\b',
+ '\f': '\\f',
+ '\n': '\\n',
+ '\r': '\\r',
+ '\t': '\\t',
+}
+for i in range(0x20):
+ ESCAPE_DCT.setdefault(chr(i), '\\u%04x' % (i,))
+
+# assume this produces an infinity on all machines (probably not guaranteed)
+INFINITY = float('1e66666')
+
+def floatstr(o, allow_nan=True):
+ # Check for specials. Note that this type of test is processor- and/or
+ # platform-specific, so do tests which don't depend on the internals.
+
+ if o != o:
+ text = 'NaN'
+ elif o == INFINITY:
+ text = 'Infinity'
+ elif o == -INFINITY:
+ text = '-Infinity'
+ else:
+ return repr(o)
+
+ if not allow_nan:
+ raise ValueError("Out of range float values are not JSON compliant: %r"
+ % (o,))
+
+ return text
+
+
+def encode_basestring(s):
+ """
+ Return a JSON representation of a Python string
+ """
+ def replace(match):
+ return ESCAPE_DCT[match.group(0)]
+ return '"' + ESCAPE.sub(replace, s) + '"'
+
+def encode_basestring_ascii(s):
+ def replace(match):
+ s = match.group(0)
+ try:
+ return ESCAPE_DCT[s]
+ except KeyError:
+ n = ord(s)
+ if n < 0x10000:
+ return '\\u%04x' % (n,)
+ else:
+ # surrogate pair
+ n -= 0x10000
+ s1 = 0xd800 | ((n >> 10) & 0x3ff)
+ s2 = 0xdc00 | (n & 0x3ff)
+ return '\\u%04x\\u%04x' % (s1, s2)
+ return '"' + str(ESCAPE_ASCII.sub(replace, s)) + '"'
+
+try:
+ encode_basestring_ascii = _speedups.encode_basestring_ascii
+ _need_utf8 = True
+except AttributeError:
+ _need_utf8 = False
+
+class JSONEncoder(object):
+ """
+ Extensible JSON <http://json.org> encoder for Python data structures.
+
+ Supports the following objects and types by default:
+
+ +-------------------+---------------+
+ | Python | JSON |
+ +===================+===============+
+ | dict | object |
+ +-------------------+---------------+
+ | list, tuple | array |
+ +-------------------+---------------+
+ | str, unicode | string |
+ +-------------------+---------------+
+ | int, long, float | number |
+ +-------------------+---------------+
+ | True | true |
+ +-------------------+---------------+
+ | False | false |
+ +-------------------+---------------+
+ | None | null |
+ +-------------------+---------------+
+
+ To extend this to recognize other objects, subclass and implement a
+ ``.default()`` method with another method that returns a serializable
+ object for ``o`` if possible, otherwise it should call the superclass
+ implementation (to raise ``TypeError``).
+ """
+ __all__ = ['__init__', 'default', 'encode', 'iterencode']
+ item_separator = ', '
+ key_separator = ': '
+ def __init__(self, skipkeys=False, ensure_ascii=True,
+ check_circular=True, allow_nan=True, sort_keys=False,
+ indent=None, separators=None, encoding='utf-8'):
+ """
+ Constructor for JSONEncoder, with sensible defaults.
+
+ If skipkeys is False, then it is a TypeError to attempt
+ encoding of keys that are not str, int, long, float or None. If
+ skipkeys is True, such items are simply skipped.
+
+ If ensure_ascii is True, the output is guaranteed to be str
+ objects with all incoming unicode characters escaped. If
+ ensure_ascii is false, the output will be unicode object.
+
+ If check_circular is True, then lists, dicts, and custom encoded
+ objects will be checked for circular references during encoding to
+ prevent an infinite recursion (which would cause an OverflowError).
+ Otherwise, no such check takes place.
+
+ If allow_nan is True, then NaN, Infinity, and -Infinity will be
+ encoded as such. This behavior is not JSON specification compliant,
+ but is consistent with most JavaScript based encoders and decoders.
+ Otherwise, it will be a ValueError to encode such floats.
+
+ If sort_keys is True, then the output of dictionaries will be
+ sorted by key; this is useful for regression tests to ensure
+ that JSON serializations can be compared on a day-to-day basis.
+
+ If indent is a non-negative integer, then JSON array
+ elements and object members will be pretty-printed with that
+ indent level. An indent level of 0 will only insert newlines.
+ None is the most compact representation.
+
+ If specified, separators should be a (item_separator, key_separator)
+ tuple. The default is (', ', ': '). To get the most compact JSON
+ representation you should specify (',', ':') to eliminate whitespace.
+
+ If encoding is not None, then all input strings will be
+ transformed into unicode using that encoding prior to JSON-encoding.
+ The default is UTF-8.
+ """
+
+ self.skipkeys = skipkeys
+ self.ensure_ascii = ensure_ascii
+ self.check_circular = check_circular
+ self.allow_nan = allow_nan
+ self.sort_keys = sort_keys
+ self.indent = indent
+ self.current_indent_level = 0
+ if separators is not None:
+ self.item_separator, self.key_separator = separators
+ self.encoding = encoding
+
+ def _newline_indent(self):
+ return '\n' + (' ' * (self.indent * self.current_indent_level))
+
+ def _iterencode_list(self, lst, markers=None):
+ if not lst:
+ yield '[]'
+ return
+ if markers is not None:
+ markerid = id(lst)
+ if markerid in markers:
+ raise ValueError("Circular reference detected")
+ markers[markerid] = lst
+ yield '['
+ if self.indent is not None:
+ self.current_indent_level += 1
+ newline_indent = self._newline_indent()
+ separator = self.item_separator + newline_indent
+ yield newline_indent
+ else:
+ newline_indent = None
+ separator = self.item_separator
+ first = True
+ for value in lst:
+ if first:
+ first = False
+ else:
+ yield separator
+ for chunk in self._iterencode(value, markers):
+ yield chunk
+ if newline_indent is not None:
+ self.current_indent_level -= 1
+ yield self._newline_indent()
+ yield ']'
+ if markers is not None:
+ del markers[markerid]
+
+ def _iterencode_dict(self, dct, markers=None):
+ if not dct:
+ yield '{}'
+ return
+ if markers is not None:
+ markerid = id(dct)
+ if markerid in markers:
+ raise ValueError("Circular reference detected")
+ markers[markerid] = dct
+ yield '{'
+ key_separator = self.key_separator
+ if self.indent is not None:
+ self.current_indent_level += 1
+ newline_indent = self._newline_indent()
+ item_separator = self.item_separator + newline_indent
+ yield newline_indent
+ else:
+ newline_indent = None
+ item_separator = self.item_separator
+ first = True
+ if self.ensure_ascii:
+ encoder = encode_basestring_ascii
+ else:
+ encoder = encode_basestring
+ allow_nan = self.allow_nan
+ if self.sort_keys:
+ keys = dct.keys()
+ keys.sort()
+ items = [(k, dct[k]) for k in keys]
+ else:
+ items = dct.iteritems()
+ _encoding = self.encoding
+ _do_decode = (_encoding is not None
+ and not (_need_utf8 and _encoding == 'utf-8'))
+ for key, value in items:
+ if isinstance(key, str):
+ if _do_decode:
+ key = key.decode(_encoding)
+ elif isinstance(key, basestring):
+ pass
+ # JavaScript is weakly typed for these, so it makes sense to
+ # also allow them. Many encoders seem to do something like this.
+ elif isinstance(key, float):
+ key = floatstr(key, allow_nan)
+ elif isinstance(key, (int, long)):
+ key = str(key)
+ elif key is True:
+ key = 'true'
+ elif key is False:
+ key = 'false'
+ elif key is None:
+ key = 'null'
+ elif self.skipkeys:
+ continue
+ else:
+ raise TypeError("key %r is not a string" % (key,))
+ if first:
+ first = False
+ else:
+ yield item_separator
+ yield encoder(key)
+ yield key_separator
+ for chunk in self._iterencode(value, markers):
+ yield chunk
+ if newline_indent is not None:
+ self.current_indent_level -= 1
+ yield self._newline_indent()
+ yield '}'
+ if markers is not None:
+ del markers[markerid]
+
+ def _iterencode(self, o, markers=None):
+ if isinstance(o, basestring):
+ if self.ensure_ascii:
+ encoder = encode_basestring_ascii
+ else:
+ encoder = encode_basestring
+ _encoding = self.encoding
+ if (_encoding is not None and isinstance(o, str)
+ and not (_need_utf8 and _encoding == 'utf-8')):
+ o = o.decode(_encoding)
+ yield encoder(o)
+ elif o is None:
+ yield 'null'
+ elif o is True:
+ yield 'true'
+ elif o is False:
+ yield 'false'
+ elif isinstance(o, (int, long)):
+ yield str(o)
+ elif isinstance(o, float):
+ yield floatstr(o, self.allow_nan)
+ elif isinstance(o, (list, tuple)):
+ for chunk in self._iterencode_list(o, markers):
+ yield chunk
+ elif isinstance(o, dict):
+ for chunk in self._iterencode_dict(o, markers):
+ yield chunk
+ else:
+ if markers is not None:
+ markerid = id(o)
+ if markerid in markers:
+ raise ValueError("Circular reference detected")
+ markers[markerid] = o
+ for chunk in self._iterencode_default(o, markers):
+ yield chunk
+ if markers is not None:
+ del markers[markerid]
+
+ def _iterencode_default(self, o, markers=None):
+ newobj = self.default(o)
+ return self._iterencode(newobj, markers)
+
+ def default(self, o):
+ """
+ Implement this method in a subclass such that it returns
+ a serializable object for ``o``, or calls the base implementation
+ (to raise a ``TypeError``).
+
+ For example, to support arbitrary iterators, you could
+ implement default like this::
+
+ def default(self, o):
+ try:
+ iterable = iter(o)
+ except TypeError:
+ pass
+ else:
+ return list(iterable)
+ return JSONEncoder.default(self, o)
+ """
+ raise TypeError("%r is not JSON serializable" % (o,))
+
+ def encode(self, o):
+ """
+ Return a JSON string representation of a Python data structure.
+
+ >>> JSONEncoder().encode({"foo": ["bar", "baz"]})
+ '{"foo":["bar", "baz"]}'
+ """
+ # This is for extremely simple cases and benchmarks...
+ if isinstance(o, basestring):
+ if isinstance(o, str):
+ _encoding = self.encoding
+ if (_encoding is not None
+ and not (_encoding == 'utf-8' and _need_utf8)):
+ o = o.decode(_encoding)
+ return encode_basestring_ascii(o)
+ # This doesn't pass the iterator directly to ''.join() because it
+ # sucks at reporting exceptions. It's going to do this internally
+ # anyway because it uses PySequence_Fast or similar.
+ chunks = list(self.iterencode(o))
+ return ''.join(chunks)
+
+ def iterencode(self, o):
+ """
+ Encode the given object and yield each string
+ representation as available.
+
+ For example::
+
+ for chunk in JSONEncoder().iterencode(bigobject):
+ mysocket.write(chunk)
+ """
+ if self.check_circular:
+ markers = {}
+ else:
+ markers = None
+ return self._iterencode(o, markers)
+
+__all__ = ['JSONEncoder']
diff --git a/WebKitTools/simplejson/jsonfilter.py b/WebKitTools/simplejson/jsonfilter.py
new file mode 100644
index 0000000..01ca21d
--- /dev/null
+++ b/WebKitTools/simplejson/jsonfilter.py
@@ -0,0 +1,40 @@
+import simplejson
+import cgi
+
+class JSONFilter(object):
+ def __init__(self, app, mime_type='text/x-json'):
+ self.app = app
+ self.mime_type = mime_type
+
+ def __call__(self, environ, start_response):
+ # Read JSON POST input to jsonfilter.json if matching mime type
+ response = {'status': '200 OK', 'headers': []}
+ def json_start_response(status, headers):
+ response['status'] = status
+ response['headers'].extend(headers)
+ environ['jsonfilter.mime_type'] = self.mime_type
+ if environ.get('REQUEST_METHOD', '') == 'POST':
+ if environ.get('CONTENT_TYPE', '') == self.mime_type:
+ args = [_ for _ in [environ.get('CONTENT_LENGTH')] if _]
+ data = environ['wsgi.input'].read(*map(int, args))
+ environ['jsonfilter.json'] = simplejson.loads(data)
+ res = simplejson.dumps(self.app(environ, json_start_response))
+ jsonp = cgi.parse_qs(environ.get('QUERY_STRING', '')).get('jsonp')
+ if jsonp:
+ content_type = 'text/javascript'
+ res = ''.join(jsonp + ['(', res, ')'])
+ elif 'Opera' in environ.get('HTTP_USER_AGENT', ''):
+ # Opera has bunk XMLHttpRequest support for most mime types
+ content_type = 'text/plain'
+ else:
+ content_type = self.mime_type
+ headers = [
+ ('Content-type', content_type),
+ ('Content-length', len(res)),
+ ]
+ headers.extend(response['headers'])
+ start_response(response['status'], headers)
+ return [res]
+
+def factory(app, global_conf, **kw):
+ return JSONFilter(app, **kw)
diff --git a/WebKitTools/simplejson/scanner.py b/WebKitTools/simplejson/scanner.py
new file mode 100644
index 0000000..64f4999
--- /dev/null
+++ b/WebKitTools/simplejson/scanner.py
@@ -0,0 +1,63 @@
+"""
+Iterator based sre token scanner
+"""
+import sre_parse, sre_compile, sre_constants
+from sre_constants import BRANCH, SUBPATTERN
+from re import VERBOSE, MULTILINE, DOTALL
+import re
+
+__all__ = ['Scanner', 'pattern']
+
+FLAGS = (VERBOSE | MULTILINE | DOTALL)
+class Scanner(object):
+ def __init__(self, lexicon, flags=FLAGS):
+ self.actions = [None]
+ # combine phrases into a compound pattern
+ s = sre_parse.Pattern()
+ s.flags = flags
+ p = []
+ for idx, token in enumerate(lexicon):
+ phrase = token.pattern
+ try:
+ subpattern = sre_parse.SubPattern(s,
+ [(SUBPATTERN, (idx + 1, sre_parse.parse(phrase, flags)))])
+ except sre_constants.error:
+ raise
+ p.append(subpattern)
+ self.actions.append(token)
+
+ p = sre_parse.SubPattern(s, [(BRANCH, (None, p))])
+ self.scanner = sre_compile.compile(p)
+
+
+ def iterscan(self, string, idx=0, context=None):
+ """
+ Yield match, end_idx for each match
+ """
+ match = self.scanner.scanner(string, idx).match
+ actions = self.actions
+ lastend = idx
+ end = len(string)
+ while True:
+ m = match()
+ if m is None:
+ break
+ matchbegin, matchend = m.span()
+ if lastend == matchend:
+ break
+ action = actions[m.lastindex]
+ if action is not None:
+ rval, next_pos = action(m, context)
+ if next_pos is not None and next_pos != matchend:
+ # "fast forward" the scanner
+ matchend = next_pos
+ match = self.scanner.scanner(string, matchend).match
+ yield rval, matchend
+ lastend = matchend
+
+def pattern(pattern, flags=FLAGS):
+ def decorator(fn):
+ fn.pattern = pattern
+ fn.regex = re.compile(pattern, flags)
+ return fn
+ return decorator
diff --git a/WebKitTools/wx/browser/browser.bkl b/WebKitTools/wx/browser/browser.bkl
index 0a60fd9..e69de29 100644
--- a/WebKitTools/wx/browser/browser.bkl
+++ b/WebKitTools/wx/browser/browser.bkl
@@ -1,63 +0,0 @@
-<?xml version="1.0" ?>
-<!--
-Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.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.
-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.
-
-wxWebKit sample application build file
--->
-
-<makefile>
- <set var="WX_UNICODE">1</set>
- <set var="WX_SHARED">1</set>
-
- <include file="../../../WebKit/wx/wxwk-settings.bkl"/>
-
- <!-- the WX_PYTHON option was added to presets/wx.bkl in 2.8.5, so define
- it in case the presets/wx.bkl doesn't define it for us. -->
- <if cond="not isdefined('WX_PYTHON')">
- <set var="WX_PYTHON">0</set>
- </if>
- <template id="wxwebkit">
- <lib-path>$(WKOUTPUTDIR)</lib-path>
- <sys-lib>wxwebkit</sys-lib>
- </template>
- <exe id="wxBrowser" template="wxwk,xml2,iconv,xslt,icu,jscore,webcore,wxwebkit,curl,pthreads">
- <app-type>gui</app-type>
- <runtime-libs>dynamic</runtime-libs>
-
- <include>$(WK_ROOT)/WebCore/platform/wx</include>
- <include>$(WK_ROOT)/WebCore/bridge/wx</include>
- <include>$(WK_ROOT)/WebCore/page/wx</include>
- <include>$(WK_ROOT)/WebKit/wx</include>
- <include>$(WK_ROOT)/WebKit/wx/WebKitSupport</include>
-
- <sources>
- browser.cpp
- </sources>
-
- </exe>
-
-</makefile>
diff --git a/WebKitTools/wx/browser/browser.cpp b/WebKitTools/wx/browser/browser.cpp
index 83f909b..df701bb 100644
--- a/WebKitTools/wx/browser/browser.cpp
+++ b/WebKitTools/wx/browser/browser.cpp
@@ -26,8 +26,9 @@
*/
// webkit includes
-#include "WebView.h"
#include "WebBrowserShell.h"
+#include "WebSettings.h"
+#include "WebView.h"
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
@@ -55,6 +56,13 @@ bool MyApp::OnInit()
#ifndef NDEBUG
frame->ShowDebugMenu(true);
#endif
+
+ wxWebSettings settings = frame->webview->GetWebSettings();
+#if __WXMSW__ || __WXMAC__
+ settings.SetPluginsEnabled(true);
+#endif
+ settings.SetDatabasesEnabled(true);
+ settings.SetEditableLinkBehavior(wxEditableLinkOnlyLiveWithShiftKey);
frame->CentreOnScreen();
frame->Show(true);
diff --git a/WebKitTools/wx/build-wxwebkit b/WebKitTools/wx/build-wxwebkit
index 3e4c414..e69de29 100755
--- a/WebKitTools/wx/build-wxwebkit
+++ b/WebKitTools/wx/build-wxwebkit
@@ -1,423 +0,0 @@
-#!/bin/bash
-
-# Copyright (C) 2007 Robin Dunn, Kevin Ollivier 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.
-#
-# Driver for the wxWebKit build process.
-
-set -o errexit
-#set -o xtrace
-
-#----------------------------------------------------------------------
-# Set up the environment
-
-scriptDir="$(cd $(dirname $0);pwd)"
-WK_ROOT=$scriptDir/../..
-WK_ROOTDIR="$WK_ROOT"
-
-cd $scriptDir
-
-if [ -z $WEBKITOUTPUTDIR ]; then
- WEBKITOUTPUTDIR=`cd $WK_ROOT/WebKitTools/Scripts; perl -e "use webkitdirs; print productDir()"`
-fi
-
-WKWINLIBS=WebKitLibraries/win
-WINDEPS=" $WKWINLIBS/lib/pthreadVC2.dll"
-WINDEPS="$WINDEPS $WKWINLIBS/bin/icuuc40.dll $WKWINLIBS/bin/icudt40.dll $WKWINLIBS/bin/icuin40.dll"
-WINDEPS="$WINDEPS $WKWINLIBS/bin/libcurl.dll $WKWINLIBS/bin/libeay32.dll $WKWINLIBS/bin/ssleay32.dll $WKWINLIBS/bin/zlib1.dll"
-WINDEPS="$WINDEPS $WKWINLIBS/lib/sqlite3.dll"
-WINDEPS="$WINDEPS $WKWINLIBS/bin/libxml2.dll $WKWINLIBS/bin/libxslt.dll"
-WINDEPS="$WINDEPS $WKWINLIBS/bin/iconv.dll"
-
-# TODO: check that we are running from the root of the source tree...
-
-# cygpath will bork if the dir doesn't exist...
-mkdir -p $WEBKITOUTPUTDIR
-
-if [ $OSTYPE == cygwin ]; then
- EXE=.exe
- WK_ROOTDIR=`cygpath -d $WK_ROOT`
- WEBKITOUTPUTDIR=`cygpath -d $WEBKITOUTPUTDIR`
- export WEBKITOUTPUTDIR
- if [ -z $WXWIN ]; then
- echo "Error, you must set WXWIN to your wxWidgets root directory."
- exit 1
- fi
- if [ -z $WX_PREFIX ]; then
- WX_PREFIX=$WXWIN
- fi
- if [ -z $BAKEFILE_PATHS ]; then
- export BAKEFILE_PATHS=$WXWIN/build/bakefiles/wxpresets
- fi
- LINKER=`which link`
- if [ "$LINKER" = "/usr/bin/link" ]; then
- echo "WARNING: wxWebKit builds using MSVC on Windows, but it looks like"
- echo "you have the GCC linker on your path. If /usr/bin/link does NOT point"
- echo "to the MSVC linker, you need to move it or change your path to pick up"
- echo "Microsoft's link.exe program first."
- fi
-
-else
- export WEBKITOUTPUTDIR
- WX_PREFIX=`wx-config --prefix`
- if [ ! -d "$WX_PREFIX" ]; then
- echo "ERROR: Cannot find your wxWidgets installation."
- echo "Make sure wx-config is on your PATH and points to a valid wxWidgets installation."
- exit 1
- fi
-
- CONFIG=`wx-config --selected-config`
- if [ "${CONFIG:0:4}" != "gtk2" -a "${CONFIG:0:3}" != "mac" ]; then
- echo "WARNING: This configuration '$CONFIG' is not currently supported by wxWebKit. Please use the win, mac, or gtk2 port depending on your platform."
- fi
-
- if [ ! -d "$WX_PREFIX/share/bakefile" ]; then
- echo "ERROR: wxWidgets installation does not have wxpresets."
- echo "wx-config is pointing to an installation that does not have Bakefile presets installed. Run `wx-config --version` to ensure your wxWidgets is of version 2.8+."
- exit 1
- fi
-
- if [ -z $BAKEFILE_PATHS ]; then
- export BAKEFILE_PATHS=$WX_PREFIX/share/bakefile
- fi
-fi
-
-# after all that, make sure that BAKEFILE_PATHS was either set
-# previously, or by the code above
-if [ -z $BAKEFILE_PATHS ]; then
- echo "Error, you must set BAKEFILE_PATHS to the directory containing wxpresets."
- exit 1
-fi
-
-#----------------------------------------------------------------------
-# process command line args
-build_type_set=0
-
-do_bake=0
-do_prep=0
-do_extras=0
-do_build=0
-do_clean=0
-do_install=0
-use_wxgc=0
-debug=1
-wxdebug=0
-wxpython=0
-make_args=''
-other_args=''
-
-for flag in $*; do
- case $flag in
- bake) do_bake=1 ;;
- prep) do_prep=1 ;;
- build) do_build=1 ;;
- all) do_extras=1; do_bake=1; do_prep=1; do_build=1 ;;
- clean) other_args=clean; do_clean=1 ;;
- wxgc) use_wxgc=1 ;;
- wxdebug) wxdebug=1 ;;
- wxpython) wxpython=1 ;;
- wxpython-install) wxpython_install=1 ;;
- *) export $flag ;; #other_args='$other_args "$flag"' ;;
- esac
-done
-
-
-#----------------------------------------------------------------------
-
-# if no arguments were passed, do a full build.
-if [ $do_bake == 0 -a $do_prep == 0 -a $do_build == 0 -a $do_clean == 0 ]; then
- do_bake=1; do_prep=1; do_build=1
-fi
-
-if [ -f $WK_ROOT/WebKitBuild/Configuration ]; then
- BUILD_TYPE=`cat $WK_ROOT/WebKitBuild/Configuration`
- echo "Configuration is: $BUILD_TYPE"
-
- if [ $BUILD_TYPE == "Release" ]; then
- debug=0
- fi
- if [ $BUILD_TYPE == "Debug" ]; then
- debug=1
- fi
-
-fi
-
-function do_make {
- dir=$1
- cxxflags=$2
- olddir=$PWD
- shift
- shift
- # NOTE: If we try to do make clean after the Bakefiles were cleaned out, or before they were
- # first generated, we will get errors about missing files, so we need to check that the
- # makefile exists before running it.
- if [ $OSTYPE == cygwin ]; then
- cd $dir
- if [ -f makefile.vc ]; then
- nmake -f makefile.vc CXXFLAGS="$cxxflags" $@
- fi
- cd $olddir
- else
- if [ -f $dir/GNUmakefile ]; then
- make -C $dir -f GNUmakefile $MAKE_ARGS CXXFLAGS="$cxxflags -fvisibility=hidden -fvisibility-inlines-hidden" $@
- fi
- fi
- if [ $? != 0 ]; then
- exit $?
- fi
-}
-
-# output the first parameter that is a dir and exists
-function find_existing_dir {
- for arg in $*; do
- tester=$arg
- if [ $OSTYPE == cygwin ]; then
- tester=`cygpath -u $arg`
- fi
- if [ -d $tester ]; then
- echo $arg
- return
- fi
- done
-}
-
-
-olddir=$PWD
-
-if [ $do_clean != 1 ]; then
-
- mkdir -p $WEBKITOUTPUTDIR/build
-
- if [ $do_bake == 1 ]; then
- # bakefile stuff
- cd $WK_ROOT/WebKit/wx
- bakefile_gen
-
- # we need to do this because Bakefile doesn't know which
- # platform it's running on with GNU format, and so it defaults
- # to the standard Unix file endings and linker args.
- if [ "${OSTYPE:0:6}" = "darwin" ]; then
- sed "s/libjscore.so/libjscore.dylib/" < $WK_ROOT/JavaScriptCore/GNUmakefile > temp
- mv temp $WK_ROOT/JavaScriptCore/GNUmakefile
-
- sed "s/\-shared/\-dynamiclib/" < $WK_ROOT/JavaScriptCore/GNUmakefile > temp
- mv temp $WK_ROOT/JavaScriptCore/GNUmakefile
-
- sed "s/\-shared/\-dynamiclib/" < $WK_ROOT/WebCore/GNUmakefile > temp
- mv temp $WK_ROOT/WebCore/GNUmakefile
-
- sed "s/libwxwebkit.so/libwxwebkit.dylib/" < $WK_ROOT/WebKit/wx/GNUmakefile > temp
- mv temp $WK_ROOT/WebKit/wx/GNUmakefile
-
- sed "s/\-shared/\-dynamiclib/" < $WK_ROOT/WebKit/wx/GNUmakefile > temp
- mv temp $WK_ROOT/WebKit/wx/GNUmakefile
- fi
- fi
-
- if [ $do_prep == 1 ]; then
- # Other preparation steps
-
- # since the buildbot will wipe the build tree clean sometimes, we need to reinstall
- # the dependencies if they aren't installed.
- if [ "${OSTYPE:0:6}" == "darwin" ]; then
- $WK_ROOT/WebKitTools/wx/install-unix-extras
- fi
-
-
- export CREATE_HASH_TABLE="$WK_ROOT/JavaScriptCore/create_hash_table"
- cd $WK_ROOT/JavaScriptCore
- mkdir -p DerivedSources/JavaScriptCore
- cd DerivedSources/JavaScriptCore
-
- make -f ../../DerivedSources.make JavaScriptCore=../.. BUILT_PRODUCTS_DIR=../.. all FEATURE_DEFINES="ENABLE_DATABASE ENABLE_XSLT ENABLE_JAVASCRIPT_DEBUGGER"
- if [ $? != 0 ]; then
- exit 1
- fi
-
- cd $WK_ROOT/WebCore
- mkdir -p DerivedSources/WebCore
- cd DerivedSources/WebCore
- make -f ../../DerivedSources.make all WebCore=../.. SOURCE_ROOT=../.. FEATURE_DEFINES="ENABLE_DATABASE ENABLE_XSLT ENABLE_JAVASCRIPT_DEBUGGER"
- if [ $? != 0 ]; then
- exit 1
- fi
- fi
-fi
-
-
-if [ $do_build == 1 -o $do_clean == 1 ]; then
- WXGC_DEFINE=""
- EXTRA_CPPFLAGS=""
-
- if [ "${OSTYPE:0:6}" == "cygwin" ]; then
- PLATFORM_OS="win"
- elif [ "${OSTYPE:0:6}" == "darwin" ]; then
- PLATFORM_OS="mac"
- EXTRA_CPPFLAGS="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040"
- use_wxgc=1
- else
- PLATFORM_OS="linux"
- use_wxgc=1
- fi
-
- if [ $use_wxgc == 1 ]; then
- WXGC_DEFINE="-DWTF_USE_WXGC=1"
- fi
- WX_EXT=
- if [ "${OSTYPE:0:6}" == "cygwin" -a $wxdebug == 1 ]; then
- WX_EXT=d
- fi
- if [ $wxpython == 1 ]; then
- other_args=WX_PYTHON=1
- WX_EXT=h
- wxdebug=1
- fi
-
- WINDEPS="$WINDEPS $WXWIN/lib/vc_dll/wxmsw28u${WX_EXT}_core_vc.dll $WXWIN/lib/vc_dll/wxbase28u${WX_EXT}_vc.dll"
-
- do_make $WK_ROOT/JavaScriptCore "-DBUILDING_WX__=1 $WXGC_DEFINE $EXTRA_CPPFLAGS" WX_DEBUG=$wxdebug DEBUG=$debug WEBKIT_ROOT=$WK_ROOTDIR PLATFORM_OS=$PLATFORM_OS $other_args
-
- mkdir -p $WEBKITOUTPUTDIR/JavaScriptCore
- cp -p $WK_ROOT/JavaScriptCore/API/*.h $WEBKITOUTPUTDIR/JavaScriptCore/
-
- do_make $WK_ROOT/WebCore "-DBUILDING_WX__=1 $WXGC_DEFINE $EXTRA_CPPFLAGS" WX_DEBUG=$wxdebug WEBKIT_ROOT=$WK_ROOTDIR DEBUG=$debug PLATFORM_OS=$PLATFORM_OS $other_args
- do_make $WK_ROOT/WebKit/wx "-DBUILDING_WX__=1 -DWXMAKINGDLL_WEBKIT=1 $WXGC_DEFINE $EXTRA_CPPFLAGS" WX_DEBUG=$wxdebug DEBUG=$debug WEBKIT_ROOT=$WK_ROOTDIR PLATFORM_OS=$PLATFORM_OS $other_args
- do_make $WK_ROOT/WebKitTools/wx/browser "-DBUILDING_WX__=1 -DWXUSINGDLL_WEBKIT=1 $WXGC_DEFINE $EXTRA_CPPFLAGS" WX_DEBUG=$wxdebug DEBUG=$debug WEBKIT_ROOT=$WK_ROOTDIR PLATFORM_OS=$PLATFORM_OS $other_args
- do_make $WK_ROOT/WebKitTools/DumpRenderTree/wx "-DBUILDING_WX__=1 -DWXUSINGDLL_WEBKIT=1 $WXGC_DEFINE $EXTRA_CPPFLAGS" WX_DEBUG=$wxdebug DEBUG=$debug WEBKIT_ROOT=$WK_ROOTDIR PLATFORM_OS=$PLATFORM_OS $other_args
-
- if [ $do_clean == 1 ]; then
- rm -rf $WK_ROOT/JavaScriptCore/DerivedSources
- rm -rf $WK_ROOT/WebCore/DerivedSources
- rm -rf $WK_ROOT/WebCore/include/JavaScriptCore
- fi
-
- if [ $do_build == 1 ]; then
- if [ "${OSTYPE:0:6}" = "darwin" ]; then
- cd $WEBKITOUTPUTDIR
- mkdir -p wxBrowser.app/Contents/MacOS
- mkdir -p wxBrowser.app/Contents/Frameworks
- cp wxBrowser wxBrowser.app/Contents/MacOS
- install_name_tool -change libwxwebkit.dylib @executable_path/../Frameworks/libwxwebkit.dylib wxBrowser.app/Contents/MacOS/wxBrowser
- if [ ! -f "$WEBKITOUTPUTDIR/libwxwebkit.dylib" ]; then
- ln -s $WEBKITOUTPUTDIR/libwxwebkit.dylib wxBrowser.app/Contents/Frameworks
- fi
- fi
-
- if [ $wxpython == 1 ]; then
- if [ -z $SWIG ]; then
- SWIG=`which swig`
- fi
-
- if [ ! -f "$SWIG" ]; then
- echo "ERROR: Cannot find SWIG. Make sure that SWIG 1.3.29 is located on your path.";
- exit 1;
- fi
-
- cd $WK_ROOT/WebKit/wx/bindings/python
-
- SWIG_FLAGS=`python -c "import wx.build.config; import string; print string.join(wx.build.config.swig_args, ' ')"`
- WEBKIT_INCLUDE="-I$WK_ROOT/WebKit/wx"
- if [ "${OSTYPE:0:6}" == "cygwin" ]; then
- WEBKIT_INCLUDE="-I`cygpath -d $WK_ROOT/WebKit/wx`"
- fi
-
- # Determine which include path to use for wxPython's *.i files
- # Options are:
- # wxPython installed on a posix system
- # the wxPython win32 devel tarball
- # a wx source tree from a tarball where wxPython is in the wx dir
- # a wx source tree from SVN where wxPython is a sibling of the wx dir
- WXPY_INCLUDE=`find_existing_dir \
- $WX_PREFIX/include/wx-2.9/wx/wxPython/i_files \
- $WX_PREFIX/include/wx-2.8/wx/wxPython/i_files \
- $WX_PREFIX/include/wx/wxPython/i_files \
- $WX_PREFIX/wxPython/src \
- $WX_PREFIX/../wxPython/src`
- if [ -z $WXPY_INCLUDE ]; then
- echo "ERROR: Unable to find wxPython's *.i files"
- exit 1
- fi
-
- # Run SWIG
- $SWIG $SWIG_FLAGS -I$WXPY_INCLUDE $WEBKIT_INCLUDE -o webview.cpp webview.i
- cp webview.py $WEBKITOUTPUTDIR/webview.py
-
- PY_INCLUDE=`python -c "import sys,distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_inc())"`
-
- if [ "${OSTYPE:0:6}" == "cygwin" ]; then
- PY_LIBDIR=`python -c "import distutils.sysconfig; import sys; sys.stdout.write(distutils.sysconfig.PREFIX)"`
- PY_LIBDIR="$PY_LIBDIR\\Libs"
- PY_LIB=`python -c "import sys; sys.stdout.write('python' + sys.version[:3])"`
- PY_LIB=`python -c "import sys; sys.stdout.write('$PY_LIB'.replace('.', ''))"`
- else
- PY_LIB=`python-config --libs`
- PY_LIBDIR=`python-config --ldflags`
- fi
-
- do_make $WK_ROOT/WebKit/wx/bindings/python "-DBUILDING_WX__=1 -DWXUSINGDLL=1 -DWXUSINGDLL_WEBKIT=1 -I$PY_INCLUDE -I$WX_PREFIX/wxPython/include -I$WX_PREFIX/../wxPython/include $WXGC_DEFINE $EXTRA_CPPFLAGS" \
- WX_DEBUG=$wxdebug DEBUG=$debug WEBKIT_ROOT=$WK_ROOTDIR PLATFORM_OS=$PLATFORM_OS PYTHON_LIB=$PY_LIB PYTHON_LIBDIR=$PY_LIBDIR $other_args
- if [ "${OSTYPE:0:6}" == "cygwin" ]; then
- if [ -f $WEBKITOUTPUTDIR/_webview.pyd -a -f $WEBKITOUTPUTDIR/_webview.dll ]; then
- rm $WEBKITOUTPUTDIR/_webview.pyd
- mv $WEBKITOUTPUTDIR/_webview.dll $WEBKITOUTPUTDIR/_webview.pyd
- fi
- fi
- fi
-
-
- if [ "$OSTYPE" == "cygwin" ]; then
- echo "Copying necessary DLLs to run test and sample applications..."
- cd $WK_ROOT
- cp $WINDEPS `cygpath -u $WEBKITOUTPUTDIR`
- chmod +x `cygpath -u $WEBKITOUTPUTDIR/`*.dll
- if [ -e `cygpath -u $WEBKITOUTPUTDIR/_webview.dll` ]; then
- mv `cygpath -u $WEBKITOUTPUTDIR/_webview.dll` `cygpath -u $WEBKITOUTPUTDIR/_webview.pyd`
- fi
- fi
-
- BROWSERAPP="wxBrowser"
-
- if [ "${OSTYPE:0:6}" == "darwin" ]; then
- BROWSERAPP="wxBrowser.app/Contents/MacOS/wxBrowser"
- fi
-
- echo ""
- echo ""
- echo "--- BUILD COMPLETE ---"
- echo ""
- echo "Next steps:"
- echo ""
- echo "-- Run '$WK_ROOT/WebKitTools/Scripts/run-javascriptcore-tests --wx' to ensure JSCore tests pass."
- echo ""
- echo "-- Run $WEBKITOUTPUTDIR/$BROWSERAPP to test your wxWebKit build."
- echo ""
- echo ""
- fi
-fi
-
-if [ $do_clean == 1 ]; then
- cd $WK_ROOT/WebKit/wx
- bakefile_gen --clean
-fi
-
-cd $olddir
diff --git a/WebKitTools/wx/build/settings.py b/WebKitTools/wx/build/settings.py
index f7f75b6..9b8165d 100644
--- a/WebKitTools/wx/build/settings.py
+++ b/WebKitTools/wx/build/settings.py
@@ -74,7 +74,7 @@ ports = [
]
port_uses = {
- 'wx': ['CURL','PTHREADS', 'WXGC'],
+ 'wx': ['CURL', 'WXGC'],
}
jscore_dirs = [
@@ -99,7 +99,8 @@ webcore_dirs = [
'bindings',
'bindings/js',
'bridge',
- 'bridge/c',
+ 'bridge/c',
+ 'bridge/jsc',
'css',
'DerivedSources',
'dom',
@@ -125,9 +126,7 @@ webcore_dirs = [
'platform/image-decoders/gif',
'platform/image-decoders/ico',
'platform/image-decoders/jpeg',
- 'platform/image-decoders/png',
- 'platform/image-decoders/xbm',
- 'platform/image-decoders/zlib',
+ 'platform/image-decoders/png',
'platform/mock',
'platform/network',
'platform/sql',
@@ -256,14 +255,11 @@ def common_configure(conf):
# This one also occurs in C code, so disable it there as well.
conf.env.append_value('CCFLAGS', ['/wd4996'])
-
- for use in port_uses[build_port]:
- conf.env.append_value('CXXDEFINES', ['WTF_USE_%s' % use])
if build_port == "wx":
update_wx_deps(conf, wk_root, msvc_version)
- conf.env.append_value('CXXDEFINES', ['BUILDING_WX__=1'])
+ conf.env.append_value('CXXDEFINES', ['BUILDING_WX__=1', 'JS_NO_EXPORT'])
if building_on_win32:
conf.env.append_value('LIBPATH', os.path.join(msvclibs_dir, 'lib'))
@@ -356,6 +352,7 @@ def common_configure(conf):
conf.env['LIB_XSLT'] = ['libxslt']
else:
if build_port == 'wx':
+ port_uses['wx'].append('PTHREADS')
conf.env.append_value('LIB', ['jpeg', 'png', 'pthread'])
conf.env.append_value('LIBPATH', os.path.join(wklibs_dir, 'unix', 'lib'))
conf.env.append_value('CPPPATH', os.path.join(wklibs_dir, 'unix', 'include'))
@@ -376,3 +373,6 @@ def common_configure(conf):
conf.check_cfg(package='gtk+-2.0', args='--cflags --libs', uselib_store='WX', mandatory=True)
conf.check_cfg(package='sqlite3', args='--cflags --libs', uselib_store='SQLITE3', mandatory=True)
conf.check_cfg(path='icu-config', args='--cflags --ldflags', package='', uselib_store='ICU', mandatory=True)
+
+ for use in port_uses[build_port]:
+ conf.env.append_value('CXXDEFINES', ['WTF_USE_%s' % use])